aboutsummaryrefslogtreecommitdiffstats
path: root/website
diff options
context:
space:
mode:
authorMark Miller <erights@gmail.com>2011-09-07 00:02:16 -0700
committerMark Miller <erights@gmail.com>2011-09-07 00:02:16 -0700
commit9fab5f9a3a519141670e4d6d4c3016d469233322 (patch)
treeabe32c6a537df0872e2b64ff0b5dcc784a1ad6f4 /website
parent2f25dc8f0c4312ab67c91e9e2e995c7251ff4f9b (diff)
Much rougher: A first attempt at building the testcases for the website based on the new canonical test262 style testcase.
Diffstat (limited to 'website')
-rw-r--r--website/resources/scripts/testcases2/10.1.1.json248
-rw-r--r--website/resources/scripts/testcases2/10.1.3_Variable_Instantiation.json56
-rw-r--r--website/resources/scripts/testcases2/10.1.4_Scope_Chain_and_Identifier_Resolution.json62
-rw-r--r--website/resources/scripts/testcases2/10.1.5_Global_Object.json152
-rw-r--r--website/resources/scripts/testcases2/10.1.8_Arguments_Object.json86
-rw-r--r--website/resources/scripts/testcases2/10.1_Definitions.json56
-rw-r--r--website/resources/scripts/testcases2/10.2.1.1.3.json38
-rw-r--r--website/resources/scripts/testcases2/10.2.1_Global_Code.json20
-rw-r--r--website/resources/scripts/testcases2/10.2.2_Eval_Code.json140
-rw-r--r--website/resources/scripts/testcases2/10.2_Entering_An_Execution_Context.json20
-rw-r--r--website/resources/scripts/testcases2/10.4.2.json83
-rw-r--r--website/resources/scripts/testcases2/10.4.3.json47
-rw-r--r--website/resources/scripts/testcases2/10.5.json46
-rw-r--r--website/resources/scripts/testcases2/10.6.json195
-rw-r--r--website/resources/scripts/testcases2/11.1.1_The_this_Keyword.json45
-rw-r--r--website/resources/scripts/testcases2/11.1.2_Identifier_Reference.json20
-rw-r--r--website/resources/scripts/testcases2/11.1.4.json28
-rw-r--r--website/resources/scripts/testcases2/11.1.4_Array_Initialiser.json56
-rw-r--r--website/resources/scripts/testcases2/11.1.5.json209
-rw-r--r--website/resources/scripts/testcases2/11.1.5_Object_Initializer.json64
-rw-r--r--website/resources/scripts/testcases2/11.1.6_The_Grouping_Operator.json56
-rw-r--r--website/resources/scripts/testcases2/11.10.1_AND_Operator.json146
-rw-r--r--website/resources/scripts/testcases2/11.10.2_XOR_Operator.json146
-rw-r--r--website/resources/scripts/testcases2/11.10.3_OR_Operator.json146
-rw-r--r--website/resources/scripts/testcases2/11.11.1_Logical_AND_Operator.json104
-rw-r--r--website/resources/scripts/testcases2/11.11.2_Logical_OR_Operator.json104
-rw-r--r--website/resources/scripts/testcases2/11.12_Conditional_Operator.json98
-rw-r--r--website/resources/scripts/testcases2/11.13.1.json118
-rw-r--r--website/resources/scripts/testcases2/11.13.1_Simple_Assignment.json57
-rw-r--r--website/resources/scripts/testcases2/11.13.2.json604
-rw-r--r--website/resources/scripts/testcases2/11.13.2_Compound_Assignment.json1339
-rw-r--r--website/resources/scripts/testcases2/11.14_Comma_Operator.json38
-rw-r--r--website/resources/scripts/testcases2/11.2.1_Property_Accessors.json110
-rw-r--r--website/resources/scripts/testcases2/11.2.2_The_new_Operator.json86
-rw-r--r--website/resources/scripts/testcases2/11.2.3_Function_Calls.json80
-rw-r--r--website/resources/scripts/testcases2/11.2.4_Argument_Lists.json63
-rw-r--r--website/resources/scripts/testcases2/11.3.1.json24
-rw-r--r--website/resources/scripts/testcases2/11.3.1_Postfix_Increment_Operator.json127
-rw-r--r--website/resources/scripts/testcases2/11.3.2.json24
-rw-r--r--website/resources/scripts/testcases2/11.3.2_Postfix_Decrement_Operator.json127
-rw-r--r--website/resources/scripts/testcases2/11.4.1.json470
-rw-r--r--website/resources/scripts/testcases2/11.4.1_The_delete_Operator.json56
-rw-r--r--website/resources/scripts/testcases2/11.4.2_The_void_Operator.json63
-rw-r--r--website/resources/scripts/testcases2/11.4.3_The_typeof_Operator.json68
-rw-r--r--website/resources/scripts/testcases2/11.4.4.json24
-rw-r--r--website/resources/scripts/testcases2/11.4.4_Prefix_Increment_Operator.json99
-rw-r--r--website/resources/scripts/testcases2/11.4.5.json24
-rw-r--r--website/resources/scripts/testcases2/11.4.5_Prefix_Decrement_Operator.json99
-rw-r--r--website/resources/scripts/testcases2/11.4.6_Unary_plus_Operator.json62
-rw-r--r--website/resources/scripts/testcases2/11.4.7_Unary_minus_Operator.json74
-rw-r--r--website/resources/scripts/testcases2/11.4.8_Bitwise_NOT_Operator.json62
-rw-r--r--website/resources/scripts/testcases2/11.4.9_Logical_NOT_Operator.json62
-rw-r--r--website/resources/scripts/testcases2/11.5.1_Applying_the_asterisk_Operator.json200
-rw-r--r--website/resources/scripts/testcases2/11.5.2_Applying_the_slash_Operator.json212
-rw-r--r--website/resources/scripts/testcases2/11.5.3_Applying_the_percent_Operator.json194
-rw-r--r--website/resources/scripts/testcases2/11.6.1_The_Addition_operator.json212
-rw-r--r--website/resources/scripts/testcases2/11.6.2_The_Subtraction_operator.json194
-rw-r--r--website/resources/scripts/testcases2/11.7.1_The_Left_shift_Operator.json182
-rw-r--r--website/resources/scripts/testcases2/11.7.2_The_Sign_Left_shift_Operator.json182
-rw-r--r--website/resources/scripts/testcases2/11.7.3_The_Unsigned_Right_Shift_Operator.json182
-rw-r--r--website/resources/scripts/testcases2/11.8.1_The_Less_than_Operator.json224
-rw-r--r--website/resources/scripts/testcases2/11.8.2.json32
-rw-r--r--website/resources/scripts/testcases2/11.8.2_The_Greater_than_Operator.json224
-rw-r--r--website/resources/scripts/testcases2/11.8.3.json38
-rw-r--r--website/resources/scripts/testcases2/11.8.3_The_Less_than_or_equal_Operator.json224
-rw-r--r--website/resources/scripts/testcases2/11.8.4_The_Grater_than_or_equal_Operator.json224
-rw-r--r--website/resources/scripts/testcases2/11.8.6_The_instanceof_operator.json128
-rw-r--r--website/resources/scripts/testcases2/11.8.7_The_in_operator.json62
-rw-r--r--website/resources/scripts/testcases2/11.9.1_The_Equals_Operator.json182
-rw-r--r--website/resources/scripts/testcases2/11.9.2_The_Does_not_equals_Operator.json182
-rw-r--r--website/resources/scripts/testcases2/11.9.4_The_Strict_Equals_Operator.json134
-rw-r--r--website/resources/scripts/testcases2/11.9.5_The_Strict_Does_not_equals_Operator.json134
-rw-r--r--website/resources/scripts/testcases2/12.1.json50
-rw-r--r--website/resources/scripts/testcases2/12.10.1.json126
-rw-r--r--website/resources/scripts/testcases2/12.10.json80
-rw-r--r--website/resources/scripts/testcases2/12.10_The_with_Statement.json968
-rw-r--r--website/resources/scripts/testcases2/12.11_The_switch_Statement.json80
-rw-r--r--website/resources/scripts/testcases2/12.12_Labelled_Statements.json14
-rw-r--r--website/resources/scripts/testcases2/12.13_The_throw_statement.json93
-rw-r--r--website/resources/scripts/testcases2/12.14.1.json53
-rw-r--r--website/resources/scripts/testcases2/12.14.json98
-rw-r--r--website/resources/scripts/testcases2/12.14_The_try_Statement.json375
-rw-r--r--website/resources/scripts/testcases2/12.1_Block.json41
-rw-r--r--website/resources/scripts/testcases2/12.2.1.json146
-rw-r--r--website/resources/scripts/testcases2/12.2_Variable_Statement.json136
-rw-r--r--website/resources/scripts/testcases2/12.3_Empty_Statement.json14
-rw-r--r--website/resources/scripts/testcases2/12.4_Expression_Statement.json27
-rw-r--r--website/resources/scripts/testcases2/12.5_The_if_Statement.json160
-rw-r--r--website/resources/scripts/testcases2/12.6.1_The_do_while_Statement.json181
-rw-r--r--website/resources/scripts/testcases2/12.6.2_The_while_statement.json174
-rw-r--r--website/resources/scripts/testcases2/12.6.3.json134
-rw-r--r--website/resources/scripts/testcases2/12.6.3_The_for_Statement.json259
-rw-r--r--website/resources/scripts/testcases2/12.6.4.json21
-rw-r--r--website/resources/scripts/testcases2/12.6.4_The_for_in_Statement.json120
-rw-r--r--website/resources/scripts/testcases2/12.7.json14
-rw-r--r--website/resources/scripts/testcases2/12.7_The_continue_Statement.json126
-rw-r--r--website/resources/scripts/testcases2/12.8.json14
-rw-r--r--website/resources/scripts/testcases2/12.8_The_break_Statement.json126
-rw-r--r--website/resources/scripts/testcases2/12.9.json14
-rw-r--r--website/resources/scripts/testcases2/12.9_The_return_Statement.json102
-rw-r--r--website/resources/scripts/testcases2/13.0.json118
-rw-r--r--website/resources/scripts/testcases2/13.1.json404
-rw-r--r--website/resources/scripts/testcases2/13.2.json83
-rw-r--r--website/resources/scripts/testcases2/13.2_Creating_Function_Objects.json422
-rw-r--r--website/resources/scripts/testcases2/13_Function_Definition.json261
-rw-r--r--website/resources/scripts/testcases2/14.1.json137
-rw-r--r--website/resources/scripts/testcases2/14_Program.json38
-rw-r--r--website/resources/scripts/testcases2/15.1.1.1.json15
-rw-r--r--website/resources/scripts/testcases2/15.1.1.1_NaN.json42
-rw-r--r--website/resources/scripts/testcases2/15.1.1.2.json15
-rw-r--r--website/resources/scripts/testcases2/15.1.1.2_Infinity.json42
-rw-r--r--website/resources/scripts/testcases2/15.1.1.3.json15
-rw-r--r--website/resources/scripts/testcases2/15.1.1.3_undefined.json44
-rw-r--r--website/resources/scripts/testcases2/15.1.2.1_eval.json167
-rw-r--r--website/resources/scripts/testcases2/15.1.2.2.json14
-rw-r--r--website/resources/scripts/testcases2/15.1.2.2_parseInt.json354
-rw-r--r--website/resources/scripts/testcases2/15.1.2.3.json14
-rw-r--r--website/resources/scripts/testcases2/15.1.2.3_parseFloat.json246
-rw-r--r--website/resources/scripts/testcases2/15.1.2.4_isNaN.json66
-rw-r--r--website/resources/scripts/testcases2/15.1.2.5_isFinite.json66
-rw-r--r--website/resources/scripts/testcases2/15.1.3.1_decodeURI.json324
-rw-r--r--website/resources/scripts/testcases2/15.1.3.2_decodeURIComponent.json320
-rw-r--r--website/resources/scripts/testcases2/15.1.3.3_encodeURI.json176
-rw-r--r--website/resources/scripts/testcases2/15.1.3.4_encodeURIComponent.json176
-rw-r--r--website/resources/scripts/testcases2/15.10.1_Patterns.json104
-rw-r--r--website/resources/scripts/testcases2/15.10.2.10_CharacterEscape.json92
-rw-r--r--website/resources/scripts/testcases2/15.10.2.11_DecimalEscape.json64
-rw-r--r--website/resources/scripts/testcases2/15.10.2.12_CharacterClassEscape.json176
-rw-r--r--website/resources/scripts/testcases2/15.10.2.13_CharacterClass.json182
-rw-r--r--website/resources/scripts/testcases2/15.10.2.15_NonemptyClassRanges.json254
-rw-r--r--website/resources/scripts/testcases2/15.10.2.3_Disjunction.json110
-rw-r--r--website/resources/scripts/testcases2/15.10.2.5_Term.json38
-rw-r--r--website/resources/scripts/testcases2/15.10.2.6_Assertion.json272
-rw-r--r--website/resources/scripts/testcases2/15.10.2.7_Quantifier.json422
-rw-r--r--website/resources/scripts/testcases2/15.10.2.8_Atom.json368
-rw-r--r--website/resources/scripts/testcases2/15.10.2.9_AtomEscape.json38
-rw-r--r--website/resources/scripts/testcases2/15.10.2.json38
-rw-r--r--website/resources/scripts/testcases2/15.10.2_Pattern_Semantics.json14
-rw-r--r--website/resources/scripts/testcases2/15.10.3_The_RegExp_Constructor_Called_as_a_Function.json62
-rw-r--r--website/resources/scripts/testcases2/15.10.4.json32
-rw-r--r--website/resources/scripts/testcases2/15.10.4_The_RegExp_Constructor.json278
-rw-r--r--website/resources/scripts/testcases2/15.10.5_Properties_of_the_RegExp_Constructor.json50
-rw-r--r--website/resources/scripts/testcases2/15.10.6.2.json14
-rw-r--r--website/resources/scripts/testcases2/15.10.6.2_RegExp.prototype.exec.json368
-rw-r--r--website/resources/scripts/testcases2/15.10.6.3_RegExp.prototype.test.json230
-rw-r--r--website/resources/scripts/testcases2/15.10.6.4_RegExp.prototype.toString.json44
-rw-r--r--website/resources/scripts/testcases2/15.10.6.json14
-rw-r--r--website/resources/scripts/testcases2/15.10.6_Properties_of_the_RegExp_Prototype_Object.json38
-rw-r--r--website/resources/scripts/testcases2/15.10.7.1.json21
-rw-r--r--website/resources/scripts/testcases2/15.10.7.1_source.json26
-rw-r--r--website/resources/scripts/testcases2/15.10.7.2.json21
-rw-r--r--website/resources/scripts/testcases2/15.10.7.2_global.json26
-rw-r--r--website/resources/scripts/testcases2/15.10.7.3.json21
-rw-r--r--website/resources/scripts/testcases2/15.10.7.3_ignoreCase.json26
-rw-r--r--website/resources/scripts/testcases2/15.10.7.4.json21
-rw-r--r--website/resources/scripts/testcases2/15.10.7.4_multiline.json26
-rw-r--r--website/resources/scripts/testcases2/15.10.7.5.json21
-rw-r--r--website/resources/scripts/testcases2/15.10.7.5_lastIndex.json20
-rw-r--r--website/resources/scripts/testcases2/15.10.7_Properties_of_RegExp_Instances.json44
-rw-r--r--website/resources/scripts/testcases2/15.11.1_The_Error_Constructor_Called_as_a_Function.json32
-rw-r--r--website/resources/scripts/testcases2/15.11.2_The_Error_Constructor.json26
-rw-r--r--website/resources/scripts/testcases2/15.11.3_Properties_of_the_Error_Constructor.json44
-rw-r--r--website/resources/scripts/testcases2/15.11.4.4.json44
-rw-r--r--website/resources/scripts/testcases2/15.11.4_Properties_of_the_Error_Prototype_Object.json80
-rw-r--r--website/resources/scripts/testcases2/15.11.json20
-rw-r--r--website/resources/scripts/testcases2/15.12.1.1.json232
-rw-r--r--website/resources/scripts/testcases2/15.12.2.json89
-rw-r--r--website/resources/scripts/testcases2/15.12.2_JSON.parse.json14
-rw-r--r--website/resources/scripts/testcases2/15.12.3.json368
-rw-r--r--website/resources/scripts/testcases2/15.12.json36
-rw-r--r--website/resources/scripts/testcases2/15.1_The_Global_Object.json29
-rw-r--r--website/resources/scripts/testcases2/15.2.1_The_Object_Constructor_Called_as_a_Function.json140
-rw-r--r--website/resources/scripts/testcases2/15.2.2_The_Object_Constructor.json158
-rw-r--r--website/resources/scripts/testcases2/15.2.3.1.json15
-rw-r--r--website/resources/scripts/testcases2/15.2.3.10.json245
-rw-r--r--website/resources/scripts/testcases2/15.2.3.11.json217
-rw-r--r--website/resources/scripts/testcases2/15.2.3.12.json399
-rw-r--r--website/resources/scripts/testcases2/15.2.3.13.json259
-rw-r--r--website/resources/scripts/testcases2/15.2.3.14.json357
-rw-r--r--website/resources/scripts/testcases2/15.2.3.1_Object.prototype.json23
-rw-r--r--website/resources/scripts/testcases2/15.2.3.2.json266
-rw-r--r--website/resources/scripts/testcases2/15.2.3.3.json2198
-rw-r--r--website/resources/scripts/testcases2/15.2.3.4.json252
-rw-r--r--website/resources/scripts/testcases2/15.2.3.5.json2205
-rw-r--r--website/resources/scripts/testcases2/15.2.3.6.json7805
-rw-r--r--website/resources/scripts/testcases2/15.2.3.7.json4340
-rw-r--r--website/resources/scripts/testcases2/15.2.3.8.json308
-rw-r--r--website/resources/scripts/testcases2/15.2.3.9.json315
-rw-r--r--website/resources/scripts/testcases2/15.2.3_Properties_of_the_Object_Constructor.json26
-rw-r--r--website/resources/scripts/testcases2/15.2.4.2.json32
-rw-r--r--website/resources/scripts/testcases2/15.2.4.2_Object.prototype.toString.json84
-rw-r--r--website/resources/scripts/testcases2/15.2.4.3_Object.prototype.toLocaleString.json66
-rw-r--r--website/resources/scripts/testcases2/15.2.4.4_Object.prototype.valueOf.json109
-rw-r--r--website/resources/scripts/testcases2/15.2.4.5_Object.prototype.hasOwnProperty.json76
-rw-r--r--website/resources/scripts/testcases2/15.2.4.6_Object.prototype.isPrototypeOf.json66
-rw-r--r--website/resources/scripts/testcases2/15.2.4.7_Object.prototype.propertyIsEnumerable.json78
-rw-r--r--website/resources/scripts/testcases2/15.2.4_Properties_of_the_Object_Prototype_Object.json50
-rw-r--r--website/resources/scripts/testcases2/15.2_Object_Objects.json14
-rw-r--r--website/resources/scripts/testcases2/15.3.2.1.json92
-rw-r--r--website/resources/scripts/testcases2/15.3.2_The_Function_Constructor.json218
-rw-r--r--website/resources/scripts/testcases2/15.3.3.1_Function.prototype.json26
-rw-r--r--website/resources/scripts/testcases2/15.3.3.2.json15
-rw-r--r--website/resources/scripts/testcases2/15.3.3_Properties_of_the_Function_Constructor.json32
-rw-r--r--website/resources/scripts/testcases2/15.3.4.2_Function.prototype.toString.json85
-rw-r--r--website/resources/scripts/testcases2/15.3.4.3.json32
-rw-r--r--website/resources/scripts/testcases2/15.3.4.3_Function.prototype.apply.json311
-rw-r--r--website/resources/scripts/testcases2/15.3.4.4.json32
-rw-r--r--website/resources/scripts/testcases2/15.3.4.4_Function.prototype.call.json287
-rw-r--r--website/resources/scripts/testcases2/15.3.4.5.1.json113
-rw-r--r--website/resources/scripts/testcases2/15.3.4.5.2.json106
-rw-r--r--website/resources/scripts/testcases2/15.3.4.5.json427
-rw-r--r--website/resources/scripts/testcases2/15.3.4.5_Function.prototype.bind.json49
-rw-r--r--website/resources/scripts/testcases2/15.3.4_Properties_of_the_Function_Prototype_Object.json68
-rw-r--r--website/resources/scripts/testcases2/15.3.5_Properties_of_Function_Instances.json206
-rw-r--r--website/resources/scripts/testcases2/15.3_Function_Objects.json68
-rw-r--r--website/resources/scripts/testcases2/15.4.1_The_Array_Constructor_Called_as_a_Function.json56
-rw-r--r--website/resources/scripts/testcases2/15.4.2.1_new_Array.json50
-rw-r--r--website/resources/scripts/testcases2/15.4.2.2_new_Array_len.json86
-rw-r--r--website/resources/scripts/testcases2/15.4.3.1_Array_prototype.json42
-rw-r--r--website/resources/scripts/testcases2/15.4.3.2.json175
-rw-r--r--website/resources/scripts/testcases2/15.4.3_Properties_of_the_Array_Constructor.json50
-rw-r--r--website/resources/scripts/testcases2/15.4.4.10.json15
-rw-r--r--website/resources/scripts/testcases2/15.4.4.10_Array_prototype_slice.json298
-rw-r--r--website/resources/scripts/testcases2/15.4.4.11_Array_prototype_sort.json180
-rw-r--r--website/resources/scripts/testcases2/15.4.4.12.json21
-rw-r--r--website/resources/scripts/testcases2/15.4.4.12_Array_prototype_splice.json318
-rw-r--r--website/resources/scripts/testcases2/15.4.4.13_Array_prototype_unshift.json114
-rw-r--r--website/resources/scripts/testcases2/15.4.4.14.json1358
-rw-r--r--website/resources/scripts/testcases2/15.4.4.15.json1358
-rw-r--r--website/resources/scripts/testcases2/15.4.4.16.json1499
-rw-r--r--website/resources/scripts/testcases2/15.4.4.17.json1506
-rw-r--r--website/resources/scripts/testcases2/15.4.4.18.json1310
-rw-r--r--website/resources/scripts/testcases2/15.4.4.18_Array_prototype_forEach.json20
-rw-r--r--website/resources/scripts/testcases2/15.4.4.19.json1359
-rw-r--r--website/resources/scripts/testcases2/15.4.4.1_Array_prototype_constructor.json20
-rw-r--r--website/resources/scripts/testcases2/15.4.4.20.json1576
-rw-r--r--website/resources/scripts/testcases2/15.4.4.21.json1821
-rw-r--r--website/resources/scripts/testcases2/15.4.4.22.json1814
-rw-r--r--website/resources/scripts/testcases2/15.4.4.2_Array_prototype_toString.json90
-rw-r--r--website/resources/scripts/testcases2/15.4.4.3_Array_prototype_toLocaleString.json70
-rw-r--r--website/resources/scripts/testcases2/15.4.4.4.json22
-rw-r--r--website/resources/scripts/testcases2/15.4.4.4_Array_prototype_concat.json96
-rw-r--r--website/resources/scripts/testcases2/15.4.4.5_Array_prototype_join.json150
-rw-r--r--website/resources/scripts/testcases2/15.4.4.6_Array_prototype_pop.json120
-rw-r--r--website/resources/scripts/testcases2/15.4.4.7_Array_prototype_push.json114
-rw-r--r--website/resources/scripts/testcases2/15.4.4.8_Array_prototype_reverse.json114
-rw-r--r--website/resources/scripts/testcases2/15.4.4.9_Array_prototype_shift.json124
-rw-r--r--website/resources/scripts/testcases2/15.4.4_Properties_of_the_Array_Prototype_Object.json50
-rw-r--r--website/resources/scripts/testcases2/15.4.5.1.json38
-rw-r--r--website/resources/scripts/testcases2/15.4.5.1_Put.json68
-rw-r--r--website/resources/scripts/testcases2/15.4.5.2_length.json50
-rw-r--r--website/resources/scripts/testcases2/15.4.5.json14
-rw-r--r--website/resources/scripts/testcases2/15.4_Array_Objects.json68
-rw-r--r--website/resources/scripts/testcases2/15.5.1_The_String_Constructor_Called_as_a_Function.json128
-rw-r--r--website/resources/scripts/testcases2/15.5.2_The_String_Constructor.json128
-rw-r--r--website/resources/scripts/testcases2/15.5.3_Properties_of_the_String_Constructor.json80
-rw-r--r--website/resources/scripts/testcases2/15.5.4.10_String.prototype.match.json236
-rw-r--r--website/resources/scripts/testcases2/15.5.4.11_String.prototype.replace.json260
-rw-r--r--website/resources/scripts/testcases2/15.5.4.12_String.prototype.search.json188
-rw-r--r--website/resources/scripts/testcases2/15.5.4.13_String.prototype.slice.json212
-rw-r--r--website/resources/scripts/testcases2/15.5.4.14_String.prototype.split.json626
-rw-r--r--website/resources/scripts/testcases2/15.5.4.15_String.prototype.substring.json260
-rw-r--r--website/resources/scripts/testcases2/15.5.4.16_String.prototype.toLowerCase.json134
-rw-r--r--website/resources/scripts/testcases2/15.5.4.17_String.prototype.toLocaleLowerCase.json134
-rw-r--r--website/resources/scripts/testcases2/15.5.4.18_String.prototype.toUpperCase.json134
-rw-r--r--website/resources/scripts/testcases2/15.5.4.19_String.prototype.toLocaleUpperCase.json134
-rw-r--r--website/resources/scripts/testcases2/15.5.4.20.json889
-rw-r--r--website/resources/scripts/testcases2/15.5.4.4_String.prototype.charAt.json146
-rw-r--r--website/resources/scripts/testcases2/15.5.4.5_String.prototype.charCodeAt.json128
-rw-r--r--website/resources/scripts/testcases2/15.5.4.6_String.prototype.concat.json128
-rw-r--r--website/resources/scripts/testcases2/15.5.4.7_String.prototype.indexOf.json224
-rw-r--r--website/resources/scripts/testcases2/15.5.4.8_String.prototype.lastIndexOf.json146
-rw-r--r--website/resources/scripts/testcases2/15.5.4.9_String.prototype.localeCompare.json56
-rw-r--r--website/resources/scripts/testcases2/15.5.4_Properties_of_the_String_Prototype_Object.json122
-rw-r--r--website/resources/scripts/testcases2/15.5.5.2.json92
-rw-r--r--website/resources/scripts/testcases2/15.5.5_Properties_of_String_Instances.json62
-rw-r--r--website/resources/scripts/testcases2/15.6.1_The_Boolean_Constructor_Called_as_a_Function.json44
-rw-r--r--website/resources/scripts/testcases2/15.6.2_The_Boolean_Constructor.json32
-rw-r--r--website/resources/scripts/testcases2/15.6.3.1_Boolean.prototype.json32
-rw-r--r--website/resources/scripts/testcases2/15.6.3_Properties_of_the_Boolean_Constructor.json26
-rw-r--r--website/resources/scripts/testcases2/15.6.4_Properties_of_the_Boolean_Prototype_Object.json110
-rw-r--r--website/resources/scripts/testcases2/15.7.1_The_Number_Constructor_Called_as_a_Function.json20
-rw-r--r--website/resources/scripts/testcases2/15.7.2_The_Number_Constructor.json32
-rw-r--r--website/resources/scripts/testcases2/15.7.3.1.json22
-rw-r--r--website/resources/scripts/testcases2/15.7.3.1_Number.prototype.json46
-rw-r--r--website/resources/scripts/testcases2/15.7.3.2_Number.MAX_VALUE.json34
-rw-r--r--website/resources/scripts/testcases2/15.7.3.3_Number.MIN_VALUE.json34
-rw-r--r--website/resources/scripts/testcases2/15.7.3.4_Number.NaN.json34
-rw-r--r--website/resources/scripts/testcases2/15.7.3.5_Number.NEGATIVE_INFINITY.json34
-rw-r--r--website/resources/scripts/testcases2/15.7.3.6_Number.POSITIVE_INFINITY.json34
-rw-r--r--website/resources/scripts/testcases2/15.7.3.json21
-rw-r--r--website/resources/scripts/testcases2/15.7.3_Properties_of_Number_Constructor.json56
-rw-r--r--website/resources/scripts/testcases2/15.7.4.1_Number.prototype.constructor.json14
-rw-r--r--website/resources/scripts/testcases2/15.7.4.2_Number.prototype.toString.json284
-rw-r--r--website/resources/scripts/testcases2/15.7.4.4_Number.prototype.valueOf.json50
-rw-r--r--website/resources/scripts/testcases2/15.7.4.5_Number.prototype.toFixed.json44
-rw-r--r--website/resources/scripts/testcases2/15.7.4.json15
-rw-r--r--website/resources/scripts/testcases2/15.7.4_Properties_of_the_Number_Prototype_Object.json62
-rw-r--r--website/resources/scripts/testcases2/15.7.5_Properties_of_Number_Instances.json50
-rw-r--r--website/resources/scripts/testcases2/15.8.1.1_E.json36
-rw-r--r--website/resources/scripts/testcases2/15.8.1.2_LN10.json36
-rw-r--r--website/resources/scripts/testcases2/15.8.1.3_LN2.json36
-rw-r--r--website/resources/scripts/testcases2/15.8.1.4_LOG2E.json36
-rw-r--r--website/resources/scripts/testcases2/15.8.1.5_LOG10E.json36
-rw-r--r--website/resources/scripts/testcases2/15.8.1.6_PI.json36
-rw-r--r--website/resources/scripts/testcases2/15.8.1.7_SQRT1_2.json36
-rw-r--r--website/resources/scripts/testcases2/15.8.1.8_SQRT2.json36
-rw-r--r--website/resources/scripts/testcases2/15.8.2.10_log.json44
-rw-r--r--website/resources/scripts/testcases2/15.8.2.11_max.json32
-rw-r--r--website/resources/scripts/testcases2/15.8.2.12_min.json32
-rw-r--r--website/resources/scripts/testcases2/15.8.2.13_pow.json152
-rw-r--r--website/resources/scripts/testcases2/15.8.2.14_random.json14
-rw-r--r--website/resources/scripts/testcases2/15.8.2.15_round.json50
-rw-r--r--website/resources/scripts/testcases2/15.8.2.16_sin.json44
-rw-r--r--website/resources/scripts/testcases2/15.8.2.17_sqrt.json44
-rw-r--r--website/resources/scripts/testcases2/15.8.2.18_tan.json50
-rw-r--r--website/resources/scripts/testcases2/15.8.2.1_abs.json26
-rw-r--r--website/resources/scripts/testcases2/15.8.2.2_acos.json38
-rw-r--r--website/resources/scripts/testcases2/15.8.2.3_asin.json44
-rw-r--r--website/resources/scripts/testcases2/15.8.2.4_atan.json44
-rw-r--r--website/resources/scripts/testcases2/15.8.2.5_atan2.json152
-rw-r--r--website/resources/scripts/testcases2/15.8.2.6_ceil.json50
-rw-r--r--website/resources/scripts/testcases2/15.8.2.7_cos.json50
-rw-r--r--website/resources/scripts/testcases2/15.8.2.8_exp.json44
-rw-r--r--website/resources/scripts/testcases2/15.8.2.9_floor.json50
-rw-r--r--website/resources/scripts/testcases2/15.9.1.15.json15
-rw-r--r--website/resources/scripts/testcases2/15.9.2_The_Date_Constructor_Called_as_a_Function.json20
-rw-r--r--website/resources/scripts/testcases2/15.9.3_The_Date_Constructor.json278
-rw-r--r--website/resources/scripts/testcases2/15.9.4.1_Date.prototype.json26
-rw-r--r--website/resources/scripts/testcases2/15.9.4.2_Date.parse.json50
-rw-r--r--website/resources/scripts/testcases2/15.9.4.3_Date.UTC.json50
-rw-r--r--website/resources/scripts/testcases2/15.9.4.4.json36
-rw-r--r--website/resources/scripts/testcases2/15.9.4_Properties_of_the_Date_Constructor.json38
-rw-r--r--website/resources/scripts/testcases2/15.9.5.10_Date.prototype.getFullYear.json50
-rw-r--r--website/resources/scripts/testcases2/15.9.5.11_Date.prototype.getUTCFullYear.json50
-rw-r--r--website/resources/scripts/testcases2/15.9.5.12_Date.prototype.getMonth.json50
-rw-r--r--website/resources/scripts/testcases2/15.9.5.13_Date.prototype.getUTCMonth.json50
-rw-r--r--website/resources/scripts/testcases2/15.9.5.14_Date.prototype.getDate.json50
-rw-r--r--website/resources/scripts/testcases2/15.9.5.15_Date.prototype.getUTCDate.json50
-rw-r--r--website/resources/scripts/testcases2/15.9.5.16_Date.prototype.getDay.json50
-rw-r--r--website/resources/scripts/testcases2/15.9.5.17_Date.prototype.getUTCDay.json50
-rw-r--r--website/resources/scripts/testcases2/15.9.5.18_Date.prototype.getHours.json50
-rw-r--r--website/resources/scripts/testcases2/15.9.5.19_Date.prototype.getUTCHours.json50
-rw-r--r--website/resources/scripts/testcases2/15.9.5.1_Date.prototype.constructor.json50
-rw-r--r--website/resources/scripts/testcases2/15.9.5.20_Date.prototype.getMinutes.json50
-rw-r--r--website/resources/scripts/testcases2/15.9.5.21_Date.prototype.getUTCMinutes.json50
-rw-r--r--website/resources/scripts/testcases2/15.9.5.22_Date.prototype.getSeconds.json50
-rw-r--r--website/resources/scripts/testcases2/15.9.5.23_Date.prototype.getUTCSeconds.json50
-rw-r--r--website/resources/scripts/testcases2/15.9.5.24_Date.prototype.getMilliseconds.json50
-rw-r--r--website/resources/scripts/testcases2/15.9.5.25_Date.prototype.getUTCMilliseconds.json50
-rw-r--r--website/resources/scripts/testcases2/15.9.5.26_Date.prototype.getTimezoneOffset.json50
-rw-r--r--website/resources/scripts/testcases2/15.9.5.27_Date.prototype.setTime.json50
-rw-r--r--website/resources/scripts/testcases2/15.9.5.28_Date.prototype.setMilliseconds.json50
-rw-r--r--website/resources/scripts/testcases2/15.9.5.29_Date.prototype.setUTCMilliseconds.json50
-rw-r--r--website/resources/scripts/testcases2/15.9.5.2_Date.prototype.toString.json50
-rw-r--r--website/resources/scripts/testcases2/15.9.5.30_Date.prototype.setSeconds.json50
-rw-r--r--website/resources/scripts/testcases2/15.9.5.31_Date.prototype.setUTCSeconds.json50
-rw-r--r--website/resources/scripts/testcases2/15.9.5.32_Date.prototype.setMinutes.json50
-rw-r--r--website/resources/scripts/testcases2/15.9.5.33_Date.prototype.setUTCMinutes.json50
-rw-r--r--website/resources/scripts/testcases2/15.9.5.34_Date.prototype.setHours.json50
-rw-r--r--website/resources/scripts/testcases2/15.9.5.35_Date.prototype.setUTCHours.json50
-rw-r--r--website/resources/scripts/testcases2/15.9.5.36_Date.prototype.setDate.json50
-rw-r--r--website/resources/scripts/testcases2/15.9.5.37_Date.prototype.setUTCDate.json50
-rw-r--r--website/resources/scripts/testcases2/15.9.5.38_Date.prototype.setMonth.json50
-rw-r--r--website/resources/scripts/testcases2/15.9.5.39_Date.prototype.setUTCMonth.json50
-rw-r--r--website/resources/scripts/testcases2/15.9.5.3_Date.prototype.toDateString.json50
-rw-r--r--website/resources/scripts/testcases2/15.9.5.40_Date.prototype.setFullYear.json50
-rw-r--r--website/resources/scripts/testcases2/15.9.5.41_Date.prototype.setUTCFullYear.json50
-rw-r--r--website/resources/scripts/testcases2/15.9.5.42_Date.prototype.toUTCString.json50
-rw-r--r--website/resources/scripts/testcases2/15.9.5.43.json113
-rw-r--r--website/resources/scripts/testcases2/15.9.5.44.json21
-rw-r--r--website/resources/scripts/testcases2/15.9.5.4_Date.prototype.toTimeString.json50
-rw-r--r--website/resources/scripts/testcases2/15.9.5.5_Date.prototype.toLocaleString.json50
-rw-r--r--website/resources/scripts/testcases2/15.9.5.6_Date.prototype.toLocaleDateString.json50
-rw-r--r--website/resources/scripts/testcases2/15.9.5.7_Date.prototype.toLocaleTimeString.json50
-rw-r--r--website/resources/scripts/testcases2/15.9.5.8_Date.prototype.valueOf.json50
-rw-r--r--website/resources/scripts/testcases2/15.9.5.9_Date.prototype.getTime.json50
-rw-r--r--website/resources/scripts/testcases2/15.9.5_Properties_of_the_Date_Prototype_Object.json260
-rw-r--r--website/resources/scripts/testcases2/7.2_White_Space.json280
-rw-r--r--website/resources/scripts/testcases2/7.3.json98
-rw-r--r--website/resources/scripts/testcases2/7.3_Line_Terminators.json292
-rw-r--r--website/resources/scripts/testcases2/7.4_Comments.json96
-rw-r--r--website/resources/scripts/testcases2/7.5.1_Reserved_Words.json35
-rw-r--r--website/resources/scripts/testcases2/7.5.2_Keywords.json183
-rw-r--r--website/resources/scripts/testcases2/7.5.3_Future_Reserved_Words.json251
-rw-r--r--website/resources/scripts/testcases2/7.6.1.2.json66
-rw-r--r--website/resources/scripts/testcases2/7.6.1.json777
-rw-r--r--website/resources/scripts/testcases2/7.6.json224
-rw-r--r--website/resources/scripts/testcases2/7.6_Identifiers.json92
-rw-r--r--website/resources/scripts/testcases2/7.7_Punctuators.json84
-rw-r--r--website/resources/scripts/testcases2/7.8.1_Null_Literals.json20
-rw-r--r--website/resources/scripts/testcases2/7.8.2_Boolean_Literals.json20
-rw-r--r--website/resources/scripts/testcases2/7.8.3.json64
-rw-r--r--website/resources/scripts/testcases2/7.8.3_Numeric_Literals.json440
-rw-r--r--website/resources/scripts/testcases2/7.8.4.json120
-rw-r--r--website/resources/scripts/testcases2/7.8.4_String_Literals.json366
-rw-r--r--website/resources/scripts/testcases2/7.8.5.json14
-rw-r--r--website/resources/scripts/testcases2/7.8.5_Regular_Expression_Literals.json316
-rw-r--r--website/resources/scripts/testcases2/7.9.2_Examples_of_Automatic_Semicolon_Insertion.json53
-rw-r--r--website/resources/scripts/testcases2/7.9_Automatic_Semicolon_Insertion.json617
-rw-r--r--website/resources/scripts/testcases2/8.1_The_Undefined_Type.json50
-rw-r--r--website/resources/scripts/testcases2/8.2_The_Null_Type.json33
-rw-r--r--website/resources/scripts/testcases2/8.3_The_Boolean_Type.json40
-rw-r--r--website/resources/scripts/testcases2/8.4_The_String_Type.json162
-rw-r--r--website/resources/scripts/testcases2/8.5_The_Number_Type.json124
-rw-r--r--website/resources/scripts/testcases2/8.6.1_Property_Attributes.json30
-rw-r--r--website/resources/scripts/testcases2/8.6.2_Internal_Properties_and_Methods.json183
-rw-r--r--website/resources/scripts/testcases2/8.6_The_Object_Type.json38
-rw-r--r--website/resources/scripts/testcases2/8.7.2.json77
-rw-r--r--website/resources/scripts/testcases2/8.7_The_Reference_Type.json98
-rw-r--r--website/resources/scripts/testcases2/8.8_The_List_Type.json26
-rw-r--r--website/resources/scripts/testcases2/9.1_ToPrimitive.json32
-rw-r--r--website/resources/scripts/testcases2/9.2_ToBoolean.json104
-rw-r--r--website/resources/scripts/testcases2/9.3.1_ToNumber_from_String.json230
-rw-r--r--website/resources/scripts/testcases2/9.3_ToNumber.json80
-rw-r--r--website/resources/scripts/testcases2/9.4_ToInteger.json32
-rw-r--r--website/resources/scripts/testcases2/9.5_ToInt32.json86
-rw-r--r--website/resources/scripts/testcases2/9.6_ToUint32.json56
-rw-r--r--website/resources/scripts/testcases2/9.7_ToUint16.json56
-rw-r--r--website/resources/scripts/testcases2/9.8.1_ToString_Applied_to_the_Number_Type.json68
-rw-r--r--website/resources/scripts/testcases2/9.8_ToString.json68
-rw-r--r--website/resources/scripts/testcases2/9.9_ToObject.json44
422 files changed, 76432 insertions, 0 deletions
diff --git a/website/resources/scripts/testcases2/10.1.1.json b/website/resources/scripts/testcases2/10.1.1.json
new file mode 100644
index 000000000..8e85d789f
--- /dev/null
+++ b/website/resources/scripts/testcases2/10.1.1.json
@@ -0,0 +1,248 @@
+{
+ "testCollection": {
+ "name": "10.1.1",
+ "numTests": 32,
+ "tests": [
+ {
+ "id": "10.1.1-1-s",
+ "path": "TestCases/chapter10/10.1/10.1.1/10.1.1-1-s.js",
+ "description": "Strict Mode - Use Strict Directive Prologue is 'use strict'; which contains two space between 'use' and 'strict'",
+ "test": "assertTrue((function testcase() {\n \"use strict\";\n var public = 1;\n return public === 1;\n }).call(this));\n",
+ "strict_only": ""
+ },
+ {
+ "id": "10.1.1-10-s",
+ "path": "TestCases/chapter10/10.1/10.1.1/10.1.1-10-s.js",
+ "description": "Strict Mode - Use Strict Directive Prologue is ''USE STRICT';' in which all characters are uppercase",
+ "test": "assertTrue((function testcase() {\n \"USE STRICT\";\n var public = 1;\n return public === 1;\n }).call(this));\n",
+ "strict_only": ""
+ },
+ {
+ "id": "10.1.1-11-s",
+ "path": "TestCases/chapter10/10.1/10.1.1/10.1.1-11-s.js",
+ "description": "Strict Mode - Eval code is strict code with a Use Strict Directive at the beginning of the block",
+ "test": "assertTrue((function testcase() {\n try {\n eval(\"'use strict'; var public = 1; var anotherVariableNotReserveWord = 2;\");\n\n return false;\n } catch (e) {\n return e instanceof SyntaxError && typeof public === \"undefined\" &&\n typeof anotherVariableNotReserveWord === \"undefined\";\n }\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict())",
+ "strict_only": ""
+ },
+ {
+ "id": "10.1.1-12-s",
+ "path": "TestCases/chapter10/10.1/10.1.1/10.1.1-12-s.js",
+ "description": "Strict Mode - Eval code is strict eval code with a Use Strict Directive in the middle of the block",
+ "test": "assertTrue((function testcase() {\n eval(\"var public = 1; 'use strict'; var anotherVariableNotReserveWord = 2;\");\n return public === 1 && anotherVariableNotReserveWord === 2;\n }).call(this));\n",
+ "strict_only": ""
+ },
+ {
+ "id": "10.1.1-13-s",
+ "path": "TestCases/chapter10/10.1/10.1.1/10.1.1-13-s.js",
+ "description": "Strict Mode - Eval code is strict eval code with a Use Strict Directive at the end of the block",
+ "test": "assertTrue((function testcase() {\n eval(\"var public = 1; var anotherVariableNotReserveWord = 2; 'use strict';\");\n return public === 1 && anotherVariableNotReserveWord === 2;\n }).call(this));\n",
+ "strict_only": ""
+ },
+ {
+ "id": "10.1.1-14-s",
+ "path": "TestCases/chapter10/10.1/10.1.1/10.1.1-14-s.js",
+ "description": "Strict Mode - The call to eval function is contained in a Strict Mode block",
+ "test": "assertTrue((function testcase() {\n 'use strict';\n try {\n eval(\"var public = 1;\");\n return false;\n } catch (e) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict())",
+ "strict_only": ""
+ },
+ {
+ "id": "10.1.1-15-s",
+ "path": "TestCases/chapter10/10.1/10.1.1/10.1.1-15-s.js",
+ "description": "Strict Mode - Function code that is part of a FunctionDeclaration is strict function code if FunctionDeclaration is contained in use strict",
+ "test": "assertTrue((function testcase() {\n \"use strict\";\n function fun() {\n try {\n eval(\"var public = 1;\");\n return false;\n } catch (e) {\n return e instanceof SyntaxError;\n }\n }\n\n return fun();\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict())",
+ "strict_only": ""
+ },
+ {
+ "id": "10.1.1-16-s",
+ "path": "TestCases/chapter10/10.1/10.1.1/10.1.1-16-s.js",
+ "description": "Strict Mode - Function code that is part of a FunctionExpression is strict function code if FunctionExpression is contained in use strict",
+ "test": "assertTrue((function testcase() {\n \"use strict\";\n return function () {\n try {\n eval(\"var public = 1;\");\n return false;\n } catch (e) {\n return e instanceof SyntaxError;\n }\n } ();\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict())",
+ "strict_only": ""
+ },
+ {
+ "id": "10.1.1-17-s",
+ "path": "TestCases/chapter10/10.1/10.1.1/10.1.1-17-s.js",
+ "description": "Strict Mode - Function code that is part of a Accessor PropertyAssignment is in Strict Mode if Accessor PropertyAssignment is contained in use strict(getter)",
+ "test": "assertTrue((function testcase() {\n \"use strict\";\n try {\n var obj = {};\n Object.defineProperty(obj, \"accProperty\", {\n get: function () {\n eval(\"public = 1;\");\n return 11;\n }\n });\n\n var temp = obj.accProperty === 11;\n return false;\n } catch (e) {\n return e instanceof SyntaxError;\n }\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict() && fnExists(Object.defineProperty))",
+ "strict_only": ""
+ },
+ {
+ "id": "10.1.1-18-s",
+ "path": "TestCases/chapter10/10.1/10.1.1/10.1.1-18-s.js",
+ "description": "Strict Mode - Function code that is part of a Accessor PropertyAssignment is in Strict Mode if Accessor PropertyAssignment is contained in use strict(setter)",
+ "test": "assertTrue((function testcase() {\n \"use strict\";\n try {\n var obj = {};\n var data = \"data\";\n Object.defineProperty(obj, \"accProperty\", {\n set: function (value) {\n eval(\"var public = 1;\");\n data = value;\n }\n });\n\n obj.accProperty = \"overrideData\";\n return false;\n } catch (e) {\n return e instanceof SyntaxError && data === \"data\";\n }\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict() && fnExists(Object.defineProperty))",
+ "strict_only": ""
+ },
+ {
+ "id": "10.1.1-19-s",
+ "path": "TestCases/chapter10/10.1/10.1.1/10.1.1-19-s.js",
+ "description": "Strict Mode - Function code of a FunctionDeclaration contains Use Strict Directive which appears at the start of the block",
+ "test": "assertTrue((function testcase() {\n function fun() {\n \"use strict\";\n try {\n eval(\"var public = 1;\");\n return false;\n } catch (e) {\n return e instanceof SyntaxError;\n }\n }\n return fun();\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict())",
+ "strict_only": ""
+ },
+ {
+ "id": "10.1.1-2-s",
+ "path": "TestCases/chapter10/10.1/10.1.1/10.1.1-2-s.js",
+ "description": "Strict Mode - Use Strict Directive Prologue is ''use strict'' which lost the last character ';'",
+ "test": "assertTrue((function testcase() {\n \"use strict\"\n try {\n eval(\"var public = 1;\");\n return false;\n } catch (e) {\n return e instanceof SyntaxError;\n }\n\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict())",
+ "strict_only": ""
+ },
+ {
+ "id": "10.1.1-20-s",
+ "path": "TestCases/chapter10/10.1/10.1.1/10.1.1-20-s.js",
+ "description": "Strict Mode - Function code of a FunctionDeclaration contains Use Strict Directive which appears in the middle of the block",
+ "test": "assertTrue((function testcase() {\n function fun() {\n eval(\"var public = 1;\");\n \"use strict\";\n return public === 1;\n }\n return fun();\n }).call(this));\n",
+ "strict_only": ""
+ },
+ {
+ "id": "10.1.1-21-s",
+ "path": "TestCases/chapter10/10.1/10.1.1/10.1.1-21-s.js",
+ "description": "Strict Mode - Function code of a FunctionDeclaration contains Use Strict Directive which appears at the end of the block",
+ "test": "assertTrue((function testcase() {\n function fun() {\n eval(\"var public = 1;\");\n return public === 1;\n \"use strict\";\n }\n return fun();\n }).call(this));\n",
+ "strict_only": ""
+ },
+ {
+ "id": "10.1.1-22-s",
+ "path": "TestCases/chapter10/10.1/10.1.1/10.1.1-22-s.js",
+ "description": "Strict Mode - Function code of a FunctionExpression contains Use Strict Directive which appears at the start of the block",
+ "test": "assertTrue((function () {\n \"use strict\";\n try {\n eval(\"var public = 1;\");\n return false;\n } catch (e) {\n return e instanceof SyntaxError;\n }\n } ()));\n",
+ "precondition": "(fnSupportsStrict())",
+ "strict_only": ""
+ },
+ {
+ "id": "10.1.1-23-s",
+ "path": "TestCases/chapter10/10.1/10.1.1/10.1.1-23-s.js",
+ "description": "Strict Mode - Function code of a FunctionExpression contains Use Strict Directive which appears in the middle of the block",
+ "test": "assertTrue((function () {\n eval(\"var public = 1;\");\n return public === 1;\n \"use strict\";\n } ()));\n",
+ "strict_only": ""
+ },
+ {
+ "id": "10.1.1-24-s",
+ "path": "TestCases/chapter10/10.1/10.1.1/10.1.1-24-s.js",
+ "description": "Strict Mode - Function code of a FunctionExpression contains Use Strict Directive which appears at the end of the block",
+ "test": "assertTrue((function () {\n eval(\"var public = 1;\");\n \"use strict\";\n return public === 1;\n } ()));\n",
+ "strict_only": ""
+ },
+ {
+ "id": "10.1.1-25-s",
+ "path": "TestCases/chapter10/10.1/10.1.1/10.1.1-25-s.js",
+ "description": "Strict Mode - Function code of Accessor PropertyAssignment contains Use Strict Directive which appears at the start of the block(getter)",
+ "test": "assertTrue((function testcase() {\n try {\n var obj = {};\n Object.defineProperty(obj, \"accProperty\", {\n get: function () {\n \"use strict\";\n eval(\"var public = 1;\");\n return 11;\n }\n });\n var temp = obj.accProperty === 11;\n return false;\n } catch (e) {\n return e instanceof SyntaxError;\n }\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict() && fnExists(Object.defineProperty))",
+ "strict_only": ""
+ },
+ {
+ "id": "10.1.1-26-s",
+ "path": "TestCases/chapter10/10.1/10.1.1/10.1.1-26-s.js",
+ "description": "Strict Mode - Function code of Accessor PropertyAssignment contains Use Strict Directive which appears at the start of the block(setter)",
+ "test": "assertTrue((function testcase() {\n try {\n var obj = {};\n var data = \"data\";\n Object.defineProperty(obj, \"accProperty\", {\n set: function (value) {\n \"use strict\";\n eval(\"var public = 1;\");\n data = value;\n }\n });\n\n obj.accProperty = \"overrideData\";\n\n return false;\n } catch (e) {\n return e instanceof SyntaxError && data === \"data\";\n }\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict() && fnExists(Object.defineProperty))",
+ "strict_only": ""
+ },
+ {
+ "id": "10.1.1-27-s",
+ "path": "TestCases/chapter10/10.1/10.1.1/10.1.1-27-s.js",
+ "description": "Strict Mode - Function code of Accessor PropertyAssignment contains Use Strict Directive which appears in the middle of the block(getter)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n Object.defineProperty(obj, \"accProperty\", {\n get: function () {\n eval(\"public = 1;\");\n \"use strict\";\n return 11;\n }\n });\n return obj.accProperty === 11 && public === 1;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))",
+ "strict_only": ""
+ },
+ {
+ "id": "10.1.1-28-s",
+ "path": "TestCases/chapter10/10.1/10.1.1/10.1.1-28-s.js",
+ "description": "Strict Mode - Function code of Accessor PropertyAssignment contains Use Strict Directive which appears at the end of the block(setter)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n var data;\n \n Object.defineProperty(obj, \"accProperty\", {\n set: function (value) {\n var _10_1_1_28_s = {a:1, a:2};\n data = value;\n \"use strict\";\n }\n });\n obj.accProperty = \"overrideData\";\n return data===\"overrideData\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))",
+ "strict_only": ""
+ },
+ {
+ "id": "10.1.1-29-s",
+ "path": "TestCases/chapter10/10.1/10.1.1/10.1.1-29-s.js",
+ "description": "Strict Mode - The built-in Function constructor is contained in use strict code",
+ "test": "assertTrue((function testcase() {\n \"use strict\";\n var funObj = new Function(\"a\", \"eval('public = 1;');\");\n funObj();\n return true;\n }).call(this));\n",
+ "strict_only": ""
+ },
+ {
+ "id": "10.1.1-3-s",
+ "path": "TestCases/chapter10/10.1/10.1.1/10.1.1-3-s.js",
+ "description": "Strict Mode - Use Strict Directive Prologue is '' use strict';' which the first character is space",
+ "test": "assertTrue((function testcase() {\n \" use strict\";\n var public = 1;\n\n return public === 1;\n }).call(this));\n",
+ "strict_only": ""
+ },
+ {
+ "id": "10.1.1-30-s",
+ "path": "TestCases/chapter10/10.1/10.1.1/10.1.1-30-s.js",
+ "description": "Strict Mode - Function code of built-in Function constructor contains Use Strict Directive which appears at the start of the block",
+ "test": "assertTrue((function testcase() {\n try {\n var funObj = new Function(\"a\", \"'use strict'; eval('public = 1;');\");\n funObj();\n return false;\n } catch (e) {\n return e instanceof SyntaxError;\n }\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict())",
+ "strict_only": ""
+ },
+ {
+ "id": "10.1.1-31-s",
+ "path": "TestCases/chapter10/10.1/10.1.1/10.1.1-31-s.js",
+ "description": "Strict Mode - Function code of built-in Function constructor contains Use Strict Directive which appears in the middle of the block",
+ "test": "assertTrue((function testcase() {\n var funObj = new Function(\"a\", \"eval('public = 1;'); 'use strict'; anotherVariable = 2;\");\n funObj();\n return public === 1 && anotherVariable === 2;\n }).call(this));\n",
+ "strict_only": ""
+ },
+ {
+ "id": "10.1.1-32-s",
+ "path": "TestCases/chapter10/10.1/10.1.1/10.1.1-32-s.js",
+ "description": "Strict Mode - Function code of built-in Function constructor contains Use Strict Directive which appears at the end of the block",
+ "test": "assertTrue((function testcase() {\n var funObj = new Function(\"a\", \"eval('public = 1;'); anotherVariable = 2; 'use strict';\");\n funObj();\n return public === 1 && anotherVariable === 2;\n }).call(this));\n",
+ "strict_only": ""
+ },
+ {
+ "id": "10.1.1-4-s",
+ "path": "TestCases/chapter10/10.1/10.1.1/10.1.1-4-s.js",
+ "description": "Strict Mode - Use Strict Directive Prologue is ''use strict ';' which the last character is space",
+ "test": "assertTrue((function testcase() {\n \"use strict \";\n var public = 1;\n return public === 1;\n }).call(this));\n",
+ "strict_only": ""
+ },
+ {
+ "id": "10.1.1-5-s",
+ "path": "TestCases/chapter10/10.1/10.1.1/10.1.1-5-s.js",
+ "description": "Strict Mode - Use Strict Directive Prologue is ''use strict';' which appears at the beginning of the block",
+ "test": "assertTrue((function testcase() {\n \"use strict\";\n try {\n eval(\"var public = 1;\");\n return false;\n } catch (e) {\n return e instanceof SyntaxError;\n }\n\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict())",
+ "strict_only": ""
+ },
+ {
+ "id": "10.1.1-6-s",
+ "path": "TestCases/chapter10/10.1/10.1.1/10.1.1-6-s.js",
+ "description": "Strict Mode - Use Strict Directive Prologue is ''use strict';' which appears in the middle of the block",
+ "test": "assertTrue((function testcase() {\n var interface = 2;\n \"use strict\";\n var public = 1;\n return public === 1 && interface === 2;\n }).call(this));\n",
+ "strict_only": ""
+ },
+ {
+ "id": "10.1.1-7-s",
+ "path": "TestCases/chapter10/10.1/10.1.1/10.1.1-7-s.js",
+ "description": "Strict Mode - Use Strict Directive Prologue is ''use strict';' which appears at the end of the block",
+ "test": "assertTrue((function testcase() {\n var public = 1;\n return public === 1;\n \"use strict\";\n }).call(this));\n",
+ "strict_only": ""
+ },
+ {
+ "id": "10.1.1-8-s",
+ "path": "TestCases/chapter10/10.1/10.1.1/10.1.1-8-s.js",
+ "description": "Strict Mode - Use Strict Directive Prologue is ''use strict';' which appears twice in the directive prologue",
+ "test": "assertTrue((function testcase() {\n \"use strict\";\n \"use strict\";\n try {\n eval(\"var public = 1;\");\n return false;\n } catch (e) {\n return e instanceof SyntaxError;\n }\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict())",
+ "strict_only": ""
+ },
+ {
+ "id": "10.1.1-9-s",
+ "path": "TestCases/chapter10/10.1/10.1.1/10.1.1-9-s.js",
+ "description": "Strict Mode - Use Strict Directive Prologue is ''Use strict';' in which the first character is uppercase",
+ "test": "assertTrue((function testcase() {\n \"Use strict\";\n var public = 1;\n return public === 1;\n }).call(this));\n",
+ "strict_only": ""
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/10.1.3_Variable_Instantiation.json b/website/resources/scripts/testcases2/10.1.3_Variable_Instantiation.json
new file mode 100644
index 000000000..4f3ff2561
--- /dev/null
+++ b/website/resources/scripts/testcases2/10.1.3_Variable_Instantiation.json
@@ -0,0 +1,56 @@
+{
+ "testCollection": {
+ "name": "10.1.3_Variable_Instantiation",
+ "numTests": 8,
+ "tests": [
+ {
+ "section": "10.1.3",
+ "description": "Calling function excluding a few parameters",
+ "test": "//CHECK#1\nfunction f1(a, b){\n return (b === undefined);\n}\nif(!(f1(1, 2) === false)){\n $ERROR('#1: f1(1, 2) === false');\n} else if(!(f1(1) === true)){\n $ERROR('#1: f1(1) === true');\n}\n\n//CHECK#2\nfunction f2(a, b, c){\n return (b === undefined) && (c === undefined);\n}\nif(!(f2(1) === true)){\n $ERROR('#2: f2(1, 2) === true');\n}\n",
+ "id": "S10.1.3_A1"
+ },
+ {
+ "section": "10.1.3",
+ "description": "Creating functions initialized with two or more formal parameters, which have the same name",
+ "test": "//CHECK#1\nfunction f1(x, x) {\n return x;\n}\nif(!(f1(1, 2) === 2)) {\n $ERROR(\"#1: f1(1, 2) === 2\");\n}\n\n//CHECK#2\nfunction f2(x, x, x){\n return x*x*x;\n}\nif(!(f2(1, 2, 3) === 27)){\n $ERROR(\"f2(1, 2, 3) === 27\");\n}\n\n//CHECK#3\nfunction f3(x, x) {\n return 'a' + x;\n}\nif(!(f3(1, 2) === 'a2')){\n $ERROR(\"#3: f3(1, 2) === 'a2'\");\n}\n",
+ "id": "S10.1.3_A2"
+ },
+ {
+ "section": "10.1.3",
+ "description": "Creating functions with two or more formal parameters,\nthat have the same name. Calling this function excluding a few last parameters",
+ "test": "//CHECK#1\nfunction f1(x, a, b, x){\n return x;\n}\nif(!(f1(1, 2) === undefined)){\n $ERROR('#1: f1(1, 2) === undefined');\n}\n",
+ "id": "S10.1.3_A3"
+ },
+ {
+ "section": "10.1.3",
+ "description": "Checking existence of a function with passed parameter",
+ "test": "//CHECK#1\nfunction f1(x){\n return x;\n \n function x(){\n return 7;\n }\n}\nif(!(f1().constructor.prototype === Function.prototype)){\n $ERROR('#1: f1() returns function');\n}\n\n//CHECK#2\nfunction f2(x){\n return typeof x;\n \n function x(){\n return 7;\n }\n}\nif(!(f2() === \"function\")){\n $ERROR('#2: f2() === \"function\"');\n}\n\n//CHECK#3\nfunction f3() {\n return typeof arguments;\n function arguments() {\n return 7;\n }\n}\nif (!(f3() === \"function\")){\n $ERROR('#3: f3() === \"function\"');\n}\n",
+ "id": "S10.1.3_A4_T1"
+ },
+ {
+ "section": "10.1.3",
+ "description": "Checking existence of a function with declared variable",
+ "test": "//CHECK#1\nfunction f1(){\n var x;\n \n return x;\n \n function x(){\n return 7;\n }\n}\nif(!(f1().constructor.prototype === Function.prototype)){\n $PRINT('#1: f1() returns function');\n}\n\n//CHECK#2\nfunction f2(){\n var x;\n \n return typeof x;\n \n function x(){\n return 7;\n }\n}\nif(!(f2() === \"function\")){\n $PRINT('#2: f2() === \"function\"');\n}\n",
+ "id": "S10.1.3_A4_T2"
+ },
+ {
+ "section": "10.1.3",
+ "description": "Checking variable existence only",
+ "test": "//CHECK#1\nfunction f1(){\n var x;\n \n return typeof x;\n}\n\nif(!(f1() === \"undefined\")){\n $PRINT('#1: f1() === \"undefined\"');\n}\n\n//CHECK#2\nfunction f2(){\n var x;\n \n return x;\n}\n\nif(!(f2() === undefined)){\n $PRINT('#1: f2() === undefined');\n}\n",
+ "id": "S10.1.3_A5.1_T1"
+ },
+ {
+ "section": "10.1.3",
+ "description": "Checking existence of the variable object property with formal parameter",
+ "test": "//CHECK#1\nfunction f1(x){\n var x;\n \n return typeof x;\n}\n\nif(!(f1() === \"undefined\")){\n $PRINT('#1: f1(1) === \"undefined\"');\n}\n\n//CHECK#2\nfunction f2(x){\n var x;\n \n return x;\n}\n\nif(!(f2() === undefined)){\n $PRINT('#1: f2(1) === undefined');\n}\n",
+ "id": "S10.1.3_A5.1_T2"
+ },
+ {
+ "section": "10.1.3",
+ "description": "Checking existence of the variable object property with formal parameter",
+ "test": "//CHECK#1\nfunction f1(x){\n var x;\n \n return typeof x;\n}\n\nif(!(f1(1) === \"number\")){\n $PRINT('#1: f1(1) === \"number\"');\n}\n\n//CHECK#2\nfunction f2(x){\n var x;\n \n return x;\n}\n\nif(!(f2(1) === 1)){\n $PRINT('#1: f2(1) === 1');\n}\n",
+ "id": "S10.1.3_A5.2_T1"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/10.1.4_Scope_Chain_and_Identifier_Resolution.json b/website/resources/scripts/testcases2/10.1.4_Scope_Chain_and_Identifier_Resolution.json
new file mode 100644
index 000000000..8d6e8671a
--- /dev/null
+++ b/website/resources/scripts/testcases2/10.1.4_Scope_Chain_and_Identifier_Resolution.json
@@ -0,0 +1,62 @@
+{
+ "testCollection": {
+ "name": "10.1.4_Scope_Chain_and_Identifier_Resolution",
+ "numTests": 9,
+ "tests": [
+ {
+ "section": "10.1.4",
+ "description": "Checking scope chain containing function declarations",
+ "test": "var x = 0;\n\nfunction f1(){\n var x = 1;\n function f2(){\n return x;\n };\n return f2();\n}\n\nif(!(f1() === 1)){\n $ERROR(\"#1: Scope chain disturbed\");\n}\n",
+ "id": "S10.1.4_A1_T1"
+ },
+ {
+ "section": "10.1.4",
+ "description": "Checking scope chain containing function declarations",
+ "test": "var x = 0;\n\nfunction f1(){\n function f2(){\n return x;\n };\n return f2();\n}\n\nif(!(f1() === 0)){\n $ERROR(\"#1: Scope chain disturbed\");\n}\n",
+ "id": "S10.1.4_A1_T2"
+ },
+ {
+ "section": "10.1.4",
+ "description": "Checking scope chain containing function declarations",
+ "test": "var x = 0;\n\nfunction f1(){\n function f2(){\n return x;\n };\n return f2();\n \n var x = 1;\n}\n\nif(!(f1() === undefined)){\n $ERROR(\"#1: Scope chain disturbed\");\n}\n\n",
+ "id": "S10.1.4_A1_T3"
+ },
+ {
+ "section": "10.1.4",
+ "description": "Checking scope chain containing function declarations",
+ "test": "var x = 0;\n\nfunction f1(){\n function f2(){\n return x;\n };\n\n var x = 1;\n return f2();\n}\n\nif(!(f1() === 1)){\n $ERROR(\"#1: Scope chain disturbed\");\n}\n",
+ "id": "S10.1.4_A1_T4"
+ },
+ {
+ "section": "10.1.4",
+ "description": "Checking scope chain containing function declarations and \"with\"",
+ "test": "var x = 0;\n\nvar myObj = {x : \"obj\"};\n\nfunction f1(){\n var x = 1;\n function f2(){\n with(myObj){\n return x;\n }\n };\n return f2();\n}\n\nif(!(f1() === \"obj\")){\n $ERROR(\"#1: Scope chain disturbed\");\n}\n",
+ "id": "S10.1.4_A1_T5"
+ },
+ {
+ "section": "10.1.4",
+ "description": "Checking scope chain containing function declarations and \"with\"",
+ "test": "var x = 0;\n\nvar myObj = {x : \"obj\"};\n\nfunction f1(){\n function f2(){\n with(myObj){\n return x;\n }\n };\n return f2();\n}\n\nif(!(f1() === \"obj\")){\n $ERROR(\"#1: Scope chain disturbed\");\n}\n",
+ "id": "S10.1.4_A1_T6"
+ },
+ {
+ "section": "10.1.4",
+ "description": "Checking scope chain containing function declarations and \"with\"",
+ "test": "var x = 0;\n\nvar myObj = {x : \"obj\"};\n\nfunction f1(){\n function f2(){\n with(myObj){\n return x;\n }\n };\n return f2();\n \n var x = 1;\n}\n\nif(!(f1() === \"obj\")){\n $ERROR(\"#1: Scope chain disturbed\");\n}\n",
+ "id": "S10.1.4_A1_T7"
+ },
+ {
+ "section": "10.1.4",
+ "description": "Checking scope chain containing function declarations and \"with\"",
+ "test": "var x = 0;\n\nvar myObj = {x : \"obj\"};\n\nfunction f1(){\n function f2(){\n with(myObj){\n return x;\n }\n };\n\n var x = 1;\n return f2();\n}\n\nif(!(f1() === \"obj\")){\n $ERROR(\"#1: Scope chain disturbed\");\n}\n",
+ "id": "S10.1.4_A1_T8"
+ },
+ {
+ "section": "10.1.4",
+ "description": "Checking scope chain containing function declarations and \"with\"",
+ "test": "var x = 0;\n\nvar myObj = {x : \"obj\"};\n\nfunction f1(){\n with(myObj){\n return x;\n }\n}\n\nif(!(f1() === \"obj\")){\n $ERROR(\"#1: Scope chain disturbed\");\n}\n",
+ "id": "S10.1.4_A1_T9"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/10.1.5_Global_Object.json b/website/resources/scripts/testcases2/10.1.5_Global_Object.json
new file mode 100644
index 000000000..b99d244a7
--- /dev/null
+++ b/website/resources/scripts/testcases2/10.1.5_Global_Object.json
@@ -0,0 +1,152 @@
+{
+ "testCollection": {
+ "name": "10.1.5_Global_Object",
+ "numTests": 24,
+ "tests": [
+ {
+ "section": "10.1.5, 15.1",
+ "description": "Global execution context - Value Properties",
+ "test": "//CHECK#1\nif ( NaN === null ) {\n $ERROR(\"#1: NaN === null\");\n}\n\n//CHECK#2\nif ( Infinity === null ) {\n $ERROR(\"#2: Infinity === null\");\n}\n\n//CHECK#3\nif ( undefined === null ) {\n $ERROR(\"#3: undefined === null\");\n}\n",
+ "id": "S10.1.5_A1.1_T1"
+ },
+ {
+ "section": "10.1.5, 15.1",
+ "description": "Global execution context - Function Properties",
+ "test": "//CHECK#4\nif ( eval === null ) {\n $ERROR(\"#4: eval === null\");\n}\n\n//CHECK#5\nif ( parseInt === null ) {\n $ERROR(\"#5: parseInt === null\");\n}\n\n//CHECK#6\nif ( parseFloat === null ) {\n $ERROR(\"#6: parseFloat === null\");\n}\n\n//CHECK#7\nif ( isNaN === null ) {\n $ERROR(\"#7: isNaN === null\");\n}\n\n//CHECK#8\nif ( isFinite === null ) {\n $ERROR(\"#8: isFinite === null\");\n}\n\n//CHECK#9\nif ( decodeURI === null ) {\n $ERROR(\"#9: decodeURI === null\");\n}\n\n//CHECK#10\nif ( decodeURIComponent === null ) {\n $ERROR(\"#10: decodeURIComponent === null\");\n}\n\n//CHECK#11\nif ( encodeURI === null ) {\n $ERROR(\"#11: encodeURI === null\");\n}\n\n//CHECK#12\nif ( encodeURIComponent === null ) {\n $ERROR(\"#12: encodeURIComponent === null\");\n}\n",
+ "id": "S10.1.5_A1.1_T2"
+ },
+ {
+ "section": "10.1.5, 15.1",
+ "description": "Global execution context - Constructor Properties",
+ "test": "//CHECK#13\nif ( Object === null ) {\n $ERROR(\"#13: Object === null\");\n}\n\n//CHECK#14\nif ( Function === null ) {\n $ERROR(\"#14: Function === null\");\n}\n\n//CHECK#15\nif ( String === null ) {\n $ERROR(\"#15: String === null\");\n}\n\n//CHECK#16\nif ( Number === null ) {\n $ERROR(\"#16: Number === null\");\n}\n\n//CHECK#17\nif ( Array === null ) {\n $ERROR(\"#17: Array === null\");\n}\n\n//CHECK#18\nif ( Boolean === null ) {\n $ERROR(\"#20: Boolean === null\");\n}\n\n//CHECK#18\nif ( Date === null ) {\n $ERROR(\"#18: Date === null\");\n}\n\n//CHECK#19\nif ( RegExp === null ) {\n $ERROR(\"#19: RegExp === null\");\n}\n\n//CHECK#20\nif ( Error === null ) {\n $ERROR(\"#20: Error === null\");\n}\n\n//CHECK#21\nif ( EvalError === null ) {\n $ERROR(\"#21: EvalError === null\");\n}\n\n//CHECK#22\nif ( RangeError === null ) {\n $ERROR(\"#22: RangeError === null\");\n}\n\n//CHECK#23\nif ( ReferenceError === null ) {\n $ERROR(\"#23: ReferenceError === null\");\n}\n\n//CHECK#24\nif ( SyntaxError === null ) {\n $ERROR(\"#24: SyntaxError === null\");\n}\n\n//CHECK#25\nif ( TypeError === null ) {\n $ERROR(\"#25: TypeError === null\");\n}\n\n//CHECK#26\nif ( URIError === null ) {\n $ERROR(\"#26: URIError === null\");\n}\n\n",
+ "id": "S10.1.5_A1.1_T3"
+ },
+ {
+ "section": "10.1.5, 15.1",
+ "description": "Global execution context - Other Properties",
+ "test": "//CHECK#27\nif ( Math === null ) {\n $ERROR(\"#27: Math === null\");\n}\n",
+ "id": "S10.1.5_A1.1_T4"
+ },
+ {
+ "section": "10.1.5, 15.1",
+ "description": "Function execution context - Value Properties",
+ "test": "function test() {\n //CHECK#1\n if ( NaN === null ) {\n $ERROR(\"#1: NaN === null\");\n }\n\n //CHECK#2\n if ( Infinity === null ) {\n $ERROR(\"#2: Infinity === null\");\n }\n\n //CHECK#3\n if ( undefined === null ) {\n $ERROR(\"#3: undefined === null\");\n }\n}\n\ntest();\n",
+ "id": "S10.1.5_A1.2_T1"
+ },
+ {
+ "section": "10.1.5, 15.1",
+ "description": "Function execution context - Function Properties",
+ "test": "function test() {\n //CHECK#4\n if ( eval === null ) {\n $ERROR(\"#4: eval === null\");\n }\n\n //CHECK#5\n if ( parseInt === null ) {\n $ERROR(\"#5: parseInt === null\");\n }\n\n //CHECK#6\n if ( parseFloat === null ) {\n $ERROR(\"#6: parseFloat === null\");\n }\n\n //CHECK#7\n if ( isNaN === null ) {\n $ERROR(\"#7: isNaN === null\");\n }\n\n //CHECK#8\n if ( isFinite === null ) {\n $ERROR(\"#8: isFinite === null\");\n }\n\n //CHECK#9\n if ( decodeURI === null ) {\n $ERROR(\"#9: decodeURI === null\");\n }\n\n //CHECK#10\n if ( decodeURIComponent === null ) {\n $ERROR(\"#10: decodeURIComponent === null\");\n }\n\n //CHECK#11\n if ( encodeURI === null ) {\n $ERROR(\"#11: encodeURI === null\");\n }\n\n //CHECK#12\n if ( encodeURIComponent === null ) {\n $ERROR(\"#12: encodeURIComponent === null\");\n }\n}\n\ntest();\n",
+ "id": "S10.1.5_A1.2_T2"
+ },
+ {
+ "section": "10.1.5, 15.1",
+ "description": "Function execution context - Constructor Properties",
+ "test": "function test() {\n //CHECK#13\n if ( Object === null ) {\n $ERROR(\"#13: Object === null\");\n }\n\n //CHECK#14\n if ( Function === null ) {\n $ERROR(\"#14: Function === null\");\n }\n\n //CHECK#15\n if ( String === null ) {\n $ERROR(\"#15: String === null\");\n }\n\n //CHECK#16\n if ( Number === null ) {\n $ERROR(\"#16: Function === null\");\n }\n\n //CHECK#17\n if ( Array === null ) {\n $ERROR(\"#17: Array === null\");\n }\n\n //CHECK#18\n if ( Boolean === null ) {\n $ERROR(\"#20: Boolean === null\");\n }\n\n //CHECK#18\n if ( Date === null ) {\n $ERROR(\"#18: Date === null\");\n }\n\n //CHECK#19\n if ( RegExp === null ) {\n $ERROR(\"#19: RegExp === null\");\n }\n\n //CHECK#20\n if ( Error === null ) {\n $ERROR(\"#20: Error === null\");\n }\n\n //CHECK#21\n if ( EvalError === null ) {\n $ERROR(\"#21: EvalError === null\");\n }\n\n //CHECK#22\n if ( RangeError === null ) {\n $ERROR(\"#22: RangeError === null\");\n }\n\n //CHECK#23\n if ( ReferenceError === null ) {\n $ERROR(\"#23: ReferenceError === null\");\n }\n\n //CHECK#24\n if ( SyntaxError === null ) {\n $ERROR(\"#24: SyntaxError === null\");\n }\n\n //CHECK#25\n if ( TypeError === null ) {\n $ERROR(\"#25: TypeError === null\");\n }\n\n //CHECK#26\n if ( URIError === null ) {\n $ERROR(\"#26: URIError === null\");\n }\n}\n\ntest();\n",
+ "id": "S10.1.5_A1.2_T3"
+ },
+ {
+ "section": "10.1.5, 15.1",
+ "description": "Function execution context - Other Properties",
+ "test": "function test() {\n //CHECK#27\n if ( Math === null ) {\n $ERROR(\"#27: Math === null\");\n }\n}\n\ntest();\n",
+ "id": "S10.1.5_A1.2_T4"
+ },
+ {
+ "section": "10.1.5, 15.1",
+ "description": "Eval execution context - Value Properties",
+ "test": "var evalStr = \n'//CHECK#1\\n'+\n'if ( NaN === null ) {\\n'+\n' $ERROR(\"#1: NaN === null\");\\n'+\n'}\\n'+\n\n'//CHECK#2\\n'+\n'if ( Infinity === null ) {\\n'+\n' $ERROR(\"#2: Infinity === null\");\\n'+\n'}\\n'+\n\n'//CHECK#3\\n'+\n'if ( undefined === null ) {\\n'+\n' $ERROR(\"#3: undefined === null\");\\n'+\n'}\\n'+\n';\\n';\n\neval(evalStr);\n",
+ "id": "S10.1.5_A1.3_T1"
+ },
+ {
+ "section": "10.1.5, 15.1",
+ "description": "Eval execution context - Function Properties",
+ "test": "var evalStr = \n'//CHECK#4\\n'+\n'if ( eval === null ) {\\n'+\n' $ERROR(\"#4: eval === null\");\\n'+\n'}\\n'+\n\n'//CHECK#5\\n'+\n'if ( parseInt === null ) {\\n'+\n' $ERROR(\"#5: parseInt === null\");\\n'+\n'}\\n'+\n\n'//CHECK#6\\n'+\n'if ( parseFloat === null ) {\\n'+\n' $ERROR(\"#6: parseFloat === null\");\\n'+\n'}\\n'+\n\n'//CHECK#7\\n'+\n'if ( isNaN === null ) {\\n'+\n' $ERROR(\"#7: isNaN === null\");\\n'+\n'}\\n'+\n\n'//CHECK#8\\n'+\n'if ( isFinite === null ) {\\n'+\n' $ERROR(\"#8: isFinite === null\");\\n'+\n'}\\n'+\n\n'//CHECK#9\\n'+\n'if ( decodeURI === null ) {\\n'+\n' $ERROR(\"#9: decodeURI === null\");\\n'+\n'}\\n'+\n\n'//CHECK#10\\n'+\n'if ( decodeURIComponent === null ) {\\n'+\n' $ERROR(\"#10: decodeURIComponent === null\");\\n'+\n'}\\n'+\n\n'//CHECK#11\\n'+\n'if ( encodeURI === null ) {\\n'+\n' $ERROR(\"#11: encodeURI === null\");\\n'+\n'}\\n'+\n\n'//CHECK#12\\n'+\n'if ( encodeURIComponent === null ) {\\n'+\n' $ERROR(\"#12: encodeURIComponent === null\");\\n'+\n'}\\n'+\n';\\n';\n\neval(evalStr);\n",
+ "id": "S10.1.5_A1.3_T2"
+ },
+ {
+ "section": "10.1.5, 15.1",
+ "description": "Eval execution context - Constructor Properties",
+ "test": "var evalStr = \n'//CHECK#13\\n'+\n'if ( Object === null ) {\\n'+\n' $ERROR(\"#13: Object === null\");\\n'+\n'}\\n'+\n\n'//CHECK#14\\n'+\n'if ( Function === null ) {\\n'+\n' $ERROR(\"#14: Function === null\");\\n'+\n'}\\n'+\n\n'//CHECK#15\\n'+\n'if ( String === null ) {\\n'+\n' $ERROR(\"#15: String === null\");\\n'+\n'}\\n'+\n\n'//CHECK#16\\n'+\n'if ( Number === null ) {\\n'+\n' $ERROR(\"#16: Function === null\");\\n'+\n'}\\n'+\n\n'//CHECK#17\\n'+\n'if ( Array === null ) {\\n'+\n' $ERROR(\"#17: Array === null\");\\n'+\n'}\\n'+\n\n'//CHECK#18\\n'+\n'if ( Boolean === null ) {\\n'+\n' $ERROR(\"#20: Boolean === null\");\\n'+\n'}\\n'+\n\n'//CHECK#18\\n'+\n'if ( Date === null ) {\\n'+\n' $ERROR(\"#18: Date === null\");\\n'+\n'}\\n'+\n\n'//CHECK#19\\n'+\n'if ( RegExp === null ) {\\n'+\n' $ERROR(\"#19: RegExp === null\");\\n'+\n'}\\n'+\n\n'//CHECK#20\\n'+\n'if ( Error === null ) {\\n'+\n' $ERROR(\"#20: Error === null\");\\n'+\n'}\\n'+\n\n'//CHECK#21\\n'+\n'if ( EvalError === null ) {\\n'+\n' $ERROR(\"#21: EvalError === null\");\\n'+\n'}\\n'+\n\n'//CHECK#22\\n'+\n'if ( RangeError === null ) {\\n'+\n' $ERROR(\"#22: RangeError === null\");\\n'+\n'}\\n'+\n\n'//CHECK#23\\n'+\n'if ( ReferenceError === null ) {\\n'+\n' $ERROR(\"#23: ReferenceError === null\");\\n'+\n'}\\n'+\n\n'//CHECK#24\\n'+\n'if ( SyntaxError === null ) {\\n'+\n' $ERROR(\"#24: SyntaxError === null\");\\n'+\n'}\\n'+\n\n'//CHECK#25\\n'+\n'if ( TypeError === null ) {\\n'+\n' $ERROR(\"#25: TypeError === null\");\\n'+\n'}\\n'+\n\n'//CHECK#26\\n'+\n'if ( URIError === null ) {\\n'+\n' $ERROR(\"#26: URIError === null\");\\n'+\n'}\\n'+\n';\\n';\n\neval(evalStr);\n",
+ "id": "S10.1.5_A1.3_T3"
+ },
+ {
+ "section": "10.1.5, 15.1",
+ "description": "Eval execution context - Other Properties",
+ "test": "var evalStr = \n'//CHECK#27\\n'+\n'if ( Math === null ) {\\n'+\n' $ERROR(\"#27: Math === null\");\\n'+\n'}\\n'+\n';\\n';\n\neval(evalStr);\n",
+ "id": "S10.1.5_A1.3_T4"
+ },
+ {
+ "section": "10.1.5, 15.1",
+ "description": "Global execution context - Value Properties",
+ "test": "//CHECK#1\nfor (var x in this) {\n if ( x === 'NaN' ) {\n $ERROR(\"#1: 'NaN' have attribute DontEnum\");\n } else if ( x === 'Infinity' ) {\n $ERROR(\"#1: 'Infinity' have attribute DontEnum\");\n } else if ( x === 'undefined' ) {\n $ERROR(\"#1: 'undefined' have attribute DontEnum\");\n } \n}\n",
+ "id": "S10.1.5_A2.1_T1"
+ },
+ {
+ "section": "10.1.5, 15.1",
+ "description": "Global execution context - Function Properties",
+ "test": "//CHECK#1\nfor (var x in this) {\n if ( x === 'eval' ) {\n $ERROR(\"#1: 'eval' have attribute DontEnum\");\n } else if ( x === 'parseInt' ) {\n $ERROR(\"#1: 'parseInt' have attribute DontEnum\");\n } else if ( x === 'parseFloat' ) {\n $ERROR(\"#1: 'parseFloat' have attribute DontEnum\");\n } else if ( x === 'isNaN' ) {\n $ERROR(\"#1: 'isNaN' have attribute DontEnum\");\n } else if ( x === 'isFinite' ) {\n $ERROR(\"#1: 'isFinite' have attribute DontEnum\");\n } else if ( x === 'decodeURI' ) {\n $ERROR(\"#1: 'decodeURI' have attribute DontEnum\");\n } else if ( x === 'decodeURIComponent' ) {\n $ERROR(\"#1: 'decodeURIComponent' have attribute DontEnum\");\n } else if ( x === 'encodeURI' ) {\n $ERROR(\"#1: 'encodeURI' have attribute DontEnum\");\n } else if ( x === 'encodeURIComponent' ) {\n $ERROR(\"#1: 'encodeURIComponent' have attribute DontEnum\");\n } \n}\n",
+ "id": "S10.1.5_A2.1_T2"
+ },
+ {
+ "section": "10.1.5, 15.1",
+ "description": "Global execution context - Constructor Properties",
+ "test": "//CHECK#1\nfor (var x in this) {\n if ( x === 'Object' ) {\n $ERROR(\"#1: 'property 'Object' have attribute DontEnum\");\n } else if ( x === 'Function') {\n $ERROR(\"#1: 'Function' have attribute DontEnum\");\n } else if ( x === 'String' ) {\n $ERROR(\"#1: 'String' have attribute DontEnum\");\n } else if ( x === 'Number' ) {\n $ERROR(\"#1: 'Number' have attribute DontEnum\");\n } else if ( x === 'Array' ) {\n $ERROR(\"#1: 'Array' have attribute DontEnum\");\n } else if ( x === 'Boolean' ) {\n $ERROR(\"#1: 'Boolean' have attribute DontEnum\");\n } else if ( x === 'Date' ) {\n $ERROR(\"#1: 'Date' have attribute DontEnum\");\n } else if ( x === 'RegExp' ) {\n $ERROR(\"#1: 'RegExp' have attribute DontEnum\");\n } else if ( x === 'Error' ) {\n $ERROR(\"#1: 'Error' have attribute DontEnum\");\n } else if ( x === 'EvalError' ) {\n $ERROR(\"#1: 'EvalError' have attribute DontEnum\");\n } else if ( x === 'RangeError' ) {\n $ERROR(\"#1: 'RangeError' have attribute DontEnum\");\n } else if ( x === 'ReferenceError' ) {\n $ERROR(\"#1: 'ReferenceError' have attribute DontEnum\");\n } else if ( x === 'SyntaxError' ) {\n $ERROR(\"#1: 'SyntaxError' have attribute DontEnum\");\n } else if ( x === 'TypeError' ) {\n $ERROR(\"#1: 'TypeError' have attribute DontEnum\");\n } else if ( x === 'URIError' ) {\n $ERROR(\"#1: 'URIError' have attribute DontEnum\");\n }\n}\n",
+ "id": "S10.1.5_A2.1_T3"
+ },
+ {
+ "section": "10.1.5, 15.1",
+ "description": "Global execution context - Other Properties",
+ "test": "//CHECK#1\nfor (var x in this) {\n if ( x === 'Math' ) {\n $ERROR(\"#1: 'Math' have attribute DontEnum\");\n }\n}\n",
+ "id": "S10.1.5_A2.1_T4"
+ },
+ {
+ "section": "10.1.5, 15.1",
+ "description": "Function execution context - Value Properties",
+ "test": "function test() {\n //CHECK#1\n for (var x in this) {\n if ( x === 'NaN' ) {\n $ERROR(\"#1: 'NaN' have attribute DontEnum\");\n } else if ( x === 'Infinity' ) {\n $ERROR(\"#1: 'Infinity' have attribute DontEnum\");\n } else if ( x === 'undefined' ) {\n $ERROR(\"#1: 'undefined' have attribute DontEnum\");\n } \n }\n}\n\ntest();\n",
+ "id": "S10.1.5_A2.2_T1"
+ },
+ {
+ "section": "10.1.5, 15.1",
+ "description": "Function execution context - Function Properties",
+ "test": "function test() {\n //CHECK#1\n for (var x in this) {\n if ( x === 'eval' ) {\n $ERROR(\"#1: 'eval' have attribute DontEnum\");\n } else if ( x === 'parseInt' ) {\n $ERROR(\"#1: 'parseInt' have attribute DontEnum\");\n } else if ( x === 'parseFloat' ) {\n $ERROR(\"#1: 'parseFloat' have attribute DontEnum\");\n } else if ( x === 'isNaN' ) {\n $ERROR(\"#1: 'isNaN' have attribute DontEnum\");\n } else if ( x === 'isFinite' ) {\n $ERROR(\"#1: 'isFinite' have attribute DontEnum\");\n } else if ( x === 'decodeURI' ) {\n $ERROR(\"#1: 'decodeURI' have attribute DontEnum\");\n } else if ( x === 'decodeURIComponent' ) {\n $ERROR(\"#1: 'decodeURIComponent' have attribute DontEnum\");\n } else if ( x === 'encodeURI' ) {\n $ERROR(\"#1: 'encodeURI' have attribute DontEnum\");\n } else if ( x === 'encodeURIComponent' ) {\n $ERROR(\"#1: 'encodeURIComponent' have attribute DontEnum\");\n } \n }\n}\n\ntest();\n",
+ "id": "S10.1.5_A2.2_T2"
+ },
+ {
+ "section": "10.1.5, 15.1",
+ "description": "Function execution context - Constructor Properties",
+ "test": "function test() {\n //CHECK#1\n for (var x in this) {\n if ( x === 'Object' ) {\n $ERROR(\"#1: 'property 'Object' have attribute DontEnum\");\n } else if ( x === 'Function') {\n $ERROR(\"#1: 'Function' have attribute DontEnum\");\n } else if ( x === 'String' ) {\n $ERROR(\"#1: 'String' have attribute DontEnum\");\n } else if ( x === 'Number' ) {\n $ERROR(\"#1: 'Number' have attribute DontEnum\");\n } else if ( x === 'Array' ) {\n $ERROR(\"#1: 'Array' have attribute DontEnum\");\n } else if ( x === 'Boolean' ) {\n $ERROR(\"#1: 'Boolean' have attribute DontEnum\");\n } else if ( x === 'Date' ) {\n $ERROR(\"#1: 'Date' have attribute DontEnum\");\n } else if ( x === 'RegExp' ) {\n $ERROR(\"#1: 'RegExp' have attribute DontEnum\");\n } else if ( x === 'Error' ) {\n $ERROR(\"#1: 'Error' have attribute DontEnum\");\n } else if ( x === 'EvalError' ) {\n $ERROR(\"#1: 'EvalError' have attribute DontEnum\");\n } else if ( x === 'RangeError' ) {\n $ERROR(\"#1: 'RangeError' have attribute DontEnum\");\n } else if ( x === 'ReferenceError' ) {\n $ERROR(\"#1: 'ReferenceError' have attribute DontEnum\");\n } else if ( x === 'SyntaxError' ) {\n $ERROR(\"#1: 'SyntaxError' have attribute DontEnum\");\n } else if ( x === 'TypeError' ) {\n $ERROR(\"#1: 'TypeError' have attribute DontEnum\");\n } else if ( x === 'URIError' ) {\n $ERROR(\"#1: 'URIError' have attribute DontEnum\");\n } \n }\n}\n\ntest();\n",
+ "id": "S10.1.5_A2.2_T3"
+ },
+ {
+ "section": "10.1.5, 15.1",
+ "description": "Function execution context - Other Properties",
+ "test": "function test() {\n //CHECK#1\n for (var x in this) {\n if ( x === 'Math' ) {\n $ERROR(\"#1: 'Math' have attribute DontEnum\");\n }\n }\n}\n\ntest();\n",
+ "id": "S10.1.5_A2.2_T4"
+ },
+ {
+ "section": "10.1.5, 15.1",
+ "description": "Global execution context - Value Properties",
+ "test": "var evalStr = \n'//CHECK#1\\n'+\n'for (var x in this) {\\n'+\n' if ( x === \\'NaN\\' ) {\\n'+\n' $ERROR(\"#1: \\'NaN\\' have attribute DontEnum\");\\n'+\n' } else if ( x === \\'Infinity\\' ) {\\n'+\n' $ERROR(\"#1: \\'Infinity\\' have attribute DontEnum\");\\n'+\n' } else if ( x === \\'undefined\\' ) {\\n'+\n' $ERROR(\"#1: \\'undefined\\' have attribute DontEnum\");\\n'+\n' }\\n'+\n'}\\n';\n\neval(evalStr);\n",
+ "id": "S10.1.5_A2.3_T1"
+ },
+ {
+ "section": "10.1.5, 15.1",
+ "description": "Global execution context - Function Properties",
+ "test": "var evalStr = \n'//CHECK#1\\n'+\n'for (var x in this) {\\n'+\n' if ( x === \\'eval\\' ) {\\n'+\n' $ERROR(\"#1: \\'eval\\' have attribute DontEnum\");\\n'+\n' } else if ( x === \\'parseInt\\' ) {\\n'+\n' $ERROR(\"#1: \\'parseInt\\' have attribute DontEnum\");\\n'+\n' } else if ( x === \\'parseFloat\\' ) {\\n'+\n' $ERROR(\"#1: \\'parseFloat\\' have attribute DontEnum\");\\n'+\n' } else if ( x === \\'isNaN\\' ) {\\n'+\n' $ERROR(\"#1: \\'isNaN\\' have attribute DontEnum\");\\n'+\n' } else if ( x === \\'isFinite\\' ) {\\n'+\n' $ERROR(\"#1: \\'isFinite\\' have attribute DontEnum\");\\n'+\n' } else if ( x === \\'decodeURI\\' ) {\\n'+\n' $ERROR(\"#1: \\'decodeURI\\' have attribute DontEnum\");\\n'+\n' } else if ( x === \\'decodeURIComponent\\' ) {\\n'+\n' $ERROR(\"#1: \\'decodeURIComponent\\' have attribute DontEnum\");\\n'+\n' } else if ( x === \\'encodeURI\\' ) {\\n'+\n' $ERROR(\"#1: \\'encodeURI\\' have attribute DontEnum\");\\n'+\n' } else if ( x === \\'encodeURIComponent\\' ) {\\n'+\n' $ERROR(\"#1: \\'encodeURIComponent\\' have attribute DontEnum\");\\n'+\n' }\\n'+\n'}\\n';\n\neval(evalStr);\n",
+ "id": "S10.1.5_A2.3_T2"
+ },
+ {
+ "section": "10.1.5, 15.1",
+ "description": "Global execution context - Constructor Properties",
+ "test": "var evalStr = \n'//CHECK#1\\n'+\n'for (var x in this) {\\n'+\n' if ( x === \\'Object\\' ) {\\n'+\n' $ERROR(\"#1: \\'Object\\' have attribute DontEnum\");\\n'+\n' } else if ( x === \\'Function\\') {\\n'+\n' $ERROR(\"#1: \\'Function\\' have attribute DontEnum\");\\n'+\n' } else if ( x === \\'String\\' ) {\\n'+\n' $ERROR(\"#1: \\'String\\' have attribute DontEnum\");\\n'+\n' } else if ( x === \\'Number\\' ) {\\n'+\n' $ERROR(\"#1: \\'Number\\' have attribute DontEnum\");\\n'+\n' } else if ( x === \\'Array\\' ) {\\n'+\n' $ERROR(\"#1: \\'Array\\' have attribute DontEnum\");\\n'+\n' } else if ( x === \\'Boolean\\' ) {\\n'+\n' $ERROR(\"#1: \\'Boolean\\' have attribute DontEnum\");\\n'+\n' } else if ( x === \\'Date\\' ) {\\n'+\n' $ERROR(\"#1: \\'Date\\' have attribute DontEnum\");\\n'+\n' } else if ( x === \\'RegExp\\' ) {\\n'+\n' $ERROR(\"#1: \\'RegExp\\' have attribute DontEnum\");\\n'+\n' } else if ( x === \\'Error\\' ) {\\n'+\n' $ERROR(\"#1: \\'Error\\' have attribute DontEnum\");\\n'+\n' } else if ( x === \\'EvalError\\' ) {\\n'+\n' $ERROR(\"#1: \\'EvalError\\' have attribute DontEnum\");\\n'+\n' } else if ( x === \\'RangeError\\' ) {\\n'+\n' $ERROR(\"#1: \\'RangeError\\' have attribute DontEnum\");\\n'+\n' } else if ( x === \\'ReferenceError\\' ) {\\n'+\n' $ERROR(\"#1: \\'ReferenceError\\' have attribute DontEnum\");\\n'+\n' } else if ( x === \\'SyntaxError\\' ) {\\n'+\n' $ERROR(\"#1: \\'SyntaxError\\' have attribute DontEnum\");\\n'+\n' } else if ( x === \\'TypeError\\' ) {\\n'+\n' $ERROR(\"#1: \\'TypeError\\' have attribute DontEnum\");\\n'+\n' } else if ( x === \\'URIError\\' ) {\\n'+\n' $ERROR(\"#1: \\'URIError\\' have attribute DontEnum\");\\n'+\n' }\\n'+\n'}\\n';\n\neval(evalStr);\n",
+ "id": "S10.1.5_A2.3_T3"
+ },
+ {
+ "section": "10.1.5, 15.1",
+ "description": "Global execution context - Other Properties",
+ "test": "var evalStr = \n'//CHECK#1\\n'+\n'for (var x in this) {\\n'+\n' if ( x === \\'Math\\' ) {\\n'+\n' $ERROR(\"#1: \\'Math\\' have attribute DontEnum\");\\n'+\n' }\\n'+\n'}\\n';\n\neval(evalStr);\n",
+ "id": "S10.1.5_A2.3_T4"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/10.1.8_Arguments_Object.json b/website/resources/scripts/testcases2/10.1.8_Arguments_Object.json
new file mode 100644
index 000000000..785cd84a4
--- /dev/null
+++ b/website/resources/scripts/testcases2/10.1.8_Arguments_Object.json
@@ -0,0 +1,86 @@
+{
+ "testCollection": {
+ "name": "10.1.8_Arguments_Object",
+ "numTests": 13,
+ "tests": [
+ {
+ "section": "10.1.8",
+ "description": "Executing function which uses arguments object",
+ "test": "//CHECK#1\nfunction f1(){\n return arguments;\n}\n\ntry{\n var x = f1();\n}\ncatch(e){\n $ERROR(\"#1: arguments doesn't exists\");\n}\n\n//CHECK#2\nvar f2 = function(){\n return arguments;\n}\n\ntry{\n var x = f2();\n}\ncatch(e){\n $ERROR(\"#2: arguments doesn't exists\");\n}\n",
+ "id": "S10.1.8_A1"
+ },
+ {
+ "section": "10.1.8",
+ "description": "Checking arguments.constructor.prototype===Object.prototype",
+ "test": "//CHECK#1\nfunction f1(){\n return arguments.constructor.prototype;\n}\ntry{\n if(f1() !== Object.prototype){\n $ERROR('#1: arguments.constructor.prototype === Object.prototype');\n }\n}\ncatch(e){\n $ERROR(\"#1: arguments doesn't exists\");\n}\n\n//CHECK#2\nvar f2 = function(){return arguments.constructor.prototype;};\ntry{\n if(f2() !== Object.prototype){\n $ERROR('#2: arguments.constructor.prototype === Object.prototype');\n }\n}\ncatch(e){\n $ERROR(\"#2: arguments doesn't exists\");\n}\n",
+ "id": "S10.1.8_A2"
+ },
+ {
+ "section": "10.1.8",
+ "description": "Checking existence of arguments.callee property",
+ "test": "//CHECK#1\nfunction f1(){\n return arguments.hasOwnProperty(\"callee\");\n}\ntry{\n if(f1() !== true){\n $ERROR(\"#1: arguments object doesn't contains property 'callee'\");\n }\n}\ncatch(e){\n $ERROR(\"#1: arguments object doesn't exists\");\n}\n\n//CHECK#2\nvar f2 = function(){return arguments.hasOwnProperty(\"callee\");};\ntry{\n if(f2() !== true){\n $ERROR(\"#2: arguments object doesn't contains property 'callee'\");\n }\n}\ncatch(e){\n $ERROR(\"#2: arguments object doesn't exists\");\n}\n",
+ "id": "S10.1.8_A3_T1"
+ },
+ {
+ "section": "10.1.8",
+ "description": "Checking if enumerating the arguments.callee property fails",
+ "test": "//CHECK#1\nfunction f1(){\n for(var x in arguments){\n if (x === \"callee\"){\n return false;\n }\n }\n return true;\n}\n\ntry{\n if(!f1()){\n $ERROR(\"#1: A property callee don't have attribute { DontEnum }\");\n }\n}\ncatch(e){\n $ERROR(\"#1: arguments object don't exists\");\n}\n\n//CHECK#2\nvar f2 = function(){\n for(var x in arguments){\n if (x === \"callee\"){\n return false;\n }\n }\n return true;\n}\n\ntry{\n if(!f2()){\n $ERROR(\"#2: A property callee don't have attribute { DontEnum }\");\n }\n}\ncatch(e){\n $ERROR(\"#2: arguments object don't exists\");\n}\n",
+ "id": "S10.1.8_A3_T2"
+ },
+ {
+ "section": "10.1.8",
+ "description": "Checking if deleting arguments.callee property fails",
+ "test": "//CHECK#1\nfunction f1(){\n return (delete arguments.callee); \n}\n\ntry{\n if(!f1()){\n $ERROR(\"#1: A property callee have attribute { DontDelete }\");\n }\n}\ncatch(e){\n $ERROR(\"#1: arguments object don't exists\");\n}\n\n//CHECK#2\nvar f2 = function(){\n return (delete arguments.callee); \n}\n\ntry{\n if(!f2()){\n $ERROR(\"#2: A property callee have attribute { DontDelete }\");\n }\n}\ncatch(e){\n $ERROR(\"#2: arguments object don't exists\");\n}\n",
+ "id": "S10.1.8_A3_T3"
+ },
+ {
+ "section": "10.1.8",
+ "description": "Overriding arguments.callee property",
+ "test": "var str = \"something different\";\n//CHECK#1\nfunction f1(){\n arguments.callee = str;\n return arguments; \n}\n\ntry{\n if(f1().callee !== str){\n $ERROR(\"#1: A property callee have attribute { ReadOnly }\");\n }\n}\ncatch(e){\n $ERROR(\"#1: arguments object don't exists\");\n}\n\n//CHECK#2\nvar f2 = function(){\n arguments.callee = str;\n return arguments; \n }\ntry{\n if(f2().callee !== str){\n $ERROR(\"#2: A property callee have attribute { ReadOnly }\");\n }\n}\ncatch(e){\n $ERROR(\"#2: arguments object don't exists\");\n}\n",
+ "id": "S10.1.8_A3_T4"
+ },
+ {
+ "section": "10.1.8",
+ "description": "Checking that arguments.callee === function object",
+ "test": "//CHECK#1\nfunction f1(){\n return arguments.callee;\n}\n\ntry{\n if(f1 !== f1()){\n $ERROR('#1: arguments.callee === f1');\n }\n}\ncatch(e){\n $ERROR(\"#1: arguments object doesn't exists\");\n}\n\n//CHECK#2\nvar f2 = function(){return arguments.callee;};\n\ntry{\n if(f2 !== f2()){\n $ERROR('#2: arguments.callee === f2');\n }\n}\ncatch(e){\n $ERROR(\"#1: arguments object doesn't exists\");\n}\n",
+ "id": "S10.1.8_A4"
+ },
+ {
+ "section": "10.1.8",
+ "description": "Checking existence of arguments.length property",
+ "test": "//CHECK#1\nfunction f1(){\n return arguments.hasOwnProperty(\"length\");\n}\ntry{\n if(f1() !== true){\n $ERROR(\"#1: arguments object doesn't contains property 'length'\");\n }\n}\ncatch(e){\n $ERROR(\"#1: arguments object doesn't exists\");\n}\n\n//CHECK#2\nvar f2 = function(){return arguments.hasOwnProperty(\"length\");};\ntry{\n if(f2() !== true){\n $ERROR(\"#2: arguments object doesn't contains property 'length'\");\n }\n}\ncatch(e){\n $ERROR(\"#2: arguments object doesn't exists\");\n}\n",
+ "id": "S10.1.8_A5_T1"
+ },
+ {
+ "section": "10.1.8",
+ "description": "Checking if enumerating the arguments.length property fails",
+ "test": "//CHECK#1\nfunction f1(){\n for(var x in arguments){\n if (x === \"length\"){\n return false;\n }\n }\n return true;\n}\n\ntry{\n if(!f1()){\n $ERROR(\"#1: A property length don't have attribute { DontEnum }\");\n }\n}\ncatch(e){\n $ERROR(\"#1: arguments object don't exists\");\n}\n\n//CHECK#2\nvar f2 = function(){\n for(var x in arguments){\n if (x === \"length\"){\n return false;\n }\n }\n return true;\n}\n\ntry{\n if(!f2()){\n $ERROR(\"#2: A property length don't have attribute { DontEnum }\");\n }\n}\ncatch(e){\n $ERROR(\"#2: arguments object don't exists\");\n}\n",
+ "id": "S10.1.8_A5_T2"
+ },
+ {
+ "section": "10.1.8",
+ "description": "Checking if deleting arguments.length property fails",
+ "test": "//CHECK#1\nfunction f1(){\n return (delete arguments.length); \n}\n\ntry{\n if(!f1()){\n $ERROR(\"#1: A property length have attribute { DontDelete }\");\n }\n}\ncatch(e){\n $ERROR(\"#1: arguments object don't exists\");\n}\n\n//CHECK#2\nvar f2 = function(){\n return (delete arguments.length); \n}\n\ntry{\n if(!f2()){\n $ERROR(\"#2: A property length have attribute { DontDelete }\");\n }\n}\ncatch(e){\n $ERROR(\"#2: arguments object don't exists\");\n}\n",
+ "id": "S10.1.8_A5_T3"
+ },
+ {
+ "section": "10.1.8",
+ "description": "Overriding arguments.length property",
+ "test": "var str = \"something different\";\n//CHECK#1\nfunction f1(){\n arguments.length = str;\n return arguments; \n}\n\ntry{\n if(f1().length !== str){\n $ERROR(\"#1: A property length have attribute { ReadOnly }\");\n }\n}\ncatch(e){\n $ERROR(\"#1: arguments object don't exists\");\n}\n\n//CHECK#2\nvar f2 = function(){\n arguments.length = str;\n return arguments; \n }\ntry{\n if(f2().length !== str){\n $ERROR(\"#2: A property length have attribute { ReadOnly }\");\n }\n}\ncatch(e){\n $ERROR(\"#2: arguments object don't exists\");\n}\n",
+ "id": "S10.1.8_A5_T4"
+ },
+ {
+ "section": "10.1.8",
+ "description": "Create function, that returned arguments.length",
+ "test": "function f1(){\n return arguments.length;\n}\n\n//CHECK#1\nif(!(f1() === 0)){\n $ERROR('#1: argument.length === 0');\n}\n\n//CHECK#2\nif(!(f1(0) === 1)){\n $ERROR('#2: argument.length === 1');\n}\n\n//CHECK#3\nif(!(f1(0, 1) === 2)){\n $ERROR('#3: argument.length === 2');\n}\n\n//CHECK#4\nif(!(f1(0, 1, 2) === 3)){\n $ERROR('#4: argument.length === 3');\n}\n\n//CHECK#5\nif(!(f1(0, 1, 2, 3) === 4)){\n $ERROR('#5: argument.length === 4');\n}\n\nvar f2 = function(){return arguments.length;};\n\n//CHECK#6\nif(!(f2() === 0)){\n $ERROR('#6: argument.length === 0');\n}\n\n//CHECK#7\nif(!(f2(0) === 1)){\n $ERROR('#7: argument.length === 1');\n}\n\n//CHECK#8\nif(!(f2(0, 1) === 2)){\n $ERROR('#8: argument.length === 2');\n}\n\n//CHECK#9\nif(!(f2(0, 1, 2) === 3)){\n $ERROR('#9: argument.length === 3');\n}\n\n//CHECK#10\nif(!(f2(0, 1, 2, 3) === 4)){\n $ERROR('#10: argument.length === 4');\n}\n",
+ "id": "S10.1.8_A6"
+ },
+ {
+ "section": "10.1.8",
+ "description": "Use property arguments",
+ "test": "function f1() {\n return arguments;\n}\n \n//CHECK#1-5\nfor(var i = 1; i < 5; i++){ \nif (f1(1,2,3,4,5)[i] !== (i+1))\n $ERROR(\"#\"+i+\": Returning function's arguments work wrong, f1(1,2,3,4,5)[\"+i+\"] !== \"+(i+1));\n}\n",
+ "id": "S10.1.8_A7"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/10.1_Definitions.json b/website/resources/scripts/testcases2/10.1_Definitions.json
new file mode 100644
index 000000000..72b92edf0
--- /dev/null
+++ b/website/resources/scripts/testcases2/10.1_Definitions.json
@@ -0,0 +1,56 @@
+{
+ "testCollection": {
+ "name": "10.1_Definitions",
+ "numTests": 8,
+ "tests": [
+ {
+ "section": "10.1.1",
+ "description": "Defining function by a FunctionDeclaration",
+ "test": "//CHECK#1\nfunction f1(){\n return 1;\n}\nif(typeof(f1)!==\"function\")\n $ERROR('#1: typeof(f1)!==\"function\"');\n",
+ "id": "S10.1.1_A1_T1"
+ },
+ {
+ "section": "10.1.1",
+ "description": "Creating function dynamically by using a FunctionExpression",
+ "test": "//CHECK#1\nvar x=function f1(){return 1;}();\nif(x!==1)\n $ERROR('#1: Create function dynamically either by using a FunctionExpression');\n\n//CHECK#2\nvar y=function (){return 2;}();\nif(y!==2){\n $ERROR('#2: Create an anonymous function dynamically either by using a FunctionExpression');\n}\n\n//CHECK#2\nvar z = (function(){return 3;})();\nif(z!==3){\n $ERROR('#3: Create an anonymous function dynamically either by using a FunctionExpression wrapped in a group operator');\n}\n",
+ "id": "S10.1.1_A1_T2"
+ },
+ {
+ "section": "10.1.1",
+ "description": "Creating function dynamically by using the built-in Function object as a constructor",
+ "test": "//CHECK#1\nvar x=new function f1(){return 1;};\nif(typeof(x.constructor)!==\"function\")\n $ERROR('#1: typeof(x.constructor)!==\"function\"');\n",
+ "id": "S10.1.1_A1_T3"
+ },
+ {
+ "section": "10.1.1",
+ "description": "Checking types of parseInt and Math.exp",
+ "test": "//CHECK#1\nif(typeof(Math.exp)!==\"function\")\n $ERROR('#1: typeof(Math.exp(10))!==\"function\" '+typeof(Math.exp()));\n\n//CHECK#2\nif(typeof(parseInt)!==\"function\")\n $ERROR('#2: typeof(parseInt())!==\"function\" '+typeof(parseInt()));\n \n",
+ "id": "S10.1.1_A2_T1"
+ },
+ {
+ "section": "10.1.6",
+ "description": "Checking ifdeleting function parameter is possible",
+ "test": "//CHECK#1\nfunction f1(a){\n delete a;\n return a;\n}\nif (f1(1) !== 1)\n $ERROR('#1: Function parameter was deleted');\n \n",
+ "id": "S10.1.6_A1_T1"
+ },
+ {
+ "section": "10.1.6",
+ "description": "Checking funtion which returns property \"arguments\"",
+ "test": "var ARG_STRING = \"value of the argument property\";\n\nfunction f1() {\n this.constructor.prototype.arguments = ARG_STRING;\n return arguments;\n}\n \n//CHECK#1\nif ((new f1(1,2,3,4,5)).length !== 5)\n $ERROR('#1: (new f1(1,2,3,4,5)).length===5, where f1 returns \"arguments\" that is set to \"'+ ARG_STRING + '\"');\n\n//CHECK#2 \nif ((new f1(1,2,3,4,5))[3] !== 4)\n $ERROR('#2: (new f1(1,2,3,4,5))[3]===4, where f1 returns \"arguments\" that is set to \"'+ ARG_STRING + '\"');\n\n//CHECK#3\nvar x = new f1(1,2,3,4,5); \nif (delete x[3] !== true)\n $ERROR('#3.1: Function parameters have attribute {DontDelete}');\n \nif (x[3] === 4)\n $ERROR('#3.2: Function parameters have attribute {DontDelete}');\n",
+ "id": "S10.1.6_A1_T2"
+ },
+ {
+ "section": "10.1.6",
+ "description": "Checking function which returns \"this\"",
+ "test": "function f1() {\n if (delete arguments) {\n $ERROR(\"#1: Function parameters have attribute {DontDelete}\" + arguments);\n }\n return arguments;\n}\n\nf1();\n",
+ "id": "S10.1.6_A1_T3"
+ },
+ {
+ "section": "10.1.7",
+ "description": "Checking if deleting \"this\" fails",
+ "test": "//CHECK#1\nif (delete this !== true)\n $ERROR('#1: The this value associated with an executioncontext is immutable. Actual: this was deleted');\n \n",
+ "id": "S10.1.7_A1_T1"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/10.2.1.1.3.json b/website/resources/scripts/testcases2/10.2.1.1.3.json
new file mode 100644
index 000000000..468c6fb46
--- /dev/null
+++ b/website/resources/scripts/testcases2/10.2.1.1.3.json
@@ -0,0 +1,38 @@
+{
+ "testCollection": {
+ "name": "10.2.1.1.3",
+ "numTests": 4,
+ "tests": [
+ {
+ "id": "10.2.1.1.3-4-16-s",
+ "path": "TestCases/chapter10/10.2/10.2.1/10.2.1.1/10.2.1.1.3/10.2.1.1.3-4-16-s.js",
+ "description": "Strict Mode - TypeError is thrown when changing the value of a Value Property of the Global Object under strict mode (NaN)",
+ "test": "assertTrue((function testcase() {\n \"use strict\";\n\n try {\n NaN = 12;\n return false;\n } catch (e) {\n return e instanceof TypeError;\n }\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict())",
+ "strict_only": ""
+ },
+ {
+ "id": "10.2.1.1.3-4-18-s",
+ "path": "TestCases/chapter10/10.2/10.2.1/10.2.1.1/10.2.1.1.3/10.2.1.1.3-4-18-s.js",
+ "description": "Strict Mode - TypeError is thrown when changing the value of a Value Property of the Global Object under strict mode (undefined)",
+ "test": "assertTrue((function testcase() {\n \"use strict\";\n try {\n undefined = 12;\n return false;\n } catch (e) {\n return e instanceof TypeError;\n }\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict())",
+ "strict_only": ""
+ },
+ {
+ "id": "10.2.1.1.3-4-22-s",
+ "path": "TestCases/chapter10/10.2/10.2.1/10.2.1.1/10.2.1.1.3/10.2.1.1.3-4-22-s.js",
+ "description": "Strict Mode - TypeError is not thrown when changing the value of the Constructor Properties of the Global Object under strict mode (Object)",
+ "test": "assertTrue((function testcase() {\n \"use strict\";\n var objBak = Object;\n\n try {\n Object = 12;\n return true;\n } finally {\n Object = objBak;\n }\n }).call(this));\n",
+ "strict_only": ""
+ },
+ {
+ "id": "10.2.1.1.3-4-27-s",
+ "path": "TestCases/chapter10/10.2/10.2.1/10.2.1.1/10.2.1.1.3/10.2.1.1.3-4-27-s.js",
+ "description": "Strict Mode - TypeError is not thrown when changing the value of the Constructor Properties of the Global Object under strict mode (Number)",
+ "test": "assertTrue((function testcase() {\n \"use strict\";\n\n var numBak = Number;\n try {\n Number = 12;\n return true;\n } finally {\n Number = numBak;\n }\n }).call(this));\n",
+ "strict_only": ""
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/10.2.1_Global_Code.json b/website/resources/scripts/testcases2/10.2.1_Global_Code.json
new file mode 100644
index 000000000..bbe43cae4
--- /dev/null
+++ b/website/resources/scripts/testcases2/10.2.1_Global_Code.json
@@ -0,0 +1,20 @@
+{
+ "testCollection": {
+ "name": "10.2.1_Global_Code",
+ "numTests": 2,
+ "tests": [
+ {
+ "section": "10.2.1",
+ "description": "Checking if deleting variable x, that is defined as var x = 1, fails",
+ "test": "var x = 1;\n\nif (this.x !== 1) {\n $ERROR(\"#1: variable x is a property of global object\");\n}\n\nif(delete this.x !== false){\n $ERROR(\"#2: variable x has property attribute DontDelete\");\n}\n",
+ "id": "S10.2.1_A1_T1"
+ },
+ {
+ "section": "10.2.1",
+ "description": "Checking if deleting variable x, that is defined as x = 1, fails",
+ "test": "x = 1;\n\nif (this.x !== 1) {\n $ERROR(\"#1: variable x is a property of global object\");\n}\n\nif(delete this.x !== true){\n $ERROR(\"#2: variable x has property attribute DontDelete\");\n}\n",
+ "id": "S10.2.1_A1_T2"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/10.2.2_Eval_Code.json b/website/resources/scripts/testcases2/10.2.2_Eval_Code.json
new file mode 100644
index 000000000..88f216efb
--- /dev/null
+++ b/website/resources/scripts/testcases2/10.2.2_Eval_Code.json
@@ -0,0 +1,140 @@
+{
+ "testCollection": {
+ "name": "10.2.2_Eval_Code",
+ "numTests": 22,
+ "tests": [
+ {
+ "section": "10.2.2",
+ "description": "eval within global execution context",
+ "test": "var i;\nvar j;\nstr1 = '';\nstr2 = '';\nx = 1;\ny = 2;\n\nfor(i in this){\n str1+=i;\n}\n\neval('for(j in this){\\nstr2+=j;\\n}');\n\nif(!(str1 === str2)){\n $ERROR(\"#1: scope chain must contain same objects in the same order as the calling context\");\n}\n",
+ "id": "S10.2.2_A1.1_T1"
+ },
+ {
+ "section": "10.2.2",
+ "description": "eval within global execution context",
+ "test": "var i;\nvar j;\nstr1 = '';\nstr2 = '';\nvar x = 1;\nvar y = 2;\n\nfor(i in this){\n str1+=i;\n}\n\neval('for(j in this){\\nstr2+=j;\\n}');\n\nif(!(str1 === str2)){\n $ERROR(\"#1: scope chain must contain same objects in the same order as the calling context\");\n}\n",
+ "id": "S10.2.2_A1.1_T10"
+ },
+ {
+ "section": "10.2.2",
+ "description": "eval within global execution context",
+ "test": "var i;\nvar j;\nstr1 = '';\nstr2 = '';\n\nfor(i in this){\n str1+=i;\n}\n\neval('for(j in this){\\nstr2+=j;\\n}');\n\nif(!(str1 === str2)){\n $ERROR(\"#1: scope chain must contain same objects in the same order as the calling context\");\n}\n\nthis.x = 1;\nthis.y = 2;\n",
+ "id": "S10.2.2_A1.1_T11"
+ },
+ {
+ "section": "10.2.2",
+ "description": "eval within global execution context",
+ "test": "var i;\nvar j;\nstr1 = '';\nstr2 = '';\n\nfor(i in this){\n str1+=i;\n}\n\neval('for(j in this){\\nstr2+=j;\\n}');\n\nif(!(str1 === str2)){\n $ERROR(\"#1: scope chain must contain same objects in the same order as the calling context\");\n}\n\nvar x = 1;\nvar y = 2;\n",
+ "id": "S10.2.2_A1.1_T2"
+ },
+ {
+ "section": "10.2.2",
+ "description": "eval within global execution context",
+ "test": "var i;\nvar j;\nstr1 = '';\nstr2 = '';\nthis.x = 1;\nthis.y = 2;\n\nfor(i in this){\n str1+=i;\n}\n\neval('for(j in this){\\nstr2+=j;\\n}');\n\nif(!(str1 === str2)){\n $ERROR(\"#1: scope chain must contain same objects in the same order as the calling context\");\n}\n",
+ "id": "S10.2.2_A1.1_T3"
+ },
+ {
+ "section": "10.2.2",
+ "description": "eval within global execution context",
+ "test": "var i;\nvar j;\nstr1 = '';\nstr2 = '';\nx = 1;\n\nfor(i in this){\n str1+=i;\n}\n\neval('for(j in this){\\nstr2+=j;\\n}');\n\nif(!(str1 === str2)){\n $ERROR(\"#1: scope chain must contain same objects in the same order as the calling context\");\n}\n\ny = 2;\n",
+ "id": "S10.2.2_A1.1_T4"
+ },
+ {
+ "section": "10.2.2",
+ "description": "eval within global execution context",
+ "test": "var i;\nvar j;\nstr1 = '';\nstr2 = '';\nvar x = 1;\n\nfor(i in this){\n str1+=i;\n}\n\neval('for(j in this){\\nstr2+=j;\\n}');\n\nif(!(str1 === str2)){\n $ERROR(\"#1: scope chain must contain same objects in the same order as the calling context\");\n}\n\nvar y = 2;\n",
+ "id": "S10.2.2_A1.1_T5"
+ },
+ {
+ "section": "10.2.2",
+ "description": "eval within global execution context",
+ "test": "var i;\nvar j;\nstr1 = '';\nstr2 = '';\nthis.x = 1;\n\nfor(i in this){\n str1+=i;\n}\n\neval('for(j in this){\\nstr2+=j;\\n}');\n\nif(!(str1 === str2)){\n $ERROR(\"#1: scope chain must contain same objects in the same order as the calling context\");\n}\n\nthis.y = 2;\n",
+ "id": "S10.2.2_A1.1_T6"
+ },
+ {
+ "section": "10.2.2",
+ "description": "eval within global execution context",
+ "test": "var i;\nvar j;\nstr1 = '';\nstr2 = '';\nx = 1;\n\nfor(i in this){\n str1+=i;\n}\n\neval('for(j in this){\\nstr2+=j;\\n}');\n\nif(!(str1 === str2)){\n $ERROR(\"#1: scope chain must contain same objects in the same order as the calling context\");\n}\n\nvar y = 2;\n",
+ "id": "S10.2.2_A1.1_T7"
+ },
+ {
+ "section": "10.2.2",
+ "description": "eval within global execution context",
+ "test": "var i;\nvar j;\nstr1 = '';\nstr2 = '';\nthis.x = 1;\n\nfor(i in this){\n str1+=i;\n}\n\neval('for(j in this){\\nstr2+=j;\\n}');\n\nif(!(str1 === str2)){\n $ERROR(\"#1: scope chain must contain same objects in the same order as the calling context\");\n}\n\nvar y = 2;\n",
+ "id": "S10.2.2_A1.1_T8"
+ },
+ {
+ "section": "10.2.2",
+ "description": "eval within global execution context",
+ "test": "var i;\nvar j;\nstr1 = '';\nstr2 = '';\n\nfor(i in this){\n str1+=i;\n}\n\neval('for(j in this){\\nstr2+=j;\\n}');\n\nif(!(str1 === str2)){\n $ERROR(\"#1: scope chain must contain same objects in the same order as the calling context\");\n}\n\nx = 1;\ny = 2;\n",
+ "id": "S10.2.2_A1.1_T9"
+ },
+ {
+ "section": "10.2.2",
+ "description": "eval within global execution context",
+ "test": "function f(){\n var i;\n var j;\n str1 = '';\n str2 = '';\n x = 1;\n y = 2;\n \n for(i in this){\n str1+=i;\n }\n \n eval('for(j in this){\\nstr2+=j;\\n}');\n return (str1 === str2); \n}\n\nif(!f()){\n $ERROR(\"#1: scope chain must contain same objects in the same order as the calling context\");\n}\n",
+ "id": "S10.2.2_A1.2_T1"
+ },
+ {
+ "section": "10.2.2",
+ "description": "eval within global execution context",
+ "test": "function f(){\n var i;\n var j;\n str1 = '';\n str2 = '';\n var x = 1;\n var y = 2;\n \n for(i in this){\n str1+=i;\n }\n \n eval('for(j in this){\\nstr2+=j;\\n}');\n\n return (str1 === str2); \n}\n\nif(!f()){\n $ERROR(\"#1: scope chain must contain same objects in the same order as the calling context\");\n}\n",
+ "id": "S10.2.2_A1.2_T10"
+ },
+ {
+ "section": "10.2.2",
+ "description": "eval within global execution context",
+ "test": "function f(){\n var i;\n var j;\n str1 = '';\n str2 = '';\n \n for(i in this){\n str1+=i;\n }\n \n eval('for(j in this){\\nstr2+=j;\\n}');\n\n return (str1 === str2); \n\n this.x = 1;\n this.y = 2;\n}\n\nif(!f()){\n $ERROR(\"#1: scope chain must contain same objects in the same order as the calling context\");\n}\n",
+ "id": "S10.2.2_A1.2_T11"
+ },
+ {
+ "section": "10.2.2",
+ "description": "eval within global execution context",
+ "test": "function f(){\n var i;\n var j;\n str1 = '';\n str2 = '';\n \n for(i in this){\n str1+=i;\n }\n \n eval('for(j in this){\\nstr2+=j;\\n}');\n\n return (str1 === str2);\n var x = 1;\n var y = 2;\n}\n\nif(!f()){\n $ERROR(\"#1: scope chain must contain same objects in the same order as the calling context\");\n}\n",
+ "id": "S10.2.2_A1.2_T2"
+ },
+ {
+ "section": "10.2.2",
+ "description": "eval within global execution context",
+ "test": "function f(){\n var i;\n var j;\n str1 = '';\n str2 = '';\n this.x = 1;\n this.y = 2;\n \n for(i in this){\n str1+=i;\n }\n \n eval('for(j in this){\\nstr2+=j;\\n}');\n\n return (str1 === str2); \n}\n\nif(!f()){\n $ERROR(\"#1: scope chain must contain same objects in the same order as the calling context\");\n}\n",
+ "id": "S10.2.2_A1.2_T3"
+ },
+ {
+ "section": "10.2.2",
+ "description": "eval within global execution context",
+ "test": "function f(){\n var i;\n var j;\n str1 = '';\n str2 = '';\n x = 1;\n \n for(i in this){\n str1+=i;\n }\n \n eval('for(j in this){\\nstr2+=j;\\n}');\n\n return (str1 === str2); \n\n y = 2;\n}\n\nif(!f()){\n $ERROR(\"#1: scope chain must contain same objects in the same order as the calling context\");\n}\n",
+ "id": "S10.2.2_A1.2_T4"
+ },
+ {
+ "section": "10.2.2",
+ "description": "eval within global execution context",
+ "test": "function f(){\n var i;\n var j;\n str1 = '';\n str2 = '';\n var x = 1;\n \n for(i in this){\n str1+=i;\n }\n \n eval('for(j in this){\\nstr2+=j;\\n}');\n\n return (str1 === str2);\n \n var y = 2;\n}\n\nif(!f()){\n $ERROR(\"#1: scope chain must contain same objects in the same order as the calling context\");\n}\n\n",
+ "id": "S10.2.2_A1.2_T5"
+ },
+ {
+ "section": "10.2.2",
+ "description": "eval within global execution context",
+ "test": "function f(){\n var i;\n var j;\n str1 = '';\n str2 = '';\n this.x = 1;\n \n for(i in this){\n str1+=i;\n }\n \n eval('for(j in this){\\nstr2+=j;\\n}');\n\n return (str1 === str2);\n \n this.y = 2;\n}\n\nif(!f()){\n $ERROR(\"#1: scope chain must contain same objects in the same order as the calling context\");\n}\n\n",
+ "id": "S10.2.2_A1.2_T6"
+ },
+ {
+ "section": "10.2.2",
+ "description": "eval within global execution context",
+ "test": "function f(){\n var i;\n var j;\n str1 = '';\n str2 = '';\n x = 1;\n \n for(i in this){\n str1+=i;\n }\n \n eval('for(j in this){\\nstr2+=j;\\n}');\n\n return (str1 === str2);\n \n var y = 2;\n}\n\nif(!f()){\n $ERROR(\"#1: scope chain must contain same objects in the same order as the calling context\");\n}\n\n\n",
+ "id": "S10.2.2_A1.2_T7"
+ },
+ {
+ "section": "10.2.2",
+ "description": "eval within global execution context",
+ "test": "function f(){\n var i;\n var j;\n str1 = '';\n str2 = '';\n this.x = 1;\n \n for(i in this){\n str1+=i;\n }\n \n eval('for(j in this){\\nstr2+=j;\\n}');\n\n return (str1 === str2);\n \n var y = 2;\n}\n\nif(!f()){\n $ERROR(\"#1: scope chain must contain same objects in the same order as the calling context\");\n}\n\n",
+ "id": "S10.2.2_A1.2_T8"
+ },
+ {
+ "section": "10.2.2",
+ "description": "eval within global execution context",
+ "test": "function f(){\n var i;\n var j;\n str1 = '';\n str2 = '';\n \n for(i in this){\n str1+=i;\n }\n \n eval('for(j in this){\\nstr2+=j;\\n}');\n\n return (str1 === str2);\n \n x = 1;\n y = 2;\n}\n\nif(!f()){\n $ERROR(\"#1: scope chain must contain same objects in the same order as the calling context\");\n}\n\n",
+ "id": "S10.2.2_A1.2_T9"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/10.2_Entering_An_Execution_Context.json b/website/resources/scripts/testcases2/10.2_Entering_An_Execution_Context.json
new file mode 100644
index 000000000..80a8fbca3
--- /dev/null
+++ b/website/resources/scripts/testcases2/10.2_Entering_An_Execution_Context.json
@@ -0,0 +1,20 @@
+{
+ "testCollection": {
+ "name": "10.2_Entering_An_Execution_Context",
+ "numTests": 2,
+ "tests": [
+ {
+ "section": "10.2",
+ "description": "Sequence of function calls",
+ "test": "var y;\n\nfunction f(){\n var x;\n \n if(x === undefined) {\n x = 0;\n } else {\n x = 1;\n }\n \n return x;\n}\n\ny = f();\ny = f();\n\nif(!(y === 0)){\n $ERROR(\"#1: Sequenced function calls shares execution context\");\n}\n",
+ "id": "S10.2_A1.1_T1"
+ },
+ {
+ "section": "10.2",
+ "description": "Recursive function call",
+ "test": "var y;\n\nfunction f(a){\n var x;\n \n if (a === 1) \n return x;\n else {\n if(x === undefined) {\n x = 0;\n } else {\n x = 1;\n }\n return f(1);\n }\n}\n\ny = f(0);\n\nif(!(y === undefined)){\n $ERROR(\"#1: Recursive function calls shares execution context\");\n}\n",
+ "id": "S10.2_A1.1_T2"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/10.4.2.json b/website/resources/scripts/testcases2/10.4.2.json
new file mode 100644
index 000000000..675253ebf
--- /dev/null
+++ b/website/resources/scripts/testcases2/10.4.2.json
@@ -0,0 +1,83 @@
+{
+ "testCollection": {
+ "name": "10.4.2",
+ "numTests": 11,
+ "tests": [
+ {
+ "id": "10.4.2-1-1",
+ "path": "TestCases/chapter10/10.4/10.4.2/10.4.2-1-1.js",
+ "description": "Indirect call to eval has context set to global context",
+ "test": "var __10_4_2_1_1_1 = \"str\";assertTrue((function testcase() {\n try {\n\n var _eval = eval;\n var __10_4_2_1_1_1 = \"str1\";\n if(_eval(\"\\'str\\' === __10_4_2_1_1_1\") === true && // indirect eval\n eval(\"\\'str1\\' === __10_4_2_1_1_1\") === true) { // direct eval\n return true;\n }\n return false;\n } finally {\n delete this.__10_4_2_1_1_1;\n }\n}).call(this));\n"
+ },
+ {
+ "id": "10.4.2-1-2",
+ "path": "TestCases/chapter10/10.4/10.4.2/10.4.2-1-2.js",
+ "description": "Indirect call to eval has context set to global context (nested function)",
+ "test": "var __10_4_2_1_2 = \"str\";assertTrue((function testcase() {\n try {\n\n var _eval = eval;\n var __10_4_2_1_2 = \"str1\";\n function foo() {\n var __10_4_2_1_2 = \"str2\";\n if(_eval(\"\\'str\\' === __10_4_2_1_2\") === true && // indirect eval\n eval(\"\\'str2\\' === __10_4_2_1_2\") === true) { // direct eval\n return true;\n } else {\n return false;\n }\n }\n return foo();\n } finally {\n delete this.__10_4_2_1_1_2;\n }\n }).call(this));\n"
+ },
+ {
+ "id": "10.4.2-1-3",
+ "path": "TestCases/chapter10/10.4/10.4.2/10.4.2-1-3.js",
+ "description": "Indirect call to eval has context set to global context (catch block)",
+ "test": "var __10_4_2_1_3 = \"str\";assertTrue((function testcase() {\n\n try {\n\n var _eval = eval;\n var __10_4_2_1_3 = \"str1\";\n try {\n throw \"error\";\n }\n catch (e) {\n var __10_4_2_1_3 = \"str2\";\n if (_eval(\"\\'str\\' === __10_4_2_1_3\") === true && // indirect eval\n eval(\"\\'str2\\' === __10_4_2_1_3\") === true) { // direct eval\n return true;\n } else {\n return false;\n }\n }\n } finally {\n delete this.__10_4_2_1_3;\n }\n }).call(this));\n"
+ },
+ {
+ "id": "10.4.2-1-4",
+ "path": "TestCases/chapter10/10.4/10.4.2/10.4.2-1-4.js",
+ "description": "Indirect call to eval has context set to global context (with block)",
+ "test": "var __10_4_2_1_4 = \"str\";assertTrue((function testcase() {\n try {\n var o = new Object();\n o.__10_4_2_1_4 = \"str2\";\n var _eval = eval;\n var __10_4_2_1_4 = \"str1\";\n with (o) {\n if (_eval(\"\\'str\\' === __10_4_2_1_4\") === true && // indirect eval\n eval(\"\\'str2\\' === __10_4_2_1_4\") === true) { // direct eval\n return true;\n }\n }\n return false;\n } finally {\n delete this.__10_4_2_1_4;\n }\n }).call(this));\n"
+ },
+ {
+ "id": "10.4.2-1-5",
+ "path": "TestCases/chapter10/10.4/10.4.2/10.4.2-1-5.js",
+ "description": "Indirect call to eval has context set to global context (inside another eval)",
+ "test": "var __10_4_2_1_5 = \"str\";assertTrue((function testcase() {\n try {\n\n var __10_4_2_1_5 = \"str1\";\n var r = eval(\"\\\n var _eval = eval; \\\n var __10_4_2_1_5 = \\'str2\\'; \\\n _eval(\\\"\\'str\\' === __10_4_2_1_5 \\\") && \\\n eval(\\\"\\'str2\\' === __10_4_2_1_5\\\")\\\n \");\n return r;\n } finally {\n delete this.__10_4_2_1_5;\n }\n }).call(this));\n"
+ },
+ {
+ "id": "10.4.2-2-c-1",
+ "path": "TestCases/chapter10/10.4/10.4.2/10.4.2-2-c-1.js",
+ "description": "Direct val code in non-strict mode - can instantiate variable in calling context",
+ "test": "assertTrue((function testcase() {\n var x = 0;\n return function inner() {\n eval(\"var x = 1\");\n if (x === 1)\n return true;\n } ();\n }).call(this));\n"
+ },
+ {
+ "id": "10.4.2-2-s",
+ "path": "TestCases/chapter10/10.4/10.4.2/10.4.2-2-s.js",
+ "description": "Strict Mode - Strict mode eval code cannot instantiate functions in the variable environment of the caller to eval",
+ "test": "assertTrue((function testcase() {\n \"use strict\";\n eval(\"(function fun(x){ return x })(10)\");\n return typeof (fun) === \"undefined\";\n }).call(this));\n",
+ "strict_only": ""
+ },
+ {
+ "id": "10.4.2-3-c-1-s",
+ "path": "TestCases/chapter10/10.4/10.4.2/10.4.2-3-c-1-s.js",
+ "description": "Direct eval code in strict mode - cannot instantiate variable in the variable environment of the calling context",
+ "test": "assertTrue((function testcase() {\n var _10_4_2_3_c_1_s = 0;\n function _10_4_2_3_c_1_sFunc() {\n eval(\"'use strict';var _10_4_2_3_c_1_s = 1\");\n return _10_4_2_3_c_1_s===0;\n } \n return _10_4_2_3_c_1_sFunc();\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict())",
+ "strict_only": ""
+ },
+ {
+ "id": "10.4.2-3-c-2-s",
+ "path": "TestCases/chapter10/10.4/10.4.2/10.4.2-3-c-2-s.js",
+ "description": "Calling code in strict mode - eval cannot instantiate variable in the variable environment of the calling context",
+ "test": "assertTrue((function testcase() {\n var _10_4_2_3_c_2_s = 0;\n function _10_4_2_3_c_2_sFunc() {\n 'use strict';\n eval(\"var _10_4_2_3_c_2_s = 1\");\n return _10_4_2_3_c_2_s===0;\n }\n return _10_4_2_3_c_2_sFunc();\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict())",
+ "strict_only": ""
+ },
+ {
+ "id": "10.4.2.1-2-s",
+ "path": "TestCases/chapter10/10.4/10.4.2/10.4.2.1-2-s.js",
+ "description": "Strict Mode - Strict mode eval code cannot instantiate functions in the variable environment of the caller to eval",
+ "test": "assertTrue((function testcase() {\n \"use strict\";\n\n eval(\"function _10_4_2_1_2_fun(){}\");\n return typeof _10_4_2_1_2_fun === \"undefined\";\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict())",
+ "strict_only": ""
+ },
+ {
+ "id": "10.4.2.1-4-s",
+ "path": "TestCases/chapter10/10.4/10.4.2/10.4.2.1-4-s.js",
+ "description": "Strict Mode - Strict mode eval code cannot instantiate functions in the variable environment of the caller to eval which is contained in strict mode code",
+ "test": "assertTrue((function testcase() {\n\n eval(\"'use strict'; function _10_4_2_1_4_fun(){}\");\n return typeof _10_4_2_1_4_fun === \"undefined\";\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict())",
+ "strict_only": ""
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/10.4.3.json b/website/resources/scripts/testcases2/10.4.3.json
new file mode 100644
index 000000000..5dc7ada27
--- /dev/null
+++ b/website/resources/scripts/testcases2/10.4.3.json
@@ -0,0 +1,47 @@
+{
+ "testCollection": {
+ "name": "10.4.3",
+ "numTests": 5,
+ "tests": [
+ {
+ "id": "10.4.3-1-1-s",
+ "path": "TestCases/chapter10/10.4/10.4.3/10.4.3-1-1-s.js",
+ "description": "this is not coerced to an object in strict mode (Number)",
+ "test": "assertTrue((function testcase() {\n\n function foo()\n {\n 'use strict';\n return typeof(this);\n } \n\n function bar()\n {\n return typeof(this);\n }\n\n\n return foo.call(1) === 'number' && bar.call(1) === 'object';\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict())",
+ "strict_only": ""
+ },
+ {
+ "id": "10.4.3-1-2-s",
+ "path": "TestCases/chapter10/10.4/10.4.3/10.4.3-1-2-s.js",
+ "description": "this is not coerced to an object in strict mode (string)",
+ "test": "assertTrue((function testcase() {\n\n function foo()\n {\n 'use strict';\n return typeof(this);\n } \n\n function bar()\n {\n return typeof(this);\n }\n\n\n return foo.call('1') === 'string' && bar.call('1') === 'object';\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict())",
+ "strict_only": ""
+ },
+ {
+ "id": "10.4.3-1-3-s",
+ "path": "TestCases/chapter10/10.4/10.4.3/10.4.3-1-3-s.js",
+ "description": "this is not coerced to an object in strict mode (undefined)",
+ "test": "assertTrue((function testcase() {\n\n function foo()\n {\n 'use strict';\n return typeof(this);\n } \n\n function bar()\n {\n return typeof(this);\n }\n return foo.call(undefined) === 'undefined' && bar.call() === 'object';\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict())",
+ "strict_only": ""
+ },
+ {
+ "id": "10.4.3-1-4-s",
+ "path": "TestCases/chapter10/10.4/10.4.3/10.4.3-1-4-s.js",
+ "description": "this is not coerced to an object in strict mode (boolean)",
+ "test": "assertTrue((function testcase() {\n\n function foo()\n {\n 'use strict';\n return typeof(this);\n } \n\n function bar()\n {\n return typeof(this);\n }\n\n\n return foo.call(true) === 'boolean' && bar.call(true) === 'object';\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict())",
+ "strict_only": ""
+ },
+ {
+ "id": "10.4.3-1-5-s",
+ "path": "TestCases/chapter10/10.4/10.4.3/10.4.3-1-5-s.js",
+ "description": "this is not coerced to an object in strict mode (function)",
+ "test": "assertTrue((function testcase() {\n\n function foo()\n {\n 'use strict';\n return typeof(this);\n } \n\n function bar()\n {\n return typeof(this);\n }\n\n function foobar()\n {\n }\n\n return foo.call(foobar) === 'function' && bar.call(foobar) === 'function';\n }).call(this));\n",
+ "strict_only": ""
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/10.5.json b/website/resources/scripts/testcases2/10.5.json
new file mode 100644
index 000000000..b4b357e88
--- /dev/null
+++ b/website/resources/scripts/testcases2/10.5.json
@@ -0,0 +1,46 @@
+{
+ "testCollection": {
+ "name": "10.5",
+ "numTests": 5,
+ "tests": [
+ {
+ "id": "10.5-1-s",
+ "path": "TestCases/chapter10/10.5/10.5-1-s.js",
+ "description": "Strict Mode - arguments object is immutable",
+ "test": "assertTrue((function testcase() {\n \"use strict\";\n try {\n (function fun() {\n eval(\"arguments = 10\");\n })(30);\n return false;\n } catch (e) {\n return (e instanceof SyntaxError);\n }\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict())",
+ "strict_only": ""
+ },
+ {
+ "id": "10.5-7-b-1-s",
+ "path": "TestCases/chapter10/10.5/10.5-7-b-1-s.js",
+ "description": "Strict Mode - arguments object is immutable in eval'ed functions",
+ "test": "assertTrue((function testcase() {\n \"use strict\";\n\n try {\n eval(\"(function _10_5_7_b_1_fun() { arguments = 10;} ());\");\n return false;\n } catch (e) {\n return e instanceof SyntaxError;\n }\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict())",
+ "strict_only": ""
+ },
+ {
+ "id": "10.5-7-b-2-s",
+ "path": "TestCases/chapter10/10.5/10.5-7-b-2-s.js",
+ "description": "Strict Mode - arguments object index assignment is disallowed",
+ "test": "assertTrue((function testcase() {\n \"use strict\";\n\n function _10_5_7_b_2_fun() {\n arguments[7] = 12;\n return arguments[7] === 12;\n };\n\n return _10_5_7_b_2_fun(30);\n }).call(this));\n",
+ "strict_only": ""
+ },
+ {
+ "id": "10.5-7-b-3-s",
+ "path": "TestCases/chapter10/10.5/10.5-7-b-3-s.js",
+ "description": "Strict Mode - Adding property to the arguments object successful under strict mode ",
+ "test": "assertTrue((function testcase() {\n \"use strict\";\n\n function _10_5_7_b_3_fun() {\n arguments[1] = 12;\n return arguments[0] = 30 && arguments[1] === 12;\n };\n\n return _10_5_7_b_3_fun(30);\n }).call(this));\n",
+ "strict_only": ""
+ },
+ {
+ "id": "10.5-7-b-4-s",
+ "path": "TestCases/chapter10/10.5/10.5-7-b-4-s.js",
+ "description": "Strict Mode - Deleting property of the arguments object successful under strict mode",
+ "test": "assertTrue((function testcase() {\n \"use strict\";\n\n function _10_5_7_b_4_fun() {\n var _10_5_7_b_4_1 = arguments[0] === 30 && arguments[1] === 12;\n delete arguments[1];\n var _10_5_7_b_4_2 = arguments[0] === 30 && typeof arguments[1] === \"undefined\";\n return _10_5_7_b_4_1 && _10_5_7_b_4_2;\n };\n return _10_5_7_b_4_fun(30, 12);\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict())",
+ "strict_only": ""
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/10.6.json b/website/resources/scripts/testcases2/10.6.json
new file mode 100644
index 000000000..931934dd0
--- /dev/null
+++ b/website/resources/scripts/testcases2/10.6.json
@@ -0,0 +1,195 @@
+{
+ "testCollection": {
+ "name": "10.6",
+ "numTests": 26,
+ "tests": [
+ {
+ "id": "10.6-10-c-ii-1-s",
+ "path": "TestCases/chapter10/10.6/10.6-10-c-ii-1-s.js",
+ "description": "arguments[i] remains same after changing actual parameters in strict mode",
+ "test": "assertTrue((function testcase() {\n function foo(a,b,c)\n {\n 'use strict';\n a = 1; b = 'str'; c = 2.1;\n return (arguments[0] === 10 && arguments[1] === 'sss' && arguments[2] === 1);\n }\n return foo(10, 'sss', 1);\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict())",
+ "strict_only": ""
+ },
+ {
+ "id": "10.6-10-c-ii-1",
+ "path": "TestCases/chapter10/10.6/10.6-10-c-ii-1.js",
+ "description": "arguments[i] change with actual parameters",
+ "test": "assertTrue((function testcase() {\n function foo(a,b,c)\n {\n a = 1; b = 'str'; c = 2.1;\n if(arguments[0] === 1 && arguments[1] === 'str' && arguments[2] === 2.1)\n return true; \n }\n return foo(10,'sss',1);\n }).call(this));\n"
+ },
+ {
+ "id": "10.6-10-c-ii-2-s",
+ "path": "TestCases/chapter10/10.6/10.6-10-c-ii-2-s.js",
+ "description": "arguments[i] doesn't map to actual parameters in strict mode",
+ "test": "assertTrue((function testcase() {\n \n function foo(a,b,c)\n {\n 'use strict'; \n arguments[0] = 1; arguments[1] = 'str'; arguments[2] = 2.1;\n return 10 === a && 'sss' === b && 1 === c;\n }\n return foo(10,'sss',1);\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict())",
+ "strict_only": ""
+ },
+ {
+ "id": "10.6-10-c-ii-2",
+ "path": "TestCases/chapter10/10.6/10.6-10-c-ii-2.js",
+ "description": "arguments[i] map to actual parameter",
+ "test": "assertTrue((function testcase() {\n \n function foo(a,b,c)\n {\n arguments[0] = 1; arguments[1] = 'str'; arguments[2] = 2.1;\n if(1 === a && 'str' === b && 2.1 === c)\n return true; \n }\n return foo(10,'sss',1);\n }).call(this));\n"
+ },
+ {
+ "id": "10.6-11-b-1",
+ "path": "TestCases/chapter10/10.6/10.6-11-b-1.js",
+ "description": "Arguments Object has index property '0' as its own property, it shoulde be writable, enumerable, configurable and does not invoke the setter defined on Object.prototype[0] (Step 11.b)",
+ "test": "assertTrue((function testcase() {\n try {\n var data = \"data\";\n var getFunc = function () {\n return data;\n };\n\n var setFunc = function (value) {\n data = value;\n };\n\n Object.defineProperty(Object.prototype, \"0\", {\n get: getFunc,\n set: setFunc,\n configurable: true\n });\n\n var argObj = (function () { return arguments })(1);\n\n var verifyValue = false;\n verifyValue = (argObj[0] === 1);\n\n var verifyEnumerable = false;\n for (var p in argObj) {\n if (p === \"0\" && argObj.hasOwnProperty(\"0\")) {\n verifyEnumerable = true;\n }\n }\n\n var verifyWritable = false;\n argObj[0] = 1001;\n verifyWritable = (argObj[0] === 1001);\n\n var verifyConfigurable = false;\n delete argObj[0];\n verifyConfigurable = argObj.hasOwnProperty(\"0\");\n\n return verifyValue && verifyWritable && verifyEnumerable && !verifyConfigurable && data === \"data\";\n } finally {\n delete Object.prototype[0];\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "10.6-12-1",
+ "path": "TestCases/chapter10/10.6/10.6-12-1.js",
+ "description": "Accessing callee property of Arguments object is allowed",
+ "test": "assertTrue((function testcase() {\n try \n {\n arguments.callee;\n return true;\n }\n catch (e) {\n }\n }).call(this));\n"
+ },
+ {
+ "id": "10.6-12-2",
+ "path": "TestCases/chapter10/10.6/10.6-12-2.js",
+ "description": "arguments.callee has correct attributes",
+ "test": "assertTrue((function testcase() {\n \n var desc = Object.getOwnPropertyDescriptor(arguments,\"callee\");\n if(desc.configurable === true &&\n desc.enumerable === false &&\n desc.writable === true &&\n desc.hasOwnProperty('get') == false &&\n desc.hasOwnProperty('put') == false)\n return true; \n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "10.6-13-1",
+ "path": "TestCases/chapter10/10.6/10.6-13-1.js",
+ "description": "Accessing caller property of Arguments object is allowed",
+ "test": "assertTrue((function testcase() {\n try \n {\n arguments.caller;\n return true;\n }\n catch (e) {\n }\n }).call(this));\n"
+ },
+ {
+ "id": "10.6-13-a-1",
+ "path": "TestCases/chapter10/10.6/10.6-13-a-1.js",
+ "description": "In non-strict mode, arguments object should have its own 'callee' property defined (Step 13.a)",
+ "test": "assertTrue((function testcase() {\n try {\n Object.defineProperty(Object.prototype, \"callee\", {\n value: 1,\n writable: false,\n configurable: true\n });\n\n var argObj = (function () { return arguments })();\n\n var verifyValue = false;\n verifyValue = typeof argObj.callee === \"function\";\n \n var verifyWritable = false;\n argObj.callee = 1001;\n verifyWritable = (argObj.callee === 1001);\n\n var verifyEnumerable = false;\n for (var p in argObj) {\n if (p === \"callee\" && argObj.hasOwnProperty(\"callee\")) {\n verifyEnumerable = true;\n }\n }\n\n var verifyConfigurable = false;\n delete argObj.callee;\n verifyConfigurable = argObj.hasOwnProperty(\"callee\");\n\n return verifyValue && verifyWritable && !verifyEnumerable && !verifyConfigurable;\n } finally {\n delete Object.prototype.callee;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "10.6-13-b-1-s",
+ "path": "TestCases/chapter10/10.6/10.6-13-b-1-s.js",
+ "description": "Accessing caller property of Arguments object throws TypeError in strict mode",
+ "test": "assertTrue((function testcase() {\n 'use strict';\n try \n {\n arguments.caller;\n }\n catch (e) {\n if(e instanceof TypeError)\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict())",
+ "strict_only": ""
+ },
+ {
+ "id": "10.6-13-b-2-s",
+ "path": "TestCases/chapter10/10.6/10.6-13-b-2-s.js",
+ "description": "arguments.caller exists in strict mode",
+ "test": "assertTrue((function testcase() {\n \n 'use strict'; \n var desc = Object.getOwnPropertyDescriptor(arguments,\"caller\");\n return desc!== undefined;\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict())",
+ "strict_only": ""
+ },
+ {
+ "id": "10.6-13-b-3-s",
+ "path": "TestCases/chapter10/10.6/10.6-13-b-3-s.js",
+ "description": "arguments.caller is non-configurable in strict mode",
+ "test": "assertTrue((function testcase() {\n \n 'use strict'; \n var desc = Object.getOwnPropertyDescriptor(arguments,\"caller\");\n \n return (desc.configurable === false && \n desc.enumerable === false && \n desc.hasOwnProperty('value') == false && \n desc.hasOwnProperty('writable') == false &&\n desc.hasOwnProperty('get') == true && \n desc.hasOwnProperty('set') == true); \n \n }).call(this));\n",
+ "precondition": "(fnSupportsStrict())",
+ "strict_only": ""
+ },
+ {
+ "id": "10.6-13-c-1-s",
+ "path": "TestCases/chapter10/10.6/10.6-13-c-1-s.js",
+ "description": "Accessing callee property of Arguments object throws TypeError in strict mode",
+ "test": "assertTrue((function testcase() {\n 'use strict';\n try \n {\n arguments.callee;\n return false;\n }\n catch (e) {\n return (e instanceof TypeError);\n }\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict())",
+ "strict_only": ""
+ },
+ {
+ "id": "10.6-13-c-2-s",
+ "path": "TestCases/chapter10/10.6/10.6-13-c-2-s.js",
+ "description": "arguments.callee is exists in strict mode",
+ "test": "assertTrue((function testcase() {\n \n 'use strict'; \n var desc = Object.getOwnPropertyDescriptor(arguments,\"callee\");\n return desc !== undefined;\n }).call(this));\n",
+ "strict_only": ""
+ },
+ {
+ "id": "10.6-13-c-3-s",
+ "path": "TestCases/chapter10/10.6/10.6-13-c-3-s.js",
+ "description": "arguments.callee is non-configurable in strict mode",
+ "test": "assertTrue((function testcase() {\n \n 'use strict'; \n var desc = Object.getOwnPropertyDescriptor(arguments,\"callee\");\n return (desc.configurable === false &&\n desc.enumerable === false &&\n desc.hasOwnProperty('value') == false &&\n desc.hasOwnProperty('writable') == false &&\n desc.hasOwnProperty('get') == true &&\n desc.hasOwnProperty('set') == true);\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict())",
+ "strict_only": ""
+ },
+ {
+ "id": "10.6-14-1-s",
+ "path": "TestCases/chapter10/10.6/10.6-14-1-s.js",
+ "description": "Strict Mode - 'callee' exists and 'caller' exists under strict mode",
+ "test": "assertTrue((function testcase() {\n \"use strict\";\n var argObj = function () {\n return arguments;\n } ();\n return argObj.hasOwnProperty(\"callee\") && argObj.hasOwnProperty(\"caller\");\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict())",
+ "strict_only": ""
+ },
+ {
+ "id": "10.6-14-b-1-s",
+ "path": "TestCases/chapter10/10.6/10.6-14-b-1-s.js",
+ "description": "Strict Mode - [[Enumerable]] attribute value in 'caller' is false under strict mode",
+ "test": "assertTrue((function testcase() {\n \"use strict\";\n\n var argObj = function () {\n return arguments;\n } ();\n\n var verifyEnumerable = false;\n for (var _10_6_14_b_1 in argObj) {\n if (argObj.hasOwnProperty(_10_6_14_b_1) && _10_6_14_b_1 === \"caller\") {\n verifyEnumerable = true;\n }\n }\n return !verifyEnumerable && argObj.hasOwnProperty(\"caller\");\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict())",
+ "strict_only": ""
+ },
+ {
+ "id": "10.6-14-b-4-s",
+ "path": "TestCases/chapter10/10.6/10.6-14-b-4-s.js",
+ "description": "Strict Mode - TypeError is thrown when accessing the [[Set]] attribute in 'caller' under strict mode",
+ "test": "assertTrue((function testcase() {\n \"use strict\";\n\n var argObj = function () {\n return arguments;\n } ();\n\n try {\n argObj.caller = {};\n return false;\n } catch (e) {\n return e instanceof TypeError;\n }\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict())",
+ "strict_only": ""
+ },
+ {
+ "id": "10.6-14-c-1-s",
+ "path": "TestCases/chapter10/10.6/10.6-14-c-1-s.js",
+ "description": "Strict Mode - [[Enumerable]] attribute value in 'callee' is false under strict mode",
+ "test": "assertTrue((function testcase() {\n \"use strict\";\n\n var argObj = function () {\n return arguments;\n } ();\n\n var verifyEnumerable = false;\n for (var _10_6_14_c_1 in argObj) {\n if (argObj.hasOwnProperty(_10_6_14_c_1) && _10_6_14_c_1 === \"callee\") {\n verifyEnumerable = true;\n }\n }\n return !verifyEnumerable && argObj.hasOwnProperty(\"callee\");\n }).call(this));\n",
+ "strict_only": ""
+ },
+ {
+ "id": "10.6-14-c-4-s",
+ "path": "TestCases/chapter10/10.6/10.6-14-c-4-s.js",
+ "description": "Strict Mode - TypeError is thrown when accessing the [[Set]] attribute in 'callee' under strict mode",
+ "test": "assertTrue((function testcase() {\n \"use strict\";\n\n var argObj = function () {\n return arguments;\n } ();\n\n try {\n argObj.callee = {};\n return false;\n } catch (e) {\n return e instanceof TypeError;\n }\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict())",
+ "strict_only": ""
+ },
+ {
+ "id": "10.6-5-1",
+ "path": "TestCases/chapter10/10.6/10.6-5-1.js",
+ "description": "[[Prototype]] property of Arguments is set to Object prototype object",
+ "test": "assertTrue((function testcase() {\n if(Object.getPrototypeOf(arguments) === Object.getPrototypeOf({}))\n return true;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getPrototypeOf))"
+ },
+ {
+ "id": "10.6-6-1",
+ "path": "TestCases/chapter10/10.6/10.6-6-1.js",
+ "description": "'length property of arguments object exists",
+ "test": "assertTrue((function testcase() {\n \n var desc = Object.getOwnPropertyDescriptor(arguments,\"length\");\n return desc !== undefined\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "10.6-6-2",
+ "path": "TestCases/chapter10/10.6/10.6-6-2.js",
+ "description": "'length' property of arguments object has correct attributes",
+ "test": "assertTrue((function testcase() {\n \n var desc = Object.getOwnPropertyDescriptor(arguments,\"length\");\n if(desc.configurable === true &&\n desc.enumerable === false &&\n desc.writable === true )\n return true;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "10.6-6-3",
+ "path": "TestCases/chapter10/10.6/10.6-6-3.js",
+ "description": "'length' property of arguments object for 0 argument function exists",
+ "test": "assertTrue((function testcase() {\n var arguments= undefined;\n\treturn (function () {return arguments.length !== undefined})();\n }).call(this));\n"
+ },
+ {
+ "id": "10.6-6-4",
+ "path": "TestCases/chapter10/10.6/10.6-6-4.js",
+ "description": "'length' property of arguments object for 0 argument function call is 0 even with formal parameters",
+ "test": "assertTrue((function testcase() {\n var arguments= undefined;\n\treturn (function (a,b,c) {return arguments.length === 0})();\n }).call(this));\n"
+ },
+ {
+ "id": "10.6-7-1",
+ "path": "TestCases/chapter10/10.6/10.6-7-1.js",
+ "description": "Arguments Object has length as its own property and does not invoke the setter defined on Object.prototype.length (Step 7)",
+ "test": "assertTrue((function testcase() {\n try {\n var data = \"data\";\n var getFunc = function () {\n return 12;\n };\n\n var setFunc = function (value) {\n data = value;\n };\n\n Object.defineProperty(Object.prototype, \"length\", {\n get: getFunc,\n set: setFunc,\n configurable: true\n });\n\n var verifyValue = false;\n var argObj = (function () { return arguments })();\n verifyValue = (argObj.length === 0);\n\n var verifyWritable = false;\n argObj.length = 1001;\n verifyWritable = (argObj.length === 1001);\n\n var verifyEnumerable = false;\n for (var p in argObj) {\n if (p === \"length\") {\n verifyEnumerable = true;\n }\n }\n\n var verifyConfigurable = false;\n delete argObj.length;\n verifyConfigurable = argObj.hasOwnProperty(\"length\");\n\n return verifyValue && verifyWritable && !verifyEnumerable && !verifyConfigurable && data === \"data\";\n } finally {\n delete Object.prototype.length;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/11.1.1_The_this_Keyword.json b/website/resources/scripts/testcases2/11.1.1_The_this_Keyword.json
new file mode 100644
index 000000000..1786a71cf
--- /dev/null
+++ b/website/resources/scripts/testcases2/11.1.1_The_this_Keyword.json
@@ -0,0 +1,45 @@
+{
+ "testCollection": {
+ "name": "11.1.1_The_this_Keyword",
+ "numTests": 6,
+ "tests": [
+ {
+ "section": "11.1.1",
+ "description": "Checking if execution of \"this=1\" fails",
+ "negative": "",
+ "test": "this = 1;\n",
+ "id": "S11.1.1_A1"
+ },
+ {
+ "section": "11.1.1",
+ "description": "Checking if execution of \"this\" and eval(\"this\"), which are in global code, return the global object by using toString function",
+ "test": "//CHECK#1\nif (this.toString() !== toString()) {\n $ERROR('#1: this.toString() === toString(). Actual: ' + (this.toString())); \n}\n\n//CHECK#2\nif (eval(\"this\").toString() !== toString()) {\n $ERROR('#2: eval(\"this\").toString() === toString(). Actual: ' + (this.toString())); \n}\n",
+ "id": "S11.1.1_A2"
+ },
+ {
+ "section": "11.1.1",
+ "description": "Creating function which returns \"this\" or eval(\"this\")",
+ "test": "//CHECK#1\nfunction MyFunction() {return this}\nif (MyFunction() !== this) {\n $ERROR('#1: function MyFunction() {return this} MyFunction() === this. Actual: ' + (MyFunction())); \n}\n\n//CHECK#2\nfunction MyFunction() {return eval(\"this\")}\nif (MyFunction() !== this) {\n $ERROR('#2: function MyFunction() {return eval(\"this\")} MyFunction() === this. Actual: ' + (MyFunction())); \n}\n\n\n",
+ "id": "S11.1.1_A3.1"
+ },
+ {
+ "section": "11.1.1",
+ "description": "Create function. It have property, that returned \"this\"",
+ "test": "//CHECK#1\nfunction MyFunction() {this.THIS = this}\nif ((new MyFunction()).THIS.toString() !== \"[object Object]\") {\n $ERROR('#1: function MyFunction() {this.THIS = this} (new MyFunction()).THIS.toString() !== \"[object Object]\". Actual: ' + ((new MyFunction()).THIS.toString())); \n}\n\n//CHECK#2\nfunction MyFunction() {this.THIS = eval(\"this\")}\nif ((new MyFunction()).THIS.toString() !== \"[object Object]\") {\n $ERROR('#2: function MyFunction() {this.THIS = eval(\"this\")} (new MyFunction()).THIS.toString() !== \"[object Object]\". Actual: ' + ((new MyFunction()).THIS.toString())); \n}\n\n",
+ "id": "S11.1.1_A3.2"
+ },
+ {
+ "section": "11.1.1",
+ "description": "Creating function with new Function() constructor",
+ "test": "//CHECK#1\nvar MyFunction = new Function(\"return this\");\nif (MyFunction() !== this) {\n $ERROR('#1: var MyFunction = new Function(\"return this\"); MyFunction() === this. Actual: ' + (MyFunction())); \n}\n\n//CHECK#2\nvar MyFunction = new Function(\"return eval(\\'this\\')\");\nif (MyFunction() !== this) {\n $ERROR('#2: var MyFunction = new Function(\"return eval(\\'this\\')\"); MyFunction() === this. Actual: ' + (MyFunction())); \n}\n\n\n",
+ "id": "S11.1.1_A4.1"
+ },
+ {
+ "section": "11.1.1",
+ "description": "Creating function by using new Function() constructor. It has the property, which returns \"this\"",
+ "test": "//CHECK#1\nvar MyFunction = new Function(\"this.THIS = this\");\nvar MyObject = new MyFunction();\nif (MyObject.THIS.toString() !== \"[object Object]\") {\n $ERROR('#1: var MyFunction = new Function(\"this.THIS = this\"); var MyObject = new MyFunction(); MyObject.THIS.toString() === \"[object Object]\". Actual: ' + (MyObject.THIS.toString())); \n}\n\n//CHECK#2\nvar MyFunction = new Function(\"this.THIS = eval(\\'this\\')\");\nvar MyObject = new MyFunction();\nif (MyObject.THIS.toString() !== \"[object Object]\") {\n $ERROR('#2: var MyFunction = new Function(\"this.THIS = eval(\\'this\\')\"); var MyObject = new MyFunction(); MyObject.THIS.toString() === \"[object Object]\". Actual: ' + (MyObject.THIS.toString())); \n}\n\n",
+ "id": "S11.1.1_A4.2"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/11.1.2_Identifier_Reference.json b/website/resources/scripts/testcases2/11.1.2_Identifier_Reference.json
new file mode 100644
index 000000000..4c30bea7b
--- /dev/null
+++ b/website/resources/scripts/testcases2/11.1.2_Identifier_Reference.json
@@ -0,0 +1,20 @@
+{
+ "testCollection": {
+ "name": "11.1.2_Identifier_Reference",
+ "numTests": 2,
+ "tests": [
+ {
+ "section": "11.1.2",
+ "description": "Creating variables without defining it",
+ "test": "//CHECK#1\nif (this.x !== undefined) {\n $ERROR('#1: this.x === undefined. Actual: ' + (this.x));\n}\n\n//CHECK#2\nvar object = new Object();\nif (object.prop !== undefined) {\n $ERROR('#2: var object = new Object(); object.prop === undefined. Actual: ' + (object.prop));\n}\n\n//CHECK#3\nthis.y++;\nif (isNaN(y) !== true) {\n $ERROR('#3: this.y++; y === Not-a-Number. Actual: ' + (y));\n}\n",
+ "id": "S11.1.2_A1_T1"
+ },
+ {
+ "section": "11.1.2",
+ "description": "Trying to generate ReferenceError",
+ "test": "//CHECK#1\ntry {\n this.z;\n z;\n $ERROR('#1.1: this.z; z === undefined throw ReferenceError. Actual: ' + (z));\n} catch(e) {\n if ((e instanceof ReferenceError) !== true) {\n $ERROR('#1.2: this.z; z === undefined throw ReferenceError. Actual: ' + (e));\n }\n}\n",
+ "id": "S11.1.2_A1_T2"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/11.1.4.json b/website/resources/scripts/testcases2/11.1.4.json
new file mode 100644
index 000000000..c9724501f
--- /dev/null
+++ b/website/resources/scripts/testcases2/11.1.4.json
@@ -0,0 +1,28 @@
+{
+ "testCollection": {
+ "name": "11.1.4",
+ "numTests": 3,
+ "tests": [
+ {
+ "id": "11.1.4-0",
+ "path": "TestCases/chapter11/11.1/11.1.4/11.1.4-0.js",
+ "description": "elements elided at the end of an array do not contribute to its length",
+ "test": "assertTrue((function testcase() {\n var a = [,];\n if (a.length === 1) {\n return true;\n }\n }).call(this));\n"
+ },
+ {
+ "id": "11.1.4_4-5-1",
+ "path": "TestCases/chapter11/11.1/11.1.4/11.1.4_4-5-1.js",
+ "description": "Initialize array using ElementList (Elisionopt AssignmentExpression) when index property (read-only) exists in Array.prototype (step 5)",
+ "test": "assertTrue((function testcase() {\n try {\n Object.defineProperty(Array.prototype, \"0\", {\n value: 100,\n writable: false,\n configurable: true\n });\n var arr = [101];\n\n return arr.hasOwnProperty(\"0\") && arr[0] === 101;\n } finally {\n delete Array.prototype[0];\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "11.1.4_5-6-1",
+ "path": "TestCases/chapter11/11.1/11.1.4/11.1.4_5-6-1.js",
+ "description": "Initialize array using ElementList (ElementList , Elisionopt AssignmentExpression) when index property (read-only) exists in Array.prototype (step 6)",
+ "test": "assertTrue((function testcase() {\n try {\n Object.defineProperty(Array.prototype, \"1\", {\n value: 100,\n writable: false,\n configurable: true\n });\n var arr = [101, 12];\n\n return arr.hasOwnProperty(\"1\") && arr[1] === 12;\n } finally {\n delete Array.prototype[1];\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/11.1.4_Array_Initialiser.json b/website/resources/scripts/testcases2/11.1.4_Array_Initialiser.json
new file mode 100644
index 000000000..7fe8ee29a
--- /dev/null
+++ b/website/resources/scripts/testcases2/11.1.4_Array_Initialiser.json
@@ -0,0 +1,56 @@
+{
+ "testCollection": {
+ "name": "11.1.4_Array_Initialiser",
+ "numTests": 8,
+ "tests": [
+ {
+ "section": "11.1.4",
+ "description": "Checking various properties of the array defined with expression \"var array = []\"",
+ "test": "var array = [];\n\n//CHECK#1\nif (typeof array !== \"object\") {\n $ERROR('#1: var array = []; typeof array === \"object\". Actual: ' + (typeof array));\n}\n\n//CHECK#2\nif (array instanceof Array !== true) {\n $ERROR('#2: var array = []; array instanceof Array === true');\n}\n\n//CHECK#3\nif (array.toString !== Array.prototype.toString) {\n $ERROR('#3: var array = []; array.toString === Array.prototype.toString. Actual: ' + (array.toString));\n}\n\n//CHECK#4\nif (array.length !== 0) {\n $ERROR('#4: var array = []; array.length === 0. Actual: ' + (array.length));\n}\n",
+ "id": "S11.1.4_A1.1"
+ },
+ {
+ "section": "11.1.4",
+ "description": "Checking various properties the array defined with \"var array = [,,,,,]\"",
+ "test": "var array = [,,,,,];\n\n//CHECK#1\nif (typeof array !== \"object\") {\n $ERROR('#1: var array = [,,,,,]; typeof array === \"object\". Actual: ' + (typeof array));\n}\n\n//CHECK#2\nif (array instanceof Array !== true) {\n $ERROR('#2: var array = [,,,,,]; array instanceof Array === true');\n}\n\n//CHECK#3\nif (array.toString !== Array.prototype.toString) {\n $ERROR('#3: var array = [,,,,,]; array.toString === Array.prototype.toString. Actual: ' + (array.toString));\n}\n\n//CHECK#4\nif (array.length !== 5) {\n $ERROR('#4: var array = [,,,,,]; array.length === 5. Actual: ' + (array.length));\n}\n",
+ "id": "S11.1.4_A1.2"
+ },
+ {
+ "section": "11.1.4",
+ "description": "Checking various properteis and contents of the array defined with \"var array = [1,2,3,4,5]\"",
+ "test": "var array = [1,2,3,4,5];\n\n//CHECK#1\nif (typeof array !== \"object\") {\n $ERROR('#1: var array = [1,2,3,4,5]; typeof array === \"object\". Actual: ' + (typeof array));\n}\n\n//CHECK#2\nif (array instanceof Array !== true) {\n $ERROR('#2: var array = [1,2,3,4,5]; array instanceof Array === true');\n}\n\n//CHECK#3\nif (array.toString !== Array.prototype.toString) {\n $ERROR('#3: var array = [1,2,3,4,5]; array.toString === Array.prototype.toString. Actual: ' + (array.toString));\n}\n\n//CHECK#4\nif (array.length !== 5) {\n $ERROR('#4: var array = [1,2,3,4,5]; array.length === 5. Actual: ' + (array.length));\n}\n\n//CHECK#5\nif (array[0] !== 1) {\n $ERROR('#5: var array = [1,2,3,4,5]; array[0] === 1. Actual: ' + (array[0]));\n}\n\n//CHECK#6\nif (array[1] !== 2) {\n $ERROR('#6: var array = [1,2,3,4,5]; array[1] === 2. Actual: ' + (array[1]));\n}\n\n//CHECK#7\nif (array[2] !== 3) {\n $ERROR('#7: var array = [1,2,3,4,5]; array[2] === 3. Actual: ' + (array[2]));\n}\n\n//CHECK#8\nif (array[3] !== 4) {\n $ERROR('#8: var array = [1,2,3,4,5]; array[3] === 4. Actual: ' + (array[3]));\n}\n\n//CHECK#9\nif (array[4] !== 5) {\n $ERROR('#9: var array = [1,2,3,4,5]; array[4] === 5. Actual: ' + (array[4]));\n}\n",
+ "id": "S11.1.4_A1.3"
+ },
+ {
+ "section": "11.1.4",
+ "description": "Checking various properteis and content of the array defined with \"var array = [,,,1,2]\"",
+ "test": "var array = [,,,1,2];\n\n//CHECK#1\nif (typeof array !== \"object\") {\n $ERROR('#1: var array = [,,,1,2]; typeof array === \"object\". Actual: ' + (typeof array));\n}\n\n//CHECK#2\nif (array instanceof Array !== true) {\n $ERROR('#2: var array = [,,,1,2]; array instanceof Array === true');\n}\n\n//CHECK#3\nif (array.toString !== Array.prototype.toString) {\n $ERROR('#3: var array = [,,,1,2]; array.toString === Array.prototype.toString. Actual: ' + (array.toString));\n}\n\n//CHECK#4\nif (array.length !== 5) {\n $ERROR('#4: var array = [,,,1,2]; array.length === 5. Actual: ' + (array.length));\n}\n\n//CHECK#5\nif (array[0] !== undefined) {\n $ERROR('#5: var array = [,,,1,2]; array[0] === undefined. Actual: ' + (array[0]));\n}\n\n//CHECK#6\nif (array[1] !== undefined) {\n $ERROR('#6: var array = [,,,1,2]; array[1] === undefined. Actual: ' + (array[1]));\n}\n\n//CHECK#7\nif (array[2] !== undefined) {\n $ERROR('#7: var array = [,,,1,2]; array[2] === undefined. Actual: ' + (array[2]));\n}\n\n//CHECK#8\nif (array[3] !== 1) {\n $ERROR('#8: var array = [,,,1,2]; array[3] === 1. Actual: ' + (array[3]));\n}\n\n//CHECK#9\nif (array[4] !== 2) {\n $ERROR('#9: var array = [,,,1,2]; array[4] === 2. Actual: ' + (array[4]));\n}\n",
+ "id": "S11.1.4_A1.4"
+ },
+ {
+ "section": "11.1.4",
+ "description": "Checking various properteis and contents of the array defined with \"var array = [4,5,,,,]\"",
+ "test": "var array = [4,5,,,,];\n\n//CHECK#1\nif (typeof array !== \"object\") {\n $ERROR('#1: var array = [4,5,,,,]; typeof array === \"object\". Actual: ' + (typeof array));\n}\n\n//CHECK#2\nif (array instanceof Array !== true) {\n $ERROR('#2: var array = [4,5,,,,]; array instanceof Array === true');\n}\n\n//CHECK#3\nif (array.toString !== Array.prototype.toString) {\n $ERROR('#3: var array = [4,5,,,,]; array.toString === Array.prototype.toString. Actual: ' + (array.toString));\n}\n\n//CHECK#4\nif (array.length !== 5) {\n $ERROR('#4: var array = [4,5,,,,]; array.length === 5. Actual: ' + (array.length));\n}\n\n//CHECK#5\nif (array[0] !== 4) {\n $ERROR('#5: var array = [4,5,,,,]; array[0] === 4. Actual: ' + (array[0]));\n}\n\n//CHECK#6\nif (array[1] !== 5) {\n $ERROR('#6: var array = [4,5,,,,]; array[1] === 5. Actual: ' + (array[1]));\n}\n\n//CHECK#7\nif (array[2] !== undefined) {\n $ERROR('#7: var array = [4,5,,,,]; array[2] === undefined. Actual: ' + (array[2]));\n}\n\n//CHECK#8\nif (array[3] !== undefined) {\n $ERROR('#8: var array = [4,5,,,,]; array[3] === undefined. Actual: ' + (array[3]));\n}\n\n//CHECK#9\nif (array[4] !== undefined) {\n $ERROR('#9: var array = [4,5,,,,]; array[4] === undefined. Actual: ' + (array[4]));\n}\n",
+ "id": "S11.1.4_A1.5"
+ },
+ {
+ "section": "11.1.4",
+ "description": "Checking various properteis and contents of the array defined with \"var array = [,,3,,,]\"",
+ "test": "var array = [,,3,,,];\n\n//CHECK#1\nif (typeof array !== \"object\") {\n $ERROR('#1: var array = [,,3,,,]; typeof array === \"object\". Actual: ' + (typeof array));\n}\n\n//CHECK#2\nif (array instanceof Array !== true) {\n $ERROR('#2: var array = [,,3,,,]; array instanceof Array === true');\n}\n\n//CHECK#3\nif (array.toString !== Array.prototype.toString) {\n $ERROR('#3: var array = [,,3,,,]; array.toString === Array.prototype.toString. Actual: ' + (array.toString));\n}\n\n//CHECK#4\nif (array.length !== 5) {\n $ERROR('#4: var array = [,,3,,,]; array.length === 5. Actual: ' + (array.length));\n}\n\n//CHECK#5\nif (array[0] !== undefined) {\n $ERROR('#5: var array = [,,3,,,]; array[0] === undefined. Actual: ' + (array[0]));\n}\n\n//CHECK#6\nif (array[1] !== undefined) {\n $ERROR('#6: var array = [,,3,,,]; array[1] === undefined. Actual: ' + (array[1]));\n}\n\n//CHECK#7\nif (array[2] !== 3) {\n $ERROR('#7: var array = [,,3,,,]; array[2] === 3. Actual: ' + (array[2]));\n}\n\n//CHECK#8\nif (array[3] !== undefined) {\n $ERROR('#8: var array = [,,3,,,]; array[3] === undefined. Actual: ' + (array[3]));\n}\n\n//CHECK#9\nif (array[4] !== undefined) {\n $ERROR('#9: var array = [,,3,,,]; array[4] === undefined. Actual: ' + (array[4]));\n}\n",
+ "id": "S11.1.4_A1.6"
+ },
+ {
+ "section": "11.1.4",
+ "description": "Checking various properteis and contents of the array defined with \"var array = [1,2,,4,5]\"",
+ "test": "var array = [1,2,,4,5];\n\n//CHECK#1\nif (typeof array !== \"object\") {\n $ERROR('#1: var array = [1,2,,4,5]; typeof array === \"object\". Actual: ' + (typeof array));\n}\n\n//CHECK#2\nif (array instanceof Array !== true) {\n $ERROR('#2: var array = [1,2,,4,5]; array instanceof Array === true');\n}\n\n//CHECK#3\nif (array.toString !== Array.prototype.toString) {\n $ERROR('#3: var array = [1,2,,4,5]; array.toString === Array.prototype.toString. Actual: ' + (array.toString));\n}\n\n//CHECK#4\nif (array.length !== 5) {\n $ERROR('#4: var array = [1,2,,4,5]; array.length === 5. Actual: ' + (array.length));\n}\n\n//CHECK#5\nif (array[0] !== 1) {\n $ERROR('#5: var array = [1,2,,4,5]; array[0] === 1. Actual: ' + (array[0]));\n}\n\n//CHECK#6\nif (array[1] !== 2) {\n $ERROR('#6: var array = [1,2,,4,5]; array[1] === 2. Actual: ' + (array[1]));\n}\n\n//CHECK#7\nif (array[2] !== undefined) {\n $ERROR('#7: var array = [1,2,,4,5]; array[2] === undefined. Actual: ' + (array[2]));\n}\n\n//CHECK#8\nif (array[3] !== 4) {\n $ERROR('#8: var array = [1,2,,4,5]; array[3] === 4. Actual: ' + (array[3]));\n}\n\n//CHECK#9\nif (array[4] !== 5) {\n $ERROR('#9: var array = [1,2,,4,5]; array[4] === 5. Actual: ' + (array[4]));\n}\n",
+ "id": "S11.1.4_A1.7"
+ },
+ {
+ "section": "11.1.4",
+ "description": "Checking various properteis and contents of the arrya defined with \"var array = [[1,2], [3], []]\"",
+ "test": "var array = [[1,2], [3], []];\n\n//CHECK#1\nif (typeof array !== \"object\") {\n $ERROR('#1: var array = [[1,2], [3], []]; typeof array === \"object\". Actual: ' + (typeof array));\n}\n\n//CHECK#2\nif (array instanceof Array !== true) {\n $ERROR('#2: var array = [[1,2], [3], []]; array instanceof Array === true');\n}\n\n//CHECK#3\nif (array.toString !== Array.prototype.toString) {\n $ERROR('#3: var array = [[1,2], [3], []]; array.toString === Array.prototype.toString. Actual: ' + (array.toString));\n}\n\n//CHECK#4\nif (array.length !== 3) {\n $ERROR('#4: var array = [[1,2], [3], []]; array.length === 3. Actual: ' + (array.length));\n}\n\nvar subarray = array[0];\n\n//CHECK#5\nif (typeof subarray !== \"object\") {\n $ERROR('#5: var array = [[1,2], [3], []]; var subarray = array[0]; typeof subarray === \"object\". Actual: ' + (typeof subarray));\n}\n\n//CHECK#6\nif (subarray instanceof Array !== true) {\n $ERROR('#6: var array = [[1,2], [3], []]; var subarray = array[0]; subarray instanceof Array === true');\n}\n\n//CHECK#7\nif (subarray.toString !== Array.prototype.toString) {\n $ERROR('#7: var array = [[1,2], [3], []]; var subarray = array[0]; subarray.toString === Array.prototype.toString. Actual: ' + (subarray.toString));\n}\n\n//CHECK#8\nif (subarray.length !== 2) {\n $ERROR('#8: var array = [[1,2], [3], []]; var subarray = array[0]; subarray.length === 2. Actual: ' + (subarray.length));\n}\n\n//CHECK#9\nif (subarray[0] !== 1) {\n $ERROR('#9: var array = [[1,2], [3], []]; var subarray = array[0]; subarray[0] === 1. Actual: ' + (subarray[0]));\n}\n\n//CHECK#10\nif (subarray[1] !== 2) {\n $ERROR('#10: var array = [[1,2], [3], []]; var subarray = array[1]; subarray[1] === 2. Actual: ' + (subarray[1]));\n}\n\nvar subarray = array[1];\n\n//CHECK#11\nif (typeof subarray !== \"object\") {\n$ERROR('#11: var array = [[1,2], [3], []]; var subarray = array[1]; typeof subarray === \"object\". Actual: ' + (typeof subarray));\n}\n\n//CHECK#12\nif (subarray instanceof Array !== true) {\n$ERROR('#12: var array = [[1,2], [3], []]; var subarray = array[1]; subarray instanceof Array === true');\n}\n\n//CHECK#13\nif (subarray.toString !== Array.prototype.toString) {\n$ERROR('#13: var array = [[1,2], [3], []]; var subarray = array[1]; subarray.toString === Array.prototype.toString. Actual: ' + (subarray.toString));\n}\n\n//CHECK#14\nif (subarray.length !== 1) {\n$ERROR('#14: var array = [[1,2], [3], []]; var subarray = array[1]; subarray.length === 1. Actual: ' + (subarray.length));\n}\n\n//CHECK#15\nif (subarray[0] !== 3) {\n$ERROR('#15: var array = [[1,2], [3], []]; var subarray = array[1]; subarray[0] === 3. Actual: ' + (subarray[0]));\n}\n\nvar subarray = array[2];\n\n//CHECK#16\nif (typeof subarray !== \"object\") {\n$ERROR('#16: var array = [[1,2], [3], []]; var subarray = array[2]; typeof subarray === \"object\". Actual: ' + (typeof subarray));\n}\n\n//CHECK#17\nif (subarray instanceof Array !== true) {\n$ERROR('#17: var array = [[1,2], [3], []]; var subarray = array[2]; subarray instanceof Array === true');\n}\n\n//CHECK#18\nif (subarray.toString !== Array.prototype.toString) {\n$ERROR('#18: var array = [[1,2], [3], []]; var subarray = array[2]; subarray.toString === Array.prototype.toString. Actual: ' + (subarray.toString));\n}\n\n//CHECK#19\nif (subarray.length !== 0) {\n$ERROR('#19: var array = [[1,2], [3], []]; var subarray = array[2]; subarray.length === 0. Actual: ' + (subarray.length));\n}\n\n//CHECK#20\nif (array[0][0] !== 1) {\n $ERROR('#20: var array = [[1,2], [3], []]; array[0][0] === 1. Actual: ' + (array[0][0]));\n}\n\n//CHECK#21\nif (array[0][1] !== 2) {\n $ERROR('#21: var array = [[1,2], [3], []]; array[0][1] === 2. Actual: ' + (array[0][1]));\n}\n\n//CHECK#22\nif (array[1][0] !== 3) {\n $ERROR('#722: var array = [[1,2], [3], []]; array[1][0] === 3. Actual: ' + (array[1][0]));\n}\n",
+ "id": "S11.1.4_A2"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/11.1.5.json b/website/resources/scripts/testcases2/11.1.5.json
new file mode 100644
index 000000000..fd2665274
--- /dev/null
+++ b/website/resources/scripts/testcases2/11.1.5.json
@@ -0,0 +1,209 @@
+{
+ "testCollection": {
+ "name": "11.1.5",
+ "numTests": 28,
+ "tests": [
+ {
+ "id": "11.1.5-0-1",
+ "path": "TestCases/chapter11/11.1/11.1.5/11.1.5-0-1.js",
+ "description": "Object literal - get set property",
+ "test": "assertTrue((function testcase() {\n var s1 = \"In getter\";\n var s2 = \"In setter\";\n var s3 = \"Modified by setter\";\n eval(\"var o = {get foo(){ return s1;},set foo(arg){return s2 = s3}};\");\n if(o.foo !== s1) \n return false;\n o.foo=10;\n if(s2 !== s3) \n return false;\n return true;\n }).call(this));\n"
+ },
+ {
+ "id": "11.1.5-0-2",
+ "path": "TestCases/chapter11/11.1/11.1.5/11.1.5-0-2.js",
+ "description": "Object literal - multiple get set properties",
+ "test": "assertTrue((function testcase() {\n var s1 = \"First getter\";\n var s2 = \"First setter\";\n var s3 = \"Second getter\";\n eval(\"var o = {get foo(){ return s1;},set foo(arg){return s2 = s3}, get bar(){ return s3}, set bar(arg){ s3 = arg;}};\");\n if(o.foo !== s1) \n return false;\n o.foo = 10;\n if(s2 !== s3) \n return false;\n if(o.bar !== s3)\n return false;\n o.bar = \"Second setter\";\n if(o.bar !== \"Second setter\")\n return false;\n return true;\n }).call(this));\n"
+ },
+ {
+ "id": "11.1.5-1-s",
+ "path": "TestCases/chapter11/11.1/11.1.5/11.1.5-1-s.js",
+ "description": "Strict Mode - SyntaxError is thrown when 'eval' occurs as the Identifier in a PropertySetParameterList of a PropertyAssignment that is contained in strict code",
+ "test": "assertTrue((function testcase() {\n \"use strict\";\n\n try {\n eval(\"var obj = {set _11_1_5_1_fun(eval) {}};\");\n return false;\n } catch (e) {\n return (e instanceof SyntaxError);\n }\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict())",
+ "strict_only": ""
+ },
+ {
+ "id": "11.1.5-2-s",
+ "path": "TestCases/chapter11/11.1/11.1.5/11.1.5-2-s.js",
+ "description": "Strict Mode - SyntaxError is thrown when 'arguments' occurs as the Identifier in a PropertySetParameterList of a PropertyAssignment that is contained in strict code",
+ "test": "assertTrue((function testcase() {\n \"use strict\";\n\n try {\n eval(\"var obj = {set _11_1_5_2_fun(arguments) {} };\");\n return false;\n } catch (e) {\n return (e instanceof SyntaxError);\n }\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict())",
+ "strict_only": ""
+ },
+ {
+ "id": "11.1.5-3-s",
+ "path": "TestCases/chapter11/11.1/11.1.5/11.1.5-3-s.js",
+ "description": "Strict Mode - SyntaxError is thrown when 'evals' occurs as the Identifier in a PropertySetParameterList of a PropertyAssignment if its FunctionBody is strict code",
+ "test": "assertTrue((function testcase() {\n\n try {\n eval(\"var obj = {set _11_1_5_3_fun(eval) { \\\"use strict\\\"; }};\");\n return false;\n } catch (e) {\n return (e instanceof SyntaxError);\n }\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict())",
+ "strict_only": ""
+ },
+ {
+ "id": "11.1.5-4-4-a-1-s",
+ "path": "TestCases/chapter11/11.1/11.1.5/11.1.5-4-4-a-1-s.js",
+ "description": "Object literal - SyntaxError for duplicate date property name in strict mode",
+ "test": "assertTrue((function testcase() {\n \n try\n {\n eval(\"'use strict'; ({foo:0,foo:1});\");\n return false;\n }\n catch(e)\n {\n return (e instanceof SyntaxError);\n }\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict())",
+ "strict_only": ""
+ },
+ {
+ "id": "11.1.5-4-s",
+ "path": "TestCases/chapter11/11.1/11.1.5/11.1.5-4-s.js",
+ "description": "Strict Mode - SyntaxError is thrown when 'arguments' occurs as the Identifier in a PropertySetParameterList of a PropertyAssignment if its FunctionBody is strict code",
+ "test": "assertTrue((function testcase() {\n\n try {\n eval(\"var obj = {set _11_1_5_4_fun(arguments) {\\\"use strict\\\";}};\");\n return false;\n } catch (e) {\n return (e instanceof SyntaxError);\n }\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict())",
+ "strict_only": ""
+ },
+ {
+ "id": "11.1.5_3-3-1",
+ "path": "TestCases/chapter11/11.1/11.1.5/11.1.5_3-3-1.js",
+ "description": "Object initialization using PropertyNameAndValueList (PropertyAssignment) when property (read-only) exists in Object.prototype (step 3)",
+ "test": "assertTrue((function testcase() {\n try {\n Object.defineProperty(Object.prototype, \"prop\", {\n value: 100,\n writable: false,\n configurable: true\n });\n var obj = { prop: 12 };\n\n return obj.hasOwnProperty(\"prop\") && obj.prop === 12;\n } finally {\n delete Object.prototype.prop;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "11.1.5_4-4-a-2",
+ "path": "TestCases/chapter11/11.1/11.1.5/11.1.5_4-4-a-2.js",
+ "description": "Object literal - Duplicate data property name allowed if not in strict mode",
+ "test": "assertTrue((function testcase() {\n \n eval(\"({foo:0,foo:1});\");\n return true;\n }).call(this));\n"
+ },
+ {
+ "id": "11.1.5_4-4-a-3",
+ "path": "TestCases/chapter11/11.1/11.1.5/11.1.5_4-4-a-3.js",
+ "description": "Object literal - Duplicate data property name allowed gets last defined value",
+ "test": "assertTrue((function testcase() {\n \n var o = eval(\"({foo:0,foo:1});\");\n return o.foo===1;\n }).call(this));\n"
+ },
+ {
+ "id": "11.1.5_4-4-b-1",
+ "path": "TestCases/chapter11/11.1/11.1.5/11.1.5_4-4-b-1.js",
+ "description": "Object literal - SyntaxError if a data property definition is followed by get accessor definition with the same name",
+ "test": "assertTrue((function testcase() {\n try\n {\n eval(\"({foo : 1, get foo(){}});\");\n return false;\n }\n catch(e)\n {\n return e instanceof SyntaxError;\n }\n }).call(this));\n",
+ "precondition": "(function () {\n //accessor properties in object literals must be allowed\n try {eval(\"({set foo(x) {}, get foo(){}});\");}\n catch(e) {return false}\n return true;\n}).call(this)"
+ },
+ {
+ "id": "11.1.5_4-4-b-2",
+ "path": "TestCases/chapter11/11.1/11.1.5/11.1.5_4-4-b-2.js",
+ "description": "Object literal - SyntaxError if a data property definition is followed by set accessor definition with the same name",
+ "test": "assertTrue((function testcase() {\n try\n {\n eval(\"({foo : 1, set foo(x){}});\");\n return false;\n }\n catch(e)\n {\n return e instanceof SyntaxError;\n }\n }).call(this));\n",
+ "precondition": "(function () {\n //accessor properties in object literals must be allowed\n try {eval(\"({set foo(x) {}, get foo(){}});\");}\n catch(e) {return false}\n return true;\n}).call(this)"
+ },
+ {
+ "id": "11.1.5_4-4-c-1",
+ "path": "TestCases/chapter11/11.1/11.1.5/11.1.5_4-4-c-1.js",
+ "description": "Object literal - SyntaxError if a get accessor property definition is followed by a data property definition with the same name",
+ "test": "assertTrue((function testcase() {\n try\n {\n eval(\"({get foo(){}, foo : 1});\");\n return false;\n }\n catch(e)\n {\n return e instanceof SyntaxError;\n }\n }).call(this));\n",
+ "precondition": "(function () {\n //accessor properties in object literals must be allowed\n try {eval(\"({set foo(x) {}, get foo(){}});\");}\n catch(e) {return false}\n return true;\n}).call(this)"
+ },
+ {
+ "id": "11.1.5_4-4-c-2",
+ "path": "TestCases/chapter11/11.1/11.1.5/11.1.5_4-4-c-2.js",
+ "description": "Object literal - SyntaxError if a set accessor property definition is followed by a data property definition with the same name",
+ "test": "assertTrue((function testcase() {\n try\n {\n eval(\"({set foo(x){}, foo : 1});\");\n return false;\n }\n catch(e)\n {\n return e instanceof SyntaxError;\n }\n }).call(this));\n",
+ "precondition": "(function () {\n //accessor properties in object literals must be allowed\n try {eval(\"({set foo(x) {}, get foo(){}});\");}\n catch(e) {return false};\n return true;\n}).call(this)"
+ },
+ {
+ "id": "11.1.5_4-4-d-1",
+ "path": "TestCases/chapter11/11.1/11.1.5/11.1.5_4-4-d-1.js",
+ "description": "Object literal - SyntaxError for duplicate property name (get,get)",
+ "test": "assertTrue((function testcase() {\n try\n {\n eval(\"({get foo(){}, get foo(){}});\");\n return false;\n }\n catch(e)\n {\n return e instanceof SyntaxError;\n }\n }).call(this));\n",
+ "precondition": "(function () {\n //accessor properties in object literals must be allowed\n try {eval(\"({set foo(x) {}, get foo(){}});\");}\n catch(e) {return false}\n return true;\n}).call(this)"
+ },
+ {
+ "id": "11.1.5_4-4-d-2",
+ "path": "TestCases/chapter11/11.1/11.1.5/11.1.5_4-4-d-2.js",
+ "description": "Object literal - SyntaxError for duplicate property name (set,set)",
+ "test": "assertTrue((function testcase() {\n try\n {\n eval(\"({set foo(arg){}, set foo(arg1){}});\");\n return false;\n }\n catch(e)\n {\n return e instanceof SyntaxError;\n }\n }).call(this));\n",
+ "precondition": "(function () {\n //accessor properties in object literals must be allowed\n try {eval(\"({set foo(x) {}, get foo(){}});\");}\n catch(e) {return false}\n return true;\n}).call(this)"
+ },
+ {
+ "id": "11.1.5_4-4-d-3",
+ "path": "TestCases/chapter11/11.1/11.1.5/11.1.5_4-4-d-3.js",
+ "description": "Object literal - SyntaxError for duplicate property name (get,set,get)",
+ "test": "assertTrue((function testcase() {\n try\n {\n eval(\"({get foo(){}, set foo(arg){}, get foo(){}});\");\n return false;\n }\n catch(e)\n {\n return e instanceof SyntaxError;\n }\n }).call(this));\n",
+ "precondition": "(function () {\n //accessor properties in object literals must be allowed\n try {eval(\"({set foo(x) {}, get foo(){}});\");}\n catch(e) {return false}\n return true;\n}).call(this)"
+ },
+ {
+ "id": "11.1.5_4-4-d-4",
+ "path": "TestCases/chapter11/11.1/11.1.5/11.1.5_4-4-d-4.js",
+ "description": "Object literal - SyntaxError for duplicate property name (set,get,set)",
+ "test": "assertTrue((function testcase() {\n try\n {\n eval(\"({set foo(arg){}, get foo(){}, set foo(arg1){}});\");\n return false;\n }\n catch(e)\n {\n return e instanceof SyntaxError;\n }\n }).call(this));\n",
+ "precondition": "(function () {\n //accessor properties in object literals must be allowed\n try {eval(\"({set foo(x) {}, get foo(){}});\");}\n catch(e) {return false}\n return true;\n}).call(this)"
+ },
+ {
+ "id": "11.1.5_4-5-1",
+ "path": "TestCases/chapter11/11.1/11.1.5/11.1.5_4-5-1.js",
+ "description": "Object initialization using PropertyNameAndValueList (PropertyNameAndValueList , PropertyAssignment) when property (read-only) exists in Object.prototype (Step 5)",
+ "test": "assertTrue((function testcase() {\n try {\n Object.defineProperty(Object.prototype, \"prop2\", {\n value: 100,\n writable: false,\n configurable: true\n });\n\n var obj = { prop1: 101, prop2: 12 };\n\n return obj.hasOwnProperty(\"prop2\");\n } finally {\n delete Object.prototype.prop2;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "11.1.5_5-4-1",
+ "path": "TestCases/chapter11/11.1/11.1.5/11.1.5_5-4-1.js",
+ "description": "Object literal - property descriptor for assignment expression",
+ "test": "assertTrue((function testcase() {\n\n var o = {foo : 1};\n var desc = Object.getOwnPropertyDescriptor(o,\"foo\");\n if(desc.value === 1 &&\n desc.writable === true &&\n desc.enumerable === true &&\n desc.configurable === true)\n return true;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "11.1.5_6-2-1-s",
+ "path": "TestCases/chapter11/11.1/11.1.5/11.1.5_6-2-1-s.js",
+ "description": "Strict Mode - SyntaxError is thrown when an assignment to a reserved word or a future reserved word is contained in strict code",
+ "test": "assertTrue((function testcase() {\n \"use strict\";\n\n try {\n eval(\"var obj = {\\\n get _11_1_5_6_2_1() {\\\n public = 42;\\\n return public;\\\n }\\\n };\");\n\n var _11_1_5_6_2_1 = obj._11_1_5_6_2_1;\n return false;\n } catch (e) {\n return e instanceof SyntaxError;\n }\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict())",
+ "strict_only": ""
+ },
+ {
+ "id": "11.1.5_6-2-2-s",
+ "path": "TestCases/chapter11/11.1/11.1.5/11.1.5_6-2-2-s.js",
+ "description": "Strict Mode - SyntaxError is thrown when an assignment to a reserved word or a future reserved word is made inside a strict mode FunctionBody of a PropertyAssignment",
+ "test": "assertTrue((function testcase() {\n\n try {\n eval(\"var obj = {\\\n get _11_1_5_6_2_2() {\\\n \\\"use strict\\\";\\\n public = 42;\\\n return public;\\\n }\\\n };\\\n var _11_1_5_6_2_2 = obj._11_1_5_6_2_2;\");\n return false;\n } catch (e) {\n return e instanceof SyntaxError;\n }\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict())",
+ "strict_only": ""
+ },
+ {
+ "id": "11.1.5_6-3-1",
+ "path": "TestCases/chapter11/11.1/11.1.5/11.1.5_6-3-1.js",
+ "description": "Object literal - property descriptor for get property assignment",
+ "test": "assertTrue((function testcase() {\n\n eval(\"var o = {get foo(){return 1;}};\");\n var desc = Object.getOwnPropertyDescriptor(o,\"foo\");\n if(desc.enumerable === true &&\n desc.configurable === true)\n return true;\n }).call(this));\n",
+ "precondition": "(function () {\n //accessor properties in object literals must be allowed\n try {eval(\"({set foo(x) {}, get foo(){}});\");}\n catch(e) {return false}\n return fnExists(Object.getOwnPropertyDescriptor);\n}).call(this)"
+ },
+ {
+ "id": "11.1.5_6-3-2",
+ "path": "TestCases/chapter11/11.1/11.1.5/11.1.5_6-3-2.js",
+ "description": "Object literal - property descriptor for get property assignment should not create a set function",
+ "test": "assertTrue((function testcase() {\n\n eval(\"var o = {get foo(){return 1;}};\");\n var desc = Object.getOwnPropertyDescriptor(o,\"foo\");\n return desc.set === undefined\n }).call(this));\n",
+ "precondition": "(function () {\n //accessor properties in object literals must be allowed\n try {eval(\"({set foo(x) {}, get foo(){}});\");}\n catch(e) {return false}\n return fnExists(Object.getOwnPropertyDescriptor);;\n}).call(this)"
+ },
+ {
+ "id": "11.1.5_7-2-1-s",
+ "path": "TestCases/chapter11/11.1/11.1.5/11.1.5_7-2-1-s.js",
+ "description": "Strict Mode - SyntaxError is thrown when an assignment to a reserved word is contained in strict code",
+ "test": "assertTrue((function testcase() {\n \"use strict\";\n\n try {\n eval(\"var data = \\\"data\\\";\\\n var obj = {\\\n set _11_1_5_7_2_1(value) {\\\n public = 42;\\\n data = value;\\\n }\\\n };\\\n obj._11_1_5_7_2_1 = 1;\");\n return false;\n } catch (e) {\n return e instanceof SyntaxError;\n }\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict())",
+ "strict_only": ""
+ },
+ {
+ "id": "11.1.5_7-2-2-s",
+ "path": "TestCases/chapter11/11.1/11.1.5/11.1.5_7-2-2-s.js",
+ "description": "Strict Mode - SyntaxError is thrown when an assignment to a reserved word is made in a strict FunctionBody of a PropertyAssignment",
+ "test": "assertTrue((function testcase() {\n \"use strict\";\n\n try {\n eval(\"var data = \\\"data\\\";\\\n var obj = {\\\n set _11_1_5_7_2_2(value) {\\\n public = 42;\\\n data = value;\\\n }\\\n };\\\n obj._11_1_5_7_2_2 = 1;\");\n return false;\n } catch (e) {\n return e instanceof SyntaxError;\n }\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict())",
+ "strict_only": ""
+ },
+ {
+ "id": "11.1.5_7-3-1",
+ "path": "TestCases/chapter11/11.1/11.1.5/11.1.5_7-3-1.js",
+ "description": "Object literal - property descriptor for set property assignment",
+ "test": "assertTrue((function testcase() {\n\n eval(\"var o = {set foo(arg){return 1;}};\");\n var desc = Object.getOwnPropertyDescriptor(o,\"foo\");\n if(desc.enumerable === true &&\n desc.configurable === true)\n return true;\n }).call(this));\n",
+ "precondition": "(function () {\n //accessor properties in object literals must be allowed\n try {eval(\"({set foo(x) {}, get foo(){}});\");}\n catch(e) {return false}\n return fnExists(Object.getOwnPropertyDescriptor);;\n}).call(this)"
+ },
+ {
+ "id": "11.1.5_7-3-2",
+ "path": "TestCases/chapter11/11.1/11.1.5/11.1.5_7-3-2.js",
+ "description": "Object literal - property descriptor for set property assignment should not create a get function",
+ "test": "assertTrue((function testcase() {\n\n eval(\"var o = {set foo(arg){}};\");\n var desc = Object.getOwnPropertyDescriptor(o,\"foo\");\n return desc.get === undefined\n }).call(this));\n",
+ "precondition": "(function () {\n //accessor properties in object literals must be allowed\n try {eval(\"({set foo(x) {}, get foo(){}});\");}\n catch(e) {return false}\n return fnExists(Object.getOwnPropertyDescriptor);;\n}).call(this)"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/11.1.5_Object_Initializer.json b/website/resources/scripts/testcases2/11.1.5_Object_Initializer.json
new file mode 100644
index 000000000..f1c8bc3e0
--- /dev/null
+++ b/website/resources/scripts/testcases2/11.1.5_Object_Initializer.json
@@ -0,0 +1,64 @@
+{
+ "testCollection": {
+ "name": "11.1.5_Object_Initializer",
+ "numTests": 9,
+ "tests": [
+ {
+ "section": "11.1.5",
+ "description": "Checking various properteis of the object defined with \"var object = {}\"",
+ "test": "var object = {};\n\n//CHECK#1\nif (typeof object !== \"object\") {\n $ERROR('#1: var object = {}; typeof object === \"object\". Actual: ' + (typeof object));\n}\n\n//CHECK#2\nif (object instanceof Object !== true) {\n $ERROR('#2: var object = {}; object instanceof Object === true');\n}\n\n//CHECK#3\nif (object.toString !== Object.prototype.toString) {\n $ERROR('#3: var object = {}; object.toString === Object.prototype.toString. Actual: ' + (object.toString));\n}\n\n//CHECK#4\nif (object.toString() !== \"[object Object]\") {\n $ERROR('#4: var object = {}; object.toString === \"[object Object]\". Actual: ' + (object.toString));\n}\n",
+ "id": "S11.1.5_A1.1"
+ },
+ {
+ "section": "11.1.5",
+ "description": "Checking various properteis and contents of the object defined with \"var object = {1 : true}\"",
+ "test": "var object = {1 : true};\n\n//CHECK#1\nif (typeof object !== \"object\") {\n $ERROR('#1: var object = {1 : true}; typeof object === \"object\". Actual: ' + (typeof object));\n}\n\n//CHECK#2\nif (object instanceof Object !== true) {\n $ERROR('#2: var object = {1 : true}; object instanceof Object === true');\n}\n\n//CHECK#3\nif (object.toString !== Object.prototype.toString) {\n $ERROR('#3: var object = {1 : true}; object.toString === Object.prototype.toString. Actual: ' + (object.toString));\n}\n\n//CHECK#4\nif (object[1] !== true) {\n $ERROR('#4: var object = {1 : true}; object[1] === true');\n}\n\n//CHECK#5\nif (object[\"1\"] !== true) {\n $ERROR('#5: var object = {1 : true}; object[\"1\"] === true');\n}\n\n",
+ "id": "S11.1.5_A1.2"
+ },
+ {
+ "section": "11.1.5",
+ "description": "Checking various properteis and contents of the object defined with \"var object = {\"x\" : true}\"",
+ "test": "var object = {\"x\" : true};\n\n//CHECK#1\nif (typeof object !== \"object\") {\n $ERROR('#1: var object = {\"x\" : true}; typeof object === \"object\". Actual: ' + (typeof object));\n}\n\n//CHECK#2\nif (object instanceof Object !== true) {\n $ERROR('#2: var object = {\"x\" : true}; object instanceof Object === true');\n}\n\n//CHECK#3\nif (object.toString !== Object.prototype.toString) {\n $ERROR('#3: var object = {\"x\" : true}; object.toString === Object.prototype.toString. Actual: ' + (object.toString));\n}\n\n//CHECK#4\nif (object[\"x\"] !== true) {\n $ERROR('#4: var object = {\"x\" : true}; object[\"x\"] === true');\n}\n\n//CHECK#5\nif (object.x !== true) {\n $ERROR('#5: var object = {\"x\" : true}; object.x === true');\n}\n",
+ "id": "S11.1.5_A1.3"
+ },
+ {
+ "section": "11.1.5",
+ "description": "Checking various properteis and contents of the object defined with \"var object = {prop : true}\"",
+ "test": "var object = {prop : true};\n\n//CHECK#1\nif (typeof object !== \"object\") {\n $ERROR('#1: var object = {prop : true}; typeof object === \"object\". Actual: ' + (typeof object));\n}\n\n//CHECK#2\nif (object instanceof Object !== true) {\n $ERROR('#2: var object = {prop : true}; object instanceof Object === true');\n}\n\n//CHECK#3\nif (object.toString !== Object.prototype.toString) {\n $ERROR('#3: var object = {prop : true}; object.toString === Object.prototype.toString. Actual: ' + (object.toString));\n}\n\n//CHECK#4\nif (object[\"prop\"] !== true) {\n $ERROR('#4: var object = {prop : true}; object[\"prop\"] === true');\n}\n\n//CHECK#5\nif (object.prop !== true) {\n $ERROR('#5: var object = {prop : true}; object.prop === true');\n}\n",
+ "id": "S11.1.5_A1.4"
+ },
+ {
+ "section": "11.1.5",
+ "description": "Creating property \"prop\" of various types(boolean, number and etc.)",
+ "test": "//CHECK#1\nvar x = true;\nvar object = {prop : x}; \nif (object.prop !== x) {\n $ERROR('#1: var x = true; var object = {prop : x}; object.prop === x. Actual: ' + (object.prop));\n}\n\n//CHECK#2\nvar x = new Boolean(true);\nvar object = {prop : x}; \nif (object.prop !== x) {\n $ERROR('#2: var x = new Boolean(true); var object = {prop : x}; object.prop === x. Actual: ' + (object.prop));\n}\n\n//CHECK#3\nvar x = 1;\nvar object = {prop : x}; \nif (object.prop !== x) {\n $ERROR('#3: var x = 1; var object = {prop : x}; object.prop === x. Actual: ' + (object.prop));\n}\n\n//CHECK#4\nvar x = new Number(1);\nvar object = {prop : x}; \nif (object.prop !== x) {\n $ERROR('#4: var x = new Number(1); var object = {prop : x}; object.prop === x. Actual: ' + (object.prop));\n}\n\n//CHECK#5\nvar x = \"1\";\nvar object = {prop : x}; \nif (object.prop !== x) {\n $ERROR('#5: var x = \"1\"; var object = {prop : x}; object.prop === x. Actual: ' + (object.prop));\n}\n\n//CHECK#6\nvar x = new String(1);\nvar object = {prop : x}; \nif (object.prop !== x) {\n $ERROR('#6: var x = new String(1); var object = {prop : x}; object.prop === x. Actual: ' + (object.prop));\n}\n\n//CHECK#7\nvar x = undefined;\nvar object = {prop : x}; \nif (object.prop !== x) {\n $ERROR('#7: var x = undefined; var object = {prop : x}; object.prop === x. Actual: ' + (object.prop));\n}\n\n//CHECK#8\nvar x = null;\nvar object = {prop : x}; \nif (object.prop !== x) {\n $ERROR('#8: var x = null; var object = {prop : x}; object.prop === x. Actual: ' + (object.prop));\n}\n\n//CHECK#9\nvar x = {};\nvar object = {prop : x}; \nif (object.prop !== x) {\n $ERROR('#9: var x = {}; var object = {prop : x}; object.prop === x. Actual: ' + (object.prop));\n}\n\n//CHECK#10\nvar x = [1,2];\nvar object = {prop : x}; \nif (object.prop !== x) {\n $ERROR('#10: var x = [1,2]; var object = {prop : x}; object.prop === x. Actual: ' + (object.prop));\n}\n\n//CHECK#11\nvar x = function() {};\nvar object = {prop : x}; \nif (object.prop !== x) {\n $ERROR('#11: var x = function() {}; var object = {prop : x}; object.prop === x. Actual: ' + (object.prop));\n}\n\n//CHECK#12\nvar x = this;\nvar object = {prop : x}; \nif (object.prop !== x) {\n $ERROR('#12: var x = this; var object = {prop : x}; object.prop === x. Actual: ' + (object.prop));\n}\n",
+ "id": "S11.1.5_A2"
+ },
+ {
+ "section": "11.1.5",
+ "description": "Creating the object defined with \"var object = {0 : 1, \"1\" : \"x\", o : {}}\"",
+ "test": "var object = {0 : 1, \"1\" : \"x\", o : {}};\n\n//CHECK#1\nif (object[0] !== 1) {\n $ERROR('#1: var object = {0 : 1; \"1\" : \"x\"; o : {}}; object[0] === 1. Actual: ' + (object[0]));\n}\n\n//CHECK#2\nif (object[\"1\"] !== \"x\") {\n $ERROR('#2: var object = {0 : 1; \"1\" : \"x\"; o : {}}; object[\"1\"] === \"x\". Actual: ' + (object[\"1\"]));\n}\n\n//CHECK#3\nif (typeof object.o !== \"object\") {\n $ERROR('#1: var object = {0 : 1; \"1\" : \"x\"; o : {}}; typeof object.o === \"object\". Actual: ' + (typeof object.o));\n}\n",
+ "id": "S11.1.5_A3"
+ },
+ {
+ "section": "11.1.5",
+ "description": "Checking if execution of \"var object = {true : 1}\" fails",
+ "negative": "",
+ "test": "//CHECK#1\nvar object = {true : 1};\n",
+ "id": "S11.1.5_A4.1"
+ },
+ {
+ "section": "11.1.5",
+ "description": "Checking if execution of \"var object = {null : true}\" fails",
+ "negative": "",
+ "test": "//CHECK#1\nvar object = {null : true};\n",
+ "id": "S11.1.5_A4.2"
+ },
+ {
+ "section": "11.1.5",
+ "description": "Creating properties with following names: undefined, 'true', 'null'",
+ "test": "//CHECK#1\nvar object = {undefined : true};\nif (object.undefined !== true) {\n $ERROR('#1: var object = {undefined : true}; object.undefined === true');\n}\n\n//CHECK#2\nvar object = {undefined : true};\nif (object[\"undefined\"] !== true) {\n $ERROR('#2: var object = {undefined : true}; object[\"undefined\"] === true');\n}\n\n//CHECK#3\nvar object = {\"true\" : true};\nif (object[\"true\"] !== true) {\n $ERROR('#3: var object = {\"true\" : true}; object[\"true\"] === true');\n}\n\n//CHECK#4\nvar object = {\"null\" : true};\nif (object[\"null\"] !== true) {\n $ERROR('#4: var object = {\"null\" : true}; object[\"null\"] === true');\n}\n",
+ "id": "S11.1.5_A4.3"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/11.1.6_The_Grouping_Operator.json b/website/resources/scripts/testcases2/11.1.6_The_Grouping_Operator.json
new file mode 100644
index 000000000..d94127e30
--- /dev/null
+++ b/website/resources/scripts/testcases2/11.1.6_The_Grouping_Operator.json
@@ -0,0 +1,56 @@
+{
+ "testCollection": {
+ "name": "11.1.6_The_Grouping_Operator",
+ "numTests": 8,
+ "tests": [
+ {
+ "section": "11.1.6, 7.2, 7.3",
+ "description": "Inserting WhiteSpaces and LineTerminators into grouping operator. Eval is used",
+ "test": "//CHECK#1\nif (eval(\"(\\u00091\\u0009)\") !== 1) {\n $ERROR('#1: (\\\\u00091\\\\u0009) === 1');\n}\n\n//CHECK#2\nif (eval(\"(\\u000B1\\u000B)\") !== 1) {\n $ERROR('#2: (\\\\u000B1\\\\u000B) === 1'); \n}\n\n//CHECK#3\nif (eval(\"(\\u000C1\\u000C)\") !== 1) {\n $ERROR('#3: (\\\\u000C1\\\\u000C) === 1');\n}\n\n//CHECK#4\nif (eval(\"(\\u00201\\u0020)\") !== 1) {\n $ERROR('#4: (\\\\u00201\\\\u0020 === 1');\n}\n\n//CHECK#5\nif (eval(\"(\\u00A01\\u00A0)\") !== 1) {\n $ERROR('#5: (\\\\u00A01\\\\u00A0) === 1');\n}\n\n//CHECK#6\nif (eval(\"(\\u000A1\\u000A)\") !== 1) {\n $ERROR('#6: (\\\\u000A1\\\\u000A) === 1'); \n}\n\n//CHECK#7\nif (eval(\"(\\u000D1\\u000D)\") !== 1) {\n $ERROR('#7: (\\\\u000D1\\\\u000D) === 1');\n}\n\n//CHECK#8\nif (eval(\"(\\u20281\\u2028)\") !== 1) {\n $ERROR('#8: (\\\\u20281\\\\u2028) === 1');\n}\n\n//CHECK#9\nif (eval(\"(\\u20291\\u2029)\") !== 1) {\n $ERROR('#9: (\\\\u20291\\\\u2029) === 1');\n}\n\n//CHECK#10\nif (eval(\"(\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u20291\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u2029)\") !== 1) {\n $ERROR('#10: (\\\\u0009\\\\u000B\\\\u000C\\\\u0020\\\\u00A0\\\\u000A\\\\u000D\\\\u2028\\\\u20291\\\\u0009\\\\u000B\\\\u000C\\\\u0020\\\\u00A0\\\\u000A\\\\u000D\\\\u2028\\\\u2029) === 1');\n}\n",
+ "id": "S11.1.6_A1"
+ },
+ {
+ "section": "11.1.6",
+ "description": "Applying \"delete\" and \"typeof\" operators to an undefined variable and a property of an object",
+ "test": "//CHECK#1\nif (delete (x) !== true) {\n $ERROR('#1: delete (x) === true');\n}\n\n//CHECK#2\nif (typeof (x) !== \"undefined\") {\n $ERROR('#2: typeof (x) === \"undefined\". Actual: ' + (typeof (x)));\n}\n\nvar object = {};\n//CHECK#3\nif (delete (object.prop) !== true) {\n $ERROR('#3: var object = {}; delete (object.prop) === true');\n}\n\n//CHECK#4\nif (typeof (object.prop) !== \"undefined\") {\n $ERROR('#4: var object = {}; typeof (object.prop) === \"undefined\". Actual: ' + (typeof (object.prop)));\n}\n",
+ "id": "S11.1.6_A2"
+ },
+ {
+ "section": "11.1.6",
+ "description": "Applying grouping operator to Boolean",
+ "test": "// Check for Boolean\n\n//CHECK#1\nif ((true) !== true) {\n $ERROR('#1: (true) === true');\n}\n\n//CHECK#2\nvar x = new Boolean(true);\nif ((x) !== x) {\n $ERROR('#2: var x = new Boolean(true); (x) === x. Actual: ' + ((x)));\n}\n",
+ "id": "S11.1.6_A3_T1"
+ },
+ {
+ "section": "11.1.6",
+ "description": "Applying grouping operator to Number",
+ "test": "//Check for Number\n\n//CHECK#1\nif ((1) !== 1) {\n $ERROR('#1: (1) === 1. Actual: ' + ((1)));\n}\n\n//CHECK#2\nvar x = new Number(1);\nif ((x) !== x) {\n $ERROR('#2: var x = new Number(1); (x) === x. Actual: ' + ((x)));\n}\n",
+ "id": "S11.1.6_A3_T2"
+ },
+ {
+ "section": "11.1.6",
+ "description": "Applying grouping operator to String",
+ "test": "//Check for String\n\n//CHECK#1\nif ((\"1\") !== \"1\") {\n $ERROR('#1: (\"1\") === \"1\". Actual: ' + ((\"1\")));\n}\n\n//CHECK#2\nif ((\"x\") !== \"x\") {\n $ERROR('#2: (\"x\") === \"x\". Actual: ' + ((\"x\")));\n}\n\n//CHECK#3\nvar x = new Number(\"1\");\nif ((x) !== x) {\n $ERROR('#3: var x = new Number(\"1\"); (x) === x. Actual: ' + ((x)));\n}\n",
+ "id": "S11.1.6_A3_T3"
+ },
+ {
+ "section": "11.1.6",
+ "description": "Applying grouping operator to undefined",
+ "test": "//Check for undefined and null\n\n//CHECK#1\nif ((undefined) !== undefined) {\n $ERROR('#1: (undefined) === undefined. Actual: ' + ((undefined)));\n}\n\n//CHECK#2\nif ((void 0) !== void 0) {\n $ERROR('#2: (void 0) === void 0. Actual: ' + ((void 0)));\n}\n\n//CHECK#2\nif ((null) !== null) {\n $ERROR('#2: (null) === null. Actual: ' + ((null)));\n}\n",
+ "id": "S11.1.6_A3_T4"
+ },
+ {
+ "section": "11.1.6",
+ "description": "Using grouping operator in declaration of variables",
+ "test": "//CHECK#1\n(x) = 1;\nif (x !== 1) {\n $ERROR('#1: (x) = 1; x === 1. Actual: ' + (x));\n}\n\n//CHECK#2\nvar y = 1; (y)++; ++(y); (y)--; --(y);\nif (y !== 1) {\n $ERROR('#2: var y = 1; (y)++; ++(y); (y)--; --(y); y === 1. Actual: ' + (y));\n}\n",
+ "id": "S11.1.6_A3_T5"
+ },
+ {
+ "section": "11.1.6",
+ "description": "Applying grouping operator to delete and typeof operators",
+ "test": "//CHECK#1\nif (delete (x) !== true) {\n $ERROR('#1: delete (x) === true');\n}\n\n//CHECK#2\nif (typeof (x) !== \"undefined\") {\n $ERROR('#2: typeof (x) === \"undefined\". Actual: ' + (typeof (x)));\n}\n",
+ "id": "S11.1.6_A3_T6"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/11.10.1_AND_Operator.json b/website/resources/scripts/testcases2/11.10.1_AND_Operator.json
new file mode 100644
index 000000000..5a7eee16d
--- /dev/null
+++ b/website/resources/scripts/testcases2/11.10.1_AND_Operator.json
@@ -0,0 +1,146 @@
+{
+ "testCollection": {
+ "name": "11.10.1_AND_Operator",
+ "numTests": 23,
+ "tests": [
+ {
+ "section": "11.10.1",
+ "description": "Checking uses eval",
+ "test": "//CHECK#1\nif ((eval(\"1\\u0009&\\u00091\")) !== 1) {\n $ERROR('#1: (1\\\\u0009&\\\\u00091) === 1');\n}\n\n//CHECK#2\nif ((eval(\"1\\u000B&\\u000B1\")) !== 1) {\n $ERROR('#2: (1\\\\u000B&\\\\u000B1) === 1'); \n}\n\n//CHECK#3\nif ((eval(\"1\\u000C&\\u000C1\")) !== 1) {\n $ERROR('#3: (1\\\\u000C&\\\\u000C1) === 1');\n}\n\n//CHECK#4\nif ((eval(\"1\\u0020&\\u00201\")) !== 1) {\n $ERROR('#4: (1\\\\u0020&\\\\u00201) === 1');\n}\n\n//CHECK#5\nif ((eval(\"1\\u00A0&\\u00A01\")) !== 1) {\n $ERROR('#5: (1\\\\u00A0&\\\\u00A01) === 1');\n}\n\n//CHECK#6\nif ((eval(\"1\\u000A&\\u000A1\")) !== 1) {\n $ERROR('#6: (1\\\\u000A&\\\\u000A1) === 1'); \n}\n\n//CHECK#7\nif ((eval(\"1\\u000D&\\u000D1\")) !== 1) {\n $ERROR('#7: (1\\\\u000D&\\\\u000D1) === 1');\n}\n\n//CHECK#8\nif ((eval(\"1\\u2028&\\u20281\")) !== 1) {\n $ERROR('#8: (1\\\\u2028&\\\\u20281) === 1');\n}\n\n//CHECK#9\nif ((eval(\"1\\u2029&\\u20291\")) !== 1) {\n $ERROR('#9: (1\\\\u2029&\\\\u20291) === 1');\n}\n\n\n//CHECK#10\nif ((eval(\"1\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u2029&\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u20291\")) !== 1) {\n $ERROR('#10: (1\\\\u0009\\\\u000B\\\\u000C\\\\u0020\\\\u00A0\\\\u000A\\\\u000D\\\\u2028\\\\u2029&\\\\u0009\\\\u000B\\\\u000C\\\\u0020\\\\u00A0\\\\u000A\\\\u000D\\\\u2028\\\\u20291) === 1');\n}\n",
+ "id": "S11.10.1_A1"
+ },
+ {
+ "section": "11.10.1",
+ "description": "Either Type is not Reference or GetBase is not null",
+ "test": "//CHECK#1\nif ((1 & 1) !== 1) {\n $ERROR('#1: (1 & 1) === 1. Actual: ' + ((1 & 1)));\n}\n\n//CHECK#2\nvar x = 1;\nif ((x & 1) !== 1) {\n $ERROR('#2: var x = 1; (x & 1) === 1. Actual: ' + ((x & 1)));\n}\n\n//CHECK#3\nvar y = 1;\nif ((1 & y) !== 1) {\n $ERROR('#3: var y = 1; (1 & y) === 1. Actual: ' + ((1 & y)));\n}\n\n//CHECK#4\nvar x = 1;\nvar y = 1;\nif ((x & y) !== 1) {\n $ERROR('#4: var x = 1; var y = 1; (x & y) === 1. Actual: ' + ((x & y)));\n}\n\n//CHECK#5\nvar objectx = new Object();\nvar objecty = new Object();\nobjectx.prop = 1;\nobjecty.prop = 1;\nif ((objectx.prop & objecty.prop) !== 1) {\n $ERROR('#5: var objectx = new Object(); var objecty = new Object(); objectx.prop = 1; objecty.prop = 1; (objectx.prop & objecty.prop) === 1. Actual: ' + ((objectx.prop & objecty.prop)));\n}\n",
+ "id": "S11.10.1_A2.1_T1"
+ },
+ {
+ "section": "11.10.1",
+ "description": "If GetBase(x) is null, throw ReferenceError",
+ "test": "//CHECK#1\ntry {\n x & 1;\n $ERROR('#1.1: x & 1 throw ReferenceError. Actual: ' + (x & 1)); \n}\ncatch (e) {\n if ((e instanceof ReferenceError) !== true) {\n $ERROR('#1.2: x & 1 throw ReferenceError. Actual: ' + (e)); \n }\n}\n",
+ "id": "S11.10.1_A2.1_T2"
+ },
+ {
+ "section": "11.10.1",
+ "description": "If GetBase(y) is null, throw ReferenceError",
+ "test": "//CHECK#1\ntry {\n 1 & y;\n $ERROR('#1.1: 1 & y throw ReferenceError. Actual: ' + (1 & y)); \n}\ncatch (e) {\n if ((e instanceof ReferenceError) !== true) {\n $ERROR('#1.2: 1 & y throw ReferenceError. Actual: ' + (e)); \n }\n}\n\n",
+ "id": "S11.10.1_A2.1_T3"
+ },
+ {
+ "section": "11.10.1, 8.6.2.6",
+ "description": "If Type(value) is Object, evaluate ToPrimitive(value, Number)",
+ "test": "//CHECK#1\nif (({valueOf: function() {return 1}} & 1) !== 1) {\n $ERROR('#1: ({valueOf: function() {return 1}} & 1) === 1. Actual: ' + (({valueOf: function() {return 1}} & 1)));\n}\n\n//CHECK#2\nif (({valueOf: function() {return 1}, toString: function() {return 0}} & 1) !== 1) {\n $ERROR('#2: ({valueOf: function() {return 1}, toString: function() {return 0}} & 1) === 1. Actual: ' + (({valueOf: function() {return 1}, toString: function() {return 0}} & 1)));\n}\n\n//CHECK#3\nif (({valueOf: function() {return 1}, toString: function() {return {}}} & 1) !== 1) {\n $ERROR('#3: ({valueOf: function() {return 1}, toString: function() {return {}}} & 1) === 1. Actual: ' + (({valueOf: function() {return 1}, toString: function() {return {}}} & 1)));\n}\n\n//CHECK#4\ntry {\n if (({valueOf: function() {return 1}, toString: function() {throw \"error\"}} & 1) !== 1) {\n $ERROR('#4.1: ({valueOf: function() {return 1}, toString: function() {throw \"error\"}} & 1) === 1. Actual: ' + (({valueOf: function() {return 1}, toString: function() {throw \"error\"}} & 1)));\n }\n}\ncatch (e) {\n if (e === \"error\") {\n $ERROR('#4.2: ({valueOf: function() {return 1}, toString: function() {throw \"error\"}} & 1) not throw \"error\"');\n } else {\n $ERROR('#4.3: ({valueOf: function() {return 1}, toString: function() {throw \"error\"}} & 1) not throw Error. Actual: ' + (e));\n }\n}\n\n//CHECK#5\nif ((1 & {toString: function() {return 1}}) !== 1) {\n $ERROR('#5.1: (1 & {toString: function() {return 1}}) === 1. Actual: ' + ((1 & {toString: function() {return 1}})));\n}\n\n//CHECK#6\nif ((1 & {valueOf: function() {return {}}, toString: function() {return 1}}) !== 1) {\n $ERROR('#6: (1 & {valueOf: function() {return {}}, toString: function() {return 1}}) === 1. Actual: ' + ((1 & {valueOf: function() {return {}}, toString: function() {return 1}})));\n}\n\n//CHECK#7\ntry {\n 1 & {valueOf: function() {throw \"error\"}, toString: function() {return 1}};\n $ERROR('#7.1: 1 & {valueOf: function() {throw \"error\"}, toString: function() {return 1}} throw \"error\". Actual: ' + (1 & {valueOf: function() {throw \"error\"}, toString: function() {return 1}}));\n} \ncatch (e) {\n if (e !== \"error\") {\n $ERROR('#7.2: 1 & {valueOf: function() {throw \"error\"}, toString: function() {return 1}} throw \"error\". Actual: ' + (e));\n } \n}\n\n//CHECK#8\ntry {\n 1 & {valueOf: function() {return {}}, toString: function() {return {}}};\n $ERROR('#8.1: 1 & {valueOf: function() {return {}}, toString: function() {return {}}} throw TypeError. Actual: ' + (1 & {valueOf: function() {return {}}, toString: function() {return {}}}));\n} \ncatch (e) {\n if ((e instanceof TypeError) !== true) {\n $ERROR('#8.2: 1 & {valueOf: function() {return {}}, toString: function() {return {}}} throw TypeError. Actual: ' + (e));\n } \n}\n",
+ "id": "S11.10.1_A2.2_T1"
+ },
+ {
+ "section": "11.10.1",
+ "description": "Checking by using \"throw\"",
+ "test": "//CHECK#1\nvar x = { valueOf: function () { throw \"x\"; } };\nvar y = { valueOf: function () { throw \"y\"; } };\ntry {\n x & y;\n $ERROR('#1.1: var x = { valueOf: function () { throw \"x\"; } }; var y = { valueOf: function () { throw \"y\"; } }; x & y throw \"x\". Actual: ' + (x & y));\n} catch (e) {\n if (e === \"y\") {\n $ERROR('#1.2: ToInt32(first expression) is called first, and then ToInt32(second expression)');\n } else {\n if (e !== \"x\") {\n $ERROR('#1.3: var x = { valueOf: function () { throw \"x\"; } }; var y = { valueOf: function () { throw \"y\"; } }; x & y throw \"x\". Actual: ' + (e));\n }\n }\n}\n",
+ "id": "S11.10.1_A2.3_T1"
+ },
+ {
+ "section": "11.10.1",
+ "description": "Checking with \"=\"",
+ "test": "//CHECK#1\nvar x = 0; \nif (((x = 1) & x) !== 1) {\n $ERROR('#1: var x = 0; ((x = 1) & x) === 1. Actual: ' + (((x = 1) & x)));\n}\n\n//CHECK#2\nvar x = 0; \nif ((x & (x = 1)) !== 0) {\n $ERROR('#2: var x = 0; (x & (x = 1)) === 0. Actual: ' + ((x & (x = 1))));\n}\n\n",
+ "id": "S11.10.1_A2.4_T1"
+ },
+ {
+ "section": "11.10.1",
+ "description": "Checking with \"throw\"",
+ "test": "//CHECK#1\nvar x = function () { throw \"x\"; };\nvar y = function () { throw \"y\"; };\ntry {\n x() & y();\n $ERROR('#1.1: var x = function () { throw \"x\"; }; var y = function () { throw \"y\"; }; x() & y() throw \"x\". Actual: ' + (x() & y()));\n} catch (e) {\n if (e === \"y\") {\n $ERROR('#1.2: First expression is evaluated first, and then second expression');\n } else {\n if (e !== \"x\") {\n $ERROR('#1.3: var x = function () { throw \"x\"; }; var y = function () { throw \"y\"; }; x() & y() throw \"x\". Actual: ' + (e));\n }\n }\n}\n",
+ "id": "S11.10.1_A2.4_T2"
+ },
+ {
+ "section": "11.10.1",
+ "description": "Checking with undeclarated variables",
+ "test": "//CHECK#1\ntry {\n x & (x = 1);\n $ERROR('#1.1: x & (x = 1) throw ReferenceError. Actual: ' + (x & (x = 1))); \n}\ncatch (e) {\n if ((e instanceof ReferenceError) !== true) {\n $ERROR('#1.2: x & (x = 1) throw ReferenceError. Actual: ' + (e)); \n }\n}\n\n//CHECK#2\nif (((y = 1) & y) !== 1) {\n $ERROR('#2: ((y = 1) & y) === 1. Actual: ' + (((y = 1) & y)));\n}\n\n",
+ "id": "S11.10.1_A2.4_T3"
+ },
+ {
+ "section": "11.10.1",
+ "description": "Type(x) and Type(y) are primitive boolean and Boolean object",
+ "test": "//CHECK#1\nif ((true & true) !== 1) {\n $ERROR('#1: (true & true) === 1. Actual: ' + ((true & true)));\n}\n\n//CHECK#2\nif ((new Boolean(true) & true) !== 1) {\n $ERROR('#2: (new Boolean(true) & true) === 1. Actual: ' + ((new Boolean(true) & true)));\n}\n\n//CHECK#3\nif ((true & new Boolean(true)) !== 1) {\n $ERROR('#3: (true & new Boolean(true)) === 1. Actual: ' + ((true & new Boolean(true))));\n}\n\n//CHECK#4\nif ((new Boolean(true) & new Boolean(true)) !== 1) {\n $ERROR('#4: (new Boolean(true) & new Boolean(true)) === 1. Actual: ' + ((new Boolean(true) & new Boolean(true))));\n}\n",
+ "id": "S11.10.1_A3_T1.1"
+ },
+ {
+ "section": "11.10.1",
+ "description": "Type(x) and Type(y) are primitive number and Number object",
+ "test": "//CHECK#1\nif ((1 & 1) !== 1) {\n $ERROR('#1: (1 & 1) === 1. Actual: ' + ((1 & 1)));\n}\n\n//CHECK#2\nif ((new Number(1) & 1) !== 1) {\n $ERROR('#2: (new Number(1) & 1) === 1. Actual: ' + ((new Number(1) & 1)));\n}\n\n//CHECK#3\nif ((1 & new Number(1)) !== 1) {\n $ERROR('#3: (1 & new Number(1)) === 1. Actual: ' + ((1 & new Number(1))));\n}\n\n//CHECK#4\nif ((new Number(1) & new Number(1)) !== 1) {\n $ERROR('#4: (new Number(1) & new Number(1)) === 1. Actual: ' + ((new Number(1) & new Number(1))));\n}\n\n",
+ "id": "S11.10.1_A3_T1.2"
+ },
+ {
+ "section": "11.10.1",
+ "description": "Type(x) and Type(y) are primitive string and String object",
+ "test": "//CHECK#1\nif ((\"1\" & \"1\") !== 1) {\n $ERROR('#1: (\"1\" & \"1\") === 1. Actual: ' + ((\"1\" & \"1\")));\n}\n\n//CHECK#2\nif ((new String(\"1\") & \"1\") !== 1) {\n $ERROR('#2: (new String(\"1\") & \"1\") === 1. Actual: ' + ((new String(\"1\") & \"1\")));\n}\n\n//CHECK#3\nif ((\"1\" & new String(\"1\")) !== 1) {\n $ERROR('#3: (\"1\" & new String(\"1\")) === 1. Actual: ' + ((\"1\" & new String(\"1\"))));\n}\n\n//CHECK#4\nif ((new String(\"1\") & new String(\"1\")) !== 1) {\n $ERROR('#4: (new String(\"1\") & new String(\"1\")) === 1. Actual: ' + ((new String(\"1\") & new String(\"1\"))));\n}\n\n//CHECK#5\nif ((\"x\" & \"1\") !== 0) {\n $ERROR('#5: (\"x\" & \"1\") === 0. Actual: ' + ((\"x\" & \"1\")));\n}\n\n//CHECK#6\nif ((\"1\" & \"x\") !== 0) {\n $ERROR('#6: (\"1\" & \"x\") === 0. Actual: ' + ((\"1\" & \"x\")));\n}\n",
+ "id": "S11.10.1_A3_T1.3"
+ },
+ {
+ "section": "11.10.1",
+ "description": "Type(x) and Type(y) are null and undefined",
+ "test": "//CHECK#1\nif ((null & undefined) !== 0) {\n $ERROR('#1: (null & undefined) === 0. Actual: ' + ((null & undefined)));\n}\n\n//CHECK#2\nif ((undefined & null) !== 0) {\n $ERROR('#2: (undefined & null) === 0. Actual: ' + ((undefined & null)));\n}\n\n//CHECK#3\nif ((undefined & undefined) !== 0) {\n $ERROR('#3: (undefined & undefined) === 0. Actual: ' + ((undefined & undefined)));\n}\n\n//CHECK#4\nif ((null & null) !== 0) {\n $ERROR('#4: (null & null) === 0. Actual: ' + ((null & null)));\n}\n",
+ "id": "S11.10.1_A3_T1.4"
+ },
+ {
+ "section": "11.10.1",
+ "description": "Type(x) and Type(y) are Object object and Function object",
+ "test": "//CHECK#1\nif (({} & function(){return 1}) !== 0) {\n $ERROR('#1: ({} & function(){return 1}) === 0. Actual: ' + (({} & function(){return 1})));\n}\n\n//CHECK#2\nif ((function(){return 1} & {}) !== 0) {\n $ERROR('#2: (function(){return 1} & {}) === 0. Actual: ' + ((function(){return 1} & {})));\n}\n\n//CHECK#3\nif ((function(){return 1} & function(){return 1}) !== 0) {\n $ERROR('#3: (function(){return 1} & function(){return 1}) === 0. Actual: ' + ((function(){return 1} & function(){return 1})));\n}\n\n//CHECK#4\nif (({} & {}) !== 0) {\n $ERROR('#4: ({} & {}) === 0. Actual: ' + (({} & {})));\n}\n\n",
+ "id": "S11.10.1_A3_T1.5"
+ },
+ {
+ "section": "11.10.1",
+ "description": "Type(x) is different from Type(y) and both types vary between Number (primitive or object) and Boolean (primitive and object)",
+ "test": "//CHECK#1\nif ((true & 1) !== 1) {\n $ERROR('#1: (true & 1) === 1. Actual: ' + ((true & 1)));\n}\n\n//CHECK#2\nif ((1 & true) !== 1) {\n $ERROR('#2: (1 & true) === 1. Actual: ' + ((1 & true)));\n}\n\n//CHECK#3\nif ((new Boolean(true) & 1) !== 1) {\n $ERROR('#3: (new Boolean(true) & 1) === 1. Actual: ' + ((new Boolean(true) & 1)));\n}\n\n//CHECK#4\nif ((1 & new Boolean(true)) !== 1) {\n $ERROR('#4: (1 & new Boolean(true)) === 1. Actual: ' + ((1 & new Boolean(true))));\n}\n\n//CHECK#5\nif ((true & new Number(1)) !== 1) {\n $ERROR('#5: (true & new Number(1)) === 1. Actual: ' + ((true & new Number(1))));\n}\n\n//CHECK#6\nif ((new Number(1) & true) !== 1) {\n $ERROR('#6: (new Number(1) & true) === 1. Actual: ' + ((new Number(1) & true)));\n}\n\n//CHECK#7\nif ((new Boolean(true) & new Number(1)) !== 1) {\n $ERROR('#7: (new Boolean(true) & new Number(1)) === 1. Actual: ' + ((new Boolean(true) & new Number(1))));\n}\n\n//CHECK#8\nif ((new Number(1) & new Boolean(true)) !== 1) {\n $ERROR('#8: (new Number(1) & new Boolean(true)) === 1. Actual: ' + ((new Number(1) & new Boolean(true))));\n}\n",
+ "id": "S11.10.1_A3_T2.1"
+ },
+ {
+ "section": "11.10.1",
+ "description": "Type(x) is different from Type(y) and both types vary between Number (primitive or object) and String (primitive and object)",
+ "test": "//CHECK#1\nif ((\"1\" & 1) !== 1) {\n $ERROR('#1: (\"1\" & 1) === 1. Actual: ' + ((\"1\" & 1)));\n}\n\n//CHECK#2\nif ((1 & \"1\") !== 1) {\n $ERROR('#2: (1 & \"1\") === 1. Actual: ' + ((1 & \"1\")));\n}\n\n//CHECK#3\nif ((new String(\"1\") & 1) !== 1) {\n $ERROR('#3: (new String(\"1\") & 1) === 1. Actual: ' + ((new String(\"1\") & 1)));\n}\n\n//CHECK#4\nif ((1 & new String(\"1\")) !== 1) {\n $ERROR('#4: (1 & new String(\"1\")) === 1. Actual: ' + ((1 & new String(\"1\"))));\n}\n\n//CHECK#5\nif ((\"1\" & new Number(1)) !== 1) {\n $ERROR('#5: (\"1\" & new Number(1)) === 1. Actual: ' + ((\"1\" & new Number(1))));\n}\n\n//CHECK#6\nif ((new Number(1) & \"1\") !== 1) {\n $ERROR('#6: (new Number(1) & \"1\") === 1. Actual: ' + ((new Number(1) & \"1\")));\n}\n\n//CHECK#7\nif ((new String(\"1\") & new Number(1)) !== 1) {\n $ERROR('#7: (new String(\"1\") & new Number(1)) === 1. Actual: ' + ((new String(\"1\") & new Number(1))));\n}\n\n//CHECK#8\nif ((new Number(1) & new String(\"1\")) !== 1) {\n $ERROR('#8: (new Number(1) & new String(\"1\")) === 1. Actual: ' + ((new Number(1) & new String(\"1\"))));\n}\n\n//CHECK#9\nif ((\"x\" & 1) !== 0) {\n $ERROR('#9: (\"x\" & 1) === 0. Actual: ' + ((\"x\" & 1)));\n}\n\n//CHECK#10\nif ((1 & \"x\") !== 0) {\n $ERROR('#10: (1 & \"x\") === 0. Actual: ' + ((1 & \"x\")));\n}\n",
+ "id": "S11.10.1_A3_T2.2"
+ },
+ {
+ "section": "11.10.1",
+ "description": "Type(x) is different from Type(y) and both types vary between Number (primitive or object) and Null",
+ "test": "//CHECK#1\nif ((1 & null) !== 0) {\n $ERROR('#1: (1 & null) === 0. Actual: ' + ((1 & null)));\n}\n\n//CHECK#2\nif ((null & 1) !== 0) {\n $ERROR('#2: (null & 1) === 0. Actual: ' + ((null & 1)));\n}\n\n//CHECK#3\nif ((new Number(1) & null) !== 0) {\n $ERROR('#3: (new Number(1) & null) === 0. Actual: ' + ((new Number(1) & null)));\n}\n\n//CHECK#4\nif ((null & new Number(1)) !== 0) {\n $ERROR('#4: (null & new Number(1)) === 0. Actual: ' + ((null & new Number(1))));\n}\n",
+ "id": "S11.10.1_A3_T2.3"
+ },
+ {
+ "section": "11.10.1",
+ "description": "Type(x) is different from Type(y) and both types vary between Number (primitive or object) and Undefined",
+ "test": "//CHECK#1\nif ((1 & undefined) !== 0) {\n $ERROR('#1: (1 & undefined) === 0. Actual: ' + ((1 & undefined)));\n}\n\n//CHECK#2\nif ((undefined & 1) !== 0) {\n $ERROR('#2: (undefined & 1) === 0. Actual: ' + ((undefined & 1)));\n}\n\n//CHECK#3\nif ((new Number(1) & undefined) !== 0) {\n $ERROR('#3: (new Number(1) & undefined) === 0. Actual: ' + ((new Number(1) & undefined)));\n}\n\n//CHECK#4\nif ((undefined & new Number(1)) !== 0) {\n $ERROR('#4: (undefined & new Number(1)) === 0. Actual: ' + ((undefined & new Number(1))));\n}\n",
+ "id": "S11.10.1_A3_T2.4"
+ },
+ {
+ "section": "11.10.1",
+ "description": "Type(x) us different from Type(y) and both types are String (primitive or object) or Boolean (primitive and object)",
+ "test": "//CHECK#1\nif ((true & \"1\") !== 1) {\n $ERROR('#1: (true & \"1\") === 1. Actual: ' + ((true & \"1\")));\n}\n\n//CHECK#2\nif ((\"1\" & true) !== 1) {\n $ERROR('#2: (\"1\" & true) === 1. Actual: ' + ((\"1\" & true)));\n}\n\n//CHECK#3\nif ((new Boolean(true) & \"1\") !== 1) {\n $ERROR('#3: (new Boolean(true) & \"1\") === 1. Actual: ' + ((new Boolean(true) & \"1\")));\n}\n\n//CHECK#4\nif ((\"1\" & new Boolean(true)) !== 1) {\n $ERROR('#4: (\"1\" & new Boolean(true)) === 1. Actual: ' + ((\"1\" & new Boolean(true))));\n}\n\n//CHECK#5\nif ((true & new String(\"1\")) !== 1) {\n $ERROR('#5: (true & new String(\"1\")) === 1. Actual: ' + ((true & new String(\"1\"))));\n}\n\n//CHECK#6\nif ((new String(\"1\") & true) !== 1) {\n $ERROR('#6: (new String(\"1\") & true) === 1. Actual: ' + ((new String(\"1\") & true)));\n}\n\n//CHECK#7\nif ((new Boolean(true) & new String(\"1\")) !== 1) {\n $ERROR('#7: (new Boolean(true) & new String(\"1\")) === 1. Actual: ' + ((new Boolean(true) & new String(\"1\"))));\n}\n\n//CHECK#8\nif ((new String(\"1\") & new Boolean(true)) !== 1) {\n $ERROR('#8: (new String(\"1\") & new Boolean(true)) === 1. Actual: ' + ((new String(\"1\") & new Boolean(true))));\n}\n",
+ "id": "S11.10.1_A3_T2.5"
+ },
+ {
+ "section": "11.10.1",
+ "description": "Type(x) is different from Type(y) and both types vary between String (primitive or object) and Undefined",
+ "test": "//CHECK#1\nif ((\"1\" & undefined) !== 0) {\n $ERROR('#1: (\"1\" & undefined) === 0. Actual: ' + ((\"1\" & undefined)));\n}\n\n//CHECK#2\nif ((undefined & \"1\") !== 0) {\n $ERROR('#2: (undefined & \"1\") === 0. Actual: ' + ((undefined & \"1\")));\n}\n\n//CHECK#3\nif ((new String(\"1\") & undefined) !== 0) {\n $ERROR('#3: (new String(\"1\") & undefined) === 0. Actual: ' + ((new String(\"1\") & undefined)));\n}\n\n//CHECK#4\nif ((undefined & new String(\"1\")) !== 0) {\n $ERROR('#4: (undefined & new String(\"1\")) === 0. Actual: ' + ((undefined & new String(\"1\"))));\n}\n",
+ "id": "S11.10.1_A3_T2.6"
+ },
+ {
+ "section": "11.10.1",
+ "description": "Type(x) is different from Type(y) and both types vary between String (primitive or object) and Null",
+ "test": "//CHECK#1\nif ((\"1\" & null) !== 0) {\n $ERROR('#1: (\"1\" & null) === 0. Actual: ' + ((\"1\" & null)));\n}\n\n//CHECK#2\nif ((null & \"1\") !== 0) {\n $ERROR('#2: (null & \"1\") === 0. Actual: ' + ((null & \"1\")));\n}\n\n//CHECK#3\nif ((new String(\"1\") & null) !== 0) {\n $ERROR('#3: (new String(\"1\") & null) === 0. Actual: ' + ((new String(\"1\") & null)));\n}\n\n//CHECK#4\nif ((null & new String(\"1\")) !== 0) {\n $ERROR('#4: (null & new String(\"1\")) === 0. Actual: ' + ((null & new String(\"1\"))));\n}\n",
+ "id": "S11.10.1_A3_T2.7"
+ },
+ {
+ "section": "11.10.1",
+ "description": "Type(x) is different from Type(y) and both types vary between Boolean (primitive or object) and Undefined",
+ "test": "//CHECK#1\nif ((true & undefined) !== 0) {\n $ERROR('#1: (true & undefined) === 0. Actual: ' + ((true & undefined)));\n}\n\n//CHECK#2\nif ((undefined & true) !== 0) {\n $ERROR('#2: (undefined & true) === 0. Actual: ' + ((undefined & true)));\n}\n\n//CHECK#3\nif ((new Boolean(true) & undefined) !== 0) {\n $ERROR('#3: (new Boolean(true) & undefined) === 0. Actual: ' + ((new Boolean(true) & undefined)));\n}\n\n//CHECK#4\nif ((undefined & new Boolean(true)) !== 0) {\n $ERROR('#4: (undefined & new Boolean(true)) === 0. Actual: ' + ((undefined & new Boolean(true))));\n}\n",
+ "id": "S11.10.1_A3_T2.8"
+ },
+ {
+ "section": "11.10.1",
+ "description": "Type(x) is different from Type(y) and both types vary between Boolean (primitive or object) and Null",
+ "test": "//CHECK#1\nif ((true & null) !== 0) {\n $ERROR('#1: (true & null) === 0. Actual: ' + ((true & null)));\n}\n\n//CHECK#2\nif ((null & true) !== 0) {\n $ERROR('#2: (null & true) === 0. Actual: ' + ((null & true)));\n}\n\n//CHECK#3\nif ((new Boolean(true) & null) !== 0) {\n $ERROR('#3: (new Boolean(true) & null) === 0. Actual: ' + ((new Boolean(true) & null)));\n}\n\n//CHECK#4\nif ((null & new Boolean(true)) !== 0) {\n $ERROR('#4: (null & new Boolean(true)) === 0. Actual: ' + ((null & new Boolean(true))));\n}\n",
+ "id": "S11.10.1_A3_T2.9"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/11.10.2_XOR_Operator.json b/website/resources/scripts/testcases2/11.10.2_XOR_Operator.json
new file mode 100644
index 000000000..2b60dda8f
--- /dev/null
+++ b/website/resources/scripts/testcases2/11.10.2_XOR_Operator.json
@@ -0,0 +1,146 @@
+{
+ "testCollection": {
+ "name": "11.10.2_XOR_Operator",
+ "numTests": 23,
+ "tests": [
+ {
+ "section": "11.10.2",
+ "description": "The check uses eval",
+ "test": "//CHECK#1\nif ((eval(\"1\\u0009^\\u00091\")) !== 0) {\n $ERROR('#1: (1\\\\u0009^\\\\u00091) === 0');\n}\n\n//CHECK#2\nif ((eval(\"1\\u000B^\\u000B1\")) !== 0) {\n $ERROR('#2: (1\\\\u000B^\\\\u000B1) === 0'); \n}\n\n//CHECK#3\nif ((eval(\"1\\u000C^\\u000C1\")) !== 0) {\n $ERROR('#3: (1\\\\u000C^\\\\u000C1) === 0');\n}\n\n//CHECK#4\nif ((eval(\"1\\u0020^\\u00201\")) !== 0) {\n $ERROR('#4: (1\\\\u0020^\\\\u00201) === 0');\n}\n\n//CHECK#5\nif ((eval(\"1\\u00A0^\\u00A01\")) !== 0) {\n $ERROR('#5: (1\\\\u00A0^\\\\u00A01) === 0');\n}\n\n//CHECK#6\nif ((eval(\"1\\u000A^\\u000A1\")) !== 0) {\n $ERROR('#6: (1\\\\u000A^\\\\u000A1) === 0'); \n}\n\n//CHECK#7\nif ((eval(\"1\\u000D^\\u000D1\")) !== 0) {\n $ERROR('#7: (1\\\\u000D^\\\\u000D1) === 0');\n}\n\n//CHECK#8\nif ((eval(\"1\\u2028^\\u20281\")) !== 0) {\n $ERROR('#8: (1\\\\u2028^\\\\u20281) === 0');\n}\n\n//CHECK#9\nif ((eval(\"1\\u2029^\\u20291\")) !== 0) {\n $ERROR('#9: (1\\\\u2029^\\\\u20291) === 0');\n}\n\n\n//CHECK#10\nif ((eval(\"1\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u2029^\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u20291\")) !== 0) {\n $ERROR('#10: (1\\\\u0009\\\\u000B\\\\u000C\\\\u0020\\\\u00A0\\\\u000A\\\\u000D\\\\u2028\\\\u2029^\\\\u0009\\\\u000B\\\\u000C\\\\u0020\\\\u00A0\\\\u000A\\\\u000D\\\\u2028\\\\u20291) === 0');\n}\n",
+ "id": "S11.10.2_A1"
+ },
+ {
+ "section": "11.10.2",
+ "description": "Either Type is not Reference or GetBase is not null",
+ "test": "//CHECK#1\nif ((1 ^ 1) !== 0) {\n $ERROR('#1: (1 ^ 1) === 0. Actual: ' + ((1 ^ 1)));\n}\n\n//CHECK#2\nvar x = 1;\nif ((x ^ 1) !== 0) {\n $ERROR('#2: var x = 1; (x ^ 1) === 0. Actual: ' + ((x ^ 1)));\n}\n\n//CHECK#3\nvar y = 1;\nif ((1 ^ y) !== 0) {\n $ERROR('#3: var y = 1; (1 ^ y) === 0. Actual: ' + ((1 ^ y)));\n}\n\n//CHECK#4\nvar x = 1;\nvar y = 1;\nif ((x ^ y) !== 0) {\n $ERROR('#4: var x = 1; var y = 1; (x ^ y) === 0. Actual: ' + ((x ^ y)));\n}\n\n//CHECK#5\nvar objectx = new Object();\nvar objecty = new Object();\nobjectx.prop = 1;\nobjecty.prop = 1;\nif ((objectx.prop ^ objecty.prop) !== 0) {\n $ERROR('#5: var objectx = new Object(); var objecty = new Object(); objectx.prop = 1; objecty.prop = 1; (objectx.prop ^ objecty.prop) === 0. Actual: ' + ((objectx.prop ^ objecty.prop)));\n}\n \n",
+ "id": "S11.10.2_A2.1_T1"
+ },
+ {
+ "section": "11.10.2",
+ "description": "If GetBase(x) is null, throw ReferenceError",
+ "test": "//CHECK#1\ntry {\n x ^ 1;\n $ERROR('#1.1: x ^ 1 throw ReferenceError. Actual: ' + (x ^ 1)); \n}\ncatch (e) {\n if ((e instanceof ReferenceError) !== true) {\n $ERROR('#1.2: x ^ 1 throw ReferenceError. Actual: ' + (e)); \n }\n}\n",
+ "id": "S11.10.2_A2.1_T2"
+ },
+ {
+ "section": "11.10.2",
+ "description": "If GetBase(y) is null, throw ReferenceError",
+ "test": "//CHECK#1\ntry {\n 1 ^ y;\n $ERROR('#1.1: 1 ^ y throw ReferenceError. Actual: ' + (1 ^ y)); \n}\ncatch (e) {\n if ((e instanceof ReferenceError) !== true) {\n $ERROR('#1.2: 1 ^ y throw ReferenceError. Actual: ' + (e)); \n }\n}\n",
+ "id": "S11.10.2_A2.1_T3"
+ },
+ {
+ "section": "11.10.2, 8.6.2.6",
+ "description": "If Type(value) is Object, evaluate ToPrimitive(value, Number)",
+ "test": "//CHECK#1\nif (({valueOf: function() {return 1}} ^ 1) !== 0) {\n $ERROR('#1: ({valueOf: function() {return 1}} ^ 1) === 0. Actual: ' + (({valueOf: function() {return 1}} ^ 1)));\n}\n\n//CHECK#2\nif (({valueOf: function() {return 1}, toString: function() {return 0}} ^ 1) !== 0) {\n $ERROR('#2: ({valueOf: function() {return 1}, toString: function() {return 0}} ^ 1) === 0. Actual: ' + (({valueOf: function() {return 1}, toString: function() {return 0}} ^ 1)));\n}\n\n//CHECK#3\nif (({valueOf: function() {return 1}, toString: function() {return {}}} ^ 1) !== 0) {\n $ERROR('#3: ({valueOf: function() {return 1}, toString: function() {return {}}} ^ 1) === 0. Actual: ' + (({valueOf: function() {return 1}, toString: function() {return {}}} ^ 1)));\n}\n\n//CHECK#4\ntry {\n if (({valueOf: function() {return 1}, toString: function() {throw \"error\"}} ^ 1) !== 0) {\n $ERROR('#4.1: ({valueOf: function() {return 1}, toString: function() {throw \"error\"}} ^ 1) === 0. Actual: ' + (({valueOf: function() {return 1}, toString: function() {throw \"error\"}} ^ 1)));\n }\n}\ncatch (e) {\n if (e === \"error\") {\n $ERROR('#4.2: ({valueOf: function() {return 1}, toString: function() {throw \"error\"}} ^ 1) not throw \"error\"');\n } else {\n $ERROR('#4.3: ({valueOf: function() {return 1}, toString: function() {throw \"error\"}} ^ 1) not throw Error. Actual: ' + (e));\n }\n}\n\n//CHECK#5\nif ((1 ^ {toString: function() {return 1}}) !== 0) {\n $ERROR('#5: (1 ^ {toString: function() {return 1}}) === 0. Actual: ' + ((1 ^ {toString: function() {return 1}})));\n}\n\n//CHECK#6\nif ((1 ^ {valueOf: function() {return {}}, toString: function() {return 1}}) !== 0) {\n $ERROR('#6: (1 ^ {valueOf: function() {return {}}, toString: function() {return 1}}) === 0. Actual: ' + ((1 ^ {valueOf: function() {return {}}, toString: function() {return 1}})));\n}\n\n//CHECK#7\ntry {\n 1 ^ {valueOf: function() {throw \"error\"}, toString: function() {return 1}};\n $ERROR('#7.1: 1 ^ {valueOf: function() {throw \"error\"}, toString: function() {return 1}} throw \"error\". Actual: ' + (1 ^ {valueOf: function() {throw \"error\"}, toString: function() {return 1}}));\n} \ncatch (e) {\n if (e !== \"error\") {\n $ERROR('#7.2: 1 ^ {valueOf: function() {throw \"error\"}, toString: function() {return 1}} throw \"error\". Actual: ' + (e));\n } \n}\n\n//CHECK#8\ntry {\n 1 ^ {valueOf: function() {return {}}, toString: function() {return {}}};\n $ERROR('#8.1: 1 ^ {valueOf: function() {return {}}, toString: function() {return {}}} throw TypeError. Actual: ' + (1 ^ {valueOf: function() {return {}}, toString: function() {return {}}}));\n} \ncatch (e) {\n if ((e instanceof TypeError) !== true) {\n $ERROR('#8.2: 1 ^ {valueOf: function() {return {}}, toString: function() {return {}}} throw TypeError. Actual: ' + (e));\n } \n}\n",
+ "id": "S11.10.2_A2.2_T1"
+ },
+ {
+ "section": "11.10.2",
+ "description": "Checking with \"throw\"",
+ "test": "//CHECK#1\nvar x = { valueOf: function () { throw \"x\"; } };\nvar y = { valueOf: function () { throw \"y\"; } };\ntry {\n x ^ y;\n $ERROR('#1.1: var x = { valueOf: function () { throw \"x\"; } }; var y = { valueOf: function () { throw \"y\"; } }; x ^ y throw \"x\". Actual: ' + (x ^ y));\n} catch (e) {\n if (e === \"y\") {\n $ERROR('#1.2: ToInt32(first expression) is called first, and then ToInt32(second expression)');\n } else {\n if (e !== \"x\") {\n $ERROR('#1.3: var x = { valueOf: function () { throw \"x\"; } }; var y = { valueOf: function () { throw \"y\"; } }; x ^ y throw \"x\". Actual: ' + (e));\n }\n }\n}\n",
+ "id": "S11.10.2_A2.3_T1"
+ },
+ {
+ "section": "11.10.2",
+ "description": "Checking with \"=\"",
+ "test": "//CHECK#1\nvar x = 1; \nif (((x = 0) ^ x) !== 0) {\n $ERROR('#1: var x = 0; ((x = 1) ^ x) === 0. Actual: ' + (((x = 1) ^ x)));\n}\n\n//CHECK#2\nvar x = 0; \nif ((x ^ (x = 1)) !== 1) {\n $ERROR('#2: var x = 0; (x ^ (x = 1)) === 1. Actual: ' + ((x ^ (x = 1))));\n}\n\n\n",
+ "id": "S11.10.2_A2.4_T1"
+ },
+ {
+ "section": "11.10.2",
+ "description": "Checking with \"throw\"",
+ "test": "//CHECK#1\nvar x = function () { throw \"x\"; };\nvar y = function () { throw \"y\"; };\ntry {\n x() ^ y();\n $ERROR('#1.1: var x = function () { throw \"x\"; }; var y = function () { throw \"y\"; }; x() ^ y() throw \"x\". Actual: ' + (x() ^ y()));\n} catch (e) {\n if (e === \"y\") {\n $ERROR('#1.2: First expression is evaluated first, and then second expression');\n } else {\n if (e !== \"x\") {\n $ERROR('#1.3: var x = function () { throw \"x\"; }; var y = function () { throw \"y\"; }; x() ^ y() throw \"x\". Actual: ' + (e));\n }\n }\n}\n",
+ "id": "S11.10.2_A2.4_T2"
+ },
+ {
+ "section": "11.10.2",
+ "description": "Checking with undeclarated variables",
+ "test": "//CHECK#1\ntry {\n x ^ (x = 1);\n $ERROR('#1.1: x ^ (x = 1) throw ReferenceError. Actual: ' + (x ^ (x = 1))); \n}\ncatch (e) {\n if ((e instanceof ReferenceError) !== true) {\n $ERROR('#1.2: x ^ (x = 1) throw ReferenceError. Actual: ' + (e)); \n }\n}\n\n//CHECK#2\nif (((y = 1) ^ y) !== 0) {\n $ERROR('#2: ((y = 1) ^ y) === 0. Actual: ' + (((y = 1) ^ y)));\n}\n\n\n",
+ "id": "S11.10.2_A2.4_T3"
+ },
+ {
+ "section": "11.10.2",
+ "description": "Type(x) and Type(y) are primitive boolean and Boolean object",
+ "test": "//CHECK#1\nif ((true ^ true) !== 0) {\n $ERROR('#1: (true ^ true) === 0. Actual: ' + ((true ^ true)));\n}\n\n//CHECK#2\nif ((new Boolean(true) ^ true) !== 0) {\n $ERROR('#2: (new Boolean(true) ^ true) === 0. Actual: ' + ((new Boolean(true) ^ true)));\n}\n\n//CHECK#3\nif ((true ^ new Boolean(true)) !== 0) {\n $ERROR('#3: (true ^ new Boolean(true)) === 0. Actual: ' + ((true ^ new Boolean(true))));\n}\n\n//CHECK#4\nif ((new Boolean(true) ^ new Boolean(true)) !== 0) {\n $ERROR('#4: (new Boolean(true) ^ new Boolean(true)) === 0. Actual: ' + ((new Boolean(true) ^ new Boolean(true))));\n}\n",
+ "id": "S11.10.2_A3_T1.1"
+ },
+ {
+ "section": "11.10.2",
+ "description": "Type(x) and Type(y) are primitive number and Number object",
+ "test": "//CHECK#1\nif ((1 ^ 1) !== 0) {\n $ERROR('#1: (1 ^ 1) === 0. Actual: ' + ((1 ^ 1)));\n}\n\n//CHECK#2\nif ((new Number(1) ^ 1) !== 0) {\n $ERROR('#2: (new Number(1) ^ 1) === 0. Actual: ' + ((new Number(1) ^ 1)));\n}\n\n//CHECK#3\nif ((1 ^ new Number(1)) !== 0) {\n $ERROR('#3: (1 ^ new Number(1)) === 0. Actual: ' + ((1 ^ new Number(1))));\n}\n\n//CHECK#4\nif ((new Number(1) ^ new Number(1)) !== 0) {\n $ERROR('#4: (new Number(1) ^ new Number(1)) === 0. Actual: ' + ((new Number(1) ^ new Number(1))));\n}\n\n",
+ "id": "S11.10.2_A3_T1.2"
+ },
+ {
+ "section": "11.10.2",
+ "description": "Type(x) and Type(y) are primitive string and String object",
+ "test": "//CHECK#1\nif ((\"1\" ^ \"1\") !== 0) {\n $ERROR('#1: (\"1\" ^ \"1\") === 0. Actual: ' + ((\"1\" ^ \"1\")));\n}\n\n//CHECK#2\nif ((new String(\"1\") ^ \"1\") !== 0) {\n $ERROR('#2: (new String(\"1\") ^ \"1\") === 0. Actual: ' + ((new String(\"1\") ^ \"1\")));\n}\n\n//CHECK#3\nif ((\"1\" ^ new String(\"1\")) !== 0) {\n $ERROR('#3: (\"1\" ^ new String(\"1\")) === 0. Actual: ' + ((\"1\" ^ new String(\"1\"))));\n}\n\n//CHECK#4\nif ((new String(\"1\") ^ new String(\"1\")) !== 0) {\n $ERROR('#4: (new String(\"1\") ^ new String(\"1\")) === 0. Actual: ' + ((new String(\"1\") ^ new String(\"1\"))));\n}\n\n//CHECK#5\nif ((\"x\" ^ \"1\") !== 1) {\n $ERROR('#5: (\"x\" ^ \"1\") === 1. Actual: ' + ((\"x\" ^ \"1\")));\n}\n\n//CHECK#6\nif ((\"1\" ^ \"x\") !== 1) {\n $ERROR('#6: (\"1\" ^ \"x\") === 1. Actual: ' + ((\"1\" ^ \"x\")));\n}\n",
+ "id": "S11.10.2_A3_T1.3"
+ },
+ {
+ "section": "11.10.2",
+ "description": "Type(x) and Type(y) are null and undefined",
+ "test": "//CHECK#1\nif ((null ^ undefined) !== 0) {\n $ERROR('#1: (null ^ undefined) === 0. Actual: ' + ((null ^ undefined)));\n}\n\n//CHECK#2\nif ((undefined ^ null) !== 0) {\n $ERROR('#2: (undefined ^ null) === 0. Actual: ' + ((undefined ^ null)));\n}\n\n//CHECK#3\nif ((undefined ^ undefined) !== 0) {\n $ERROR('#3: (undefined ^ undefined) === 0. Actual: ' + ((undefined ^ undefined)));\n}\n\n//CHECK#4\nif ((null ^ null) !== 0) {\n $ERROR('#4: (null ^ null) === 0. Actual: ' + ((null ^ null)));\n}\n",
+ "id": "S11.10.2_A3_T1.4"
+ },
+ {
+ "section": "11.10.2",
+ "description": "Type(x) and Type(y) are Object object and Function object",
+ "test": "//CHECK#1\nif (({} ^ function(){return 1}) !== 0) {\n $ERROR('#1: ({} ^ function(){return 1}) === 0. Actual: ' + (({} ^ function(){return 1})));\n}\n\n//CHECK#2\nif ((function(){return 1} ^ {}) !== 0) {\n $ERROR('#2: (function(){return 1} ^ {}) === 0. Actual: ' + ((function(){return 1} ^ {})));\n}\n\n//CHECK#3\nif ((function(){return 1} ^ function(){return 1}) !== 0) {\n $ERROR('#3: (function(){return 1} ^ function(){return 1}) === 0. Actual: ' + ((function(){return 1} ^ function(){return 1})));\n}\n\n//CHECK#4\nif (({} ^ {}) !== 0) {\n $ERROR('#4: ({} ^ {}) === 0. Actual: ' + (({} ^ {})));\n}\n\n",
+ "id": "S11.10.2_A3_T1.5"
+ },
+ {
+ "section": "11.10.2",
+ "description": "Type(x) is different from Type(y) and both types vary between Number (primitive or object) and Boolean (primitive and object)",
+ "test": "//CHECK#1\nif ((true ^ 1) !== 0) {\n $ERROR('#1: (true ^ 1) === 0. Actual: ' + ((true ^ 1)));\n}\n\n//CHECK#2\nif ((1 ^ true) !== 0) {\n $ERROR('#2: (1 ^ true) === 0. Actual: ' + ((1 ^ true)));\n}\n\n//CHECK#3\nif ((new Boolean(true) ^ 1) !== 0) {\n $ERROR('#3: (new Boolean(true) ^ 1) === 0. Actual: ' + ((new Boolean(true) ^ 1)));\n}\n\n//CHECK#4\nif ((1 ^ new Boolean(true)) !== 0) {\n $ERROR('#4: (1 ^ new Boolean(true)) === 0. Actual: ' + ((1 ^ new Boolean(true))));\n}\n\n//CHECK#5\nif ((true ^ new Number(1)) !== 0) {\n $ERROR('#5: (true ^ new Number(1)) === 0. Actual: ' + ((true ^ new Number(1))));\n}\n\n//CHECK#6\nif ((new Number(1) ^ true) !== 0) {\n $ERROR('#6: (new Number(1) ^ true) === 0. Actual: ' + ((new Number(1) ^ true)));\n}\n\n//CHECK#7\nif ((new Boolean(true) ^ new Number(1)) !== 0) {\n $ERROR('#7: (new Boolean(true) ^ new Number(1)) === 0. Actual: ' + ((new Boolean(true) ^ new Number(1))));\n}\n\n//CHECK#8\nif ((new Number(1) ^ new Boolean(true)) !== 0) {\n $ERROR('#8: (new Number(1) ^ new Boolean(true)) === 0. Actual: ' + ((new Number(1) ^ new Boolean(true))));\n}\n",
+ "id": "S11.10.2_A3_T2.1"
+ },
+ {
+ "section": "11.10.2",
+ "description": "Type(x) is different from Type(y) and both types vary between Number (primitive or object) and String (primitive and object)",
+ "test": "//CHECK#1\nif ((\"1\" ^ 1) !== 0) {\n $ERROR('#1: (\"1\" ^ 1) === 0. Actual: ' + ((\"1\" ^ 1)));\n}\n\n//CHECK#2\nif ((1 ^ \"1\") !== 0) {\n $ERROR('#2: (1 ^ \"1\") === 0. Actual: ' + ((1 ^ \"1\")));\n}\n\n//CHECK#3\nif ((new String(\"1\") ^ 1) !== 0) {\n $ERROR('#3: (new String(\"1\") ^ 1) === 0. Actual: ' + ((new String(\"1\") ^ 1)));\n}\n\n//CHECK#4\nif ((1 ^ new String(\"1\")) !== 0) {\n $ERROR('#4: (1 ^ new String(\"1\")) === 0. Actual: ' + ((1 ^ new String(\"1\"))));\n}\n\n//CHECK#5\nif ((\"1\" ^ new Number(1)) !== 0) {\n $ERROR('#5: (\"1\" ^ new Number(1)) === 0. Actual: ' + ((\"1\" ^ new Number(1))));\n}\n\n//CHECK#6\nif ((new Number(1) ^ \"1\") !== 0) {\n $ERROR('#6: (new Number(1) ^ \"1\") === 0. Actual: ' + ((new Number(1) ^ \"1\")));\n}\n\n//CHECK#7\nif ((new String(\"1\") ^ new Number(1)) !== 0) {\n $ERROR('#7: (new String(\"1\") ^ new Number(1)) === 0. Actual: ' + ((new String(\"1\") ^ new Number(1))));\n}\n\n//CHECK#8\nif ((new Number(1) ^ new String(\"1\")) !== 0) {\n $ERROR('#8: (new Number(1) ^ new String(\"1\")) === 0. Actual: ' + ((new Number(1) ^ new String(\"1\"))));\n}\n\n//CHECK#9\nif ((\"x\" ^ 1) !== 1) {\n $ERROR('#9: (\"x\" ^ 1) === 1. Actual: ' + ((\"x\" ^ 1)));\n}\n\n//CHECK#10\nif ((1 ^ \"x\") !== 1) {\n $ERROR('#10: (1 ^ \"x\") === 1. Actual: ' + ((1 ^ \"x\")));\n}\n",
+ "id": "S11.10.2_A3_T2.2"
+ },
+ {
+ "section": "11.10.2",
+ "description": "Type(x) is different from Type(y) and both types vary between Number (primitive or object) and Null",
+ "test": "//CHECK#1\nif ((1 ^ null) !== 1) {\n $ERROR('#1: (1 ^ null) === 1. Actual: ' + ((1 ^ null)));\n}\n\n//CHECK#2\nif ((null ^ 1) !== 1) {\n $ERROR('#2: (null ^ 1) === 1. Actual: ' + ((null ^ 1)));\n}\n\n//CHECK#3\nif ((new Number(1) ^ null) !== 1) {\n $ERROR('#3: (new Number(1) ^ null) === 1. Actual: ' + ((new Number(1) ^ null)));\n}\n\n//CHECK#4\nif ((null ^ new Number(1)) !== 1) {\n $ERROR('#4: (null ^ new Number(1)) === 1. Actual: ' + ((null ^ new Number(1))));\n}\n",
+ "id": "S11.10.2_A3_T2.3"
+ },
+ {
+ "section": "11.10.2",
+ "description": "Type(x) is different from Type(y) and both types vary between Number (primitive or object) and Undefined",
+ "test": "//CHECK#1\nif ((1 ^ undefined) !== 1) {\n $ERROR('#1: (1 ^ undefined) === 1. Actual: ' + ((1 ^ undefined)));\n}\n\n//CHECK#2\nif ((undefined ^ 1) !== 1) {\n $ERROR('#2: (undefined ^ 1) === 1. Actual: ' + ((undefined ^ 1)));\n}\n\n//CHECK#3\nif ((new Number(1) ^ undefined) !== 1) {\n $ERROR('#3: (new Number(1) ^ undefined) === 1. Actual: ' + ((new Number(1) ^ undefined)));\n}\n\n//CHECK#4\nif ((undefined ^ new Number(1)) !== 1) {\n $ERROR('#4: (undefined ^ new Number(1)) === 1. Actual: ' + ((undefined ^ new Number(1))));\n}\n",
+ "id": "S11.10.2_A3_T2.4"
+ },
+ {
+ "section": "11.10.2",
+ "description": "Type(x) is different from Type(y) and both types vary between String (primitive or object) and Boolean (primitive and object)",
+ "test": "//CHECK#1\nif ((true ^ \"1\") !== 0) {\n $ERROR('#1: (true ^ \"1\") === 0. Actual: ' + ((true ^ \"1\")));\n}\n\n//CHECK#2\nif ((\"1\" ^ true) !== 0) {\n $ERROR('#2: (\"1\" ^ true) === 0. Actual: ' + ((\"1\" ^ true)));\n}\n\n//CHECK#3\nif ((new Boolean(true) ^ \"1\") !== 0) {\n $ERROR('#3: (new Boolean(true) ^ \"1\") === 0. Actual: ' + ((new Boolean(true) ^ \"1\")));\n}\n\n//CHECK#4\nif ((\"1\" ^ new Boolean(true)) !== 0) {\n $ERROR('#4: (\"1\" ^ new Boolean(true)) === 0. Actual: ' + ((\"1\" ^ new Boolean(true))));\n}\n\n//CHECK#5\nif ((true ^ new String(\"1\")) !== 0) {\n $ERROR('#5: (true ^ new String(\"1\")) === 0. Actual: ' + ((true ^ new String(\"1\"))));\n}\n\n//CHECK#6\nif ((new String(\"1\") ^ true) !== 0) {\n $ERROR('#6: (new String(\"1\") ^ true) === 0. Actual: ' + ((new String(\"1\") ^ true)));\n}\n\n//CHECK#7\nif ((new Boolean(true) ^ new String(\"1\")) !== 0) {\n $ERROR('#7: (new Boolean(true) ^ new String(\"1\")) === 0. Actual: ' + ((new Boolean(true) ^ new String(\"1\"))));\n}\n\n//CHECK#8\nif ((new String(\"1\") ^ new Boolean(true)) !== 0) {\n $ERROR('#8: (new String(\"1\") ^ new Boolean(true)) === 0. Actual: ' + ((new String(\"1\") ^ new Boolean(true))));\n}\n",
+ "id": "S11.10.2_A3_T2.5"
+ },
+ {
+ "section": "11.10.2",
+ "description": "Type(x) is different from Type(y) and both types vary between String (primitive or object) and Undefined",
+ "test": "//CHECK#1\nif ((\"1\" ^ undefined) !== 1) {\n $ERROR('#1: (\"1\" ^ undefined) === 1. Actual: ' + ((\"1\" ^ undefined)));\n}\n\n//CHECK#2\nif ((undefined ^ \"1\") !== 1) {\n $ERROR('#2: (undefined ^ \"1\") === 1. Actual: ' + ((undefined ^ \"1\")));\n}\n\n//CHECK#3\nif ((new String(\"1\") ^ undefined) !== 1) {\n $ERROR('#3: (new String(\"1\") ^ undefined) === 1. Actual: ' + ((new String(\"1\") ^ undefined)));\n}\n\n//CHECK#4\nif ((undefined ^ new String(\"1\")) !== 1) {\n $ERROR('#4: (undefined ^ new String(\"1\")) === 1. Actual: ' + ((undefined ^ new String(\"1\"))));\n}\n",
+ "id": "S11.10.2_A3_T2.6"
+ },
+ {
+ "section": "11.10.2",
+ "description": "Type(x) is different from Type(y) and both types vary between String (primitive or object) and Null",
+ "test": "//CHECK#1\nif ((\"1\" ^ null) !== 1) {\n $ERROR('#1: (\"1\" ^ null) === 1. Actual: ' + ((\"1\" ^ null)));\n}\n\n//CHECK#2\nif ((null ^ \"1\") !== 1) {\n $ERROR('#2: (null ^ \"1\") === 1. Actual: ' + ((null ^ \"1\")));\n}\n\n//CHECK#3\nif ((new String(\"1\") ^ null) !== 1) {\n $ERROR('#3: (new String(\"1\") ^ null) === 1. Actual: ' + ((new String(\"1\") ^ null)));\n}\n\n//CHECK#4\nif ((null ^ new String(\"1\")) !== 1) {\n $ERROR('#4: (null ^ new String(\"1\")) === 1. Actual: ' + ((null ^ new String(\"1\"))));\n}\n",
+ "id": "S11.10.2_A3_T2.7"
+ },
+ {
+ "section": "11.10.2",
+ "description": "Type(x) is different from Type(y) and both types vary between Boolean (primitive or object) and Undefined",
+ "test": "//CHECK#1\nif ((true ^ undefined) !== 1) {\n $ERROR('#1: (true ^ undefined) === 1. Actual: ' + ((true ^ undefined)));\n}\n\n//CHECK#2\nif ((undefined ^ true) !== 1) {\n $ERROR('#2: (undefined ^ true) === 1. Actual: ' + ((undefined ^ true)));\n}\n\n//CHECK#3\nif ((new Boolean(true) ^ undefined) !== 1) {\n $ERROR('#3: (new Boolean(true) ^ undefined) === 1. Actual: ' + ((new Boolean(true) ^ undefined)));\n}\n\n//CHECK#4\nif ((undefined ^ new Boolean(true)) !== 1) {\n $ERROR('#4: (undefined ^ new Boolean(true)) === 1. Actual: ' + ((undefined ^ new Boolean(true))));\n}\n",
+ "id": "S11.10.2_A3_T2.8"
+ },
+ {
+ "section": "11.10.2",
+ "description": "Type(x) is different from Type(y) and both types vary between Boolean (primitive or object) and Null",
+ "test": "//CHECK#1\nif ((true ^ null) !== 1) {\n $ERROR('#1: (true ^ null) === 1. Actual: ' + ((true ^ null)));\n}\n\n//CHECK#2\nif ((null ^ true) !== 1) {\n $ERROR('#2: (null ^ true) === 1. Actual: ' + ((null ^ true)));\n}\n\n//CHECK#3\nif ((new Boolean(true) ^ null) !== 1) {\n $ERROR('#3: (new Boolean(true) ^ null) === 1. Actual: ' + ((new Boolean(true) ^ null)));\n}\n\n//CHECK#4\nif ((null ^ new Boolean(true)) !== 1) {\n $ERROR('#4: (null ^ new Boolean(true)) === 1. Actual: ' + ((null ^ new Boolean(true))));\n}\n",
+ "id": "S11.10.2_A3_T2.9"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/11.10.3_OR_Operator.json b/website/resources/scripts/testcases2/11.10.3_OR_Operator.json
new file mode 100644
index 000000000..fafbd2c58
--- /dev/null
+++ b/website/resources/scripts/testcases2/11.10.3_OR_Operator.json
@@ -0,0 +1,146 @@
+{
+ "testCollection": {
+ "name": "11.10.3_OR_Operator",
+ "numTests": 23,
+ "tests": [
+ {
+ "section": "11.10.3",
+ "description": "Checking by using eval",
+ "test": "//CHECK#1\nif ((eval(\"0\\u0009|\\u00091\")) !== 1) {\n $ERROR('#1: (0\\\\u0009|\\\\u00091) === 1');\n}\n\n//CHECK#2\nif ((eval(\"0\\u000B|\\u000B1\")) !== 1) {\n $ERROR('#2: (0\\\\u000B|\\\\u000B1) === 1'); \n}\n\n//CHECK#3\nif ((eval(\"0\\u000C|\\u000C1\")) !== 1) {\n $ERROR('#3: (0\\\\u000C|\\\\u000C1) === 1');\n}\n\n//CHECK#4\nif ((eval(\"0\\u0020|\\u00201\")) !== 1) {\n $ERROR('#4: (0\\\\u0020|\\\\u00201) === 1');\n}\n\n//CHECK#5\nif ((eval(\"0\\u00A0|\\u00A01\")) !== 1) {\n $ERROR('#5: (0\\\\u00A0|\\\\u00A01) === 1');\n}\n\n//CHECK#6\nif ((eval(\"0\\u000A|\\u000A1\")) !== 1) {\n $ERROR('#6: (0\\\\u000A|\\\\u000A1) === 1'); \n}\n\n//CHECK#7\nif ((eval(\"0\\u000D|\\u000D1\")) !== 1) {\n $ERROR('#7: (0\\\\u000D|\\\\u000D1) === 1');\n}\n\n//CHECK#8\nif ((eval(\"0\\u2028|\\u20281\")) !== 1) {\n $ERROR('#8: (0\\\\u2028|\\\\u20281) === 1');\n}\n\n//CHECK#9\nif ((eval(\"0\\u2029|\\u20291\")) !== 1) {\n $ERROR('#9: (0\\\\u2029|\\\\u20291) === 1');\n}\n\n\n//CHECK#10\nif ((eval(\"0\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u2029|\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u20291\")) !== 1) {\n $ERROR('#10: (0\\\\u0009\\\\u000B\\\\u000C\\\\u0020\\\\u00A0\\\\u000A\\\\u000D\\\\u2028\\\\u2029|\\\\u0009\\\\u000B\\\\u000C\\\\u0020\\\\u00A0\\\\u000A\\\\u000D\\\\u2028\\\\u20291) === 1');\n}\n",
+ "id": "S11.10.3_A1"
+ },
+ {
+ "section": "11.10.3",
+ "description": "Either Type is not Reference or GetBase is not null",
+ "test": "//CHECK#1\nif ((1 | 0) !== 1) {\n $ERROR('#1: (1 | 0) === 1. Actual: ' + ((1 | 0)));\n}\n\n//CHECK#2\nvar x = 1;\nif ((x | 0) !== 1) {\n $ERROR('#2: var x = 1; (x | 0) === 1. Actual: ' + ((x | 0)));\n}\n\n//CHECK#3\nvar y = 0;\nif ((1 | y) !== 1) {\n $ERROR('#3: var y = 0; (1 | y) === 1. Actual: ' + ((1 | y)));\n}\n\n//CHECK#4\nvar x = 1;\nvar y = 0;\nif ((x | y) !== 1) {\n $ERROR('#4: var x = 1; var y = 0; (x | y) === 1. Actual: ' + ((x | y)));\n}\n\n//CHECK#5\nvar objectx = new Object();\nvar objecty = new Object();\nobjectx.prop = 1;\nobjecty.prop = 0;\nif ((objectx.prop | objecty.prop) !== 1) {\n $ERROR('#5: var objectx = new Object(); var objecty = new Object(); objectx.prop = 1; objecty.prop = 0; (objectx.prop | objecty.prop) === 1. Actual: ' + ((objectx.prop | objecty.prop)));\n}\n",
+ "id": "S11.10.3_A2.1_T1"
+ },
+ {
+ "section": "11.10.3",
+ "description": "If GetBase(x) is null, throw ReferenceError",
+ "test": "//CHECK#1\ntry {\n x | 1;\n $ERROR('#1.1: x | 1 throw ReferenceError. Actual: ' + (x | 1)); \n}\ncatch (e) {\n if ((e instanceof ReferenceError) !== true) {\n $ERROR('#1.2: x | 1 throw ReferenceError. Actual: ' + (e)); \n }\n}\n",
+ "id": "S11.10.3_A2.1_T2"
+ },
+ {
+ "section": "11.10.3",
+ "description": "If GetBase(y) is null, throw ReferenceError",
+ "test": "//CHECK#1\ntry {\n 1 | y;\n $ERROR('#1.1: 1 | y throw ReferenceError. Actual: ' + (1 | y)); \n}\ncatch (e) {\n if ((e instanceof ReferenceError) !== true) {\n $ERROR('#1.2: 1 | y throw ReferenceError. Actual: ' + (e)); \n }\n}\n",
+ "id": "S11.10.3_A2.1_T3"
+ },
+ {
+ "section": "11.10.3, 8.6.2.6",
+ "description": "If Type(value) is Object, evaluate ToPrimitive(value, Number)",
+ "test": "//CHECK#1\nif (({valueOf: function() {return 1}} | 0) !== 1) {\n $ERROR('#1: ({valueOf: function() {return 1}} | 0) === 1. Actual: ' + (({valueOf: function() {return 1}} | 0)));\n}\n\n//CHECK#2\nif (({valueOf: function() {return 1}, toString: function() {return 0}} | 0) !== 1) {\n $ERROR('#2: ({valueOf: function() {return 1}, toString: function() {return 0}} | 0) === 1. Actual: ' + (({valueOf: function() {return 1}, toString: function() {return 0}} | 0)));\n}\n\n//CHECK#3\nif (({valueOf: function() {return 1}, toString: function() {return {}}} | 0) !== 1) {\n $ERROR('#3: ({valueOf: function() {return 1}, toString: function() {return {}}} | 0) === 1. Actual: ' + (({valueOf: function() {return 1}, toString: function() {return {}}} | 0)));\n}\n\n//CHECK#4\ntry {\n if (({valueOf: function() {return 1}, toString: function() {throw \"error\"}} | 0) !== 1) {\n $ERROR('#4.1: ({valueOf: function() {return 1}, toString: function() {throw \"error\"}} | 0) === 1. Actual: ' + (({valueOf: function() {return 1}, toString: function() {throw \"error\"}} | 0)));\n }\n}\ncatch (e) {\n if (e === \"error\") {\n $ERROR('#4.2: ({valueOf: function() {return 1}, toString: function() {throw \"error\"}} | 0) not throw \"error\"');\n } else {\n $ERROR('#4.3: ({valueOf: function() {return 1}, toString: function() {throw \"error\"}} | 0) not throw Error. Actual: ' + (e));\n }\n}\n\n//CHECK#5\nif ((0 | {toString: function() {return 1}}) !== 1) {\n $ERROR('#5: (0 | {toString: function() {return 1}}) === 1. Actual: ' + ((0 | {toString: function() {return 1}})));\n}\n\n//CHECK#6\nif ((0 | {valueOf: function() {return {}}, toString: function() {return 1}}) !== 1) {\n $ERROR('#6: (0 | {valueOf: function() {return {}}, toString: function() {return 1}}) === 1. Actual: ' + ((0 | {valueOf: function() {return {}}, toString: function() {return 1}})));\n}\n\n//CHECK#7\ntry {\n 0 | {valueOf: function() {throw \"error\"}, toString: function() {return 1}};\n $ERROR('#7.1: 0 | {valueOf: function() {throw \"error\"}, toString: function() {return 1}} throw \"error\". Actual: ' + (0 | {valueOf: function() {throw \"error\"}, toString: function() {return 1}}));\n} \ncatch (e) {\n if (e !== \"error\") {\n $ERROR('#7.2: 0 | {valueOf: function() {throw \"error\"}, toString: function() {return 1}} throw \"error\". Actual: ' + (e));\n } \n}\n\n//CHECK#8\ntry {\n 0 | {valueOf: function() {return {}}, toString: function() {return {}}};\n $ERROR('#8.1: 0 | {valueOf: function() {return {}}, toString: function() {return {}}} throw TypeError. Actual: ' + (0 | {valueOf: function() {return {}}, toString: function() {return {}}}));\n} \ncatch (e) {\n if ((e instanceof TypeError) !== true) {\n $ERROR('#8.2: 0 | {valueOf: function() {return {}}, toString: function() {return {}}} throw TypeError. Actual: ' + (e));\n } \n}\n",
+ "id": "S11.10.3_A2.2_T1"
+ },
+ {
+ "section": "11.10.3",
+ "description": "Checking with \"throw\"",
+ "test": "//CHECK#1\nvar x = { valueOf: function () { throw \"x\"; } };\nvar y = { valueOf: function () { throw \"y\"; } };\ntry {\n x | y;\n $ERROR('#1.1: var x = { valueOf: function () { throw \"x\"; } }; var y = { valueOf: function () { throw \"y\"; } }; x | y throw \"x\". Actual: ' + (x | y));\n} catch (e) {\n if (e === \"y\") {\n $ERROR('#1.2: ToInt32(first expression) is called first, and then ToInt32(second expression)');\n } else {\n if (e !== \"x\") {\n $ERROR('#1.3: var x = { valueOf: function () { throw \"x\"; } }; var y = { valueOf: function () { throw \"y\"; } }; x | y throw \"x\". Actual: ' + (e));\n }\n }\n}\n",
+ "id": "S11.10.3_A2.3_T1"
+ },
+ {
+ "section": "11.10.3",
+ "description": "Checking with \"=\"",
+ "test": "//CHECK#1\nvar x = 1; \nif (((x = 0) | x) !== 0) {\n $ERROR('#1: var x = 1; ((x = 0) | x) === 0. Actual: ' + (((x = 0) | x)));\n}\n\n//CHECK#2\nvar x = 1; \nif ((x | (x = 0)) !== 1) {\n $ERROR('#2: var x = 1; (x | (x = 0)) === 1. Actual: ' + ((x | (x = 0))));\n}\n",
+ "id": "S11.10.3_A2.4_T1"
+ },
+ {
+ "section": "11.10.3",
+ "description": "Checking with \"throw\"",
+ "test": "//CHECK#1\nvar x = function () { throw \"x\"; };\nvar y = function () { throw \"y\"; };\ntry {\n x() | y();\n $ERROR('#1.1: var x = function () { throw \"x\"; }; var y = function () { throw \"y\"; }; x() | y() throw \"x\". Actual: ' + (x() | y()));\n} catch (e) {\n if (e === \"y\") {\n $ERROR('#1.2: First expression is evaluated first, and then second expression');\n } else {\n if (e !== \"x\") {\n $ERROR('#1.3: var x = function () { throw \"x\"; }; var y = function () { throw \"y\"; }; x() | y() throw \"x\". Actual: ' + (e));\n }\n }\n}\n",
+ "id": "S11.10.3_A2.4_T2"
+ },
+ {
+ "section": "11.10.3",
+ "description": "Checking with undeclarated variables",
+ "test": "//CHECK#1\ntry {\n x | (x = 1);\n $ERROR('#1.1: x | (x = 1) throw ReferenceError. Actual: ' + (x | (x = 1))); \n}\ncatch (e) {\n if ((e instanceof ReferenceError) !== true) {\n $ERROR('#1.2: x | (x = 1) throw ReferenceError. Actual: ' + (e)); \n }\n}\n\n//CHECK#2\nif (((y = 1) | y) !== 1) {\n $ERROR('#2: ((y = 1) | y) === 1. Actual: ' + (((y = 1) | y)));\n}\n",
+ "id": "S11.10.3_A2.4_T3"
+ },
+ {
+ "section": "11.10.3",
+ "description": "Type(x) and Type(y) vary between primitive boolean and Boolean object",
+ "test": "//CHECK#1\nif ((true | true) !== 1) {\n $ERROR('#1: (true | true) === 1. Actual: ' + ((true | true)));\n}\n\n//CHECK#2\nif ((new Boolean(true) | true) !== 1) {\n $ERROR('#2: (new Boolean(true) | true) === 1. Actual: ' + ((new Boolean(true) | true)));\n}\n\n//CHECK#3\nif ((true | new Boolean(true)) !== 1) {\n $ERROR('#3: (true | new Boolean(true)) === 1. Actual: ' + ((true | new Boolean(true))));\n}\n\n//CHECK#4\nif ((new Boolean(true) | new Boolean(true)) !== 1) {\n $ERROR('#4: (new Boolean(true) | new Boolean(true)) === 1. Actual: ' + ((new Boolean(true) | new Boolean(true))));\n}\n",
+ "id": "S11.10.3_A3_T1.1"
+ },
+ {
+ "section": "11.10.3",
+ "description": "Type(x) and Type(y) vary between primitive number and Number object",
+ "test": "//CHECK#1\nif ((1 | 1) !== 1) {\n $ERROR('#1: (1 | 1) === 1. Actual: ' + ((1 | 1)));\n}\n\n//CHECK#2\nif ((new Number(1) | 1) !== 1) {\n $ERROR('#2: (new Number(1) | 1) === 1. Actual: ' + ((new Number(1) | 1)));\n}\n\n//CHECK#3\nif ((1 | new Number(1)) !== 1) {\n $ERROR('#3: (1 | new Number(1)) === 1. Actual: ' + ((1 | new Number(1))));\n}\n\n//CHECK#4\nif ((new Number(1) | new Number(1)) !== 1) {\n $ERROR('#4: (new Number(1) | new Number(1)) === 1. Actual: ' + ((new Number(1) | new Number(1))));\n}\n\n",
+ "id": "S11.10.3_A3_T1.2"
+ },
+ {
+ "section": "11.10.3",
+ "description": "Type(x) and Type(y) vary between primitive string and String object",
+ "test": "//CHECK#1\nif ((\"1\" | \"1\") !== 1) {\n $ERROR('#1: (\"1\" | \"1\") === 1. Actual: ' + ((\"1\" | \"1\")));\n}\n\n//CHECK#2\nif ((new String(\"1\") | \"1\") !== 1) {\n $ERROR('#2: (new String(\"1\") | \"1\") === 1. Actual: ' + ((new String(\"1\") | \"1\")));\n}\n\n//CHECK#3\nif ((\"1\" | new String(\"1\")) !== 1) {\n $ERROR('#3: (\"1\" | new String(\"1\")) === 1. Actual: ' + ((\"1\" | new String(\"1\"))));\n}\n\n//CHECK#4\nif ((new String(\"1\") | new String(\"1\")) !== 1) {\n $ERROR('#4: (new String(\"1\") | new String(\"1\")) === 1. Actual: ' + ((new String(\"1\") | new String(\"1\"))));\n}\n\n//CHECK#5\nif ((\"x\" | \"1\") !== 1) {\n $ERROR('#5: (\"x\" | \"1\") === 1. Actual: ' + ((\"x\" | \"1\")));\n}\n\n//CHECK#6\nif ((\"1\" | \"x\") !== 1) {\n $ERROR('#6: (\"1\" | \"x\") === 1. Actual: ' + ((\"1\" | \"x\")));\n}\n",
+ "id": "S11.10.3_A3_T1.3"
+ },
+ {
+ "section": "11.10.3",
+ "description": "Type(x) and Type(y) vary between Null and Undefined",
+ "test": "//CHECK#1\nif ((null | undefined) !== 0) {\n $ERROR('#1: (null | undefined) === 0. Actual: ' + ((null | undefined)));\n}\n\n//CHECK#2\nif ((undefined | null) !== 0) {\n $ERROR('#2: (undefined | null) === 0. Actual: ' + ((undefined | null)));\n}\n\n//CHECK#3\nif ((undefined | undefined) !== 0) {\n $ERROR('#3: (undefined | undefined) === 0. Actual: ' + ((undefined | undefined)));\n}\n\n//CHECK#4\nif ((null | null) !== 0) {\n $ERROR('#4: (null | null) === 0. Actual: ' + ((null | null)));\n}\n",
+ "id": "S11.10.3_A3_T1.4"
+ },
+ {
+ "section": "11.10.3",
+ "description": "Type(x) and Type(y) vary between Object object and Function object",
+ "test": "//CHECK#1\nif (({} | function(){return 1}) !== 0) {\n $ERROR('#1: ({} | function(){return 1}) === 0. Actual: ' + (({} | function(){return 1})));\n}\n\n//CHECK#2\nif ((function(){return 1} | {}) !== 0) {\n $ERROR('#2: (function(){return 1} | {}) === 0. Actual: ' + ((function(){return 1} | {})));\n}\n\n//CHECK#3\nif ((function(){return 1} | function(){return 1}) !== 0) {\n $ERROR('#3: (function(){return 1} | function(){return 1}) === 0. Actual: ' + ((function(){return 1} | function(){return 1})));\n}\n\n//CHECK#4\nif (({} | {}) !== 0) {\n $ERROR('#4: ({} | {}) === 0. Actual: ' + (({} | {})));\n}\n\n",
+ "id": "S11.10.3_A3_T1.5"
+ },
+ {
+ "section": "11.10.3",
+ "description": "Type(x) is different from Type(y) and both types vary between Number (primitive or object) and Boolean (primitive and object)",
+ "test": "//CHECK#1\nif ((true | 1) !== 1) {\n $ERROR('#1: (true | 1) === 1. Actual: ' + ((true | 1)));\n}\n\n//CHECK#2\nif ((1 | true) !== 1) {\n $ERROR('#2: (1 | true) === 1. Actual: ' + ((1 | true)));\n}\n\n//CHECK#3\nif ((new Boolean(true) | 1) !== 1) {\n $ERROR('#3: (new Boolean(true) | 1) === 1. Actual: ' + ((new Boolean(true) | 1)));\n}\n\n//CHECK#4\nif ((1 | new Boolean(true)) !== 1) {\n $ERROR('#4: (1 | new Boolean(true)) === 1. Actual: ' + ((1 | new Boolean(true))));\n}\n\n//CHECK#5\nif ((true | new Number(1)) !== 1) {\n $ERROR('#5: (true | new Number(1)) === 1. Actual: ' + ((true | new Number(1))));\n}\n\n//CHECK#6\nif ((new Number(1) | true) !== 1) {\n $ERROR('#6: (new Number(1) | true) === 1. Actual: ' + ((new Number(1) | true)));\n}\n\n//CHECK#7\nif ((new Boolean(true) | new Number(1)) !== 1) {\n $ERROR('#7: (new Boolean(true) | new Number(1)) === 1. Actual: ' + ((new Boolean(true) | new Number(1))));\n}\n\n//CHECK#8\nif ((new Number(1) | new Boolean(true)) !== 1) {\n $ERROR('#8: (new Number(1) | new Boolean(true)) === 1. Actual: ' + ((new Number(1) | new Boolean(true))));\n}\n",
+ "id": "S11.10.3_A3_T2.1"
+ },
+ {
+ "section": "11.10.3",
+ "description": "Type(x) is different from Type(y) and both types vary between Number (primitive or object) and String (primitive and object)",
+ "test": "//CHECK#1\nif ((\"1\" | 1) !== 1) {\n $ERROR('#1: (\"1\" | 1) === 1. Actual: ' + ((\"1\" | 1)));\n}\n\n//CHECK#2\nif ((1 | \"1\") !== 1) {\n $ERROR('#2: (1 | \"1\") === 1. Actual: ' + ((1 | \"1\")));\n}\n\n//CHECK#3\nif ((new String(\"1\") | 1) !== 1) {\n $ERROR('#3: (new String(\"1\") | 1) === 1. Actual: ' + ((new String(\"1\") | 1)));\n}\n\n//CHECK#4\nif ((1 | new String(\"1\")) !== 1) {\n $ERROR('#4: (1 | new String(\"1\")) === 1. Actual: ' + ((1 | new String(\"1\"))));\n}\n\n//CHECK#5\nif ((\"1\" | new Number(1)) !== 1) {\n $ERROR('#5: (\"1\" | new Number(1)) === 1. Actual: ' + ((\"1\" | new Number(1))));\n}\n\n//CHECK#6\nif ((new Number(1) | \"1\") !== 1) {\n $ERROR('#6: (new Number(1) | \"1\") === 1. Actual: ' + ((new Number(1) | \"1\")));\n}\n\n//CHECK#7\nif ((new String(\"1\") | new Number(1)) !== 1) {\n $ERROR('#7: (new String(\"1\") | new Number(1)) === 1. Actual: ' + ((new String(\"1\") | new Number(1))));\n}\n\n//CHECK#8\nif ((new Number(1) | new String(\"1\")) !== 1) {\n $ERROR('#8: (new Number(1) | new String(\"1\")) === 1. Actual: ' + ((new Number(1) | new String(\"1\"))));\n}\n\n//CHECK#9\nif ((\"x\" | 1) !== 1) {\n $ERROR('#9: (\"x\" | 1) === 1. Actual: ' + ((\"x\" | 1)));\n}\n\n//CHECK#10\nif ((1 | \"x\") !== 1) {\n $ERROR('#10: (1 | \"x\") === 1. Actual: ' + ((1 | \"x\")));\n}\n",
+ "id": "S11.10.3_A3_T2.2"
+ },
+ {
+ "section": "11.10.3",
+ "description": "Type(x) is different from Type(y) and both types vary between Number (primitive or object) and Null",
+ "test": "//CHECK#1\nif ((1 | null) !== 1) {\n $ERROR('#1: (1 | null) === 1. Actual: ' + ((1 | null)));\n}\n\n//CHECK#2\nif ((null | 1) !== 1) {\n $ERROR('#2: (null | 1) === 1. Actual: ' + ((null | 1)));\n}\n\n//CHECK#3\nif ((new Number(1) | null) !== 1) {\n $ERROR('#3: (new Number(1) | null) === 1. Actual: ' + ((new Number(1) | null)));\n}\n\n//CHECK#4\nif ((null | new Number(1)) !== 1) {\n $ERROR('#4: (null | new Number(1)) === 1. Actual: ' + ((null | new Number(1))));\n}\n",
+ "id": "S11.10.3_A3_T2.3"
+ },
+ {
+ "section": "11.10.3",
+ "description": "Type(x) is different from Type(y) and both types vary between Number (primitive or object) and Undefined",
+ "test": "//CHECK#1\nif ((1 | undefined) !== 1) {\n $ERROR('#1: (1 | undefined) === 1. Actual: ' + ((1 | undefined)));\n}\n\n//CHECK#2\nif ((undefined | 1) !== 1) {\n $ERROR('#2: (undefined | 1) === 1. Actual: ' + ((undefined | 1)));\n}\n\n//CHECK#3\nif ((new Number(1) | undefined) !== 1) {\n $ERROR('#3: (new Number(1) | undefined) === 1. Actual: ' + ((new Number(1) | undefined)));\n}\n\n//CHECK#4\nif ((undefined | new Number(1)) !== 1) {\n $ERROR('#4: (undefined | new Number(1)) === 1. Actual: ' + ((undefined | new Number(1))));\n}\n",
+ "id": "S11.10.3_A3_T2.4"
+ },
+ {
+ "section": "11.10.3",
+ "description": "Type(x) is different from Type(y) and both types vary between String (primitive or object) and Boolean (primitive and object)",
+ "test": "//CHECK#1\nif ((true | \"1\") !== 1) {\n $ERROR('#1: (true | \"1\") === 1. Actual: ' + ((true | \"1\")));\n}\n\n//CHECK#2\nif ((\"1\" | true) !== 1) {\n $ERROR('#2: (\"1\" | true) === 1. Actual: ' + ((\"1\" | true)));\n}\n\n//CHECK#3\nif ((new Boolean(true) | \"1\") !== 1) {\n $ERROR('#3: (new Boolean(true) | \"1\") === 1. Actual: ' + ((new Boolean(true) | \"1\")));\n}\n\n//CHECK#4\nif ((\"1\" | new Boolean(true)) !== 1) {\n $ERROR('#4: (\"1\" | new Boolean(true)) === 1. Actual: ' + ((\"1\" | new Boolean(true))));\n}\n\n//CHECK#5\nif ((true | new String(\"1\")) !== 1) {\n $ERROR('#5: (true | new String(\"1\")) === 1. Actual: ' + ((true | new String(\"1\"))));\n}\n\n//CHECK#6\nif ((new String(\"1\") | true) !== 1) {\n $ERROR('#6: (new String(\"1\") | true) === 1. Actual: ' + ((new String(\"1\") | true)));\n}\n\n//CHECK#7\nif ((new Boolean(true) | new String(\"1\")) !== 1) {\n $ERROR('#7: (new Boolean(true) | new String(\"1\")) === 1. Actual: ' + ((new Boolean(true) | new String(\"1\"))));\n}\n\n//CHECK#8\nif ((new String(\"1\") | new Boolean(true)) !== 1) {\n $ERROR('#8: (new String(\"1\") | new Boolean(true)) === 1. Actual: ' + ((new String(\"1\") | new Boolean(true))));\n}\n",
+ "id": "S11.10.3_A3_T2.5"
+ },
+ {
+ "section": "11.10.3",
+ "description": "Type(x) is different from Type(y) and both types vary between String (primitive or object) and Undefined",
+ "test": "//CHECK#1\nif ((\"1\" | undefined) !== 1) {\n $ERROR('#1: (\"1\" | undefined) === 1. Actual: ' + ((\"1\" | undefined)));\n}\n\n//CHECK#2\nif ((undefined | \"1\") !== 1) {\n $ERROR('#2: (undefined | \"1\") === 1. Actual: ' + ((undefined | \"1\")));\n}\n\n//CHECK#3\nif ((new String(\"1\") | undefined) !== 1) {\n $ERROR('#3: (new String(\"1\") | undefined) === 1. Actual: ' + ((new String(\"1\") | undefined)));\n}\n\n//CHECK#4\nif ((undefined | new String(\"1\")) !== 1) {\n $ERROR('#4: (undefined | new String(\"1\")) === 1. Actual: ' + ((undefined | new String(\"1\"))));\n}\n",
+ "id": "S11.10.3_A3_T2.6"
+ },
+ {
+ "section": "11.10.3",
+ "description": "Type(x) is different from Type(y) and both types vary between String (primitive or object) and Null",
+ "test": "//CHECK#1\nif ((\"1\" | null) !== 1) {\n $ERROR('#1: (\"1\" | null) === 1. Actual: ' + ((\"1\" | null)));\n}\n\n//CHECK#2\nif ((null | \"1\") !== 1) {\n $ERROR('#2: (null | \"1\") === 1. Actual: ' + ((null | \"1\")));\n}\n\n//CHECK#3\nif ((new String(\"1\") | null) !== 1) {\n $ERROR('#3: (new String(\"1\") | null) === 1. Actual: ' + ((new String(\"1\") | null)));\n}\n\n//CHECK#4\nif ((null | new String(\"1\")) !== 1) {\n $ERROR('#4: (null | new String(\"1\")) === 1. Actual: ' + ((null | new String(\"1\"))));\n}\n",
+ "id": "S11.10.3_A3_T2.7"
+ },
+ {
+ "section": "11.10.3",
+ "description": "Type(x) is different from Type(y) and both types vary between Boolean (primitive or object) and Undefined",
+ "test": "//CHECK#1\nif ((true | undefined) !== 1) {\n $ERROR('#1: (true | undefined) === 1. Actual: ' + ((true | undefined)));\n}\n\n//CHECK#2\nif ((undefined | true) !== 1) {\n $ERROR('#2: (undefined | true) === 1. Actual: ' + ((undefined | true)));\n}\n\n//CHECK#3\nif ((new Boolean(true) | undefined) !== 1) {\n $ERROR('#3: (new Boolean(true) | undefined) === 1. Actual: ' + ((new Boolean(true) | undefined)));\n}\n\n//CHECK#4\nif ((undefined | new Boolean(true)) !== 1) {\n $ERROR('#4: (undefined | new Boolean(true)) === 1. Actual: ' + ((undefined | new Boolean(true))));\n}\n",
+ "id": "S11.10.3_A3_T2.8"
+ },
+ {
+ "section": "11.10.3",
+ "description": "Type(x) is different from Type(y) and both types vary between Boolean (primitive or object) and Null",
+ "test": "//CHECK#1\nif ((true | null) !== 1) {\n $ERROR('#1: (true | null) === 1. Actual: ' + ((true | null)));\n}\n\n//CHECK#2\nif ((null | true) !== 1) {\n $ERROR('#2: (null | true) === 1. Actual: ' + ((null | true)));\n}\n\n//CHECK#3\nif ((new Boolean(true) | null) !== 1) {\n $ERROR('#3: (new Boolean(true) | null) === 1. Actual: ' + ((new Boolean(true) | null)));\n}\n\n//CHECK#4\nif ((null | new Boolean(true)) !== 1) {\n $ERROR('#4: (null | new Boolean(true)) === 1. Actual: ' + ((null | new Boolean(true))));\n}\n",
+ "id": "S11.10.3_A3_T2.9"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/11.11.1_Logical_AND_Operator.json b/website/resources/scripts/testcases2/11.11.1_Logical_AND_Operator.json
new file mode 100644
index 000000000..ac9fee07b
--- /dev/null
+++ b/website/resources/scripts/testcases2/11.11.1_Logical_AND_Operator.json
@@ -0,0 +1,104 @@
+{
+ "testCollection": {
+ "name": "11.11.1_Logical_AND_Operator",
+ "numTests": 16,
+ "tests": [
+ {
+ "section": "11.11.1",
+ "description": "Checking by using eval",
+ "test": "//CHECK#1\nif ((eval(\"true\\u0009&&\\u0009true\")) !== true) {\n $ERROR('#1: (true\\\\u0009&&\\\\u0009true) === true');\n}\n\n//CHECK#2\nif ((eval(\"true\\u000B&&\\u000Btrue\")) !== true) {\n $ERROR('#2: (true\\\\u000B&&\\\\u000Btrue) === true'); \n}\n\n//CHECK#3\nif ((eval(\"true\\u000C&&\\u000Ctrue\")) !== true) {\n $ERROR('#3: (true\\\\u000C&&\\\\u000Ctrue) === true');\n}\n\n//CHECK#4\nif ((eval(\"true\\u0020&&\\u0020true\")) !== true) {\n $ERROR('#4: (true\\\\u0020&&\\\\u0020true) === true');\n}\n\n//CHECK#5\nif ((eval(\"true\\u00A0&&\\u00A0true\")) !== true) {\n $ERROR('#5: (true\\\\u00A0&&\\\\u00A0true) === true');\n}\n\n//CHECK#6\nif ((eval(\"true\\u000A&&\\u000Atrue\")) !== true) {\n $ERROR('#6: (true\\\\u000A&&\\\\u000Atrue) === true'); \n}\n\n//CHECK#7\nif ((eval(\"true\\u000D&&\\u000Dtrue\")) !== true) {\n $ERROR('#7: (true\\\\u000D&&\\\\u000Dtrue) === true');\n}\n\n//CHECK#8\nif ((eval(\"true\\u2028&&\\u2028true\")) !== true) {\n $ERROR('#8: (true\\\\u2028&&\\\\u2028true) === true');\n}\n\n//CHECK#9\nif ((eval(\"true\\u2029&&\\u2029true\")) !== true) {\n $ERROR('#9: (true\\\\u2029&&\\\\u2029true) === true');\n}\n\n\n//CHECK#10\nif ((eval(\"true\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u2029&&\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u2029true\")) !== true) {\n $ERROR('#10: (true\\\\u0009\\\\u000B\\\\u000C\\\\u0020\\\\u00A0\\\\u000A\\\\u000D\\\\u2028\\\\u2029&&\\\\u0009\\\\u000B\\\\u000C\\\\u0020\\\\u00A0\\\\u000A\\\\u000D\\\\u2028\\\\u2029true) === true');\n}\n",
+ "id": "S11.11.1_A1"
+ },
+ {
+ "section": "11.11.1, 8.7.1",
+ "description": "Either Type is not Reference or GetBase is not null",
+ "test": "//CHECK#1\nif ((false && true) !== false) {\n $ERROR('#1: (false && true) === false');\n}\n\n//CHECK#2\nif ((true && false) !== false) {\n $ERROR('#2: (true && false) === false');\n}\n\n//CHECK#3\nvar x = false;\nif ((x && true) !== false) {\n $ERROR('#3: var x = false; (x && true) === false');\n}\n\n//CHECK#4\nvar y = new Boolean(false);\nif ((true && y) !== y) {\n $ERROR('#4: var y = new Boolean(false); (true && y) === y');\n}\n\n//CHECK#5\nvar x = false;\nvar y = true;\nif ((x && y) !== false) {\n $ERROR('#5: var x = false; var y = true; (x && y) === false');\n}\n\n//CHECK#6\nvar x = true;\nvar y = new Boolean(false);\nif ((x && y) !== y) {\n $ERROR('#6: var x = true; var y = new Boolean(false); (x && y) === y');\n}\n\n//CHECK#7\nvar objectx = new Object();\nvar objecty = new Object();\nobjectx.prop = true;\nobjecty.prop = 1.1;\nif ((objectx.prop && objecty.prop) !== objecty.prop) {\n $ERROR('#7: var objectx = new Object(); var objecty = new Object(); objectx.prop = true; objecty.prop = 1; (objectx.prop && objecty.prop) === objecty.prop');\n}\n\n//CHECK#8\nvar objectx = new Object();\nvar objecty = new Object();\nobjectx.prop = 0;\nobjecty.prop = true;\nif ((objectx.prop && objecty.prop) !== objectx.prop) {\n $ERROR('#8: var objectx = new Object(); var objecty = new Object(); objectx.prop = 0; objecty.prop = true; (objectx.prop && objecty.prop) === objectx.prop');\n}\n",
+ "id": "S11.11.1_A2.1_T1"
+ },
+ {
+ "section": "11.11.1, 8.7.1",
+ "description": "If GetBase(x) is null, throw ReferenceError",
+ "test": "//CHECK#1\ntry {\n x && true;\n $ERROR('#1.1: x && true throw ReferenceError. Actual: ' + (x && true)); \n}\ncatch (e) {\n if ((e instanceof ReferenceError) !== true) {\n $ERROR('#1.2: x && true throw ReferenceError. Actual: ' + (e)); \n }\n}\n",
+ "id": "S11.11.1_A2.1_T2"
+ },
+ {
+ "section": "11.11.1, 8.7.1",
+ "description": "If ToBoolean(x) is true and GetBase(y) is null, throw ReferenceError",
+ "test": "//CHECK#1\ntry {\n true && y;\n $ERROR('#1.1: true && y throw ReferenceError. Actual: ' + (true && y)); \n}\ncatch (e) {\n if ((e instanceof ReferenceError) !== true) {\n $ERROR('#1.2: true && y throw ReferenceError. Actual: ' + (e)); \n }\n}\n",
+ "id": "S11.11.1_A2.1_T3"
+ },
+ {
+ "section": "11.11.1, 8.7.1, 16",
+ "description": "If ToBoolean(x) is false and GetBase(y) is null, return false",
+ "test": "//CHECK#1\nif ((false && x) !== false) {\n $ERROR('#1: (false && x) === false');\n}\n",
+ "id": "S11.11.1_A2.1_T4"
+ },
+ {
+ "section": "11.11.1",
+ "description": "Checking with \"=\"",
+ "test": "//CHECK#1\nvar x = false; \nif (((x = true) && x) !== true) {\n $ERROR('#1: var x = false; ((x = true) && x) === true');\n}\n\n//CHECK#2\nvar x = false; \nif ((x && (x = true)) !== false) {\n $ERROR('#2: var x = false; (x && (x = true)) === false');\n}\n\n",
+ "id": "S11.11.1_A2.4_T1"
+ },
+ {
+ "section": "11.11.1",
+ "description": "Checking with \"throw\"",
+ "test": "//CHECK#1\nvar x = function () { throw \"x\"; };\nvar y = function () { throw \"y\"; };\ntry {\n x() && y();\n $ERROR('#1.1: var x = function () { throw \"x\"; }; var y = function () { throw \"y\"; }; x() && y() throw \"x\". Actual: ' + (x() && y()));\n} catch (e) {\n if (e === \"y\") {\n $ERROR('#1.2: First expression is evaluated first, and then second expression');\n } else {\n if (e !== \"x\") {\n $ERROR('#1.3: var x = function () { throw \"x\"; }; var y = function () { throw \"y\"; }; x() && y() throw \"x\". Actual: ' + (e));\n }\n }\n}\n",
+ "id": "S11.11.1_A2.4_T2"
+ },
+ {
+ "section": "11.11.1",
+ "description": "Checking with undeclarated variables",
+ "test": "//CHECK#1\ntry {\n x && (x = true);\n $ERROR('#1.1: x && (x = true) throw ReferenceError. Actual: ' + (x && (x = true))); \n}\ncatch (e) {\n if ((e instanceof ReferenceError) !== true) {\n $ERROR('#1.2: x && (x = true) throw ReferenceError. Actual: ' + (e)); \n }\n}\n\n//CHECK#2\nif (((y = true) && y) !== true) {\n $ERROR('#2: ((y = true) && y) === true');\n}\n\n",
+ "id": "S11.11.1_A2.4_T3"
+ },
+ {
+ "section": "11.11.1",
+ "description": "Type(x) is primitive boolean and Type(y) is changed between primitive boolean and Boolean object",
+ "test": "//CHECK#1\nif ((false && true) !== false) {\n $ERROR('#1: (false && true) === false');\n}\n\n//CHECK#2\nif ((false && false) !== false) {\n $ERROR('#2: (false && false) === false');\n}\n\n//CHECK#3\nif ((false && new Boolean(true)) !== false) {\n $ERROR('#3: (false && new Boolean(true)) === false');\n}\n\n//CHECK#4\nif ((false && new Boolean(false)) !== false) {\n $ERROR('#4: (false && new Boolean(false)) === false');\n}\n",
+ "id": "S11.11.1_A3_T1"
+ },
+ {
+ "section": "11.11.1",
+ "description": "Type(x) and Type(y) vary between primitive number and Number object",
+ "test": "//CHECK#1\nif ((-0 && -1) !== 0) {\n $ERROR('#1.1: (-0 && -1) === 0');\n} else {\n if ((1 / (-0 && -1)) !== Number.NEGATIVE_INFINITY) {\n $ERROR('#1.2: (-0 && -1) === -0');\n }\n}\n\n//CHECK#2\nif ((0 && new Number(-1)) !== 0) {\n $ERROR('#2.1: (0 && new Number(-1)) === 0');\n} else {\n if ((1 / (0 && new Number(-1))) !== Number.POSITIVE_INFINITY) {\n $ERROR('#2.2: (0 && new Number(-1)) === +0');\n }\n}\n\n//CHECK#3\nif ((isNaN(NaN && 1)) !== true) {\n $ERROR('#3: (NaN && 1) === Not-a-Number');\n}\n",
+ "id": "S11.11.1_A3_T2"
+ },
+ {
+ "section": "11.11.1",
+ "description": "Type(x) and Type(y) vary between primitive string and String object",
+ "test": "//CHECK#1\nif ((\"\" && \"1\") !== \"\") {\n $ERROR('#1: (\"\" && \"1\") === \"\"');\n}\n\n//CHECK#2\nif ((\"\" && new String(\"1\")) !== \"\") {\n $ERROR('#2: (\"\" && new String(\"1\")) === \"\"');\n}\n",
+ "id": "S11.11.1_A3_T3"
+ },
+ {
+ "section": "11.11.1",
+ "description": "Type(x) or Type(y) is changed between null and undefined",
+ "test": "//CHECK#1\nif ((undefined && true) !== undefined) {\n $ERROR('#1: (undefined && true) === undefined');\n}\n\n//CHECK#2\nif ((null && false) !== null) {\n $ERROR('#2: (null && false) === null');\n}\n",
+ "id": "S11.11.1_A3_T4"
+ },
+ {
+ "section": "11.11.1",
+ "description": "Type(x) and Type(y) vary between primitive boolean and Boolean object",
+ "test": "//CHECK#1\nif ((true && true) !== true) {\n $ERROR('#1: (true && true) === true');\n}\n\n//CHECK#2\nif ((true && false) !== false) {\n $ERROR('#2: (true && false) === false');\n}\n\n//CHECK#3\nvar y = new Boolean(true);\nif ((new Boolean(true) && y) !== y) {\n $ERROR('#3: (var y = new Boolean(true); (new Boolean(true) && y) === y');\n}\n\n//CHECK#4\nvar y = new Boolean(false);\nif ((new Boolean(true) && y) !== y) {\n $ERROR('#4: (var y = new Boolean(false); (new Boolean(true) && y) === y');\n}\n\n//CHECK#5\nvar y = new Boolean(true);\nif ((new Boolean(false) && y) !== y) {\n $ERROR('#5: (var y = new Boolean(true); (new Boolean(false) && y) === y');\n}\n\n//CHECK#6\nvar y = new Boolean(false);\nif ((new Boolean(false) && y) !== y) {\n $ERROR('#6: (var y = new Boolean(false); (new Boolean(false) && y) === y');\n}\n",
+ "id": "S11.11.1_A4_T1"
+ },
+ {
+ "section": "11.11.1",
+ "description": "Type(x) and Type(y) vary between primitive number and Number object",
+ "test": "//CHECK#1\nif ((-1 && -0) !== 0) {\n $ERROR('#1.1: (-1 && -0) === 0');\n} else {\n if ((1 / (-1 && -0)) !== Number.NEGATIVE_INFINITY) {\n $ERROR('#1.2: (-1 && -0) === -0');\n }\n}\n\n//CHECK#2\nif ((-1 && 0) !== 0) {\n $ERROR('#2.1: (-1 && 0) === 0');\n} else {\n if ((1 / (-1 && 0)) !== Number.POSITIVE_INFINITY) {\n $ERROR('#2.2: (-1 && 0) === +0');\n }\n}\n\n//CHECK#3\nif ((isNaN(0.1 && NaN)) !== true) {\n $ERROR('#3: (0.1 && NaN) === Not-a-Number');\n}\n\n//CHECK#4\nvar y = new Number(0);\nif ((new Number(-1) && y) !== y) {\n $ERROR('#4: (var y = new Number(0); (new Number(-1) && y) === y');\n}\n\n//CHECK#5\nvar y = new Number(NaN);\nif ((new Number(0) && y) !== y) {\n $ERROR('#5: (var y = new Number(NaN); (new Number(0) && y) === y');\n}\n\n//CHECK#6\nvar y = new Number(-1);\nif ((new Number(NaN) && y) !== y) {\n $ERROR('#6: (var y = new Number(-1); (new Number(NaN) && y) === y');\n}\n",
+ "id": "S11.11.1_A4_T2"
+ },
+ {
+ "section": "11.11.1",
+ "description": "Type(x) and Type(y) vary between primitive string and String object",
+ "test": "//CHECK#1\nif ((\"0\" && \"-1\") !== \"-1\") {\n $ERROR('#-1: (\"0\" && \"-1\") === \"-1\"');\n}\n\n//CHECK#2\nif ((\"-1\" && \"x\") !== \"x\") {\n $ERROR('#2: (\"-1\" && \"x\") === \"x\"');\n}\n\n//CHECK#3\nvar y = new String(-1);\nif ((new String(\"-1\") && y) !== y) {\n $ERROR('#3: (var y = new String(-1); (new String(\"-1\") && y) === y');\n}\n\n//CHECK#4\nvar y = new String(NaN);\nif ((new String(\"0\") && y) !== y) {\n $ERROR('#4: (var y = new String(NaN); (new String(\"0\") && y) === y');\n}\n\n//CHECK#5\nvar y = new String(\"-x\");\nif ((new String(\"x\") && y) !== y) {\n $ERROR('#5: (var y = new String(\"-x\"); (new String(\"x\") && y) === y');\n}\n\n//CHECK#6\nvar y = new String(-1);\nif ((new String(NaN) && y) !== y) {\n $ERROR('#6: (var y = new String(-1); (new String(NaN) && y) === y');\n}\n",
+ "id": "S11.11.1_A4_T3"
+ },
+ {
+ "section": "11.11.1",
+ "description": "Type(x) or Type(y) is changed between null and undefined",
+ "test": "//CHECK#1\nif ((true && undefined) !== undefined) {\n $ERROR('#1: (true && undefined) === undefined');\n}\n\n//CHECK#2\nif ((true && null) !== null) {\n $ERROR('#2: (true && null) === null');\n}\n",
+ "id": "S11.11.1_A4_T4"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/11.11.2_Logical_OR_Operator.json b/website/resources/scripts/testcases2/11.11.2_Logical_OR_Operator.json
new file mode 100644
index 000000000..e82e39c3f
--- /dev/null
+++ b/website/resources/scripts/testcases2/11.11.2_Logical_OR_Operator.json
@@ -0,0 +1,104 @@
+{
+ "testCollection": {
+ "name": "11.11.2_Logical_OR_Operator",
+ "numTests": 16,
+ "tests": [
+ {
+ "section": "11.11.2",
+ "description": "Checking by using eval",
+ "test": "//CHECK#1\nif ((eval(\"false\\u0009||\\u0009true\")) !== true) {\n $ERROR('#1: (false\\\\u0009||\\\\u0009true) === true');\n}\n\n//CHECK#2\nif ((eval(\"false\\u000B||\\u000Btrue\")) !== true) {\n $ERROR('#2: (false\\\\u000B||\\\\u000Btrue) === true'); \n}\n\n//CHECK#3\nif ((eval(\"false\\u000C||\\u000Ctrue\")) !== true) {\n $ERROR('#3: (false\\\\u000C||\\\\u000Ctrue) === true');\n}\n\n//CHECK#4\nif ((eval(\"false\\u0020||\\u0020true\")) !== true) {\n $ERROR('#4: (false\\\\u0020||\\\\u0020true) === true');\n}\n\n//CHECK#5\nif ((eval(\"false\\u00A0||\\u00A0true\")) !== true) {\n $ERROR('#5: (false\\\\u00A0||\\\\u00A0true) === true');\n}\n\n//CHECK#6\nif ((eval(\"false\\u000A||\\u000Atrue\")) !== true) {\n $ERROR('#6: (false\\\\u000A||\\\\u000Atrue) === true'); \n}\n\n//CHECK#7\nif ((eval(\"false\\u000D||\\u000Dtrue\")) !== true) {\n $ERROR('#7: (false\\\\u000D||\\\\u000Dtrue) === true');\n}\n\n//CHECK#8\nif ((eval(\"false\\u2028||\\u2028true\")) !== true) {\n $ERROR('#8: (false\\\\u2028||\\\\u2028true) === true');\n}\n\n//CHECK#9\nif ((eval(\"false\\u2029||\\u2029true\")) !== true) {\n $ERROR('#9: (false\\\\u2029||\\\\u2029true) === true');\n}\n\n\n//CHECK#10\nif ((eval(\"false\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u2029||\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u2029true\")) !== true) {\n $ERROR('#10: (false\\\\u0009\\\\u000B\\\\u000C\\\\u0020\\\\u00A0\\\\u000A\\\\u000D\\\\u2028\\\\u2029||\\\\u0009\\\\u000B\\\\u000C\\\\u0020\\\\u00A0\\\\u000A\\\\u000D\\\\u2028\\\\u2029true) === true');\n}\n",
+ "id": "S11.11.2_A1"
+ },
+ {
+ "section": "11.11.2, 8.7.1",
+ "description": "Either Type is not Reference or GetBase is not null",
+ "test": "//CHECK#1\nif ((true || false) !== true) {\n $ERROR('#1: (true || false) === true');\n}\n\n//CHECK#2\nif ((false || true) !== true) {\n $ERROR('#2: (false || true) === true');\n}\n\n//CHECK#3\nvar x = new Boolean(false);\nif ((x || true) !== x) {\n $ERROR('#3: var x = Boolean(false); (x || true) === x');\n}\n\n//CHECK#4\nvar y = new Boolean(true);\nif ((false || y) !== y) {\n $ERROR('#4: var y = Boolean(true); (false || y) === y');\n}\n\n//CHECK#5\nvar x = new Boolean(false);\nvar y = new Boolean(true);\nif ((x || y) !== x) {\n $ERROR('#5: var x = new Boolean(false); var y = new Boolean(true); (x || y) === x');\n}\n\n//CHECK#6\nvar x = false;\nvar y = new Boolean(true);\nif ((x || y) !== y) {\n $ERROR('#6: var x = false; var y = new Boolean(true); (x || y) === y');\n}\n\n//CHECK#7\nvar objectx = new Object();\nvar objecty = new Object();\nobjectx.prop = false;\nobjecty.prop = 1.1;\nif ((objectx.prop || objecty.prop) !== objecty.prop) {\n $ERROR('#7: var objectx = new Object(); var objecty = new Object(); objectx.prop = false; objecty.prop = 1; (objectx.prop || objecty.prop) === objecty.prop');\n}\n\n//CHECK#8\nvar objectx = new Object();\nvar objecty = new Object();\nobjectx.prop = 1.1;\nobjecty.prop = false;\nif ((objectx.prop || objecty.prop) !== objectx.prop) {\n $ERROR('#8: var objectx = new Object(); var objecty = new Object(); objectx.prop = 1.1; objecty.prop = false; (objectx.prop || objecty.prop) === objectx.prop');\n}\n",
+ "id": "S11.11.2_A2.1_T1"
+ },
+ {
+ "section": "11.11.2, 8.7.1",
+ "description": "If GetBase(x) is null, throw ReferenceError",
+ "test": "//CHECK#1\ntry {\n x || true;\n $ERROR('#1.1: x || true throw ReferenceError. Actual: ' + (x || true)); \n}\ncatch (e) {\n if ((e instanceof ReferenceError) !== true) {\n $ERROR('#1.2: x || true throw ReferenceError. Actual: ' + (e)); \n }\n}\n",
+ "id": "S11.11.2_A2.1_T2"
+ },
+ {
+ "section": "11.11.2, 8.7.1",
+ "description": "If ToBoolean(x) is false and GetBase(y) is null, throw ReferenceError",
+ "test": "//CHECK#1\ntry {\n false || y;\n $ERROR('#1.1: false || y throw ReferenceError. Actual: ' + (false || y)); \n}\ncatch (e) {\n if ((e instanceof ReferenceError) !== true) {\n $ERROR('#1.2: false || y throw ReferenceError. Actual: ' + (e)); \n }\n}\n",
+ "id": "S11.11.2_A2.1_T3"
+ },
+ {
+ "section": "11.11.2, 8.7.1, 16",
+ "description": "If ToBoolean(x) is true and GetBase(y) is null, return true",
+ "test": "//CHECK#1\nif ((true || x) !== true) {\n $ERROR('#1: (true || x) === true');\n}\n",
+ "id": "S11.11.2_A2.1_T4"
+ },
+ {
+ "section": "11.11.2",
+ "description": "Checking with \"=\"",
+ "test": "//CHECK#1\nvar x = true; \nif (((x = false) || x) !== false) {\n $ERROR('#1: var x = true; ((x = false) || x) === false');\n}\n\n//CHECK#2\nvar x = true; \nif ((x || (x = false)) !== true) {\n $ERROR('#2: var x = true; (x || (x = false)) === true');\n}\n",
+ "id": "S11.11.2_A2.4_T1"
+ },
+ {
+ "section": "11.11.2",
+ "description": "Checking with \"throw\"",
+ "test": "//CHECK#1\nvar x = function () { throw \"x\"; };\nvar y = function () { throw \"y\"; };\ntry {\n x() || y();\n $ERROR('#1.1: var x = function () { throw \"x\"; }; var y = function () { throw \"y\"; }; x() || y() throw \"x\". Actual: ' + (x() || y()));\n} catch (e) {\n if (e === \"y\") {\n $ERROR('#1.2: First expression is evaluated first, and then second expression');\n } else {\n if (e !== \"x\") {\n $ERROR('#1.3: var x = function () { throw \"x\"; }; var y = function () { throw \"y\"; }; x() || y() throw \"x\". Actual: ' + (e));\n }\n }\n}\n",
+ "id": "S11.11.2_A2.4_T2"
+ },
+ {
+ "section": "11.11.2",
+ "description": "Checking with undeclarated variables",
+ "test": "//CHECK#1\ntry {\n x || (x = true);\n $ERROR('#1.1: x || (x = true) throw ReferenceError. Actual: ' + (x || (x = true))); \n}\ncatch (e) {\n if ((e instanceof ReferenceError) !== true) {\n $ERROR('#1.2: x || (x = true) throw ReferenceError. Actual: ' + (e)); \n }\n}\n\n//CHECK#2\nif (((y = true) || y) !== true) {\n $ERROR('#2: ((y = true) || y) === true');\n}\n\n",
+ "id": "S11.11.2_A2.4_T3"
+ },
+ {
+ "section": "11.11.2",
+ "description": "Type(x) and Type(y) vary between primitive boolean and Boolean object",
+ "test": "//CHECK#1\nif ((false || true) !== true) {\n $ERROR('#1: (false || true) === true');\n}\n\n//CHECK#2\nif ((false || false) !== false) {\n $ERROR('#2: (false || false) === false');\n}\n\n//CHECK#3\nvar y = new Boolean(true);\nif ((false || y) !== y) {\n $ERROR('#3: (var y = new Boolean(true); false || y) === y');\n}\n\n//CHECK#4\nvar y = new Boolean(false);\nif ((false || y) !== y) {\n $ERROR('#4: (var y = new Boolean(false); false || y) === y');\n}\n",
+ "id": "S11.11.2_A3_T1"
+ },
+ {
+ "section": "11.11.2",
+ "description": "Type(x) and Type(y) vary between primitive number and Number object",
+ "test": "//CHECK#1\nif ((0 || -0) !== 0) {\n $ERROR('#1.1: (0 || -0) === 0');\n} else {\n if ((1 / (0 || -0)) !== Number.NEGATIVE_INFINITY) {\n $ERROR('#1.2: (0 || -0) === -0');\n }\n}\n\n//CHECK#2\nif ((-0 || 0) !== 0) {\n $ERROR('#2.1: (-0 || 0) === 0');\n} else {\n if ((1 / (-0 || 0)) !== Number.POSITIVE_INFINITY) {\n $ERROR('#2.2: (-0 || 0) === +0');\n }\n}\n\n//CHECK#3\nvar y = new Number(-1);\nif ((0 || y) !== y) {\n $ERROR('#3: (var y = new Number(-1); 0 || y) === y');\n} \n\n//CHECK#4\nvar y = new Number(0);\nif ((NaN || y) !== y) {\n $ERROR('#4: (var y = new Number(0); NaN || y) === y');\n}\n",
+ "id": "S11.11.2_A3_T2"
+ },
+ {
+ "section": "11.11.2",
+ "description": "Type(x) and Type(y) vary between primitive string and String object",
+ "test": "//CHECK#1\nif ((\"\" || \"1\") !== \"1\") {\n $ERROR('#1: (\"\" || \"1\") === \"1\"');\n}\n\n//CHECK#2\nvar y = new String(\"1\");\nif ((\"\" || y) !== y) {\n $ERROR('#2: (var y = new String(\"1\"); \"\" || y) === y');\n}\n",
+ "id": "S11.11.2_A3_T3"
+ },
+ {
+ "section": "11.11.2",
+ "description": "Type(x) or Type(y) is changed between null and undefined",
+ "test": "//CHECK#1\nif ((false || undefined) !== undefined) {\n $ERROR('#1: (false || undefined) === undefined');\n}\n\n//CHECK#2\nif ((false || null) !== null) {\n $ERROR('#2: (false || null) === null');\n}\n",
+ "id": "S11.11.2_A3_T4"
+ },
+ {
+ "section": "11.11.2",
+ "description": "Type(x) and Type(y) vary between primitive boolean and Boolean object",
+ "test": "//CHECK#1\nif (((true || true)) !== true) {\n $ERROR('#1: (true || true) === true');\n}\n\n//CHECK#2\nif ((true || false) !== true) {\n $ERROR('#2: (true || false) === true');\n}\n\n//CHECK#3\nvar x = new Boolean(true);\nif ((x || new Boolean(true)) !== x) {\n $ERROR('#3: (var x = new Boolean(true); (x || new Boolean(true)) === x');\n}\n\n//CHECK#4\nvar x = new Boolean(true);\nif ((x || new Boolean(false)) !== x) {\n $ERROR('#4: (var x = new Boolean(true); (x || new Boolean(false)) === x');\n}\n\n//CHECK#5\nvar x = new Boolean(false);\nif ((x || new Boolean(true)) !== x) {\n $ERROR('#5: (var x = new Boolean(false); (x || new Boolean(true)) === x');\n}\n\n//CHECK#6\nvar x = new Boolean(false);\nif ((x || new Boolean(false)) !== x) {\n $ERROR('#6: (var x = new Boolean(false); (x || new Boolean(false)) === x');\n}\n",
+ "id": "S11.11.2_A4_T1"
+ },
+ {
+ "section": "11.11.2",
+ "description": "Type(x) and Type(y) vary between primitive number and Number object",
+ "test": "//CHECK#1\nif ((-1 || 1) !== -1) {\n $ERROR('#1: (-1 || 1) === -1');\n}\n\n//CHECK#2\nif ((1 || new Number(0)) !== 1) {\n $ERROR('#2: (1 || new Number(0)) === 1');\n} \n\n//CHECK#3\nif ((-1 || NaN) !== -1) {\n $ERROR('#3: (-1 || NaN) === -1');\n}\n\n//CHECK#4\nvar x = new Number(-1);\nif ((x || new Number(0)) !== x) {\n $ERROR('#4: (var x = new Number(-1); (x || new Number(-1)) === x');\n}\n\n//CHECK#5\nvar x = new Number(NaN);\nif ((x || new Number(1)) !== x) {\n $ERROR('#5: (var x = new Number(NaN); (x || new Number(1)) === x');\n}\n\n//CHECK#6\nvar x = new Number(0);\nif ((x || new Number(NaN)) !== x) {\n $ERROR('#6: (var x = new Number(0); (x || new Number(NaN)) === x');\n}\n",
+ "id": "S11.11.2_A4_T2"
+ },
+ {
+ "section": "11.11.2",
+ "description": "Type(x) and Type(y) vary between primitive string and String object",
+ "test": "//CHECK#1\nif ((\"-1\" || \"1\") !== \"-1\") {\n $ERROR('#-1: (\"-1\" || \"1\") === \"-1\"');\n}\n\n//CHECK#2\nif ((\"-1\" || \"x\") !== \"-1\") {\n $ERROR('#2: (\"-1\" || \"x\") === \"-1\"');\n}\n\n//CHECK#3\nvar x = new String(\"-1\");\nif ((x || new String(-1)) !== x) {\n $ERROR('#3: (var x = new String(\"-1\"); (x || new String(-1)) === x');\n}\n\n//CHECK#4\nvar x = new String(NaN);\nif ((x || new String(\"1\")) !== x) {\n $ERROR('#4: (var x = new String(NaN); (x || new String(\"1\")) === x');\n}\n\n//CHECK#5\nvar x = new String(\"-x\");\nif ((x || new String(\"x\")) !== x) {\n $ERROR('#5: (var x = new String(\"-x\"); (x || new String(\"x\")) === x');\n}\n\n//CHECK#6\nvar x = new String(0);\nif ((x || new String(NaN)) !== x) {\n $ERROR('#6: (var x = new String(0); (x || new String(NaN)) === x');\n}\n",
+ "id": "S11.11.2_A4_T3"
+ },
+ {
+ "section": "11.11.2",
+ "description": "Type(x) or Type(y) vary between Null and Undefined",
+ "test": "//CHECK#1\nif ((true || undefined) !== true) {\n $ERROR('#1: (true || undefined) === true');\n}\n\n//CHECK#2\nif ((true || null) !== true) {\n $ERROR('#2: (true || null) === true');\n}\n",
+ "id": "S11.11.2_A4_T4"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/11.12_Conditional_Operator.json b/website/resources/scripts/testcases2/11.12_Conditional_Operator.json
new file mode 100644
index 000000000..3d2a84267
--- /dev/null
+++ b/website/resources/scripts/testcases2/11.12_Conditional_Operator.json
@@ -0,0 +1,98 @@
+{
+ "testCollection": {
+ "name": "11.12_Conditional_Operator",
+ "numTests": 15,
+ "tests": [
+ {
+ "section": "11.12",
+ "description": "Checking by using eval",
+ "test": "//CHECK#1\nif ((eval(\"false\\u0009?\\u0009true\\u0009:\\u0009true\")) !== true) {\n $ERROR('#1: (false\\\\u0009?\\\\u0009true\\\\u0009:\\\\u0009true) === true');\n}\n\n//CHECK#2\nif ((eval(\"false\\u000B?\\u000Btrue\\u000B:\\u000Btrue\")) !== true) {\n $ERROR('#2: (false\\\\u000B?\\\\u000Btrue\\\\u000B:\\\\u000Btrue) === true');\n}\n\n//CHECK#3\nif ((eval(\"false\\u000C?\\u000Ctrue\\u000C:\\u000Ctrue\")) !== true) {\n $ERROR('#3: (false\\\\u000C?\\\\u000Ctrue\\\\u000C:\\\\u000Ctrue) === true');\n}\n\n//CHECK#4\nif ((eval(\"false\\u0020?\\u0020true\\u0020:\\u0020true\")) !== true) {\n $ERROR('#4: (false\\\\u0020?\\\\u0020true\\\\u0020:\\\\u0020true) === true');\n}\n\n//CHECK#5\nif ((eval(\"false\\u00A0?\\u00A0true\\u00A0:\\u00A0true\")) !== true) {\n $ERROR('#5: (false\\\\u00A0?\\\\u00A0true\\\\u00A0:\\\\u00A0true) === true');\n}\n\n//CHECK#6\nif ((eval(\"false\\u000A?\\u000Atrue\\u000A:\\u000Atrue\")) !== true) {\n $ERROR('#6: (false\\\\u000A?\\\\u000Atrue\\\\u000A:\\\\u000Atrue) === true');\n}\n\n//CHECK#7\nif ((eval(\"false\\u000D?\\u000Dtrue\\u000D:\\u000Dtrue\")) !== true) {\n $ERROR('#7: (false\\\\u000D?\\\\u000Dtrue\\\\u000D:\\\\u000Dtrue) === true');\n}\n\n//CHECK#8\nif ((eval(\"false\\u2028?\\u2028true\\u2028:\\u2028true\")) !== true) {\n $ERROR('#8: (false\\\\u2028?\\\\u2028true\\\\u2028:\\\\u2028true) === true');\n}\n\n//CHECK#9\nif ((eval(\"false\\u2029?\\u2029true\\u2029:\\u2029true\")) !== true) {\n $ERROR('#9: (false\\\\u2029?\\\\u2029true\\\\u2029:\\\\u2029true) === true');\n}\n\n//CHECK#10\nif ((eval(\"false\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u2029?\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u2029true\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u2029:\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u2029true\")) !== true) {\n $ERROR('#10: (false\\\\u0009\\\\u000B\\\\u000C\\\\u0020\\\\u00A0\\\\u000A\\\\u000D\\\\u2028\\\\u2029?\\\\u0009\\\\u000B\\\\u000C\\\\u0020\\\\u00A0\\\\u000A\\\\u000D\\\\u2028\\\\u2029true\\\\u0009\\\\u000B\\\\u000C\\\\u0020\\\\u00A0\\\\u000A\\\\u000D\\\\u2028\\\\u2029:\\\\u0009\\\\u000B\\\\u000C\\\\u0020\\\\u00A0\\\\u000A\\\\u000D\\\\u2028\\\\u2029true) === true');\n}\n",
+ "id": "S11.12_A1"
+ },
+ {
+ "section": "11.12, 8.7.1",
+ "description": "Either Type is not Reference or GetBase is not null",
+ "test": "//CHECK#1\nif ((true ? false : true) !== false) {\n $ERROR('#1: (true ? false : true) === false');\n}\n\n//CHECK#2\nif ((false ? false : true) !== true) {\n $ERROR('#2: (false ? false : true) === true');\n}\n\n//CHECK#3\nvar x = new Boolean(true);\nvar y = new Boolean(false);\nif ((x ? y : true) !== y) {\n $ERROR('#3: var x = new Boolean(true); var y = new Boolean(false); (x ? y : true) === y');\n}\n\n//CHECK#4\nvar z = new Boolean(true);\nif ((false ? false : z) !== z) {\n $ERROR('#4: var z = new Boolean(true); (false ? false : z) === z');\n}\n\n//CHECK#5\nvar x = new Boolean(true);\nvar y = new Boolean(false);\nvar z = new Boolean(true);\nif ((x ? y : z) !== y) {\n $ERROR('#5: var x = new Boolean(true); var y = new Boolean(false); var z = new Boolean(true); (x ? y : z) === y');\n}\n\n//CHECK#6\nvar x = false;\nvar y = new Boolean(false);\nvar z = new Boolean(true);\nif ((x ? y : z) !== z) {\n $ERROR('#6: var x = false; var y = new Boolean(false); var z = new Boolean(true); (x ? y : z) === z');\n}\n",
+ "id": "S11.12_A2.1_T1"
+ },
+ {
+ "section": "11.12, 8.7.1",
+ "description": "If GetBase(x) is null, throw ReferenceError",
+ "test": "//CHECK#1\ntry {\n x ? true : false;\n $ERROR('#1.1: x ? true : false throw ReferenceError. Actual: ' + (x ? true : false)); \n}\ncatch (e) {\n if ((e instanceof ReferenceError) !== true) {\n $ERROR('#1.2: x ? true : false throw ReferenceError. Actual: ' + (e)); \n }\n}\n",
+ "id": "S11.12_A2.1_T2"
+ },
+ {
+ "section": "11.12, 8.7.1",
+ "description": "If ToBoolean(x) is true and GetBase(y) is null, throw ReferenceError",
+ "test": "//CHECK#1\ntry {\n true ? y : false;\n $ERROR('#1.1: true ? y : false throw ReferenceError. Actual: ' + (true ? y : false)); \n}\ncatch (e) {\n if ((e instanceof ReferenceError) !== true) {\n $ERROR('#1.2: true ? y : false throw ReferenceError. Actual: ' + (e)); \n }\n}\n",
+ "id": "S11.12_A2.1_T3"
+ },
+ {
+ "section": "11.12, 8.7.1",
+ "description": "If ToBoolean(x) is false and GetBase(z) is null, throw ReferenceError",
+ "test": "//CHECK#1\ntry {\n false ? true : z;\n $ERROR('#1.1: false ? true : z throw ReferenceError. Actual: ' + (false ? true : z)); \n}\ncatch (e) {\n if ((e instanceof ReferenceError) !== true) {\n $ERROR('#1.2: false ? true : z throw ReferenceError. Actual: ' + (e)); \n }\n}\n",
+ "id": "S11.12_A2.1_T4"
+ },
+ {
+ "section": "11.12, 8.7.1, 16",
+ "description": "If ToBoolean(x) is true and GetBase(z) is null, return y",
+ "test": "//CHECK#1\nvar y = new Object();\nif ((true ? y : z) !== y) {\n $ERROR('#1: var y = new Object(); (true ? y : z) === y');\n}\n",
+ "id": "S11.12_A2.1_T5"
+ },
+ {
+ "section": "11.12, 8.7.1, 16",
+ "description": "If ToBoolean(x) is false and GetBase(y) is null, return z",
+ "test": "//CHECK#1\nvar z = new Object();\nif ((false ? y : z) !== z) {\n $ERROR('#1: var z = new Object(); (false ? y : z) === z');\n}\n",
+ "id": "S11.12_A2.1_T6"
+ },
+ {
+ "section": "11.12",
+ "description": "Type(y) and Type(z) are boolean primitives",
+ "test": "//CHECK#1\nif ((false ? false : true) !== true) {\n $ERROR('#1: (false ? false : true) === true');\n}\n\n//CHECK#2\nvar z = new Boolean(true);\nif ((false ? true : z) !== z) {\n $ERROR('#2: (var y = new Boolean(true); (false ? true : z) === z');\n}\n",
+ "id": "S11.12_A3_T1"
+ },
+ {
+ "section": "11.12",
+ "description": "Type(y) and Type(z) are number primitives",
+ "test": "//CHECK#1\nif ((0 ? 0 : 1) !== 1) {\n $ERROR('#1: (0 ? 0 : 1) === 1');\n}\n\n//CHECK#2\nvar z = new Number(1);\nif ((0 ? 1 : z) !== z) {\n $ERROR('#2: (var y = new Number(1); (0 ? 1 : z) === z');\n}\n",
+ "id": "S11.12_A3_T2"
+ },
+ {
+ "section": "11.12",
+ "description": "Type(y) and Type(z) are string primitives",
+ "test": "//CHECK#1\nif ((\"\" ? \"\" : \"1\") !== \"1\") {\n $ERROR('#1: (\"\" ? \"\" : \"1\") === \"1\"');\n}\n\n//CHECK#2\nvar z = new String(\"1\");\nif ((\"\" ? \"1\" : z) !== z) {\n $ERROR('#2: (var y = new String(\"1\"); (\"\" ? \"1\" : z) === z');\n}\n",
+ "id": "S11.12_A3_T3"
+ },
+ {
+ "section": "11.12",
+ "description": "Type(x) or Type(y) is changed between null and undefined",
+ "test": "//CHECK#1\nif ((false ? true : undefined) !== undefined) {\n $ERROR('#1: (false ? true : undefined) === undefined');\n}\n\n//CHECK#2\nif ((false ? true : null) !== null) {\n $ERROR('#2: (false ? true : null) === null');\n}\n",
+ "id": "S11.12_A3_T4"
+ },
+ {
+ "section": "11.12",
+ "description": "Type(y) and Type(z) are boolean primitives",
+ "test": "//CHECK#1\nif ((true ? false : true) !== false) {\n $ERROR('#1: (true ? false : true) === false');\n}\n\n//CHECK#2\nvar y = new Boolean(true);\nif ((true ? y : false) !== y) {\n $ERROR('#2: (var y = new Boolean(true); (true ? y : false) === y');\n}\n\n//CHECK#3\nvar y = new Boolean(false);\nif ((y ? y : true) !== y) {\n $ERROR('#3: (var y = new Boolean(false); (y ? y : true) === y');\n}\n",
+ "id": "S11.12_A4_T1"
+ },
+ {
+ "section": "11.12",
+ "description": "Type(y) and Type(z) are number primitives",
+ "test": "//CHECK#1\nif ((1 ? 0 : 1) !== 0) {\n $ERROR('#1: (1 ? 0 : 1) === 0');\n}\n\n//CHECK#2\nvar y = new Number(1);\nif ((1 ? y : 0) !== y) {\n $ERROR('#2: (var y = new Number(1); (1 ? y : 0) === y');\n}\n\n//CHECK#3\nvar y = new Number(NaN);\nif ((y ? y : 1) !== y) {\n $ERROR('#3: (var y = new Number(NaN); (y ? y : 1) === y');\n}\n",
+ "id": "S11.12_A4_T2"
+ },
+ {
+ "section": "11.12",
+ "description": "Type(y) and Type(z) are string primitives",
+ "test": "//CHECK#1\nif ((\"1\" ? \"\" : \"1\") !== \"\") {\n $ERROR('#1: (\"1\" ? \"\" : \"1\") === \"\"');\n}\n\n//CHECK#2\nvar y = new String(\"1\");\nif ((\"1\" ? y : \"\") !== y) {\n $ERROR('#2: (var y = new String(\"1\"); (\"1\" ? y : \"\") === y');\n}\n\n//CHECK#3\nvar y = new String(\"y\");\nif ((y ? y : \"1\") !== y) {\n $ERROR('#3: (var y = new String(\"y\"); (y ? y : \"1\") === y');\n}\n",
+ "id": "S11.12_A4_T3"
+ },
+ {
+ "section": "11.12",
+ "description": "Type(x) or Type(y) is changed between null and undefined",
+ "test": "//CHECK#1\nif ((true ? undefined : true) !== undefined) {\n $ERROR('#1: (true ? undefined : true) === undefined');\n}\n\n//CHECK#2\nif ((true ? null : true) !== null) {\n $ERROR('#2: (true ? null : true) === null');\n}\n",
+ "id": "S11.12_A4_T4"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/11.13.1.json b/website/resources/scripts/testcases2/11.13.1.json
new file mode 100644
index 000000000..a8fbcffe1
--- /dev/null
+++ b/website/resources/scripts/testcases2/11.13.1.json
@@ -0,0 +1,118 @@
+{
+ "testCollection": {
+ "name": "11.13.1",
+ "numTests": 15,
+ "tests": [
+ {
+ "id": "11.13.1-1-1",
+ "path": "TestCases/chapter11/11.13/11.13.1/11.13.1-1-1.js",
+ "description": "simple assignment throws ReferenceError if LeftHandSide is not a reference (number)",
+ "test": "assertTrue((function testcase() {\n try {\n eval(\"42 = 42\");\n }\n catch (e) {\n if (e instanceof ReferenceError) {\n return true;\n }\n }\n }).call(this));\n"
+ },
+ {
+ "id": "11.13.1-1-2",
+ "path": "TestCases/chapter11/11.13/11.13.1/11.13.1-1-2.js",
+ "description": "simple assignment throws ReferenceError if LeftHandSide is not a reference (string)",
+ "test": "assertTrue((function testcase() {\n try {\n eval(\"'x' = 42\");\n }\n catch (e) {\n if (e instanceof ReferenceError) {\n return true;\n }\n }\n }).call(this));\n"
+ },
+ {
+ "id": "11.13.1-1-3",
+ "path": "TestCases/chapter11/11.13/11.13.1/11.13.1-1-3.js",
+ "description": "simple assignment throws ReferenceError if LeftHandSide is not a reference (boolean)",
+ "test": "assertTrue((function testcase() {\n try {\n eval(\"true = 42\");\n }\n catch (e) {\n if (e instanceof ReferenceError) {\n return true;\n }\n }\n }).call(this));\n"
+ },
+ {
+ "id": "11.13.1-1-4",
+ "path": "TestCases/chapter11/11.13/11.13.1/11.13.1-1-4.js",
+ "description": "simple assignment throws ReferenceError if LeftHandSide is not a reference (null)",
+ "test": "assertTrue((function testcase() {\n try {\n eval(\"null = 42\");\n }\n catch (e) {\n if (e instanceof ReferenceError) {\n return true;\n }\n }\n }).call(this));\n"
+ },
+ {
+ "id": "11.13.1-1-6-s",
+ "path": "TestCases/chapter11/11.13/11.13.1/11.13.1-1-6-s.js",
+ "description": "simple assignment throws ReferenceError if LeftHandSide is an unresolvable reference in strict mode (base obj undefined)",
+ "test": "assertTrue((function testcase() {\n 'use strict';\n \n try {\n __ES3_1_test_suite_test_11_13_1_unique_id_0__.x = 42;\n return false;\n }\n catch (e) {\n return (e instanceof ReferenceError);\n }\n }).call(this));\n",
+ "strict_only": ""
+ },
+ {
+ "id": "11.13.1-1-s",
+ "path": "TestCases/chapter11/11.13/11.13.1/11.13.1-1-s.js",
+ "description": "Strict Mode - TypeError is thrown if The LeftHandSide is a reference to a data property with the attribute value {[[Writable]]:false} under strict mode",
+ "test": "assertTrue((function testcase() {\n \"use strict\";\n var obj = {};\n Object.defineProperty(obj, \"prop\", {\n value: 10,\n writable: false,\n enumerable: true,\n configurable: true\n });\n\n try {\n obj.prop = 20;\n return false;\n } catch (e) {\n return e instanceof TypeError && obj.prop === 10;\n }\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict())",
+ "strict_only": ""
+ },
+ {
+ "id": "11.13.1-2-s",
+ "path": "TestCases/chapter11/11.13/11.13.1/11.13.1-2-s.js",
+ "description": "Strict Mode - TypeError is thrown if The LeftHandSide is a reference to an accessor property with the attribute value {[[Set]]:undefined} under strict mode",
+ "test": "assertTrue((function testcase() {\n \"use strict\";\n var obj = {};\n Object.defineProperty(obj, \"prop\", {\n get: function () {\n return 11;\n },\n set: undefined,\n enumerable: true,\n configurable: true\n });\n\n try {\n obj.prop = 20;\n return false;\n } catch (e) {\n return e instanceof TypeError && obj.prop === 11;\n }\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict())",
+ "strict_only": ""
+ },
+ {
+ "id": "11.13.1-3-s",
+ "path": "TestCases/chapter11/11.13/11.13.1/11.13.1-3-s.js",
+ "description": "Strict Mode - TypeError is thrown if The LeftHandSide is a reference to a non-existent property of an object whose [[Extensible]] internal property has the value false under strict mode",
+ "test": "assertTrue((function testcase() {\n \"use strict\";\n var obj = {};\n Object.preventExtensions(obj);\n\n try {\n obj.len = 10;\n return false;\n } catch (e) {\n return e instanceof TypeError;\n }\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict())",
+ "strict_only": ""
+ },
+ {
+ "id": "11.13.1-4-1",
+ "path": "TestCases/chapter11/11.13/11.13.1/11.13.1-4-1.js",
+ "description": "simple assignment creates property on the global object if LeftHandSide is an unresolvable reference",
+ "test": "assertTrue((function testcase() {\n function foo() {\n __ES3_1_test_suite_test_11_13_1_unique_id_3__ = 42;\n }\n foo();\n\n var desc = Object.getOwnPropertyDescriptor(fnGlobalObject(), '__ES3_1_test_suite_test_11_13_1_unique_id_3__');\n if (desc.value === 42 &&\n desc.writable === true &&\n desc.enumerable === true &&\n desc.configurable === true) {\n delete __ES3_1_test_suite_test_11_13_1_unique_id_3__;\n return true;\n } \n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "11.13.1-4-14-s",
+ "path": "TestCases/chapter11/11.13/11.13.1/11.13.1-4-14-s.js",
+ "description": "simple assignment throws TypeError if LeftHandSide is a readonly property in strict mode (Number.MAX_VALUE)",
+ "test": "assertTrue((function testcase() {\n 'use strict';\n\n try {\n Number.MAX_VALUE = 42;\n return false;\n }\n catch (e) {\n return (e instanceof TypeError);\n }\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict())",
+ "strict_only": ""
+ },
+ {
+ "id": "11.13.1-4-27-s",
+ "path": "TestCases/chapter11/11.13/11.13.1/11.13.1-4-27-s.js",
+ "description": "simple assignment throws TypeError if LeftHandSide is a readonly property in strict mode (Global.undefined)",
+ "test": "assertTrue((function testcase() {\n 'use strict';\n\n try {\n fnGlobalObject().undefined = 42;\n return false;\n }\n catch (e) {\n return (e instanceof TypeError);\n }\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict())",
+ "strict_only": ""
+ },
+ {
+ "id": "11.13.1-4-28-s",
+ "path": "TestCases/chapter11/11.13/11.13.1/11.13.1-4-28-s.js",
+ "description": "Strict Mode - SyntaxError is thrown if the identifier 'eval' appears as the LeftHandSideExpression of simple assignment(=) under strict mode",
+ "test": "assertTrue((function testcase() {\n \"use strict\";\n var blah = eval;\n try {\n eval(\"var eval = 20;\");\n return false;\n } catch (e) {\n return e instanceof SyntaxError && blah === eval;\n }\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict())",
+ "strict_only": ""
+ },
+ {
+ "id": "11.13.1-4-29-s",
+ "path": "TestCases/chapter11/11.13/11.13.1/11.13.1-4-29-s.js",
+ "description": "Strict Mode - SyntaxError is thrown if the identifier 'arguments' appears as the LeftHandSideExpression of simple assignment(=) under strict mode",
+ "test": "assertTrue((function testcase() {\n \"use strict\";\n var blah = arguments;\n try {\n eval(\"var arguments = 20;\");\n return false;\n } catch (e) {\n return e instanceof SyntaxError && blah === arguments;\n }\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict())",
+ "strict_only": ""
+ },
+ {
+ "id": "11.13.1-4-3-s",
+ "path": "TestCases/chapter11/11.13/11.13.1/11.13.1-4-3-s.js",
+ "description": "simple assignment throws TypeError if LeftHandSide is a readonly property in strict mode (Global.Infinity)",
+ "test": "assertTrue((function testcase() {\n 'use strict';\n\n try {\n fnGlobalObject().Infinity = 42;\n return false;\n }\n catch (e) {\n return (e instanceof TypeError);\n }\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict())",
+ "strict_only": ""
+ },
+ {
+ "id": "11.13.1-4-6-s",
+ "path": "TestCases/chapter11/11.13/11.13.1/11.13.1-4-6-s.js",
+ "description": "simple assignment throws TypeError if LeftHandSide is a readonly property in strict mode (Function.length)",
+ "test": "assertTrue((function testcase() {\n 'use strict';\n \n try {\n Function.length = 42;\n return false;\n }\n catch (e) {\n return (e instanceof TypeError);\n }\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict())",
+ "strict_only": ""
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/11.13.1_Simple_Assignment.json b/website/resources/scripts/testcases2/11.13.1_Simple_Assignment.json
new file mode 100644
index 000000000..70954ea39
--- /dev/null
+++ b/website/resources/scripts/testcases2/11.13.1_Simple_Assignment.json
@@ -0,0 +1,57 @@
+{
+ "testCollection": {
+ "name": "11.13.1_Simple_Assignment",
+ "numTests": 8,
+ "tests": [
+ {
+ "section": "11.13.1",
+ "description": "Checking by using eval",
+ "test": "//CHECK#1\nif ((eval(\"x\\u0009=\\u0009true\")) !== true) {\n $ERROR('#1: (x\\\\u0009=\\\\u0009true) === true');\n}\n\n//CHECK#2\nif ((eval(\"x\\u000B=\\u000Btrue\")) !== true) {\n $ERROR('#2: (x\\\\u000B=\\\\u000Btrue) === true'); \n}\n\n//CHECK#3\nif ((eval(\"x\\u000C=\\u000Ctrue\")) !== true) {\n $ERROR('#3: (x\\\\u000C=\\\\u000Ctrue) === true');\n}\n\n//CHECK#4\nif ((eval(\"x\\u0020=\\u0020true\")) !== true) {\n $ERROR('#4: (x\\\\u0020=\\\\u0020true) === true');\n}\n\n//CHECK#5\nif ((eval(\"x\\u00A0=\\u00A0true\")) !== true) {\n $ERROR('#5: (x\\\\u00A0=\\\\u00A0true) === true');\n}\n\n//CHECK#6\nif ((eval(\"x\\u000A=\\u000Atrue\")) !== true) {\n $ERROR('#6: (x\\\\u000A=\\\\u000Atrue) === true'); \n}\n\n//CHECK#7\nif ((eval(\"x\\u000D=\\u000Dtrue\")) !== true) {\n $ERROR('#7: (x\\\\u000D=\\\\u000Dtrue) === true');\n}\n\n//CHECK#8\nif ((eval(\"x\\u2028=\\u2028true\")) !== true) {\n $ERROR('#8: (x\\\\u2028=\\\\u2028true) === true');\n}\n\n//CHECK#9\nif ((eval(\"x\\u2029=\\u2029true\")) !== true) {\n $ERROR('#9: (x\\\\u2029=\\\\u2029true) === true');\n}\n\n\n//CHECK#10\nif ((eval(\"x\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u2029=\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u2029true\")) !== true) {\n $ERROR('#10: (x\\\\u0009\\\\u000B\\\\u000C\\\\u0020\\\\u00A0\\\\u000A\\\\u000D\\\\u2028\\\\u2029=\\\\u0009\\\\u000B\\\\u000C\\\\u0020\\\\u00A0\\\\u000A\\\\u000D\\\\u2028\\\\u2029true) === true');\n}\n",
+ "id": "S11.13.1_A1"
+ },
+ {
+ "section": "11.13.1",
+ "description": "Either AssigmentExpression is not Reference or GetBase is not null",
+ "test": "//CHECK#1\nx = 1;\nif (x !== 1) {\n $ERROR('#1: x = 1; x === 1. Actual: ' + (x));\n}\n\n//CHECK#2\nvar x = 1;\nif (x !== 1) {\n $ERROR('#2: var x = 1; x === 1. Actual: ' + (x));\n}\n\n//CHECK#3\ny = 1;\nx = y;\nif (x !== 1) {\n $ERROR('#3: y = 1; x = y; x === 1. Actual: ' + (x));\n}\n\n//CHECK#4\nvar y = 1;\nvar x = y;\nif (x !== 1) {\n $ERROR('#4: var y = 1; var x = y; x === 1. Actual: ' + (x));\n}\n\n//CHECK#5\nvar objectx = new Object();\nvar objecty = new Object();\nobjecty.prop = 1.1;\nobjectx.prop = objecty.prop;\nif (objectx.prop !== objecty.prop) {\n $ERROR('#5: var objectx = new Object(); var objecty = new Object(); objecty.prop = 1; objectx.prop = objecty.prop; objectx.prop === objecty.prop. Actual: ' + (objectx.prop));\n} else {\n if (objectx === objecty) {\n $ERROR('#5: var objectx = new Object(); var objecty = new Object(); objecty.prop = 1; objectx.prop = objecty.prop; objectx !== objecty');\n } \n}\n\n",
+ "id": "S11.13.1_A2.1_T1"
+ },
+ {
+ "section": "11.13.1",
+ "description": "If GetBase(AssigmentExpression) is null, throw ReferenceError",
+ "test": "//CHECK#1\ntry {\n x = y;\n $ERROR('#1.1: x = y throw ReferenceError. Actual: ' + (x = y)); \n}\ncatch (e) {\n if ((e instanceof ReferenceError) !== true) {\n $ERROR('#1.2: x = y throw ReferenceError. Actual: ' + (e)); \n }\n}\n",
+ "id": "S11.13.1_A2.1_T2"
+ },
+ {
+ "section": "11.13.1, 16",
+ "description": "If Type(LeftHandSideExpression) is not Reference, throw ReferenceError (or SyntaxError)",
+ "negative": "",
+ "test": "//CHECK#1\ntry {\n 1 = 1;\n $ERROR('#1.1: 1 = 1 throw ReferenceError (or SyntaxError). Actual: ' + (1 = 1)); \n}\ncatch (e) {\n if ((e instanceof ReferenceError) !== true) {\n $ERROR('#1.2: 1 = 1 throw ReferenceError (or SyntaxError). Actual: ' + (e)); \n } else {\n 1 = 1;\n }\n}\n",
+ "id": "S11.13.1_A2.1_T3"
+ },
+ {
+ "section": "11.13.1",
+ "description": "Checking Expression and Variable statements",
+ "test": "//CHECK#1\nvar x = 1;\nif (x !== 1) {\n $ERROR('#1: var x = 1; x === 1. Actual: ' + (x));\n}\n\n//CHECK#2\ny = 1;\nif (y !== 1) {\n $ERROR('#2: y = 1; y === 1. Actual: ' + (y));\n}\n",
+ "id": "S11.13.1_A3.1"
+ },
+ {
+ "section": "11.13.1",
+ "description": "Checking Expression and Variable statements",
+ "test": "//CHECK#1\nvar x = 0;\nif ((x = 1) !== 1) {\n $ERROR('#1: var x = 0; (x = 1) === 1. Actual: ' + ((x = 1)));\n}\n\n//CHECK#2\nx = 0;\nif ((x = 1) !== 1) {\n $ERROR('#2: x = 0; (x = 1) === 1. Actual: ' + ((x = 1)));\n}\n",
+ "id": "S11.13.1_A3.2"
+ },
+ {
+ "section": "11.13.1",
+ "description": "Syntax check",
+ "test": "//CHECK#1\nx = x = 1;\nif (x !== 1) {\n $ERROR('#1: The expression x = x = 1 is the same x = (x = 1), not (x = x) = 1. Actual: ' + (x));\n}\n\n\n",
+ "id": "S11.13.1_A4_T1"
+ },
+ {
+ "section": "11.13.1",
+ "description": "Syntax check if \"x = x\" throws ReferenceError",
+ "test": "//CHECK#1\ntry {\n x = x;\n $ERROR('#1.1: x = x throw ReferenceError. Actual: ' + (x = x));\n} catch(e) {\n if ((e instanceof ReferenceError) !== true) {\n $ERROR('#1.2: x = x throw ReferenceError. Actual: ' + (e)); \n }\n}\n\n\n",
+ "id": "S11.13.1_A4_T2"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/11.13.2.json b/website/resources/scripts/testcases2/11.13.2.json
new file mode 100644
index 000000000..eb7158d39
--- /dev/null
+++ b/website/resources/scripts/testcases2/11.13.2.json
@@ -0,0 +1,604 @@
+{
+ "testCollection": {
+ "name": "11.13.2",
+ "numTests": 77,
+ "tests": [
+ {
+ "id": "11.13.2-1-s",
+ "path": "TestCases/chapter11/11.13/11.13.2/11.13.2-1-s.js",
+ "description": "Strict Mode - ReferenceError is thrown if the LeftHandSideExpression of a Compound Assignment operator(*=) evaluates to an unresolvable reference",
+ "test": "assertTrue((function testcase() {\n \"use strict\";\n try {\n eval(\"_11_13_2_1 *= 1;\");\n return false;\n } catch (e) {\n return e instanceof ReferenceError;\n }\n }).call(this));\n",
+ "strict_only": ""
+ },
+ {
+ "id": "11.13.2-10-s",
+ "path": "TestCases/chapter11/11.13/11.13.2/11.13.2-10-s.js",
+ "description": "Strict Mode - ReferenceError is thrown if the LeftHandSideExpression of a Compound Assignment operator(^=) evaluates to an unresolvable reference",
+ "test": "assertTrue((function testcase() {\n \"use strict\";\n try {\n eval(\"_11_13_2_10 ^= 1;\");\n return false;\n } catch (e) {\n return e instanceof ReferenceError;\n }\n }).call(this));\n",
+ "strict_only": ""
+ },
+ {
+ "id": "11.13.2-11-s",
+ "path": "TestCases/chapter11/11.13/11.13.2/11.13.2-11-s.js",
+ "description": "Strict Mode - ReferenceError is thrown if the LeftHandSideExpression of a Compound Assignment operator(|=) evaluates to an unresolvable reference",
+ "test": "assertTrue((function testcase() {\n \"use strict\";\n try {\n eval(\"_11_13_2_11 |= 1;\");\n return false;\n } catch (e) {\n return e instanceof ReferenceError;\n }\n }).call(this));\n",
+ "strict_only": ""
+ },
+ {
+ "id": "11.13.2-12-s",
+ "path": "TestCases/chapter11/11.13/11.13.2/11.13.2-12-s.js",
+ "description": "Strict Mode - ReferenceError isn't thrown if the LeftHandSideExpression of a Compound Assignment operator(*=) evaluates to a resolvable reference",
+ "test": "assertTrue((function testcase() {\n \"use strict\";\n var _11_13_2_12 = 5\n _11_13_2_12 *= 2;\n return _11_13_2_12 === 10;\n }).call(this));\n",
+ "strict_only": ""
+ },
+ {
+ "id": "11.13.2-13-s",
+ "path": "TestCases/chapter11/11.13/11.13.2/11.13.2-13-s.js",
+ "description": "Strict Mode - ReferenceError isn't thrown if the LeftHandSideExpression of a Compound Assignment operator(/=) evaluates to a resolvable reference",
+ "test": "assertTrue((function testcase() {\n \"use strict\";\n var _11_13_2_13 = 6\n _11_13_2_13 /= 2;\n return _11_13_2_13 === 3;\n }).call(this));\n",
+ "strict_only": ""
+ },
+ {
+ "id": "11.13.2-14-s",
+ "path": "TestCases/chapter11/11.13/11.13.2/11.13.2-14-s.js",
+ "description": "Strict Mode - ReferenceError isn't thrown if the LeftHandSideExpression of a Compound Assignment operator(%=) evaluates to a resolvable reference",
+ "test": "assertTrue((function testcase() {\n \"use strict\";\n var _11_13_2_14 = 5\n _11_13_2_14 %= 2;\n return _11_13_2_14 === 1;\n }).call(this));\n",
+ "strict_only": ""
+ },
+ {
+ "id": "11.13.2-15-s",
+ "path": "TestCases/chapter11/11.13/11.13.2/11.13.2-15-s.js",
+ "description": "Strict Mode - ReferenceError isn't thrown if the LeftHandSideExpression of a Compound Assignment operator(>>>=) evaluates to a resolvable reference",
+ "test": "assertTrue((function testcase() {\n \"use strict\";\n var _11_13_2_15 = 8\n _11_13_2_15 >>>= 2;\n return _11_13_2_15 === 2;\n }).call(this));\n",
+ "strict_only": ""
+ },
+ {
+ "id": "11.13.2-16-s",
+ "path": "TestCases/chapter11/11.13/11.13.2/11.13.2-16-s.js",
+ "description": "Strict Mode - ReferenceError isn't thrown if the LeftHandSideExpression of a Compound Assignment operator(-=) evaluates to a resolvable reference",
+ "test": "assertTrue((function testcase() {\n \"use strict\";\n var _11_13_2_16 = 5\n _11_13_2_16 -= 2;\n return _11_13_2_16 === 3;\n }).call(this));\n",
+ "strict_only": ""
+ },
+ {
+ "id": "11.13.2-17-s",
+ "path": "TestCases/chapter11/11.13/11.13.2/11.13.2-17-s.js",
+ "description": "Strict Mode - ReferenceError isn't thrown if the LeftHandSideExpression of a Compound Assignment operator(<<=) evaluates to a resolvable reference",
+ "test": "assertTrue((function testcase() {\n \"use strict\";\n var _11_13_2_17 = 1;\n _11_13_2_17 <<= 2;\n return _11_13_2_17 === 4;\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict())",
+ "strict_only": ""
+ },
+ {
+ "id": "11.13.2-18-s",
+ "path": "TestCases/chapter11/11.13/11.13.2/11.13.2-18-s.js",
+ "description": "Strict Mode - ReferenceError isn't thrown if the LeftHandSideExpression of a Compound Assignment operator(>>=) evaluates to a resolvable reference",
+ "test": "assertTrue((function testcase() {\n \"use strict\";\n var _11_13_2_18 = 4\n _11_13_2_18 >>= 2;\n return _11_13_2_18 === 1;\n }).call(this));\n",
+ "strict_only": ""
+ },
+ {
+ "id": "11.13.2-19-s",
+ "path": "TestCases/chapter11/11.13/11.13.2/11.13.2-19-s.js",
+ "description": "Strict Mode - ReferenceError isn't thrown if the LeftHandSideExpression of a Compound Assignment operator(+=) evaluates to a resolvable reference",
+ "test": "assertTrue((function testcase() {\n \"use strict\";\n var _11_13_2_19 = -1\n _11_13_2_19 += 10;\n return _11_13_2_19 === 9;\n }).call(this));\n",
+ "strict_only": ""
+ },
+ {
+ "id": "11.13.2-2-s",
+ "path": "TestCases/chapter11/11.13/11.13.2/11.13.2-2-s.js",
+ "description": "Strict Mode - ReferenceError is thrown if the LeftHandSideExpression of a Compound Assignment operator(/=) evaluates to an unresolvable reference",
+ "test": "assertTrue((function testcase() {\n \"use strict\";\n try {\n eval(\"_11_13_2_2 /= 1;\");\n return false;\n } catch (e) {\n return e instanceof ReferenceError;\n }\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict())",
+ "strict_only": ""
+ },
+ {
+ "id": "11.13.2-20-s",
+ "path": "TestCases/chapter11/11.13/11.13.2/11.13.2-20-s.js",
+ "description": "Strict Mode - ReferenceError isn't thrown if the LeftHandSideExpression of a Compound Assignment operator(&=) evaluates to a resolvable reference",
+ "test": "assertTrue((function testcase() {\n \"use strict\";\n var _11_13_2_20 = 5\n _11_13_2_20 &= 3;\n return _11_13_2_20 === 1;\n }).call(this));\n",
+ "strict_only": ""
+ },
+ {
+ "id": "11.13.2-21-s",
+ "path": "TestCases/chapter11/11.13/11.13.2/11.13.2-21-s.js",
+ "description": "Strict Mode - ReferenceError isn't thrown if the LeftHandSideExpression of a Compound Assignment operator(^=) evaluates to a resolvable reference",
+ "test": "assertTrue((function testcase() {\n \"use strict\";\n var _11_13_2_21 = 5\n _11_13_2_21 ^= 3;\n return _11_13_2_21 === 6;\n }).call(this));\n",
+ "strict_only": ""
+ },
+ {
+ "id": "11.13.2-22-s",
+ "path": "TestCases/chapter11/11.13/11.13.2/11.13.2-22-s.js",
+ "description": "Strict Mode - ReferenceError isn't thrown if the LeftHandSideExpression of a Compound Assignment operator(|=) evaluates to a resolvable reference",
+ "test": "assertTrue((function testcase() {\n \"use strict\";\n var _11_13_2_22 = 5\n _11_13_2_22 |= 2;\n return _11_13_2_22 === 7;\n }).call(this));\n",
+ "strict_only": ""
+ },
+ {
+ "id": "11.13.2-23-s",
+ "path": "TestCases/chapter11/11.13/11.13.2/11.13.2-23-s.js",
+ "description": "Strict Mode - TypeError is thrown if The LeftHandSide of a Compound Assignment operator(*=) is a reference to a data property with the attribute value {[[Writable]]:false}",
+ "test": "assertTrue((function testcase() {\n \"use strict\";\n var obj = {};\n Object.defineProperty(obj, \"prop\", {\n value: 10,\n writable: false,\n enumerable: true,\n configurable: true\n });\n\n try {\n obj.prop *= 20;\n return false;\n } catch (e) {\n return e instanceof TypeError && obj.prop === 10;\n }\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict() && fnExists(Object.defineProperty))",
+ "strict_only": ""
+ },
+ {
+ "id": "11.13.2-24-s",
+ "path": "TestCases/chapter11/11.13/11.13.2/11.13.2-24-s.js",
+ "description": "Strict Mode - TypeError is thrown if The LeftHandSide of a Compound Assignment operator(/=) is a reference to a data property with the attribute value {[[Writable]]:false}",
+ "test": "assertTrue((function testcase() {\n \"use strict\";\n var obj = {};\n Object.defineProperty(obj, \"prop\", {\n value: 10,\n writable: false,\n enumerable: true,\n configurable: true\n });\n\n try {\n obj.prop /= 20;\n return false;\n } catch (e) {\n return e instanceof TypeError && obj.prop === 10;\n }\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict() && fnExists(Object.defineProperty))",
+ "strict_only": ""
+ },
+ {
+ "id": "11.13.2-25-s",
+ "path": "TestCases/chapter11/11.13/11.13.2/11.13.2-25-s.js",
+ "description": "Strict Mode - TypeError is thrown if The LeftHandSide of a Compound Assignment operator(%=) is a reference to a data property with the attribute value {[[Writable]]:false}",
+ "test": "assertTrue((function testcase() {\n \"use strict\";\n var obj = {};\n Object.defineProperty(obj, \"prop\", {\n value: 10,\n writable: false,\n enumerable: true,\n configurable: true\n });\n\n try {\n obj.prop %= 20;\n return false;\n } catch (e) {\n return e instanceof TypeError && obj.prop === 10;\n }\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict() && fnExists(Object.defineProperty))",
+ "strict_only": ""
+ },
+ {
+ "id": "11.13.2-26-s",
+ "path": "TestCases/chapter11/11.13/11.13.2/11.13.2-26-s.js",
+ "description": "Strict Mode - TypeError is thrown if The LeftHandSide of a Compound Assignment operator(+=) is a reference to a data property with the attribute value {[[Writable]]:false}",
+ "test": "assertTrue((function testcase() {\n \"use strict\";\n var obj = {};\n Object.defineProperty(obj, \"prop\", {\n value: 10,\n writable: false,\n enumerable: true,\n configurable: true\n });\n\n try {\n obj.prop += 20;\n return false;\n } catch (e) {\n return e instanceof TypeError && obj.prop === 10;\n }\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict() && fnExists(Object.defineProperty))",
+ "strict_only": ""
+ },
+ {
+ "id": "11.13.2-27-s",
+ "path": "TestCases/chapter11/11.13/11.13.2/11.13.2-27-s.js",
+ "description": "Strict Mode - TypeError is thrown if The LeftHandSide of a Compound Assignment operator(-=) is a reference to a data property with the attribute value {[[Writable]]:false}",
+ "test": "assertTrue((function testcase() {\n \"use strict\";\n var obj = {};\n Object.defineProperty(obj, \"prop\", {\n value: 10,\n writable: false,\n enumerable: true,\n configurable: true\n });\n\n try {\n obj.prop -= 20;\n return false;\n } catch (e) {\n return e instanceof TypeError && obj.prop === 10;\n }\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict() && fnExists(Object.defineProperty))",
+ "strict_only": ""
+ },
+ {
+ "id": "11.13.2-28-s",
+ "path": "TestCases/chapter11/11.13/11.13.2/11.13.2-28-s.js",
+ "description": "Strict Mode - TypeError is thrown if The LeftHandSide of a Compound Assignment operator(<<=) is a reference to a data property with the attribute value {[[Writable]]:false}",
+ "test": "assertTrue((function testcase() {\n \"use strict\";\n var obj = {};\n Object.defineProperty(obj, \"prop\", {\n value: 10,\n writable: false,\n enumerable: true,\n configurable: true\n });\n\n try {\n obj.prop <<= 20;\n return false;\n } catch (e) {\n return e instanceof TypeError && obj.prop === 10;\n }\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict() && fnExists(Object.defineProperty))",
+ "strict_only": ""
+ },
+ {
+ "id": "11.13.2-29-s",
+ "path": "TestCases/chapter11/11.13/11.13.2/11.13.2-29-s.js",
+ "description": "Strict Mode - TypeError is thrown if The LeftHandSide of a Compound Assignment operator(>>=) is a reference to a data property with the attribute value {[[Writable]]:false}",
+ "test": "assertTrue((function testcase() {\n \"use strict\";\n var obj = {};\n Object.defineProperty(obj, \"prop\", {\n value: 10,\n writable: false,\n enumerable: true,\n configurable: true\n });\n\n try {\n obj.prop >>= 20;\n return false;\n } catch (e) {\n return e instanceof TypeError && obj.prop === 10;\n }\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict() && fnExists(Object.defineProperty))",
+ "strict_only": ""
+ },
+ {
+ "id": "11.13.2-3-s",
+ "path": "TestCases/chapter11/11.13/11.13.2/11.13.2-3-s.js",
+ "description": "Strict Mode - ReferenceError is thrown if the LeftHandSideExpression of a Compound Assignment operator(%=) evaluates to an unresolvable reference",
+ "test": "assertTrue((function testcase() {\n \"use strict\";\n try {\n eval(\"_11_13_2_3 %= 1;\");\n return false;\n } catch (e) {\n return e instanceof ReferenceError;\n }\n }).call(this));\n",
+ "strict_only": ""
+ },
+ {
+ "id": "11.13.2-30-s",
+ "path": "TestCases/chapter11/11.13/11.13.2/11.13.2-30-s.js",
+ "description": "Strict Mode - TypeError is thrown if The LeftHandSide of a Compound Assignment operator(>>>=) is a reference to a data property with the attribute value {[[Writable]]:false}",
+ "test": "assertTrue((function testcase() {\n \"use strict\";\n var obj = {};\n Object.defineProperty(obj, \"prop\", {\n value: 10,\n writable: false,\n enumerable: true,\n configurable: true\n });\n\n try {\n obj.prop >>>= 20;\n return false;\n } catch (e) {\n return e instanceof TypeError && obj.prop === 10;\n }\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict() && fnExists(Object.defineProperty))",
+ "strict_only": ""
+ },
+ {
+ "id": "11.13.2-31-s",
+ "path": "TestCases/chapter11/11.13/11.13.2/11.13.2-31-s.js",
+ "description": "Strict Mode - TypeError is thrown if The LeftHandSide of a Compound Assignment operator(&=) is a reference to a data property with the attribute value {[[Writable]]:false}",
+ "test": "assertTrue((function testcase() {\n \"use strict\";\n var obj = {};\n Object.defineProperty(obj, \"prop\", {\n value: 10,\n writable: false,\n enumerable: true,\n configurable: true\n });\n\n try {\n obj.prop &= 20;\n return false;\n } catch (e) {\n return e instanceof TypeError && obj.prop === 10;\n }\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict() && fnExists(Object.defineProperty))",
+ "strict_only": ""
+ },
+ {
+ "id": "11.13.2-32-s",
+ "path": "TestCases/chapter11/11.13/11.13.2/11.13.2-32-s.js",
+ "description": "Strict Mode - TypeError is thrown if The LeftHandSide of a Compound Assignment operator(^=) is a reference to a data property with the attribute value {[[Writable]]:false}",
+ "test": "assertTrue((function testcase() {\n \"use strict\";\n var obj = {};\n Object.defineProperty(obj, \"prop\", {\n value: 10,\n writable: false,\n enumerable: true,\n configurable: true\n });\n\n try {\n obj.prop ^= 20;\n return false;\n } catch (e) {\n return e instanceof TypeError && obj.prop === 10;\n }\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict() && fnExists(Object.defineProperty))",
+ "strict_only": ""
+ },
+ {
+ "id": "11.13.2-33-s",
+ "path": "TestCases/chapter11/11.13/11.13.2/11.13.2-33-s.js",
+ "description": "Strict Mode - TypeError is thrown if The LeftHandSide of a Compound Assignment operator(|=) is a reference to a data property with the attribute value {[[Writable]]:false}",
+ "test": "assertTrue((function testcase() {\n \"use strict\";\n var obj = {};\n Object.defineProperty(obj, \"prop\", {\n value: 10,\n writable: false,\n enumerable: true,\n configurable: true\n });\n\n try {\n obj.prop |= 20;\n return false;\n } catch (e) {\n return e instanceof TypeError && obj.prop === 10;\n }\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict() && fnExists(Object.defineProperty))",
+ "strict_only": ""
+ },
+ {
+ "id": "11.13.2-34-s",
+ "path": "TestCases/chapter11/11.13/11.13.2/11.13.2-34-s.js",
+ "description": "Strict Mode - TypeError is thrown if The LeftHandSide of a Compound Assignment operator(*=) is a reference to an accessor property with the attribute value {[[Set]]:undefined}",
+ "test": "assertTrue((function testcase() {\n \"use strict\";\n var obj = {};\n Object.defineProperty(obj, \"prop\", {\n get: function () {\n return 11;\n },\n set: undefined,\n enumerable: true,\n configurable: true\n });\n\n try {\n obj.prop *= 20;\n return false;\n } catch (e) {\n return e instanceof TypeError && obj.prop === 11;\n }\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict() && fnExists(Object.defineProperty))",
+ "strict_only": ""
+ },
+ {
+ "id": "11.13.2-35-s",
+ "path": "TestCases/chapter11/11.13/11.13.2/11.13.2-35-s.js",
+ "description": "Strict Mode - TypeError is thrown if The LeftHandSide of a Compound Assignment operator(/=) is a reference to an accessor property with the attribute value {[[Set]]:undefined}",
+ "test": "assertTrue((function testcase() {\n \"use strict\";\n var obj = {};\n Object.defineProperty(obj, \"prop\", {\n get: function () {\n return 11;\n },\n set: undefined,\n enumerable: true,\n configurable: true\n });\n\n try {\n obj.prop /= 20;\n return false;\n } catch (e) {\n return e instanceof TypeError && obj.prop === 11;\n }\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict() && fnExists(Object.defineProperty))",
+ "strict_only": ""
+ },
+ {
+ "id": "11.13.2-36-s",
+ "path": "TestCases/chapter11/11.13/11.13.2/11.13.2-36-s.js",
+ "description": "Strict Mode - TypeError is thrown if The LeftHandSide of a Compound Assignment operator(%=) is a reference to an accessor property with the attribute value {[[Set]]:undefined}",
+ "test": "assertTrue((function testcase() {\n \"use strict\";\n var obj = {};\n Object.defineProperty(obj, \"prop\", {\n get: function () {\n return 11;\n },\n set: undefined,\n enumerable: true,\n configurable: true\n });\n\n try {\n obj.prop %= 20;\n return false;\n } catch (e) {\n return e instanceof TypeError && obj.prop === 11;\n }\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict() && fnExists(Object.defineProperty))",
+ "strict_only": ""
+ },
+ {
+ "id": "11.13.2-37-s",
+ "path": "TestCases/chapter11/11.13/11.13.2/11.13.2-37-s.js",
+ "description": "Strict Mode - TypeError is thrown if The LeftHandSide of a Compound Assignment operator(+=) is a reference to an accessor property with the attribute value {[[Set]]:undefined}",
+ "test": "assertTrue((function testcase() {\n \"use strict\";\n var obj = {};\n Object.defineProperty(obj, \"prop\", {\n get: function () {\n return 11;\n },\n set: undefined,\n enumerable: true,\n configurable: true\n });\n\n try {\n obj.prop += 20;\n return false;\n } catch (e) {\n return e instanceof TypeError && obj.prop === 11;\n }\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict() && fnExists(Object.defineProperty))",
+ "strict_only": ""
+ },
+ {
+ "id": "11.13.2-38-s",
+ "path": "TestCases/chapter11/11.13/11.13.2/11.13.2-38-s.js",
+ "description": "Strict Mode - TypeError is thrown if The LeftHandSide of a Compound Assignment operator(-=) is a reference to an accessor property with the attribute value {[[Set]]:undefined}",
+ "test": "assertTrue((function testcase() {\n \"use strict\";\n var obj = {};\n Object.defineProperty(obj, \"prop\", {\n get: function () {\n return 11;\n },\n set: undefined,\n enumerable: true,\n configurable: true\n });\n\n try {\n obj.prop -= 20;\n return false;\n } catch (e) {\n return e instanceof TypeError && obj.prop === 11;\n }\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict() && fnExists(Object.defineProperty))",
+ "strict_only": ""
+ },
+ {
+ "id": "11.13.2-39-s",
+ "path": "TestCases/chapter11/11.13/11.13.2/11.13.2-39-s.js",
+ "description": "Strict Mode - TypeError is thrown if The LeftHandSide of a Compound Assignment operator(<<=) is a reference to an accessor property with the attribute value {[[Set]]:undefined}",
+ "test": "assertTrue((function testcase() {\n \"use strict\";\n var obj = {};\n Object.defineProperty(obj, \"prop\", {\n get: function () {\n return 11;\n },\n set: undefined,\n enumerable: true,\n configurable: true\n });\n\n try {\n obj.prop <<= 20;\n return false;\n } catch (e) {\n return e instanceof TypeError && obj.prop === 11;\n }\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict() && fnExists(Object.defineProperty))",
+ "strict_only": ""
+ },
+ {
+ "id": "11.13.2-4-s",
+ "path": "TestCases/chapter11/11.13/11.13.2/11.13.2-4-s.js",
+ "description": "Strict Mode - ReferenceError is thrown if the LeftHandSideExpression of a Compound Assignment operator(+=) evaluates to an unresolvable reference",
+ "test": "assertTrue((function testcase() {\n \"use strict\";\n try {\n eval(\"_11_13_2_4 += 1;\");\n return false;\n } catch (e) {\n return e instanceof ReferenceError;\n }\n }).call(this));\n",
+ "strict_only": ""
+ },
+ {
+ "id": "11.13.2-40-s",
+ "path": "TestCases/chapter11/11.13/11.13.2/11.13.2-40-s.js",
+ "description": "Strict Mode - TypeError is thrown if The LeftHandSide of a Compound Assignment operator(>>=) is a reference to an accessor property with the attribute value {[[Set]]:undefined}",
+ "test": "assertTrue((function testcase() {\n \"use strict\";\n var obj = {};\n Object.defineProperty(obj, \"prop\", {\n get: function () {\n return 11;\n },\n set: undefined,\n enumerable: true,\n configurable: true\n });\n\n try {\n obj.prop >>= 20;\n return false;\n } catch (e) {\n return e instanceof TypeError && obj.prop === 11;\n }\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict() && fnExists(Object.defineProperty))",
+ "strict_only": ""
+ },
+ {
+ "id": "11.13.2-41-s",
+ "path": "TestCases/chapter11/11.13/11.13.2/11.13.2-41-s.js",
+ "description": "Strict Mode - TypeError is thrown if The LeftHandSide of a Compound Assignment operator(>>>=) is a reference to an accessor property with the attribute value {[[Set]]:undefined}",
+ "test": "assertTrue((function testcase() {\n \"use strict\";\n var obj = {};\n Object.defineProperty(obj, \"prop\", {\n get: function () {\n return 11;\n },\n set: undefined,\n enumerable: true,\n configurable: true\n });\n\n try {\n obj.prop >>>= 20;\n return false;\n } catch (e) {\n return e instanceof TypeError && obj.prop === 11;\n }\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict() && fnExists(Object.defineProperty))",
+ "strict_only": ""
+ },
+ {
+ "id": "11.13.2-42-s",
+ "path": "TestCases/chapter11/11.13/11.13.2/11.13.2-42-s.js",
+ "description": "Strict Mode - TypeError is thrown if The LeftHandSide of a Compound Assignment operator(&=) is a reference to an accessor property with the attribute value {[[Set]]:undefined}",
+ "test": "assertTrue((function testcase() {\n \"use strict\";\n var obj = {};\n Object.defineProperty(obj, \"prop\", {\n get: function () {\n return 11;\n },\n set: undefined,\n enumerable: true,\n configurable: true\n });\n\n try {\n obj.prop &= 20;\n return false;\n } catch (e) {\n return e instanceof TypeError && obj.prop === 11;\n }\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict() && fnExists(Object.defineProperty))",
+ "strict_only": ""
+ },
+ {
+ "id": "11.13.2-43-s",
+ "path": "TestCases/chapter11/11.13/11.13.2/11.13.2-43-s.js",
+ "description": "Strict Mode - TypeError is thrown if The LeftHandSide of a Compound Assignment operator(^=) is a reference to an accessor property with the attribute value {[[Set]]:undefined}",
+ "test": "assertTrue((function testcase() {\n \"use strict\";\n var obj = {};\n Object.defineProperty(obj, \"prop\", {\n get: function () {\n return 11;\n },\n set: undefined,\n enumerable: true,\n configurable: true\n });\n\n try {\n obj.prop ^= 20;\n return false;\n } catch (e) {\n return e instanceof TypeError && obj.prop === 11;\n }\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict() && fnExists(Object.defineProperty))",
+ "strict_only": ""
+ },
+ {
+ "id": "11.13.2-44-s",
+ "path": "TestCases/chapter11/11.13/11.13.2/11.13.2-44-s.js",
+ "description": "Strict Mode - TypeError is thrown if The LeftHandSide of a Compound Assignment operator(|=) is a reference of to an accessor property with the attribute value {[[Set]]:undefined}",
+ "test": "assertTrue((function testcase() {\n \"use strict\";\n var obj = {};\n Object.defineProperty(obj, \"prop\", {\n get: function () {\n return 11;\n },\n set: undefined,\n enumerable: true,\n configurable: true\n });\n\n try {\n obj.prop |= 20;\n return false;\n } catch (e) {\n return e instanceof TypeError && obj.prop === 11;\n }\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict() && fnExists(Object.defineProperty))",
+ "strict_only": ""
+ },
+ {
+ "id": "11.13.2-45-s",
+ "path": "TestCases/chapter11/11.13/11.13.2/11.13.2-45-s.js",
+ "description": "Strict Mode - TypeError is thrown if The LeftHandSide of a Compound Assignment operator(*=) is a reference to a non-existent property of an object whose [[Extensible]] internal property if false",
+ "test": "assertTrue((function testcase() {\n \"use strict\";\n var obj = {};\n Object.preventExtensions(obj);\n\n try {\n obj.len *= 10;\n return false;\n } catch (e) {\n return e instanceof TypeError;\n }\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict() && fnExists(Object.preventExtensions))",
+ "strict_only": ""
+ },
+ {
+ "id": "11.13.2-46-s",
+ "path": "TestCases/chapter11/11.13/11.13.2/11.13.2-46-s.js",
+ "description": "Strict Mode - TypeError is thrown if The LeftHandSide of a Compound Assignment operator(/=) is a reference to a non-existent property of an object whose [[Extensible]] internal property if false",
+ "test": "assertTrue((function testcase() {\n \"use strict\";\n var obj = {};\n Object.preventExtensions(obj);\n\n try {\n obj.len /= 10;\n return false;\n } catch (e) {\n return e instanceof TypeError;\n }\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict() && fnExists(Object.preventExtensions))",
+ "strict_only": ""
+ },
+ {
+ "id": "11.13.2-47-s",
+ "path": "TestCases/chapter11/11.13/11.13.2/11.13.2-47-s.js",
+ "description": "Strict Mode - TypeError is thrown if The LeftHandSide of a Compound Assignment operator(%=) is a reference to a non-existent property of an object whose [[Extensible]] internal property if false",
+ "test": "assertTrue((function testcase() {\n \"use strict\";\n var obj = {};\n Object.preventExtensions(obj);\n\n try {\n obj.len %= 10;\n return false;\n } catch (e) {\n return e instanceof TypeError;\n }\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict() && fnExists(Object.preventExtensions))",
+ "strict_only": ""
+ },
+ {
+ "id": "11.13.2-48-s",
+ "path": "TestCases/chapter11/11.13/11.13.2/11.13.2-48-s.js",
+ "description": "Strict Mode - TypeError is thrown if The LeftHandSide of a Compound Assignment operator(+=) is a reference to a non-existent property of an object whose [[Extensible]] internal property if false",
+ "test": "assertTrue((function testcase() {\n \"use strict\";\n var obj = {};\n Object.preventExtensions(obj);\n\n try {\n obj.len += 10;\n return false;\n } catch (e) {\n return e instanceof TypeError;\n }\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict() && fnExists(Object.preventExtensions))",
+ "strict_only": ""
+ },
+ {
+ "id": "11.13.2-49-s",
+ "path": "TestCases/chapter11/11.13/11.13.2/11.13.2-49-s.js",
+ "description": "Strict Mode - TypeError is thrown if The LeftHandSide of a Compound Assignment operator(-=) is a reference to a non-existent property of an object whose [[Extensible]] internal property if false",
+ "test": "assertTrue((function testcase() {\n \"use strict\";\n var obj = {};\n Object.preventExtensions(obj);\n\n try {\n obj.len -= 10;\n return false;\n } catch (e) {\n return e instanceof TypeError;\n }\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict() && fnExists(Object.preventExtensions))",
+ "strict_only": ""
+ },
+ {
+ "id": "11.13.2-5-s",
+ "path": "TestCases/chapter11/11.13/11.13.2/11.13.2-5-s.js",
+ "description": "Strict Mode - ReferenceError is thrown if the LeftHandSideExpression of a Compound Assignment operator(-=) evaluates to an unresolvable reference",
+ "test": "assertTrue((function testcase() {\n \"use strict\";\n try {\n eval(\"_11_13_2_5 -= 1;\");\n return false;\n } catch (e) {\n return e instanceof ReferenceError;\n }\n }).call(this));\n",
+ "strict_only": ""
+ },
+ {
+ "id": "11.13.2-50-s",
+ "path": "TestCases/chapter11/11.13/11.13.2/11.13.2-50-s.js",
+ "description": "Strict Mode - TypeError is thrown if The LeftHandSide of a Compound Assignment operator(<<=) is a reference to a non-existent property of an object whose [[Extensible]] internal property if false",
+ "test": "assertTrue((function testcase() {\n \"use strict\";\n var obj = {};\n Object.preventExtensions(obj);\n\n try {\n obj.len <<= 10;\n return false;\n } catch (e) {\n return e instanceof TypeError;\n }\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict() && fnExists(Object.preventExtensions))",
+ "strict_only": ""
+ },
+ {
+ "id": "11.13.2-51-s",
+ "path": "TestCases/chapter11/11.13/11.13.2/11.13.2-51-s.js",
+ "description": "Strict Mode - TypeError is thrown if The LeftHandSide of a Compound Assignment operator(>>=) is a reference to a non-existent property of an object whose [[Extensible]] internal property if false",
+ "test": "assertTrue((function testcase() {\n \"use strict\";\n var obj = {};\n Object.preventExtensions(obj);\n\n try {\n obj.len >>= 10;\n return false;\n } catch (e) {\n return e instanceof TypeError;\n }\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict() && fnExists(Object.preventExtensions))",
+ "strict_only": ""
+ },
+ {
+ "id": "11.13.2-52-s",
+ "path": "TestCases/chapter11/11.13/11.13.2/11.13.2-52-s.js",
+ "description": "Strict Mode - TypeError is thrown if The LeftHandSide of a Compound Assignment operator(>>>=) is a reference to a non-existent property of an object whose [[Extensible]] internal property if false",
+ "test": "assertTrue((function testcase() {\n \"use strict\";\n var obj = {};\n Object.preventExtensions(obj);\n\n try {\n obj.len >>>= 10;\n return false;\n } catch (e) {\n return e instanceof TypeError;\n }\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict() && fnExists(Object.preventExtensions))",
+ "strict_only": ""
+ },
+ {
+ "id": "11.13.2-53-s",
+ "path": "TestCases/chapter11/11.13/11.13.2/11.13.2-53-s.js",
+ "description": "Strict Mode - TypeError is thrown if The LeftHandSide of a Compound Assignment operator(&=) is a reference to a non-existent property of an object whose [[Extensible]] internal property if false",
+ "test": "assertTrue((function testcase() {\n \"use strict\";\n var obj = {};\n Object.preventExtensions(obj);\n\n try {\n obj.len &= 10;\n return false;\n } catch (e) {\n return e instanceof TypeError;\n }\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict() && fnExists(Object.preventExtensions))",
+ "strict_only": ""
+ },
+ {
+ "id": "11.13.2-54-s",
+ "path": "TestCases/chapter11/11.13/11.13.2/11.13.2-54-s.js",
+ "description": "Strict Mode - TypeError is thrown if The LeftHandSide of a Compound Assignment operator(^=) is a reference to a non-existent property of an object whose [[Extensible]] internal property if false",
+ "test": "assertTrue((function testcase() {\n \"use strict\";\n var obj = {};\n Object.preventExtensions(obj);\n\n try {\n obj.len ^= 10;\n return false;\n } catch (e) {\n return e instanceof TypeError;\n }\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict() && fnExists(Object.preventExtensions))",
+ "strict_only": ""
+ },
+ {
+ "id": "11.13.2-55-s",
+ "path": "TestCases/chapter11/11.13/11.13.2/11.13.2-55-s.js",
+ "description": "Strict Mode - TypeError is thrown if The LeftHandSide of a Compound Assignment operator(|=) is a reference to a non-existent property of an object whose [[Extensible]] internal property if false",
+ "test": "assertTrue((function testcase() {\n \"use strict\";\n var obj = {};\n Object.preventExtensions(obj);\n\n try {\n obj.len |= 10;\n return false;\n } catch (e) {\n return e instanceof TypeError;\n }\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict() && fnExists(Object.preventExtensions))",
+ "strict_only": ""
+ },
+ {
+ "id": "11.13.2-6-1-s",
+ "path": "TestCases/chapter11/11.13/11.13.2/11.13.2-6-1-s.js",
+ "description": "Strict Mode - SyntaxError is thrown if the identifier eval appear as the LeftHandSideExpression of a Compound Assignment operator(*=)",
+ "test": "assertTrue((function testcase() {\n \"use strict\";\n var blah = eval;\n try {\n eval(\"eval *= 20;\");\n return false;\n } catch (e) {\n return e instanceof SyntaxError && blah === eval;\n }\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict())",
+ "strict_only": ""
+ },
+ {
+ "id": "11.13.2-6-10-s",
+ "path": "TestCases/chapter11/11.13/11.13.2/11.13.2-6-10-s.js",
+ "description": "Strict Mode - SyntaxError is thrown if the identifier eval appear as the LeftHandSideExpression of a Compound Assignment operator(^=)",
+ "test": "assertTrue((function testcase() {\n \"use strict\";\n var blah = eval;\n try {\n eval(\"eval ^= 20;\");\n return false;\n } catch (e) {\n return e instanceof SyntaxError && blah === eval;\n }\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict())",
+ "strict_only": ""
+ },
+ {
+ "id": "11.13.2-6-11-s",
+ "path": "TestCases/chapter11/11.13/11.13.2/11.13.2-6-11-s.js",
+ "description": "Strict Mode - SyntaxError is thrown if the identifier eval appear as the LeftHandSideExpression of a Compound Assignment operator(|=)",
+ "test": "assertTrue((function testcase() {\n \"use strict\";\n var blah = eval;\n try {\n eval(\"eval |= 20;\"); \n return false;\n } catch (e) {\n return e instanceof SyntaxError && blah === eval;\n }\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict())",
+ "strict_only": ""
+ },
+ {
+ "id": "11.13.2-6-12-s",
+ "path": "TestCases/chapter11/11.13/11.13.2/11.13.2-6-12-s.js",
+ "description": "Strict Mode - SyntaxError is thrown if the identifier arguments appear as the LeftHandSideExpression of a Compound Assignment operator(*=)",
+ "test": "assertTrue((function testcase() {\n \"use strict\";\n var blah = arguments;\n try {\n eval(\"arguments *= 20;\");\n return false;\n } catch (e) {\n return e instanceof SyntaxError && blah === arguments;\n }\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict())",
+ "strict_only": ""
+ },
+ {
+ "id": "11.13.2-6-13-s",
+ "path": "TestCases/chapter11/11.13/11.13.2/11.13.2-6-13-s.js",
+ "description": "Strict Mode - SyntaxError is thrown if the identifier arguments appear as the LeftHandSideExpression of a Compound Assignment operator(/=)",
+ "test": "assertTrue((function testcase() {\n \"use strict\";\n var blah = arguments;\n try {\n eval(\"arguments /= 20;\");\n return false;\n } catch (e) {\n return e instanceof SyntaxError && blah === arguments;\n }\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict())",
+ "strict_only": ""
+ },
+ {
+ "id": "11.13.2-6-14-s",
+ "path": "TestCases/chapter11/11.13/11.13.2/11.13.2-6-14-s.js",
+ "description": "Strict Mode - SyntaxError is thrown if the identifier arguments appear as the LeftHandSideExpression of a Compound Assignment operator(%=)",
+ "test": "assertTrue((function testcase() {\n \"use strict\";\n var blah = arguments;\n try {\n eval(\"arguments %= 20;\");\n return false;\n } catch (e) {\n return e instanceof SyntaxError && blah === arguments;\n }\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict())",
+ "strict_only": ""
+ },
+ {
+ "id": "11.13.2-6-15-s",
+ "path": "TestCases/chapter11/11.13/11.13.2/11.13.2-6-15-s.js",
+ "description": "Strict Mode - SyntaxError is thrown if the identifier arguments appear as the LeftHandSideExpression of a Compound Assignment operator(+=)",
+ "test": "assertTrue((function testcase() {\n \"use strict\";\n var blah = arguments;\n try {\n eval(\"arguments += 20;\");\n return false;\n } catch (e) {\n return e instanceof SyntaxError && blah === arguments;\n }\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict())",
+ "strict_only": ""
+ },
+ {
+ "id": "11.13.2-6-16-s",
+ "path": "TestCases/chapter11/11.13/11.13.2/11.13.2-6-16-s.js",
+ "description": "Strict Mode - SyntaxError is thrown if the identifier arguments appear as the LeftHandSideExpression of a Compound Assignment operator(-=)",
+ "test": "assertTrue((function testcase() {\n \"use strict\";\n var blah = arguments;\n try {\n eval(\"arguments -= 20;\");\n return false;\n } catch (e) {\n return e instanceof SyntaxError && blah === arguments;\n }\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict())",
+ "strict_only": ""
+ },
+ {
+ "id": "11.13.2-6-17-s",
+ "path": "TestCases/chapter11/11.13/11.13.2/11.13.2-6-17-s.js",
+ "description": "Strict Mode - SyntaxError is thrown if the identifier arguments appear as the LeftHandSideExpression of a Compound Assignment operator(<<=)",
+ "test": "assertTrue((function testcase() {\n \"use strict\";\n var blah = arguments;\n try {\n eval(\"arguments <<= 20;\");\n return false;\n } catch (e) {\n return e instanceof SyntaxError && blah === arguments;\n }\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict())",
+ "strict_only": ""
+ },
+ {
+ "id": "11.13.2-6-18-s",
+ "path": "TestCases/chapter11/11.13/11.13.2/11.13.2-6-18-s.js",
+ "description": "Strict Mode - SyntaxError is thrown if the identifier arguments appear as the LeftHandSideExpression of a Compound Assignment operator(>>=)",
+ "test": "assertTrue((function testcase() {\n \"use strict\";\n var blah = arguments;\n try {\n eval(\"arguments >>= 20;\");\n return false;\n } catch (e) {\n return e instanceof SyntaxError && blah === arguments;\n }\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict())",
+ "strict_only": ""
+ },
+ {
+ "id": "11.13.2-6-19-s",
+ "path": "TestCases/chapter11/11.13/11.13.2/11.13.2-6-19-s.js",
+ "description": "Strict Mode - SyntaxError is thrown if the identifier arguments appear as the LeftHandSideExpression of a Compound Assignment operator(>>>=)",
+ "test": "assertTrue((function testcase() {\n \"use strict\";\n var blah = arguments;\n try {\n eval(\"arguments >>>= 20;\");\n return false;\n } catch (e) {\n return e instanceof SyntaxError && blah === arguments;\n }\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict())",
+ "strict_only": ""
+ },
+ {
+ "id": "11.13.2-6-2-s",
+ "path": "TestCases/chapter11/11.13/11.13.2/11.13.2-6-2-s.js",
+ "description": "Strict Mode - SyntaxError is thrown if the identifier eval appear as the LeftHandSideExpression of a Compound Assignment operator(/=)",
+ "test": "assertTrue((function testcase() {\n \"use strict\";\n var blah = eval;\n try {\n eval(\"eval /= 20;\");\n return false;\n } catch (e) {\n return e instanceof SyntaxError && blah === eval;\n }\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict())",
+ "strict_only": ""
+ },
+ {
+ "id": "11.13.2-6-20-s",
+ "path": "TestCases/chapter11/11.13/11.13.2/11.13.2-6-20-s.js",
+ "description": "Strict Mode - SyntaxError is thrown if the identifier arguments appear as the LeftHandSideExpression of a Compound Assignment operator(&=)",
+ "test": "assertTrue((function testcase() {\n \"use strict\";\n var blah = arguments;\n try {\n eval(\"arguments &= 20;\");\n return false;\n } catch (e) {\n return e instanceof SyntaxError && blah === arguments;\n }\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict())",
+ "strict_only": ""
+ },
+ {
+ "id": "11.13.2-6-21-s",
+ "path": "TestCases/chapter11/11.13/11.13.2/11.13.2-6-21-s.js",
+ "description": "Strict Mode - SyntaxError is thrown if the identifier arguments appear as the LeftHandSideExpression of a Compound Assignment operator(^=)",
+ "test": "assertTrue((function testcase() {\n \"use strict\";\n var blah = arguments;\n try {\n eval(\"arguments ^= 20;\");\n return false;\n } catch (e) {\n return e instanceof SyntaxError && blah === arguments;\n }\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict())",
+ "strict_only": ""
+ },
+ {
+ "id": "11.13.2-6-22-s",
+ "path": "TestCases/chapter11/11.13/11.13.2/11.13.2-6-22-s.js",
+ "description": "Strict Mode - SyntaxError is thrown if the identifier arguments appear as the LeftHandSideExpression of a Compound Assignment operator(|=)",
+ "test": "assertTrue((function testcase() {\n \"use strict\";\n var blah = arguments;\n try {\n eval(\"arguments |= 20;\");\n return false;\n } catch (e) {\n return e instanceof SyntaxError && blah === arguments;\n }\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict())",
+ "strict_only": ""
+ },
+ {
+ "id": "11.13.2-6-3-s",
+ "path": "TestCases/chapter11/11.13/11.13.2/11.13.2-6-3-s.js",
+ "description": "Strict Mode - SyntaxError is thrown if the identifier eval appear as the LeftHandSideExpression of a Compound Assignment operator(%=)",
+ "test": "assertTrue((function testcase() {\n \"use strict\";\n var blah = eval;\n try {\n eval(\"eval %= 20;\");\n return false;\n } catch (e) {\n return e instanceof SyntaxError && blah === eval;\n }\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict())",
+ "strict_only": ""
+ },
+ {
+ "id": "11.13.2-6-4-s",
+ "path": "TestCases/chapter11/11.13/11.13.2/11.13.2-6-4-s.js",
+ "description": "Strict Mode - SyntaxError is thrown if the identifier eval appear as the LeftHandSideExpression of a Compound Assignment operator(+=)",
+ "test": "assertTrue((function testcase() {\n \"use strict\";\n var blah = eval;\n try {\n eval(\"eval += 20;\");\n return false;\n } catch (e) {\n return e instanceof SyntaxError && blah === eval;\n }\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict())",
+ "strict_only": ""
+ },
+ {
+ "id": "11.13.2-6-5-s",
+ "path": "TestCases/chapter11/11.13/11.13.2/11.13.2-6-5-s.js",
+ "description": "Strict Mode - SyntaxError is thrown if the identifier eval appear as the LeftHandSideExpression of a Compound Assignment operator(-=)",
+ "test": "assertTrue((function testcase() {\n \"use strict\";\n var blah = eval;\n try {\n eval(\"eval -= 20;\");\n return false;\n } catch (e) {\n return e instanceof SyntaxError && blah === eval;\n }\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict())",
+ "strict_only": ""
+ },
+ {
+ "id": "11.13.2-6-6-s",
+ "path": "TestCases/chapter11/11.13/11.13.2/11.13.2-6-6-s.js",
+ "description": "Strict Mode - SyntaxError is thrown if the identifier eval appear as the LeftHandSideExpression of a Compound Assignment operator(<<=)",
+ "test": "assertTrue((function testcase() {\n \"use strict\";\n var blah = eval;\n try {\n eval(\"eval <<= 20;\");\n return false;\n } catch (e) {\n return e instanceof SyntaxError && blah === eval;\n }\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict())",
+ "strict_only": ""
+ },
+ {
+ "id": "11.13.2-6-7-s",
+ "path": "TestCases/chapter11/11.13/11.13.2/11.13.2-6-7-s.js",
+ "description": "Strict Mode - SyntaxError is thrown if the identifier eval appear as the LeftHandSideExpression of a Compound Assignment operator(>>=)",
+ "test": "assertTrue((function testcase() {\n \"use strict\";\n var blah = eval;\n try {\n eval(\"eval >>= 20;\");\n return false;\n } catch (e) {\n return e instanceof SyntaxError && blah === eval;\n }\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict())",
+ "strict_only": ""
+ },
+ {
+ "id": "11.13.2-6-8-s",
+ "path": "TestCases/chapter11/11.13/11.13.2/11.13.2-6-8-s.js",
+ "description": "Strict Mode - SyntaxError is thrown if the identifier eval appear as the LeftHandSideExpression of a Compound Assignment operator(>>>=)",
+ "test": "assertTrue((function testcase() {\n \"use strict\";\n var blah = eval;\n try {\n eval(\"eval >>>= 20;\");\n return false;\n } catch (e) {\n return e instanceof SyntaxError && blah === eval;\n }\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict())",
+ "strict_only": ""
+ },
+ {
+ "id": "11.13.2-6-9-s",
+ "path": "TestCases/chapter11/11.13/11.13.2/11.13.2-6-9-s.js",
+ "description": "Strict Mode - SyntaxError is thrown if the identifier eval appear as the LeftHandSideExpression of a Compound Assignment operator(&=)",
+ "test": "assertTrue((function testcase() {\n \"use strict\";\n var blah = eval;\n try {\n eval(\"eval &= 20;\");\n return false;\n } catch (e) {\n return e instanceof SyntaxError && blah === eval;\n }\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict())",
+ "strict_only": ""
+ },
+ {
+ "id": "11.13.2-6-s",
+ "path": "TestCases/chapter11/11.13/11.13.2/11.13.2-6-s.js",
+ "description": "Strict Mode - ReferenceError is thrown if the LeftHandSideExpression of a Compound Assignment operator(<<=) evaluates to an unresolvable reference",
+ "test": "assertTrue((function testcase() {\n \"use strict\";\n try {\n eval(\"_11_13_2_6 <<= 1;\");\n return false;\n } catch (e) {\n return e instanceof ReferenceError;\n }\n }).call(this));\n",
+ "strict_only": ""
+ },
+ {
+ "id": "11.13.2-7-s",
+ "path": "TestCases/chapter11/11.13/11.13.2/11.13.2-7-s.js",
+ "description": "Strict Mode - ReferenceError is thrown if the LeftHandSideExpression of a Compound Assignment operator(>>=) evaluates to an unresolvable reference",
+ "test": "assertTrue((function testcase() {\n \"use strict\";\n try {\n eval(\"_11_13_2_7 >>= 1;\");\n return false;\n } catch (e) {\n return e instanceof ReferenceError;\n }\n }).call(this));\n",
+ "strict_only": ""
+ },
+ {
+ "id": "11.13.2-8-s",
+ "path": "TestCases/chapter11/11.13/11.13.2/11.13.2-8-s.js",
+ "description": "Strict Mode - ReferenceError is thrown if the LeftHandSideExpression of a Compound Assignment operator(>>>=) evaluates to an unresolvable reference",
+ "test": "assertTrue((function testcase() {\n \"use strict\";\n try {\n eval(\"_11_13_2_8 >>>= 1;\");\n return false;\n } catch (e) {\n return e instanceof ReferenceError;\n }\n }).call(this));\n",
+ "strict_only": ""
+ },
+ {
+ "id": "11.13.2-9-s",
+ "path": "TestCases/chapter11/11.13/11.13.2/11.13.2-9-s.js",
+ "description": "Strict Mode - ReferenceError is thrown if the LeftHandSideExpression of a Compound Assignment operator(&=) evaluates to an unresolvable reference",
+ "test": "assertTrue((function testcase() {\n \"use strict\";\n try {\n eval(\"_11_13_2_9 &= 1;\");\n return false;\n } catch (e) {\n return e instanceof ReferenceError;\n }\n }).call(this));\n",
+ "strict_only": ""
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/11.13.2_Compound_Assignment.json b/website/resources/scripts/testcases2/11.13.2_Compound_Assignment.json
new file mode 100644
index 000000000..7df3948cb
--- /dev/null
+++ b/website/resources/scripts/testcases2/11.13.2_Compound_Assignment.json
@@ -0,0 +1,1339 @@
+{
+ "testCollection": {
+ "name": "11.13.2_Compound_Assignment",
+ "numTests": 220,
+ "tests": [
+ {
+ "section": "11.13.2",
+ "description": "Checking by using eval, check operator is x *= y",
+ "test": "//CHECK#1\nx = -1;\nif ((eval(\"x\\u0009*=\\u0009-1\")) !== 1) {\n $ERROR('#1: x = -1; (x\\\\u0009*=\\\\u0009-1) === 1');\n}\n\n//CHECK#2\nx = -1;\nif ((eval(\"x\\u000B*=\\u000B-1\")) !== 1) {\n $ERROR('#2: x = -1; (x\\\\u000B*=\\\\u000B-1) === 1'); \n}\n\n//CHECK#3\nx = -1;\nif ((eval(\"x\\u000C*=\\u000C-1\")) !== 1) {\n $ERROR('#3: x = -1; (x\\\\u000C*=\\\\u000C-1) === 1');\n}\n\n//CHECK#4\nx = -1;\nif ((eval(\"x\\u0020*=\\u0020-1\")) !== 1) {\n $ERROR('#4: x = -1; (x\\\\u0020*=\\\\u0020-1) === 1');\n}\n\n//CHECK#5\nx = -1;\nif ((eval(\"x\\u00A0*=\\u00A0-1\")) !== 1) {\n $ERROR('#5: x = -1; (x\\\\u00A0*=\\\\u00A0-1) === 1');\n}\n\n//CHECK#6\nx = -1;\nif ((eval(\"x\\u000A*=\\u000A-1\")) !== 1) {\n $ERROR('#6: x = -1; (x\\\\u000A*=\\\\u000A-1) === 1'); \n}\n\n//CHECK#7\nx = -1;\nif ((eval(\"x\\u000D*=\\u000D-1\")) !== 1) {\n $ERROR('#7: x = -1; (x\\\\u000D*=\\\\u000D-1) === 1');\n}\n\n//CHECK#8\nx = -1;\nif ((eval(\"x\\u2028*=\\u2028-1\")) !== 1) {\n $ERROR('#8: x = -1; (x\\\\u2028*=\\\\u2028-1) === 1');\n}\n\n//CHECK#9\nx = -1;\nif ((eval(\"x\\u2029*=\\u2029-1\")) !== 1) {\n $ERROR('#9: x = -1; (x\\\\u2029*=\\\\u2029-1) === 1');\n}\n\n\n//CHECK#10\nx = -1;\nif ((eval(\"x\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u2029*=\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u2029-1\")) !== 1) {\n $ERROR('#10: x = -1; (x\\\\u0009\\\\u000B\\\\u000C\\\\u0020\\\\u00A0\\\\u000A\\\\u000D\\\\u2028\\\\u2029*=\\\\u0009\\\\u000B\\\\u000C\\\\u0020\\\\u00A0\\\\u000A\\\\u000D\\\\u2028\\\\u2029-1) === 1');\n}\n",
+ "id": "S11.13.2_A1_T1"
+ },
+ {
+ "section": "11.13.2",
+ "description": "Checking by using eval, check operator is x ^= y",
+ "test": "//CHECK#1\nx = 1;\nif ((eval(\"x\\u0009^=\\u00091\")) !== 0) {\n $ERROR('#1: x = 1; (x\\\\u0009^=\\\\u00091) === 0');\n}\n\n//CHECK#2\nx = 1;\nif ((eval(\"x\\u000B^=\\u000B1\")) !== 0) {\n $ERROR('#2: x = 1; (x\\\\u000B^=\\\\u000B1) === 0'); \n}\n\n//CHECK#3\nx = 1;\nif ((eval(\"x\\u000C^=\\u000C1\")) !== 0) {\n $ERROR('#3: x = 1; (x\\\\u000C^=\\\\u000C1) === 0');\n}\n\n//CHECK#4\nx = 1;\nif ((eval(\"x\\u0020^=\\u00201\")) !== 0) {\n $ERROR('#4: x = 1; (x\\\\u0020^=\\\\u00201) === 0');\n}\n\n//CHECK#5\nx = 1;\nif ((eval(\"x\\u00A0^=\\u00A01\")) !== 0) {\n $ERROR('#5: x = 1; (x\\\\u00A0^=\\\\u00A01) === 0');\n}\n\n//CHECK#6\nx = 1;\nif ((eval(\"x\\u000A^=\\u000A1\")) !== 0) {\n $ERROR('#6: x = 1; (x\\\\u000A^=\\\\u000A1) === 0'); \n}\n\n//CHECK#7\nx = 1;\nif ((eval(\"x\\u000D^=\\u000D1\")) !== 0) {\n $ERROR('#7: x = 1; (x\\\\u000D^=\\\\u000D1) === 0');\n}\n\n//CHECK#8\nx = 1;\nif ((eval(\"x\\u2028^=\\u20281\")) !== 0) {\n $ERROR('#8: x = 1; (x\\\\u2028^=\\\\u20281) === 0');\n}\n\n//CHECK#9\nx = 1;\nif ((eval(\"x\\u2029^=\\u20291\")) !== 0) {\n $ERROR('#9: x = 1; (x\\\\u2029^=\\\\u20291) === 0');\n}\n\n\n//CHECK#10\nx = 1;\nif ((eval(\"x\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u2029^=\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u20291\")) !== 0) {\n $ERROR('#10: x = 1; (x\\\\u0009\\\\u000B\\\\u000C\\\\u0020\\\\u00A0\\\\u000A\\\\u000D\\\\u2028\\\\u2029^=\\\\u0009\\\\u000B\\\\u000C\\\\u0020\\\\u00A0\\\\u000A\\\\u000D\\\\u2028\\\\u20291) === 0');\n}\n",
+ "id": "S11.13.2_A1_T10"
+ },
+ {
+ "section": "11.13.2",
+ "description": "Checking by using eval, check operator is x |= y",
+ "test": "//CHECK#1\nx = 0;\nif ((eval(\"x\\u0009|=\\u00091\")) !== 1) {\n $ERROR('#1: x = 0; (x\\\\u0009|=\\\\u00091) === 1');\n}\n\n//CHECK#2\nx = 0;\nif ((eval(\"x\\u000B|=\\u000B1\")) !== 1) {\n $ERROR('#2: x = 0; (x\\\\u000B|=\\\\u000B1) === 1'); \n}\n\n//CHECK#3\nx = 0;\nif ((eval(\"x\\u000C|=\\u000C1\")) !== 1) {\n $ERROR('#3: x = 0; (x\\\\u000C|=\\\\u000C1) === 1');\n}\n\n//CHECK#4\nx = 0;\nif ((eval(\"x\\u0020|=\\u00201\")) !== 1) {\n $ERROR('#4: x = 0; (x\\\\u0020|=\\\\u00201) === 1');\n}\n\n//CHECK#5\nx = 0;\nif ((eval(\"x\\u00A0|=\\u00A01\")) !== 1) {\n $ERROR('#5: x = 0; (x\\\\u00A0|=\\\\u00A01) === 1');\n}\n\n//CHECK#6\nx = 0;\nif ((eval(\"x\\u000A|=\\u000A1\")) !== 1) {\n $ERROR('#6: x = 0; (x\\\\u000A|=\\\\u000A1) === 1'); \n}\n\n//CHECK#7\nx = 0;\nif ((eval(\"x\\u000D|=\\u000D1\")) !== 1) {\n $ERROR('#7: x = 0; (x\\\\u000D|=\\\\u000D1) === 1');\n}\n\n//CHECK#8\nx = 0;\nif ((eval(\"x\\u2028|=\\u20281\")) !== 1) {\n $ERROR('#8: x = 0; (x\\\\u2028|=\\\\u20281) === 1');\n}\n\n//CHECK#9\nx = 0;\nif ((eval(\"x\\u2029|=\\u20291\")) !== 1) {\n $ERROR('#9: x = 0; (x\\\\u2029|=\\\\u20291) === 1');\n}\n\n\n//CHECK#10\nx = 0;\nif ((eval(\"x\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u2029|=\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u20291\")) !== 1) {\n $ERROR('#10: x = 0; (x\\\\u0009\\\\u000B\\\\u000C\\\\u0020\\\\u00A0\\\\u000A\\\\u000D\\\\u2028\\\\u2029|=\\\\u0009\\\\u000B\\\\u000C\\\\u0020\\\\u00A0\\\\u000A\\\\u000D\\\\u2028\\\\u20291) === 1');\n}\n",
+ "id": "S11.13.2_A1_T11"
+ },
+ {
+ "section": "11.13.2",
+ "description": "Checking by using eval, check operator is x /= y",
+ "test": "//CHECK#1\nx = -1;\nif ((eval(\"x\\u0009/=\\u0009-1\")) !== 1) {\n $ERROR('#1: x = -1; (x\\\\u0009/=\\\\u0009-1) === 1');\n}\n\n//CHECK#2\nx = -1;\nif ((eval(\"x\\u000B/=\\u000B-1\")) !== 1) {\n $ERROR('#2: x = -1; (x\\\\u000B/=\\\\u000B-1) === 1'); \n}\n\n//CHECK#3\nx = -1;\nif ((eval(\"x\\u000C/=\\u000C-1\")) !== 1) {\n $ERROR('#3: x = -1; (x\\\\u000C/=\\\\u000C-1) === 1');\n}\n\n//CHECK#4\nx = -1;\nif ((eval(\"x\\u0020/=\\u0020-1\")) !== 1) {\n $ERROR('#4: x = -1; (x\\\\u0020/=\\\\u0020-1) === 1');\n}\n\n//CHECK#5\nx = -1;\nif ((eval(\"x\\u00A0/=\\u00A0-1\")) !== 1) {\n $ERROR('#5: x = -1; (x\\\\u00A0/=\\\\u00A0-1) === 1');\n}\n\n//CHECK#6\nx = -1;\nif ((eval(\"x\\u000A/=\\u000A-1\")) !== 1) {\n $ERROR('#6: x = -1; (x\\\\u000A/=\\\\u000A-1) === 1'); \n}\n\n//CHECK#7\nx = -1;\nif ((eval(\"x\\u000D/=\\u000D-1\")) !== 1) {\n $ERROR('#7: x = -1; (x\\\\u000D/=\\\\u000D-1) === 1');\n}\n\n//CHECK#8\nx = -1;\nif ((eval(\"x\\u2028/=\\u2028-1\")) !== 1) {\n $ERROR('#8: x = -1; (x\\\\u2028/=\\\\u2028-1) === 1');\n}\n\n//CHECK#9\nx = -1;\nif ((eval(\"x\\u2029/=\\u2029-1\")) !== 1) {\n $ERROR('#9: x = -1; (x\\\\u2029/=\\\\u2029-1) === 1');\n}\n\n\n//CHECK#10\nx = -1;\nif ((eval(\"x\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u2029/=\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u2029-1\")) !== 1) {\n $ERROR('#10: x = -1; (x\\\\u0009\\\\u000B\\\\u000C\\\\u0020\\\\u00A0\\\\u000A\\\\u000D\\\\u2028\\\\u2029/=\\\\u0009\\\\u000B\\\\u000C\\\\u0020\\\\u00A0\\\\u000A\\\\u000D\\\\u2028\\\\u2029-1) === 1');\n}\n",
+ "id": "S11.13.2_A1_T2"
+ },
+ {
+ "section": "11.13.2",
+ "description": "Checking by using eval, check operator is x %= y",
+ "test": "//CHECK#1\nx = -1;\nif ((eval(\"x\\u0009%=\\u0009-1\")) !== 0) {\n $ERROR('#1: x = -1; (x\\\\u0009%=\\\\u0009-1) === 0');\n}\n\n//CHECK#2\nx = -1;\nif ((eval(\"x\\u000B%=\\u000B-1\")) !== 0) {\n $ERROR('#2: x = -1; (x\\\\u000B%=\\\\u000B-1) === 0'); \n}\n\n//CHECK#3\nx = -1;\nif ((eval(\"x\\u000C%=\\u000C-1\")) !== 0) {\n $ERROR('#3: x = -1; (x\\\\u000C%=\\\\u000C-1) === 0');\n}\n\n//CHECK#4\nx = -1;\nif ((eval(\"x\\u0020%=\\u0020-1\")) !== 0) {\n $ERROR('#4: x = -1; (x\\\\u0020%=\\\\u0020-1) === 0');\n}\n\n//CHECK#5\nx = -1;\nif ((eval(\"x\\u00A0%=\\u00A0-1\")) !== 0) {\n $ERROR('#5: x = -1; (x\\\\u00A0%=\\\\u00A0-1) === 0');\n}\n\n//CHECK#6\nx = -1;\nif ((eval(\"x\\u000A%=\\u000A-1\")) !== 0) {\n $ERROR('#6: x = -1; (x\\\\u000A%=\\\\u000A-1) === 0'); \n}\n\n//CHECK#7\nx = -1;\nif ((eval(\"x\\u000D%=\\u000D-1\")) !== 0) {\n $ERROR('#7: x = -1; (x\\\\u000D%=\\\\u000D-1) === 0');\n}\n\n//CHECK#8\nx = -1;\nif ((eval(\"x\\u2028%=\\u2028-1\")) !== 0) {\n $ERROR('#8: x = -1; (x\\\\u2028%=\\\\u2028-1) === 0');\n}\n\n//CHECK#9\nx = -1;\nif ((eval(\"x\\u2029%=\\u2029-1\")) !== 0) {\n $ERROR('#9: x = -1; (x\\\\u2029%=\\\\u2029-1) === 0');\n}\n\n\n//CHECK#10\nx = -1;\nif ((eval(\"x\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u2029%=\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u2029-1\")) !== 0) {\n $ERROR('#10: x = -1; (x\\\\u0009\\\\u000B\\\\u000C\\\\u0020\\\\u00A0\\\\u000A\\\\u000D\\\\u2028\\\\u2029%=\\\\u0009\\\\u000B\\\\u000C\\\\u0020\\\\u00A0\\\\u000A\\\\u000D\\\\u2028\\\\u2029-1) === 0');\n}\n",
+ "id": "S11.13.2_A1_T3"
+ },
+ {
+ "section": "11.13.2",
+ "description": "Checking by using eval, check operator is x += y",
+ "test": "//CHECK#1\nx = -1;\nif ((eval(\"x\\u0009+=\\u0009-1\")) !== -2) {\n $ERROR('#1: x = -1; (x\\\\u0009+=\\\\u0009-1) === -2');\n}\n\n//CHECK#2\nx = -1;\nif ((eval(\"x\\u000B+=\\u000B-1\")) !== -2) {\n $ERROR('#2: x = -1; (x\\\\u000B+=\\\\u000B-1) === -2'); \n}\n\n//CHECK#3\nx = -1;\nif ((eval(\"x\\u000C+=\\u000C-1\")) !== -2) {\n $ERROR('#3: x = -1; (x\\\\u000C+=\\\\u000C-1) === -2');\n}\n\n//CHECK#4\nx = -1;\nif ((eval(\"x\\u0020+=\\u0020-1\")) !== -2) {\n $ERROR('#4: x = -1; (x\\\\u0020+=\\\\u0020-1) === -2');\n}\n\n//CHECK#5\nx = -1;\nif ((eval(\"x\\u00A0+=\\u00A0-1\")) !== -2) {\n $ERROR('#5: x = -1; (x\\\\u00A0+=\\\\u00A0-1) === -2');\n}\n\n//CHECK#6\nx = -1;\nif ((eval(\"x\\u000A+=\\u000A-1\")) !== -2) {\n $ERROR('#6: x = -1; (x\\\\u000A+=\\\\u000A-1) === -2'); \n}\n\n//CHECK#7\nx = -1;\nif ((eval(\"x\\u000D+=\\u000D-1\")) !== -2) {\n $ERROR('#7: x = -1; (x\\\\u000D+=\\\\u000D-1) === -2');\n}\n\n//CHECK#8\nx = -1;\nif ((eval(\"x\\u2028+=\\u2028-1\")) !== -2) {\n $ERROR('#8: x = -1; (x\\\\u2028+=\\\\u2028-1) === -2');\n}\n\n//CHECK#9\nx = -1;\nif ((eval(\"x\\u2029+=\\u2029-1\")) !== -2) {\n $ERROR('#9: x = -1; (x\\\\u2029+=\\\\u2029-1) === -2');\n}\n\n\n//CHECK#10\nx = -1;\nif ((eval(\"x\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u2029+=\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u2029-1\")) !== -2) {\n $ERROR('#10: x = -1; (x\\\\u0009\\\\u000B\\\\u000C\\\\u0020\\\\u00A0\\\\u000A\\\\u000D\\\\u2028\\\\u2029+=\\\\u0009\\\\u000B\\\\u000C\\\\u0020\\\\u00A0\\\\u000A\\\\u000D\\\\u2028\\\\u2029-1) === -2');\n}\n",
+ "id": "S11.13.2_A1_T4"
+ },
+ {
+ "section": "11.13.2",
+ "description": "Checking by using eval, check operator is x -= y",
+ "test": "//CHECK#1\nx = -1;\nif ((eval(\"x\\u0009-=\\u00091\")) !== -2) {\n $ERROR('#1: x = -1; (x\\\\u0009-=\\\\u00091) === -2');\n}\n\n//CHECK#2\nx = -1;\nif ((eval(\"x\\u000B-=\\u000B1\")) !== -2) {\n $ERROR('#2: x = -1; (x\\\\u000B-=\\\\u000B1) === -2'); \n}\n\n//CHECK#3\nx = -1;\nif ((eval(\"x\\u000C-=\\u000C1\")) !== -2) {\n $ERROR('#3: x = -1; (x\\\\u000C-=\\\\u000C1) === -2');\n}\n\n//CHECK#4\nx = -1;\nif ((eval(\"x\\u0020-=\\u00201\")) !== -2) {\n $ERROR('#4: x = -1; (x\\\\u0020-=\\\\u00201) === -2');\n}\n\n//CHECK#5\nx = -1;\nif ((eval(\"x\\u00A0-=\\u00A01\")) !== -2) {\n $ERROR('#5: x = -1; (x\\\\u00A0-=\\\\u00A01) === -2');\n}\n\n//CHECK#6\nx = -1;\nif ((eval(\"x\\u000A-=\\u000A1\")) !== -2) {\n $ERROR('#6: x = -1; (x\\\\u000A-=\\\\u000A1) === -2'); \n}\n\n//CHECK#7\nx = -1;\nif ((eval(\"x\\u000D-=\\u000D1\")) !== -2) {\n $ERROR('#7: x = -1; (x\\\\u000D-=\\\\u000D1) === -2');\n}\n\n//CHECK#8\nx = -1;\nif ((eval(\"x\\u2028-=\\u20281\")) !== -2) {\n $ERROR('#8: x = -1; (x\\\\u2028-=\\\\u20281) === -2');\n}\n\n//CHECK#9\nx = -1;\nif ((eval(\"x\\u2029-=\\u20291\")) !== -2) {\n $ERROR('#9: x = -1; (x\\\\u2029-=\\\\u20291) === -2');\n}\n\n\n//CHECK#10\nx = -1;\nif ((eval(\"x\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u2029-=\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u20291\")) !== -2) {\n $ERROR('#10: x = -1; (x\\\\u0009\\\\u000B\\\\u000C\\\\u0020\\\\u00A0\\\\u000A\\\\u000D\\\\u2028\\\\u2029-=\\\\u0009\\\\u000B\\\\u000C\\\\u0020\\\\u00A0\\\\u000A\\\\u000D\\\\u2028\\\\u20291) === -2');\n}\n",
+ "id": "S11.13.2_A1_T5"
+ },
+ {
+ "section": "11.13.2",
+ "description": "Checking by using eval, check operator is x <<= y",
+ "test": "//CHECK#1\nx = 1;\nif ((eval(\"x\\u0009<<=\\u00091\")) !== 2) {\n $ERROR('#1: x = 1; (x\\\\u0009<<=\\\\u00091) === 2');\n}\n\n//CHECK#2\nx = 1;\nif ((eval(\"x\\u000B<<=\\u000B1\")) !== 2) {\n $ERROR('#2: x = 1; (x\\\\u000B<<=\\\\u000B1) === 2'); \n}\n\n//CHECK#3\nx = 1;\nif ((eval(\"x\\u000C<<=\\u000C1\")) !== 2) {\n $ERROR('#3: x = 1; (x\\\\u000C<<=\\\\u000C1) === 2');\n}\n\n//CHECK#4\nx = 1;\nif ((eval(\"x\\u0020<<=\\u00201\")) !== 2) {\n $ERROR('#4: x = 1; (x\\\\u0020<<=\\\\u00201) === 2');\n}\n\n//CHECK#5\nx = 1;\nif ((eval(\"x\\u00A0<<=\\u00A01\")) !== 2) {\n $ERROR('#5: x = 1; (x\\\\u00A0<<=\\\\u00A01) === 2');\n}\n\n//CHECK#6\nx = 1;\nif ((eval(\"x\\u000A<<=\\u000A1\")) !== 2) {\n $ERROR('#6: x = 1; (x\\\\u000A<<=\\\\u000A1) === 2'); \n}\n\n//CHECK#7\nx = 1;\nif ((eval(\"x\\u000D<<=\\u000D1\")) !== 2) {\n $ERROR('#7: x = 1; (x\\\\u000D<<=\\\\u000D1) === 2');\n}\n\n//CHECK#8\nx = 1;\nif ((eval(\"x\\u2028<<=\\u20281\")) !== 2) {\n $ERROR('#8: x = 1; (x\\\\u2028<<=\\\\u20281) === 2');\n}\n\n//CHECK#9\nx = 1;\nif ((eval(\"x\\u2029<<=\\u20291\")) !== 2) {\n $ERROR('#9: x = 1; (x\\\\u2029<<=\\\\u20291) === 2');\n}\n\n\n//CHECK#10\nx = 1;\nif ((eval(\"x\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u2029<<=\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u20291\")) !== 2) {\n $ERROR('#10: x = 1; (x\\\\u0009\\\\u000B\\\\u000C\\\\u0020\\\\u00A0\\\\u000A\\\\u000D\\\\u2028\\\\u2029<<=\\\\u0009\\\\u000B\\\\u000C\\\\u0020\\\\u00A0\\\\u000A\\\\u000D\\\\u2028\\\\u20291) === 2');\n}\n",
+ "id": "S11.13.2_A1_T6"
+ },
+ {
+ "section": "11.13.2",
+ "description": "Checking by using eval, check operator is x >>= y",
+ "test": "//CHECK#1\nx = 1;\nif ((eval(\"x\\u0009>>=\\u00091\")) !== 0) {\n $ERROR('#1: x = 1; (x\\\\u0009>>=\\\\u00091) === 0');\n}\n\n//CHECK#2\nx = 1;\nif ((eval(\"x\\u000B>>=\\u000B1\")) !== 0) {\n $ERROR('#2: x = 1; (x\\\\u000B>>=\\\\u000B1) === 0'); \n}\n\n//CHECK#3\nx = 1;\nif ((eval(\"x\\u000C>>=\\u000C1\")) !== 0) {\n $ERROR('#3: x = 1; (x\\\\u000C>>=\\\\u000C1) === 0');\n}\n\n//CHECK#4\nx = 1;\nif ((eval(\"x\\u0020>>=\\u00201\")) !== 0) {\n $ERROR('#4: x = 1; (x\\\\u0020>>=\\\\u00201) === 0');\n}\n\n//CHECK#5\nx = 1;\nif ((eval(\"x\\u00A0>>=\\u00A01\")) !== 0) {\n $ERROR('#5: x = 1; (x\\\\u00A0>>=\\\\u00A01) === 0');\n}\n\n//CHECK#6\nx = 1;\nif ((eval(\"x\\u000A>>=\\u000A1\")) !== 0) {\n $ERROR('#6: x = 1; (x\\\\u000A>>=\\\\u000A1) === 0'); \n}\n\n//CHECK#7\nx = 1;\nif ((eval(\"x\\u000D>>=\\u000D1\")) !== 0) {\n $ERROR('#7: x = 1; (x\\\\u000D>>=\\\\u000D1) === 0');\n}\n\n//CHECK#8\nx = 1;\nif ((eval(\"x\\u2028>>=\\u20281\")) !== 0) {\n $ERROR('#8: x = 1; (x\\\\u2028>>=\\\\u20281) === 0');\n}\n\n//CHECK#9\nx = 1;\nif ((eval(\"x\\u2029>>=\\u20291\")) !== 0) {\n $ERROR('#9: x = 1; (x\\\\u2029>>=\\\\u20291) === 0');\n}\n\n\n//CHECK#10\nx = 1;\nif ((eval(\"x\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u2029>>=\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u20291\")) !== 0) {\n $ERROR('#10: x = 1; (x\\\\u0009\\\\u000B\\\\u000C\\\\u0020\\\\u00A0\\\\u000A\\\\u000D\\\\u2028\\\\u2029>>=\\\\u0009\\\\u000B\\\\u000C\\\\u0020\\\\u00A0\\\\u000A\\\\u000D\\\\u2028\\\\u20291) === 0');\n}\n",
+ "id": "S11.13.2_A1_T7"
+ },
+ {
+ "section": "11.13.2",
+ "description": "Checking by using eval, check operator is x >>>= y",
+ "test": "//CHECK#1\nx = 1;\nif ((eval(\"x\\u0009>>>=\\u00091\")) !== 0) {\n $ERROR('#1: x = 1; (x\\\\u0009>>>=\\\\u00091) === 0');\n}\n\n//CHECK#2\nx = 1;\nif ((eval(\"x\\u000B>>>=\\u000B1\")) !== 0) {\n $ERROR('#2: x = 1; (x\\\\u000B>>>=\\\\u000B1) === 0'); \n}\n\n//CHECK#3\nx = 1;\nif ((eval(\"x\\u000C>>>=\\u000C1\")) !== 0) {\n $ERROR('#3: x = 1; (x\\\\u000C>>>=\\\\u000C1) === 0');\n}\n\n//CHECK#4\nx = 1;\nif ((eval(\"x\\u0020>>>=\\u00201\")) !== 0) {\n $ERROR('#4: x = 1; (x\\\\u0020>>>=\\\\u00201) === 0');\n}\n\n//CHECK#5\nx = 1;\nif ((eval(\"x\\u00A0>>>=\\u00A01\")) !== 0) {\n $ERROR('#5: x = 1; (x\\\\u00A0>>>=\\\\u00A01) === 0');\n}\n\n//CHECK#6\nx = 1;\nif ((eval(\"x\\u000A>>>=\\u000A1\")) !== 0) {\n $ERROR('#6: x = 1; (x\\\\u000A>>>=\\\\u000A1) === 0'); \n}\n\n//CHECK#7\nx = 1;\nif ((eval(\"x\\u000D>>>=\\u000D1\")) !== 0) {\n $ERROR('#7: x = 1; (x\\\\u000D>>>=\\\\u000D1) === 0');\n}\n\n//CHECK#8\nx = 1;\nif ((eval(\"x\\u2028>>>=\\u20281\")) !== 0) {\n $ERROR('#8: x = 1; (x\\\\u2028>>>=\\\\u20281) === 0');\n}\n\n//CHECK#9\nx = 1;\nif ((eval(\"x\\u2029>>>=\\u20291\")) !== 0) {\n $ERROR('#9: x = 1; (x\\\\u2029>>>=\\\\u20291) === 0');\n}\n\n\n//CHECK#10\nx = 1;\nif ((eval(\"x\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u2029>>>=\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u20291\")) !== 0) {\n $ERROR('#10: x = 1; (x\\\\u0009\\\\u000B\\\\u000C\\\\u0020\\\\u00A0\\\\u000A\\\\u000D\\\\u2028\\\\u2029>>>=\\\\u0009\\\\u000B\\\\u000C\\\\u0020\\\\u00A0\\\\u000A\\\\u000D\\\\u2028\\\\u20291) === 0');\n}\n",
+ "id": "S11.13.2_A1_T8"
+ },
+ {
+ "section": "11.13.2",
+ "description": "Checking by using eval, check operator is x &= y",
+ "test": "//CHECK#1\nx = 1;\nif ((eval(\"x\\u0009&=\\u00091\")) !== 1) {\n $ERROR('#1: x = 1; (x\\\\u0009&=\\\\u00091) === 1');\n}\n\n//CHECK#2\nx = 1;\nif ((eval(\"x\\u000B&=\\u000B1\")) !== 1) {\n $ERROR('#2: x = 1; (x\\\\u000B&=\\\\u000B1) === 1'); \n}\n\n//CHECK#3\nx = 1;\nif ((eval(\"x\\u000C&=\\u000C1\")) !== 1) {\n $ERROR('#3: x = 1; (x\\\\u000C&=\\\\u000C1) === 1');\n}\n\n//CHECK#4\nx = 1;\nif ((eval(\"x\\u0020&=\\u00201\")) !== 1) {\n $ERROR('#4: x = 1; (x\\\\u0020&=\\\\u00201) === 1');\n}\n\n//CHECK#5\nx = 1;\nif ((eval(\"x\\u00A0&=\\u00A01\")) !== 1) {\n $ERROR('#5: x = 1; (x\\\\u00A0&=\\\\u00A01) === 1');\n}\n\n//CHECK#6\nx = 1;\nif ((eval(\"x\\u000A&=\\u000A1\")) !== 1) {\n $ERROR('#6: x = 1; (x\\\\u000A&=\\\\u000A1) === 1'); \n}\n\n//CHECK#7\nx = 1;\nif ((eval(\"x\\u000D&=\\u000D1\")) !== 1) {\n $ERROR('#7: x = 1; (x\\\\u000D&=\\\\u000D1) === 1');\n}\n\n//CHECK#8\nx = 1;\nif ((eval(\"x\\u2028&=\\u20281\")) !== 1) {\n $ERROR('#8: x = 1; (x\\\\u2028&=\\\\u20281) === 1');\n}\n\n//CHECK#9\nx = 1;\nif ((eval(\"x\\u2029&=\\u20291\")) !== 1) {\n $ERROR('#9: x = 1; (x\\\\u2029&=\\\\u20291) === 1');\n}\n\n\n//CHECK#10\nx = 1;\nif ((eval(\"x\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u2029&=\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u20291\")) !== 1) {\n $ERROR('#10: x = 1; (x\\\\u0009\\\\u000B\\\\u000C\\\\u0020\\\\u00A0\\\\u000A\\\\u000D\\\\u2028\\\\u2029&=\\\\u0009\\\\u000B\\\\u000C\\\\u0020\\\\u00A0\\\\u000A\\\\u000D\\\\u2028\\\\u20291) === 1');\n}\n",
+ "id": "S11.13.2_A1_T9"
+ },
+ {
+ "section": "11.13.2",
+ "description": "Either Type is not Reference or GetBase is not null, check opeartor is \"x *= y\"",
+ "test": "//CHECK#1\nvar x = 1;\nvar z = (x *= -1);\nif (z !== -1) {\n $ERROR('#1: var x = 1; var z = (x *= -1); z === -1. Actual: ' + (z));\n}\n\n//CHECK#2\nvar x = 1;\nvar y = -1;\nvar z = (x *= y);\nif (z !== -1) {\n $ERROR('#2: var x = 1; var y = -1; var z = (x *= y); z === -1. Actual: ' + (z));\n}\n\n",
+ "id": "S11.13.2_A2.1_T1.1"
+ },
+ {
+ "section": "11.13.2",
+ "description": "Either Type is not Reference or GetBase is not null, check opeartor is \"x ^= y\"",
+ "test": "//CHECK#1\nvar x = 1;\nvar z = (x ^= 1);\nif (z !== 0) {\n $ERROR('#1: var x = 1; var z = (x ^= 1); z === 0. Actual: ' + (z));\n}\n\n//CHECK#2\nvar x = 1;\nvar y = 1;\nvar z = (x ^= y);\nif (z !== 0) {\n $ERROR('#2: var x = 1; var y = 1; var z = (x ^= y); z === 0. Actual: ' + (z));\n}\n\n",
+ "id": "S11.13.2_A2.1_T1.10"
+ },
+ {
+ "section": "11.13.2",
+ "description": "Either Type is not Reference or GetBase is not null, check opeartor is \"x |= y\"",
+ "test": "//CHECK#1\nvar x = 0;\nvar z = (x |= 1);\nif (z !== 1) {\n $ERROR('#1: var x = 0; var z = (x |= 1); z === 1. Actual: ' + (z));\n}\n\n//CHECK#2\nvar x = 0;\nvar y = 1;\nvar z = (x |= y);\nif (z !== 1) {\n $ERROR('#2: var x = 0; var y = 1; var z = (x |= y); z === 1. Actual: ' + (z));\n}\n\n",
+ "id": "S11.13.2_A2.1_T1.11"
+ },
+ {
+ "section": "11.13.2",
+ "description": "Either Type is not Reference or GetBase is not null, check opeartor is \"x /= y\"",
+ "test": "//CHECK#1\nvar x = 1;\nvar z = (x /= -1);\nif (z !== -1) {\n $ERROR('#1: var x = 1; var z = (x /= -1); z === -1. Actual: ' + (z));\n}\n\n//CHECK#2\nvar x = 1;\nvar y = -1;\nvar z = (x /= y);\nif (z !== -1) {\n $ERROR('#2: var x = 1; var y = -1; var z = (x /= y); z === -1. Actual: ' + (z));\n}\n\n",
+ "id": "S11.13.2_A2.1_T1.2"
+ },
+ {
+ "section": "11.13.2",
+ "description": "Either Type is not Reference or GetBase is not null, check opeartor is \"x %= y\"",
+ "test": "//CHECK#1\nvar x = -1;\nvar z = (x %= 2);\nif (z !== -1) {\n $ERROR('#1: var x = -1; var z = (x %= 2); z === -1. Actual: ' + (z));\n}\n\n//CHECK#2\nvar x = -1;\nvar y = 2;\nvar z = (x %= y);\nif (z !== -1) {\n $ERROR('#2: var x = -1; var y = 2; var z = (x %= y); z === -1. Actual: ' + (z));\n}\n\n",
+ "id": "S11.13.2_A2.1_T1.3"
+ },
+ {
+ "section": "11.13.2",
+ "description": "Either Type is not Reference or GetBase is not null, check opeartor is \"x += y\"",
+ "test": "//CHECK#1\nvar x = 1;\nvar z = (x += 1);\nif (z !== 2) {\n $ERROR('#1: var x = 1; var z = (x += 1); z === 2. Actual: ' + (z));\n}\n\n//CHECK#2\nvar x = 1;\nvar y = 1;\nvar z = (x += y);\nif (z !== 2) {\n $ERROR('#2: var x = 1; var y = 1; var z = (x += y); z === 2. Actual: ' + (z));\n}\n\n",
+ "id": "S11.13.2_A2.1_T1.4"
+ },
+ {
+ "section": "11.13.2",
+ "description": "Either Type is not Reference or GetBase is not null, check opeartor is \"x -= y\"",
+ "test": "//CHECK#1\nvar x = 1;\nvar z = (x -= 1);\nif (z !== 0) {\n $ERROR('#1: var x = 1; var z = (x -= 1); z === 0. Actual: ' + (z));\n}\n\n//CHECK#2\nvar x = 1;\nvar y = 1;\nvar z = (x -= y);\nif (z !== 0) {\n $ERROR('#2: var x = 1; var y = 1; var z = (x -= y); z === 0. Actual: ' + (z));\n}\n\n",
+ "id": "S11.13.2_A2.1_T1.5"
+ },
+ {
+ "section": "11.13.2",
+ "description": "Either Type is not Reference or GetBase is not null, check opeartor is \"x <<= y\"",
+ "test": "//CHECK#1\nvar x = 1;\nvar z = (x <<= 1);\nif (z !== 2) {\n $ERROR('#1: var x = 1; var z = (x <<= 1); z === 2. Actual: ' + (z));\n}\n\n//CHECK#2\nvar x = 1;\nvar y = 1;\nvar z = (x <<= y);\nif (z !== 2) {\n $ERROR('#2: var x = 1; var y = 1; var z = (x <<= y); z === 2. Actual: ' + (z));\n}\n\n",
+ "id": "S11.13.2_A2.1_T1.6"
+ },
+ {
+ "section": "11.13.2",
+ "description": "Either Type is not Reference or GetBase is not null, check opeartor is \"x >>= y\"",
+ "test": "//CHECK#1\nvar x = 4;\nvar z = (x >>= 1);\nif (z !== 2) {\n $ERROR('#1: var x = 4; var z = (x >>= 1); z === 2. Actual: ' + (z));\n}\n\n//CHECK#2\nvar x = 4;\nvar y = 1;\nvar z = (x >>= y);\nif (z !== 2) {\n $ERROR('#2: var x = 4; var y = 1; var z = (x >>= y); z === 2. Actual: ' + (z));\n}\n\n",
+ "id": "S11.13.2_A2.1_T1.7"
+ },
+ {
+ "section": "11.13.2",
+ "description": "Either Type is not Reference or GetBase is not null, check opeartor is \"x >>>= y\"",
+ "test": "//CHECK#1\nvar x = 4;\nvar z = (x >>>= 1);\nif (z !== 2) {\n $ERROR('#1: var x = 4; var z = (x >>>= 1); z === 2. Actual: ' + (z));\n}\n\n//CHECK#2\nvar x = 4;\nvar y = 1;\nvar z = (x >>>= y);\nif (z !== 2) {\n $ERROR('#2: var x = 4; var y = 1; var z = (x >>>= y); z === 2. Actual: ' + (z));\n}\n\n",
+ "id": "S11.13.2_A2.1_T1.8"
+ },
+ {
+ "section": "11.13.2",
+ "description": "Either Type is not Reference or GetBase is not null, check opeartor is \"x &= y\"",
+ "test": "//CHECK#1\nvar x = 1;\nvar z = (x &= 1);\nif (z !== 1) {\n $ERROR('#1: var x = 1; var z = (x &= 1); z === 1. Actual: ' + (z));\n}\n\n//CHECK#2\nvar x = 1;\nvar y = 1;\nvar z = (x &= y);\nif (z !== 1) {\n $ERROR('#2: var x = 1; var y = 1; var z = (x &= y); z === 1. Actual: ' + (z));\n}\n\n",
+ "id": "S11.13.2_A2.1_T1.9"
+ },
+ {
+ "section": "11.13.2",
+ "description": "If GetBase(AssigmentExpression) is null, throw ReferenceError. Check operator is \"x *= y\"",
+ "test": "//CHECK#1\ntry {\n var x = 1;\n var z = (x *= y);\n $ERROR('#1.1: var x = 1; x *= y throw ReferenceError. Actual: ' + (z)); \n}\ncatch (e) {\n if ((e instanceof ReferenceError) !== true) {\n $ERROR('#1.2: var x = 1; x *= y throw ReferenceError. Actual: ' + (e)); \n }\n}\n",
+ "id": "S11.13.2_A2.1_T2.1"
+ },
+ {
+ "section": "11.13.2",
+ "description": "If GetBase(AssigmentExpression) is null, throw ReferenceError. Check operator is \"x ^= y\"",
+ "test": "//CHECK#1\ntry {\n var x = 1;\n var z = (x ^= y);\n $ERROR('#1.1: var x = 1; x ^= y throw ReferenceError. Actual: ' + (z)); \n}\ncatch (e) {\n if ((e instanceof ReferenceError) !== true) {\n $ERROR('#1.2: var x = 1; x ^= y throw ReferenceError. Actual: ' + (e)); \n }\n}\n",
+ "id": "S11.13.2_A2.1_T2.10"
+ },
+ {
+ "section": "11.13.2",
+ "description": "If GetBase(AssigmentExpression) is null, throw ReferenceError. Check operator is \"x |= y\"",
+ "test": "//CHECK#1\ntry {\n var x = 1;\n var z = (x |= y);\n $ERROR('#1.1: var x = 1; x |= y throw ReferenceError. Actual: ' + (z)); \n}\ncatch (e) {\n if ((e instanceof ReferenceError) !== true) {\n $ERROR('#1.2: var x = 1; x |= y throw ReferenceError. Actual: ' + (e)); \n }\n}\n",
+ "id": "S11.13.2_A2.1_T2.11"
+ },
+ {
+ "section": "11.13.2",
+ "description": "If GetBase(AssigmentExpression) is null, throw ReferenceError. Check operator is \"x /= y\"",
+ "test": "//CHECK#1\ntry {\n var x = 1;\n var z = (x /= y);\n $ERROR('#1.1: var x = 1; x /= y throw ReferenceError. Actual: ' + (z)); \n}\ncatch (e) {\n if ((e instanceof ReferenceError) !== true) {\n $ERROR('#1.2: var x = 1; x /= y throw ReferenceError. Actual: ' + (e)); \n }\n}\n",
+ "id": "S11.13.2_A2.1_T2.2"
+ },
+ {
+ "section": "11.13.2",
+ "description": "If GetBase(AssigmentExpression) is null, throw ReferenceError. Check operator is \"x %= y\"",
+ "test": "//CHECK#1\ntry {\n var x = 1;\n var z = (x %= y);\n $ERROR('#1.1: var x = 1; x %= y throw ReferenceError. Actual: ' + (z)); \n}\ncatch (e) {\n if ((e instanceof ReferenceError) !== true) {\n $ERROR('#1.2: var x = 1; x %= y throw ReferenceError. Actual: ' + (e)); \n }\n}\n",
+ "id": "S11.13.2_A2.1_T2.3"
+ },
+ {
+ "section": "11.13.2",
+ "description": "If GetBase(AssigmentExpression) is null, throw ReferenceError. Check operator is \"x += y\"",
+ "test": "//CHECK#1\ntry {\n var x = 1;\n var z = (x += y);\n $ERROR('#1.1: var x = 1; x += y throw ReferenceError. Actual: ' + (z)); \n}\ncatch (e) {\n if ((e instanceof ReferenceError) !== true) {\n $ERROR('#1.2: var x = 1; x += y throw ReferenceError. Actual: ' + (e)); \n }\n}\n",
+ "id": "S11.13.2_A2.1_T2.4"
+ },
+ {
+ "section": "11.13.2",
+ "description": "If GetBase(AssigmentExpression) is null, throw ReferenceError. Check operator is \"x -= y\"",
+ "test": "//CHECK#1\ntry {\n var x = 1;\n var z = (x -= y);\n $ERROR('#1.1: var x = 1; x -= y throw ReferenceError. Actual: ' + (z)); \n}\ncatch (e) {\n if ((e instanceof ReferenceError) !== true) {\n $ERROR('#1.2: var x = 1; x -= y throw ReferenceError. Actual: ' + (e)); \n }\n}\n",
+ "id": "S11.13.2_A2.1_T2.5"
+ },
+ {
+ "section": "11.13.2",
+ "description": "If GetBase(AssigmentExpression) is null, throw ReferenceError. Check operator is \"x <<= y\"",
+ "test": "//CHECK#1\ntry {\n var x = 1;\n var z = (x <<= y);\n $ERROR('#1.1: var x = 1; x <<= y throw ReferenceError. Actual: ' + (z)); \n}\ncatch (e) {\n if ((e instanceof ReferenceError) !== true) {\n $ERROR('#1.2: var x = 1; x <<= y throw ReferenceError. Actual: ' + (e)); \n }\n}\n",
+ "id": "S11.13.2_A2.1_T2.6"
+ },
+ {
+ "section": "11.13.2",
+ "description": "If GetBase(AssigmentExpression) is null, throw ReferenceError. Check operator is \"x >>= y\"",
+ "test": "//CHECK#1\ntry {\n var x = 1;\n var z = (x >>= y);\n $ERROR('#1.1: var x = 1; x >>= y throw ReferenceError. Actual: ' + (z)); \n}\ncatch (e) {\n if ((e instanceof ReferenceError) !== true) {\n $ERROR('#1.2: var x = 1; x >>= y throw ReferenceError. Actual: ' + (e)); \n }\n}\n",
+ "id": "S11.13.2_A2.1_T2.7"
+ },
+ {
+ "section": "11.13.2",
+ "description": "If GetBase(AssigmentExpression) is null, throw ReferenceError. Check operator is \"x >>>= y\"",
+ "test": "//CHECK#1\ntry {\n var x = 1;\n var z = (x >>>= y);\n $ERROR('#1.1: var x = 1; x >>>= y throw ReferenceError. Actual: ' + (z)); \n}\ncatch (e) {\n if ((e instanceof ReferenceError) !== true) {\n $ERROR('#1.2: var x = 1; x >>>= y throw ReferenceError. Actual: ' + (e)); \n }\n}\n",
+ "id": "S11.13.2_A2.1_T2.8"
+ },
+ {
+ "section": "11.13.2",
+ "description": "If GetBase(AssigmentExpression) is null, throw ReferenceError. Check operator is \"x &= y\"",
+ "test": "//CHECK#1\ntry {\n var x = 1;\n var z = (x &= y);\n $ERROR('#1.1: var x = 1; x &= y throw ReferenceError. Actual: ' + (z)); \n}\ncatch (e) {\n if ((e instanceof ReferenceError) !== true) {\n $ERROR('#1.2: var x = 1; x &= y throw ReferenceError. Actual: ' + (e)); \n }\n}\n",
+ "id": "S11.13.2_A2.1_T2.9"
+ },
+ {
+ "section": "11.13.2",
+ "description": "If GetBase(LeftHandSideExpression) is null, throw ReferenceError. Check operator is \"x *= y\"",
+ "test": "//CHECK#1\ntry {\n var z = (x *= 1);\n $ERROR('#1.1: x *= 1 throw ReferenceError. Actual: ' + (z)); \n}\ncatch (e) {\n if ((e instanceof ReferenceError) !== true) {\n $ERROR('#1.2: x *= 1 throw ReferenceError. Actual: ' + (e)); \n }\n}\n",
+ "id": "S11.13.2_A2.1_T3.1"
+ },
+ {
+ "section": "11.13.2",
+ "description": "If GetBase(LeftHandSideExpression) is null, throw ReferenceError. Check operator is \"x ^= y\"",
+ "test": "//CHECK#1\ntry {\n var z = (x ^= 1);\n $ERROR('#1.1: x ^= 1 throw ReferenceError. Actual: ' + (z)); \n}\ncatch (e) {\n if ((e instanceof ReferenceError) !== true) {\n $ERROR('#1.2: x ^= 1 throw ReferenceError. Actual: ' + (e)); \n }\n}\n",
+ "id": "S11.13.2_A2.1_T3.10"
+ },
+ {
+ "section": "11.13.2",
+ "description": "If GetBase(LeftHandSideExpression) is null, throw ReferenceError. Check operator is \"x |= y\"",
+ "test": "//CHECK#1\ntry {\n var z = (x |= 1);\n $ERROR('#1.1: x |= 1 throw ReferenceError. Actual: ' + (z)); \n}\ncatch (e) {\n if ((e instanceof ReferenceError) !== true) {\n $ERROR('#1.2: x |= 1 throw ReferenceError. Actual: ' + (e)); \n }\n}\n",
+ "id": "S11.13.2_A2.1_T3.11"
+ },
+ {
+ "section": "11.13.2",
+ "description": "If GetBase(LeftHandSideExpression) is null, throw ReferenceError. Check operator is \"x /= y\"",
+ "test": "//CHECK#1\ntry {\n var z = (x /= 1);\n $ERROR('#1.1: x /= 1 throw ReferenceError. Actual: ' + (z)); \n}\ncatch (e) {\n if ((e instanceof ReferenceError) !== true) {\n $ERROR('#1.2: x /= 1 throw ReferenceError. Actual: ' + (e)); \n }\n}\n",
+ "id": "S11.13.2_A2.1_T3.2"
+ },
+ {
+ "section": "11.13.2",
+ "description": "If GetBase(LeftHandSideExpression) is null, throw ReferenceError. Check operator is \"x %= y\"",
+ "test": "//CHECK#1\ntry {\n var z = (x %= 1);\n $ERROR('#1.1: x %= 1 throw ReferenceError. Actual: ' + (z)); \n}\ncatch (e) {\n if ((e instanceof ReferenceError) !== true) {\n $ERROR('#1.2: x %= 1 throw ReferenceError. Actual: ' + (e)); \n }\n}\n",
+ "id": "S11.13.2_A2.1_T3.3"
+ },
+ {
+ "section": "11.13.2",
+ "description": "If GetBase(LeftHandSideExpression) is null, throw ReferenceError. Check operator is \"x += y\"",
+ "test": "//CHECK#1\ntry {\n var z = (x += 1);\n $ERROR('#1.1: x += 1 throw ReferenceError. Actual: ' + (z)); \n}\ncatch (e) {\n if ((e instanceof ReferenceError) !== true) {\n $ERROR('#1.2: x += 1 throw ReferenceError. Actual: ' + (e)); \n }\n}\n",
+ "id": "S11.13.2_A2.1_T3.4"
+ },
+ {
+ "section": "11.13.2",
+ "description": "If GetBase(LeftHandSideExpression) is null, throw ReferenceError. Check operator is \"x -= y\"",
+ "test": "//CHECK#1\ntry {\n var z = (x -= 1);\n $ERROR('#1.1: x -= 1 throw ReferenceError. Actual: ' + (z)); \n}\ncatch (e) {\n if ((e instanceof ReferenceError) !== true) {\n $ERROR('#1.2: x -= 1 throw ReferenceError. Actual: ' + (e)); \n }\n}\n",
+ "id": "S11.13.2_A2.1_T3.5"
+ },
+ {
+ "section": "11.13.2",
+ "description": "If GetBase(LeftHandSideExpression) is null, throw ReferenceError. Check operator is \"x <<= y\"",
+ "test": "//CHECK#1\ntry {\n var z = (x <<= 1);\n $ERROR('#1.1: x <<= 1 throw ReferenceError. Actual: ' + (z)); \n}\ncatch (e) {\n if ((e instanceof ReferenceError) !== true) {\n $ERROR('#1.2: x <<= 1 throw ReferenceError. Actual: ' + (e)); \n }\n}\n",
+ "id": "S11.13.2_A2.1_T3.6"
+ },
+ {
+ "section": "11.13.2",
+ "description": "If GetBase(LeftHandSideExpression) is null, throw ReferenceError. Check operator is \"x >>= y\"",
+ "test": "//CHECK#1\ntry {\n var z = (x >>= 1);\n $ERROR('#1.1: x >>= 1 throw ReferenceError. Actual: ' + (z)); \n}\ncatch (e) {\n if ((e instanceof ReferenceError) !== true) {\n $ERROR('#1.2: x >>= 1 throw ReferenceError. Actual: ' + (e)); \n }\n}\n",
+ "id": "S11.13.2_A2.1_T3.7"
+ },
+ {
+ "section": "11.13.2",
+ "description": "If GetBase(LeftHandSideExpression) is null, throw ReferenceError. Check operator is \"x >>>= y\"",
+ "test": "//CHECK#1\ntry {\n var z = (x >>>= 1);\n $ERROR('#1.1: x >>>= 1 throw ReferenceError. Actual: ' + (z)); \n}\ncatch (e) {\n if ((e instanceof ReferenceError) !== true) {\n $ERROR('#1.2: x >>>= 1 throw ReferenceError. Actual: ' + (e)); \n }\n}\n",
+ "id": "S11.13.2_A2.1_T3.8"
+ },
+ {
+ "section": "11.13.2",
+ "description": "If GetBase(LeftHandSideExpression) is null, throw ReferenceError. Check operator is \"x &= y\"",
+ "test": "//CHECK#1\ntry {\n var z = (x &= 1);\n $ERROR('#1.1: x &= 1 throw ReferenceError. Actual: ' + (z)); \n}\ncatch (e) {\n if ((e instanceof ReferenceError) !== true) {\n $ERROR('#1.2: x &= 1 throw ReferenceError. Actual: ' + (e)); \n }\n}\n",
+ "id": "S11.13.2_A2.1_T3.9"
+ },
+ {
+ "section": "11.13.2, 16",
+ "description": "If Type(LeftHandSideExpression) is not Reference, throw ReferenceError (or SyntaxError). Check operator is \"x *= y\"",
+ "negative": "",
+ "test": "//CHECK#1\ntry {\n var z = (1 *= 1);\n $ERROR('#1.1: 1 *= 1 throw ReferenceError (or SyntaxError). Actual: ' + (z)); \n}\ncatch (e) {\n if ((e instanceof ReferenceError) !== true) {\n $ERROR('#1.2: 1 *= 1 throw ReferenceError (or SyntaxError). Actual: ' + (e)); \n } else {\n var z = (1 *= 1);\n }\n}\n",
+ "id": "S11.13.2_A2.2_T1"
+ },
+ {
+ "section": "11.13.2, 16",
+ "description": "If Type(LeftHandSideExpression) is not Reference, throw ReferenceError (or SyntaxError). Check operator is \"x ^= y\"",
+ "negative": "",
+ "test": "//CHECK#1\ntry {\n var z = (1 ^= 1);\n $ERROR('#1.1: 1 ^= 1 throw ReferenceError (or SyntaxError). Actual: ' + (z)); \n}\ncatch (e) {\n if ((e instanceof ReferenceError) !== true) {\n $ERROR('#1.2: 1 ^= 1 throw ReferenceError (or SyntaxError). Actual: ' + (e)); \n } else {\n var z = (1 ^= 1);\n }\n}\n",
+ "id": "S11.13.2_A2.2_T10"
+ },
+ {
+ "section": "11.13.2, 16",
+ "description": "If Type(LeftHandSideExpression) is not Reference, throw ReferenceError (or SyntaxError). Check operator is \"x |= y\"",
+ "negative": "",
+ "test": "//CHECK#1\ntry {\n var z = (1 |= 1);\n $ERROR('#1.1: 1 |= 1 throw ReferenceError (or SyntaxError). Actual: ' + (z)); \n}\ncatch (e) {\n if ((e instanceof ReferenceError) !== true) {\n $ERROR('#1.2: 1 |= 1 throw ReferenceError (or SyntaxError). Actual: ' + (e)); \n } else {\n var z = (1 |= 1);\n }\n}\n",
+ "id": "S11.13.2_A2.2_T11"
+ },
+ {
+ "section": "11.13.2, 16",
+ "description": "If Type(LeftHandSideExpression) is not Reference, throw ReferenceError (or SyntaxError). Check operator is \"x /= y\"",
+ "negative": "",
+ "test": "//CHECK#1\ntry {\n var z = (1 /= 1);\n $ERROR('#1.1: 1 /= 1 throw ReferenceError (or SyntaxError). Actual: ' + (z)); \n}\ncatch (e) {\n if ((e instanceof ReferenceError) !== true) {\n $ERROR('#1.2: 1 /= 1 throw ReferenceError (or SyntaxError). Actual: ' + (e)); \n } else {\n var z = (1 /= 1);\n }\n}\n",
+ "id": "S11.13.2_A2.2_T2"
+ },
+ {
+ "section": "11.13.2, 16",
+ "description": "If Type(LeftHandSideExpression) is not Reference, throw ReferenceError (or SyntaxError). Check operator is \"x %= y\"",
+ "negative": "",
+ "test": "//CHECK#1\ntry {\n var z = (1 %= 1);\n $ERROR('#1.1: 1 %= 1 throw ReferenceError (or SyntaxError). Actual: ' + (z)); \n}\ncatch (e) {\n if ((e instanceof ReferenceError) !== true) {\n $ERROR('#1.2: 1 %= 1 throw ReferenceError (or SyntaxError). Actual: ' + (e)); \n } else {\n var z = (1 %= 1);\n }\n}\n",
+ "id": "S11.13.2_A2.2_T3"
+ },
+ {
+ "section": "11.13.2, 16",
+ "description": "If Type(LeftHandSideExpression) is not Reference, throw ReferenceError (or SyntaxError). Check operator is \"x += y\"",
+ "negative": "",
+ "test": "//CHECK#1\ntry {\n var z = (1 += 1);\n $ERROR('#1.1: 1 += 1 throw ReferenceError (or SyntaxError). Actual: ' + (z)); \n}\ncatch (e) {\n if ((e instanceof ReferenceError) !== true) {\n $ERROR('#1.2: 1 += 1 throw ReferenceError (or SyntaxError). Actual: ' + (e)); \n } else {\n var z = (1 += 1);\n }\n}\n",
+ "id": "S11.13.2_A2.2_T4"
+ },
+ {
+ "section": "11.13.2, 16",
+ "description": "If Type(LeftHandSideExpression) is not Reference, throw ReferenceError (or SyntaxError). Check operator is \"x -= y\"",
+ "negative": "",
+ "test": "//CHECK#1\ntry {\n var z = (1 -= 1);\n $ERROR('#1.1: 1 -= 1 throw ReferenceError (or SyntaxError). Actual: ' + (z)); \n}\ncatch (e) {\n if ((e instanceof ReferenceError) !== true) {\n $ERROR('#1.2: 1 -= 1 throw ReferenceError (or SyntaxError). Actual: ' + (e)); \n } else {\n var z = (1 -= 1);\n }\n}\n",
+ "id": "S11.13.2_A2.2_T5"
+ },
+ {
+ "section": "11.13.2, 16",
+ "description": "If Type(LeftHandSideExpression) is not Reference, throw ReferenceError (or SyntaxError). Check operator is \"x <<= y\"",
+ "negative": "",
+ "test": "//CHECK#1\ntry {\n var z = (1 <<= 1);\n $ERROR('#1.1: 1 <<= 1 throw ReferenceError (or SyntaxError). Actual: ' + (z)); \n}\ncatch (e) {\n if ((e instanceof ReferenceError) !== true) {\n $ERROR('#1.2: 1 <<= 1 throw ReferenceError (or SyntaxError). Actual: ' + (e)); \n } else {\n var z = (1 <<= 1);\n }\n}\n",
+ "id": "S11.13.2_A2.2_T6"
+ },
+ {
+ "section": "11.13.2, 16",
+ "description": "If Type(LeftHandSideExpression) is not Reference, throw ReferenceError (or SyntaxError). Check operator is \"x >>= y\"",
+ "negative": "",
+ "test": "//CHECK#1\ntry {\n var z = (1 >>= 1);\n $ERROR('#1.1: 1 >>= 1 throw ReferenceError (or SyntaxError). Actual: ' + (z)); \n}\ncatch (e) {\n if ((e instanceof ReferenceError) !== true) {\n $ERROR('#1.2: 1 >>= 1 throw ReferenceError (or SyntaxError). Actual: ' + (e)); \n } else {\n var z = (1 >>= 1);\n }\n}\n",
+ "id": "S11.13.2_A2.2_T7"
+ },
+ {
+ "section": "11.13.2, 16",
+ "description": "If Type(LeftHandSideExpression) is not Reference, throw ReferenceError (or SyntaxError). Check operator is \"x >>>= y\"",
+ "negative": "",
+ "test": "//CHECK#1\ntry {\n var z = (1 >>>= 1);\n $ERROR('#1.1: 1 >>>= 1 throw ReferenceError (or SyntaxError). Actual: ' + (z)); \n}\ncatch (e) {\n if ((e instanceof ReferenceError) !== true) {\n $ERROR('#1.2: 1 >>>= 1 throw ReferenceError (or SyntaxError). Actual: ' + (e)); \n } else {\n var z = (1 >>>= 1);\n }\n}\n",
+ "id": "S11.13.2_A2.2_T8"
+ },
+ {
+ "section": "11.13.2, 16",
+ "description": "If Type(LeftHandSideExpression) is not Reference, throw ReferenceError (or SyntaxError). Check operator is \"x &= y\"",
+ "negative": "",
+ "test": "//CHECK#1\ntry {\n var z = (1 &= 1);\n $ERROR('#1.1: 1 &= 1 throw ReferenceError (or SyntaxError). Actual: ' + (z)); \n}\ncatch (e) {\n if ((e instanceof ReferenceError) !== true) {\n $ERROR('#1.2: 1 &= 1 throw ReferenceError (or SyntaxError). Actual: ' + (e)); \n } else {\n var z = (1 &= 1);\n }\n}\n",
+ "id": "S11.13.2_A2.2_T9"
+ },
+ {
+ "section": "11.13.2",
+ "description": "Checking Expression and Variable statements for x *= y",
+ "test": "//CHECK#1\nvar x = 1;\nx *= -1; \nif (x !== -1) {\n $ERROR('#1: var x = 1; x *= -1; x === -1. Actual: ' + (x));\n}\n\n//CHECK#2\ny = 1;\ny *= -1;\nif (y !== -1) {\n $ERROR('#2: y = 1; y *= -1; y === -1. Actual: ' + (y));\n}\n",
+ "id": "S11.13.2_A3.1_T1"
+ },
+ {
+ "section": "11.13.2",
+ "description": "Checking Expression and Variable statements for x ^= y",
+ "test": "//CHECK#1\nvar x = 0;\nx ^= 1; \nif (x !== 1) {\n $ERROR('#1: var x = 0; x ^= 1; x === 1. Actual: ' + (x));\n}\n\n//CHECK#2\ny = 1;\ny ^= 0;\nif (y !== 1) {\n $ERROR('#2: y = 1; y ^= 0; y === 1. Actual: ' + (y));\n}\n",
+ "id": "S11.13.2_A3.1_T10"
+ },
+ {
+ "section": "11.13.2",
+ "description": "Checking Expression and Variable statements for x |= y",
+ "test": "//CHECK#1\nvar x = 0;\nx |= 1; \nif (x !== 1) {\n $ERROR('#1: var x = 0; x |= 1; x === 1. Actual: ' + (x));\n}\n\n//CHECK#2\ny = 1;\ny |= 0;\nif (y !== 1) {\n $ERROR('#2: y = 1; y |= 0; y === 1. Actual: ' + (y));\n}\n",
+ "id": "S11.13.2_A3.1_T11"
+ },
+ {
+ "section": "11.13.2",
+ "description": "Checking Expression and Variable statements for x /= y",
+ "test": "//CHECK#1\nvar x = 1;\nx /= -1; \nif (x !== -1) {\n $ERROR('#1: var x = 1; x /= -1; x === -1. Actual: ' + (x));\n}\n\n//CHECK#2\ny = 1;\ny /= -1;\nif (y !== -1) {\n $ERROR('#2: y = 1; y /= -1; y === -1. Actual: ' + (y));\n}\n",
+ "id": "S11.13.2_A3.1_T2"
+ },
+ {
+ "section": "11.13.2",
+ "description": "Checking Expression and Variable statements for x %= y",
+ "test": "//CHECK#1\nvar x = -1;\nx %= 2; \nif (x !== -1) {\n $ERROR('#1: var x = -1; x %= 2; x === -1. Actual: ' + (x));\n}\n\n//CHECK#2\ny = -1;\ny %= 2;\nif (y !== -1) {\n $ERROR('#2: y = -1; y %= 2; y === -1. Actual: ' + (y));\n}\n",
+ "id": "S11.13.2_A3.1_T3"
+ },
+ {
+ "section": "11.13.2",
+ "description": "Checking Expression and Variable statements for x += y",
+ "test": "//CHECK#1\nvar x = 1;\nx += 1; \nif (x !== 2) {\n $ERROR('#1: var x = 1; x += 1; x === 2. Actual: ' + (x));\n}\n\n//CHECK#2\ny = 1;\ny += 1;\nif (y !== 2) {\n $ERROR('#2: y = 1; y += 1; y === 2. Actual: ' + (y));\n}\n",
+ "id": "S11.13.2_A3.1_T4"
+ },
+ {
+ "section": "11.13.2",
+ "description": "Checking Expression and Variable statements for x -= y",
+ "test": "//CHECK#1\nvar x = -1;\nx -= 1; \nif (x !== -2) {\n $ERROR('#1: var x = -1; x -= 1; x === -2. Actual: ' + (x));\n}\n\n//CHECK#2\ny = -1;\ny -= 1;\nif (y !== -2) {\n $ERROR('#2: y = -1; y -= 1; y === -2. Actual: ' + (y));\n}\n",
+ "id": "S11.13.2_A3.1_T5"
+ },
+ {
+ "section": "11.13.2",
+ "description": "Checking Expression and Variable statements for x <<= y",
+ "test": "//CHECK#1\nvar x = 1;\nx <<= 1; \nif (x !== 2) {\n $ERROR('#1: var x = 1; x <<= 1; x === 2. Actual: ' + (x));\n}\n\n//CHECK#2\ny = 1;\ny <<= 1;\nif (y !== 2) {\n $ERROR('#2: y = 1; y <<= 1; y === 2. Actual: ' + (y));\n}\n",
+ "id": "S11.13.2_A3.1_T6"
+ },
+ {
+ "section": "11.13.2",
+ "description": "Checking Expression and Variable statements for x >>= y",
+ "test": "//CHECK#1\nvar x = 4;\nx >>= 1; \nif (x !== 2) {\n $ERROR('#1: var x = 4; x >>= 1; x === 2. Actual: ' + (x));\n}\n\n//CHECK#2\ny = 4;\ny >>= 1;\nif (y !== 2) {\n $ERROR('#2: y = 4; y >>= 1; y === 2. Actual: ' + (y));\n}\n",
+ "id": "S11.13.2_A3.1_T7"
+ },
+ {
+ "section": "11.13.2",
+ "description": "Checking Expression and Variable statements for x >>>= y",
+ "test": "//CHECK#1\nvar x = 4;\nx >>>= 1; \nif (x !== 2) {\n $ERROR('#1: var x = 4; x >>>= 1; x === 2. Actual: ' + (x));\n}\n\n//CHECK#2\ny = 4;\ny >>>= 1;\nif (y !== 2) {\n $ERROR('#2: y = 4; y >>>= 1; y === 2. Actual: ' + (y));\n}\n",
+ "id": "S11.13.2_A3.1_T8"
+ },
+ {
+ "section": "11.13.2",
+ "description": "Checking Expression and Variable statements for x &= y",
+ "test": "//CHECK#1\nvar x = 1;\nx &= 1; \nif (x !== 1) {\n $ERROR('#1: var x = 1; x &= 1; x === 1. Actual: ' + (x));\n}\n\n//CHECK#2\ny = 1;\ny &= 1;\nif (y !== 1) {\n $ERROR('#2: y = 1; y &= 1; y === 1. Actual: ' + (y));\n}\n",
+ "id": "S11.13.2_A3.1_T9"
+ },
+ {
+ "section": "11.13.2",
+ "description": "Checking Expression and Variable statements for x *= y",
+ "test": "//CHECK#1\nvar x = 1;\nvar x1 = (x *= -1);\nif (x1 !== -1) {\n $ERROR('#1: var x = 1; var x1 = (x *= -1); x1 === -1. Actual: ' + (x1));\n}\n\n//CHECK#2\ny = 1;\ny1 = (y *= -1);\nif (y1 !== -1) {\n $ERROR('#2: y = 1; y1 = (y *= -1); y1 === -1. Actual: ' + (y1));\n}\n",
+ "id": "S11.13.2_A3.2_T1"
+ },
+ {
+ "section": "11.13.2",
+ "description": "Checking Expression and Variable statements for x ^= y",
+ "test": "//CHECK#1\nvar x = 0;\nvar x1 = (x ^= 1);\nif (x1 !== 1) {\n $ERROR('#1: var x = 0; var x1 = (x ^= 1); x1 === 1. Actual: ' + (x1));\n}\n\n//CHECK#2\ny = 1;\ny1 = (y ^= 0);\nif (y1 !== 1) {\n $ERROR('#2: y = 1; y1 = (y ^= 0); y1 === 1. Actual: ' + (y1));\n}\n",
+ "id": "S11.13.2_A3.2_T10"
+ },
+ {
+ "section": "11.13.2",
+ "description": "Checking Expression and Variable statements for x |= y",
+ "test": "//CHECK#1\nvar x = 0;\nvar x1 = (x |= 1);\nif (x1 !== 1) {\n $ERROR('#1: var x = 0; var x1 = (x |= 1); x1 === 1. Actual: ' + (x1));\n}\n\n//CHECK#2\ny = 1;\ny1 = (y |= 0);\nif (y1 !== 1) {\n $ERROR('#2: y = 1; y1 = (y |= 0); y1 === 1. Actual: ' + (y1));\n}\n",
+ "id": "S11.13.2_A3.2_T11"
+ },
+ {
+ "section": "11.13.2",
+ "description": "Checking Expression and Variable statements for x /= y",
+ "test": "//CHECK#1\nvar x = 1;\nvar x1 = (x /= -1);\nif (x1 !== -1) {\n $ERROR('#1: var x = 1; var x1 = (x /= -1); x1 === -1. Actual: ' + (x1));\n}\n\n//CHECK#2\ny = 1;\ny1 = (y /= -1);\nif (y1 !== -1) {\n $ERROR('#2: y = 1; y1 = (y /= -1); y1 === -1. Actual: ' + (y1));\n}\n",
+ "id": "S11.13.2_A3.2_T2"
+ },
+ {
+ "section": "11.13.2",
+ "description": "Checking Expression and Variable statements for x %= y",
+ "test": "//CHECK#1\nvar x = -1;\nvar x1 = (x %= 2);\nif (x1 !== -1) {\n $ERROR('#1: var x = -1; var x1 = (x %= 2); x1 === -1. Actual: ' + (x1));\n}\n\n//CHECK#2\ny = -1;\ny1 = (y %= 2);\nif (y1 !== -1) {\n $ERROR('#2: y = -1; y1 = (y %= 2); y1 === -1. Actual: ' + (y1));\n}\n",
+ "id": "S11.13.2_A3.2_T3"
+ },
+ {
+ "section": "11.13.2",
+ "description": "Checking Expression and Variable statements for x += y",
+ "test": "//CHECK#1\nvar x = 1;\nvar x1 = (x += 1);\nif (x1 !== 2) {\n $ERROR('#1: var x = 1; var x1 = (x += 1); x1 === 2. Actual: ' + (x1));\n}\n\n//CHECK#2\ny = 1;\ny1 = (y += 1);\nif (y1 !== 2) {\n $ERROR('#2: y = 1; y1 = (y += 1); y1 === 2. Actual: ' + (y1));\n}\n",
+ "id": "S11.13.2_A3.2_T4"
+ },
+ {
+ "section": "11.13.2",
+ "description": "Checking Expression and Variable statements for x -= y",
+ "test": "//CHECK#1\nvar x = -1;\nvar x1 = (x -= 1);\nif (x1 !== -2) {\n $ERROR('#1: var x = -1; var x1 = (x -= 1); x1 === -2. Actual: ' + (x1));\n}\n\n//CHECK#2\ny = -1;\ny1 = (y -= 1);\nif (y1 !== -2) {\n $ERROR('#2: y = -1; y1 = (y -= 1); y1 === -2. Actual: ' + (y1));\n}\n",
+ "id": "S11.13.2_A3.2_T5"
+ },
+ {
+ "section": "11.13.2",
+ "description": "Checking Expression and Variable statements for x <<= y",
+ "test": "//CHECK#1\nvar x = 1;\nvar x1 = (x <<= 1);\nif (x1 !== 2) {\n $ERROR('#1: var x = 1; var x1 = (x <<= 1); x1 === 2. Actual: ' + (x1));\n}\n\n//CHECK#2\ny = 1;\ny1 = (y <<= 1);\nif (y1 !== 2) {\n $ERROR('#2: y = 1; y1 = (y <<= 1); y1 === 2. Actual: ' + (y1));\n}\n",
+ "id": "S11.13.2_A3.2_T6"
+ },
+ {
+ "section": "11.13.2",
+ "description": "Checking Expression and Variable statements for x >>= y",
+ "test": "//CHECK#1\nvar x = 4;\nvar x1 = (x >>= 1);\nif (x1 !== 2) {\n $ERROR('#1: var x = 4; var x1 = (x >>= 1); x1 === 2. Actual: ' + (x1));\n}\n\n//CHECK#2\ny = 4;\ny1 = (y >>= 1);\nif (y1 !== 2) {\n $ERROR('#2: y = 4; y1 = (y >>= 1); y1 === 2. Actual: ' + (y1));\n}\n",
+ "id": "S11.13.2_A3.2_T7"
+ },
+ {
+ "section": "11.13.2",
+ "description": "Checking Expression and Variable statements for x >>>= y",
+ "test": "//CHECK#1\nvar x = 4;\nvar x1 = (x >>>= 1);\nif (x1 !== 2) {\n $ERROR('#1: var x = 4; var x1 = (x >>>= 1); x1 === 2. Actual: ' + (x1));\n}\n\n//CHECK#2\ny = 4;\ny1 = (y >>>= 1);\nif (y1 !== 2) {\n $ERROR('#2: y = 4; y1 = (y >>>= 1); y1 === 2. Actual: ' + (y1));\n}\n",
+ "id": "S11.13.2_A3.2_T8"
+ },
+ {
+ "section": "11.13.2",
+ "description": "Checking Expression and Variable statements for x &= y",
+ "test": "//CHECK#1\nvar x = 1;\nvar x1 = (x &= 1);\nif (x1 !== 1) {\n $ERROR('#1: var x = 1; var x1 = (x &= 1); x1 === 1. Actual: ' + (x1));\n}\n\n//CHECK#2\ny = 1;\ny1 = (y &= 1);\nif (y1 !== 1) {\n $ERROR('#2: y = 1; y1 = (y &= 1); y1 === 1. Actual: ' + (y1));\n}\n",
+ "id": "S11.13.2_A3.2_T9"
+ },
+ {
+ "section": "11.13.2, 11.10.2",
+ "description": "Type(x) and Type(y) vary between primitive boolean and Boolean object",
+ "test": "//CHECK#1\nx = true;\nx ^= true;\nif (x !== 0) {\n $ERROR('#1: x = true; x ^= true; x === 0. Actual: ' + (x));\n}\n\n//CHECK#2\nx = new Boolean(true);\nx ^= true;\nif (x !== 0) {\n $ERROR('#2: x = new Boolean(true); x ^= true; x === 0. Actual: ' + (x));\n}\n\n//CHECK#3\nx = true;\nx ^= new Boolean(true);\nif (x !== 0) {\n $ERROR('#3: x = true; x ^= new Boolean(true); x === 0. Actual: ' + (x));\n}\n\n//CHECK#4\nx = new Boolean(true);\nx ^= new Boolean(true);\nif (x !== 0) {\n $ERROR('#4: x = new Boolean(true); x ^= new Boolean(true); x === 0. Actual: ' + (x));\n}\n",
+ "id": "S11.13.2_A4.10_T1.1"
+ },
+ {
+ "section": "11.13.2, 11.10.2",
+ "description": "Type(x) and Type(y) vary between primitive number and Number object",
+ "test": "//CHECK#1\nx = 1;\nx ^= 1;\nif (x !== 0) {\n $ERROR('#1: x = 1; x ^= 1; x === 0. Actual: ' + (x));\n}\n\n//CHECK#2\nx = new Number(1);\nx ^= 1;\nif (x !== 0) {\n $ERROR('#2: x = new Number(1); x ^= 1; x === 0. Actual: ' + (x));\n}\n\n//CHECK#3\nx = 1;\nx ^= new Number(1);\nif (x !== 0) {\n $ERROR('#3: x = 1; x ^= new Number(1); x === 0. Actual: ' + (x));\n}\n\n//CHECK#4\nx = new Number(1);\nx ^= new Number(1);\nif (x !== 0) {\n $ERROR('#4: x = new Number(1); x ^= new Number(1); x === 0. Actual: ' + (x));\n}\n\n",
+ "id": "S11.13.2_A4.10_T1.2"
+ },
+ {
+ "section": "11.13.2, 11.10.2",
+ "description": "Type(x) and Type(y) vary between primitive string and String object",
+ "test": "//CHECK#1\nx = \"1\";\nx ^= \"1\";\nif (x !== 0) {\n $ERROR('#1: x = \"1\"; x ^= \"1\"; x === 0. Actual: ' + (x));\n}\n\n//CHECK#2\nx = new String(\"1\");\nx ^= \"1\";\nif (x !== 0) {\n $ERROR('#2: x = new String(\"1\"); x ^= \"1\"; x === 0. Actual: ' + (x));\n}\n\n//CHECK#3\nx = \"1\";\nx ^= new String(\"1\");\nif (x !== 0) {\n $ERROR('#3: x = \"1\"; x ^= new String(\"1\"); x === 0. Actual: ' + (x));\n}\n\n//CHECK#4\nx = new String(\"1\");\nx ^= new String(\"1\");\nif (x !== 0) {\n $ERROR('#4: x = new String(\"1\"); x ^= new String(\"1\"); x === 0. Actual: ' + (x));\n}\n\n//CHECK#5\nx = \"x\";\nx ^= \"1\";\nif (x !== 1) {\n $ERROR('#5: x = \"x\"; x ^= \"1\"; x === 1. Actual: ' + (x));\n}\n\n//CHECK#6\nx = \"1\";\nx ^= \"x\";\nif (x !== 1) {\n $ERROR('#6: x = \"1\"; x ^= \"x\"; x === 1. Actual: ' + (x));\n}\n",
+ "id": "S11.13.2_A4.10_T1.3"
+ },
+ {
+ "section": "11.13.2, 11.10.2",
+ "description": "Type(x) and Type(y) vary between Null and Undefined",
+ "test": "//CHECK#1\nx = null;\nx ^= undefined;\nif (x !== 0) {\n $ERROR('#1: x = null; x ^= undefined; x === 0. Actual: ' + (x));\n}\n\n//CHECK#2\nx = undefined;\nx ^= null;\nif (x !== 0) {\n $ERROR('#2: x = undefined; x ^= null; x === 0. Actual: ' + (x));\n}\n\n//CHECK#3\nx = undefined;\nx ^= undefined;\nif (x !== 0) {\n $ERROR('#3: x = undefined; x ^= undefined; x === 0. Actual: ' + (x));\n}\n\n//CHECK#4\nx = null;\nx ^= null;\nif (x !== 0) {\n $ERROR('#4: x = null; x ^= null; x === 0. Actual: ' + (x));\n}\n",
+ "id": "S11.13.2_A4.10_T1.4"
+ },
+ {
+ "section": "11.13.2, 11.10.2",
+ "description": "Type(x) is different from Type(y) and both types vary between Number (primitive or object) and Boolean (primitive and object)",
+ "test": "//CHECK#1\nx = true;\nx ^= 1;\nif (x !== 0) {\n $ERROR('#1: x = true; x ^= 1; x === 0. Actual: ' + (x));\n}\n\n//CHECK#2\nx = 1;\nx ^= true;\nif (x !== 0) {\n $ERROR('#2: x = 1; x ^= true; x === 0. Actual: ' + (x));\n}\n\n//CHECK#3\nx = new Boolean(true);\nx ^= 1;\nif (x !== 0) {\n $ERROR('#3: x = new Boolean(true); x ^= 1; x === 0. Actual: ' + (x));\n}\n\n//CHECK#4\nx = 1;\nx ^= new Boolean(true);\nif (x !== 0) {\n $ERROR('#4: x = 1; x ^= new Boolean(true); x === 0. Actual: ' + (x));\n}\n\n//CHECK#5\nx = true;\nx ^= new Number(1);\nif (x !== 0) {\n $ERROR('#5: x = true; x ^= new Number(1); x === 0. Actual: ' + (x));\n}\n\n//CHECK#6\nx = new Number(1);\nx ^= true;\nif (x !== 0) {\n $ERROR('#6: x = new Number(1); x ^= true; x === 0. Actual: ' + (x));\n}\n\n//CHECK#7\nx = new Boolean(true);\nx ^= new Number(1);\nif (x !== 0) {\n $ERROR('#7: x = new Boolean(true); x ^= new Number(1); x === 0. Actual: ' + (x));\n}\n\n//CHECK#8\nx = new Number(1);\nx ^= new Boolean(true);\nif (x !== 0) {\n $ERROR('#8: x = new Number(1); x ^= new Boolean(true); x === 0. Actual: ' + (x));\n}\n",
+ "id": "S11.13.2_A4.10_T2.1"
+ },
+ {
+ "section": "11.13.2, 11.10.2",
+ "description": "Type(x) is different from Type(y) and both types vary between Number (primitive or object) and String (primitive and object)",
+ "test": "//CHECK#1\nx = \"1\";\nx ^= 1;\nif (x !== 0) {\n $ERROR('#1: x = \"1\"; x ^= 1; x === 0. Actual: ' + (x));\n}\n\n//CHECK#2\nx = 1;\nx ^= \"1\";\nif (x !== 0) {\n $ERROR('#2: x = 1; x ^= \"1\"; x === 0. Actual: ' + (x));\n}\n\n//CHECK#3\nx = new String(\"1\");\nx ^= 1;\nif (x !== 0) {\n $ERROR('#3: x = new String(\"1\"); x ^= 1; x === 0. Actual: ' + (x));\n}\n\n//CHECK#4\nx = 1;\nx ^= new String(\"1\");\nif (x !== 0) {\n $ERROR('#4: x = 1; x ^= new String(\"1\"); x === 0. Actual: ' + (x));\n}\n\n//CHECK#5\nx = \"1\";\nx ^= new Number(1);\nif (x !== 0) {\n $ERROR('#5: x = \"1\"; x ^= new Number(1); x === 0. Actual: ' + (x));\n}\n\n//CHECK#6\nx = new Number(1);\nx ^= \"1\";\nif (x !== 0) {\n $ERROR('#6: x = new Number(1); x ^= \"1\"; x === 0. Actual: ' + (x));\n}\n\n//CHECK#7\nx = new String(\"1\");\nx ^= new Number(1);\nif (x !== 0) {\n $ERROR('#7: x = new String(\"1\"); x ^= new Number(1); x === 0. Actual: ' + (x));\n}\n\n//CHECK#8\nx = new Number(1);\nx ^= new String(\"1\");\nif (x !== 0) {\n $ERROR('#8: x = new Number(1); x ^= new String(\"1\"); x === 0. Actual: ' + (x));\n}\n\n//CHECK#9\nx = \"x\";\nx ^= 1;\nif (x !== 1) {\n $ERROR('#9: x = \"x\"; x ^= 1; x === 1. Actual: ' + (x));\n}\n\n//CHECK#10\nx = 1;\nx ^= \"x\";\nif (x !== 1) {\n $ERROR('#10: x = 1; x ^= \"x\"; x === 1. Actual: ' + (x));\n}\n",
+ "id": "S11.13.2_A4.10_T2.2"
+ },
+ {
+ "section": "11.13.2, 11.10.2",
+ "description": "Type(x) is different from Type(y) and both types vary between Number (primitive or object) and Null",
+ "test": "//CHECK#1\nx = 1;\nx ^= null;\nif (x !== 1) {\n $ERROR('#1: x = 1; x ^= null; x === 1. Actual: ' + (x));\n}\n\n//CHECK#2\nx = null;\nx ^= 1;\nif (x !== 1) {\n $ERROR('#2: x = null; x ^= 1; x === 1. Actual: ' + (x));\n}\n\n//CHECK#3\nx = new Number(1);\nx ^= null;\nif (x !== 1) {\n $ERROR('#3: x = new Number(1); x ^= null; x === 1. Actual: ' + (x));\n}\n\n//CHECK#4\nx = null;\nx ^= new Number(1);\nif (x !== 1) {\n $ERROR('#4: x = null; x ^= new Number(1); x === 1. Actual: ' + (x));\n}\n",
+ "id": "S11.13.2_A4.10_T2.3"
+ },
+ {
+ "section": "11.13.2, 11.10.2",
+ "description": "Type(x) is different from Type(y) and both types vary between Number (primitive or object) and Undefined",
+ "test": "//CHECK#1\nx = 1;\nx ^= undefined;\nif (x !== 1) {\n $ERROR('#1: x = 1; x ^= undefined; x === 1. Actual: ' + (x));\n}\n\n//CHECK#2\nx = undefined;\nx ^= 1;\nif (x !== 1) {\n $ERROR('#2: x = undefined; x ^= 1; x === 1. Actual: ' + (x));\n}\n\n//CHECK#3\nx = new Number(1);\nx ^= undefined;\nif (x !== 1) {\n $ERROR('#3: x = new Number(1); x ^= undefined; x === 1. Actual: ' + (x));\n}\n\n//CHECK#4\nx = undefined;\nx ^= new Number(1);\nif (x !== 1) {\n $ERROR('#4: x = undefined; x ^= new Number(1); x === 1. Actual: ' + (x));\n}\n",
+ "id": "S11.13.2_A4.10_T2.4"
+ },
+ {
+ "section": "11.13.2, 11.10.2",
+ "description": "Type(x) is different from Type(y) and both types vary between String (primitive or object) and Boolean (primitive and object)",
+ "test": "//CHECK#1\nx = true;\nx ^= \"1\";\nif (x !== 0) {\n $ERROR('#1: x = true; x ^= \"1\"; x === 0. Actual: ' + (x));\n}\n\n//CHECK#2\nx = \"1\";\nx ^= true;\nif (x !== 0) {\n $ERROR('#2: x = \"1\"; x ^= true; x === 0. Actual: ' + (x));\n}\n\n//CHECK#3\nx = new Boolean(true);\nx ^= \"1\";\nif (x !== 0) {\n $ERROR('#3: x = new Boolean(true); x ^= \"1\"; x === 0. Actual: ' + (x));\n}\n\n//CHECK#4\nx = \"1\";\nx ^= new Boolean(true);\nif (x !== 0) {\n $ERROR('#4: x = \"1\"; x ^= new Boolean(true); x === 0. Actual: ' + (x));\n}\n\n//CHECK#5\nx = true;\nx ^= new String(\"1\");\nif (x !== 0) {\n $ERROR('#5: x = true; x ^= new String(\"1\"); x === 0. Actual: ' + (x));\n}\n\n//CHECK#6\nx = new String(\"1\");\nx ^= true;\nif (x !== 0) {\n $ERROR('#6: x = new String(\"1\"); x ^= true; x === 0. Actual: ' + (x));\n}\n\n//CHECK#7\nx = new Boolean(true);\nx ^= new String(\"1\");\nif (x !== 0) {\n $ERROR('#7: x = new Boolean(true); x ^= new String(\"1\"); x === 0. Actual: ' + (x));\n}\n\n//CHECK#8\nx = new String(\"1\");\nx ^= new Boolean(true);\nif (x !== 0) {\n $ERROR('#8: x = new String(\"1\"); x ^= new Boolean(true); x === 0. Actual: ' + (x));\n}\n",
+ "id": "S11.13.2_A4.10_T2.5"
+ },
+ {
+ "section": "11.13.2, 11.10.2",
+ "description": "Type(x) is different from Type(y) and both types vary between String (primitive or object) and Undefined",
+ "test": "//CHECK#1\nx = \"1\";\nx ^= undefined;\nif (x !== 1) {\n $ERROR('#1: x = \"1\"; x ^= undefined; x === 1. Actual: ' + (x));\n}\n\n//CHECK#2\nx = undefined;\nx ^= \"1\";\nif (x !== 1) {\n $ERROR('#2: x = undefined; x ^= \"1\"; x === 1. Actual: ' + (x));\n}\n\n//CHECK#3\nx = new String(\"1\");\nx ^= undefined;\nif (x !== 1) {\n $ERROR('#3: x = new String(\"1\"); x ^= undefined; x === 1. Actual: ' + (x));\n}\n\n//CHECK#4\nx = undefined;\nx ^= new String(\"1\");\nif (x !== 1) {\n $ERROR('#4: x = undefined; x ^= new String(\"1\"); x === 1. Actual: ' + (x));\n}\n",
+ "id": "S11.13.2_A4.10_T2.6"
+ },
+ {
+ "section": "11.13.2, 11.10.2",
+ "description": "Type(x) is different from Type(y) and both types vary between String (primitive or object) and Null",
+ "test": "//CHECK#1\nx = \"1\";\nx ^= null;\nif (x !== 1) {\n $ERROR('#1: x = \"1\"; x ^= null; x === 1. Actual: ' + (x));\n}\n\n//CHECK#2\nx = null;\nx ^= \"1\";\nif (x !== 1) {\n $ERROR('#2: x = null; x ^= \"1\"; x === 1. Actual: ' + (x));\n}\n\n//CHECK#3\nx = new String(\"1\");\nx ^= null;\nif (x !== 1) {\n $ERROR('#3: x = new String(\"1\"); x ^= null; x === 1. Actual: ' + (x));\n}\n\n//CHECK#4\nx = null;\nx ^= new String(\"1\");\nif (x !== 1) {\n $ERROR('#4: x = null; x ^= new String(\"1\"); x === 1. Actual: ' + (x));\n}\n",
+ "id": "S11.13.2_A4.10_T2.7"
+ },
+ {
+ "section": "11.13.2, 11.10.2",
+ "description": "Type(x) is different from Type(y) and both types vary between Boolean (primitive or object) and Undefined",
+ "test": "//CHECK#1\nx = true;\nx ^= undefined;\nif (x !== 1) {\n $ERROR('#1: x = true; x ^= undefined; x === 1. Actual: ' + (x));\n}\n\n//CHECK#2\nx = undefined;\nx ^= true;\nif (x !== 1) {\n $ERROR('#2: x = undefined; x ^= true; x === 1. Actual: ' + (x));\n}\n\n//CHECK#3\nx = new Boolean(true);\nx ^= undefined;\nif (x !== 1) {\n $ERROR('#3: x = new Boolean(true); x ^= undefined; x === 1. Actual: ' + (x));\n}\n\n//CHECK#4\nx = undefined;\nx ^= new Boolean(true);\nif (x !== 1) {\n $ERROR('#4: x = undefined; x ^= new Boolean(true); x === 1. Actual: ' + (x));\n}\n",
+ "id": "S11.13.2_A4.10_T2.8"
+ },
+ {
+ "section": "11.13.2, 11.10.2",
+ "description": "Type(x) is different from Type(y) and both types vary between Boolean (primitive or object) and Null",
+ "test": "//CHECK#1\nx = true;\nx ^= null;\nif (x !== 1) {\n $ERROR('#1: x = true; x ^= null; x === 1. Actual: ' + (x));\n}\n\n//CHECK#2\nx = null;\nx ^= true;\nif (x !== 1) {\n $ERROR('#2: x = null; x ^= true; x === 1. Actual: ' + (x));\n}\n\n//CHECK#3\nx = new Boolean(true);\nx ^= null;\nif (x !== 1) {\n $ERROR('#3: x = new Boolean(true); x ^= null; x === 1. Actual: ' + (x));\n}\n\n//CHECK#4\nx = null;\nx ^= new Boolean(true);\nif (x !== 1) {\n $ERROR('#4: x = null; x ^= new Boolean(true); x === 1. Actual: ' + (x));\n}\n",
+ "id": "S11.13.2_A4.10_T2.9"
+ },
+ {
+ "section": "11.13.2, 11.10.3",
+ "description": "Type(x) and Type(y) vary between primitive boolean and Boolean object",
+ "test": "//CHECK#1\nx = true;\nx |= true;\nif (x !== 1) {\n $ERROR('#1: x = true; x |= true; x === 1. Actual: ' + (x));\n}\n\n//CHECK#2\nx = new Boolean(true);\nx |= true;\nif (x !== 1) {\n $ERROR('#2: x = new Boolean(true); x |= true; x === 1. Actual: ' + (x));\n}\n\n//CHECK#3\nx = true;\nx |= new Boolean(true);\nif (x !== 1) {\n $ERROR('#3: x = true; x |= new Boolean(true); x === 1. Actual: ' + (x));\n}\n\n//CHECK#4\nx = new Boolean(true);\nx |= new Boolean(true);\nif (x !== 1) {\n $ERROR('#4: x = new Boolean(true); x |= new Boolean(true); x === 1. Actual: ' + (x));\n}\n",
+ "id": "S11.13.2_A4.11_T1.1"
+ },
+ {
+ "section": "11.13.2, 11.10.3",
+ "description": "Type(x) and Type(y) vary between primitive number and Number object",
+ "test": "//CHECK#1\nx = 1;\nx |= 1;\nif (x !== 1) {\n $ERROR('#1: x = 1; x |= 1; x === 1. Actual: ' + (x));\n}\n\n//CHECK#2\nx = new Number(1);\nx |= 1;\nif (x !== 1) {\n $ERROR('#2: x = new Number(1); x |= 1; x === 1. Actual: ' + (x));\n}\n\n//CHECK#3\nx = 1;\nx |= new Number(1);\nif (x !== 1) {\n $ERROR('#3: x = 1; x |= new Number(1); x === 1. Actual: ' + (x));\n}\n\n//CHECK#4\nx = new Number(1);\nx |= new Number(1);\nif (x !== 1) {\n $ERROR('#4: x = new Number(1); x |= new Number(1); x === 1. Actual: ' + (x));\n}\n\n",
+ "id": "S11.13.2_A4.11_T1.2"
+ },
+ {
+ "section": "11.13.2, 11.10.3",
+ "description": "Type(x) and Type(y) vary between primitive string and String object",
+ "test": "//CHECK#1\nx = \"1\";\nx |= \"1\";\nif (x !== 1) {\n $ERROR('#1: x = \"1\"; x |= \"1\"; x === 1. Actual: ' + (x));\n}\n\n//CHECK#2\nx = new String(\"1\");\nx |= \"1\";\nif (x !== 1) {\n $ERROR('#2: x = new String(\"1\"); x |= \"1\"; x === 1. Actual: ' + (x));\n}\n\n//CHECK#3\nx = \"1\";\nx |= new String(\"1\");\nif (x !== 1) {\n $ERROR('#3: x = \"1\"; x |= new String(\"1\"); x === 1. Actual: ' + (x));\n}\n\n//CHECK#4\nx = new String(\"1\");\nx |= new String(\"1\");\nif (x !== 1) {\n $ERROR('#4: x = new String(\"1\"); x |= new String(\"1\"); x === 1. Actual: ' + (x));\n}\n\n//CHECK#5\nx = \"x\";\nx |= \"1\";\nif (x !== 1) {\n $ERROR('#5: x = \"x\"; x |= \"1\"; x === 1. Actual: ' + (x));\n}\n\n//CHECK#6\nx = \"1\";\nx |= \"x\";\nif (x !== 1) {\n $ERROR('#6: x = \"1\"; x |= \"x\"; x === 1. Actual: ' + (x));\n}\n",
+ "id": "S11.13.2_A4.11_T1.3"
+ },
+ {
+ "section": "11.13.2, 11.10.3",
+ "description": "Type(x) and Type(y) vary between Null and Undefined",
+ "test": "//CHECK#1\nx = null;\nx |= undefined;\nif (x !== 0) {\n $ERROR('#1: x = null; x |= undefined; x === 0. Actual: ' + (x));\n}\n\n//CHECK#2\nx = undefined;\nx |= null;\nif (x !== 0) {\n $ERROR('#2: x = undefined; x |= null; x === 0. Actual: ' + (x));\n}\n\n//CHECK#3\nx = undefined;\nx |= undefined;\nif (x !== 0) {\n $ERROR('#3: x = undefined; x |= undefined; x === 0. Actual: ' + (x));\n}\n\n//CHECK#4\nx = null;\nx |= null;\nif (x !== 0) {\n $ERROR('#4: x = null; x |= null; x === 0. Actual: ' + (x));\n}\n",
+ "id": "S11.13.2_A4.11_T1.4"
+ },
+ {
+ "section": "11.13.2, 11.10.3",
+ "description": "Type(x) is different from Type(y) and both types vary between Number (primitive or object) and Boolean (primitive and object)",
+ "test": "//CHECK#1\nx = true;\nx |= 1;\nif (x !== 1) {\n $ERROR('#1: x = true; x |= 1; x === 1. Actual: ' + (x));\n}\n\n//CHECK#2\nx = 1;\nx |= true;\nif (x !== 1) {\n $ERROR('#2: x = 1; x |= true; x === 1. Actual: ' + (x));\n}\n\n//CHECK#3\nx = new Boolean(true);\nx |= 1;\nif (x !== 1) {\n $ERROR('#3: x = new Boolean(true); x |= 1; x === 1. Actual: ' + (x));\n}\n\n//CHECK#4\nx = 1;\nx |= new Boolean(true);\nif (x !== 1) {\n $ERROR('#4: x = 1; x |= new Boolean(true); x === 1. Actual: ' + (x));\n}\n\n//CHECK#5\nx = true;\nx |= new Number(1);\nif (x !== 1) {\n $ERROR('#5: x = true; x |= new Number(1); x === 1. Actual: ' + (x));\n}\n\n//CHECK#6\nx = new Number(1);\nx |= true;\nif (x !== 1) {\n $ERROR('#6: x = new Number(1); x |= true; x === 1. Actual: ' + (x));\n}\n\n//CHECK#7\nx = new Boolean(true);\nx |= new Number(1);\nif (x !== 1) {\n $ERROR('#7: x = new Boolean(true); x |= new Number(1); x === 1. Actual: ' + (x));\n}\n\n//CHECK#8\nx = new Number(1);\nx |= new Boolean(true);\nif (x !== 1) {\n $ERROR('#8: x = new Number(1); x |= new Boolean(true); x === 1. Actual: ' + (x));\n}\n",
+ "id": "S11.13.2_A4.11_T2.1"
+ },
+ {
+ "section": "11.13.2, 11.10.3",
+ "description": "Type(x) is different from Type(y) and both types vary between Number (primitive or object) and String (primitive and object)",
+ "test": "//CHECK#1\nx = \"1\";\nx |= 1;\nif (x !== 1) {\n $ERROR('#1: x = \"1\"; x |= 1; x === 1. Actual: ' + (x));\n}\n\n//CHECK#2\nx = 1;\nx |= \"1\";\nif (x !== 1) {\n $ERROR('#2: x = 1; x |= \"1\"; x === 1. Actual: ' + (x));\n}\n\n//CHECK#3\nx = new String(\"1\");\nx |= 1;\nif (x !== 1) {\n $ERROR('#3: x = new String(\"1\"); x |= 1; x === 1. Actual: ' + (x));\n}\n\n//CHECK#4\nx = 1;\nx |= new String(\"1\");\nif (x !== 1) {\n $ERROR('#4: x = 1; x |= new String(\"1\"); x === 1. Actual: ' + (x));\n}\n\n//CHECK#5\nx = \"1\";\nx |= new Number(1);\nif (x !== 1) {\n $ERROR('#5: x = \"1\"; x |= new Number(1); x === 1. Actual: ' + (x));\n}\n\n//CHECK#6\nx = new Number(1);\nx |= \"1\";\nif (x !== 1) {\n $ERROR('#6: x = new Number(1); x |= \"1\"; x === 1. Actual: ' + (x));\n}\n\n//CHECK#7\nx = new String(\"1\");\nx |= new Number(1);\nif (x !== 1) {\n $ERROR('#7: x = new String(\"1\"); x |= new Number(1); x === 1. Actual: ' + (x));\n}\n\n//CHECK#8\nx = new Number(1);\nx |= new String(\"1\");\nif (x !== 1) {\n $ERROR('#8: x = new Number(1); x |= new String(\"1\"); x === 1. Actual: ' + (x));\n}\n\n//CHECK#9\nx = \"x\";\nx |= 1;\nif (x !== 1) {\n $ERROR('#9: x = \"x\"; x |= 1; x === 1. Actual: ' + (x));\n}\n\n//CHECK#10\nx = 1;\nx |= \"x\";\nif (x !== 1) {\n $ERROR('#10: x = 1; x |= \"x\"; x === 1. Actual: ' + (x));\n}\n",
+ "id": "S11.13.2_A4.11_T2.2"
+ },
+ {
+ "section": "11.13.2, 11.10.3",
+ "description": "Type(x) is different from Type(y) and both types vary between Number (primitive or object) and Null",
+ "test": "//CHECK#1\nx = 1;\nx |= null;\nif (x !== 1) {\n $ERROR('#1: x = 1; x |= null; x === 1. Actual: ' + (x));\n}\n\n//CHECK#2\nx = null;\nx |= 1;\nif (x !== 1) {\n $ERROR('#2: x = null; x |= 1; x === 1. Actual: ' + (x));\n}\n\n//CHECK#3\nx = new Number(1);\nx |= null;\nif (x !== 1) {\n $ERROR('#3: x = new Number(1); x |= null; x === 1. Actual: ' + (x));\n}\n\n//CHECK#4\nx = null;\nx |= new Number(1);\nif (x !== 1) {\n $ERROR('#4: x = null; x |= new Number(1); x === 1. Actual: ' + (x));\n}\n",
+ "id": "S11.13.2_A4.11_T2.3"
+ },
+ {
+ "section": "11.13.2, 11.10.3",
+ "description": "Type(x) is different from Type(y) and both types vary between Number (primitive or object) and Undefined",
+ "test": "//CHECK#1\nx = 1;\nx |= undefined;\nif (x !== 1) {\n $ERROR('#1: x = 1; x |= undefined; x === 1. Actual: ' + (x));\n}\n\n//CHECK#2\nx = undefined;\nx |= 1;\nif (x !== 1) {\n $ERROR('#2: x = undefined; x |= 1; x === 1. Actual: ' + (x));\n}\n\n//CHECK#3\nx = new Number(1);\nx |= undefined;\nif (x !== 1) {\n $ERROR('#3: x = new Number(1); x |= undefined; x === 1. Actual: ' + (x));\n}\n\n//CHECK#4\nx = undefined;\nx |= new Number(1);\nif (x !== 1) {\n $ERROR('#4: x = undefined; x |= new Number(1); x === 1. Actual: ' + (x));\n}\n",
+ "id": "S11.13.2_A4.11_T2.4"
+ },
+ {
+ "section": "11.13.2, 11.10.3",
+ "description": "Type(x) is different from Type(y) and both types vary between String (primitive or object) and Boolean (primitive and object)",
+ "test": "//CHECK#1\nx = true;\nx |= \"1\";\nif (x !== 1) {\n $ERROR('#1: x = true; x |= \"1\"; x === 1. Actual: ' + (x));\n}\n\n//CHECK#2\nx = \"1\";\nx |= true;\nif (x !== 1) {\n $ERROR('#2: x = \"1\"; x |= true; x === 1. Actual: ' + (x));\n}\n\n//CHECK#3\nx = new Boolean(true);\nx |= \"1\";\nif (x !== 1) {\n $ERROR('#3: x = new Boolean(true); x |= \"1\"; x === 1. Actual: ' + (x));\n}\n\n//CHECK#4\nx = \"1\";\nx |= new Boolean(true);\nif (x !== 1) {\n $ERROR('#4: x = \"1\"; x |= new Boolean(true); x === 1. Actual: ' + (x));\n}\n\n//CHECK#5\nx = true;\nx |= new String(\"1\");\nif (x !== 1) {\n $ERROR('#5: x = true; x |= new String(\"1\"); x === 1. Actual: ' + (x));\n}\n\n//CHECK#6\nx = new String(\"1\");\nx |= true;\nif (x !== 1) {\n $ERROR('#6: x = new String(\"1\"); x |= true; x === 1. Actual: ' + (x));\n}\n\n//CHECK#7\nx = new Boolean(true);\nx |= new String(\"1\");\nif (x !== 1) {\n $ERROR('#7: x = new Boolean(true); x |= new String(\"1\"); x === 1. Actual: ' + (x));\n}\n\n//CHECK#8\nx = new String(\"1\");\nx |= new Boolean(true);\nif (x !== 1) {\n $ERROR('#8: x = new String(\"1\"); x |= new Boolean(true); x === 1. Actual: ' + (x));\n}\n",
+ "id": "S11.13.2_A4.11_T2.5"
+ },
+ {
+ "section": "11.13.2, 11.10.3",
+ "description": "Type(x) is different from Type(y) and both types vary between String (primitive or object) and Undefined",
+ "test": "//CHECK#1\nx = \"1\";\nx |= undefined;\nif (x !== 1) {\n $ERROR('#1: x = \"1\"; x |= undefined; x === 1. Actual: ' + (x));\n}\n\n//CHECK#2\nx = undefined;\nx |= \"1\";\nif (x !== 1) {\n $ERROR('#2: x = undefined; x |= \"1\"; x === 1. Actual: ' + (x));\n}\n\n//CHECK#3\nx = new String(\"1\");\nx |= undefined;\nif (x !== 1) {\n $ERROR('#3: x = new String(\"1\"); x |= undefined; x === 1. Actual: ' + (x));\n}\n\n//CHECK#4\nx = undefined;\nx |= new String(\"1\");\nif (x !== 1) {\n $ERROR('#4: x = undefined; x |= new String(\"1\"); x === 1. Actual: ' + (x));\n}\n",
+ "id": "S11.13.2_A4.11_T2.6"
+ },
+ {
+ "section": "11.13.2, 11.10.3",
+ "description": "Type(x) is different from Type(y) and both types vary between String (primitive or object) and Null",
+ "test": "//CHECK#1\nx = \"1\";\nx |= null;\nif (x !== 1) {\n $ERROR('#1: x = \"1\"; x |= null; x === 1. Actual: ' + (x));\n}\n\n//CHECK#2\nx = null;\nx |= \"1\";\nif (x !== 1) {\n $ERROR('#2: x = null; x |= \"1\"; x === 1. Actual: ' + (x));\n}\n\n//CHECK#3\nx = new String(\"1\");\nx |= null;\nif (x !== 1) {\n $ERROR('#3: x = new String(\"1\"); x |= null; x === 1. Actual: ' + (x));\n}\n\n//CHECK#4\nx = null;\nx |= new String(\"1\");\nif (x !== 1) {\n $ERROR('#4: x = null; x |= new String(\"1\"); x === 1. Actual: ' + (x));\n}\n",
+ "id": "S11.13.2_A4.11_T2.7"
+ },
+ {
+ "section": "11.13.2, 11.10.3",
+ "description": "Type(x) is different from Type(y) and both types vary between Boolean (primitive or object) and Undefined",
+ "test": "//CHECK#1\nx = true;\nx |= undefined;\nif (x !== 1) {\n $ERROR('#1: x = true; x |= undefined; x === 1. Actual: ' + (x));\n}\n\n//CHECK#2\nx = undefined;\nx |= true;\nif (x !== 1) {\n $ERROR('#2: x = undefined; x |= true; x === 1. Actual: ' + (x));\n}\n\n//CHECK#3\nx = new Boolean(true);\nx |= undefined;\nif (x !== 1) {\n $ERROR('#3: x = new Boolean(true); x |= undefined; x === 1. Actual: ' + (x));\n}\n\n//CHECK#4\nx = undefined;\nx |= new Boolean(true);\nif (x !== 1) {\n $ERROR('#4: x = undefined; x |= new Boolean(true); x === 1. Actual: ' + (x));\n}\n",
+ "id": "S11.13.2_A4.11_T2.8"
+ },
+ {
+ "section": "11.13.2, 11.10.3",
+ "description": "Type(x) is different from Type(y) and both types vary between Boolean (primitive or object) and Null",
+ "test": "//CHECK#1\nx = true;\nx |= null;\nif (x !== 1) {\n $ERROR('#1: x = true; x |= null; x === 1. Actual: ' + (x));\n}\n\n//CHECK#2\nx = null;\nx |= true;\nif (x !== 1) {\n $ERROR('#2: x = null; x |= true; x === 1. Actual: ' + (x));\n}\n\n//CHECK#3\nx = new Boolean(true);\nx |= null;\nif (x !== 1) {\n $ERROR('#3: x = new Boolean(true); x |= null; x === 1. Actual: ' + (x));\n}\n\n//CHECK#4\nx = null;\nx |= new Boolean(true);\nif (x !== 1) {\n $ERROR('#4: x = null; x |= new Boolean(true); x === 1. Actual: ' + (x));\n}\n",
+ "id": "S11.13.2_A4.11_T2.9"
+ },
+ {
+ "section": "11.13.2, 11.5.1",
+ "description": "Type(x) and Type(y) vary between primitive boolean and Boolean object",
+ "test": "//CHECK#1\nx = true;\nx *= true;\nif (x !== 1) {\n $ERROR('#1: x = true; x *= true; x === 1. Actual: ' + (x));\n}\n\n//CHECK#2\nx = new Boolean(true);\nx *= true;\nif (x !== 1) {\n $ERROR('#2: x = new Boolean(true); x *= true; x === 1. Actual: ' + (x));\n}\n\n//CHECK#3\nx = true;\nx *= new Boolean(true);\nif (x !== 1) {\n $ERROR('#3: x = true; x *= new Boolean(true); x === 1. Actual: ' + (x));\n}\n\n//CHECK#4\nx = new Boolean(true);\nx *= new Boolean(true);\nif (x !== 1) {\n $ERROR('#4: x = new Boolean(true); x *= new Boolean(true); x === 1. Actual: ' + (x));\n}\n",
+ "id": "S11.13.2_A4.1_T1.1"
+ },
+ {
+ "section": "11.13.2, 11.5.1",
+ "description": "Type(x) and Type(y) vary between primitive number and Number object",
+ "test": "//CHECK#1\nx = 1;\nx *= 1;\nif (x !== 1) {\n $ERROR('#1: x = 1; x *= 1; x === 1. Actual: ' + (x));\n}\n\n//CHECK#2\nx = new Number(1);\nx *= 1;\nif (x !== 1) {\n $ERROR('#2: x = new Number(1); x *= 1; x === 1. Actual: ' + (x));\n}\n\n//CHECK#3\nx = 1;\nx *= new Number(1);\nif (x !== 1) {\n $ERROR('#3: x = 1; x *= new Number(1); x === 1. Actual: ' + (x));\n}\n\n//CHECK#4\nx = new Number(1);\nx *= new Number(1);\nif (x !== 1) {\n $ERROR('#4: x = new Number(1); x *= new Number(1); x === 1. Actual: ' + (x));\n}\n\n",
+ "id": "S11.13.2_A4.1_T1.2"
+ },
+ {
+ "section": "11.13.2, 11.5.1",
+ "description": "Type(x) and Type(y) vary between primitive string and String object",
+ "test": "//CHECK#1\nx = \"1\";\nx *= \"1\";\nif (x !== 1) {\n $ERROR('#1: x = \"1\"; x *= \"1\"; x === 1. Actual: ' + (x));\n}\n\n//CHECK#2\nx = new String(\"1\");\nx *= \"1\";\nif (x !== 1) {\n $ERROR('#2: x = new String(\"1\"); x *= \"1\"; x === 1. Actual: ' + (x));\n}\n\n//CHECK#3\nx = \"1\";\nx *= new String(\"1\");\nif (x !== 1) {\n $ERROR('#3: x = \"1\"; x *= new String(\"1\"); x === 1. Actual: ' + (x));\n}\n\n//CHECK#4\nx = new String(\"1\");\nx *= new String(\"1\");\nif (x !== 1) {\n $ERROR('#4: x = new String(\"1\"); x *= new String(\"1\"); x === 1. Actual: ' + (x));\n}\n\n//CHECK#5\nx = \"x\";\nx *= \"1\";\nif (isNaN(x) !== true) {\n $ERROR('#5: x = \"x\"; x *= \"1\"; x === Not-a-Number. Actual: ' + (x));\n}\n\n//CHECK#6\nx = \"1\";\nx *= \"x\";\nif (isNaN(x) !== true) {\n $ERROR('#6: x = \"1\"; x *= \"x\"; x === Not-a-Number. Actual: ' + (x));\n}\n",
+ "id": "S11.13.2_A4.1_T1.3"
+ },
+ {
+ "section": "11.13.2, 11.5.1",
+ "description": "Type(x) and Type(y) vary between Null and Undefined",
+ "test": "//CHECK#1\nx = null;\nx *= undefined;\nif (isNaN(x) !== true) {\n $ERROR('#1: x = null; x *= undefined; x === Not-a-Number. Actual: ' + (x));\n}\n\n//CHECK#2\nx = undefined;\nx *= null;\nif (isNaN(x) !== true) {\n $ERROR('#2: x = undefined; x *= null; x === Not-a-Number. Actual: ' + (x));\n}\n\n//CHECK#3\nx = undefined;\nx *= undefined;\nif (isNaN(x) !== true) {\n $ERROR('#3: x = undefined; x *= undefined; x === Not-a-Number. Actual: ' + (x));\n}\n\n//CHECK#4\nx = null;\nx *= null;\nif (x !== 0) {\n $ERROR('#4: x = null; x *= null; x === 0. Actual: ' + (x));\n}\n",
+ "id": "S11.13.2_A4.1_T1.4"
+ },
+ {
+ "section": "11.13.2, 11.5.1",
+ "description": "Type(x) is different from Type(y) and both types vary between Boolean (primitive or object) and Number (primitive and object)",
+ "test": "//CHECK#1\nx = true;\nx *= 1;\nif (x !== 1) {\n $ERROR('#1: x = true; x *= 1; x === 1. Actual: ' + (x));\n}\n\n//CHECK#2\nx = 1;\nx *= true;\nif (x !== 1) {\n $ERROR('#2: x = 1; x *= true; x === 1. Actual: ' + (x));\n}\n\n//CHECK#3\nx = new Boolean(true);\nx *= 1;\nif (x !== 1) {\n $ERROR('#3: x = new Boolean(true); x *= 1; x === 1. Actual: ' + (x));\n}\n\n//CHECK#4\nx = 1;\nx *= new Boolean(true);\nif (x !== 1) {\n $ERROR('#4: x = 1; x *= new Boolean(true); x === 1. Actual: ' + (x));\n}\n\n//CHECK#5\nx = true;\nx *= new Number(1);\nif (x !== 1) {\n $ERROR('#5: x = true; x *= new Number(1); x === 1. Actual: ' + (x));\n}\n\n//CHECK#6\nx = new Number(1);\nx *= true;\nif (x !== 1) {\n $ERROR('#6: x = new Number(1); x *= true; x === 1. Actual: ' + (x));\n}\n\n//CHECK#7\nx = new Boolean(true);\nx *= new Number(1);\nif (x !== 1) {\n $ERROR('#7: x = new Boolean(true); x *= new Number(1); x === 1. Actual: ' + (x));\n}\n\n//CHECK#8\nx = new Number(1);\nx *= new Boolean(true);\nif (x !== 1) {\n $ERROR('#8: x = new Number(1); x *= new Boolean(true); x === 1. Actual: ' + (x));\n}\n",
+ "id": "S11.13.2_A4.1_T2.1"
+ },
+ {
+ "section": "11.13.2, 11.5.1",
+ "description": "Type(x) is different from Type(y) and both types vary between Number (primitive or object) and String (primitive and object)",
+ "test": "//CHECK#1\nx = \"1\";\nx *= 1;\nif (x !== 1) {\n $ERROR('#1: x = \"1\"; x *= 1; x === 1. Actual: ' + (x));\n}\n\n//CHECK#2\nx = 1;\nx *= \"1\";\nif (x !== 1) {\n $ERROR('#2: x = 1; x *= \"1\"; x === 1. Actual: ' + (x));\n}\n\n//CHECK#3\nx = new String(\"1\");\nx *= 1;\nif (x !== 1) {\n $ERROR('#3: x = new String(\"1\"); x *= 1; x === 1. Actual: ' + (x));\n}\n\n//CHECK#4\nx = 1;\nx *= new String(\"1\");\nif (x !== 1) {\n $ERROR('#4: x = 1; x *= new String(\"1\"); x === 1. Actual: ' + (x));\n}\n\n//CHECK#5\nx = \"1\";\nx *= new Number(1);\nif (x !== 1) {\n $ERROR('#5: x = \"1\"; x *= new Number(1); x === 1. Actual: ' + (x));\n}\n\n//CHECK#6\nx = new Number(1);\nx *= \"1\";\nif (x !== 1) {\n $ERROR('#6: x = new Number(1); x *= \"1\"; x === 1. Actual: ' + (x));\n}\n\n//CHECK#7\nx = new String(\"1\");\nx *= new Number(1);\nif (x !== 1) {\n $ERROR('#7: x = new String(\"1\"); x *= new Number(1); x === 1. Actual: ' + (x));\n}\n\n//CHECK#8\nx = new Number(1);\nx *= new String(\"1\");\nif (x !== 1) {\n $ERROR('#8: x = new Number(1); x *= new String(\"1\"); x === 1. Actual: ' + (x));\n}\n\n//CHECK#9\nx = \"x\";\nx *= 1;\nif (isNaN(x) !== true) {\n $ERROR('#9: x = \"x\"; x *= 1; x === Not-a-Number. Actual: ' + (x));\n}\n\n//CHECK#10\nx = 1;\nx *= \"x\";\nif (isNaN(x) !== true) {\n $ERROR('#10: x = 1; x *= \"x\"; x === Not-a-Number. Actual: ' + (x));\n}\n",
+ "id": "S11.13.2_A4.1_T2.2"
+ },
+ {
+ "section": "11.13.2, 11.5.1",
+ "description": "Type(x) is different from Type(y) and both types vary between Number (primitive or object) and Null",
+ "test": "//CHECK#1\nx = 1;\nx *= null;\nif (x !== 0) {\n $ERROR('#1: x = 1; x *= null; x === 0. Actual: ' + (x));\n}\n\n//CHECK#2\nx = null;\nx *= 1;\nif (x !== 0) {\n $ERROR('#2: x = null; x *= 1; x === 0. Actual: ' + (x));\n}\n\n//CHECK#3\nx = new Number(1);\nx *= null;\nif (x !== 0) {\n $ERROR('#3: x = new Number(1); x *= null; x === 0. Actual: ' + (x));\n}\n\n//CHECK#4\nx = null;\nx *= new Number(1);\nif (x !== 0) {\n $ERROR('#4: x = null; x *= new Number(1); x === 0. Actual: ' + (x));\n}\n",
+ "id": "S11.13.2_A4.1_T2.3"
+ },
+ {
+ "section": "11.13.2, 11.5.1",
+ "description": "Type(x) is different from Type(y) and both types vary between Number (primitive or object) and Undefined",
+ "test": "//CHECK#1\nx = 1;\nx *= undefined;\nif (isNaN(x) !== true) {\n $ERROR('#1: x = 1; x *= undefined; x === Not-a-Number. Actual: ' + (x));\n}\n\n//CHECK#2\nx = undefined;\nx *= 1;\nif (isNaN(x) !== true) {\n $ERROR('#2: x = undefined; x *= 1; x === Not-a-Number. Actual: ' + (x));\n}\n\n//CHECK#3\nx = new Number(1);\nx *= undefined;\nif (isNaN(x) !== true) {\n $ERROR('#3: x = new Number(1); x *= undefined; x === Not-a-Number. Actual: ' + (x));\n}\n\n//CHECK#4\nx = undefined;\nx *= new Number(1);\nif (isNaN(x) !== true) {\n $ERROR('#4: x = undefined; x *= new Number(1); x === Not-a-Number. Actual: ' + (x));\n}\n",
+ "id": "S11.13.2_A4.1_T2.4"
+ },
+ {
+ "section": "11.13.2, 11.5.1",
+ "description": "Type(x) is different from Type(y) and both types vary between String (primitive or object) amd Boolean (primitive and object)",
+ "test": "//CHECK#1\nx = true;\nx *= \"1\";\nif (x !== 1) {\n $ERROR('#1: x = true; x *= \"1\"; x === 1. Actual: ' + (x));\n}\n\n//CHECK#2\nx = \"1\";\nx *= true;\nif (x !== 1) {\n $ERROR('#2: x = \"1\"; x *= true; x === 1. Actual: ' + (x));\n}\n\n//CHECK#3\nx = new Boolean(true);\nx *= \"1\";\nif (x !== 1) {\n $ERROR('#3: x = new Boolean(true); x *= \"1\"; x === 1. Actual: ' + (x));\n}\n\n//CHECK#4\nx = \"1\";\nx *= new Boolean(true);\nif (x !== 1) {\n $ERROR('#4: x = \"1\"; x *= new Boolean(true); x === 1. Actual: ' + (x));\n}\n\n//CHECK#5\nx = true;\nx *= new String(\"1\");\nif (x !== 1) {\n $ERROR('#5: x = true; x *= new String(\"1\"); x === 1. Actual: ' + (x));\n}\n\n//CHECK#6\nx = new String(\"1\");\nx *= true;\nif (x !== 1) {\n $ERROR('#6: x = new String(\"1\"); x *= true; x === 1. Actual: ' + (x));\n}\n\n//CHECK#7\nx = new Boolean(true);\nx *= new String(\"1\");\nif (x !== 1) {\n $ERROR('#7: x = new Boolean(true); x *= new String(\"1\"); x === 1. Actual: ' + (x));\n}\n\n//CHECK#8\nx = new String(\"1\");\nx *= new Boolean(true);\nif (x !== 1) {\n $ERROR('#8: x = new String(\"1\"); x *= new Boolean(true); x === 1. Actual: ' + (x));\n}\n",
+ "id": "S11.13.2_A4.1_T2.5"
+ },
+ {
+ "section": "11.13.2, 11.5.1",
+ "description": "Type(x) is different from Type(y) and both types vary between primitive String (primitive or object) and Undefined",
+ "test": "//CHECK#1\nx = \"1\";\nx *= undefined;\nif (isNaN(x) !== true) {\n $ERROR('#1: x = \"1\"; x *= undefined; x === Not-a-Number. Actual: ' + (x));\n}\n\n//CHECK#2\nx = undefined;\nx *= \"1\";\nif (isNaN(x) !== true) {\n $ERROR('#2: x = undefined; x *= \"1\"; x === Not-a-Number. Actual: ' + (x));\n}\n\n//CHECK#3\nx = new String(\"1\");\nx *= undefined;\nif (isNaN(x) !== true) {\n $ERROR('#3: x = new String(\"1\"); x *= undefined; x === Not-a-Number. Actual: ' + (x));\n}\n\n//CHECK#4\nx = undefined;\nx *= new String(\"1\");\nif (isNaN(x) !== true) {\n $ERROR('#4: x = undefined; x *= new String(\"1\"); x === Not-a-Number. Actual: ' + (x));\n}\n",
+ "id": "S11.13.2_A4.1_T2.6"
+ },
+ {
+ "section": "11.13.2, 11.5.1",
+ "description": "Type(x) is different from Type(y) and both types vary between String (primitive or object) and Null",
+ "test": "//CHECK#1\nx = \"1\";\nx *= null;\nif (x !== 0) {\n $ERROR('#1: x = \"1\"; x *= null; x === 0. Actual: ' + (x));\n}\n\n//CHECK#2\nx = null;\nx *= \"1\";\nif (x !== 0) {\n $ERROR('#2: x = null; x *= \"1\"; x === 0. Actual: ' + (x));\n}\n\n//CHECK#3\nx = new String(\"1\");\nx *= null;\nif (x !== 0) {\n $ERROR('#3: x = new String(\"1\"); x *= null; x === 0. Actual: ' + (x));\n}\n\n//CHECK#4\nx = null;\nx *= new String(\"1\");\nif (x !== 0) {\n $ERROR('#4: x = null; x *= new String(\"1\"); x === 0. Actual: ' + (x));\n}\n",
+ "id": "S11.13.2_A4.1_T2.7"
+ },
+ {
+ "section": "11.13.2, 11.5.1",
+ "description": "Type(x) is different from Type(y) and both types vary between Boolean (primitive or object) and Undefined",
+ "test": "//CHECK#1\nx = true;\nx *= undefined;\nif (isNaN(x) !== true) {\n $ERROR('#1: x = true; x *= undefined; x === Not-a-Number. Actual: ' + (x));\n}\n\n//CHECK#2\nx = undefined;\nx *= true;\nif (isNaN(x) !== true) {\n $ERROR('#2: x = undefined; x *= true; x === Not-a-Number. Actual: ' + (x));\n}\n\n//CHECK#3\nx = new Boolean(true);\nx *= undefined;\nif (isNaN(x) !== true) {\n $ERROR('#3: x = new Boolean(true); x *= undefined; x === Not-a-Number. Actual: ' + (x));\n}\n\n//CHECK#4\nx = undefined;\nx *= new Boolean(true);\nif (isNaN(x) !== true) {\n $ERROR('#4: x = undefined; x *= new Boolean(true); x === Not-a-Number. Actual: ' + (x));\n}\n",
+ "id": "S11.13.2_A4.1_T2.8"
+ },
+ {
+ "section": "11.13.2, 11.5.1",
+ "description": "Type(x) is different from Type(y) and both types vary between Boolean (primitive or object) and Null",
+ "test": "//CHECK#1\nx = true;\nx *= null;\nif (x !== 0) {\n $ERROR('#1: x = true; x *= null; x === 0. Actual: ' + (x));\n}\n\n//CHECK#2\nx = null;\nx *= true;\nif (x !== 0) {\n $ERROR('#2: x = null; x *= true; x === 0. Actual: ' + (x));\n}\n\n//CHECK#3\nx = new Boolean(true);\nx *= null;\nif (x !== 0) {\n $ERROR('#3: x = new Boolean(true); x *= null; x === 0. Actual: ' + (x));\n}\n\n//CHECK#4\nx = null;\nx *= new Boolean(true);\nif (x !== 0) {\n $ERROR('#4: x = null; x *= new Boolean(true); x === 0. Actual: ' + (x));\n}\n",
+ "id": "S11.13.2_A4.1_T2.9"
+ },
+ {
+ "section": "11.13.2, 11.5.2",
+ "description": "Type(x) and Type(y) vary between primitive boolean and Boolean object",
+ "test": "//CHECK#1\nx = true;\nx /= true;\nif (x !== 1) {\n $ERROR('#1: x = true; x /= true; x === 1. Actual: ' + (x));\n}\n\n//CHECK#2\nx = new Boolean(true);\nx /= true;\nif (x !== 1) {\n $ERROR('#2: x = new Boolean(true); x /= true; x === 1. Actual: ' + (x));\n}\n\n//CHECK#3\nx = true;\nx /= new Boolean(true);\nif (x !== 1) {\n $ERROR('#3: x = true; x /= new Boolean(true); x === 1. Actual: ' + (x));\n}\n\n//CHECK#4\nx = new Boolean(true);\nx /= new Boolean(true);\nif (x !== 1) {\n $ERROR('#4: x = new Boolean(true); x /= new Boolean(true); x === 1. Actual: ' + (x));\n}\n",
+ "id": "S11.13.2_A4.2_T1.1"
+ },
+ {
+ "section": "11.13.2, 11.5.2",
+ "description": "Type(x) and Type(y) vary between primitive number and Number object",
+ "test": "//CHECK#1\nx = 1;\nx /= 1;\nif (x !== 1) {\n $ERROR('#1: x = 1; x /= 1; x === 1. Actual: ' + (x));\n}\n\n//CHECK#2\nx = new Number(1);\nx /= 1;\nif (x !== 1) {\n $ERROR('#2: x = new Number(1); x /= 1; x === 1. Actual: ' + (x));\n}\n\n//CHECK#3\nx = 1;\nx /= new Number(1);\nif (x !== 1) {\n $ERROR('#3: x = 1; x /= new Number(1); x === 1. Actual: ' + (x));\n}\n\n//CHECK#4\nx = new Number(1);\nx /= new Number(1);\nif (x !== 1) {\n $ERROR('#4: x = new Number(1); x /= new Number(1); x === 1. Actual: ' + (x));\n}\n\n",
+ "id": "S11.13.2_A4.2_T1.2"
+ },
+ {
+ "section": "11.13.2, 11.5.2",
+ "description": "Type(x) and Type(y) vary between primitive string and String object",
+ "test": "//CHECK#1\nx = \"1\";\nx /= \"1\";\nif (x !== 1) {\n $ERROR('#1: x = \"1\"; x /= \"1\"; x === 1. Actual: ' + (x));\n}\n\n//CHECK#2\nx = new String(\"1\");\nx /= \"1\";\nif (x !== 1) {\n $ERROR('#2: x = new String(\"1\"); x /= \"1\"; x === 1. Actual: ' + (x));\n}\n\n//CHECK#3\nx = \"1\";\nx /= new String(\"1\");\nif (x !== 1) {\n $ERROR('#3: x = \"1\"; x /= new String(\"1\"); x === 1. Actual: ' + (x));\n}\n\n//CHECK#4\nx = new String(\"1\");\nx /= new String(\"1\");\nif (x !== 1) {\n $ERROR('#4: x = new String(\"1\"); x /= new String(\"1\"); x === 1. Actual: ' + (x));\n}\n\n//CHECK#5\nx = \"x\";\nx /= \"1\";\nif (isNaN(x) !== true) {\n $ERROR('#5: x = \"x\"; x /= \"1\"; x === Not-a-Number. Actual: ' + (x));\n}\n\n//CHECK#6\nx = \"1\";\nx /= \"x\";\nif (isNaN(x) !== true) {\n $ERROR('#6: x = \"1\"; x /= \"x\"; x === Not-a-Number. Actual: ' + (x));\n}\n",
+ "id": "S11.13.2_A4.2_T1.3"
+ },
+ {
+ "section": "11.13.2, 11.5.2",
+ "description": "Type(x) and Type(y) vary between Null and Undefined",
+ "test": "//CHECK#1\nx = null;\nx /= undefined;\nif (isNaN(x) !== true) {\n $ERROR('#1: x = null; x /= undefined; x === Not-a-Number. Actual: ' + (x));\n}\n\n//CHECK#2\nx = undefined;\nx /= null;\nif (isNaN(x) !== true) {\n $ERROR('#2: x = undefined; x /= null; x === Not-a-Number. Actual: ' + (x));\n}\n\n//CHECK#3\nx = undefined;\nx /= undefined;\nif (isNaN(x) !== true) {\n $ERROR('#3: x = undefined; x /= undefined; x === Not-a-Number. Actual: ' + (x));\n}\n\n//CHECK#4\nx = null;\nx /= null;\nif (isNaN(x) !== true) {\n $ERROR('#4: x = null; x /= null; x === Not-a-Number. Actual: ' + (x));\n}\n",
+ "id": "S11.13.2_A4.2_T1.4"
+ },
+ {
+ "section": "11.13.2, 11.5.2",
+ "description": "Type(x) is different from Type(y) and both types vary between Number (primitive or object) and Boolean (primitive and object)",
+ "test": "//CHECK#1\nx = true;\nx /= 1;\nif (x !== 1) {\n $ERROR('#1: x = true; x /= 1; x === 1. Actual: ' + (x));\n}\n\n//CHECK#2\nx = 1;\nx /= true;\nif (x !== 1) {\n $ERROR('#2: x = 1; x /= true; x === 1. Actual: ' + (x));\n}\n\n//CHECK#3\nx = new Boolean(true);\nx /= 1;\nif (x !== 1) {\n $ERROR('#3: x = new Boolean(true); x /= 1; x === 1. Actual: ' + (x));\n}\n\n//CHECK#4\nx = 1;\nx /= new Boolean(true);\nif (x !== 1) {\n $ERROR('#4: x = 1; x /= new Boolean(true); x === 1. Actual: ' + (x));\n}\n\n//CHECK#5\nx = true;\nx /= new Number(1);\nif (x !== 1) {\n $ERROR('#5: x = true; x /= new Number(1); x === 1. Actual: ' + (x));\n}\n\n//CHECK#6\nx = new Number(1);\nx /= true;\nif (x !== 1) {\n $ERROR('#6: x = new Number(1); x /= true; x === 1. Actual: ' + (x));\n}\n\n//CHECK#7\nx = new Boolean(true);\nx /= new Number(1);\nif (x !== 1) {\n $ERROR('#7: x = new Boolean(true); x /= new Number(1); x === 1. Actual: ' + (x));\n}\n\n//CHECK#8\nx = new Number(1);\nx /= new Boolean(true);\nif (x !== 1) {\n $ERROR('#8: x = new Number(1); x /= new Boolean(true); x === 1. Actual: ' + (x));\n}\n",
+ "id": "S11.13.2_A4.2_T2.1"
+ },
+ {
+ "section": "11.13.2, 11.5.2",
+ "description": "Type(x) is different from Type(y) and both types vary between Number (primitive or object) and String (primitive and object)",
+ "test": "//CHECK#1\nx = \"1\";\nx /= 1;\nif (x !== 1) {\n $ERROR('#1: x = \"1\"; x /= 1; x === 1. Actual: ' + (x));\n}\n\n//CHECK#2\nx = 1;\nx /= \"1\";\nif (x !== 1) {\n $ERROR('#2: x = 1; x /= \"1\"; x === 1. Actual: ' + (x));\n}\n\n//CHECK#3\nx = new String(\"1\");\nx /= 1;\nif (x !== 1) {\n $ERROR('#3: x = new String(\"1\"); x /= 1; x === 1. Actual: ' + (x));\n}\n\n//CHECK#4\nx = 1;\nx /= new String(\"1\");\nif (x !== 1) {\n $ERROR('#4: x = 1; x /= new String(\"1\"); x === 1. Actual: ' + (x));\n}\n\n//CHECK#5\nx = \"1\";\nx /= new Number(1);\nif (x !== 1) {\n $ERROR('#5: x = \"1\"; x /= new Number(1); x === 1. Actual: ' + (x));\n}\n\n//CHECK#6\nx = new Number(1);\nx /= \"1\";\nif (x !== 1) {\n $ERROR('#6: x = new Number(1); x /= \"1\"; x === 1. Actual: ' + (x));\n}\n\n//CHECK#7\nx = new String(\"1\");\nx /= new Number(1);\nif (x !== 1) {\n $ERROR('#7: x = new String(\"1\"); x /= new Number(1); x === 1. Actual: ' + (x));\n}\n\n//CHECK#8\nx = new Number(1);\nx /= new String(\"1\");\nif (x !== 1) {\n $ERROR('#8: x = new Number(1); x /= new String(\"1\"); x === 1. Actual: ' + (x));\n}\n\n//CHECK#9\nx = \"x\";\nx /= 1;\nif (isNaN(x) !== true) {\n $ERROR('#9: x = \"x\"; x /= 1; x === Not-a-Number. Actual: ' + (x));\n}\n\n//CHECK#10\nx = 1;\nx /= \"x\";\nif (isNaN(x) !== true) {\n $ERROR('#10: x = 1; x /= \"x\"; x === Not-a-Number. Actual: ' + (x));\n}\n",
+ "id": "S11.13.2_A4.2_T2.2"
+ },
+ {
+ "section": "11.13.2, 11.5.2",
+ "description": "Type(x) is different from Type(y) and both types vary between Number (primitive or object) and Null",
+ "test": "//CHECK#1\nx = 1;\nx /= null;\nif (x !== Number.POSITIVE_INFINITY) {\n $ERROR('#1: x = 1; x /= null; x === +Infinity. Actual: ' + (x));\n}\n\n//CHECK#2\nx = null;\nx /= 1;\nif (x !== 0) {\n $ERROR('#2: x = null; x /= 1; x === 0. Actual: ' + (x));\n}\n\n//CHECK#3\nx = new Number(1);\nx /= null;\nif (x !== Number.POSITIVE_INFINITY) {\n $ERROR('#3: x = new Number(1); x /= null; x === +Infinity. Actual: ' + (x));\n}\n\n//CHECK#4\nx = null;\nx /= new Number(1);\nif (x !== 0) {\n $ERROR('#4: x = null; x /= new Number(1); x === 0. Actual: ' + (x));\n}\n",
+ "id": "S11.13.2_A4.2_T2.3"
+ },
+ {
+ "section": "11.13.2, 11.5.2",
+ "description": "Type(x) is different from Type(y) and both types vary between Number (primitive or object) and Undefined",
+ "test": "//CHECK#1\nx = 1;\nx /= undefined;\nif (isNaN(x) !== true) {\n $ERROR('#1: x = 1; x /= undefined; x === Not-a-Number. Actual: ' + (x));\n}\n\n//CHECK#2\nx = undefined;\nx /= 1;\nif (isNaN(x) !== true) {\n $ERROR('#2: x = undefined; x /= 1; x === Not-a-Number. Actual: ' + (x));\n}\n\n//CHECK#3\nx = new Number(1);\nx /= undefined;\nif (isNaN(x) !== true) {\n $ERROR('#3: x = new Number(1); x /= undefined; x === Not-a-Number. Actual: ' + (x));\n}\n\n//CHECK#4\nx = undefined;\nx /= new Number(1);\nif (isNaN(x) !== true) {\n $ERROR('#4: x = undefined; x /= new Number(1); x === Not-a-Number. Actual: ' + (x));\n}\n",
+ "id": "S11.13.2_A4.2_T2.4"
+ },
+ {
+ "section": "11.13.2, 11.5.2",
+ "description": "Type(x) is different from Type(y) and both types vary between String (primitive or object) and Boolean (primitive and object)",
+ "test": "//CHECK#1\nx = true;\nx /= \"1\";\nif (x !== 1) {\n $ERROR('#1: x = true; x /= \"1\"; x === 1. Actual: ' + (x));\n}\n\n//CHECK#2\nx = \"1\";\nx /= true;\nif (x !== 1) {\n $ERROR('#2: x = \"1\"; x /= true; x === 1. Actual: ' + (x));\n}\n\n//CHECK#3\nx = new Boolean(true);\nx /= \"1\";\nif (x !== 1) {\n $ERROR('#3: x = new Boolean(true); x /= \"1\"; x === 1. Actual: ' + (x));\n}\n\n//CHECK#4\nx = \"1\";\nx /= new Boolean(true);\nif (x !== 1) {\n $ERROR('#4: x = \"1\"; x /= new Boolean(true); x === 1. Actual: ' + (x));\n}\n\n//CHECK#5\nx = true;\nx /= new String(\"1\");\nif (x !== 1) {\n $ERROR('#5: x = true; x /= new String(\"1\"); x === 1. Actual: ' + (x));\n}\n\n//CHECK#6\nx = new String(\"1\");\nx /= true;\nif (x !== 1) {\n $ERROR('#6: x = new String(\"1\"); x /= true; x === 1. Actual: ' + (x));\n}\n\n//CHECK#7\nx = new Boolean(true);\nx /= new String(\"1\");\nif (x !== 1) {\n $ERROR('#7: x = new Boolean(true); x /= new String(\"1\"); x === 1. Actual: ' + (x));\n}\n\n//CHECK#8\nx = new String(\"1\");\nx /= new Boolean(true);\nif (x !== 1) {\n $ERROR('#8: x = new String(\"1\"); x /= new Boolean(true); x === 1. Actual: ' + (x));\n}\n",
+ "id": "S11.13.2_A4.2_T2.5"
+ },
+ {
+ "section": "11.13.2, 11.5.2",
+ "description": "Type(x) is different from Type(y) and both types vary between String (primitive or object) and Undefined",
+ "test": "//CHECK#1\nx = \"1\";\nx /= undefined;\nif (isNaN(x) !== true) {\n $ERROR('#1: x = \"1\"; x /= undefined; x === Not-a-Number. Actual: ' + (x));\n}\n\n//CHECK#2\nx = undefined;\nx /= \"1\";\nif (isNaN(x) !== true) {\n $ERROR('#2: x = undefined; x /= \"1\"; x === Not-a-Number. Actual: ' + (x));\n}\n\n//CHECK#3\nx = new String(\"1\");\nx /= undefined;\nif (isNaN(x) !== true) {\n $ERROR('#3: x = new String(\"1\"); x /= undefined; x === Not-a-Number. Actual: ' + (x));\n}\n\n//CHECK#4\nx = undefined;\nx /= new String(\"1\");\nif (isNaN(x) !== true) {\n $ERROR('#4: x = undefined; x /= new String(\"1\"); x === Not-a-Number. Actual: ' + (x));\n}\n",
+ "id": "S11.13.2_A4.2_T2.6"
+ },
+ {
+ "section": "11.13.2, 11.5.2",
+ "description": "Type(x) is different from Type(y) and both types vary between String (primitive or object) and Null",
+ "test": "//CHECK#1\nx = \"1\";\nx /= null;\nif (x !== Number.POSITIVE_INFINITY) {\n $ERROR('#1: x = \"1\"; x /= null; x === +Infinity. Actual: ' + (x));\n}\n\n//CHECK#2\nx = null;\nx /= \"1\";\nif (x !== 0) {\n $ERROR('#2: x = null; x /= \"1\"; x === 0. Actual: ' + (x));\n}\n\n//CHECK#3\nx = new String(\"1\");\nx /= null;\nif (x !== Number.POSITIVE_INFINITY) {\n $ERROR('#3: x = new String(\"1\"); x /= null; x === +Infinity. Actual: ' + (x));\n}\n\n//CHECK#4\nx = null;\nx /= new String(\"1\");\nif (x !== 0) {\n $ERROR('#4: x = null; x /= new String(\"1\"); x === 0. Actual: ' + (x));\n}\n",
+ "id": "S11.13.2_A4.2_T2.7"
+ },
+ {
+ "section": "11.13.2, 11.5.2",
+ "description": "Type(x) is different from Type(y) and both types vary between Boolean (primitive or object) and Undefined",
+ "test": "//CHECK#1\nx = true;\nx /= undefined;\nif (isNaN(x) !== true) {\n $ERROR('#1: x = true; x /= undefined; x === Not-a-Number. Actual: ' + (x));\n}\n\n//CHECK#2\nx = undefined;\nx /= true;\nif (isNaN(x) !== true) {\n $ERROR('#2: x = undefined; x /= true; x === Not-a-Number. Actual: ' + (x));\n}\n\n//CHECK#3\nx = new Boolean(true);\nx /= undefined;\nif (isNaN(x) !== true) {\n $ERROR('#3: x = new Boolean(true); x /= undefined; x === Not-a-Number. Actual: ' + (x));\n}\n\n//CHECK#4\nx = undefined;\nx /= new Boolean(true);\nif (isNaN(x) !== true) {\n $ERROR('#4: x = undefined; x /= new Boolean(true); x === Not-a-Number. Actual: ' + (x));\n}\n",
+ "id": "S11.13.2_A4.2_T2.8"
+ },
+ {
+ "section": "11.13.2, 11.5.2",
+ "description": "Type(x) is different from Type(y) and both types vary between Boolean (primitive or object) and Null",
+ "test": "//CHECK#1\nx = true;\nx /= null;\nif (x !== Number.POSITIVE_INFINITY) {\n $ERROR('#1: x = true; x /= null; x === +Infinity. Actual: ' + (x));\n}\n\n//CHECK#2\nx = null;\nx /= true;\nif (x !== 0) {\n $ERROR('#2: x = null; x /= true; x === 0. Actual: ' + (x));\n}\n\n//CHECK#3\nx = new Boolean(true);\nx /= null;\nif (x !== Number.POSITIVE_INFINITY) {\n $ERROR('#3: x = new Boolean(true); x /= null; x === +Infinity. Actual: ' + (x));\n}\n\n//CHECK#4\nx = null;\nx /= new Boolean(true);\nif (x !== 0) {\n $ERROR('#4: x = null; x /= new Boolean(true); x === 0. Actual: ' + (x));\n}\n",
+ "id": "S11.13.2_A4.2_T2.9"
+ },
+ {
+ "section": "11.13.2, 11.5.3",
+ "description": "Type(x) and Type(y) vary between primitive boolean and Boolean object",
+ "test": "//CHECK#1\nx = true;\nx %= true;\nif (x !== 0) {\n $ERROR('#1: x = true; x %= true; x === 0. Actual: ' + (x));\n}\n\n//CHECK#2\nx = new Boolean(true);\nx %= true;\nif (x !== 0) {\n $ERROR('#2: x = new Boolean(true); x %= true; x === 0. Actual: ' + (x));\n}\n\n//CHECK#3\nx = true;\nx %= new Boolean(true);\nif (x !== 0) {\n $ERROR('#3: x = true; x %= new Boolean(true); x === 0. Actual: ' + (x));\n}\n\n//CHECK#4\nx = new Boolean(true);\nx %= new Boolean(true);\nif (x !== 0) {\n $ERROR('#4: x = new Boolean(true); x %= new Boolean(true); x === 0. Actual: ' + (x));\n}\n",
+ "id": "S11.13.2_A4.3_T1.1"
+ },
+ {
+ "section": "11.13.2, 11.5.3",
+ "description": "Type(x) and Type(y) vary between primitive number and Number object",
+ "test": "//CHECK#1\nx = 1;\nx %= 1;\nif (x !== 0) {\n $ERROR('#1: x = 1; x %= 1; x === 0. Actual: ' + (x));\n}\n\n//CHECK#2\nx = new Number(1);\nx %= 1;\nif (x !== 0) {\n $ERROR('#2: x = new Number(1); x %= 1; x === 0. Actual: ' + (x));\n}\n\n//CHECK#3\nx = 1;\nx %= new Number(1);\nif (x !== 0) {\n $ERROR('#3: x = 1; x %= new Number(1); x === 0. Actual: ' + (x));\n}\n\n//CHECK#4\nx = new Number(1);\nx %= new Number(1);\nif (x !== 0) {\n $ERROR('#4: x = new Number(1); x %= new Number(1); x === 0. Actual: ' + (x));\n}\n\n",
+ "id": "S11.13.2_A4.3_T1.2"
+ },
+ {
+ "section": "11.13.2, 11.5.3",
+ "description": "Type(x) and Type(y) vary between primitive string and String object",
+ "test": "//CHECK#1\nx = \"1\";\nx %= \"1\";\nif (x !== 0) {\n $ERROR('#1: x = \"1\"; x %= \"1\"; x === 0. Actual: ' + (x));\n}\n\n//CHECK#2\nx = new String(\"1\");\nx %= \"1\";\nif (x !== 0) {\n $ERROR('#2: x = new String(\"1\"); x %= \"1\"; x === 0. Actual: ' + (x));\n}\n\n//CHECK#3\nx = \"1\";\nx %= new String(\"1\");\nif (x !== 0) {\n $ERROR('#3: x = \"1\"; x %= new String(\"1\"); x === 0. Actual: ' + (x));\n}\n\n//CHECK#4\nx = new String(\"1\");\nx %= new String(\"1\");\nif (x !== 0) {\n $ERROR('#4: x = new String(\"1\"); x %= new String(\"1\"); x === 0. Actual: ' + (x));\n}\n\n//CHECK#5\nx = \"x\";\nx %= \"1\";\nif (isNaN(x) !== true) {\n $ERROR('#5: x = \"x\"; x %= \"1\"; x === Not-a-Number. Actual: ' + (x));\n}\n\n//CHECK#6\nx = \"1\";\nx %= \"x\";\nif (isNaN(x) !== true) {\n $ERROR('#6: x = \"1\"; x %= \"x\"; x === Not-a-Number. Actual: ' + (x));\n}\n",
+ "id": "S11.13.2_A4.3_T1.3"
+ },
+ {
+ "section": "11.13.2, 11.5.3",
+ "description": "Type(x) and Type(y) vary between Null and Undefined",
+ "test": "//CHECK#1\nx = null;\nx %= undefined;\nif (isNaN(x) !== true) {\n $ERROR('#1: x = null; x %= undefined; x === Not-a-Number. Actual: ' + (x));\n}\n\n//CHECK#2\nx = undefined;\nx %= null;\nif (isNaN(x) !== true) {\n $ERROR('#2: x = undefined; x %= null; x === Not-a-Number. Actual: ' + (x));\n}\n\n//CHECK#3\nx = undefined;\nx %= undefined;\nif (isNaN(x) !== true) {\n $ERROR('#3: x = undefined; x %= undefined; x === Not-a-Number. Actual: ' + (x));\n}\n\n//CHECK#4\nx = null;\nx %= null;\nif (isNaN(x) !== true) {\n $ERROR('#4: x = null; x %= null; x === Not-a-Number. Actual: ' + (x));\n}\n",
+ "id": "S11.13.2_A4.3_T1.4"
+ },
+ {
+ "section": "11.13.2, 11.5.3",
+ "description": "Type(x) is different from Type(y) and both types vary between Number (primitive or object) and Boolean (primitive and object)",
+ "test": "//CHECK#1\nx = true;\nx %= 1;\nif (x !== 0) {\n $ERROR('#1: x = true; x %= 1; x === 0. Actual: ' + (x));\n}\n\n//CHECK#2\nx = 1;\nx %= true;\nif (x !== 0) {\n $ERROR('#2: x = 1; x %= true; x === 0. Actual: ' + (x));\n}\n\n//CHECK#3\nx = new Boolean(true);\nx %= 1;\nif (x !== 0) {\n $ERROR('#3: x = new Boolean(true); x %= 1; x === 0. Actual: ' + (x));\n}\n\n//CHECK#4\nx = 1;\nx %= new Boolean(true);\nif (x !== 0) {\n $ERROR('#4: x = 1; x %= new Boolean(true); x === 0. Actual: ' + (x));\n}\n\n//CHECK#5\nx = true;\nx %= new Number(1);\nif (x !== 0) {\n $ERROR('#5: x = true; x %= new Number(1); x === 0. Actual: ' + (x));\n}\n\n//CHECK#6\nx = new Number(1);\nx %= true;\nif (x !== 0) {\n $ERROR('#6: x = new Number(1); x %= true; x === 0. Actual: ' + (x));\n}\n\n//CHECK#7\nx = new Boolean(true);\nx %= new Number(1);\nif (x !== 0) {\n $ERROR('#7: x = new Boolean(true); x %= new Number(1); x === 0. Actual: ' + (x));\n}\n\n//CHECK#8\nx = new Number(1);\nx %= new Boolean(true);\nif (x !== 0) {\n $ERROR('#8: x = new Number(1); x %= new Boolean(true); x === 0. Actual: ' + (x));\n}\n",
+ "id": "S11.13.2_A4.3_T2.1"
+ },
+ {
+ "section": "11.13.2, 11.5.3",
+ "description": "Type(x) is different from Type(y) and both types vary between Number (primitive or object) and String (primitive and object)",
+ "test": "//CHECK#1\nx = \"1\";\nx %= 1;\nif (x !== 0) {\n $ERROR('#1: x = \"1\"; x %= 1; x === 0. Actual: ' + (x));\n}\n\n//CHECK#2\nx = 1;\nx %= \"1\";\nif (x !== 0) {\n $ERROR('#2: x = 1; x %= \"1\"; x === 0. Actual: ' + (x));\n}\n\n//CHECK#3\nx = new String(\"1\");\nx %= 1;\nif (x !== 0) {\n $ERROR('#3: x = new String(\"1\"); x %= 1; x === 0. Actual: ' + (x));\n}\n\n//CHECK#4\nx = 1;\nx %= new String(\"1\");\nif (x !== 0) {\n $ERROR('#4: x = 1; x %= new String(\"1\"); x === 0. Actual: ' + (x));\n}\n\n//CHECK#5\nx = \"1\";\nx %= new Number(1);\nif (x !== 0) {\n $ERROR('#5: x = \"1\"; x %= new Number(1); x === 0. Actual: ' + (x));\n}\n\n//CHECK#6\nx = new Number(1);\nx %= \"1\";\nif (x !== 0) {\n $ERROR('#6: x = new Number(1); x %= \"1\"; x === 0. Actual: ' + (x));\n}\n\n//CHECK#7\nx = new String(\"1\");\nx %= new Number(1);\nif (x !== 0) {\n $ERROR('#7: x = new String(\"1\"); x %= new Number(1); x === 0. Actual: ' + (x));\n}\n\n//CHECK#8\nx = new Number(1);\nx %= new String(\"1\");\nif (x !== 0) {\n $ERROR('#8: x = new Number(1); x %= new String(\"1\"); x === 0. Actual: ' + (x));\n}\n\n//CHECK#9\nx = \"x\";\nx %= 1;\nif (isNaN(x) !== true) {\n $ERROR('#9: x = \"x\"; x %= 1; x === Not-a-Number. Actual: ' + (x));\n}\n\n//CHECK#10\nx = 1;\nx %= \"x\";\nif (isNaN(x) !== true) {\n $ERROR('#10: x = 1; x %= \"x\"; x === Not-a-Number. Actual: ' + (x));\n}\n",
+ "id": "S11.13.2_A4.3_T2.2"
+ },
+ {
+ "section": "11.13.2, 11.5.3",
+ "description": "Type(x) is different from Type(y) and both types vary between Number (primitive or object) and Null",
+ "test": "//CHECK#1\nx = 1;\nx %= null;\nif (isNaN(x) !== true) {\n $ERROR('#1: x = 1; x %= null; x === Not-a-Number. Actual: ' + (x));\n}\n\n//CHECK#2\nx = null;\nx %= 1;\nif (x !== 0) {\n $ERROR('#2: x = null; x %= 1; x === 0. Actual: ' + (x));\n}\n\n//CHECK#3\nx = new Number(1);\nx %= null;\nif (isNaN(x) !== true) {\n $ERROR('#3: x = new Number(1); x %= null; x === Not-a-Number. Actual: ' + (x));\n}\n\n//CHECK#4\nx = null;\nx %= new Number(1);\nif (x !== 0) {\n $ERROR('#4: x = null; x %= new Number(1); x === 0. Actual: ' + (x));\n}\n",
+ "id": "S11.13.2_A4.3_T2.3"
+ },
+ {
+ "section": "11.13.2, 11.5.3",
+ "description": "Type(x) is different from Type(y) and both types vary between Number (primitive or object) and Undefined",
+ "test": "//CHECK#1\nx = 1;\nx %= undefined;\nif (isNaN(x) !== true) {\n $ERROR('#1: x = 1; x %= undefined; x === Not-a-Number. Actual: ' + (x));\n}\n\n//CHECK#2\nx = undefined;\nx %= 1;\nif (isNaN(x) !== true) {\n $ERROR('#2: x = undefined; x %= 1; x === Not-a-Number. Actual: ' + (x));\n}\n\n//CHECK#3\nx = new Number(1);\nx %= undefined;\nif (isNaN(x) !== true) {\n $ERROR('#3: x = new Number(1); x %= undefined; x === Not-a-Number. Actual: ' + (x));\n}\n\n//CHECK#4\nx = undefined;\nx %= new Number(1);\nif (isNaN(x) !== true) {\n $ERROR('#4: x = undefined; x %= new Number(1); x === Not-a-Number. Actual: ' + (x));\n}\n",
+ "id": "S11.13.2_A4.3_T2.4"
+ },
+ {
+ "section": "11.13.2, 11.5.3",
+ "description": "Type(x) is different from Type(y) and both types vary between String (primitive or object) and Boolean (primitive and object)",
+ "test": "//CHECK#1\nx = true;\nx %= \"1\";\nif (x !== 0) {\n $ERROR('#1: x = true; x %= \"1\"; x === 0. Actual: ' + (x));\n}\n\n//CHECK#2\nx = \"1\";\nx %= true;\nif (x !== 0) {\n $ERROR('#2: x = \"1\"; x %= true; x === 0. Actual: ' + (x));\n}\n\n//CHECK#3\nx = new Boolean(true);\nx %= \"1\";\nif (x !== 0) {\n $ERROR('#3: x = new Boolean(true); x %= \"1\"; x === 0. Actual: ' + (x));\n}\n\n//CHECK#4\nx = \"1\";\nx %= new Boolean(true);\nif (x !== 0) {\n $ERROR('#4: x = \"1\"; x %= new Boolean(true); x === 0. Actual: ' + (x));\n}\n\n//CHECK#5\nx = true;\nx %= new String(\"1\");\nif (x !== 0) {\n $ERROR('#5: x = true; x %= new String(\"1\"); x === 0. Actual: ' + (x));\n}\n\n//CHECK#6\nx = new String(\"1\");\nx %= true;\nif (x !== 0) {\n $ERROR('#6: x = new String(\"1\"); x %= true; x === 0. Actual: ' + (x));\n}\n\n//CHECK#7\nx = new Boolean(true);\nx %= new String(\"1\");\nif (x !== 0) {\n $ERROR('#7: x = new Boolean(true); x %= new String(\"1\"); x === 0. Actual: ' + (x));\n}\n\n//CHECK#8\nx = new String(\"1\");\nx %= new Boolean(true);\nif (x !== 0) {\n $ERROR('#8: x = new String(\"1\"); x %= new Boolean(true); x === 0. Actual: ' + (x));\n}\n",
+ "id": "S11.13.2_A4.3_T2.5"
+ },
+ {
+ "section": "11.13.2, 11.5.3",
+ "description": "Type(x) is different from Type(y) and both types vary between String (primitive or object) and Undefined",
+ "test": "//CHECK#1\nx = \"1\";\nx %= undefined;\nif (isNaN(x) !== true) {\n $ERROR('#1: x = \"1\"; x %= undefined; x === Not-a-Number. Actual: ' + (x));\n}\n\n//CHECK#2\nx = undefined;\nx %= \"1\";\nif (isNaN(x) !== true) {\n $ERROR('#2: x = undefined; x %= \"1\"; x === Not-a-Number. Actual: ' + (x));\n}\n\n//CHECK#3\nx = new String(\"1\");\nx %= undefined;\nif (isNaN(x) !== true) {\n $ERROR('#3: x = new String(\"1\"); x %= undefined; x === Not-a-Number. Actual: ' + (x));\n}\n\n//CHECK#4\nx = undefined;\nx %= new String(\"1\");\nif (isNaN(x) !== true) {\n $ERROR('#4: x = undefined; x %= new String(\"1\"); x === Not-a-Number. Actual: ' + (x));\n}\n",
+ "id": "S11.13.2_A4.3_T2.6"
+ },
+ {
+ "section": "11.13.2, 11.5.3",
+ "description": "Type(x) is different from Type(y) and both types vary between String (primitive or object) and Null",
+ "test": "//CHECK#1\nx = \"1\";\nx %= null;\nif (isNaN(x) !== true) {\n $ERROR('#1: x = \"1\"; x %= null; x === Not-a-Number. Actual: ' + (x));\n}\n\n//CHECK#2\nx = null;\nx %= \"1\";\nif (x !== 0) {\n $ERROR('#2: x = null; x %= \"1\"; x === 0. Actual: ' + (x));\n}\n\n//CHECK#3\nx = new String(\"1\");\nx %= null;\nif (isNaN(x) !== true) {\n $ERROR('#3: x = new String(\"1\"); x %= null; x === Not-a-Number. Actual: ' + (x));\n}\n\n//CHECK#4\nx = null;\nx %= new String(\"1\");\nif (x !== 0) {\n $ERROR('#4: x = null; x %= new String(\"1\"); x === 0. Actual: ' + (x));\n}\n",
+ "id": "S11.13.2_A4.3_T2.7"
+ },
+ {
+ "section": "11.13.2, 11.5.3",
+ "description": "Type(x) is different from Type(y) and both types vary between Boolean (primitive or object) and Undefined",
+ "test": "//CHECK#1\nx = true;\nx %= undefined;\nif (isNaN(x) !== true) {\n $ERROR('#1: x = true; x %= undefined; x === Not-a-Number. Actual: ' + (x));\n}\n\n//CHECK#2\nx = undefined;\nx %= true;\nif (isNaN(x) !== true) {\n $ERROR('#2: x = undefined; x %= true; x === Not-a-Number. Actual: ' + (x));\n}\n\n//CHECK#3\nx = new Boolean(true);\nx %= undefined;\nif (isNaN(x) !== true) {\n $ERROR('#3: x = new Boolean(true); x %= undefined; x === Not-a-Number. Actual: ' + (x));\n}\n\n//CHECK#4\nx = undefined;\nx %= new Boolean(true);\nif (isNaN(x) !== true) {\n $ERROR('#4: x = undefined; x %= new Boolean(true); x === Not-a-Number. Actual: ' + (x));\n}\n",
+ "id": "S11.13.2_A4.3_T2.8"
+ },
+ {
+ "section": "11.13.2, 11.5.3",
+ "description": "Type(x) is different from Type(y) and both types vary between Boolean (primitive or object) and Null",
+ "test": "//CHECK#1\nx = true;\nx %= null;\nif (isNaN(x) !== true) {\n $ERROR('#1: x = true; x %= null; x === Not-a-Number. Actual: ' + (x));\n}\n\n//CHECK#2\nx = null;\nx %= true;\nif (x !== 0) {\n $ERROR('#2: x = null; x %= true; x === 0. Actual: ' + (x));\n}\n\n//CHECK#3\nx = new Boolean(true);\nx %= null;\nif (isNaN(x) !== true) {\n $ERROR('#3: x = new Boolean(true); x %= null; x === Not-a-Number. Actual: ' + (x));\n}\n\n//CHECK#4\nx = null;\nx %= new Boolean(true);\nif (x !== 0) {\n $ERROR('#4: x = null; x %= new Boolean(true); x === 0. Actual: ' + (x));\n}\n",
+ "id": "S11.13.2_A4.3_T2.9"
+ },
+ {
+ "section": "11.13.2, 11.6.1",
+ "description": "Type(x) and Type(y) vary between primitive boolean and Boolean object",
+ "test": "//CHECK#1\nx = true;\nx += true;\nif (x !== 2) {\n $ERROR('#1: x = true; x += true; x === 2. Actual: ' + (x));\n}\n\n//CHECK#2\nx = new Boolean(true);\nx += true;\nif (x !== 2) {\n $ERROR('#2: x = new Boolean(true); x += true; x === 2. Actual: ' + (x));\n}\n\n//CHECK#3\nx = true;\nx += new Boolean(true);\nif (x !== 2) {\n $ERROR('#3: x = true; x += new Boolean(true); x === 2. Actual: ' + (x));\n}\n\n//CHECK#4\nx = new Boolean(true);\nx += new Boolean(true);\nif (x !== 2) {\n $ERROR('#4: x = new Boolean(true); x += new Boolean(true); x === 2. Actual: ' + (x));\n}\n",
+ "id": "S11.13.2_A4.4_T1.1"
+ },
+ {
+ "section": "11.13.2, 11.6.1",
+ "description": "Type(x) and Type(y) vary between primitive number and Number object",
+ "test": "//CHECK#1\nx = 1;\nx += 1;\nif (x !== 2) {\n $ERROR('#1: x = 1; x += 1; x === 2. Actual: ' + (x));\n}\n\n//CHECK#2\nx = new Number(1);\nx += 1;\nif (x !== 2) {\n $ERROR('#2: x = new Number(1); x += 1; x === 2. Actual: ' + (x));\n}\n\n//CHECK#3\nx = 1;\nx += new Number(1);\nif (x !== 2) {\n $ERROR('#3: x = 1; x += new Number(1); x === 2. Actual: ' + (x));\n}\n\n//CHECK#4\nx = new Number(1);\nx += new Number(1);\nif (x !== 2) {\n $ERROR('#4: x = new Number(1); x += new Number(1); x === 2. Actual: ' + (x));\n}\n\n",
+ "id": "S11.13.2_A4.4_T1.2"
+ },
+ {
+ "section": "11.13.2, 11.6.1",
+ "description": "Type(x) and Type(y) vary between Null and Undefined",
+ "test": "//CHECK#1\nx = null;\nx += undefined;\nif (isNaN(x) !== true) {\n $ERROR('#1: x = null; x += undefined; x === Not-a-Number. Actual: ' + (x));\n}\n\n//CHECK#2\nx = undefined;\nx += null;\nif (isNaN(x) !== true) {\n $ERROR('#2: x = undefined; x += null; x === Not-a-Number. Actual: ' + (x));\n}\n\n//CHECK#3\nx = undefined;\nx += undefined;\nif (isNaN(x) !== true) {\n $ERROR('#3: x = undefined; x += undefined; x === Not-a-Number. Actual: ' + (x));\n}\n\n//CHECK#4\nx = null;\nx += null;\nif (x !== 0) {\n $ERROR('#4: x = null; x += null; x === 0. Actual: ' + (x));\n}\n",
+ "id": "S11.13.2_A4.4_T1.3"
+ },
+ {
+ "section": "11.13.2, 11.6.1",
+ "description": "Type(x) and Type(y) vary between primitive string and String object",
+ "test": "//CHECK#1\nx = \"1\";\nx += \"1\";\nif (x !== \"11\") {\n $ERROR('#1: x = \"1\"; x += \"1\"; x === \"11\". Actual: ' + (x));\n}\n\n//CHECK#2\nx = new String(\"1\");\nx += \"1\";\nif (x !== \"11\") {\n $ERROR('#2: x = new String(\"1\"); x += \"1\"; x === \"11\". Actual: ' + (x));\n}\n\n//CHECK#3\nx = \"1\";\nx += new String(\"1\");\nif (x !== \"11\") {\n $ERROR('#3: x = \"1\"; x += new String(\"1\"); x === \"11\". Actual: ' + (x));\n}\n\n//CHECK#4\nx = new String(\"1\");\nx += new String(\"1\");\nif (x !== \"11\") {\n $ERROR('#4: x = new String(\"1\"); x += new String(\"1\"); x === \"11\". Actual: ' + (x));\n}\n\n//CHECK#5\nif (\"x\" + \"1\" !==\"x1\") {\n $ERROR('#5: x = \"x\"; x += \"1\"; x === \"x1\". Actual: ' + (x));\n}\n\n//CHECK#6\nx = \"1\";\nx += \"x\";\nif (x !== \"1x\") {\n $ERROR('#6: x = \"1\"; x += \"x\"; x === \"1x\". Actual: ' + (x));\n}\n",
+ "id": "S11.13.2_A4.4_T1.4"
+ },
+ {
+ "section": "11.13.2, 11.6.1",
+ "description": "Type(x) is different from Type(y) and both types vary between Number (primitive or object) and Boolean (primitive and object)",
+ "test": "//CHECK#1\nx = true;\nx += 1;\nif (x !== 2) {\n $ERROR('#1: x = true; x += 1; x === 2. Actual: ' + (x));\n}\n\n//CHECK#2\nx = 1;\nx += true;\nif (x !== 2) {\n $ERROR('#2: x = 1; x += true; x === 2. Actual: ' + (x));\n}\n\n//CHECK#3\nx = new Boolean(true);\nx += 1;\nif (x !== 2) {\n $ERROR('#3: x = new Boolean(true); x += 1; x === 2. Actual: ' + (x));\n}\n\n//CHECK#4\nx = 1;\nx += new Boolean(true);\nif (x !== 2) {\n $ERROR('#4: x = 1; x += new Boolean(true); x === 2. Actual: ' + (x));\n}\n\n//CHECK#5\nx = true;\nx += new Number(1);\nif (x !== 2) {\n $ERROR('#5: x = true; x += new Number(1); x === 2. Actual: ' + (x));\n}\n\n//CHECK#6\nx = new Number(1);\nx += true;\nif (x !== 2) {\n $ERROR('#6: x = new Number(1); x += true; x === 2. Actual: ' + (x));\n}\n\n//CHECK#7\nx = new Boolean(true);\nx += new Number(1);\nif (x !== 2) {\n $ERROR('#7: x = new Boolean(true); x += new Number(1); x === 2. Actual: ' + (x));\n}\n\n//CHECK#8\nx = new Number(1);\nx += new Boolean(true);\nif (x !== 2) {\n $ERROR('#8: x = new Number(1); x += new Boolean(true); x === 2. Actual: ' + (x));\n}\n",
+ "id": "S11.13.2_A4.4_T2.1"
+ },
+ {
+ "section": "11.13.2, 11.6.1",
+ "description": "Type(x) is different from Type(y) and both types vary between Number (primitive or object) and Null",
+ "test": "//CHECK#1\nx = 1;\nx += null;\nif (x !== 1) {\n $ERROR('#1: x = 1; x += null; x === 1. Actual: ' + (x));\n}\n\n//CHECK#2\nx = null;\nx += 1;\nif (x !== 1) {\n $ERROR('#2: x = null; x += 1; x === 1. Actual: ' + (x));\n}\n\n//CHECK#3\nx = new Number(1);\nx += null;\nif (x !== 1) {\n $ERROR('#3: x = new Number(1); x += null; x === 1. Actual: ' + (x));\n}\n\n//CHECK#4\nx = null;\nx += new Number(1);\nif (x !== 1) {\n $ERROR('#4: x = null; x += new Number(1); x === 1. Actual: ' + (x));\n}\n",
+ "id": "S11.13.2_A4.4_T2.2"
+ },
+ {
+ "section": "11.13.2, 11.6.1",
+ "description": "Type(x) is different from Type(y) and both types vary between Number (primitive or object) and Undefined",
+ "test": "//CHECK#1\nx = 1;\nx += undefined;\nif (isNaN(x) !== true) {\n $ERROR('#1: x = 1; x += undefined; x === Not-a-Number. Actual: ' + (x));\n}\n\n//CHECK#2\nx = undefined;\nx += 1;\nif (isNaN(x) !== true) {\n $ERROR('#2: x = undefined; x += 1; x === Not-a-Number. Actual: ' + (x));\n}\n\n//CHECK#3\nx = new Number(1);\nx += undefined;\nif (isNaN(x) !== true) {\n $ERROR('#3: x = new Number(1); x += undefined; x === Not-a-Number. Actual: ' + (x));\n}\n\n//CHECK#4\nx = undefined;\nx += new Number(1);\nif (isNaN(x) !== true) {\n $ERROR('#4: x = undefined; x += new Number(1); x === Not-a-Number. Actual: ' + (x));\n}\n",
+ "id": "S11.13.2_A4.4_T2.3"
+ },
+ {
+ "section": "11.13.2, 11.6.1",
+ "description": "Type(x) is different from Type(y) and both types vary between Boolean (primitive or object) and Undefined",
+ "test": "//CHECK#1\nx = true;\nx += undefined;\nif (isNaN(x) !== true) {\n $ERROR('#1: x = true; x += undefined; x === Not-a-Number. Actual: ' + (x));\n}\n\n//CHECK#2\nx = undefined;\nx += true;\nif (isNaN(x) !== true) {\n $ERROR('#2: x = undefined; x += true; x === Not-a-Number. Actual: ' + (x));\n}\n\n//CHECK#3\nx = new Boolean(true);\nx += undefined;\nif (isNaN(x) !== true) {\n $ERROR('#3: x = new Boolean(true); x += undefined; x === Not-a-Number. Actual: ' + (x));\n}\n\n//CHECK#4\nx = undefined;\nx += new Boolean(true);\nif (isNaN(x) !== true) {\n $ERROR('#4: x = undefined; x += new Boolean(true); x === Not-a-Number. Actual: ' + (x));\n}\n",
+ "id": "S11.13.2_A4.4_T2.4"
+ },
+ {
+ "section": "11.13.2, 11.6.1",
+ "description": "Type(x) is different from Type(y) and both types vary between Boolean (primitive or object) and Null",
+ "test": "//CHECK#1\nx = true;\nx += null;\nif (x !== 1) {\n $ERROR('#1: x = true; x += null; x === 1. Actual: ' + (x));\n}\n\n//CHECK#2\nx = null;\nx += true;\nif (x !== 1) {\n $ERROR('#2: x = null; x += true; x === 1. Actual: ' + (x));\n}\n\n//CHECK#3\nx = new Boolean(true);\nx += null;\nif (x !== 1) {\n $ERROR('#3: x = new Boolean(true); x += null; x === 1. Actual: ' + (x));\n}\n\n//CHECK#4\nx = null;\nx += new Boolean(true);\nif (x !== 1) {\n $ERROR('#4: x = null; x += new Boolean(true); x === 1. Actual: ' + (x));\n}\n",
+ "id": "S11.13.2_A4.4_T2.5"
+ },
+ {
+ "section": "11.13.2, 11.6.1",
+ "description": "Type(x) is different from Type(y) and both types vary between Number (primitive or object) and String (primitive and object)",
+ "test": "//CHECK#1\nx = \"1\";\nx += 1;\nif (x !== \"11\") {\n $ERROR('#1: x = \"1\"; x += 1; x === \"11\". Actual: ' + (x));\n}\n\n//CHECK#2\nx = 1;\nx += \"1\";\nif (x !== \"11\") {\n $ERROR('#2: x = 1; x += \"1\"; x === \"11\". Actual: ' + (x));\n}\n\n//CHECK#3\nx = new String(\"1\");\nx += 1;\nif (x !== \"11\") {\n $ERROR('#3: x = new String(\"1\"); x += 1; x === \"11\". Actual: ' + (x));\n}\n\n//CHECK#4\nx = 1;\nx += new String(\"1\");\nif (x !== \"11\") {\n $ERROR('#4: x = 1; x += new String(\"1\"); x === \"11\". Actual: ' + (x));\n}\n\n//CHECK#5\nx = \"1\";\nx += new Number(1);\nif (x !== \"11\") {\n $ERROR('#5: x = \"1\"; x += new Number(1); x === \"11\". Actual: ' + (x));\n}\n\n//CHECK#6\nx = new Number(1);\nx += \"1\";\nif (x !== \"11\") {\n $ERROR('#6: x = new Number(1); x += \"1\"; x === \"11\". Actual: ' + (x));\n}\n\n//CHECK#7\nx = new String(\"1\");\nx += new Number(1);\nif (x !== \"11\") {\n $ERROR('#7: x = new String(\"1\"); x += new Number(1); x === \"11\". Actual: ' + (x));\n}\n\n//CHECK#8\nx = new Number(1);\nx += new String(\"1\");\nif (x !== \"11\") {\n $ERROR('#8: x = new Number(1); x += new String(\"1\"); x === \"11\". Actual: ' + (x));\n}\n\n//CHECK#9\nif (\"x\" + 1 !==\"x1\") {\n $ERROR('#9: x = \"x\"; x += 1; x === \"x1\". Actual: ' + (x));\n}\n\n//CHECK#10\nx = 1;\nx += \"x\";\nif (x !== \"1x\") {\n $ERROR('#10: x = 1; x += \"x\"; x === \"1x\". Actual: ' + (x));\n}\n",
+ "id": "S11.13.2_A4.4_T2.6"
+ },
+ {
+ "section": "11.13.2, 11.6.1",
+ "description": "Type(x) is different from Type(y) and both types vary between String (primitive or object) and Boolean (primitive and object)",
+ "test": "//CHECK#1\nx = true;\nx += \"1\";\nif (x !== \"true1\") {\n $ERROR('#1: x = true; x += \"1\"; x === \"true1\". Actual: ' + (x));\n}\n\n//CHECK#2\nx = \"1\";\nx += true;\nif (x !== \"1true\") {\n $ERROR('#2: x = \"1\"; x += true; x === \"1true\". Actual: ' + (x));\n}\n\n//CHECK#3\nx = new Boolean(true);\nx += \"1\";\nif (x !== \"true1\") {\n $ERROR('#3: x = new Boolean(true); x += \"1\"; x === \"true1\". Actual: ' + (x));\n}\n\n//CHECK#4\nx = \"1\";\nx += new Boolean(true);\nif (x !== \"1true\") {\n $ERROR('#4: x = \"1\"; x += new Boolean(true); x === \"1true\". Actual: ' + (x));\n}\n\n//CHECK#5\nx = true;\nx += new String(\"1\");\nif (x !== \"true1\") {\n $ERROR('#5: x = true; x += new String(\"1\"); x === \"true1\". Actual: ' + (x));\n}\n\n//CHECK#6\nx = new String(\"1\");\nx += true;\nif (x !== \"1true\") {\n $ERROR('#6: x = new String(\"1\"); x += true; x === \"1true\". Actual: ' + (x));\n}\n\n//CHECK#7\nx = new Boolean(true);\nx += new String(\"1\");\nif (x !== \"true1\") {\n $ERROR('#7: x = new Boolean(true); x += new String(\"1\"); x === \"true1\". Actual: ' + (x));\n}\n\n//CHECK#8\nx = new String(\"1\");\nx += new Boolean(true);\nif (x !== \"1true\") {\n $ERROR('#8: x = new String(\"1\"); x += new Boolean(true); x === \"1true\". Actual: ' + (x));\n}\n",
+ "id": "S11.13.2_A4.4_T2.7"
+ },
+ {
+ "section": "11.13.2, 11.6.1",
+ "description": "Type(x) is different from Type(y) and both types vary between String (primitive or object) and Undefined",
+ "test": "//CHECK#1\nx = \"1\";\nx += undefined;\nif (x !== \"1undefined\") {\n $ERROR('#1: x = \"1\"; x += undefined; x === \"1undefined\". Actual: ' + (x));\n}\n\n//CHECK#2\nx = undefined;\nx += \"1\";\nif (x !== \"undefined1\") {\n $ERROR('#2: x = undefined; x += \"1\"; x === \"undefined1\". Actual: ' + (x));\n}\n\n//CHECK#3\nx = new String(\"1\");\nx += undefined;\nif (x !== \"1undefined\") {\n $ERROR('#3: x = new String(\"1\"); x += undefined; x === \"1undefined\". Actual: ' + (x));\n}\n\n//CHECK#4\nx = undefined;\nx += new String(\"1\");\nif (x !== \"undefined1\") {\n $ERROR('#4: x = undefined; x += new String(\"1\"); x === \"undefined1\". Actual: ' + (x));\n}\n",
+ "id": "S11.13.2_A4.4_T2.8"
+ },
+ {
+ "section": "11.13.2, 11.6.1",
+ "description": "Type(x) is different from Type(y) and both types vary between String (primitive or object) and Null",
+ "test": "//CHECK#1\nx = \"1\";\nx += null;\nif (x !== \"1null\") {\n $ERROR('#1: x = \"1\"; x += null; x === \"1null\". Actual: ' + (x));\n}\n\n//CHECK#2\nx = null;\nx += \"1\";\nif (x !== \"null1\") {\n $ERROR('#2: x = null; x += \"1\"; x === \"null1\". Actual: ' + (x));\n}\n\n//CHECK#3\nx = new String(\"1\");\nx += null;\nif (x !== \"1null\") {\n $ERROR('#3: x = new String(\"1\"); x += null; x === \"1null\". Actual: ' + (x));\n}\n\n//CHECK#4\nx = null;\nx += new String(\"1\");\nif (x !== \"null1\") {\n $ERROR('#4: x = null; x += new String(\"1\"); x === \"null1\". Actual: ' + (x));\n}\n",
+ "id": "S11.13.2_A4.4_T2.9"
+ },
+ {
+ "section": "11.13.2, 11.6.2",
+ "description": "Type(x) and Type(y) vary between primitive boolean and Boolean object",
+ "test": "//CHECK#1\nx = true;\nx -= true;\nif (x !== 0) {\n $ERROR('#1: x = true; x -= true; x === 0. Actual: ' + (x));\n}\n\n//CHECK#2\nx = new Boolean(true);\nx -= true;\nif (x !== 0) {\n $ERROR('#2: x = new Boolean(true); x -= true; x === 0. Actual: ' + (x));\n}\n\n//CHECK#3\nx = true;\nx -= new Boolean(true);\nif (x !== 0) {\n $ERROR('#3: x = true; x -= new Boolean(true); x === 0. Actual: ' + (x));\n}\n\n//CHECK#4\nx = new Boolean(true);\nx -= new Boolean(true);\nif (x !== 0) {\n $ERROR('#4: x = new Boolean(true); x -= new Boolean(true); x === 0. Actual: ' + (x));\n}\n",
+ "id": "S11.13.2_A4.5_T1.1"
+ },
+ {
+ "section": "11.13.2, 11.6.2",
+ "description": "Type(x) and Type(y) vary between primitive number and Number object",
+ "test": "//CHECK#1\nx = 1;\nx -= 1;\nif (x !== 0) {\n $ERROR('#1: x = 1; x -= 1; x === 0. Actual: ' + (x));\n}\n\n//CHECK#2\nx = new Number(1);\nx -= 1;\nif (x !== 0) {\n $ERROR('#2: x = new Number(1); x -= 1; x === 0. Actual: ' + (x));\n}\n\n//CHECK#3\nx = 1;\nx -= new Number(1);\nif (x !== 0) {\n $ERROR('#3: x = 1; x -= new Number(1); x === 0. Actual: ' + (x));\n}\n\n//CHECK#4\nx = new Number(1);\nx -= new Number(1);\nif (x !== 0) {\n $ERROR('#4: x = new Number(1); x -= new Number(1); x === 0. Actual: ' + (x));\n}\n\n",
+ "id": "S11.13.2_A4.5_T1.2"
+ },
+ {
+ "section": "11.13.2, 11.6.2",
+ "description": "Type(x) and Type(y) vary between primitive string and String object",
+ "test": "//CHECK#1\nx = \"1\";\nx -= \"1\";\nif (x !== 0) {\n $ERROR('#1: x = \"1\"; x -= \"1\"; x === 0. Actual: ' + (x));\n}\n\n//CHECK#2\nx = new String(\"1\");\nx -= \"1\";\nif (x !== 0) {\n $ERROR('#2: x = new String(\"1\"); x -= \"1\"; x === 0. Actual: ' + (x));\n}\n\n//CHECK#3\nx = \"1\";\nx -= new String(\"1\");\nif (x !== 0) {\n $ERROR('#3: x = \"1\"; x -= new String(\"1\"); x === 0. Actual: ' + (x));\n}\n\n//CHECK#4\nx = new String(\"1\");\nx -= new String(\"1\");\nif (x !== 0) {\n $ERROR('#4: x = new String(\"1\"); x -= new String(\"1\"); x === 0. Actual: ' + (x));\n}\n\n//CHECK#5\nx = \"x\";\nx -= \"1\";\nif (isNaN(x) !== true) {\n $ERROR('#5: x = \"x\"; x -= \"1\"; x === Not-a-Number. Actual: ' + (x));\n}\n\n//CHECK#6\nx = \"1\";\nx -= \"x\";\nif (isNaN(x) !== true) {\n $ERROR('#6: x = \"1\"; x -= \"x\"; x === Not-a-Number. Actual: ' + (x));\n}\n",
+ "id": "S11.13.2_A4.5_T1.3"
+ },
+ {
+ "section": "11.13.2, 11.6.2",
+ "description": "Type(x) and Type(y) vary between Null and Undefined",
+ "test": "//CHECK#1\nx = null;\nx -= undefined;\nif (isNaN(x) !== true) {\n $ERROR('#1: x = null; x -= undefined; x === Not-a-Number. Actual: ' + (x));\n}\n\n//CHECK#2\nx = undefined;\nx -= null;\nif (isNaN(x) !== true) {\n $ERROR('#2: x = undefined; x -= null; x === Not-a-Number. Actual: ' + (x));\n}\n\n//CHECK#3\nx = undefined;\nx -= undefined;\nif (isNaN(x) !== true) {\n $ERROR('#3: x = undefined; x -= undefined; x === Not-a-Number. Actual: ' + (x));\n}\n\n//CHECK#4\nx = null;\nx -= null;\nif (x !== 0) {\n $ERROR('#4: x = null; x -= null; x === 0. Actual: ' + (x));\n}\n",
+ "id": "S11.13.2_A4.5_T1.4"
+ },
+ {
+ "section": "11.13.2, 11.6.2",
+ "description": "Type(x) is different from Type(y) and both types vary between Number (primitive or object) and Boolean (primitive and object)",
+ "test": "//CHECK#1\nx = true;\nx -= 1;\nif (x !== 0) {\n $ERROR('#1: x = true; x -= 1; x === 0. Actual: ' + (x));\n}\n\n//CHECK#2\nx = 1;\nx -= true;\nif (x !== 0) {\n $ERROR('#2: x = 1; x -= true; x === 0. Actual: ' + (x));\n}\n\n//CHECK#3\nx = new Boolean(true);\nx -= 1;\nif (x !== 0) {\n $ERROR('#3: x = new Boolean(true); x -= 1; x === 0. Actual: ' + (x));\n}\n\n//CHECK#4\nx = 1;\nx -= new Boolean(true);\nif (x !== 0) {\n $ERROR('#4: x = 1; x -= new Boolean(true); x === 0. Actual: ' + (x));\n}\n\n//CHECK#5\nx = true;\nx -= new Number(1);\nif (x !== 0) {\n $ERROR('#5: x = true; x -= new Number(1); x === 0. Actual: ' + (x));\n}\n\n//CHECK#6\nx = new Number(1);\nx -= true;\nif (x !== 0) {\n $ERROR('#6: x = new Number(1); x -= true; x === 0. Actual: ' + (x));\n}\n\n//CHECK#7\nx = new Boolean(true);\nx -= new Number(1);\nif (x !== 0) {\n $ERROR('#7: x = new Boolean(true); x -= new Number(1); x === 0. Actual: ' + (x));\n}\n\n//CHECK#8\nx = new Number(1);\nx -= new Boolean(true);\nif (x !== 0) {\n $ERROR('#8: x = new Number(1); x -= new Boolean(true); x === 0. Actual: ' + (x));\n}\n",
+ "id": "S11.13.2_A4.5_T2.1"
+ },
+ {
+ "section": "11.13.2, 11.6.2",
+ "description": "Type(x) is different from Type(y) and both types vary between Number (primitive or object) and String (primitive and object)",
+ "test": "//CHECK#1\nx = \"1\";\nx -= 1;\nif (x !== 0) {\n $ERROR('#1: x = \"1\"; x -= 1; x === 0. Actual: ' + (x));\n}\n\n//CHECK#2\nx = 1;\nx -= \"1\";\nif (x !== 0) {\n $ERROR('#2: x = 1; x -= \"1\"; x === 0. Actual: ' + (x));\n}\n\n//CHECK#3\nx = new String(\"1\");\nx -= 1;\nif (x !== 0) {\n $ERROR('#3: x = new String(\"1\"); x -= 1; x === 0. Actual: ' + (x));\n}\n\n//CHECK#4\nx = 1;\nx -= new String(\"1\");\nif (x !== 0) {\n $ERROR('#4: x = 1; x -= new String(\"1\"); x === 0. Actual: ' + (x));\n}\n\n//CHECK#5\nx = \"1\";\nx -= new Number(1);\nif (x !== 0) {\n $ERROR('#5: x = \"1\"; x -= new Number(1); x === 0. Actual: ' + (x));\n}\n\n//CHECK#6\nx = new Number(1);\nx -= \"1\";\nif (x !== 0) {\n $ERROR('#6: x = new Number(1); x -= \"1\"; x === 0. Actual: ' + (x));\n}\n\n//CHECK#7\nx = new String(\"1\");\nx -= new Number(1);\nif (x !== 0) {\n $ERROR('#7: x = new String(\"1\"); x -= new Number(1); x === 0. Actual: ' + (x));\n}\n\n//CHECK#8\nx = new Number(1);\nx -= new String(\"1\");\nif (x !== 0) {\n $ERROR('#8: x = new Number(1); x -= new String(\"1\"); x === 0. Actual: ' + (x));\n}\n\n//CHECK#9\nx = \"x\";\nx -= 1;\nif (isNaN(x) !== true) {\n $ERROR('#9: x = \"x\"; x -= 1; x === Not-a-Number. Actual: ' + (x));\n}\n\n//CHECK#10\nx = 1;\nx -= \"x\";\nif (isNaN(x) !== true) {\n $ERROR('#10: x = 1; x -= \"x\"; x === Not-a-Number. Actual: ' + (x));\n}\n",
+ "id": "S11.13.2_A4.5_T2.2"
+ },
+ {
+ "section": "11.13.2, 11.6.2",
+ "description": "Type(x) is different from Type(y) and both types vary between Number (primitive or object) and Null",
+ "test": "//CHECK#1\nx = 1;\nx -= null;\nif (x !== 1) {\n $ERROR('#1: x = 1; x -= null; x === 1. Actual: ' + (x));\n}\n\n//CHECK#2\nx = null;\nx -= 1;\nif (x !== -1) {\n $ERROR('#2: x = null; x -= 1; x === -1. Actual: ' + (x));\n}\n\n//CHECK#3\nx = new Number(1);\nx -= null;\nif (x !== 1) {\n $ERROR('#3: x = new Number(1); x -= null; x === 1. Actual: ' + (x));\n}\n\n//CHECK#4\nx = null;\nx -= new Number(1);\nif (x !== -1) {\n $ERROR('#4: x = null; x -= new Number(1); x === -1. Actual: ' + (x));\n}\n",
+ "id": "S11.13.2_A4.5_T2.3"
+ },
+ {
+ "section": "11.13.2, 11.6.2",
+ "description": "Type(x) is different from Type(y) and both types vary between Number (primitive or object) and Undefined",
+ "test": "//CHECK#1\nx = 1;\nx -= undefined;\nif (isNaN(x) !== true) {\n $ERROR('#1: x = 1; x -= undefined; x === Not-a-Number. Actual: ' + (x));\n}\n\n//CHECK#2\nx = undefined;\nx -= 1;\nif (isNaN(x) !== true) {\n $ERROR('#2: x = undefined; x -= 1; x === Not-a-Number. Actual: ' + (x));\n}\n\n//CHECK#3\nx = new Number(1);\nx -= undefined;\nif (isNaN(x) !== true) {\n $ERROR('#3: x = new Number(1); x -= undefined; x === Not-a-Number. Actual: ' + (x));\n}\n\n//CHECK#4\nx = undefined;\nx -= new Number(1);\nif (isNaN(x) !== true) {\n $ERROR('#4: x = undefined; x -= new Number(1); x === Not-a-Number. Actual: ' + (x));\n}\n",
+ "id": "S11.13.2_A4.5_T2.4"
+ },
+ {
+ "section": "11.13.2, 11.6.2",
+ "description": "Type(x) is different from Type(y) and both types vary between String (primitive or object) and Boolean (primitive and object)",
+ "test": "//CHECK#1\nx = true;\nx -= \"1\";\nif (x !== 0) {\n $ERROR('#1: x = true; x -= \"1\"; x === 0. Actual: ' + (x));\n}\n\n//CHECK#2\nx = \"1\";\nx -= true;\nif (x !== 0) {\n $ERROR('#2: x = \"1\"; x -= true; x === 0. Actual: ' + (x));\n}\n\n//CHECK#3\nx = new Boolean(true);\nx -= \"1\";\nif (x !== 0) {\n $ERROR('#3: x = new Boolean(true); x -= \"1\"; x === 0. Actual: ' + (x));\n}\n\n//CHECK#4\nx = \"1\";\nx -= new Boolean(true);\nif (x !== 0) {\n $ERROR('#4: x = \"1\"; x -= new Boolean(true); x === 0. Actual: ' + (x));\n}\n\n//CHECK#5\nx = true;\nx -= new String(\"1\");\nif (x !== 0) {\n $ERROR('#5: x = true; x -= new String(\"1\"); x === 0. Actual: ' + (x));\n}\n\n//CHECK#6\nx = new String(\"1\");\nx -= true;\nif (x !== 0) {\n $ERROR('#6: x = new String(\"1\"); x -= true; x === 0. Actual: ' + (x));\n}\n\n//CHECK#7\nx = new Boolean(true);\nx -= new String(\"1\");\nif (x !== 0) {\n $ERROR('#7: x = new Boolean(true); x -= new String(\"1\"); x === 0. Actual: ' + (x));\n}\n\n//CHECK#8\nx = new String(\"1\");\nx -= new Boolean(true);\nif (x !== 0) {\n $ERROR('#8: x = new String(\"1\"); x -= new Boolean(true); x === 0. Actual: ' + (x));\n}\n",
+ "id": "S11.13.2_A4.5_T2.5"
+ },
+ {
+ "section": "11.13.2, 11.6.2",
+ "description": "Type(x) is different from Type(y) and both types vary between String (primitive or object) and Undefined",
+ "test": "//CHECK#1\nx = \"1\";\nx -= undefined;\nif (isNaN(x) !== true) {\n $ERROR('#1: x = \"1\"; x -= undefined; x === Not-a-Number. Actual: ' + (x));\n}\n\n//CHECK#2\nx = undefined;\nx -= \"1\";\nif (isNaN(x) !== true) {\n $ERROR('#2: x = undefined; x -= \"1\"; x === Not-a-Number. Actual: ' + (x));\n}\n\n//CHECK#3\nx = new String(\"1\");\nx -= undefined;\nif (isNaN(x) !== true) {\n $ERROR('#3: x = new String(\"1\"); x -= undefined; x === Not-a-Number. Actual: ' + (x));\n}\n\n//CHECK#4\nx = undefined;\nx -= new String(\"1\");\nif (isNaN(x) !== true) {\n $ERROR('#4: x = undefined; x -= new String(\"1\"); x === Not-a-Number. Actual: ' + (x));\n}\n",
+ "id": "S11.13.2_A4.5_T2.6"
+ },
+ {
+ "section": "11.13.2, 11.6.2",
+ "description": "Type(x) is different from Type(y) and both types vary between String (primitive or object) and Null",
+ "test": "//CHECK#1\nx = \"1\";\nx -= null;\nif (x !== 1) {\n $ERROR('#1: x = \"1\"; x -= null; x === 1. Actual: ' + (x));\n}\n\n//CHECK#2\nx = null;\nx -= \"1\";\nif (x !== -1) {\n $ERROR('#2: x = null; x -= \"1\"; x === -1. Actual: ' + (x));\n}\n\n//CHECK#3\nx = new String(\"1\");\nx -= null;\nif (x !== 1) {\n $ERROR('#3: x = new String(\"1\"); x -= null; x === 1. Actual: ' + (x));\n}\n\n//CHECK#4\nx = null;\nx -= new String(\"1\");\nif (x !== -1) {\n $ERROR('#4: x = null; x -= new String(\"1\"); x === -1. Actual: ' + (x));\n}\n",
+ "id": "S11.13.2_A4.5_T2.7"
+ },
+ {
+ "section": "11.13.2, 11.6.2",
+ "description": "Type(x) is different from Type(y) and both types vary between Boolean (primitive or object) and Undefined",
+ "test": "//CHECK#1\nx = true;\nx -= undefined;\nif (isNaN(x) !== true) {\n $ERROR('#1: x = true; x -= undefined; x === Not-a-Number. Actual: ' + (x));\n}\n\n//CHECK#2\nx = undefined;\nx -= true;\nif (isNaN(x) !== true) {\n $ERROR('#2: x = undefined; x -= true; x === Not-a-Number. Actual: ' + (x));\n}\n\n//CHECK#3\nx = new Boolean(true);\nx -= undefined;\nif (isNaN(x) !== true) {\n $ERROR('#3: x = new Boolean(true); x -= undefined; x === Not-a-Number. Actual: ' + (x));\n}\n\n//CHECK#4\nx = undefined;\nx -= new Boolean(true);\nif (isNaN(x) !== true) {\n $ERROR('#4: x = undefined; x -= new Boolean(true); x === Not-a-Number. Actual: ' + (x));\n}\n",
+ "id": "S11.13.2_A4.5_T2.8"
+ },
+ {
+ "section": "11.13.2, 11.6.2",
+ "description": "Type(x) is different from Type(y) and both types vary between Boolean (primitive or object) and Null",
+ "test": "//CHECK#1\nx = true;\nx -= null;\nif (x !== 1) {\n $ERROR('#1: x = true; x -= null; x === 1. Actual: ' + (x));\n}\n\n//CHECK#2\nx = null;\nx -= true;\nif (x !== -1) {\n $ERROR('#2: x = null; x -= true; x === -1. Actual: ' + (x));\n}\n\n//CHECK#3\nx = new Boolean(true);\nx -= null;\nif (x !== 1) {\n $ERROR('#3: x = new Boolean(true); x -= null; x === 1. Actual: ' + (x));\n}\n\n//CHECK#4\nx = null;\nx -= new Boolean(true);\nif (x !== -1) {\n $ERROR('#4: x = null; x -= new Boolean(true); x === -1. Actual: ' + (x));\n}\n",
+ "id": "S11.13.2_A4.5_T2.9"
+ },
+ {
+ "section": "11.13.2, 11.7.1",
+ "description": "Type(x) and Type(y) vary between primitive boolean and Boolean object",
+ "test": "//CHECK#1\nx = true;\nx <<= true;\nif (x !== 2) {\n $ERROR('#1: x = true; x <<= true; x === 2. Actual: ' + (x));\n}\n\n//CHECK#2\nx = new Boolean(true);\nx <<= true;\nif (x !== 2) {\n $ERROR('#2: x = new Boolean(true); x <<= true; x === 2. Actual: ' + (x));\n}\n\n//CHECK#3\nx = true;\nx <<= new Boolean(true);\nif (x !== 2) {\n $ERROR('#3: x = true; x <<= new Boolean(true); x === 2. Actual: ' + (x));\n}\n\n//CHECK#4\nx = new Boolean(true);\nx <<= new Boolean(true);\nif (x !== 2) {\n $ERROR('#4: x = new Boolean(true); x <<= new Boolean(true); x === 2. Actual: ' + (x));\n}\n",
+ "id": "S11.13.2_A4.6_T1.1"
+ },
+ {
+ "section": "11.13.2, 11.7.1",
+ "description": "Type(x) and Type(y) vary between primitive number and Number object",
+ "test": "//CHECK#1\nx = 1;\nx <<= 1;\nif (x !== 2) {\n $ERROR('#1: x = 1; x <<= 1; x === 2. Actual: ' + (x));\n}\n\n//CHECK#2\nx = new Number(1);\nx <<= 1;\nif (x !== 2) {\n $ERROR('#2: x = new Number(1); x <<= 1; x === 2. Actual: ' + (x));\n}\n\n//CHECK#3\nx = 1;\nx <<= new Number(1);\nif (x !== 2) {\n $ERROR('#3: x = 1; x <<= new Number(1); x === 2. Actual: ' + (x));\n}\n\n//CHECK#4\nx = new Number(1);\nx <<= new Number(1);\nif (x !== 2) {\n $ERROR('#4: x = new Number(1); x <<= new Number(1); x === 2. Actual: ' + (x));\n}\n\n",
+ "id": "S11.13.2_A4.6_T1.2"
+ },
+ {
+ "section": "11.13.2, 11.7.1",
+ "description": "Type(x) and Type(y) vary between primitive string and String object",
+ "test": "//CHECK#1\nx = \"1\";\nx <<= \"1\";\nif (x !== 2) {\n $ERROR('#1: x = \"1\"; x <<= \"1\"; x === 2. Actual: ' + (x));\n}\n\n//CHECK#2\nx = new String(\"1\");\nx <<= \"1\";\nif (x !== 2) {\n $ERROR('#2: x = new String(\"1\"); x <<= \"1\"; x === 2. Actual: ' + (x));\n}\n\n//CHECK#3\nx = \"1\";\nx <<= new String(\"1\");\nif (x !== 2) {\n $ERROR('#3: x = \"1\"; x <<= new String(\"1\"); x === 2. Actual: ' + (x));\n}\n\n//CHECK#4\nx = new String(\"1\");\nx <<= new String(\"1\");\nif (x !== 2) {\n $ERROR('#4: x = new String(\"1\"); x <<= new String(\"1\"); x === 2. Actual: ' + (x));\n}\n\n//CHECK#5\nx = \"x\";\nx <<= \"1\";\nif (x !== 0) {\n $ERROR('#5: x = \"x\"; x <<= \"1\"; x === 0. Actual: ' + (x));\n}\n\n//CHECK#6\nx = \"1\";\nx <<= \"x\";\nif (x !== 1) {\n $ERROR('#6: x = \"1\"; x <<= \"x\"; x === 1. Actual: ' + (x));\n}\n",
+ "id": "S11.13.2_A4.6_T1.3"
+ },
+ {
+ "section": "11.13.2, 11.7.1",
+ "description": "Type(x) and Type(y) vary between Null and Undefined",
+ "test": "//CHECK#1\nx = null;\nx <<= undefined;\nif (x !== 0) {\n $ERROR('#1: x = null; x <<= undefined; x === 0. Actual: ' + (x));\n}\n\n//CHECK#2\nx = undefined;\nx <<= null;\nif (x !== 0) {\n $ERROR('#2: x = undefined; x <<= null; x === 0. Actual: ' + (x));\n}\n\n//CHECK#3\nx = undefined;\nx <<= undefined;\nif (x !== 0) {\n $ERROR('#3: x = undefined; x <<= undefined; x === 0. Actual: ' + (x));\n}\n\n//CHECK#4\nx = null;\nx <<= null;\nif (x !== 0) {\n $ERROR('#4: x = null; x <<= null; x === 0. Actual: ' + (x));\n}\n",
+ "id": "S11.13.2_A4.6_T1.4"
+ },
+ {
+ "section": "11.13.2, 11.7.1",
+ "description": "Type(x) is different from Type(y) and both types vary between Number (primitive or object) and Boolean (primitive and object)",
+ "test": "//CHECK#1\nx = true;\nx <<= 1;\nif (x !== 2) {\n $ERROR('#1: x = true; x <<= 1; x === 2. Actual: ' + (x));\n}\n\n//CHECK#2\nx = 1;\nx <<= true;\nif (x !== 2) {\n $ERROR('#2: x = 1; x <<= true; x === 2. Actual: ' + (x));\n}\n\n//CHECK#3\nx = new Boolean(true);\nx <<= 1;\nif (x !== 2) {\n $ERROR('#3: x = new Boolean(true); x <<= 1; x === 2. Actual: ' + (x));\n}\n\n//CHECK#4\nx = 1;\nx <<= new Boolean(true);\nif (x !== 2) {\n $ERROR('#4: x = 1; x <<= new Boolean(true); x === 2. Actual: ' + (x));\n}\n\n//CHECK#5\nx = true;\nx <<= new Number(1);\nif (x !== 2) {\n $ERROR('#5: x = true; x <<= new Number(1); x === 2. Actual: ' + (x));\n}\n\n//CHECK#6\nx = new Number(1);\nx <<= true;\nif (x !== 2) {\n $ERROR('#6: x = new Number(1); x <<= true; x === 2. Actual: ' + (x));\n}\n\n//CHECK#7\nx = new Boolean(true);\nx <<= new Number(1);\nif (x !== 2) {\n $ERROR('#7: x = new Boolean(true); x <<= new Number(1); x === 2. Actual: ' + (x));\n}\n\n//CHECK#8\nx = new Number(1);\nx <<= new Boolean(true);\nif (x !== 2) {\n $ERROR('#8: x = new Number(1); x <<= new Boolean(true); x === 2. Actual: ' + (x));\n}\n",
+ "id": "S11.13.2_A4.6_T2.1"
+ },
+ {
+ "section": "11.13.2, 11.7.1",
+ "description": "Type(x) is different from Type(y) and both types vary between Number (primitive or object) and String (primitive and object)",
+ "test": "//CHECK#1\nx = \"1\";\nx <<= 1;\nif (x !== 2) {\n $ERROR('#1: x = \"1\"; x <<= 1; x === 2. Actual: ' + (x));\n}\n\n//CHECK#2\nx = 1;\nx <<= \"1\";\nif (x !== 2) {\n $ERROR('#2: x = 1; x <<= \"1\"; x === 2. Actual: ' + (x));\n}\n\n//CHECK#3\nx = new String(\"1\");\nx <<= 1;\nif (x !== 2) {\n $ERROR('#3: x = new String(\"1\"); x <<= 1; x === 2. Actual: ' + (x));\n}\n\n//CHECK#4\nx = 1;\nx <<= new String(\"1\");\nif (x !== 2) {\n $ERROR('#4: x = 1; x <<= new String(\"1\"); x === 2. Actual: ' + (x));\n}\n\n//CHECK#5\nx = \"1\";\nx <<= new Number(1);\nif (x !== 2) {\n $ERROR('#5: x = \"1\"; x <<= new Number(1); x === 2. Actual: ' + (x));\n}\n\n//CHECK#6\nx = new Number(1);\nx <<= \"1\";\nif (x !== 2) {\n $ERROR('#6: x = new Number(1); x <<= \"1\"; x === 2. Actual: ' + (x));\n}\n\n//CHECK#7\nx = new String(\"1\");\nx <<= new Number(1);\nif (x !== 2) {\n $ERROR('#7: x = new String(\"1\"); x <<= new Number(1); x === 2. Actual: ' + (x));\n}\n\n//CHECK#8\nx = new Number(1);\nx <<= new String(\"1\");\nif (x !== 2) {\n $ERROR('#8: x = new Number(1); x <<= new String(\"1\"); x === 2. Actual: ' + (x));\n}\n\n//CHECK#9\nx = \"x\";\nx <<= 1;\nif (x !== 0) {\n $ERROR('#9: x = \"x\"; x <<= 1; x === 0. Actual: ' + (x));\n}\n\n//CHECK#10\nx = 1;\nx <<= \"x\";\nif (x !== 1) {\n $ERROR('#10: x = 1; x <<= \"x\"; x === 1. Actual: ' + (x));\n}\n",
+ "id": "S11.13.2_A4.6_T2.2"
+ },
+ {
+ "section": "11.13.2, 11.7.1",
+ "description": "Type(x) is different from Type(y) and both types vary between Number (primitive or object) and Null",
+ "test": "//CHECK#1\nx = 1;\nx <<= null;\nif (x !== 1) {\n $ERROR('#1: x = 1; x <<= null; x === 1. Actual: ' + (x));\n}\n\n//CHECK#2\nx = null;\nx <<= 1;\nif (x !== 0) {\n $ERROR('#2: x = null; x <<= 1; x === 0. Actual: ' + (x));\n}\n\n//CHECK#3\nx = new Number(1);\nx <<= null;\nif (x !== 1) {\n $ERROR('#3: x = new Number(1); x <<= null; x === 1. Actual: ' + (x));\n}\n\n//CHECK#4\nx = null;\nx <<= new Number(1);\nif (x !== 0) {\n $ERROR('#4: x = null; x <<= new Number(1); x === 0. Actual: ' + (x));\n}\n",
+ "id": "S11.13.2_A4.6_T2.3"
+ },
+ {
+ "section": "11.13.2, 11.7.1",
+ "description": "Type(x) is different from Type(y) and both types vary between Number (primitive or object) and Undefined",
+ "test": "//CHECK#1\nx = 1;\nx <<= undefined;\nif (x !== 1) {\n $ERROR('#1: x = 1; x <<= undefined; x === 1. Actual: ' + (x));\n}\n\n//CHECK#2\nx = undefined;\nx <<= 1;\nif (x !== 0) {\n $ERROR('#2: x = undefined; x <<= 1; x === 0. Actual: ' + (x));\n}\n\n//CHECK#3\nx = new Number(1);\nx <<= undefined;\nif (x !== 1) {\n $ERROR('#3: x = new Number(1); x <<= undefined; x === 1. Actual: ' + (x));\n}\n\n//CHECK#4\nx = undefined;\nx <<= new Number(1);\nif (x !== 0) {\n $ERROR('#4: x = undefined; x <<= new Number(1); x === 0. Actual: ' + (x));\n}\n",
+ "id": "S11.13.2_A4.6_T2.4"
+ },
+ {
+ "section": "11.13.2, 11.7.1",
+ "description": "Type(x) is different from Type(y) and both types vary between String (primitive or object) and Boolean (primitive and object)",
+ "test": "//CHECK#1\nx = true;\nx <<= \"1\";\nif (x !== 2) {\n $ERROR('#1: x = true; x <<= \"1\"; x === 2. Actual: ' + (x));\n}\n\n//CHECK#2\nx = \"1\";\nx <<= true;\nif (x !== 2) {\n $ERROR('#2: x = \"1\"; x <<= true; x === 2. Actual: ' + (x));\n}\n\n//CHECK#3\nx = new Boolean(true);\nx <<= \"1\";\nif (x !== 2) {\n $ERROR('#3: x = new Boolean(true); x <<= \"1\"; x === 2. Actual: ' + (x));\n}\n\n//CHECK#4\nx = \"1\";\nx <<= new Boolean(true);\nif (x !== 2) {\n $ERROR('#4: x = \"1\"; x <<= new Boolean(true); x === 2. Actual: ' + (x));\n}\n\n//CHECK#5\nx = true;\nx <<= new String(\"1\");\nif (x !== 2) {\n $ERROR('#5: x = true; x <<= new String(\"1\"); x === 2. Actual: ' + (x));\n}\n\n//CHECK#6\nx = new String(\"1\");\nx <<= true;\nif (x !== 2) {\n $ERROR('#6: x = new String(\"1\"); x <<= true; x === 2. Actual: ' + (x));\n}\n\n//CHECK#7\nx = new Boolean(true);\nx <<= new String(\"1\");\nif (x !== 2) {\n $ERROR('#7: x = new Boolean(true); x <<= new String(\"1\"); x === 2. Actual: ' + (x));\n}\n\n//CHECK#8\nx = new String(\"1\");\nx <<= new Boolean(true);\nif (x !== 2) {\n $ERROR('#8: x = new String(\"1\"); x <<= new Boolean(true); x === 2. Actual: ' + (x));\n}\n",
+ "id": "S11.13.2_A4.6_T2.5"
+ },
+ {
+ "section": "11.13.2, 11.7.1",
+ "description": "Type(x) is different from Type(y) and both types vary between String (primitive or object) and Undefined",
+ "test": "//CHECK#1\nx = \"1\";\nx <<= undefined;\nif (x !== 1) {\n $ERROR('#1: x = \"1\"; x <<= undefined; x === 1. Actual: ' + (x));\n}\n\n//CHECK#2\nx = undefined;\nx <<= \"1\";\nif (x !== 0) {\n $ERROR('#2: x = undefined; x <<= \"1\"; x === 0. Actual: ' + (x));\n}\n\n//CHECK#3\nx = new String(\"1\");\nx <<= undefined;\nif (x !== 1) {\n $ERROR('#3: x = new String(\"1\"); x <<= undefined; x === 1. Actual: ' + (x));\n}\n\n//CHECK#4\nx = undefined;\nx <<= new String(\"1\");\nif (x !== 0) {\n $ERROR('#4: x = undefined; x <<= new String(\"1\"); x === 0. Actual: ' + (x));\n}\n",
+ "id": "S11.13.2_A4.6_T2.6"
+ },
+ {
+ "section": "11.13.2, 11.7.1",
+ "description": "Type(x) is different from Type(y) and both types vary between String (primitive or object) and Null",
+ "test": "//CHECK#1\nx = \"1\";\nx <<= null;\nif (x !== 1) {\n $ERROR('#1: x = \"1\"; x <<= null; x === 1. Actual: ' + (x));\n}\n\n//CHECK#2\nx = null;\nx <<= \"1\";\nif (x !== 0) {\n $ERROR('#2: x = null; x <<= \"1\"; x === 0. Actual: ' + (x));\n}\n\n//CHECK#3\nx = new String(\"1\");\nx <<= null;\nif (x !== 1) {\n $ERROR('#3: x = new String(\"1\"); x <<= null; x === 1. Actual: ' + (x));\n}\n\n//CHECK#4\nx = null;\nx <<= new String(\"1\");\nif (x !== 0) {\n $ERROR('#4: x = null; x <<= new String(\"1\"); x === 0. Actual: ' + (x));\n}\n",
+ "id": "S11.13.2_A4.6_T2.7"
+ },
+ {
+ "section": "11.13.2, 11.7.1",
+ "description": "Type(x) is different from Type(y) and both types vary between Boolean (primitive or object) and Undefined",
+ "test": "//CHECK#1\nx = true;\nx <<= undefined;\nif (x !== 1) {\n $ERROR('#1: x = true; x <<= undefined; x === 1. Actual: ' + (x));\n}\n\n//CHECK#2\nx = undefined;\nx <<= true;\nif (x !== 0) {\n $ERROR('#2: x = undefined; x <<= true; x === 0. Actual: ' + (x));\n}\n\n//CHECK#3\nx = new Boolean(true);\nx <<= undefined;\nif (x !== 1) {\n $ERROR('#3: x = new Boolean(true); x <<= undefined; x === 1. Actual: ' + (x));\n}\n\n//CHECK#4\nx = undefined;\nx <<= new Boolean(true);\nif (x !== 0) {\n $ERROR('#4: x = undefined; x <<= new Boolean(true); x === 0. Actual: ' + (x));\n}\n",
+ "id": "S11.13.2_A4.6_T2.8"
+ },
+ {
+ "section": "11.13.2, 11.7.1",
+ "description": "Type(x) is different from Type(y) and both types vary between Boolean (primitive or object) and Null",
+ "test": "//CHECK#1\nx = true;\nx <<= null;\nif (x !== 1) {\n $ERROR('#1: x = true; x <<= null; x === 1. Actual: ' + (x));\n}\n\n//CHECK#2\nx = null;\nx <<= true;\nif (x !== 0) {\n $ERROR('#2: x = null; x <<= true; x === 0. Actual: ' + (x));\n}\n\n//CHECK#3\nx = new Boolean(true);\nx <<= null;\nif (x !== 1) {\n $ERROR('#3: x = new Boolean(true); x <<= null; x === 1. Actual: ' + (x));\n}\n\n//CHECK#4\nx = null;\nx <<= new Boolean(true);\nif (x !== 0) {\n $ERROR('#4: x = null; x <<= new Boolean(true); x === 0. Actual: ' + (x));\n}\n",
+ "id": "S11.13.2_A4.6_T2.9"
+ },
+ {
+ "section": "11.13.2, 11.7.2",
+ "description": "Type(x) and Type(y) vary between primitive boolean and Boolean object",
+ "test": "//CHECK#1\nx = true;\nx >>= true;\nif (x !== 0) {\n $ERROR('#1: x = true; x >>= true; x === 0. Actual: ' + (x));\n}\n\n//CHECK#2\nx = new Boolean(true);\nx >>= true;\nif (x !== 0) {\n $ERROR('#2: x = new Boolean(true); x >>= true; x === 0. Actual: ' + (x));\n}\n\n//CHECK#3\nx = true;\nx >>= new Boolean(true);\nif (x !== 0) {\n $ERROR('#3: x = true; x >>= new Boolean(true); x === 0. Actual: ' + (x));\n}\n\n//CHECK#4\nx = new Boolean(true);\nx >>= new Boolean(true);\nif (x !== 0) {\n $ERROR('#4: x = new Boolean(true); x >>= new Boolean(true); x === 0. Actual: ' + (x));\n}\n",
+ "id": "S11.13.2_A4.7_T1.1"
+ },
+ {
+ "section": "11.13.2, 11.7.2",
+ "description": "Type(x) and Type(y) vary between primitive number and Number object",
+ "test": "//CHECK#1\nx = 1;\nx >>= 1;\nif (x !== 0) {\n $ERROR('#1: x = 1; x >>= 1; x === 0. Actual: ' + (x));\n}\n\n//CHECK#2\nx = new Number(1);\nx >>= 1;\nif (x !== 0) {\n $ERROR('#2: x = new Number(1); x >>= 1; x === 0. Actual: ' + (x));\n}\n\n//CHECK#3\nx = 1;\nx >>= new Number(1);\nif (x !== 0) {\n $ERROR('#3: x = 1; x >>= new Number(1); x === 0. Actual: ' + (x));\n}\n\n//CHECK#4\nx = new Number(1);\nx >>= new Number(1);\nif (x !== 0) {\n $ERROR('#4: x = new Number(1); x >>= new Number(1); x === 0. Actual: ' + (x));\n}\n\n",
+ "id": "S11.13.2_A4.7_T1.2"
+ },
+ {
+ "section": "11.13.2, 11.7.2",
+ "description": "Type(x) and Type(y) vary between primitive string and String object",
+ "test": "//CHECK#1\nx = \"1\";\nx >>= \"1\";\nif (x !== 0) {\n $ERROR('#1: x = \"1\"; x >>= \"1\"; x === 0. Actual: ' + (x));\n}\n\n//CHECK#2\nx = new String(\"1\");\nx >>= \"1\";\nif (x !== 0) {\n $ERROR('#2: x = new String(\"1\"); x >>= \"1\"; x === 0. Actual: ' + (x));\n}\n\n//CHECK#3\nx = \"1\";\nx >>= new String(\"1\");\nif (x !== 0) {\n $ERROR('#3: x = \"1\"; x >>= new String(\"1\"); x === 0. Actual: ' + (x));\n}\n\n//CHECK#4\nx = new String(\"1\");\nx >>= new String(\"1\");\nif (x !== 0) {\n $ERROR('#4: x = new String(\"1\"); x >>= new String(\"1\"); x === 0. Actual: ' + (x));\n}\n\n//CHECK#5\nx = \"x\";\nx >>= \"1\";\nif (x !== 0) {\n $ERROR('#5: x = \"x\"; x >>= \"1\"; x === 0. Actual: ' + (x));\n}\n\n//CHECK#6\nx = \"1\";\nx >>= \"x\";\nif (x !== 1) {\n $ERROR('#6: x = \"1\"; x >>= \"x\"; x === 1. Actual: ' + (x));\n}\n",
+ "id": "S11.13.2_A4.7_T1.3"
+ },
+ {
+ "section": "11.13.2, 11.7.2",
+ "description": "Type(x) and Type(y) vary between Null and Undefined",
+ "test": "//CHECK#1\nx = null;\nx >>= undefined;\nif (x !== 0) {\n $ERROR('#1: x = null; x >>= undefined; x === 0. Actual: ' + (x));\n}\n\n//CHECK#2\nx = undefined;\nx >>= null;\nif (x !== 0) {\n $ERROR('#2: x = undefined; x >>= null; x === 0. Actual: ' + (x));\n}\n\n//CHECK#3\nx = undefined;\nx >>= undefined;\nif (x !== 0) {\n $ERROR('#3: x = undefined; x >>= undefined; x === 0. Actual: ' + (x));\n}\n\n//CHECK#4\nx = null;\nx >>= null;\nif (x !== 0) {\n $ERROR('#4: x = null; x >>= null; x === 0. Actual: ' + (x));\n}\n",
+ "id": "S11.13.2_A4.7_T1.4"
+ },
+ {
+ "section": "11.13.2, 11.7.2",
+ "description": "Type(x) is different from Type(y) and both types vary between Number (primitive or object) and Boolean (primitive and object)",
+ "test": "//CHECK#1\nx = true;\nx >>= 1;\nif (x !== 0) {\n $ERROR('#1: x = true; x >>= 1; x === 0. Actual: ' + (x));\n}\n\n//CHECK#2\nx = 1;\nx >>= true;\nif (x !== 0) {\n $ERROR('#2: x = 1; x >>= true; x === 0. Actual: ' + (x));\n}\n\n//CHECK#3\nx = new Boolean(true);\nx >>= 1;\nif (x !== 0) {\n $ERROR('#3: x = new Boolean(true); x >>= 1; x === 0. Actual: ' + (x));\n}\n\n//CHECK#4\nx = 1;\nx >>= new Boolean(true);\nif (x !== 0) {\n $ERROR('#4: x = 1; x >>= new Boolean(true); x === 0. Actual: ' + (x));\n}\n\n//CHECK#5\nx = true;\nx >>= new Number(1);\nif (x !== 0) {\n $ERROR('#5: x = true; x >>= new Number(1); x === 0. Actual: ' + (x));\n}\n\n//CHECK#6\nx = new Number(1);\nx >>= true;\nif (x !== 0) {\n $ERROR('#6: x = new Number(1); x >>= true; x === 0. Actual: ' + (x));\n}\n\n//CHECK#7\nx = new Boolean(true);\nx >>= new Number(1);\nif (x !== 0) {\n $ERROR('#7: x = new Boolean(true); x >>= new Number(1); x === 0. Actual: ' + (x));\n}\n\n//CHECK#8\nx = new Number(1);\nx >>= new Boolean(true);\nif (x !== 0) {\n $ERROR('#8: x = new Number(1); x >>= new Boolean(true); x === 0. Actual: ' + (x));\n}\n",
+ "id": "S11.13.2_A4.7_T2.1"
+ },
+ {
+ "section": "11.13.2, 11.7.2",
+ "description": "Type(x) is different from Type(y) and both types vary between Number (primitive or object) and String (primitive and object)",
+ "test": "//CHECK#1\nx = \"1\";\nx >>= 1;\nif (x !== 0) {\n $ERROR('#1: x = \"1\"; x >>= 1; x === 0. Actual: ' + (x));\n}\n\n//CHECK#2\nx = 1;\nx >>= \"1\";\nif (x !== 0) {\n $ERROR('#2: x = 1; x >>= \"1\"; x === 0. Actual: ' + (x));\n}\n\n//CHECK#3\nx = new String(\"1\");\nx >>= 1;\nif (x !== 0) {\n $ERROR('#3: x = new String(\"1\"); x >>= 1; x === 0. Actual: ' + (x));\n}\n\n//CHECK#4\nx = 1;\nx >>= new String(\"1\");\nif (x !== 0) {\n $ERROR('#4: x = 1; x >>= new String(\"1\"); x === 0. Actual: ' + (x));\n}\n\n//CHECK#5\nx = \"1\";\nx >>= new Number(1);\nif (x !== 0) {\n $ERROR('#5: x = \"1\"; x >>= new Number(1); x === 0. Actual: ' + (x));\n}\n\n//CHECK#6\nx = new Number(1);\nx >>= \"1\";\nif (x !== 0) {\n $ERROR('#6: x = new Number(1); x >>= \"1\"; x === 0. Actual: ' + (x));\n}\n\n//CHECK#7\nx = new String(\"1\");\nx >>= new Number(1);\nif (x !== 0) {\n $ERROR('#7: x = new String(\"1\"); x >>= new Number(1); x === 0. Actual: ' + (x));\n}\n\n//CHECK#8\nx = new Number(1);\nx >>= new String(\"1\");\nif (x !== 0) {\n $ERROR('#8: x = new Number(1); x >>= new String(\"1\"); x === 0. Actual: ' + (x));\n}\n\n//CHECK#9\nx = \"x\";\nx >>= 1;\nif (x !== 0) {\n $ERROR('#9: x = \"x\"; x >>= 1; x === 0. Actual: ' + (x));\n}\n\n//CHECK#10\nx = 1;\nx >>= \"x\";\nif (x !== 1) {\n $ERROR('#10: x = 1; x >>= \"x\"; x === 1. Actual: ' + (x));\n}\n",
+ "id": "S11.13.2_A4.7_T2.2"
+ },
+ {
+ "section": "11.13.2, 11.7.2",
+ "description": "Type(x) is different from Type(y) and both types vary between Number (primitive or object) and Null",
+ "test": "//CHECK#1\nx = 1;\nx >>= null;\nif (x !== 1) {\n $ERROR('#1: x = 1; x >>= null; x === 1. Actual: ' + (x));\n}\n\n//CHECK#2\nx = null;\nx >>= 1;\nif (x !== 0) {\n $ERROR('#2: x = null; x >>= 1; x === 0. Actual: ' + (x));\n}\n\n//CHECK#3\nx = new Number(1);\nx >>= null;\nif (x !== 1) {\n $ERROR('#3: x = new Number(1); x >>= null; x === 1. Actual: ' + (x));\n}\n\n//CHECK#4\nx = null;\nx >>= new Number(1);\nif (x !== 0) {\n $ERROR('#4: x = null; x >>= new Number(1); x === 0. Actual: ' + (x));\n}\n",
+ "id": "S11.13.2_A4.7_T2.3"
+ },
+ {
+ "section": "11.13.2, 11.7.2",
+ "description": "Type(x) is different from Type(y) and both types vary between Number (primitive or object) and Undefined",
+ "test": "//CHECK#1\nx = 1;\nx >>= undefined;\nif (x !== 1) {\n $ERROR('#1: x = 1; x >>= undefined; x === 1. Actual: ' + (x));\n}\n\n//CHECK#2\nx = undefined;\nx >>= 1;\nif (x !== 0) {\n $ERROR('#2: x = undefined; x >>= 1; x === 0. Actual: ' + (x));\n}\n\n//CHECK#3\nx = new Number(1);\nx >>= undefined;\nif (x !== 1) {\n $ERROR('#3: x = new Number(1); x >>= undefined; x === 1. Actual: ' + (x));\n}\n\n//CHECK#4\nx = undefined;\nx >>= new Number(1);\nif (x !== 0) {\n $ERROR('#4: x = undefined; x >>= new Number(1); x === 0. Actual: ' + (x));\n}\n",
+ "id": "S11.13.2_A4.7_T2.4"
+ },
+ {
+ "section": "11.13.2, 11.7.2",
+ "description": "Type(x) is different from Type(y) and both types vary between String (primitive or object) and Boolean (primitive and object)",
+ "test": "//CHECK#1\nx = true;\nx >>= \"1\";\nif (x !== 0) {\n $ERROR('#1: x = true; x >>= \"1\"; x === 0. Actual: ' + (x));\n}\n\n//CHECK#2\nx = \"1\";\nx >>= true;\nif (x !== 0) {\n $ERROR('#2: x = \"1\"; x >>= true; x === 0. Actual: ' + (x));\n}\n\n//CHECK#3\nx = new Boolean(true);\nx >>= \"1\";\nif (x !== 0) {\n $ERROR('#3: x = new Boolean(true); x >>= \"1\"; x === 0. Actual: ' + (x));\n}\n\n//CHECK#4\nx = \"1\";\nx >>= new Boolean(true);\nif (x !== 0) {\n $ERROR('#4: x = \"1\"; x >>= new Boolean(true); x === 0. Actual: ' + (x));\n}\n\n//CHECK#5\nx = true;\nx >>= new String(\"1\");\nif (x !== 0) {\n $ERROR('#5: x = true; x >>= new String(\"1\"); x === 0. Actual: ' + (x));\n}\n\n//CHECK#6\nx = new String(\"1\");\nx >>= true;\nif (x !== 0) {\n $ERROR('#6: x = new String(\"1\"); x >>= true; x === 0. Actual: ' + (x));\n}\n\n//CHECK#7\nx = new Boolean(true);\nx >>= new String(\"1\");\nif (x !== 0) {\n $ERROR('#7: x = new Boolean(true); x >>= new String(\"1\"); x === 0. Actual: ' + (x));\n}\n\n//CHECK#8\nx = new String(\"1\");\nx >>= new Boolean(true);\nif (x !== 0) {\n $ERROR('#8: x = new String(\"1\"); x >>= new Boolean(true); x === 0. Actual: ' + (x));\n}\n",
+ "id": "S11.13.2_A4.7_T2.5"
+ },
+ {
+ "section": "11.13.2, 11.7.2",
+ "description": "Type(x) is different from Type(y) and both types vary between String (primitive or object) and Undefined",
+ "test": "//CHECK#1\nx = \"1\";\nx >>= undefined;\nif (x !== 1) {\n $ERROR('#1: x = \"1\"; x >>= undefined; x === 1. Actual: ' + (x));\n}\n\n//CHECK#2\nx = undefined;\nx >>= \"1\";\nif (x !== 0) {\n $ERROR('#2: x = undefined; x >>= \"1\"; x === 0. Actual: ' + (x));\n}\n\n//CHECK#3\nx = new String(\"1\");\nx >>= undefined;\nif (x !== 1) {\n $ERROR('#3: x = new String(\"1\"); x >>= undefined; x === 1. Actual: ' + (x));\n}\n\n//CHECK#4\nx = undefined;\nx >>= new String(\"1\");\nif (x !== 0) {\n $ERROR('#4: x = undefined; x >>= new String(\"1\"); x === 0. Actual: ' + (x));\n}\n",
+ "id": "S11.13.2_A4.7_T2.6"
+ },
+ {
+ "section": "11.13.2, 11.7.2",
+ "description": "Type(x) is different from Type(y) and both types vary between String (primitive or object) and Null",
+ "test": "//CHECK#1\nx = \"1\";\nx >>= null;\nif (x !== 1) {\n $ERROR('#1: x = \"1\"; x >>= null; x === 1. Actual: ' + (x));\n}\n\n//CHECK#2\nx = null;\nx >>= \"1\";\nif (x !== 0) {\n $ERROR('#2: x = null; x >>= \"1\"; x === 0. Actual: ' + (x));\n}\n\n//CHECK#3\nx = new String(\"1\");\nx >>= null;\nif (x !== 1) {\n $ERROR('#3: x = new String(\"1\"); x >>= null; x === 1. Actual: ' + (x));\n}\n\n//CHECK#4\nx = null;\nx >>= new String(\"1\");\nif (x !== 0) {\n $ERROR('#4: x = null; x >>= new String(\"1\"); x === 0. Actual: ' + (x));\n}\n",
+ "id": "S11.13.2_A4.7_T2.7"
+ },
+ {
+ "section": "11.13.2, 11.7.2",
+ "description": "Type(x) is different from Type(y) and both types vary between Boolean (primitive or object) and Undefined",
+ "test": "//CHECK#1\nx = true;\nx >>= undefined;\nif (x !== 1) {\n $ERROR('#1: x = true; x >>= undefined; x === 1. Actual: ' + (x));\n}\n\n//CHECK#2\nx = undefined;\nx >>= true;\nif (x !== 0) {\n $ERROR('#2: x = undefined; x >>= true; x === 0. Actual: ' + (x));\n}\n\n//CHECK#3\nx = new Boolean(true);\nx >>= undefined;\nif (x !== 1) {\n $ERROR('#3: x = new Boolean(true); x >>= undefined; x === 1. Actual: ' + (x));\n}\n\n//CHECK#4\nx = undefined;\nx >>= new Boolean(true);\nif (x !== 0) {\n $ERROR('#4: x = undefined; x >>= new Boolean(true); x === 0. Actual: ' + (x));\n}\n",
+ "id": "S11.13.2_A4.7_T2.8"
+ },
+ {
+ "section": "11.13.2, 11.7.2",
+ "description": "Type(x) is different from Type(y) and both types vary between Boolean (primitive or object) and Null",
+ "test": "//CHECK#1\nx = true;\nx >>= null;\nif (x !== 1) {\n $ERROR('#1: x = true; x >>= null; x === 1. Actual: ' + (x));\n}\n\n//CHECK#2\nx = null;\nx >>= true;\nif (x !== 0) {\n $ERROR('#2: x = null; x >>= true; x === 0. Actual: ' + (x));\n}\n\n//CHECK#3\nx = new Boolean(true);\nx >>= null;\nif (x !== 1) {\n $ERROR('#3: x = new Boolean(true); x >>= null; x === 1. Actual: ' + (x));\n}\n\n//CHECK#4\nx = null;\nx >>= new Boolean(true);\nif (x !== 0) {\n $ERROR('#4: x = null; x >>= new Boolean(true); x === 0. Actual: ' + (x));\n}\n",
+ "id": "S11.13.2_A4.7_T2.9"
+ },
+ {
+ "section": "11.13.2, 11.7.3",
+ "description": "Type(x) and Type(y) vary between primitive boolean and Boolean object",
+ "test": "//CHECK#1\nx = true;\nx >>>= true;\nif (x !== 0) {\n $ERROR('#1: x = true; x >>>= true; x === 0. Actual: ' + (x));\n}\n\n//CHECK#2\nx = new Boolean(true);\nx >>>= true;\nif (x !== 0) {\n $ERROR('#2: x = new Boolean(true); x >>>= true; x === 0. Actual: ' + (x));\n}\n\n//CHECK#3\nx = true;\nx >>>= new Boolean(true);\nif (x !== 0) {\n $ERROR('#3: x = true; x >>>= new Boolean(true); x === 0. Actual: ' + (x));\n}\n\n//CHECK#4\nx = new Boolean(true);\nx >>>= new Boolean(true);\nif (x !== 0) {\n $ERROR('#4: x = new Boolean(true); x >>>= new Boolean(true); x === 0. Actual: ' + (x));\n}\n",
+ "id": "S11.13.2_A4.8_T1.1"
+ },
+ {
+ "section": "11.13.2, 11.7.3",
+ "description": "Type(x) and Type(y) vary between primitive number and Number object",
+ "test": "//CHECK#1\nx = 1;\nx >>>= 1;\nif (x !== 0) {\n $ERROR('#1: x = 1; x >>>= 1; x === 0. Actual: ' + (x));\n}\n\n//CHECK#2\nx = new Number(1);\nx >>>= 1;\nif (x !== 0) {\n $ERROR('#2: x = new Number(1); x >>>= 1; x === 0. Actual: ' + (x));\n}\n\n//CHECK#3\nx = 1;\nx >>>= new Number(1);\nif (x !== 0) {\n $ERROR('#3: x = 1; x >>>= new Number(1); x === 0. Actual: ' + (x));\n}\n\n//CHECK#4\nx = new Number(1);\nx >>>= new Number(1);\nif (x !== 0) {\n $ERROR('#4: x = new Number(1); x >>>= new Number(1); x === 0. Actual: ' + (x));\n}\n\n",
+ "id": "S11.13.2_A4.8_T1.2"
+ },
+ {
+ "section": "11.13.2, 11.7.3",
+ "description": "Type(x) and Type(y) vary between primitive string and String object",
+ "test": "//CHECK#1\nx = \"1\";\nx >>>= \"1\";\nif (x !== 0) {\n $ERROR('#1: x = \"1\"; x >>>= \"1\"; x === 0. Actual: ' + (x));\n}\n\n//CHECK#2\nx = new String(\"1\");\nx >>>= \"1\";\nif (x !== 0) {\n $ERROR('#2: x = new String(\"1\"); x >>>= \"1\"; x === 0. Actual: ' + (x));\n}\n\n//CHECK#3\nx = \"1\";\nx >>>= new String(\"1\");\nif (x !== 0) {\n $ERROR('#3: x = \"1\"; x >>>= new String(\"1\"); x === 0. Actual: ' + (x));\n}\n\n//CHECK#4\nx = new String(\"1\");\nx >>>= new String(\"1\");\nif (x !== 0) {\n $ERROR('#4: x = new String(\"1\"); x >>>= new String(\"1\"); x === 0. Actual: ' + (x));\n}\n\n//CHECK#5\nx = \"x\";\nx >>>= \"1\";\nif (x !== 0) {\n $ERROR('#5: x = \"x\"; x >>>= \"1\"; x === 0. Actual: ' + (x));\n}\n\n//CHECK#6\nx = \"1\";\nx >>>= \"x\";\nif (x !== 1) {\n $ERROR('#6: x = \"1\"; x >>>= \"x\"; x === 1. Actual: ' + (x));\n}\n",
+ "id": "S11.13.2_A4.8_T1.3"
+ },
+ {
+ "section": "11.13.2, 11.7.3",
+ "description": "Type(x) and Type(y) vary between Null and Undefined",
+ "test": "//CHECK#1\nx = null;\nx >>>= undefined;\nif (x !== 0) {\n $ERROR('#1: x = null; x >>>= undefined; x === 0. Actual: ' + (x));\n}\n\n//CHECK#2\nx = undefined;\nx >>>= null;\nif (x !== 0) {\n $ERROR('#2: x = undefined; x >>>= null; x === 0. Actual: ' + (x));\n}\n\n//CHECK#3\nx = undefined;\nx >>>= undefined;\nif (x !== 0) {\n $ERROR('#3: x = undefined; x >>>= undefined; x === 0. Actual: ' + (x));\n}\n\n//CHECK#4\nx = null;\nx >>>= null;\nif (x !== 0) {\n $ERROR('#4: x = null; x >>>= null; x === 0. Actual: ' + (x));\n}\n",
+ "id": "S11.13.2_A4.8_T1.4"
+ },
+ {
+ "section": "11.13.2, 11.7.3",
+ "description": "Type(x) is different from Type(y) and both types vary between Number (primitive or object) and Boolean (primitive and object)",
+ "test": "//CHECK#1\nx = true;\nx >>>= 1;\nif (x !== 0) {\n $ERROR('#1: x = true; x >>>= 1; x === 0. Actual: ' + (x));\n}\n\n//CHECK#2\nx = 1;\nx >>>= true;\nif (x !== 0) {\n $ERROR('#2: x = 1; x >>>= true; x === 0. Actual: ' + (x));\n}\n\n//CHECK#3\nx = new Boolean(true);\nx >>>= 1;\nif (x !== 0) {\n $ERROR('#3: x = new Boolean(true); x >>>= 1; x === 0. Actual: ' + (x));\n}\n\n//CHECK#4\nx = 1;\nx >>>= new Boolean(true);\nif (x !== 0) {\n $ERROR('#4: x = 1; x >>>= new Boolean(true); x === 0. Actual: ' + (x));\n}\n\n//CHECK#5\nx = true;\nx >>>= new Number(1);\nif (x !== 0) {\n $ERROR('#5: x = true; x >>>= new Number(1); x === 0. Actual: ' + (x));\n}\n\n//CHECK#6\nx = new Number(1);\nx >>>= true;\nif (x !== 0) {\n $ERROR('#6: x = new Number(1); x >>>= true; x === 0. Actual: ' + (x));\n}\n\n//CHECK#7\nx = new Boolean(true);\nx >>>= new Number(1);\nif (x !== 0) {\n $ERROR('#7: x = new Boolean(true); x >>>= new Number(1); x === 0. Actual: ' + (x));\n}\n\n//CHECK#8\nx = new Number(1);\nx >>>= new Boolean(true);\nif (x !== 0) {\n $ERROR('#8: x = new Number(1); x >>>= new Boolean(true); x === 0. Actual: ' + (x));\n}\n",
+ "id": "S11.13.2_A4.8_T2.1"
+ },
+ {
+ "section": "11.13.2, 11.7.3",
+ "description": "Type(x) is different from Type(y) and both types vary between Number (primitive or object) and String (primitive and object)",
+ "test": "//CHECK#1\nx = \"1\";\nx >>>= 1;\nif (x !== 0) {\n $ERROR('#1: x = \"1\"; x >>>= 1; x === 0. Actual: ' + (x));\n}\n\n//CHECK#2\nx = 1;\nx >>>= \"1\";\nif (x !== 0) {\n $ERROR('#2: x = 1; x >>>= \"1\"; x === 0. Actual: ' + (x));\n}\n\n//CHECK#3\nx = new String(\"1\");\nx >>>= 1;\nif (x !== 0) {\n $ERROR('#3: x = new String(\"1\"); x >>>= 1; x === 0. Actual: ' + (x));\n}\n\n//CHECK#4\nx = 1;\nx >>>= new String(\"1\");\nif (x !== 0) {\n $ERROR('#4: x = 1; x >>>= new String(\"1\"); x === 0. Actual: ' + (x));\n}\n\n//CHECK#5\nx = \"1\";\nx >>>= new Number(1);\nif (x !== 0) {\n $ERROR('#5: x = \"1\"; x >>>= new Number(1); x === 0. Actual: ' + (x));\n}\n\n//CHECK#6\nx = new Number(1);\nx >>>= \"1\";\nif (x !== 0) {\n $ERROR('#6: x = new Number(1); x >>>= \"1\"; x === 0. Actual: ' + (x));\n}\n\n//CHECK#7\nx = new String(\"1\");\nx >>>= new Number(1);\nif (x !== 0) {\n $ERROR('#7: x = new String(\"1\"); x >>>= new Number(1); x === 0. Actual: ' + (x));\n}\n\n//CHECK#8\nx = new Number(1);\nx >>>= new String(\"1\");\nif (x !== 0) {\n $ERROR('#8: x = new Number(1); x >>>= new String(\"1\"); x === 0. Actual: ' + (x));\n}\n\n//CHECK#9\nx = \"x\";\nx >>>= 1;\nif (x !== 0) {\n $ERROR('#9: x = \"x\"; x >>>= 1; x === 0. Actual: ' + (x));\n}\n\n//CHECK#10\nx = 1;\nx >>>= \"x\";\nif (x !== 1) {\n $ERROR('#10: x = 1; x >>>= \"x\"; x === 1. Actual: ' + (x));\n}\n",
+ "id": "S11.13.2_A4.8_T2.2"
+ },
+ {
+ "section": "11.13.2, 11.7.3",
+ "description": "Type(x) is different from Type(y) and both types vary between Number (primitive or object) and Null",
+ "test": "//CHECK#1\nx = 1;\nx >>>= null;\nif (x !== 1) {\n $ERROR('#1: x = 1; x >>>= null; x === 1. Actual: ' + (x));\n}\n\n//CHECK#2\nx = null;\nx >>>= 1;\nif (x !== 0) {\n $ERROR('#2: x = null; x >>>= 1; x === 0. Actual: ' + (x));\n}\n\n//CHECK#3\nx = new Number(1);\nx >>>= null;\nif (x !== 1) {\n $ERROR('#3: x = new Number(1); x >>>= null; x === 1. Actual: ' + (x));\n}\n\n//CHECK#4\nx = null;\nx >>>= new Number(1);\nif (x !== 0) {\n $ERROR('#4: x = null; x >>>= new Number(1); x === 0. Actual: ' + (x));\n}\n",
+ "id": "S11.13.2_A4.8_T2.3"
+ },
+ {
+ "section": "11.13.2, 11.7.3",
+ "description": "Type(x) is different from Type(y) and both types vary between Number (primitive or object) and Undefined",
+ "test": "//CHECK#1\nx = 1;\nx >>>= undefined;\nif (x !== 1) {\n $ERROR('#1: x = 1; x >>>= undefined; x === 1. Actual: ' + (x));\n}\n\n//CHECK#2\nx = undefined;\nx >>>= 1;\nif (x !== 0) {\n $ERROR('#2: x = undefined; x >>>= 1; x === 0. Actual: ' + (x));\n}\n\n//CHECK#3\nx = new Number(1);\nx >>>= undefined;\nif (x !== 1) {\n $ERROR('#3: x = new Number(1); x >>>= undefined; x === 1. Actual: ' + (x));\n}\n\n//CHECK#4\nx = undefined;\nx >>>= new Number(1);\nif (x !== 0) {\n $ERROR('#4: x = undefined; x >>>= new Number(1); x === 0. Actual: ' + (x));\n}\n",
+ "id": "S11.13.2_A4.8_T2.4"
+ },
+ {
+ "section": "11.13.2, 11.7.3",
+ "description": "Type(x) is different from Type(y) and both types vary between String (primitive or object) and Boolean (primitive and object)",
+ "test": "//CHECK#1\nx = true;\nx >>>= \"1\";\nif (x !== 0) {\n $ERROR('#1: x = true; x >>>= \"1\"; x === 0. Actual: ' + (x));\n}\n\n//CHECK#2\nx = \"1\";\nx >>>= true;\nif (x !== 0) {\n $ERROR('#2: x = \"1\"; x >>>= true; x === 0. Actual: ' + (x));\n}\n\n//CHECK#3\nx = new Boolean(true);\nx >>>= \"1\";\nif (x !== 0) {\n $ERROR('#3: x = new Boolean(true); x >>>= \"1\"; x === 0. Actual: ' + (x));\n}\n\n//CHECK#4\nx = \"1\";\nx >>>= new Boolean(true);\nif (x !== 0) {\n $ERROR('#4: x = \"1\"; x >>>= new Boolean(true); x === 0. Actual: ' + (x));\n}\n\n//CHECK#5\nx = true;\nx >>>= new String(\"1\");\nif (x !== 0) {\n $ERROR('#5: x = true; x >>>= new String(\"1\"); x === 0. Actual: ' + (x));\n}\n\n//CHECK#6\nx = new String(\"1\");\nx >>>= true;\nif (x !== 0) {\n $ERROR('#6: x = new String(\"1\"); x >>>= true; x === 0. Actual: ' + (x));\n}\n\n//CHECK#7\nx = new Boolean(true);\nx >>>= new String(\"1\");\nif (x !== 0) {\n $ERROR('#7: x = new Boolean(true); x >>>= new String(\"1\"); x === 0. Actual: ' + (x));\n}\n\n//CHECK#8\nx = new String(\"1\");\nx >>>= new Boolean(true);\nif (x !== 0) {\n $ERROR('#8: x = new String(\"1\"); x >>>= new Boolean(true); x === 0. Actual: ' + (x));\n}\n",
+ "id": "S11.13.2_A4.8_T2.5"
+ },
+ {
+ "section": "11.13.2, 11.7.3",
+ "description": "Type(x) is different from Type(y) and both types vary between String (primitive or object) and Undefined",
+ "test": "//CHECK#1\nx = \"1\";\nx >>>= undefined;\nif (x !== 1) {\n $ERROR('#1: x = \"1\"; x >>>= undefined; x === 1. Actual: ' + (x));\n}\n\n//CHECK#2\nx = undefined;\nx >>>= \"1\";\nif (x !== 0) {\n $ERROR('#2: x = undefined; x >>>= \"1\"; x === 0. Actual: ' + (x));\n}\n\n//CHECK#3\nx = new String(\"1\");\nx >>>= undefined;\nif (x !== 1) {\n $ERROR('#3: x = new String(\"1\"); x >>>= undefined; x === 1. Actual: ' + (x));\n}\n\n//CHECK#4\nx = undefined;\nx >>>= new String(\"1\");\nif (x !== 0) {\n $ERROR('#4: x = undefined; x >>>= new String(\"1\"); x === 0. Actual: ' + (x));\n}\n",
+ "id": "S11.13.2_A4.8_T2.6"
+ },
+ {
+ "section": "11.13.2, 11.7.3",
+ "description": "Type(x) is different from Type(y) and both types vary between String (primitive or object) and Null",
+ "test": "//CHECK#1\nx = \"1\";\nx >>>= null;\nif (x !== 1) {\n $ERROR('#1: x = \"1\"; x >>>= null; x === 1. Actual: ' + (x));\n}\n\n//CHECK#2\nx = null;\nx >>>= \"1\";\nif (x !== 0) {\n $ERROR('#2: x = null; x >>>= \"1\"; x === 0. Actual: ' + (x));\n}\n\n//CHECK#3\nx = new String(\"1\");\nx >>>= null;\nif (x !== 1) {\n $ERROR('#3: x = new String(\"1\"); x >>>= null; x === 1. Actual: ' + (x));\n}\n\n//CHECK#4\nx = null;\nx >>>= new String(\"1\");\nif (x !== 0) {\n $ERROR('#4: x = null; x >>>= new String(\"1\"); x === 0. Actual: ' + (x));\n}\n",
+ "id": "S11.13.2_A4.8_T2.7"
+ },
+ {
+ "section": "11.13.2, 11.7.3",
+ "description": "Type(x) is different from Type(y) and both types vary between Boolean (primitive or object) and Undefined",
+ "test": "//CHECK#1\nx = true;\nx >>>= undefined;\nif (x !== 1) {\n $ERROR('#1: x = true; x >>>= undefined; x === 1. Actual: ' + (x));\n}\n\n//CHECK#2\nx = undefined;\nx >>>= true;\nif (x !== 0) {\n $ERROR('#2: x = undefined; x >>>= true; x === 0. Actual: ' + (x));\n}\n\n//CHECK#3\nx = new Boolean(true);\nx >>>= undefined;\nif (x !== 1) {\n $ERROR('#3: x = new Boolean(true); x >>>= undefined; x === 1. Actual: ' + (x));\n}\n\n//CHECK#4\nx = undefined;\nx >>>= new Boolean(true);\nif (x !== 0) {\n $ERROR('#4: x = undefined; x >>>= new Boolean(true); x === 0. Actual: ' + (x));\n}\n",
+ "id": "S11.13.2_A4.8_T2.8"
+ },
+ {
+ "section": "11.13.2, 11.7.3",
+ "description": "Type(x) is different from Type(y) and both types vary between Boolean (primitive or object) and Null",
+ "test": "//CHECK#1\nx = true;\nx >>>= null;\nif (x !== 1) {\n $ERROR('#1: x = true; x >>>= null; x === 1. Actual: ' + (x));\n}\n\n//CHECK#2\nx = null;\nx >>>= true;\nif (x !== 0) {\n $ERROR('#2: x = null; x >>>= true; x === 0. Actual: ' + (x));\n}\n\n//CHECK#3\nx = new Boolean(true);\nx >>>= null;\nif (x !== 1) {\n $ERROR('#3: x = new Boolean(true); x >>>= null; x === 1. Actual: ' + (x));\n}\n\n//CHECK#4\nx = null;\nx >>>= new Boolean(true);\nif (x !== 0) {\n $ERROR('#4: x = null; x >>>= new Boolean(true); x === 0. Actual: ' + (x));\n}\n",
+ "id": "S11.13.2_A4.8_T2.9"
+ },
+ {
+ "section": "11.13.2, 11.10.1",
+ "description": "Type(x) and Type(y) vary between primitive boolean and Boolean object",
+ "test": "//CHECK#1\nx = true;\nx &= true;\nif (x !== 1) {\n $ERROR('#1: x = true; x &= true; x === 1. Actual: ' + (x));\n}\n\n//CHECK#2\nx = new Boolean(true);\nx &= true;\nif (x !== 1) {\n $ERROR('#2: x = new Boolean(true); x &= true; x === 1. Actual: ' + (x));\n}\n\n//CHECK#3\nx = true;\nx &= new Boolean(true);\nif (x !== 1) {\n $ERROR('#3: x = true; x &= new Boolean(true); x === 1. Actual: ' + (x));\n}\n\n//CHECK#4\nx = new Boolean(true);\nx &= new Boolean(true);\nif (x !== 1) {\n $ERROR('#4: x = new Boolean(true); x &= new Boolean(true); x === 1. Actual: ' + (x));\n}\n",
+ "id": "S11.13.2_A4.9_T1.1"
+ },
+ {
+ "section": "11.13.2, 11.10.1",
+ "description": "Type(x) and Type(y) vary between primitive number and Number object",
+ "test": "//CHECK#1\nx = 1;\nx &= 1;\nif (x !== 1) {\n $ERROR('#1: x = 1; x &= 1; x === 1. Actual: ' + (x));\n}\n\n//CHECK#2\nx = new Number(1);\nx &= 1;\nif (x !== 1) {\n $ERROR('#2: x = new Number(1); x &= 1; x === 1. Actual: ' + (x));\n}\n\n//CHECK#3\nx = 1;\nx &= new Number(1);\nif (x !== 1) {\n $ERROR('#3: x = 1; x &= new Number(1); x === 1. Actual: ' + (x));\n}\n\n//CHECK#4\nx = new Number(1);\nx &= new Number(1);\nif (x !== 1) {\n $ERROR('#4: x = new Number(1); x &= new Number(1); x === 1. Actual: ' + (x));\n}\n\n",
+ "id": "S11.13.2_A4.9_T1.2"
+ },
+ {
+ "section": "11.13.2, 11.10.1",
+ "description": "Type(x) and Type(y) vary between primitive string and String object",
+ "test": "//CHECK#1\nx = \"1\";\nx &= \"1\";\nif (x !== 1) {\n $ERROR('#1: x = \"1\"; x &= \"1\"; x === 1. Actual: ' + (x));\n}\n\n//CHECK#2\nx = new String(\"1\");\nx &= \"1\";\nif (x !== 1) {\n $ERROR('#2: x = new String(\"1\"); x &= \"1\"; x === 1. Actual: ' + (x));\n}\n\n//CHECK#3\nx = \"1\";\nx &= new String(\"1\");\nif (x !== 1) {\n $ERROR('#3: x = \"1\"; x &= new String(\"1\"); x === 1. Actual: ' + (x));\n}\n\n//CHECK#4\nx = new String(\"1\");\nx &= new String(\"1\");\nif (x !== 1) {\n $ERROR('#4: x = new String(\"1\"); x &= new String(\"1\"); x === 1. Actual: ' + (x));\n}\n\n//CHECK#5\nx = \"x\";\nx &= \"1\";\nif (x !== 0) {\n $ERROR('#5: x = \"x\"; x &= \"1\"; x === 0. Actual: ' + (x));\n}\n\n//CHECK#6\nx = \"1\";\nx &= \"x\";\nif (x !== 0) {\n $ERROR('#6: x = \"1\"; x &= \"x\"; x === 0. Actual: ' + (x));\n}\n",
+ "id": "S11.13.2_A4.9_T1.3"
+ },
+ {
+ "section": "11.13.2, 11.10.1",
+ "description": "Type(x) and Type(y) vary between Null and Undefined",
+ "test": "//CHECK#1\nx = null;\nx &= undefined;\nif (x !== 0) {\n $ERROR('#1: x = null; x &= undefined; x === 0. Actual: ' + (x));\n}\n\n//CHECK#2\nx = undefined;\nx &= null;\nif (x !== 0) {\n $ERROR('#2: x = undefined; x &= null; x === 0. Actual: ' + (x));\n}\n\n//CHECK#3\nx = undefined;\nx &= undefined;\nif (x !== 0) {\n $ERROR('#3: x = undefined; x &= undefined; x === 0. Actual: ' + (x));\n}\n\n//CHECK#4\nx = null;\nx &= null;\nif (x !== 0) {\n $ERROR('#4: x = null; x &= null; x === 0. Actual: ' + (x));\n}\n",
+ "id": "S11.13.2_A4.9_T1.4"
+ },
+ {
+ "section": "11.13.2, 11.10.1",
+ "description": "Type(x) is different from Type(y) and both types vary between Number (primitive or object) and Boolean (primitive and object)",
+ "test": "//CHECK#1\nx = true;\nx &= 1;\nif (x !== 1) {\n $ERROR('#1: x = true; x &= 1; x === 1. Actual: ' + (x));\n}\n\n//CHECK#2\nx = 1;\nx &= true;\nif (x !== 1) {\n $ERROR('#2: x = 1; x &= true; x === 1. Actual: ' + (x));\n}\n\n//CHECK#3\nx = new Boolean(true);\nx &= 1;\nif (x !== 1) {\n $ERROR('#3: x = new Boolean(true); x &= 1; x === 1. Actual: ' + (x));\n}\n\n//CHECK#4\nx = 1;\nx &= new Boolean(true);\nif (x !== 1) {\n $ERROR('#4: x = 1; x &= new Boolean(true); x === 1. Actual: ' + (x));\n}\n\n//CHECK#5\nx = true;\nx &= new Number(1);\nif (x !== 1) {\n $ERROR('#5: x = true; x &= new Number(1); x === 1. Actual: ' + (x));\n}\n\n//CHECK#6\nx = new Number(1);\nx &= true;\nif (x !== 1) {\n $ERROR('#6: x = new Number(1); x &= true; x === 1. Actual: ' + (x));\n}\n\n//CHECK#7\nx = new Boolean(true);\nx &= new Number(1);\nif (x !== 1) {\n $ERROR('#7: x = new Boolean(true); x &= new Number(1); x === 1. Actual: ' + (x));\n}\n\n//CHECK#8\nx = new Number(1);\nx &= new Boolean(true);\nif (x !== 1) {\n $ERROR('#8: x = new Number(1); x &= new Boolean(true); x === 1. Actual: ' + (x));\n}\n",
+ "id": "S11.13.2_A4.9_T2.1"
+ },
+ {
+ "section": "11.13.2, 11.10.1",
+ "description": "Type(x) is different from Type(y) and both types vary between Number (primitive or object) and String (primitive and object)",
+ "test": "//CHECK#1\nx = \"1\";\nx &= 1;\nif (x !== 1) {\n $ERROR('#1: x = \"1\"; x &= 1; x === 1. Actual: ' + (x));\n}\n\n//CHECK#2\nx = 1;\nx &= \"1\";\nif (x !== 1) {\n $ERROR('#2: x = 1; x &= \"1\"; x === 1. Actual: ' + (x));\n}\n\n//CHECK#3\nx = new String(\"1\");\nx &= 1;\nif (x !== 1) {\n $ERROR('#3: x = new String(\"1\"); x &= 1; x === 1. Actual: ' + (x));\n}\n\n//CHECK#4\nx = 1;\nx &= new String(\"1\");\nif (x !== 1) {\n $ERROR('#4: x = 1; x &= new String(\"1\"); x === 1. Actual: ' + (x));\n}\n\n//CHECK#5\nx = \"1\";\nx &= new Number(1);\nif (x !== 1) {\n $ERROR('#5: x = \"1\"; x &= new Number(1); x === 1. Actual: ' + (x));\n}\n\n//CHECK#6\nx = new Number(1);\nx &= \"1\";\nif (x !== 1) {\n $ERROR('#6: x = new Number(1); x &= \"1\"; x === 1. Actual: ' + (x));\n}\n\n//CHECK#7\nx = new String(\"1\");\nx &= new Number(1);\nif (x !== 1) {\n $ERROR('#7: x = new String(\"1\"); x &= new Number(1); x === 1. Actual: ' + (x));\n}\n\n//CHECK#8\nx = new Number(1);\nx &= new String(\"1\");\nif (x !== 1) {\n $ERROR('#8: x = new Number(1); x &= new String(\"1\"); x === 1. Actual: ' + (x));\n}\n\n//CHECK#9\nx = \"x\";\nx &= 1;\nif (x !== 0) {\n $ERROR('#9: x = \"x\"; x &= 1; x === 0. Actual: ' + (x));\n}\n\n//CHECK#10\nx = 1;\nx &= \"x\";\nif (x !== 0) {\n $ERROR('#10: x = 1; x &= \"x\"; x === 0. Actual: ' + (x));\n}\n",
+ "id": "S11.13.2_A4.9_T2.2"
+ },
+ {
+ "section": "11.13.2, 11.10.1",
+ "description": "Type(x) is different from Type(y) and both types vary between Number (primitive or object) and Null",
+ "test": "//CHECK#1\nx = 1;\nx &= null;\nif (x !== 0) {\n $ERROR('#1: x = 1; x &= null; x === 0. Actual: ' + (x));\n}\n\n//CHECK#2\nx = null;\nx &= 1;\nif (x !== 0) {\n $ERROR('#2: x = null; x &= 1; x === 0. Actual: ' + (x));\n}\n\n//CHECK#3\nx = new Number(1);\nx &= null;\nif (x !== 0) {\n $ERROR('#3: x = new Number(1); x &= null; x === 0. Actual: ' + (x));\n}\n\n//CHECK#4\nx = null;\nx &= new Number(1);\nif (x !== 0) {\n $ERROR('#4: x = null; x &= new Number(1); x === 0. Actual: ' + (x));\n}\n",
+ "id": "S11.13.2_A4.9_T2.3"
+ },
+ {
+ "section": "11.13.2, 11.10.1",
+ "description": "Type(x) is different from Type(y) and both types vary between Number (primitive or object) and Undefined",
+ "test": "//CHECK#1\nx = 1;\nx &= undefined;\nif (x !== 0) {\n $ERROR('#1: x = 1; x &= undefined; x === 0. Actual: ' + (x));\n}\n\n//CHECK#2\nx = undefined;\nx &= 1;\nif (x !== 0) {\n $ERROR('#2: x = undefined; x &= 1; x === 0. Actual: ' + (x));\n}\n\n//CHECK#3\nx = new Number(1);\nx &= undefined;\nif (x !== 0) {\n $ERROR('#3: x = new Number(1); x &= undefined; x === 0. Actual: ' + (x));\n}\n\n//CHECK#4\nx = undefined;\nx &= new Number(1);\nif (x !== 0) {\n $ERROR('#4: x = undefined; x &= new Number(1); x === 0. Actual: ' + (x));\n}\n",
+ "id": "S11.13.2_A4.9_T2.4"
+ },
+ {
+ "section": "11.13.2, 11.10.1",
+ "description": "Type(x) is different from Type(y) and both types vary between String (primitive or object) and Boolean (primitive and object)",
+ "test": "//CHECK#1\nx = true;\nx &= \"1\";\nif (x !== 1) {\n $ERROR('#1: x = true; x &= \"1\"; x === 1. Actual: ' + (x));\n}\n\n//CHECK#2\nx = \"1\";\nx &= true;\nif (x !== 1) {\n $ERROR('#2: x = \"1\"; x &= true; x === 1. Actual: ' + (x));\n}\n\n//CHECK#3\nx = new Boolean(true);\nx &= \"1\";\nif (x !== 1) {\n $ERROR('#3: x = new Boolean(true); x &= \"1\"; x === 1. Actual: ' + (x));\n}\n\n//CHECK#4\nx = \"1\";\nx &= new Boolean(true);\nif (x !== 1) {\n $ERROR('#4: x = \"1\"; x &= new Boolean(true); x === 1. Actual: ' + (x));\n}\n\n//CHECK#5\nx = true;\nx &= new String(\"1\");\nif (x !== 1) {\n $ERROR('#5: x = true; x &= new String(\"1\"); x === 1. Actual: ' + (x));\n}\n\n//CHECK#6\nx = new String(\"1\");\nx &= true;\nif (x !== 1) {\n $ERROR('#6: x = new String(\"1\"); x &= true; x === 1. Actual: ' + (x));\n}\n\n//CHECK#7\nx = new Boolean(true);\nx &= new String(\"1\");\nif (x !== 1) {\n $ERROR('#7: x = new Boolean(true); x &= new String(\"1\"); x === 1. Actual: ' + (x));\n}\n\n//CHECK#8\nx = new String(\"1\");\nx &= new Boolean(true);\nif (x !== 1) {\n $ERROR('#8: x = new String(\"1\"); x &= new Boolean(true); x === 1. Actual: ' + (x));\n}\n",
+ "id": "S11.13.2_A4.9_T2.5"
+ },
+ {
+ "section": "11.13.2, 11.10.1",
+ "description": "Type(x) is different from Type(y) and both types vary between String (primitive or object) and Undefined",
+ "test": "//CHECK#1\nx = \"1\";\nx &= undefined;\nif (x !== 0) {\n $ERROR('#1: x = \"1\"; x &= undefined; x === 0. Actual: ' + (x));\n}\n\n//CHECK#2\nx = undefined;\nx &= \"1\";\nif (x !== 0) {\n $ERROR('#2: x = undefined; x &= \"1\"; x === 0. Actual: ' + (x));\n}\n\n//CHECK#3\nx = new String(\"1\");\nx &= undefined;\nif (x !== 0) {\n $ERROR('#3: x = new String(\"1\"); x &= undefined; x === 0. Actual: ' + (x));\n}\n\n//CHECK#4\nx = undefined;\nx &= new String(\"1\");\nif (x !== 0) {\n $ERROR('#4: x = undefined; x &= new String(\"1\"); x === 0. Actual: ' + (x));\n}\n",
+ "id": "S11.13.2_A4.9_T2.6"
+ },
+ {
+ "section": "11.13.2, 11.10.1",
+ "description": "Type(x) is different from Type(y) and both types vary between String (primitive or object) and Null",
+ "test": "//CHECK#1\nx = \"1\";\nx &= null;\nif (x !== 0) {\n $ERROR('#1: x = \"1\"; x &= null; x === 0. Actual: ' + (x));\n}\n\n//CHECK#2\nx = null;\nx &= \"1\";\nif (x !== 0) {\n $ERROR('#2: x = null; x &= \"1\"; x === 0. Actual: ' + (x));\n}\n\n//CHECK#3\nx = new String(\"1\");\nx &= null;\nif (x !== 0) {\n $ERROR('#3: x = new String(\"1\"); x &= null; x === 0. Actual: ' + (x));\n}\n\n//CHECK#4\nx = null;\nx &= new String(\"1\");\nif (x !== 0) {\n $ERROR('#4: x = null; x &= new String(\"1\"); x === 0. Actual: ' + (x));\n}\n",
+ "id": "S11.13.2_A4.9_T2.7"
+ },
+ {
+ "section": "11.13.2, 11.10.1",
+ "description": "Type(x) is different from Type(y) and both types vary between Boolean (primitive or object) and Undefined",
+ "test": "//CHECK#1\nx = true;\nx &= undefined;\nif (x !== 0) {\n $ERROR('#1: x = true; x &= undefined; x === 0. Actual: ' + (x));\n}\n\n//CHECK#2\nx = undefined;\nx &= true;\nif (x !== 0) {\n $ERROR('#2: x = undefined; x &= true; x === 0. Actual: ' + (x));\n}\n\n//CHECK#3\nx = new Boolean(true);\nx &= undefined;\nif (x !== 0) {\n $ERROR('#3: x = new Boolean(true); x &= undefined; x === 0. Actual: ' + (x));\n}\n\n//CHECK#4\nx = undefined;\nx &= new Boolean(true);\nif (x !== 0) {\n $ERROR('#4: x = undefined; x &= new Boolean(true); x === 0. Actual: ' + (x));\n}\n",
+ "id": "S11.13.2_A4.9_T2.8"
+ },
+ {
+ "section": "11.13.2, 11.10.1",
+ "description": "Type(x) is different from Type(y) and both types vary between Boolean (primitive or object) and Null",
+ "test": "//CHECK#1\nx = true;\nx &= null;\nif (x !== 0) {\n $ERROR('#1: x = true; x &= null; x === 0. Actual: ' + (x));\n}\n\n//CHECK#2\nx = null;\nx &= true;\nif (x !== 0) {\n $ERROR('#2: x = null; x &= true; x === 0. Actual: ' + (x));\n}\n\n//CHECK#3\nx = new Boolean(true);\nx &= null;\nif (x !== 0) {\n $ERROR('#3: x = new Boolean(true); x &= null; x === 0. Actual: ' + (x));\n}\n\n//CHECK#4\nx = null;\nx &= new Boolean(true);\nif (x !== 0) {\n $ERROR('#4: x = null; x &= new Boolean(true); x === 0. Actual: ' + (x));\n}\n",
+ "id": "S11.13.2_A4.9_T2.9"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/11.14_Comma_Operator.json b/website/resources/scripts/testcases2/11.14_Comma_Operator.json
new file mode 100644
index 000000000..6cbcf5153
--- /dev/null
+++ b/website/resources/scripts/testcases2/11.14_Comma_Operator.json
@@ -0,0 +1,38 @@
+{
+ "testCollection": {
+ "name": "11.14_Comma_Operator",
+ "numTests": 5,
+ "tests": [
+ {
+ "section": "11.14",
+ "description": "Checking by using eval",
+ "test": "//CHECK#1\nif ((eval(\"false\\u0009,\\u0009true\")) !== true) {\n $ERROR('#1: (false\\\\u0009,\\\\u0009true) === true');\n}\n\n//CHECK#2\nif ((eval(\"false\\u000B,\\u000Btrue\")) !== true) {\n $ERROR('#2: (false\\\\u000B,\\\\u000Btrue) === true'); \n}\n\n//CHECK#3\nif ((eval(\"false\\u000C,\\u000Ctrue\")) !== true) {\n $ERROR('#3: (false\\\\u000C,\\\\u000Ctrue) === true');\n}\n\n//CHECK#4\nif ((eval(\"false\\u0020,\\u0020true\")) !== true) {\n $ERROR('#4: (false\\\\u0020,\\\\u0020true) === true');\n}\n\n//CHECK#5\nif ((eval(\"false\\u00A0,\\u00A0true\")) !== true) {\n $ERROR('#5: (false\\\\u00A0,\\\\u00A0true) === true');\n}\n\n//CHECK#6\nif ((eval(\"false\\u000A,\\u000Atrue\")) !== true) {\n $ERROR('#6: (false\\\\u000A,\\\\u000Atrue) === true'); \n}\n\n//CHECK#7\nif ((eval(\"false\\u000D,\\u000Dtrue\")) !== true) {\n $ERROR('#7: (false\\\\u000D,\\\\u000Dtrue) === true');\n}\n\n//CHECK#8\nif ((eval(\"false\\u2028,\\u2028true\")) !== true) {\n $ERROR('#8: (false\\\\u2028,\\\\u2028true) === true');\n}\n\n//CHECK#9\nif ((eval(\"false\\u2029,\\u2029true\")) !== true) {\n $ERROR('#9: (false\\\\u2029,\\\\u2029true) === true');\n}\n\n\n//CHECK#10\nif ((eval(\"false\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u2029,\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u2029true\")) !== true) {\n $ERROR('#10: (false\\\\u0009\\\\u000B\\\\u000C\\\\u0020\\\\u00A0\\\\u000A\\\\u000D\\\\u2028\\\\u2029,\\\\u0009\\\\u000B\\\\u000C\\\\u0020\\\\u00A0\\\\u000A\\\\u000D\\\\u2028\\\\u2029true) === true');\n}\n",
+ "id": "S11.14_A1"
+ },
+ {
+ "section": "11.14",
+ "description": "Either Expression is not Reference or GetBase is not null",
+ "test": "//CHECK#1\nif ((1,2) !== 2) {\n $ERROR('#1: (1,2) === 2. Actual: ' + ((1,2)));\n}\n\n//CHECK#2\nvar x = 1;\nif ((x, 2) !== 2) {\n $ERROR('#2: var x = 1; (x, 2) === 2. Actual: ' + ((x, 2)));\n}\n\n//CHECK#3\nvar y = 2;\nif ((1, y) !== 2) {\n $ERROR('#3: var y = 2; (1, y) === 2. Actual: ' + ((1, y)));\n}\n\n//CHECK#4\nvar x = 1;\nvar y = 2;\nif ((x, y) !== 2) {\n $ERROR('#4: var x = 1; var y = 2; (x, y) === 2. Actual: ' + ((x, y)));\n}\n\n//CHECK#5\nvar x = 1;\nif ((x, x) !== 1) {\n $ERROR('#5: var x = 1; (x, x) === 1. Actual: ' + ((x, x)));\n}\n\n//CHECK#6\nvar objectx = new Object();\nvar objecty = new Object();\nobjectx.prop = true;\nobjecty.prop = 1.1;\nif ((objectx.prop = false, objecty.prop) !== objecty.prop) {\n $ERROR('#6: var objectx = new Object(); var objecty = new Object(); objectx.prop = true; objecty.prop = 1; (objectx.prop = false, objecty.prop) === objecty.prop. Actual: ' + ((objectx.prop = false, objecty.prop)));\n} else {\n if (objectx.prop !== false) {\n $ERROR('#6: var objectx = new Object(); var objecty = new Object(); objectx.prop = true; objecty.prop = 1; objectx.prop = false, objecty.prop; objectx.prop === false');\n } \n}\n\n",
+ "id": "S11.14_A2.1_T1"
+ },
+ {
+ "section": "11.14",
+ "description": "If GetBase(Expression) is null, throw ReferenceError",
+ "test": "//CHECK#1\ntry {\n x, 1;\n $ERROR('#1.1: x, 1 throw ReferenceError. Actual: ' + (x, 1)); \n}\ncatch (e) {\n if ((e instanceof ReferenceError) !== true) {\n $ERROR('#1.2: x, 1 throw ReferenceError. Actual: ' + (e)); \n }\n}\n",
+ "id": "S11.14_A2.1_T2"
+ },
+ {
+ "section": "11.14",
+ "description": "If GetBase(AssigmentExpression) is null, throw ReferenceError",
+ "test": "//CHECK#1\ntry {\n 1, y;\n $ERROR('#1.1: 1, y throw ReferenceError. Actual: ' + (1, y)); \n}\ncatch (e) {\n if ((e instanceof ReferenceError) !== true) {\n $ERROR('#1.2: 1, y throw ReferenceError. Actual: ' + (e)); \n }\n}\n",
+ "id": "S11.14_A2.1_T3"
+ },
+ {
+ "section": "11.14",
+ "description": "Checking with \"=\"",
+ "test": "//CHECK#1\nvar x = 0;\nvar y = 0;\nvar z = 0;\nif ((x = 1, y = 2, z = 3) !== 3) {\n $ERROR('#1: var x = 0; var y = 0; var z = 0; (x = 1, y = 2, z = 3) === 3. Actual: ' + ((x = 1, y = 2, z = 3)));\n}\n\nvar x = 0;\nvar y = 0;\nvar z = 0;\nx = 1, y = 2, z = 3;\n\n//CHECK#2\nif (x !== 1) {\n $ERROR('#2: var x = 0; var y = 0; var z = 0; x = 1, y = 2, z = 3; x === 1. Actual: ' + (x));\n}\n\n//CHECK#3\nif (y !== 2) {\n $ERROR('#3: var x = 0; var y = 0; var z = 0; x = 1, y = 2, z = 3; y === 2. Actual: ' + (y));\n}\n\n//CHECK#4\nif (z !== 3) {\n $ERROR('#4: var x = 0; var y = 0; var z = 0; x = 1, y = 2, z = 3; z === 3. Actual: ' + (z));\n}\n",
+ "id": "S11.14_A3"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/11.2.1_Property_Accessors.json b/website/resources/scripts/testcases2/11.2.1_Property_Accessors.json
new file mode 100644
index 000000000..e8615fdee
--- /dev/null
+++ b/website/resources/scripts/testcases2/11.2.1_Property_Accessors.json
@@ -0,0 +1,110 @@
+{
+ "testCollection": {
+ "name": "11.2.1_Property_Accessors",
+ "numTests": 17,
+ "tests": [
+ {
+ "section": "11.2.1, 7.2, 7.3",
+ "description": "Checking by using eval",
+ "test": "//CHECK#1\nif (eval(\"Number\\u0009.\\u0009POSITIVE_INFINITY\") !== Number.POSITIVE_INFINITY) {\n $ERROR('#1: Number\\\\u0009.\\\\u0009POSITIVE_INFINITY === Number.POSITIVE_INFINITY');\n}\n\n//CHECK#2\nif (eval(\"Number\\u000B.\\u000BPOSITIVE_INFINITY\") !== Number.POSITIVE_INFINITY) {\n $ERROR('#2: Number\\\\u000B.\\\\u000BPOSITIVE_INFINITY === Number.POSITIVE_INFINITY'); \n}\n\n//CHECK#3\nif (eval(\"Number\\u000C.\\u000CPOSITIVE_INFINITY\") !== Number.POSITIVE_INFINITY) {\n $ERROR('#3: Number\\\\u000C.\\\\u000CPOSITIVE_INFINITY === Number.POSITIVE_INFINITY');\n}\n\n//CHECK#4\nif (eval(\"Number\\u0020.\\u0020POSITIVE_INFINITY\") !== Number.POSITIVE_INFINITY) {\n $ERROR('#4: Number\\\\u0020.\\\\u0020POSITIVE_INFINITY === Number.POSITIVE_INFINITY');\n}\n\n//CHECK#5\nif (eval(\"Number\\u00A0.\\u00A0POSITIVE_INFINITY\") !== Number.POSITIVE_INFINITY) {\n $ERROR('#5: Number\\\\u00A0.\\\\u00A0POSITIVE_INFINITY === Number.POSITIVE_INFINITY');\n}\n\n//CHECK#6\nif (eval(\"Number\\u000A.\\u000APOSITIVE_INFINITY\") !== Number.POSITIVE_INFINITY) {\n $ERROR('#6: Number\\\\u000A.\\\\u000APOSITIVE_INFINITY === Number.POSITIVE_INFINITY'); \n}\n\n//CHECK#7\nif (eval(\"Number\\u000D.\\u000DPOSITIVE_INFINITY\") !== Number.POSITIVE_INFINITY) {\n $ERROR('#7: Number\\\\u000D.\\\\u000DPOSITIVE_INFINITY === Number.POSITIVE_INFINITY');\n}\n\n//CHECK#8\nif (eval(\"Number\\u2028.\\u2028POSITIVE_INFINITY\") !== Number.POSITIVE_INFINITY) {\n $ERROR('#8: Number\\\\u2028.\\\\u2028POSITIVE_INFINITY === Number.POSITIVE_INFINITY');\n}\n\n//CHECK#9\nif (eval(\"Number\\u2029.\\u2029POSITIVE_INFINITY\") !== Number.POSITIVE_INFINITY) {\n $ERROR('#9: Number\\\\u2029.\\\\u2029POSITIVE_INFINITY === Number.POSITIVE_INFINITY');\n}\n\n//CHECK#10\nif (eval(\"Number\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u2029.\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u2029POSITIVE_INFINITY\") !== Number.POSITIVE_INFINITY) {\n $ERROR('#10: Number\\\\u0009\\\\u000B\\\\u000C\\\\u0020\\\\u00A0\\\\u000A\\\\u000D\\\\u2028\\\\u2029.\\\\u0009\\\\u000B\\\\u000C\\\\u0020\\\\u00A0\\\\u000A\\\\u000D\\\\u2028\\\\u2029POSITIVE_INFINITY === Number.POSITIVE_INFINITY');\n}\n",
+ "id": "S11.2.1_A1.1"
+ },
+ {
+ "section": "11.2.1, 7.2, 7.3",
+ "description": "Checking by using eval",
+ "test": "//CHECK#1\nif (eval('Number[\\u0009\"POSITIVE_INFINITY\"\\u0009]') !== Number.POSITIVE_INFINITY) {\n $ERROR('#1: Number[\\\\u0009\"POSITIVE_INFINITY\"\\\\u0009] === Number.POSITIVE_INFINITY');\n}\n\n//CHECK#2\nif (eval('Number[\\u000B\"POSITIVE_INFINITY\"\\u000B]') !== Number.POSITIVE_INFINITY) {\n $ERROR('#2: Number[\\\\u000B\"POSITIVE_INFINITY\"\\\\u000B] === Number.POSITIVE_INFINITY'); \n}\n\n//CHECK#3\nif (eval('Number[\\u000C\"POSITIVE_INFINITY\"\\u000C]') !== Number.POSITIVE_INFINITY) {\n $ERROR('#3: Number[\\\\u000C\"POSITIVE_INFINITY\"\\\\u000C] === Number.POSITIVE_INFINITY');\n}\n\n//CHECK#4\nif (eval('Number[\\u0020\"POSITIVE_INFINITY\"\\u0020]') !== Number.POSITIVE_INFINITY) {\n $ERROR('#4: Number[\\\\u0020\"POSITIVE_INFINITY\"\\\\u0020] === Number.POSITIVE_INFINITY');\n}\n\n//CHECK#5\nif (eval('Number[\\u00A0\"POSITIVE_INFINITY\"\\u00A0]') !== Number.POSITIVE_INFINITY) {\n $ERROR('#5: Number[\\\\u00A0\"POSITIVE_INFINITY\"\\\\u00A0] === Number.POSITIVE_INFINITY');\n}\n\n//CHECK#6\nif (eval('Number[\\u000A\"POSITIVE_INFINITY\"\\u000A]') !== Number.POSITIVE_INFINITY) {\n $ERROR('#6: Number[\\\\u000A\"POSITIVE_INFINITY\"\\\\u000A] === Number.POSITIVE_INFINITY'); \n}\n\n//CHECK#7\nif (eval('Number[\\u000D\"POSITIVE_INFINITY\"\\u000D]') !== Number.POSITIVE_INFINITY) {\n $ERROR('#7: Number[\\\\u000D\"POSITIVE_INFINITY\"\\\\u000D] === Number.POSITIVE_INFINITY');\n}\n\n//CHECK#8\nif (eval('Number[\\u2028\"POSITIVE_INFINITY\"\\u2028]') !== Number.POSITIVE_INFINITY) {\n $ERROR('#8: Number[\\\\u2028\"POSITIVE_INFINITY\"\\\\u2028] === Number.POSITIVE_INFINITY');\n}\n\n//CHECK#9\nif (eval('Number[\\u2029\"POSITIVE_INFINITY\"\\u2029]') !== Number.POSITIVE_INFINITY) {\n $ERROR('#9: Number[\\\\u2029\"POSITIVE_INFINITY\"\\\\u2029] === Number.POSITIVE_INFINITY');\n}\n\n//CHECK#10\nif (eval('Number[\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u2029\"POSITIVE_INFINITY\"\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u2029]') !== Number.POSITIVE_INFINITY) {\n $ERROR('#10: Number[\\\\u0009\\\\u000B\\\\u000C\\\\u0020\\\\u00A0\\\\u000A\\\\u000D\\\\u2028\\\\u2029\"POSITIVE_INFINITY\"\\\\u0009\\\\u000B\\\\u000C\\\\u0020\\\\u00A0\\\\u000A\\\\u000D\\\\u2028\\\\u2029] === Number.POSITIVE_INFINITY');\n}\n",
+ "id": "S11.2.1_A1.2"
+ },
+ {
+ "section": "11.2.1",
+ "description": "If GetBase(MemberExpression or CallExpression) is null, throw ReferenceError",
+ "test": "//CHECK#1\ntry {\n object[1];\n $ERROR('#1.1: object[1] throw ReferenceError. Actual: ' + (object[1])); \n}\ncatch (e) {\n if ((e instanceof ReferenceError) !== true) {\n $ERROR('#1.2: object[1] throw ReferenceError. Actual: ' + (e)); \n }\n}\n\n//CHECK#2\ntry {\n object.prop;\n $ERROR('#2.1: object.prop throw ReferenceError. Actual: ' + (object.prop)); \n}\ncatch (e) {\n if ((e instanceof ReferenceError) !== true) {\n $ERROR('#2.2: object.prop throw ReferenceError. Actual: ' + (e)); \n }\n}\n",
+ "id": "S11.2.1_A2"
+ },
+ {
+ "section": "11.2.1, 9.9, 11.2.3, 15.6.4.2",
+ "description": "Checking Boolean case",
+ "test": "//CHECK#1\nif (true.toString() !== \"true\") {\n $ERROR('#1: true.toString() === \"true\". Actual: ' + (true.toString()));\n}\n\n//CHECK#2\nif (false[\"toString\"]() !== \"false\") {\n $ERROR('#2: false[\"toString\"]() === \"false\". Actual: ' + (false[\"toString\"]()));\n}\n\n//CHECK#3\nif (new Boolean(true).toString() !== \"true\") {\n $ERROR('#3: new Boolean(true).toString() === \"true\". Actual: ' + (new Boolean(true).toString()));\n}\n\n//CHECK#4\nif (new Boolean(false)[\"toString\"]() !== \"false\") {\n $ERROR('#4: new Boolean(false)[\"toString\"]() === \"false\". Actual: ' + (new Boolean(false)[\"toString\"]()));\n} \n",
+ "id": "S11.2.1_A3_T1"
+ },
+ {
+ "section": "11.2.1, 9.9, 11.2.3, 15.6.4.2",
+ "description": "Checking Number case",
+ "test": "//CHECK#1\nif (1..toString() !== \"1\") {\n $ERROR('#1: 1..toString() === \"1\". Actual: ' + (1..toString()));\n}\n\n//CHECK#2\nif (1.1.toFixed(5) !== \"1.10000\") {\n $ERROR('#2: 1.1.toFixed(5) === \"1.10000\". Actual: ' + (1.1.toFixed(5)));\n}\n\n//CHECK#3\nif (1[\"toString\"]() !== \"1\") {\n $ERROR('#3: 1[\"toString\"]() === \"1\". Actual: ' + (1[\"toString\"]()));\n}\n\n//CHECK#4\nif (1.[\"toFixed\"](5) !== \"1.00000\") {\n $ERROR('#4: 1.[\"toFixed\"](5) === \"1.00000\". Actual: ' + (1.[\"toFixed\"](5)));\n}\n\n//CHECK#5\nif (new Number(1).toString() !== \"1\") {\n $ERROR('#5: new Number(1).toString() === \"1\". Actual: ' + (new Number(1).toString()));\n}\n\n//CHECK#6\nif (new Number(1)[\"toFixed\"](5) !== \"1.00000\") {\n $ERROR('#6: new Number(1)[\"toFixed\"](5) === \"1.00000\". Actual: ' + (new Number(1)[\"toFixed\"](5)));\n} \n",
+ "id": "S11.2.1_A3_T2"
+ },
+ {
+ "section": "11.2.1, 9.9, 11.2.3, 15.6.4.2",
+ "description": ": Checking String case;",
+ "test": "//CHECK#1\nif (\"abc123\".charAt(5) !== \"3\") {\n $ERROR('#1: \"abc123\".charAt(5) === \"3\". Actual: ' + (\"abc123\".charAt(5)));\n}\n\n//CHECK#2\nif (\"abc123\"[\"charAt\"](0) !== \"a\") {\n $ERROR('#2: \"abc123\"[\"charAt\"](0) === \"a\". Actual: ' + (\"abc123\"[\"charAt\"](0)));\n}\n\n//CHECK#3\nif (\"abc123\".length !== 6) {\n $ERROR('#3: \"abc123\".length === 6. Actual: ' + (\"abc123\".length));\n}\n\n//CHECK#4\nif (\"abc123\"[\"length\"] !== 6) {\n $ERROR('#4: \"abc123\"[\"length\"] === 6. Actual: ' + (\"abc123\"[\"length\"]));\n}\n\n//CHECK#5\nif (new String(\"abc123\").length !== 6) {\n $ERROR('#5: new String(\"abc123\").length === 6. Actual: ' + (new String(\"abc123\").length));\n}\n\n//CHECK#6\nif (new String(\"abc123\")[\"charAt\"](2) !== \"c\") {\n $ERROR('#6: new String(\"abc123\")[\"charAt\"](2) === \"c\". Actual: ' + (new String(\"abc123\")[\"charAt\"](2)));\n} \n",
+ "id": "S11.2.1_A3_T3"
+ },
+ {
+ "section": "11.2.1, 9.9, 11.2.3, 15.6.4.2",
+ "description": "Checking \"undefined\" case",
+ "test": "//CHECK#1\ntry {\n undefined.toString();\n $ERROR('#1.1: undefined.toString() throw TypeError. Actual: ' + (undefined.toString())); \n}\ncatch (e) {\n if ((e instanceof TypeError) !== true) {\n $ERROR('#1.2: undefined.toString() throw TypeError. Actual: ' + (e)); \n }\n}\n\n//CHECK#2\ntry { \n undefined[\"toString\"]();\n $ERROR('#2.1: undefined[\"toString\"]() throw TypeError. Actual: ' + (undefined[\"toString\"]())); \n}\ncatch (e) {\n if ((e instanceof TypeError) !== true) {\n $ERROR('#2.2: undefined[\"toString\"]() throw TypeError. Actual: ' + (e)); \n }\n}\n",
+ "id": "S11.2.1_A3_T4"
+ },
+ {
+ "section": "11.2.1, 9.9, 11.2.3, 15.6.4.2",
+ "description": "Checking \"null\" case",
+ "test": "//CHECK#1\ntry {\n null.toString();\n $ERROR('#1.1: null.toString() throw TypeError. Actual: ' + (null.toString())); \n}\ncatch (e) {\n if ((e instanceof TypeError) !== true) {\n $ERROR('#1.2: null.toString() throw TypeError. Actual: ' + (e)); \n }\n}\n\n//CHECK#2\ntry { \n null[\"toString\"]();\n $ERROR('#2.1: null[\"toString\"]() throw TypeError. Actual: ' + (null[\"toString\"]())); \n}\ncatch (e) {\n if ((e instanceof TypeError) !== true) {\n $ERROR('#2.2: null[\"toString\"]() throw TypeError. Actual: ' + (e)); \n }\n}\n",
+ "id": "S11.2.1_A3_T5"
+ },
+ {
+ "section": "11.2.1",
+ "description": "Checking properties of this object",
+ "test": "//CHECK#1-32\nif (typeof (this.NaN) === \"undefined\") $ERROR('#1: typeof (this.NaN) !== \"undefined\"');\nif (typeof this['NaN'] === \"undefined\") $ERROR('#2: typeof this[\"NaN\"] !== \"undefined\"');\nif (typeof this.Infinity === \"undefined\") $ERROR('#3: typeof this.Infinity !== \"undefined\"');\nif (typeof this['Infinity'] === \"undefined\") $ERROR('#4: typeof this[\"Infinity\"] !== \"undefined\"');\nif (typeof this.parseInt === \"undefined\") $ERROR('#5: typeof this.parseInt !== \"undefined\"');\nif (typeof this['parseInt'] === \"undefined\") $ERROR('#6: typeof this[\"parseInt\"] !== \"undefined\"');\nif (typeof this.parseFloat === \"undefined\") $ERROR('#7: typeof this.parseFloat !== \"undefined\"');\nif (typeof this['parseFloat'] === \"undefined\") $ERROR('#8: typeof this[\"parseFloat\"] !== \"undefined\"');\nif (typeof this.escape === \"undefined\") $ERROR('#9: typeof this.escape !== \"undefined\"');\nif (typeof this['escape'] === \"undefined\") $ERROR('#10: typeof this[\"escape\"] !== \"undefined\"');\nif (typeof this.unescape === \"undefined\") $ERROR('#11: typeof this.unescape !== \"undefined\"');\nif (typeof this['unescape'] === \"undefined\") $ERROR('#12: typeof this[\"unescape\"] !== \"undefined\"');\nif (typeof this.isNaN === \"undefined\") $ERROR('#13: typeof this.isNaN !== \"undefined\"');\nif (typeof this['isNaN'] === \"undefined\") $ERROR('#14: typeof this[\"isNaN\"] !== \"undefined\"');\nif (typeof this.isFinite === \"undefined\") $ERROR('#15: typeof this.isFinite !== \"undefined\"');\nif (typeof this['isFinite'] === \"undefined\") $ERROR('#16: typeof this[\"isFinite\"] !== \"undefined\"');\nif (typeof this.Object === \"undefined\") $ERROR('#17: typeof this.Object !== \"undefined\"');\nif (typeof this['Object'] === \"undefined\") $ERROR('#18: typeof this[\"Object\"] !== \"undefined\"');\nif (typeof this.Number === \"undefined\") $ERROR('#19: typeof this.Number !== \"undefined\"');\nif (typeof this['Number'] === \"undefined\") $ERROR('#20: typeof this[\"Number\"] !== \"undefined\"');\nif (typeof this.Function === \"undefined\") $ERROR('#21: typeof this.Function !== \"undefined\"');\nif (typeof this['Function'] === \"undefined\") $ERROR('#22: typeof this[\"Function\"] !== \"undefined\"');\nif (typeof this.Array === \"undefined\") $ERROR('#23: typeof this.Array !== \"undefined\"');\nif (typeof this['Array'] === \"undefined\") $ERROR('#24: typeof this[\"Array\"] !== \"undefined\"');\nif (typeof this.String === \"undefined\") $ERROR('#25: typeof this.String !== \"undefined\"');\nif (typeof this['String'] === \"undefined\") $ERROR('#26: typeof this[\"String\"] !== \"undefined\"');\nif (typeof this.Boolean === \"undefined\") $ERROR('#27: typeof this.Boolean !== \"undefined\"');\nif (typeof this['Boolean'] === \"undefined\") $ERROR('#28: typeof this[\"Boolean\"] !== \"undefined\"');\nif (typeof this.Date === \"undefined\") $ERROR('#29: typeof this.Date !== \"undefined\"');\nif (typeof this['Date'] === \"undefined\") $ERROR('#30: typeof this[\"Date\"] !== \"undefined\"');\nif (typeof this.Math === \"undefined\") $ERROR('#31: typeof this.Math !== \"undefined\"');\nif (typeof this['Math'] === \"undefined\") $ERROR('#32: typeof this[\"Math\"] !== \"undefined\"');\n",
+ "id": "S11.2.1_A4_T1"
+ },
+ {
+ "section": "11.2.1",
+ "description": "Checking properties and methods of Object objects",
+ "test": "//CHECK#1-8\nif (typeof Object.prototype !== \"object\") $ERROR('#1: typeof Object.prototype === \"object\". Actual: ' + (typeof Object.prototype ));\nif (typeof Object['prototype'] !== \"object\") $ERROR('#2: typeof Object[\"prototype\"] === \"object\". Actual: ' + (typeof Object[\"prototype\"] ));\nif (typeof Object.toString !== \"function\") $ERROR('#3: typeof Object.toString === \"function\". Actual: ' + (typeof Object.toString ));\nif (typeof Object['toString'] !== \"function\") $ERROR('#4: typeof Object[\"toString\"] === \"function\". Actual: ' + (typeof Object[\"toString\"] ));\nif (typeof Object.valueOf !== \"function\") $ERROR('#5: typeof Object.valueOf === \"function\". Actual: ' + (typeof Object.valueOf ));\nif (typeof Object['valueOf'] !== \"function\") $ERROR('#6: typeof Object[\"valueOf\"] === \"function\". Actual: ' + (typeof Object[\"valueOf\"] ));\nif (typeof Object.constructor !== \"function\") $ERROR('#7: typeof Object.constructor === \"function\". Actual: ' + (typeof Object.constructor ));\nif (typeof Object['constructor'] !== \"function\") $ERROR('#8: typeof Object[\"constructor\"] === \"function\". Actual: ' + (typeof Object[\"constructor\"] ));\n",
+ "id": "S11.2.1_A4_T2"
+ },
+ {
+ "section": "11.2.1",
+ "description": "Checking properties of the Function object",
+ "test": "//CHECK#1-8\nif (typeof Function.prototype !== \"function\") $ERROR('#1: typeof Function.prototype === \"function\". Actual: ' + (typeof Function.prototype ));\nif (typeof Function['prototype'] !== \"function\") $ERROR('#2: typeof Function[\"prototype\"] === \"function\". Actual: ' + (typeof Function[\"prototype\"] ));\nif (typeof Function.prototype.toString !== \"function\") $ERROR('#3: typeof Function.prototype.toString === \"function\". Actual: ' + (typeof Function.prototype.toString ));\nif (typeof Function.prototype['toString'] !== \"function\") $ERROR('#4: typeof Function.prototype[\"toString\"] === \"function\". Actual: ' + (typeof Function.prototype[\"toString\"] ));\nif (typeof Function.prototype.length !== \"number\") $ERROR('#5: typeof Function.prototype.length === \"number\". Actual: ' + (typeof Function.prototype.length ));\nif (typeof Function.prototype['length'] !== \"number\") $ERROR('#6: typeof Function.prototype[\"length\"] === \"number\". Actual: ' + (typeof Function.prototype[\"length\"] ));\nif (typeof Function.prototype.valueOf !== \"function\") $ERROR('#7: typeof Function.prototype.valueOf === \"function\". Actual: ' + (typeof Function.prototype.valueOf ));\nif (typeof Function.prototype['valueOf'] !== \"function\") $ERROR('#8: typeof Function.prototype[\"valueOf\"] === \"function\". Actual: ' + (typeof Function.prototype[\"valueOf\"] ));\n",
+ "id": "S11.2.1_A4_T3"
+ },
+ {
+ "section": "11.2.1",
+ "description": "Checking properties of the Array object",
+ "test": "//CHECK#1-8\nif (typeof Array.prototype !== \"object\") $ERROR('#1: typeof Array.prototype === \"object\". Actual: ' + (typeof Array.prototype ));\nif (typeof Array['prototype'] !== \"object\") $ERROR('#2: typeof Array[\"prototype\"] === \"object\". Actual: ' + (typeof Array[\"prototype\"] ));\nif (typeof Array.length !== \"number\") $ERROR('#3: typeof Array.length === \"number\". Actual: ' + (typeof Array.length ));\nif (typeof Array['length'] !== \"number\") $ERROR('#4: typeof Array[\"length\"] === \"number\". Actual: ' + (typeof Array[\"length\"] ));\nif (typeof Array.prototype.constructor !== \"function\") $ERROR('#5: typeof Array.prototype.constructor === \"function\". Actual: ' + (typeof Array.prototype.constructor ));\nif (typeof Array.prototype['constructor'] !== \"function\") $ERROR('#6: typeof Array.prototype[\"constructor\"] === \"function\". Actual: ' + (typeof Array.prototype[\"constructor\"] ));\nif (typeof Array.prototype.toString !== \"function\") $ERROR('#7: typeof Array.prototype.toString === \"function\". Actual: ' + (typeof Array.prototype.toString ));\nif (typeof Array.prototype['toString'] !== \"function\") $ERROR('#8: typeof Array.prototype[\"toString\"] === \"function\". Actual: ' + (typeof Array.prototype[\"toString\"] ));\nif (typeof Array.prototype.join !== \"function\") $ERROR('#9: typeof Array.prototype.join === \"function\". Actual: ' + (typeof Array.prototype.join ));\nif (typeof Array.prototype['join'] !== \"function\") $ERROR('#10: typeof Array.prototype[\"join\"] === \"function\". Actual: ' + (typeof Array.prototype[\"join\"] ));\nif (typeof Array.prototype.reverse !== \"function\") $ERROR('#11: typeof Array.prototype.reverse === \"function\". Actual: ' + (typeof Array.prototype.reverse ));\nif (typeof Array.prototype['reverse'] !== \"function\") $ERROR('#12: typeof Array.prototype[\"reverse\"] === \"function\". Actual: ' + (typeof Array.prototype[\"reverse\"] ));\nif (typeof Array.prototype.sort !== \"function\") $ERROR('#13: typeof Array.prototype.sort === \"function\". Actual: ' + (typeof Array.prototype.sort ));\nif (typeof Array.prototype['sort'] !== \"function\") $ERROR('#14: typeof Array.prototype[\"sort\"] === \"function\". Actual: ' + (typeof Array.prototype[\"sort\"] ));\n\n",
+ "id": "S11.2.1_A4_T4"
+ },
+ {
+ "section": "11.2.1",
+ "description": "Checking properties of the String object",
+ "test": "//CHECK#1-28\nif (typeof String.prototype !== \"object\") $ERROR('#1: typeof String.prototype === \"object\". Actual: ' + (typeof String.prototype ));\nif (typeof String['prototype'] !== \"object\") $ERROR('#2: typeof String[\"prototype\"] === \"object\". Actual: ' + (typeof String[\"prototype\"] ));\nif (typeof String.fromCharCode !== \"function\") $ERROR('#3: typeof String.fromCharCode === \"function\". Actual: ' + (typeof String.fromCharCode ));\nif (typeof String['fromCharCode'] !== \"function\") $ERROR('#4: typeof String[\"fromCharCode\"] === \"function\". Actual: ' + (typeof String[\"fromCharCode\"] ));\nif (typeof String.prototype.toString !== \"function\") $ERROR('#5: typeof String.prototype.toString === \"function\". Actual: ' + (typeof String.prototype.toString ));\nif (typeof String.prototype['toString'] !== \"function\") $ERROR('#6: typeof String.prototype[\"toString\"] === \"function\". Actual: ' + (typeof String.prototype[\"toString\"] ));\nif (typeof String.prototype.constructor !== \"function\") $ERROR('#7: typeof String.prototype.constructor === \"function\". Actual: ' + (typeof String.prototype.constructor ));\nif (typeof String.prototype['constructor'] !== \"function\") $ERROR('#8: typeof String.prototype[\"constructor\"] === \"function\". Actual: ' + (typeof String.prototype[\"constructor\"] ));\nif (typeof String.prototype.valueOf !== \"function\") $ERROR('#9: typeof String.prototype.valueOf === \"function\". Actual: ' + (typeof String.prototype.valueOf ));\nif (typeof String.prototype['valueOf'] !== \"function\") $ERROR('#10: typeof String.prototype[\"valueOf\"] === \"function\". Actual: ' + (typeof String.prototype[\"valueOf\"] ));\nif (typeof String.prototype.charAt !== \"function\") $ERROR('#11: typeof String.prototype.charAt === \"function\". Actual: ' + (typeof String.prototype.charAt ));\nif (typeof String.prototype['charAt'] !== \"function\") $ERROR('#12: typeof String.prototype[\"charAt\"] === \"function\". Actual: ' + (typeof String.prototype[\"charAt\"] ));\nif (typeof String.prototype.charCodeAt !== \"function\") $ERROR('#13: typeof String.prototype.charCodeAt === \"function\". Actual: ' + (typeof String.prototype.charCodeAt ));\nif (typeof String.prototype['charCodeAt'] !== \"function\") $ERROR('#14: typeof String.prototype[\"charCodeAt\"] === \"function\". Actual: ' + (typeof String.prototype[\"charCodeAt\"] ));\nif (typeof String.prototype.indexOf !== \"function\") $ERROR('#15: typeof String.prototype.indexOf === \"function\". Actual: ' + (typeof String.prototype.indexOf ));\nif (typeof String.prototype['indexOf'] !== \"function\") $ERROR('#16: typeof String.prototype[\"indexOf\"] === \"function\". Actual: ' + (typeof String.prototype[\"indexOf\"] ));\nif (typeof String.prototype.lastIndexOf !== \"function\") $ERROR('#17: typeof String.prototype.lastIndexOf === \"function\". Actual: ' + (typeof String.prototype.lastIndexOf ));\nif (typeof String.prototype['lastIndexOf'] !== \"function\") $ERROR('#18: typeof String.prototype[\"lastIndexOf\"] === \"function\". Actual: ' + (typeof String.prototype[\"lastIndexOf\"] ));\nif (typeof String.prototype.split !== \"function\") $ERROR('#19: typeof String.prototype.split === \"function\". Actual: ' + (typeof String.prototype.split ));\nif (typeof String.prototype['split'] !== \"function\") $ERROR('#20: typeof String.prototype[\"split\"] === \"function\". Actual: ' + (typeof String.prototype[\"split\"] ));\nif (typeof String.prototype.substring !== \"function\") $ERROR('#21: typeof String.prototype.substring === \"function\". Actual: ' + (typeof String.prototype.substring ));\nif (typeof String.prototype['substring'] !== \"function\") $ERROR('#22: typeof String.prototype[\"substring\"] === \"function\". Actual: ' + (typeof String.prototype[\"substring\"] ));\nif (typeof String.prototype.toLowerCase !== \"function\") $ERROR('#23: typeof String.prototype.toLowerCase === \"function\". Actual: ' + (typeof String.prototype.toLowerCase ));\nif (typeof String.prototype['toLowerCase'] !== \"function\") $ERROR('#24: typeof String.prototype[\"toLowerCase\"] === \"function\". Actual: ' + (typeof String.prototype[\"toLowerCase\"] ));\nif (typeof String.prototype.toUpperCase !== \"function\") $ERROR('#25: typeof String.prototype.toUpperCase === \"function\". Actual: ' + (typeof String.prototype.toUpperCase ));\nif (typeof String.prototype['toUpperCase'] !== \"function\") $ERROR('#26: typeof Array.prototype === \"object\". Actual: ' + (typeof Array.prototype ));\nif (typeof String.prototype.length !== \"number\") $ERROR('#27: typeof String.prototype.length === \"number\". Actual: ' + (typeof String.prototype.length ));\nif (typeof String.prototype['length'] !== \"number\") $ERROR('#28: typeof String.prototype[\"length\"] === \"number\". Actual: ' + (typeof String.prototype[\"length\"] ));\n\n",
+ "id": "S11.2.1_A4_T5"
+ },
+ {
+ "section": "11.2.1",
+ "description": "Checking properties of the Boolean object",
+ "test": "//CHECK#1-8\nif (typeof Boolean.prototype !== \"object\") $ERROR('#1: typeof Boolean.prototype === \"object\". Actual: ' + (typeof Boolean.prototype ));\nif (typeof Boolean['prototype'] !== \"object\") $ERROR('#2: typeof Boolean[\"prototype\"] === \"object\". Actual: ' + (typeof Boolean[\"prototype\"] ));\nif (typeof Boolean.constructor !== \"function\") $ERROR('#3: typeof Boolean.constructor === \"function\". Actual: ' + (typeof Boolean.constructor ));\nif (typeof Boolean['constructor'] !== \"function\") $ERROR('#4: typeof Boolean[\"constructor\"] === \"function\". Actual: ' + (typeof Boolean[\"constructor\"] ));\nif (typeof Boolean.prototype.valueOf !== \"function\") $ERROR('#5: typeof Boolean.prototype.valueOf === \"function\". Actual: ' + (typeof Boolean.prototype.valueOf ));\nif (typeof Boolean.prototype['valueOf'] !== \"function\") $ERROR('#6: typeof Boolean.prototype[\"valueOf\"] === \"function\". Actual: ' + (typeof Boolean.prototype[\"valueOf\"] ));\nif (typeof Boolean.prototype.toString !== \"function\") $ERROR('#7: typeof Boolean.prototype.toString === \"function\". Actual: ' + (typeof Boolean.prototype.toString ));\nif (typeof Boolean.prototype['toString'] !== \"function\") $ERROR('#8: typeof Boolean.prototype[\"toString\"] === \"function\". Actual: ' + (typeof Boolean.prototype[\"toString\"] ));\n\n",
+ "id": "S11.2.1_A4_T6"
+ },
+ {
+ "section": "11.2.1",
+ "description": "Checking properties of the Number object",
+ "test": "//CHECK#1-16\nif (typeof Number.MAX_VALUE !== \"number\") $ERROR('#1: typeof Number.MAX_VALUE === \"number\". Actual: ' + (typeof Number.MAX_VALUE ));\nif (typeof Number['MAX_VALUE'] !== \"number\") $ERROR('#2: typeof Number[\"MAX_VALUE\"] === \"number\". Actual: ' + (typeof Number[\"MAX_VALUE\"] ));\nif (typeof Number.MIN_VALUE !== \"number\") $ERROR('#3: typeof Number.MIN_VALUE === \"number\". Actual: ' + (typeof Number.MIN_VALUE ));\nif (typeof Number['MIN_VALUE'] !== \"number\") $ERROR('#4: typeof Number[\"MIN_VALUE\"] === \"number\". Actual: ' + (typeof Number[\"MIN_VALUE\"] ));\nif (typeof Number.NaN !== \"number\") $ERROR('#5: typeof Number.NaN === \"number\". Actual: ' + (typeof Number.NaN ));\nif (typeof Number['NaN'] !== \"number\") $ERROR('#6: typeof Number[\"NaN\"] === \"number\". Actual: ' + (typeof Number[\"NaN\"] ));\nif (typeof Number.NEGATIVE_INFINITY !== \"number\") $ERROR('#7: typeof Number.NEGATIVE_INFINITY === \"number\". Actual: ' + (typeof Number.NEGATIVE_INFINITY ));\nif (typeof Number['NEGATIVE_INFINITY'] !== \"number\") $ERROR('#8: typeof Number[\"NEGATIVE_INFINITY\"] === \"number\". Actual: ' + (typeof Number[\"NEGATIVE_INFINITY\"] ));\nif (typeof Number.POSITIVE_INFINITY !== \"number\") $ERROR('#9: typeof Number.POSITIVE_INFINITY === \"number\". Actual: ' + (typeof Number.POSITIVE_INFINITY ));\nif (typeof Number['POSITIVE_INFINITY'] !== \"number\") $ERROR('#10: typeof Number[\"POSITIVE_INFINITY\"] === \"number\". Actual: ' + (typeof Number[\"POSITIVE_INFINITY\"] ));\nif (typeof Number.prototype.toString !== \"function\") $ERROR('#11: typeof Number.prototype.toString === \"function\". Actual: ' + (typeof Number.prototype.toString ));\nif (typeof Number.prototype['toString'] !== \"function\") $ERROR('#12: typeof Number.prototype[\"toString\"] === \"function\". Actual: ' + (typeof Number.prototype[\"toString\"] ));\nif (typeof Number.prototype.constructor !== \"function\") $ERROR('#13: typeof Number.prototype.constructor === \"function\". Actual: ' + (typeof Number.prototype.constructor ));\nif (typeof Number.prototype['constructor'] !== \"function\") $ERROR('#14: typeof Number.prototype[\"constructor\"] === \"function\". Actual: ' + (typeof Number.prototype[\"constructor\"] ));\nif (typeof Number.prototype.valueOf !== \"function\") $ERROR('#15: typeof Number.prototype.valueOf === \"function\". Actual: ' + (typeof Number.prototype.valueOf ));\nif (typeof Number.prototype['valueOf'] !== \"function\") $ERROR('#16: typeof Number.prototype[\"valueOf\"] === \"function\". Actual: ' + (typeof Number.prototype[\"valueOf\"] ));\n\n\n",
+ "id": "S11.2.1_A4_T7"
+ },
+ {
+ "section": "11.2.1",
+ "description": "Checking properties of the Math Object",
+ "test": "//CHECK#1-52\nif (typeof Math.E !== \"number\") $ERROR('#1: typeof Math.E === \"number\". Actual: ' + (typeof Math.E ));\nif (typeof Math['E'] !== \"number\") $ERROR('#2: typeof Math[\"E\"] === \"number\". Actual: ' + (typeof Math[\"E\"] ));\nif (typeof Math.LN10 !== \"number\") $ERROR('#3: typeof Math.LN10 === \"number\". Actual: ' + (typeof Math.LN10 ));\nif (typeof Math['LN10'] !== \"number\") $ERROR('#4: typeof Math[\"LN10\"] === \"number\". Actual: ' + (typeof Math[\"LN10\"] ));\nif (typeof Math.LN2 !== \"number\") $ERROR('#5: typeof Math.LN2 === \"number\". Actual: ' + (typeof Math.LN2 ));\nif (typeof Math['LN2'] !== \"number\") $ERROR('#6: typeof Math[\"LN2\"] === \"number\". Actual: ' + (typeof Math[\"LN2\"] ));\nif (typeof Math.LOG2E !== \"number\") $ERROR('#7: typeof Math.LOG2E === \"number\". Actual: ' + (typeof Math.LOG2E ));\nif (typeof Math['LOG2E'] !== \"number\") $ERROR('#8: typeof Math[\"LOG2E\"] === \"number\". Actual: ' + (typeof Math[\"LOG2E\"] ));\nif (typeof Math.LOG10E !== \"number\") $ERROR('#9: typeof Math.LOG10E === \"number\". Actual: ' + (typeof Math.LOG10E ));\nif (typeof Math['LOG10E'] !== \"number\") $ERROR('#10: typeof Math[\"LOG10E\"] === \"number\". Actual: ' + (typeof Math[\"LOG10E\"] ));\nif (typeof Math.PI !== \"number\") $ERROR('#11: typeof Math.PI === \"number\". Actual: ' + (typeof Math.PI ));\nif (typeof Math['PI'] !== \"number\") $ERROR('#12: typeof Math[\"PI\"] === \"number\". Actual: ' + (typeof Math[\"PI\"] ));\nif (typeof Math.SQRT1_2 !== \"number\") $ERROR('#13: typeof Math.SQRT1_2 === \"number\". Actual: ' + (typeof Math.SQRT1_2 ));\nif (typeof Math['SQRT1_2'] !== \"number\") $ERROR('#14: typeof Math[\"SQRT1_2\"] === \"number\". Actual: ' + (typeof Math[\"SQRT1_2\"] ));\nif (typeof Math.SQRT2 !== \"number\") $ERROR('#15: typeof Math.SQRT2 === \"number\". Actual: ' + (typeof Math.SQRT2 ));\nif (typeof Math['SQRT2'] !== \"number\") $ERROR('#16: typeof Math[\"SQRT2\"] === \"number\". Actual: ' + (typeof Math[\"SQRT2\"] ));\nif (typeof Math.abs !== \"function\") $ERROR('#17: typeof Math.abs === \"function\". Actual: ' + (typeof Math.abs ));\nif (typeof Math['abs'] !== \"function\") $ERROR('#18: typeof Math[\"abs\"] === \"function\". Actual: ' + (typeof Math[\"abs\"] ));\nif (typeof Math.acos !== \"function\") $ERROR('#19: typeof Math.acos === \"function\". Actual: ' + (typeof Math.acos ));\nif (typeof Math['acos'] !== \"function\") $ERROR('#20: typeof Math[\"acos\"] === \"function\". Actual: ' + (typeof Math[\"acos\"] ));\nif (typeof Math.asin !== \"function\") $ERROR('#21: typeof Math.asin === \"function\". Actual: ' + (typeof Math.asin ));\nif (typeof Math['asin'] !== \"function\") $ERROR('#22: typeof Math[\"asin\"] === \"function\". Actual: ' + (typeof Math[\"asin\"] ));\nif (typeof Math.atan !== \"function\") $ERROR('#23: typeof Math.atan === \"function\". Actual: ' + (typeof Math.atan ));\nif (typeof Math['atan'] !== \"function\") $ERROR('#24: typeof Math[\"atan\"] === \"function\". Actual: ' + (typeof Math[\"atan\"] ));\nif (typeof Math.atan2 !== \"function\") $ERROR('#25: typeof Math.atan2 === \"function\". Actual: ' + (typeof Math.atan2 ));\nif (typeof Math['atan2'] !== \"function\") $ERROR('#26: typeof Math[\"atan2\"] === \"function\". Actual: ' + (typeof Math[\"atan2\"] ));\nif (typeof Math.ceil !== \"function\") $ERROR('#27: typeof Math.ceil === \"function\". Actual: ' + (typeof Math.ceil ));\nif (typeof Math['ceil'] !== \"function\") $ERROR('#28: typeof Math[\"ceil\"] === \"function\". Actual: ' + (typeof Math[\"ceil\"] ));\nif (typeof Math.cos !== \"function\") $ERROR('#29: typeof Math.cos === \"function\". Actual: ' + (typeof Math.cos ));\nif (typeof Math['cos'] !== \"function\") $ERROR('#30: typeof Math[\"cos\"] === \"function\". Actual: ' + (typeof Math[\"cos\"] ));\nif (typeof Math.exp !== \"function\") $ERROR('#31: typeof Math.exp === \"function\". Actual: ' + (typeof Math.exp ));\nif (typeof Math['exp'] !== \"function\") $ERROR('#32: typeof Math[\"exp\"] === \"function\". Actual: ' + (typeof Math[\"exp\"] ));\nif (typeof Math.floor !== \"function\") $ERROR('#33: typeof Math.floor === \"function\". Actual: ' + (typeof Math.floor ));\nif (typeof Math['floor'] !== \"function\") $ERROR('#34: typeof Math[\"floor\"] === \"function\". Actual: ' + (typeof Math[\"floor\"] ));\nif (typeof Math.log !== \"function\") $ERROR('#35: typeof Math.log === \"function\". Actual: ' + (typeof Math.log ));\nif (typeof Math['log'] !== \"function\") $ERROR('#36: typeof Math[\"log\"] === \"function\". Actual: ' + (typeof Math[\"log\"] ));\nif (typeof Math.max !== \"function\") $ERROR('#37: typeof Math.max === \"function\". Actual: ' + (typeof Math.max ));\nif (typeof Math['max'] !== \"function\") $ERROR('#38: typeof Math[\"max\"] === \"function\". Actual: ' + (typeof Math[\"max\"] ));\nif (typeof Math.min !== \"function\") $ERROR('#39: typeof Math.min === \"function\". Actual: ' + (typeof Math.min ));\nif (typeof Math['min'] !== \"function\") $ERROR('#40: typeof Math[\"min\"] === \"function\". Actual: ' + (typeof Math[\"min\"] ));\nif (typeof Math.pow !== \"function\") $ERROR('#41: typeof Math.pow === \"function\". Actual: ' + (typeof Math.pow ));\nif (typeof Math['pow'] !== \"function\") $ERROR('#42: typeof Math[\"pow\"] === \"function\". Actual: ' + (typeof Math[\"pow\"] ));\nif (typeof Math.random !== \"function\") $ERROR('#43: typeof Math.random === \"function\". Actual: ' + (typeof Math.random ));\nif (typeof Math['random'] !== \"function\") $ERROR('#44: typeof Math[\"random\"] === \"function\". Actual: ' + (typeof Math[\"random\"] ));\nif (typeof Math.round !== \"function\") $ERROR('#45: typeof Math.round === \"function\". Actual: ' + (typeof Math.round ));\nif (typeof Math['round'] !== \"function\") $ERROR('#46: typeof Math[\"round\"] === \"function\". Actual: ' + (typeof Math[\"round\"] ));\nif (typeof Math.sin !== \"function\") $ERROR('#47: typeof Math.sin === \"function\". Actual: ' + (typeof Math.sin ));\nif (typeof Math['sin'] !== \"function\") $ERROR('#48: typeof Math[\"sin\"] === \"function\". Actual: ' + (typeof Math[\"sin\"] ));\nif (typeof Math.sqrt !== \"function\") $ERROR('#49: typeof Math.sqrt === \"function\". Actual: ' + (typeof Math.sqrt ));\nif (typeof Math['sqrt'] !== \"function\") $ERROR('#50: typeof Math[\"sqrt\"] === \"function\". Actual: ' + (typeof Math[\"sqrt\"] ));\nif (typeof Math.tan !== \"function\") $ERROR('#51: typeof Math.tan === \"function\". Actual: ' + (typeof Math.tan ));\nif (typeof Math['tan'] !== \"function\") $ERROR('#52: typeof Math[\"tan\"] === \"function\". Actual: ' + (typeof Math[\"tan\"] ));\n\n",
+ "id": "S11.2.1_A4_T8"
+ },
+ {
+ "section": "11.2.1",
+ "description": "Checking properties of the Date object",
+ "test": "//CHECK#1-86\nif (typeof Date.parse !== \"function\") $ERROR('#1: typeof Date.parse === \"function\". Actual: ' + (typeof Date.parse ));\nif (typeof Date['parse'] !== \"function\") $ERROR('#2: typeof Date[\"parse\"] === \"function\". Actual: ' + (typeof Date[\"parse\"] ));\nif (typeof Date.prototype !== \"object\") $ERROR('#3: typeof Date.prototype === \"object\". Actual: ' + (typeof Date.prototype ));\nif (typeof Date['prototype'] !== \"object\") $ERROR('#4: typeof Date[\"prototype\"] === \"object\". Actual: ' + (typeof Date[\"prototype\"] ));\nif (typeof Date.UTC !== \"function\") $ERROR('#5: typeof Date.UTC === \"function\". Actual: ' + (typeof Date.UTC ));\nif (typeof Date['UTC'] !== \"function\") $ERROR('#6: typeof Date[\"UTC\"] === \"function\". Actual: ' + (typeof Date[\"UTC\"] ));\nif (typeof Date.prototype.constructor !== \"function\") $ERROR('#7: typeof Date.prototype.constructor === \"funvtion\". Actual: ' + (typeof Date.prototype.constructor ));\nif (typeof Date.prototype['constructor'] !== \"function\") $ERROR('#8: typeof Date.prototype[\"constructor\"] === \"function\". Actual: ' + (typeof Date.prototype[\"constructor\"] ));\nif (typeof Date.prototype.toString !== \"function\") $ERROR('#9: typeof Date.prototype.toString === \"function\". Actual: ' + (typeof Date.prototype.toString ));\nif (typeof Date.prototype['toString'] !== \"function\") $ERROR('#10: typeof Date.prototype[\"toString\"] === \"function\". Actual: ' + (typeof Date.prototype[\"toString\"] ));\nif (typeof Date.prototype.valueOf !== \"function\") $ERROR('#11: typeof Date.prototype.valueOf === \"function\". Actual: ' + (typeof Date.prototype.valueOf ));\nif (typeof Date.prototype['valueOf'] !== \"function\") $ERROR('#12: typeof Date.prototype[\"valueOf\"] === \"function\". Actual: ' + (typeof Date.prototype[\"valueOf\"] ));\nif (typeof Date.prototype.getTime !== \"function\") $ERROR('#13: typeof Date.prototype.getTime === \"function\". Actual: ' + (typeof Date.prototype.getTime ));\nif (typeof Date.prototype['getTime'] !== \"function\") $ERROR('#14: typeof Date.prototype[\"getTime\"] === \"function\". Actual: ' + (typeof Date.prototype[\"getTime\"] ));\nif (typeof Date.prototype.getYear !== \"function\") $ERROR('#15: typeof Date.prototype.getYear === \"function\". Actual: ' + (typeof Date.prototype.getYear ));\nif (typeof Date.prototype['getYear'] !== \"function\") $ERROR('#16: typeof Date.prototype[\"getYear\"] === \"function\". Actual: ' + (typeof Date.prototype[\"getYear\"] ));\nif (typeof Date.prototype.getFullYear !== \"function\") $ERROR('#17: typeof Date.prototype.getFullYear === \"function\". Actual: ' + (typeof Date.prototype.getFullYear ));\nif (typeof Date.prototype['getFullYear'] !== \"function\") $ERROR('#18: typeof Date.prototype[\"getFullYear\"] === \"function\". Actual: ' + (typeof Date.prototype[\"getFullYear\"] ));\nif (typeof Date.prototype.getUTCFullYear !== \"function\") $ERROR('#19: typeof Date.prototype.getUTCFullYear === \"function\". Actual: ' + (typeof Date.prototype.getUTCFullYear ));\nif (typeof Date.prototype['getUTCFullYear'] !== \"function\") $ERROR('#20: typeof Date.prototype[\"getUTCFullYear\"] === \"function\". Actual: ' + (typeof Date.prototype[\"getUTCFullYear\"] ));\nif (typeof Date.prototype.getMonth !== \"function\") $ERROR('#21: typeof Date.prototype.getMonth === \"function\". Actual: ' + (typeof Date.prototype.getMonth ));\nif (typeof Date.prototype['getMonth'] !== \"function\") $ERROR('#22: typeof Date.prototype[\"getMonth\"] === \"function\". Actual: ' + (typeof Date.prototype[\"getMonth\"] ));\nif (typeof Date.prototype.getUTCMonth !== \"function\") $ERROR('#23: typeof Date.prototype.getUTCMonth === \"function\". Actual: ' + (typeof Date.prototype.getUTCMonth ));\nif (typeof Date.prototype['getUTCMonth'] !== \"function\") $ERROR('#24: typeof Date.prototype[\"getUTCMonth\"] === \"function\". Actual: ' + (typeof Date.prototype[\"getUTCMonth\"] ));\nif (typeof Date.prototype.getDate !== \"function\") $ERROR('#25: typeof Date.prototype.getDate === \"function\". Actual: ' + (typeof Date.prototype.getDate ));\nif (typeof Date.prototype['getDate'] !== \"function\") $ERROR('#26: typeof Date.prototype[\"getDate\"] === \"function\". Actual: ' + (typeof Date.prototype[\"getDate\"] ));\nif (typeof Date.prototype.getUTCDate !== \"function\") $ERROR('#27: typeof Date.prototype.getUTCDate === \"function\". Actual: ' + (typeof Date.prototype.getUTCDate ));\nif (typeof Date.prototype['getUTCDate'] !== \"function\") $ERROR('#28: typeof Date.prototype[\"getUTCDate\"] === \"function\". Actual: ' + (typeof Date.prototype[\"getUTCDate\"] ));\nif (typeof Date.prototype.getDay !== \"function\") $ERROR('#29: typeof Date.prototype.getDay === \"function\". Actual: ' + (typeof Date.prototype.getDay ));\nif (typeof Date.prototype['getDay'] !== \"function\") $ERROR('#30: typeof Date.prototype[\"getDay\"] === \"function\". Actual: ' + (typeof Date.prototype[\"getDay\"] ));\nif (typeof Date.prototype.getUTCDay !== \"function\") $ERROR('#31: typeof Date.prototype.getUTCDay === \"function\". Actual: ' + (typeof Date.prototype.getUTCDay ));\nif (typeof Date.prototype['getUTCDay'] !== \"function\") $ERROR('#32: typeof Date.prototype[\"getUTCDay\"] === \"function\". Actual: ' + (typeof Date.prototype[\"getUTCDay\"] ));\nif (typeof Date.prototype.getHours !== \"function\") $ERROR('#33: typeof Date.prototype.getHours === \"function\". Actual: ' + (typeof Date.prototype.getHours ));\nif (typeof Date.prototype['getHours'] !== \"function\") $ERROR('#34: typeof Date.prototype[\"getHours\"] === \"function\". Actual: ' + (typeof Date.prototype[\"getHours\"] ));\nif (typeof Date.prototype.getUTCHours !== \"function\") $ERROR('#35: typeof Date.prototype.getUTCHours === \"function\". Actual: ' + (typeof Date.prototype.getUTCHours ));\nif (typeof Date.prototype['getUTCHours'] !== \"function\") $ERROR('#36: typeof Date.prototype[\"getUTCHours\"] === \"function\". Actual: ' + (typeof Date.prototype[\"getUTCHours\"] ));\nif (typeof Date.prototype.getMinutes !== \"function\") $ERROR('#37: typeof Date.prototype.getMinutes === \"function\". Actual: ' + (typeof Date.prototype.getMinutes ));\nif (typeof Date.prototype['getMinutes'] !== \"function\") $ERROR('#38: typeof Date.prototype[\"getMinutes\"] === \"function\". Actual: ' + (typeof Date.prototype[\"getMinutes\"] ));\nif (typeof Date.prototype.getUTCMinutes !== \"function\") $ERROR('#39: typeof Date.prototype.getUTCMinutes === \"function\". Actual: ' + (typeof Date.prototype.getUTCMinutes ));\nif (typeof Date.prototype['getUTCMinutes'] !== \"function\") $ERROR('#40: typeof Date.prototype[\"getUTCMinutes\"] === \"function\". Actual: ' + (typeof Date.prototype[\"getUTCMinutes\"] ));\nif (typeof Date.prototype.getSeconds !== \"function\") $ERROR('#41: typeof Date.prototype.getSeconds === \"function\". Actual: ' + (typeof Date.prototype.getSeconds ));\nif (typeof Date.prototype['getSeconds'] !== \"function\") $ERROR('#42: typeof Date.prototype[\"getSeconds\"] === \"function\". Actual: ' + (typeof Date.prototype[\"getSeconds\"] ));\nif (typeof Date.prototype.getUTCSeconds !== \"function\") $ERROR('#43: typeof Date.prototype.getUTCSeconds === \"function\". Actual: ' + (typeof Date.prototype.getUTCSeconds ));\nif (typeof Date.prototype['getUTCSeconds'] !== \"function\") $ERROR('#44: typeof Date.prototype[\"getUTCSeconds\"] === \"function\". Actual: ' + (typeof Date.prototype[\"getUTCSeconds\"] ));\nif (typeof Date.prototype.getMilliseconds !== \"function\") $ERROR('#45: typeof Date.prototype.getMilliseconds === \"function\". Actual: ' + (typeof Date.prototype.getMilliseconds ));\nif (typeof Date.prototype['getMilliseconds'] !== \"function\") $ERROR('#46: typeof Date.prototype[\"getMilliseconds\"] === \"function\". Actual: ' + (typeof Date.prototype[\"getMilliseconds\"] ));\nif (typeof Date.prototype.getUTCMilliseconds !== \"function\") $ERROR('#47: typeof Date.prototype.getUTCMilliseconds === \"function\". Actual: ' + (typeof Date.prototype.getUTCMilliseconds ));\nif (typeof Date.prototype['getUTCMilliseconds'] !== \"function\") $ERROR('#48: typeof Date.prototype[\"getUTCMilliseconds\"] === \"function\". Actual: ' + (typeof Date.prototype[\"getUTCMilliseconds\"] ));\nif (typeof Date.prototype.setTime !== \"function\") $ERROR('#49: typeof Date.prototype.setTime === \"function\". Actual: ' + (typeof Date.prototype.setTime ));\nif (typeof Date.prototype['setTime'] !== \"function\") $ERROR('#50: typeof Date.prototype[\"setTime\"] === \"function\". Actual: ' + (typeof Date.prototype[\"setTime\"] ));\nif (typeof Date.prototype.setMilliseconds !== \"function\") $ERROR('#51: typeof Date.prototype.setMilliseconds === \"function\". Actual: ' + (typeof Date.prototype.setMilliseconds ));\nif (typeof Date.prototype['setMilliseconds'] !== \"function\") $ERROR('#52: typeof Date.prototype[\"setMilliseconds\"] === \"function\". Actual: ' + (typeof Date.prototype[\"setMilliseconds\"] ));\nif (typeof Date.prototype.setUTCMilliseconds !== \"function\") $ERROR('#53: typeof Date.prototype.setUTCMilliseconds === \"function\". Actual: ' + (typeof Date.prototype.setUTCMilliseconds ));\nif (typeof Date.prototype['setUTCMilliseconds'] !== \"function\") $ERROR('#54: typeof Date.prototype[\"setUTCMilliseconds\"] === \"function\". Actual: ' + (typeof Date.prototype[\"setUTCMilliseconds\"] ));\nif (typeof Date.prototype.setSeconds !== \"function\") $ERROR('#55: typeof Date.prototype.setSeconds === \"function\". Actual: ' + (typeof Date.prototype.setSeconds ));\nif (typeof Date.prototype['setSeconds'] !== \"function\") $ERROR('#56: typeof Date.prototype[\"setSeconds\"] === \"function\". Actual: ' + (typeof Date.prototype[\"setSeconds\"] ));\nif (typeof Date.prototype.setUTCSeconds !== \"function\") $ERROR('#57: typeof Date.prototype.setUTCSeconds === \"function\". Actual: ' + (typeof Date.prototype.setUTCSeconds ));\nif (typeof Date.prototype['setUTCSeconds'] !== \"function\") $ERROR('#58: typeof Date.prototype[\"setUTCSeconds\"] === \"function\". Actual: ' + (typeof Date.prototype[\"setUTCSeconds\"] ));\nif (typeof Date.prototype.setMinutes !== \"function\") $ERROR('#59: typeof Date.prototype.setMinutes === \"function\". Actual: ' + (typeof Date.prototype.setMinutes ));\nif (typeof Date.prototype['setMinutes'] !== \"function\") $ERROR('#60: typeof Date.prototype[\"setMinutes\"] === \"function\". Actual: ' + (typeof Date.prototype[\"setMinutes\"] ));\nif (typeof Date.prototype.setUTCMinutes !== \"function\") $ERROR('#61: typeof Date.prototype.setUTCMinutes === \"function\". Actual: ' + (typeof Date.prototype.setUTCMinutes ));\nif (typeof Date.prototype['setUTCMinutes'] !== \"function\") $ERROR('#62: typeof Date.prototype[\"setUTCMinutes\"] === \"function\". Actual: ' + (typeof Date.prototype[\"setUTCMinutes\"] ));\nif (typeof Date.prototype.setHours !== \"function\") $ERROR('#63: typeof Date.prototype.setHours === \"function\". Actual: ' + (typeof Date.prototype.setHours ));\nif (typeof Date.prototype['setHours'] !== \"function\") $ERROR('#64: typeof Date.prototype[\"setHours\"] === \"function\". Actual: ' + (typeof Date.prototype[\"setHours\"] ));\nif (typeof Date.prototype.setUTCHours !== \"function\") $ERROR('#65: typeof Date.prototype.setUTCHours === \"function\". Actual: ' + (typeof Date.prototype.setUTCHours ));\nif (typeof Date.prototype['setUTCHours'] !== \"function\") $ERROR('#66: typeof Date.prototype[\"setUTCHours\"] === \"function\". Actual: ' + (typeof Date.prototype[\"setUTCHours\"] ));\nif (typeof Date.prototype.setDate !== \"function\") $ERROR('#67: typeof Date.prototype.setDate === \"function\". Actual: ' + (typeof Date.prototype.setDate ));\nif (typeof Date.prototype['setDate'] !== \"function\") $ERROR('#68: typeof Date.prototype[\"setDate\"] === \"function\". Actual: ' + (typeof Date.prototype[\"setDate\"] ));\nif (typeof Date.prototype.setUTCDate !== \"function\") $ERROR('#69: typeof Date.prototype.setUTCDate === \"function\". Actual: ' + (typeof Date.prototype.setUTCDate ));\nif (typeof Date.prototype['setUTCDate'] !== \"function\") $ERROR('#70: typeof Date.prototype[\"setUTCDate\"] === \"function\". Actual: ' + (typeof Date.prototype[\"setUTCDate\"] ));\nif (typeof Date.prototype.setMonth !== \"function\") $ERROR('#71: typeof Date.prototype.setMonth === \"function\". Actual: ' + (typeof Date.prototype.setMonth ));\nif (typeof Date.prototype['setMonth'] !== \"function\") $ERROR('#72: typeof Date.prototype[\"setMonth\"] === \"function\". Actual: ' + (typeof Date.prototype[\"setMonth\"] ));\nif (typeof Date.prototype.setUTCMonth !== \"function\") $ERROR('#73: typeof Date.prototype.setUTCMonth === \"function\". Actual: ' + (typeof Date.prototype.setUTCMonth ));\nif (typeof Date.prototype['setUTCMonth'] !== \"function\") $ERROR('#74: typeof Date.prototype[\"setUTCMonth\"] === \"function\". Actual: ' + (typeof Date.prototype[\"setUTCMonth\"] ));\nif (typeof Date.prototype.setFullYear !== \"function\") $ERROR('#75: typeof Date.prototype.setFullYear === \"function\". Actual: ' + (typeof Date.prototype.setFullYear ));\nif (typeof Date.prototype['setFullYear'] !== \"function\") $ERROR('#76: typeof Date.prototype[\"setFullYear\"] === \"function\". Actual: ' + (typeof Date.prototype[\"setFullYear\"] ));\nif (typeof Date.prototype.setUTCFullYear !== \"function\") $ERROR('#77: typeof Date.prototype.setUTCFullYear === \"function\". Actual: ' + (typeof Date.prototype.setUTCFullYear ));\nif (typeof Date.prototype['setUTCFullYear'] !== \"function\") $ERROR('#78: typeof Date.prototype[\"setUTCFullYear\"] === \"function\". Actual: ' + (typeof Date.prototype[\"setUTCFullYear\"] ));\nif (typeof Date.prototype.setYear !== \"function\") $ERROR('#79: typeof Date.prototype.setYear === \"function\". Actual: ' + (typeof Date.prototype.setYear ));\nif (typeof Date.prototype['setYear'] !== \"function\") $ERROR('#80: typeof Date.prototype[\"setYear\"] === \"function\". Actual: ' + (typeof Date.prototype[\"setYear\"] ));\nif (typeof Date.prototype.toLocaleString !== \"function\") $ERROR('#81: typeof Date.prototype.toLocaleString === \"function\". Actual: ' + (typeof Date.prototype.toLocaleString ));\nif (typeof Date.prototype['toLocaleString'] !== \"function\") $ERROR('#82: typeof Date.prototype[\"toLocaleString\"] === \"function\". Actual: ' + (typeof Date.prototype[\"toLocaleString\"] ));\nif (typeof Date.prototype.toUTCString !== \"function\") $ERROR('#83: typeof Date.prototype.toUTCString === \"function\". Actual: ' + (typeof Date.prototype.toUTCString ));\nif (typeof Date.prototype['toUTCString'] !== \"function\") $ERROR('#84: typeof Date.prototype[\"toUTCString\"] === \"function\". Actual: ' + (typeof Date.prototype[\"toUTCString\"] ));\nif (typeof Date.prototype.toGMTString !== \"function\") $ERROR('#85: typeof Date.prototype.toGMTString === \"function\". Actual: ' + (typeof Date.prototype.toGMTString ));\nif (typeof Date.prototype['toGMTString'] !== \"function\") $ERROR('#86: typeof Date.prototype[\"toGMTString\"] === \"function\". Actual: ' + (typeof Date.prototype[\"toGMTString\"] ));\n\n\n\n",
+ "id": "S11.2.1_A4_T9"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/11.2.2_The_new_Operator.json b/website/resources/scripts/testcases2/11.2.2_The_new_Operator.json
new file mode 100644
index 000000000..17bf0ad0a
--- /dev/null
+++ b/website/resources/scripts/testcases2/11.2.2_The_new_Operator.json
@@ -0,0 +1,86 @@
+{
+ "testCollection": {
+ "name": "11.2.2_The_new_Operator",
+ "numTests": 13,
+ "tests": [
+ {
+ "section": "11.2.2, 7.2, 7.3",
+ "description": "Checking by using eval",
+ "test": "//CHECK#1\nif (eval(\"new\\u0009Number\") != 0) {\n $ERROR('#1: new\\\\u0009Number == 0');\n}\n\n//CHECK#2\nif (eval(\"new\\u000BNumber\") != 0) {\n $ERROR('#2: new\\\\u000BNumber == 0'); \n}\n\n//CHECK#3\nif (eval(\"new\\u000CNumber\") != 0) {\n $ERROR('#3: new\\\\u000CNumber == 0');\n}\n\n//CHECK#4\nif (eval(\"new\\u0020Number\") != 0) {\n $ERROR('#4: new\\\\u0020Number == 0');\n}\n\n//CHECK#5\nif (eval(\"new\\u00A0Number\") != 0) {\n $ERROR('#5: new\\\\u00A0Number == 0');\n}\n\n//CHECK#6\nif (eval(\"new\\u000ANumber\") != 0) {\n $ERROR('#6: new\\\\u000ANumber == 0'); \n}\n\n//CHECK#7\nif (eval(\"new\\u000DNumber\") != 0) {\n $ERROR('#7: new\\\\u000DNumber == 0');\n}\n\n//CHECK#8\nif (eval(\"new\\u2028Number\") != 0) {\n $ERROR('#8: new\\\\u2028Number == 0');\n}\n\n//CHECK#9\nif (eval(\"new\\u2029Number\") != 0) {\n $ERROR('#9: new\\\\u2029Number == 0');\n}\n\n//CHECK#10\nif (eval(\"new\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u2029Number\") != 0) {\n $ERROR('#10: new\\\\u0009\\\\u000B\\\\u000C\\\\u0020\\\\u00A0\\\\u000A\\\\u000D\\\\u2028\\\\u2029Number == 0');\n}\n",
+ "id": "S11.2.2_A1.1"
+ },
+ {
+ "section": "11.2.2, 7.2, 7.3",
+ "description": "Checking by using eval",
+ "test": "//CHECK#1\nif (eval(\"new\\u0009Number()\") != 0) {\n $ERROR('#1: new\\\\u0009Number == 0');\n}\n\n//CHECK#2\nif (eval(\"new\\u000BNumber()\") != 0) {\n $ERROR('#2: new\\\\u000BNumber == 0'); \n}\n\n//CHECK#3\nif (eval(\"new\\u000CNumber()\") != 0) {\n $ERROR('#3: new\\\\u000CNumber == 0');\n}\n\n//CHECK#4\nif (eval(\"new\\u0020Number()\") != 0) {\n $ERROR('#4: new\\\\u0020Number == 0');\n}\n\n//CHECK#5\nif (eval(\"new\\u00A0Number()\") != 0) {\n $ERROR('#5: new\\\\u00A0Number == 0');\n}\n\n//CHECK#6\nif (eval(\"new\\u000ANumber()\") != 0) {\n $ERROR('#6: new\\\\u000ANumber == 0'); \n}\n\n//CHECK#7\nif (eval(\"new\\u000DNumber()\") != 0) {\n $ERROR('#7: new\\\\u000DNumber == 0');\n}\n\n//CHECK#8\nif (eval(\"new\\u2028Number()\") != 0) {\n $ERROR('#8: new\\\\u2028Number == 0');\n}\n\n//CHECK#9\nif (eval(\"new\\u2029Number()\") != 0) {\n $ERROR('#9: new\\\\u2029Number == 0');\n}\n\n//CHECK#10\nif (eval(\"new\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u2029Number()\") != 0) {\n $ERROR('#10: new\\\\u0009\\\\u000B\\\\u000C\\\\u0020\\\\u00A0\\\\u000A\\\\u000D\\\\u2028\\\\u2029Number == 0');\n}\n",
+ "id": "S11.2.2_A1.2"
+ },
+ {
+ "section": "11.2.2",
+ "description": "If GetBase(NewExpression) or GetBase(MemberExpression) is null, throw ReferenceError",
+ "test": "//CHECK#1\ntry {\n new x;\n $ERROR('#1.1: new x throw ReferenceError. Actual: ' + (new x)); \n}\ncatch (e) {\n if ((e instanceof ReferenceError) !== true) {\n $ERROR('#1.2: new x throw ReferenceError. Actual: ' + (e)); \n }\n}\n\n//CHECK#2\ntry {\n new x();\n $ERROR('#2: new x() throw ReferenceError'); \n}\ncatch (e) {\n if ((e instanceof ReferenceError) !== true) {\n $ERROR('#2: new x() throw ReferenceError'); \n }\n}\n",
+ "id": "S11.2.2_A2"
+ },
+ {
+ "section": "11.2.2",
+ "description": "Checking boolean primitive case",
+ "test": "//CHECK#1\ntry {\n new true;\n $ERROR('#1: new true throw TypeError');\t\n}\ncatch (e) {\n if ((e instanceof TypeError) !== true) {\n $ERROR('#1: new true throw TypeError');\t\n }\n}\n\n//CHECK#2\ntry {\n var x = true;\n new x;\n $ERROR('#2: var x = true; new x throw TypeError');\t\n}\ncatch (e) {\n if ((e instanceof TypeError) !== true) {\n $ERROR('#2: var x = true; new x throw TypeError');\t\n }\n}\n\n//CHECK#3\ntry {\n var x = true;\n new x();\n $ERROR('#3: var x = true; new x() throw TypeError'); \n}\ncatch (e) {\n if ((e instanceof TypeError) !== true) {\n $ERROR('#3: var x = true; new x() throw TypeError'); \n }\n}\n\n",
+ "id": "S11.2.2_A3_T1"
+ },
+ {
+ "section": "11.2.2",
+ "description": "Checking \"number primitive\" case",
+ "test": "//CHECK#1\ntry {\n new 1;\n $ERROR('#1: new 1 throw TypeError');\t\n}\ncatch (e) {\n if ((e instanceof TypeError) !== true) {\n $ERROR('#1: new 1 throw TypeError');\t\n }\n}\n\n//CHECK#2\ntry {\n var x = 1;\n new x;\n $ERROR('#2: var x = 1; new x throw TypeError');\t\n}\ncatch (e) {\n if ((e instanceof TypeError) !== true) {\n $ERROR('#2: var x = 1; new x throw TypeError');\t\n }\n}\n\n//CHECK#3\ntry {\n var x = 1;\n new x();\n $ERROR('#3: var x = 1; new x() throw TypeError'); \n}\ncatch (e) {\n if ((e instanceof TypeError) !== true) {\n $ERROR('#3: var x = 1; new x() throw TypeError'); \n }\n}\n",
+ "id": "S11.2.2_A3_T2"
+ },
+ {
+ "section": "11.2.2",
+ "description": "Checking \"string primitive\" case",
+ "test": "//CHECK#1\ntry {\n new 1;\n $ERROR('#1: new \"1\" throw TypeError');\t\n}\ncatch (e) {\n if ((e instanceof TypeError) !== true) {\n $ERROR('#1: new \"1\" throw TypeError');\t\n }\n}\n\n//CHECK#2\ntry {\n var x = \"1\";\n new x;\n $ERROR('#2: var x = \"1\"; new x throw TypeError');\t\n}\ncatch (e) {\n if ((e instanceof TypeError) !== true) {\n $ERROR('#2: var x = \"1\"; new x throw TypeError');\t\n }\n}\n\n//CHECK#3\ntry {\n var x = \"1\";\n new x();\n $ERROR('#3: var x = \"1\"; new x() throw TypeError'); \n}\ncatch (e) {\n if ((e instanceof TypeError) !== true) {\n $ERROR('#3: var x = \"1\"; new x() throw TypeError'); \n }\n}\n",
+ "id": "S11.2.2_A3_T3"
+ },
+ {
+ "section": "11.2.2",
+ "description": "Checking \"undefined\" case",
+ "test": "//CHECK#1\ntry {\n new undefined;\n $ERROR('#1: new undefined throw TypeError');\t\n}\ncatch (e) {\n if ((e instanceof TypeError) !== true) {\n $ERROR('#1: new undefined throw TypeError');\t\n }\n}\n\n//CHECK#2\ntry {\n var x = undefined;\n new x;\n $ERROR('#2: var x = undefined; new x throw TypeError');\t\n}\ncatch (e) {\n if ((e instanceof TypeError) !== true) {\n $ERROR('#2: var x = undefined; new x throw TypeError');\t\n }\n}\n\n//CHECK#3\ntry {\n var x = undefined;\n new x();\n $ERROR('#3: var x = undefined; new x() throw TypeError'); \n}\ncatch (e) {\n if ((e instanceof TypeError) !== true) {\n $ERROR('#3: var x = undefined; new x() throw TypeError'); \n }\n}\n",
+ "id": "S11.2.2_A3_T4"
+ },
+ {
+ "section": "11.2.2",
+ "description": "Checking \"null primitive\" case",
+ "test": "//CHECK#1\ntry {\n new null;\n $ERROR('#1: new null throw TypeError');\t\n}\ncatch (e) {\n if ((e instanceof TypeError) !== true) {\n $ERROR('#1: new null throw TypeError');\t\n }\n}\n\n//CHECK#2\ntry {\n var x = null;\n new x;\n $ERROR('#2: var x = null; new x throw TypeError');\t\n}\ncatch (e) {\n if ((e instanceof TypeError) !== true) {\n $ERROR('#2: var x = null; new x throw TypeError');\t\n }\n}\n\n//CHECK#3\ntry {\n var x = null;\n new x();\n $ERROR('#3: var x = null; new x() throw TypeError'); \n}\ncatch (e) {\n if ((e instanceof TypeError) !== true) {\n $ERROR('#3: var x = null; new x() throw TypeError'); \n }\n}\n",
+ "id": "S11.2.2_A3_T5"
+ },
+ {
+ "section": "11.2.2",
+ "description": "Checking Boolean object case",
+ "test": "//CHECK#1\ntry {\n new new Boolean(true);\n $ERROR('#1: new new Boolean(true) throw TypeError');\t\n}\ncatch (e) {\n if ((e instanceof TypeError) !== true) {\n $ERROR('#1: new new Boolean(true) throw TypeError');\t\n }\n}\n\n//CHECK#2\ntry {\n var x = new Boolean(true);\n new x;\n $ERROR('#2: var x = new Boolean(true); new x throw TypeError');\t\n}\ncatch (e) {\n if ((e instanceof TypeError) !== true) {\n $ERROR('#2: var x = new Boolean(true); new x throw TypeError');\t\n }\n}\n\n//CHECK#3\ntry {\n var x = new Boolean(true);\n new x();\n $ERROR('#3: var x = new Boolean(true); new x() throw TypeError'); \n}\ncatch (e) {\n if ((e instanceof TypeError) !== true) {\n $ERROR('#3: var x = new Boolean(true); new x() throw TypeError'); \n }\n}\n\n",
+ "id": "S11.2.2_A4_T1"
+ },
+ {
+ "section": "11.2.2",
+ "description": "Checking Number object case",
+ "test": "//CHECK#1\ntry {\n new new Number(1);\n $ERROR('#1: new new Number(1) throw TypeError');\n}\ncatch (e) {\n if ((e instanceof TypeError) !== true) {\n $ERROR('#1: new new Number(1) throw TypeError');\n }\n}\n\n//CHECK#2\ntry {\n var x = new Number(1);\n new x;\n $ERROR('#2: var x = new Number(1); new x throw TypeError');\n}\ncatch (e) {\n if ((e instanceof TypeError) !== true) {\n $ERROR('#2: var x = new Number(1); new x throw TypeError');\n }\n}\n\n//CHECK#3\ntry {\n var x = new Number(1);\n new x();\n $ERROR('#3: var x = new Number(1); new x() throw TypeError');\n}\ncatch (e) {\n if ((e instanceof TypeError) !== true) {\n $ERROR('#3: var x = new Number(1); new x() throw TypeError');\n }\n}\n\n",
+ "id": "S11.2.2_A4_T2"
+ },
+ {
+ "section": "11.2.2",
+ "description": "Checking String object case",
+ "test": "//CHECK#1\ntry {\n new new String(\"1\");\n $ERROR('#1: new new String(\"1\") throw TypeError');\t\n}\ncatch (e) {\n if ((e instanceof TypeError) !== true) {\n $ERROR('#1: new new String(\"1\") throw TypeError');\t\n }\n}\n\n//CHECK#2\ntry {\n var x = new String(\"1\");\n new x;\n $ERROR('#2: var x = new String(\"1\"); new x throw TypeError');\t\n}\ncatch (e) {\n if ((e instanceof TypeError) !== true) {\n $ERROR('#2: var x = new String(\"1\"); new x throw TypeError');\t\n }\n}\n\n//CHECK#3\ntry {\n var x = new String(\"1\");\n new x();\n $ERROR('#3: var x = new String(\"1\"); new x() throw TypeError'); \n}\ncatch (e) {\n if ((e instanceof TypeError) !== true) {\n $ERROR('#3: var x = new String(\"1\"); new x() throw TypeError'); \n }\n}\n\n",
+ "id": "S11.2.2_A4_T3"
+ },
+ {
+ "section": "11.2.2",
+ "description": "Checking Global object case",
+ "test": "//CHECK#1\ntry {\n new this;\n $ERROR('#1: new this throw TypeError');\t\n}\ncatch (e) {\n if ((e instanceof TypeError) !== true) {\n $ERROR('#1: new this throw TypeError');\t\n }\n}\n\n//CHECK#2\ntry {\n new this();\n $ERROR('#2: new this() throw TypeError'); \n}\ncatch (e) {\n if ((e instanceof TypeError) !== true) {\n $ERROR('#2: new this() throw TypeError'); \n }\n}\n",
+ "id": "S11.2.2_A4_T4"
+ },
+ {
+ "section": "11.2.2",
+ "description": "Checking Math object case",
+ "test": "//CHECK#1\ntry {\n new Math;\n $ERROR('#1: new Math throw TypeError');\t\n}\ncatch (e) {\n if ((e instanceof TypeError) !== true) {\n $ERROR('#1: new Math throw TypeError');\t\n }\n}\n\n//CHECK#2\ntry {\n new new Math();\n $ERROR('#2: new new Math() throw TypeError');\t\n}\ncatch (e) {\n if ((e instanceof TypeError) !== true) {\n $ERROR('#2: new new Math() throw TypeError');\t\n }\n}\n\n//CHECK#3\ntry {\n var x = new Math();\n new x();\n $ERROR('#3: var x = new Math(); new x() throw TypeError'); \n}\ncatch (e) {\n if ((e instanceof TypeError) !== true) {\n $ERROR('#3: var x = new Math(); new x() throw TypeError'); \n }\n}\n\n",
+ "id": "S11.2.2_A4_T5"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/11.2.3_Function_Calls.json b/website/resources/scripts/testcases2/11.2.3_Function_Calls.json
new file mode 100644
index 000000000..6dabb480d
--- /dev/null
+++ b/website/resources/scripts/testcases2/11.2.3_Function_Calls.json
@@ -0,0 +1,80 @@
+{
+ "testCollection": {
+ "name": "11.2.3_Function_Calls",
+ "numTests": 12,
+ "tests": [
+ {
+ "section": "11.2.3, 7.2, 7.3",
+ "description": "Checking by using eval",
+ "test": "//CHECK#1\nif (eval(\"Number\\u0009()\") !== 0) {\n $ERROR('#1: Number\\\\u0009() === 0');\n}\n\n//CHECK#2\nif (eval(\"Number\\u000B()\") !== 0) {\n $ERROR('#2: Number\\\\u000B() === 0'); \n}\n\n//CHECK#3\nif (eval(\"Number\\u000C()\") !== 0) {\n $ERROR('#3: Number\\\\u000C() === 0');\n}\n\n//CHECK#4\nif (eval(\"Number\\u0020()\") !== 0) {\n $ERROR('#4: Number\\\\u0020 === 0');\n}\n\n//CHECK#5\nif (eval(\"Number\\u00A0()\") !== 0) {\n $ERROR('#5: Number\\\\u00A0() === 0');\n}\n\n//CHECK#6\nif (eval(\"Number\\u000A()\") !== 0) {\n $ERROR('#6: Number\\\\u000A() === 0'); \n}\n\n//CHECK#7\nif (eval(\"Number\\u000D()\") !== 0) {\n $ERROR('#7: Number\\\\u000D() === 0');\n}\n\n//CHECK#8\nif (eval(\"Number\\u2028()\") !== 0) {\n $ERROR('#8: Number\\\\u2028() === 0');\n}\n\n//CHECK#9\nif (eval(\"Number\\u2029()\") !== 0) {\n $ERROR('#9: Number\\\\u2029() === 0');\n}\n\n//CHECK#10\nif (eval(\"Number\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u2029()\") !== 0) {\n $ERROR('#10: Number\\\\u0009\\\\u000B\\\\u000C\\\\u0020\\\\u00A0\\\\u000A\\\\u000D\\\\u2028\\\\u2029() === 0');\n}\n",
+ "id": "S11.2.3_A1"
+ },
+ {
+ "section": "11.2.3",
+ "description": "If GetBase(MemberExpression) is null, throw ReferenceError",
+ "test": "//CHECK#1\ntry {\n x();\n $ERROR('#1.1: x() throw ReferenceError. Actual: ' + (x())); \n}\ncatch (e) {\n if ((e instanceof ReferenceError) !== true) {\n $ERROR('#1.2: x() throw ReferenceError. Actual: ' + (e)); \n }\n}\n\n//CHECK#2\ntry {\n x(1,2,3);\n $ERROR('#2.1: x(1,2,3) throw ReferenceError. Actual: ' + (x(1,2,3))); \n}\ncatch (e) {\n if ((e instanceof ReferenceError) !== true) {\n $ERROR('#2.2: x(1,2,3) throw ReferenceError. Actual: ' + (e)); \n }\n}\n",
+ "id": "S11.2.3_A2"
+ },
+ {
+ "section": "11.2.3",
+ "description": "Checking \"boolean primitive\" case",
+ "test": "//CHECK#1\ntry {\n true();\n $ERROR('#1.1: true() throw TypeError. Actual: ' + (true()));\t\n}\ncatch (e) {\n if ((e instanceof TypeError) !== true) {\n $ERROR('#1.2: true() throw TypeError. Actual: ' + (e));\t\n }\n}\n\n//CHECK#2\ntry {\n var x = true;\n x();\n $ERROR('#2.1: var x = true; x() throw TypeError. Actual: ' + (x()))\n}\ncatch (e) {\n if ((e instanceof TypeError) !== true) {\n $ERROR('#2.2: var x = true; x() throw TypeError. Actual: ' + (e)) \n }\n}\n",
+ "id": "S11.2.3_A3_T1"
+ },
+ {
+ "section": "11.2.3",
+ "description": "Checking \"number primitive\" case",
+ "test": "//CHECK#1\ntry {\n 1();\n $ERROR('#1.1: 1() throw TypeError. Actual: ' + (1()));\t\n}\ncatch (e) {\n if ((e instanceof TypeError) !== true) {\n $ERROR('#1.2: 1() throw TypeError. Actual: ' + (e));\t\n }\n}\n\n//CHECK#2\ntry {\n var x = 1;\n x();\n $ERROR('#2.1: var x = 1; x() throw TypeError. Actual: ' + (x()));\t\n}\ncatch (e) {\n if ((e instanceof TypeError) !== true) {\n $ERROR('#2.2: var x = 1; x() throw TypeError. Actual: ' + (e));\t\n }\n}\n",
+ "id": "S11.2.3_A3_T2"
+ },
+ {
+ "section": "11.2.3",
+ "description": "Checking \"string primitive\" case",
+ "test": "//CHECK#1\ntry {\n \"1\"();\n $ERROR('#1.1: \"1\"() throw TypeError. Actual: ' + (\"1\"()));\t\n}\ncatch (e) {\n if ((e instanceof TypeError) !== true) {\n $ERROR('#1.2: \"1\"() throw TypeError. Actual: ' + (e));\t\n }\n}\n\n//CHECK#2\ntry {\n var x = \"1\";\n x();\n $ERROR('#2.1: var x = \"1\"; x() throw TypeError. Actual: ' + (x()));\t\n}\ncatch (e) {\n if ((e instanceof TypeError) !== true) {\n $ERROR('#2.2: var x = \"1\"; x() throw TypeError. Actual: ' + (e));\t\n }\n}\n",
+ "id": "S11.2.3_A3_T3"
+ },
+ {
+ "section": "11.2.3",
+ "description": "Checking \"undefined\" case",
+ "test": "//CHECK#1\ntry {\n undefined();\n $ERROR('#1.1: undefined() throw TypeError. Actual: ' + (e));\t\n}\ncatch (e) {\n if ((e instanceof TypeError) !== true) {\n $ERROR('#1.2: undefined() throw TypeError. Actual: ' + (e));\t\n }\n}\n\n//CHECK#2\ntry {\n var x = undefined;\n x();\n $ERROR('#2.1: var x = undefined; x() throw TypeError. Actual: ' + (e));\t\n}\ncatch (e) {\n if ((e instanceof TypeError) !== true) {\n $ERROR('#2.2: var x = undefined; x() throw TypeError. Actual: ' + (e));\t\n }\n}\n",
+ "id": "S11.2.3_A3_T4"
+ },
+ {
+ "section": "11.2.3",
+ "description": "Checking \"null\" case",
+ "test": "//CHECK#1\ntry {\n null();\n $ERROR('#1.1: null() throw TypeError. Actual: ' + (null()));\t\n}\ncatch (e) {\n if ((e instanceof TypeError) !== true) {\n $ERROR('#1.2: null() throw TypeError. Actual: ' + (e));\t\n }\n}\n\n//CHECK#2\ntry {\n var x = null;\n x();\n $ERROR('#2.1: var x = null; x() throw TypeError. Actual: ' + (x()));\t\n}\ncatch (e) {\n if ((e instanceof TypeError) !== true) {\n $ERROR('#2.2: var x = null; x() throw TypeError. Actual: ' + (e));\t\n }\n}\n",
+ "id": "S11.2.3_A3_T5"
+ },
+ {
+ "section": "11.2.3",
+ "description": "Checking Boolean object case",
+ "test": "//CHECK#1\ntry {\n new Boolean(true)();\n $ERROR('#1.1: new Boolean(true)() throw TypeError. Actual: ' + (new Boolean(true)())); \n}\ncatch (e) {\n if ((e instanceof TypeError) !== true) {\n $ERROR('#1.2: new Boolean(true)() throw TypeError. Actual: ' + (e)); \n }\n}\n\n//CHECK#2\ntry {\n var x = new Boolean(true);\n x();\n $ERROR('#2.1: var x = new Boolean(true); x() throw TypeError. Actual: ' + (x()));\t\n}\ncatch (e) {\n if ((e instanceof TypeError) !== true) {\n $ERROR('#2.2: var x = new Boolean(true); x() throw TypeError. Actual: ' + (e));\t\n }\n}\n\n",
+ "id": "S11.2.3_A4_T1"
+ },
+ {
+ "section": "11.2.3",
+ "description": "Checking Number object case",
+ "test": "//CHECK#1\ntry {\n new Number(1)();\n $ERROR('#1.1: new Number(1)() throw TypeError. Actual: ' + (new Number(1)()));\t\n}\ncatch (e) {\n if ((e instanceof TypeError) !== true) {\n $ERROR('#1.2: new Number(1)() throw TypeError. Actual: ' + (e));\t\n }\n}\n\n//CHECK#2\ntry {\n var x = new Number(1);\n x();\n $ERROR('#2.1: var x = new Number(1); x() throw TypeError. Actual: ' + (x()));\t\n}\ncatch (e) {\n if ((e instanceof TypeError) !== true) {\n $ERROR('#2.2: var x = new Number(1); x() throw TypeError. Actual: ' + (e));\t\n }\n}\n\n",
+ "id": "S11.2.3_A4_T2"
+ },
+ {
+ "section": "11.2.3",
+ "description": "Checking String object case",
+ "test": "//CHECK#1\ntry {\n new String(\"1\")();\n $ERROR('#1.1: new String(\"1\")() throw TypeError. Actual: ' + (new String(\"1\")()));\t\n}\ncatch (e) {\n if ((e instanceof TypeError) !== true) {\n $ERROR('#1.2: new String(\"1\")() throw TypeError. Actual: ' + (e));\t\n }\n}\n\n//CHECK#2\ntry {\n var x = new String(\"1\");\n x();\n $ERROR('#2.1: var x = new String(\"1\"); x() throw TypeError. Actual: ' + (x()));\t\n}\ncatch (e) {\n if ((e instanceof TypeError) !== true) {\n $ERROR('#2.2: var x = new String(\"1\"); x() throw TypeError. Actual: ' + (e));\t\n }\n}\n",
+ "id": "S11.2.3_A4_T3"
+ },
+ {
+ "section": "11.2.3",
+ "description": "Checking Global object case",
+ "test": "//CHECK#1\ntry {\n this();\n $ERROR('#1.1: this() throw TypeError. Actual: ' + (this()));\t\n}\ncatch (e) {\n if ((e instanceof TypeError) !== true) {\n $ERROR('#1.2: this() throw TypeError. Actual: ' + (e));\t\n }\n}\n",
+ "id": "S11.2.3_A4_T4"
+ },
+ {
+ "section": "11.2.3",
+ "description": "Checking Math object case",
+ "test": "//CHECK#1\ntry {\n Math();\n $ERROR('#1.1: Math() throw TypeError. Actual: ' + (Math()));\t\n}\ncatch (e) {\n if ((e instanceof TypeError) !== true) {\n $ERROR('#1.2: Math() throw TypeError. Actual: ' + (e));\t\n }\n}\n\n",
+ "id": "S11.2.3_A4_T5"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/11.2.4_Argument_Lists.json b/website/resources/scripts/testcases2/11.2.4_Argument_Lists.json
new file mode 100644
index 000000000..8f72e470e
--- /dev/null
+++ b/website/resources/scripts/testcases2/11.2.4_Argument_Lists.json
@@ -0,0 +1,63 @@
+{
+ "testCollection": {
+ "name": "11.2.4_Argument_Lists",
+ "numTests": 9,
+ "tests": [
+ {
+ "section": "11.2.4, 11.2.3, 10.1.8",
+ "description": "Function is declared with no FormalParameterList",
+ "test": "function f_arg() {\n return arguments;\n}\n\n//CHECK#1\nif (f_arg().length !== 0) {\n $ERROR('#1: function f_arg() {return arguments;} f_arg().length === 0. Actual: ' + (f_arg().length));\n}\n\n//CHECK#2\nif (f_arg()[0] !== undefined) {\n $ERROR('#2: function f_arg() {return arguments;} f_arg()[0] === undefined. Actual: ' + (f_arg()[0]));\n}\n",
+ "id": "S11.2.4_A1.1_T1"
+ },
+ {
+ "section": "11.2.4, 11.2.3, 10.1.8",
+ "description": "Function is declared with FormalParameterList",
+ "test": "function f_arg(x,y) {\n return arguments;\n}\n\n//CHECK#1\nif (f_arg().length !== 0) {\n $ERROR('#1: function f_arg(x,y) {return arguments;} f_arg().length === 0. Actual: ' + (f_arg().length));\n}\n\n//CHECK#2\nif (f_arg()[0] !== undefined) {\n $ERROR('#2: function f_arg(x,y) {return arguments;} f_arg()[0] === undefined. Actual: ' + (f_arg()[0]));\n}\n\n//CHECK#3\nif (f_arg.length !== 2) {\n $ERROR('#3: function f_arg(x,y) {return arguments;} f_arg.length === 2. Actual: ' + (f_arg.length));\n}\n",
+ "id": "S11.2.4_A1.1_T2"
+ },
+ {
+ "section": "11.2.4, 11.2.3, 10.1.8",
+ "description": "Function is declared with no FormalParameterList",
+ "test": "f_arg = function() {\n return arguments;\n}\n\n//CHECK#1\nif (f_arg(1,2,3).length !== 3) {\n $ERROR('#1: f_arg = function()() {return arguments;} f_arg(1,2,3).length === 3. Actual: ' + (f_arg(1,2,3).length));\n}\n\n//CHECK#2\nif (f_arg(1,2,3)[0] !== 1) {\n $ERROR('#1: f_arg = function()() {return arguments;} f_arg(1,2,3)[0] === 1. Actual: ' + (f_arg(1,2,3)[0]));\n}\n\n//CHECK#3\nif (f_arg(1,2,3)[1] !== 2) {\n $ERROR('#3: f_arg = function()() {return arguments;} f_arg(1,2,3)[1] === 2. Actual: ' + (f_arg(1,2,3)[1]));\n}\n\n//CHECK#4\nif (f_arg(1,2,3)[2] !== 3) {\n $ERROR('#4: f_arg = function()() {return arguments;} f_arg(1,2,3)[2] === 3. Actual: ' + (f_arg(1,2,3)[2]));\n}\n\n//CHECK#5\nif (f_arg(1,2,3)[3] !== undefined) {\n $ERROR('#5: f_arg = function()() {return arguments;} f_arg(1,2,3)[3] === undefined. Actual: ' + (f_arg(1,2,3)[3]));\n}\n",
+ "id": "S11.2.4_A1.2_T1"
+ },
+ {
+ "section": "11.2.4, 11.2.3, 10.1.8",
+ "description": "Function is declared with FormalParameterList",
+ "test": "f_arg = function(x,y) {\n return arguments;\n}\n\n//CHECK#1\nif (f_arg(1,2,3).length !== 3) {\n $ERROR('#1: f_arg = function(x,y) {return arguments;} f_arg(1,2,3).length === 3. Actual: ' + (f_arg(1,2,3).length));\n}\n\n//CHECK#2\nif (f_arg(1)[0] !== 1) {\n $ERROR('#1: f_arg = function(x,y) {return arguments;} f_arg(1)[0] === 1. Actual: ' + (f_arg(1)[0]));\n}\n\n//CHECK#3\nif (f_arg(1,2)[1] !== 2) {\n $ERROR('#3: f_arg = function(x,y) {return arguments;} f_arg(1,2)[1] === 2. Actual: ' + (f_arg(1,2)[1]));\n}\n\n//CHECK#4\nif (f_arg(1,2,3)[2] !== 3) {\n $ERROR('#4: f_arg = function(x,y) {return arguments;} f_arg(1,2,3)[2] === 3. Actual: ' + (f_arg(1,2,3)[2]));\n}\n\n//CHECK#5\nif (f_arg(1,2,3)[3] !== undefined) {\n $ERROR('#5: f_arg = function(x,y) {return arguments;} f_arg(1,2,3)[3] === undefined. Actual: ' + (f_arg(1,2,3)[3]));\n}\n\n//CHECK#6\nif (f_arg.length !== 2) {\n $ERROR('#6: f_arg = function(x,y) {return arguments;} f_arg.length === 2. Actual: ' + (f_arg.length));\n}\n",
+ "id": "S11.2.4_A1.2_T2"
+ },
+ {
+ "section": "11.2.4, 11.2.3, 10.1.8",
+ "description": "incorrect syntax",
+ "negative": "",
+ "test": "function f_arg() {\n}\n\nf_arg(1,,2);\n",
+ "id": "S11.2.4_A1.3_T1"
+ },
+ {
+ "section": "11.2.4, 11.2.3, 10.1.8",
+ "description": "Return an internal list whose length is one greater than the\nlength of ArgumentList and whose items are the items of ArgumentList, in order,\nfollowed at the end by GetValue(AssignmentExpression), which is the last item of\nthe new list",
+ "test": "function f_arg() {\n}\n\n//CHECK#1\nf_arg(x=1,x);\n",
+ "id": "S11.2.4_A1.4_T1"
+ },
+ {
+ "section": "11.2.4, 11.2.3, 10.1.8",
+ "description": "Return an internal list whose length is one greater than the\nlength of ArgumentList and whose items are the items of ArgumentList, in order,\nfollowed at the end by GetValue(AssignmentExpression), which is the last item of\nthe new list",
+ "test": "function f_arg() {\n}\n\n//CHECK#1\ntry {\n f_arg(x,x=1);\n $ERROR('#1.1: function f_arg() {} f_arg(x,x=1) throw ReferenceError. Actual: ' + (f_arg(x,x=1))); \n}\ncatch (e) {\n if ((e instanceof ReferenceError) !== true) {\n $ERROR('#1.2: function f_arg() {} f_arg(x,x=1) throw ReferenceError. Actual: ' + (e)); \n }\n}\n",
+ "id": "S11.2.4_A1.4_T2"
+ },
+ {
+ "section": "11.2.4, 11.2.3, 10.1.8",
+ "description": "Return an internal list whose length is one greater than the\nlength of ArgumentList and whose items are the items of ArgumentList, in order,\nfollowed at the end by GetValue(AssignmentExpression), which is the last item of\nthe new list",
+ "test": "function f_arg(x,y,z) {\n return z;\n}\n\n//CHECK#1\nif (f_arg(x=1,y=x,x+y) !== 2) {\n $ERROR('#1: function f_arg(x,y,z) {return z;} f_arg(x=1,y=x,x+y) === 2. Actual: ' + (f_arg(x=1,y=x,x+y))); \n}\n",
+ "id": "S11.2.4_A1.4_T3"
+ },
+ {
+ "section": "11.2.4, 11.2.3, 10.1.8",
+ "description": "Return an internal list whose length is one greater than the\nlength of ArgumentList and whose items are the items of ArgumentList, in order,\nfollowed at the end by GetValue(AssignmentExpression), which is the last item of\nthe new list",
+ "test": "var x = function () { throw \"x\"; };\nvar y = function () { throw \"y\"; };\n\nfunction f_arg() {\n}\n\n//CHECK#1\ntry {\n f_arg(x(),y());\n $ERROR('#1.1: var x = { valueOf: function () { throw \"x\"; } }; var y = { valueOf: function () { throw \"y\"; } }; function f_arg() {} f_arg(x(),y()) throw \"x\". Actual: ' + (f_arg(x(),y()))); \n}\ncatch (e) {\n if (e === \"y\") {\n $ERROR('#1.2: First argument is evaluated first, and then second argument');\n } else {\n if (e !== \"x\") {\n $ERROR('#1.3: var x = { valueOf: function () { throw \"x\"; } }; var y = { valueOf: function () { throw \"y\"; } }; function f_arg() {} f_arg(x(),y()) throw \"x\". Actual: ' + (e));\n }\n }\n}\n",
+ "id": "S11.2.4_A1.4_T4"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/11.3.1.json b/website/resources/scripts/testcases2/11.3.1.json
new file mode 100644
index 000000000..5a892a77f
--- /dev/null
+++ b/website/resources/scripts/testcases2/11.3.1.json
@@ -0,0 +1,24 @@
+{
+ "testCollection": {
+ "name": "11.3.1",
+ "numTests": 2,
+ "tests": [
+ {
+ "id": "11.3.1-2-1-s",
+ "path": "TestCases/chapter11/11.3/11.3.1/11.3.1-2-1-s.js",
+ "description": "Strict Mode - SyntaxError is thrown if the identifier 'arguments' appear as a PostfixExpression(arguments++)",
+ "test": "assertTrue((function testcase() {\n \"use strict\";\n var blah = arguments;\n try {\n eval(\"arguments++;\");\n return false;\n } catch (e) {\n return e instanceof SyntaxError && blah === arguments;\n }\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict())",
+ "strict_only": ""
+ },
+ {
+ "id": "11.3.1-2-2-s",
+ "path": "TestCases/chapter11/11.3/11.3.1/11.3.1-2-2-s.js",
+ "description": "Strict Mode - SyntaxError is thrown if the identifier 'eval' appear as a PostfixExpression(eval++)",
+ "test": "assertTrue((function testcase() {\n \"use strict\";\n var blah = eval;\n try {\n eval(\"eval++;\");\n return false;\n } catch (e) {\n return e instanceof SyntaxError && blah === eval;\n }\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict())",
+ "strict_only": ""
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/11.3.1_Postfix_Increment_Operator.json b/website/resources/scripts/testcases2/11.3.1_Postfix_Increment_Operator.json
new file mode 100644
index 000000000..6c1ec9829
--- /dev/null
+++ b/website/resources/scripts/testcases2/11.3.1_Postfix_Increment_Operator.json
@@ -0,0 +1,127 @@
+{
+ "testCollection": {
+ "name": "11.3.1_Postfix_Increment_Operator",
+ "numTests": 19,
+ "tests": [
+ {
+ "section": "11.3.1, 11.6.3, 7.3",
+ "description": "Checking Line Feed",
+ "negative": "",
+ "test": "//CHECK#1\neval(\"var x = 1; x\\u000A++\");\n",
+ "id": "S11.3.1_A1.1_T1"
+ },
+ {
+ "section": "11.3.1, 11.6.3, 7.3",
+ "description": "Carriage Return",
+ "negative": "",
+ "test": "//CHECK#1\neval(\"var x = 1; x\\u000D++\");\n",
+ "id": "S11.3.1_A1.1_T2"
+ },
+ {
+ "section": "11.3.1, 11.6.3, 7.3",
+ "description": "Checking Line Seprator",
+ "negative": "",
+ "test": "//CHECK#1\neval(\"var x = 1; x\\u2028++\");\n",
+ "id": "S11.3.1_A1.1_T3"
+ },
+ {
+ "section": "11.3.1, 11.6.3, 7.3",
+ "description": "Checking Paragraph separator",
+ "negative": "",
+ "test": "//CHECK#1\neval(\"var x = 1; x\\u2029++\");\n",
+ "id": "S11.3.1_A1.1_T4"
+ },
+ {
+ "section": "11.3.1, 11.6.3, 7.2",
+ "description": "Checking by using eval",
+ "test": "//CHECK#1\nif (eval(\"var x = 0; x\\u0009++; x\") !== 1) {\n\t$ERROR('#1: var x = 0; x\\\\u0009++; x === 1. Actual: ' + (x));\n}\n\n//CHECK#2\nif (eval(\"var x = 0; x\\u000B++; x\") !== 1) {\n\t$ERROR('#2: var x = 0; x\\\\u000B++; x === 1. Actual: ' + (x));\t\n}\n\n//CHECK#3\nif (eval(\"var x = 0; x\\u000C++; x\") !== 1) {\n\t$ERROR('#3: var x = 0; x\\\\u000C++; x === 1. Actual: ' + (x));\n}\n\n//CHECK#4\nif (eval(\"var x = 0; x\\u0020++; x\") !== 1) {\n\t$ERROR('#4: var x = 0; x\\\\u0020++; x === 1. Actual: ' + (x));\n}\n\n//CHECK#5\nif (eval(\"var x = 0; x\\u00A0++; x\") !== 1) {\n\t$ERROR('#5: var x = 0; x\\\\u00A0++; x === 1. Actual: ' + (x));\n}\n\n//CHECK#6\nif (eval(\"var x = 0; x\\u0009\\u000B\\u000C\\u0020\\u00A0++; x\") !== 1) {\n $ERROR('#6: var x = 0; x\\\\u0009\\\\u000B\\\\u000C\\\\u0020\\\\u00A0++; x === 1. Actual: ' + (x));\n}\n",
+ "id": "S11.3.1_A1.2_T1"
+ },
+ {
+ "section": "11.3.1, 11.6.3",
+ "description": "Type(x) is Reference and GetBase(x) is not null",
+ "test": "//CHECK#1\nvar x = 1;\nvar y = x++;\nif (y !== 1) {\n $ERROR('#1: var x = 1; var y = x++; y === 1. Actual: ' + (y));\n} else {\n if (x !== 1 + 1) {\n $ERROR('#1: var x = 1; var y = x++; x === 1 + 1. Actual: ' + (x));\n } \n}\n\n//CHECK#2\nthis.x = 1;\nvar y = this.x++; \nif (y !== 1) {\n $ERROR('#2: this.x = 1; var y = this.x++; y === 1. Actual: ' + (y));\n} else {\n if (this.x !== 1 + 1) {\n $ERROR('#2: this.x = 1; var y = this.x++; this.x === 1 + 1. Actual: ' + (this.x));\n } \n}\n\n//CHECK#3\nvar object = new Object();\nobject.prop = 1;\nvar y = object.prop++;\nif (y !== 1) {\n $ERROR('#3: var object = new Object(); object.prop = 1; var y = object.prop++; y === 1. Actual: ' + (y));\n} else {\n if (this.x !== 1 + 1) {\n $ERROR('#3: var object = new Object(); object.prop = 1; var y = object.prop++; object.prop === 1 + 1. Actual: ' + (object.prop));\n } \n}\n\n\n",
+ "id": "S11.3.1_A2.1_T1"
+ },
+ {
+ "section": "11.3.1, 11.6.3",
+ "description": "If GetBase(x) is null, throw ReferenceError",
+ "test": "//CHECK#1\ntry {\n x++;\n $ERROR('#1.1: x++ throw ReferenceError. Actual: ' + (x++)); \n}\ncatch (e) {\n if ((e instanceof ReferenceError) !== true) {\n $ERROR('#1.2: x++ throw ReferenceError. Actual: ' + (e)); \n }\n}\n",
+ "id": "S11.3.1_A2.1_T2"
+ },
+ {
+ "section": "11.3.1, 11.6.3",
+ "description": "If Type(x) is not Reference, throw ReferenceError (or SyntaxError)",
+ "negative": "",
+ "test": "//CHECK#1\ntry {\n 1++;\n $ERROR('#1.1: 1++ throw ReferenceError (or SyntaxError). Actual: ' + (1++)); \n}\ncatch (e) {\n if ((e instanceof ReferenceError) !== true) {\n $ERROR('#1.2: 1++ throw ReferenceError (or SyntaxError). Actual: ' + (e)); \n } else {\n 1++;\n }\n}\n",
+ "id": "S11.3.1_A2.1_T3"
+ },
+ {
+ "section": "11.3.1, 8.6.2.6",
+ "description": "If Type(value) is Object, evaluate ToPrimitive(value, Number)",
+ "test": "//CHECK#1\nvar object = {valueOf: function() {return 1}};\nvar y = object++;\nif (y !== 1) {\n $ERROR('#1: var object = {valueOf: function() {return 1}}; var y = object++; y === 1. Actual: ' + (y));\n} else {\n if (object !== 1 + 1) {\n $ERROR('#1: var object = {valueOf: function() {return 1}}; object++; object === 1 + 1. Actual: ' + (object));\n }\n}\n\n//CHECK#2\nvar object = {valueOf: function() {return 1}, toString: function() {return 0}};\nvar y = object++;\nif (y !== 1) {\n $ERROR('#2: var object = {valueOf: function() {return 1}, toString: function() {return 0}}; var y = object++; y === 1. Actual: ' + (y));\n} else {\n if (object !== 1 + 1) {\n $ERROR('#2: var object = {valueOf: function() {return 1}, toString: function() {return 0}}; object++; object === 1 + 1. Actual: ' + (object));\n }\n}\n\n//CHECK#3\nvar object = {valueOf: function() {return 1}, toString: function() {return {}}};\nvar y = object++;\nif (y !== 1) {\n $ERROR('#3: var object = {valueOf: function() {return 1}, toString: function() {return {}}}; var y = object++; y === 1. Actual: ' + (y));\n} else {\n if (object !== 1 + 1) {\n $ERROR('#3: var object = {valueOf: function() {return 1}, toString: function() {return {}}}; object++; object === 1 + 1. Actual: ' + (object));\n }\n}\n\n//CHECK#4\ntry {\n var object = {valueOf: function() {return 1}, toString: function() {throw \"error\"}};\n var y = object++;\n if (y !== 1) {\n $ERROR('#4.1: var object = {valueOf: function() {return 1}, toString: function() {throw \"error\"}}; var y = object++; y === 1. Actual: ' + (y));\n } else {\n if (object !== 1 + 1) {\n $ERROR('#4.2: var object = {valueOf: function() {return 1}, toString: function() {throw \"error\"}}; object++; object === 1 + 1. Actual: ' + (object));\n }\n }\n}\ncatch (e) {\n if (e === \"error\") {\n $ERROR('#4.3: var object = {valueOf: function() {return 1}, toString: function() {throw \"error\"}}; var y = object++; y not throw \"error\"');\n } else {\n $ERROR('#4.4: var object = {valueOf: function() {return 1}, toString: function() {throw \"error\"}}; var y = object++; y not throw Error. Actual: ' + (e));\n }\n}\n\n//CHECK#5\nvar object = {toString: function() {return 1}};\nvar y = object++;\nif (y !== 1) {\n $ERROR('#5.1: var object = {toString: function() {return 1}}; var y = object++; y === 1. Actual: ' + (y));\n} else {\n if (object !== 1 + 1) {\n $ERROR('#5.2: var object = {toString: function() {return 1}}; object++; object === 1 + 1. Actual: ' + (object));\n }\n}\n\n\n//CHECK#6\nvar object = {valueOf: function() {return {}}, toString: function() {return 1}}\nvar y = object++;\nif (y !== 1) {\n $ERROR('#6.1: var object = {valueOf: function() {return {}}, toString: function() {return 1}}; var y = object++; y === 1. Actual: ' + (y));\n} else {\n if (object !== 1 + 1) {\n $ERROR('#6.2: var object = {valueOf: function() {return {}}, toString: function() {return 1}}; object++; object === 1 + 1. Actual: ' + (object));\n }\n}\n\n//CHECK#7\ntry {\n var object = {valueOf: function() {throw \"error\"}, toString: function() {return 1}};\n var y = object++;\n $ERROR('#7.1: var object = {valueOf: function() {throw \"error\"}, toString: function() {return 1}}; object++ throw \"error\". Actual: ' + (y));\n} \ncatch (e) {\n if (e !== \"error\") {\n $ERROR('#7.2: var object = {valueOf: function() {throw \"error\"}, toString: function() {return 1}}; object++ throw \"error\". Actual: ' + (e));\n } \n}\n\n//CHECK#8\ntry {\n var object = {valueOf: function() {return {}}, toString: function() {return {}}};\n var y = object++;\n $ERROR('#8.1: var object = {valueOf: function() {return {}}, toString: function() {return {}}}; object++ throw TypeError. Actual: ' + (y));\n} \ncatch (e) {\n if ((e instanceof TypeError) !== true) {\n $ERROR('#8.2: var object = {valueOf: function() {return {}}, toString: function() {return {}}}; object++ throw TypeError. Actual: ' + (e));\n } \n}\n",
+ "id": "S11.3.1_A2.2_T1"
+ },
+ {
+ "section": "11.3.1, 11.6.3",
+ "description": "Type(x) is boolean primitive or Boolean object",
+ "test": "//CHECK#1\nvar x = false; \nx++;\nif (x !== 0 + 1) {\n $ERROR('#1: var x = false; x++; x === 0 + 1. Actual: ' + (x));\n}\n\n//CHECK#2\nvar x = new Boolean(true); \nx++; \nif (x !== 1 + 1) {\n $ERROR('#2: var x = new Boolean(true); x++; x === 1 + 1. Actual: ' + (x));\n}\n",
+ "id": "S11.3.1_A3_T1"
+ },
+ {
+ "section": "11.3.1, 11.6.3",
+ "description": "Type(x) is number primitive or Number object",
+ "test": "//CHECK#1\nvar x = 0.1; \nx++;\nif (x !== 0.1 + 1) {\n $ERROR('#1: var x = 0.1; x++; x === 0.1 + 1. Actual: ' + (x));\n}\n\n//CHECK#2\nvar x = new Number(-1.1); \nx++;\nif (x !== -1.1 + 1) {\n $ERROR('#2: var x = new Number(-1.1); x++; x === -1.1 + 1. Actual: ' + (x));\n}\n",
+ "id": "S11.3.1_A3_T2"
+ },
+ {
+ "section": "11.3.1, 11.6.3",
+ "description": "Type(x) is string primitive or String object",
+ "test": "//CHECK#1\nvar x = \"1\"; \nx++;\nif (x !== 1 + 1) {\n $ERROR('#1: var x = \"1\"; x++; x === 1 + 1. Actual: ' + (x));\n}\n\n//CHECK#2\nvar x = \"x\"; \nx++; \nif (isNaN(x) !== true) {\n $ERROR('#2: var x = \"x\"; x++; x === Not-a-Number. Actual: ' + (x));\n}\n\n//CHECK#3\nvar x = new Number(\"-1\"); \nx++; \nif (x !== -1 + 1) {\n $ERROR('#3: var x = new String(\"-1\"); x++; x === -1 + 1. Actual: ' + (x));\n}\n",
+ "id": "S11.3.1_A3_T3"
+ },
+ {
+ "section": "11.3.1, 11.6.3",
+ "description": "Type(x) is undefined or null",
+ "test": "//CHECK#1\nvar x; \nx++; \nif (isNaN(x) !== true) {\n $ERROR('#1: var x; x++; x === Not-a-Number. Actual: ' + (x));\n}\n\n//CHECK#2\nvar x = null; \nx++; \nif (x !== 1) {\n $ERROR('#2: var x = null; x++; x === 1. Actual: ' + (x));\n}\n",
+ "id": "S11.3.1_A3_T4"
+ },
+ {
+ "section": "11.3.1, 11.6.3",
+ "description": "Type(x) is Object object or Function object",
+ "test": "//CHECK#1\nvar x = {}; \nx++; \nif (isNaN(x) !== true) {\n $ERROR('#1: var x = {}; x++; x === Not-a-Number. Actual: ' + (x));\n}\n\n//CHECK#2\nvar x = function(){return 1}; \nx++; \nif (isNaN(x) !== true) {\n $ERROR('#2: var x = function(){return 1}; x++; x === Not-a-Number. Actual: ' + (x));\n}\n",
+ "id": "S11.3.1_A3_T5"
+ },
+ {
+ "section": "11.3.1, 11.6.3",
+ "description": "Type(x) is boolean primitive or Boolean object",
+ "test": "//CHECK#1\nvar x = false;\nvar y = x++;\nif (y !== 0) {\n $ERROR('#1: var x = false; var y = x++; y === 0. Actual: ' + (y));\n}\n\n//CHECK#2\nvar x = new Boolean(true);\nvar y = x++;\nif (y !== 1) {\n $ERROR('#2: var x = new Boolean(true); var y = x++; y === 1. Actual: ' + (y));\n}\n",
+ "id": "S11.3.1_A4_T1"
+ },
+ {
+ "section": "11.3.1, 11.6.3",
+ "description": "Type(x) is number primitive or Number object",
+ "test": "//CHECK#1\nvar x = -0.1;\nvar y = x++;\nif (y !== -0.1) {\n $ERROR('#1: var x = -0.1; var y = x++; y === -0.1. Actual: ' + (y));\n}\n\n//CHECK#2\nvar x = new Number(1.1);\nvar y = x++;\nif (y !== 1.1) {\n $ERROR('#2: var x = new Number(1.1); var y = x++; y === 1.1. Actual: ' + (y));\n}\n",
+ "id": "S11.3.1_A4_T2"
+ },
+ {
+ "section": "11.3.1, 11.6.3",
+ "description": "Type(x) is string primitive or String object",
+ "test": "//CHECK#1\nvar x = \"1\";\nvar y = x++;\nif (y !== 1) {\n $ERROR('#1: var x = \"1\"; var y = x++; y === 1. Actual: ' + (y));\n}\n\n//CHECK#2\nvar x = \"x\";\nvar y = x++; \nif (isNaN(y) !== true) {\n $ERROR('#2: var x = \"x\"; var y = x++; y === Not-a-Number. Actual: ' + (y));\n}\n\n//CHECK#3\nvar x = new String(\"-1\"); \nvar y = x++;\nif (y !== -1) {\n $ERROR('#3: var x = new String(\"-1\"); var y = x++; y === -1. Actual: ' + (y));\n}\n",
+ "id": "S11.3.1_A4_T3"
+ },
+ {
+ "section": "11.3.1, 11.6.3",
+ "description": "Type(x) is undefined or null",
+ "test": "//CHECK#1\nvar x;\nvar y = x++;\nif (isNaN(y) !== true) {\n $ERROR('#1: var x; var y = x++; y === Not-a-Number. Actual: ' + (y));\n}\n\n//CHECK#2\nvar x = null;\nvar y = x++;\nif (y !== 0) {\n $ERROR('#2: var x = null; var y = x++; y === 0. Actual: ' + (y));\n}\n",
+ "id": "S11.3.1_A4_T4"
+ },
+ {
+ "section": "11.3.1, 11.6.3",
+ "description": "Type(x) is Object object or Function object",
+ "test": "//CHECK#1\nvar x = {}; \nvar y = x++;\nif (isNaN(y) !== true) {\n $ERROR('#1: var x = {}; var y = x++; y === Not-a-Number. Actual: ' + (y));\n}\n\n//CHECK#2\nvar x = function(){return 1}; \nvar y = x++;\nif (isNaN(y) !== true) {\n $ERROR('#2: var x = function(){return 1}; var y = x++; y === Not-a-Number. Actual: ' + (y));\n}\n",
+ "id": "S11.3.1_A4_T5"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/11.3.2.json b/website/resources/scripts/testcases2/11.3.2.json
new file mode 100644
index 000000000..82d5244bc
--- /dev/null
+++ b/website/resources/scripts/testcases2/11.3.2.json
@@ -0,0 +1,24 @@
+{
+ "testCollection": {
+ "name": "11.3.2",
+ "numTests": 2,
+ "tests": [
+ {
+ "id": "11.3.2-2-1-s",
+ "path": "TestCases/chapter11/11.3/11.3.2/11.3.2-2-1-s.js",
+ "description": "Strict Mode - SyntaxError is thrown if the identifier 'arguments' appear as a PostfixExpression(arguments--)",
+ "test": "assertTrue((function testcase() {\n \"use strict\";\n var blah = arguments;\n try {\n eval(\"arguments--;\");\n return false;\n } catch (e) {\n return e instanceof SyntaxError && blah === arguments;\n }\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict())",
+ "strict_only": ""
+ },
+ {
+ "id": "11.3.2-2-2-s",
+ "path": "TestCases/chapter11/11.3/11.3.2/11.3.2-2-2-s.js",
+ "description": "Strict Mode - SyntaxError is thrown if the identifier 'eval' appear as a PostfixExpression(eval--)",
+ "test": "assertTrue((function testcase() {\n \"use strict\";\n var blah = eval;\n try {\n eval(\"eval--;\");\n return false;\n } catch (e) {\n return e instanceof SyntaxError && blah === eval;\n }\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict())",
+ "strict_only": ""
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/11.3.2_Postfix_Decrement_Operator.json b/website/resources/scripts/testcases2/11.3.2_Postfix_Decrement_Operator.json
new file mode 100644
index 000000000..58c8b5a7f
--- /dev/null
+++ b/website/resources/scripts/testcases2/11.3.2_Postfix_Decrement_Operator.json
@@ -0,0 +1,127 @@
+{
+ "testCollection": {
+ "name": "11.3.2_Postfix_Decrement_Operator",
+ "numTests": 19,
+ "tests": [
+ {
+ "section": "11.3.2, 11.6.3, 7.3",
+ "description": "Checking Line Feed",
+ "negative": "",
+ "test": "//CHECK#1\neval(\"var x = 1; x\\u000A--\");\n",
+ "id": "S11.3.2_A1.1_T1"
+ },
+ {
+ "section": "11.3.2, 11.6.3, 7.3",
+ "description": "Checking Carriage Return",
+ "negative": "",
+ "test": "//CHECK#1\neval(\"var x = 1; x\\u000D--\");\n",
+ "id": "S11.3.2_A1.1_T2"
+ },
+ {
+ "section": "11.3.2, 11.6.3, 7.3",
+ "description": "Checking Page separator",
+ "negative": "",
+ "test": "//CHECK#1\neval(\"var x = 1; x\\u2028--\");\n",
+ "id": "S11.3.2_A1.1_T3"
+ },
+ {
+ "section": "11.3.2, 11.6.3, 7.3",
+ "description": "Checking Line separator",
+ "negative": "",
+ "test": "//CHECK#1\neval(\"var x = 1; x\\u2029--\");\n",
+ "id": "S11.3.2_A1.1_T4"
+ },
+ {
+ "section": "11.3.2, 11.6.3, 7.2",
+ "description": "Checking by using eval",
+ "test": "//CHECK#1\nif (eval(\"var x = 0; x\\u0009--; x\") !== -1) {\n $ERROR('#1: var x = 0; x\\\\u0009--; x === -1. Actual: ' + (x));\n}\n\n//CHECK#2\nif (eval(\"var x = 0; x\\u000B--; x\") !== -1) {\n $ERROR('#2: var x = 0; x\\\\u000B--; x === -1. Actual: ' + (x)); \n}\n\n//CHECK#3\nif (eval(\"var x = 0; x\\u000C--; x\") !== -1) {\n $ERROR('#3: var x = 0; x\\\\u000C--; x === -1. Actual: ' + (x));\n}\n\n//CHECK#4\nif (eval(\"var x = 0; x\\u0020--; x\") !== -1) {\n $ERROR('#4: var x = 0; x\\\\u0020--; x === -1. Actual: ' + (x));\n}\n\n//CHECK#5\nif (eval(\"var x = 0; x\\u00A0--; x\") !== -1) {\n $ERROR('#5: var x = 0; x\\\\u00A0--; x === -1. Actual: ' + (x));\n}\n\n//CHECK#6\nif (eval(\"var x = 0; x\\u0009\\u000B\\u000C\\u0020\\u00A0--; x\") !== -1) {\n $ERROR('#6: var x = 0; x\\\\u0009\\\\u000B\\\\u000C\\\\u0020\\\\u00A0--; x === -1. Actual: ' + (x));\n}\n",
+ "id": "S11.3.2_A1.2_T1"
+ },
+ {
+ "section": "11.3.2, 11.6.3",
+ "description": "Type(x) is Reference and GetBase(x) is not null",
+ "test": "//CHECK#1\nvar x = 1;\nif (x-- !== 1) {\n $ERROR('#1: var x = 1; x-- === 1. Actual: ' + (x--));\n} else {\n if (x !== 1 - 1) {\n $ERROR('#1: var x = 1; x--; x === 1 - 1. Actual: ' + (x));\n } \n}\n\n//CHECK#2\nthis.x = 1;\nif (this.x-- !== 1) {\n $ERROR('#2: this.x = 1; this.x-- === 1. Actual: ' + (this.x--));\n} else {\n if (this.x !== 1 - 1) {\n $ERROR('#2: this.x = 1; this.x--; this.x === 1 - 1. Actual: ' + (this.x));\n } \n}\n\n//CHECK#3\nvar object = new Object();\nobject.prop = 1;\nif (object.prop-- !== 1) {\n $ERROR('#3: var object = new Object(); object.prop = 1; object.prop-- === 1. Actual: ' + (object.prop--));\n} else {\n if (this.x !== 1 - 1) {\n $ERROR('#3: var object = new Object(); object.prop = 1; object.prop--; object.prop === 1 - 1. Actual: ' + (object.prop));\n } \n}\n",
+ "id": "S11.3.2_A2.1_T1"
+ },
+ {
+ "section": "11.3.2, 11.6.3",
+ "description": "If GetBase(x) is null, throw ReferenceError",
+ "test": "//CHECK#1\ntry {\n x--;\n $ERROR('#1.1: x-- throw ReferenceError. Actual: ' + (x--)); \n}\ncatch (e) {\n if ((e instanceof ReferenceError) !== true) {\n $ERROR('#1.2: x-- throw ReferenceError. Actual: ' + (e)); \n }\n}\n",
+ "id": "S11.3.2_A2.1_T2"
+ },
+ {
+ "section": "11.3.2, 11.6.3",
+ "description": "If Type(x) is not Reference, throw ReferenceError (or SyntaxError)",
+ "negative": "",
+ "test": "//CHECK#1\ntry {\n 1--;\n $ERROR('#1.1: 1-- throw ReferenceError (or SyntaxError). Actual: ' + (1--)); \n}\ncatch (e) {\n if ((e instanceof ReferenceError) !== true) {\n $ERROR('#1.2: 1-- throw ReferenceError (or SyntaxError). Actual: ' + (e)); \n } else {\n 1--;\n }\n}\n",
+ "id": "S11.3.2_A2.1_T3"
+ },
+ {
+ "section": "11.3.2, 8.6.2.6",
+ "description": "If Type(value) is Object, evaluate ToPrimitive(value, Number)",
+ "test": "//CHECK#1\nvar object = {valueOf: function() {return 1}};\nvar y = object--;\nif (y !== 1) {\n $ERROR('#1: var object = {valueOf: function() {return 1}}; var y = object--; y === 1. Actual: ' + (y));\n} else {\n if (object !== 1 - 1) {\n $ERROR('#1: var object = {valueOf: function() {return 1}}; object--; object === 1 - 1. Actual: ' + (object));\n }\n}\n\n//CHECK#2\nvar object = {valueOf: function() {return 1}, toString: function() {return 0}};\nvar y = object--;\nif (y !== 1) {\n $ERROR('#2: var object = {valueOf: function() {return 1}, toString: function() {return 0}}; var y = object--; y === 1. Actual: ' + (y));\n} else {\n if (object !== 1 - 1) {\n $ERROR('#2: var object = {valueOf: function() {return 1}, toString: function() {return 0}}; object--; object === 1 - 1. Actual: ' + (object));\n }\n}\n\n//CHECK#3\nvar object = {valueOf: function() {return 1}, toString: function() {return {}}};\nvar y = object--;\nif (y !== 1) {\n $ERROR('#3: var object = {valueOf: function() {return 1}, toString: function() {return {}}}; var y = object--; y === 1. Actual: ' + (y));\n} else {\n if (object !== 1 - 1) {\n $ERROR('#3: var object = {valueOf: function() {return 1}, toString: function() {return {}}}; object--; object === 1 - 1. Actual: ' + (object));\n }\n}\n\n//CHECK#4\ntry {\n var object = {valueOf: function() {return 1}, toString: function() {throw \"error\"}};\n var y = object--;\n if (y !== 1) {\n $ERROR('#4.1: var object = {valueOf: function() {return 1}, toString: function() {throw \"error\"}}; var y = object--; y === 1. Actual: ' + (y));\n } else {\n if (object !== 1 - 1) {\n $ERROR('#4.2: var object = {valueOf: function() {return 1}, toString: function() {throw \"error\"}}; object--; object === 1 - 1. Actual: ' + (object));\n }\n }\n}\ncatch (e) {\n if (e === \"error\") {\n $ERROR('#4.3: var object = {valueOf: function() {return 1}, toString: function() {throw \"error\"}}; y not throw \"error\"');\n } else {\n $ERROR('#4.4: var object = {valueOf: function() {return 1}, toString: function() {throw \"error\"}}; y not throw Error. Actual: ' + (e));\n }\n}\n\n//CHECK#5\nvar object = {toString: function() {return 1}};\nvar y = object--;\nif (y !== 1) {\n $ERROR('#5.1: var object = {toString: function() {return 1}}; var y = object--; y === 1. Actual: ' + (y));\n} else {\n if (object !== 1 - 1) {\n $ERROR('#5.2: var object = {toString: function() {return 1}}; object--; object === 1 - 1. Actual: ' + (object));\n }\n}\n\n\n//CHECK#6\nvar object = {valueOf: function() {return {}}, toString: function() {return 1}}\nvar y = object--;\nif (y !== 1) {\n $ERROR('#6.1: var object = {valueOf: function() {return {}}, toString: function() {return 1}}; var y = object--; y === 1. Actual: ' + (y));\n} else {\n if (object !== 1 - 1) {\n $ERROR('#6.2: var object = {valueOf: function() {return {}}, toString: function() {return 1}}; object--; object === 1 - 1. Actual: ' + (object));\n }\n}\n\n//CHECK#7\ntry {\n var object = {valueOf: function() {throw \"error\"}, toString: function() {return 1}};\n var y = object--;\n $ERROR('#7.1: var object = {valueOf: function() {throw \"error\"}, toString: function() {return 1}}; object-- throw \"error\". Actual: ' + (y));\n} \ncatch (e) {\n if (e !== \"error\") {\n $ERROR('#7.2: var object = {valueOf: function() {throw \"error\"}, toString: function() {return 1}}; object-- throw \"error\". Actual: ' + (e));\n } \n}\n\n//CHECK#8\ntry {\n var object = {valueOf: function() {return {}}, toString: function() {return {}}};\n var y = object--;\n $ERROR('#8.1: var object = {valueOf: function() {return {}}, toString: function() {return {}}}; object-- throw TypeError. Actual: ' + (y));\n} \ncatch (e) {\n if ((e instanceof TypeError) !== true) {\n $ERROR('#8.2: var object = {valueOf: function() {return {}}, toString: function() {return {}}}; object-- throw TypeError. Actual: ' + (e));\n } \n}\n",
+ "id": "S11.3.2_A2.2_T1"
+ },
+ {
+ "section": "11.3.2, 11.6.3",
+ "description": "Type(x) is boolean primitive or Boolean object",
+ "test": "//CHECK#1\nvar x = true; \nx--;\nif (x !== 0) {\n $ERROR('#1: var x = true; x--; x === 0. Actual: ' + (x));\n}\n\n//CHECK#2\nvar x = new Boolean(false); \nx--;\nif (x !== 0 - 1) {\n $ERROR('#2: var x = new Boolean(false); x--; x === 0 - 1. Actual: ' + (x));\n}\n",
+ "id": "S11.3.2_A3_T1"
+ },
+ {
+ "section": "11.3.2, 11.6.3",
+ "description": "Type(x) is number primitive or Number object",
+ "test": "//CHECK#1\nvar x = 1.1; \nx--;\nif (x !== 1.1 - 1) {\n $ERROR('#1: var x = 1.1; x--; x === 1.1 - 1. Actual: ' + (x));\n}\n\n//CHECK#2\nvar x = new Number(-0.1); \nx--; \nif (x !== -0.1 - 1) {\n $ERROR('#2: var x = new Number(-0.1); x--; x === -0.1 - 1. Actual: ' + (x));\n}\n",
+ "id": "S11.3.2_A3_T2"
+ },
+ {
+ "section": "11.3.2, 11.6.3",
+ "description": "Type(x) is string primitive or String object",
+ "test": "//CHECK#1\nvar x = \"1\"; \nx--; \nif (x !== 1 - 1) {\n $ERROR('#1: var x = \"1\"; x--; x === 1 - 1. Actual: ' + (x));\n}\n\n//CHECK#2\nvar x = \"x\"; \nx--; \nif (isNaN(x) !== true) {\n $ERROR('#2: var x = \"x\"; x--; x === Not-a-Number. Actual: ' + (x));\n}\n\n//CHECK#3\nvar x = new Number(\"-1\"); \nx--;\nif (x !== -1 - 1) {\n $ERROR('#3: var x = new String(\"-1\"); x--; x === -1 - 1. Actual: ' + (x));\n}\n",
+ "id": "S11.3.2_A3_T3"
+ },
+ {
+ "section": "11.3.2, 11.6.3",
+ "description": "Type(x) is undefined or null",
+ "test": "//CHECK#1\nvar x; \nx--;\nif (isNaN(x) !== true) {\n $ERROR('#1: var x; x--; x === Not-a-Number. Actual: ' + (x));\n}\n\n//CHECK#2\nvar x = null; \nx--;\nif (x !== -1) {\n $ERROR('#2: var x = null; x--; x === -1. Actual: ' + (x));\n}\n",
+ "id": "S11.3.2_A3_T4"
+ },
+ {
+ "section": "11.3.2, 11.6.3",
+ "description": "Type(x) is Object object or Function object",
+ "test": "//CHECK#1\nvar x = {}; \nx--; \nif (isNaN(x) !== true) {\n $ERROR('#1: var x = {}; x--; x === Not-a-Number. Actual: ' + (x));\n}\n\n//CHECK#2\nvar x = function(){return 1}; \nx--; \nif (isNaN(x) !== true) {\n $ERROR('#2: var x = function(){return 1}; x--; x === Not-a-Number. Actual: ' + (x));\n}\n",
+ "id": "S11.3.2_A3_T5"
+ },
+ {
+ "section": "11.3.2, 11.6.3",
+ "description": "Type(x) is boolean primitive or Boolean object",
+ "test": "//CHECK#1\nvar x = true;\nvar y = x--; \nif (y !== 1) {\n $ERROR('#1: var x = true; var y = x--; y === 1. Actual: ' + (y));\n}\n\n//CHECK#2\nvar x = new Boolean(false);\nvar y = x--;\nif (y !== 0) {\n $ERROR('#2: var x = new Boolean(false); var y = x--; y === 0. Actual: ' + (y));\n}\n",
+ "id": "S11.3.2_A4_T1"
+ },
+ {
+ "section": "11.3.2, 11.6.3",
+ "description": "Type(x) is number primitive or Number object",
+ "test": "//CHECK#1\nvar x = 1.1;\nvar y = x--;\nif (y !== 1.1) {\n $ERROR('#1: var x = 1.1; var y = x--; y === 1.1. Actual: ' + (y));\n}\n\n//CHECK#2\nvar x = new Number(-0.1);\nvar y = x--;\nif (y !== -0.1) {\n $ERROR('#2: var x = new Number(-0.1); var y = x--; y === -0.1. Actual: ' + (y));\n}\n",
+ "id": "S11.3.2_A4_T2"
+ },
+ {
+ "section": "11.3.2, 11.6.3",
+ "description": "Type(x) is string primitive or String object",
+ "test": "//CHECK#1\nvar x = \"1\"; \nvar y = x--;\nif (y !== 1) {\n $ERROR('#1: var x = \"1\"; var y = x--; y === 1. Actual: ' + (y));\n}\n\n//CHECK#2\nvar x = \"x\";\nvar y = x--;\nif (isNaN(y) !== true) {\n $ERROR('#2: var x = \"x\"; var y = x--; y === Not-a-Number. Actual: ' + (y));\n}\n\n//CHECK#3\nvar x = new String(\"-1\");\nvar y = x--;\nif (y !== -1) {\n $ERROR('#3: var x = new String(\"-1\"); var y = x--; y === -1. Actual: ' + (y));\n}\n",
+ "id": "S11.3.2_A4_T3"
+ },
+ {
+ "section": "11.3.2, 11.6.3",
+ "description": "If Type(x) is undefined or null",
+ "test": "//CHECK#1\nvar x; \nvar y = x--;\nif (isNaN(y) !== true) {\n $ERROR('#1: var x; var y = x--; y === Not-a-Number. Actual: ' + (y));\n}\n\n//CHECK#2\nvar x = null;\nvar y = x--;\nif (y !== 0) {\n $ERROR('#2: var x = null; var y = x--; y === 0. Actual: ' + (y));\n}\n",
+ "id": "S11.3.2_A4_T4"
+ },
+ {
+ "section": "11.3.2, 11.6.3",
+ "description": "Type(x) is Object object or Function object",
+ "test": "//CHECK#1\nvar x = {};\nvar y = x--; \nif (isNaN(y) !== true) {\n $ERROR('#1: var x = {}; var y = x--; y === Not-a-Number. Actual: ' + (y));\n}\n\n//CHECK#2\nvar x = function(){return 1};\nvar y = x--; \nif (isNaN(y) !== true) {\n $ERROR('#2: var x = function(){return 1}; var y = x--; y === Not-a-Number. Actual: ' + (y));\n}\n",
+ "id": "S11.3.2_A4_T5"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/11.4.1.json b/website/resources/scripts/testcases2/11.4.1.json
new file mode 100644
index 000000000..5e1adf26b
--- /dev/null
+++ b/website/resources/scripts/testcases2/11.4.1.json
@@ -0,0 +1,470 @@
+{
+ "testCollection": {
+ "name": "11.4.1",
+ "numTests": 65,
+ "tests": [
+ {
+ "id": "11.4.1-0-1",
+ "path": "TestCases/chapter11/11.4/11.4.1/11.4.1-0-1.js",
+ "description": "delete operator as UnaryExpression",
+ "test": "assertTrue((function testcase() {\n var x = 1;\n var y = 2;\n var z = 3;\n \n if( (!delete x || delete y) &&\n delete delete z)\n {\n return true;\n } \n }).call(this));\n"
+ },
+ {
+ "id": "11.4.1-2-1",
+ "path": "TestCases/chapter11/11.4/11.4.1/11.4.1-2-1.js",
+ "description": "delete operator returns true when deleting a non-reference (number)",
+ "test": "assertTrue((function testcase() {\n var d = delete 42;\n if (d === true) {\n return true;\n }\n }).call(this));\n"
+ },
+ {
+ "id": "11.4.1-2-2",
+ "path": "TestCases/chapter11/11.4/11.4.1/11.4.1-2-2.js",
+ "description": "delete operator returns true when deleting returned value from a function",
+ "test": "assertTrue((function testcase() {\n var bIsFooCalled = false;\n var foo = function(){bIsFooCalled = true;};\n\n var d = delete foo();\n if(d === true && bIsFooCalled === true)\n return true;\n }).call(this));\n"
+ },
+ {
+ "id": "11.4.1-2-3",
+ "path": "TestCases/chapter11/11.4/11.4.1/11.4.1-2-3.js",
+ "description": "delete operator returns true when deleting a non-reference (boolean)",
+ "test": "assertTrue((function testcase() {\n var d = delete true;\n if (d === true) {\n return true;\n }\n }).call(this));\n"
+ },
+ {
+ "id": "11.4.1-2-4",
+ "path": "TestCases/chapter11/11.4/11.4.1/11.4.1-2-4.js",
+ "description": "delete operator returns true when deleting a non-reference (string)",
+ "test": "assertTrue((function testcase() {\n var d = delete \"abc\";\n if (d === true) {\n return true;\n }\n }).call(this));\n"
+ },
+ {
+ "id": "11.4.1-2-5",
+ "path": "TestCases/chapter11/11.4/11.4.1/11.4.1-2-5.js",
+ "description": "delete operator returns true when deleting a non-reference (obj)",
+ "test": "assertTrue((function testcase() {\n var d = delete {a:0} ;\n if (d === true) {\n return true;\n }\n }).call(this));\n"
+ },
+ {
+ "id": "11.4.1-2-6",
+ "path": "TestCases/chapter11/11.4/11.4.1/11.4.1-2-6.js",
+ "description": "delete operator returns true when deleting a non-reference (null)",
+ "test": "assertTrue((function testcase() {\n var d = delete null;\n if (d === true) {\n return true;\n }\n }).call(this));\n"
+ },
+ {
+ "id": "11.4.1-3-1",
+ "path": "TestCases/chapter11/11.4/11.4.1/11.4.1-3-1.js",
+ "description": "delete operator returns true when deleting an unresolvable reference",
+ "test": "assertTrue((function testcase() {\n // just cooking up a long/veryLikely unique name\n var d = delete __ES3_1_test_suite_test_11_4_1_3_unique_id_0__;\n if (d === true) {\n return true;\n }\n }).call(this));\n"
+ },
+ {
+ "id": "11.4.1-3-2",
+ "path": "TestCases/chapter11/11.4/11.4.1/11.4.1-3-2.js",
+ "description": "delete operator throws ReferenceError when deleting an explicitly qualified yet unresolvable reference (base obj undefined)",
+ "test": "assertTrue((function testcase() {\n // just cooking up a long/veryLikely unique name\n try\n {\n var d = delete __ES3_1_test_suite_test_11_4_1_3_unique_id_2__.x;\n }\n catch(e)\n {\n if (e instanceof ReferenceError)\n return true;\n }\n }).call(this));\n"
+ },
+ {
+ "id": "11.4.1-3-3",
+ "path": "TestCases/chapter11/11.4/11.4.1/11.4.1-3-3.js",
+ "description": "delete operator returns true when deleting an explicitly qualified yet unresolvable reference (property undefined for base obj)",
+ "test": "assertTrue((function testcase() {\n var __ES3_1_test_suite_test_11_4_1_3_unique_id_3__ = {};\n var d = delete __ES3_1_test_suite_test_11_4_1_3_unique_id_3__.x;\n if (d === true) {\n return true;\n }\n }).call(this));\n"
+ },
+ {
+ "id": "11.4.1-3-a-1-s",
+ "path": "TestCases/chapter11/11.4/11.4.1/11.4.1-3-a-1-s.js",
+ "description": "Strict Mode - SyntaxError is thrown when deleting an un-resolvable reference",
+ "test": "assertTrue((function testcase() {\n \"use strict\";\n\n try {\n eval(\"delete obj\");\n return false;\n } catch (e) {\n return e instanceof SyntaxError;\n }\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict())",
+ "strict_only": ""
+ },
+ {
+ "id": "11.4.1-4-a-1-s",
+ "path": "TestCases/chapter11/11.4/11.4.1/11.4.1-4-a-1-s.js",
+ "description": "Strict Mode - TypeError is thrown when deleting non-configurable data property",
+ "test": "assertTrue((function testcase() {\n \"use strict\";\n var obj = {};\n Object.defineProperty(obj, \"prop\", {\n value: \"abc\",\n configurable: false\n });\n\n try {\n delete obj.prop;\n return false;\n } catch (e) {\n return e instanceof TypeError && obj.prop === \"abc\";\n }\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict())",
+ "strict_only": ""
+ },
+ {
+ "id": "11.4.1-4-a-2-s",
+ "path": "TestCases/chapter11/11.4/11.4.1/11.4.1-4-a-2-s.js",
+ "description": "Strict Mode - TypeError is thrown when deleting non-configurable accessor property",
+ "test": "assertTrue((function testcase() {\n \"use strict\";\n var obj = {};\n Object.defineProperty(obj, \"prop\", {\n get: function () {\n return \"abc\"; \n },\n configurable: false\n });\n\n try {\n delete obj.prop;\n return false;\n } catch (e) {\n return e instanceof TypeError && obj.prop === \"abc\";\n }\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict())",
+ "strict_only": ""
+ },
+ {
+ "id": "11.4.1-4-a-3-s",
+ "path": "TestCases/chapter11/11.4/11.4.1/11.4.1-4-a-3-s.js",
+ "description": "Strict Mode - TypeError isn't thrown when deleting configurable data property",
+ "test": "assertTrue((function testcase() {\n \"use strict\";\n var obj = {};\n Object.defineProperty(obj, \"prop\", {\n value: \"abc\",\n configurable: true\n });\n\n delete obj.prop;\n return !obj.hasOwnProperty(\"prop\");\n }).call(this));\n",
+ "strict_only": ""
+ },
+ {
+ "id": "11.4.1-4-a-4-s",
+ "path": "TestCases/chapter11/11.4/11.4.1/11.4.1-4-a-4-s.js",
+ "description": "Strict Mode - TypeError isn't thrown when deleting configurable accessor property",
+ "test": "assertTrue((function testcase() {\n \"use strict\";\n var obj = {};\n Object.defineProperty(obj, \"prop\", {\n get: function () {\n return \"abc\"; \n },\n configurable: true\n });\n\n delete obj.prop;\n return !obj.hasOwnProperty(\"prop\");\n }).call(this));\n",
+ "strict_only": ""
+ },
+ {
+ "id": "11.4.1-4.a-1",
+ "path": "TestCases/chapter11/11.4/11.4.1/11.4.1-4.a-1.js",
+ "description": "delete operator returns true when deleting a configurable data property",
+ "test": "assertTrue((function testcase() {\n var o = {};\n\n var desc = { value: 1, configurable: true };\n Object.defineProperty(o, \"foo\", desc);\n\n var d = delete o.foo;\n if (d === true && o.hasOwnProperty(\"foo\") === false) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "((fnExists(Object.defineProperty) && fnExists(Object.hasOwnProperty)))"
+ },
+ {
+ "id": "11.4.1-4.a-10",
+ "path": "TestCases/chapter11/11.4/11.4.1/11.4.1-4.a-10.js",
+ "description": "delete operator returns true for property (stringify) defined on built-in object (JSON)",
+ "test": "assertTrue((function testcase() {\n try {\n var o = JSON.stringify;\n\t var desc;\n\t try {\n\t \tdesc = Object.getOwnPropertyDescriptor(JSON, 'stringify')\n\t } \n\t catch (e) {\n\t };\n var d = delete JSON.stringify;\n if (d === true && JSON.stringify === undefined) {\n return true;\n }\n } finally {\n if (desc) Object.defineProperty(JSON, 'stringify', desc)\n\telse JSON.stringify = o /* this branch messes up the attributes */;\n }\n }).call(this));\n"
+ },
+ {
+ "id": "11.4.1-4.a-11",
+ "path": "TestCases/chapter11/11.4/11.4.1/11.4.1-4.a-11.js",
+ "description": "delete operator returns true on deleting arguments propterties(arguments.callee)",
+ "test": "assertTrue((function testcase() {\n function foo(a,b)\n {\n return (delete arguments.callee); \n }\n var d = delete arguments.callee;\n if(d === true && arguments.callee === undefined)\n return true;\n }).call(this));\n"
+ },
+ {
+ "id": "11.4.1-4.a-12",
+ "path": "TestCases/chapter11/11.4/11.4.1/11.4.1-4.a-12.js",
+ "description": "delete operator returns false when deleting a property(length)",
+ "test": "assertTrue((function testcase() {\n\n var a = [1,2,3]\n a.x = 10;\n var d = delete a.length\n if(d === false && a.length === 3)\n return true;\n }).call(this));\n"
+ },
+ {
+ "id": "11.4.1-4.a-13",
+ "path": "TestCases/chapter11/11.4/11.4.1/11.4.1-4.a-13.js",
+ "description": "delete operator returns false when deleting Array object",
+ "test": "assertTrue((function testcase() {\n\n var a = [1,2,3]\n a.x = 10;\n\n var d = delete a \n\n if(d === false && Array.isArray(a) === true)\n return true;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.isArray))"
+ },
+ {
+ "id": "11.4.1-4.a-14",
+ "path": "TestCases/chapter11/11.4/11.4.1/11.4.1-4.a-14.js",
+ "description": "delete operator returns true when deleting Array elements",
+ "test": "assertTrue((function testcase() {\n\n var a = [1,2,3]\n a.x = 10;\n var d = delete a[1]\n if(d === true && a[1] === undefined)\n return true;\n }).call(this));\n"
+ },
+ {
+ "id": "11.4.1-4.a-15",
+ "path": "TestCases/chapter11/11.4/11.4.1/11.4.1-4.a-15.js",
+ "description": "delete operator returns true when deleting Array expandos",
+ "test": "assertTrue((function testcase() {\n\n var a = [1,2,3]\n a.x = 10;\n var d = delete a.x;\n if( d === true && a.x === undefined)\n return true;\n }).call(this));\n"
+ },
+ {
+ "id": "11.4.1-4.a-16",
+ "path": "TestCases/chapter11/11.4/11.4.1/11.4.1-4.a-16.js",
+ "description": "delete operator returns false on deleting arguments object",
+ "test": "assertTrue((function testcase() {\n\n if(delete arguments === false && arguments !== undefined)\n return true;\n }).call(this));\n"
+ },
+ {
+ "id": "11.4.1-4.a-17",
+ "path": "TestCases/chapter11/11.4/11.4.1/11.4.1-4.a-17.js",
+ "description": "delete operator returns true on deleting a arguments element",
+ "test": "assertTrue((function testcase() {\n function foo(a,b)\n {\n var d = delete arguments[0];\n return (d === true && arguments[0] === undefined); \n }\n\n if(foo(1,2) === true)\n return true;\n }).call(this));\n"
+ },
+ {
+ "id": "11.4.1-4.a-2",
+ "path": "TestCases/chapter11/11.4/11.4.1/11.4.1-4.a-2.js",
+ "description": "delete operator returns true when deleting a configurable accessor property",
+ "test": "assertTrue((function testcase() {\n var o = {};\n\n // define an accessor\n // dummy getter\n var getter = function () { return 1; }\n var desc = { get: getter, configurable: true };\n Object.defineProperty(o, \"foo\", desc);\n \n var d = delete o.foo;\n if (d === true && o.hasOwnProperty(\"foo\") === false) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "((fnExists(Object.defineProperty) && fnExists(Object.hasOwnProperty)))"
+ },
+ {
+ "id": "11.4.1-4.a-3-s",
+ "path": "TestCases/chapter11/11.4/11.4.1/11.4.1-4.a-3-s.js",
+ "description": "delete operator throws TypeError when deleting a non-configurable data property in strict mode",
+ "test": "assertTrue((function testcase() {\n 'use strict';\n\n var o = {};\n var desc = { value : 1 }; // all other attributes default to false\n Object.defineProperty(o, \"foo\", desc);\n \n // Now, deleting o.foo should throw TypeError because [[Configurable]] on foo is false.\n try {\n delete o.foo;\n return false;\n }\n catch (e) {\n return (e instanceof TypeError);\n }\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict() && fnExists(Object.defineProperty))",
+ "strict_only": ""
+ },
+ {
+ "id": "11.4.1-4.a-3",
+ "path": "TestCases/chapter11/11.4/11.4.1/11.4.1-4.a-3.js",
+ "description": "delete operator returns false when deleting a non-configurable data property",
+ "test": "assertTrue((function testcase() {\n var o = {};\n var desc = { value : 1, configurable: false }; // all other attributes default to false\n Object.defineProperty(o, \"foo\", desc);\n \n // Now, deleting o.foo should fail because [[Configurable]] on foo is false.\n var d = delete o.foo;\n if (d === false && o.hasOwnProperty(\"foo\") === true) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "((fnExists(Object.defineProperty) && fnExists(Object.hasOwnProperty)))"
+ },
+ {
+ "id": "11.4.1-4.a-4",
+ "path": "TestCases/chapter11/11.4/11.4.1/11.4.1-4.a-4.js",
+ "description": "delete operator returns false when deleting a non-configurable data property (NaN)",
+ "test": "assertTrue((function testcase() {\n // NaN (15.1.1.1) has [[Configurable]] set to false.\n var d = delete NaN;\n if (d === false) {\n return true;\n }\n }).call(this));\n"
+ },
+ {
+ "id": "11.4.1-4.a-5",
+ "path": "TestCases/chapter11/11.4/11.4.1/11.4.1-4.a-5.js",
+ "description": "delete operator returns false when deleting the environment object inside 'with'",
+ "test": "assertTrue((function testcase() {\n var o = new Object();\n o.x = 1;\n var d;\n with(o)\n {\n d = delete o;\n }\n if (d === false && typeof(o) === 'object' && o.x === 1) {\n return true;\n }\n return false;\n }).call(this));\n"
+ },
+ {
+ "id": "11.4.1-4.a-6",
+ "path": "TestCases/chapter11/11.4/11.4.1/11.4.1-4.a-6.js",
+ "description": "delete operator returns true when deleting a property inside 'with'",
+ "test": "assertTrue((function testcase() {\n var o = new Object();\n o.x = 1;\n var d;\n with(o)\n {\n d = delete x;\n }\n if (d === true && o.x === undefined) {\n return true;\n }\n }).call(this));\n"
+ },
+ {
+ "id": "11.4.1-4.a-7",
+ "path": "TestCases/chapter11/11.4/11.4.1/11.4.1-4.a-7.js",
+ "description": "delete operator inside 'eval'",
+ "test": "assertTrue((function testcase() {\n var x = 1;\n var d = eval(\"delete x\");\n if (d === false && x === 1) {\n return true;\n }\n return false;\n }).call(this));\n"
+ },
+ {
+ "id": "11.4.1-4.a-8-s",
+ "path": "TestCases/chapter11/11.4/11.4.1/11.4.1-4.a-8-s.js",
+ "description": "delete operator throws TypeError when deleting a non-configurable data property in strict mode",
+ "test": "assertTrue((function testcase() {\n 'use strict';\n \n // NaN (15.1.1.1) has [[Configurable]] set to false.\n try {\n delete fnGlobalObject().NaN;\n return false;\n }\n catch (e) {\n return (e instanceof TypeError);\n }\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict())",
+ "strict_only": ""
+ },
+ {
+ "id": "11.4.1-4.a-8",
+ "path": "TestCases/chapter11/11.4/11.4.1/11.4.1-4.a-8.js",
+ "description": "delete operator returns true for built-in objects (JSON)",
+ "test": "assertTrue((function testcase() {\n try {\n var o = JSON;\n var d = delete JSON; \n if (d === true) {\t \n return true;\n }\n } finally {\n JSON = o;\n }\n }).call(this));\n"
+ },
+ {
+ "id": "11.4.1-4.a-9-s",
+ "path": "TestCases/chapter11/11.4/11.4.1/11.4.1-4.a-9-s.js",
+ "description": "delete operator throws TypeError when deleting a non-configurable data property (Math.LN2) in strict mode ",
+ "test": "assertTrue((function testcase() {\n 'use strict';\n \n try {\n delete Math.LN2;\n return false;\n }\n catch (e) {\n return (e instanceof TypeError); \n }\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict())",
+ "strict_only": ""
+ },
+ {
+ "id": "11.4.1-4.a-9",
+ "path": "TestCases/chapter11/11.4/11.4.1/11.4.1-4.a-9.js",
+ "description": "delete operator returns false when deleting a non-configurable data property (Math.LN2)",
+ "test": "assertTrue((function testcase() {\n var d = delete Math.LN2;\n if (d === false) {\n return true;\n }\n }).call(this));\n"
+ },
+ {
+ "id": "11.4.1-5-1",
+ "path": "TestCases/chapter11/11.4/11.4.1/11.4.1-5-1.js",
+ "description": "delete operator returns false when deleting a direct reference to a var",
+ "test": "assertTrue((function testcase() {\n var x = 1;\n\n // Now, deleting 'x' directly should fail;\n var d = delete x;\n if(d === false && x === 1)\n return true;\n }).call(this));\n"
+ },
+ {
+ "id": "11.4.1-5-2",
+ "path": "TestCases/chapter11/11.4/11.4.1/11.4.1-5-2.js",
+ "description": "delete operator returns false when deleting a direct reference to a function argument",
+ "test": "assertTrue((function testcase() {\n \n function foo(a,b) {\n \n // Now, deleting 'a' directly should fail\n // because 'a' is direct reference to a function argument;\n var d = delete a;\n return (d === false && a === 1);\n }\n return foo(1,2); \n }).call(this));\n"
+ },
+ {
+ "id": "11.4.1-5-3",
+ "path": "TestCases/chapter11/11.4/11.4.1/11.4.1-5-3.js",
+ "description": "delete operator returns false when deleting a direct reference to a function name",
+ "test": "assertTrue((function testcase() {\n var foo = function(){};\n\n // Now, deleting 'foo' directly should fail;\n var d = delete foo;\n if(d === false && fnExists(foo))\n return true;\n }).call(this));\n"
+ },
+ {
+ "id": "11.4.1-5-a-1-s",
+ "path": "TestCases/chapter11/11.4/11.4.1/11.4.1-5-a-1-s.js",
+ "description": "Strict Mode - SyntaxError is thrown when deleting a variable which is a primitive value type (number)",
+ "test": "assertTrue((function testcase() {\n \"use strict\";\n var _11_4_1_5 = 5;\n\n try {\n eval(\"delete _11_4_1_5;\");\n return false;\n } catch (e) {\n return e instanceof SyntaxError;\n }\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict())",
+ "strict_only": ""
+ },
+ {
+ "id": "11.4.1-5-a-10-s",
+ "path": "TestCases/chapter11/11.4/11.4.1/11.4.1-5-a-10-s.js",
+ "description": "Strict Mode - SyntaxError is thrown when deleting a variable of type Array",
+ "test": "assertTrue((function testcase() {\n \"use strict\";\n var arrObj = [1,2,3];\n\n try {\n eval(\"delete arrObj;\");\n return false;\n } catch (e) {\n return e instanceof SyntaxError;\n }\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict())",
+ "strict_only": ""
+ },
+ {
+ "id": "11.4.1-5-a-11-s",
+ "path": "TestCases/chapter11/11.4/11.4.1/11.4.1-5-a-11-s.js",
+ "description": "Strict Mode - SyntaxError is thrown when deleting a variable of type String",
+ "test": "assertTrue((function testcase() {\n \"use strict\";\n var strObj = new String(\"abc\");\n\n try {\n eval(\"delete strObj;\");\n return false;\n } catch (e) {\n return e instanceof SyntaxError;\n }\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict())",
+ "strict_only": ""
+ },
+ {
+ "id": "11.4.1-5-a-12-s",
+ "path": "TestCases/chapter11/11.4/11.4.1/11.4.1-5-a-12-s.js",
+ "description": "Strict Mode - SyntaxError is thrown when deleting a variable of type Boolean",
+ "test": "assertTrue((function testcase() {\n \"use strict\";\n var boolObj = new Boolean(false);\n\n try {\n eval(\"delete boolObj;\");\n return false;\n } catch (e) {\n return e instanceof SyntaxError;\n }\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict())",
+ "strict_only": ""
+ },
+ {
+ "id": "11.4.1-5-a-13-s",
+ "path": "TestCases/chapter11/11.4/11.4.1/11.4.1-5-a-13-s.js",
+ "description": "Strict Mode - SyntaxError is thrown when deleting a variable of type Number",
+ "test": "assertTrue((function testcase() {\n \"use strict\";\n var numObj = new Number(0);\n\n try {\n eval(\"delete numObj;\");\n return false;\n } catch (e) {\n return e instanceof SyntaxError;\n }\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict())",
+ "strict_only": ""
+ },
+ {
+ "id": "11.4.1-5-a-14-s",
+ "path": "TestCases/chapter11/11.4/11.4.1/11.4.1-5-a-14-s.js",
+ "description": "Strict Mode - SyntaxError is thrown when deleting a variable of type Date",
+ "test": "assertTrue((function testcase() {\n \"use strict\";\n var dateObj = new Date();\n\n try {\n eval(\"delete dateObj;\");\n return false;\n } catch (e) {\n return e instanceof SyntaxError;\n }\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict())",
+ "strict_only": ""
+ },
+ {
+ "id": "11.4.1-5-a-15-s",
+ "path": "TestCases/chapter11/11.4/11.4.1/11.4.1-5-a-15-s.js",
+ "description": "Strict Mode - SyntaxError is thrown when deleting a variable of type RegExp",
+ "test": "assertTrue((function testcase() {\n \"use strict\";\n var regObj = new RegExp();\n\n try {\n eval(\"delete regObj;\");\n return false;\n } catch (e) {\n return e instanceof SyntaxError;\n }\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict())",
+ "strict_only": ""
+ },
+ {
+ "id": "11.4.1-5-a-16-s",
+ "path": "TestCases/chapter11/11.4/11.4.1/11.4.1-5-a-16-s.js",
+ "description": "Strict Mode - SyntaxError is thrown when deleting a variable of type Error",
+ "test": "assertTrue((function testcase() {\n \"use strict\";\n var errObj = new Error();\n\n try {\n eval(\"delete errObj;\");\n return false;\n } catch (e) {\n return e instanceof SyntaxError;\n }\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict())",
+ "strict_only": ""
+ },
+ {
+ "id": "11.4.1-5-a-17-s",
+ "path": "TestCases/chapter11/11.4/11.4.1/11.4.1-5-a-17-s.js",
+ "description": "Strict Mode - SyntaxError is thrown when deleting a variable of type Arguments",
+ "test": "assertTrue((function testcase() {\n \"use strict\";\n try {\n eval(\"var argObj = (function (a, b) { delete arguments; }(1, 2));\");\n\n return false;\n } catch (e) {\n return e instanceof SyntaxError;\n }\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict())",
+ "strict_only": ""
+ },
+ {
+ "id": "11.4.1-5-a-18-s",
+ "path": "TestCases/chapter11/11.4/11.4.1/11.4.1-5-a-18-s.js",
+ "description": "Strict Mode - SyntaxError is thrown when deleting a built-in (Object)",
+ "test": "assertTrue((function testcase() {\n \"use strict\";\n\n try {\n eval(\"delete Object;\");\n return false;\n } catch (e) {\n return e instanceof SyntaxError;\n }\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict())",
+ "strict_only": ""
+ },
+ {
+ "id": "11.4.1-5-a-19-s",
+ "path": "TestCases/chapter11/11.4/11.4.1/11.4.1-5-a-19-s.js",
+ "description": "Strict Mode - SyntaxError is thrown when deleting a built-in (Function)",
+ "test": "assertTrue((function testcase() {\n \"use strict\";\n\n try {\n eval(\"delete Function;\");\n return false;\n } catch (e) {\n return e instanceof SyntaxError;\n }\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict())",
+ "strict_only": ""
+ },
+ {
+ "id": "11.4.1-5-a-2-s",
+ "path": "TestCases/chapter11/11.4/11.4.1/11.4.1-5-a-2-s.js",
+ "description": "Strict Mode - SyntaxError is thrown when deleting a function parameter",
+ "test": "assertTrue((function testcase() {\n \"use strict\";\n function funObj(x) {\n eval(\"delete x;\");\n }\n\n try {\n funObj(1);\n return false;\n } catch (e) {\n return e instanceof SyntaxError;\n }\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict())",
+ "strict_only": ""
+ },
+ {
+ "id": "11.4.1-5-a-20-s",
+ "path": "TestCases/chapter11/11.4/11.4.1/11.4.1-5-a-20-s.js",
+ "description": "Strict Mode - SyntaxError is thrown when deleting a built-in (Array)",
+ "test": "assertTrue((function testcase() {\n \"use strict\";\n\n try {\n eval(\"delete Array;\");\n return false;\n } catch (e) {\n return e instanceof SyntaxError;\n }\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict())",
+ "strict_only": ""
+ },
+ {
+ "id": "11.4.1-5-a-21-s",
+ "path": "TestCases/chapter11/11.4/11.4.1/11.4.1-5-a-21-s.js",
+ "description": "Strict Mode - SyntaxError is thrown when deleting a built-in (String)",
+ "test": "assertTrue((function testcase() {\n \"use strict\";\n\n try {\n eval(\"delete String;\");\n return false;\n } catch (e) {\n return e instanceof SyntaxError;\n }\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict())",
+ "strict_only": ""
+ },
+ {
+ "id": "11.4.1-5-a-22-s",
+ "path": "TestCases/chapter11/11.4/11.4.1/11.4.1-5-a-22-s.js",
+ "description": "Strict Mode - SyntaxError is thrown when deleting a built-in (Boolean)",
+ "test": "assertTrue((function testcase() {\n \"use strict\";\n\n try {\n eval(\"delete Boolean;\");\n return false;\n } catch (e) {\n return e instanceof SyntaxError;\n }\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict())",
+ "strict_only": ""
+ },
+ {
+ "id": "11.4.1-5-a-23-s",
+ "path": "TestCases/chapter11/11.4/11.4.1/11.4.1-5-a-23-s.js",
+ "description": "Strict Mode - SyntaxError is thrown when deleting a built-in (Number)",
+ "test": "assertTrue((function testcase() {\n \"use strict\";\n\n try {\n eval(\"delete Number;\");\n return false;\n } catch (e) {\n return e instanceof SyntaxError;\n }\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict())",
+ "strict_only": ""
+ },
+ {
+ "id": "11.4.1-5-a-24-s",
+ "path": "TestCases/chapter11/11.4/11.4.1/11.4.1-5-a-24-s.js",
+ "description": "Strict Mode - SyntaxError is thrown when deleting a built-in (Date)",
+ "test": "assertTrue((function testcase() {\n \"use strict\";\n\n try {\n eval(\"delete Date;\");\n return false;\n } catch (e) {\n return e instanceof SyntaxError;\n }\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict())",
+ "strict_only": ""
+ },
+ {
+ "id": "11.4.1-5-a-25-s",
+ "path": "TestCases/chapter11/11.4/11.4.1/11.4.1-5-a-25-s.js",
+ "description": "Strict Mode - SyntaxError is thrown when deleting a built-in (RegExp)",
+ "test": "assertTrue((function testcase() {\n \"use strict\";\n\n try {\n eval(\"delete RegExp;\");\n return false;\n } catch (e) {\n return e instanceof SyntaxError;\n }\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict())",
+ "strict_only": ""
+ },
+ {
+ "id": "11.4.1-5-a-26-s",
+ "path": "TestCases/chapter11/11.4/11.4.1/11.4.1-5-a-26-s.js",
+ "description": "Strict Mode - SyntaxError is thrown when deleting a built-in (Error)",
+ "test": "assertTrue((function testcase() {\n \"use strict\";\n\n try {\n eval(\"delete Error;\");\n return false;\n } catch (e) {\n return e instanceof SyntaxError;\n }\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict())",
+ "strict_only": ""
+ },
+ {
+ "id": "11.4.1-5-a-3-s",
+ "path": "TestCases/chapter11/11.4/11.4.1/11.4.1-5-a-3-s.js",
+ "description": "Strict Mode - SyntaxError is thrown when deleting a function name",
+ "test": "assertTrue((function testcase() {\n \"use strict\";\n function funObj () { }\n\n try {\n eval(\"delete funObj\");\n return false;\n } catch (e) {\n return e instanceof SyntaxError;\n }\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict())",
+ "strict_only": ""
+ },
+ {
+ "id": "11.4.1-5-a-4-s",
+ "path": "TestCases/chapter11/11.4/11.4.1/11.4.1-5-a-4-s.js",
+ "description": "Strict Mode - SyntaxError is thrown when deleting a function parameter",
+ "test": "assertTrue((function testcase() {\n \"use strict\";\n function funObj(x, y, z) {\n eval(\"delete y;\");\n }\n\n try {\n funObj(1);\n return false;\n } catch (e) {\n return e instanceof SyntaxError;\n }\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict())",
+ "strict_only": ""
+ },
+ {
+ "id": "11.4.1-5-a-5-s",
+ "path": "TestCases/chapter11/11.4/11.4.1/11.4.1-5-a-5-s.js",
+ "description": "Strict Mode - SyntaxError is thrown when deleting a variable which is a primitive type (boolean)",
+ "test": "assertTrue((function testcase() {\n \"use strict\";\n var _11_4_1_5 = true;\n\n try {\n eval(\"delete _11_4_1_5;\");\n return false;\n } catch (e) {\n return e instanceof SyntaxError;\n }\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict())",
+ "strict_only": ""
+ },
+ {
+ "id": "11.4.1-5-a-6-s",
+ "path": "TestCases/chapter11/11.4/11.4.1/11.4.1-5-a-6-s.js",
+ "description": "Strict Mode - SyntaxError is thrown when deleting a variable which is a primitive type (string)",
+ "test": "assertTrue((function testcase() {\n \"use strict\";\n var _11_4_1_5 = \"abc\";\n\n try {\n eval(\"delete _11_4_1_5;\");\n return false;\n } catch (e) {\n return e instanceof SyntaxError;\n }\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict())",
+ "strict_only": ""
+ },
+ {
+ "id": "11.4.1-5-a-7-s",
+ "path": "TestCases/chapter11/11.4/11.4.1/11.4.1-5-a-7-s.js",
+ "description": "Strict Mode - SyntaxError is thrown when deleting a variable of type Object",
+ "test": "assertTrue((function testcase() {\n \"use strict\";\n var obj = new Object();\n\n try {\n eval(\"delete obj;\");\n return false;\n } catch (e) {\n return e instanceof SyntaxError;\n }\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict())",
+ "strict_only": ""
+ },
+ {
+ "id": "11.4.1-5-a-8-s",
+ "path": "TestCases/chapter11/11.4/11.4.1/11.4.1-5-a-8-s.js",
+ "description": "Strict Mode - SyntaxError is thrown when deleting a function object",
+ "test": "assertTrue((function testcase() {\n \"use strict\";\n var funObj = function () { };\n\n try {\n eval(\"delete funObj;\");\n return false;\n } catch (e) {\n return e instanceof SyntaxError;\n }\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict())",
+ "strict_only": ""
+ },
+ {
+ "id": "11.4.1-5-a-9-s",
+ "path": "TestCases/chapter11/11.4/11.4.1/11.4.1-5-a-9-s.js",
+ "description": "Strict Mode - SyntaxError is thrown when deleting a variable of type function (declaration)",
+ "test": "assertTrue((function testcase() {\n \"use strict\";\n function funObj () { };\n\n try {\n eval(\"delete funObj;\");\n return false;\n } catch (e) {\n return e instanceof SyntaxError;\n }\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict())",
+ "strict_only": ""
+ },
+ {
+ "id": "11.4.4-4.a-3-s",
+ "path": "TestCases/chapter11/11.4/11.4.1/11.4.4-4.a-3-s.js",
+ "description": "delete operator throws TypeError when deleting a non-configurable data property in strict mode",
+ "test": "assertTrue((function testcase() {\n 'use strict';\n\n var o = {};\n var desc = { value : 1 }; // all other attributes default to false\n Object.defineProperty(o, \"foo\", desc);\n \n // Now, deleting o.foo should throw TypeError because [[Configurable]] on foo is false.\n try {\n delete o.foo;\n return false;\n }\n catch (e) {\n return (e instanceof TypeError);\n }\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict() && fnExists(Object.defineProperty))",
+ "strict_only": ""
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/11.4.1_The_delete_Operator.json b/website/resources/scripts/testcases2/11.4.1_The_delete_Operator.json
new file mode 100644
index 000000000..a957d8139
--- /dev/null
+++ b/website/resources/scripts/testcases2/11.4.1_The_delete_Operator.json
@@ -0,0 +1,56 @@
+{
+ "testCollection": {
+ "name": "11.4.1_The_delete_Operator",
+ "numTests": 8,
+ "tests": [
+ {
+ "section": "11.4.1",
+ "description": "Checking by using eval",
+ "test": "//CHECK#1\nif (eval(\"delete\\u00090\") !== true) {\n $ERROR('#1: delete\\\\u00090 === true');\n}\n\n//CHECK#2\nif (eval(\"delete\\u000B0\") !== true) {\n $ERROR('#2: delete\\\\u000B0 === true'); \n}\n\n//CHECK#3\nif (eval(\"delete\\u000C0\") !== true) {\n $ERROR('#3: delete\\\\u000C0 === true');\n}\n\n//CHECK#4\nif (eval(\"delete\\u00200\") !== true) {\n $ERROR('#4: delete\\\\u00200 === true');\n}\n\n//CHECK#5\nif (eval(\"delete\\u00A00\") !== true) {\n $ERROR('#5: delete\\\\u00A00 === true');\n}\n\n//CHECK#6\nif (eval(\"delete\\u000A0\") !== true) {\n $ERROR('#6: delete\\\\u000A0 === true'); \n}\n\n//CHECK#7\nif (eval(\"delete\\u000D0\") !== true) {\n $ERROR('#7: delete\\\\u000D0 === true');\n}\n\n//CHECK#8\nif (eval(\"delete\\u20280\") !== true) {\n $ERROR('#8: delete\\\\u20280 === true');\n}\n\n//CHECK#9\nif (eval(\"delete\\u20290\") !== true) {\n $ERROR('#9: delete\\\\u20290 === true');\n}\n\n//CHECK#10\nif (eval(\"delete\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u20290\") !== true) {\n $ERROR('#10: delete\\\\u0009\\\\u000B\\\\u000C\\\\u0020\\\\u00A0\\\\u000A\\\\u000D\\\\u2028\\\\u20290 === true');\n}\n",
+ "id": "S11.4.1_A1"
+ },
+ {
+ "section": "11.4.1",
+ "description": "Checking primitive value and Object value cases",
+ "test": "//CHECK#1\nif (delete 1 !== true) {\n $ERROR('#1: delete 1 === true');\n}\n\n//CHECK#2\nif (delete new Object() !== true) {\n $ERROR('#2: delete new Object() === true');\n}\n\n",
+ "id": "S11.4.1_A2.1"
+ },
+ {
+ "section": "11.4.1",
+ "description": "Checking undeclared variable case",
+ "test": "//CHECK#1\nif (delete x !== true) {\n $ERROR('#1: delete x === true');\n}\n\n//CHECK#2\nif (delete this.x !== true) {\n $ERROR('#2: delete this.x === true');\n}\n",
+ "id": "S11.4.1_A2.2_T1"
+ },
+ {
+ "section": "11.4.1",
+ "description": "Checking Object object and Function object cases",
+ "test": "//CHECK#1\nfunction MyFunction(){}\nvar MyObject = new MyFunction();\nif (delete MyObject.prop !== true) {\n $ERROR('#1: function MyFunction(){}; var MyObject = new MyFunction(); delete MyObject.prop === true');\n}\n\n//CHECK#2\nvar MyObject = new Object();\nif (delete MyObject.prop !== true) {\n $ERROR('#2: var MyObject = new Object(); delete MyObject.prop === true');\n}\n",
+ "id": "S11.4.1_A2.2_T2"
+ },
+ {
+ "section": "11.4.1",
+ "description": "Checking declared variable",
+ "test": "//CHECK#1\nvar x = 1;\nif (delete x !== false) {\n $ERROR('#1: var x = 1; delete x === false');\n}\n\n//CHECK#2\nvar y = 1;\nif (delete this.y !== false) {\n $ERROR('#2: var y = 1; delete this.y === false');\n}\n\n//CHECK#3\nfunction MyFunction(){};\nif (delete MyFunction !== false) {\n $ERROR('#3: function MyFunction(){}; delete MyFunction === false');\n}\n\n//CHECK#4\nfunction MyFunction(){};\nvar MyObject = new MyFunction();\nif (delete MyObject !== false) {\n $ERROR('#4: function MyFunction(){}; var MyObject = new MyFunction(); delete MyObject === false');\n}\n\n//CHECK#5\nif (delete MyObject !== false) {\n $ERROR('#5: function MyFunction(){}; var MyObject = new MyFunction(); delete MyObject === false');\n}\n",
+ "id": "S11.4.1_A3.1"
+ },
+ {
+ "section": "11.4.1",
+ "description": "Checking declared variable",
+ "test": "//CHECK#1\nx = 1;\nif (delete x !== true) {\n $ERROR('#1: x = 1; delete x === true');\n}\n\n//CHECK#2\nfunction MyFunction(){};\nMyFunction.prop = 1;\nif (delete MyFunction.prop !== true) {\n $ERROR('#2: function MyFunction(){}; MyFunction.prop = 1; delete MyFunction.prop === true');\n}\n\n//CHECK#3\nfunction MyFunction(){};\nvar MyObject = new MyFunction();\nMyObject.prop = 1;\nif (delete MyObject.prop !== true) {\n $ERROR('#3: function MyFunction(){}; var MyObject = new MyFunction(); MyFunction.prop = 1; delete MyObject.prop === true');\n}\n",
+ "id": "S11.4.1_A3.2"
+ },
+ {
+ "section": "11.4.1",
+ "description": "Checking declared variable",
+ "test": "//CHECK#1\ntry {\n x = 1;\n delete x;\n x; \n $ERROR('#1: x = 1; delete x; x is not exist');\n} catch (e) {\n if (e instanceof ReferenceError !== true) {\n $ERROR('#1: x = 1; delete x; x is not exist');\n }\n}\n\n\n//CHECK#2\nfunction MyFunction(){};\nMyFunction.prop = 1;\ndelete MyFunction.prop;\nif (MyFunction.prop !== undefined) {\n $ERROR('#2: function MyFunction(){}; MyFunction.prop = 1; delete MyFunction.prop; MyFunction.prop === undefined. Actual: ' + (MyFunction.prop));\n\n}\n\n//CHECK#3\nfunction MyFunction(){};\nvar MyObjectVar = new MyFunction();\nMyObjectVar.prop = 1;\ndelete MyObjectVar.prop;\nif (MyObjectVar.prop !== undefined) {\n $ERROR('#3: function MyFunction(){}; var MyObjectVar = new MyFunction(); MyFunction.prop = 1; delete MyObjectVar.prop; MyObjectVar.prop === undefined. Actual: ' + (MyObjectVar.prop));\n}\n\n//CHECK#4\nif (delete MyObjectVar !== false) {\n $ERROR('#4: function MyFunction(){}; var MyObjectVar = new MyFunction(); delete MyObjectVar === false');\n}\n\n//CHECK#5\nfunction MyFunction(){};\nMyObjectNotVar = new MyFunction();\nMyObjectNotVar.prop = 1;\ndelete MyObjectNotVar.prop;\nif (MyObjectNotVar.prop !== undefined) {\n $ERROR('#5: function MyFunction(){}; MyObjectNotVar = new MyFunction(); MyFunction.prop = 1; delete MyObjectNotVar.prop; MyObjectNotVar.prop === undefined. Actual: ' + (MyObjectNotVar.prop));\n}\n\n//CHECK#6\nif (delete MyObjectNotVar !== true) {\n $ERROR('#6: function MyFunction(){}; var MyObjectNotVar = new MyFunction(); delete MyObjectNotVar === true');\n}\n\n",
+ "id": "S11.4.1_A3.3"
+ },
+ {
+ "section": "11.4.1",
+ "description": "Checking two reference by one object",
+ "test": "//CHECK#1\nobj = new Object();\nref = obj;\ndelete ref;\nif (typeof obj !== \"object\") {\n $ERROR('#1: obj = new Object(); ref = obj; delete ref; typeof obj === \"object\". Actual: ' + (typeof obj));\n}\n\n",
+ "id": "S11.4.1_A4"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/11.4.2_The_void_Operator.json b/website/resources/scripts/testcases2/11.4.2_The_void_Operator.json
new file mode 100644
index 000000000..ea8c61900
--- /dev/null
+++ b/website/resources/scripts/testcases2/11.4.2_The_void_Operator.json
@@ -0,0 +1,63 @@
+{
+ "testCollection": {
+ "name": "11.4.2_The_void_Operator",
+ "numTests": 9,
+ "tests": [
+ {
+ "section": "11.4.2",
+ "description": "Checking by using eval",
+ "test": "//CHECK#1\nif (eval(\"void\\u00090\") !== undefined) {\n $ERROR('#1: void\\\\u00090 === undefined');\n}\n\n//CHECK#2\nif (eval(\"void\\u000B0\") !== undefined) {\n $ERROR('#2: void\\\\u000B0 === undefined'); \n}\n\n//CHECK#3\nif (eval(\"void\\u000C0\") !== undefined) {\n $ERROR('#3: void\\\\u000C0 === undefined');\n}\n\n//CHECK#4\nif (eval(\"void\\u00200\") !== undefined) {\n $ERROR('#4: void\\\\u00200 === undefined');\n}\n\n//CHECK#5\nif (eval(\"void\\u00A00\") !== undefined) {\n $ERROR('#5: void\\\\u00A00 === undefined');\n}\n\n//CHECK#6\nif (eval(\"void\\u000A0\") !== undefined) {\n $ERROR('#6: void\\\\u000A0 === undefined'); \n}\n\n//CHECK#7\nif (eval(\"void\\u000D0\") !== undefined) {\n $ERROR('#7: void\\\\u000D0 === undefined');\n}\n\n//CHECK#8\nif (eval(\"void\\u20280\") !== undefined) {\n $ERROR('#8: void\\\\u20280 === undefined');\n}\n\n//CHECK#9\nif (eval(\"void\\u20290\") !== undefined) {\n $ERROR('#9: void\\\\u20290 === undefined');\n}\n\n//CHECK#10\nif (eval(\"void\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u20290\") !== undefined) {\n $ERROR('#10: void\\\\u0009\\\\u000B\\\\u000C\\\\u0020\\\\u00A0\\\\u000A\\\\u000D\\\\u2028\\\\u20290 === undefined');\n}\n",
+ "id": "S11.4.2_A1"
+ },
+ {
+ "section": "11.4.2",
+ "description": "Either Type(x) is not Reference or GetBase(x) is not null",
+ "test": "//CHECK#1\nif (void 0 !== undefined) {\n $ERROR('#1: void 0 === undefined. Actual: ' + (void 0));\n}\n\n//CHECK#2\nvar x = 0;\nif (void x !== undefined) {\n $ERROR('#2: var x = 0; void x === undefined. Actual: ' + (void x));\n}\n\n//CHECK#3\nvar x = new Object();\nif (void x !== undefined) {\n $ERROR('#3: var x = new Object(); void x === undefined. Actual: ' + (void x));\n}\n",
+ "id": "S11.4.2_A2_T1"
+ },
+ {
+ "section": "11.4.2",
+ "description": "If GetBase(x) is null, throw ReferenceError",
+ "negative": "",
+ "test": "//CHECK#1\nvoid x;\n",
+ "id": "S11.4.2_A2_T2"
+ },
+ {
+ "section": "11.4.2",
+ "description": "Type(x) is boolean primitive or Boolean object",
+ "test": "//CHECK#1\nvar x = false; \nif (void x !== undefined) {\n $ERROR('#1: var x = false; void x === undefined. Actual: ' + (void x));\n}\n\n//CHECK#2\nvar x = new Boolean(true);\nif (void x !== undefined) {\n $ERROR('#2: var x = new Boolean(true); void x === undefined. Actual: ' + (void x));\n}\n",
+ "id": "S11.4.2_A4_T1"
+ },
+ {
+ "section": "11.4.2",
+ "description": "Type(x) is number primitive or Number object",
+ "test": "//CHECK#1\nvar x = 0.1;\nif (void x !== undefined) {\n $ERROR('#1: var x = 0.1; void x === undefined. Actual: ' + (void x));\n}\n\n//CHECK#2\nvar x = new Number(-1.1);\nif (void x !== undefined) {\n $ERROR('#2: var x = new Number(-1.1); void x === undefined. Actual: ' + (void x));\n}\n",
+ "id": "S11.4.2_A4_T2"
+ },
+ {
+ "section": "11.4.2",
+ "description": "Type(x) is string primitive of String object",
+ "test": "//CHECK#1\nvar x = \"1\";\nif (void x !== undefined) {\n $ERROR('#1: var x = \"1\"; void x === undefined. Actual: ' + (void x));\n}\n\n//CHECK#2\nvar x = \"x\"; \nif (isNaN(void x) !== true) {\n $ERROR('#2: var x = \"x\"; void x === undefined. Actual: ' + (void x));\n}\n\n//CHECK#3\nvar x = new String(\"-1\");\nif (void x !== undefined) {\n $ERROR('#3: var x = new String(\"-1\"); void x === undefined. Actual: ' + (void x));\n}\n",
+ "id": "S11.4.2_A4_T3"
+ },
+ {
+ "section": "11.4.2",
+ "description": "Type(x) is undefined or null",
+ "test": "//CHECK#1\nvar x; \nif (isNaN(void x) !== true) {\n $ERROR('#1: var x; void x === undefined. Actual: ' + (void x));\n}\n\n//CHECK#2\nvar x = null;\nif (void x !== undefined) {\n $ERROR('#2: var x = null; void x === undefined. Actual: ' + (void x));\n}\n",
+ "id": "S11.4.2_A4_T4"
+ },
+ {
+ "section": "11.4.2",
+ "description": "Type(x) is Object object or Function object",
+ "test": "//CHECK#1\nvar x = {}; \nif (isNaN(void x) !== true) {\n $ERROR('#1: var x = {}; void x === undefined. Actual: ' + (void x));\n}\n\n//CHECK#2\nvar x = function(){return 1}; \nif (isNaN(void x) !== true) {\n $ERROR('#2: var x = function(){return 1}; void x === undefined. Actual: ' + (void x));\n}\n",
+ "id": "S11.4.2_A4_T5"
+ },
+ {
+ "section": "11.4.2",
+ "description": "Checking Simple Assignment operator",
+ "test": "//CHECK#1\nvar x = 0;\nif (void (x = 1) !== undefined) {\n $ERROR('#1: var x = 0; void (x = 1) === undefined. Actual: ' + (void (x = 1)));\n} else {\n if (x !== 1) {\n $ERROR('#1: var x = 0; void (x = 1); x === 1. Actual: ' + (x));\n } \n}\n",
+ "id": "S11.4.2_A4_T6"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/11.4.3_The_typeof_Operator.json b/website/resources/scripts/testcases2/11.4.3_The_typeof_Operator.json
new file mode 100644
index 000000000..6a67e5d88
--- /dev/null
+++ b/website/resources/scripts/testcases2/11.4.3_The_typeof_Operator.json
@@ -0,0 +1,68 @@
+{
+ "testCollection": {
+ "name": "11.4.3_The_typeof_Operator",
+ "numTests": 10,
+ "tests": [
+ {
+ "section": "11.4.3",
+ "description": "Checking by using eval",
+ "test": "//CHECK#1\nif (eval(\"var x = 0; typeof\\u0009x\") !== \"number\") {\n $ERROR('#1: var x = 0; typeof\\\\u0009x; x === \"number\". Actual: ' + (x));\n}\n\n//CHECK#2\nif (eval(\"var x = 0; typeof\\u000Bx\") !== \"number\") {\n $ERROR('#2: var x = 0; typeof\\\\u000Bx; x === \"number\". Actual: ' + (x)); \n}\n\n//CHECK#3\nif (eval(\"var x = 0; typeof\\u000Cx\") !== \"number\") {\n $ERROR('#3: var x = 0; typeof\\\\u000Cx; x === \"number\". Actual: ' + (x));\n}\n\n//CHECK#4\nif (eval(\"var x = 0; typeof\\u0020x\") !== \"number\") {\n $ERROR('#4: var x = 0; typeof\\\\u0020x; x === \"number\". Actual: ' + (x));\n}\n\n//CHECK#5\nif (eval(\"var x = 0; typeof\\u00A0x\") !== \"number\") {\n $ERROR('#5: var x = 0; typeof\\\\u00A0x; x === \"number\". Actual: ' + (x));\n}\n\n//CHECK#6\nif (eval(\"var x = 0; typeof\\u000Ax\") !== \"number\") {\n $ERROR('#6: var x = 0; typeof\\\\u000Ax; x === \"number\". Actual: ' + (x)); \n}\n\n//CHECK#7\nif (eval(\"var x = 0; typeof\\u000Dx\") !== \"number\") {\n $ERROR('#7: var x = 0; typeof\\\\u000Dx; x === \"number\". Actual: ' + (x));\n}\n\n//CHECK#8\nif (eval(\"var x = 0; typeof\\u2028x\") !== \"number\") {\n $ERROR('#8: var x = 0; typeof\\\\u2028x; x === \"number\". Actual: ' + (x));\n}\n\n//CHECK#9\nif (eval(\"var x = 0; typeof\\u2029x\") !== \"number\") {\n $ERROR('#9: var x = 0; typeof\\\\u2029x; x === \"number\". Actual: ' + (x));\n}\n\n//CHECK#10\nif (eval(\"var x = 0; typeof\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u2029x\") !== \"number\") {\n $ERROR('#10: var x = 0; typeof\\\\u0009\\\\u000B\\\\u000C\\\\u0020\\\\u00A0\\\\u000A\\\\u000D\\\\u2028\\\\u2029x; x === \"number\". Actual: ' + (x));\n}\n",
+ "id": "S11.4.3_A1"
+ },
+ {
+ "section": "11.4.3",
+ "description": "Either Type(x) is not Reference or GetBase(x) is not null",
+ "test": "//CHECK#1\nif (typeof 0 !== \"number\") {\n $ERROR('#1: typeof 0 === \"number\". Actual: ' + (typeof 0));\n}\n\n//CHECK#2\nvar x = 0;\nif (typeof x !== \"number\") {\n $ERROR('#2: typeof x === \"number\". Actual: ' + (typeof x));\n}\n\n//CHECK#3\nvar x = new Object();\nif (typeof x !== \"object\") {\n $ERROR('#3: var x = new Object(); typeof x === \"object\". Actual: ' + (typeof x));\n}\n",
+ "id": "S11.4.3_A2_T1"
+ },
+ {
+ "section": "11.4.3",
+ "description": "If GetBase(x) is null, return \"undefined\"",
+ "test": "//CHECK#1\nif (typeof x !== \"undefined\") {\n $ERROR('#1: typeof x === \"undefined\". Actual: ' + (typeof x));\n}\n",
+ "id": "S11.4.3_A2_T2"
+ },
+ {
+ "section": "11.4.3",
+ "description": "typeof undefined === \"undefined\"",
+ "test": "//CHECK#1\nif (typeof undefined !== \"undefined\") {\n $ERROR('#1: typeof undefined === \"undefined\". Actual: ' + (typeof undefined));\n}\n\n//CHECK#2\nif (typeof void 0 !== \"undefined\") {\n $ERROR('#2: typeof void 0 === \"undefined\". Actual: ' + (typeof void 0));\n}\n",
+ "id": "S11.4.3_A3.1"
+ },
+ {
+ "section": "11.4.3",
+ "description": "typeof null === \"object\"",
+ "test": "//CHECK#1\nif (typeof null !== \"object\") {\n $ERROR('#1: typeof null === \"object\". Actual: ' + (typeof null));\n}\n\n//CHECK#2\nif (typeof RegExp(\"0\").exec(\"1\") !== \"object\") {\n $ERROR('#2: typeof RegExp(\"0\").exec(\"1\") === \"object\". Actual: ' + (typeof RegExp(\"0\").exec(\"1\")));\n}\n",
+ "id": "S11.4.3_A3.2"
+ },
+ {
+ "section": "11.4.3",
+ "description": "typeof (boolean value) === \"boolean\"",
+ "test": "//CHECK#1\nif (typeof true !== \"boolean\") {\n $ERROR('#1: typeof true === \"boolean\". Actual: ' + (typeof true));\n}\n\n//CHECK#2\nif (typeof false !== \"boolean\") {\n $ERROR('#2: typeof false === \"boolean\". Actual: ' + (typeof false));\n}\n\n//CHECK#3\nif (typeof !-1 !== \"boolean\") {\n $ERROR('#3: typeof !-1 === \"boolean\". Actual: ' + (typeof !-1));\n}\n",
+ "id": "S11.4.3_A3.3"
+ },
+ {
+ "section": "11.4.3",
+ "description": "typeof (number value) === \"number\"",
+ "test": "//CHECK#1\nif (typeof 1 !== \"number\") {\n $ERROR('#1: typeof 1 === \"number\". Actual: ' + (typeof 1));\n}\n\n//CHECK#2\nif (typeof Number.NaN !== \"number\") {\n $ERROR('#2: typeof NaN === \"number\". Actual: ' + (typeof NaN));\n}\n\n//CHECK#3\nif (typeof Number.POSITIVE_INFINITY !== \"number\") {\n $ERROR('#3: typeof Infinity === \"number\". Actual: ' + (typeof Infinity));\n}\n\n//CHECK#4\nif (typeof Number.NEGATIVE_INFINITY !== \"number\") {\n $ERROR('#4: typeof -Infinity === \"number\". Actual: ' + (typeof -Infinity));\n}\n\n//CHECK#5\nif (typeof Math.PI !== \"number\") {\n $ERROR('#5: typeof Math.PI === \"number\". Actual: ' + (typeof Math.PI));\n}\n",
+ "id": "S11.4.3_A3.4"
+ },
+ {
+ "section": "11.4.3",
+ "description": "typeof (string value) === \"string\"",
+ "test": "//CHECK#1\nif (typeof \"1\" !== \"string\") {\n $ERROR('#1: typeof \"1\" === \"string\". Actual: ' + (typeof \"1\"));\n}\n\n//CHECK#2\nif (typeof \"NaN\" !== \"string\") {\n $ERROR('#2: typeof \"NaN\" === \"string\". Actual: ' + (typeof \"NaN\"));\n}\n\n//CHECK#3\nif (typeof \"Infinity\" !== \"string\") {\n $ERROR('#3: typeof \"Infinity\" === \"string\". Actual: ' + (typeof \"Infinity\"));\n}\n\n//CHECK#4\nif (typeof \"\" !== \"string\") {\n $ERROR('#4: typeof \"\" === \"string\". Actual: ' + (typeof \"\"));\n}\n\n//CHECK#5\nif (typeof \"true\" !== \"string\") {\n $ERROR('#5: typeof \"true\" === \"string\". Actual: ' + (typeof \"true\"));\n}\n\n//CHECK#6\nif (typeof Date() !== \"string\") {\n $ERROR('#6: typeof Date() === \"string\". Actual: ' + (typeof Date()));\n}\n",
+ "id": "S11.4.3_A3.5"
+ },
+ {
+ "section": "11.4.3",
+ "description": "typeof (object without [[Call]]) === \"object\"",
+ "test": "//CHECK#1\nif (typeof this !== \"object\") {\n $ERROR('#1: typeof this === \"object\". Actual: ' + (typeof this));\n}\n\n//CHECK#2\nif (typeof new Object() !== \"object\") {\n $ERROR('#2: typeof new Object() === \"object\". Actual: ' + (typeof new Object()));\n}\n\n//CHECK#3\nif (typeof new Array(1,2,3) !== \"object\") {\n $ERROR('#3: typeof new Array(1,2,3) === \"object\". Actual: ' + (typeof new Array(1,2,3)));\n}\n\n//CHECK#4\nif (typeof Array(1,2,3) !== \"object\") {\n $ERROR('#4: typeof Array(1,2,3) === \"object\". Actual: ' + (typeof Array(1,2,3)));\n}\n\n//CHECK#5\nif (typeof new String(\"x\") !== \"object\") {\n $ERROR('#5: typeof new String(\"x\") === \"object\". Actual: ' + (typeof new String(\"x\")));\n}\n\n//CHECK#6\nif (typeof new Boolean(true) !== \"object\") {\n $ERROR('#6: typeof new Boolean(true) === \"object\". Actual: ' + (typeof new Boolean(true)));\n}\n\n//CHECK#7\nif (typeof new Number(1) !== \"object\") {\n $ERROR('#7: typeof new Number(1) === \"object\". Actual: ' + (typeof new Number(1)));\n}\n\n//CHECK#8\n//The Math object does not have a [[Construct]] property; \n//it is not possible to use the Math object as a constructor with the new operator.\n//The Math object does not have a [[Call]] property; it is not possible to invoke the Math object as a object.\nif (typeof Math !== \"object\") {\n $ERROR('#8: typeof Math === \"object\". Actual: ' + (typeof Math));\n}\n\n//CHECK#9\nif (typeof new Date() !== \"object\") {\n $ERROR('#9: typeof new Date() === \"object\". Actual: ' + (typeof new Date()));\n}\n\n//CHECK#10\nif (typeof new Error() !== \"object\") {\n $ERROR('#10: typeof new Error() === \"object\". Actual: ' + (typeof new Error()));\n}\n\n//CHECK#11\nif (typeof new RegExp() !== \"object\") {\n $ERROR('#11: typeof new RegExp() === \"object\". Actual: ' + (typeof new RegExp()));\n}\n\n//CHECK#12\nif (typeof RegExp() !== \"object\") {\n $ERROR('#12: typeof RegExp() === \"object\". Actual: ' + (typeof RegExp()));\n}\n",
+ "id": "S11.4.3_A3.6"
+ },
+ {
+ "section": "11.4.3",
+ "description": "typeof (object with [[Call]]) === \"function\"",
+ "test": "//CHECK#1\nif (typeof new Function() !== \"function\") {\n $ERROR('#1: typeof new Function() === \"function\". Actual: ' + (typeof new Function()));\n}\n\n//CHECK#2\nif (typeof Function() !== \"function\") {\n $ERROR('#2: typeof Function() === \"function\". Actual: ' + (typeof Function()));\n}\n\n//CHECK#3\nif (typeof Object !== \"function\") {\n $ERROR('#3: typeof Object === \"function\". Actual: ' + (typeof Object));\n}\n\n//CHECK#4\nif (typeof String !== \"function\") {\n $ERROR('#4: typeof String === \"function\". Actual: ' + (typeof String));\n}\n\n//CHECK5\nif (typeof Boolean !== \"function\") {\n $ERROR('#5: typeof Boolean === \"function\". Actual: ' + (typeof Boolean));\n}\n\n//CHECK#6\nif (typeof Number !== \"function\") {\n $ERROR('#6: typeof Number === \"function\". Actual: ' + (typeof Number));\n}\n\n//CHECK#7\nif (typeof Date !== \"function\") {\n $ERROR('#7: typeof Date === \"function\". Actual: ' + (typeof Date));\n}\n\n//CHECK#8\nif (typeof Error !== \"function\") {\n $ERROR('#8: typeof Error === \"function\". Actual: ' + (typeof Error));\n}\n\n//CHECK#9\nif (typeof RegExp !== \"function\") {\n $ERROR('#9: typeof RegExp === \"function\". Actual: ' + (typeof RegExp));\n}\n",
+ "id": "S11.4.3_A3.7"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/11.4.4.json b/website/resources/scripts/testcases2/11.4.4.json
new file mode 100644
index 000000000..922ecc2db
--- /dev/null
+++ b/website/resources/scripts/testcases2/11.4.4.json
@@ -0,0 +1,24 @@
+{
+ "testCollection": {
+ "name": "11.4.4",
+ "numTests": 2,
+ "tests": [
+ {
+ "id": "11.4.4-2-1-s",
+ "path": "TestCases/chapter11/11.4/11.4.4/11.4.4-2-1-s.js",
+ "description": "Strict Mode - SyntaxError is thrown for ++eval",
+ "test": "assertTrue((function testcase() {\n \"use strict\";\n var blah = eval;\n try {\n eval(\"++eval;\");\n return false;\n } catch (e) {\n return e instanceof SyntaxError && blah === eval;\n }\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict())",
+ "strict_only": ""
+ },
+ {
+ "id": "11.4.4-2-2-s",
+ "path": "TestCases/chapter11/11.4/11.4.4/11.4.4-2-2-s.js",
+ "description": "Strict Mode - SyntaxError is thrown for ++arguments",
+ "test": "assertTrue((function testcase() {\n \"use strict\";\n var blah = arguments;\n try {\n eval(\"++arguments;\");\n return false;\n } catch (e) {\n return e instanceof SyntaxError && blah === arguments;\n }\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict())",
+ "strict_only": ""
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/11.4.4_Prefix_Increment_Operator.json b/website/resources/scripts/testcases2/11.4.4_Prefix_Increment_Operator.json
new file mode 100644
index 000000000..b746d8e4d
--- /dev/null
+++ b/website/resources/scripts/testcases2/11.4.4_Prefix_Increment_Operator.json
@@ -0,0 +1,99 @@
+{
+ "testCollection": {
+ "name": "11.4.4_Prefix_Increment_Operator",
+ "numTests": 15,
+ "tests": [
+ {
+ "section": "11.4.4, 11.6.3, 7.2, 7.3",
+ "description": "Checking by using eval",
+ "test": "//CHECK#1\nif (eval(\"var x = 0; ++\\u0009x\") !== 1) {\n $ERROR('#1: var x = 0; ++\\\\u0009x; x === 1. Actual: ' + (x));\n}\n\n//CHECK#2\nif (eval(\"var x = 0; ++\\u000Bx\") !== 1) {\n $ERROR('#2: var x = 0; ++\\\\u000Bx; x === 1. Actual: ' + (x)); \n}\n\n//CHECK#3\nif (eval(\"var x = 0; ++\\u000Cx\") !== 1) {\n $ERROR('#3: var x = 0; ++\\\\u000Cx; x === 1. Actual: ' + (x));\n}\n\n//CHECK#4\nif (eval(\"var x = 0; ++\\u0020x\") !== 1) {\n $ERROR('#4: var x = 0; ++\\\\u0020x; x === 1. Actual: ' + (x));\n}\n\n//CHECK#5\nif (eval(\"var x = 0; ++\\u00A0x\") !== 1) {\n $ERROR('#5: var x = 0; ++\\\\u00A0x; x === 1. Actual: ' + (x));\n}\n\n//CHECK#6\nif (eval(\"var x = 0; ++\\u000Ax\") !== 1) {\n $ERROR('#6: var x = 0; ++\\\\u000Ax; x === 1. Actual: ' + (x)); \n}\n\n//CHECK#7\nif (eval(\"var x = 0; ++\\u000Dx\") !== 1) {\n $ERROR('#7: var x = 0; ++\\\\u000Dx; x === 1. Actual: ' + (x));\n}\n\n//CHECK#8\nif (eval(\"var x = 0; ++\\u2028x\") !== 1) {\n $ERROR('#8: var x = 0; ++\\\\u2028x; x === 1. Actual: ' + (x));\n}\n\n//CHECK#9\nif (eval(\"var x = 0; ++\\u2029x\") !== 1) {\n $ERROR('#9: var x = 0; ++\\\\u2029x; x === 1. Actual: ' + (x));\n}\n\n//CHECK#10\nif (eval(\"var x = 0; ++\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u2029x\") !== 1) {\n $ERROR('#10: var x = 0; ++\\\\u0009\\\\u000B\\\\u000C\\\\u0020\\\\u00A0\\\\u000A\\\\u000D\\\\u2028\\\\u2029x; x === 1. Actual: ' + (x));\n}\n",
+ "id": "S11.4.4_A1"
+ },
+ {
+ "section": "11.4.4, 11.6.3",
+ "description": "Type(x) is Reference and GetBase(x) is not null",
+ "test": "//CHECK#1\nvar x = 1;\nif (++x !== 1 + 1) {\n $ERROR('#1: var x = 1; ++x === 1 + 1. Actual: ' + (++x));\n} else {\n if (x !== 1 + 1) {\n $ERROR('#1: var x = 1; ++x; x === 1 + 1. Actual: ' + (x));\n } \n}\n\n//CHECK#2\nthis.x = 1;\nif (++this.x !== 1 + 1) {\n $ERROR('#2: this.x = 1; ++this.x === 1 + 1. Actual: ' + (++this.x));\n} else {\n if (this.x !== 1 + 1) {\n $ERROR('#2: this.x = 1; ++this.x; this.x === 1 + 1. Actual: ' + (this.x));\n } \n}\n\n//CHECK#3\nvar object = new Object();\nobject.prop = 1;\nif (++object.prop !== 1 + 1) {\n $ERROR('#3: var object = new Object(); object.prop = 1; ++object.prop === 1 + 1. Actual: ' + (++object.prop));\n} else {\n if (this.x !== 1 + 1) {\n $ERROR('#3: var object = new Object(); object.prop = 1; ++object.prop; object.prop === 1 + 1. Actual: ' + (object.prop));\n } \n}\n",
+ "id": "S11.4.4_A2.1_T1"
+ },
+ {
+ "section": "11.4.4, 11.6.3",
+ "description": "If GetBase(x) is null, throw ReferenceError",
+ "test": "//CHECK#1\ntry {\n ++x;\n $ERROR('#1.1: ++x throw ReferenceError. Actual: ' + (++x)); \n}\ncatch (e) {\n if ((e instanceof ReferenceError) !== true) {\n $ERROR('#1.2: ++x throw ReferenceError. Actual: ' + (e)); \n }\n}\n",
+ "id": "S11.4.4_A2.1_T2"
+ },
+ {
+ "section": "11.4.4, 11.6.3",
+ "description": "If Type(x) is not Reference, throw ReferenceError (or SyntaxError)",
+ "negative": "",
+ "test": "//CHECK#1\ntry {\n ++1;\n $ERROR('#1.1: ++1 throw ReferenceError (or SyntaxError). Actual: ' + (++1)); \n}\ncatch (e) {\n if ((e instanceof ReferenceError) !== true) {\n $ERROR('#1.2: ++1 throw ReferenceError (or SyntaxError). Actual: ' + (e)); \n } else {\n ++1;\n }\n}\n\n",
+ "id": "S11.4.4_A2.1_T3"
+ },
+ {
+ "section": "11.4.4, 8.6.2.6",
+ "description": "If Type(value) is Object, evaluate ToPrimitive(value, Number)",
+ "test": "//CHECK#1\nvar object = {valueOf: function() {return 1}};\nif (++object !== 1 + 1) {\n $ERROR('#1: var object = {valueOf: function() {return 1}}; ++object === 1 + 1. Actual: ' + (++object));\n} else {\n if (object !== 1 + 1) {\n $ERROR('#1: var object = {valueOf: function() {return 1}}; ++object; object === 1 + 1. Actual: ' + (object));\n }\n}\n\n//CHECK#2\nvar object = {valueOf: function() {return 1}, toString: function() {return 0}};\nif (++object !== 1 + 1) {\n $ERROR('#2: var object = {valueOf: function() {return 1}, toString: function() {return 0}}; ++object === 1 + 1. Actual: ' + (++object));\n} else {\n if (object !== 1 + 1) {\n $ERROR('#2: var object = {valueOf: function() {return 1}, toString: function() {return 0}}; ++object; object === 1 + 1. Actual: ' + (object));\n }\n}\n\n//CHECK#3\nvar object = {valueOf: function() {return 1}, toString: function() {return {}}};\nif (++object !== 1 + 1) {\n $ERROR('#3: var object = {valueOf: function() {return 1}, toString: function() {return {}}}; ++object === 1 + 1. Actual: ' + (++object));\n} else {\n if (object !== 1 + 1) {\n $ERROR('#3: var object = {valueOf: function() {return 1}, toString: function() {return {}}}; ++object; object === 1 + 1. Actual: ' + (object));\n }\n}\n\n//CHECK#4\ntry {\n var object = {valueOf: function() {return 1}, toString: function() {throw \"error\"}};\n if (++object !== 1 + 1) {\n $ERROR('#4.1: var object = {valueOf: function() {return 1}, toString: function() {throw \"error\"}}; ++object === 1 + 1. Actual: ' + (++object));\n } else {\n if (object !== 1 + 1) {\n $ERROR('#4.1: var object = {valueOf: function() {return 1}, toString: function() {throw \"error\"}}; ++object; object === 1 + 1. Actual: ' + (object));\n }\n }\n}\ncatch (e) {\n if (e === \"error\") {\n $ERROR('#4.2: var object = {valueOf: function() {return 1}, toString: function() {throw \"error\"}}; ++object not throw \"error\"');\n } else {\n $ERROR('#4.3: var object = {valueOf: function() {return 1}, toString: function() {throw \"error\"}}; ++object not throw Error. Actual: ' + (e));\n }\n}\n\n//CHECK#5\nvar object = {toString: function() {return 1}};\nif (++object !== 1 + 1) {\n $ERROR('#5.1: var object = {toString: function() {return 1}}; ++object === 1 + 1. Actual: ' + (++object));\n} else {\n if (object !== 1 + 1) {\n $ERROR('#5.2: var object = {toString: function() {return 1}}; ++object; object === 1 + 1. Actual: ' + (object));\n }\n}\n\n\n//CHECK#6\nvar object = {valueOf: function() {return {}}, toString: function() {return 1}}\nif (++object !== 1 + 1) {\n $ERROR('#6.1: var object = {valueOf: function() {return {}}, toString: function() {return 1}}; ++object === 1 + 1. Actual: ' + (++object));\n} else {\n if (object !== 1 + 1) {\n $ERROR('#6.2: var object = {valueOf: function() {return {}}, toString: function() {return 1}}; ++object; object === 1 + 1. Actual: ' + (object));\n }\n}\n\n//CHECK#7\ntry {\n var object = {valueOf: function() {throw \"error\"}, toString: function() {return 1}};\n ++object;\n $ERROR('#7.1: var object = {valueOf: function() {throw \"error\"}, toString: function() {return 1}}; ++object throw \"error\". Actual: ' + (++object));\n} \ncatch (e) {\n if (e !== \"error\") {\n $ERROR('#7.2: var object = {valueOf: function() {throw \"error\"}, toString: function() {return 1}}; ++object throw \"error\". Actual: ' + (e));\n } \n}\n\n//CHECK#8\ntry {\n var object = {valueOf: function() {return {}}, toString: function() {return {}}};\n ++object;\n $ERROR('#8.1: var object = {valueOf: function() {return {}}, toString: function() {return {}}}; ++object throw TypeError. Actual: ' + (++object));\n} \ncatch (e) {\n if ((e instanceof TypeError) !== true) {\n $ERROR('#8.2: var object = {valueOf: function() {return {}}, toString: function() {return {}}}; ++object throw TypeError. Actual: ' + (e));\n } \n}\n",
+ "id": "S11.4.4_A2.2_T1"
+ },
+ {
+ "section": "11.4.4, 11.6.3",
+ "description": "Type(x) is boolean primitive or Boolean object",
+ "test": "//CHECK#1\nvar x = false; \n++x;\nif (x !== 0 + 1) {\n $ERROR('#1: var x = false; ++x; x === 0 + 1. Actual: ' + (x));\n}\n\n//CHECK#2\nvar x = new Boolean(true); \n++x; \nif (x !== 1 + 1) {\n $ERROR('#2: var x = new Boolean(true); ++x; x === 1 + 1. Actual: ' + (x));\n}\n",
+ "id": "S11.4.4_A3_T1"
+ },
+ {
+ "section": "11.4.4, 11.6.3",
+ "description": "Type(x) is number primitive or Number object",
+ "test": "//CHECK#1\nvar x = 0.1; \n++x;\nif (x !== 0.1 + 1) {\n $ERROR('#1: var x = 0.1; ++x; x === 0.1 + 1. Actual: ' + (x));\n}\n\n//CHECK#2\nvar x = new Number(-1.1); \n++x;\nif (x !== -1.1 + 1) {\n $ERROR('#2: var x = new Number(-1.1); ++x; x === -1.1 + 1. Actual: ' + (x));\n}\n",
+ "id": "S11.4.4_A3_T2"
+ },
+ {
+ "section": "11.4.4, 11.6.3",
+ "description": "Type(x) is string primitive or String object",
+ "test": "//CHECK#1\nvar x = \"1\"; \n++x;\nif (x !== 1 + 1) {\n $ERROR('#1: var x = \"1\"; ++x; x === 1 + 1. Actual: ' + (x));\n}\n\n//CHECK#2\nvar x = \"x\"; \n++x; \nif (isNaN(x) !== true) {\n $ERROR('#2: var x = \"x\"; ++x; x === Not-a-Number. Actual: ' + (x));\n}\n\n//CHECK#3\nvar x = new Number(\"-1\"); \n++x;\nif (x !== -1 + 1) {\n $ERROR('#3: var x = new String(\"-1\"); ++x; x === -1 + 1. Actual: ' + (x));\n}\n",
+ "id": "S11.4.4_A3_T3"
+ },
+ {
+ "section": "11.4.4, 11.6.3",
+ "description": "Type(x) is undefined or null",
+ "test": "//CHECK#1\nvar x; \n++x; \nif (isNaN(x) !== true) {\n $ERROR('#1: var x; ++x; x === Not-a-Number. Actual: ' + (x));\n}\n\n//CHECK#2\nvar x = null; \n++x;\nif (x !== 1) {\n $ERROR('#2: var x = null; ++x; x === 1. Actual: ' + (x));\n}\n",
+ "id": "S11.4.4_A3_T4"
+ },
+ {
+ "section": "11.4.4, 11.6.3",
+ "description": "Type(x) is Object object or Function object",
+ "test": "//CHECK#1\nvar x = {}; \n++x; \nif (isNaN(x) !== true) {\n $ERROR('#1: var x = {}; ++x; x === Not-a-Number. Actual: ' + (x));\n}\n\n//CHECK#2\nvar x = function(){return 1}; \n++x; \nif (isNaN(x) !== true) {\n $ERROR('#2: var x = function(){return 1}; ++x; x === Not-a-Number. Actual: ' + (x));\n}\n",
+ "id": "S11.4.4_A3_T5"
+ },
+ {
+ "section": "11.4.4, 11.6.3",
+ "description": "Type(x) is boolean primitive or Boolean object",
+ "test": "//CHECK#1\nvar x = false; \nif (++x !== 0 + 1) {\n $ERROR('#1: var x = false; ++x === 0 + 1. Actual: ' + (++x));\n}\n\n//CHECK#2\nvar x = new Boolean(true);\nif (++x !== 1 + 1) {\n $ERROR('#2: var x = new Boolean(true); ++x === 1 + 1. Actual: ' + (++x));\n}\n",
+ "id": "S11.4.4_A4_T1"
+ },
+ {
+ "section": "11.4.4, 11.6.3",
+ "description": "Type(x) is number primitive or Number object",
+ "test": "//CHECK#1\nvar x = 0.1;\nif (++x !== 0.1 + 1) {\n $ERROR('#1: var x = 0.1; ++x === 0.1 + 1. Actual: ' + (++x));\n}\n\n//CHECK#2\nvar x = new Number(-1.1);\nif (++x !== -1.1 + 1) {\n $ERROR('#2: var x = new Number(-1.1); ++x === -1.1 + 1. Actual: ' + (++x));\n}\n",
+ "id": "S11.4.4_A4_T2"
+ },
+ {
+ "section": "11.4.4, 11.6.3",
+ "description": "Type(x) is string primitive or String object",
+ "test": "//CHECK#1\nvar x = \"1\";\nif (++x !== 1 + 1) {\n $ERROR('#1: var x = \"1\"; ++x === 1 + 1. Actual: ' + (++x));\n}\n\n//CHECK#2\nvar x = \"x\"; \nif (isNaN(++x) !== true) {\n $ERROR('#2: var x = \"x\"; ++x === Not-a-Number. Actual: ' + (++x));\n}\n\n//CHECK#3\nvar x = new String(\"-1\");\nif (++x !== -1 + 1) {\n $ERROR('#3: var x = new String(\"-1\"); ++x === -1 + 1. Actual: ' + (++x));\n}\n",
+ "id": "S11.4.4_A4_T3"
+ },
+ {
+ "section": "11.4.4, 11.6.3",
+ "description": "Type(x) is undefined or null",
+ "test": "//CHECK#1\nvar x; \nif (isNaN(++x) !== true) {\n $ERROR('#1: var x; ++x === Not-a-Number. Actual: ' + (++x));\n}\n\n//CHECK#2\nvar x = null;\nif (++x !== 1) {\n $ERROR('#2: var x = null; ++x === 1. Actual: ' + (++x));\n}\n",
+ "id": "S11.4.4_A4_T4"
+ },
+ {
+ "section": "11.4.4, 11.6.3",
+ "description": "Type(x) is Object object or Function object",
+ "test": "//CHECK#1\nvar x = {}; \nif (isNaN(++x) !== true) {\n $ERROR('#1: var x = {}; ++x === Not-a-Number. Actual: ' + (++x));\n}\n\n//CHECK#2\nvar x = function(){return 1}; \nif (isNaN(++x) !== true) {\n $ERROR('#2: var x = function(){return 1}; ++x === Not-a-Number. Actual: ' + (++x));\n}\n",
+ "id": "S11.4.4_A4_T5"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/11.4.5.json b/website/resources/scripts/testcases2/11.4.5.json
new file mode 100644
index 000000000..190a282eb
--- /dev/null
+++ b/website/resources/scripts/testcases2/11.4.5.json
@@ -0,0 +1,24 @@
+{
+ "testCollection": {
+ "name": "11.4.5",
+ "numTests": 2,
+ "tests": [
+ {
+ "id": "11.4.5-2-1-s",
+ "path": "TestCases/chapter11/11.4/11.4.5/11.4.5-2-1-s.js",
+ "description": "Strict Mode - SyntaxError is thrown for --eval",
+ "test": "assertTrue((function testcase() {\n \"use strict\";\n var blah = eval;\n try {\n eval(\"--eval;\");\n return false;\n } catch (e) {\n return e instanceof SyntaxError && blah === eval;\n }\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict())",
+ "strict_only": ""
+ },
+ {
+ "id": "11.4.5-2-2-s",
+ "path": "TestCases/chapter11/11.4/11.4.5/11.4.5-2-2-s.js",
+ "description": "Strict Mode - SyntaxError is thrown for --arguments",
+ "test": "assertTrue((function testcase() {\n \"use strict\";\n var blah = arguments;\n try {\n eval(\"--arguments;\");\n return false;\n } catch (e) {\n return e instanceof SyntaxError && blah === arguments;\n }\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict())",
+ "strict_only": ""
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/11.4.5_Prefix_Decrement_Operator.json b/website/resources/scripts/testcases2/11.4.5_Prefix_Decrement_Operator.json
new file mode 100644
index 000000000..fff0dbfc1
--- /dev/null
+++ b/website/resources/scripts/testcases2/11.4.5_Prefix_Decrement_Operator.json
@@ -0,0 +1,99 @@
+{
+ "testCollection": {
+ "name": "11.4.5_Prefix_Decrement_Operator",
+ "numTests": 15,
+ "tests": [
+ {
+ "section": "11.4.5, 11.6.3, 7.2, 7.3",
+ "description": "Checking by using eval",
+ "test": "//CHECK#1\nif (eval(\"var x = 1; --\\u0009x\") !== 0) {\n $ERROR('#1: var x = 1; --\\\\u0009x; x === 0. Actual: ' + (x));\n}\n\n//CHECK#2\nif (eval(\"var x = 1; --\\u000Bx\") !== 0) {\n $ERROR('#2: var x = 1; --\\\\u000Bx; x === 0. Actual: ' + (x)); \n}\n\n//CHECK#3\nif (eval(\"var x = 1; --\\u000Cx\") !== 0) {\n $ERROR('#3: var x = 1; --\\\\u000Cx; x === 0. Actual: ' + (x));\n}\n\n//CHECK#4\nif (eval(\"var x = 1; --\\u0020x\") !== 0) {\n $ERROR('#4: var x = 1; --\\\\u0020x; x === 0. Actual: ' + (x));\n}\n\n//CHECK#5\nif (eval(\"var x = 1; --\\u00A0x\") !== 0) {\n $ERROR('#5: var x = 1; --\\\\u00A0x; x === 0. Actual: ' + (x));\n}\n\n//CHECK#6\nif (eval(\"var x = 1; --\\u000Ax\") !== 0) {\n $ERROR('#6: var x = 1; --\\\\u000Ax; x === 0. Actual: ' + (x)); \n}\n\n//CHECK#7\nif (eval(\"var x = 1; --\\u000Dx\") !== 0) {\n $ERROR('#7: var x = 1; --\\\\u000Dx; x === 0. Actual: ' + (x));\n}\n\n//CHECK#8\nif (eval(\"var x = 1; --\\u2028x\") !== 0) {\n $ERROR('#8: var x = 1; --\\\\u2028x; x === 0. Actual: ' + (x));\n}\n\n//CHECK#9\nif (eval(\"var x = 1; --\\u2029x\") !== 0) {\n $ERROR('#9: var x = 1; --\\\\u2029x; x === 0. Actual: ' + (x));\n}\n\n//CHECK#10\nif (eval(\"var x = 1; --\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u2029x\") !== 0) {\n $ERROR('#10: var x = 1; --\\\\u0009\\\\u000B\\\\u000C\\\\u0020\\\\u00A0\\\\u000A\\\\u000D\\\\u2028\\\\u2029x; x === 0. Actual: ' + (x));\n}\n",
+ "id": "S11.4.5_A1"
+ },
+ {
+ "section": "11.4.5, 11.6.3",
+ "description": "Type(x) is Reference and GetBase(x) is not null",
+ "test": "//CHECK#1\nvar x = 1;\nif (--x !== 1 - 1) {\n $ERROR('#1: var x = 1; --x === 1 - 1. Actual: ' + (--x));\n} else {\n if (x !== 1 - 1) {\n $ERROR('#1: var x = 1; --x; x === 1 - 1. Actual: ' + (x));\n } \n}\n\n//CHECK#2\nthis.x = 1;\nif (--this.x !== 1 - 1) {\n $ERROR('#2: this.x = 1; --this.x === 1 - 1. Actual: ' + (--this.x));\n} else {\n if (this.x !== 1 - 1) {\n $ERROR('#2: this.x = 1; --this.x; this.x === 1 - 1. Actual: ' + (this.x));\n } \n}\n\n//CHECK#3\nvar object = new Object();\nobject.prop = 1;\nif (--object.prop !== 1 - 1) {\n $ERROR('#3: var object = new Object(); object.prop = 1; --object.prop === 1 - 1. Actual: ' + (--object.prop));\n} else {\n if (this.x !== 1 - 1) {\n $ERROR('#3: var object = new Object(); object.prop = 1; --object.prop; object.prop === 1 - 1. Actual: ' + (object.prop));\n } \n}\n",
+ "id": "S11.4.5_A2.1_T1"
+ },
+ {
+ "section": "11.4.5, 11.6.3",
+ "description": "If GetBase(x) is null, throw ReferenceError",
+ "test": "//CHECK#1\ntry {\n --x;\n $ERROR('#1.1: --x throw ReferenceError. Actual: ' + (--x)); \n}\ncatch (e) {\n if ((e instanceof ReferenceError) !== true) {\n $ERROR('#1.2: --x throw ReferenceError. Actual: ' + (e)); \n }\n}\n\n",
+ "id": "S11.4.5_A2.1_T2"
+ },
+ {
+ "section": "11.4.5, 11.6.3",
+ "description": "If Type(x) is not Reference, throw ReferenceError (or SyntaxError)",
+ "negative": "",
+ "test": "//CHECK#1\ntry {\n --1;\n $ERROR('#1.1: --1 throw ReferenceError (or SyntaxError). Actual: ' + (--1)); \n}\ncatch (e) {\n if ((e instanceof ReferenceError) !== true) {\n $ERROR('#1.2: --1 throw ReferenceError (or SyntaxError). Actual: ' + (e)); \n } else {\n --1;\n }\n}\n",
+ "id": "S11.4.5_A2.1_T3"
+ },
+ {
+ "section": "11.4.5, 8.6.2.6",
+ "description": "If Type(value) is Object, evaluate ToPrimitive(value, Number)",
+ "test": "//CHECK#1\nvar object = {valueOf: function() {return 1}};\nif (--object !== 1 - 1) {\n $ERROR('#1: var object = {valueOf: function() {return 1}}; --object === 1 - 1. Actual: ' + (--object));\n} else {\n if (object !== 1 - 1) {\n $ERROR('#1: var object = {valueOf: function() {return 1}}; --object; object === 1 - 1. Actual: ' + (object));\n }\n}\n\n//CHECK#2\nvar object = {valueOf: function() {return 1}, toString: function() {return 0}};\nif (--object !== 1 - 1) {\n $ERROR('#2: var object = {valueOf: function() {return 1}, toString: function() {return 0}}; --object === 1 - 1. Actual: ' + (--object));\n} else {\n if (object !== 1 - 1) {\n $ERROR('#2: var object = {valueOf: function() {return 1}, toString: function() {return 0}}; --object; object === 1 - 1. Actual: ' + (object));\n }\n}\n\n//CHECK#3\nvar object = {valueOf: function() {return 1}, toString: function() {return {}}};\nif (--object !== 1 - 1) {\n $ERROR('#3: var object = {valueOf: function() {return 1}, toString: function() {return {}}}; --object === 1 - 1. Actual: ' + (--object));\n} else {\n if (object !== 1 - 1) {\n $ERROR('#3: var object = {valueOf: function() {return 1}, toString: function() {return {}}}; --object; object === 1 - 1. Actual: ' + (object));\n }\n}\n\n//CHECK#4\ntry {\n var object = {valueOf: function() {return 1}, toString: function() {throw \"error\"}};\n if (--object !== 1 - 1) {\n $ERROR('#4.1: var object = {valueOf: function() {return 1}, toString: function() {throw \"error\"}}; --object === 1 - 1. Actual: ' + (--object));\n } else {\n if (object !== 1 - 1) {\n $ERROR('#4.1: var object = {valueOf: function() {return 1}, toString: function() {throw \"error\"}}; --object; object === 1 - 1. Actual: ' + (object));\n }\n }\n}\ncatch (e) {\n if (e === \"error\") {\n $ERROR('#4.2: var object = {valueOf: function() {return 1}, toString: function() {throw \"error\"}}; --object not throw \"error\"');\n } else {\n $ERROR('#4.3: var object = {valueOf: function() {return 1}, toString: function() {throw \"error\"}}; --object not throw Error. Actual: ' + (e));\n }\n}\n\n//CHECK#5\nvar object = {toString: function() {return 1}};\nif (--object !== 1 - 1) {\n $ERROR('#5.1: var object = {toString: function() {return 1}}; --object === 1 - 1. Actual: ' + (--object));\n} else {\n if (object !== 1 - 1) {\n $ERROR('#5.2: var object = {toString: function() {return 1}}; --object; object === 1 - 1. Actual: ' + (object));\n }\n}\n\n\n//CHECK#6\nvar object = {valueOf: function() {return {}}, toString: function() {return 1}}\nif (--object !== 1 - 1) {\n $ERROR('#6.1: var object = {valueOf: function() {return {}}, toString: function() {return 1}}; --object === 1 - 1. Actual: ' + (--object));\n} else {\n if (object !== 1 - 1) {\n $ERROR('#6.2: var object = {valueOf: function() {return {}}, toString: function() {return 1}}; --object; object === 1 - 1. Actual: ' + (object));\n }\n}\n\n//CHECK#7\ntry {\n var object = {valueOf: function() {throw \"error\"}, toString: function() {return 1}};\n --object;\n $ERROR('#7.1: var object = {valueOf: function() {throw \"error\"}, toString: function() {return 1}}; --object throw \"error\". Actual: ' + (--object));\n} \ncatch (e) {\n if (e !== \"error\") {\n $ERROR('#7.2: var object = {valueOf: function() {throw \"error\"}, toString: function() {return 1}}; --object throw \"error\". Actual: ' + (e));\n } \n}\n\n//CHECK#8\ntry {\n var object = {valueOf: function() {return {}}, toString: function() {return {}}};\n --object;\n $ERROR('#8.1: var object = {valueOf: function() {return {}}, toString: function() {return {}}}; --object throw TypeError. Actual: ' + (--object));\n} \ncatch (e) {\n if ((e instanceof TypeError) !== true) {\n $ERROR('#8.2: var object = {valueOf: function() {return {}}, toString: function() {return {}}}; --object throw TypeError. Actual: ' + (e));\n } \n}\n",
+ "id": "S11.4.5_A2.2_T1"
+ },
+ {
+ "section": "11.4.5, 11.6.3",
+ "description": "Type(x) is boolean primitive or Boolean object",
+ "test": "//CHECK#1\nvar x = true; \n--x;\nif (x !== 1 - 1) {\n $ERROR('#1: var x = true; --x; x === 1 - 1. Actual: ' + (x));\n}\n\n//CHECK#2\nvar x = new Boolean(false); \n--x;\nif (x !== 0 - 1) {\n $ERROR('#2: var x = new Boolean(false); --x; x === 0 - 1. Actual: ' + (x));\n}\n",
+ "id": "S11.4.5_A3_T1"
+ },
+ {
+ "section": "11.4.5, 11.6.3",
+ "description": "Type(x) is number primitive or Number object",
+ "test": "//CHECK#1\nvar x = 0.1; \n--x;\nif (x !== 0.1 - 1) {\n $ERROR('#1: var x = 0.1; --x; x === 0.1 - 1. Actual: ' + (x));\n}\n\n//CHECK#2\nvar x = new Number(-1.1); \n--x;\nif (x !== -1.1 - 1) {\n $ERROR('#2: var x = new Number(-1.1); --x; x === -1.1 - 1. Actual: ' + (x));\n}\n",
+ "id": "S11.4.5_A3_T2"
+ },
+ {
+ "section": "11.4.5, 11.6.3",
+ "description": "Type(x) is primitive string or String object",
+ "test": "//CHECK#1\nvar x = \"1\"; \n--x;\nif (x !== 1 - 1) {\n $ERROR('#1: var x = \"1\"; --x; x === 1 - 1. Actual: ' + (x));\n}\n\n//CHECK#2\nvar x = \"x\"; \n--x; \nif (isNaN(x) !== true) {\n $ERROR('#2: var x = \"x\"; --x; x === Not-a-Number. Actual: ' + (x));\n}\n\n//CHECK#3\nvar x = new Number(\"-1\"); \n--x;\nif (x !== -1 - 1) {\n $ERROR('#3: var x = new String(\"-1\"); --x; x === -1 - 1. Actual: ' + (x));\n}\n",
+ "id": "S11.4.5_A3_T3"
+ },
+ {
+ "section": "11.4.5, 11.6.3",
+ "description": "Type(x) is undefined or null",
+ "test": "//CHECK#1\nvar x; \n--x;\nif (isNaN(x) !== true) {\n $ERROR('#1: var x; --x; x === Not-a-Number. Actual: ' + (x));\n}\n\n//CHECK#2\nvar x = null; \n--x;\nif (x !== -1) {\n $ERROR('#2: var x = null; --x; x === -1. Actual: ' + (x));\n}\n",
+ "id": "S11.4.5_A3_T4"
+ },
+ {
+ "section": "11.4.5, 11.6.3",
+ "description": "Type(x) is Object object or Function object",
+ "test": "//CHECK#1\nvar x = {}; \n--x; \nif (isNaN(x) !== true) {\n $ERROR('#1: var x = {}; --x; x === Not-a-Number. Actual: ' + (x));\n}\n\n//CHECK#2\nvar x = function(){return 1}; \n--x; \nif (isNaN(x) !== true) {\n $ERROR('#2: var x = function(){return 1}; --x; x === Not-a-Number. Actual: ' + (x));\n}\n",
+ "id": "S11.4.5_A3_T5"
+ },
+ {
+ "section": "11.4.5, 11.6.3",
+ "description": "Type(x) is boolean primitive or Boolean object",
+ "test": "//CHECK#1\nvar x = true;\nif (--x !== 1 - 1) {\n $ERROR('#1: var x = true; --x === 1 - 1. Actual: ' + (--x));\n}\n\n//CHECK#2\nvar x = new Boolean(false);\nif (--x !== 0 - 1) {\n $ERROR('#2: var x = new Boolean(false); --x === 0 - 1. Actual: ' + (--x));\n}\n",
+ "id": "S11.4.5_A4_T1"
+ },
+ {
+ "section": "11.4.5, 11.6.3",
+ "description": "Type(x) is number primitive or Number object",
+ "test": "//CHECK#1\nvar x = 0.1;\nif (--x !== 0.1 - 1) {\n $ERROR('#1: var x = 0.1; --x === 0.1 - 1. Actual: ' + (--x));\n}\n\n//CHECK#2\nvar x = new Number(-1.1);\nif (--x !== -1.1 - 1) {\n $ERROR('#2: var x = new Number(-1.1); --x === -1.1- 1. Actual: ' + (--x));\n}\n",
+ "id": "S11.4.5_A4_T2"
+ },
+ {
+ "section": "11.4.5, 11.6.3",
+ "description": "Type(x) is string primitive or String object",
+ "test": "//CHECK#1\nvar x = \"1\";\nif (--x !== 1 - 1) {\n $ERROR('#1: var x = \"1\"; --x === 1 - 1. Actual: ' + (--x));\n}\n\n//CHECK#2\nvar x = \"x\";\nif (isNaN(--x) !== true) {\n $ERROR('#2: var x = \"x\"; --x === Not-a-Number. Actual: ' + (--x));\n}\n\n//CHECK#3\nvar x = new String(\"-1\"); \nif (--x !== -1 - 1) {\n $ERROR('#3: var x = new String(\"-1\"); --x === -1 - 1. Actual: ' + (--x));\n}\n",
+ "id": "S11.4.5_A4_T3"
+ },
+ {
+ "section": "11.4.5, 11.6.3",
+ "description": "Type(x) is undefined or null",
+ "test": "//CHECK#1\nvar x;\nif (isNaN(--x) !== true) {\n $ERROR('#1: var x; --x; x === Not-a-Number. Actual: ' + (x));\n}\n\n//CHECK#2\nvar x = null;\nif (--x !== -1) {\n $ERROR('#2: var x = null; --x === -1. Actual: ' + (--x));\n}\n",
+ "id": "S11.4.5_A4_T4"
+ },
+ {
+ "section": "11.4.5, 11.6.3",
+ "description": "Type(x) is Object object or Function object",
+ "test": "//CHECK#1\nvar x = {}; \nif (isNaN(--x) !== true) {\n $ERROR('#1: var x = {}; --x === Not-a-Number. Actual: ' + (--x));\n}\n\n//CHECK#2\nvar x = function(){return 1}; \nif (isNaN(--x) !== true) {\n $ERROR('#2: var x = function(){return 1}; --x === Not-a-Number. Actual: ' + (--x));\n}\n",
+ "id": "S11.4.5_A4_T5"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/11.4.6_Unary_plus_Operator.json b/website/resources/scripts/testcases2/11.4.6_Unary_plus_Operator.json
new file mode 100644
index 000000000..2b1235410
--- /dev/null
+++ b/website/resources/scripts/testcases2/11.4.6_Unary_plus_Operator.json
@@ -0,0 +1,62 @@
+{
+ "testCollection": {
+ "name": "11.4.6_Unary_plus_Operator",
+ "numTests": 9,
+ "tests": [
+ {
+ "section": "11.4.6, 7.2, 7.3",
+ "description": "Checking by using eval",
+ "test": "//CHECK#1\nif (eval(\"+\\u00091\") !== 1) {\n $ERROR('#1: +\\\\u00091 === 1');\n}\n\n//CHECK#2\nif (eval(\"+\\u000B1\") !== 1) {\n $ERROR('#2: +\\\\u000B1 === 1'); \n}\n\n//CHECK#3\nif (eval(\"+\\u000C1\") !== 1) {\n $ERROR('#3: +\\\\u000C1 === 1');\n}\n\n//CHECK#4\nif (eval(\"+\\u00201\") !== 1) {\n $ERROR('#4: +\\\\u0020 === 1');\n}\n\n//CHECK#5\nif (eval(\"+\\u00A01\") !== 1) {\n $ERROR('#5: +\\\\u00A01 === 1');\n}\n\n//CHECK#6\nif (eval(\"+\\u000A1\") !== 1) {\n $ERROR('#6: +\\\\u000A1 === 1'); \n}\n\n//CHECK#7\nif (eval(\"+\\u000D1\") !== 1) {\n $ERROR('#7: +\\\\u000D1 === 1');\n}\n\n//CHECK#8\nif (eval(\"+\\u20281\") !== 1) {\n $ERROR('#8: +\\\\u20281 === 1');\n}\n\n//CHECK#9\nif (eval(\"+\\u20291\") !== 1) {\n $ERROR('#9: +\\\\u20291 === 1');\n}\n\n//CHECK#10\nif (eval(\"+\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u20291\") !== 1) {\n $ERROR('#10: +\\\\u0009\\\\u000B\\\\u000C\\\\u0020\\\\u00A0\\\\u000A\\\\u000D\\\\u2028\\\\u20291 === 1');\n}\n",
+ "id": "S11.4.6_A1"
+ },
+ {
+ "section": "11.4.6",
+ "description": "Either Type(x) is not Reference or GetBase(x) is not null",
+ "test": "//CHECK#1\nif (+1 !== 1) {\n $ERROR('#1: +1 === 1. Actual: ' + (+1));\n}\n\n//CHECK#2\nif (+(+1) !== 1) {\n $ERROR('#2: +(+1) === -1. Actual: ' + (+(+1)));\n}\n\n//CHECK#3\nvar x = 1;\nif (+x !== 1) {\n $ERROR('#3: var x = +1; -x === 1. Actual: ' + (-x));\n}\n\n//CHECK#4\nvar x = 1;\nif (+(+x) !== 1) {\n $ERROR('#4: var x = 1; +(+x) === 1. Actual: ' + (+(+x)));\n}\n\n//CHECK#5\nvar object = new Object();\nobject.prop = 1;\nif (+object.prop !== 1) {\n $ERROR('#5: var object = new Object(); object.prop = 1; +object.prop === 1. Actual: ' + (+object.prop));\n}\n",
+ "id": "S11.4.6_A2.1_T1"
+ },
+ {
+ "section": "11.4.6",
+ "description": "If GetBase(x) is null, throw ReferenceError",
+ "test": "//CHECK#1\ntry {\n +x;\n $ERROR('#1.1: +x throw ReferenceError. Actual: ' + (+x)); \n}\ncatch (e) {\n if ((e instanceof ReferenceError) !== true) {\n $ERROR('#1.2: +x throw ReferenceError. Actual: ' + (e)); \n }\n}\n",
+ "id": "S11.4.6_A2.1_T2"
+ },
+ {
+ "section": "11.4.6, 8.6.2.6",
+ "description": "If Type(value) is Object, evaluate ToPrimitive(value, Number)",
+ "test": "//CHECK#1\nvar object = {valueOf: function() {return 1}};\nif (+object !== 1) {\n $ERROR('#1: var object = {valueOf: function() {return 1}}; +object === 1. Actual: ' + (+object));\n}\n\n//CHECK#2\nvar object = {valueOf: function() {return 1}, toString: function() {return 0}};\nif (+object !== 1) {\n $ERROR('#2: var object = {valueOf: function() {return 1}, toString: function() {return 0}}; +object === 1. Actual: ' + (+object));\n} \n\n//CHECK#3\nvar object = {valueOf: function() {return 1}, toString: function() {return {}}};\nif (+object !== 1) {\n $ERROR('#3: var object = {valueOf: function() {return 1}, toString: function() {return {}}}; +object === 1. Actual: ' + (+object));\n}\n\n//CHECK#4\ntry {\n var object = {valueOf: function() {return 1}, toString: function() {throw \"error\"}};\n if (+object !== 1) {\n $ERROR('#4.1: var object = {valueOf: function() {return 1}, toString: function() {throw \"error\"}}; +object === 1. Actual: ' + (+object));\n }\n}\ncatch (e) {\n if (e === \"error\") {\n $ERROR('#4.2: var object = {valueOf: function() {return 1}, toString: function() {throw \"error\"}}; +object not throw \"error\"');\n } else {\n $ERROR('#4.3: var object = {valueOf: function() {return 1}, toString: function() {throw \"error\"}}; +object not throw Error. Actual: ' + (e));\n }\n}\n\n//CHECK#5\nvar object = {toString: function() {return 1}};\nif (+object !== 1) {\n $ERROR('#5: var object = {toString: function() {return 1}}; +object === 1. Actual: ' + (+object));\n}\n\n//CHECK#6\nvar object = {valueOf: function() {return {}}, toString: function() {return 1}}\nif (+object !== 1) {\n $ERROR('#6: var object = {valueOf: function() {return {}}, toString: function() {return 1}}; +object === 1. Actual: ' + (+object));\n}\n\n//CHECK#7\ntry {\n var object = {valueOf: function() {throw \"error\"}, toString: function() {return 1}};\n +object;\n $ERROR('#7.1: var object = {valueOf: function() {throw \"error\"}, toString: function() {return 1}}; +object throw \"error\". Actual: ' + (+object));\n} \ncatch (e) {\n if (e !== \"error\") {\n $ERROR('#7.2: var object = {valueOf: function() {throw \"error\"}, toString: function() {return 1}}; +object throw \"error\". Actual: ' + (e));\n } \n}\n\n//CHECK#8\ntry {\n var object = {valueOf: function() {return {}}, toString: function() {return {}}};\n +object;\n $ERROR('#8.1: var object = {valueOf: function() {return {}}, toString: function() {return {}}}; +object throw TypeError. Actual: ' + (+object));\n} \ncatch (e) {\n if ((e instanceof TypeError) !== true) {\n $ERROR('#8.2: var object = {valueOf: function() {return {}}, toString: function() {return {}}}; +object throw TypeError. Actual: ' + (e));\n } \n}\n",
+ "id": "S11.4.6_A2.2_T1"
+ },
+ {
+ "section": "11.4.6",
+ "description": "Type(x) is boolean primitive or Boolean object",
+ "test": "//CHECK#1\nif (+false !== 0) {\n $ERROR('#1: +false === 0. Actual: ' + (+false));\n}\n\n//CHECK#2\nif (+new Boolean(true) !== 1) {\n $ERROR('#2: +new Boolean(true) === 1. Actual: ' + (+new Boolean(true)));\n}\n",
+ "id": "S11.4.6_A3_T1"
+ },
+ {
+ "section": "11.4.6",
+ "description": "Type(x) is number primitive or Number object",
+ "test": "//CHECK#1\nif (+0.1 !== 0.1) {\n $ERROR('#1: +0.1 === 0.1. Actual: ' + (+0.1));\n}\n\n//CHECK#2\nif (+new Number(-1.1) !== -1.1) {\n $ERROR('#2: +new Number(-1.1) === -1.1. Actual: ' + (+new Number(-1.1)));\n}\n",
+ "id": "S11.4.6_A3_T2"
+ },
+ {
+ "section": "11.4.6",
+ "description": "Type(x) is string primitive or String object",
+ "test": "//CHECK#1\nif (+\"1\" !== 1) {\n $ERROR('#1: +\"1\" === 1. Actual: ' + (+\"1\"));\n}\n\n//CHECK#2\nif (isNaN(+\"x\") !== true) {\n $ERROR('#2: +\"x\" === Not-a-Number. Actual: ' + (+\"x\"));\n}\n\n//CHECK#3\nif (+new Number(\"-1\") !== -1) {\n $ERROR('#3: +new String(\"-1\") === -1. Actual: ' + (+new String(\"-1\")));\n}\n",
+ "id": "S11.4.6_A3_T3"
+ },
+ {
+ "section": "11.4.6",
+ "description": "Type(x) is undefined or null",
+ "test": "//CHECK#1\nif (isNaN(+void 0) !== true) {\n $ERROR('#1: +void 0 === Not-a-Number. Actual: ' + (+void 0));\n}\n\n//CHECK#2\nif (+null !== 0) {\n $ERROR('#2: +null === 0. Actual: ' + (+null));\n}\n",
+ "id": "S11.4.6_A3_T4"
+ },
+ {
+ "section": "11.4.6",
+ "description": "Type(x) is Object object or Function object",
+ "test": "//CHECK#1\nif (isNaN(+{}) !== true) {\n $ERROR('#1: +{} === Not-a-Number. Actual: ' + (+{}));\n}\n\n//CHECK#2 \nif (isNaN(+function(){return 1}) !== true) {\n $ERROR('#2: +function(){return 1} === Not-a-Number. Actual: ' + (+function(){return 1}));\n}\n",
+ "id": "S11.4.6_A3_T5"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/11.4.7_Unary_minus_Operator.json b/website/resources/scripts/testcases2/11.4.7_Unary_minus_Operator.json
new file mode 100644
index 000000000..e0c0df9d3
--- /dev/null
+++ b/website/resources/scripts/testcases2/11.4.7_Unary_minus_Operator.json
@@ -0,0 +1,74 @@
+{
+ "testCollection": {
+ "name": "11.4.7_Unary_minus_Operator",
+ "numTests": 11,
+ "tests": [
+ {
+ "section": "11.4.7, 7.2, 7.3",
+ "description": "Checking by using eval",
+ "test": "//CHECK#1\nif (eval(\"-\\u00091\") !== -1) {\n $ERROR('#1: -\\\\u00091 === -1');\n}\n\n//CHECK#2\nif (eval(\"-\\u000B1\") !== -1) {\n $ERROR('#2: -\\\\u000B1 === -1'); \n}\n\n//CHECK#3\nif (eval(\"-\\u000C1\") !== -1) {\n $ERROR('#3: -\\\\u000C1 === -1');\n}\n\n//CHECK#4\nif (eval(\"-\\u00201\") !== -1) {\n $ERROR('#4: -\\\\u0020 === -1');\n}\n\n//CHECK#5\nif (eval(\"-\\u00A01\") !== -1) {\n $ERROR('#5: -\\\\u00A01 === -1');\n}\n\n//CHECK#6\nif (eval(\"-\\u000A1\") !== -1) {\n $ERROR('#6: -\\\\u000A1 === -1'); \n}\n\n//CHECK#7\nif (eval(\"-\\u000D1\") !== -1) {\n $ERROR('#7: -\\\\u000D1 === -1');\n}\n\n//CHECK#8\nif (eval(\"-\\u20281\") !== -1) {\n $ERROR('#8: -\\\\u20281 === -1');\n}\n\n//CHECK#9\nif (eval(\"-\\u20291\") !== -1) {\n $ERROR('#9: -\\\\u20291 === -1');\n}\n\n//CHECK#10\nif (eval(\"-\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u20291\") !== -1) {\n $ERROR('#10: -\\\\u0009\\\\u000B\\\\u000C\\\\u0020\\\\u00A0\\\\u000A\\\\u000D\\\\u2028\\\\u20291 === -1');\n}\n",
+ "id": "S11.4.7_A1"
+ },
+ {
+ "section": "11.4.7",
+ "description": "Either Type(x) is not Reference or GetBase(x) is not null",
+ "test": "//CHECK#1\nif (-1 !== -1) {\n $ERROR('#1: -1 === -1. Actual: ' + (-1));\n}\n\n//CHECK#2\nif (-(-1) !== 1) {\n $ERROR('#2: -(-1) === -1. Actual: ' + (-(-1)));\n}\n\n//CHECK#3\nvar x = -1;\nif (-x !== 1) {\n $ERROR('#3: var x = -1; -x === 1. Actual: ' + (-x));\n}\n\n//CHECK#4\nvar x = -1;\nif (-(-x) !== -1) {\n $ERROR('#4: var x = -1; -(-x) === -1. Actual: ' + (-(-x)));\n}\n\n//CHECK#5\nvar object = new Object();\nobject.prop = 1;\nif (-object.prop !== -1) {\n $ERROR('#5: var object = new Object(); object.prop = -1; -object.prop === -1. Actual: ' + (-object.prop));\n}\n",
+ "id": "S11.4.7_A2.1_T1"
+ },
+ {
+ "section": "11.4.7",
+ "description": "If GetBase(x) is null, throw ReferenceError",
+ "test": "//CHECK#1\ntry {\n -x;\n $ERROR('#1.1: -x throw ReferenceError. Actual: ' + (-x)); \n}\ncatch (e) {\n if ((e instanceof ReferenceError) !== true) {\n $ERROR('#1.2: -x throw ReferenceError. Actual: ' + (e)); \n }\n}\n\n",
+ "id": "S11.4.7_A2.1_T2"
+ },
+ {
+ "section": "11.4.7, 8.6.2.6",
+ "description": "If Type(value) is Object, evaluate ToPrimitive(value, Number)",
+ "test": "//CHECK#1\nvar object = {valueOf: function() {return -1}};\nif (-object !== 1) {\n $ERROR('#1: var object = {valueOf: function() {return -1}}; -object === 1. Actual: ' + (-object));\n}\n\n//CHECK#2\nvar object = {valueOf: function() {return -1}, toString: function() {return 0}};\nif (-object !== 1) {\n $ERROR('#2: var object = {valueOf: function() {return -1}, toString: function() {return 0}}; -object === 1. Actual: ' + (-object));\n} \n\n//CHECK#3\nvar object = {valueOf: function() {return -1}, toString: function() {return {}}};\nif (-object !== 1) {\n $ERROR('#3: var object = {valueOf: function() {return -1}, toString: function() {return {}}}; -object === 1. Actual: ' + (-object));\n}\n\n//CHECK#4\ntry {\n var object = {valueOf: function() {return -1}, toString: function() {throw \"error\"}};\n if (-object !== 1) {\n $ERROR('#4.1: var object = {valueOf: function() {return -1}, toString: function() {throw \"error\"}}; -object === 1. Actual: ' + (-object));\n }\n}\ncatch (e) {\n if (e === \"error\") {\n $ERROR('#4.2: var object = {valueOf: function() {return -1}, toString: function() {throw \"error\"}}; -object not throw \"error\"');\n } else {\n $ERROR('#4.3: var object = {valueOf: function() {return -1}, toString: function() {throw \"error\"}}; -object not throw Error. Actual: ' + (e));\n }\n}\n\n//CHECK#5\nvar object = {toString: function() {return -1}};\nif (-object !== 1) {\n $ERROR('#5.1: var object = {toString: function() {return -1}}; -object === 1. Actual: ' + (-object));\n}\n\n//CHECK#6\nvar object = {valueOf: function() {return {}}, toString: function() {return -1}}\nif (-object !== 1) {\n $ERROR('#6: var object = {valueOf: function() {return {}}, toString: function() {return -1}}; -object === 1. Actual: ' + (-object));\n}\n\n//CHECK#7\ntry {\n var object = {valueOf: function() {throw \"error\"}, toString: function() {return -1}};\n -object;\n $ERROR('#7.1: var object = {valueOf: function() {throw \"error\"}, toString: function() {return -1}}; -object throw \"error\". Actual: ' + (-object));\n} \ncatch (e) {\n if (e !== \"error\") {\n $ERROR('#7.2: var object = {valueOf: function() {throw \"error\"}, toString: function() {return -1}}; -object throw \"error\". Actual: ' + (e));\n } \n}\n\n//CHECK#8\ntry {\n var object = {valueOf: function() {return {}}, toString: function() {return {}}};\n -object;\n $ERROR('#8.1: var object = {valueOf: function() {return {}}, toString: function() {return {}}}; -object throw TypeError. Actual: ' + (-object));\n} \ncatch (e) {\n if ((e instanceof TypeError) !== true) {\n $ERROR('#8.2: var object = {valueOf: function() {return {}}, toString: function() {return {}}}; -object throw TypeError. Actual: ' + (e));\n } \n}\n",
+ "id": "S11.4.7_A2.2_T1"
+ },
+ {
+ "section": "11.4.7",
+ "description": "Type(x) is boolean primitive or Boolean object",
+ "test": "//CHECK#1\nif (-false !== 0) {\n $ERROR('#1: -false === 0. Actual: ' + (-false));\n}\n\n//CHECK#2\nif (-new Boolean(true) !== -1) {\n $ERROR('#2: -new Boolean(true) === -1. Actual: ' + (-new Boolean(true)));\n}\n",
+ "id": "S11.4.7_A3_T1"
+ },
+ {
+ "section": "11.4.7",
+ "description": "Type(x) is number primitive or Number object",
+ "test": "//CHECK#1\nif (-(1) !== -1) {\n $ERROR('#1: -(1) === -1. Actual: ' + (-(1)));\n}\n\n//CHECK#2\nif (-new Number(-1) !== 1) {\n $ERROR('#2: -new Number(-1) === 1. Actual: ' + (-new Number(-1)));\n}\n",
+ "id": "S11.4.7_A3_T2"
+ },
+ {
+ "section": "11.4.7",
+ "description": "Type(x) is string primitive or String object",
+ "test": "//CHECK#1\nif (-\"1\" !== -1) {\n $ERROR('#1: -\"1\" === -1. Actual: ' + (-\"1\"));\n}\n\n//CHECK#2\nif (isNaN(-\"x\") !== true) {\n $ERROR('#2: -\"x\" === Not-a-Number. Actual: ' + (-\"x\"));\n}\n\n//CHECK#3\nif (-new String(\"-1\") !== 1) {\n $ERROR('#3: -new String(\"-1\") === 1. Actual: ' + (-new String(\"-1\")));\n}\n",
+ "id": "S11.4.7_A3_T3"
+ },
+ {
+ "section": "11.4.7",
+ "description": "Type(x) is undefined or null",
+ "test": "//CHECK#1\nif (isNaN(-void 0) !== true) {\n $ERROR('#1: +void 0 === Not-a-Number. Actual: ' + (+void 0));\n}\n\n//CHECK#2\nif (-null !== 0) {\n $ERROR('#2: +null === 0. Actual: ' + (+null));\n}\n",
+ "id": "S11.4.7_A3_T4"
+ },
+ {
+ "section": "11.4.7",
+ "description": "Type(x) is Object object or Function object",
+ "test": "//CHECK#1\nif (isNaN(-{}) !== true) {\n $ERROR('#1: -{} === Not-a-Number. Actual: ' + (-{}));\n}\n\n//CHECK#2 \nif (isNaN(-function(){return 1}) !== true) {\n $ERROR('#2: -function(){return 1} === Not-a-Number. Actual: ' + (-function(){return 1}));\n}\n",
+ "id": "S11.4.7_A3_T5"
+ },
+ {
+ "section": "11.4.7",
+ "description": "Checking NaN",
+ "test": "//CHECK#1\nif (isNaN(-NaN) !== true) {\n $ERROR('#1: -NaN === Not-a-Number. Actual: ' + (-NaN));\n}\n\n//CHECK#2\nvar x = NaN; \nif (isNaN(-x) != true) {\n $ERROR('#2: var x = NaN; -x === Not-a-Number. Actual: ' + (-x));\n}\n",
+ "id": "S11.4.7_A4.1"
+ },
+ {
+ "section": "11.4.7",
+ "description": "Checking Infinity",
+ "test": "//CHECK#1\nvar x = 0; \nx = -x;\nif (x !== -0) {\n $ERROR('#1.1: var x = 0; x = -x; x === 0. Actual: ' + (x));\n} else {\n if (1/x !== Number.NEGATIVE_INFINITY) {\n $ERROR('#1.2: var x = 0; x = -x; x === - 0. Actual: +0');\n }\n}\n\n//CHECK#2\nvar x = -0; \nx = -x;\nif (x !== 0) {\n $ERROR('#2.1: var x = -0; x = -x; x === 0. Actual: ' + (x));\n} else {\n if (1/x !== Number.POSITIVE_INFINITY) {\n $ERROR('#2.2: var x = -0; x = -x; x === + 0. Actual: -0');\n }\n}\n\n",
+ "id": "S11.4.7_A4.2"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/11.4.8_Bitwise_NOT_Operator.json b/website/resources/scripts/testcases2/11.4.8_Bitwise_NOT_Operator.json
new file mode 100644
index 000000000..6f7b7c5df
--- /dev/null
+++ b/website/resources/scripts/testcases2/11.4.8_Bitwise_NOT_Operator.json
@@ -0,0 +1,62 @@
+{
+ "testCollection": {
+ "name": "11.4.8_Bitwise_NOT_Operator",
+ "numTests": 9,
+ "tests": [
+ {
+ "section": "11.4.8, 7.2, 7.3",
+ "description": "Checking by using eval",
+ "test": "//CHECK#1\nif (eval(\"~\\u00090\") !== -1) {\n $ERROR('#0: ~\\\\u00090 === -1');\n}\n\n//CHECK#2\nif (eval(\"~\\u000B0\") !== -1) {\n $ERROR('#2: ~\\\\u000B0 === -1'); \n}\n\n//CHECK#3\nif (eval(\"~\\u000C0\") !== -1) {\n $ERROR('#3: ~\\\\u000C0 === -1');\n}\n\n//CHECK#4\nif (eval(\"~\\u00200\") !== -1) {\n $ERROR('#4: ~\\\\u0020 === -1');\n}\n\n//CHECK#5\nif (eval(\"~\\u00A00\") !== -1) {\n $ERROR('#5: ~\\\\u00A00 === -1');\n}\n\n//CHECK#6\nif (eval(\"~\\u000A0\") !== -1) {\n $ERROR('#6: ~\\\\u000A0 === -1'); \n}\n\n//CHECK#7\nif (eval(\"~\\u000D0\") !== -1) {\n $ERROR('#7: ~\\\\u000D0 === -1');\n}\n\n//CHECK#8\nif (eval(\"~\\u20280\") !== -1) {\n $ERROR('#8: ~\\\\u20280 === -1');\n}\n\n//CHECK#9\nif (eval(\"~\\u20290\") !== -1) {\n $ERROR('#9: ~\\\\u20290 === -1');\n}\n\n//CHECK#10\nif (eval(\"~\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u20290\") !== -1) {\n $ERROR('#10: ~\\\\u0009\\\\u000B\\\\u000C\\\\u0020\\\\u00A0\\\\u000A\\\\u000D\\\\u2028\\\\u20290 === -1');\n}\n",
+ "id": "S11.4.8_A1"
+ },
+ {
+ "section": "11.4.8",
+ "description": "Either Type(x) is not Reference or GetBase(x) is not null",
+ "test": "//CHECK#1\nif (~0 !== -1) {\n $ERROR('#1: ~0 === -1. Actual: ' + (~0));\n}\n\n//CHECK#2\nif (~(~0) !== 0) {\n $ERROR('#2: ~(~0) === 0. Actual: ' + (~(~0)));\n}\n\n//CHECK#3\nvar x = 0;\nif (~x !== -1) {\n $ERROR('#3: var x = 0; ~x === -1. Actual: ' + (~x));\n}\n\n//CHECK#4\nvar x = 0;\nif (~(~x) !== 0) {\n $ERROR('#4: var x = 0; ~(~x) === 0. Actual: ' + (~(~x)));\n}\n\n//CHECK#5\nvar object = new Object();\nobject.prop = 0;\nif (~object.prop !== -1) {\n $ERROR('#5: var object = new Object(); object.prop = 0; ~object.prop === -1. Actual: ' + (~object.prop));\n}\n",
+ "id": "S11.4.8_A2.1_T1"
+ },
+ {
+ "section": "11.4.8",
+ "description": "If GetBase(x) is null, throw ReferenceError",
+ "test": "//CHECK#1\ntry {\n ~x;\n $ERROR('#1.1: ~x throw ReferenceError. Actual: ' + (~x)); \n}\ncatch (e) {\n if ((e instanceof ReferenceError) !== true) {\n $ERROR('#1.2: ~x throw ReferenceError. Actual: ' + (e)); \n }\n}\n\n",
+ "id": "S11.4.8_A2.1_T2"
+ },
+ {
+ "section": "11.4.8, 8.6.2.6",
+ "description": "If Type(value) is Object, evaluate ToPrimitive(value, Number)",
+ "test": "//CHECK#1\nvar object = {valueOf: function() {return 1}};\nif (~object !== -2) {\n $ERROR('#1: var object = {valueOf: function() {return 1}}; ~object === -2. Actual: ' + (~object));\n}\n\n//CHECK#2\nvar object = {valueOf: function() {return 1}, toString: function() {return 0}};\nif (~object !== -2) {\n $ERROR('#2: var object = {valueOf: function() {return 1}, toString: function() {return 0}}; ~object === -2. Actual: ' + (~object));\n} \n\n//CHECK#3\nvar object = {valueOf: function() {return 1}, toString: function() {return {}}};\nif (~object !== -2) {\n $ERROR('#3: var object = {valueOf: function() {return 1}, toString: function() {return {}}}; ~object === -2. Actual: ' + (~object));\n}\n\n//CHECK#4\ntry {\n var object = {valueOf: function() {return 1}, toString: function() {throw \"error\"}};\n if (~object !== -2) {\n $ERROR('#4.1: var object = {valueOf: function() {return 1}, toString: function() {throw \"error\"}}; ~object === -2. Actual: ' + (~object));\n }\n}\ncatch (e) {\n if (e === \"error\") {\n $ERROR('#4.2: var object = {valueOf: function() {return 1}, toString: function() {throw \"error\"}}; ~object not throw \"error\"');\n } else {\n $ERROR('#4.3: var object = {valueOf: function() {return 1}, toString: function() {throw \"error\"}}; ~object not throw Error. Actual: ' + (e));\n }\n}\n\n//CHECK#5\nvar object = {toString: function() {return 1}};\nif (~object !== -2) {\n $ERROR('#5: var object = {toString: function() {return 1}}; ~object === -2. Actual: ' + (~object));\n}\n\n//CHECK#6\nvar object = {valueOf: function() {return {}}, toString: function() {return 1}}\nif (~object !== -2) {\n $ERROR('#6: var object = {valueOf: function() {return {}}, toString: function() {return 1}}; ~object === -2. Actual: ' + (~object));\n}\n\n//CHECK#7\ntry {\n var object = {valueOf: function() {throw \"error\"}, toString: function() {return 1}};\n ~object;\n $ERROR('#7.1: var object = {valueOf: function() {throw \"error\"}, toString: function() {return 1}}; ~object throw \"error\". Actual: ' + (~object));\n} \ncatch (e) {\n if (e !== \"error\") {\n $ERROR('#7.2: var object = {valueOf: function() {throw \"error\"}, toString: function() {return 1}}; ~object throw \"error\". Actual: ' + (e));\n } \n}\n\n//CHECK#8\ntry {\n var object = {valueOf: function() {return {}}, toString: function() {return {}}};\n ~object;\n $ERROR('#8.1: var object = {valueOf: function() {return {}}, toString: function() {return {}}}; ~object throw TypeError. Actual: ' + (~object));\n} \ncatch (e) {\n if ((e instanceof TypeError) !== true) {\n $ERROR('#8.2: var object = {valueOf: function() {return {}}, toString: function() {return {}}}; ~object throw TypeError. Actual: ' + (e));\n } \n}\n",
+ "id": "S11.4.8_A2.2_T1"
+ },
+ {
+ "section": "11.4.8",
+ "description": "Type(x) is boolean primitive or Boolean object",
+ "test": "//CHECK#1\nif (~false !== -1) {\n $ERROR('#1: ~false === -1. Actual: ' + (~false));\n}\n\n//CHECK#2\nif (~new Boolean(true) !== -2) {\n $ERROR('#2: ~new Boolean(true) === -2. Actual: ' + (~new Boolean(true)));\n}\n\n//CHECK#3\nif (~new Boolean(false) !== -1) {\n $ERROR('#3: ~new Boolean(false) === -1. Actual: ' + (~new Boolean(false)));\n}\n",
+ "id": "S11.4.8_A3_T1"
+ },
+ {
+ "section": "11.4.8",
+ "description": "Type(x) is number primitive or Number object",
+ "test": "//CHECK#1\nif (~0.1 !== -1) {\n $ERROR('#1: ~0.1 === -1. Actual: ' + (~0.1));\n}\n\n//CHECK#2\nif (~new Number(-0.1) !== -1) {\n $ERROR('#2: ~new Number(-0.1) === -1. Actual: ' + (~new Number(-0.1)));\n}\n\n//CHECK#3\nif (~NaN !== -1) {\n $ERROR('#3: ~NaN === -1. Actual: ' + (~NaN));\n}\n\n//CHECK#4\nif (~new Number(NaN) !== -1) {\n $ERROR('#4: ~new Number(NaN) === -1. Actual: ' + (~new Number(NaN)));\n}\n\n//CHECK#5\nif (~1 !== -2) {\n $ERROR('#5: ~1 === -2. Actual: ' + (~1));\n}\n\n//CHECK#6\nif (~new Number(-2) !== 1) {\n $ERROR('#6: ~new Number(-2) === 1. Actual: ' + (~new Number(-2)));\n}\n\n//CHECK#7\nif (~Infinity !== -1) {\n $ERROR('#7: ~Infinity === -1. Actual: ' + (~Infinity));\n}\n",
+ "id": "S11.4.8_A3_T2"
+ },
+ {
+ "section": "11.4.8",
+ "description": "Type(x) is string primitive or String object",
+ "test": "//CHECK#1\nif (~\"1\" !== -2) {\n $ERROR('#1: ~\"1\" === -2. Actual: ' + (~\"1\"));\n}\n\n//CHECK#2\nif (~new String(\"0\") !== -1) {\n $ERROR('#2: ~new String(\"0\") === -1. Actual: ' + (~new String(\"0\")));\n}\n\n//CHECK#3\nif (~\"x\" !== -1) {\n $ERROR('#3: ~\"x\" === -1. Actual: ' + (~\"x\"));\n}\n\n//CHECK#4\nif (~\"\" !== -1) {\n $ERROR('#4: ~\"\" === -1. Actual: ' + (~\"\"));\n}\n\n//CHECK#5\nif (~new String(\"-2\") !== 1) {\n $ERROR('#5: ~new String(\"-2\") === 1. Actual: ' + (~new String(\"-2\")));\n}\n",
+ "id": "S11.4.8_A3_T3"
+ },
+ {
+ "section": "11.4.8",
+ "description": "Type(x) is undefined or null",
+ "test": "//CHECK#1\nif (~void 0 !== -1) {\n $ERROR('#1: ~void 0 === -1. Actual: ' + (~void 0));\n}\n\n//CHECK#2\nif (~null !== -1) {\n $ERROR('#2: ~null === -1. Actual: ' + (~null));\n}\n",
+ "id": "S11.4.8_A3_T4"
+ },
+ {
+ "section": "11.4.8",
+ "description": "Type(x) is Object object or Function object",
+ "test": "//CHECK#1\nif (~({}) !== -1) {\n $ERROR('#1: ~({}) === -1. Actual: ' + (~({})));\n}\n\n//CHECK#2 \nif (~(function(){return 1}) !== -1) {\n $ERROR('#2: ~(function(){return 1}) === -1. Actual: ' + (~(function(){return 1})));\n}\n",
+ "id": "S11.4.8_A3_T5"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/11.4.9_Logical_NOT_Operator.json b/website/resources/scripts/testcases2/11.4.9_Logical_NOT_Operator.json
new file mode 100644
index 000000000..5815a3ed2
--- /dev/null
+++ b/website/resources/scripts/testcases2/11.4.9_Logical_NOT_Operator.json
@@ -0,0 +1,62 @@
+{
+ "testCollection": {
+ "name": "11.4.9_Logical_NOT_Operator",
+ "numTests": 9,
+ "tests": [
+ {
+ "section": "11.4.9, 7.2, 7.3",
+ "description": "Checking by using eval",
+ "test": "//CHECK#1\nif (eval(\"!\\u0009true\") !== false) {\n $ERROR('#true: !\\\\u0009true === false');\n}\n\n//CHECK#2\nif (eval(\"!\\u000Btrue\") !== false) {\n $ERROR('#2: !\\\\u000Btrue === false'); \n}\n\n//CHECK#3\nif (eval(\"!\\u000Ctrue\") !== false) {\n $ERROR('#3: !\\\\u000Ctrue === false');\n}\n\n//CHECK#4\nif (eval(\"!\\u0020true\") !== false) {\n $ERROR('#4: !\\\\u0020 === false');\n}\n\n//CHECK#5\nif (eval(\"!\\u00A0true\") !== false) {\n $ERROR('#5: !\\\\u00A0true === false');\n}\n\n//CHECK#6\nif (eval(\"!\\u000Atrue\") !== false) {\n $ERROR('#6: !\\\\u000Atrue === false'); \n}\n\n//CHECK#7\nif (eval(\"!\\u000Dtrue\") !== false) {\n $ERROR('#7: !\\\\u000Dtrue === false');\n}\n\n//CHECK#8\nif (eval(\"!\\u2028true\") !== false) {\n $ERROR('#8: !\\\\u2028true === false');\n}\n\n//CHECK#9\nif (eval(\"!\\u2029true\") !== false) {\n $ERROR('#9: !\\\\u2029true === false');\n}\n\n//CHECK#10\nif (eval(\"!\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u2029true\") !== false) {\n $ERROR('#10: !\\\\u0009\\\\u000B\\\\u000C\\\\u0020\\\\u00A0\\\\u000A\\\\u000D\\\\u2028\\\\u2029true === false');\n}\n",
+ "id": "S11.4.9_A1"
+ },
+ {
+ "section": "11.4.9",
+ "description": "Either Type(x) is not Reference or GetBase(x) is not null",
+ "test": "//CHECK#1\nif (!true !== false) {\n $ERROR('#1: !true === false');\n}\n\n//CHECK#2\nif (!(!true) !== true) {\n $ERROR('#2: !(!true) === true');\n}\n\n//CHECK#3\nvar x = true;\nif (!x !== false) {\n $ERROR('#3: var x = true; !x === false');\n}\n\n//CHECK#4\nvar x = true;\nif (!(!x) !== true) {\n $ERROR('#4: var x = true; !(!x) === true');\n}\n\n//CHECK#5\nvar object = new Object();\nobject.prop = true;\nif (!object.prop !== false) {\n $ERROR('#5: var object = new Object(); object.prop = true; !object.prop === false');\n}\n",
+ "id": "S11.4.9_A2.1_T1"
+ },
+ {
+ "section": "11.4.9",
+ "description": "If GetBase(x) is null, throw ReferenceError",
+ "test": "//CHECK#1\ntry {\n !x;\n $ERROR('#1.1: !x throw ReferenceError. Actual: ' + (!x)); \n}\ncatch (e) {\n if ((e instanceof ReferenceError) !== true) {\n $ERROR('#1.2: !x throw ReferenceError. Actual: ' + (e)); \n }\n}\n\n",
+ "id": "S11.4.9_A2.1_T2"
+ },
+ {
+ "section": "11.4.9, 8.6.2.6",
+ "description": "If Type(value) is Object, return false",
+ "test": "//CHECK#1\nvar object = {valueOf: function() {return 1}};\nif (!object !== false) {\n $ERROR('#1: var object = {valueOf: function() {return 1}}; !object === false. Actual: ' + (!object));\n}\n\n//CHECK#2\nvar object = {valueOf: function() {return 1}, toString: function() {return 0}};\nif (!object !== false) {\n $ERROR('#2: var object = {valueOf: function() {return 1}, toString: function() {return 0}}; !object === false. Actual: ' + (!object));\n} \n\n//CHECK#3\nvar object = {valueOf: function() {return 1}, toString: function() {return {}}};\nif (!object !== false) {\n $ERROR('#3: var object = {valueOf: function() {return 1}, toString: function() {return {}}}; !object === false. Actual: ' + (!object));\n}\n\n//CHECK#4\nvar object = {valueOf: function() {return 1}, toString: function() {throw \"error\"}};\nif (!object !== false) {\n $ERROR('#4: var object = {valueOf: function() {return 1}, toString: function() {throw \"error\"}}; !object === false. Actual: ' + (!object));\n}\n\n//CHECK#5\nvar object = {toString: function() {return 1}};\nif (!object !== false) {\n $ERROR('#5: var object = {toString: function() {return 1}}; !object === false. Actual: ' + (!object));\n}\n\n//CHECK#6\nvar object = {valueOf: function() {return {}}, toString: function() {return 1}}\nif (!object !== false) {\n $ERROR('#6: var object = {valueOf: function() {return {}}, toString: function() {return 1}}; !object === false. Actual: ' + (!object));\n}\n\n//CHECK#7\nvar object = {valueOf: function() {throw \"error\"}, toString: function() {return 1}};\nif (!object !== false) {\n $ERROR('#7: var object = {valueOf: function() {throw \"error\"}, toString: function() {return 1}}; !object === false. Actual: ' + (!object));\n} \n\n//CHECK#8\nvar object = {valueOf: function() {return {}}, toString: function() {return {}}};\nif (!object !== false) {\n $ERROR('#8: var object = {valueOf: function() {return {}}, toString: function() {return {}}}; !object === false. Actual: ' + (!object));\n} \n",
+ "id": "S11.4.9_A2.2_T1"
+ },
+ {
+ "section": "11.4.9",
+ "description": "Type(x) is boolean primitive or Boolean object",
+ "test": "//CHECK#1\nif (!false !== true) {\n $ERROR('#1: !false === true');\n}\n\n//CHECK#2\nif (!new Boolean(true) !== false) {\n $ERROR('#2: !new Boolean(true) === false');\n}\n\n//CHECK#3\nif (!new Boolean(false) !== false) {\n $ERROR('#3: !new Boolean(false) === false');\n}\n",
+ "id": "S11.4.9_A3_T1"
+ },
+ {
+ "section": "11.4.9",
+ "description": "Type(x) is number primitive or Number object",
+ "test": "//CHECK#1\nif (!0.1 !== false) {\n $ERROR('#1: !0.1 === false');\n}\n\n//CHECK#2\nif (!new Number(-0.1) !== false) {\n $ERROR('#2: !new Number(-0.1) === false');\n}\n\n//CHECK#3\nif (!NaN !== true) {\n $ERROR('#3: !NaN === true');\n}\n\n//CHECK#4\nif (!new Number(NaN) !== false) {\n $ERROR('#4: !new Number(NaN) === false');\n}\n\n//CHECK#5\nif (!0 !== true) {\n $ERROR('#5: !0 === true');\n}\n\n//CHECK#6\nif (!new Number(0) !== false) {\n $ERROR('#6: !new Number(0) === false');\n}\n\n//CHECK#7\nif (!Infinity !== false) {\n $ERROR('#7: !Infinity === false');\n}\n",
+ "id": "S11.4.9_A3_T2"
+ },
+ {
+ "section": "11.4.9",
+ "description": "Type(x) is string primitive or String object",
+ "test": "//CHECK#1\nif (!\"1\" !== false) {\n $ERROR('#1: !\"1\" === false');\n}\n\n//CHECK#2\nif (!new String(\"0\") !== false) {\n $ERROR('#2: !new String(\"0\") === false');\n}\n\n//CHECK#3\nif (!\"x\" !== false) {\n $ERROR('#3: !\"x\" === false');\n}\n\n//CHECK#4\nif (!\"\" !== true) {\n $ERROR('#4: !\"\" === true');\n}\n\n//CHECK#5\nif (!new String(\"\") !== false) {\n $ERROR('#5: !new String(\"\") === false');\n}\n",
+ "id": "S11.4.9_A3_T3"
+ },
+ {
+ "section": "11.4.9",
+ "description": "Type(x) is undefined or null",
+ "test": "//CHECK#1\nif (!void 0 !== true) {\n $ERROR('#1: !void 0 === true');\n}\n\n//CHECK#2\nif (!null !== true) {\n $ERROR('#2: !null === true');\n}\n",
+ "id": "S11.4.9_A3_T4"
+ },
+ {
+ "section": "11.4.9",
+ "description": "Type(x) is Object object or Function object",
+ "test": "//CHECK#1\nif ((!{}) !== false) {\n $ERROR('#1: !({}) === false');\n}\n\n//CHECK#2 \nif (!(function(){return 1}) !== false) {\n $ERROR('#2: !(function(){return 1}) === false');\n}\n",
+ "id": "S11.4.9_A3_T5"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/11.5.1_Applying_the_asterisk_Operator.json b/website/resources/scripts/testcases2/11.5.1_Applying_the_asterisk_Operator.json
new file mode 100644
index 000000000..acae202cd
--- /dev/null
+++ b/website/resources/scripts/testcases2/11.5.1_Applying_the_asterisk_Operator.json
@@ -0,0 +1,200 @@
+{
+ "testCollection": {
+ "name": "11.5.1_Applying_the_asterisk_Operator",
+ "numTests": 32,
+ "tests": [
+ {
+ "section": "11.5.1, 7.2, 7.3",
+ "description": "Checking by using eval",
+ "test": "//CHECK#1\nif (eval(\"1\\u0009*\\u00091\") !== 1) {\n $ERROR('#1: 1\\\\u0009*\\\\u00091 === 1');\n}\n\n//CHECK#2\nif (eval(\"1\\u000B*\\u000B1\") !== 1) {\n $ERROR('#2: 1\\\\u000B*\\\\u000B1 === 1'); \n}\n\n//CHECK#3\nif (eval(\"1\\u000C*\\u000C1\") !== 1) {\n $ERROR('#3: 1\\\\u000C*\\\\u000C1 === 1');\n}\n\n//CHECK#4\nif (eval(\"1\\u0020*\\u00201\") !== 1) {\n $ERROR('#4: 1\\\\u0020*\\\\u00201 === 1');\n}\n\n//CHECK#5\nif (eval(\"1\\u00A0*\\u00A01\") !== 1) {\n $ERROR('#5: 1\\\\u00A0*\\\\u00A01 === 1');\n}\n\n//CHECK#6\nif (eval(\"1\\u000A*\\u000A1\") !== 1) {\n $ERROR('#6: 1\\\\u000A*\\\\u000A1 === 1'); \n}\n\n//CHECK#7\nif (eval(\"1\\u000D*\\u000D1\") !== 1) {\n $ERROR('#7: 1\\\\u000D*\\\\u000D1 === 1');\n}\n\n//CHECK#8\nif (eval(\"1\\u2028*\\u20281\") !== 1) {\n $ERROR('#8: 1\\\\u2028*\\\\u20281 === 1');\n}\n\n//CHECK#9\nif (eval(\"1\\u2029*\\u20291\") !== 1) {\n $ERROR('#9: 1\\\\u2029*\\\\u20291 === 1');\n}\n\n//CHECK#10\nif (eval(\"1\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u2029*\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u20291\") !== 1) {\n $ERROR('#10: 1\\\\u0009\\\\u000B\\\\u000C\\\\u0020\\\\u00A0\\\\u000A\\\\u000D\\\\u2028\\\\u2029*\\\\u0009\\\\u000B\\\\u000C\\\\u0020\\\\u00A0\\\\u000A\\\\u000D\\\\u2028\\\\u20291 === 1');\n}\n",
+ "id": "S11.5.1_A1"
+ },
+ {
+ "section": "11.5.1",
+ "description": "Either Type is not Reference or GetBase is not null",
+ "test": "//CHECK#1\nif (1 * 1 !== 1) {\n $ERROR('#1: 1 * 1 === 1. Actual: ' + (1 * 1));\n}\n\n//CHECK#2\nvar x = 1;\nif (x * 1 !== 1) {\n $ERROR('#2: var x = 1; x * 1 === 1. Actual: ' + (x * 1));\n}\n\n//CHECK#3\nvar y = 1;\nif (1 * y !== 1) {\n $ERROR('#3: var y = 1; 1 * y === 1. Actual: ' + (1 * y));\n}\n\n//CHECK#4\nvar x = 1;\nvar y = 1;\nif (x * y !== 1) {\n $ERROR('#4: var x = 1; var y = 1; x * y === 1. Actual: ' + (x * y));\n}\n\n//CHECK#5\nvar objectx = new Object();\nvar objecty = new Object();\nobjectx.prop = 1;\nobjecty.prop = 1;\nif (objectx.prop * objecty.prop !== 1) {\n $ERROR('#5: var objectx = new Object(); var objecty = new Object(); objectx.prop = 1; objecty.prop = 1; objectx.prop * objecty.prop === 1. Actual: ' + (objectx.prop * objecty.prop));\n}\n",
+ "id": "S11.5.1_A2.1_T1"
+ },
+ {
+ "section": "11.5.1",
+ "description": "If GetBase(x) is null, throw ReferenceError",
+ "test": "//CHECK#1\ntry {\n x * 1;\n $ERROR('#1.1: x * 1 throw ReferenceError. Actual: ' + (x * 1)); \n}\ncatch (e) {\n if ((e instanceof ReferenceError) !== true) {\n $ERROR('#1.2: x * 1 throw ReferenceError. Actual: ' + (e)); \n }\n}\n\n",
+ "id": "S11.5.1_A2.1_T2"
+ },
+ {
+ "section": "11.5.1",
+ "description": "If GetBase(y) is null, throw ReferenceError",
+ "test": "//CHECK#1\ntry {\n 1 * y;\n $ERROR('#1.1: 1 * y throw ReferenceError. Actual: ' + (1 * y)); \n}\ncatch (e) {\n if ((e instanceof ReferenceError) !== true) {\n $ERROR('#1.2: 1 * y throw ReferenceError. Actual: ' + (e)); \n }\n}\n\n",
+ "id": "S11.5.1_A2.1_T3"
+ },
+ {
+ "section": "11.5.1, 8.6.2.6",
+ "description": "If Type(value) is Object, evaluate ToPrimitive(value, Number)",
+ "test": "//CHECK#1\nif ({valueOf: function() {return 1}} * 1 !== 1) {\n $ERROR('#1: {valueOf: function() {return 1}} * 1 === 1. Actual: ' + ({valueOf: function() {return 1}} * 1));\n}\n\n//CHECK#2\nif ({valueOf: function() {return 1}, toString: function() {return 0}} * 1 !== 1) {\n $ERROR('#2: {valueOf: function() {return 1}, toString: function() {return 0}} * 1 === 1. Actual: ' + ({valueOf: function() {return 1}, toString: function() {return 0}} * 1));\n}\n\n//CHECK#3\nif ({valueOf: function() {return 1}, toString: function() {return {}}} * 1 !== 1) {\n $ERROR('#3: {valueOf: function() {return 1}, toString: function() {return {}}} * 1 === 1. Actual: ' + ({valueOf: function() {return 1}, toString: function() {return {}}} * 1));\n}\n\n//CHECK#4\ntry {\n if ({valueOf: function() {return 1}, toString: function() {throw \"error\"}} * 1 !== 1) {\n $ERROR('#4.1: {valueOf: function() {return 1}, toString: function() {throw \"error\"}} * 1 === 1. Actual: ' + ({valueOf: function() {return 1}, toString: function() {throw \"error\"}} * 1));\n }\n}\ncatch (e) {\n if (e === \"error\") {\n $ERROR('#4.2: {valueOf: function() {return 1}, toString: function() {throw \"error\"}} * 1 not throw \"error\"');\n } else {\n $ERROR('#4.3: {valueOf: function() {return 1}, toString: function() {throw \"error\"}} * 1 not throw Error. Actual: ' + (e));\n }\n}\n\n//CHECK#5\nif (1 * {toString: function() {return 1}} !== 1) {\n $ERROR('#5: 1 * {toString: function() {return 1}} === 1. Actual: ' + (1 * {toString: function() {return 1}}));\n}\n\n//CHECK#6\nif (1 * {valueOf: function() {return {}}, toString: function() {return 1}} !== 1) {\n $ERROR('#6: 1 * {valueOf: function() {return {}}, toString: function() {return 1}} === 1. Actual: ' + (1 * {valueOf: function() {return {}}, toString: function() {return 1}}));\n}\n\n//CHECK#7\ntry {\n 1 * {valueOf: function() {throw \"error\"}, toString: function() {return 1}};\n $ERROR('#7.1: 1 * {valueOf: function() {throw \"error\"}, toString: function() {return 1}} throw \"error\". Actual: ' + (1 * {valueOf: function() {throw \"error\"}, toString: function() {return 1}}));\n} \ncatch (e) {\n if (e !== \"error\") {\n $ERROR('#7.2: 1 * {valueOf: function() {throw \"error\"}, toString: function() {return 1}} throw \"error\". Actual: ' + (e));\n } \n}\n\n//CHECK#8\ntry {\n 1 * {valueOf: function() {return {}}, toString: function() {return {}}};\n $ERROR('#8.1: 1 * {valueOf: function() {return {}}, toString: function() {return {}}} throw TypeError. Actual: ' + (1 * {valueOf: function() {return {}}, toString: function() {return {}}}));\n} \ncatch (e) {\n if ((e instanceof TypeError) !== true) {\n $ERROR('#8.2: 1 * {valueOf: function() {return {}}, toString: function() {return {}}} throw TypeError. Actual: ' + (e));\n } \n}\n",
+ "id": "S11.5.1_A2.2_T1"
+ },
+ {
+ "section": "11.5.1",
+ "description": "Checking with \"throw\"",
+ "test": "//CHECK#1\nvar x = { valueOf: function () { throw \"x\"; } };\nvar y = { valueOf: function () { throw \"y\"; } };\ntry {\n x * y;\n $ERROR('#1.1: var x = { valueOf: function () { throw \"x\"; } }; var y = { valueOf: function () { throw \"y\"; } }; x * y throw \"x\". Actual: ' + (x * y));\n} catch (e) {\n if (e === \"y\") {\n $ERROR('#1.2: ToNumber(first expression) is called first, and then ToNumber(second expression)');\n } else {\n if (e !== \"x\") {\n $ERROR('#1.3: var x = { valueOf: function () { throw \"x\"; } }; var y = { valueOf: function () { throw \"y\"; } }; x * y throw \"x\". Actual: ' + (e));\n }\n }\n}\n",
+ "id": "S11.5.1_A2.3_T1"
+ },
+ {
+ "section": "11.5.1",
+ "description": "Checking with \"=\"",
+ "test": "//CHECK#1\nvar x = 0; \nif ((x = 1) * x !== 1) {\n $ERROR('#1: var x = 0; (x = 1) * x === 1. Actual: ' + ((x = 1) * x));\n}\n\n//CHECK#2\nvar x = 0; \nif (x * (x = 1) !== 0) {\n $ERROR('#2: var x = 0; x * (x = 1) === 0. Actual: ' + (x * (x = 1)));\n}\n\n",
+ "id": "S11.5.1_A2.4_T1"
+ },
+ {
+ "section": "11.5.1",
+ "description": "Checking with \"throw\"",
+ "test": "//CHECK#1\nvar x = function () { throw \"x\"; };\nvar y = function () { throw \"y\"; };\ntry {\n x() * y();\n $ERROR('#1.1: var x = function () { throw \"x\"; }; var y = function () { throw \"y\"; }; x() * y() throw \"x\". Actual: ' + (x() * y()));\n} catch (e) {\n if (e === \"y\") {\n $ERROR('#1.2: First expression is evaluated first, and then second expression');\n } else {\n if (e !== \"x\") {\n $ERROR('#1.3: var x = function () { throw \"x\"; }; var y = function () { throw \"y\"; }; x() * y() throw \"x\". Actual: ' + (e));\n }\n }\n}\n",
+ "id": "S11.5.1_A2.4_T2"
+ },
+ {
+ "section": "11.5.1",
+ "description": "Checking with undeclarated variables",
+ "test": "//CHECK#1\ntry {\n x * (x = 1);\n $ERROR('#1.1: x * (x = 1) throw ReferenceError. Actual: ' + (x * (x = 1))); \n}\ncatch (e) {\n if ((e instanceof ReferenceError) !== true) {\n $ERROR('#1.2: x * (x = 1) throw ReferenceError. Actual: ' + (e)); \n }\n}\n\n//CHECK#2\nif ((y = 1) * y !== 1) {\n $ERROR('#2: (y = 1) * y === 1. Actual: ' + ((y = 1) * y));\n}\n\n",
+ "id": "S11.5.1_A2.4_T3"
+ },
+ {
+ "section": "11.5.1",
+ "description": "Type(x) and Type(y) vary between primitive boolean and Boolean object",
+ "test": "//CHECK#1\nif (true * true !== 1) {\n $ERROR('#1: true * true === 1. Actual: ' + (true * true));\n}\n\n//CHECK#2\nif (new Boolean(true) * true !== 1) {\n $ERROR('#2: new Boolean(true) * true === 1. Actual: ' + (new Boolean(true) * true));\n}\n\n//CHECK#3\nif (true * new Boolean(true) !== 1) {\n $ERROR('#3: true * new Boolean(true) === 1. Actual: ' + (true * new Boolean(true)));\n}\n\n//CHECK#4\nif (new Boolean(true) * new Boolean(true) !== 1) {\n $ERROR('#4: new Boolean(true) * new Boolean(true) === 1. Actual: ' + (new Boolean(true) * new Boolean(true)));\n}\n",
+ "id": "S11.5.1_A3_T1.1"
+ },
+ {
+ "section": "11.5.1",
+ "description": "Type(x) and Type(y) vary between primitive number and Number object",
+ "test": "//CHECK#1\nif (1 * 1 !== 1) {\n $ERROR('#1: 1 * 1 === 1. Actual: ' + (1 * 1));\n}\n\n//CHECK#2\nif (new Number(1) * 1 !== 1) {\n $ERROR('#2: new Number(1) * 1 === 1. Actual: ' + (new Number(1) * 1));\n}\n\n//CHECK#3\nif (1 * new Number(1) !== 1) {\n $ERROR('#3: 1 * new Number(1) === 1. Actual: ' + (1 * new Number(1)));\n}\n\n//CHECK#4\nif (new Number(1) * new Number(1) !== 1) {\n $ERROR('#4: new Number(1) * new Number(1) === 1. Actual: ' + (new Number(1) * new Number(1)));\n}\n\n",
+ "id": "S11.5.1_A3_T1.2"
+ },
+ {
+ "section": "11.5.1",
+ "description": "Type(x) and Type(y) vary between primitive string and String object",
+ "test": "//CHECK#1\nif (\"1\" * \"1\" !== 1) {\n $ERROR('#1: \"1\" * \"1\" === 1. Actual: ' + (\"1\" * \"1\"));\n}\n\n//CHECK#2\nif (new String(\"1\") * \"1\" !== 1) {\n $ERROR('#2: new String(\"1\") * \"1\" === 1. Actual: ' + (new String(\"1\") * \"1\"));\n}\n\n//CHECK#3\nif (\"1\" * new String(\"1\") !== 1) {\n $ERROR('#3: \"1\" * new String(\"1\") === 1. Actual: ' + (\"1\" * new String(\"1\")));\n}\n\n//CHECK#4\nif (new String(\"1\") * new String(\"1\") !== 1) {\n $ERROR('#4: new String(\"1\") * new String(\"1\") === 1. Actual: ' + (new String(\"1\") * new String(\"1\")));\n}\n\n//CHECK#5\nif (isNaN(\"x\" * \"1\") !== true) {\n $ERROR('#5: \"x\" * \"1\" === Not-a-Number. Actual: ' + (\"x\" * \"1\"));\n}\n\n//CHECK#6\nif (isNaN(\"1\" * \"x\") !== true) {\n $ERROR('#6: \"1\" * \"x\" === Not-a-Number. Actual: ' + (\"1\" * \"x\"));\n}\n",
+ "id": "S11.5.1_A3_T1.3"
+ },
+ {
+ "section": "11.5.1",
+ "description": "Type(x) and Type(y) vary between Null and Undefined",
+ "test": "//CHECK#1\nif (isNaN(null * undefined) !== true) {\n $ERROR('#1: null * undefined === Not-a-Number. Actual: ' + (null * undefined));\n}\n\n//CHECK#2\nif (isNaN(undefined * null) !== true) {\n $ERROR('#2: undefined * null === Not-a-Number. Actual: ' + (undefined * null));\n}\n\n//CHECK#3\nif (isNaN(undefined * undefined) !== true) {\n $ERROR('#3: undefined * undefined === Not-a-Number. Actual: ' + (undefined * undefined));\n}\n\n//CHECK#4\nif (null * null !== 0) {\n $ERROR('#4: null * null === 0. Actual: ' + (null * null));\n}\n",
+ "id": "S11.5.1_A3_T1.4"
+ },
+ {
+ "section": "11.5.1",
+ "description": "Type(x) and Type(y) vary between Object object and Function object",
+ "test": "//CHECK#1\nif (isNaN({} * function(){return 1}) !== true) {\n $ERROR('#1: {} * function(){return 1} === Not-a-Number. Actual: ' + ({} * function(){return 1}));\n}\n\n//CHECK#2\nif (isNaN(function(){return 1} * {}) !== true) {\n $ERROR('#2: function(){return 1} * {} === Not-a-Number. Actual: ' + (function(){return 1} * {}));\n}\n\n//CHECK#3\nif (isNaN(function(){return 1} * function(){return 1}) !== true) {\n $ERROR('#3: function(){return 1} * function(){return 1} === Not-a-Number. Actual: ' + (function(){return 1} * function(){return 1}));\n}\n\n//CHECK#4\nif (isNaN({} * {}) !== true) {\n $ERROR('#4: {} * {} === Not-a-Number. Actual: ' + ({} * {}));\n}\n",
+ "id": "S11.5.1_A3_T1.5"
+ },
+ {
+ "section": "11.5.1",
+ "description": "Type(x) is different from Type(y) and both types vary between Boolean (primitive or object) and Number (primitive and object)",
+ "test": "//CHECK#1\nif (true * 1 !== 1) {\n $ERROR('#1: true * 1 === 1. Actual: ' + (true * 1));\n}\n\n//CHECK#2\nif (1 * true !== 1) {\n $ERROR('#2: 1 * true === 1. Actual: ' + (1 * true));\n}\n\n//CHECK#3\nif (new Boolean(true) * 1 !== 1) {\n $ERROR('#3: new Boolean(true) * 1 === 1. Actual: ' + (new Boolean(true) * 1));\n}\n\n//CHECK#4\nif (1 * new Boolean(true) !== 1) {\n $ERROR('#4: 1 * new Boolean(true) === 1. Actual: ' + (1 * new Boolean(true)));\n}\n\n//CHECK#5\nif (true * new Number(1) !== 1) {\n $ERROR('#5: true * new Number(1) === 1. Actual: ' + (true * new Number(1)));\n}\n\n//CHECK#6\nif (new Number(1) * true !== 1) {\n $ERROR('#6: new Number(1) * true === 1. Actual: ' + (new Number(1) * true));\n}\n\n//CHECK#7\nif (new Boolean(true) * new Number(1) !== 1) {\n $ERROR('#7: new Boolean(true) * new Number(1) === 1. Actual: ' + (new Boolean(true) * new Number(1)));\n}\n\n//CHECK#8\nif (new Number(1) * new Boolean(true) !== 1) {\n $ERROR('#8: new Number(1) * new Boolean(true) === 1. Actual: ' + (new Number(1) * new Boolean(true)));\n}\n",
+ "id": "S11.5.1_A3_T2.1"
+ },
+ {
+ "section": "11.5.1",
+ "description": "Type(x) is different from Type(y) and both types vary between Number (primitive or object) and String (primitive and object)",
+ "test": "//CHECK#1\nif (\"1\" * 1 !== 1) {\n $ERROR('#1: \"1\" * 1 === 1. Actual: ' + (\"1\" * 1));\n}\n\n//CHECK#2\nif (1 * \"1\" !== 1) {\n $ERROR('#2: 1 * \"1\" === 1. Actual: ' + (1 * \"1\"));\n}\n\n//CHECK#3\nif (new String(\"1\") * 1 !== 1) {\n $ERROR('#3: new String(\"1\") * 1 === 1. Actual: ' + (new String(\"1\") * 1));\n}\n\n//CHECK#4\nif (1 * new String(\"1\") !== 1) {\n $ERROR('#4: 1 * new String(\"1\") === 1. Actual: ' + (1 * new String(\"1\")));\n}\n\n//CHECK#5\nif (\"1\" * new Number(1) !== 1) {\n $ERROR('#5: \"1\" * new Number(1) === 1. Actual: ' + (\"1\" * new Number(1)));\n}\n\n//CHECK#6\nif (new Number(1) * \"1\" !== 1) {\n $ERROR('#6: new Number(1) * \"1\" === 1. Actual: ' + (new Number(1) * \"1\"));\n}\n\n//CHECK#7\nif (new String(\"1\") * new Number(1) !== 1) {\n $ERROR('#7: new String(\"1\") * new Number(1) === 1. Actual: ' + (new String(\"1\") * new Number(1)));\n}\n\n//CHECK#8\nif (new Number(1) * new String(\"1\") !== 1) {\n $ERROR('#8: new Number(1) * new String(\"1\") === 1. Actual: ' + (new Number(1) * new String(\"1\")));\n}\n\n//CHECK#9\nif (isNaN(\"x\" * 1) !== true) {\n $ERROR('#9: \"x\" * 1 === Not-a-Number. Actual: ' + (\"x\" * 1));\n}\n\n//CHECK#10\nif (isNaN(1 * \"x\") !== true) {\n $ERROR('#10: 1 * \"x\" === Not-a-Number. Actual: ' + (1 * \"x\"));\n}\n",
+ "id": "S11.5.1_A3_T2.2"
+ },
+ {
+ "section": "11.5.1",
+ "description": "Type(x) is different from Type(y) and both types vary between Number (primitive or object) and Null",
+ "test": "//CHECK#1\nif (1 * null !== 0) {\n $ERROR('#1: 1 * null === 0. Actual: ' + (1 * null));\n}\n\n//CHECK#2\nif (null * 1 !== 0) {\n $ERROR('#2: null * 1 === 0. Actual: ' + (null * 1));\n}\n\n//CHECK#3\nif (new Number(1) * null !== 0) {\n $ERROR('#3: new Number(1) * null === 0. Actual: ' + (new Number(1) * null));\n}\n\n//CHECK#4\nif (null * new Number(1) !== 0) {\n $ERROR('#4: null * new Number(1) === 0. Actual: ' + (null * new Number(1)));\n}\n",
+ "id": "S11.5.1_A3_T2.3"
+ },
+ {
+ "section": "11.5.1",
+ "description": "Type(x) is different from Type(y) and both types vary between Number (primitive or object) and Undefined",
+ "test": "//CHECK#1\nif (isNaN(1 * undefined) !== true) {\n $ERROR('#1: 1 * undefined === Not-a-Number. Actual: ' + (1 * undefined));\n}\n\n//CHECK#2\nif (isNaN(undefined * 1) !== true) {\n $ERROR('#2: undefined * 1 === Not-a-Number. Actual: ' + (undefined * 1));\n}\n\n//CHECK#3\nif (isNaN(new Number(1) * undefined) !== true) {\n $ERROR('#3: new Number(1) * undefined === Not-a-Number. Actual: ' + (new Number(1) * undefined));\n}\n\n//CHECK#4\nif (isNaN(undefined * new Number(1)) !== true) {\n $ERROR('#4: undefined * new Number(1) === Not-a-Number. Actual: ' + (undefined * new Number(1)));\n}\n",
+ "id": "S11.5.1_A3_T2.4"
+ },
+ {
+ "section": "11.5.1",
+ "description": "Type(x) is different from Type(y) and both types vary between String (primitive or object) and Boolean (primitive and object)",
+ "test": "//CHECK#1\nif (true * \"1\" !== 1) {\n $ERROR('#1: true * \"1\" === 1. Actual: ' + (true * \"1\"));\n}\n\n//CHECK#2\nif (\"1\" * true !== 1) {\n $ERROR('#2: \"1\" * true === 1. Actual: ' + (\"1\" * true));\n}\n\n//CHECK#3\nif (new Boolean(true) * \"1\" !== 1) {\n $ERROR('#3: new Boolean(true) * \"1\" === 1. Actual: ' + (new Boolean(true) * \"1\"));\n}\n\n//CHECK#4\nif (\"1\" * new Boolean(true) !== 1) {\n $ERROR('#4: \"1\" * new Boolean(true) === 1. Actual: ' + (\"1\" * new Boolean(true)));\n}\n\n//CHECK#5\nif (true * new String(\"1\") !== 1) {\n $ERROR('#5: true * new String(\"1\") === 1. Actual: ' + (true * new String(\"1\")));\n}\n\n//CHECK#6\nif (new String(\"1\") * true !== 1) {\n $ERROR('#6: new String(\"1\") * true === 1. Actual: ' + (new String(\"1\") * true));\n}\n\n//CHECK#7\nif (new Boolean(true) * new String(\"1\") !== 1) {\n $ERROR('#7: new Boolean(true) * new String(\"1\") === 1. Actual: ' + (new Boolean(true) * new String(\"1\")));\n}\n\n//CHECK#8\nif (new String(\"1\") * new Boolean(true) !== 1) {\n $ERROR('#8: new String(\"1\") * new Boolean(true) === 1. Actual: ' + (new String(\"1\") * new Boolean(true)));\n}\n",
+ "id": "S11.5.1_A3_T2.5"
+ },
+ {
+ "section": "11.5.1",
+ "description": "Type(x) is different from Type(y) and both types vary between primitive String (primitive or object) and Undefined",
+ "test": "//CHECK#1\nif (isNaN(\"1\" * undefined) !== true) {\n $ERROR('#1: \"1\" * undefined === Not-a-Number. Actual: ' + (\"1\" * undefined));\n}\n\n//CHECK#2\nif (isNaN(undefined * \"1\") !== true) {\n $ERROR('#2: undefined * \"1\" === Not-a-Number. Actual: ' + (undefined * \"1\"));\n}\n\n//CHECK#3\nif (isNaN(new String(\"1\") * undefined) !== true) {\n $ERROR('#3: new String(\"1\") * undefined === Not-a-Number. Actual: ' + (new String(\"1\") * undefined));\n}\n\n//CHECK#4\nif (isNaN(undefined * new String(\"1\")) !== true) {\n $ERROR('#4: undefined * new String(\"1\") === Not-a-Number. Actual: ' + (undefined * new String(\"1\")));\n}\n",
+ "id": "S11.5.1_A3_T2.6"
+ },
+ {
+ "section": "11.5.1",
+ "description": "Type(x) is different from Type(y) and both types vary between String (primitive or object) and Null",
+ "test": "//CHECK#1\nif (\"1\" * null !== 0) {\n $ERROR('#1: \"1\" * null === 0. Actual: ' + (\"1\" * null));\n}\n\n//CHECK#2\nif (null * \"1\" !== 0) {\n $ERROR('#2: null * \"1\" === 0. Actual: ' + (null * \"1\"));\n}\n\n//CHECK#3\nif (new String(\"1\") * null !== 0) {\n $ERROR('#3: new String(\"1\") * null === 0. Actual: ' + (new String(\"1\") * null));\n}\n\n//CHECK#4\nif (null * new String(\"1\") !== 0) {\n $ERROR('#4: null * new String(\"1\") === 0. Actual: ' + (null * new String(\"1\")));\n}\n",
+ "id": "S11.5.1_A3_T2.7"
+ },
+ {
+ "section": "11.5.1",
+ "description": "Type(x) is different from Type(y) and both types vary between Boolean (primitive or object) and Undefined",
+ "test": "//CHECK#1\nif (isNaN(true * undefined) !== true) {\n $ERROR('#1: true * undefined === Not-a-Number. Actual: ' + (true * undefined));\n}\n\n//CHECK#2\nif (isNaN(undefined * true) !== true) {\n $ERROR('#2: undefined * true === Not-a-Number. Actual: ' + (undefined * true));\n}\n\n//CHECK#3\nif (isNaN(new Boolean(true) * undefined) !== true) {\n $ERROR('#3: new Boolean(true) * undefined === Not-a-Number. Actual: ' + (new Boolean(true) * undefined));\n}\n\n//CHECK#4\nif (isNaN(undefined * new Boolean(true)) !== true) {\n $ERROR('#4: undefined * new Boolean(true) === Not-a-Number. Actual: ' + (undefined * new Boolean(true)));\n}\n",
+ "id": "S11.5.1_A3_T2.8"
+ },
+ {
+ "section": "11.5.1",
+ "description": "Type(x) is different from Type(y) and both types vary between Boolean (primitive or object) and Null",
+ "test": "//CHECK#1\nif (true * null !== 0) {\n $ERROR('#1: true * null === 0. Actual: ' + (true * null));\n}\n\n//CHECK#2\nif (null * true !== 0) {\n $ERROR('#2: null * true === 0. Actual: ' + (null * true));\n}\n\n//CHECK#3\nif (new Boolean(true) * null !== 0) {\n $ERROR('#3: new Boolean(true) * null === 0. Actual: ' + (new Boolean(true) * null));\n}\n\n//CHECK#4\nif (null * new Boolean(true) !== 0) {\n $ERROR('#4: null * new Boolean(true) === 0. Actual: ' + (null * new Boolean(true)));\n}\n",
+ "id": "S11.5.1_A3_T2.9"
+ },
+ {
+ "section": "11.5.1",
+ "description": "If left operand is NaN, the result is NaN",
+ "test": "//CHECK#1\nif (isNaN(Number.NaN * Number.NaN) !== true) {\n $ERROR('#1: NaN * NaN === Not-a-Number. Actual: ' + (NaN * NaN));\n} \n\n//CHECK#2\nif (isNaN(Number.NaN * +0) !== true) {\n $ERROR('#2: NaN * +0 === Not-a-Number. Actual: ' + (NaN * +0)); \n} \n\n//CHECK#3\nif (isNaN(Number.NaN * -0) !== true) {\n $ERROR('#3: NaN * -0 === Not-a-Number. Actual: ' + (NaN * -0)); \n} \n\n//CHECK#4\nif (isNaN(Number.NaN * Number.POSITIVE_INFINITY) !== true) {\n $ERROR('#4: NaN * Infinity === Not-a-Number. Actual: ' + (NaN * Infinity));\n} \n\n//CHECK#5\nif (isNaN(Number.NaN * Number.NEGATIVE_INFINITY) !== true) {\n $ERROR('#5: NaN * -Infinity === Not-a-Number. Actual: ' + (NaN * -Infinity)); \n} \n\n//CHECK#6\nif (isNaN(Number.NaN * Number.MAX_VALUE) !== true) {\n $ERROR('#6: NaN * Number.MAX_VALUE === Not-a-Number. Actual: ' + (NaN * Number.MAX_VALUE));\n} \n\n//CHECK#7\nif (isNaN(Number.NaN * Number.MIN_VALUE) !== true) {\n $ERROR('#7: NaN * Number.MIN_VALUE === Not-a-Number. Actual: ' + (NaN * Number.MIN_VALUE)); \n}\n\n//CHECK#8\nif (isNaN(Number.NaN * 1) !== true) {\n $ERROR('#8: NaN * 1 === Not-a-Number. Actual: ' + (NaN * 1)); \n} \n",
+ "id": "S11.5.1_A4_T1.1"
+ },
+ {
+ "section": "11.5.1",
+ "description": "If right operand is NaN, the result is NaN",
+ "test": "//CHECK#1\nif (isNaN(Number.NaN * Number.NaN) !== true) {\n $ERROR('#1: NaN * NaN === Not-a-Number. Actual: ' + (NaN * NaN));\n} \n\n//CHECK#2\nif (isNaN(+0 * Number.NaN) !== true) {\n $ERROR('#2: +0 * NaN === Not-a-Number. Actual: ' + (+0 * NaN)); \n} \n\n//CHECK#3\nif (isNaN(-0 * Number.NaN) !== true) {\n $ERROR('#3: -0 * NaN === Not-a-Number. Actual: ' + (-0 * NaN)); \n} \n\n//CHECK#4\nif (isNaN(Number.POSITIVE_INFINITY * Number.NaN) !== true) {\n $ERROR('#4: Infinity * NaN === Not-a-Number. Actual: ' + (Infinity * NaN));\n} \n\n//CHECK#5\nif (isNaN(Number.NEGATIVE_INFINITY * Number.NaN) !== true) {\n $ERROR('#5: -Infinity * NaN === Not-a-Number. Actual: ' + ( -Infinity * NaN)); \n} \n\n//CHECK#6\nif (isNaN(Number.MAX_VALUE * Number.NaN) !== true) {\n $ERROR('#6: Number.MAX_VALUE * NaN === Not-a-Number. Actual: ' + (Number.MAX_VALUE * NaN));\n} \n\n//CHECK#7\nif (isNaN(Number.MIN_VALUE * Number.NaN) !== true) {\n $ERROR('#7: Number.MIN_VALUE * NaN === Not-a-Number. Actual: ' + (Number.MIN_VALUE * NaN)); \n}\n\n//CHECK#8\nif (isNaN(1 * Number.NaN) !== true) {\n $ERROR('#8: 1 * NaN === Not-a-Number. Actual: ' + (1 * NaN)); \n}\n",
+ "id": "S11.5.1_A4_T1.2"
+ },
+ {
+ "section": "11.5.1",
+ "description": "The sign of the result is positive if both operands have the same sign, negative if the operands have different signs",
+ "test": "//CHECK#1\nif (1 * 1 !== 1) {\n $ERROR('#1: 1 * 1 === 1. Actual: ' + (1 * 1));\n}\n\n//CHECK#2\nif (1 * -1 !== -1) {\n $ERROR('#2: 1 * -1 === -1. Actual: ' + (1 * -1));\n}\n\n//CHECK#3\nif (-1 * 1 !== -1) {\n $ERROR('#3: -1 * 1 === -1. Actual: ' + (-1 * 1));\n}\n\n//CHECK#4\nif (-1 * -1 !== 1) {\n $ERROR('#4: -1 * -1 === 1. Actual: ' + (-1 * -1));\n}\n\n//CHECK#5\nif (0 * 0 !== 0) {\n $ERROR('#5.1: 0 * 0 === 0. Actual: ' + (0 * 0));\n} else {\n if (1 / (0 * 0) !== Number.POSITIVE_INFINITY) {\n $ERROR('#5.2: 0 * 0 === + 0. Actual: -0');\n }\n}\n\n//CHECK#6\nif (0 * -0 !== -0) {\n $ERROR('#6.1: 0 * -0 === 0. Actual: ' + (0 * -0));\n} else {\n if (1 / (0 * -0) !== Number.NEGATIVE_INFINITY) {\n $ERROR('#6.2: 0 * -0 === - 0. Actual: +0');\n }\n}\n\n//CHECK#7\nif (-0 * 0 !== -0) {\n $ERROR('#7.1: -0 * 0 === 0. Actual: ' + (-0 * 0));\n} else {\n if (1 / (-0 * 0) !== Number.NEGATIVE_INFINITY) {\n $ERROR('#7.2: -0 * 0 === - 0. Actual: +0');\n }\n}\n\n//CHECK#8\nif (-0 * -0 !== 0) {\n $ERROR('#8.1: -0 * -0 === 0. Actual: ' + (-0 * -0));\n} else {\n if (1 / (-0 * -0) !== Number.POSITIVE_INFINITY) {\n $ERROR('#8.2: 0 * -0 === - 0. Actual: +0');\n }\n}\n",
+ "id": "S11.5.1_A4_T2"
+ },
+ {
+ "section": "11.5.1",
+ "description": "Multiplication of an infinity by a zero results in NaN",
+ "test": "//CHECK#1\nif (isNaN(Number.NEGATIVE_INFINITY * 0) !== true) {\n $ERROR('#1: Infinity * 0 === Not-a-Number. Actual: ' + (Infinity * 0));\n}\n\n//CHECK#2\nif (isNaN(-0 * Number.NEGATIVE_INFINITY) !== true) {\n $ERROR('#2: -0 * -Infinity === Not-a-Number. Actual: ' + (-0 * -Infinity));\n}\n\n//CHECK#3\nif (isNaN(Number.POSITIVE_INFINITY * -0) !== true) {\n $ERROR('#3: Infinity * -0 === Not-a-Number. Actual: ' + (Infinity * -0));\n}\n\n//CHECK#4\nif (isNaN(0 * Number.POSITIVE_INFINITY) !== true) {\n $ERROR('#4: 0 * Infinity === Not-a-Number. Actual: ' + (0 * Infinity));\n}\n\n//CHECK#5\nif (isNaN(Number.NEGATIVE_INFINITY * -0) !== true) {\n $ERROR('#5: Infinity * -0 === Not-a-Number. Actual: ' + (Infinity * -0));\n}\n\n//CHECK#6\nif (isNaN(0 * Number.NEGATIVE_INFINITY) !== true) {\n $ERROR('#6: 0 * -Infinity === Not-a-Number. Actual: ' + (0 * -Infinity));\n}\n\n//CHECK#7\nif (isNaN(Number.POSITIVE_INFINITY * 0) !== true) {\n $ERROR('#7: Infinity * 0 === Not-a-Number. Actual: ' + (Infinity * 0));\n}\n\n//CHECK#8\nif (isNaN(-0 * Number.POSITIVE_INFINITY) !== true) {\n $ERROR('#8: -0 * Infinity === Not-a-Number. Actual: ' + (-0 * Infinity));\n}\n",
+ "id": "S11.5.1_A4_T3"
+ },
+ {
+ "section": "11.5.1",
+ "description": "Multiplication of an infinity by an infinity results in an infinity of appropriate sign",
+ "test": "//CHECK#1\nif (Number.NEGATIVE_INFINITY * Number.NEGATIVE_INFINITY !== Number.POSITIVE_INFINITY) {\n $ERROR('#1: -Infinity * -Infinity === Infinity. Actual: ' + (-Infinity * -Infinity));\n}\n\n//CHECK#2\nif (Number.POSITIVE_INFINITY * Number.POSITIVE_INFINITY !== Number.POSITIVE_INFINITY) {\n $ERROR('#2: Infinity * Infinity === Infinity. Actual: ' + (Infinity * Infinity));\n}\n\n//CHECK#3\nif (Number.NEGATIVE_INFINITY * Number.POSITIVE_INFINITY !== Number.NEGATIVE_INFINITY) {\n $ERROR('#3: -Infinity * Infinity === -Infinity. Actual: ' + (-Infinity * Infinity));\n}\n\n//CHECK#4\nif (Number.POSITIVE_INFINITY * Number.NEGATIVE_INFINITY !== Number.NEGATIVE_INFINITY) {\n $ERROR('#4: Infinity * -Infinity === -Infinity. Actual: ' + (Infinity * -Infinity));\n}\n",
+ "id": "S11.5.1_A4_T4"
+ },
+ {
+ "section": "11.5.1",
+ "description": "Multiplication of an infinity by a finite non-zero value results in a signed infinity",
+ "test": "//CHECK#1\nif (Number.NEGATIVE_INFINITY * -1 !== Number.POSITIVE_INFINITY) {\n $ERROR('#1: -Infinity * -1 === Infinity. Actual: ' + (-Infinity * -1));\n}\n\n//CHECK#2\nif (-1 * Number.NEGATIVE_INFINITY !== Number.POSITIVE_INFINITY) {\n $ERROR('#2: -1 * -Infinity === Infinity. Actual: ' + (-1 * -Infinity));\n}\n\n//CHECK#3\nif (Number.POSITIVE_INFINITY * -1 !== Number.NEGATIVE_INFINITY) {\n $ERROR('#3: Infinity * -1 === -Infinity. Actual: ' + (Infinity * -1));\n}\n\n//CHECK#4\nif (-1 * Number.POSITIVE_INFINITY !== Number.NEGATIVE_INFINITY) {\n $ERROR('#4: -1 * Infinity === -Infinity. Actual: ' + (-1 * Infinity));\n} \n\n//CHECK#5\nif (Number.POSITIVE_INFINITY * Number.MAX_VALUE !== Number.POSITIVE_INFINITY) {\n $ERROR('#5: Infinity * Number.MAX_VALUE === Infinity. Actual: ' + (Infinity * Number.MAX_VALUE));\n}\n\n//CHECK#6\nif (Number.POSITIVE_INFINITY * Number.MAX_VALUE !== Number.MAX_VALUE * Number.POSITIVE_INFINITY) {\n $ERROR('#6: Infinity * Number.MAX_VALUE === Number.MAX_VALUE * Infinity. Actual: ' + (Infinity * Number.MAX_VALUE));\n}\n\n//CHECK#7\nif (Number.NEGATIVE_INFINITY * Number.MIN_VALUE !== Number.NEGATIVE_INFINITY) {\n $ERROR('#7: -Infinity * Number.MIN_VALUE === -Infinity. Actual: ' + (-Infinity * Number.MIN_VALUE));\n}\n\n//CHECK#8\nif (Number.NEGATIVE_INFINITY * Number.MIN_VALUE !== Number.MIN_VALUE * Number.NEGATIVE_INFINITY) {\n $ERROR('#8: -Infinity * Number.MIN_VALUE === Number.MIN_VALUE * -Infinity. Actual: ' + (-Infinity * Number.MIN_VALUE));\n} \n",
+ "id": "S11.5.1_A4_T5"
+ },
+ {
+ "section": "11.5.1",
+ "description": "If the magnitude is too large to represent, the result is then an infinity of appropriate sign",
+ "test": "//CHECK#1\nif (Number.MAX_VALUE * 1.1 !== Number.POSITIVE_INFINITY) {\n $ERROR('#1: Number.MAX_VALUE * 1.1 === Number.POSITIVE_INFINITY. Actual: ' + (Number.MAX_VALUE * 1.1));\n}\n\n//CHECK#2\nif (-1.1 * Number.MAX_VALUE !== Number.NEGATIVE_INFINITY) {\n $ERROR('#2: -1.1 * Number.MAX_VALUE === Number.NEGATIVE_INFINITY. Actual: ' + (-1.1 * Number.MAX_VALUE));\n} \n\n//CHECK#3\nif (Number.MAX_VALUE * 1 !== Number.MAX_VALUE) {\n $ERROR('#3: Number.MAX_VALUE * 1 === Number.MAX_VALUE. Actual: ' + (Number.MAX_VALUE * 1));\n}\n\n//CHECK#4\nif (-1 * Number.MAX_VALUE !== -Number.MAX_VALUE) {\n $ERROR('#4: -1 * Number.MAX_VALUE === -Number.MAX_VALUE. Actual: ' + (-1 * Number.MAX_VALUE));\n} \n",
+ "id": "S11.5.1_A4_T6"
+ },
+ {
+ "section": "11.5.1",
+ "description": "If the magnitude is too small to represent, the result is then a zero of appropriate sign",
+ "test": "//CHECK#1\nif (Number.MIN_VALUE * 0.1 !== 0) {\n $ERROR('#1: Number.MIN_VALUE * 0.1 === 0. Actual: ' + (Number.MIN_VALUE * 0.1));\n}\n\n//CHECK#2\nif (-0.1 * Number.MIN_VALUE !== -0) {\n $ERROR('#2.1: -0.1 * Number.MIN_VALUE === -0. Actual: ' + (-0.1 * Number.MIN_VALUE));\n} else {\n if (1 / (-0.1 * Number.MIN_VALUE) !== Number.NEGATIVE_INFINITY) {\n $ERROR('#2.2: -0.1 * Number.MIN_VALUE === -0. Actual: +0');\n }\n}\n\n//CHECK#3\nif (Number.MIN_VALUE * 0.5 !== 0) {\n $ERROR('#3: Number.MIN_VALUE * 0.5 === 0. Actual: ' + (Number.MIN_VALUE * 0.5));\n}\n\n//CHECK#4\nif (-0.5 * Number.MIN_VALUE !== -0) {\n $ERROR('#4.1: -0.5 * Number.MIN_VALUE === -0. Actual: ' + (-0.5 * Number.MIN_VALUE));\n} else {\n if (1 / (-0.5 * Number.MIN_VALUE) !== Number.NEGATIVE_INFINITY) {\n $ERROR('#4.2: -0.5 * Number.MIN_VALUE === -0. Actual: +0');\n }\n}\n\n//CHECK#5\nif (Number.MIN_VALUE * 0.51 !== Number.MIN_VALUE) {\n $ERROR('#5: Number.MIN_VALUE * 0.51 === Number.MIN_VALUE. Actual: ' + (Number.MIN_VALUE * 0.51));\n}\n\n//CHECK#6\nif (-0.51 * Number.MIN_VALUE !== -Number.MIN_VALUE) {\n $ERROR('#6: -0.51 * Number.MIN_VALUE === -Number.MIN_VALUE. Actual: ' + (-0.51 * Number.MIN_VALUE));\n}\n\n//CHECK#7\nif (Number.MIN_VALUE * 0.9 !== Number.MIN_VALUE) {\n $ERROR('#7: Number.MIN_VALUE * 0.9 === Number.MIN_VALUE. Actual: ' + (Number.MIN_VALUE * 0.9));\n}\n\n//CHECK#8\nif (-0.9 * Number.MIN_VALUE !== -Number.MIN_VALUE) {\n $ERROR('#8: -0.9 * Number.MIN_VALUE === -Number.MIN_VALUE. Actual: ' + (-0.9 * Number.MIN_VALUE));\n} \n",
+ "id": "S11.5.1_A4_T7"
+ },
+ {
+ "section": "11.5.1",
+ "description": "Multiplication is not always associative (x * y * z is the same as (x * y) * z, not x * (y * z))",
+ "test": "//CHECK#1\nif (Number.MAX_VALUE * 1.1 * 0.9 !== (Number.MAX_VALUE * 1.1) * 0.9) {\n $ERROR('#1: Number.MAX_VALUE * 1.1 * 0.9 === (Number.MAX_VALUE * 1.1) * 0.9. Actual: ' + (Number.MAX_VALUE * 1.1 * 0.9));\n} \n\n//CHECK#2\nif ((Number.MAX_VALUE * 1.1) * 0.9 === Number.MAX_VALUE * (1.1 * 0.9)) {\n $ERROR('#2: (Number.MAX_VALUE * 1.1) * 0.9 !== Number.MAX_VALUE * (1.1 * 0.9)');\n}\n",
+ "id": "S11.5.1_A4_T8"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/11.5.2_Applying_the_slash_Operator.json b/website/resources/scripts/testcases2/11.5.2_Applying_the_slash_Operator.json
new file mode 100644
index 000000000..9e4708a1d
--- /dev/null
+++ b/website/resources/scripts/testcases2/11.5.2_Applying_the_slash_Operator.json
@@ -0,0 +1,212 @@
+{
+ "testCollection": {
+ "name": "11.5.2_Applying_the_slash_Operator",
+ "numTests": 34,
+ "tests": [
+ {
+ "section": "11.5.2, 7.2, 7.3",
+ "description": "Checking by using eval",
+ "test": "//CHECK#1\nif (eval(\"1\\u0009/\\u00091\") !== 1) {\n $ERROR('#1: 1\\\\u0009/\\\\u00091 === 1');\n}\n\n//CHECK#2\nif (eval(\"1\\u000B/\\u000B1\") !== 1) {\n $ERROR('#2: 1\\\\u000B/\\\\u000B1 === 1'); \n}\n\n//CHECK#3\nif (eval(\"1\\u000C/\\u000C1\") !== 1) {\n $ERROR('#3: 1\\\\u000C/\\\\u000C1 === 1');\n}\n\n//CHECK#4\nif (eval(\"1\\u0020/\\u00201\") !== 1) {\n $ERROR('#4: 1\\\\u0020/\\\\u00201 === 1');\n}\n\n//CHECK#5\nif (eval(\"1\\u00A0/\\u00A01\") !== 1) {\n $ERROR('#5: 1\\\\u00A0/\\\\u00A01 === 1');\n}\n\n//CHECK#6\nif (eval(\"1\\u000A/\\u000A1\") !== 1) {\n $ERROR('#6: 1\\\\u000A/\\\\u000A1 === 1'); \n}\n\n//CHECK#7\nif (eval(\"1\\u000D/\\u000D1\") !== 1) {\n $ERROR('#7: 1\\\\u000D/\\\\u000D1 === 1');\n}\n\n//CHECK#8\nif (eval(\"1\\u2028/\\u20281\") !== 1) {\n $ERROR('#8: 1\\\\u2028/\\\\u20281 === 1');\n}\n\n//CHECK#9\nif (eval(\"1\\u2029/\\u20291\") !== 1) {\n $ERROR('#9: 1\\\\u2029/\\\\u20291 === 1');\n}\n\n//CHECK#10\nif (eval(\"1\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u2029/\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u20291\") !== 1) {\n $ERROR('#10: 1\\\\u0009\\\\u000B\\\\u000C\\\\u0020\\\\u00A0\\\\u000A\\\\u000D\\\\u2028\\\\u2029/\\\\u0009\\\\u000B\\\\u000C\\\\u0020\\\\u00A0\\\\u000A\\\\u000D\\\\u2028\\\\u20291 === 1');\n}\n",
+ "id": "S11.5.2_A1"
+ },
+ {
+ "section": "11.5.2",
+ "description": "Either Type is not Reference or GetBase is not null",
+ "test": "//CHECK#1\nif (1 / 1 !== 1) {\n $ERROR('#1: 1 / 1 === 1. Actual: ' + (1 / 1));\n}\n\n//CHECK#2\nvar x = 1;\nif (x / 1 !== 1) {\n $ERROR('#2: var x = 1; x / 1 === 1. Actual: ' + (x / 1));\n}\n\n//CHECK#3\nvar y = 1;\nif (1 / y !== 1) {\n $ERROR('#3: var y = 1; 1 / y === 1. Actual: ' + (1 / y));\n}\n\n//CHECK#4\nvar x = 1;\nvar y = 1;\nif (x / y !== 1) {\n $ERROR('#4: var x = 1; var y = 1; x / y === 1. Actual: ' + (x / y));\n}\n\n//CHECK#5\nvar objectx = new Object();\nvar objecty = new Object();\nobjectx.prop = 1;\nobjecty.prop = 1;\nif (objectx.prop / objecty.prop !== 1) {\n $ERROR('#5: var objectx = new Object(); var objecty = new Object(); objectx.prop = 1; objecty.prop = 1; objectx.prop / objecty.prop === 1. Actual: ' + (objectx.prop / objecty.prop));\n}\n \n",
+ "id": "S11.5.2_A2.1_T1"
+ },
+ {
+ "section": "11.5.2",
+ "description": "If GetBase(x) is null, throw ReferenceError",
+ "test": "//CHECK#1\ntry {\n x / 1;\n $ERROR('#1.1: x / 1 throw ReferenceError. Actual: ' + (x / 1)); \n}\ncatch (e) {\n if ((e instanceof ReferenceError) !== true) {\n $ERROR('#1.2: x / 1 throw ReferenceError. Actual: ' + (e)); \n }\n}\n\n",
+ "id": "S11.5.2_A2.1_T2"
+ },
+ {
+ "section": "11.5.2",
+ "description": "If GetBase(y) is null, throw ReferenceError",
+ "test": "//CHECK#1\ntry {\n 1 / y;\n $ERROR('#1.1: 1 / y throw ReferenceError. Actual: ' + (1 / y)); \n}\ncatch (e) {\n if ((e instanceof ReferenceError) !== true) {\n $ERROR('#1.2: 1 / y throw ReferenceError. Actual: ' + (e)); \n }\n}\n",
+ "id": "S11.5.2_A2.1_T3"
+ },
+ {
+ "section": "11.5.2, 8.6.2.6",
+ "description": "If Type(value) is Object, evaluate ToPrimitive(value, Number)",
+ "test": "//CHECK#1\nif ({valueOf: function() {return 1}} / 1 !== 1) {\n $ERROR('#1: {valueOf: function() {return 1}} / 1 === 1. Actual: ' + ({valueOf: function() {return 1}} / 1));\n}\n\n//CHECK#2\nif ({valueOf: function() {return 1}, toString: function() {return 0}} / 1 !== 1) {\n $ERROR('#2: {valueOf: function() {return 1}, toString: function() {return 0}} / 1 === 1. Actual: ' + ({valueOf: function() {return 1}, toString: function() {return 0}} / 1));\n}\n\n//CHECK#3\nif ({valueOf: function() {return 1}, toString: function() {return {}}} / 1 !== 1) {\n $ERROR('#3: {valueOf: function() {return 1}, toString: function() {return {}}} / 1 === 1. Actual: ' + ({valueOf: function() {return 1}, toString: function() {return {}}} / 1));\n}\n\n//CHECK#4\ntry {\n if ({valueOf: function() {return 1}, toString: function() {throw \"error\"}} / 1 !== 1) {\n $ERROR('#4.1: {valueOf: function() {return 1}, toString: function() {throw \"error\"}} / 1 === 1. Actual: ' + ({valueOf: function() {return 1}, toString: function() {throw \"error\"}} / 1));\n }\n}\ncatch (e) {\n if (e === \"error\") {\n $ERROR('#4.2: {valueOf: function() {return 1}, toString: function() {throw \"error\"}} / 1 not throw \"error\"');\n } else {\n $ERROR('#4.3: {valueOf: function() {return 1}, toString: function() {throw \"error\"}} / 1 not throw Error. Actual: ' + (e));\n }\n}\n\n//CHECK#5\nif (1 / {toString: function() {return 1}} !== 1) {\n $ERROR('#5: 1 / {toString: function() {return 1}} === 1. Actual: ' + (1 / {toString: function() {return 1}}));\n}\n\n//CHECK#6\nif (1 / {valueOf: function() {return {}}, toString: function() {return 1}} !== 1) {\n $ERROR('#6: 1 / {valueOf: function() {return {}}, toString: function() {return 1}} === 1. Actual: ' + (1 / {valueOf: function() {return {}}, toString: function() {return 1}}));\n}\n\n//CHECK#7\ntry {\n 1 / {valueOf: function() {throw \"error\"}, toString: function() {return 1}};\n $ERROR('#7.1: 1 / {valueOf: function() {throw \"error\"}, toString: function() {return 1}} throw \"error\". Actual: ' + (1 / {valueOf: function() {throw \"error\"}, toString: function() {return 1}}));\n} \ncatch (e) {\n if (e !== \"error\") {\n $ERROR('#7.2: 1 / {valueOf: function() {throw \"error\"}, toString: function() {return 1}} throw \"error\". Actual: ' + (e));\n } \n}\n\n//CHECK#8\ntry {\n 1 / {valueOf: function() {return {}}, toString: function() {return {}}};\n $ERROR('#8.1: 1 / {valueOf: function() {return {}}, toString: function() {return {}}} throw TypeError. Actual: ' + (1 / {valueOf: function() {return {}}, toString: function() {return {}}}));\n} \ncatch (e) {\n if ((e instanceof TypeError) !== true) {\n $ERROR('#8.2: 1 / {valueOf: function() {return {}}, toString: function() {return {}}} throw TypeError. Actual: ' + (e));\n } \n}\n",
+ "id": "S11.5.2_A2.2_T1"
+ },
+ {
+ "section": "11.5.2",
+ "description": "Checking with \"throw\"",
+ "test": "//CHECK#1\nvar x = { valueOf: function () { throw \"x\"; } };\nvar y = { valueOf: function () { throw \"y\"; } };\ntry {\n x / y;\n $ERROR('#1.1: var x = { valueOf: function () { throw \"x\"; } }; var y = { valueOf: function () { throw \"y\"; } }; x / y throw \"x\". Actual: ' + (x / y));\n} catch (e) {\n if (e === \"y\") {\n $ERROR('#1.2: ToNumber(first expression) is called first, and then ToNumber(second expression)');\n } else {\n if (e !== \"x\") {\n $ERROR('#1.3: var x = { valueOf: function () { throw \"x\"; } }; var y = { valueOf: function () { throw \"y\"; } }; x / y throw \"x\". Actual: ' + (e));\n }\n }\n}\n",
+ "id": "S11.5.2_A2.3_T1"
+ },
+ {
+ "section": "11.5.2",
+ "description": "Checking with \"=\"",
+ "test": "//CHECK#1\nvar x = 0; \nif ((x = 1) / x !== 1) {\n $ERROR('#1: var x = 0; (x = 1) / x === 1. Actual: ' + ((x = 1) / x));\n}\n\n//CHECK#2\nvar x = 0; \nif (x / (x = 1) !== 0) {\n $ERROR('#2: var x = 0; x / (x = 1) === 0. Actual: ' + (x / (x = 1)));\n}\n\n",
+ "id": "S11.5.2_A2.4_T1"
+ },
+ {
+ "section": "11.5.2",
+ "description": "Checking with \"throw\"",
+ "test": "//CHECK#1\nvar x = function () { throw \"x\"; };\nvar y = function () { throw \"y\"; };\ntry {\n x() / y();\n $ERROR('#1.1: var x = function () { throw \"x\"; }; var y = function () { throw \"y\"; }; x() / y() throw \"x\". Actual: ' + (x() / y()));\n} catch (e) {\n if (e === \"y\") {\n $ERROR('#1.2: First expression is evaluated first, and then second expression');\n } else {\n if (e !== \"x\") {\n $ERROR('#1.3: var x = function () { throw \"x\"; }; var y = function () { throw \"y\"; }; x() / y() throw \"x\". Actual: ' + (e));\n }\n }\n}\n",
+ "id": "S11.5.2_A2.4_T2"
+ },
+ {
+ "section": "11.5.2",
+ "description": "Checking with undeclarated variables",
+ "test": "//CHECK#1\ntry {\n x / (x = 1);\n $ERROR('#1.1: x / (x = 1) throw ReferenceError. Actual: ' + (x / (x = 1))); \n}\ncatch (e) {\n if ((e instanceof ReferenceError) !== true) {\n $ERROR('#1.2: x / (x = 1) throw ReferenceError. Actual: ' + (e)); \n }\n}\n\n//CHECK#2\nif ((y = 1) / y !== 1) {\n $ERROR('#2: (y = 1) / y === 1. Actual: ' + ((y = 1) / y));\n}\n\n",
+ "id": "S11.5.2_A2.4_T3"
+ },
+ {
+ "section": "11.5.2",
+ "description": "Type(x) and Type(y) vary between primitive boolean and Boolean object",
+ "test": "//CHECK#1\nif (true / true !== 1) {\n $ERROR('#1: true / true === 1. Actual: ' + (true / true));\n}\n\n//CHECK#2\nif (new Boolean(true) / true !== 1) {\n $ERROR('#2: new Boolean(true) / true === 1. Actual: ' + (new Boolean(true) / true));\n}\n\n//CHECK#3\nif (true / new Boolean(true) !== 1) {\n $ERROR('#3: true / new Boolean(true) === 1. Actual: ' + (true / new Boolean(true)));\n}\n\n//CHECK#4\nif (new Boolean(true) / new Boolean(true) !== 1) {\n $ERROR('#4: new Boolean(true) / new Boolean(true) === 1. Actual: ' + (new Boolean(true) / new Boolean(true)));\n}\n",
+ "id": "S11.5.2_A3_T1.1"
+ },
+ {
+ "section": "11.5.2",
+ "description": "Type(x) and Type(y) vary between primitive number and Number object",
+ "test": "//CHECK#1\nif (1 / 1 !== 1) {\n $ERROR('#1: 1 / 1 === 1. Actual: ' + (1 / 1));\n}\n\n//CHECK#2\nif (new Number(1) / 1 !== 1) {\n $ERROR('#2: new Number(1) / 1 === 1. Actual: ' + (new Number(1) / 1));\n}\n\n//CHECK#3\nif (1 / new Number(1) !== 1) {\n $ERROR('#3: 1 / new Number(1) === 1. Actual: ' + (1 / new Number(1)));\n}\n\n//CHECK#4\nif (new Number(1) / new Number(1) !== 1) {\n $ERROR('#4: new Number(1) / new Number(1) === 1. Actual: ' + (new Number(1) / new Number(1)));\n}\n\n",
+ "id": "S11.5.2_A3_T1.2"
+ },
+ {
+ "section": "11.5.2",
+ "description": "Type(x) and Type(y) vary between primitive string and String object",
+ "test": "//CHECK#1\nif (\"1\" / \"1\" !== 1) {\n $ERROR('#1: \"1\" / \"1\" === 1. Actual: ' + (\"1\" / \"1\"));\n}\n\n//CHECK#2\nif (new String(\"1\") / \"1\" !== 1) {\n $ERROR('#2: new String(\"1\") / \"1\" === 1. Actual: ' + (new String(\"1\") / \"1\"));\n}\n\n//CHECK#3\nif (\"1\" / new String(\"1\") !== 1) {\n $ERROR('#3: \"1\" / new String(\"1\") === 1. Actual: ' + (\"1\" / new String(\"1\")));\n}\n\n//CHECK#4\nif (new String(\"1\") / new String(\"1\") !== 1) {\n $ERROR('#4: new String(\"1\") / new String(\"1\") === 1. Actual: ' + (new String(\"1\") / new String(\"1\")));\n}\n\n//CHECK#5\nif (isNaN(\"x\" / \"1\") !== true) {\n $ERROR('#5: \"x\" / \"1\" === Not-a-Number. Actual: ' + (\"x\" / \"1\"));\n}\n\n//CHECK#6\nif (isNaN(\"1\" / \"x\") !== true) {\n $ERROR('#6: \"1\" / \"x\" === Not-a-Number. Actual: ' + (\"1\" / \"x\"));\n}\n",
+ "id": "S11.5.2_A3_T1.3"
+ },
+ {
+ "section": "11.5.2",
+ "description": "Type(x) and Type(y) vary between Null and Undefined",
+ "test": "//CHECK#1\nif (isNaN(null / undefined) !== true) {\n $ERROR('#1: null / undefined === Not-a-Number. Actual: ' + (null / undefined));\n}\n\n//CHECK#2\nif (isNaN(undefined / null) !== true) {\n $ERROR('#2: undefined / null === Not-a-Number. Actual: ' + (undefined / null));\n}\n\n//CHECK#3\nif (isNaN(undefined / undefined) !== true) {\n $ERROR('#3: undefined / undefined === Not-a-Number. Actual: ' + (undefined / undefined));\n}\n\n//CHECK#4\nif (isNaN(null / null) !== true) {\n $ERROR('#4: null / null === Not-a-Number. Actual: ' + (null / null));\n}\n",
+ "id": "S11.5.2_A3_T1.4"
+ },
+ {
+ "section": "11.5.2",
+ "description": "Type(x) and Type(y) vary between Object object and Function object",
+ "test": "//CHECK#1\nif (isNaN({} / function(){return 1}) !== true) {\n $ERROR('#1: {} / function(){return 1} === Not-a-Number. Actual: ' + ({} / function(){return 1}));\n}\n\n//CHECK#2\nif (isNaN(function(){return 1} / {}) !== true) {\n $ERROR('#2: function(){return 1} / {} === Not-a-Number. Actual: ' + (function(){return 1} / {}));\n}\n\n//CHECK#3\nif (isNaN(function(){return 1} / function(){return 1}) !== true) {\n $ERROR('#3: function(){return 1} / function(){return 1} === Not-a-Number. Actual: ' + (function(){return 1} / function(){return 1}));\n}\n\n//CHECK#4\nif (isNaN({} / {}) !== true) {\n $ERROR('#4: {} / {} === Not-a-Number. Actual: ' + ({} / {}));\n}\n",
+ "id": "S11.5.2_A3_T1.5"
+ },
+ {
+ "section": "11.5.2",
+ "description": "Type(x) is different from Type(y) and both types vary between Number (primitive or object) and Boolean (primitive and object)",
+ "test": "//CHECK#1\nif (true / 1 !== 1) {\n $ERROR('#1: true / 1 === 1. Actual: ' + (true / 1));\n}\n\n//CHECK#2\nif (1 / true !== 1) {\n $ERROR('#2: 1 / true === 1. Actual: ' + (1 / true));\n}\n\n//CHECK#3\nif (new Boolean(true) / 1 !== 1) {\n $ERROR('#3: new Boolean(true) / 1 === 1. Actual: ' + (new Boolean(true) / 1));\n}\n\n//CHECK#4\nif (1 / new Boolean(true) !== 1) {\n $ERROR('#4: 1 / new Boolean(true) === 1. Actual: ' + (1 / new Boolean(true)));\n}\n\n//CHECK#5\nif (true / new Number(1) !== 1) {\n $ERROR('#5: true / new Number(1) === 1. Actual: ' + (true / new Number(1)));\n}\n\n//CHECK#6\nif (new Number(1) / true !== 1) {\n $ERROR('#6: new Number(1) / true === 1. Actual: ' + (new Number(1) / true));\n}\n\n//CHECK#7\nif (new Boolean(true) / new Number(1) !== 1) {\n $ERROR('#7: new Boolean(true) / new Number(1) === 1. Actual: ' + (new Boolean(true) / new Number(1)));\n}\n\n//CHECK#8\nif (new Number(1) / new Boolean(true) !== 1) {\n $ERROR('#8: new Number(1) / new Boolean(true) === 1. Actual: ' + (new Number(1) / new Boolean(true)));\n}\n",
+ "id": "S11.5.2_A3_T2.1"
+ },
+ {
+ "section": "11.5.2",
+ "description": "Type(x) is different from Type(y) and both types vary between Number (primitive or object) and String (primitive and object)",
+ "test": "//CHECK#1\nif (\"1\" / 1 !== 1) {\n $ERROR('#1: \"1\" / 1 === 1. Actual: ' + (\"1\" / 1));\n}\n\n//CHECK#2\nif (1 / \"1\" !== 1) {\n $ERROR('#2: 1 / \"1\" === 1. Actual: ' + (1 / \"1\"));\n}\n\n//CHECK#3\nif (new String(\"1\") / 1 !== 1) {\n $ERROR('#3: new String(\"1\") / 1 === 1. Actual: ' + (new String(\"1\") / 1));\n}\n\n//CHECK#4\nif (1 / new String(\"1\") !== 1) {\n $ERROR('#4: 1 / new String(\"1\") === 1. Actual: ' + (1 / new String(\"1\")));\n}\n\n//CHECK#5\nif (\"1\" / new Number(1) !== 1) {\n $ERROR('#5: \"1\" / new Number(1) === 1. Actual: ' + (\"1\" / new Number(1)));\n}\n\n//CHECK#6\nif (new Number(1) / \"1\" !== 1) {\n $ERROR('#6: new Number(1) / \"1\" === 1. Actual: ' + (new Number(1) / \"1\"));\n}\n\n//CHECK#7\nif (new String(\"1\") / new Number(1) !== 1) {\n $ERROR('#7: new String(\"1\") / new Number(1) === 1. Actual: ' + (new String(\"1\") / new Number(1)));\n}\n\n//CHECK#8\nif (new Number(1) / new String(\"1\") !== 1) {\n $ERROR('#8: new Number(1) / new String(\"1\") === 1. Actual: ' + (new Number(1) / new String(\"1\")));\n}\n\n//CHECK#9\nif (isNaN(\"x\" / 1) !== true) {\n $ERROR('#9: \"x\" / 1 === Not-a-Number. Actual: ' + (\"x\" / 1));\n}\n\n//CHECK#10\nif (isNaN(1 / \"x\") !== true) {\n $ERROR('#10: 1 / \"x\" === Not-a-Number. Actual: ' + (1 / \"x\"));\n}\n",
+ "id": "S11.5.2_A3_T2.2"
+ },
+ {
+ "section": "11.5.2",
+ "description": "Type(x) is different from Type(y) and both types vary between Number (primitive or object) and Null",
+ "test": "//CHECK#1\nif (1 / null !== Number.POSITIVE_INFINITY) {\n $ERROR('#1: 1 / null === +Infinity. Actual: ' + (1 / null));\n}\n\n//CHECK#2\nif (null / 1 !== 0) {\n $ERROR('#2: null / 1 === 0. Actual: ' + (null / 1));\n}\n\n//CHECK#3\nif (new Number(1) / null !== Number.POSITIVE_INFINITY) {\n $ERROR('#3: new Number(1) / null === +Infinity. Actual: ' + (new Number(1) / null));\n}\n\n//CHECK#4\nif (null / new Number(1) !== 0) {\n $ERROR('#4: null / new Number(1) === 0. Actual: ' + (null / new Number(1)));\n}\n",
+ "id": "S11.5.2_A3_T2.3"
+ },
+ {
+ "section": "11.5.2",
+ "description": "Type(x) is different from Type(y) and both types vary between Number (primitive or object) and Undefined",
+ "test": "//CHECK#1\nif (isNaN(1 / undefined) !== true) {\n $ERROR('#1: 1 / undefined === Not-a-Number. Actual: ' + (1 / undefined));\n}\n\n//CHECK#2\nif (isNaN(undefined / 1) !== true) {\n $ERROR('#2: undefined / 1 === Not-a-Number. Actual: ' + (undefined / 1));\n}\n\n//CHECK#3\nif (isNaN(new Number(1) / undefined) !== true) {\n $ERROR('#3: new Number(1) / undefined === Not-a-Number. Actual: ' + (new Number(1) / undefined));\n}\n\n//CHECK#4\nif (isNaN(undefined / new Number(1)) !== true) {\n $ERROR('#4: undefined / new Number(1) === Not-a-Number. Actual: ' + (undefined / new Number(1)));\n}\n",
+ "id": "S11.5.2_A3_T2.4"
+ },
+ {
+ "section": "11.5.2",
+ "description": "Type(x) is different from Type(y) and both types vary between String (primitive or object) and Boolean (primitive and object)",
+ "test": "//CHECK#1\nif (true / \"1\" !== 1) {\n $ERROR('#1: true / \"1\" === 1. Actual: ' + (true / \"1\"));\n}\n\n//CHECK#2\nif (\"1\" / true !== 1) {\n $ERROR('#2: \"1\" / true === 1. Actual: ' + (\"1\" / true));\n}\n\n//CHECK#3\nif (new Boolean(true) / \"1\" !== 1) {\n $ERROR('#3: new Boolean(true) / \"1\" === 1. Actual: ' + (new Boolean(true) / \"1\"));\n}\n\n//CHECK#4\nif (\"1\" / new Boolean(true) !== 1) {\n $ERROR('#4: \"1\" / new Boolean(true) === 1. Actual: ' + (\"1\" / new Boolean(true)));\n}\n\n//CHECK#5\nif (true / new String(\"1\") !== 1) {\n $ERROR('#5: true / new String(\"1\") === 1. Actual: ' + (true / new String(\"1\")));\n}\n\n//CHECK#6\nif (new String(\"1\") / true !== 1) {\n $ERROR('#6: new String(\"1\") / true === 1. Actual: ' + (new String(\"1\") / true));\n}\n\n//CHECK#7\nif (new Boolean(true) / new String(\"1\") !== 1) {\n $ERROR('#7: new Boolean(true) / new String(\"1\") === 1. Actual: ' + (new Boolean(true) / new String(\"1\")));\n}\n\n//CHECK#8\nif (new String(\"1\") / new Boolean(true) !== 1) {\n $ERROR('#8: new String(\"1\") / new Boolean(true) === 1. Actual: ' + (new String(\"1\") / new Boolean(true)));\n}\n",
+ "id": "S11.5.2_A3_T2.5"
+ },
+ {
+ "section": "11.5.2",
+ "description": "Type(x) is different from Type(y) and both types vary between String (primitive or object) and Undefined",
+ "test": "//CHECK#1\nif (isNaN(\"1\" / undefined) !== true) {\n $ERROR('#1: \"1\" / undefined === Not-a-Number. Actual: ' + (\"1\" / undefined));\n}\n\n//CHECK#2\nif (isNaN(undefined / \"1\") !== true) {\n $ERROR('#2: undefined / \"1\" === Not-a-Number. Actual: ' + (undefined / \"1\"));\n}\n\n//CHECK#3\nif (isNaN(new String(\"1\") / undefined) !== true) {\n $ERROR('#3: new String(\"1\") / undefined === Not-a-Number. Actual: ' + (new String(\"1\") / undefined));\n}\n\n//CHECK#4\nif (isNaN(undefined / new String(\"1\")) !== true) {\n $ERROR('#4: undefined / new String(\"1\") === Not-a-Number. Actual: ' + (undefined / new String(\"1\")));\n}\n",
+ "id": "S11.5.2_A3_T2.6"
+ },
+ {
+ "section": "11.5.2",
+ "description": "Type(x) is different from Type(y) and both types vary between String (primitive or object) and Null",
+ "test": "//CHECK#1\nif (\"1\" / null !== Number.POSITIVE_INFINITY) {\n $ERROR('#1: \"1\" / null === +Infinity. Actual: ' + (\"1\" / null));\n}\n\n//CHECK#2\nif (null / \"1\" !== 0) {\n $ERROR('#2: null / \"1\" === 0. Actual: ' + (null / \"1\"));\n}\n\n//CHECK#3\nif (new String(\"1\") / null !== Number.POSITIVE_INFINITY) {\n $ERROR('#3: new String(\"1\") / null === +Infinity. Actual: ' + (new String(\"1\") / null));\n}\n\n//CHECK#4\nif (null / new String(\"1\") !== 0) {\n $ERROR('#4: null / new String(\"1\") === 0. Actual: ' + (null / new String(\"1\")));\n}\n",
+ "id": "S11.5.2_A3_T2.7"
+ },
+ {
+ "section": "11.5.2",
+ "description": "Type(x) is different from Type(y) and both types vary between Boolean (primitive or object) and Undefined",
+ "test": "//CHECK#1\nif (isNaN(true / undefined) !== true) {\n $ERROR('#1: true / undefined === Not-a-Number. Actual: ' + (true / undefined));\n}\n\n//CHECK#2\nif (isNaN(undefined / true) !== true) {\n $ERROR('#2: undefined / true === Not-a-Number. Actual: ' + (undefined / true));\n}\n\n//CHECK#3\nif (isNaN(new Boolean(true) / undefined) !== true) {\n $ERROR('#3: new Boolean(true) / undefined === Not-a-Number. Actual: ' + (new Boolean(true) / undefined));\n}\n\n//CHECK#4\nif (isNaN(undefined / new Boolean(true)) !== true) {\n $ERROR('#4: undefined / new Boolean(true) === Not-a-Number. Actual: ' + (undefined / new Boolean(true)));\n}\n",
+ "id": "S11.5.2_A3_T2.8"
+ },
+ {
+ "section": "11.5.2",
+ "description": "Type(x) is different from Type(y) and both types vary between Boolean (primitive or object) and Null",
+ "test": "//CHECK#1\nif (true / null !== Number.POSITIVE_INFINITY) {\n $ERROR('#1: true / null === +Infinity. Actual: ' + (true / null));\n}\n\n//CHECK#2\nif (null / true !== 0) {\n $ERROR('#2: null / true === 0. Actual: ' + (null / true));\n}\n\n//CHECK#3\nif (new Boolean(true) / null !== Number.POSITIVE_INFINITY) {\n $ERROR('#3: new Boolean(true) / null === +Infinity. Actual: ' + (new Boolean(true) / null));\n}\n\n//CHECK#4\nif (null / new Boolean(true) !== 0) {\n $ERROR('#4: null / new Boolean(true) === 0. Actual: ' + (null / new Boolean(true)));\n}\n",
+ "id": "S11.5.2_A3_T2.9"
+ },
+ {
+ "section": "11.5.2",
+ "description": "If left operand is NaN, the result is NaN",
+ "test": "//CHECK#1\nif (isNaN(Number.NaN / Number.NaN) !== true) {\n $ERROR('#1: NaN / NaN === Not-a-Number. Actual: ' + (NaN / NaN));\n} \n\n//CHECK#2\nif (isNaN(Number.NaN / +0) !== true) {\n $ERROR('#2: NaN / +0 === Not-a-Number. Actual: ' + (NaN / +0)); \n} \n\n//CHECK#3\nif (isNaN(Number.NaN / -0) !== true) {\n $ERROR('#3: NaN / -0 === Not-a-Number. Actual: ' + (NaN / -0)); \n} \n\n//CHECK#4\nif (isNaN(Number.NaN / Number.POSITIVE_INFINITY) !== true) {\n $ERROR('#4: NaN / Infinity === Not-a-Number. Actual: ' + (NaN / Infinity));\n} \n\n//CHECK#5\nif (isNaN(Number.NaN / Number.NEGATIVE_INFINITY) !== true) {\n $ERROR('#5: NaN / -Infinity === Not-a-Number. Actual: ' + (NaN / -Infinity)); \n} \n\n//CHECK#6\nif (isNaN(Number.NaN / Number.MAX_VALUE) !== true) {\n $ERROR('#6: NaN / Number.MAX_VALUE === Not-a-Number. Actual: ' + (NaN / Number.MAX_VALUE));\n} \n\n//CHECK#7\nif (isNaN(Number.NaN / Number.MIN_VALUE) !== true) {\n $ERROR('#7: NaN / Number.MIN_VALUE === Not-a-Number. Actual: ' + (NaN / Number.MIN_VALUE)); \n}\n\n//CHECK#8\nif (isNaN(Number.NaN / 1) !== true) {\n $ERROR('#8: NaN / 1 === Not-a-Number. Actual: ' + (NaN / 1)); \n} \n",
+ "id": "S11.5.2_A4_T1.1"
+ },
+ {
+ "section": "11.5.2",
+ "description": "If right operand is NaN, the result is NaN",
+ "test": "//CHECK#1\nif (isNaN(Number.NaN / Number.NaN) !== true) {\n $ERROR('#1: NaN / NaN === Not-a-Number. Actual: ' + (NaN / NaN));\n} \n\n//CHECK#2\nif (isNaN(+0 / Number.NaN) !== true) {\n $ERROR('#2: +0 / NaN === Not-a-Number. Actual: ' + (+0 / NaN)); \n} \n\n//CHECK#3\nif (isNaN(-0 / Number.NaN) !== true) {\n $ERROR('#3: -0 / NaN === Not-a-Number. Actual: ' + (-0 / NaN)); \n} \n\n//CHECK#4\nif (isNaN(Number.POSITIVE_INFINITY / Number.NaN) !== true) {\n $ERROR('#4: Infinity / NaN === Not-a-Number. Actual: ' + (Infinity / NaN));\n} \n\n//CHECK#5\nif (isNaN(Number.NEGATIVE_INFINITY / Number.NaN) !== true) {\n $ERROR('#5: -Infinity / NaN === Not-a-Number. Actual: ' + ( -Infinity / NaN)); \n} \n\n//CHECK#6\nif (isNaN(Number.MAX_VALUE / Number.NaN) !== true) {\n $ERROR('#6: Number.MAX_VALUE / NaN === Not-a-Number. Actual: ' + (Number.MAX_VALUE / NaN));\n} \n\n//CHECK#7\nif (isNaN(Number.MIN_VALUE / Number.NaN) !== true) {\n $ERROR('#7: Number.MIN_VALUE / NaN === Not-a-Number. Actual: ' + (Number.MIN_VALUE / NaN)); \n}\n\n//CHECK#8\nif (isNaN(1 / Number.NaN) !== true) {\n $ERROR('#8: 1 / NaN === Not-a-Number. Actual: ' + (1 / NaN)); \n}\n",
+ "id": "S11.5.2_A4_T1.2"
+ },
+ {
+ "section": "11.5.2",
+ "description": "If both operands are finite and nonzero, the quotient is computed and rounded using IEEE 754 round-to-nearest mode.\nIf the magnitude is too small to represent, the result is then a zero of appropriate sign",
+ "test": "//CHECK#1\nif (Number.MIN_VALUE / 2.1 !== 0) {\n $ERROR('#1: Number.MIN_VALUE / 2.1 === 0. Actual: ' + (Number.MIN_VALUE / 2.1));\n}\n\n//CHECK#2\nif (Number.MIN_VALUE / -2.1 !== -0) {\n $ERROR('#2.1: Number.MIN_VALUE / -2.1 === 0. Actual: ' + (Number.MIN_VALUE / -2.1));\n} else {\n if (1 / (Number.MIN_VALUE / -2.1) !== Number.NEGATIVE_INFINITY) {\n $ERROR('#2.2: Number.MIN_VALUE / -2.1 === -0. Actual: +0');\n }\n}\n\n//CHECK#3\nif (Number.MIN_VALUE / 2.0 !== 0) {\n $ERROR('#3: Number.MIN_VALUE / 2.0 === 0. Actual: ' + (Number.MIN_VALUE / 2.0));\n}\n\n//CHECK#4\nif (Number.MIN_VALUE / -2.0 !== -0) {\n $ERROR('#4.1: Number.MIN_VALUE / -2.0 === -0. Actual: ' + (Number.MIN_VALUE / -2.0));\n} else {\n if (1 / (Number.MIN_VALUE / -2.0) !== Number.NEGATIVE_INFINITY) {\n $ERROR('#4.2: Number.MIN_VALUE / -2.0 === -0. Actual: +0');\n }\n}\n\n//CHECK#5\nif (Number.MIN_VALUE / 1.9 !== Number.MIN_VALUE) {\n $ERROR('#5: Number.MIN_VALUE / 1.9 === Number.MIN_VALUE. Actual: ' + (Number.MIN_VALUE / 1.9));\n}\n\n//CHECK#6\nif (Number.MIN_VALUE / -1.9 !== -Number.MIN_VALUE) {\n $ERROR('#6: Number.MIN_VALUE / -1.9 === -Number.MIN_VALUE. Actual: ' + (Number.MIN_VALUE / -1.9));\n}\n\n//CHECK#7\nif (Number.MIN_VALUE / 1.1 !== Number.MIN_VALUE) {\n $ERROR('#7: Number.MIN_VALUE / 1.1 === Number.MIN_VALUE. Actual: ' + (Number.MIN_VALUE / 1.1));\n}\n\n//CHECK#8\nif (Number.MIN_VALUE / -1.1 !== -Number.MIN_VALUE) {\n $ERROR('#8: Number.MIN_VALUE / -1.1 === -Number.MIN_VALUE. Actual: ' + (Number.MIN_VALUE / -1.1));\n} \n",
+ "id": "S11.5.2_A4_T10"
+ },
+ {
+ "section": "11.5.2",
+ "description": "The sign of the result is positive if both operands have the same sign, negative if the operands have different signs",
+ "test": "//CHECK#1\nif (1 / 1 !== 1) {\n $ERROR('#1: 1 / 1 === 1. Actual: ' + (1 / 1));\n}\n\n//CHECK#2\nif (1 / -1 !== -1) {\n $ERROR('#2: 1 / -1 === -1. Actual: ' + (1 / -1));\n}\n\n//CHECK#3\nif (-1 / 1 !== -1) {\n $ERROR('#3: -1 / 1 === -1. Actual: ' + (-1 / 1));\n}\n\n//CHECK#4\nif (-1 / -1 !== 1) {\n $ERROR('#4: -1 / -1 === 1. Actual: ' + (-1 / -1));\n}\n",
+ "id": "S11.5.2_A4_T2"
+ },
+ {
+ "section": "11.5.2",
+ "description": "Division of an infinity by a zero results in an infinity of appropriate sign",
+ "test": "//CHECK#1\nif (Number.NEGATIVE_INFINITY / 0 !== Number.NEGATIVE_INFINITY) {\n $ERROR('#1: Infinity / 0 === Infinity. Actual: ' + (Infinity / 0));\n}\n\n//CHECK#2\nif (Number.NEGATIVE_INFINITY / -0 !== Number.POSITIVE_INFINITY) {\n $ERROR('#2: -Infinity / -0 === Infinity. Actual: ' + (-Infinity / -0));\n}\n\n//CHECK#3\nif (Number.POSITIVE_INFINITY / 0 !== Number.POSITIVE_INFINITY) {\n $ERROR('#3: Infinity / 0 === Infinity. Actual: ' + (Infinity / 0));\n}\n\n//CHECK#4\nif (Number.POSITIVE_INFINITY / -0 !== Number.NEGATIVE_INFINITY) {\n $ERROR('#4: Infinity / -0 === -Infinity. Actual: ' + (Infinity / -0));\n}\n",
+ "id": "S11.5.2_A4_T3"
+ },
+ {
+ "section": "11.5.2",
+ "description": "Division of an infinity by an infinity results in NaN",
+ "test": "//CHECK#1\nif (isNaN(Number.NEGATIVE_INFINITY / Number.NEGATIVE_INFINITY) !== true) {\n $ERROR('#1: -Infinity / -Infinity === Not-a-Number. Actual: ' + (-Infinity / -Infinity));\n}\n\n//CHECK#2\nif (isNaN(Number.POSITIVE_INFINITY / Number.POSITIVE_INFINITY) !== true) {\n $ERROR('#2: Infinity / Infinity === Not-a-Number. Actual: ' + (Infinity / Infinity));\n}\n\n//CHECK#3\nif (isNaN(Number.NEGATIVE_INFINITY / Number.POSITIVE_INFINITY) !== true) {\n $ERROR('#3: -Infinity / Infinity === Not-a-Number. Actual: ' + (-Infinity / Infinity));\n}\n\n//CHECK#4\nif (isNaN(Number.POSITIVE_INFINITY / Number.NEGATIVE_INFINITY) !== true) {\n $ERROR('#4: Infinity / -Infinity === Not-a-Number. Actual: ' + (Infinity / -Infinity));\n}\n",
+ "id": "S11.5.2_A4_T4"
+ },
+ {
+ "section": "11.5.2",
+ "description": "Division of an infinity by a finite non-zero value results in a signed infinity",
+ "test": "//CHECK#1\nif (Number.NEGATIVE_INFINITY / 1 !== Number.NEGATIVE_INFINITY) {\n $ERROR('#1: -Infinity / 1 === -Infinity. Actual: ' + (-Infinity / 1));\n}\n\n//CHECK#2\nif (Number.NEGATIVE_INFINITY / -1 !== Number.POSITIVE_INFINITY) {\n $ERROR('#2: -Infinity / -1 === Infinity. Actual: ' + (-Infinity / -1));\n}\n\n//CHECK#3\nif (Number.POSITIVE_INFINITY / 1 !== Number.POSITIVE_INFINITY) {\n $ERROR('#3: Infinity / 1 === Infinity. Actual: ' + (Infinity / 1));\n}\n\n//CHECK#4\nif (Number.POSITIVE_INFINITY / -1 !== Number.NEGATIVE_INFINITY) {\n $ERROR('#4: Infinity / -1 === -Infinity. Actual: ' + (Infinity / -1));\n}\n\n//CHECK#5\nif (Number.POSITIVE_INFINITY / -Number.MAX_VALUE !== Number.NEGATIVE_INFINITY) {\n $ERROR('#5: Infinity / -Number.MAX_VALUE === -Infinity. Actual: ' + (Infinity / -Number.MAX_VALUE));\n}\n\n//CHECK#6\nif (Number.NEGATIVE_INFINITY / Number.MIN_VALUE !== Number.NEGATIVE_INFINITY) {\n $ERROR('#6: -Infinity / Number.MIN_VALUE === -Infinity. Actual: ' + (-Infinity / Number.MIN_VALUE));\n}\n",
+ "id": "S11.5.2_A4_T5"
+ },
+ {
+ "section": "11.5.2",
+ "description": "Division of a finite value by an infinity results in zero of appropriate sign",
+ "test": "//CHECK#1\nif (1 / Number.NEGATIVE_INFINITY !== -0) {\n $ERROR('#1.1: 1 / -Infinity === 0. Actual: ' + (1 / -Infinity));\n} else {\n if (1 / (1 / Number.NEGATIVE_INFINITY) !== Number.NEGATIVE_INFINITY) {\n $ERROR('#1.2: 1 / -Infinity === - 0. Actual: +0');\n }\n}\n\n//CHECK#2\nif (-1 / Number.NEGATIVE_INFINITY !== +0) {\n $ERROR('#2.1: -1 / -Infinity === 0. Actual: ' + (-1 / -Infinity));\n} else {\n if (1 / (-1 / Number.NEGATIVE_INFINITY) !== Number.POSITIVE_INFINITY) {\n $ERROR('#2.2: -1 / -Infinity === + 0. Actual: -0');\n }\n}\n\n//CHECK#3\nif (1 / Number.POSITIVE_INFINITY !== +0) {\n $ERROR('#3.1: 1 / Infinity === 0. Actual: ' + (1 / Infinity));\n} else {\n if (1 / (1 / Number.POSITIVE_INFINITY) !== Number.POSITIVE_INFINITY) {\n $ERROR('#3.2: 1 / Infinity === + 0. Actual: -0');\n }\n}\n\n//CHECK#4\nif (-1 / Number.POSITIVE_INFINITY !== -0) {\n $ERROR('#4.1: -1 / Infinity === 0. Actual: ' + (-1 / Infinity));\n} else {\n if (1 / (-1 / Number.POSITIVE_INFINITY) !== Number.NEGATIVE_INFINITY) {\n $ERROR('#4.2: -1 / Infinity === - 0. Actual: +0');\n }\n}\n",
+ "id": "S11.5.2_A4_T6"
+ },
+ {
+ "section": "11.5.2",
+ "description": "Division of a zero by a zero results in NaN",
+ "test": "//CHECK#1\nif (isNaN(+0 / +0) !== true) {\n $ERROR('#1: +0 / +0 === Not-a-Number. Actual: ' + (+0 / +0));\n} \n\n//CHECK#2\nif (isNaN(-0 / +0) !== true) {\n $ERROR('#2: -0 / +0 === Not-a-Number. Actual: ' + (-0 / +0)); \n} \n\n//CHECK#3\nif (isNaN(+0 / -0) !== true) {\n $ERROR('#3: +0 / -0 === Not-a-Number. Actual: ' + (+0 / -0)); \n} \n\n//CHECK#4\nif (isNaN(-0 / -0) !== true) {\n $ERROR('#4: -0 / -0 === Not-a-Number. Actual: ' + (-0 / -0));\n} \n",
+ "id": "S11.5.2_A4_T7"
+ },
+ {
+ "section": "11.5.2",
+ "description": "Division of a zero by any non-zero finite value -0 results in zero of appropriate sign",
+ "test": "//CHECK#1\nif (-0 / 1 !== -0) {\n $ERROR('#1.1: -0 / 1 === 0. Actual: ' + (-0 / 1));\n} else {\n if (1 / (-0 / 1) !== Number.NEGATIVE_INFINITY) {\n $ERROR('#1.2: -0 / 1 === - 0. Actual: +0');\n }\n}\n\n//CHECK#2\nif (-0 / -1 !== +0) {\n $ERROR('#2.1: -0 / -1 === 0. Actual: ' + (-0 / -1));\n} else {\n if (1 / (-0 / -1) !== Number.POSITIVE_INFINITY) {\n $ERROR('#2.2: -0 / -1 === + 0. Actual: -0');\n }\n}\n\n//CHECK#3\nif (+0 / 1 !== +0) {\n $ERROR('#3.1: +0 / 1 === 0. Actual: ' + (+0 / 1));\n} else {\n if (1 / (+0 / -1) !== Number.NEGATIVE_INFINITY) {\n $ERROR('#3.2: +0 / -1 === + 0. Actual: -0');\n }\n}\n\n//CHECK#4\nif (+0 / -1 !== -0) {\n $ERROR('#4.1: +0 / -1 === 0. Actual: ' + (+0 / -1));\n} else {\n if (1 / (+0 / -1) !== Number.NEGATIVE_INFINITY) {\n $ERROR('#4.2: +0 / -1 === - 0. Actual: +0');\n }\n}\n\n//CHECK#5\nif (+0 / -Number.MAX_VALUE !== -0) {\n $ERROR('#5.1: 0 / -Number.MAX_VALUE === 0. Actual: ' + (0 / -Number.MAX_VALUE));\n} else {\n if (1 / (+0 / -Number.MAX_VALUE) !== Number.NEGATIVE_INFINITY) {\n $ERROR('#5.2: +0 / -Number.MAX_VALUE === - 0. Actual: +0');\n }\n}\n\n//CHECK#6\nif (-0 / Number.MIN_VALUE !== -0) {\n $ERROR('#6.1: -0 / Number.MIN_VALUE === 0. Actual: ' + (-0 / Number.MIN_VALUE));\n} else {\n if (1 / (-0 / Number.MIN_VALUE) !== Number.NEGATIVE_INFINITY) {\n $ERROR('#6.2: -0 / Number.MIN_VALUE === - 0. Actual: +0');\n }\n}\n",
+ "id": "S11.5.2_A4_T8"
+ },
+ {
+ "section": "11.5.2",
+ "description": "If the magnitude is too large to represent, the result is then an infinity of appropriate sign",
+ "test": "//CHECK#1\nif (Number.MAX_VALUE / 0.9 !== Number.POSITIVE_INFINITY) {\n $ERROR('#1: Number.MAX_VALUE / 0.9 === Number.POSITIVE_INFINITY. Actual: ' + (Number.MAX_VALUE / 0.9));\n}\n\n//CHECK#2\nif (Number.MAX_VALUE / -0.9 !== Number.NEGATIVE_INFINITY) {\n $ERROR('#2: Number.MAX_VALUE / -0.9 === Number.NEGATIVE_INFINITY. Actual: ' + (Number.MAX_VALUE / -0.9));\n} \n\n//CHECK#3\nif (Number.MAX_VALUE / 1 !== Number.MAX_VALUE) {\n $ERROR('#3: Number.MAX_VALUE / 1 === Number.MAX_VALUE. Actual: ' + (Number.MAX_VALUE / 1));\n}\n\n//CHECK#4\nif (Number.MAX_VALUE / -1 !== -Number.MAX_VALUE) {\n $ERROR('#4: Number.MAX_VALUE / -1 === -Number.MAX_VALUE. Actual: ' + (Number.MAX_VALUE / -1));\n} \n\n//CHECK#5\nif (Number.MAX_VALUE / (Number.MAX_VALUE / 0.9) === (Number.MAX_VALUE / Number.MAX_VALUE) / 0.9) {\n $ERROR('#5: Number.MAX_VALUE / (Number.MAX_VALUE / 0.9) !== (Number.MAX_VALUE / Number.MAX_VALUE) / 0.9');\n}\n",
+ "id": "S11.5.2_A4_T9"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/11.5.3_Applying_the_percent_Operator.json b/website/resources/scripts/testcases2/11.5.3_Applying_the_percent_Operator.json
new file mode 100644
index 000000000..47cb56c13
--- /dev/null
+++ b/website/resources/scripts/testcases2/11.5.3_Applying_the_percent_Operator.json
@@ -0,0 +1,194 @@
+{
+ "testCollection": {
+ "name": "11.5.3_Applying_the_percent_Operator",
+ "numTests": 31,
+ "tests": [
+ {
+ "section": "11.5.3, 7.2, 7.3",
+ "description": "Checking by using eval",
+ "test": "//CHECK#1\nif (eval(\"1\\u0009%\\u00091\") !== 0) {\n $ERROR('#1: 1\\\\u0009%\\\\u00091 === 0');\n}\n\n//CHECK#2\nif (eval(\"1\\u000B%\\u000B1\") !== 0) {\n $ERROR('#2: 1\\\\u000B%\\\\u000B1 === 0'); \n}\n\n//CHECK#3\nif (eval(\"1\\u000C%\\u000C1\") !== 0) {\n $ERROR('#3: 1\\\\u000C%\\\\u000C1 === 0');\n}\n\n//CHECK#4\nif (eval(\"1\\u0020%\\u00201\") !== 0) {\n $ERROR('#4: 1\\\\u0020%\\\\u00201 === 0');\n}\n\n//CHECK#5\nif (eval(\"1\\u00A0%\\u00A01\") !== 0) {\n $ERROR('#5: 1\\\\u00A0%\\\\u00A01 === 0');\n}\n\n//CHECK#6\nif (eval(\"1\\u000A%\\u000A1\") !== 0) {\n $ERROR('#6: 1\\\\u000A%\\\\u000A1 === 0'); \n}\n\n//CHECK#7\nif (eval(\"1\\u000D%\\u000D1\") !== 0) {\n $ERROR('#7: 1\\\\u000D%\\\\u000D1 === 0');\n}\n\n//CHECK#8\nif (eval(\"1\\u2028%\\u20281\") !== 0) {\n $ERROR('#8: 1\\\\u2028%\\\\u20281 === 0');\n}\n\n//CHECK#9\nif (eval(\"1\\u2029%\\u20291\") !== 0) {\n $ERROR('#9: 1\\\\u2029%\\\\u20291 === 0');\n}\n\n//CHECK#10\nif (eval(\"1\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u2029%\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u20291\") !== 0) {\n $ERROR('#10: 1\\\\u0009\\\\u000B\\\\u000C\\\\u0020\\\\u00A0\\\\u000A\\\\u000D\\\\u2028\\\\u2029%\\\\u0009\\\\u000B\\\\u000C\\\\u0020\\\\u00A0\\\\u000A\\\\u000D\\\\u2028\\\\u20291 === 0');\n}\n",
+ "id": "S11.5.3_A1"
+ },
+ {
+ "section": "11.5.3",
+ "description": "Either Type is not Reference or GetBase is not null",
+ "test": "//CHECK#1\nif (1 % 2 !== 1) {\n $ERROR('#1: 1 % 2 === 1. Actual: ' + (1 % 2));\n}\n\n//CHECK#2\nvar x = 1;\nif (x % 2 !== 1) {\n $ERROR('#2: var x = 1; x % 2 === 1. Actual: ' + (x % 2));\n}\n\n//CHECK#3\nvar y = 2;\nif (1 % y !== 1) {\n $ERROR('#3: var y = 2; 1 % y === 1. Actual: ' + (1 % y));\n}\n\n//CHECK#4\nvar x = 1;\nvar y = 2;\nif (x % y !== 1) {\n $ERROR('#4: var x = 1; var y = 2; x % y === 1. Actual: ' + (x % y));\n}\n\n//CHECK#5\nvar objectx = new Object();\nvar objecty = new Object();\nobjectx.prop = 1;\nobjecty.prop = 2;\nif (objectx.prop % objecty.prop !== 1) {\n $ERROR('#5: var objectx = new Object(); var objecty = new Object(); objectx.prop = 1; objecty.prop = 2; objectx.prop % objecty.prop === 1. Actual: ' + (objectx.prop % objecty.prop));\n}\n",
+ "id": "S11.5.3_A2.1_T1"
+ },
+ {
+ "section": "11.5.3",
+ "description": "If GetBase(x) is null, throw ReferenceError",
+ "test": "//CHECK#1\ntry {\n x % 1;\n $ERROR('#1.1: x % 1 throw ReferenceError. Actual: ' + (x % 1)); \n}\ncatch (e) {\n if ((e instanceof ReferenceError) !== true) {\n $ERROR('#1.2: x % 1 throw ReferenceError. Actual: ' + (e)); \n }\n}\n\n",
+ "id": "S11.5.3_A2.1_T2"
+ },
+ {
+ "section": "11.5.3",
+ "description": "If GetBase(y) is null, throw ReferenceError",
+ "test": "//CHECK#1\ntry {\n 1 % y;\n $ERROR('#1.1: 1 % y throw ReferenceError. Actual: ' + (1 % y)); \n}\ncatch (e) {\n if ((e instanceof ReferenceError) !== true) {\n $ERROR('#1.2: 1 % y throw ReferenceError. Actual: ' + (e)); \n }\n}\n",
+ "id": "S11.5.3_A2.1_T3"
+ },
+ {
+ "section": "11.5.3, 8.6.2.6",
+ "description": "If Type(value) is Object, evaluate ToPrimitive(value, Number)",
+ "test": "//CHECK#1\nif ({valueOf: function() {return 1}} % 2 !== 1) {\n $ERROR('#1: {valueOf: function() {return 1}} % 2 === 1. Actual: ' + ({valueOf: function() {return 1}} % 2));\n}\n\n//CHECK#2\nif ({valueOf: function() {return 1}, toString: function() {return 0}} % 2 !== 1) {\n $ERROR('#2: {valueOf: function() {return 1}, toString: function() {return 0}} % 2 === 1. Actual: ' + ({valueOf: function() {return 1}, toString: function() {return 0}} % 2));\n}\n\n//CHECK#3\nif ({valueOf: function() {return 1}, toString: function() {return {}}} % 2 !== 1) {\n $ERROR('#3: {valueOf: function() {return 1}, toString: function() {return {}}} % 2 === 1. Actual: ' + ({valueOf: function() {return 1}, toString: function() {return {}}} % 2));\n}\n\n//CHECK#4\ntry {\n if ({valueOf: function() {return 1}, toString: function() {throw \"error\"}} % 2 !== 1) {\n $ERROR('#4.1: {valueOf: function() {return 1}, toString: function() {throw \"error\"}} % 2 === 1. Actual: ' + ({valueOf: function() {return 1}, toString: function() {throw \"error\"}} % 2));\n }\n}\ncatch (e) {\n if (e === \"error\") {\n $ERROR('#4.2: {valueOf: function() {return 1}, toString: function() {throw \"error\"}} % 2 not throw \"error\"');\n } else {\n $ERROR('#4.3: {valueOf: function() {return 1}, toString: function() {throw \"error\"}} % 2 not throw Error. Actual: ' + (e));\n }\n}\n\n//CHECK#5\nif (1 % {toString: function() {return 2}} !== 1) {\n $ERROR('#5: 1 % {toString: function() {return 2}} === 1. Actual: ' + (1 % {toString: function() {return 2}}));\n}\n\n//CHECK#6\nif (1 % {valueOf: function() {return {}}, toString: function() {return 2}} !== 1) {\n $ERROR('#6: 1 % {valueOf: function() {return {}}, toString: function() {return 2}} === 1. Actual: ' + (1 % {valueOf: function() {return {}}, toString: function() {return 2}}));\n}\n\n//CHECK#7\ntry {\n 1 % {valueOf: function() {throw \"error\"}, toString: function() {return 2}};\n $ERROR('#7.1: 1 % {valueOf: function() {throw \"error\"}, toString: function() {return 2}} throw \"error\". Actual: ' + (1 % {valueOf: function() {throw \"error\"}, toString: function() {return 2}}));\n} \ncatch (e) {\n if (e !== \"error\") {\n $ERROR('#7.2: 1 % {valueOf: function() {throw \"error\"}, toString: function() {return 2}} throw \"error\". Actual: ' + (e));\n } \n}\n\n//CHECK#8\ntry {\n 1 % {valueOf: function() {return {}}, toString: function() {return {}}};\n $ERROR('#8.1: 1 % {valueOf: function() {return {}}, toString: function() {return {}}} throw TypeError. Actual: ' + (1 % {valueOf: function() {return {}}, toString: function() {return {}}}));\n} \ncatch (e) {\n if ((e instanceof TypeError) !== true) {\n $ERROR('#8.2: 1 % {valueOf: function() {return {}}, toString: function() {return {}}} throw TypeError. Actual: ' + (e));\n } \n}\n",
+ "id": "S11.5.3_A2.2_T1"
+ },
+ {
+ "section": "11.5.3",
+ "description": "Checking with \"throw\"",
+ "test": "//CHECK#1\nvar x = { valueOf: function () { throw \"x\"; } };\nvar y = { valueOf: function () { throw \"y\"; } };\ntry {\n x % y;\n $ERROR('#1.1: var x = { valueOf: function () { throw \"x\"; } }; var y = { valueOf: function () { throw \"y\"; } }; x % y throw \"x\". Actual: ' + (x % y));\n} catch (e) {\n if (e === \"y\") {\n $ERROR('#1.2: ToNumber(first expression) is called first, and then ToNumber(second expression)');\n } else {\n if (e !== \"x\") {\n $ERROR('#1.3: var x = { valueOf: function () { throw \"x\"; } }; var y = { valueOf: function () { throw \"y\"; } }; x % y throw \"x\". Actual: ' + (e));\n }\n }\n}\n",
+ "id": "S11.5.3_A2.3_T1"
+ },
+ {
+ "section": "11.5.3",
+ "description": "Checking with \"=\"",
+ "test": "//CHECK#1\nvar x = 0; \nif ((x = 1) % x !== 0) {\n $ERROR('#1: var x = 0; (x = 1) % x === 0. Actual: ' + ((x = 1) % x));\n}\n\n//CHECK#2\nvar x = 1; \nif (x % (x = 2) !== 1) {\n $ERROR('#2: var x = 1; x % (x = 2) === 1. Actual: ' + (x % (x = 2)));\n}\n\n",
+ "id": "S11.5.3_A2.4_T1"
+ },
+ {
+ "section": "11.5.3",
+ "description": "Checking with \"throw\"",
+ "test": "//CHECK#1\nvar x = function () { throw \"x\"; };\nvar y = function () { throw \"y\"; };\ntry {\n x() % y();\n $ERROR('#1.1: var x = function () { throw \"x\"; }; var y = function () { throw \"y\"; }; x() % y() throw \"x\". Actual: ' + (x() % y()));\n} catch (e) {\n if (e === \"y\") {\n $ERROR('#1.2: First expression is evaluated first, and then second expression');\n } else {\n if (e !== \"x\") {\n $ERROR('#1.3: var x = function () { throw \"x\"; }; var y = function () { throw \"y\"; }; x() % y() throw \"x\". Actual: ' + (e));\n }\n }\n}\n",
+ "id": "S11.5.3_A2.4_T2"
+ },
+ {
+ "section": "11.5.3",
+ "description": "Checking with undeclarated variables",
+ "test": "//CHECK#1\ntry {\n x % (x = 1);\n $ERROR('#1.1: x % (x = 1) throw ReferenceError. Actual: ' + (x % (x = 1))); \n}\ncatch (e) {\n if ((e instanceof ReferenceError) !== true) {\n $ERROR('#1.2: x % (x = 1) throw ReferenceError. Actual: ' + (e)); \n }\n}\n\n//CHECK#2\nif ((y = 1) % y !== 0) {\n $ERROR('#2: (y = 1) % y === 0. Actual: ' + ((y = 1) % y));\n}\n\n",
+ "id": "S11.5.3_A2.4_T3"
+ },
+ {
+ "section": "11.5.3",
+ "description": "Type(x) and Type(y) vary between primitive boolean and Boolean object",
+ "test": "//CHECK#1\nif (true % true !== 0) {\n $ERROR('#1: true % true === 0. Actual: ' + (true % true));\n}\n\n//CHECK#2\nif (new Boolean(true) % true !== 0) {\n $ERROR('#2: new Boolean(true) % true === 0. Actual: ' + (new Boolean(true) % true));\n}\n\n//CHECK#3\nif (true % new Boolean(true) !== 0) {\n $ERROR('#3: true % new Boolean(true) === 0. Actual: ' + (true % new Boolean(true)));\n}\n\n//CHECK#4\nif (new Boolean(true) % new Boolean(true) !== 0) {\n $ERROR('#4: new Boolean(true) % new Boolean(true) === 0. Actual: ' + (new Boolean(true) % new Boolean(true)));\n}\n",
+ "id": "S11.5.3_A3_T1.1"
+ },
+ {
+ "section": "11.5.3",
+ "description": "Type(x) and Type(y) vary between primitive number and Number object",
+ "test": "//CHECK#1\nif (1 % 1 !== 0) {\n $ERROR('#1: 1 % 1 === 0. Actual: ' + (1 % 1));\n}\n\n//CHECK#2\nif (new Number(1) % 1 !== 0) {\n $ERROR('#2: new Number(1) % 1 === 0. Actual: ' + (new Number(1) % 1));\n}\n\n//CHECK#3\nif (1 % new Number(1) !== 0) {\n $ERROR('#3: 1 % new Number(1) === 0. Actual: ' + (1 % new Number(1)));\n}\n\n//CHECK#4\nif (new Number(1) % new Number(1) !== 0) {\n $ERROR('#4: new Number(1) % new Number(1) === 0. Actual: ' + (new Number(1) % new Number(1)));\n}\n\n",
+ "id": "S11.5.3_A3_T1.2"
+ },
+ {
+ "section": "11.5.3",
+ "description": "Type(x) and Type(y) vary between primitive string and String object",
+ "test": "//CHECK#1\nif (\"1\" % \"1\" !== 0) {\n $ERROR('#1: \"1\" % \"1\" === 0. Actual: ' + (\"1\" % \"1\"));\n}\n\n//CHECK#2\nif (new String(\"1\") % \"1\" !== 0) {\n $ERROR('#2: new String(\"1\") % \"1\" === 0. Actual: ' + (new String(\"1\") % \"1\"));\n}\n\n//CHECK#3\nif (\"1\" % new String(\"1\") !== 0) {\n $ERROR('#3: \"1\" % new String(\"1\") === 0. Actual: ' + (\"1\" % new String(\"1\")));\n}\n\n//CHECK#4\nif (new String(\"1\") % new String(\"1\") !== 0) {\n $ERROR('#4: new String(\"1\") % new String(\"1\") === 0. Actual: ' + (new String(\"1\") % new String(\"1\")));\n}\n\n//CHECK#5\nif (isNaN(\"x\" % \"1\") !== true) {\n $ERROR('#5: \"x\" % \"1\" === Not-a-Number. Actual: ' + (\"x\" % \"1\"));\n}\n\n//CHECK#6\nif (isNaN(\"1\" % \"x\") !== true) {\n $ERROR('#6: \"1\" % \"x\" === Not-a-Number. Actual: ' + (\"1\" % \"x\"));\n}\n",
+ "id": "S11.5.3_A3_T1.3"
+ },
+ {
+ "section": "11.5.3",
+ "description": "Type(x) and Type(y) vary between Null and Undefined",
+ "test": "//CHECK#1\nif (isNaN(null % undefined) !== true) {\n $ERROR('#1: null % undefined === Not-a-Number. Actual: ' + (null % undefined));\n}\n\n//CHECK#2\nif (isNaN(undefined % null) !== true) {\n $ERROR('#2: undefined % null === Not-a-Number. Actual: ' + (undefined % null));\n}\n\n//CHECK#3\nif (isNaN(undefined % undefined) !== true) {\n $ERROR('#3: undefined % undefined === Not-a-Number. Actual: ' + (undefined % undefined));\n}\n\n//CHECK#4\nif (isNaN(null % null) !== true) {\n $ERROR('#4: null % null === Not-a-Number. Actual: ' + (null % null));\n}\n",
+ "id": "S11.5.3_A3_T1.4"
+ },
+ {
+ "section": "11.5.3",
+ "description": "Type(x) and Type(y) vary between Object object and Function object",
+ "test": "//CHECK#1\nif (isNaN({} % function(){return 1}) !== true) {\n $ERROR('#1: {} % function(){return 1} === Not-a-Number. Actual: ' + ({} % function(){return 1}));\n}\n\n//CHECK#2\nif (isNaN(function(){return 1} % {}) !== true) {\n $ERROR('#2: function(){return 1} % {} === Not-a-Number. Actual: ' + (function(){return 1} % {}));\n}\n\n//CHECK#3\nif (isNaN(function(){return 1} % function(){return 1}) !== true) {\n $ERROR('#3: function(){return 1} % function(){return 1} === Not-a-Number. Actual: ' + (function(){return 1} % function(){return 1}));\n}\n\n//CHECK#4\nif (isNaN({} % {}) !== true) {\n $ERROR('#4: {} % {} === Not-a-Number. Actual: ' + ({} % {}));\n}\n",
+ "id": "S11.5.3_A3_T1.5"
+ },
+ {
+ "section": "11.5.3",
+ "description": "Type(x) is different from Type(y) and both types vary between Number (primitive or object) and Boolean (primitive and object)",
+ "test": "//CHECK#1\nif (true % 1 !== 0) {\n $ERROR('#1: true % 1 === 0. Actual: ' + (true % 1));\n}\n\n//CHECK#2\nif (1 % true !== 0) {\n $ERROR('#2: 1 % true === 0. Actual: ' + (1 % true));\n}\n\n//CHECK#3\nif (new Boolean(true) % 1 !== 0) {\n $ERROR('#3: new Boolean(true) % 1 === 0. Actual: ' + (new Boolean(true) % 1));\n}\n\n//CHECK#4\nif (1 % new Boolean(true) !== 0) {\n $ERROR('#4: 1 % new Boolean(true) === 0. Actual: ' + (1 % new Boolean(true)));\n}\n\n//CHECK#5\nif (true % new Number(1) !== 0) {\n $ERROR('#5: true % new Number(1) === 0. Actual: ' + (true % new Number(1)));\n}\n\n//CHECK#6\nif (new Number(1) % true !== 0) {\n $ERROR('#6: new Number(1) % true === 0. Actual: ' + (new Number(1) % true));\n}\n\n//CHECK#7\nif (new Boolean(true) % new Number(1) !== 0) {\n $ERROR('#7: new Boolean(true) % new Number(1) === 0. Actual: ' + (new Boolean(true) % new Number(1)));\n}\n\n//CHECK#8\nif (new Number(1) % new Boolean(true) !== 0) {\n $ERROR('#8: new Number(1) % new Boolean(true) === 0. Actual: ' + (new Number(1) % new Boolean(true)));\n}\n",
+ "id": "S11.5.3_A3_T2.1"
+ },
+ {
+ "section": "11.5.3",
+ "description": "Type(x) is different from Type(y) and both types vary between Number (primitive or object) and String (primitive and object)",
+ "test": "//CHECK#1\nif (\"1\" % 1 !== 0) {\n $ERROR('#1: \"1\" % 1 === 0. Actual: ' + (\"1\" % 1));\n}\n\n//CHECK#2\nif (1 % \"1\" !== 0) {\n $ERROR('#2: 1 % \"1\" === 0. Actual: ' + (1 % \"1\"));\n}\n\n//CHECK#3\nif (new String(\"1\") % 1 !== 0) {\n $ERROR('#3: new String(\"1\") % 1 === 0. Actual: ' + (new String(\"1\") % 1));\n}\n\n//CHECK#4\nif (1 % new String(\"1\") !== 0) {\n $ERROR('#4: 1 % new String(\"1\") === 0. Actual: ' + (1 % new String(\"1\")));\n}\n\n//CHECK#5\nif (\"1\" % new Number(1) !== 0) {\n $ERROR('#5: \"1\" % new Number(1) === 0. Actual: ' + (\"1\" % new Number(1)));\n}\n\n//CHECK#6\nif (new Number(1) % \"1\" !== 0) {\n $ERROR('#6: new Number(1) % \"1\" === 0. Actual: ' + (new Number(1) % \"1\"));\n}\n\n//CHECK#7\nif (new String(\"1\") % new Number(1) !== 0) {\n $ERROR('#7: new String(\"1\") % new Number(1) === 0. Actual: ' + (new String(\"1\") % new Number(1)));\n}\n\n//CHECK#8\nif (new Number(1) % new String(\"1\") !== 0) {\n $ERROR('#8: new Number(1) % new String(\"1\") === 0. Actual: ' + (new Number(1) % new String(\"1\")));\n}\n\n//CHECK#9\nif (isNaN(\"x\" % 1) !== true) {\n $ERROR('#9: \"x\" % 1 === Not-a-Number. Actual: ' + (\"x\" % 1));\n}\n\n//CHECK#10\nif (isNaN(1 % \"x\") !== true) {\n $ERROR('#10: 1 % \"x\" === Not-a-Number. Actual: ' + (1 % \"x\"));\n}\n",
+ "id": "S11.5.3_A3_T2.2"
+ },
+ {
+ "section": "11.5.3",
+ "description": "Type(x) is different from Type(y) and both types vary between Number (primitive or object) and Null",
+ "test": "//CHECK#1\nif (isNaN(1 % null) !== true) {\n $ERROR('#1: 1 % null === Not-a-Number. Actual: ' + (1 % null));\n}\n\n//CHECK#2\nif (null % 1 !== 0) {\n $ERROR('#2: null % 1 === 0. Actual: ' + (null % 1));\n}\n\n//CHECK#3\nif (isNaN(new Number(1) % null) !== true) {\n $ERROR('#3: new Number(1) % null === Not-a-Number. Actual: ' + (new Number(1) % null));\n}\n\n//CHECK#4\nif (null % new Number(1) !== 0) {\n $ERROR('#4: null % new Number(1) === 0. Actual: ' + (null % new Number(1)));\n}\n",
+ "id": "S11.5.3_A3_T2.3"
+ },
+ {
+ "section": "11.5.3",
+ "description": "Type(x) is different from Type(y) and both types vary between Number (primitive or object) and Undefined",
+ "test": "//CHECK#1\nif (isNaN(1 % undefined) !== true) {\n $ERROR('#1: 1 % undefined === Not-a-Number. Actual: ' + (1 % undefined));\n}\n\n//CHECK#2\nif (isNaN(undefined % 1) !== true) {\n $ERROR('#2: undefined % 1 === Not-a-Number. Actual: ' + (undefined % 1));\n}\n\n//CHECK#3\nif (isNaN(new Number(1) % undefined) !== true) {\n $ERROR('#3: new Number(1) % undefined === Not-a-Number. Actual: ' + (new Number(1) % undefined));\n}\n\n//CHECK#4\nif (isNaN(undefined % new Number(1)) !== true) {\n $ERROR('#4: undefined % new Number(1) === Not-a-Number. Actual: ' + (undefined % new Number(1)));\n}\n",
+ "id": "S11.5.3_A3_T2.4"
+ },
+ {
+ "section": "11.5.3",
+ "description": "Type(x) is different from Type(y) and both types vary between String (primitive or object) and Boolean (primitive and object)",
+ "test": "//CHECK#1\nif (true % \"1\" !== 0) {\n $ERROR('#1: true % \"1\" === 0. Actual: ' + (true % \"1\"));\n}\n\n//CHECK#2\nif (\"1\" % true !== 0) {\n $ERROR('#2: \"1\" % true === 0. Actual: ' + (\"1\" % true));\n}\n\n//CHECK#3\nif (new Boolean(true) % \"1\" !== 0) {\n $ERROR('#3: new Boolean(true) % \"1\" === 0. Actual: ' + (new Boolean(true) % \"1\"));\n}\n\n//CHECK#4\nif (\"1\" % new Boolean(true) !== 0) {\n $ERROR('#4: \"1\" % new Boolean(true) === 0. Actual: ' + (\"1\" % new Boolean(true)));\n}\n\n//CHECK#5\nif (true % new String(\"1\") !== 0) {\n $ERROR('#5: true % new String(\"1\") === 0. Actual: ' + (true % new String(\"1\")));\n}\n\n//CHECK#6\nif (new String(\"1\") % true !== 0) {\n $ERROR('#6: new String(\"1\") % true === 0. Actual: ' + (new String(\"1\") % true));\n}\n\n//CHECK#7\nif (new Boolean(true) % new String(\"1\") !== 0) {\n $ERROR('#7: new Boolean(true) % new String(\"1\") === 0. Actual: ' + (new Boolean(true) % new String(\"1\")));\n}\n\n//CHECK#8\nif (new String(\"1\") % new Boolean(true) !== 0) {\n $ERROR('#8: new String(\"1\") % new Boolean(true) === 0. Actual: ' + (new String(\"1\") % new Boolean(true)));\n}\n",
+ "id": "S11.5.3_A3_T2.5"
+ },
+ {
+ "section": "11.5.3",
+ "description": "Type(x) is different from Type(y) and both types vary between String (primitive or object) and Undefined",
+ "test": "//CHECK#1\nif (isNaN(\"1\" % undefined) !== true) {\n $ERROR('#1: \"1\" % undefined === Not-a-Number. Actual: ' + (\"1\" % undefined));\n}\n\n//CHECK#2\nif (isNaN(undefined % \"1\") !== true) {\n $ERROR('#2: undefined % \"1\" === Not-a-Number. Actual: ' + (undefined % \"1\"));\n}\n\n//CHECK#3\nif (isNaN(new String(\"1\") % undefined) !== true) {\n $ERROR('#3: new String(\"1\") % undefined === Not-a-Number. Actual: ' + (new String(\"1\") % undefined));\n}\n\n//CHECK#4\nif (isNaN(undefined % new String(\"1\")) !== true) {\n $ERROR('#4: undefined % new String(\"1\") === Not-a-Number. Actual: ' + (undefined % new String(\"1\")));\n}\n",
+ "id": "S11.5.3_A3_T2.6"
+ },
+ {
+ "section": "11.5.3",
+ "description": "Type(x) is different from Type(y) and both types vary between String (primitive or object) and Null",
+ "test": "//CHECK#1\nif (isNaN(\"1\" % null) !== true) {\n $ERROR('#1: \"1\" % null === Not-a-Number. Actual: ' + (\"1\" % null));\n}\n\n//CHECK#2\nif (null % \"1\" !== 0) {\n $ERROR('#2: null % \"1\" === 0. Actual: ' + (null % \"1\"));\n}\n\n//CHECK#3\nif (isNaN(new String(\"1\") % null) !== true) {\n $ERROR('#3: new String(\"1\") % null === Not-a-Number. Actual: ' + (new String(\"1\") % null));\n}\n\n//CHECK#4\nif (null % new String(\"1\") !== 0) {\n $ERROR('#4: null % new String(\"1\") === 0. Actual: ' + (null % new String(\"1\")));\n}\n",
+ "id": "S11.5.3_A3_T2.7"
+ },
+ {
+ "section": "11.5.3",
+ "description": "Type(x) is different from Type(y) and both types vary between Boolean (primitive or object) and Undefined",
+ "test": "//CHECK#1\nif (isNaN(true % undefined) !== true) {\n $ERROR('#1: true % undefined === Not-a-Number. Actual: ' + (true % undefined));\n}\n\n//CHECK#2\nif (isNaN(undefined % true) !== true) {\n $ERROR('#2: undefined % true === Not-a-Number. Actual: ' + (undefined % true));\n}\n\n//CHECK#3\nif (isNaN(new Boolean(true) % undefined) !== true) {\n $ERROR('#3: new Boolean(true) % undefined === Not-a-Number. Actual: ' + (new Boolean(true) % undefined));\n}\n\n//CHECK#4\nif (isNaN(undefined % new Boolean(true)) !== true) {\n $ERROR('#4: undefined % new Boolean(true) === Not-a-Number. Actual: ' + (undefined % new Boolean(true)));\n}\n",
+ "id": "S11.5.3_A3_T2.8"
+ },
+ {
+ "section": "11.5.3",
+ "description": "Type(x) is different from Type(y) and both types vary between Boolean (primitive or object) and Null",
+ "test": "//CHECK#1\nif (isNaN(true % null) !== true) {\n $ERROR('#1: true % null === Not-a-Number. Actual: ' + (true % null));\n}\n\n//CHECK#2\nif (null % true !== 0) {\n $ERROR('#2: null % true === 0. Actual: ' + (null % true));\n}\n\n//CHECK#3\nif (isNaN(new Boolean(true) % null) !== true) {\n $ERROR('#3: new Boolean(true) % null === Not-a-Number. Actual: ' + (new Boolean(true) % null));\n}\n\n//CHECK#4\nif (null % new Boolean(true) !== 0) {\n $ERROR('#4: null % new Boolean(true) === 0. Actual: ' + (null % new Boolean(true)));\n}\n",
+ "id": "S11.5.3_A3_T2.9"
+ },
+ {
+ "section": "11.5.3",
+ "description": "If either operand is NaN, the result is NaN",
+ "test": "//CHECK#1\nif (isNaN(Number.NaN % Number.NaN) !== true) {\n $ERROR('#1: NaN % NaN === Not-a-Number. Actual: ' + (NaN % NaN));\n} \n\n//CHECK#2\nif (isNaN(Number.NaN % +0) !== true) {\n $ERROR('#2: NaN % +0 === Not-a-Number. Actual: ' + (NaN % +0)); \n} \n\n//CHECK#3\nif (isNaN(Number.NaN % -0) !== true) {\n $ERROR('#3: NaN % -0 === Not-a-Number. Actual: ' + (NaN % -0)); \n} \n\n//CHECK#4\nif (isNaN(Number.NaN % Number.POSITIVE_INFINITY) !== true) {\n $ERROR('#4: NaN % Infinity === Not-a-Number. Actual: ' + (NaN % Infinity));\n} \n\n//CHECK#5\nif (isNaN(Number.NaN % Number.NEGATIVE_INFINITY) !== true) {\n $ERROR('#5: NaN % -Infinity === Not-a-Number. Actual: ' + (NaN % -Infinity)); \n} \n\n//CHECK#6\nif (isNaN(Number.NaN % Number.MAX_VALUE) !== true) {\n $ERROR('#6: NaN % Number.MAX_VALUE === Not-a-Number. Actual: ' + (NaN % Number.MAX_VALUE));\n} \n\n//CHECK#7\nif (isNaN(Number.NaN % Number.MIN_VALUE) !== true) {\n $ERROR('#7: NaN % Number.MIN_VALUE === Not-a-Number. Actual: ' + (NaN % Number.MIN_VALUE)); \n}\n\n//CHECK#8\nif (isNaN(Number.NaN % 1) !== true) {\n $ERROR('#8: NaN % 1 === Not-a-Number. Actual: ' + (NaN % 1)); \n}\n",
+ "id": "S11.5.3_A4_T1.1"
+ },
+ {
+ "section": "11.5.3",
+ "description": "If either operand is NaN, the result is NaN",
+ "test": "//CHECK#1\nif (isNaN(Number.NaN % Number.NaN) !== true) {\n $ERROR('#1: NaN % NaN === Not-a-Number. Actual: ' + (NaN % NaN));\n} \n\n//CHECK#2\nif (isNaN(+0 % Number.NaN) !== true) {\n $ERROR('#2: +0 % NaN === Not-a-Number. Actual: ' + (+0 % NaN)); \n} \n\n//CHECK#3\nif (isNaN(-0 % Number.NaN) !== true) {\n $ERROR('#3: -0 % NaN === Not-a-Number. Actual: ' + (-0 % NaN)); \n} \n\n//CHECK#4\nif (isNaN(Number.POSITIVE_INFINITY % Number.NaN) !== true) {\n $ERROR('#4: Infinity % NaN === Not-a-Number. Actual: ' + (Infinity % NaN));\n} \n\n//CHECK#5\nif (isNaN(Number.NEGATIVE_INFINITY % Number.NaN) !== true) {\n $ERROR('#5: -Infinity % NaN === Not-a-Number. Actual: ' + ( -Infinity % NaN)); \n} \n\n//CHECK#6\nif (isNaN(Number.MAX_VALUE % Number.NaN) !== true) {\n $ERROR('#6: Number.MAX_VALUE % NaN === Not-a-Number. Actual: ' + (Number.MAX_VALUE % NaN));\n} \n\n//CHECK#7\nif (isNaN(Number.MIN_VALUE % Number.NaN) !== true) {\n $ERROR('#7: Number.MIN_VALUE % NaN === Not-a-Number. Actual: ' + (Number.MIN_VALUE % NaN)); \n}\n\n//CHECK#8\nif (isNaN(1 % Number.NaN) !== true) {\n $ERROR('#8: 1 % NaN === Not-a-Number. Actual: ' + (1 % NaN)); \n}\n",
+ "id": "S11.5.3_A4_T1.2"
+ },
+ {
+ "section": "11.5.3",
+ "description": "The sign of the finite non-zero value result equals the sign of the divided",
+ "test": "//CHECK#1\nif (1 % 1 !== 0) {\n $ERROR('#1.1: 1 % 1 === 0. Actual: ' + (1 % 1));\n} else {\n if (1 / (1 % 1) !== Number.POSITIVE_INFINITY) {\n $ERROR('#1.2: 1 % 1 === + 0. Actual: -0');\n }\n}\n\n//CHECK#2\nif (-1 % -1 !== -0) {\n $ERROR('#2.1: -1 % -1 === 0. Actual: ' + (-1 % -1));\n} else {\n if (1 / (-1 % -1) !== Number.NEGATIVE_INFINITY) {\n $ERROR('#2.2: -1 % -1 === - 0. Actual: +0');\n }\n}\n\n//CHECK#3\nif (-1 % 1 !== -0) {\n $ERROR('#3.1: -1 % 1 === 0. Actual: ' + (-1 % 1));\n} else {\n if (1 / (-1 % 1) !== Number.NEGATIVE_INFINITY) {\n $ERROR('#3.2: -1 % 1 === - 0. Actual: +0');\n }\n}\n\n//CHECK#4\nif (1 % -1 !== 0) {\n $ERROR('#4.1: 1 % -1 === 0. Actual: ' + (1 % -1));\n} else {\n if (1 / (1 % -1) !== Number.POSITIVE_INFINITY) {\n $ERROR('#4.2: 1 % -1 === + 0. Actual: -0');\n }\n}\n\n//CHECK#5\nif (101 % 51 !== 50) {\n $ERROR('#5: 101 % 51 === 50. Actual: ' + (101 % 51));\n}\n\n//CHECK#6\nif (101 % -51 !== 50) {\n $ERROR('#6: 101 % -51 === 50. Actual: ' + (101 % -51));\n}\n\n//CHECK#7\nif (-101 % 51 !== -50) {\n $ERROR('#7: -101 % 51 === -50. Actual: ' + (-101 % 51));\n}\n\n//CHECK#8\nif (-101 % -51 !== -50) {\n $ERROR('#8: -101 % -51 === -50. Actual: ' + (-101 % -51));\n}\n",
+ "id": "S11.5.3_A4_T2"
+ },
+ {
+ "section": "11.5.3",
+ "description": "If the dividend is an infinity results is NaN",
+ "test": "//CHECK#1\nif (isNaN(Number.NEGATIVE_INFINITY % Number.POSITIVE_INFINITY) !== true) {\n $ERROR('#1: -Infinity % Infinity === Not-a-Number. Actual: ' + (-Infinity % Infinity));\n}\n\n//CHECK#2\nif (isNaN(Number.NEGATIVE_INFINITY % Number.NEGATIVE_INFINITY) !== true) {\n $ERROR('#2: -Infinity % -Infinity === Not-a-Number. Actual: ' + (-Infinity % -Infinity));\n}\n\n//CHECK#3\nif (isNaN(Number.POSITIVE_INFINITY % Number.POSITIVE_INFINITY) !== true) {\n $ERROR('#3: Infinity % Infinity === Not-a-Number. Actual: ' + (Infinity % Infinity));\n}\n\n//CHECK#4\nif (isNaN(Number.POSITIVE_INFINITY % Number.NEGATIVE_INFINITY) !== true) {\n $ERROR('#4: Infinity % -Infinity === Not-a-Number. Actual: ' + (Infinity % -Infinity));\n}\n\n//CHECK#5\nif (isNaN(Number.NEGATIVE_INFINITY % 1) !== true) {\n $ERROR('#5: Infinity % 1 === Not-a-Number. Actual: ' + (Infinity % 1));\n}\n\n//CHECK#6\nif (isNaN(Number.NEGATIVE_INFINITY % -1) !== true) {\n $ERROR('#6: -Infinity % -1 === Not-a-Number. Actual: ' + (-Infinity % -1));\n}\n\n//CHECK#7\nif (isNaN(Number.POSITIVE_INFINITY % 1) !== true) {\n $ERROR('#7: Infinity % 1 === Not-a-Number. Actual: ' + (Infinity % 1));\n}\n\n//CHECK#8\nif (isNaN(Number.POSITIVE_INFINITY % -1) !== true) {\n $ERROR('#8: Infinity % -1 === Not-a-Number. Actual: ' + (Infinity % -1));\n}\n\n//CHECK#9\nif (isNaN(Number.NEGATIVE_INFINITY % Number.MAX_VALUE) !== true) {\n $ERROR('#9: Infinity % Number.MAX_VALUE === Not-a-Number. Actual: ' + (Infinity % Number.MAX_VALUE));\n}\n\n//CHECK#10\nif (isNaN(Number.NEGATIVE_INFINITY % -Number.MAX_VALUE) !== true) {\n $ERROR('#10: -Infinity % -Number.MAX_VALUE === Not-a-Number. Actual: ' + (-Infinity % -Number.MAX_VALUE));\n}\n\n//CHECK#11\nif (isNaN(Number.POSITIVE_INFINITY % Number.MAX_VALUE) !== true) {\n $ERROR('#11: Infinity % Number.MAX_VALUE === Not-a-Number. Actual: ' + (Infinity % Number.MAX_VALUE));\n}\n\n//CHECK#12\nif (isNaN(Number.POSITIVE_INFINITY % -Number.MAX_VALUE) !== true) {\n $ERROR('#12: Infinity % -Number.MAX_VALUE === Not-a-Number. Actual: ' + (Infinity % -Number.MAX_VALUE));\n}\n",
+ "id": "S11.5.3_A4_T3"
+ },
+ {
+ "section": "11.5.3",
+ "description": "If the divisor is zero results is NaN",
+ "test": "//CHECK#1\nif (isNaN(-0 % 0) !== true) {\n $ERROR('#1: -0 % 0 === Not-a-Number. Actual: ' + (-0 % 0));\n}\n\n//CHECK#2\nif (isNaN(-0 % -0) !== true) {\n $ERROR('#2: -0 % -0 === Not-a-Number. Actual: ' + (-0 % -0));\n}\n\n//CHECK#3\nif (isNaN(0 % 0) !== true) {\n $ERROR('#3: 0 % 0 === Not-a-Number. Actual: ' + (0 % 0));\n}\n\n//CHECK#4\nif (isNaN(0 % -0) !== true) {\n $ERROR('#4: 0 % -0 === Not-a-Number. Actual: ' + (0 % -0));\n}\n\n//CHECK#5\nif (isNaN(-1 % 0) !== true) {\n $ERROR('#5: 1 % 0 === Not-a-Number. Actual: ' + (1 % 0));\n}\n\n//CHECK#6\nif (isNaN(-1 % -0) !== true) {\n $ERROR('#6: -1 % -0 === Not-a-Number. Actual: ' + (-1 % -0));\n}\n\n//CHECK#7\nif (isNaN(1 % 0) !== true) {\n $ERROR('#7: 1 % 0 === Not-a-Number. Actual: ' + (1 % 0));\n}\n\n//CHECK#8\nif (isNaN(1 % -0) !== true) {\n $ERROR('#8: 1 % -0 === Not-a-Number. Actual: ' + (1 % -0));\n}\n\n//CHECK#9\nif (isNaN(Number.NEGATIVE_INFINITY % 0) !== true) {\n $ERROR('#9: Infinity % 0 === Not-a-Number. Actual: ' + (Infinity % 0));\n}\n\n//CHECK#10\nif (isNaN(Number.NEGATIVE_INFINITY % -0) !== true) {\n $ERROR('#10: -Infinity % -0 === Not-a-Number. Actual: ' + (-Infinity % -0));\n}\n\n//CHECK#11\nif (isNaN(Number.POSITIVE_INFINITY % 0) !== true) {\n $ERROR('#11: Infinity % 0 === Not-a-Number. Actual: ' + (Infinity % 0));\n}\n\n//CHECK#12\nif (isNaN(Number.POSITIVE_INFINITY % -0) !== true) {\n $ERROR('#12: Infinity % -0 === Not-a-Number. Actual: ' + (Infinity % -0));\n}\n\n//CHECK#13\nif (isNaN(Number.MIN_VALUE % 0) !== true) {\n $ERROR('#13: Number.MIN_VALUE % 0 === Not-a-Number. Actual: ' + (Number.MIN_VALUE % 0));\n}\n\n//CHECK#14\nif (isNaN(Number.MIN_VALUE % -0) !== true) {\n $ERROR('#14: -Number.MIN_VALUE % -0 === Not-a-Number. Actual: ' + (-Number.MIN_VALUE % -0));\n}\n\n//CHECK#15\nif (isNaN(Number.MAX_VALUE % 0) !== true) {\n $ERROR('#15: Number.MAX_VALUE % 0 === Not-a-Number. Actual: ' + (Number.MAX_VALUE % 0));\n}\n\n//CHECK#16\nif (isNaN(Number.MAX_VALUE % -0) !== true) {\n $ERROR('#16: Number.MAX_VALUE % -0 === Not-a-Number. Actual: ' + (Number.MAX_VALUE % -0));\n}\n",
+ "id": "S11.5.3_A4_T4"
+ },
+ {
+ "section": "11.5.3",
+ "description": "If dividend is finite and the divisor is an infinity, the result equals the dividend",
+ "test": "//CHECK#1\nif (1 % Number.NEGATIVE_INFINITY !== 1) {\n $ERROR('#1: 1 % -Infinity === 1. Actual: ' + (1 % -Infinity));\n}\n//CHECK#2\nif (1 % Number.POSITIVE_INFINITY !==1) {\n $ERROR('#2: 1 % Infinity === 1. Actual: ' + (1 % Infinity));\n}\n\n//CHECK#3\nif (-1 % Number.POSITIVE_INFINITY !== -1) {\n $ERROR('#3: -1 % Infinity === -1. Actual: ' + (-1 % Infinity));\n}\n\n//CHECK#4\nif (-1 % Number.NEGATIVE_INFINITY !== -1) {\n $ERROR('#4: -1 % -Infinity === -1. Actual: ' + (-1 % -Infinity));\n}\n\n//CHECK#5\nif (0 % Number.POSITIVE_INFINITY !== 0) {\n $ERROR('#5.1: 0 % Infinity === 0. Actual: ' + (0 % Infinity));\n} else {\n if (1 / (0 % Number.POSITIVE_INFINITY) !== Number.POSITIVE_INFINITY) {\n $ERROR('#5.2: 0 % Infinity === + 0. Actual: -0');\n }\n}\n\n//CHECK#6\nif (0 % Number.NEGATIVE_INFINITY !== 0) {\n $ERROR('#6.1: 0 % -Infinity === 0. Actual: ' + (0 % -Infinity));\n} else {\n if (1 / (0 % Number.NEGATIVE_INFINITY) !== Number.POSITIVE_INFINITY) {\n $ERROR('#6.2: 0 % -Infinity === + 0. Actual: -0');\n }\n}\n\n//CHECK#7\nif (-0 % Number.POSITIVE_INFINITY !== -0) {\n $ERROR('#7.1: -0 % Infinity === 0. Actual: ' + (-0 % Infinity));\n} else {\n if (1 / (-0 % Number.POSITIVE_INFINITY) !== Number.NEGATIVE_INFINITY) {\n $ERROR('#7.2: -0 % Infinity === - 0. Actual: +0');\n }\n}\n\n//CHECK#8\nif (-0 % Number.NEGATIVE_INFINITY !== -0) {\n $ERROR('#8.1: -0 % -Infinity === 0. Actual: ' + (-0 % -Infinity));\n} else {\n if (1 / (-0 % Number.NEGATIVE_INFINITY) !== Number.NEGATIVE_INFINITY) {\n $ERROR('#8.2: -0 % -Infinity === - 0. Actual: +0');\n }\n}\n\n//CHECK#9\nif (Number.MAX_VALUE % Number.NEGATIVE_INFINITY !== Number.MAX_VALUE) {\n $ERROR('#9: Number.MAX_VALUE % -Infinity === Number.MAX_VALUE. Actual: ' + (Number.MAX_VALUE % -Infinity));\n}\n\n//CHECK#10\nif (Number.MAX_VALUE % Number.POSITIVE_INFINITY !== Number.MAX_VALUE) {\n $ERROR('#10: Number.MAX_VALUE % Infinity === Number.MAX_VALUE. Actual: ' + (Number.MAX_VALUE % Infinity));\n}\n\n//CHECK#11\nif (-Number.MAX_VALUE % Number.POSITIVE_INFINITY !== -Number.MAX_VALUE) {\n $ERROR('#11: -Number.MAX_VALUE % Infinity === -Number.MAX_VALUE. Actual: ' + (-Number.MAX_VALUE % Infinity));\n}\n\n//CHECK#12\nif (-Number.MAX_VALUE % Number.NEGATIVE_INFINITY !== -Number.MAX_VALUE) {\n $ERROR('#12: -Number.MAX_VALUE % -Infinity === -Number.MAX_VALUE. Actual: ' + (-Number.MAX_VALUE % -Infinity));\n}\n\n//CHECK#13\nif (Number.MIN_VALUE % Number.NEGATIVE_INFINITY !== Number.MIN_VALUE) {\n $ERROR('#13: Number.MIN_VALUE % -Infinity === Number.MIN_VALUE. Actual: ' + (Number.MIN_VALUE % -Infinity));\n}\n//CHECK#14\nif (Number.MIN_VALUE % Number.POSITIVE_INFINITY !== Number.MIN_VALUE) {\n $ERROR('#14: Number.MIN_VALUE % Infinity === Number.MIN_VALUE. Actual: ' + (Number.MIN_VALUE % Infinity));\n}\n\n//CHECK#15\nif (-Number.MIN_VALUE % Number.POSITIVE_INFINITY !== -Number.MIN_VALUE) {\n $ERROR('#15: -Number.MIN_VALUE % Infinity === -Number.MIN_VALUE. Actual: ' + (-Number.MIN_VALUE % Infinity));\n}\n\n//CHECK#16\nif (-Number.MIN_VALUE % Number.NEGATIVE_INFINITY !== -Number.MIN_VALUE) {\n $ERROR('#16: -Number.MIN_VALUE % -Infinity === -Number.MIN_VALUE. Actual: ' + (-Number.MIN_VALUE % -Infinity));\n}\n",
+ "id": "S11.5.3_A4_T5"
+ },
+ {
+ "section": "11.5.3",
+ "description": "If dividend is a zero and the divisor is nonzero finite, the result equals the dividend",
+ "test": "//CHECK#1\nif (0 % 1 !== 0) {\n $ERROR('#1.1: 0 % 1 === 0. Actual: ' + (0 % 1));\n} else {\n if (1 / (0 % 1) !== Number.POSITIVE_INFINITY) {\n $ERROR('#1.2: 0 % 1 === + 0. Actual: -0');\n }\n}\n\n//CHECK#2\nif (0 % -1 !== 0) {\n $ERROR('#2.1: 0 % -1 === 0. Actual: ' + (0 % -1));\n} else {\n if (1 / (0 % -1) !== Number.POSITIVE_INFINITY) {\n $ERROR('#2.2: 0 % -1 === + 0. Actual: -0');\n }\n}\n\n//CHECK#3\nif (-0 % 1 !== -0) {\n $ERROR('#3.1: -0 % 1 === 0. Actual: ' + (-0 % 1));\n} else {\n if (1 / (-0 % 1) !== Number.NEGATIVE_INFINITY) {\n $ERROR('#3.2: -0 % 1 === - 0. Actual: +0');\n }\n}\n\n//CHECK#4\nif (-0 % -1 !== -0) {\n $ERROR('#4.1: -0 % -1 === 0. Actual: ' + (-0 % -1));\n} else {\n if (1 / (-0 % -1) !== Number.NEGATIVE_INFINITY) {\n $ERROR('#4.2: 0 % -1 === - 0. Actual: +0');\n }\n}\n\n//CHECK#5\nif (0 % Number.MAX_VALUE !== 0) {\n $ERROR('#5.1: 0 % Number.MAX_VALUE === 0. Actual: ' + (0 % Number.MAX_VALUE));\n} else {\n if (1 / (0 % Number.MAX_VALUE) !== Number.POSITIVE_INFINITY) {\n $ERROR('#5.2: 0 % Number.MAX_VALUE === + 0. Actual: -0');\n }\n}\n\n//CHECK#6\nif (0 % Number.MIN_VALUE !== 0) {\n $ERROR('#6.1: 0 % Number.MIN_VALUE === 0. Actual: ' + (0 % Number.MIN_VALUE));\n} else {\n if (1 / (0 % Number.MIN_VALUE) !== Number.POSITIVE_INFINITY) {\n $ERROR('#6.2: 0 % Number.MIN_VALUE === + 0. Actual: -0');\n }\n}\n\n//CHECK#7\nif (-0 % Number.MAX_VALUE !== -0) {\n $ERROR('#7.1: -0 % Number.MAX_VALUE === 0. Actual: ' + (-0 % Number.MAX_VALUE));\n} else {\n if (1 / (-0 % Number.MAX_VALUE) !== Number.NEGATIVE_INFINITY) {\n $ERROR('#7.2: -0 % Number.MAX_VALUE === - 0. Actual: +0');\n }\n}\n\n//CHECK#8\nif (-0 % Number.MIN_VALUE !== -0) {\n $ERROR('#8.1: -0 % Number.MIN_VALUE === 0. Actual: ' + (-0 % Number.MIN_VALUE));\n} else {\n if (1 / (-0 % Number.MIN_VALUE) !== Number.NEGATIVE_INFINITY) {\n $ERROR('#8.2: 0 % Number.MIN_VALUE === - 0. Actual: +0');\n }\n}\n",
+ "id": "S11.5.3_A4_T6"
+ },
+ {
+ "section": "11.5.3, 15.8.2.9",
+ "description": "If operands neither an infinity, nor a zero, nor NaN, return x - truncate(x / y) * y",
+ "test": "function truncate(x) {\n if (x > 0) {\n return Math.floor(x);\n } else {\n return Math.ceil(x);\n }\n}\n\n//CHECK#1\nx = 1.3; \ny = 1.1;\nif (x % y !== 0.19999999999999996) {\n $ERROR('#1: x = 1.3; y = 1.1; x % y === 0.19999999999999996. Actual: ' + (x % y));\n}\n\n//CHECK#2\nx = -1.3; \ny = 1.1; \nif (x % y !== -0.19999999999999996) {\n $ERROR('#2: x = -1.3; y = 1.1; x % y === -0.19999999999999996. Actual: ' + (x % y));\n}\n\n//CHECK#3\nx = 1.3; \ny = -1.1;\nif (x % y !== 0.19999999999999996) {\n $ERROR('#3: x = 1.3; y = -1.1; x % y === 0.19999999999999996. Actual: ' + (x % y));\n}\n\n//CHECK#4\nx = -1.3; \ny = -1.1;\nif (x % y !== -0.19999999999999996) {\n $ERROR('#4: x = -1.3; y = -1.1; x % y === -0.19999999999999996. Actual: ' + (x % y));\n}\n\n//CHECK#5\nx = 1.3; \ny = 1.1;\nif (x % y !== x - truncate(x / y) * y) {\n $ERROR('#5: x = 1.3; y = 1.1; x % y === x - truncate(x / y) * y. Actual: ' + (x % y));\n}\n\n//CHECK#6\nx = -1.3; \ny = 1.1; \nif (x % y !== x - truncate(x / y) * y) {\n $ERROR('#6: x = -1.3; y = 1.1; x % y === x - truncate(x / y) * y. Actual: ' + (x % y));\n}\n\n//CHECK#7\nx = 1.3; \ny = -1.1;\nif (x % y !== x - truncate(x / y) * y) {\n $ERROR('#7: x = 1.3; y = -1.1; x % y === x - truncate(x / y) * y. Actual: ' + (x % y));\n}\n\n//CHECK#8\nx = -1.3; \ny = -1.1;\nif (x % y !== x - truncate(x / y) * y) {\n $ERROR('#8: x = -1.3; y = -1.1; x % y === x - truncate(x / y) * y. Actual: ' + (x % y));\n}\n",
+ "id": "S11.5.3_A4_T7"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/11.6.1_The_Addition_operator.json b/website/resources/scripts/testcases2/11.6.1_The_Addition_operator.json
new file mode 100644
index 000000000..4b9096716
--- /dev/null
+++ b/website/resources/scripts/testcases2/11.6.1_The_Addition_operator.json
@@ -0,0 +1,212 @@
+{
+ "testCollection": {
+ "name": "11.6.1_The_Addition_operator",
+ "numTests": 34,
+ "tests": [
+ {
+ "section": "11.6.1, 7.2, 7.3",
+ "description": "Checking by using eval",
+ "test": "//CHECK#1\nif (eval(\"1\\u0009+\\u00091\") !== 2) {\n $ERROR('#1: 1\\\\u0009+\\\\u00091 === 2');\n}\n\n//CHECK#2\nif (eval(\"1\\u000B+\\u000B1\") !== 2) {\n $ERROR('#2: 1\\\\u000B+\\\\u000B1 === 2'); \n}\n\n//CHECK#3\nif (eval(\"1\\u000C+\\u000C1\") !== 2) {\n $ERROR('#3: 1\\\\u000C+\\\\u000C1 === 2');\n}\n\n//CHECK#4\nif (eval(\"1\\u0020+\\u00201\") !== 2) {\n $ERROR('#4: 1\\\\u0020+\\\\u00201 === 2');\n}\n\n//CHECK#5\nif (eval(\"1\\u00A0+\\u00A01\") !== 2) {\n $ERROR('#5: 1\\\\u00A0+\\\\u00A01 === 2');\n}\n\n//CHECK#6\nif (eval(\"1\\u000A+\\u000A1\") !== 2) {\n $ERROR('#6: 1\\\\u000A+\\\\u000A1 === 2'); \n}\n\n//CHECK#7\nif (eval(\"1\\u000D+\\u000D1\") !== 2) {\n $ERROR('#7: 1\\\\u000D+\\\\u000D1 === 2');\n}\n\n//CHECK#8\nif (eval(\"1\\u2028+\\u20281\") !== 2) {\n $ERROR('#8: 1\\\\u2028+\\\\u20281 === 2');\n}\n\n//CHECK#9\nif (eval(\"1\\u2029+\\u20291\") !== 2) {\n $ERROR('#9: 1\\\\u2029+\\\\u20291 === 2');\n}\n\n//CHECK#10\nif (eval(\"1\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u2029+\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u20291\") !== 2) {\n $ERROR('#10: 1\\\\u0009\\\\u000B\\\\u000C\\\\u0020\\\\u00A0\\\\u000A\\\\u000D\\\\u2028\\\\u2029+\\\\u0009\\\\u000B\\\\u000C\\\\u0020\\\\u00A0\\\\u000A\\\\u000D\\\\u2028\\\\u20291 === 2');\n}\n",
+ "id": "S11.6.1_A1"
+ },
+ {
+ "section": "11.6.1",
+ "description": "Either Type is not Reference or GetBase is not null",
+ "test": "//CHECK#1\nif (1 + 1 !== 2) {\n $ERROR('#1: 1 + 1 === 2. Actual: ' + (1 + 1));\n}\n\n//CHECK#2\nvar x = 1;\nif (x + 1 !== 2) {\n $ERROR('#2: var x = 1; x + 1 === 2. Actual: ' + (x + 1));\n}\n\n//CHECK#3\nvar y = 1;\nif (1 + y !== 2) {\n $ERROR('#3: var y = 1; 1 + y === 2. Actual: ' + (1 + y));\n}\n\n//CHECK#4\nvar x = 1;\nvar y = 1;\nif (x + y !== 2) {\n $ERROR('#4: var x = 1; var y = 1; x + y === 2. Actual: ' + (x + y));\n}\n\n//CHECK#5\nvar objectx = new Object();\nvar objecty = new Object();\nobjectx.prop = 1;\nobjecty.prop = 1;\nif (objectx.prop + objecty.prop !== 2) {\n $ERROR('#5: var objectx = new Object(); var objecty = new Object(); objectx.prop = 1; objecty.prop = 1; objectx.prop + objecty.prop === 2. Actual: ' + (objectx.prop + objecty.prop));\n}\n",
+ "id": "S11.6.1_A2.1_T1"
+ },
+ {
+ "section": "11.6.1",
+ "description": "If GetBase(x) is null, throw ReferenceError",
+ "test": "//CHECK#1\ntry {\n x + 1;\n $ERROR('#1.1: x + 1 throw ReferenceError. Actual: ' + (x + 1)); \n}\ncatch (e) {\n if ((e instanceof ReferenceError) !== true) {\n $ERROR('#1.2: x + 1 throw ReferenceError. Actual: ' + (e)); \n }\n}\n\n",
+ "id": "S11.6.1_A2.1_T2"
+ },
+ {
+ "section": "11.6.1",
+ "description": "If GetBase(y) is null, throw ReferenceError",
+ "test": "//CHECK#1\ntry {\n 1 + y;\n $ERROR('#1.1: 1 + y throw ReferenceError. Actual: ' + (1 + y)); \n}\ncatch (e) {\n if ((e instanceof ReferenceError) !== true) {\n $ERROR('#1.2: 1 + y throw ReferenceError. Actual: ' + (e)); \n }\n}\n\n",
+ "id": "S11.6.1_A2.1_T3"
+ },
+ {
+ "section": "11.6.1, 8.6.2.6",
+ "description": "If Type(value) is Object, evaluate ToPrimitive(value, Number)",
+ "test": "//CHECK#1\nif ({valueOf: function() {return 1}} + 1 !== 2) {\n $ERROR('#1: {valueOf: function() {return 1}} + 1 === 2. Actual: ' + ({valueOf: function() {return 1}} + 1));\n}\n\n//CHECK#2\nif ({valueOf: function() {return 1}, toString: function() {return 0}} + 1 !== 2) {\n $ERROR('#2: {valueOf: function() {return 1}, toString: function() {return 0}} + 1 === 2. Actual: ' + ({valueOf: function() {return 1}, toString: function() {return 0}} + 1));\n}\n\n//CHECK#3\nif ({valueOf: function() {return 1}, toString: function() {return {}}} + 1 !== 2) {\n $ERROR('#3: {valueOf: function() {return 1}, toString: function() {return {}}} + 1 === 2. Actual: ' + ({valueOf: function() {return 1}, toString: function() {return {}}} + 1));\n}\n\n//CHECK#4\ntry {\n if ({valueOf: function() {return 1}, toString: function() {throw \"error\"}} + 1 !== 2) {\n $ERROR('#4.1: {valueOf: function() {return 1}, toString: function() {throw \"error\"}} + 1 === 2. Actual: ' + ({valueOf: function() {return 1}, toString: function() {throw \"error\"}} + 1));\n }\n}\ncatch (e) {\n if (e === \"error\") {\n $ERROR('#4.2: {valueOf: function() {return 1}, toString: function() {throw \"error\"}} + 1 not throw \"error\"');\n } else {\n $ERROR('#4.3: {valueOf: function() {return 1}, toString: function() {throw \"error\"}} + 1 not throw Error. Actual: ' + (e));\n }\n}\n\n//CHECK#5\nif (1 + {toString: function() {return 1}} !== 2) {\n $ERROR('#5: 1 + {toString: function() {return 1}} === 2. Actual: ' + (1 + {toString: function() {return 1}}));\n}\n\n//CHECK#6\nif (1 + {valueOf: function() {return {}}, toString: function() {return 1}} !== 2) {\n $ERROR('#6: 1 + {valueOf: function() {return {}}, toString: function() {return 1}} === 2. Actual: ' + (1 + {valueOf: function() {return {}}, toString: function() {return 1}}));\n}\n\n//CHECK#7\ntry {\n 1 + {valueOf: function() {throw \"error\"}, toString: function() {return 1}};\n $ERROR('#7.1: 1 + {valueOf: function() {throw \"error\"}, toString: function() {return 1}} throw \"error\". Actual: ' + (1 + {valueOf: function() {throw \"error\"}, toString: function() {return 1}}));\n} \ncatch (e) {\n if (e !== \"error\") {\n $ERROR('#7.2: 1 + {valueOf: function() {throw \"error\"}, toString: function() {return 1}} throw \"error\". Actual: ' + (e));\n } \n}\n\n//CHECK#8\ntry {\n 1 + {valueOf: function() {return {}}, toString: function() {return {}}};\n $ERROR('#8.1: 1 + {valueOf: function() {return {}}, toString: function() {return {}}} throw TypeError. Actual: ' + (1 + {valueOf: function() {return {}}, toString: function() {return {}}}));\n} \ncatch (e) {\n if ((e instanceof TypeError) !== true) {\n $ERROR('#8.2: 1 + {valueOf: function() {return {}}, toString: function() {return {}}} throw TypeError. Actual: ' + (e));\n } \n}\n",
+ "id": "S11.6.1_A2.2_T1"
+ },
+ {
+ "section": "11.6.1, 8.6.2.6",
+ "description": "If Type(value) is Date object, evaluate ToPrimitive(value, String)",
+ "test": "//CHECK#1\nvar date = new Date();\nif (date + date !== date.toString() + date.toString()) {\n $ERROR('#1: var date = new Date(); date + date === date.toString() + date.toString(). Actual: ' + (date + date)); \n}\n\n//CHECK#2\nvar date = new Date();\nif (date + 0 !== date.toString() + \"0\") {\n $ERROR('#2: var date = new Date(); date + 0 === date.toString() + \"0\". Actual: ' + (date + 0)); \n}\n\n//CHECK#3\nvar date = new Date();\nif (date + true !== date.toString() + \"true\") {\n $ERROR('#3: var date = new Date(); date + true === date.toString() + \"true\". Actual: ' + (date + true)); \n}\n\n//CHECK#4\nvar date = new Date();\nif (date + new Object() !== date.toString() + \"[object Object]\") {\n $ERROR('#4: var date = new Date(); date + new Object() === date.toString() + \"[object Object]\". Actual: ' + (date + new Object())); \n}\n\n",
+ "id": "S11.6.1_A2.2_T2"
+ },
+ {
+ "section": "11.6.1, 8.6.2.6",
+ "description": "If Type(value) is Function, evaluate ToPrimitive(value, Number)",
+ "test": "//CHECK#1\nfunction f1(){\n return 0;\n}\nif (f1 + 1 !== f1.toString() + 1) {\n $ERROR('#1: function f1() {return 0;}; f1 + 1 === f1.toString() + 1');\n}\n\n//CHECK#2\nfunction f2(){\n return 0;\n}\nf2.valueOf = function() {return 1;};\nif (1 + f2 !== 1 + 1) {\n $ERROR('#2: f1unction f2() {return 0;} f2.valueOf = function() {return 1;}; 1 + f2 === 1 + 1. Actual: ' + (1 + f2));\n}\n\n//CHECK#3\nfunction f3(){\n return 0;\n}\nf3.toString = function() {return 1;};\nif (1 + f3 !== 1 + 1) {\n $ERROR('#3: f1unction f3() {return 0;} f3.toString() = function() {return 1;}; 1 + f3 === 1 + 1. Actual: ' + (1 + f3));\n}\n\n//CHECK#4\nfunction f4(){\n return 0;\n}\nf4.valueOf = function() {return -1;};\nf4.toString = function() {return 1;};\nif (f4 + 1 !== 1 - 1) {\n $ERROR('#4: f1unction f4() {return 0;}; f2.valueOf = function() {return -1;}; f4.toString() = function() {return 1;}; f4 + 1 === 1 - 1. Actual: ' + (f4 + 1));\n}\n",
+ "id": "S11.6.1_A2.2_T3"
+ },
+ {
+ "section": "11.6.1",
+ "description": "Checking with \"throw\"",
+ "test": "//CHECK#1\nvar x = { valueOf: function () { throw \"x\"; } };\nvar y = { valueOf: function () { throw \"y\"; } };\ntry {\n x + y;\n $ERROR('#1.1: var x = { valueOf: function () { throw \"x\"; } }; var y = { valueOf: function () { throw \"y\"; } }; x + y throw \"x\". Actual: ' + (x + y));\n} catch (e) {\n if (e === \"y\") {\n $ERROR('#1.2: ToNumber(first expression) is called first, and then ToNumber(second expression)');\n } else {\n if (e !== \"x\") {\n $ERROR('#1.3: var x = { valueOf: function () { throw \"x\"; } }; var y = { valueOf: function () { throw \"y\"; } }; x + y throw \"x\". Actual: ' + (e));\n }\n }\n}\n",
+ "id": "S11.6.1_A2.3_T1"
+ },
+ {
+ "section": "11.6.1",
+ "description": "Checking with \"=\"",
+ "test": "//CHECK#1\nvar x = 0; \nif ((x = 1) + x !== 2) {\n $ERROR('#1: var x = 0; (x = 1) + x === 2. Actual: ' + ((x = 1) + x));\n}\n\n//CHECK#2\nvar x = 0; \nif (x + (x = 1) !== 1) {\n $ERROR('#2: var x = 0; x + (x = 1) === 1. Actual: ' + (x + (x = 1)));\n}\n\n",
+ "id": "S11.6.1_A2.4_T1"
+ },
+ {
+ "section": "11.6.1",
+ "description": "Checking with \"throw\"",
+ "test": "//CHECK#1\nvar x = function () { throw \"x\"; };\nvar y = function () { throw \"y\"; };\ntry {\n x() + y();\n $ERROR('#1.1: var x = function () { throw \"x\"; }; var y = function () { throw \"y\"; }; x() + y() throw \"x\". Actual: ' + (x() + y()));\n} catch (e) {\n if (e === \"y\") {\n $ERROR('#1.2: First expression is evaluated first, and then second expression');\n } else {\n if (e !== \"x\") {\n $ERROR('#1.3: var x = function () { throw \"x\"; }; var y = function () { throw \"y\"; }; x() + y() throw \"x\". Actual: ' + (e));\n }\n }\n}\n",
+ "id": "S11.6.1_A2.4_T2"
+ },
+ {
+ "section": "11.6.1",
+ "description": "Checking with undeclarated variables",
+ "test": "//CHECK#1\ntry {\n x + (x = 1);\n $ERROR('#1.1: x + (x = 1) throw ReferenceError. Actual: ' + (x + (x = 1))); \n}\ncatch (e) {\n if ((e instanceof ReferenceError) !== true) {\n $ERROR('#1.2: x + (x = 1) throw ReferenceError. Actual: ' + (e)); \n }\n}\n\n//CHECK#2\nif ((y = 1) + y !== 2) {\n $ERROR('#2: (y = 1) + y === 2. Actual: ' + ((y = 1) + y));\n}\n\n",
+ "id": "S11.6.1_A2.4_T3"
+ },
+ {
+ "section": "11.6.1",
+ "description": "Type(Primitive(x)) and Type(Primitive(y)) vary between primitive boolean and Boolean object",
+ "test": "//CHECK#1\nif (true + true !== 2) {\n $ERROR('#1: true + true === 2. Actual: ' + (true + true));\n}\n\n//CHECK#2\nif (new Boolean(true) + true !== 2) {\n $ERROR('#2: new Boolean(true) + true === 2. Actual: ' + (new Boolean(true) + true));\n}\n\n//CHECK#3\nif (true + new Boolean(true) !== 2) {\n $ERROR('#3: true + new Boolean(true) === 2. Actual: ' + (true + new Boolean(true)));\n}\n\n//CHECK#4\nif (new Boolean(true) + new Boolean(true) !== 2) {\n $ERROR('#4: new Boolean(true) + new Boolean(true) === 2. Actual: ' + (new Boolean(true) + new Boolean(true)));\n}\n",
+ "id": "S11.6.1_A3.1_T1.1"
+ },
+ {
+ "section": "11.6.1",
+ "description": "Type(Primitive(x)) and Type(Primitive(y)) vary between primitive number and Number object",
+ "test": "//CHECK#1\nif (1 + 1 !== 2) {\n $ERROR('#1: 1 + 1 === 2. Actual: ' + (1 + 1));\n}\n\n//CHECK#2\nif (new Number(1) + 1 !== 2) {\n $ERROR('#2: new Number(1) + 1 === 2. Actual: ' + (new Number(1) + 1));\n}\n\n//CHECK#3\nif (1 + new Number(1) !== 2) {\n $ERROR('#3: 1 + new Number(1) === 2. Actual: ' + (1 + new Number(1)));\n}\n\n//CHECK#4\nif (new Number(1) + new Number(1) !== 2) {\n $ERROR('#4: new Number(1) + new Number(1) === 2. Actual: ' + (new Number(1) + new Number(1)));\n}\n\n",
+ "id": "S11.6.1_A3.1_T1.2"
+ },
+ {
+ "section": "11.6.1",
+ "description": "Type(Primitive(x)) and Type(Primitive(y)) vary between Null and Undefined",
+ "test": "//CHECK#1\nif (isNaN(null + undefined) !== true) {\n $ERROR('#1: null + undefined === Not-a-Number. Actual: ' + (null + undefined));\n}\n\n//CHECK#2\nif (isNaN(undefined + null) !== true) {\n $ERROR('#2: undefined + null === Not-a-Number. Actual: ' + (undefined + null));\n}\n\n//CHECK#3\nif (isNaN(undefined + undefined) !== true) {\n $ERROR('#3: undefined + undefined === Not-a-Number. Actual: ' + (undefined + undefined));\n}\n\n//CHECK#4\nif (null + null !== 0) {\n $ERROR('#4: null + null === 0. Actual: ' + (null + null));\n}\n",
+ "id": "S11.6.1_A3.1_T1.3"
+ },
+ {
+ "section": "11.6.1",
+ "description": "Type(Primitive(x)) is different from Type(Primitive(y)) and both types vary between Number (primitive or object) or Boolean (primitive and object)",
+ "test": "//CHECK#1\nif (true + 1 !== 2) {\n $ERROR('#1: true + 1 === 2. Actual: ' + (true + 1));\n}\n\n//CHECK#2\nif (1 + true !== 2) {\n $ERROR('#2: 1 + true === 2. Actual: ' + (1 + true));\n}\n\n//CHECK#3\nif (new Boolean(true) + 1 !== 2) {\n $ERROR('#3: new Boolean(true) + 1 === 2. Actual: ' + (new Boolean(true) + 1));\n}\n\n//CHECK#4\nif (1 + new Boolean(true) !== 2) {\n $ERROR('#4: 1 + new Boolean(true) === 2. Actual: ' + (1 + new Boolean(true)));\n}\n\n//CHECK#5\nif (true + new Number(1) !== 2) {\n $ERROR('#5: true + new Number(1) === 2. Actual: ' + (true + new Number(1)));\n}\n\n//CHECK#6\nif (new Number(1) + true !== 2) {\n $ERROR('#6: new Number(1) + true === 2. Actual: ' + (new Number(1) + true));\n}\n\n//CHECK#7\nif (new Boolean(true) + new Number(1) !== 2) {\n $ERROR('#7: new Boolean(true) + new Number(1) === 2. Actual: ' + (new Boolean(true) + new Number(1)));\n}\n\n//CHECK#8\nif (new Number(1) + new Boolean(true) !== 2) {\n $ERROR('#8: new Number(1) + new Boolean(true) === 2. Actual: ' + (new Number(1) + new Boolean(true)));\n}\n",
+ "id": "S11.6.1_A3.1_T2.1"
+ },
+ {
+ "section": "11.6.1",
+ "description": "Type(Primitive(x)) is different from Type(Primitive(y)) and both types vary between Number (primitive or object) and Null",
+ "test": "//CHECK#1\nif (1 + null !== 1) {\n $ERROR('#1: 1 + null === 1. Actual: ' + (1 + null));\n}\n\n//CHECK#2\nif (null + 1 !== 1) {\n $ERROR('#2: null + 1 === 1. Actual: ' + (null + 1));\n}\n\n//CHECK#3\nif (new Number(1) + null !== 1) {\n $ERROR('#3: new Number(1) + null === 1. Actual: ' + (new Number(1) + null));\n}\n\n//CHECK#4\nif (null + new Number(1) !== 1) {\n $ERROR('#4: null + new Number(1) === 1. Actual: ' + (null + new Number(1)));\n}\n",
+ "id": "S11.6.1_A3.1_T2.2"
+ },
+ {
+ "section": "11.6.1",
+ "description": "Type(Primitive(x)) is different from Type(Primitive(y)) and both types vary between Number (primitive or object) and Undefined",
+ "test": "//CHECK#1\nif (isNaN(1 + undefined) !== true) {\n $ERROR('#1: 1 + undefined === Not-a-Number. Actual: ' + (1 + undefined));\n}\n\n//CHECK#2\nif (isNaN(undefined + 1) !== true) {\n $ERROR('#2: undefined + 1 === Not-a-Number. Actual: ' + (undefined + 1));\n}\n\n//CHECK#3\nif (isNaN(new Number(1) + undefined) !== true) {\n $ERROR('#3: new Number(1) + undefined === Not-a-Number. Actual: ' + (new Number(1) + undefined));\n}\n\n//CHECK#4\nif (isNaN(undefined + new Number(1)) !== true) {\n $ERROR('#4: undefined + new Number(1) === Not-a-Number. Actual: ' + (undefined + new Number(1)));\n}\n",
+ "id": "S11.6.1_A3.1_T2.3"
+ },
+ {
+ "section": "11.6.1",
+ "description": "Type(Primitive(x)) is different from Type(Primitive(y)) and both types vary between Boolean (primitive or object) and Undefined",
+ "test": "//CHECK#1\nif (isNaN(true + undefined) !== true) {\n $ERROR('#1: true + undefined === Not-a-Number. Actual: ' + (true + undefined));\n}\n\n//CHECK#2\nif (isNaN(undefined + true) !== true) {\n $ERROR('#2: undefined + true === Not-a-Number. Actual: ' + (undefined + true));\n}\n\n//CHECK#3\nif (isNaN(new Boolean(true) + undefined) !== true) {\n $ERROR('#3: new Boolean(true) + undefined === Not-a-Number. Actual: ' + (new Boolean(true) + undefined));\n}\n\n//CHECK#4\nif (isNaN(undefined + new Boolean(true)) !== true) {\n $ERROR('#4: undefined + new Boolean(true) === Not-a-Number. Actual: ' + (undefined + new Boolean(true)));\n}\n",
+ "id": "S11.6.1_A3.1_T2.4"
+ },
+ {
+ "section": "11.6.1",
+ "description": "Type(Primitive(x)) is different from Type(Primitive(y)) and both types vary between Boolean (primitive or object) and Null",
+ "test": "//CHECK#1\nif (true + null !== 1) {\n $ERROR('#1: true + null === 1. Actual: ' + (true + null));\n}\n\n//CHECK#2\nif (null + true !== 1) {\n $ERROR('#2: null + true === 1. Actual: ' + (null + true));\n}\n\n//CHECK#3\nif (new Boolean(true) + null !== 1) {\n $ERROR('#3: new Boolean(true) + null === 1. Actual: ' + (new Boolean(true) + null));\n}\n\n//CHECK#4\nif (null + new Boolean(true) !== 1) {\n $ERROR('#4: null + new Boolean(true) === 1. Actual: ' + (null + new Boolean(true)));\n}\n",
+ "id": "S11.6.1_A3.1_T2.5"
+ },
+ {
+ "section": "11.6.1",
+ "description": "Type(Primitive(x)) and Type(Primitive(y)) vary between primitive string and String object",
+ "test": "//CHECK#1\nif (\"1\" + \"1\" !== \"11\") {\n $ERROR('#1: \"1\" + \"1\" === \"11\". Actual: ' + (\"1\" + \"1\"));\n}\n\n//CHECK#2\nif (new String(\"1\") + \"1\" !== \"11\") {\n $ERROR('#2: new String(\"1\") + \"1\" === \"11\". Actual: ' + (new String(\"1\") + \"1\"));\n}\n\n//CHECK#3\nif (\"1\" + new String(\"1\") !== \"11\") {\n $ERROR('#3: \"1\" + new String(\"1\") === \"11\". Actual: ' + (\"1\" + new String(\"1\")));\n}\n\n//CHECK#4\nif (new String(\"1\") + new String(\"1\") !== \"11\") {\n $ERROR('#4: new String(\"1\") + new String(\"1\") === \"11\". Actual: ' + (new String(\"1\") + new String(\"1\")));\n}\n\n//CHECK#5\nif (\"x\" + \"1\" !==\"x1\") {\n $ERROR('#5: \"x\" + \"1\" === \"x1\". Actual: ' + (\"x\" + \"1\"));\n}\n\n//CHECK#6\nif (\"1\" + \"x\" !== \"1x\") {\n $ERROR('#6: \"1\" + \"x\" === \"1x\". Actual: ' + (\"1\" + \"x\"));\n}\n",
+ "id": "S11.6.1_A3.2_T1.1"
+ },
+ {
+ "section": "11.6.1",
+ "description": "Type(Primitive(x)) and Type(Primitive(y)) vary between Object object and Function object",
+ "test": "//CHECK#1\nif (({} + function(){return 1}) !== ({}.toString() + function(){return 1}.toString())) {\n $ERROR('#1: ({} + function(){return 1}) === ({}.toString() + function(){return 1}.toString()). Actual: ' + (({} + function(){return 1})));\n}\n\n//CHECK#2\nif ((function(){return 1} + {}) !== (function(){return 1}.toString() + {}.toString())) {\n $ERROR('#2: (function(){return 1} + {}) === (function(){return 1}.toString() + {}.toString()). Actual: ' + ((function(){return 1} + {})));\n}\n\n//CHECK#3\nif ((function(){return 1} + function(){return 1}) !== (function(){return 1}.toString() + function(){return 1}.toString())) {\n $ERROR('#3: (function(){return 1} + function(){return 1}) === (function(){return 1}.toString() + function(){return 1}.toString()). Actual: ' + ((function(){return 1} + function(){return 1})));\n}\n\n//CHECK#4\nif (({} + {}) !== ({}.toString() + {}.toString())) {\n $ERROR('#4: ({} + {}) === ({}.toString() + {}.toString()). Actual: ' + (({} + {})));\n}\n\n\n",
+ "id": "S11.6.1_A3.2_T1.2"
+ },
+ {
+ "section": "11.6.1",
+ "description": "Type(Primitive(x)) is different from Type(Primitive(y)) and both types vary between Number (primitive or object) and String (primitive and object)",
+ "test": "//CHECK#1\nif (\"1\" + 1 !== \"11\") {\n $ERROR('#1: \"1\" + 1 === \"11\". Actual: ' + (\"1\" + 1));\n}\n\n//CHECK#2\nif (1 + \"1\" !== \"11\") {\n $ERROR('#2: 1 + \"1\" === \"11\". Actual: ' + (1 + \"1\"));\n}\n\n//CHECK#3\nif (new String(\"1\") + 1 !== \"11\") {\n $ERROR('#3: new String(\"1\") + 1 === \"11\". Actual: ' + (new String(\"1\") + 1));\n}\n\n//CHECK#4\nif (1 + new String(\"1\") !== \"11\") {\n $ERROR('#4: 1 + new String(\"1\") === \"11\". Actual: ' + (1 + new String(\"1\")));\n}\n\n//CHECK#5\nif (\"1\" + new Number(1) !== \"11\") {\n $ERROR('#5: \"1\" + new Number(1) === \"11\". Actual: ' + (\"1\" + new Number(1)));\n}\n\n//CHECK#6\nif (new Number(1) + \"1\" !== \"11\") {\n $ERROR('#6: new Number(1) + \"1\" === \"11\". Actual: ' + (new Number(1) + \"1\"));\n}\n\n//CHECK#7\nif (new String(\"1\") + new Number(1) !== \"11\") {\n $ERROR('#7: new String(\"1\") + new Number(1) === \"11\". Actual: ' + (new String(\"1\") + new Number(1)));\n}\n\n//CHECK#8\nif (new Number(1) + new String(\"1\") !== \"11\") {\n $ERROR('#8: new Number(1) + new String(\"1\") === \"11\". Actual: ' + (new Number(1) + new String(\"1\")));\n}\n\n//CHECK#9\nif (\"x\" + 1 !==\"x1\") {\n $ERROR('#9: \"x\" + 1 === \"x1\". Actual: ' + (\"x\" + 1));\n}\n\n//CHECK#10\nif (1 + \"x\" !== \"1x\") {\n $ERROR('#10: 1 + \"x\" === \"1x\". Actual: ' + (1 + \"x\"));\n}\n",
+ "id": "S11.6.1_A3.2_T2.1"
+ },
+ {
+ "section": "11.6.1",
+ "description": "Type(Primitive(x)) is different from Type(Primitive(y)) and both types vary between String (primitive or object) and Boolean (primitive and object)",
+ "test": "//CHECK#1\nif (true + \"1\" !== \"true1\") {\n $ERROR('#1: true + \"1\" === \"true1\". Actual: ' + (true + \"1\"));\n}\n\n//CHECK#2\nif (\"1\" + true !== \"1true\") {\n $ERROR('#2: \"1\" + true === \"1true\". Actual: ' + (\"1\" + true));\n}\n\n//CHECK#3\nif (new Boolean(true) + \"1\" !== \"true1\") {\n $ERROR('#3: new Boolean(true) + \"1\" === \"true1\". Actual: ' + (new Boolean(true) + \"1\"));\n}\n\n//CHECK#4\nif (\"1\" + new Boolean(true) !== \"1true\") {\n $ERROR('#4: \"1\" + new Boolean(true) === \"1true\". Actual: ' + (\"1\" + new Boolean(true)));\n}\n\n//CHECK#5\nif (true + new String(\"1\") !== \"true1\") {\n $ERROR('#5: true + new String(\"1\") === \"true1\". Actual: ' + (true + new String(\"1\")));\n}\n\n//CHECK#6\nif (new String(\"1\") + true !== \"1true\") {\n $ERROR('#6: new String(\"1\") + true === \"1true\". Actual: ' + (new String(\"1\") + true));\n}\n\n//CHECK#7\nif (new Boolean(true) + new String(\"1\") !== \"true1\") {\n $ERROR('#7: new Boolean(true) + new String(\"1\") === \"true1\". Actual: ' + (new Boolean(true) + new String(\"1\")));\n}\n\n//CHECK#8\nif (new String(\"1\") + new Boolean(true) !== \"1true\") {\n $ERROR('#8: new String(\"1\") + new Boolean(true) === \"1true\". Actual: ' + (new String(\"1\") + new Boolean(true)));\n}\n",
+ "id": "S11.6.1_A3.2_T2.2"
+ },
+ {
+ "section": "11.6.1",
+ "description": "Type(Primitive(x)) is different from Type(Primitive(y)) and both types vary between String (primitive or object) and Undefined",
+ "test": "//CHECK#1\nif (\"1\" + undefined !== \"1undefined\") {\n $ERROR('#1: \"1\" + undefined === \"1undefined\". Actual: ' + (\"1\" + undefined));\n}\n\n//CHECK#2\nif (undefined + \"1\" !== \"undefined1\") {\n $ERROR('#2: undefined + \"1\" === \"undefined1\". Actual: ' + (undefined + \"1\"));\n}\n\n//CHECK#3\nif (new String(\"1\") + undefined !== \"1undefined\") {\n $ERROR('#3: new String(\"1\") + undefined === \"1undefined\". Actual: ' + (new String(\"1\") + undefined));\n}\n\n//CHECK#4\nif (undefined + new String(\"1\") !== \"undefined1\") {\n $ERROR('#4: undefined + new String(\"1\") === \"undefined1\". Actual: ' + (undefined + new String(\"1\")));\n}\n",
+ "id": "S11.6.1_A3.2_T2.3"
+ },
+ {
+ "section": "11.6.1",
+ "description": "Type(Primitive(x)) is different from Type(Primitive(y)) and both types vary between String (primitive or object) and Null",
+ "test": "//CHECK#1\nif (\"1\" + null !== \"1null\") {\n $ERROR('#1: \"1\" + null === \"1null\". Actual: ' + (\"1\" + null));\n}\n\n//CHECK#2\nif (null + \"1\" !== \"null1\") {\n $ERROR('#2: null + \"1\" === \"null1\". Actual: ' + (null + \"1\"));\n}\n\n//CHECK#3\nif (new String(\"1\") + null !== \"1null\") {\n $ERROR('#3: new String(\"1\") + null === \"1null\". Actual: ' + (new String(\"1\") + null));\n}\n\n//CHECK#4\nif (null + new String(\"1\") !== \"null1\") {\n $ERROR('#4: null + new String(\"1\") === \"null1\". Actual: ' + (null + new String(\"1\")));\n}\n",
+ "id": "S11.6.1_A3.2_T2.4"
+ },
+ {
+ "section": "11.6.1, 11.6.3",
+ "description": "If either operand is NaN, the result is NaN",
+ "test": "//CHECK#1\nif (isNaN(Number.NaN + 1) !== true ) {\n $ERROR('#1: NaN + 1 === Not-a-Number. Actual: ' + (NaN + 1));\n}\n\n//CHECK#2\nif (isNaN(1 + Number.NaN) !== true ) {\n $ERROR('#2: 1 + NaN === Not-a-Number. Actual: ' + (1 + NaN));\n}\n\n//CHECK#3\nif (isNaN(Number.NaN + Number.POSITIVE_INFINITY) !== true ) {\n $ERROR('#3: NaN + Infinity === Not-a-Number. Actual: ' + (NaN + Infinity));\n}\n\n//CHECK#4\nif (isNaN(Number.POSITIVE_INFINITY + Number.NaN) !== true ) {\n $ERROR('#4: Infinity + NaN === Not-a-Number. Actual: ' + (Infinity + NaN));\n}\n\n//CHECK#5\nif (isNaN(Number.NaN + Number.NEGATIVE_INFINITY) !== true ) {\n $ERROR('#5: NaN + Infinity === Not-a-Number. Actual: ' + (NaN + Infinity));\n}\n\n//CHECK#6\nif (isNaN(Number.NEGATIVE_INFINITY + Number.NaN) !== true ) {\n $ERROR('#6: Infinity + NaN === Not-a-Number. Actual: ' + (Infinity + NaN));\n}\n\n",
+ "id": "S11.6.1_A4_T1"
+ },
+ {
+ "section": "11.6.1, 11.6.3",
+ "description": "The sum of two infinities of opposite sign is NaN",
+ "test": "//CHECK#1\nif (isNaN(Number.POSITIVE_INFINITY + Number.NEGATIVE_INFINITY) !== true ) {\n $ERROR('#1: Infinity + -Infinity === Not-a-Number. Actual: ' + (Infinity + -Infinity));\n}\n\n//CHECK#2\nif (isNaN(Number.NEGATIVE_INFINITY + Number.POSITIVE_INFINITY) !== true ) {\n $ERROR('#2: -Infinity + Infinity === Not-a-Number. Actual: ' + (-Infinity + Infinity));\n}\n\n\n\n",
+ "id": "S11.6.1_A4_T2"
+ },
+ {
+ "section": "11.6.1, 11.6.3",
+ "description": "The sum of two infinities of the same sign is the infinity of that sign",
+ "test": "//CHECK#1\nif (Number.POSITIVE_INFINITY + Number.POSITIVE_INFINITY !== Number.POSITIVE_INFINITY ) {\n $ERROR('#1: Infinity + Infinity === Infinity. Actual: ' + (Infinity + Infinity));\n}\n\n//CHECK#2\nif (Number.NEGATIVE_INFINITY + Number.NEGATIVE_INFINITY !== Number.NEGATIVE_INFINITY ) {\n $ERROR('#2: -Infinity + -Infinity === -Infinity. Actual: ' + (-Infinity + -Infinity));\n}\n\n\n\n",
+ "id": "S11.6.1_A4_T3"
+ },
+ {
+ "section": "11.6.1, 11.6.3",
+ "description": "The sum of an infinity and a finite value is equal to the infinite operand",
+ "test": "//CHECK#1\nif (Number.POSITIVE_INFINITY + 1 !== Number.POSITIVE_INFINITY ) {\n $ERROR('#1: Infinity + 1 === Infinity. Actual: ' + (Infinity + 1));\n}\n\n//CHECK#2\nif (-1 + Number.POSITIVE_INFINITY !== Number.POSITIVE_INFINITY ) {\n $ERROR('#2: -1 + Infinity === Infinity. Actual: ' + (-1 + Infinity));\n}\n\n//CHECK#3\nif (Number.NEGATIVE_INFINITY + 1 !== Number.NEGATIVE_INFINITY ) {\n $ERROR('#3: -Infinity + 1 === -Infinity. Actual: ' + (-Infinity + 1));\n}\n\n//CHECK#4\nif (-1 + Number.NEGATIVE_INFINITY !== Number.NEGATIVE_INFINITY ) {\n $ERROR('#4: -1 + -Infinity === -Infinity. Actual: ' + (-1 + -Infinity));\n}\n\n//CHECK#5\nif (Number.POSITIVE_INFINITY + Number.MAX_VALUE !== Number.POSITIVE_INFINITY ) {\n $ERROR('#5: Infinity + Number.MAX_VALUE === Infinity. Actual: ' + (Infinity + Number.MAX_VALUE));\n}\n\n//CHECK#6\nif (-Number.MAX_VALUE + Number.POSITIVE_INFINITY !== Number.POSITIVE_INFINITY ) {\n $ERROR('#6: -Number.MAX_VALUE + Infinity === Infinity. Actual: ' + (-Number.MAX_VALUE + Infinity));\n}\n\n//CHECK#7\nif (Number.NEGATIVE_INFINITY + Number.MAX_VALUE !== Number.NEGATIVE_INFINITY ) {\n $ERROR('#7: -Infinity + Number.MAX_VALUE === -Infinity. Actual: ' + (-Infinity + Number.MAX_VALUE));\n}\n\n//CHECK#8\nif (-Number.MAX_VALUE + Number.NEGATIVE_INFINITY !== Number.NEGATIVE_INFINITY ) {\n $ERROR('#8: -Number.MAX_VALUE + -Infinity === -Infinity. Actual: ' + (-Number.MAX_VALUE + -Infinity));\n}\n\n\n\n",
+ "id": "S11.6.1_A4_T4"
+ },
+ {
+ "section": "11.6.1, 11.6.3",
+ "description": "The sum of two negative zeros is -0. The sum of two positive zeros, or of two zeros of opposite sign is +0",
+ "test": "//CHECK#1\nif (-0 + -0 !== -0 ) { \n $ERROR('#1.1: -0 + -0 === 0. Actual: ' + (-0 + -0));\n} else {\n if (1 / (-0 + -0) !== Number.NEGATIVE_INFINITY) {\n $ERROR('#1.1: -0 + -0 === - 0. Actual: +0');\n }\n}\n\n//CHECK#2\nif (0 + -0 !== 0 ) { \n $ERROR('#2.1: 0 + -0 === 0. Actual: ' + (0 + -0));\n} else {\n if (1 / (0 + -0) !== Number.POSITIVE_INFINITY) {\n $ERROR('#2.2: 0 + -0 === + 0. Actual: -0');\n }\n}\n\n//CHECK#3\nif (-0 + 0 !== 0 ) { \n $ERROR('#3.1: -0 + 0 === 0. Actual: ' + (-0 + 0));\n} else {\n if (1 / (-0 + 0) !== Number.POSITIVE_INFINITY) {\n $ERROR('#3.2: -0 + 0 === + 0. Actual: -0');\n }\n}\n\n//CHECK#4\nif (0 + 0 !== 0 ) { \n $ERROR('#4.1: 0 + 0 === 0. Actual: ' + (0 + 0));\n} else {\n if (1 / (0 + 0) !== Number.POSITIVE_INFINITY) {\n $ERROR('#4.2: 0 + 0 === + 0. Actual: -0');\n }\n}\n",
+ "id": "S11.6.1_A4_T5"
+ },
+ {
+ "section": "11.6.1, 11.6.3",
+ "description": "The sum of a zero and a nonzero finite value is equal to the nonzero operand",
+ "test": "//CHECK#1\nif (1 + -0 !== 1 ) { \n $ERROR('#1: 1 + -0 === 1. Actual: ' + (1 + -0));\n}\n\n//CHECK#2\nif (1 + 0 !== 1 ) { \n $ERROR('#2: 1 + 0 === 1. Actual: ' + (1 + 0));\n} \n\n//CHECK#3\nif (-0 + 1 !== 1 ) { \n $ERROR('#3: -0 + 1 === 1. Actual: ' + (-0 + 1));\n}\n\n//CHECK#4\nif (0 + 1 !== 1 ) { \n $ERROR('#4: 0 + 1 === 1. Actual: ' + (0 + 1));\n} \n\n//CHECK#5\nif (Number.MAX_VALUE + -0 !== Number.MAX_VALUE ) { \n $ERROR('#5: Number.MAX_VALUE + -0 === Number.MAX_VALUE. Actual: ' + (Number.MAX_VALUE + -0));\n}\n\n//CHECK#6\nif (Number.MAX_VALUE + 0 !== Number.MAX_VALUE ) { \n $ERROR('#6: Number.MAX_VALUE + 0 === Number.MAX_VALUE. Actual: ' + (Number.MAX_VALUE + 0));\n} \n\n//CHECK#7\nif (-0 + Number.MIN_VALUE !== Number.MIN_VALUE ) { \n $ERROR('#7: -0 + Number.MIN_VALUE === Number.MIN_VALUE. Actual: ' + (-0 + Number.MIN_VALUE));\n}\n\n//CHECK#8\nif (0 + Number.MIN_VALUE !== Number.MIN_VALUE ) { \n $ERROR('#8: 0 + Number.MIN_VALUE === Number.MIN_VALUE. Actual: ' + (0 + Number.MIN_VALUE));\n} \n",
+ "id": "S11.6.1_A4_T6"
+ },
+ {
+ "section": "11.6.1, 11.6.3",
+ "description": "The sum of two nonzero finite values of the same magnitude and opposite sign is +0",
+ "test": "//CHECK#1\nif (-Number.MIN_VALUE + Number.MIN_VALUE !== +0) { \n $ERROR('#1.1: -Number.MIN_VALUE + Number.MIN_VALUE === 0. Actual: ' + (-Number.MIN_VALUE + Number.MIN_VALUE));\n} else {\n if (1 / (-Number.MIN_VALUE + Number.MIN_VALUE) !== Number.POSITIVE_INFINITY) {\n $ERROR('#1.2: -Number.MIN_VALUE + Number.MIN_VALUE === + 0. Actual: -0');\n }\n}\n\n//CHECK#2\nif (-Number.MAX_VALUE + Number.MAX_VALUE !== +0) { \n $ERROR('#2.1: -Number.MAX_VALUE + Number.MAX_VALUE === 0. Actual: ' + (-Number.MAX_VALUE + Number.MAX_VALUE));\n} else {\n if (1 / (-Number.MAX_VALUE + Number.MAX_VALUE) !== Number.POSITIVE_INFINITY) {\n $ERROR('#2.2: -Number.MAX_VALUE + Number.MAX_VALUE === + 0. Actual: -0');\n }\n}\n\n//CHECK#3\nif (-1 / Number.MAX_VALUE + 1 / Number.MAX_VALUE !== +0) { \n $ERROR('#3.1: -1 / Number.MAX_VALUE + 1 / Number.MAX_VALUE === 0. Actual: ' + (-1 / Number.MAX_VALUE + 1 / Number.MAX_VALUE));\n} else {\n if (1 / (-1 / Number.MAX_VALUE + 1 / Number.MAX_VALUE) !== Number.POSITIVE_INFINITY) {\n $ERROR('#3.2: -1 / Number.MAX_VALUE + 1 / Number.MAX_VALUE === + 0. Actual: -0');\n }\n}\n",
+ "id": "S11.6.1_A4_T7"
+ },
+ {
+ "section": "11.6.1, 11.6.3",
+ "description": "If the magnitude is too large to represent, the operation overflows and the result is then an infinity of appropriate sign",
+ "test": "//CHECK#1\nif (Number.MAX_VALUE + Number.MAX_VALUE !== Number.POSITIVE_INFINITY) {\n $ERROR('#1: Number.MAX_VALUE + Number.MAX_VALUE === Number.POSITIVE_INFINITY. Actual: ' + (Number.MAX_VALUE + Number.MAX_VALUE));\n}\n\n//CHECK#2\nif (-Number.MAX_VALUE - Number.MAX_VALUE !== Number.NEGATIVE_INFINITY) {\n $ERROR('#2: -Number.MAX_VALUE - Number.MAX_VALUE === Number.NEGATIVE_INFINITY. Actual: ' + (-Number.MAX_VALUE - Number.MAX_VALUE));\n}\n\n//CHECK#3\nif (1e+308 + 1e+308 !== Number.POSITIVE_INFINITY) {\n $ERROR('#3: 1e+308 + 1e+308 === Number.POSITIVE_INFINITY. Actual: ' + (1e+308 + 1e+308));\n}\n\n//CHECK#4\nif (-8.99e+307 - 8.99e+307 !== Number.NEGATIVE_INFINITY) {\n $ERROR('#4: -8.99e+307 - 8.99e+307 === Number.NEGATIVE_INFINITY. Actual: ' + (-8.99e+307 - 8.99e+307));\n}\n",
+ "id": "S11.6.1_A4_T8"
+ },
+ {
+ "section": "11.6.1, 11.6.3",
+ "description": "The addition operator is not always associative ( x + y + z is the same (x + y) + z, not x + (y + z))",
+ "test": "//CHECK#1\nif (-Number.MAX_VALUE + Number.MAX_VALUE + Number.MAX_VALUE !== (-Number.MAX_VALUE + Number.MAX_VALUE) + Number.MAX_VALUE) {\n $ERROR('#1: -Number.MAX_VALUE + Number.MAX_VALUE + Number.MAX_VALUE === (-Number.MAX_VALUE + Number.MAX_VALUE) + Number.MAX_VALUE. Actual: ' + (-Number.MAX_VALUE + Number.MAX_VALUE + Number.MAX_VALUE));\n} \n\n//CHECK#2\nif ((-Number.MAX_VALUE + Number.MAX_VALUE) + Number.MAX_VALUE === -Number.MAX_VALUE + (Number.MAX_VALUE + Number.MAX_VALUE)) {\n $ERROR('#2: (-Number.MAX_VALUE + Number.MAX_VALUE) + Number.MAX_VALUE === -Number.MAX_VALUE + (Number.MAX_VALUE + Number.MAX_VALUE). Actual: ' + ((-Number.MAX_VALUE + Number.MAX_VALUE) + Number.MAX_VALUE));\n}\n\n//CHECK#3\nif (\"1\" + 1 + 1 !== (\"1\" + 1) + 1) {\n $ERROR('#3: \"1\" + 1 + 1 === (\"1\" + 1) + 1. Actual: ' + (\"1\" + 1 + 1));\n} \n\n//CHECK#4\nif ((\"1\" + 1) + 1 === \"1\" + (1 + 1)) {\n $ERROR('#4: (\"1\" + 1) + 1 !== \"1\" + (1 + 1)');\n}\n",
+ "id": "S11.6.1_A4_T9"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/11.6.2_The_Subtraction_operator.json b/website/resources/scripts/testcases2/11.6.2_The_Subtraction_operator.json
new file mode 100644
index 000000000..de3f2592f
--- /dev/null
+++ b/website/resources/scripts/testcases2/11.6.2_The_Subtraction_operator.json
@@ -0,0 +1,194 @@
+{
+ "testCollection": {
+ "name": "11.6.2_The_Subtraction_operator",
+ "numTests": 31,
+ "tests": [
+ {
+ "section": "11.6.2, 7.2, 7.3",
+ "description": "Checking by using eval",
+ "test": "//CHECK#1\nif (eval(\"1\\u0009-\\u00091\") !== 0) {\n $ERROR('#1: 1\\\\u0009-\\\\u00091 === 0');\n}\n\n//CHECK#2\nif (eval(\"1\\u000B-\\u000B1\") !== 0) {\n $ERROR('#2: 1\\\\u000B-\\\\u000B1 === 0'); \n}\n\n//CHECK#3\nif (eval(\"1\\u000C-\\u000C1\") !== 0) {\n $ERROR('#3: 1\\\\u000C-\\\\u000C1 === 0');\n}\n\n//CHECK#4\nif (eval(\"1\\u0020-\\u00201\") !== 0) {\n $ERROR('#4: 1\\\\u0020-\\\\u00201 === 0');\n}\n\n//CHECK#5\nif (eval(\"1\\u00A0-\\u00A01\") !== 0) {\n $ERROR('#5: 1\\\\u00A0-\\\\u00A01 === 0');\n}\n\n//CHECK#6\nif (eval(\"1\\u000A-\\u000A1\") !== 0) {\n $ERROR('#6: 1\\\\u000A-\\\\u000A1 === 0'); \n}\n\n//CHECK#7\nif (eval(\"1\\u000D-\\u000D1\") !== 0) {\n $ERROR('#7: 1\\\\u000D-\\\\u000D1 === 0');\n}\n\n//CHECK#8\nif (eval(\"1\\u2028-\\u20281\") !== 0) {\n $ERROR('#8: 1\\\\u2028-\\\\u20281 === 0');\n}\n\n//CHECK#9\nif (eval(\"1\\u2029-\\u20291\") !== 0) {\n $ERROR('#9: 1\\\\u2029-\\\\u20291 === 0');\n}\n\n//CHECK#10\nif (eval(\"1\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u2029-\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u20291\") !== 0) {\n $ERROR('#10: 1\\\\u0009\\\\u000B\\\\u000C\\\\u0020\\\\u00A0\\\\u000A\\\\u000D\\\\u2028\\\\u2029-\\\\u0009\\\\u000B\\\\u000C\\\\u0020\\\\u00A0\\\\u000A\\\\u000D\\\\u2028\\\\u20291 === 0');\n}\n",
+ "id": "S11.6.2_A1"
+ },
+ {
+ "section": "11.6.2",
+ "description": "Either Type is not Reference or GetBase is not null",
+ "test": "//CHECK#1\nif (1 - 1 !== 0) {\n $ERROR('#1: 1 - 1 === 0. Actual: ' + (1 - 1));\n}\n\n//CHECK#2\nvar x = 1;\nif (x - 1 !== 0) {\n $ERROR('#2: var x = 1; x - 1 === 0. Actual: ' + (x - 1));\n}\n\n//CHECK#3\nvar y = 1;\nif (1 - y !== 0) {\n $ERROR('#3: var y = 1; 1 - y === 0. Actual: ' + (1 - y));\n}\n\n//CHECK#4\nvar x = 1;\nvar y = 1;\nif (x - y !== 0) {\n $ERROR('#4: var x = 1; var y = 1; x - y === 0. Actual: ' + (x - y));\n}\n\n//CHECK#5\nvar objectx = new Object();\nvar objecty = new Object();\nobjectx.prop = 1;\nobjecty.prop = 1;\nif (objectx.prop - objecty.prop !== 0) {\n $ERROR('#5: var objectx = new Object(); var objecty = new Object(); objectx.prop = 1; objecty.prop = 1; objectx.prop - objecty.prop === 0. Actual: ' + (objectx.prop - objecty.prop));\n}\n",
+ "id": "S11.6.2_A2.1_T1"
+ },
+ {
+ "section": "11.6.2",
+ "description": "If GetBase(x) is null, throw ReferenceError",
+ "test": "//CHECK#1\ntry {\n x - 1;\n $ERROR('#1.1: x - 1 throw ReferenceError. Actual: ' + (x - 1)); \n}\ncatch (e) {\n if ((e instanceof ReferenceError) !== true) {\n $ERROR('#1.2: x - 1 throw ReferenceError. Actual: ' + (e)); \n }\n}\n",
+ "id": "S11.6.2_A2.1_T2"
+ },
+ {
+ "section": "11.6.2",
+ "description": "If GetBase(y) is null, throw ReferenceError",
+ "test": "//CHECK#1\ntry {\n 1 - y;\n $ERROR('#1.1: 1 - y throw ReferenceError. Actual: ' + (1 - y)); \n}\ncatch (e) {\n if ((e instanceof ReferenceError) !== true) {\n $ERROR('#1.2: 1 - y throw ReferenceError. Actual: ' + (e)); \n }\n}\n",
+ "id": "S11.6.2_A2.1_T3"
+ },
+ {
+ "section": "11.6.2, 8.6.2.6",
+ "description": "If Type(value) is Object, evaluate ToPrimitive(value, Number)",
+ "test": "//CHECK#1\nif ({valueOf: function() {return 1}} - 1 !== 0) {\n $ERROR('#1: {valueOf: function() {return 1}} - 1 === 0. Actual: ' + ({valueOf: function() {return 1}} - 1));\n}\n\n//CHECK#2\nif ({valueOf: function() {return 1}, toString: function() {return 0}} - 1 !== 0) {\n $ERROR('#2: {valueOf: function() {return 1}, toString: function() {return 0}} - 1 === 0. Actual: ' + ({valueOf: function() {return 1}, toString: function() {return 0}} - 1));\n}\n\n//CHECK#3\nif ({valueOf: function() {return 1}, toString: function() {return {}}} - 1 !== 0) {\n $ERROR('#3: {valueOf: function() {return 1}, toString: function() {return {}}} - 1 === 0. Actual: ' + ({valueOf: function() {return 1}, toString: function() {return {}}} - 1));\n}\n\n//CHECK#4\ntry {\n if ({valueOf: function() {return 1}, toString: function() {throw \"error\"}} - 1 !== 0) {\n $ERROR('#4.1: {valueOf: function() {return 1}, toString: function() {throw \"error\"}} - 1 === 0. Actual: ' + ({valueOf: function() {return 1}, toString: function() {throw \"error\"}} - 1));\n }\n}\ncatch (e) {\n if (e === \"error\") {\n $ERROR('#4.2: {valueOf: function() {return 1}, toString: function() {throw \"error\"}} - 1 not throw \"error\"');\n } else {\n $ERROR('#4.3: {valueOf: function() {return 1}, toString: function() {throw \"error\"}} - 1 not throw Error. Actual: ' + (e));\n }\n}\n\n//CHECK#5\nif (1 - {toString: function() {return 1}} !== 0) {\n $ERROR('#5: 1 - {toString: function() {return 1}} === 0. Actual: ' + (1 - {toString: function() {return 1}}));\n}\n\n//CHECK#6\nif (1 - {valueOf: function() {return {}}, toString: function() {return 1}} !== 0) {\n $ERROR('#6: 1 - {valueOf: function() {return {}}, toString: function() {return 1}} === 0. Actual: ' + (1 - {valueOf: function() {return {}}, toString: function() {return 1}}));\n}\n\n//CHECK#7\ntry {\n 1 - {valueOf: function() {throw \"error\"}, toString: function() {return 1}};\n $ERROR('#7.1: 1 - {valueOf: function() {throw \"error\"}, toString: function() {return 1}} throw \"error\". Actual: ' + (1 - {valueOf: function() {throw \"error\"}, toString: function() {return 1}}));\n} \ncatch (e) {\n if (e !== \"error\") {\n $ERROR('#7.2: 1 - {valueOf: function() {throw \"error\"}, toString: function() {return 1}} throw \"error\". Actual: ' + (e));\n } \n}\n\n//CHECK#8\ntry {\n 1 - {valueOf: function() {return {}}, toString: function() {return {}}};\n $ERROR('#8.1: 1 - {valueOf: function() {return {}}, toString: function() {return {}}} throw TypeError. Actual: ' + (1 - {valueOf: function() {return {}}, toString: function() {return {}}}));\n} \ncatch (e) {\n if ((e instanceof TypeError) !== true) {\n $ERROR('#8.2: 1 - {valueOf: function() {return {}}, toString: function() {return {}}} throw TypeError. Actual: ' + (e));\n } \n}\n",
+ "id": "S11.6.2_A2.2_T1"
+ },
+ {
+ "section": "11.6.2",
+ "description": "Checking with \"throw\"",
+ "test": "//CHECK#1\nvar x = { valueOf: function () { throw \"x\"; } };\nvar y = { valueOf: function () { throw \"y\"; } };\ntry {\n x - y;\n $ERROR('#1.1: var x = { valueOf: function () { throw \"x\"; } }; var y = { valueOf: function () { throw \"y\"; } }; x - y throw \"x\". Actual: ' + (x - y));\n} catch (e) {\n if (e === \"y\") {\n $ERROR('#1.2: ToNumber(first expression) is called first, and then ToNumber(second expression)');\n } else {\n if (e !== \"x\") {\n $ERROR('#1.3: var x = { valueOf: function () { throw \"x\"; } }; var y = { valueOf: function () { throw \"y\"; } }; x - y throw \"x\". Actual: ' + (e));\n }\n }\n}\n",
+ "id": "S11.6.2_A2.3_T1"
+ },
+ {
+ "section": "11.6.2",
+ "description": "Checking with \"=\"",
+ "test": "//CHECK#1\nvar x = 0; \nif ((x = 1) - x !== 0) {\n $ERROR('#1: var x = 0; (x = 1) - x === 0. Actual: ' + ((x = 1) - x));\n}\n\n//CHECK#2\nvar x = 0; \nif (x - (x = 1) !== -1) {\n $ERROR('#2: var x = 0; x - (x = 1) === -1. Actual: ' + (x - (x = 1)));\n}\n\n",
+ "id": "S11.6.2_A2.4_T1"
+ },
+ {
+ "section": "11.6.2",
+ "description": "Checking with \"throw\"",
+ "test": "//CHECK#1\nvar x = function () { throw \"x\"; };\nvar y = function () { throw \"y\"; };\ntry {\n x() - y();\n $ERROR('#1.1: var x = function () { throw \"x\"; }; var y = function () { throw \"y\"; }; x() - y() throw \"x\". Actual: ' + (x() - y()));\n} catch (e) {\n if (e === \"y\") {\n $ERROR('#1.2: First expression is evaluated first, and then second expression');\n } else {\n if (e !== \"x\") {\n $ERROR('#1.3: var x = function () { throw \"x\"; }; var y = function () { throw \"y\"; }; x() - y() throw \"x\". Actual: ' + (e));\n }\n }\n}\n",
+ "id": "S11.6.2_A2.4_T2"
+ },
+ {
+ "section": "11.6.2",
+ "description": "Checking with undeclarated variables",
+ "test": "//CHECK#1\ntry {\n x - (x = 1);\n $ERROR('#1.1: x - (x = 1) throw ReferenceError. Actual: ' + (x - (x = 1))); \n}\ncatch (e) {\n if ((e instanceof ReferenceError) !== true) {\n $ERROR('#1.2: x - (x = 1) throw ReferenceError. Actual: ' + (e)); \n }\n}\n\n//CHECK#2\nif ((y = 1) - y !== 0) {\n $ERROR('#2: (y = 1) - y === 0. Actual: ' + ((y = 1) - y));\n}\n\n",
+ "id": "S11.6.2_A2.4_T3"
+ },
+ {
+ "section": "11.6.2",
+ "description": "Type(x) and Type(y) vary between primitive boolean and Boolean object",
+ "test": "//CHECK#1\nif (true - true !== 0) {\n $ERROR('#1: true - true === 0. Actual: ' + (true - true));\n}\n\n//CHECK#2\nif (new Boolean(true) - true !== 0) {\n $ERROR('#2: new Boolean(true) - true === 0. Actual: ' + (new Boolean(true) - true));\n}\n\n//CHECK#3\nif (true - new Boolean(true) !== 0) {\n $ERROR('#3: true - new Boolean(true) === 0. Actual: ' + (true - new Boolean(true)));\n}\n\n//CHECK#4\nif (new Boolean(true) - new Boolean(true) !== 0) {\n $ERROR('#4: new Boolean(true) - new Boolean(true) === 0. Actual: ' + (new Boolean(true) - new Boolean(true)));\n}\n",
+ "id": "S11.6.2_A3_T1.1"
+ },
+ {
+ "section": "11.6.2",
+ "description": "Type(x) and Type(y) vary between primitive number and Number object",
+ "test": "//CHECK#1\nif (1 - 1 !== 0) {\n $ERROR('#1: 1 - 1 === 0. Actual: ' + (1 - 1));\n}\n\n//CHECK#2\nif (new Number(1) - 1 !== 0) {\n $ERROR('#2: new Number(1) - 1 === 0. Actual: ' + (new Number(1) - 1));\n}\n\n//CHECK#3\nif (1 - new Number(1) !== 0) {\n $ERROR('#3: 1 - new Number(1) === 0. Actual: ' + (1 - new Number(1)));\n}\n\n//CHECK#4\nif (new Number(1) - new Number(1) !== 0) {\n $ERROR('#4: new Number(1) - new Number(1) === 0. Actual: ' + (new Number(1) - new Number(1)));\n}\n\n",
+ "id": "S11.6.2_A3_T1.2"
+ },
+ {
+ "section": "11.6.2",
+ "description": "Type(x) and Type(y) vary between primitive string and String object",
+ "test": "//CHECK#1\nif (\"1\" - \"1\" !== 0) {\n $ERROR('#1: \"1\" - \"1\" === 0. Actual: ' + (\"1\" - \"1\"));\n}\n\n//CHECK#2\nif (new String(\"1\") - \"1\" !== 0) {\n $ERROR('#2: new String(\"1\") - \"1\" === 0. Actual: ' + (new String(\"1\") - \"1\"));\n}\n\n//CHECK#3\nif (\"1\" - new String(\"1\") !== 0) {\n $ERROR('#3: \"1\" - new String(\"1\") === 0. Actual: ' + (\"1\" - new String(\"1\")));\n}\n\n//CHECK#4\nif (new String(\"1\") - new String(\"1\") !== 0) {\n $ERROR('#4: new String(\"1\") - new String(\"1\") === 0. Actual: ' + (new String(\"1\") - new String(\"1\")));\n}\n\n//CHECK#5\nif (isNaN(\"x\" - \"1\") !== true) {\n $ERROR('#5: \"x\" - \"1\" === Not-a-Number. Actual: ' + (\"x\" - \"1\"));\n}\n\n//CHECK#6\nif (isNaN(\"1\" - \"x\") !== true) {\n $ERROR('#6: \"1\" - \"x\" === Not-a-Number. Actual: ' + (\"1\" - \"x\"));\n}\n",
+ "id": "S11.6.2_A3_T1.3"
+ },
+ {
+ "section": "11.6.2",
+ "description": "Type(x) and Type(y) vary between Null and Undefined",
+ "test": "//CHECK#1\nif (isNaN(null - undefined) !== true) {\n $ERROR('#1: null - undefined === Not-a-Number. Actual: ' + (null - undefined));\n}\n\n//CHECK#2\nif (isNaN(undefined - null) !== true) {\n $ERROR('#2: undefined - null === Not-a-Number. Actual: ' + (undefined - null));\n}\n\n//CHECK#3\nif (isNaN(undefined - undefined) !== true) {\n $ERROR('#3: undefined - undefined === Not-a-Number. Actual: ' + (undefined - undefined));\n}\n\n//CHECK#4\nif (null - null !== 0) {\n $ERROR('#4: null - null === 0. Actual: ' + (null - null));\n}\n",
+ "id": "S11.6.2_A3_T1.4"
+ },
+ {
+ "section": "11.6.2",
+ "description": "Type(x) and Type(y) vary between Object object and Function object",
+ "test": "//CHECK#1\nif (isNaN({} - function(){return 1}) !== true) {\n $ERROR('#1: {} - function(){return 1} === Not-a-Number. Actual: ' + ({} - function(){return 1}));\n}\n\n//CHECK#2\nif (isNaN(function(){return 1} - {}) !== true) {\n $ERROR('#2: function(){return 1} - {} === Not-a-Number. Actual: ' + (function(){return 1} - {}));\n}\n\n//CHECK#3\nif (isNaN(function(){return 1} - function(){return 1}) !== true) {\n $ERROR('#3: function(){return 1} - function(){return 1} === Not-a-Number. Actual: ' + (function(){return 1} - function(){return 1}));\n}\n\n//CHECK#4\nif (isNaN({} - {}) !== true) {\n $ERROR('#4: {} - {} === Not-a-Number. Actual: ' + ({} - {}));\n}\n",
+ "id": "S11.6.2_A3_T1.5"
+ },
+ {
+ "section": "11.6.2",
+ "description": "Type(x) is different from Type(y) and both types vary between Number (primitive or object) and Boolean (primitive and object)",
+ "test": "//CHECK#1\nif (true - 1 !== 0) {\n $ERROR('#1: true - 1 === 0. Actual: ' + (true - 1));\n}\n\n//CHECK#2\nif (1 - true !== 0) {\n $ERROR('#2: 1 - true === 0. Actual: ' + (1 - true));\n}\n\n//CHECK#3\nif (new Boolean(true) - 1 !== 0) {\n $ERROR('#3: new Boolean(true) - 1 === 0. Actual: ' + (new Boolean(true) - 1));\n}\n\n//CHECK#4\nif (1 - new Boolean(true) !== 0) {\n $ERROR('#4: 1 - new Boolean(true) === 0. Actual: ' + (1 - new Boolean(true)));\n}\n\n//CHECK#5\nif (true - new Number(1) !== 0) {\n $ERROR('#5: true - new Number(1) === 0. Actual: ' + (true - new Number(1)));\n}\n\n//CHECK#6\nif (new Number(1) - true !== 0) {\n $ERROR('#6: new Number(1) - true === 0. Actual: ' + (new Number(1) - true));\n}\n\n//CHECK#7\nif (new Boolean(true) - new Number(1) !== 0) {\n $ERROR('#7: new Boolean(true) - new Number(1) === 0. Actual: ' + (new Boolean(true) - new Number(1)));\n}\n\n//CHECK#8\nif (new Number(1) - new Boolean(true) !== 0) {\n $ERROR('#8: new Number(1) - new Boolean(true) === 0. Actual: ' + (new Number(1) - new Boolean(true)));\n}\n",
+ "id": "S11.6.2_A3_T2.1"
+ },
+ {
+ "section": "11.6.2",
+ "description": "Type(x) is different from Type(y) and both types vary between Number (primitive or object) and String (primitive and object)",
+ "test": "//CHECK#1\nif (\"1\" - 1 !== 0) {\n $ERROR('#1: \"1\" - 1 === 0. Actual: ' + (\"1\" - 1));\n}\n\n//CHECK#2\nif (1 - \"1\" !== 0) {\n $ERROR('#2: 1 - \"1\" === 0. Actual: ' + (1 - \"1\"));\n}\n\n//CHECK#3\nif (new String(\"1\") - 1 !== 0) {\n $ERROR('#3: new String(\"1\") - 1 === 0. Actual: ' + (new String(\"1\") - 1));\n}\n\n//CHECK#4\nif (1 - new String(\"1\") !== 0) {\n $ERROR('#4: 1 - new String(\"1\") === 0. Actual: ' + (1 - new String(\"1\")));\n}\n\n//CHECK#5\nif (\"1\" - new Number(1) !== 0) {\n $ERROR('#5: \"1\" - new Number(1) === 0. Actual: ' + (\"1\" - new Number(1)));\n}\n\n//CHECK#6\nif (new Number(1) - \"1\" !== 0) {\n $ERROR('#6: new Number(1) - \"1\" === 0. Actual: ' + (new Number(1) - \"1\"));\n}\n\n//CHECK#7\nif (new String(\"1\") - new Number(1) !== 0) {\n $ERROR('#7: new String(\"1\") - new Number(1) === 0. Actual: ' + (new String(\"1\") - new Number(1)));\n}\n\n//CHECK#8\nif (new Number(1) - new String(\"1\") !== 0) {\n $ERROR('#8: new Number(1) - new String(\"1\") === 0. Actual: ' + (new Number(1) - new String(\"1\")));\n}\n\n//CHECK#9\nif (isNaN(\"x\" - 1) !== true) {\n $ERROR('#9: \"x\" - 1 === Not-a-Number. Actual: ' + (\"x\" - 1));\n}\n\n//CHECK#10\nif (isNaN(1 - \"x\") !== true) {\n $ERROR('#10: 1 - \"x\" === Not-a-Number. Actual: ' + (1 - \"x\"));\n}\n",
+ "id": "S11.6.2_A3_T2.2"
+ },
+ {
+ "section": "11.6.2",
+ "description": "Type(x) is different from Type(y) and both types vary between Number (primitive or object) and Null",
+ "test": "//CHECK#1\nif (1 - null !== 1) {\n $ERROR('#1: 1 - null === 1. Actual: ' + (1 - null));\n}\n\n//CHECK#2\nif (null - 1 !== -1) {\n $ERROR('#2: null - 1 === -1. Actual: ' + (null - 1));\n}\n\n//CHECK#3\nif (new Number(1) - null !== 1) {\n $ERROR('#3: new Number(1) - null === 1. Actual: ' + (new Number(1) - null));\n}\n\n//CHECK#4\nif (null - new Number(1) !== -1) {\n $ERROR('#4: null - new Number(1) === -1. Actual: ' + (null - new Number(1)));\n}\n",
+ "id": "S11.6.2_A3_T2.3"
+ },
+ {
+ "section": "11.6.2",
+ "description": "Type(x) is different from Type(y) and both types vary between Number (primitive or object) and Undefined",
+ "test": "//CHECK#1\nif (isNaN(1 - undefined) !== true) {\n $ERROR('#1: 1 - undefined === Not-a-Number. Actual: ' + (1 - undefined));\n}\n\n//CHECK#2\nif (isNaN(undefined - 1) !== true) {\n $ERROR('#2: undefined - 1 === Not-a-Number. Actual: ' + (undefined - 1));\n}\n\n//CHECK#3\nif (isNaN(new Number(1) - undefined) !== true) {\n $ERROR('#3: new Number(1) - undefined === Not-a-Number. Actual: ' + (new Number(1) - undefined));\n}\n\n//CHECK#4\nif (isNaN(undefined - new Number(1)) !== true) {\n $ERROR('#4: undefined - new Number(1) === Not-a-Number. Actual: ' + (undefined - new Number(1)));\n}\n",
+ "id": "S11.6.2_A3_T2.4"
+ },
+ {
+ "section": "11.6.2",
+ "description": "Type(x) is different from Type(y) and both types vary between String (primitive or object) and Boolean (primitive and object)",
+ "test": "//CHECK#1\nif (true - \"1\" !== 0) {\n $ERROR('#1: true - \"1\" === 0. Actual: ' + (true - \"1\"));\n}\n\n//CHECK#2\nif (\"1\" - true !== 0) {\n $ERROR('#2: \"1\" - true === 0. Actual: ' + (\"1\" - true));\n}\n\n//CHECK#3\nif (new Boolean(true) - \"1\" !== 0) {\n $ERROR('#3: new Boolean(true) - \"1\" === 0. Actual: ' + (new Boolean(true) - \"1\"));\n}\n\n//CHECK#4\nif (\"1\" - new Boolean(true) !== 0) {\n $ERROR('#4: \"1\" - new Boolean(true) === 0. Actual: ' + (\"1\" - new Boolean(true)));\n}\n\n//CHECK#5\nif (true - new String(\"1\") !== 0) {\n $ERROR('#5: true - new String(\"1\") === 0. Actual: ' + (true - new String(\"1\")));\n}\n\n//CHECK#6\nif (new String(\"1\") - true !== 0) {\n $ERROR('#6: new String(\"1\") - true === 0. Actual: ' + (new String(\"1\") - true));\n}\n\n//CHECK#7\nif (new Boolean(true) - new String(\"1\") !== 0) {\n $ERROR('#7: new Boolean(true) - new String(\"1\") === 0. Actual: ' + (new Boolean(true) - new String(\"1\")));\n}\n\n//CHECK#8\nif (new String(\"1\") - new Boolean(true) !== 0) {\n $ERROR('#8: new String(\"1\") - new Boolean(true) === 0. Actual: ' + (new String(\"1\") - new Boolean(true)));\n}\n",
+ "id": "S11.6.2_A3_T2.5"
+ },
+ {
+ "section": "11.6.2",
+ "description": "Type(x) is different from Type(y) and both types vary between String (primitive or object) and Undefined",
+ "test": "//CHECK#1\nif (isNaN(\"1\" - undefined) !== true) {\n $ERROR('#1: \"1\" - undefined === Not-a-Number. Actual: ' + (\"1\" - undefined));\n}\n\n//CHECK#2\nif (isNaN(undefined - \"1\") !== true) {\n $ERROR('#2: undefined - \"1\" === Not-a-Number. Actual: ' + (undefined - \"1\"));\n}\n\n//CHECK#3\nif (isNaN(new String(\"1\") - undefined) !== true) {\n $ERROR('#3: new String(\"1\") - undefined === Not-a-Number. Actual: ' + (new String(\"1\") - undefined));\n}\n\n//CHECK#4\nif (isNaN(undefined - new String(\"1\")) !== true) {\n $ERROR('#4: undefined - new String(\"1\") === Not-a-Number. Actual: ' + (undefined - new String(\"1\")));\n}\n",
+ "id": "S11.6.2_A3_T2.6"
+ },
+ {
+ "section": "11.6.2",
+ "description": "Type(x) is different from Type(y) and both types vary between String (primitive or object) and Null",
+ "test": "//CHECK#1\nif (\"1\" - null !== 1) {\n $ERROR('#1: \"1\" - null === 1. Actual: ' + (\"1\" - null));\n}\n\n//CHECK#2\nif (null - \"1\" !== -1) {\n $ERROR('#2: null - \"1\" === -1. Actual: ' + (null - \"1\"));\n}\n\n//CHECK#3\nif (new String(\"1\") - null !== 1) {\n $ERROR('#3: new String(\"1\") - null === 1. Actual: ' + (new String(\"1\") - null));\n}\n\n//CHECK#4\nif (null - new String(\"1\") !== -1) {\n $ERROR('#4: null - new String(\"1\") === -1. Actual: ' + (null - new String(\"1\")));\n}\n",
+ "id": "S11.6.2_A3_T2.7"
+ },
+ {
+ "section": "11.6.2",
+ "description": "Type(x) is different from Type(y) and both types vary between Boolean (primitive or object) and Undefined",
+ "test": "//CHECK#1\nif (isNaN(true - undefined) !== true) {\n $ERROR('#1: true - undefined === Not-a-Number. Actual: ' + (true - undefined));\n}\n\n//CHECK#2\nif (isNaN(undefined - true) !== true) {\n $ERROR('#2: undefined - true === Not-a-Number. Actual: ' + (undefined - true));\n}\n\n//CHECK#3\nif (isNaN(new Boolean(true) - undefined) !== true) {\n $ERROR('#3: new Boolean(true) - undefined === Not-a-Number. Actual: ' + (new Boolean(true) - undefined));\n}\n\n//CHECK#4\nif (isNaN(undefined - new Boolean(true)) !== true) {\n $ERROR('#4: undefined - new Boolean(true) === Not-a-Number. Actual: ' + (undefined - new Boolean(true)));\n}\n",
+ "id": "S11.6.2_A3_T2.8"
+ },
+ {
+ "section": "11.6.2",
+ "description": "Type(x) is different from Type(y) and both types vary between Boolean (primitive or object) and Null",
+ "test": "//CHECK#1\nif (true - null !== 1) {\n $ERROR('#1: true - null === 1. Actual: ' + (true - null));\n}\n\n//CHECK#2\nif (null - true !== -1) {\n $ERROR('#2: null - true === -1. Actual: ' + (null - true));\n}\n\n//CHECK#3\nif (new Boolean(true) - null !== 1) {\n $ERROR('#3: new Boolean(true) - null === 1. Actual: ' + (new Boolean(true) - null));\n}\n\n//CHECK#4\nif (null - new Boolean(true) !== -1) {\n $ERROR('#4: null - new Boolean(true) === -1. Actual: ' + (null - new Boolean(true)));\n}\n",
+ "id": "S11.6.2_A3_T2.9"
+ },
+ {
+ "section": "11.6.2, 11.6.3",
+ "description": "If either operand is NaN, the result is NaN",
+ "test": "//CHECK#1\nif (isNaN(Number.NaN - 1) !== true ) {\n $ERROR('#1: NaN - 1 === Not-a-Number. Actual: ' + (NaN - 1));\n}\n\n//CHECK#2\nif (isNaN(1 - Number.NaN) !== true ) {\n $ERROR('#2: 1 - NaN === Not-a-Number. Actual: ' + (1 - NaN));\n}\n\n//CHECK#3\nif (isNaN(Number.NaN - Number.POSITIVE_INFINITY) !== true ) {\n $ERROR('#3: NaN - Infinity === Not-a-Number. Actual: ' + (NaN - Infinity));\n}\n\n//CHECK#4\nif (isNaN(Number.POSITIVE_INFINITY - Number.NaN) !== true ) {\n $ERROR('#4: Infinity - NaN === Not-a-Number. Actual: ' + (Infinity - NaN));\n}\n\n//CHECK#5\nif (isNaN(Number.NaN - Number.NEGATIVE_INFINITY) !== true ) {\n $ERROR('#5: NaN - Infinity === Not-a-Number. Actual: ' + (NaN - Infinity));\n}\n\n//CHECK#6\nif (isNaN(Number.NEGATIVE_INFINITY - Number.NaN) !== true ) {\n $ERROR('#6: Infinity - NaN === Not-a-Number. Actual: ' + (Infinity - NaN));\n}\n",
+ "id": "S11.6.2_A4_T1"
+ },
+ {
+ "section": "11.6.2, 11.6.3",
+ "description": "The difference of two infinities of opposite sign is the infinity of minuend sign",
+ "test": "//CHECK#1\nif (Number.POSITIVE_INFINITY - Number.NEGATIVE_INFINITY !== Number.POSITIVE_INFINITY ) {\n $ERROR('#1: Infinity - -Infinity === Infinity. Actual: ' + (Infinity - -Infinity));\n}\n\n//CHECK#2\nif (Number.NEGATIVE_INFINITY - Number.POSITIVE_INFINITY !== Number.NEGATIVE_INFINITY ) {\n $ERROR('#2: -Infinity - Infinity === -Infinity. Actual: ' + (-Infinity - Infinity));\n}\n\n\n\n",
+ "id": "S11.6.2_A4_T2"
+ },
+ {
+ "section": "11.6.2, 11.6.3",
+ "description": "The difference of two infinities of the same sign is NaN",
+ "test": "//CHECK#1\nif (isNaN(Number.POSITIVE_INFINITY - Number.POSITIVE_INFINITY) !== true ) {\n $ERROR('#1: Infinity - Infinity === Not-a-Number. Actual: ' + (Infinity - Infinity));\n}\n\n//CHECK#2\nif (isNaN(Number.NEGATIVE_INFINITY - Number.NEGATIVE_INFINITY) !== true ) {\n $ERROR('#2: -Infinity - -Infinity === Not-a-Number. Actual: ' + (-Infinity - -Infinity));\n}\n\n\n\n",
+ "id": "S11.6.2_A4_T3"
+ },
+ {
+ "section": "11.6.2, 11.6.3",
+ "description": "The difference of an infinity and a finite value is equal to infinity of appropriate sign",
+ "test": "//CHECK#1\nif (Number.POSITIVE_INFINITY - 1 !== Number.POSITIVE_INFINITY ) {\n $ERROR('#1: Infinity - 1 === Infinity. Actual: ' + (Infinity - 1));\n}\n\n//CHECK#2\nif (-1 - Number.POSITIVE_INFINITY !== Number.NEGATIVE_INFINITY ) {\n $ERROR('#2: -1 - Infinity === -Infinity. Actual: ' + (-1 - Infinity));\n}\n\n//CHECK#3\nif (Number.NEGATIVE_INFINITY - 1 !== Number.NEGATIVE_INFINITY ) {\n $ERROR('#3: -Infinity - 1 === -Infinity. Actual: ' + (-Infinity - 1));\n}\n\n//CHECK#4\nif (-1 - Number.NEGATIVE_INFINITY !== Number.POSITIVE_INFINITY ) {\n $ERROR('#4: -1 - -Infinity === Infinity. Actual: ' + (-1 - -Infinity));\n}\n\n//CHECK#5\nif (Number.POSITIVE_INFINITY - Number.MAX_VALUE !== Number.POSITIVE_INFINITY ) {\n $ERROR('#5: Infinity - Number.MAX_VALUE === Infinity. Actual: ' + (Infinity - Number.MAX_VALUE));\n}\n\n//CHECK#6\nif (-Number.MAX_VALUE - Number.POSITIVE_INFINITY !== Number.NEGATIVE_INFINITY ) {\n $ERROR('#6: -Number.MAX_VALUE - Infinity === I-nfinity. Actual: ' + (-Number.MAX_VALUE - Infinity));\n}\n\n//CHECK#7\nif (Number.NEGATIVE_INFINITY - Number.MAX_VALUE !== Number.NEGATIVE_INFINITY ) {\n $ERROR('#7: -Infinity - Number.MAX_VALUE === -Infinity. Actual: ' + (-Infinity - Number.MAX_VALUE));\n}\n\n//CHECK#8\nif (-Number.MAX_VALUE - Number.NEGATIVE_INFINITY !== Number.POSITIVE_INFINITY ) {\n $ERROR('#8: -Number.MAX_VALUE - -Infinity === Infinity. Actual: ' + (-Number.MAX_VALUE - -Infinity));\n}\n\n\n\n",
+ "id": "S11.6.2_A4_T4"
+ },
+ {
+ "section": "11.6.2, 11.6.3",
+ "description": "Using the rule of sum of two zeroes and the fact that a - b = a + (-b)",
+ "test": "//CHECK#1\nif (-0 - -0 !== 0 ) { \n $ERROR('#1.1: -0 - -0 === 0. Actual: ' + (-0 - -0));\n} else {\n if (1 / (-0 - -0) !== Number.POSITIVE_INFINITY) {\n $ERROR('#1.2: -0 - -0 === + 0. Actual: -0');\n }\n}\n\n//CHECK#2\nif (0 - -0 !== 0 ) { \n $ERROR('#2.1: 0 - -0 === 0. Actual: ' + (0 - -0));\n} else {\n if (1 / (0 - -0) !== Number.POSITIVE_INFINITY) {\n $ERROR('#2.2: 0 - -0 === + 0. Actual: -0');\n }\n}\n\n//CHECK#3\nif (-0 - 0 !== -0 ) { \n $ERROR('#3.1: -0 - 0 === 0. Actual: ' + (-0 - 0));\n} else {\n if (1 / (-0 - 0) !== Number.NEGATIVE_INFINITY) {\n $ERROR('#3.2: -0 - 0 === - 0. Actual: +0');\n }\n}\n\n//CHECK#4\nif (0 - 0 !== 0 ) { \n $ERROR('#4.1: 0 - 0 === 0. Actual: ' + (0 - 0));\n} else {\n if (1 / (0 - 0) !== Number.POSITIVE_INFINITY) {\n $ERROR('#4.2: 0 - 0 === + 0. Actual: -0');\n }\n}\n",
+ "id": "S11.6.2_A4_T5"
+ },
+ {
+ "section": "11.6.2, 11.6.3",
+ "description": "Using the rule of sum of a zero and a nonzero finite value and the fact that a - b = a + (-b)",
+ "test": "//CHECK#1\nif (1 - -0 !== 1 ) { \n $ERROR('#1: 1 - -0 === 1. Actual: ' + (1 - -0));\n}\n\n//CHECK#2\nif (1 - 0 !== 1 ) { \n $ERROR('#2: 1 - 0 === 1. Actual: ' + (1 - 0));\n} \n\n//CHECK#3\nif (-0 - 1 !== -1 ) { \n $ERROR('#3: -0 - 1 === -1. Actual: ' + (-0 - 1));\n}\n\n//CHECK#4\nif (0 - 1 !== -1 ) { \n $ERROR('#4: 0 - 1 === -1. Actual: ' + (0 - 1));\n} \n\n//CHECK#5\nif (Number.MAX_VALUE - -0 !== Number.MAX_VALUE ) { \n $ERROR('#5: Number.MAX_VALUE - -0 === Number.MAX_VALUE. Actual: ' + (Number.MAX_VALUE - -0));\n}\n\n//CHECK#6\nif (Number.MAX_VALUE - 0 !== Number.MAX_VALUE ) { \n $ERROR('#6: Number.MAX_VALUE - 0 === Number.MAX_VALUE. Actual: ' + (Number.MAX_VALUE - 0));\n} \n\n//CHECK#7\nif (-0 - Number.MIN_VALUE !== -Number.MIN_VALUE ) { \n $ERROR('#7: -0 - Number.MIN_VALUE === -Number.MIN_VALUE. Actual: ' + (-0 - Number.MIN_VALUE));\n}\n\n//CHECK#8\nif (0 - Number.MIN_VALUE !== -Number.MIN_VALUE ) { \n $ERROR('#8: 0 - Number.MIN_VALUE === -Number.MIN_VALUE. Actual: ' + (0 - Number.MIN_VALUE));\n} \n",
+ "id": "S11.6.2_A4_T6"
+ },
+ {
+ "section": "11.6.2, 11.6.3",
+ "description": "The mathematical difference of two nonzero finite values of the same magnitude and same sign is +0",
+ "test": "//CHECK#1\nif (Number.MIN_VALUE - Number.MIN_VALUE !== +0) { \n $ERROR('#1.1: Number.MIN_VALUE - Number.MIN_VALUE === 0. Actual: ' + (Number.MIN_VALUE - Number.MIN_VALUE));\n} else {\n if (1 / (Number.MIN_VALUE - Number.MIN_VALUE) !== Number.POSITIVE_INFINITY) {\n $ERROR('#1.2: Number.MIN_VALUE - Number.MIN_VALUE === + 0. Actual: -0');\n }\n}\n\n//CHECK#2\nif (-Number.MAX_VALUE - -Number.MAX_VALUE !== +0) { \n $ERROR('#2.2: -Number.MAX_VALUE - -Number.MAX_VALUE === 0. Actual: ' + (-Number.MAX_VALUE - -Number.MAX_VALUE));\n} else {\n if (1 / (-Number.MAX_VALUE - -Number.MAX_VALUE) !== Number.POSITIVE_INFINITY) {\n $ERROR('#2.1: -Number.MAX_VALUE - -Number.MAX_VALUE === + 0. Actual: -0');\n }\n}\n\n//CHECK#3\nif (1 / Number.MAX_VALUE - 1 / Number.MAX_VALUE !== +0) { \n $ERROR('#3.1: 1 / Number.MAX_VALUE - 1 / Number.MAX_VALUE === 0. Actual: ' + (1 / Number.MAX_VALUE - 1 / Number.MAX_VALUE));\n} else {\n if (1 / (1 / Number.MAX_VALUE - 1 / Number.MAX_VALUE) !== Number.POSITIVE_INFINITY) {\n $ERROR('#3.2: 1 / Number.MAX_VALUE - 1 / Number.MAX_VALUE === + 0. Actual: -0');\n }\n}\n",
+ "id": "S11.6.2_A4_T7"
+ },
+ {
+ "section": "11.6.2, 11.6.3",
+ "description": "If the magnitude is too large to represent, the operation overflows and the result is then an infinity of appropriate sign",
+ "test": "//CHECK#1\nif (Number.MAX_VALUE - -Number.MAX_VALUE !== Number.POSITIVE_INFINITY) {\n $ERROR('#1: Number.MAX_VALUE - -Number.MAX_VALUE === Number.POSITIVE_INFINITY. Actual: ' + (Number.MAX_VALUE - -Number.MAX_VALUE));\n}\n\n//CHECK#2\nif (-Number.MAX_VALUE - Number.MAX_VALUE !== Number.NEGATIVE_INFINITY) {\n $ERROR('#2: -Number.MAX_VALUE - umber.MAX_VALUE === Number.NEGATIVE_INFINITY. Actual: ' + (-Number.MAX_VALUE - umber.MAX_VALUE));\n}\n\n//CHECK#3\nif (1e+308 - -1e+308 !== Number.POSITIVE_INFINITY) {\n $ERROR('#3: 1e+308 - -1e+308 === Number.POSITIVE_INFINITY. Actual: ' + (1e+308 - -1e+308));\n}\n\n//CHECK#4\nif (-8.99e+307 - 8.99e+307 !== Number.NEGATIVE_INFINITY) {\n $ERROR('#4: -8.99e+307 - 8.99e+307 === Number.NEGATIVE_INFINITY. Actual: ' + (-8.99e+307 - 8.99e+307));\n}\n",
+ "id": "S11.6.2_A4_T8"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/11.7.1_The_Left_shift_Operator.json b/website/resources/scripts/testcases2/11.7.1_The_Left_shift_Operator.json
new file mode 100644
index 000000000..b46b222e0
--- /dev/null
+++ b/website/resources/scripts/testcases2/11.7.1_The_Left_shift_Operator.json
@@ -0,0 +1,182 @@
+{
+ "testCollection": {
+ "name": "11.7.1_The_Left_shift_Operator",
+ "numTests": 29,
+ "tests": [
+ {
+ "section": "11.7.1, 7.2, 7.3",
+ "description": "Checking by using eval",
+ "test": "//CHECK#1\nif (eval(\"1\\u0009<<\\u00091\") !== 2) {\n $ERROR('#1: 1\\\\u0009<<\\\\u00091 === 2');\n}\n\n//CHECK#2\nif (eval(\"1\\u000B<<\\u000B1\") !== 2) {\n $ERROR('#2: 1\\\\u000B<<\\\\u000B1 === 2'); \n}\n\n//CHECK#3\nif (eval(\"1\\u000C<<\\u000C1\") !== 2) {\n $ERROR('#3: 1\\\\u000C<<\\\\u000C1 === 2');\n}\n\n//CHECK#4\nif (eval(\"1\\u0020<<\\u00201\") !== 2) {\n $ERROR('#4: 1\\\\u0020<<\\\\u00201 === 2');\n}\n\n//CHECK#5\nif (eval(\"1\\u00A0<<\\u00A01\") !== 2) {\n $ERROR('#5: 1\\\\u00A0<<\\\\u00A01 === 2');\n}\n\n//CHECK#6\nif (eval(\"1\\u000A<<\\u000A1\") !== 2) {\n $ERROR('#6: 1\\\\u000A<<\\\\u000A1 === 2'); \n}\n\n//CHECK#7\nif (eval(\"1\\u000D<<\\u000D1\") !== 2) {\n $ERROR('#7: 1\\\\u000D<<\\\\u000D1 === 2');\n}\n\n//CHECK#8\nif (eval(\"1\\u2028<<\\u20281\") !== 2) {\n $ERROR('#8: 1\\\\u2028<<\\\\u20281 === 2');\n}\n\n//CHECK#9\nif (eval(\"1\\u2029<<\\u20291\") !== 2) {\n $ERROR('#9: 1\\\\u2029<<\\\\u20291 === 2');\n}\n\n//CHECK#10\nif (eval(\"1\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u2029<<\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u20291\") !== 2) {\n $ERROR('#10: 1\\\\u0009\\\\u000B\\\\u000C\\\\u0020\\\\u00A0\\\\u000A\\\\u000D\\\\u2028\\\\u2029<<\\\\u0009\\\\u000B\\\\u000C\\\\u0020\\\\u00A0\\\\u000A\\\\u000D\\\\u2028\\\\u20291 === 2');\n}\n",
+ "id": "S11.7.1_A1"
+ },
+ {
+ "section": "11.7.1",
+ "description": "Either Type is not Reference or GetBase is not null",
+ "test": "//CHECK#1\nif (2 << 1 !== 4) {\n $ERROR('#1: 2 << 1 === 4. Actual: ' + (2 << 1));\n}\n\n//CHECK#2\nvar x = 2;\nif (x << 1 !== 4) {\n $ERROR('#2: var x = 2; x << 1 === 4. Actual: ' + (x << 1));\n}\n\n//CHECK#3\nvar y = 1;\nif (2 << y !== 4) {\n $ERROR('#3: var y = 2; 2 << y === 4. Actual: ' + (2 << y));\n}\n\n//CHECK#4\nvar x = 2;\nvar y = 1;\nif (x << y !== 4) {\n $ERROR('#4: var x = 2; var y = 1; x << y === 4. Actual: ' + (x << y));\n}\n\n//CHECK#5\nvar objectx = new Object();\nvar objecty = new Object();\nobjectx.prop = 2;\nobjecty.prop = 1;\nif (objectx.prop << objecty.prop !== 4) {\n $ERROR('#5: var objectx = new Object(); var objecty = new Object(); objectx.prop = 2; objecty.prop = 1; objectx.prop << objecty.prop === 4. Actual: ' + (objectx.prop << objecty.prop));\n}\n",
+ "id": "S11.7.1_A2.1_T1"
+ },
+ {
+ "section": "11.7.1",
+ "description": "If GetBase(x) is null, throw ReferenceError",
+ "test": "//CHECK#1\ntry {\n x << 1;\n $ERROR('#1.1: x << 1 throw ReferenceError. Actual: ' + (x << 1)); \n}\ncatch (e) {\n if ((e instanceof ReferenceError) !== true) {\n $ERROR('#1.2: x << 1 throw ReferenceError. Actual: ' + (e)); \n }\n}\n",
+ "id": "S11.7.1_A2.1_T2"
+ },
+ {
+ "section": "11.7.1",
+ "description": "If GetBase(y) is null, throw ReferenceError",
+ "test": "//CHECK#1\ntry {\n 1 << y;\n $ERROR('#1.1: 1 << y throw ReferenceError. Actual: ' + (1 << y)); \n}\ncatch (e) {\n if ((e instanceof ReferenceError) !== true) {\n $ERROR('#1.2: 1 << y throw ReferenceError. Actual: ' + (e)); \n }\n}\n",
+ "id": "S11.7.1_A2.1_T3"
+ },
+ {
+ "section": "11.7.1, 8.6.2.6",
+ "description": "If Type(value) is Object, evaluate ToPrimitive(value, Number)",
+ "test": "//CHECK#1\nif ({valueOf: function() {return 1}} << 1 !== 2) {\n $ERROR('#1: {valueOf: function() {return 1}} << 1 === 2. Actual: ' + ({valueOf: function() {return 1}} << 1));\n}\n\n//CHECK#2\nif ({valueOf: function() {return 1}, toString: function() {return 0}} << 1 !== 2) {\n $ERROR('#2: {valueOf: function() {return 1}, toString: function() {return 0}} << 1 === 2. Actual: ' + ({valueOf: function() {return 1}, toString: function() {return 0}} << 1));\n}\n\n//CHECK#3\nif ({valueOf: function() {return 1}, toString: function() {return {}}} << 1 !== 2) {\n $ERROR('#3: {valueOf: function() {return 1}, toString: function() {return {}}} << 1 === 2. Actual: ' + ({valueOf: function() {return 1}, toString: function() {return {}}} << 1));\n}\n\n//CHECK#4\ntry {\n if ({valueOf: function() {return 1}, toString: function() {throw \"error\"}} << 1 !== 2) {\n $ERROR('#4.1: {valueOf: function() {return 1}, toString: function() {throw \"error\"}} << 1 === 2. Actual: ' + ({valueOf: function() {return 1}, toString: function() {throw \"error\"}} << 1));\n }\n}\ncatch (e) {\n if (e === \"error\") {\n $ERROR('#4.2: {valueOf: function() {return 1}, toString: function() {throw \"error\"}} << 1 not throw \"error\"');\n } else {\n $ERROR('#4.3: {valueOf: function() {return 1}, toString: function() {throw \"error\"}} << 1 not throw Error. Actual: ' + (e));\n }\n}\n\n//CHECK#5\nif (1 << {toString: function() {return 1}} !== 2) {\n $ERROR('#5: 1 << {toString: function() {return 1}} === 2. Actual: ' + (1 << {toString: function() {return 1}}));\n}\n\n//CHECK#6\nif (1 << {valueOf: function() {return {}}, toString: function() {return 1}} !== 2) {\n $ERROR('#6: 1 << {valueOf: function() {return {}}, toString: function() {return 1}} === 2. Actual: ' + (1 << {valueOf: function() {return {}}, toString: function() {return 1}}));\n}\n\n//CHECK#7\ntry {\n 1 << {valueOf: function() {throw \"error\"}, toString: function() {return 1}};\n $ERROR('#7.1: 1 << {valueOf: function() {throw \"error\"}, toString: function() {return 1}} throw \"error\". Actual: ' + (1 << {valueOf: function() {throw \"error\"}, toString: function() {return 1}}));\n} \ncatch (e) {\n if (e !== \"error\") {\n $ERROR('#7.2: 1 << {valueOf: function() {throw \"error\"}, toString: function() {return 1}} throw \"error\". Actual: ' + (e));\n } \n}\n\n//CHECK#8\ntry {\n 1 << {valueOf: function() {return {}}, toString: function() {return {}}};\n $ERROR('#8.1: 1 << {valueOf: function() {return {}}, toString: function() {return {}}} throw TypeError. Actual: ' + (1 << {valueOf: function() {return {}}, toString: function() {return {}}}));\n} \ncatch (e) {\n if ((e instanceof TypeError) !== true) {\n $ERROR('#8.2: 1 << {valueOf: function() {return {}}, toString: function() {return {}}} throw TypeError. Actual: ' + (e));\n } \n}\n",
+ "id": "S11.7.1_A2.2_T1"
+ },
+ {
+ "section": "11.7.1",
+ "description": "Checking with \"throw\"",
+ "test": "//CHECK#1\nvar x = { valueOf: function () { throw \"x\"; } };\nvar y = { valueOf: function () { throw \"y\"; } };\ntry {\n x << y;\n $ERROR('#1.1: var x = { valueOf: function () { throw \"x\"; } }; var y = { valueOf: function () { throw \"y\"; } }; x << y throw \"x\". Actual: ' + (x << y));\n} catch (e) {\n if (e === \"y\") {\n $ERROR('#1.2: ToNumber(first expression) is called first, and then ToNumber(second expression)');\n } else {\n if (e !== \"x\") {\n $ERROR('#1.3: var x = { valueOf: function () { throw \"x\"; } }; var y = { valueOf: function () { throw \"y\"; } }; x << y throw \"x\". Actual: ' + (e));\n }\n }\n}\n",
+ "id": "S11.7.1_A2.3_T1"
+ },
+ {
+ "section": "11.7.1",
+ "description": "Checking with \"=\"",
+ "test": "//CHECK#1\nvar x = 0; \nif ((x = 1) << x !== 2) {\n $ERROR('#1: var x = 0; (x = 1) << x === 2. Actual: ' + ((x = 1) << x));\n}\n\n//CHECK#2\nvar x = 0; \nif (x << (x = 1) !== 0) {\n $ERROR('#2: var x = 0; x << (x = 1) === 0. Actual: ' + (x << (x = 1)));\n}\n\n",
+ "id": "S11.7.1_A2.4_T1"
+ },
+ {
+ "section": "11.7.1",
+ "description": "Checking with \"throw\"",
+ "test": "//CHECK#1\nvar x = function () { throw \"x\"; };\nvar y = function () { throw \"y\"; };\ntry {\n x() << y();\n $ERROR('#1.1: var x = function () { throw \"x\"; }; var y = function () { throw \"y\"; }; x() << y() throw \"x\". Actual: ' + (x() << y()));\n} catch (e) {\n if (e === \"y\") {\n $ERROR('#1.2: First expression is evaluated first, and then second expression');\n } else {\n if (e !== \"x\") {\n $ERROR('#1.3: var x = function () { throw \"x\"; }; var y = function () { throw \"y\"; }; x() << y() throw \"x\". Actual: ' + (e));\n }\n }\n}\n",
+ "id": "S11.7.1_A2.4_T2"
+ },
+ {
+ "section": "11.7.1",
+ "description": "Checking with undeclarated variables",
+ "test": "//CHECK#1\ntry {\n x << (x = 1);\n $ERROR('#1.1: x << (x = 1) throw ReferenceError. Actual: ' + (x << (x = 1))); \n}\ncatch (e) {\n if ((e instanceof ReferenceError) !== true) {\n $ERROR('#1.2: x << (x = 1) throw ReferenceError. Actual: ' + (e)); \n }\n}\n\n//CHECK#2\nif ((y = 1) << y !== 2) {\n $ERROR('#2: (y = 1) << y === 2. Actual: ' + ((y = 1) << y));\n}\n\n",
+ "id": "S11.7.1_A2.4_T3"
+ },
+ {
+ "section": "11.7.1",
+ "description": "Type(x) and Type(y) vary between primitive boolean and Boolean object",
+ "test": "//CHECK#1\nif (true << true !== 2) {\n $ERROR('#1: true << true === 2. Actual: ' + (true << true));\n}\n\n//CHECK#2\nif (new Boolean(true) << true !== 2) {\n $ERROR('#2: new Boolean(true) << true === 2. Actual: ' + (new Boolean(true) << true));\n}\n\n//CHECK#3\nif (true << new Boolean(true) !== 2) {\n $ERROR('#3: true << new Boolean(true) === 2. Actual: ' + (true << new Boolean(true)));\n}\n\n//CHECK#4\nif (new Boolean(true) << new Boolean(true) !== 2) {\n $ERROR('#4: new Boolean(true) << new Boolean(true) === 2. Actual: ' + (new Boolean(true) << new Boolean(true)));\n}\n",
+ "id": "S11.7.1_A3_T1.1"
+ },
+ {
+ "section": "11.7.1",
+ "description": "Type(x) and Type(y) vary between primitive number and Number object",
+ "test": "//CHECK#1\nif (1 << 1 !== 2) {\n $ERROR('#1: 1 << 1 === 2. Actual: ' + (1 << 1));\n}\n\n//CHECK#2\nif (new Number(1) << 1 !== 2) {\n $ERROR('#2: new Number(1) << 1 === 2. Actual: ' + (new Number(1) << 1));\n}\n\n//CHECK#3\nif (1 << new Number(1) !== 2) {\n $ERROR('#3: 1 << new Number(1) === 2. Actual: ' + (1 << new Number(1)));\n}\n\n//CHECK#4\nif (new Number(1) << new Number(1) !== 2) {\n $ERROR('#4: new Number(1) << new Number(1) === 2. Actual: ' + (new Number(1) << new Number(1)));\n}\n\n",
+ "id": "S11.7.1_A3_T1.2"
+ },
+ {
+ "section": "11.7.1",
+ "description": "Type(x) and Type(y) vary between primitive string and String object",
+ "test": "//CHECK#1\nif (\"1\" << \"1\" !== 2) {\n $ERROR('#1: \"1\" << \"1\" === 2. Actual: ' + (\"1\" << \"1\"));\n}\n\n//CHECK#2\nif (new String(\"1\") << \"1\" !== 2) {\n $ERROR('#2: new String(\"1\") << \"1\" === 2. Actual: ' + (new String(\"1\") << \"1\"));\n}\n\n//CHECK#3\nif (\"1\" << new String(\"1\") !== 2) {\n $ERROR('#3: \"1\" << new String(\"1\") === 2. Actual: ' + (\"1\" << new String(\"1\")));\n}\n\n//CHECK#4\nif (new String(\"1\") << new String(\"1\") !== 2) {\n $ERROR('#4: new String(\"1\") << new String(\"1\") === 2. Actual: ' + (new String(\"1\") << new String(\"1\")));\n}\n\n//CHECK#5\nif (\"x\" << \"1\" !== 0) {\n $ERROR('#5: \"x\" << \"1\" === 0. Actual: ' + (\"x\" << \"1\"));\n}\n\n//CHECK#6\nif (\"1\" << \"x\" !== 1) {\n $ERROR('#6: \"1\" << \"x\" === 1. Actual: ' + (\"1\" << \"x\"));\n}\n",
+ "id": "S11.7.1_A3_T1.3"
+ },
+ {
+ "section": "11.7.1",
+ "description": "Type(x) and Type(y) vary between Null and Undefined",
+ "test": "//CHECK#1\nif (null << undefined !== 0) {\n $ERROR('#1: null << undefined === 0. Actual: ' + (null << undefined));\n}\n\n//CHECK#2\nif (undefined << null !== 0) {\n $ERROR('#2: undefined << null === 0. Actual: ' + (undefined << null));\n}\n\n//CHECK#3\nif (undefined << undefined !== 0) {\n $ERROR('#3: undefined << undefined === 0. Actual: ' + (undefined << undefined));\n}\n\n//CHECK#4\nif (null << null !== 0) {\n $ERROR('#4: null << null === 0. Actual: ' + (null << null));\n}\n",
+ "id": "S11.7.1_A3_T1.4"
+ },
+ {
+ "section": "11.7.1",
+ "description": "Type(x) and Type(y) vary between Object object and Function object",
+ "test": "//CHECK#1\nif (({} << function(){return 1}) !== 0) {\n $ERROR('#1: ({} << function(){return 1}) === 0. Actual: ' + (({} << function(){return 1})));\n}\n\n//CHECK#2\nif ((function(){return 1} << {}) !== 0) {\n $ERROR('#2: (function(){return 1} << {}) === 0. Actual: ' + ((function(){return 1} << {})));\n}\n\n//CHECK#3\nif ((function(){return 1} << function(){return 1}) !== 0) {\n $ERROR('#3: (function(){return 1} << function(){return 1}) === 0. Actual: ' + ((function(){return 1} << function(){return 1})));\n}\n\n//CHECK#4\nif (({} << {}) !== 0) {\n $ERROR('#4: ({} << {}) === 0. Actual: ' + (({} << {})));\n}\n\n",
+ "id": "S11.7.1_A3_T1.5"
+ },
+ {
+ "section": "11.7.1",
+ "description": "Type(x) is different from Type(y) and both types vary between Number (primitive or object) and Boolean (primitive and object)",
+ "test": "//CHECK#1\nif (true << 1 !== 2) {\n $ERROR('#1: true << 1 === 2. Actual: ' + (true << 1));\n}\n\n//CHECK#2\nif (1 << true !== 2) {\n $ERROR('#2: 1 << true === 2. Actual: ' + (1 << true));\n}\n\n//CHECK#3\nif (new Boolean(true) << 1 !== 2) {\n $ERROR('#3: new Boolean(true) << 1 === 2. Actual: ' + (new Boolean(true) << 1));\n}\n\n//CHECK#4\nif (1 << new Boolean(true) !== 2) {\n $ERROR('#4: 1 << new Boolean(true) === 2. Actual: ' + (1 << new Boolean(true)));\n}\n\n//CHECK#5\nif (true << new Number(1) !== 2) {\n $ERROR('#5: true << new Number(1) === 2. Actual: ' + (true << new Number(1)));\n}\n\n//CHECK#6\nif (new Number(1) << true !== 2) {\n $ERROR('#6: new Number(1) << true === 2. Actual: ' + (new Number(1) << true));\n}\n\n//CHECK#7\nif (new Boolean(true) << new Number(1) !== 2) {\n $ERROR('#7: new Boolean(true) << new Number(1) === 2. Actual: ' + (new Boolean(true) << new Number(1)));\n}\n\n//CHECK#8\nif (new Number(1) << new Boolean(true) !== 2) {\n $ERROR('#8: new Number(1) << new Boolean(true) === 2. Actual: ' + (new Number(1) << new Boolean(true)));\n}\n",
+ "id": "S11.7.1_A3_T2.1"
+ },
+ {
+ "section": "11.7.1",
+ "description": "Type(x) is different from Type(y) and both types vary between Number (primitive or object) and String (primitive and object)",
+ "test": "//CHECK#1\nif (\"1\" << 1 !== 2) {\n $ERROR('#1: \"1\" << 1 === 2. Actual: ' + (\"1\" << 1));\n}\n\n//CHECK#2\nif (1 << \"1\" !== 2) {\n $ERROR('#2: 1 << \"1\" === 2. Actual: ' + (1 << \"1\"));\n}\n\n//CHECK#3\nif (new String(\"1\") << 1 !== 2) {\n $ERROR('#3: new String(\"1\") << 1 === 2. Actual: ' + (new String(\"1\") << 1));\n}\n\n//CHECK#4\nif (1 << new String(\"1\") !== 2) {\n $ERROR('#4: 1 << new String(\"1\") === 2. Actual: ' + (1 << new String(\"1\")));\n}\n\n//CHECK#5\nif (\"1\" << new Number(1) !== 2) {\n $ERROR('#5: \"1\" << new Number(1) === 2. Actual: ' + (\"1\" << new Number(1)));\n}\n\n//CHECK#6\nif (new Number(1) << \"1\" !== 2) {\n $ERROR('#6: new Number(1) << \"1\" === 2. Actual: ' + (new Number(1) << \"1\"));\n}\n\n//CHECK#7\nif (new String(\"1\") << new Number(1) !== 2) {\n $ERROR('#7: new String(\"1\") << new Number(1) === 2. Actual: ' + (new String(\"1\") << new Number(1)));\n}\n\n//CHECK#8\nif (new Number(1) << new String(\"1\") !== 2) {\n $ERROR('#8: new Number(1) << new String(\"1\") === 2. Actual: ' + (new Number(1) << new String(\"1\")));\n}\n\n//CHECK#9\nif (\"x\" << 1 !== 0) {\n $ERROR('#9: \"x\" << 1 === 0. Actual: ' + (\"x\" << 1));\n}\n\n//CHECK#10\nif (1 << \"x\" !== 1) {\n $ERROR('#10: 1 << \"x\" === 1. Actual: ' + (1 << \"x\"));\n}\n",
+ "id": "S11.7.1_A3_T2.2"
+ },
+ {
+ "section": "11.7.1",
+ "description": "Type(x) is different from Type(y) and both types vary between Number (primitive or object) and Null",
+ "test": "//CHECK#1\nif (1 << null !== 1) {\n $ERROR('#1: 1 << null === 1. Actual: ' + (1 << null));\n}\n\n//CHECK#2\nif (null << 1 !== 0) {\n $ERROR('#2: null << 1 === 0. Actual: ' + (null << 1));\n}\n\n//CHECK#3\nif (new Number(1) << null !== 1) {\n $ERROR('#3: new Number(1) << null === 1. Actual: ' + (new Number(1) << null));\n}\n\n//CHECK#4\nif (null << new Number(1) !== 0) {\n $ERROR('#4: null << new Number(1) === 0. Actual: ' + (null << new Number(1)));\n}\n",
+ "id": "S11.7.1_A3_T2.3"
+ },
+ {
+ "section": "11.7.1",
+ "description": "Type(x) is different from Type(y) and both types vary between Number (primitive or object) and Undefined",
+ "test": "//CHECK#1\nif (1 << undefined !== 1) {\n $ERROR('#1: 1 << undefined === 1. Actual: ' + (1 << undefined));\n}\n\n//CHECK#2\nif (undefined << 1 !== 0) {\n $ERROR('#2: undefined << 1 === 0. Actual: ' + (undefined << 1));\n}\n\n//CHECK#3\nif (new Number(1) << undefined !== 1) {\n $ERROR('#3: new Number(1) << undefined === 1. Actual: ' + (new Number(1) << undefined));\n}\n\n//CHECK#4\nif (undefined << new Number(1) !== 0) {\n $ERROR('#4: undefined << new Number(1) === 0. Actual: ' + (undefined << new Number(1)));\n}\n",
+ "id": "S11.7.1_A3_T2.4"
+ },
+ {
+ "section": "11.7.1",
+ "description": "Type(x) is different from Type(y) and both types vary between String (primitive or object) or Boolean (primitive and object)",
+ "test": "//CHECK#1\nif (true << \"1\" !== 2) {\n $ERROR('#1: true << \"1\" === 2. Actual: ' + (true << \"1\"));\n}\n\n//CHECK#2\nif (\"1\" << true !== 2) {\n $ERROR('#2: \"1\" << true === 2. Actual: ' + (\"1\" << true));\n}\n\n//CHECK#3\nif (new Boolean(true) << \"1\" !== 2) {\n $ERROR('#3: new Boolean(true) << \"1\" === 2. Actual: ' + (new Boolean(true) << \"1\"));\n}\n\n//CHECK#4\nif (\"1\" << new Boolean(true) !== 2) {\n $ERROR('#4: \"1\" << new Boolean(true) === 2. Actual: ' + (\"1\" << new Boolean(true)));\n}\n\n//CHECK#5\nif (true << new String(\"1\") !== 2) {\n $ERROR('#5: true << new String(\"1\") === 2. Actual: ' + (true << new String(\"1\")));\n}\n\n//CHECK#6\nif (new String(\"1\") << true !== 2) {\n $ERROR('#6: new String(\"1\") << true === 2. Actual: ' + (new String(\"1\") << true));\n}\n\n//CHECK#7\nif (new Boolean(true) << new String(\"1\") !== 2) {\n $ERROR('#7: new Boolean(true) << new String(\"1\") === 2. Actual: ' + (new Boolean(true) << new String(\"1\")));\n}\n\n//CHECK#8\nif (new String(\"1\") << new Boolean(true) !== 2) {\n $ERROR('#8: new String(\"1\") << new Boolean(true) === 2. Actual: ' + (new String(\"1\") << new Boolean(true)));\n}\n",
+ "id": "S11.7.1_A3_T2.5"
+ },
+ {
+ "section": "11.7.1",
+ "description": "Type(x) is different from Type(y) and both types vary between String (primitive or object) and Undefined",
+ "test": "//CHECK#1\nif (\"1\" << undefined !== 1) {\n $ERROR('#1: \"1\" << undefined === 1. Actual: ' + (\"1\" << undefined));\n}\n\n//CHECK#2\nif (undefined << \"1\" !== 0) {\n $ERROR('#2: undefined << \"1\" === 0. Actual: ' + (undefined << \"1\"));\n}\n\n//CHECK#3\nif (new String(\"1\") << undefined !== 1) {\n $ERROR('#3: new String(\"1\") << undefined === 1. Actual: ' + (new String(\"1\") << undefined));\n}\n\n//CHECK#4\nif (undefined << new String(\"1\") !== 0) {\n $ERROR('#4: undefined << new String(\"1\") === 0. Actual: ' + (undefined << new String(\"1\")));\n}\n",
+ "id": "S11.7.1_A3_T2.6"
+ },
+ {
+ "section": "11.7.1",
+ "description": "Type(x) is different from Type(y) and both types vary between String (primitive or object) and Null",
+ "test": "//CHECK#1\nif (\"1\" << null !== 1) {\n $ERROR('#1: \"1\" << null === 1. Actual: ' + (\"1\" << null));\n}\n\n//CHECK#2\nif (null << \"1\" !== 0) {\n $ERROR('#2: null << \"1\" === 0. Actual: ' + (null << \"1\"));\n}\n\n//CHECK#3\nif (new String(\"1\") << null !== 1) {\n $ERROR('#3: new String(\"1\") << null === 1. Actual: ' + (new String(\"1\") << null));\n}\n\n//CHECK#4\nif (null << new String(\"1\") !== 0) {\n $ERROR('#4: null << new String(\"1\") === 0. Actual: ' + (null << new String(\"1\")));\n}\n",
+ "id": "S11.7.1_A3_T2.7"
+ },
+ {
+ "section": "11.7.1",
+ "description": "Type(x) is different from Type(y) and both types vary between Boolean (primitive or object) and Undefined",
+ "test": "//CHECK#1\nif (true << undefined !== 1) {\n $ERROR('#1: true << undefined === 1. Actual: ' + (true << undefined));\n}\n\n//CHECK#2\nif (undefined << true !== 0) {\n $ERROR('#2: undefined << true === 0. Actual: ' + (undefined << true));\n}\n\n//CHECK#3\nif (new Boolean(true) << undefined !== 1) {\n $ERROR('#3: new Boolean(true) << undefined === 1. Actual: ' + (new Boolean(true) << undefined));\n}\n\n//CHECK#4\nif (undefined << new Boolean(true) !== 0) {\n $ERROR('#4: undefined << new Boolean(true) === 0. Actual: ' + (undefined << new Boolean(true)));\n}\n",
+ "id": "S11.7.1_A3_T2.8"
+ },
+ {
+ "section": "11.7.1",
+ "description": "Type(x) is different from Type(y) and both types vary between Boolean (primitive or object) and Null",
+ "test": "//CHECK#1\nif (true << null !== 1) {\n $ERROR('#1: true << null === 1. Actual: ' + (true << null));\n}\n\n//CHECK#2\nif (null << true !== 0) {\n $ERROR('#2: null << true === 0. Actual: ' + (null << true));\n}\n\n//CHECK#3\nif (new Boolean(true) << null !== 1) {\n $ERROR('#3: new Boolean(true) << null === 1. Actual: ' + (new Boolean(true) << null));\n}\n\n//CHECK#4\nif (null << new Boolean(true) !== 0) {\n $ERROR('#4: null << new Boolean(true) === 0. Actual: ' + (null << new Boolean(true)));\n}\n",
+ "id": "S11.7.1_A3_T2.9"
+ },
+ {
+ "section": "11.7.1",
+ "description": "ShiftExpression = -2^n, n = 0...15",
+ "test": "//CHECK\n\nif (-1 << 0 !== -1) { \n $ERROR('#1: -1 << 0 === -1. Actual: ' + (-1 << 0)); \n} \n\n\nif (-2 << 0 !== -2) { \n $ERROR('#2: -2 << 0 === -2. Actual: ' + (-2 << 0)); \n} \n\n\nif (-4 << 0 !== -4) { \n $ERROR('#3: -4 << 0 === -4. Actual: ' + (-4 << 0)); \n} \n\n\nif (-8 << 0 !== -8) { \n $ERROR('#4: -8 << 0 === -8. Actual: ' + (-8 << 0)); \n} \n\n\nif (-16 << 0 !== -16) { \n $ERROR('#5: -16 << 0 === -16. Actual: ' + (-16 << 0)); \n} \n\n\nif (-32 << 0 !== -32) { \n $ERROR('#6: -32 << 0 === -32. Actual: ' + (-32 << 0)); \n} \n\n\nif (-64 << 0 !== -64) { \n $ERROR('#7: -64 << 0 === -64. Actual: ' + (-64 << 0)); \n} \n\n\nif (-128 << 0 !== -128) { \n $ERROR('#8: -128 << 0 === -128. Actual: ' + (-128 << 0)); \n} \n\n\nif (-256 << 0 !== -256) { \n $ERROR('#9: -256 << 0 === -256. Actual: ' + (-256 << 0)); \n} \n\n\nif (-512 << 0 !== -512) { \n $ERROR('#10: -512 << 0 === -512. Actual: ' + (-512 << 0)); \n} \n\n\nif (-1024 << 0 !== -1024) { \n $ERROR('#11: -1024 << 0 === -1024. Actual: ' + (-1024 << 0)); \n} \n\n\nif (-2048 << 0 !== -2048) { \n $ERROR('#12: -2048 << 0 === -2048. Actual: ' + (-2048 << 0)); \n} \n\n\nif (-4096 << 0 !== -4096) { \n $ERROR('#13: -4096 << 0 === -4096. Actual: ' + (-4096 << 0)); \n} \n\n\nif (-8192 << 0 !== -8192) { \n $ERROR('#14: -8192 << 0 === -8192. Actual: ' + (-8192 << 0)); \n} \n\n\nif (-16384 << 0 !== -16384) { \n $ERROR('#15: -16384 << 0 === -16384. Actual: ' + (-16384 << 0)); \n} \n\n\nif (-32768 << 0 !== -32768) { \n $ERROR('#16: -32768 << 0 === -32768. Actual: ' + (-32768 << 0)); \n} \n\n\nif (-65536 << 0 !== -65536) { \n $ERROR('#17: -65536 << 0 === -65536. Actual: ' + (-65536 << 0)); \n} \n\n\nif (-131072 << 0 !== -131072) { \n $ERROR('#18: -131072 << 0 === -131072. Actual: ' + (-131072 << 0)); \n} \n\n\nif (-262144 << 0 !== -262144) { \n $ERROR('#19: -262144 << 0 === -262144. Actual: ' + (-262144 << 0)); \n} \n\n\nif (-524288 << 0 !== -524288) { \n $ERROR('#20: -524288 << 0 === -524288. Actual: ' + (-524288 << 0)); \n} \n\n\nif (-1048576 << 0 !== -1048576) { \n $ERROR('#21: -1048576 << 0 === -1048576. Actual: ' + (-1048576 << 0)); \n} \n\n\nif (-2097152 << 0 !== -2097152) { \n $ERROR('#22: -2097152 << 0 === -2097152. Actual: ' + (-2097152 << 0)); \n} \n\n\nif (-4194304 << 0 !== -4194304) { \n $ERROR('#23: -4194304 << 0 === -4194304. Actual: ' + (-4194304 << 0)); \n} \n\n\nif (-8388608 << 0 !== -8388608) { \n $ERROR('#24: -8388608 << 0 === -8388608. Actual: ' + (-8388608 << 0)); \n} \n\n\nif (-16777216 << 0 !== -16777216) { \n $ERROR('#25: -16777216 << 0 === -16777216. Actual: ' + (-16777216 << 0)); \n} \n\n\nif (-33554432 << 0 !== -33554432) { \n $ERROR('#26: -33554432 << 0 === -33554432. Actual: ' + (-33554432 << 0)); \n} \n\n\nif (-67108864 << 0 !== -67108864) { \n $ERROR('#27: -67108864 << 0 === -67108864. Actual: ' + (-67108864 << 0)); \n} \n\n\nif (-134217728 << 0 !== -134217728) { \n $ERROR('#28: -134217728 << 0 === -134217728. Actual: ' + (-134217728 << 0)); \n} \n\n\nif (-268435456 << 0 !== -268435456) { \n $ERROR('#29: -268435456 << 0 === -268435456. Actual: ' + (-268435456 << 0)); \n} \n\n\nif (-536870912 << 0 !== -536870912) { \n $ERROR('#30: -536870912 << 0 === -536870912. Actual: ' + (-536870912 << 0)); \n} \n\n\nif (-1073741824 << 0 !== -1073741824) { \n $ERROR('#31: -1073741824 << 0 === -1073741824. Actual: ' + (-1073741824 << 0)); \n} \n\n\nif (-2147483648 << 0 !== -2147483648) { \n $ERROR('#32: -2147483648 << 0 === -2147483648. Actual: ' + (-2147483648 << 0)); \n} \n\n\nif (-1 << 1 !== -2) { \n $ERROR('#33: -1 << 1 === -2. Actual: ' + (-1 << 1)); \n} \n\n\nif (-2 << 1 !== -4) { \n $ERROR('#34: -2 << 1 === -4. Actual: ' + (-2 << 1)); \n} \n\n\nif (-4 << 1 !== -8) { \n $ERROR('#35: -4 << 1 === -8. Actual: ' + (-4 << 1)); \n} \n\n\nif (-8 << 1 !== -16) { \n $ERROR('#36: -8 << 1 === -16. Actual: ' + (-8 << 1)); \n} \n\n\nif (-16 << 1 !== -32) { \n $ERROR('#37: -16 << 1 === -32. Actual: ' + (-16 << 1)); \n} \n\n\nif (-32 << 1 !== -64) { \n $ERROR('#38: -32 << 1 === -64. Actual: ' + (-32 << 1)); \n} \n\n\nif (-64 << 1 !== -128) { \n $ERROR('#39: -64 << 1 === -128. Actual: ' + (-64 << 1)); \n} \n\n\nif (-128 << 1 !== -256) { \n $ERROR('#40: -128 << 1 === -256. Actual: ' + (-128 << 1)); \n} \n\n\nif (-256 << 1 !== -512) { \n $ERROR('#41: -256 << 1 === -512. Actual: ' + (-256 << 1)); \n} \n\n\nif (-512 << 1 !== -1024) { \n $ERROR('#42: -512 << 1 === -1024. Actual: ' + (-512 << 1)); \n} \n\n\nif (-1024 << 1 !== -2048) { \n $ERROR('#43: -1024 << 1 === -2048. Actual: ' + (-1024 << 1)); \n} \n\n\nif (-2048 << 1 !== -4096) { \n $ERROR('#44: -2048 << 1 === -4096. Actual: ' + (-2048 << 1)); \n} \n\n\nif (-4096 << 1 !== -8192) { \n $ERROR('#45: -4096 << 1 === -8192. Actual: ' + (-4096 << 1)); \n} \n\n\nif (-8192 << 1 !== -16384) { \n $ERROR('#46: -8192 << 1 === -16384. Actual: ' + (-8192 << 1)); \n} \n\n\nif (-16384 << 1 !== -32768) { \n $ERROR('#47: -16384 << 1 === -32768. Actual: ' + (-16384 << 1)); \n} \n\n\nif (-32768 << 1 !== -65536) { \n $ERROR('#48: -32768 << 1 === -65536. Actual: ' + (-32768 << 1)); \n} \n\n\nif (-65536 << 1 !== -131072) { \n $ERROR('#49: -65536 << 1 === -131072. Actual: ' + (-65536 << 1)); \n} \n\n\nif (-131072 << 1 !== -262144) { \n $ERROR('#50: -131072 << 1 === -262144. Actual: ' + (-131072 << 1)); \n} \n\n\nif (-262144 << 1 !== -524288) { \n $ERROR('#51: -262144 << 1 === -524288. Actual: ' + (-262144 << 1)); \n} \n\n\nif (-524288 << 1 !== -1048576) { \n $ERROR('#52: -524288 << 1 === -1048576. Actual: ' + (-524288 << 1)); \n} \n\n\nif (-1048576 << 1 !== -2097152) { \n $ERROR('#53: -1048576 << 1 === -2097152. Actual: ' + (-1048576 << 1)); \n} \n\n\nif (-2097152 << 1 !== -4194304) { \n $ERROR('#54: -2097152 << 1 === -4194304. Actual: ' + (-2097152 << 1)); \n} \n\n\nif (-4194304 << 1 !== -8388608) { \n $ERROR('#55: -4194304 << 1 === -8388608. Actual: ' + (-4194304 << 1)); \n} \n\n\nif (-8388608 << 1 !== -16777216) { \n $ERROR('#56: -8388608 << 1 === -16777216. Actual: ' + (-8388608 << 1)); \n} \n\n\nif (-16777216 << 1 !== -33554432) { \n $ERROR('#57: -16777216 << 1 === -33554432. Actual: ' + (-16777216 << 1)); \n} \n\n\nif (-33554432 << 1 !== -67108864) { \n $ERROR('#58: -33554432 << 1 === -67108864. Actual: ' + (-33554432 << 1)); \n} \n\n\nif (-67108864 << 1 !== -134217728) { \n $ERROR('#59: -67108864 << 1 === -134217728. Actual: ' + (-67108864 << 1)); \n} \n\n\nif (-134217728 << 1 !== -268435456) { \n $ERROR('#60: -134217728 << 1 === -268435456. Actual: ' + (-134217728 << 1)); \n} \n\n\nif (-268435456 << 1 !== -536870912) { \n $ERROR('#61: -268435456 << 1 === -536870912. Actual: ' + (-268435456 << 1)); \n} \n\n\nif (-536870912 << 1 !== -1073741824) { \n $ERROR('#62: -536870912 << 1 === -1073741824. Actual: ' + (-536870912 << 1)); \n} \n\n\nif (-1073741824 << 1 !== -2147483648) { \n $ERROR('#63: -1073741824 << 1 === -2147483648. Actual: ' + (-1073741824 << 1)); \n} \n\n\nif (-2147483648 << 1 !== 0) { \n $ERROR('#64: -2147483648 << 1 === 0. Actual: ' + (-2147483648 << 1)); \n} \n\n\nif (-1 << 2 !== -4) { \n $ERROR('#65: -1 << 2 === -4. Actual: ' + (-1 << 2)); \n} \n\n\nif (-2 << 2 !== -8) { \n $ERROR('#66: -2 << 2 === -8. Actual: ' + (-2 << 2)); \n} \n\n\nif (-4 << 2 !== -16) { \n $ERROR('#67: -4 << 2 === -16. Actual: ' + (-4 << 2)); \n} \n\n\nif (-8 << 2 !== -32) { \n $ERROR('#68: -8 << 2 === -32. Actual: ' + (-8 << 2)); \n} \n\n\nif (-16 << 2 !== -64) { \n $ERROR('#69: -16 << 2 === -64. Actual: ' + (-16 << 2)); \n} \n\n\nif (-32 << 2 !== -128) { \n $ERROR('#70: -32 << 2 === -128. Actual: ' + (-32 << 2)); \n} \n\n\nif (-64 << 2 !== -256) { \n $ERROR('#71: -64 << 2 === -256. Actual: ' + (-64 << 2)); \n} \n\n\nif (-128 << 2 !== -512) { \n $ERROR('#72: -128 << 2 === -512. Actual: ' + (-128 << 2)); \n} \n\n\nif (-256 << 2 !== -1024) { \n $ERROR('#73: -256 << 2 === -1024. Actual: ' + (-256 << 2)); \n} \n\n\nif (-512 << 2 !== -2048) { \n $ERROR('#74: -512 << 2 === -2048. Actual: ' + (-512 << 2)); \n} \n\n\nif (-1024 << 2 !== -4096) { \n $ERROR('#75: -1024 << 2 === -4096. Actual: ' + (-1024 << 2)); \n} \n\n\nif (-2048 << 2 !== -8192) { \n $ERROR('#76: -2048 << 2 === -8192. Actual: ' + (-2048 << 2)); \n} \n\n\nif (-4096 << 2 !== -16384) { \n $ERROR('#77: -4096 << 2 === -16384. Actual: ' + (-4096 << 2)); \n} \n\n\nif (-8192 << 2 !== -32768) { \n $ERROR('#78: -8192 << 2 === -32768. Actual: ' + (-8192 << 2)); \n} \n\n\nif (-16384 << 2 !== -65536) { \n $ERROR('#79: -16384 << 2 === -65536. Actual: ' + (-16384 << 2)); \n} \n\n\nif (-32768 << 2 !== -131072) { \n $ERROR('#80: -32768 << 2 === -131072. Actual: ' + (-32768 << 2)); \n} \n\n\nif (-65536 << 2 !== -262144) { \n $ERROR('#81: -65536 << 2 === -262144. Actual: ' + (-65536 << 2)); \n} \n\n\nif (-131072 << 2 !== -524288) { \n $ERROR('#82: -131072 << 2 === -524288. Actual: ' + (-131072 << 2)); \n} \n\n\nif (-262144 << 2 !== -1048576) { \n $ERROR('#83: -262144 << 2 === -1048576. Actual: ' + (-262144 << 2)); \n} \n\n\nif (-524288 << 2 !== -2097152) { \n $ERROR('#84: -524288 << 2 === -2097152. Actual: ' + (-524288 << 2)); \n} \n\n\nif (-1048576 << 2 !== -4194304) { \n $ERROR('#85: -1048576 << 2 === -4194304. Actual: ' + (-1048576 << 2)); \n} \n\n\nif (-2097152 << 2 !== -8388608) { \n $ERROR('#86: -2097152 << 2 === -8388608. Actual: ' + (-2097152 << 2)); \n} \n\n\nif (-4194304 << 2 !== -16777216) { \n $ERROR('#87: -4194304 << 2 === -16777216. Actual: ' + (-4194304 << 2)); \n} \n\n\nif (-8388608 << 2 !== -33554432) { \n $ERROR('#88: -8388608 << 2 === -33554432. Actual: ' + (-8388608 << 2)); \n} \n\n\nif (-16777216 << 2 !== -67108864) { \n $ERROR('#89: -16777216 << 2 === -67108864. Actual: ' + (-16777216 << 2)); \n} \n\n\nif (-33554432 << 2 !== -134217728) { \n $ERROR('#90: -33554432 << 2 === -134217728. Actual: ' + (-33554432 << 2)); \n} \n\n\nif (-67108864 << 2 !== -268435456) { \n $ERROR('#91: -67108864 << 2 === -268435456. Actual: ' + (-67108864 << 2)); \n} \n\n\nif (-134217728 << 2 !== -536870912) { \n $ERROR('#92: -134217728 << 2 === -536870912. Actual: ' + (-134217728 << 2)); \n} \n\n\nif (-268435456 << 2 !== -1073741824) { \n $ERROR('#93: -268435456 << 2 === -1073741824. Actual: ' + (-268435456 << 2)); \n} \n\n\nif (-536870912 << 2 !== -2147483648) { \n $ERROR('#94: -536870912 << 2 === -2147483648. Actual: ' + (-536870912 << 2)); \n} \n\n\nif (-1073741824 << 2 !== 0) { \n $ERROR('#95: -1073741824 << 2 === 0. Actual: ' + (-1073741824 << 2)); \n} \n\n\nif (-2147483648 << 2 !== 0) { \n $ERROR('#96: -2147483648 << 2 === 0. Actual: ' + (-2147483648 << 2)); \n} \n\n\nif (-1 << 3 !== -8) { \n $ERROR('#97: -1 << 3 === -8. Actual: ' + (-1 << 3)); \n} \n\n\nif (-2 << 3 !== -16) { \n $ERROR('#98: -2 << 3 === -16. Actual: ' + (-2 << 3)); \n} \n\n\nif (-4 << 3 !== -32) { \n $ERROR('#99: -4 << 3 === -32. Actual: ' + (-4 << 3)); \n} \n\n\nif (-8 << 3 !== -64) { \n $ERROR('#100: -8 << 3 === -64. Actual: ' + (-8 << 3)); \n} \n\n\nif (-16 << 3 !== -128) { \n $ERROR('#101: -16 << 3 === -128. Actual: ' + (-16 << 3)); \n} \n\n\nif (-32 << 3 !== -256) { \n $ERROR('#102: -32 << 3 === -256. Actual: ' + (-32 << 3)); \n} \n\n\nif (-64 << 3 !== -512) { \n $ERROR('#103: -64 << 3 === -512. Actual: ' + (-64 << 3)); \n} \n\n\nif (-128 << 3 !== -1024) { \n $ERROR('#104: -128 << 3 === -1024. Actual: ' + (-128 << 3)); \n} \n\n\nif (-256 << 3 !== -2048) { \n $ERROR('#105: -256 << 3 === -2048. Actual: ' + (-256 << 3)); \n} \n\n\nif (-512 << 3 !== -4096) { \n $ERROR('#106: -512 << 3 === -4096. Actual: ' + (-512 << 3)); \n} \n\n\nif (-1024 << 3 !== -8192) { \n $ERROR('#107: -1024 << 3 === -8192. Actual: ' + (-1024 << 3)); \n} \n\n\nif (-2048 << 3 !== -16384) { \n $ERROR('#108: -2048 << 3 === -16384. Actual: ' + (-2048 << 3)); \n} \n\n\nif (-4096 << 3 !== -32768) { \n $ERROR('#109: -4096 << 3 === -32768. Actual: ' + (-4096 << 3)); \n} \n\n\nif (-8192 << 3 !== -65536) { \n $ERROR('#110: -8192 << 3 === -65536. Actual: ' + (-8192 << 3)); \n} \n\n\nif (-16384 << 3 !== -131072) { \n $ERROR('#111: -16384 << 3 === -131072. Actual: ' + (-16384 << 3)); \n} \n\n\nif (-32768 << 3 !== -262144) { \n $ERROR('#112: -32768 << 3 === -262144. Actual: ' + (-32768 << 3)); \n} \n\n\nif (-65536 << 3 !== -524288) { \n $ERROR('#113: -65536 << 3 === -524288. Actual: ' + (-65536 << 3)); \n} \n\n\nif (-131072 << 3 !== -1048576) { \n $ERROR('#114: -131072 << 3 === -1048576. Actual: ' + (-131072 << 3)); \n} \n\n\nif (-262144 << 3 !== -2097152) { \n $ERROR('#115: -262144 << 3 === -2097152. Actual: ' + (-262144 << 3)); \n} \n\n\nif (-524288 << 3 !== -4194304) { \n $ERROR('#116: -524288 << 3 === -4194304. Actual: ' + (-524288 << 3)); \n} \n\n\nif (-1048576 << 3 !== -8388608) { \n $ERROR('#117: -1048576 << 3 === -8388608. Actual: ' + (-1048576 << 3)); \n} \n\n\nif (-2097152 << 3 !== -16777216) { \n $ERROR('#118: -2097152 << 3 === -16777216. Actual: ' + (-2097152 << 3)); \n} \n\n\nif (-4194304 << 3 !== -33554432) { \n $ERROR('#119: -4194304 << 3 === -33554432. Actual: ' + (-4194304 << 3)); \n} \n\n\nif (-8388608 << 3 !== -67108864) { \n $ERROR('#120: -8388608 << 3 === -67108864. Actual: ' + (-8388608 << 3)); \n} \n\n\nif (-16777216 << 3 !== -134217728) { \n $ERROR('#121: -16777216 << 3 === -134217728. Actual: ' + (-16777216 << 3)); \n} \n\n\nif (-33554432 << 3 !== -268435456) { \n $ERROR('#122: -33554432 << 3 === -268435456. Actual: ' + (-33554432 << 3)); \n} \n\n\nif (-67108864 << 3 !== -536870912) { \n $ERROR('#123: -67108864 << 3 === -536870912. Actual: ' + (-67108864 << 3)); \n} \n\n\nif (-134217728 << 3 !== -1073741824) { \n $ERROR('#124: -134217728 << 3 === -1073741824. Actual: ' + (-134217728 << 3)); \n} \n\n\nif (-268435456 << 3 !== -2147483648) { \n $ERROR('#125: -268435456 << 3 === -2147483648. Actual: ' + (-268435456 << 3)); \n} \n\n\nif (-536870912 << 3 !== 0) { \n $ERROR('#126: -536870912 << 3 === 0. Actual: ' + (-536870912 << 3)); \n} \n\n\nif (-1073741824 << 3 !== 0) { \n $ERROR('#127: -1073741824 << 3 === 0. Actual: ' + (-1073741824 << 3)); \n} \n\n\nif (-2147483648 << 3 !== 0) { \n $ERROR('#128: -2147483648 << 3 === 0. Actual: ' + (-2147483648 << 3)); \n} \n\n\nif (-1 << 4 !== -16) { \n $ERROR('#129: -1 << 4 === -16. Actual: ' + (-1 << 4)); \n} \n\n\nif (-2 << 4 !== -32) { \n $ERROR('#130: -2 << 4 === -32. Actual: ' + (-2 << 4)); \n} \n\n\nif (-4 << 4 !== -64) { \n $ERROR('#131: -4 << 4 === -64. Actual: ' + (-4 << 4)); \n} \n\n\nif (-8 << 4 !== -128) { \n $ERROR('#132: -8 << 4 === -128. Actual: ' + (-8 << 4)); \n} \n\n\nif (-16 << 4 !== -256) { \n $ERROR('#133: -16 << 4 === -256. Actual: ' + (-16 << 4)); \n} \n\n\nif (-32 << 4 !== -512) { \n $ERROR('#134: -32 << 4 === -512. Actual: ' + (-32 << 4)); \n} \n\n\nif (-64 << 4 !== -1024) { \n $ERROR('#135: -64 << 4 === -1024. Actual: ' + (-64 << 4)); \n} \n\n\nif (-128 << 4 !== -2048) { \n $ERROR('#136: -128 << 4 === -2048. Actual: ' + (-128 << 4)); \n} \n\n\nif (-256 << 4 !== -4096) { \n $ERROR('#137: -256 << 4 === -4096. Actual: ' + (-256 << 4)); \n} \n\n\nif (-512 << 4 !== -8192) { \n $ERROR('#138: -512 << 4 === -8192. Actual: ' + (-512 << 4)); \n} \n\n\nif (-1024 << 4 !== -16384) { \n $ERROR('#139: -1024 << 4 === -16384. Actual: ' + (-1024 << 4)); \n} \n\n\nif (-2048 << 4 !== -32768) { \n $ERROR('#140: -2048 << 4 === -32768. Actual: ' + (-2048 << 4)); \n} \n\n\nif (-4096 << 4 !== -65536) { \n $ERROR('#141: -4096 << 4 === -65536. Actual: ' + (-4096 << 4)); \n} \n\n\nif (-8192 << 4 !== -131072) { \n $ERROR('#142: -8192 << 4 === -131072. Actual: ' + (-8192 << 4)); \n} \n\n\nif (-16384 << 4 !== -262144) { \n $ERROR('#143: -16384 << 4 === -262144. Actual: ' + (-16384 << 4)); \n} \n\n\nif (-32768 << 4 !== -524288) { \n $ERROR('#144: -32768 << 4 === -524288. Actual: ' + (-32768 << 4)); \n} \n\n\nif (-65536 << 4 !== -1048576) { \n $ERROR('#145: -65536 << 4 === -1048576. Actual: ' + (-65536 << 4)); \n} \n\n\nif (-131072 << 4 !== -2097152) { \n $ERROR('#146: -131072 << 4 === -2097152. Actual: ' + (-131072 << 4)); \n} \n\n\nif (-262144 << 4 !== -4194304) { \n $ERROR('#147: -262144 << 4 === -4194304. Actual: ' + (-262144 << 4)); \n} \n\n\nif (-524288 << 4 !== -8388608) { \n $ERROR('#148: -524288 << 4 === -8388608. Actual: ' + (-524288 << 4)); \n} \n\n\nif (-1048576 << 4 !== -16777216) { \n $ERROR('#149: -1048576 << 4 === -16777216. Actual: ' + (-1048576 << 4)); \n} \n\n\nif (-2097152 << 4 !== -33554432) { \n $ERROR('#150: -2097152 << 4 === -33554432. Actual: ' + (-2097152 << 4)); \n} \n\n\nif (-4194304 << 4 !== -67108864) { \n $ERROR('#151: -4194304 << 4 === -67108864. Actual: ' + (-4194304 << 4)); \n} \n\n\nif (-8388608 << 4 !== -134217728) { \n $ERROR('#152: -8388608 << 4 === -134217728. Actual: ' + (-8388608 << 4)); \n} \n\n\nif (-16777216 << 4 !== -268435456) { \n $ERROR('#153: -16777216 << 4 === -268435456. Actual: ' + (-16777216 << 4)); \n} \n\n\nif (-33554432 << 4 !== -536870912) { \n $ERROR('#154: -33554432 << 4 === -536870912. Actual: ' + (-33554432 << 4)); \n} \n\n\nif (-67108864 << 4 !== -1073741824) { \n $ERROR('#155: -67108864 << 4 === -1073741824. Actual: ' + (-67108864 << 4)); \n} \n\n\nif (-134217728 << 4 !== -2147483648) { \n $ERROR('#156: -134217728 << 4 === -2147483648. Actual: ' + (-134217728 << 4)); \n} \n\n\nif (-268435456 << 4 !== 0) { \n $ERROR('#157: -268435456 << 4 === 0. Actual: ' + (-268435456 << 4)); \n} \n\n\nif (-536870912 << 4 !== 0) { \n $ERROR('#158: -536870912 << 4 === 0. Actual: ' + (-536870912 << 4)); \n} \n\n\nif (-1073741824 << 4 !== 0) { \n $ERROR('#159: -1073741824 << 4 === 0. Actual: ' + (-1073741824 << 4)); \n} \n\n\nif (-2147483648 << 4 !== 0) { \n $ERROR('#160: -2147483648 << 4 === 0. Actual: ' + (-2147483648 << 4)); \n} \n\n\nif (-1 << 5 !== -32) { \n $ERROR('#161: -1 << 5 === -32. Actual: ' + (-1 << 5)); \n} \n\n\nif (-2 << 5 !== -64) { \n $ERROR('#162: -2 << 5 === -64. Actual: ' + (-2 << 5)); \n} \n\n\nif (-4 << 5 !== -128) { \n $ERROR('#163: -4 << 5 === -128. Actual: ' + (-4 << 5)); \n} \n\n\nif (-8 << 5 !== -256) { \n $ERROR('#164: -8 << 5 === -256. Actual: ' + (-8 << 5)); \n} \n\n\nif (-16 << 5 !== -512) { \n $ERROR('#165: -16 << 5 === -512. Actual: ' + (-16 << 5)); \n} \n\n\nif (-32 << 5 !== -1024) { \n $ERROR('#166: -32 << 5 === -1024. Actual: ' + (-32 << 5)); \n} \n\n\nif (-64 << 5 !== -2048) { \n $ERROR('#167: -64 << 5 === -2048. Actual: ' + (-64 << 5)); \n} \n\n\nif (-128 << 5 !== -4096) { \n $ERROR('#168: -128 << 5 === -4096. Actual: ' + (-128 << 5)); \n} \n\n\nif (-256 << 5 !== -8192) { \n $ERROR('#169: -256 << 5 === -8192. Actual: ' + (-256 << 5)); \n} \n\n\nif (-512 << 5 !== -16384) { \n $ERROR('#170: -512 << 5 === -16384. Actual: ' + (-512 << 5)); \n} \n\n\nif (-1024 << 5 !== -32768) { \n $ERROR('#171: -1024 << 5 === -32768. Actual: ' + (-1024 << 5)); \n} \n\n\nif (-2048 << 5 !== -65536) { \n $ERROR('#172: -2048 << 5 === -65536. Actual: ' + (-2048 << 5)); \n} \n\n\nif (-4096 << 5 !== -131072) { \n $ERROR('#173: -4096 << 5 === -131072. Actual: ' + (-4096 << 5)); \n} \n\n\nif (-8192 << 5 !== -262144) { \n $ERROR('#174: -8192 << 5 === -262144. Actual: ' + (-8192 << 5)); \n} \n\n\nif (-16384 << 5 !== -524288) { \n $ERROR('#175: -16384 << 5 === -524288. Actual: ' + (-16384 << 5)); \n} \n\n\nif (-32768 << 5 !== -1048576) { \n $ERROR('#176: -32768 << 5 === -1048576. Actual: ' + (-32768 << 5)); \n} \n\n\nif (-65536 << 5 !== -2097152) { \n $ERROR('#177: -65536 << 5 === -2097152. Actual: ' + (-65536 << 5)); \n} \n\n\nif (-131072 << 5 !== -4194304) { \n $ERROR('#178: -131072 << 5 === -4194304. Actual: ' + (-131072 << 5)); \n} \n\n\nif (-262144 << 5 !== -8388608) { \n $ERROR('#179: -262144 << 5 === -8388608. Actual: ' + (-262144 << 5)); \n} \n\n\nif (-524288 << 5 !== -16777216) { \n $ERROR('#180: -524288 << 5 === -16777216. Actual: ' + (-524288 << 5)); \n} \n\n\nif (-1048576 << 5 !== -33554432) { \n $ERROR('#181: -1048576 << 5 === -33554432. Actual: ' + (-1048576 << 5)); \n} \n\n\nif (-2097152 << 5 !== -67108864) { \n $ERROR('#182: -2097152 << 5 === -67108864. Actual: ' + (-2097152 << 5)); \n} \n\n\nif (-4194304 << 5 !== -134217728) { \n $ERROR('#183: -4194304 << 5 === -134217728. Actual: ' + (-4194304 << 5)); \n} \n\n\nif (-8388608 << 5 !== -268435456) { \n $ERROR('#184: -8388608 << 5 === -268435456. Actual: ' + (-8388608 << 5)); \n} \n\n\nif (-16777216 << 5 !== -536870912) { \n $ERROR('#185: -16777216 << 5 === -536870912. Actual: ' + (-16777216 << 5)); \n} \n\n\nif (-33554432 << 5 !== -1073741824) { \n $ERROR('#186: -33554432 << 5 === -1073741824. Actual: ' + (-33554432 << 5)); \n} \n\n\nif (-67108864 << 5 !== -2147483648) { \n $ERROR('#187: -67108864 << 5 === -2147483648. Actual: ' + (-67108864 << 5)); \n} \n\n\nif (-134217728 << 5 !== 0) { \n $ERROR('#188: -134217728 << 5 === 0. Actual: ' + (-134217728 << 5)); \n} \n\n\nif (-268435456 << 5 !== 0) { \n $ERROR('#189: -268435456 << 5 === 0. Actual: ' + (-268435456 << 5)); \n} \n\n\nif (-536870912 << 5 !== 0) { \n $ERROR('#190: -536870912 << 5 === 0. Actual: ' + (-536870912 << 5)); \n} \n\n\nif (-1073741824 << 5 !== 0) { \n $ERROR('#191: -1073741824 << 5 === 0. Actual: ' + (-1073741824 << 5)); \n} \n\n\nif (-2147483648 << 5 !== 0) { \n $ERROR('#192: -2147483648 << 5 === 0. Actual: ' + (-2147483648 << 5)); \n} \n\n\nif (-1 << 6 !== -64) { \n $ERROR('#193: -1 << 6 === -64. Actual: ' + (-1 << 6)); \n} \n\n\nif (-2 << 6 !== -128) { \n $ERROR('#194: -2 << 6 === -128. Actual: ' + (-2 << 6)); \n} \n\n\nif (-4 << 6 !== -256) { \n $ERROR('#195: -4 << 6 === -256. Actual: ' + (-4 << 6)); \n} \n\n\nif (-8 << 6 !== -512) { \n $ERROR('#196: -8 << 6 === -512. Actual: ' + (-8 << 6)); \n} \n\n\nif (-16 << 6 !== -1024) { \n $ERROR('#197: -16 << 6 === -1024. Actual: ' + (-16 << 6)); \n} \n\n\nif (-32 << 6 !== -2048) { \n $ERROR('#198: -32 << 6 === -2048. Actual: ' + (-32 << 6)); \n} \n\n\nif (-64 << 6 !== -4096) { \n $ERROR('#199: -64 << 6 === -4096. Actual: ' + (-64 << 6)); \n} \n\n\nif (-128 << 6 !== -8192) { \n $ERROR('#200: -128 << 6 === -8192. Actual: ' + (-128 << 6)); \n} \n\n\nif (-256 << 6 !== -16384) { \n $ERROR('#201: -256 << 6 === -16384. Actual: ' + (-256 << 6)); \n} \n\n\nif (-512 << 6 !== -32768) { \n $ERROR('#202: -512 << 6 === -32768. Actual: ' + (-512 << 6)); \n} \n\n\nif (-1024 << 6 !== -65536) { \n $ERROR('#203: -1024 << 6 === -65536. Actual: ' + (-1024 << 6)); \n} \n\n\nif (-2048 << 6 !== -131072) { \n $ERROR('#204: -2048 << 6 === -131072. Actual: ' + (-2048 << 6)); \n} \n\n\nif (-4096 << 6 !== -262144) { \n $ERROR('#205: -4096 << 6 === -262144. Actual: ' + (-4096 << 6)); \n} \n\n\nif (-8192 << 6 !== -524288) { \n $ERROR('#206: -8192 << 6 === -524288. Actual: ' + (-8192 << 6)); \n} \n\n\nif (-16384 << 6 !== -1048576) { \n $ERROR('#207: -16384 << 6 === -1048576. Actual: ' + (-16384 << 6)); \n} \n\n\nif (-32768 << 6 !== -2097152) { \n $ERROR('#208: -32768 << 6 === -2097152. Actual: ' + (-32768 << 6)); \n} \n\n\nif (-65536 << 6 !== -4194304) { \n $ERROR('#209: -65536 << 6 === -4194304. Actual: ' + (-65536 << 6)); \n} \n\n\nif (-131072 << 6 !== -8388608) { \n $ERROR('#210: -131072 << 6 === -8388608. Actual: ' + (-131072 << 6)); \n} \n\n\nif (-262144 << 6 !== -16777216) { \n $ERROR('#211: -262144 << 6 === -16777216. Actual: ' + (-262144 << 6)); \n} \n\n\nif (-524288 << 6 !== -33554432) { \n $ERROR('#212: -524288 << 6 === -33554432. Actual: ' + (-524288 << 6)); \n} \n\n\nif (-1048576 << 6 !== -67108864) { \n $ERROR('#213: -1048576 << 6 === -67108864. Actual: ' + (-1048576 << 6)); \n} \n\n\nif (-2097152 << 6 !== -134217728) { \n $ERROR('#214: -2097152 << 6 === -134217728. Actual: ' + (-2097152 << 6)); \n} \n\n\nif (-4194304 << 6 !== -268435456) { \n $ERROR('#215: -4194304 << 6 === -268435456. Actual: ' + (-4194304 << 6)); \n} \n\n\nif (-8388608 << 6 !== -536870912) { \n $ERROR('#216: -8388608 << 6 === -536870912. Actual: ' + (-8388608 << 6)); \n} \n\n\nif (-16777216 << 6 !== -1073741824) { \n $ERROR('#217: -16777216 << 6 === -1073741824. Actual: ' + (-16777216 << 6)); \n} \n\n\nif (-33554432 << 6 !== -2147483648) { \n $ERROR('#218: -33554432 << 6 === -2147483648. Actual: ' + (-33554432 << 6)); \n} \n\n\nif (-67108864 << 6 !== 0) { \n $ERROR('#219: -67108864 << 6 === 0. Actual: ' + (-67108864 << 6)); \n} \n\n\nif (-134217728 << 6 !== 0) { \n $ERROR('#220: -134217728 << 6 === 0. Actual: ' + (-134217728 << 6)); \n} \n\n\nif (-268435456 << 6 !== 0) { \n $ERROR('#221: -268435456 << 6 === 0. Actual: ' + (-268435456 << 6)); \n} \n\n\nif (-536870912 << 6 !== 0) { \n $ERROR('#222: -536870912 << 6 === 0. Actual: ' + (-536870912 << 6)); \n} \n\n\nif (-1073741824 << 6 !== 0) { \n $ERROR('#223: -1073741824 << 6 === 0. Actual: ' + (-1073741824 << 6)); \n} \n\n\nif (-2147483648 << 6 !== 0) { \n $ERROR('#224: -2147483648 << 6 === 0. Actual: ' + (-2147483648 << 6)); \n} \n\n\nif (-1 << 7 !== -128) { \n $ERROR('#225: -1 << 7 === -128. Actual: ' + (-1 << 7)); \n} \n\n\nif (-2 << 7 !== -256) { \n $ERROR('#226: -2 << 7 === -256. Actual: ' + (-2 << 7)); \n} \n\n\nif (-4 << 7 !== -512) { \n $ERROR('#227: -4 << 7 === -512. Actual: ' + (-4 << 7)); \n} \n\n\nif (-8 << 7 !== -1024) { \n $ERROR('#228: -8 << 7 === -1024. Actual: ' + (-8 << 7)); \n} \n\n\nif (-16 << 7 !== -2048) { \n $ERROR('#229: -16 << 7 === -2048. Actual: ' + (-16 << 7)); \n} \n\n\nif (-32 << 7 !== -4096) { \n $ERROR('#230: -32 << 7 === -4096. Actual: ' + (-32 << 7)); \n} \n\n\nif (-64 << 7 !== -8192) { \n $ERROR('#231: -64 << 7 === -8192. Actual: ' + (-64 << 7)); \n} \n\n\nif (-128 << 7 !== -16384) { \n $ERROR('#232: -128 << 7 === -16384. Actual: ' + (-128 << 7)); \n} \n\n\nif (-256 << 7 !== -32768) { \n $ERROR('#233: -256 << 7 === -32768. Actual: ' + (-256 << 7)); \n} \n\n\nif (-512 << 7 !== -65536) { \n $ERROR('#234: -512 << 7 === -65536. Actual: ' + (-512 << 7)); \n} \n\n\nif (-1024 << 7 !== -131072) { \n $ERROR('#235: -1024 << 7 === -131072. Actual: ' + (-1024 << 7)); \n} \n\n\nif (-2048 << 7 !== -262144) { \n $ERROR('#236: -2048 << 7 === -262144. Actual: ' + (-2048 << 7)); \n} \n\n\nif (-4096 << 7 !== -524288) { \n $ERROR('#237: -4096 << 7 === -524288. Actual: ' + (-4096 << 7)); \n} \n\n\nif (-8192 << 7 !== -1048576) { \n $ERROR('#238: -8192 << 7 === -1048576. Actual: ' + (-8192 << 7)); \n} \n\n\nif (-16384 << 7 !== -2097152) { \n $ERROR('#239: -16384 << 7 === -2097152. Actual: ' + (-16384 << 7)); \n} \n\n\nif (-32768 << 7 !== -4194304) { \n $ERROR('#240: -32768 << 7 === -4194304. Actual: ' + (-32768 << 7)); \n} \n\n\nif (-65536 << 7 !== -8388608) { \n $ERROR('#241: -65536 << 7 === -8388608. Actual: ' + (-65536 << 7)); \n} \n\n\nif (-131072 << 7 !== -16777216) { \n $ERROR('#242: -131072 << 7 === -16777216. Actual: ' + (-131072 << 7)); \n} \n\n\nif (-262144 << 7 !== -33554432) { \n $ERROR('#243: -262144 << 7 === -33554432. Actual: ' + (-262144 << 7)); \n} \n\n\nif (-524288 << 7 !== -67108864) { \n $ERROR('#244: -524288 << 7 === -67108864. Actual: ' + (-524288 << 7)); \n} \n\n\nif (-1048576 << 7 !== -134217728) { \n $ERROR('#245: -1048576 << 7 === -134217728. Actual: ' + (-1048576 << 7)); \n} \n\n\nif (-2097152 << 7 !== -268435456) { \n $ERROR('#246: -2097152 << 7 === -268435456. Actual: ' + (-2097152 << 7)); \n} \n\n\nif (-4194304 << 7 !== -536870912) { \n $ERROR('#247: -4194304 << 7 === -536870912. Actual: ' + (-4194304 << 7)); \n} \n\n\nif (-8388608 << 7 !== -1073741824) { \n $ERROR('#248: -8388608 << 7 === -1073741824. Actual: ' + (-8388608 << 7)); \n} \n\n\nif (-16777216 << 7 !== -2147483648) { \n $ERROR('#249: -16777216 << 7 === -2147483648. Actual: ' + (-16777216 << 7)); \n} \n\n\nif (-33554432 << 7 !== 0) { \n $ERROR('#250: -33554432 << 7 === 0. Actual: ' + (-33554432 << 7)); \n} \n\n\nif (-67108864 << 7 !== 0) { \n $ERROR('#251: -67108864 << 7 === 0. Actual: ' + (-67108864 << 7)); \n} \n\n\nif (-134217728 << 7 !== 0) { \n $ERROR('#252: -134217728 << 7 === 0. Actual: ' + (-134217728 << 7)); \n} \n\n\nif (-268435456 << 7 !== 0) { \n $ERROR('#253: -268435456 << 7 === 0. Actual: ' + (-268435456 << 7)); \n} \n\n\nif (-536870912 << 7 !== 0) { \n $ERROR('#254: -536870912 << 7 === 0. Actual: ' + (-536870912 << 7)); \n} \n\n\nif (-1073741824 << 7 !== 0) { \n $ERROR('#255: -1073741824 << 7 === 0. Actual: ' + (-1073741824 << 7)); \n} \n\n\nif (-2147483648 << 7 !== 0) { \n $ERROR('#256: -2147483648 << 7 === 0. Actual: ' + (-2147483648 << 7)); \n} \n\n\nif (-1 << 8 !== -256) { \n $ERROR('#257: -1 << 8 === -256. Actual: ' + (-1 << 8)); \n} \n\n\nif (-2 << 8 !== -512) { \n $ERROR('#258: -2 << 8 === -512. Actual: ' + (-2 << 8)); \n} \n\n\nif (-4 << 8 !== -1024) { \n $ERROR('#259: -4 << 8 === -1024. Actual: ' + (-4 << 8)); \n} \n\n\nif (-8 << 8 !== -2048) { \n $ERROR('#260: -8 << 8 === -2048. Actual: ' + (-8 << 8)); \n} \n\n\nif (-16 << 8 !== -4096) { \n $ERROR('#261: -16 << 8 === -4096. Actual: ' + (-16 << 8)); \n} \n\n\nif (-32 << 8 !== -8192) { \n $ERROR('#262: -32 << 8 === -8192. Actual: ' + (-32 << 8)); \n} \n\n\nif (-64 << 8 !== -16384) { \n $ERROR('#263: -64 << 8 === -16384. Actual: ' + (-64 << 8)); \n} \n\n\nif (-128 << 8 !== -32768) { \n $ERROR('#264: -128 << 8 === -32768. Actual: ' + (-128 << 8)); \n} \n\n\nif (-256 << 8 !== -65536) { \n $ERROR('#265: -256 << 8 === -65536. Actual: ' + (-256 << 8)); \n} \n\n\nif (-512 << 8 !== -131072) { \n $ERROR('#266: -512 << 8 === -131072. Actual: ' + (-512 << 8)); \n} \n\n\nif (-1024 << 8 !== -262144) { \n $ERROR('#267: -1024 << 8 === -262144. Actual: ' + (-1024 << 8)); \n} \n\n\nif (-2048 << 8 !== -524288) { \n $ERROR('#268: -2048 << 8 === -524288. Actual: ' + (-2048 << 8)); \n} \n\n\nif (-4096 << 8 !== -1048576) { \n $ERROR('#269: -4096 << 8 === -1048576. Actual: ' + (-4096 << 8)); \n} \n\n\nif (-8192 << 8 !== -2097152) { \n $ERROR('#270: -8192 << 8 === -2097152. Actual: ' + (-8192 << 8)); \n} \n\n\nif (-16384 << 8 !== -4194304) { \n $ERROR('#271: -16384 << 8 === -4194304. Actual: ' + (-16384 << 8)); \n} \n\n\nif (-32768 << 8 !== -8388608) { \n $ERROR('#272: -32768 << 8 === -8388608. Actual: ' + (-32768 << 8)); \n} \n\n\nif (-65536 << 8 !== -16777216) { \n $ERROR('#273: -65536 << 8 === -16777216. Actual: ' + (-65536 << 8)); \n} \n\n\nif (-131072 << 8 !== -33554432) { \n $ERROR('#274: -131072 << 8 === -33554432. Actual: ' + (-131072 << 8)); \n} \n\n\nif (-262144 << 8 !== -67108864) { \n $ERROR('#275: -262144 << 8 === -67108864. Actual: ' + (-262144 << 8)); \n} \n\n\nif (-524288 << 8 !== -134217728) { \n $ERROR('#276: -524288 << 8 === -134217728. Actual: ' + (-524288 << 8)); \n} \n\n\nif (-1048576 << 8 !== -268435456) { \n $ERROR('#277: -1048576 << 8 === -268435456. Actual: ' + (-1048576 << 8)); \n} \n\n\nif (-2097152 << 8 !== -536870912) { \n $ERROR('#278: -2097152 << 8 === -536870912. Actual: ' + (-2097152 << 8)); \n} \n\n\nif (-4194304 << 8 !== -1073741824) { \n $ERROR('#279: -4194304 << 8 === -1073741824. Actual: ' + (-4194304 << 8)); \n} \n\n\nif (-8388608 << 8 !== -2147483648) { \n $ERROR('#280: -8388608 << 8 === -2147483648. Actual: ' + (-8388608 << 8)); \n} \n\n\nif (-16777216 << 8 !== 0) { \n $ERROR('#281: -16777216 << 8 === 0. Actual: ' + (-16777216 << 8)); \n} \n\n\nif (-33554432 << 8 !== 0) { \n $ERROR('#282: -33554432 << 8 === 0. Actual: ' + (-33554432 << 8)); \n} \n\n\nif (-67108864 << 8 !== 0) { \n $ERROR('#283: -67108864 << 8 === 0. Actual: ' + (-67108864 << 8)); \n} \n\n\nif (-134217728 << 8 !== 0) { \n $ERROR('#284: -134217728 << 8 === 0. Actual: ' + (-134217728 << 8)); \n} \n\n\nif (-268435456 << 8 !== 0) { \n $ERROR('#285: -268435456 << 8 === 0. Actual: ' + (-268435456 << 8)); \n} \n\n\nif (-536870912 << 8 !== 0) { \n $ERROR('#286: -536870912 << 8 === 0. Actual: ' + (-536870912 << 8)); \n} \n\n\nif (-1073741824 << 8 !== 0) { \n $ERROR('#287: -1073741824 << 8 === 0. Actual: ' + (-1073741824 << 8)); \n} \n\n\nif (-2147483648 << 8 !== 0) { \n $ERROR('#288: -2147483648 << 8 === 0. Actual: ' + (-2147483648 << 8)); \n} \n\n\nif (-1 << 9 !== -512) { \n $ERROR('#289: -1 << 9 === -512. Actual: ' + (-1 << 9)); \n} \n\n\nif (-2 << 9 !== -1024) { \n $ERROR('#290: -2 << 9 === -1024. Actual: ' + (-2 << 9)); \n} \n\n\nif (-4 << 9 !== -2048) { \n $ERROR('#291: -4 << 9 === -2048. Actual: ' + (-4 << 9)); \n} \n\n\nif (-8 << 9 !== -4096) { \n $ERROR('#292: -8 << 9 === -4096. Actual: ' + (-8 << 9)); \n} \n\n\nif (-16 << 9 !== -8192) { \n $ERROR('#293: -16 << 9 === -8192. Actual: ' + (-16 << 9)); \n} \n\n\nif (-32 << 9 !== -16384) { \n $ERROR('#294: -32 << 9 === -16384. Actual: ' + (-32 << 9)); \n} \n\n\nif (-64 << 9 !== -32768) { \n $ERROR('#295: -64 << 9 === -32768. Actual: ' + (-64 << 9)); \n} \n\n\nif (-128 << 9 !== -65536) { \n $ERROR('#296: -128 << 9 === -65536. Actual: ' + (-128 << 9)); \n} \n\n\nif (-256 << 9 !== -131072) { \n $ERROR('#297: -256 << 9 === -131072. Actual: ' + (-256 << 9)); \n} \n\n\nif (-512 << 9 !== -262144) { \n $ERROR('#298: -512 << 9 === -262144. Actual: ' + (-512 << 9)); \n} \n\n\nif (-1024 << 9 !== -524288) { \n $ERROR('#299: -1024 << 9 === -524288. Actual: ' + (-1024 << 9)); \n} \n\n\nif (-2048 << 9 !== -1048576) { \n $ERROR('#300: -2048 << 9 === -1048576. Actual: ' + (-2048 << 9)); \n} \n\n\nif (-4096 << 9 !== -2097152) { \n $ERROR('#301: -4096 << 9 === -2097152. Actual: ' + (-4096 << 9)); \n} \n\n\nif (-8192 << 9 !== -4194304) { \n $ERROR('#302: -8192 << 9 === -4194304. Actual: ' + (-8192 << 9)); \n} \n\n\nif (-16384 << 9 !== -8388608) { \n $ERROR('#303: -16384 << 9 === -8388608. Actual: ' + (-16384 << 9)); \n} \n\n\nif (-32768 << 9 !== -16777216) { \n $ERROR('#304: -32768 << 9 === -16777216. Actual: ' + (-32768 << 9)); \n} \n\n\nif (-65536 << 9 !== -33554432) { \n $ERROR('#305: -65536 << 9 === -33554432. Actual: ' + (-65536 << 9)); \n} \n\n\nif (-131072 << 9 !== -67108864) { \n $ERROR('#306: -131072 << 9 === -67108864. Actual: ' + (-131072 << 9)); \n} \n\n\nif (-262144 << 9 !== -134217728) { \n $ERROR('#307: -262144 << 9 === -134217728. Actual: ' + (-262144 << 9)); \n} \n\n\nif (-524288 << 9 !== -268435456) { \n $ERROR('#308: -524288 << 9 === -268435456. Actual: ' + (-524288 << 9)); \n} \n\n\nif (-1048576 << 9 !== -536870912) { \n $ERROR('#309: -1048576 << 9 === -536870912. Actual: ' + (-1048576 << 9)); \n} \n\n\nif (-2097152 << 9 !== -1073741824) { \n $ERROR('#310: -2097152 << 9 === -1073741824. Actual: ' + (-2097152 << 9)); \n} \n\n\nif (-4194304 << 9 !== -2147483648) { \n $ERROR('#311: -4194304 << 9 === -2147483648. Actual: ' + (-4194304 << 9)); \n} \n\n\nif (-8388608 << 9 !== 0) { \n $ERROR('#312: -8388608 << 9 === 0. Actual: ' + (-8388608 << 9)); \n} \n\n\nif (-16777216 << 9 !== 0) { \n $ERROR('#313: -16777216 << 9 === 0. Actual: ' + (-16777216 << 9)); \n} \n\n\nif (-33554432 << 9 !== 0) { \n $ERROR('#314: -33554432 << 9 === 0. Actual: ' + (-33554432 << 9)); \n} \n\n\nif (-67108864 << 9 !== 0) { \n $ERROR('#315: -67108864 << 9 === 0. Actual: ' + (-67108864 << 9)); \n} \n\n\nif (-134217728 << 9 !== 0) { \n $ERROR('#316: -134217728 << 9 === 0. Actual: ' + (-134217728 << 9)); \n} \n\n\nif (-268435456 << 9 !== 0) { \n $ERROR('#317: -268435456 << 9 === 0. Actual: ' + (-268435456 << 9)); \n} \n\n\nif (-536870912 << 9 !== 0) { \n $ERROR('#318: -536870912 << 9 === 0. Actual: ' + (-536870912 << 9)); \n} \n\n\nif (-1073741824 << 9 !== 0) { \n $ERROR('#319: -1073741824 << 9 === 0. Actual: ' + (-1073741824 << 9)); \n} \n\n\nif (-2147483648 << 9 !== 0) { \n $ERROR('#320: -2147483648 << 9 === 0. Actual: ' + (-2147483648 << 9)); \n} \n\n\nif (-1 << 10 !== -1024) { \n $ERROR('#321: -1 << 10 === -1024. Actual: ' + (-1 << 10)); \n} \n\n\nif (-2 << 10 !== -2048) { \n $ERROR('#322: -2 << 10 === -2048. Actual: ' + (-2 << 10)); \n} \n\n\nif (-4 << 10 !== -4096) { \n $ERROR('#323: -4 << 10 === -4096. Actual: ' + (-4 << 10)); \n} \n\n\nif (-8 << 10 !== -8192) { \n $ERROR('#324: -8 << 10 === -8192. Actual: ' + (-8 << 10)); \n} \n\n\nif (-16 << 10 !== -16384) { \n $ERROR('#325: -16 << 10 === -16384. Actual: ' + (-16 << 10)); \n} \n\n\nif (-32 << 10 !== -32768) { \n $ERROR('#326: -32 << 10 === -32768. Actual: ' + (-32 << 10)); \n} \n\n\nif (-64 << 10 !== -65536) { \n $ERROR('#327: -64 << 10 === -65536. Actual: ' + (-64 << 10)); \n} \n\n\nif (-128 << 10 !== -131072) { \n $ERROR('#328: -128 << 10 === -131072. Actual: ' + (-128 << 10)); \n} \n\n\nif (-256 << 10 !== -262144) { \n $ERROR('#329: -256 << 10 === -262144. Actual: ' + (-256 << 10)); \n} \n\n\nif (-512 << 10 !== -524288) { \n $ERROR('#330: -512 << 10 === -524288. Actual: ' + (-512 << 10)); \n} \n\n\nif (-1024 << 10 !== -1048576) { \n $ERROR('#331: -1024 << 10 === -1048576. Actual: ' + (-1024 << 10)); \n} \n\n\nif (-2048 << 10 !== -2097152) { \n $ERROR('#332: -2048 << 10 === -2097152. Actual: ' + (-2048 << 10)); \n} \n\n\nif (-4096 << 10 !== -4194304) { \n $ERROR('#333: -4096 << 10 === -4194304. Actual: ' + (-4096 << 10)); \n} \n\n\nif (-8192 << 10 !== -8388608) { \n $ERROR('#334: -8192 << 10 === -8388608. Actual: ' + (-8192 << 10)); \n} \n\n\nif (-16384 << 10 !== -16777216) { \n $ERROR('#335: -16384 << 10 === -16777216. Actual: ' + (-16384 << 10)); \n} \n\n\nif (-32768 << 10 !== -33554432) { \n $ERROR('#336: -32768 << 10 === -33554432. Actual: ' + (-32768 << 10)); \n} \n\n\nif (-65536 << 10 !== -67108864) { \n $ERROR('#337: -65536 << 10 === -67108864. Actual: ' + (-65536 << 10)); \n} \n\n\nif (-131072 << 10 !== -134217728) { \n $ERROR('#338: -131072 << 10 === -134217728. Actual: ' + (-131072 << 10)); \n} \n\n\nif (-262144 << 10 !== -268435456) { \n $ERROR('#339: -262144 << 10 === -268435456. Actual: ' + (-262144 << 10)); \n} \n\n\nif (-524288 << 10 !== -536870912) { \n $ERROR('#340: -524288 << 10 === -536870912. Actual: ' + (-524288 << 10)); \n} \n\n\nif (-1048576 << 10 !== -1073741824) { \n $ERROR('#341: -1048576 << 10 === -1073741824. Actual: ' + (-1048576 << 10)); \n} \n\n\nif (-2097152 << 10 !== -2147483648) { \n $ERROR('#342: -2097152 << 10 === -2147483648. Actual: ' + (-2097152 << 10)); \n} \n\n\nif (-4194304 << 10 !== 0) { \n $ERROR('#343: -4194304 << 10 === 0. Actual: ' + (-4194304 << 10)); \n} \n\n\nif (-8388608 << 10 !== 0) { \n $ERROR('#344: -8388608 << 10 === 0. Actual: ' + (-8388608 << 10)); \n} \n\n\nif (-16777216 << 10 !== 0) { \n $ERROR('#345: -16777216 << 10 === 0. Actual: ' + (-16777216 << 10)); \n} \n\n\nif (-33554432 << 10 !== 0) { \n $ERROR('#346: -33554432 << 10 === 0. Actual: ' + (-33554432 << 10)); \n} \n\n\nif (-67108864 << 10 !== 0) { \n $ERROR('#347: -67108864 << 10 === 0. Actual: ' + (-67108864 << 10)); \n} \n\n\nif (-134217728 << 10 !== 0) { \n $ERROR('#348: -134217728 << 10 === 0. Actual: ' + (-134217728 << 10)); \n} \n\n\nif (-268435456 << 10 !== 0) { \n $ERROR('#349: -268435456 << 10 === 0. Actual: ' + (-268435456 << 10)); \n} \n\n\nif (-536870912 << 10 !== 0) { \n $ERROR('#350: -536870912 << 10 === 0. Actual: ' + (-536870912 << 10)); \n} \n\n\nif (-1073741824 << 10 !== 0) { \n $ERROR('#351: -1073741824 << 10 === 0. Actual: ' + (-1073741824 << 10)); \n} \n\n\nif (-2147483648 << 10 !== 0) { \n $ERROR('#352: -2147483648 << 10 === 0. Actual: ' + (-2147483648 << 10)); \n} \n\n\nif (-1 << 11 !== -2048) { \n $ERROR('#353: -1 << 11 === -2048. Actual: ' + (-1 << 11)); \n} \n\n\nif (-2 << 11 !== -4096) { \n $ERROR('#354: -2 << 11 === -4096. Actual: ' + (-2 << 11)); \n} \n\n\nif (-4 << 11 !== -8192) { \n $ERROR('#355: -4 << 11 === -8192. Actual: ' + (-4 << 11)); \n} \n\n\nif (-8 << 11 !== -16384) { \n $ERROR('#356: -8 << 11 === -16384. Actual: ' + (-8 << 11)); \n} \n\n\nif (-16 << 11 !== -32768) { \n $ERROR('#357: -16 << 11 === -32768. Actual: ' + (-16 << 11)); \n} \n\n\nif (-32 << 11 !== -65536) { \n $ERROR('#358: -32 << 11 === -65536. Actual: ' + (-32 << 11)); \n} \n\n\nif (-64 << 11 !== -131072) { \n $ERROR('#359: -64 << 11 === -131072. Actual: ' + (-64 << 11)); \n} \n\n\nif (-128 << 11 !== -262144) { \n $ERROR('#360: -128 << 11 === -262144. Actual: ' + (-128 << 11)); \n} \n\n\nif (-256 << 11 !== -524288) { \n $ERROR('#361: -256 << 11 === -524288. Actual: ' + (-256 << 11)); \n} \n\n\nif (-512 << 11 !== -1048576) { \n $ERROR('#362: -512 << 11 === -1048576. Actual: ' + (-512 << 11)); \n} \n\n\nif (-1024 << 11 !== -2097152) { \n $ERROR('#363: -1024 << 11 === -2097152. Actual: ' + (-1024 << 11)); \n} \n\n\nif (-2048 << 11 !== -4194304) { \n $ERROR('#364: -2048 << 11 === -4194304. Actual: ' + (-2048 << 11)); \n} \n\n\nif (-4096 << 11 !== -8388608) { \n $ERROR('#365: -4096 << 11 === -8388608. Actual: ' + (-4096 << 11)); \n} \n\n\nif (-8192 << 11 !== -16777216) { \n $ERROR('#366: -8192 << 11 === -16777216. Actual: ' + (-8192 << 11)); \n} \n\n\nif (-16384 << 11 !== -33554432) { \n $ERROR('#367: -16384 << 11 === -33554432. Actual: ' + (-16384 << 11)); \n} \n\n\nif (-32768 << 11 !== -67108864) { \n $ERROR('#368: -32768 << 11 === -67108864. Actual: ' + (-32768 << 11)); \n} \n\n\nif (-65536 << 11 !== -134217728) { \n $ERROR('#369: -65536 << 11 === -134217728. Actual: ' + (-65536 << 11)); \n} \n\n\nif (-131072 << 11 !== -268435456) { \n $ERROR('#370: -131072 << 11 === -268435456. Actual: ' + (-131072 << 11)); \n} \n\n\nif (-262144 << 11 !== -536870912) { \n $ERROR('#371: -262144 << 11 === -536870912. Actual: ' + (-262144 << 11)); \n} \n\n\nif (-524288 << 11 !== -1073741824) { \n $ERROR('#372: -524288 << 11 === -1073741824. Actual: ' + (-524288 << 11)); \n} \n\n\nif (-1048576 << 11 !== -2147483648) { \n $ERROR('#373: -1048576 << 11 === -2147483648. Actual: ' + (-1048576 << 11)); \n} \n\n\nif (-2097152 << 11 !== 0) { \n $ERROR('#374: -2097152 << 11 === 0. Actual: ' + (-2097152 << 11)); \n} \n\n\nif (-4194304 << 11 !== 0) { \n $ERROR('#375: -4194304 << 11 === 0. Actual: ' + (-4194304 << 11)); \n} \n\n\nif (-8388608 << 11 !== 0) { \n $ERROR('#376: -8388608 << 11 === 0. Actual: ' + (-8388608 << 11)); \n} \n\n\nif (-16777216 << 11 !== 0) { \n $ERROR('#377: -16777216 << 11 === 0. Actual: ' + (-16777216 << 11)); \n} \n\n\nif (-33554432 << 11 !== 0) { \n $ERROR('#378: -33554432 << 11 === 0. Actual: ' + (-33554432 << 11)); \n} \n\n\nif (-67108864 << 11 !== 0) { \n $ERROR('#379: -67108864 << 11 === 0. Actual: ' + (-67108864 << 11)); \n} \n\n\nif (-134217728 << 11 !== 0) { \n $ERROR('#380: -134217728 << 11 === 0. Actual: ' + (-134217728 << 11)); \n} \n\n\nif (-268435456 << 11 !== 0) { \n $ERROR('#381: -268435456 << 11 === 0. Actual: ' + (-268435456 << 11)); \n} \n\n\nif (-536870912 << 11 !== 0) { \n $ERROR('#382: -536870912 << 11 === 0. Actual: ' + (-536870912 << 11)); \n} \n\n\nif (-1073741824 << 11 !== 0) { \n $ERROR('#383: -1073741824 << 11 === 0. Actual: ' + (-1073741824 << 11)); \n} \n\n\nif (-2147483648 << 11 !== 0) { \n $ERROR('#384: -2147483648 << 11 === 0. Actual: ' + (-2147483648 << 11)); \n} \n\n\nif (-1 << 12 !== -4096) { \n $ERROR('#385: -1 << 12 === -4096. Actual: ' + (-1 << 12)); \n} \n\n\nif (-2 << 12 !== -8192) { \n $ERROR('#386: -2 << 12 === -8192. Actual: ' + (-2 << 12)); \n} \n\n\nif (-4 << 12 !== -16384) { \n $ERROR('#387: -4 << 12 === -16384. Actual: ' + (-4 << 12)); \n} \n\n\nif (-8 << 12 !== -32768) { \n $ERROR('#388: -8 << 12 === -32768. Actual: ' + (-8 << 12)); \n} \n\n\nif (-16 << 12 !== -65536) { \n $ERROR('#389: -16 << 12 === -65536. Actual: ' + (-16 << 12)); \n} \n\n\nif (-32 << 12 !== -131072) { \n $ERROR('#390: -32 << 12 === -131072. Actual: ' + (-32 << 12)); \n} \n\n\nif (-64 << 12 !== -262144) { \n $ERROR('#391: -64 << 12 === -262144. Actual: ' + (-64 << 12)); \n} \n\n\nif (-128 << 12 !== -524288) { \n $ERROR('#392: -128 << 12 === -524288. Actual: ' + (-128 << 12)); \n} \n\n\nif (-256 << 12 !== -1048576) { \n $ERROR('#393: -256 << 12 === -1048576. Actual: ' + (-256 << 12)); \n} \n\n\nif (-512 << 12 !== -2097152) { \n $ERROR('#394: -512 << 12 === -2097152. Actual: ' + (-512 << 12)); \n} \n\n\nif (-1024 << 12 !== -4194304) { \n $ERROR('#395: -1024 << 12 === -4194304. Actual: ' + (-1024 << 12)); \n} \n\n\nif (-2048 << 12 !== -8388608) { \n $ERROR('#396: -2048 << 12 === -8388608. Actual: ' + (-2048 << 12)); \n} \n\n\nif (-4096 << 12 !== -16777216) { \n $ERROR('#397: -4096 << 12 === -16777216. Actual: ' + (-4096 << 12)); \n} \n\n\nif (-8192 << 12 !== -33554432) { \n $ERROR('#398: -8192 << 12 === -33554432. Actual: ' + (-8192 << 12)); \n} \n\n\nif (-16384 << 12 !== -67108864) { \n $ERROR('#399: -16384 << 12 === -67108864. Actual: ' + (-16384 << 12)); \n} \n\n\nif (-32768 << 12 !== -134217728) { \n $ERROR('#400: -32768 << 12 === -134217728. Actual: ' + (-32768 << 12)); \n} \n\n\nif (-65536 << 12 !== -268435456) { \n $ERROR('#401: -65536 << 12 === -268435456. Actual: ' + (-65536 << 12)); \n} \n\n\nif (-131072 << 12 !== -536870912) { \n $ERROR('#402: -131072 << 12 === -536870912. Actual: ' + (-131072 << 12)); \n} \n\n\nif (-262144 << 12 !== -1073741824) { \n $ERROR('#403: -262144 << 12 === -1073741824. Actual: ' + (-262144 << 12)); \n} \n\n\nif (-524288 << 12 !== -2147483648) { \n $ERROR('#404: -524288 << 12 === -2147483648. Actual: ' + (-524288 << 12)); \n} \n\n\nif (-1048576 << 12 !== 0) { \n $ERROR('#405: -1048576 << 12 === 0. Actual: ' + (-1048576 << 12)); \n} \n\n\nif (-2097152 << 12 !== 0) { \n $ERROR('#406: -2097152 << 12 === 0. Actual: ' + (-2097152 << 12)); \n} \n\n\nif (-4194304 << 12 !== 0) { \n $ERROR('#407: -4194304 << 12 === 0. Actual: ' + (-4194304 << 12)); \n} \n\n\nif (-8388608 << 12 !== 0) { \n $ERROR('#408: -8388608 << 12 === 0. Actual: ' + (-8388608 << 12)); \n} \n\n\nif (-16777216 << 12 !== 0) { \n $ERROR('#409: -16777216 << 12 === 0. Actual: ' + (-16777216 << 12)); \n} \n\n\nif (-33554432 << 12 !== 0) { \n $ERROR('#410: -33554432 << 12 === 0. Actual: ' + (-33554432 << 12)); \n} \n\n\nif (-67108864 << 12 !== 0) { \n $ERROR('#411: -67108864 << 12 === 0. Actual: ' + (-67108864 << 12)); \n} \n\n\nif (-134217728 << 12 !== 0) { \n $ERROR('#412: -134217728 << 12 === 0. Actual: ' + (-134217728 << 12)); \n} \n\n\nif (-268435456 << 12 !== 0) { \n $ERROR('#413: -268435456 << 12 === 0. Actual: ' + (-268435456 << 12)); \n} \n\n\nif (-536870912 << 12 !== 0) { \n $ERROR('#414: -536870912 << 12 === 0. Actual: ' + (-536870912 << 12)); \n} \n\n\nif (-1073741824 << 12 !== 0) { \n $ERROR('#415: -1073741824 << 12 === 0. Actual: ' + (-1073741824 << 12)); \n} \n\n\nif (-2147483648 << 12 !== 0) { \n $ERROR('#416: -2147483648 << 12 === 0. Actual: ' + (-2147483648 << 12)); \n} \n\n\nif (-1 << 13 !== -8192) { \n $ERROR('#417: -1 << 13 === -8192. Actual: ' + (-1 << 13)); \n} \n\n\nif (-2 << 13 !== -16384) { \n $ERROR('#418: -2 << 13 === -16384. Actual: ' + (-2 << 13)); \n} \n\n\nif (-4 << 13 !== -32768) { \n $ERROR('#419: -4 << 13 === -32768. Actual: ' + (-4 << 13)); \n} \n\n\nif (-8 << 13 !== -65536) { \n $ERROR('#420: -8 << 13 === -65536. Actual: ' + (-8 << 13)); \n} \n\n\nif (-16 << 13 !== -131072) { \n $ERROR('#421: -16 << 13 === -131072. Actual: ' + (-16 << 13)); \n} \n\n\nif (-32 << 13 !== -262144) { \n $ERROR('#422: -32 << 13 === -262144. Actual: ' + (-32 << 13)); \n} \n\n\nif (-64 << 13 !== -524288) { \n $ERROR('#423: -64 << 13 === -524288. Actual: ' + (-64 << 13)); \n} \n\n\nif (-128 << 13 !== -1048576) { \n $ERROR('#424: -128 << 13 === -1048576. Actual: ' + (-128 << 13)); \n} \n\n\nif (-256 << 13 !== -2097152) { \n $ERROR('#425: -256 << 13 === -2097152. Actual: ' + (-256 << 13)); \n} \n\n\nif (-512 << 13 !== -4194304) { \n $ERROR('#426: -512 << 13 === -4194304. Actual: ' + (-512 << 13)); \n} \n\n\nif (-1024 << 13 !== -8388608) { \n $ERROR('#427: -1024 << 13 === -8388608. Actual: ' + (-1024 << 13)); \n} \n\n\nif (-2048 << 13 !== -16777216) { \n $ERROR('#428: -2048 << 13 === -16777216. Actual: ' + (-2048 << 13)); \n} \n\n\nif (-4096 << 13 !== -33554432) { \n $ERROR('#429: -4096 << 13 === -33554432. Actual: ' + (-4096 << 13)); \n} \n\n\nif (-8192 << 13 !== -67108864) { \n $ERROR('#430: -8192 << 13 === -67108864. Actual: ' + (-8192 << 13)); \n} \n\n\nif (-16384 << 13 !== -134217728) { \n $ERROR('#431: -16384 << 13 === -134217728. Actual: ' + (-16384 << 13)); \n} \n\n\nif (-32768 << 13 !== -268435456) { \n $ERROR('#432: -32768 << 13 === -268435456. Actual: ' + (-32768 << 13)); \n} \n\n\nif (-65536 << 13 !== -536870912) { \n $ERROR('#433: -65536 << 13 === -536870912. Actual: ' + (-65536 << 13)); \n} \n\n\nif (-131072 << 13 !== -1073741824) { \n $ERROR('#434: -131072 << 13 === -1073741824. Actual: ' + (-131072 << 13)); \n} \n\n\nif (-262144 << 13 !== -2147483648) { \n $ERROR('#435: -262144 << 13 === -2147483648. Actual: ' + (-262144 << 13)); \n} \n\n\nif (-524288 << 13 !== 0) { \n $ERROR('#436: -524288 << 13 === 0. Actual: ' + (-524288 << 13)); \n} \n\n\nif (-1048576 << 13 !== 0) { \n $ERROR('#437: -1048576 << 13 === 0. Actual: ' + (-1048576 << 13)); \n} \n\n\nif (-2097152 << 13 !== 0) { \n $ERROR('#438: -2097152 << 13 === 0. Actual: ' + (-2097152 << 13)); \n} \n\n\nif (-4194304 << 13 !== 0) { \n $ERROR('#439: -4194304 << 13 === 0. Actual: ' + (-4194304 << 13)); \n} \n\n\nif (-8388608 << 13 !== 0) { \n $ERROR('#440: -8388608 << 13 === 0. Actual: ' + (-8388608 << 13)); \n} \n\n\nif (-16777216 << 13 !== 0) { \n $ERROR('#441: -16777216 << 13 === 0. Actual: ' + (-16777216 << 13)); \n} \n\n\nif (-33554432 << 13 !== 0) { \n $ERROR('#442: -33554432 << 13 === 0. Actual: ' + (-33554432 << 13)); \n} \n\n\nif (-67108864 << 13 !== 0) { \n $ERROR('#443: -67108864 << 13 === 0. Actual: ' + (-67108864 << 13)); \n} \n\n\nif (-134217728 << 13 !== 0) { \n $ERROR('#444: -134217728 << 13 === 0. Actual: ' + (-134217728 << 13)); \n} \n\n\nif (-268435456 << 13 !== 0) { \n $ERROR('#445: -268435456 << 13 === 0. Actual: ' + (-268435456 << 13)); \n} \n\n\nif (-536870912 << 13 !== 0) { \n $ERROR('#446: -536870912 << 13 === 0. Actual: ' + (-536870912 << 13)); \n} \n\n\nif (-1073741824 << 13 !== 0) { \n $ERROR('#447: -1073741824 << 13 === 0. Actual: ' + (-1073741824 << 13)); \n} \n\n\nif (-2147483648 << 13 !== 0) { \n $ERROR('#448: -2147483648 << 13 === 0. Actual: ' + (-2147483648 << 13)); \n} \n\n\nif (-1 << 14 !== -16384) { \n $ERROR('#449: -1 << 14 === -16384. Actual: ' + (-1 << 14)); \n} \n\n\nif (-2 << 14 !== -32768) { \n $ERROR('#450: -2 << 14 === -32768. Actual: ' + (-2 << 14)); \n} \n\n\nif (-4 << 14 !== -65536) { \n $ERROR('#451: -4 << 14 === -65536. Actual: ' + (-4 << 14)); \n} \n\n\nif (-8 << 14 !== -131072) { \n $ERROR('#452: -8 << 14 === -131072. Actual: ' + (-8 << 14)); \n} \n\n\nif (-16 << 14 !== -262144) { \n $ERROR('#453: -16 << 14 === -262144. Actual: ' + (-16 << 14)); \n} \n\n\nif (-32 << 14 !== -524288) { \n $ERROR('#454: -32 << 14 === -524288. Actual: ' + (-32 << 14)); \n} \n\n\nif (-64 << 14 !== -1048576) { \n $ERROR('#455: -64 << 14 === -1048576. Actual: ' + (-64 << 14)); \n} \n\n\nif (-128 << 14 !== -2097152) { \n $ERROR('#456: -128 << 14 === -2097152. Actual: ' + (-128 << 14)); \n} \n\n\nif (-256 << 14 !== -4194304) { \n $ERROR('#457: -256 << 14 === -4194304. Actual: ' + (-256 << 14)); \n} \n\n\nif (-512 << 14 !== -8388608) { \n $ERROR('#458: -512 << 14 === -8388608. Actual: ' + (-512 << 14)); \n} \n\n\nif (-1024 << 14 !== -16777216) { \n $ERROR('#459: -1024 << 14 === -16777216. Actual: ' + (-1024 << 14)); \n} \n\n\nif (-2048 << 14 !== -33554432) { \n $ERROR('#460: -2048 << 14 === -33554432. Actual: ' + (-2048 << 14)); \n} \n\n\nif (-4096 << 14 !== -67108864) { \n $ERROR('#461: -4096 << 14 === -67108864. Actual: ' + (-4096 << 14)); \n} \n\n\nif (-8192 << 14 !== -134217728) { \n $ERROR('#462: -8192 << 14 === -134217728. Actual: ' + (-8192 << 14)); \n} \n\n\nif (-16384 << 14 !== -268435456) { \n $ERROR('#463: -16384 << 14 === -268435456. Actual: ' + (-16384 << 14)); \n} \n\n\nif (-32768 << 14 !== -536870912) { \n $ERROR('#464: -32768 << 14 === -536870912. Actual: ' + (-32768 << 14)); \n} \n\n\nif (-65536 << 14 !== -1073741824) { \n $ERROR('#465: -65536 << 14 === -1073741824. Actual: ' + (-65536 << 14)); \n} \n\n\nif (-131072 << 14 !== -2147483648) { \n $ERROR('#466: -131072 << 14 === -2147483648. Actual: ' + (-131072 << 14)); \n} \n\n\nif (-262144 << 14 !== 0) { \n $ERROR('#467: -262144 << 14 === 0. Actual: ' + (-262144 << 14)); \n} \n\n\nif (-524288 << 14 !== 0) { \n $ERROR('#468: -524288 << 14 === 0. Actual: ' + (-524288 << 14)); \n} \n\n\nif (-1048576 << 14 !== 0) { \n $ERROR('#469: -1048576 << 14 === 0. Actual: ' + (-1048576 << 14)); \n} \n\n\nif (-2097152 << 14 !== 0) { \n $ERROR('#470: -2097152 << 14 === 0. Actual: ' + (-2097152 << 14)); \n} \n\n\nif (-4194304 << 14 !== 0) { \n $ERROR('#471: -4194304 << 14 === 0. Actual: ' + (-4194304 << 14)); \n} \n\n\nif (-8388608 << 14 !== 0) { \n $ERROR('#472: -8388608 << 14 === 0. Actual: ' + (-8388608 << 14)); \n} \n\n\nif (-16777216 << 14 !== 0) { \n $ERROR('#473: -16777216 << 14 === 0. Actual: ' + (-16777216 << 14)); \n} \n\n\nif (-33554432 << 14 !== 0) { \n $ERROR('#474: -33554432 << 14 === 0. Actual: ' + (-33554432 << 14)); \n} \n\n\nif (-67108864 << 14 !== 0) { \n $ERROR('#475: -67108864 << 14 === 0. Actual: ' + (-67108864 << 14)); \n} \n\n\nif (-134217728 << 14 !== 0) { \n $ERROR('#476: -134217728 << 14 === 0. Actual: ' + (-134217728 << 14)); \n} \n\n\nif (-268435456 << 14 !== 0) { \n $ERROR('#477: -268435456 << 14 === 0. Actual: ' + (-268435456 << 14)); \n} \n\n\nif (-536870912 << 14 !== 0) { \n $ERROR('#478: -536870912 << 14 === 0. Actual: ' + (-536870912 << 14)); \n} \n\n\nif (-1073741824 << 14 !== 0) { \n $ERROR('#479: -1073741824 << 14 === 0. Actual: ' + (-1073741824 << 14)); \n} \n\n\nif (-2147483648 << 14 !== 0) { \n $ERROR('#480: -2147483648 << 14 === 0. Actual: ' + (-2147483648 << 14)); \n} \n\n\nif (-1 << 15 !== -32768) { \n $ERROR('#481: -1 << 15 === -32768. Actual: ' + (-1 << 15)); \n} \n\n\nif (-2 << 15 !== -65536) { \n $ERROR('#482: -2 << 15 === -65536. Actual: ' + (-2 << 15)); \n} \n\n\nif (-4 << 15 !== -131072) { \n $ERROR('#483: -4 << 15 === -131072. Actual: ' + (-4 << 15)); \n} \n\n\nif (-8 << 15 !== -262144) { \n $ERROR('#484: -8 << 15 === -262144. Actual: ' + (-8 << 15)); \n} \n\n\nif (-16 << 15 !== -524288) { \n $ERROR('#485: -16 << 15 === -524288. Actual: ' + (-16 << 15)); \n} \n\n\nif (-32 << 15 !== -1048576) { \n $ERROR('#486: -32 << 15 === -1048576. Actual: ' + (-32 << 15)); \n} \n\n\nif (-64 << 15 !== -2097152) { \n $ERROR('#487: -64 << 15 === -2097152. Actual: ' + (-64 << 15)); \n} \n\n\nif (-128 << 15 !== -4194304) { \n $ERROR('#488: -128 << 15 === -4194304. Actual: ' + (-128 << 15)); \n} \n\n\nif (-256 << 15 !== -8388608) { \n $ERROR('#489: -256 << 15 === -8388608. Actual: ' + (-256 << 15)); \n} \n\n\nif (-512 << 15 !== -16777216) { \n $ERROR('#490: -512 << 15 === -16777216. Actual: ' + (-512 << 15)); \n} \n\n\nif (-1024 << 15 !== -33554432) { \n $ERROR('#491: -1024 << 15 === -33554432. Actual: ' + (-1024 << 15)); \n} \n\n\nif (-2048 << 15 !== -67108864) { \n $ERROR('#492: -2048 << 15 === -67108864. Actual: ' + (-2048 << 15)); \n} \n\n\nif (-4096 << 15 !== -134217728) { \n $ERROR('#493: -4096 << 15 === -134217728. Actual: ' + (-4096 << 15)); \n} \n\n\nif (-8192 << 15 !== -268435456) { \n $ERROR('#494: -8192 << 15 === -268435456. Actual: ' + (-8192 << 15)); \n} \n\n\nif (-16384 << 15 !== -536870912) { \n $ERROR('#495: -16384 << 15 === -536870912. Actual: ' + (-16384 << 15)); \n} \n\n\nif (-32768 << 15 !== -1073741824) { \n $ERROR('#496: -32768 << 15 === -1073741824. Actual: ' + (-32768 << 15)); \n} \n\n\nif (-65536 << 15 !== -2147483648) { \n $ERROR('#497: -65536 << 15 === -2147483648. Actual: ' + (-65536 << 15)); \n} \n\n\nif (-131072 << 15 !== 0) { \n $ERROR('#498: -131072 << 15 === 0. Actual: ' + (-131072 << 15)); \n} \n\n\nif (-262144 << 15 !== 0) { \n $ERROR('#499: -262144 << 15 === 0. Actual: ' + (-262144 << 15)); \n} \n\n\nif (-524288 << 15 !== 0) { \n $ERROR('#500: -524288 << 15 === 0. Actual: ' + (-524288 << 15)); \n} \n\n\nif (-1048576 << 15 !== 0) { \n $ERROR('#501: -1048576 << 15 === 0. Actual: ' + (-1048576 << 15)); \n} \n\n\nif (-2097152 << 15 !== 0) { \n $ERROR('#502: -2097152 << 15 === 0. Actual: ' + (-2097152 << 15)); \n} \n\n\nif (-4194304 << 15 !== 0) { \n $ERROR('#503: -4194304 << 15 === 0. Actual: ' + (-4194304 << 15)); \n} \n\n\nif (-8388608 << 15 !== 0) { \n $ERROR('#504: -8388608 << 15 === 0. Actual: ' + (-8388608 << 15)); \n} \n\n\nif (-16777216 << 15 !== 0) { \n $ERROR('#505: -16777216 << 15 === 0. Actual: ' + (-16777216 << 15)); \n} \n\n\nif (-33554432 << 15 !== 0) { \n $ERROR('#506: -33554432 << 15 === 0. Actual: ' + (-33554432 << 15)); \n} \n\n\nif (-67108864 << 15 !== 0) { \n $ERROR('#507: -67108864 << 15 === 0. Actual: ' + (-67108864 << 15)); \n} \n\n\nif (-134217728 << 15 !== 0) { \n $ERROR('#508: -134217728 << 15 === 0. Actual: ' + (-134217728 << 15)); \n} \n\n\nif (-268435456 << 15 !== 0) { \n $ERROR('#509: -268435456 << 15 === 0. Actual: ' + (-268435456 << 15)); \n} \n\n\nif (-536870912 << 15 !== 0) { \n $ERROR('#510: -536870912 << 15 === 0. Actual: ' + (-536870912 << 15)); \n} \n\n\nif (-1073741824 << 15 !== 0) { \n $ERROR('#511: -1073741824 << 15 === 0. Actual: ' + (-1073741824 << 15)); \n} \n\n\nif (-2147483648 << 15 !== 0) { \n $ERROR('#512: -2147483648 << 15 === 0. Actual: ' + (-2147483648 << 15)); \n} \n",
+ "id": "S11.7.1_A4_T1"
+ },
+ {
+ "section": "11.7.1",
+ "description": "ShiftExpression = 2^n - 1, n = 16...31",
+ "test": "//CHECK\n\nif (-1 << 16 !== -65536) { \n $ERROR('#513: -1 << 16 === -65536. Actual: ' + (-1 << 16)); \n} \n\n\nif (-2 << 16 !== -131072) { \n $ERROR('#514: -2 << 16 === -131072. Actual: ' + (-2 << 16)); \n} \n\n\nif (-4 << 16 !== -262144) { \n $ERROR('#515: -4 << 16 === -262144. Actual: ' + (-4 << 16)); \n} \n\n\nif (-8 << 16 !== -524288) { \n $ERROR('#516: -8 << 16 === -524288. Actual: ' + (-8 << 16)); \n} \n\n\nif (-16 << 16 !== -1048576) { \n $ERROR('#517: -16 << 16 === -1048576. Actual: ' + (-16 << 16)); \n} \n\n\nif (-32 << 16 !== -2097152) { \n $ERROR('#518: -32 << 16 === -2097152. Actual: ' + (-32 << 16)); \n} \n\n\nif (-64 << 16 !== -4194304) { \n $ERROR('#519: -64 << 16 === -4194304. Actual: ' + (-64 << 16)); \n} \n\n\nif (-128 << 16 !== -8388608) { \n $ERROR('#520: -128 << 16 === -8388608. Actual: ' + (-128 << 16)); \n} \n\n\nif (-256 << 16 !== -16777216) { \n $ERROR('#521: -256 << 16 === -16777216. Actual: ' + (-256 << 16)); \n} \n\n\nif (-512 << 16 !== -33554432) { \n $ERROR('#522: -512 << 16 === -33554432. Actual: ' + (-512 << 16)); \n} \n\n\nif (-1024 << 16 !== -67108864) { \n $ERROR('#523: -1024 << 16 === -67108864. Actual: ' + (-1024 << 16)); \n} \n\n\nif (-2048 << 16 !== -134217728) { \n $ERROR('#524: -2048 << 16 === -134217728. Actual: ' + (-2048 << 16)); \n} \n\n\nif (-4096 << 16 !== -268435456) { \n $ERROR('#525: -4096 << 16 === -268435456. Actual: ' + (-4096 << 16)); \n} \n\n\nif (-8192 << 16 !== -536870912) { \n $ERROR('#526: -8192 << 16 === -536870912. Actual: ' + (-8192 << 16)); \n} \n\n\nif (-16384 << 16 !== -1073741824) { \n $ERROR('#527: -16384 << 16 === -1073741824. Actual: ' + (-16384 << 16)); \n} \n\n\nif (-32768 << 16 !== -2147483648) { \n $ERROR('#528: -32768 << 16 === -2147483648. Actual: ' + (-32768 << 16)); \n} \n\n\nif (-65536 << 16 !== 0) { \n $ERROR('#529: -65536 << 16 === 0. Actual: ' + (-65536 << 16)); \n} \n\n\nif (-131072 << 16 !== 0) { \n $ERROR('#530: -131072 << 16 === 0. Actual: ' + (-131072 << 16)); \n} \n\n\nif (-262144 << 16 !== 0) { \n $ERROR('#531: -262144 << 16 === 0. Actual: ' + (-262144 << 16)); \n} \n\n\nif (-524288 << 16 !== 0) { \n $ERROR('#532: -524288 << 16 === 0. Actual: ' + (-524288 << 16)); \n} \n\n\nif (-1048576 << 16 !== 0) { \n $ERROR('#533: -1048576 << 16 === 0. Actual: ' + (-1048576 << 16)); \n} \n\n\nif (-2097152 << 16 !== 0) { \n $ERROR('#534: -2097152 << 16 === 0. Actual: ' + (-2097152 << 16)); \n} \n\n\nif (-4194304 << 16 !== 0) { \n $ERROR('#535: -4194304 << 16 === 0. Actual: ' + (-4194304 << 16)); \n} \n\n\nif (-8388608 << 16 !== 0) { \n $ERROR('#536: -8388608 << 16 === 0. Actual: ' + (-8388608 << 16)); \n} \n\n\nif (-16777216 << 16 !== 0) { \n $ERROR('#537: -16777216 << 16 === 0. Actual: ' + (-16777216 << 16)); \n} \n\n\nif (-33554432 << 16 !== 0) { \n $ERROR('#538: -33554432 << 16 === 0. Actual: ' + (-33554432 << 16)); \n} \n\n\nif (-67108864 << 16 !== 0) { \n $ERROR('#539: -67108864 << 16 === 0. Actual: ' + (-67108864 << 16)); \n} \n\n\nif (-134217728 << 16 !== 0) { \n $ERROR('#540: -134217728 << 16 === 0. Actual: ' + (-134217728 << 16)); \n} \n\n\nif (-268435456 << 16 !== 0) { \n $ERROR('#541: -268435456 << 16 === 0. Actual: ' + (-268435456 << 16)); \n} \n\n\nif (-536870912 << 16 !== 0) { \n $ERROR('#542: -536870912 << 16 === 0. Actual: ' + (-536870912 << 16)); \n} \n\n\nif (-1073741824 << 16 !== 0) { \n $ERROR('#543: -1073741824 << 16 === 0. Actual: ' + (-1073741824 << 16)); \n} \n\n\nif (-2147483648 << 16 !== 0) { \n $ERROR('#544: -2147483648 << 16 === 0. Actual: ' + (-2147483648 << 16)); \n} \n\n\nif (-1 << 17 !== -131072) { \n $ERROR('#545: -1 << 17 === -131072. Actual: ' + (-1 << 17)); \n} \n\n\nif (-2 << 17 !== -262144) { \n $ERROR('#546: -2 << 17 === -262144. Actual: ' + (-2 << 17)); \n} \n\n\nif (-4 << 17 !== -524288) { \n $ERROR('#547: -4 << 17 === -524288. Actual: ' + (-4 << 17)); \n} \n\n\nif (-8 << 17 !== -1048576) { \n $ERROR('#548: -8 << 17 === -1048576. Actual: ' + (-8 << 17)); \n} \n\n\nif (-16 << 17 !== -2097152) { \n $ERROR('#549: -16 << 17 === -2097152. Actual: ' + (-16 << 17)); \n} \n\n\nif (-32 << 17 !== -4194304) { \n $ERROR('#550: -32 << 17 === -4194304. Actual: ' + (-32 << 17)); \n} \n\n\nif (-64 << 17 !== -8388608) { \n $ERROR('#551: -64 << 17 === -8388608. Actual: ' + (-64 << 17)); \n} \n\n\nif (-128 << 17 !== -16777216) { \n $ERROR('#552: -128 << 17 === -16777216. Actual: ' + (-128 << 17)); \n} \n\n\nif (-256 << 17 !== -33554432) { \n $ERROR('#553: -256 << 17 === -33554432. Actual: ' + (-256 << 17)); \n} \n\n\nif (-512 << 17 !== -67108864) { \n $ERROR('#554: -512 << 17 === -67108864. Actual: ' + (-512 << 17)); \n} \n\n\nif (-1024 << 17 !== -134217728) { \n $ERROR('#555: -1024 << 17 === -134217728. Actual: ' + (-1024 << 17)); \n} \n\n\nif (-2048 << 17 !== -268435456) { \n $ERROR('#556: -2048 << 17 === -268435456. Actual: ' + (-2048 << 17)); \n} \n\n\nif (-4096 << 17 !== -536870912) { \n $ERROR('#557: -4096 << 17 === -536870912. Actual: ' + (-4096 << 17)); \n} \n\n\nif (-8192 << 17 !== -1073741824) { \n $ERROR('#558: -8192 << 17 === -1073741824. Actual: ' + (-8192 << 17)); \n} \n\n\nif (-16384 << 17 !== -2147483648) { \n $ERROR('#559: -16384 << 17 === -2147483648. Actual: ' + (-16384 << 17)); \n} \n\n\nif (-32768 << 17 !== 0) { \n $ERROR('#560: -32768 << 17 === 0. Actual: ' + (-32768 << 17)); \n} \n\n\nif (-65536 << 17 !== 0) { \n $ERROR('#561: -65536 << 17 === 0. Actual: ' + (-65536 << 17)); \n} \n\n\nif (-131072 << 17 !== 0) { \n $ERROR('#562: -131072 << 17 === 0. Actual: ' + (-131072 << 17)); \n} \n\n\nif (-262144 << 17 !== 0) { \n $ERROR('#563: -262144 << 17 === 0. Actual: ' + (-262144 << 17)); \n} \n\n\nif (-524288 << 17 !== 0) { \n $ERROR('#564: -524288 << 17 === 0. Actual: ' + (-524288 << 17)); \n} \n\n\nif (-1048576 << 17 !== 0) { \n $ERROR('#565: -1048576 << 17 === 0. Actual: ' + (-1048576 << 17)); \n} \n\n\nif (-2097152 << 17 !== 0) { \n $ERROR('#566: -2097152 << 17 === 0. Actual: ' + (-2097152 << 17)); \n} \n\n\nif (-4194304 << 17 !== 0) { \n $ERROR('#567: -4194304 << 17 === 0. Actual: ' + (-4194304 << 17)); \n} \n\n\nif (-8388608 << 17 !== 0) { \n $ERROR('#568: -8388608 << 17 === 0. Actual: ' + (-8388608 << 17)); \n} \n\n\nif (-16777216 << 17 !== 0) { \n $ERROR('#569: -16777216 << 17 === 0. Actual: ' + (-16777216 << 17)); \n} \n\n\nif (-33554432 << 17 !== 0) { \n $ERROR('#570: -33554432 << 17 === 0. Actual: ' + (-33554432 << 17)); \n} \n\n\nif (-67108864 << 17 !== 0) { \n $ERROR('#571: -67108864 << 17 === 0. Actual: ' + (-67108864 << 17)); \n} \n\n\nif (-134217728 << 17 !== 0) { \n $ERROR('#572: -134217728 << 17 === 0. Actual: ' + (-134217728 << 17)); \n} \n\n\nif (-268435456 << 17 !== 0) { \n $ERROR('#573: -268435456 << 17 === 0. Actual: ' + (-268435456 << 17)); \n} \n\n\nif (-536870912 << 17 !== 0) { \n $ERROR('#574: -536870912 << 17 === 0. Actual: ' + (-536870912 << 17)); \n} \n\n\nif (-1073741824 << 17 !== 0) { \n $ERROR('#575: -1073741824 << 17 === 0. Actual: ' + (-1073741824 << 17)); \n} \n\n\nif (-2147483648 << 17 !== 0) { \n $ERROR('#576: -2147483648 << 17 === 0. Actual: ' + (-2147483648 << 17)); \n} \n\n\nif (-1 << 18 !== -262144) { \n $ERROR('#577: -1 << 18 === -262144. Actual: ' + (-1 << 18)); \n} \n\n\nif (-2 << 18 !== -524288) { \n $ERROR('#578: -2 << 18 === -524288. Actual: ' + (-2 << 18)); \n} \n\n\nif (-4 << 18 !== -1048576) { \n $ERROR('#579: -4 << 18 === -1048576. Actual: ' + (-4 << 18)); \n} \n\n\nif (-8 << 18 !== -2097152) { \n $ERROR('#580: -8 << 18 === -2097152. Actual: ' + (-8 << 18)); \n} \n\n\nif (-16 << 18 !== -4194304) { \n $ERROR('#581: -16 << 18 === -4194304. Actual: ' + (-16 << 18)); \n} \n\n\nif (-32 << 18 !== -8388608) { \n $ERROR('#582: -32 << 18 === -8388608. Actual: ' + (-32 << 18)); \n} \n\n\nif (-64 << 18 !== -16777216) { \n $ERROR('#583: -64 << 18 === -16777216. Actual: ' + (-64 << 18)); \n} \n\n\nif (-128 << 18 !== -33554432) { \n $ERROR('#584: -128 << 18 === -33554432. Actual: ' + (-128 << 18)); \n} \n\n\nif (-256 << 18 !== -67108864) { \n $ERROR('#585: -256 << 18 === -67108864. Actual: ' + (-256 << 18)); \n} \n\n\nif (-512 << 18 !== -134217728) { \n $ERROR('#586: -512 << 18 === -134217728. Actual: ' + (-512 << 18)); \n} \n\n\nif (-1024 << 18 !== -268435456) { \n $ERROR('#587: -1024 << 18 === -268435456. Actual: ' + (-1024 << 18)); \n} \n\n\nif (-2048 << 18 !== -536870912) { \n $ERROR('#588: -2048 << 18 === -536870912. Actual: ' + (-2048 << 18)); \n} \n\n\nif (-4096 << 18 !== -1073741824) { \n $ERROR('#589: -4096 << 18 === -1073741824. Actual: ' + (-4096 << 18)); \n} \n\n\nif (-8192 << 18 !== -2147483648) { \n $ERROR('#590: -8192 << 18 === -2147483648. Actual: ' + (-8192 << 18)); \n} \n\n\nif (-16384 << 18 !== 0) { \n $ERROR('#591: -16384 << 18 === 0. Actual: ' + (-16384 << 18)); \n} \n\n\nif (-32768 << 18 !== 0) { \n $ERROR('#592: -32768 << 18 === 0. Actual: ' + (-32768 << 18)); \n} \n\n\nif (-65536 << 18 !== 0) { \n $ERROR('#593: -65536 << 18 === 0. Actual: ' + (-65536 << 18)); \n} \n\n\nif (-131072 << 18 !== 0) { \n $ERROR('#594: -131072 << 18 === 0. Actual: ' + (-131072 << 18)); \n} \n\n\nif (-262144 << 18 !== 0) { \n $ERROR('#595: -262144 << 18 === 0. Actual: ' + (-262144 << 18)); \n} \n\n\nif (-524288 << 18 !== 0) { \n $ERROR('#596: -524288 << 18 === 0. Actual: ' + (-524288 << 18)); \n} \n\n\nif (-1048576 << 18 !== 0) { \n $ERROR('#597: -1048576 << 18 === 0. Actual: ' + (-1048576 << 18)); \n} \n\n\nif (-2097152 << 18 !== 0) { \n $ERROR('#598: -2097152 << 18 === 0. Actual: ' + (-2097152 << 18)); \n} \n\n\nif (-4194304 << 18 !== 0) { \n $ERROR('#599: -4194304 << 18 === 0. Actual: ' + (-4194304 << 18)); \n} \n\n\nif (-8388608 << 18 !== 0) { \n $ERROR('#600: -8388608 << 18 === 0. Actual: ' + (-8388608 << 18)); \n} \n\n\nif (-16777216 << 18 !== 0) { \n $ERROR('#601: -16777216 << 18 === 0. Actual: ' + (-16777216 << 18)); \n} \n\n\nif (-33554432 << 18 !== 0) { \n $ERROR('#602: -33554432 << 18 === 0. Actual: ' + (-33554432 << 18)); \n} \n\n\nif (-67108864 << 18 !== 0) { \n $ERROR('#603: -67108864 << 18 === 0. Actual: ' + (-67108864 << 18)); \n} \n\n\nif (-134217728 << 18 !== 0) { \n $ERROR('#604: -134217728 << 18 === 0. Actual: ' + (-134217728 << 18)); \n} \n\n\nif (-268435456 << 18 !== 0) { \n $ERROR('#605: -268435456 << 18 === 0. Actual: ' + (-268435456 << 18)); \n} \n\n\nif (-536870912 << 18 !== 0) { \n $ERROR('#606: -536870912 << 18 === 0. Actual: ' + (-536870912 << 18)); \n} \n\n\nif (-1073741824 << 18 !== 0) { \n $ERROR('#607: -1073741824 << 18 === 0. Actual: ' + (-1073741824 << 18)); \n} \n\n\nif (-2147483648 << 18 !== 0) { \n $ERROR('#608: -2147483648 << 18 === 0. Actual: ' + (-2147483648 << 18)); \n} \n\n\nif (-1 << 19 !== -524288) { \n $ERROR('#609: -1 << 19 === -524288. Actual: ' + (-1 << 19)); \n} \n\n\nif (-2 << 19 !== -1048576) { \n $ERROR('#610: -2 << 19 === -1048576. Actual: ' + (-2 << 19)); \n} \n\n\nif (-4 << 19 !== -2097152) { \n $ERROR('#611: -4 << 19 === -2097152. Actual: ' + (-4 << 19)); \n} \n\n\nif (-8 << 19 !== -4194304) { \n $ERROR('#612: -8 << 19 === -4194304. Actual: ' + (-8 << 19)); \n} \n\n\nif (-16 << 19 !== -8388608) { \n $ERROR('#613: -16 << 19 === -8388608. Actual: ' + (-16 << 19)); \n} \n\n\nif (-32 << 19 !== -16777216) { \n $ERROR('#614: -32 << 19 === -16777216. Actual: ' + (-32 << 19)); \n} \n\n\nif (-64 << 19 !== -33554432) { \n $ERROR('#615: -64 << 19 === -33554432. Actual: ' + (-64 << 19)); \n} \n\n\nif (-128 << 19 !== -67108864) { \n $ERROR('#616: -128 << 19 === -67108864. Actual: ' + (-128 << 19)); \n} \n\n\nif (-256 << 19 !== -134217728) { \n $ERROR('#617: -256 << 19 === -134217728. Actual: ' + (-256 << 19)); \n} \n\n\nif (-512 << 19 !== -268435456) { \n $ERROR('#618: -512 << 19 === -268435456. Actual: ' + (-512 << 19)); \n} \n\n\nif (-1024 << 19 !== -536870912) { \n $ERROR('#619: -1024 << 19 === -536870912. Actual: ' + (-1024 << 19)); \n} \n\n\nif (-2048 << 19 !== -1073741824) { \n $ERROR('#620: -2048 << 19 === -1073741824. Actual: ' + (-2048 << 19)); \n} \n\n\nif (-4096 << 19 !== -2147483648) { \n $ERROR('#621: -4096 << 19 === -2147483648. Actual: ' + (-4096 << 19)); \n} \n\n\nif (-8192 << 19 !== 0) { \n $ERROR('#622: -8192 << 19 === 0. Actual: ' + (-8192 << 19)); \n} \n\n\nif (-16384 << 19 !== 0) { \n $ERROR('#623: -16384 << 19 === 0. Actual: ' + (-16384 << 19)); \n} \n\n\nif (-32768 << 19 !== 0) { \n $ERROR('#624: -32768 << 19 === 0. Actual: ' + (-32768 << 19)); \n} \n\n\nif (-65536 << 19 !== 0) { \n $ERROR('#625: -65536 << 19 === 0. Actual: ' + (-65536 << 19)); \n} \n\n\nif (-131072 << 19 !== 0) { \n $ERROR('#626: -131072 << 19 === 0. Actual: ' + (-131072 << 19)); \n} \n\n\nif (-262144 << 19 !== 0) { \n $ERROR('#627: -262144 << 19 === 0. Actual: ' + (-262144 << 19)); \n} \n\n\nif (-524288 << 19 !== 0) { \n $ERROR('#628: -524288 << 19 === 0. Actual: ' + (-524288 << 19)); \n} \n\n\nif (-1048576 << 19 !== 0) { \n $ERROR('#629: -1048576 << 19 === 0. Actual: ' + (-1048576 << 19)); \n} \n\n\nif (-2097152 << 19 !== 0) { \n $ERROR('#630: -2097152 << 19 === 0. Actual: ' + (-2097152 << 19)); \n} \n\n\nif (-4194304 << 19 !== 0) { \n $ERROR('#631: -4194304 << 19 === 0. Actual: ' + (-4194304 << 19)); \n} \n\n\nif (-8388608 << 19 !== 0) { \n $ERROR('#632: -8388608 << 19 === 0. Actual: ' + (-8388608 << 19)); \n} \n\n\nif (-16777216 << 19 !== 0) { \n $ERROR('#633: -16777216 << 19 === 0. Actual: ' + (-16777216 << 19)); \n} \n\n\nif (-33554432 << 19 !== 0) { \n $ERROR('#634: -33554432 << 19 === 0. Actual: ' + (-33554432 << 19)); \n} \n\n\nif (-67108864 << 19 !== 0) { \n $ERROR('#635: -67108864 << 19 === 0. Actual: ' + (-67108864 << 19)); \n} \n\n\nif (-134217728 << 19 !== 0) { \n $ERROR('#636: -134217728 << 19 === 0. Actual: ' + (-134217728 << 19)); \n} \n\n\nif (-268435456 << 19 !== 0) { \n $ERROR('#637: -268435456 << 19 === 0. Actual: ' + (-268435456 << 19)); \n} \n\n\nif (-536870912 << 19 !== 0) { \n $ERROR('#638: -536870912 << 19 === 0. Actual: ' + (-536870912 << 19)); \n} \n\n\nif (-1073741824 << 19 !== 0) { \n $ERROR('#639: -1073741824 << 19 === 0. Actual: ' + (-1073741824 << 19)); \n} \n\n\nif (-2147483648 << 19 !== 0) { \n $ERROR('#640: -2147483648 << 19 === 0. Actual: ' + (-2147483648 << 19)); \n} \n\n\nif (-1 << 20 !== -1048576) { \n $ERROR('#641: -1 << 20 === -1048576. Actual: ' + (-1 << 20)); \n} \n\n\nif (-2 << 20 !== -2097152) { \n $ERROR('#642: -2 << 20 === -2097152. Actual: ' + (-2 << 20)); \n} \n\n\nif (-4 << 20 !== -4194304) { \n $ERROR('#643: -4 << 20 === -4194304. Actual: ' + (-4 << 20)); \n} \n\n\nif (-8 << 20 !== -8388608) { \n $ERROR('#644: -8 << 20 === -8388608. Actual: ' + (-8 << 20)); \n} \n\n\nif (-16 << 20 !== -16777216) { \n $ERROR('#645: -16 << 20 === -16777216. Actual: ' + (-16 << 20)); \n} \n\n\nif (-32 << 20 !== -33554432) { \n $ERROR('#646: -32 << 20 === -33554432. Actual: ' + (-32 << 20)); \n} \n\n\nif (-64 << 20 !== -67108864) { \n $ERROR('#647: -64 << 20 === -67108864. Actual: ' + (-64 << 20)); \n} \n\n\nif (-128 << 20 !== -134217728) { \n $ERROR('#648: -128 << 20 === -134217728. Actual: ' + (-128 << 20)); \n} \n\n\nif (-256 << 20 !== -268435456) { \n $ERROR('#649: -256 << 20 === -268435456. Actual: ' + (-256 << 20)); \n} \n\n\nif (-512 << 20 !== -536870912) { \n $ERROR('#650: -512 << 20 === -536870912. Actual: ' + (-512 << 20)); \n} \n\n\nif (-1024 << 20 !== -1073741824) { \n $ERROR('#651: -1024 << 20 === -1073741824. Actual: ' + (-1024 << 20)); \n} \n\n\nif (-2048 << 20 !== -2147483648) { \n $ERROR('#652: -2048 << 20 === -2147483648. Actual: ' + (-2048 << 20)); \n} \n\n\nif (-4096 << 20 !== 0) { \n $ERROR('#653: -4096 << 20 === 0. Actual: ' + (-4096 << 20)); \n} \n\n\nif (-8192 << 20 !== 0) { \n $ERROR('#654: -8192 << 20 === 0. Actual: ' + (-8192 << 20)); \n} \n\n\nif (-16384 << 20 !== 0) { \n $ERROR('#655: -16384 << 20 === 0. Actual: ' + (-16384 << 20)); \n} \n\n\nif (-32768 << 20 !== 0) { \n $ERROR('#656: -32768 << 20 === 0. Actual: ' + (-32768 << 20)); \n} \n\n\nif (-65536 << 20 !== 0) { \n $ERROR('#657: -65536 << 20 === 0. Actual: ' + (-65536 << 20)); \n} \n\n\nif (-131072 << 20 !== 0) { \n $ERROR('#658: -131072 << 20 === 0. Actual: ' + (-131072 << 20)); \n} \n\n\nif (-262144 << 20 !== 0) { \n $ERROR('#659: -262144 << 20 === 0. Actual: ' + (-262144 << 20)); \n} \n\n\nif (-524288 << 20 !== 0) { \n $ERROR('#660: -524288 << 20 === 0. Actual: ' + (-524288 << 20)); \n} \n\n\nif (-1048576 << 20 !== 0) { \n $ERROR('#661: -1048576 << 20 === 0. Actual: ' + (-1048576 << 20)); \n} \n\n\nif (-2097152 << 20 !== 0) { \n $ERROR('#662: -2097152 << 20 === 0. Actual: ' + (-2097152 << 20)); \n} \n\n\nif (-4194304 << 20 !== 0) { \n $ERROR('#663: -4194304 << 20 === 0. Actual: ' + (-4194304 << 20)); \n} \n\n\nif (-8388608 << 20 !== 0) { \n $ERROR('#664: -8388608 << 20 === 0. Actual: ' + (-8388608 << 20)); \n} \n\n\nif (-16777216 << 20 !== 0) { \n $ERROR('#665: -16777216 << 20 === 0. Actual: ' + (-16777216 << 20)); \n} \n\n\nif (-33554432 << 20 !== 0) { \n $ERROR('#666: -33554432 << 20 === 0. Actual: ' + (-33554432 << 20)); \n} \n\n\nif (-67108864 << 20 !== 0) { \n $ERROR('#667: -67108864 << 20 === 0. Actual: ' + (-67108864 << 20)); \n} \n\n\nif (-134217728 << 20 !== 0) { \n $ERROR('#668: -134217728 << 20 === 0. Actual: ' + (-134217728 << 20)); \n} \n\n\nif (-268435456 << 20 !== 0) { \n $ERROR('#669: -268435456 << 20 === 0. Actual: ' + (-268435456 << 20)); \n} \n\n\nif (-536870912 << 20 !== 0) { \n $ERROR('#670: -536870912 << 20 === 0. Actual: ' + (-536870912 << 20)); \n} \n\n\nif (-1073741824 << 20 !== 0) { \n $ERROR('#671: -1073741824 << 20 === 0. Actual: ' + (-1073741824 << 20)); \n} \n\n\nif (-2147483648 << 20 !== 0) { \n $ERROR('#672: -2147483648 << 20 === 0. Actual: ' + (-2147483648 << 20)); \n} \n\n\nif (-1 << 21 !== -2097152) { \n $ERROR('#673: -1 << 21 === -2097152. Actual: ' + (-1 << 21)); \n} \n\n\nif (-2 << 21 !== -4194304) { \n $ERROR('#674: -2 << 21 === -4194304. Actual: ' + (-2 << 21)); \n} \n\n\nif (-4 << 21 !== -8388608) { \n $ERROR('#675: -4 << 21 === -8388608. Actual: ' + (-4 << 21)); \n} \n\n\nif (-8 << 21 !== -16777216) { \n $ERROR('#676: -8 << 21 === -16777216. Actual: ' + (-8 << 21)); \n} \n\n\nif (-16 << 21 !== -33554432) { \n $ERROR('#677: -16 << 21 === -33554432. Actual: ' + (-16 << 21)); \n} \n\n\nif (-32 << 21 !== -67108864) { \n $ERROR('#678: -32 << 21 === -67108864. Actual: ' + (-32 << 21)); \n} \n\n\nif (-64 << 21 !== -134217728) { \n $ERROR('#679: -64 << 21 === -134217728. Actual: ' + (-64 << 21)); \n} \n\n\nif (-128 << 21 !== -268435456) { \n $ERROR('#680: -128 << 21 === -268435456. Actual: ' + (-128 << 21)); \n} \n\n\nif (-256 << 21 !== -536870912) { \n $ERROR('#681: -256 << 21 === -536870912. Actual: ' + (-256 << 21)); \n} \n\n\nif (-512 << 21 !== -1073741824) { \n $ERROR('#682: -512 << 21 === -1073741824. Actual: ' + (-512 << 21)); \n} \n\n\nif (-1024 << 21 !== -2147483648) { \n $ERROR('#683: -1024 << 21 === -2147483648. Actual: ' + (-1024 << 21)); \n} \n\n\nif (-2048 << 21 !== 0) { \n $ERROR('#684: -2048 << 21 === 0. Actual: ' + (-2048 << 21)); \n} \n\n\nif (-4096 << 21 !== 0) { \n $ERROR('#685: -4096 << 21 === 0. Actual: ' + (-4096 << 21)); \n} \n\n\nif (-8192 << 21 !== 0) { \n $ERROR('#686: -8192 << 21 === 0. Actual: ' + (-8192 << 21)); \n} \n\n\nif (-16384 << 21 !== 0) { \n $ERROR('#687: -16384 << 21 === 0. Actual: ' + (-16384 << 21)); \n} \n\n\nif (-32768 << 21 !== 0) { \n $ERROR('#688: -32768 << 21 === 0. Actual: ' + (-32768 << 21)); \n} \n\n\nif (-65536 << 21 !== 0) { \n $ERROR('#689: -65536 << 21 === 0. Actual: ' + (-65536 << 21)); \n} \n\n\nif (-131072 << 21 !== 0) { \n $ERROR('#690: -131072 << 21 === 0. Actual: ' + (-131072 << 21)); \n} \n\n\nif (-262144 << 21 !== 0) { \n $ERROR('#691: -262144 << 21 === 0. Actual: ' + (-262144 << 21)); \n} \n\n\nif (-524288 << 21 !== 0) { \n $ERROR('#692: -524288 << 21 === 0. Actual: ' + (-524288 << 21)); \n} \n\n\nif (-1048576 << 21 !== 0) { \n $ERROR('#693: -1048576 << 21 === 0. Actual: ' + (-1048576 << 21)); \n} \n\n\nif (-2097152 << 21 !== 0) { \n $ERROR('#694: -2097152 << 21 === 0. Actual: ' + (-2097152 << 21)); \n} \n\n\nif (-4194304 << 21 !== 0) { \n $ERROR('#695: -4194304 << 21 === 0. Actual: ' + (-4194304 << 21)); \n} \n\n\nif (-8388608 << 21 !== 0) { \n $ERROR('#696: -8388608 << 21 === 0. Actual: ' + (-8388608 << 21)); \n} \n\n\nif (-16777216 << 21 !== 0) { \n $ERROR('#697: -16777216 << 21 === 0. Actual: ' + (-16777216 << 21)); \n} \n\n\nif (-33554432 << 21 !== 0) { \n $ERROR('#698: -33554432 << 21 === 0. Actual: ' + (-33554432 << 21)); \n} \n\n\nif (-67108864 << 21 !== 0) { \n $ERROR('#699: -67108864 << 21 === 0. Actual: ' + (-67108864 << 21)); \n} \n\n\nif (-134217728 << 21 !== 0) { \n $ERROR('#700: -134217728 << 21 === 0. Actual: ' + (-134217728 << 21)); \n} \n\n\nif (-268435456 << 21 !== 0) { \n $ERROR('#701: -268435456 << 21 === 0. Actual: ' + (-268435456 << 21)); \n} \n\n\nif (-536870912 << 21 !== 0) { \n $ERROR('#702: -536870912 << 21 === 0. Actual: ' + (-536870912 << 21)); \n} \n\n\nif (-1073741824 << 21 !== 0) { \n $ERROR('#703: -1073741824 << 21 === 0. Actual: ' + (-1073741824 << 21)); \n} \n\n\nif (-2147483648 << 21 !== 0) { \n $ERROR('#704: -2147483648 << 21 === 0. Actual: ' + (-2147483648 << 21)); \n} \n\n\nif (-1 << 22 !== -4194304) { \n $ERROR('#705: -1 << 22 === -4194304. Actual: ' + (-1 << 22)); \n} \n\n\nif (-2 << 22 !== -8388608) { \n $ERROR('#706: -2 << 22 === -8388608. Actual: ' + (-2 << 22)); \n} \n\n\nif (-4 << 22 !== -16777216) { \n $ERROR('#707: -4 << 22 === -16777216. Actual: ' + (-4 << 22)); \n} \n\n\nif (-8 << 22 !== -33554432) { \n $ERROR('#708: -8 << 22 === -33554432. Actual: ' + (-8 << 22)); \n} \n\n\nif (-16 << 22 !== -67108864) { \n $ERROR('#709: -16 << 22 === -67108864. Actual: ' + (-16 << 22)); \n} \n\n\nif (-32 << 22 !== -134217728) { \n $ERROR('#710: -32 << 22 === -134217728. Actual: ' + (-32 << 22)); \n} \n\n\nif (-64 << 22 !== -268435456) { \n $ERROR('#711: -64 << 22 === -268435456. Actual: ' + (-64 << 22)); \n} \n\n\nif (-128 << 22 !== -536870912) { \n $ERROR('#712: -128 << 22 === -536870912. Actual: ' + (-128 << 22)); \n} \n\n\nif (-256 << 22 !== -1073741824) { \n $ERROR('#713: -256 << 22 === -1073741824. Actual: ' + (-256 << 22)); \n} \n\n\nif (-512 << 22 !== -2147483648) { \n $ERROR('#714: -512 << 22 === -2147483648. Actual: ' + (-512 << 22)); \n} \n\n\nif (-1024 << 22 !== 0) { \n $ERROR('#715: -1024 << 22 === 0. Actual: ' + (-1024 << 22)); \n} \n\n\nif (-2048 << 22 !== 0) { \n $ERROR('#716: -2048 << 22 === 0. Actual: ' + (-2048 << 22)); \n} \n\n\nif (-4096 << 22 !== 0) { \n $ERROR('#717: -4096 << 22 === 0. Actual: ' + (-4096 << 22)); \n} \n\n\nif (-8192 << 22 !== 0) { \n $ERROR('#718: -8192 << 22 === 0. Actual: ' + (-8192 << 22)); \n} \n\n\nif (-16384 << 22 !== 0) { \n $ERROR('#719: -16384 << 22 === 0. Actual: ' + (-16384 << 22)); \n} \n\n\nif (-32768 << 22 !== 0) { \n $ERROR('#720: -32768 << 22 === 0. Actual: ' + (-32768 << 22)); \n} \n\n\nif (-65536 << 22 !== 0) { \n $ERROR('#721: -65536 << 22 === 0. Actual: ' + (-65536 << 22)); \n} \n\n\nif (-131072 << 22 !== 0) { \n $ERROR('#722: -131072 << 22 === 0. Actual: ' + (-131072 << 22)); \n} \n\n\nif (-262144 << 22 !== 0) { \n $ERROR('#723: -262144 << 22 === 0. Actual: ' + (-262144 << 22)); \n} \n\n\nif (-524288 << 22 !== 0) { \n $ERROR('#724: -524288 << 22 === 0. Actual: ' + (-524288 << 22)); \n} \n\n\nif (-1048576 << 22 !== 0) { \n $ERROR('#725: -1048576 << 22 === 0. Actual: ' + (-1048576 << 22)); \n} \n\n\nif (-2097152 << 22 !== 0) { \n $ERROR('#726: -2097152 << 22 === 0. Actual: ' + (-2097152 << 22)); \n} \n\n\nif (-4194304 << 22 !== 0) { \n $ERROR('#727: -4194304 << 22 === 0. Actual: ' + (-4194304 << 22)); \n} \n\n\nif (-8388608 << 22 !== 0) { \n $ERROR('#728: -8388608 << 22 === 0. Actual: ' + (-8388608 << 22)); \n} \n\n\nif (-16777216 << 22 !== 0) { \n $ERROR('#729: -16777216 << 22 === 0. Actual: ' + (-16777216 << 22)); \n} \n\n\nif (-33554432 << 22 !== 0) { \n $ERROR('#730: -33554432 << 22 === 0. Actual: ' + (-33554432 << 22)); \n} \n\n\nif (-67108864 << 22 !== 0) { \n $ERROR('#731: -67108864 << 22 === 0. Actual: ' + (-67108864 << 22)); \n} \n\n\nif (-134217728 << 22 !== 0) { \n $ERROR('#732: -134217728 << 22 === 0. Actual: ' + (-134217728 << 22)); \n} \n\n\nif (-268435456 << 22 !== 0) { \n $ERROR('#733: -268435456 << 22 === 0. Actual: ' + (-268435456 << 22)); \n} \n\n\nif (-536870912 << 22 !== 0) { \n $ERROR('#734: -536870912 << 22 === 0. Actual: ' + (-536870912 << 22)); \n} \n\n\nif (-1073741824 << 22 !== 0) { \n $ERROR('#735: -1073741824 << 22 === 0. Actual: ' + (-1073741824 << 22)); \n} \n\n\nif (-2147483648 << 22 !== 0) { \n $ERROR('#736: -2147483648 << 22 === 0. Actual: ' + (-2147483648 << 22)); \n} \n\n\nif (-1 << 23 !== -8388608) { \n $ERROR('#737: -1 << 23 === -8388608. Actual: ' + (-1 << 23)); \n} \n\n\nif (-2 << 23 !== -16777216) { \n $ERROR('#738: -2 << 23 === -16777216. Actual: ' + (-2 << 23)); \n} \n\n\nif (-4 << 23 !== -33554432) { \n $ERROR('#739: -4 << 23 === -33554432. Actual: ' + (-4 << 23)); \n} \n\n\nif (-8 << 23 !== -67108864) { \n $ERROR('#740: -8 << 23 === -67108864. Actual: ' + (-8 << 23)); \n} \n\n\nif (-16 << 23 !== -134217728) { \n $ERROR('#741: -16 << 23 === -134217728. Actual: ' + (-16 << 23)); \n} \n\n\nif (-32 << 23 !== -268435456) { \n $ERROR('#742: -32 << 23 === -268435456. Actual: ' + (-32 << 23)); \n} \n\n\nif (-64 << 23 !== -536870912) { \n $ERROR('#743: -64 << 23 === -536870912. Actual: ' + (-64 << 23)); \n} \n\n\nif (-128 << 23 !== -1073741824) { \n $ERROR('#744: -128 << 23 === -1073741824. Actual: ' + (-128 << 23)); \n} \n\n\nif (-256 << 23 !== -2147483648) { \n $ERROR('#745: -256 << 23 === -2147483648. Actual: ' + (-256 << 23)); \n} \n\n\nif (-512 << 23 !== 0) { \n $ERROR('#746: -512 << 23 === 0. Actual: ' + (-512 << 23)); \n} \n\n\nif (-1024 << 23 !== 0) { \n $ERROR('#747: -1024 << 23 === 0. Actual: ' + (-1024 << 23)); \n} \n\n\nif (-2048 << 23 !== 0) { \n $ERROR('#748: -2048 << 23 === 0. Actual: ' + (-2048 << 23)); \n} \n\n\nif (-4096 << 23 !== 0) { \n $ERROR('#749: -4096 << 23 === 0. Actual: ' + (-4096 << 23)); \n} \n\n\nif (-8192 << 23 !== 0) { \n $ERROR('#750: -8192 << 23 === 0. Actual: ' + (-8192 << 23)); \n} \n\n\nif (-16384 << 23 !== 0) { \n $ERROR('#751: -16384 << 23 === 0. Actual: ' + (-16384 << 23)); \n} \n\n\nif (-32768 << 23 !== 0) { \n $ERROR('#752: -32768 << 23 === 0. Actual: ' + (-32768 << 23)); \n} \n\n\nif (-65536 << 23 !== 0) { \n $ERROR('#753: -65536 << 23 === 0. Actual: ' + (-65536 << 23)); \n} \n\n\nif (-131072 << 23 !== 0) { \n $ERROR('#754: -131072 << 23 === 0. Actual: ' + (-131072 << 23)); \n} \n\n\nif (-262144 << 23 !== 0) { \n $ERROR('#755: -262144 << 23 === 0. Actual: ' + (-262144 << 23)); \n} \n\n\nif (-524288 << 23 !== 0) { \n $ERROR('#756: -524288 << 23 === 0. Actual: ' + (-524288 << 23)); \n} \n\n\nif (-1048576 << 23 !== 0) { \n $ERROR('#757: -1048576 << 23 === 0. Actual: ' + (-1048576 << 23)); \n} \n\n\nif (-2097152 << 23 !== 0) { \n $ERROR('#758: -2097152 << 23 === 0. Actual: ' + (-2097152 << 23)); \n} \n\n\nif (-4194304 << 23 !== 0) { \n $ERROR('#759: -4194304 << 23 === 0. Actual: ' + (-4194304 << 23)); \n} \n\n\nif (-8388608 << 23 !== 0) { \n $ERROR('#760: -8388608 << 23 === 0. Actual: ' + (-8388608 << 23)); \n} \n\n\nif (-16777216 << 23 !== 0) { \n $ERROR('#761: -16777216 << 23 === 0. Actual: ' + (-16777216 << 23)); \n} \n\n\nif (-33554432 << 23 !== 0) { \n $ERROR('#762: -33554432 << 23 === 0. Actual: ' + (-33554432 << 23)); \n} \n\n\nif (-67108864 << 23 !== 0) { \n $ERROR('#763: -67108864 << 23 === 0. Actual: ' + (-67108864 << 23)); \n} \n\n\nif (-134217728 << 23 !== 0) { \n $ERROR('#764: -134217728 << 23 === 0. Actual: ' + (-134217728 << 23)); \n} \n\n\nif (-268435456 << 23 !== 0) { \n $ERROR('#765: -268435456 << 23 === 0. Actual: ' + (-268435456 << 23)); \n} \n\n\nif (-536870912 << 23 !== 0) { \n $ERROR('#766: -536870912 << 23 === 0. Actual: ' + (-536870912 << 23)); \n} \n\n\nif (-1073741824 << 23 !== 0) { \n $ERROR('#767: -1073741824 << 23 === 0. Actual: ' + (-1073741824 << 23)); \n} \n\n\nif (-2147483648 << 23 !== 0) { \n $ERROR('#768: -2147483648 << 23 === 0. Actual: ' + (-2147483648 << 23)); \n} \n\n\nif (-1 << 24 !== -16777216) { \n $ERROR('#769: -1 << 24 === -16777216. Actual: ' + (-1 << 24)); \n} \n\n\nif (-2 << 24 !== -33554432) { \n $ERROR('#770: -2 << 24 === -33554432. Actual: ' + (-2 << 24)); \n} \n\n\nif (-4 << 24 !== -67108864) { \n $ERROR('#771: -4 << 24 === -67108864. Actual: ' + (-4 << 24)); \n} \n\n\nif (-8 << 24 !== -134217728) { \n $ERROR('#772: -8 << 24 === -134217728. Actual: ' + (-8 << 24)); \n} \n\n\nif (-16 << 24 !== -268435456) { \n $ERROR('#773: -16 << 24 === -268435456. Actual: ' + (-16 << 24)); \n} \n\n\nif (-32 << 24 !== -536870912) { \n $ERROR('#774: -32 << 24 === -536870912. Actual: ' + (-32 << 24)); \n} \n\n\nif (-64 << 24 !== -1073741824) { \n $ERROR('#775: -64 << 24 === -1073741824. Actual: ' + (-64 << 24)); \n} \n\n\nif (-128 << 24 !== -2147483648) { \n $ERROR('#776: -128 << 24 === -2147483648. Actual: ' + (-128 << 24)); \n} \n\n\nif (-256 << 24 !== 0) { \n $ERROR('#777: -256 << 24 === 0. Actual: ' + (-256 << 24)); \n} \n\n\nif (-512 << 24 !== 0) { \n $ERROR('#778: -512 << 24 === 0. Actual: ' + (-512 << 24)); \n} \n\n\nif (-1024 << 24 !== 0) { \n $ERROR('#779: -1024 << 24 === 0. Actual: ' + (-1024 << 24)); \n} \n\n\nif (-2048 << 24 !== 0) { \n $ERROR('#780: -2048 << 24 === 0. Actual: ' + (-2048 << 24)); \n} \n\n\nif (-4096 << 24 !== 0) { \n $ERROR('#781: -4096 << 24 === 0. Actual: ' + (-4096 << 24)); \n} \n\n\nif (-8192 << 24 !== 0) { \n $ERROR('#782: -8192 << 24 === 0. Actual: ' + (-8192 << 24)); \n} \n\n\nif (-16384 << 24 !== 0) { \n $ERROR('#783: -16384 << 24 === 0. Actual: ' + (-16384 << 24)); \n} \n\n\nif (-32768 << 24 !== 0) { \n $ERROR('#784: -32768 << 24 === 0. Actual: ' + (-32768 << 24)); \n} \n\n\nif (-65536 << 24 !== 0) { \n $ERROR('#785: -65536 << 24 === 0. Actual: ' + (-65536 << 24)); \n} \n\n\nif (-131072 << 24 !== 0) { \n $ERROR('#786: -131072 << 24 === 0. Actual: ' + (-131072 << 24)); \n} \n\n\nif (-262144 << 24 !== 0) { \n $ERROR('#787: -262144 << 24 === 0. Actual: ' + (-262144 << 24)); \n} \n\n\nif (-524288 << 24 !== 0) { \n $ERROR('#788: -524288 << 24 === 0. Actual: ' + (-524288 << 24)); \n} \n\n\nif (-1048576 << 24 !== 0) { \n $ERROR('#789: -1048576 << 24 === 0. Actual: ' + (-1048576 << 24)); \n} \n\n\nif (-2097152 << 24 !== 0) { \n $ERROR('#790: -2097152 << 24 === 0. Actual: ' + (-2097152 << 24)); \n} \n\n\nif (-4194304 << 24 !== 0) { \n $ERROR('#791: -4194304 << 24 === 0. Actual: ' + (-4194304 << 24)); \n} \n\n\nif (-8388608 << 24 !== 0) { \n $ERROR('#792: -8388608 << 24 === 0. Actual: ' + (-8388608 << 24)); \n} \n\n\nif (-16777216 << 24 !== 0) { \n $ERROR('#793: -16777216 << 24 === 0. Actual: ' + (-16777216 << 24)); \n} \n\n\nif (-33554432 << 24 !== 0) { \n $ERROR('#794: -33554432 << 24 === 0. Actual: ' + (-33554432 << 24)); \n} \n\n\nif (-67108864 << 24 !== 0) { \n $ERROR('#795: -67108864 << 24 === 0. Actual: ' + (-67108864 << 24)); \n} \n\n\nif (-134217728 << 24 !== 0) { \n $ERROR('#796: -134217728 << 24 === 0. Actual: ' + (-134217728 << 24)); \n} \n\n\nif (-268435456 << 24 !== 0) { \n $ERROR('#797: -268435456 << 24 === 0. Actual: ' + (-268435456 << 24)); \n} \n\n\nif (-536870912 << 24 !== 0) { \n $ERROR('#798: -536870912 << 24 === 0. Actual: ' + (-536870912 << 24)); \n} \n\n\nif (-1073741824 << 24 !== 0) { \n $ERROR('#799: -1073741824 << 24 === 0. Actual: ' + (-1073741824 << 24)); \n} \n\n\nif (-2147483648 << 24 !== 0) { \n $ERROR('#800: -2147483648 << 24 === 0. Actual: ' + (-2147483648 << 24)); \n} \n\n\nif (-1 << 25 !== -33554432) { \n $ERROR('#801: -1 << 25 === -33554432. Actual: ' + (-1 << 25)); \n} \n\n\nif (-2 << 25 !== -67108864) { \n $ERROR('#802: -2 << 25 === -67108864. Actual: ' + (-2 << 25)); \n} \n\n\nif (-4 << 25 !== -134217728) { \n $ERROR('#803: -4 << 25 === -134217728. Actual: ' + (-4 << 25)); \n} \n\n\nif (-8 << 25 !== -268435456) { \n $ERROR('#804: -8 << 25 === -268435456. Actual: ' + (-8 << 25)); \n} \n\n\nif (-16 << 25 !== -536870912) { \n $ERROR('#805: -16 << 25 === -536870912. Actual: ' + (-16 << 25)); \n} \n\n\nif (-32 << 25 !== -1073741824) { \n $ERROR('#806: -32 << 25 === -1073741824. Actual: ' + (-32 << 25)); \n} \n\n\nif (-64 << 25 !== -2147483648) { \n $ERROR('#807: -64 << 25 === -2147483648. Actual: ' + (-64 << 25)); \n} \n\n\nif (-128 << 25 !== 0) { \n $ERROR('#808: -128 << 25 === 0. Actual: ' + (-128 << 25)); \n} \n\n\nif (-256 << 25 !== 0) { \n $ERROR('#809: -256 << 25 === 0. Actual: ' + (-256 << 25)); \n} \n\n\nif (-512 << 25 !== 0) { \n $ERROR('#810: -512 << 25 === 0. Actual: ' + (-512 << 25)); \n} \n\n\nif (-1024 << 25 !== 0) { \n $ERROR('#811: -1024 << 25 === 0. Actual: ' + (-1024 << 25)); \n} \n\n\nif (-2048 << 25 !== 0) { \n $ERROR('#812: -2048 << 25 === 0. Actual: ' + (-2048 << 25)); \n} \n\n\nif (-4096 << 25 !== 0) { \n $ERROR('#813: -4096 << 25 === 0. Actual: ' + (-4096 << 25)); \n} \n\n\nif (-8192 << 25 !== 0) { \n $ERROR('#814: -8192 << 25 === 0. Actual: ' + (-8192 << 25)); \n} \n\n\nif (-16384 << 25 !== 0) { \n $ERROR('#815: -16384 << 25 === 0. Actual: ' + (-16384 << 25)); \n} \n\n\nif (-32768 << 25 !== 0) { \n $ERROR('#816: -32768 << 25 === 0. Actual: ' + (-32768 << 25)); \n} \n\n\nif (-65536 << 25 !== 0) { \n $ERROR('#817: -65536 << 25 === 0. Actual: ' + (-65536 << 25)); \n} \n\n\nif (-131072 << 25 !== 0) { \n $ERROR('#818: -131072 << 25 === 0. Actual: ' + (-131072 << 25)); \n} \n\n\nif (-262144 << 25 !== 0) { \n $ERROR('#819: -262144 << 25 === 0. Actual: ' + (-262144 << 25)); \n} \n\n\nif (-524288 << 25 !== 0) { \n $ERROR('#820: -524288 << 25 === 0. Actual: ' + (-524288 << 25)); \n} \n\n\nif (-1048576 << 25 !== 0) { \n $ERROR('#821: -1048576 << 25 === 0. Actual: ' + (-1048576 << 25)); \n} \n\n\nif (-2097152 << 25 !== 0) { \n $ERROR('#822: -2097152 << 25 === 0. Actual: ' + (-2097152 << 25)); \n} \n\n\nif (-4194304 << 25 !== 0) { \n $ERROR('#823: -4194304 << 25 === 0. Actual: ' + (-4194304 << 25)); \n} \n\n\nif (-8388608 << 25 !== 0) { \n $ERROR('#824: -8388608 << 25 === 0. Actual: ' + (-8388608 << 25)); \n} \n\n\nif (-16777216 << 25 !== 0) { \n $ERROR('#825: -16777216 << 25 === 0. Actual: ' + (-16777216 << 25)); \n} \n\n\nif (-33554432 << 25 !== 0) { \n $ERROR('#826: -33554432 << 25 === 0. Actual: ' + (-33554432 << 25)); \n} \n\n\nif (-67108864 << 25 !== 0) { \n $ERROR('#827: -67108864 << 25 === 0. Actual: ' + (-67108864 << 25)); \n} \n\n\nif (-134217728 << 25 !== 0) { \n $ERROR('#828: -134217728 << 25 === 0. Actual: ' + (-134217728 << 25)); \n} \n\n\nif (-268435456 << 25 !== 0) { \n $ERROR('#829: -268435456 << 25 === 0. Actual: ' + (-268435456 << 25)); \n} \n\n\nif (-536870912 << 25 !== 0) { \n $ERROR('#830: -536870912 << 25 === 0. Actual: ' + (-536870912 << 25)); \n} \n\n\nif (-1073741824 << 25 !== 0) { \n $ERROR('#831: -1073741824 << 25 === 0. Actual: ' + (-1073741824 << 25)); \n} \n\n\nif (-2147483648 << 25 !== 0) { \n $ERROR('#832: -2147483648 << 25 === 0. Actual: ' + (-2147483648 << 25)); \n} \n\n\nif (-1 << 26 !== -67108864) { \n $ERROR('#833: -1 << 26 === -67108864. Actual: ' + (-1 << 26)); \n} \n\n\nif (-2 << 26 !== -134217728) { \n $ERROR('#834: -2 << 26 === -134217728. Actual: ' + (-2 << 26)); \n} \n\n\nif (-4 << 26 !== -268435456) { \n $ERROR('#835: -4 << 26 === -268435456. Actual: ' + (-4 << 26)); \n} \n\n\nif (-8 << 26 !== -536870912) { \n $ERROR('#836: -8 << 26 === -536870912. Actual: ' + (-8 << 26)); \n} \n\n\nif (-16 << 26 !== -1073741824) { \n $ERROR('#837: -16 << 26 === -1073741824. Actual: ' + (-16 << 26)); \n} \n\n\nif (-32 << 26 !== -2147483648) { \n $ERROR('#838: -32 << 26 === -2147483648. Actual: ' + (-32 << 26)); \n} \n\n\nif (-64 << 26 !== 0) { \n $ERROR('#839: -64 << 26 === 0. Actual: ' + (-64 << 26)); \n} \n\n\nif (-128 << 26 !== 0) { \n $ERROR('#840: -128 << 26 === 0. Actual: ' + (-128 << 26)); \n} \n\n\nif (-256 << 26 !== 0) { \n $ERROR('#841: -256 << 26 === 0. Actual: ' + (-256 << 26)); \n} \n\n\nif (-512 << 26 !== 0) { \n $ERROR('#842: -512 << 26 === 0. Actual: ' + (-512 << 26)); \n} \n\n\nif (-1024 << 26 !== 0) { \n $ERROR('#843: -1024 << 26 === 0. Actual: ' + (-1024 << 26)); \n} \n\n\nif (-2048 << 26 !== 0) { \n $ERROR('#844: -2048 << 26 === 0. Actual: ' + (-2048 << 26)); \n} \n\n\nif (-4096 << 26 !== 0) { \n $ERROR('#845: -4096 << 26 === 0. Actual: ' + (-4096 << 26)); \n} \n\n\nif (-8192 << 26 !== 0) { \n $ERROR('#846: -8192 << 26 === 0. Actual: ' + (-8192 << 26)); \n} \n\n\nif (-16384 << 26 !== 0) { \n $ERROR('#847: -16384 << 26 === 0. Actual: ' + (-16384 << 26)); \n} \n\n\nif (-32768 << 26 !== 0) { \n $ERROR('#848: -32768 << 26 === 0. Actual: ' + (-32768 << 26)); \n} \n\n\nif (-65536 << 26 !== 0) { \n $ERROR('#849: -65536 << 26 === 0. Actual: ' + (-65536 << 26)); \n} \n\n\nif (-131072 << 26 !== 0) { \n $ERROR('#850: -131072 << 26 === 0. Actual: ' + (-131072 << 26)); \n} \n\n\nif (-262144 << 26 !== 0) { \n $ERROR('#851: -262144 << 26 === 0. Actual: ' + (-262144 << 26)); \n} \n\n\nif (-524288 << 26 !== 0) { \n $ERROR('#852: -524288 << 26 === 0. Actual: ' + (-524288 << 26)); \n} \n\n\nif (-1048576 << 26 !== 0) { \n $ERROR('#853: -1048576 << 26 === 0. Actual: ' + (-1048576 << 26)); \n} \n\n\nif (-2097152 << 26 !== 0) { \n $ERROR('#854: -2097152 << 26 === 0. Actual: ' + (-2097152 << 26)); \n} \n\n\nif (-4194304 << 26 !== 0) { \n $ERROR('#855: -4194304 << 26 === 0. Actual: ' + (-4194304 << 26)); \n} \n\n\nif (-8388608 << 26 !== 0) { \n $ERROR('#856: -8388608 << 26 === 0. Actual: ' + (-8388608 << 26)); \n} \n\n\nif (-16777216 << 26 !== 0) { \n $ERROR('#857: -16777216 << 26 === 0. Actual: ' + (-16777216 << 26)); \n} \n\n\nif (-33554432 << 26 !== 0) { \n $ERROR('#858: -33554432 << 26 === 0. Actual: ' + (-33554432 << 26)); \n} \n\n\nif (-67108864 << 26 !== 0) { \n $ERROR('#859: -67108864 << 26 === 0. Actual: ' + (-67108864 << 26)); \n} \n\n\nif (-134217728 << 26 !== 0) { \n $ERROR('#860: -134217728 << 26 === 0. Actual: ' + (-134217728 << 26)); \n} \n\n\nif (-268435456 << 26 !== 0) { \n $ERROR('#861: -268435456 << 26 === 0. Actual: ' + (-268435456 << 26)); \n} \n\n\nif (-536870912 << 26 !== 0) { \n $ERROR('#862: -536870912 << 26 === 0. Actual: ' + (-536870912 << 26)); \n} \n\n\nif (-1073741824 << 26 !== 0) { \n $ERROR('#863: -1073741824 << 26 === 0. Actual: ' + (-1073741824 << 26)); \n} \n\n\nif (-2147483648 << 26 !== 0) { \n $ERROR('#864: -2147483648 << 26 === 0. Actual: ' + (-2147483648 << 26)); \n} \n\n\nif (-1 << 27 !== -134217728) { \n $ERROR('#865: -1 << 27 === -134217728. Actual: ' + (-1 << 27)); \n} \n\n\nif (-2 << 27 !== -268435456) { \n $ERROR('#866: -2 << 27 === -268435456. Actual: ' + (-2 << 27)); \n} \n\n\nif (-4 << 27 !== -536870912) { \n $ERROR('#867: -4 << 27 === -536870912. Actual: ' + (-4 << 27)); \n} \n\n\nif (-8 << 27 !== -1073741824) { \n $ERROR('#868: -8 << 27 === -1073741824. Actual: ' + (-8 << 27)); \n} \n\n\nif (-16 << 27 !== -2147483648) { \n $ERROR('#869: -16 << 27 === -2147483648. Actual: ' + (-16 << 27)); \n} \n\n\nif (-32 << 27 !== 0) { \n $ERROR('#870: -32 << 27 === 0. Actual: ' + (-32 << 27)); \n} \n\n\nif (-64 << 27 !== 0) { \n $ERROR('#871: -64 << 27 === 0. Actual: ' + (-64 << 27)); \n} \n\n\nif (-128 << 27 !== 0) { \n $ERROR('#872: -128 << 27 === 0. Actual: ' + (-128 << 27)); \n} \n\n\nif (-256 << 27 !== 0) { \n $ERROR('#873: -256 << 27 === 0. Actual: ' + (-256 << 27)); \n} \n\n\nif (-512 << 27 !== 0) { \n $ERROR('#874: -512 << 27 === 0. Actual: ' + (-512 << 27)); \n} \n\n\nif (-1024 << 27 !== 0) { \n $ERROR('#875: -1024 << 27 === 0. Actual: ' + (-1024 << 27)); \n} \n\n\nif (-2048 << 27 !== 0) { \n $ERROR('#876: -2048 << 27 === 0. Actual: ' + (-2048 << 27)); \n} \n\n\nif (-4096 << 27 !== 0) { \n $ERROR('#877: -4096 << 27 === 0. Actual: ' + (-4096 << 27)); \n} \n\n\nif (-8192 << 27 !== 0) { \n $ERROR('#878: -8192 << 27 === 0. Actual: ' + (-8192 << 27)); \n} \n\n\nif (-16384 << 27 !== 0) { \n $ERROR('#879: -16384 << 27 === 0. Actual: ' + (-16384 << 27)); \n} \n\n\nif (-32768 << 27 !== 0) { \n $ERROR('#880: -32768 << 27 === 0. Actual: ' + (-32768 << 27)); \n} \n\n\nif (-65536 << 27 !== 0) { \n $ERROR('#881: -65536 << 27 === 0. Actual: ' + (-65536 << 27)); \n} \n\n\nif (-131072 << 27 !== 0) { \n $ERROR('#882: -131072 << 27 === 0. Actual: ' + (-131072 << 27)); \n} \n\n\nif (-262144 << 27 !== 0) { \n $ERROR('#883: -262144 << 27 === 0. Actual: ' + (-262144 << 27)); \n} \n\n\nif (-524288 << 27 !== 0) { \n $ERROR('#884: -524288 << 27 === 0. Actual: ' + (-524288 << 27)); \n} \n\n\nif (-1048576 << 27 !== 0) { \n $ERROR('#885: -1048576 << 27 === 0. Actual: ' + (-1048576 << 27)); \n} \n\n\nif (-2097152 << 27 !== 0) { \n $ERROR('#886: -2097152 << 27 === 0. Actual: ' + (-2097152 << 27)); \n} \n\n\nif (-4194304 << 27 !== 0) { \n $ERROR('#887: -4194304 << 27 === 0. Actual: ' + (-4194304 << 27)); \n} \n\n\nif (-8388608 << 27 !== 0) { \n $ERROR('#888: -8388608 << 27 === 0. Actual: ' + (-8388608 << 27)); \n} \n\n\nif (-16777216 << 27 !== 0) { \n $ERROR('#889: -16777216 << 27 === 0. Actual: ' + (-16777216 << 27)); \n} \n\n\nif (-33554432 << 27 !== 0) { \n $ERROR('#890: -33554432 << 27 === 0. Actual: ' + (-33554432 << 27)); \n} \n\n\nif (-67108864 << 27 !== 0) { \n $ERROR('#891: -67108864 << 27 === 0. Actual: ' + (-67108864 << 27)); \n} \n\n\nif (-134217728 << 27 !== 0) { \n $ERROR('#892: -134217728 << 27 === 0. Actual: ' + (-134217728 << 27)); \n} \n\n\nif (-268435456 << 27 !== 0) { \n $ERROR('#893: -268435456 << 27 === 0. Actual: ' + (-268435456 << 27)); \n} \n\n\nif (-536870912 << 27 !== 0) { \n $ERROR('#894: -536870912 << 27 === 0. Actual: ' + (-536870912 << 27)); \n} \n\n\nif (-1073741824 << 27 !== 0) { \n $ERROR('#895: -1073741824 << 27 === 0. Actual: ' + (-1073741824 << 27)); \n} \n\n\nif (-2147483648 << 27 !== 0) { \n $ERROR('#896: -2147483648 << 27 === 0. Actual: ' + (-2147483648 << 27)); \n} \n\n\nif (-1 << 28 !== -268435456) { \n $ERROR('#897: -1 << 28 === -268435456. Actual: ' + (-1 << 28)); \n} \n\n\nif (-2 << 28 !== -536870912) { \n $ERROR('#898: -2 << 28 === -536870912. Actual: ' + (-2 << 28)); \n} \n\n\nif (-4 << 28 !== -1073741824) { \n $ERROR('#899: -4 << 28 === -1073741824. Actual: ' + (-4 << 28)); \n} \n\n\nif (-8 << 28 !== -2147483648) { \n $ERROR('#900: -8 << 28 === -2147483648. Actual: ' + (-8 << 28)); \n} \n\n\nif (-16 << 28 !== 0) { \n $ERROR('#901: -16 << 28 === 0. Actual: ' + (-16 << 28)); \n} \n\n\nif (-32 << 28 !== 0) { \n $ERROR('#902: -32 << 28 === 0. Actual: ' + (-32 << 28)); \n} \n\n\nif (-64 << 28 !== 0) { \n $ERROR('#903: -64 << 28 === 0. Actual: ' + (-64 << 28)); \n} \n\n\nif (-128 << 28 !== 0) { \n $ERROR('#904: -128 << 28 === 0. Actual: ' + (-128 << 28)); \n} \n\n\nif (-256 << 28 !== 0) { \n $ERROR('#905: -256 << 28 === 0. Actual: ' + (-256 << 28)); \n} \n\n\nif (-512 << 28 !== 0) { \n $ERROR('#906: -512 << 28 === 0. Actual: ' + (-512 << 28)); \n} \n\n\nif (-1024 << 28 !== 0) { \n $ERROR('#907: -1024 << 28 === 0. Actual: ' + (-1024 << 28)); \n} \n\n\nif (-2048 << 28 !== 0) { \n $ERROR('#908: -2048 << 28 === 0. Actual: ' + (-2048 << 28)); \n} \n\n\nif (-4096 << 28 !== 0) { \n $ERROR('#909: -4096 << 28 === 0. Actual: ' + (-4096 << 28)); \n} \n\n\nif (-8192 << 28 !== 0) { \n $ERROR('#910: -8192 << 28 === 0. Actual: ' + (-8192 << 28)); \n} \n\n\nif (-16384 << 28 !== 0) { \n $ERROR('#911: -16384 << 28 === 0. Actual: ' + (-16384 << 28)); \n} \n\n\nif (-32768 << 28 !== 0) { \n $ERROR('#912: -32768 << 28 === 0. Actual: ' + (-32768 << 28)); \n} \n\n\nif (-65536 << 28 !== 0) { \n $ERROR('#913: -65536 << 28 === 0. Actual: ' + (-65536 << 28)); \n} \n\n\nif (-131072 << 28 !== 0) { \n $ERROR('#914: -131072 << 28 === 0. Actual: ' + (-131072 << 28)); \n} \n\n\nif (-262144 << 28 !== 0) { \n $ERROR('#915: -262144 << 28 === 0. Actual: ' + (-262144 << 28)); \n} \n\n\nif (-524288 << 28 !== 0) { \n $ERROR('#916: -524288 << 28 === 0. Actual: ' + (-524288 << 28)); \n} \n\n\nif (-1048576 << 28 !== 0) { \n $ERROR('#917: -1048576 << 28 === 0. Actual: ' + (-1048576 << 28)); \n} \n\n\nif (-2097152 << 28 !== 0) { \n $ERROR('#918: -2097152 << 28 === 0. Actual: ' + (-2097152 << 28)); \n} \n\n\nif (-4194304 << 28 !== 0) { \n $ERROR('#919: -4194304 << 28 === 0. Actual: ' + (-4194304 << 28)); \n} \n\n\nif (-8388608 << 28 !== 0) { \n $ERROR('#920: -8388608 << 28 === 0. Actual: ' + (-8388608 << 28)); \n} \n\n\nif (-16777216 << 28 !== 0) { \n $ERROR('#921: -16777216 << 28 === 0. Actual: ' + (-16777216 << 28)); \n} \n\n\nif (-33554432 << 28 !== 0) { \n $ERROR('#922: -33554432 << 28 === 0. Actual: ' + (-33554432 << 28)); \n} \n\n\nif (-67108864 << 28 !== 0) { \n $ERROR('#923: -67108864 << 28 === 0. Actual: ' + (-67108864 << 28)); \n} \n\n\nif (-134217728 << 28 !== 0) { \n $ERROR('#924: -134217728 << 28 === 0. Actual: ' + (-134217728 << 28)); \n} \n\n\nif (-268435456 << 28 !== 0) { \n $ERROR('#925: -268435456 << 28 === 0. Actual: ' + (-268435456 << 28)); \n} \n\n\nif (-536870912 << 28 !== 0) { \n $ERROR('#926: -536870912 << 28 === 0. Actual: ' + (-536870912 << 28)); \n} \n\n\nif (-1073741824 << 28 !== 0) { \n $ERROR('#927: -1073741824 << 28 === 0. Actual: ' + (-1073741824 << 28)); \n} \n\n\nif (-2147483648 << 28 !== 0) { \n $ERROR('#928: -2147483648 << 28 === 0. Actual: ' + (-2147483648 << 28)); \n} \n\n\nif (-1 << 29 !== -536870912) { \n $ERROR('#929: -1 << 29 === -536870912. Actual: ' + (-1 << 29)); \n} \n\n\nif (-2 << 29 !== -1073741824) { \n $ERROR('#930: -2 << 29 === -1073741824. Actual: ' + (-2 << 29)); \n} \n\n\nif (-4 << 29 !== -2147483648) { \n $ERROR('#931: -4 << 29 === -2147483648. Actual: ' + (-4 << 29)); \n} \n\n\nif (-8 << 29 !== 0) { \n $ERROR('#932: -8 << 29 === 0. Actual: ' + (-8 << 29)); \n} \n\n\nif (-16 << 29 !== 0) { \n $ERROR('#933: -16 << 29 === 0. Actual: ' + (-16 << 29)); \n} \n\n\nif (-32 << 29 !== 0) { \n $ERROR('#934: -32 << 29 === 0. Actual: ' + (-32 << 29)); \n} \n\n\nif (-64 << 29 !== 0) { \n $ERROR('#935: -64 << 29 === 0. Actual: ' + (-64 << 29)); \n} \n\n\nif (-128 << 29 !== 0) { \n $ERROR('#936: -128 << 29 === 0. Actual: ' + (-128 << 29)); \n} \n\n\nif (-256 << 29 !== 0) { \n $ERROR('#937: -256 << 29 === 0. Actual: ' + (-256 << 29)); \n} \n\n\nif (-512 << 29 !== 0) { \n $ERROR('#938: -512 << 29 === 0. Actual: ' + (-512 << 29)); \n} \n\n\nif (-1024 << 29 !== 0) { \n $ERROR('#939: -1024 << 29 === 0. Actual: ' + (-1024 << 29)); \n} \n\n\nif (-2048 << 29 !== 0) { \n $ERROR('#940: -2048 << 29 === 0. Actual: ' + (-2048 << 29)); \n} \n\n\nif (-4096 << 29 !== 0) { \n $ERROR('#941: -4096 << 29 === 0. Actual: ' + (-4096 << 29)); \n} \n\n\nif (-8192 << 29 !== 0) { \n $ERROR('#942: -8192 << 29 === 0. Actual: ' + (-8192 << 29)); \n} \n\n\nif (-16384 << 29 !== 0) { \n $ERROR('#943: -16384 << 29 === 0. Actual: ' + (-16384 << 29)); \n} \n\n\nif (-32768 << 29 !== 0) { \n $ERROR('#944: -32768 << 29 === 0. Actual: ' + (-32768 << 29)); \n} \n\n\nif (-65536 << 29 !== 0) { \n $ERROR('#945: -65536 << 29 === 0. Actual: ' + (-65536 << 29)); \n} \n\n\nif (-131072 << 29 !== 0) { \n $ERROR('#946: -131072 << 29 === 0. Actual: ' + (-131072 << 29)); \n} \n\n\nif (-262144 << 29 !== 0) { \n $ERROR('#947: -262144 << 29 === 0. Actual: ' + (-262144 << 29)); \n} \n\n\nif (-524288 << 29 !== 0) { \n $ERROR('#948: -524288 << 29 === 0. Actual: ' + (-524288 << 29)); \n} \n\n\nif (-1048576 << 29 !== 0) { \n $ERROR('#949: -1048576 << 29 === 0. Actual: ' + (-1048576 << 29)); \n} \n\n\nif (-2097152 << 29 !== 0) { \n $ERROR('#950: -2097152 << 29 === 0. Actual: ' + (-2097152 << 29)); \n} \n\n\nif (-4194304 << 29 !== 0) { \n $ERROR('#951: -4194304 << 29 === 0. Actual: ' + (-4194304 << 29)); \n} \n\n\nif (-8388608 << 29 !== 0) { \n $ERROR('#952: -8388608 << 29 === 0. Actual: ' + (-8388608 << 29)); \n} \n\n\nif (-16777216 << 29 !== 0) { \n $ERROR('#953: -16777216 << 29 === 0. Actual: ' + (-16777216 << 29)); \n} \n\n\nif (-33554432 << 29 !== 0) { \n $ERROR('#954: -33554432 << 29 === 0. Actual: ' + (-33554432 << 29)); \n} \n\n\nif (-67108864 << 29 !== 0) { \n $ERROR('#955: -67108864 << 29 === 0. Actual: ' + (-67108864 << 29)); \n} \n\n\nif (-134217728 << 29 !== 0) { \n $ERROR('#956: -134217728 << 29 === 0. Actual: ' + (-134217728 << 29)); \n} \n\n\nif (-268435456 << 29 !== 0) { \n $ERROR('#957: -268435456 << 29 === 0. Actual: ' + (-268435456 << 29)); \n} \n\n\nif (-536870912 << 29 !== 0) { \n $ERROR('#958: -536870912 << 29 === 0. Actual: ' + (-536870912 << 29)); \n} \n\n\nif (-1073741824 << 29 !== 0) { \n $ERROR('#959: -1073741824 << 29 === 0. Actual: ' + (-1073741824 << 29)); \n} \n\n\nif (-2147483648 << 29 !== 0) { \n $ERROR('#960: -2147483648 << 29 === 0. Actual: ' + (-2147483648 << 29)); \n} \n\n\nif (-1 << 30 !== -1073741824) { \n $ERROR('#961: -1 << 30 === -1073741824. Actual: ' + (-1 << 30)); \n} \n\n\nif (-2 << 30 !== -2147483648) { \n $ERROR('#962: -2 << 30 === -2147483648. Actual: ' + (-2 << 30)); \n} \n\n\nif (-4 << 30 !== 0) { \n $ERROR('#963: -4 << 30 === 0. Actual: ' + (-4 << 30)); \n} \n\n\nif (-8 << 30 !== 0) { \n $ERROR('#964: -8 << 30 === 0. Actual: ' + (-8 << 30)); \n} \n\n\nif (-16 << 30 !== 0) { \n $ERROR('#965: -16 << 30 === 0. Actual: ' + (-16 << 30)); \n} \n\n\nif (-32 << 30 !== 0) { \n $ERROR('#966: -32 << 30 === 0. Actual: ' + (-32 << 30)); \n} \n\n\nif (-64 << 30 !== 0) { \n $ERROR('#967: -64 << 30 === 0. Actual: ' + (-64 << 30)); \n} \n\n\nif (-128 << 30 !== 0) { \n $ERROR('#968: -128 << 30 === 0. Actual: ' + (-128 << 30)); \n} \n\n\nif (-256 << 30 !== 0) { \n $ERROR('#969: -256 << 30 === 0. Actual: ' + (-256 << 30)); \n} \n\n\nif (-512 << 30 !== 0) { \n $ERROR('#970: -512 << 30 === 0. Actual: ' + (-512 << 30)); \n} \n\n\nif (-1024 << 30 !== 0) { \n $ERROR('#971: -1024 << 30 === 0. Actual: ' + (-1024 << 30)); \n} \n\n\nif (-2048 << 30 !== 0) { \n $ERROR('#972: -2048 << 30 === 0. Actual: ' + (-2048 << 30)); \n} \n\n\nif (-4096 << 30 !== 0) { \n $ERROR('#973: -4096 << 30 === 0. Actual: ' + (-4096 << 30)); \n} \n\n\nif (-8192 << 30 !== 0) { \n $ERROR('#974: -8192 << 30 === 0. Actual: ' + (-8192 << 30)); \n} \n\n\nif (-16384 << 30 !== 0) { \n $ERROR('#975: -16384 << 30 === 0. Actual: ' + (-16384 << 30)); \n} \n\n\nif (-32768 << 30 !== 0) { \n $ERROR('#976: -32768 << 30 === 0. Actual: ' + (-32768 << 30)); \n} \n\n\nif (-65536 << 30 !== 0) { \n $ERROR('#977: -65536 << 30 === 0. Actual: ' + (-65536 << 30)); \n} \n\n\nif (-131072 << 30 !== 0) { \n $ERROR('#978: -131072 << 30 === 0. Actual: ' + (-131072 << 30)); \n} \n\n\nif (-262144 << 30 !== 0) { \n $ERROR('#979: -262144 << 30 === 0. Actual: ' + (-262144 << 30)); \n} \n\n\nif (-524288 << 30 !== 0) { \n $ERROR('#980: -524288 << 30 === 0. Actual: ' + (-524288 << 30)); \n} \n\n\nif (-1048576 << 30 !== 0) { \n $ERROR('#981: -1048576 << 30 === 0. Actual: ' + (-1048576 << 30)); \n} \n\n\nif (-2097152 << 30 !== 0) { \n $ERROR('#982: -2097152 << 30 === 0. Actual: ' + (-2097152 << 30)); \n} \n\n\nif (-4194304 << 30 !== 0) { \n $ERROR('#983: -4194304 << 30 === 0. Actual: ' + (-4194304 << 30)); \n} \n\n\nif (-8388608 << 30 !== 0) { \n $ERROR('#984: -8388608 << 30 === 0. Actual: ' + (-8388608 << 30)); \n} \n\n\nif (-16777216 << 30 !== 0) { \n $ERROR('#985: -16777216 << 30 === 0. Actual: ' + (-16777216 << 30)); \n} \n\n\nif (-33554432 << 30 !== 0) { \n $ERROR('#986: -33554432 << 30 === 0. Actual: ' + (-33554432 << 30)); \n} \n\n\nif (-67108864 << 30 !== 0) { \n $ERROR('#987: -67108864 << 30 === 0. Actual: ' + (-67108864 << 30)); \n} \n\n\nif (-134217728 << 30 !== 0) { \n $ERROR('#988: -134217728 << 30 === 0. Actual: ' + (-134217728 << 30)); \n} \n\n\nif (-268435456 << 30 !== 0) { \n $ERROR('#989: -268435456 << 30 === 0. Actual: ' + (-268435456 << 30)); \n} \n\n\nif (-536870912 << 30 !== 0) { \n $ERROR('#990: -536870912 << 30 === 0. Actual: ' + (-536870912 << 30)); \n} \n\n\nif (-1073741824 << 30 !== 0) { \n $ERROR('#991: -1073741824 << 30 === 0. Actual: ' + (-1073741824 << 30)); \n} \n\n\nif (-2147483648 << 30 !== 0) { \n $ERROR('#992: -2147483648 << 30 === 0. Actual: ' + (-2147483648 << 30)); \n} \n\n\nif (-1 << 31 !== -2147483648) { \n $ERROR('#993: -1 << 31 === -2147483648. Actual: ' + (-1 << 31)); \n} \n\n\nif (-2 << 31 !== 0) { \n $ERROR('#994: -2 << 31 === 0. Actual: ' + (-2 << 31)); \n} \n\n\nif (-4 << 31 !== 0) { \n $ERROR('#995: -4 << 31 === 0. Actual: ' + (-4 << 31)); \n} \n\n\nif (-8 << 31 !== 0) { \n $ERROR('#996: -8 << 31 === 0. Actual: ' + (-8 << 31)); \n} \n\n\nif (-16 << 31 !== 0) { \n $ERROR('#997: -16 << 31 === 0. Actual: ' + (-16 << 31)); \n} \n\n\nif (-32 << 31 !== 0) { \n $ERROR('#998: -32 << 31 === 0. Actual: ' + (-32 << 31)); \n} \n\n\nif (-64 << 31 !== 0) { \n $ERROR('#999: -64 << 31 === 0. Actual: ' + (-64 << 31)); \n} \n\n\nif (-128 << 31 !== 0) { \n $ERROR('#1000: -128 << 31 === 0. Actual: ' + (-128 << 31)); \n} \n\n\nif (-256 << 31 !== 0) { \n $ERROR('#1001: -256 << 31 === 0. Actual: ' + (-256 << 31)); \n} \n\n\nif (-512 << 31 !== 0) { \n $ERROR('#1002: -512 << 31 === 0. Actual: ' + (-512 << 31)); \n} \n\n\nif (-1024 << 31 !== 0) { \n $ERROR('#1003: -1024 << 31 === 0. Actual: ' + (-1024 << 31)); \n} \n\n\nif (-2048 << 31 !== 0) { \n $ERROR('#1004: -2048 << 31 === 0. Actual: ' + (-2048 << 31)); \n} \n\n\nif (-4096 << 31 !== 0) { \n $ERROR('#1005: -4096 << 31 === 0. Actual: ' + (-4096 << 31)); \n} \n\n\nif (-8192 << 31 !== 0) { \n $ERROR('#1006: -8192 << 31 === 0. Actual: ' + (-8192 << 31)); \n} \n\n\nif (-16384 << 31 !== 0) { \n $ERROR('#1007: -16384 << 31 === 0. Actual: ' + (-16384 << 31)); \n} \n\n\nif (-32768 << 31 !== 0) { \n $ERROR('#1008: -32768 << 31 === 0. Actual: ' + (-32768 << 31)); \n} \n\n\nif (-65536 << 31 !== 0) { \n $ERROR('#1009: -65536 << 31 === 0. Actual: ' + (-65536 << 31)); \n} \n\n\nif (-131072 << 31 !== 0) { \n $ERROR('#1010: -131072 << 31 === 0. Actual: ' + (-131072 << 31)); \n} \n\n\nif (-262144 << 31 !== 0) { \n $ERROR('#1011: -262144 << 31 === 0. Actual: ' + (-262144 << 31)); \n} \n\n\nif (-524288 << 31 !== 0) { \n $ERROR('#1012: -524288 << 31 === 0. Actual: ' + (-524288 << 31)); \n} \n\n\nif (-1048576 << 31 !== 0) { \n $ERROR('#1013: -1048576 << 31 === 0. Actual: ' + (-1048576 << 31)); \n} \n\n\nif (-2097152 << 31 !== 0) { \n $ERROR('#1014: -2097152 << 31 === 0. Actual: ' + (-2097152 << 31)); \n} \n\n\nif (-4194304 << 31 !== 0) { \n $ERROR('#1015: -4194304 << 31 === 0. Actual: ' + (-4194304 << 31)); \n} \n\n\nif (-8388608 << 31 !== 0) { \n $ERROR('#1016: -8388608 << 31 === 0. Actual: ' + (-8388608 << 31)); \n} \n\n\nif (-16777216 << 31 !== 0) { \n $ERROR('#1017: -16777216 << 31 === 0. Actual: ' + (-16777216 << 31)); \n} \n\n\nif (-33554432 << 31 !== 0) { \n $ERROR('#1018: -33554432 << 31 === 0. Actual: ' + (-33554432 << 31)); \n} \n\n\nif (-67108864 << 31 !== 0) { \n $ERROR('#1019: -67108864 << 31 === 0. Actual: ' + (-67108864 << 31)); \n} \n\n\nif (-134217728 << 31 !== 0) { \n $ERROR('#1020: -134217728 << 31 === 0. Actual: ' + (-134217728 << 31)); \n} \n\n\nif (-268435456 << 31 !== 0) { \n $ERROR('#1021: -268435456 << 31 === 0. Actual: ' + (-268435456 << 31)); \n} \n\n\nif (-536870912 << 31 !== 0) { \n $ERROR('#1022: -536870912 << 31 === 0. Actual: ' + (-536870912 << 31)); \n} \n\n\nif (-1073741824 << 31 !== 0) { \n $ERROR('#1023: -1073741824 << 31 === 0. Actual: ' + (-1073741824 << 31)); \n} \n\n\nif (-2147483648 << 31 !== 0) { \n $ERROR('#1024: -2147483648 << 31 === 0. Actual: ' + (-2147483648 << 31)); \n} \n\n",
+ "id": "S11.7.1_A4_T2"
+ },
+ {
+ "section": "11.7.1",
+ "description": "ShiftExpression = 2^n - 1, n = 0...15",
+ "test": "//CHECK\n\nif (0 << 0 !== 0) { \n $ERROR('#1: 0 << 0 === 0. Actual: ' + (0 << 0)); \n} \n\n\nif (1 << 0 !== 1) { \n $ERROR('#2: 1 << 0 === 1. Actual: ' + (1 << 0)); \n} \n\n\nif (3 << 0 !== 3) { \n $ERROR('#3: 3 << 0 === 3. Actual: ' + (3 << 0)); \n} \n\n\nif (7 << 0 !== 7) { \n $ERROR('#4: 7 << 0 === 7. Actual: ' + (7 << 0)); \n} \n\n\nif (15 << 0 !== 15) { \n $ERROR('#5: 15 << 0 === 15. Actual: ' + (15 << 0)); \n} \n\n\nif (31 << 0 !== 31) { \n $ERROR('#6: 31 << 0 === 31. Actual: ' + (31 << 0)); \n} \n\n\nif (63 << 0 !== 63) { \n $ERROR('#7: 63 << 0 === 63. Actual: ' + (63 << 0)); \n} \n\n\nif (127 << 0 !== 127) { \n $ERROR('#8: 127 << 0 === 127. Actual: ' + (127 << 0)); \n} \n\n\nif (255 << 0 !== 255) { \n $ERROR('#9: 255 << 0 === 255. Actual: ' + (255 << 0)); \n} \n\n\nif (511 << 0 !== 511) { \n $ERROR('#10: 511 << 0 === 511. Actual: ' + (511 << 0)); \n} \n\n\nif (1023 << 0 !== 1023) { \n $ERROR('#11: 1023 << 0 === 1023. Actual: ' + (1023 << 0)); \n} \n\n\nif (2047 << 0 !== 2047) { \n $ERROR('#12: 2047 << 0 === 2047. Actual: ' + (2047 << 0)); \n} \n\n\nif (4095 << 0 !== 4095) { \n $ERROR('#13: 4095 << 0 === 4095. Actual: ' + (4095 << 0)); \n} \n\n\nif (8191 << 0 !== 8191) { \n $ERROR('#14: 8191 << 0 === 8191. Actual: ' + (8191 << 0)); \n} \n\n\nif (16383 << 0 !== 16383) { \n $ERROR('#15: 16383 << 0 === 16383. Actual: ' + (16383 << 0)); \n} \n\n\nif (32767 << 0 !== 32767) { \n $ERROR('#16: 32767 << 0 === 32767. Actual: ' + (32767 << 0)); \n} \n\n\nif (65535 << 0 !== 65535) { \n $ERROR('#17: 65535 << 0 === 65535. Actual: ' + (65535 << 0)); \n} \n\n\nif (131071 << 0 !== 131071) { \n $ERROR('#18: 131071 << 0 === 131071. Actual: ' + (131071 << 0)); \n} \n\n\nif (262143 << 0 !== 262143) { \n $ERROR('#19: 262143 << 0 === 262143. Actual: ' + (262143 << 0)); \n} \n\n\nif (524287 << 0 !== 524287) { \n $ERROR('#20: 524287 << 0 === 524287. Actual: ' + (524287 << 0)); \n} \n\n\nif (1048575 << 0 !== 1048575) { \n $ERROR('#21: 1048575 << 0 === 1048575. Actual: ' + (1048575 << 0)); \n} \n\n\nif (2097151 << 0 !== 2097151) { \n $ERROR('#22: 2097151 << 0 === 2097151. Actual: ' + (2097151 << 0)); \n} \n\n\nif (4194303 << 0 !== 4194303) { \n $ERROR('#23: 4194303 << 0 === 4194303. Actual: ' + (4194303 << 0)); \n} \n\n\nif (8388607 << 0 !== 8388607) { \n $ERROR('#24: 8388607 << 0 === 8388607. Actual: ' + (8388607 << 0)); \n} \n\n\nif (16777215 << 0 !== 16777215) { \n $ERROR('#25: 16777215 << 0 === 16777215. Actual: ' + (16777215 << 0)); \n} \n\n\nif (33554431 << 0 !== 33554431) { \n $ERROR('#26: 33554431 << 0 === 33554431. Actual: ' + (33554431 << 0)); \n} \n\n\nif (67108863 << 0 !== 67108863) { \n $ERROR('#27: 67108863 << 0 === 67108863. Actual: ' + (67108863 << 0)); \n} \n\n\nif (134217727 << 0 !== 134217727) { \n $ERROR('#28: 134217727 << 0 === 134217727. Actual: ' + (134217727 << 0)); \n} \n\n\nif (268435455 << 0 !== 268435455) { \n $ERROR('#29: 268435455 << 0 === 268435455. Actual: ' + (268435455 << 0)); \n} \n\n\nif (536870911 << 0 !== 536870911) { \n $ERROR('#30: 536870911 << 0 === 536870911. Actual: ' + (536870911 << 0)); \n} \n\n\nif (1073741823 << 0 !== 1073741823) { \n $ERROR('#31: 1073741823 << 0 === 1073741823. Actual: ' + (1073741823 << 0)); \n} \n\n\nif (2147483647 << 0 !== 2147483647) { \n $ERROR('#32: 2147483647 << 0 === 2147483647. Actual: ' + (2147483647 << 0)); \n} \n\n\nif (0 << 1 !== 0) { \n $ERROR('#33: 0 << 1 === 0. Actual: ' + (0 << 1)); \n} \n\n\nif (1 << 1 !== 2) { \n $ERROR('#34: 1 << 1 === 2. Actual: ' + (1 << 1)); \n} \n\n\nif (3 << 1 !== 6) { \n $ERROR('#35: 3 << 1 === 6. Actual: ' + (3 << 1)); \n} \n\n\nif (7 << 1 !== 14) { \n $ERROR('#36: 7 << 1 === 14. Actual: ' + (7 << 1)); \n} \n\n\nif (15 << 1 !== 30) { \n $ERROR('#37: 15 << 1 === 30. Actual: ' + (15 << 1)); \n} \n\n\nif (31 << 1 !== 62) { \n $ERROR('#38: 31 << 1 === 62. Actual: ' + (31 << 1)); \n} \n\n\nif (63 << 1 !== 126) { \n $ERROR('#39: 63 << 1 === 126. Actual: ' + (63 << 1)); \n} \n\n\nif (127 << 1 !== 254) { \n $ERROR('#40: 127 << 1 === 254. Actual: ' + (127 << 1)); \n} \n\n\nif (255 << 1 !== 510) { \n $ERROR('#41: 255 << 1 === 510. Actual: ' + (255 << 1)); \n} \n\n\nif (511 << 1 !== 1022) { \n $ERROR('#42: 511 << 1 === 1022. Actual: ' + (511 << 1)); \n} \n\n\nif (1023 << 1 !== 2046) { \n $ERROR('#43: 1023 << 1 === 2046. Actual: ' + (1023 << 1)); \n} \n\n\nif (2047 << 1 !== 4094) { \n $ERROR('#44: 2047 << 1 === 4094. Actual: ' + (2047 << 1)); \n} \n\n\nif (4095 << 1 !== 8190) { \n $ERROR('#45: 4095 << 1 === 8190. Actual: ' + (4095 << 1)); \n} \n\n\nif (8191 << 1 !== 16382) { \n $ERROR('#46: 8191 << 1 === 16382. Actual: ' + (8191 << 1)); \n} \n\n\nif (16383 << 1 !== 32766) { \n $ERROR('#47: 16383 << 1 === 32766. Actual: ' + (16383 << 1)); \n} \n\n\nif (32767 << 1 !== 65534) { \n $ERROR('#48: 32767 << 1 === 65534. Actual: ' + (32767 << 1)); \n} \n\n\nif (65535 << 1 !== 131070) { \n $ERROR('#49: 65535 << 1 === 131070. Actual: ' + (65535 << 1)); \n} \n\n\nif (131071 << 1 !== 262142) { \n $ERROR('#50: 131071 << 1 === 262142. Actual: ' + (131071 << 1)); \n} \n\n\nif (262143 << 1 !== 524286) { \n $ERROR('#51: 262143 << 1 === 524286. Actual: ' + (262143 << 1)); \n} \n\n\nif (524287 << 1 !== 1048574) { \n $ERROR('#52: 524287 << 1 === 1048574. Actual: ' + (524287 << 1)); \n} \n\n\nif (1048575 << 1 !== 2097150) { \n $ERROR('#53: 1048575 << 1 === 2097150. Actual: ' + (1048575 << 1)); \n} \n\n\nif (2097151 << 1 !== 4194302) { \n $ERROR('#54: 2097151 << 1 === 4194302. Actual: ' + (2097151 << 1)); \n} \n\n\nif (4194303 << 1 !== 8388606) { \n $ERROR('#55: 4194303 << 1 === 8388606. Actual: ' + (4194303 << 1)); \n} \n\n\nif (8388607 << 1 !== 16777214) { \n $ERROR('#56: 8388607 << 1 === 16777214. Actual: ' + (8388607 << 1)); \n} \n\n\nif (16777215 << 1 !== 33554430) { \n $ERROR('#57: 16777215 << 1 === 33554430. Actual: ' + (16777215 << 1)); \n} \n\n\nif (33554431 << 1 !== 67108862) { \n $ERROR('#58: 33554431 << 1 === 67108862. Actual: ' + (33554431 << 1)); \n} \n\n\nif (67108863 << 1 !== 134217726) { \n $ERROR('#59: 67108863 << 1 === 134217726. Actual: ' + (67108863 << 1)); \n} \n\n\nif (134217727 << 1 !== 268435454) { \n $ERROR('#60: 134217727 << 1 === 268435454. Actual: ' + (134217727 << 1)); \n} \n\n\nif (268435455 << 1 !== 536870910) { \n $ERROR('#61: 268435455 << 1 === 536870910. Actual: ' + (268435455 << 1)); \n} \n\n\nif (536870911 << 1 !== 1073741822) { \n $ERROR('#62: 536870911 << 1 === 1073741822. Actual: ' + (536870911 << 1)); \n} \n\n\nif (1073741823 << 1 !== 2147483646) { \n $ERROR('#63: 1073741823 << 1 === 2147483646. Actual: ' + (1073741823 << 1)); \n} \n\n\nif (2147483647 << 1 !== -2) { \n $ERROR('#64: 2147483647 << 1 === -2. Actual: ' + (2147483647 << 1)); \n} \n\n\nif (0 << 2 !== 0) { \n $ERROR('#65: 0 << 2 === 0. Actual: ' + (0 << 2)); \n} \n\n\nif (1 << 2 !== 4) { \n $ERROR('#66: 1 << 2 === 4. Actual: ' + (1 << 2)); \n} \n\n\nif (3 << 2 !== 12) { \n $ERROR('#67: 3 << 2 === 12. Actual: ' + (3 << 2)); \n} \n\n\nif (7 << 2 !== 28) { \n $ERROR('#68: 7 << 2 === 28. Actual: ' + (7 << 2)); \n} \n\n\nif (15 << 2 !== 60) { \n $ERROR('#69: 15 << 2 === 60. Actual: ' + (15 << 2)); \n} \n\n\nif (31 << 2 !== 124) { \n $ERROR('#70: 31 << 2 === 124. Actual: ' + (31 << 2)); \n} \n\n\nif (63 << 2 !== 252) { \n $ERROR('#71: 63 << 2 === 252. Actual: ' + (63 << 2)); \n} \n\n\nif (127 << 2 !== 508) { \n $ERROR('#72: 127 << 2 === 508. Actual: ' + (127 << 2)); \n} \n\n\nif (255 << 2 !== 1020) { \n $ERROR('#73: 255 << 2 === 1020. Actual: ' + (255 << 2)); \n} \n\n\nif (511 << 2 !== 2044) { \n $ERROR('#74: 511 << 2 === 2044. Actual: ' + (511 << 2)); \n} \n\n\nif (1023 << 2 !== 4092) { \n $ERROR('#75: 1023 << 2 === 4092. Actual: ' + (1023 << 2)); \n} \n\n\nif (2047 << 2 !== 8188) { \n $ERROR('#76: 2047 << 2 === 8188. Actual: ' + (2047 << 2)); \n} \n\n\nif (4095 << 2 !== 16380) { \n $ERROR('#77: 4095 << 2 === 16380. Actual: ' + (4095 << 2)); \n} \n\n\nif (8191 << 2 !== 32764) { \n $ERROR('#78: 8191 << 2 === 32764. Actual: ' + (8191 << 2)); \n} \n\n\nif (16383 << 2 !== 65532) { \n $ERROR('#79: 16383 << 2 === 65532. Actual: ' + (16383 << 2)); \n} \n\n\nif (32767 << 2 !== 131068) { \n $ERROR('#80: 32767 << 2 === 131068. Actual: ' + (32767 << 2)); \n} \n\n\nif (65535 << 2 !== 262140) { \n $ERROR('#81: 65535 << 2 === 262140. Actual: ' + (65535 << 2)); \n} \n\n\nif (131071 << 2 !== 524284) { \n $ERROR('#82: 131071 << 2 === 524284. Actual: ' + (131071 << 2)); \n} \n\n\nif (262143 << 2 !== 1048572) { \n $ERROR('#83: 262143 << 2 === 1048572. Actual: ' + (262143 << 2)); \n} \n\n\nif (524287 << 2 !== 2097148) { \n $ERROR('#84: 524287 << 2 === 2097148. Actual: ' + (524287 << 2)); \n} \n\n\nif (1048575 << 2 !== 4194300) { \n $ERROR('#85: 1048575 << 2 === 4194300. Actual: ' + (1048575 << 2)); \n} \n\n\nif (2097151 << 2 !== 8388604) { \n $ERROR('#86: 2097151 << 2 === 8388604. Actual: ' + (2097151 << 2)); \n} \n\n\nif (4194303 << 2 !== 16777212) { \n $ERROR('#87: 4194303 << 2 === 16777212. Actual: ' + (4194303 << 2)); \n} \n\n\nif (8388607 << 2 !== 33554428) { \n $ERROR('#88: 8388607 << 2 === 33554428. Actual: ' + (8388607 << 2)); \n} \n\n\nif (16777215 << 2 !== 67108860) { \n $ERROR('#89: 16777215 << 2 === 67108860. Actual: ' + (16777215 << 2)); \n} \n\n\nif (33554431 << 2 !== 134217724) { \n $ERROR('#90: 33554431 << 2 === 134217724. Actual: ' + (33554431 << 2)); \n} \n\n\nif (67108863 << 2 !== 268435452) { \n $ERROR('#91: 67108863 << 2 === 268435452. Actual: ' + (67108863 << 2)); \n} \n\n\nif (134217727 << 2 !== 536870908) { \n $ERROR('#92: 134217727 << 2 === 536870908. Actual: ' + (134217727 << 2)); \n} \n\n\nif (268435455 << 2 !== 1073741820) { \n $ERROR('#93: 268435455 << 2 === 1073741820. Actual: ' + (268435455 << 2)); \n} \n\n\nif (536870911 << 2 !== 2147483644) { \n $ERROR('#94: 536870911 << 2 === 2147483644. Actual: ' + (536870911 << 2)); \n} \n\n\nif (1073741823 << 2 !== -4) { \n $ERROR('#95: 1073741823 << 2 === -4. Actual: ' + (1073741823 << 2)); \n} \n\n\nif (2147483647 << 2 !== -4) { \n $ERROR('#96: 2147483647 << 2 === -4. Actual: ' + (2147483647 << 2)); \n} \n\n\nif (0 << 3 !== 0) { \n $ERROR('#97: 0 << 3 === 0. Actual: ' + (0 << 3)); \n} \n\n\nif (1 << 3 !== 8) { \n $ERROR('#98: 1 << 3 === 8. Actual: ' + (1 << 3)); \n} \n\n\nif (3 << 3 !== 24) { \n $ERROR('#99: 3 << 3 === 24. Actual: ' + (3 << 3)); \n} \n\n\nif (7 << 3 !== 56) { \n $ERROR('#100: 7 << 3 === 56. Actual: ' + (7 << 3)); \n} \n\n\nif (15 << 3 !== 120) { \n $ERROR('#101: 15 << 3 === 120. Actual: ' + (15 << 3)); \n} \n\n\nif (31 << 3 !== 248) { \n $ERROR('#102: 31 << 3 === 248. Actual: ' + (31 << 3)); \n} \n\n\nif (63 << 3 !== 504) { \n $ERROR('#103: 63 << 3 === 504. Actual: ' + (63 << 3)); \n} \n\n\nif (127 << 3 !== 1016) { \n $ERROR('#104: 127 << 3 === 1016. Actual: ' + (127 << 3)); \n} \n\n\nif (255 << 3 !== 2040) { \n $ERROR('#105: 255 << 3 === 2040. Actual: ' + (255 << 3)); \n} \n\n\nif (511 << 3 !== 4088) { \n $ERROR('#106: 511 << 3 === 4088. Actual: ' + (511 << 3)); \n} \n\n\nif (1023 << 3 !== 8184) { \n $ERROR('#107: 1023 << 3 === 8184. Actual: ' + (1023 << 3)); \n} \n\n\nif (2047 << 3 !== 16376) { \n $ERROR('#108: 2047 << 3 === 16376. Actual: ' + (2047 << 3)); \n} \n\n\nif (4095 << 3 !== 32760) { \n $ERROR('#109: 4095 << 3 === 32760. Actual: ' + (4095 << 3)); \n} \n\n\nif (8191 << 3 !== 65528) { \n $ERROR('#110: 8191 << 3 === 65528. Actual: ' + (8191 << 3)); \n} \n\n\nif (16383 << 3 !== 131064) { \n $ERROR('#111: 16383 << 3 === 131064. Actual: ' + (16383 << 3)); \n} \n\n\nif (32767 << 3 !== 262136) { \n $ERROR('#112: 32767 << 3 === 262136. Actual: ' + (32767 << 3)); \n} \n\n\nif (65535 << 3 !== 524280) { \n $ERROR('#113: 65535 << 3 === 524280. Actual: ' + (65535 << 3)); \n} \n\n\nif (131071 << 3 !== 1048568) { \n $ERROR('#114: 131071 << 3 === 1048568. Actual: ' + (131071 << 3)); \n} \n\n\nif (262143 << 3 !== 2097144) { \n $ERROR('#115: 262143 << 3 === 2097144. Actual: ' + (262143 << 3)); \n} \n\n\nif (524287 << 3 !== 4194296) { \n $ERROR('#116: 524287 << 3 === 4194296. Actual: ' + (524287 << 3)); \n} \n\n\nif (1048575 << 3 !== 8388600) { \n $ERROR('#117: 1048575 << 3 === 8388600. Actual: ' + (1048575 << 3)); \n} \n\n\nif (2097151 << 3 !== 16777208) { \n $ERROR('#118: 2097151 << 3 === 16777208. Actual: ' + (2097151 << 3)); \n} \n\n\nif (4194303 << 3 !== 33554424) { \n $ERROR('#119: 4194303 << 3 === 33554424. Actual: ' + (4194303 << 3)); \n} \n\n\nif (8388607 << 3 !== 67108856) { \n $ERROR('#120: 8388607 << 3 === 67108856. Actual: ' + (8388607 << 3)); \n} \n\n\nif (16777215 << 3 !== 134217720) { \n $ERROR('#121: 16777215 << 3 === 134217720. Actual: ' + (16777215 << 3)); \n} \n\n\nif (33554431 << 3 !== 268435448) { \n $ERROR('#122: 33554431 << 3 === 268435448. Actual: ' + (33554431 << 3)); \n} \n\n\nif (67108863 << 3 !== 536870904) { \n $ERROR('#123: 67108863 << 3 === 536870904. Actual: ' + (67108863 << 3)); \n} \n\n\nif (134217727 << 3 !== 1073741816) { \n $ERROR('#124: 134217727 << 3 === 1073741816. Actual: ' + (134217727 << 3)); \n} \n\n\nif (268435455 << 3 !== 2147483640) { \n $ERROR('#125: 268435455 << 3 === 2147483640. Actual: ' + (268435455 << 3)); \n} \n\n\nif (536870911 << 3 !== -8) { \n $ERROR('#126: 536870911 << 3 === -8. Actual: ' + (536870911 << 3)); \n} \n\n\nif (1073741823 << 3 !== -8) { \n $ERROR('#127: 1073741823 << 3 === -8. Actual: ' + (1073741823 << 3)); \n} \n\n\nif (2147483647 << 3 !== -8) { \n $ERROR('#128: 2147483647 << 3 === -8. Actual: ' + (2147483647 << 3)); \n} \n\n\nif (0 << 4 !== 0) { \n $ERROR('#129: 0 << 4 === 0. Actual: ' + (0 << 4)); \n} \n\n\nif (1 << 4 !== 16) { \n $ERROR('#130: 1 << 4 === 16. Actual: ' + (1 << 4)); \n} \n\n\nif (3 << 4 !== 48) { \n $ERROR('#131: 3 << 4 === 48. Actual: ' + (3 << 4)); \n} \n\n\nif (7 << 4 !== 112) { \n $ERROR('#132: 7 << 4 === 112. Actual: ' + (7 << 4)); \n} \n\n\nif (15 << 4 !== 240) { \n $ERROR('#133: 15 << 4 === 240. Actual: ' + (15 << 4)); \n} \n\n\nif (31 << 4 !== 496) { \n $ERROR('#134: 31 << 4 === 496. Actual: ' + (31 << 4)); \n} \n\n\nif (63 << 4 !== 1008) { \n $ERROR('#135: 63 << 4 === 1008. Actual: ' + (63 << 4)); \n} \n\n\nif (127 << 4 !== 2032) { \n $ERROR('#136: 127 << 4 === 2032. Actual: ' + (127 << 4)); \n} \n\n\nif (255 << 4 !== 4080) { \n $ERROR('#137: 255 << 4 === 4080. Actual: ' + (255 << 4)); \n} \n\n\nif (511 << 4 !== 8176) { \n $ERROR('#138: 511 << 4 === 8176. Actual: ' + (511 << 4)); \n} \n\n\nif (1023 << 4 !== 16368) { \n $ERROR('#139: 1023 << 4 === 16368. Actual: ' + (1023 << 4)); \n} \n\n\nif (2047 << 4 !== 32752) { \n $ERROR('#140: 2047 << 4 === 32752. Actual: ' + (2047 << 4)); \n} \n\n\nif (4095 << 4 !== 65520) { \n $ERROR('#141: 4095 << 4 === 65520. Actual: ' + (4095 << 4)); \n} \n\n\nif (8191 << 4 !== 131056) { \n $ERROR('#142: 8191 << 4 === 131056. Actual: ' + (8191 << 4)); \n} \n\n\nif (16383 << 4 !== 262128) { \n $ERROR('#143: 16383 << 4 === 262128. Actual: ' + (16383 << 4)); \n} \n\n\nif (32767 << 4 !== 524272) { \n $ERROR('#144: 32767 << 4 === 524272. Actual: ' + (32767 << 4)); \n} \n\n\nif (65535 << 4 !== 1048560) { \n $ERROR('#145: 65535 << 4 === 1048560. Actual: ' + (65535 << 4)); \n} \n\n\nif (131071 << 4 !== 2097136) { \n $ERROR('#146: 131071 << 4 === 2097136. Actual: ' + (131071 << 4)); \n} \n\n\nif (262143 << 4 !== 4194288) { \n $ERROR('#147: 262143 << 4 === 4194288. Actual: ' + (262143 << 4)); \n} \n\n\nif (524287 << 4 !== 8388592) { \n $ERROR('#148: 524287 << 4 === 8388592. Actual: ' + (524287 << 4)); \n} \n\n\nif (1048575 << 4 !== 16777200) { \n $ERROR('#149: 1048575 << 4 === 16777200. Actual: ' + (1048575 << 4)); \n} \n\n\nif (2097151 << 4 !== 33554416) { \n $ERROR('#150: 2097151 << 4 === 33554416. Actual: ' + (2097151 << 4)); \n} \n\n\nif (4194303 << 4 !== 67108848) { \n $ERROR('#151: 4194303 << 4 === 67108848. Actual: ' + (4194303 << 4)); \n} \n\n\nif (8388607 << 4 !== 134217712) { \n $ERROR('#152: 8388607 << 4 === 134217712. Actual: ' + (8388607 << 4)); \n} \n\n\nif (16777215 << 4 !== 268435440) { \n $ERROR('#153: 16777215 << 4 === 268435440. Actual: ' + (16777215 << 4)); \n} \n\n\nif (33554431 << 4 !== 536870896) { \n $ERROR('#154: 33554431 << 4 === 536870896. Actual: ' + (33554431 << 4)); \n} \n\n\nif (67108863 << 4 !== 1073741808) { \n $ERROR('#155: 67108863 << 4 === 1073741808. Actual: ' + (67108863 << 4)); \n} \n\n\nif (134217727 << 4 !== 2147483632) { \n $ERROR('#156: 134217727 << 4 === 2147483632. Actual: ' + (134217727 << 4)); \n} \n\n\nif (268435455 << 4 !== -16) { \n $ERROR('#157: 268435455 << 4 === -16. Actual: ' + (268435455 << 4)); \n} \n\n\nif (536870911 << 4 !== -16) { \n $ERROR('#158: 536870911 << 4 === -16. Actual: ' + (536870911 << 4)); \n} \n\n\nif (1073741823 << 4 !== -16) { \n $ERROR('#159: 1073741823 << 4 === -16. Actual: ' + (1073741823 << 4)); \n} \n\n\nif (2147483647 << 4 !== -16) { \n $ERROR('#160: 2147483647 << 4 === -16. Actual: ' + (2147483647 << 4)); \n} \n\n\nif (0 << 5 !== 0) { \n $ERROR('#161: 0 << 5 === 0. Actual: ' + (0 << 5)); \n} \n\n\nif (1 << 5 !== 32) { \n $ERROR('#162: 1 << 5 === 32. Actual: ' + (1 << 5)); \n} \n\n\nif (3 << 5 !== 96) { \n $ERROR('#163: 3 << 5 === 96. Actual: ' + (3 << 5)); \n} \n\n\nif (7 << 5 !== 224) { \n $ERROR('#164: 7 << 5 === 224. Actual: ' + (7 << 5)); \n} \n\n\nif (15 << 5 !== 480) { \n $ERROR('#165: 15 << 5 === 480. Actual: ' + (15 << 5)); \n} \n\n\nif (31 << 5 !== 992) { \n $ERROR('#166: 31 << 5 === 992. Actual: ' + (31 << 5)); \n} \n\n\nif (63 << 5 !== 2016) { \n $ERROR('#167: 63 << 5 === 2016. Actual: ' + (63 << 5)); \n} \n\n\nif (127 << 5 !== 4064) { \n $ERROR('#168: 127 << 5 === 4064. Actual: ' + (127 << 5)); \n} \n\n\nif (255 << 5 !== 8160) { \n $ERROR('#169: 255 << 5 === 8160. Actual: ' + (255 << 5)); \n} \n\n\nif (511 << 5 !== 16352) { \n $ERROR('#170: 511 << 5 === 16352. Actual: ' + (511 << 5)); \n} \n\n\nif (1023 << 5 !== 32736) { \n $ERROR('#171: 1023 << 5 === 32736. Actual: ' + (1023 << 5)); \n} \n\n\nif (2047 << 5 !== 65504) { \n $ERROR('#172: 2047 << 5 === 65504. Actual: ' + (2047 << 5)); \n} \n\n\nif (4095 << 5 !== 131040) { \n $ERROR('#173: 4095 << 5 === 131040. Actual: ' + (4095 << 5)); \n} \n\n\nif (8191 << 5 !== 262112) { \n $ERROR('#174: 8191 << 5 === 262112. Actual: ' + (8191 << 5)); \n} \n\n\nif (16383 << 5 !== 524256) { \n $ERROR('#175: 16383 << 5 === 524256. Actual: ' + (16383 << 5)); \n} \n\n\nif (32767 << 5 !== 1048544) { \n $ERROR('#176: 32767 << 5 === 1048544. Actual: ' + (32767 << 5)); \n} \n\n\nif (65535 << 5 !== 2097120) { \n $ERROR('#177: 65535 << 5 === 2097120. Actual: ' + (65535 << 5)); \n} \n\n\nif (131071 << 5 !== 4194272) { \n $ERROR('#178: 131071 << 5 === 4194272. Actual: ' + (131071 << 5)); \n} \n\n\nif (262143 << 5 !== 8388576) { \n $ERROR('#179: 262143 << 5 === 8388576. Actual: ' + (262143 << 5)); \n} \n\n\nif (524287 << 5 !== 16777184) { \n $ERROR('#180: 524287 << 5 === 16777184. Actual: ' + (524287 << 5)); \n} \n\n\nif (1048575 << 5 !== 33554400) { \n $ERROR('#181: 1048575 << 5 === 33554400. Actual: ' + (1048575 << 5)); \n} \n\n\nif (2097151 << 5 !== 67108832) { \n $ERROR('#182: 2097151 << 5 === 67108832. Actual: ' + (2097151 << 5)); \n} \n\n\nif (4194303 << 5 !== 134217696) { \n $ERROR('#183: 4194303 << 5 === 134217696. Actual: ' + (4194303 << 5)); \n} \n\n\nif (8388607 << 5 !== 268435424) { \n $ERROR('#184: 8388607 << 5 === 268435424. Actual: ' + (8388607 << 5)); \n} \n\n\nif (16777215 << 5 !== 536870880) { \n $ERROR('#185: 16777215 << 5 === 536870880. Actual: ' + (16777215 << 5)); \n} \n\n\nif (33554431 << 5 !== 1073741792) { \n $ERROR('#186: 33554431 << 5 === 1073741792. Actual: ' + (33554431 << 5)); \n} \n\n\nif (67108863 << 5 !== 2147483616) { \n $ERROR('#187: 67108863 << 5 === 2147483616. Actual: ' + (67108863 << 5)); \n} \n\n\nif (134217727 << 5 !== -32) { \n $ERROR('#188: 134217727 << 5 === -32. Actual: ' + (134217727 << 5)); \n} \n\n\nif (268435455 << 5 !== -32) { \n $ERROR('#189: 268435455 << 5 === -32. Actual: ' + (268435455 << 5)); \n} \n\n\nif (536870911 << 5 !== -32) { \n $ERROR('#190: 536870911 << 5 === -32. Actual: ' + (536870911 << 5)); \n} \n\n\nif (1073741823 << 5 !== -32) { \n $ERROR('#191: 1073741823 << 5 === -32. Actual: ' + (1073741823 << 5)); \n} \n\n\nif (2147483647 << 5 !== -32) { \n $ERROR('#192: 2147483647 << 5 === -32. Actual: ' + (2147483647 << 5)); \n} \n\n\nif (0 << 6 !== 0) { \n $ERROR('#193: 0 << 6 === 0. Actual: ' + (0 << 6)); \n} \n\n\nif (1 << 6 !== 64) { \n $ERROR('#194: 1 << 6 === 64. Actual: ' + (1 << 6)); \n} \n\n\nif (3 << 6 !== 192) { \n $ERROR('#195: 3 << 6 === 192. Actual: ' + (3 << 6)); \n} \n\n\nif (7 << 6 !== 448) { \n $ERROR('#196: 7 << 6 === 448. Actual: ' + (7 << 6)); \n} \n\n\nif (15 << 6 !== 960) { \n $ERROR('#197: 15 << 6 === 960. Actual: ' + (15 << 6)); \n} \n\n\nif (31 << 6 !== 1984) { \n $ERROR('#198: 31 << 6 === 1984. Actual: ' + (31 << 6)); \n} \n\n\nif (63 << 6 !== 4032) { \n $ERROR('#199: 63 << 6 === 4032. Actual: ' + (63 << 6)); \n} \n\n\nif (127 << 6 !== 8128) { \n $ERROR('#200: 127 << 6 === 8128. Actual: ' + (127 << 6)); \n} \n\n\nif (255 << 6 !== 16320) { \n $ERROR('#201: 255 << 6 === 16320. Actual: ' + (255 << 6)); \n} \n\n\nif (511 << 6 !== 32704) { \n $ERROR('#202: 511 << 6 === 32704. Actual: ' + (511 << 6)); \n} \n\n\nif (1023 << 6 !== 65472) { \n $ERROR('#203: 1023 << 6 === 65472. Actual: ' + (1023 << 6)); \n} \n\n\nif (2047 << 6 !== 131008) { \n $ERROR('#204: 2047 << 6 === 131008. Actual: ' + (2047 << 6)); \n} \n\n\nif (4095 << 6 !== 262080) { \n $ERROR('#205: 4095 << 6 === 262080. Actual: ' + (4095 << 6)); \n} \n\n\nif (8191 << 6 !== 524224) { \n $ERROR('#206: 8191 << 6 === 524224. Actual: ' + (8191 << 6)); \n} \n\n\nif (16383 << 6 !== 1048512) { \n $ERROR('#207: 16383 << 6 === 1048512. Actual: ' + (16383 << 6)); \n} \n\n\nif (32767 << 6 !== 2097088) { \n $ERROR('#208: 32767 << 6 === 2097088. Actual: ' + (32767 << 6)); \n} \n\n\nif (65535 << 6 !== 4194240) { \n $ERROR('#209: 65535 << 6 === 4194240. Actual: ' + (65535 << 6)); \n} \n\n\nif (131071 << 6 !== 8388544) { \n $ERROR('#210: 131071 << 6 === 8388544. Actual: ' + (131071 << 6)); \n} \n\n\nif (262143 << 6 !== 16777152) { \n $ERROR('#211: 262143 << 6 === 16777152. Actual: ' + (262143 << 6)); \n} \n\n\nif (524287 << 6 !== 33554368) { \n $ERROR('#212: 524287 << 6 === 33554368. Actual: ' + (524287 << 6)); \n} \n\n\nif (1048575 << 6 !== 67108800) { \n $ERROR('#213: 1048575 << 6 === 67108800. Actual: ' + (1048575 << 6)); \n} \n\n\nif (2097151 << 6 !== 134217664) { \n $ERROR('#214: 2097151 << 6 === 134217664. Actual: ' + (2097151 << 6)); \n} \n\n\nif (4194303 << 6 !== 268435392) { \n $ERROR('#215: 4194303 << 6 === 268435392. Actual: ' + (4194303 << 6)); \n} \n\n\nif (8388607 << 6 !== 536870848) { \n $ERROR('#216: 8388607 << 6 === 536870848. Actual: ' + (8388607 << 6)); \n} \n\n\nif (16777215 << 6 !== 1073741760) { \n $ERROR('#217: 16777215 << 6 === 1073741760. Actual: ' + (16777215 << 6)); \n} \n\n\nif (33554431 << 6 !== 2147483584) { \n $ERROR('#218: 33554431 << 6 === 2147483584. Actual: ' + (33554431 << 6)); \n} \n\n\nif (67108863 << 6 !== -64) { \n $ERROR('#219: 67108863 << 6 === -64. Actual: ' + (67108863 << 6)); \n} \n\n\nif (134217727 << 6 !== -64) { \n $ERROR('#220: 134217727 << 6 === -64. Actual: ' + (134217727 << 6)); \n} \n\n\nif (268435455 << 6 !== -64) { \n $ERROR('#221: 268435455 << 6 === -64. Actual: ' + (268435455 << 6)); \n} \n\n\nif (536870911 << 6 !== -64) { \n $ERROR('#222: 536870911 << 6 === -64. Actual: ' + (536870911 << 6)); \n} \n\n\nif (1073741823 << 6 !== -64) { \n $ERROR('#223: 1073741823 << 6 === -64. Actual: ' + (1073741823 << 6)); \n} \n\n\nif (2147483647 << 6 !== -64) { \n $ERROR('#224: 2147483647 << 6 === -64. Actual: ' + (2147483647 << 6)); \n} \n\n\nif (0 << 7 !== 0) { \n $ERROR('#225: 0 << 7 === 0. Actual: ' + (0 << 7)); \n} \n\n\nif (1 << 7 !== 128) { \n $ERROR('#226: 1 << 7 === 128. Actual: ' + (1 << 7)); \n} \n\n\nif (3 << 7 !== 384) { \n $ERROR('#227: 3 << 7 === 384. Actual: ' + (3 << 7)); \n} \n\n\nif (7 << 7 !== 896) { \n $ERROR('#228: 7 << 7 === 896. Actual: ' + (7 << 7)); \n} \n\n\nif (15 << 7 !== 1920) { \n $ERROR('#229: 15 << 7 === 1920. Actual: ' + (15 << 7)); \n} \n\n\nif (31 << 7 !== 3968) { \n $ERROR('#230: 31 << 7 === 3968. Actual: ' + (31 << 7)); \n} \n\n\nif (63 << 7 !== 8064) { \n $ERROR('#231: 63 << 7 === 8064. Actual: ' + (63 << 7)); \n} \n\n\nif (127 << 7 !== 16256) { \n $ERROR('#232: 127 << 7 === 16256. Actual: ' + (127 << 7)); \n} \n\n\nif (255 << 7 !== 32640) { \n $ERROR('#233: 255 << 7 === 32640. Actual: ' + (255 << 7)); \n} \n\n\nif (511 << 7 !== 65408) { \n $ERROR('#234: 511 << 7 === 65408. Actual: ' + (511 << 7)); \n} \n\n\nif (1023 << 7 !== 130944) { \n $ERROR('#235: 1023 << 7 === 130944. Actual: ' + (1023 << 7)); \n} \n\n\nif (2047 << 7 !== 262016) { \n $ERROR('#236: 2047 << 7 === 262016. Actual: ' + (2047 << 7)); \n} \n\n\nif (4095 << 7 !== 524160) { \n $ERROR('#237: 4095 << 7 === 524160. Actual: ' + (4095 << 7)); \n} \n\n\nif (8191 << 7 !== 1048448) { \n $ERROR('#238: 8191 << 7 === 1048448. Actual: ' + (8191 << 7)); \n} \n\n\nif (16383 << 7 !== 2097024) { \n $ERROR('#239: 16383 << 7 === 2097024. Actual: ' + (16383 << 7)); \n} \n\n\nif (32767 << 7 !== 4194176) { \n $ERROR('#240: 32767 << 7 === 4194176. Actual: ' + (32767 << 7)); \n} \n\n\nif (65535 << 7 !== 8388480) { \n $ERROR('#241: 65535 << 7 === 8388480. Actual: ' + (65535 << 7)); \n} \n\n\nif (131071 << 7 !== 16777088) { \n $ERROR('#242: 131071 << 7 === 16777088. Actual: ' + (131071 << 7)); \n} \n\n\nif (262143 << 7 !== 33554304) { \n $ERROR('#243: 262143 << 7 === 33554304. Actual: ' + (262143 << 7)); \n} \n\n\nif (524287 << 7 !== 67108736) { \n $ERROR('#244: 524287 << 7 === 67108736. Actual: ' + (524287 << 7)); \n} \n\n\nif (1048575 << 7 !== 134217600) { \n $ERROR('#245: 1048575 << 7 === 134217600. Actual: ' + (1048575 << 7)); \n} \n\n\nif (2097151 << 7 !== 268435328) { \n $ERROR('#246: 2097151 << 7 === 268435328. Actual: ' + (2097151 << 7)); \n} \n\n\nif (4194303 << 7 !== 536870784) { \n $ERROR('#247: 4194303 << 7 === 536870784. Actual: ' + (4194303 << 7)); \n} \n\n\nif (8388607 << 7 !== 1073741696) { \n $ERROR('#248: 8388607 << 7 === 1073741696. Actual: ' + (8388607 << 7)); \n} \n\n\nif (16777215 << 7 !== 2147483520) { \n $ERROR('#249: 16777215 << 7 === 2147483520. Actual: ' + (16777215 << 7)); \n} \n\n\nif (33554431 << 7 !== -128) { \n $ERROR('#250: 33554431 << 7 === -128. Actual: ' + (33554431 << 7)); \n} \n\n\nif (67108863 << 7 !== -128) { \n $ERROR('#251: 67108863 << 7 === -128. Actual: ' + (67108863 << 7)); \n} \n\n\nif (134217727 << 7 !== -128) { \n $ERROR('#252: 134217727 << 7 === -128. Actual: ' + (134217727 << 7)); \n} \n\n\nif (268435455 << 7 !== -128) { \n $ERROR('#253: 268435455 << 7 === -128. Actual: ' + (268435455 << 7)); \n} \n\n\nif (536870911 << 7 !== -128) { \n $ERROR('#254: 536870911 << 7 === -128. Actual: ' + (536870911 << 7)); \n} \n\n\nif (1073741823 << 7 !== -128) { \n $ERROR('#255: 1073741823 << 7 === -128. Actual: ' + (1073741823 << 7)); \n} \n\n\nif (2147483647 << 7 !== -128) { \n $ERROR('#256: 2147483647 << 7 === -128. Actual: ' + (2147483647 << 7)); \n} \n\n\nif (0 << 8 !== 0) { \n $ERROR('#257: 0 << 8 === 0. Actual: ' + (0 << 8)); \n} \n\n\nif (1 << 8 !== 256) { \n $ERROR('#258: 1 << 8 === 256. Actual: ' + (1 << 8)); \n} \n\n\nif (3 << 8 !== 768) { \n $ERROR('#259: 3 << 8 === 768. Actual: ' + (3 << 8)); \n} \n\n\nif (7 << 8 !== 1792) { \n $ERROR('#260: 7 << 8 === 1792. Actual: ' + (7 << 8)); \n} \n\n\nif (15 << 8 !== 3840) { \n $ERROR('#261: 15 << 8 === 3840. Actual: ' + (15 << 8)); \n} \n\n\nif (31 << 8 !== 7936) { \n $ERROR('#262: 31 << 8 === 7936. Actual: ' + (31 << 8)); \n} \n\n\nif (63 << 8 !== 16128) { \n $ERROR('#263: 63 << 8 === 16128. Actual: ' + (63 << 8)); \n} \n\n\nif (127 << 8 !== 32512) { \n $ERROR('#264: 127 << 8 === 32512. Actual: ' + (127 << 8)); \n} \n\n\nif (255 << 8 !== 65280) { \n $ERROR('#265: 255 << 8 === 65280. Actual: ' + (255 << 8)); \n} \n\n\nif (511 << 8 !== 130816) { \n $ERROR('#266: 511 << 8 === 130816. Actual: ' + (511 << 8)); \n} \n\n\nif (1023 << 8 !== 261888) { \n $ERROR('#267: 1023 << 8 === 261888. Actual: ' + (1023 << 8)); \n} \n\n\nif (2047 << 8 !== 524032) { \n $ERROR('#268: 2047 << 8 === 524032. Actual: ' + (2047 << 8)); \n} \n\n\nif (4095 << 8 !== 1048320) { \n $ERROR('#269: 4095 << 8 === 1048320. Actual: ' + (4095 << 8)); \n} \n\n\nif (8191 << 8 !== 2096896) { \n $ERROR('#270: 8191 << 8 === 2096896. Actual: ' + (8191 << 8)); \n} \n\n\nif (16383 << 8 !== 4194048) { \n $ERROR('#271: 16383 << 8 === 4194048. Actual: ' + (16383 << 8)); \n} \n\n\nif (32767 << 8 !== 8388352) { \n $ERROR('#272: 32767 << 8 === 8388352. Actual: ' + (32767 << 8)); \n} \n\n\nif (65535 << 8 !== 16776960) { \n $ERROR('#273: 65535 << 8 === 16776960. Actual: ' + (65535 << 8)); \n} \n\n\nif (131071 << 8 !== 33554176) { \n $ERROR('#274: 131071 << 8 === 33554176. Actual: ' + (131071 << 8)); \n} \n\n\nif (262143 << 8 !== 67108608) { \n $ERROR('#275: 262143 << 8 === 67108608. Actual: ' + (262143 << 8)); \n} \n\n\nif (524287 << 8 !== 134217472) { \n $ERROR('#276: 524287 << 8 === 134217472. Actual: ' + (524287 << 8)); \n} \n\n\nif (1048575 << 8 !== 268435200) { \n $ERROR('#277: 1048575 << 8 === 268435200. Actual: ' + (1048575 << 8)); \n} \n\n\nif (2097151 << 8 !== 536870656) { \n $ERROR('#278: 2097151 << 8 === 536870656. Actual: ' + (2097151 << 8)); \n} \n\n\nif (4194303 << 8 !== 1073741568) { \n $ERROR('#279: 4194303 << 8 === 1073741568. Actual: ' + (4194303 << 8)); \n} \n\n\nif (8388607 << 8 !== 2147483392) { \n $ERROR('#280: 8388607 << 8 === 2147483392. Actual: ' + (8388607 << 8)); \n} \n\n\nif (16777215 << 8 !== -256) { \n $ERROR('#281: 16777215 << 8 === -256. Actual: ' + (16777215 << 8)); \n} \n\n\nif (33554431 << 8 !== -256) { \n $ERROR('#282: 33554431 << 8 === -256. Actual: ' + (33554431 << 8)); \n} \n\n\nif (67108863 << 8 !== -256) { \n $ERROR('#283: 67108863 << 8 === -256. Actual: ' + (67108863 << 8)); \n} \n\n\nif (134217727 << 8 !== -256) { \n $ERROR('#284: 134217727 << 8 === -256. Actual: ' + (134217727 << 8)); \n} \n\n\nif (268435455 << 8 !== -256) { \n $ERROR('#285: 268435455 << 8 === -256. Actual: ' + (268435455 << 8)); \n} \n\n\nif (536870911 << 8 !== -256) { \n $ERROR('#286: 536870911 << 8 === -256. Actual: ' + (536870911 << 8)); \n} \n\n\nif (1073741823 << 8 !== -256) { \n $ERROR('#287: 1073741823 << 8 === -256. Actual: ' + (1073741823 << 8)); \n} \n\n\nif (2147483647 << 8 !== -256) { \n $ERROR('#288: 2147483647 << 8 === -256. Actual: ' + (2147483647 << 8)); \n} \n\n\nif (0 << 9 !== 0) { \n $ERROR('#289: 0 << 9 === 0. Actual: ' + (0 << 9)); \n} \n\n\nif (1 << 9 !== 512) { \n $ERROR('#290: 1 << 9 === 512. Actual: ' + (1 << 9)); \n} \n\n\nif (3 << 9 !== 1536) { \n $ERROR('#291: 3 << 9 === 1536. Actual: ' + (3 << 9)); \n} \n\n\nif (7 << 9 !== 3584) { \n $ERROR('#292: 7 << 9 === 3584. Actual: ' + (7 << 9)); \n} \n\n\nif (15 << 9 !== 7680) { \n $ERROR('#293: 15 << 9 === 7680. Actual: ' + (15 << 9)); \n} \n\n\nif (31 << 9 !== 15872) { \n $ERROR('#294: 31 << 9 === 15872. Actual: ' + (31 << 9)); \n} \n\n\nif (63 << 9 !== 32256) { \n $ERROR('#295: 63 << 9 === 32256. Actual: ' + (63 << 9)); \n} \n\n\nif (127 << 9 !== 65024) { \n $ERROR('#296: 127 << 9 === 65024. Actual: ' + (127 << 9)); \n} \n\n\nif (255 << 9 !== 130560) { \n $ERROR('#297: 255 << 9 === 130560. Actual: ' + (255 << 9)); \n} \n\n\nif (511 << 9 !== 261632) { \n $ERROR('#298: 511 << 9 === 261632. Actual: ' + (511 << 9)); \n} \n\n\nif (1023 << 9 !== 523776) { \n $ERROR('#299: 1023 << 9 === 523776. Actual: ' + (1023 << 9)); \n} \n\n\nif (2047 << 9 !== 1048064) { \n $ERROR('#300: 2047 << 9 === 1048064. Actual: ' + (2047 << 9)); \n} \n\n\nif (4095 << 9 !== 2096640) { \n $ERROR('#301: 4095 << 9 === 2096640. Actual: ' + (4095 << 9)); \n} \n\n\nif (8191 << 9 !== 4193792) { \n $ERROR('#302: 8191 << 9 === 4193792. Actual: ' + (8191 << 9)); \n} \n\n\nif (16383 << 9 !== 8388096) { \n $ERROR('#303: 16383 << 9 === 8388096. Actual: ' + (16383 << 9)); \n} \n\n\nif (32767 << 9 !== 16776704) { \n $ERROR('#304: 32767 << 9 === 16776704. Actual: ' + (32767 << 9)); \n} \n\n\nif (65535 << 9 !== 33553920) { \n $ERROR('#305: 65535 << 9 === 33553920. Actual: ' + (65535 << 9)); \n} \n\n\nif (131071 << 9 !== 67108352) { \n $ERROR('#306: 131071 << 9 === 67108352. Actual: ' + (131071 << 9)); \n} \n\n\nif (262143 << 9 !== 134217216) { \n $ERROR('#307: 262143 << 9 === 134217216. Actual: ' + (262143 << 9)); \n} \n\n\nif (524287 << 9 !== 268434944) { \n $ERROR('#308: 524287 << 9 === 268434944. Actual: ' + (524287 << 9)); \n} \n\n\nif (1048575 << 9 !== 536870400) { \n $ERROR('#309: 1048575 << 9 === 536870400. Actual: ' + (1048575 << 9)); \n} \n\n\nif (2097151 << 9 !== 1073741312) { \n $ERROR('#310: 2097151 << 9 === 1073741312. Actual: ' + (2097151 << 9)); \n} \n\n\nif (4194303 << 9 !== 2147483136) { \n $ERROR('#311: 4194303 << 9 === 2147483136. Actual: ' + (4194303 << 9)); \n} \n\n\nif (8388607 << 9 !== -512) { \n $ERROR('#312: 8388607 << 9 === -512. Actual: ' + (8388607 << 9)); \n} \n\n\nif (16777215 << 9 !== -512) { \n $ERROR('#313: 16777215 << 9 === -512. Actual: ' + (16777215 << 9)); \n} \n\n\nif (33554431 << 9 !== -512) { \n $ERROR('#314: 33554431 << 9 === -512. Actual: ' + (33554431 << 9)); \n} \n\n\nif (67108863 << 9 !== -512) { \n $ERROR('#315: 67108863 << 9 === -512. Actual: ' + (67108863 << 9)); \n} \n\n\nif (134217727 << 9 !== -512) { \n $ERROR('#316: 134217727 << 9 === -512. Actual: ' + (134217727 << 9)); \n} \n\n\nif (268435455 << 9 !== -512) { \n $ERROR('#317: 268435455 << 9 === -512. Actual: ' + (268435455 << 9)); \n} \n\n\nif (536870911 << 9 !== -512) { \n $ERROR('#318: 536870911 << 9 === -512. Actual: ' + (536870911 << 9)); \n} \n\n\nif (1073741823 << 9 !== -512) { \n $ERROR('#319: 1073741823 << 9 === -512. Actual: ' + (1073741823 << 9)); \n} \n\n\nif (2147483647 << 9 !== -512) { \n $ERROR('#320: 2147483647 << 9 === -512. Actual: ' + (2147483647 << 9)); \n} \n\n\nif (0 << 10 !== 0) { \n $ERROR('#321: 0 << 10 === 0. Actual: ' + (0 << 10)); \n} \n\n\nif (1 << 10 !== 1024) { \n $ERROR('#322: 1 << 10 === 1024. Actual: ' + (1 << 10)); \n} \n\n\nif (3 << 10 !== 3072) { \n $ERROR('#323: 3 << 10 === 3072. Actual: ' + (3 << 10)); \n} \n\n\nif (7 << 10 !== 7168) { \n $ERROR('#324: 7 << 10 === 7168. Actual: ' + (7 << 10)); \n} \n\n\nif (15 << 10 !== 15360) { \n $ERROR('#325: 15 << 10 === 15360. Actual: ' + (15 << 10)); \n} \n\n\nif (31 << 10 !== 31744) { \n $ERROR('#326: 31 << 10 === 31744. Actual: ' + (31 << 10)); \n} \n\n\nif (63 << 10 !== 64512) { \n $ERROR('#327: 63 << 10 === 64512. Actual: ' + (63 << 10)); \n} \n\n\nif (127 << 10 !== 130048) { \n $ERROR('#328: 127 << 10 === 130048. Actual: ' + (127 << 10)); \n} \n\n\nif (255 << 10 !== 261120) { \n $ERROR('#329: 255 << 10 === 261120. Actual: ' + (255 << 10)); \n} \n\n\nif (511 << 10 !== 523264) { \n $ERROR('#330: 511 << 10 === 523264. Actual: ' + (511 << 10)); \n} \n\n\nif (1023 << 10 !== 1047552) { \n $ERROR('#331: 1023 << 10 === 1047552. Actual: ' + (1023 << 10)); \n} \n\n\nif (2047 << 10 !== 2096128) { \n $ERROR('#332: 2047 << 10 === 2096128. Actual: ' + (2047 << 10)); \n} \n\n\nif (4095 << 10 !== 4193280) { \n $ERROR('#333: 4095 << 10 === 4193280. Actual: ' + (4095 << 10)); \n} \n\n\nif (8191 << 10 !== 8387584) { \n $ERROR('#334: 8191 << 10 === 8387584. Actual: ' + (8191 << 10)); \n} \n\n\nif (16383 << 10 !== 16776192) { \n $ERROR('#335: 16383 << 10 === 16776192. Actual: ' + (16383 << 10)); \n} \n\n\nif (32767 << 10 !== 33553408) { \n $ERROR('#336: 32767 << 10 === 33553408. Actual: ' + (32767 << 10)); \n} \n\n\nif (65535 << 10 !== 67107840) { \n $ERROR('#337: 65535 << 10 === 67107840. Actual: ' + (65535 << 10)); \n} \n\n\nif (131071 << 10 !== 134216704) { \n $ERROR('#338: 131071 << 10 === 134216704. Actual: ' + (131071 << 10)); \n} \n\n\nif (262143 << 10 !== 268434432) { \n $ERROR('#339: 262143 << 10 === 268434432. Actual: ' + (262143 << 10)); \n} \n\n\nif (524287 << 10 !== 536869888) { \n $ERROR('#340: 524287 << 10 === 536869888. Actual: ' + (524287 << 10)); \n} \n\n\nif (1048575 << 10 !== 1073740800) { \n $ERROR('#341: 1048575 << 10 === 1073740800. Actual: ' + (1048575 << 10)); \n} \n\n\nif (2097151 << 10 !== 2147482624) { \n $ERROR('#342: 2097151 << 10 === 2147482624. Actual: ' + (2097151 << 10)); \n} \n\n\nif (4194303 << 10 !== -1024) { \n $ERROR('#343: 4194303 << 10 === -1024. Actual: ' + (4194303 << 10)); \n} \n\n\nif (8388607 << 10 !== -1024) { \n $ERROR('#344: 8388607 << 10 === -1024. Actual: ' + (8388607 << 10)); \n} \n\n\nif (16777215 << 10 !== -1024) { \n $ERROR('#345: 16777215 << 10 === -1024. Actual: ' + (16777215 << 10)); \n} \n\n\nif (33554431 << 10 !== -1024) { \n $ERROR('#346: 33554431 << 10 === -1024. Actual: ' + (33554431 << 10)); \n} \n\n\nif (67108863 << 10 !== -1024) { \n $ERROR('#347: 67108863 << 10 === -1024. Actual: ' + (67108863 << 10)); \n} \n\n\nif (134217727 << 10 !== -1024) { \n $ERROR('#348: 134217727 << 10 === -1024. Actual: ' + (134217727 << 10)); \n} \n\n\nif (268435455 << 10 !== -1024) { \n $ERROR('#349: 268435455 << 10 === -1024. Actual: ' + (268435455 << 10)); \n} \n\n\nif (536870911 << 10 !== -1024) { \n $ERROR('#350: 536870911 << 10 === -1024. Actual: ' + (536870911 << 10)); \n} \n\n\nif (1073741823 << 10 !== -1024) { \n $ERROR('#351: 1073741823 << 10 === -1024. Actual: ' + (1073741823 << 10)); \n} \n\n\nif (2147483647 << 10 !== -1024) { \n $ERROR('#352: 2147483647 << 10 === -1024. Actual: ' + (2147483647 << 10)); \n} \n\n\nif (0 << 11 !== 0) { \n $ERROR('#353: 0 << 11 === 0. Actual: ' + (0 << 11)); \n} \n\n\nif (1 << 11 !== 2048) { \n $ERROR('#354: 1 << 11 === 2048. Actual: ' + (1 << 11)); \n} \n\n\nif (3 << 11 !== 6144) { \n $ERROR('#355: 3 << 11 === 6144. Actual: ' + (3 << 11)); \n} \n\n\nif (7 << 11 !== 14336) { \n $ERROR('#356: 7 << 11 === 14336. Actual: ' + (7 << 11)); \n} \n\n\nif (15 << 11 !== 30720) { \n $ERROR('#357: 15 << 11 === 30720. Actual: ' + (15 << 11)); \n} \n\n\nif (31 << 11 !== 63488) { \n $ERROR('#358: 31 << 11 === 63488. Actual: ' + (31 << 11)); \n} \n\n\nif (63 << 11 !== 129024) { \n $ERROR('#359: 63 << 11 === 129024. Actual: ' + (63 << 11)); \n} \n\n\nif (127 << 11 !== 260096) { \n $ERROR('#360: 127 << 11 === 260096. Actual: ' + (127 << 11)); \n} \n\n\nif (255 << 11 !== 522240) { \n $ERROR('#361: 255 << 11 === 522240. Actual: ' + (255 << 11)); \n} \n\n\nif (511 << 11 !== 1046528) { \n $ERROR('#362: 511 << 11 === 1046528. Actual: ' + (511 << 11)); \n} \n\n\nif (1023 << 11 !== 2095104) { \n $ERROR('#363: 1023 << 11 === 2095104. Actual: ' + (1023 << 11)); \n} \n\n\nif (2047 << 11 !== 4192256) { \n $ERROR('#364: 2047 << 11 === 4192256. Actual: ' + (2047 << 11)); \n} \n\n\nif (4095 << 11 !== 8386560) { \n $ERROR('#365: 4095 << 11 === 8386560. Actual: ' + (4095 << 11)); \n} \n\n\nif (8191 << 11 !== 16775168) { \n $ERROR('#366: 8191 << 11 === 16775168. Actual: ' + (8191 << 11)); \n} \n\n\nif (16383 << 11 !== 33552384) { \n $ERROR('#367: 16383 << 11 === 33552384. Actual: ' + (16383 << 11)); \n} \n\n\nif (32767 << 11 !== 67106816) { \n $ERROR('#368: 32767 << 11 === 67106816. Actual: ' + (32767 << 11)); \n} \n\n\nif (65535 << 11 !== 134215680) { \n $ERROR('#369: 65535 << 11 === 134215680. Actual: ' + (65535 << 11)); \n} \n\n\nif (131071 << 11 !== 268433408) { \n $ERROR('#370: 131071 << 11 === 268433408. Actual: ' + (131071 << 11)); \n} \n\n\nif (262143 << 11 !== 536868864) { \n $ERROR('#371: 262143 << 11 === 536868864. Actual: ' + (262143 << 11)); \n} \n\n\nif (524287 << 11 !== 1073739776) { \n $ERROR('#372: 524287 << 11 === 1073739776. Actual: ' + (524287 << 11)); \n} \n\n\nif (1048575 << 11 !== 2147481600) { \n $ERROR('#373: 1048575 << 11 === 2147481600. Actual: ' + (1048575 << 11)); \n} \n\n\nif (2097151 << 11 !== -2048) { \n $ERROR('#374: 2097151 << 11 === -2048. Actual: ' + (2097151 << 11)); \n} \n\n\nif (4194303 << 11 !== -2048) { \n $ERROR('#375: 4194303 << 11 === -2048. Actual: ' + (4194303 << 11)); \n} \n\n\nif (8388607 << 11 !== -2048) { \n $ERROR('#376: 8388607 << 11 === -2048. Actual: ' + (8388607 << 11)); \n} \n\n\nif (16777215 << 11 !== -2048) { \n $ERROR('#377: 16777215 << 11 === -2048. Actual: ' + (16777215 << 11)); \n} \n\n\nif (33554431 << 11 !== -2048) { \n $ERROR('#378: 33554431 << 11 === -2048. Actual: ' + (33554431 << 11)); \n} \n\n\nif (67108863 << 11 !== -2048) { \n $ERROR('#379: 67108863 << 11 === -2048. Actual: ' + (67108863 << 11)); \n} \n\n\nif (134217727 << 11 !== -2048) { \n $ERROR('#380: 134217727 << 11 === -2048. Actual: ' + (134217727 << 11)); \n} \n\n\nif (268435455 << 11 !== -2048) { \n $ERROR('#381: 268435455 << 11 === -2048. Actual: ' + (268435455 << 11)); \n} \n\n\nif (536870911 << 11 !== -2048) { \n $ERROR('#382: 536870911 << 11 === -2048. Actual: ' + (536870911 << 11)); \n} \n\n\nif (1073741823 << 11 !== -2048) { \n $ERROR('#383: 1073741823 << 11 === -2048. Actual: ' + (1073741823 << 11)); \n} \n\n\nif (2147483647 << 11 !== -2048) { \n $ERROR('#384: 2147483647 << 11 === -2048. Actual: ' + (2147483647 << 11)); \n} \n\n\nif (0 << 12 !== 0) { \n $ERROR('#385: 0 << 12 === 0. Actual: ' + (0 << 12)); \n} \n\n\nif (1 << 12 !== 4096) { \n $ERROR('#386: 1 << 12 === 4096. Actual: ' + (1 << 12)); \n} \n\n\nif (3 << 12 !== 12288) { \n $ERROR('#387: 3 << 12 === 12288. Actual: ' + (3 << 12)); \n} \n\n\nif (7 << 12 !== 28672) { \n $ERROR('#388: 7 << 12 === 28672. Actual: ' + (7 << 12)); \n} \n\n\nif (15 << 12 !== 61440) { \n $ERROR('#389: 15 << 12 === 61440. Actual: ' + (15 << 12)); \n} \n\n\nif (31 << 12 !== 126976) { \n $ERROR('#390: 31 << 12 === 126976. Actual: ' + (31 << 12)); \n} \n\n\nif (63 << 12 !== 258048) { \n $ERROR('#391: 63 << 12 === 258048. Actual: ' + (63 << 12)); \n} \n\n\nif (127 << 12 !== 520192) { \n $ERROR('#392: 127 << 12 === 520192. Actual: ' + (127 << 12)); \n} \n\n\nif (255 << 12 !== 1044480) { \n $ERROR('#393: 255 << 12 === 1044480. Actual: ' + (255 << 12)); \n} \n\n\nif (511 << 12 !== 2093056) { \n $ERROR('#394: 511 << 12 === 2093056. Actual: ' + (511 << 12)); \n} \n\n\nif (1023 << 12 !== 4190208) { \n $ERROR('#395: 1023 << 12 === 4190208. Actual: ' + (1023 << 12)); \n} \n\n\nif (2047 << 12 !== 8384512) { \n $ERROR('#396: 2047 << 12 === 8384512. Actual: ' + (2047 << 12)); \n} \n\n\nif (4095 << 12 !== 16773120) { \n $ERROR('#397: 4095 << 12 === 16773120. Actual: ' + (4095 << 12)); \n} \n\n\nif (8191 << 12 !== 33550336) { \n $ERROR('#398: 8191 << 12 === 33550336. Actual: ' + (8191 << 12)); \n} \n\n\nif (16383 << 12 !== 67104768) { \n $ERROR('#399: 16383 << 12 === 67104768. Actual: ' + (16383 << 12)); \n} \n\n\nif (32767 << 12 !== 134213632) { \n $ERROR('#400: 32767 << 12 === 134213632. Actual: ' + (32767 << 12)); \n} \n\n\nif (65535 << 12 !== 268431360) { \n $ERROR('#401: 65535 << 12 === 268431360. Actual: ' + (65535 << 12)); \n} \n\n\nif (131071 << 12 !== 536866816) { \n $ERROR('#402: 131071 << 12 === 536866816. Actual: ' + (131071 << 12)); \n} \n\n\nif (262143 << 12 !== 1073737728) { \n $ERROR('#403: 262143 << 12 === 1073737728. Actual: ' + (262143 << 12)); \n} \n\n\nif (524287 << 12 !== 2147479552) { \n $ERROR('#404: 524287 << 12 === 2147479552. Actual: ' + (524287 << 12)); \n} \n\n\nif (1048575 << 12 !== -4096) { \n $ERROR('#405: 1048575 << 12 === -4096. Actual: ' + (1048575 << 12)); \n} \n\n\nif (2097151 << 12 !== -4096) { \n $ERROR('#406: 2097151 << 12 === -4096. Actual: ' + (2097151 << 12)); \n} \n\n\nif (4194303 << 12 !== -4096) { \n $ERROR('#407: 4194303 << 12 === -4096. Actual: ' + (4194303 << 12)); \n} \n\n\nif (8388607 << 12 !== -4096) { \n $ERROR('#408: 8388607 << 12 === -4096. Actual: ' + (8388607 << 12)); \n} \n\n\nif (16777215 << 12 !== -4096) { \n $ERROR('#409: 16777215 << 12 === -4096. Actual: ' + (16777215 << 12)); \n} \n\n\nif (33554431 << 12 !== -4096) { \n $ERROR('#410: 33554431 << 12 === -4096. Actual: ' + (33554431 << 12)); \n} \n\n\nif (67108863 << 12 !== -4096) { \n $ERROR('#411: 67108863 << 12 === -4096. Actual: ' + (67108863 << 12)); \n} \n\n\nif (134217727 << 12 !== -4096) { \n $ERROR('#412: 134217727 << 12 === -4096. Actual: ' + (134217727 << 12)); \n} \n\n\nif (268435455 << 12 !== -4096) { \n $ERROR('#413: 268435455 << 12 === -4096. Actual: ' + (268435455 << 12)); \n} \n\n\nif (536870911 << 12 !== -4096) { \n $ERROR('#414: 536870911 << 12 === -4096. Actual: ' + (536870911 << 12)); \n} \n\n\nif (1073741823 << 12 !== -4096) { \n $ERROR('#415: 1073741823 << 12 === -4096. Actual: ' + (1073741823 << 12)); \n} \n\n\nif (2147483647 << 12 !== -4096) { \n $ERROR('#416: 2147483647 << 12 === -4096. Actual: ' + (2147483647 << 12)); \n} \n\n\nif (0 << 13 !== 0) { \n $ERROR('#417: 0 << 13 === 0. Actual: ' + (0 << 13)); \n} \n\n\nif (1 << 13 !== 8192) { \n $ERROR('#418: 1 << 13 === 8192. Actual: ' + (1 << 13)); \n} \n\n\nif (3 << 13 !== 24576) { \n $ERROR('#419: 3 << 13 === 24576. Actual: ' + (3 << 13)); \n} \n\n\nif (7 << 13 !== 57344) { \n $ERROR('#420: 7 << 13 === 57344. Actual: ' + (7 << 13)); \n} \n\n\nif (15 << 13 !== 122880) { \n $ERROR('#421: 15 << 13 === 122880. Actual: ' + (15 << 13)); \n} \n\n\nif (31 << 13 !== 253952) { \n $ERROR('#422: 31 << 13 === 253952. Actual: ' + (31 << 13)); \n} \n\n\nif (63 << 13 !== 516096) { \n $ERROR('#423: 63 << 13 === 516096. Actual: ' + (63 << 13)); \n} \n\n\nif (127 << 13 !== 1040384) { \n $ERROR('#424: 127 << 13 === 1040384. Actual: ' + (127 << 13)); \n} \n\n\nif (255 << 13 !== 2088960) { \n $ERROR('#425: 255 << 13 === 2088960. Actual: ' + (255 << 13)); \n} \n\n\nif (511 << 13 !== 4186112) { \n $ERROR('#426: 511 << 13 === 4186112. Actual: ' + (511 << 13)); \n} \n\n\nif (1023 << 13 !== 8380416) { \n $ERROR('#427: 1023 << 13 === 8380416. Actual: ' + (1023 << 13)); \n} \n\n\nif (2047 << 13 !== 16769024) { \n $ERROR('#428: 2047 << 13 === 16769024. Actual: ' + (2047 << 13)); \n} \n\n\nif (4095 << 13 !== 33546240) { \n $ERROR('#429: 4095 << 13 === 33546240. Actual: ' + (4095 << 13)); \n} \n\n\nif (8191 << 13 !== 67100672) { \n $ERROR('#430: 8191 << 13 === 67100672. Actual: ' + (8191 << 13)); \n} \n\n\nif (16383 << 13 !== 134209536) { \n $ERROR('#431: 16383 << 13 === 134209536. Actual: ' + (16383 << 13)); \n} \n\n\nif (32767 << 13 !== 268427264) { \n $ERROR('#432: 32767 << 13 === 268427264. Actual: ' + (32767 << 13)); \n} \n\n\nif (65535 << 13 !== 536862720) { \n $ERROR('#433: 65535 << 13 === 536862720. Actual: ' + (65535 << 13)); \n} \n\n\nif (131071 << 13 !== 1073733632) { \n $ERROR('#434: 131071 << 13 === 1073733632. Actual: ' + (131071 << 13)); \n} \n\n\nif (262143 << 13 !== 2147475456) { \n $ERROR('#435: 262143 << 13 === 2147475456. Actual: ' + (262143 << 13)); \n} \n\n\nif (524287 << 13 !== -8192) { \n $ERROR('#436: 524287 << 13 === -8192. Actual: ' + (524287 << 13)); \n} \n\n\nif (1048575 << 13 !== -8192) { \n $ERROR('#437: 1048575 << 13 === -8192. Actual: ' + (1048575 << 13)); \n} \n\n\nif (2097151 << 13 !== -8192) { \n $ERROR('#438: 2097151 << 13 === -8192. Actual: ' + (2097151 << 13)); \n} \n\n\nif (4194303 << 13 !== -8192) { \n $ERROR('#439: 4194303 << 13 === -8192. Actual: ' + (4194303 << 13)); \n} \n\n\nif (8388607 << 13 !== -8192) { \n $ERROR('#440: 8388607 << 13 === -8192. Actual: ' + (8388607 << 13)); \n} \n\n\nif (16777215 << 13 !== -8192) { \n $ERROR('#441: 16777215 << 13 === -8192. Actual: ' + (16777215 << 13)); \n} \n\n\nif (33554431 << 13 !== -8192) { \n $ERROR('#442: 33554431 << 13 === -8192. Actual: ' + (33554431 << 13)); \n} \n\n\nif (67108863 << 13 !== -8192) { \n $ERROR('#443: 67108863 << 13 === -8192. Actual: ' + (67108863 << 13)); \n} \n\n\nif (134217727 << 13 !== -8192) { \n $ERROR('#444: 134217727 << 13 === -8192. Actual: ' + (134217727 << 13)); \n} \n\n\nif (268435455 << 13 !== -8192) { \n $ERROR('#445: 268435455 << 13 === -8192. Actual: ' + (268435455 << 13)); \n} \n\n\nif (536870911 << 13 !== -8192) { \n $ERROR('#446: 536870911 << 13 === -8192. Actual: ' + (536870911 << 13)); \n} \n\n\nif (1073741823 << 13 !== -8192) { \n $ERROR('#447: 1073741823 << 13 === -8192. Actual: ' + (1073741823 << 13)); \n} \n\n\nif (2147483647 << 13 !== -8192) { \n $ERROR('#448: 2147483647 << 13 === -8192. Actual: ' + (2147483647 << 13)); \n} \n\n\nif (0 << 14 !== 0) { \n $ERROR('#449: 0 << 14 === 0. Actual: ' + (0 << 14)); \n} \n\n\nif (1 << 14 !== 16384) { \n $ERROR('#450: 1 << 14 === 16384. Actual: ' + (1 << 14)); \n} \n\n\nif (3 << 14 !== 49152) { \n $ERROR('#451: 3 << 14 === 49152. Actual: ' + (3 << 14)); \n} \n\n\nif (7 << 14 !== 114688) { \n $ERROR('#452: 7 << 14 === 114688. Actual: ' + (7 << 14)); \n} \n\n\nif (15 << 14 !== 245760) { \n $ERROR('#453: 15 << 14 === 245760. Actual: ' + (15 << 14)); \n} \n\n\nif (31 << 14 !== 507904) { \n $ERROR('#454: 31 << 14 === 507904. Actual: ' + (31 << 14)); \n} \n\n\nif (63 << 14 !== 1032192) { \n $ERROR('#455: 63 << 14 === 1032192. Actual: ' + (63 << 14)); \n} \n\n\nif (127 << 14 !== 2080768) { \n $ERROR('#456: 127 << 14 === 2080768. Actual: ' + (127 << 14)); \n} \n\n\nif (255 << 14 !== 4177920) { \n $ERROR('#457: 255 << 14 === 4177920. Actual: ' + (255 << 14)); \n} \n\n\nif (511 << 14 !== 8372224) { \n $ERROR('#458: 511 << 14 === 8372224. Actual: ' + (511 << 14)); \n} \n\n\nif (1023 << 14 !== 16760832) { \n $ERROR('#459: 1023 << 14 === 16760832. Actual: ' + (1023 << 14)); \n} \n\n\nif (2047 << 14 !== 33538048) { \n $ERROR('#460: 2047 << 14 === 33538048. Actual: ' + (2047 << 14)); \n} \n\n\nif (4095 << 14 !== 67092480) { \n $ERROR('#461: 4095 << 14 === 67092480. Actual: ' + (4095 << 14)); \n} \n\n\nif (8191 << 14 !== 134201344) { \n $ERROR('#462: 8191 << 14 === 134201344. Actual: ' + (8191 << 14)); \n} \n\n\nif (16383 << 14 !== 268419072) { \n $ERROR('#463: 16383 << 14 === 268419072. Actual: ' + (16383 << 14)); \n} \n\n\nif (32767 << 14 !== 536854528) { \n $ERROR('#464: 32767 << 14 === 536854528. Actual: ' + (32767 << 14)); \n} \n\n\nif (65535 << 14 !== 1073725440) { \n $ERROR('#465: 65535 << 14 === 1073725440. Actual: ' + (65535 << 14)); \n} \n\n\nif (131071 << 14 !== 2147467264) { \n $ERROR('#466: 131071 << 14 === 2147467264. Actual: ' + (131071 << 14)); \n} \n\n\nif (262143 << 14 !== -16384) { \n $ERROR('#467: 262143 << 14 === -16384. Actual: ' + (262143 << 14)); \n} \n\n\nif (524287 << 14 !== -16384) { \n $ERROR('#468: 524287 << 14 === -16384. Actual: ' + (524287 << 14)); \n} \n\n\nif (1048575 << 14 !== -16384) { \n $ERROR('#469: 1048575 << 14 === -16384. Actual: ' + (1048575 << 14)); \n} \n\n\nif (2097151 << 14 !== -16384) { \n $ERROR('#470: 2097151 << 14 === -16384. Actual: ' + (2097151 << 14)); \n} \n\n\nif (4194303 << 14 !== -16384) { \n $ERROR('#471: 4194303 << 14 === -16384. Actual: ' + (4194303 << 14)); \n} \n\n\nif (8388607 << 14 !== -16384) { \n $ERROR('#472: 8388607 << 14 === -16384. Actual: ' + (8388607 << 14)); \n} \n\n\nif (16777215 << 14 !== -16384) { \n $ERROR('#473: 16777215 << 14 === -16384. Actual: ' + (16777215 << 14)); \n} \n\n\nif (33554431 << 14 !== -16384) { \n $ERROR('#474: 33554431 << 14 === -16384. Actual: ' + (33554431 << 14)); \n} \n\n\nif (67108863 << 14 !== -16384) { \n $ERROR('#475: 67108863 << 14 === -16384. Actual: ' + (67108863 << 14)); \n} \n\n\nif (134217727 << 14 !== -16384) { \n $ERROR('#476: 134217727 << 14 === -16384. Actual: ' + (134217727 << 14)); \n} \n\n\nif (268435455 << 14 !== -16384) { \n $ERROR('#477: 268435455 << 14 === -16384. Actual: ' + (268435455 << 14)); \n} \n\n\nif (536870911 << 14 !== -16384) { \n $ERROR('#478: 536870911 << 14 === -16384. Actual: ' + (536870911 << 14)); \n} \n\n\nif (1073741823 << 14 !== -16384) { \n $ERROR('#479: 1073741823 << 14 === -16384. Actual: ' + (1073741823 << 14)); \n} \n\n\nif (2147483647 << 14 !== -16384) { \n $ERROR('#480: 2147483647 << 14 === -16384. Actual: ' + (2147483647 << 14)); \n} \n\n\nif (0 << 15 !== 0) { \n $ERROR('#481: 0 << 15 === 0. Actual: ' + (0 << 15)); \n} \n\n\nif (1 << 15 !== 32768) { \n $ERROR('#482: 1 << 15 === 32768. Actual: ' + (1 << 15)); \n} \n\n\nif (3 << 15 !== 98304) { \n $ERROR('#483: 3 << 15 === 98304. Actual: ' + (3 << 15)); \n} \n\n\nif (7 << 15 !== 229376) { \n $ERROR('#484: 7 << 15 === 229376. Actual: ' + (7 << 15)); \n} \n\n\nif (15 << 15 !== 491520) { \n $ERROR('#485: 15 << 15 === 491520. Actual: ' + (15 << 15)); \n} \n\n\nif (31 << 15 !== 1015808) { \n $ERROR('#486: 31 << 15 === 1015808. Actual: ' + (31 << 15)); \n} \n\n\nif (63 << 15 !== 2064384) { \n $ERROR('#487: 63 << 15 === 2064384. Actual: ' + (63 << 15)); \n} \n\n\nif (127 << 15 !== 4161536) { \n $ERROR('#488: 127 << 15 === 4161536. Actual: ' + (127 << 15)); \n} \n\n\nif (255 << 15 !== 8355840) { \n $ERROR('#489: 255 << 15 === 8355840. Actual: ' + (255 << 15)); \n} \n\n\nif (511 << 15 !== 16744448) { \n $ERROR('#490: 511 << 15 === 16744448. Actual: ' + (511 << 15)); \n} \n\n\nif (1023 << 15 !== 33521664) { \n $ERROR('#491: 1023 << 15 === 33521664. Actual: ' + (1023 << 15)); \n} \n\n\nif (2047 << 15 !== 67076096) { \n $ERROR('#492: 2047 << 15 === 67076096. Actual: ' + (2047 << 15)); \n} \n\n\nif (4095 << 15 !== 134184960) { \n $ERROR('#493: 4095 << 15 === 134184960. Actual: ' + (4095 << 15)); \n} \n\n\nif (8191 << 15 !== 268402688) { \n $ERROR('#494: 8191 << 15 === 268402688. Actual: ' + (8191 << 15)); \n} \n\n\nif (16383 << 15 !== 536838144) { \n $ERROR('#495: 16383 << 15 === 536838144. Actual: ' + (16383 << 15)); \n} \n\n\nif (32767 << 15 !== 1073709056) { \n $ERROR('#496: 32767 << 15 === 1073709056. Actual: ' + (32767 << 15)); \n} \n\n\nif (65535 << 15 !== 2147450880) { \n $ERROR('#497: 65535 << 15 === 2147450880. Actual: ' + (65535 << 15)); \n} \n\n\nif (131071 << 15 !== -32768) { \n $ERROR('#498: 131071 << 15 === -32768. Actual: ' + (131071 << 15)); \n} \n\n\nif (262143 << 15 !== -32768) { \n $ERROR('#499: 262143 << 15 === -32768. Actual: ' + (262143 << 15)); \n} \n\n\nif (524287 << 15 !== -32768) { \n $ERROR('#500: 524287 << 15 === -32768. Actual: ' + (524287 << 15)); \n} \n\n\nif (1048575 << 15 !== -32768) { \n $ERROR('#501: 1048575 << 15 === -32768. Actual: ' + (1048575 << 15)); \n} \n\n\nif (2097151 << 15 !== -32768) { \n $ERROR('#502: 2097151 << 15 === -32768. Actual: ' + (2097151 << 15)); \n} \n\n\nif (4194303 << 15 !== -32768) { \n $ERROR('#503: 4194303 << 15 === -32768. Actual: ' + (4194303 << 15)); \n} \n\n\nif (8388607 << 15 !== -32768) { \n $ERROR('#504: 8388607 << 15 === -32768. Actual: ' + (8388607 << 15)); \n} \n\n\nif (16777215 << 15 !== -32768) { \n $ERROR('#505: 16777215 << 15 === -32768. Actual: ' + (16777215 << 15)); \n} \n\n\nif (33554431 << 15 !== -32768) { \n $ERROR('#506: 33554431 << 15 === -32768. Actual: ' + (33554431 << 15)); \n} \n\n\nif (67108863 << 15 !== -32768) { \n $ERROR('#507: 67108863 << 15 === -32768. Actual: ' + (67108863 << 15)); \n} \n\n\nif (134217727 << 15 !== -32768) { \n $ERROR('#508: 134217727 << 15 === -32768. Actual: ' + (134217727 << 15)); \n} \n\n\nif (268435455 << 15 !== -32768) { \n $ERROR('#509: 268435455 << 15 === -32768. Actual: ' + (268435455 << 15)); \n} \n\n\nif (536870911 << 15 !== -32768) { \n $ERROR('#510: 536870911 << 15 === -32768. Actual: ' + (536870911 << 15)); \n} \n\n\nif (1073741823 << 15 !== -32768) { \n $ERROR('#511: 1073741823 << 15 === -32768. Actual: ' + (1073741823 << 15)); \n} \n\n\nif (2147483647 << 15 !== -32768) { \n $ERROR('#512: 2147483647 << 15 === -32768. Actual: ' + (2147483647 << 15)); \n} \n",
+ "id": "S11.7.1_A4_T3"
+ },
+ {
+ "section": "11.7.1",
+ "description": "ShiftExpression = 2^n - 1, n = 16...31",
+ "test": "//CHECK\n\nif (0 << 16 !== 0) { \n $ERROR('#513: 0 << 16 === 0. Actual: ' + (0 << 16)); \n} \n\n\nif (1 << 16 !== 65536) { \n $ERROR('#514: 1 << 16 === 65536. Actual: ' + (1 << 16)); \n} \n\n\nif (3 << 16 !== 196608) { \n $ERROR('#515: 3 << 16 === 196608. Actual: ' + (3 << 16)); \n} \n\n\nif (7 << 16 !== 458752) { \n $ERROR('#516: 7 << 16 === 458752. Actual: ' + (7 << 16)); \n} \n\n\nif (15 << 16 !== 983040) { \n $ERROR('#517: 15 << 16 === 983040. Actual: ' + (15 << 16)); \n} \n\n\nif (31 << 16 !== 2031616) { \n $ERROR('#518: 31 << 16 === 2031616. Actual: ' + (31 << 16)); \n} \n\n\nif (63 << 16 !== 4128768) { \n $ERROR('#519: 63 << 16 === 4128768. Actual: ' + (63 << 16)); \n} \n\n\nif (127 << 16 !== 8323072) { \n $ERROR('#520: 127 << 16 === 8323072. Actual: ' + (127 << 16)); \n} \n\n\nif (255 << 16 !== 16711680) { \n $ERROR('#521: 255 << 16 === 16711680. Actual: ' + (255 << 16)); \n} \n\n\nif (511 << 16 !== 33488896) { \n $ERROR('#522: 511 << 16 === 33488896. Actual: ' + (511 << 16)); \n} \n\n\nif (1023 << 16 !== 67043328) { \n $ERROR('#523: 1023 << 16 === 67043328. Actual: ' + (1023 << 16)); \n} \n\n\nif (2047 << 16 !== 134152192) { \n $ERROR('#524: 2047 << 16 === 134152192. Actual: ' + (2047 << 16)); \n} \n\n\nif (4095 << 16 !== 268369920) { \n $ERROR('#525: 4095 << 16 === 268369920. Actual: ' + (4095 << 16)); \n} \n\n\nif (8191 << 16 !== 536805376) { \n $ERROR('#526: 8191 << 16 === 536805376. Actual: ' + (8191 << 16)); \n} \n\n\nif (16383 << 16 !== 1073676288) { \n $ERROR('#527: 16383 << 16 === 1073676288. Actual: ' + (16383 << 16)); \n} \n\n\nif (32767 << 16 !== 2147418112) { \n $ERROR('#528: 32767 << 16 === 2147418112. Actual: ' + (32767 << 16)); \n} \n\n\nif (65535 << 16 !== -65536) { \n $ERROR('#529: 65535 << 16 === -65536. Actual: ' + (65535 << 16)); \n} \n\n\nif (131071 << 16 !== -65536) { \n $ERROR('#530: 131071 << 16 === -65536. Actual: ' + (131071 << 16)); \n} \n\n\nif (262143 << 16 !== -65536) { \n $ERROR('#531: 262143 << 16 === -65536. Actual: ' + (262143 << 16)); \n} \n\n\nif (524287 << 16 !== -65536) { \n $ERROR('#532: 524287 << 16 === -65536. Actual: ' + (524287 << 16)); \n} \n\n\nif (1048575 << 16 !== -65536) { \n $ERROR('#533: 1048575 << 16 === -65536. Actual: ' + (1048575 << 16)); \n} \n\n\nif (2097151 << 16 !== -65536) { \n $ERROR('#534: 2097151 << 16 === -65536. Actual: ' + (2097151 << 16)); \n} \n\n\nif (4194303 << 16 !== -65536) { \n $ERROR('#535: 4194303 << 16 === -65536. Actual: ' + (4194303 << 16)); \n} \n\n\nif (8388607 << 16 !== -65536) { \n $ERROR('#536: 8388607 << 16 === -65536. Actual: ' + (8388607 << 16)); \n} \n\n\nif (16777215 << 16 !== -65536) { \n $ERROR('#537: 16777215 << 16 === -65536. Actual: ' + (16777215 << 16)); \n} \n\n\nif (33554431 << 16 !== -65536) { \n $ERROR('#538: 33554431 << 16 === -65536. Actual: ' + (33554431 << 16)); \n} \n\n\nif (67108863 << 16 !== -65536) { \n $ERROR('#539: 67108863 << 16 === -65536. Actual: ' + (67108863 << 16)); \n} \n\n\nif (134217727 << 16 !== -65536) { \n $ERROR('#540: 134217727 << 16 === -65536. Actual: ' + (134217727 << 16)); \n} \n\n\nif (268435455 << 16 !== -65536) { \n $ERROR('#541: 268435455 << 16 === -65536. Actual: ' + (268435455 << 16)); \n} \n\n\nif (536870911 << 16 !== -65536) { \n $ERROR('#542: 536870911 << 16 === -65536. Actual: ' + (536870911 << 16)); \n} \n\n\nif (1073741823 << 16 !== -65536) { \n $ERROR('#543: 1073741823 << 16 === -65536. Actual: ' + (1073741823 << 16)); \n} \n\n\nif (2147483647 << 16 !== -65536) { \n $ERROR('#544: 2147483647 << 16 === -65536. Actual: ' + (2147483647 << 16)); \n} \n\n\nif (0 << 17 !== 0) { \n $ERROR('#545: 0 << 17 === 0. Actual: ' + (0 << 17)); \n} \n\n\nif (1 << 17 !== 131072) { \n $ERROR('#546: 1 << 17 === 131072. Actual: ' + (1 << 17)); \n} \n\n\nif (3 << 17 !== 393216) { \n $ERROR('#547: 3 << 17 === 393216. Actual: ' + (3 << 17)); \n} \n\n\nif (7 << 17 !== 917504) { \n $ERROR('#548: 7 << 17 === 917504. Actual: ' + (7 << 17)); \n} \n\n\nif (15 << 17 !== 1966080) { \n $ERROR('#549: 15 << 17 === 1966080. Actual: ' + (15 << 17)); \n} \n\n\nif (31 << 17 !== 4063232) { \n $ERROR('#550: 31 << 17 === 4063232. Actual: ' + (31 << 17)); \n} \n\n\nif (63 << 17 !== 8257536) { \n $ERROR('#551: 63 << 17 === 8257536. Actual: ' + (63 << 17)); \n} \n\n\nif (127 << 17 !== 16646144) { \n $ERROR('#552: 127 << 17 === 16646144. Actual: ' + (127 << 17)); \n} \n\n\nif (255 << 17 !== 33423360) { \n $ERROR('#553: 255 << 17 === 33423360. Actual: ' + (255 << 17)); \n} \n\n\nif (511 << 17 !== 66977792) { \n $ERROR('#554: 511 << 17 === 66977792. Actual: ' + (511 << 17)); \n} \n\n\nif (1023 << 17 !== 134086656) { \n $ERROR('#555: 1023 << 17 === 134086656. Actual: ' + (1023 << 17)); \n} \n\n\nif (2047 << 17 !== 268304384) { \n $ERROR('#556: 2047 << 17 === 268304384. Actual: ' + (2047 << 17)); \n} \n\n\nif (4095 << 17 !== 536739840) { \n $ERROR('#557: 4095 << 17 === 536739840. Actual: ' + (4095 << 17)); \n} \n\n\nif (8191 << 17 !== 1073610752) { \n $ERROR('#558: 8191 << 17 === 1073610752. Actual: ' + (8191 << 17)); \n} \n\n\nif (16383 << 17 !== 2147352576) { \n $ERROR('#559: 16383 << 17 === 2147352576. Actual: ' + (16383 << 17)); \n} \n\n\nif (32767 << 17 !== -131072) { \n $ERROR('#560: 32767 << 17 === -131072. Actual: ' + (32767 << 17)); \n} \n\n\nif (65535 << 17 !== -131072) { \n $ERROR('#561: 65535 << 17 === -131072. Actual: ' + (65535 << 17)); \n} \n\n\nif (131071 << 17 !== -131072) { \n $ERROR('#562: 131071 << 17 === -131072. Actual: ' + (131071 << 17)); \n} \n\n\nif (262143 << 17 !== -131072) { \n $ERROR('#563: 262143 << 17 === -131072. Actual: ' + (262143 << 17)); \n} \n\n\nif (524287 << 17 !== -131072) { \n $ERROR('#564: 524287 << 17 === -131072. Actual: ' + (524287 << 17)); \n} \n\n\nif (1048575 << 17 !== -131072) { \n $ERROR('#565: 1048575 << 17 === -131072. Actual: ' + (1048575 << 17)); \n} \n\n\nif (2097151 << 17 !== -131072) { \n $ERROR('#566: 2097151 << 17 === -131072. Actual: ' + (2097151 << 17)); \n} \n\n\nif (4194303 << 17 !== -131072) { \n $ERROR('#567: 4194303 << 17 === -131072. Actual: ' + (4194303 << 17)); \n} \n\n\nif (8388607 << 17 !== -131072) { \n $ERROR('#568: 8388607 << 17 === -131072. Actual: ' + (8388607 << 17)); \n} \n\n\nif (16777215 << 17 !== -131072) { \n $ERROR('#569: 16777215 << 17 === -131072. Actual: ' + (16777215 << 17)); \n} \n\n\nif (33554431 << 17 !== -131072) { \n $ERROR('#570: 33554431 << 17 === -131072. Actual: ' + (33554431 << 17)); \n} \n\n\nif (67108863 << 17 !== -131072) { \n $ERROR('#571: 67108863 << 17 === -131072. Actual: ' + (67108863 << 17)); \n} \n\n\nif (134217727 << 17 !== -131072) { \n $ERROR('#572: 134217727 << 17 === -131072. Actual: ' + (134217727 << 17)); \n} \n\n\nif (268435455 << 17 !== -131072) { \n $ERROR('#573: 268435455 << 17 === -131072. Actual: ' + (268435455 << 17)); \n} \n\n\nif (536870911 << 17 !== -131072) { \n $ERROR('#574: 536870911 << 17 === -131072. Actual: ' + (536870911 << 17)); \n} \n\n\nif (1073741823 << 17 !== -131072) { \n $ERROR('#575: 1073741823 << 17 === -131072. Actual: ' + (1073741823 << 17)); \n} \n\n\nif (2147483647 << 17 !== -131072) { \n $ERROR('#576: 2147483647 << 17 === -131072. Actual: ' + (2147483647 << 17)); \n} \n\n\nif (0 << 18 !== 0) { \n $ERROR('#577: 0 << 18 === 0. Actual: ' + (0 << 18)); \n} \n\n\nif (1 << 18 !== 262144) { \n $ERROR('#578: 1 << 18 === 262144. Actual: ' + (1 << 18)); \n} \n\n\nif (3 << 18 !== 786432) { \n $ERROR('#579: 3 << 18 === 786432. Actual: ' + (3 << 18)); \n} \n\n\nif (7 << 18 !== 1835008) { \n $ERROR('#580: 7 << 18 === 1835008. Actual: ' + (7 << 18)); \n} \n\n\nif (15 << 18 !== 3932160) { \n $ERROR('#581: 15 << 18 === 3932160. Actual: ' + (15 << 18)); \n} \n\n\nif (31 << 18 !== 8126464) { \n $ERROR('#582: 31 << 18 === 8126464. Actual: ' + (31 << 18)); \n} \n\n\nif (63 << 18 !== 16515072) { \n $ERROR('#583: 63 << 18 === 16515072. Actual: ' + (63 << 18)); \n} \n\n\nif (127 << 18 !== 33292288) { \n $ERROR('#584: 127 << 18 === 33292288. Actual: ' + (127 << 18)); \n} \n\n\nif (255 << 18 !== 66846720) { \n $ERROR('#585: 255 << 18 === 66846720. Actual: ' + (255 << 18)); \n} \n\n\nif (511 << 18 !== 133955584) { \n $ERROR('#586: 511 << 18 === 133955584. Actual: ' + (511 << 18)); \n} \n\n\nif (1023 << 18 !== 268173312) { \n $ERROR('#587: 1023 << 18 === 268173312. Actual: ' + (1023 << 18)); \n} \n\n\nif (2047 << 18 !== 536608768) { \n $ERROR('#588: 2047 << 18 === 536608768. Actual: ' + (2047 << 18)); \n} \n\n\nif (4095 << 18 !== 1073479680) { \n $ERROR('#589: 4095 << 18 === 1073479680. Actual: ' + (4095 << 18)); \n} \n\n\nif (8191 << 18 !== 2147221504) { \n $ERROR('#590: 8191 << 18 === 2147221504. Actual: ' + (8191 << 18)); \n} \n\n\nif (16383 << 18 !== -262144) { \n $ERROR('#591: 16383 << 18 === -262144. Actual: ' + (16383 << 18)); \n} \n\n\nif (32767 << 18 !== -262144) { \n $ERROR('#592: 32767 << 18 === -262144. Actual: ' + (32767 << 18)); \n} \n\n\nif (65535 << 18 !== -262144) { \n $ERROR('#593: 65535 << 18 === -262144. Actual: ' + (65535 << 18)); \n} \n\n\nif (131071 << 18 !== -262144) { \n $ERROR('#594: 131071 << 18 === -262144. Actual: ' + (131071 << 18)); \n} \n\n\nif (262143 << 18 !== -262144) { \n $ERROR('#595: 262143 << 18 === -262144. Actual: ' + (262143 << 18)); \n} \n\n\nif (524287 << 18 !== -262144) { \n $ERROR('#596: 524287 << 18 === -262144. Actual: ' + (524287 << 18)); \n} \n\n\nif (1048575 << 18 !== -262144) { \n $ERROR('#597: 1048575 << 18 === -262144. Actual: ' + (1048575 << 18)); \n} \n\n\nif (2097151 << 18 !== -262144) { \n $ERROR('#598: 2097151 << 18 === -262144. Actual: ' + (2097151 << 18)); \n} \n\n\nif (4194303 << 18 !== -262144) { \n $ERROR('#599: 4194303 << 18 === -262144. Actual: ' + (4194303 << 18)); \n} \n\n\nif (8388607 << 18 !== -262144) { \n $ERROR('#600: 8388607 << 18 === -262144. Actual: ' + (8388607 << 18)); \n} \n\n\nif (16777215 << 18 !== -262144) { \n $ERROR('#601: 16777215 << 18 === -262144. Actual: ' + (16777215 << 18)); \n} \n\n\nif (33554431 << 18 !== -262144) { \n $ERROR('#602: 33554431 << 18 === -262144. Actual: ' + (33554431 << 18)); \n} \n\n\nif (67108863 << 18 !== -262144) { \n $ERROR('#603: 67108863 << 18 === -262144. Actual: ' + (67108863 << 18)); \n} \n\n\nif (134217727 << 18 !== -262144) { \n $ERROR('#604: 134217727 << 18 === -262144. Actual: ' + (134217727 << 18)); \n} \n\n\nif (268435455 << 18 !== -262144) { \n $ERROR('#605: 268435455 << 18 === -262144. Actual: ' + (268435455 << 18)); \n} \n\n\nif (536870911 << 18 !== -262144) { \n $ERROR('#606: 536870911 << 18 === -262144. Actual: ' + (536870911 << 18)); \n} \n\n\nif (1073741823 << 18 !== -262144) { \n $ERROR('#607: 1073741823 << 18 === -262144. Actual: ' + (1073741823 << 18)); \n} \n\n\nif (2147483647 << 18 !== -262144) { \n $ERROR('#608: 2147483647 << 18 === -262144. Actual: ' + (2147483647 << 18)); \n} \n\n\nif (0 << 19 !== 0) { \n $ERROR('#609: 0 << 19 === 0. Actual: ' + (0 << 19)); \n} \n\n\nif (1 << 19 !== 524288) { \n $ERROR('#610: 1 << 19 === 524288. Actual: ' + (1 << 19)); \n} \n\n\nif (3 << 19 !== 1572864) { \n $ERROR('#611: 3 << 19 === 1572864. Actual: ' + (3 << 19)); \n} \n\n\nif (7 << 19 !== 3670016) { \n $ERROR('#612: 7 << 19 === 3670016. Actual: ' + (7 << 19)); \n} \n\n\nif (15 << 19 !== 7864320) { \n $ERROR('#613: 15 << 19 === 7864320. Actual: ' + (15 << 19)); \n} \n\n\nif (31 << 19 !== 16252928) { \n $ERROR('#614: 31 << 19 === 16252928. Actual: ' + (31 << 19)); \n} \n\n\nif (63 << 19 !== 33030144) { \n $ERROR('#615: 63 << 19 === 33030144. Actual: ' + (63 << 19)); \n} \n\n\nif (127 << 19 !== 66584576) { \n $ERROR('#616: 127 << 19 === 66584576. Actual: ' + (127 << 19)); \n} \n\n\nif (255 << 19 !== 133693440) { \n $ERROR('#617: 255 << 19 === 133693440. Actual: ' + (255 << 19)); \n} \n\n\nif (511 << 19 !== 267911168) { \n $ERROR('#618: 511 << 19 === 267911168. Actual: ' + (511 << 19)); \n} \n\n\nif (1023 << 19 !== 536346624) { \n $ERROR('#619: 1023 << 19 === 536346624. Actual: ' + (1023 << 19)); \n} \n\n\nif (2047 << 19 !== 1073217536) { \n $ERROR('#620: 2047 << 19 === 1073217536. Actual: ' + (2047 << 19)); \n} \n\n\nif (4095 << 19 !== 2146959360) { \n $ERROR('#621: 4095 << 19 === 2146959360. Actual: ' + (4095 << 19)); \n} \n\n\nif (8191 << 19 !== -524288) { \n $ERROR('#622: 8191 << 19 === -524288. Actual: ' + (8191 << 19)); \n} \n\n\nif (16383 << 19 !== -524288) { \n $ERROR('#623: 16383 << 19 === -524288. Actual: ' + (16383 << 19)); \n} \n\n\nif (32767 << 19 !== -524288) { \n $ERROR('#624: 32767 << 19 === -524288. Actual: ' + (32767 << 19)); \n} \n\n\nif (65535 << 19 !== -524288) { \n $ERROR('#625: 65535 << 19 === -524288. Actual: ' + (65535 << 19)); \n} \n\n\nif (131071 << 19 !== -524288) { \n $ERROR('#626: 131071 << 19 === -524288. Actual: ' + (131071 << 19)); \n} \n\n\nif (262143 << 19 !== -524288) { \n $ERROR('#627: 262143 << 19 === -524288. Actual: ' + (262143 << 19)); \n} \n\n\nif (524287 << 19 !== -524288) { \n $ERROR('#628: 524287 << 19 === -524288. Actual: ' + (524287 << 19)); \n} \n\n\nif (1048575 << 19 !== -524288) { \n $ERROR('#629: 1048575 << 19 === -524288. Actual: ' + (1048575 << 19)); \n} \n\n\nif (2097151 << 19 !== -524288) { \n $ERROR('#630: 2097151 << 19 === -524288. Actual: ' + (2097151 << 19)); \n} \n\n\nif (4194303 << 19 !== -524288) { \n $ERROR('#631: 4194303 << 19 === -524288. Actual: ' + (4194303 << 19)); \n} \n\n\nif (8388607 << 19 !== -524288) { \n $ERROR('#632: 8388607 << 19 === -524288. Actual: ' + (8388607 << 19)); \n} \n\n\nif (16777215 << 19 !== -524288) { \n $ERROR('#633: 16777215 << 19 === -524288. Actual: ' + (16777215 << 19)); \n} \n\n\nif (33554431 << 19 !== -524288) { \n $ERROR('#634: 33554431 << 19 === -524288. Actual: ' + (33554431 << 19)); \n} \n\n\nif (67108863 << 19 !== -524288) { \n $ERROR('#635: 67108863 << 19 === -524288. Actual: ' + (67108863 << 19)); \n} \n\n\nif (134217727 << 19 !== -524288) { \n $ERROR('#636: 134217727 << 19 === -524288. Actual: ' + (134217727 << 19)); \n} \n\n\nif (268435455 << 19 !== -524288) { \n $ERROR('#637: 268435455 << 19 === -524288. Actual: ' + (268435455 << 19)); \n} \n\n\nif (536870911 << 19 !== -524288) { \n $ERROR('#638: 536870911 << 19 === -524288. Actual: ' + (536870911 << 19)); \n} \n\n\nif (1073741823 << 19 !== -524288) { \n $ERROR('#639: 1073741823 << 19 === -524288. Actual: ' + (1073741823 << 19)); \n} \n\n\nif (2147483647 << 19 !== -524288) { \n $ERROR('#640: 2147483647 << 19 === -524288. Actual: ' + (2147483647 << 19)); \n} \n\n\nif (0 << 20 !== 0) { \n $ERROR('#641: 0 << 20 === 0. Actual: ' + (0 << 20)); \n} \n\n\nif (1 << 20 !== 1048576) { \n $ERROR('#642: 1 << 20 === 1048576. Actual: ' + (1 << 20)); \n} \n\n\nif (3 << 20 !== 3145728) { \n $ERROR('#643: 3 << 20 === 3145728. Actual: ' + (3 << 20)); \n} \n\n\nif (7 << 20 !== 7340032) { \n $ERROR('#644: 7 << 20 === 7340032. Actual: ' + (7 << 20)); \n} \n\n\nif (15 << 20 !== 15728640) { \n $ERROR('#645: 15 << 20 === 15728640. Actual: ' + (15 << 20)); \n} \n\n\nif (31 << 20 !== 32505856) { \n $ERROR('#646: 31 << 20 === 32505856. Actual: ' + (31 << 20)); \n} \n\n\nif (63 << 20 !== 66060288) { \n $ERROR('#647: 63 << 20 === 66060288. Actual: ' + (63 << 20)); \n} \n\n\nif (127 << 20 !== 133169152) { \n $ERROR('#648: 127 << 20 === 133169152. Actual: ' + (127 << 20)); \n} \n\n\nif (255 << 20 !== 267386880) { \n $ERROR('#649: 255 << 20 === 267386880. Actual: ' + (255 << 20)); \n} \n\n\nif (511 << 20 !== 535822336) { \n $ERROR('#650: 511 << 20 === 535822336. Actual: ' + (511 << 20)); \n} \n\n\nif (1023 << 20 !== 1072693248) { \n $ERROR('#651: 1023 << 20 === 1072693248. Actual: ' + (1023 << 20)); \n} \n\n\nif (2047 << 20 !== 2146435072) { \n $ERROR('#652: 2047 << 20 === 2146435072. Actual: ' + (2047 << 20)); \n} \n\n\nif (4095 << 20 !== -1048576) { \n $ERROR('#653: 4095 << 20 === -1048576. Actual: ' + (4095 << 20)); \n} \n\n\nif (8191 << 20 !== -1048576) { \n $ERROR('#654: 8191 << 20 === -1048576. Actual: ' + (8191 << 20)); \n} \n\n\nif (16383 << 20 !== -1048576) { \n $ERROR('#655: 16383 << 20 === -1048576. Actual: ' + (16383 << 20)); \n} \n\n\nif (32767 << 20 !== -1048576) { \n $ERROR('#656: 32767 << 20 === -1048576. Actual: ' + (32767 << 20)); \n} \n\n\nif (65535 << 20 !== -1048576) { \n $ERROR('#657: 65535 << 20 === -1048576. Actual: ' + (65535 << 20)); \n} \n\n\nif (131071 << 20 !== -1048576) { \n $ERROR('#658: 131071 << 20 === -1048576. Actual: ' + (131071 << 20)); \n} \n\n\nif (262143 << 20 !== -1048576) { \n $ERROR('#659: 262143 << 20 === -1048576. Actual: ' + (262143 << 20)); \n} \n\n\nif (524287 << 20 !== -1048576) { \n $ERROR('#660: 524287 << 20 === -1048576. Actual: ' + (524287 << 20)); \n} \n\n\nif (1048575 << 20 !== -1048576) { \n $ERROR('#661: 1048575 << 20 === -1048576. Actual: ' + (1048575 << 20)); \n} \n\n\nif (2097151 << 20 !== -1048576) { \n $ERROR('#662: 2097151 << 20 === -1048576. Actual: ' + (2097151 << 20)); \n} \n\n\nif (4194303 << 20 !== -1048576) { \n $ERROR('#663: 4194303 << 20 === -1048576. Actual: ' + (4194303 << 20)); \n} \n\n\nif (8388607 << 20 !== -1048576) { \n $ERROR('#664: 8388607 << 20 === -1048576. Actual: ' + (8388607 << 20)); \n} \n\n\nif (16777215 << 20 !== -1048576) { \n $ERROR('#665: 16777215 << 20 === -1048576. Actual: ' + (16777215 << 20)); \n} \n\n\nif (33554431 << 20 !== -1048576) { \n $ERROR('#666: 33554431 << 20 === -1048576. Actual: ' + (33554431 << 20)); \n} \n\n\nif (67108863 << 20 !== -1048576) { \n $ERROR('#667: 67108863 << 20 === -1048576. Actual: ' + (67108863 << 20)); \n} \n\n\nif (134217727 << 20 !== -1048576) { \n $ERROR('#668: 134217727 << 20 === -1048576. Actual: ' + (134217727 << 20)); \n} \n\n\nif (268435455 << 20 !== -1048576) { \n $ERROR('#669: 268435455 << 20 === -1048576. Actual: ' + (268435455 << 20)); \n} \n\n\nif (536870911 << 20 !== -1048576) { \n $ERROR('#670: 536870911 << 20 === -1048576. Actual: ' + (536870911 << 20)); \n} \n\n\nif (1073741823 << 20 !== -1048576) { \n $ERROR('#671: 1073741823 << 20 === -1048576. Actual: ' + (1073741823 << 20)); \n} \n\n\nif (2147483647 << 20 !== -1048576) { \n $ERROR('#672: 2147483647 << 20 === -1048576. Actual: ' + (2147483647 << 20)); \n} \n\n\nif (0 << 21 !== 0) { \n $ERROR('#673: 0 << 21 === 0. Actual: ' + (0 << 21)); \n} \n\n\nif (1 << 21 !== 2097152) { \n $ERROR('#674: 1 << 21 === 2097152. Actual: ' + (1 << 21)); \n} \n\n\nif (3 << 21 !== 6291456) { \n $ERROR('#675: 3 << 21 === 6291456. Actual: ' + (3 << 21)); \n} \n\n\nif (7 << 21 !== 14680064) { \n $ERROR('#676: 7 << 21 === 14680064. Actual: ' + (7 << 21)); \n} \n\n\nif (15 << 21 !== 31457280) { \n $ERROR('#677: 15 << 21 === 31457280. Actual: ' + (15 << 21)); \n} \n\n\nif (31 << 21 !== 65011712) { \n $ERROR('#678: 31 << 21 === 65011712. Actual: ' + (31 << 21)); \n} \n\n\nif (63 << 21 !== 132120576) { \n $ERROR('#679: 63 << 21 === 132120576. Actual: ' + (63 << 21)); \n} \n\n\nif (127 << 21 !== 266338304) { \n $ERROR('#680: 127 << 21 === 266338304. Actual: ' + (127 << 21)); \n} \n\n\nif (255 << 21 !== 534773760) { \n $ERROR('#681: 255 << 21 === 534773760. Actual: ' + (255 << 21)); \n} \n\n\nif (511 << 21 !== 1071644672) { \n $ERROR('#682: 511 << 21 === 1071644672. Actual: ' + (511 << 21)); \n} \n\n\nif (1023 << 21 !== 2145386496) { \n $ERROR('#683: 1023 << 21 === 2145386496. Actual: ' + (1023 << 21)); \n} \n\n\nif (2047 << 21 !== -2097152) { \n $ERROR('#684: 2047 << 21 === -2097152. Actual: ' + (2047 << 21)); \n} \n\n\nif (4095 << 21 !== -2097152) { \n $ERROR('#685: 4095 << 21 === -2097152. Actual: ' + (4095 << 21)); \n} \n\n\nif (8191 << 21 !== -2097152) { \n $ERROR('#686: 8191 << 21 === -2097152. Actual: ' + (8191 << 21)); \n} \n\n\nif (16383 << 21 !== -2097152) { \n $ERROR('#687: 16383 << 21 === -2097152. Actual: ' + (16383 << 21)); \n} \n\n\nif (32767 << 21 !== -2097152) { \n $ERROR('#688: 32767 << 21 === -2097152. Actual: ' + (32767 << 21)); \n} \n\n\nif (65535 << 21 !== -2097152) { \n $ERROR('#689: 65535 << 21 === -2097152. Actual: ' + (65535 << 21)); \n} \n\n\nif (131071 << 21 !== -2097152) { \n $ERROR('#690: 131071 << 21 === -2097152. Actual: ' + (131071 << 21)); \n} \n\n\nif (262143 << 21 !== -2097152) { \n $ERROR('#691: 262143 << 21 === -2097152. Actual: ' + (262143 << 21)); \n} \n\n\nif (524287 << 21 !== -2097152) { \n $ERROR('#692: 524287 << 21 === -2097152. Actual: ' + (524287 << 21)); \n} \n\n\nif (1048575 << 21 !== -2097152) { \n $ERROR('#693: 1048575 << 21 === -2097152. Actual: ' + (1048575 << 21)); \n} \n\n\nif (2097151 << 21 !== -2097152) { \n $ERROR('#694: 2097151 << 21 === -2097152. Actual: ' + (2097151 << 21)); \n} \n\n\nif (4194303 << 21 !== -2097152) { \n $ERROR('#695: 4194303 << 21 === -2097152. Actual: ' + (4194303 << 21)); \n} \n\n\nif (8388607 << 21 !== -2097152) { \n $ERROR('#696: 8388607 << 21 === -2097152. Actual: ' + (8388607 << 21)); \n} \n\n\nif (16777215 << 21 !== -2097152) { \n $ERROR('#697: 16777215 << 21 === -2097152. Actual: ' + (16777215 << 21)); \n} \n\n\nif (33554431 << 21 !== -2097152) { \n $ERROR('#698: 33554431 << 21 === -2097152. Actual: ' + (33554431 << 21)); \n} \n\n\nif (67108863 << 21 !== -2097152) { \n $ERROR('#699: 67108863 << 21 === -2097152. Actual: ' + (67108863 << 21)); \n} \n\n\nif (134217727 << 21 !== -2097152) { \n $ERROR('#700: 134217727 << 21 === -2097152. Actual: ' + (134217727 << 21)); \n} \n\n\nif (268435455 << 21 !== -2097152) { \n $ERROR('#701: 268435455 << 21 === -2097152. Actual: ' + (268435455 << 21)); \n} \n\n\nif (536870911 << 21 !== -2097152) { \n $ERROR('#702: 536870911 << 21 === -2097152. Actual: ' + (536870911 << 21)); \n} \n\n\nif (1073741823 << 21 !== -2097152) { \n $ERROR('#703: 1073741823 << 21 === -2097152. Actual: ' + (1073741823 << 21)); \n} \n\n\nif (2147483647 << 21 !== -2097152) { \n $ERROR('#704: 2147483647 << 21 === -2097152. Actual: ' + (2147483647 << 21)); \n} \n\n\nif (0 << 22 !== 0) { \n $ERROR('#705: 0 << 22 === 0. Actual: ' + (0 << 22)); \n} \n\n\nif (1 << 22 !== 4194304) { \n $ERROR('#706: 1 << 22 === 4194304. Actual: ' + (1 << 22)); \n} \n\n\nif (3 << 22 !== 12582912) { \n $ERROR('#707: 3 << 22 === 12582912. Actual: ' + (3 << 22)); \n} \n\n\nif (7 << 22 !== 29360128) { \n $ERROR('#708: 7 << 22 === 29360128. Actual: ' + (7 << 22)); \n} \n\n\nif (15 << 22 !== 62914560) { \n $ERROR('#709: 15 << 22 === 62914560. Actual: ' + (15 << 22)); \n} \n\n\nif (31 << 22 !== 130023424) { \n $ERROR('#710: 31 << 22 === 130023424. Actual: ' + (31 << 22)); \n} \n\n\nif (63 << 22 !== 264241152) { \n $ERROR('#711: 63 << 22 === 264241152. Actual: ' + (63 << 22)); \n} \n\n\nif (127 << 22 !== 532676608) { \n $ERROR('#712: 127 << 22 === 532676608. Actual: ' + (127 << 22)); \n} \n\n\nif (255 << 22 !== 1069547520) { \n $ERROR('#713: 255 << 22 === 1069547520. Actual: ' + (255 << 22)); \n} \n\n\nif (511 << 22 !== 2143289344) { \n $ERROR('#714: 511 << 22 === 2143289344. Actual: ' + (511 << 22)); \n} \n\n\nif (1023 << 22 !== -4194304) { \n $ERROR('#715: 1023 << 22 === -4194304. Actual: ' + (1023 << 22)); \n} \n\n\nif (2047 << 22 !== -4194304) { \n $ERROR('#716: 2047 << 22 === -4194304. Actual: ' + (2047 << 22)); \n} \n\n\nif (4095 << 22 !== -4194304) { \n $ERROR('#717: 4095 << 22 === -4194304. Actual: ' + (4095 << 22)); \n} \n\n\nif (8191 << 22 !== -4194304) { \n $ERROR('#718: 8191 << 22 === -4194304. Actual: ' + (8191 << 22)); \n} \n\n\nif (16383 << 22 !== -4194304) { \n $ERROR('#719: 16383 << 22 === -4194304. Actual: ' + (16383 << 22)); \n} \n\n\nif (32767 << 22 !== -4194304) { \n $ERROR('#720: 32767 << 22 === -4194304. Actual: ' + (32767 << 22)); \n} \n\n\nif (65535 << 22 !== -4194304) { \n $ERROR('#721: 65535 << 22 === -4194304. Actual: ' + (65535 << 22)); \n} \n\n\nif (131071 << 22 !== -4194304) { \n $ERROR('#722: 131071 << 22 === -4194304. Actual: ' + (131071 << 22)); \n} \n\n\nif (262143 << 22 !== -4194304) { \n $ERROR('#723: 262143 << 22 === -4194304. Actual: ' + (262143 << 22)); \n} \n\n\nif (524287 << 22 !== -4194304) { \n $ERROR('#724: 524287 << 22 === -4194304. Actual: ' + (524287 << 22)); \n} \n\n\nif (1048575 << 22 !== -4194304) { \n $ERROR('#725: 1048575 << 22 === -4194304. Actual: ' + (1048575 << 22)); \n} \n\n\nif (2097151 << 22 !== -4194304) { \n $ERROR('#726: 2097151 << 22 === -4194304. Actual: ' + (2097151 << 22)); \n} \n\n\nif (4194303 << 22 !== -4194304) { \n $ERROR('#727: 4194303 << 22 === -4194304. Actual: ' + (4194303 << 22)); \n} \n\n\nif (8388607 << 22 !== -4194304) { \n $ERROR('#728: 8388607 << 22 === -4194304. Actual: ' + (8388607 << 22)); \n} \n\n\nif (16777215 << 22 !== -4194304) { \n $ERROR('#729: 16777215 << 22 === -4194304. Actual: ' + (16777215 << 22)); \n} \n\n\nif (33554431 << 22 !== -4194304) { \n $ERROR('#730: 33554431 << 22 === -4194304. Actual: ' + (33554431 << 22)); \n} \n\n\nif (67108863 << 22 !== -4194304) { \n $ERROR('#731: 67108863 << 22 === -4194304. Actual: ' + (67108863 << 22)); \n} \n\n\nif (134217727 << 22 !== -4194304) { \n $ERROR('#732: 134217727 << 22 === -4194304. Actual: ' + (134217727 << 22)); \n} \n\n\nif (268435455 << 22 !== -4194304) { \n $ERROR('#733: 268435455 << 22 === -4194304. Actual: ' + (268435455 << 22)); \n} \n\n\nif (536870911 << 22 !== -4194304) { \n $ERROR('#734: 536870911 << 22 === -4194304. Actual: ' + (536870911 << 22)); \n} \n\n\nif (1073741823 << 22 !== -4194304) { \n $ERROR('#735: 1073741823 << 22 === -4194304. Actual: ' + (1073741823 << 22)); \n} \n\n\nif (2147483647 << 22 !== -4194304) { \n $ERROR('#736: 2147483647 << 22 === -4194304. Actual: ' + (2147483647 << 22)); \n} \n\n\nif (0 << 23 !== 0) { \n $ERROR('#737: 0 << 23 === 0. Actual: ' + (0 << 23)); \n} \n\n\nif (1 << 23 !== 8388608) { \n $ERROR('#738: 1 << 23 === 8388608. Actual: ' + (1 << 23)); \n} \n\n\nif (3 << 23 !== 25165824) { \n $ERROR('#739: 3 << 23 === 25165824. Actual: ' + (3 << 23)); \n} \n\n\nif (7 << 23 !== 58720256) { \n $ERROR('#740: 7 << 23 === 58720256. Actual: ' + (7 << 23)); \n} \n\n\nif (15 << 23 !== 125829120) { \n $ERROR('#741: 15 << 23 === 125829120. Actual: ' + (15 << 23)); \n} \n\n\nif (31 << 23 !== 260046848) { \n $ERROR('#742: 31 << 23 === 260046848. Actual: ' + (31 << 23)); \n} \n\n\nif (63 << 23 !== 528482304) { \n $ERROR('#743: 63 << 23 === 528482304. Actual: ' + (63 << 23)); \n} \n\n\nif (127 << 23 !== 1065353216) { \n $ERROR('#744: 127 << 23 === 1065353216. Actual: ' + (127 << 23)); \n} \n\n\nif (255 << 23 !== 2139095040) { \n $ERROR('#745: 255 << 23 === 2139095040. Actual: ' + (255 << 23)); \n} \n\n\nif (511 << 23 !== -8388608) { \n $ERROR('#746: 511 << 23 === -8388608. Actual: ' + (511 << 23)); \n} \n\n\nif (1023 << 23 !== -8388608) { \n $ERROR('#747: 1023 << 23 === -8388608. Actual: ' + (1023 << 23)); \n} \n\n\nif (2047 << 23 !== -8388608) { \n $ERROR('#748: 2047 << 23 === -8388608. Actual: ' + (2047 << 23)); \n} \n\n\nif (4095 << 23 !== -8388608) { \n $ERROR('#749: 4095 << 23 === -8388608. Actual: ' + (4095 << 23)); \n} \n\n\nif (8191 << 23 !== -8388608) { \n $ERROR('#750: 8191 << 23 === -8388608. Actual: ' + (8191 << 23)); \n} \n\n\nif (16383 << 23 !== -8388608) { \n $ERROR('#751: 16383 << 23 === -8388608. Actual: ' + (16383 << 23)); \n} \n\n\nif (32767 << 23 !== -8388608) { \n $ERROR('#752: 32767 << 23 === -8388608. Actual: ' + (32767 << 23)); \n} \n\n\nif (65535 << 23 !== -8388608) { \n $ERROR('#753: 65535 << 23 === -8388608. Actual: ' + (65535 << 23)); \n} \n\n\nif (131071 << 23 !== -8388608) { \n $ERROR('#754: 131071 << 23 === -8388608. Actual: ' + (131071 << 23)); \n} \n\n\nif (262143 << 23 !== -8388608) { \n $ERROR('#755: 262143 << 23 === -8388608. Actual: ' + (262143 << 23)); \n} \n\n\nif (524287 << 23 !== -8388608) { \n $ERROR('#756: 524287 << 23 === -8388608. Actual: ' + (524287 << 23)); \n} \n\n\nif (1048575 << 23 !== -8388608) { \n $ERROR('#757: 1048575 << 23 === -8388608. Actual: ' + (1048575 << 23)); \n} \n\n\nif (2097151 << 23 !== -8388608) { \n $ERROR('#758: 2097151 << 23 === -8388608. Actual: ' + (2097151 << 23)); \n} \n\n\nif (4194303 << 23 !== -8388608) { \n $ERROR('#759: 4194303 << 23 === -8388608. Actual: ' + (4194303 << 23)); \n} \n\n\nif (8388607 << 23 !== -8388608) { \n $ERROR('#760: 8388607 << 23 === -8388608. Actual: ' + (8388607 << 23)); \n} \n\n\nif (16777215 << 23 !== -8388608) { \n $ERROR('#761: 16777215 << 23 === -8388608. Actual: ' + (16777215 << 23)); \n} \n\n\nif (33554431 << 23 !== -8388608) { \n $ERROR('#762: 33554431 << 23 === -8388608. Actual: ' + (33554431 << 23)); \n} \n\n\nif (67108863 << 23 !== -8388608) { \n $ERROR('#763: 67108863 << 23 === -8388608. Actual: ' + (67108863 << 23)); \n} \n\n\nif (134217727 << 23 !== -8388608) { \n $ERROR('#764: 134217727 << 23 === -8388608. Actual: ' + (134217727 << 23)); \n} \n\n\nif (268435455 << 23 !== -8388608) { \n $ERROR('#765: 268435455 << 23 === -8388608. Actual: ' + (268435455 << 23)); \n} \n\n\nif (536870911 << 23 !== -8388608) { \n $ERROR('#766: 536870911 << 23 === -8388608. Actual: ' + (536870911 << 23)); \n} \n\n\nif (1073741823 << 23 !== -8388608) { \n $ERROR('#767: 1073741823 << 23 === -8388608. Actual: ' + (1073741823 << 23)); \n} \n\n\nif (2147483647 << 23 !== -8388608) { \n $ERROR('#768: 2147483647 << 23 === -8388608. Actual: ' + (2147483647 << 23)); \n} \n\n\nif (0 << 24 !== 0) { \n $ERROR('#769: 0 << 24 === 0. Actual: ' + (0 << 24)); \n} \n\n\nif (1 << 24 !== 16777216) { \n $ERROR('#770: 1 << 24 === 16777216. Actual: ' + (1 << 24)); \n} \n\n\nif (3 << 24 !== 50331648) { \n $ERROR('#771: 3 << 24 === 50331648. Actual: ' + (3 << 24)); \n} \n\n\nif (7 << 24 !== 117440512) { \n $ERROR('#772: 7 << 24 === 117440512. Actual: ' + (7 << 24)); \n} \n\n\nif (15 << 24 !== 251658240) { \n $ERROR('#773: 15 << 24 === 251658240. Actual: ' + (15 << 24)); \n} \n\n\nif (31 << 24 !== 520093696) { \n $ERROR('#774: 31 << 24 === 520093696. Actual: ' + (31 << 24)); \n} \n\n\nif (63 << 24 !== 1056964608) { \n $ERROR('#775: 63 << 24 === 1056964608. Actual: ' + (63 << 24)); \n} \n\n\nif (127 << 24 !== 2130706432) { \n $ERROR('#776: 127 << 24 === 2130706432. Actual: ' + (127 << 24)); \n} \n\n\nif (255 << 24 !== -16777216) { \n $ERROR('#777: 255 << 24 === -16777216. Actual: ' + (255 << 24)); \n} \n\n\nif (511 << 24 !== -16777216) { \n $ERROR('#778: 511 << 24 === -16777216. Actual: ' + (511 << 24)); \n} \n\n\nif (1023 << 24 !== -16777216) { \n $ERROR('#779: 1023 << 24 === -16777216. Actual: ' + (1023 << 24)); \n} \n\n\nif (2047 << 24 !== -16777216) { \n $ERROR('#780: 2047 << 24 === -16777216. Actual: ' + (2047 << 24)); \n} \n\n\nif (4095 << 24 !== -16777216) { \n $ERROR('#781: 4095 << 24 === -16777216. Actual: ' + (4095 << 24)); \n} \n\n\nif (8191 << 24 !== -16777216) { \n $ERROR('#782: 8191 << 24 === -16777216. Actual: ' + (8191 << 24)); \n} \n\n\nif (16383 << 24 !== -16777216) { \n $ERROR('#783: 16383 << 24 === -16777216. Actual: ' + (16383 << 24)); \n} \n\n\nif (32767 << 24 !== -16777216) { \n $ERROR('#784: 32767 << 24 === -16777216. Actual: ' + (32767 << 24)); \n} \n\n\nif (65535 << 24 !== -16777216) { \n $ERROR('#785: 65535 << 24 === -16777216. Actual: ' + (65535 << 24)); \n} \n\n\nif (131071 << 24 !== -16777216) { \n $ERROR('#786: 131071 << 24 === -16777216. Actual: ' + (131071 << 24)); \n} \n\n\nif (262143 << 24 !== -16777216) { \n $ERROR('#787: 262143 << 24 === -16777216. Actual: ' + (262143 << 24)); \n} \n\n\nif (524287 << 24 !== -16777216) { \n $ERROR('#788: 524287 << 24 === -16777216. Actual: ' + (524287 << 24)); \n} \n\n\nif (1048575 << 24 !== -16777216) { \n $ERROR('#789: 1048575 << 24 === -16777216. Actual: ' + (1048575 << 24)); \n} \n\n\nif (2097151 << 24 !== -16777216) { \n $ERROR('#790: 2097151 << 24 === -16777216. Actual: ' + (2097151 << 24)); \n} \n\n\nif (4194303 << 24 !== -16777216) { \n $ERROR('#791: 4194303 << 24 === -16777216. Actual: ' + (4194303 << 24)); \n} \n\n\nif (8388607 << 24 !== -16777216) { \n $ERROR('#792: 8388607 << 24 === -16777216. Actual: ' + (8388607 << 24)); \n} \n\n\nif (16777215 << 24 !== -16777216) { \n $ERROR('#793: 16777215 << 24 === -16777216. Actual: ' + (16777215 << 24)); \n} \n\n\nif (33554431 << 24 !== -16777216) { \n $ERROR('#794: 33554431 << 24 === -16777216. Actual: ' + (33554431 << 24)); \n} \n\n\nif (67108863 << 24 !== -16777216) { \n $ERROR('#795: 67108863 << 24 === -16777216. Actual: ' + (67108863 << 24)); \n} \n\n\nif (134217727 << 24 !== -16777216) { \n $ERROR('#796: 134217727 << 24 === -16777216. Actual: ' + (134217727 << 24)); \n} \n\n\nif (268435455 << 24 !== -16777216) { \n $ERROR('#797: 268435455 << 24 === -16777216. Actual: ' + (268435455 << 24)); \n} \n\n\nif (536870911 << 24 !== -16777216) { \n $ERROR('#798: 536870911 << 24 === -16777216. Actual: ' + (536870911 << 24)); \n} \n\n\nif (1073741823 << 24 !== -16777216) { \n $ERROR('#799: 1073741823 << 24 === -16777216. Actual: ' + (1073741823 << 24)); \n} \n\n\nif (2147483647 << 24 !== -16777216) { \n $ERROR('#800: 2147483647 << 24 === -16777216. Actual: ' + (2147483647 << 24)); \n} \n\n\nif (0 << 25 !== 0) { \n $ERROR('#801: 0 << 25 === 0. Actual: ' + (0 << 25)); \n} \n\n\nif (1 << 25 !== 33554432) { \n $ERROR('#802: 1 << 25 === 33554432. Actual: ' + (1 << 25)); \n} \n\n\nif (3 << 25 !== 100663296) { \n $ERROR('#803: 3 << 25 === 100663296. Actual: ' + (3 << 25)); \n} \n\n\nif (7 << 25 !== 234881024) { \n $ERROR('#804: 7 << 25 === 234881024. Actual: ' + (7 << 25)); \n} \n\n\nif (15 << 25 !== 503316480) { \n $ERROR('#805: 15 << 25 === 503316480. Actual: ' + (15 << 25)); \n} \n\n\nif (31 << 25 !== 1040187392) { \n $ERROR('#806: 31 << 25 === 1040187392. Actual: ' + (31 << 25)); \n} \n\n\nif (63 << 25 !== 2113929216) { \n $ERROR('#807: 63 << 25 === 2113929216. Actual: ' + (63 << 25)); \n} \n\n\nif (127 << 25 !== -33554432) { \n $ERROR('#808: 127 << 25 === -33554432. Actual: ' + (127 << 25)); \n} \n\n\nif (255 << 25 !== -33554432) { \n $ERROR('#809: 255 << 25 === -33554432. Actual: ' + (255 << 25)); \n} \n\n\nif (511 << 25 !== -33554432) { \n $ERROR('#810: 511 << 25 === -33554432. Actual: ' + (511 << 25)); \n} \n\n\nif (1023 << 25 !== -33554432) { \n $ERROR('#811: 1023 << 25 === -33554432. Actual: ' + (1023 << 25)); \n} \n\n\nif (2047 << 25 !== -33554432) { \n $ERROR('#812: 2047 << 25 === -33554432. Actual: ' + (2047 << 25)); \n} \n\n\nif (4095 << 25 !== -33554432) { \n $ERROR('#813: 4095 << 25 === -33554432. Actual: ' + (4095 << 25)); \n} \n\n\nif (8191 << 25 !== -33554432) { \n $ERROR('#814: 8191 << 25 === -33554432. Actual: ' + (8191 << 25)); \n} \n\n\nif (16383 << 25 !== -33554432) { \n $ERROR('#815: 16383 << 25 === -33554432. Actual: ' + (16383 << 25)); \n} \n\n\nif (32767 << 25 !== -33554432) { \n $ERROR('#816: 32767 << 25 === -33554432. Actual: ' + (32767 << 25)); \n} \n\n\nif (65535 << 25 !== -33554432) { \n $ERROR('#817: 65535 << 25 === -33554432. Actual: ' + (65535 << 25)); \n} \n\n\nif (131071 << 25 !== -33554432) { \n $ERROR('#818: 131071 << 25 === -33554432. Actual: ' + (131071 << 25)); \n} \n\n\nif (262143 << 25 !== -33554432) { \n $ERROR('#819: 262143 << 25 === -33554432. Actual: ' + (262143 << 25)); \n} \n\n\nif (524287 << 25 !== -33554432) { \n $ERROR('#820: 524287 << 25 === -33554432. Actual: ' + (524287 << 25)); \n} \n\n\nif (1048575 << 25 !== -33554432) { \n $ERROR('#821: 1048575 << 25 === -33554432. Actual: ' + (1048575 << 25)); \n} \n\n\nif (2097151 << 25 !== -33554432) { \n $ERROR('#822: 2097151 << 25 === -33554432. Actual: ' + (2097151 << 25)); \n} \n\n\nif (4194303 << 25 !== -33554432) { \n $ERROR('#823: 4194303 << 25 === -33554432. Actual: ' + (4194303 << 25)); \n} \n\n\nif (8388607 << 25 !== -33554432) { \n $ERROR('#824: 8388607 << 25 === -33554432. Actual: ' + (8388607 << 25)); \n} \n\n\nif (16777215 << 25 !== -33554432) { \n $ERROR('#825: 16777215 << 25 === -33554432. Actual: ' + (16777215 << 25)); \n} \n\n\nif (33554431 << 25 !== -33554432) { \n $ERROR('#826: 33554431 << 25 === -33554432. Actual: ' + (33554431 << 25)); \n} \n\n\nif (67108863 << 25 !== -33554432) { \n $ERROR('#827: 67108863 << 25 === -33554432. Actual: ' + (67108863 << 25)); \n} \n\n\nif (134217727 << 25 !== -33554432) { \n $ERROR('#828: 134217727 << 25 === -33554432. Actual: ' + (134217727 << 25)); \n} \n\n\nif (268435455 << 25 !== -33554432) { \n $ERROR('#829: 268435455 << 25 === -33554432. Actual: ' + (268435455 << 25)); \n} \n\n\nif (536870911 << 25 !== -33554432) { \n $ERROR('#830: 536870911 << 25 === -33554432. Actual: ' + (536870911 << 25)); \n} \n\n\nif (1073741823 << 25 !== -33554432) { \n $ERROR('#831: 1073741823 << 25 === -33554432. Actual: ' + (1073741823 << 25)); \n} \n\n\nif (2147483647 << 25 !== -33554432) { \n $ERROR('#832: 2147483647 << 25 === -33554432. Actual: ' + (2147483647 << 25)); \n} \n\n\nif (0 << 26 !== 0) { \n $ERROR('#833: 0 << 26 === 0. Actual: ' + (0 << 26)); \n} \n\n\nif (1 << 26 !== 67108864) { \n $ERROR('#834: 1 << 26 === 67108864. Actual: ' + (1 << 26)); \n} \n\n\nif (3 << 26 !== 201326592) { \n $ERROR('#835: 3 << 26 === 201326592. Actual: ' + (3 << 26)); \n} \n\n\nif (7 << 26 !== 469762048) { \n $ERROR('#836: 7 << 26 === 469762048. Actual: ' + (7 << 26)); \n} \n\n\nif (15 << 26 !== 1006632960) { \n $ERROR('#837: 15 << 26 === 1006632960. Actual: ' + (15 << 26)); \n} \n\n\nif (31 << 26 !== 2080374784) { \n $ERROR('#838: 31 << 26 === 2080374784. Actual: ' + (31 << 26)); \n} \n\n\nif (63 << 26 !== -67108864) { \n $ERROR('#839: 63 << 26 === -67108864. Actual: ' + (63 << 26)); \n} \n\n\nif (127 << 26 !== -67108864) { \n $ERROR('#840: 127 << 26 === -67108864. Actual: ' + (127 << 26)); \n} \n\n\nif (255 << 26 !== -67108864) { \n $ERROR('#841: 255 << 26 === -67108864. Actual: ' + (255 << 26)); \n} \n\n\nif (511 << 26 !== -67108864) { \n $ERROR('#842: 511 << 26 === -67108864. Actual: ' + (511 << 26)); \n} \n\n\nif (1023 << 26 !== -67108864) { \n $ERROR('#843: 1023 << 26 === -67108864. Actual: ' + (1023 << 26)); \n} \n\n\nif (2047 << 26 !== -67108864) { \n $ERROR('#844: 2047 << 26 === -67108864. Actual: ' + (2047 << 26)); \n} \n\n\nif (4095 << 26 !== -67108864) { \n $ERROR('#845: 4095 << 26 === -67108864. Actual: ' + (4095 << 26)); \n} \n\n\nif (8191 << 26 !== -67108864) { \n $ERROR('#846: 8191 << 26 === -67108864. Actual: ' + (8191 << 26)); \n} \n\n\nif (16383 << 26 !== -67108864) { \n $ERROR('#847: 16383 << 26 === -67108864. Actual: ' + (16383 << 26)); \n} \n\n\nif (32767 << 26 !== -67108864) { \n $ERROR('#848: 32767 << 26 === -67108864. Actual: ' + (32767 << 26)); \n} \n\n\nif (65535 << 26 !== -67108864) { \n $ERROR('#849: 65535 << 26 === -67108864. Actual: ' + (65535 << 26)); \n} \n\n\nif (131071 << 26 !== -67108864) { \n $ERROR('#850: 131071 << 26 === -67108864. Actual: ' + (131071 << 26)); \n} \n\n\nif (262143 << 26 !== -67108864) { \n $ERROR('#851: 262143 << 26 === -67108864. Actual: ' + (262143 << 26)); \n} \n\n\nif (524287 << 26 !== -67108864) { \n $ERROR('#852: 524287 << 26 === -67108864. Actual: ' + (524287 << 26)); \n} \n\n\nif (1048575 << 26 !== -67108864) { \n $ERROR('#853: 1048575 << 26 === -67108864. Actual: ' + (1048575 << 26)); \n} \n\n\nif (2097151 << 26 !== -67108864) { \n $ERROR('#854: 2097151 << 26 === -67108864. Actual: ' + (2097151 << 26)); \n} \n\n\nif (4194303 << 26 !== -67108864) { \n $ERROR('#855: 4194303 << 26 === -67108864. Actual: ' + (4194303 << 26)); \n} \n\n\nif (8388607 << 26 !== -67108864) { \n $ERROR('#856: 8388607 << 26 === -67108864. Actual: ' + (8388607 << 26)); \n} \n\n\nif (16777215 << 26 !== -67108864) { \n $ERROR('#857: 16777215 << 26 === -67108864. Actual: ' + (16777215 << 26)); \n} \n\n\nif (33554431 << 26 !== -67108864) { \n $ERROR('#858: 33554431 << 26 === -67108864. Actual: ' + (33554431 << 26)); \n} \n\n\nif (67108863 << 26 !== -67108864) { \n $ERROR('#859: 67108863 << 26 === -67108864. Actual: ' + (67108863 << 26)); \n} \n\n\nif (134217727 << 26 !== -67108864) { \n $ERROR('#860: 134217727 << 26 === -67108864. Actual: ' + (134217727 << 26)); \n} \n\n\nif (268435455 << 26 !== -67108864) { \n $ERROR('#861: 268435455 << 26 === -67108864. Actual: ' + (268435455 << 26)); \n} \n\n\nif (536870911 << 26 !== -67108864) { \n $ERROR('#862: 536870911 << 26 === -67108864. Actual: ' + (536870911 << 26)); \n} \n\n\nif (1073741823 << 26 !== -67108864) { \n $ERROR('#863: 1073741823 << 26 === -67108864. Actual: ' + (1073741823 << 26)); \n} \n\n\nif (2147483647 << 26 !== -67108864) { \n $ERROR('#864: 2147483647 << 26 === -67108864. Actual: ' + (2147483647 << 26)); \n} \n\n\nif (0 << 27 !== 0) { \n $ERROR('#865: 0 << 27 === 0. Actual: ' + (0 << 27)); \n} \n\n\nif (1 << 27 !== 134217728) { \n $ERROR('#866: 1 << 27 === 134217728. Actual: ' + (1 << 27)); \n} \n\n\nif (3 << 27 !== 402653184) { \n $ERROR('#867: 3 << 27 === 402653184. Actual: ' + (3 << 27)); \n} \n\n\nif (7 << 27 !== 939524096) { \n $ERROR('#868: 7 << 27 === 939524096. Actual: ' + (7 << 27)); \n} \n\n\nif (15 << 27 !== 2013265920) { \n $ERROR('#869: 15 << 27 === 2013265920. Actual: ' + (15 << 27)); \n} \n\n\nif (31 << 27 !== -134217728) { \n $ERROR('#870: 31 << 27 === -134217728. Actual: ' + (31 << 27)); \n} \n\n\nif (63 << 27 !== -134217728) { \n $ERROR('#871: 63 << 27 === -134217728. Actual: ' + (63 << 27)); \n} \n\n\nif (127 << 27 !== -134217728) { \n $ERROR('#872: 127 << 27 === -134217728. Actual: ' + (127 << 27)); \n} \n\n\nif (255 << 27 !== -134217728) { \n $ERROR('#873: 255 << 27 === -134217728. Actual: ' + (255 << 27)); \n} \n\n\nif (511 << 27 !== -134217728) { \n $ERROR('#874: 511 << 27 === -134217728. Actual: ' + (511 << 27)); \n} \n\n\nif (1023 << 27 !== -134217728) { \n $ERROR('#875: 1023 << 27 === -134217728. Actual: ' + (1023 << 27)); \n} \n\n\nif (2047 << 27 !== -134217728) { \n $ERROR('#876: 2047 << 27 === -134217728. Actual: ' + (2047 << 27)); \n} \n\n\nif (4095 << 27 !== -134217728) { \n $ERROR('#877: 4095 << 27 === -134217728. Actual: ' + (4095 << 27)); \n} \n\n\nif (8191 << 27 !== -134217728) { \n $ERROR('#878: 8191 << 27 === -134217728. Actual: ' + (8191 << 27)); \n} \n\n\nif (16383 << 27 !== -134217728) { \n $ERROR('#879: 16383 << 27 === -134217728. Actual: ' + (16383 << 27)); \n} \n\n\nif (32767 << 27 !== -134217728) { \n $ERROR('#880: 32767 << 27 === -134217728. Actual: ' + (32767 << 27)); \n} \n\n\nif (65535 << 27 !== -134217728) { \n $ERROR('#881: 65535 << 27 === -134217728. Actual: ' + (65535 << 27)); \n} \n\n\nif (131071 << 27 !== -134217728) { \n $ERROR('#882: 131071 << 27 === -134217728. Actual: ' + (131071 << 27)); \n} \n\n\nif (262143 << 27 !== -134217728) { \n $ERROR('#883: 262143 << 27 === -134217728. Actual: ' + (262143 << 27)); \n} \n\n\nif (524287 << 27 !== -134217728) { \n $ERROR('#884: 524287 << 27 === -134217728. Actual: ' + (524287 << 27)); \n} \n\n\nif (1048575 << 27 !== -134217728) { \n $ERROR('#885: 1048575 << 27 === -134217728. Actual: ' + (1048575 << 27)); \n} \n\n\nif (2097151 << 27 !== -134217728) { \n $ERROR('#886: 2097151 << 27 === -134217728. Actual: ' + (2097151 << 27)); \n} \n\n\nif (4194303 << 27 !== -134217728) { \n $ERROR('#887: 4194303 << 27 === -134217728. Actual: ' + (4194303 << 27)); \n} \n\n\nif (8388607 << 27 !== -134217728) { \n $ERROR('#888: 8388607 << 27 === -134217728. Actual: ' + (8388607 << 27)); \n} \n\n\nif (16777215 << 27 !== -134217728) { \n $ERROR('#889: 16777215 << 27 === -134217728. Actual: ' + (16777215 << 27)); \n} \n\n\nif (33554431 << 27 !== -134217728) { \n $ERROR('#890: 33554431 << 27 === -134217728. Actual: ' + (33554431 << 27)); \n} \n\n\nif (67108863 << 27 !== -134217728) { \n $ERROR('#891: 67108863 << 27 === -134217728. Actual: ' + (67108863 << 27)); \n} \n\n\nif (134217727 << 27 !== -134217728) { \n $ERROR('#892: 134217727 << 27 === -134217728. Actual: ' + (134217727 << 27)); \n} \n\n\nif (268435455 << 27 !== -134217728) { \n $ERROR('#893: 268435455 << 27 === -134217728. Actual: ' + (268435455 << 27)); \n} \n\n\nif (536870911 << 27 !== -134217728) { \n $ERROR('#894: 536870911 << 27 === -134217728. Actual: ' + (536870911 << 27)); \n} \n\n\nif (1073741823 << 27 !== -134217728) { \n $ERROR('#895: 1073741823 << 27 === -134217728. Actual: ' + (1073741823 << 27)); \n} \n\n\nif (2147483647 << 27 !== -134217728) { \n $ERROR('#896: 2147483647 << 27 === -134217728. Actual: ' + (2147483647 << 27)); \n} \n\n\nif (0 << 28 !== 0) { \n $ERROR('#897: 0 << 28 === 0. Actual: ' + (0 << 28)); \n} \n\n\nif (1 << 28 !== 268435456) { \n $ERROR('#898: 1 << 28 === 268435456. Actual: ' + (1 << 28)); \n} \n\n\nif (3 << 28 !== 805306368) { \n $ERROR('#899: 3 << 28 === 805306368. Actual: ' + (3 << 28)); \n} \n\n\nif (7 << 28 !== 1879048192) { \n $ERROR('#900: 7 << 28 === 1879048192. Actual: ' + (7 << 28)); \n} \n\n\nif (15 << 28 !== -268435456) { \n $ERROR('#901: 15 << 28 === -268435456. Actual: ' + (15 << 28)); \n} \n\n\nif (31 << 28 !== -268435456) { \n $ERROR('#902: 31 << 28 === -268435456. Actual: ' + (31 << 28)); \n} \n\n\nif (63 << 28 !== -268435456) { \n $ERROR('#903: 63 << 28 === -268435456. Actual: ' + (63 << 28)); \n} \n\n\nif (127 << 28 !== -268435456) { \n $ERROR('#904: 127 << 28 === -268435456. Actual: ' + (127 << 28)); \n} \n\n\nif (255 << 28 !== -268435456) { \n $ERROR('#905: 255 << 28 === -268435456. Actual: ' + (255 << 28)); \n} \n\n\nif (511 << 28 !== -268435456) { \n $ERROR('#906: 511 << 28 === -268435456. Actual: ' + (511 << 28)); \n} \n\n\nif (1023 << 28 !== -268435456) { \n $ERROR('#907: 1023 << 28 === -268435456. Actual: ' + (1023 << 28)); \n} \n\n\nif (2047 << 28 !== -268435456) { \n $ERROR('#908: 2047 << 28 === -268435456. Actual: ' + (2047 << 28)); \n} \n\n\nif (4095 << 28 !== -268435456) { \n $ERROR('#909: 4095 << 28 === -268435456. Actual: ' + (4095 << 28)); \n} \n\n\nif (8191 << 28 !== -268435456) { \n $ERROR('#910: 8191 << 28 === -268435456. Actual: ' + (8191 << 28)); \n} \n\n\nif (16383 << 28 !== -268435456) { \n $ERROR('#911: 16383 << 28 === -268435456. Actual: ' + (16383 << 28)); \n} \n\n\nif (32767 << 28 !== -268435456) { \n $ERROR('#912: 32767 << 28 === -268435456. Actual: ' + (32767 << 28)); \n} \n\n\nif (65535 << 28 !== -268435456) { \n $ERROR('#913: 65535 << 28 === -268435456. Actual: ' + (65535 << 28)); \n} \n\n\nif (131071 << 28 !== -268435456) { \n $ERROR('#914: 131071 << 28 === -268435456. Actual: ' + (131071 << 28)); \n} \n\n\nif (262143 << 28 !== -268435456) { \n $ERROR('#915: 262143 << 28 === -268435456. Actual: ' + (262143 << 28)); \n} \n\n\nif (524287 << 28 !== -268435456) { \n $ERROR('#916: 524287 << 28 === -268435456. Actual: ' + (524287 << 28)); \n} \n\n\nif (1048575 << 28 !== -268435456) { \n $ERROR('#917: 1048575 << 28 === -268435456. Actual: ' + (1048575 << 28)); \n} \n\n\nif (2097151 << 28 !== -268435456) { \n $ERROR('#918: 2097151 << 28 === -268435456. Actual: ' + (2097151 << 28)); \n} \n\n\nif (4194303 << 28 !== -268435456) { \n $ERROR('#919: 4194303 << 28 === -268435456. Actual: ' + (4194303 << 28)); \n} \n\n\nif (8388607 << 28 !== -268435456) { \n $ERROR('#920: 8388607 << 28 === -268435456. Actual: ' + (8388607 << 28)); \n} \n\n\nif (16777215 << 28 !== -268435456) { \n $ERROR('#921: 16777215 << 28 === -268435456. Actual: ' + (16777215 << 28)); \n} \n\n\nif (33554431 << 28 !== -268435456) { \n $ERROR('#922: 33554431 << 28 === -268435456. Actual: ' + (33554431 << 28)); \n} \n\n\nif (67108863 << 28 !== -268435456) { \n $ERROR('#923: 67108863 << 28 === -268435456. Actual: ' + (67108863 << 28)); \n} \n\n\nif (134217727 << 28 !== -268435456) { \n $ERROR('#924: 134217727 << 28 === -268435456. Actual: ' + (134217727 << 28)); \n} \n\n\nif (268435455 << 28 !== -268435456) { \n $ERROR('#925: 268435455 << 28 === -268435456. Actual: ' + (268435455 << 28)); \n} \n\n\nif (536870911 << 28 !== -268435456) { \n $ERROR('#926: 536870911 << 28 === -268435456. Actual: ' + (536870911 << 28)); \n} \n\n\nif (1073741823 << 28 !== -268435456) { \n $ERROR('#927: 1073741823 << 28 === -268435456. Actual: ' + (1073741823 << 28)); \n} \n\n\nif (2147483647 << 28 !== -268435456) { \n $ERROR('#928: 2147483647 << 28 === -268435456. Actual: ' + (2147483647 << 28)); \n} \n\n\nif (0 << 29 !== 0) { \n $ERROR('#929: 0 << 29 === 0. Actual: ' + (0 << 29)); \n} \n\n\nif (1 << 29 !== 536870912) { \n $ERROR('#930: 1 << 29 === 536870912. Actual: ' + (1 << 29)); \n} \n\n\nif (3 << 29 !== 1610612736) { \n $ERROR('#931: 3 << 29 === 1610612736. Actual: ' + (3 << 29)); \n} \n\n\nif (7 << 29 !== -536870912) { \n $ERROR('#932: 7 << 29 === -536870912. Actual: ' + (7 << 29)); \n} \n\n\nif (15 << 29 !== -536870912) { \n $ERROR('#933: 15 << 29 === -536870912. Actual: ' + (15 << 29)); \n} \n\n\nif (31 << 29 !== -536870912) { \n $ERROR('#934: 31 << 29 === -536870912. Actual: ' + (31 << 29)); \n} \n\n\nif (63 << 29 !== -536870912) { \n $ERROR('#935: 63 << 29 === -536870912. Actual: ' + (63 << 29)); \n} \n\n\nif (127 << 29 !== -536870912) { \n $ERROR('#936: 127 << 29 === -536870912. Actual: ' + (127 << 29)); \n} \n\n\nif (255 << 29 !== -536870912) { \n $ERROR('#937: 255 << 29 === -536870912. Actual: ' + (255 << 29)); \n} \n\n\nif (511 << 29 !== -536870912) { \n $ERROR('#938: 511 << 29 === -536870912. Actual: ' + (511 << 29)); \n} \n\n\nif (1023 << 29 !== -536870912) { \n $ERROR('#939: 1023 << 29 === -536870912. Actual: ' + (1023 << 29)); \n} \n\n\nif (2047 << 29 !== -536870912) { \n $ERROR('#940: 2047 << 29 === -536870912. Actual: ' + (2047 << 29)); \n} \n\n\nif (4095 << 29 !== -536870912) { \n $ERROR('#941: 4095 << 29 === -536870912. Actual: ' + (4095 << 29)); \n} \n\n\nif (8191 << 29 !== -536870912) { \n $ERROR('#942: 8191 << 29 === -536870912. Actual: ' + (8191 << 29)); \n} \n\n\nif (16383 << 29 !== -536870912) { \n $ERROR('#943: 16383 << 29 === -536870912. Actual: ' + (16383 << 29)); \n} \n\n\nif (32767 << 29 !== -536870912) { \n $ERROR('#944: 32767 << 29 === -536870912. Actual: ' + (32767 << 29)); \n} \n\n\nif (65535 << 29 !== -536870912) { \n $ERROR('#945: 65535 << 29 === -536870912. Actual: ' + (65535 << 29)); \n} \n\n\nif (131071 << 29 !== -536870912) { \n $ERROR('#946: 131071 << 29 === -536870912. Actual: ' + (131071 << 29)); \n} \n\n\nif (262143 << 29 !== -536870912) { \n $ERROR('#947: 262143 << 29 === -536870912. Actual: ' + (262143 << 29)); \n} \n\n\nif (524287 << 29 !== -536870912) { \n $ERROR('#948: 524287 << 29 === -536870912. Actual: ' + (524287 << 29)); \n} \n\n\nif (1048575 << 29 !== -536870912) { \n $ERROR('#949: 1048575 << 29 === -536870912. Actual: ' + (1048575 << 29)); \n} \n\n\nif (2097151 << 29 !== -536870912) { \n $ERROR('#950: 2097151 << 29 === -536870912. Actual: ' + (2097151 << 29)); \n} \n\n\nif (4194303 << 29 !== -536870912) { \n $ERROR('#951: 4194303 << 29 === -536870912. Actual: ' + (4194303 << 29)); \n} \n\n\nif (8388607 << 29 !== -536870912) { \n $ERROR('#952: 8388607 << 29 === -536870912. Actual: ' + (8388607 << 29)); \n} \n\n\nif (16777215 << 29 !== -536870912) { \n $ERROR('#953: 16777215 << 29 === -536870912. Actual: ' + (16777215 << 29)); \n} \n\n\nif (33554431 << 29 !== -536870912) { \n $ERROR('#954: 33554431 << 29 === -536870912. Actual: ' + (33554431 << 29)); \n} \n\n\nif (67108863 << 29 !== -536870912) { \n $ERROR('#955: 67108863 << 29 === -536870912. Actual: ' + (67108863 << 29)); \n} \n\n\nif (134217727 << 29 !== -536870912) { \n $ERROR('#956: 134217727 << 29 === -536870912. Actual: ' + (134217727 << 29)); \n} \n\n\nif (268435455 << 29 !== -536870912) { \n $ERROR('#957: 268435455 << 29 === -536870912. Actual: ' + (268435455 << 29)); \n} \n\n\nif (536870911 << 29 !== -536870912) { \n $ERROR('#958: 536870911 << 29 === -536870912. Actual: ' + (536870911 << 29)); \n} \n\n\nif (1073741823 << 29 !== -536870912) { \n $ERROR('#959: 1073741823 << 29 === -536870912. Actual: ' + (1073741823 << 29)); \n} \n\n\nif (2147483647 << 29 !== -536870912) { \n $ERROR('#960: 2147483647 << 29 === -536870912. Actual: ' + (2147483647 << 29)); \n} \n\n\nif (0 << 30 !== 0) { \n $ERROR('#961: 0 << 30 === 0. Actual: ' + (0 << 30)); \n} \n\n\nif (1 << 30 !== 1073741824) { \n $ERROR('#962: 1 << 30 === 1073741824. Actual: ' + (1 << 30)); \n} \n\n\nif (3 << 30 !== -1073741824) { \n $ERROR('#963: 3 << 30 === -1073741824. Actual: ' + (3 << 30)); \n} \n\n\nif (7 << 30 !== -1073741824) { \n $ERROR('#964: 7 << 30 === -1073741824. Actual: ' + (7 << 30)); \n} \n\n\nif (15 << 30 !== -1073741824) { \n $ERROR('#965: 15 << 30 === -1073741824. Actual: ' + (15 << 30)); \n} \n\n\nif (31 << 30 !== -1073741824) { \n $ERROR('#966: 31 << 30 === -1073741824. Actual: ' + (31 << 30)); \n} \n\n\nif (63 << 30 !== -1073741824) { \n $ERROR('#967: 63 << 30 === -1073741824. Actual: ' + (63 << 30)); \n} \n\n\nif (127 << 30 !== -1073741824) { \n $ERROR('#968: 127 << 30 === -1073741824. Actual: ' + (127 << 30)); \n} \n\n\nif (255 << 30 !== -1073741824) { \n $ERROR('#969: 255 << 30 === -1073741824. Actual: ' + (255 << 30)); \n} \n\n\nif (511 << 30 !== -1073741824) { \n $ERROR('#970: 511 << 30 === -1073741824. Actual: ' + (511 << 30)); \n} \n\n\nif (1023 << 30 !== -1073741824) { \n $ERROR('#971: 1023 << 30 === -1073741824. Actual: ' + (1023 << 30)); \n} \n\n\nif (2047 << 30 !== -1073741824) { \n $ERROR('#972: 2047 << 30 === -1073741824. Actual: ' + (2047 << 30)); \n} \n\n\nif (4095 << 30 !== -1073741824) { \n $ERROR('#973: 4095 << 30 === -1073741824. Actual: ' + (4095 << 30)); \n} \n\n\nif (8191 << 30 !== -1073741824) { \n $ERROR('#974: 8191 << 30 === -1073741824. Actual: ' + (8191 << 30)); \n} \n\n\nif (16383 << 30 !== -1073741824) { \n $ERROR('#975: 16383 << 30 === -1073741824. Actual: ' + (16383 << 30)); \n} \n\n\nif (32767 << 30 !== -1073741824) { \n $ERROR('#976: 32767 << 30 === -1073741824. Actual: ' + (32767 << 30)); \n} \n\n\nif (65535 << 30 !== -1073741824) { \n $ERROR('#977: 65535 << 30 === -1073741824. Actual: ' + (65535 << 30)); \n} \n\n\nif (131071 << 30 !== -1073741824) { \n $ERROR('#978: 131071 << 30 === -1073741824. Actual: ' + (131071 << 30)); \n} \n\n\nif (262143 << 30 !== -1073741824) { \n $ERROR('#979: 262143 << 30 === -1073741824. Actual: ' + (262143 << 30)); \n} \n\n\nif (524287 << 30 !== -1073741824) { \n $ERROR('#980: 524287 << 30 === -1073741824. Actual: ' + (524287 << 30)); \n} \n\n\nif (1048575 << 30 !== -1073741824) { \n $ERROR('#981: 1048575 << 30 === -1073741824. Actual: ' + (1048575 << 30)); \n} \n\n\nif (2097151 << 30 !== -1073741824) { \n $ERROR('#982: 2097151 << 30 === -1073741824. Actual: ' + (2097151 << 30)); \n} \n\n\nif (4194303 << 30 !== -1073741824) { \n $ERROR('#983: 4194303 << 30 === -1073741824. Actual: ' + (4194303 << 30)); \n} \n\n\nif (8388607 << 30 !== -1073741824) { \n $ERROR('#984: 8388607 << 30 === -1073741824. Actual: ' + (8388607 << 30)); \n} \n\n\nif (16777215 << 30 !== -1073741824) { \n $ERROR('#985: 16777215 << 30 === -1073741824. Actual: ' + (16777215 << 30)); \n} \n\n\nif (33554431 << 30 !== -1073741824) { \n $ERROR('#986: 33554431 << 30 === -1073741824. Actual: ' + (33554431 << 30)); \n} \n\n\nif (67108863 << 30 !== -1073741824) { \n $ERROR('#987: 67108863 << 30 === -1073741824. Actual: ' + (67108863 << 30)); \n} \n\n\nif (134217727 << 30 !== -1073741824) { \n $ERROR('#988: 134217727 << 30 === -1073741824. Actual: ' + (134217727 << 30)); \n} \n\n\nif (268435455 << 30 !== -1073741824) { \n $ERROR('#989: 268435455 << 30 === -1073741824. Actual: ' + (268435455 << 30)); \n} \n\n\nif (536870911 << 30 !== -1073741824) { \n $ERROR('#990: 536870911 << 30 === -1073741824. Actual: ' + (536870911 << 30)); \n} \n\n\nif (1073741823 << 30 !== -1073741824) { \n $ERROR('#991: 1073741823 << 30 === -1073741824. Actual: ' + (1073741823 << 30)); \n} \n\n\nif (2147483647 << 30 !== -1073741824) { \n $ERROR('#992: 2147483647 << 30 === -1073741824. Actual: ' + (2147483647 << 30)); \n} \n\n\nif (0 << 31 !== 0) { \n $ERROR('#993: 0 << 31 === 0. Actual: ' + (0 << 31)); \n} \n\n\nif (1 << 31 !== -2147483648) { \n $ERROR('#994: 1 << 31 === -2147483648. Actual: ' + (1 << 31)); \n} \n\n\nif (3 << 31 !== -2147483648) { \n $ERROR('#995: 3 << 31 === -2147483648. Actual: ' + (3 << 31)); \n} \n\n\nif (7 << 31 !== -2147483648) { \n $ERROR('#996: 7 << 31 === -2147483648. Actual: ' + (7 << 31)); \n} \n\n\nif (15 << 31 !== -2147483648) { \n $ERROR('#997: 15 << 31 === -2147483648. Actual: ' + (15 << 31)); \n} \n\n\nif (31 << 31 !== -2147483648) { \n $ERROR('#998: 31 << 31 === -2147483648. Actual: ' + (31 << 31)); \n} \n\n\nif (63 << 31 !== -2147483648) { \n $ERROR('#999: 63 << 31 === -2147483648. Actual: ' + (63 << 31)); \n} \n\n\nif (127 << 31 !== -2147483648) { \n $ERROR('#1000: 127 << 31 === -2147483648. Actual: ' + (127 << 31)); \n} \n\n\nif (255 << 31 !== -2147483648) { \n $ERROR('#1001: 255 << 31 === -2147483648. Actual: ' + (255 << 31)); \n} \n\n\nif (511 << 31 !== -2147483648) { \n $ERROR('#1002: 511 << 31 === -2147483648. Actual: ' + (511 << 31)); \n} \n\n\nif (1023 << 31 !== -2147483648) { \n $ERROR('#1003: 1023 << 31 === -2147483648. Actual: ' + (1023 << 31)); \n} \n\n\nif (2047 << 31 !== -2147483648) { \n $ERROR('#1004: 2047 << 31 === -2147483648. Actual: ' + (2047 << 31)); \n} \n\n\nif (4095 << 31 !== -2147483648) { \n $ERROR('#1005: 4095 << 31 === -2147483648. Actual: ' + (4095 << 31)); \n} \n\n\nif (8191 << 31 !== -2147483648) { \n $ERROR('#1006: 8191 << 31 === -2147483648. Actual: ' + (8191 << 31)); \n} \n\n\nif (16383 << 31 !== -2147483648) { \n $ERROR('#1007: 16383 << 31 === -2147483648. Actual: ' + (16383 << 31)); \n} \n\n\nif (32767 << 31 !== -2147483648) { \n $ERROR('#1008: 32767 << 31 === -2147483648. Actual: ' + (32767 << 31)); \n} \n\n\nif (65535 << 31 !== -2147483648) { \n $ERROR('#1009: 65535 << 31 === -2147483648. Actual: ' + (65535 << 31)); \n} \n\n\nif (131071 << 31 !== -2147483648) { \n $ERROR('#1010: 131071 << 31 === -2147483648. Actual: ' + (131071 << 31)); \n} \n\n\nif (262143 << 31 !== -2147483648) { \n $ERROR('#1011: 262143 << 31 === -2147483648. Actual: ' + (262143 << 31)); \n} \n\n\nif (524287 << 31 !== -2147483648) { \n $ERROR('#1012: 524287 << 31 === -2147483648. Actual: ' + (524287 << 31)); \n} \n\n\nif (1048575 << 31 !== -2147483648) { \n $ERROR('#1013: 1048575 << 31 === -2147483648. Actual: ' + (1048575 << 31)); \n} \n\n\nif (2097151 << 31 !== -2147483648) { \n $ERROR('#1014: 2097151 << 31 === -2147483648. Actual: ' + (2097151 << 31)); \n} \n\n\nif (4194303 << 31 !== -2147483648) { \n $ERROR('#1015: 4194303 << 31 === -2147483648. Actual: ' + (4194303 << 31)); \n} \n\n\nif (8388607 << 31 !== -2147483648) { \n $ERROR('#1016: 8388607 << 31 === -2147483648. Actual: ' + (8388607 << 31)); \n} \n\n\nif (16777215 << 31 !== -2147483648) { \n $ERROR('#1017: 16777215 << 31 === -2147483648. Actual: ' + (16777215 << 31)); \n} \n\n\nif (33554431 << 31 !== -2147483648) { \n $ERROR('#1018: 33554431 << 31 === -2147483648. Actual: ' + (33554431 << 31)); \n} \n\n\nif (67108863 << 31 !== -2147483648) { \n $ERROR('#1019: 67108863 << 31 === -2147483648. Actual: ' + (67108863 << 31)); \n} \n\n\nif (134217727 << 31 !== -2147483648) { \n $ERROR('#1020: 134217727 << 31 === -2147483648. Actual: ' + (134217727 << 31)); \n} \n\n\nif (268435455 << 31 !== -2147483648) { \n $ERROR('#1021: 268435455 << 31 === -2147483648. Actual: ' + (268435455 << 31)); \n} \n\n\nif (536870911 << 31 !== -2147483648) { \n $ERROR('#1022: 536870911 << 31 === -2147483648. Actual: ' + (536870911 << 31)); \n} \n\n\nif (1073741823 << 31 !== -2147483648) { \n $ERROR('#1023: 1073741823 << 31 === -2147483648. Actual: ' + (1073741823 << 31)); \n} \n\n\nif (2147483647 << 31 !== -2147483648) { \n $ERROR('#1024: 2147483647 << 31 === -2147483648. Actual: ' + (2147483647 << 31)); \n} \n",
+ "id": "S11.7.1_A4_T4"
+ },
+ {
+ "section": "11.7.1, 9.5",
+ "description": "Checking boundary points",
+ "test": "//CHECK#1\nif (2147483648.1 << 0 !== -2147483648) { \n $ERROR('#1: 2147483648.1 << 0 === -2147483648. Actual: ' + (2147483648.1 << 0)); \n} \n\n//CHECK#2\nif (4294967296.1 << 0 !== 0) { \n $ERROR('#2: 4294967296.1 << 0 === 0. Actual: ' + (4294967296.1 << 0)); \n} \n\n//CHECK#3\nif (6442450944.1 << 0 !== -2147483648) { \n $ERROR('#3: 6442450944.1 << 0 === -2147483648. Actual: ' + (6442450944.1 << 0)); \n} \n\n//CHECK#4\nif (4294967295.1 << 0 !== -1) { \n $ERROR('#4: 4294967295.1 << 0 === -1. Actual: ' + (4294967295.1 << 0)); \n} \n\n//CHECK#5\nif (6442450943.1 << 0 !== 2147483647) { \n $ERROR('#5: 6442450943.1 << 0 === 2147483647. Actual: ' + (6442450943.1 << 0)); \n} \n\n//CHECK#6\nif (-2147483649.1 << 0 !== 2147483647) { \n $ERROR('#6: -2147483649.1 << 0 === 2147483647. Actual: ' + (-2147483649.1 << 0)); \n} \n\n//CHECK#7\nif (-4294967297.1 << 0 !== -1) { \n $ERROR('#7: -4294967297.1 << 0 === -1. Actual: ' + (-4294967297.1 << 0)); \n} \n\n//CHECK#8\nif (-6442450945.1 << 0 !== 2147483647) { \n $ERROR('#8: -6442450945.1 << 0 === 2147483647. Actual: ' + (-6442450945.1 << 0)); \n} \n\n//CHECK#9\nif (-4294967296.1 << 0 !== 0) { \n $ERROR('#9: -4294967296.1 << 0 === 0 . Actual: ' + (-4294967296.1 << 0)); \n} \n\n//CHECK#10\nif (-6442450944.1 << 0 !== -2147483648) { \n $ERROR('#10: -6442450944.1 << 0 === -2147483648. Actual: ' + (-6442450944.1 << 0)); \n} \n",
+ "id": "S11.7.1_A5.1_T1"
+ },
+ {
+ "section": "11.7.1, 9.5",
+ "description": "Checking distinct points",
+ "test": "//CHECK#1\nif (1 << -32.1 !== 1) { \n $ERROR('#1: 1 << -32.1 === 1. Actual: ' + (1 << -32.1)); \n} \n\n//CHECK#2\nif (1 << -31.1 !== 2) { \n $ERROR('#2: 1 << -31.1 === 2. Actual: ' + (1 << -31.1)); \n} \n\n//CHECK#3\nif (1 << -30.1 !== 4) { \n $ERROR('#3: 1 << -30.1 === 4. Actual: ' + (1 << -30.1)); \n} \n\n//CHECK#4\nif (1 << -29.1 !== 8) { \n $ERROR('#4: 1 << -29.1 === 8. Actual: ' + (1 << -29.1)); \n} \n\n//CHECK#5\nif (1 << -28.1 !== 16) { \n $ERROR('#5: 1 << -28.1 === 16. Actual: ' + (1 << -28.1)); \n} \n\n//CHECK#6\nif (1 << -27.1 !== 32) { \n $ERROR('#6: 1 << -27.1 === 32. Actual: ' + (1 << -27.1)); \n} \n\n//CHECK#7\nif (1 << -26.1 !== 64) { \n $ERROR('#7: 1 << -26.1 === 64. Actual: ' + (1 << -26.1)); \n} \n\n//CHECK#8\nif (1 << -25.1 !== 128) { \n $ERROR('#8: 1 << -25.1 === 128. Actual: ' + (1 << -25.1)); \n} \n\n//CHECK#9\nif (1 << -24.1 !== 256) { \n $ERROR('#9: 1 << -24.1 === 256. Actual: ' + (1 << -24.1)); \n} \n\n//CHECK#10\nif (1 << -23.1 !== 512) { \n $ERROR('#10: 1 << -23.1 === 512. Actual: ' + (1 << -23.1)); \n} \n\n//CHECK#11\nif (1 << -22.1 !== 1024) { \n $ERROR('#11: 1 << -22.1 === 1024. Actual: ' + (1 << -22.1)); \n} \n\n//CHECK#12\nif (1 << -21.1 !== 2048) { \n $ERROR('#12: 1 << -21.1 === 2048. Actual: ' + (1 << -21.1)); \n} \n\n//CHECK#13\nif (1 << -20.1 !== 4096) { \n $ERROR('#13: 1 << -20.1 === 4096. Actual: ' + (1 << -20.1)); \n} \n\n//CHECK#14\nif (1 << -19.1 !== 8192) { \n $ERROR('#14: 1 << -19.1 === 8192. Actual: ' + (1 << -19.1)); \n} \n\n//CHECK#15\nif (1 << -18.1 !== 16384) { \n $ERROR('#15: 1 << -18.1 === 16384. Actual: ' + (1 << -18.1)); \n} \n\n//CHECK#16\nif (1 << -17.1 !== 32768) { \n $ERROR('#16: 1 << -17.1 === 32768. Actual: ' + (1 << -17.1)); \n} \n\n//CHECK#17\nif (1 << -16.1 !== 65536) { \n $ERROR('#17: 1 << -16.1 === 65536. Actual: ' + (1 << -16.1)); \n} \n\n//CHECK#18\nif (1 << -15.1 !== 131072) { \n $ERROR('#18: 1 << -15.1 === 131072. Actual: ' + (1 << -15.1)); \n} \n\n//CHECK#19\nif (1 << -14.1 !== 262144) { \n $ERROR('#19: 1 << -14.1 === 262144. Actual: ' + (1 << -14.1)); \n} \n\n//CHECK#20\nif (1 << -13.1 !== 524288) { \n $ERROR('#20: 1 << -13.1 === 524288. Actual: ' + (1 << -13.1)); \n} \n\n//CHECK#21\nif (1 << -12.1 !== 1048576) { \n $ERROR('#21: 1 << -12.1 === 1048576. Actual: ' + (1 << -12.1)); \n} \n\n//CHECK#22\nif (1 << -11.1 !== 2097152) { \n $ERROR('#22: 1 << -11.1 === 2097152. Actual: ' + (1 << -11.1)); \n} \n\n//CHECK#23\nif (1 << -10.1 !== 4194304) { \n $ERROR('#23: 1 << -10.1 === 4194304. Actual: ' + (1 << -10.1)); \n} \n\n//CHECK#24\nif (1 << -9.1 !== 8388608) { \n $ERROR('#24: 1 << -9.1 === 8388608. Actual: ' + (1 << -9.1)); \n} \n\n//CHECK#25\nif (1 << -8.1 !== 16777216) { \n $ERROR('#25: 1 << -8.1 === 16777216. Actual: ' + (1 << -8.1)); \n} \n\n//CHECK#26\nif (1 << -7.1 !== 33554432) { \n $ERROR('#26: 1 << -7.1 === 33554432. Actual: ' + (1 << -7.1)); \n} \n\n//CHECK#27\nif (1 << -6.1 !== 67108864) { \n $ERROR('#27: 1 << -6.1 === 67108864. Actual: ' + (1 << -6.1)); \n} \n\n//CHECK#28\nif (1 << -5.1 !== 134217728) { \n $ERROR('#28: 1 << -5.1 === 134217728. Actual: ' + (1 << -5.1)); \n} \n\n//CHECK#29\nif (1 << -4.1 !== 268435456) { \n $ERROR('#29: 1 << -4.1 === 268435456. Actual: ' + (1 << -4.1)); \n} \n\n//CHECK#30\nif (1 << -3.1 !== 536870912) { \n $ERROR('#30: 1 << -3.1 === 536870912. Actual: ' + (1 << -3.1)); \n} \n\n//CHECK#31\nif (1 << -2.1 !== 1073741824) { \n $ERROR('#31: 1 << -2.1 === 1073741824. Actual: ' + (1 << -2.1)); \n} \n\n//CHECK#32\nif (1 << -1.1 !== -2147483648) { \n $ERROR('#32: 1 << -1.1 === -2147483648. Actual: ' + (1 << -1.1)); \n} \n\n//CHECK#33\nif (1 << 32.1 !== 1) { \n $ERROR('#33: 1 << 32.1 === 1. Actual: ' + (1 << 32.1)); \n} \n\n//CHECK#34\nif (1 << 33.1 !== 2) { \n $ERROR('#34: 1 << 33.1 === 2. Actual: ' + (1 << 33.1)); \n} \n\n//CHECK#35\nif (1 << 34.1 !== 4) { \n $ERROR('#35: 1 << 34.1 === 4. Actual: ' + (1 << 34.1)); \n} \n\n//CHECK#36\nif (1 << 35.1 !== 8) { \n $ERROR('#36: 1 << 35.1 === 8. Actual: ' + (1 << 35.1)); \n} \n\n//CHECK#37\nif (1 << 36.1 !== 16) { \n $ERROR('#37: 1 << 36.1 === 16. Actual: ' + (1 << 36.1)); \n} \n\n//CHECK#38\nif (1 << 37.1 !== 32) { \n $ERROR('#38: 1 << 37.1 === 32. Actual: ' + (1 << 37.1)); \n} \n\n//CHECK#39\nif (1 << 38.1 !== 64) { \n $ERROR('#39: 1 << 38.1 === 64. Actual: ' + (1 << 38.1)); \n} \n\n//CHECK#40\nif (1 << 39.1 !== 128) { \n $ERROR('#40: 1 << 39.1 === 128. Actual: ' + (1 << 39.1)); \n} \n\n//CHECK#41\nif (1 << 40.1 !== 256) { \n $ERROR('#41: 1 << 40.1 === 256. Actual: ' + (1 << 40.1)); \n} \n\n//CHECK#42\nif (1 << 41.1 !== 512) { \n $ERROR('#42: 1 << 41.1 === 512. Actual: ' + (1 << 41.1)); \n} \n\n//CHECK#43\nif (1 << 42.1 !== 1024) { \n $ERROR('#43: 1 << 42.1 === 1024. Actual: ' + (1 << 42.1)); \n} \n\n//CHECK#44\nif (1 << 43.1 !== 2048) { \n $ERROR('#44: 1 << 43.1 === 2048. Actual: ' + (1 << 43.1)); \n} \n\n//CHECK#45\nif (1 << 44.1 !== 4096) { \n $ERROR('#45: 1 << 44.1 === 4096. Actual: ' + (1 << 44.1)); \n} \n\n//CHECK#46\nif (1 << 45.1 !== 8192) { \n $ERROR('#46: 1 << 45.1 === 8192. Actual: ' + (1 << 45.1)); \n} \n\n//CHECK#47\nif (1 << 46.1 !== 16384) { \n $ERROR('#47: 1 << 46.1 === 16384. Actual: ' + (1 << 46.1)); \n} \n\n//CHECK#48\nif (1 << 47.1 !== 32768) { \n $ERROR('#48: 1 << 47.1 === 32768. Actual: ' + (1 << 47.1)); \n} \n\n//CHECK#49\nif (1 << 48.1 !== 65536) { \n $ERROR('#49: 1 << 48.1 === 65536. Actual: ' + (1 << 48.1)); \n} \n\n//CHECK#50\nif (1 << 49.1 !== 131072) { \n $ERROR('#50: 1 << 49.1 === 131072. Actual: ' + (1 << 49.1)); \n} \n\n//CHECK#51\nif (1 << 50.1 !== 262144) { \n $ERROR('#51: 1 << 50.1 === 262144. Actual: ' + (1 << 50.1)); \n} \n\n//CHECK#52\nif (1 << 51.1 !== 524288) { \n $ERROR('#52: 1 << 51.1 === 524288. Actual: ' + (1 << 51.1)); \n} \n\n//CHECK#53\nif (1 << 52.1 !== 1048576) { \n $ERROR('#53: 1 << 52.1 === 1048576. Actual: ' + (1 << 52.1)); \n} \n\n//CHECK#54\nif (1 << 53.1 !== 2097152) { \n $ERROR('#54: 1 << 53.1 === 2097152. Actual: ' + (1 << 53.1)); \n} \n\n//CHECK#55\nif (1 << 54.1 !== 4194304) { \n $ERROR('#55: 1 << 54.1 === 4194304. Actual: ' + (1 << 54.1)); \n} \n\n//CHECK#56\nif (1 << 55.1 !== 8388608) { \n $ERROR('#56: 1 << 55.1 === 8388608. Actual: ' + (1 << 55.1)); \n} \n\n//CHECK#57\nif (1 << 56.1 !== 16777216) { \n $ERROR('#57: 1 << 56.1 === 16777216. Actual: ' + (1 << 56.1)); \n} \n\n//CHECK#58\nif (1 << 57.1 !== 33554432) { \n $ERROR('#58: 1 << 57.1 === 33554432. Actual: ' + (1 << 57.1)); \n} \n\n//CHECK#59\nif (1 << 58.1 !== 67108864) { \n $ERROR('#59: 1 << 58.1 === 67108864. Actual: ' + (1 << 58.1)); \n} \n\n//CHECK#60\nif (1 << 59.1 !== 134217728) { \n $ERROR('#60: 1 << 59.1 === 134217728. Actual: ' + (1 << 59.1)); \n} \n\n//CHECK#61\nif (1 << 60.1 !== 268435456) { \n $ERROR('#61: 1 << 60.1 === 268435456. Actual: ' + (1 << 60.1)); \n} \n\n//CHECK#62\nif (1 << 61.1 !== 536870912) { \n $ERROR('#62: 1 << 61.1 === 536870912. Actual: ' + (1 << 61.1)); \n} \n\n//CHECK#63\nif (1 << 62.1 !== 1073741824) { \n $ERROR('#63: 1 << 62.1 === 1073741824. Actual: ' + (1 << 62.1)); \n} \n\n//CHECK#64\nif (1 << 63.1 !== -2147483648) { \n $ERROR('#64: 1 << 63.1 === -2147483648. Actual: ' + (1 << 63.1)); \n} \n",
+ "id": "S11.7.1_A5.2_T1"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/11.7.2_The_Sign_Left_shift_Operator.json b/website/resources/scripts/testcases2/11.7.2_The_Sign_Left_shift_Operator.json
new file mode 100644
index 000000000..9e6df4d54
--- /dev/null
+++ b/website/resources/scripts/testcases2/11.7.2_The_Sign_Left_shift_Operator.json
@@ -0,0 +1,182 @@
+{
+ "testCollection": {
+ "name": "11.7.2_The_Sign_Left_shift_Operator",
+ "numTests": 29,
+ "tests": [
+ {
+ "section": "11.7.2, 7.2, 7.3",
+ "description": "Checking by using eval",
+ "test": "//CHECK#1\nif (eval(\"-4\\u0009>>\\u00091\") !== -2) {\n $ERROR('#1: -4\\\\u0009>>\\\\u00091 === -2');\n}\n\n//CHECK#2\nif (eval(\"-4\\u000B>>\\u000B1\") !== -2) {\n $ERROR('#2: -4\\\\u000B>>\\\\u000B1 === -2'); \n}\n\n//CHECK#3\nif (eval(\"-4\\u000C>>\\u000C1\") !== -2) {\n $ERROR('#3: -4\\\\u000C>>\\\\u000C1 === -2');\n}\n\n//CHECK#4\nif (eval(\"-4\\u0020>>\\u00201\") !== -2) {\n $ERROR('#4: -4\\\\u0020>>\\\\u00201 === -2');\n}\n\n//CHECK#5\nif (eval(\"-4\\u00A0>>\\u00A01\") !== -2) {\n $ERROR('#5: -4\\\\u00A0>>\\\\u00A01 === -2');\n}\n\n//CHECK#6\nif (eval(\"-4\\u000A>>\\u000A1\") !== -2) {\n $ERROR('#6: -4\\\\u000A>>\\\\u000A1 === -2'); \n}\n\n//CHECK#7\nif (eval(\"-4\\u000D>>\\u000D1\") !== -2) {\n $ERROR('#7: -4\\\\u000D>>\\\\u000D1 === -2');\n}\n\n//CHECK#8\nif (eval(\"-4\\u2028>>\\u20281\") !== -2) {\n $ERROR('#8: -4\\\\u2028>>\\\\u20281 === -2');\n}\n\n//CHECK#9\nif (eval(\"-4\\u2029>>\\u20291\") !== -2) {\n $ERROR('#9: -4\\\\u2029>>\\\\u20291 === -2');\n}\n\n//CHECK#10\nif (eval(\"-4\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u2029>>\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u20291\") !== -2) {\n $ERROR('#10: -4\\\\u0009\\\\u000B\\\\u000C\\\\u0020\\\\u00A0\\\\u000A\\\\u000D\\\\u2028\\\\u2029>>\\\\u0009\\\\u000B\\\\u000C\\\\u0020\\\\u00A0\\\\u000A\\\\u000D\\\\u2028\\\\u20291 === -2');\n}\n",
+ "id": "S11.7.2_A1"
+ },
+ {
+ "section": "11.7.2",
+ "description": "Either Type is not Reference or GetBase is not null",
+ "test": "//CHECK#1\nif (-4 >> 1 !== -2) {\n $ERROR('#1: -4 >> 1 === -2. Actual: ' + (-4 >> 1));\n}\n\n//CHECK#2\nvar x = -4;\nif (x >> 1 !== -2) {\n $ERROR('#2: var x = -4; x >> 1 === -2. Actual: ' + (x >> 1));\n}\n\n//CHECK#3\nvar y = 1;\nif (-4 >> y !== -2) {\n $ERROR('#3: var y = 1; -4 >> y === -2. Actual: ' + (-4 >> y));\n}\n\n//CHECK#4\nvar x = -4;\nvar y = 1;\nif (x >> y !== -2) {\n $ERROR('#4: var x = -4; var y = 1; x >> y === -2. Actual: ' + (x >> y));\n}\n\n//CHECK#5\nvar objectx = new Object();\nvar objecty = new Object();\nobjectx.prop = -4;\nobjecty.prop = 1;\nif (objectx.prop >> objecty.prop !== -2) {\n $ERROR('#5: var objectx = new Object(); var objecty = new Object(); objectx.prop = -4; objecty.prop = 1; objectx.prop >> objecty.prop === -2. Actual: ' + (objectx.prop >> objecty.prop));\n}\n",
+ "id": "S11.7.2_A2.1_T1"
+ },
+ {
+ "section": "11.7.2",
+ "description": "If GetBase(x) is null, throw ReferenceError",
+ "test": "//CHECK#1\ntry {\n x >> 1;\n $ERROR('#1.1: x >> 1 throw ReferenceError. Actual: ' + (x >> 1)); \n}\ncatch (e) {\n if ((e instanceof ReferenceError) !== true) {\n $ERROR('#1.2: x >> 1 throw ReferenceError. Actual: ' + (e)); \n }\n}\n\n",
+ "id": "S11.7.2_A2.1_T2"
+ },
+ {
+ "section": "11.7.2",
+ "description": "If GetBase(y) is null, throw ReferenceError",
+ "test": "//CHECK#1\ntry {\n 1 >> y;\n $ERROR('#1.1: 1 >> y throw ReferenceError. Actual: ' + (1 >> y)); \n}\ncatch (e) {\n if ((e instanceof ReferenceError) !== true) {\n $ERROR('#1.2: 1 >> y throw ReferenceError. Actual: ' + (e)); \n }\n}\n\n",
+ "id": "S11.7.2_A2.1_T3"
+ },
+ {
+ "section": "11.7.2, 8.6.2.6",
+ "description": "If Type(value) is Object, evaluate ToPrimitive(value, Number)",
+ "test": "//CHECK#1\nif ({valueOf: function() {return -4}} >> 1 !== -2) {\n $ERROR('#1: {valueOf: function() {return -4}} >> 1 === -2. Actual: ' + ({valueOf: function() {return -4}} >> 1));\n}\n\n//CHECK#2\nif ({valueOf: function() {return -4}, toString: function() {return 0}} >> 1 !== -2) {\n $ERROR('#2: {valueOf: function() {return -4}, toString: function() {return 0}} >> 1 === -2. Actual: ' + ({valueOf: function() {return -4}, toString: function() {return 0}} >> 1));\n}\n\n//CHECK#3\nif ({valueOf: function() {return -4}, toString: function() {return {}}} >> 1 !== -2) {\n $ERROR('#3: {valueOf: function() {return -4}, toString: function() {return {}}} >> 1 === -2. Actual: ' + ({valueOf: function() {return -4}, toString: function() {return {}}} >> 1));\n}\n\n//CHECK#4\ntry {\n if ({valueOf: function() {return -4}, toString: function() {throw \"error\"}} >> 1 !== -2) {\n $ERROR('#4.1: {valueOf: function() {return -4}, toString: function() {throw \"error\"}} >> 1 === -2. Actual: ' + ({valueOf: function() {return -4}, toString: function() {throw \"error\"}} >> 1));\n }\n}\ncatch (e) {\n if (e === \"error\") {\n $ERROR('#4.2: {valueOf: function() {return -4}, toString: function() {throw \"error\"}} >> 1 not throw \"error\"');\n } else {\n $ERROR('#4.3: {valueOf: function() {return -4}, toString: function() {throw \"error\"}} >> 1 not throw Error. Actual: ' + (e));\n }\n}\n\n//CHECK#5\nif (-4 >> {toString: function() {return 1}} !== -2) {\n $ERROR('#5: -4 >> {toString: function() {return 1}} === -2. Actual: ' + (-4 >> {toString: function() {return 1}}));\n}\n\n//CHECK#6\nif (-4 >> {valueOf: function() {return {}}, toString: function() {return 1}} !== -2) {\n $ERROR('#6: -4 >> {valueOf: function() {return {}}, toString: function() {return 1}} === -2. Actual: ' + (-4 >> {valueOf: function() {return {}}, toString: function() {return 1}}));\n}\n\n//CHECK#7\ntry {\n -4 >> {valueOf: function() {throw \"error\"}, toString: function() {return 1}};\n $ERROR('#7.1: -4 >> {valueOf: function() {throw \"error\"}, toString: function() {return 1}} throw \"error\". Actual: ' + (-4 >> {valueOf: function() {throw \"error\"}, toString: function() {return 1}}));\n} \ncatch (e) {\n if (e !== \"error\") {\n $ERROR('#7.2: -4 >> {valueOf: function() {throw \"error\"}, toString: function() {return 1}} throw \"error\". Actual: ' + (e));\n } \n}\n\n//CHECK#8\ntry {\n -4 >> {valueOf: function() {return {}}, toString: function() {return {}}};\n $ERROR('#8.1: -4 >> {valueOf: function() {return {}}, toString: function() {return {}}} throw TypeError. Actual: ' + (-4 >> {valueOf: function() {return {}}, toString: function() {return {}}}));\n} \ncatch (e) {\n if ((e instanceof TypeError) !== true) {\n $ERROR('#8.2: -4 >> {valueOf: function() {return {}}, toString: function() {return {}}} throw TypeError. Actual: ' + (e));\n } \n}\n",
+ "id": "S11.7.2_A2.2_T1"
+ },
+ {
+ "section": "11.7.2",
+ "description": "Checking with \"throw\"",
+ "test": "//CHECK#1\nvar x = { valueOf: function () { throw \"x\"; } };\nvar y = { valueOf: function () { throw \"y\"; } };\ntry {\n x >> y;\n $ERROR('#1.1: var x = { valueOf: function () { throw \"x\"; } }; var y = { valueOf: function () { throw \"y\"; } }; x >> y throw \"x\". Actual: ' + (x >> y));\n} catch (e) {\n if (e === \"y\") {\n $ERROR('#1.2: ToNumber(first expression) is called first, and then ToNumber(second expression)');\n } else {\n if (e !== \"x\") {\n $ERROR('#1.3: var x = { valueOf: function () { throw \"x\"; } }; var y = { valueOf: function () { throw \"y\"; } }; x >> y throw \"x\". Actual: ' + (e));\n }\n }\n}\n",
+ "id": "S11.7.2_A2.3_T1"
+ },
+ {
+ "section": "11.7.2",
+ "description": "Checking with \"=\"",
+ "test": "//CHECK#1\nvar x = 0; \nif ((x = 1) >> x !== 0) {\n $ERROR('#1: var x = 0; (x = 1) >> x === 0. Actual: ' + ((x = 1) >> x));\n}\n\n//CHECK#2\nvar x = -4; \nif (x >> (x = 1) !== -2) {\n $ERROR('#2: var x = -4; x >> (x = 1) === -2. Actual: ' + (x >> (x = 1)));\n}\n\n",
+ "id": "S11.7.2_A2.4_T1"
+ },
+ {
+ "section": "11.7.2",
+ "description": "Checking with \"throw\"",
+ "test": "//CHECK#1\nvar x = function () { throw \"x\"; };\nvar y = function () { throw \"y\"; };\ntry {\n x() >> y();\n $ERROR('#1.1: var x = function () { throw \"x\"; }; var y = function () { throw \"y\"; }; x() >> y() throw \"x\". Actual: ' + (x() >> y()));\n} catch (e) {\n if (e === \"y\") {\n $ERROR('#1.2: First expression is evaluated first, and then second expression');\n } else {\n if (e !== \"x\") {\n $ERROR('#1.3: var x = function () { throw \"x\"; }; var y = function () { throw \"y\"; }; x() >> y() throw \"x\". Actual: ' + (e));\n }\n }\n}\n",
+ "id": "S11.7.2_A2.4_T2"
+ },
+ {
+ "section": "11.7.2",
+ "description": "Checking with undeclarated variables",
+ "test": "//CHECK#1\ntry {\n x >> (x = 1);\n $ERROR('#1.1: x >> (x = 1) throw ReferenceError. Actual: ' + (x >> (x = 1))); \n}\ncatch (e) {\n if ((e instanceof ReferenceError) !== true) {\n $ERROR('#1.2: x >> (x = 1) throw ReferenceError. Actual: ' + (e)); \n }\n}\n\n//CHECK#2\nif ((y = 1) >> y !== 0) {\n $ERROR('#2: (y = 1) >> y === 0. Actual: ' + ((y = 1) >> y));\n}\n\n",
+ "id": "S11.7.2_A2.4_T3"
+ },
+ {
+ "section": "11.7.2",
+ "description": "Type(x) and Type(y) vary between primitive boolean and Boolean object",
+ "test": "//CHECK#1\nif (true >> true !== 0) {\n $ERROR('#1: true >> true === 0. Actual: ' + (true >> true));\n}\n\n//CHECK#2\nif (new Boolean(true) >> true !== 0) {\n $ERROR('#2: new Boolean(true) >> true === 0. Actual: ' + (new Boolean(true) >> true));\n}\n\n//CHECK#3\nif (true >> new Boolean(true) !== 0) {\n $ERROR('#3: true >> new Boolean(true) === 0. Actual: ' + (true >> new Boolean(true)));\n}\n\n//CHECK#4\nif (new Boolean(true) >> new Boolean(true) !== 0) {\n $ERROR('#4: new Boolean(true) >> new Boolean(true) === 0. Actual: ' + (new Boolean(true) >> new Boolean(true)));\n}\n",
+ "id": "S11.7.2_A3_T1.1"
+ },
+ {
+ "section": "11.7.2",
+ "description": "Type(x) and Type(y) vary between primitive number and Number object",
+ "test": "//CHECK#1\nif (1 >> 1 !== 0) {\n $ERROR('#1: 1 >> 1 === 0. Actual: ' + (1 >> 1));\n}\n\n//CHECK#2\nif (new Number(1) >> 1 !== 0) {\n $ERROR('#2: new Number(1) >> 1 === 0. Actual: ' + (new Number(1) >> 1));\n}\n\n//CHECK#3\nif (1 >> new Number(1) !== 0) {\n $ERROR('#3: 1 >> new Number(1) === 0. Actual: ' + (1 >> new Number(1)));\n}\n\n//CHECK#4\nif (new Number(1) >> new Number(1) !== 0) {\n $ERROR('#4: new Number(1) >> new Number(1) === 0. Actual: ' + (new Number(1) >> new Number(1)));\n}\n\n",
+ "id": "S11.7.2_A3_T1.2"
+ },
+ {
+ "section": "11.7.2",
+ "description": "Type(x) and Type(y) vary between primitive string and String object",
+ "test": "//CHECK#1\nif (\"1\" >> \"1\" !== 0) {\n $ERROR('#1: \"1\" >> \"1\" === 0. Actual: ' + (\"1\" >> \"1\"));\n}\n\n//CHECK#2\nif (new String(\"1\") >> \"1\" !== 0) {\n $ERROR('#2: new String(\"1\") >> \"1\" === 0. Actual: ' + (new String(\"1\") >> \"1\"));\n}\n\n//CHECK#3\nif (\"1\" >> new String(\"1\") !== 0) {\n $ERROR('#3: \"1\" >> new String(\"1\") === 0. Actual: ' + (\"1\" >> new String(\"1\")));\n}\n\n//CHECK#4\nif (new String(\"1\") >> new String(\"1\") !== 0) {\n $ERROR('#4: new String(\"1\") >> new String(\"1\") === 0. Actual: ' + (new String(\"1\") >> new String(\"1\")));\n}\n\n//CHECK#5\nif (\"x\" >> \"1\" !== 0) {\n $ERROR('#5: \"x\" >> \"1\" === 0. Actual: ' + (\"x\" >> \"1\"));\n}\n\n//CHECK#6\nif (\"1\" >> \"x\" !== 1) {\n $ERROR('#6: \"1\" >> \"x\" === 1. Actual: ' + (\"1\" >> \"x\"));\n}\n",
+ "id": "S11.7.2_A3_T1.3"
+ },
+ {
+ "section": "11.7.2",
+ "description": "Type(x) and Type(y) vary between Null and Undefined",
+ "test": "//CHECK#1\nif (null >> undefined !== 0) {\n $ERROR('#1: null >> undefined === 0. Actual: ' + (null >> undefined));\n}\n\n//CHECK#2\nif (undefined >> null !== 0) {\n $ERROR('#2: undefined >> null === 0. Actual: ' + (undefined >> null));\n}\n\n//CHECK#3\nif (undefined >> undefined !== 0) {\n $ERROR('#3: undefined >> undefined === 0. Actual: ' + (undefined >> undefined));\n}\n\n//CHECK#4\nif (null >> null !== 0) {\n $ERROR('#4: null >> null === 0. Actual: ' + (null >> null));\n}\n",
+ "id": "S11.7.2_A3_T1.4"
+ },
+ {
+ "section": "11.7.2",
+ "description": "Type(x) and Type(y) vary between Object object and Function object",
+ "test": "//CHECK#1\nif (({} >> function(){return 1}) !== 0) {\n $ERROR('#1: ({} >> function(){return 1}) === 0. Actual: ' + (({} >> function(){return 1})));\n}\n\n//CHECK#2\nif ((function(){return 1} >> {}) !== 0) {\n $ERROR('#2: (function(){return 1} >> {}) === 0. Actual: ' + ((function(){return 1} >> {})));\n}\n\n//CHECK#3\nif ((function(){return 1} >> function(){return 1}) !== 0) {\n $ERROR('#3: (function(){return 1} >> function(){return 1}) === 0. Actual: ' + ((function(){return 1} >> function(){return 1})));\n}\n\n//CHECK#4\nif (({} >> {}) !== 0) {\n $ERROR('#4: ({} >> {}) === 0. Actual: ' + (({} >> {})));\n}\n\n",
+ "id": "S11.7.2_A3_T1.5"
+ },
+ {
+ "section": "11.7.2",
+ "description": "Type(x) is different from Type(y) and both types vary between Number (primitive or object) and Boolean (primitive and object)",
+ "test": "//CHECK#1\nif (true >> 1 !== 0) {\n $ERROR('#1: true >> 1 === 0. Actual: ' + (true >> 1));\n}\n\n//CHECK#2\nif (1 >> true !== 0) {\n $ERROR('#2: 1 >> true === 0. Actual: ' + (1 >> true));\n}\n\n//CHECK#3\nif (new Boolean(true) >> 1 !== 0) {\n $ERROR('#3: new Boolean(true) >> 1 === 0. Actual: ' + (new Boolean(true) >> 1));\n}\n\n//CHECK#4\nif (1 >> new Boolean(true) !== 0) {\n $ERROR('#4: 1 >> new Boolean(true) === 0. Actual: ' + (1 >> new Boolean(true)));\n}\n\n//CHECK#5\nif (true >> new Number(1) !== 0) {\n $ERROR('#5: true >> new Number(1) === 0. Actual: ' + (true >> new Number(1)));\n}\n\n//CHECK#6\nif (new Number(1) >> true !== 0) {\n $ERROR('#6: new Number(1) >> true === 0. Actual: ' + (new Number(1) >> true));\n}\n\n//CHECK#7\nif (new Boolean(true) >> new Number(1) !== 0) {\n $ERROR('#7: new Boolean(true) >> new Number(1) === 0. Actual: ' + (new Boolean(true) >> new Number(1)));\n}\n\n//CHECK#8\nif (new Number(1) >> new Boolean(true) !== 0) {\n $ERROR('#8: new Number(1) >> new Boolean(true) === 0. Actual: ' + (new Number(1) >> new Boolean(true)));\n}\n",
+ "id": "S11.7.2_A3_T2.1"
+ },
+ {
+ "section": "11.7.2",
+ "description": "Type(x) is different from Type(y) and both types vary between Number (primitive or object) and String (primitive and object)",
+ "test": "//CHECK#1\nif (\"1\" >> 1 !== 0) {\n $ERROR('#1: \"1\" >> 1 === 0. Actual: ' + (\"1\" >> 1));\n}\n\n//CHECK#2\nif (1 >> \"1\" !== 0) {\n $ERROR('#2: 1 >> \"1\" === 0. Actual: ' + (1 >> \"1\"));\n}\n\n//CHECK#3\nif (new String(\"1\") >> 1 !== 0) {\n $ERROR('#3: new String(\"1\") >> 1 === 0. Actual: ' + (new String(\"1\") >> 1));\n}\n\n//CHECK#4\nif (1 >> new String(\"1\") !== 0) {\n $ERROR('#4: 1 >> new String(\"1\") === 0. Actual: ' + (1 >> new String(\"1\")));\n}\n\n//CHECK#5\nif (\"1\" >> new Number(1) !== 0) {\n $ERROR('#5: \"1\" >> new Number(1) === 0. Actual: ' + (\"1\" >> new Number(1)));\n}\n\n//CHECK#6\nif (new Number(1) >> \"1\" !== 0) {\n $ERROR('#6: new Number(1) >> \"1\" === 0. Actual: ' + (new Number(1) >> \"1\"));\n}\n\n//CHECK#7\nif (new String(\"1\") >> new Number(1) !== 0) {\n $ERROR('#7: new String(\"1\") >> new Number(1) === 0. Actual: ' + (new String(\"1\") >> new Number(1)));\n}\n\n//CHECK#8\nif (new Number(1) >> new String(\"1\") !== 0) {\n $ERROR('#8: new Number(1) >> new String(\"1\") === 0. Actual: ' + (new Number(1) >> new String(\"1\")));\n}\n\n//CHECK#9\nif (\"x\" >> 1 !== 0) {\n $ERROR('#9: \"x\" >> 1 === 0. Actual: ' + (\"x\" >> 1));\n}\n\n//CHECK#10\nif (1 >> \"x\" !== 1) {\n $ERROR('#10: 1 >> \"x\" === 1. Actual: ' + (1 >> \"x\"));\n}\n",
+ "id": "S11.7.2_A3_T2.2"
+ },
+ {
+ "section": "11.7.2",
+ "description": "Type(x) is different from Type(y) and both types vary between Number (primitive or object) and Null",
+ "test": "//CHECK#1\nif (1 >> null !== 1) {\n $ERROR('#1: 1 >> null === 1. Actual: ' + (1 >> null));\n}\n\n//CHECK#2\nif (null >> 1 !== 0) {\n $ERROR('#2: null >> 1 === 0. Actual: ' + (null >> 1));\n}\n\n//CHECK#3\nif (new Number(1) >> null !== 1) {\n $ERROR('#3: new Number(1) >> null === 1. Actual: ' + (new Number(1) >> null));\n}\n\n//CHECK#4\nif (null >> new Number(1) !== 0) {\n $ERROR('#4: null >> new Number(1) === 0. Actual: ' + (null >> new Number(1)));\n}\n",
+ "id": "S11.7.2_A3_T2.3"
+ },
+ {
+ "section": "11.7.2",
+ "description": "Type(x) is different from Type(y) and both types vary between Number (primitive or object) and Undefined",
+ "test": "//CHECK#1\nif (1 >> undefined !== 1) {\n $ERROR('#1: 1 >> undefined === 1. Actual: ' + (1 >> undefined));\n}\n\n//CHECK#2\nif (undefined >> 1 !== 0) {\n $ERROR('#2: undefined >> 1 === 0. Actual: ' + (undefined >> 1));\n}\n\n//CHECK#3\nif (new Number(1) >> undefined !== 1) {\n $ERROR('#3: new Number(1) >> undefined === 1. Actual: ' + (new Number(1) >> undefined));\n}\n\n//CHECK#4\nif (undefined >> new Number(1) !== 0) {\n $ERROR('#4: undefined >> new Number(1) === 0. Actual: ' + (undefined >> new Number(1)));\n}\n",
+ "id": "S11.7.2_A3_T2.4"
+ },
+ {
+ "section": "11.7.2",
+ "description": "Type(x) is different from Type(y) and both types vary between String (primitive or object) and Boolean (primitive and object)",
+ "test": "//CHECK#1\nif (true >> \"1\" !== 0) {\n $ERROR('#1: true >> \"1\" === 0. Actual: ' + (true >> \"1\"));\n}\n\n//CHECK#2\nif (\"1\" >> true !== 0) {\n $ERROR('#2: \"1\" >> true === 0. Actual: ' + (\"1\" >> true));\n}\n\n//CHECK#3\nif (new Boolean(true) >> \"1\" !== 0) {\n $ERROR('#3: new Boolean(true) >> \"1\" === 0. Actual: ' + (new Boolean(true) >> \"1\"));\n}\n\n//CHECK#4\nif (\"1\" >> new Boolean(true) !== 0) {\n $ERROR('#4: \"1\" >> new Boolean(true) === 0. Actual: ' + (\"1\" >> new Boolean(true)));\n}\n\n//CHECK#5\nif (true >> new String(\"1\") !== 0) {\n $ERROR('#5: true >> new String(\"1\") === 0. Actual: ' + (true >> new String(\"1\")));\n}\n\n//CHECK#6\nif (new String(\"1\") >> true !== 0) {\n $ERROR('#6: new String(\"1\") >> true === 0. Actual: ' + (new String(\"1\") >> true));\n}\n\n//CHECK#7\nif (new Boolean(true) >> new String(\"1\") !== 0) {\n $ERROR('#7: new Boolean(true) >> new String(\"1\") === 0. Actual: ' + (new Boolean(true) >> new String(\"1\")));\n}\n\n//CHECK#8\nif (new String(\"1\") >> new Boolean(true) !== 0) {\n $ERROR('#8: new String(\"1\") >> new Boolean(true) === 0. Actual: ' + (new String(\"1\") >> new Boolean(true)));\n}\n",
+ "id": "S11.7.2_A3_T2.5"
+ },
+ {
+ "section": "11.7.2",
+ "description": "Type(x) is different from Type(y) and both types vary between String (primitive or object) and Undefined",
+ "test": "//CHECK#1\nif (\"1\" >> undefined !== 1) {\n $ERROR('#1: \"1\" >> undefined === 1. Actual: ' + (\"1\" >> undefined));\n}\n\n//CHECK#2\nif (undefined >> \"1\" !== 0) {\n $ERROR('#2: undefined >> \"1\" === 0. Actual: ' + (undefined >> \"1\"));\n}\n\n//CHECK#3\nif (new String(\"1\") >> undefined !== 1) {\n $ERROR('#3: new String(\"1\") >> undefined === 1. Actual: ' + (new String(\"1\") >> undefined));\n}\n\n//CHECK#4\nif (undefined >> new String(\"1\") !== 0) {\n $ERROR('#4: undefined >> new String(\"1\") === 0. Actual: ' + (undefined >> new String(\"1\")));\n}\n",
+ "id": "S11.7.2_A3_T2.6"
+ },
+ {
+ "section": "11.7.2",
+ "description": "Type(x) is different from Type(y) and both types vary between String (primitive or object) and Null",
+ "test": "//CHECK#1\nif (\"1\" >> null !== 1) {\n $ERROR('#1: \"1\" >> null === 1. Actual: ' + (\"1\" >> null));\n}\n\n//CHECK#2\nif (null >> \"1\" !== 0) {\n $ERROR('#2: null >> \"1\" === 0. Actual: ' + (null >> \"1\"));\n}\n\n//CHECK#3\nif (new String(\"1\") >> null !== 1) {\n $ERROR('#3: new String(\"1\") >> null === 1. Actual: ' + (new String(\"1\") >> null));\n}\n\n//CHECK#4\nif (null >> new String(\"1\") !== 0) {\n $ERROR('#4: null >> new String(\"1\") === 0. Actual: ' + (null >> new String(\"1\")));\n}\n",
+ "id": "S11.7.2_A3_T2.7"
+ },
+ {
+ "section": "11.7.2",
+ "description": "Type(x) is different from Type(y) and both types vary between Boolean (primitive or object) and Undefined",
+ "test": "//CHECK#1\nif (true >> undefined !== 1) {\n $ERROR('#1: true >> undefined === 1. Actual: ' + (true >> undefined));\n}\n\n//CHECK#2\nif (undefined >> true !== 0) {\n $ERROR('#2: undefined >> true === 0. Actual: ' + (undefined >> true));\n}\n\n//CHECK#3\nif (new Boolean(true) >> undefined !== 1) {\n $ERROR('#3: new Boolean(true) >> undefined === 1. Actual: ' + (new Boolean(true) >> undefined));\n}\n\n//CHECK#4\nif (undefined >> new Boolean(true) !== 0) {\n $ERROR('#4: undefined >> new Boolean(true) === 0. Actual: ' + (undefined >> new Boolean(true)));\n}\n",
+ "id": "S11.7.2_A3_T2.8"
+ },
+ {
+ "section": "11.7.2",
+ "description": "Type(x) is different from Type(y) and both types vary between Boolean (primitive or object) and Null",
+ "test": "//CHECK#1\nif (true >> null !== 1) {\n $ERROR('#1: true >> null === 1. Actual: ' + (true >> null));\n}\n\n//CHECK#2\nif (null >> true !== 0) {\n $ERROR('#2: null >> true === 0. Actual: ' + (null >> true));\n}\n\n//CHECK#3\nif (new Boolean(true) >> null !== 1) {\n $ERROR('#3: new Boolean(true) >> null === 1. Actual: ' + (new Boolean(true) >> null));\n}\n\n//CHECK#4\nif (null >> new Boolean(true) !== 0) {\n $ERROR('#4: null >> new Boolean(true) === 0. Actual: ' + (null >> new Boolean(true)));\n}\n",
+ "id": "S11.7.2_A3_T2.9"
+ },
+ {
+ "section": "11.7.2",
+ "description": "ShiftExpression = -2^n, n = 0...15",
+ "test": "//CHECK\n\nif (-1 >> 0 !== -1) { \n $ERROR('#1: -1 >> 0 === -1. Actual: ' + (-1 >> 0)); \n} \n\n\nif (-2 >> 0 !== -2) { \n $ERROR('#2: -2 >> 0 === -2. Actual: ' + (-2 >> 0)); \n} \n\n\nif (-4 >> 0 !== -4) { \n $ERROR('#3: -4 >> 0 === -4. Actual: ' + (-4 >> 0)); \n} \n\n\nif (-8 >> 0 !== -8) { \n $ERROR('#4: -8 >> 0 === -8. Actual: ' + (-8 >> 0)); \n} \n\n\nif (-16 >> 0 !== -16) { \n $ERROR('#5: -16 >> 0 === -16. Actual: ' + (-16 >> 0)); \n} \n\n\nif (-32 >> 0 !== -32) { \n $ERROR('#6: -32 >> 0 === -32. Actual: ' + (-32 >> 0)); \n} \n\n\nif (-64 >> 0 !== -64) { \n $ERROR('#7: -64 >> 0 === -64. Actual: ' + (-64 >> 0)); \n} \n\n\nif (-128 >> 0 !== -128) { \n $ERROR('#8: -128 >> 0 === -128. Actual: ' + (-128 >> 0)); \n} \n\n\nif (-256 >> 0 !== -256) { \n $ERROR('#9: -256 >> 0 === -256. Actual: ' + (-256 >> 0)); \n} \n\n\nif (-512 >> 0 !== -512) { \n $ERROR('#10: -512 >> 0 === -512. Actual: ' + (-512 >> 0)); \n} \n\n\nif (-1024 >> 0 !== -1024) { \n $ERROR('#11: -1024 >> 0 === -1024. Actual: ' + (-1024 >> 0)); \n} \n\n\nif (-2048 >> 0 !== -2048) { \n $ERROR('#12: -2048 >> 0 === -2048. Actual: ' + (-2048 >> 0)); \n} \n\n\nif (-4096 >> 0 !== -4096) { \n $ERROR('#13: -4096 >> 0 === -4096. Actual: ' + (-4096 >> 0)); \n} \n\n\nif (-8192 >> 0 !== -8192) { \n $ERROR('#14: -8192 >> 0 === -8192. Actual: ' + (-8192 >> 0)); \n} \n\n\nif (-16384 >> 0 !== -16384) { \n $ERROR('#15: -16384 >> 0 === -16384. Actual: ' + (-16384 >> 0)); \n} \n\n\nif (-32768 >> 0 !== -32768) { \n $ERROR('#16: -32768 >> 0 === -32768. Actual: ' + (-32768 >> 0)); \n} \n\n\nif (-65536 >> 0 !== -65536) { \n $ERROR('#17: -65536 >> 0 === -65536. Actual: ' + (-65536 >> 0)); \n} \n\n\nif (-131072 >> 0 !== -131072) { \n $ERROR('#18: -131072 >> 0 === -131072. Actual: ' + (-131072 >> 0)); \n} \n\n\nif (-262144 >> 0 !== -262144) { \n $ERROR('#19: -262144 >> 0 === -262144. Actual: ' + (-262144 >> 0)); \n} \n\n\nif (-524288 >> 0 !== -524288) { \n $ERROR('#20: -524288 >> 0 === -524288. Actual: ' + (-524288 >> 0)); \n} \n\n\nif (-1048576 >> 0 !== -1048576) { \n $ERROR('#21: -1048576 >> 0 === -1048576. Actual: ' + (-1048576 >> 0)); \n} \n\n\nif (-2097152 >> 0 !== -2097152) { \n $ERROR('#22: -2097152 >> 0 === -2097152. Actual: ' + (-2097152 >> 0)); \n} \n\n\nif (-4194304 >> 0 !== -4194304) { \n $ERROR('#23: -4194304 >> 0 === -4194304. Actual: ' + (-4194304 >> 0)); \n} \n\n\nif (-8388608 >> 0 !== -8388608) { \n $ERROR('#24: -8388608 >> 0 === -8388608. Actual: ' + (-8388608 >> 0)); \n} \n\n\nif (-16777216 >> 0 !== -16777216) { \n $ERROR('#25: -16777216 >> 0 === -16777216. Actual: ' + (-16777216 >> 0)); \n} \n\n\nif (-33554432 >> 0 !== -33554432) { \n $ERROR('#26: -33554432 >> 0 === -33554432. Actual: ' + (-33554432 >> 0)); \n} \n\n\nif (-67108864 >> 0 !== -67108864) { \n $ERROR('#27: -67108864 >> 0 === -67108864. Actual: ' + (-67108864 >> 0)); \n} \n\n\nif (-134217728 >> 0 !== -134217728) { \n $ERROR('#28: -134217728 >> 0 === -134217728. Actual: ' + (-134217728 >> 0)); \n} \n\n\nif (-268435456 >> 0 !== -268435456) { \n $ERROR('#29: -268435456 >> 0 === -268435456. Actual: ' + (-268435456 >> 0)); \n} \n\n\nif (-536870912 >> 0 !== -536870912) { \n $ERROR('#30: -536870912 >> 0 === -536870912. Actual: ' + (-536870912 >> 0)); \n} \n\n\nif (-1073741824 >> 0 !== -1073741824) { \n $ERROR('#31: -1073741824 >> 0 === -1073741824. Actual: ' + (-1073741824 >> 0)); \n} \n\n\nif (-2147483648 >> 0 !== -2147483648) { \n $ERROR('#32: -2147483648 >> 0 === -2147483648. Actual: ' + (-2147483648 >> 0)); \n} \n\n\nif (-1 >> 1 !== -1) { \n $ERROR('#33: -1 >> 1 === -1. Actual: ' + (-1 >> 1)); \n} \n\n\nif (-2 >> 1 !== -1) { \n $ERROR('#34: -2 >> 1 === -1. Actual: ' + (-2 >> 1)); \n} \n\n\nif (-4 >> 1 !== -2) { \n $ERROR('#35: -4 >> 1 === -2. Actual: ' + (-4 >> 1)); \n} \n\n\nif (-8 >> 1 !== -4) { \n $ERROR('#36: -8 >> 1 === -4. Actual: ' + (-8 >> 1)); \n} \n\n\nif (-16 >> 1 !== -8) { \n $ERROR('#37: -16 >> 1 === -8. Actual: ' + (-16 >> 1)); \n} \n\n\nif (-32 >> 1 !== -16) { \n $ERROR('#38: -32 >> 1 === -16. Actual: ' + (-32 >> 1)); \n} \n\n\nif (-64 >> 1 !== -32) { \n $ERROR('#39: -64 >> 1 === -32. Actual: ' + (-64 >> 1)); \n} \n\n\nif (-128 >> 1 !== -64) { \n $ERROR('#40: -128 >> 1 === -64. Actual: ' + (-128 >> 1)); \n} \n\n\nif (-256 >> 1 !== -128) { \n $ERROR('#41: -256 >> 1 === -128. Actual: ' + (-256 >> 1)); \n} \n\n\nif (-512 >> 1 !== -256) { \n $ERROR('#42: -512 >> 1 === -256. Actual: ' + (-512 >> 1)); \n} \n\n\nif (-1024 >> 1 !== -512) { \n $ERROR('#43: -1024 >> 1 === -512. Actual: ' + (-1024 >> 1)); \n} \n\n\nif (-2048 >> 1 !== -1024) { \n $ERROR('#44: -2048 >> 1 === -1024. Actual: ' + (-2048 >> 1)); \n} \n\n\nif (-4096 >> 1 !== -2048) { \n $ERROR('#45: -4096 >> 1 === -2048. Actual: ' + (-4096 >> 1)); \n} \n\n\nif (-8192 >> 1 !== -4096) { \n $ERROR('#46: -8192 >> 1 === -4096. Actual: ' + (-8192 >> 1)); \n} \n\n\nif (-16384 >> 1 !== -8192) { \n $ERROR('#47: -16384 >> 1 === -8192. Actual: ' + (-16384 >> 1)); \n} \n\n\nif (-32768 >> 1 !== -16384) { \n $ERROR('#48: -32768 >> 1 === -16384. Actual: ' + (-32768 >> 1)); \n} \n\n\nif (-65536 >> 1 !== -32768) { \n $ERROR('#49: -65536 >> 1 === -32768. Actual: ' + (-65536 >> 1)); \n} \n\n\nif (-131072 >> 1 !== -65536) { \n $ERROR('#50: -131072 >> 1 === -65536. Actual: ' + (-131072 >> 1)); \n} \n\n\nif (-262144 >> 1 !== -131072) { \n $ERROR('#51: -262144 >> 1 === -131072. Actual: ' + (-262144 >> 1)); \n} \n\n\nif (-524288 >> 1 !== -262144) { \n $ERROR('#52: -524288 >> 1 === -262144. Actual: ' + (-524288 >> 1)); \n} \n\n\nif (-1048576 >> 1 !== -524288) { \n $ERROR('#53: -1048576 >> 1 === -524288. Actual: ' + (-1048576 >> 1)); \n} \n\n\nif (-2097152 >> 1 !== -1048576) { \n $ERROR('#54: -2097152 >> 1 === -1048576. Actual: ' + (-2097152 >> 1)); \n} \n\n\nif (-4194304 >> 1 !== -2097152) { \n $ERROR('#55: -4194304 >> 1 === -2097152. Actual: ' + (-4194304 >> 1)); \n} \n\n\nif (-8388608 >> 1 !== -4194304) { \n $ERROR('#56: -8388608 >> 1 === -4194304. Actual: ' + (-8388608 >> 1)); \n} \n\n\nif (-16777216 >> 1 !== -8388608) { \n $ERROR('#57: -16777216 >> 1 === -8388608. Actual: ' + (-16777216 >> 1)); \n} \n\n\nif (-33554432 >> 1 !== -16777216) { \n $ERROR('#58: -33554432 >> 1 === -16777216. Actual: ' + (-33554432 >> 1)); \n} \n\n\nif (-67108864 >> 1 !== -33554432) { \n $ERROR('#59: -67108864 >> 1 === -33554432. Actual: ' + (-67108864 >> 1)); \n} \n\n\nif (-134217728 >> 1 !== -67108864) { \n $ERROR('#60: -134217728 >> 1 === -67108864. Actual: ' + (-134217728 >> 1)); \n} \n\n\nif (-268435456 >> 1 !== -134217728) { \n $ERROR('#61: -268435456 >> 1 === -134217728. Actual: ' + (-268435456 >> 1)); \n} \n\n\nif (-536870912 >> 1 !== -268435456) { \n $ERROR('#62: -536870912 >> 1 === -268435456. Actual: ' + (-536870912 >> 1)); \n} \n\n\nif (-1073741824 >> 1 !== -536870912) { \n $ERROR('#63: -1073741824 >> 1 === -536870912. Actual: ' + (-1073741824 >> 1)); \n} \n\n\nif (-2147483648 >> 1 !== -1073741824) { \n $ERROR('#64: -2147483648 >> 1 === -1073741824. Actual: ' + (-2147483648 >> 1)); \n} \n\n\nif (-1 >> 2 !== -1) { \n $ERROR('#65: -1 >> 2 === -1. Actual: ' + (-1 >> 2)); \n} \n\n\nif (-2 >> 2 !== -1) { \n $ERROR('#66: -2 >> 2 === -1. Actual: ' + (-2 >> 2)); \n} \n\n\nif (-4 >> 2 !== -1) { \n $ERROR('#67: -4 >> 2 === -1. Actual: ' + (-4 >> 2)); \n} \n\n\nif (-8 >> 2 !== -2) { \n $ERROR('#68: -8 >> 2 === -2. Actual: ' + (-8 >> 2)); \n} \n\n\nif (-16 >> 2 !== -4) { \n $ERROR('#69: -16 >> 2 === -4. Actual: ' + (-16 >> 2)); \n} \n\n\nif (-32 >> 2 !== -8) { \n $ERROR('#70: -32 >> 2 === -8. Actual: ' + (-32 >> 2)); \n} \n\n\nif (-64 >> 2 !== -16) { \n $ERROR('#71: -64 >> 2 === -16. Actual: ' + (-64 >> 2)); \n} \n\n\nif (-128 >> 2 !== -32) { \n $ERROR('#72: -128 >> 2 === -32. Actual: ' + (-128 >> 2)); \n} \n\n\nif (-256 >> 2 !== -64) { \n $ERROR('#73: -256 >> 2 === -64. Actual: ' + (-256 >> 2)); \n} \n\n\nif (-512 >> 2 !== -128) { \n $ERROR('#74: -512 >> 2 === -128. Actual: ' + (-512 >> 2)); \n} \n\n\nif (-1024 >> 2 !== -256) { \n $ERROR('#75: -1024 >> 2 === -256. Actual: ' + (-1024 >> 2)); \n} \n\n\nif (-2048 >> 2 !== -512) { \n $ERROR('#76: -2048 >> 2 === -512. Actual: ' + (-2048 >> 2)); \n} \n\n\nif (-4096 >> 2 !== -1024) { \n $ERROR('#77: -4096 >> 2 === -1024. Actual: ' + (-4096 >> 2)); \n} \n\n\nif (-8192 >> 2 !== -2048) { \n $ERROR('#78: -8192 >> 2 === -2048. Actual: ' + (-8192 >> 2)); \n} \n\n\nif (-16384 >> 2 !== -4096) { \n $ERROR('#79: -16384 >> 2 === -4096. Actual: ' + (-16384 >> 2)); \n} \n\n\nif (-32768 >> 2 !== -8192) { \n $ERROR('#80: -32768 >> 2 === -8192. Actual: ' + (-32768 >> 2)); \n} \n\n\nif (-65536 >> 2 !== -16384) { \n $ERROR('#81: -65536 >> 2 === -16384. Actual: ' + (-65536 >> 2)); \n} \n\n\nif (-131072 >> 2 !== -32768) { \n $ERROR('#82: -131072 >> 2 === -32768. Actual: ' + (-131072 >> 2)); \n} \n\n\nif (-262144 >> 2 !== -65536) { \n $ERROR('#83: -262144 >> 2 === -65536. Actual: ' + (-262144 >> 2)); \n} \n\n\nif (-524288 >> 2 !== -131072) { \n $ERROR('#84: -524288 >> 2 === -131072. Actual: ' + (-524288 >> 2)); \n} \n\n\nif (-1048576 >> 2 !== -262144) { \n $ERROR('#85: -1048576 >> 2 === -262144. Actual: ' + (-1048576 >> 2)); \n} \n\n\nif (-2097152 >> 2 !== -524288) { \n $ERROR('#86: -2097152 >> 2 === -524288. Actual: ' + (-2097152 >> 2)); \n} \n\n\nif (-4194304 >> 2 !== -1048576) { \n $ERROR('#87: -4194304 >> 2 === -1048576. Actual: ' + (-4194304 >> 2)); \n} \n\n\nif (-8388608 >> 2 !== -2097152) { \n $ERROR('#88: -8388608 >> 2 === -2097152. Actual: ' + (-8388608 >> 2)); \n} \n\n\nif (-16777216 >> 2 !== -4194304) { \n $ERROR('#89: -16777216 >> 2 === -4194304. Actual: ' + (-16777216 >> 2)); \n} \n\n\nif (-33554432 >> 2 !== -8388608) { \n $ERROR('#90: -33554432 >> 2 === -8388608. Actual: ' + (-33554432 >> 2)); \n} \n\n\nif (-67108864 >> 2 !== -16777216) { \n $ERROR('#91: -67108864 >> 2 === -16777216. Actual: ' + (-67108864 >> 2)); \n} \n\n\nif (-134217728 >> 2 !== -33554432) { \n $ERROR('#92: -134217728 >> 2 === -33554432. Actual: ' + (-134217728 >> 2)); \n} \n\n\nif (-268435456 >> 2 !== -67108864) { \n $ERROR('#93: -268435456 >> 2 === -67108864. Actual: ' + (-268435456 >> 2)); \n} \n\n\nif (-536870912 >> 2 !== -134217728) { \n $ERROR('#94: -536870912 >> 2 === -134217728. Actual: ' + (-536870912 >> 2)); \n} \n\n\nif (-1073741824 >> 2 !== -268435456) { \n $ERROR('#95: -1073741824 >> 2 === -268435456. Actual: ' + (-1073741824 >> 2)); \n} \n\n\nif (-2147483648 >> 2 !== -536870912) { \n $ERROR('#96: -2147483648 >> 2 === -536870912. Actual: ' + (-2147483648 >> 2)); \n} \n\n\nif (-1 >> 3 !== -1) { \n $ERROR('#97: -1 >> 3 === -1. Actual: ' + (-1 >> 3)); \n} \n\n\nif (-2 >> 3 !== -1) { \n $ERROR('#98: -2 >> 3 === -1. Actual: ' + (-2 >> 3)); \n} \n\n\nif (-4 >> 3 !== -1) { \n $ERROR('#99: -4 >> 3 === -1. Actual: ' + (-4 >> 3)); \n} \n\n\nif (-8 >> 3 !== -1) { \n $ERROR('#100: -8 >> 3 === -1. Actual: ' + (-8 >> 3)); \n} \n\n\nif (-16 >> 3 !== -2) { \n $ERROR('#101: -16 >> 3 === -2. Actual: ' + (-16 >> 3)); \n} \n\n\nif (-32 >> 3 !== -4) { \n $ERROR('#102: -32 >> 3 === -4. Actual: ' + (-32 >> 3)); \n} \n\n\nif (-64 >> 3 !== -8) { \n $ERROR('#103: -64 >> 3 === -8. Actual: ' + (-64 >> 3)); \n} \n\n\nif (-128 >> 3 !== -16) { \n $ERROR('#104: -128 >> 3 === -16. Actual: ' + (-128 >> 3)); \n} \n\n\nif (-256 >> 3 !== -32) { \n $ERROR('#105: -256 >> 3 === -32. Actual: ' + (-256 >> 3)); \n} \n\n\nif (-512 >> 3 !== -64) { \n $ERROR('#106: -512 >> 3 === -64. Actual: ' + (-512 >> 3)); \n} \n\n\nif (-1024 >> 3 !== -128) { \n $ERROR('#107: -1024 >> 3 === -128. Actual: ' + (-1024 >> 3)); \n} \n\n\nif (-2048 >> 3 !== -256) { \n $ERROR('#108: -2048 >> 3 === -256. Actual: ' + (-2048 >> 3)); \n} \n\n\nif (-4096 >> 3 !== -512) { \n $ERROR('#109: -4096 >> 3 === -512. Actual: ' + (-4096 >> 3)); \n} \n\n\nif (-8192 >> 3 !== -1024) { \n $ERROR('#110: -8192 >> 3 === -1024. Actual: ' + (-8192 >> 3)); \n} \n\n\nif (-16384 >> 3 !== -2048) { \n $ERROR('#111: -16384 >> 3 === -2048. Actual: ' + (-16384 >> 3)); \n} \n\n\nif (-32768 >> 3 !== -4096) { \n $ERROR('#112: -32768 >> 3 === -4096. Actual: ' + (-32768 >> 3)); \n} \n\n\nif (-65536 >> 3 !== -8192) { \n $ERROR('#113: -65536 >> 3 === -8192. Actual: ' + (-65536 >> 3)); \n} \n\n\nif (-131072 >> 3 !== -16384) { \n $ERROR('#114: -131072 >> 3 === -16384. Actual: ' + (-131072 >> 3)); \n} \n\n\nif (-262144 >> 3 !== -32768) { \n $ERROR('#115: -262144 >> 3 === -32768. Actual: ' + (-262144 >> 3)); \n} \n\n\nif (-524288 >> 3 !== -65536) { \n $ERROR('#116: -524288 >> 3 === -65536. Actual: ' + (-524288 >> 3)); \n} \n\n\nif (-1048576 >> 3 !== -131072) { \n $ERROR('#117: -1048576 >> 3 === -131072. Actual: ' + (-1048576 >> 3)); \n} \n\n\nif (-2097152 >> 3 !== -262144) { \n $ERROR('#118: -2097152 >> 3 === -262144. Actual: ' + (-2097152 >> 3)); \n} \n\n\nif (-4194304 >> 3 !== -524288) { \n $ERROR('#119: -4194304 >> 3 === -524288. Actual: ' + (-4194304 >> 3)); \n} \n\n\nif (-8388608 >> 3 !== -1048576) { \n $ERROR('#120: -8388608 >> 3 === -1048576. Actual: ' + (-8388608 >> 3)); \n} \n\n\nif (-16777216 >> 3 !== -2097152) { \n $ERROR('#121: -16777216 >> 3 === -2097152. Actual: ' + (-16777216 >> 3)); \n} \n\n\nif (-33554432 >> 3 !== -4194304) { \n $ERROR('#122: -33554432 >> 3 === -4194304. Actual: ' + (-33554432 >> 3)); \n} \n\n\nif (-67108864 >> 3 !== -8388608) { \n $ERROR('#123: -67108864 >> 3 === -8388608. Actual: ' + (-67108864 >> 3)); \n} \n\n\nif (-134217728 >> 3 !== -16777216) { \n $ERROR('#124: -134217728 >> 3 === -16777216. Actual: ' + (-134217728 >> 3)); \n} \n\n\nif (-268435456 >> 3 !== -33554432) { \n $ERROR('#125: -268435456 >> 3 === -33554432. Actual: ' + (-268435456 >> 3)); \n} \n\n\nif (-536870912 >> 3 !== -67108864) { \n $ERROR('#126: -536870912 >> 3 === -67108864. Actual: ' + (-536870912 >> 3)); \n} \n\n\nif (-1073741824 >> 3 !== -134217728) { \n $ERROR('#127: -1073741824 >> 3 === -134217728. Actual: ' + (-1073741824 >> 3)); \n} \n\n\nif (-2147483648 >> 3 !== -268435456) { \n $ERROR('#128: -2147483648 >> 3 === -268435456. Actual: ' + (-2147483648 >> 3)); \n} \n\n\nif (-1 >> 4 !== -1) { \n $ERROR('#129: -1 >> 4 === -1. Actual: ' + (-1 >> 4)); \n} \n\n\nif (-2 >> 4 !== -1) { \n $ERROR('#130: -2 >> 4 === -1. Actual: ' + (-2 >> 4)); \n} \n\n\nif (-4 >> 4 !== -1) { \n $ERROR('#131: -4 >> 4 === -1. Actual: ' + (-4 >> 4)); \n} \n\n\nif (-8 >> 4 !== -1) { \n $ERROR('#132: -8 >> 4 === -1. Actual: ' + (-8 >> 4)); \n} \n\n\nif (-16 >> 4 !== -1) { \n $ERROR('#133: -16 >> 4 === -1. Actual: ' + (-16 >> 4)); \n} \n\n\nif (-32 >> 4 !== -2) { \n $ERROR('#134: -32 >> 4 === -2. Actual: ' + (-32 >> 4)); \n} \n\n\nif (-64 >> 4 !== -4) { \n $ERROR('#135: -64 >> 4 === -4. Actual: ' + (-64 >> 4)); \n} \n\n\nif (-128 >> 4 !== -8) { \n $ERROR('#136: -128 >> 4 === -8. Actual: ' + (-128 >> 4)); \n} \n\n\nif (-256 >> 4 !== -16) { \n $ERROR('#137: -256 >> 4 === -16. Actual: ' + (-256 >> 4)); \n} \n\n\nif (-512 >> 4 !== -32) { \n $ERROR('#138: -512 >> 4 === -32. Actual: ' + (-512 >> 4)); \n} \n\n\nif (-1024 >> 4 !== -64) { \n $ERROR('#139: -1024 >> 4 === -64. Actual: ' + (-1024 >> 4)); \n} \n\n\nif (-2048 >> 4 !== -128) { \n $ERROR('#140: -2048 >> 4 === -128. Actual: ' + (-2048 >> 4)); \n} \n\n\nif (-4096 >> 4 !== -256) { \n $ERROR('#141: -4096 >> 4 === -256. Actual: ' + (-4096 >> 4)); \n} \n\n\nif (-8192 >> 4 !== -512) { \n $ERROR('#142: -8192 >> 4 === -512. Actual: ' + (-8192 >> 4)); \n} \n\n\nif (-16384 >> 4 !== -1024) { \n $ERROR('#143: -16384 >> 4 === -1024. Actual: ' + (-16384 >> 4)); \n} \n\n\nif (-32768 >> 4 !== -2048) { \n $ERROR('#144: -32768 >> 4 === -2048. Actual: ' + (-32768 >> 4)); \n} \n\n\nif (-65536 >> 4 !== -4096) { \n $ERROR('#145: -65536 >> 4 === -4096. Actual: ' + (-65536 >> 4)); \n} \n\n\nif (-131072 >> 4 !== -8192) { \n $ERROR('#146: -131072 >> 4 === -8192. Actual: ' + (-131072 >> 4)); \n} \n\n\nif (-262144 >> 4 !== -16384) { \n $ERROR('#147: -262144 >> 4 === -16384. Actual: ' + (-262144 >> 4)); \n} \n\n\nif (-524288 >> 4 !== -32768) { \n $ERROR('#148: -524288 >> 4 === -32768. Actual: ' + (-524288 >> 4)); \n} \n\n\nif (-1048576 >> 4 !== -65536) { \n $ERROR('#149: -1048576 >> 4 === -65536. Actual: ' + (-1048576 >> 4)); \n} \n\n\nif (-2097152 >> 4 !== -131072) { \n $ERROR('#150: -2097152 >> 4 === -131072. Actual: ' + (-2097152 >> 4)); \n} \n\n\nif (-4194304 >> 4 !== -262144) { \n $ERROR('#151: -4194304 >> 4 === -262144. Actual: ' + (-4194304 >> 4)); \n} \n\n\nif (-8388608 >> 4 !== -524288) { \n $ERROR('#152: -8388608 >> 4 === -524288. Actual: ' + (-8388608 >> 4)); \n} \n\n\nif (-16777216 >> 4 !== -1048576) { \n $ERROR('#153: -16777216 >> 4 === -1048576. Actual: ' + (-16777216 >> 4)); \n} \n\n\nif (-33554432 >> 4 !== -2097152) { \n $ERROR('#154: -33554432 >> 4 === -2097152. Actual: ' + (-33554432 >> 4)); \n} \n\n\nif (-67108864 >> 4 !== -4194304) { \n $ERROR('#155: -67108864 >> 4 === -4194304. Actual: ' + (-67108864 >> 4)); \n} \n\n\nif (-134217728 >> 4 !== -8388608) { \n $ERROR('#156: -134217728 >> 4 === -8388608. Actual: ' + (-134217728 >> 4)); \n} \n\n\nif (-268435456 >> 4 !== -16777216) { \n $ERROR('#157: -268435456 >> 4 === -16777216. Actual: ' + (-268435456 >> 4)); \n} \n\n\nif (-536870912 >> 4 !== -33554432) { \n $ERROR('#158: -536870912 >> 4 === -33554432. Actual: ' + (-536870912 >> 4)); \n} \n\n\nif (-1073741824 >> 4 !== -67108864) { \n $ERROR('#159: -1073741824 >> 4 === -67108864. Actual: ' + (-1073741824 >> 4)); \n} \n\n\nif (-2147483648 >> 4 !== -134217728) { \n $ERROR('#160: -2147483648 >> 4 === -134217728. Actual: ' + (-2147483648 >> 4)); \n} \n\n\nif (-1 >> 5 !== -1) { \n $ERROR('#161: -1 >> 5 === -1. Actual: ' + (-1 >> 5)); \n} \n\n\nif (-2 >> 5 !== -1) { \n $ERROR('#162: -2 >> 5 === -1. Actual: ' + (-2 >> 5)); \n} \n\n\nif (-4 >> 5 !== -1) { \n $ERROR('#163: -4 >> 5 === -1. Actual: ' + (-4 >> 5)); \n} \n\n\nif (-8 >> 5 !== -1) { \n $ERROR('#164: -8 >> 5 === -1. Actual: ' + (-8 >> 5)); \n} \n\n\nif (-16 >> 5 !== -1) { \n $ERROR('#165: -16 >> 5 === -1. Actual: ' + (-16 >> 5)); \n} \n\n\nif (-32 >> 5 !== -1) { \n $ERROR('#166: -32 >> 5 === -1. Actual: ' + (-32 >> 5)); \n} \n\n\nif (-64 >> 5 !== -2) { \n $ERROR('#167: -64 >> 5 === -2. Actual: ' + (-64 >> 5)); \n} \n\n\nif (-128 >> 5 !== -4) { \n $ERROR('#168: -128 >> 5 === -4. Actual: ' + (-128 >> 5)); \n} \n\n\nif (-256 >> 5 !== -8) { \n $ERROR('#169: -256 >> 5 === -8. Actual: ' + (-256 >> 5)); \n} \n\n\nif (-512 >> 5 !== -16) { \n $ERROR('#170: -512 >> 5 === -16. Actual: ' + (-512 >> 5)); \n} \n\n\nif (-1024 >> 5 !== -32) { \n $ERROR('#171: -1024 >> 5 === -32. Actual: ' + (-1024 >> 5)); \n} \n\n\nif (-2048 >> 5 !== -64) { \n $ERROR('#172: -2048 >> 5 === -64. Actual: ' + (-2048 >> 5)); \n} \n\n\nif (-4096 >> 5 !== -128) { \n $ERROR('#173: -4096 >> 5 === -128. Actual: ' + (-4096 >> 5)); \n} \n\n\nif (-8192 >> 5 !== -256) { \n $ERROR('#174: -8192 >> 5 === -256. Actual: ' + (-8192 >> 5)); \n} \n\n\nif (-16384 >> 5 !== -512) { \n $ERROR('#175: -16384 >> 5 === -512. Actual: ' + (-16384 >> 5)); \n} \n\n\nif (-32768 >> 5 !== -1024) { \n $ERROR('#176: -32768 >> 5 === -1024. Actual: ' + (-32768 >> 5)); \n} \n\n\nif (-65536 >> 5 !== -2048) { \n $ERROR('#177: -65536 >> 5 === -2048. Actual: ' + (-65536 >> 5)); \n} \n\n\nif (-131072 >> 5 !== -4096) { \n $ERROR('#178: -131072 >> 5 === -4096. Actual: ' + (-131072 >> 5)); \n} \n\n\nif (-262144 >> 5 !== -8192) { \n $ERROR('#179: -262144 >> 5 === -8192. Actual: ' + (-262144 >> 5)); \n} \n\n\nif (-524288 >> 5 !== -16384) { \n $ERROR('#180: -524288 >> 5 === -16384. Actual: ' + (-524288 >> 5)); \n} \n\n\nif (-1048576 >> 5 !== -32768) { \n $ERROR('#181: -1048576 >> 5 === -32768. Actual: ' + (-1048576 >> 5)); \n} \n\n\nif (-2097152 >> 5 !== -65536) { \n $ERROR('#182: -2097152 >> 5 === -65536. Actual: ' + (-2097152 >> 5)); \n} \n\n\nif (-4194304 >> 5 !== -131072) { \n $ERROR('#183: -4194304 >> 5 === -131072. Actual: ' + (-4194304 >> 5)); \n} \n\n\nif (-8388608 >> 5 !== -262144) { \n $ERROR('#184: -8388608 >> 5 === -262144. Actual: ' + (-8388608 >> 5)); \n} \n\n\nif (-16777216 >> 5 !== -524288) { \n $ERROR('#185: -16777216 >> 5 === -524288. Actual: ' + (-16777216 >> 5)); \n} \n\n\nif (-33554432 >> 5 !== -1048576) { \n $ERROR('#186: -33554432 >> 5 === -1048576. Actual: ' + (-33554432 >> 5)); \n} \n\n\nif (-67108864 >> 5 !== -2097152) { \n $ERROR('#187: -67108864 >> 5 === -2097152. Actual: ' + (-67108864 >> 5)); \n} \n\n\nif (-134217728 >> 5 !== -4194304) { \n $ERROR('#188: -134217728 >> 5 === -4194304. Actual: ' + (-134217728 >> 5)); \n} \n\n\nif (-268435456 >> 5 !== -8388608) { \n $ERROR('#189: -268435456 >> 5 === -8388608. Actual: ' + (-268435456 >> 5)); \n} \n\n\nif (-536870912 >> 5 !== -16777216) { \n $ERROR('#190: -536870912 >> 5 === -16777216. Actual: ' + (-536870912 >> 5)); \n} \n\n\nif (-1073741824 >> 5 !== -33554432) { \n $ERROR('#191: -1073741824 >> 5 === -33554432. Actual: ' + (-1073741824 >> 5)); \n} \n\n\nif (-2147483648 >> 5 !== -67108864) { \n $ERROR('#192: -2147483648 >> 5 === -67108864. Actual: ' + (-2147483648 >> 5)); \n} \n\n\nif (-1 >> 6 !== -1) { \n $ERROR('#193: -1 >> 6 === -1. Actual: ' + (-1 >> 6)); \n} \n\n\nif (-2 >> 6 !== -1) { \n $ERROR('#194: -2 >> 6 === -1. Actual: ' + (-2 >> 6)); \n} \n\n\nif (-4 >> 6 !== -1) { \n $ERROR('#195: -4 >> 6 === -1. Actual: ' + (-4 >> 6)); \n} \n\n\nif (-8 >> 6 !== -1) { \n $ERROR('#196: -8 >> 6 === -1. Actual: ' + (-8 >> 6)); \n} \n\n\nif (-16 >> 6 !== -1) { \n $ERROR('#197: -16 >> 6 === -1. Actual: ' + (-16 >> 6)); \n} \n\n\nif (-32 >> 6 !== -1) { \n $ERROR('#198: -32 >> 6 === -1. Actual: ' + (-32 >> 6)); \n} \n\n\nif (-64 >> 6 !== -1) { \n $ERROR('#199: -64 >> 6 === -1. Actual: ' + (-64 >> 6)); \n} \n\n\nif (-128 >> 6 !== -2) { \n $ERROR('#200: -128 >> 6 === -2. Actual: ' + (-128 >> 6)); \n} \n\n\nif (-256 >> 6 !== -4) { \n $ERROR('#201: -256 >> 6 === -4. Actual: ' + (-256 >> 6)); \n} \n\n\nif (-512 >> 6 !== -8) { \n $ERROR('#202: -512 >> 6 === -8. Actual: ' + (-512 >> 6)); \n} \n\n\nif (-1024 >> 6 !== -16) { \n $ERROR('#203: -1024 >> 6 === -16. Actual: ' + (-1024 >> 6)); \n} \n\n\nif (-2048 >> 6 !== -32) { \n $ERROR('#204: -2048 >> 6 === -32. Actual: ' + (-2048 >> 6)); \n} \n\n\nif (-4096 >> 6 !== -64) { \n $ERROR('#205: -4096 >> 6 === -64. Actual: ' + (-4096 >> 6)); \n} \n\n\nif (-8192 >> 6 !== -128) { \n $ERROR('#206: -8192 >> 6 === -128. Actual: ' + (-8192 >> 6)); \n} \n\n\nif (-16384 >> 6 !== -256) { \n $ERROR('#207: -16384 >> 6 === -256. Actual: ' + (-16384 >> 6)); \n} \n\n\nif (-32768 >> 6 !== -512) { \n $ERROR('#208: -32768 >> 6 === -512. Actual: ' + (-32768 >> 6)); \n} \n\n\nif (-65536 >> 6 !== -1024) { \n $ERROR('#209: -65536 >> 6 === -1024. Actual: ' + (-65536 >> 6)); \n} \n\n\nif (-131072 >> 6 !== -2048) { \n $ERROR('#210: -131072 >> 6 === -2048. Actual: ' + (-131072 >> 6)); \n} \n\n\nif (-262144 >> 6 !== -4096) { \n $ERROR('#211: -262144 >> 6 === -4096. Actual: ' + (-262144 >> 6)); \n} \n\n\nif (-524288 >> 6 !== -8192) { \n $ERROR('#212: -524288 >> 6 === -8192. Actual: ' + (-524288 >> 6)); \n} \n\n\nif (-1048576 >> 6 !== -16384) { \n $ERROR('#213: -1048576 >> 6 === -16384. Actual: ' + (-1048576 >> 6)); \n} \n\n\nif (-2097152 >> 6 !== -32768) { \n $ERROR('#214: -2097152 >> 6 === -32768. Actual: ' + (-2097152 >> 6)); \n} \n\n\nif (-4194304 >> 6 !== -65536) { \n $ERROR('#215: -4194304 >> 6 === -65536. Actual: ' + (-4194304 >> 6)); \n} \n\n\nif (-8388608 >> 6 !== -131072) { \n $ERROR('#216: -8388608 >> 6 === -131072. Actual: ' + (-8388608 >> 6)); \n} \n\n\nif (-16777216 >> 6 !== -262144) { \n $ERROR('#217: -16777216 >> 6 === -262144. Actual: ' + (-16777216 >> 6)); \n} \n\n\nif (-33554432 >> 6 !== -524288) { \n $ERROR('#218: -33554432 >> 6 === -524288. Actual: ' + (-33554432 >> 6)); \n} \n\n\nif (-67108864 >> 6 !== -1048576) { \n $ERROR('#219: -67108864 >> 6 === -1048576. Actual: ' + (-67108864 >> 6)); \n} \n\n\nif (-134217728 >> 6 !== -2097152) { \n $ERROR('#220: -134217728 >> 6 === -2097152. Actual: ' + (-134217728 >> 6)); \n} \n\n\nif (-268435456 >> 6 !== -4194304) { \n $ERROR('#221: -268435456 >> 6 === -4194304. Actual: ' + (-268435456 >> 6)); \n} \n\n\nif (-536870912 >> 6 !== -8388608) { \n $ERROR('#222: -536870912 >> 6 === -8388608. Actual: ' + (-536870912 >> 6)); \n} \n\n\nif (-1073741824 >> 6 !== -16777216) { \n $ERROR('#223: -1073741824 >> 6 === -16777216. Actual: ' + (-1073741824 >> 6)); \n} \n\n\nif (-2147483648 >> 6 !== -33554432) { \n $ERROR('#224: -2147483648 >> 6 === -33554432. Actual: ' + (-2147483648 >> 6)); \n} \n\n\nif (-1 >> 7 !== -1) { \n $ERROR('#225: -1 >> 7 === -1. Actual: ' + (-1 >> 7)); \n} \n\n\nif (-2 >> 7 !== -1) { \n $ERROR('#226: -2 >> 7 === -1. Actual: ' + (-2 >> 7)); \n} \n\n\nif (-4 >> 7 !== -1) { \n $ERROR('#227: -4 >> 7 === -1. Actual: ' + (-4 >> 7)); \n} \n\n\nif (-8 >> 7 !== -1) { \n $ERROR('#228: -8 >> 7 === -1. Actual: ' + (-8 >> 7)); \n} \n\n\nif (-16 >> 7 !== -1) { \n $ERROR('#229: -16 >> 7 === -1. Actual: ' + (-16 >> 7)); \n} \n\n\nif (-32 >> 7 !== -1) { \n $ERROR('#230: -32 >> 7 === -1. Actual: ' + (-32 >> 7)); \n} \n\n\nif (-64 >> 7 !== -1) { \n $ERROR('#231: -64 >> 7 === -1. Actual: ' + (-64 >> 7)); \n} \n\n\nif (-128 >> 7 !== -1) { \n $ERROR('#232: -128 >> 7 === -1. Actual: ' + (-128 >> 7)); \n} \n\n\nif (-256 >> 7 !== -2) { \n $ERROR('#233: -256 >> 7 === -2. Actual: ' + (-256 >> 7)); \n} \n\n\nif (-512 >> 7 !== -4) { \n $ERROR('#234: -512 >> 7 === -4. Actual: ' + (-512 >> 7)); \n} \n\n\nif (-1024 >> 7 !== -8) { \n $ERROR('#235: -1024 >> 7 === -8. Actual: ' + (-1024 >> 7)); \n} \n\n\nif (-2048 >> 7 !== -16) { \n $ERROR('#236: -2048 >> 7 === -16. Actual: ' + (-2048 >> 7)); \n} \n\n\nif (-4096 >> 7 !== -32) { \n $ERROR('#237: -4096 >> 7 === -32. Actual: ' + (-4096 >> 7)); \n} \n\n\nif (-8192 >> 7 !== -64) { \n $ERROR('#238: -8192 >> 7 === -64. Actual: ' + (-8192 >> 7)); \n} \n\n\nif (-16384 >> 7 !== -128) { \n $ERROR('#239: -16384 >> 7 === -128. Actual: ' + (-16384 >> 7)); \n} \n\n\nif (-32768 >> 7 !== -256) { \n $ERROR('#240: -32768 >> 7 === -256. Actual: ' + (-32768 >> 7)); \n} \n\n\nif (-65536 >> 7 !== -512) { \n $ERROR('#241: -65536 >> 7 === -512. Actual: ' + (-65536 >> 7)); \n} \n\n\nif (-131072 >> 7 !== -1024) { \n $ERROR('#242: -131072 >> 7 === -1024. Actual: ' + (-131072 >> 7)); \n} \n\n\nif (-262144 >> 7 !== -2048) { \n $ERROR('#243: -262144 >> 7 === -2048. Actual: ' + (-262144 >> 7)); \n} \n\n\nif (-524288 >> 7 !== -4096) { \n $ERROR('#244: -524288 >> 7 === -4096. Actual: ' + (-524288 >> 7)); \n} \n\n\nif (-1048576 >> 7 !== -8192) { \n $ERROR('#245: -1048576 >> 7 === -8192. Actual: ' + (-1048576 >> 7)); \n} \n\n\nif (-2097152 >> 7 !== -16384) { \n $ERROR('#246: -2097152 >> 7 === -16384. Actual: ' + (-2097152 >> 7)); \n} \n\n\nif (-4194304 >> 7 !== -32768) { \n $ERROR('#247: -4194304 >> 7 === -32768. Actual: ' + (-4194304 >> 7)); \n} \n\n\nif (-8388608 >> 7 !== -65536) { \n $ERROR('#248: -8388608 >> 7 === -65536. Actual: ' + (-8388608 >> 7)); \n} \n\n\nif (-16777216 >> 7 !== -131072) { \n $ERROR('#249: -16777216 >> 7 === -131072. Actual: ' + (-16777216 >> 7)); \n} \n\n\nif (-33554432 >> 7 !== -262144) { \n $ERROR('#250: -33554432 >> 7 === -262144. Actual: ' + (-33554432 >> 7)); \n} \n\n\nif (-67108864 >> 7 !== -524288) { \n $ERROR('#251: -67108864 >> 7 === -524288. Actual: ' + (-67108864 >> 7)); \n} \n\n\nif (-134217728 >> 7 !== -1048576) { \n $ERROR('#252: -134217728 >> 7 === -1048576. Actual: ' + (-134217728 >> 7)); \n} \n\n\nif (-268435456 >> 7 !== -2097152) { \n $ERROR('#253: -268435456 >> 7 === -2097152. Actual: ' + (-268435456 >> 7)); \n} \n\n\nif (-536870912 >> 7 !== -4194304) { \n $ERROR('#254: -536870912 >> 7 === -4194304. Actual: ' + (-536870912 >> 7)); \n} \n\n\nif (-1073741824 >> 7 !== -8388608) { \n $ERROR('#255: -1073741824 >> 7 === -8388608. Actual: ' + (-1073741824 >> 7)); \n} \n\n\nif (-2147483648 >> 7 !== -16777216) { \n $ERROR('#256: -2147483648 >> 7 === -16777216. Actual: ' + (-2147483648 >> 7)); \n} \n\n\nif (-1 >> 8 !== -1) { \n $ERROR('#257: -1 >> 8 === -1. Actual: ' + (-1 >> 8)); \n} \n\n\nif (-2 >> 8 !== -1) { \n $ERROR('#258: -2 >> 8 === -1. Actual: ' + (-2 >> 8)); \n} \n\n\nif (-4 >> 8 !== -1) { \n $ERROR('#259: -4 >> 8 === -1. Actual: ' + (-4 >> 8)); \n} \n\n\nif (-8 >> 8 !== -1) { \n $ERROR('#260: -8 >> 8 === -1. Actual: ' + (-8 >> 8)); \n} \n\n\nif (-16 >> 8 !== -1) { \n $ERROR('#261: -16 >> 8 === -1. Actual: ' + (-16 >> 8)); \n} \n\n\nif (-32 >> 8 !== -1) { \n $ERROR('#262: -32 >> 8 === -1. Actual: ' + (-32 >> 8)); \n} \n\n\nif (-64 >> 8 !== -1) { \n $ERROR('#263: -64 >> 8 === -1. Actual: ' + (-64 >> 8)); \n} \n\n\nif (-128 >> 8 !== -1) { \n $ERROR('#264: -128 >> 8 === -1. Actual: ' + (-128 >> 8)); \n} \n\n\nif (-256 >> 8 !== -1) { \n $ERROR('#265: -256 >> 8 === -1. Actual: ' + (-256 >> 8)); \n} \n\n\nif (-512 >> 8 !== -2) { \n $ERROR('#266: -512 >> 8 === -2. Actual: ' + (-512 >> 8)); \n} \n\n\nif (-1024 >> 8 !== -4) { \n $ERROR('#267: -1024 >> 8 === -4. Actual: ' + (-1024 >> 8)); \n} \n\n\nif (-2048 >> 8 !== -8) { \n $ERROR('#268: -2048 >> 8 === -8. Actual: ' + (-2048 >> 8)); \n} \n\n\nif (-4096 >> 8 !== -16) { \n $ERROR('#269: -4096 >> 8 === -16. Actual: ' + (-4096 >> 8)); \n} \n\n\nif (-8192 >> 8 !== -32) { \n $ERROR('#270: -8192 >> 8 === -32. Actual: ' + (-8192 >> 8)); \n} \n\n\nif (-16384 >> 8 !== -64) { \n $ERROR('#271: -16384 >> 8 === -64. Actual: ' + (-16384 >> 8)); \n} \n\n\nif (-32768 >> 8 !== -128) { \n $ERROR('#272: -32768 >> 8 === -128. Actual: ' + (-32768 >> 8)); \n} \n\n\nif (-65536 >> 8 !== -256) { \n $ERROR('#273: -65536 >> 8 === -256. Actual: ' + (-65536 >> 8)); \n} \n\n\nif (-131072 >> 8 !== -512) { \n $ERROR('#274: -131072 >> 8 === -512. Actual: ' + (-131072 >> 8)); \n} \n\n\nif (-262144 >> 8 !== -1024) { \n $ERROR('#275: -262144 >> 8 === -1024. Actual: ' + (-262144 >> 8)); \n} \n\n\nif (-524288 >> 8 !== -2048) { \n $ERROR('#276: -524288 >> 8 === -2048. Actual: ' + (-524288 >> 8)); \n} \n\n\nif (-1048576 >> 8 !== -4096) { \n $ERROR('#277: -1048576 >> 8 === -4096. Actual: ' + (-1048576 >> 8)); \n} \n\n\nif (-2097152 >> 8 !== -8192) { \n $ERROR('#278: -2097152 >> 8 === -8192. Actual: ' + (-2097152 >> 8)); \n} \n\n\nif (-4194304 >> 8 !== -16384) { \n $ERROR('#279: -4194304 >> 8 === -16384. Actual: ' + (-4194304 >> 8)); \n} \n\n\nif (-8388608 >> 8 !== -32768) { \n $ERROR('#280: -8388608 >> 8 === -32768. Actual: ' + (-8388608 >> 8)); \n} \n\n\nif (-16777216 >> 8 !== -65536) { \n $ERROR('#281: -16777216 >> 8 === -65536. Actual: ' + (-16777216 >> 8)); \n} \n\n\nif (-33554432 >> 8 !== -131072) { \n $ERROR('#282: -33554432 >> 8 === -131072. Actual: ' + (-33554432 >> 8)); \n} \n\n\nif (-67108864 >> 8 !== -262144) { \n $ERROR('#283: -67108864 >> 8 === -262144. Actual: ' + (-67108864 >> 8)); \n} \n\n\nif (-134217728 >> 8 !== -524288) { \n $ERROR('#284: -134217728 >> 8 === -524288. Actual: ' + (-134217728 >> 8)); \n} \n\n\nif (-268435456 >> 8 !== -1048576) { \n $ERROR('#285: -268435456 >> 8 === -1048576. Actual: ' + (-268435456 >> 8)); \n} \n\n\nif (-536870912 >> 8 !== -2097152) { \n $ERROR('#286: -536870912 >> 8 === -2097152. Actual: ' + (-536870912 >> 8)); \n} \n\n\nif (-1073741824 >> 8 !== -4194304) { \n $ERROR('#287: -1073741824 >> 8 === -4194304. Actual: ' + (-1073741824 >> 8)); \n} \n\n\nif (-2147483648 >> 8 !== -8388608) { \n $ERROR('#288: -2147483648 >> 8 === -8388608. Actual: ' + (-2147483648 >> 8)); \n} \n\n\nif (-1 >> 9 !== -1) { \n $ERROR('#289: -1 >> 9 === -1. Actual: ' + (-1 >> 9)); \n} \n\n\nif (-2 >> 9 !== -1) { \n $ERROR('#290: -2 >> 9 === -1. Actual: ' + (-2 >> 9)); \n} \n\n\nif (-4 >> 9 !== -1) { \n $ERROR('#291: -4 >> 9 === -1. Actual: ' + (-4 >> 9)); \n} \n\n\nif (-8 >> 9 !== -1) { \n $ERROR('#292: -8 >> 9 === -1. Actual: ' + (-8 >> 9)); \n} \n\n\nif (-16 >> 9 !== -1) { \n $ERROR('#293: -16 >> 9 === -1. Actual: ' + (-16 >> 9)); \n} \n\n\nif (-32 >> 9 !== -1) { \n $ERROR('#294: -32 >> 9 === -1. Actual: ' + (-32 >> 9)); \n} \n\n\nif (-64 >> 9 !== -1) { \n $ERROR('#295: -64 >> 9 === -1. Actual: ' + (-64 >> 9)); \n} \n\n\nif (-128 >> 9 !== -1) { \n $ERROR('#296: -128 >> 9 === -1. Actual: ' + (-128 >> 9)); \n} \n\n\nif (-256 >> 9 !== -1) { \n $ERROR('#297: -256 >> 9 === -1. Actual: ' + (-256 >> 9)); \n} \n\n\nif (-512 >> 9 !== -1) { \n $ERROR('#298: -512 >> 9 === -1. Actual: ' + (-512 >> 9)); \n} \n\n\nif (-1024 >> 9 !== -2) { \n $ERROR('#299: -1024 >> 9 === -2. Actual: ' + (-1024 >> 9)); \n} \n\n\nif (-2048 >> 9 !== -4) { \n $ERROR('#300: -2048 >> 9 === -4. Actual: ' + (-2048 >> 9)); \n} \n\n\nif (-4096 >> 9 !== -8) { \n $ERROR('#301: -4096 >> 9 === -8. Actual: ' + (-4096 >> 9)); \n} \n\n\nif (-8192 >> 9 !== -16) { \n $ERROR('#302: -8192 >> 9 === -16. Actual: ' + (-8192 >> 9)); \n} \n\n\nif (-16384 >> 9 !== -32) { \n $ERROR('#303: -16384 >> 9 === -32. Actual: ' + (-16384 >> 9)); \n} \n\n\nif (-32768 >> 9 !== -64) { \n $ERROR('#304: -32768 >> 9 === -64. Actual: ' + (-32768 >> 9)); \n} \n\n\nif (-65536 >> 9 !== -128) { \n $ERROR('#305: -65536 >> 9 === -128. Actual: ' + (-65536 >> 9)); \n} \n\n\nif (-131072 >> 9 !== -256) { \n $ERROR('#306: -131072 >> 9 === -256. Actual: ' + (-131072 >> 9)); \n} \n\n\nif (-262144 >> 9 !== -512) { \n $ERROR('#307: -262144 >> 9 === -512. Actual: ' + (-262144 >> 9)); \n} \n\n\nif (-524288 >> 9 !== -1024) { \n $ERROR('#308: -524288 >> 9 === -1024. Actual: ' + (-524288 >> 9)); \n} \n\n\nif (-1048576 >> 9 !== -2048) { \n $ERROR('#309: -1048576 >> 9 === -2048. Actual: ' + (-1048576 >> 9)); \n} \n\n\nif (-2097152 >> 9 !== -4096) { \n $ERROR('#310: -2097152 >> 9 === -4096. Actual: ' + (-2097152 >> 9)); \n} \n\n\nif (-4194304 >> 9 !== -8192) { \n $ERROR('#311: -4194304 >> 9 === -8192. Actual: ' + (-4194304 >> 9)); \n} \n\n\nif (-8388608 >> 9 !== -16384) { \n $ERROR('#312: -8388608 >> 9 === -16384. Actual: ' + (-8388608 >> 9)); \n} \n\n\nif (-16777216 >> 9 !== -32768) { \n $ERROR('#313: -16777216 >> 9 === -32768. Actual: ' + (-16777216 >> 9)); \n} \n\n\nif (-33554432 >> 9 !== -65536) { \n $ERROR('#314: -33554432 >> 9 === -65536. Actual: ' + (-33554432 >> 9)); \n} \n\n\nif (-67108864 >> 9 !== -131072) { \n $ERROR('#315: -67108864 >> 9 === -131072. Actual: ' + (-67108864 >> 9)); \n} \n\n\nif (-134217728 >> 9 !== -262144) { \n $ERROR('#316: -134217728 >> 9 === -262144. Actual: ' + (-134217728 >> 9)); \n} \n\n\nif (-268435456 >> 9 !== -524288) { \n $ERROR('#317: -268435456 >> 9 === -524288. Actual: ' + (-268435456 >> 9)); \n} \n\n\nif (-536870912 >> 9 !== -1048576) { \n $ERROR('#318: -536870912 >> 9 === -1048576. Actual: ' + (-536870912 >> 9)); \n} \n\n\nif (-1073741824 >> 9 !== -2097152) { \n $ERROR('#319: -1073741824 >> 9 === -2097152. Actual: ' + (-1073741824 >> 9)); \n} \n\n\nif (-2147483648 >> 9 !== -4194304) { \n $ERROR('#320: -2147483648 >> 9 === -4194304. Actual: ' + (-2147483648 >> 9)); \n} \n\n\nif (-1 >> 10 !== -1) { \n $ERROR('#321: -1 >> 10 === -1. Actual: ' + (-1 >> 10)); \n} \n\n\nif (-2 >> 10 !== -1) { \n $ERROR('#322: -2 >> 10 === -1. Actual: ' + (-2 >> 10)); \n} \n\n\nif (-4 >> 10 !== -1) { \n $ERROR('#323: -4 >> 10 === -1. Actual: ' + (-4 >> 10)); \n} \n\n\nif (-8 >> 10 !== -1) { \n $ERROR('#324: -8 >> 10 === -1. Actual: ' + (-8 >> 10)); \n} \n\n\nif (-16 >> 10 !== -1) { \n $ERROR('#325: -16 >> 10 === -1. Actual: ' + (-16 >> 10)); \n} \n\n\nif (-32 >> 10 !== -1) { \n $ERROR('#326: -32 >> 10 === -1. Actual: ' + (-32 >> 10)); \n} \n\n\nif (-64 >> 10 !== -1) { \n $ERROR('#327: -64 >> 10 === -1. Actual: ' + (-64 >> 10)); \n} \n\n\nif (-128 >> 10 !== -1) { \n $ERROR('#328: -128 >> 10 === -1. Actual: ' + (-128 >> 10)); \n} \n\n\nif (-256 >> 10 !== -1) { \n $ERROR('#329: -256 >> 10 === -1. Actual: ' + (-256 >> 10)); \n} \n\n\nif (-512 >> 10 !== -1) { \n $ERROR('#330: -512 >> 10 === -1. Actual: ' + (-512 >> 10)); \n} \n\n\nif (-1024 >> 10 !== -1) { \n $ERROR('#331: -1024 >> 10 === -1. Actual: ' + (-1024 >> 10)); \n} \n\n\nif (-2048 >> 10 !== -2) { \n $ERROR('#332: -2048 >> 10 === -2. Actual: ' + (-2048 >> 10)); \n} \n\n\nif (-4096 >> 10 !== -4) { \n $ERROR('#333: -4096 >> 10 === -4. Actual: ' + (-4096 >> 10)); \n} \n\n\nif (-8192 >> 10 !== -8) { \n $ERROR('#334: -8192 >> 10 === -8. Actual: ' + (-8192 >> 10)); \n} \n\n\nif (-16384 >> 10 !== -16) { \n $ERROR('#335: -16384 >> 10 === -16. Actual: ' + (-16384 >> 10)); \n} \n\n\nif (-32768 >> 10 !== -32) { \n $ERROR('#336: -32768 >> 10 === -32. Actual: ' + (-32768 >> 10)); \n} \n\n\nif (-65536 >> 10 !== -64) { \n $ERROR('#337: -65536 >> 10 === -64. Actual: ' + (-65536 >> 10)); \n} \n\n\nif (-131072 >> 10 !== -128) { \n $ERROR('#338: -131072 >> 10 === -128. Actual: ' + (-131072 >> 10)); \n} \n\n\nif (-262144 >> 10 !== -256) { \n $ERROR('#339: -262144 >> 10 === -256. Actual: ' + (-262144 >> 10)); \n} \n\n\nif (-524288 >> 10 !== -512) { \n $ERROR('#340: -524288 >> 10 === -512. Actual: ' + (-524288 >> 10)); \n} \n\n\nif (-1048576 >> 10 !== -1024) { \n $ERROR('#341: -1048576 >> 10 === -1024. Actual: ' + (-1048576 >> 10)); \n} \n\n\nif (-2097152 >> 10 !== -2048) { \n $ERROR('#342: -2097152 >> 10 === -2048. Actual: ' + (-2097152 >> 10)); \n} \n\n\nif (-4194304 >> 10 !== -4096) { \n $ERROR('#343: -4194304 >> 10 === -4096. Actual: ' + (-4194304 >> 10)); \n} \n\n\nif (-8388608 >> 10 !== -8192) { \n $ERROR('#344: -8388608 >> 10 === -8192. Actual: ' + (-8388608 >> 10)); \n} \n\n\nif (-16777216 >> 10 !== -16384) { \n $ERROR('#345: -16777216 >> 10 === -16384. Actual: ' + (-16777216 >> 10)); \n} \n\n\nif (-33554432 >> 10 !== -32768) { \n $ERROR('#346: -33554432 >> 10 === -32768. Actual: ' + (-33554432 >> 10)); \n} \n\n\nif (-67108864 >> 10 !== -65536) { \n $ERROR('#347: -67108864 >> 10 === -65536. Actual: ' + (-67108864 >> 10)); \n} \n\n\nif (-134217728 >> 10 !== -131072) { \n $ERROR('#348: -134217728 >> 10 === -131072. Actual: ' + (-134217728 >> 10)); \n} \n\n\nif (-268435456 >> 10 !== -262144) { \n $ERROR('#349: -268435456 >> 10 === -262144. Actual: ' + (-268435456 >> 10)); \n} \n\n\nif (-536870912 >> 10 !== -524288) { \n $ERROR('#350: -536870912 >> 10 === -524288. Actual: ' + (-536870912 >> 10)); \n} \n\n\nif (-1073741824 >> 10 !== -1048576) { \n $ERROR('#351: -1073741824 >> 10 === -1048576. Actual: ' + (-1073741824 >> 10)); \n} \n\n\nif (-2147483648 >> 10 !== -2097152) { \n $ERROR('#352: -2147483648 >> 10 === -2097152. Actual: ' + (-2147483648 >> 10)); \n} \n\n\nif (-1 >> 11 !== -1) { \n $ERROR('#353: -1 >> 11 === -1. Actual: ' + (-1 >> 11)); \n} \n\n\nif (-2 >> 11 !== -1) { \n $ERROR('#354: -2 >> 11 === -1. Actual: ' + (-2 >> 11)); \n} \n\n\nif (-4 >> 11 !== -1) { \n $ERROR('#355: -4 >> 11 === -1. Actual: ' + (-4 >> 11)); \n} \n\n\nif (-8 >> 11 !== -1) { \n $ERROR('#356: -8 >> 11 === -1. Actual: ' + (-8 >> 11)); \n} \n\n\nif (-16 >> 11 !== -1) { \n $ERROR('#357: -16 >> 11 === -1. Actual: ' + (-16 >> 11)); \n} \n\n\nif (-32 >> 11 !== -1) { \n $ERROR('#358: -32 >> 11 === -1. Actual: ' + (-32 >> 11)); \n} \n\n\nif (-64 >> 11 !== -1) { \n $ERROR('#359: -64 >> 11 === -1. Actual: ' + (-64 >> 11)); \n} \n\n\nif (-128 >> 11 !== -1) { \n $ERROR('#360: -128 >> 11 === -1. Actual: ' + (-128 >> 11)); \n} \n\n\nif (-256 >> 11 !== -1) { \n $ERROR('#361: -256 >> 11 === -1. Actual: ' + (-256 >> 11)); \n} \n\n\nif (-512 >> 11 !== -1) { \n $ERROR('#362: -512 >> 11 === -1. Actual: ' + (-512 >> 11)); \n} \n\n\nif (-1024 >> 11 !== -1) { \n $ERROR('#363: -1024 >> 11 === -1. Actual: ' + (-1024 >> 11)); \n} \n\n\nif (-2048 >> 11 !== -1) { \n $ERROR('#364: -2048 >> 11 === -1. Actual: ' + (-2048 >> 11)); \n} \n\n\nif (-4096 >> 11 !== -2) { \n $ERROR('#365: -4096 >> 11 === -2. Actual: ' + (-4096 >> 11)); \n} \n\n\nif (-8192 >> 11 !== -4) { \n $ERROR('#366: -8192 >> 11 === -4. Actual: ' + (-8192 >> 11)); \n} \n\n\nif (-16384 >> 11 !== -8) { \n $ERROR('#367: -16384 >> 11 === -8. Actual: ' + (-16384 >> 11)); \n} \n\n\nif (-32768 >> 11 !== -16) { \n $ERROR('#368: -32768 >> 11 === -16. Actual: ' + (-32768 >> 11)); \n} \n\n\nif (-65536 >> 11 !== -32) { \n $ERROR('#369: -65536 >> 11 === -32. Actual: ' + (-65536 >> 11)); \n} \n\n\nif (-131072 >> 11 !== -64) { \n $ERROR('#370: -131072 >> 11 === -64. Actual: ' + (-131072 >> 11)); \n} \n\n\nif (-262144 >> 11 !== -128) { \n $ERROR('#371: -262144 >> 11 === -128. Actual: ' + (-262144 >> 11)); \n} \n\n\nif (-524288 >> 11 !== -256) { \n $ERROR('#372: -524288 >> 11 === -256. Actual: ' + (-524288 >> 11)); \n} \n\n\nif (-1048576 >> 11 !== -512) { \n $ERROR('#373: -1048576 >> 11 === -512. Actual: ' + (-1048576 >> 11)); \n} \n\n\nif (-2097152 >> 11 !== -1024) { \n $ERROR('#374: -2097152 >> 11 === -1024. Actual: ' + (-2097152 >> 11)); \n} \n\n\nif (-4194304 >> 11 !== -2048) { \n $ERROR('#375: -4194304 >> 11 === -2048. Actual: ' + (-4194304 >> 11)); \n} \n\n\nif (-8388608 >> 11 !== -4096) { \n $ERROR('#376: -8388608 >> 11 === -4096. Actual: ' + (-8388608 >> 11)); \n} \n\n\nif (-16777216 >> 11 !== -8192) { \n $ERROR('#377: -16777216 >> 11 === -8192. Actual: ' + (-16777216 >> 11)); \n} \n\n\nif (-33554432 >> 11 !== -16384) { \n $ERROR('#378: -33554432 >> 11 === -16384. Actual: ' + (-33554432 >> 11)); \n} \n\n\nif (-67108864 >> 11 !== -32768) { \n $ERROR('#379: -67108864 >> 11 === -32768. Actual: ' + (-67108864 >> 11)); \n} \n\n\nif (-134217728 >> 11 !== -65536) { \n $ERROR('#380: -134217728 >> 11 === -65536. Actual: ' + (-134217728 >> 11)); \n} \n\n\nif (-268435456 >> 11 !== -131072) { \n $ERROR('#381: -268435456 >> 11 === -131072. Actual: ' + (-268435456 >> 11)); \n} \n\n\nif (-536870912 >> 11 !== -262144) { \n $ERROR('#382: -536870912 >> 11 === -262144. Actual: ' + (-536870912 >> 11)); \n} \n\n\nif (-1073741824 >> 11 !== -524288) { \n $ERROR('#383: -1073741824 >> 11 === -524288. Actual: ' + (-1073741824 >> 11)); \n} \n\n\nif (-2147483648 >> 11 !== -1048576) { \n $ERROR('#384: -2147483648 >> 11 === -1048576. Actual: ' + (-2147483648 >> 11)); \n} \n\n\nif (-1 >> 12 !== -1) { \n $ERROR('#385: -1 >> 12 === -1. Actual: ' + (-1 >> 12)); \n} \n\n\nif (-2 >> 12 !== -1) { \n $ERROR('#386: -2 >> 12 === -1. Actual: ' + (-2 >> 12)); \n} \n\n\nif (-4 >> 12 !== -1) { \n $ERROR('#387: -4 >> 12 === -1. Actual: ' + (-4 >> 12)); \n} \n\n\nif (-8 >> 12 !== -1) { \n $ERROR('#388: -8 >> 12 === -1. Actual: ' + (-8 >> 12)); \n} \n\n\nif (-16 >> 12 !== -1) { \n $ERROR('#389: -16 >> 12 === -1. Actual: ' + (-16 >> 12)); \n} \n\n\nif (-32 >> 12 !== -1) { \n $ERROR('#390: -32 >> 12 === -1. Actual: ' + (-32 >> 12)); \n} \n\n\nif (-64 >> 12 !== -1) { \n $ERROR('#391: -64 >> 12 === -1. Actual: ' + (-64 >> 12)); \n} \n\n\nif (-128 >> 12 !== -1) { \n $ERROR('#392: -128 >> 12 === -1. Actual: ' + (-128 >> 12)); \n} \n\n\nif (-256 >> 12 !== -1) { \n $ERROR('#393: -256 >> 12 === -1. Actual: ' + (-256 >> 12)); \n} \n\n\nif (-512 >> 12 !== -1) { \n $ERROR('#394: -512 >> 12 === -1. Actual: ' + (-512 >> 12)); \n} \n\n\nif (-1024 >> 12 !== -1) { \n $ERROR('#395: -1024 >> 12 === -1. Actual: ' + (-1024 >> 12)); \n} \n\n\nif (-2048 >> 12 !== -1) { \n $ERROR('#396: -2048 >> 12 === -1. Actual: ' + (-2048 >> 12)); \n} \n\n\nif (-4096 >> 12 !== -1) { \n $ERROR('#397: -4096 >> 12 === -1. Actual: ' + (-4096 >> 12)); \n} \n\n\nif (-8192 >> 12 !== -2) { \n $ERROR('#398: -8192 >> 12 === -2. Actual: ' + (-8192 >> 12)); \n} \n\n\nif (-16384 >> 12 !== -4) { \n $ERROR('#399: -16384 >> 12 === -4. Actual: ' + (-16384 >> 12)); \n} \n\n\nif (-32768 >> 12 !== -8) { \n $ERROR('#400: -32768 >> 12 === -8. Actual: ' + (-32768 >> 12)); \n} \n\n\nif (-65536 >> 12 !== -16) { \n $ERROR('#401: -65536 >> 12 === -16. Actual: ' + (-65536 >> 12)); \n} \n\n\nif (-131072 >> 12 !== -32) { \n $ERROR('#402: -131072 >> 12 === -32. Actual: ' + (-131072 >> 12)); \n} \n\n\nif (-262144 >> 12 !== -64) { \n $ERROR('#403: -262144 >> 12 === -64. Actual: ' + (-262144 >> 12)); \n} \n\n\nif (-524288 >> 12 !== -128) { \n $ERROR('#404: -524288 >> 12 === -128. Actual: ' + (-524288 >> 12)); \n} \n\n\nif (-1048576 >> 12 !== -256) { \n $ERROR('#405: -1048576 >> 12 === -256. Actual: ' + (-1048576 >> 12)); \n} \n\n\nif (-2097152 >> 12 !== -512) { \n $ERROR('#406: -2097152 >> 12 === -512. Actual: ' + (-2097152 >> 12)); \n} \n\n\nif (-4194304 >> 12 !== -1024) { \n $ERROR('#407: -4194304 >> 12 === -1024. Actual: ' + (-4194304 >> 12)); \n} \n\n\nif (-8388608 >> 12 !== -2048) { \n $ERROR('#408: -8388608 >> 12 === -2048. Actual: ' + (-8388608 >> 12)); \n} \n\n\nif (-16777216 >> 12 !== -4096) { \n $ERROR('#409: -16777216 >> 12 === -4096. Actual: ' + (-16777216 >> 12)); \n} \n\n\nif (-33554432 >> 12 !== -8192) { \n $ERROR('#410: -33554432 >> 12 === -8192. Actual: ' + (-33554432 >> 12)); \n} \n\n\nif (-67108864 >> 12 !== -16384) { \n $ERROR('#411: -67108864 >> 12 === -16384. Actual: ' + (-67108864 >> 12)); \n} \n\n\nif (-134217728 >> 12 !== -32768) { \n $ERROR('#412: -134217728 >> 12 === -32768. Actual: ' + (-134217728 >> 12)); \n} \n\n\nif (-268435456 >> 12 !== -65536) { \n $ERROR('#413: -268435456 >> 12 === -65536. Actual: ' + (-268435456 >> 12)); \n} \n\n\nif (-536870912 >> 12 !== -131072) { \n $ERROR('#414: -536870912 >> 12 === -131072. Actual: ' + (-536870912 >> 12)); \n} \n\n\nif (-1073741824 >> 12 !== -262144) { \n $ERROR('#415: -1073741824 >> 12 === -262144. Actual: ' + (-1073741824 >> 12)); \n} \n\n\nif (-2147483648 >> 12 !== -524288) { \n $ERROR('#416: -2147483648 >> 12 === -524288. Actual: ' + (-2147483648 >> 12)); \n} \n\n\nif (-1 >> 13 !== -1) { \n $ERROR('#417: -1 >> 13 === -1. Actual: ' + (-1 >> 13)); \n} \n\n\nif (-2 >> 13 !== -1) { \n $ERROR('#418: -2 >> 13 === -1. Actual: ' + (-2 >> 13)); \n} \n\n\nif (-4 >> 13 !== -1) { \n $ERROR('#419: -4 >> 13 === -1. Actual: ' + (-4 >> 13)); \n} \n\n\nif (-8 >> 13 !== -1) { \n $ERROR('#420: -8 >> 13 === -1. Actual: ' + (-8 >> 13)); \n} \n\n\nif (-16 >> 13 !== -1) { \n $ERROR('#421: -16 >> 13 === -1. Actual: ' + (-16 >> 13)); \n} \n\n\nif (-32 >> 13 !== -1) { \n $ERROR('#422: -32 >> 13 === -1. Actual: ' + (-32 >> 13)); \n} \n\n\nif (-64 >> 13 !== -1) { \n $ERROR('#423: -64 >> 13 === -1. Actual: ' + (-64 >> 13)); \n} \n\n\nif (-128 >> 13 !== -1) { \n $ERROR('#424: -128 >> 13 === -1. Actual: ' + (-128 >> 13)); \n} \n\n\nif (-256 >> 13 !== -1) { \n $ERROR('#425: -256 >> 13 === -1. Actual: ' + (-256 >> 13)); \n} \n\n\nif (-512 >> 13 !== -1) { \n $ERROR('#426: -512 >> 13 === -1. Actual: ' + (-512 >> 13)); \n} \n\n\nif (-1024 >> 13 !== -1) { \n $ERROR('#427: -1024 >> 13 === -1. Actual: ' + (-1024 >> 13)); \n} \n\n\nif (-2048 >> 13 !== -1) { \n $ERROR('#428: -2048 >> 13 === -1. Actual: ' + (-2048 >> 13)); \n} \n\n\nif (-4096 >> 13 !== -1) { \n $ERROR('#429: -4096 >> 13 === -1. Actual: ' + (-4096 >> 13)); \n} \n\n\nif (-8192 >> 13 !== -1) { \n $ERROR('#430: -8192 >> 13 === -1. Actual: ' + (-8192 >> 13)); \n} \n\n\nif (-16384 >> 13 !== -2) { \n $ERROR('#431: -16384 >> 13 === -2. Actual: ' + (-16384 >> 13)); \n} \n\n\nif (-32768 >> 13 !== -4) { \n $ERROR('#432: -32768 >> 13 === -4. Actual: ' + (-32768 >> 13)); \n} \n\n\nif (-65536 >> 13 !== -8) { \n $ERROR('#433: -65536 >> 13 === -8. Actual: ' + (-65536 >> 13)); \n} \n\n\nif (-131072 >> 13 !== -16) { \n $ERROR('#434: -131072 >> 13 === -16. Actual: ' + (-131072 >> 13)); \n} \n\n\nif (-262144 >> 13 !== -32) { \n $ERROR('#435: -262144 >> 13 === -32. Actual: ' + (-262144 >> 13)); \n} \n\n\nif (-524288 >> 13 !== -64) { \n $ERROR('#436: -524288 >> 13 === -64. Actual: ' + (-524288 >> 13)); \n} \n\n\nif (-1048576 >> 13 !== -128) { \n $ERROR('#437: -1048576 >> 13 === -128. Actual: ' + (-1048576 >> 13)); \n} \n\n\nif (-2097152 >> 13 !== -256) { \n $ERROR('#438: -2097152 >> 13 === -256. Actual: ' + (-2097152 >> 13)); \n} \n\n\nif (-4194304 >> 13 !== -512) { \n $ERROR('#439: -4194304 >> 13 === -512. Actual: ' + (-4194304 >> 13)); \n} \n\n\nif (-8388608 >> 13 !== -1024) { \n $ERROR('#440: -8388608 >> 13 === -1024. Actual: ' + (-8388608 >> 13)); \n} \n\n\nif (-16777216 >> 13 !== -2048) { \n $ERROR('#441: -16777216 >> 13 === -2048. Actual: ' + (-16777216 >> 13)); \n} \n\n\nif (-33554432 >> 13 !== -4096) { \n $ERROR('#442: -33554432 >> 13 === -4096. Actual: ' + (-33554432 >> 13)); \n} \n\n\nif (-67108864 >> 13 !== -8192) { \n $ERROR('#443: -67108864 >> 13 === -8192. Actual: ' + (-67108864 >> 13)); \n} \n\n\nif (-134217728 >> 13 !== -16384) { \n $ERROR('#444: -134217728 >> 13 === -16384. Actual: ' + (-134217728 >> 13)); \n} \n\n\nif (-268435456 >> 13 !== -32768) { \n $ERROR('#445: -268435456 >> 13 === -32768. Actual: ' + (-268435456 >> 13)); \n} \n\n\nif (-536870912 >> 13 !== -65536) { \n $ERROR('#446: -536870912 >> 13 === -65536. Actual: ' + (-536870912 >> 13)); \n} \n\n\nif (-1073741824 >> 13 !== -131072) { \n $ERROR('#447: -1073741824 >> 13 === -131072. Actual: ' + (-1073741824 >> 13)); \n} \n\n\nif (-2147483648 >> 13 !== -262144) { \n $ERROR('#448: -2147483648 >> 13 === -262144. Actual: ' + (-2147483648 >> 13)); \n} \n\n\nif (-1 >> 14 !== -1) { \n $ERROR('#449: -1 >> 14 === -1. Actual: ' + (-1 >> 14)); \n} \n\n\nif (-2 >> 14 !== -1) { \n $ERROR('#450: -2 >> 14 === -1. Actual: ' + (-2 >> 14)); \n} \n\n\nif (-4 >> 14 !== -1) { \n $ERROR('#451: -4 >> 14 === -1. Actual: ' + (-4 >> 14)); \n} \n\n\nif (-8 >> 14 !== -1) { \n $ERROR('#452: -8 >> 14 === -1. Actual: ' + (-8 >> 14)); \n} \n\n\nif (-16 >> 14 !== -1) { \n $ERROR('#453: -16 >> 14 === -1. Actual: ' + (-16 >> 14)); \n} \n\n\nif (-32 >> 14 !== -1) { \n $ERROR('#454: -32 >> 14 === -1. Actual: ' + (-32 >> 14)); \n} \n\n\nif (-64 >> 14 !== -1) { \n $ERROR('#455: -64 >> 14 === -1. Actual: ' + (-64 >> 14)); \n} \n\n\nif (-128 >> 14 !== -1) { \n $ERROR('#456: -128 >> 14 === -1. Actual: ' + (-128 >> 14)); \n} \n\n\nif (-256 >> 14 !== -1) { \n $ERROR('#457: -256 >> 14 === -1. Actual: ' + (-256 >> 14)); \n} \n\n\nif (-512 >> 14 !== -1) { \n $ERROR('#458: -512 >> 14 === -1. Actual: ' + (-512 >> 14)); \n} \n\n\nif (-1024 >> 14 !== -1) { \n $ERROR('#459: -1024 >> 14 === -1. Actual: ' + (-1024 >> 14)); \n} \n\n\nif (-2048 >> 14 !== -1) { \n $ERROR('#460: -2048 >> 14 === -1. Actual: ' + (-2048 >> 14)); \n} \n\n\nif (-4096 >> 14 !== -1) { \n $ERROR('#461: -4096 >> 14 === -1. Actual: ' + (-4096 >> 14)); \n} \n\n\nif (-8192 >> 14 !== -1) { \n $ERROR('#462: -8192 >> 14 === -1. Actual: ' + (-8192 >> 14)); \n} \n\n\nif (-16384 >> 14 !== -1) { \n $ERROR('#463: -16384 >> 14 === -1. Actual: ' + (-16384 >> 14)); \n} \n\n\nif (-32768 >> 14 !== -2) { \n $ERROR('#464: -32768 >> 14 === -2. Actual: ' + (-32768 >> 14)); \n} \n\n\nif (-65536 >> 14 !== -4) { \n $ERROR('#465: -65536 >> 14 === -4. Actual: ' + (-65536 >> 14)); \n} \n\n\nif (-131072 >> 14 !== -8) { \n $ERROR('#466: -131072 >> 14 === -8. Actual: ' + (-131072 >> 14)); \n} \n\n\nif (-262144 >> 14 !== -16) { \n $ERROR('#467: -262144 >> 14 === -16. Actual: ' + (-262144 >> 14)); \n} \n\n\nif (-524288 >> 14 !== -32) { \n $ERROR('#468: -524288 >> 14 === -32. Actual: ' + (-524288 >> 14)); \n} \n\n\nif (-1048576 >> 14 !== -64) { \n $ERROR('#469: -1048576 >> 14 === -64. Actual: ' + (-1048576 >> 14)); \n} \n\n\nif (-2097152 >> 14 !== -128) { \n $ERROR('#470: -2097152 >> 14 === -128. Actual: ' + (-2097152 >> 14)); \n} \n\n\nif (-4194304 >> 14 !== -256) { \n $ERROR('#471: -4194304 >> 14 === -256. Actual: ' + (-4194304 >> 14)); \n} \n\n\nif (-8388608 >> 14 !== -512) { \n $ERROR('#472: -8388608 >> 14 === -512. Actual: ' + (-8388608 >> 14)); \n} \n\n\nif (-16777216 >> 14 !== -1024) { \n $ERROR('#473: -16777216 >> 14 === -1024. Actual: ' + (-16777216 >> 14)); \n} \n\n\nif (-33554432 >> 14 !== -2048) { \n $ERROR('#474: -33554432 >> 14 === -2048. Actual: ' + (-33554432 >> 14)); \n} \n\n\nif (-67108864 >> 14 !== -4096) { \n $ERROR('#475: -67108864 >> 14 === -4096. Actual: ' + (-67108864 >> 14)); \n} \n\n\nif (-134217728 >> 14 !== -8192) { \n $ERROR('#476: -134217728 >> 14 === -8192. Actual: ' + (-134217728 >> 14)); \n} \n\n\nif (-268435456 >> 14 !== -16384) { \n $ERROR('#477: -268435456 >> 14 === -16384. Actual: ' + (-268435456 >> 14)); \n} \n\n\nif (-536870912 >> 14 !== -32768) { \n $ERROR('#478: -536870912 >> 14 === -32768. Actual: ' + (-536870912 >> 14)); \n} \n\n\nif (-1073741824 >> 14 !== -65536) { \n $ERROR('#479: -1073741824 >> 14 === -65536. Actual: ' + (-1073741824 >> 14)); \n} \n\n\nif (-2147483648 >> 14 !== -131072) { \n $ERROR('#480: -2147483648 >> 14 === -131072. Actual: ' + (-2147483648 >> 14)); \n} \n\n\nif (-1 >> 15 !== -1) { \n $ERROR('#481: -1 >> 15 === -1. Actual: ' + (-1 >> 15)); \n} \n\n\nif (-2 >> 15 !== -1) { \n $ERROR('#482: -2 >> 15 === -1. Actual: ' + (-2 >> 15)); \n} \n\n\nif (-4 >> 15 !== -1) { \n $ERROR('#483: -4 >> 15 === -1. Actual: ' + (-4 >> 15)); \n} \n\n\nif (-8 >> 15 !== -1) { \n $ERROR('#484: -8 >> 15 === -1. Actual: ' + (-8 >> 15)); \n} \n\n\nif (-16 >> 15 !== -1) { \n $ERROR('#485: -16 >> 15 === -1. Actual: ' + (-16 >> 15)); \n} \n\n\nif (-32 >> 15 !== -1) { \n $ERROR('#486: -32 >> 15 === -1. Actual: ' + (-32 >> 15)); \n} \n\n\nif (-64 >> 15 !== -1) { \n $ERROR('#487: -64 >> 15 === -1. Actual: ' + (-64 >> 15)); \n} \n\n\nif (-128 >> 15 !== -1) { \n $ERROR('#488: -128 >> 15 === -1. Actual: ' + (-128 >> 15)); \n} \n\n\nif (-256 >> 15 !== -1) { \n $ERROR('#489: -256 >> 15 === -1. Actual: ' + (-256 >> 15)); \n} \n\n\nif (-512 >> 15 !== -1) { \n $ERROR('#490: -512 >> 15 === -1. Actual: ' + (-512 >> 15)); \n} \n\n\nif (-1024 >> 15 !== -1) { \n $ERROR('#491: -1024 >> 15 === -1. Actual: ' + (-1024 >> 15)); \n} \n\n\nif (-2048 >> 15 !== -1) { \n $ERROR('#492: -2048 >> 15 === -1. Actual: ' + (-2048 >> 15)); \n} \n\n\nif (-4096 >> 15 !== -1) { \n $ERROR('#493: -4096 >> 15 === -1. Actual: ' + (-4096 >> 15)); \n} \n\n\nif (-8192 >> 15 !== -1) { \n $ERROR('#494: -8192 >> 15 === -1. Actual: ' + (-8192 >> 15)); \n} \n\n\nif (-16384 >> 15 !== -1) { \n $ERROR('#495: -16384 >> 15 === -1. Actual: ' + (-16384 >> 15)); \n} \n\n\nif (-32768 >> 15 !== -1) { \n $ERROR('#496: -32768 >> 15 === -1. Actual: ' + (-32768 >> 15)); \n} \n\n\nif (-65536 >> 15 !== -2) { \n $ERROR('#497: -65536 >> 15 === -2. Actual: ' + (-65536 >> 15)); \n} \n\n\nif (-131072 >> 15 !== -4) { \n $ERROR('#498: -131072 >> 15 === -4. Actual: ' + (-131072 >> 15)); \n} \n\n\nif (-262144 >> 15 !== -8) { \n $ERROR('#499: -262144 >> 15 === -8. Actual: ' + (-262144 >> 15)); \n} \n\n\nif (-524288 >> 15 !== -16) { \n $ERROR('#500: -524288 >> 15 === -16. Actual: ' + (-524288 >> 15)); \n} \n\n\nif (-1048576 >> 15 !== -32) { \n $ERROR('#501: -1048576 >> 15 === -32. Actual: ' + (-1048576 >> 15)); \n} \n\n\nif (-2097152 >> 15 !== -64) { \n $ERROR('#502: -2097152 >> 15 === -64. Actual: ' + (-2097152 >> 15)); \n} \n\n\nif (-4194304 >> 15 !== -128) { \n $ERROR('#503: -4194304 >> 15 === -128. Actual: ' + (-4194304 >> 15)); \n} \n\n\nif (-8388608 >> 15 !== -256) { \n $ERROR('#504: -8388608 >> 15 === -256. Actual: ' + (-8388608 >> 15)); \n} \n\n\nif (-16777216 >> 15 !== -512) { \n $ERROR('#505: -16777216 >> 15 === -512. Actual: ' + (-16777216 >> 15)); \n} \n\n\nif (-33554432 >> 15 !== -1024) { \n $ERROR('#506: -33554432 >> 15 === -1024. Actual: ' + (-33554432 >> 15)); \n} \n\n\nif (-67108864 >> 15 !== -2048) { \n $ERROR('#507: -67108864 >> 15 === -2048. Actual: ' + (-67108864 >> 15)); \n} \n\n\nif (-134217728 >> 15 !== -4096) { \n $ERROR('#508: -134217728 >> 15 === -4096. Actual: ' + (-134217728 >> 15)); \n} \n\n\nif (-268435456 >> 15 !== -8192) { \n $ERROR('#509: -268435456 >> 15 === -8192. Actual: ' + (-268435456 >> 15)); \n} \n\n\nif (-536870912 >> 15 !== -16384) { \n $ERROR('#510: -536870912 >> 15 === -16384. Actual: ' + (-536870912 >> 15)); \n} \n\n\nif (-1073741824 >> 15 !== -32768) { \n $ERROR('#511: -1073741824 >> 15 === -32768. Actual: ' + (-1073741824 >> 15)); \n} \n\n\nif (-2147483648 >> 15 !== -65536) { \n $ERROR('#512: -2147483648 >> 15 === -65536. Actual: ' + (-2147483648 >> 15)); \n} \n",
+ "id": "S11.7.2_A4_T1"
+ },
+ {
+ "section": "11.7.2",
+ "description": "ShiftExpression = 2^n - 1, n = 16...31",
+ "test": "//CHECK\n \nif (-1 >> 16 !== -1) { \n $ERROR('#513: -1 >> 16 === -1. Actual: ' + (-1 >> 16)); \n} \n\n\nif (-2 >> 16 !== -1) { \n $ERROR('#514: -2 >> 16 === -1. Actual: ' + (-2 >> 16)); \n} \n\n\nif (-4 >> 16 !== -1) { \n $ERROR('#515: -4 >> 16 === -1. Actual: ' + (-4 >> 16)); \n} \n\n\nif (-8 >> 16 !== -1) { \n $ERROR('#516: -8 >> 16 === -1. Actual: ' + (-8 >> 16)); \n} \n\n\nif (-16 >> 16 !== -1) { \n $ERROR('#517: -16 >> 16 === -1. Actual: ' + (-16 >> 16)); \n} \n\n\nif (-32 >> 16 !== -1) { \n $ERROR('#518: -32 >> 16 === -1. Actual: ' + (-32 >> 16)); \n} \n\n\nif (-64 >> 16 !== -1) { \n $ERROR('#519: -64 >> 16 === -1. Actual: ' + (-64 >> 16)); \n} \n\n\nif (-128 >> 16 !== -1) { \n $ERROR('#520: -128 >> 16 === -1. Actual: ' + (-128 >> 16)); \n} \n\n\nif (-256 >> 16 !== -1) { \n $ERROR('#521: -256 >> 16 === -1. Actual: ' + (-256 >> 16)); \n} \n\n\nif (-512 >> 16 !== -1) { \n $ERROR('#522: -512 >> 16 === -1. Actual: ' + (-512 >> 16)); \n} \n\n\nif (-1024 >> 16 !== -1) { \n $ERROR('#523: -1024 >> 16 === -1. Actual: ' + (-1024 >> 16)); \n} \n\n\nif (-2048 >> 16 !== -1) { \n $ERROR('#524: -2048 >> 16 === -1. Actual: ' + (-2048 >> 16)); \n} \n\n\nif (-4096 >> 16 !== -1) { \n $ERROR('#525: -4096 >> 16 === -1. Actual: ' + (-4096 >> 16)); \n} \n\n\nif (-8192 >> 16 !== -1) { \n $ERROR('#526: -8192 >> 16 === -1. Actual: ' + (-8192 >> 16)); \n} \n\n\nif (-16384 >> 16 !== -1) { \n $ERROR('#527: -16384 >> 16 === -1. Actual: ' + (-16384 >> 16)); \n} \n\n\nif (-32768 >> 16 !== -1) { \n $ERROR('#528: -32768 >> 16 === -1. Actual: ' + (-32768 >> 16)); \n} \n\n\nif (-65536 >> 16 !== -1) { \n $ERROR('#529: -65536 >> 16 === -1. Actual: ' + (-65536 >> 16)); \n} \n\n\nif (-131072 >> 16 !== -2) { \n $ERROR('#530: -131072 >> 16 === -2. Actual: ' + (-131072 >> 16)); \n} \n\n\nif (-262144 >> 16 !== -4) { \n $ERROR('#531: -262144 >> 16 === -4. Actual: ' + (-262144 >> 16)); \n} \n\n\nif (-524288 >> 16 !== -8) { \n $ERROR('#532: -524288 >> 16 === -8. Actual: ' + (-524288 >> 16)); \n} \n\n\nif (-1048576 >> 16 !== -16) { \n $ERROR('#533: -1048576 >> 16 === -16. Actual: ' + (-1048576 >> 16)); \n} \n\n\nif (-2097152 >> 16 !== -32) { \n $ERROR('#534: -2097152 >> 16 === -32. Actual: ' + (-2097152 >> 16)); \n} \n\n\nif (-4194304 >> 16 !== -64) { \n $ERROR('#535: -4194304 >> 16 === -64. Actual: ' + (-4194304 >> 16)); \n} \n\n\nif (-8388608 >> 16 !== -128) { \n $ERROR('#536: -8388608 >> 16 === -128. Actual: ' + (-8388608 >> 16)); \n} \n\n\nif (-16777216 >> 16 !== -256) { \n $ERROR('#537: -16777216 >> 16 === -256. Actual: ' + (-16777216 >> 16)); \n} \n\n\nif (-33554432 >> 16 !== -512) { \n $ERROR('#538: -33554432 >> 16 === -512. Actual: ' + (-33554432 >> 16)); \n} \n\n\nif (-67108864 >> 16 !== -1024) { \n $ERROR('#539: -67108864 >> 16 === -1024. Actual: ' + (-67108864 >> 16)); \n} \n\n\nif (-134217728 >> 16 !== -2048) { \n $ERROR('#540: -134217728 >> 16 === -2048. Actual: ' + (-134217728 >> 16)); \n} \n\n\nif (-268435456 >> 16 !== -4096) { \n $ERROR('#541: -268435456 >> 16 === -4096. Actual: ' + (-268435456 >> 16)); \n} \n\n\nif (-536870912 >> 16 !== -8192) { \n $ERROR('#542: -536870912 >> 16 === -8192. Actual: ' + (-536870912 >> 16)); \n} \n\n\nif (-1073741824 >> 16 !== -16384) { \n $ERROR('#543: -1073741824 >> 16 === -16384. Actual: ' + (-1073741824 >> 16)); \n} \n\n\nif (-2147483648 >> 16 !== -32768) { \n $ERROR('#544: -2147483648 >> 16 === -32768. Actual: ' + (-2147483648 >> 16)); \n} \n\n\nif (-1 >> 17 !== -1) { \n $ERROR('#545: -1 >> 17 === -1. Actual: ' + (-1 >> 17)); \n} \n\n\nif (-2 >> 17 !== -1) { \n $ERROR('#546: -2 >> 17 === -1. Actual: ' + (-2 >> 17)); \n} \n\n\nif (-4 >> 17 !== -1) { \n $ERROR('#547: -4 >> 17 === -1. Actual: ' + (-4 >> 17)); \n} \n\n\nif (-8 >> 17 !== -1) { \n $ERROR('#548: -8 >> 17 === -1. Actual: ' + (-8 >> 17)); \n} \n\n\nif (-16 >> 17 !== -1) { \n $ERROR('#549: -16 >> 17 === -1. Actual: ' + (-16 >> 17)); \n} \n\n\nif (-32 >> 17 !== -1) { \n $ERROR('#550: -32 >> 17 === -1. Actual: ' + (-32 >> 17)); \n} \n\n\nif (-64 >> 17 !== -1) { \n $ERROR('#551: -64 >> 17 === -1. Actual: ' + (-64 >> 17)); \n} \n\n\nif (-128 >> 17 !== -1) { \n $ERROR('#552: -128 >> 17 === -1. Actual: ' + (-128 >> 17)); \n} \n\n\nif (-256 >> 17 !== -1) { \n $ERROR('#553: -256 >> 17 === -1. Actual: ' + (-256 >> 17)); \n} \n\n\nif (-512 >> 17 !== -1) { \n $ERROR('#554: -512 >> 17 === -1. Actual: ' + (-512 >> 17)); \n} \n\n\nif (-1024 >> 17 !== -1) { \n $ERROR('#555: -1024 >> 17 === -1. Actual: ' + (-1024 >> 17)); \n} \n\n\nif (-2048 >> 17 !== -1) { \n $ERROR('#556: -2048 >> 17 === -1. Actual: ' + (-2048 >> 17)); \n} \n\n\nif (-4096 >> 17 !== -1) { \n $ERROR('#557: -4096 >> 17 === -1. Actual: ' + (-4096 >> 17)); \n} \n\n\nif (-8192 >> 17 !== -1) { \n $ERROR('#558: -8192 >> 17 === -1. Actual: ' + (-8192 >> 17)); \n} \n\n\nif (-16384 >> 17 !== -1) { \n $ERROR('#559: -16384 >> 17 === -1. Actual: ' + (-16384 >> 17)); \n} \n\n\nif (-32768 >> 17 !== -1) { \n $ERROR('#560: -32768 >> 17 === -1. Actual: ' + (-32768 >> 17)); \n} \n\n\nif (-65536 >> 17 !== -1) { \n $ERROR('#561: -65536 >> 17 === -1. Actual: ' + (-65536 >> 17)); \n} \n\n\nif (-131072 >> 17 !== -1) { \n $ERROR('#562: -131072 >> 17 === -1. Actual: ' + (-131072 >> 17)); \n} \n\n\nif (-262144 >> 17 !== -2) { \n $ERROR('#563: -262144 >> 17 === -2. Actual: ' + (-262144 >> 17)); \n} \n\n\nif (-524288 >> 17 !== -4) { \n $ERROR('#564: -524288 >> 17 === -4. Actual: ' + (-524288 >> 17)); \n} \n\n\nif (-1048576 >> 17 !== -8) { \n $ERROR('#565: -1048576 >> 17 === -8. Actual: ' + (-1048576 >> 17)); \n} \n\n\nif (-2097152 >> 17 !== -16) { \n $ERROR('#566: -2097152 >> 17 === -16. Actual: ' + (-2097152 >> 17)); \n} \n\n\nif (-4194304 >> 17 !== -32) { \n $ERROR('#567: -4194304 >> 17 === -32. Actual: ' + (-4194304 >> 17)); \n} \n\n\nif (-8388608 >> 17 !== -64) { \n $ERROR('#568: -8388608 >> 17 === -64. Actual: ' + (-8388608 >> 17)); \n} \n\n\nif (-16777216 >> 17 !== -128) { \n $ERROR('#569: -16777216 >> 17 === -128. Actual: ' + (-16777216 >> 17)); \n} \n\n\nif (-33554432 >> 17 !== -256) { \n $ERROR('#570: -33554432 >> 17 === -256. Actual: ' + (-33554432 >> 17)); \n} \n\n\nif (-67108864 >> 17 !== -512) { \n $ERROR('#571: -67108864 >> 17 === -512. Actual: ' + (-67108864 >> 17)); \n} \n\n\nif (-134217728 >> 17 !== -1024) { \n $ERROR('#572: -134217728 >> 17 === -1024. Actual: ' + (-134217728 >> 17)); \n} \n\n\nif (-268435456 >> 17 !== -2048) { \n $ERROR('#573: -268435456 >> 17 === -2048. Actual: ' + (-268435456 >> 17)); \n} \n\n\nif (-536870912 >> 17 !== -4096) { \n $ERROR('#574: -536870912 >> 17 === -4096. Actual: ' + (-536870912 >> 17)); \n} \n\n\nif (-1073741824 >> 17 !== -8192) { \n $ERROR('#575: -1073741824 >> 17 === -8192. Actual: ' + (-1073741824 >> 17)); \n} \n\n\nif (-2147483648 >> 17 !== -16384) { \n $ERROR('#576: -2147483648 >> 17 === -16384. Actual: ' + (-2147483648 >> 17)); \n} \n\n\nif (-1 >> 18 !== -1) { \n $ERROR('#577: -1 >> 18 === -1. Actual: ' + (-1 >> 18)); \n} \n\n\nif (-2 >> 18 !== -1) { \n $ERROR('#578: -2 >> 18 === -1. Actual: ' + (-2 >> 18)); \n} \n\n\nif (-4 >> 18 !== -1) { \n $ERROR('#579: -4 >> 18 === -1. Actual: ' + (-4 >> 18)); \n} \n\n\nif (-8 >> 18 !== -1) { \n $ERROR('#580: -8 >> 18 === -1. Actual: ' + (-8 >> 18)); \n} \n\n\nif (-16 >> 18 !== -1) { \n $ERROR('#581: -16 >> 18 === -1. Actual: ' + (-16 >> 18)); \n} \n\n\nif (-32 >> 18 !== -1) { \n $ERROR('#582: -32 >> 18 === -1. Actual: ' + (-32 >> 18)); \n} \n\n\nif (-64 >> 18 !== -1) { \n $ERROR('#583: -64 >> 18 === -1. Actual: ' + (-64 >> 18)); \n} \n\n\nif (-128 >> 18 !== -1) { \n $ERROR('#584: -128 >> 18 === -1. Actual: ' + (-128 >> 18)); \n} \n\n\nif (-256 >> 18 !== -1) { \n $ERROR('#585: -256 >> 18 === -1. Actual: ' + (-256 >> 18)); \n} \n\n\nif (-512 >> 18 !== -1) { \n $ERROR('#586: -512 >> 18 === -1. Actual: ' + (-512 >> 18)); \n} \n\n\nif (-1024 >> 18 !== -1) { \n $ERROR('#587: -1024 >> 18 === -1. Actual: ' + (-1024 >> 18)); \n} \n\n\nif (-2048 >> 18 !== -1) { \n $ERROR('#588: -2048 >> 18 === -1. Actual: ' + (-2048 >> 18)); \n} \n\n\nif (-4096 >> 18 !== -1) { \n $ERROR('#589: -4096 >> 18 === -1. Actual: ' + (-4096 >> 18)); \n} \n\n\nif (-8192 >> 18 !== -1) { \n $ERROR('#590: -8192 >> 18 === -1. Actual: ' + (-8192 >> 18)); \n} \n\n\nif (-16384 >> 18 !== -1) { \n $ERROR('#591: -16384 >> 18 === -1. Actual: ' + (-16384 >> 18)); \n} \n\n\nif (-32768 >> 18 !== -1) { \n $ERROR('#592: -32768 >> 18 === -1. Actual: ' + (-32768 >> 18)); \n} \n\n\nif (-65536 >> 18 !== -1) { \n $ERROR('#593: -65536 >> 18 === -1. Actual: ' + (-65536 >> 18)); \n} \n\n\nif (-131072 >> 18 !== -1) { \n $ERROR('#594: -131072 >> 18 === -1. Actual: ' + (-131072 >> 18)); \n} \n\n\nif (-262144 >> 18 !== -1) { \n $ERROR('#595: -262144 >> 18 === -1. Actual: ' + (-262144 >> 18)); \n} \n\n\nif (-524288 >> 18 !== -2) { \n $ERROR('#596: -524288 >> 18 === -2. Actual: ' + (-524288 >> 18)); \n} \n\n\nif (-1048576 >> 18 !== -4) { \n $ERROR('#597: -1048576 >> 18 === -4. Actual: ' + (-1048576 >> 18)); \n} \n\n\nif (-2097152 >> 18 !== -8) { \n $ERROR('#598: -2097152 >> 18 === -8. Actual: ' + (-2097152 >> 18)); \n} \n\n\nif (-4194304 >> 18 !== -16) { \n $ERROR('#599: -4194304 >> 18 === -16. Actual: ' + (-4194304 >> 18)); \n} \n\n\nif (-8388608 >> 18 !== -32) { \n $ERROR('#600: -8388608 >> 18 === -32. Actual: ' + (-8388608 >> 18)); \n} \n\n\nif (-16777216 >> 18 !== -64) { \n $ERROR('#601: -16777216 >> 18 === -64. Actual: ' + (-16777216 >> 18)); \n} \n\n\nif (-33554432 >> 18 !== -128) { \n $ERROR('#602: -33554432 >> 18 === -128. Actual: ' + (-33554432 >> 18)); \n} \n\n\nif (-67108864 >> 18 !== -256) { \n $ERROR('#603: -67108864 >> 18 === -256. Actual: ' + (-67108864 >> 18)); \n} \n\n\nif (-134217728 >> 18 !== -512) { \n $ERROR('#604: -134217728 >> 18 === -512. Actual: ' + (-134217728 >> 18)); \n} \n\n\nif (-268435456 >> 18 !== -1024) { \n $ERROR('#605: -268435456 >> 18 === -1024. Actual: ' + (-268435456 >> 18)); \n} \n\n\nif (-536870912 >> 18 !== -2048) { \n $ERROR('#606: -536870912 >> 18 === -2048. Actual: ' + (-536870912 >> 18)); \n} \n\n\nif (-1073741824 >> 18 !== -4096) { \n $ERROR('#607: -1073741824 >> 18 === -4096. Actual: ' + (-1073741824 >> 18)); \n} \n\n\nif (-2147483648 >> 18 !== -8192) { \n $ERROR('#608: -2147483648 >> 18 === -8192. Actual: ' + (-2147483648 >> 18)); \n} \n\n\nif (-1 >> 19 !== -1) { \n $ERROR('#609: -1 >> 19 === -1. Actual: ' + (-1 >> 19)); \n} \n\n\nif (-2 >> 19 !== -1) { \n $ERROR('#610: -2 >> 19 === -1. Actual: ' + (-2 >> 19)); \n} \n\n\nif (-4 >> 19 !== -1) { \n $ERROR('#611: -4 >> 19 === -1. Actual: ' + (-4 >> 19)); \n} \n\n\nif (-8 >> 19 !== -1) { \n $ERROR('#612: -8 >> 19 === -1. Actual: ' + (-8 >> 19)); \n} \n\n\nif (-16 >> 19 !== -1) { \n $ERROR('#613: -16 >> 19 === -1. Actual: ' + (-16 >> 19)); \n} \n\n\nif (-32 >> 19 !== -1) { \n $ERROR('#614: -32 >> 19 === -1. Actual: ' + (-32 >> 19)); \n} \n\n\nif (-64 >> 19 !== -1) { \n $ERROR('#615: -64 >> 19 === -1. Actual: ' + (-64 >> 19)); \n} \n\n\nif (-128 >> 19 !== -1) { \n $ERROR('#616: -128 >> 19 === -1. Actual: ' + (-128 >> 19)); \n} \n\n\nif (-256 >> 19 !== -1) { \n $ERROR('#617: -256 >> 19 === -1. Actual: ' + (-256 >> 19)); \n} \n\n\nif (-512 >> 19 !== -1) { \n $ERROR('#618: -512 >> 19 === -1. Actual: ' + (-512 >> 19)); \n} \n\n\nif (-1024 >> 19 !== -1) { \n $ERROR('#619: -1024 >> 19 === -1. Actual: ' + (-1024 >> 19)); \n} \n\n\nif (-2048 >> 19 !== -1) { \n $ERROR('#620: -2048 >> 19 === -1. Actual: ' + (-2048 >> 19)); \n} \n\n\nif (-4096 >> 19 !== -1) { \n $ERROR('#621: -4096 >> 19 === -1. Actual: ' + (-4096 >> 19)); \n} \n\n\nif (-8192 >> 19 !== -1) { \n $ERROR('#622: -8192 >> 19 === -1. Actual: ' + (-8192 >> 19)); \n} \n\n\nif (-16384 >> 19 !== -1) { \n $ERROR('#623: -16384 >> 19 === -1. Actual: ' + (-16384 >> 19)); \n} \n\n\nif (-32768 >> 19 !== -1) { \n $ERROR('#624: -32768 >> 19 === -1. Actual: ' + (-32768 >> 19)); \n} \n\n\nif (-65536 >> 19 !== -1) { \n $ERROR('#625: -65536 >> 19 === -1. Actual: ' + (-65536 >> 19)); \n} \n\n\nif (-131072 >> 19 !== -1) { \n $ERROR('#626: -131072 >> 19 === -1. Actual: ' + (-131072 >> 19)); \n} \n\n\nif (-262144 >> 19 !== -1) { \n $ERROR('#627: -262144 >> 19 === -1. Actual: ' + (-262144 >> 19)); \n} \n\n\nif (-524288 >> 19 !== -1) { \n $ERROR('#628: -524288 >> 19 === -1. Actual: ' + (-524288 >> 19)); \n} \n\n\nif (-1048576 >> 19 !== -2) { \n $ERROR('#629: -1048576 >> 19 === -2. Actual: ' + (-1048576 >> 19)); \n} \n\n\nif (-2097152 >> 19 !== -4) { \n $ERROR('#630: -2097152 >> 19 === -4. Actual: ' + (-2097152 >> 19)); \n} \n\n\nif (-4194304 >> 19 !== -8) { \n $ERROR('#631: -4194304 >> 19 === -8. Actual: ' + (-4194304 >> 19)); \n} \n\n\nif (-8388608 >> 19 !== -16) { \n $ERROR('#632: -8388608 >> 19 === -16. Actual: ' + (-8388608 >> 19)); \n} \n\n\nif (-16777216 >> 19 !== -32) { \n $ERROR('#633: -16777216 >> 19 === -32. Actual: ' + (-16777216 >> 19)); \n} \n\n\nif (-33554432 >> 19 !== -64) { \n $ERROR('#634: -33554432 >> 19 === -64. Actual: ' + (-33554432 >> 19)); \n} \n\n\nif (-67108864 >> 19 !== -128) { \n $ERROR('#635: -67108864 >> 19 === -128. Actual: ' + (-67108864 >> 19)); \n} \n\n\nif (-134217728 >> 19 !== -256) { \n $ERROR('#636: -134217728 >> 19 === -256. Actual: ' + (-134217728 >> 19)); \n} \n\n\nif (-268435456 >> 19 !== -512) { \n $ERROR('#637: -268435456 >> 19 === -512. Actual: ' + (-268435456 >> 19)); \n} \n\n\nif (-536870912 >> 19 !== -1024) { \n $ERROR('#638: -536870912 >> 19 === -1024. Actual: ' + (-536870912 >> 19)); \n} \n\n\nif (-1073741824 >> 19 !== -2048) { \n $ERROR('#639: -1073741824 >> 19 === -2048. Actual: ' + (-1073741824 >> 19)); \n} \n\n\nif (-2147483648 >> 19 !== -4096) { \n $ERROR('#640: -2147483648 >> 19 === -4096. Actual: ' + (-2147483648 >> 19)); \n} \n\n\nif (-1 >> 20 !== -1) { \n $ERROR('#641: -1 >> 20 === -1. Actual: ' + (-1 >> 20)); \n} \n\n\nif (-2 >> 20 !== -1) { \n $ERROR('#642: -2 >> 20 === -1. Actual: ' + (-2 >> 20)); \n} \n\n\nif (-4 >> 20 !== -1) { \n $ERROR('#643: -4 >> 20 === -1. Actual: ' + (-4 >> 20)); \n} \n\n\nif (-8 >> 20 !== -1) { \n $ERROR('#644: -8 >> 20 === -1. Actual: ' + (-8 >> 20)); \n} \n\n\nif (-16 >> 20 !== -1) { \n $ERROR('#645: -16 >> 20 === -1. Actual: ' + (-16 >> 20)); \n} \n\n\nif (-32 >> 20 !== -1) { \n $ERROR('#646: -32 >> 20 === -1. Actual: ' + (-32 >> 20)); \n} \n\n\nif (-64 >> 20 !== -1) { \n $ERROR('#647: -64 >> 20 === -1. Actual: ' + (-64 >> 20)); \n} \n\n\nif (-128 >> 20 !== -1) { \n $ERROR('#648: -128 >> 20 === -1. Actual: ' + (-128 >> 20)); \n} \n\n\nif (-256 >> 20 !== -1) { \n $ERROR('#649: -256 >> 20 === -1. Actual: ' + (-256 >> 20)); \n} \n\n\nif (-512 >> 20 !== -1) { \n $ERROR('#650: -512 >> 20 === -1. Actual: ' + (-512 >> 20)); \n} \n\n\nif (-1024 >> 20 !== -1) { \n $ERROR('#651: -1024 >> 20 === -1. Actual: ' + (-1024 >> 20)); \n} \n\n\nif (-2048 >> 20 !== -1) { \n $ERROR('#652: -2048 >> 20 === -1. Actual: ' + (-2048 >> 20)); \n} \n\n\nif (-4096 >> 20 !== -1) { \n $ERROR('#653: -4096 >> 20 === -1. Actual: ' + (-4096 >> 20)); \n} \n\n\nif (-8192 >> 20 !== -1) { \n $ERROR('#654: -8192 >> 20 === -1. Actual: ' + (-8192 >> 20)); \n} \n\n\nif (-16384 >> 20 !== -1) { \n $ERROR('#655: -16384 >> 20 === -1. Actual: ' + (-16384 >> 20)); \n} \n\n\nif (-32768 >> 20 !== -1) { \n $ERROR('#656: -32768 >> 20 === -1. Actual: ' + (-32768 >> 20)); \n} \n\n\nif (-65536 >> 20 !== -1) { \n $ERROR('#657: -65536 >> 20 === -1. Actual: ' + (-65536 >> 20)); \n} \n\n\nif (-131072 >> 20 !== -1) { \n $ERROR('#658: -131072 >> 20 === -1. Actual: ' + (-131072 >> 20)); \n} \n\n\nif (-262144 >> 20 !== -1) { \n $ERROR('#659: -262144 >> 20 === -1. Actual: ' + (-262144 >> 20)); \n} \n\n\nif (-524288 >> 20 !== -1) { \n $ERROR('#660: -524288 >> 20 === -1. Actual: ' + (-524288 >> 20)); \n} \n\n\nif (-1048576 >> 20 !== -1) { \n $ERROR('#661: -1048576 >> 20 === -1. Actual: ' + (-1048576 >> 20)); \n} \n\n\nif (-2097152 >> 20 !== -2) { \n $ERROR('#662: -2097152 >> 20 === -2. Actual: ' + (-2097152 >> 20)); \n} \n\n\nif (-4194304 >> 20 !== -4) { \n $ERROR('#663: -4194304 >> 20 === -4. Actual: ' + (-4194304 >> 20)); \n} \n\n\nif (-8388608 >> 20 !== -8) { \n $ERROR('#664: -8388608 >> 20 === -8. Actual: ' + (-8388608 >> 20)); \n} \n\n\nif (-16777216 >> 20 !== -16) { \n $ERROR('#665: -16777216 >> 20 === -16. Actual: ' + (-16777216 >> 20)); \n} \n\n\nif (-33554432 >> 20 !== -32) { \n $ERROR('#666: -33554432 >> 20 === -32. Actual: ' + (-33554432 >> 20)); \n} \n\n\nif (-67108864 >> 20 !== -64) { \n $ERROR('#667: -67108864 >> 20 === -64. Actual: ' + (-67108864 >> 20)); \n} \n\n\nif (-134217728 >> 20 !== -128) { \n $ERROR('#668: -134217728 >> 20 === -128. Actual: ' + (-134217728 >> 20)); \n} \n\n\nif (-268435456 >> 20 !== -256) { \n $ERROR('#669: -268435456 >> 20 === -256. Actual: ' + (-268435456 >> 20)); \n} \n\n\nif (-536870912 >> 20 !== -512) { \n $ERROR('#670: -536870912 >> 20 === -512. Actual: ' + (-536870912 >> 20)); \n} \n\n\nif (-1073741824 >> 20 !== -1024) { \n $ERROR('#671: -1073741824 >> 20 === -1024. Actual: ' + (-1073741824 >> 20)); \n} \n\n\nif (-2147483648 >> 20 !== -2048) { \n $ERROR('#672: -2147483648 >> 20 === -2048. Actual: ' + (-2147483648 >> 20)); \n} \n\n\nif (-1 >> 21 !== -1) { \n $ERROR('#673: -1 >> 21 === -1. Actual: ' + (-1 >> 21)); \n} \n\n\nif (-2 >> 21 !== -1) { \n $ERROR('#674: -2 >> 21 === -1. Actual: ' + (-2 >> 21)); \n} \n\n\nif (-4 >> 21 !== -1) { \n $ERROR('#675: -4 >> 21 === -1. Actual: ' + (-4 >> 21)); \n} \n\n\nif (-8 >> 21 !== -1) { \n $ERROR('#676: -8 >> 21 === -1. Actual: ' + (-8 >> 21)); \n} \n\n\nif (-16 >> 21 !== -1) { \n $ERROR('#677: -16 >> 21 === -1. Actual: ' + (-16 >> 21)); \n} \n\n\nif (-32 >> 21 !== -1) { \n $ERROR('#678: -32 >> 21 === -1. Actual: ' + (-32 >> 21)); \n} \n\n\nif (-64 >> 21 !== -1) { \n $ERROR('#679: -64 >> 21 === -1. Actual: ' + (-64 >> 21)); \n} \n\n\nif (-128 >> 21 !== -1) { \n $ERROR('#680: -128 >> 21 === -1. Actual: ' + (-128 >> 21)); \n} \n\n\nif (-256 >> 21 !== -1) { \n $ERROR('#681: -256 >> 21 === -1. Actual: ' + (-256 >> 21)); \n} \n\n\nif (-512 >> 21 !== -1) { \n $ERROR('#682: -512 >> 21 === -1. Actual: ' + (-512 >> 21)); \n} \n\n\nif (-1024 >> 21 !== -1) { \n $ERROR('#683: -1024 >> 21 === -1. Actual: ' + (-1024 >> 21)); \n} \n\n\nif (-2048 >> 21 !== -1) { \n $ERROR('#684: -2048 >> 21 === -1. Actual: ' + (-2048 >> 21)); \n} \n\n\nif (-4096 >> 21 !== -1) { \n $ERROR('#685: -4096 >> 21 === -1. Actual: ' + (-4096 >> 21)); \n} \n\n\nif (-8192 >> 21 !== -1) { \n $ERROR('#686: -8192 >> 21 === -1. Actual: ' + (-8192 >> 21)); \n} \n\n\nif (-16384 >> 21 !== -1) { \n $ERROR('#687: -16384 >> 21 === -1. Actual: ' + (-16384 >> 21)); \n} \n\n\nif (-32768 >> 21 !== -1) { \n $ERROR('#688: -32768 >> 21 === -1. Actual: ' + (-32768 >> 21)); \n} \n\n\nif (-65536 >> 21 !== -1) { \n $ERROR('#689: -65536 >> 21 === -1. Actual: ' + (-65536 >> 21)); \n} \n\n\nif (-131072 >> 21 !== -1) { \n $ERROR('#690: -131072 >> 21 === -1. Actual: ' + (-131072 >> 21)); \n} \n\n\nif (-262144 >> 21 !== -1) { \n $ERROR('#691: -262144 >> 21 === -1. Actual: ' + (-262144 >> 21)); \n} \n\n\nif (-524288 >> 21 !== -1) { \n $ERROR('#692: -524288 >> 21 === -1. Actual: ' + (-524288 >> 21)); \n} \n\n\nif (-1048576 >> 21 !== -1) { \n $ERROR('#693: -1048576 >> 21 === -1. Actual: ' + (-1048576 >> 21)); \n} \n\n\nif (-2097152 >> 21 !== -1) { \n $ERROR('#694: -2097152 >> 21 === -1. Actual: ' + (-2097152 >> 21)); \n} \n\n\nif (-4194304 >> 21 !== -2) { \n $ERROR('#695: -4194304 >> 21 === -2. Actual: ' + (-4194304 >> 21)); \n} \n\n\nif (-8388608 >> 21 !== -4) { \n $ERROR('#696: -8388608 >> 21 === -4. Actual: ' + (-8388608 >> 21)); \n} \n\n\nif (-16777216 >> 21 !== -8) { \n $ERROR('#697: -16777216 >> 21 === -8. Actual: ' + (-16777216 >> 21)); \n} \n\n\nif (-33554432 >> 21 !== -16) { \n $ERROR('#698: -33554432 >> 21 === -16. Actual: ' + (-33554432 >> 21)); \n} \n\n\nif (-67108864 >> 21 !== -32) { \n $ERROR('#699: -67108864 >> 21 === -32. Actual: ' + (-67108864 >> 21)); \n} \n\n\nif (-134217728 >> 21 !== -64) { \n $ERROR('#700: -134217728 >> 21 === -64. Actual: ' + (-134217728 >> 21)); \n} \n\n\nif (-268435456 >> 21 !== -128) { \n $ERROR('#701: -268435456 >> 21 === -128. Actual: ' + (-268435456 >> 21)); \n} \n\n\nif (-536870912 >> 21 !== -256) { \n $ERROR('#702: -536870912 >> 21 === -256. Actual: ' + (-536870912 >> 21)); \n} \n\n\nif (-1073741824 >> 21 !== -512) { \n $ERROR('#703: -1073741824 >> 21 === -512. Actual: ' + (-1073741824 >> 21)); \n} \n\n\nif (-2147483648 >> 21 !== -1024) { \n $ERROR('#704: -2147483648 >> 21 === -1024. Actual: ' + (-2147483648 >> 21)); \n} \n\n\nif (-1 >> 22 !== -1) { \n $ERROR('#705: -1 >> 22 === -1. Actual: ' + (-1 >> 22)); \n} \n\n\nif (-2 >> 22 !== -1) { \n $ERROR('#706: -2 >> 22 === -1. Actual: ' + (-2 >> 22)); \n} \n\n\nif (-4 >> 22 !== -1) { \n $ERROR('#707: -4 >> 22 === -1. Actual: ' + (-4 >> 22)); \n} \n\n\nif (-8 >> 22 !== -1) { \n $ERROR('#708: -8 >> 22 === -1. Actual: ' + (-8 >> 22)); \n} \n\n\nif (-16 >> 22 !== -1) { \n $ERROR('#709: -16 >> 22 === -1. Actual: ' + (-16 >> 22)); \n} \n\n\nif (-32 >> 22 !== -1) { \n $ERROR('#710: -32 >> 22 === -1. Actual: ' + (-32 >> 22)); \n} \n\n\nif (-64 >> 22 !== -1) { \n $ERROR('#711: -64 >> 22 === -1. Actual: ' + (-64 >> 22)); \n} \n\n\nif (-128 >> 22 !== -1) { \n $ERROR('#712: -128 >> 22 === -1. Actual: ' + (-128 >> 22)); \n} \n\n\nif (-256 >> 22 !== -1) { \n $ERROR('#713: -256 >> 22 === -1. Actual: ' + (-256 >> 22)); \n} \n\n\nif (-512 >> 22 !== -1) { \n $ERROR('#714: -512 >> 22 === -1. Actual: ' + (-512 >> 22)); \n} \n\n\nif (-1024 >> 22 !== -1) { \n $ERROR('#715: -1024 >> 22 === -1. Actual: ' + (-1024 >> 22)); \n} \n\n\nif (-2048 >> 22 !== -1) { \n $ERROR('#716: -2048 >> 22 === -1. Actual: ' + (-2048 >> 22)); \n} \n\n\nif (-4096 >> 22 !== -1) { \n $ERROR('#717: -4096 >> 22 === -1. Actual: ' + (-4096 >> 22)); \n} \n\n\nif (-8192 >> 22 !== -1) { \n $ERROR('#718: -8192 >> 22 === -1. Actual: ' + (-8192 >> 22)); \n} \n\n\nif (-16384 >> 22 !== -1) { \n $ERROR('#719: -16384 >> 22 === -1. Actual: ' + (-16384 >> 22)); \n} \n\n\nif (-32768 >> 22 !== -1) { \n $ERROR('#720: -32768 >> 22 === -1. Actual: ' + (-32768 >> 22)); \n} \n\n\nif (-65536 >> 22 !== -1) { \n $ERROR('#721: -65536 >> 22 === -1. Actual: ' + (-65536 >> 22)); \n} \n\n\nif (-131072 >> 22 !== -1) { \n $ERROR('#722: -131072 >> 22 === -1. Actual: ' + (-131072 >> 22)); \n} \n\n\nif (-262144 >> 22 !== -1) { \n $ERROR('#723: -262144 >> 22 === -1. Actual: ' + (-262144 >> 22)); \n} \n\n\nif (-524288 >> 22 !== -1) { \n $ERROR('#724: -524288 >> 22 === -1. Actual: ' + (-524288 >> 22)); \n} \n\n\nif (-1048576 >> 22 !== -1) { \n $ERROR('#725: -1048576 >> 22 === -1. Actual: ' + (-1048576 >> 22)); \n} \n\n\nif (-2097152 >> 22 !== -1) { \n $ERROR('#726: -2097152 >> 22 === -1. Actual: ' + (-2097152 >> 22)); \n} \n\n\nif (-4194304 >> 22 !== -1) { \n $ERROR('#727: -4194304 >> 22 === -1. Actual: ' + (-4194304 >> 22)); \n} \n\n\nif (-8388608 >> 22 !== -2) { \n $ERROR('#728: -8388608 >> 22 === -2. Actual: ' + (-8388608 >> 22)); \n} \n\n\nif (-16777216 >> 22 !== -4) { \n $ERROR('#729: -16777216 >> 22 === -4. Actual: ' + (-16777216 >> 22)); \n} \n\n\nif (-33554432 >> 22 !== -8) { \n $ERROR('#730: -33554432 >> 22 === -8. Actual: ' + (-33554432 >> 22)); \n} \n\n\nif (-67108864 >> 22 !== -16) { \n $ERROR('#731: -67108864 >> 22 === -16. Actual: ' + (-67108864 >> 22)); \n} \n\n\nif (-134217728 >> 22 !== -32) { \n $ERROR('#732: -134217728 >> 22 === -32. Actual: ' + (-134217728 >> 22)); \n} \n\n\nif (-268435456 >> 22 !== -64) { \n $ERROR('#733: -268435456 >> 22 === -64. Actual: ' + (-268435456 >> 22)); \n} \n\n\nif (-536870912 >> 22 !== -128) { \n $ERROR('#734: -536870912 >> 22 === -128. Actual: ' + (-536870912 >> 22)); \n} \n\n\nif (-1073741824 >> 22 !== -256) { \n $ERROR('#735: -1073741824 >> 22 === -256. Actual: ' + (-1073741824 >> 22)); \n} \n\n\nif (-2147483648 >> 22 !== -512) { \n $ERROR('#736: -2147483648 >> 22 === -512. Actual: ' + (-2147483648 >> 22)); \n} \n\n\nif (-1 >> 23 !== -1) { \n $ERROR('#737: -1 >> 23 === -1. Actual: ' + (-1 >> 23)); \n} \n\n\nif (-2 >> 23 !== -1) { \n $ERROR('#738: -2 >> 23 === -1. Actual: ' + (-2 >> 23)); \n} \n\n\nif (-4 >> 23 !== -1) { \n $ERROR('#739: -4 >> 23 === -1. Actual: ' + (-4 >> 23)); \n} \n\n\nif (-8 >> 23 !== -1) { \n $ERROR('#740: -8 >> 23 === -1. Actual: ' + (-8 >> 23)); \n} \n\n\nif (-16 >> 23 !== -1) { \n $ERROR('#741: -16 >> 23 === -1. Actual: ' + (-16 >> 23)); \n} \n\n\nif (-32 >> 23 !== -1) { \n $ERROR('#742: -32 >> 23 === -1. Actual: ' + (-32 >> 23)); \n} \n\n\nif (-64 >> 23 !== -1) { \n $ERROR('#743: -64 >> 23 === -1. Actual: ' + (-64 >> 23)); \n} \n\n\nif (-128 >> 23 !== -1) { \n $ERROR('#744: -128 >> 23 === -1. Actual: ' + (-128 >> 23)); \n} \n\n\nif (-256 >> 23 !== -1) { \n $ERROR('#745: -256 >> 23 === -1. Actual: ' + (-256 >> 23)); \n} \n\n\nif (-512 >> 23 !== -1) { \n $ERROR('#746: -512 >> 23 === -1. Actual: ' + (-512 >> 23)); \n} \n\n\nif (-1024 >> 23 !== -1) { \n $ERROR('#747: -1024 >> 23 === -1. Actual: ' + (-1024 >> 23)); \n} \n\n\nif (-2048 >> 23 !== -1) { \n $ERROR('#748: -2048 >> 23 === -1. Actual: ' + (-2048 >> 23)); \n} \n\n\nif (-4096 >> 23 !== -1) { \n $ERROR('#749: -4096 >> 23 === -1. Actual: ' + (-4096 >> 23)); \n} \n\n\nif (-8192 >> 23 !== -1) { \n $ERROR('#750: -8192 >> 23 === -1. Actual: ' + (-8192 >> 23)); \n} \n\n\nif (-16384 >> 23 !== -1) { \n $ERROR('#751: -16384 >> 23 === -1. Actual: ' + (-16384 >> 23)); \n} \n\n\nif (-32768 >> 23 !== -1) { \n $ERROR('#752: -32768 >> 23 === -1. Actual: ' + (-32768 >> 23)); \n} \n\n\nif (-65536 >> 23 !== -1) { \n $ERROR('#753: -65536 >> 23 === -1. Actual: ' + (-65536 >> 23)); \n} \n\n\nif (-131072 >> 23 !== -1) { \n $ERROR('#754: -131072 >> 23 === -1. Actual: ' + (-131072 >> 23)); \n} \n\n\nif (-262144 >> 23 !== -1) { \n $ERROR('#755: -262144 >> 23 === -1. Actual: ' + (-262144 >> 23)); \n} \n\n\nif (-524288 >> 23 !== -1) { \n $ERROR('#756: -524288 >> 23 === -1. Actual: ' + (-524288 >> 23)); \n} \n\n\nif (-1048576 >> 23 !== -1) { \n $ERROR('#757: -1048576 >> 23 === -1. Actual: ' + (-1048576 >> 23)); \n} \n\n\nif (-2097152 >> 23 !== -1) { \n $ERROR('#758: -2097152 >> 23 === -1. Actual: ' + (-2097152 >> 23)); \n} \n\n\nif (-4194304 >> 23 !== -1) { \n $ERROR('#759: -4194304 >> 23 === -1. Actual: ' + (-4194304 >> 23)); \n} \n\n\nif (-8388608 >> 23 !== -1) { \n $ERROR('#760: -8388608 >> 23 === -1. Actual: ' + (-8388608 >> 23)); \n} \n\n\nif (-16777216 >> 23 !== -2) { \n $ERROR('#761: -16777216 >> 23 === -2. Actual: ' + (-16777216 >> 23)); \n} \n\n\nif (-33554432 >> 23 !== -4) { \n $ERROR('#762: -33554432 >> 23 === -4. Actual: ' + (-33554432 >> 23)); \n} \n\n\nif (-67108864 >> 23 !== -8) { \n $ERROR('#763: -67108864 >> 23 === -8. Actual: ' + (-67108864 >> 23)); \n} \n\n\nif (-134217728 >> 23 !== -16) { \n $ERROR('#764: -134217728 >> 23 === -16. Actual: ' + (-134217728 >> 23)); \n} \n\n\nif (-268435456 >> 23 !== -32) { \n $ERROR('#765: -268435456 >> 23 === -32. Actual: ' + (-268435456 >> 23)); \n} \n\n\nif (-536870912 >> 23 !== -64) { \n $ERROR('#766: -536870912 >> 23 === -64. Actual: ' + (-536870912 >> 23)); \n} \n\n\nif (-1073741824 >> 23 !== -128) { \n $ERROR('#767: -1073741824 >> 23 === -128. Actual: ' + (-1073741824 >> 23)); \n} \n\n\nif (-2147483648 >> 23 !== -256) { \n $ERROR('#768: -2147483648 >> 23 === -256. Actual: ' + (-2147483648 >> 23)); \n} \n\n\nif (-1 >> 24 !== -1) { \n $ERROR('#769: -1 >> 24 === -1. Actual: ' + (-1 >> 24)); \n} \n\n\nif (-2 >> 24 !== -1) { \n $ERROR('#770: -2 >> 24 === -1. Actual: ' + (-2 >> 24)); \n} \n\n\nif (-4 >> 24 !== -1) { \n $ERROR('#771: -4 >> 24 === -1. Actual: ' + (-4 >> 24)); \n} \n\n\nif (-8 >> 24 !== -1) { \n $ERROR('#772: -8 >> 24 === -1. Actual: ' + (-8 >> 24)); \n} \n\n\nif (-16 >> 24 !== -1) { \n $ERROR('#773: -16 >> 24 === -1. Actual: ' + (-16 >> 24)); \n} \n\n\nif (-32 >> 24 !== -1) { \n $ERROR('#774: -32 >> 24 === -1. Actual: ' + (-32 >> 24)); \n} \n\n\nif (-64 >> 24 !== -1) { \n $ERROR('#775: -64 >> 24 === -1. Actual: ' + (-64 >> 24)); \n} \n\n\nif (-128 >> 24 !== -1) { \n $ERROR('#776: -128 >> 24 === -1. Actual: ' + (-128 >> 24)); \n} \n\n\nif (-256 >> 24 !== -1) { \n $ERROR('#777: -256 >> 24 === -1. Actual: ' + (-256 >> 24)); \n} \n\n\nif (-512 >> 24 !== -1) { \n $ERROR('#778: -512 >> 24 === -1. Actual: ' + (-512 >> 24)); \n} \n\n\nif (-1024 >> 24 !== -1) { \n $ERROR('#779: -1024 >> 24 === -1. Actual: ' + (-1024 >> 24)); \n} \n\n\nif (-2048 >> 24 !== -1) { \n $ERROR('#780: -2048 >> 24 === -1. Actual: ' + (-2048 >> 24)); \n} \n\n\nif (-4096 >> 24 !== -1) { \n $ERROR('#781: -4096 >> 24 === -1. Actual: ' + (-4096 >> 24)); \n} \n\n\nif (-8192 >> 24 !== -1) { \n $ERROR('#782: -8192 >> 24 === -1. Actual: ' + (-8192 >> 24)); \n} \n\n\nif (-16384 >> 24 !== -1) { \n $ERROR('#783: -16384 >> 24 === -1. Actual: ' + (-16384 >> 24)); \n} \n\n\nif (-32768 >> 24 !== -1) { \n $ERROR('#784: -32768 >> 24 === -1. Actual: ' + (-32768 >> 24)); \n} \n\n\nif (-65536 >> 24 !== -1) { \n $ERROR('#785: -65536 >> 24 === -1. Actual: ' + (-65536 >> 24)); \n} \n\n\nif (-131072 >> 24 !== -1) { \n $ERROR('#786: -131072 >> 24 === -1. Actual: ' + (-131072 >> 24)); \n} \n\n\nif (-262144 >> 24 !== -1) { \n $ERROR('#787: -262144 >> 24 === -1. Actual: ' + (-262144 >> 24)); \n} \n\n\nif (-524288 >> 24 !== -1) { \n $ERROR('#788: -524288 >> 24 === -1. Actual: ' + (-524288 >> 24)); \n} \n\n\nif (-1048576 >> 24 !== -1) { \n $ERROR('#789: -1048576 >> 24 === -1. Actual: ' + (-1048576 >> 24)); \n} \n\n\nif (-2097152 >> 24 !== -1) { \n $ERROR('#790: -2097152 >> 24 === -1. Actual: ' + (-2097152 >> 24)); \n} \n\n\nif (-4194304 >> 24 !== -1) { \n $ERROR('#791: -4194304 >> 24 === -1. Actual: ' + (-4194304 >> 24)); \n} \n\n\nif (-8388608 >> 24 !== -1) { \n $ERROR('#792: -8388608 >> 24 === -1. Actual: ' + (-8388608 >> 24)); \n} \n\n\nif (-16777216 >> 24 !== -1) { \n $ERROR('#793: -16777216 >> 24 === -1. Actual: ' + (-16777216 >> 24)); \n} \n\n\nif (-33554432 >> 24 !== -2) { \n $ERROR('#794: -33554432 >> 24 === -2. Actual: ' + (-33554432 >> 24)); \n} \n\n\nif (-67108864 >> 24 !== -4) { \n $ERROR('#795: -67108864 >> 24 === -4. Actual: ' + (-67108864 >> 24)); \n} \n\n\nif (-134217728 >> 24 !== -8) { \n $ERROR('#796: -134217728 >> 24 === -8. Actual: ' + (-134217728 >> 24)); \n} \n\n\nif (-268435456 >> 24 !== -16) { \n $ERROR('#797: -268435456 >> 24 === -16. Actual: ' + (-268435456 >> 24)); \n} \n\n\nif (-536870912 >> 24 !== -32) { \n $ERROR('#798: -536870912 >> 24 === -32. Actual: ' + (-536870912 >> 24)); \n} \n\n\nif (-1073741824 >> 24 !== -64) { \n $ERROR('#799: -1073741824 >> 24 === -64. Actual: ' + (-1073741824 >> 24)); \n} \n\n\nif (-2147483648 >> 24 !== -128) { \n $ERROR('#800: -2147483648 >> 24 === -128. Actual: ' + (-2147483648 >> 24)); \n} \n\n\nif (-1 >> 25 !== -1) { \n $ERROR('#801: -1 >> 25 === -1. Actual: ' + (-1 >> 25)); \n} \n\n\nif (-2 >> 25 !== -1) { \n $ERROR('#802: -2 >> 25 === -1. Actual: ' + (-2 >> 25)); \n} \n\n\nif (-4 >> 25 !== -1) { \n $ERROR('#803: -4 >> 25 === -1. Actual: ' + (-4 >> 25)); \n} \n\n\nif (-8 >> 25 !== -1) { \n $ERROR('#804: -8 >> 25 === -1. Actual: ' + (-8 >> 25)); \n} \n\n\nif (-16 >> 25 !== -1) { \n $ERROR('#805: -16 >> 25 === -1. Actual: ' + (-16 >> 25)); \n} \n\n\nif (-32 >> 25 !== -1) { \n $ERROR('#806: -32 >> 25 === -1. Actual: ' + (-32 >> 25)); \n} \n\n\nif (-64 >> 25 !== -1) { \n $ERROR('#807: -64 >> 25 === -1. Actual: ' + (-64 >> 25)); \n} \n\n\nif (-128 >> 25 !== -1) { \n $ERROR('#808: -128 >> 25 === -1. Actual: ' + (-128 >> 25)); \n} \n\n\nif (-256 >> 25 !== -1) { \n $ERROR('#809: -256 >> 25 === -1. Actual: ' + (-256 >> 25)); \n} \n\n\nif (-512 >> 25 !== -1) { \n $ERROR('#810: -512 >> 25 === -1. Actual: ' + (-512 >> 25)); \n} \n\n\nif (-1024 >> 25 !== -1) { \n $ERROR('#811: -1024 >> 25 === -1. Actual: ' + (-1024 >> 25)); \n} \n\n\nif (-2048 >> 25 !== -1) { \n $ERROR('#812: -2048 >> 25 === -1. Actual: ' + (-2048 >> 25)); \n} \n\n\nif (-4096 >> 25 !== -1) { \n $ERROR('#813: -4096 >> 25 === -1. Actual: ' + (-4096 >> 25)); \n} \n\n\nif (-8192 >> 25 !== -1) { \n $ERROR('#814: -8192 >> 25 === -1. Actual: ' + (-8192 >> 25)); \n} \n\n\nif (-16384 >> 25 !== -1) { \n $ERROR('#815: -16384 >> 25 === -1. Actual: ' + (-16384 >> 25)); \n} \n\n\nif (-32768 >> 25 !== -1) { \n $ERROR('#816: -32768 >> 25 === -1. Actual: ' + (-32768 >> 25)); \n} \n\n\nif (-65536 >> 25 !== -1) { \n $ERROR('#817: -65536 >> 25 === -1. Actual: ' + (-65536 >> 25)); \n} \n\n\nif (-131072 >> 25 !== -1) { \n $ERROR('#818: -131072 >> 25 === -1. Actual: ' + (-131072 >> 25)); \n} \n\n\nif (-262144 >> 25 !== -1) { \n $ERROR('#819: -262144 >> 25 === -1. Actual: ' + (-262144 >> 25)); \n} \n\n\nif (-524288 >> 25 !== -1) { \n $ERROR('#820: -524288 >> 25 === -1. Actual: ' + (-524288 >> 25)); \n} \n\n\nif (-1048576 >> 25 !== -1) { \n $ERROR('#821: -1048576 >> 25 === -1. Actual: ' + (-1048576 >> 25)); \n} \n\n\nif (-2097152 >> 25 !== -1) { \n $ERROR('#822: -2097152 >> 25 === -1. Actual: ' + (-2097152 >> 25)); \n} \n\n\nif (-4194304 >> 25 !== -1) { \n $ERROR('#823: -4194304 >> 25 === -1. Actual: ' + (-4194304 >> 25)); \n} \n\n\nif (-8388608 >> 25 !== -1) { \n $ERROR('#824: -8388608 >> 25 === -1. Actual: ' + (-8388608 >> 25)); \n} \n\n\nif (-16777216 >> 25 !== -1) { \n $ERROR('#825: -16777216 >> 25 === -1. Actual: ' + (-16777216 >> 25)); \n} \n\n\nif (-33554432 >> 25 !== -1) { \n $ERROR('#826: -33554432 >> 25 === -1. Actual: ' + (-33554432 >> 25)); \n} \n\n\nif (-67108864 >> 25 !== -2) { \n $ERROR('#827: -67108864 >> 25 === -2. Actual: ' + (-67108864 >> 25)); \n} \n\n\nif (-134217728 >> 25 !== -4) { \n $ERROR('#828: -134217728 >> 25 === -4. Actual: ' + (-134217728 >> 25)); \n} \n\n\nif (-268435456 >> 25 !== -8) { \n $ERROR('#829: -268435456 >> 25 === -8. Actual: ' + (-268435456 >> 25)); \n} \n\n\nif (-536870912 >> 25 !== -16) { \n $ERROR('#830: -536870912 >> 25 === -16. Actual: ' + (-536870912 >> 25)); \n} \n\n\nif (-1073741824 >> 25 !== -32) { \n $ERROR('#831: -1073741824 >> 25 === -32. Actual: ' + (-1073741824 >> 25)); \n} \n\n\nif (-2147483648 >> 25 !== -64) { \n $ERROR('#832: -2147483648 >> 25 === -64. Actual: ' + (-2147483648 >> 25)); \n} \n\n\nif (-1 >> 26 !== -1) { \n $ERROR('#833: -1 >> 26 === -1. Actual: ' + (-1 >> 26)); \n} \n\n\nif (-2 >> 26 !== -1) { \n $ERROR('#834: -2 >> 26 === -1. Actual: ' + (-2 >> 26)); \n} \n\n\nif (-4 >> 26 !== -1) { \n $ERROR('#835: -4 >> 26 === -1. Actual: ' + (-4 >> 26)); \n} \n\n\nif (-8 >> 26 !== -1) { \n $ERROR('#836: -8 >> 26 === -1. Actual: ' + (-8 >> 26)); \n} \n\n\nif (-16 >> 26 !== -1) { \n $ERROR('#837: -16 >> 26 === -1. Actual: ' + (-16 >> 26)); \n} \n\n\nif (-32 >> 26 !== -1) { \n $ERROR('#838: -32 >> 26 === -1. Actual: ' + (-32 >> 26)); \n} \n\n\nif (-64 >> 26 !== -1) { \n $ERROR('#839: -64 >> 26 === -1. Actual: ' + (-64 >> 26)); \n} \n\n\nif (-128 >> 26 !== -1) { \n $ERROR('#840: -128 >> 26 === -1. Actual: ' + (-128 >> 26)); \n} \n\n\nif (-256 >> 26 !== -1) { \n $ERROR('#841: -256 >> 26 === -1. Actual: ' + (-256 >> 26)); \n} \n\n\nif (-512 >> 26 !== -1) { \n $ERROR('#842: -512 >> 26 === -1. Actual: ' + (-512 >> 26)); \n} \n\n\nif (-1024 >> 26 !== -1) { \n $ERROR('#843: -1024 >> 26 === -1. Actual: ' + (-1024 >> 26)); \n} \n\n\nif (-2048 >> 26 !== -1) { \n $ERROR('#844: -2048 >> 26 === -1. Actual: ' + (-2048 >> 26)); \n} \n\n\nif (-4096 >> 26 !== -1) { \n $ERROR('#845: -4096 >> 26 === -1. Actual: ' + (-4096 >> 26)); \n} \n\n\nif (-8192 >> 26 !== -1) { \n $ERROR('#846: -8192 >> 26 === -1. Actual: ' + (-8192 >> 26)); \n} \n\n\nif (-16384 >> 26 !== -1) { \n $ERROR('#847: -16384 >> 26 === -1. Actual: ' + (-16384 >> 26)); \n} \n\n\nif (-32768 >> 26 !== -1) { \n $ERROR('#848: -32768 >> 26 === -1. Actual: ' + (-32768 >> 26)); \n} \n\n\nif (-65536 >> 26 !== -1) { \n $ERROR('#849: -65536 >> 26 === -1. Actual: ' + (-65536 >> 26)); \n} \n\n\nif (-131072 >> 26 !== -1) { \n $ERROR('#850: -131072 >> 26 === -1. Actual: ' + (-131072 >> 26)); \n} \n\n\nif (-262144 >> 26 !== -1) { \n $ERROR('#851: -262144 >> 26 === -1. Actual: ' + (-262144 >> 26)); \n} \n\n\nif (-524288 >> 26 !== -1) { \n $ERROR('#852: -524288 >> 26 === -1. Actual: ' + (-524288 >> 26)); \n} \n\n\nif (-1048576 >> 26 !== -1) { \n $ERROR('#853: -1048576 >> 26 === -1. Actual: ' + (-1048576 >> 26)); \n} \n\n\nif (-2097152 >> 26 !== -1) { \n $ERROR('#854: -2097152 >> 26 === -1. Actual: ' + (-2097152 >> 26)); \n} \n\n\nif (-4194304 >> 26 !== -1) { \n $ERROR('#855: -4194304 >> 26 === -1. Actual: ' + (-4194304 >> 26)); \n} \n\n\nif (-8388608 >> 26 !== -1) { \n $ERROR('#856: -8388608 >> 26 === -1. Actual: ' + (-8388608 >> 26)); \n} \n\n\nif (-16777216 >> 26 !== -1) { \n $ERROR('#857: -16777216 >> 26 === -1. Actual: ' + (-16777216 >> 26)); \n} \n\n\nif (-33554432 >> 26 !== -1) { \n $ERROR('#858: -33554432 >> 26 === -1. Actual: ' + (-33554432 >> 26)); \n} \n\n\nif (-67108864 >> 26 !== -1) { \n $ERROR('#859: -67108864 >> 26 === -1. Actual: ' + (-67108864 >> 26)); \n} \n\n\nif (-134217728 >> 26 !== -2) { \n $ERROR('#860: -134217728 >> 26 === -2. Actual: ' + (-134217728 >> 26)); \n} \n\n\nif (-268435456 >> 26 !== -4) { \n $ERROR('#861: -268435456 >> 26 === -4. Actual: ' + (-268435456 >> 26)); \n} \n\n\nif (-536870912 >> 26 !== -8) { \n $ERROR('#862: -536870912 >> 26 === -8. Actual: ' + (-536870912 >> 26)); \n} \n\n\nif (-1073741824 >> 26 !== -16) { \n $ERROR('#863: -1073741824 >> 26 === -16. Actual: ' + (-1073741824 >> 26)); \n} \n\n\nif (-2147483648 >> 26 !== -32) { \n $ERROR('#864: -2147483648 >> 26 === -32. Actual: ' + (-2147483648 >> 26)); \n} \n\n\nif (-1 >> 27 !== -1) { \n $ERROR('#865: -1 >> 27 === -1. Actual: ' + (-1 >> 27)); \n} \n\n\nif (-2 >> 27 !== -1) { \n $ERROR('#866: -2 >> 27 === -1. Actual: ' + (-2 >> 27)); \n} \n\n\nif (-4 >> 27 !== -1) { \n $ERROR('#867: -4 >> 27 === -1. Actual: ' + (-4 >> 27)); \n} \n\n\nif (-8 >> 27 !== -1) { \n $ERROR('#868: -8 >> 27 === -1. Actual: ' + (-8 >> 27)); \n} \n\n\nif (-16 >> 27 !== -1) { \n $ERROR('#869: -16 >> 27 === -1. Actual: ' + (-16 >> 27)); \n} \n\n\nif (-32 >> 27 !== -1) { \n $ERROR('#870: -32 >> 27 === -1. Actual: ' + (-32 >> 27)); \n} \n\n\nif (-64 >> 27 !== -1) { \n $ERROR('#871: -64 >> 27 === -1. Actual: ' + (-64 >> 27)); \n} \n\n\nif (-128 >> 27 !== -1) { \n $ERROR('#872: -128 >> 27 === -1. Actual: ' + (-128 >> 27)); \n} \n\n\nif (-256 >> 27 !== -1) { \n $ERROR('#873: -256 >> 27 === -1. Actual: ' + (-256 >> 27)); \n} \n\n\nif (-512 >> 27 !== -1) { \n $ERROR('#874: -512 >> 27 === -1. Actual: ' + (-512 >> 27)); \n} \n\n\nif (-1024 >> 27 !== -1) { \n $ERROR('#875: -1024 >> 27 === -1. Actual: ' + (-1024 >> 27)); \n} \n\n\nif (-2048 >> 27 !== -1) { \n $ERROR('#876: -2048 >> 27 === -1. Actual: ' + (-2048 >> 27)); \n} \n\n\nif (-4096 >> 27 !== -1) { \n $ERROR('#877: -4096 >> 27 === -1. Actual: ' + (-4096 >> 27)); \n} \n\n\nif (-8192 >> 27 !== -1) { \n $ERROR('#878: -8192 >> 27 === -1. Actual: ' + (-8192 >> 27)); \n} \n\n\nif (-16384 >> 27 !== -1) { \n $ERROR('#879: -16384 >> 27 === -1. Actual: ' + (-16384 >> 27)); \n} \n\n\nif (-32768 >> 27 !== -1) { \n $ERROR('#880: -32768 >> 27 === -1. Actual: ' + (-32768 >> 27)); \n} \n\n\nif (-65536 >> 27 !== -1) { \n $ERROR('#881: -65536 >> 27 === -1. Actual: ' + (-65536 >> 27)); \n} \n\n\nif (-131072 >> 27 !== -1) { \n $ERROR('#882: -131072 >> 27 === -1. Actual: ' + (-131072 >> 27)); \n} \n\n\nif (-262144 >> 27 !== -1) { \n $ERROR('#883: -262144 >> 27 === -1. Actual: ' + (-262144 >> 27)); \n} \n\n\nif (-524288 >> 27 !== -1) { \n $ERROR('#884: -524288 >> 27 === -1. Actual: ' + (-524288 >> 27)); \n} \n\n\nif (-1048576 >> 27 !== -1) { \n $ERROR('#885: -1048576 >> 27 === -1. Actual: ' + (-1048576 >> 27)); \n} \n\n\nif (-2097152 >> 27 !== -1) { \n $ERROR('#886: -2097152 >> 27 === -1. Actual: ' + (-2097152 >> 27)); \n} \n\n\nif (-4194304 >> 27 !== -1) { \n $ERROR('#887: -4194304 >> 27 === -1. Actual: ' + (-4194304 >> 27)); \n} \n\n\nif (-8388608 >> 27 !== -1) { \n $ERROR('#888: -8388608 >> 27 === -1. Actual: ' + (-8388608 >> 27)); \n} \n\n\nif (-16777216 >> 27 !== -1) { \n $ERROR('#889: -16777216 >> 27 === -1. Actual: ' + (-16777216 >> 27)); \n} \n\n\nif (-33554432 >> 27 !== -1) { \n $ERROR('#890: -33554432 >> 27 === -1. Actual: ' + (-33554432 >> 27)); \n} \n\n\nif (-67108864 >> 27 !== -1) { \n $ERROR('#891: -67108864 >> 27 === -1. Actual: ' + (-67108864 >> 27)); \n} \n\n\nif (-134217728 >> 27 !== -1) { \n $ERROR('#892: -134217728 >> 27 === -1. Actual: ' + (-134217728 >> 27)); \n} \n\n\nif (-268435456 >> 27 !== -2) { \n $ERROR('#893: -268435456 >> 27 === -2. Actual: ' + (-268435456 >> 27)); \n} \n\n\nif (-536870912 >> 27 !== -4) { \n $ERROR('#894: -536870912 >> 27 === -4. Actual: ' + (-536870912 >> 27)); \n} \n\n\nif (-1073741824 >> 27 !== -8) { \n $ERROR('#895: -1073741824 >> 27 === -8. Actual: ' + (-1073741824 >> 27)); \n} \n\n\nif (-2147483648 >> 27 !== -16) { \n $ERROR('#896: -2147483648 >> 27 === -16. Actual: ' + (-2147483648 >> 27)); \n} \n\n\nif (-1 >> 28 !== -1) { \n $ERROR('#897: -1 >> 28 === -1. Actual: ' + (-1 >> 28)); \n} \n\n\nif (-2 >> 28 !== -1) { \n $ERROR('#898: -2 >> 28 === -1. Actual: ' + (-2 >> 28)); \n} \n\n\nif (-4 >> 28 !== -1) { \n $ERROR('#899: -4 >> 28 === -1. Actual: ' + (-4 >> 28)); \n} \n\n\nif (-8 >> 28 !== -1) { \n $ERROR('#900: -8 >> 28 === -1. Actual: ' + (-8 >> 28)); \n} \n\n\nif (-16 >> 28 !== -1) { \n $ERROR('#901: -16 >> 28 === -1. Actual: ' + (-16 >> 28)); \n} \n\n\nif (-32 >> 28 !== -1) { \n $ERROR('#902: -32 >> 28 === -1. Actual: ' + (-32 >> 28)); \n} \n\n\nif (-64 >> 28 !== -1) { \n $ERROR('#903: -64 >> 28 === -1. Actual: ' + (-64 >> 28)); \n} \n\n\nif (-128 >> 28 !== -1) { \n $ERROR('#904: -128 >> 28 === -1. Actual: ' + (-128 >> 28)); \n} \n\n\nif (-256 >> 28 !== -1) { \n $ERROR('#905: -256 >> 28 === -1. Actual: ' + (-256 >> 28)); \n} \n\n\nif (-512 >> 28 !== -1) { \n $ERROR('#906: -512 >> 28 === -1. Actual: ' + (-512 >> 28)); \n} \n\n\nif (-1024 >> 28 !== -1) { \n $ERROR('#907: -1024 >> 28 === -1. Actual: ' + (-1024 >> 28)); \n} \n\n\nif (-2048 >> 28 !== -1) { \n $ERROR('#908: -2048 >> 28 === -1. Actual: ' + (-2048 >> 28)); \n} \n\n\nif (-4096 >> 28 !== -1) { \n $ERROR('#909: -4096 >> 28 === -1. Actual: ' + (-4096 >> 28)); \n} \n\n\nif (-8192 >> 28 !== -1) { \n $ERROR('#910: -8192 >> 28 === -1. Actual: ' + (-8192 >> 28)); \n} \n\n\nif (-16384 >> 28 !== -1) { \n $ERROR('#911: -16384 >> 28 === -1. Actual: ' + (-16384 >> 28)); \n} \n\n\nif (-32768 >> 28 !== -1) { \n $ERROR('#912: -32768 >> 28 === -1. Actual: ' + (-32768 >> 28)); \n} \n\n\nif (-65536 >> 28 !== -1) { \n $ERROR('#913: -65536 >> 28 === -1. Actual: ' + (-65536 >> 28)); \n} \n\n\nif (-131072 >> 28 !== -1) { \n $ERROR('#914: -131072 >> 28 === -1. Actual: ' + (-131072 >> 28)); \n} \n\n\nif (-262144 >> 28 !== -1) { \n $ERROR('#915: -262144 >> 28 === -1. Actual: ' + (-262144 >> 28)); \n} \n\n\nif (-524288 >> 28 !== -1) { \n $ERROR('#916: -524288 >> 28 === -1. Actual: ' + (-524288 >> 28)); \n} \n\n\nif (-1048576 >> 28 !== -1) { \n $ERROR('#917: -1048576 >> 28 === -1. Actual: ' + (-1048576 >> 28)); \n} \n\n\nif (-2097152 >> 28 !== -1) { \n $ERROR('#918: -2097152 >> 28 === -1. Actual: ' + (-2097152 >> 28)); \n} \n\n\nif (-4194304 >> 28 !== -1) { \n $ERROR('#919: -4194304 >> 28 === -1. Actual: ' + (-4194304 >> 28)); \n} \n\n\nif (-8388608 >> 28 !== -1) { \n $ERROR('#920: -8388608 >> 28 === -1. Actual: ' + (-8388608 >> 28)); \n} \n\n\nif (-16777216 >> 28 !== -1) { \n $ERROR('#921: -16777216 >> 28 === -1. Actual: ' + (-16777216 >> 28)); \n} \n\n\nif (-33554432 >> 28 !== -1) { \n $ERROR('#922: -33554432 >> 28 === -1. Actual: ' + (-33554432 >> 28)); \n} \n\n\nif (-67108864 >> 28 !== -1) { \n $ERROR('#923: -67108864 >> 28 === -1. Actual: ' + (-67108864 >> 28)); \n} \n\n\nif (-134217728 >> 28 !== -1) { \n $ERROR('#924: -134217728 >> 28 === -1. Actual: ' + (-134217728 >> 28)); \n} \n\n\nif (-268435456 >> 28 !== -1) { \n $ERROR('#925: -268435456 >> 28 === -1. Actual: ' + (-268435456 >> 28)); \n} \n\n\nif (-536870912 >> 28 !== -2) { \n $ERROR('#926: -536870912 >> 28 === -2. Actual: ' + (-536870912 >> 28)); \n} \n\n\nif (-1073741824 >> 28 !== -4) { \n $ERROR('#927: -1073741824 >> 28 === -4. Actual: ' + (-1073741824 >> 28)); \n} \n\n\nif (-2147483648 >> 28 !== -8) { \n $ERROR('#928: -2147483648 >> 28 === -8. Actual: ' + (-2147483648 >> 28)); \n} \n\n\nif (-1 >> 29 !== -1) { \n $ERROR('#929: -1 >> 29 === -1. Actual: ' + (-1 >> 29)); \n} \n\n\nif (-2 >> 29 !== -1) { \n $ERROR('#930: -2 >> 29 === -1. Actual: ' + (-2 >> 29)); \n} \n\n\nif (-4 >> 29 !== -1) { \n $ERROR('#931: -4 >> 29 === -1. Actual: ' + (-4 >> 29)); \n} \n\n\nif (-8 >> 29 !== -1) { \n $ERROR('#932: -8 >> 29 === -1. Actual: ' + (-8 >> 29)); \n} \n\n\nif (-16 >> 29 !== -1) { \n $ERROR('#933: -16 >> 29 === -1. Actual: ' + (-16 >> 29)); \n} \n\n\nif (-32 >> 29 !== -1) { \n $ERROR('#934: -32 >> 29 === -1. Actual: ' + (-32 >> 29)); \n} \n\n\nif (-64 >> 29 !== -1) { \n $ERROR('#935: -64 >> 29 === -1. Actual: ' + (-64 >> 29)); \n} \n\n\nif (-128 >> 29 !== -1) { \n $ERROR('#936: -128 >> 29 === -1. Actual: ' + (-128 >> 29)); \n} \n\n\nif (-256 >> 29 !== -1) { \n $ERROR('#937: -256 >> 29 === -1. Actual: ' + (-256 >> 29)); \n} \n\n\nif (-512 >> 29 !== -1) { \n $ERROR('#938: -512 >> 29 === -1. Actual: ' + (-512 >> 29)); \n} \n\n\nif (-1024 >> 29 !== -1) { \n $ERROR('#939: -1024 >> 29 === -1. Actual: ' + (-1024 >> 29)); \n} \n\n\nif (-2048 >> 29 !== -1) { \n $ERROR('#940: -2048 >> 29 === -1. Actual: ' + (-2048 >> 29)); \n} \n\n\nif (-4096 >> 29 !== -1) { \n $ERROR('#941: -4096 >> 29 === -1. Actual: ' + (-4096 >> 29)); \n} \n\n\nif (-8192 >> 29 !== -1) { \n $ERROR('#942: -8192 >> 29 === -1. Actual: ' + (-8192 >> 29)); \n} \n\n\nif (-16384 >> 29 !== -1) { \n $ERROR('#943: -16384 >> 29 === -1. Actual: ' + (-16384 >> 29)); \n} \n\n\nif (-32768 >> 29 !== -1) { \n $ERROR('#944: -32768 >> 29 === -1. Actual: ' + (-32768 >> 29)); \n} \n\n\nif (-65536 >> 29 !== -1) { \n $ERROR('#945: -65536 >> 29 === -1. Actual: ' + (-65536 >> 29)); \n} \n\n\nif (-131072 >> 29 !== -1) { \n $ERROR('#946: -131072 >> 29 === -1. Actual: ' + (-131072 >> 29)); \n} \n\n\nif (-262144 >> 29 !== -1) { \n $ERROR('#947: -262144 >> 29 === -1. Actual: ' + (-262144 >> 29)); \n} \n\n\nif (-524288 >> 29 !== -1) { \n $ERROR('#948: -524288 >> 29 === -1. Actual: ' + (-524288 >> 29)); \n} \n\n\nif (-1048576 >> 29 !== -1) { \n $ERROR('#949: -1048576 >> 29 === -1. Actual: ' + (-1048576 >> 29)); \n} \n\n\nif (-2097152 >> 29 !== -1) { \n $ERROR('#950: -2097152 >> 29 === -1. Actual: ' + (-2097152 >> 29)); \n} \n\n\nif (-4194304 >> 29 !== -1) { \n $ERROR('#951: -4194304 >> 29 === -1. Actual: ' + (-4194304 >> 29)); \n} \n\n\nif (-8388608 >> 29 !== -1) { \n $ERROR('#952: -8388608 >> 29 === -1. Actual: ' + (-8388608 >> 29)); \n} \n\n\nif (-16777216 >> 29 !== -1) { \n $ERROR('#953: -16777216 >> 29 === -1. Actual: ' + (-16777216 >> 29)); \n} \n\n\nif (-33554432 >> 29 !== -1) { \n $ERROR('#954: -33554432 >> 29 === -1. Actual: ' + (-33554432 >> 29)); \n} \n\n\nif (-67108864 >> 29 !== -1) { \n $ERROR('#955: -67108864 >> 29 === -1. Actual: ' + (-67108864 >> 29)); \n} \n\n\nif (-134217728 >> 29 !== -1) { \n $ERROR('#956: -134217728 >> 29 === -1. Actual: ' + (-134217728 >> 29)); \n} \n\n\nif (-268435456 >> 29 !== -1) { \n $ERROR('#957: -268435456 >> 29 === -1. Actual: ' + (-268435456 >> 29)); \n} \n\n\nif (-536870912 >> 29 !== -1) { \n $ERROR('#958: -536870912 >> 29 === -1. Actual: ' + (-536870912 >> 29)); \n} \n\n\nif (-1073741824 >> 29 !== -2) { \n $ERROR('#959: -1073741824 >> 29 === -2. Actual: ' + (-1073741824 >> 29)); \n} \n\n\nif (-2147483648 >> 29 !== -4) { \n $ERROR('#960: -2147483648 >> 29 === -4. Actual: ' + (-2147483648 >> 29)); \n} \n\n\nif (-1 >> 30 !== -1) { \n $ERROR('#961: -1 >> 30 === -1. Actual: ' + (-1 >> 30)); \n} \n\n\nif (-2 >> 30 !== -1) { \n $ERROR('#962: -2 >> 30 === -1. Actual: ' + (-2 >> 30)); \n} \n\n\nif (-4 >> 30 !== -1) { \n $ERROR('#963: -4 >> 30 === -1. Actual: ' + (-4 >> 30)); \n} \n\n\nif (-8 >> 30 !== -1) { \n $ERROR('#964: -8 >> 30 === -1. Actual: ' + (-8 >> 30)); \n} \n\n\nif (-16 >> 30 !== -1) { \n $ERROR('#965: -16 >> 30 === -1. Actual: ' + (-16 >> 30)); \n} \n\n\nif (-32 >> 30 !== -1) { \n $ERROR('#966: -32 >> 30 === -1. Actual: ' + (-32 >> 30)); \n} \n\n\nif (-64 >> 30 !== -1) { \n $ERROR('#967: -64 >> 30 === -1. Actual: ' + (-64 >> 30)); \n} \n\n\nif (-128 >> 30 !== -1) { \n $ERROR('#968: -128 >> 30 === -1. Actual: ' + (-128 >> 30)); \n} \n\n\nif (-256 >> 30 !== -1) { \n $ERROR('#969: -256 >> 30 === -1. Actual: ' + (-256 >> 30)); \n} \n\n\nif (-512 >> 30 !== -1) { \n $ERROR('#970: -512 >> 30 === -1. Actual: ' + (-512 >> 30)); \n} \n\n\nif (-1024 >> 30 !== -1) { \n $ERROR('#971: -1024 >> 30 === -1. Actual: ' + (-1024 >> 30)); \n} \n\n\nif (-2048 >> 30 !== -1) { \n $ERROR('#972: -2048 >> 30 === -1. Actual: ' + (-2048 >> 30)); \n} \n\n\nif (-4096 >> 30 !== -1) { \n $ERROR('#973: -4096 >> 30 === -1. Actual: ' + (-4096 >> 30)); \n} \n\n\nif (-8192 >> 30 !== -1) { \n $ERROR('#974: -8192 >> 30 === -1. Actual: ' + (-8192 >> 30)); \n} \n\n\nif (-16384 >> 30 !== -1) { \n $ERROR('#975: -16384 >> 30 === -1. Actual: ' + (-16384 >> 30)); \n} \n\n\nif (-32768 >> 30 !== -1) { \n $ERROR('#976: -32768 >> 30 === -1. Actual: ' + (-32768 >> 30)); \n} \n\n\nif (-65536 >> 30 !== -1) { \n $ERROR('#977: -65536 >> 30 === -1. Actual: ' + (-65536 >> 30)); \n} \n\n\nif (-131072 >> 30 !== -1) { \n $ERROR('#978: -131072 >> 30 === -1. Actual: ' + (-131072 >> 30)); \n} \n\n\nif (-262144 >> 30 !== -1) { \n $ERROR('#979: -262144 >> 30 === -1. Actual: ' + (-262144 >> 30)); \n} \n\n\nif (-524288 >> 30 !== -1) { \n $ERROR('#980: -524288 >> 30 === -1. Actual: ' + (-524288 >> 30)); \n} \n\n\nif (-1048576 >> 30 !== -1) { \n $ERROR('#981: -1048576 >> 30 === -1. Actual: ' + (-1048576 >> 30)); \n} \n\n\nif (-2097152 >> 30 !== -1) { \n $ERROR('#982: -2097152 >> 30 === -1. Actual: ' + (-2097152 >> 30)); \n} \n\n\nif (-4194304 >> 30 !== -1) { \n $ERROR('#983: -4194304 >> 30 === -1. Actual: ' + (-4194304 >> 30)); \n} \n\n\nif (-8388608 >> 30 !== -1) { \n $ERROR('#984: -8388608 >> 30 === -1. Actual: ' + (-8388608 >> 30)); \n} \n\n\nif (-16777216 >> 30 !== -1) { \n $ERROR('#985: -16777216 >> 30 === -1. Actual: ' + (-16777216 >> 30)); \n} \n\n\nif (-33554432 >> 30 !== -1) { \n $ERROR('#986: -33554432 >> 30 === -1. Actual: ' + (-33554432 >> 30)); \n} \n\n\nif (-67108864 >> 30 !== -1) { \n $ERROR('#987: -67108864 >> 30 === -1. Actual: ' + (-67108864 >> 30)); \n} \n\n\nif (-134217728 >> 30 !== -1) { \n $ERROR('#988: -134217728 >> 30 === -1. Actual: ' + (-134217728 >> 30)); \n} \n\n\nif (-268435456 >> 30 !== -1) { \n $ERROR('#989: -268435456 >> 30 === -1. Actual: ' + (-268435456 >> 30)); \n} \n\n\nif (-536870912 >> 30 !== -1) { \n $ERROR('#990: -536870912 >> 30 === -1. Actual: ' + (-536870912 >> 30)); \n} \n\n\nif (-1073741824 >> 30 !== -1) { \n $ERROR('#991: -1073741824 >> 30 === -1. Actual: ' + (-1073741824 >> 30)); \n} \n\n\nif (-2147483648 >> 30 !== -2) { \n $ERROR('#992: -2147483648 >> 30 === -2. Actual: ' + (-2147483648 >> 30)); \n} \n\n\nif (-1 >> 31 !== -1) { \n $ERROR('#993: -1 >> 31 === -1. Actual: ' + (-1 >> 31)); \n} \n\n\nif (-2 >> 31 !== -1) { \n $ERROR('#994: -2 >> 31 === -1. Actual: ' + (-2 >> 31)); \n} \n\n\nif (-4 >> 31 !== -1) { \n $ERROR('#995: -4 >> 31 === -1. Actual: ' + (-4 >> 31)); \n} \n\n\nif (-8 >> 31 !== -1) { \n $ERROR('#996: -8 >> 31 === -1. Actual: ' + (-8 >> 31)); \n} \n\n\nif (-16 >> 31 !== -1) { \n $ERROR('#997: -16 >> 31 === -1. Actual: ' + (-16 >> 31)); \n} \n\n\nif (-32 >> 31 !== -1) { \n $ERROR('#998: -32 >> 31 === -1. Actual: ' + (-32 >> 31)); \n} \n\n\nif (-64 >> 31 !== -1) { \n $ERROR('#999: -64 >> 31 === -1. Actual: ' + (-64 >> 31)); \n} \n\n\nif (-128 >> 31 !== -1) { \n $ERROR('#1000: -128 >> 31 === -1. Actual: ' + (-128 >> 31)); \n} \n\n\nif (-256 >> 31 !== -1) { \n $ERROR('#1001: -256 >> 31 === -1. Actual: ' + (-256 >> 31)); \n} \n\n\nif (-512 >> 31 !== -1) { \n $ERROR('#1002: -512 >> 31 === -1. Actual: ' + (-512 >> 31)); \n} \n\n\nif (-1024 >> 31 !== -1) { \n $ERROR('#1003: -1024 >> 31 === -1. Actual: ' + (-1024 >> 31)); \n} \n\n\nif (-2048 >> 31 !== -1) { \n $ERROR('#1004: -2048 >> 31 === -1. Actual: ' + (-2048 >> 31)); \n} \n\n\nif (-4096 >> 31 !== -1) { \n $ERROR('#1005: -4096 >> 31 === -1. Actual: ' + (-4096 >> 31)); \n} \n\n\nif (-8192 >> 31 !== -1) { \n $ERROR('#1006: -8192 >> 31 === -1. Actual: ' + (-8192 >> 31)); \n} \n\n\nif (-16384 >> 31 !== -1) { \n $ERROR('#1007: -16384 >> 31 === -1. Actual: ' + (-16384 >> 31)); \n} \n\n\nif (-32768 >> 31 !== -1) { \n $ERROR('#1008: -32768 >> 31 === -1. Actual: ' + (-32768 >> 31)); \n} \n\n\nif (-65536 >> 31 !== -1) { \n $ERROR('#1009: -65536 >> 31 === -1. Actual: ' + (-65536 >> 31)); \n} \n\n\nif (-131072 >> 31 !== -1) { \n $ERROR('#1010: -131072 >> 31 === -1. Actual: ' + (-131072 >> 31)); \n} \n\n\nif (-262144 >> 31 !== -1) { \n $ERROR('#1011: -262144 >> 31 === -1. Actual: ' + (-262144 >> 31)); \n} \n\n\nif (-524288 >> 31 !== -1) { \n $ERROR('#1012: -524288 >> 31 === -1. Actual: ' + (-524288 >> 31)); \n} \n\n\nif (-1048576 >> 31 !== -1) { \n $ERROR('#1013: -1048576 >> 31 === -1. Actual: ' + (-1048576 >> 31)); \n} \n\n\nif (-2097152 >> 31 !== -1) { \n $ERROR('#1014: -2097152 >> 31 === -1. Actual: ' + (-2097152 >> 31)); \n} \n\n\nif (-4194304 >> 31 !== -1) { \n $ERROR('#1015: -4194304 >> 31 === -1. Actual: ' + (-4194304 >> 31)); \n} \n\n\nif (-8388608 >> 31 !== -1) { \n $ERROR('#1016: -8388608 >> 31 === -1. Actual: ' + (-8388608 >> 31)); \n} \n\n\nif (-16777216 >> 31 !== -1) { \n $ERROR('#1017: -16777216 >> 31 === -1. Actual: ' + (-16777216 >> 31)); \n} \n\n\nif (-33554432 >> 31 !== -1) { \n $ERROR('#1018: -33554432 >> 31 === -1. Actual: ' + (-33554432 >> 31)); \n} \n\n\nif (-67108864 >> 31 !== -1) { \n $ERROR('#1019: -67108864 >> 31 === -1. Actual: ' + (-67108864 >> 31)); \n} \n\n\nif (-134217728 >> 31 !== -1) { \n $ERROR('#1020: -134217728 >> 31 === -1. Actual: ' + (-134217728 >> 31)); \n} \n\n\nif (-268435456 >> 31 !== -1) { \n $ERROR('#1021: -268435456 >> 31 === -1. Actual: ' + (-268435456 >> 31)); \n} \n\n\nif (-536870912 >> 31 !== -1) { \n $ERROR('#1022: -536870912 >> 31 === -1. Actual: ' + (-536870912 >> 31)); \n} \n\n\nif (-1073741824 >> 31 !== -1) { \n $ERROR('#1023: -1073741824 >> 31 === -1. Actual: ' + (-1073741824 >> 31)); \n} \n\n\nif (-2147483648 >> 31 !== -1) { \n $ERROR('#1024: -2147483648 >> 31 === -1. Actual: ' + (-2147483648 >> 31)); \n}\n",
+ "id": "S11.7.2_A4_T2"
+ },
+ {
+ "section": "11.7.2",
+ "description": "ShiftExpression = 2^n - 1, n = 0...15",
+ "test": "//CHECK\n \nif (0 >> 0 !== 0) { \n $ERROR('#1: 0 >> 0 === 0. Actual: ' + (0 >> 0)); \n} \n\n\nif (1 >> 0 !== 1) { \n $ERROR('#2: 1 >> 0 === 1. Actual: ' + (1 >> 0)); \n} \n\n\nif (3 >> 0 !== 3) { \n $ERROR('#3: 3 >> 0 === 3. Actual: ' + (3 >> 0)); \n} \n\n\nif (7 >> 0 !== 7) { \n $ERROR('#4: 7 >> 0 === 7. Actual: ' + (7 >> 0)); \n} \n\n\nif (15 >> 0 !== 15) { \n $ERROR('#5: 15 >> 0 === 15. Actual: ' + (15 >> 0)); \n} \n\n\nif (31 >> 0 !== 31) { \n $ERROR('#6: 31 >> 0 === 31. Actual: ' + (31 >> 0)); \n} \n\n\nif (63 >> 0 !== 63) { \n $ERROR('#7: 63 >> 0 === 63. Actual: ' + (63 >> 0)); \n} \n\n\nif (127 >> 0 !== 127) { \n $ERROR('#8: 127 >> 0 === 127. Actual: ' + (127 >> 0)); \n} \n\n\nif (255 >> 0 !== 255) { \n $ERROR('#9: 255 >> 0 === 255. Actual: ' + (255 >> 0)); \n} \n\n\nif (511 >> 0 !== 511) { \n $ERROR('#10: 511 >> 0 === 511. Actual: ' + (511 >> 0)); \n} \n\n\nif (1023 >> 0 !== 1023) { \n $ERROR('#11: 1023 >> 0 === 1023. Actual: ' + (1023 >> 0)); \n} \n\n\nif (2047 >> 0 !== 2047) { \n $ERROR('#12: 2047 >> 0 === 2047. Actual: ' + (2047 >> 0)); \n} \n\n\nif (4095 >> 0 !== 4095) { \n $ERROR('#13: 4095 >> 0 === 4095. Actual: ' + (4095 >> 0)); \n} \n\n\nif (8191 >> 0 !== 8191) { \n $ERROR('#14: 8191 >> 0 === 8191. Actual: ' + (8191 >> 0)); \n} \n\n\nif (16383 >> 0 !== 16383) { \n $ERROR('#15: 16383 >> 0 === 16383. Actual: ' + (16383 >> 0)); \n} \n\n\nif (32767 >> 0 !== 32767) { \n $ERROR('#16: 32767 >> 0 === 32767. Actual: ' + (32767 >> 0)); \n} \n\n\nif (65535 >> 0 !== 65535) { \n $ERROR('#17: 65535 >> 0 === 65535. Actual: ' + (65535 >> 0)); \n} \n\n\nif (131071 >> 0 !== 131071) { \n $ERROR('#18: 131071 >> 0 === 131071. Actual: ' + (131071 >> 0)); \n} \n\n\nif (262143 >> 0 !== 262143) { \n $ERROR('#19: 262143 >> 0 === 262143. Actual: ' + (262143 >> 0)); \n} \n\n\nif (524287 >> 0 !== 524287) { \n $ERROR('#20: 524287 >> 0 === 524287. Actual: ' + (524287 >> 0)); \n} \n\n\nif (1048575 >> 0 !== 1048575) { \n $ERROR('#21: 1048575 >> 0 === 1048575. Actual: ' + (1048575 >> 0)); \n} \n\n\nif (2097151 >> 0 !== 2097151) { \n $ERROR('#22: 2097151 >> 0 === 2097151. Actual: ' + (2097151 >> 0)); \n} \n\n\nif (4194303 >> 0 !== 4194303) { \n $ERROR('#23: 4194303 >> 0 === 4194303. Actual: ' + (4194303 >> 0)); \n} \n\n\nif (8388607 >> 0 !== 8388607) { \n $ERROR('#24: 8388607 >> 0 === 8388607. Actual: ' + (8388607 >> 0)); \n} \n\n\nif (16777215 >> 0 !== 16777215) { \n $ERROR('#25: 16777215 >> 0 === 16777215. Actual: ' + (16777215 >> 0)); \n} \n\n\nif (33554431 >> 0 !== 33554431) { \n $ERROR('#26: 33554431 >> 0 === 33554431. Actual: ' + (33554431 >> 0)); \n} \n\n\nif (67108863 >> 0 !== 67108863) { \n $ERROR('#27: 67108863 >> 0 === 67108863. Actual: ' + (67108863 >> 0)); \n} \n\n\nif (134217727 >> 0 !== 134217727) { \n $ERROR('#28: 134217727 >> 0 === 134217727. Actual: ' + (134217727 >> 0)); \n} \n\n\nif (268435455 >> 0 !== 268435455) { \n $ERROR('#29: 268435455 >> 0 === 268435455. Actual: ' + (268435455 >> 0)); \n} \n\n\nif (536870911 >> 0 !== 536870911) { \n $ERROR('#30: 536870911 >> 0 === 536870911. Actual: ' + (536870911 >> 0)); \n} \n\n\nif (1073741823 >> 0 !== 1073741823) { \n $ERROR('#31: 1073741823 >> 0 === 1073741823. Actual: ' + (1073741823 >> 0)); \n} \n\n\nif (2147483647 >> 0 !== 2147483647) { \n $ERROR('#32: 2147483647 >> 0 === 2147483647. Actual: ' + (2147483647 >> 0)); \n} \n\n\nif (0 >> 1 !== 0) { \n $ERROR('#33: 0 >> 1 === 0. Actual: ' + (0 >> 1)); \n} \n\n\nif (1 >> 1 !== 0) { \n $ERROR('#34: 1 >> 1 === 0. Actual: ' + (1 >> 1)); \n} \n\n\nif (3 >> 1 !== 1) { \n $ERROR('#35: 3 >> 1 === 1. Actual: ' + (3 >> 1)); \n} \n\n\nif (7 >> 1 !== 3) { \n $ERROR('#36: 7 >> 1 === 3. Actual: ' + (7 >> 1)); \n} \n\n\nif (15 >> 1 !== 7) { \n $ERROR('#37: 15 >> 1 === 7. Actual: ' + (15 >> 1)); \n} \n\n\nif (31 >> 1 !== 15) { \n $ERROR('#38: 31 >> 1 === 15. Actual: ' + (31 >> 1)); \n} \n\n\nif (63 >> 1 !== 31) { \n $ERROR('#39: 63 >> 1 === 31. Actual: ' + (63 >> 1)); \n} \n\n\nif (127 >> 1 !== 63) { \n $ERROR('#40: 127 >> 1 === 63. Actual: ' + (127 >> 1)); \n} \n\n\nif (255 >> 1 !== 127) { \n $ERROR('#41: 255 >> 1 === 127. Actual: ' + (255 >> 1)); \n} \n\n\nif (511 >> 1 !== 255) { \n $ERROR('#42: 511 >> 1 === 255. Actual: ' + (511 >> 1)); \n} \n\n\nif (1023 >> 1 !== 511) { \n $ERROR('#43: 1023 >> 1 === 511. Actual: ' + (1023 >> 1)); \n} \n\n\nif (2047 >> 1 !== 1023) { \n $ERROR('#44: 2047 >> 1 === 1023. Actual: ' + (2047 >> 1)); \n} \n\n\nif (4095 >> 1 !== 2047) { \n $ERROR('#45: 4095 >> 1 === 2047. Actual: ' + (4095 >> 1)); \n} \n\n\nif (8191 >> 1 !== 4095) { \n $ERROR('#46: 8191 >> 1 === 4095. Actual: ' + (8191 >> 1)); \n} \n\n\nif (16383 >> 1 !== 8191) { \n $ERROR('#47: 16383 >> 1 === 8191. Actual: ' + (16383 >> 1)); \n} \n\n\nif (32767 >> 1 !== 16383) { \n $ERROR('#48: 32767 >> 1 === 16383. Actual: ' + (32767 >> 1)); \n} \n\n\nif (65535 >> 1 !== 32767) { \n $ERROR('#49: 65535 >> 1 === 32767. Actual: ' + (65535 >> 1)); \n} \n\n\nif (131071 >> 1 !== 65535) { \n $ERROR('#50: 131071 >> 1 === 65535. Actual: ' + (131071 >> 1)); \n} \n\n\nif (262143 >> 1 !== 131071) { \n $ERROR('#51: 262143 >> 1 === 131071. Actual: ' + (262143 >> 1)); \n} \n\n\nif (524287 >> 1 !== 262143) { \n $ERROR('#52: 524287 >> 1 === 262143. Actual: ' + (524287 >> 1)); \n} \n\n\nif (1048575 >> 1 !== 524287) { \n $ERROR('#53: 1048575 >> 1 === 524287. Actual: ' + (1048575 >> 1)); \n} \n\n\nif (2097151 >> 1 !== 1048575) { \n $ERROR('#54: 2097151 >> 1 === 1048575. Actual: ' + (2097151 >> 1)); \n} \n\n\nif (4194303 >> 1 !== 2097151) { \n $ERROR('#55: 4194303 >> 1 === 2097151. Actual: ' + (4194303 >> 1)); \n} \n\n\nif (8388607 >> 1 !== 4194303) { \n $ERROR('#56: 8388607 >> 1 === 4194303. Actual: ' + (8388607 >> 1)); \n} \n\n\nif (16777215 >> 1 !== 8388607) { \n $ERROR('#57: 16777215 >> 1 === 8388607. Actual: ' + (16777215 >> 1)); \n} \n\n\nif (33554431 >> 1 !== 16777215) { \n $ERROR('#58: 33554431 >> 1 === 16777215. Actual: ' + (33554431 >> 1)); \n} \n\n\nif (67108863 >> 1 !== 33554431) { \n $ERROR('#59: 67108863 >> 1 === 33554431. Actual: ' + (67108863 >> 1)); \n} \n\n\nif (134217727 >> 1 !== 67108863) { \n $ERROR('#60: 134217727 >> 1 === 67108863. Actual: ' + (134217727 >> 1)); \n} \n\n\nif (268435455 >> 1 !== 134217727) { \n $ERROR('#61: 268435455 >> 1 === 134217727. Actual: ' + (268435455 >> 1)); \n} \n\n\nif (536870911 >> 1 !== 268435455) { \n $ERROR('#62: 536870911 >> 1 === 268435455. Actual: ' + (536870911 >> 1)); \n} \n\n\nif (1073741823 >> 1 !== 536870911) { \n $ERROR('#63: 1073741823 >> 1 === 536870911. Actual: ' + (1073741823 >> 1)); \n} \n\n\nif (2147483647 >> 1 !== 1073741823) { \n $ERROR('#64: 2147483647 >> 1 === 1073741823. Actual: ' + (2147483647 >> 1)); \n} \n\n\nif (0 >> 2 !== 0) { \n $ERROR('#65: 0 >> 2 === 0. Actual: ' + (0 >> 2)); \n} \n\n\nif (1 >> 2 !== 0) { \n $ERROR('#66: 1 >> 2 === 0. Actual: ' + (1 >> 2)); \n} \n\n\nif (3 >> 2 !== 0) { \n $ERROR('#67: 3 >> 2 === 0. Actual: ' + (3 >> 2)); \n} \n\n\nif (7 >> 2 !== 1) { \n $ERROR('#68: 7 >> 2 === 1. Actual: ' + (7 >> 2)); \n} \n\n\nif (15 >> 2 !== 3) { \n $ERROR('#69: 15 >> 2 === 3. Actual: ' + (15 >> 2)); \n} \n\n\nif (31 >> 2 !== 7) { \n $ERROR('#70: 31 >> 2 === 7. Actual: ' + (31 >> 2)); \n} \n\n\nif (63 >> 2 !== 15) { \n $ERROR('#71: 63 >> 2 === 15. Actual: ' + (63 >> 2)); \n} \n\n\nif (127 >> 2 !== 31) { \n $ERROR('#72: 127 >> 2 === 31. Actual: ' + (127 >> 2)); \n} \n\n\nif (255 >> 2 !== 63) { \n $ERROR('#73: 255 >> 2 === 63. Actual: ' + (255 >> 2)); \n} \n\n\nif (511 >> 2 !== 127) { \n $ERROR('#74: 511 >> 2 === 127. Actual: ' + (511 >> 2)); \n} \n\n\nif (1023 >> 2 !== 255) { \n $ERROR('#75: 1023 >> 2 === 255. Actual: ' + (1023 >> 2)); \n} \n\n\nif (2047 >> 2 !== 511) { \n $ERROR('#76: 2047 >> 2 === 511. Actual: ' + (2047 >> 2)); \n} \n\n\nif (4095 >> 2 !== 1023) { \n $ERROR('#77: 4095 >> 2 === 1023. Actual: ' + (4095 >> 2)); \n} \n\n\nif (8191 >> 2 !== 2047) { \n $ERROR('#78: 8191 >> 2 === 2047. Actual: ' + (8191 >> 2)); \n} \n\n\nif (16383 >> 2 !== 4095) { \n $ERROR('#79: 16383 >> 2 === 4095. Actual: ' + (16383 >> 2)); \n} \n\n\nif (32767 >> 2 !== 8191) { \n $ERROR('#80: 32767 >> 2 === 8191. Actual: ' + (32767 >> 2)); \n} \n\n\nif (65535 >> 2 !== 16383) { \n $ERROR('#81: 65535 >> 2 === 16383. Actual: ' + (65535 >> 2)); \n} \n\n\nif (131071 >> 2 !== 32767) { \n $ERROR('#82: 131071 >> 2 === 32767. Actual: ' + (131071 >> 2)); \n} \n\n\nif (262143 >> 2 !== 65535) { \n $ERROR('#83: 262143 >> 2 === 65535. Actual: ' + (262143 >> 2)); \n} \n\n\nif (524287 >> 2 !== 131071) { \n $ERROR('#84: 524287 >> 2 === 131071. Actual: ' + (524287 >> 2)); \n} \n\n\nif (1048575 >> 2 !== 262143) { \n $ERROR('#85: 1048575 >> 2 === 262143. Actual: ' + (1048575 >> 2)); \n} \n\n\nif (2097151 >> 2 !== 524287) { \n $ERROR('#86: 2097151 >> 2 === 524287. Actual: ' + (2097151 >> 2)); \n} \n\n\nif (4194303 >> 2 !== 1048575) { \n $ERROR('#87: 4194303 >> 2 === 1048575. Actual: ' + (4194303 >> 2)); \n} \n\n\nif (8388607 >> 2 !== 2097151) { \n $ERROR('#88: 8388607 >> 2 === 2097151. Actual: ' + (8388607 >> 2)); \n} \n\n\nif (16777215 >> 2 !== 4194303) { \n $ERROR('#89: 16777215 >> 2 === 4194303. Actual: ' + (16777215 >> 2)); \n} \n\n\nif (33554431 >> 2 !== 8388607) { \n $ERROR('#90: 33554431 >> 2 === 8388607. Actual: ' + (33554431 >> 2)); \n} \n\n\nif (67108863 >> 2 !== 16777215) { \n $ERROR('#91: 67108863 >> 2 === 16777215. Actual: ' + (67108863 >> 2)); \n} \n\n\nif (134217727 >> 2 !== 33554431) { \n $ERROR('#92: 134217727 >> 2 === 33554431. Actual: ' + (134217727 >> 2)); \n} \n\n\nif (268435455 >> 2 !== 67108863) { \n $ERROR('#93: 268435455 >> 2 === 67108863. Actual: ' + (268435455 >> 2)); \n} \n\n\nif (536870911 >> 2 !== 134217727) { \n $ERROR('#94: 536870911 >> 2 === 134217727. Actual: ' + (536870911 >> 2)); \n} \n\n\nif (1073741823 >> 2 !== 268435455) { \n $ERROR('#95: 1073741823 >> 2 === 268435455. Actual: ' + (1073741823 >> 2)); \n} \n\n\nif (2147483647 >> 2 !== 536870911) { \n $ERROR('#96: 2147483647 >> 2 === 536870911. Actual: ' + (2147483647 >> 2)); \n} \n\n\nif (0 >> 3 !== 0) { \n $ERROR('#97: 0 >> 3 === 0. Actual: ' + (0 >> 3)); \n} \n\n\nif (1 >> 3 !== 0) { \n $ERROR('#98: 1 >> 3 === 0. Actual: ' + (1 >> 3)); \n} \n\n\nif (3 >> 3 !== 0) { \n $ERROR('#99: 3 >> 3 === 0. Actual: ' + (3 >> 3)); \n} \n\n\nif (7 >> 3 !== 0) { \n $ERROR('#100: 7 >> 3 === 0. Actual: ' + (7 >> 3)); \n} \n\n\nif (15 >> 3 !== 1) { \n $ERROR('#101: 15 >> 3 === 1. Actual: ' + (15 >> 3)); \n} \n\n\nif (31 >> 3 !== 3) { \n $ERROR('#102: 31 >> 3 === 3. Actual: ' + (31 >> 3)); \n} \n\n\nif (63 >> 3 !== 7) { \n $ERROR('#103: 63 >> 3 === 7. Actual: ' + (63 >> 3)); \n} \n\n\nif (127 >> 3 !== 15) { \n $ERROR('#104: 127 >> 3 === 15. Actual: ' + (127 >> 3)); \n} \n\n\nif (255 >> 3 !== 31) { \n $ERROR('#105: 255 >> 3 === 31. Actual: ' + (255 >> 3)); \n} \n\n\nif (511 >> 3 !== 63) { \n $ERROR('#106: 511 >> 3 === 63. Actual: ' + (511 >> 3)); \n} \n\n\nif (1023 >> 3 !== 127) { \n $ERROR('#107: 1023 >> 3 === 127. Actual: ' + (1023 >> 3)); \n} \n\n\nif (2047 >> 3 !== 255) { \n $ERROR('#108: 2047 >> 3 === 255. Actual: ' + (2047 >> 3)); \n} \n\n\nif (4095 >> 3 !== 511) { \n $ERROR('#109: 4095 >> 3 === 511. Actual: ' + (4095 >> 3)); \n} \n\n\nif (8191 >> 3 !== 1023) { \n $ERROR('#110: 8191 >> 3 === 1023. Actual: ' + (8191 >> 3)); \n} \n\n\nif (16383 >> 3 !== 2047) { \n $ERROR('#111: 16383 >> 3 === 2047. Actual: ' + (16383 >> 3)); \n} \n\n\nif (32767 >> 3 !== 4095) { \n $ERROR('#112: 32767 >> 3 === 4095. Actual: ' + (32767 >> 3)); \n} \n\n\nif (65535 >> 3 !== 8191) { \n $ERROR('#113: 65535 >> 3 === 8191. Actual: ' + (65535 >> 3)); \n} \n\n\nif (131071 >> 3 !== 16383) { \n $ERROR('#114: 131071 >> 3 === 16383. Actual: ' + (131071 >> 3)); \n} \n\n\nif (262143 >> 3 !== 32767) { \n $ERROR('#115: 262143 >> 3 === 32767. Actual: ' + (262143 >> 3)); \n} \n\n\nif (524287 >> 3 !== 65535) { \n $ERROR('#116: 524287 >> 3 === 65535. Actual: ' + (524287 >> 3)); \n} \n\n\nif (1048575 >> 3 !== 131071) { \n $ERROR('#117: 1048575 >> 3 === 131071. Actual: ' + (1048575 >> 3)); \n} \n\n\nif (2097151 >> 3 !== 262143) { \n $ERROR('#118: 2097151 >> 3 === 262143. Actual: ' + (2097151 >> 3)); \n} \n\n\nif (4194303 >> 3 !== 524287) { \n $ERROR('#119: 4194303 >> 3 === 524287. Actual: ' + (4194303 >> 3)); \n} \n\n\nif (8388607 >> 3 !== 1048575) { \n $ERROR('#120: 8388607 >> 3 === 1048575. Actual: ' + (8388607 >> 3)); \n} \n\n\nif (16777215 >> 3 !== 2097151) { \n $ERROR('#121: 16777215 >> 3 === 2097151. Actual: ' + (16777215 >> 3)); \n} \n\n\nif (33554431 >> 3 !== 4194303) { \n $ERROR('#122: 33554431 >> 3 === 4194303. Actual: ' + (33554431 >> 3)); \n} \n\n\nif (67108863 >> 3 !== 8388607) { \n $ERROR('#123: 67108863 >> 3 === 8388607. Actual: ' + (67108863 >> 3)); \n} \n\n\nif (134217727 >> 3 !== 16777215) { \n $ERROR('#124: 134217727 >> 3 === 16777215. Actual: ' + (134217727 >> 3)); \n} \n\n\nif (268435455 >> 3 !== 33554431) { \n $ERROR('#125: 268435455 >> 3 === 33554431. Actual: ' + (268435455 >> 3)); \n} \n\n\nif (536870911 >> 3 !== 67108863) { \n $ERROR('#126: 536870911 >> 3 === 67108863. Actual: ' + (536870911 >> 3)); \n} \n\n\nif (1073741823 >> 3 !== 134217727) { \n $ERROR('#127: 1073741823 >> 3 === 134217727. Actual: ' + (1073741823 >> 3)); \n} \n\n\nif (2147483647 >> 3 !== 268435455) { \n $ERROR('#128: 2147483647 >> 3 === 268435455. Actual: ' + (2147483647 >> 3)); \n} \n\n\nif (0 >> 4 !== 0) { \n $ERROR('#129: 0 >> 4 === 0. Actual: ' + (0 >> 4)); \n} \n\n\nif (1 >> 4 !== 0) { \n $ERROR('#130: 1 >> 4 === 0. Actual: ' + (1 >> 4)); \n} \n\n\nif (3 >> 4 !== 0) { \n $ERROR('#131: 3 >> 4 === 0. Actual: ' + (3 >> 4)); \n} \n\n\nif (7 >> 4 !== 0) { \n $ERROR('#132: 7 >> 4 === 0. Actual: ' + (7 >> 4)); \n} \n\n\nif (15 >> 4 !== 0) { \n $ERROR('#133: 15 >> 4 === 0. Actual: ' + (15 >> 4)); \n} \n\n\nif (31 >> 4 !== 1) { \n $ERROR('#134: 31 >> 4 === 1. Actual: ' + (31 >> 4)); \n} \n\n\nif (63 >> 4 !== 3) { \n $ERROR('#135: 63 >> 4 === 3. Actual: ' + (63 >> 4)); \n} \n\n\nif (127 >> 4 !== 7) { \n $ERROR('#136: 127 >> 4 === 7. Actual: ' + (127 >> 4)); \n} \n\n\nif (255 >> 4 !== 15) { \n $ERROR('#137: 255 >> 4 === 15. Actual: ' + (255 >> 4)); \n} \n\n\nif (511 >> 4 !== 31) { \n $ERROR('#138: 511 >> 4 === 31. Actual: ' + (511 >> 4)); \n} \n\n\nif (1023 >> 4 !== 63) { \n $ERROR('#139: 1023 >> 4 === 63. Actual: ' + (1023 >> 4)); \n} \n\n\nif (2047 >> 4 !== 127) { \n $ERROR('#140: 2047 >> 4 === 127. Actual: ' + (2047 >> 4)); \n} \n\n\nif (4095 >> 4 !== 255) { \n $ERROR('#141: 4095 >> 4 === 255. Actual: ' + (4095 >> 4)); \n} \n\n\nif (8191 >> 4 !== 511) { \n $ERROR('#142: 8191 >> 4 === 511. Actual: ' + (8191 >> 4)); \n} \n\n\nif (16383 >> 4 !== 1023) { \n $ERROR('#143: 16383 >> 4 === 1023. Actual: ' + (16383 >> 4)); \n} \n\n\nif (32767 >> 4 !== 2047) { \n $ERROR('#144: 32767 >> 4 === 2047. Actual: ' + (32767 >> 4)); \n} \n\n\nif (65535 >> 4 !== 4095) { \n $ERROR('#145: 65535 >> 4 === 4095. Actual: ' + (65535 >> 4)); \n} \n\n\nif (131071 >> 4 !== 8191) { \n $ERROR('#146: 131071 >> 4 === 8191. Actual: ' + (131071 >> 4)); \n} \n\n\nif (262143 >> 4 !== 16383) { \n $ERROR('#147: 262143 >> 4 === 16383. Actual: ' + (262143 >> 4)); \n} \n\n\nif (524287 >> 4 !== 32767) { \n $ERROR('#148: 524287 >> 4 === 32767. Actual: ' + (524287 >> 4)); \n} \n\n\nif (1048575 >> 4 !== 65535) { \n $ERROR('#149: 1048575 >> 4 === 65535. Actual: ' + (1048575 >> 4)); \n} \n\n\nif (2097151 >> 4 !== 131071) { \n $ERROR('#150: 2097151 >> 4 === 131071. Actual: ' + (2097151 >> 4)); \n} \n\n\nif (4194303 >> 4 !== 262143) { \n $ERROR('#151: 4194303 >> 4 === 262143. Actual: ' + (4194303 >> 4)); \n} \n\n\nif (8388607 >> 4 !== 524287) { \n $ERROR('#152: 8388607 >> 4 === 524287. Actual: ' + (8388607 >> 4)); \n} \n\n\nif (16777215 >> 4 !== 1048575) { \n $ERROR('#153: 16777215 >> 4 === 1048575. Actual: ' + (16777215 >> 4)); \n} \n\n\nif (33554431 >> 4 !== 2097151) { \n $ERROR('#154: 33554431 >> 4 === 2097151. Actual: ' + (33554431 >> 4)); \n} \n\n\nif (67108863 >> 4 !== 4194303) { \n $ERROR('#155: 67108863 >> 4 === 4194303. Actual: ' + (67108863 >> 4)); \n} \n\n\nif (134217727 >> 4 !== 8388607) { \n $ERROR('#156: 134217727 >> 4 === 8388607. Actual: ' + (134217727 >> 4)); \n} \n\n\nif (268435455 >> 4 !== 16777215) { \n $ERROR('#157: 268435455 >> 4 === 16777215. Actual: ' + (268435455 >> 4)); \n} \n\n\nif (536870911 >> 4 !== 33554431) { \n $ERROR('#158: 536870911 >> 4 === 33554431. Actual: ' + (536870911 >> 4)); \n} \n\n\nif (1073741823 >> 4 !== 67108863) { \n $ERROR('#159: 1073741823 >> 4 === 67108863. Actual: ' + (1073741823 >> 4)); \n} \n\n\nif (2147483647 >> 4 !== 134217727) { \n $ERROR('#160: 2147483647 >> 4 === 134217727. Actual: ' + (2147483647 >> 4)); \n} \n\n\nif (0 >> 5 !== 0) { \n $ERROR('#161: 0 >> 5 === 0. Actual: ' + (0 >> 5)); \n} \n\n\nif (1 >> 5 !== 0) { \n $ERROR('#162: 1 >> 5 === 0. Actual: ' + (1 >> 5)); \n} \n\n\nif (3 >> 5 !== 0) { \n $ERROR('#163: 3 >> 5 === 0. Actual: ' + (3 >> 5)); \n} \n\n\nif (7 >> 5 !== 0) { \n $ERROR('#164: 7 >> 5 === 0. Actual: ' + (7 >> 5)); \n} \n\n\nif (15 >> 5 !== 0) { \n $ERROR('#165: 15 >> 5 === 0. Actual: ' + (15 >> 5)); \n} \n\n\nif (31 >> 5 !== 0) { \n $ERROR('#166: 31 >> 5 === 0. Actual: ' + (31 >> 5)); \n} \n\n\nif (63 >> 5 !== 1) { \n $ERROR('#167: 63 >> 5 === 1. Actual: ' + (63 >> 5)); \n} \n\n\nif (127 >> 5 !== 3) { \n $ERROR('#168: 127 >> 5 === 3. Actual: ' + (127 >> 5)); \n} \n\n\nif (255 >> 5 !== 7) { \n $ERROR('#169: 255 >> 5 === 7. Actual: ' + (255 >> 5)); \n} \n\n\nif (511 >> 5 !== 15) { \n $ERROR('#170: 511 >> 5 === 15. Actual: ' + (511 >> 5)); \n} \n\n\nif (1023 >> 5 !== 31) { \n $ERROR('#171: 1023 >> 5 === 31. Actual: ' + (1023 >> 5)); \n} \n\n\nif (2047 >> 5 !== 63) { \n $ERROR('#172: 2047 >> 5 === 63. Actual: ' + (2047 >> 5)); \n} \n\n\nif (4095 >> 5 !== 127) { \n $ERROR('#173: 4095 >> 5 === 127. Actual: ' + (4095 >> 5)); \n} \n\n\nif (8191 >> 5 !== 255) { \n $ERROR('#174: 8191 >> 5 === 255. Actual: ' + (8191 >> 5)); \n} \n\n\nif (16383 >> 5 !== 511) { \n $ERROR('#175: 16383 >> 5 === 511. Actual: ' + (16383 >> 5)); \n} \n\n\nif (32767 >> 5 !== 1023) { \n $ERROR('#176: 32767 >> 5 === 1023. Actual: ' + (32767 >> 5)); \n} \n\n\nif (65535 >> 5 !== 2047) { \n $ERROR('#177: 65535 >> 5 === 2047. Actual: ' + (65535 >> 5)); \n} \n\n\nif (131071 >> 5 !== 4095) { \n $ERROR('#178: 131071 >> 5 === 4095. Actual: ' + (131071 >> 5)); \n} \n\n\nif (262143 >> 5 !== 8191) { \n $ERROR('#179: 262143 >> 5 === 8191. Actual: ' + (262143 >> 5)); \n} \n\n\nif (524287 >> 5 !== 16383) { \n $ERROR('#180: 524287 >> 5 === 16383. Actual: ' + (524287 >> 5)); \n} \n\n\nif (1048575 >> 5 !== 32767) { \n $ERROR('#181: 1048575 >> 5 === 32767. Actual: ' + (1048575 >> 5)); \n} \n\n\nif (2097151 >> 5 !== 65535) { \n $ERROR('#182: 2097151 >> 5 === 65535. Actual: ' + (2097151 >> 5)); \n} \n\n\nif (4194303 >> 5 !== 131071) { \n $ERROR('#183: 4194303 >> 5 === 131071. Actual: ' + (4194303 >> 5)); \n} \n\n\nif (8388607 >> 5 !== 262143) { \n $ERROR('#184: 8388607 >> 5 === 262143. Actual: ' + (8388607 >> 5)); \n} \n\n\nif (16777215 >> 5 !== 524287) { \n $ERROR('#185: 16777215 >> 5 === 524287. Actual: ' + (16777215 >> 5)); \n} \n\n\nif (33554431 >> 5 !== 1048575) { \n $ERROR('#186: 33554431 >> 5 === 1048575. Actual: ' + (33554431 >> 5)); \n} \n\n\nif (67108863 >> 5 !== 2097151) { \n $ERROR('#187: 67108863 >> 5 === 2097151. Actual: ' + (67108863 >> 5)); \n} \n\n\nif (134217727 >> 5 !== 4194303) { \n $ERROR('#188: 134217727 >> 5 === 4194303. Actual: ' + (134217727 >> 5)); \n} \n\n\nif (268435455 >> 5 !== 8388607) { \n $ERROR('#189: 268435455 >> 5 === 8388607. Actual: ' + (268435455 >> 5)); \n} \n\n\nif (536870911 >> 5 !== 16777215) { \n $ERROR('#190: 536870911 >> 5 === 16777215. Actual: ' + (536870911 >> 5)); \n} \n\n\nif (1073741823 >> 5 !== 33554431) { \n $ERROR('#191: 1073741823 >> 5 === 33554431. Actual: ' + (1073741823 >> 5)); \n} \n\n\nif (2147483647 >> 5 !== 67108863) { \n $ERROR('#192: 2147483647 >> 5 === 67108863. Actual: ' + (2147483647 >> 5)); \n} \n\n\nif (0 >> 6 !== 0) { \n $ERROR('#193: 0 >> 6 === 0. Actual: ' + (0 >> 6)); \n} \n\n\nif (1 >> 6 !== 0) { \n $ERROR('#194: 1 >> 6 === 0. Actual: ' + (1 >> 6)); \n} \n\n\nif (3 >> 6 !== 0) { \n $ERROR('#195: 3 >> 6 === 0. Actual: ' + (3 >> 6)); \n} \n\n\nif (7 >> 6 !== 0) { \n $ERROR('#196: 7 >> 6 === 0. Actual: ' + (7 >> 6)); \n} \n\n\nif (15 >> 6 !== 0) { \n $ERROR('#197: 15 >> 6 === 0. Actual: ' + (15 >> 6)); \n} \n\n\nif (31 >> 6 !== 0) { \n $ERROR('#198: 31 >> 6 === 0. Actual: ' + (31 >> 6)); \n} \n\n\nif (63 >> 6 !== 0) { \n $ERROR('#199: 63 >> 6 === 0. Actual: ' + (63 >> 6)); \n} \n\n\nif (127 >> 6 !== 1) { \n $ERROR('#200: 127 >> 6 === 1. Actual: ' + (127 >> 6)); \n} \n\n\nif (255 >> 6 !== 3) { \n $ERROR('#201: 255 >> 6 === 3. Actual: ' + (255 >> 6)); \n} \n\n\nif (511 >> 6 !== 7) { \n $ERROR('#202: 511 >> 6 === 7. Actual: ' + (511 >> 6)); \n} \n\n\nif (1023 >> 6 !== 15) { \n $ERROR('#203: 1023 >> 6 === 15. Actual: ' + (1023 >> 6)); \n} \n\n\nif (2047 >> 6 !== 31) { \n $ERROR('#204: 2047 >> 6 === 31. Actual: ' + (2047 >> 6)); \n} \n\n\nif (4095 >> 6 !== 63) { \n $ERROR('#205: 4095 >> 6 === 63. Actual: ' + (4095 >> 6)); \n} \n\n\nif (8191 >> 6 !== 127) { \n $ERROR('#206: 8191 >> 6 === 127. Actual: ' + (8191 >> 6)); \n} \n\n\nif (16383 >> 6 !== 255) { \n $ERROR('#207: 16383 >> 6 === 255. Actual: ' + (16383 >> 6)); \n} \n\n\nif (32767 >> 6 !== 511) { \n $ERROR('#208: 32767 >> 6 === 511. Actual: ' + (32767 >> 6)); \n} \n\n\nif (65535 >> 6 !== 1023) { \n $ERROR('#209: 65535 >> 6 === 1023. Actual: ' + (65535 >> 6)); \n} \n\n\nif (131071 >> 6 !== 2047) { \n $ERROR('#210: 131071 >> 6 === 2047. Actual: ' + (131071 >> 6)); \n} \n\n\nif (262143 >> 6 !== 4095) { \n $ERROR('#211: 262143 >> 6 === 4095. Actual: ' + (262143 >> 6)); \n} \n\n\nif (524287 >> 6 !== 8191) { \n $ERROR('#212: 524287 >> 6 === 8191. Actual: ' + (524287 >> 6)); \n} \n\n\nif (1048575 >> 6 !== 16383) { \n $ERROR('#213: 1048575 >> 6 === 16383. Actual: ' + (1048575 >> 6)); \n} \n\n\nif (2097151 >> 6 !== 32767) { \n $ERROR('#214: 2097151 >> 6 === 32767. Actual: ' + (2097151 >> 6)); \n} \n\n\nif (4194303 >> 6 !== 65535) { \n $ERROR('#215: 4194303 >> 6 === 65535. Actual: ' + (4194303 >> 6)); \n} \n\n\nif (8388607 >> 6 !== 131071) { \n $ERROR('#216: 8388607 >> 6 === 131071. Actual: ' + (8388607 >> 6)); \n} \n\n\nif (16777215 >> 6 !== 262143) { \n $ERROR('#217: 16777215 >> 6 === 262143. Actual: ' + (16777215 >> 6)); \n} \n\n\nif (33554431 >> 6 !== 524287) { \n $ERROR('#218: 33554431 >> 6 === 524287. Actual: ' + (33554431 >> 6)); \n} \n\n\nif (67108863 >> 6 !== 1048575) { \n $ERROR('#219: 67108863 >> 6 === 1048575. Actual: ' + (67108863 >> 6)); \n} \n\n\nif (134217727 >> 6 !== 2097151) { \n $ERROR('#220: 134217727 >> 6 === 2097151. Actual: ' + (134217727 >> 6)); \n} \n\n\nif (268435455 >> 6 !== 4194303) { \n $ERROR('#221: 268435455 >> 6 === 4194303. Actual: ' + (268435455 >> 6)); \n} \n\n\nif (536870911 >> 6 !== 8388607) { \n $ERROR('#222: 536870911 >> 6 === 8388607. Actual: ' + (536870911 >> 6)); \n} \n\n\nif (1073741823 >> 6 !== 16777215) { \n $ERROR('#223: 1073741823 >> 6 === 16777215. Actual: ' + (1073741823 >> 6)); \n} \n\n\nif (2147483647 >> 6 !== 33554431) { \n $ERROR('#224: 2147483647 >> 6 === 33554431. Actual: ' + (2147483647 >> 6)); \n} \n\n\nif (0 >> 7 !== 0) { \n $ERROR('#225: 0 >> 7 === 0. Actual: ' + (0 >> 7)); \n} \n\n\nif (1 >> 7 !== 0) { \n $ERROR('#226: 1 >> 7 === 0. Actual: ' + (1 >> 7)); \n} \n\n\nif (3 >> 7 !== 0) { \n $ERROR('#227: 3 >> 7 === 0. Actual: ' + (3 >> 7)); \n} \n\n\nif (7 >> 7 !== 0) { \n $ERROR('#228: 7 >> 7 === 0. Actual: ' + (7 >> 7)); \n} \n\n\nif (15 >> 7 !== 0) { \n $ERROR('#229: 15 >> 7 === 0. Actual: ' + (15 >> 7)); \n} \n\n\nif (31 >> 7 !== 0) { \n $ERROR('#230: 31 >> 7 === 0. Actual: ' + (31 >> 7)); \n} \n\n\nif (63 >> 7 !== 0) { \n $ERROR('#231: 63 >> 7 === 0. Actual: ' + (63 >> 7)); \n} \n\n\nif (127 >> 7 !== 0) { \n $ERROR('#232: 127 >> 7 === 0. Actual: ' + (127 >> 7)); \n} \n\n\nif (255 >> 7 !== 1) { \n $ERROR('#233: 255 >> 7 === 1. Actual: ' + (255 >> 7)); \n} \n\n\nif (511 >> 7 !== 3) { \n $ERROR('#234: 511 >> 7 === 3. Actual: ' + (511 >> 7)); \n} \n\n\nif (1023 >> 7 !== 7) { \n $ERROR('#235: 1023 >> 7 === 7. Actual: ' + (1023 >> 7)); \n} \n\n\nif (2047 >> 7 !== 15) { \n $ERROR('#236: 2047 >> 7 === 15. Actual: ' + (2047 >> 7)); \n} \n\n\nif (4095 >> 7 !== 31) { \n $ERROR('#237: 4095 >> 7 === 31. Actual: ' + (4095 >> 7)); \n} \n\n\nif (8191 >> 7 !== 63) { \n $ERROR('#238: 8191 >> 7 === 63. Actual: ' + (8191 >> 7)); \n} \n\n\nif (16383 >> 7 !== 127) { \n $ERROR('#239: 16383 >> 7 === 127. Actual: ' + (16383 >> 7)); \n} \n\n\nif (32767 >> 7 !== 255) { \n $ERROR('#240: 32767 >> 7 === 255. Actual: ' + (32767 >> 7)); \n} \n\n\nif (65535 >> 7 !== 511) { \n $ERROR('#241: 65535 >> 7 === 511. Actual: ' + (65535 >> 7)); \n} \n\n\nif (131071 >> 7 !== 1023) { \n $ERROR('#242: 131071 >> 7 === 1023. Actual: ' + (131071 >> 7)); \n} \n\n\nif (262143 >> 7 !== 2047) { \n $ERROR('#243: 262143 >> 7 === 2047. Actual: ' + (262143 >> 7)); \n} \n\n\nif (524287 >> 7 !== 4095) { \n $ERROR('#244: 524287 >> 7 === 4095. Actual: ' + (524287 >> 7)); \n} \n\n\nif (1048575 >> 7 !== 8191) { \n $ERROR('#245: 1048575 >> 7 === 8191. Actual: ' + (1048575 >> 7)); \n} \n\n\nif (2097151 >> 7 !== 16383) { \n $ERROR('#246: 2097151 >> 7 === 16383. Actual: ' + (2097151 >> 7)); \n} \n\n\nif (4194303 >> 7 !== 32767) { \n $ERROR('#247: 4194303 >> 7 === 32767. Actual: ' + (4194303 >> 7)); \n} \n\n\nif (8388607 >> 7 !== 65535) { \n $ERROR('#248: 8388607 >> 7 === 65535. Actual: ' + (8388607 >> 7)); \n} \n\n\nif (16777215 >> 7 !== 131071) { \n $ERROR('#249: 16777215 >> 7 === 131071. Actual: ' + (16777215 >> 7)); \n} \n\n\nif (33554431 >> 7 !== 262143) { \n $ERROR('#250: 33554431 >> 7 === 262143. Actual: ' + (33554431 >> 7)); \n} \n\n\nif (67108863 >> 7 !== 524287) { \n $ERROR('#251: 67108863 >> 7 === 524287. Actual: ' + (67108863 >> 7)); \n} \n\n\nif (134217727 >> 7 !== 1048575) { \n $ERROR('#252: 134217727 >> 7 === 1048575. Actual: ' + (134217727 >> 7)); \n} \n\n\nif (268435455 >> 7 !== 2097151) { \n $ERROR('#253: 268435455 >> 7 === 2097151. Actual: ' + (268435455 >> 7)); \n} \n\n\nif (536870911 >> 7 !== 4194303) { \n $ERROR('#254: 536870911 >> 7 === 4194303. Actual: ' + (536870911 >> 7)); \n} \n\n\nif (1073741823 >> 7 !== 8388607) { \n $ERROR('#255: 1073741823 >> 7 === 8388607. Actual: ' + (1073741823 >> 7)); \n} \n\n\nif (2147483647 >> 7 !== 16777215) { \n $ERROR('#256: 2147483647 >> 7 === 16777215. Actual: ' + (2147483647 >> 7)); \n} \n\n\nif (0 >> 8 !== 0) { \n $ERROR('#257: 0 >> 8 === 0. Actual: ' + (0 >> 8)); \n} \n\n\nif (1 >> 8 !== 0) { \n $ERROR('#258: 1 >> 8 === 0. Actual: ' + (1 >> 8)); \n} \n\n\nif (3 >> 8 !== 0) { \n $ERROR('#259: 3 >> 8 === 0. Actual: ' + (3 >> 8)); \n} \n\n\nif (7 >> 8 !== 0) { \n $ERROR('#260: 7 >> 8 === 0. Actual: ' + (7 >> 8)); \n} \n\n\nif (15 >> 8 !== 0) { \n $ERROR('#261: 15 >> 8 === 0. Actual: ' + (15 >> 8)); \n} \n\n\nif (31 >> 8 !== 0) { \n $ERROR('#262: 31 >> 8 === 0. Actual: ' + (31 >> 8)); \n} \n\n\nif (63 >> 8 !== 0) { \n $ERROR('#263: 63 >> 8 === 0. Actual: ' + (63 >> 8)); \n} \n\n\nif (127 >> 8 !== 0) { \n $ERROR('#264: 127 >> 8 === 0. Actual: ' + (127 >> 8)); \n} \n\n\nif (255 >> 8 !== 0) { \n $ERROR('#265: 255 >> 8 === 0. Actual: ' + (255 >> 8)); \n} \n\n\nif (511 >> 8 !== 1) { \n $ERROR('#266: 511 >> 8 === 1. Actual: ' + (511 >> 8)); \n} \n\n\nif (1023 >> 8 !== 3) { \n $ERROR('#267: 1023 >> 8 === 3. Actual: ' + (1023 >> 8)); \n} \n\n\nif (2047 >> 8 !== 7) { \n $ERROR('#268: 2047 >> 8 === 7. Actual: ' + (2047 >> 8)); \n} \n\n\nif (4095 >> 8 !== 15) { \n $ERROR('#269: 4095 >> 8 === 15. Actual: ' + (4095 >> 8)); \n} \n\n\nif (8191 >> 8 !== 31) { \n $ERROR('#270: 8191 >> 8 === 31. Actual: ' + (8191 >> 8)); \n} \n\n\nif (16383 >> 8 !== 63) { \n $ERROR('#271: 16383 >> 8 === 63. Actual: ' + (16383 >> 8)); \n} \n\n\nif (32767 >> 8 !== 127) { \n $ERROR('#272: 32767 >> 8 === 127. Actual: ' + (32767 >> 8)); \n} \n\n\nif (65535 >> 8 !== 255) { \n $ERROR('#273: 65535 >> 8 === 255. Actual: ' + (65535 >> 8)); \n} \n\n\nif (131071 >> 8 !== 511) { \n $ERROR('#274: 131071 >> 8 === 511. Actual: ' + (131071 >> 8)); \n} \n\n\nif (262143 >> 8 !== 1023) { \n $ERROR('#275: 262143 >> 8 === 1023. Actual: ' + (262143 >> 8)); \n} \n\n\nif (524287 >> 8 !== 2047) { \n $ERROR('#276: 524287 >> 8 === 2047. Actual: ' + (524287 >> 8)); \n} \n\n\nif (1048575 >> 8 !== 4095) { \n $ERROR('#277: 1048575 >> 8 === 4095. Actual: ' + (1048575 >> 8)); \n} \n\n\nif (2097151 >> 8 !== 8191) { \n $ERROR('#278: 2097151 >> 8 === 8191. Actual: ' + (2097151 >> 8)); \n} \n\n\nif (4194303 >> 8 !== 16383) { \n $ERROR('#279: 4194303 >> 8 === 16383. Actual: ' + (4194303 >> 8)); \n} \n\n\nif (8388607 >> 8 !== 32767) { \n $ERROR('#280: 8388607 >> 8 === 32767. Actual: ' + (8388607 >> 8)); \n} \n\n\nif (16777215 >> 8 !== 65535) { \n $ERROR('#281: 16777215 >> 8 === 65535. Actual: ' + (16777215 >> 8)); \n} \n\n\nif (33554431 >> 8 !== 131071) { \n $ERROR('#282: 33554431 >> 8 === 131071. Actual: ' + (33554431 >> 8)); \n} \n\n\nif (67108863 >> 8 !== 262143) { \n $ERROR('#283: 67108863 >> 8 === 262143. Actual: ' + (67108863 >> 8)); \n} \n\n\nif (134217727 >> 8 !== 524287) { \n $ERROR('#284: 134217727 >> 8 === 524287. Actual: ' + (134217727 >> 8)); \n} \n\n\nif (268435455 >> 8 !== 1048575) { \n $ERROR('#285: 268435455 >> 8 === 1048575. Actual: ' + (268435455 >> 8)); \n} \n\n\nif (536870911 >> 8 !== 2097151) { \n $ERROR('#286: 536870911 >> 8 === 2097151. Actual: ' + (536870911 >> 8)); \n} \n\n\nif (1073741823 >> 8 !== 4194303) { \n $ERROR('#287: 1073741823 >> 8 === 4194303. Actual: ' + (1073741823 >> 8)); \n} \n\n\nif (2147483647 >> 8 !== 8388607) { \n $ERROR('#288: 2147483647 >> 8 === 8388607. Actual: ' + (2147483647 >> 8)); \n} \n\n\nif (0 >> 9 !== 0) { \n $ERROR('#289: 0 >> 9 === 0. Actual: ' + (0 >> 9)); \n} \n\n\nif (1 >> 9 !== 0) { \n $ERROR('#290: 1 >> 9 === 0. Actual: ' + (1 >> 9)); \n} \n\n\nif (3 >> 9 !== 0) { \n $ERROR('#291: 3 >> 9 === 0. Actual: ' + (3 >> 9)); \n} \n\n\nif (7 >> 9 !== 0) { \n $ERROR('#292: 7 >> 9 === 0. Actual: ' + (7 >> 9)); \n} \n\n\nif (15 >> 9 !== 0) { \n $ERROR('#293: 15 >> 9 === 0. Actual: ' + (15 >> 9)); \n} \n\n\nif (31 >> 9 !== 0) { \n $ERROR('#294: 31 >> 9 === 0. Actual: ' + (31 >> 9)); \n} \n\n\nif (63 >> 9 !== 0) { \n $ERROR('#295: 63 >> 9 === 0. Actual: ' + (63 >> 9)); \n} \n\n\nif (127 >> 9 !== 0) { \n $ERROR('#296: 127 >> 9 === 0. Actual: ' + (127 >> 9)); \n} \n\n\nif (255 >> 9 !== 0) { \n $ERROR('#297: 255 >> 9 === 0. Actual: ' + (255 >> 9)); \n} \n\n\nif (511 >> 9 !== 0) { \n $ERROR('#298: 511 >> 9 === 0. Actual: ' + (511 >> 9)); \n} \n\n\nif (1023 >> 9 !== 1) { \n $ERROR('#299: 1023 >> 9 === 1. Actual: ' + (1023 >> 9)); \n} \n\n\nif (2047 >> 9 !== 3) { \n $ERROR('#300: 2047 >> 9 === 3. Actual: ' + (2047 >> 9)); \n} \n\n\nif (4095 >> 9 !== 7) { \n $ERROR('#301: 4095 >> 9 === 7. Actual: ' + (4095 >> 9)); \n} \n\n\nif (8191 >> 9 !== 15) { \n $ERROR('#302: 8191 >> 9 === 15. Actual: ' + (8191 >> 9)); \n} \n\n\nif (16383 >> 9 !== 31) { \n $ERROR('#303: 16383 >> 9 === 31. Actual: ' + (16383 >> 9)); \n} \n\n\nif (32767 >> 9 !== 63) { \n $ERROR('#304: 32767 >> 9 === 63. Actual: ' + (32767 >> 9)); \n} \n\n\nif (65535 >> 9 !== 127) { \n $ERROR('#305: 65535 >> 9 === 127. Actual: ' + (65535 >> 9)); \n} \n\n\nif (131071 >> 9 !== 255) { \n $ERROR('#306: 131071 >> 9 === 255. Actual: ' + (131071 >> 9)); \n} \n\n\nif (262143 >> 9 !== 511) { \n $ERROR('#307: 262143 >> 9 === 511. Actual: ' + (262143 >> 9)); \n} \n\n\nif (524287 >> 9 !== 1023) { \n $ERROR('#308: 524287 >> 9 === 1023. Actual: ' + (524287 >> 9)); \n} \n\n\nif (1048575 >> 9 !== 2047) { \n $ERROR('#309: 1048575 >> 9 === 2047. Actual: ' + (1048575 >> 9)); \n} \n\n\nif (2097151 >> 9 !== 4095) { \n $ERROR('#310: 2097151 >> 9 === 4095. Actual: ' + (2097151 >> 9)); \n} \n\n\nif (4194303 >> 9 !== 8191) { \n $ERROR('#311: 4194303 >> 9 === 8191. Actual: ' + (4194303 >> 9)); \n} \n\n\nif (8388607 >> 9 !== 16383) { \n $ERROR('#312: 8388607 >> 9 === 16383. Actual: ' + (8388607 >> 9)); \n} \n\n\nif (16777215 >> 9 !== 32767) { \n $ERROR('#313: 16777215 >> 9 === 32767. Actual: ' + (16777215 >> 9)); \n} \n\n\nif (33554431 >> 9 !== 65535) { \n $ERROR('#314: 33554431 >> 9 === 65535. Actual: ' + (33554431 >> 9)); \n} \n\n\nif (67108863 >> 9 !== 131071) { \n $ERROR('#315: 67108863 >> 9 === 131071. Actual: ' + (67108863 >> 9)); \n} \n\n\nif (134217727 >> 9 !== 262143) { \n $ERROR('#316: 134217727 >> 9 === 262143. Actual: ' + (134217727 >> 9)); \n} \n\n\nif (268435455 >> 9 !== 524287) { \n $ERROR('#317: 268435455 >> 9 === 524287. Actual: ' + (268435455 >> 9)); \n} \n\n\nif (536870911 >> 9 !== 1048575) { \n $ERROR('#318: 536870911 >> 9 === 1048575. Actual: ' + (536870911 >> 9)); \n} \n\n\nif (1073741823 >> 9 !== 2097151) { \n $ERROR('#319: 1073741823 >> 9 === 2097151. Actual: ' + (1073741823 >> 9)); \n} \n\n\nif (2147483647 >> 9 !== 4194303) { \n $ERROR('#320: 2147483647 >> 9 === 4194303. Actual: ' + (2147483647 >> 9)); \n} \n\n\nif (0 >> 10 !== 0) { \n $ERROR('#321: 0 >> 10 === 0. Actual: ' + (0 >> 10)); \n} \n\n\nif (1 >> 10 !== 0) { \n $ERROR('#322: 1 >> 10 === 0. Actual: ' + (1 >> 10)); \n} \n\n\nif (3 >> 10 !== 0) { \n $ERROR('#323: 3 >> 10 === 0. Actual: ' + (3 >> 10)); \n} \n\n\nif (7 >> 10 !== 0) { \n $ERROR('#324: 7 >> 10 === 0. Actual: ' + (7 >> 10)); \n} \n\n\nif (15 >> 10 !== 0) { \n $ERROR('#325: 15 >> 10 === 0. Actual: ' + (15 >> 10)); \n} \n\n\nif (31 >> 10 !== 0) { \n $ERROR('#326: 31 >> 10 === 0. Actual: ' + (31 >> 10)); \n} \n\n\nif (63 >> 10 !== 0) { \n $ERROR('#327: 63 >> 10 === 0. Actual: ' + (63 >> 10)); \n} \n\n\nif (127 >> 10 !== 0) { \n $ERROR('#328: 127 >> 10 === 0. Actual: ' + (127 >> 10)); \n} \n\n\nif (255 >> 10 !== 0) { \n $ERROR('#329: 255 >> 10 === 0. Actual: ' + (255 >> 10)); \n} \n\n\nif (511 >> 10 !== 0) { \n $ERROR('#330: 511 >> 10 === 0. Actual: ' + (511 >> 10)); \n} \n\n\nif (1023 >> 10 !== 0) { \n $ERROR('#331: 1023 >> 10 === 0. Actual: ' + (1023 >> 10)); \n} \n\n\nif (2047 >> 10 !== 1) { \n $ERROR('#332: 2047 >> 10 === 1. Actual: ' + (2047 >> 10)); \n} \n\n\nif (4095 >> 10 !== 3) { \n $ERROR('#333: 4095 >> 10 === 3. Actual: ' + (4095 >> 10)); \n} \n\n\nif (8191 >> 10 !== 7) { \n $ERROR('#334: 8191 >> 10 === 7. Actual: ' + (8191 >> 10)); \n} \n\n\nif (16383 >> 10 !== 15) { \n $ERROR('#335: 16383 >> 10 === 15. Actual: ' + (16383 >> 10)); \n} \n\n\nif (32767 >> 10 !== 31) { \n $ERROR('#336: 32767 >> 10 === 31. Actual: ' + (32767 >> 10)); \n} \n\n\nif (65535 >> 10 !== 63) { \n $ERROR('#337: 65535 >> 10 === 63. Actual: ' + (65535 >> 10)); \n} \n\n\nif (131071 >> 10 !== 127) { \n $ERROR('#338: 131071 >> 10 === 127. Actual: ' + (131071 >> 10)); \n} \n\n\nif (262143 >> 10 !== 255) { \n $ERROR('#339: 262143 >> 10 === 255. Actual: ' + (262143 >> 10)); \n} \n\n\nif (524287 >> 10 !== 511) { \n $ERROR('#340: 524287 >> 10 === 511. Actual: ' + (524287 >> 10)); \n} \n\n\nif (1048575 >> 10 !== 1023) { \n $ERROR('#341: 1048575 >> 10 === 1023. Actual: ' + (1048575 >> 10)); \n} \n\n\nif (2097151 >> 10 !== 2047) { \n $ERROR('#342: 2097151 >> 10 === 2047. Actual: ' + (2097151 >> 10)); \n} \n\n\nif (4194303 >> 10 !== 4095) { \n $ERROR('#343: 4194303 >> 10 === 4095. Actual: ' + (4194303 >> 10)); \n} \n\n\nif (8388607 >> 10 !== 8191) { \n $ERROR('#344: 8388607 >> 10 === 8191. Actual: ' + (8388607 >> 10)); \n} \n\n\nif (16777215 >> 10 !== 16383) { \n $ERROR('#345: 16777215 >> 10 === 16383. Actual: ' + (16777215 >> 10)); \n} \n\n\nif (33554431 >> 10 !== 32767) { \n $ERROR('#346: 33554431 >> 10 === 32767. Actual: ' + (33554431 >> 10)); \n} \n\n\nif (67108863 >> 10 !== 65535) { \n $ERROR('#347: 67108863 >> 10 === 65535. Actual: ' + (67108863 >> 10)); \n} \n\n\nif (134217727 >> 10 !== 131071) { \n $ERROR('#348: 134217727 >> 10 === 131071. Actual: ' + (134217727 >> 10)); \n} \n\n\nif (268435455 >> 10 !== 262143) { \n $ERROR('#349: 268435455 >> 10 === 262143. Actual: ' + (268435455 >> 10)); \n} \n\n\nif (536870911 >> 10 !== 524287) { \n $ERROR('#350: 536870911 >> 10 === 524287. Actual: ' + (536870911 >> 10)); \n} \n\n\nif (1073741823 >> 10 !== 1048575) { \n $ERROR('#351: 1073741823 >> 10 === 1048575. Actual: ' + (1073741823 >> 10)); \n} \n\n\nif (2147483647 >> 10 !== 2097151) { \n $ERROR('#352: 2147483647 >> 10 === 2097151. Actual: ' + (2147483647 >> 10)); \n} \n\n\nif (0 >> 11 !== 0) { \n $ERROR('#353: 0 >> 11 === 0. Actual: ' + (0 >> 11)); \n} \n\n\nif (1 >> 11 !== 0) { \n $ERROR('#354: 1 >> 11 === 0. Actual: ' + (1 >> 11)); \n} \n\n\nif (3 >> 11 !== 0) { \n $ERROR('#355: 3 >> 11 === 0. Actual: ' + (3 >> 11)); \n} \n\n\nif (7 >> 11 !== 0) { \n $ERROR('#356: 7 >> 11 === 0. Actual: ' + (7 >> 11)); \n} \n\n\nif (15 >> 11 !== 0) { \n $ERROR('#357: 15 >> 11 === 0. Actual: ' + (15 >> 11)); \n} \n\n\nif (31 >> 11 !== 0) { \n $ERROR('#358: 31 >> 11 === 0. Actual: ' + (31 >> 11)); \n} \n\n\nif (63 >> 11 !== 0) { \n $ERROR('#359: 63 >> 11 === 0. Actual: ' + (63 >> 11)); \n} \n\n\nif (127 >> 11 !== 0) { \n $ERROR('#360: 127 >> 11 === 0. Actual: ' + (127 >> 11)); \n} \n\n\nif (255 >> 11 !== 0) { \n $ERROR('#361: 255 >> 11 === 0. Actual: ' + (255 >> 11)); \n} \n\n\nif (511 >> 11 !== 0) { \n $ERROR('#362: 511 >> 11 === 0. Actual: ' + (511 >> 11)); \n} \n\n\nif (1023 >> 11 !== 0) { \n $ERROR('#363: 1023 >> 11 === 0. Actual: ' + (1023 >> 11)); \n} \n\n\nif (2047 >> 11 !== 0) { \n $ERROR('#364: 2047 >> 11 === 0. Actual: ' + (2047 >> 11)); \n} \n\n\nif (4095 >> 11 !== 1) { \n $ERROR('#365: 4095 >> 11 === 1. Actual: ' + (4095 >> 11)); \n} \n\n\nif (8191 >> 11 !== 3) { \n $ERROR('#366: 8191 >> 11 === 3. Actual: ' + (8191 >> 11)); \n} \n\n\nif (16383 >> 11 !== 7) { \n $ERROR('#367: 16383 >> 11 === 7. Actual: ' + (16383 >> 11)); \n} \n\n\nif (32767 >> 11 !== 15) { \n $ERROR('#368: 32767 >> 11 === 15. Actual: ' + (32767 >> 11)); \n} \n\n\nif (65535 >> 11 !== 31) { \n $ERROR('#369: 65535 >> 11 === 31. Actual: ' + (65535 >> 11)); \n} \n\n\nif (131071 >> 11 !== 63) { \n $ERROR('#370: 131071 >> 11 === 63. Actual: ' + (131071 >> 11)); \n} \n\n\nif (262143 >> 11 !== 127) { \n $ERROR('#371: 262143 >> 11 === 127. Actual: ' + (262143 >> 11)); \n} \n\n\nif (524287 >> 11 !== 255) { \n $ERROR('#372: 524287 >> 11 === 255. Actual: ' + (524287 >> 11)); \n} \n\n\nif (1048575 >> 11 !== 511) { \n $ERROR('#373: 1048575 >> 11 === 511. Actual: ' + (1048575 >> 11)); \n} \n\n\nif (2097151 >> 11 !== 1023) { \n $ERROR('#374: 2097151 >> 11 === 1023. Actual: ' + (2097151 >> 11)); \n} \n\n\nif (4194303 >> 11 !== 2047) { \n $ERROR('#375: 4194303 >> 11 === 2047. Actual: ' + (4194303 >> 11)); \n} \n\n\nif (8388607 >> 11 !== 4095) { \n $ERROR('#376: 8388607 >> 11 === 4095. Actual: ' + (8388607 >> 11)); \n} \n\n\nif (16777215 >> 11 !== 8191) { \n $ERROR('#377: 16777215 >> 11 === 8191. Actual: ' + (16777215 >> 11)); \n} \n\n\nif (33554431 >> 11 !== 16383) { \n $ERROR('#378: 33554431 >> 11 === 16383. Actual: ' + (33554431 >> 11)); \n} \n\n\nif (67108863 >> 11 !== 32767) { \n $ERROR('#379: 67108863 >> 11 === 32767. Actual: ' + (67108863 >> 11)); \n} \n\n\nif (134217727 >> 11 !== 65535) { \n $ERROR('#380: 134217727 >> 11 === 65535. Actual: ' + (134217727 >> 11)); \n} \n\n\nif (268435455 >> 11 !== 131071) { \n $ERROR('#381: 268435455 >> 11 === 131071. Actual: ' + (268435455 >> 11)); \n} \n\n\nif (536870911 >> 11 !== 262143) { \n $ERROR('#382: 536870911 >> 11 === 262143. Actual: ' + (536870911 >> 11)); \n} \n\n\nif (1073741823 >> 11 !== 524287) { \n $ERROR('#383: 1073741823 >> 11 === 524287. Actual: ' + (1073741823 >> 11)); \n} \n\n\nif (2147483647 >> 11 !== 1048575) { \n $ERROR('#384: 2147483647 >> 11 === 1048575. Actual: ' + (2147483647 >> 11)); \n} \n\n\nif (0 >> 12 !== 0) { \n $ERROR('#385: 0 >> 12 === 0. Actual: ' + (0 >> 12)); \n} \n\n\nif (1 >> 12 !== 0) { \n $ERROR('#386: 1 >> 12 === 0. Actual: ' + (1 >> 12)); \n} \n\n\nif (3 >> 12 !== 0) { \n $ERROR('#387: 3 >> 12 === 0. Actual: ' + (3 >> 12)); \n} \n\n\nif (7 >> 12 !== 0) { \n $ERROR('#388: 7 >> 12 === 0. Actual: ' + (7 >> 12)); \n} \n\n\nif (15 >> 12 !== 0) { \n $ERROR('#389: 15 >> 12 === 0. Actual: ' + (15 >> 12)); \n} \n\n\nif (31 >> 12 !== 0) { \n $ERROR('#390: 31 >> 12 === 0. Actual: ' + (31 >> 12)); \n} \n\n\nif (63 >> 12 !== 0) { \n $ERROR('#391: 63 >> 12 === 0. Actual: ' + (63 >> 12)); \n} \n\n\nif (127 >> 12 !== 0) { \n $ERROR('#392: 127 >> 12 === 0. Actual: ' + (127 >> 12)); \n} \n\n\nif (255 >> 12 !== 0) { \n $ERROR('#393: 255 >> 12 === 0. Actual: ' + (255 >> 12)); \n} \n\n\nif (511 >> 12 !== 0) { \n $ERROR('#394: 511 >> 12 === 0. Actual: ' + (511 >> 12)); \n} \n\n\nif (1023 >> 12 !== 0) { \n $ERROR('#395: 1023 >> 12 === 0. Actual: ' + (1023 >> 12)); \n} \n\n\nif (2047 >> 12 !== 0) { \n $ERROR('#396: 2047 >> 12 === 0. Actual: ' + (2047 >> 12)); \n} \n\n\nif (4095 >> 12 !== 0) { \n $ERROR('#397: 4095 >> 12 === 0. Actual: ' + (4095 >> 12)); \n} \n\n\nif (8191 >> 12 !== 1) { \n $ERROR('#398: 8191 >> 12 === 1. Actual: ' + (8191 >> 12)); \n} \n\n\nif (16383 >> 12 !== 3) { \n $ERROR('#399: 16383 >> 12 === 3. Actual: ' + (16383 >> 12)); \n} \n\n\nif (32767 >> 12 !== 7) { \n $ERROR('#400: 32767 >> 12 === 7. Actual: ' + (32767 >> 12)); \n} \n\n\nif (65535 >> 12 !== 15) { \n $ERROR('#401: 65535 >> 12 === 15. Actual: ' + (65535 >> 12)); \n} \n\n\nif (131071 >> 12 !== 31) { \n $ERROR('#402: 131071 >> 12 === 31. Actual: ' + (131071 >> 12)); \n} \n\n\nif (262143 >> 12 !== 63) { \n $ERROR('#403: 262143 >> 12 === 63. Actual: ' + (262143 >> 12)); \n} \n\n\nif (524287 >> 12 !== 127) { \n $ERROR('#404: 524287 >> 12 === 127. Actual: ' + (524287 >> 12)); \n} \n\n\nif (1048575 >> 12 !== 255) { \n $ERROR('#405: 1048575 >> 12 === 255. Actual: ' + (1048575 >> 12)); \n} \n\n\nif (2097151 >> 12 !== 511) { \n $ERROR('#406: 2097151 >> 12 === 511. Actual: ' + (2097151 >> 12)); \n} \n\n\nif (4194303 >> 12 !== 1023) { \n $ERROR('#407: 4194303 >> 12 === 1023. Actual: ' + (4194303 >> 12)); \n} \n\n\nif (8388607 >> 12 !== 2047) { \n $ERROR('#408: 8388607 >> 12 === 2047. Actual: ' + (8388607 >> 12)); \n} \n\n\nif (16777215 >> 12 !== 4095) { \n $ERROR('#409: 16777215 >> 12 === 4095. Actual: ' + (16777215 >> 12)); \n} \n\n\nif (33554431 >> 12 !== 8191) { \n $ERROR('#410: 33554431 >> 12 === 8191. Actual: ' + (33554431 >> 12)); \n} \n\n\nif (67108863 >> 12 !== 16383) { \n $ERROR('#411: 67108863 >> 12 === 16383. Actual: ' + (67108863 >> 12)); \n} \n\n\nif (134217727 >> 12 !== 32767) { \n $ERROR('#412: 134217727 >> 12 === 32767. Actual: ' + (134217727 >> 12)); \n} \n\n\nif (268435455 >> 12 !== 65535) { \n $ERROR('#413: 268435455 >> 12 === 65535. Actual: ' + (268435455 >> 12)); \n} \n\n\nif (536870911 >> 12 !== 131071) { \n $ERROR('#414: 536870911 >> 12 === 131071. Actual: ' + (536870911 >> 12)); \n} \n\n\nif (1073741823 >> 12 !== 262143) { \n $ERROR('#415: 1073741823 >> 12 === 262143. Actual: ' + (1073741823 >> 12)); \n} \n\n\nif (2147483647 >> 12 !== 524287) { \n $ERROR('#416: 2147483647 >> 12 === 524287. Actual: ' + (2147483647 >> 12)); \n} \n\n\nif (0 >> 13 !== 0) { \n $ERROR('#417: 0 >> 13 === 0. Actual: ' + (0 >> 13)); \n} \n\n\nif (1 >> 13 !== 0) { \n $ERROR('#418: 1 >> 13 === 0. Actual: ' + (1 >> 13)); \n} \n\n\nif (3 >> 13 !== 0) { \n $ERROR('#419: 3 >> 13 === 0. Actual: ' + (3 >> 13)); \n} \n\n\nif (7 >> 13 !== 0) { \n $ERROR('#420: 7 >> 13 === 0. Actual: ' + (7 >> 13)); \n} \n\n\nif (15 >> 13 !== 0) { \n $ERROR('#421: 15 >> 13 === 0. Actual: ' + (15 >> 13)); \n} \n\n\nif (31 >> 13 !== 0) { \n $ERROR('#422: 31 >> 13 === 0. Actual: ' + (31 >> 13)); \n} \n\n\nif (63 >> 13 !== 0) { \n $ERROR('#423: 63 >> 13 === 0. Actual: ' + (63 >> 13)); \n} \n\n\nif (127 >> 13 !== 0) { \n $ERROR('#424: 127 >> 13 === 0. Actual: ' + (127 >> 13)); \n} \n\n\nif (255 >> 13 !== 0) { \n $ERROR('#425: 255 >> 13 === 0. Actual: ' + (255 >> 13)); \n} \n\n\nif (511 >> 13 !== 0) { \n $ERROR('#426: 511 >> 13 === 0. Actual: ' + (511 >> 13)); \n} \n\n\nif (1023 >> 13 !== 0) { \n $ERROR('#427: 1023 >> 13 === 0. Actual: ' + (1023 >> 13)); \n} \n\n\nif (2047 >> 13 !== 0) { \n $ERROR('#428: 2047 >> 13 === 0. Actual: ' + (2047 >> 13)); \n} \n\n\nif (4095 >> 13 !== 0) { \n $ERROR('#429: 4095 >> 13 === 0. Actual: ' + (4095 >> 13)); \n} \n\n\nif (8191 >> 13 !== 0) { \n $ERROR('#430: 8191 >> 13 === 0. Actual: ' + (8191 >> 13)); \n} \n\n\nif (16383 >> 13 !== 1) { \n $ERROR('#431: 16383 >> 13 === 1. Actual: ' + (16383 >> 13)); \n} \n\n\nif (32767 >> 13 !== 3) { \n $ERROR('#432: 32767 >> 13 === 3. Actual: ' + (32767 >> 13)); \n} \n\n\nif (65535 >> 13 !== 7) { \n $ERROR('#433: 65535 >> 13 === 7. Actual: ' + (65535 >> 13)); \n} \n\n\nif (131071 >> 13 !== 15) { \n $ERROR('#434: 131071 >> 13 === 15. Actual: ' + (131071 >> 13)); \n} \n\n\nif (262143 >> 13 !== 31) { \n $ERROR('#435: 262143 >> 13 === 31. Actual: ' + (262143 >> 13)); \n} \n\n\nif (524287 >> 13 !== 63) { \n $ERROR('#436: 524287 >> 13 === 63. Actual: ' + (524287 >> 13)); \n} \n\n\nif (1048575 >> 13 !== 127) { \n $ERROR('#437: 1048575 >> 13 === 127. Actual: ' + (1048575 >> 13)); \n} \n\n\nif (2097151 >> 13 !== 255) { \n $ERROR('#438: 2097151 >> 13 === 255. Actual: ' + (2097151 >> 13)); \n} \n\n\nif (4194303 >> 13 !== 511) { \n $ERROR('#439: 4194303 >> 13 === 511. Actual: ' + (4194303 >> 13)); \n} \n\n\nif (8388607 >> 13 !== 1023) { \n $ERROR('#440: 8388607 >> 13 === 1023. Actual: ' + (8388607 >> 13)); \n} \n\n\nif (16777215 >> 13 !== 2047) { \n $ERROR('#441: 16777215 >> 13 === 2047. Actual: ' + (16777215 >> 13)); \n} \n\n\nif (33554431 >> 13 !== 4095) { \n $ERROR('#442: 33554431 >> 13 === 4095. Actual: ' + (33554431 >> 13)); \n} \n\n\nif (67108863 >> 13 !== 8191) { \n $ERROR('#443: 67108863 >> 13 === 8191. Actual: ' + (67108863 >> 13)); \n} \n\n\nif (134217727 >> 13 !== 16383) { \n $ERROR('#444: 134217727 >> 13 === 16383. Actual: ' + (134217727 >> 13)); \n} \n\n\nif (268435455 >> 13 !== 32767) { \n $ERROR('#445: 268435455 >> 13 === 32767. Actual: ' + (268435455 >> 13)); \n} \n\n\nif (536870911 >> 13 !== 65535) { \n $ERROR('#446: 536870911 >> 13 === 65535. Actual: ' + (536870911 >> 13)); \n} \n\n\nif (1073741823 >> 13 !== 131071) { \n $ERROR('#447: 1073741823 >> 13 === 131071. Actual: ' + (1073741823 >> 13)); \n} \n\n\nif (2147483647 >> 13 !== 262143) { \n $ERROR('#448: 2147483647 >> 13 === 262143. Actual: ' + (2147483647 >> 13)); \n} \n\n\nif (0 >> 14 !== 0) { \n $ERROR('#449: 0 >> 14 === 0. Actual: ' + (0 >> 14)); \n} \n\n\nif (1 >> 14 !== 0) { \n $ERROR('#450: 1 >> 14 === 0. Actual: ' + (1 >> 14)); \n} \n\n\nif (3 >> 14 !== 0) { \n $ERROR('#451: 3 >> 14 === 0. Actual: ' + (3 >> 14)); \n} \n\n\nif (7 >> 14 !== 0) { \n $ERROR('#452: 7 >> 14 === 0. Actual: ' + (7 >> 14)); \n} \n\n\nif (15 >> 14 !== 0) { \n $ERROR('#453: 15 >> 14 === 0. Actual: ' + (15 >> 14)); \n} \n\n\nif (31 >> 14 !== 0) { \n $ERROR('#454: 31 >> 14 === 0. Actual: ' + (31 >> 14)); \n} \n\n\nif (63 >> 14 !== 0) { \n $ERROR('#455: 63 >> 14 === 0. Actual: ' + (63 >> 14)); \n} \n\n\nif (127 >> 14 !== 0) { \n $ERROR('#456: 127 >> 14 === 0. Actual: ' + (127 >> 14)); \n} \n\n\nif (255 >> 14 !== 0) { \n $ERROR('#457: 255 >> 14 === 0. Actual: ' + (255 >> 14)); \n} \n\n\nif (511 >> 14 !== 0) { \n $ERROR('#458: 511 >> 14 === 0. Actual: ' + (511 >> 14)); \n} \n\n\nif (1023 >> 14 !== 0) { \n $ERROR('#459: 1023 >> 14 === 0. Actual: ' + (1023 >> 14)); \n} \n\n\nif (2047 >> 14 !== 0) { \n $ERROR('#460: 2047 >> 14 === 0. Actual: ' + (2047 >> 14)); \n} \n\n\nif (4095 >> 14 !== 0) { \n $ERROR('#461: 4095 >> 14 === 0. Actual: ' + (4095 >> 14)); \n} \n\n\nif (8191 >> 14 !== 0) { \n $ERROR('#462: 8191 >> 14 === 0. Actual: ' + (8191 >> 14)); \n} \n\n\nif (16383 >> 14 !== 0) { \n $ERROR('#463: 16383 >> 14 === 0. Actual: ' + (16383 >> 14)); \n} \n\n\nif (32767 >> 14 !== 1) { \n $ERROR('#464: 32767 >> 14 === 1. Actual: ' + (32767 >> 14)); \n} \n\n\nif (65535 >> 14 !== 3) { \n $ERROR('#465: 65535 >> 14 === 3. Actual: ' + (65535 >> 14)); \n} \n\n\nif (131071 >> 14 !== 7) { \n $ERROR('#466: 131071 >> 14 === 7. Actual: ' + (131071 >> 14)); \n} \n\n\nif (262143 >> 14 !== 15) { \n $ERROR('#467: 262143 >> 14 === 15. Actual: ' + (262143 >> 14)); \n} \n\n\nif (524287 >> 14 !== 31) { \n $ERROR('#468: 524287 >> 14 === 31. Actual: ' + (524287 >> 14)); \n} \n\n\nif (1048575 >> 14 !== 63) { \n $ERROR('#469: 1048575 >> 14 === 63. Actual: ' + (1048575 >> 14)); \n} \n\n\nif (2097151 >> 14 !== 127) { \n $ERROR('#470: 2097151 >> 14 === 127. Actual: ' + (2097151 >> 14)); \n} \n\n\nif (4194303 >> 14 !== 255) { \n $ERROR('#471: 4194303 >> 14 === 255. Actual: ' + (4194303 >> 14)); \n} \n\n\nif (8388607 >> 14 !== 511) { \n $ERROR('#472: 8388607 >> 14 === 511. Actual: ' + (8388607 >> 14)); \n} \n\n\nif (16777215 >> 14 !== 1023) { \n $ERROR('#473: 16777215 >> 14 === 1023. Actual: ' + (16777215 >> 14)); \n} \n\n\nif (33554431 >> 14 !== 2047) { \n $ERROR('#474: 33554431 >> 14 === 2047. Actual: ' + (33554431 >> 14)); \n} \n\n\nif (67108863 >> 14 !== 4095) { \n $ERROR('#475: 67108863 >> 14 === 4095. Actual: ' + (67108863 >> 14)); \n} \n\n\nif (134217727 >> 14 !== 8191) { \n $ERROR('#476: 134217727 >> 14 === 8191. Actual: ' + (134217727 >> 14)); \n} \n\n\nif (268435455 >> 14 !== 16383) { \n $ERROR('#477: 268435455 >> 14 === 16383. Actual: ' + (268435455 >> 14)); \n} \n\n\nif (536870911 >> 14 !== 32767) { \n $ERROR('#478: 536870911 >> 14 === 32767. Actual: ' + (536870911 >> 14)); \n} \n\n\nif (1073741823 >> 14 !== 65535) { \n $ERROR('#479: 1073741823 >> 14 === 65535. Actual: ' + (1073741823 >> 14)); \n} \n\n\nif (2147483647 >> 14 !== 131071) { \n $ERROR('#480: 2147483647 >> 14 === 131071. Actual: ' + (2147483647 >> 14)); \n} \n\n\nif (0 >> 15 !== 0) { \n $ERROR('#481: 0 >> 15 === 0. Actual: ' + (0 >> 15)); \n} \n\n\nif (1 >> 15 !== 0) { \n $ERROR('#482: 1 >> 15 === 0. Actual: ' + (1 >> 15)); \n} \n\n\nif (3 >> 15 !== 0) { \n $ERROR('#483: 3 >> 15 === 0. Actual: ' + (3 >> 15)); \n} \n\n\nif (7 >> 15 !== 0) { \n $ERROR('#484: 7 >> 15 === 0. Actual: ' + (7 >> 15)); \n} \n\n\nif (15 >> 15 !== 0) { \n $ERROR('#485: 15 >> 15 === 0. Actual: ' + (15 >> 15)); \n} \n\n\nif (31 >> 15 !== 0) { \n $ERROR('#486: 31 >> 15 === 0. Actual: ' + (31 >> 15)); \n} \n\n\nif (63 >> 15 !== 0) { \n $ERROR('#487: 63 >> 15 === 0. Actual: ' + (63 >> 15)); \n} \n\n\nif (127 >> 15 !== 0) { \n $ERROR('#488: 127 >> 15 === 0. Actual: ' + (127 >> 15)); \n} \n\n\nif (255 >> 15 !== 0) { \n $ERROR('#489: 255 >> 15 === 0. Actual: ' + (255 >> 15)); \n} \n\n\nif (511 >> 15 !== 0) { \n $ERROR('#490: 511 >> 15 === 0. Actual: ' + (511 >> 15)); \n} \n\n\nif (1023 >> 15 !== 0) { \n $ERROR('#491: 1023 >> 15 === 0. Actual: ' + (1023 >> 15)); \n} \n\n\nif (2047 >> 15 !== 0) { \n $ERROR('#492: 2047 >> 15 === 0. Actual: ' + (2047 >> 15)); \n} \n\n\nif (4095 >> 15 !== 0) { \n $ERROR('#493: 4095 >> 15 === 0. Actual: ' + (4095 >> 15)); \n} \n\n\nif (8191 >> 15 !== 0) { \n $ERROR('#494: 8191 >> 15 === 0. Actual: ' + (8191 >> 15)); \n} \n\n\nif (16383 >> 15 !== 0) { \n $ERROR('#495: 16383 >> 15 === 0. Actual: ' + (16383 >> 15)); \n} \n\n\nif (32767 >> 15 !== 0) { \n $ERROR('#496: 32767 >> 15 === 0. Actual: ' + (32767 >> 15)); \n} \n\n\nif (65535 >> 15 !== 1) { \n $ERROR('#497: 65535 >> 15 === 1. Actual: ' + (65535 >> 15)); \n} \n\n\nif (131071 >> 15 !== 3) { \n $ERROR('#498: 131071 >> 15 === 3. Actual: ' + (131071 >> 15)); \n} \n\n\nif (262143 >> 15 !== 7) { \n $ERROR('#499: 262143 >> 15 === 7. Actual: ' + (262143 >> 15)); \n} \n\n\nif (524287 >> 15 !== 15) { \n $ERROR('#500: 524287 >> 15 === 15. Actual: ' + (524287 >> 15)); \n} \n\n\nif (1048575 >> 15 !== 31) { \n $ERROR('#501: 1048575 >> 15 === 31. Actual: ' + (1048575 >> 15)); \n} \n\n\nif (2097151 >> 15 !== 63) { \n $ERROR('#502: 2097151 >> 15 === 63. Actual: ' + (2097151 >> 15)); \n} \n\n\nif (4194303 >> 15 !== 127) { \n $ERROR('#503: 4194303 >> 15 === 127. Actual: ' + (4194303 >> 15)); \n} \n\n\nif (8388607 >> 15 !== 255) { \n $ERROR('#504: 8388607 >> 15 === 255. Actual: ' + (8388607 >> 15)); \n} \n\n\nif (16777215 >> 15 !== 511) { \n $ERROR('#505: 16777215 >> 15 === 511. Actual: ' + (16777215 >> 15)); \n} \n\n\nif (33554431 >> 15 !== 1023) { \n $ERROR('#506: 33554431 >> 15 === 1023. Actual: ' + (33554431 >> 15)); \n} \n\n\nif (67108863 >> 15 !== 2047) { \n $ERROR('#507: 67108863 >> 15 === 2047. Actual: ' + (67108863 >> 15)); \n} \n\n\nif (134217727 >> 15 !== 4095) { \n $ERROR('#508: 134217727 >> 15 === 4095. Actual: ' + (134217727 >> 15)); \n} \n\n\nif (268435455 >> 15 !== 8191) { \n $ERROR('#509: 268435455 >> 15 === 8191. Actual: ' + (268435455 >> 15)); \n} \n\n\nif (536870911 >> 15 !== 16383) { \n $ERROR('#510: 536870911 >> 15 === 16383. Actual: ' + (536870911 >> 15)); \n} \n\n\nif (1073741823 >> 15 !== 32767) { \n $ERROR('#511: 1073741823 >> 15 === 32767. Actual: ' + (1073741823 >> 15)); \n} \n\n\nif (2147483647 >> 15 !== 65535) { \n $ERROR('#512: 2147483647 >> 15 === 65535. Actual: ' + (2147483647 >> 15)); \n} \n",
+ "id": "S11.7.2_A4_T3"
+ },
+ {
+ "section": "11.7.2",
+ "description": "ShiftExpression = 2^n - 1, n = 16...31",
+ "test": "//CHECK\n \nif (0 >> 16 !== 0) { \n $ERROR('#513: 0 >> 16 === 0. Actual: ' + (0 >> 16)); \n} \n\n\nif (1 >> 16 !== 0) { \n $ERROR('#514: 1 >> 16 === 0. Actual: ' + (1 >> 16)); \n} \n\n\nif (3 >> 16 !== 0) { \n $ERROR('#515: 3 >> 16 === 0. Actual: ' + (3 >> 16)); \n} \n\n\nif (7 >> 16 !== 0) { \n $ERROR('#516: 7 >> 16 === 0. Actual: ' + (7 >> 16)); \n} \n\n\nif (15 >> 16 !== 0) { \n $ERROR('#517: 15 >> 16 === 0. Actual: ' + (15 >> 16)); \n} \n\n\nif (31 >> 16 !== 0) { \n $ERROR('#518: 31 >> 16 === 0. Actual: ' + (31 >> 16)); \n} \n\n\nif (63 >> 16 !== 0) { \n $ERROR('#519: 63 >> 16 === 0. Actual: ' + (63 >> 16)); \n} \n\n\nif (127 >> 16 !== 0) { \n $ERROR('#520: 127 >> 16 === 0. Actual: ' + (127 >> 16)); \n} \n\n\nif (255 >> 16 !== 0) { \n $ERROR('#521: 255 >> 16 === 0. Actual: ' + (255 >> 16)); \n} \n\n\nif (511 >> 16 !== 0) { \n $ERROR('#522: 511 >> 16 === 0. Actual: ' + (511 >> 16)); \n} \n\n\nif (1023 >> 16 !== 0) { \n $ERROR('#523: 1023 >> 16 === 0. Actual: ' + (1023 >> 16)); \n} \n\n\nif (2047 >> 16 !== 0) { \n $ERROR('#524: 2047 >> 16 === 0. Actual: ' + (2047 >> 16)); \n} \n\n\nif (4095 >> 16 !== 0) { \n $ERROR('#525: 4095 >> 16 === 0. Actual: ' + (4095 >> 16)); \n} \n\n\nif (8191 >> 16 !== 0) { \n $ERROR('#526: 8191 >> 16 === 0. Actual: ' + (8191 >> 16)); \n} \n\n\nif (16383 >> 16 !== 0) { \n $ERROR('#527: 16383 >> 16 === 0. Actual: ' + (16383 >> 16)); \n} \n\n\nif (32767 >> 16 !== 0) { \n $ERROR('#528: 32767 >> 16 === 0. Actual: ' + (32767 >> 16)); \n} \n\n\nif (65535 >> 16 !== 0) { \n $ERROR('#529: 65535 >> 16 === 0. Actual: ' + (65535 >> 16)); \n} \n\n\nif (131071 >> 16 !== 1) { \n $ERROR('#530: 131071 >> 16 === 1. Actual: ' + (131071 >> 16)); \n} \n\n\nif (262143 >> 16 !== 3) { \n $ERROR('#531: 262143 >> 16 === 3. Actual: ' + (262143 >> 16)); \n} \n\n\nif (524287 >> 16 !== 7) { \n $ERROR('#532: 524287 >> 16 === 7. Actual: ' + (524287 >> 16)); \n} \n\n\nif (1048575 >> 16 !== 15) { \n $ERROR('#533: 1048575 >> 16 === 15. Actual: ' + (1048575 >> 16)); \n} \n\n\nif (2097151 >> 16 !== 31) { \n $ERROR('#534: 2097151 >> 16 === 31. Actual: ' + (2097151 >> 16)); \n} \n\n\nif (4194303 >> 16 !== 63) { \n $ERROR('#535: 4194303 >> 16 === 63. Actual: ' + (4194303 >> 16)); \n} \n\n\nif (8388607 >> 16 !== 127) { \n $ERROR('#536: 8388607 >> 16 === 127. Actual: ' + (8388607 >> 16)); \n} \n\n\nif (16777215 >> 16 !== 255) { \n $ERROR('#537: 16777215 >> 16 === 255. Actual: ' + (16777215 >> 16)); \n} \n\n\nif (33554431 >> 16 !== 511) { \n $ERROR('#538: 33554431 >> 16 === 511. Actual: ' + (33554431 >> 16)); \n} \n\n\nif (67108863 >> 16 !== 1023) { \n $ERROR('#539: 67108863 >> 16 === 1023. Actual: ' + (67108863 >> 16)); \n} \n\n\nif (134217727 >> 16 !== 2047) { \n $ERROR('#540: 134217727 >> 16 === 2047. Actual: ' + (134217727 >> 16)); \n} \n\n\nif (268435455 >> 16 !== 4095) { \n $ERROR('#541: 268435455 >> 16 === 4095. Actual: ' + (268435455 >> 16)); \n} \n\n\nif (536870911 >> 16 !== 8191) { \n $ERROR('#542: 536870911 >> 16 === 8191. Actual: ' + (536870911 >> 16)); \n} \n\n\nif (1073741823 >> 16 !== 16383) { \n $ERROR('#543: 1073741823 >> 16 === 16383. Actual: ' + (1073741823 >> 16)); \n} \n\n\nif (2147483647 >> 16 !== 32767) { \n $ERROR('#544: 2147483647 >> 16 === 32767. Actual: ' + (2147483647 >> 16)); \n} \n\n\nif (0 >> 17 !== 0) { \n $ERROR('#545: 0 >> 17 === 0. Actual: ' + (0 >> 17)); \n} \n\n\nif (1 >> 17 !== 0) { \n $ERROR('#546: 1 >> 17 === 0. Actual: ' + (1 >> 17)); \n} \n\n\nif (3 >> 17 !== 0) { \n $ERROR('#547: 3 >> 17 === 0. Actual: ' + (3 >> 17)); \n} \n\n\nif (7 >> 17 !== 0) { \n $ERROR('#548: 7 >> 17 === 0. Actual: ' + (7 >> 17)); \n} \n\n\nif (15 >> 17 !== 0) { \n $ERROR('#549: 15 >> 17 === 0. Actual: ' + (15 >> 17)); \n} \n\n\nif (31 >> 17 !== 0) { \n $ERROR('#550: 31 >> 17 === 0. Actual: ' + (31 >> 17)); \n} \n\n\nif (63 >> 17 !== 0) { \n $ERROR('#551: 63 >> 17 === 0. Actual: ' + (63 >> 17)); \n} \n\n\nif (127 >> 17 !== 0) { \n $ERROR('#552: 127 >> 17 === 0. Actual: ' + (127 >> 17)); \n} \n\n\nif (255 >> 17 !== 0) { \n $ERROR('#553: 255 >> 17 === 0. Actual: ' + (255 >> 17)); \n} \n\n\nif (511 >> 17 !== 0) { \n $ERROR('#554: 511 >> 17 === 0. Actual: ' + (511 >> 17)); \n} \n\n\nif (1023 >> 17 !== 0) { \n $ERROR('#555: 1023 >> 17 === 0. Actual: ' + (1023 >> 17)); \n} \n\n\nif (2047 >> 17 !== 0) { \n $ERROR('#556: 2047 >> 17 === 0. Actual: ' + (2047 >> 17)); \n} \n\n\nif (4095 >> 17 !== 0) { \n $ERROR('#557: 4095 >> 17 === 0. Actual: ' + (4095 >> 17)); \n} \n\n\nif (8191 >> 17 !== 0) { \n $ERROR('#558: 8191 >> 17 === 0. Actual: ' + (8191 >> 17)); \n} \n\n\nif (16383 >> 17 !== 0) { \n $ERROR('#559: 16383 >> 17 === 0. Actual: ' + (16383 >> 17)); \n} \n\n\nif (32767 >> 17 !== 0) { \n $ERROR('#560: 32767 >> 17 === 0. Actual: ' + (32767 >> 17)); \n} \n\n\nif (65535 >> 17 !== 0) { \n $ERROR('#561: 65535 >> 17 === 0. Actual: ' + (65535 >> 17)); \n} \n\n\nif (131071 >> 17 !== 0) { \n $ERROR('#562: 131071 >> 17 === 0. Actual: ' + (131071 >> 17)); \n} \n\n\nif (262143 >> 17 !== 1) { \n $ERROR('#563: 262143 >> 17 === 1. Actual: ' + (262143 >> 17)); \n} \n\n\nif (524287 >> 17 !== 3) { \n $ERROR('#564: 524287 >> 17 === 3. Actual: ' + (524287 >> 17)); \n} \n\n\nif (1048575 >> 17 !== 7) { \n $ERROR('#565: 1048575 >> 17 === 7. Actual: ' + (1048575 >> 17)); \n} \n\n\nif (2097151 >> 17 !== 15) { \n $ERROR('#566: 2097151 >> 17 === 15. Actual: ' + (2097151 >> 17)); \n} \n\n\nif (4194303 >> 17 !== 31) { \n $ERROR('#567: 4194303 >> 17 === 31. Actual: ' + (4194303 >> 17)); \n} \n\n\nif (8388607 >> 17 !== 63) { \n $ERROR('#568: 8388607 >> 17 === 63. Actual: ' + (8388607 >> 17)); \n} \n\n\nif (16777215 >> 17 !== 127) { \n $ERROR('#569: 16777215 >> 17 === 127. Actual: ' + (16777215 >> 17)); \n} \n\n\nif (33554431 >> 17 !== 255) { \n $ERROR('#570: 33554431 >> 17 === 255. Actual: ' + (33554431 >> 17)); \n} \n\n\nif (67108863 >> 17 !== 511) { \n $ERROR('#571: 67108863 >> 17 === 511. Actual: ' + (67108863 >> 17)); \n} \n\n\nif (134217727 >> 17 !== 1023) { \n $ERROR('#572: 134217727 >> 17 === 1023. Actual: ' + (134217727 >> 17)); \n} \n\n\nif (268435455 >> 17 !== 2047) { \n $ERROR('#573: 268435455 >> 17 === 2047. Actual: ' + (268435455 >> 17)); \n} \n\n\nif (536870911 >> 17 !== 4095) { \n $ERROR('#574: 536870911 >> 17 === 4095. Actual: ' + (536870911 >> 17)); \n} \n\n\nif (1073741823 >> 17 !== 8191) { \n $ERROR('#575: 1073741823 >> 17 === 8191. Actual: ' + (1073741823 >> 17)); \n} \n\n\nif (2147483647 >> 17 !== 16383) { \n $ERROR('#576: 2147483647 >> 17 === 16383. Actual: ' + (2147483647 >> 17)); \n} \n\n\nif (0 >> 18 !== 0) { \n $ERROR('#577: 0 >> 18 === 0. Actual: ' + (0 >> 18)); \n} \n\n\nif (1 >> 18 !== 0) { \n $ERROR('#578: 1 >> 18 === 0. Actual: ' + (1 >> 18)); \n} \n\n\nif (3 >> 18 !== 0) { \n $ERROR('#579: 3 >> 18 === 0. Actual: ' + (3 >> 18)); \n} \n\n\nif (7 >> 18 !== 0) { \n $ERROR('#580: 7 >> 18 === 0. Actual: ' + (7 >> 18)); \n} \n\n\nif (15 >> 18 !== 0) { \n $ERROR('#581: 15 >> 18 === 0. Actual: ' + (15 >> 18)); \n} \n\n\nif (31 >> 18 !== 0) { \n $ERROR('#582: 31 >> 18 === 0. Actual: ' + (31 >> 18)); \n} \n\n\nif (63 >> 18 !== 0) { \n $ERROR('#583: 63 >> 18 === 0. Actual: ' + (63 >> 18)); \n} \n\n\nif (127 >> 18 !== 0) { \n $ERROR('#584: 127 >> 18 === 0. Actual: ' + (127 >> 18)); \n} \n\n\nif (255 >> 18 !== 0) { \n $ERROR('#585: 255 >> 18 === 0. Actual: ' + (255 >> 18)); \n} \n\n\nif (511 >> 18 !== 0) { \n $ERROR('#586: 511 >> 18 === 0. Actual: ' + (511 >> 18)); \n} \n\n\nif (1023 >> 18 !== 0) { \n $ERROR('#587: 1023 >> 18 === 0. Actual: ' + (1023 >> 18)); \n} \n\n\nif (2047 >> 18 !== 0) { \n $ERROR('#588: 2047 >> 18 === 0. Actual: ' + (2047 >> 18)); \n} \n\n\nif (4095 >> 18 !== 0) { \n $ERROR('#589: 4095 >> 18 === 0. Actual: ' + (4095 >> 18)); \n} \n\n\nif (8191 >> 18 !== 0) { \n $ERROR('#590: 8191 >> 18 === 0. Actual: ' + (8191 >> 18)); \n} \n\n\nif (16383 >> 18 !== 0) { \n $ERROR('#591: 16383 >> 18 === 0. Actual: ' + (16383 >> 18)); \n} \n\n\nif (32767 >> 18 !== 0) { \n $ERROR('#592: 32767 >> 18 === 0. Actual: ' + (32767 >> 18)); \n} \n\n\nif (65535 >> 18 !== 0) { \n $ERROR('#593: 65535 >> 18 === 0. Actual: ' + (65535 >> 18)); \n} \n\n\nif (131071 >> 18 !== 0) { \n $ERROR('#594: 131071 >> 18 === 0. Actual: ' + (131071 >> 18)); \n} \n\n\nif (262143 >> 18 !== 0) { \n $ERROR('#595: 262143 >> 18 === 0. Actual: ' + (262143 >> 18)); \n} \n\n\nif (524287 >> 18 !== 1) { \n $ERROR('#596: 524287 >> 18 === 1. Actual: ' + (524287 >> 18)); \n} \n\n\nif (1048575 >> 18 !== 3) { \n $ERROR('#597: 1048575 >> 18 === 3. Actual: ' + (1048575 >> 18)); \n} \n\n\nif (2097151 >> 18 !== 7) { \n $ERROR('#598: 2097151 >> 18 === 7. Actual: ' + (2097151 >> 18)); \n} \n\n\nif (4194303 >> 18 !== 15) { \n $ERROR('#599: 4194303 >> 18 === 15. Actual: ' + (4194303 >> 18)); \n} \n\n\nif (8388607 >> 18 !== 31) { \n $ERROR('#600: 8388607 >> 18 === 31. Actual: ' + (8388607 >> 18)); \n} \n\n\nif (16777215 >> 18 !== 63) { \n $ERROR('#601: 16777215 >> 18 === 63. Actual: ' + (16777215 >> 18)); \n} \n\n\nif (33554431 >> 18 !== 127) { \n $ERROR('#602: 33554431 >> 18 === 127. Actual: ' + (33554431 >> 18)); \n} \n\n\nif (67108863 >> 18 !== 255) { \n $ERROR('#603: 67108863 >> 18 === 255. Actual: ' + (67108863 >> 18)); \n} \n\n\nif (134217727 >> 18 !== 511) { \n $ERROR('#604: 134217727 >> 18 === 511. Actual: ' + (134217727 >> 18)); \n} \n\n\nif (268435455 >> 18 !== 1023) { \n $ERROR('#605: 268435455 >> 18 === 1023. Actual: ' + (268435455 >> 18)); \n} \n\n\nif (536870911 >> 18 !== 2047) { \n $ERROR('#606: 536870911 >> 18 === 2047. Actual: ' + (536870911 >> 18)); \n} \n\n\nif (1073741823 >> 18 !== 4095) { \n $ERROR('#607: 1073741823 >> 18 === 4095. Actual: ' + (1073741823 >> 18)); \n} \n\n\nif (2147483647 >> 18 !== 8191) { \n $ERROR('#608: 2147483647 >> 18 === 8191. Actual: ' + (2147483647 >> 18)); \n} \n\n\nif (0 >> 19 !== 0) { \n $ERROR('#609: 0 >> 19 === 0. Actual: ' + (0 >> 19)); \n} \n\n\nif (1 >> 19 !== 0) { \n $ERROR('#610: 1 >> 19 === 0. Actual: ' + (1 >> 19)); \n} \n\n\nif (3 >> 19 !== 0) { \n $ERROR('#611: 3 >> 19 === 0. Actual: ' + (3 >> 19)); \n} \n\n\nif (7 >> 19 !== 0) { \n $ERROR('#612: 7 >> 19 === 0. Actual: ' + (7 >> 19)); \n} \n\n\nif (15 >> 19 !== 0) { \n $ERROR('#613: 15 >> 19 === 0. Actual: ' + (15 >> 19)); \n} \n\n\nif (31 >> 19 !== 0) { \n $ERROR('#614: 31 >> 19 === 0. Actual: ' + (31 >> 19)); \n} \n\n\nif (63 >> 19 !== 0) { \n $ERROR('#615: 63 >> 19 === 0. Actual: ' + (63 >> 19)); \n} \n\n\nif (127 >> 19 !== 0) { \n $ERROR('#616: 127 >> 19 === 0. Actual: ' + (127 >> 19)); \n} \n\n\nif (255 >> 19 !== 0) { \n $ERROR('#617: 255 >> 19 === 0. Actual: ' + (255 >> 19)); \n} \n\n\nif (511 >> 19 !== 0) { \n $ERROR('#618: 511 >> 19 === 0. Actual: ' + (511 >> 19)); \n} \n\n\nif (1023 >> 19 !== 0) { \n $ERROR('#619: 1023 >> 19 === 0. Actual: ' + (1023 >> 19)); \n} \n\n\nif (2047 >> 19 !== 0) { \n $ERROR('#620: 2047 >> 19 === 0. Actual: ' + (2047 >> 19)); \n} \n\n\nif (4095 >> 19 !== 0) { \n $ERROR('#621: 4095 >> 19 === 0. Actual: ' + (4095 >> 19)); \n} \n\n\nif (8191 >> 19 !== 0) { \n $ERROR('#622: 8191 >> 19 === 0. Actual: ' + (8191 >> 19)); \n} \n\n\nif (16383 >> 19 !== 0) { \n $ERROR('#623: 16383 >> 19 === 0. Actual: ' + (16383 >> 19)); \n} \n\n\nif (32767 >> 19 !== 0) { \n $ERROR('#624: 32767 >> 19 === 0. Actual: ' + (32767 >> 19)); \n} \n\n\nif (65535 >> 19 !== 0) { \n $ERROR('#625: 65535 >> 19 === 0. Actual: ' + (65535 >> 19)); \n} \n\n\nif (131071 >> 19 !== 0) { \n $ERROR('#626: 131071 >> 19 === 0. Actual: ' + (131071 >> 19)); \n} \n\n\nif (262143 >> 19 !== 0) { \n $ERROR('#627: 262143 >> 19 === 0. Actual: ' + (262143 >> 19)); \n} \n\n\nif (524287 >> 19 !== 0) { \n $ERROR('#628: 524287 >> 19 === 0. Actual: ' + (524287 >> 19)); \n} \n\n\nif (1048575 >> 19 !== 1) { \n $ERROR('#629: 1048575 >> 19 === 1. Actual: ' + (1048575 >> 19)); \n} \n\n\nif (2097151 >> 19 !== 3) { \n $ERROR('#630: 2097151 >> 19 === 3. Actual: ' + (2097151 >> 19)); \n} \n\n\nif (4194303 >> 19 !== 7) { \n $ERROR('#631: 4194303 >> 19 === 7. Actual: ' + (4194303 >> 19)); \n} \n\n\nif (8388607 >> 19 !== 15) { \n $ERROR('#632: 8388607 >> 19 === 15. Actual: ' + (8388607 >> 19)); \n} \n\n\nif (16777215 >> 19 !== 31) { \n $ERROR('#633: 16777215 >> 19 === 31. Actual: ' + (16777215 >> 19)); \n} \n\n\nif (33554431 >> 19 !== 63) { \n $ERROR('#634: 33554431 >> 19 === 63. Actual: ' + (33554431 >> 19)); \n} \n\n\nif (67108863 >> 19 !== 127) { \n $ERROR('#635: 67108863 >> 19 === 127. Actual: ' + (67108863 >> 19)); \n} \n\n\nif (134217727 >> 19 !== 255) { \n $ERROR('#636: 134217727 >> 19 === 255. Actual: ' + (134217727 >> 19)); \n} \n\n\nif (268435455 >> 19 !== 511) { \n $ERROR('#637: 268435455 >> 19 === 511. Actual: ' + (268435455 >> 19)); \n} \n\n\nif (536870911 >> 19 !== 1023) { \n $ERROR('#638: 536870911 >> 19 === 1023. Actual: ' + (536870911 >> 19)); \n} \n\n\nif (1073741823 >> 19 !== 2047) { \n $ERROR('#639: 1073741823 >> 19 === 2047. Actual: ' + (1073741823 >> 19)); \n} \n\n\nif (2147483647 >> 19 !== 4095) { \n $ERROR('#640: 2147483647 >> 19 === 4095. Actual: ' + (2147483647 >> 19)); \n} \n\n\nif (0 >> 20 !== 0) { \n $ERROR('#641: 0 >> 20 === 0. Actual: ' + (0 >> 20)); \n} \n\n\nif (1 >> 20 !== 0) { \n $ERROR('#642: 1 >> 20 === 0. Actual: ' + (1 >> 20)); \n} \n\n\nif (3 >> 20 !== 0) { \n $ERROR('#643: 3 >> 20 === 0. Actual: ' + (3 >> 20)); \n} \n\n\nif (7 >> 20 !== 0) { \n $ERROR('#644: 7 >> 20 === 0. Actual: ' + (7 >> 20)); \n} \n\n\nif (15 >> 20 !== 0) { \n $ERROR('#645: 15 >> 20 === 0. Actual: ' + (15 >> 20)); \n} \n\n\nif (31 >> 20 !== 0) { \n $ERROR('#646: 31 >> 20 === 0. Actual: ' + (31 >> 20)); \n} \n\n\nif (63 >> 20 !== 0) { \n $ERROR('#647: 63 >> 20 === 0. Actual: ' + (63 >> 20)); \n} \n\n\nif (127 >> 20 !== 0) { \n $ERROR('#648: 127 >> 20 === 0. Actual: ' + (127 >> 20)); \n} \n\n\nif (255 >> 20 !== 0) { \n $ERROR('#649: 255 >> 20 === 0. Actual: ' + (255 >> 20)); \n} \n\n\nif (511 >> 20 !== 0) { \n $ERROR('#650: 511 >> 20 === 0. Actual: ' + (511 >> 20)); \n} \n\n\nif (1023 >> 20 !== 0) { \n $ERROR('#651: 1023 >> 20 === 0. Actual: ' + (1023 >> 20)); \n} \n\n\nif (2047 >> 20 !== 0) { \n $ERROR('#652: 2047 >> 20 === 0. Actual: ' + (2047 >> 20)); \n} \n\n\nif (4095 >> 20 !== 0) { \n $ERROR('#653: 4095 >> 20 === 0. Actual: ' + (4095 >> 20)); \n} \n\n\nif (8191 >> 20 !== 0) { \n $ERROR('#654: 8191 >> 20 === 0. Actual: ' + (8191 >> 20)); \n} \n\n\nif (16383 >> 20 !== 0) { \n $ERROR('#655: 16383 >> 20 === 0. Actual: ' + (16383 >> 20)); \n} \n\n\nif (32767 >> 20 !== 0) { \n $ERROR('#656: 32767 >> 20 === 0. Actual: ' + (32767 >> 20)); \n} \n\n\nif (65535 >> 20 !== 0) { \n $ERROR('#657: 65535 >> 20 === 0. Actual: ' + (65535 >> 20)); \n} \n\n\nif (131071 >> 20 !== 0) { \n $ERROR('#658: 131071 >> 20 === 0. Actual: ' + (131071 >> 20)); \n} \n\n\nif (262143 >> 20 !== 0) { \n $ERROR('#659: 262143 >> 20 === 0. Actual: ' + (262143 >> 20)); \n} \n\n\nif (524287 >> 20 !== 0) { \n $ERROR('#660: 524287 >> 20 === 0. Actual: ' + (524287 >> 20)); \n} \n\n\nif (1048575 >> 20 !== 0) { \n $ERROR('#661: 1048575 >> 20 === 0. Actual: ' + (1048575 >> 20)); \n} \n\n\nif (2097151 >> 20 !== 1) { \n $ERROR('#662: 2097151 >> 20 === 1. Actual: ' + (2097151 >> 20)); \n} \n\n\nif (4194303 >> 20 !== 3) { \n $ERROR('#663: 4194303 >> 20 === 3. Actual: ' + (4194303 >> 20)); \n} \n\n\nif (8388607 >> 20 !== 7) { \n $ERROR('#664: 8388607 >> 20 === 7. Actual: ' + (8388607 >> 20)); \n} \n\n\nif (16777215 >> 20 !== 15) { \n $ERROR('#665: 16777215 >> 20 === 15. Actual: ' + (16777215 >> 20)); \n} \n\n\nif (33554431 >> 20 !== 31) { \n $ERROR('#666: 33554431 >> 20 === 31. Actual: ' + (33554431 >> 20)); \n} \n\n\nif (67108863 >> 20 !== 63) { \n $ERROR('#667: 67108863 >> 20 === 63. Actual: ' + (67108863 >> 20)); \n} \n\n\nif (134217727 >> 20 !== 127) { \n $ERROR('#668: 134217727 >> 20 === 127. Actual: ' + (134217727 >> 20)); \n} \n\n\nif (268435455 >> 20 !== 255) { \n $ERROR('#669: 268435455 >> 20 === 255. Actual: ' + (268435455 >> 20)); \n} \n\n\nif (536870911 >> 20 !== 511) { \n $ERROR('#670: 536870911 >> 20 === 511. Actual: ' + (536870911 >> 20)); \n} \n\n\nif (1073741823 >> 20 !== 1023) { \n $ERROR('#671: 1073741823 >> 20 === 1023. Actual: ' + (1073741823 >> 20)); \n} \n\n\nif (2147483647 >> 20 !== 2047) { \n $ERROR('#672: 2147483647 >> 20 === 2047. Actual: ' + (2147483647 >> 20)); \n} \n\n\nif (0 >> 21 !== 0) { \n $ERROR('#673: 0 >> 21 === 0. Actual: ' + (0 >> 21)); \n} \n\n\nif (1 >> 21 !== 0) { \n $ERROR('#674: 1 >> 21 === 0. Actual: ' + (1 >> 21)); \n} \n\n\nif (3 >> 21 !== 0) { \n $ERROR('#675: 3 >> 21 === 0. Actual: ' + (3 >> 21)); \n} \n\n\nif (7 >> 21 !== 0) { \n $ERROR('#676: 7 >> 21 === 0. Actual: ' + (7 >> 21)); \n} \n\n\nif (15 >> 21 !== 0) { \n $ERROR('#677: 15 >> 21 === 0. Actual: ' + (15 >> 21)); \n} \n\n\nif (31 >> 21 !== 0) { \n $ERROR('#678: 31 >> 21 === 0. Actual: ' + (31 >> 21)); \n} \n\n\nif (63 >> 21 !== 0) { \n $ERROR('#679: 63 >> 21 === 0. Actual: ' + (63 >> 21)); \n} \n\n\nif (127 >> 21 !== 0) { \n $ERROR('#680: 127 >> 21 === 0. Actual: ' + (127 >> 21)); \n} \n\n\nif (255 >> 21 !== 0) { \n $ERROR('#681: 255 >> 21 === 0. Actual: ' + (255 >> 21)); \n} \n\n\nif (511 >> 21 !== 0) { \n $ERROR('#682: 511 >> 21 === 0. Actual: ' + (511 >> 21)); \n} \n\n\nif (1023 >> 21 !== 0) { \n $ERROR('#683: 1023 >> 21 === 0. Actual: ' + (1023 >> 21)); \n} \n\n\nif (2047 >> 21 !== 0) { \n $ERROR('#684: 2047 >> 21 === 0. Actual: ' + (2047 >> 21)); \n} \n\n\nif (4095 >> 21 !== 0) { \n $ERROR('#685: 4095 >> 21 === 0. Actual: ' + (4095 >> 21)); \n} \n\n\nif (8191 >> 21 !== 0) { \n $ERROR('#686: 8191 >> 21 === 0. Actual: ' + (8191 >> 21)); \n} \n\n\nif (16383 >> 21 !== 0) { \n $ERROR('#687: 16383 >> 21 === 0. Actual: ' + (16383 >> 21)); \n} \n\n\nif (32767 >> 21 !== 0) { \n $ERROR('#688: 32767 >> 21 === 0. Actual: ' + (32767 >> 21)); \n} \n\n\nif (65535 >> 21 !== 0) { \n $ERROR('#689: 65535 >> 21 === 0. Actual: ' + (65535 >> 21)); \n} \n\n\nif (131071 >> 21 !== 0) { \n $ERROR('#690: 131071 >> 21 === 0. Actual: ' + (131071 >> 21)); \n} \n\n\nif (262143 >> 21 !== 0) { \n $ERROR('#691: 262143 >> 21 === 0. Actual: ' + (262143 >> 21)); \n} \n\n\nif (524287 >> 21 !== 0) { \n $ERROR('#692: 524287 >> 21 === 0. Actual: ' + (524287 >> 21)); \n} \n\n\nif (1048575 >> 21 !== 0) { \n $ERROR('#693: 1048575 >> 21 === 0. Actual: ' + (1048575 >> 21)); \n} \n\n\nif (2097151 >> 21 !== 0) { \n $ERROR('#694: 2097151 >> 21 === 0. Actual: ' + (2097151 >> 21)); \n} \n\n\nif (4194303 >> 21 !== 1) { \n $ERROR('#695: 4194303 >> 21 === 1. Actual: ' + (4194303 >> 21)); \n} \n\n\nif (8388607 >> 21 !== 3) { \n $ERROR('#696: 8388607 >> 21 === 3. Actual: ' + (8388607 >> 21)); \n} \n\n\nif (16777215 >> 21 !== 7) { \n $ERROR('#697: 16777215 >> 21 === 7. Actual: ' + (16777215 >> 21)); \n} \n\n\nif (33554431 >> 21 !== 15) { \n $ERROR('#698: 33554431 >> 21 === 15. Actual: ' + (33554431 >> 21)); \n} \n\n\nif (67108863 >> 21 !== 31) { \n $ERROR('#699: 67108863 >> 21 === 31. Actual: ' + (67108863 >> 21)); \n} \n\n\nif (134217727 >> 21 !== 63) { \n $ERROR('#700: 134217727 >> 21 === 63. Actual: ' + (134217727 >> 21)); \n} \n\n\nif (268435455 >> 21 !== 127) { \n $ERROR('#701: 268435455 >> 21 === 127. Actual: ' + (268435455 >> 21)); \n} \n\n\nif (536870911 >> 21 !== 255) { \n $ERROR('#702: 536870911 >> 21 === 255. Actual: ' + (536870911 >> 21)); \n} \n\n\nif (1073741823 >> 21 !== 511) { \n $ERROR('#703: 1073741823 >> 21 === 511. Actual: ' + (1073741823 >> 21)); \n} \n\n\nif (2147483647 >> 21 !== 1023) { \n $ERROR('#704: 2147483647 >> 21 === 1023. Actual: ' + (2147483647 >> 21)); \n} \n\n\nif (0 >> 22 !== 0) { \n $ERROR('#705: 0 >> 22 === 0. Actual: ' + (0 >> 22)); \n} \n\n\nif (1 >> 22 !== 0) { \n $ERROR('#706: 1 >> 22 === 0. Actual: ' + (1 >> 22)); \n} \n\n\nif (3 >> 22 !== 0) { \n $ERROR('#707: 3 >> 22 === 0. Actual: ' + (3 >> 22)); \n} \n\n\nif (7 >> 22 !== 0) { \n $ERROR('#708: 7 >> 22 === 0. Actual: ' + (7 >> 22)); \n} \n\n\nif (15 >> 22 !== 0) { \n $ERROR('#709: 15 >> 22 === 0. Actual: ' + (15 >> 22)); \n} \n\n\nif (31 >> 22 !== 0) { \n $ERROR('#710: 31 >> 22 === 0. Actual: ' + (31 >> 22)); \n} \n\n\nif (63 >> 22 !== 0) { \n $ERROR('#711: 63 >> 22 === 0. Actual: ' + (63 >> 22)); \n} \n\n\nif (127 >> 22 !== 0) { \n $ERROR('#712: 127 >> 22 === 0. Actual: ' + (127 >> 22)); \n} \n\n\nif (255 >> 22 !== 0) { \n $ERROR('#713: 255 >> 22 === 0. Actual: ' + (255 >> 22)); \n} \n\n\nif (511 >> 22 !== 0) { \n $ERROR('#714: 511 >> 22 === 0. Actual: ' + (511 >> 22)); \n} \n\n\nif (1023 >> 22 !== 0) { \n $ERROR('#715: 1023 >> 22 === 0. Actual: ' + (1023 >> 22)); \n} \n\n\nif (2047 >> 22 !== 0) { \n $ERROR('#716: 2047 >> 22 === 0. Actual: ' + (2047 >> 22)); \n} \n\n\nif (4095 >> 22 !== 0) { \n $ERROR('#717: 4095 >> 22 === 0. Actual: ' + (4095 >> 22)); \n} \n\n\nif (8191 >> 22 !== 0) { \n $ERROR('#718: 8191 >> 22 === 0. Actual: ' + (8191 >> 22)); \n} \n\n\nif (16383 >> 22 !== 0) { \n $ERROR('#719: 16383 >> 22 === 0. Actual: ' + (16383 >> 22)); \n} \n\n\nif (32767 >> 22 !== 0) { \n $ERROR('#720: 32767 >> 22 === 0. Actual: ' + (32767 >> 22)); \n} \n\n\nif (65535 >> 22 !== 0) { \n $ERROR('#721: 65535 >> 22 === 0. Actual: ' + (65535 >> 22)); \n} \n\n\nif (131071 >> 22 !== 0) { \n $ERROR('#722: 131071 >> 22 === 0. Actual: ' + (131071 >> 22)); \n} \n\n\nif (262143 >> 22 !== 0) { \n $ERROR('#723: 262143 >> 22 === 0. Actual: ' + (262143 >> 22)); \n} \n\n\nif (524287 >> 22 !== 0) { \n $ERROR('#724: 524287 >> 22 === 0. Actual: ' + (524287 >> 22)); \n} \n\n\nif (1048575 >> 22 !== 0) { \n $ERROR('#725: 1048575 >> 22 === 0. Actual: ' + (1048575 >> 22)); \n} \n\n\nif (2097151 >> 22 !== 0) { \n $ERROR('#726: 2097151 >> 22 === 0. Actual: ' + (2097151 >> 22)); \n} \n\n\nif (4194303 >> 22 !== 0) { \n $ERROR('#727: 4194303 >> 22 === 0. Actual: ' + (4194303 >> 22)); \n} \n\n\nif (8388607 >> 22 !== 1) { \n $ERROR('#728: 8388607 >> 22 === 1. Actual: ' + (8388607 >> 22)); \n} \n\n\nif (16777215 >> 22 !== 3) { \n $ERROR('#729: 16777215 >> 22 === 3. Actual: ' + (16777215 >> 22)); \n} \n\n\nif (33554431 >> 22 !== 7) { \n $ERROR('#730: 33554431 >> 22 === 7. Actual: ' + (33554431 >> 22)); \n} \n\n\nif (67108863 >> 22 !== 15) { \n $ERROR('#731: 67108863 >> 22 === 15. Actual: ' + (67108863 >> 22)); \n} \n\n\nif (134217727 >> 22 !== 31) { \n $ERROR('#732: 134217727 >> 22 === 31. Actual: ' + (134217727 >> 22)); \n} \n\n\nif (268435455 >> 22 !== 63) { \n $ERROR('#733: 268435455 >> 22 === 63. Actual: ' + (268435455 >> 22)); \n} \n\n\nif (536870911 >> 22 !== 127) { \n $ERROR('#734: 536870911 >> 22 === 127. Actual: ' + (536870911 >> 22)); \n} \n\n\nif (1073741823 >> 22 !== 255) { \n $ERROR('#735: 1073741823 >> 22 === 255. Actual: ' + (1073741823 >> 22)); \n} \n\n\nif (2147483647 >> 22 !== 511) { \n $ERROR('#736: 2147483647 >> 22 === 511. Actual: ' + (2147483647 >> 22)); \n} \n\n\nif (0 >> 23 !== 0) { \n $ERROR('#737: 0 >> 23 === 0. Actual: ' + (0 >> 23)); \n} \n\n\nif (1 >> 23 !== 0) { \n $ERROR('#738: 1 >> 23 === 0. Actual: ' + (1 >> 23)); \n} \n\n\nif (3 >> 23 !== 0) { \n $ERROR('#739: 3 >> 23 === 0. Actual: ' + (3 >> 23)); \n} \n\n\nif (7 >> 23 !== 0) { \n $ERROR('#740: 7 >> 23 === 0. Actual: ' + (7 >> 23)); \n} \n\n\nif (15 >> 23 !== 0) { \n $ERROR('#741: 15 >> 23 === 0. Actual: ' + (15 >> 23)); \n} \n\n\nif (31 >> 23 !== 0) { \n $ERROR('#742: 31 >> 23 === 0. Actual: ' + (31 >> 23)); \n} \n\n\nif (63 >> 23 !== 0) { \n $ERROR('#743: 63 >> 23 === 0. Actual: ' + (63 >> 23)); \n} \n\n\nif (127 >> 23 !== 0) { \n $ERROR('#744: 127 >> 23 === 0. Actual: ' + (127 >> 23)); \n} \n\n\nif (255 >> 23 !== 0) { \n $ERROR('#745: 255 >> 23 === 0. Actual: ' + (255 >> 23)); \n} \n\n\nif (511 >> 23 !== 0) { \n $ERROR('#746: 511 >> 23 === 0. Actual: ' + (511 >> 23)); \n} \n\n\nif (1023 >> 23 !== 0) { \n $ERROR('#747: 1023 >> 23 === 0. Actual: ' + (1023 >> 23)); \n} \n\n\nif (2047 >> 23 !== 0) { \n $ERROR('#748: 2047 >> 23 === 0. Actual: ' + (2047 >> 23)); \n} \n\n\nif (4095 >> 23 !== 0) { \n $ERROR('#749: 4095 >> 23 === 0. Actual: ' + (4095 >> 23)); \n} \n\n\nif (8191 >> 23 !== 0) { \n $ERROR('#750: 8191 >> 23 === 0. Actual: ' + (8191 >> 23)); \n} \n\n\nif (16383 >> 23 !== 0) { \n $ERROR('#751: 16383 >> 23 === 0. Actual: ' + (16383 >> 23)); \n} \n\n\nif (32767 >> 23 !== 0) { \n $ERROR('#752: 32767 >> 23 === 0. Actual: ' + (32767 >> 23)); \n} \n\n\nif (65535 >> 23 !== 0) { \n $ERROR('#753: 65535 >> 23 === 0. Actual: ' + (65535 >> 23)); \n} \n\n\nif (131071 >> 23 !== 0) { \n $ERROR('#754: 131071 >> 23 === 0. Actual: ' + (131071 >> 23)); \n} \n\n\nif (262143 >> 23 !== 0) { \n $ERROR('#755: 262143 >> 23 === 0. Actual: ' + (262143 >> 23)); \n} \n\n\nif (524287 >> 23 !== 0) { \n $ERROR('#756: 524287 >> 23 === 0. Actual: ' + (524287 >> 23)); \n} \n\n\nif (1048575 >> 23 !== 0) { \n $ERROR('#757: 1048575 >> 23 === 0. Actual: ' + (1048575 >> 23)); \n} \n\n\nif (2097151 >> 23 !== 0) { \n $ERROR('#758: 2097151 >> 23 === 0. Actual: ' + (2097151 >> 23)); \n} \n\n\nif (4194303 >> 23 !== 0) { \n $ERROR('#759: 4194303 >> 23 === 0. Actual: ' + (4194303 >> 23)); \n} \n\n\nif (8388607 >> 23 !== 0) { \n $ERROR('#760: 8388607 >> 23 === 0. Actual: ' + (8388607 >> 23)); \n} \n\n\nif (16777215 >> 23 !== 1) { \n $ERROR('#761: 16777215 >> 23 === 1. Actual: ' + (16777215 >> 23)); \n} \n\n\nif (33554431 >> 23 !== 3) { \n $ERROR('#762: 33554431 >> 23 === 3. Actual: ' + (33554431 >> 23)); \n} \n\n\nif (67108863 >> 23 !== 7) { \n $ERROR('#763: 67108863 >> 23 === 7. Actual: ' + (67108863 >> 23)); \n} \n\n\nif (134217727 >> 23 !== 15) { \n $ERROR('#764: 134217727 >> 23 === 15. Actual: ' + (134217727 >> 23)); \n} \n\n\nif (268435455 >> 23 !== 31) { \n $ERROR('#765: 268435455 >> 23 === 31. Actual: ' + (268435455 >> 23)); \n} \n\n\nif (536870911 >> 23 !== 63) { \n $ERROR('#766: 536870911 >> 23 === 63. Actual: ' + (536870911 >> 23)); \n} \n\n\nif (1073741823 >> 23 !== 127) { \n $ERROR('#767: 1073741823 >> 23 === 127. Actual: ' + (1073741823 >> 23)); \n} \n\n\nif (2147483647 >> 23 !== 255) { \n $ERROR('#768: 2147483647 >> 23 === 255. Actual: ' + (2147483647 >> 23)); \n} \n\n\nif (0 >> 24 !== 0) { \n $ERROR('#769: 0 >> 24 === 0. Actual: ' + (0 >> 24)); \n} \n\n\nif (1 >> 24 !== 0) { \n $ERROR('#770: 1 >> 24 === 0. Actual: ' + (1 >> 24)); \n} \n\n\nif (3 >> 24 !== 0) { \n $ERROR('#771: 3 >> 24 === 0. Actual: ' + (3 >> 24)); \n} \n\n\nif (7 >> 24 !== 0) { \n $ERROR('#772: 7 >> 24 === 0. Actual: ' + (7 >> 24)); \n} \n\n\nif (15 >> 24 !== 0) { \n $ERROR('#773: 15 >> 24 === 0. Actual: ' + (15 >> 24)); \n} \n\n\nif (31 >> 24 !== 0) { \n $ERROR('#774: 31 >> 24 === 0. Actual: ' + (31 >> 24)); \n} \n\n\nif (63 >> 24 !== 0) { \n $ERROR('#775: 63 >> 24 === 0. Actual: ' + (63 >> 24)); \n} \n\n\nif (127 >> 24 !== 0) { \n $ERROR('#776: 127 >> 24 === 0. Actual: ' + (127 >> 24)); \n} \n\n\nif (255 >> 24 !== 0) { \n $ERROR('#777: 255 >> 24 === 0. Actual: ' + (255 >> 24)); \n} \n\n\nif (511 >> 24 !== 0) { \n $ERROR('#778: 511 >> 24 === 0. Actual: ' + (511 >> 24)); \n} \n\n\nif (1023 >> 24 !== 0) { \n $ERROR('#779: 1023 >> 24 === 0. Actual: ' + (1023 >> 24)); \n} \n\n\nif (2047 >> 24 !== 0) { \n $ERROR('#780: 2047 >> 24 === 0. Actual: ' + (2047 >> 24)); \n} \n\n\nif (4095 >> 24 !== 0) { \n $ERROR('#781: 4095 >> 24 === 0. Actual: ' + (4095 >> 24)); \n} \n\n\nif (8191 >> 24 !== 0) { \n $ERROR('#782: 8191 >> 24 === 0. Actual: ' + (8191 >> 24)); \n} \n\n\nif (16383 >> 24 !== 0) { \n $ERROR('#783: 16383 >> 24 === 0. Actual: ' + (16383 >> 24)); \n} \n\n\nif (32767 >> 24 !== 0) { \n $ERROR('#784: 32767 >> 24 === 0. Actual: ' + (32767 >> 24)); \n} \n\n\nif (65535 >> 24 !== 0) { \n $ERROR('#785: 65535 >> 24 === 0. Actual: ' + (65535 >> 24)); \n} \n\n\nif (131071 >> 24 !== 0) { \n $ERROR('#786: 131071 >> 24 === 0. Actual: ' + (131071 >> 24)); \n} \n\n\nif (262143 >> 24 !== 0) { \n $ERROR('#787: 262143 >> 24 === 0. Actual: ' + (262143 >> 24)); \n} \n\n\nif (524287 >> 24 !== 0) { \n $ERROR('#788: 524287 >> 24 === 0. Actual: ' + (524287 >> 24)); \n} \n\n\nif (1048575 >> 24 !== 0) { \n $ERROR('#789: 1048575 >> 24 === 0. Actual: ' + (1048575 >> 24)); \n} \n\n\nif (2097151 >> 24 !== 0) { \n $ERROR('#790: 2097151 >> 24 === 0. Actual: ' + (2097151 >> 24)); \n} \n\n\nif (4194303 >> 24 !== 0) { \n $ERROR('#791: 4194303 >> 24 === 0. Actual: ' + (4194303 >> 24)); \n} \n\n\nif (8388607 >> 24 !== 0) { \n $ERROR('#792: 8388607 >> 24 === 0. Actual: ' + (8388607 >> 24)); \n} \n\n\nif (16777215 >> 24 !== 0) { \n $ERROR('#793: 16777215 >> 24 === 0. Actual: ' + (16777215 >> 24)); \n} \n\n\nif (33554431 >> 24 !== 1) { \n $ERROR('#794: 33554431 >> 24 === 1. Actual: ' + (33554431 >> 24)); \n} \n\n\nif (67108863 >> 24 !== 3) { \n $ERROR('#795: 67108863 >> 24 === 3. Actual: ' + (67108863 >> 24)); \n} \n\n\nif (134217727 >> 24 !== 7) { \n $ERROR('#796: 134217727 >> 24 === 7. Actual: ' + (134217727 >> 24)); \n} \n\n\nif (268435455 >> 24 !== 15) { \n $ERROR('#797: 268435455 >> 24 === 15. Actual: ' + (268435455 >> 24)); \n} \n\n\nif (536870911 >> 24 !== 31) { \n $ERROR('#798: 536870911 >> 24 === 31. Actual: ' + (536870911 >> 24)); \n} \n\n\nif (1073741823 >> 24 !== 63) { \n $ERROR('#799: 1073741823 >> 24 === 63. Actual: ' + (1073741823 >> 24)); \n} \n\n\nif (2147483647 >> 24 !== 127) { \n $ERROR('#800: 2147483647 >> 24 === 127. Actual: ' + (2147483647 >> 24)); \n} \n\n\nif (0 >> 25 !== 0) { \n $ERROR('#801: 0 >> 25 === 0. Actual: ' + (0 >> 25)); \n} \n\n\nif (1 >> 25 !== 0) { \n $ERROR('#802: 1 >> 25 === 0. Actual: ' + (1 >> 25)); \n} \n\n\nif (3 >> 25 !== 0) { \n $ERROR('#803: 3 >> 25 === 0. Actual: ' + (3 >> 25)); \n} \n\n\nif (7 >> 25 !== 0) { \n $ERROR('#804: 7 >> 25 === 0. Actual: ' + (7 >> 25)); \n} \n\n\nif (15 >> 25 !== 0) { \n $ERROR('#805: 15 >> 25 === 0. Actual: ' + (15 >> 25)); \n} \n\n\nif (31 >> 25 !== 0) { \n $ERROR('#806: 31 >> 25 === 0. Actual: ' + (31 >> 25)); \n} \n\n\nif (63 >> 25 !== 0) { \n $ERROR('#807: 63 >> 25 === 0. Actual: ' + (63 >> 25)); \n} \n\n\nif (127 >> 25 !== 0) { \n $ERROR('#808: 127 >> 25 === 0. Actual: ' + (127 >> 25)); \n} \n\n\nif (255 >> 25 !== 0) { \n $ERROR('#809: 255 >> 25 === 0. Actual: ' + (255 >> 25)); \n} \n\n\nif (511 >> 25 !== 0) { \n $ERROR('#810: 511 >> 25 === 0. Actual: ' + (511 >> 25)); \n} \n\n\nif (1023 >> 25 !== 0) { \n $ERROR('#811: 1023 >> 25 === 0. Actual: ' + (1023 >> 25)); \n} \n\n\nif (2047 >> 25 !== 0) { \n $ERROR('#812: 2047 >> 25 === 0. Actual: ' + (2047 >> 25)); \n} \n\n\nif (4095 >> 25 !== 0) { \n $ERROR('#813: 4095 >> 25 === 0. Actual: ' + (4095 >> 25)); \n} \n\n\nif (8191 >> 25 !== 0) { \n $ERROR('#814: 8191 >> 25 === 0. Actual: ' + (8191 >> 25)); \n} \n\n\nif (16383 >> 25 !== 0) { \n $ERROR('#815: 16383 >> 25 === 0. Actual: ' + (16383 >> 25)); \n} \n\n\nif (32767 >> 25 !== 0) { \n $ERROR('#816: 32767 >> 25 === 0. Actual: ' + (32767 >> 25)); \n} \n\n\nif (65535 >> 25 !== 0) { \n $ERROR('#817: 65535 >> 25 === 0. Actual: ' + (65535 >> 25)); \n} \n\n\nif (131071 >> 25 !== 0) { \n $ERROR('#818: 131071 >> 25 === 0. Actual: ' + (131071 >> 25)); \n} \n\n\nif (262143 >> 25 !== 0) { \n $ERROR('#819: 262143 >> 25 === 0. Actual: ' + (262143 >> 25)); \n} \n\n\nif (524287 >> 25 !== 0) { \n $ERROR('#820: 524287 >> 25 === 0. Actual: ' + (524287 >> 25)); \n} \n\n\nif (1048575 >> 25 !== 0) { \n $ERROR('#821: 1048575 >> 25 === 0. Actual: ' + (1048575 >> 25)); \n} \n\n\nif (2097151 >> 25 !== 0) { \n $ERROR('#822: 2097151 >> 25 === 0. Actual: ' + (2097151 >> 25)); \n} \n\n\nif (4194303 >> 25 !== 0) { \n $ERROR('#823: 4194303 >> 25 === 0. Actual: ' + (4194303 >> 25)); \n} \n\n\nif (8388607 >> 25 !== 0) { \n $ERROR('#824: 8388607 >> 25 === 0. Actual: ' + (8388607 >> 25)); \n} \n\n\nif (16777215 >> 25 !== 0) { \n $ERROR('#825: 16777215 >> 25 === 0. Actual: ' + (16777215 >> 25)); \n} \n\n\nif (33554431 >> 25 !== 0) { \n $ERROR('#826: 33554431 >> 25 === 0. Actual: ' + (33554431 >> 25)); \n} \n\n\nif (67108863 >> 25 !== 1) { \n $ERROR('#827: 67108863 >> 25 === 1. Actual: ' + (67108863 >> 25)); \n} \n\n\nif (134217727 >> 25 !== 3) { \n $ERROR('#828: 134217727 >> 25 === 3. Actual: ' + (134217727 >> 25)); \n} \n\n\nif (268435455 >> 25 !== 7) { \n $ERROR('#829: 268435455 >> 25 === 7. Actual: ' + (268435455 >> 25)); \n} \n\n\nif (536870911 >> 25 !== 15) { \n $ERROR('#830: 536870911 >> 25 === 15. Actual: ' + (536870911 >> 25)); \n} \n\n\nif (1073741823 >> 25 !== 31) { \n $ERROR('#831: 1073741823 >> 25 === 31. Actual: ' + (1073741823 >> 25)); \n} \n\n\nif (2147483647 >> 25 !== 63) { \n $ERROR('#832: 2147483647 >> 25 === 63. Actual: ' + (2147483647 >> 25)); \n} \n\n\nif (0 >> 26 !== 0) { \n $ERROR('#833: 0 >> 26 === 0. Actual: ' + (0 >> 26)); \n} \n\n\nif (1 >> 26 !== 0) { \n $ERROR('#834: 1 >> 26 === 0. Actual: ' + (1 >> 26)); \n} \n\n\nif (3 >> 26 !== 0) { \n $ERROR('#835: 3 >> 26 === 0. Actual: ' + (3 >> 26)); \n} \n\n\nif (7 >> 26 !== 0) { \n $ERROR('#836: 7 >> 26 === 0. Actual: ' + (7 >> 26)); \n} \n\n\nif (15 >> 26 !== 0) { \n $ERROR('#837: 15 >> 26 === 0. Actual: ' + (15 >> 26)); \n} \n\n\nif (31 >> 26 !== 0) { \n $ERROR('#838: 31 >> 26 === 0. Actual: ' + (31 >> 26)); \n} \n\n\nif (63 >> 26 !== 0) { \n $ERROR('#839: 63 >> 26 === 0. Actual: ' + (63 >> 26)); \n} \n\n\nif (127 >> 26 !== 0) { \n $ERROR('#840: 127 >> 26 === 0. Actual: ' + (127 >> 26)); \n} \n\n\nif (255 >> 26 !== 0) { \n $ERROR('#841: 255 >> 26 === 0. Actual: ' + (255 >> 26)); \n} \n\n\nif (511 >> 26 !== 0) { \n $ERROR('#842: 511 >> 26 === 0. Actual: ' + (511 >> 26)); \n} \n\n\nif (1023 >> 26 !== 0) { \n $ERROR('#843: 1023 >> 26 === 0. Actual: ' + (1023 >> 26)); \n} \n\n\nif (2047 >> 26 !== 0) { \n $ERROR('#844: 2047 >> 26 === 0. Actual: ' + (2047 >> 26)); \n} \n\n\nif (4095 >> 26 !== 0) { \n $ERROR('#845: 4095 >> 26 === 0. Actual: ' + (4095 >> 26)); \n} \n\n\nif (8191 >> 26 !== 0) { \n $ERROR('#846: 8191 >> 26 === 0. Actual: ' + (8191 >> 26)); \n} \n\n\nif (16383 >> 26 !== 0) { \n $ERROR('#847: 16383 >> 26 === 0. Actual: ' + (16383 >> 26)); \n} \n\n\nif (32767 >> 26 !== 0) { \n $ERROR('#848: 32767 >> 26 === 0. Actual: ' + (32767 >> 26)); \n} \n\n\nif (65535 >> 26 !== 0) { \n $ERROR('#849: 65535 >> 26 === 0. Actual: ' + (65535 >> 26)); \n} \n\n\nif (131071 >> 26 !== 0) { \n $ERROR('#850: 131071 >> 26 === 0. Actual: ' + (131071 >> 26)); \n} \n\n\nif (262143 >> 26 !== 0) { \n $ERROR('#851: 262143 >> 26 === 0. Actual: ' + (262143 >> 26)); \n} \n\n\nif (524287 >> 26 !== 0) { \n $ERROR('#852: 524287 >> 26 === 0. Actual: ' + (524287 >> 26)); \n} \n\n\nif (1048575 >> 26 !== 0) { \n $ERROR('#853: 1048575 >> 26 === 0. Actual: ' + (1048575 >> 26)); \n} \n\n\nif (2097151 >> 26 !== 0) { \n $ERROR('#854: 2097151 >> 26 === 0. Actual: ' + (2097151 >> 26)); \n} \n\n\nif (4194303 >> 26 !== 0) { \n $ERROR('#855: 4194303 >> 26 === 0. Actual: ' + (4194303 >> 26)); \n} \n\n\nif (8388607 >> 26 !== 0) { \n $ERROR('#856: 8388607 >> 26 === 0. Actual: ' + (8388607 >> 26)); \n} \n\n\nif (16777215 >> 26 !== 0) { \n $ERROR('#857: 16777215 >> 26 === 0. Actual: ' + (16777215 >> 26)); \n} \n\n\nif (33554431 >> 26 !== 0) { \n $ERROR('#858: 33554431 >> 26 === 0. Actual: ' + (33554431 >> 26)); \n} \n\n\nif (67108863 >> 26 !== 0) { \n $ERROR('#859: 67108863 >> 26 === 0. Actual: ' + (67108863 >> 26)); \n} \n\n\nif (134217727 >> 26 !== 1) { \n $ERROR('#860: 134217727 >> 26 === 1. Actual: ' + (134217727 >> 26)); \n} \n\n\nif (268435455 >> 26 !== 3) { \n $ERROR('#861: 268435455 >> 26 === 3. Actual: ' + (268435455 >> 26)); \n} \n\n\nif (536870911 >> 26 !== 7) { \n $ERROR('#862: 536870911 >> 26 === 7. Actual: ' + (536870911 >> 26)); \n} \n\n\nif (1073741823 >> 26 !== 15) { \n $ERROR('#863: 1073741823 >> 26 === 15. Actual: ' + (1073741823 >> 26)); \n} \n\n\nif (2147483647 >> 26 !== 31) { \n $ERROR('#864: 2147483647 >> 26 === 31. Actual: ' + (2147483647 >> 26)); \n} \n\n\nif (0 >> 27 !== 0) { \n $ERROR('#865: 0 >> 27 === 0. Actual: ' + (0 >> 27)); \n} \n\n\nif (1 >> 27 !== 0) { \n $ERROR('#866: 1 >> 27 === 0. Actual: ' + (1 >> 27)); \n} \n\n\nif (3 >> 27 !== 0) { \n $ERROR('#867: 3 >> 27 === 0. Actual: ' + (3 >> 27)); \n} \n\n\nif (7 >> 27 !== 0) { \n $ERROR('#868: 7 >> 27 === 0. Actual: ' + (7 >> 27)); \n} \n\n\nif (15 >> 27 !== 0) { \n $ERROR('#869: 15 >> 27 === 0. Actual: ' + (15 >> 27)); \n} \n\n\nif (31 >> 27 !== 0) { \n $ERROR('#870: 31 >> 27 === 0. Actual: ' + (31 >> 27)); \n} \n\n\nif (63 >> 27 !== 0) { \n $ERROR('#871: 63 >> 27 === 0. Actual: ' + (63 >> 27)); \n} \n\n\nif (127 >> 27 !== 0) { \n $ERROR('#872: 127 >> 27 === 0. Actual: ' + (127 >> 27)); \n} \n\n\nif (255 >> 27 !== 0) { \n $ERROR('#873: 255 >> 27 === 0. Actual: ' + (255 >> 27)); \n} \n\n\nif (511 >> 27 !== 0) { \n $ERROR('#874: 511 >> 27 === 0. Actual: ' + (511 >> 27)); \n} \n\n\nif (1023 >> 27 !== 0) { \n $ERROR('#875: 1023 >> 27 === 0. Actual: ' + (1023 >> 27)); \n} \n\n\nif (2047 >> 27 !== 0) { \n $ERROR('#876: 2047 >> 27 === 0. Actual: ' + (2047 >> 27)); \n} \n\n\nif (4095 >> 27 !== 0) { \n $ERROR('#877: 4095 >> 27 === 0. Actual: ' + (4095 >> 27)); \n} \n\n\nif (8191 >> 27 !== 0) { \n $ERROR('#878: 8191 >> 27 === 0. Actual: ' + (8191 >> 27)); \n} \n\n\nif (16383 >> 27 !== 0) { \n $ERROR('#879: 16383 >> 27 === 0. Actual: ' + (16383 >> 27)); \n} \n\n\nif (32767 >> 27 !== 0) { \n $ERROR('#880: 32767 >> 27 === 0. Actual: ' + (32767 >> 27)); \n} \n\n\nif (65535 >> 27 !== 0) { \n $ERROR('#881: 65535 >> 27 === 0. Actual: ' + (65535 >> 27)); \n} \n\n\nif (131071 >> 27 !== 0) { \n $ERROR('#882: 131071 >> 27 === 0. Actual: ' + (131071 >> 27)); \n} \n\n\nif (262143 >> 27 !== 0) { \n $ERROR('#883: 262143 >> 27 === 0. Actual: ' + (262143 >> 27)); \n} \n\n\nif (524287 >> 27 !== 0) { \n $ERROR('#884: 524287 >> 27 === 0. Actual: ' + (524287 >> 27)); \n} \n\n\nif (1048575 >> 27 !== 0) { \n $ERROR('#885: 1048575 >> 27 === 0. Actual: ' + (1048575 >> 27)); \n} \n\n\nif (2097151 >> 27 !== 0) { \n $ERROR('#886: 2097151 >> 27 === 0. Actual: ' + (2097151 >> 27)); \n} \n\n\nif (4194303 >> 27 !== 0) { \n $ERROR('#887: 4194303 >> 27 === 0. Actual: ' + (4194303 >> 27)); \n} \n\n\nif (8388607 >> 27 !== 0) { \n $ERROR('#888: 8388607 >> 27 === 0. Actual: ' + (8388607 >> 27)); \n} \n\n\nif (16777215 >> 27 !== 0) { \n $ERROR('#889: 16777215 >> 27 === 0. Actual: ' + (16777215 >> 27)); \n} \n\n\nif (33554431 >> 27 !== 0) { \n $ERROR('#890: 33554431 >> 27 === 0. Actual: ' + (33554431 >> 27)); \n} \n\n\nif (67108863 >> 27 !== 0) { \n $ERROR('#891: 67108863 >> 27 === 0. Actual: ' + (67108863 >> 27)); \n} \n\n\nif (134217727 >> 27 !== 0) { \n $ERROR('#892: 134217727 >> 27 === 0. Actual: ' + (134217727 >> 27)); \n} \n\n\nif (268435455 >> 27 !== 1) { \n $ERROR('#893: 268435455 >> 27 === 1. Actual: ' + (268435455 >> 27)); \n} \n\n\nif (536870911 >> 27 !== 3) { \n $ERROR('#894: 536870911 >> 27 === 3. Actual: ' + (536870911 >> 27)); \n} \n\n\nif (1073741823 >> 27 !== 7) { \n $ERROR('#895: 1073741823 >> 27 === 7. Actual: ' + (1073741823 >> 27)); \n} \n\n\nif (2147483647 >> 27 !== 15) { \n $ERROR('#896: 2147483647 >> 27 === 15. Actual: ' + (2147483647 >> 27)); \n} \n\n\nif (0 >> 28 !== 0) { \n $ERROR('#897: 0 >> 28 === 0. Actual: ' + (0 >> 28)); \n} \n\n\nif (1 >> 28 !== 0) { \n $ERROR('#898: 1 >> 28 === 0. Actual: ' + (1 >> 28)); \n} \n\n\nif (3 >> 28 !== 0) { \n $ERROR('#899: 3 >> 28 === 0. Actual: ' + (3 >> 28)); \n} \n\n\nif (7 >> 28 !== 0) { \n $ERROR('#900: 7 >> 28 === 0. Actual: ' + (7 >> 28)); \n} \n\n\nif (15 >> 28 !== 0) { \n $ERROR('#901: 15 >> 28 === 0. Actual: ' + (15 >> 28)); \n} \n\n\nif (31 >> 28 !== 0) { \n $ERROR('#902: 31 >> 28 === 0. Actual: ' + (31 >> 28)); \n} \n\n\nif (63 >> 28 !== 0) { \n $ERROR('#903: 63 >> 28 === 0. Actual: ' + (63 >> 28)); \n} \n\n\nif (127 >> 28 !== 0) { \n $ERROR('#904: 127 >> 28 === 0. Actual: ' + (127 >> 28)); \n} \n\n\nif (255 >> 28 !== 0) { \n $ERROR('#905: 255 >> 28 === 0. Actual: ' + (255 >> 28)); \n} \n\n\nif (511 >> 28 !== 0) { \n $ERROR('#906: 511 >> 28 === 0. Actual: ' + (511 >> 28)); \n} \n\n\nif (1023 >> 28 !== 0) { \n $ERROR('#907: 1023 >> 28 === 0. Actual: ' + (1023 >> 28)); \n} \n\n\nif (2047 >> 28 !== 0) { \n $ERROR('#908: 2047 >> 28 === 0. Actual: ' + (2047 >> 28)); \n} \n\n\nif (4095 >> 28 !== 0) { \n $ERROR('#909: 4095 >> 28 === 0. Actual: ' + (4095 >> 28)); \n} \n\n\nif (8191 >> 28 !== 0) { \n $ERROR('#910: 8191 >> 28 === 0. Actual: ' + (8191 >> 28)); \n} \n\n\nif (16383 >> 28 !== 0) { \n $ERROR('#911: 16383 >> 28 === 0. Actual: ' + (16383 >> 28)); \n} \n\n\nif (32767 >> 28 !== 0) { \n $ERROR('#912: 32767 >> 28 === 0. Actual: ' + (32767 >> 28)); \n} \n\n\nif (65535 >> 28 !== 0) { \n $ERROR('#913: 65535 >> 28 === 0. Actual: ' + (65535 >> 28)); \n} \n\n\nif (131071 >> 28 !== 0) { \n $ERROR('#914: 131071 >> 28 === 0. Actual: ' + (131071 >> 28)); \n} \n\n\nif (262143 >> 28 !== 0) { \n $ERROR('#915: 262143 >> 28 === 0. Actual: ' + (262143 >> 28)); \n} \n\n\nif (524287 >> 28 !== 0) { \n $ERROR('#916: 524287 >> 28 === 0. Actual: ' + (524287 >> 28)); \n} \n\n\nif (1048575 >> 28 !== 0) { \n $ERROR('#917: 1048575 >> 28 === 0. Actual: ' + (1048575 >> 28)); \n} \n\n\nif (2097151 >> 28 !== 0) { \n $ERROR('#918: 2097151 >> 28 === 0. Actual: ' + (2097151 >> 28)); \n} \n\n\nif (4194303 >> 28 !== 0) { \n $ERROR('#919: 4194303 >> 28 === 0. Actual: ' + (4194303 >> 28)); \n} \n\n\nif (8388607 >> 28 !== 0) { \n $ERROR('#920: 8388607 >> 28 === 0. Actual: ' + (8388607 >> 28)); \n} \n\n\nif (16777215 >> 28 !== 0) { \n $ERROR('#921: 16777215 >> 28 === 0. Actual: ' + (16777215 >> 28)); \n} \n\n\nif (33554431 >> 28 !== 0) { \n $ERROR('#922: 33554431 >> 28 === 0. Actual: ' + (33554431 >> 28)); \n} \n\n\nif (67108863 >> 28 !== 0) { \n $ERROR('#923: 67108863 >> 28 === 0. Actual: ' + (67108863 >> 28)); \n} \n\n\nif (134217727 >> 28 !== 0) { \n $ERROR('#924: 134217727 >> 28 === 0. Actual: ' + (134217727 >> 28)); \n} \n\n\nif (268435455 >> 28 !== 0) { \n $ERROR('#925: 268435455 >> 28 === 0. Actual: ' + (268435455 >> 28)); \n} \n\n\nif (536870911 >> 28 !== 1) { \n $ERROR('#926: 536870911 >> 28 === 1. Actual: ' + (536870911 >> 28)); \n} \n\n\nif (1073741823 >> 28 !== 3) { \n $ERROR('#927: 1073741823 >> 28 === 3. Actual: ' + (1073741823 >> 28)); \n} \n\n\nif (2147483647 >> 28 !== 7) { \n $ERROR('#928: 2147483647 >> 28 === 7. Actual: ' + (2147483647 >> 28)); \n} \n\n\nif (0 >> 29 !== 0) { \n $ERROR('#929: 0 >> 29 === 0. Actual: ' + (0 >> 29)); \n} \n\n\nif (1 >> 29 !== 0) { \n $ERROR('#930: 1 >> 29 === 0. Actual: ' + (1 >> 29)); \n} \n\n\nif (3 >> 29 !== 0) { \n $ERROR('#931: 3 >> 29 === 0. Actual: ' + (3 >> 29)); \n} \n\n\nif (7 >> 29 !== 0) { \n $ERROR('#932: 7 >> 29 === 0. Actual: ' + (7 >> 29)); \n} \n\n\nif (15 >> 29 !== 0) { \n $ERROR('#933: 15 >> 29 === 0. Actual: ' + (15 >> 29)); \n} \n\n\nif (31 >> 29 !== 0) { \n $ERROR('#934: 31 >> 29 === 0. Actual: ' + (31 >> 29)); \n} \n\n\nif (63 >> 29 !== 0) { \n $ERROR('#935: 63 >> 29 === 0. Actual: ' + (63 >> 29)); \n} \n\n\nif (127 >> 29 !== 0) { \n $ERROR('#936: 127 >> 29 === 0. Actual: ' + (127 >> 29)); \n} \n\n\nif (255 >> 29 !== 0) { \n $ERROR('#937: 255 >> 29 === 0. Actual: ' + (255 >> 29)); \n} \n\n\nif (511 >> 29 !== 0) { \n $ERROR('#938: 511 >> 29 === 0. Actual: ' + (511 >> 29)); \n} \n\n\nif (1023 >> 29 !== 0) { \n $ERROR('#939: 1023 >> 29 === 0. Actual: ' + (1023 >> 29)); \n} \n\n\nif (2047 >> 29 !== 0) { \n $ERROR('#940: 2047 >> 29 === 0. Actual: ' + (2047 >> 29)); \n} \n\n\nif (4095 >> 29 !== 0) { \n $ERROR('#941: 4095 >> 29 === 0. Actual: ' + (4095 >> 29)); \n} \n\n\nif (8191 >> 29 !== 0) { \n $ERROR('#942: 8191 >> 29 === 0. Actual: ' + (8191 >> 29)); \n} \n\n\nif (16383 >> 29 !== 0) { \n $ERROR('#943: 16383 >> 29 === 0. Actual: ' + (16383 >> 29)); \n} \n\n\nif (32767 >> 29 !== 0) { \n $ERROR('#944: 32767 >> 29 === 0. Actual: ' + (32767 >> 29)); \n} \n\n\nif (65535 >> 29 !== 0) { \n $ERROR('#945: 65535 >> 29 === 0. Actual: ' + (65535 >> 29)); \n} \n\n\nif (131071 >> 29 !== 0) { \n $ERROR('#946: 131071 >> 29 === 0. Actual: ' + (131071 >> 29)); \n} \n\n\nif (262143 >> 29 !== 0) { \n $ERROR('#947: 262143 >> 29 === 0. Actual: ' + (262143 >> 29)); \n} \n\n\nif (524287 >> 29 !== 0) { \n $ERROR('#948: 524287 >> 29 === 0. Actual: ' + (524287 >> 29)); \n} \n\n\nif (1048575 >> 29 !== 0) { \n $ERROR('#949: 1048575 >> 29 === 0. Actual: ' + (1048575 >> 29)); \n} \n\n\nif (2097151 >> 29 !== 0) { \n $ERROR('#950: 2097151 >> 29 === 0. Actual: ' + (2097151 >> 29)); \n} \n\n\nif (4194303 >> 29 !== 0) { \n $ERROR('#951: 4194303 >> 29 === 0. Actual: ' + (4194303 >> 29)); \n} \n\n\nif (8388607 >> 29 !== 0) { \n $ERROR('#952: 8388607 >> 29 === 0. Actual: ' + (8388607 >> 29)); \n} \n\n\nif (16777215 >> 29 !== 0) { \n $ERROR('#953: 16777215 >> 29 === 0. Actual: ' + (16777215 >> 29)); \n} \n\n\nif (33554431 >> 29 !== 0) { \n $ERROR('#954: 33554431 >> 29 === 0. Actual: ' + (33554431 >> 29)); \n} \n\n\nif (67108863 >> 29 !== 0) { \n $ERROR('#955: 67108863 >> 29 === 0. Actual: ' + (67108863 >> 29)); \n} \n\n\nif (134217727 >> 29 !== 0) { \n $ERROR('#956: 134217727 >> 29 === 0. Actual: ' + (134217727 >> 29)); \n} \n\n\nif (268435455 >> 29 !== 0) { \n $ERROR('#957: 268435455 >> 29 === 0. Actual: ' + (268435455 >> 29)); \n} \n\n\nif (536870911 >> 29 !== 0) { \n $ERROR('#958: 536870911 >> 29 === 0. Actual: ' + (536870911 >> 29)); \n} \n\n\nif (1073741823 >> 29 !== 1) { \n $ERROR('#959: 1073741823 >> 29 === 1. Actual: ' + (1073741823 >> 29)); \n} \n\n\nif (2147483647 >> 29 !== 3) { \n $ERROR('#960: 2147483647 >> 29 === 3. Actual: ' + (2147483647 >> 29)); \n} \n\n\nif (0 >> 30 !== 0) { \n $ERROR('#961: 0 >> 30 === 0. Actual: ' + (0 >> 30)); \n} \n\n\nif (1 >> 30 !== 0) { \n $ERROR('#962: 1 >> 30 === 0. Actual: ' + (1 >> 30)); \n} \n\n\nif (3 >> 30 !== 0) { \n $ERROR('#963: 3 >> 30 === 0. Actual: ' + (3 >> 30)); \n} \n\n\nif (7 >> 30 !== 0) { \n $ERROR('#964: 7 >> 30 === 0. Actual: ' + (7 >> 30)); \n} \n\n\nif (15 >> 30 !== 0) { \n $ERROR('#965: 15 >> 30 === 0. Actual: ' + (15 >> 30)); \n} \n\n\nif (31 >> 30 !== 0) { \n $ERROR('#966: 31 >> 30 === 0. Actual: ' + (31 >> 30)); \n} \n\n\nif (63 >> 30 !== 0) { \n $ERROR('#967: 63 >> 30 === 0. Actual: ' + (63 >> 30)); \n} \n\n\nif (127 >> 30 !== 0) { \n $ERROR('#968: 127 >> 30 === 0. Actual: ' + (127 >> 30)); \n} \n\n\nif (255 >> 30 !== 0) { \n $ERROR('#969: 255 >> 30 === 0. Actual: ' + (255 >> 30)); \n} \n\n\nif (511 >> 30 !== 0) { \n $ERROR('#970: 511 >> 30 === 0. Actual: ' + (511 >> 30)); \n} \n\n\nif (1023 >> 30 !== 0) { \n $ERROR('#971: 1023 >> 30 === 0. Actual: ' + (1023 >> 30)); \n} \n\n\nif (2047 >> 30 !== 0) { \n $ERROR('#972: 2047 >> 30 === 0. Actual: ' + (2047 >> 30)); \n} \n\n\nif (4095 >> 30 !== 0) { \n $ERROR('#973: 4095 >> 30 === 0. Actual: ' + (4095 >> 30)); \n} \n\n\nif (8191 >> 30 !== 0) { \n $ERROR('#974: 8191 >> 30 === 0. Actual: ' + (8191 >> 30)); \n} \n\n\nif (16383 >> 30 !== 0) { \n $ERROR('#975: 16383 >> 30 === 0. Actual: ' + (16383 >> 30)); \n} \n\n\nif (32767 >> 30 !== 0) { \n $ERROR('#976: 32767 >> 30 === 0. Actual: ' + (32767 >> 30)); \n} \n\n\nif (65535 >> 30 !== 0) { \n $ERROR('#977: 65535 >> 30 === 0. Actual: ' + (65535 >> 30)); \n} \n\n\nif (131071 >> 30 !== 0) { \n $ERROR('#978: 131071 >> 30 === 0. Actual: ' + (131071 >> 30)); \n} \n\n\nif (262143 >> 30 !== 0) { \n $ERROR('#979: 262143 >> 30 === 0. Actual: ' + (262143 >> 30)); \n} \n\n\nif (524287 >> 30 !== 0) { \n $ERROR('#980: 524287 >> 30 === 0. Actual: ' + (524287 >> 30)); \n} \n\n\nif (1048575 >> 30 !== 0) { \n $ERROR('#981: 1048575 >> 30 === 0. Actual: ' + (1048575 >> 30)); \n} \n\n\nif (2097151 >> 30 !== 0) { \n $ERROR('#982: 2097151 >> 30 === 0. Actual: ' + (2097151 >> 30)); \n} \n\n\nif (4194303 >> 30 !== 0) { \n $ERROR('#983: 4194303 >> 30 === 0. Actual: ' + (4194303 >> 30)); \n} \n\n\nif (8388607 >> 30 !== 0) { \n $ERROR('#984: 8388607 >> 30 === 0. Actual: ' + (8388607 >> 30)); \n} \n\n\nif (16777215 >> 30 !== 0) { \n $ERROR('#985: 16777215 >> 30 === 0. Actual: ' + (16777215 >> 30)); \n} \n\n\nif (33554431 >> 30 !== 0) { \n $ERROR('#986: 33554431 >> 30 === 0. Actual: ' + (33554431 >> 30)); \n} \n\n\nif (67108863 >> 30 !== 0) { \n $ERROR('#987: 67108863 >> 30 === 0. Actual: ' + (67108863 >> 30)); \n} \n\n\nif (134217727 >> 30 !== 0) { \n $ERROR('#988: 134217727 >> 30 === 0. Actual: ' + (134217727 >> 30)); \n} \n\n\nif (268435455 >> 30 !== 0) { \n $ERROR('#989: 268435455 >> 30 === 0. Actual: ' + (268435455 >> 30)); \n} \n\n\nif (536870911 >> 30 !== 0) { \n $ERROR('#990: 536870911 >> 30 === 0. Actual: ' + (536870911 >> 30)); \n} \n\n\nif (1073741823 >> 30 !== 0) { \n $ERROR('#991: 1073741823 >> 30 === 0. Actual: ' + (1073741823 >> 30)); \n} \n\n\nif (2147483647 >> 30 !== 1) { \n $ERROR('#992: 2147483647 >> 30 === 1. Actual: ' + (2147483647 >> 30)); \n} \n\n\nif (0 >> 31 !== 0) { \n $ERROR('#993: 0 >> 31 === 0. Actual: ' + (0 >> 31)); \n} \n\n\nif (1 >> 31 !== 0) { \n $ERROR('#994: 1 >> 31 === 0. Actual: ' + (1 >> 31)); \n} \n\n\nif (3 >> 31 !== 0) { \n $ERROR('#995: 3 >> 31 === 0. Actual: ' + (3 >> 31)); \n} \n\n\nif (7 >> 31 !== 0) { \n $ERROR('#996: 7 >> 31 === 0. Actual: ' + (7 >> 31)); \n} \n\n\nif (15 >> 31 !== 0) { \n $ERROR('#997: 15 >> 31 === 0. Actual: ' + (15 >> 31)); \n} \n\n\nif (31 >> 31 !== 0) { \n $ERROR('#998: 31 >> 31 === 0. Actual: ' + (31 >> 31)); \n} \n\n\nif (63 >> 31 !== 0) { \n $ERROR('#999: 63 >> 31 === 0. Actual: ' + (63 >> 31)); \n} \n\n\nif (127 >> 31 !== 0) { \n $ERROR('#1000: 127 >> 31 === 0. Actual: ' + (127 >> 31)); \n} \n\n\nif (255 >> 31 !== 0) { \n $ERROR('#1001: 255 >> 31 === 0. Actual: ' + (255 >> 31)); \n} \n\n\nif (511 >> 31 !== 0) { \n $ERROR('#1002: 511 >> 31 === 0. Actual: ' + (511 >> 31)); \n} \n\n\nif (1023 >> 31 !== 0) { \n $ERROR('#1003: 1023 >> 31 === 0. Actual: ' + (1023 >> 31)); \n} \n\n\nif (2047 >> 31 !== 0) { \n $ERROR('#1004: 2047 >> 31 === 0. Actual: ' + (2047 >> 31)); \n} \n\n\nif (4095 >> 31 !== 0) { \n $ERROR('#1005: 4095 >> 31 === 0. Actual: ' + (4095 >> 31)); \n} \n\n\nif (8191 >> 31 !== 0) { \n $ERROR('#1006: 8191 >> 31 === 0. Actual: ' + (8191 >> 31)); \n} \n\n\nif (16383 >> 31 !== 0) { \n $ERROR('#1007: 16383 >> 31 === 0. Actual: ' + (16383 >> 31)); \n} \n\n\nif (32767 >> 31 !== 0) { \n $ERROR('#1008: 32767 >> 31 === 0. Actual: ' + (32767 >> 31)); \n} \n\n\nif (65535 >> 31 !== 0) { \n $ERROR('#1009: 65535 >> 31 === 0. Actual: ' + (65535 >> 31)); \n} \n\n\nif (131071 >> 31 !== 0) { \n $ERROR('#1010: 131071 >> 31 === 0. Actual: ' + (131071 >> 31)); \n} \n\n\nif (262143 >> 31 !== 0) { \n $ERROR('#1011: 262143 >> 31 === 0. Actual: ' + (262143 >> 31)); \n} \n\n\nif (524287 >> 31 !== 0) { \n $ERROR('#1012: 524287 >> 31 === 0. Actual: ' + (524287 >> 31)); \n} \n\n\nif (1048575 >> 31 !== 0) { \n $ERROR('#1013: 1048575 >> 31 === 0. Actual: ' + (1048575 >> 31)); \n} \n\n\nif (2097151 >> 31 !== 0) { \n $ERROR('#1014: 2097151 >> 31 === 0. Actual: ' + (2097151 >> 31)); \n} \n\n\nif (4194303 >> 31 !== 0) { \n $ERROR('#1015: 4194303 >> 31 === 0. Actual: ' + (4194303 >> 31)); \n} \n\n\nif (8388607 >> 31 !== 0) { \n $ERROR('#1016: 8388607 >> 31 === 0. Actual: ' + (8388607 >> 31)); \n} \n\n\nif (16777215 >> 31 !== 0) { \n $ERROR('#1017: 16777215 >> 31 === 0. Actual: ' + (16777215 >> 31)); \n} \n\n\nif (33554431 >> 31 !== 0) { \n $ERROR('#1018: 33554431 >> 31 === 0. Actual: ' + (33554431 >> 31)); \n} \n\n\nif (67108863 >> 31 !== 0) { \n $ERROR('#1019: 67108863 >> 31 === 0. Actual: ' + (67108863 >> 31)); \n} \n\n\nif (134217727 >> 31 !== 0) { \n $ERROR('#1020: 134217727 >> 31 === 0. Actual: ' + (134217727 >> 31)); \n} \n\n\nif (268435455 >> 31 !== 0) { \n $ERROR('#1021: 268435455 >> 31 === 0. Actual: ' + (268435455 >> 31)); \n} \n\n\nif (536870911 >> 31 !== 0) { \n $ERROR('#1022: 536870911 >> 31 === 0. Actual: ' + (536870911 >> 31)); \n} \n\n\nif (1073741823 >> 31 !== 0) { \n $ERROR('#1023: 1073741823 >> 31 === 0. Actual: ' + (1073741823 >> 31)); \n} \n",
+ "id": "S11.7.2_A4_T4"
+ },
+ {
+ "section": "11.7.2, 9.5",
+ "description": "Checking boundary points",
+ "test": "//CHECK#1\nif (2147483648.1 >> 0 !== -2147483648) { \n $ERROR('#1: 2147483648.1 >> 0 === -2147483648. Actual: ' + (2147483648.1 >> 0)); \n} \n\n//CHECK#2\nif (4294967296.1 >> 0 !== 0) { \n $ERROR('#2: 4294967296.1 >> 0 === 0. Actual: ' + (4294967296.1 >> 0)); \n} \n\n//CHECK#3\nif (6442450944.1 >> 0 !== -2147483648) { \n $ERROR('#3: 6442450944.1 >> 0 === -2147483648. Actual: ' + (6442450944.1 >> 0)); \n} \n\n//CHECK#4\nif (4294967295.1 >> 0 !== -1) { \n $ERROR('#4: 4294967295.1 >> 0 === -1. Actual: ' + (4294967295.1 >> 0)); \n} \n\n//CHECK#5\nif (6442450943.1 >> 0 !== 2147483647) { \n $ERROR('#5: 6442450943.1 >> 0 === 2147483647. Actual: ' + (6442450943.1 >> 0)); \n} \n\n//CHECK#6\nif (-2147483649.1 >> 0 !== 2147483647) { \n $ERROR('#6: -2147483649.1 >> 0 === 2147483647. Actual: ' + (-2147483649.1 >> 0)); \n} \n\n//CHECK#7\nif (-4294967297.1 >> 0 !== -1) { \n $ERROR('#7: -4294967297.1 >> 0 === -1. Actual: ' + (-4294967297.1 >> 0)); \n} \n\n//CHECK#8\nif (-6442450945.1 >> 0 !== 2147483647) { \n $ERROR('#8: -6442450945.1 >> 0 === 2147483647. Actual: ' + (-6442450945.1 >> 0)); \n} \n\n//CHECK#9\nif (-4294967296.1 >> 0 !== 0) { \n $ERROR('#9: -4294967296.1 >> 0 === 0 . Actual: ' + (-4294967296.1 >> 0)); \n} \n\n//CHECK#10\nif (-6442450944.1 >> 0 !== -2147483648) { \n $ERROR('#10: -6442450944.1 >> 0 === -2147483648. Actual: ' + (-6442450944.1 >> 0)); \n} \n",
+ "id": "S11.7.2_A5.1_T1"
+ },
+ {
+ "section": "11.7.2, 9.5",
+ "description": "Checking distinct points",
+ "test": "//CHECK#1\nif (2147483647 >> -32.1 !== 2147483647) { \n $ERROR('#1: 2147483647 >> -32.1 === 2147483647. Actual: ' + (2147483647 >> -32.1)); \n} \n\n//CHECK#2\nif (2147483647 >> -31.1 !== 1073741823) { \n $ERROR('#2: 2147483647 >> -31.1 === 1073741823. Actual: ' + (2147483647 >> -31.1)); \n} \n\n//CHECK#3\nif (2147483647 >> -30.1 !== 536870911) { \n $ERROR('#3: 2147483647 >> -30.1 === 536870911. Actual: ' + (2147483647 >> -30.1)); \n} \n\n//CHECK#4\nif (2147483647 >> -29.1 !== 268435455) { \n $ERROR('#4: 2147483647 >> -29.1 === 268435455. Actual: ' + (2147483647 >> -29.1)); \n} \n\n//CHECK#5\nif (2147483647 >> -28.1 !== 134217727) { \n $ERROR('#5: 2147483647 >> -28.1 === 134217727. Actual: ' + (2147483647 >> -28.1)); \n} \n\n//CHECK#6\nif (2147483647 >> -27.1 !== 67108863) { \n $ERROR('#6: 2147483647 >> -27.1 === 67108863. Actual: ' + (2147483647 >> -27.1)); \n} \n\n//CHECK#7\nif (2147483647 >> -26.1 !== 33554431) { \n $ERROR('#7: 2147483647 >> -26.1 === 33554431. Actual: ' + (2147483647 >> -26.1)); \n} \n\n//CHECK#8\nif (2147483647 >> -25.1 !== 16777215) { \n $ERROR('#8: 2147483647 >> -25.1 === 16777215. Actual: ' + (2147483647 >> -25.1)); \n} \n\n//CHECK#9\nif (2147483647 >> -24.1 !== 8388607) { \n $ERROR('#9: 2147483647 >> -24.1 === 8388607. Actual: ' + (2147483647 >> -24.1)); \n} \n\n//CHECK#10\nif (2147483647 >> -23.1 !== 4194303) { \n $ERROR('#10: 2147483647 >> -23.1 === 4194303. Actual: ' + (2147483647 >> -23.1)); \n} \n\n//CHECK#11\nif (2147483647 >> -22.1 !== 2097151) { \n $ERROR('#11: 2147483647 >> -22.1 === 2097151. Actual: ' + (2147483647 >> -22.1)); \n} \n\n//CHECK#12\nif (2147483647 >> -21.1 !== 1048575) { \n $ERROR('#12: 2147483647 >> -21.1 === 1048575. Actual: ' + (2147483647 >> -21.1)); \n} \n\n//CHECK#13\nif (2147483647 >> -20.1 !== 524287) { \n $ERROR('#13: 2147483647 >> -20.1 === 524287. Actual: ' + (2147483647 >> -20.1)); \n} \n\n//CHECK#14\nif (2147483647 >> -19.1 !== 262143) { \n $ERROR('#14: 2147483647 >> -19.1 === 262143. Actual: ' + (2147483647 >> -19.1)); \n} \n\n//CHECK#15\nif (2147483647 >> -18.1 !== 131071) { \n $ERROR('#15: 2147483647 >> -18.1 === 131071. Actual: ' + (2147483647 >> -18.1)); \n} \n\n//CHECK#16\nif (2147483647 >> -17.1 !== 65535) { \n $ERROR('#16: 2147483647 >> -17.1 === 65535. Actual: ' + (2147483647 >> -17.1)); \n} \n\n//CHECK#17\nif (2147483647 >> -16.1 !== 32767) { \n $ERROR('#17: 2147483647 >> -16.1 === 32767. Actual: ' + (2147483647 >> -16.1)); \n} \n\n//CHECK#18\nif (2147483647 >> -15.1 !== 16383) { \n $ERROR('#18: 2147483647 >> -15.1 === 16383. Actual: ' + (2147483647 >> -15.1)); \n} \n\n//CHECK#19\nif (2147483647 >> -14.1 !== 8191) { \n $ERROR('#19: 2147483647 >> -14.1 === 8191. Actual: ' + (2147483647 >> -14.1)); \n} \n\n//CHECK#20\nif (2147483647 >> -13.1 !== 4095) { \n $ERROR('#20: 2147483647 >> -13.1 === 4095. Actual: ' + (2147483647 >> -13.1)); \n} \n\n//CHECK#21\nif (2147483647 >> -12.1 !== 2047) { \n $ERROR('#21: 2147483647 >> -12.1 === 2047. Actual: ' + (2147483647 >> -12.1)); \n} \n\n//CHECK#22\nif (2147483647 >> -11.1 !== 1023) { \n $ERROR('#22: 2147483647 >> -11.1 === 1023. Actual: ' + (2147483647 >> -11.1)); \n} \n\n//CHECK#23\nif (2147483647 >> -10.1 !== 511) { \n $ERROR('#23: 2147483647 >> -10.1 === 511. Actual: ' + (2147483647 >> -10.1)); \n} \n\n//CHECK#24\nif (2147483647 >> -9.1 !== 255) { \n $ERROR('#24: 2147483647 >> -9.1 === 255. Actual: ' + (2147483647 >> -9.1)); \n} \n\n//CHECK#25\nif (2147483647 >> -8.1 !== 127) { \n $ERROR('#25: 2147483647 >> -8.1 === 127. Actual: ' + (2147483647 >> -8.1)); \n} \n\n//CHECK#26\nif (2147483647 >> -7.1 !== 63) { \n $ERROR('#26: 2147483647 >> -7.1 === 63. Actual: ' + (2147483647 >> -7.1)); \n} \n\n//CHECK#27\nif (2147483647 >> -6.1 !== 31) { \n $ERROR('#27: 2147483647 >> -6.1 === 31. Actual: ' + (2147483647 >> -6.1)); \n} \n\n//CHECK#28\nif (2147483647 >> -5.1 !== 15) { \n $ERROR('#28: 2147483647 >> -5.1 === 15. Actual: ' + (2147483647 >> -5.1)); \n} \n\n//CHECK#29\nif (2147483647 >> -4.1 !== 7) { \n $ERROR('#29: 2147483647 >> -4.1 === 7. Actual: ' + (2147483647 >> -4.1)); \n} \n\n//CHECK#30\nif (2147483647 >> -3.1 !== 3) { \n $ERROR('#30: 2147483647 >> -3.1 === 3. Actual: ' + (2147483647 >> -3.1)); \n} \n\n//CHECK#31\nif (2147483647 >> -2.1 !== 1) { \n $ERROR('#31: 2147483647 >> -2.1 === 1. Actual: ' + (2147483647 >> -2.1)); \n} \n\n//CHECK#32\nif (2147483647 >> -1.1 !== 0) { \n $ERROR('#32: 2147483647 >> -1.1 === 0. Actual: ' + (2147483647 >> -1.1)); \n} \n\n//CHECK#33\nif (2147483647 >> 32.1 !== 2147483647) { \n $ERROR('#33: 2147483647 >> 32.1 === 2147483647. Actual: ' + (2147483647 >> 32.1)); \n} \n\n//CHECK#34\nif (2147483647 >> 33.1 !== 1073741823) { \n $ERROR('#34: 2147483647 >> 33.1 === 1073741823. Actual: ' + (2147483647 >> 33.1)); \n} \n\n//CHECK#35\nif (2147483647 >> 34.1 !== 536870911) { \n $ERROR('#35: 2147483647 >> 34.1 === 536870911. Actual: ' + (2147483647 >> 34.1)); \n} \n\n//CHECK#36\nif (2147483647 >> 35.1 !== 268435455) { \n $ERROR('#36: 2147483647 >> 35.1 === 268435455. Actual: ' + (2147483647 >> 35.1)); \n} \n\n//CHECK#37\nif (2147483647 >> 36.1 !== 134217727) { \n $ERROR('#37: 2147483647 >> 36.1 === 134217727. Actual: ' + (2147483647 >> 36.1)); \n} \n\n//CHECK#38\nif (2147483647 >> 37.1 !== 67108863) { \n $ERROR('#38: 2147483647 >> 37.1 === 67108863. Actual: ' + (2147483647 >> 37.1)); \n} \n\n//CHECK#39\nif (2147483647 >> 38.1 !== 33554431) { \n $ERROR('#39: 2147483647 >> 38.1 === 33554431. Actual: ' + (2147483647 >> 38.1)); \n} \n\n//CHECK#40\nif (2147483647 >> 39.1 !== 16777215) { \n $ERROR('#40: 2147483647 >> 39.1 === 16777215. Actual: ' + (2147483647 >> 39.1)); \n} \n\n//CHECK#41\nif (2147483647 >> 40.1 !== 8388607) { \n $ERROR('#41: 2147483647 >> 40.1 === 8388607. Actual: ' + (2147483647 >> 40.1)); \n} \n\n//CHECK#42\nif (2147483647 >> 41.1 !== 4194303) { \n $ERROR('#42: 2147483647 >> 41.1 === 4194303. Actual: ' + (2147483647 >> 41.1)); \n} \n\n//CHECK#43\nif (2147483647 >> 42.1 !== 2097151) { \n $ERROR('#43: 2147483647 >> 42.1 === 2097151. Actual: ' + (2147483647 >> 42.1)); \n} \n\n//CHECK#44\nif (2147483647 >> 43.1 !== 1048575) { \n $ERROR('#44: 2147483647 >> 43.1 === 1048575. Actual: ' + (2147483647 >> 43.1)); \n} \n\n//CHECK#45\nif (2147483647 >> 44.1 !== 524287) { \n $ERROR('#45: 2147483647 >> 44.1 === 524287. Actual: ' + (2147483647 >> 44.1)); \n} \n\n//CHECK#46\nif (2147483647 >> 45.1 !== 262143) { \n $ERROR('#46: 2147483647 >> 45.1 === 262143. Actual: ' + (2147483647 >> 45.1)); \n} \n\n//CHECK#47\nif (2147483647 >> 46.1 !== 131071) { \n $ERROR('#47: 2147483647 >> 46.1 === 131071. Actual: ' + (2147483647 >> 46.1)); \n} \n\n//CHECK#48\nif (2147483647 >> 47.1 !== 65535) { \n $ERROR('#48: 2147483647 >> 47.1 === 65535. Actual: ' + (2147483647 >> 47.1)); \n} \n\n//CHECK#49\nif (2147483647 >> 48.1 !== 32767) { \n $ERROR('#49: 2147483647 >> 48.1 === 32767. Actual: ' + (2147483647 >> 48.1)); \n} \n\n//CHECK#50\nif (2147483647 >> 49.1 !== 16383) { \n $ERROR('#50: 2147483647 >> 49.1 === 16383. Actual: ' + (2147483647 >> 49.1)); \n} \n\n//CHECK#51\nif (2147483647 >> 50.1 !== 8191) { \n $ERROR('#51: 2147483647 >> 50.1 === 8191. Actual: ' + (2147483647 >> 50.1)); \n} \n\n//CHECK#52\nif (2147483647 >> 51.1 !== 4095) { \n $ERROR('#52: 2147483647 >> 51.1 === 4095. Actual: ' + (2147483647 >> 51.1)); \n} \n\n//CHECK#53\nif (2147483647 >> 52.1 !== 2047) { \n $ERROR('#53: 2147483647 >> 52.1 === 2047. Actual: ' + (2147483647 >> 52.1)); \n} \n\n//CHECK#54\nif (2147483647 >> 53.1 !== 1023) { \n $ERROR('#54: 2147483647 >> 53.1 === 1023. Actual: ' + (2147483647 >> 53.1)); \n} \n\n//CHECK#55\nif (2147483647 >> 54.1 !== 511) { \n $ERROR('#55: 2147483647 >> 54.1 === 511. Actual: ' + (2147483647 >> 54.1)); \n} \n\n//CHECK#56\nif (2147483647 >> 55.1 !== 255) { \n $ERROR('#56: 2147483647 >> 55.1 === 255. Actual: ' + (2147483647 >> 55.1)); \n} \n\n//CHECK#57\nif (2147483647 >> 56.1 !== 127) { \n $ERROR('#57: 2147483647 >> 56.1 === 127. Actual: ' + (2147483647 >> 56.1)); \n} \n\n//CHECK#58\nif (2147483647 >> 57.1 !== 63) { \n $ERROR('#58: 2147483647 >> 57.1 === 63. Actual: ' + (2147483647 >> 57.1)); \n} \n\n//CHECK#59\nif (2147483647 >> 58.1 !== 31) { \n $ERROR('#59: 2147483647 >> 58.1 === 31. Actual: ' + (2147483647 >> 58.1)); \n} \n\n//CHECK#60\nif (2147483647 >> 59.1 !== 15) { \n $ERROR('#60: 2147483647 >> 59.1 === 15. Actual: ' + (2147483647 >> 59.1)); \n} \n\n//CHECK#61\nif (2147483647 >> 60.1 !== 7) { \n $ERROR('#61: 2147483647 >> 60.1 === 7. Actual: ' + (2147483647 >> 60.1)); \n} \n\n//CHECK#62\nif (2147483647 >> 61.1 !== 3) { \n $ERROR('#62: 2147483647 >> 61.1 === 3. Actual: ' + (2147483647 >> 61.1)); \n} \n\n//CHECK#63\nif (2147483647 >> 62.1 !== 1) { \n $ERROR('#63: 2147483647 >> 62.1 === 1. Actual: ' + (2147483647 >> 62.1)); \n} \n\n//CHECK#64\nif (2147483647 >> 63.1 !== 0) { \n $ERROR('#64: 2147483647 >> 63.1 === 0. Actual: ' + (2147483647 >> 63.1)); \n} \n",
+ "id": "S11.7.2_A5.2_T1"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/11.7.3_The_Unsigned_Right_Shift_Operator.json b/website/resources/scripts/testcases2/11.7.3_The_Unsigned_Right_Shift_Operator.json
new file mode 100644
index 000000000..804be0282
--- /dev/null
+++ b/website/resources/scripts/testcases2/11.7.3_The_Unsigned_Right_Shift_Operator.json
@@ -0,0 +1,182 @@
+{
+ "testCollection": {
+ "name": "11.7.3_The_Unsigned_Right_Shift_Operator",
+ "numTests": 29,
+ "tests": [
+ {
+ "section": "11.7.3, 7.2, 7.3",
+ "description": "Checking by using eval",
+ "test": "//CHECK#1\nif (eval(\"-4\\u0009>>>\\u00091\") !== 2147483646) {\n $ERROR('#1: -4\\\\u0009>>>\\\\u00091 === 2147483646');\n}\n\n//CHECK#2\nif (eval(\"-4\\u000B>>>\\u000B1\") !== 2147483646) {\n $ERROR('#2: -4\\\\u000B>>>\\\\u000B1 === 2147483646'); \n}\n\n//CHECK#3\nif (eval(\"-4\\u000C>>>\\u000C1\") !== 2147483646) {\n $ERROR('#3: -4\\\\u000C>>>\\\\u000C1 === 2147483646');\n}\n\n//CHECK#4\nif (eval(\"-4\\u0020>>>\\u00201\") !== 2147483646) {\n $ERROR('#4: -4\\\\u0020>>>\\\\u00201 === 2147483646');\n}\n\n//CHECK#5\nif (eval(\"-4\\u00A0>>>\\u00A01\") !== 2147483646) {\n $ERROR('#5: -4\\\\u00A0>>>\\\\u00A01 === 2147483646');\n}\n\n//CHECK#6\nif (eval(\"-4\\u000A>>>\\u000A1\") !== 2147483646) {\n $ERROR('#6: -4\\\\u000A>>>\\\\u000A1 === 2147483646'); \n}\n\n//CHECK#7\nif (eval(\"-4\\u000D>>>\\u000D1\") !== 2147483646) {\n $ERROR('#7: -4\\\\u000D>>>\\\\u000D1 === 2147483646');\n}\n\n//CHECK#8\nif (eval(\"-4\\u2028>>>\\u20281\") !== 2147483646) {\n $ERROR('#8: -4\\\\u2028>>>\\\\u20281 === 2147483646');\n}\n\n//CHECK#9\nif (eval(\"-4\\u2029>>>\\u20291\") !== 2147483646) {\n $ERROR('#9: -4\\\\u2029>>>\\\\u20291 === 2147483646');\n}\n\n//CHECK#10\nif (eval(\"-4\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u2029>>>\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u20291\") !== 2147483646) {\n $ERROR('#10: -4\\\\u0009\\\\u000B\\\\u000C\\\\u0020\\\\u00A0\\\\u000A\\\\u000D\\\\u2028\\\\u2029>>>\\\\u0009\\\\u000B\\\\u000C\\\\u0020\\\\u00A0\\\\u000A\\\\u000D\\\\u2028\\\\u20291 === 2147483646');\n}\n",
+ "id": "S11.7.3_A1"
+ },
+ {
+ "section": "11.7.3",
+ "description": "Either Type is not Reference or GetBase is not null",
+ "test": "//CHECK#1\nif (-4 >>> 1 !== 2147483646) {\n $ERROR('#1: -4 >>> 1 === 2147483646. Actual: ' + (-4 >>> 1));\n}\n\n//CHECK#2\nvar x = -4;\nif (x >>> 1 !== 2147483646) {\n $ERROR('#2: var x = -4; x >>> 1 === 2147483646. Actual: ' + (x >>> 1));\n}\n\n//CHECK#3\nvar y = 1;\nif (-4 >>> y !== 2147483646) {\n $ERROR('#3: var y = 1; -4 >>> y === 2147483646. Actual: ' + (-4 >>> y));\n}\n\n//CHECK#4\nvar x = -4;\nvar y = 1;\nif (x >>> y !== 2147483646) {\n $ERROR('#4: var x = -4; var y = 1; x >>> y === 2147483646. Actual: ' + (x >>> y));\n}\n\n//CHECK#5\nvar objectx = new Object();\nvar objecty = new Object();\nobjectx.prop = -4;\nobjecty.prop = 1;\nif (objectx.prop >>> objecty.prop !== 2147483646) {\n $ERROR('#5: var objectx = new Object(); var objecty = new Object(); objectx.prop = -4; objecty.prop = 1; objectx.prop >>> objecty.prop === 2147483646. Actual: ' + (objectx.prop >>> objecty.prop));\n}\n",
+ "id": "S11.7.3_A2.1_T1"
+ },
+ {
+ "section": "11.7.3",
+ "description": "If GetBase(x) is null, throw ReferenceError",
+ "test": "//CHECK#1\ntry {\n x >>> 1;\n $ERROR('#1.1: x >>> 1 throw ReferenceError. Actual: ' + (x >>> 1)); \n}\ncatch (e) {\n if ((e instanceof ReferenceError) !== true) {\n $ERROR('#1.2: x >>> 1 throw ReferenceError. Actual: ' + (e)); \n }\n}\n\n",
+ "id": "S11.7.3_A2.1_T2"
+ },
+ {
+ "section": "11.7.3",
+ "description": "If GetBase(y) is null, throw ReferenceError",
+ "test": "//CHECK#1\ntry {\n 1 >>> y;\n $ERROR('#1.1: 1 >>> y throw ReferenceError. Actual: ' + (1 >>> y)); \n}\ncatch (e) {\n if ((e instanceof ReferenceError) !== true) {\n $ERROR('#1.2: 1 >>> y throw ReferenceError. Actual: ' + (e)); \n }\n}\n\n",
+ "id": "S11.7.3_A2.1_T3"
+ },
+ {
+ "section": "11.7.3, 8.6.2.6",
+ "description": "If Type(value) is Object, evaluate ToPrimitive(value, Number)",
+ "test": "//CHECK#1\nif ({valueOf: function() {return -4}} >>> 1 !== 2147483646) {\n $ERROR('#1: {valueOf: function() {return -4}} >>> 1 === 2147483646. Actual: ' + ({valueOf: function() {return -4}} >>> 1));\n}\n\n//CHECK#2\nif ({valueOf: function() {return -4}, toString: function() {return 0}} >>> 1 !== 2147483646) {\n $ERROR('#2: {valueOf: function() {return -4}, toString: function() {return 0}} >>> 1 === 2147483646. Actual: ' + ({valueOf: function() {return -4}, toString: function() {return 0}} >>> 1));\n}\n\n//CHECK#3\nif ({valueOf: function() {return -4}, toString: function() {return {}}} >>> 1 !== 2147483646) {\n $ERROR('#3: {valueOf: function() {return -4}, toString: function() {return {}}} >>> 1 === 2147483646. Actual: ' + ({valueOf: function() {return -4}, toString: function() {return {}}} >>> 1));\n}\n\n//CHECK#4\ntry {\n if ({valueOf: function() {return -4}, toString: function() {throw \"error\"}} >>> 1 !== 2147483646) {\n $ERROR('#4.1: {valueOf: function() {return -4}, toString: function() {throw \"error\"}} >>> 1 === 2147483646. Actual: ' + ({valueOf: function() {return -4}, toString: function() {throw \"error\"}} >>> 1));\n }\n}\ncatch (e) {\n if (e === \"error\") {\n $ERROR('#4.2: {valueOf: function() {return -4}, toString: function() {throw \"error\"}} >>> 1 not throw \"error\"');\n } else {\n $ERROR('#4.3: {valueOf: function() {return -4}, toString: function() {throw \"error\"}} >>> 1 not throw Error. Actual: ' + (e));\n }\n}\n\n//CHECK#5\nif (-4 >>> {toString: function() {return 1}} !== 2147483646) {\n $ERROR('#5: -4 >>> {toString: function() {return 1}} === 2147483646. Actual: ' + (-4 >>> {toString: function() {return 1}}));\n}\n\n//CHECK#6\nif (-4 >>> {valueOf: function() {return {}}, toString: function() {return 1}} !== 2147483646) {\n $ERROR('#6: -4 >>> {valueOf: function() {return {}}, toString: function() {return 1}} === 2147483646. Actual: ' + (-4 >>> {valueOf: function() {return {}}, toString: function() {return 1}}));\n}\n\n//CHECK#7\ntry {\n -4 >>> {valueOf: function() {throw \"error\"}, toString: function() {return 1}};\n $ERROR('#7.1: -4 >>> {valueOf: function() {throw \"error\"}, toString: function() {return 1}} throw \"error\". Actual: ' + (-4 >>> {valueOf: function() {throw \"error\"}, toString: function() {return 1}}));\n} \ncatch (e) {\n if (e !== \"error\") {\n $ERROR('#7.2: -4 >>> {valueOf: function() {throw \"error\"}, toString: function() {return 1}} throw \"error\". Actual: ' + (e));\n } \n}\n\n//CHECK#8\ntry {\n -4 >>> {valueOf: function() {return {}}, toString: function() {return {}}};\n $ERROR('#8.1: -4 >>> {valueOf: function() {return {}}, toString: function() {return {}}} throw TypeError. Actual: ' + (e));\n} \ncatch (e) {\n if ((e instanceof TypeError) !== true) {\n $ERROR('#8.2: -4 >>> {valueOf: function() {return {}}, toString: function() {return {}}} throw TypeError. Actual: ' + (e));\n } \n}\n",
+ "id": "S11.7.3_A2.2_T1"
+ },
+ {
+ "section": "11.7.3",
+ "description": "Checking with \"throw\"",
+ "test": "//CHECK#1\nvar x = { valueOf: function () { throw \"x\"; } };\nvar y = { valueOf: function () { throw \"y\"; } };\ntry {\n x >>> y;\n $ERROR('#1.1: var x = { valueOf: function () { throw \"x\"; } }; var y = { valueOf: function () { throw \"y\"; } }; x >>> y throw \"x\". Actual: ' + (x >>> y));\n} catch (e) {\n if (e === \"y\") {\n $ERROR('#1.2: ToNumber(first expression) is called first, and then ToNumber(second expression)');\n } else {\n if (e !== \"x\") {\n $ERROR('#1.3: var x = { valueOf: function () { throw \"x\"; } }; var y = { valueOf: function () { throw \"y\"; } }; x >>> y throw \"x\". Actual: ' + (e));\n }\n }\n}\n",
+ "id": "S11.7.3_A2.3_T1"
+ },
+ {
+ "section": "11.7.3",
+ "description": "Checking with \"=\"",
+ "test": "//CHECK#1\nvar x = 0; \nif ((x = 1) >>> x !== 0) {\n $ERROR('#1: var x = 0; (x = 1) >>> x === 0. Actual: ' + ((x = 1) >>> x));\n}\n\n//CHECK#2\nvar x = -4; \nif (x >>> (x = 1) !== 2147483646) {\n $ERROR('#2: var x = -4; x >>> (x = 1) === 2147483646. Actual: ' + (x >>> (x = 1)));\n}\n\n",
+ "id": "S11.7.3_A2.4_T1"
+ },
+ {
+ "section": "11.7.3",
+ "description": "Checking with \"throw\"",
+ "test": "//CHECK#1\nvar x = function () { throw \"x\"; };\nvar y = function () { throw \"y\"; };\ntry {\n x() >>> y();\n $ERROR('#1.1: var x = function () { throw \"x\"; }; var y = function () { throw \"y\"; }; x() >>> y() throw \"x\". Actual: ' + (x() >>> y()));\n} catch (e) {\n if (e === \"y\") {\n $ERROR('#1.2: First expression is evaluated first, and then second expression');\n } else {\n if (e !== \"x\") {\n $ERROR('#1.3: var x = function () { throw \"x\"; }; var y = function () { throw \"y\"; }; x() >>> y() throw \"x\". Actual: ' + (e));\n }\n }\n}\n",
+ "id": "S11.7.3_A2.4_T2"
+ },
+ {
+ "section": "11.7.3",
+ "description": "Checking with undeclarated variables",
+ "test": "//CHECK#1\ntry {\n x >>> (x = 1);\n $ERROR('#1.1: x >>> (x = 1) throw ReferenceError. Actual: ' + (x >>> (x = 1))); \n}\ncatch (e) {\n if ((e instanceof ReferenceError) !== true) {\n $ERROR('#1.2: x >>> (x = 1) throw ReferenceError. Actual: ' + (e)); \n }\n}\n\n//CHECK#2\nif ((y = 1) >>> y !== 0) {\n $ERROR('#2: (y = 1) >>> y === 0. Actual: ' + ((y = 1) >>> y));\n}\n\n",
+ "id": "S11.7.3_A2.4_T3"
+ },
+ {
+ "section": "11.7.3",
+ "description": "Type(x) and Type(y) vary between primitive boolean and Boolean object",
+ "test": "//CHECK#1\nif (true >>> true !== 0) {\n $ERROR('#1: true >>> true === 0. Actual: ' + (true >>> true));\n}\n\n//CHECK#2\nif (new Boolean(true) >>> true !== 0) {\n $ERROR('#2: new Boolean(true) >>> true === 0. Actual: ' + (new Boolean(true) >>> true));\n}\n\n//CHECK#3\nif (true >>> new Boolean(true) !== 0) {\n $ERROR('#3: true >>> new Boolean(true) === 0. Actual: ' + (true >>> new Boolean(true)));\n}\n\n//CHECK#4\nif (new Boolean(true) >>> new Boolean(true) !== 0) {\n $ERROR('#4: new Boolean(true) >>> new Boolean(true) === 0. Actual: ' + (new Boolean(true) >>> new Boolean(true)));\n}\n",
+ "id": "S11.7.3_A3_T1.1"
+ },
+ {
+ "section": "11.7.3",
+ "description": "Type(x) and Type(y) vary between primitive number and Number object",
+ "test": "//CHECK#1\nif (1 >>> 1 !== 0) {\n $ERROR('#1: 1 >>> 1 === 0. Actual: ' + (1 >>> 1));\n}\n\n//CHECK#2\nif (new Number(1) >>> 1 !== 0) {\n $ERROR('#2: new Number(1) >>> 1 === 0. Actual: ' + (new Number(1) >>> 1));\n}\n\n//CHECK#3\nif (1 >>> new Number(1) !== 0) {\n $ERROR('#3: 1 >>> new Number(1) === 0. Actual: ' + (1 >>> new Number(1)));\n}\n\n//CHECK#4\nif (new Number(1) >>> new Number(1) !== 0) {\n $ERROR('#4: new Number(1) >>> new Number(1) === 0. Actual: ' + (new Number(1) >>> new Number(1)));\n}\n\n",
+ "id": "S11.7.3_A3_T1.2"
+ },
+ {
+ "section": "11.7.3",
+ "description": "Type(x) and Type(y) vary between primitive string and String object",
+ "test": "//CHECK#1\nif (\"1\" >>> \"1\" !== 0) {\n $ERROR('#1: \"1\" >>> \"1\" === 0. Actual: ' + (\"1\" >>> \"1\"));\n}\n\n//CHECK#2\nif (new String(\"1\") >>> \"1\" !== 0) {\n $ERROR('#2: new String(\"1\") >>> \"1\" === 0. Actual: ' + (new String(\"1\") >>> \"1\"));\n}\n\n//CHECK#3\nif (\"1\" >>> new String(\"1\") !== 0) {\n $ERROR('#3: \"1\" >>> new String(\"1\") === 0. Actual: ' + (\"1\" >>> new String(\"1\")));\n}\n\n//CHECK#4\nif (new String(\"1\") >>> new String(\"1\") !== 0) {\n $ERROR('#4: new String(\"1\") >>> new String(\"1\") === 0. Actual: ' + (new String(\"1\") >>> new String(\"1\")));\n}\n\n//CHECK#5\nif (\"x\" >>> \"1\" !== 0) {\n $ERROR('#5: \"x\" >>> \"1\" === 0. Actual: ' + (\"x\" >>> \"1\"));\n}\n\n//CHECK#6\nif (\"1\" >>> \"x\" !== 1) {\n $ERROR('#6: \"1\" >>> \"x\" === 1. Actual: ' + (\"1\" >>> \"x\"));\n}\n",
+ "id": "S11.7.3_A3_T1.3"
+ },
+ {
+ "section": "11.7.3",
+ "description": "Type(x) and Type(y) vary between Null and Undefined",
+ "test": "//CHECK#1\nif (null >>> undefined !== 0) {\n $ERROR('#1: null >>> undefined === 0. Actual: ' + (null >>> undefined));\n}\n\n//CHECK#2\nif (undefined >>> null !== 0) {\n $ERROR('#2: undefined >>> null === 0. Actual: ' + (undefined >>> null));\n}\n\n//CHECK#3\nif (undefined >>> undefined !== 0) {\n $ERROR('#3: undefined >>> undefined === 0. Actual: ' + (undefined >>> undefined));\n}\n\n//CHECK#4\nif (null >>> null !== 0) {\n $ERROR('#4: null >>> null === 0. Actual: ' + (null >>> null));\n}\n",
+ "id": "S11.7.3_A3_T1.4"
+ },
+ {
+ "section": "11.7.3",
+ "description": "Type(x) and Type(y) vary between Object object and Function object",
+ "test": "//CHECK#1\nif (({} >>> function(){return 1}) !== 0) {\n $ERROR('#1: ({} >>> function(){return 1}) === 0. Actual: ' + (({} >>> function(){return 1})));\n}\n\n//CHECK#2\nif ((function(){return 1} >>> {}) !== 0) {\n $ERROR('#2: (function(){return 1} >>> {}) === 0. Actual: ' + ((function(){return 1} >>> {})));\n}\n\n//CHECK#3\nif ((function(){return 1} >>> function(){return 1}) !== 0) {\n $ERROR('#3: (function(){return 1} >>> function(){return 1}) === 0. Actual: ' + ((function(){return 1} >>> function(){return 1})));\n}\n\n//CHECK#4\nif (({} >>> {}) !== 0) {\n $ERROR('#4: ({} >>> {}) === 0. Actual: ' + (({} >>> {})));\n}\n",
+ "id": "S11.7.3_A3_T1.5"
+ },
+ {
+ "section": "11.7.3",
+ "description": "Type(x) is different from Type(y) and both types vary between Number (primitive or object) and Boolean (primitive and object)",
+ "test": "//CHECK#1\nif (true >>> 1 !== 0) {\n $ERROR('#1: true >>> 1 === 0. Actual: ' + (true >>> 1));\n}\n\n//CHECK#2\nif (1 >>> true !== 0) {\n $ERROR('#2: 1 >>> true === 0. Actual: ' + (1 >>> true));\n}\n\n//CHECK#3\nif (new Boolean(true) >>> 1 !== 0) {\n $ERROR('#3: new Boolean(true) >>> 1 === 0. Actual: ' + (new Boolean(true) >>> 1));\n}\n\n//CHECK#4\nif (1 >>> new Boolean(true) !== 0) {\n $ERROR('#4: 1 >>> new Boolean(true) === 0. Actual: ' + (1 >>> new Boolean(true)));\n}\n\n//CHECK#5\nif (true >>> new Number(1) !== 0) {\n $ERROR('#5: true >>> new Number(1) === 0. Actual: ' + (true >>> new Number(1)));\n}\n\n//CHECK#6\nif (new Number(1) >>> true !== 0) {\n $ERROR('#6: new Number(1) >>> true === 0. Actual: ' + (new Number(1) >>> true));\n}\n\n//CHECK#7\nif (new Boolean(true) >>> new Number(1) !== 0) {\n $ERROR('#7: new Boolean(true) >>> new Number(1) === 0. Actual: ' + (new Boolean(true) >>> new Number(1)));\n}\n\n//CHECK#8\nif (new Number(1) >>> new Boolean(true) !== 0) {\n $ERROR('#8: new Number(1) >>> new Boolean(true) === 0. Actual: ' + (new Number(1) >>> new Boolean(true)));\n}\n",
+ "id": "S11.7.3_A3_T2.1"
+ },
+ {
+ "section": "11.7.3",
+ "description": "Type(x) is different from Type(y) and both types vary between Number (primitive or object) and String (primitive and object)",
+ "test": "//CHECK#1\nif (\"1\" >>> 1 !== 0) {\n $ERROR('#1: \"1\" >>> 1 === 0. Actual: ' + (\"1\" >>> 1));\n}\n\n//CHECK#2\nif (1 >>> \"1\" !== 0) {\n $ERROR('#2: 1 >>> \"1\" === 0. Actual: ' + (1 >>> \"1\"));\n}\n\n//CHECK#3\nif (new String(\"1\") >>> 1 !== 0) {\n $ERROR('#3: new String(\"1\") >>> 1 === 0. Actual: ' + (new String(\"1\") >>> 1));\n}\n\n//CHECK#4\nif (1 >>> new String(\"1\") !== 0) {\n $ERROR('#4: 1 >>> new String(\"1\") === 0. Actual: ' + (1 >>> new String(\"1\")));\n}\n\n//CHECK#5\nif (\"1\" >>> new Number(1) !== 0) {\n $ERROR('#5: \"1\" >>> new Number(1) === 0. Actual: ' + (\"1\" >>> new Number(1)));\n}\n\n//CHECK#6\nif (new Number(1) >>> \"1\" !== 0) {\n $ERROR('#6: new Number(1) >>> \"1\" === 0. Actual: ' + (new Number(1) >>> \"1\"));\n}\n\n//CHECK#7\nif (new String(\"1\") >>> new Number(1) !== 0) {\n $ERROR('#7: new String(\"1\") >>> new Number(1) === 0. Actual: ' + (new String(\"1\") >>> new Number(1)));\n}\n\n//CHECK#8\nif (new Number(1) >>> new String(\"1\") !== 0) {\n $ERROR('#8: new Number(1) >>> new String(\"1\") === 0. Actual: ' + (new Number(1) >>> new String(\"1\")));\n}\n\n//CHECK#9\nif (\"x\" >>> 1 !== 0) {\n $ERROR('#9: \"x\" >>> 1 === 0. Actual: ' + (\"x\" >>> 1));\n}\n\n//CHECK#10\nif (1 >>> \"x\" !== 1) {\n $ERROR('#10: 1 >>> \"x\" === 1. Actual: ' + (1 >>> \"x\"));\n}\n",
+ "id": "S11.7.3_A3_T2.2"
+ },
+ {
+ "section": "11.7.3",
+ "description": "Type(x) is different from Type(y) and both types vary between Number (primitive or object) and Null",
+ "test": "//CHECK#1\nif (1 >>> null !== 1) {\n $ERROR('#1: 1 >>> null === 1. Actual: ' + (1 >>> null));\n}\n\n//CHECK#2\nif (null >>> 1 !== 0) {\n $ERROR('#2: null >>> 1 === 0. Actual: ' + (null >>> 1));\n}\n\n//CHECK#3\nif (new Number(1) >>> null !== 1) {\n $ERROR('#3: new Number(1) >>> null === 1. Actual: ' + (new Number(1) >>> null));\n}\n\n//CHECK#4\nif (null >>> new Number(1) !== 0) {\n $ERROR('#4: null >>> new Number(1) === 0. Actual: ' + (null >>> new Number(1)));\n}\n",
+ "id": "S11.7.3_A3_T2.3"
+ },
+ {
+ "section": "11.7.3",
+ "description": "Type(x) is different from Type(y) and both types vary between Number (primitive or object) and Undefined",
+ "test": "//CHECK#1\nif (1 >>> undefined !== 1) {\n $ERROR('#1: 1 >>> undefined === 1. Actual: ' + (1 >>> undefined));\n}\n\n//CHECK#2\nif (undefined >>> 1 !== 0) {\n $ERROR('#2: undefined >>> 1 === 0. Actual: ' + (undefined >>> 1));\n}\n\n//CHECK#3\nif (new Number(1) >>> undefined !== 1) {\n $ERROR('#3: new Number(1) >>> undefined === 1. Actual: ' + (new Number(1) >>> undefined));\n}\n\n//CHECK#4\nif (undefined >>> new Number(1) !== 0) {\n $ERROR('#4: undefined >>> new Number(1) === 0. Actual: ' + (undefined >>> new Number(1)));\n}\n",
+ "id": "S11.7.3_A3_T2.4"
+ },
+ {
+ "section": "11.7.3",
+ "description": "Type(x) is different from Type(y) and both types vary between String (primitive or object) and Boolean (primitive and object)",
+ "test": "//CHECK#1\nif (true >>> \"1\" !== 0) {\n $ERROR('#1: true >>> \"1\" === 0. Actual: ' + (true >>> \"1\"));\n}\n\n//CHECK#2\nif (\"1\" >>> true !== 0) {\n $ERROR('#2: \"1\" >>> true === 0. Actual: ' + (\"1\" >>> true));\n}\n\n//CHECK#3\nif (new Boolean(true) >>> \"1\" !== 0) {\n $ERROR('#3: new Boolean(true) >>> \"1\" === 0. Actual: ' + (new Boolean(true) >>> \"1\"));\n}\n\n//CHECK#4\nif (\"1\" >>> new Boolean(true) !== 0) {\n $ERROR('#4: \"1\" >>> new Boolean(true) === 0. Actual: ' + (\"1\" >>> new Boolean(true)));\n}\n\n//CHECK#5\nif (true >>> new String(\"1\") !== 0) {\n $ERROR('#5: true >>> new String(\"1\") === 0. Actual: ' + (true >>> new String(\"1\")));\n}\n\n//CHECK#6\nif (new String(\"1\") >>> true !== 0) {\n $ERROR('#6: new String(\"1\") >>> true === 0. Actual: ' + (new String(\"1\") >>> true));\n}\n\n//CHECK#7\nif (new Boolean(true) >>> new String(\"1\") !== 0) {\n $ERROR('#7: new Boolean(true) >>> new String(\"1\") === 0. Actual: ' + (new Boolean(true) >>> new String(\"1\")));\n}\n\n//CHECK#8\nif (new String(\"1\") >>> new Boolean(true) !== 0) {\n $ERROR('#8: new String(\"1\") >>> new Boolean(true) === 0. Actual: ' + (new String(\"1\") >>> new Boolean(true)));\n}\n",
+ "id": "S11.7.3_A3_T2.5"
+ },
+ {
+ "section": "11.7.3",
+ "description": "Type(x) is different from Type(y) and both types vary between String (primitive or object) and Undefined",
+ "test": "//CHECK#1\nif (\"1\" >>> undefined !== 1) {\n $ERROR('#1: \"1\" >>> undefined === 1. Actual: ' + (\"1\" >>> undefined));\n}\n\n//CHECK#2\nif (undefined >>> \"1\" !== 0) {\n $ERROR('#2: undefined >>> \"1\" === 0. Actual: ' + (undefined >>> \"1\"));\n}\n\n//CHECK#3\nif (new String(\"1\") >>> undefined !== 1) {\n $ERROR('#3: new String(\"1\") >>> undefined === 1. Actual: ' + (new String(\"1\") >>> undefined));\n}\n\n//CHECK#4\nif (undefined >>> new String(\"1\") !== 0) {\n $ERROR('#4: undefined >>> new String(\"1\") === 0. Actual: ' + (undefined >>> new String(\"1\")));\n}\n",
+ "id": "S11.7.3_A3_T2.6"
+ },
+ {
+ "section": "11.7.3",
+ "description": "Type(x) is different from Type(y) and both types vary between String (primitive or object) and Null",
+ "test": "//CHECK#1\nif (\"1\" >>> null !== 1) {\n $ERROR('#1: \"1\" >>> null === 1. Actual: ' + (\"1\" >>> null));\n}\n\n//CHECK#2\nif (null >>> \"1\" !== 0) {\n $ERROR('#2: null >>> \"1\" === 0. Actual: ' + (null >>> \"1\"));\n}\n\n//CHECK#3\nif (new String(\"1\") >>> null !== 1) {\n $ERROR('#3: new String(\"1\") >>> null === 1. Actual: ' + (new String(\"1\") >>> null));\n}\n\n//CHECK#4\nif (null >>> new String(\"1\") !== 0) {\n $ERROR('#4: null >>> new String(\"1\") === 0. Actual: ' + (null >>> new String(\"1\")));\n}\n",
+ "id": "S11.7.3_A3_T2.7"
+ },
+ {
+ "section": "11.7.3",
+ "description": "Type(x) is different from Type(y) and both types vary between Boolean (primitive or object) and Undefined",
+ "test": "//CHECK#1\nif (true >>> undefined !== 1) {\n $ERROR('#1: true >>> undefined === 1. Actual: ' + (true >>> undefined));\n}\n\n//CHECK#2\nif (undefined >>> true !== 0) {\n $ERROR('#2: undefined >>> true === 0. Actual: ' + (undefined >>> true));\n}\n\n//CHECK#3\nif (new Boolean(true) >>> undefined !== 1) {\n $ERROR('#3: new Boolean(true) >>> undefined === 1. Actual: ' + (new Boolean(true) >>> undefined));\n}\n\n//CHECK#4\nif (undefined >>> new Boolean(true) !== 0) {\n $ERROR('#4: undefined >>> new Boolean(true) === 0. Actual: ' + (undefined >>> new Boolean(true)));\n}\n",
+ "id": "S11.7.3_A3_T2.8"
+ },
+ {
+ "section": "11.7.3",
+ "description": "Type(x) is different from Type(y) and both types vary between Boolean (primitive or object) and Null",
+ "test": "//CHECK#1\nif (true >>> null !== 1) {\n $ERROR('#1: true >>> null === 1. Actual: ' + (true >>> null));\n}\n\n//CHECK#2\nif (null >>> true !== 0) {\n $ERROR('#2: null >>> true === 0. Actual: ' + (null >>> true));\n}\n\n//CHECK#3\nif (new Boolean(true) >>> null !== 1) {\n $ERROR('#3: new Boolean(true) >>> null === 1. Actual: ' + (new Boolean(true) >>> null));\n}\n\n//CHECK#4\nif (null >>> new Boolean(true) !== 0) {\n $ERROR('#4: null >>> new Boolean(true) === 0. Actual: ' + (null >>> new Boolean(true)));\n}\n",
+ "id": "S11.7.3_A3_T2.9"
+ },
+ {
+ "section": "11.7.3",
+ "description": "ShiftExpression = 2^n, n = 0...15",
+ "test": "//CHECK\n \nif (1 >>> 0 !== 1) { \n $ERROR('#1: 1 >>> 0 === 1. Actual: ' + (1 >>> 0)); \n} \n\n\nif (2 >>> 0 !== 2) { \n $ERROR('#2: 2 >>> 0 === 2. Actual: ' + (2 >>> 0)); \n} \n\n\nif (4 >>> 0 !== 4) { \n $ERROR('#3: 4 >>> 0 === 4. Actual: ' + (4 >>> 0)); \n} \n\n\nif (8 >>> 0 !== 8) { \n $ERROR('#4: 8 >>> 0 === 8. Actual: ' + (8 >>> 0)); \n} \n\n\nif (16 >>> 0 !== 16) { \n $ERROR('#5: 16 >>> 0 === 16. Actual: ' + (16 >>> 0)); \n} \n\n\nif (32 >>> 0 !== 32) { \n $ERROR('#6: 32 >>> 0 === 32. Actual: ' + (32 >>> 0)); \n} \n\n\nif (64 >>> 0 !== 64) { \n $ERROR('#7: 64 >>> 0 === 64. Actual: ' + (64 >>> 0)); \n} \n\n\nif (128 >>> 0 !== 128) { \n $ERROR('#8: 128 >>> 0 === 128. Actual: ' + (128 >>> 0)); \n} \n\n\nif (256 >>> 0 !== 256) { \n $ERROR('#9: 256 >>> 0 === 256. Actual: ' + (256 >>> 0)); \n} \n\n\nif (512 >>> 0 !== 512) { \n $ERROR('#10: 512 >>> 0 === 512. Actual: ' + (512 >>> 0)); \n} \n\n\nif (1024 >>> 0 !== 1024) { \n $ERROR('#11: 1024 >>> 0 === 1024. Actual: ' + (1024 >>> 0)); \n} \n\n\nif (2048 >>> 0 !== 2048) { \n $ERROR('#12: 2048 >>> 0 === 2048. Actual: ' + (2048 >>> 0)); \n} \n\n\nif (4096 >>> 0 !== 4096) { \n $ERROR('#13: 4096 >>> 0 === 4096. Actual: ' + (4096 >>> 0)); \n} \n\n\nif (8192 >>> 0 !== 8192) { \n $ERROR('#14: 8192 >>> 0 === 8192. Actual: ' + (8192 >>> 0)); \n} \n\n\nif (16384 >>> 0 !== 16384) { \n $ERROR('#15: 16384 >>> 0 === 16384. Actual: ' + (16384 >>> 0)); \n} \n\n\nif (32768 >>> 0 !== 32768) { \n $ERROR('#16: 32768 >>> 0 === 32768. Actual: ' + (32768 >>> 0)); \n} \n\n\nif (65536 >>> 0 !== 65536) { \n $ERROR('#17: 65536 >>> 0 === 65536. Actual: ' + (65536 >>> 0)); \n} \n\n\nif (131072 >>> 0 !== 131072) { \n $ERROR('#18: 131072 >>> 0 === 131072. Actual: ' + (131072 >>> 0)); \n} \n\n\nif (262144 >>> 0 !== 262144) { \n $ERROR('#19: 262144 >>> 0 === 262144. Actual: ' + (262144 >>> 0)); \n} \n\n\nif (524288 >>> 0 !== 524288) { \n $ERROR('#20: 524288 >>> 0 === 524288. Actual: ' + (524288 >>> 0)); \n} \n\n\nif (1048576 >>> 0 !== 1048576) { \n $ERROR('#21: 1048576 >>> 0 === 1048576. Actual: ' + (1048576 >>> 0)); \n} \n\n\nif (2097152 >>> 0 !== 2097152) { \n $ERROR('#22: 2097152 >>> 0 === 2097152. Actual: ' + (2097152 >>> 0)); \n} \n\n\nif (4194304 >>> 0 !== 4194304) { \n $ERROR('#23: 4194304 >>> 0 === 4194304. Actual: ' + (4194304 >>> 0)); \n} \n\n\nif (8388608 >>> 0 !== 8388608) { \n $ERROR('#24: 8388608 >>> 0 === 8388608. Actual: ' + (8388608 >>> 0)); \n} \n\n\nif (16777216 >>> 0 !== 16777216) { \n $ERROR('#25: 16777216 >>> 0 === 16777216. Actual: ' + (16777216 >>> 0)); \n} \n\n\nif (33554432 >>> 0 !== 33554432) { \n $ERROR('#26: 33554432 >>> 0 === 33554432. Actual: ' + (33554432 >>> 0)); \n} \n\n\nif (67108864 >>> 0 !== 67108864) { \n $ERROR('#27: 67108864 >>> 0 === 67108864. Actual: ' + (67108864 >>> 0)); \n} \n\n\nif (134217728 >>> 0 !== 134217728) { \n $ERROR('#28: 134217728 >>> 0 === 134217728. Actual: ' + (134217728 >>> 0)); \n} \n\n\nif (268435456 >>> 0 !== 268435456) { \n $ERROR('#29: 268435456 >>> 0 === 268435456. Actual: ' + (268435456 >>> 0)); \n} \n\n\nif (536870912 >>> 0 !== 536870912) { \n $ERROR('#30: 536870912 >>> 0 === 536870912. Actual: ' + (536870912 >>> 0)); \n} \n\n\nif (1073741824 >>> 0 !== 1073741824) { \n $ERROR('#31: 1073741824 >>> 0 === 1073741824. Actual: ' + (1073741824 >>> 0)); \n} \n\n\nif (2147483648 >>> 0 !== 2147483648) { \n $ERROR('#32: 2147483648 >>> 0 === 2147483648. Actual: ' + (2147483648 >>> 0)); \n} \n\n\nif (1 >>> 1 !== 0) { \n $ERROR('#33: 1 >>> 1 === 0. Actual: ' + (1 >>> 1)); \n} \n\n\nif (2 >>> 1 !== 1) { \n $ERROR('#34: 2 >>> 1 === 1. Actual: ' + (2 >>> 1)); \n} \n\n\nif (4 >>> 1 !== 2) { \n $ERROR('#35: 4 >>> 1 === 2. Actual: ' + (4 >>> 1)); \n} \n\n\nif (8 >>> 1 !== 4) { \n $ERROR('#36: 8 >>> 1 === 4. Actual: ' + (8 >>> 1)); \n} \n\n\nif (16 >>> 1 !== 8) { \n $ERROR('#37: 16 >>> 1 === 8. Actual: ' + (16 >>> 1)); \n} \n\n\nif (32 >>> 1 !== 16) { \n $ERROR('#38: 32 >>> 1 === 16. Actual: ' + (32 >>> 1)); \n} \n\n\nif (64 >>> 1 !== 32) { \n $ERROR('#39: 64 >>> 1 === 32. Actual: ' + (64 >>> 1)); \n} \n\n\nif (128 >>> 1 !== 64) { \n $ERROR('#40: 128 >>> 1 === 64. Actual: ' + (128 >>> 1)); \n} \n\n\nif (256 >>> 1 !== 128) { \n $ERROR('#41: 256 >>> 1 === 128. Actual: ' + (256 >>> 1)); \n} \n\n\nif (512 >>> 1 !== 256) { \n $ERROR('#42: 512 >>> 1 === 256. Actual: ' + (512 >>> 1)); \n} \n\n\nif (1024 >>> 1 !== 512) { \n $ERROR('#43: 1024 >>> 1 === 512. Actual: ' + (1024 >>> 1)); \n} \n\n\nif (2048 >>> 1 !== 1024) { \n $ERROR('#44: 2048 >>> 1 === 1024. Actual: ' + (2048 >>> 1)); \n} \n\n\nif (4096 >>> 1 !== 2048) { \n $ERROR('#45: 4096 >>> 1 === 2048. Actual: ' + (4096 >>> 1)); \n} \n\n\nif (8192 >>> 1 !== 4096) { \n $ERROR('#46: 8192 >>> 1 === 4096. Actual: ' + (8192 >>> 1)); \n} \n\n\nif (16384 >>> 1 !== 8192) { \n $ERROR('#47: 16384 >>> 1 === 8192. Actual: ' + (16384 >>> 1)); \n} \n\n\nif (32768 >>> 1 !== 16384) { \n $ERROR('#48: 32768 >>> 1 === 16384. Actual: ' + (32768 >>> 1)); \n} \n\n\nif (65536 >>> 1 !== 32768) { \n $ERROR('#49: 65536 >>> 1 === 32768. Actual: ' + (65536 >>> 1)); \n} \n\n\nif (131072 >>> 1 !== 65536) { \n $ERROR('#50: 131072 >>> 1 === 65536. Actual: ' + (131072 >>> 1)); \n} \n\n\nif (262144 >>> 1 !== 131072) { \n $ERROR('#51: 262144 >>> 1 === 131072. Actual: ' + (262144 >>> 1)); \n} \n\n\nif (524288 >>> 1 !== 262144) { \n $ERROR('#52: 524288 >>> 1 === 262144. Actual: ' + (524288 >>> 1)); \n} \n\n\nif (1048576 >>> 1 !== 524288) { \n $ERROR('#53: 1048576 >>> 1 === 524288. Actual: ' + (1048576 >>> 1)); \n} \n\n\nif (2097152 >>> 1 !== 1048576) { \n $ERROR('#54: 2097152 >>> 1 === 1048576. Actual: ' + (2097152 >>> 1)); \n} \n\n\nif (4194304 >>> 1 !== 2097152) { \n $ERROR('#55: 4194304 >>> 1 === 2097152. Actual: ' + (4194304 >>> 1)); \n} \n\n\nif (8388608 >>> 1 !== 4194304) { \n $ERROR('#56: 8388608 >>> 1 === 4194304. Actual: ' + (8388608 >>> 1)); \n} \n\n\nif (16777216 >>> 1 !== 8388608) { \n $ERROR('#57: 16777216 >>> 1 === 8388608. Actual: ' + (16777216 >>> 1)); \n} \n\n\nif (33554432 >>> 1 !== 16777216) { \n $ERROR('#58: 33554432 >>> 1 === 16777216. Actual: ' + (33554432 >>> 1)); \n} \n\n\nif (67108864 >>> 1 !== 33554432) { \n $ERROR('#59: 67108864 >>> 1 === 33554432. Actual: ' + (67108864 >>> 1)); \n} \n\n\nif (134217728 >>> 1 !== 67108864) { \n $ERROR('#60: 134217728 >>> 1 === 67108864. Actual: ' + (134217728 >>> 1)); \n} \n\n\nif (268435456 >>> 1 !== 134217728) { \n $ERROR('#61: 268435456 >>> 1 === 134217728. Actual: ' + (268435456 >>> 1)); \n} \n\n\nif (536870912 >>> 1 !== 268435456) { \n $ERROR('#62: 536870912 >>> 1 === 268435456. Actual: ' + (536870912 >>> 1)); \n} \n\n\nif (1073741824 >>> 1 !== 536870912) { \n $ERROR('#63: 1073741824 >>> 1 === 536870912. Actual: ' + (1073741824 >>> 1)); \n} \n\n\nif (2147483648 >>> 1 !== 1073741824) { \n $ERROR('#64: 2147483648 >>> 1 === 1073741824. Actual: ' + (2147483648 >>> 1)); \n} \n\n\nif (1 >>> 2 !== 0) { \n $ERROR('#65: 1 >>> 2 === 0. Actual: ' + (1 >>> 2)); \n} \n\n\nif (2 >>> 2 !== 0) { \n $ERROR('#66: 2 >>> 2 === 0. Actual: ' + (2 >>> 2)); \n} \n\n\nif (4 >>> 2 !== 1) { \n $ERROR('#67: 4 >>> 2 === 1. Actual: ' + (4 >>> 2)); \n} \n\n\nif (8 >>> 2 !== 2) { \n $ERROR('#68: 8 >>> 2 === 2. Actual: ' + (8 >>> 2)); \n} \n\n\nif (16 >>> 2 !== 4) { \n $ERROR('#69: 16 >>> 2 === 4. Actual: ' + (16 >>> 2)); \n} \n\n\nif (32 >>> 2 !== 8) { \n $ERROR('#70: 32 >>> 2 === 8. Actual: ' + (32 >>> 2)); \n} \n\n\nif (64 >>> 2 !== 16) { \n $ERROR('#71: 64 >>> 2 === 16. Actual: ' + (64 >>> 2)); \n} \n\n\nif (128 >>> 2 !== 32) { \n $ERROR('#72: 128 >>> 2 === 32. Actual: ' + (128 >>> 2)); \n} \n\n\nif (256 >>> 2 !== 64) { \n $ERROR('#73: 256 >>> 2 === 64. Actual: ' + (256 >>> 2)); \n} \n\n\nif (512 >>> 2 !== 128) { \n $ERROR('#74: 512 >>> 2 === 128. Actual: ' + (512 >>> 2)); \n} \n\n\nif (1024 >>> 2 !== 256) { \n $ERROR('#75: 1024 >>> 2 === 256. Actual: ' + (1024 >>> 2)); \n} \n\n\nif (2048 >>> 2 !== 512) { \n $ERROR('#76: 2048 >>> 2 === 512. Actual: ' + (2048 >>> 2)); \n} \n\n\nif (4096 >>> 2 !== 1024) { \n $ERROR('#77: 4096 >>> 2 === 1024. Actual: ' + (4096 >>> 2)); \n} \n\n\nif (8192 >>> 2 !== 2048) { \n $ERROR('#78: 8192 >>> 2 === 2048. Actual: ' + (8192 >>> 2)); \n} \n\n\nif (16384 >>> 2 !== 4096) { \n $ERROR('#79: 16384 >>> 2 === 4096. Actual: ' + (16384 >>> 2)); \n} \n\n\nif (32768 >>> 2 !== 8192) { \n $ERROR('#80: 32768 >>> 2 === 8192. Actual: ' + (32768 >>> 2)); \n} \n\n\nif (65536 >>> 2 !== 16384) { \n $ERROR('#81: 65536 >>> 2 === 16384. Actual: ' + (65536 >>> 2)); \n} \n\n\nif (131072 >>> 2 !== 32768) { \n $ERROR('#82: 131072 >>> 2 === 32768. Actual: ' + (131072 >>> 2)); \n} \n\n\nif (262144 >>> 2 !== 65536) { \n $ERROR('#83: 262144 >>> 2 === 65536. Actual: ' + (262144 >>> 2)); \n} \n\n\nif (524288 >>> 2 !== 131072) { \n $ERROR('#84: 524288 >>> 2 === 131072. Actual: ' + (524288 >>> 2)); \n} \n\n\nif (1048576 >>> 2 !== 262144) { \n $ERROR('#85: 1048576 >>> 2 === 262144. Actual: ' + (1048576 >>> 2)); \n} \n\n\nif (2097152 >>> 2 !== 524288) { \n $ERROR('#86: 2097152 >>> 2 === 524288. Actual: ' + (2097152 >>> 2)); \n} \n\n\nif (4194304 >>> 2 !== 1048576) { \n $ERROR('#87: 4194304 >>> 2 === 1048576. Actual: ' + (4194304 >>> 2)); \n} \n\n\nif (8388608 >>> 2 !== 2097152) { \n $ERROR('#88: 8388608 >>> 2 === 2097152. Actual: ' + (8388608 >>> 2)); \n} \n\n\nif (16777216 >>> 2 !== 4194304) { \n $ERROR('#89: 16777216 >>> 2 === 4194304. Actual: ' + (16777216 >>> 2)); \n} \n\n\nif (33554432 >>> 2 !== 8388608) { \n $ERROR('#90: 33554432 >>> 2 === 8388608. Actual: ' + (33554432 >>> 2)); \n} \n\n\nif (67108864 >>> 2 !== 16777216) { \n $ERROR('#91: 67108864 >>> 2 === 16777216. Actual: ' + (67108864 >>> 2)); \n} \n\n\nif (134217728 >>> 2 !== 33554432) { \n $ERROR('#92: 134217728 >>> 2 === 33554432. Actual: ' + (134217728 >>> 2)); \n} \n\n\nif (268435456 >>> 2 !== 67108864) { \n $ERROR('#93: 268435456 >>> 2 === 67108864. Actual: ' + (268435456 >>> 2)); \n} \n\n\nif (536870912 >>> 2 !== 134217728) { \n $ERROR('#94: 536870912 >>> 2 === 134217728. Actual: ' + (536870912 >>> 2)); \n} \n\n\nif (1073741824 >>> 2 !== 268435456) { \n $ERROR('#95: 1073741824 >>> 2 === 268435456. Actual: ' + (1073741824 >>> 2)); \n} \n\n\nif (2147483648 >>> 2 !== 536870912) { \n $ERROR('#96: 2147483648 >>> 2 === 536870912. Actual: ' + (2147483648 >>> 2)); \n} \n\n\nif (1 >>> 3 !== 0) { \n $ERROR('#97: 1 >>> 3 === 0. Actual: ' + (1 >>> 3)); \n} \n\n\nif (2 >>> 3 !== 0) { \n $ERROR('#98: 2 >>> 3 === 0. Actual: ' + (2 >>> 3)); \n} \n\n\nif (4 >>> 3 !== 0) { \n $ERROR('#99: 4 >>> 3 === 0. Actual: ' + (4 >>> 3)); \n} \n\n\nif (8 >>> 3 !== 1) { \n $ERROR('#100: 8 >>> 3 === 1. Actual: ' + (8 >>> 3)); \n} \n\n\nif (16 >>> 3 !== 2) { \n $ERROR('#101: 16 >>> 3 === 2. Actual: ' + (16 >>> 3)); \n} \n\n\nif (32 >>> 3 !== 4) { \n $ERROR('#102: 32 >>> 3 === 4. Actual: ' + (32 >>> 3)); \n} \n\n\nif (64 >>> 3 !== 8) { \n $ERROR('#103: 64 >>> 3 === 8. Actual: ' + (64 >>> 3)); \n} \n\n\nif (128 >>> 3 !== 16) { \n $ERROR('#104: 128 >>> 3 === 16. Actual: ' + (128 >>> 3)); \n} \n\n\nif (256 >>> 3 !== 32) { \n $ERROR('#105: 256 >>> 3 === 32. Actual: ' + (256 >>> 3)); \n} \n\n\nif (512 >>> 3 !== 64) { \n $ERROR('#106: 512 >>> 3 === 64. Actual: ' + (512 >>> 3)); \n} \n\n\nif (1024 >>> 3 !== 128) { \n $ERROR('#107: 1024 >>> 3 === 128. Actual: ' + (1024 >>> 3)); \n} \n\n\nif (2048 >>> 3 !== 256) { \n $ERROR('#108: 2048 >>> 3 === 256. Actual: ' + (2048 >>> 3)); \n} \n\n\nif (4096 >>> 3 !== 512) { \n $ERROR('#109: 4096 >>> 3 === 512. Actual: ' + (4096 >>> 3)); \n} \n\n\nif (8192 >>> 3 !== 1024) { \n $ERROR('#110: 8192 >>> 3 === 1024. Actual: ' + (8192 >>> 3)); \n} \n\n\nif (16384 >>> 3 !== 2048) { \n $ERROR('#111: 16384 >>> 3 === 2048. Actual: ' + (16384 >>> 3)); \n} \n\n\nif (32768 >>> 3 !== 4096) { \n $ERROR('#112: 32768 >>> 3 === 4096. Actual: ' + (32768 >>> 3)); \n} \n\n\nif (65536 >>> 3 !== 8192) { \n $ERROR('#113: 65536 >>> 3 === 8192. Actual: ' + (65536 >>> 3)); \n} \n\n\nif (131072 >>> 3 !== 16384) { \n $ERROR('#114: 131072 >>> 3 === 16384. Actual: ' + (131072 >>> 3)); \n} \n\n\nif (262144 >>> 3 !== 32768) { \n $ERROR('#115: 262144 >>> 3 === 32768. Actual: ' + (262144 >>> 3)); \n} \n\n\nif (524288 >>> 3 !== 65536) { \n $ERROR('#116: 524288 >>> 3 === 65536. Actual: ' + (524288 >>> 3)); \n} \n\n\nif (1048576 >>> 3 !== 131072) { \n $ERROR('#117: 1048576 >>> 3 === 131072. Actual: ' + (1048576 >>> 3)); \n} \n\n\nif (2097152 >>> 3 !== 262144) { \n $ERROR('#118: 2097152 >>> 3 === 262144. Actual: ' + (2097152 >>> 3)); \n} \n\n\nif (4194304 >>> 3 !== 524288) { \n $ERROR('#119: 4194304 >>> 3 === 524288. Actual: ' + (4194304 >>> 3)); \n} \n\n\nif (8388608 >>> 3 !== 1048576) { \n $ERROR('#120: 8388608 >>> 3 === 1048576. Actual: ' + (8388608 >>> 3)); \n} \n\n\nif (16777216 >>> 3 !== 2097152) { \n $ERROR('#121: 16777216 >>> 3 === 2097152. Actual: ' + (16777216 >>> 3)); \n} \n\n\nif (33554432 >>> 3 !== 4194304) { \n $ERROR('#122: 33554432 >>> 3 === 4194304. Actual: ' + (33554432 >>> 3)); \n} \n\n\nif (67108864 >>> 3 !== 8388608) { \n $ERROR('#123: 67108864 >>> 3 === 8388608. Actual: ' + (67108864 >>> 3)); \n} \n\n\nif (134217728 >>> 3 !== 16777216) { \n $ERROR('#124: 134217728 >>> 3 === 16777216. Actual: ' + (134217728 >>> 3)); \n} \n\n\nif (268435456 >>> 3 !== 33554432) { \n $ERROR('#125: 268435456 >>> 3 === 33554432. Actual: ' + (268435456 >>> 3)); \n} \n\n\nif (536870912 >>> 3 !== 67108864) { \n $ERROR('#126: 536870912 >>> 3 === 67108864. Actual: ' + (536870912 >>> 3)); \n} \n\n\nif (1073741824 >>> 3 !== 134217728) { \n $ERROR('#127: 1073741824 >>> 3 === 134217728. Actual: ' + (1073741824 >>> 3)); \n} \n\n\nif (2147483648 >>> 3 !== 268435456) { \n $ERROR('#128: 2147483648 >>> 3 === 268435456. Actual: ' + (2147483648 >>> 3)); \n} \n\n\nif (1 >>> 4 !== 0) { \n $ERROR('#129: 1 >>> 4 === 0. Actual: ' + (1 >>> 4)); \n} \n\n\nif (2 >>> 4 !== 0) { \n $ERROR('#130: 2 >>> 4 === 0. Actual: ' + (2 >>> 4)); \n} \n\n\nif (4 >>> 4 !== 0) { \n $ERROR('#131: 4 >>> 4 === 0. Actual: ' + (4 >>> 4)); \n} \n\n\nif (8 >>> 4 !== 0) { \n $ERROR('#132: 8 >>> 4 === 0. Actual: ' + (8 >>> 4)); \n} \n\n\nif (16 >>> 4 !== 1) { \n $ERROR('#133: 16 >>> 4 === 1. Actual: ' + (16 >>> 4)); \n} \n\n\nif (32 >>> 4 !== 2) { \n $ERROR('#134: 32 >>> 4 === 2. Actual: ' + (32 >>> 4)); \n} \n\n\nif (64 >>> 4 !== 4) { \n $ERROR('#135: 64 >>> 4 === 4. Actual: ' + (64 >>> 4)); \n} \n\n\nif (128 >>> 4 !== 8) { \n $ERROR('#136: 128 >>> 4 === 8. Actual: ' + (128 >>> 4)); \n} \n\n\nif (256 >>> 4 !== 16) { \n $ERROR('#137: 256 >>> 4 === 16. Actual: ' + (256 >>> 4)); \n} \n\n\nif (512 >>> 4 !== 32) { \n $ERROR('#138: 512 >>> 4 === 32. Actual: ' + (512 >>> 4)); \n} \n\n\nif (1024 >>> 4 !== 64) { \n $ERROR('#139: 1024 >>> 4 === 64. Actual: ' + (1024 >>> 4)); \n} \n\n\nif (2048 >>> 4 !== 128) { \n $ERROR('#140: 2048 >>> 4 === 128. Actual: ' + (2048 >>> 4)); \n} \n\n\nif (4096 >>> 4 !== 256) { \n $ERROR('#141: 4096 >>> 4 === 256. Actual: ' + (4096 >>> 4)); \n} \n\n\nif (8192 >>> 4 !== 512) { \n $ERROR('#142: 8192 >>> 4 === 512. Actual: ' + (8192 >>> 4)); \n} \n\n\nif (16384 >>> 4 !== 1024) { \n $ERROR('#143: 16384 >>> 4 === 1024. Actual: ' + (16384 >>> 4)); \n} \n\n\nif (32768 >>> 4 !== 2048) { \n $ERROR('#144: 32768 >>> 4 === 2048. Actual: ' + (32768 >>> 4)); \n} \n\n\nif (65536 >>> 4 !== 4096) { \n $ERROR('#145: 65536 >>> 4 === 4096. Actual: ' + (65536 >>> 4)); \n} \n\n\nif (131072 >>> 4 !== 8192) { \n $ERROR('#146: 131072 >>> 4 === 8192. Actual: ' + (131072 >>> 4)); \n} \n\n\nif (262144 >>> 4 !== 16384) { \n $ERROR('#147: 262144 >>> 4 === 16384. Actual: ' + (262144 >>> 4)); \n} \n\n\nif (524288 >>> 4 !== 32768) { \n $ERROR('#148: 524288 >>> 4 === 32768. Actual: ' + (524288 >>> 4)); \n} \n\n\nif (1048576 >>> 4 !== 65536) { \n $ERROR('#149: 1048576 >>> 4 === 65536. Actual: ' + (1048576 >>> 4)); \n} \n\n\nif (2097152 >>> 4 !== 131072) { \n $ERROR('#150: 2097152 >>> 4 === 131072. Actual: ' + (2097152 >>> 4)); \n} \n\n\nif (4194304 >>> 4 !== 262144) { \n $ERROR('#151: 4194304 >>> 4 === 262144. Actual: ' + (4194304 >>> 4)); \n} \n\n\nif (8388608 >>> 4 !== 524288) { \n $ERROR('#152: 8388608 >>> 4 === 524288. Actual: ' + (8388608 >>> 4)); \n} \n\n\nif (16777216 >>> 4 !== 1048576) { \n $ERROR('#153: 16777216 >>> 4 === 1048576. Actual: ' + (16777216 >>> 4)); \n} \n\n\nif (33554432 >>> 4 !== 2097152) { \n $ERROR('#154: 33554432 >>> 4 === 2097152. Actual: ' + (33554432 >>> 4)); \n} \n\n\nif (67108864 >>> 4 !== 4194304) { \n $ERROR('#155: 67108864 >>> 4 === 4194304. Actual: ' + (67108864 >>> 4)); \n} \n\n\nif (134217728 >>> 4 !== 8388608) { \n $ERROR('#156: 134217728 >>> 4 === 8388608. Actual: ' + (134217728 >>> 4)); \n} \n\n\nif (268435456 >>> 4 !== 16777216) { \n $ERROR('#157: 268435456 >>> 4 === 16777216. Actual: ' + (268435456 >>> 4)); \n} \n\n\nif (536870912 >>> 4 !== 33554432) { \n $ERROR('#158: 536870912 >>> 4 === 33554432. Actual: ' + (536870912 >>> 4)); \n} \n\n\nif (1073741824 >>> 4 !== 67108864) { \n $ERROR('#159: 1073741824 >>> 4 === 67108864. Actual: ' + (1073741824 >>> 4)); \n} \n\n\nif (2147483648 >>> 4 !== 134217728) { \n $ERROR('#160: 2147483648 >>> 4 === 134217728. Actual: ' + (2147483648 >>> 4)); \n} \n\n\nif (1 >>> 5 !== 0) { \n $ERROR('#161: 1 >>> 5 === 0. Actual: ' + (1 >>> 5)); \n} \n\n\nif (2 >>> 5 !== 0) { \n $ERROR('#162: 2 >>> 5 === 0. Actual: ' + (2 >>> 5)); \n} \n\n\nif (4 >>> 5 !== 0) { \n $ERROR('#163: 4 >>> 5 === 0. Actual: ' + (4 >>> 5)); \n} \n\n\nif (8 >>> 5 !== 0) { \n $ERROR('#164: 8 >>> 5 === 0. Actual: ' + (8 >>> 5)); \n} \n\n\nif (16 >>> 5 !== 0) { \n $ERROR('#165: 16 >>> 5 === 0. Actual: ' + (16 >>> 5)); \n} \n\n\nif (32 >>> 5 !== 1) { \n $ERROR('#166: 32 >>> 5 === 1. Actual: ' + (32 >>> 5)); \n} \n\n\nif (64 >>> 5 !== 2) { \n $ERROR('#167: 64 >>> 5 === 2. Actual: ' + (64 >>> 5)); \n} \n\n\nif (128 >>> 5 !== 4) { \n $ERROR('#168: 128 >>> 5 === 4. Actual: ' + (128 >>> 5)); \n} \n\n\nif (256 >>> 5 !== 8) { \n $ERROR('#169: 256 >>> 5 === 8. Actual: ' + (256 >>> 5)); \n} \n\n\nif (512 >>> 5 !== 16) { \n $ERROR('#170: 512 >>> 5 === 16. Actual: ' + (512 >>> 5)); \n} \n\n\nif (1024 >>> 5 !== 32) { \n $ERROR('#171: 1024 >>> 5 === 32. Actual: ' + (1024 >>> 5)); \n} \n\n\nif (2048 >>> 5 !== 64) { \n $ERROR('#172: 2048 >>> 5 === 64. Actual: ' + (2048 >>> 5)); \n} \n\n\nif (4096 >>> 5 !== 128) { \n $ERROR('#173: 4096 >>> 5 === 128. Actual: ' + (4096 >>> 5)); \n} \n\n\nif (8192 >>> 5 !== 256) { \n $ERROR('#174: 8192 >>> 5 === 256. Actual: ' + (8192 >>> 5)); \n} \n\n\nif (16384 >>> 5 !== 512) { \n $ERROR('#175: 16384 >>> 5 === 512. Actual: ' + (16384 >>> 5)); \n} \n\n\nif (32768 >>> 5 !== 1024) { \n $ERROR('#176: 32768 >>> 5 === 1024. Actual: ' + (32768 >>> 5)); \n} \n\n\nif (65536 >>> 5 !== 2048) { \n $ERROR('#177: 65536 >>> 5 === 2048. Actual: ' + (65536 >>> 5)); \n} \n\n\nif (131072 >>> 5 !== 4096) { \n $ERROR('#178: 131072 >>> 5 === 4096. Actual: ' + (131072 >>> 5)); \n} \n\n\nif (262144 >>> 5 !== 8192) { \n $ERROR('#179: 262144 >>> 5 === 8192. Actual: ' + (262144 >>> 5)); \n} \n\n\nif (524288 >>> 5 !== 16384) { \n $ERROR('#180: 524288 >>> 5 === 16384. Actual: ' + (524288 >>> 5)); \n} \n\n\nif (1048576 >>> 5 !== 32768) { \n $ERROR('#181: 1048576 >>> 5 === 32768. Actual: ' + (1048576 >>> 5)); \n} \n\n\nif (2097152 >>> 5 !== 65536) { \n $ERROR('#182: 2097152 >>> 5 === 65536. Actual: ' + (2097152 >>> 5)); \n} \n\n\nif (4194304 >>> 5 !== 131072) { \n $ERROR('#183: 4194304 >>> 5 === 131072. Actual: ' + (4194304 >>> 5)); \n} \n\n\nif (8388608 >>> 5 !== 262144) { \n $ERROR('#184: 8388608 >>> 5 === 262144. Actual: ' + (8388608 >>> 5)); \n} \n\n\nif (16777216 >>> 5 !== 524288) { \n $ERROR('#185: 16777216 >>> 5 === 524288. Actual: ' + (16777216 >>> 5)); \n} \n\n\nif (33554432 >>> 5 !== 1048576) { \n $ERROR('#186: 33554432 >>> 5 === 1048576. Actual: ' + (33554432 >>> 5)); \n} \n\n\nif (67108864 >>> 5 !== 2097152) { \n $ERROR('#187: 67108864 >>> 5 === 2097152. Actual: ' + (67108864 >>> 5)); \n} \n\n\nif (134217728 >>> 5 !== 4194304) { \n $ERROR('#188: 134217728 >>> 5 === 4194304. Actual: ' + (134217728 >>> 5)); \n} \n\n\nif (268435456 >>> 5 !== 8388608) { \n $ERROR('#189: 268435456 >>> 5 === 8388608. Actual: ' + (268435456 >>> 5)); \n} \n\n\nif (536870912 >>> 5 !== 16777216) { \n $ERROR('#190: 536870912 >>> 5 === 16777216. Actual: ' + (536870912 >>> 5)); \n} \n\n\nif (1073741824 >>> 5 !== 33554432) { \n $ERROR('#191: 1073741824 >>> 5 === 33554432. Actual: ' + (1073741824 >>> 5)); \n} \n\n\nif (2147483648 >>> 5 !== 67108864) { \n $ERROR('#192: 2147483648 >>> 5 === 67108864. Actual: ' + (2147483648 >>> 5)); \n} \n\n\nif (1 >>> 6 !== 0) { \n $ERROR('#193: 1 >>> 6 === 0. Actual: ' + (1 >>> 6)); \n} \n\n\nif (2 >>> 6 !== 0) { \n $ERROR('#194: 2 >>> 6 === 0. Actual: ' + (2 >>> 6)); \n} \n\n\nif (4 >>> 6 !== 0) { \n $ERROR('#195: 4 >>> 6 === 0. Actual: ' + (4 >>> 6)); \n} \n\n\nif (8 >>> 6 !== 0) { \n $ERROR('#196: 8 >>> 6 === 0. Actual: ' + (8 >>> 6)); \n} \n\n\nif (16 >>> 6 !== 0) { \n $ERROR('#197: 16 >>> 6 === 0. Actual: ' + (16 >>> 6)); \n} \n\n\nif (32 >>> 6 !== 0) { \n $ERROR('#198: 32 >>> 6 === 0. Actual: ' + (32 >>> 6)); \n} \n\n\nif (64 >>> 6 !== 1) { \n $ERROR('#199: 64 >>> 6 === 1. Actual: ' + (64 >>> 6)); \n} \n\n\nif (128 >>> 6 !== 2) { \n $ERROR('#200: 128 >>> 6 === 2. Actual: ' + (128 >>> 6)); \n} \n\n\nif (256 >>> 6 !== 4) { \n $ERROR('#201: 256 >>> 6 === 4. Actual: ' + (256 >>> 6)); \n} \n\n\nif (512 >>> 6 !== 8) { \n $ERROR('#202: 512 >>> 6 === 8. Actual: ' + (512 >>> 6)); \n} \n\n\nif (1024 >>> 6 !== 16) { \n $ERROR('#203: 1024 >>> 6 === 16. Actual: ' + (1024 >>> 6)); \n} \n\n\nif (2048 >>> 6 !== 32) { \n $ERROR('#204: 2048 >>> 6 === 32. Actual: ' + (2048 >>> 6)); \n} \n\n\nif (4096 >>> 6 !== 64) { \n $ERROR('#205: 4096 >>> 6 === 64. Actual: ' + (4096 >>> 6)); \n} \n\n\nif (8192 >>> 6 !== 128) { \n $ERROR('#206: 8192 >>> 6 === 128. Actual: ' + (8192 >>> 6)); \n} \n\n\nif (16384 >>> 6 !== 256) { \n $ERROR('#207: 16384 >>> 6 === 256. Actual: ' + (16384 >>> 6)); \n} \n\n\nif (32768 >>> 6 !== 512) { \n $ERROR('#208: 32768 >>> 6 === 512. Actual: ' + (32768 >>> 6)); \n} \n\n\nif (65536 >>> 6 !== 1024) { \n $ERROR('#209: 65536 >>> 6 === 1024. Actual: ' + (65536 >>> 6)); \n} \n\n\nif (131072 >>> 6 !== 2048) { \n $ERROR('#210: 131072 >>> 6 === 2048. Actual: ' + (131072 >>> 6)); \n} \n\n\nif (262144 >>> 6 !== 4096) { \n $ERROR('#211: 262144 >>> 6 === 4096. Actual: ' + (262144 >>> 6)); \n} \n\n\nif (524288 >>> 6 !== 8192) { \n $ERROR('#212: 524288 >>> 6 === 8192. Actual: ' + (524288 >>> 6)); \n} \n\n\nif (1048576 >>> 6 !== 16384) { \n $ERROR('#213: 1048576 >>> 6 === 16384. Actual: ' + (1048576 >>> 6)); \n} \n\n\nif (2097152 >>> 6 !== 32768) { \n $ERROR('#214: 2097152 >>> 6 === 32768. Actual: ' + (2097152 >>> 6)); \n} \n\n\nif (4194304 >>> 6 !== 65536) { \n $ERROR('#215: 4194304 >>> 6 === 65536. Actual: ' + (4194304 >>> 6)); \n} \n\n\nif (8388608 >>> 6 !== 131072) { \n $ERROR('#216: 8388608 >>> 6 === 131072. Actual: ' + (8388608 >>> 6)); \n} \n\n\nif (16777216 >>> 6 !== 262144) { \n $ERROR('#217: 16777216 >>> 6 === 262144. Actual: ' + (16777216 >>> 6)); \n} \n\n\nif (33554432 >>> 6 !== 524288) { \n $ERROR('#218: 33554432 >>> 6 === 524288. Actual: ' + (33554432 >>> 6)); \n} \n\n\nif (67108864 >>> 6 !== 1048576) { \n $ERROR('#219: 67108864 >>> 6 === 1048576. Actual: ' + (67108864 >>> 6)); \n} \n\n\nif (134217728 >>> 6 !== 2097152) { \n $ERROR('#220: 134217728 >>> 6 === 2097152. Actual: ' + (134217728 >>> 6)); \n} \n\n\nif (268435456 >>> 6 !== 4194304) { \n $ERROR('#221: 268435456 >>> 6 === 4194304. Actual: ' + (268435456 >>> 6)); \n} \n\n\nif (536870912 >>> 6 !== 8388608) { \n $ERROR('#222: 536870912 >>> 6 === 8388608. Actual: ' + (536870912 >>> 6)); \n} \n\n\nif (1073741824 >>> 6 !== 16777216) { \n $ERROR('#223: 1073741824 >>> 6 === 16777216. Actual: ' + (1073741824 >>> 6)); \n} \n\n\nif (2147483648 >>> 6 !== 33554432) { \n $ERROR('#224: 2147483648 >>> 6 === 33554432. Actual: ' + (2147483648 >>> 6)); \n} \n\n\nif (1 >>> 7 !== 0) { \n $ERROR('#225: 1 >>> 7 === 0. Actual: ' + (1 >>> 7)); \n} \n\n\nif (2 >>> 7 !== 0) { \n $ERROR('#226: 2 >>> 7 === 0. Actual: ' + (2 >>> 7)); \n} \n\n\nif (4 >>> 7 !== 0) { \n $ERROR('#227: 4 >>> 7 === 0. Actual: ' + (4 >>> 7)); \n} \n\n\nif (8 >>> 7 !== 0) { \n $ERROR('#228: 8 >>> 7 === 0. Actual: ' + (8 >>> 7)); \n} \n\n\nif (16 >>> 7 !== 0) { \n $ERROR('#229: 16 >>> 7 === 0. Actual: ' + (16 >>> 7)); \n} \n\n\nif (32 >>> 7 !== 0) { \n $ERROR('#230: 32 >>> 7 === 0. Actual: ' + (32 >>> 7)); \n} \n\n\nif (64 >>> 7 !== 0) { \n $ERROR('#231: 64 >>> 7 === 0. Actual: ' + (64 >>> 7)); \n} \n\n\nif (128 >>> 7 !== 1) { \n $ERROR('#232: 128 >>> 7 === 1. Actual: ' + (128 >>> 7)); \n} \n\n\nif (256 >>> 7 !== 2) { \n $ERROR('#233: 256 >>> 7 === 2. Actual: ' + (256 >>> 7)); \n} \n\n\nif (512 >>> 7 !== 4) { \n $ERROR('#234: 512 >>> 7 === 4. Actual: ' + (512 >>> 7)); \n} \n\n\nif (1024 >>> 7 !== 8) { \n $ERROR('#235: 1024 >>> 7 === 8. Actual: ' + (1024 >>> 7)); \n} \n\n\nif (2048 >>> 7 !== 16) { \n $ERROR('#236: 2048 >>> 7 === 16. Actual: ' + (2048 >>> 7)); \n} \n\n\nif (4096 >>> 7 !== 32) { \n $ERROR('#237: 4096 >>> 7 === 32. Actual: ' + (4096 >>> 7)); \n} \n\n\nif (8192 >>> 7 !== 64) { \n $ERROR('#238: 8192 >>> 7 === 64. Actual: ' + (8192 >>> 7)); \n} \n\n\nif (16384 >>> 7 !== 128) { \n $ERROR('#239: 16384 >>> 7 === 128. Actual: ' + (16384 >>> 7)); \n} \n\n\nif (32768 >>> 7 !== 256) { \n $ERROR('#240: 32768 >>> 7 === 256. Actual: ' + (32768 >>> 7)); \n} \n\n\nif (65536 >>> 7 !== 512) { \n $ERROR('#241: 65536 >>> 7 === 512. Actual: ' + (65536 >>> 7)); \n} \n\n\nif (131072 >>> 7 !== 1024) { \n $ERROR('#242: 131072 >>> 7 === 1024. Actual: ' + (131072 >>> 7)); \n} \n\n\nif (262144 >>> 7 !== 2048) { \n $ERROR('#243: 262144 >>> 7 === 2048. Actual: ' + (262144 >>> 7)); \n} \n\n\nif (524288 >>> 7 !== 4096) { \n $ERROR('#244: 524288 >>> 7 === 4096. Actual: ' + (524288 >>> 7)); \n} \n\n\nif (1048576 >>> 7 !== 8192) { \n $ERROR('#245: 1048576 >>> 7 === 8192. Actual: ' + (1048576 >>> 7)); \n} \n\n\nif (2097152 >>> 7 !== 16384) { \n $ERROR('#246: 2097152 >>> 7 === 16384. Actual: ' + (2097152 >>> 7)); \n} \n\n\nif (4194304 >>> 7 !== 32768) { \n $ERROR('#247: 4194304 >>> 7 === 32768. Actual: ' + (4194304 >>> 7)); \n} \n\n\nif (8388608 >>> 7 !== 65536) { \n $ERROR('#248: 8388608 >>> 7 === 65536. Actual: ' + (8388608 >>> 7)); \n} \n\n\nif (16777216 >>> 7 !== 131072) { \n $ERROR('#249: 16777216 >>> 7 === 131072. Actual: ' + (16777216 >>> 7)); \n} \n\n\nif (33554432 >>> 7 !== 262144) { \n $ERROR('#250: 33554432 >>> 7 === 262144. Actual: ' + (33554432 >>> 7)); \n} \n\n\nif (67108864 >>> 7 !== 524288) { \n $ERROR('#251: 67108864 >>> 7 === 524288. Actual: ' + (67108864 >>> 7)); \n} \n\n\nif (134217728 >>> 7 !== 1048576) { \n $ERROR('#252: 134217728 >>> 7 === 1048576. Actual: ' + (134217728 >>> 7)); \n} \n\n\nif (268435456 >>> 7 !== 2097152) { \n $ERROR('#253: 268435456 >>> 7 === 2097152. Actual: ' + (268435456 >>> 7)); \n} \n\n\nif (536870912 >>> 7 !== 4194304) { \n $ERROR('#254: 536870912 >>> 7 === 4194304. Actual: ' + (536870912 >>> 7)); \n} \n\n\nif (1073741824 >>> 7 !== 8388608) { \n $ERROR('#255: 1073741824 >>> 7 === 8388608. Actual: ' + (1073741824 >>> 7)); \n} \n\n\nif (2147483648 >>> 7 !== 16777216) { \n $ERROR('#256: 2147483648 >>> 7 === 16777216. Actual: ' + (2147483648 >>> 7)); \n} \n\n\nif (1 >>> 8 !== 0) { \n $ERROR('#257: 1 >>> 8 === 0. Actual: ' + (1 >>> 8)); \n} \n\n\nif (2 >>> 8 !== 0) { \n $ERROR('#258: 2 >>> 8 === 0. Actual: ' + (2 >>> 8)); \n} \n\n\nif (4 >>> 8 !== 0) { \n $ERROR('#259: 4 >>> 8 === 0. Actual: ' + (4 >>> 8)); \n} \n\n\nif (8 >>> 8 !== 0) { \n $ERROR('#260: 8 >>> 8 === 0. Actual: ' + (8 >>> 8)); \n} \n\n\nif (16 >>> 8 !== 0) { \n $ERROR('#261: 16 >>> 8 === 0. Actual: ' + (16 >>> 8)); \n} \n\n\nif (32 >>> 8 !== 0) { \n $ERROR('#262: 32 >>> 8 === 0. Actual: ' + (32 >>> 8)); \n} \n\n\nif (64 >>> 8 !== 0) { \n $ERROR('#263: 64 >>> 8 === 0. Actual: ' + (64 >>> 8)); \n} \n\n\nif (128 >>> 8 !== 0) { \n $ERROR('#264: 128 >>> 8 === 0. Actual: ' + (128 >>> 8)); \n} \n\n\nif (256 >>> 8 !== 1) { \n $ERROR('#265: 256 >>> 8 === 1. Actual: ' + (256 >>> 8)); \n} \n\n\nif (512 >>> 8 !== 2) { \n $ERROR('#266: 512 >>> 8 === 2. Actual: ' + (512 >>> 8)); \n} \n\n\nif (1024 >>> 8 !== 4) { \n $ERROR('#267: 1024 >>> 8 === 4. Actual: ' + (1024 >>> 8)); \n} \n\n\nif (2048 >>> 8 !== 8) { \n $ERROR('#268: 2048 >>> 8 === 8. Actual: ' + (2048 >>> 8)); \n} \n\n\nif (4096 >>> 8 !== 16) { \n $ERROR('#269: 4096 >>> 8 === 16. Actual: ' + (4096 >>> 8)); \n} \n\n\nif (8192 >>> 8 !== 32) { \n $ERROR('#270: 8192 >>> 8 === 32. Actual: ' + (8192 >>> 8)); \n} \n\n\nif (16384 >>> 8 !== 64) { \n $ERROR('#271: 16384 >>> 8 === 64. Actual: ' + (16384 >>> 8)); \n} \n\n\nif (32768 >>> 8 !== 128) { \n $ERROR('#272: 32768 >>> 8 === 128. Actual: ' + (32768 >>> 8)); \n} \n\n\nif (65536 >>> 8 !== 256) { \n $ERROR('#273: 65536 >>> 8 === 256. Actual: ' + (65536 >>> 8)); \n} \n\n\nif (131072 >>> 8 !== 512) { \n $ERROR('#274: 131072 >>> 8 === 512. Actual: ' + (131072 >>> 8)); \n} \n\n\nif (262144 >>> 8 !== 1024) { \n $ERROR('#275: 262144 >>> 8 === 1024. Actual: ' + (262144 >>> 8)); \n} \n\n\nif (524288 >>> 8 !== 2048) { \n $ERROR('#276: 524288 >>> 8 === 2048. Actual: ' + (524288 >>> 8)); \n} \n\n\nif (1048576 >>> 8 !== 4096) { \n $ERROR('#277: 1048576 >>> 8 === 4096. Actual: ' + (1048576 >>> 8)); \n} \n\n\nif (2097152 >>> 8 !== 8192) { \n $ERROR('#278: 2097152 >>> 8 === 8192. Actual: ' + (2097152 >>> 8)); \n} \n\n\nif (4194304 >>> 8 !== 16384) { \n $ERROR('#279: 4194304 >>> 8 === 16384. Actual: ' + (4194304 >>> 8)); \n} \n\n\nif (8388608 >>> 8 !== 32768) { \n $ERROR('#280: 8388608 >>> 8 === 32768. Actual: ' + (8388608 >>> 8)); \n} \n\n\nif (16777216 >>> 8 !== 65536) { \n $ERROR('#281: 16777216 >>> 8 === 65536. Actual: ' + (16777216 >>> 8)); \n} \n\n\nif (33554432 >>> 8 !== 131072) { \n $ERROR('#282: 33554432 >>> 8 === 131072. Actual: ' + (33554432 >>> 8)); \n} \n\n\nif (67108864 >>> 8 !== 262144) { \n $ERROR('#283: 67108864 >>> 8 === 262144. Actual: ' + (67108864 >>> 8)); \n} \n\n\nif (134217728 >>> 8 !== 524288) { \n $ERROR('#284: 134217728 >>> 8 === 524288. Actual: ' + (134217728 >>> 8)); \n} \n\n\nif (268435456 >>> 8 !== 1048576) { \n $ERROR('#285: 268435456 >>> 8 === 1048576. Actual: ' + (268435456 >>> 8)); \n} \n\n\nif (536870912 >>> 8 !== 2097152) { \n $ERROR('#286: 536870912 >>> 8 === 2097152. Actual: ' + (536870912 >>> 8)); \n} \n\n\nif (1073741824 >>> 8 !== 4194304) { \n $ERROR('#287: 1073741824 >>> 8 === 4194304. Actual: ' + (1073741824 >>> 8)); \n} \n\n\nif (2147483648 >>> 8 !== 8388608) { \n $ERROR('#288: 2147483648 >>> 8 === 8388608. Actual: ' + (2147483648 >>> 8)); \n} \n\n\nif (1 >>> 9 !== 0) { \n $ERROR('#289: 1 >>> 9 === 0. Actual: ' + (1 >>> 9)); \n} \n\n\nif (2 >>> 9 !== 0) { \n $ERROR('#290: 2 >>> 9 === 0. Actual: ' + (2 >>> 9)); \n} \n\n\nif (4 >>> 9 !== 0) { \n $ERROR('#291: 4 >>> 9 === 0. Actual: ' + (4 >>> 9)); \n} \n\n\nif (8 >>> 9 !== 0) { \n $ERROR('#292: 8 >>> 9 === 0. Actual: ' + (8 >>> 9)); \n} \n\n\nif (16 >>> 9 !== 0) { \n $ERROR('#293: 16 >>> 9 === 0. Actual: ' + (16 >>> 9)); \n} \n\n\nif (32 >>> 9 !== 0) { \n $ERROR('#294: 32 >>> 9 === 0. Actual: ' + (32 >>> 9)); \n} \n\n\nif (64 >>> 9 !== 0) { \n $ERROR('#295: 64 >>> 9 === 0. Actual: ' + (64 >>> 9)); \n} \n\n\nif (128 >>> 9 !== 0) { \n $ERROR('#296: 128 >>> 9 === 0. Actual: ' + (128 >>> 9)); \n} \n\n\nif (256 >>> 9 !== 0) { \n $ERROR('#297: 256 >>> 9 === 0. Actual: ' + (256 >>> 9)); \n} \n\n\nif (512 >>> 9 !== 1) { \n $ERROR('#298: 512 >>> 9 === 1. Actual: ' + (512 >>> 9)); \n} \n\n\nif (1024 >>> 9 !== 2) { \n $ERROR('#299: 1024 >>> 9 === 2. Actual: ' + (1024 >>> 9)); \n} \n\n\nif (2048 >>> 9 !== 4) { \n $ERROR('#300: 2048 >>> 9 === 4. Actual: ' + (2048 >>> 9)); \n} \n\n\nif (4096 >>> 9 !== 8) { \n $ERROR('#301: 4096 >>> 9 === 8. Actual: ' + (4096 >>> 9)); \n} \n\n\nif (8192 >>> 9 !== 16) { \n $ERROR('#302: 8192 >>> 9 === 16. Actual: ' + (8192 >>> 9)); \n} \n\n\nif (16384 >>> 9 !== 32) { \n $ERROR('#303: 16384 >>> 9 === 32. Actual: ' + (16384 >>> 9)); \n} \n\n\nif (32768 >>> 9 !== 64) { \n $ERROR('#304: 32768 >>> 9 === 64. Actual: ' + (32768 >>> 9)); \n} \n\n\nif (65536 >>> 9 !== 128) { \n $ERROR('#305: 65536 >>> 9 === 128. Actual: ' + (65536 >>> 9)); \n} \n\n\nif (131072 >>> 9 !== 256) { \n $ERROR('#306: 131072 >>> 9 === 256. Actual: ' + (131072 >>> 9)); \n} \n\n\nif (262144 >>> 9 !== 512) { \n $ERROR('#307: 262144 >>> 9 === 512. Actual: ' + (262144 >>> 9)); \n} \n\n\nif (524288 >>> 9 !== 1024) { \n $ERROR('#308: 524288 >>> 9 === 1024. Actual: ' + (524288 >>> 9)); \n} \n\n\nif (1048576 >>> 9 !== 2048) { \n $ERROR('#309: 1048576 >>> 9 === 2048. Actual: ' + (1048576 >>> 9)); \n} \n\n\nif (2097152 >>> 9 !== 4096) { \n $ERROR('#310: 2097152 >>> 9 === 4096. Actual: ' + (2097152 >>> 9)); \n} \n\n\nif (4194304 >>> 9 !== 8192) { \n $ERROR('#311: 4194304 >>> 9 === 8192. Actual: ' + (4194304 >>> 9)); \n} \n\n\nif (8388608 >>> 9 !== 16384) { \n $ERROR('#312: 8388608 >>> 9 === 16384. Actual: ' + (8388608 >>> 9)); \n} \n\n\nif (16777216 >>> 9 !== 32768) { \n $ERROR('#313: 16777216 >>> 9 === 32768. Actual: ' + (16777216 >>> 9)); \n} \n\n\nif (33554432 >>> 9 !== 65536) { \n $ERROR('#314: 33554432 >>> 9 === 65536. Actual: ' + (33554432 >>> 9)); \n} \n\n\nif (67108864 >>> 9 !== 131072) { \n $ERROR('#315: 67108864 >>> 9 === 131072. Actual: ' + (67108864 >>> 9)); \n} \n\n\nif (134217728 >>> 9 !== 262144) { \n $ERROR('#316: 134217728 >>> 9 === 262144. Actual: ' + (134217728 >>> 9)); \n} \n\n\nif (268435456 >>> 9 !== 524288) { \n $ERROR('#317: 268435456 >>> 9 === 524288. Actual: ' + (268435456 >>> 9)); \n} \n\n\nif (536870912 >>> 9 !== 1048576) { \n $ERROR('#318: 536870912 >>> 9 === 1048576. Actual: ' + (536870912 >>> 9)); \n} \n\n\nif (1073741824 >>> 9 !== 2097152) { \n $ERROR('#319: 1073741824 >>> 9 === 2097152. Actual: ' + (1073741824 >>> 9)); \n} \n\n\nif (2147483648 >>> 9 !== 4194304) { \n $ERROR('#320: 2147483648 >>> 9 === 4194304. Actual: ' + (2147483648 >>> 9)); \n} \n\n\nif (1 >>> 10 !== 0) { \n $ERROR('#321: 1 >>> 10 === 0. Actual: ' + (1 >>> 10)); \n} \n\n\nif (2 >>> 10 !== 0) { \n $ERROR('#322: 2 >>> 10 === 0. Actual: ' + (2 >>> 10)); \n} \n\n\nif (4 >>> 10 !== 0) { \n $ERROR('#323: 4 >>> 10 === 0. Actual: ' + (4 >>> 10)); \n} \n\n\nif (8 >>> 10 !== 0) { \n $ERROR('#324: 8 >>> 10 === 0. Actual: ' + (8 >>> 10)); \n} \n\n\nif (16 >>> 10 !== 0) { \n $ERROR('#325: 16 >>> 10 === 0. Actual: ' + (16 >>> 10)); \n} \n\n\nif (32 >>> 10 !== 0) { \n $ERROR('#326: 32 >>> 10 === 0. Actual: ' + (32 >>> 10)); \n} \n\n\nif (64 >>> 10 !== 0) { \n $ERROR('#327: 64 >>> 10 === 0. Actual: ' + (64 >>> 10)); \n} \n\n\nif (128 >>> 10 !== 0) { \n $ERROR('#328: 128 >>> 10 === 0. Actual: ' + (128 >>> 10)); \n} \n\n\nif (256 >>> 10 !== 0) { \n $ERROR('#329: 256 >>> 10 === 0. Actual: ' + (256 >>> 10)); \n} \n\n\nif (512 >>> 10 !== 0) { \n $ERROR('#330: 512 >>> 10 === 0. Actual: ' + (512 >>> 10)); \n} \n\n\nif (1024 >>> 10 !== 1) { \n $ERROR('#331: 1024 >>> 10 === 1. Actual: ' + (1024 >>> 10)); \n} \n\n\nif (2048 >>> 10 !== 2) { \n $ERROR('#332: 2048 >>> 10 === 2. Actual: ' + (2048 >>> 10)); \n} \n\n\nif (4096 >>> 10 !== 4) { \n $ERROR('#333: 4096 >>> 10 === 4. Actual: ' + (4096 >>> 10)); \n} \n\n\nif (8192 >>> 10 !== 8) { \n $ERROR('#334: 8192 >>> 10 === 8. Actual: ' + (8192 >>> 10)); \n} \n\n\nif (16384 >>> 10 !== 16) { \n $ERROR('#335: 16384 >>> 10 === 16. Actual: ' + (16384 >>> 10)); \n} \n\n\nif (32768 >>> 10 !== 32) { \n $ERROR('#336: 32768 >>> 10 === 32. Actual: ' + (32768 >>> 10)); \n} \n\n\nif (65536 >>> 10 !== 64) { \n $ERROR('#337: 65536 >>> 10 === 64. Actual: ' + (65536 >>> 10)); \n} \n\n\nif (131072 >>> 10 !== 128) { \n $ERROR('#338: 131072 >>> 10 === 128. Actual: ' + (131072 >>> 10)); \n} \n\n\nif (262144 >>> 10 !== 256) { \n $ERROR('#339: 262144 >>> 10 === 256. Actual: ' + (262144 >>> 10)); \n} \n\n\nif (524288 >>> 10 !== 512) { \n $ERROR('#340: 524288 >>> 10 === 512. Actual: ' + (524288 >>> 10)); \n} \n\n\nif (1048576 >>> 10 !== 1024) { \n $ERROR('#341: 1048576 >>> 10 === 1024. Actual: ' + (1048576 >>> 10)); \n} \n\n\nif (2097152 >>> 10 !== 2048) { \n $ERROR('#342: 2097152 >>> 10 === 2048. Actual: ' + (2097152 >>> 10)); \n} \n\n\nif (4194304 >>> 10 !== 4096) { \n $ERROR('#343: 4194304 >>> 10 === 4096. Actual: ' + (4194304 >>> 10)); \n} \n\n\nif (8388608 >>> 10 !== 8192) { \n $ERROR('#344: 8388608 >>> 10 === 8192. Actual: ' + (8388608 >>> 10)); \n} \n\n\nif (16777216 >>> 10 !== 16384) { \n $ERROR('#345: 16777216 >>> 10 === 16384. Actual: ' + (16777216 >>> 10)); \n} \n\n\nif (33554432 >>> 10 !== 32768) { \n $ERROR('#346: 33554432 >>> 10 === 32768. Actual: ' + (33554432 >>> 10)); \n} \n\n\nif (67108864 >>> 10 !== 65536) { \n $ERROR('#347: 67108864 >>> 10 === 65536. Actual: ' + (67108864 >>> 10)); \n} \n\n\nif (134217728 >>> 10 !== 131072) { \n $ERROR('#348: 134217728 >>> 10 === 131072. Actual: ' + (134217728 >>> 10)); \n} \n\n\nif (268435456 >>> 10 !== 262144) { \n $ERROR('#349: 268435456 >>> 10 === 262144. Actual: ' + (268435456 >>> 10)); \n} \n\n\nif (536870912 >>> 10 !== 524288) { \n $ERROR('#350: 536870912 >>> 10 === 524288. Actual: ' + (536870912 >>> 10)); \n} \n\n\nif (1073741824 >>> 10 !== 1048576) { \n $ERROR('#351: 1073741824 >>> 10 === 1048576. Actual: ' + (1073741824 >>> 10)); \n} \n\n\nif (2147483648 >>> 10 !== 2097152) { \n $ERROR('#352: 2147483648 >>> 10 === 2097152. Actual: ' + (2147483648 >>> 10)); \n} \n\n\nif (1 >>> 11 !== 0) { \n $ERROR('#353: 1 >>> 11 === 0. Actual: ' + (1 >>> 11)); \n} \n\n\nif (2 >>> 11 !== 0) { \n $ERROR('#354: 2 >>> 11 === 0. Actual: ' + (2 >>> 11)); \n} \n\n\nif (4 >>> 11 !== 0) { \n $ERROR('#355: 4 >>> 11 === 0. Actual: ' + (4 >>> 11)); \n} \n\n\nif (8 >>> 11 !== 0) { \n $ERROR('#356: 8 >>> 11 === 0. Actual: ' + (8 >>> 11)); \n} \n\n\nif (16 >>> 11 !== 0) { \n $ERROR('#357: 16 >>> 11 === 0. Actual: ' + (16 >>> 11)); \n} \n\n\nif (32 >>> 11 !== 0) { \n $ERROR('#358: 32 >>> 11 === 0. Actual: ' + (32 >>> 11)); \n} \n\n\nif (64 >>> 11 !== 0) { \n $ERROR('#359: 64 >>> 11 === 0. Actual: ' + (64 >>> 11)); \n} \n\n\nif (128 >>> 11 !== 0) { \n $ERROR('#360: 128 >>> 11 === 0. Actual: ' + (128 >>> 11)); \n} \n\n\nif (256 >>> 11 !== 0) { \n $ERROR('#361: 256 >>> 11 === 0. Actual: ' + (256 >>> 11)); \n} \n\n\nif (512 >>> 11 !== 0) { \n $ERROR('#362: 512 >>> 11 === 0. Actual: ' + (512 >>> 11)); \n} \n\n\nif (1024 >>> 11 !== 0) { \n $ERROR('#363: 1024 >>> 11 === 0. Actual: ' + (1024 >>> 11)); \n} \n\n\nif (2048 >>> 11 !== 1) { \n $ERROR('#364: 2048 >>> 11 === 1. Actual: ' + (2048 >>> 11)); \n} \n\n\nif (4096 >>> 11 !== 2) { \n $ERROR('#365: 4096 >>> 11 === 2. Actual: ' + (4096 >>> 11)); \n} \n\n\nif (8192 >>> 11 !== 4) { \n $ERROR('#366: 8192 >>> 11 === 4. Actual: ' + (8192 >>> 11)); \n} \n\n\nif (16384 >>> 11 !== 8) { \n $ERROR('#367: 16384 >>> 11 === 8. Actual: ' + (16384 >>> 11)); \n} \n\n\nif (32768 >>> 11 !== 16) { \n $ERROR('#368: 32768 >>> 11 === 16. Actual: ' + (32768 >>> 11)); \n} \n\n\nif (65536 >>> 11 !== 32) { \n $ERROR('#369: 65536 >>> 11 === 32. Actual: ' + (65536 >>> 11)); \n} \n\n\nif (131072 >>> 11 !== 64) { \n $ERROR('#370: 131072 >>> 11 === 64. Actual: ' + (131072 >>> 11)); \n} \n\n\nif (262144 >>> 11 !== 128) { \n $ERROR('#371: 262144 >>> 11 === 128. Actual: ' + (262144 >>> 11)); \n} \n\n\nif (524288 >>> 11 !== 256) { \n $ERROR('#372: 524288 >>> 11 === 256. Actual: ' + (524288 >>> 11)); \n} \n\n\nif (1048576 >>> 11 !== 512) { \n $ERROR('#373: 1048576 >>> 11 === 512. Actual: ' + (1048576 >>> 11)); \n} \n\n\nif (2097152 >>> 11 !== 1024) { \n $ERROR('#374: 2097152 >>> 11 === 1024. Actual: ' + (2097152 >>> 11)); \n} \n\n\nif (4194304 >>> 11 !== 2048) { \n $ERROR('#375: 4194304 >>> 11 === 2048. Actual: ' + (4194304 >>> 11)); \n} \n\n\nif (8388608 >>> 11 !== 4096) { \n $ERROR('#376: 8388608 >>> 11 === 4096. Actual: ' + (8388608 >>> 11)); \n} \n\n\nif (16777216 >>> 11 !== 8192) { \n $ERROR('#377: 16777216 >>> 11 === 8192. Actual: ' + (16777216 >>> 11)); \n} \n\n\nif (33554432 >>> 11 !== 16384) { \n $ERROR('#378: 33554432 >>> 11 === 16384. Actual: ' + (33554432 >>> 11)); \n} \n\n\nif (67108864 >>> 11 !== 32768) { \n $ERROR('#379: 67108864 >>> 11 === 32768. Actual: ' + (67108864 >>> 11)); \n} \n\n\nif (134217728 >>> 11 !== 65536) { \n $ERROR('#380: 134217728 >>> 11 === 65536. Actual: ' + (134217728 >>> 11)); \n} \n\n\nif (268435456 >>> 11 !== 131072) { \n $ERROR('#381: 268435456 >>> 11 === 131072. Actual: ' + (268435456 >>> 11)); \n} \n\n\nif (536870912 >>> 11 !== 262144) { \n $ERROR('#382: 536870912 >>> 11 === 262144. Actual: ' + (536870912 >>> 11)); \n} \n\n\nif (1073741824 >>> 11 !== 524288) { \n $ERROR('#383: 1073741824 >>> 11 === 524288. Actual: ' + (1073741824 >>> 11)); \n} \n\n\nif (2147483648 >>> 11 !== 1048576) { \n $ERROR('#384: 2147483648 >>> 11 === 1048576. Actual: ' + (2147483648 >>> 11)); \n} \n\n\nif (1 >>> 12 !== 0) { \n $ERROR('#385: 1 >>> 12 === 0. Actual: ' + (1 >>> 12)); \n} \n\n\nif (2 >>> 12 !== 0) { \n $ERROR('#386: 2 >>> 12 === 0. Actual: ' + (2 >>> 12)); \n} \n\n\nif (4 >>> 12 !== 0) { \n $ERROR('#387: 4 >>> 12 === 0. Actual: ' + (4 >>> 12)); \n} \n\n\nif (8 >>> 12 !== 0) { \n $ERROR('#388: 8 >>> 12 === 0. Actual: ' + (8 >>> 12)); \n} \n\n\nif (16 >>> 12 !== 0) { \n $ERROR('#389: 16 >>> 12 === 0. Actual: ' + (16 >>> 12)); \n} \n\n\nif (32 >>> 12 !== 0) { \n $ERROR('#390: 32 >>> 12 === 0. Actual: ' + (32 >>> 12)); \n} \n\n\nif (64 >>> 12 !== 0) { \n $ERROR('#391: 64 >>> 12 === 0. Actual: ' + (64 >>> 12)); \n} \n\n\nif (128 >>> 12 !== 0) { \n $ERROR('#392: 128 >>> 12 === 0. Actual: ' + (128 >>> 12)); \n} \n\n\nif (256 >>> 12 !== 0) { \n $ERROR('#393: 256 >>> 12 === 0. Actual: ' + (256 >>> 12)); \n} \n\n\nif (512 >>> 12 !== 0) { \n $ERROR('#394: 512 >>> 12 === 0. Actual: ' + (512 >>> 12)); \n} \n\n\nif (1024 >>> 12 !== 0) { \n $ERROR('#395: 1024 >>> 12 === 0. Actual: ' + (1024 >>> 12)); \n} \n\n\nif (2048 >>> 12 !== 0) { \n $ERROR('#396: 2048 >>> 12 === 0. Actual: ' + (2048 >>> 12)); \n} \n\n\nif (4096 >>> 12 !== 1) { \n $ERROR('#397: 4096 >>> 12 === 1. Actual: ' + (4096 >>> 12)); \n} \n\n\nif (8192 >>> 12 !== 2) { \n $ERROR('#398: 8192 >>> 12 === 2. Actual: ' + (8192 >>> 12)); \n} \n\n\nif (16384 >>> 12 !== 4) { \n $ERROR('#399: 16384 >>> 12 === 4. Actual: ' + (16384 >>> 12)); \n} \n\n\nif (32768 >>> 12 !== 8) { \n $ERROR('#400: 32768 >>> 12 === 8. Actual: ' + (32768 >>> 12)); \n} \n\n\nif (65536 >>> 12 !== 16) { \n $ERROR('#401: 65536 >>> 12 === 16. Actual: ' + (65536 >>> 12)); \n} \n\n\nif (131072 >>> 12 !== 32) { \n $ERROR('#402: 131072 >>> 12 === 32. Actual: ' + (131072 >>> 12)); \n} \n\n\nif (262144 >>> 12 !== 64) { \n $ERROR('#403: 262144 >>> 12 === 64. Actual: ' + (262144 >>> 12)); \n} \n\n\nif (524288 >>> 12 !== 128) { \n $ERROR('#404: 524288 >>> 12 === 128. Actual: ' + (524288 >>> 12)); \n} \n\n\nif (1048576 >>> 12 !== 256) { \n $ERROR('#405: 1048576 >>> 12 === 256. Actual: ' + (1048576 >>> 12)); \n} \n\n\nif (2097152 >>> 12 !== 512) { \n $ERROR('#406: 2097152 >>> 12 === 512. Actual: ' + (2097152 >>> 12)); \n} \n\n\nif (4194304 >>> 12 !== 1024) { \n $ERROR('#407: 4194304 >>> 12 === 1024. Actual: ' + (4194304 >>> 12)); \n} \n\n\nif (8388608 >>> 12 !== 2048) { \n $ERROR('#408: 8388608 >>> 12 === 2048. Actual: ' + (8388608 >>> 12)); \n} \n\n\nif (16777216 >>> 12 !== 4096) { \n $ERROR('#409: 16777216 >>> 12 === 4096. Actual: ' + (16777216 >>> 12)); \n} \n\n\nif (33554432 >>> 12 !== 8192) { \n $ERROR('#410: 33554432 >>> 12 === 8192. Actual: ' + (33554432 >>> 12)); \n} \n\n\nif (67108864 >>> 12 !== 16384) { \n $ERROR('#411: 67108864 >>> 12 === 16384. Actual: ' + (67108864 >>> 12)); \n} \n\n\nif (134217728 >>> 12 !== 32768) { \n $ERROR('#412: 134217728 >>> 12 === 32768. Actual: ' + (134217728 >>> 12)); \n} \n\n\nif (268435456 >>> 12 !== 65536) { \n $ERROR('#413: 268435456 >>> 12 === 65536. Actual: ' + (268435456 >>> 12)); \n} \n\n\nif (536870912 >>> 12 !== 131072) { \n $ERROR('#414: 536870912 >>> 12 === 131072. Actual: ' + (536870912 >>> 12)); \n} \n\n\nif (1073741824 >>> 12 !== 262144) { \n $ERROR('#415: 1073741824 >>> 12 === 262144. Actual: ' + (1073741824 >>> 12)); \n} \n\n\nif (2147483648 >>> 12 !== 524288) { \n $ERROR('#416: 2147483648 >>> 12 === 524288. Actual: ' + (2147483648 >>> 12)); \n} \n\n\nif (1 >>> 13 !== 0) { \n $ERROR('#417: 1 >>> 13 === 0. Actual: ' + (1 >>> 13)); \n} \n\n\nif (2 >>> 13 !== 0) { \n $ERROR('#418: 2 >>> 13 === 0. Actual: ' + (2 >>> 13)); \n} \n\n\nif (4 >>> 13 !== 0) { \n $ERROR('#419: 4 >>> 13 === 0. Actual: ' + (4 >>> 13)); \n} \n\n\nif (8 >>> 13 !== 0) { \n $ERROR('#420: 8 >>> 13 === 0. Actual: ' + (8 >>> 13)); \n} \n\n\nif (16 >>> 13 !== 0) { \n $ERROR('#421: 16 >>> 13 === 0. Actual: ' + (16 >>> 13)); \n} \n\n\nif (32 >>> 13 !== 0) { \n $ERROR('#422: 32 >>> 13 === 0. Actual: ' + (32 >>> 13)); \n} \n\n\nif (64 >>> 13 !== 0) { \n $ERROR('#423: 64 >>> 13 === 0. Actual: ' + (64 >>> 13)); \n} \n\n\nif (128 >>> 13 !== 0) { \n $ERROR('#424: 128 >>> 13 === 0. Actual: ' + (128 >>> 13)); \n} \n\n\nif (256 >>> 13 !== 0) { \n $ERROR('#425: 256 >>> 13 === 0. Actual: ' + (256 >>> 13)); \n} \n\n\nif (512 >>> 13 !== 0) { \n $ERROR('#426: 512 >>> 13 === 0. Actual: ' + (512 >>> 13)); \n} \n\n\nif (1024 >>> 13 !== 0) { \n $ERROR('#427: 1024 >>> 13 === 0. Actual: ' + (1024 >>> 13)); \n} \n\n\nif (2048 >>> 13 !== 0) { \n $ERROR('#428: 2048 >>> 13 === 0. Actual: ' + (2048 >>> 13)); \n} \n\n\nif (4096 >>> 13 !== 0) { \n $ERROR('#429: 4096 >>> 13 === 0. Actual: ' + (4096 >>> 13)); \n} \n\n\nif (8192 >>> 13 !== 1) { \n $ERROR('#430: 8192 >>> 13 === 1. Actual: ' + (8192 >>> 13)); \n} \n\n\nif (16384 >>> 13 !== 2) { \n $ERROR('#431: 16384 >>> 13 === 2. Actual: ' + (16384 >>> 13)); \n} \n\n\nif (32768 >>> 13 !== 4) { \n $ERROR('#432: 32768 >>> 13 === 4. Actual: ' + (32768 >>> 13)); \n} \n\n\nif (65536 >>> 13 !== 8) { \n $ERROR('#433: 65536 >>> 13 === 8. Actual: ' + (65536 >>> 13)); \n} \n\n\nif (131072 >>> 13 !== 16) { \n $ERROR('#434: 131072 >>> 13 === 16. Actual: ' + (131072 >>> 13)); \n} \n\n\nif (262144 >>> 13 !== 32) { \n $ERROR('#435: 262144 >>> 13 === 32. Actual: ' + (262144 >>> 13)); \n} \n\n\nif (524288 >>> 13 !== 64) { \n $ERROR('#436: 524288 >>> 13 === 64. Actual: ' + (524288 >>> 13)); \n} \n\n\nif (1048576 >>> 13 !== 128) { \n $ERROR('#437: 1048576 >>> 13 === 128. Actual: ' + (1048576 >>> 13)); \n} \n\n\nif (2097152 >>> 13 !== 256) { \n $ERROR('#438: 2097152 >>> 13 === 256. Actual: ' + (2097152 >>> 13)); \n} \n\n\nif (4194304 >>> 13 !== 512) { \n $ERROR('#439: 4194304 >>> 13 === 512. Actual: ' + (4194304 >>> 13)); \n} \n\n\nif (8388608 >>> 13 !== 1024) { \n $ERROR('#440: 8388608 >>> 13 === 1024. Actual: ' + (8388608 >>> 13)); \n} \n\n\nif (16777216 >>> 13 !== 2048) { \n $ERROR('#441: 16777216 >>> 13 === 2048. Actual: ' + (16777216 >>> 13)); \n} \n\n\nif (33554432 >>> 13 !== 4096) { \n $ERROR('#442: 33554432 >>> 13 === 4096. Actual: ' + (33554432 >>> 13)); \n} \n\n\nif (67108864 >>> 13 !== 8192) { \n $ERROR('#443: 67108864 >>> 13 === 8192. Actual: ' + (67108864 >>> 13)); \n} \n\n\nif (134217728 >>> 13 !== 16384) { \n $ERROR('#444: 134217728 >>> 13 === 16384. Actual: ' + (134217728 >>> 13)); \n} \n\n\nif (268435456 >>> 13 !== 32768) { \n $ERROR('#445: 268435456 >>> 13 === 32768. Actual: ' + (268435456 >>> 13)); \n} \n\n\nif (536870912 >>> 13 !== 65536) { \n $ERROR('#446: 536870912 >>> 13 === 65536. Actual: ' + (536870912 >>> 13)); \n} \n\n\nif (1073741824 >>> 13 !== 131072) { \n $ERROR('#447: 1073741824 >>> 13 === 131072. Actual: ' + (1073741824 >>> 13)); \n} \n\n\nif (2147483648 >>> 13 !== 262144) { \n $ERROR('#448: 2147483648 >>> 13 === 262144. Actual: ' + (2147483648 >>> 13)); \n} \n\n\nif (1 >>> 14 !== 0) { \n $ERROR('#449: 1 >>> 14 === 0. Actual: ' + (1 >>> 14)); \n} \n\n\nif (2 >>> 14 !== 0) { \n $ERROR('#450: 2 >>> 14 === 0. Actual: ' + (2 >>> 14)); \n} \n\n\nif (4 >>> 14 !== 0) { \n $ERROR('#451: 4 >>> 14 === 0. Actual: ' + (4 >>> 14)); \n} \n\n\nif (8 >>> 14 !== 0) { \n $ERROR('#452: 8 >>> 14 === 0. Actual: ' + (8 >>> 14)); \n} \n\n\nif (16 >>> 14 !== 0) { \n $ERROR('#453: 16 >>> 14 === 0. Actual: ' + (16 >>> 14)); \n} \n\n\nif (32 >>> 14 !== 0) { \n $ERROR('#454: 32 >>> 14 === 0. Actual: ' + (32 >>> 14)); \n} \n\n\nif (64 >>> 14 !== 0) { \n $ERROR('#455: 64 >>> 14 === 0. Actual: ' + (64 >>> 14)); \n} \n\n\nif (128 >>> 14 !== 0) { \n $ERROR('#456: 128 >>> 14 === 0. Actual: ' + (128 >>> 14)); \n} \n\n\nif (256 >>> 14 !== 0) { \n $ERROR('#457: 256 >>> 14 === 0. Actual: ' + (256 >>> 14)); \n} \n\n\nif (512 >>> 14 !== 0) { \n $ERROR('#458: 512 >>> 14 === 0. Actual: ' + (512 >>> 14)); \n} \n\n\nif (1024 >>> 14 !== 0) { \n $ERROR('#459: 1024 >>> 14 === 0. Actual: ' + (1024 >>> 14)); \n} \n\n\nif (2048 >>> 14 !== 0) { \n $ERROR('#460: 2048 >>> 14 === 0. Actual: ' + (2048 >>> 14)); \n} \n\n\nif (4096 >>> 14 !== 0) { \n $ERROR('#461: 4096 >>> 14 === 0. Actual: ' + (4096 >>> 14)); \n} \n\n\nif (8192 >>> 14 !== 0) { \n $ERROR('#462: 8192 >>> 14 === 0. Actual: ' + (8192 >>> 14)); \n} \n\n\nif (16384 >>> 14 !== 1) { \n $ERROR('#463: 16384 >>> 14 === 1. Actual: ' + (16384 >>> 14)); \n} \n\n\nif (32768 >>> 14 !== 2) { \n $ERROR('#464: 32768 >>> 14 === 2. Actual: ' + (32768 >>> 14)); \n} \n\n\nif (65536 >>> 14 !== 4) { \n $ERROR('#465: 65536 >>> 14 === 4. Actual: ' + (65536 >>> 14)); \n} \n\n\nif (131072 >>> 14 !== 8) { \n $ERROR('#466: 131072 >>> 14 === 8. Actual: ' + (131072 >>> 14)); \n} \n\n\nif (262144 >>> 14 !== 16) { \n $ERROR('#467: 262144 >>> 14 === 16. Actual: ' + (262144 >>> 14)); \n} \n\n\nif (524288 >>> 14 !== 32) { \n $ERROR('#468: 524288 >>> 14 === 32. Actual: ' + (524288 >>> 14)); \n} \n\n\nif (1048576 >>> 14 !== 64) { \n $ERROR('#469: 1048576 >>> 14 === 64. Actual: ' + (1048576 >>> 14)); \n} \n\n\nif (2097152 >>> 14 !== 128) { \n $ERROR('#470: 2097152 >>> 14 === 128. Actual: ' + (2097152 >>> 14)); \n} \n\n\nif (4194304 >>> 14 !== 256) { \n $ERROR('#471: 4194304 >>> 14 === 256. Actual: ' + (4194304 >>> 14)); \n} \n\n\nif (8388608 >>> 14 !== 512) { \n $ERROR('#472: 8388608 >>> 14 === 512. Actual: ' + (8388608 >>> 14)); \n} \n\n\nif (16777216 >>> 14 !== 1024) { \n $ERROR('#473: 16777216 >>> 14 === 1024. Actual: ' + (16777216 >>> 14)); \n} \n\n\nif (33554432 >>> 14 !== 2048) { \n $ERROR('#474: 33554432 >>> 14 === 2048. Actual: ' + (33554432 >>> 14)); \n} \n\n\nif (67108864 >>> 14 !== 4096) { \n $ERROR('#475: 67108864 >>> 14 === 4096. Actual: ' + (67108864 >>> 14)); \n} \n\n\nif (134217728 >>> 14 !== 8192) { \n $ERROR('#476: 134217728 >>> 14 === 8192. Actual: ' + (134217728 >>> 14)); \n} \n\n\nif (268435456 >>> 14 !== 16384) { \n $ERROR('#477: 268435456 >>> 14 === 16384. Actual: ' + (268435456 >>> 14)); \n} \n\n\nif (536870912 >>> 14 !== 32768) { \n $ERROR('#478: 536870912 >>> 14 === 32768. Actual: ' + (536870912 >>> 14)); \n} \n\n\nif (1073741824 >>> 14 !== 65536) { \n $ERROR('#479: 1073741824 >>> 14 === 65536. Actual: ' + (1073741824 >>> 14)); \n} \n\n\nif (2147483648 >>> 14 !== 131072) { \n $ERROR('#480: 2147483648 >>> 14 === 131072. Actual: ' + (2147483648 >>> 14)); \n} \n\n\nif (1 >>> 15 !== 0) { \n $ERROR('#481: 1 >>> 15 === 0. Actual: ' + (1 >>> 15)); \n} \n\n\nif (2 >>> 15 !== 0) { \n $ERROR('#482: 2 >>> 15 === 0. Actual: ' + (2 >>> 15)); \n} \n\n\nif (4 >>> 15 !== 0) { \n $ERROR('#483: 4 >>> 15 === 0. Actual: ' + (4 >>> 15)); \n} \n\n\nif (8 >>> 15 !== 0) { \n $ERROR('#484: 8 >>> 15 === 0. Actual: ' + (8 >>> 15)); \n} \n\n\nif (16 >>> 15 !== 0) { \n $ERROR('#485: 16 >>> 15 === 0. Actual: ' + (16 >>> 15)); \n} \n\n\nif (32 >>> 15 !== 0) { \n $ERROR('#486: 32 >>> 15 === 0. Actual: ' + (32 >>> 15)); \n} \n\n\nif (64 >>> 15 !== 0) { \n $ERROR('#487: 64 >>> 15 === 0. Actual: ' + (64 >>> 15)); \n} \n\n\nif (128 >>> 15 !== 0) { \n $ERROR('#488: 128 >>> 15 === 0. Actual: ' + (128 >>> 15)); \n} \n\n\nif (256 >>> 15 !== 0) { \n $ERROR('#489: 256 >>> 15 === 0. Actual: ' + (256 >>> 15)); \n} \n\n\nif (512 >>> 15 !== 0) { \n $ERROR('#490: 512 >>> 15 === 0. Actual: ' + (512 >>> 15)); \n} \n\n\nif (1024 >>> 15 !== 0) { \n $ERROR('#491: 1024 >>> 15 === 0. Actual: ' + (1024 >>> 15)); \n} \n\n\nif (2048 >>> 15 !== 0) { \n $ERROR('#492: 2048 >>> 15 === 0. Actual: ' + (2048 >>> 15)); \n} \n\n\nif (4096 >>> 15 !== 0) { \n $ERROR('#493: 4096 >>> 15 === 0. Actual: ' + (4096 >>> 15)); \n} \n\n\nif (8192 >>> 15 !== 0) { \n $ERROR('#494: 8192 >>> 15 === 0. Actual: ' + (8192 >>> 15)); \n} \n\n\nif (16384 >>> 15 !== 0) { \n $ERROR('#495: 16384 >>> 15 === 0. Actual: ' + (16384 >>> 15)); \n} \n\n\nif (32768 >>> 15 !== 1) { \n $ERROR('#496: 32768 >>> 15 === 1. Actual: ' + (32768 >>> 15)); \n} \n\n\nif (65536 >>> 15 !== 2) { \n $ERROR('#497: 65536 >>> 15 === 2. Actual: ' + (65536 >>> 15)); \n} \n\n\nif (131072 >>> 15 !== 4) { \n $ERROR('#498: 131072 >>> 15 === 4. Actual: ' + (131072 >>> 15)); \n} \n\n\nif (262144 >>> 15 !== 8) { \n $ERROR('#499: 262144 >>> 15 === 8. Actual: ' + (262144 >>> 15)); \n} \n\n\nif (524288 >>> 15 !== 16) { \n $ERROR('#500: 524288 >>> 15 === 16. Actual: ' + (524288 >>> 15)); \n} \n\n\nif (1048576 >>> 15 !== 32) { \n $ERROR('#501: 1048576 >>> 15 === 32. Actual: ' + (1048576 >>> 15)); \n} \n\n\nif (2097152 >>> 15 !== 64) { \n $ERROR('#502: 2097152 >>> 15 === 64. Actual: ' + (2097152 >>> 15)); \n} \n\n\nif (4194304 >>> 15 !== 128) { \n $ERROR('#503: 4194304 >>> 15 === 128. Actual: ' + (4194304 >>> 15)); \n} \n\n\nif (8388608 >>> 15 !== 256) { \n $ERROR('#504: 8388608 >>> 15 === 256. Actual: ' + (8388608 >>> 15)); \n} \n\n\nif (16777216 >>> 15 !== 512) { \n $ERROR('#505: 16777216 >>> 15 === 512. Actual: ' + (16777216 >>> 15)); \n} \n\n\nif (33554432 >>> 15 !== 1024) { \n $ERROR('#506: 33554432 >>> 15 === 1024. Actual: ' + (33554432 >>> 15)); \n} \n\n\nif (67108864 >>> 15 !== 2048) { \n $ERROR('#507: 67108864 >>> 15 === 2048. Actual: ' + (67108864 >>> 15)); \n} \n\n\nif (134217728 >>> 15 !== 4096) { \n $ERROR('#508: 134217728 >>> 15 === 4096. Actual: ' + (134217728 >>> 15)); \n} \n\n\nif (268435456 >>> 15 !== 8192) { \n $ERROR('#509: 268435456 >>> 15 === 8192. Actual: ' + (268435456 >>> 15)); \n} \n\n\nif (536870912 >>> 15 !== 16384) { \n $ERROR('#510: 536870912 >>> 15 === 16384. Actual: ' + (536870912 >>> 15)); \n} \n\n\nif (1073741824 >>> 15 !== 32768) { \n $ERROR('#511: 1073741824 >>> 15 === 32768. Actual: ' + (1073741824 >>> 15)); \n} \n\n\nif (2147483648 >>> 15 !== 65536) { \n $ERROR('#512: 2147483648 >>> 15 === 65536. Actual: ' + (2147483648 >>> 15)); \n} \n",
+ "id": "S11.7.3_A4_T1"
+ },
+ {
+ "section": "11.7.3",
+ "description": "ShiftExpression = 2^n - 1, n = 16...31",
+ "test": "//CHECK\n \nif (1 >>> 16 !== 0) { \n $ERROR('#513: 1 >>> 16 === 0. Actual: ' + (1 >>> 16)); \n} \n\n\nif (2 >>> 16 !== 0) { \n $ERROR('#514: 2 >>> 16 === 0. Actual: ' + (2 >>> 16)); \n} \n\n\nif (4 >>> 16 !== 0) { \n $ERROR('#515: 4 >>> 16 === 0. Actual: ' + (4 >>> 16)); \n} \n\n\nif (8 >>> 16 !== 0) { \n $ERROR('#516: 8 >>> 16 === 0. Actual: ' + (8 >>> 16)); \n} \n\n\nif (16 >>> 16 !== 0) { \n $ERROR('#517: 16 >>> 16 === 0. Actual: ' + (16 >>> 16)); \n} \n\n\nif (32 >>> 16 !== 0) { \n $ERROR('#518: 32 >>> 16 === 0. Actual: ' + (32 >>> 16)); \n} \n\n\nif (64 >>> 16 !== 0) { \n $ERROR('#519: 64 >>> 16 === 0. Actual: ' + (64 >>> 16)); \n} \n\n\nif (128 >>> 16 !== 0) { \n $ERROR('#520: 128 >>> 16 === 0. Actual: ' + (128 >>> 16)); \n} \n\n\nif (256 >>> 16 !== 0) { \n $ERROR('#521: 256 >>> 16 === 0. Actual: ' + (256 >>> 16)); \n} \n\n\nif (512 >>> 16 !== 0) { \n $ERROR('#522: 512 >>> 16 === 0. Actual: ' + (512 >>> 16)); \n} \n\n\nif (1024 >>> 16 !== 0) { \n $ERROR('#523: 1024 >>> 16 === 0. Actual: ' + (1024 >>> 16)); \n} \n\n\nif (2048 >>> 16 !== 0) { \n $ERROR('#524: 2048 >>> 16 === 0. Actual: ' + (2048 >>> 16)); \n} \n\n\nif (4096 >>> 16 !== 0) { \n $ERROR('#525: 4096 >>> 16 === 0. Actual: ' + (4096 >>> 16)); \n} \n\n\nif (8192 >>> 16 !== 0) { \n $ERROR('#526: 8192 >>> 16 === 0. Actual: ' + (8192 >>> 16)); \n} \n\n\nif (16384 >>> 16 !== 0) { \n $ERROR('#527: 16384 >>> 16 === 0. Actual: ' + (16384 >>> 16)); \n} \n\n\nif (32768 >>> 16 !== 0) { \n $ERROR('#528: 32768 >>> 16 === 0. Actual: ' + (32768 >>> 16)); \n} \n\n\nif (65536 >>> 16 !== 1) { \n $ERROR('#529: 65536 >>> 16 === 1. Actual: ' + (65536 >>> 16)); \n} \n\n\nif (131072 >>> 16 !== 2) { \n $ERROR('#530: 131072 >>> 16 === 2. Actual: ' + (131072 >>> 16)); \n} \n\n\nif (262144 >>> 16 !== 4) { \n $ERROR('#531: 262144 >>> 16 === 4. Actual: ' + (262144 >>> 16)); \n} \n\n\nif (524288 >>> 16 !== 8) { \n $ERROR('#532: 524288 >>> 16 === 8. Actual: ' + (524288 >>> 16)); \n} \n\n\nif (1048576 >>> 16 !== 16) { \n $ERROR('#533: 1048576 >>> 16 === 16. Actual: ' + (1048576 >>> 16)); \n} \n\n\nif (2097152 >>> 16 !== 32) { \n $ERROR('#534: 2097152 >>> 16 === 32. Actual: ' + (2097152 >>> 16)); \n} \n\n\nif (4194304 >>> 16 !== 64) { \n $ERROR('#535: 4194304 >>> 16 === 64. Actual: ' + (4194304 >>> 16)); \n} \n\n\nif (8388608 >>> 16 !== 128) { \n $ERROR('#536: 8388608 >>> 16 === 128. Actual: ' + (8388608 >>> 16)); \n} \n\n\nif (16777216 >>> 16 !== 256) { \n $ERROR('#537: 16777216 >>> 16 === 256. Actual: ' + (16777216 >>> 16)); \n} \n\n\nif (33554432 >>> 16 !== 512) { \n $ERROR('#538: 33554432 >>> 16 === 512. Actual: ' + (33554432 >>> 16)); \n} \n\n\nif (67108864 >>> 16 !== 1024) { \n $ERROR('#539: 67108864 >>> 16 === 1024. Actual: ' + (67108864 >>> 16)); \n} \n\n\nif (134217728 >>> 16 !== 2048) { \n $ERROR('#540: 134217728 >>> 16 === 2048. Actual: ' + (134217728 >>> 16)); \n} \n\n\nif (268435456 >>> 16 !== 4096) { \n $ERROR('#541: 268435456 >>> 16 === 4096. Actual: ' + (268435456 >>> 16)); \n} \n\n\nif (536870912 >>> 16 !== 8192) { \n $ERROR('#542: 536870912 >>> 16 === 8192. Actual: ' + (536870912 >>> 16)); \n} \n\n\nif (1073741824 >>> 16 !== 16384) { \n $ERROR('#543: 1073741824 >>> 16 === 16384. Actual: ' + (1073741824 >>> 16)); \n} \n\n\nif (2147483648 >>> 16 !== 32768) { \n $ERROR('#544: 2147483648 >>> 16 === 32768. Actual: ' + (2147483648 >>> 16)); \n} \n\n\nif (1 >>> 17 !== 0) { \n $ERROR('#545: 1 >>> 17 === 0. Actual: ' + (1 >>> 17)); \n} \n\n\nif (2 >>> 17 !== 0) { \n $ERROR('#546: 2 >>> 17 === 0. Actual: ' + (2 >>> 17)); \n} \n\n\nif (4 >>> 17 !== 0) { \n $ERROR('#547: 4 >>> 17 === 0. Actual: ' + (4 >>> 17)); \n} \n\n\nif (8 >>> 17 !== 0) { \n $ERROR('#548: 8 >>> 17 === 0. Actual: ' + (8 >>> 17)); \n} \n\n\nif (16 >>> 17 !== 0) { \n $ERROR('#549: 16 >>> 17 === 0. Actual: ' + (16 >>> 17)); \n} \n\n\nif (32 >>> 17 !== 0) { \n $ERROR('#550: 32 >>> 17 === 0. Actual: ' + (32 >>> 17)); \n} \n\n\nif (64 >>> 17 !== 0) { \n $ERROR('#551: 64 >>> 17 === 0. Actual: ' + (64 >>> 17)); \n} \n\n\nif (128 >>> 17 !== 0) { \n $ERROR('#552: 128 >>> 17 === 0. Actual: ' + (128 >>> 17)); \n} \n\n\nif (256 >>> 17 !== 0) { \n $ERROR('#553: 256 >>> 17 === 0. Actual: ' + (256 >>> 17)); \n} \n\n\nif (512 >>> 17 !== 0) { \n $ERROR('#554: 512 >>> 17 === 0. Actual: ' + (512 >>> 17)); \n} \n\n\nif (1024 >>> 17 !== 0) { \n $ERROR('#555: 1024 >>> 17 === 0. Actual: ' + (1024 >>> 17)); \n} \n\n\nif (2048 >>> 17 !== 0) { \n $ERROR('#556: 2048 >>> 17 === 0. Actual: ' + (2048 >>> 17)); \n} \n\n\nif (4096 >>> 17 !== 0) { \n $ERROR('#557: 4096 >>> 17 === 0. Actual: ' + (4096 >>> 17)); \n} \n\n\nif (8192 >>> 17 !== 0) { \n $ERROR('#558: 8192 >>> 17 === 0. Actual: ' + (8192 >>> 17)); \n} \n\n\nif (16384 >>> 17 !== 0) { \n $ERROR('#559: 16384 >>> 17 === 0. Actual: ' + (16384 >>> 17)); \n} \n\n\nif (32768 >>> 17 !== 0) { \n $ERROR('#560: 32768 >>> 17 === 0. Actual: ' + (32768 >>> 17)); \n} \n\n\nif (65536 >>> 17 !== 0) { \n $ERROR('#561: 65536 >>> 17 === 0. Actual: ' + (65536 >>> 17)); \n} \n\n\nif (131072 >>> 17 !== 1) { \n $ERROR('#562: 131072 >>> 17 === 1. Actual: ' + (131072 >>> 17)); \n} \n\n\nif (262144 >>> 17 !== 2) { \n $ERROR('#563: 262144 >>> 17 === 2. Actual: ' + (262144 >>> 17)); \n} \n\n\nif (524288 >>> 17 !== 4) { \n $ERROR('#564: 524288 >>> 17 === 4. Actual: ' + (524288 >>> 17)); \n} \n\n\nif (1048576 >>> 17 !== 8) { \n $ERROR('#565: 1048576 >>> 17 === 8. Actual: ' + (1048576 >>> 17)); \n} \n\n\nif (2097152 >>> 17 !== 16) { \n $ERROR('#566: 2097152 >>> 17 === 16. Actual: ' + (2097152 >>> 17)); \n} \n\n\nif (4194304 >>> 17 !== 32) { \n $ERROR('#567: 4194304 >>> 17 === 32. Actual: ' + (4194304 >>> 17)); \n} \n\n\nif (8388608 >>> 17 !== 64) { \n $ERROR('#568: 8388608 >>> 17 === 64. Actual: ' + (8388608 >>> 17)); \n} \n\n\nif (16777216 >>> 17 !== 128) { \n $ERROR('#569: 16777216 >>> 17 === 128. Actual: ' + (16777216 >>> 17)); \n} \n\n\nif (33554432 >>> 17 !== 256) { \n $ERROR('#570: 33554432 >>> 17 === 256. Actual: ' + (33554432 >>> 17)); \n} \n\n\nif (67108864 >>> 17 !== 512) { \n $ERROR('#571: 67108864 >>> 17 === 512. Actual: ' + (67108864 >>> 17)); \n} \n\n\nif (134217728 >>> 17 !== 1024) { \n $ERROR('#572: 134217728 >>> 17 === 1024. Actual: ' + (134217728 >>> 17)); \n} \n\n\nif (268435456 >>> 17 !== 2048) { \n $ERROR('#573: 268435456 >>> 17 === 2048. Actual: ' + (268435456 >>> 17)); \n} \n\n\nif (536870912 >>> 17 !== 4096) { \n $ERROR('#574: 536870912 >>> 17 === 4096. Actual: ' + (536870912 >>> 17)); \n} \n\n\nif (1073741824 >>> 17 !== 8192) { \n $ERROR('#575: 1073741824 >>> 17 === 8192. Actual: ' + (1073741824 >>> 17)); \n} \n\n\nif (2147483648 >>> 17 !== 16384) { \n $ERROR('#576: 2147483648 >>> 17 === 16384. Actual: ' + (2147483648 >>> 17)); \n} \n\n\nif (1 >>> 18 !== 0) { \n $ERROR('#577: 1 >>> 18 === 0. Actual: ' + (1 >>> 18)); \n} \n\n\nif (2 >>> 18 !== 0) { \n $ERROR('#578: 2 >>> 18 === 0. Actual: ' + (2 >>> 18)); \n} \n\n\nif (4 >>> 18 !== 0) { \n $ERROR('#579: 4 >>> 18 === 0. Actual: ' + (4 >>> 18)); \n} \n\n\nif (8 >>> 18 !== 0) { \n $ERROR('#580: 8 >>> 18 === 0. Actual: ' + (8 >>> 18)); \n} \n\n\nif (16 >>> 18 !== 0) { \n $ERROR('#581: 16 >>> 18 === 0. Actual: ' + (16 >>> 18)); \n} \n\n\nif (32 >>> 18 !== 0) { \n $ERROR('#582: 32 >>> 18 === 0. Actual: ' + (32 >>> 18)); \n} \n\n\nif (64 >>> 18 !== 0) { \n $ERROR('#583: 64 >>> 18 === 0. Actual: ' + (64 >>> 18)); \n} \n\n\nif (128 >>> 18 !== 0) { \n $ERROR('#584: 128 >>> 18 === 0. Actual: ' + (128 >>> 18)); \n} \n\n\nif (256 >>> 18 !== 0) { \n $ERROR('#585: 256 >>> 18 === 0. Actual: ' + (256 >>> 18)); \n} \n\n\nif (512 >>> 18 !== 0) { \n $ERROR('#586: 512 >>> 18 === 0. Actual: ' + (512 >>> 18)); \n} \n\n\nif (1024 >>> 18 !== 0) { \n $ERROR('#587: 1024 >>> 18 === 0. Actual: ' + (1024 >>> 18)); \n} \n\n\nif (2048 >>> 18 !== 0) { \n $ERROR('#588: 2048 >>> 18 === 0. Actual: ' + (2048 >>> 18)); \n} \n\n\nif (4096 >>> 18 !== 0) { \n $ERROR('#589: 4096 >>> 18 === 0. Actual: ' + (4096 >>> 18)); \n} \n\n\nif (8192 >>> 18 !== 0) { \n $ERROR('#590: 8192 >>> 18 === 0. Actual: ' + (8192 >>> 18)); \n} \n\n\nif (16384 >>> 18 !== 0) { \n $ERROR('#591: 16384 >>> 18 === 0. Actual: ' + (16384 >>> 18)); \n} \n\n\nif (32768 >>> 18 !== 0) { \n $ERROR('#592: 32768 >>> 18 === 0. Actual: ' + (32768 >>> 18)); \n} \n\n\nif (65536 >>> 18 !== 0) { \n $ERROR('#593: 65536 >>> 18 === 0. Actual: ' + (65536 >>> 18)); \n} \n\n\nif (131072 >>> 18 !== 0) { \n $ERROR('#594: 131072 >>> 18 === 0. Actual: ' + (131072 >>> 18)); \n} \n\n\nif (262144 >>> 18 !== 1) { \n $ERROR('#595: 262144 >>> 18 === 1. Actual: ' + (262144 >>> 18)); \n} \n\n\nif (524288 >>> 18 !== 2) { \n $ERROR('#596: 524288 >>> 18 === 2. Actual: ' + (524288 >>> 18)); \n} \n\n\nif (1048576 >>> 18 !== 4) { \n $ERROR('#597: 1048576 >>> 18 === 4. Actual: ' + (1048576 >>> 18)); \n} \n\n\nif (2097152 >>> 18 !== 8) { \n $ERROR('#598: 2097152 >>> 18 === 8. Actual: ' + (2097152 >>> 18)); \n} \n\n\nif (4194304 >>> 18 !== 16) { \n $ERROR('#599: 4194304 >>> 18 === 16. Actual: ' + (4194304 >>> 18)); \n} \n\n\nif (8388608 >>> 18 !== 32) { \n $ERROR('#600: 8388608 >>> 18 === 32. Actual: ' + (8388608 >>> 18)); \n} \n\n\nif (16777216 >>> 18 !== 64) { \n $ERROR('#601: 16777216 >>> 18 === 64. Actual: ' + (16777216 >>> 18)); \n} \n\n\nif (33554432 >>> 18 !== 128) { \n $ERROR('#602: 33554432 >>> 18 === 128. Actual: ' + (33554432 >>> 18)); \n} \n\n\nif (67108864 >>> 18 !== 256) { \n $ERROR('#603: 67108864 >>> 18 === 256. Actual: ' + (67108864 >>> 18)); \n} \n\n\nif (134217728 >>> 18 !== 512) { \n $ERROR('#604: 134217728 >>> 18 === 512. Actual: ' + (134217728 >>> 18)); \n} \n\n\nif (268435456 >>> 18 !== 1024) { \n $ERROR('#605: 268435456 >>> 18 === 1024. Actual: ' + (268435456 >>> 18)); \n} \n\n\nif (536870912 >>> 18 !== 2048) { \n $ERROR('#606: 536870912 >>> 18 === 2048. Actual: ' + (536870912 >>> 18)); \n} \n\n\nif (1073741824 >>> 18 !== 4096) { \n $ERROR('#607: 1073741824 >>> 18 === 4096. Actual: ' + (1073741824 >>> 18)); \n} \n\n\nif (2147483648 >>> 18 !== 8192) { \n $ERROR('#608: 2147483648 >>> 18 === 8192. Actual: ' + (2147483648 >>> 18)); \n} \n\n\nif (1 >>> 19 !== 0) { \n $ERROR('#609: 1 >>> 19 === 0. Actual: ' + (1 >>> 19)); \n} \n\n\nif (2 >>> 19 !== 0) { \n $ERROR('#610: 2 >>> 19 === 0. Actual: ' + (2 >>> 19)); \n} \n\n\nif (4 >>> 19 !== 0) { \n $ERROR('#611: 4 >>> 19 === 0. Actual: ' + (4 >>> 19)); \n} \n\n\nif (8 >>> 19 !== 0) { \n $ERROR('#612: 8 >>> 19 === 0. Actual: ' + (8 >>> 19)); \n} \n\n\nif (16 >>> 19 !== 0) { \n $ERROR('#613: 16 >>> 19 === 0. Actual: ' + (16 >>> 19)); \n} \n\n\nif (32 >>> 19 !== 0) { \n $ERROR('#614: 32 >>> 19 === 0. Actual: ' + (32 >>> 19)); \n} \n\n\nif (64 >>> 19 !== 0) { \n $ERROR('#615: 64 >>> 19 === 0. Actual: ' + (64 >>> 19)); \n} \n\n\nif (128 >>> 19 !== 0) { \n $ERROR('#616: 128 >>> 19 === 0. Actual: ' + (128 >>> 19)); \n} \n\n\nif (256 >>> 19 !== 0) { \n $ERROR('#617: 256 >>> 19 === 0. Actual: ' + (256 >>> 19)); \n} \n\n\nif (512 >>> 19 !== 0) { \n $ERROR('#618: 512 >>> 19 === 0. Actual: ' + (512 >>> 19)); \n} \n\n\nif (1024 >>> 19 !== 0) { \n $ERROR('#619: 1024 >>> 19 === 0. Actual: ' + (1024 >>> 19)); \n} \n\n\nif (2048 >>> 19 !== 0) { \n $ERROR('#620: 2048 >>> 19 === 0. Actual: ' + (2048 >>> 19)); \n} \n\n\nif (4096 >>> 19 !== 0) { \n $ERROR('#621: 4096 >>> 19 === 0. Actual: ' + (4096 >>> 19)); \n} \n\n\nif (8192 >>> 19 !== 0) { \n $ERROR('#622: 8192 >>> 19 === 0. Actual: ' + (8192 >>> 19)); \n} \n\n\nif (16384 >>> 19 !== 0) { \n $ERROR('#623: 16384 >>> 19 === 0. Actual: ' + (16384 >>> 19)); \n} \n\n\nif (32768 >>> 19 !== 0) { \n $ERROR('#624: 32768 >>> 19 === 0. Actual: ' + (32768 >>> 19)); \n} \n\n\nif (65536 >>> 19 !== 0) { \n $ERROR('#625: 65536 >>> 19 === 0. Actual: ' + (65536 >>> 19)); \n} \n\n\nif (131072 >>> 19 !== 0) { \n $ERROR('#626: 131072 >>> 19 === 0. Actual: ' + (131072 >>> 19)); \n} \n\n\nif (262144 >>> 19 !== 0) { \n $ERROR('#627: 262144 >>> 19 === 0. Actual: ' + (262144 >>> 19)); \n} \n\n\nif (524288 >>> 19 !== 1) { \n $ERROR('#628: 524288 >>> 19 === 1. Actual: ' + (524288 >>> 19)); \n} \n\n\nif (1048576 >>> 19 !== 2) { \n $ERROR('#629: 1048576 >>> 19 === 2. Actual: ' + (1048576 >>> 19)); \n} \n\n\nif (2097152 >>> 19 !== 4) { \n $ERROR('#630: 2097152 >>> 19 === 4. Actual: ' + (2097152 >>> 19)); \n} \n\n\nif (4194304 >>> 19 !== 8) { \n $ERROR('#631: 4194304 >>> 19 === 8. Actual: ' + (4194304 >>> 19)); \n} \n\n\nif (8388608 >>> 19 !== 16) { \n $ERROR('#632: 8388608 >>> 19 === 16. Actual: ' + (8388608 >>> 19)); \n} \n\n\nif (16777216 >>> 19 !== 32) { \n $ERROR('#633: 16777216 >>> 19 === 32. Actual: ' + (16777216 >>> 19)); \n} \n\n\nif (33554432 >>> 19 !== 64) { \n $ERROR('#634: 33554432 >>> 19 === 64. Actual: ' + (33554432 >>> 19)); \n} \n\n\nif (67108864 >>> 19 !== 128) { \n $ERROR('#635: 67108864 >>> 19 === 128. Actual: ' + (67108864 >>> 19)); \n} \n\n\nif (134217728 >>> 19 !== 256) { \n $ERROR('#636: 134217728 >>> 19 === 256. Actual: ' + (134217728 >>> 19)); \n} \n\n\nif (268435456 >>> 19 !== 512) { \n $ERROR('#637: 268435456 >>> 19 === 512. Actual: ' + (268435456 >>> 19)); \n} \n\n\nif (536870912 >>> 19 !== 1024) { \n $ERROR('#638: 536870912 >>> 19 === 1024. Actual: ' + (536870912 >>> 19)); \n} \n\n\nif (1073741824 >>> 19 !== 2048) { \n $ERROR('#639: 1073741824 >>> 19 === 2048. Actual: ' + (1073741824 >>> 19)); \n} \n\n\nif (2147483648 >>> 19 !== 4096) { \n $ERROR('#640: 2147483648 >>> 19 === 4096. Actual: ' + (2147483648 >>> 19)); \n} \n\n\nif (1 >>> 20 !== 0) { \n $ERROR('#641: 1 >>> 20 === 0. Actual: ' + (1 >>> 20)); \n} \n\n\nif (2 >>> 20 !== 0) { \n $ERROR('#642: 2 >>> 20 === 0. Actual: ' + (2 >>> 20)); \n} \n\n\nif (4 >>> 20 !== 0) { \n $ERROR('#643: 4 >>> 20 === 0. Actual: ' + (4 >>> 20)); \n} \n\n\nif (8 >>> 20 !== 0) { \n $ERROR('#644: 8 >>> 20 === 0. Actual: ' + (8 >>> 20)); \n} \n\n\nif (16 >>> 20 !== 0) { \n $ERROR('#645: 16 >>> 20 === 0. Actual: ' + (16 >>> 20)); \n} \n\n\nif (32 >>> 20 !== 0) { \n $ERROR('#646: 32 >>> 20 === 0. Actual: ' + (32 >>> 20)); \n} \n\n\nif (64 >>> 20 !== 0) { \n $ERROR('#647: 64 >>> 20 === 0. Actual: ' + (64 >>> 20)); \n} \n\n\nif (128 >>> 20 !== 0) { \n $ERROR('#648: 128 >>> 20 === 0. Actual: ' + (128 >>> 20)); \n} \n\n\nif (256 >>> 20 !== 0) { \n $ERROR('#649: 256 >>> 20 === 0. Actual: ' + (256 >>> 20)); \n} \n\n\nif (512 >>> 20 !== 0) { \n $ERROR('#650: 512 >>> 20 === 0. Actual: ' + (512 >>> 20)); \n} \n\n\nif (1024 >>> 20 !== 0) { \n $ERROR('#651: 1024 >>> 20 === 0. Actual: ' + (1024 >>> 20)); \n} \n\n\nif (2048 >>> 20 !== 0) { \n $ERROR('#652: 2048 >>> 20 === 0. Actual: ' + (2048 >>> 20)); \n} \n\n\nif (4096 >>> 20 !== 0) { \n $ERROR('#653: 4096 >>> 20 === 0. Actual: ' + (4096 >>> 20)); \n} \n\n\nif (8192 >>> 20 !== 0) { \n $ERROR('#654: 8192 >>> 20 === 0. Actual: ' + (8192 >>> 20)); \n} \n\n\nif (16384 >>> 20 !== 0) { \n $ERROR('#655: 16384 >>> 20 === 0. Actual: ' + (16384 >>> 20)); \n} \n\n\nif (32768 >>> 20 !== 0) { \n $ERROR('#656: 32768 >>> 20 === 0. Actual: ' + (32768 >>> 20)); \n} \n\n\nif (65536 >>> 20 !== 0) { \n $ERROR('#657: 65536 >>> 20 === 0. Actual: ' + (65536 >>> 20)); \n} \n\n\nif (131072 >>> 20 !== 0) { \n $ERROR('#658: 131072 >>> 20 === 0. Actual: ' + (131072 >>> 20)); \n} \n\n\nif (262144 >>> 20 !== 0) { \n $ERROR('#659: 262144 >>> 20 === 0. Actual: ' + (262144 >>> 20)); \n} \n\n\nif (524288 >>> 20 !== 0) { \n $ERROR('#660: 524288 >>> 20 === 0. Actual: ' + (524288 >>> 20)); \n} \n\n\nif (1048576 >>> 20 !== 1) { \n $ERROR('#661: 1048576 >>> 20 === 1. Actual: ' + (1048576 >>> 20)); \n} \n\n\nif (2097152 >>> 20 !== 2) { \n $ERROR('#662: 2097152 >>> 20 === 2. Actual: ' + (2097152 >>> 20)); \n} \n\n\nif (4194304 >>> 20 !== 4) { \n $ERROR('#663: 4194304 >>> 20 === 4. Actual: ' + (4194304 >>> 20)); \n} \n\n\nif (8388608 >>> 20 !== 8) { \n $ERROR('#664: 8388608 >>> 20 === 8. Actual: ' + (8388608 >>> 20)); \n} \n\n\nif (16777216 >>> 20 !== 16) { \n $ERROR('#665: 16777216 >>> 20 === 16. Actual: ' + (16777216 >>> 20)); \n} \n\n\nif (33554432 >>> 20 !== 32) { \n $ERROR('#666: 33554432 >>> 20 === 32. Actual: ' + (33554432 >>> 20)); \n} \n\n\nif (67108864 >>> 20 !== 64) { \n $ERROR('#667: 67108864 >>> 20 === 64. Actual: ' + (67108864 >>> 20)); \n} \n\n\nif (134217728 >>> 20 !== 128) { \n $ERROR('#668: 134217728 >>> 20 === 128. Actual: ' + (134217728 >>> 20)); \n} \n\n\nif (268435456 >>> 20 !== 256) { \n $ERROR('#669: 268435456 >>> 20 === 256. Actual: ' + (268435456 >>> 20)); \n} \n\n\nif (536870912 >>> 20 !== 512) { \n $ERROR('#670: 536870912 >>> 20 === 512. Actual: ' + (536870912 >>> 20)); \n} \n\n\nif (1073741824 >>> 20 !== 1024) { \n $ERROR('#671: 1073741824 >>> 20 === 1024. Actual: ' + (1073741824 >>> 20)); \n} \n\n\nif (2147483648 >>> 20 !== 2048) { \n $ERROR('#672: 2147483648 >>> 20 === 2048. Actual: ' + (2147483648 >>> 20)); \n} \n\n\nif (1 >>> 21 !== 0) { \n $ERROR('#673: 1 >>> 21 === 0. Actual: ' + (1 >>> 21)); \n} \n\n\nif (2 >>> 21 !== 0) { \n $ERROR('#674: 2 >>> 21 === 0. Actual: ' + (2 >>> 21)); \n} \n\n\nif (4 >>> 21 !== 0) { \n $ERROR('#675: 4 >>> 21 === 0. Actual: ' + (4 >>> 21)); \n} \n\n\nif (8 >>> 21 !== 0) { \n $ERROR('#676: 8 >>> 21 === 0. Actual: ' + (8 >>> 21)); \n} \n\n\nif (16 >>> 21 !== 0) { \n $ERROR('#677: 16 >>> 21 === 0. Actual: ' + (16 >>> 21)); \n} \n\n\nif (32 >>> 21 !== 0) { \n $ERROR('#678: 32 >>> 21 === 0. Actual: ' + (32 >>> 21)); \n} \n\n\nif (64 >>> 21 !== 0) { \n $ERROR('#679: 64 >>> 21 === 0. Actual: ' + (64 >>> 21)); \n} \n\n\nif (128 >>> 21 !== 0) { \n $ERROR('#680: 128 >>> 21 === 0. Actual: ' + (128 >>> 21)); \n} \n\n\nif (256 >>> 21 !== 0) { \n $ERROR('#681: 256 >>> 21 === 0. Actual: ' + (256 >>> 21)); \n} \n\n\nif (512 >>> 21 !== 0) { \n $ERROR('#682: 512 >>> 21 === 0. Actual: ' + (512 >>> 21)); \n} \n\n\nif (1024 >>> 21 !== 0) { \n $ERROR('#683: 1024 >>> 21 === 0. Actual: ' + (1024 >>> 21)); \n} \n\n\nif (2048 >>> 21 !== 0) { \n $ERROR('#684: 2048 >>> 21 === 0. Actual: ' + (2048 >>> 21)); \n} \n\n\nif (4096 >>> 21 !== 0) { \n $ERROR('#685: 4096 >>> 21 === 0. Actual: ' + (4096 >>> 21)); \n} \n\n\nif (8192 >>> 21 !== 0) { \n $ERROR('#686: 8192 >>> 21 === 0. Actual: ' + (8192 >>> 21)); \n} \n\n\nif (16384 >>> 21 !== 0) { \n $ERROR('#687: 16384 >>> 21 === 0. Actual: ' + (16384 >>> 21)); \n} \n\n\nif (32768 >>> 21 !== 0) { \n $ERROR('#688: 32768 >>> 21 === 0. Actual: ' + (32768 >>> 21)); \n} \n\n\nif (65536 >>> 21 !== 0) { \n $ERROR('#689: 65536 >>> 21 === 0. Actual: ' + (65536 >>> 21)); \n} \n\n\nif (131072 >>> 21 !== 0) { \n $ERROR('#690: 131072 >>> 21 === 0. Actual: ' + (131072 >>> 21)); \n} \n\n\nif (262144 >>> 21 !== 0) { \n $ERROR('#691: 262144 >>> 21 === 0. Actual: ' + (262144 >>> 21)); \n} \n\n\nif (524288 >>> 21 !== 0) { \n $ERROR('#692: 524288 >>> 21 === 0. Actual: ' + (524288 >>> 21)); \n} \n\n\nif (1048576 >>> 21 !== 0) { \n $ERROR('#693: 1048576 >>> 21 === 0. Actual: ' + (1048576 >>> 21)); \n} \n\n\nif (2097152 >>> 21 !== 1) { \n $ERROR('#694: 2097152 >>> 21 === 1. Actual: ' + (2097152 >>> 21)); \n} \n\n\nif (4194304 >>> 21 !== 2) { \n $ERROR('#695: 4194304 >>> 21 === 2. Actual: ' + (4194304 >>> 21)); \n} \n\n\nif (8388608 >>> 21 !== 4) { \n $ERROR('#696: 8388608 >>> 21 === 4. Actual: ' + (8388608 >>> 21)); \n} \n\n\nif (16777216 >>> 21 !== 8) { \n $ERROR('#697: 16777216 >>> 21 === 8. Actual: ' + (16777216 >>> 21)); \n} \n\n\nif (33554432 >>> 21 !== 16) { \n $ERROR('#698: 33554432 >>> 21 === 16. Actual: ' + (33554432 >>> 21)); \n} \n\n\nif (67108864 >>> 21 !== 32) { \n $ERROR('#699: 67108864 >>> 21 === 32. Actual: ' + (67108864 >>> 21)); \n} \n\n\nif (134217728 >>> 21 !== 64) { \n $ERROR('#700: 134217728 >>> 21 === 64. Actual: ' + (134217728 >>> 21)); \n} \n\n\nif (268435456 >>> 21 !== 128) { \n $ERROR('#701: 268435456 >>> 21 === 128. Actual: ' + (268435456 >>> 21)); \n} \n\n\nif (536870912 >>> 21 !== 256) { \n $ERROR('#702: 536870912 >>> 21 === 256. Actual: ' + (536870912 >>> 21)); \n} \n\n\nif (1073741824 >>> 21 !== 512) { \n $ERROR('#703: 1073741824 >>> 21 === 512. Actual: ' + (1073741824 >>> 21)); \n} \n\n\nif (2147483648 >>> 21 !== 1024) { \n $ERROR('#704: 2147483648 >>> 21 === 1024. Actual: ' + (2147483648 >>> 21)); \n} \n\n\nif (1 >>> 22 !== 0) { \n $ERROR('#705: 1 >>> 22 === 0. Actual: ' + (1 >>> 22)); \n} \n\n\nif (2 >>> 22 !== 0) { \n $ERROR('#706: 2 >>> 22 === 0. Actual: ' + (2 >>> 22)); \n} \n\n\nif (4 >>> 22 !== 0) { \n $ERROR('#707: 4 >>> 22 === 0. Actual: ' + (4 >>> 22)); \n} \n\n\nif (8 >>> 22 !== 0) { \n $ERROR('#708: 8 >>> 22 === 0. Actual: ' + (8 >>> 22)); \n} \n\n\nif (16 >>> 22 !== 0) { \n $ERROR('#709: 16 >>> 22 === 0. Actual: ' + (16 >>> 22)); \n} \n\n\nif (32 >>> 22 !== 0) { \n $ERROR('#710: 32 >>> 22 === 0. Actual: ' + (32 >>> 22)); \n} \n\n\nif (64 >>> 22 !== 0) { \n $ERROR('#711: 64 >>> 22 === 0. Actual: ' + (64 >>> 22)); \n} \n\n\nif (128 >>> 22 !== 0) { \n $ERROR('#712: 128 >>> 22 === 0. Actual: ' + (128 >>> 22)); \n} \n\n\nif (256 >>> 22 !== 0) { \n $ERROR('#713: 256 >>> 22 === 0. Actual: ' + (256 >>> 22)); \n} \n\n\nif (512 >>> 22 !== 0) { \n $ERROR('#714: 512 >>> 22 === 0. Actual: ' + (512 >>> 22)); \n} \n\n\nif (1024 >>> 22 !== 0) { \n $ERROR('#715: 1024 >>> 22 === 0. Actual: ' + (1024 >>> 22)); \n} \n\n\nif (2048 >>> 22 !== 0) { \n $ERROR('#716: 2048 >>> 22 === 0. Actual: ' + (2048 >>> 22)); \n} \n\n\nif (4096 >>> 22 !== 0) { \n $ERROR('#717: 4096 >>> 22 === 0. Actual: ' + (4096 >>> 22)); \n} \n\n\nif (8192 >>> 22 !== 0) { \n $ERROR('#718: 8192 >>> 22 === 0. Actual: ' + (8192 >>> 22)); \n} \n\n\nif (16384 >>> 22 !== 0) { \n $ERROR('#719: 16384 >>> 22 === 0. Actual: ' + (16384 >>> 22)); \n} \n\n\nif (32768 >>> 22 !== 0) { \n $ERROR('#720: 32768 >>> 22 === 0. Actual: ' + (32768 >>> 22)); \n} \n\n\nif (65536 >>> 22 !== 0) { \n $ERROR('#721: 65536 >>> 22 === 0. Actual: ' + (65536 >>> 22)); \n} \n\n\nif (131072 >>> 22 !== 0) { \n $ERROR('#722: 131072 >>> 22 === 0. Actual: ' + (131072 >>> 22)); \n} \n\n\nif (262144 >>> 22 !== 0) { \n $ERROR('#723: 262144 >>> 22 === 0. Actual: ' + (262144 >>> 22)); \n} \n\n\nif (524288 >>> 22 !== 0) { \n $ERROR('#724: 524288 >>> 22 === 0. Actual: ' + (524288 >>> 22)); \n} \n\n\nif (1048576 >>> 22 !== 0) { \n $ERROR('#725: 1048576 >>> 22 === 0. Actual: ' + (1048576 >>> 22)); \n} \n\n\nif (2097152 >>> 22 !== 0) { \n $ERROR('#726: 2097152 >>> 22 === 0. Actual: ' + (2097152 >>> 22)); \n} \n\n\nif (4194304 >>> 22 !== 1) { \n $ERROR('#727: 4194304 >>> 22 === 1. Actual: ' + (4194304 >>> 22)); \n} \n\n\nif (8388608 >>> 22 !== 2) { \n $ERROR('#728: 8388608 >>> 22 === 2. Actual: ' + (8388608 >>> 22)); \n} \n\n\nif (16777216 >>> 22 !== 4) { \n $ERROR('#729: 16777216 >>> 22 === 4. Actual: ' + (16777216 >>> 22)); \n} \n\n\nif (33554432 >>> 22 !== 8) { \n $ERROR('#730: 33554432 >>> 22 === 8. Actual: ' + (33554432 >>> 22)); \n} \n\n\nif (67108864 >>> 22 !== 16) { \n $ERROR('#731: 67108864 >>> 22 === 16. Actual: ' + (67108864 >>> 22)); \n} \n\n\nif (134217728 >>> 22 !== 32) { \n $ERROR('#732: 134217728 >>> 22 === 32. Actual: ' + (134217728 >>> 22)); \n} \n\n\nif (268435456 >>> 22 !== 64) { \n $ERROR('#733: 268435456 >>> 22 === 64. Actual: ' + (268435456 >>> 22)); \n} \n\n\nif (536870912 >>> 22 !== 128) { \n $ERROR('#734: 536870912 >>> 22 === 128. Actual: ' + (536870912 >>> 22)); \n} \n\n\nif (1073741824 >>> 22 !== 256) { \n $ERROR('#735: 1073741824 >>> 22 === 256. Actual: ' + (1073741824 >>> 22)); \n} \n\n\nif (2147483648 >>> 22 !== 512) { \n $ERROR('#736: 2147483648 >>> 22 === 512. Actual: ' + (2147483648 >>> 22)); \n} \n\n\nif (1 >>> 23 !== 0) { \n $ERROR('#737: 1 >>> 23 === 0. Actual: ' + (1 >>> 23)); \n} \n\n\nif (2 >>> 23 !== 0) { \n $ERROR('#738: 2 >>> 23 === 0. Actual: ' + (2 >>> 23)); \n} \n\n\nif (4 >>> 23 !== 0) { \n $ERROR('#739: 4 >>> 23 === 0. Actual: ' + (4 >>> 23)); \n} \n\n\nif (8 >>> 23 !== 0) { \n $ERROR('#740: 8 >>> 23 === 0. Actual: ' + (8 >>> 23)); \n} \n\n\nif (16 >>> 23 !== 0) { \n $ERROR('#741: 16 >>> 23 === 0. Actual: ' + (16 >>> 23)); \n} \n\n\nif (32 >>> 23 !== 0) { \n $ERROR('#742: 32 >>> 23 === 0. Actual: ' + (32 >>> 23)); \n} \n\n\nif (64 >>> 23 !== 0) { \n $ERROR('#743: 64 >>> 23 === 0. Actual: ' + (64 >>> 23)); \n} \n\n\nif (128 >>> 23 !== 0) { \n $ERROR('#744: 128 >>> 23 === 0. Actual: ' + (128 >>> 23)); \n} \n\n\nif (256 >>> 23 !== 0) { \n $ERROR('#745: 256 >>> 23 === 0. Actual: ' + (256 >>> 23)); \n} \n\n\nif (512 >>> 23 !== 0) { \n $ERROR('#746: 512 >>> 23 === 0. Actual: ' + (512 >>> 23)); \n} \n\n\nif (1024 >>> 23 !== 0) { \n $ERROR('#747: 1024 >>> 23 === 0. Actual: ' + (1024 >>> 23)); \n} \n\n\nif (2048 >>> 23 !== 0) { \n $ERROR('#748: 2048 >>> 23 === 0. Actual: ' + (2048 >>> 23)); \n} \n\n\nif (4096 >>> 23 !== 0) { \n $ERROR('#749: 4096 >>> 23 === 0. Actual: ' + (4096 >>> 23)); \n} \n\n\nif (8192 >>> 23 !== 0) { \n $ERROR('#750: 8192 >>> 23 === 0. Actual: ' + (8192 >>> 23)); \n} \n\n\nif (16384 >>> 23 !== 0) { \n $ERROR('#751: 16384 >>> 23 === 0. Actual: ' + (16384 >>> 23)); \n} \n\n\nif (32768 >>> 23 !== 0) { \n $ERROR('#752: 32768 >>> 23 === 0. Actual: ' + (32768 >>> 23)); \n} \n\n\nif (65536 >>> 23 !== 0) { \n $ERROR('#753: 65536 >>> 23 === 0. Actual: ' + (65536 >>> 23)); \n} \n\n\nif (131072 >>> 23 !== 0) { \n $ERROR('#754: 131072 >>> 23 === 0. Actual: ' + (131072 >>> 23)); \n} \n\n\nif (262144 >>> 23 !== 0) { \n $ERROR('#755: 262144 >>> 23 === 0. Actual: ' + (262144 >>> 23)); \n} \n\n\nif (524288 >>> 23 !== 0) { \n $ERROR('#756: 524288 >>> 23 === 0. Actual: ' + (524288 >>> 23)); \n} \n\n\nif (1048576 >>> 23 !== 0) { \n $ERROR('#757: 1048576 >>> 23 === 0. Actual: ' + (1048576 >>> 23)); \n} \n\n\nif (2097152 >>> 23 !== 0) { \n $ERROR('#758: 2097152 >>> 23 === 0. Actual: ' + (2097152 >>> 23)); \n} \n\n\nif (4194304 >>> 23 !== 0) { \n $ERROR('#759: 4194304 >>> 23 === 0. Actual: ' + (4194304 >>> 23)); \n} \n\n\nif (8388608 >>> 23 !== 1) { \n $ERROR('#760: 8388608 >>> 23 === 1. Actual: ' + (8388608 >>> 23)); \n} \n\n\nif (16777216 >>> 23 !== 2) { \n $ERROR('#761: 16777216 >>> 23 === 2. Actual: ' + (16777216 >>> 23)); \n} \n\n\nif (33554432 >>> 23 !== 4) { \n $ERROR('#762: 33554432 >>> 23 === 4. Actual: ' + (33554432 >>> 23)); \n} \n\n\nif (67108864 >>> 23 !== 8) { \n $ERROR('#763: 67108864 >>> 23 === 8. Actual: ' + (67108864 >>> 23)); \n} \n\n\nif (134217728 >>> 23 !== 16) { \n $ERROR('#764: 134217728 >>> 23 === 16. Actual: ' + (134217728 >>> 23)); \n} \n\n\nif (268435456 >>> 23 !== 32) { \n $ERROR('#765: 268435456 >>> 23 === 32. Actual: ' + (268435456 >>> 23)); \n} \n\n\nif (536870912 >>> 23 !== 64) { \n $ERROR('#766: 536870912 >>> 23 === 64. Actual: ' + (536870912 >>> 23)); \n} \n\n\nif (1073741824 >>> 23 !== 128) { \n $ERROR('#767: 1073741824 >>> 23 === 128. Actual: ' + (1073741824 >>> 23)); \n} \n\n\nif (2147483648 >>> 23 !== 256) { \n $ERROR('#768: 2147483648 >>> 23 === 256. Actual: ' + (2147483648 >>> 23)); \n} \n\n\nif (1 >>> 24 !== 0) { \n $ERROR('#769: 1 >>> 24 === 0. Actual: ' + (1 >>> 24)); \n} \n\n\nif (2 >>> 24 !== 0) { \n $ERROR('#770: 2 >>> 24 === 0. Actual: ' + (2 >>> 24)); \n} \n\n\nif (4 >>> 24 !== 0) { \n $ERROR('#771: 4 >>> 24 === 0. Actual: ' + (4 >>> 24)); \n} \n\n\nif (8 >>> 24 !== 0) { \n $ERROR('#772: 8 >>> 24 === 0. Actual: ' + (8 >>> 24)); \n} \n\n\nif (16 >>> 24 !== 0) { \n $ERROR('#773: 16 >>> 24 === 0. Actual: ' + (16 >>> 24)); \n} \n\n\nif (32 >>> 24 !== 0) { \n $ERROR('#774: 32 >>> 24 === 0. Actual: ' + (32 >>> 24)); \n} \n\n\nif (64 >>> 24 !== 0) { \n $ERROR('#775: 64 >>> 24 === 0. Actual: ' + (64 >>> 24)); \n} \n\n\nif (128 >>> 24 !== 0) { \n $ERROR('#776: 128 >>> 24 === 0. Actual: ' + (128 >>> 24)); \n} \n\n\nif (256 >>> 24 !== 0) { \n $ERROR('#777: 256 >>> 24 === 0. Actual: ' + (256 >>> 24)); \n} \n\n\nif (512 >>> 24 !== 0) { \n $ERROR('#778: 512 >>> 24 === 0. Actual: ' + (512 >>> 24)); \n} \n\n\nif (1024 >>> 24 !== 0) { \n $ERROR('#779: 1024 >>> 24 === 0. Actual: ' + (1024 >>> 24)); \n} \n\n\nif (2048 >>> 24 !== 0) { \n $ERROR('#780: 2048 >>> 24 === 0. Actual: ' + (2048 >>> 24)); \n} \n\n\nif (4096 >>> 24 !== 0) { \n $ERROR('#781: 4096 >>> 24 === 0. Actual: ' + (4096 >>> 24)); \n} \n\n\nif (8192 >>> 24 !== 0) { \n $ERROR('#782: 8192 >>> 24 === 0. Actual: ' + (8192 >>> 24)); \n} \n\n\nif (16384 >>> 24 !== 0) { \n $ERROR('#783: 16384 >>> 24 === 0. Actual: ' + (16384 >>> 24)); \n} \n\n\nif (32768 >>> 24 !== 0) { \n $ERROR('#784: 32768 >>> 24 === 0. Actual: ' + (32768 >>> 24)); \n} \n\n\nif (65536 >>> 24 !== 0) { \n $ERROR('#785: 65536 >>> 24 === 0. Actual: ' + (65536 >>> 24)); \n} \n\n\nif (131072 >>> 24 !== 0) { \n $ERROR('#786: 131072 >>> 24 === 0. Actual: ' + (131072 >>> 24)); \n} \n\n\nif (262144 >>> 24 !== 0) { \n $ERROR('#787: 262144 >>> 24 === 0. Actual: ' + (262144 >>> 24)); \n} \n\n\nif (524288 >>> 24 !== 0) { \n $ERROR('#788: 524288 >>> 24 === 0. Actual: ' + (524288 >>> 24)); \n} \n\n\nif (1048576 >>> 24 !== 0) { \n $ERROR('#789: 1048576 >>> 24 === 0. Actual: ' + (1048576 >>> 24)); \n} \n\n\nif (2097152 >>> 24 !== 0) { \n $ERROR('#790: 2097152 >>> 24 === 0. Actual: ' + (2097152 >>> 24)); \n} \n\n\nif (4194304 >>> 24 !== 0) { \n $ERROR('#791: 4194304 >>> 24 === 0. Actual: ' + (4194304 >>> 24)); \n} \n\n\nif (8388608 >>> 24 !== 0) { \n $ERROR('#792: 8388608 >>> 24 === 0. Actual: ' + (8388608 >>> 24)); \n} \n\n\nif (16777216 >>> 24 !== 1) { \n $ERROR('#793: 16777216 >>> 24 === 1. Actual: ' + (16777216 >>> 24)); \n} \n\n\nif (33554432 >>> 24 !== 2) { \n $ERROR('#794: 33554432 >>> 24 === 2. Actual: ' + (33554432 >>> 24)); \n} \n\n\nif (67108864 >>> 24 !== 4) { \n $ERROR('#795: 67108864 >>> 24 === 4. Actual: ' + (67108864 >>> 24)); \n} \n\n\nif (134217728 >>> 24 !== 8) { \n $ERROR('#796: 134217728 >>> 24 === 8. Actual: ' + (134217728 >>> 24)); \n} \n\n\nif (268435456 >>> 24 !== 16) { \n $ERROR('#797: 268435456 >>> 24 === 16. Actual: ' + (268435456 >>> 24)); \n} \n\n\nif (536870912 >>> 24 !== 32) { \n $ERROR('#798: 536870912 >>> 24 === 32. Actual: ' + (536870912 >>> 24)); \n} \n\n\nif (1073741824 >>> 24 !== 64) { \n $ERROR('#799: 1073741824 >>> 24 === 64. Actual: ' + (1073741824 >>> 24)); \n} \n\n\nif (2147483648 >>> 24 !== 128) { \n $ERROR('#800: 2147483648 >>> 24 === 128. Actual: ' + (2147483648 >>> 24)); \n} \n\n\nif (1 >>> 25 !== 0) { \n $ERROR('#801: 1 >>> 25 === 0. Actual: ' + (1 >>> 25)); \n} \n\n\nif (2 >>> 25 !== 0) { \n $ERROR('#802: 2 >>> 25 === 0. Actual: ' + (2 >>> 25)); \n} \n\n\nif (4 >>> 25 !== 0) { \n $ERROR('#803: 4 >>> 25 === 0. Actual: ' + (4 >>> 25)); \n} \n\n\nif (8 >>> 25 !== 0) { \n $ERROR('#804: 8 >>> 25 === 0. Actual: ' + (8 >>> 25)); \n} \n\n\nif (16 >>> 25 !== 0) { \n $ERROR('#805: 16 >>> 25 === 0. Actual: ' + (16 >>> 25)); \n} \n\n\nif (32 >>> 25 !== 0) { \n $ERROR('#806: 32 >>> 25 === 0. Actual: ' + (32 >>> 25)); \n} \n\n\nif (64 >>> 25 !== 0) { \n $ERROR('#807: 64 >>> 25 === 0. Actual: ' + (64 >>> 25)); \n} \n\n\nif (128 >>> 25 !== 0) { \n $ERROR('#808: 128 >>> 25 === 0. Actual: ' + (128 >>> 25)); \n} \n\n\nif (256 >>> 25 !== 0) { \n $ERROR('#809: 256 >>> 25 === 0. Actual: ' + (256 >>> 25)); \n} \n\n\nif (512 >>> 25 !== 0) { \n $ERROR('#810: 512 >>> 25 === 0. Actual: ' + (512 >>> 25)); \n} \n\n\nif (1024 >>> 25 !== 0) { \n $ERROR('#811: 1024 >>> 25 === 0. Actual: ' + (1024 >>> 25)); \n} \n\n\nif (2048 >>> 25 !== 0) { \n $ERROR('#812: 2048 >>> 25 === 0. Actual: ' + (2048 >>> 25)); \n} \n\n\nif (4096 >>> 25 !== 0) { \n $ERROR('#813: 4096 >>> 25 === 0. Actual: ' + (4096 >>> 25)); \n} \n\n\nif (8192 >>> 25 !== 0) { \n $ERROR('#814: 8192 >>> 25 === 0. Actual: ' + (8192 >>> 25)); \n} \n\n\nif (16384 >>> 25 !== 0) { \n $ERROR('#815: 16384 >>> 25 === 0. Actual: ' + (16384 >>> 25)); \n} \n\n\nif (32768 >>> 25 !== 0) { \n $ERROR('#816: 32768 >>> 25 === 0. Actual: ' + (32768 >>> 25)); \n} \n\n\nif (65536 >>> 25 !== 0) { \n $ERROR('#817: 65536 >>> 25 === 0. Actual: ' + (65536 >>> 25)); \n} \n\n\nif (131072 >>> 25 !== 0) { \n $ERROR('#818: 131072 >>> 25 === 0. Actual: ' + (131072 >>> 25)); \n} \n\n\nif (262144 >>> 25 !== 0) { \n $ERROR('#819: 262144 >>> 25 === 0. Actual: ' + (262144 >>> 25)); \n} \n\n\nif (524288 >>> 25 !== 0) { \n $ERROR('#820: 524288 >>> 25 === 0. Actual: ' + (524288 >>> 25)); \n} \n\n\nif (1048576 >>> 25 !== 0) { \n $ERROR('#821: 1048576 >>> 25 === 0. Actual: ' + (1048576 >>> 25)); \n} \n\n\nif (2097152 >>> 25 !== 0) { \n $ERROR('#822: 2097152 >>> 25 === 0. Actual: ' + (2097152 >>> 25)); \n} \n\n\nif (4194304 >>> 25 !== 0) { \n $ERROR('#823: 4194304 >>> 25 === 0. Actual: ' + (4194304 >>> 25)); \n} \n\n\nif (8388608 >>> 25 !== 0) { \n $ERROR('#824: 8388608 >>> 25 === 0. Actual: ' + (8388608 >>> 25)); \n} \n\n\nif (16777216 >>> 25 !== 0) { \n $ERROR('#825: 16777216 >>> 25 === 0. Actual: ' + (16777216 >>> 25)); \n} \n\n\nif (33554432 >>> 25 !== 1) { \n $ERROR('#826: 33554432 >>> 25 === 1. Actual: ' + (33554432 >>> 25)); \n} \n\n\nif (67108864 >>> 25 !== 2) { \n $ERROR('#827: 67108864 >>> 25 === 2. Actual: ' + (67108864 >>> 25)); \n} \n\n\nif (134217728 >>> 25 !== 4) { \n $ERROR('#828: 134217728 >>> 25 === 4. Actual: ' + (134217728 >>> 25)); \n} \n\n\nif (268435456 >>> 25 !== 8) { \n $ERROR('#829: 268435456 >>> 25 === 8. Actual: ' + (268435456 >>> 25)); \n} \n\n\nif (536870912 >>> 25 !== 16) { \n $ERROR('#830: 536870912 >>> 25 === 16. Actual: ' + (536870912 >>> 25)); \n} \n\n\nif (1073741824 >>> 25 !== 32) { \n $ERROR('#831: 1073741824 >>> 25 === 32. Actual: ' + (1073741824 >>> 25)); \n} \n\n\nif (2147483648 >>> 25 !== 64) { \n $ERROR('#832: 2147483648 >>> 25 === 64. Actual: ' + (2147483648 >>> 25)); \n} \n\n\nif (1 >>> 26 !== 0) { \n $ERROR('#833: 1 >>> 26 === 0. Actual: ' + (1 >>> 26)); \n} \n\n\nif (2 >>> 26 !== 0) { \n $ERROR('#834: 2 >>> 26 === 0. Actual: ' + (2 >>> 26)); \n} \n\n\nif (4 >>> 26 !== 0) { \n $ERROR('#835: 4 >>> 26 === 0. Actual: ' + (4 >>> 26)); \n} \n\n\nif (8 >>> 26 !== 0) { \n $ERROR('#836: 8 >>> 26 === 0. Actual: ' + (8 >>> 26)); \n} \n\n\nif (16 >>> 26 !== 0) { \n $ERROR('#837: 16 >>> 26 === 0. Actual: ' + (16 >>> 26)); \n} \n\n\nif (32 >>> 26 !== 0) { \n $ERROR('#838: 32 >>> 26 === 0. Actual: ' + (32 >>> 26)); \n} \n\n\nif (64 >>> 26 !== 0) { \n $ERROR('#839: 64 >>> 26 === 0. Actual: ' + (64 >>> 26)); \n} \n\n\nif (128 >>> 26 !== 0) { \n $ERROR('#840: 128 >>> 26 === 0. Actual: ' + (128 >>> 26)); \n} \n\n\nif (256 >>> 26 !== 0) { \n $ERROR('#841: 256 >>> 26 === 0. Actual: ' + (256 >>> 26)); \n} \n\n\nif (512 >>> 26 !== 0) { \n $ERROR('#842: 512 >>> 26 === 0. Actual: ' + (512 >>> 26)); \n} \n\n\nif (1024 >>> 26 !== 0) { \n $ERROR('#843: 1024 >>> 26 === 0. Actual: ' + (1024 >>> 26)); \n} \n\n\nif (2048 >>> 26 !== 0) { \n $ERROR('#844: 2048 >>> 26 === 0. Actual: ' + (2048 >>> 26)); \n} \n\n\nif (4096 >>> 26 !== 0) { \n $ERROR('#845: 4096 >>> 26 === 0. Actual: ' + (4096 >>> 26)); \n} \n\n\nif (8192 >>> 26 !== 0) { \n $ERROR('#846: 8192 >>> 26 === 0. Actual: ' + (8192 >>> 26)); \n} \n\n\nif (16384 >>> 26 !== 0) { \n $ERROR('#847: 16384 >>> 26 === 0. Actual: ' + (16384 >>> 26)); \n} \n\n\nif (32768 >>> 26 !== 0) { \n $ERROR('#848: 32768 >>> 26 === 0. Actual: ' + (32768 >>> 26)); \n} \n\n\nif (65536 >>> 26 !== 0) { \n $ERROR('#849: 65536 >>> 26 === 0. Actual: ' + (65536 >>> 26)); \n} \n\n\nif (131072 >>> 26 !== 0) { \n $ERROR('#850: 131072 >>> 26 === 0. Actual: ' + (131072 >>> 26)); \n} \n\n\nif (262144 >>> 26 !== 0) { \n $ERROR('#851: 262144 >>> 26 === 0. Actual: ' + (262144 >>> 26)); \n} \n\n\nif (524288 >>> 26 !== 0) { \n $ERROR('#852: 524288 >>> 26 === 0. Actual: ' + (524288 >>> 26)); \n} \n\n\nif (1048576 >>> 26 !== 0) { \n $ERROR('#853: 1048576 >>> 26 === 0. Actual: ' + (1048576 >>> 26)); \n} \n\n\nif (2097152 >>> 26 !== 0) { \n $ERROR('#854: 2097152 >>> 26 === 0. Actual: ' + (2097152 >>> 26)); \n} \n\n\nif (4194304 >>> 26 !== 0) { \n $ERROR('#855: 4194304 >>> 26 === 0. Actual: ' + (4194304 >>> 26)); \n} \n\n\nif (8388608 >>> 26 !== 0) { \n $ERROR('#856: 8388608 >>> 26 === 0. Actual: ' + (8388608 >>> 26)); \n} \n\n\nif (16777216 >>> 26 !== 0) { \n $ERROR('#857: 16777216 >>> 26 === 0. Actual: ' + (16777216 >>> 26)); \n} \n\n\nif (33554432 >>> 26 !== 0) { \n $ERROR('#858: 33554432 >>> 26 === 0. Actual: ' + (33554432 >>> 26)); \n} \n\n\nif (67108864 >>> 26 !== 1) { \n $ERROR('#859: 67108864 >>> 26 === 1. Actual: ' + (67108864 >>> 26)); \n} \n\n\nif (134217728 >>> 26 !== 2) { \n $ERROR('#860: 134217728 >>> 26 === 2. Actual: ' + (134217728 >>> 26)); \n} \n\n\nif (268435456 >>> 26 !== 4) { \n $ERROR('#861: 268435456 >>> 26 === 4. Actual: ' + (268435456 >>> 26)); \n} \n\n\nif (536870912 >>> 26 !== 8) { \n $ERROR('#862: 536870912 >>> 26 === 8. Actual: ' + (536870912 >>> 26)); \n} \n\n\nif (1073741824 >>> 26 !== 16) { \n $ERROR('#863: 1073741824 >>> 26 === 16. Actual: ' + (1073741824 >>> 26)); \n} \n\n\nif (2147483648 >>> 26 !== 32) { \n $ERROR('#864: 2147483648 >>> 26 === 32. Actual: ' + (2147483648 >>> 26)); \n} \n\n\nif (1 >>> 27 !== 0) { \n $ERROR('#865: 1 >>> 27 === 0. Actual: ' + (1 >>> 27)); \n} \n\n\nif (2 >>> 27 !== 0) { \n $ERROR('#866: 2 >>> 27 === 0. Actual: ' + (2 >>> 27)); \n} \n\n\nif (4 >>> 27 !== 0) { \n $ERROR('#867: 4 >>> 27 === 0. Actual: ' + (4 >>> 27)); \n} \n\n\nif (8 >>> 27 !== 0) { \n $ERROR('#868: 8 >>> 27 === 0. Actual: ' + (8 >>> 27)); \n} \n\n\nif (16 >>> 27 !== 0) { \n $ERROR('#869: 16 >>> 27 === 0. Actual: ' + (16 >>> 27)); \n} \n\n\nif (32 >>> 27 !== 0) { \n $ERROR('#870: 32 >>> 27 === 0. Actual: ' + (32 >>> 27)); \n} \n\n\nif (64 >>> 27 !== 0) { \n $ERROR('#871: 64 >>> 27 === 0. Actual: ' + (64 >>> 27)); \n} \n\n\nif (128 >>> 27 !== 0) { \n $ERROR('#872: 128 >>> 27 === 0. Actual: ' + (128 >>> 27)); \n} \n\n\nif (256 >>> 27 !== 0) { \n $ERROR('#873: 256 >>> 27 === 0. Actual: ' + (256 >>> 27)); \n} \n\n\nif (512 >>> 27 !== 0) { \n $ERROR('#874: 512 >>> 27 === 0. Actual: ' + (512 >>> 27)); \n} \n\n\nif (1024 >>> 27 !== 0) { \n $ERROR('#875: 1024 >>> 27 === 0. Actual: ' + (1024 >>> 27)); \n} \n\n\nif (2048 >>> 27 !== 0) { \n $ERROR('#876: 2048 >>> 27 === 0. Actual: ' + (2048 >>> 27)); \n} \n\n\nif (4096 >>> 27 !== 0) { \n $ERROR('#877: 4096 >>> 27 === 0. Actual: ' + (4096 >>> 27)); \n} \n\n\nif (8192 >>> 27 !== 0) { \n $ERROR('#878: 8192 >>> 27 === 0. Actual: ' + (8192 >>> 27)); \n} \n\n\nif (16384 >>> 27 !== 0) { \n $ERROR('#879: 16384 >>> 27 === 0. Actual: ' + (16384 >>> 27)); \n} \n\n\nif (32768 >>> 27 !== 0) { \n $ERROR('#880: 32768 >>> 27 === 0. Actual: ' + (32768 >>> 27)); \n} \n\n\nif (65536 >>> 27 !== 0) { \n $ERROR('#881: 65536 >>> 27 === 0. Actual: ' + (65536 >>> 27)); \n} \n\n\nif (131072 >>> 27 !== 0) { \n $ERROR('#882: 131072 >>> 27 === 0. Actual: ' + (131072 >>> 27)); \n} \n\n\nif (262144 >>> 27 !== 0) { \n $ERROR('#883: 262144 >>> 27 === 0. Actual: ' + (262144 >>> 27)); \n} \n\n\nif (524288 >>> 27 !== 0) { \n $ERROR('#884: 524288 >>> 27 === 0. Actual: ' + (524288 >>> 27)); \n} \n\n\nif (1048576 >>> 27 !== 0) { \n $ERROR('#885: 1048576 >>> 27 === 0. Actual: ' + (1048576 >>> 27)); \n} \n\n\nif (2097152 >>> 27 !== 0) { \n $ERROR('#886: 2097152 >>> 27 === 0. Actual: ' + (2097152 >>> 27)); \n} \n\n\nif (4194304 >>> 27 !== 0) { \n $ERROR('#887: 4194304 >>> 27 === 0. Actual: ' + (4194304 >>> 27)); \n} \n\n\nif (8388608 >>> 27 !== 0) { \n $ERROR('#888: 8388608 >>> 27 === 0. Actual: ' + (8388608 >>> 27)); \n} \n\n\nif (16777216 >>> 27 !== 0) { \n $ERROR('#889: 16777216 >>> 27 === 0. Actual: ' + (16777216 >>> 27)); \n} \n\n\nif (33554432 >>> 27 !== 0) { \n $ERROR('#890: 33554432 >>> 27 === 0. Actual: ' + (33554432 >>> 27)); \n} \n\n\nif (67108864 >>> 27 !== 0) { \n $ERROR('#891: 67108864 >>> 27 === 0. Actual: ' + (67108864 >>> 27)); \n} \n\n\nif (134217728 >>> 27 !== 1) { \n $ERROR('#892: 134217728 >>> 27 === 1. Actual: ' + (134217728 >>> 27)); \n} \n\n\nif (268435456 >>> 27 !== 2) { \n $ERROR('#893: 268435456 >>> 27 === 2. Actual: ' + (268435456 >>> 27)); \n} \n\n\nif (536870912 >>> 27 !== 4) { \n $ERROR('#894: 536870912 >>> 27 === 4. Actual: ' + (536870912 >>> 27)); \n} \n\n\nif (1073741824 >>> 27 !== 8) { \n $ERROR('#895: 1073741824 >>> 27 === 8. Actual: ' + (1073741824 >>> 27)); \n} \n\n\nif (2147483648 >>> 27 !== 16) { \n $ERROR('#896: 2147483648 >>> 27 === 16. Actual: ' + (2147483648 >>> 27)); \n} \n\n\nif (1 >>> 28 !== 0) { \n $ERROR('#897: 1 >>> 28 === 0. Actual: ' + (1 >>> 28)); \n} \n\n\nif (2 >>> 28 !== 0) { \n $ERROR('#898: 2 >>> 28 === 0. Actual: ' + (2 >>> 28)); \n} \n\n\nif (4 >>> 28 !== 0) { \n $ERROR('#899: 4 >>> 28 === 0. Actual: ' + (4 >>> 28)); \n} \n\n\nif (8 >>> 28 !== 0) { \n $ERROR('#900: 8 >>> 28 === 0. Actual: ' + (8 >>> 28)); \n} \n\n\nif (16 >>> 28 !== 0) { \n $ERROR('#901: 16 >>> 28 === 0. Actual: ' + (16 >>> 28)); \n} \n\n\nif (32 >>> 28 !== 0) { \n $ERROR('#902: 32 >>> 28 === 0. Actual: ' + (32 >>> 28)); \n} \n\n\nif (64 >>> 28 !== 0) { \n $ERROR('#903: 64 >>> 28 === 0. Actual: ' + (64 >>> 28)); \n} \n\n\nif (128 >>> 28 !== 0) { \n $ERROR('#904: 128 >>> 28 === 0. Actual: ' + (128 >>> 28)); \n} \n\n\nif (256 >>> 28 !== 0) { \n $ERROR('#905: 256 >>> 28 === 0. Actual: ' + (256 >>> 28)); \n} \n\n\nif (512 >>> 28 !== 0) { \n $ERROR('#906: 512 >>> 28 === 0. Actual: ' + (512 >>> 28)); \n} \n\n\nif (1024 >>> 28 !== 0) { \n $ERROR('#907: 1024 >>> 28 === 0. Actual: ' + (1024 >>> 28)); \n} \n\n\nif (2048 >>> 28 !== 0) { \n $ERROR('#908: 2048 >>> 28 === 0. Actual: ' + (2048 >>> 28)); \n} \n\n\nif (4096 >>> 28 !== 0) { \n $ERROR('#909: 4096 >>> 28 === 0. Actual: ' + (4096 >>> 28)); \n} \n\n\nif (8192 >>> 28 !== 0) { \n $ERROR('#910: 8192 >>> 28 === 0. Actual: ' + (8192 >>> 28)); \n} \n\n\nif (16384 >>> 28 !== 0) { \n $ERROR('#911: 16384 >>> 28 === 0. Actual: ' + (16384 >>> 28)); \n} \n\n\nif (32768 >>> 28 !== 0) { \n $ERROR('#912: 32768 >>> 28 === 0. Actual: ' + (32768 >>> 28)); \n} \n\n\nif (65536 >>> 28 !== 0) { \n $ERROR('#913: 65536 >>> 28 === 0. Actual: ' + (65536 >>> 28)); \n} \n\n\nif (131072 >>> 28 !== 0) { \n $ERROR('#914: 131072 >>> 28 === 0. Actual: ' + (131072 >>> 28)); \n} \n\n\nif (262144 >>> 28 !== 0) { \n $ERROR('#915: 262144 >>> 28 === 0. Actual: ' + (262144 >>> 28)); \n} \n\n\nif (524288 >>> 28 !== 0) { \n $ERROR('#916: 524288 >>> 28 === 0. Actual: ' + (524288 >>> 28)); \n} \n\n\nif (1048576 >>> 28 !== 0) { \n $ERROR('#917: 1048576 >>> 28 === 0. Actual: ' + (1048576 >>> 28)); \n} \n\n\nif (2097152 >>> 28 !== 0) { \n $ERROR('#918: 2097152 >>> 28 === 0. Actual: ' + (2097152 >>> 28)); \n} \n\n\nif (4194304 >>> 28 !== 0) { \n $ERROR('#919: 4194304 >>> 28 === 0. Actual: ' + (4194304 >>> 28)); \n} \n\n\nif (8388608 >>> 28 !== 0) { \n $ERROR('#920: 8388608 >>> 28 === 0. Actual: ' + (8388608 >>> 28)); \n} \n\n\nif (16777216 >>> 28 !== 0) { \n $ERROR('#921: 16777216 >>> 28 === 0. Actual: ' + (16777216 >>> 28)); \n} \n\n\nif (33554432 >>> 28 !== 0) { \n $ERROR('#922: 33554432 >>> 28 === 0. Actual: ' + (33554432 >>> 28)); \n} \n\n\nif (67108864 >>> 28 !== 0) { \n $ERROR('#923: 67108864 >>> 28 === 0. Actual: ' + (67108864 >>> 28)); \n} \n\n\nif (134217728 >>> 28 !== 0) { \n $ERROR('#924: 134217728 >>> 28 === 0. Actual: ' + (134217728 >>> 28)); \n} \n\n\nif (268435456 >>> 28 !== 1) { \n $ERROR('#925: 268435456 >>> 28 === 1. Actual: ' + (268435456 >>> 28)); \n} \n\n\nif (536870912 >>> 28 !== 2) { \n $ERROR('#926: 536870912 >>> 28 === 2. Actual: ' + (536870912 >>> 28)); \n} \n\n\nif (1073741824 >>> 28 !== 4) { \n $ERROR('#927: 1073741824 >>> 28 === 4. Actual: ' + (1073741824 >>> 28)); \n} \n\n\nif (2147483648 >>> 28 !== 8) { \n $ERROR('#928: 2147483648 >>> 28 === 8. Actual: ' + (2147483648 >>> 28)); \n} \n\n\nif (1 >>> 29 !== 0) { \n $ERROR('#929: 1 >>> 29 === 0. Actual: ' + (1 >>> 29)); \n} \n\n\nif (2 >>> 29 !== 0) { \n $ERROR('#930: 2 >>> 29 === 0. Actual: ' + (2 >>> 29)); \n} \n\n\nif (4 >>> 29 !== 0) { \n $ERROR('#931: 4 >>> 29 === 0. Actual: ' + (4 >>> 29)); \n} \n\n\nif (8 >>> 29 !== 0) { \n $ERROR('#932: 8 >>> 29 === 0. Actual: ' + (8 >>> 29)); \n} \n\n\nif (16 >>> 29 !== 0) { \n $ERROR('#933: 16 >>> 29 === 0. Actual: ' + (16 >>> 29)); \n} \n\n\nif (32 >>> 29 !== 0) { \n $ERROR('#934: 32 >>> 29 === 0. Actual: ' + (32 >>> 29)); \n} \n\n\nif (64 >>> 29 !== 0) { \n $ERROR('#935: 64 >>> 29 === 0. Actual: ' + (64 >>> 29)); \n} \n\n\nif (128 >>> 29 !== 0) { \n $ERROR('#936: 128 >>> 29 === 0. Actual: ' + (128 >>> 29)); \n} \n\n\nif (256 >>> 29 !== 0) { \n $ERROR('#937: 256 >>> 29 === 0. Actual: ' + (256 >>> 29)); \n} \n\n\nif (512 >>> 29 !== 0) { \n $ERROR('#938: 512 >>> 29 === 0. Actual: ' + (512 >>> 29)); \n} \n\n\nif (1024 >>> 29 !== 0) { \n $ERROR('#939: 1024 >>> 29 === 0. Actual: ' + (1024 >>> 29)); \n} \n\n\nif (2048 >>> 29 !== 0) { \n $ERROR('#940: 2048 >>> 29 === 0. Actual: ' + (2048 >>> 29)); \n} \n\n\nif (4096 >>> 29 !== 0) { \n $ERROR('#941: 4096 >>> 29 === 0. Actual: ' + (4096 >>> 29)); \n} \n\n\nif (8192 >>> 29 !== 0) { \n $ERROR('#942: 8192 >>> 29 === 0. Actual: ' + (8192 >>> 29)); \n} \n\n\nif (16384 >>> 29 !== 0) { \n $ERROR('#943: 16384 >>> 29 === 0. Actual: ' + (16384 >>> 29)); \n} \n\n\nif (32768 >>> 29 !== 0) { \n $ERROR('#944: 32768 >>> 29 === 0. Actual: ' + (32768 >>> 29)); \n} \n\n\nif (65536 >>> 29 !== 0) { \n $ERROR('#945: 65536 >>> 29 === 0. Actual: ' + (65536 >>> 29)); \n} \n\n\nif (131072 >>> 29 !== 0) { \n $ERROR('#946: 131072 >>> 29 === 0. Actual: ' + (131072 >>> 29)); \n} \n\n\nif (262144 >>> 29 !== 0) { \n $ERROR('#947: 262144 >>> 29 === 0. Actual: ' + (262144 >>> 29)); \n} \n\n\nif (524288 >>> 29 !== 0) { \n $ERROR('#948: 524288 >>> 29 === 0. Actual: ' + (524288 >>> 29)); \n} \n\n\nif (1048576 >>> 29 !== 0) { \n $ERROR('#949: 1048576 >>> 29 === 0. Actual: ' + (1048576 >>> 29)); \n} \n\n\nif (2097152 >>> 29 !== 0) { \n $ERROR('#950: 2097152 >>> 29 === 0. Actual: ' + (2097152 >>> 29)); \n} \n\n\nif (4194304 >>> 29 !== 0) { \n $ERROR('#951: 4194304 >>> 29 === 0. Actual: ' + (4194304 >>> 29)); \n} \n\n\nif (8388608 >>> 29 !== 0) { \n $ERROR('#952: 8388608 >>> 29 === 0. Actual: ' + (8388608 >>> 29)); \n} \n\n\nif (16777216 >>> 29 !== 0) { \n $ERROR('#953: 16777216 >>> 29 === 0. Actual: ' + (16777216 >>> 29)); \n} \n\n\nif (33554432 >>> 29 !== 0) { \n $ERROR('#954: 33554432 >>> 29 === 0. Actual: ' + (33554432 >>> 29)); \n} \n\n\nif (67108864 >>> 29 !== 0) { \n $ERROR('#955: 67108864 >>> 29 === 0. Actual: ' + (67108864 >>> 29)); \n} \n\n\nif (134217728 >>> 29 !== 0) { \n $ERROR('#956: 134217728 >>> 29 === 0. Actual: ' + (134217728 >>> 29)); \n} \n\n\nif (268435456 >>> 29 !== 0) { \n $ERROR('#957: 268435456 >>> 29 === 0. Actual: ' + (268435456 >>> 29)); \n} \n\n\nif (536870912 >>> 29 !== 1) { \n $ERROR('#958: 536870912 >>> 29 === 1. Actual: ' + (536870912 >>> 29)); \n} \n\n\nif (1073741824 >>> 29 !== 2) { \n $ERROR('#959: 1073741824 >>> 29 === 2. Actual: ' + (1073741824 >>> 29)); \n} \n\n\nif (2147483648 >>> 29 !== 4) { \n $ERROR('#960: 2147483648 >>> 29 === 4. Actual: ' + (2147483648 >>> 29)); \n} \n\n\nif (1 >>> 30 !== 0) { \n $ERROR('#961: 1 >>> 30 === 0. Actual: ' + (1 >>> 30)); \n} \n\n\nif (2 >>> 30 !== 0) { \n $ERROR('#962: 2 >>> 30 === 0. Actual: ' + (2 >>> 30)); \n} \n\n\nif (4 >>> 30 !== 0) { \n $ERROR('#963: 4 >>> 30 === 0. Actual: ' + (4 >>> 30)); \n} \n\n\nif (8 >>> 30 !== 0) { \n $ERROR('#964: 8 >>> 30 === 0. Actual: ' + (8 >>> 30)); \n} \n\n\nif (16 >>> 30 !== 0) { \n $ERROR('#965: 16 >>> 30 === 0. Actual: ' + (16 >>> 30)); \n} \n\n\nif (32 >>> 30 !== 0) { \n $ERROR('#966: 32 >>> 30 === 0. Actual: ' + (32 >>> 30)); \n} \n\n\nif (64 >>> 30 !== 0) { \n $ERROR('#967: 64 >>> 30 === 0. Actual: ' + (64 >>> 30)); \n} \n\n\nif (128 >>> 30 !== 0) { \n $ERROR('#968: 128 >>> 30 === 0. Actual: ' + (128 >>> 30)); \n} \n\n\nif (256 >>> 30 !== 0) { \n $ERROR('#969: 256 >>> 30 === 0. Actual: ' + (256 >>> 30)); \n} \n\n\nif (512 >>> 30 !== 0) { \n $ERROR('#970: 512 >>> 30 === 0. Actual: ' + (512 >>> 30)); \n} \n\n\nif (1024 >>> 30 !== 0) { \n $ERROR('#971: 1024 >>> 30 === 0. Actual: ' + (1024 >>> 30)); \n} \n\n\nif (2048 >>> 30 !== 0) { \n $ERROR('#972: 2048 >>> 30 === 0. Actual: ' + (2048 >>> 30)); \n} \n\n\nif (4096 >>> 30 !== 0) { \n $ERROR('#973: 4096 >>> 30 === 0. Actual: ' + (4096 >>> 30)); \n} \n\n\nif (8192 >>> 30 !== 0) { \n $ERROR('#974: 8192 >>> 30 === 0. Actual: ' + (8192 >>> 30)); \n} \n\n\nif (16384 >>> 30 !== 0) { \n $ERROR('#975: 16384 >>> 30 === 0. Actual: ' + (16384 >>> 30)); \n} \n\n\nif (32768 >>> 30 !== 0) { \n $ERROR('#976: 32768 >>> 30 === 0. Actual: ' + (32768 >>> 30)); \n} \n\n\nif (65536 >>> 30 !== 0) { \n $ERROR('#977: 65536 >>> 30 === 0. Actual: ' + (65536 >>> 30)); \n} \n\n\nif (131072 >>> 30 !== 0) { \n $ERROR('#978: 131072 >>> 30 === 0. Actual: ' + (131072 >>> 30)); \n} \n\n\nif (262144 >>> 30 !== 0) { \n $ERROR('#979: 262144 >>> 30 === 0. Actual: ' + (262144 >>> 30)); \n} \n\n\nif (524288 >>> 30 !== 0) { \n $ERROR('#980: 524288 >>> 30 === 0. Actual: ' + (524288 >>> 30)); \n} \n\n\nif (1048576 >>> 30 !== 0) { \n $ERROR('#981: 1048576 >>> 30 === 0. Actual: ' + (1048576 >>> 30)); \n} \n\n\nif (2097152 >>> 30 !== 0) { \n $ERROR('#982: 2097152 >>> 30 === 0. Actual: ' + (2097152 >>> 30)); \n} \n\n\nif (4194304 >>> 30 !== 0) { \n $ERROR('#983: 4194304 >>> 30 === 0. Actual: ' + (4194304 >>> 30)); \n} \n\n\nif (8388608 >>> 30 !== 0) { \n $ERROR('#984: 8388608 >>> 30 === 0. Actual: ' + (8388608 >>> 30)); \n} \n\n\nif (16777216 >>> 30 !== 0) { \n $ERROR('#985: 16777216 >>> 30 === 0. Actual: ' + (16777216 >>> 30)); \n} \n\n\nif (33554432 >>> 30 !== 0) { \n $ERROR('#986: 33554432 >>> 30 === 0. Actual: ' + (33554432 >>> 30)); \n} \n\n\nif (67108864 >>> 30 !== 0) { \n $ERROR('#987: 67108864 >>> 30 === 0. Actual: ' + (67108864 >>> 30)); \n} \n\n\nif (134217728 >>> 30 !== 0) { \n $ERROR('#988: 134217728 >>> 30 === 0. Actual: ' + (134217728 >>> 30)); \n} \n\n\nif (268435456 >>> 30 !== 0) { \n $ERROR('#989: 268435456 >>> 30 === 0. Actual: ' + (268435456 >>> 30)); \n} \n\n\nif (536870912 >>> 30 !== 0) { \n $ERROR('#990: 536870912 >>> 30 === 0. Actual: ' + (536870912 >>> 30)); \n} \n\n\nif (1073741824 >>> 30 !== 1) { \n $ERROR('#991: 1073741824 >>> 30 === 1. Actual: ' + (1073741824 >>> 30)); \n} \n\n\nif (2147483648 >>> 30 !== 2) { \n $ERROR('#992: 2147483648 >>> 30 === 2. Actual: ' + (2147483648 >>> 30)); \n} \n\n\nif (1 >>> 31 !== 0) { \n $ERROR('#993: 1 >>> 31 === 0. Actual: ' + (1 >>> 31)); \n} \n\n\nif (2 >>> 31 !== 0) { \n $ERROR('#994: 2 >>> 31 === 0. Actual: ' + (2 >>> 31)); \n} \n\n\nif (4 >>> 31 !== 0) { \n $ERROR('#995: 4 >>> 31 === 0. Actual: ' + (4 >>> 31)); \n} \n\n\nif (8 >>> 31 !== 0) { \n $ERROR('#996: 8 >>> 31 === 0. Actual: ' + (8 >>> 31)); \n} \n\n\nif (16 >>> 31 !== 0) { \n $ERROR('#997: 16 >>> 31 === 0. Actual: ' + (16 >>> 31)); \n} \n\n\nif (32 >>> 31 !== 0) { \n $ERROR('#998: 32 >>> 31 === 0. Actual: ' + (32 >>> 31)); \n} \n\n\nif (64 >>> 31 !== 0) { \n $ERROR('#999: 64 >>> 31 === 0. Actual: ' + (64 >>> 31)); \n} \n\n\nif (128 >>> 31 !== 0) { \n $ERROR('#1000: 128 >>> 31 === 0. Actual: ' + (128 >>> 31)); \n} \n\n\nif (256 >>> 31 !== 0) { \n $ERROR('#1001: 256 >>> 31 === 0. Actual: ' + (256 >>> 31)); \n} \n\n\nif (512 >>> 31 !== 0) { \n $ERROR('#1002: 512 >>> 31 === 0. Actual: ' + (512 >>> 31)); \n} \n\n\nif (1024 >>> 31 !== 0) { \n $ERROR('#1003: 1024 >>> 31 === 0. Actual: ' + (1024 >>> 31)); \n} \n\n\nif (2048 >>> 31 !== 0) { \n $ERROR('#1004: 2048 >>> 31 === 0. Actual: ' + (2048 >>> 31)); \n} \n\n\nif (4096 >>> 31 !== 0) { \n $ERROR('#1005: 4096 >>> 31 === 0. Actual: ' + (4096 >>> 31)); \n} \n\n\nif (8192 >>> 31 !== 0) { \n $ERROR('#1006: 8192 >>> 31 === 0. Actual: ' + (8192 >>> 31)); \n} \n\n\nif (16384 >>> 31 !== 0) { \n $ERROR('#1007: 16384 >>> 31 === 0. Actual: ' + (16384 >>> 31)); \n} \n\n\nif (32768 >>> 31 !== 0) { \n $ERROR('#1008: 32768 >>> 31 === 0. Actual: ' + (32768 >>> 31)); \n} \n\n\nif (65536 >>> 31 !== 0) { \n $ERROR('#1009: 65536 >>> 31 === 0. Actual: ' + (65536 >>> 31)); \n} \n\n\nif (131072 >>> 31 !== 0) { \n $ERROR('#1010: 131072 >>> 31 === 0. Actual: ' + (131072 >>> 31)); \n} \n\n\nif (262144 >>> 31 !== 0) { \n $ERROR('#1011: 262144 >>> 31 === 0. Actual: ' + (262144 >>> 31)); \n} \n\n\nif (524288 >>> 31 !== 0) { \n $ERROR('#1012: 524288 >>> 31 === 0. Actual: ' + (524288 >>> 31)); \n} \n\n\nif (1048576 >>> 31 !== 0) { \n $ERROR('#1013: 1048576 >>> 31 === 0. Actual: ' + (1048576 >>> 31)); \n} \n\n\nif (2097152 >>> 31 !== 0) { \n $ERROR('#1014: 2097152 >>> 31 === 0. Actual: ' + (2097152 >>> 31)); \n} \n\n\nif (4194304 >>> 31 !== 0) { \n $ERROR('#1015: 4194304 >>> 31 === 0. Actual: ' + (4194304 >>> 31)); \n} \n\n\nif (8388608 >>> 31 !== 0) { \n $ERROR('#1016: 8388608 >>> 31 === 0. Actual: ' + (8388608 >>> 31)); \n} \n\n\nif (16777216 >>> 31 !== 0) { \n $ERROR('#1017: 16777216 >>> 31 === 0. Actual: ' + (16777216 >>> 31)); \n} \n\n\nif (33554432 >>> 31 !== 0) { \n $ERROR('#1018: 33554432 >>> 31 === 0. Actual: ' + (33554432 >>> 31)); \n} \n\n\nif (67108864 >>> 31 !== 0) { \n $ERROR('#1019: 67108864 >>> 31 === 0. Actual: ' + (67108864 >>> 31)); \n} \n\n\nif (134217728 >>> 31 !== 0) { \n $ERROR('#1020: 134217728 >>> 31 === 0. Actual: ' + (134217728 >>> 31)); \n} \n\n\nif (268435456 >>> 31 !== 0) { \n $ERROR('#1021: 268435456 >>> 31 === 0. Actual: ' + (268435456 >>> 31)); \n} \n\n\nif (536870912 >>> 31 !== 0) { \n $ERROR('#1022: 536870912 >>> 31 === 0. Actual: ' + (536870912 >>> 31)); \n} \n\n\nif (1073741824 >>> 31 !== 0) { \n $ERROR('#1023: 1073741824 >>> 31 === 0. Actual: ' + (1073741824 >>> 31)); \n} \n\n\nif (2147483648 >>> 31 !== 1) { \n $ERROR('#1024: 2147483648 >>> 31 === 1. Actual: ' + (2147483648 >>> 31)); \n}\n",
+ "id": "S11.7.3_A4_T2"
+ },
+ {
+ "section": "11.7.3",
+ "description": "ShiftExpression = 2^n - 1, n = 0...15",
+ "test": "//CHECK\n \nif (0 >>> 0 !== 0) { \n $ERROR('#1: 0 >>> 0 === 0. Actual: ' + (0 >>> 0)); \n} \n\n\nif (1 >>> 0 !== 1) { \n $ERROR('#2: 1 >>> 0 === 1. Actual: ' + (1 >>> 0)); \n} \n\n\nif (3 >>> 0 !== 3) { \n $ERROR('#3: 3 >>> 0 === 3. Actual: ' + (3 >>> 0)); \n} \n\n\nif (7 >>> 0 !== 7) { \n $ERROR('#4: 7 >>> 0 === 7. Actual: ' + (7 >>> 0)); \n} \n\n\nif (15 >>> 0 !== 15) { \n $ERROR('#5: 15 >>> 0 === 15. Actual: ' + (15 >>> 0)); \n} \n\n\nif (31 >>> 0 !== 31) { \n $ERROR('#6: 31 >>> 0 === 31. Actual: ' + (31 >>> 0)); \n} \n\n\nif (63 >>> 0 !== 63) { \n $ERROR('#7: 63 >>> 0 === 63. Actual: ' + (63 >>> 0)); \n} \n\n\nif (127 >>> 0 !== 127) { \n $ERROR('#8: 127 >>> 0 === 127. Actual: ' + (127 >>> 0)); \n} \n\n\nif (255 >>> 0 !== 255) { \n $ERROR('#9: 255 >>> 0 === 255. Actual: ' + (255 >>> 0)); \n} \n\n\nif (511 >>> 0 !== 511) { \n $ERROR('#10: 511 >>> 0 === 511. Actual: ' + (511 >>> 0)); \n} \n\n\nif (1023 >>> 0 !== 1023) { \n $ERROR('#11: 1023 >>> 0 === 1023. Actual: ' + (1023 >>> 0)); \n} \n\n\nif (2047 >>> 0 !== 2047) { \n $ERROR('#12: 2047 >>> 0 === 2047. Actual: ' + (2047 >>> 0)); \n} \n\n\nif (4095 >>> 0 !== 4095) { \n $ERROR('#13: 4095 >>> 0 === 4095. Actual: ' + (4095 >>> 0)); \n} \n\n\nif (8191 >>> 0 !== 8191) { \n $ERROR('#14: 8191 >>> 0 === 8191. Actual: ' + (8191 >>> 0)); \n} \n\n\nif (16383 >>> 0 !== 16383) { \n $ERROR('#15: 16383 >>> 0 === 16383. Actual: ' + (16383 >>> 0)); \n} \n\n\nif (32767 >>> 0 !== 32767) { \n $ERROR('#16: 32767 >>> 0 === 32767. Actual: ' + (32767 >>> 0)); \n} \n\n\nif (65535 >>> 0 !== 65535) { \n $ERROR('#17: 65535 >>> 0 === 65535. Actual: ' + (65535 >>> 0)); \n} \n\n\nif (131071 >>> 0 !== 131071) { \n $ERROR('#18: 131071 >>> 0 === 131071. Actual: ' + (131071 >>> 0)); \n} \n\n\nif (262143 >>> 0 !== 262143) { \n $ERROR('#19: 262143 >>> 0 === 262143. Actual: ' + (262143 >>> 0)); \n} \n\n\nif (524287 >>> 0 !== 524287) { \n $ERROR('#20: 524287 >>> 0 === 524287. Actual: ' + (524287 >>> 0)); \n} \n\n\nif (1048575 >>> 0 !== 1048575) { \n $ERROR('#21: 1048575 >>> 0 === 1048575. Actual: ' + (1048575 >>> 0)); \n} \n\n\nif (2097151 >>> 0 !== 2097151) { \n $ERROR('#22: 2097151 >>> 0 === 2097151. Actual: ' + (2097151 >>> 0)); \n} \n\n\nif (4194303 >>> 0 !== 4194303) { \n $ERROR('#23: 4194303 >>> 0 === 4194303. Actual: ' + (4194303 >>> 0)); \n} \n\n\nif (8388607 >>> 0 !== 8388607) { \n $ERROR('#24: 8388607 >>> 0 === 8388607. Actual: ' + (8388607 >>> 0)); \n} \n\n\nif (16777215 >>> 0 !== 16777215) { \n $ERROR('#25: 16777215 >>> 0 === 16777215. Actual: ' + (16777215 >>> 0)); \n} \n\n\nif (33554431 >>> 0 !== 33554431) { \n $ERROR('#26: 33554431 >>> 0 === 33554431. Actual: ' + (33554431 >>> 0)); \n} \n\n\nif (67108863 >>> 0 !== 67108863) { \n $ERROR('#27: 67108863 >>> 0 === 67108863. Actual: ' + (67108863 >>> 0)); \n} \n\n\nif (134217727 >>> 0 !== 134217727) { \n $ERROR('#28: 134217727 >>> 0 === 134217727. Actual: ' + (134217727 >>> 0)); \n} \n\n\nif (268435455 >>> 0 !== 268435455) { \n $ERROR('#29: 268435455 >>> 0 === 268435455. Actual: ' + (268435455 >>> 0)); \n} \n\n\nif (536870911 >>> 0 !== 536870911) { \n $ERROR('#30: 536870911 >>> 0 === 536870911. Actual: ' + (536870911 >>> 0)); \n} \n\n\nif (1073741823 >>> 0 !== 1073741823) { \n $ERROR('#31: 1073741823 >>> 0 === 1073741823. Actual: ' + (1073741823 >>> 0)); \n} \n\n\nif (2147483647 >>> 0 !== 2147483647) { \n $ERROR('#32: 2147483647 >>> 0 === 2147483647. Actual: ' + (2147483647 >>> 0)); \n} \n\n\nif (4294967295 >>> 0 !== 4294967295) { \n $ERROR('#33: 4294967295 >>> 0 === 4294967295. Actual: ' + (4294967295 >>> 0)); \n} \n\n\nif (0 >>> 1 !== 0) { \n $ERROR('#34: 0 >>> 1 === 0. Actual: ' + (0 >>> 1)); \n} \n\n\nif (1 >>> 1 !== 0) { \n $ERROR('#35: 1 >>> 1 === 0. Actual: ' + (1 >>> 1)); \n} \n\n\nif (3 >>> 1 !== 1) { \n $ERROR('#36: 3 >>> 1 === 1. Actual: ' + (3 >>> 1)); \n} \n\n\nif (7 >>> 1 !== 3) { \n $ERROR('#37: 7 >>> 1 === 3. Actual: ' + (7 >>> 1)); \n} \n\n\nif (15 >>> 1 !== 7) { \n $ERROR('#38: 15 >>> 1 === 7. Actual: ' + (15 >>> 1)); \n} \n\n\nif (31 >>> 1 !== 15) { \n $ERROR('#39: 31 >>> 1 === 15. Actual: ' + (31 >>> 1)); \n} \n\n\nif (63 >>> 1 !== 31) { \n $ERROR('#40: 63 >>> 1 === 31. Actual: ' + (63 >>> 1)); \n} \n\n\nif (127 >>> 1 !== 63) { \n $ERROR('#41: 127 >>> 1 === 63. Actual: ' + (127 >>> 1)); \n} \n\n\nif (255 >>> 1 !== 127) { \n $ERROR('#42: 255 >>> 1 === 127. Actual: ' + (255 >>> 1)); \n} \n\n\nif (511 >>> 1 !== 255) { \n $ERROR('#43: 511 >>> 1 === 255. Actual: ' + (511 >>> 1)); \n} \n\n\nif (1023 >>> 1 !== 511) { \n $ERROR('#44: 1023 >>> 1 === 511. Actual: ' + (1023 >>> 1)); \n} \n\n\nif (2047 >>> 1 !== 1023) { \n $ERROR('#45: 2047 >>> 1 === 1023. Actual: ' + (2047 >>> 1)); \n} \n\n\nif (4095 >>> 1 !== 2047) { \n $ERROR('#46: 4095 >>> 1 === 2047. Actual: ' + (4095 >>> 1)); \n} \n\n\nif (8191 >>> 1 !== 4095) { \n $ERROR('#47: 8191 >>> 1 === 4095. Actual: ' + (8191 >>> 1)); \n} \n\n\nif (16383 >>> 1 !== 8191) { \n $ERROR('#48: 16383 >>> 1 === 8191. Actual: ' + (16383 >>> 1)); \n} \n\n\nif (32767 >>> 1 !== 16383) { \n $ERROR('#49: 32767 >>> 1 === 16383. Actual: ' + (32767 >>> 1)); \n} \n\n\nif (65535 >>> 1 !== 32767) { \n $ERROR('#50: 65535 >>> 1 === 32767. Actual: ' + (65535 >>> 1)); \n} \n\n\nif (131071 >>> 1 !== 65535) { \n $ERROR('#51: 131071 >>> 1 === 65535. Actual: ' + (131071 >>> 1)); \n} \n\n\nif (262143 >>> 1 !== 131071) { \n $ERROR('#52: 262143 >>> 1 === 131071. Actual: ' + (262143 >>> 1)); \n} \n\n\nif (524287 >>> 1 !== 262143) { \n $ERROR('#53: 524287 >>> 1 === 262143. Actual: ' + (524287 >>> 1)); \n} \n\n\nif (1048575 >>> 1 !== 524287) { \n $ERROR('#54: 1048575 >>> 1 === 524287. Actual: ' + (1048575 >>> 1)); \n} \n\n\nif (2097151 >>> 1 !== 1048575) { \n $ERROR('#55: 2097151 >>> 1 === 1048575. Actual: ' + (2097151 >>> 1)); \n} \n\n\nif (4194303 >>> 1 !== 2097151) { \n $ERROR('#56: 4194303 >>> 1 === 2097151. Actual: ' + (4194303 >>> 1)); \n} \n\n\nif (8388607 >>> 1 !== 4194303) { \n $ERROR('#57: 8388607 >>> 1 === 4194303. Actual: ' + (8388607 >>> 1)); \n} \n\n\nif (16777215 >>> 1 !== 8388607) { \n $ERROR('#58: 16777215 >>> 1 === 8388607. Actual: ' + (16777215 >>> 1)); \n} \n\n\nif (33554431 >>> 1 !== 16777215) { \n $ERROR('#59: 33554431 >>> 1 === 16777215. Actual: ' + (33554431 >>> 1)); \n} \n\n\nif (67108863 >>> 1 !== 33554431) { \n $ERROR('#60: 67108863 >>> 1 === 33554431. Actual: ' + (67108863 >>> 1)); \n} \n\n\nif (134217727 >>> 1 !== 67108863) { \n $ERROR('#61: 134217727 >>> 1 === 67108863. Actual: ' + (134217727 >>> 1)); \n} \n\n\nif (268435455 >>> 1 !== 134217727) { \n $ERROR('#62: 268435455 >>> 1 === 134217727. Actual: ' + (268435455 >>> 1)); \n} \n\n\nif (536870911 >>> 1 !== 268435455) { \n $ERROR('#63: 536870911 >>> 1 === 268435455. Actual: ' + (536870911 >>> 1)); \n} \n\n\nif (1073741823 >>> 1 !== 536870911) { \n $ERROR('#64: 1073741823 >>> 1 === 536870911. Actual: ' + (1073741823 >>> 1)); \n} \n\n\nif (2147483647 >>> 1 !== 1073741823) { \n $ERROR('#65: 2147483647 >>> 1 === 1073741823. Actual: ' + (2147483647 >>> 1)); \n} \n\n\nif (4294967295 >>> 1 !== 2147483647) { \n $ERROR('#66: 4294967295 >>> 1 === 2147483647. Actual: ' + (4294967295 >>> 1)); \n} \n\n\nif (0 >>> 2 !== 0) { \n $ERROR('#67: 0 >>> 2 === 0. Actual: ' + (0 >>> 2)); \n} \n\n\nif (1 >>> 2 !== 0) { \n $ERROR('#68: 1 >>> 2 === 0. Actual: ' + (1 >>> 2)); \n} \n\n\nif (3 >>> 2 !== 0) { \n $ERROR('#69: 3 >>> 2 === 0. Actual: ' + (3 >>> 2)); \n} \n\n\nif (7 >>> 2 !== 1) { \n $ERROR('#70: 7 >>> 2 === 1. Actual: ' + (7 >>> 2)); \n} \n\n\nif (15 >>> 2 !== 3) { \n $ERROR('#71: 15 >>> 2 === 3. Actual: ' + (15 >>> 2)); \n} \n\n\nif (31 >>> 2 !== 7) { \n $ERROR('#72: 31 >>> 2 === 7. Actual: ' + (31 >>> 2)); \n} \n\n\nif (63 >>> 2 !== 15) { \n $ERROR('#73: 63 >>> 2 === 15. Actual: ' + (63 >>> 2)); \n} \n\n\nif (127 >>> 2 !== 31) { \n $ERROR('#74: 127 >>> 2 === 31. Actual: ' + (127 >>> 2)); \n} \n\n\nif (255 >>> 2 !== 63) { \n $ERROR('#75: 255 >>> 2 === 63. Actual: ' + (255 >>> 2)); \n} \n\n\nif (511 >>> 2 !== 127) { \n $ERROR('#76: 511 >>> 2 === 127. Actual: ' + (511 >>> 2)); \n} \n\n\nif (1023 >>> 2 !== 255) { \n $ERROR('#77: 1023 >>> 2 === 255. Actual: ' + (1023 >>> 2)); \n} \n\n\nif (2047 >>> 2 !== 511) { \n $ERROR('#78: 2047 >>> 2 === 511. Actual: ' + (2047 >>> 2)); \n} \n\n\nif (4095 >>> 2 !== 1023) { \n $ERROR('#79: 4095 >>> 2 === 1023. Actual: ' + (4095 >>> 2)); \n} \n\n\nif (8191 >>> 2 !== 2047) { \n $ERROR('#80: 8191 >>> 2 === 2047. Actual: ' + (8191 >>> 2)); \n} \n\n\nif (16383 >>> 2 !== 4095) { \n $ERROR('#81: 16383 >>> 2 === 4095. Actual: ' + (16383 >>> 2)); \n} \n\n\nif (32767 >>> 2 !== 8191) { \n $ERROR('#82: 32767 >>> 2 === 8191. Actual: ' + (32767 >>> 2)); \n} \n\n\nif (65535 >>> 2 !== 16383) { \n $ERROR('#83: 65535 >>> 2 === 16383. Actual: ' + (65535 >>> 2)); \n} \n\n\nif (131071 >>> 2 !== 32767) { \n $ERROR('#84: 131071 >>> 2 === 32767. Actual: ' + (131071 >>> 2)); \n} \n\n\nif (262143 >>> 2 !== 65535) { \n $ERROR('#85: 262143 >>> 2 === 65535. Actual: ' + (262143 >>> 2)); \n} \n\n\nif (524287 >>> 2 !== 131071) { \n $ERROR('#86: 524287 >>> 2 === 131071. Actual: ' + (524287 >>> 2)); \n} \n\n\nif (1048575 >>> 2 !== 262143) { \n $ERROR('#87: 1048575 >>> 2 === 262143. Actual: ' + (1048575 >>> 2)); \n} \n\n\nif (2097151 >>> 2 !== 524287) { \n $ERROR('#88: 2097151 >>> 2 === 524287. Actual: ' + (2097151 >>> 2)); \n} \n\n\nif (4194303 >>> 2 !== 1048575) { \n $ERROR('#89: 4194303 >>> 2 === 1048575. Actual: ' + (4194303 >>> 2)); \n} \n\n\nif (8388607 >>> 2 !== 2097151) { \n $ERROR('#90: 8388607 >>> 2 === 2097151. Actual: ' + (8388607 >>> 2)); \n} \n\n\nif (16777215 >>> 2 !== 4194303) { \n $ERROR('#91: 16777215 >>> 2 === 4194303. Actual: ' + (16777215 >>> 2)); \n} \n\n\nif (33554431 >>> 2 !== 8388607) { \n $ERROR('#92: 33554431 >>> 2 === 8388607. Actual: ' + (33554431 >>> 2)); \n} \n\n\nif (67108863 >>> 2 !== 16777215) { \n $ERROR('#93: 67108863 >>> 2 === 16777215. Actual: ' + (67108863 >>> 2)); \n} \n\n\nif (134217727 >>> 2 !== 33554431) { \n $ERROR('#94: 134217727 >>> 2 === 33554431. Actual: ' + (134217727 >>> 2)); \n} \n\n\nif (268435455 >>> 2 !== 67108863) { \n $ERROR('#95: 268435455 >>> 2 === 67108863. Actual: ' + (268435455 >>> 2)); \n} \n\n\nif (536870911 >>> 2 !== 134217727) { \n $ERROR('#96: 536870911 >>> 2 === 134217727. Actual: ' + (536870911 >>> 2)); \n} \n\n\nif (1073741823 >>> 2 !== 268435455) { \n $ERROR('#97: 1073741823 >>> 2 === 268435455. Actual: ' + (1073741823 >>> 2)); \n} \n\n\nif (2147483647 >>> 2 !== 536870911) { \n $ERROR('#98: 2147483647 >>> 2 === 536870911. Actual: ' + (2147483647 >>> 2)); \n} \n\n\nif (4294967295 >>> 2 !== 1073741823) { \n $ERROR('#99: 4294967295 >>> 2 === 1073741823. Actual: ' + (4294967295 >>> 2)); \n} \n\n\nif (0 >>> 3 !== 0) { \n $ERROR('#100: 0 >>> 3 === 0. Actual: ' + (0 >>> 3)); \n} \n\n\nif (1 >>> 3 !== 0) { \n $ERROR('#101: 1 >>> 3 === 0. Actual: ' + (1 >>> 3)); \n} \n\n\nif (3 >>> 3 !== 0) { \n $ERROR('#102: 3 >>> 3 === 0. Actual: ' + (3 >>> 3)); \n} \n\n\nif (7 >>> 3 !== 0) { \n $ERROR('#103: 7 >>> 3 === 0. Actual: ' + (7 >>> 3)); \n} \n\n\nif (15 >>> 3 !== 1) { \n $ERROR('#104: 15 >>> 3 === 1. Actual: ' + (15 >>> 3)); \n} \n\n\nif (31 >>> 3 !== 3) { \n $ERROR('#105: 31 >>> 3 === 3. Actual: ' + (31 >>> 3)); \n} \n\n\nif (63 >>> 3 !== 7) { \n $ERROR('#106: 63 >>> 3 === 7. Actual: ' + (63 >>> 3)); \n} \n\n\nif (127 >>> 3 !== 15) { \n $ERROR('#107: 127 >>> 3 === 15. Actual: ' + (127 >>> 3)); \n} \n\n\nif (255 >>> 3 !== 31) { \n $ERROR('#108: 255 >>> 3 === 31. Actual: ' + (255 >>> 3)); \n} \n\n\nif (511 >>> 3 !== 63) { \n $ERROR('#109: 511 >>> 3 === 63. Actual: ' + (511 >>> 3)); \n} \n\n\nif (1023 >>> 3 !== 127) { \n $ERROR('#110: 1023 >>> 3 === 127. Actual: ' + (1023 >>> 3)); \n} \n\n\nif (2047 >>> 3 !== 255) { \n $ERROR('#111: 2047 >>> 3 === 255. Actual: ' + (2047 >>> 3)); \n} \n\n\nif (4095 >>> 3 !== 511) { \n $ERROR('#112: 4095 >>> 3 === 511. Actual: ' + (4095 >>> 3)); \n} \n\n\nif (8191 >>> 3 !== 1023) { \n $ERROR('#113: 8191 >>> 3 === 1023. Actual: ' + (8191 >>> 3)); \n} \n\n\nif (16383 >>> 3 !== 2047) { \n $ERROR('#114: 16383 >>> 3 === 2047. Actual: ' + (16383 >>> 3)); \n} \n\n\nif (32767 >>> 3 !== 4095) { \n $ERROR('#115: 32767 >>> 3 === 4095. Actual: ' + (32767 >>> 3)); \n} \n\n\nif (65535 >>> 3 !== 8191) { \n $ERROR('#116: 65535 >>> 3 === 8191. Actual: ' + (65535 >>> 3)); \n} \n\n\nif (131071 >>> 3 !== 16383) { \n $ERROR('#117: 131071 >>> 3 === 16383. Actual: ' + (131071 >>> 3)); \n} \n\n\nif (262143 >>> 3 !== 32767) { \n $ERROR('#118: 262143 >>> 3 === 32767. Actual: ' + (262143 >>> 3)); \n} \n\n\nif (524287 >>> 3 !== 65535) { \n $ERROR('#119: 524287 >>> 3 === 65535. Actual: ' + (524287 >>> 3)); \n} \n\n\nif (1048575 >>> 3 !== 131071) { \n $ERROR('#120: 1048575 >>> 3 === 131071. Actual: ' + (1048575 >>> 3)); \n} \n\n\nif (2097151 >>> 3 !== 262143) { \n $ERROR('#121: 2097151 >>> 3 === 262143. Actual: ' + (2097151 >>> 3)); \n} \n\n\nif (4194303 >>> 3 !== 524287) { \n $ERROR('#122: 4194303 >>> 3 === 524287. Actual: ' + (4194303 >>> 3)); \n} \n\n\nif (8388607 >>> 3 !== 1048575) { \n $ERROR('#123: 8388607 >>> 3 === 1048575. Actual: ' + (8388607 >>> 3)); \n} \n\n\nif (16777215 >>> 3 !== 2097151) { \n $ERROR('#124: 16777215 >>> 3 === 2097151. Actual: ' + (16777215 >>> 3)); \n} \n\n\nif (33554431 >>> 3 !== 4194303) { \n $ERROR('#125: 33554431 >>> 3 === 4194303. Actual: ' + (33554431 >>> 3)); \n} \n\n\nif (67108863 >>> 3 !== 8388607) { \n $ERROR('#126: 67108863 >>> 3 === 8388607. Actual: ' + (67108863 >>> 3)); \n} \n\n\nif (134217727 >>> 3 !== 16777215) { \n $ERROR('#127: 134217727 >>> 3 === 16777215. Actual: ' + (134217727 >>> 3)); \n} \n\n\nif (268435455 >>> 3 !== 33554431) { \n $ERROR('#128: 268435455 >>> 3 === 33554431. Actual: ' + (268435455 >>> 3)); \n} \n\n\nif (536870911 >>> 3 !== 67108863) { \n $ERROR('#129: 536870911 >>> 3 === 67108863. Actual: ' + (536870911 >>> 3)); \n} \n\n\nif (1073741823 >>> 3 !== 134217727) { \n $ERROR('#130: 1073741823 >>> 3 === 134217727. Actual: ' + (1073741823 >>> 3)); \n} \n\n\nif (2147483647 >>> 3 !== 268435455) { \n $ERROR('#131: 2147483647 >>> 3 === 268435455. Actual: ' + (2147483647 >>> 3)); \n} \n\n\nif (4294967295 >>> 3 !== 536870911) { \n $ERROR('#132: 4294967295 >>> 3 === 536870911. Actual: ' + (4294967295 >>> 3)); \n} \n\n\nif (0 >>> 4 !== 0) { \n $ERROR('#133: 0 >>> 4 === 0. Actual: ' + (0 >>> 4)); \n} \n\n\nif (1 >>> 4 !== 0) { \n $ERROR('#134: 1 >>> 4 === 0. Actual: ' + (1 >>> 4)); \n} \n\n\nif (3 >>> 4 !== 0) { \n $ERROR('#135: 3 >>> 4 === 0. Actual: ' + (3 >>> 4)); \n} \n\n\nif (7 >>> 4 !== 0) { \n $ERROR('#136: 7 >>> 4 === 0. Actual: ' + (7 >>> 4)); \n} \n\n\nif (15 >>> 4 !== 0) { \n $ERROR('#137: 15 >>> 4 === 0. Actual: ' + (15 >>> 4)); \n} \n\n\nif (31 >>> 4 !== 1) { \n $ERROR('#138: 31 >>> 4 === 1. Actual: ' + (31 >>> 4)); \n} \n\n\nif (63 >>> 4 !== 3) { \n $ERROR('#139: 63 >>> 4 === 3. Actual: ' + (63 >>> 4)); \n} \n\n\nif (127 >>> 4 !== 7) { \n $ERROR('#140: 127 >>> 4 === 7. Actual: ' + (127 >>> 4)); \n} \n\n\nif (255 >>> 4 !== 15) { \n $ERROR('#141: 255 >>> 4 === 15. Actual: ' + (255 >>> 4)); \n} \n\n\nif (511 >>> 4 !== 31) { \n $ERROR('#142: 511 >>> 4 === 31. Actual: ' + (511 >>> 4)); \n} \n\n\nif (1023 >>> 4 !== 63) { \n $ERROR('#143: 1023 >>> 4 === 63. Actual: ' + (1023 >>> 4)); \n} \n\n\nif (2047 >>> 4 !== 127) { \n $ERROR('#144: 2047 >>> 4 === 127. Actual: ' + (2047 >>> 4)); \n} \n\n\nif (4095 >>> 4 !== 255) { \n $ERROR('#145: 4095 >>> 4 === 255. Actual: ' + (4095 >>> 4)); \n} \n\n\nif (8191 >>> 4 !== 511) { \n $ERROR('#146: 8191 >>> 4 === 511. Actual: ' + (8191 >>> 4)); \n} \n\n\nif (16383 >>> 4 !== 1023) { \n $ERROR('#147: 16383 >>> 4 === 1023. Actual: ' + (16383 >>> 4)); \n} \n\n\nif (32767 >>> 4 !== 2047) { \n $ERROR('#148: 32767 >>> 4 === 2047. Actual: ' + (32767 >>> 4)); \n} \n\n\nif (65535 >>> 4 !== 4095) { \n $ERROR('#149: 65535 >>> 4 === 4095. Actual: ' + (65535 >>> 4)); \n} \n\n\nif (131071 >>> 4 !== 8191) { \n $ERROR('#150: 131071 >>> 4 === 8191. Actual: ' + (131071 >>> 4)); \n} \n\n\nif (262143 >>> 4 !== 16383) { \n $ERROR('#151: 262143 >>> 4 === 16383. Actual: ' + (262143 >>> 4)); \n} \n\n\nif (524287 >>> 4 !== 32767) { \n $ERROR('#152: 524287 >>> 4 === 32767. Actual: ' + (524287 >>> 4)); \n} \n\n\nif (1048575 >>> 4 !== 65535) { \n $ERROR('#153: 1048575 >>> 4 === 65535. Actual: ' + (1048575 >>> 4)); \n} \n\n\nif (2097151 >>> 4 !== 131071) { \n $ERROR('#154: 2097151 >>> 4 === 131071. Actual: ' + (2097151 >>> 4)); \n} \n\n\nif (4194303 >>> 4 !== 262143) { \n $ERROR('#155: 4194303 >>> 4 === 262143. Actual: ' + (4194303 >>> 4)); \n} \n\n\nif (8388607 >>> 4 !== 524287) { \n $ERROR('#156: 8388607 >>> 4 === 524287. Actual: ' + (8388607 >>> 4)); \n} \n\n\nif (16777215 >>> 4 !== 1048575) { \n $ERROR('#157: 16777215 >>> 4 === 1048575. Actual: ' + (16777215 >>> 4)); \n} \n\n\nif (33554431 >>> 4 !== 2097151) { \n $ERROR('#158: 33554431 >>> 4 === 2097151. Actual: ' + (33554431 >>> 4)); \n} \n\n\nif (67108863 >>> 4 !== 4194303) { \n $ERROR('#159: 67108863 >>> 4 === 4194303. Actual: ' + (67108863 >>> 4)); \n} \n\n\nif (134217727 >>> 4 !== 8388607) { \n $ERROR('#160: 134217727 >>> 4 === 8388607. Actual: ' + (134217727 >>> 4)); \n} \n\n\nif (268435455 >>> 4 !== 16777215) { \n $ERROR('#161: 268435455 >>> 4 === 16777215. Actual: ' + (268435455 >>> 4)); \n} \n\n\nif (536870911 >>> 4 !== 33554431) { \n $ERROR('#162: 536870911 >>> 4 === 33554431. Actual: ' + (536870911 >>> 4)); \n} \n\n\nif (1073741823 >>> 4 !== 67108863) { \n $ERROR('#163: 1073741823 >>> 4 === 67108863. Actual: ' + (1073741823 >>> 4)); \n} \n\n\nif (2147483647 >>> 4 !== 134217727) { \n $ERROR('#164: 2147483647 >>> 4 === 134217727. Actual: ' + (2147483647 >>> 4)); \n} \n\n\nif (4294967295 >>> 4 !== 268435455) { \n $ERROR('#165: 4294967295 >>> 4 === 268435455. Actual: ' + (4294967295 >>> 4)); \n} \n\n\nif (0 >>> 5 !== 0) { \n $ERROR('#166: 0 >>> 5 === 0. Actual: ' + (0 >>> 5)); \n} \n\n\nif (1 >>> 5 !== 0) { \n $ERROR('#167: 1 >>> 5 === 0. Actual: ' + (1 >>> 5)); \n} \n\n\nif (3 >>> 5 !== 0) { \n $ERROR('#168: 3 >>> 5 === 0. Actual: ' + (3 >>> 5)); \n} \n\n\nif (7 >>> 5 !== 0) { \n $ERROR('#169: 7 >>> 5 === 0. Actual: ' + (7 >>> 5)); \n} \n\n\nif (15 >>> 5 !== 0) { \n $ERROR('#170: 15 >>> 5 === 0. Actual: ' + (15 >>> 5)); \n} \n\n\nif (31 >>> 5 !== 0) { \n $ERROR('#171: 31 >>> 5 === 0. Actual: ' + (31 >>> 5)); \n} \n\n\nif (63 >>> 5 !== 1) { \n $ERROR('#172: 63 >>> 5 === 1. Actual: ' + (63 >>> 5)); \n} \n\n\nif (127 >>> 5 !== 3) { \n $ERROR('#173: 127 >>> 5 === 3. Actual: ' + (127 >>> 5)); \n} \n\n\nif (255 >>> 5 !== 7) { \n $ERROR('#174: 255 >>> 5 === 7. Actual: ' + (255 >>> 5)); \n} \n\n\nif (511 >>> 5 !== 15) { \n $ERROR('#175: 511 >>> 5 === 15. Actual: ' + (511 >>> 5)); \n} \n\n\nif (1023 >>> 5 !== 31) { \n $ERROR('#176: 1023 >>> 5 === 31. Actual: ' + (1023 >>> 5)); \n} \n\n\nif (2047 >>> 5 !== 63) { \n $ERROR('#177: 2047 >>> 5 === 63. Actual: ' + (2047 >>> 5)); \n} \n\n\nif (4095 >>> 5 !== 127) { \n $ERROR('#178: 4095 >>> 5 === 127. Actual: ' + (4095 >>> 5)); \n} \n\n\nif (8191 >>> 5 !== 255) { \n $ERROR('#179: 8191 >>> 5 === 255. Actual: ' + (8191 >>> 5)); \n} \n\n\nif (16383 >>> 5 !== 511) { \n $ERROR('#180: 16383 >>> 5 === 511. Actual: ' + (16383 >>> 5)); \n} \n\n\nif (32767 >>> 5 !== 1023) { \n $ERROR('#181: 32767 >>> 5 === 1023. Actual: ' + (32767 >>> 5)); \n} \n\n\nif (65535 >>> 5 !== 2047) { \n $ERROR('#182: 65535 >>> 5 === 2047. Actual: ' + (65535 >>> 5)); \n} \n\n\nif (131071 >>> 5 !== 4095) { \n $ERROR('#183: 131071 >>> 5 === 4095. Actual: ' + (131071 >>> 5)); \n} \n\n\nif (262143 >>> 5 !== 8191) { \n $ERROR('#184: 262143 >>> 5 === 8191. Actual: ' + (262143 >>> 5)); \n} \n\n\nif (524287 >>> 5 !== 16383) { \n $ERROR('#185: 524287 >>> 5 === 16383. Actual: ' + (524287 >>> 5)); \n} \n\n\nif (1048575 >>> 5 !== 32767) { \n $ERROR('#186: 1048575 >>> 5 === 32767. Actual: ' + (1048575 >>> 5)); \n} \n\n\nif (2097151 >>> 5 !== 65535) { \n $ERROR('#187: 2097151 >>> 5 === 65535. Actual: ' + (2097151 >>> 5)); \n} \n\n\nif (4194303 >>> 5 !== 131071) { \n $ERROR('#188: 4194303 >>> 5 === 131071. Actual: ' + (4194303 >>> 5)); \n} \n\n\nif (8388607 >>> 5 !== 262143) { \n $ERROR('#189: 8388607 >>> 5 === 262143. Actual: ' + (8388607 >>> 5)); \n} \n\n\nif (16777215 >>> 5 !== 524287) { \n $ERROR('#190: 16777215 >>> 5 === 524287. Actual: ' + (16777215 >>> 5)); \n} \n\n\nif (33554431 >>> 5 !== 1048575) { \n $ERROR('#191: 33554431 >>> 5 === 1048575. Actual: ' + (33554431 >>> 5)); \n} \n\n\nif (67108863 >>> 5 !== 2097151) { \n $ERROR('#192: 67108863 >>> 5 === 2097151. Actual: ' + (67108863 >>> 5)); \n} \n\n\nif (134217727 >>> 5 !== 4194303) { \n $ERROR('#193: 134217727 >>> 5 === 4194303. Actual: ' + (134217727 >>> 5)); \n} \n\n\nif (268435455 >>> 5 !== 8388607) { \n $ERROR('#194: 268435455 >>> 5 === 8388607. Actual: ' + (268435455 >>> 5)); \n} \n\n\nif (536870911 >>> 5 !== 16777215) { \n $ERROR('#195: 536870911 >>> 5 === 16777215. Actual: ' + (536870911 >>> 5)); \n} \n\n\nif (1073741823 >>> 5 !== 33554431) { \n $ERROR('#196: 1073741823 >>> 5 === 33554431. Actual: ' + (1073741823 >>> 5)); \n} \n\n\nif (2147483647 >>> 5 !== 67108863) { \n $ERROR('#197: 2147483647 >>> 5 === 67108863. Actual: ' + (2147483647 >>> 5)); \n} \n\n\nif (4294967295 >>> 5 !== 134217727) { \n $ERROR('#198: 4294967295 >>> 5 === 134217727. Actual: ' + (4294967295 >>> 5)); \n} \n\n\nif (0 >>> 6 !== 0) { \n $ERROR('#199: 0 >>> 6 === 0. Actual: ' + (0 >>> 6)); \n} \n\n\nif (1 >>> 6 !== 0) { \n $ERROR('#200: 1 >>> 6 === 0. Actual: ' + (1 >>> 6)); \n} \n\n\nif (3 >>> 6 !== 0) { \n $ERROR('#201: 3 >>> 6 === 0. Actual: ' + (3 >>> 6)); \n} \n\n\nif (7 >>> 6 !== 0) { \n $ERROR('#202: 7 >>> 6 === 0. Actual: ' + (7 >>> 6)); \n} \n\n\nif (15 >>> 6 !== 0) { \n $ERROR('#203: 15 >>> 6 === 0. Actual: ' + (15 >>> 6)); \n} \n\n\nif (31 >>> 6 !== 0) { \n $ERROR('#204: 31 >>> 6 === 0. Actual: ' + (31 >>> 6)); \n} \n\n\nif (63 >>> 6 !== 0) { \n $ERROR('#205: 63 >>> 6 === 0. Actual: ' + (63 >>> 6)); \n} \n\n\nif (127 >>> 6 !== 1) { \n $ERROR('#206: 127 >>> 6 === 1. Actual: ' + (127 >>> 6)); \n} \n\n\nif (255 >>> 6 !== 3) { \n $ERROR('#207: 255 >>> 6 === 3. Actual: ' + (255 >>> 6)); \n} \n\n\nif (511 >>> 6 !== 7) { \n $ERROR('#208: 511 >>> 6 === 7. Actual: ' + (511 >>> 6)); \n} \n\n\nif (1023 >>> 6 !== 15) { \n $ERROR('#209: 1023 >>> 6 === 15. Actual: ' + (1023 >>> 6)); \n} \n\n\nif (2047 >>> 6 !== 31) { \n $ERROR('#210: 2047 >>> 6 === 31. Actual: ' + (2047 >>> 6)); \n} \n\n\nif (4095 >>> 6 !== 63) { \n $ERROR('#211: 4095 >>> 6 === 63. Actual: ' + (4095 >>> 6)); \n} \n\n\nif (8191 >>> 6 !== 127) { \n $ERROR('#212: 8191 >>> 6 === 127. Actual: ' + (8191 >>> 6)); \n} \n\n\nif (16383 >>> 6 !== 255) { \n $ERROR('#213: 16383 >>> 6 === 255. Actual: ' + (16383 >>> 6)); \n} \n\n\nif (32767 >>> 6 !== 511) { \n $ERROR('#214: 32767 >>> 6 === 511. Actual: ' + (32767 >>> 6)); \n} \n\n\nif (65535 >>> 6 !== 1023) { \n $ERROR('#215: 65535 >>> 6 === 1023. Actual: ' + (65535 >>> 6)); \n} \n\n\nif (131071 >>> 6 !== 2047) { \n $ERROR('#216: 131071 >>> 6 === 2047. Actual: ' + (131071 >>> 6)); \n} \n\n\nif (262143 >>> 6 !== 4095) { \n $ERROR('#217: 262143 >>> 6 === 4095. Actual: ' + (262143 >>> 6)); \n} \n\n\nif (524287 >>> 6 !== 8191) { \n $ERROR('#218: 524287 >>> 6 === 8191. Actual: ' + (524287 >>> 6)); \n} \n\n\nif (1048575 >>> 6 !== 16383) { \n $ERROR('#219: 1048575 >>> 6 === 16383. Actual: ' + (1048575 >>> 6)); \n} \n\n\nif (2097151 >>> 6 !== 32767) { \n $ERROR('#220: 2097151 >>> 6 === 32767. Actual: ' + (2097151 >>> 6)); \n} \n\n\nif (4194303 >>> 6 !== 65535) { \n $ERROR('#221: 4194303 >>> 6 === 65535. Actual: ' + (4194303 >>> 6)); \n} \n\n\nif (8388607 >>> 6 !== 131071) { \n $ERROR('#222: 8388607 >>> 6 === 131071. Actual: ' + (8388607 >>> 6)); \n} \n\n\nif (16777215 >>> 6 !== 262143) { \n $ERROR('#223: 16777215 >>> 6 === 262143. Actual: ' + (16777215 >>> 6)); \n} \n\n\nif (33554431 >>> 6 !== 524287) { \n $ERROR('#224: 33554431 >>> 6 === 524287. Actual: ' + (33554431 >>> 6)); \n} \n\n\nif (67108863 >>> 6 !== 1048575) { \n $ERROR('#225: 67108863 >>> 6 === 1048575. Actual: ' + (67108863 >>> 6)); \n} \n\n\nif (134217727 >>> 6 !== 2097151) { \n $ERROR('#226: 134217727 >>> 6 === 2097151. Actual: ' + (134217727 >>> 6)); \n} \n\n\nif (268435455 >>> 6 !== 4194303) { \n $ERROR('#227: 268435455 >>> 6 === 4194303. Actual: ' + (268435455 >>> 6)); \n} \n\n\nif (536870911 >>> 6 !== 8388607) { \n $ERROR('#228: 536870911 >>> 6 === 8388607. Actual: ' + (536870911 >>> 6)); \n} \n\n\nif (1073741823 >>> 6 !== 16777215) { \n $ERROR('#229: 1073741823 >>> 6 === 16777215. Actual: ' + (1073741823 >>> 6)); \n} \n\n\nif (2147483647 >>> 6 !== 33554431) { \n $ERROR('#230: 2147483647 >>> 6 === 33554431. Actual: ' + (2147483647 >>> 6)); \n} \n\n\nif (4294967295 >>> 6 !== 67108863) { \n $ERROR('#231: 4294967295 >>> 6 === 67108863. Actual: ' + (4294967295 >>> 6)); \n} \n\n\nif (0 >>> 7 !== 0) { \n $ERROR('#232: 0 >>> 7 === 0. Actual: ' + (0 >>> 7)); \n} \n\n\nif (1 >>> 7 !== 0) { \n $ERROR('#233: 1 >>> 7 === 0. Actual: ' + (1 >>> 7)); \n} \n\n\nif (3 >>> 7 !== 0) { \n $ERROR('#234: 3 >>> 7 === 0. Actual: ' + (3 >>> 7)); \n} \n\n\nif (7 >>> 7 !== 0) { \n $ERROR('#235: 7 >>> 7 === 0. Actual: ' + (7 >>> 7)); \n} \n\n\nif (15 >>> 7 !== 0) { \n $ERROR('#236: 15 >>> 7 === 0. Actual: ' + (15 >>> 7)); \n} \n\n\nif (31 >>> 7 !== 0) { \n $ERROR('#237: 31 >>> 7 === 0. Actual: ' + (31 >>> 7)); \n} \n\n\nif (63 >>> 7 !== 0) { \n $ERROR('#238: 63 >>> 7 === 0. Actual: ' + (63 >>> 7)); \n} \n\n\nif (127 >>> 7 !== 0) { \n $ERROR('#239: 127 >>> 7 === 0. Actual: ' + (127 >>> 7)); \n} \n\n\nif (255 >>> 7 !== 1) { \n $ERROR('#240: 255 >>> 7 === 1. Actual: ' + (255 >>> 7)); \n} \n\n\nif (511 >>> 7 !== 3) { \n $ERROR('#241: 511 >>> 7 === 3. Actual: ' + (511 >>> 7)); \n} \n\n\nif (1023 >>> 7 !== 7) { \n $ERROR('#242: 1023 >>> 7 === 7. Actual: ' + (1023 >>> 7)); \n} \n\n\nif (2047 >>> 7 !== 15) { \n $ERROR('#243: 2047 >>> 7 === 15. Actual: ' + (2047 >>> 7)); \n} \n\n\nif (4095 >>> 7 !== 31) { \n $ERROR('#244: 4095 >>> 7 === 31. Actual: ' + (4095 >>> 7)); \n} \n\n\nif (8191 >>> 7 !== 63) { \n $ERROR('#245: 8191 >>> 7 === 63. Actual: ' + (8191 >>> 7)); \n} \n\n\nif (16383 >>> 7 !== 127) { \n $ERROR('#246: 16383 >>> 7 === 127. Actual: ' + (16383 >>> 7)); \n} \n\n\nif (32767 >>> 7 !== 255) { \n $ERROR('#247: 32767 >>> 7 === 255. Actual: ' + (32767 >>> 7)); \n} \n\n\nif (65535 >>> 7 !== 511) { \n $ERROR('#248: 65535 >>> 7 === 511. Actual: ' + (65535 >>> 7)); \n} \n\n\nif (131071 >>> 7 !== 1023) { \n $ERROR('#249: 131071 >>> 7 === 1023. Actual: ' + (131071 >>> 7)); \n} \n\n\nif (262143 >>> 7 !== 2047) { \n $ERROR('#250: 262143 >>> 7 === 2047. Actual: ' + (262143 >>> 7)); \n} \n\n\nif (524287 >>> 7 !== 4095) { \n $ERROR('#251: 524287 >>> 7 === 4095. Actual: ' + (524287 >>> 7)); \n} \n\n\nif (1048575 >>> 7 !== 8191) { \n $ERROR('#252: 1048575 >>> 7 === 8191. Actual: ' + (1048575 >>> 7)); \n} \n\n\nif (2097151 >>> 7 !== 16383) { \n $ERROR('#253: 2097151 >>> 7 === 16383. Actual: ' + (2097151 >>> 7)); \n} \n\n\nif (4194303 >>> 7 !== 32767) { \n $ERROR('#254: 4194303 >>> 7 === 32767. Actual: ' + (4194303 >>> 7)); \n} \n\n\nif (8388607 >>> 7 !== 65535) { \n $ERROR('#255: 8388607 >>> 7 === 65535. Actual: ' + (8388607 >>> 7)); \n} \n\n\nif (16777215 >>> 7 !== 131071) { \n $ERROR('#256: 16777215 >>> 7 === 131071. Actual: ' + (16777215 >>> 7)); \n} \n\n\nif (33554431 >>> 7 !== 262143) { \n $ERROR('#257: 33554431 >>> 7 === 262143. Actual: ' + (33554431 >>> 7)); \n} \n\n\nif (67108863 >>> 7 !== 524287) { \n $ERROR('#258: 67108863 >>> 7 === 524287. Actual: ' + (67108863 >>> 7)); \n} \n\n\nif (134217727 >>> 7 !== 1048575) { \n $ERROR('#259: 134217727 >>> 7 === 1048575. Actual: ' + (134217727 >>> 7)); \n} \n\n\nif (268435455 >>> 7 !== 2097151) { \n $ERROR('#260: 268435455 >>> 7 === 2097151. Actual: ' + (268435455 >>> 7)); \n} \n\n\nif (536870911 >>> 7 !== 4194303) { \n $ERROR('#261: 536870911 >>> 7 === 4194303. Actual: ' + (536870911 >>> 7)); \n} \n\n\nif (1073741823 >>> 7 !== 8388607) { \n $ERROR('#262: 1073741823 >>> 7 === 8388607. Actual: ' + (1073741823 >>> 7)); \n} \n\n\nif (2147483647 >>> 7 !== 16777215) { \n $ERROR('#263: 2147483647 >>> 7 === 16777215. Actual: ' + (2147483647 >>> 7)); \n} \n\n\nif (4294967295 >>> 7 !== 33554431) { \n $ERROR('#264: 4294967295 >>> 7 === 33554431. Actual: ' + (4294967295 >>> 7)); \n} \n\n\nif (0 >>> 8 !== 0) { \n $ERROR('#265: 0 >>> 8 === 0. Actual: ' + (0 >>> 8)); \n} \n\n\nif (1 >>> 8 !== 0) { \n $ERROR('#266: 1 >>> 8 === 0. Actual: ' + (1 >>> 8)); \n} \n\n\nif (3 >>> 8 !== 0) { \n $ERROR('#267: 3 >>> 8 === 0. Actual: ' + (3 >>> 8)); \n} \n\n\nif (7 >>> 8 !== 0) { \n $ERROR('#268: 7 >>> 8 === 0. Actual: ' + (7 >>> 8)); \n} \n\n\nif (15 >>> 8 !== 0) { \n $ERROR('#269: 15 >>> 8 === 0. Actual: ' + (15 >>> 8)); \n} \n\n\nif (31 >>> 8 !== 0) { \n $ERROR('#270: 31 >>> 8 === 0. Actual: ' + (31 >>> 8)); \n} \n\n\nif (63 >>> 8 !== 0) { \n $ERROR('#271: 63 >>> 8 === 0. Actual: ' + (63 >>> 8)); \n} \n\n\nif (127 >>> 8 !== 0) { \n $ERROR('#272: 127 >>> 8 === 0. Actual: ' + (127 >>> 8)); \n} \n\n\nif (255 >>> 8 !== 0) { \n $ERROR('#273: 255 >>> 8 === 0. Actual: ' + (255 >>> 8)); \n} \n\n\nif (511 >>> 8 !== 1) { \n $ERROR('#274: 511 >>> 8 === 1. Actual: ' + (511 >>> 8)); \n} \n\n\nif (1023 >>> 8 !== 3) { \n $ERROR('#275: 1023 >>> 8 === 3. Actual: ' + (1023 >>> 8)); \n} \n\n\nif (2047 >>> 8 !== 7) { \n $ERROR('#276: 2047 >>> 8 === 7. Actual: ' + (2047 >>> 8)); \n} \n\n\nif (4095 >>> 8 !== 15) { \n $ERROR('#277: 4095 >>> 8 === 15. Actual: ' + (4095 >>> 8)); \n} \n\n\nif (8191 >>> 8 !== 31) { \n $ERROR('#278: 8191 >>> 8 === 31. Actual: ' + (8191 >>> 8)); \n} \n\n\nif (16383 >>> 8 !== 63) { \n $ERROR('#279: 16383 >>> 8 === 63. Actual: ' + (16383 >>> 8)); \n} \n\n\nif (32767 >>> 8 !== 127) { \n $ERROR('#280: 32767 >>> 8 === 127. Actual: ' + (32767 >>> 8)); \n} \n\n\nif (65535 >>> 8 !== 255) { \n $ERROR('#281: 65535 >>> 8 === 255. Actual: ' + (65535 >>> 8)); \n} \n\n\nif (131071 >>> 8 !== 511) { \n $ERROR('#282: 131071 >>> 8 === 511. Actual: ' + (131071 >>> 8)); \n} \n\n\nif (262143 >>> 8 !== 1023) { \n $ERROR('#283: 262143 >>> 8 === 1023. Actual: ' + (262143 >>> 8)); \n} \n\n\nif (524287 >>> 8 !== 2047) { \n $ERROR('#284: 524287 >>> 8 === 2047. Actual: ' + (524287 >>> 8)); \n} \n\n\nif (1048575 >>> 8 !== 4095) { \n $ERROR('#285: 1048575 >>> 8 === 4095. Actual: ' + (1048575 >>> 8)); \n} \n\n\nif (2097151 >>> 8 !== 8191) { \n $ERROR('#286: 2097151 >>> 8 === 8191. Actual: ' + (2097151 >>> 8)); \n} \n\n\nif (4194303 >>> 8 !== 16383) { \n $ERROR('#287: 4194303 >>> 8 === 16383. Actual: ' + (4194303 >>> 8)); \n} \n\n\nif (8388607 >>> 8 !== 32767) { \n $ERROR('#288: 8388607 >>> 8 === 32767. Actual: ' + (8388607 >>> 8)); \n} \n\n\nif (16777215 >>> 8 !== 65535) { \n $ERROR('#289: 16777215 >>> 8 === 65535. Actual: ' + (16777215 >>> 8)); \n} \n\n\nif (33554431 >>> 8 !== 131071) { \n $ERROR('#290: 33554431 >>> 8 === 131071. Actual: ' + (33554431 >>> 8)); \n} \n\n\nif (67108863 >>> 8 !== 262143) { \n $ERROR('#291: 67108863 >>> 8 === 262143. Actual: ' + (67108863 >>> 8)); \n} \n\n\nif (134217727 >>> 8 !== 524287) { \n $ERROR('#292: 134217727 >>> 8 === 524287. Actual: ' + (134217727 >>> 8)); \n} \n\n\nif (268435455 >>> 8 !== 1048575) { \n $ERROR('#293: 268435455 >>> 8 === 1048575. Actual: ' + (268435455 >>> 8)); \n} \n\n\nif (536870911 >>> 8 !== 2097151) { \n $ERROR('#294: 536870911 >>> 8 === 2097151. Actual: ' + (536870911 >>> 8)); \n} \n\n\nif (1073741823 >>> 8 !== 4194303) { \n $ERROR('#295: 1073741823 >>> 8 === 4194303. Actual: ' + (1073741823 >>> 8)); \n} \n\n\nif (2147483647 >>> 8 !== 8388607) { \n $ERROR('#296: 2147483647 >>> 8 === 8388607. Actual: ' + (2147483647 >>> 8)); \n} \n\n\nif (4294967295 >>> 8 !== 16777215) { \n $ERROR('#297: 4294967295 >>> 8 === 16777215. Actual: ' + (4294967295 >>> 8)); \n} \n\n\nif (0 >>> 9 !== 0) { \n $ERROR('#298: 0 >>> 9 === 0. Actual: ' + (0 >>> 9)); \n} \n\n\nif (1 >>> 9 !== 0) { \n $ERROR('#299: 1 >>> 9 === 0. Actual: ' + (1 >>> 9)); \n} \n\n\nif (3 >>> 9 !== 0) { \n $ERROR('#300: 3 >>> 9 === 0. Actual: ' + (3 >>> 9)); \n} \n\n\nif (7 >>> 9 !== 0) { \n $ERROR('#301: 7 >>> 9 === 0. Actual: ' + (7 >>> 9)); \n} \n\n\nif (15 >>> 9 !== 0) { \n $ERROR('#302: 15 >>> 9 === 0. Actual: ' + (15 >>> 9)); \n} \n\n\nif (31 >>> 9 !== 0) { \n $ERROR('#303: 31 >>> 9 === 0. Actual: ' + (31 >>> 9)); \n} \n\n\nif (63 >>> 9 !== 0) { \n $ERROR('#304: 63 >>> 9 === 0. Actual: ' + (63 >>> 9)); \n} \n\n\nif (127 >>> 9 !== 0) { \n $ERROR('#305: 127 >>> 9 === 0. Actual: ' + (127 >>> 9)); \n} \n\n\nif (255 >>> 9 !== 0) { \n $ERROR('#306: 255 >>> 9 === 0. Actual: ' + (255 >>> 9)); \n} \n\n\nif (511 >>> 9 !== 0) { \n $ERROR('#307: 511 >>> 9 === 0. Actual: ' + (511 >>> 9)); \n} \n\n\nif (1023 >>> 9 !== 1) { \n $ERROR('#308: 1023 >>> 9 === 1. Actual: ' + (1023 >>> 9)); \n} \n\n\nif (2047 >>> 9 !== 3) { \n $ERROR('#309: 2047 >>> 9 === 3. Actual: ' + (2047 >>> 9)); \n} \n\n\nif (4095 >>> 9 !== 7) { \n $ERROR('#310: 4095 >>> 9 === 7. Actual: ' + (4095 >>> 9)); \n} \n\n\nif (8191 >>> 9 !== 15) { \n $ERROR('#311: 8191 >>> 9 === 15. Actual: ' + (8191 >>> 9)); \n} \n\n\nif (16383 >>> 9 !== 31) { \n $ERROR('#312: 16383 >>> 9 === 31. Actual: ' + (16383 >>> 9)); \n} \n\n\nif (32767 >>> 9 !== 63) { \n $ERROR('#313: 32767 >>> 9 === 63. Actual: ' + (32767 >>> 9)); \n} \n\n\nif (65535 >>> 9 !== 127) { \n $ERROR('#314: 65535 >>> 9 === 127. Actual: ' + (65535 >>> 9)); \n} \n\n\nif (131071 >>> 9 !== 255) { \n $ERROR('#315: 131071 >>> 9 === 255. Actual: ' + (131071 >>> 9)); \n} \n\n\nif (262143 >>> 9 !== 511) { \n $ERROR('#316: 262143 >>> 9 === 511. Actual: ' + (262143 >>> 9)); \n} \n\n\nif (524287 >>> 9 !== 1023) { \n $ERROR('#317: 524287 >>> 9 === 1023. Actual: ' + (524287 >>> 9)); \n} \n\n\nif (1048575 >>> 9 !== 2047) { \n $ERROR('#318: 1048575 >>> 9 === 2047. Actual: ' + (1048575 >>> 9)); \n} \n\n\nif (2097151 >>> 9 !== 4095) { \n $ERROR('#319: 2097151 >>> 9 === 4095. Actual: ' + (2097151 >>> 9)); \n} \n\n\nif (4194303 >>> 9 !== 8191) { \n $ERROR('#320: 4194303 >>> 9 === 8191. Actual: ' + (4194303 >>> 9)); \n} \n\n\nif (8388607 >>> 9 !== 16383) { \n $ERROR('#321: 8388607 >>> 9 === 16383. Actual: ' + (8388607 >>> 9)); \n} \n\n\nif (16777215 >>> 9 !== 32767) { \n $ERROR('#322: 16777215 >>> 9 === 32767. Actual: ' + (16777215 >>> 9)); \n} \n\n\nif (33554431 >>> 9 !== 65535) { \n $ERROR('#323: 33554431 >>> 9 === 65535. Actual: ' + (33554431 >>> 9)); \n} \n\n\nif (67108863 >>> 9 !== 131071) { \n $ERROR('#324: 67108863 >>> 9 === 131071. Actual: ' + (67108863 >>> 9)); \n} \n\n\nif (134217727 >>> 9 !== 262143) { \n $ERROR('#325: 134217727 >>> 9 === 262143. Actual: ' + (134217727 >>> 9)); \n} \n\n\nif (268435455 >>> 9 !== 524287) { \n $ERROR('#326: 268435455 >>> 9 === 524287. Actual: ' + (268435455 >>> 9)); \n} \n\n\nif (536870911 >>> 9 !== 1048575) { \n $ERROR('#327: 536870911 >>> 9 === 1048575. Actual: ' + (536870911 >>> 9)); \n} \n\n\nif (1073741823 >>> 9 !== 2097151) { \n $ERROR('#328: 1073741823 >>> 9 === 2097151. Actual: ' + (1073741823 >>> 9)); \n} \n\n\nif (2147483647 >>> 9 !== 4194303) { \n $ERROR('#329: 2147483647 >>> 9 === 4194303. Actual: ' + (2147483647 >>> 9)); \n} \n\n\nif (4294967295 >>> 9 !== 8388607) { \n $ERROR('#330: 4294967295 >>> 9 === 8388607. Actual: ' + (4294967295 >>> 9)); \n} \n\n\nif (0 >>> 10 !== 0) { \n $ERROR('#331: 0 >>> 10 === 0. Actual: ' + (0 >>> 10)); \n} \n\n\nif (1 >>> 10 !== 0) { \n $ERROR('#332: 1 >>> 10 === 0. Actual: ' + (1 >>> 10)); \n} \n\n\nif (3 >>> 10 !== 0) { \n $ERROR('#333: 3 >>> 10 === 0. Actual: ' + (3 >>> 10)); \n} \n\n\nif (7 >>> 10 !== 0) { \n $ERROR('#334: 7 >>> 10 === 0. Actual: ' + (7 >>> 10)); \n} \n\n\nif (15 >>> 10 !== 0) { \n $ERROR('#335: 15 >>> 10 === 0. Actual: ' + (15 >>> 10)); \n} \n\n\nif (31 >>> 10 !== 0) { \n $ERROR('#336: 31 >>> 10 === 0. Actual: ' + (31 >>> 10)); \n} \n\n\nif (63 >>> 10 !== 0) { \n $ERROR('#337: 63 >>> 10 === 0. Actual: ' + (63 >>> 10)); \n} \n\n\nif (127 >>> 10 !== 0) { \n $ERROR('#338: 127 >>> 10 === 0. Actual: ' + (127 >>> 10)); \n} \n\n\nif (255 >>> 10 !== 0) { \n $ERROR('#339: 255 >>> 10 === 0. Actual: ' + (255 >>> 10)); \n} \n\n\nif (511 >>> 10 !== 0) { \n $ERROR('#340: 511 >>> 10 === 0. Actual: ' + (511 >>> 10)); \n} \n\n\nif (1023 >>> 10 !== 0) { \n $ERROR('#341: 1023 >>> 10 === 0. Actual: ' + (1023 >>> 10)); \n} \n\n\nif (2047 >>> 10 !== 1) { \n $ERROR('#342: 2047 >>> 10 === 1. Actual: ' + (2047 >>> 10)); \n} \n\n\nif (4095 >>> 10 !== 3) { \n $ERROR('#343: 4095 >>> 10 === 3. Actual: ' + (4095 >>> 10)); \n} \n\n\nif (8191 >>> 10 !== 7) { \n $ERROR('#344: 8191 >>> 10 === 7. Actual: ' + (8191 >>> 10)); \n} \n\n\nif (16383 >>> 10 !== 15) { \n $ERROR('#345: 16383 >>> 10 === 15. Actual: ' + (16383 >>> 10)); \n} \n\n\nif (32767 >>> 10 !== 31) { \n $ERROR('#346: 32767 >>> 10 === 31. Actual: ' + (32767 >>> 10)); \n} \n\n\nif (65535 >>> 10 !== 63) { \n $ERROR('#347: 65535 >>> 10 === 63. Actual: ' + (65535 >>> 10)); \n} \n\n\nif (131071 >>> 10 !== 127) { \n $ERROR('#348: 131071 >>> 10 === 127. Actual: ' + (131071 >>> 10)); \n} \n\n\nif (262143 >>> 10 !== 255) { \n $ERROR('#349: 262143 >>> 10 === 255. Actual: ' + (262143 >>> 10)); \n} \n\n\nif (524287 >>> 10 !== 511) { \n $ERROR('#350: 524287 >>> 10 === 511. Actual: ' + (524287 >>> 10)); \n} \n\n\nif (1048575 >>> 10 !== 1023) { \n $ERROR('#351: 1048575 >>> 10 === 1023. Actual: ' + (1048575 >>> 10)); \n} \n\n\nif (2097151 >>> 10 !== 2047) { \n $ERROR('#352: 2097151 >>> 10 === 2047. Actual: ' + (2097151 >>> 10)); \n} \n\n\nif (4194303 >>> 10 !== 4095) { \n $ERROR('#353: 4194303 >>> 10 === 4095. Actual: ' + (4194303 >>> 10)); \n} \n\n\nif (8388607 >>> 10 !== 8191) { \n $ERROR('#354: 8388607 >>> 10 === 8191. Actual: ' + (8388607 >>> 10)); \n} \n\n\nif (16777215 >>> 10 !== 16383) { \n $ERROR('#355: 16777215 >>> 10 === 16383. Actual: ' + (16777215 >>> 10)); \n} \n\n\nif (33554431 >>> 10 !== 32767) { \n $ERROR('#356: 33554431 >>> 10 === 32767. Actual: ' + (33554431 >>> 10)); \n} \n\n\nif (67108863 >>> 10 !== 65535) { \n $ERROR('#357: 67108863 >>> 10 === 65535. Actual: ' + (67108863 >>> 10)); \n} \n\n\nif (134217727 >>> 10 !== 131071) { \n $ERROR('#358: 134217727 >>> 10 === 131071. Actual: ' + (134217727 >>> 10)); \n} \n\n\nif (268435455 >>> 10 !== 262143) { \n $ERROR('#359: 268435455 >>> 10 === 262143. Actual: ' + (268435455 >>> 10)); \n} \n\n\nif (536870911 >>> 10 !== 524287) { \n $ERROR('#360: 536870911 >>> 10 === 524287. Actual: ' + (536870911 >>> 10)); \n} \n\n\nif (1073741823 >>> 10 !== 1048575) { \n $ERROR('#361: 1073741823 >>> 10 === 1048575. Actual: ' + (1073741823 >>> 10)); \n} \n\n\nif (2147483647 >>> 10 !== 2097151) { \n $ERROR('#362: 2147483647 >>> 10 === 2097151. Actual: ' + (2147483647 >>> 10)); \n} \n\n\nif (4294967295 >>> 10 !== 4194303) { \n $ERROR('#363: 4294967295 >>> 10 === 4194303. Actual: ' + (4294967295 >>> 10)); \n} \n\n\nif (0 >>> 11 !== 0) { \n $ERROR('#364: 0 >>> 11 === 0. Actual: ' + (0 >>> 11)); \n} \n\n\nif (1 >>> 11 !== 0) { \n $ERROR('#365: 1 >>> 11 === 0. Actual: ' + (1 >>> 11)); \n} \n\n\nif (3 >>> 11 !== 0) { \n $ERROR('#366: 3 >>> 11 === 0. Actual: ' + (3 >>> 11)); \n} \n\n\nif (7 >>> 11 !== 0) { \n $ERROR('#367: 7 >>> 11 === 0. Actual: ' + (7 >>> 11)); \n} \n\n\nif (15 >>> 11 !== 0) { \n $ERROR('#368: 15 >>> 11 === 0. Actual: ' + (15 >>> 11)); \n} \n\n\nif (31 >>> 11 !== 0) { \n $ERROR('#369: 31 >>> 11 === 0. Actual: ' + (31 >>> 11)); \n} \n\n\nif (63 >>> 11 !== 0) { \n $ERROR('#370: 63 >>> 11 === 0. Actual: ' + (63 >>> 11)); \n} \n\n\nif (127 >>> 11 !== 0) { \n $ERROR('#371: 127 >>> 11 === 0. Actual: ' + (127 >>> 11)); \n} \n\n\nif (255 >>> 11 !== 0) { \n $ERROR('#372: 255 >>> 11 === 0. Actual: ' + (255 >>> 11)); \n} \n\n\nif (511 >>> 11 !== 0) { \n $ERROR('#373: 511 >>> 11 === 0. Actual: ' + (511 >>> 11)); \n} \n\n\nif (1023 >>> 11 !== 0) { \n $ERROR('#374: 1023 >>> 11 === 0. Actual: ' + (1023 >>> 11)); \n} \n\n\nif (2047 >>> 11 !== 0) { \n $ERROR('#375: 2047 >>> 11 === 0. Actual: ' + (2047 >>> 11)); \n} \n\n\nif (4095 >>> 11 !== 1) { \n $ERROR('#376: 4095 >>> 11 === 1. Actual: ' + (4095 >>> 11)); \n} \n\n\nif (8191 >>> 11 !== 3) { \n $ERROR('#377: 8191 >>> 11 === 3. Actual: ' + (8191 >>> 11)); \n} \n\n\nif (16383 >>> 11 !== 7) { \n $ERROR('#378: 16383 >>> 11 === 7. Actual: ' + (16383 >>> 11)); \n} \n\n\nif (32767 >>> 11 !== 15) { \n $ERROR('#379: 32767 >>> 11 === 15. Actual: ' + (32767 >>> 11)); \n} \n\n\nif (65535 >>> 11 !== 31) { \n $ERROR('#380: 65535 >>> 11 === 31. Actual: ' + (65535 >>> 11)); \n} \n\n\nif (131071 >>> 11 !== 63) { \n $ERROR('#381: 131071 >>> 11 === 63. Actual: ' + (131071 >>> 11)); \n} \n\n\nif (262143 >>> 11 !== 127) { \n $ERROR('#382: 262143 >>> 11 === 127. Actual: ' + (262143 >>> 11)); \n} \n\n\nif (524287 >>> 11 !== 255) { \n $ERROR('#383: 524287 >>> 11 === 255. Actual: ' + (524287 >>> 11)); \n} \n\n\nif (1048575 >>> 11 !== 511) { \n $ERROR('#384: 1048575 >>> 11 === 511. Actual: ' + (1048575 >>> 11)); \n} \n\n\nif (2097151 >>> 11 !== 1023) { \n $ERROR('#385: 2097151 >>> 11 === 1023. Actual: ' + (2097151 >>> 11)); \n} \n\n\nif (4194303 >>> 11 !== 2047) { \n $ERROR('#386: 4194303 >>> 11 === 2047. Actual: ' + (4194303 >>> 11)); \n} \n\n\nif (8388607 >>> 11 !== 4095) { \n $ERROR('#387: 8388607 >>> 11 === 4095. Actual: ' + (8388607 >>> 11)); \n} \n\n\nif (16777215 >>> 11 !== 8191) { \n $ERROR('#388: 16777215 >>> 11 === 8191. Actual: ' + (16777215 >>> 11)); \n} \n\n\nif (33554431 >>> 11 !== 16383) { \n $ERROR('#389: 33554431 >>> 11 === 16383. Actual: ' + (33554431 >>> 11)); \n} \n\n\nif (67108863 >>> 11 !== 32767) { \n $ERROR('#390: 67108863 >>> 11 === 32767. Actual: ' + (67108863 >>> 11)); \n} \n\n\nif (134217727 >>> 11 !== 65535) { \n $ERROR('#391: 134217727 >>> 11 === 65535. Actual: ' + (134217727 >>> 11)); \n} \n\n\nif (268435455 >>> 11 !== 131071) { \n $ERROR('#392: 268435455 >>> 11 === 131071. Actual: ' + (268435455 >>> 11)); \n} \n\n\nif (536870911 >>> 11 !== 262143) { \n $ERROR('#393: 536870911 >>> 11 === 262143. Actual: ' + (536870911 >>> 11)); \n} \n\n\nif (1073741823 >>> 11 !== 524287) { \n $ERROR('#394: 1073741823 >>> 11 === 524287. Actual: ' + (1073741823 >>> 11)); \n} \n\n\nif (2147483647 >>> 11 !== 1048575) { \n $ERROR('#395: 2147483647 >>> 11 === 1048575. Actual: ' + (2147483647 >>> 11)); \n} \n\n\nif (4294967295 >>> 11 !== 2097151) { \n $ERROR('#396: 4294967295 >>> 11 === 2097151. Actual: ' + (4294967295 >>> 11)); \n} \n\n\nif (0 >>> 12 !== 0) { \n $ERROR('#397: 0 >>> 12 === 0. Actual: ' + (0 >>> 12)); \n} \n\n\nif (1 >>> 12 !== 0) { \n $ERROR('#398: 1 >>> 12 === 0. Actual: ' + (1 >>> 12)); \n} \n\n\nif (3 >>> 12 !== 0) { \n $ERROR('#399: 3 >>> 12 === 0. Actual: ' + (3 >>> 12)); \n} \n\n\nif (7 >>> 12 !== 0) { \n $ERROR('#400: 7 >>> 12 === 0. Actual: ' + (7 >>> 12)); \n} \n\n\nif (15 >>> 12 !== 0) { \n $ERROR('#401: 15 >>> 12 === 0. Actual: ' + (15 >>> 12)); \n} \n\n\nif (31 >>> 12 !== 0) { \n $ERROR('#402: 31 >>> 12 === 0. Actual: ' + (31 >>> 12)); \n} \n\n\nif (63 >>> 12 !== 0) { \n $ERROR('#403: 63 >>> 12 === 0. Actual: ' + (63 >>> 12)); \n} \n\n\nif (127 >>> 12 !== 0) { \n $ERROR('#404: 127 >>> 12 === 0. Actual: ' + (127 >>> 12)); \n} \n\n\nif (255 >>> 12 !== 0) { \n $ERROR('#405: 255 >>> 12 === 0. Actual: ' + (255 >>> 12)); \n} \n\n\nif (511 >>> 12 !== 0) { \n $ERROR('#406: 511 >>> 12 === 0. Actual: ' + (511 >>> 12)); \n} \n\n\nif (1023 >>> 12 !== 0) { \n $ERROR('#407: 1023 >>> 12 === 0. Actual: ' + (1023 >>> 12)); \n} \n\n\nif (2047 >>> 12 !== 0) { \n $ERROR('#408: 2047 >>> 12 === 0. Actual: ' + (2047 >>> 12)); \n} \n\n\nif (4095 >>> 12 !== 0) { \n $ERROR('#409: 4095 >>> 12 === 0. Actual: ' + (4095 >>> 12)); \n} \n\n\nif (8191 >>> 12 !== 1) { \n $ERROR('#410: 8191 >>> 12 === 1. Actual: ' + (8191 >>> 12)); \n} \n\n\nif (16383 >>> 12 !== 3) { \n $ERROR('#411: 16383 >>> 12 === 3. Actual: ' + (16383 >>> 12)); \n} \n\n\nif (32767 >>> 12 !== 7) { \n $ERROR('#412: 32767 >>> 12 === 7. Actual: ' + (32767 >>> 12)); \n} \n\n\nif (65535 >>> 12 !== 15) { \n $ERROR('#413: 65535 >>> 12 === 15. Actual: ' + (65535 >>> 12)); \n} \n\n\nif (131071 >>> 12 !== 31) { \n $ERROR('#414: 131071 >>> 12 === 31. Actual: ' + (131071 >>> 12)); \n} \n\n\nif (262143 >>> 12 !== 63) { \n $ERROR('#415: 262143 >>> 12 === 63. Actual: ' + (262143 >>> 12)); \n} \n\n\nif (524287 >>> 12 !== 127) { \n $ERROR('#416: 524287 >>> 12 === 127. Actual: ' + (524287 >>> 12)); \n} \n\n\nif (1048575 >>> 12 !== 255) { \n $ERROR('#417: 1048575 >>> 12 === 255. Actual: ' + (1048575 >>> 12)); \n} \n\n\nif (2097151 >>> 12 !== 511) { \n $ERROR('#418: 2097151 >>> 12 === 511. Actual: ' + (2097151 >>> 12)); \n} \n\n\nif (4194303 >>> 12 !== 1023) { \n $ERROR('#419: 4194303 >>> 12 === 1023. Actual: ' + (4194303 >>> 12)); \n} \n\n\nif (8388607 >>> 12 !== 2047) { \n $ERROR('#420: 8388607 >>> 12 === 2047. Actual: ' + (8388607 >>> 12)); \n} \n\n\nif (16777215 >>> 12 !== 4095) { \n $ERROR('#421: 16777215 >>> 12 === 4095. Actual: ' + (16777215 >>> 12)); \n} \n\n\nif (33554431 >>> 12 !== 8191) { \n $ERROR('#422: 33554431 >>> 12 === 8191. Actual: ' + (33554431 >>> 12)); \n} \n\n\nif (67108863 >>> 12 !== 16383) { \n $ERROR('#423: 67108863 >>> 12 === 16383. Actual: ' + (67108863 >>> 12)); \n} \n\n\nif (134217727 >>> 12 !== 32767) { \n $ERROR('#424: 134217727 >>> 12 === 32767. Actual: ' + (134217727 >>> 12)); \n} \n\n\nif (268435455 >>> 12 !== 65535) { \n $ERROR('#425: 268435455 >>> 12 === 65535. Actual: ' + (268435455 >>> 12)); \n} \n\n\nif (536870911 >>> 12 !== 131071) { \n $ERROR('#426: 536870911 >>> 12 === 131071. Actual: ' + (536870911 >>> 12)); \n} \n\n\nif (1073741823 >>> 12 !== 262143) { \n $ERROR('#427: 1073741823 >>> 12 === 262143. Actual: ' + (1073741823 >>> 12)); \n} \n\n\nif (2147483647 >>> 12 !== 524287) { \n $ERROR('#428: 2147483647 >>> 12 === 524287. Actual: ' + (2147483647 >>> 12)); \n} \n\n\nif (4294967295 >>> 12 !== 1048575) { \n $ERROR('#429: 4294967295 >>> 12 === 1048575. Actual: ' + (4294967295 >>> 12)); \n} \n\n\nif (0 >>> 13 !== 0) { \n $ERROR('#430: 0 >>> 13 === 0. Actual: ' + (0 >>> 13)); \n} \n\n\nif (1 >>> 13 !== 0) { \n $ERROR('#431: 1 >>> 13 === 0. Actual: ' + (1 >>> 13)); \n} \n\n\nif (3 >>> 13 !== 0) { \n $ERROR('#432: 3 >>> 13 === 0. Actual: ' + (3 >>> 13)); \n} \n\n\nif (7 >>> 13 !== 0) { \n $ERROR('#433: 7 >>> 13 === 0. Actual: ' + (7 >>> 13)); \n} \n\n\nif (15 >>> 13 !== 0) { \n $ERROR('#434: 15 >>> 13 === 0. Actual: ' + (15 >>> 13)); \n} \n\n\nif (31 >>> 13 !== 0) { \n $ERROR('#435: 31 >>> 13 === 0. Actual: ' + (31 >>> 13)); \n} \n\n\nif (63 >>> 13 !== 0) { \n $ERROR('#436: 63 >>> 13 === 0. Actual: ' + (63 >>> 13)); \n} \n\n\nif (127 >>> 13 !== 0) { \n $ERROR('#437: 127 >>> 13 === 0. Actual: ' + (127 >>> 13)); \n} \n\n\nif (255 >>> 13 !== 0) { \n $ERROR('#438: 255 >>> 13 === 0. Actual: ' + (255 >>> 13)); \n} \n\n\nif (511 >>> 13 !== 0) { \n $ERROR('#439: 511 >>> 13 === 0. Actual: ' + (511 >>> 13)); \n} \n\n\nif (1023 >>> 13 !== 0) { \n $ERROR('#440: 1023 >>> 13 === 0. Actual: ' + (1023 >>> 13)); \n} \n\n\nif (2047 >>> 13 !== 0) { \n $ERROR('#441: 2047 >>> 13 === 0. Actual: ' + (2047 >>> 13)); \n} \n\n\nif (4095 >>> 13 !== 0) { \n $ERROR('#442: 4095 >>> 13 === 0. Actual: ' + (4095 >>> 13)); \n} \n\n\nif (8191 >>> 13 !== 0) { \n $ERROR('#443: 8191 >>> 13 === 0. Actual: ' + (8191 >>> 13)); \n} \n\n\nif (16383 >>> 13 !== 1) { \n $ERROR('#444: 16383 >>> 13 === 1. Actual: ' + (16383 >>> 13)); \n} \n\n\nif (32767 >>> 13 !== 3) { \n $ERROR('#445: 32767 >>> 13 === 3. Actual: ' + (32767 >>> 13)); \n} \n\n\nif (65535 >>> 13 !== 7) { \n $ERROR('#446: 65535 >>> 13 === 7. Actual: ' + (65535 >>> 13)); \n} \n\n\nif (131071 >>> 13 !== 15) { \n $ERROR('#447: 131071 >>> 13 === 15. Actual: ' + (131071 >>> 13)); \n} \n\n\nif (262143 >>> 13 !== 31) { \n $ERROR('#448: 262143 >>> 13 === 31. Actual: ' + (262143 >>> 13)); \n} \n\n\nif (524287 >>> 13 !== 63) { \n $ERROR('#449: 524287 >>> 13 === 63. Actual: ' + (524287 >>> 13)); \n} \n\n\nif (1048575 >>> 13 !== 127) { \n $ERROR('#450: 1048575 >>> 13 === 127. Actual: ' + (1048575 >>> 13)); \n} \n\n\nif (2097151 >>> 13 !== 255) { \n $ERROR('#451: 2097151 >>> 13 === 255. Actual: ' + (2097151 >>> 13)); \n} \n\n\nif (4194303 >>> 13 !== 511) { \n $ERROR('#452: 4194303 >>> 13 === 511. Actual: ' + (4194303 >>> 13)); \n} \n\n\nif (8388607 >>> 13 !== 1023) { \n $ERROR('#453: 8388607 >>> 13 === 1023. Actual: ' + (8388607 >>> 13)); \n} \n\n\nif (16777215 >>> 13 !== 2047) { \n $ERROR('#454: 16777215 >>> 13 === 2047. Actual: ' + (16777215 >>> 13)); \n} \n\n\nif (33554431 >>> 13 !== 4095) { \n $ERROR('#455: 33554431 >>> 13 === 4095. Actual: ' + (33554431 >>> 13)); \n} \n\n\nif (67108863 >>> 13 !== 8191) { \n $ERROR('#456: 67108863 >>> 13 === 8191. Actual: ' + (67108863 >>> 13)); \n} \n\n\nif (134217727 >>> 13 !== 16383) { \n $ERROR('#457: 134217727 >>> 13 === 16383. Actual: ' + (134217727 >>> 13)); \n} \n\n\nif (268435455 >>> 13 !== 32767) { \n $ERROR('#458: 268435455 >>> 13 === 32767. Actual: ' + (268435455 >>> 13)); \n} \n\n\nif (536870911 >>> 13 !== 65535) { \n $ERROR('#459: 536870911 >>> 13 === 65535. Actual: ' + (536870911 >>> 13)); \n} \n\n\nif (1073741823 >>> 13 !== 131071) { \n $ERROR('#460: 1073741823 >>> 13 === 131071. Actual: ' + (1073741823 >>> 13)); \n} \n\n\nif (2147483647 >>> 13 !== 262143) { \n $ERROR('#461: 2147483647 >>> 13 === 262143. Actual: ' + (2147483647 >>> 13)); \n} \n\n\nif (4294967295 >>> 13 !== 524287) { \n $ERROR('#462: 4294967295 >>> 13 === 524287. Actual: ' + (4294967295 >>> 13)); \n} \n\n\nif (0 >>> 14 !== 0) { \n $ERROR('#463: 0 >>> 14 === 0. Actual: ' + (0 >>> 14)); \n} \n\n\nif (1 >>> 14 !== 0) { \n $ERROR('#464: 1 >>> 14 === 0. Actual: ' + (1 >>> 14)); \n} \n\n\nif (3 >>> 14 !== 0) { \n $ERROR('#465: 3 >>> 14 === 0. Actual: ' + (3 >>> 14)); \n} \n\n\nif (7 >>> 14 !== 0) { \n $ERROR('#466: 7 >>> 14 === 0. Actual: ' + (7 >>> 14)); \n} \n\n\nif (15 >>> 14 !== 0) { \n $ERROR('#467: 15 >>> 14 === 0. Actual: ' + (15 >>> 14)); \n} \n\n\nif (31 >>> 14 !== 0) { \n $ERROR('#468: 31 >>> 14 === 0. Actual: ' + (31 >>> 14)); \n} \n\n\nif (63 >>> 14 !== 0) { \n $ERROR('#469: 63 >>> 14 === 0. Actual: ' + (63 >>> 14)); \n} \n\n\nif (127 >>> 14 !== 0) { \n $ERROR('#470: 127 >>> 14 === 0. Actual: ' + (127 >>> 14)); \n} \n\n\nif (255 >>> 14 !== 0) { \n $ERROR('#471: 255 >>> 14 === 0. Actual: ' + (255 >>> 14)); \n} \n\n\nif (511 >>> 14 !== 0) { \n $ERROR('#472: 511 >>> 14 === 0. Actual: ' + (511 >>> 14)); \n} \n\n\nif (1023 >>> 14 !== 0) { \n $ERROR('#473: 1023 >>> 14 === 0. Actual: ' + (1023 >>> 14)); \n} \n\n\nif (2047 >>> 14 !== 0) { \n $ERROR('#474: 2047 >>> 14 === 0. Actual: ' + (2047 >>> 14)); \n} \n\n\nif (4095 >>> 14 !== 0) { \n $ERROR('#475: 4095 >>> 14 === 0. Actual: ' + (4095 >>> 14)); \n} \n\n\nif (8191 >>> 14 !== 0) { \n $ERROR('#476: 8191 >>> 14 === 0. Actual: ' + (8191 >>> 14)); \n} \n\n\nif (16383 >>> 14 !== 0) { \n $ERROR('#477: 16383 >>> 14 === 0. Actual: ' + (16383 >>> 14)); \n} \n\n\nif (32767 >>> 14 !== 1) { \n $ERROR('#478: 32767 >>> 14 === 1. Actual: ' + (32767 >>> 14)); \n} \n\n\nif (65535 >>> 14 !== 3) { \n $ERROR('#479: 65535 >>> 14 === 3. Actual: ' + (65535 >>> 14)); \n} \n\n\nif (131071 >>> 14 !== 7) { \n $ERROR('#480: 131071 >>> 14 === 7. Actual: ' + (131071 >>> 14)); \n} \n\n\nif (262143 >>> 14 !== 15) { \n $ERROR('#481: 262143 >>> 14 === 15. Actual: ' + (262143 >>> 14)); \n} \n\n\nif (524287 >>> 14 !== 31) { \n $ERROR('#482: 524287 >>> 14 === 31. Actual: ' + (524287 >>> 14)); \n} \n\n\nif (1048575 >>> 14 !== 63) { \n $ERROR('#483: 1048575 >>> 14 === 63. Actual: ' + (1048575 >>> 14)); \n} \n\n\nif (2097151 >>> 14 !== 127) { \n $ERROR('#484: 2097151 >>> 14 === 127. Actual: ' + (2097151 >>> 14)); \n} \n\n\nif (4194303 >>> 14 !== 255) { \n $ERROR('#485: 4194303 >>> 14 === 255. Actual: ' + (4194303 >>> 14)); \n} \n\n\nif (8388607 >>> 14 !== 511) { \n $ERROR('#486: 8388607 >>> 14 === 511. Actual: ' + (8388607 >>> 14)); \n} \n\n\nif (16777215 >>> 14 !== 1023) { \n $ERROR('#487: 16777215 >>> 14 === 1023. Actual: ' + (16777215 >>> 14)); \n} \n\n\nif (33554431 >>> 14 !== 2047) { \n $ERROR('#488: 33554431 >>> 14 === 2047. Actual: ' + (33554431 >>> 14)); \n} \n\n\nif (67108863 >>> 14 !== 4095) { \n $ERROR('#489: 67108863 >>> 14 === 4095. Actual: ' + (67108863 >>> 14)); \n} \n\n\nif (134217727 >>> 14 !== 8191) { \n $ERROR('#490: 134217727 >>> 14 === 8191. Actual: ' + (134217727 >>> 14)); \n} \n\n\nif (268435455 >>> 14 !== 16383) { \n $ERROR('#491: 268435455 >>> 14 === 16383. Actual: ' + (268435455 >>> 14)); \n} \n\n\nif (536870911 >>> 14 !== 32767) { \n $ERROR('#492: 536870911 >>> 14 === 32767. Actual: ' + (536870911 >>> 14)); \n} \n\n\nif (1073741823 >>> 14 !== 65535) { \n $ERROR('#493: 1073741823 >>> 14 === 65535. Actual: ' + (1073741823 >>> 14)); \n} \n\n\nif (2147483647 >>> 14 !== 131071) { \n $ERROR('#494: 2147483647 >>> 14 === 131071. Actual: ' + (2147483647 >>> 14)); \n} \n\n\nif (4294967295 >>> 14 !== 262143) { \n $ERROR('#495: 4294967295 >>> 14 === 262143. Actual: ' + (4294967295 >>> 14)); \n} \n\n\nif (0 >>> 15 !== 0) { \n $ERROR('#496: 0 >>> 15 === 0. Actual: ' + (0 >>> 15)); \n} \n\n\nif (1 >>> 15 !== 0) { \n $ERROR('#497: 1 >>> 15 === 0. Actual: ' + (1 >>> 15)); \n} \n\n\nif (3 >>> 15 !== 0) { \n $ERROR('#498: 3 >>> 15 === 0. Actual: ' + (3 >>> 15)); \n} \n\n\nif (7 >>> 15 !== 0) { \n $ERROR('#499: 7 >>> 15 === 0. Actual: ' + (7 >>> 15)); \n} \n\n\nif (15 >>> 15 !== 0) { \n $ERROR('#500: 15 >>> 15 === 0. Actual: ' + (15 >>> 15)); \n} \n\n\nif (31 >>> 15 !== 0) { \n $ERROR('#501: 31 >>> 15 === 0. Actual: ' + (31 >>> 15)); \n} \n\n\nif (63 >>> 15 !== 0) { \n $ERROR('#502: 63 >>> 15 === 0. Actual: ' + (63 >>> 15)); \n} \n\n\nif (127 >>> 15 !== 0) { \n $ERROR('#503: 127 >>> 15 === 0. Actual: ' + (127 >>> 15)); \n} \n\n\nif (255 >>> 15 !== 0) { \n $ERROR('#504: 255 >>> 15 === 0. Actual: ' + (255 >>> 15)); \n} \n\n\nif (511 >>> 15 !== 0) { \n $ERROR('#505: 511 >>> 15 === 0. Actual: ' + (511 >>> 15)); \n} \n\n\nif (1023 >>> 15 !== 0) { \n $ERROR('#506: 1023 >>> 15 === 0. Actual: ' + (1023 >>> 15)); \n} \n\n\nif (2047 >>> 15 !== 0) { \n $ERROR('#507: 2047 >>> 15 === 0. Actual: ' + (2047 >>> 15)); \n} \n\n\nif (4095 >>> 15 !== 0) { \n $ERROR('#508: 4095 >>> 15 === 0. Actual: ' + (4095 >>> 15)); \n} \n\n\nif (8191 >>> 15 !== 0) { \n $ERROR('#509: 8191 >>> 15 === 0. Actual: ' + (8191 >>> 15)); \n} \n\n\nif (16383 >>> 15 !== 0) { \n $ERROR('#510: 16383 >>> 15 === 0. Actual: ' + (16383 >>> 15)); \n} \n\n\nif (32767 >>> 15 !== 0) { \n $ERROR('#511: 32767 >>> 15 === 0. Actual: ' + (32767 >>> 15)); \n} \n\n\nif (65535 >>> 15 !== 1) { \n $ERROR('#512: 65535 >>> 15 === 1. Actual: ' + (65535 >>> 15)); \n} \n\n\nif (131071 >>> 15 !== 3) { \n $ERROR('#513: 131071 >>> 15 === 3. Actual: ' + (131071 >>> 15)); \n} \n\n\nif (262143 >>> 15 !== 7) { \n $ERROR('#514: 262143 >>> 15 === 7. Actual: ' + (262143 >>> 15)); \n} \n\n\nif (524287 >>> 15 !== 15) { \n $ERROR('#515: 524287 >>> 15 === 15. Actual: ' + (524287 >>> 15)); \n} \n\n\nif (1048575 >>> 15 !== 31) { \n $ERROR('#516: 1048575 >>> 15 === 31. Actual: ' + (1048575 >>> 15)); \n} \n\n\nif (2097151 >>> 15 !== 63) { \n $ERROR('#517: 2097151 >>> 15 === 63. Actual: ' + (2097151 >>> 15)); \n} \n\n\nif (4194303 >>> 15 !== 127) { \n $ERROR('#518: 4194303 >>> 15 === 127. Actual: ' + (4194303 >>> 15)); \n} \n\n\nif (8388607 >>> 15 !== 255) { \n $ERROR('#519: 8388607 >>> 15 === 255. Actual: ' + (8388607 >>> 15)); \n} \n\n\nif (16777215 >>> 15 !== 511) { \n $ERROR('#520: 16777215 >>> 15 === 511. Actual: ' + (16777215 >>> 15)); \n} \n\n\nif (33554431 >>> 15 !== 1023) { \n $ERROR('#521: 33554431 >>> 15 === 1023. Actual: ' + (33554431 >>> 15)); \n} \n\n\nif (67108863 >>> 15 !== 2047) { \n $ERROR('#522: 67108863 >>> 15 === 2047. Actual: ' + (67108863 >>> 15)); \n} \n\n\nif (134217727 >>> 15 !== 4095) { \n $ERROR('#523: 134217727 >>> 15 === 4095. Actual: ' + (134217727 >>> 15)); \n} \n\n\nif (268435455 >>> 15 !== 8191) { \n $ERROR('#524: 268435455 >>> 15 === 8191. Actual: ' + (268435455 >>> 15)); \n} \n\n\nif (536870911 >>> 15 !== 16383) { \n $ERROR('#525: 536870911 >>> 15 === 16383. Actual: ' + (536870911 >>> 15)); \n} \n\n\nif (1073741823 >>> 15 !== 32767) { \n $ERROR('#526: 1073741823 >>> 15 === 32767. Actual: ' + (1073741823 >>> 15)); \n} \n\n\nif (2147483647 >>> 15 !== 65535) { \n $ERROR('#527: 2147483647 >>> 15 === 65535. Actual: ' + (2147483647 >>> 15)); \n} \n\n\nif (4294967295 >>> 15 !== 131071) { \n $ERROR('#528: 4294967295 >>> 15 === 131071. Actual: ' + (4294967295 >>> 15)); \n} \n",
+ "id": "S11.7.3_A4_T3"
+ },
+ {
+ "section": "11.7.3",
+ "description": "ShiftExpression = 2^n - 1, n = 16...31",
+ "test": "//CHECK\n \nif (0 >>> 16 !== 0) { \n $ERROR('#529: 0 >>> 16 === 0. Actual: ' + (0 >>> 16)); \n} \n\n\nif (1 >>> 16 !== 0) { \n $ERROR('#530: 1 >>> 16 === 0. Actual: ' + (1 >>> 16)); \n} \n\n\nif (3 >>> 16 !== 0) { \n $ERROR('#531: 3 >>> 16 === 0. Actual: ' + (3 >>> 16)); \n} \n\n\nif (7 >>> 16 !== 0) { \n $ERROR('#532: 7 >>> 16 === 0. Actual: ' + (7 >>> 16)); \n} \n\n\nif (15 >>> 16 !== 0) { \n $ERROR('#533: 15 >>> 16 === 0. Actual: ' + (15 >>> 16)); \n} \n\n\nif (31 >>> 16 !== 0) { \n $ERROR('#534: 31 >>> 16 === 0. Actual: ' + (31 >>> 16)); \n} \n\n\nif (63 >>> 16 !== 0) { \n $ERROR('#535: 63 >>> 16 === 0. Actual: ' + (63 >>> 16)); \n} \n\n\nif (127 >>> 16 !== 0) { \n $ERROR('#536: 127 >>> 16 === 0. Actual: ' + (127 >>> 16)); \n} \n\n\nif (255 >>> 16 !== 0) { \n $ERROR('#537: 255 >>> 16 === 0. Actual: ' + (255 >>> 16)); \n} \n\n\nif (511 >>> 16 !== 0) { \n $ERROR('#538: 511 >>> 16 === 0. Actual: ' + (511 >>> 16)); \n} \n\n\nif (1023 >>> 16 !== 0) { \n $ERROR('#539: 1023 >>> 16 === 0. Actual: ' + (1023 >>> 16)); \n} \n\n\nif (2047 >>> 16 !== 0) { \n $ERROR('#540: 2047 >>> 16 === 0. Actual: ' + (2047 >>> 16)); \n} \n\n\nif (4095 >>> 16 !== 0) { \n $ERROR('#541: 4095 >>> 16 === 0. Actual: ' + (4095 >>> 16)); \n} \n\n\nif (8191 >>> 16 !== 0) { \n $ERROR('#542: 8191 >>> 16 === 0. Actual: ' + (8191 >>> 16)); \n} \n\n\nif (16383 >>> 16 !== 0) { \n $ERROR('#543: 16383 >>> 16 === 0. Actual: ' + (16383 >>> 16)); \n} \n\n\nif (32767 >>> 16 !== 0) { \n $ERROR('#544: 32767 >>> 16 === 0. Actual: ' + (32767 >>> 16)); \n} \n\n\nif (65535 >>> 16 !== 0) { \n $ERROR('#545: 65535 >>> 16 === 0. Actual: ' + (65535 >>> 16)); \n} \n\n\nif (131071 >>> 16 !== 1) { \n $ERROR('#546: 131071 >>> 16 === 1. Actual: ' + (131071 >>> 16)); \n} \n\n\nif (262143 >>> 16 !== 3) { \n $ERROR('#547: 262143 >>> 16 === 3. Actual: ' + (262143 >>> 16)); \n} \n\n\nif (524287 >>> 16 !== 7) { \n $ERROR('#548: 524287 >>> 16 === 7. Actual: ' + (524287 >>> 16)); \n} \n\n\nif (1048575 >>> 16 !== 15) { \n $ERROR('#549: 1048575 >>> 16 === 15. Actual: ' + (1048575 >>> 16)); \n} \n\n\nif (2097151 >>> 16 !== 31) { \n $ERROR('#550: 2097151 >>> 16 === 31. Actual: ' + (2097151 >>> 16)); \n} \n\n\nif (4194303 >>> 16 !== 63) { \n $ERROR('#551: 4194303 >>> 16 === 63. Actual: ' + (4194303 >>> 16)); \n} \n\n\nif (8388607 >>> 16 !== 127) { \n $ERROR('#552: 8388607 >>> 16 === 127. Actual: ' + (8388607 >>> 16)); \n} \n\n\nif (16777215 >>> 16 !== 255) { \n $ERROR('#553: 16777215 >>> 16 === 255. Actual: ' + (16777215 >>> 16)); \n} \n\n\nif (33554431 >>> 16 !== 511) { \n $ERROR('#554: 33554431 >>> 16 === 511. Actual: ' + (33554431 >>> 16)); \n} \n\n\nif (67108863 >>> 16 !== 1023) { \n $ERROR('#555: 67108863 >>> 16 === 1023. Actual: ' + (67108863 >>> 16)); \n} \n\n\nif (134217727 >>> 16 !== 2047) { \n $ERROR('#556: 134217727 >>> 16 === 2047. Actual: ' + (134217727 >>> 16)); \n} \n\n\nif (268435455 >>> 16 !== 4095) { \n $ERROR('#557: 268435455 >>> 16 === 4095. Actual: ' + (268435455 >>> 16)); \n} \n\n\nif (536870911 >>> 16 !== 8191) { \n $ERROR('#558: 536870911 >>> 16 === 8191. Actual: ' + (536870911 >>> 16)); \n} \n\n\nif (1073741823 >>> 16 !== 16383) { \n $ERROR('#559: 1073741823 >>> 16 === 16383. Actual: ' + (1073741823 >>> 16)); \n} \n\n\nif (2147483647 >>> 16 !== 32767) { \n $ERROR('#560: 2147483647 >>> 16 === 32767. Actual: ' + (2147483647 >>> 16)); \n} \n\n\nif (4294967295 >>> 16 !== 65535) { \n $ERROR('#561: 4294967295 >>> 16 === 65535. Actual: ' + (4294967295 >>> 16)); \n} \n\n\nif (0 >>> 17 !== 0) { \n $ERROR('#562: 0 >>> 17 === 0. Actual: ' + (0 >>> 17)); \n} \n\n\nif (1 >>> 17 !== 0) { \n $ERROR('#563: 1 >>> 17 === 0. Actual: ' + (1 >>> 17)); \n} \n\n\nif (3 >>> 17 !== 0) { \n $ERROR('#564: 3 >>> 17 === 0. Actual: ' + (3 >>> 17)); \n} \n\n\nif (7 >>> 17 !== 0) { \n $ERROR('#565: 7 >>> 17 === 0. Actual: ' + (7 >>> 17)); \n} \n\n\nif (15 >>> 17 !== 0) { \n $ERROR('#566: 15 >>> 17 === 0. Actual: ' + (15 >>> 17)); \n} \n\n\nif (31 >>> 17 !== 0) { \n $ERROR('#567: 31 >>> 17 === 0. Actual: ' + (31 >>> 17)); \n} \n\n\nif (63 >>> 17 !== 0) { \n $ERROR('#568: 63 >>> 17 === 0. Actual: ' + (63 >>> 17)); \n} \n\n\nif (127 >>> 17 !== 0) { \n $ERROR('#569: 127 >>> 17 === 0. Actual: ' + (127 >>> 17)); \n} \n\n\nif (255 >>> 17 !== 0) { \n $ERROR('#570: 255 >>> 17 === 0. Actual: ' + (255 >>> 17)); \n} \n\n\nif (511 >>> 17 !== 0) { \n $ERROR('#571: 511 >>> 17 === 0. Actual: ' + (511 >>> 17)); \n} \n\n\nif (1023 >>> 17 !== 0) { \n $ERROR('#572: 1023 >>> 17 === 0. Actual: ' + (1023 >>> 17)); \n} \n\n\nif (2047 >>> 17 !== 0) { \n $ERROR('#573: 2047 >>> 17 === 0. Actual: ' + (2047 >>> 17)); \n} \n\n\nif (4095 >>> 17 !== 0) { \n $ERROR('#574: 4095 >>> 17 === 0. Actual: ' + (4095 >>> 17)); \n} \n\n\nif (8191 >>> 17 !== 0) { \n $ERROR('#575: 8191 >>> 17 === 0. Actual: ' + (8191 >>> 17)); \n} \n\n\nif (16383 >>> 17 !== 0) { \n $ERROR('#576: 16383 >>> 17 === 0. Actual: ' + (16383 >>> 17)); \n} \n\n\nif (32767 >>> 17 !== 0) { \n $ERROR('#577: 32767 >>> 17 === 0. Actual: ' + (32767 >>> 17)); \n} \n\n\nif (65535 >>> 17 !== 0) { \n $ERROR('#578: 65535 >>> 17 === 0. Actual: ' + (65535 >>> 17)); \n} \n\n\nif (131071 >>> 17 !== 0) { \n $ERROR('#579: 131071 >>> 17 === 0. Actual: ' + (131071 >>> 17)); \n} \n\n\nif (262143 >>> 17 !== 1) { \n $ERROR('#580: 262143 >>> 17 === 1. Actual: ' + (262143 >>> 17)); \n} \n\n\nif (524287 >>> 17 !== 3) { \n $ERROR('#581: 524287 >>> 17 === 3. Actual: ' + (524287 >>> 17)); \n} \n\n\nif (1048575 >>> 17 !== 7) { \n $ERROR('#582: 1048575 >>> 17 === 7. Actual: ' + (1048575 >>> 17)); \n} \n\n\nif (2097151 >>> 17 !== 15) { \n $ERROR('#583: 2097151 >>> 17 === 15. Actual: ' + (2097151 >>> 17)); \n} \n\n\nif (4194303 >>> 17 !== 31) { \n $ERROR('#584: 4194303 >>> 17 === 31. Actual: ' + (4194303 >>> 17)); \n} \n\n\nif (8388607 >>> 17 !== 63) { \n $ERROR('#585: 8388607 >>> 17 === 63. Actual: ' + (8388607 >>> 17)); \n} \n\n\nif (16777215 >>> 17 !== 127) { \n $ERROR('#586: 16777215 >>> 17 === 127. Actual: ' + (16777215 >>> 17)); \n} \n\n\nif (33554431 >>> 17 !== 255) { \n $ERROR('#587: 33554431 >>> 17 === 255. Actual: ' + (33554431 >>> 17)); \n} \n\n\nif (67108863 >>> 17 !== 511) { \n $ERROR('#588: 67108863 >>> 17 === 511. Actual: ' + (67108863 >>> 17)); \n} \n\n\nif (134217727 >>> 17 !== 1023) { \n $ERROR('#589: 134217727 >>> 17 === 1023. Actual: ' + (134217727 >>> 17)); \n} \n\n\nif (268435455 >>> 17 !== 2047) { \n $ERROR('#590: 268435455 >>> 17 === 2047. Actual: ' + (268435455 >>> 17)); \n} \n\n\nif (536870911 >>> 17 !== 4095) { \n $ERROR('#591: 536870911 >>> 17 === 4095. Actual: ' + (536870911 >>> 17)); \n} \n\n\nif (1073741823 >>> 17 !== 8191) { \n $ERROR('#592: 1073741823 >>> 17 === 8191. Actual: ' + (1073741823 >>> 17)); \n} \n\n\nif (2147483647 >>> 17 !== 16383) { \n $ERROR('#593: 2147483647 >>> 17 === 16383. Actual: ' + (2147483647 >>> 17)); \n} \n\n\nif (4294967295 >>> 17 !== 32767) { \n $ERROR('#594: 4294967295 >>> 17 === 32767. Actual: ' + (4294967295 >>> 17)); \n} \n\n\nif (0 >>> 18 !== 0) { \n $ERROR('#595: 0 >>> 18 === 0. Actual: ' + (0 >>> 18)); \n} \n\n\nif (1 >>> 18 !== 0) { \n $ERROR('#596: 1 >>> 18 === 0. Actual: ' + (1 >>> 18)); \n} \n\n\nif (3 >>> 18 !== 0) { \n $ERROR('#597: 3 >>> 18 === 0. Actual: ' + (3 >>> 18)); \n} \n\n\nif (7 >>> 18 !== 0) { \n $ERROR('#598: 7 >>> 18 === 0. Actual: ' + (7 >>> 18)); \n} \n\n\nif (15 >>> 18 !== 0) { \n $ERROR('#599: 15 >>> 18 === 0. Actual: ' + (15 >>> 18)); \n} \n\n\nif (31 >>> 18 !== 0) { \n $ERROR('#600: 31 >>> 18 === 0. Actual: ' + (31 >>> 18)); \n} \n\n\nif (63 >>> 18 !== 0) { \n $ERROR('#601: 63 >>> 18 === 0. Actual: ' + (63 >>> 18)); \n} \n\n\nif (127 >>> 18 !== 0) { \n $ERROR('#602: 127 >>> 18 === 0. Actual: ' + (127 >>> 18)); \n} \n\n\nif (255 >>> 18 !== 0) { \n $ERROR('#603: 255 >>> 18 === 0. Actual: ' + (255 >>> 18)); \n} \n\n\nif (511 >>> 18 !== 0) { \n $ERROR('#604: 511 >>> 18 === 0. Actual: ' + (511 >>> 18)); \n} \n\n\nif (1023 >>> 18 !== 0) { \n $ERROR('#605: 1023 >>> 18 === 0. Actual: ' + (1023 >>> 18)); \n} \n\n\nif (2047 >>> 18 !== 0) { \n $ERROR('#606: 2047 >>> 18 === 0. Actual: ' + (2047 >>> 18)); \n} \n\n\nif (4095 >>> 18 !== 0) { \n $ERROR('#607: 4095 >>> 18 === 0. Actual: ' + (4095 >>> 18)); \n} \n\n\nif (8191 >>> 18 !== 0) { \n $ERROR('#608: 8191 >>> 18 === 0. Actual: ' + (8191 >>> 18)); \n} \n\n\nif (16383 >>> 18 !== 0) { \n $ERROR('#609: 16383 >>> 18 === 0. Actual: ' + (16383 >>> 18)); \n} \n\n\nif (32767 >>> 18 !== 0) { \n $ERROR('#610: 32767 >>> 18 === 0. Actual: ' + (32767 >>> 18)); \n} \n\n\nif (65535 >>> 18 !== 0) { \n $ERROR('#611: 65535 >>> 18 === 0. Actual: ' + (65535 >>> 18)); \n} \n\n\nif (131071 >>> 18 !== 0) { \n $ERROR('#612: 131071 >>> 18 === 0. Actual: ' + (131071 >>> 18)); \n} \n\n\nif (262143 >>> 18 !== 0) { \n $ERROR('#613: 262143 >>> 18 === 0. Actual: ' + (262143 >>> 18)); \n} \n\n\nif (524287 >>> 18 !== 1) { \n $ERROR('#614: 524287 >>> 18 === 1. Actual: ' + (524287 >>> 18)); \n} \n\n\nif (1048575 >>> 18 !== 3) { \n $ERROR('#615: 1048575 >>> 18 === 3. Actual: ' + (1048575 >>> 18)); \n} \n\n\nif (2097151 >>> 18 !== 7) { \n $ERROR('#616: 2097151 >>> 18 === 7. Actual: ' + (2097151 >>> 18)); \n} \n\n\nif (4194303 >>> 18 !== 15) { \n $ERROR('#617: 4194303 >>> 18 === 15. Actual: ' + (4194303 >>> 18)); \n} \n\n\nif (8388607 >>> 18 !== 31) { \n $ERROR('#618: 8388607 >>> 18 === 31. Actual: ' + (8388607 >>> 18)); \n} \n\n\nif (16777215 >>> 18 !== 63) { \n $ERROR('#619: 16777215 >>> 18 === 63. Actual: ' + (16777215 >>> 18)); \n} \n\n\nif (33554431 >>> 18 !== 127) { \n $ERROR('#620: 33554431 >>> 18 === 127. Actual: ' + (33554431 >>> 18)); \n} \n\n\nif (67108863 >>> 18 !== 255) { \n $ERROR('#621: 67108863 >>> 18 === 255. Actual: ' + (67108863 >>> 18)); \n} \n\n\nif (134217727 >>> 18 !== 511) { \n $ERROR('#622: 134217727 >>> 18 === 511. Actual: ' + (134217727 >>> 18)); \n} \n\n\nif (268435455 >>> 18 !== 1023) { \n $ERROR('#623: 268435455 >>> 18 === 1023. Actual: ' + (268435455 >>> 18)); \n} \n\n\nif (536870911 >>> 18 !== 2047) { \n $ERROR('#624: 536870911 >>> 18 === 2047. Actual: ' + (536870911 >>> 18)); \n} \n\n\nif (1073741823 >>> 18 !== 4095) { \n $ERROR('#625: 1073741823 >>> 18 === 4095. Actual: ' + (1073741823 >>> 18)); \n} \n\n\nif (2147483647 >>> 18 !== 8191) { \n $ERROR('#626: 2147483647 >>> 18 === 8191. Actual: ' + (2147483647 >>> 18)); \n} \n\n\nif (4294967295 >>> 18 !== 16383) { \n $ERROR('#627: 4294967295 >>> 18 === 16383. Actual: ' + (4294967295 >>> 18)); \n} \n\n\nif (0 >>> 19 !== 0) { \n $ERROR('#628: 0 >>> 19 === 0. Actual: ' + (0 >>> 19)); \n} \n\n\nif (1 >>> 19 !== 0) { \n $ERROR('#629: 1 >>> 19 === 0. Actual: ' + (1 >>> 19)); \n} \n\n\nif (3 >>> 19 !== 0) { \n $ERROR('#630: 3 >>> 19 === 0. Actual: ' + (3 >>> 19)); \n} \n\n\nif (7 >>> 19 !== 0) { \n $ERROR('#631: 7 >>> 19 === 0. Actual: ' + (7 >>> 19)); \n} \n\n\nif (15 >>> 19 !== 0) { \n $ERROR('#632: 15 >>> 19 === 0. Actual: ' + (15 >>> 19)); \n} \n\n\nif (31 >>> 19 !== 0) { \n $ERROR('#633: 31 >>> 19 === 0. Actual: ' + (31 >>> 19)); \n} \n\n\nif (63 >>> 19 !== 0) { \n $ERROR('#634: 63 >>> 19 === 0. Actual: ' + (63 >>> 19)); \n} \n\n\nif (127 >>> 19 !== 0) { \n $ERROR('#635: 127 >>> 19 === 0. Actual: ' + (127 >>> 19)); \n} \n\n\nif (255 >>> 19 !== 0) { \n $ERROR('#636: 255 >>> 19 === 0. Actual: ' + (255 >>> 19)); \n} \n\n\nif (511 >>> 19 !== 0) { \n $ERROR('#637: 511 >>> 19 === 0. Actual: ' + (511 >>> 19)); \n} \n\n\nif (1023 >>> 19 !== 0) { \n $ERROR('#638: 1023 >>> 19 === 0. Actual: ' + (1023 >>> 19)); \n} \n\n\nif (2047 >>> 19 !== 0) { \n $ERROR('#639: 2047 >>> 19 === 0. Actual: ' + (2047 >>> 19)); \n} \n\n\nif (4095 >>> 19 !== 0) { \n $ERROR('#640: 4095 >>> 19 === 0. Actual: ' + (4095 >>> 19)); \n} \n\n\nif (8191 >>> 19 !== 0) { \n $ERROR('#641: 8191 >>> 19 === 0. Actual: ' + (8191 >>> 19)); \n} \n\n\nif (16383 >>> 19 !== 0) { \n $ERROR('#642: 16383 >>> 19 === 0. Actual: ' + (16383 >>> 19)); \n} \n\n\nif (32767 >>> 19 !== 0) { \n $ERROR('#643: 32767 >>> 19 === 0. Actual: ' + (32767 >>> 19)); \n} \n\n\nif (65535 >>> 19 !== 0) { \n $ERROR('#644: 65535 >>> 19 === 0. Actual: ' + (65535 >>> 19)); \n} \n\n\nif (131071 >>> 19 !== 0) { \n $ERROR('#645: 131071 >>> 19 === 0. Actual: ' + (131071 >>> 19)); \n} \n\n\nif (262143 >>> 19 !== 0) { \n $ERROR('#646: 262143 >>> 19 === 0. Actual: ' + (262143 >>> 19)); \n} \n\n\nif (524287 >>> 19 !== 0) { \n $ERROR('#647: 524287 >>> 19 === 0. Actual: ' + (524287 >>> 19)); \n} \n\n\nif (1048575 >>> 19 !== 1) { \n $ERROR('#648: 1048575 >>> 19 === 1. Actual: ' + (1048575 >>> 19)); \n} \n\n\nif (2097151 >>> 19 !== 3) { \n $ERROR('#649: 2097151 >>> 19 === 3. Actual: ' + (2097151 >>> 19)); \n} \n\n\nif (4194303 >>> 19 !== 7) { \n $ERROR('#650: 4194303 >>> 19 === 7. Actual: ' + (4194303 >>> 19)); \n} \n\n\nif (8388607 >>> 19 !== 15) { \n $ERROR('#651: 8388607 >>> 19 === 15. Actual: ' + (8388607 >>> 19)); \n} \n\n\nif (16777215 >>> 19 !== 31) { \n $ERROR('#652: 16777215 >>> 19 === 31. Actual: ' + (16777215 >>> 19)); \n} \n\n\nif (33554431 >>> 19 !== 63) { \n $ERROR('#653: 33554431 >>> 19 === 63. Actual: ' + (33554431 >>> 19)); \n} \n\n\nif (67108863 >>> 19 !== 127) { \n $ERROR('#654: 67108863 >>> 19 === 127. Actual: ' + (67108863 >>> 19)); \n} \n\n\nif (134217727 >>> 19 !== 255) { \n $ERROR('#655: 134217727 >>> 19 === 255. Actual: ' + (134217727 >>> 19)); \n} \n\n\nif (268435455 >>> 19 !== 511) { \n $ERROR('#656: 268435455 >>> 19 === 511. Actual: ' + (268435455 >>> 19)); \n} \n\n\nif (536870911 >>> 19 !== 1023) { \n $ERROR('#657: 536870911 >>> 19 === 1023. Actual: ' + (536870911 >>> 19)); \n} \n\n\nif (1073741823 >>> 19 !== 2047) { \n $ERROR('#658: 1073741823 >>> 19 === 2047. Actual: ' + (1073741823 >>> 19)); \n} \n\n\nif (2147483647 >>> 19 !== 4095) { \n $ERROR('#659: 2147483647 >>> 19 === 4095. Actual: ' + (2147483647 >>> 19)); \n} \n\n\nif (4294967295 >>> 19 !== 8191) { \n $ERROR('#660: 4294967295 >>> 19 === 8191. Actual: ' + (4294967295 >>> 19)); \n} \n\n\nif (0 >>> 20 !== 0) { \n $ERROR('#661: 0 >>> 20 === 0. Actual: ' + (0 >>> 20)); \n} \n\n\nif (1 >>> 20 !== 0) { \n $ERROR('#662: 1 >>> 20 === 0. Actual: ' + (1 >>> 20)); \n} \n\n\nif (3 >>> 20 !== 0) { \n $ERROR('#663: 3 >>> 20 === 0. Actual: ' + (3 >>> 20)); \n} \n\n\nif (7 >>> 20 !== 0) { \n $ERROR('#664: 7 >>> 20 === 0. Actual: ' + (7 >>> 20)); \n} \n\n\nif (15 >>> 20 !== 0) { \n $ERROR('#665: 15 >>> 20 === 0. Actual: ' + (15 >>> 20)); \n} \n\n\nif (31 >>> 20 !== 0) { \n $ERROR('#666: 31 >>> 20 === 0. Actual: ' + (31 >>> 20)); \n} \n\n\nif (63 >>> 20 !== 0) { \n $ERROR('#667: 63 >>> 20 === 0. Actual: ' + (63 >>> 20)); \n} \n\n\nif (127 >>> 20 !== 0) { \n $ERROR('#668: 127 >>> 20 === 0. Actual: ' + (127 >>> 20)); \n} \n\n\nif (255 >>> 20 !== 0) { \n $ERROR('#669: 255 >>> 20 === 0. Actual: ' + (255 >>> 20)); \n} \n\n\nif (511 >>> 20 !== 0) { \n $ERROR('#670: 511 >>> 20 === 0. Actual: ' + (511 >>> 20)); \n} \n\n\nif (1023 >>> 20 !== 0) { \n $ERROR('#671: 1023 >>> 20 === 0. Actual: ' + (1023 >>> 20)); \n} \n\n\nif (2047 >>> 20 !== 0) { \n $ERROR('#672: 2047 >>> 20 === 0. Actual: ' + (2047 >>> 20)); \n} \n\n\nif (4095 >>> 20 !== 0) { \n $ERROR('#673: 4095 >>> 20 === 0. Actual: ' + (4095 >>> 20)); \n} \n\n\nif (8191 >>> 20 !== 0) { \n $ERROR('#674: 8191 >>> 20 === 0. Actual: ' + (8191 >>> 20)); \n} \n\n\nif (16383 >>> 20 !== 0) { \n $ERROR('#675: 16383 >>> 20 === 0. Actual: ' + (16383 >>> 20)); \n} \n\n\nif (32767 >>> 20 !== 0) { \n $ERROR('#676: 32767 >>> 20 === 0. Actual: ' + (32767 >>> 20)); \n} \n\n\nif (65535 >>> 20 !== 0) { \n $ERROR('#677: 65535 >>> 20 === 0. Actual: ' + (65535 >>> 20)); \n} \n\n\nif (131071 >>> 20 !== 0) { \n $ERROR('#678: 131071 >>> 20 === 0. Actual: ' + (131071 >>> 20)); \n} \n\n\nif (262143 >>> 20 !== 0) { \n $ERROR('#679: 262143 >>> 20 === 0. Actual: ' + (262143 >>> 20)); \n} \n\n\nif (524287 >>> 20 !== 0) { \n $ERROR('#680: 524287 >>> 20 === 0. Actual: ' + (524287 >>> 20)); \n} \n\n\nif (1048575 >>> 20 !== 0) { \n $ERROR('#681: 1048575 >>> 20 === 0. Actual: ' + (1048575 >>> 20)); \n} \n\n\nif (2097151 >>> 20 !== 1) { \n $ERROR('#682: 2097151 >>> 20 === 1. Actual: ' + (2097151 >>> 20)); \n} \n\n\nif (4194303 >>> 20 !== 3) { \n $ERROR('#683: 4194303 >>> 20 === 3. Actual: ' + (4194303 >>> 20)); \n} \n\n\nif (8388607 >>> 20 !== 7) { \n $ERROR('#684: 8388607 >>> 20 === 7. Actual: ' + (8388607 >>> 20)); \n} \n\n\nif (16777215 >>> 20 !== 15) { \n $ERROR('#685: 16777215 >>> 20 === 15. Actual: ' + (16777215 >>> 20)); \n} \n\n\nif (33554431 >>> 20 !== 31) { \n $ERROR('#686: 33554431 >>> 20 === 31. Actual: ' + (33554431 >>> 20)); \n} \n\n\nif (67108863 >>> 20 !== 63) { \n $ERROR('#687: 67108863 >>> 20 === 63. Actual: ' + (67108863 >>> 20)); \n} \n\n\nif (134217727 >>> 20 !== 127) { \n $ERROR('#688: 134217727 >>> 20 === 127. Actual: ' + (134217727 >>> 20)); \n} \n\n\nif (268435455 >>> 20 !== 255) { \n $ERROR('#689: 268435455 >>> 20 === 255. Actual: ' + (268435455 >>> 20)); \n} \n\n\nif (536870911 >>> 20 !== 511) { \n $ERROR('#690: 536870911 >>> 20 === 511. Actual: ' + (536870911 >>> 20)); \n} \n\n\nif (1073741823 >>> 20 !== 1023) { \n $ERROR('#691: 1073741823 >>> 20 === 1023. Actual: ' + (1073741823 >>> 20)); \n} \n\n\nif (2147483647 >>> 20 !== 2047) { \n $ERROR('#692: 2147483647 >>> 20 === 2047. Actual: ' + (2147483647 >>> 20)); \n} \n\n\nif (4294967295 >>> 20 !== 4095) { \n $ERROR('#693: 4294967295 >>> 20 === 4095. Actual: ' + (4294967295 >>> 20)); \n} \n\n\nif (0 >>> 21 !== 0) { \n $ERROR('#694: 0 >>> 21 === 0. Actual: ' + (0 >>> 21)); \n} \n\n\nif (1 >>> 21 !== 0) { \n $ERROR('#695: 1 >>> 21 === 0. Actual: ' + (1 >>> 21)); \n} \n\n\nif (3 >>> 21 !== 0) { \n $ERROR('#696: 3 >>> 21 === 0. Actual: ' + (3 >>> 21)); \n} \n\n\nif (7 >>> 21 !== 0) { \n $ERROR('#697: 7 >>> 21 === 0. Actual: ' + (7 >>> 21)); \n} \n\n\nif (15 >>> 21 !== 0) { \n $ERROR('#698: 15 >>> 21 === 0. Actual: ' + (15 >>> 21)); \n} \n\n\nif (31 >>> 21 !== 0) { \n $ERROR('#699: 31 >>> 21 === 0. Actual: ' + (31 >>> 21)); \n} \n\n\nif (63 >>> 21 !== 0) { \n $ERROR('#700: 63 >>> 21 === 0. Actual: ' + (63 >>> 21)); \n} \n\n\nif (127 >>> 21 !== 0) { \n $ERROR('#701: 127 >>> 21 === 0. Actual: ' + (127 >>> 21)); \n} \n\n\nif (255 >>> 21 !== 0) { \n $ERROR('#702: 255 >>> 21 === 0. Actual: ' + (255 >>> 21)); \n} \n\n\nif (511 >>> 21 !== 0) { \n $ERROR('#703: 511 >>> 21 === 0. Actual: ' + (511 >>> 21)); \n} \n\n\nif (1023 >>> 21 !== 0) { \n $ERROR('#704: 1023 >>> 21 === 0. Actual: ' + (1023 >>> 21)); \n} \n\n\nif (2047 >>> 21 !== 0) { \n $ERROR('#705: 2047 >>> 21 === 0. Actual: ' + (2047 >>> 21)); \n} \n\n\nif (4095 >>> 21 !== 0) { \n $ERROR('#706: 4095 >>> 21 === 0. Actual: ' + (4095 >>> 21)); \n} \n\n\nif (8191 >>> 21 !== 0) { \n $ERROR('#707: 8191 >>> 21 === 0. Actual: ' + (8191 >>> 21)); \n} \n\n\nif (16383 >>> 21 !== 0) { \n $ERROR('#708: 16383 >>> 21 === 0. Actual: ' + (16383 >>> 21)); \n} \n\n\nif (32767 >>> 21 !== 0) { \n $ERROR('#709: 32767 >>> 21 === 0. Actual: ' + (32767 >>> 21)); \n} \n\n\nif (65535 >>> 21 !== 0) { \n $ERROR('#710: 65535 >>> 21 === 0. Actual: ' + (65535 >>> 21)); \n} \n\n\nif (131071 >>> 21 !== 0) { \n $ERROR('#711: 131071 >>> 21 === 0. Actual: ' + (131071 >>> 21)); \n} \n\n\nif (262143 >>> 21 !== 0) { \n $ERROR('#712: 262143 >>> 21 === 0. Actual: ' + (262143 >>> 21)); \n} \n\n\nif (524287 >>> 21 !== 0) { \n $ERROR('#713: 524287 >>> 21 === 0. Actual: ' + (524287 >>> 21)); \n} \n\n\nif (1048575 >>> 21 !== 0) { \n $ERROR('#714: 1048575 >>> 21 === 0. Actual: ' + (1048575 >>> 21)); \n} \n\n\nif (2097151 >>> 21 !== 0) { \n $ERROR('#715: 2097151 >>> 21 === 0. Actual: ' + (2097151 >>> 21)); \n} \n\n\nif (4194303 >>> 21 !== 1) { \n $ERROR('#716: 4194303 >>> 21 === 1. Actual: ' + (4194303 >>> 21)); \n} \n\n\nif (8388607 >>> 21 !== 3) { \n $ERROR('#717: 8388607 >>> 21 === 3. Actual: ' + (8388607 >>> 21)); \n} \n\n\nif (16777215 >>> 21 !== 7) { \n $ERROR('#718: 16777215 >>> 21 === 7. Actual: ' + (16777215 >>> 21)); \n} \n\n\nif (33554431 >>> 21 !== 15) { \n $ERROR('#719: 33554431 >>> 21 === 15. Actual: ' + (33554431 >>> 21)); \n} \n\n\nif (67108863 >>> 21 !== 31) { \n $ERROR('#720: 67108863 >>> 21 === 31. Actual: ' + (67108863 >>> 21)); \n} \n\n\nif (134217727 >>> 21 !== 63) { \n $ERROR('#721: 134217727 >>> 21 === 63. Actual: ' + (134217727 >>> 21)); \n} \n\n\nif (268435455 >>> 21 !== 127) { \n $ERROR('#722: 268435455 >>> 21 === 127. Actual: ' + (268435455 >>> 21)); \n} \n\n\nif (536870911 >>> 21 !== 255) { \n $ERROR('#723: 536870911 >>> 21 === 255. Actual: ' + (536870911 >>> 21)); \n} \n\n\nif (1073741823 >>> 21 !== 511) { \n $ERROR('#724: 1073741823 >>> 21 === 511. Actual: ' + (1073741823 >>> 21)); \n} \n\n\nif (2147483647 >>> 21 !== 1023) { \n $ERROR('#725: 2147483647 >>> 21 === 1023. Actual: ' + (2147483647 >>> 21)); \n} \n\n\nif (4294967295 >>> 21 !== 2047) { \n $ERROR('#726: 4294967295 >>> 21 === 2047. Actual: ' + (4294967295 >>> 21)); \n} \n\n\nif (0 >>> 22 !== 0) { \n $ERROR('#727: 0 >>> 22 === 0. Actual: ' + (0 >>> 22)); \n} \n\n\nif (1 >>> 22 !== 0) { \n $ERROR('#728: 1 >>> 22 === 0. Actual: ' + (1 >>> 22)); \n} \n\n\nif (3 >>> 22 !== 0) { \n $ERROR('#729: 3 >>> 22 === 0. Actual: ' + (3 >>> 22)); \n} \n\n\nif (7 >>> 22 !== 0) { \n $ERROR('#730: 7 >>> 22 === 0. Actual: ' + (7 >>> 22)); \n} \n\n\nif (15 >>> 22 !== 0) { \n $ERROR('#731: 15 >>> 22 === 0. Actual: ' + (15 >>> 22)); \n} \n\n\nif (31 >>> 22 !== 0) { \n $ERROR('#732: 31 >>> 22 === 0. Actual: ' + (31 >>> 22)); \n} \n\n\nif (63 >>> 22 !== 0) { \n $ERROR('#733: 63 >>> 22 === 0. Actual: ' + (63 >>> 22)); \n} \n\n\nif (127 >>> 22 !== 0) { \n $ERROR('#734: 127 >>> 22 === 0. Actual: ' + (127 >>> 22)); \n} \n\n\nif (255 >>> 22 !== 0) { \n $ERROR('#735: 255 >>> 22 === 0. Actual: ' + (255 >>> 22)); \n} \n\n\nif (511 >>> 22 !== 0) { \n $ERROR('#736: 511 >>> 22 === 0. Actual: ' + (511 >>> 22)); \n} \n\n\nif (1023 >>> 22 !== 0) { \n $ERROR('#737: 1023 >>> 22 === 0. Actual: ' + (1023 >>> 22)); \n} \n\n\nif (2047 >>> 22 !== 0) { \n $ERROR('#738: 2047 >>> 22 === 0. Actual: ' + (2047 >>> 22)); \n} \n\n\nif (4095 >>> 22 !== 0) { \n $ERROR('#739: 4095 >>> 22 === 0. Actual: ' + (4095 >>> 22)); \n} \n\n\nif (8191 >>> 22 !== 0) { \n $ERROR('#740: 8191 >>> 22 === 0. Actual: ' + (8191 >>> 22)); \n} \n\n\nif (16383 >>> 22 !== 0) { \n $ERROR('#741: 16383 >>> 22 === 0. Actual: ' + (16383 >>> 22)); \n} \n\n\nif (32767 >>> 22 !== 0) { \n $ERROR('#742: 32767 >>> 22 === 0. Actual: ' + (32767 >>> 22)); \n} \n\n\nif (65535 >>> 22 !== 0) { \n $ERROR('#743: 65535 >>> 22 === 0. Actual: ' + (65535 >>> 22)); \n} \n\n\nif (131071 >>> 22 !== 0) { \n $ERROR('#744: 131071 >>> 22 === 0. Actual: ' + (131071 >>> 22)); \n} \n\n\nif (262143 >>> 22 !== 0) { \n $ERROR('#745: 262143 >>> 22 === 0. Actual: ' + (262143 >>> 22)); \n} \n\n\nif (524287 >>> 22 !== 0) { \n $ERROR('#746: 524287 >>> 22 === 0. Actual: ' + (524287 >>> 22)); \n} \n\n\nif (1048575 >>> 22 !== 0) { \n $ERROR('#747: 1048575 >>> 22 === 0. Actual: ' + (1048575 >>> 22)); \n} \n\n\nif (2097151 >>> 22 !== 0) { \n $ERROR('#748: 2097151 >>> 22 === 0. Actual: ' + (2097151 >>> 22)); \n} \n\n\nif (4194303 >>> 22 !== 0) { \n $ERROR('#749: 4194303 >>> 22 === 0. Actual: ' + (4194303 >>> 22)); \n} \n\n\nif (8388607 >>> 22 !== 1) { \n $ERROR('#750: 8388607 >>> 22 === 1. Actual: ' + (8388607 >>> 22)); \n} \n\n\nif (16777215 >>> 22 !== 3) { \n $ERROR('#751: 16777215 >>> 22 === 3. Actual: ' + (16777215 >>> 22)); \n} \n\n\nif (33554431 >>> 22 !== 7) { \n $ERROR('#752: 33554431 >>> 22 === 7. Actual: ' + (33554431 >>> 22)); \n} \n\n\nif (67108863 >>> 22 !== 15) { \n $ERROR('#753: 67108863 >>> 22 === 15. Actual: ' + (67108863 >>> 22)); \n} \n\n\nif (134217727 >>> 22 !== 31) { \n $ERROR('#754: 134217727 >>> 22 === 31. Actual: ' + (134217727 >>> 22)); \n} \n\n\nif (268435455 >>> 22 !== 63) { \n $ERROR('#755: 268435455 >>> 22 === 63. Actual: ' + (268435455 >>> 22)); \n} \n\n\nif (536870911 >>> 22 !== 127) { \n $ERROR('#756: 536870911 >>> 22 === 127. Actual: ' + (536870911 >>> 22)); \n} \n\n\nif (1073741823 >>> 22 !== 255) { \n $ERROR('#757: 1073741823 >>> 22 === 255. Actual: ' + (1073741823 >>> 22)); \n} \n\n\nif (2147483647 >>> 22 !== 511) { \n $ERROR('#758: 2147483647 >>> 22 === 511. Actual: ' + (2147483647 >>> 22)); \n} \n\n\nif (4294967295 >>> 22 !== 1023) { \n $ERROR('#759: 4294967295 >>> 22 === 1023. Actual: ' + (4294967295 >>> 22)); \n} \n\n\nif (0 >>> 23 !== 0) { \n $ERROR('#760: 0 >>> 23 === 0. Actual: ' + (0 >>> 23)); \n} \n\n\nif (1 >>> 23 !== 0) { \n $ERROR('#761: 1 >>> 23 === 0. Actual: ' + (1 >>> 23)); \n} \n\n\nif (3 >>> 23 !== 0) { \n $ERROR('#762: 3 >>> 23 === 0. Actual: ' + (3 >>> 23)); \n} \n\n\nif (7 >>> 23 !== 0) { \n $ERROR('#763: 7 >>> 23 === 0. Actual: ' + (7 >>> 23)); \n} \n\n\nif (15 >>> 23 !== 0) { \n $ERROR('#764: 15 >>> 23 === 0. Actual: ' + (15 >>> 23)); \n} \n\n\nif (31 >>> 23 !== 0) { \n $ERROR('#765: 31 >>> 23 === 0. Actual: ' + (31 >>> 23)); \n} \n\n\nif (63 >>> 23 !== 0) { \n $ERROR('#766: 63 >>> 23 === 0. Actual: ' + (63 >>> 23)); \n} \n\n\nif (127 >>> 23 !== 0) { \n $ERROR('#767: 127 >>> 23 === 0. Actual: ' + (127 >>> 23)); \n} \n\n\nif (255 >>> 23 !== 0) { \n $ERROR('#768: 255 >>> 23 === 0. Actual: ' + (255 >>> 23)); \n} \n\n\nif (511 >>> 23 !== 0) { \n $ERROR('#769: 511 >>> 23 === 0. Actual: ' + (511 >>> 23)); \n} \n\n\nif (1023 >>> 23 !== 0) { \n $ERROR('#770: 1023 >>> 23 === 0. Actual: ' + (1023 >>> 23)); \n} \n\n\nif (2047 >>> 23 !== 0) { \n $ERROR('#771: 2047 >>> 23 === 0. Actual: ' + (2047 >>> 23)); \n} \n\n\nif (4095 >>> 23 !== 0) { \n $ERROR('#772: 4095 >>> 23 === 0. Actual: ' + (4095 >>> 23)); \n} \n\n\nif (8191 >>> 23 !== 0) { \n $ERROR('#773: 8191 >>> 23 === 0. Actual: ' + (8191 >>> 23)); \n} \n\n\nif (16383 >>> 23 !== 0) { \n $ERROR('#774: 16383 >>> 23 === 0. Actual: ' + (16383 >>> 23)); \n} \n\n\nif (32767 >>> 23 !== 0) { \n $ERROR('#775: 32767 >>> 23 === 0. Actual: ' + (32767 >>> 23)); \n} \n\n\nif (65535 >>> 23 !== 0) { \n $ERROR('#776: 65535 >>> 23 === 0. Actual: ' + (65535 >>> 23)); \n} \n\n\nif (131071 >>> 23 !== 0) { \n $ERROR('#777: 131071 >>> 23 === 0. Actual: ' + (131071 >>> 23)); \n} \n\n\nif (262143 >>> 23 !== 0) { \n $ERROR('#778: 262143 >>> 23 === 0. Actual: ' + (262143 >>> 23)); \n} \n\n\nif (524287 >>> 23 !== 0) { \n $ERROR('#779: 524287 >>> 23 === 0. Actual: ' + (524287 >>> 23)); \n} \n\n\nif (1048575 >>> 23 !== 0) { \n $ERROR('#780: 1048575 >>> 23 === 0. Actual: ' + (1048575 >>> 23)); \n} \n\n\nif (2097151 >>> 23 !== 0) { \n $ERROR('#781: 2097151 >>> 23 === 0. Actual: ' + (2097151 >>> 23)); \n} \n\n\nif (4194303 >>> 23 !== 0) { \n $ERROR('#782: 4194303 >>> 23 === 0. Actual: ' + (4194303 >>> 23)); \n} \n\n\nif (8388607 >>> 23 !== 0) { \n $ERROR('#783: 8388607 >>> 23 === 0. Actual: ' + (8388607 >>> 23)); \n} \n\n\nif (16777215 >>> 23 !== 1) { \n $ERROR('#784: 16777215 >>> 23 === 1. Actual: ' + (16777215 >>> 23)); \n} \n\n\nif (33554431 >>> 23 !== 3) { \n $ERROR('#785: 33554431 >>> 23 === 3. Actual: ' + (33554431 >>> 23)); \n} \n\n\nif (67108863 >>> 23 !== 7) { \n $ERROR('#786: 67108863 >>> 23 === 7. Actual: ' + (67108863 >>> 23)); \n} \n\n\nif (134217727 >>> 23 !== 15) { \n $ERROR('#787: 134217727 >>> 23 === 15. Actual: ' + (134217727 >>> 23)); \n} \n\n\nif (268435455 >>> 23 !== 31) { \n $ERROR('#788: 268435455 >>> 23 === 31. Actual: ' + (268435455 >>> 23)); \n} \n\n\nif (536870911 >>> 23 !== 63) { \n $ERROR('#789: 536870911 >>> 23 === 63. Actual: ' + (536870911 >>> 23)); \n} \n\n\nif (1073741823 >>> 23 !== 127) { \n $ERROR('#790: 1073741823 >>> 23 === 127. Actual: ' + (1073741823 >>> 23)); \n} \n\n\nif (2147483647 >>> 23 !== 255) { \n $ERROR('#791: 2147483647 >>> 23 === 255. Actual: ' + (2147483647 >>> 23)); \n} \n\n\nif (4294967295 >>> 23 !== 511) { \n $ERROR('#792: 4294967295 >>> 23 === 511. Actual: ' + (4294967295 >>> 23)); \n} \n\n\nif (0 >>> 24 !== 0) { \n $ERROR('#793: 0 >>> 24 === 0. Actual: ' + (0 >>> 24)); \n} \n\n\nif (1 >>> 24 !== 0) { \n $ERROR('#794: 1 >>> 24 === 0. Actual: ' + (1 >>> 24)); \n} \n\n\nif (3 >>> 24 !== 0) { \n $ERROR('#795: 3 >>> 24 === 0. Actual: ' + (3 >>> 24)); \n} \n\n\nif (7 >>> 24 !== 0) { \n $ERROR('#796: 7 >>> 24 === 0. Actual: ' + (7 >>> 24)); \n} \n\n\nif (15 >>> 24 !== 0) { \n $ERROR('#797: 15 >>> 24 === 0. Actual: ' + (15 >>> 24)); \n} \n\n\nif (31 >>> 24 !== 0) { \n $ERROR('#798: 31 >>> 24 === 0. Actual: ' + (31 >>> 24)); \n} \n\n\nif (63 >>> 24 !== 0) { \n $ERROR('#799: 63 >>> 24 === 0. Actual: ' + (63 >>> 24)); \n} \n\n\nif (127 >>> 24 !== 0) { \n $ERROR('#800: 127 >>> 24 === 0. Actual: ' + (127 >>> 24)); \n} \n\n\nif (255 >>> 24 !== 0) { \n $ERROR('#801: 255 >>> 24 === 0. Actual: ' + (255 >>> 24)); \n} \n\n\nif (511 >>> 24 !== 0) { \n $ERROR('#802: 511 >>> 24 === 0. Actual: ' + (511 >>> 24)); \n} \n\n\nif (1023 >>> 24 !== 0) { \n $ERROR('#803: 1023 >>> 24 === 0. Actual: ' + (1023 >>> 24)); \n} \n\n\nif (2047 >>> 24 !== 0) { \n $ERROR('#804: 2047 >>> 24 === 0. Actual: ' + (2047 >>> 24)); \n} \n\n\nif (4095 >>> 24 !== 0) { \n $ERROR('#805: 4095 >>> 24 === 0. Actual: ' + (4095 >>> 24)); \n} \n\n\nif (8191 >>> 24 !== 0) { \n $ERROR('#806: 8191 >>> 24 === 0. Actual: ' + (8191 >>> 24)); \n} \n\n\nif (16383 >>> 24 !== 0) { \n $ERROR('#807: 16383 >>> 24 === 0. Actual: ' + (16383 >>> 24)); \n} \n\n\nif (32767 >>> 24 !== 0) { \n $ERROR('#808: 32767 >>> 24 === 0. Actual: ' + (32767 >>> 24)); \n} \n\n\nif (65535 >>> 24 !== 0) { \n $ERROR('#809: 65535 >>> 24 === 0. Actual: ' + (65535 >>> 24)); \n} \n\n\nif (131071 >>> 24 !== 0) { \n $ERROR('#810: 131071 >>> 24 === 0. Actual: ' + (131071 >>> 24)); \n} \n\n\nif (262143 >>> 24 !== 0) { \n $ERROR('#811: 262143 >>> 24 === 0. Actual: ' + (262143 >>> 24)); \n} \n\n\nif (524287 >>> 24 !== 0) { \n $ERROR('#812: 524287 >>> 24 === 0. Actual: ' + (524287 >>> 24)); \n} \n\n\nif (1048575 >>> 24 !== 0) { \n $ERROR('#813: 1048575 >>> 24 === 0. Actual: ' + (1048575 >>> 24)); \n} \n\n\nif (2097151 >>> 24 !== 0) { \n $ERROR('#814: 2097151 >>> 24 === 0. Actual: ' + (2097151 >>> 24)); \n} \n\n\nif (4194303 >>> 24 !== 0) { \n $ERROR('#815: 4194303 >>> 24 === 0. Actual: ' + (4194303 >>> 24)); \n} \n\n\nif (8388607 >>> 24 !== 0) { \n $ERROR('#816: 8388607 >>> 24 === 0. Actual: ' + (8388607 >>> 24)); \n} \n\n\nif (16777215 >>> 24 !== 0) { \n $ERROR('#817: 16777215 >>> 24 === 0. Actual: ' + (16777215 >>> 24)); \n} \n\n\nif (33554431 >>> 24 !== 1) { \n $ERROR('#818: 33554431 >>> 24 === 1. Actual: ' + (33554431 >>> 24)); \n} \n\n\nif (67108863 >>> 24 !== 3) { \n $ERROR('#819: 67108863 >>> 24 === 3. Actual: ' + (67108863 >>> 24)); \n} \n\n\nif (134217727 >>> 24 !== 7) { \n $ERROR('#820: 134217727 >>> 24 === 7. Actual: ' + (134217727 >>> 24)); \n} \n\n\nif (268435455 >>> 24 !== 15) { \n $ERROR('#821: 268435455 >>> 24 === 15. Actual: ' + (268435455 >>> 24)); \n} \n\n\nif (536870911 >>> 24 !== 31) { \n $ERROR('#822: 536870911 >>> 24 === 31. Actual: ' + (536870911 >>> 24)); \n} \n\n\nif (1073741823 >>> 24 !== 63) { \n $ERROR('#823: 1073741823 >>> 24 === 63. Actual: ' + (1073741823 >>> 24)); \n} \n\n\nif (2147483647 >>> 24 !== 127) { \n $ERROR('#824: 2147483647 >>> 24 === 127. Actual: ' + (2147483647 >>> 24)); \n} \n\n\nif (4294967295 >>> 24 !== 255) { \n $ERROR('#825: 4294967295 >>> 24 === 255. Actual: ' + (4294967295 >>> 24)); \n} \n\n\nif (0 >>> 25 !== 0) { \n $ERROR('#826: 0 >>> 25 === 0. Actual: ' + (0 >>> 25)); \n} \n\n\nif (1 >>> 25 !== 0) { \n $ERROR('#827: 1 >>> 25 === 0. Actual: ' + (1 >>> 25)); \n} \n\n\nif (3 >>> 25 !== 0) { \n $ERROR('#828: 3 >>> 25 === 0. Actual: ' + (3 >>> 25)); \n} \n\n\nif (7 >>> 25 !== 0) { \n $ERROR('#829: 7 >>> 25 === 0. Actual: ' + (7 >>> 25)); \n} \n\n\nif (15 >>> 25 !== 0) { \n $ERROR('#830: 15 >>> 25 === 0. Actual: ' + (15 >>> 25)); \n} \n\n\nif (31 >>> 25 !== 0) { \n $ERROR('#831: 31 >>> 25 === 0. Actual: ' + (31 >>> 25)); \n} \n\n\nif (63 >>> 25 !== 0) { \n $ERROR('#832: 63 >>> 25 === 0. Actual: ' + (63 >>> 25)); \n} \n\n\nif (127 >>> 25 !== 0) { \n $ERROR('#833: 127 >>> 25 === 0. Actual: ' + (127 >>> 25)); \n} \n\n\nif (255 >>> 25 !== 0) { \n $ERROR('#834: 255 >>> 25 === 0. Actual: ' + (255 >>> 25)); \n} \n\n\nif (511 >>> 25 !== 0) { \n $ERROR('#835: 511 >>> 25 === 0. Actual: ' + (511 >>> 25)); \n} \n\n\nif (1023 >>> 25 !== 0) { \n $ERROR('#836: 1023 >>> 25 === 0. Actual: ' + (1023 >>> 25)); \n} \n\n\nif (2047 >>> 25 !== 0) { \n $ERROR('#837: 2047 >>> 25 === 0. Actual: ' + (2047 >>> 25)); \n} \n\n\nif (4095 >>> 25 !== 0) { \n $ERROR('#838: 4095 >>> 25 === 0. Actual: ' + (4095 >>> 25)); \n} \n\n\nif (8191 >>> 25 !== 0) { \n $ERROR('#839: 8191 >>> 25 === 0. Actual: ' + (8191 >>> 25)); \n} \n\n\nif (16383 >>> 25 !== 0) { \n $ERROR('#840: 16383 >>> 25 === 0. Actual: ' + (16383 >>> 25)); \n} \n\n\nif (32767 >>> 25 !== 0) { \n $ERROR('#841: 32767 >>> 25 === 0. Actual: ' + (32767 >>> 25)); \n} \n\n\nif (65535 >>> 25 !== 0) { \n $ERROR('#842: 65535 >>> 25 === 0. Actual: ' + (65535 >>> 25)); \n} \n\n\nif (131071 >>> 25 !== 0) { \n $ERROR('#843: 131071 >>> 25 === 0. Actual: ' + (131071 >>> 25)); \n} \n\n\nif (262143 >>> 25 !== 0) { \n $ERROR('#844: 262143 >>> 25 === 0. Actual: ' + (262143 >>> 25)); \n} \n\n\nif (524287 >>> 25 !== 0) { \n $ERROR('#845: 524287 >>> 25 === 0. Actual: ' + (524287 >>> 25)); \n} \n\n\nif (1048575 >>> 25 !== 0) { \n $ERROR('#846: 1048575 >>> 25 === 0. Actual: ' + (1048575 >>> 25)); \n} \n\n\nif (2097151 >>> 25 !== 0) { \n $ERROR('#847: 2097151 >>> 25 === 0. Actual: ' + (2097151 >>> 25)); \n} \n\n\nif (4194303 >>> 25 !== 0) { \n $ERROR('#848: 4194303 >>> 25 === 0. Actual: ' + (4194303 >>> 25)); \n} \n\n\nif (8388607 >>> 25 !== 0) { \n $ERROR('#849: 8388607 >>> 25 === 0. Actual: ' + (8388607 >>> 25)); \n} \n\n\nif (16777215 >>> 25 !== 0) { \n $ERROR('#850: 16777215 >>> 25 === 0. Actual: ' + (16777215 >>> 25)); \n} \n\n\nif (33554431 >>> 25 !== 0) { \n $ERROR('#851: 33554431 >>> 25 === 0. Actual: ' + (33554431 >>> 25)); \n} \n\n\nif (67108863 >>> 25 !== 1) { \n $ERROR('#852: 67108863 >>> 25 === 1. Actual: ' + (67108863 >>> 25)); \n} \n\n\nif (134217727 >>> 25 !== 3) { \n $ERROR('#853: 134217727 >>> 25 === 3. Actual: ' + (134217727 >>> 25)); \n} \n\n\nif (268435455 >>> 25 !== 7) { \n $ERROR('#854: 268435455 >>> 25 === 7. Actual: ' + (268435455 >>> 25)); \n} \n\n\nif (536870911 >>> 25 !== 15) { \n $ERROR('#855: 536870911 >>> 25 === 15. Actual: ' + (536870911 >>> 25)); \n} \n\n\nif (1073741823 >>> 25 !== 31) { \n $ERROR('#856: 1073741823 >>> 25 === 31. Actual: ' + (1073741823 >>> 25)); \n} \n\n\nif (2147483647 >>> 25 !== 63) { \n $ERROR('#857: 2147483647 >>> 25 === 63. Actual: ' + (2147483647 >>> 25)); \n} \n\n\nif (4294967295 >>> 25 !== 127) { \n $ERROR('#858: 4294967295 >>> 25 === 127. Actual: ' + (4294967295 >>> 25)); \n} \n\n\nif (0 >>> 26 !== 0) { \n $ERROR('#859: 0 >>> 26 === 0. Actual: ' + (0 >>> 26)); \n} \n\n\nif (1 >>> 26 !== 0) { \n $ERROR('#860: 1 >>> 26 === 0. Actual: ' + (1 >>> 26)); \n} \n\n\nif (3 >>> 26 !== 0) { \n $ERROR('#861: 3 >>> 26 === 0. Actual: ' + (3 >>> 26)); \n} \n\n\nif (7 >>> 26 !== 0) { \n $ERROR('#862: 7 >>> 26 === 0. Actual: ' + (7 >>> 26)); \n} \n\n\nif (15 >>> 26 !== 0) { \n $ERROR('#863: 15 >>> 26 === 0. Actual: ' + (15 >>> 26)); \n} \n\n\nif (31 >>> 26 !== 0) { \n $ERROR('#864: 31 >>> 26 === 0. Actual: ' + (31 >>> 26)); \n} \n\n\nif (63 >>> 26 !== 0) { \n $ERROR('#865: 63 >>> 26 === 0. Actual: ' + (63 >>> 26)); \n} \n\n\nif (127 >>> 26 !== 0) { \n $ERROR('#866: 127 >>> 26 === 0. Actual: ' + (127 >>> 26)); \n} \n\n\nif (255 >>> 26 !== 0) { \n $ERROR('#867: 255 >>> 26 === 0. Actual: ' + (255 >>> 26)); \n} \n\n\nif (511 >>> 26 !== 0) { \n $ERROR('#868: 511 >>> 26 === 0. Actual: ' + (511 >>> 26)); \n} \n\n\nif (1023 >>> 26 !== 0) { \n $ERROR('#869: 1023 >>> 26 === 0. Actual: ' + (1023 >>> 26)); \n} \n\n\nif (2047 >>> 26 !== 0) { \n $ERROR('#870: 2047 >>> 26 === 0. Actual: ' + (2047 >>> 26)); \n} \n\n\nif (4095 >>> 26 !== 0) { \n $ERROR('#871: 4095 >>> 26 === 0. Actual: ' + (4095 >>> 26)); \n} \n\n\nif (8191 >>> 26 !== 0) { \n $ERROR('#872: 8191 >>> 26 === 0. Actual: ' + (8191 >>> 26)); \n} \n\n\nif (16383 >>> 26 !== 0) { \n $ERROR('#873: 16383 >>> 26 === 0. Actual: ' + (16383 >>> 26)); \n} \n\n\nif (32767 >>> 26 !== 0) { \n $ERROR('#874: 32767 >>> 26 === 0. Actual: ' + (32767 >>> 26)); \n} \n\n\nif (65535 >>> 26 !== 0) { \n $ERROR('#875: 65535 >>> 26 === 0. Actual: ' + (65535 >>> 26)); \n} \n\n\nif (131071 >>> 26 !== 0) { \n $ERROR('#876: 131071 >>> 26 === 0. Actual: ' + (131071 >>> 26)); \n} \n\n\nif (262143 >>> 26 !== 0) { \n $ERROR('#877: 262143 >>> 26 === 0. Actual: ' + (262143 >>> 26)); \n} \n\n\nif (524287 >>> 26 !== 0) { \n $ERROR('#878: 524287 >>> 26 === 0. Actual: ' + (524287 >>> 26)); \n} \n\n\nif (1048575 >>> 26 !== 0) { \n $ERROR('#879: 1048575 >>> 26 === 0. Actual: ' + (1048575 >>> 26)); \n} \n\n\nif (2097151 >>> 26 !== 0) { \n $ERROR('#880: 2097151 >>> 26 === 0. Actual: ' + (2097151 >>> 26)); \n} \n\n\nif (4194303 >>> 26 !== 0) { \n $ERROR('#881: 4194303 >>> 26 === 0. Actual: ' + (4194303 >>> 26)); \n} \n\n\nif (8388607 >>> 26 !== 0) { \n $ERROR('#882: 8388607 >>> 26 === 0. Actual: ' + (8388607 >>> 26)); \n} \n\n\nif (16777215 >>> 26 !== 0) { \n $ERROR('#883: 16777215 >>> 26 === 0. Actual: ' + (16777215 >>> 26)); \n} \n\n\nif (33554431 >>> 26 !== 0) { \n $ERROR('#884: 33554431 >>> 26 === 0. Actual: ' + (33554431 >>> 26)); \n} \n\n\nif (67108863 >>> 26 !== 0) { \n $ERROR('#885: 67108863 >>> 26 === 0. Actual: ' + (67108863 >>> 26)); \n} \n\n\nif (134217727 >>> 26 !== 1) { \n $ERROR('#886: 134217727 >>> 26 === 1. Actual: ' + (134217727 >>> 26)); \n} \n\n\nif (268435455 >>> 26 !== 3) { \n $ERROR('#887: 268435455 >>> 26 === 3. Actual: ' + (268435455 >>> 26)); \n} \n\n\nif (536870911 >>> 26 !== 7) { \n $ERROR('#888: 536870911 >>> 26 === 7. Actual: ' + (536870911 >>> 26)); \n} \n\n\nif (1073741823 >>> 26 !== 15) { \n $ERROR('#889: 1073741823 >>> 26 === 15. Actual: ' + (1073741823 >>> 26)); \n} \n\n\nif (2147483647 >>> 26 !== 31) { \n $ERROR('#890: 2147483647 >>> 26 === 31. Actual: ' + (2147483647 >>> 26)); \n} \n\n\nif (4294967295 >>> 26 !== 63) { \n $ERROR('#891: 4294967295 >>> 26 === 63. Actual: ' + (4294967295 >>> 26)); \n} \n\n\nif (0 >>> 27 !== 0) { \n $ERROR('#892: 0 >>> 27 === 0. Actual: ' + (0 >>> 27)); \n} \n\n\nif (1 >>> 27 !== 0) { \n $ERROR('#893: 1 >>> 27 === 0. Actual: ' + (1 >>> 27)); \n} \n\n\nif (3 >>> 27 !== 0) { \n $ERROR('#894: 3 >>> 27 === 0. Actual: ' + (3 >>> 27)); \n} \n\n\nif (7 >>> 27 !== 0) { \n $ERROR('#895: 7 >>> 27 === 0. Actual: ' + (7 >>> 27)); \n} \n\n\nif (15 >>> 27 !== 0) { \n $ERROR('#896: 15 >>> 27 === 0. Actual: ' + (15 >>> 27)); \n} \n\n\nif (31 >>> 27 !== 0) { \n $ERROR('#897: 31 >>> 27 === 0. Actual: ' + (31 >>> 27)); \n} \n\n\nif (63 >>> 27 !== 0) { \n $ERROR('#898: 63 >>> 27 === 0. Actual: ' + (63 >>> 27)); \n} \n\n\nif (127 >>> 27 !== 0) { \n $ERROR('#899: 127 >>> 27 === 0. Actual: ' + (127 >>> 27)); \n} \n\n\nif (255 >>> 27 !== 0) { \n $ERROR('#900: 255 >>> 27 === 0. Actual: ' + (255 >>> 27)); \n} \n\n\nif (511 >>> 27 !== 0) { \n $ERROR('#901: 511 >>> 27 === 0. Actual: ' + (511 >>> 27)); \n} \n\n\nif (1023 >>> 27 !== 0) { \n $ERROR('#902: 1023 >>> 27 === 0. Actual: ' + (1023 >>> 27)); \n} \n\n\nif (2047 >>> 27 !== 0) { \n $ERROR('#903: 2047 >>> 27 === 0. Actual: ' + (2047 >>> 27)); \n} \n\n\nif (4095 >>> 27 !== 0) { \n $ERROR('#904: 4095 >>> 27 === 0. Actual: ' + (4095 >>> 27)); \n} \n\n\nif (8191 >>> 27 !== 0) { \n $ERROR('#905: 8191 >>> 27 === 0. Actual: ' + (8191 >>> 27)); \n} \n\n\nif (16383 >>> 27 !== 0) { \n $ERROR('#906: 16383 >>> 27 === 0. Actual: ' + (16383 >>> 27)); \n} \n\n\nif (32767 >>> 27 !== 0) { \n $ERROR('#907: 32767 >>> 27 === 0. Actual: ' + (32767 >>> 27)); \n} \n\n\nif (65535 >>> 27 !== 0) { \n $ERROR('#908: 65535 >>> 27 === 0. Actual: ' + (65535 >>> 27)); \n} \n\n\nif (131071 >>> 27 !== 0) { \n $ERROR('#909: 131071 >>> 27 === 0. Actual: ' + (131071 >>> 27)); \n} \n\n\nif (262143 >>> 27 !== 0) { \n $ERROR('#910: 262143 >>> 27 === 0. Actual: ' + (262143 >>> 27)); \n} \n\n\nif (524287 >>> 27 !== 0) { \n $ERROR('#911: 524287 >>> 27 === 0. Actual: ' + (524287 >>> 27)); \n} \n\n\nif (1048575 >>> 27 !== 0) { \n $ERROR('#912: 1048575 >>> 27 === 0. Actual: ' + (1048575 >>> 27)); \n} \n\n\nif (2097151 >>> 27 !== 0) { \n $ERROR('#913: 2097151 >>> 27 === 0. Actual: ' + (2097151 >>> 27)); \n} \n\n\nif (4194303 >>> 27 !== 0) { \n $ERROR('#914: 4194303 >>> 27 === 0. Actual: ' + (4194303 >>> 27)); \n} \n\n\nif (8388607 >>> 27 !== 0) { \n $ERROR('#915: 8388607 >>> 27 === 0. Actual: ' + (8388607 >>> 27)); \n} \n\n\nif (16777215 >>> 27 !== 0) { \n $ERROR('#916: 16777215 >>> 27 === 0. Actual: ' + (16777215 >>> 27)); \n} \n\n\nif (33554431 >>> 27 !== 0) { \n $ERROR('#917: 33554431 >>> 27 === 0. Actual: ' + (33554431 >>> 27)); \n} \n\n\nif (67108863 >>> 27 !== 0) { \n $ERROR('#918: 67108863 >>> 27 === 0. Actual: ' + (67108863 >>> 27)); \n} \n\n\nif (134217727 >>> 27 !== 0) { \n $ERROR('#919: 134217727 >>> 27 === 0. Actual: ' + (134217727 >>> 27)); \n} \n\n\nif (268435455 >>> 27 !== 1) { \n $ERROR('#920: 268435455 >>> 27 === 1. Actual: ' + (268435455 >>> 27)); \n} \n\n\nif (536870911 >>> 27 !== 3) { \n $ERROR('#921: 536870911 >>> 27 === 3. Actual: ' + (536870911 >>> 27)); \n} \n\n\nif (1073741823 >>> 27 !== 7) { \n $ERROR('#922: 1073741823 >>> 27 === 7. Actual: ' + (1073741823 >>> 27)); \n} \n\n\nif (2147483647 >>> 27 !== 15) { \n $ERROR('#923: 2147483647 >>> 27 === 15. Actual: ' + (2147483647 >>> 27)); \n} \n\n\nif (4294967295 >>> 27 !== 31) { \n $ERROR('#924: 4294967295 >>> 27 === 31. Actual: ' + (4294967295 >>> 27)); \n} \n\n\nif (0 >>> 28 !== 0) { \n $ERROR('#925: 0 >>> 28 === 0. Actual: ' + (0 >>> 28)); \n} \n\n\nif (1 >>> 28 !== 0) { \n $ERROR('#926: 1 >>> 28 === 0. Actual: ' + (1 >>> 28)); \n} \n\n\nif (3 >>> 28 !== 0) { \n $ERROR('#927: 3 >>> 28 === 0. Actual: ' + (3 >>> 28)); \n} \n\n\nif (7 >>> 28 !== 0) { \n $ERROR('#928: 7 >>> 28 === 0. Actual: ' + (7 >>> 28)); \n} \n\n\nif (15 >>> 28 !== 0) { \n $ERROR('#929: 15 >>> 28 === 0. Actual: ' + (15 >>> 28)); \n} \n\n\nif (31 >>> 28 !== 0) { \n $ERROR('#930: 31 >>> 28 === 0. Actual: ' + (31 >>> 28)); \n} \n\n\nif (63 >>> 28 !== 0) { \n $ERROR('#931: 63 >>> 28 === 0. Actual: ' + (63 >>> 28)); \n} \n\n\nif (127 >>> 28 !== 0) { \n $ERROR('#932: 127 >>> 28 === 0. Actual: ' + (127 >>> 28)); \n} \n\n\nif (255 >>> 28 !== 0) { \n $ERROR('#933: 255 >>> 28 === 0. Actual: ' + (255 >>> 28)); \n} \n\n\nif (511 >>> 28 !== 0) { \n $ERROR('#934: 511 >>> 28 === 0. Actual: ' + (511 >>> 28)); \n} \n\n\nif (1023 >>> 28 !== 0) { \n $ERROR('#935: 1023 >>> 28 === 0. Actual: ' + (1023 >>> 28)); \n} \n\n\nif (2047 >>> 28 !== 0) { \n $ERROR('#936: 2047 >>> 28 === 0. Actual: ' + (2047 >>> 28)); \n} \n\n\nif (4095 >>> 28 !== 0) { \n $ERROR('#937: 4095 >>> 28 === 0. Actual: ' + (4095 >>> 28)); \n} \n\n\nif (8191 >>> 28 !== 0) { \n $ERROR('#938: 8191 >>> 28 === 0. Actual: ' + (8191 >>> 28)); \n} \n\n\nif (16383 >>> 28 !== 0) { \n $ERROR('#939: 16383 >>> 28 === 0. Actual: ' + (16383 >>> 28)); \n} \n\n\nif (32767 >>> 28 !== 0) { \n $ERROR('#940: 32767 >>> 28 === 0. Actual: ' + (32767 >>> 28)); \n} \n\n\nif (65535 >>> 28 !== 0) { \n $ERROR('#941: 65535 >>> 28 === 0. Actual: ' + (65535 >>> 28)); \n} \n\n\nif (131071 >>> 28 !== 0) { \n $ERROR('#942: 131071 >>> 28 === 0. Actual: ' + (131071 >>> 28)); \n} \n\n\nif (262143 >>> 28 !== 0) { \n $ERROR('#943: 262143 >>> 28 === 0. Actual: ' + (262143 >>> 28)); \n} \n\n\nif (524287 >>> 28 !== 0) { \n $ERROR('#944: 524287 >>> 28 === 0. Actual: ' + (524287 >>> 28)); \n} \n\n\nif (1048575 >>> 28 !== 0) { \n $ERROR('#945: 1048575 >>> 28 === 0. Actual: ' + (1048575 >>> 28)); \n} \n\n\nif (2097151 >>> 28 !== 0) { \n $ERROR('#946: 2097151 >>> 28 === 0. Actual: ' + (2097151 >>> 28)); \n} \n\n\nif (4194303 >>> 28 !== 0) { \n $ERROR('#947: 4194303 >>> 28 === 0. Actual: ' + (4194303 >>> 28)); \n} \n\n\nif (8388607 >>> 28 !== 0) { \n $ERROR('#948: 8388607 >>> 28 === 0. Actual: ' + (8388607 >>> 28)); \n} \n\n\nif (16777215 >>> 28 !== 0) { \n $ERROR('#949: 16777215 >>> 28 === 0. Actual: ' + (16777215 >>> 28)); \n} \n\n\nif (33554431 >>> 28 !== 0) { \n $ERROR('#950: 33554431 >>> 28 === 0. Actual: ' + (33554431 >>> 28)); \n} \n\n\nif (67108863 >>> 28 !== 0) { \n $ERROR('#951: 67108863 >>> 28 === 0. Actual: ' + (67108863 >>> 28)); \n} \n\n\nif (134217727 >>> 28 !== 0) { \n $ERROR('#952: 134217727 >>> 28 === 0. Actual: ' + (134217727 >>> 28)); \n} \n\n\nif (268435455 >>> 28 !== 0) { \n $ERROR('#953: 268435455 >>> 28 === 0. Actual: ' + (268435455 >>> 28)); \n} \n\n\nif (536870911 >>> 28 !== 1) { \n $ERROR('#954: 536870911 >>> 28 === 1. Actual: ' + (536870911 >>> 28)); \n} \n\n\nif (1073741823 >>> 28 !== 3) { \n $ERROR('#955: 1073741823 >>> 28 === 3. Actual: ' + (1073741823 >>> 28)); \n} \n\n\nif (2147483647 >>> 28 !== 7) { \n $ERROR('#956: 2147483647 >>> 28 === 7. Actual: ' + (2147483647 >>> 28)); \n} \n\n\nif (4294967295 >>> 28 !== 15) { \n $ERROR('#957: 4294967295 >>> 28 === 15. Actual: ' + (4294967295 >>> 28)); \n} \n\n\nif (0 >>> 29 !== 0) { \n $ERROR('#958: 0 >>> 29 === 0. Actual: ' + (0 >>> 29)); \n} \n\n\nif (1 >>> 29 !== 0) { \n $ERROR('#959: 1 >>> 29 === 0. Actual: ' + (1 >>> 29)); \n} \n\n\nif (3 >>> 29 !== 0) { \n $ERROR('#960: 3 >>> 29 === 0. Actual: ' + (3 >>> 29)); \n} \n\n\nif (7 >>> 29 !== 0) { \n $ERROR('#961: 7 >>> 29 === 0. Actual: ' + (7 >>> 29)); \n} \n\n\nif (15 >>> 29 !== 0) { \n $ERROR('#962: 15 >>> 29 === 0. Actual: ' + (15 >>> 29)); \n} \n\n\nif (31 >>> 29 !== 0) { \n $ERROR('#963: 31 >>> 29 === 0. Actual: ' + (31 >>> 29)); \n} \n\n\nif (63 >>> 29 !== 0) { \n $ERROR('#964: 63 >>> 29 === 0. Actual: ' + (63 >>> 29)); \n} \n\n\nif (127 >>> 29 !== 0) { \n $ERROR('#965: 127 >>> 29 === 0. Actual: ' + (127 >>> 29)); \n} \n\n\nif (255 >>> 29 !== 0) { \n $ERROR('#966: 255 >>> 29 === 0. Actual: ' + (255 >>> 29)); \n} \n\n\nif (511 >>> 29 !== 0) { \n $ERROR('#967: 511 >>> 29 === 0. Actual: ' + (511 >>> 29)); \n} \n\n\nif (1023 >>> 29 !== 0) { \n $ERROR('#968: 1023 >>> 29 === 0. Actual: ' + (1023 >>> 29)); \n} \n\n\nif (2047 >>> 29 !== 0) { \n $ERROR('#969: 2047 >>> 29 === 0. Actual: ' + (2047 >>> 29)); \n} \n\n\nif (4095 >>> 29 !== 0) { \n $ERROR('#970: 4095 >>> 29 === 0. Actual: ' + (4095 >>> 29)); \n} \n\n\nif (8191 >>> 29 !== 0) { \n $ERROR('#971: 8191 >>> 29 === 0. Actual: ' + (8191 >>> 29)); \n} \n\n\nif (16383 >>> 29 !== 0) { \n $ERROR('#972: 16383 >>> 29 === 0. Actual: ' + (16383 >>> 29)); \n} \n\n\nif (32767 >>> 29 !== 0) { \n $ERROR('#973: 32767 >>> 29 === 0. Actual: ' + (32767 >>> 29)); \n} \n\n\nif (65535 >>> 29 !== 0) { \n $ERROR('#974: 65535 >>> 29 === 0. Actual: ' + (65535 >>> 29)); \n} \n\n\nif (131071 >>> 29 !== 0) { \n $ERROR('#975: 131071 >>> 29 === 0. Actual: ' + (131071 >>> 29)); \n} \n\n\nif (262143 >>> 29 !== 0) { \n $ERROR('#976: 262143 >>> 29 === 0. Actual: ' + (262143 >>> 29)); \n} \n\n\nif (524287 >>> 29 !== 0) { \n $ERROR('#977: 524287 >>> 29 === 0. Actual: ' + (524287 >>> 29)); \n} \n\n\nif (1048575 >>> 29 !== 0) { \n $ERROR('#978: 1048575 >>> 29 === 0. Actual: ' + (1048575 >>> 29)); \n} \n\n\nif (2097151 >>> 29 !== 0) { \n $ERROR('#979: 2097151 >>> 29 === 0. Actual: ' + (2097151 >>> 29)); \n} \n\n\nif (4194303 >>> 29 !== 0) { \n $ERROR('#980: 4194303 >>> 29 === 0. Actual: ' + (4194303 >>> 29)); \n} \n\n\nif (8388607 >>> 29 !== 0) { \n $ERROR('#981: 8388607 >>> 29 === 0. Actual: ' + (8388607 >>> 29)); \n} \n\n\nif (16777215 >>> 29 !== 0) { \n $ERROR('#982: 16777215 >>> 29 === 0. Actual: ' + (16777215 >>> 29)); \n} \n\n\nif (33554431 >>> 29 !== 0) { \n $ERROR('#983: 33554431 >>> 29 === 0. Actual: ' + (33554431 >>> 29)); \n} \n\n\nif (67108863 >>> 29 !== 0) { \n $ERROR('#984: 67108863 >>> 29 === 0. Actual: ' + (67108863 >>> 29)); \n} \n\n\nif (134217727 >>> 29 !== 0) { \n $ERROR('#985: 134217727 >>> 29 === 0. Actual: ' + (134217727 >>> 29)); \n} \n\n\nif (268435455 >>> 29 !== 0) { \n $ERROR('#986: 268435455 >>> 29 === 0. Actual: ' + (268435455 >>> 29)); \n} \n\n\nif (536870911 >>> 29 !== 0) { \n $ERROR('#987: 536870911 >>> 29 === 0. Actual: ' + (536870911 >>> 29)); \n} \n\n\nif (1073741823 >>> 29 !== 1) { \n $ERROR('#988: 1073741823 >>> 29 === 1. Actual: ' + (1073741823 >>> 29)); \n} \n\n\nif (2147483647 >>> 29 !== 3) { \n $ERROR('#989: 2147483647 >>> 29 === 3. Actual: ' + (2147483647 >>> 29)); \n} \n\n\nif (4294967295 >>> 29 !== 7) { \n $ERROR('#990: 4294967295 >>> 29 === 7. Actual: ' + (4294967295 >>> 29)); \n} \n\n\nif (0 >>> 30 !== 0) { \n $ERROR('#991: 0 >>> 30 === 0. Actual: ' + (0 >>> 30)); \n} \n\n\nif (1 >>> 30 !== 0) { \n $ERROR('#992: 1 >>> 30 === 0. Actual: ' + (1 >>> 30)); \n} \n\n\nif (3 >>> 30 !== 0) { \n $ERROR('#993: 3 >>> 30 === 0. Actual: ' + (3 >>> 30)); \n} \n\n\nif (7 >>> 30 !== 0) { \n $ERROR('#994: 7 >>> 30 === 0. Actual: ' + (7 >>> 30)); \n} \n\n\nif (15 >>> 30 !== 0) { \n $ERROR('#995: 15 >>> 30 === 0. Actual: ' + (15 >>> 30)); \n} \n\n\nif (31 >>> 30 !== 0) { \n $ERROR('#996: 31 >>> 30 === 0. Actual: ' + (31 >>> 30)); \n} \n\n\nif (63 >>> 30 !== 0) { \n $ERROR('#997: 63 >>> 30 === 0. Actual: ' + (63 >>> 30)); \n} \n\n\nif (127 >>> 30 !== 0) { \n $ERROR('#998: 127 >>> 30 === 0. Actual: ' + (127 >>> 30)); \n} \n\n\nif (255 >>> 30 !== 0) { \n $ERROR('#999: 255 >>> 30 === 0. Actual: ' + (255 >>> 30)); \n} \n\n\nif (511 >>> 30 !== 0) { \n $ERROR('#1000: 511 >>> 30 === 0. Actual: ' + (511 >>> 30)); \n} \n\n\nif (1023 >>> 30 !== 0) { \n $ERROR('#1001: 1023 >>> 30 === 0. Actual: ' + (1023 >>> 30)); \n} \n\n\nif (2047 >>> 30 !== 0) { \n $ERROR('#1002: 2047 >>> 30 === 0. Actual: ' + (2047 >>> 30)); \n} \n\n\nif (4095 >>> 30 !== 0) { \n $ERROR('#1003: 4095 >>> 30 === 0. Actual: ' + (4095 >>> 30)); \n} \n\n\nif (8191 >>> 30 !== 0) { \n $ERROR('#1004: 8191 >>> 30 === 0. Actual: ' + (8191 >>> 30)); \n} \n\n\nif (16383 >>> 30 !== 0) { \n $ERROR('#1005: 16383 >>> 30 === 0. Actual: ' + (16383 >>> 30)); \n} \n\n\nif (32767 >>> 30 !== 0) { \n $ERROR('#1006: 32767 >>> 30 === 0. Actual: ' + (32767 >>> 30)); \n} \n\n\nif (65535 >>> 30 !== 0) { \n $ERROR('#1007: 65535 >>> 30 === 0. Actual: ' + (65535 >>> 30)); \n} \n\n\nif (131071 >>> 30 !== 0) { \n $ERROR('#1008: 131071 >>> 30 === 0. Actual: ' + (131071 >>> 30)); \n} \n\n\nif (262143 >>> 30 !== 0) { \n $ERROR('#1009: 262143 >>> 30 === 0. Actual: ' + (262143 >>> 30)); \n} \n\n\nif (524287 >>> 30 !== 0) { \n $ERROR('#1010: 524287 >>> 30 === 0. Actual: ' + (524287 >>> 30)); \n} \n\n\nif (1048575 >>> 30 !== 0) { \n $ERROR('#1011: 1048575 >>> 30 === 0. Actual: ' + (1048575 >>> 30)); \n} \n\n\nif (2097151 >>> 30 !== 0) { \n $ERROR('#1012: 2097151 >>> 30 === 0. Actual: ' + (2097151 >>> 30)); \n} \n\n\nif (4194303 >>> 30 !== 0) { \n $ERROR('#1013: 4194303 >>> 30 === 0. Actual: ' + (4194303 >>> 30)); \n} \n\n\nif (8388607 >>> 30 !== 0) { \n $ERROR('#1014: 8388607 >>> 30 === 0. Actual: ' + (8388607 >>> 30)); \n} \n\n\nif (16777215 >>> 30 !== 0) { \n $ERROR('#1015: 16777215 >>> 30 === 0. Actual: ' + (16777215 >>> 30)); \n} \n\n\nif (33554431 >>> 30 !== 0) { \n $ERROR('#1016: 33554431 >>> 30 === 0. Actual: ' + (33554431 >>> 30)); \n} \n\n\nif (67108863 >>> 30 !== 0) { \n $ERROR('#1017: 67108863 >>> 30 === 0. Actual: ' + (67108863 >>> 30)); \n} \n\n\nif (134217727 >>> 30 !== 0) { \n $ERROR('#1018: 134217727 >>> 30 === 0. Actual: ' + (134217727 >>> 30)); \n} \n\n\nif (268435455 >>> 30 !== 0) { \n $ERROR('#1019: 268435455 >>> 30 === 0. Actual: ' + (268435455 >>> 30)); \n} \n\n\nif (536870911 >>> 30 !== 0) { \n $ERROR('#1020: 536870911 >>> 30 === 0. Actual: ' + (536870911 >>> 30)); \n} \n\n\nif (1073741823 >>> 30 !== 0) { \n $ERROR('#1021: 1073741823 >>> 30 === 0. Actual: ' + (1073741823 >>> 30)); \n} \n\n\nif (2147483647 >>> 30 !== 1) { \n $ERROR('#1022: 2147483647 >>> 30 === 1. Actual: ' + (2147483647 >>> 30)); \n} \n\n\nif (4294967295 >>> 30 !== 3) { \n $ERROR('#1023: 4294967295 >>> 30 === 3. Actual: ' + (4294967295 >>> 30)); \n} \n\n\nif (0 >>> 31 !== 0) { \n $ERROR('#1024: 0 >>> 31 === 0. Actual: ' + (0 >>> 31)); \n} \n\n\nif (1 >>> 31 !== 0) { \n $ERROR('#1025: 1 >>> 31 === 0. Actual: ' + (1 >>> 31)); \n} \n\n\nif (3 >>> 31 !== 0) { \n $ERROR('#1026: 3 >>> 31 === 0. Actual: ' + (3 >>> 31)); \n} \n\n\nif (7 >>> 31 !== 0) { \n $ERROR('#1027: 7 >>> 31 === 0. Actual: ' + (7 >>> 31)); \n} \n\n\nif (15 >>> 31 !== 0) { \n $ERROR('#1028: 15 >>> 31 === 0. Actual: ' + (15 >>> 31)); \n} \n\n\nif (31 >>> 31 !== 0) { \n $ERROR('#1029: 31 >>> 31 === 0. Actual: ' + (31 >>> 31)); \n} \n\n\nif (63 >>> 31 !== 0) { \n $ERROR('#1030: 63 >>> 31 === 0. Actual: ' + (63 >>> 31)); \n} \n\n\nif (127 >>> 31 !== 0) { \n $ERROR('#1031: 127 >>> 31 === 0. Actual: ' + (127 >>> 31)); \n} \n\n\nif (255 >>> 31 !== 0) { \n $ERROR('#1032: 255 >>> 31 === 0. Actual: ' + (255 >>> 31)); \n} \n\n\nif (511 >>> 31 !== 0) { \n $ERROR('#1033: 511 >>> 31 === 0. Actual: ' + (511 >>> 31)); \n} \n\n\nif (1023 >>> 31 !== 0) { \n $ERROR('#1034: 1023 >>> 31 === 0. Actual: ' + (1023 >>> 31)); \n} \n\n\nif (2047 >>> 31 !== 0) { \n $ERROR('#1035: 2047 >>> 31 === 0. Actual: ' + (2047 >>> 31)); \n} \n\n\nif (4095 >>> 31 !== 0) { \n $ERROR('#1036: 4095 >>> 31 === 0. Actual: ' + (4095 >>> 31)); \n} \n\n\nif (8191 >>> 31 !== 0) { \n $ERROR('#1037: 8191 >>> 31 === 0. Actual: ' + (8191 >>> 31)); \n} \n\n\nif (16383 >>> 31 !== 0) { \n $ERROR('#1038: 16383 >>> 31 === 0. Actual: ' + (16383 >>> 31)); \n} \n\n\nif (32767 >>> 31 !== 0) { \n $ERROR('#1039: 32767 >>> 31 === 0. Actual: ' + (32767 >>> 31)); \n} \n\n\nif (65535 >>> 31 !== 0) { \n $ERROR('#1040: 65535 >>> 31 === 0. Actual: ' + (65535 >>> 31)); \n} \n\n\nif (131071 >>> 31 !== 0) { \n $ERROR('#1041: 131071 >>> 31 === 0. Actual: ' + (131071 >>> 31)); \n} \n\n\nif (262143 >>> 31 !== 0) { \n $ERROR('#1042: 262143 >>> 31 === 0. Actual: ' + (262143 >>> 31)); \n} \n\n\nif (524287 >>> 31 !== 0) { \n $ERROR('#1043: 524287 >>> 31 === 0. Actual: ' + (524287 >>> 31)); \n} \n\n\nif (1048575 >>> 31 !== 0) { \n $ERROR('#1044: 1048575 >>> 31 === 0. Actual: ' + (1048575 >>> 31)); \n} \n\n\nif (2097151 >>> 31 !== 0) { \n $ERROR('#1045: 2097151 >>> 31 === 0. Actual: ' + (2097151 >>> 31)); \n} \n\n\nif (4194303 >>> 31 !== 0) { \n $ERROR('#1046: 4194303 >>> 31 === 0. Actual: ' + (4194303 >>> 31)); \n} \n\n\nif (8388607 >>> 31 !== 0) { \n $ERROR('#1047: 8388607 >>> 31 === 0. Actual: ' + (8388607 >>> 31)); \n} \n\n\nif (16777215 >>> 31 !== 0) { \n $ERROR('#1048: 16777215 >>> 31 === 0. Actual: ' + (16777215 >>> 31)); \n} \n\n\nif (33554431 >>> 31 !== 0) { \n $ERROR('#1049: 33554431 >>> 31 === 0. Actual: ' + (33554431 >>> 31)); \n} \n\n\nif (67108863 >>> 31 !== 0) { \n $ERROR('#1050: 67108863 >>> 31 === 0. Actual: ' + (67108863 >>> 31)); \n} \n\n\nif (134217727 >>> 31 !== 0) { \n $ERROR('#1051: 134217727 >>> 31 === 0. Actual: ' + (134217727 >>> 31)); \n} \n\n\nif (268435455 >>> 31 !== 0) { \n $ERROR('#1052: 268435455 >>> 31 === 0. Actual: ' + (268435455 >>> 31)); \n} \n\n\nif (536870911 >>> 31 !== 0) { \n $ERROR('#1053: 536870911 >>> 31 === 0. Actual: ' + (536870911 >>> 31)); \n} \n\n\nif (1073741823 >>> 31 !== 0) { \n $ERROR('#1054: 1073741823 >>> 31 === 0. Actual: ' + (1073741823 >>> 31)); \n} \n\n\nif (2147483647 >>> 31 !== 0) { \n $ERROR('#1055: 2147483647 >>> 31 === 0. Actual: ' + (2147483647 >>> 31)); \n} \n\n\nif (4294967295 >>> 31 !== 1) { \n $ERROR('#1056: 4294967295 >>> 31 === 1. Actual: ' + (4294967295 >>> 31)); \n} \n",
+ "id": "S11.7.3_A4_T4"
+ },
+ {
+ "section": "11.7.3, 9.5",
+ "description": "Checking boundary points",
+ "test": "//CHECK#1\nif (2147483648.1 >>> 0 !== 2147483648) { \n $ERROR('#1: 2147483648.1 >>> 0 === 2147483648. Actual: ' + (2147483648.1 >>> 0)); \n} \n\n//CHECK#2\nif (4294967296.1 >>> 0 !== 0) { \n $ERROR('#2: 4294967296.1 >>> 0 === 0. Actual: ' + (4294967296.1 >>> 0)); \n} \n\n//CHECK#3\nif (6442450944.1 >>> 0 !== 2147483648) { \n $ERROR('#3: 6442450944.1 >>> 0 === 2147483648. Actual: ' + (6442450944.1 >>> 0)); \n} \n\n//CHECK#4\nif (4294967295.1 >>> 0 !== 4294967295) { \n $ERROR('#4: 4294967295.1 >>> 0 === 4294967295. Actual: ' + (4294967295.1 >>> 0)); \n} \n\n//CHECK#5\nif (6442450943.1 >>> 0 !== 2147483647) { \n $ERROR('#5: 6442450943.1 >>> 0 === 2147483647. Actual: ' + (6442450943.1 >>> 0)); \n} \n\n//CHECK#6\nif (-2147483649.1 >>> 0 !== 2147483647) { \n $ERROR('#6: -2147483649.1 >>> 0 === 2147483647. Actual: ' + (-2147483649.1 >>> 0)); \n} \n\n//CHECK#7\nif (-4294967297.1 >>> 0 !== 4294967295) { \n $ERROR('#7: -4294967297.1 >>> 0 === 4294967295. Actual: ' + (-4294967297.1 >>> 0)); \n} \n\n//CHECK#8\nif (-6442450945.1 >>> 0 !== 2147483647) { \n $ERROR('#8: -6442450945.1 >>> 0 === 2147483647. Actual: ' + (-6442450945.1 >>> 0)); \n} \n\n//CHECK#9\nif (-4294967296.1 >>> 0 !== 0) { \n $ERROR('#9: -4294967296.1 >>> 0 === 0 . Actual: ' + (-4294967296.1 >>> 0)); \n} \n\n//CHECK#10\nif (-6442450944.1 >>> 0 !== 2147483648) { \n $ERROR('#10: -6442450944.1 >>> 0 === 2147483648. Actual: ' + (-6442450944.1 >>> 0)); \n} \n",
+ "id": "S11.7.3_A5.1_T1"
+ },
+ {
+ "section": "11.7.3, 9.5",
+ "description": "Checking distinct points",
+ "test": "//CHECK#1\nif (4294967295 >>> -32.1 !== 4294967295) { \n $ERROR('#1: 4294967295 >>> -32.1 === 4294967295. Actual: ' + (4294967295 >>> -32.1)); \n} \n\n//CHECK#2\nif (4294967295 >>> -31.1 !== 2147483647) { \n $ERROR('#2: 4294967295 >>> -31.1 === 2147483647. Actual: ' + (4294967295 >>> -31.1)); \n} \n\n//CHECK#3\nif (4294967295 >>> -30.1 !== 1073741823) { \n $ERROR('#3: 4294967295 >>> -30.1 === 1073741823. Actual: ' + (4294967295 >>> -30.1)); \n} \n\n//CHECK#4\nif (4294967295 >>> -29.1 !== 536870911) { \n $ERROR('#4: 4294967295 >>> -29.1 === 536870911. Actual: ' + (4294967295 >>> -29.1)); \n} \n\n//CHECK#5\nif (4294967295 >>> -28.1 !== 268435455) { \n $ERROR('#5: 4294967295 >>> -28.1 === 268435455. Actual: ' + (4294967295 >>> -28.1)); \n} \n\n//CHECK#6\nif (4294967295 >>> -27.1 !== 134217727) { \n $ERROR('#6: 4294967295 >>> -27.1 === 134217727. Actual: ' + (4294967295 >>> -27.1)); \n} \n\n//CHECK#7\nif (4294967295 >>> -26.1 !== 67108863) { \n $ERROR('#7: 4294967295 >>> -26.1 === 67108863. Actual: ' + (4294967295 >>> -26.1)); \n} \n\n//CHECK#8\nif (4294967295 >>> -25.1 !== 33554431) { \n $ERROR('#8: 4294967295 >>> -25.1 === 33554431. Actual: ' + (4294967295 >>> -25.1)); \n} \n\n//CHECK#9\nif (4294967295 >>> -24.1 !== 16777215) { \n $ERROR('#9: 4294967295 >>> -24.1 === 16777215. Actual: ' + (4294967295 >>> -24.1)); \n} \n\n//CHECK#10\nif (4294967295 >>> -23.1 !== 8388607) { \n $ERROR('#10: 4294967295 >>> -23.1 === 8388607. Actual: ' + (4294967295 >>> -23.1)); \n} \n\n//CHECK#11\nif (4294967295 >>> -22.1 !== 4194303) { \n $ERROR('#11: 4294967295 >>> -22.1 === 4194303. Actual: ' + (4294967295 >>> -22.1)); \n} \n\n//CHECK#12\nif (4294967295 >>> -21.1 !== 2097151) { \n $ERROR('#12: 4294967295 >>> -21.1 === 2097151. Actual: ' + (4294967295 >>> -21.1)); \n} \n\n//CHECK#13\nif (4294967295 >>> -20.1 !== 1048575) { \n $ERROR('#13: 4294967295 >>> -20.1 === 1048575. Actual: ' + (4294967295 >>> -20.1)); \n} \n\n//CHECK#14\nif (4294967295 >>> -19.1 !== 524287) { \n $ERROR('#14: 4294967295 >>> -19.1 === 524287. Actual: ' + (4294967295 >>> -19.1)); \n} \n\n//CHECK#15\nif (4294967295 >>> -18.1 !== 262143) { \n $ERROR('#15: 4294967295 >>> -18.1 === 262143. Actual: ' + (4294967295 >>> -18.1)); \n} \n\n//CHECK#16\nif (4294967295 >>> -17.1 !== 131071) { \n $ERROR('#16: 4294967295 >>> -17.1 === 131071. Actual: ' + (4294967295 >>> -17.1)); \n} \n\n//CHECK#17\nif (4294967295 >>> -16.1 !== 65535) { \n $ERROR('#17: 4294967295 >>> -16.1 === 65535. Actual: ' + (4294967295 >>> -16.1)); \n} \n\n//CHECK#18\nif (4294967295 >>> -15.1 !== 32767) { \n $ERROR('#18: 4294967295 >>> -15.1 === 32767. Actual: ' + (4294967295 >>> -15.1)); \n} \n\n//CHECK#19\nif (4294967295 >>> -14.1 !== 16383) { \n $ERROR('#19: 4294967295 >>> -14.1 === 16383. Actual: ' + (4294967295 >>> -14.1)); \n} \n\n//CHECK#20\nif (4294967295 >>> -13.1 !== 8191) { \n $ERROR('#20: 4294967295 >>> -13.1 === 8191. Actual: ' + (4294967295 >>> -13.1)); \n} \n\n//CHECK#21\nif (4294967295 >>> -12.1 !== 4095) { \n $ERROR('#21: 4294967295 >>> -12.1 === 4095. Actual: ' + (4294967295 >>> -12.1)); \n} \n\n//CHECK#22\nif (4294967295 >>> -11.1 !== 2047) { \n $ERROR('#22: 4294967295 >>> -11.1 === 2047. Actual: ' + (4294967295 >>> -11.1)); \n} \n\n//CHECK#23\nif (4294967295 >>> -10.1 !== 1023) { \n $ERROR('#23: 4294967295 >>> -10.1 === 1023. Actual: ' + (4294967295 >>> -10.1)); \n} \n\n//CHECK#24\nif (4294967295 >>> -9.1 !== 511) { \n $ERROR('#24: 4294967295 >>> -9.1 === 511. Actual: ' + (4294967295 >>> -9.1)); \n} \n\n//CHECK#25\nif (4294967295 >>> -8.1 !== 255) { \n $ERROR('#25: 4294967295 >>> -8.1 === 255. Actual: ' + (4294967295 >>> -8.1)); \n} \n\n//CHECK#26\nif (4294967295 >>> -7.1 !== 127) { \n $ERROR('#26: 4294967295 >>> -7.1 === 127. Actual: ' + (4294967295 >>> -7.1)); \n} \n\n//CHECK#27\nif (4294967295 >>> -6.1 !== 63) { \n $ERROR('#27: 4294967295 >>> -6.1 === 63. Actual: ' + (4294967295 >>> -6.1)); \n} \n\n//CHECK#28\nif (4294967295 >>> -5.1 !== 31) { \n $ERROR('#28: 4294967295 >>> -5.1 === 31. Actual: ' + (4294967295 >>> -5.1)); \n} \n\n//CHECK#29\nif (4294967295 >>> -4.1 !== 15) { \n $ERROR('#29: 4294967295 >>> -4.1 === 15. Actual: ' + (4294967295 >>> -4.1)); \n} \n\n//CHECK#30\nif (4294967295 >>> -3.1 !== 7) { \n $ERROR('#30: 4294967295 >>> -3.1 === 7. Actual: ' + (4294967295 >>> -3.1)); \n} \n\n//CHECK#31\nif (4294967295 >>> -2.1 !== 3) { \n $ERROR('#31: 4294967295 >>> -2.1 === 3. Actual: ' + (4294967295 >>> -2.1)); \n} \n\n//CHECK#32\nif (4294967295 >>> -1.1 !== 1) { \n $ERROR('#32: 4294967295 >>> -1.1 === 1. Actual: ' + (4294967295 >>> -1.1)); \n} \n\n//CHECK#33\nif (4294967295 >>> 32.1 !== 4294967295) { \n $ERROR('#33: 4294967295 >>> 32.1 === 4294967295. Actual: ' + (4294967295 >>> 32.1)); \n} \n\n//CHECK#34\nif (4294967295 >>> 33.1 !== 2147483647) { \n $ERROR('#34: 4294967295 >>> 33.1 === 2147483647. Actual: ' + (4294967295 >>> 33.1)); \n} \n\n//CHECK#35\nif (4294967295 >>> 34.1 !== 1073741823) { \n $ERROR('#35: 4294967295 >>> 34.1 === 1073741823. Actual: ' + (4294967295 >>> 34.1)); \n} \n\n//CHECK#36\nif (4294967295 >>> 35.1 !== 536870911) { \n $ERROR('#36: 4294967295 >>> 35.1 === 536870911. Actual: ' + (4294967295 >>> 35.1)); \n} \n\n//CHECK#37\nif (4294967295 >>> 36.1 !== 268435455) { \n $ERROR('#37: 4294967295 >>> 36.1 === 268435455. Actual: ' + (4294967295 >>> 36.1)); \n} \n\n//CHECK#38\nif (4294967295 >>> 37.1 !== 134217727) { \n $ERROR('#38: 4294967295 >>> 37.1 === 134217727. Actual: ' + (4294967295 >>> 37.1)); \n} \n\n//CHECK#39\nif (4294967295 >>> 38.1 !== 67108863) { \n $ERROR('#39: 4294967295 >>> 38.1 === 67108863. Actual: ' + (4294967295 >>> 38.1)); \n} \n\n//CHECK#40\nif (4294967295 >>> 39.1 !== 33554431) { \n $ERROR('#40: 4294967295 >>> 39.1 === 33554431. Actual: ' + (4294967295 >>> 39.1)); \n} \n\n//CHECK#41\nif (4294967295 >>> 40.1 !== 16777215) { \n $ERROR('#41: 4294967295 >>> 40.1 === 16777215. Actual: ' + (4294967295 >>> 40.1)); \n} \n\n//CHECK#42\nif (4294967295 >>> 41.1 !== 8388607) { \n $ERROR('#42: 4294967295 >>> 41.1 === 8388607. Actual: ' + (4294967295 >>> 41.1)); \n} \n\n//CHECK#43\nif (4294967295 >>> 42.1 !== 4194303) { \n $ERROR('#43: 4294967295 >>> 42.1 === 4194303. Actual: ' + (4294967295 >>> 42.1)); \n} \n\n//CHECK#44\nif (4294967295 >>> 43.1 !== 2097151) { \n $ERROR('#44: 4294967295 >>> 43.1 === 2097151. Actual: ' + (4294967295 >>> 43.1)); \n} \n\n//CHECK#45\nif (4294967295 >>> 44.1 !== 1048575) { \n $ERROR('#45: 4294967295 >>> 44.1 === 1048575. Actual: ' + (4294967295 >>> 44.1)); \n} \n\n//CHECK#46\nif (4294967295 >>> 45.1 !== 524287) { \n $ERROR('#46: 4294967295 >>> 45.1 === 524287. Actual: ' + (4294967295 >>> 45.1)); \n} \n\n//CHECK#47\nif (4294967295 >>> 46.1 !== 262143) { \n $ERROR('#47: 4294967295 >>> 46.1 === 262143. Actual: ' + (4294967295 >>> 46.1)); \n} \n\n//CHECK#48\nif (4294967295 >>> 47.1 !== 131071) { \n $ERROR('#48: 4294967295 >>> 47.1 === 131071. Actual: ' + (4294967295 >>> 47.1)); \n} \n\n//CHECK#49\nif (4294967295 >>> 48.1 !== 65535) { \n $ERROR('#49: 4294967295 >>> 48.1 === 65535. Actual: ' + (4294967295 >>> 48.1)); \n} \n\n//CHECK#50\nif (4294967295 >>> 49.1 !== 32767) { \n $ERROR('#50: 4294967295 >>> 49.1 === 32767. Actual: ' + (4294967295 >>> 49.1)); \n} \n\n//CHECK#51\nif (4294967295 >>> 50.1 !== 16383) { \n $ERROR('#51: 4294967295 >>> 50.1 === 16383. Actual: ' + (4294967295 >>> 50.1)); \n} \n\n//CHECK#52\nif (4294967295 >>> 51.1 !== 8191) { \n $ERROR('#52: 4294967295 >>> 51.1 === 8191. Actual: ' + (4294967295 >>> 51.1)); \n} \n\n//CHECK#53\nif (4294967295 >>> 52.1 !== 4095) { \n $ERROR('#53: 4294967295 >>> 52.1 === 4095. Actual: ' + (4294967295 >>> 52.1)); \n} \n\n//CHECK#54\nif (4294967295 >>> 53.1 !== 2047) { \n $ERROR('#54: 4294967295 >>> 53.1 === 2047. Actual: ' + (4294967295 >>> 53.1)); \n} \n\n//CHECK#55\nif (4294967295 >>> 54.1 !== 1023) { \n $ERROR('#55: 4294967295 >>> 54.1 === 1023. Actual: ' + (4294967295 >>> 54.1)); \n} \n\n//CHECK#56\nif (4294967295 >>> 55.1 !== 511) { \n $ERROR('#56: 4294967295 >>> 55.1 === 511. Actual: ' + (4294967295 >>> 55.1)); \n} \n\n//CHECK#57\nif (4294967295 >>> 56.1 !== 255) { \n $ERROR('#57: 4294967295 >>> 56.1 === 255. Actual: ' + (4294967295 >>> 56.1)); \n} \n\n//CHECK#58\nif (4294967295 >>> 57.1 !== 127) { \n $ERROR('#58: 4294967295 >>> 57.1 === 127. Actual: ' + (4294967295 >>> 57.1)); \n} \n\n//CHECK#59\nif (4294967295 >>> 58.1 !== 63) { \n $ERROR('#59: 4294967295 >>> 58.1 === 63. Actual: ' + (4294967295 >>> 58.1)); \n} \n\n//CHECK#60\nif (4294967295 >>> 59.1 !== 31) { \n $ERROR('#60: 4294967295 >>> 59.1 === 31. Actual: ' + (4294967295 >>> 59.1)); \n} \n\n//CHECK#61\nif (4294967295 >>> 60.1 !== 15) { \n $ERROR('#61: 4294967295 >>> 60.1 === 15. Actual: ' + (4294967295 >>> 60.1)); \n} \n\n//CHECK#62\nif (4294967295 >>> 61.1 !== 7) { \n $ERROR('#62: 4294967295 >>> 61.1 === 7. Actual: ' + (4294967295 >>> 61.1)); \n} \n\n//CHECK#63\nif (4294967295 >>> 62.1 !== 3) { \n $ERROR('#63: 4294967295 >>> 62.1 === 3. Actual: ' + (4294967295 >>> 62.1)); \n} \n\n//CHECK#64\nif (4294967295 >>> 63.1 !== 1) { \n $ERROR('#64: 4294967295 >>> 63.1 === 1. Actual: ' + (4294967295 >>> 63.1)); \n} \n \n",
+ "id": "S11.7.3_A5.2_T1"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/11.8.1_The_Less_than_Operator.json b/website/resources/scripts/testcases2/11.8.1_The_Less_than_Operator.json
new file mode 100644
index 000000000..90a0a7a38
--- /dev/null
+++ b/website/resources/scripts/testcases2/11.8.1_The_Less_than_Operator.json
@@ -0,0 +1,224 @@
+{
+ "testCollection": {
+ "name": "11.8.1_The_Less_than_Operator",
+ "numTests": 36,
+ "tests": [
+ {
+ "section": "11.8.1, 7.2, 7.3",
+ "description": "Checking by using eval",
+ "test": "//CHECK#1\nif (eval(\"0\\u0009<\\u00091\") !== true) {\n $ERROR('#1: (0\\\\u0009<\\\\u00091) === true');\n}\n\n//CHECK#2\nif (eval(\"0\\u000B<\\u000B1\") !== true) {\n $ERROR('#2: (0\\\\u000B<\\\\u000B1) === true'); \n}\n\n//CHECK#3\nif (eval(\"0\\u000C<\\u000C1\") !== true) {\n $ERROR('#3: (0\\\\u000C<\\\\u000C1) === true');\n}\n\n//CHECK#4\nif (eval(\"0\\u0020<\\u00201\") !== true) {\n $ERROR('#4: (0\\\\u0020<\\\\u00201) === true');\n}\n\n//CHECK#5\nif (eval(\"0\\u00A0<\\u00A01\") !== true) {\n $ERROR('#5: (0\\\\u00A0<\\\\u00A01) === true');\n}\n\n//CHECK#6\nif (eval(\"0\\u000A<\\u000A1\") !== true) {\n $ERROR('#6: (0\\\\u000A<\\\\u000A1) === true'); \n}\n\n//CHECK#7\nif (eval(\"0\\u000D<\\u000D1\") !== true) {\n $ERROR('#7: (0\\\\u000D<\\\\u000D1) === true');\n}\n\n//CHECK#8\nif (eval(\"0\\u2028<\\u20281\") !== true) {\n $ERROR('#8: (0\\\\u2028<\\\\u20281) === true');\n}\n\n//CHECK#9\nif (eval(\"0\\u2029<\\u20291\") !== true) {\n $ERROR('#9: (0\\\\u2029<\\\\u20291) === true');\n}\n\n//CHECK#10\nif (eval(\"0\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u2029<\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u20291\") !== true) {\n $ERROR('#10: (0\\\\u0009\\\\u000B\\\\u000C\\\\u0020\\\\u00A0\\\\u000A\\\\u000D\\\\u2028\\\\u2029<\\\\u0009\\\\u000B\\\\u000C\\\\u0020\\\\u00A0\\\\u000A\\\\u000D\\\\u2028\\\\u20291) === true');\n}\n",
+ "id": "S11.8.1_A1"
+ },
+ {
+ "section": "11.8.1, 11.8.5",
+ "description": "Either Type is not Reference or GetBase is not null",
+ "test": "//CHECK#1\nif (1 < 2 !== true) {\n $ERROR('#1: 1 < 2 === true');\n}\n\n//CHECK#2\nvar x = 1;\nif (x < 2 !== true) {\n $ERROR('#2: var x = 1; x < 2 === true');\n}\n\n//CHECK#3\nvar y = 2;\nif (1 < y !== true) {\n $ERROR('#3: var y = 2; 1 < y === true');\n}\n\n//CHECK#4\nvar x = 1;\nvar y = 2;\nif (x < y !== true) {\n $ERROR('#4: var x = 1; var y = 2; x < y === true');\n}\n\n//CHECK#5\nvar objectx = new Object();\nvar objecty = new Object();\nobjectx.prop = 1;\nobjecty.prop = 2;\nif (objectx.prop < objecty.prop !== true) {\n $ERROR('#5: var objectx = new Object(); var objecty = new Object(); objectx.prop = 1; objecty.prop = 2; objectx.prop < objecty.prop === true');\n}\n",
+ "id": "S11.8.1_A2.1_T1"
+ },
+ {
+ "section": "11.8.1, 11.8.5",
+ "description": "If GetBase(x) is null, throw ReferenceError",
+ "test": "//CHECK#1\ntry {\n x < 1;\n $ERROR('#1.1: x < 1 throw ReferenceError. Actual: ' + (x < 1)); \n}\ncatch (e) {\n if ((e instanceof ReferenceError) !== true) {\n $ERROR('#1.2: x < 1 throw ReferenceError. Actual: ' + (e)); \n }\n}\n",
+ "id": "S11.8.1_A2.1_T2"
+ },
+ {
+ "section": "11.8.1, 11.8.5",
+ "description": "If GetBase(y) is null, throw ReferenceError",
+ "test": "//CHECK#1\ntry {\n 1 < y;\n $ERROR('#1.1: 1 < y throw ReferenceError. Actual: ' + (1 < y)); \n}\ncatch (e) {\n if ((e instanceof ReferenceError) !== true) {\n $ERROR('#1.2: 1 < y throw ReferenceError. Actual: ' + (e)); \n }\n}\n\n",
+ "id": "S11.8.1_A2.1_T3"
+ },
+ {
+ "section": "11.8.1, 8.6.2.6",
+ "description": "If Type(value) is Object, evaluate ToPrimitive(value, Number)",
+ "test": "//CHECK#1\nif ({valueOf: function() {return 0}} < 1 !== true) {\n $ERROR('#1: {valueOf: function() {return 1}} < 1 === true. Actual: ' + ({valueOf: function() {return 1}} < 1));\n}\n\n//CHECK#2\nif ({valueOf: function() {return 0}, toString: function() {return 2}} < 1 !== true) {\n $ERROR('#2: {valueOf: function() {return 1}, toString: function() {return 0}} < 1 === true. Actual: ' + ({valueOf: function() {return 1}, toString: function() {return 0}} < 1));\n}\n\n//CHECK#3\nif ({valueOf: function() {return 0}, toString: function() {return {}}} < 1 !== true) {\n $ERROR('#3: {valueOf: function() {return 1}, toString: function() {return {}}} < 1 === true. Actual: ' + ({valueOf: function() {return 1}, toString: function() {return {}}} < 1));\n}\n\n//CHECK#4\ntry {\n if ({valueOf: function() {return 0}, toString: function() {throw \"error\"}} < 1 !== true) {\n $ERROR('#4.1: {valueOf: function() {return 1}, toString: function() {throw \"error\"}} < 1 === true. Actual: ' + ({valueOf: function() {return 1}, toString: function() {throw \"error\"}} < 1));\n }\n}\ncatch (e) {\n if (e === \"error\") {\n $ERROR('#4.2: {valueOf: function() {return 0}, toString: function() {throw \"error\"}} < 1 not throw \"error\"');\n } else {\n $ERROR('#4.3: {valueOf: function() {return 0}, toString: function() {throw \"error\"}} < 1 not throw Error. Actual: ' + (e));\n }\n}\n\n//CHECK#5\nif (1 < {toString: function() {return 2}} !== true) {\n $ERROR('#5: 1 < {toString: function() {return 2}} === true. Actual: ' + (1 < {toString: function() {return 2}}));\n}\n\n//CHECK#6\nif (1 < {valueOf: function() {return {}}, toString: function() {return 2}} !== true) {\n $ERROR('#6: 1 < {valueOf: function() {return {}}, toString: function() {return 2}} === true. Actual: ' + (1 < {valueOf: function() {return {}}, toString: function() {return 2}}));\n}\n\n//CHECK#7\ntry {\n 1 < {valueOf: function() {throw \"error\"}, toString: function() {return 2}};\n $ERROR('#7.1: 1 < {valueOf: function() {throw \"error\"}, toString: function() {return 2}} throw \"error\". Actual: ' + (1 < {valueOf: function() {throw \"error\"}, toString: function() {return 2}}));\n} \ncatch (e) {\n if (e !== \"error\") {\n $ERROR('#7.2: 1 < {valueOf: function() {throw \"error\"}, toString: function() {return 2}} throw \"error\". Actual: ' + (e));\n } \n}\n\n//CHECK#8\ntry {\n 1 < {valueOf: function() {return {}}, toString: function() {return {}}};\n $ERROR('#8.1: 1 < {valueOf: function() {return {}}, toString: function() {return {}}} throw TypeError. Actual: ' + (1 < {valueOf: function() {return {}}, toString: function() {return {}}}));\n} \ncatch (e) {\n if ((e instanceof TypeError) !== true) {\n $ERROR('#8.2: 1 < {valueOf: function() {return {}}, toString: function() {return {}}} throw TypeError. Actual: ' + (e));\n } \n}\n",
+ "id": "S11.8.1_A2.2_T1"
+ },
+ {
+ "section": "11.8.1",
+ "description": "Checking with \"throw\"",
+ "test": "//CHECK#1\nvar x = { valueOf: function () { throw \"x\"; } };\nvar y = { valueOf: function () { throw \"y\"; } };\ntry {\n x < y;\n $ERROR('#1.1: var x = { valueOf: function () { throw \"x\"; } }; var y = { valueOf: function () { throw \"y\"; } }; x < y throw \"x\". Actual: ' + (x < y));\n} catch (e) {\n if (e === \"y\") {\n $ERROR('#1.2: ToNumber(first expression) is called first, and then ToNumber(second expression)');\n } else {\n if (e !== \"x\") {\n $ERROR('#1.3: var x = { valueOf: function () { throw \"x\"; } }; var y = { valueOf: function () { throw \"y\"; } }; x < y throw \"x\". Actual: ' + (e));\n }\n }\n}\n",
+ "id": "S11.8.1_A2.3_T1"
+ },
+ {
+ "section": "11.8.1",
+ "description": "Checking with \"=\"",
+ "test": "//CHECK#1\nvar x = 1; \nif ((x = 0) < x !== false) {\n $ERROR('#1: var x = 1; (x = 0) < x === false');\n}\n\n//CHECK#2\nvar x = 0; \nif (x < (x = 1) !== true) {\n $ERROR('#2: var x = 0; x < (x = 1) === true');\n}\n\n",
+ "id": "S11.8.1_A2.4_T1"
+ },
+ {
+ "section": "11.8.1",
+ "description": "Checking with \"throw\"",
+ "test": "//CHECK#1\nvar x = function () { throw \"x\"; };\nvar y = function () { throw \"y\"; };\ntry {\n x() < y();\n $ERROR('#1.1: var x = function () { throw \"x\"; }; var y = function () { throw \"y\"; }; x() < y() throw \"x\". Actual: ' + (x() < y()));\n} catch (e) {\n if (e === \"y\") {\n $ERROR('#1.2: First expression is evaluated first, and then second expression');\n } else {\n if (e !== \"x\") {\n $ERROR('#1.3: var x = function () { throw \"x\"; }; var y = function () { throw \"y\"; }; x() < y() throw \"x\". Actual: ' + (e));\n }\n }\n}\n",
+ "id": "S11.8.1_A2.4_T2"
+ },
+ {
+ "section": "11.8.1",
+ "description": "Checking with undeclarated variables",
+ "test": "//CHECK#1\ntry {\n x < (x = 1);\n $ERROR('#1.1: x < (x = 1) throw ReferenceError. Actual: ' + (x < (x = 1))); \n}\ncatch (e) {\n if ((e instanceof ReferenceError) !== true) {\n $ERROR('#1.2: x < (x = 1) throw ReferenceError. Actual: ' + (e)); \n }\n}\n\n//CHECK#2\nif ((y = 1) < y !== false) {\n $ERROR('#2: (y = 1) < y === false');\n}\n\n",
+ "id": "S11.8.1_A2.4_T3"
+ },
+ {
+ "section": "11.8.1",
+ "description": "Type(Primitive(x)) and Type(Primitive(y)) vary between primitive boolean and Boolean object",
+ "test": "//CHECK#1\nif (true < true !== false) {\n $ERROR('#1: true < true === false');\n}\n\n//CHECK#2\nif (new Boolean(true) < true !== false) {\n $ERROR('#2: new Boolean(true) < true === false');\n}\n\n//CHECK#3\nif (true < new Boolean(true) !== false) {\n $ERROR('#3: true < new Boolean(true) === false');\n}\n\n//CHECK#4\nif (new Boolean(true) < new Boolean(true) !== false) {\n $ERROR('#4: new Boolean(true) < new Boolean(true) === false');\n}\n",
+ "id": "S11.8.1_A3.1_T1.1"
+ },
+ {
+ "section": "11.8.1",
+ "description": "Type(Primitive(x)) and Type(Primitive(y)) vary between primitive number and Number object",
+ "test": "//CHECK#1\nif (1 < 1 !== false) {\n $ERROR('#1: 1 < 1 === false');\n}\n\n//CHECK#2\nif (new Number(1) < 1 !== false) {\n $ERROR('#2: new Number(1) < 1 === false');\n}\n\n//CHECK#3\nif (1 < new Number(1) !== false) {\n $ERROR('#3: 1 < new Number(1) === false');\n}\n\n//CHECK#4\nif (new Number(1) < new Number(1) !== false) {\n $ERROR('#4: new Number(1) < new Number(1) === false');\n}\n\n",
+ "id": "S11.8.1_A3.1_T1.2"
+ },
+ {
+ "section": "11.8.1",
+ "description": "Type(Primitive(x)) and Type(Primitive(y)) vary between Null and Undefined",
+ "test": "//CHECK#1\nif (null < undefined !== false) {\n $ERROR('#1: null < undefined === false');\n}\n\n//CHECK#2\nif (undefined < null !== false) {\n $ERROR('#2: undefined < null === false');\n}\n\n//CHECK#3\nif (undefined < undefined !== false) {\n $ERROR('#3: undefined < undefined === false');\n}\n\n//CHECK#4\nif (null < null !== false) {\n $ERROR('#4: null < null === false');\n}\n",
+ "id": "S11.8.1_A3.1_T1.3"
+ },
+ {
+ "section": "11.8.1",
+ "description": "Type(Primitive(x)) is different from Type(Primitive(y)) and both types are Number (primitive or object) or Boolean (primitive and object)",
+ "test": "//CHECK#1\nif (true < 1 !== false) {\n $ERROR('#1: true < 1 === false');\n}\n\n//CHECK#2\nif (1 < true !== false) {\n $ERROR('#2: 1 < true === false');\n}\n\n//CHECK#3\nif (new Boolean(true) < 1 !== false) {\n $ERROR('#3: new Boolean(true) < 1 === false');\n}\n\n//CHECK#4\nif (1 < new Boolean(true) !== false) {\n $ERROR('#4: 1 < new Boolean(true) === false');\n}\n\n//CHECK#5\nif (true < new Number(1) !== false) {\n $ERROR('#5: true < new Number(1) === false');\n}\n\n//CHECK#6\nif (new Number(1) < true !== false) {\n $ERROR('#6: new Number(1) < true === false');\n}\n\n//CHECK#7\nif (new Boolean(true) < new Number(1) !== false) {\n $ERROR('#7: new Boolean(true) < new Number(1) === false');\n}\n\n//CHECK#8\nif (new Number(1) < new Boolean(true) !== false) {\n $ERROR('#8: new Number(1) < new Boolean(true) === false');\n}\n",
+ "id": "S11.8.1_A3.1_T2.1"
+ },
+ {
+ "section": "11.8.1",
+ "description": "Type(Primitive(x)) is different from Type(Primitive(y)) and both types vary between Number (primitive or object) and String (primitive and object)",
+ "test": "//CHECK#1\nif (\"1\" < 1 !== false) {\n $ERROR('#1: \"1\" < 1 === false');\n}\n\n//CHECK#2\nif (1 < \"1\" !== false) {\n $ERROR('#2: 1 < \"1\" === false');\n}\n\n//CHECK#3\nif (new String(\"1\") < 1 !== false) {\n $ERROR('#3: new String(\"1\") < 1 === false');\n}\n\n//CHECK#4\nif (1 < new String(\"1\") !== false) {\n $ERROR('#4: 1 < new String(\"1\") === false');\n}\n\n//CHECK#5\nif (\"1\" < new Number(1) !== false) {\n $ERROR('#5: \"1\" < new Number(1) === false');\n}\n\n//CHECK#6\nif (new Number(1) < \"1\" !== false) {\n $ERROR('#6: new Number(1) < \"1\" === false');\n}\n\n//CHECK#7\nif (new String(\"1\") < new Number(1) !== false) {\n $ERROR('#7: new String(\"1\") < new Number(1) === false');\n}\n\n//CHECK#8\nif (new Number(1) < new String(\"1\") !== false) {\n $ERROR('#8: new Number(1) < new String(\"1\") === false');\n}\n\n//CHECK#9\nif (\"x\" < 1 !== false) {\n $ERROR('#9: \"x\" < 1 === false');\n}\n\n//CHECK#10\nif (1 < \"x\" !== false) {\n $ERROR('#10: 1 < \"x\" === false');\n}\n",
+ "id": "S11.8.1_A3.1_T2.2"
+ },
+ {
+ "section": "11.8.1",
+ "description": "Type(Primitive(x)) is different from Type(Primitive(y)) and both types vary between Number (primitive or object) and Null",
+ "test": "//CHECK#1\nif (1 < null !== false) {\n $ERROR('#1: 1 < null === false');\n}\n\n//CHECK#2\nif (null < 1 !== true) {\n $ERROR('#2: null < 1 === true');\n}\n\n//CHECK#3\nif (new Number(1) < null !== false) {\n $ERROR('#3: new Number(1) < null === false');\n}\n\n//CHECK#4\nif (null < new Number(1) !== true) {\n $ERROR('#4: null < new Number(1) === true');\n}\n",
+ "id": "S11.8.1_A3.1_T2.3"
+ },
+ {
+ "section": "11.8.1",
+ "description": "Type(Primitive(x)) is different from Type(Primitive(y)) and both types vary between Number (primitive or object) and Undefined",
+ "test": "//CHECK#1\nif (1 < undefined !== false) {\n $ERROR('#1: 1 < undefined === false');\n}\n\n//CHECK#2\nif (undefined < 1 !== false) {\n $ERROR('#2: undefined < 1 === false');\n}\n\n//CHECK#3\nif (new Number(1) < undefined !== false) {\n $ERROR('#3: new Number(1) < undefined === false');\n}\n\n//CHECK#4\nif (undefined < new Number(1) !== false) {\n $ERROR('#4: undefined < new Number(1) === false');\n}\n",
+ "id": "S11.8.1_A3.1_T2.4"
+ },
+ {
+ "section": "11.8.1",
+ "description": "Type(Primitive(x)) is different from Type(Primitive(y)) and both types vary between String (primitive or object) and Boolean (primitive and object)",
+ "test": "//CHECK#1\nif (true < \"1\" !== false) {\n $ERROR('#1: true < \"1\" === false');\n}\n\n//CHECK#2\nif (\"1\" < true !== false) {\n $ERROR('#2: \"1\" < true === false');\n}\n\n//CHECK#3\nif (new Boolean(true) < \"1\" !== false) {\n $ERROR('#3: new Boolean(true) < \"1\" === false');\n}\n\n//CHECK#4\nif (\"1\" < new Boolean(true) !== false) {\n $ERROR('#4: \"1\" < new Boolean(true) === false');\n}\n\n//CHECK#5\nif (true < new String(\"1\") !== false) {\n $ERROR('#5: true < new String(\"1\") === false');\n}\n\n//CHECK#6\nif (new String(\"1\") < true !== false) {\n $ERROR('#6: new String(\"1\") < true === false');\n}\n\n//CHECK#7\nif (new Boolean(true) < new String(\"1\") !== false) {\n $ERROR('#7: new Boolean(true) < new String(\"1\") === false');\n}\n\n//CHECK#8\nif (new String(\"1\") < new Boolean(true) !== false) {\n $ERROR('#8: new String(\"1\") < new Boolean(true) === false');\n}\n",
+ "id": "S11.8.1_A3.1_T2.5"
+ },
+ {
+ "section": "11.8.1",
+ "description": "Type(Primitive(x)) is different from Type(Primitive(y)) and both types vary between String (primitive or object) and Undefined",
+ "test": "//CHECK#1\nif (\"1\" < undefined !== false) {\n $ERROR('#1: \"1\" < undefined === false');\n}\n\n//CHECK#2\nif (undefined < \"1\" !== false) {\n $ERROR('#2: undefined < \"1\" === false');\n}\n\n//CHECK#3\nif (new String(\"1\") < undefined !== false) {\n $ERROR('#3: new String(\"1\") < undefined === false');\n}\n\n//CHECK#4\nif (undefined < new String(\"1\") !== false) {\n $ERROR('#4: undefined < new String(\"1\") === false');\n}\n",
+ "id": "S11.8.1_A3.1_T2.6"
+ },
+ {
+ "section": "11.8.1",
+ "description": "Type(Primitive(x)) is different from Type(Primitive(y)) and both types vary between String (primitive or object) and Null",
+ "test": "//CHECK#1\nif (\"1\" < null !== false) {\n $ERROR('#1: \"1\" < null === false');\n}\n\n//CHECK#2\nif (null < \"1\" !== true) {\n $ERROR('#2: null < \"1\" === true');\n}\n\n//CHECK#3\nif (new String(\"1\") < null !== false) {\n $ERROR('#3: new String(\"1\") < null === false');\n}\n\n//CHECK#4\nif (null < new String(\"1\") !== true) {\n $ERROR('#4: null < new String(\"1\") === true');\n}\n",
+ "id": "S11.8.1_A3.1_T2.7"
+ },
+ {
+ "section": "11.8.1",
+ "description": "Type(Primitive(x)) is different from Type(Primitive(y)) and both types vary between Boolean (primitive or object) and Undefined",
+ "test": "//CHECK#1\nif (true < undefined !== false) {\n $ERROR('#1: true < undefined === false');\n}\n\n//CHECK#2\nif (undefined < true !== false) {\n $ERROR('#2: undefined < true === false');\n}\n\n//CHECK#3\nif (new Boolean(true) < undefined !== false) {\n $ERROR('#3: new Boolean(true) < undefined === false');\n}\n\n//CHECK#4\nif (undefined < new Boolean(true) !== false) {\n $ERROR('#4: undefined < new Boolean(true) === false');\n}\n",
+ "id": "S11.8.1_A3.1_T2.8"
+ },
+ {
+ "section": "11.8.1",
+ "description": "Type(Primitive(x)) is different from Type(Primitive(y)) and both types vary between Boolean (primitive or object) and Null",
+ "test": "//CHECK#1\nif (true < null !== false) {\n $ERROR('#1: true < null === false');\n}\n\n//CHECK#2\nif (null < true !== true) {\n $ERROR('#2: null < true === true');\n}\n\n//CHECK#3\nif (new Boolean(true) < null !== false) {\n $ERROR('#3: new Boolean(true) < null === false');\n}\n\n//CHECK#4\nif (null < new Boolean(true) !== true) {\n $ERROR('#4: null < new Boolean(true) === true');\n}\n",
+ "id": "S11.8.1_A3.1_T2.9"
+ },
+ {
+ "section": "11.8.1",
+ "description": "Type(Primitive(x)) and Type(Primitive(y)) vary between primitive string and String object",
+ "test": "//CHECK#1\nif (\"1\" < \"1\" !== false) {\n $ERROR('#1: \"1\" < \"1\" === false');\n}\n\n//CHECK#2\nif (new String(\"1\") < \"1\" !== false) {\n $ERROR('#2: new String(\"1\") < \"1\" === false');\n}\n\n//CHECK#3\nif (\"1\" < new String(\"1\") !== false) {\n $ERROR('#3: \"1\" < new String(\"1\") === false');\n}\n\n//CHECK#4\nif (new String(\"1\") < new String(\"1\") !== false) {\n $ERROR('#4: new String(\"1\") < new String(\"1\") === false');\n}\n\n//CHECK#5\nif (\"x\" < \"1\" !== false) {\n $ERROR('#5: \"x\" < \"1\" === false');\n}\n\n//CHECK#6\nif (\"1\" < \"x\" !== true) {\n $ERROR('#6: \"1\" < \"x\" === true');\n}\n",
+ "id": "S11.8.1_A3.2_T1.1"
+ },
+ {
+ "section": "11.8.1",
+ "description": "Type(Primitive(x)) and Type(Primitive(y)) vary between Object object and Function object",
+ "test": "//CHECK#1\nif (({} < function(){return 1}) !== ({}.toString() < function(){return 1}.toString())) {\n $ERROR('#1: ({} < function(){return 1}) === ({}.toString() < function(){return 1}.toString())');\n}\n\n//CHECK#2\nif ((function(){return 1} < {}) !== (function(){return 1}.toString() < {}.toString())) {\n $ERROR('#2: (function(){return 1} < {}) === (function(){return 1}.toString() < {}.toString())');\n}\n\n//CHECK#3\nif ((function(){return 1} < function(){return 1}) !== (function(){return 1}.toString() < function(){return 1}.toString())) {\n $ERROR('#3: (function(){return 1} < function(){return 1}) === (function(){return 1}.toString() < function(){return 1}.toString())');\n}\n\n//CHECK#4\nif (({} < {}) !== ({}.toString() < {}.toString())) {\n $ERROR('#4: ({} < {}) === ({}.toString() < {}.toString())');\n}\n",
+ "id": "S11.8.1_A3.2_T1.2"
+ },
+ {
+ "section": "11.8.1, 11.8.5",
+ "description": "y is number primitive",
+ "test": "//CHECK#1\nif ((Number.NaN < 0) !== false) {\n $ERROR('#1: (NaN < 0) === false');\n}\n\n//CHECK#2\nif ((Number.NaN < 1.1) !== false) {\n $ERROR('#2: (NaN < 1.1) === false');\n}\n\n//CHECK#3\nif ((Number.NaN < -1.1) !== false) {\n $ERROR('#3: (NaN < -1.1) === false');\n}\n\n//CHECK#4\nif ((Number.NaN < Number.NaN) !== false) {\n $ERROR('#4: (NaN < NaN) === false');\n}\n\n//CHECK#5\nif ((Number.NaN < Number.POSITIVE_INFINITY) !== false) {\n $ERROR('#5: (NaN < +Infinity) === false');\n}\n\n//CHECK#6\nif ((Number.NaN < Number.NEGATIVE_INFINITY) !== false) {\n $ERROR('#6: (NaN < -Infinity) === false');\n}\n\n//CHECK#7\nif ((Number.NaN < Number.MAX_VALUE) !== false) {\n $ERROR('#7: (NaN < Number.MAX_VALUE) === false');\n}\n\n//CHECK#8\nif ((Number.NaN < Number.MIN_VALUE) !== false) {\n $ERROR('#8: (NaN < Number.MIN_VALUE) === false');\n}\n\n",
+ "id": "S11.8.1_A4.1"
+ },
+ {
+ "section": "11.8.1, 11.8.5",
+ "description": "x and y are string primitives",
+ "test": "//CHECK#1\nif ((\"x\" < \"x\") !== false) {\n $ERROR('#1: (\"x\" < \"x\") === false');\n}\n\n//CHECK#2\nif ((\"x\" < \"\") !== false) {\n $ERROR('#2: (\"x\" < \"\") === false');\n}\n\n//CHECK#3\nif ((\"abcd\" < \"ab\") !== false) {\n $ERROR('#3: (\"abcd\" < ab\") === false');\n}\n\n//CHECK#4\nif ((\"abc\\u0064\" < \"abcd\") !== false) {\n $ERROR('#4: (\"abc\\\\u0064\" < abcd\") === false');\n}\n\n//CHECK#5\nif ((\"x\" + \"y\" < \"x\") !== false) {\n $ERROR('#5: (\"x\" + \"y\" < \"x\") === false');\n}\n\n//CHECK#6\nvar x = \"x\";\nif ((x + \"y\" < x) !== false) {\n $ERROR('#6: var x = \"x\"; (x + \"y\" < x) === false');\n}\n\n",
+ "id": "S11.8.1_A4.10"
+ },
+ {
+ "section": "11.8.1, 11.8.5",
+ "description": "x and y are string primitives",
+ "test": "//CHECK#1\nif ((\"x\" < \"x \") !== true) {\n $ERROR('#1: (\"x\" < \"x \") === true');\n}\n\n//CHECK#2\nif ((\"\" < \"x\") !== true) {\n $ERROR('#2: (\"\" < \"x\") === true');\n}\n\n//CHECK#3\nif ((\"ab\" < \"abcd\") !== true) {\n $ERROR('#3: (\"ab\" < abcd\") === true');\n}\n\n//CHECK#4\nif ((\"abcd\" < \"abc\\u0064\") !== false) {\n $ERROR('#4: (\"abcd\" < abc\\\\u0064\") === false');\n}\n\n//CHECK#5\nif ((\"x\" < \"x\" + \"y\") !== true) {\n $ERROR('#5: (\"x\" < \"x\" + \"y\") === true');\n}\n\n//CHECK#6\nvar x = \"x\";\nif ((x < x + \"y\") !== true) {\n $ERROR('#6: var x = \"x\"; (x < x + \"y\") === true');\n}\n\n//CHECK#7\nif ((\"a\\u0000\" < \"a\\u0000a\") !== true) {\n $ERROR('#7: (\"a\\\\u0000\" < \"a\\\\u0000a\") === true');\n}\n\n//CHECK#8\nif ((\"x\" < \" x\") !== false) {\n $ERROR('#8: (\"x\" < \" x\") === false');\n}\n\n\n",
+ "id": "S11.8.1_A4.11"
+ },
+ {
+ "section": "11.8.1, 11.8.5",
+ "description": "x and y are string primitives",
+ "test": "//CHECK#1\nif ((\"xx\" < \"xy\") !== true) {\n $ERROR('#1: (\"xx\" < \"xy\") === true');\n}\n\n//CHECK#2\nif ((\"xy\" < \"xx\") !== false) {\n $ERROR('#2: (\"xy\" < \"xx\") === false');\n}\n\n//CHECK#3\nif ((\"x\" < \"y\") !== true) {\n $ERROR('#3: (\"x\" < y\") === true');\n}\n\n//CHECK#4\nif ((\"aab\" < \"aba\") !== true) {\n $ERROR('#4: (\"aab\" < aba\") === true');\n}\n\n//CHECK#5\nif ((\"\\u0061\\u0061\\u0061\\u0062\" < \"\\u0061\\u0061\\u0061\\u0061\") !== false) {\n $ERROR('#5: (\"\\\\u0061\\\\u0061\\\\u0061\\\\u0062\" < \\\\u0061\\\\u0061\\\\u0061\\\\u0061\") === false');\n}\n\n//CHECK#6\nif ((\"a\\u0000a\" < \"a\\u0000b\") !== true) {\n $ERROR('#6: (\"a\\\\u0000a\" < \"a\\\\u0000b\") === true');\n}\n\n//CHECK#7\nif ((\"aB\" < \"aa\") !== true) {\n $ERROR('#7: (\"aB\" < aa\") === true');\n}\n",
+ "id": "S11.8.1_A4.12_T1"
+ },
+ {
+ "section": "11.8.1, 11.8.5",
+ "description": "x and y are string primitives",
+ "test": "//CHECK#1\nif ((\"0\" < \"x\") !== true) {\n $ERROR('#1: (\"0\" < \"x\") !== true');\n}\n\n//CHECK#2\nif ((\"-\" < \"0\") !== true) {\n $ERROR('#2: (\"-\" < \"0\") !== true');\n}\n\n//CHECK#3\nif ((\".\" < \"0\") !== true) {\n $ERROR('#3: (\".\" < \"0\") !== true');\n}\n\n//CHECK#4\nif ((\"+\" < \"-\") !== true) {\n $ERROR('#4: (\"+\" < \"-\") !== true');\n}\n\n//CHECK#5\nif ((\"-0\" < \"-1\") !== true) {\n $ERROR('#5: (\"-0\" < \"-1\") !== true');\n}\n\n//CHECK#6\nif ((\"+1\" < \"-1\") !== true) {\n $ERROR('#6: (\"+1\" < \"-1\") !== true');\n}\n\n//CHECK#7\nif ((\"1\" < \"1e-10\") !== true) {\n$ERROR('#7: (\"1\" < \"1e-10\") !== true');\n}\n",
+ "id": "S11.8.1_A4.12_T2"
+ },
+ {
+ "section": "11.8.1, 11.8.5",
+ "description": "x is number primitive",
+ "test": "//CHECK#1\nif ((0 < Number.NaN) !== false) {\n $ERROR('#1: (0 < NaN) === false');\n}\n\n//CHECK#2\nif ((1.1 < Number.NaN) !== false) {\n $ERROR('#2: (1.1 < NaN) === false');\n}\n\n//CHECK#3\nif ((-1.1 < Number.NaN) !== false) {\n $ERROR('#3: (-1.1 < NaN) === false');\n}\n\n//CHECK#4\nif ((Number.NaN < Number.NaN) !== false) {\n $ERROR('#4: (NaN < NaN) === false');\n}\n\n//CHECK#5\nif ((Number.POSITIVE_INFINITY < Number.NaN) !== false) {\n $ERROR('#5: (+Infinity < NaN) === false');\n}\n\n//CHECK#6\nif ((Number.NEGATIVE_INFINITY < Number.NaN) !== false) {\n $ERROR('#6: (-Infinity < NaN) === false');\n}\n\n//CHECK#7\nif ((Number.MAX_VALUE < Number.NaN) !== false) {\n $ERROR('#7: (Number.MAX_VALUE < NaN) === false');\n}\n\n//CHECK#8\nif ((Number.MIN_VALUE < Number.NaN) !== false) {\n $ERROR('#8: (Number.MIN_VALUE < NaN) === false');\n}\n\n",
+ "id": "S11.8.1_A4.2"
+ },
+ {
+ "section": "11.8.1, 11.8.5",
+ "description": "x and y are number primitives",
+ "test": "//CHECK#1\nif ((1 < 1) !== false) {\n $ERROR('#1: (1 < 1) === false');\n}\n\n//CHECK#2\nif ((1.1 < 1.1) !== false) {\n $ERROR('#2: (1.1 < 1.1) === false');\n}\n\n//CHECK#3\nif ((-1.1 < -1.1) !== false) {\n $ERROR('#3: (-1.1 < -1.1) === false');\n}\n\n//CHECK#4\nif ((Number.NEGATIVE_INFINITY < Number.NEGATIVE_INFINITY) !== false) {\n $ERROR('#4: (-Infinity < -Infinity) === false');\n}\n\n//CHECK#5\nif ((Number.POSITIVE_INFINITY < Number.POSITIVE_INFINITY) !== false) {\n $ERROR('#5: (+Infinity < +Infinity) === false');\n}\n\n//CHECK#6\nif ((Number.MAX_VALUE < Number.MAX_VALUE) !== false) {\n $ERROR('#6: (Number.MAX_VALUE < Number.MAX_VALUE) === false');\n}\n\n//CHECK#7\nif ((Number.MIN_VALUE < Number.MIN_VALUE) !== false) {\n $ERROR('#7: (Number.MIN_VALUE < Number.MIN_VALUE) === false');\n}\n\n\n",
+ "id": "S11.8.1_A4.3"
+ },
+ {
+ "section": "11.8.1, 11.8.5",
+ "description": "Checking all combinations",
+ "test": "//CHECK#1\nif ((0 < 0) !== false) {\n $ERROR('#1: (0 < 0) === false');\n}\n\n//CHECK#2\nif ((-0 < -0) !== false) {\n $ERROR('#2: (-0 < -0) === false');\n}\n\n//CHECK#3\nif ((+0 < -0) !== false) {\n $ERROR('#3: (+0 < -0) === false');\n}\n\n//CHECK#4\nif ((-0 < +0) !== false) {\n $ERROR('#4: (-0 < +0) === false');\n}\n\n",
+ "id": "S11.8.1_A4.4"
+ },
+ {
+ "section": "11.8.1, 11.8.5",
+ "description": "y is number primitive",
+ "test": "//CHECK#1\nif ((Number.POSITIVE_INFINITY < 0) !== false) {\n $ERROR('#1: (+Infinity < 0) === false');\n}\n\n//CHECK#2\nif ((Number.POSITIVE_INFINITY < 1.1) !== false) {\n $ERROR('#2: (+Infinity < 1.1) === false');\n}\n\n//CHECK#3\nif ((Number.POSITIVE_INFINITY < -1.1) !== false) {\n $ERROR('#3: (+Infinity < -1.1) === false');\n}\n\n//CHECK#4\nif ((Number.POSITIVE_INFINITY < Number.NEGATIVE_INFINITY) !== false) {\n $ERROR('#4: (+Infinity < -Infinity) === false');\n}\n\n//CHECK#5\nif ((Number.POSITIVE_INFINITY < Number.MAX_VALUE) !== false) {\n $ERROR('#5: (+Infinity < Number.MAX_VALUE) === false');\n}\n\n//CHECK#6\nif ((Number.POSITIVE_INFINITY < Number.MIN_VALUE) !== false) {\n $ERROR('#6: (+Infinity < Number.MIN_VALUE) === false');\n}\n\n",
+ "id": "S11.8.1_A4.5"
+ },
+ {
+ "section": "11.8.1, 11.8.5",
+ "description": "x is number primitive",
+ "test": "//CHECK#1\nif ((0 < Number.POSITIVE_INFINITY) !== true) {\n $ERROR('#1: (0 < +Infinity) === true');\n}\n\n//CHECK#2\nif ((1.1 < Number.POSITIVE_INFINITY) !== true) {\n $ERROR('#2: (1.1 < +Infinity) === true');\n}\n\n//CHECK#3\nif ((-1.1 < Number.POSITIVE_INFINITY) !== true) {\n $ERROR('#3: (-1.1 < +Infinity) === true');\n}\n\n//CHECK#4\nif ((Number.NEGATIVE_INFINITY < Number.POSITIVE_INFINITY) !== true) {\n $ERROR('#4: (-Infinity < +Infinity) === true');\n}\n\n//CHECK#5\nif ((Number.MAX_VALUE < Number.POSITIVE_INFINITY) !== true) {\n $ERROR('#5: (Number.MAX_VALUE < +Infinity) === true');\n}\n\n//CHECK#6\nif ((Number.MIN_VALUE < Number.POSITIVE_INFINITY) !== true) {\n $ERROR('#6: (Number.MIN_VALUE < +Infinity) === true');\n}\n\n",
+ "id": "S11.8.1_A4.6"
+ },
+ {
+ "section": "11.8.1, 11.8.5",
+ "description": "y is number primitive",
+ "test": "//CHECK#1\nif ((Number.NEGATIVE_INFINITY < 0) !== true) {\n $ERROR('#1: (-Infinity < 0) === true');\n}\n\n//CHECK#2\nif ((Number.NEGATIVE_INFINITY < 1.1) !== true) {\n $ERROR('#2: (-Infinity < 1.1) === true');\n}\n\n//CHECK#3\nif ((Number.NEGATIVE_INFINITY < -1.1) !== true) {\n $ERROR('#3: (-Infinity < -1.1) === true');\n}\n\n//CHECK#4\nif ((Number.NEGATIVE_INFINITY < Number.POSITIVE_INFINITY) !== true) {\n $ERROR('#4: (-Infinity < +Infinity) === true');\n}\n\n//CHECK#5\nif ((Number.NEGATIVE_INFINITY < Number.MAX_VALUE) !== true) {\n $ERROR('#5: (-Infinity < Number.MAX_VALUE) === true');\n}\n\n//CHECK#6\nif ((Number.NEGATIVE_INFINITY < Number.MIN_VALUE) !== true) {\n $ERROR('#6: (-Infinity < Number.MIN_VALUE) === true');\n}\n\n",
+ "id": "S11.8.1_A4.7"
+ },
+ {
+ "section": "11.8.1, 11.8.5",
+ "description": "x is number primitive",
+ "test": "//CHECK#1\nif ((0 < Number.NEGATIVE_INFINITY) !== false) {\n $ERROR('#1: (0 < -Infinity) === false');\n}\n\n//CHECK#2\nif ((1.1 < Number.NEGATIVE_INFINITY) !== false) {\n $ERROR('#2: (1.1 < -Infinity) === false');\n}\n\n//CHECK#3\nif ((-1.1 < Number.NEGATIVE_INFINITY) !== false) {\n $ERROR('#3: (-1.1 < -Infinity) === false');\n}\n\n//CHECK#4\nif ((Number.POSITIVE_INFINITY < Number.NEGATIVE_INFINITY) !== false) {\n $ERROR('#4: (+Infinity < -Infinity) === false');\n}\n\n//CHECK#5\nif ((Number.MAX_VALUE < Number.NEGATIVE_INFINITY) !== false) {\n $ERROR('#5: (Number.MAX_VALUE < -Infinity) === false');\n}\n\n//CHECK#6\nif ((Number.MIN_VALUE < Number.NEGATIVE_INFINITY) !== false) {\n $ERROR('#6: (Number.MIN_VALUE < -Infinity) === false');\n}\n\n",
+ "id": "S11.8.1_A4.8"
+ },
+ {
+ "section": "11.8.1, 11.8.5",
+ "description": "x and y are number primitives",
+ "test": "//CHECK#1\nif ((1.1 < 1) !== false) {\n $ERROR('#1: (1.1 < 1) === false');\n}\n\n//CHECK#2\nif ((1 < 1.1) !== true) {\n $ERROR('#2: (1 < 1.1) === true');\n}\n\n//CHECK#3\nif ((-1.1 < -1) !== true) {\n $ERROR('#3: (-1.1 < -1) === true');\n}\n\n//CHECK#4\nif ((-1 < -1.1) !== false) {\n $ERROR('#4: (-1 < -1.1) === false');\n}\n\n//CHECK#5\nif ((0 < 0.1) !== true) {\n $ERROR('#5: (0 < 0.1) === true');\n}\n\n//CHECK#6\nif ((-0.1 < 0) !== true) {\n $ERROR('#6: (-0.1 < 0) === true');\n}\n\n//CHECK#7\nif ((Number.MAX_VALUE/2 < Number.MAX_VALUE) !== true) {\n $ERROR('#7: (Number.MAX_VALUE/2 < Number.MAX_VALUE) === true');\n}\n\n//CHECK#8\nif ((Number.MIN_VALUE < Number.MIN_VALUE*2) !== true) {\n $ERROR('#8: (Number.MIN_VALUE < Number.MIN_VALUE*2) === true');\n}\n\n\n",
+ "id": "S11.8.1_A4.9"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/11.8.2.json b/website/resources/scripts/testcases2/11.8.2.json
new file mode 100644
index 000000000..8b661a0a8
--- /dev/null
+++ b/website/resources/scripts/testcases2/11.8.2.json
@@ -0,0 +1,32 @@
+{
+ "testCollection": {
+ "name": "11.8.2",
+ "numTests": 4,
+ "tests": [
+ {
+ "id": "11.8.2-1",
+ "path": "TestCases/chapter11/11.8/11.8.2/11.8.2-1.js",
+ "description": "11.8.2 Greater-than Operator - Partial left to right order enforced when using Greater-than operator: valueOf > valueOf",
+ "test": "assertTrue((function testcase() {\n var accessed = false;\n var obj1 = {\n valueOf: function () {\n accessed = true;\n return 3;\n }\n };\n var obj2 = {\n valueOf: function () {\n if (accessed === true) {\n return 4;\n } else {\n return 2;\n }\n }\n };\n return !(obj1 > obj2);\n }).call(this));\n"
+ },
+ {
+ "id": "11.8.2-2",
+ "path": "TestCases/chapter11/11.8/11.8.2/11.8.2-2.js",
+ "description": "11.8.2 Greater-than Operator - Partial left to right order enforced when using Greater-than operator: valueOf > toString",
+ "test": "assertTrue((function testcase() {\n var accessed = false;\n var obj1 = {\n valueOf: function () {\n accessed = true;\n return 3;\n }\n };\n var obj2 = {\n toString: function () {\n if (accessed === true) {\n return 4;\n } else {\n return 2;\n }\n }\n };\n return !(obj1 > obj2);\n }).call(this));\n"
+ },
+ {
+ "id": "11.8.2-3",
+ "path": "TestCases/chapter11/11.8/11.8.2/11.8.2-3.js",
+ "description": "11.8.2 Greater-than Operator - Partial left to right order enforced when using Greater-than operator: toString > valueOf",
+ "test": "assertTrue((function testcase() {\n var accessed = false;\n var obj1 = {\n toString: function () {\n accessed = true;\n return 3;\n }\n };\n var obj2 = {\n valueOf: function () {\n if (accessed === true) {\n return 4;\n } else {\n return 2;\n }\n }\n };\n return !(obj1 > obj2);\n }).call(this));\n"
+ },
+ {
+ "id": "11.8.2-4",
+ "path": "TestCases/chapter11/11.8/11.8.2/11.8.2-4.js",
+ "description": "11.8.2 Greater-than Operator - Partial left to right order enforced when using Greater-than operator: toString > toString",
+ "test": "assertTrue((function testcase() {\n var accessed = false;\n var obj1 = {\n toString: function () {\n accessed = true;\n return 3;\n }\n };\n var obj2 = {\n toString: function () {\n if (accessed === true) {\n return 4;\n } else {\n return 2;\n }\n }\n };\n return !(obj1 > obj2);\n }).call(this));\n"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/11.8.2_The_Greater_than_Operator.json b/website/resources/scripts/testcases2/11.8.2_The_Greater_than_Operator.json
new file mode 100644
index 000000000..21d88ab46
--- /dev/null
+++ b/website/resources/scripts/testcases2/11.8.2_The_Greater_than_Operator.json
@@ -0,0 +1,224 @@
+{
+ "testCollection": {
+ "name": "11.8.2_The_Greater_than_Operator",
+ "numTests": 36,
+ "tests": [
+ {
+ "section": "11.8.2, 7.2, 7.3",
+ "description": "Checking by using eval",
+ "test": "//CHECK#1\nif (eval(\"0\\u0009>\\u00091\") !== false) {\n $ERROR('#1: 0\\\\u0009>\\\\u00091) === false');\n}\n\n//CHECK#2\nif (eval(\"0\\u000B>\\u000B1\") !== false) {\n $ERROR('#2: 0\\\\u000B>\\\\u000B1) === false'); \n}\n\n//CHECK#3\nif (eval(\"0\\u000C>\\u000C1\") !== false) {\n $ERROR('#3: (0\\\\u000C>\\\\u000C1) === false');\n}\n\n//CHECK#4\nif (eval(\"0\\u0020>\\u00201\") !== false) {\n $ERROR('#4: (0\\\\u0020>\\\\u00201) === false');\n}\n\n//CHECK#5\nif (eval(\"0\\u00A0>\\u00A01\") !== false) {\n $ERROR('#5: (0\\\\u00A0>\\\\u00A01) === false');\n}\n\n//CHECK#6\nif (eval(\"0\\u000A>\\u000A1\") !== false) {\n $ERROR('#6: (0\\\\u000A>\\\\u000A1) === false'); \n}\n\n//CHECK#7\nif (eval(\"0\\u000D>\\u000D1\") !== false) {\n $ERROR('#7: (0\\\\u000D>\\\\u000D1) === false');\n}\n\n//CHECK#8\nif (eval(\"0\\u2028>\\u20281\") !== false) {\n $ERROR('#8: (0\\\\u2028>\\\\u20281) === false');\n}\n\n//CHECK#9\nif (eval(\"0\\u2029>\\u20291\") !== false) {\n $ERROR('#9: (0\\\\u2029>\\\\u20291) === false');\n}\n\n//CHECK#10\nif (eval(\"1\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u2029>=\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u20291\") !== true) {\n $ERROR('#10: (1\\\\u0009\\\\u000B\\\\u000C\\\\u0020\\\\u00A0\\\\u000A\\\\u000D\\\\u2028\\\\u2029>=\\\\u0009\\\\u000B\\\\u000C\\\\u0020\\\\u00A0\\\\u000A\\\\u000D\\\\u2028\\\\u20291) === true');\n}\n",
+ "id": "S11.8.2_A1"
+ },
+ {
+ "section": "11.8.2, 11.8.5",
+ "description": "Either Type is not Reference or GetBase is not null",
+ "test": "//CHECK#1\nif (2 > 1 !== true) {\n $ERROR('#1: 2 > 1 === true');\n}\n\n//CHECK#2\nvar x = 2;\nif (x > 1 !== true) {\n $ERROR('#2: var x = 2; x > 1 === true');\n}\n\n//CHECK#3\nvar y = 1;\nif (2 > y !== true) {\n $ERROR('#3: var y = 1; 2 > y === true');\n}\n\n//CHECK#4\nvar x = 2;\nvar y = 1;\nif (x > y !== true) {\n $ERROR('#4: var x = 2; var y = 1; x > y === true');\n}\n\n//CHECK#5\nvar objectx = new Object();\nvar objecty = new Object();\nobjectx.prop = 2;\nobjecty.prop = 1;\nif (objectx.prop > objecty.prop !== true) {\n $ERROR('#5: var objectx = new Object(); var objecty = new Object(); objectx.prop = 2; objecty.prop = 1; objectx.prop > objecty.prop === true');\n}\n",
+ "id": "S11.8.2_A2.1_T1"
+ },
+ {
+ "section": "11.8.2, 11.8.5",
+ "description": "If GetBase(x) is null, throw ReferenceError",
+ "test": "//CHECK#1\ntry {\n x > 1;\n $ERROR('#1.1: x > 1 throw ReferenceError. Actual: ' + (x > 1)); \n}\ncatch (e) {\n if ((e instanceof ReferenceError) !== true) {\n $ERROR('#1.2: x > 1 throw ReferenceError. Actual: ' + (e)); \n }\n}\n\n",
+ "id": "S11.8.2_A2.1_T2"
+ },
+ {
+ "section": "11.8.2, 11.8.5",
+ "description": "If GetBase(y) is null, throw ReferenceError",
+ "test": "//CHECK#1\ntry {\n 1 > y;\n $ERROR('#1.1: 1 > y throw ReferenceError. Actual: ' + (1 > y)); \n}\ncatch (e) {\n if ((e instanceof ReferenceError) !== true) {\n $ERROR('#1.2: 1 > y throw ReferenceError. Actual: ' + (e)); \n }\n}\n\n",
+ "id": "S11.8.2_A2.1_T3"
+ },
+ {
+ "section": "11.8.2, 8.6.2.6",
+ "description": "If Type(value) is Object, evaluate ToPrimitive(value, Number)",
+ "test": "//CHECK#1\nif ({valueOf: function() {return 2}} > 1 !== true) {\n $ERROR('#1: {valueOf: function() {return 1}} > 1 === true. Actual: ' + ({valueOf: function() {return 1}} > 1));\n}\n\n//CHECK#2\nif ({valueOf: function() {return 2}, toString: function() {return 0}} > 1 !== true) {\n $ERROR('#2: {valueOf: function() {return 1}, toString: function() {return 2}} > 1 === true. Actual: ' + ({valueOf: function() {return 1}, toString: function() {return 2}} > 1));\n}\n\n//CHECK#3\nif ({valueOf: function() {return 2}, toString: function() {return {}}} > 1 !== true) {\n $ERROR('#3: {valueOf: function() {return 1}, toString: function() {return {}}} > 1 === true. Actual: ' + ({valueOf: function() {return 1}, toString: function() {return {}}} > 1));\n}\n\n//CHECK#4\ntry {\n if ({valueOf: function() {return 2}, toString: function() {throw \"error\"}} > 1 !== true) {\n $ERROR('#4.1: {valueOf: function() {return 1}, toString: function() {throw \"error\"}} > 1 === true. Actual: ' + ({valueOf: function() {return 1}, toString: function() {throw \"error\"}} > 1));\n }\n}\ncatch (e) {\n if (e === \"error\") {\n $ERROR('#4.2: {valueOf: function() {return 2}, toString: function() {throw \"error\"}} > 1 not throw \"error\"');\n } else {\n $ERROR('#4.3: {valueOf: function() {return 2}, toString: function() {throw \"error\"}} > 1 not throw Error. Actual: ' + (e));\n }\n}\n\n//CHECK#5\nif (1 > {toString: function() {return 0}} !== true) {\n $ERROR('#5: 1 > {toString: function() {return 0}} === true. Actual: ' + (1 > {toString: function() {return 0}}));\n}\n\n//CHECK#6\nif (1 > {valueOf: function() {return {}}, toString: function() {return 0}} !== true) {\n $ERROR('#6: 1 > {valueOf: function() {return {}}, toString: function() {return 0}} === true. Actual: ' + (1 > {valueOf: function() {return {}}, toString: function() {return 0}}));\n}\n\n//CHECK#7\ntry {\n 1 > {valueOf: function() {throw \"error\"}, toString: function() {return 0}};\n $ERROR('#7.1: 1 > {valueOf: function() {throw \"error\"}, toString: function() {return 0}} throw \"error\". Actual: ' + (1 > {valueOf: function() {throw \"error\"}, toString: function() {return 0}}));\n} \ncatch (e) {\n if (e !== \"error\") {\n $ERROR('#7.2: 1 > {valueOf: function() {throw \"error\"}, toString: function() {return 0}} throw \"error\". Actual: ' + (e));\n } \n}\n\n//CHECK#8\ntry {\n 1 > {valueOf: function() {return {}}, toString: function() {return {}}};\n $ERROR('#8.1: 1 > {valueOf: function() {return {}}, toString: function() {return {}}} throw TypeError. Actual: ' + (1 > {valueOf: function() {return {}}, toString: function() {return {}}}));\n} \ncatch (e) {\n if ((e instanceof TypeError) !== true) {\n $ERROR('#8.2: 1 > {valueOf: function() {return {}}, toString: function() {return {}}} throw TypeError. Actual: ' + (e));\n } \n}\n",
+ "id": "S11.8.2_A2.2_T1"
+ },
+ {
+ "section": "11.8.2",
+ "description": "Checking with \"throw\"",
+ "test": "//CHECK#1\nvar x = { valueOf: function () { throw \"x\"; } };\nvar y = { valueOf: function () { throw \"y\"; } };\ntry {\n x > y;\n $ERROR('#1.1: var x = { valueOf: function () { throw \"x\"; } }; var y = { valueOf: function () { throw \"y\"; } }; x > y throw \"y\". Actual: ' + (x > y));\n} catch (e) {\n if (e === \"x\") {\n $ERROR('#1.2: ToNumber(second expression) is called first, and then ToNumber(first expression)');\n } else {\n if (e !== \"y\") {\n $ERROR('#1.3: var x = { valueOf: function () { throw \"x\"; } }; var y = { valueOf: function () { throw \"y\"; } }; x > y throw \"y\". Actual: ' + (e));\n }\n }\n}\n",
+ "id": "S11.8.2_A2.3_T1"
+ },
+ {
+ "section": "11.8.2",
+ "description": "Checking with \"=\"",
+ "test": "//CHECK#1\nvar x = 0; \nif ((x = 1) > x !== false) {\n $ERROR('#1: var x = 0; (x = 1) > x === false');\n}\n\n//CHECK#2\nvar x = 1; \nif (x > (x = 0) !== true) {\n $ERROR('#2: var x = 1; x > (x = 0) === true');\n}\n\n",
+ "id": "S11.8.2_A2.4_T1"
+ },
+ {
+ "section": "11.8.2",
+ "description": "Checking with \"throw\"",
+ "test": "//CHECK#1\nvar x = function () { throw \"x\"; };\nvar y = function () { throw \"y\"; };\ntry {\n x() > y();\n $ERROR('#1.1: var x = function () { throw \"x\"; }; var y = function () { throw \"y\"; }; x() > y() throw \"x\". Actual: ' + (x() > y()));\n} catch (e) {\n if (e === \"y\") {\n $ERROR('#1.2: First expression is evaluated first, and then second expression');\n } else {\n if (e !== \"x\") {\n $ERROR('#1.3: var x = function () { throw \"x\"; }; var y = function () { throw \"y\"; }; x() > y() throw \"x\". Actual: ' + (e));\n }\n }\n}\n",
+ "id": "S11.8.2_A2.4_T2"
+ },
+ {
+ "section": "11.8.2",
+ "description": "Checking with undeclarated variables",
+ "test": "//CHECK#1\ntry {\n x > (x = 1);\n $ERROR('#1.1: x > (x = 1) throw ReferenceError. Actual: ' + (x > (x = 1))); \n}\ncatch (e) {\n if ((e instanceof ReferenceError) !== true) {\n $ERROR('#1.2: x > (x = 1) throw ReferenceError. Actual: ' + (e)); \n }\n}\n\n//CHECK#2\nif ((y = 1) > y !== false) {\n $ERROR('#2: (y = 1) > y === false');\n}\n\n",
+ "id": "S11.8.2_A2.4_T3"
+ },
+ {
+ "section": "11.8.2",
+ "description": "Type(Primitive(x)) and Type(Primitive(y)) vary between primitive boolean and Boolean object",
+ "test": "//CHECK#1\nif (true > true !== false) {\n $ERROR('#1: true > true === false');\n}\n\n//CHECK#2\nif (new Boolean(true) > true !== false) {\n $ERROR('#2: new Boolean(true) > true === false');\n}\n\n//CHECK#3\nif (true > new Boolean(true) !== false) {\n $ERROR('#3: true > new Boolean(true) === false');\n}\n\n//CHECK#4\nif (new Boolean(true) > new Boolean(true) !== false) {\n $ERROR('#4: new Boolean(true) > new Boolean(true) === false');\n}\n",
+ "id": "S11.8.2_A3.1_T1.1"
+ },
+ {
+ "section": "11.8.2",
+ "description": "Type(Primitive(x)) and Type(Primitive(y)) vary between primitive number and Number object",
+ "test": "//CHECK#1\nif (1 > 1 !== false) {\n $ERROR('#1: 1 > 1 === false');\n}\n\n//CHECK#2\nif (new Number(1) > 1 !== false) {\n $ERROR('#2: new Number(1) > 1 === false');\n}\n\n//CHECK#3\nif (1 > new Number(1) !== false) {\n $ERROR('#3: 1 > new Number(1) === false');\n}\n\n//CHECK#4\nif (new Number(1) > new Number(1) !== false) {\n $ERROR('#4: new Number(1) > new Number(1) === false');\n}\n\n",
+ "id": "S11.8.2_A3.1_T1.2"
+ },
+ {
+ "section": "11.8.2",
+ "description": "Type(Primitive(x)) and Type(Primitive(y)) vary between Null and Undefined",
+ "test": "//CHECK#1\nif (null > undefined !== false) {\n $ERROR('#1: null > undefined === false');\n}\n\n//CHECK#2\nif (undefined > null !== false) {\n $ERROR('#2: undefined > null === false');\n}\n\n//CHECK#3\nif (undefined > undefined !== false) {\n $ERROR('#3: undefined > undefined === false');\n}\n\n//CHECK#4\nif (null > null !== false) {\n $ERROR('#4: null > null === false');\n}\n",
+ "id": "S11.8.2_A3.1_T1.3"
+ },
+ {
+ "section": "11.8.2",
+ "description": "Type(Primitive(x)) is different from Type(Primitive(y)) and both types vary between Number (primitive or object) and Boolean (primitive and object)",
+ "test": "//CHECK#1\nif (true > 1 !== false) {\n $ERROR('#1: true > 1 === false');\n}\n\n//CHECK#2\nif (1 > true !== false) {\n $ERROR('#2: 1 > true === false');\n}\n\n//CHECK#3\nif (new Boolean(true) > 1 !== false) {\n $ERROR('#3: new Boolean(true) > 1 === false');\n}\n\n//CHECK#4\nif (1 > new Boolean(true) !== false) {\n $ERROR('#4: 1 > new Boolean(true) === false');\n}\n\n//CHECK#5\nif (true > new Number(1) !== false) {\n $ERROR('#5: true > new Number(1) === false');\n}\n\n//CHECK#6\nif (new Number(1) > true !== false) {\n $ERROR('#6: new Number(1) > true === false');\n}\n\n//CHECK#7\nif (new Boolean(true) > new Number(1) !== false) {\n $ERROR('#7: new Boolean(true) > new Number(1) === false');\n}\n\n//CHECK#8\nif (new Number(1) > new Boolean(true) !== false) {\n $ERROR('#8: new Number(1) > new Boolean(true) === false');\n}\n",
+ "id": "S11.8.2_A3.1_T2.1"
+ },
+ {
+ "section": "11.8.2",
+ "description": "Type(Primitive(x)) is different from Type(Primitive(y)) and both types vary between Number (primitive or object) and String (primitive and object)",
+ "test": "//CHECK#1\nif (\"1\" > 1 !== false) {\n $ERROR('#1: \"1\" > 1 === false');\n}\n\n//CHECK#2\nif (1 > \"1\" !== false) {\n $ERROR('#2: 1 > \"1\" === false');\n}\n\n//CHECK#3\nif (new String(\"1\") > 1 !== false) {\n $ERROR('#3: new String(\"1\") > 1 === false');\n}\n\n//CHECK#4\nif (1 > new String(\"1\") !== false) {\n $ERROR('#4: 1 > new String(\"1\") === false');\n}\n\n//CHECK#5\nif (\"1\" > new Number(1) !== false) {\n $ERROR('#5: \"1\" > new Number(1) === false');\n}\n\n//CHECK#6\nif (new Number(1) > \"1\" !== false) {\n $ERROR('#6: new Number(1) > \"1\" === false');\n}\n\n//CHECK#7\nif (new String(\"1\") > new Number(1) !== false) {\n $ERROR('#7: new String(\"1\") > new Number(1) === false');\n}\n\n//CHECK#8\nif (new Number(1) > new String(\"1\") !== false) {\n $ERROR('#8: new Number(1) > new String(\"1\") === false');\n}\n\n//CHECK#9\nif (\"x\" > 1 !== false) {\n $ERROR('#9: \"x\" > 1 === false');\n}\n\n//CHECK#10\nif (1 > \"x\" !== false) {\n $ERROR('#10: 1 > \"x\" === false');\n}\n",
+ "id": "S11.8.2_A3.1_T2.2"
+ },
+ {
+ "section": "11.8.2",
+ "description": "Type(Primitive(x)) is different from Type(Primitive(y)) and both types vary between Number (primitive or object) and Null",
+ "test": "//CHECK#1\nif (1 > null !== true) {\n $ERROR('#1: 1 > null === true');\n}\n\n//CHECK#2\nif (null > 1 !== false) {\n $ERROR('#2: null > 1 === false');\n}\n\n//CHECK#3\nif (new Number(1) > null !== true) {\n $ERROR('#3: new Number(1) > null === true');\n}\n\n//CHECK#4\nif (null > new Number(1) !== false) {\n $ERROR('#4: null > new Number(1) === false');\n}\n",
+ "id": "S11.8.2_A3.1_T2.3"
+ },
+ {
+ "section": "11.8.2",
+ "description": "Type(Primitive(x)) is different from Type(Primitive(y)) and both types vary between Number (primitive or object) and Undefined",
+ "test": "//CHECK#1\nif (1 > undefined !== false) {\n $ERROR('#1: 1 > undefined === false');\n}\n\n//CHECK#2\nif (undefined > 1 !== false) {\n $ERROR('#2: undefined > 1 === false');\n}\n\n//CHECK#3\nif (new Number(1) > undefined !== false) {\n $ERROR('#3: new Number(1) > undefined === false');\n}\n\n//CHECK#4\nif (undefined > new Number(1) !== false) {\n $ERROR('#4: undefined > new Number(1) === false');\n}\n",
+ "id": "S11.8.2_A3.1_T2.4"
+ },
+ {
+ "section": "11.8.2",
+ "description": "Type(Primitive(x)) is different from Type(Primitive(y)) and both types vary between String (primitive or object) and Boolean (primitive and object)",
+ "test": "//CHECK#1\nif (true > \"1\" !== false) {\n $ERROR('#1: true > \"1\" === false');\n}\n\n//CHECK#2\nif (\"1\" > true !== false) {\n $ERROR('#2: \"1\" > true === false');\n}\n\n//CHECK#3\nif (new Boolean(true) > \"1\" !== false) {\n $ERROR('#3: new Boolean(true) > \"1\" === false');\n}\n\n//CHECK#4\nif (\"1\" > new Boolean(true) !== false) {\n $ERROR('#4: \"1\" > new Boolean(true) === false');\n}\n\n//CHECK#5\nif (true > new String(\"1\") !== false) {\n $ERROR('#5: true > new String(\"1\") === false');\n}\n\n//CHECK#6\nif (new String(\"1\") > true !== false) {\n $ERROR('#6: new String(\"1\") > true === false');\n}\n\n//CHECK#7\nif (new Boolean(true) > new String(\"1\") !== false) {\n $ERROR('#7: new Boolean(true) > new String(\"1\") === false');\n}\n\n//CHECK#8\nif (new String(\"1\") > new Boolean(true) !== false) {\n $ERROR('#8: new String(\"1\") > new Boolean(true) === false');\n}\n",
+ "id": "S11.8.2_A3.1_T2.5"
+ },
+ {
+ "section": "11.8.2",
+ "description": "Type(Primitive(x)) is different from Type(Primitive(y)) and both types vary between String (primitive or object) and Undefined",
+ "test": "//CHECK#1\nif (\"1\" > undefined !== false) {\n $ERROR('#1: \"1\" > undefined === false');\n}\n\n//CHECK#2\nif (undefined > \"1\" !== false) {\n $ERROR('#2: undefined > \"1\" === false');\n}\n\n//CHECK#3\nif (new String(\"1\") > undefined !== false) {\n $ERROR('#3: new String(\"1\") > undefined === false');\n}\n\n//CHECK#4\nif (undefined > new String(\"1\") !== false) {\n $ERROR('#4: undefined > new String(\"1\") === false');\n}\n",
+ "id": "S11.8.2_A3.1_T2.6"
+ },
+ {
+ "section": "11.8.2",
+ "description": "Type(Primitive(x)) is different from Type(Primitive(y)) and both types vary between String (primitive or object) and Null",
+ "test": "//CHECK#1\nif (\"1\" > null !== true) {\n $ERROR('#1: \"1\" > null === true');\n}\n\n//CHECK#2\nif (null > \"1\" !== false) {\n $ERROR('#2: null > \"1\" === false');\n}\n\n//CHECK#3\nif (new String(\"1\") > null !== true) {\n $ERROR('#3: new String(\"1\") > null === true');\n}\n\n//CHECK#4\nif (null > new String(\"1\") !== false) {\n $ERROR('#4: null > new String(\"1\") === false');\n}\n",
+ "id": "S11.8.2_A3.1_T2.7"
+ },
+ {
+ "section": "11.8.2",
+ "description": "Type(Primitive(x)) is different from Type(Primitive(y)) and both types vary between Boolean (primitive or object) and Undefined",
+ "test": "//CHECK#1\nif (true > undefined !== false) {\n $ERROR('#1: true > undefined === false');\n}\n\n//CHECK#2\nif (undefined > true !== false) {\n $ERROR('#2: undefined > true === false');\n}\n\n//CHECK#3\nif (new Boolean(true) > undefined !== false) {\n $ERROR('#3: new Boolean(true) > undefined === false');\n}\n\n//CHECK#4\nif (undefined > new Boolean(true) !== false) {\n $ERROR('#4: undefined > new Boolean(true) === false');\n}\n",
+ "id": "S11.8.2_A3.1_T2.8"
+ },
+ {
+ "section": "11.8.2",
+ "description": "Type(Primitive(x)) is different from Type(Primitive(y)) and both types vary between Boolean (primitive or object) and Null",
+ "test": "//CHECK#1\nif (true > null !== true) {\n $ERROR('#1: true > null === true');\n}\n\n//CHECK#2\nif (null > true !== false) {\n $ERROR('#2: null > true === false');\n}\n\n//CHECK#3\nif (new Boolean(true) > null !== true) {\n $ERROR('#3: new Boolean(true) > null === true');\n}\n\n//CHECK#4\nif (null > new Boolean(true) !== false) {\n $ERROR('#4: null > new Boolean(true) === false');\n}\n",
+ "id": "S11.8.2_A3.1_T2.9"
+ },
+ {
+ "section": "11.8.2",
+ "description": "Type(Primitive(x)) and Type(Primitive(y)) vary between primitive string and String object",
+ "test": "//CHECK#1\nif (\"1\" > \"1\" !== false) {\n $ERROR('#1: \"1\" > \"1\" === false');\n}\n\n//CHECK#2\nif (new String(\"1\") > \"1\" !== false) {\n $ERROR('#2: new String(\"1\") > \"1\" === false');\n}\n\n//CHECK#3\nif (\"1\" > new String(\"1\") !== false) {\n $ERROR('#3: \"1\" > new String(\"1\") === false');\n}\n\n//CHECK#4\nif (new String(\"1\") > new String(\"1\") !== false) {\n $ERROR('#4: new String(\"1\") > new String(\"1\") === false');\n}\n\n//CHECK#5\nif (\"x\" > \"1\" !== true) {\n $ERROR('#5: \"x\" > \"1\" === true');\n}\n\n//CHECK#6\nif (\"1\" > \"x\" !== false) {\n $ERROR('#6: \"1\" > \"x\" === false');\n}\n",
+ "id": "S11.8.2_A3.2_T1.1"
+ },
+ {
+ "section": "11.8.2",
+ "description": "Type(Primitive(x)) and Type(Primitive(y)) vary between Object object and Function object",
+ "test": "//CHECK#1\nif (({} > function(){return 1}) !== ({}.toString() > function(){return 1}.toString())) {\n $ERROR('#1: ({} > function(){return 1}) === ({}.toString() > function(){return 1}.toString())');\n}\n\n//CHECK#2\nif ((function(){return 1} > {}) !== (function(){return 1}.toString() > {}.toString())) {\n $ERROR('#2: (function(){return 1} > {}) === (function(){return 1}.toString() > {}.toString())');\n}\n\n//CHECK#3\nif ((function(){return 1} > function(){return 1}) !== (function(){return 1}.toString() > function(){return 1}.toString())) {\n $ERROR('#3: (function(){return 1} > function(){return 1}) === (function(){return 1}.toString() > function(){return 1}.toString())');\n}\n\n//CHECK#4\nif (({} > {}) !== ({}.toString() > {}.toString())) {\n $ERROR('#4: ({} > {}) === ({}.toString() > {}.toString())');\n}\n",
+ "id": "S11.8.2_A3.2_T1.2"
+ },
+ {
+ "section": "11.8.2, 11.8.5",
+ "description": "y is number primitive",
+ "test": "//CHECK#1\nif ((Number.NaN > 0) !== false) {\n $ERROR('#1: (NaN > 0) === false');\n}\n\n//CHECK#2\nif ((Number.NaN > 1.1) !== false) {\n $ERROR('#2: (NaN > 1.1) === false');\n}\n\n//CHECK#3\nif ((Number.NaN > -1.1) !== false) {\n $ERROR('#3: (NaN > -1.1) === false');\n}\n\n//CHECK#4\nif ((Number.NaN > Number.NaN) !== false) {\n $ERROR('#4: (NaN > NaN) === false');\n}\n\n//CHECK#5\nif ((Number.NaN > Number.POSITIVE_INFINITY) !== false) {\n $ERROR('#5: (NaN > +Infinity) === false');\n}\n\n//CHECK#6\nif ((Number.NaN > Number.NEGATIVE_INFINITY) !== false) {\n $ERROR('#6: (NaN > -Infinity) === false');\n}\n\n//CHECK#7\nif ((Number.NaN > Number.MAX_VALUE) !== false) {\n $ERROR('#7: (NaN > Number.MAX_VALUE) === false');\n}\n\n//CHECK#8\nif ((Number.NaN > Number.MIN_VALUE) !== false) {\n $ERROR('#8: (NaN > Number.MIN_VALUE) === false');\n}\n\n",
+ "id": "S11.8.2_A4.1"
+ },
+ {
+ "section": "11.8.2, 11.8.5",
+ "description": "x and y are string primitives",
+ "test": "//CHECK#1\nif ((\"x\" > \"x\") !== false) {\n $ERROR('#1: (\"x\" > \"x\") === false');\n}\n\n//CHECK#2\nif ((\"\" > \"x\") !== false) {\n $ERROR('#2: (\"\" > \"x\") === false');\n}\n\n//CHECK#3\nif ((\"ab\" > \"abcd\") !== false) {\n $ERROR('#3: (\"ab\" > abcd\") === false');\n}\n\n//CHECK#4\nif ((\"abcd\" > \"abc\\u0064\") !== false) {\n $ERROR('#4: (\"abcd\" > abc\\\\u0064\") === false');\n}\n\n//CHECK#5\nif ((\"x\" > \"x\" + \"y\") !== false) {\n $ERROR('#5: (\"x\" > \"x\" + \"y\") === false');\n}\n\n//CHECK#6\nvar x = \"x\";\nif ((x > x + \"y\") !== false) {\n $ERROR('#6: var x = \"x\"; (x > x + \"y\") === false');\n}\n",
+ "id": "S11.8.2_A4.10"
+ },
+ {
+ "section": "11.8.2, 11.8.5",
+ "description": "x and y are string primitives",
+ "test": "//CHECK#1\nif ((\"x \" > \"x\") !== true) {\n $ERROR('#1: (\"x \" > \"x\") === true');\n}\n\n//CHECK#2\nif ((\"x\" > \"\") !== true) {\n $ERROR('#2: (\"x\" > \"\") === true');\n}\n\n//CHECK#3\nif ((\"abcd\" > \"ab\") !== true) {\n $ERROR('#3: (\"abcd\" > ab\") === true');\n}\n\n//CHECK#4\nif ((\"abc\\u0064\" > \"abcd\") !== false) {\n $ERROR('#4: (\"abc\\\\u0064\" > abc\") === false');\n}\n\n//CHECK#5\nif ((\"x\" + \"y\" > \"x\") !== true) {\n $ERROR('#5: (\"x\" + \"y\" > \"x\") === true');\n}\n\n//CHECK#6\nvar x = \"x\";\nif ((x + 'y' > x) !== true) {\n $ERROR('#6: var x = \"x\"; (x + \"y\" > x) === true');\n}\n\n//CHECK#7\nif ((\"a\\u0000a\" > \"a\\u0000\") !== true) {\n $ERROR('#7: (\"a\\\\u0000a\" > \"a\\\\u0000\") === true');\n}\n\n//CHECK#8\nif ((\" x\" > \"x\") !== false) {\n $ERROR('#8: (\" x\" > \"x\") === false');\n}\n\n",
+ "id": "S11.8.2_A4.11"
+ },
+ {
+ "section": "11.8.2, 11.8.5",
+ "description": "x and y are string primitives",
+ "test": "//CHECK#1\nif ((\"xy\" > \"xx\") !== true) {\n $ERROR('#1: (\"xy\" > \"xx\") === true');\n}\n\n//CHECK#2\nif ((\"xx\" > \"xy\") !== false) {\n $ERROR('#2: (\"xx\" > \"xy\") === false');\n}\n\n//CHECK#3\nif ((\"y\" > \"x\") !== true) {\n $ERROR('#3: (\"y\" > \"x\") === true');\n}\n\n//CHECK#4\nif ((\"aba\" > \"aab\") !== true) {\n $ERROR('#4: (\"aba\" > aab\") === true');\n}\n\n//CHECK#5\nif ((\"\\u0061\\u0061\\u0061\\u0061\" > \"\\u0061\\u0061\\u0061\\u0062\") !== false) {\n $ERROR('#5: (\"\\\\u0061\\\\u0061\\\\u0061\\\\u0061\" > \\\\u0061\\\\u0061\\\\u0061\\\\u0062\") === false');\n}\n\n//CHECK#6\nif ((\"a\\u0000b\" > \"a\\u0000a\") !== true) {\n $ERROR('#6: (\"a\\\\u0000b\" > \"a\\\\u0000a\") === true');\n}\n\n//CHECK#7\nif ((\"aa\" > \"aB\") !== true) {\n $ERROR('#7: (\"aa\" > aB\") === true');\n}\n",
+ "id": "S11.8.2_A4.12_T1"
+ },
+ {
+ "section": "11.8.2, 11.8.5",
+ "description": "x and y are string primitives",
+ "test": "//CHECK#1\nif ((\"x\" > \"0\") !== true) {\n $ERROR('#1: (\"x\" > \"0\") !== true');\n}\n\n//CHECK#2\nif ((\"0\" > \"-\") !== true) {\n $ERROR('#2: (\"0\" > \"-\") !== true');\n}\n\n//CHECK#3\nif ((\"0\" > \".\") !== true) {\n $ERROR('#3: (\"0\" > \".\") !== true');\n}\n\n//CHECK#4\nif ((\"-\" > \"+\") !== true) {\n $ERROR('#4: (\"-\" > \"+\") !== true');\n}\n\n//CHECK#5\nif ((\"-1\" > \"-0\") !== true) {\n $ERROR('#5: (\"-1\" > \"-0\") !== true');\n}\n\n//CHECK#6\nif ((\"-1\" > \"+1\") !== true) {\n $ERROR('#6: (\"-1\" > \"+1\") !== true');\n}\n\n//CHECK#7\nif ((\"1e-10\" > \"1\") !== true) {\n$ERROR('#7: (\"1e-10\" > \"1\") !== true');\n}\n",
+ "id": "S11.8.2_A4.12_T2"
+ },
+ {
+ "section": "11.8.2, 11.8.5",
+ "description": "x is number primitive",
+ "test": "//CHECK#1\nif ((0 > Number.NaN) !== false) {\n $ERROR('#1: (0 > NaN) === false');\n}\n\n//CHECK#2\nif ((1.1 > Number.NaN) !== false) {\n $ERROR('#2: (1.1 > NaN) === false');\n}\n\n//CHECK#3\nif ((-1.1 > Number.NaN) !== false) {\n $ERROR('#3: (-1.1 > NaN) === false');\n}\n\n//CHECK#4\nif ((Number.NaN > Number.NaN) !== false) {\n $ERROR('#4: (NaN > NaN) === false');\n}\n\n//CHECK#5\nif ((Number.POSITIVE_INFINITY > Number.NaN) !== false) {\n $ERROR('#5: (+Infinity > NaN) === false');\n}\n\n//CHECK#6\nif ((Number.NEGATIVE_INFINITY > Number.NaN) !== false) {\n $ERROR('#6: (-Infinity > NaN) === false');\n}\n\n//CHECK#7\nif ((Number.MAX_VALUE > Number.NaN) !== false) {\n $ERROR('#7: (Number.MAX_VALUE > NaN) === false');\n}\n\n//CHECK#8\nif ((Number.MIN_VALUE > Number.NaN) !== false) {\n $ERROR('#8: (Number.MIN_VALUE > NaN) === false');\n}\n\n",
+ "id": "S11.8.2_A4.2"
+ },
+ {
+ "section": "11.8.2, 11.8.5",
+ "description": "x and y are number primitives",
+ "test": "//CHECK#1\nif ((1 > 1) !== false) {\n $ERROR('#1: (1 > 1) === false');\n}\n\n//CHECK#2\nif ((1.1 > 1.1) !== false) {\n $ERROR('#2: (1.1 > 1.1) === false');\n}\n\n//CHECK#3\nif ((-1.1 > -1.1) !== false) {\n $ERROR('#3: (-1.1 > -1.1) === false');\n}\n\n//CHECK#4\nif ((Number.NEGATIVE_INFINITY > Number.NEGATIVE_INFINITY) !== false) {\n $ERROR('#4: (-Infinity > -Infinity) === false');\n}\n\n//CHECK#5\nif ((Number.POSITIVE_INFINITY > Number.POSITIVE_INFINITY) !== false) {\n $ERROR('#5: (+Infinity > +Infinity) === false');\n}\n\n//CHECK#6\nif ((Number.MAX_VALUE > Number.MAX_VALUE) !== false) {\n $ERROR('#6: (Number.MAX_VALUE > Number.MAX_VALUE) === false');\n}\n\n//CHECK#7\nif ((Number.MIN_VALUE > Number.MIN_VALUE) !== false) {\n $ERROR('#7: (Number.MIN_VALUE > Number.MIN_VALUE) === false');\n}\n\n\n",
+ "id": "S11.8.2_A4.3"
+ },
+ {
+ "section": "11.8.2, 11.8.5",
+ "description": "Checking all combinations",
+ "test": "//CHECK#1\nif ((0 > 0) !== false) {\n $ERROR('#1: (0 > 0) === false');\n}\n\n//CHECK#2\nif ((-0 > -0) !== false) {\n $ERROR('#2: (-0 > -0) === false');\n}\n\n//CHECK#3\nif ((+0 > -0) !== false) {\n $ERROR('#3: (+0 > -0) === false');\n}\n\n//CHECK#4\nif ((-0 > +0) !== false) {\n $ERROR('#4: (-0 > +0) === false');\n}\n\n",
+ "id": "S11.8.2_A4.4"
+ },
+ {
+ "section": "11.8.2, 11.8.5",
+ "description": "y is number primitive",
+ "test": "//CHECK#1\nif ((Number.POSITIVE_INFINITY > 0) !== true) {\n $ERROR('#1: (+Infinity > 0) === true');\n}\n\n//CHECK#2\nif ((Number.POSITIVE_INFINITY > 1.1) !== true) {\n $ERROR('#2: (+Infinity > 1.1) === true');\n}\n\n//CHECK#3\nif ((Number.POSITIVE_INFINITY > -1.1) !== true) {\n $ERROR('#3: (+Infinity > -1.1) === true');\n}\n\n//CHECK#4\nif ((Number.POSITIVE_INFINITY > Number.NEGATIVE_INFINITY) !== true) {\n $ERROR('#4: (+Infinity > -Infinity) === true');\n}\n\n//CHECK#5\nif ((Number.POSITIVE_INFINITY > Number.MAX_VALUE) !== true) {\n $ERROR('#5: (+Infinity > Number.MAX_VALUE) === true');\n}\n\n//CHECK#6\nif ((Number.POSITIVE_INFINITY > Number.MIN_VALUE) !== true) {\n $ERROR('#6: (+Infinity > Number.MIN_VALUE) === true');\n}\n\n",
+ "id": "S11.8.2_A4.5"
+ },
+ {
+ "section": "11.8.2, 11.8.5",
+ "description": "x is number primitive",
+ "test": "//CHECK#1\nif ((0 > Number.POSITIVE_INFINITY) !== false) {\n $ERROR('#1: (0 > +Infinity) === false');\n}\n\n//CHECK#2\nif ((1.1 > Number.POSITIVE_INFINITY) !== false) {\n $ERROR('#2: (1.1 > +Infinity) === false');\n}\n\n//CHECK#3\nif ((-1.1 > Number.POSITIVE_INFINITY) !== false) {\n $ERROR('#3: (-1.1 > +Infinity) === false');\n}\n\n//CHECK#4\nif ((Number.NEGATIVE_INFINITY > Number.POSITIVE_INFINITY) !== false) {\n $ERROR('#4: (-Infinity > +Infinity) === false');\n}\n\n//CHECK#5\nif ((Number.MAX_VALUE > Number.POSITIVE_INFINITY) !== false) {\n $ERROR('#5: (Number.MAX_VALUE > +Infinity) === false');\n}\n\n//CHECK#6\nif ((Number.MIN_VALUE > Number.POSITIVE_INFINITY) !== false) {\n $ERROR('#6: (Number.MIN_VALUE > +Infinity) === false');\n}\n\n",
+ "id": "S11.8.2_A4.6"
+ },
+ {
+ "section": "11.8.2, 11.8.5",
+ "description": "y is number primitive",
+ "test": "//CHECK#1\nif ((Number.NEGATIVE_INFINITY > 0) !== false) {\n $ERROR('#1: (-Infinity > 0) === false');\n}\n\n//CHECK#2\nif ((Number.NEGATIVE_INFINITY > 1.1) !== false) {\n $ERROR('#2: (-Infinity > 1.1) === false');\n}\n\n//CHECK#3\nif ((Number.NEGATIVE_INFINITY > -1.1) !== false) {\n $ERROR('#3: (-Infinity > -1.1) === false');\n}\n\n//CHECK#4\nif ((Number.NEGATIVE_INFINITY > Number.POSITIVE_INFINITY) !== false) {\n $ERROR('#4: (-Infinity > +Infinity) === false');\n}\n\n//CHECK#5\nif ((Number.NEGATIVE_INFINITY > Number.MAX_VALUE) !== false) {\n $ERROR('#5: (-Infinity > Number.MAX_VALUE) === false');\n}\n\n//CHECK#6\nif ((Number.NEGATIVE_INFINITY > Number.MIN_VALUE) !== false) {\n $ERROR('#6: (-Infinity > Number.MIN_VALUE) === false');\n}\n\n",
+ "id": "S11.8.2_A4.7"
+ },
+ {
+ "section": "11.8.2, 11.8.5",
+ "description": "x is number primitive",
+ "test": "//CHECK#1\nif ((0 > Number.NEGATIVE_INFINITY) !== true) {\n $ERROR('#1: (0 > -Infinity) === true');\n}\n\n//CHECK#2\nif ((1.1 > Number.NEGATIVE_INFINITY) !== true) {\n $ERROR('#2: (1.1 > -Infinity) === true');\n}\n\n//CHECK#3\nif ((-1.1 > Number.NEGATIVE_INFINITY) !== true) {\n $ERROR('#3: (-1.1 > -Infinity) === true');\n}\n\n//CHECK#4\nif ((Number.POSITIVE_INFINITY > Number.NEGATIVE_INFINITY) !== true) {\n $ERROR('#4: (+Infinity > -Infinity) === true');\n}\n\n//CHECK#5\nif ((Number.MAX_VALUE > Number.NEGATIVE_INFINITY) !== true) {\n $ERROR('#5: (Number.MAX_VALUE > -Infinity) === true');\n}\n\n//CHECK#6\nif ((Number.MIN_VALUE > Number.NEGATIVE_INFINITY) !== true) {\n $ERROR('#6: (Number.MIN_VALUE > -Infinity) === true');\n}\n\n",
+ "id": "S11.8.2_A4.8"
+ },
+ {
+ "section": "11.8.2, 11.8.5",
+ "description": "x and y are number primitives",
+ "test": "//CHECK#1\nif ((1 > 1.1) !== false) {\n $ERROR('#1: (1 > 1.1) === false');\n}\n\n//CHECK#2\nif ((1.1 > 1) !== true) {\n $ERROR('#2: (1.1 > 1) === true');\n}\n\n//CHECK#3\nif ((-1 > -1.1) !== true) {\n $ERROR('#3: (-1 > -1.1) === true');\n}\n\n//CHECK#4\nif ((-1.1 > -1) !== false) {\n $ERROR('#4: (-1.1 > -1) === false');\n}\n\n//CHECK#5\nif ((0.1 > 0) !== true) {\n $ERROR('#5: (0.1 > 0) === true');\n}\n\n//CHECK#6\nif ((0 > -0.1) !== true) {\n $ERROR('#6: (0 > -0.1) === true');\n}\n\n//CHECK#7\nif ((Number.MAX_VALUE > Number.MAX_VALUE/2) !== true) {\n $ERROR('#7: (Number.MAX_VALUE > Number.MAX_VALUE/2) === true');\n}\n\n//CHECK#8\nif ((Number.MIN_VALUE*2 > Number.MIN_VALUE) !== true) {\n $ERROR('#8: (Number.MIN_VALUE*2 > Number.MIN_VALUE) === true');\n}\n\n\n",
+ "id": "S11.8.2_A4.9"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/11.8.3.json b/website/resources/scripts/testcases2/11.8.3.json
new file mode 100644
index 000000000..880ca93a6
--- /dev/null
+++ b/website/resources/scripts/testcases2/11.8.3.json
@@ -0,0 +1,38 @@
+{
+ "testCollection": {
+ "name": "11.8.3",
+ "numTests": 5,
+ "tests": [
+ {
+ "id": "11.8.3-1",
+ "path": "TestCases/chapter11/11.8/11.8.3/11.8.3-1.js",
+ "description": "11.8.3 Less-than-or-equal Operator - Partial left to right order enforced when using Less-than-or-equal operator: valueOf <= valueOf",
+ "test": "assertTrue((function testcase() {\n var accessed = false;\n var obj1 = {\n valueOf: function () {\n accessed = true;\n return 3;\n }\n };\n var obj2 = {\n valueOf: function () {\n if (accessed === true) {\n return 4;\n } else {\n return 2;\n }\n }\n };\n return (obj1 <= obj2);\n }).call(this));\n"
+ },
+ {
+ "id": "11.8.3-2",
+ "path": "TestCases/chapter11/11.8/11.8.3/11.8.3-2.js",
+ "description": "11.8.3 Less-than-or-equal Operator - Partial left to right order enforced when using Less-than-or-equal operator: valueOf <= toString",
+ "test": "assertTrue((function testcase() {\n var accessed = false;\n var obj1 = {\n valueOf: function () {\n accessed = true;\n return 3;\n }\n };\n var obj2 = {\n toString: function () {\n if (accessed === true) {\n return 4;\n } else {\n return 2;\n }\n }\n };\n return (obj1 <= obj2);\n }).call(this));\n"
+ },
+ {
+ "id": "11.8.3-3",
+ "path": "TestCases/chapter11/11.8/11.8.3/11.8.3-3.js",
+ "description": "11.8.3 Less-than-or-equal Operator - Partial left to right order enforced when using Less-than-or-equal operator: toString <= valueOf",
+ "test": "assertTrue((function testcase() {\n var accessed = false;\n var obj1 = {\n toString: function () {\n accessed = true;\n return 3;\n }\n };\n var obj2 = {\n valueOf: function () {\n if (accessed === true) {\n return 4;\n } else {\n return 2;\n }\n }\n };\n return (obj1 <= obj2);\n }).call(this));\n"
+ },
+ {
+ "id": "11.8.3-4",
+ "path": "TestCases/chapter11/11.8/11.8.3/11.8.3-4.js",
+ "description": "11.8.3 Less-than-or-equal Operator - Partial left to right order enforced when using Less-than-or-equal operator: toString <= toString",
+ "test": "assertTrue((function testcase() {\n var accessed = false;\n var obj1 = {\n toString: function () {\n accessed = true;\n return 3;\n }\n };\n var obj2 = {\n toString: function () {\n if (accessed === true) {\n return 4;\n } else {\n return 2;\n }\n }\n };\n return (obj1 <= obj2);\n }).call(this));\n"
+ },
+ {
+ "id": "11.8.3-5",
+ "path": "TestCases/chapter11/11.8/11.8.3/11.8.3-5.js",
+ "description": "11.8.3 Less-than-or-equal Operator - Partial left to right order enforced when using Less-than-or-equal operator: valueOf <= valueOf",
+ "test": "assertTrue((function testcase() {\n var accessed = false;\n var obj1 = {\n valueOf: function () {\n accessed = true;\n return 3;\n }\n };\n var obj2 = {\n valueOf: function () {\n if (accessed === true) {\n return 3;\n } else {\n return 2;\n }\n }\n };\n return (obj1 <= obj2);\n }).call(this));\n"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/11.8.3_The_Less_than_or_equal_Operator.json b/website/resources/scripts/testcases2/11.8.3_The_Less_than_or_equal_Operator.json
new file mode 100644
index 000000000..0b41a9e4b
--- /dev/null
+++ b/website/resources/scripts/testcases2/11.8.3_The_Less_than_or_equal_Operator.json
@@ -0,0 +1,224 @@
+{
+ "testCollection": {
+ "name": "11.8.3_The_Less_than_or_equal_Operator",
+ "numTests": 36,
+ "tests": [
+ {
+ "section": "11.8.3, 7.2, 7.3",
+ "description": "Checking by using eval",
+ "test": "//CHECK#1\nif (eval(\"1\\u0009<=\\u00091\") !== true) {\n $ERROR('#1: (1\\\\u0009<=\\\\u00091) === true');\n}\n\n//CHECK#2\nif (eval(\"1\\u000B<=\\u000B1\") !== true) {\n $ERROR('#2: (1\\\\u000B<=\\\\u000B1) === true'); \n}\n\n//CHECK#3\nif (eval(\"1\\u000C<=\\u000C1\") !== true) {\n $ERROR('#3: (1\\\\u000C<=\\\\u000C1) === true');\n}\n\n//CHECK#4\nif (eval(\"1\\u0020<=\\u00201\") !== true) {\n $ERROR('#4: (1\\\\u0020<=\\\\u00201) === true');\n}\n\n//CHECK#5\nif (eval(\"1\\u00A0<=\\u00A01\") !== true) {\n $ERROR('#5: (1\\\\u00A0<=\\\\u00A01) === true');\n}\n\n//CHECK#6\nif (eval(\"1\\u000A<=\\u000A1\") !== true) {\n $ERROR('#6: (1\\\\u000A<=\\\\u000A1) === true'); \n}\n\n//CHECK#7\nif (eval(\"1\\u000D<=\\u000D1\") !== true) {\n $ERROR('#7: (1\\\\u000D<=\\\\u000D1) === true');\n}\n\n//CHECK#8\nif (eval(\"1\\u2028<=\\u20281\") !== true) {\n $ERROR('#8: (1\\\\u2028<=\\\\u20281) === true');\n}\n\n//CHECK#9\nif (eval(\"1\\u2029<=\\u20291\") !== true) {\n $ERROR('#9: (1\\\\u2029<=\\\\u20291) === true');\n}\n\n//CHECK#10\nif (eval(\"1\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u2029>\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u20290\") !== true) {\n $ERROR('#10: (1\\\\u0009\\\\u000B\\\\u000C\\\\u0020\\\\u00A0\\\\u000A\\\\u000D\\\\u2028\\\\u2029>\\\\u0009\\\\u000B\\\\u000C\\\\u0020\\\\u00A0\\\\u000A\\\\u000D\\\\u2028\\\\u20290) === true');\n}\n",
+ "id": "S11.8.3_A1"
+ },
+ {
+ "section": "11.8.3, 11.8.5",
+ "description": "Either Type is not Reference or GetBase is not null",
+ "test": "//CHECK#1\nif (1 <= 1 !== true) {\n $ERROR('#1: 1 <= 1 === true');\n}\n\n//CHECK#2\nvar x = 1;\nif (x <= 1 !== true) {\n $ERROR('#2: var x = 1; x <= 1 === true');\n}\n\n//CHECK#3\nvar y = 1;\nif (1 <= y !== true) {\n $ERROR('#3: var y = 1; 1 <= y === true');\n}\n\n//CHECK#4\nvar x = 1;\nvar y = 1;\nif (x <= y !== true) {\n $ERROR('#4: var x = 1; var y = 1; x <= y === true');\n}\n\n//CHECK#5\nvar objectx = new Object();\nvar objecty = new Object();\nobjectx.prop = 1;\nobjecty.prop = 1;\nif (objectx.prop <= objecty.prop !== true) {\n $ERROR('#5: var objectx = new Object(); var objecty = new Object(); objectx.prop = 1; objecty.prop = 1; objectx.prop <= objecty.prop === true');\n}\n",
+ "id": "S11.8.3_A2.1_T1"
+ },
+ {
+ "section": "11.8.3, 11.8.5",
+ "description": "If GetBase(x) is null, throw ReferenceError",
+ "test": "//CHECK#1\ntry {\n x <= 1;\n $ERROR('#1.1: x <= 1 throw ReferenceError. Actual: ' + (x <= 1)); \n}\ncatch (e) {\n if ((e instanceof ReferenceError) !== true) {\n $ERROR('#1.2: x <= 1 throw ReferenceError. Actual: ' + (e)); \n }\n}\n",
+ "id": "S11.8.3_A2.1_T2"
+ },
+ {
+ "section": "11.8.3, 11.8.5",
+ "description": "If GetBase(y) is null, throw ReferenceError",
+ "test": "//CHECK#1\ntry {\n 1 <= y;\n $ERROR('#1.1: 1 <= y throw ReferenceError. Actual: ' + (1 <= y)); \n}\ncatch (e) {\n if ((e instanceof ReferenceError) !== true) {\n $ERROR('#1.2: 1 <= y throw ReferenceError. Actual: ' + (e)); \n }\n}\n\n",
+ "id": "S11.8.3_A2.1_T3"
+ },
+ {
+ "section": "11.8.3, 8.6.2.6",
+ "description": "If Type(value) is Object, evaluate ToPrimitive(value, Number)",
+ "test": "//CHECK#1\nif ({valueOf: function() {return 0}} <= 1 !== true) {\n $ERROR('#1: {valueOf: function() {return 1}} <= 1 === true. Actual: ' + ({valueOf: function() {return 1}} <= 1));\n}\n\n//CHECK#2\nif ({valueOf: function() {return 0}, toString: function() {return 2}} <= 1 !== true) {\n $ERROR('#2: {valueOf: function() {return 1}, toString: function() {return 0}} <= 1 === true. Actual: ' + ({valueOf: function() {return 1}, toString: function() {return 0}} <= 1));\n}\n\n//CHECK#3\nif ({valueOf: function() {return 0}, toString: function() {return {}}} <= 1 !== true) {\n $ERROR('#3: {valueOf: function() {return 1}, toString: function() {return {}}} <= 1 === true. Actual: ' + ({valueOf: function() {return 1}, toString: function() {return {}}} <= 1));\n}\n\n//CHECK#4\ntry {\n if ({valueOf: function() {return 0}, toString: function() {throw \"error\"}} <= 1 !== true) {\n $ERROR('#4.1: {valueOf: function() {return 1}, toString: function() {throw \"error\"}} <= 1 === true. Actual: ' + ({valueOf: function() {return 1}, toString: function() {throw \"error\"}} <= 1));\n }\n}\ncatch (e) {\n if (e === \"error\") {\n $ERROR('#4.2: {valueOf: function() {return 0}, toString: function() {throw \"error\"}} <= 1 not throw \"error\"');\n } else {\n $ERROR('#4.3: {valueOf: function() {return 0}, toString: function() {throw \"error\"}} <= 1 not throw Error. Actual: ' + (e));\n }\n}\n\n//CHECK#5\nif (1 <= {toString: function() {return 2}} !== true) {\n $ERROR('#5: 1 <= {toString: function() {return 2}} === true. Actual: ' + (1 <= {toString: function() {return 2}}));\n}\n\n//CHECK#6\nif (1 <= {valueOf: function() {return {}}, toString: function() {return 2}} !== true) {\n $ERROR('#6: 1 <= {valueOf: function() {return {}}, toString: function() {return 2}} === true. Actual: ' + (1 <= {valueOf: function() {return {}}, toString: function() {return 2}}));\n}\n\n//CHECK#7\ntry {\n 1 <= {valueOf: function() {throw \"error\"}, toString: function() {return 2}};\n $ERROR('#7.1: 1 <= {valueOf: function() {throw \"error\"}, toString: function() {return 2}} throw \"error\". Actual: ' + (1 <= {valueOf: function() {throw \"error\"}, toString: function() {return 2}}));\n} \ncatch (e) {\n if (e !== \"error\") {\n $ERROR('#7.2: 1 <= {valueOf: function() {throw \"error\"}, toString: function() {return 2}} throw \"error\". Actual: ' + (e));\n } \n}\n\n//CHECK#8\ntry {\n 1 <= {valueOf: function() {return {}}, toString: function() {return {}}};\n $ERROR('#8.1: 1 <= {valueOf: function() {return {}}, toString: function() {return {}}} throw TypeError. Actual: ' + (1 <= {valueOf: function() {return {}}, toString: function() {return {}}}));\n} \ncatch (e) {\n if ((e instanceof TypeError) !== true) {\n $ERROR('#8.2: 1 <= {valueOf: function() {return {}}, toString: function() {return {}}} throw TypeError. Actual: ' + (e));\n } \n}\n",
+ "id": "S11.8.3_A2.2_T1"
+ },
+ {
+ "section": "11.8.3",
+ "description": "Checking with \"throw\"",
+ "test": "//CHECK#1\nvar x = { valueOf: function () { throw \"x\"; } };\nvar y = { valueOf: function () { throw \"y\"; } };\ntry {\n x <= y;\n $ERROR('#1.1: var x = { valueOf: function () { throw \"x\"; } }; var y = { valueOf: function () { throw \"y\"; } }; x <= y throw \"y\". Actual: ' + (x <= y));\n} catch (e) {\n if (e === \"x\") {\n $ERROR('#1.2: ToNumber(second expression) is called first, and then ToNumber(first expression)');\n } else {\n if (e !== \"y\") {\n $ERROR('#1.3: var x = { valueOf: function () { throw \"x\"; } }; var y = { valueOf: function () { throw \"y\"; } }; x <= y throw \"y\". Actual: ' + (e));\n }\n }\n}\n",
+ "id": "S11.8.3_A2.3_T1"
+ },
+ {
+ "section": "11.8.3",
+ "description": "Checking with \"=\"",
+ "test": "//CHECK#1\nvar x = 0; \nif ((x = 1) <= x !== true) {\n $ERROR('#1: var x = 0; (x = 1) <= x === true');\n}\n\n//CHECK#2\nvar x = 1; \nif (x <= (x = 0) !== false) {\n $ERROR('#2: var x = 1; x <= (x = 0) === false');\n}\n\n",
+ "id": "S11.8.3_A2.4_T1"
+ },
+ {
+ "section": "11.8.3",
+ "description": "Checking with \"throw\"",
+ "test": "//CHECK#1\nvar x = function () { throw \"x\"; };\nvar y = function () { throw \"y\"; };\ntry {\n x() <= y();\n $ERROR('#1.1: var x = function () { throw \"x\"; }; var y = function () { throw \"y\"; }; x() <= y() throw \"x\". Actual: ' + (x() <= y()));\n} catch (e) {\n if (e === \"y\") {\n $ERROR('#1.2: First expression is evaluated first, and then second expression');\n } else {\n if (e !== \"x\") {\n $ERROR('#1.3: var x = function () { throw \"x\"; }; var y = function () { throw \"y\"; }; x() <= y() throw \"x\". Actual: ' + (e));\n }\n }\n}\n",
+ "id": "S11.8.3_A2.4_T2"
+ },
+ {
+ "section": "11.8.3",
+ "description": "Checking with undeclarated variables",
+ "test": "//CHECK#1\ntry {\n x <= (x = 1);\n $ERROR('#1.1: x <= (x = 1) throw ReferenceError. Actual: ' + (x <= (x = 1))); \n}\ncatch (e) {\n if ((e instanceof ReferenceError) !== true) {\n $ERROR('#1.2: x <= (x = 1) throw ReferenceError. Actual: ' + (e)); \n }\n}\n\n//CHECK#2\nif ((y = 1) <= y !== true) {\n $ERROR('#2: (y = 1) <= y === true');\n}\n\n",
+ "id": "S11.8.3_A2.4_T3"
+ },
+ {
+ "section": "11.8.3",
+ "description": "Type(Primitive(x)) and Type(Primitive(y)) vary between primitive boolean and Boolean object",
+ "test": "//CHECK#1\nif (true <= true !== true) {\n $ERROR('#1: true <= true === true');\n}\n\n//CHECK#2\nif (new Boolean(true) <= true !== true) {\n $ERROR('#2: new Boolean(true) <= true === true');\n}\n\n//CHECK#3\nif (true <= new Boolean(true) !== true) {\n $ERROR('#3: true <= new Boolean(true) === true');\n}\n\n//CHECK#4\nif (new Boolean(true) <= new Boolean(true) !== true) {\n $ERROR('#4: new Boolean(true) <= new Boolean(true) === true');\n}\n",
+ "id": "S11.8.3_A3.1_T1.1"
+ },
+ {
+ "section": "11.8.3",
+ "description": "Type(Primitive(x)) and Type(Primitive(y)) vary between primitive number and Number object",
+ "test": "//CHECK#1\nif (1 <= 1 !== true) {\n $ERROR('#1: 1 <= 1 === true');\n}\n\n//CHECK#2\nif (new Number(1) <= 1 !== true) {\n $ERROR('#2: new Number(1) <= 1 === true');\n}\n\n//CHECK#3\nif (1 <= new Number(1) !== true) {\n $ERROR('#3: 1 <= new Number(1) === true');\n}\n\n//CHECK#4\nif (new Number(1) <= new Number(1) !== true) {\n $ERROR('#4: new Number(1) <= new Number(1) === true');\n}\n\n",
+ "id": "S11.8.3_A3.1_T1.2"
+ },
+ {
+ "section": "11.8.3",
+ "description": "Type(Primitive(x)) and Type(Primitive(y)) vary between Null and Undefined",
+ "test": "//CHECK#1\nif (null <= undefined !== false) {\n $ERROR('#1: null <= undefined === false');\n}\n\n//CHECK#2\nif (undefined <= null !== false) {\n $ERROR('#2: undefined <= null === false');\n}\n\n//CHECK#3\nif (undefined <= undefined !== false) {\n $ERROR('#3: undefined <= undefined === false');\n}\n\n//CHECK#4\nif (null <= null !== true) {\n $ERROR('#4: null <= null === true');\n}\n",
+ "id": "S11.8.3_A3.1_T1.3"
+ },
+ {
+ "section": "11.8.3",
+ "description": "Type(Primitive(x)) is different from Type(Primitive(y)) and both types vary between Number (primitive or object) and Boolean (primitive and object)",
+ "test": "//CHECK#1\nif (true <= 1 !== true) {\n $ERROR('#1: true <= 1 === true');\n}\n\n//CHECK#2\nif (1 <= true !== true) {\n $ERROR('#2: 1 <= true === true');\n}\n\n//CHECK#3\nif (new Boolean(true) <= 1 !== true) {\n $ERROR('#3: new Boolean(true) <= 1 === true');\n}\n\n//CHECK#4\nif (1 <= new Boolean(true) !== true) {\n $ERROR('#4: 1 <= new Boolean(true) === true');\n}\n\n//CHECK#5\nif (true <= new Number(1) !== true) {\n $ERROR('#5: true <= new Number(1) === true');\n}\n\n//CHECK#6\nif (new Number(1) <= true !== true) {\n $ERROR('#6: new Number(1) <= true === true');\n}\n\n//CHECK#7\nif (new Boolean(true) <= new Number(1) !== true) {\n $ERROR('#7: new Boolean(true) <= new Number(1) === true');\n}\n\n//CHECK#8\nif (new Number(1) <= new Boolean(true) !== true) {\n $ERROR('#8: new Number(1) <= new Boolean(true) === true');\n}\n",
+ "id": "S11.8.3_A3.1_T2.1"
+ },
+ {
+ "section": "11.8.3",
+ "description": "Type(Primitive(x)) is different from Type(Primitive(y)) and both types vary between Number (primitive or object) and String (primitive and object)",
+ "test": "//CHECK#1\nif (\"1\" <= 1 !== true) {\n $ERROR('#1: \"1\" <= 1 === true');\n}\n\n//CHECK#2\nif (1 <= \"1\" !== true) {\n $ERROR('#2: 1 <= \"1\" === true');\n}\n\n//CHECK#3\nif (new String(\"1\") <= 1 !== true) {\n $ERROR('#3: new String(\"1\") <= 1 === true');\n}\n\n//CHECK#4\nif (1 <= new String(\"1\") !== true) {\n $ERROR('#4: 1 <= new String(\"1\") === true');\n}\n\n//CHECK#5\nif (\"1\" <= new Number(1) !== true) {\n $ERROR('#5: \"1\" <= new Number(1) === true');\n}\n\n//CHECK#6\nif (new Number(1) <= \"1\" !== true) {\n $ERROR('#6: new Number(1) <= \"1\" === true');\n}\n\n//CHECK#7\nif (new String(\"1\") <= new Number(1) !== true) {\n $ERROR('#7: new String(\"1\") <= new Number(1) === true');\n}\n\n//CHECK#8\nif (new Number(1) <= new String(\"1\") !== true) {\n $ERROR('#8: new Number(1) <= new String(\"1\") === true');\n}\n\n//CHECK#9\nif (\"x\" <= 1 !== false) {\n $ERROR('#9: \"x\" <= 1 === false');\n}\n\n//CHECK#10\nif (1 <= \"x\" !== false) {\n $ERROR('#10: 1 <= \"x\" === false');\n}\n",
+ "id": "S11.8.3_A3.1_T2.2"
+ },
+ {
+ "section": "11.8.3",
+ "description": "Type(Primitive(x)) is different from Type(Primitive(y)) and both types vary between Number (primitive or object) and Null",
+ "test": "//CHECK#1\nif (1 <= null !== false) {\n $ERROR('#1: 1 <= null === false');\n}\n\n//CHECK#2\nif (null <= 1 !== true) {\n $ERROR('#2: null <= 1 === true');\n}\n\n//CHECK#3\nif (new Number(1) <= null !== false) {\n $ERROR('#3: new Number(1) <= null === false');\n}\n\n//CHECK#4\nif (null <= new Number(1) !== true) {\n $ERROR('#4: null <= new Number(1) === true');\n}\n",
+ "id": "S11.8.3_A3.1_T2.3"
+ },
+ {
+ "section": "11.8.3",
+ "description": "Type(Primitive(x)) is different from Type(Primitive(y)) and both types vary between Number (primitive or object) and Undefined",
+ "test": "//CHECK#1\nif (1 <= undefined !== false) {\n $ERROR('#1: 1 <= undefined === false');\n}\n\n//CHECK#2\nif (undefined <= 1 !== false) {\n $ERROR('#2: undefined <= 1 === false');\n}\n\n//CHECK#3\nif (new Number(1) <= undefined !== false) {\n $ERROR('#3: new Number(1) <= undefined === false');\n}\n\n//CHECK#4\nif (undefined <= new Number(1) !== false) {\n $ERROR('#4: undefined <= new Number(1) === false');\n}\n",
+ "id": "S11.8.3_A3.1_T2.4"
+ },
+ {
+ "section": "11.8.3",
+ "description": "Type(Primitive(x)) is different from Type(Primitive(y)) and both types vary between String (primitive or object) and Boolean (primitive and object)",
+ "test": "//CHECK#1\nif (true <= \"1\" !== true) {\n $ERROR('#1: true <= \"1\" === true');\n}\n\n//CHECK#2\nif (\"1\" <= true !== true) {\n $ERROR('#2: \"1\" <= true === true');\n}\n\n//CHECK#3\nif (new Boolean(true) <= \"1\" !== true) {\n $ERROR('#3: new Boolean(true) <= \"1\" === true');\n}\n\n//CHECK#4\nif (\"1\" <= new Boolean(true) !== true) {\n $ERROR('#4: \"1\" <= new Boolean(true) === true');\n}\n\n//CHECK#5\nif (true <= new String(\"1\") !== true) {\n $ERROR('#5: true <= new String(\"1\") === true');\n}\n\n//CHECK#6\nif (new String(\"1\") <= true !== true) {\n $ERROR('#6: new String(\"1\") <= true === true');\n}\n\n//CHECK#7\nif (new Boolean(true) <= new String(\"1\") !== true) {\n $ERROR('#7: new Boolean(true) <= new String(\"1\") === true');\n}\n\n//CHECK#8\nif (new String(\"1\") <= new Boolean(true) !== true) {\n $ERROR('#8: new String(\"1\") <= new Boolean(true) === true');\n}\n",
+ "id": "S11.8.3_A3.1_T2.5"
+ },
+ {
+ "section": "11.8.3",
+ "description": "Type(Primitive(x)) is different from Type(Primitive(y)) and both types vary between String (primitive or object) and Undefined",
+ "test": "//CHECK#1\nif (\"1\" <= undefined !== false) {\n $ERROR('#1: \"1\" <= undefined === false');\n}\n\n//CHECK#2\nif (undefined <= \"1\" !== false) {\n $ERROR('#2: undefined <= \"1\" === false');\n}\n\n//CHECK#3\nif (new String(\"1\") <= undefined !== false) {\n $ERROR('#3: new String(\"1\") <= undefined === false');\n}\n\n//CHECK#4\nif (undefined <= new String(\"1\") !== false) {\n $ERROR('#4: undefined <= new String(\"1\") === false');\n}\n",
+ "id": "S11.8.3_A3.1_T2.6"
+ },
+ {
+ "section": "11.8.3",
+ "description": "Type(Primitive(x)) is different from Type(Primitive(y)) and both types vary between String (primitive or object) and Null",
+ "test": "//CHECK#1\nif (\"1\" <= null !== false) {\n $ERROR('#1: \"1\" <= null === false');\n}\n\n//CHECK#2\nif (null <= \"1\" !== true) {\n $ERROR('#2: null <= \"1\" === true');\n}\n\n//CHECK#3\nif (new String(\"1\") <= null !== false) {\n $ERROR('#3: new String(\"1\") <= null === false');\n}\n\n//CHECK#4\nif (null <= new String(\"1\") !== true) {\n $ERROR('#4: null <= new String(\"1\") === true');\n}\n",
+ "id": "S11.8.3_A3.1_T2.7"
+ },
+ {
+ "section": "11.8.3",
+ "description": "Type(Primitive(x)) is different from Type(Primitive(y)) and both types vary between Boolean (primitive or object) and Undefined",
+ "test": "//CHECK#1\nif (true <= undefined !== false) {\n $ERROR('#1: true <= undefined === false');\n}\n\n//CHECK#2\nif (undefined <= true !== false) {\n $ERROR('#2: undefined <= true === false');\n}\n\n//CHECK#3\nif (new Boolean(true) <= undefined !== false) {\n $ERROR('#3: new Boolean(true) <= undefined === false');\n}\n\n//CHECK#4\nif (undefined <= new Boolean(true) !== false) {\n $ERROR('#4: undefined <= new Boolean(true) === false');\n}\n",
+ "id": "S11.8.3_A3.1_T2.8"
+ },
+ {
+ "section": "11.8.3",
+ "description": "Type(Primitive(x)) is different from Type(Primitive(y)) and both types vary between Boolean (primitive or object) and Null",
+ "test": "//CHECK#1\nif (true <= null !== false) {\n $ERROR('#1: true <= null === false');\n}\n\n//CHECK#2\nif (null <= true !== true) {\n $ERROR('#2: null <= true === true');\n}\n\n//CHECK#3\nif (new Boolean(true) <= null !== false) {\n $ERROR('#3: new Boolean(true) <= null === false');\n}\n\n//CHECK#4\nif (null <= new Boolean(true) !== true) {\n $ERROR('#4: null <= new Boolean(true) === true');\n}\n",
+ "id": "S11.8.3_A3.1_T2.9"
+ },
+ {
+ "section": "11.8.3",
+ "description": "Type(Primitive(x)) and Type(Primitive(y)) vary between primitive string and String object",
+ "test": "//CHECK#1\nif (\"1\" <= \"1\" !== true) {\n $ERROR('#1: \"1\" <= \"1\" === true');\n}\n\n//CHECK#2\nif (new String(\"1\") <= \"1\" !== true) {\n $ERROR('#2: new String(\"1\") <= \"1\" === true');\n}\n\n//CHECK#3\nif (\"1\" <= new String(\"1\") !== true) {\n $ERROR('#3: \"1\" <= new String(\"1\") === true');\n}\n\n//CHECK#4\nif (new String(\"1\") <= new String(\"1\") !== true) {\n $ERROR('#4: new String(\"1\") <= new String(\"1\") === true');\n}\n\n//CHECK#5\nif (\"x\" <= \"1\" !== false) {\n $ERROR('#5: \"x\" <= \"1\" === false');\n}\n\n//CHECK#6\nif (\"1\" <= \"x\" !== true) {\n $ERROR('#6: \"1\" <= \"x\" === true');\n}\n",
+ "id": "S11.8.3_A3.2_T1.1"
+ },
+ {
+ "section": "11.8.3",
+ "description": "Type(Primitive(x)) and Type(Primitive(y)) vary between Object object and Function object",
+ "test": "//CHECK#1\nif (({} <= function(){return 1}) !== ({}.toString() <= function(){return 1}.toString())) {\n $ERROR('#1: ({} <= function(){return 1}) === ({}.toString() <= function(){return 1}.toString())');\n}\n\n//CHECK#2\nif ((function(){return 1} <= {}) !== (function(){return 1}.toString() <= {}.toString())) {\n $ERROR('#2: (function(){return 1} <= {}) === (function(){return 1}.toString() <= {}.toString())');\n}\n\n//CHECK#3\nif ((function(){return 1} <= function(){return 1}) !== (function(){return 1}.toString() <= function(){return 1}.toString())) {\n $ERROR('#3: (function(){return 1} <= function(){return 1}) === (function(){return 1}.toString() <= function(){return 1}.toString())');\n}\n\n//CHECK#4\nif (({} <= {}) !== ({}.toString() <= {}.toString())) {\n $ERROR('#4: ({} <= {}) === ({}.toString() <= {}.toString())');\n}\n",
+ "id": "S11.8.3_A3.2_T1.2"
+ },
+ {
+ "section": "11.8.3, 11.8.5",
+ "description": "y is number primitive",
+ "test": "//CHECK#1\nif ((Number.NaN <= 0) !== false) {\n $ERROR('#1: (NaN <= 0) === false');\n}\n\n//CHECK#2\nif ((Number.NaN <= 1.1) !== false) {\n $ERROR('#2: (NaN <= 1.1) === false');\n}\n\n//CHECK#3\nif ((Number.NaN <= -1.1) !== false) {\n $ERROR('#3: (NaN <= -1.1) === false');\n}\n\n//CHECK#4\nif ((Number.NaN <= Number.NaN) !== false) {\n $ERROR('#4: (NaN <= NaN) === false');\n}\n\n//CHECK#5\nif ((Number.NaN <= Number.POSITIVE_INFINITY) !== false) {\n $ERROR('#5: (NaN <= +Infinity) === false');\n}\n\n//CHECK#6\nif ((Number.NaN <= Number.NEGATIVE_INFINITY) !== false) {\n $ERROR('#6: (NaN <= -Infinity) === false');\n}\n\n//CHECK#7\nif ((Number.NaN <= Number.MAX_VALUE) !== false) {\n $ERROR('#7: (NaN <= Number.MAX_VALUE) === false');\n}\n\n//CHECK#8\nif ((Number.NaN <= Number.MIN_VALUE) !== false) {\n $ERROR('#8: (NaN <= Number.MIN_VALUE) === false');\n}\n\n",
+ "id": "S11.8.3_A4.1"
+ },
+ {
+ "section": "11.8.3, 11.8.5",
+ "description": "x and y are string primitives",
+ "test": "//CHECK#1\nif ((\"x \" <= \"x\") !== false) {\n $ERROR('#1: (\"x \" <= \"x\") === false');\n}\n\n//CHECK#2\nif ((\"x\" <= \"\") !== false) {\n $ERROR('#2: (\"x\" <= \"\") === false');\n}\n\n//CHECK#3\nif ((\"abcd\" <= \"ab\") !== false) {\n $ERROR('#3: (\"abcd\" <= ab\") === false');\n}\n\n//CHECK#4\nif ((\"abc\\u0064\" <= \"abcd\") !== true) {\n $ERROR('#4: (\"abc\\\\u0064\" <= abcd\") === true');\n}\n\n//CHECK#5\nif ((\"x\" + \"y\" <= \"x\") !== false) {\n $ERROR('#5: (\"x\" + \"y\" <= \"x\") === false');\n}\n\n//CHECK#6\nvar x = \"x\";\nif ((x + 'y' <= x) !== false) {\n $ERROR('#6: var x = \"x\"; (x + \"y\" <= x) === false');\n}\n\n",
+ "id": "S11.8.3_A4.10"
+ },
+ {
+ "section": "11.8.3, 11.8.5",
+ "description": "x and y are string primitives",
+ "test": "//CHECK#1\nif ((\"x\" <= \"x\") !== true) {\n $ERROR('#1: (\"x\" <= \"x\") === true');\n}\n\n//CHECK#2\nif ((\"\" <= \"x\") !== true) {\n $ERROR('#2: (\"\" <= \"x\") === true');\n}\n\n//CHECK#3\nif ((\"ab\" <= \"abcd\") !== true) {\n $ERROR('#3: (\"ab\" <= abcd\") === true');\n}\n\n//CHECK#4\nif ((\"abcd\" <= \"abc\\u0064\") !== true) {\n $ERROR('#4: (\"abcd\" <= abc\\\\u0064\") === true');\n}\n\n//CHECK#5\nif ((\"x\" <= \"x\" + \"y\") !== true) {\n $ERROR('#5: (\"x\" <= \"x\" + \"y\") === true');\n}\n\n//CHECK#6\nvar x = \"x\";\nif ((x <= x + \"y\") !== true) {\n $ERROR('#6: var x = \"x\"; (x <= x + \"y\") === true');\n}\n\n//CHECK#7\nif ((\"a\\u0000\" <= \"a\\u0000a\") !== true) {\n $ERROR('#7: (\"a\\\\u0000\" <= \"a\\\\u0000a\") === true');\n}\n\n//CHECK#8\nif ((\"x\" <= \" x\") !== false) {\n $ERROR('#8: (\"x\" <= \" x\") === false');\n}\n\n\n",
+ "id": "S11.8.3_A4.11"
+ },
+ {
+ "section": "11.8.3, 11.8.5",
+ "description": "x and y are string primitives",
+ "test": "//CHECK#1\nif ((\"xx\" <= \"xy\") !== true) {\n $ERROR('#1: (\"xx\" <= \"xy\") === true');\n}\n\n//CHECK#2\nif ((\"xy\" <= \"xx\") !== false) {\n $ERROR('#2: (\"xy\" <= \"xx\") === false');\n}\n\n//CHECK#3\nif ((\"x\" <= \"y\") !== true) {\n $ERROR('#3: (\"x\" <= y\") === true');\n}\n\n//CHECK#4\nif ((\"aab\" <= \"aba\") !== true) {\n $ERROR('#4: (\"aab\" <= aba\") === true');\n}\n\n//CHECK#5\nif ((\"\\u0061\\u0061\\u0061\\u0062\" <= \"\\u0061\\u0061\\u0061\\u0061\") !== false) {\n $ERROR('#5: (\"\\\\u0061\\\\u0061\\\\u0061\\\\u0062\" <= \\\\u0061\\\\u0061\\\\u0061\\\\u0061\") === false');\n}\n\n//CHECK#6\nif ((\"a\\u0000a\" <= \"a\\u0000b\") !== true) {\n $ERROR('#6: (\"a\\\\u0000a\" <= \"a\\\\u0000b\") === true');\n}\n\n//CHECK#7\nif ((\"aB\" <= \"aa\") !== true) {\n $ERROR('#7: (\"aB\" <= aa\") === true');\n}\n",
+ "id": "S11.8.3_A4.12_T1"
+ },
+ {
+ "section": "11.8.3, 11.8.5",
+ "description": "x and y are string primitives",
+ "test": "//CHECK#1\nif ((\"0\" <= \"x\") !== true) {\n $ERROR('#1: (\"0\" <= \"x\") !== true');\n}\n\n//CHECK#2\nif ((\"-\" <= \"0\") !== true) {\n $ERROR('#2: (\"-\" <= \"0\") !== true');\n}\n\n//CHECK#3\nif ((\".\" <= \"0\") !== true) {\n $ERROR('#3: (\".\" <= \"0\") !== true');\n}\n\n//CHECK#4\nif ((\"+\" <= \"-\") !== true) {\n $ERROR('#4: (\"+\" <= \"-\") !== true');\n}\n\n//CHECK#5\nif ((\"-0\" <= \"-1\") !== true) {\n $ERROR('#5: (\"-0\" <= \"-1\") !== true');\n}\n\n//CHECK#6\nif ((\"+1\" <= \"-1\") !== true) {\n $ERROR('#6: (\"+1\" <= \"-1\") !== true');\n}\n\n//CHECK#7\nif ((\"1\" <= \"1e-10\") !== true) {\n$ERROR('#7: (\"1\" <= \"1e-10\") !== true');\n}\n",
+ "id": "S11.8.3_A4.12_T2"
+ },
+ {
+ "section": "11.8.3, 11.8.5",
+ "description": "x is number primitive",
+ "test": "//CHECK#1\nif ((0 <= Number.NaN) !== false) {\n $ERROR('#1: (0 <= NaN) === false');\n}\n\n//CHECK#2\nif ((1.1 <= Number.NaN) !== false) {\n $ERROR('#2: (1.1 <= NaN) === false');\n}\n\n//CHECK#3\nif ((-1.1 <= Number.NaN) !== false) {\n $ERROR('#3: (-1.1 <= NaN) === false');\n}\n\n//CHECK#4\nif ((Number.NaN <= Number.NaN) !== false) {\n $ERROR('#4: (NaN <= NaN) === false');\n}\n\n//CHECK#5\nif ((Number.POSITIVE_INFINITY <= Number.NaN) !== false) {\n $ERROR('#5: (+Infinity <= NaN) === false');\n}\n\n//CHECK#6\nif ((Number.NEGATIVE_INFINITY <= Number.NaN) !== false) {\n $ERROR('#6: (-Infinity <= NaN) === false');\n}\n\n//CHECK#7\nif ((Number.MAX_VALUE <= Number.NaN) !== false) {\n $ERROR('#7: (Number.MAX_VALUE <= NaN) === false');\n}\n\n//CHECK#8\nif ((Number.MIN_VALUE <= Number.NaN) !== false) {\n $ERROR('#8: (Number.MIN_VALUE <= NaN) === false');\n}\n\n",
+ "id": "S11.8.3_A4.2"
+ },
+ {
+ "section": "11.8.3, 11.8.5",
+ "description": "x and y are number primitives",
+ "test": "//CHECK#1\nif ((1 <= 1) !== true) {\n $ERROR('#1: (1 <= 1) === true');\n}\n\n//CHECK#2\nif ((1.1 <= 1.1) !== true) {\n $ERROR('#2: (1.1 <= 1.1) === true');\n}\n\n//CHECK#3\nif ((-1.1 <= -1.1) !== true) {\n $ERROR('#3: (-1.1 <= -1.1) === true');\n}\n\n//CHECK#4\nif ((Number.NEGATIVE_INFINITY <= Number.NEGATIVE_INFINITY) !== true) {\n $ERROR('#4: (-Infinity <= -Infinity) === true');\n}\n\n//CHECK#5\nif ((Number.POSITIVE_INFINITY <= Number.POSITIVE_INFINITY) !== true) {\n $ERROR('#5: (+Infinity <= +Infinity) === true');\n}\n\n//CHECK#6\nif ((Number.MAX_VALUE <= Number.MAX_VALUE) !== true) {\n $ERROR('#6: (Number.MAX_VALUE <= Number.MAX_VALUE) === true');\n}\n\n//CHECK#7\nif ((Number.MIN_VALUE <= Number.MIN_VALUE) !== true) {\n $ERROR('#7: (Number.MIN_VALUE <= Number.MIN_VALUE) === true');\n}\n\n\n",
+ "id": "S11.8.3_A4.3"
+ },
+ {
+ "section": "11.8.3, 11.8.5",
+ "description": "Checking all combinations",
+ "test": "//CHECK#1\nif ((0 <= 0) !== true) {\n $ERROR('#1: (0 <= 0) === true');\n}\n\n//CHECK#2\nif ((-0 <= -0) !== true) {\n $ERROR('#2: (-0 <= -0) === true');\n}\n\n//CHECK#3\nif ((+0 <= -0) !== true) {\n $ERROR('#3: (+0 <= -0) === true');\n}\n\n//CHECK#4\nif ((-0 <= +0) !== true) {\n $ERROR('#4: (-0 <= +0) === true');\n}\n\n",
+ "id": "S11.8.3_A4.4"
+ },
+ {
+ "section": "11.8.3, 11.8.5",
+ "description": "y is number primitive",
+ "test": "//CHECK#1\nif ((Number.POSITIVE_INFINITY <= 0) !== false) {\n $ERROR('#1: (+Infinity <= 0) === false');\n}\n\n//CHECK#2\nif ((Number.POSITIVE_INFINITY <= 1.1) !== false) {\n $ERROR('#2: (+Infinity <= 1.1) === false');\n}\n\n//CHECK#3\nif ((Number.POSITIVE_INFINITY <= -1.1) !== false) {\n $ERROR('#3: (+Infinity <= -1.1) === false');\n}\n\n//CHECK#4\nif ((Number.POSITIVE_INFINITY <= Number.NEGATIVE_INFINITY) !== false) {\n $ERROR('#4: (+Infinity <= -Infinity) === false');\n}\n\n//CHECK#5\nif ((Number.POSITIVE_INFINITY <= Number.MAX_VALUE) !== false) {\n $ERROR('#5: (+Infinity <= Number.MAX_VALUE) === false');\n}\n\n//CHECK#6\nif ((Number.POSITIVE_INFINITY <= Number.MIN_VALUE) !== false) {\n $ERROR('#6: (+Infinity <= Number.MIN_VALUE) === false');\n}\n\n",
+ "id": "S11.8.3_A4.5"
+ },
+ {
+ "section": "11.8.3, 11.8.5",
+ "description": "x is number primitive",
+ "test": "//CHECK#1\nif ((0 <= Number.POSITIVE_INFINITY) !== true) {\n $ERROR('#1: (0 <= +Infinity) === true');\n}\n\n//CHECK#2\nif ((1.1 <= Number.POSITIVE_INFINITY) !== true) {\n $ERROR('#2: (1.1 <= +Infinity) === true');\n}\n\n//CHECK#3\nif ((-1.1 <= Number.POSITIVE_INFINITY) !== true) {\n $ERROR('#3: (-1.1 <= +Infinity) === true');\n}\n\n//CHECK#4\nif ((Number.NEGATIVE_INFINITY <= Number.POSITIVE_INFINITY) !== true) {\n $ERROR('#4: (-Infinity <= +Infinity) === true');\n}\n\n//CHECK#5\nif ((Number.MAX_VALUE <= Number.POSITIVE_INFINITY) !== true) {\n $ERROR('#5: (Number.MAX_VALUE <= +Infinity) === true');\n}\n\n//CHECK#6\nif ((Number.MIN_VALUE <= Number.POSITIVE_INFINITY) !== true) {\n $ERROR('#6: (Number.MIN_VALUE <= +Infinity) === true');\n}\n\n",
+ "id": "S11.8.3_A4.6"
+ },
+ {
+ "section": "11.8.3, 11.8.5",
+ "description": "y is number primitive",
+ "test": "//CHECK#1\nif ((Number.NEGATIVE_INFINITY <= 0) !== true) {\n $ERROR('#1: (-Infinity <= 0) === true');\n}\n\n//CHECK#2\nif ((Number.NEGATIVE_INFINITY <= 1.1) !== true) {\n $ERROR('#2: (-Infinity <= 1.1) === true');\n}\n\n//CHECK#3\nif ((Number.NEGATIVE_INFINITY <= -1.1) !== true) {\n $ERROR('#3: (-Infinity <= -1.1) === true');\n}\n\n//CHECK#4\nif ((Number.NEGATIVE_INFINITY <= Number.POSITIVE_INFINITY) !== true) {\n $ERROR('#4: (-Infinity <= +Infinity) === true');\n}\n\n//CHECK#5\nif ((Number.NEGATIVE_INFINITY <= Number.MAX_VALUE) !== true) {\n $ERROR('#5: (-Infinity <= Number.MAX_VALUE) === true');\n}\n\n//CHECK#6\nif ((Number.NEGATIVE_INFINITY <= Number.MIN_VALUE) !== true) {\n $ERROR('#6: (-Infinity <= Number.MIN_VALUE) === true');\n}\n\n",
+ "id": "S11.8.3_A4.7"
+ },
+ {
+ "section": "11.8.3, 11.8.5",
+ "description": "x is number primitive",
+ "test": "//CHECK#1\nif ((0 <= Number.NEGATIVE_INFINITY) !== false) {\n $ERROR('#1: (0 <= -Infinity) === false');\n}\n\n//CHECK#2\nif ((1.1 <= Number.NEGATIVE_INFINITY) !== false) {\n $ERROR('#2: (1.1 <= -Infinity) === false');\n}\n\n//CHECK#3\nif ((-1.1 <= Number.NEGATIVE_INFINITY) !== false) {\n $ERROR('#3: (-1.1 <= -Infinity) === false');\n}\n\n//CHECK#4\nif ((Number.POSITIVE_INFINITY <= Number.NEGATIVE_INFINITY) !== false) {\n $ERROR('#4: (+Infinity <= -Infinity) === false');\n}\n\n//CHECK#5\nif ((Number.MAX_VALUE <= Number.NEGATIVE_INFINITY) !== false) {\n $ERROR('#5: (Number.MAX_VALUE <= -Infinity) === false');\n}\n\n//CHECK#6\nif ((Number.MIN_VALUE <= Number.NEGATIVE_INFINITY) !== false) {\n $ERROR('#6: (Number.MIN_VALUE <= -Infinity) === false');\n}\n\n",
+ "id": "S11.8.3_A4.8"
+ },
+ {
+ "section": "11.8.3, 11.8.5",
+ "description": "x and y are number primitives",
+ "test": "//CHECK#1\nif ((1.1 <= 1) !== false) {\n $ERROR('#1: (1.1 <= 1) === false');\n}\n\n//CHECK#2\nif ((1 <= 1.1) !== true) {\n $ERROR('#2: (1 <= 1.1) === true');\n}\n\n//CHECK#3\nif ((-1.1 <= -1) !== true) {\n $ERROR('#3: (-1.1 <= -1) === true');\n}\n\n//CHECK#4\nif ((-1 <= -1.1) !== false) {\n $ERROR('#4: (-1 <= -1.1) === false');\n}\n\n//CHECK#5\nif ((0 <= 0.1) !== true) {\n $ERROR('#5: (0 <= 0.1) === true');\n}\n\n//CHECK#6\nif ((-0.1 <= 0) !== true) {\n $ERROR('#6: (-0.1 <= 0) === true');\n}\n\n//CHECK#7\nif ((Number.MAX_VALUE/2 <= Number.MAX_VALUE) !== true) {\n $ERROR('#7: (Number.MAX_VALUE/2 <= Number.MAX_VALUE) === true');\n}\n\n//CHECK#8\nif ((Number.MIN_VALUE <= Number.MIN_VALUE*2) !== true) {\n $ERROR('#8: (Number.MIN_VALUE <= Number.MIN_VALUE*2) === true');\n}\n\n\n",
+ "id": "S11.8.3_A4.9"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/11.8.4_The_Grater_than_or_equal_Operator.json b/website/resources/scripts/testcases2/11.8.4_The_Grater_than_or_equal_Operator.json
new file mode 100644
index 000000000..42d62c9a2
--- /dev/null
+++ b/website/resources/scripts/testcases2/11.8.4_The_Grater_than_or_equal_Operator.json
@@ -0,0 +1,224 @@
+{
+ "testCollection": {
+ "name": "11.8.4_The_Grater_than_or_equal_Operator",
+ "numTests": 36,
+ "tests": [
+ {
+ "section": "11.8.4, 7.2, 7.3",
+ "description": "Checking by using eval",
+ "test": "//CHECK#1\nif (eval(\"1\\u0009>=\\u00091\") !== true) {\n $ERROR('#1: (1\\\\u0009>=\\\\u00091) === true');\n}\n\n//CHECK#2\nif (eval(\"1\\u000B>=\\u000B1\") !== true) {\n $ERROR('#2: (1\\\\u000B>=\\\\u000B1) === true'); \n}\n\n//CHECK#3\nif (eval(\"1\\u000C>=\\u000C1\") !== true) {\n $ERROR('#3: (1\\\\u000C>=\\\\u000C1) === true');\n}\n\n//CHECK#4\nif (eval(\"1\\u0020>=\\u00201\") !== true) {\n $ERROR('#4: (1\\\\u0020>=\\\\u00201) === true');\n}\n\n//CHECK#5\nif (eval(\"1\\u00A0>=\\u00A01\") !== true) {\n $ERROR('#5: (1\\\\u00A0>=\\\\u00A01) === true');\n}\n\n//CHECK#6\nif (eval(\"1\\u000A>=\\u000A1\") !== true) {\n $ERROR('#6: (1\\\\u000A>=\\\\u000A1) === true'); \n}\n\n//CHECK#7\nif (eval(\"1\\u000D>=\\u000D1\") !== true) {\n $ERROR('#7: (1\\\\u000D>=\\\\u000D1) === true');\n}\n\n//CHECK#8\nif (eval(\"1\\u2028>=\\u20281\") !== true) {\n $ERROR('#8: (1\\\\u2028>=\\\\u20281) === true');\n}\n\n//CHECK#9\nif (eval(\"1\\u2029>=\\u20291\") !== true) {\n $ERROR('#9: (1\\\\u2029>=\\\\u20291) === true');\n}\n\n//CHECK#10\nif (eval(\"1\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u2029>=\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u20291\") !== true) {\n $ERROR('#10: (1\\\\u0009\\\\u000B\\\\u000C\\\\u0020\\\\u00A0\\\\u000A\\\\u000D\\\\u2028\\\\u2029>=\\\\u0009\\\\u000B\\\\u000C\\\\u0020\\\\u00A0\\\\u000A\\\\u000D\\\\u2028\\\\u20291) === true');\n}\n",
+ "id": "S11.8.4_A1"
+ },
+ {
+ "section": "11.8.4, 11.8.5",
+ "description": "Either Type is not Reference or GetBase is not null",
+ "test": "//CHECK#1\nif (1 >= 1 !== true) {\n $ERROR('#1: 1 >= 1 === true');\n}\n\n//CHECK#2\nvar x = 1;\nif (x >= 1 !== true) {\n $ERROR('#2: var x = 1; x >= 1 === true');\n}\n\n//CHECK#3\nvar y = 1;\nif (1 >= y !== true) {\n $ERROR('#3: var y = 1; 1 >= y === true');\n}\n\n//CHECK#4\nvar x = 1;\nvar y = 1;\nif (x >= y !== true) {\n $ERROR('#4: var x = 1; var y = 1; x >= y === true');\n}\n\n//CHECK#5\nvar objectx = new Object();\nvar objecty = new Object();\nobjectx.prop = 1;\nobjecty.prop = 1;\nif (objectx.prop >= objecty.prop !== true) {\n $ERROR('#5: var objectx = new Object(); var objecty = new Object(); objectx.prop = 1; objecty.prop = 1; objectx.prop >= objecty.prop === true');\n}\n",
+ "id": "S11.8.4_A2.1_T1"
+ },
+ {
+ "section": "11.8.4, 11.8.5",
+ "description": "If GetBase(x) is null, throw ReferenceError",
+ "test": "//CHECK#1\ntry {\n x >= 1;\n $ERROR('#1.1: x >= 1 throw ReferenceError. Actual: ' + (x >= 1)); \n}\ncatch (e) {\n if ((e instanceof ReferenceError) !== true) {\n $ERROR('#1.2: x >= 1 throw ReferenceError. Actual: ' + (e)); \n }\n}\n\n",
+ "id": "S11.8.4_A2.1_T2"
+ },
+ {
+ "section": "11.8.4, 11.8.5",
+ "description": "If GetBase(y) is null, throw ReferenceError",
+ "test": "//CHECK#1\ntry {\n 1 >= y;\n $ERROR('#1.1: 1 >= y throw ReferenceError. Actual: ' + (1 >= y)); \n}\ncatch (e) {\n if ((e instanceof ReferenceError) !== true) {\n $ERROR('#1.2: 1 >= y throw ReferenceError. Actual: ' + (e)); \n }\n}\n\n",
+ "id": "S11.8.4_A2.1_T3"
+ },
+ {
+ "section": "11.8.4, 8.6.2.6",
+ "description": "If Type(value) is Object, evaluate ToPrimitive(value, Number)",
+ "test": "//CHECK#1\nif ({valueOf: function() {return 2}} >= 1 !== true) {\n $ERROR('#1: {valueOf: function() {return 1}} >= 1 === true. Actual: ' + ({valueOf: function() {return 1}} >= 1));\n}\n\n//CHECK#2\nif ({valueOf: function() {return 2}, toString: function() {return 0}} >= 1 !== true) {\n $ERROR('#2: {valueOf: function() {return 1}, toString: function() {return 2}} >= 1 === true. Actual: ' + ({valueOf: function() {return 1}, toString: function() {return 2}} >= 1));\n}\n\n//CHECK#3\nif ({valueOf: function() {return 2}, toString: function() {return {}}} >= 1 !== true) {\n $ERROR('#3: {valueOf: function() {return 1}, toString: function() {return {}}} >= 1 === true. Actual: ' + ({valueOf: function() {return 1}, toString: function() {return {}}} >= 1));\n}\n\n//CHECK#4\ntry {\n if ({valueOf: function() {return 2}, toString: function() {throw \"error\"}} >= 1 !== true) {\n $ERROR('#4.1: {valueOf: function() {return 1}, toString: function() {throw \"error\"}} >= 1 === true. Actual: ' + ({valueOf: function() {return 1}, toString: function() {throw \"error\"}} >= 1));\n }\n}\ncatch (e) {\n if (e === \"error\") {\n $ERROR('#4.2: {valueOf: function() {return 2}, toString: function() {throw \"error\"}} >= 1 not throw \"error\"');\n } else {\n $ERROR('#4.3: {valueOf: function() {return 2}, toString: function() {throw \"error\"}} >= 1 not throw Error. Actual: ' + (e));\n }\n}\n\n//CHECK#5\nif (1 >= {toString: function() {return 0}} !== true) {\n $ERROR('#5: 1 >= {toString: function() {return 0}} === true. Actual: ' + (1 >= {toString: function() {return 0}}));\n}\n\n//CHECK#6\nif (1 >= {valueOf: function() {return {}}, toString: function() {return 0}} !== true) {\n $ERROR('#6: 1 >= {valueOf: function() {return {}}, toString: function() {return 0}} === true. Actual: ' + (1 >= {valueOf: function() {return {}}, toString: function() {return 0}}));\n}\n\n//CHECK#7\ntry {\n 1 >= {valueOf: function() {throw \"error\"}, toString: function() {return 0}};\n $ERROR('#7.1: 1 >= {valueOf: function() {throw \"error\"}, toString: function() {return 0}} throw \"error\". Actual: ' + (1 >= {valueOf: function() {throw \"error\"}, toString: function() {return 0}}));\n} \ncatch (e) {\n if (e !== \"error\") {\n $ERROR('#7.2: 1 >= {valueOf: function() {throw \"error\"}, toString: function() {return 0}} throw \"error\". Actual: ' + (e));\n } \n}\n\n//CHECK#8\ntry {\n 1 >= {valueOf: function() {return {}}, toString: function() {return {}}};\n $ERROR('#8.1: 1 >= {valueOf: function() {return {}}, toString: function() {return {}}} throw TypeError. Actual: ' + (1 >= {valueOf: function() {return {}}, toString: function() {return {}}}));\n} \ncatch (e) {\n if ((e instanceof TypeError) !== true) {\n $ERROR('#8.2: 1 >= {valueOf: function() {return {}}, toString: function() {return {}}} throw TypeError. Actual: ' + (e));\n } \n}\n",
+ "id": "S11.8.4_A2.2_T1"
+ },
+ {
+ "section": "11.8.4",
+ "description": "Checking with \"throw\"",
+ "test": "//CHECK#1\nvar x = { valueOf: function () { throw \"x\"; } };\nvar y = { valueOf: function () { throw \"y\"; } };\ntry {\n x >= y;\n $ERROR('#1.1: var x = { valueOf: function () { throw \"x\"; } }; var y = { valueOf: function () { throw \"y\"; } }; x >= y throw \"x\". Actual: ' + (x >= y));\n} catch (e) {\n if (e === \"y\") {\n $ERROR('#1.2: ToNumber(first expression) is called first, and then ToNumber(second expression)');\n } else {\n if (e !== \"x\") {\n $ERROR('#1.3: var x = { valueOf: function () { throw \"x\"; } }; var y = { valueOf: function () { throw \"y\"; } }; x >= y throw \"x\". Actual: ' + (e));\n }\n }\n}\n",
+ "id": "S11.8.4_A2.3_T1"
+ },
+ {
+ "section": "11.8.4",
+ "description": "Checking with \"=\"",
+ "test": "//CHECK#1\nvar x = 1; \nif ((x = 0) >= x !== true) {\n $ERROR('#1: var x = 1; (x = 0) >= x === true');\n}\n\n//CHECK#2\nvar x = 0; \nif (x >= (x = 1) !== false) {\n $ERROR('#2: var x = 0; x >= (x = 1) === false');\n}\n\n",
+ "id": "S11.8.4_A2.4_T1"
+ },
+ {
+ "section": "11.8.4",
+ "description": "Checking with \"throw\"",
+ "test": "//CHECK#1\nvar x = function () { throw \"x\"; };\nvar y = function () { throw \"y\"; };\ntry {\n x() >= y();\n $ERROR('#1.1: var x = function () { throw \"x\"; }; var y = function () { throw \"y\"; }; x() >= y() throw \"x\". Actual: ' + (x() >= y()));\n} catch (e) {\n if (e === \"y\") {\n $ERROR('#1.2: First expression is evaluated first, and then second expression');\n } else {\n if (e !== \"x\") {\n $ERROR('#1.3: var x = function () { throw \"x\"; }; var y = function () { throw \"y\"; }; x() >= y() throw \"x\". Actual: ' + (e));\n }\n }\n}\n",
+ "id": "S11.8.4_A2.4_T2"
+ },
+ {
+ "section": "11.8.4",
+ "description": "Checking with undeclarated variables",
+ "test": "//CHECK#1\ntry {\n x >= (x = 1);\n $ERROR('#1.1: x >= (x = 1) throw ReferenceError. Actual: ' + (x >= (x = 1))); \n}\ncatch (e) {\n if ((e instanceof ReferenceError) !== true) {\n $ERROR('#1.2: x >= (x = 1) throw ReferenceError. Actual: ' + (e)); \n }\n}\n\n//CHECK#2\nif ((y = 1) >= y !== true) {\n $ERROR('#2: (y = 1) >= y === true');\n}\n\n",
+ "id": "S11.8.4_A2.4_T3"
+ },
+ {
+ "section": "11.8.4",
+ "description": "Type(Primitive(x)) and Type(Primitive(y)) vary between primitive boolean and Boolean object",
+ "test": "//CHECK#1\nif (true >= true !== true) {\n $ERROR('#1: true >= true === true');\n}\n\n//CHECK#2\nif (new Boolean(true) >= true !== true) {\n $ERROR('#2: new Boolean(true) >= true === true');\n}\n\n//CHECK#3\nif (true >= new Boolean(true) !== true) {\n $ERROR('#3: true >= new Boolean(true) === true');\n}\n\n//CHECK#4\nif (new Boolean(true) >= new Boolean(true) !== true) {\n $ERROR('#4: new Boolean(true) >= new Boolean(true) === true');\n}\n",
+ "id": "S11.8.4_A3.1_T1.1"
+ },
+ {
+ "section": "11.8.4",
+ "description": "Type(Primitive(x)) and Type(Primitive(y)) vary between primitive number and Number object",
+ "test": "//CHECK#1\nif (1 >= 1 !== true) {\n $ERROR('#1: 1 >= 1 === true');\n}\n\n//CHECK#2\nif (new Number(1) >= 1 !== true) {\n $ERROR('#2: new Number(1) >= 1 === true');\n}\n\n//CHECK#3\nif (1 >= new Number(1) !== true) {\n $ERROR('#3: 1 >= new Number(1) === true');\n}\n\n//CHECK#4\nif (new Number(1) >= new Number(1) !== true) {\n $ERROR('#4: new Number(1) >= new Number(1) === true');\n}\n\n",
+ "id": "S11.8.4_A3.1_T1.2"
+ },
+ {
+ "section": "11.8.4",
+ "description": "Type(Primitive(x)) and Type(Primitive(y)) vary between Null and Undefined",
+ "test": "//CHECK#1\nif (null >= undefined !== false) {\n $ERROR('#1: null >= undefined === false');\n}\n\n//CHECK#2\nif (undefined >= null !== false) {\n $ERROR('#2: undefined >= null === false');\n}\n\n//CHECK#3\nif (undefined >= undefined !== false) {\n $ERROR('#3: undefined >= undefined === false');\n}\n\n//CHECK#4\nif (null >= null !== true) {\n $ERROR('#4: null >= null === true');\n}\n",
+ "id": "S11.8.4_A3.1_T1.3"
+ },
+ {
+ "section": "11.8.4",
+ "description": "Type(Primitive(x)) is different from Type(Primitive(y)) and both types vary between Number (primitive or object) and Boolean (primitive and object)",
+ "test": "//CHECK#1\nif (true >= 1 !== true) {\n $ERROR('#1: true >= 1 === true');\n}\n\n//CHECK#2\nif (1 >= true !== true) {\n $ERROR('#2: 1 >= true === true');\n}\n\n//CHECK#3\nif (new Boolean(true) >= 1 !== true) {\n $ERROR('#3: new Boolean(true) >= 1 === true');\n}\n\n//CHECK#4\nif (1 >= new Boolean(true) !== true) {\n $ERROR('#4: 1 >= new Boolean(true) === true');\n}\n\n//CHECK#5\nif (true >= new Number(1) !== true) {\n $ERROR('#5: true >= new Number(1) === true');\n}\n\n//CHECK#6\nif (new Number(1) >= true !== true) {\n $ERROR('#6: new Number(1) >= true === true');\n}\n\n//CHECK#7\nif (new Boolean(true) >= new Number(1) !== true) {\n $ERROR('#7: new Boolean(true) >= new Number(1) === true');\n}\n\n//CHECK#8\nif (new Number(1) >= new Boolean(true) !== true) {\n $ERROR('#8: new Number(1) >= new Boolean(true) === true');\n}\n",
+ "id": "S11.8.4_A3.1_T2.1"
+ },
+ {
+ "section": "11.8.4",
+ "description": "Type(Primitive(x)) is different from Type(Primitive(y)) and both types vary between Number (primitive or object) and String (primitive and object)",
+ "test": "//CHECK#1\nif (\"1\" >= 1 !== true) {\n $ERROR('#1: \"1\" >= 1 === true');\n}\n\n//CHECK#2\nif (1 >= \"1\" !== true) {\n $ERROR('#2: 1 >= \"1\" === true');\n}\n\n//CHECK#3\nif (new String(\"1\") >= 1 !== true) {\n $ERROR('#3: new String(\"1\") >= 1 === true');\n}\n\n//CHECK#4\nif (1 >= new String(\"1\") !== true) {\n $ERROR('#4: 1 >= new String(\"1\") === true');\n}\n\n//CHECK#5\nif (\"1\" >= new Number(1) !== true) {\n $ERROR('#5: \"1\" >= new Number(1) === true');\n}\n\n//CHECK#6\nif (new Number(1) >= \"1\" !== true) {\n $ERROR('#6: new Number(1) >= \"1\" === true');\n}\n\n//CHECK#7\nif (new String(\"1\") >= new Number(1) !== true) {\n $ERROR('#7: new String(\"1\") >= new Number(1) === true');\n}\n\n//CHECK#8\nif (new Number(1) >= new String(\"1\") !== true) {\n $ERROR('#8: new Number(1) >= new String(\"1\") === true');\n}\n\n//CHECK#9\nif (\"x\" >= 1 !== false) {\n $ERROR('#9: \"x\" >= 1 === false');\n}\n\n//CHECK#10\nif (1 >= \"x\" !== false) {\n $ERROR('#10: 1 >= \"x\" === false');\n}\n",
+ "id": "S11.8.4_A3.1_T2.2"
+ },
+ {
+ "section": "11.8.4",
+ "description": "Type(Primitive(x)) is different from Type(Primitive(y)) and both types vary between Number (primitive or object) and Null",
+ "test": "//CHECK#1\nif (1 >= null !== true) {\n $ERROR('#1: 1 >= null === true');\n}\n\n//CHECK#2\nif (null >= 1 !== false) {\n $ERROR('#2: null >= 1 === false');\n}\n\n//CHECK#3\nif (new Number(1) >= null !== true) {\n $ERROR('#3: new Number(1) >= null === true');\n}\n\n//CHECK#4\nif (null >= new Number(1) !== false) {\n $ERROR('#4: null >= new Number(1) === false');\n}\n",
+ "id": "S11.8.4_A3.1_T2.3"
+ },
+ {
+ "section": "11.8.4",
+ "description": "Type(Primitive(x)) is different from Type(Primitive(y)) and both types vary between Number (primitive or object) and Undefined",
+ "test": "//CHECK#1\nif (1 >= undefined !== false) {\n $ERROR('#1: 1 >= undefined === false');\n}\n\n//CHECK#2\nif (undefined >= 1 !== false) {\n $ERROR('#2: undefined >= 1 === false');\n}\n\n//CHECK#3\nif (new Number(1) >= undefined !== false) {\n $ERROR('#3: new Number(1) >= undefined === false');\n}\n\n//CHECK#4\nif (undefined >= new Number(1) !== false) {\n $ERROR('#4: undefined >= new Number(1) === false');\n}\n",
+ "id": "S11.8.4_A3.1_T2.4"
+ },
+ {
+ "section": "11.8.4",
+ "description": "Type(Primitive(x)) is different from Type(Primitive(y)) and both types vary between String (primitive or object) and Boolean (primitive and object)",
+ "test": "//CHECK#1\nif (true >= \"1\" !== true) {\n $ERROR('#1: true >= \"1\" === true');\n}\n\n//CHECK#2\nif (\"1\" >= true !== true) {\n $ERROR('#2: \"1\" >= true === true');\n}\n\n//CHECK#3\nif (new Boolean(true) >= \"1\" !== true) {\n $ERROR('#3: new Boolean(true) >= \"1\" === true');\n}\n\n//CHECK#4\nif (\"1\" >= new Boolean(true) !== true) {\n $ERROR('#4: \"1\" >= new Boolean(true) === true');\n}\n\n//CHECK#5\nif (true >= new String(\"1\") !== true) {\n $ERROR('#5: true >= new String(\"1\") === true');\n}\n\n//CHECK#6\nif (new String(\"1\") >= true !== true) {\n $ERROR('#6: new String(\"1\") >= true === true');\n}\n\n//CHECK#7\nif (new Boolean(true) >= new String(\"1\") !== true) {\n $ERROR('#7: new Boolean(true) >= new String(\"1\") === true');\n}\n\n//CHECK#8\nif (new String(\"1\") >= new Boolean(true) !== true) {\n $ERROR('#8: new String(\"1\") >= new Boolean(true) === true');\n}\n",
+ "id": "S11.8.4_A3.1_T2.5"
+ },
+ {
+ "section": "11.8.4",
+ "description": "Type(Primitive(x)) is different from Type(Primitive(y)) and both types vary between String (primitive or object) and Undefined",
+ "test": "//CHECK#1\nif (\"1\" >= undefined !== false) {\n $ERROR('#1: \"1\" >= undefined === false');\n}\n\n//CHECK#2\nif (undefined >= \"1\" !== false) {\n $ERROR('#2: undefined >= \"1\" === false');\n}\n\n//CHECK#3\nif (new String(\"1\") >= undefined !== false) {\n $ERROR('#3: new String(\"1\") >= undefined === false');\n}\n\n//CHECK#4\nif (undefined >= new String(\"1\") !== false) {\n $ERROR('#4: undefined >= new String(\"1\") === false');\n}\n",
+ "id": "S11.8.4_A3.1_T2.6"
+ },
+ {
+ "section": "11.8.4",
+ "description": "Type(Primitive(x)) is different from Type(Primitive(y)) and both types vary between String (primitive or object) and Null",
+ "test": "//CHECK#1\nif (\"1\" >= null !== true) {\n $ERROR('#1: \"1\" >= null === true');\n}\n\n//CHECK#2\nif (null >= \"1\" !== false) {\n $ERROR('#2: null >= \"1\" === false');\n}\n\n//CHECK#3\nif (new String(\"1\") >= null !== true) {\n $ERROR('#3: new String(\"1\") >= null === true');\n}\n\n//CHECK#4\nif (null >= new String(\"1\") !== false) {\n $ERROR('#4: null >= new String(\"1\") === false');\n}\n",
+ "id": "S11.8.4_A3.1_T2.7"
+ },
+ {
+ "section": "11.8.4",
+ "description": "Type(Primitive(x)) is different from Type(Primitive(y)) and both types vary between Boolean (primitive or object) and Undefined",
+ "test": "//CHECK#1\nif (true >= undefined !== false) {\n $ERROR('#1: true >= undefined === false');\n}\n\n//CHECK#2\nif (undefined >= true !== false) {\n $ERROR('#2: undefined >= true === false');\n}\n\n//CHECK#3\nif (new Boolean(true) >= undefined !== false) {\n $ERROR('#3: new Boolean(true) >= undefined === false');\n}\n\n//CHECK#4\nif (undefined >= new Boolean(true) !== false) {\n $ERROR('#4: undefined >= new Boolean(true) === false');\n}\n",
+ "id": "S11.8.4_A3.1_T2.8"
+ },
+ {
+ "section": "11.8.4",
+ "description": "Type(Primitive(x)) is different from Type(Primitive(y)) and both types vary between Boolean (primitive or object) and Null",
+ "test": "//CHECK#1\nif (true >= null !== true) {\n $ERROR('#1: true >= null === true');\n}\n\n//CHECK#2\nif (null >= true !== false) {\n $ERROR('#2: null >= true === false');\n}\n\n//CHECK#3\nif (new Boolean(true) >= null !== true) {\n $ERROR('#3: new Boolean(true) >= null === true');\n}\n\n//CHECK#4\nif (null >= new Boolean(true) !== false) {\n $ERROR('#4: null >= new Boolean(true) === false');\n}\n",
+ "id": "S11.8.4_A3.1_T2.9"
+ },
+ {
+ "section": "11.8.4",
+ "description": "Type(Primitive(x)) and Type(Primitive(y)) vary between primitive string and String object",
+ "test": "//CHECK#1\nif (\"1\" >= \"1\" !== true) {\n $ERROR('#1: \"1\" >= \"1\" === true');\n}\n\n//CHECK#2\nif (new String(\"1\") >= \"1\" !== true) {\n $ERROR('#2: new String(\"1\") >= \"1\" === true');\n}\n\n//CHECK#3\nif (\"1\" >= new String(\"1\") !== true) {\n $ERROR('#3: \"1\" >= new String(\"1\") === true');\n}\n\n//CHECK#4\nif (new String(\"1\") >= new String(\"1\") !== true) {\n $ERROR('#4: new String(\"1\") >= new String(\"1\") === true');\n}\n\n//CHECK#5\nif (\"x\" >= \"1\" !== true) {\n $ERROR('#5: \"x\" >= \"1\" === true');\n}\n\n//CHECK#6\nif (\"1\" >= \"x\" !== false) {\n $ERROR('#6: \"1\" >= \"x\" === false');\n}\n",
+ "id": "S11.8.4_A3.2_T1.1"
+ },
+ {
+ "section": "11.8.4",
+ "description": "Type(Primitive(x)) and Type(Primitive(y)) vary between Object object and Function object",
+ "test": "//CHECK#1\nif (({} >= function(){return 1}) !== ({}.toString() >= function(){return 1}.toString())) {\n $ERROR('#1: ({} >= function(){return 1}) === ({}.toString() >= function(){return 1}.toString())');\n}\n\n//CHECK#2\nif ((function(){return 1} >= {}) !== (function(){return 1}.toString() >= {}.toString())) {\n $ERROR('#2: (function(){return 1} >= {}) === (function(){return 1}.toString() >= {}.toString())');\n}\n\n//CHECK#3\nif ((function(){return 1} >= function(){return 1}) !== (function(){return 1}.toString() >= function(){return 1}.toString())) {\n $ERROR('#3: (function(){return 1} >= function(){return 1}) === (function(){return 1}.toString() >= function(){return 1}.toString())');\n}\n\n//CHECK#4\nif (({} >= {}) !== ({}.toString() >= {}.toString())) {\n $ERROR('#4: ({} >= {}) === ({}.toString() >= {}.toString())');\n}\n",
+ "id": "S11.8.4_A3.2_T1.2"
+ },
+ {
+ "section": "11.8.4, 11.8.5",
+ "description": "y is number primitive",
+ "test": "//CHECK#1\nif ((Number.NaN >= 0) !== false) {\n $ERROR('#1: (NaN >= 0) === false');\n}\n\n//CHECK#2\nif ((Number.NaN >= 1.1) !== false) {\n $ERROR('#2: (NaN >= 1.1) === false');\n}\n\n//CHECK#3\nif ((Number.NaN >= -1.1) !== false) {\n $ERROR('#3: (NaN >= -1.1) === false');\n}\n\n//CHECK#4\nif ((Number.NaN >= Number.NaN) !== false) {\n $ERROR('#4: (NaN >= NaN) === false');\n}\n\n//CHECK#5\nif ((Number.NaN >= Number.POSITIVE_INFINITY) !== false) {\n $ERROR('#5: (NaN >= +Infinity) === false');\n}\n\n//CHECK#6\nif ((Number.NaN >= Number.NEGATIVE_INFINITY) !== false) {\n $ERROR('#6: (NaN >= -Infinity) === false');\n}\n\n//CHECK#7\nif ((Number.NaN >= Number.MAX_VALUE) !== false) {\n $ERROR('#7: (NaN >= Number.MAX_VALUE) === false');\n}\n\n//CHECK#8\nif ((Number.NaN >= Number.MIN_VALUE) !== false) {\n $ERROR('#8: (NaN >= Number.MIN_VALUE) === false');\n}\n\n",
+ "id": "S11.8.4_A4.1"
+ },
+ {
+ "section": "11.8.4, 11.8.5",
+ "description": "x and y are string primitives",
+ "test": "//CHECK#1\nif ((\"x\" >= \"x \") !== false) {\n $ERROR('#1: (\"x\" >= \"x \") === false');\n}\n\n//CHECK#2\nif ((\"\" >= \"x\") !== false) {\n $ERROR('#2: (\"\" >= \"x\") === false');\n}\n\n//CHECK#3\nif ((\"ab\" >= \"abcd\") !== false) {\n $ERROR('#3: (\"ab\" >= abcd\") === false');\n}\n\n//CHECK#4\nif ((\"abcd\" >= \"abc\\u0064\") !== true) {\n $ERROR('#4: (\"abcd\" >= abc\\\\u0064\") === true');\n}\n\n//CHECK#5\nif ((\"x\" >= \"x\" + \"y\") !== false) {\n $ERROR('#5: (\"x\" >= \"x\" + \"y\") === false');\n}\n\n//CHECK#6\nvar x = \"x\";\nif ((x >= x + \"y\") !== false) {\n $ERROR('#6: var x = \"x\"; (x >= x + \"y\") === false');\n}\n",
+ "id": "S11.8.4_A4.10"
+ },
+ {
+ "section": "11.8.4, 11.8.5",
+ "description": "x and y are string primitives",
+ "test": "//CHECK#1\nif ((\"x\" >= \"x\") !== true) {\n $ERROR('#1: (\"x\" >= \"x\") === true');\n}\n\n//CHECK#2\nif ((\"x\" >= \"\") !== true) {\n $ERROR('#2: (\"x\" >= \"\") === true');\n}\n\n//CHECK#3\nif ((\"abcd\" >= \"ab\") !== true) {\n $ERROR('#3: (\"abcd\" >= ab\") === true');\n}\n\n//CHECK#4\nif ((\"abc\\u0064\" >= \"abcd\") !== true) {\n $ERROR('#4: (\"abc\\\\u0064\" >= abc\") === true');\n}\n\n//CHECK#5\nif ((\"x\" + \"y\" >= \"x\") !== true) {\n $ERROR('#5: (\"x\" + \"y\" >= \"x\") === true');\n}\n\n//CHECK#6\nvar x = \"x\";\nif ((x + 'y' >= x) !== true) {\n $ERROR('#6: var x = \"x\"; (x + \"y\" >= x) === true');\n}\n\n//CHECK#7\nif ((\"a\\u0000a\" >= \"a\\u0000\") !== true) {\n $ERROR('#7: (\"a\\\\u0000a\" >= \"a\\\\u0000\") === true');\n}\n\n//CHECK#8\nif ((\" x\" >= \"x\") !== false) {\n $ERROR('#8: (\" x\" >= \"x\") === false');\n}\n\n",
+ "id": "S11.8.4_A4.11"
+ },
+ {
+ "section": "11.8.4, 11.8.5",
+ "description": "x and y are string primitives",
+ "test": "//CHECK#1\nif ((\"xy\" >= \"xx\") !== true) {\n $ERROR('#1: (\"xy\" >= \"xx\") === true');\n}\n\n//CHECK#2\nif ((\"xx\" >= \"xy\") !== false) {\n $ERROR('#2: (\"xx\" >= \"xy\") === false');\n}\n\n//CHECK#3\nif ((\"y\" >= \"x\") !== true) {\n $ERROR('#3: (\"y\" >= \"x\") === true');\n}\n\n//CHECK#4\nif ((\"aba\" >= \"aab\") !== true) {\n $ERROR('#4: (\"aba\" >= aab\") === true');\n}\n\n//CHECK#5\nif ((\"\\u0061\\u0061\\u0061\\u0061\" >= \"\\u0061\\u0061\\u0061\\u0062\") !== false) {\n $ERROR('#5: (\"\\\\u0061\\\\u0061\\\\u0061\\\\u0061\" >= \\\\u0061\\\\u0061\\\\u0061\\\\u0062\") === false');\n}\n\n//CHECK#6\nif ((\"a\\u0000b\" >= \"a\\u0000a\") !== true) {\n $ERROR('#6: (\"a\\\\u0000b\" >= \"a\\\\u0000a\") === true');\n}\n\n//CHECK#7\nif ((\"aa\" >= \"aB\") !== true) {\n $ERROR('#7: (\"aa\" >= aB\") === true');\n}\n",
+ "id": "S11.8.4_A4.12_T1"
+ },
+ {
+ "section": "11.8.4, 11.8.5",
+ "description": "x and y are string primitives",
+ "test": "//CHECK#1\nif ((\"x\" >= \"0\") !== true) {\n $ERROR('#1: (\"x\" >= \"0\") !== true');\n}\n\n//CHECK#2\nif ((\"0\" >= \"-\") !== true) {\n $ERROR('#2: (\"0\" >= \"-\") !== true');\n}\n\n//CHECK#3\nif ((\"0\" >= \".\") !== true) {\n $ERROR('#3: (\"0\" >= \".\") !== true');\n}\n\n//CHECK#4\nif ((\"-\" >= \"+\") !== true) {\n $ERROR('#4: (\"-\" >= \"+\") !== true');\n}\n\n//CHECK#5\nif ((\"-1\" >= \"-0\") !== true) {\n $ERROR('#5: (\"-1\" >= \"-0\") !== true');\n}\n\n//CHECK#6\nif ((\"-1\" >= \"+1\") !== true) {\n $ERROR('#6: (\"-1\" >= \"+1\") !== true');\n}\n\n//CHECK#7\nif ((\"1e-10\" >= \"1\") !== true) {\n$ERROR('#7: (\"1e-10\" >= \"1\") !== true');\n}\n",
+ "id": "S11.8.4_A4.12_T2"
+ },
+ {
+ "section": "11.8.4, 11.8.5",
+ "description": "x is number primitive",
+ "test": "//CHECK#1\nif ((0 >= Number.NaN) !== false) {\n $ERROR('#1: (0 >= NaN) === false');\n}\n\n//CHECK#2\nif ((1.1 >= Number.NaN) !== false) {\n $ERROR('#2: (1.1 >= NaN) === false');\n}\n\n//CHECK#3\nif ((-1.1 >= Number.NaN) !== false) {\n $ERROR('#3: (-1.1 >= NaN) === false');\n}\n\n//CHECK#4\nif ((Number.NaN >= Number.NaN) !== false) {\n $ERROR('#4: (NaN >= NaN) === false');\n}\n\n//CHECK#5\nif ((Number.POSITIVE_INFINITY >= Number.NaN) !== false) {\n $ERROR('#5: (+Infinity >= NaN) === false');\n}\n\n//CHECK#6\nif ((Number.NEGATIVE_INFINITY >= Number.NaN) !== false) {\n $ERROR('#6: (-Infinity >= NaN) === false');\n}\n\n//CHECK#7\nif ((Number.MAX_VALUE >= Number.NaN) !== false) {\n $ERROR('#7: (Number.MAX_VALUE >= NaN) === false');\n}\n\n//CHECK#8\nif ((Number.MIN_VALUE >= Number.NaN) !== false) {\n $ERROR('#8: (Number.MIN_VALUE >= NaN) === false');\n}\n\n",
+ "id": "S11.8.4_A4.2"
+ },
+ {
+ "section": "11.8.4, 11.8.5",
+ "description": "x and y are number primitives",
+ "test": "//CHECK#1\nif ((1 >= 1) !== true) {\n $ERROR('#1: (1 >= 1) === true');\n}\n\n//CHECK#2\nif ((1.1 >= 1.1) !== true) {\n $ERROR('#2: (1.1 >= 1.1) === true');\n}\n\n//CHECK#3\nif ((-1.1 >= -1.1) !== true) {\n $ERROR('#3: (-1.1 >= -1.1) === true');\n}\n\n//CHECK#4\nif ((Number.NEGATIVE_INFINITY >= Number.NEGATIVE_INFINITY) !== true) {\n $ERROR('#4: (-Infinity >= -Infinity) === true');\n}\n\n//CHECK#5\nif ((Number.POSITIVE_INFINITY >= Number.POSITIVE_INFINITY) !== true) {\n $ERROR('#5: (+Infinity >= +Infinity) === true');\n}\n\n//CHECK#6\nif ((Number.MAX_VALUE >= Number.MAX_VALUE) !== true) {\n $ERROR('#6: (Number.MAX_VALUE >= Number.MAX_VALUE) === true');\n}\n\n//CHECK#7\nif ((Number.MIN_VALUE >= Number.MIN_VALUE) !== true) {\n $ERROR('#7: (Number.MIN_VALUE >= Number.MIN_VALUE) === true');\n}\n\n\n",
+ "id": "S11.8.4_A4.3"
+ },
+ {
+ "section": "11.8.4, 11.8.5",
+ "description": "Checking all combinations",
+ "test": "//CHECK#1\nif ((0 >= 0) !== true) {\n $ERROR('#1: (0 >= 0) === true');\n}\n\n//CHECK#2\nif ((-0 >= -0) !== true) {\n $ERROR('#2: (-0 >= -0) === true');\n}\n\n//CHECK#3\nif ((+0 >= -0) !== true) {\n $ERROR('#3: (+0 >= -0) === true');\n}\n\n//CHECK#4\nif ((-0 >= +0) !== true) {\n $ERROR('#4: (-0 >= +0) === true');\n}\n\n",
+ "id": "S11.8.4_A4.4"
+ },
+ {
+ "section": "11.8.4, 11.8.5",
+ "description": "y is number primitive",
+ "test": "//CHECK#1\nif ((Number.POSITIVE_INFINITY >= 0) !== true) {\n $ERROR('#1: (+Infinity >= 0) === true');\n}\n\n//CHECK#2\nif ((Number.POSITIVE_INFINITY >= 1.1) !== true) {\n $ERROR('#2: (+Infinity >= 1.1) === true');\n}\n\n//CHECK#3\nif ((Number.POSITIVE_INFINITY >= -1.1) !== true) {\n $ERROR('#3: (+Infinity >= -1.1) === true');\n}\n\n//CHECK#4\nif ((Number.POSITIVE_INFINITY >= Number.NEGATIVE_INFINITY) !== true) {\n $ERROR('#4: (+Infinity >= -Infinity) === true');\n}\n\n//CHECK#5\nif ((Number.POSITIVE_INFINITY >= Number.MAX_VALUE) !== true) {\n $ERROR('#5: (+Infinity >= Number.MAX_VALUE) === true');\n}\n\n//CHECK#6\nif ((Number.POSITIVE_INFINITY >= Number.MIN_VALUE) !== true) {\n $ERROR('#6: (+Infinity >= Number.MIN_VALUE) === true');\n}\n\n",
+ "id": "S11.8.4_A4.5"
+ },
+ {
+ "section": "11.8.4, 11.8.5",
+ "description": "x is number primitive",
+ "test": "//CHECK#1\nif ((0 >= Number.POSITIVE_INFINITY) !== false) {\n $ERROR('#1: (0 >= +Infinity) === false');\n}\n\n//CHECK#2\nif ((1.1 >= Number.POSITIVE_INFINITY) !== false) {\n $ERROR('#2: (1.1 >= +Infinity) === false');\n}\n\n//CHECK#3\nif ((-1.1 >= Number.POSITIVE_INFINITY) !== false) {\n $ERROR('#3: (-1.1 >= +Infinity) === false');\n}\n\n//CHECK#4\nif ((Number.NEGATIVE_INFINITY >= Number.POSITIVE_INFINITY) !== false) {\n $ERROR('#4: (-Infinity >= +Infinity) === false');\n}\n\n//CHECK#5\nif ((Number.MAX_VALUE >= Number.POSITIVE_INFINITY) !== false) {\n $ERROR('#5: (Number.MAX_VALUE >= +Infinity) === false');\n}\n\n//CHECK#6\nif ((Number.MIN_VALUE >= Number.POSITIVE_INFINITY) !== false) {\n $ERROR('#6: (Number.MIN_VALUE >= +Infinity) === false');\n}\n\n",
+ "id": "S11.8.4_A4.6"
+ },
+ {
+ "section": "11.8.4, 11.8.5",
+ "description": "y is number primitive",
+ "test": "//CHECK#1\nif ((Number.NEGATIVE_INFINITY >= 0) !== false) {\n $ERROR('#1: (-Infinity >= 0) === false');\n}\n\n//CHECK#2\nif ((Number.NEGATIVE_INFINITY >= 1.1) !== false) {\n $ERROR('#2: (-Infinity >= 1.1) === false');\n}\n\n//CHECK#3\nif ((Number.NEGATIVE_INFINITY >= -1.1) !== false) {\n $ERROR('#3: (-Infinity >= -1.1) === false');\n}\n\n//CHECK#4\nif ((Number.NEGATIVE_INFINITY >= Number.POSITIVE_INFINITY) !== false) {\n $ERROR('#4: (-Infinity >= +Infinity) === false');\n}\n\n//CHECK#5\nif ((Number.NEGATIVE_INFINITY >= Number.MAX_VALUE) !== false) {\n $ERROR('#5: (-Infinity >= Number.MAX_VALUE) === false');\n}\n\n//CHECK#6\nif ((Number.NEGATIVE_INFINITY >= Number.MIN_VALUE) !== false) {\n $ERROR('#6: (-Infinity >= Number.MIN_VALUE) === false');\n}\n\n",
+ "id": "S11.8.4_A4.7"
+ },
+ {
+ "section": "11.8.4, 11.8.5",
+ "description": "x is number primitive",
+ "test": "//CHECK#1\nif ((0 >= Number.NEGATIVE_INFINITY) !== true) {\n $ERROR('#1: (0 >= -Infinity) === true');\n}\n\n//CHECK#2\nif ((1.1 >= Number.NEGATIVE_INFINITY) !== true) {\n $ERROR('#2: (1.1 >= -Infinity) === true');\n}\n\n//CHECK#3\nif ((-1.1 >= Number.NEGATIVE_INFINITY) !== true) {\n $ERROR('#3: (-1.1 >= -Infinity) === true');\n}\n\n//CHECK#4\nif ((Number.POSITIVE_INFINITY >= Number.NEGATIVE_INFINITY) !== true) {\n $ERROR('#4: (+Infinity >= -Infinity) === true');\n}\n\n//CHECK#5\nif ((Number.MAX_VALUE >= Number.NEGATIVE_INFINITY) !== true) {\n $ERROR('#5: (Number.MAX_VALUE >= -Infinity) === true');\n}\n\n//CHECK#6\nif ((Number.MIN_VALUE >= Number.NEGATIVE_INFINITY) !== true) {\n $ERROR('#6: (Number.MIN_VALUE >= -Infinity) === true');\n}\n\n",
+ "id": "S11.8.4_A4.8"
+ },
+ {
+ "section": "11.8.4, 11.8.5",
+ "description": "x and y are number primitives",
+ "test": "//CHECK#1\nif ((1 >= 1.1) !== false) {\n $ERROR('#1: (1 >= 1.1) === false');\n}\n\n//CHECK#2\nif ((1.1 >= 1) !== true) {\n $ERROR('#2: (1.1 >= 1) === true');\n}\n\n//CHECK#3\nif ((-1 >= -1.1) !== true) {\n $ERROR('#3: (-1 >= -1.1) === true');\n}\n\n//CHECK#4\nif ((-1.1 >= -1) !== false) {\n $ERROR('#4: (-1.1 >= -1) === false');\n}\n\n//CHECK#5\nif ((0.1 >= 0) !== true) {\n $ERROR('#5: (0.1 >= 0) === true');\n}\n\n//CHECK#6\nif ((0 >= -0.1) !== true) {\n $ERROR('#6: (0 >= -0.1) === true');\n}\n\n//CHECK#7\nif ((Number.MAX_VALUE >= Number.MAX_VALUE/2) !== true) {\n $ERROR('#7: (Number.MAX_VALUE >= Number.MAX_VALUE/2) === true');\n}\n\n//CHECK#8\nif ((Number.MIN_VALUE*2 >= Number.MIN_VALUE) !== true) {\n $ERROR('#8: (Number.MIN_VALUE*2 >= Number.MIN_VALUE) === true');\n}\n\n\n",
+ "id": "S11.8.4_A4.9"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/11.8.6_The_instanceof_operator.json b/website/resources/scripts/testcases2/11.8.6_The_instanceof_operator.json
new file mode 100644
index 000000000..730b69ec5
--- /dev/null
+++ b/website/resources/scripts/testcases2/11.8.6_The_instanceof_operator.json
@@ -0,0 +1,128 @@
+{
+ "testCollection": {
+ "name": "11.8.6_The_instanceof_operator",
+ "numTests": 20,
+ "tests": [
+ {
+ "section": "11.8.6, 7.2, 7.3",
+ "description": "Checking by using eval",
+ "test": "//CHECK#1\nif (eval(\"({})\\u0009instanceof\\u0009Object\") !== true) {\n $ERROR('#1: ({})\\\\u0009instanceof\\\\u0009Object === true');\n}\n\n//CHECK#2\nif (eval(\"({})\\u000Binstanceof\\u000BObject\") !== true) {\n $ERROR('#2: ({})\\\\u000Binstanceof\\\\u000BObject === true'); \n}\n\n//CHECK#3\nif (eval(\"({})\\u000Cinstanceof\\u000CObject\") !== true) {\n $ERROR('#3: ({})\\\\u000Cinstanceof\\\\u000CObject === true');\n}\n\n//CHECK#4\nif (eval(\"({})\\u0020instanceof\\u0020Object\") !== true) {\n $ERROR('#4: ({})\\\\u0020instanceof\\\\u0020Object === true');\n}\n\n//CHECK#5\nif (eval(\"({})\\u00A0instanceof\\u00A0Object\") !== true) {\n $ERROR('#5: ({})\\\\u00A0instanceof\\\\u00A0Object === true');\n}\n\n//CHECK#6\nif (eval(\"({})\\u000Ainstanceof\\u000AObject\") !== true) {\n $ERROR('#6: ({})\\\\u000Ainstanceof\\\\u000AObject === true'); \n}\n\n//CHECK#7\nif (eval(\"({})\\u000Dinstanceof\\u000DObject\") !== true) {\n $ERROR('#7: ({})\\\\u000Dinstanceof\\\\u000DObject === true');\n}\n\n//CHECK#8\nif (eval(\"({})\\u2028instanceof\\u2028Object\") !== true) {\n $ERROR('#8: ({})\\\\u2028instanceof\\\\u2028Object === true');\n}\n\n//CHECK#9\nif (eval(\"({})\\u2029instanceof\\u2029Object\") !== true) {\n $ERROR('#9: ({})\\\\u2029instanceof\\\\u2029Object === true');\n}\n\n//CHECK#10\nif (eval(\"({})\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u2029instanceof\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u2029Object\") !== true) {\n $ERROR('#10: ({})\\\\u0009\\\\u000B\\\\u000C\\\\u0020\\\\u00A0\\\\u000A\\\\u000D\\\\u2028\\\\u2029instanceof\\\\u0009\\\\u000B\\\\u000C\\\\u0020\\\\u00A0\\\\u000A\\\\u000D\\\\u2028\\\\u2029Object === true');\n}\n",
+ "id": "S11.8.6_A1"
+ },
+ {
+ "section": "11.8.6",
+ "description": "Either Expression is not Reference or GetBase is not null",
+ "test": "//CHECK#1\nif (({}) instanceof Object !== true) {\n $ERROR('#1: ({}) instanceof Object === true');\n}\n\n//CHECK#2\nvar object = {};\nif (object instanceof Object !== true) {\n $ERROR('#2: var object = {}; object instanceof Object === true');\n}\n\n//CHECK#3\nvar OBJECT = Object;\nif (({}) instanceof OBJECT !== true) {\n $ERROR('#3: var OBJECT = Object; ({}) instanceof OBJECT === true');\n}\n\n//CHECK#4\nvar object = {};\nvar OBJECT = Object;\nif (object instanceof OBJECT !== true) {\n $ERROR('#4: var object = {}; var OBJECT = Object; object instanceof OBJECT === true');\n}\n\n",
+ "id": "S11.8.6_A2.1_T1"
+ },
+ {
+ "section": "11.8.6",
+ "description": "If GetBase(RelationalExpression) is null, throw ReferenceError",
+ "test": "//CHECK#1\ntry {\n object instanceof Object;\n $ERROR('#1.1: object instanceof Object throw ReferenceError. Actual: ' + (object instanceof Object)); \n}\ncatch (e) {\n if ((e instanceof ReferenceError) !== true) {\n $ERROR('#1.2: object instanceof Object throw ReferenceError. Actual: ' + (e)); \n }\n}\n",
+ "id": "S11.8.6_A2.1_T2"
+ },
+ {
+ "section": "11.8.6",
+ "description": "If GetBase(ShiftExpression) is null, throw ReferenceError",
+ "test": "//CHECK#1\ntry {\n ({}) instanceof OBJECT;\n $ERROR('#1.1: ({}) instanceof OBJECT throw ReferenceError. Actual: ' + (({}) instanceof OBJECT)); \n}\ncatch (e) {\n if ((e instanceof ReferenceError) !== true) {\n $ERROR('#1.2: ({}) instanceof OBJECT throw ReferenceError. Actual: ' + (e)); \n }\n}\n",
+ "id": "S11.8.6_A2.1_T3"
+ },
+ {
+ "section": "11.8.6",
+ "description": "Checking with \"=\"",
+ "test": "//CHECK#1 \nvar OBJECT = 0;\nif ((OBJECT = Object, {}) instanceof OBJECT !== true) {\n $ERROR('#1: var OBJECT = 0; (OBJECT = Object, {}) instanceof OBJECT === true');\n}\n\n//CHECK#2\nvar object = {}; \nif (object instanceof (object = 0, Object) !== true) {\n $ERROR('#2: var object = {}; object instanceof (object = 0, Object) === true');\n}\n\n",
+ "id": "S11.8.6_A2.4_T1"
+ },
+ {
+ "section": "11.8.6",
+ "description": "Checking with \"throw\"",
+ "test": "//CHECK#1\nvar x = function () { throw \"x\"; };\nvar y = function () { throw \"y\"; };\ntry {\n x() instanceof y();\n $ERROR('#1.1: var x = function () { throw \"x\"; }; var y = function () { throw \"y\"; }; x() instanceof y() throw \"x\". Actual: ' + (x() instanceof y()));\n} catch (e) {\n if (e === \"y\") {\n $ERROR('#1.2: First expression is evaluated first, and then second expression');\n } else {\n if (e !== \"x\") {\n $ERROR('#1.3: var x = function () { throw \"x\"; }; var y = function () { throw \"y\"; }; x() instanceof y() throw \"x\". Actual: ' + (e));\n }\n }\n}\n",
+ "id": "S11.8.6_A2.4_T2"
+ },
+ {
+ "section": "11.8.6",
+ "description": "Checking with undeclarated variables",
+ "test": "//CHECK#1\ntry {\n object instanceof (object = {}, Object);\n $ERROR('#1.1: object instanceof (object = {}, Object) throw ReferenceError. Actual: ' + (object instanceof (object = {}, Object))); \n}\ncatch (e) {\n if ((e instanceof ReferenceError) !== true) {\n $ERROR('#1.2: object instanceof (object = {}, Object) throw ReferenceError. Actual: ' + (e)); \n }\n}\n\n//CHECK#2\nif ((OBJECT = Object, {}) instanceof OBJECT !== true) {\n $ERROR('#2: (OBJECT = Object, {}) instanceof OBJECT !== true');\n}\n\n",
+ "id": "S11.8.6_A2.4_T3"
+ },
+ {
+ "section": "11.8.6",
+ "description": "Checking all the types of primitives",
+ "test": "//CHECK#1\ntry {\n true instanceof true;\n $ERROR('#1: true instanceof true throw TypeError'); \n}\ncatch (e) {\n if (e instanceof TypeError !== true) {\n $ERROR('#1: true instanceof true throw TypeError'); \n }\n}\n\n//CHECK#2\ntry {\n 1 instanceof 1;\n $ERROR('#2: 1 instanceof 1 throw TypeError'); \n}\ncatch (e) {\n if (e instanceof TypeError !== true) {\n $ERROR('#2: 1 instanceof 1 throw TypeError'); \n }\n}\n\n//CHECK#3\ntry {\n \"string\" instanceof \"string\";\n $ERROR('#3: \"string\" instanceof \"string\" throw TypeError'); \n}\ncatch (e) {\n if (e instanceof TypeError !== true) {\n $ERROR('#3: \"string\" instanceof \"string\" throw TypeError'); \n }\n}\n\n//CHECK#4\ntry {\n undefined instanceof undefined;\n $ERROR('#4: undefined instanceof undefined throw TypeError'); \n}\ncatch (e) {\n if (e instanceof TypeError !== true) {\n $ERROR('#4: undefined instanceof undefined throw TypeError'); \n }\n}\n\n//CHECK#5\ntry {\n null instanceof null;\n $ERROR('#5: null instanceof null throw TypeError'); \n}\ncatch (e) {\n if (e instanceof TypeError !== true) {\n $ERROR('#5: null instanceof null throw TypeError'); \n }\n}\n",
+ "id": "S11.8.6_A3"
+ },
+ {
+ "section": "11.8.6",
+ "description": "Checking Boolean case",
+ "test": "//CHECK#1\nif (false instanceof Boolean) {\n\t$ERROR('#1: false is not instanceof Boolean');\n}\n\n//CHECK#2\nif (Boolean(false) instanceof Boolean) {\n\t$ERROR('#2: Boolean(false) is not instanceof Boolean');\n}\n\n//CHECK#3\nif (new Boolean instanceof Boolean !== true) {\n\t$ERROR('#3: new Boolean instanceof Boolean');\n}\n\n",
+ "id": "S11.8.6_A4_T1"
+ },
+ {
+ "section": "11.8.6",
+ "description": "Checking Number case",
+ "test": "//CHECK#1\nif (0 instanceof Number) {\n\t$ERROR('#1: 0 is not instanceof Number');\n}\n\n//CHECK#2\nif (Number(0) instanceof Number) {\n\t$ERROR('#2: Number(0) is not instanceof Number');\n}\n\n//CHECK#3\nif (new Number instanceof Number !== true) {\n\t$ERROR('#3: new Number instanceof Number');\n}\n\n",
+ "id": "S11.8.6_A4_T2"
+ },
+ {
+ "section": "11.8.6",
+ "description": "Checking String case",
+ "test": "//CHECK#1\nif (\"\" instanceof String) {\n\t$ERROR('#1: \"\" is not instanceof String');\n}\n\n//CHECK#2\nif (String(\"\") instanceof String) {\n\t$ERROR('#2: String(\"\") is not instanceof String');\n}\n\n//CHECK#3\nif (new String instanceof String !== true) {\n\t$ERROR('#3: new String instanceof String');\n}\n",
+ "id": "S11.8.6_A4_T3"
+ },
+ {
+ "section": "11.8.6",
+ "description": "Checking Error case",
+ "test": "var __err = new Error;\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (!(__err instanceof Error)) {\n\t$ERROR('#1: TypeError is subclass of Error from instanceof operator poit of view');\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (__err instanceof TypeError) {\n\t$ERROR('#2: TypeError is subclass of Error from instanceof operator poit of view');\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\nvar err__ = Error('failed');\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#3\nif (!(err__ instanceof Error)) {\n\t$ERROR('#3: TypeError is subclass of Error from instanceof operator poit of view');\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#4\nif (err__ instanceof TypeError) {\n\t$ERROR('#4: TypeError is subclass of Error from instanceof operator poit of view');\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n",
+ "id": "S11.8.6_A5_T1"
+ },
+ {
+ "section": "11.8.6",
+ "description": "Checking TypeError case",
+ "test": "var __t__err = new TypeError;\n\n//CHECK#1\nif (!(__t__err instanceof Error)) {\n\t$ERROR('#1: TypeError is subclass of Error from instanceof operator poit of view');\n}\n\n//CHECK#2\nif (!(__t__err instanceof TypeError)) {\n\t$ERROR('#2: TypeError is subclass of Error from instanceof operator poit of view');\n}\n\n//////////////////////////////////////////////////////////////////////////////\nvar err__t__ = TypeError('failed');\n\n//CHECK#3\nif (!(err__t__ instanceof Error)) {\n\t$ERROR('#3: TypeError is subclass of Error from instanceof operator poit of view');\n}\n\n//CHECK#4\nif (!(err__t__ instanceof TypeError)) {\n\t$ERROR('#4: TypeError is subclass of Error from instanceof operator poit of view');\n}\n\n",
+ "id": "S11.8.6_A5_T2"
+ },
+ {
+ "section": "11.8.6",
+ "description": "Checking \"this\" case",
+ "test": "//CHECK#1\ntry{\n\t({}) instanceof this;\n\t$ERROR('#1: Only Function objects implement [[HasInstance]] and consequently can be proper ShiftExpression for The instanceof operator');\n}\ncatch(e){\n if (e instanceof TypeError !== true) {\n $ERROR('#1: Only Function objects implement [[HasInstance]] and consequently can be proper ShiftExpression for The instanceof operator');\n }\n}\n",
+ "id": "S11.8.6_A6_T1"
+ },
+ {
+ "section": "11.8.6",
+ "description": "Checking Math case",
+ "test": "//CHECK#1\ntry{\n\t1 instanceof Math;\n\t$ERROR('#1: 1 instanceof Math throw TypeError');\n}\ncatch(e){\n if (e instanceof TypeError !== true) { \n $ERROR('#1: 1 instanceof Math throw TypeError');\n } \n}\n",
+ "id": "S11.8.6_A6_T2"
+ },
+ {
+ "section": "11.8.6",
+ "description": "Checking if RelationalExpression is function",
+ "test": "function MyFunct(){return 0};\n\n//CHECK#1\nif (MyFunct instanceof MyFunct){\n\t$ERROR('#1 function MyFunct(){return 0}; MyFunct instanceof MyFunct === false');\n}\n\n//CHECK#2\nif (MyFunct instanceof Function !== true){\n\t$ERROR('#2 function MyFunct(){return 0}; MyFunct instanceof Function === true');\n}\n\n//CHECK#3\nif (MyFunct instanceof Object !== true){\n\t$ERROR('#3 function MyFunct(){return 0}; MyFunct instanceof Object === true');\n}\n",
+ "id": "S11.8.6_A6_T3"
+ },
+ {
+ "section": "11.8.6",
+ "description": "Checking if RelationalExpression is object",
+ "test": "MyFunct = function(){};\n__my__funct = new MyFunct;\n\n\n//CHECK#1\nif (!(__my__funct instanceof MyFunct)){\n\t$ERROR('#1 Only Function objects implement [[HasInstance]] and consequently can be proper ShiftExpression for The instanceof operator');\n}\n\n//CHECK#2\nif (__my__funct instanceof Function){\n\t$ERROR('#2 Only Function objects implement [[HasInstance]] and consequently can be proper ShiftExpression for The instanceof operator');\n}\n\n//CHECK#3\nif (!(__my__funct instanceof Object)){\n\t$ERROR('#3 Only Function objects implement [[HasInstance]] and consequently can be proper ShiftExpression for The instanceof operator');\n}\n\n//CHECK#4\ntry{\n\t__my__funct instanceof __my__funct;\n\t$ERROR('#4 Only Function objects implement [[HasInstance]] and consequently can be proper ShiftExpression for The instanceof operator');\n}\ncatch(e){ \n\tif (e instanceof TypeError !== true) {\n $ERROR('#4 Only Function objects implement [[HasInstance]] and consequently can be proper ShiftExpression for The instanceof operator');\n\t}\n}\n",
+ "id": "S11.8.6_A6_T4"
+ },
+ {
+ "section": "11.8.6",
+ "description": "Checking Object object",
+ "test": "var __obj={};\n\n//CHECK#1\nif (!(__obj instanceof Object)) {\n\t$ERROR('#1: If instanceof returns true then GetValue(RelationalExpression) was constructed with ShiftExpression');\n}\n\n//CHECK#2\nif (__obj.constructor !== Object) {\n\t$ERROR('#2: If instanceof returns true then GetValue(RelationalExpression) was constructed with ShiftExpression');\n}\n",
+ "id": "S11.8.6_A7_T1"
+ },
+ {
+ "section": "11.8.6",
+ "description": "Checking Array object",
+ "test": "var __arr=[];\n\n//CHECK#1\nif (!(__arr instanceof Array)) {\n\t$ERROR('#1: If instanceof returns true then GetValue(RelationalExpression) was constructed with ShiftExpression');\n}\n\n//CHECK#2\nif (__arr.constructor !== Array) {\n\t$ERROR('#2: If instanceof returns true then GetValue(RelationalExpression) was constructed with ShiftExpression');\n}\n",
+ "id": "S11.8.6_A7_T2"
+ },
+ {
+ "section": "11.8.6",
+ "description": "Checking Function object",
+ "test": "var __func = new Function;\n\n//CHECK#1\nif (!(__func instanceof Function)) {\n\t$ERROR('#1: If instanceof returns true then GetValue(RelationalExpression) was constructed with ShiftExpression');\n}\n\n//CHECK#2\nif (__func.constructor !== Function) {\n\t$ERROR('#2: If instanceof returns true then GetValue(RelationalExpression) was constructed with ShiftExpression');\n}\n\n",
+ "id": "S11.8.6_A7_T3"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/11.8.7_The_in_operator.json b/website/resources/scripts/testcases2/11.8.7_The_in_operator.json
new file mode 100644
index 000000000..63679ee18
--- /dev/null
+++ b/website/resources/scripts/testcases2/11.8.7_The_in_operator.json
@@ -0,0 +1,62 @@
+{
+ "testCollection": {
+ "name": "11.8.7_The_in_operator",
+ "numTests": 9,
+ "tests": [
+ {
+ "section": "11.8.7, 7.2, 7.3",
+ "description": "Checking by using eval",
+ "test": "//CHECK#1\nif (eval(\"'MAX_VALUE'\\u0009in\\u0009Number\") !== true) {\n $ERROR('#1: \"MAX_VALUE\"\\\\u0009in\\\\u0009Number === true');\n}\n\n//CHECK#2\nif (eval(\"'MAX_VALUE'\\u000Bin\\u000BNumber\") !== true) {\n $ERROR('#2: \"MAX_VALUE\"\\\\u000Bin\\\\u000BNumber === true'); \n}\n\n//CHECK#3\nif (eval(\"'MAX_VALUE'\\u000Cin\\u000CNumber\") !== true) {\n $ERROR('#3: \"MAX_VALUE\"\\\\u000Cin\\\\u000CNumber === true');\n}\n\n//CHECK#4\nif (eval(\"'MAX_VALUE'\\u0020in\\u0020Number\") !== true) {\n $ERROR('#4: \"MAX_VALUE\"\\\\u0020in\\\\u0020Number === true');\n}\n\n//CHECK#5\nif (eval(\"'MAX_VALUE'\\u00A0in\\u00A0Number\") !== true) {\n $ERROR('#5: \"MAX_VALUE\"\\\\u00A0in\\\\u00A0Number === true');\n}\n\n//CHECK#6\nif (eval(\"'MAX_VALUE'\\u000Ain\\u000ANumber\") !== true) {\n $ERROR('#6: \"MAX_VALUE\"\\\\u000Ain\\\\u000ANumber === true'); \n}\n\n//CHECK#7\nif (eval(\"'MAX_VALUE'\\u000Din\\u000DNumber\") !== true) {\n $ERROR('#7: \"MAX_VALUE\"\\\\u000Din\\\\u000DNumber === true');\n}\n\n//CHECK#8\nif (eval(\"'MAX_VALUE'\\u2028in\\u2028Number\") !== true) {\n $ERROR('#8: \"MAX_VALUE\"\\\\u2028in\\\\u2028Number === true');\n}\n\n//CHECK#9\nif (eval(\"'MAX_VALUE'\\u2029in\\u2029Number\") !== true) {\n $ERROR('#9: \"MAX_VALUE\"\\\\u2029in\\\\u2029Number === true');\n}\n\n//CHECK#10\nif (eval(\"'MAX_VALUE'\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u2029in\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u2029Number\") !== true) {\n $ERROR('#10: \"MAX_VALUE\"\\\\u0009\\\\u000B\\\\u000C\\\\u0020\\\\u00A0\\\\u000A\\\\u000D\\\\u2028\\\\u2029in\\\\u0009\\\\u000B\\\\u000C\\\\u0020\\\\u00A0\\\\u000A\\\\u000D\\\\u2028\\\\u2029Number === true');\n}\n",
+ "id": "S11.8.7_A1"
+ },
+ {
+ "section": "11.8.7",
+ "description": "Either Expression is not Reference or GetBase is not null",
+ "test": "//CHECK#1\nif (\"MAX_VALUE\" in Number !== true) {\n $ERROR('#1: \"MAX_VALUE\" in Number === true');\n}\n\n//CHECK#2\nvar x = \"MAX_VALUE\";\nif (x in Number !== true) {\n $ERROR('#2: var x = \"MAX_VALUE\"; x in Number === true');\n}\n\n//CHECK#3\nvar y = Number;\nif (\"MAX_VALUE\" in y !== true) {\n $ERROR('#3: var y = Number; \"MAX_VALUE\" in y === true');\n}\n\n//CHECK#4\nvar x = \"MAX_VALUE\";\nvar y = Number;\nif (x in y !== true) {\n $ERROR('#4: var x = \"MAX_VALUE\"; var y = Number; x in y === true');\n}\n\n",
+ "id": "S11.8.7_A2.1_T1"
+ },
+ {
+ "section": "11.8.7",
+ "description": "If GetBase(RelationalExpression) is null, throw ReferenceError",
+ "test": "//CHECK#1\ntry {\n MAX_VALUE in Number;\n $ERROR('#1.1: MAX_VALUE in Number throw ReferenceError. Actual: ' + (MAX_VALUE in Number)); \n}\ncatch (e) {\n if ((e instanceof ReferenceError) !== true) {\n $ERROR('#1.2: MAX_VALUE in Number throw ReferenceError. Actual: ' + (e)); \n }\n}\n",
+ "id": "S11.8.7_A2.1_T2"
+ },
+ {
+ "section": "11.8.7",
+ "description": "If GetBase(ShiftExpression) is null, throw ReferenceError",
+ "test": "//CHECK#1\ntry {\n \"MAX_VALUE\" in NUMBER;\n $ERROR('#1.1: \"MAX_VALUE\" in NUMBER throw ReferenceError. Actual: ' + (\"MAX_VALUE\" in NUMBER)); \n}\ncatch (e) {\n if ((e instanceof ReferenceError) !== true) {\n $ERROR('#1.2: \"MAX_VALUE\" in NUMBER throw ReferenceError. Actual: ' + (e)); \n }\n}\n",
+ "id": "S11.8.7_A2.1_T3"
+ },
+ {
+ "section": "11.8.7",
+ "description": "Checking with \"=\"",
+ "test": "//CHECK#1 \nvar NUMBER = 0;\nif ((NUMBER = Number, \"MAX_VALUE\") in NUMBER !== true) {\n $ERROR('#1: var NUMBER = 0; (NUMBER = Number, \"MAX_VALUE\") in NUMBER === true');\n}\n\n//CHECK#2\nvar max_value = \"MAX_VALUE\"; \nif (max_value in (max_value = \"none\", Number) !== true) {\n $ERROR('#2: var max_value = \"MAX_VALUE\"; max_value in (max_value = \"none\", Number) === true');\n}\n\n",
+ "id": "S11.8.7_A2.4_T1"
+ },
+ {
+ "section": "11.8.7",
+ "description": "Checking with \"throw\"",
+ "test": "//CHECK#1\nvar x = function () { throw \"x\"; };\nvar y = function () { throw \"y\"; };\ntry {\n x() in y();\n $ERROR('#1.1: var x = function () { throw \"x\"; }; var y = function () { throw \"y\"; }; x() in y() throw \"x\". Actual: ' + (x() in y()));\n} catch (e) {\n if (e === \"y\") {\n $ERROR('#1.2: First expression is evaluated first, and then second expression');\n } else {\n if (e !== \"x\") {\n $ERROR('#1.3: var x = function () { throw \"x\"; }; var y = function () { throw \"y\"; }; x() in y() throw \"x\". Actual: ' + (e));\n }\n }\n}\n",
+ "id": "S11.8.7_A2.4_T2"
+ },
+ {
+ "section": "11.8.7",
+ "description": "Checking with undeclarated variables",
+ "test": "//CHECK#1\ntry {\n max_value in (max_value = \"MAX_VALUE\", Number);\n $ERROR('#1.1: max_value in (max_value = \"MAX_VALUE\", Number) throw ReferenceError. Actual: ' + (max_value in (max_value = \"MAX_VALUE\", Number))); \n}\ncatch (e) {\n if ((e instanceof ReferenceError) !== true) {\n $ERROR('#1.2: max_value in (max_value = \"MAX_VALUE\", Number) throw ReferenceError. Actual: ' + (e)); \n }\n}\n\n//CHECK#2\nif ((NUMBER = Number, \"MAX_VALUE\") in NUMBER !== true) {\n $ERROR('#2: (NUMBER = Number, \"MAX_VALUE\") in NUMBER !== true');\n}\n\n",
+ "id": "S11.8.7_A2.4_T3"
+ },
+ {
+ "section": "11.8.7",
+ "description": "Checking all the types of primitives",
+ "test": "//CHECK#1\ntry {\n \"toString\" in true;\n $ERROR('#1: \"toString\" in true throw TypeError'); \n}\ncatch (e) {\n if ((e instanceof TypeError) !== true) {\n $ERROR('#1: \"toString\" in true throw TypeError'); \n }\n}\n\n//CHECK#2\ntry {\n \"MAX_VALUE\" in 1;\n $ERROR('#2: \"MAX_VALUE\" in 1 throw TypeError'); \n}\ncatch (e) {\n if ((e instanceof TypeError) !== true) {\n $ERROR('#2: \"MAX_VALUE\" in 1 throw TypeError'); \n }\n}\n\n//CHECK#3\ntry {\n \"length\" in \"string\";\n $ERROR('#3: \"length\" in \"string\" throw TypeError'); \n}\ncatch (e) {\n if ((e instanceof TypeError) !== true) {\n $ERROR('#3: \"length\" in \"string\" throw TypeError'); \n }\n}\n\n//CHECK#4\ntry {\n \"toString\" in undefined;\n $ERROR('#4: \"toString\" in undefined throw TypeError'); \n}\ncatch (e) {\n if ((e instanceof TypeError) !== true) {\n $ERROR('#4: \"toString\" in undefined throw TypeError'); \n }\n}\n\n//CHECK#5\ntry {\n \"toString\" in null;\n $ERROR('#5: \"toString\" in null throw TypeError'); \n}\ncatch (e) {\n if ((e instanceof TypeError) !== true) {\n $ERROR('#5: \"toString\" in null throw TypeError'); \n }\n}\n",
+ "id": "S11.8.7_A3"
+ },
+ {
+ "section": "11.8.7, 9.8",
+ "description": ": Checking ToString coversion;;",
+ "test": "//CHECK#1\nvar object = {};\nobject[\"true\"] = 1;\nif (true in object !== \"true\" in object) { \n $ERROR('#1: \"var object = {}; object[\"true\"] = 1; true in object === \"true\" in object'); \n}\n\n//CHECK#2\nvar object = {};\nobject.Infinity = 1;\nif (Infinity in object !== \"Infinity\" in object) { \n $ERROR('#2: \"var object = {}; object.Infinity = 1; Infinity in object === \"Infinity\" in object'); \n}\n\n//CHECK#4\nvar object = {};\nobject.undefined = 1;\nif (undefined in object !== \"undefined\" in object) { \n $ERROR('#4: \"var object = {}; object.undefined = 1; undefined in object === \"undefined\" in object'); \n}\n\n//CHECK#5\nvar object = {};\nobject[\"null\"] = 1;\nif (null in object !== \"null\" in object) { \n $ERROR('#5: \"var object = {}; object[\"null\"] = 1; null in object === \"null\" in object'); \n}\n",
+ "id": "S11.8.7_A4"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/11.9.1_The_Equals_Operator.json b/website/resources/scripts/testcases2/11.9.1_The_Equals_Operator.json
new file mode 100644
index 000000000..081ff02bf
--- /dev/null
+++ b/website/resources/scripts/testcases2/11.9.1_The_Equals_Operator.json
@@ -0,0 +1,182 @@
+{
+ "testCollection": {
+ "name": "11.9.1_The_Equals_Operator",
+ "numTests": 29,
+ "tests": [
+ {
+ "section": "11.9.1, 7.2, 7.3",
+ "description": "Checking by using eval",
+ "test": "//CHECK#1\nif (eval(\"true\\u0009==\\u00091\") !== true) {\n $ERROR('#1: (true\\\\u0009==\\\\u00091) === true');\n}\n\n//CHECK#2\nif (eval(\"true\\u000B==\\u000B1\") !== true) {\n $ERROR('#2: (true\\\\u000B==\\\\u000B1) === true'); \n}\n\n//CHECK#3\nif (eval(\"true\\u000C==\\u000C1\") !== true) {\n $ERROR('#3: (true\\\\u000C==\\\\u000C1) === true');\n}\n\n//CHECK#4\nif (eval(\"true\\u0020==\\u00201\") !== true) {\n $ERROR('#4: (true\\\\u0020==\\\\u00201) === true');\n}\n\n//CHECK#5\nif (eval(\"true\\u00A0==\\u00A01\") !== true) {\n $ERROR('#5: (true\\\\u00A0==\\\\u00A01) === true');\n}\n\n//CHECK#6\nif (eval(\"true\\u000A==\\u000A1\") !== true) {\n $ERROR('#6: (true\\\\u000A==\\\\u000A1) === true'); \n}\n\n//CHECK#7\nif (eval(\"true\\u000D==\\u000D1\") !== true) {\n $ERROR('#7: (true\\\\u000D==\\\\u000D1) === true');\n}\n\n//CHECK#8\nif (eval(\"true\\u2028==\\u20281\") !== true) {\n $ERROR('#8: (true\\\\u2028==\\\\u20281) === true');\n}\n\n//CHECK#9\nif (eval(\"true\\u2029==\\u20291\") !== true) {\n $ERROR('#9: (true\\\\u2029==\\\\u20291) === true');\n}\n\n//CHECK#10\nif (eval(\"true\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u2029==\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u20291\") !== true) {\n $ERROR('#10: (true\\\\u0009\\\\u000B\\\\u000C\\\\u0020\\\\u00A0\\\\u000A\\\\u000D\\\\u2028\\\\u2029==\\\\u0009\\\\u000B\\\\u000C\\\\u0020\\\\u00A0\\\\u000A\\\\u000D\\\\u2028\\\\u20291) === true');\n}\n",
+ "id": "S11.9.1_A1"
+ },
+ {
+ "section": "11.9.1",
+ "description": "Either Type is not Reference or GetBase is not null",
+ "test": "//CHECK#1\nif ((1 == 1) !== true) {\n $ERROR('#1: (1 == 1) === true');\n}\n\n//CHECK#2\nvar x = 1;\nif ((x == 1) !== true) {\n $ERROR('#2: var x = 1; (x == 1) === true');\n}\n\n//CHECK#3\nvar y = 1;\nif ((1 == y) !== true) {\n $ERROR('#3: var y = 1; (1 == y) === true');\n}\n\n//CHECK#4\nvar x = 1;\nvar y = 1;\nif ((x == y) !== true) {\n $ERROR('#4: var x = 1; var y = 1; (x == y) === true');\n}\n\n//CHECK#5\nvar objectx = new Object();\nvar objecty = new Object();\nobjectx.prop = 1;\nobjecty.prop = 1;\nif ((objectx.prop == objecty.prop) !== true) {\n $ERROR('#5: var objectx = new Object(); var objecty = new Object(); objectx.prop = 1; objecty.prop = 1; (objectx.prop == objecty.prop) === true');\n}\n",
+ "id": "S11.9.1_A2.1_T1"
+ },
+ {
+ "section": "11.9.1",
+ "description": "If GetBase(x) is null, throw ReferenceError",
+ "test": "//CHECK#1\ntry {\n x == 1;\n $ERROR('#1.1: x == 1 throw ReferenceError. Actual: ' + (x == 1)); \n}\ncatch (e) {\n if ((e instanceof ReferenceError) !== true) {\n $ERROR('#1.2: x == 1 throw ReferenceError. Actual: ' + (e)); \n }\n}\n\n",
+ "id": "S11.9.1_A2.1_T2"
+ },
+ {
+ "section": "11.9.1",
+ "description": "If GetBase(y) is null, throw ReferenceError",
+ "test": "//CHECK#1\ntry {\n 1 == y;\n $ERROR('#1.1: 1 == y throw ReferenceError. Actual: ' + (1 == y)); \n}\ncatch (e) {\n if ((e instanceof ReferenceError) !== true) {\n $ERROR('#1.2: 1 == y throw ReferenceError. Actual: ' + (e)); \n }\n}\n\n",
+ "id": "S11.9.1_A2.1_T3"
+ },
+ {
+ "section": "11.9.1",
+ "description": "Checking with \"=\"",
+ "test": "//CHECK#1\nvar x = 0; \nif (((x = 1) == x) !== true) {\n $ERROR('#1: var x = 0; ((x = 1) == x) === true');\n}\n\n//CHECK#2\nvar x = 0; \nif ((x == (x = 1)) !== false) {\n $ERROR('#2: var x = 0; (x == (x = 1)) === false');\n}\n\n",
+ "id": "S11.9.1_A2.4_T1"
+ },
+ {
+ "section": "11.9.1",
+ "description": "Checking with \"throw\"",
+ "test": "//CHECK#1\nvar x = function () { throw \"x\"; };\nvar y = function () { throw \"y\"; };\ntry {\n x() == y();\n $ERROR('#1.1: var x = function () { throw \"x\"; }; var y = function () { throw \"y\"; }; x() == y() throw \"x\". Actual: ' + (x() == y()));\n} catch (e) {\n if (e === \"y\") {\n $ERROR('#1.2: First expression is evaluated first, and then second expression');\n } else {\n if (e !== \"x\") {\n $ERROR('#1.3: var x = function () { throw \"x\"; }; var y = function () { throw \"y\"; }; x() == y() throw \"x\". Actual: ' + (e));\n }\n }\n}\n",
+ "id": "S11.9.1_A2.4_T2"
+ },
+ {
+ "section": "11.9.1",
+ "description": "Checking with undeclarated variables",
+ "test": "//CHECK#1\ntry {\n x == (x = 1);\n $ERROR('#1.1: x == (x = 1) throw ReferenceError. Actual: ' + (x == (x = 1))); \n}\ncatch (e) {\n if ((e instanceof ReferenceError) !== true) {\n $ERROR('#1.2: x == (x = 1) throw ReferenceError. Actual: ' + (e)); \n }\n}\n\n//CHECK#2\nif (((y = 1) == y) !== true) {\n $ERROR('#2: ((y = 1) == y) === true');\n}\n\n",
+ "id": "S11.9.1_A2.4_T3"
+ },
+ {
+ "section": "11.9.1, 11.9.3",
+ "description": "x and y are boolean primitives",
+ "test": "//CHECK#1\nif ((true == true) !== true) {\n $ERROR('#1: (true == true) === true');\n}\n\n//CHECK#2\nif ((false == false) !== true) {\n $ERROR('#2: (false == false) === true');\n}\n\n//CHECK#3\nif ((true == false) !== false) {\n $ERROR('#3: (true == false) === false');\n}\n\n//CHECK#4\nif ((false == true) !== false) {\n $ERROR('#4: (false == true) === false');\n}\n",
+ "id": "S11.9.1_A3.1"
+ },
+ {
+ "section": "11.9.1, 11.9.3",
+ "description": "x is primitive boolean, y is primitive number",
+ "test": "//CHECK#1\nif ((true == 1) !== true) {\n $ERROR('#1: (true == 1) === true');\n}\n\n//CHECK#2\nif ((false == \"0\") !== true) {\n $ERROR('#2: (false == \"0\") === true');\n}\n",
+ "id": "S11.9.1_A3.2"
+ },
+ {
+ "section": "11.9.1, 11.9.3",
+ "description": "x is primitive number, y is primitive boolean",
+ "test": "//CHECK#1\nif ((0 == false) !== true) {\n $ERROR('#1: (0 == false) === true');\n}\n\n//CHECK#2\nif ((\"1\" == true) !== true) {\n $ERROR('#2: (\"1\" == true) === true');\n}\n",
+ "id": "S11.9.1_A3.3"
+ },
+ {
+ "section": "11.9.1, 11.9.3",
+ "description": "x is NaN",
+ "test": "//CHECK#1\nif ((Number.NaN == true) !== false) {\n $ERROR('#1: (NaN == true) === false');\n}\n\n//CHECK#2\nif ((Number.NaN == 1) !== false) {\n $ERROR('#2: (NaN == 1) === false');\n}\n\n//CHECK#3\nif ((Number.NaN == Number.NaN) !== false) {\n $ERROR('#3: (NaN == NaN) === false');\n}\n\n//CHECK#4\nif ((Number.NaN == Number.POSITIVE_INFINITY) !== false) {\n $ERROR('#4: (NaN == +Infinity) === false');\n}\n\n//CHECK#5\nif ((Number.NaN == Number.NEGATIVE_INFINITY) !== false) {\n $ERROR('#5: (NaN == -Infinity) === false');\n}\n\n//CHECK#6\nif ((Number.NaN == Number.MAX_VALUE) !== false) {\n $ERROR('#6: (NaN == Number.MAX_VALUE) === false');\n}\n\n//CHECK#7\nif ((Number.NaN == Number.MIN_VALUE) !== false) {\n $ERROR('#7: (NaN == Number.MIN_VALUE) === false');\n}\n\n//CHECK#8\nif ((Number.NaN == \"string\") !== false) {\n $ERROR('#8: (NaN == \"string\") === false');\n}\n\n//CHECK#9\nif ((Number.NaN == new Object()) !== false) {\n $ERROR('#9: (NaN == new Object()) === false');\n}\n\n",
+ "id": "S11.9.1_A4.1_T1"
+ },
+ {
+ "section": "11.9.1, 11.9.3",
+ "description": "y is NaN",
+ "test": "//CHECK#1\nif ((true == Number.NaN) !== false) {\n $ERROR('#1: (true == NaN) === false');\n}\n\n//CHECK#2\nif ((-1 == Number.NaN) !== false) {\n $ERROR('#2: (-1 == NaN) === false');\n}\n\n//CHECK#3\nif ((Number.NaN == Number.NaN) !== false) {\n $ERROR('#3: (NaN == NaN) === false');\n}\n\n//CHECK#4\nif ((Number.POSITIVE_INFINITY == Number.NaN) !== false) {\n $ERROR('#4: (+Infinity == NaN) === false');\n}\n\n//CHECK#5\nif ((Number.NEGATIVE_INFINITY == Number.NaN) !== false) {\n $ERROR('#5: (-Infinity == NaN) === false');\n}\n\n//CHECK#6\nif ((Number.MAX_VALUE == Number.NaN) !== false) {\n $ERROR('#6: (Number.MAX_VALUE == NaN) === false');\n}\n\n//CHECK#7\nif ((Number.MIN_VALUE == Number.NaN) !== false) {\n $ERROR('#7: (Number.MIN_VALUE == NaN) === false');\n}\n\n//CHECK#8\nif ((\"string\" == Number.NaN) !== false) {\n $ERROR('#8: (\"string\" == NaN) === false');\n}\n\n//CHECK#9\nif ((new Object() == Number.NaN) !== false) {\n $ERROR('#9: (new Object() == NaN) === false');\n}\n",
+ "id": "S11.9.1_A4.1_T2"
+ },
+ {
+ "section": "11.9.1, 11.9.3",
+ "description": "Checking all combinations",
+ "test": "//CHECK#1\nif ((+0 == -0) !== true) {\n $ERROR('#1: (+0 == -0) === true');\n}\n\n//CHECK#2\nif ((-0 == +0) !== true) {\n $ERROR('#2: (-0 == +0) === true');\n}\n",
+ "id": "S11.9.1_A4.2"
+ },
+ {
+ "section": "11.9.1, 11.9.3",
+ "description": "x and y are primitive numbers",
+ "test": "//CHECK#1\nif ((Number.POSITIVE_INFINITY == Number.POSITIVE_INFINITY) !== true) {\n $ERROR('#1: (+Infinity == +Infinity) === true');\n}\n\n//CHECK#2\nif ((Number.NEGATIVE_INFINITY == Number.NEGATIVE_INFINITY) !== true) {\n $ERROR('#2: (-Infinity == -Infinity) === true');\n}\n\n//CHECK#3\nif ((Number.POSITIVE_INFINITY == -Number.NEGATIVE_INFINITY) !== true) {\n $ERROR('#3: (+Infinity == -(-Infinity)) === true');\n}\n\n//CHECK#4\nif ((1 == 0.999999999999) !== false) {\n $ERROR('#4: (1 == 0.999999999999) === false');\n}\n\n//CHECK#5\nif ((1.0 == 1) !== true) {\n $ERROR('#5: (1.0 == 1) === true');\n}\n",
+ "id": "S11.9.1_A4.3"
+ },
+ {
+ "section": "11.9.1, 11.9.3",
+ "description": "x and y are primitive string",
+ "test": "//CHECK#1\nif ((\"\" == \"\") !== true) {\n $ERROR('#1: (\"\" == \"\") === true');\n}\n\n//CHECK#2\nif ((\" \" == \" \") !== true) {\n $ERROR('#2: \" (\" == \" \") === true');\n}\n\n//CHECK#3\nif ((\" \" == \"\") !== false) {\n $ERROR('#3: \" (\" == \"\") === false');\n}\n\n//CHECK#4\nif ((\"string\" == \"string\") !== true) {\n $ERROR('#4: (\"string\" == \"string\") === true');\n}\n\n//CHECK#5\nif ((\" string\" == \"string \") !== false) {\n $ERROR('#5: (\" string\" == \"string \") === false');\n}\n\n//CHECK#6\nif ((\"1.0\" == \"1\") !== false) {\n $ERROR('#6: (\"1.0\" == \"1\") === false');\n}\n\n//CHECK#7\nif ((\"0xff\" == \"255\") !== false) {\n $ERROR('#7: (\"0xff\" == \"255\") === false');\n}\n",
+ "id": "S11.9.1_A5.1"
+ },
+ {
+ "section": "11.9.1, 11.9.3",
+ "description": "x is primitive number, y is primitive string",
+ "test": "//CHECK#1\nif ((1 == \"1\") !== true) {\n $ERROR('#1: (1 == \"1\") === true');\n}\n\n//CHECK#2\nif ((1.100 == \"+1.10\") !== true) {\n $ERROR('#2: (1.100 == \"+1.10\") === true');\n}\n\n//CHECK#3\nif ((1 == \"true\") !== false) {\n $ERROR('#3: (1 == \"true\") === false');\n}\n\n//CHECK#4\nif ((255 == \"0xff\") !== true) {\n $ERROR('#4: (255 == \"0xff\") === true');\n}\n\n//CHECK#5\nif ((0 == \"\") !== true) {\n $ERROR('#5: (0 == \"\") === true');\n}\n",
+ "id": "S11.9.1_A5.2"
+ },
+ {
+ "section": "11.9.1, 11.9.3",
+ "description": "x is primitive string, y is primitive number",
+ "test": "//CHECK#1\nif ((\"-1\" == -1) !== true) {\n $ERROR('#1: (\"-1\" == -1) === true');\n}\n\n//CHECK#2\nif ((\"-1.100\" == -1.10) !== true) {\n $ERROR('#2: (\"-1.100\" == -1.10) === true');\n}\n\n//CHECK#3\nif ((\"false\" == 0) !== false) {\n $ERROR('#3: (\"false\" == 0) === false');\n}\n\n//CHECK#4\nif ((\"5e-324\" == 5e-324) !== true) {\n $ERROR('#4: (\"5e-324\" == 5e-324) === true');\n}\n\n",
+ "id": "S11.9.1_A5.3"
+ },
+ {
+ "section": "11.9.1, 11.9.3",
+ "description": "Checking all combinations",
+ "test": "//CHECK#1\nif ((undefined == undefined) !== true) {\n $ERROR('#1: (undefined == undefined) === true');\n}\n\n//CHECK#2\nif ((void 0 == undefined) !== true) {\n $ERROR('#2: (void 0 == undefined) === true');\n}\n\n//CHECK#3\nif ((undefined == eval(\"var x\")) !== true) {\n $ERROR('#3: (undefined == eval(\"var x\")) === true');\n}\n\n//CHECK#4\nif ((undefined == null) !== true) {\n $ERROR('#4: (undefined == null) === true');\n}\n\n//CHECK#5\nif ((null == void 0) !== true) {\n $ERROR('#5: (null == void 0) === true');\n}\n\n//CHECK#6\nif ((null == null) !== true) {\n $ERROR('#6: (null == null) === true');\n}\n",
+ "id": "S11.9.1_A6.1"
+ },
+ {
+ "section": "11.9.1, 11.9.3",
+ "description": "x is null or undefined, y is not",
+ "test": "//CHECK#1\nif ((undefined == true) !== false) {\n $ERROR('#1: (undefined == true) === false');\n}\n\n//CHECK#2\nif ((undefined == 0) !== false) {\n $ERROR('#2: (undefined == 0) === false');\n}\n\n//CHECK#3\nif ((undefined == \"undefined\") !== false) {\n $ERROR('#3: (undefined == \"undefined\") === false');\n}\n\n//CHECK#4\nif ((undefined == {}) !== false) {\n $ERROR('#4: (undefined == {}) === false');\n}\n\n//CHECK#5\nif ((null == false) !== false) {\n $ERROR('#5: (null == false) === false');\n}\n\n//CHECK#6\nif ((null == 0) !== false) {\n $ERROR('#6: (null == 0) === false');\n}\n\n//CHECK#7\nif ((null == \"null\") !== false) {\n $ERROR('#7: (null == \"null\") === false');\n}\n\n//CHECK#8\nif ((null == {}) !== false) {\n $ERROR('#8: (null == {}) === false');\n}\n",
+ "id": "S11.9.1_A6.2_T1"
+ },
+ {
+ "section": "11.9.1, 11.9.3",
+ "description": "y is null or undefined, x is not",
+ "test": "//CHECK#1\nif ((false == undefined) !== false) {\n $ERROR('#1: (false == undefined) === false');\n}\n\n//CHECK#2\nif ((Number.NaN == undefined) !== false) {\n $ERROR('#2: (Number.NaN == undefined) === false');\n}\n\n//CHECK#3\nif ((\"undefined\" == undefined) !== false) {\n $ERROR('#3: (\"undefined\" == undefined) === false');\n}\n\n//CHECK#4\nif (({} == undefined) !== false) {\n $ERROR('#4: ({} == undefined) === false');\n}\n\n//CHECK#5\nif ((false == null) !== false) {\n $ERROR('#5: (false == null) === false');\n}\n\n//CHECK#6\nif ((0 == null) !== false) {\n $ERROR('#6: (0 == null) === false');\n}\n\n//CHECK#7\nif ((\"null\" == null) !== false) {\n $ERROR('#7: (\"null\" == null) === false');\n}\n\n//CHECK#8\nif (({} == null) !== false) {\n $ERROR('#8: ({} == null) === false');\n}\n",
+ "id": "S11.9.1_A6.2_T2"
+ },
+ {
+ "section": "11.9.1, 11.9.3",
+ "description": "Checking Boolean object, Number object, String object, Object object",
+ "test": "//CHECK#1\nif ((new Boolean(true) == new Boolean(true)) !== false) {\n $ERROR('#1: (new Boolean(true) == new Boolean(true)) === false');\n}\n\n//CHECK#2\nif ((new Number(1) == new Number(1)) !== false) {\n $ERROR('#2: (new Number(1) == new Number(1)) === false');\n}\n\n//CHECK#3\nif ((new String(\"x\") == new String(\"x\")) !== false) {\n $ERROR('#3: (new String(\"x\") == new String(\"x\")) === false');\n}\n\n//CHECK#4\nif ((new Object() == new Object()) !== false) {\n $ERROR('#4: (new Object() == new Object()) === false');\n}\n\n//CHECK#5\nx = {}; \ny = x;\nif ((x == y) !== true) {\n $ERROR('#5: x = {}; y = x; (x == y) === true');\n}\n\n//CHECK#6\nif ((new Boolean(true) == new Number(1)) !== false) {\n $ERROR('#6 (new Boolean(true) == new Number(1)) === false');\n}\n\n//CHECK#7\nif ((new Number(1) == new String(\"1\")) !== false) {\n $ERROR('#7: (new Number(1) == new String(\"1\")) === false');\n}\n\n//CHECK#8\nif ((new String(\"1\") == new Boolean(true)) !== false) {\n $ERROR('#8: (new String(\"x\") == new Boolean(true)) === false');\n}\n",
+ "id": "S11.9.1_A7.1"
+ },
+ {
+ "section": "11.9.1, 11.9.3",
+ "description": "x is object, y is primitive boolean",
+ "test": "//CHECK#1\nif ((new Boolean(true) == true) !== true) {\n $ERROR('#1: (new Boolean(true) == true) === true');\n}\n\n//CHECK#2\nif ((new Number(1) == true) !== true) {\n $ERROR('#2: (new Number(1) == true) === true');\n}\n\n//CHECK#3\nif ((new String(\"1\") == true) !== true) {\n $ERROR('#3: (new String(\"1\") == true) === true');\n}\n",
+ "id": "S11.9.1_A7.2"
+ },
+ {
+ "section": "11.9.1, 11.9.3",
+ "description": "y is object, x is primitive boolean",
+ "test": "//CHECK#1\nif ((true == new Boolean(true)) !== true) {\n $ERROR('#1: (true == new Boolean(true)) === true');\n}\n\n//CHECK#2\nif ((true == new Number(1)) !== true) {\n $ERROR('#2: (true == new Number(1)) === true');\n}\n\n//CHECK#3\nif ((true == new String(\"+1\")) !== true) {\n $ERROR('#3: (true == new String(\"+1\")) === true');\n}\n",
+ "id": "S11.9.1_A7.3"
+ },
+ {
+ "section": "11.9.1, 11.9.3",
+ "description": "x is object, y is primitive number",
+ "test": "//CHECK#1\nif ((new Boolean(true) == 1) !== true) {\n $ERROR('#1: (new Boolean(true) == 1) === true');\n}\n\n//CHECK#2\nif ((new Number(-1) == -1) !== true) {\n $ERROR('#2: (new Number(-1) == -1) === true');\n}\n\n//CHECK#3\nif ((new String(\"-1\") == -1) !== true) {\n $ERROR('#3: (new String(\"-1\") == -1) === true');\n}\n",
+ "id": "S11.9.1_A7.4"
+ },
+ {
+ "section": "11.9.1, 11.9.3",
+ "description": "y is object, x is primitive number",
+ "test": "//CHECK#1\nif ((1 == new Boolean(true)) !== true) {\n $ERROR('#1: (1 == new Boolean(true)) === true');\n}\n\n//CHECK#2\nif ((-1 == new Number(-1)) !== true) {\n $ERROR('#2: (-1 == new Number(-1)) === true');\n}\n\n//CHECK#3\nif ((-1 == new String(\"-1\")) !== true) {\n $ERROR('#3: (-1 == new String(\"-1\")) === true');\n}\n",
+ "id": "S11.9.1_A7.5"
+ },
+ {
+ "section": "11.9.1, 11.9.3",
+ "description": "x is object, y is primitive string",
+ "test": "//CHECK#1\nif ((new Boolean(true) == \"1\") !== true) {\n $ERROR('#1: (new Boolean(true) == \"1\") === true');\n}\n\n//CHECK#2\nif ((new Number(-1) == \"-1\") !== true) {\n $ERROR('#2: (new Number(-1) == \"-1\") === true');\n}\n\n//CHECK#3\nif ((new String(\"x\") == \"x\") !== true) {\n $ERROR('#3: (new String(\"x\") == \"x\") === true');\n}\n",
+ "id": "S11.9.1_A7.6"
+ },
+ {
+ "section": "11.9.1, 11.9.3",
+ "description": "y is object, x is primitive string",
+ "test": "//CHECK#1\nif ((\"1\" == new Boolean(true)) !== true) {\n $ERROR('#1: (\"1\" == new Boolean(true)) === true');\n}\n\n//CHECK#2\nif ((\"-1\" == new Number(-1)) !== true) {\n $ERROR('#2: (\"-1\" == new Number(-1)) === true');\n}\n\n//CHECK#3\nif ((\"x\" == new String(\"x\")) !== true) {\n $ERROR('#3: (\"x\" == new String(\"x\")) === true');\n}\n",
+ "id": "S11.9.1_A7.7"
+ },
+ {
+ "section": "11.9.1, 11.9.3",
+ "description": "x is object, y is primtitive",
+ "test": "//CHECK#1\nif (({valueOf: function() {return 1}} == true) !== true) {\n $ERROR('#1: ({valueOf: function() {return 1}} == true) === true');\n}\n\n//CHECK#2\nif (({valueOf: function() {return 1}, toString: function() {return 0}} == 1) !== true) {\n $ERROR('#2: ({valueOf: function() {return 1}, toString: function() {return 0}} == 1) === true');\n}\n\n//CHECK#3\nif (({valueOf: function() {return 1}, toString: function() {return {}}} == \"+1\") !== true) {\n $ERROR('#3: ({valueOf: function() {return 1}, toString: function() {return {}}} == \"+1\") === true');\n} \n \n//CHECK#4\ntry {\n if (({valueOf: function() {return \"+1\"}, toString: function() {throw \"error\"}} == true) !== true) {\n $ERROR('#4.1: ({valueOf: function() {return \"+1\"}, toString: function() {throw \"error\"}} == true) === true');\n }\n}\ncatch (e) {\n if (e === \"error\") {\n $ERROR('#4.2: ({valueOf: function() {return \"+1\"}, toString: function() {throw \"error\"}} == true) not throw \"error\"');\n } else {\n $ERROR('#4.3: ({valueOf: function() {return \"+1\"}, toString: function() {throw \"error\"}} == true) not throw Error. Actual: ' + (e));\n }\n}\n\n//CHECK#5\nif (({toString: function() {return \"+1\"}} == 1) !== true) {\n $ERROR('#5: ({toString: function() {return \"+1\"}} == 1) === true');\n}\n\n//CHECK#6\nif (({valueOf: function() {return {}}, toString: function() {return \"+1\"}} == \"1\") !== false) {\n $ERROR('#6.1: ({valueOf: function() {return {}}, toString: function() {return \"+1\"}} == \"1\") === false');\n} else {\n if (({valueOf: function() {return {}}, toString: function() {return \"+1\"}} == \"+1\") !== true) {\n $ERROR('#6.2: ({valueOf: function() {return {}}, toString: function() {return \"+1\"}} == \"+1\") === true');\n }\n}\n\n//CHECK#7\ntry {\n ({valueOf: function() {throw \"error\"}, toString: function() {return 1}} == 1);\n $ERROR('#7.1: ({valueOf: function() {throw \"error\"}, toString: function() {return 1}} == 1) throw \"error\". Actual: ' + (({valueOf: function() {throw \"error\"}, toString: function() {return 1}} == 1)));\n} \ncatch (e) {\n if (e !== \"error\") {\n $ERROR('#7.2: ({valueOf: function() {throw \"error\"}, toString: function() {return 1}} == 1) throw \"error\". Actual: ' + (e));\n } \n}\n\n//CHECK#8\ntry {\n ({valueOf: function() {return {}}, toString: function() {return {}}} == 1);\n $ERROR('#8.1: ({valueOf: function() {return {}}, toString: function() {return {}}} == 1) throw TypeError. Actual: ' + (({valueOf: function() {return {}}, toString: function() {return {}}} == 1)));\n} \ncatch (e) {\n if ((e instanceof TypeError) !== true) {\n $ERROR('#8.2: ({valueOf: function() {return {}}, toString: function() {return {}}} == 1) throw TypeError. Actual: ' + (e));\n } \n}\n",
+ "id": "S11.9.1_A7.8"
+ },
+ {
+ "section": "11.9.1, 11.9.3",
+ "description": "y is object, x is primtitive",
+ "test": "//CHECK#1\nif ((true == {valueOf: function() {return 1}}) !== true) {\n $ERROR('#1: (true == {valueOf: function() {return 1}}) === true');\n}\n\n//CHECK#2\nif ((1 == {valueOf: function() {return 1}, toString: function() {return 0}}) !== true) {\n $ERROR('#2: (1 == {valueOf: function() {return 1}, toString: function() {return 0}}) === true');\n}\n\n//CHECK#3\nif ((\"+1\" == {valueOf: function() {return 1}, toString: function() {return {}}}) !== true) {\n $ERROR('#3: (\"+1\" == {valueOf: function() {return 1}, toString: function() {return {}}}) === true');\n} \n \n//CHECK#4\ntry {\n if ((true == {valueOf: function() {return \"+1\"}, toString: function() {throw \"error\"}}) !== true) {\n $ERROR('#4.1: (true == {valueOf: function() {return \"+1\"}, toString: function() {throw \"error\"}}) === true');\n }\n}\ncatch (e) {\n if (e === \"error\") {\n $ERROR('#4.2: (true == {valueOf: function() {return \"+1\"}, toString: function() {throw \"error\"}}) not throw \"error\"');\n } else {\n $ERROR('#4.3: (true == {valueOf: function() {return \"+1\"}, toString: function() {throw \"error\"}}) not throw Error. Actual: ' + (e));\n }\n}\n\n//CHECK#5\nif ((1 == {toString: function() {return \"+1\"}}) !== true) {\n $ERROR('#5: (1 == {toString: function() {return \"+1\"}}) === true');\n}\n\n//CHECK#6\nif ((\"1\" == {valueOf: function() {return {}}, toString: function() {return \"+1\"}}) !== false) {\n $ERROR('#6.1: (\"1\" == {valueOf: function() {return {}}, toString: function() {return \"+1\"}}) === false');\n} else {\n if ((\"+1\" == {valueOf: function() {return {}}, toString: function() {return \"+1\"}}) !== true) {\n $ERROR('#6.2: (\"+1\" == {valueOf: function() {return {}}, toString: function() {return \"+1\"}}) === true');\n }\n}\n\n//CHECK#7\ntry {\n (1 == {valueOf: function() {throw \"error\"}, toString: function() {return 1}});\n $ERROR('#7.1: (1 == {valueOf: function() {throw \"error\"}, toString: function() {return 1}}) throw \"error\". Actual: ' + ((1 == {valueOf: function() {throw \"error\"}, toString: function() {return 1}})));\n} \ncatch (e) {\n if (e !== \"error\") {\n $ERROR('#7.2: (1 == {valueOf: function() {throw \"error\"}, toString: function() {return 1}}) throw \"error\". Actual: ' + (e));\n } \n}\n\n//CHECK#8\ntry {\n (1 == {valueOf: function() {return {}}, toString: function() {return {}}});\n $ERROR('#8.1: (1 == {valueOf: function() {return {}}, toString: function() {return {}}}) throw TypeError. Actual: ' + ((1 == {valueOf: function() {return {}}, toString: function() {return {}}})));\n} \ncatch (e) {\n if ((e instanceof TypeError) !== true) {\n $ERROR('#8.2: (1 == {valueOf: function() {return {}}, toString: function() {return {}}}) throw TypeError. Actual: ' + (e));\n } \n}\n",
+ "id": "S11.9.1_A7.9"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/11.9.2_The_Does_not_equals_Operator.json b/website/resources/scripts/testcases2/11.9.2_The_Does_not_equals_Operator.json
new file mode 100644
index 000000000..9b8948c34
--- /dev/null
+++ b/website/resources/scripts/testcases2/11.9.2_The_Does_not_equals_Operator.json
@@ -0,0 +1,182 @@
+{
+ "testCollection": {
+ "name": "11.9.2_The_Does_not_equals_Operator",
+ "numTests": 29,
+ "tests": [
+ {
+ "section": "11.9.2, 7.2, 7.3",
+ "description": "Checking by using eval",
+ "test": "//CHECK#1\nif (eval(\"true\\u0009!=\\u00091\") !== false) {\n $ERROR('#1: (true\\\\u0009!=\\\\u00091) === false');\n}\n\n//CHECK#2\nif (eval(\"true\\u000B!=\\u000B1\") !== false) {\n $ERROR('#2: (true\\\\u000B!=\\\\u000B1) === false'); \n}\n\n//CHECK#3\nif (eval(\"true\\u000C!=\\u000C1\") !== false) {\n $ERROR('#3: (true\\\\u000C!=\\\\u000C1) === false');\n}\n\n//CHECK#4\nif (eval(\"true\\u0020!=\\u00201\") !== false) {\n $ERROR('#4: (true\\\\u0020!=\\\\u00201) === false');\n}\n\n//CHECK#5\nif (eval(\"true\\u00A0!=\\u00A01\") !== false) {\n $ERROR('#5: (true\\\\u00A0!=\\\\u00A01) === false');\n}\n\n//CHECK#6\nif (eval(\"true\\u000A!=\\u000A1\") !== false) {\n $ERROR('#6: (true\\\\u000A!=\\\\u000A1) === false'); \n}\n\n//CHECK#7\nif (eval(\"true\\u000D!=\\u000D1\") !== false) {\n $ERROR('#7: (true\\\\u000D!=\\\\u000D1) === false');\n}\n\n//CHECK#8\nif (eval(\"true\\u2028!=\\u20281\") !== false) {\n $ERROR('#8: (true\\\\u2028!=\\\\u20281) === false');\n}\n\n//CHECK#9\nif (eval(\"true\\u2029!=\\u20291\") !== false) {\n $ERROR('#9: (true\\\\u2029!=\\\\u20291) === false');\n}\n\n//CHECK#10\nif (eval(\"true\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u2029!=\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u20291\") !== false) {\n $ERROR('#10: (true\\\\u0009\\\\u000B\\\\u000C\\\\u0020\\\\u00A0\\\\u000A\\\\u000D\\\\u2028\\\\u2029!=\\\\u0009\\\\u000B\\\\u000C\\\\u0020\\\\u00A0\\\\u000A\\\\u000D\\\\u2028\\\\u20291) === false');\n}\n",
+ "id": "S11.9.2_A1"
+ },
+ {
+ "section": "11.9.2",
+ "description": "Either Type is not Reference or GetBase is not null",
+ "test": "//CHECK#1\nif ((1 != 1) !== false) {\n $ERROR('#1: (1 != 1) === false');\n}\n\n//CHECK#2\nvar x = 1;\nif ((x != 1) !== false) {\n $ERROR('#2: var x = 1; (x != 1) === false');\n}\n\n//CHECK#3\nvar y = 1;\nif ((1 != y) !== false) {\n $ERROR('#3: var y = 1; (1 != y) === false');\n}\n\n//CHECK#4\nvar x = 1;\nvar y = 1;\nif ((x != y) !== false) {\n $ERROR('#4: var x = 1; var y = 1; (x != y) === false');\n}\n\n//CHECK#5\nvar objectx = new Object();\nvar objecty = new Object();\nobjectx.prop = 1;\nobjecty.prop = 1;\nif ((objectx.prop != objecty.prop) !== false) {\n $ERROR('#5: var objectx = new Object(); var objecty = new Object(); objectx.prop = 1; objecty.prop = 1; (objectx.prop != objecty.prop) === false');\n}\n",
+ "id": "S11.9.2_A2.1_T1"
+ },
+ {
+ "section": "11.9.2",
+ "description": "If GetBase(x) is null, throw ReferenceError",
+ "test": "//CHECK#1\ntry {\n x != 1;\n $ERROR('#1.1: x != 1 throw ReferenceError. Actual: ' + (x != 1)); \n}\ncatch (e) {\n if ((e instanceof ReferenceError) !== true) {\n $ERROR('#1.2: x != 1 throw ReferenceError. Actual: ' + (e)); \n }\n}\n\n",
+ "id": "S11.9.2_A2.1_T2"
+ },
+ {
+ "section": "11.9.2",
+ "description": "If GetBase(y) is null, throw ReferenceError",
+ "test": "//CHECK#1\ntry {\n 1 != y;\n $ERROR('#1: 1 != y throw ReferenceError'); \n}\ncatch (e) {\n if ((e instanceof ReferenceError) !== true) {\n $ERROR('#1.2: 1 != y throw ReferenceError. Actual: ' + (e)); \n }\n}\n\n",
+ "id": "S11.9.2_A2.1_T3"
+ },
+ {
+ "section": "11.9.2",
+ "description": "Checking with \"=\"",
+ "test": "//CHECK#1\nvar x = 0; \nif (((x = 1) != x) !== false) {\n $ERROR('#1: var x = 0; ((x = 1) != x) === false');\n}\n\n//CHECK#2\nvar x = 0; \nif ((x != (x = 1)) !== true) {\n $ERROR('#2: var x = 0; (x != (x = 1)) === true');\n}\n\n",
+ "id": "S11.9.2_A2.4_T1"
+ },
+ {
+ "section": "11.9.2",
+ "description": "Checking with \"throw\"",
+ "test": "//CHECK#1\nvar x = function () { throw \"x\"; };\nvar y = function () { throw \"y\"; };\ntry {\n x() != y();\n $ERROR('#1.1: var x = function () { throw \"x\"; }; var y = function () { throw \"y\"; }; x() != y() throw \"x\". Actual: ' + (x() != y()));\n} catch (e) {\n if (e === \"y\") {\n $ERROR('#1.2: First expression is evaluated first, and then second expression');\n } else {\n if (e !== \"x\") {\n $ERROR('#1.3: var x = function () { throw \"x\"; }; var y = function () { throw \"y\"; }; x() != y() throw \"x\". Actual: ' + (e));\n }\n }\n}\n",
+ "id": "S11.9.2_A2.4_T2"
+ },
+ {
+ "section": "11.9.2",
+ "description": "Checking with undeclarated variables",
+ "test": "//CHECK#1\ntry {\n x != (x = 1);\n $ERROR('#1.1: x != (x = 1) throw ReferenceError. Actual: ' + (x != (x = 1))); \n}\ncatch (e) {\n if ((e instanceof ReferenceError) !== true) {\n $ERROR('#1.2: x != (x = 1) throw ReferenceError. Actual: ' + (e)); \n }\n}\n\n//CHECK#2\nif (((y = 1) != y) !== false) {\n $ERROR('#2: ((y = 1) != y) === false');\n}\n\n",
+ "id": "S11.9.2_A2.4_T3"
+ },
+ {
+ "section": "11.9.2, 11.9.3",
+ "description": "x and y are boolean primitives",
+ "test": "//CHECK#1\nif ((true != true) !== false) {\n $ERROR('#1: (true != true) === false');\n}\n\n//CHECK#2\nif ((false != false) !== false) {\n $ERROR('#2: (false != false) === false');\n}\n\n//CHECK#3\nif ((true != false) !== true) {\n $ERROR('#3: (true != false) === true');\n}\n\n//CHECK#4\nif ((false != true) !== true) {\n $ERROR('#4: (false != true) === true');\n}\n",
+ "id": "S11.9.2_A3.1"
+ },
+ {
+ "section": "11.9.2, 11.9.3",
+ "description": "x is primitive boolean, y is primitive number",
+ "test": "//CHECK#1\nif ((true != 1) !== false) {\n $ERROR('#1: (true != 1) === false');\n}\n\n//CHECK#2\nif ((false != \"0\") !== false) {\n $ERROR('#2: (false != \"0\") === false');\n}\n\n//CHECK#3\nif ((true != new Boolean(true)) !== false) {\n $ERROR('#3: (true != new Boolean(true)) === false');\n}\n\n//CHECK#4\nif ((true != {valueOf: function () {return 1}}) !== false) {\n $ERROR('#4: (true != {valueOf: function () {return 1}}) === false');\n}\n\n",
+ "id": "S11.9.2_A3.2"
+ },
+ {
+ "section": "11.9.2, 11.9.3",
+ "description": "x is primitive number, y is primitive boolean",
+ "test": "//CHECK#1\nif ((0 != false) !== false) {\n $ERROR('#1: (0 != false) === false');\n}\n\n//CHECK#2\nif ((\"1\" != true) !== false) {\n $ERROR('#2: (\"1\" != true) === false');\n}\n\n//CHECK#3\nif ((new Boolean(false) != false) !== false) {\n $ERROR('#3: (new Boolean(false) != false) === false');\n}\n\n//CHECK#4\nif (({valueOf: function () {return \"0\"}} != false) !== false) {\n $ERROR('#4: ({valueOf: function () {return \"0\"}} != false) === false');\n}\n",
+ "id": "S11.9.2_A3.3"
+ },
+ {
+ "section": "11.9.2, 11.9.3",
+ "description": "x is NaN",
+ "test": "//CHECK#1\nif ((Number.NaN != true) !== true) {\n $ERROR('#1: (NaN != true) === true');\n}\n\n//CHECK#2\nif ((Number.NaN != 1) !== true) {\n $ERROR('#2: (NaN != 1) === true');\n}\n\n//CHECK#3\nif ((Number.NaN != Number.NaN) !== true) {\n $ERROR('#3: (NaN != NaN) === true');\n}\n\n//CHECK#4\nif ((Number.NaN != Number.POSITIVE_INFINITY) !== true) {\n $ERROR('#4: (NaN != +Infinity) === true');\n}\n\n//CHECK#5\nif ((Number.NaN != Number.NEGATIVE_INFINITY) !== true) {\n $ERROR('#5: (NaN != -Infinity) === true');\n}\n\n//CHECK#6\nif ((Number.NaN != Number.MAX_VALUE) !== true) {\n $ERROR('#6: (NaN != Number.MAX_VALUE) === true');\n}\n\n//CHECK#7\nif ((Number.NaN != Number.MIN_VALUE) !== true) {\n $ERROR('#7: (NaN != Number.MIN_VALUE) === true');\n}\n\n//CHECK#8\nif ((Number.NaN != \"string\") !== true) {\n $ERROR('#8: (NaN != \"string\") === true');\n}\n\n//CHECK#9\nif ((Number.NaN != new Object()) !== true) {\n $ERROR('#9: (NaN != new Object()) === true');\n}\n\n",
+ "id": "S11.9.2_A4.1_T1"
+ },
+ {
+ "section": "11.9.2, 11.9.3",
+ "description": "y is NaN",
+ "test": "//CHECK#1\nif ((true != Number.NaN) !== true) {\n $ERROR('#1: (true != NaN) === true');\n}\n\n//CHECK#2\nif ((-1 != Number.NaN) !== true) {\n $ERROR('#2: (-1 != NaN) === true');\n}\n\n//CHECK#3\nif ((Number.NaN != Number.NaN) !== true) {\n $ERROR('#3: (NaN != NaN) === true');\n}\n\n//CHECK#4\nif ((Number.POSITIVE_INFINITY != Number.NaN) !== true) {\n $ERROR('#4: (+Infinity != NaN) === true');\n}\n\n//CHECK#5\nif ((Number.NEGATIVE_INFINITY != Number.NaN) !== true) {\n $ERROR('#5: (-Infinity != NaN) === true');\n}\n\n//CHECK#6\nif ((Number.MAX_VALUE != Number.NaN) !== true) {\n $ERROR('#6: (Number.MAX_VALUE != NaN) === true');\n}\n\n//CHECK#7\nif ((Number.MIN_VALUE != Number.NaN) !== true) {\n $ERROR('#7: (Number.MIN_VALUE != NaN) === true');\n}\n\n//CHECK#8\nif ((\"string\" != Number.NaN) !== true) {\n $ERROR('#8: (\"string\" != NaN) === true');\n}\n\n//CHECK#9\nif ((new Object() != Number.NaN) !== true) {\n $ERROR('#9: (new Object() != NaN) === true');\n}\n",
+ "id": "S11.9.2_A4.1_T2"
+ },
+ {
+ "section": "11.9.2, 11.9.3",
+ "description": "Checking all combinations",
+ "test": "//CHECK#1\nif ((+0 != -0) !== false) {\n $ERROR('#1: (+0 != -0) === false');\n}\n\n//CHECK#2\nif ((-0 != +0) !== false) {\n $ERROR('#2: (-0 != +0) === false');\n}\n",
+ "id": "S11.9.2_A4.2"
+ },
+ {
+ "section": "11.9.2, 11.9.3",
+ "description": "x and y are primitive numbers",
+ "test": "//CHECK#1\nif ((Number.POSITIVE_INFINITY != Number.POSITIVE_INFINITY) !== false) {\n $ERROR('#1: (+Infinity != +Infinity) === false');\n}\n\n//CHECK#2\nif ((Number.NEGATIVE_INFINITY != Number.NEGATIVE_INFINITY) !== false) {\n $ERROR('#2: (-Infinity != -Infinity) === false');\n}\n\n//CHECK#3\nif ((Number.POSITIVE_INFINITY != -Number.NEGATIVE_INFINITY) !== false) {\n $ERROR('#3: (+Infinity != -(-Infinity)) === false');\n}\n\n//CHECK#4\nif ((1 != 0.999999999999) !== true) {\n $ERROR('#4: (1 != 0.999999999999) === true');\n}\n\n//CHECK#5\nif ((1.0 != 1) !== false) {\n $ERROR('#5: (1.0 != 1) === false');\n}\n",
+ "id": "S11.9.2_A4.3"
+ },
+ {
+ "section": "11.9.2, 11.9.3",
+ "description": "x and y are primitive strings",
+ "test": "//CHECK#1\nif ((\"\" != \"\") !== false) {\n $ERROR('#1: (\"\" != \"\") === false');\n}\n\n//CHECK#2\nif ((\" \" != \" \") !== false) {\n $ERROR('#2: \" (\" != \" \") === false');\n}\n\n//CHECK#3\nif ((\" \" != \"\") !== true) {\n $ERROR('#3: \" (\" != \"\") === true');\n}\n\n//CHECK#4\nif ((\"string\" != \"string\") !== false) {\n $ERROR('#4: (\"string\" != \"string\") === false');\n}\n\n//CHECK#5\nif ((\" string\" != \"string \") !== true) {\n $ERROR('#5: (\" string\" != \"string \") === true');\n}\n\n//CHECK#6\nif ((\"1.0\" != \"1\") !== true) {\n $ERROR('#6: (\"1.0\" != \"1\") === true');\n}\n\n//CHECK#7\nif ((\"0xff\" != \"255\") !== true) {\n $ERROR('#7: (\"0xff\" != \"255\") === true');\n}\n",
+ "id": "S11.9.2_A5.1"
+ },
+ {
+ "section": "11.9.2, 11.9.3",
+ "description": "x is primitive number, y is primitive string",
+ "test": "//CHECK#1\nif ((1 != \"1\") !== false) {\n $ERROR('#1: (1 != \"1\") === false');\n}\n\n//CHECK#2\nif ((1.100 != \"+1.10\") !== false) {\n $ERROR('#2: (1.100 != \"+1.10\") === false');\n}\n\n//CHECK#3\nif ((1 != \"true\") !== true) {\n $ERROR('#3: (1 != \"true\") === true');\n}\n\n//CHECK#4\nif ((255 != \"0xff\") !== false) {\n $ERROR('#4: (255 != \"0xff\") === false');\n}\n\n//CHECK#5\nif ((0 != \"\") !== false) {\n $ERROR('#5: (0 != \"\") === false');\n}\n",
+ "id": "S11.9.2_A5.2"
+ },
+ {
+ "section": "11.9.2, 11.9.3",
+ "description": "x is primitive string, y is primitive number",
+ "test": "//CHECK#1\nif ((\"-1\" != -1) !== false) {\n $ERROR('#1: (\"-1\" != -1) === false');\n}\n\n//CHECK#2\nif ((\"-1.100\" != -1.10) !== false) {\n $ERROR('#2: (\"-1.100\" != -1.10) === false');\n}\n\n//CHECK#3\nif ((\"false\" != 0) !== true) {\n $ERROR('#3: (\"false\" != 0) === true');\n}\n\n//CHECK#4\nif ((\"5e-324\" != 5e-324) !== false) {\n $ERROR('#4: (\"5e-324\" != 5e-324) === false');\n}\n\n",
+ "id": "S11.9.2_A5.3"
+ },
+ {
+ "section": "11.9.2, 11.9.3",
+ "description": "Checking all combinations",
+ "test": "//CHECK#1\nif ((undefined != undefined) !== false) {\n $ERROR('#1: (undefined != undefined) === false');\n}\n\n//CHECK#2\nif ((void 0 != undefined) !== false) {\n $ERROR('#2: (void 0 != undefined) === false');\n}\n\n//CHECK#3\nif ((undefined != eval(\"var x\")) !== false) {\n $ERROR('#3: (undefined != eval(\"var x\")) === false');\n}\n\n//CHECK#4\nif ((undefined != null) !== false) {\n $ERROR('#4: (undefined != null) === false');\n}\n\n//CHECK#5\nif ((null != void 0) !== false) {\n $ERROR('#5: (null != void 0) === false');\n}\n\n//CHECK#6\nif ((null != null) !== false) {\n $ERROR('#6: (null != null) === false');\n}\n",
+ "id": "S11.9.2_A6.1"
+ },
+ {
+ "section": "11.9.2, 11.9.3",
+ "description": "x is null or undefined, y is not",
+ "test": "//CHECK#1\nif ((undefined != true) !== true) {\n $ERROR('#1: (undefined != true) === true');\n}\n\n//CHECK#2\nif ((undefined != 0) !== true) {\n $ERROR('#2: (undefined != 0) === true');\n}\n\n//CHECK#3\nif ((undefined != \"undefined\") !== true) {\n $ERROR('#3: (undefined != \"undefined\") === true');\n}\n\n//CHECK#4\nif ((undefined != {}) !== true) {\n $ERROR('#4: (undefined != {}) === true');\n}\n\n//CHECK#5\nif ((null != false) !== true) {\n $ERROR('#5: (null != false) === true');\n}\n\n//CHECK#6\nif ((null != 0) !== true) {\n $ERROR('#6: (null != 0) === true');\n}\n\n//CHECK#7\nif ((null != \"null\") !== true) {\n $ERROR('#7: (null != \"null\") === true');\n}\n\n//CHECK#8\nif ((null != {}) !== true) {\n $ERROR('#8: (null != {}) === true');\n}\n",
+ "id": "S11.9.2_A6.2_T1"
+ },
+ {
+ "section": "11.9.2, 11.9.3",
+ "description": "y is null or undefined, x is not",
+ "test": "//CHECK#1\nif ((false != undefined) !== true) {\n $ERROR('#1: (false != undefined) === true');\n}\n\n//CHECK#2\nif ((Number.NaN != undefined) !== true) {\n $ERROR('#2: (Number.NaN != undefined) === true');\n}\n\n//CHECK#3\nif ((\"undefined\" != undefined) !== true) {\n $ERROR('#3: (\"undefined\" != undefined) === true');\n}\n\n//CHECK#4\nif (({} != undefined) !== true) {\n $ERROR('#4: ({} != undefined) === true');\n}\n\n//CHECK#5\nif ((false != null) !== true) {\n $ERROR('#5: (false != null) === true');\n}\n\n//CHECK#6\nif ((0 != null) !== true) {\n $ERROR('#6: (0 != null) === true');\n}\n\n//CHECK#7\nif ((\"null\" != null) !== true) {\n $ERROR('#7: (\"null\" != null) === true');\n}\n\n//CHECK#8\nif (({} != null) !== true) {\n $ERROR('#8: ({} != null) === true');\n}\n",
+ "id": "S11.9.2_A6.2_T2"
+ },
+ {
+ "section": "11.9.2, 11.9.3",
+ "description": "Checking Boolean object, Number object, String object, Object object",
+ "test": "//CHECK#1\nif ((new Boolean(true) != new Boolean(true)) !== true) {\n $ERROR('#1: (new Boolean(true) != new Boolean(true)) === true');\n}\n\n//CHECK#2\nif ((new Number(1) != new Number(1)) !== true) {\n $ERROR('#2: (new Number(1) != new Number(1)) === true');\n}\n\n//CHECK#3\nif ((new String(\"x\") != new String(\"x\")) !== true) {\n $ERROR('#3: (new String(\"x\") != new String(\"x\")) === true');\n}\n\n//CHECK#4\nif ((new Object() != new Object()) !== true) {\n $ERROR('#4: (new Object() != new Object()) === true');\n}\n\n//CHECK#5\nx = {}; \ny = x;\nif ((x != y) !== false) {\n $ERROR('#5: x = {}; y = x; (x != y) === false');\n}\n\n//CHECK#6\nif ((new Boolean(true) != new Number(1)) !== true) {\n $ERROR('#6 (new Boolean(true) != new Number(1)) === true');\n}\n\n//CHECK#7\nif ((new Number(1) != new String(\"1\")) !== true) {\n $ERROR('#7: (new Number(1) != new String(\"1\")) === true');\n}\n\n//CHECK#8\nif ((new String(\"1\") != new Boolean(true)) !== true) {\n $ERROR('#8: (new String(\"x\") != new Boolean(true)) === true');\n}\n",
+ "id": "S11.9.2_A7.1"
+ },
+ {
+ "section": "11.9.2, 11.9.3",
+ "description": "x is object, y is primitive boolean",
+ "test": "//CHECK#1\nif ((new Boolean(true) != true) !== false) {\n $ERROR('#1: (new Boolean(true) != true) === false');\n}\n\n//CHECK#2\nif ((new Number(1) != true) !== false) {\n $ERROR('#2: (new Number(1) != true) === false');\n}\n\n//CHECK#3\nif ((new String(\"1\") != true) !== false) {\n $ERROR('#3: (new String(\"1\") != true) === false');\n}\n",
+ "id": "S11.9.2_A7.2"
+ },
+ {
+ "section": "11.9.2, 11.9.3",
+ "description": "y is object, x is primitive boolean",
+ "test": "//CHECK#1\nif ((true != new Boolean(true)) !== false) {\n $ERROR('#1: (true != new Boolean(true)) === false');\n}\n\n//CHECK#2\nif ((true != new Number(1)) !== false) {\n $ERROR('#2: (true != new Number(1)) === false');\n}\n\n//CHECK#3\nif ((true != new String(\"+1\")) !== false) {\n $ERROR('#3: (true != new String(\"+1\")) === false');\n}\n",
+ "id": "S11.9.2_A7.3"
+ },
+ {
+ "section": "11.9.2, 11.9.3",
+ "description": "x is object, y is primitive number",
+ "test": "//CHECK#1\nif ((new Boolean(true) != 1) !== false) {\n $ERROR('#1: (new Boolean(true) != 1) === false');\n}\n\n//CHECK#2\nif ((new Number(-1) != -1) !== false) {\n $ERROR('#2: (new Number(-1) != -1) === false');\n}\n\n//CHECK#3\nif ((new String(\"-1\") != -1) !== false) {\n $ERROR('#3: (new String(\"-1\") != -1) === false');\n}\n",
+ "id": "S11.9.2_A7.4"
+ },
+ {
+ "section": "11.9.2, 11.9.3",
+ "description": "y is object, x is primitive number",
+ "test": "//CHECK#1\nif ((1 != new Boolean(true)) !== false) {\n $ERROR('#1: (1 != new Boolean(true)) === false');\n}\n\n//CHECK#2\nif ((-1 != new Number(-1)) !== false) {\n $ERROR('#2: (-1 != new Number(-1)) === false');\n}\n\n//CHECK#3\nif ((-1 != new String(\"-1\")) !== false) {\n $ERROR('#3: (-1 != new String(\"-1\")) === false');\n}\n",
+ "id": "S11.9.2_A7.5"
+ },
+ {
+ "section": "11.9.2, 11.9.3",
+ "description": "x is object, y is primitive string",
+ "test": "//CHECK#1\nif ((new Boolean(true) != \"1\") !== false) {\n $ERROR('#1: (new Boolean(true) != \"1\") === false');\n}\n\n//CHECK#2\nif ((new Number(-1) != \"-1\") !== false) {\n $ERROR('#2: (new Number(-1) != \"-1\") === false');\n}\n\n//CHECK#3\nif ((new String(\"x\") != \"x\") !== false) {\n $ERROR('#3: (new String(\"x\") != \"x\") === false');\n}\n",
+ "id": "S11.9.2_A7.6"
+ },
+ {
+ "section": "11.9.2, 11.9.3",
+ "description": "y is object, x is primitive string",
+ "test": "//CHECK#1\nif ((\"1\" != new Boolean(true)) !== false) {\n $ERROR('#1: (\"1\" != new Boolean(true)) === false');\n}\n\n//CHECK#2\nif ((\"-1\" != new Number(-1)) !== false) {\n $ERROR('#2: (\"-1\" != new Number(-1)) === false');\n}\n\n//CHECK#3\nif ((\"x\" != new String(\"x\")) !== false) {\n $ERROR('#3: (\"x\" != new String(\"x\")) === false');\n}\n",
+ "id": "S11.9.2_A7.7"
+ },
+ {
+ "section": "11.9.2, 11.9.3",
+ "description": "x is object, y is primtitive",
+ "test": "//CHECK#1\nif ((true != {valueOf: function() {return 1}}) !== false) {\n $ERROR('#1: (true != {valueOf: function() {return 1}}) === false');\n}\n\n//CHECK#2\nif ((1 != {valueOf: function() {return 1}, toString: function() {return 0}}) !== false) {\n $ERROR('#2: (1 != {valueOf: function() {return 1}, toString: function() {return 0}}) === false');\n}\n\n//CHECK#3\nif ((\"+1\" != {valueOf: function() {return 1}, toString: function() {return {}}}) !== false) {\n $ERROR('#3: (\"+1\" != {valueOf: function() {return 1}, toString: function() {return {}}}) === false');\n} \n \n//CHECK#4\ntry {\n if ((true != {valueOf: function() {return \"+1\"}, toString: function() {throw \"error\"}}) !== false) {\n $ERROR('#4.1: (true != {valueOf: function() {return \"+1\"}, toString: function() {throw \"error\"}}) === false');\n }\n}\ncatch (e) {\n if (e === \"error\") {\n $ERROR('#4.2: (true != {valueOf: function() {return \"+1\"}, toString: function() {throw \"error\"}}) not throw \"error\"');\n } else {\n $ERROR('#4.3: (true != {valueOf: function() {return \"+1\"}, toString: function() {throw \"error\"}}) not throw Error. Actual: ' + (e));\n }\n}\n\n//CHECK#5\nif ((1 != {toString: function() {return \"+1\"}}) !== false) {\n $ERROR('#5: (1 != {toString: function() {return \"+1\"}}) === false');\n}\n\n//CHECK#6\nif ((\"1\" != {valueOf: function() {return {}}, toString: function() {return \"+1\"}}) !== true) {\n $ERROR('#6.1: (\"1\" != {valueOf: function() {return {}}, toString: function() {return \"+1\"}}) === true');\n} else {\n if ((\"+1\" != {valueOf: function() {return {}}, toString: function() {return \"+1\"}}) !== false) {\n $ERROR('#6.2: (\"+1\" != {valueOf: function() {return {}}, toString: function() {return \"+1\"}}) === false');\n }\n}\n\n//CHECK#7\ntry {\n (1 != {valueOf: function() {throw \"error\"}, toString: function() {return 1}});\n $ERROR('#7: (1 != {valueOf: function() {throw \"error\"}, toString: function() {return 1}}) throw \"error\"');\n} \ncatch (e) {\n if (e !== \"error\") {\n $ERROR('#7: (1 != {valueOf: function() {throw \"error\"}, toString: function() {return 1}}) throw \"error\"');\n } \n}\n\n//CHECK#8\ntry {\n (1 != {valueOf: function() {return {}}, toString: function() {return {}}});\n $ERROR('#8: (1 != {valueOf: function() {return {}}, toString: function() {return {}}}) throw TypeError');\n} \ncatch (e) {\n if ((e instanceof TypeError) !== true) {\n $ERROR('#8: (1 != {valueOf: function() {return {}}, toString: function() {return {}}}) throw TypeError');\n } \n}\n",
+ "id": "S11.9.2_A7.8"
+ },
+ {
+ "section": "11.9.2, 11.9.3",
+ "description": "y is object, x is primtitive",
+ "test": "//CHECK#1\nif (({valueOf: function() {return 1}} != true) !== false) {\n $ERROR('#1: ({valueOf: function() {return 1}} != true) === false');\n}\n\n//CHECK#2\nif (({valueOf: function() {return 1}, toString: function() {return 0}} != 1) !== false) {\n $ERROR('#2: ({valueOf: function() {return 1}, toString: function() {return 0}} != 1) === false');\n}\n\n//CHECK#3\nif (({valueOf: function() {return 1}, toString: function() {return {}}} != \"+1\") !== false) {\n $ERROR('#3: ({valueOf: function() {return 1}, toString: function() {return {}}} != \"+1\") === false');\n} \n \n//CHECK#4\ntry {\n if (({valueOf: function() {return \"+1\"}, toString: function() {throw \"error\"}} != true) !== false) {\n $ERROR('#4.1: ({valueOf: function() {return \"+1\"}, toString: function() {throw \"error\"}} != true) === false');\n }\n}\ncatch (e) {\n if (e === \"error\") {\n $ERROR('#4.2: ({valueOf: function() {return \"+1\"}, toString: function() {throw \"error\"}} != true) not throw \"error\"');\n } else {\n $ERROR('#4.3: ({valueOf: function() {return \"+1\"}, toString: function() {throw \"error\"}} != true) not throw Error. Actual: ' + (e));\n }\n}\n\n//CHECK#5\nif (({toString: function() {return \"+1\"}} != 1) !== false) {\n $ERROR('#5: ({toString: function() {return \"+1\"}} != 1) === false');\n}\n\n//CHECK#6\nif (({valueOf: function() {return {}}, toString: function() {return \"+1\"}} != \"1\") !== true) {\n $ERROR('#6.1: ({valueOf: function() {return {}}, toString: function() {return \"+1\"}} != \"1\") === true');\n} else {\n if (({valueOf: function() {return {}}, toString: function() {return \"+1\"}} != \"+1\") !== false) {\n $ERROR('#6.2: ({valueOf: function() {return {}}, toString: function() {return \"+1\"}} != \"+1\") === false');\n }\n}\n\n//CHECK#7\ntry {\n ({valueOf: function() {throw \"error\"}, toString: function() {return 1}} != 1);\n $ERROR('#7.1: ({valueOf: function() {throw \"error\"}, toString: function() {return 1}} != 1) throw \"error\". Actual: ' + (({valueOf: function() {throw \"error\"}, toString: function() {return 1}} != 1)));\n} \ncatch (e) {\n if (e !== \"error\") {\n $ERROR('#7.2: ({valueOf: function() {throw \"error\"}, toString: function() {return 1}} != 1) throw \"error\". Actual: ' + (e));\n } \n}\n\n//CHECK#8\ntry {\n ({valueOf: function() {return {}}, toString: function() {return {}}} != 1);\n $ERROR('#8.1: ({valueOf: function() {return {}}, toString: function() {return {}}} != 1) throw TypeError. Actual: ' + (({valueOf: function() {return {}}, toString: function() {return {}}} != 1)));\n} \ncatch (e) {\n if ((e instanceof TypeError) !== true) {\n $ERROR('#8.2: ({valueOf: function() {return {}}, toString: function() {return {}}} != 1) throw TypeError. Actual: ' + (e));\n } \n}\n",
+ "id": "S11.9.2_A7.9"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/11.9.4_The_Strict_Equals_Operator.json b/website/resources/scripts/testcases2/11.9.4_The_Strict_Equals_Operator.json
new file mode 100644
index 000000000..c4366b923
--- /dev/null
+++ b/website/resources/scripts/testcases2/11.9.4_The_Strict_Equals_Operator.json
@@ -0,0 +1,134 @@
+{
+ "testCollection": {
+ "name": "11.9.4_The_Strict_Equals_Operator",
+ "numTests": 21,
+ "tests": [
+ {
+ "section": "11.9.4, 7.2, 7.3",
+ "description": "Checking by using eval",
+ "test": "//CHECK#1\nif (!(eval(\"1\\u0009===\\u00091\"))) {\n $ERROR('#1: 1\\\\u0009===\\\\u00091');\n}\n\n//CHECK#2\nif (!(eval(\"1\\u000B===\\u000B1\"))) {\n $ERROR('#2: 1\\\\u000B===\\\\u000B1'); \n}\n\n//CHECK#3\nif (!(eval(\"1\\u000C===\\u000C1\"))) {\n $ERROR('#3: 1\\\\u000C===\\\\u000C1');\n}\n\n//CHECK#4\nif (!(eval(\"1\\u0020===\\u00201\"))) {\n $ERROR('#4: 1\\\\u0020===\\\\u00201');\n}\n\n//CHECK#5\nif (!(eval(\"1\\u00A0===\\u00A01\"))) {\n $ERROR('#5: 1\\\\u00A0===\\\\u00A01');\n}\n\n//CHECK#6\nif (!(eval(\"1\\u000A===\\u000A1\"))) {\n $ERROR('#6: 1\\\\u000A===\\\\u000A1'); \n}\n\n//CHECK#7\nif (!(eval(\"1\\u000D===\\u000D1\"))) {\n $ERROR('#7: 1\\\\u000D===\\\\u000D1');\n}\n\n//CHECK#8\nif (!(eval(\"1\\u2028===\\u20281\"))) {\n $ERROR('#8: 1\\\\u2028===\\\\u20281');\n}\n\n//CHECK#9\nif (!(eval(\"1\\u2029===\\u20291\"))) {\n $ERROR('#9: 1\\\\u2029===\\\\u20291');\n}\n\n//CHECK#10\nif (!(eval(\"1\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u2029===\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u20291\"))) {\n $ERROR('#10: 1\\\\u0009\\\\u000B\\\\u000C\\\\u0020\\\\u00A0\\\\u000A\\\\u000D\\\\u2028\\\\u2029===\\\\u0009\\\\u000B\\\\u000C\\\\u0020\\\\u00A0\\\\u000A\\\\u000D\\\\u2028\\\\u20291');\n}\n",
+ "id": "S11.9.4_A1"
+ },
+ {
+ "section": "11.9.4",
+ "description": "Either Type is not Reference or GetBase is not null",
+ "test": "//CHECK#1\nif (!(1 === 1)) {\n $ERROR('#1: 1 === 1');\n}\n\n//CHECK#2\nvar x = 1;\nif (!(x === 1)) {\n $ERROR('#2: var x = 1; x === 1');\n}\n\n//CHECK#3\nvar y = 1;\nif (!(1 === y)) {\n $ERROR('#3: var y = 1; 1 === y');\n}\n\n//CHECK#4\nvar x = 1;\nvar y = 1;\nif (!(x === y)) {\n $ERROR('#4: var x = 1; var y = 1; x === y');\n}\n\n//CHECK#5\nvar objectx = new Object();\nvar objecty = new Object();\nobjectx.prop = 1;\nobjecty.prop = 1;\nif (!(objectx.prop === objecty.prop)) {\n $ERROR('#5: var objectx = new Object(); var objecty = new Object(); objectx.prop = 1; objecty.prop = 1; objectx.prop === objecty.prop');\n}\n\n",
+ "id": "S11.9.4_A2.1_T1"
+ },
+ {
+ "section": "11.9.4",
+ "description": "If GetBase(x) is null, throw ReferenceError",
+ "test": "//CHECK#1\ntry {\n x === 1;\n $ERROR('#1.1: x === 1 throw ReferenceError. Actual: ' + (x === 1)); \n}\ncatch (e) {\n if ((e instanceof ReferenceError) !== true) {\n $ERROR('#1.2: x === 1 throw ReferenceError. Actual: ' + (e)); \n }\n}\n\n",
+ "id": "S11.9.4_A2.1_T2"
+ },
+ {
+ "section": "11.9.4",
+ "description": "If GetBase(y) is null, throw ReferenceError",
+ "test": "//CHECK#1\ntry {\n 1 === y;\n $ERROR('#1.1: 1 === y throw ReferenceError. Actual: ' + (1 === y)); \n}\ncatch (e) {\n if ((e instanceof ReferenceError) !== true) {\n $ERROR('#1.2: 1 === y throw ReferenceError. Actual: ' + (e)); \n }\n}\n\n",
+ "id": "S11.9.4_A2.1_T3"
+ },
+ {
+ "section": "11.9.4",
+ "description": "Checking with \"=\"",
+ "test": "//CHECK#1\nvar x = 0; \nif (!((x = 1) === x)) {\n $ERROR('#1: var x = 0; (x = 1) === x');\n}\n\n//CHECK#2\nvar x = 0; \nif (x === (x = 1)) {\n $ERROR('#2: var x = 0; x !== (x = 1)');\n}\n\n",
+ "id": "S11.9.4_A2.4_T1"
+ },
+ {
+ "section": "11.9.4",
+ "description": "Checking with \"throw\"",
+ "test": "//CHECK#1\nvar x = function () { throw \"x\"; };\nvar y = function () { throw \"y\"; };\ntry {\n x() === y();\n $ERROR('#1.1: var x = function () { throw \"x\"; }; var y = function () { throw \"y\"; }; x() === y() throw \"x\". Actual: ' + (x() === y()));\n} catch (e) {\n if (e === \"y\") {\n $ERROR('#1.2: First expression is evaluated first, and then second expression');\n } else {\n if (!(e === \"x\")) {\n $ERROR('#1.3: var x = function () { throw \"x\"; }; var y = function () { throw \"y\"; }; x() === y() throw \"x\". Actual: ' + (e));\n }\n }\n}\n",
+ "id": "S11.9.4_A2.4_T2"
+ },
+ {
+ "section": "11.9.4",
+ "description": "Checking with undeclarated variables",
+ "test": "//CHECK#1\ntry {\n x === (x = 1);\n $ERROR('#1.1: x === (x = 1) throw ReferenceError. Actual: ' + (x === (x = 1))); \n}\ncatch (e) {\n if ((e instanceof ReferenceError) !== true) {\n $ERROR('#1.2: x === (x = 1) throw ReferenceError. Actual: ' + (e)); \n }\n}\n\n//CHECK#2\nif (!((y = 1) === y)) {\n $ERROR('#2: (y = 1) === y');\n}\n\n",
+ "id": "S11.9.4_A2.4_T3"
+ },
+ {
+ "section": "11.9.4, 11.9.6",
+ "description": "x and y are primitive booleans",
+ "test": "//CHECK#1\nif (!(true === true)) {\n $ERROR('#1: true === true');\n}\n\n//CHECK#2\nif (!(false === false)) {\n $ERROR('#2: false === false');\n}\n\n//CHECK#3\nif (true === false) {\n $ERROR('#3: true !== false');\n}\n\n//CHECK#4\nif (false === true) {\n $ERROR('#4: false !== true');\n}\n",
+ "id": "S11.9.4_A3"
+ },
+ {
+ "section": "11.9.4, 11.9.6",
+ "description": "x is NaN",
+ "test": "//CHECK#1\nif (Number.NaN === true) {\n $ERROR('#1: NaN !== true');\n}\n\n//CHECK#2\nif (Number.NaN === 1) {\n $ERROR('#2: NaN !== 1');\n}\n\n//CHECK#3\nif (Number.NaN === Number.NaN) {\n $ERROR('#3: NaN !== NaN');\n}\n\n//CHECK#4\nif (Number.NaN === Number.POSITIVE_INFINITY) {\n $ERROR('#4: NaN !== +Infinity');\n}\n\n//CHECK#5\nif (Number.NaN === Number.NEGATIVE_INFINITY) {\n $ERROR('#5: NaN !== -Infinity');\n}\n\n//CHECK#6\nif (Number.NaN === Number.MAX_VALUE) {\n $ERROR('#6: NaN !== Number.MAX_VALUE');\n}\n\n//CHECK#7\nif (Number.NaN === Number.MIN_VALUE) {\n $ERROR('#7: NaN !== Number.MIN_VALUE');\n}\n\n//CHECK#8\nif (Number.NaN === \"string\") {\n $ERROR('#8: NaN !== \"string\"');\n}\n\n//CHECK#9\nif (Number.NaN === new Object()) {\n $ERROR('#9: NaN !== new Object()');\n}\n\n",
+ "id": "S11.9.4_A4.1_T1"
+ },
+ {
+ "section": "11.9.4, 11.9.6",
+ "description": "y is NaN",
+ "test": "//CHECK#1\nif (true === Number.NaN) {\n $ERROR('#1: true !== NaN');\n}\n\n//CHECK#2\nif (-1 === Number.NaN) {\n $ERROR('#2: -1 !== NaN');\n}\n\n//CHECK#3\nif (Number.NaN === Number.NaN) {\n $ERROR('#3: NaN !== NaN');\n}\n\n//CHECK#4\nif (Number.POSITIVE_INFINITY === Number.NaN) {\n $ERROR('#4: +Infinity !== NaN');\n}\n\n//CHECK#5\nif (Number.NEGATIVE_INFINITY === Number.NaN) {\n $ERROR('#5: -Infinity !== NaN');\n}\n\n//CHECK#6\nif (Number.MAX_VALUE === Number.NaN) {\n $ERROR('#6: Number.MAX_VALUE !== NaN');\n}\n\n//CHECK#7\nif (Number.MIN_VALUE === Number.NaN) {\n $ERROR('#7: Number.MIN_VALUE !== NaN');\n}\n\n//CHECK#8\nif (\"string\" === Number.NaN) {\n $ERROR('#8: \"string\" !== NaN');\n}\n\n//CHECK#9\nif (new Object() === Number.NaN) {\n $ERROR('#9: new Object() !== NaN');\n}\n",
+ "id": "S11.9.4_A4.1_T2"
+ },
+ {
+ "section": "11.9.4, 11.9.6",
+ "description": "Checking all combinations",
+ "test": "//CHECK#1\nif (!(+0 === -0)) {\n $ERROR('#1: +0 === -0');\n}\n\n//CHECK#2\nif (!(-0 === +0)) {\n $ERROR('#2: -0 === +0');\n}\n",
+ "id": "S11.9.4_A4.2"
+ },
+ {
+ "section": "11.9.4, 11.9.6",
+ "description": "x and y are primitive numbers",
+ "test": "//CHECK#1\nif (!(Number.POSITIVE_INFINITY === Number.POSITIVE_INFINITY)) {\n $ERROR('#1: +Infinity === +Infinity');\n}\n\n//CHECK#2\nif (!(Number.NEGATIVE_INFINITY === Number.NEGATIVE_INFINITY)) {\n $ERROR('#2: -Infinity === -Infinity');\n}\n\n//CHECK#3\nif (!(13 === 13)) {\n $ERROR('#3: 13 === 13');\n}\n\n//CHECK#4\nif (!(-13 === -13)) {\n $ERROR('#4: -13 === -13');\n}\n\n//CHECK#5\nif (!(1.3 === 1.3)) {\n $ERROR('#5: 1.3 === 1.3');\n}\n\n//CHECK#6\nif (!(-1.3 === -1.3)) {\n $ERROR('#6: -1.3 === -1.3');\n}\n\n//CHECK#7\nif (!(Number.POSITIVE_INFINITY === -Number.NEGATIVE_INFINITY)) {\n $ERROR('#7: +Infinity === -(-Infinity)');\n}\n\n//CHECK#8\nif (1 === 0.999999999999) {\n $ERROR('#8: 1 !== 0.999999999999');\n}\n\n//CHECK#9\nif (!(1.0 === 1)) {\n $ERROR('#9: 1.0 === 1');\n}\n",
+ "id": "S11.9.4_A4.3"
+ },
+ {
+ "section": "11.9.4, 11.9.6",
+ "description": "x and y are primitive strings",
+ "test": "//CHECK#1\nif (!(\"\" === \"\")) {\n $ERROR('#1: \"\" === \"\"');\n}\n\n//CHECK#2\nif (!(\" \" === \" \")) {\n $ERROR('#2: \" \" === \" \"');\n}\n\n//CHECK#3\nif (!(\"string\" === \"string\")) {\n $ERROR('#3: \"string\" === \"string\"');\n}\n\n//CHECK#4\nif (\" string\" === \"string \") {\n $ERROR('#4: \" string\" !== \"string \"');\n}\n\n//CHECK#5\nif (\"1.0\" === \"1\") {\n $ERROR('#5: \"1.0\" !== \"1\"');\n}\n",
+ "id": "S11.9.4_A5"
+ },
+ {
+ "section": "11.9.4, 11.9.6",
+ "description": "void 0, eval(\"var x\") is undefined",
+ "test": "//CHECK#1\nif (!(undefined === undefined)) {\n $ERROR('#1: undefined === undefined');\n}\n\n//CHECK#2\nif (!(void 0 === undefined)) {\n $ERROR('#2: void 0 === undefined');\n}\n\n//CHECK#3\nif (!(undefined === eval(\"var x\"))) {\n $ERROR('#3: undefined === eval(\"var x\")');\n}\n",
+ "id": "S11.9.4_A6.1"
+ },
+ {
+ "section": "11.9.4, 11.9.6",
+ "description": "null === null",
+ "test": "//CHECK#1\nif (!(null === null)) {\n $ERROR('#1: null === null');\n}\n",
+ "id": "S11.9.4_A6.2"
+ },
+ {
+ "section": "11.9.4, 11.9.6",
+ "description": "Checking Boolean object, Number object, String object, Object object",
+ "test": "//CHECK#1\nif (new Object() === new Object()) {\n $ERROR('#1: new Object() !== new Object()');\n}\n\n//CHECK#2\nif (new Object(true) === new Object(true)) {\n $ERROR('#2: new Object() !== new Object()');\n}\n\n//CHECK#3\nif (new Object(false) === new Object(false)) {\n $ERROR('#3: new Object() !== new Object()');\n}\n\n//CHECK#4\nif (new Object(+0) === new Object(-0)) {\n $ERROR('#4: new Object(+0) !== new Object(-0)');\n}\n\n//CHECK#5\nx = {}; \ny = x;\nif (!(x === y)) {\n $ERROR('#5: x = {}; y = x; x === y');\n}\n\n//CHECK#6\nif (new Boolean(true) === new Number(1)) {\n $ERROR('#6 new Boolean(true) === new Number(1)');\n}\n\n//CHECK#7\nif (new Number(1) === new String(\"1\")) {\n $ERROR('#7: new Number(1) === new String(\"1\")');\n}\n\n//CHECK#8\nif (new String(\"1\") === new Boolean(true)) {\n $ERROR('#8: new String(\"x\") === new Boolean(true)');\n}\n",
+ "id": "S11.9.4_A7"
+ },
+ {
+ "section": "11.9.4, 11.9.6",
+ "description": "x or y is primitive boolean",
+ "test": "//CHECK#1\nif (true === new Boolean(true)) {\n $ERROR('#1: true !== new Number(true)');\n}\n\n//CHECK#2\nif (true === 1) {\n $ERROR('#2: true !== 1');\n}\n\n//CHECK#3\nif (true === new Number(true)) {\n $ERROR('#3: true !== new Number(true)');\n}\n\n//CHECK#4\nif (true === \"1\") {\n $ERROR('#4: true !== \"1\"');\n}\n\n//CHECK#5\nif (true === new String(true)) {\n $ERROR('#5: true !== new String(true)');\n}\n\n//CHECK#6\nif (new Boolean(false) === false) {\n $ERROR('#6: new Number(false) !== false');\n}\n\n//CHECK#7\nif (0 === false) {\n $ERROR('#7: 0 !== false');\n}\n\n//CHECK#8\nif (new Number(false) === false) {\n $ERROR('#8: new Number(false) !== false');\n}\n\n//CHECK#9\nif (\"0\" === false) {\n $ERROR('#9: \"0\" !== false');\n}\n\n//CHECK#10\nif (false === new String(false)) {\n $ERROR('#10: false !== new String(false)');\n}\n\n//CHECK#11\nif (true === {valueOf: function () {return true}}) {\n $ERROR('#11: true === {valueOf: function () {return true}}');\n}\n",
+ "id": "S11.9.4_A8_T1"
+ },
+ {
+ "section": "11.9.4, 11.9.6",
+ "description": "x or y is primitive number",
+ "test": "//CHECK#1\nif (1 === new Number(1)) {\n $ERROR('#1: 1 !== new Number(1)');\n}\n\n//CHECK#2\nif (1 === true) {\n $ERROR('#2: 1 !== true');\n}\n\n//CHECK#3\nif (1 === new Boolean(1)) {\n $ERROR('#3: 1 !== new Boolean(1)');\n}\n\n//CHECK#4\nif (1 === \"1\") {\n $ERROR('#4: 1 !== \"1\"');\n}\n\n//CHECK#5\nif (1 === new String(1)) {\n $ERROR('#5: 1 !== new String(1)');\n}\n\n//CHECK#6\nif (new Number(0) === 0) {\n $ERROR('#6: new Number(0) !== 0');\n}\n\n//CHECK#7\nif (false === 0) {\n $ERROR('#7: false !== 0');\n}\n\n//CHECK#8\nif (new Boolean(0) === 0) {\n $ERROR('#8: new Boolean(0) !== 0');\n}\n\n//CHECK#9\nif (\"0\" === 0) {\n $ERROR('#9: \"0\" !== 0');\n}\n\n//CHECK#10\nif (new String(0) === 0) {\n $ERROR('#10: new String(0) !== 0');\n}\n\n//CHECK#11\nif (1 === {valueOf: function () {return 1}}) {\n $ERROR('#11: 1 === {valueOf: function () {return 1}}');\n}\n",
+ "id": "S11.9.4_A8_T2"
+ },
+ {
+ "section": "11.9.4, 11.9.6",
+ "description": "x or y is primitive string",
+ "test": "//CHECK#1\nif (\"1\" === new String(\"1\")) {\n $ERROR('#1: \"1\" !== new String(\"1\")');\n}\n\n//CHECK#2\nif (\"1\" === true) {\n $ERROR('#2: \"1\" !== true');\n}\n\n//CHECK#3\nif (\"1\" === new Boolean(\"1\")) {\n $ERROR('#3: \"1\" !== new Boolean(\"1\")');\n}\n\n//CHECK#4\nif (\"1\" === 1) {\n $ERROR('#4: \"1\" === 1');\n}\n\n//CHECK#5\nif (\"1\" === new Number(\"1\")) {\n $ERROR('#5: \"1\" === new Number(\"1\")');\n}\n\n//CHECK#6\nif (new String(false) === false) {\n $ERROR('#6: new Number(false) !== false');\n}\n\n//CHECK#7\nif (false === \"0\") {\n $ERROR('#7: false !== \"0\"');\n}\n\n//CHECK#8\nif (\"0\" === new Boolean(\"0\")) {\n $ERROR('#8: \"0\" !== new Boolean(\"0\")');\n}\n\n//CHECK#9\nif (false === 0) {\n $ERROR('#9: false !== 0');\n}\n\n//CHECK#10\nif (false === new Number(false)) {\n $ERROR('#10: false !== new Number(false)');\n}\n\n//CHECK#11\nif (\"1\" === {valueOf: function () {return \"1\"}}) {\n $ERROR('#11: \"1\" === {valueOf: function () {return \"1\"}}');\n}\n",
+ "id": "S11.9.4_A8_T3"
+ },
+ {
+ "section": "11.9.4, 11.9.6",
+ "description": "x or y is null or undefined",
+ "test": "//CHECK#1\nif (undefined === null) {\n $ERROR('#1: undefined !== null');\n}\n\n//CHECK#2\nif (null === undefined) {\n $ERROR('#2: null !== undefined');\n}\n\n//CHECK#3\nif (null === 0) {\n $ERROR('#3: null !== 0');\n}\n\n//CHECK#4\nif (0 === null) {\n $ERROR('#4: 0 !== null');\n}\n\n//CHECK#5\nif (null === false) {\n $ERROR('#5: null !== false');\n}\n\n//CHECK#6\nif (false === null) {\n $ERROR('#6: false !== null');\n}\n\n//CHECK#7\nif (undefined === false) {\n $ERROR('#7: undefined !== false');\n}\n\n//CHECK#8\nif (false === undefined) {\n $ERROR('#8: false !== undefined');\n}\n\n//CHECK#9\nif (null === new Object()) {\n $ERROR('#9: null !== new Object()');\n}\n\n//CHECK#10\nif (new Object() === null) {\n $ERROR('#10: new Object() !== null');\n}\n\n//CHECK#11\nif (null === \"null\") {\n $ERROR('#11: null !== \"null\"');\n}\n\n//CHECK#12\nif (\"null\" === null) {\n $ERROR('#12: \"null\" !== null');\n}\n\n//CHECK#13\nif (undefined === \"undefined\") {\n $ERROR('#13: undefined !== \"undefined\"');\n}\n\n//CHECK#14\nif (\"undefined\" === undefined) {\n $ERROR('#14: \"undefined\" !== undefined');\n}\n",
+ "id": "S11.9.4_A8_T4"
+ },
+ {
+ "section": "11.9.4, 11.9.6",
+ "description": "Checking with such x and y that either x or y is primitive string and the other is primitive number",
+ "test": "//CHECK#1\ntry {\n throw 1;\n} catch(e) {\n if (e === \"1\") {\n $ERROR('#1: throw 1 !== \"1\"');\n }\n}\n\n//CHECK#2\ntry {\n throw \"1\";\n} catch(e) {\n if (1 === e) {\n $ERROR('#2: 1 !== throw \"1\"');\n }\n} \n",
+ "id": "S11.9.4_A8_T5"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/11.9.5_The_Strict_Does_not_equals_Operator.json b/website/resources/scripts/testcases2/11.9.5_The_Strict_Does_not_equals_Operator.json
new file mode 100644
index 000000000..a811c3287
--- /dev/null
+++ b/website/resources/scripts/testcases2/11.9.5_The_Strict_Does_not_equals_Operator.json
@@ -0,0 +1,134 @@
+{
+ "testCollection": {
+ "name": "11.9.5_The_Strict_Does_not_equals_Operator",
+ "numTests": 21,
+ "tests": [
+ {
+ "section": "11.9.5, 7.2, 7.3",
+ "description": "Checking by using eval",
+ "test": "//CHECK#1\nif (eval(\"1\\u0009!==\\u00091\")) {\n $ERROR('#1: 1\\\\u0009!==\\\\u00091');\n}\n\n//CHECK#2\nif (eval(\"1\\u000B!==\\u000B1\")) {\n $ERROR('#2: 1\\\\u000B!==\\\\u000B1'); \n}\n\n//CHECK#3\nif (eval(\"1\\u000C!==\\u000C1\")) {\n $ERROR('#3: 1\\\\u000C!==\\\\u000C1');\n}\n\n//CHECK#4\nif (eval(\"1\\u0020!==\\u00201\")) {\n $ERROR('#4: 1\\\\u0020!==\\\\u00201');\n}\n\n//CHECK#5\nif (eval(\"1\\u00A0!==\\u00A01\")) {\n $ERROR('#5: 1\\\\u00A0!==\\\\u00A01');\n}\n\n//CHECK#6\nif (eval(\"1\\u000A!==\\u000A1\")) {\n $ERROR('#6: 1\\\\u000A!==\\\\u000A1'); \n}\n\n//CHECK#7\nif (eval(\"1\\u000D!==\\u000D1\")) {\n $ERROR('#7: 1\\\\u000D!==\\\\u000D1');\n}\n\n//CHECK#8\nif (eval(\"1\\u2028!==\\u20281\")) {\n $ERROR('#8: 1\\\\u2028!==\\\\u20281');\n}\n\n//CHECK#9\nif (eval(\"1\\u2029!==\\u20291\")) {\n $ERROR('#9: 1\\\\u2029!==\\\\u20291');\n}\n\n//CHECK#10\nif (eval(\"1\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u2029!==\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u20291\")) {\n $ERROR('#10: 1\\\\u0009\\\\u000B\\\\u000C\\\\u0020\\\\u00A0\\\\u000A\\\\u000D\\\\u2028\\\\u2029!==\\\\u0009\\\\u000B\\\\u000C\\\\u0020\\\\u00A0\\\\u000A\\\\u000D\\\\u2028\\\\u20291');\n}\n",
+ "id": "S11.9.5_A1"
+ },
+ {
+ "section": "11.9.5",
+ "description": "Either Type is not Reference or GetBase is not null",
+ "test": "//CHECK#1\nif (1 !== 1) {\n $ERROR('#1: 1 === 1');\n}\n\n//CHECK#2\nvar x = 1;\nif (x !== 1) {\n $ERROR('#2: var x = 1; x === 1');\n}\n\n//CHECK#3\nvar y = 1;\nif (1 !== y) {\n $ERROR('#3: var y = 1; 1 === y');\n}\n\n//CHECK#4\nvar x = 1;\nvar y = 1;\nif (x !== y) {\n $ERROR('#4: var x = 1; var y = 1; x === y');\n}\n\n//CHECK#5\nvar objectx = new Object();\nvar objecty = new Object();\nobjectx.prop = 1;\nobjecty.prop = 1;\nif (objectx.prop !== objecty.prop) {\n $ERROR('#5: var objectx = new Object(); var objecty = new Object(); objectx.prop = 1; objecty.prop = 1; objectx.prop === objecty.prop');\n}\n\n",
+ "id": "S11.9.5_A2.1_T1"
+ },
+ {
+ "section": "11.9.5",
+ "description": "If GetBase(x) is null, throw ReferenceError",
+ "test": "//CHECK#1\ntry {\n x !== 1;\n $ERROR('#1.1: x !== 1 throw ReferenceError. Actual: ' + (x !== 1)); \n}\ncatch (e) {\n if ((e instanceof ReferenceError) !== true) {\n $ERROR('#1.2: x !== 1 throw ReferenceError. Actual: ' + (e)); \n }\n}\n\n",
+ "id": "S11.9.5_A2.1_T2"
+ },
+ {
+ "section": "11.9.5",
+ "description": "If GetBase(y) is null, throw ReferenceError",
+ "test": "//CHECK#1\ntry {\n 1 !== y;\n $ERROR('#1.1: 1 !== y throw ReferenceError. Actual: ' + (1 !== y)); \n}\ncatch (e) {\n if ((e instanceof ReferenceError) !== true) {\n $ERROR('#1.2: 1 !== y throw ReferenceError. Actual: ' + (e)); \n }\n}\n\n",
+ "id": "S11.9.5_A2.1_T3"
+ },
+ {
+ "section": "11.9.5",
+ "description": "Checking with \"=\"",
+ "test": "//CHECK#1\nvar x = 0; \nif ((x = 1) !== x) {\n $ERROR('#1: var x = 0; (x = 1) === x');\n}\n\n//CHECK#2\nvar x = 0; \nif (!(x !== (x = 1))) {\n $ERROR('#2: var x = 0; x !== (x = 1)');\n}\n\n",
+ "id": "S11.9.5_A2.4_T1"
+ },
+ {
+ "section": "11.9.5",
+ "description": "Checking with \"throw\"",
+ "test": "//CHECK#1\nvar x = function () { throw \"x\"; };\nvar y = function () { throw \"y\"; };\ntry {\n x() !== y();\n $ERROR('#1.1: var x = function () { throw \"x\"; }; var y = function () { throw \"y\"; }; x() !== y() throw \"x\". Actual: ' + (x() !== y()));\n} catch (e) {\n if (!(e !== \"y\")) {\n $ERROR('#1.2: First expression is evaluated first, and then second expression');\n } else {\n if (e !== \"x\") {\n $ERROR('#1.3: var x = function () { throw \"x\"; }; var y = function () { throw \"y\"; }; x() !== y() throw \"x\". Actual: ' + (e));\n }\n }\n}\n",
+ "id": "S11.9.5_A2.4_T2"
+ },
+ {
+ "section": "11.9.5",
+ "description": "Checking undeclarated variables",
+ "test": "//CHECK#1\ntry {\n x !== (x = 1);\n $ERROR('#1.1: x !== (x = 1) throw ReferenceError. Actual: ' + (x !== (x = 1))); \n}\ncatch (e) {\n if ((e instanceof ReferenceError) !== true) {\n $ERROR('#1.2: x !== (x = 1) throw ReferenceError. Actual: ' + (e)); \n }\n}\n\n//CHECK#2\nif ((y = 1) !== y) {\n $ERROR('#2: (y = 1) === y');\n}\n\n",
+ "id": "S11.9.5_A2.4_T3"
+ },
+ {
+ "section": "11.9.5, 11.9.6",
+ "description": "x and y are primitive booleans",
+ "test": "//CHECK#1\nif (true !== true) {\n $ERROR('#1: true === true');\n}\n\n//CHECK#2\nif (false !== false) {\n $ERROR('#2: false === false');\n}\n\n//CHECK#3\nif (!(true !== false)) {\n $ERROR('#3: true !== false');\n}\n\n//CHECK#4\nif (!(false !== true)) {\n $ERROR('#4: false !== true');\n}\n",
+ "id": "S11.9.5_A3"
+ },
+ {
+ "section": "11.9.5, 11.9.6",
+ "description": "x is NaN",
+ "test": "//CHECK#1\nif (!(Number.NaN !== true)) {\n $ERROR('#1: NaN !== true');\n}\n\n//CHECK#2\nif (!(Number.NaN !== 1)) {\n $ERROR('#2: NaN !== 1');\n}\n\n//CHECK#3\nif (!(Number.NaN !== Number.NaN)) {\n $ERROR('#3: NaN !== NaN');\n}\n\n//CHECK#4\nif (!(Number.NaN !== Number.POSITIVE_INFINITY)) {\n $ERROR('#4: NaN !== +Infinity');\n}\n\n//CHECK#5\nif (!(Number.NaN !== Number.NEGATIVE_INFINITY)) {\n $ERROR('#5: NaN !== -Infinity');\n}\n\n//CHECK#6\nif (!(Number.NaN !== Number.MAX_VALUE)) {\n $ERROR('#6: NaN !== Number.MAX_VALUE');\n}\n\n//CHECK#7\nif (!(Number.NaN !== Number.MIN_VALUE)) {\n $ERROR('#7: NaN !== Number.MIN_VALUE');\n}\n\n//CHECK#8\nif (!(Number.NaN !== \"string\")) {\n $ERROR('#8: NaN !== \"string\"');\n}\n\n//CHECK#9\nif (!(Number.NaN !== new Object())) {\n $ERROR('#9: NaN !== new Object()');\n}\n\n",
+ "id": "S11.9.5_A4.1_T1"
+ },
+ {
+ "section": "11.9.5, 11.9.6",
+ "description": "y is NaN",
+ "test": "//CHECK#1\nif (!(true !== Number.NaN)) {\n $ERROR('#1: true !== NaN');\n}\n\n//CHECK#2\nif (!(-1 !== Number.NaN)) {\n $ERROR('#2: -1 !== NaN');\n}\n\n//CHECK#3\nif (!(Number.NaN !== Number.NaN)) {\n $ERROR('#3: NaN !== NaN');\n}\n\n//CHECK#4\nif (!(Number.POSITIVE_INFINITY !== Number.NaN)) {\n $ERROR('#4: +Infinity !== NaN');\n}\n\n//CHECK#5\nif (!(Number.NEGATIVE_INFINITY !== Number.NaN)) {\n $ERROR('#5: -Infinity !== NaN');\n}\n\n//CHECK#6\nif (!(Number.MAX_VALUE !== Number.NaN)) {\n $ERROR('#6: Number.MAX_VALUE !== NaN');\n}\n\n//CHECK#7\nif (!(Number.MIN_VALUE !== Number.NaN)) {\n $ERROR('#7: Number.MIN_VALUE !== NaN');\n}\n\n//CHECK#8\nif (!(\"string\" !== Number.NaN)) {\n $ERROR('#8: \"string\" !== NaN');\n}\n\n//CHECK#9\nif (!(new Object() !== Number.NaN)) {\n $ERROR('#9: new Object() !== NaN');\n}\n",
+ "id": "S11.9.5_A4.1_T2"
+ },
+ {
+ "section": "11.9.5, 11.9.6",
+ "description": "Checking all combinations",
+ "test": "//CHECK#1\nif (+0 !== -0) {\n $ERROR('#1: +0 === -0');\n}\n\n//CHECK#2\nif (-0 !== +0) {\n $ERROR('#2: -0 === +0');\n}\n",
+ "id": "S11.9.5_A4.2"
+ },
+ {
+ "section": "11.9.5, 11.9.6",
+ "description": "x and y are primitive numbers",
+ "test": "//CHECK#1\nif (Number.POSITIVE_INFINITY !== Number.POSITIVE_INFINITY) {\n $ERROR('#1: +Infinity === +Infinity');\n}\n\n//CHECK#2\nif (Number.NEGATIVE_INFINITY !== Number.NEGATIVE_INFINITY) {\n $ERROR('#2: -Infinity === -Infinity');\n}\n\n//CHECK#3\nif (13 !== 13) {\n $ERROR('#3: 13 === 13');\n}\n\n//CHECK#4\nif (-13 !== -13) {\n $ERROR('#4: -13 === -13');\n}\n\n//CHECK#5\nif (1.3 !== 1.3) {\n $ERROR('#5: 1.3 === 1.3');\n}\n\n//CHECK#6\nif (-1.3 !== -1.3) {\n $ERROR('#6: -1.3 === -1.3');\n}\n\n//CHECK#7\nif (Number.POSITIVE_INFINITY !== -Number.NEGATIVE_INFINITY) {\n $ERROR('#7: +Infinity === -(-Infinity)');\n}\n\n//CHECK#8\nif (!(1 !== 0.999999999999)) {\n $ERROR('#8: 1 !== 0.999999999999');\n}\n\n//CHECK#9\nif (1.0 !== 1) {\n $ERROR('#9: 1.0 === 1');\n}\n",
+ "id": "S11.9.5_A4.3"
+ },
+ {
+ "section": "11.9.5, 11.9.6",
+ "description": "x and y are primitive strings",
+ "test": "//CHECK#1\nif (\"\" !== \"\") {\n $ERROR('#1: \"\" === \"\"');\n}\n\n//CHECK#2\nif (\" \" !== \" \") {\n $ERROR('#2: \" \" === \" \"');\n}\n\n//CHECK#3\nif (\"string\" !== \"string\") {\n $ERROR('#3: \"string\" === \"string\"');\n}\n\n//CHECK#4\nif (!(\" string\" !== \"string \")) {\n $ERROR('#4: \" string\" !== \"string \"');\n}\n\n//CHECK#5\nif (!(\"1.0\" !== \"1\")) {\n $ERROR('#5: \"1.0\" !== \"1\"');\n}\n",
+ "id": "S11.9.5_A5"
+ },
+ {
+ "section": "11.9.5, 11.9.6",
+ "description": "void 0, eval(\"var x\") is undefined",
+ "test": "//CHECK#1\nif (undefined !== undefined) {\n $ERROR('#1: undefined === undefined');\n}\n\n//CHECK#2\nif (void 0 !== undefined) {\n $ERROR('#2: void 0 === undefined');\n}\n\n//CHECK#3\nif (undefined !== eval(\"var x\")) {\n $ERROR('#3: undefined === eval(\"var x\")');\n}\n",
+ "id": "S11.9.5_A6.1"
+ },
+ {
+ "section": "11.9.5, 11.9.6",
+ "description": "null === null",
+ "test": "//CHECK#1\nif (null !== null) {\n $ERROR('#1: null === null');\n}\n",
+ "id": "S11.9.5_A6.2"
+ },
+ {
+ "section": "11.9.5, 11.9.6",
+ "description": "Checking Boolean object, Number object, String object, Object object",
+ "test": "//CHECK#1\nif (!(new Object() !== new Object())) {\n $ERROR('#1: new Object() !== new Object()');\n}\n\n//CHECK#2\nif (!(new Object(true) !== new Object(true))) {\n $ERROR('#2: new Object() !== new Object()');\n}\n\n//CHECK#3\nif (!(new Object(false) !== new Object(false))) {\n $ERROR('#3: new Object() !== new Object()');\n}\n\n//CHECK#4\nif (!(new Object(+0) !== new Object(-0))) {\n $ERROR('#4: new Object(+0) !== new Object(-0)');\n}\n\n//CHECK#5\nx = {}; \ny = x;\nif (x !== y) {\n $ERROR('#5: x = {}; y = x; x === y');\n}\n\n//CHECK#6\nif (!(new Boolean(true) !== new Number(1))) {\n $ERROR('#6 new Boolean(true) !== new Number(1)');\n}\n\n//CHECK#7\nif (!(new Number(1) !== new String(\"1\"))) {\n $ERROR('#7: new Number(1) !== new String(\"1\")');\n}\n\n//CHECK#8\nif (!(new String(\"1\") !== new Boolean(true))) {\n $ERROR('#8: new String(\"x\") !== new Boolean(true)');\n}\n\n\n",
+ "id": "S11.9.5_A7"
+ },
+ {
+ "section": "11.9.5, 11.9.6",
+ "description": "x or y is primitive boolean",
+ "test": "//CHECK#1\nif (!(true !== new Boolean(true))) {\n $ERROR('#1: true !== new Number(true)');\n}\n\n//CHECK#2\nif (!(true !== 1)) {\n $ERROR('#2: true !== 1');\n}\n\n//CHECK#3\nif (!(true !== new Number(true))) {\n $ERROR('#3: true !== new Number(true)');\n}\n\n//CHECK#4\nif (!(true !== \"1\")) {\n $ERROR('#4: true !== \"1\"');\n}\n\n//CHECK#5\nif (!(true !== new String(true))) {\n $ERROR('#5: true !== new String(true)');\n}\n\n//CHECK#6\nif (!(new Boolean(false) !== false)) {\n $ERROR('#6: new Number(false) !== false');\n}\n\n//CHECK#7\nif (!(0 !== false)) {\n $ERROR('#7: 0 !== false');\n}\n\n//CHECK#8\nif (!(new Number(false) !== false)) {\n $ERROR('#8: new Number(false) !== false');\n}\n\n//CHECK#9\nif (!(\"0\" !== false)) {\n $ERROR('#9: \"0\" !== false');\n}\n\n//CHECK#10\nif (!(false !== new String(false))) {\n $ERROR('#10: false !== new String(false)');\n}\n\n//CHECK#11\nif (!(true !== {valueOf: function () {return true}})) {\n $ERROR('#11: true !== {valueOf: function () {return true}}');\n}\n",
+ "id": "S11.9.5_A8_T1"
+ },
+ {
+ "section": "11.9.5, 11.9.6",
+ "description": "x or y is primitive number",
+ "test": "//CHECK#1\nif (!(1 !== new Number(1))) {\n $ERROR('#1: 1 !== new Number(1)');\n}\n\n//CHECK#2\nif (!(1 !== true)) {\n $ERROR('#2: 1 !== true');\n}\n\n//CHECK#3\nif (!(1 !== new Boolean(1))) {\n $ERROR('#3: 1 !== new Boolean(1)');\n}\n\n//CHECK#4\nif (!(1 !== \"1\")) {\n $ERROR('#4: 1 !== \"1\"');\n}\n\n//CHECK#5\nif (!(1 !== new String(1))) {\n $ERROR('#5: 1 !== new String(1)');\n}\n\n//CHECK#6\nif (!(new Number(0) !== 0)) {\n $ERROR('#6: new Number(0) !== 0');\n}\n\n//CHECK#7\nif (!(false !== 0)) {\n $ERROR('#7: false !== 0');\n}\n\n//CHECK#8\nif (!(new Boolean(0) !== 0)) {\n $ERROR('#8: new Boolean(0) !== 0');\n}\n\n//CHECK#9\nif (!(\"0\" !== 0)) {\n $ERROR('#9: \"0\" !== 0');\n}\n\n//CHECK#10\nif (!(new String(0) !== 0)) {\n $ERROR('#10: new String(0) !== 0');\n}\n\n//CHECK#11\nif (!(1 !== {valueOf: function () {return 1}})) {\n $ERROR('#11: 1 !== {valueOf: function () {return 1}}');\n}\n",
+ "id": "S11.9.5_A8_T2"
+ },
+ {
+ "section": "11.9.5, 11.9.6",
+ "description": "x or y is primitive string",
+ "test": "//CHECK#1\nif (!(\"1\" !== new String(\"1\"))) {\n $ERROR('#1: \"1\" !== new String(\"1\")');\n}\n\n//CHECK#2\nif (!(\"1\" !== true)) {\n $ERROR('#2: \"1\" !== true');\n}\n\n//CHECK#3\nif (!(\"1\" !== new Boolean(\"1\"))) {\n $ERROR('#3: \"1\" !== new Boolean(\"1\")');\n}\n\n//CHECK#4\nif (!(\"1\" !== 1)) {\n $ERROR('#4: \"1\" === 1');\n}\n\n//CHECK#5\nif (!(\"1\" !== new Number(\"1\"))) {\n $ERROR('#5: \"1\" === new Number(\"1\")');\n}\n\n//CHECK#6\nif (!(new String(false) !== false)) {\n $ERROR('#6: new Number(false) !== false');\n}\n\n//CHECK#7\nif (!(false !== \"0\")) {\n $ERROR('#7: false !== \"0\"');\n}\n\n//CHECK#8\nif (!(\"0\" !== new Boolean(\"0\"))) {\n $ERROR('#8: \"0\" !== new Boolean(\"0\")');\n}\n\n//CHECK#9\nif (!(false !== 0)) {\n $ERROR('#9: false !== 0');\n}\n\n//CHECK#10\nif (!(false !== new Number(false))) {\n $ERROR('#10: false !== new Number(false)');\n}\n\n//CHECK#11\nif (!(\"1\" !== {valueOf: function () {return \"1\"}})) {\n $ERROR('#11: \"1\" !== {valueOf: function () {return \"1\"}}');\n}\n\n",
+ "id": "S11.9.5_A8_T3"
+ },
+ {
+ "section": "11.9.5, 11.9.6",
+ "description": "x or y is null or undefined",
+ "test": "//CHECK#1\nif (!(undefined !== null)) {\n $ERROR('#1: undefined !== null');\n}\n\n//CHECK#2\nif (!(null !== undefined)) {\n $ERROR('#2: null !== undefined');\n}\n\n//CHECK#3\nif (!(null !== 0)) {\n $ERROR('#3: null !== 0');\n}\n\n//CHECK#4\nif (!(0 !== null)) {\n $ERROR('#4: 0 !== null');\n}\n\n//CHECK#5\nif (!(null !== false)) {\n $ERROR('#5: null !== false');\n}\n\n//CHECK#6\nif (!(false !== null)) {\n $ERROR('#6: false !== null');\n}\n\n//CHECK#7\nif (!(undefined !== false)) {\n $ERROR('#7: undefined !== false');\n}\n\n//CHECK#8\nif (!(false !== undefined)) {\n $ERROR('#8: false !== undefined');\n}\n\n//CHECK#9\nif (!(null !== new Object())) {\n $ERROR('#9: null !== new Object()');\n}\n\n//CHECK#10\nif (!(new Object() !== null)) {\n $ERROR('#10: new Object() !== null');\n}\n\n//CHECK#11\nif (!(null !== \"null\")) {\n $ERROR('#11: null !== \"null\"');\n}\n\n//CHECK#12\nif (!(\"null\" !== null)) {\n $ERROR('#12: \"null\" !== null');\n}\n\n//CHECK#13\nif (!(undefined !== \"undefined\")) {\n $ERROR('#13: undefined !== \"undefined\"');\n}\n\n//CHECK#14\nif (!(\"undefined\" !== undefined)) {\n $ERROR('#14: \"undefined\" !== undefined');\n}\n",
+ "id": "S11.9.5_A8_T4"
+ },
+ {
+ "section": "11.9.5, 11.9.6",
+ "description": "Checking such x and y that either x or y is primitive string and the other is primitive number",
+ "test": "//CHECK#1\ntry {\n throw 1;\n} catch(e) {\n if (!(e !== \"1\")) {\n $ERROR('#1: throw 1 !== \"1\"');\n }\n}\n\n//CHECK#2\ntry {\n throw \"1\";\n} catch(e) {\n if (!(1 !== e)) {\n $ERROR('#2: 1 !== throw \"1\"');\n }\n} \n",
+ "id": "S11.9.5_A8_T5"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/12.1.json b/website/resources/scripts/testcases2/12.1.json
new file mode 100644
index 000000000..9445b04ec
--- /dev/null
+++ b/website/resources/scripts/testcases2/12.1.json
@@ -0,0 +1,50 @@
+{
+ "testCollection": {
+ "name": "12.1",
+ "numTests": 7,
+ "tests": [
+ {
+ "id": "12.1-1",
+ "path": "TestCases/chapter12/12.1/12.1-1.js",
+ "description": "12.1 - block '{ StatementListopt };' is not allowed: try-catch",
+ "test": "assertTrue((function testcase() {\n try {\n eval(\"try{};catch(){}\");\n return false;\n } catch (e) {\n return e instanceof SyntaxError;\n }\n }).call(this));\n"
+ },
+ {
+ "id": "12.1-2",
+ "path": "TestCases/chapter12/12.1/12.1-2.js",
+ "description": "12.1 - block '{ StatementListopt };' is not allowed: try-catch-finally",
+ "test": "assertTrue((function testcase() {\n try {\n eval(\"try{};catch{};finally{}\");\n return false;\n } catch (e) {\n return e instanceof SyntaxError;\n }\n }).call(this));\n"
+ },
+ {
+ "id": "12.1-3",
+ "path": "TestCases/chapter12/12.1/12.1-3.js",
+ "description": "12.1 - block '{ StatementListopt };' is not allowed: try-finally",
+ "test": "assertTrue((function testcase() {\n try {\n eval(\"try{};finally{}\");\n return false;\n } catch (e) {\n return e instanceof SyntaxError;\n }\n }).call(this));\n"
+ },
+ {
+ "id": "12.1-4",
+ "path": "TestCases/chapter12/12.1/12.1-4.js",
+ "description": "12.1 - block '{ StatementListopt };' is not allowed: if-else",
+ "test": "assertTrue((function testcase() {\n try {\n eval(\"if{};else{}\");\n return false;\n } catch (e) {\n return e instanceof SyntaxError;\n }\n }).call(this));\n"
+ },
+ {
+ "id": "12.1-5",
+ "path": "TestCases/chapter12/12.1/12.1-5.js",
+ "description": "12.1 - block '{ StatementListopt };' is not allowed: if-else-if",
+ "test": "assertTrue((function testcase() {\n try {\n eval(\"if{};else if{}\");\n return false;\n } catch (e) {\n return e instanceof SyntaxError;\n }\n }).call(this));\n"
+ },
+ {
+ "id": "12.1-6",
+ "path": "TestCases/chapter12/12.1/12.1-6.js",
+ "description": "12.1 - block '{ StatementListopt };' is not allowed: if-else-if-else",
+ "test": "assertTrue((function testcase() {\n try {\n eval(\"if{};else if{};else{}\");\n return false;\n } catch (e) {\n return e instanceof SyntaxError;\n }\n }).call(this));\n"
+ },
+ {
+ "id": "12.1-7",
+ "path": "TestCases/chapter12/12.1/12.1-7.js",
+ "description": "12.1 - block '{ StatementListopt };' is not allowed: do-while",
+ "test": "assertTrue((function testcase() {\n try {\n eval(\"do{};while()\");\n return false;\n } catch (e) {\n return e instanceof SyntaxError;\n }\n }).call(this));\n"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/12.10.1.json b/website/resources/scripts/testcases2/12.10.1.json
new file mode 100644
index 000000000..8b0afd063
--- /dev/null
+++ b/website/resources/scripts/testcases2/12.10.1.json
@@ -0,0 +1,126 @@
+{
+ "testCollection": {
+ "name": "12.10.1",
+ "numTests": 15,
+ "tests": [
+ {
+ "id": "12.10.1-1-s",
+ "path": "TestCases/chapter12/12.10/12.10.1/12.10.1-1-s.js",
+ "description": "with statement in strict mode throws SyntaxError (strict function)",
+ "test": "assertTrue((function testcase() {\n\n try {\n // wrapping it in eval since this needs to be a syntax error. The\n // exception thrown must be a SyntaxError exception.\n eval(\"\\\n function f() {\\\n \\'use strict\\';\\\n var o = {}; \\\n with (o) {};\\\n }\\\n \");\n return false;\n }\n catch (e) {\n return(e instanceof SyntaxError); \n\t}\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict())",
+ "strict_only": ""
+ },
+ {
+ "id": "12.10.1-10-s",
+ "path": "TestCases/chapter12/12.10/12.10.1/12.10.1-10-s.js",
+ "description": "with statement in strict mode throws SyntaxError (eval, where the container function is strict)",
+ "test": "assertTrue((function testcase() {\n 'use strict';\n \n // wrapping it in eval since this needs to be a syntax error. The\n // exception thrown must be a SyntaxError exception. Note that eval\n // inherits the strictness of its calling context. \n try {\n eval(\"\\\n var o = {};\\\n with (o) {}\\\n \");\n return false;\n }\n catch (e) {\n return (e instanceof SyntaxError);\n }\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict())",
+ "strict_only": ""
+ },
+ {
+ "id": "12.10.1-11-s",
+ "path": "TestCases/chapter12/12.10/12.10.1/12.10.1-11-s.js",
+ "description": "Strict Mode - SyntaxError is thrown when using WithStatement in strict mode code",
+ "test": "assertTrue((function testcase() {\n \"use strict\";\n try {\n eval(\"with ({}) { throw new Error();}\");\n\n return false;\n } catch (e) {\n return e instanceof SyntaxError;\n }\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict())",
+ "strict_only": ""
+ },
+ {
+ "id": "12.10.1-12-s",
+ "path": "TestCases/chapter12/12.10/12.10.1/12.10.1-12-s.js",
+ "description": "with statement in strict mode throws SyntaxError (strict eval)",
+ "test": "assertTrue((function testcase() {\n try {\n eval(\"\\\n 'use strict'; \\\n var o = {}; \\\n with (o) {}\\\n \");\n return false;\n }\n catch (e) {\n return (e instanceof SyntaxError) ;\n }\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict())",
+ "strict_only": ""
+ },
+ {
+ "id": "12.10.1-13-s",
+ "path": "TestCases/chapter12/12.10/12.10.1/12.10.1-13-s.js",
+ "description": "Strict Mode - SyntaxError isn't thrown when WithStatement body is in strict mode code",
+ "test": "assertTrue((function testcase() {\n with ({}) {\n \"use strict\";\n }\n return true;\n }).call(this));\n",
+ "strict_only": ""
+ },
+ {
+ "id": "12.10.1-14-s",
+ "path": "TestCases/chapter12/12.10/12.10.1/12.10.1-14-s.js",
+ "description": "Strict Mode - SyntaxError is thrown when the getter of a literal object utilizes WithStatement",
+ "test": "assertTrue((function testcase() {\n \"use strict\";\n\n try {\n eval(\"var obj = { get: function (a) { with(a){} } }; \");\n\n return false;\n } catch (e) {\n return e instanceof SyntaxError;\n }\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict())",
+ "strict_only": ""
+ },
+ {
+ "id": "12.10.1-15-s",
+ "path": "TestCases/chapter12/12.10/12.10.1/12.10.1-15-s.js",
+ "description": "Strict Mode - SyntaxError is thrown when the RHS of a dot property assignment utilizes WithStatement",
+ "test": "assertTrue((function testcase() {\n \"use strict\";\n\n try {\n eval(\"var obj = {}; obj.get = function (a) { with(a){} }; \");\n return false;\n } catch (e) {\n return e instanceof SyntaxError;\n }\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict())",
+ "strict_only": ""
+ },
+ {
+ "id": "12.10.1-16-s",
+ "path": "TestCases/chapter12/12.10/12.10.1/12.10.1-16-s.js",
+ "description": "Strict Mode - SyntaxError is thrown when the RHS of an object indexer assignment utilizes WithStatement",
+ "test": "assertTrue((function testcase() {\n \"use strict\";\n\n try {\n eval(\"var obj = {}; obj['get'] = function (a) { with(a){} }; \");\n return false;\n } catch (e) {\n return e instanceof SyntaxError;\n }\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict())",
+ "strict_only": ""
+ },
+ {
+ "id": "12.10.1-2-s",
+ "path": "TestCases/chapter12/12.10/12.10.1/12.10.1-2-s.js",
+ "description": "with statement in strict mode throws SyntaxError (nested function where container is strict)",
+ "test": "assertTrue((function testcase() {\n try {\n // wrapping it in eval since this needs to be a syntax error. The\n // exception thrown must be a SyntaxError exception.\n eval(\"\\\n function foo() {\\\n \\'use strict\\'; \\\n function f() {\\\n var o = {}; \\\n with (o) {};\\\n }\\\n }\\\n \");\n return false;\n }\n catch (e) {\n return (e instanceof SyntaxError);\n }\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict())",
+ "strict_only": ""
+ },
+ {
+ "id": "12.10.1-3-s",
+ "path": "TestCases/chapter12/12.10/12.10.1/12.10.1-3-s.js",
+ "description": "with statement in strict mode throws SyntaxError (nested strict function)",
+ "test": "assertTrue((function testcase() {\n try {\n // wrapping it in eval since this needs to be a syntax error. The\n // exception thrown must be a SyntaxError exception.\n eval(\"\\\n function foo() {\\\n function f() {\\\n \\'use strict\\'; \\\n var o = {}; \\\n with (o) {};\\\n }\\\n }\\\n \");\n return false;\n }\n catch (e) {\n return (e instanceof SyntaxError);\n }\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict())",
+ "strict_only": ""
+ },
+ {
+ "id": "12.10.1-4-s",
+ "path": "TestCases/chapter12/12.10/12.10.1/12.10.1-4-s.js",
+ "description": "with statement in strict mode throws SyntaxError (strict Function)",
+ "test": "assertTrue((function testcase() {\n try {\n var f = Function(\"\\\n \\'use strict\\'; \\\n var o = {}; \\\n with (o) {};\\\n \");\n return false;\n }\n catch (e) {\n return (e instanceof SyntaxError);\n\t\n }\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict())",
+ "strict_only": ""
+ },
+ {
+ "id": "12.10.1-5-s",
+ "path": "TestCases/chapter12/12.10/12.10.1/12.10.1-5-s.js",
+ "description": "with statement allowed in nested Function even if its container Function is strict)",
+ "test": "assertTrue((function testcase() {\n \n Function(\"\\'use strict\\'; var f1 = Function( \\\"var o = {}; with (o) {};\\\")\");\n return true;\n \n }).call(this));\n",
+ "strict_only": ""
+ },
+ {
+ "id": "12.10.1-7-s",
+ "path": "TestCases/chapter12/12.10/12.10.1/12.10.1-7-s.js",
+ "description": "with statement in strict mode throws SyntaxError (function expression, where the container function is directly evaled from strict code)",
+ "test": "assertTrue((function testcase() {\n 'use strict';\n\n try {\n eval(\"var f = function () {\\\n var o = {}; \\\n with (o) {}; \\\n }\\\n \");\n return false;\n }\n catch (e) {\n return (e instanceof SyntaxError);\n }\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict())",
+ "strict_only": ""
+ },
+ {
+ "id": "12.10.1-8-s",
+ "path": "TestCases/chapter12/12.10/12.10.1/12.10.1-8-s.js",
+ "description": "with statement in strict mode throws SyntaxError (function expression, where the container Function is strict)",
+ "test": "assertTrue((function testcase() {\n try {\n Function(\"\\\n \\'use strict\\'; \\\n var f1 = function () {\\\n var o = {}; \\\n with (o) {}; \\\n }\\\n \");\n return false;\n }\n catch (e) {\n return (e instanceof SyntaxError);\n }\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict())",
+ "strict_only": ""
+ },
+ {
+ "id": "12.10.1-9-s",
+ "path": "TestCases/chapter12/12.10/12.10.1/12.10.1-9-s.js",
+ "description": "with statement in strict mode throws SyntaxError (strict function expression)",
+ "test": "assertTrue((function testcase() {\n try {\n eval(\"\\\n var f = function () {\\\n \\'use strict\\';\\\n var o = {}; \\\n with (o) {}; \\\n }\\\n \");\n return false;\n }\n catch (e) {\n return (e instanceof SyntaxError) ;\n }\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict())",
+ "strict_only": ""
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/12.10.json b/website/resources/scripts/testcases2/12.10.json
new file mode 100644
index 000000000..0331e0e4f
--- /dev/null
+++ b/website/resources/scripts/testcases2/12.10.json
@@ -0,0 +1,80 @@
+{
+ "testCollection": {
+ "name": "12.10",
+ "numTests": 12,
+ "tests": [
+ {
+ "id": "12.10-0-1",
+ "path": "TestCases/chapter12/12.10/12.10-0-1.js",
+ "description": "with does not change declaration scope - vars in with are visible outside",
+ "test": "assertTrue((function testcase() {\n var o = {};\n var f = function () {\n\t/* capture foo binding before executing with */\n\treturn foo;\n }\n\n with (o) {\n var foo = \"12.10-0-1\";\n }\n\n return f()===\"12.10-0-1\"\n\n }).call(this));\n"
+ },
+ {
+ "id": "12.10-0-10",
+ "path": "TestCases/chapter12/12.10/12.10-0-10.js",
+ "description": "with introduces scope - name lookup finds function parameter",
+ "test": "assertTrue((function testcase() {\n function f(o) {\n\n function innerf(o, x) {\n with (o) {\n return x;\n }\n }\n\n return innerf(o, 42);\n }\n \n if (f({}) === 42) {\n return true;\n }\n }).call(this));\n"
+ },
+ {
+ "id": "12.10-0-11",
+ "path": "TestCases/chapter12/12.10/12.10-0-11.js",
+ "description": "with introduces scope - name lookup finds inner variable",
+ "test": "assertTrue((function testcase() {\n function f(o) {\n\n function innerf(o) {\n var x = 42;\n\n with (o) {\n return x;\n }\n }\n\n return innerf(o);\n }\n \n if (f({}) === 42) {\n return true;\n }\n }).call(this));\n"
+ },
+ {
+ "id": "12.10-0-12",
+ "path": "TestCases/chapter12/12.10/12.10-0-12.js",
+ "description": "with introduces scope - name lookup finds property",
+ "test": "assertTrue((function testcase() {\n function f(o) {\n\n function innerf(o) {\n with (o) {\n return x;\n }\n }\n\n return innerf(o);\n }\n \n if (f({x:42}) === 42) {\n return true;\n }\n }).call(this));\n"
+ },
+ {
+ "id": "12.10-0-3",
+ "path": "TestCases/chapter12/12.10/12.10-0-3.js",
+ "description": "with introduces scope - that is captured by function expression",
+ "test": "assertTrue((function testcase() {\n var o = {prop: \"12.10-0-3 before\"};\n var f;\n\n with (o) {\n f = function () { return prop; }\n }\n o.prop = \"12.10-0-3 after\";\n return f()===\"12.10-0-3 after\"\n }).call(this));\n"
+ },
+ {
+ "id": "12.10-0-7",
+ "path": "TestCases/chapter12/12.10/12.10-0-7.js",
+ "description": "with introduces scope - scope removed when exiting with statement",
+ "test": "assertTrue((function testcase() {\n var o = {foo: 1};\n\n with (o) {\n foo = 42;\n }\n\n try {\n foo;\n }\n catch (e) {\n return true;\n }\n }).call(this));\n"
+ },
+ {
+ "id": "12.10-0-8",
+ "path": "TestCases/chapter12/12.10/12.10-0-8.js",
+ "description": "with introduces scope - var initializer sets like named property",
+ "test": "assertTrue((function testcase() {\n var o = {foo: 42};\n\n with (o) {\n var foo = \"set in with\";\n }\n\n return o.foo === \"set in with\";\n }).call(this));\n"
+ },
+ {
+ "id": "12.10-0-9",
+ "path": "TestCases/chapter12/12.10/12.10-0-9.js",
+ "description": "with introduces scope - name lookup finds outer variable",
+ "test": "assertTrue((function testcase() {\n function f(o) {\n var x = 42;\n\n function innerf(o) {\n with (o) {\n return x;\n }\n }\n\n return innerf(o);\n }\n \n if (f({}) === 42) {\n return true;\n }\n }).call(this));\n"
+ },
+ {
+ "id": "12.10-2-1",
+ "path": "TestCases/chapter12/12.10/12.10-2-1.js",
+ "description": "with - expression being Number",
+ "test": "assertTrue((function testcase() {\n var o = 2;\n var foo = 1;\n try\n {\n with (o) {\n foo = 42;\n }\n }\n catch(e)\n {\n }\n return true;\n \n }).call(this));\n"
+ },
+ {
+ "id": "12.10-2-2",
+ "path": "TestCases/chapter12/12.10/12.10-2-2.js",
+ "description": "with - expression being Boolean",
+ "test": "assertTrue((function testcase() {\n var o = true;\n var foo = 1;\n try\n {\n with (o) {\n foo = 42;\n }\n }\n catch(e)\n {\n }\n return true;\n \n }).call(this));\n"
+ },
+ {
+ "id": "12.10-2-3",
+ "path": "TestCases/chapter12/12.10/12.10-2-3.js",
+ "description": "with - expression being string",
+ "test": "assertTrue((function testcase() {\n var o = \"str\";\n var foo = 1;\n try\n {\n with (o) {\n foo = 42;\n }\n }\n catch(e)\n {\n }\n return true;\n \n }).call(this));\n"
+ },
+ {
+ "id": "12.10-7-1",
+ "path": "TestCases/chapter12/12.10/12.10-7-1.js",
+ "description": "with introduces scope - restores the earlier environment on exit",
+ "test": "assertTrue((function testcase() {\n var a = 1;\n\n var o = {a : 2};\n try\n {\n with (o) {\n a = 3;\n throw 1;\n a = 4;\n }\n }\n catch(e)\n {}\n\n if (a === 1 && o.a === 3) {\n return true;\n }\n\n }).call(this));\n"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/12.10_The_with_Statement.json b/website/resources/scripts/testcases2/12.10_The_with_Statement.json
new file mode 100644
index 000000000..6bcfa74ac
--- /dev/null
+++ b/website/resources/scripts/testcases2/12.10_The_with_Statement.json
@@ -0,0 +1,968 @@
+{
+ "testCollection": {
+ "name": "12.10_The_with_Statement",
+ "numTests": 120,
+ "tests": [
+ {
+ "section": "12.10",
+ "description": "Using interation statement within \"with\" statement leading to normal completion",
+ "strict_mode_negative": "",
+ "test": "this.p1 = 1;\nthis.p2 = 2;\nthis.p3 = 3;\nvar result = \"result\";\nvar myObj = {p1: 'a', \n p2: 'b', \n p3: 'c',\n value: 'myObj_value',\n valueOf : function(){return 'obj_valueOf';},\n parseInt : function(){return 'obj_parseInt';},\n NaN : 'obj_NaN',\n Infinity : 'obj_Infinity',\n eval : function(){return 'obj_eval';},\n parseFloat : function(){return 'obj_parseFloat';},\n isNaN : function(){return 'obj_isNaN';},\n isFinite : function(){return 'obj_isFinite';}\n}\nvar del;\nvar st_p1 = \"p1\";\nvar st_p2 = \"p2\";\nvar st_p3 = \"p3\";\nvar st_parseInt = \"parseInt\";\nvar st_NaN = \"NaN\";\nvar st_Infinity = \"Infinity\";\nvar st_eval = \"eval\";\nvar st_parseFloat = \"parseFloat\";\nvar st_isNaN = \"isNaN\";\nvar st_isFinite = \"isFinite\";\n\nwith(myObj){\n do{\n st_p1 = p1;\n st_p2 = p2;\n st_p3 = p3;\n st_parseInt = parseInt;\n st_NaN = NaN;\n st_Infinity = Infinity;\n st_eval = eval;\n st_parseFloat = parseFloat;\n st_isNaN = isNaN;\n st_isFinite = isFinite;\n p1 = 'x1';\n this.p2 = 'x2';\n del = delete p3;\n var p4 = 'x4';\n p5 = 'x5';\n var value = 'value';\n }\n while(false);\n}\n\nif(!(p1 === 1)){\n $ERROR('#1: p1 === 1. Actual: p1 ==='+ p1 );\n}\n\nif(!(p2 === \"x2\")){\n $ERROR('#2: p2 === \"x2\". Actual: p2 ==='+ p2 );\n}\n\nif(!(p3 === 3)){\n $ERROR('#3: p3 === 3. Actual: p3 ==='+ p3 );\n}\n\nif(!(p4 === \"x4\")){\n $ERROR('#4: p4 === \"x4\". Actual: p4 ==='+ p4 );\n}\n\nif(!(p5 === \"x5\")){\n $ERROR('#5: p5 === \"x5\". Actual: p5 ==='+ p5 );\n}\n\nif(!(myObj.p1 === \"x1\")){\n $ERROR('#6: myObj.p1 === \"x1\". Actual: myObj.p1 ==='+ myObj.p1 );\n}\n\nif(!(myObj.p2 === \"b\")){\n $ERROR('#7: myObj.p2 === \"b\". Actual: myObj.p2 ==='+ myObj.p2 );\n}\n\nif(!(myObj.p3 === undefined)){\n $ERROR('#8: myObj.p3 === undefined. Actual: myObj.p3 ==='+ myObj.p3 );\n}\n\nif(!(myObj.p4 === undefined)){\n $ERROR('#9: myObj.p4 === undefined. Actual: myObj.p4 ==='+ myObj.p4 );\n}\n\nif(!(myObj.p5 === undefined)){\n $ERROR('#10: myObj.p5 === undefined. Actual: myObj.p5 ==='+ myObj.p5 );\n}\n\nif(!(st_parseInt !== parseInt)){\n $ERROR('#11: myObj.parseInt !== parseInt');\n}\n\nif(!(st_NaN === \"obj_NaN\")){\n $ERROR('#12: myObj.NaN !== NaN');\n}\n\nif(!(st_Infinity !== Infinity)){\n $ERROR('#13: myObj.Infinity !== Infinity');\n}\n\nif(!(st_eval !== eval)){\n $ERROR('#14: myObj.eval !== eval');\n}\n\nif(!(st_parseFloat !== parseFloat)){\n $ERROR('#15: myObj.parseFloat !== parseFloat');\n}\n\nif(!(st_isNaN !== isNaN)){\n $ERROR('#16: myObj.isNaN !== isNaN');\n}\n\nif(!(st_isFinite !== isFinite)){\n $ERROR('#17: myObj.isFinite !== isFinite');\n}\n\nif(!(value === undefined)){\n $ERROR('#18: value === undefined. Actual: value ==='+ value );\n}\n\nif(!(myObj.value === \"value\")){\n $ERROR('#19: myObj.value === \"value\". Actual: myObj.value ==='+ myObj.value );\n}\n",
+ "id": "S12.10_A1.10_T1",
+ "strict_only": ""
+ },
+ {
+ "section": "12.10",
+ "description": "Using iteration statement within \"with\" statement leading to completion by exception",
+ "strict_mode_negative": "",
+ "test": "this.p1 = 1;\nthis.p2 = 2;\nthis.p3 = 3;\nvar result = \"result\";\nvar myObj = {p1: 'a', \n p2: 'b', \n p3: 'c',\n value: 'myObj_value',\n valueOf : function(){return 'obj_valueOf';},\n parseInt : function(){return 'obj_parseInt';},\n NaN : 'obj_NaN',\n Infinity : 'obj_Infinity',\n eval : function(){return 'obj_eval';},\n parseFloat : function(){return 'obj_parseFloat';},\n isNaN : function(){return 'obj_isNaN';},\n isFinite : function(){return 'obj_isFinite';}\n}\nvar del;\nvar st_p1 = \"p1\";\nvar st_p2 = \"p2\";\nvar st_p3 = \"p3\";\nvar st_parseInt = \"parseInt\";\nvar st_NaN = \"NaN\";\nvar st_Infinity = \"Infinity\";\nvar st_eval = \"eval\";\nvar st_parseFloat = \"parseFloat\";\nvar st_isNaN = \"isNaN\";\nvar st_isFinite = \"isFinite\";\n\ntry {\n with(myObj){\n do{\n st_p1 = p1;\n st_p2 = p2;\n st_p3 = p3;\n st_parseInt = parseInt;\n st_NaN = NaN;\n st_Infinity = Infinity;\n st_eval = eval;\n st_parseFloat = parseFloat;\n st_isNaN = isNaN;\n st_isFinite = isFinite;\n p1 = 'x1';\n this.p2 = 'x2';\n del = delete p3;\n var p4 = 'x4';\n p5 = 'x5';\n var value = 'value';\n throw value;\n }\n while(false);\n }\n} catch(e){\n result = e;\n}\n\nif(!(result === \"value\")){\n $ERROR('#0: result === \"value\". Actual: result ==='+ result );\n}\n\nif(!(p1 === 1)){\n $ERROR('#1: p1 === 1. Actual: p1 ==='+ p1 );\n}\n\nif(!(p2 === \"x2\")){\n $ERROR('#2: p2 === \"x2\". Actual: p2 ==='+ p2 );\n}\n\nif(!(p3 === 3)){\n $ERROR('#3: p3 === 3. Actual: p3 ==='+ p3 );\n}\n\nif(!(p4 === \"x4\")){\n $ERROR('#4: p4 === \"x4\". Actual: p4 ==='+ p4 );\n}\n\nif(!(p5 === \"x5\")){\n $ERROR('#5: p5 === \"x5\". Actual: p5 ==='+ p5 );\n}\n\nif(!(myObj.p1 === \"x1\")){\n $ERROR('#6: myObj.p1 === \"x1\". Actual: myObj.p1 ==='+ myObj.p1 );\n}\n\nif(!(myObj.p2 === \"b\")){\n $ERROR('#7: myObj.p2 === \"b\". Actual: myObj.p2 ==='+ myObj.p2 );\n}\n\nif(!(myObj.p3 === undefined)){\n $ERROR('#8: myObj.p3 === undefined. Actual: myObj.p3 ==='+ myObj.p3 );\n}\n\nif(!(myObj.p4 === undefined)){\n $ERROR('#9: myObj.p4 === undefined. Actual: myObj.p4 ==='+ myObj.p4 );\n}\n\nif(!(myObj.p5 === undefined)){\n $ERROR('#10: myObj.p5 === undefined. Actual: myObj.p5 ==='+ myObj.p5 );\n}\n\nif(!(st_parseInt !== parseInt)){\n $ERROR('#11: myObj.parseInt !== parseInt');\n}\n\nif(!(st_NaN === \"obj_NaN\")){\n $ERROR('#12: myObj.NaN !== NaN');\n}\n\nif(!(st_Infinity !== Infinity)){\n $ERROR('#13: myObj.Infinity !== Infinity');\n}\n\nif(!(st_eval !== eval)){\n $ERROR('#14: myObj.eval !== eval');\n}\n\nif(!(st_parseFloat !== parseFloat)){\n $ERROR('#15: myObj.parseFloat !== parseFloat');\n}\n\nif(!(st_isNaN !== isNaN)){\n $ERROR('#16: myObj.isNaN !== isNaN');\n}\n\nif(!(st_isFinite !== isFinite)){\n $ERROR('#17: myObj.isFinite !== isFinite');\n}\n\nif(!(value === undefined)){\n $ERROR('#18: value === undefined. Actual: value ==='+ value );\n}\n\nif(!(myObj.value === \"value\")){\n $ERROR('#19: myObj.value === \"value\". Actual: myObj.value ==='+ myObj.value );\n}\n",
+ "id": "S12.10_A1.10_T2",
+ "strict_only": ""
+ },
+ {
+ "section": "12.10",
+ "description": "Using iteration statment withing \"with\" statement leading to completion by exception\niteration statement inside with statement - exception completion",
+ "strict_mode_negative": "",
+ "test": "this.p1 = 1;\nthis.p2 = 2;\nthis.p3 = 3;\nvar result = \"result\";\nvar myObj = {p1: 'a', \n p2: 'b', \n p3: 'c',\n value: 'myObj_value',\n valueOf : function(){return 'obj_valueOf';},\n parseInt : function(){return 'obj_parseInt';},\n NaN : 'obj_NaN',\n Infinity : 'obj_Infinity',\n eval : function(){return 'obj_eval';},\n parseFloat : function(){return 'obj_parseFloat';},\n isNaN : function(){return 'obj_isNaN';},\n isFinite : function(){return 'obj_isFinite';}\n}\nvar del;\nvar st_p1 = \"p1\";\nvar st_p2 = \"p2\";\nvar st_p3 = \"p3\";\nvar st_parseInt = \"parseInt\";\nvar st_NaN = \"NaN\";\nvar st_Infinity = \"Infinity\";\nvar st_eval = \"eval\";\nvar st_parseFloat = \"parseFloat\";\nvar st_isNaN = \"isNaN\";\nvar st_isFinite = \"isFinite\";\n\ntry {\n with(myObj){\n do{\n throw value;\n st_p1 = p1;\n st_p2 = p2;\n st_p3 = p3;\n st_parseInt = parseInt;\n st_NaN = NaN;\n st_Infinity = Infinity;\n st_eval = eval;\n st_parseFloat = parseFloat;\n st_isNaN = isNaN;\n st_isFinite = isFinite;\n p1 = 'x1';\n this.p2 = 'x2';\n del = delete p3;\n var p4 = 'x4';\n p5 = 'x5';\n var value = 'value';\n }\n while(false);\n }\n} catch(e){\n result = e;\n}\n\nif(!(result === \"myObj_value\")){\n $ERROR('#0: result === \"myObj_value\". Actual: result ==='+ result );\n}\n\nif(!(p1 === 1)){\n $ERROR('#1: p1 === 1. Actual: p1 ==='+ p1 );\n}\n\nif(!(p2 === 2)){\n $ERROR('#2: p2 === 2. Actual: p2 ==='+ p2 );\n}\n\nif(!(p3 === 3)){\n $ERROR('#3: p3 === 3. Actual: p3 ==='+ p3 );\n}\n\nif(!(p4 === undefined)){\n $ERROR('#4: p4 === undefined. Actual: p4 ==='+ p4 );\n}\n\ntry {\n p5;\n $ERROR('#5: p5 is not defined');\n} catch(e) { \n}\n\nif(!(myObj.p1 === \"a\")){\n $ERROR('#6: myObj.p1 === \"a\". Actual: myObj.p1 ==='+ myObj.p1 );\n}\n\nif(!(myObj.p2 === \"b\")){\n $ERROR('#7: myObj.p2 === \"b\". Actual: myObj.p2 ==='+ myObj.p2 );\n}\n\nif(!(myObj.p3 === \"c\")){\n $ERROR('#8: myObj.p3 === \"c\". Actual: myObj.p3 ==='+ myObj.p3 );\n}\n\nif(!(myObj.p4 === undefined)){\n $ERROR('#9: myObj.p4 === undefined. Actual: myObj.p4 ==='+ myObj.p4 );\n}\n\nif(!(myObj.p5 === undefined)){\n $ERROR('#10: myObj.p5 === undefined. Actual: myObj.p5 ==='+ myObj.p5 );\n}\n\nif(!(st_parseInt === \"parseInt\")){\n $ERROR('#11: myObj.parseInt === \"parseInt\". Actual: myObj.parseInt ==='+ myObj.parseInt );\n}\n\nif(!(st_NaN === \"NaN\")){\n $ERROR('#12: st_NaN === \"NaN\". Actual: st_NaN ==='+ st_NaN );\n}\n\nif(!(st_Infinity === \"Infinity\")){\n $ERROR('#13: st_Infinity === \"Infinity\". Actual: st_Infinity ==='+ st_Infinity );\n}\n\nif(!(st_eval === \"eval\")){\n $ERROR('#14: st_eval === \"eval\". Actual: st_eval ==='+ st_eval );\n}\n\nif(!(st_parseFloat === \"parseFloat\")){\n $ERROR('#15: st_parseFloat === \"parseFloat\". Actual: st_parseFloat ==='+ st_parseFloat );\n}\n\nif(!(st_isNaN === \"isNaN\")){\n $ERROR('#16: st_isNaN === \"isNaN\". Actual: st_isNaN ==='+ st_isNaN );\n}\n\nif(!(st_isFinite === \"isFinite\")){\n $ERROR('#17: st_isFinite === \"isFinite\". Actual: st_isFinite ==='+ st_isFinite );\n}\n\nif(!(value === undefined)){\n $ERROR('#18: value === undefined. Actual: value ==='+ value );\n}\n\nif(!(myObj.value === \"myObj_value\")){\n $ERROR('#19: myObj.value === \"myObj_value\". Actual: myObj.value ==='+ myObj.value );\n}\n",
+ "id": "S12.10_A1.10_T3",
+ "strict_only": ""
+ },
+ {
+ "section": "12.10",
+ "description": "Using iteration statement witthin \"with\" staement leading to completion by break\niteration statement inside with statement - break completion",
+ "strict_mode_negative": "",
+ "test": "this.p1 = 1;\nthis.p2 = 2;\nthis.p3 = 3;\nvar result = \"result\";\nvar myObj = {p1: 'a', \n p2: 'b', \n p3: 'c',\n value: 'myObj_value',\n valueOf : function(){return 'obj_valueOf';},\n parseInt : function(){return 'obj_parseInt';},\n NaN : 'obj_NaN',\n Infinity : 'obj_Infinity',\n eval : function(){return 'obj_eval';},\n parseFloat : function(){return 'obj_parseFloat';},\n isNaN : function(){return 'obj_isNaN';},\n isFinite : function(){return 'obj_isFinite';}\n}\nvar del;\nvar st_p1 = \"p1\";\nvar st_p2 = \"p2\";\nvar st_p3 = \"p3\";\nvar st_parseInt = \"parseInt\";\nvar st_NaN = \"NaN\";\nvar st_Infinity = \"Infinity\";\nvar st_eval = \"eval\";\nvar st_parseFloat = \"parseFloat\";\nvar st_isNaN = \"isNaN\";\nvar st_isFinite = \"isFinite\";\n\nwith(myObj){\n do{\n st_p1 = p1;\n st_p2 = p2;\n st_p3 = p3;\n st_parseInt = parseInt;\n st_NaN = NaN;\n st_Infinity = Infinity;\n st_eval = eval;\n st_parseFloat = parseFloat;\n st_isNaN = isNaN;\n st_isFinite = isFinite;\n p1 = 'x1';\n this.p2 = 'x2';\n del = delete p3;\n var p4 = 'x4';\n p5 = 'x5';\n var value = 'value';\n break;\n }\n while(false);\n}\n\nif(!(p1 === 1)){\n $ERROR('#1: p1 === 1. Actual: p1 ==='+ p1 );\n}\n\nif(!(p2 === \"x2\")){\n $ERROR('#2: p2 === \"x2\". Actual: p2 ==='+ p2 );\n}\n\nif(!(p3 === 3)){\n $ERROR('#3: p3 === 3. Actual: p3 ==='+ p3 );\n}\n\nif(!(p4 === \"x4\")){\n $ERROR('#4: p4 === \"x4\". Actual: p4 ==='+ p4 );\n}\n\nif(!(p5 === \"x5\")){\n $ERROR('#5: p5 === \"x5\". Actual: p5 ==='+ p5 );\n}\n\nif(!(myObj.p1 === \"x1\")){\n $ERROR('#6: myObj.p1 === \"x1\". Actual: myObj.p1 ==='+ myObj.p1 );\n}\n\nif(!(myObj.p2 === \"b\")){\n $ERROR('#7: myObj.p2 === \"b\". Actual: myObj.p2 ==='+ myObj.p2 );\n}\n\nif(!(myObj.p3 === undefined)){\n $ERROR('#8: myObj.p3 === undefined. Actual: myObj.p3 ==='+ myObj.p3 );\n}\n\nif(!(myObj.p4 === undefined)){\n $ERROR('#9: myObj.p4 === undefined. Actual: myObj.p4 ==='+ myObj.p4 );\n}\n\nif(!(myObj.p5 === undefined)){\n $ERROR('#10: myObj.p5 === undefined. Actual: myObj.p5 ==='+ myObj.p5 );\n}\n\nif(!(st_parseInt !== parseInt)){\n $ERROR('#11: myObj.parseInt !== parseInt');\n}\n\nif(!(st_NaN === \"obj_NaN\")){\n $ERROR('#12: myObj.NaN !== NaN');\n}\n\nif(!(st_Infinity !== Infinity)){\n $ERROR('#13: myObj.Infinity !== Infinity');\n}\n\nif(!(st_eval !== eval)){\n $ERROR('#14: myObj.eval !== eval');\n}\n\nif(!(st_parseFloat !== parseFloat)){\n $ERROR('#15: myObj.parseFloat !== parseFloat');\n}\n\nif(!(st_isNaN !== isNaN)){\n $ERROR('#16: myObj.isNaN !== isNaN');\n}\n\nif(!(st_isFinite !== isFinite)){\n $ERROR('#17: myObj.isFinite !== isFinite');\n}\n\nif(!(value === undefined)){\n $ERROR('#18: value === undefined. Actual: value ==='+ value );\n}\n\nif(!(myObj.value === \"value\")){\n $ERROR('#19: myObj.value === \"value\". Actual: myObj.value ==='+ myObj.value );\n}\n",
+ "id": "S12.10_A1.10_T4",
+ "strict_only": ""
+ },
+ {
+ "section": "12.10",
+ "description": "Using iteration statement within \"with\" statement leading to completion by break",
+ "strict_mode_negative": "",
+ "test": "this.p1 = 1;\nthis.p2 = 2;\nthis.p3 = 3;\nvar result = \"result\";\nvar myObj = {p1: 'a', \n p2: 'b', \n p3: 'c',\n value: 'myObj_value',\n valueOf : function(){return 'obj_valueOf';},\n parseInt : function(){return 'obj_parseInt';},\n NaN : 'obj_NaN',\n Infinity : 'obj_Infinity',\n eval : function(){return 'obj_eval';},\n parseFloat : function(){return 'obj_parseFloat';},\n isNaN : function(){return 'obj_isNaN';},\n isFinite : function(){return 'obj_isFinite';}\n}\nvar del;\nvar st_p1 = \"p1\";\nvar st_p2 = \"p2\";\nvar st_p3 = \"p3\";\nvar st_parseInt = \"parseInt\";\nvar st_NaN = \"NaN\";\nvar st_Infinity = \"Infinity\";\nvar st_eval = \"eval\";\nvar st_parseFloat = \"parseFloat\";\nvar st_isNaN = \"isNaN\";\nvar st_isFinite = \"isFinite\";\n\nwith(myObj){\n do{\n break;\n st_p1 = p1;\n st_p2 = p2;\n st_p3 = p3;\n st_parseInt = parseInt;\n st_NaN = NaN;\n st_Infinity = Infinity;\n st_eval = eval;\n st_parseFloat = parseFloat;\n st_isNaN = isNaN;\n st_isFinite = isFinite;\n p1 = 'x1';\n this.p2 = 'x2';\n del = delete p3;\n var p4 = 'x4';\n p5 = 'x5';\n var value = 'value';\n }\n while(false);\n}\n\nif(!(p1 === 1)){\n $ERROR('#1: p1 === 1. Actual: p1 ==='+ p1 );\n}\n\nif(!(p2 === 2)){\n $ERROR('#2: p2 === 2. Actual: p2 ==='+ p2 );\n}\n\nif(!(p3 === 3)){\n $ERROR('#3: p3 === 3. Actual: p3 ==='+ p3 );\n}\n\nif(!(p4 === undefined)){\n $ERROR('#4: p4 === undefined. Actual: p4 ==='+ p4 );\n}\n\ntry {\n p5;\n $ERROR('#5: p5 is not defined');\n} catch(e) { \n}\n\nif(!(myObj.p1 === \"a\")){\n $ERROR('#6: myObj.p1 === \"a\". Actual: myObj.p1 ==='+ myObj.p1 );\n}\n\nif(!(myObj.p2 === \"b\")){\n $ERROR('#7: myObj.p2 === \"b\". Actual: myObj.p2 ==='+ myObj.p2 );\n}\n\nif(!(myObj.p3 === \"c\")){\n $ERROR('#8: myObj.p3 === \"c\". Actual: myObj.p3 ==='+ myObj.p3 );\n}\n\nif(!(myObj.p4 === undefined)){\n $ERROR('#9: myObj.p4 === undefined. Actual: myObj.p4 ==='+ myObj.p4 );\n}\n\nif(!(myObj.p5 === undefined)){\n $ERROR('#10: myObj.p5 === undefined. Actual: myObj.p5 ==='+ myObj.p5 );\n}\n\nif(!(st_parseInt === \"parseInt\")){\n $ERROR('#11: myObj.parseInt === \"parseInt\". Actual: myObj.parseInt ==='+ myObj.parseInt );\n}\n\nif(!(st_NaN === \"NaN\")){\n $ERROR('#12: st_NaN === \"NaN\". Actual: st_NaN ==='+ st_NaN );\n}\n\nif(!(st_Infinity === \"Infinity\")){\n $ERROR('#13: st_Infinity === \"Infinity\". Actual: st_Infinity ==='+ st_Infinity );\n}\n\nif(!(st_eval === \"eval\")){\n $ERROR('#14: st_eval === \"eval\". Actual: st_eval ==='+ st_eval );\n}\n\nif(!(st_parseFloat === \"parseFloat\")){\n $ERROR('#15: st_parseFloat === \"parseFloat\". Actual: st_parseFloat ==='+ st_parseFloat );\n}\n\nif(!(st_isNaN === \"isNaN\")){\n $ERROR('#16: st_isNaN === \"isNaN\". Actual: st_isNaN ==='+ st_isNaN );\n}\n\nif(!(st_isFinite === \"isFinite\")){\n $ERROR('#17: st_isFinite === \"isFinite\". Actual: st_isFinite ==='+ st_isFinite );\n}\n\nif(!(value === undefined)){\n $ERROR('#18: value === undefined. Actual: value ==='+ value );\n}\n\nif(!(myObj.value === \"myObj_value\")){\n $ERROR('#19: myObj.value === \"myObj_value\". Actual: myObj.value ==='+ myObj.value );\n}\n",
+ "id": "S12.10_A1.10_T5",
+ "strict_only": ""
+ },
+ {
+ "section": "12.10",
+ "description": "Calling a function within \"with\" statement declared without the statement, leading to normal completion",
+ "strict_mode_negative": "",
+ "test": "this.p1 = 1;\nthis.p2 = 2;\nthis.p3 = 3;\nvar result = \"result\";\nvar myObj = {p1: 'a', \n p2: 'b', \n p3: 'c',\n value: 'myObj_value',\n valueOf : function(){return 'obj_valueOf';},\n parseInt : function(){return 'obj_parseInt';},\n NaN : 'obj_NaN',\n Infinity : 'obj_Infinity',\n eval : function(){return 'obj_eval';},\n parseFloat : function(){return 'obj_parseFloat';},\n isNaN : function(){return 'obj_isNaN';},\n isFinite : function(){return 'obj_isFinite';}\n}\nvar del;\nvar st_p1 = \"p1\";\nvar st_p2 = \"p2\";\nvar st_p3 = \"p3\";\nvar st_parseInt = \"parseInt\";\nvar st_NaN = \"NaN\";\nvar st_Infinity = \"Infinity\";\nvar st_eval = \"eval\";\nvar st_parseFloat = \"parseFloat\";\nvar st_isNaN = \"isNaN\";\nvar st_isFinite = \"isFinite\";\n\nvar f = function(){\n st_p1 = p1;\n st_p2 = p2;\n st_p3 = p3;\n st_parseInt = parseInt;\n st_NaN = NaN;\n st_Infinity = Infinity;\n st_eval = eval;\n st_parseFloat = parseFloat;\n st_isNaN = isNaN;\n st_isFinite = isFinite;\n p1 = 'x1';\n this.p2 = 'x2';\n del = delete p3;\n var p4 = 'x4';\n p5 = 'x5';\n var value = 'value';\n}\n\nwith(myObj){\n f();\n}\n\nif(!(p1 === \"x1\")){\n $ERROR('#1: p1 === \"x1\". Actual: p1 ==='+ p1 );\n}\n\nif(!(p2 === \"x2\")){\n $ERROR('#2: p2 === \"x2\". Actual: p2 ==='+ p2 );\n}\n\ntry{\n p3;\n $ERROR('#3: p3 is nod defined');\n}\ncatch(e){\n}\n\ntry {\n p4;\n $ERROR('#4: p4 is not defined');\n} catch(e) { \n}\n\nif(!(p5 === \"x5\")){\n $ERROR('#5: p5 === \"x5\". Actual: p5 ==='+ p5 );\n}\n\nif(!(myObj.p1 === \"a\")){\n $ERROR('#6: myObj.p1 === \"a\". Actual: myObj.p1 ==='+ myObj.p1 );\n}\n\nif(!(myObj.p2 === \"b\")){\n $ERROR('#7: myObj.p2 === \"b\". Actual: myObj.p2 ==='+ myObj.p2 );\n}\n\nif(!(myObj.p3 === \"c\")){\n $ERROR('#8: myObj.p3 === \"c\". Actual: myObj.p3 ==='+ myObj.p3 );\n}\n\nif(!(myObj.p4 === undefined)){\n $ERROR('#9: myObj.p4 === undefined. Actual: myObj.p4 ==='+ myObj.p4 );\n}\n\nif(!(myObj.p5 === undefined)){\n $ERROR('#10: myObj.p5 === undefined. Actual: myObj.p5 ==='+ myObj.p5 );\n}\n\nif(!(st_parseInt === parseInt)){\n $ERROR('#11: st_parseInt === parseInt. Actual: st_parseInt ==='+ st_parseInt );\n}\n\nif(!isNaN(st_NaN)){\n $ERROR('#12: st_NaN === NaN. Actual: st_NaN ==='+ st_NaN );\n}\n\nif(!(st_Infinity === Infinity)){\n $ERROR('#13: st_Infinity === Infinity. Actual: st_Infinity ==='+ st_Infinity );\n}\n\nif(!(st_eval === eval)){\n $ERROR('#14: st_eval === eval. Actual: st_eval ==='+ st_eval );\n}\n\nif(!(st_parseFloat === parseFloat)){\n $ERROR('#15: st_parseFloat === parseFloat. Actual: st_parseFloat ==='+ st_parseFloat );\n}\n\nif(!(st_isNaN === isNaN)){\n $ERROR('#16: st_isNaN === isNaN. Actual: st_isNaN ==='+ st_isNaN );\n}\n\nif(!(st_isFinite === isFinite)){\n $ERROR('#17: st_isFinite === isFinite. Actual: st_isFinite ==='+ st_isFinite );\n}\n\ntry {\n value;\n $ERROR('#18: value is not defined');\n} catch(e) { \n}\n\nif(!(myObj.value === \"myObj_value\")){\n $ERROR('#19: myObj.value === \"myObj_value\". Actual: myObj.value ==='+ myObj.value );\n}\n",
+ "id": "S12.10_A1.11_T1",
+ "strict_only": ""
+ },
+ {
+ "section": "12.10",
+ "description": "Calling a function within \"with\" statement declared without the statement, leading to normal completion by \"return\"",
+ "strict_mode_negative": "",
+ "test": "this.p1 = 1;\nthis.p2 = 2;\nthis.p3 = 3;\nvar result = \"result\";\nvar myObj = {p1: 'a', \n p2: 'b', \n p3: 'c',\n value: 'myObj_value',\n valueOf : function(){return 'obj_valueOf';},\n parseInt : function(){return 'obj_parseInt';},\n NaN : 'obj_NaN',\n Infinity : 'obj_Infinity',\n eval : function(){return 'obj_eval';},\n parseFloat : function(){return 'obj_parseFloat';},\n isNaN : function(){return 'obj_isNaN';},\n isFinite : function(){return 'obj_isFinite';}\n}\nvar del;\nvar st_p1 = \"p1\";\nvar st_p2 = \"p2\";\nvar st_p3 = \"p3\";\nvar st_parseInt = \"parseInt\";\nvar st_NaN = \"NaN\";\nvar st_Infinity = \"Infinity\";\nvar st_eval = \"eval\";\nvar st_parseFloat = \"parseFloat\";\nvar st_isNaN = \"isNaN\";\nvar st_isFinite = \"isFinite\";\n\nvar f = function(){\n st_p1 = p1;\n st_p2 = p2;\n st_p3 = p3;\n st_parseInt = parseInt;\n st_NaN = NaN;\n st_Infinity = Infinity;\n st_eval = eval;\n st_parseFloat = parseFloat;\n st_isNaN = isNaN;\n st_isFinite = isFinite;\n p1 = 'x1';\n this.p2 = 'x2';\n del = delete p3;\n var p4 = 'x4';\n p5 = 'x5';\n var value = 'value';\n return value;\n}\n\nwith(myObj){\n result = f();\n}\n\nif(!(result === \"value\")){\n $ERROR('#0: result === \"value\". Actual: result ==='+ result );\n}\n\nif(!(p1 === \"x1\")){\n $ERROR('#1: p1 === \"x1\". Actual: p1 ==='+ p1 );\n}\n\nif(!(p2 === \"x2\")){\n $ERROR('#2: p2 === \"x2\". Actual: p2 ==='+ p2 );\n}\n\ntry{\n p3;\n $ERROR('#3: p3 is nod defined');\n}\ncatch(e){\n}\n\ntry {\n p4;\n $ERROR('#4: p4 is not defined');\n} catch(e) { \n}\n\nif(!(p5 === \"x5\")){\n $ERROR('#5: p5 === \"x5\". Actual: p5 ==='+ p5 );\n}\n\nif(!(myObj.p1 === \"a\")){\n $ERROR('#6: myObj.p1 === \"a\". Actual: myObj.p1 ==='+ myObj.p1 );\n}\n\nif(!(myObj.p2 === \"b\")){\n $ERROR('#7: myObj.p2 === \"b\". Actual: myObj.p2 ==='+ myObj.p2 );\n}\n\nif(!(myObj.p3 === \"c\")){\n $ERROR('#8: myObj.p3 === \"c\". Actual: myObj.p3 ==='+ myObj.p3 );\n}\n\nif(!(myObj.p4 === undefined)){\n $ERROR('#9: myObj.p4 === undefined. Actual: myObj.p4 ==='+ myObj.p4 );\n}\n\nif(!(myObj.p5 === undefined)){\n $ERROR('#10: myObj.p5 === undefined. Actual: myObj.p5 ==='+ myObj.p5 );\n}\n\nif(!(st_parseInt === parseInt)){\n $ERROR('#11: st_parseInt === parseInt. Actual: st_parseInt ==='+ st_parseInt );\n}\n\nif(!isNaN(st_NaN)){\n $ERROR('#12: st_NaN === NaN. Actual: st_NaN ==='+ st_NaN );\n}\n\nif(!(st_Infinity === Infinity)){\n $ERROR('#13: st_Infinity === Infinity. Actual: st_Infinity ==='+ st_Infinity );\n}\n\nif(!(st_eval === eval)){\n $ERROR('#14: st_eval === eval. Actual: st_eval ==='+ st_eval );\n}\n\nif(!(st_parseFloat === parseFloat)){\n $ERROR('#15: st_parseFloat === parseFloat. Actual: st_parseFloat ==='+ st_parseFloat );\n}\n\nif(!(st_isNaN === isNaN)){\n $ERROR('#16: st_isNaN === isNaN. Actual: st_isNaN ==='+ st_isNaN );\n}\n\nif(!(st_isFinite === isFinite)){\n $ERROR('#17: st_isFinite === isFinite. Actual: st_isFinite ==='+ st_isFinite );\n}\n\ntry {\n value;\n $ERROR('#18: value is not defined');\n} catch(e) { \n}\n\nif(!(myObj.value === \"myObj_value\")){\n $ERROR('#19: myObj.value === \"myObj_value\". Actual: myObj.value ==='+ myObj.value );\n}\n",
+ "id": "S12.10_A1.11_T2",
+ "strict_only": ""
+ },
+ {
+ "section": "12.10",
+ "description": "Calling a function within \"with\" statement declared without the statement, leading to normal completion by \"return\"",
+ "strict_mode_negative": "",
+ "test": "this.p1 = 1;\nthis.p2 = 2;\nthis.p3 = 3;\nvar result = \"result\";\nvar myObj = {p1: 'a', \n p2: 'b', \n p3: 'c',\n value: 'myObj_value',\n valueOf : function(){return 'obj_valueOf';},\n parseInt : function(){return 'obj_parseInt';},\n NaN : 'obj_NaN',\n Infinity : 'obj_Infinity',\n eval : function(){return 'obj_eval';},\n parseFloat : function(){return 'obj_parseFloat';},\n isNaN : function(){return 'obj_isNaN';},\n isFinite : function(){return 'obj_isFinite';}\n}\nvar del;\nvar st_p1 = \"p1\";\nvar st_p2 = \"p2\";\nvar st_p3 = \"p3\";\nvar st_parseInt = \"parseInt\";\nvar st_NaN = \"NaN\";\nvar st_Infinity = \"Infinity\";\nvar st_eval = \"eval\";\nvar st_parseFloat = \"parseFloat\";\nvar st_isNaN = \"isNaN\";\nvar st_isFinite = \"isFinite\";\n\nvar f = function(){\n return value;\n st_p1 = p1;\n st_p2 = p2;\n st_p3 = p3;\n st_parseInt = parseInt;\n st_NaN = NaN;\n st_Infinity = Infinity;\n st_eval = eval;\n st_parseFloat = parseFloat;\n st_isNaN = isNaN;\n st_isFinite = isFinite;\n p1 = 'x1';\n this.p2 = 'x2';\n del = delete p3;\n var p4 = 'x4';\n p5 = 'x5';\n var value = 'value';\n}\n\nwith(myObj){\n result = f();\n}\n\nif(!(result === undefined)){\n $ERROR('#0: result === undefined. Actual: result ==='+ result );\n}\n\nif(!(p1 === 1)){\n $ERROR('#1: p1 === 1. Actual: p1 ==='+ p1 );\n}\n\nif(!(p2 === 2)){\n $ERROR('#2: p2 === 2. Actual: p2 ==='+ p2 );\n}\n\nif(!(p3 === 3)){\n $ERROR('#3: p3 === 3. Actual: p3 ==='+ p3 );\n}\n\ntry{\n p4;\n $ERROR('#4: p4 doesn\\'t exists');\n}\ncatch(e){\n}\n\ntry {\n p5;\n $ERROR('#5: p5 is not defined');\n} catch(e) { \n}\n\nif(!(myObj.p1 === \"a\")){\n $ERROR('#6: myObj.p1 === \"a\". Actual: myObj.p1 ==='+ myObj.p1 );\n}\n\nif(!(myObj.p2 === \"b\")){\n $ERROR('#7: myObj.p2 === \"b\". Actual: myObj.p2 ==='+ myObj.p2 );\n}\n\nif(!(myObj.p3 === \"c\")){\n $ERROR('#8: myObj.p3 === \"c\". Actual: myObj.p3 ==='+ myObj.p3 );\n}\n\nif(!(myObj.p4 === undefined)){\n $ERROR('#9: myObj.p4 === undefined. Actual: myObj.p4 ==='+ myObj.p4 );\n}\n\nif(!(myObj.p5 === undefined)){\n $ERROR('#10: myObj.p5 === undefined. Actual: myObj.p5 ==='+ myObj.p5 );\n}\n\nif(!(st_parseInt === \"parseInt\")){\n $ERROR('#11: myObj.parseInt === \"parseInt\". Actual: myObj.parseInt ==='+ myObj.parseInt );\n}\n\nif(!(st_NaN === \"NaN\")){\n $ERROR('#12: st_NaN === \"NaN\". Actual: st_NaN ==='+ st_NaN );\n}\n\nif(!(st_Infinity === \"Infinity\")){\n $ERROR('#13: st_Infinity === \"Infinity\". Actual: st_Infinity ==='+ st_Infinity );\n}\n\nif(!(st_eval === \"eval\")){\n $ERROR('#14: st_eval === \"eval\". Actual: st_eval ==='+ st_eval );\n}\n\nif(!(st_parseFloat === \"parseFloat\")){\n $ERROR('#15: st_parseFloat === \"parseFloat\". Actual: st_parseFloat ==='+ st_parseFloat );\n}\n\nif(!(st_isNaN === \"isNaN\")){\n $ERROR('#16: st_isNaN === \"isNaN\". Actual: st_isNaN ==='+ st_isNaN );\n}\n\nif(!(st_isFinite === \"isFinite\")){\n $ERROR('#17: st_isFinite === \"isFinite\". Actual: st_isFinite ==='+ st_isFinite );\n}\n\ntry {\n value;\n $ERROR('#18: value is not defined');\n} catch(e) { \n}\n\nif(!(myObj.value === \"myObj_value\")){\n $ERROR('#19: myObj.value === \"myObj_value\". Actual: myObj.value ==='+ myObj.value );\n}\n",
+ "id": "S12.10_A1.11_T3",
+ "strict_only": ""
+ },
+ {
+ "section": "12.10",
+ "description": "Calling a function within \"with\" statement declared without the statement, leading to completion by exception",
+ "strict_mode_negative": "",
+ "test": "this.p1 = 1;\nthis.p2 = 2;\nthis.p3 = 3;\nvar result = \"result\";\nvar myObj = {p1: 'a', \n p2: 'b', \n p3: 'c',\n value: 'myObj_value',\n valueOf : function(){return 'obj_valueOf';},\n parseInt : function(){return 'obj_parseInt';},\n NaN : 'obj_NaN',\n Infinity : 'obj_Infinity',\n eval : function(){return 'obj_eval';},\n parseFloat : function(){return 'obj_parseFloat';},\n isNaN : function(){return 'obj_isNaN';},\n isFinite : function(){return 'obj_isFinite';}\n}\nvar del;\nvar st_p1 = \"p1\";\nvar st_p2 = \"p2\";\nvar st_p3 = \"p3\";\nvar st_parseInt = \"parseInt\";\nvar st_NaN = \"NaN\";\nvar st_Infinity = \"Infinity\";\nvar st_eval = \"eval\";\nvar st_parseFloat = \"parseFloat\";\nvar st_isNaN = \"isNaN\";\nvar st_isFinite = \"isFinite\";\n\ntry {\n var f = function(){\n st_p1 = p1;\n st_p2 = p2;\n st_p3 = p3;\n st_parseInt = parseInt;\n st_NaN = NaN;\n st_Infinity = Infinity;\n st_eval = eval;\n st_parseFloat = parseFloat;\n st_isNaN = isNaN;\n st_isFinite = isFinite;\n p1 = 'x1';\n this.p2 = 'x2';\n del = delete p3;\n var p4 = 'x4';\n p5 = 'x5';\n var value = 'value';\n throw value;\n }\n with(myObj){\n f();\n }\n} catch(e){\n result = e;\n}\n\nif(!(result === \"value\")){\n $ERROR('#0: result === \"value\". Actual: result ==='+ result );\n}\n\nif(!(p1 === \"x1\")){\n $ERROR('#1: p1 === \"x1\". Actual: p1 ==='+ p1 );\n}\n\nif(!(p2 === \"x2\")){\n $ERROR('#2: p2 === \"x2\". Actual: p2 ==='+ p2 );\n}\n\ntry{\n p3;\n $ERROR('#3: p3 is nod defined');\n}\ncatch(e){\n}\n\ntry {\n p4;\n $ERROR('#4: p4 is not defined');\n} catch(e) { \n}\n\nif(!(p5 === \"x5\")){\n $ERROR('#5: p5 === \"x5\". Actual: p5 ==='+ p5 );\n}\n\nif(!(myObj.p1 === \"a\")){\n $ERROR('#6: myObj.p1 === \"a\". Actual: myObj.p1 ==='+ myObj.p1 );\n}\n\nif(!(myObj.p2 === \"b\")){\n $ERROR('#7: myObj.p2 === \"b\". Actual: myObj.p2 ==='+ myObj.p2 );\n}\n\nif(!(myObj.p3 === \"c\")){\n $ERROR('#8: myObj.p3 === \"c\". Actual: myObj.p3 ==='+ myObj.p3 );\n}\n\nif(!(myObj.p4 === undefined)){\n $ERROR('#9: myObj.p4 === undefined. Actual: myObj.p4 ==='+ myObj.p4 );\n}\n\nif(!(myObj.p5 === undefined)){\n $ERROR('#10: myObj.p5 === undefined. Actual: myObj.p5 ==='+ myObj.p5 );\n}\n\nif(!(st_parseInt === parseInt)){\n $ERROR('#11: st_parseInt === parseInt. Actual: st_parseInt ==='+ st_parseInt );\n}\n\nif(!isNaN(st_NaN)){\n $ERROR('#12: st_NaN === NaN. Actual: st_NaN ==='+ st_NaN );\n}\n\nif(!(st_Infinity === Infinity)){\n $ERROR('#13: st_Infinity === Infinity. Actual: st_Infinity ==='+ st_Infinity );\n}\n\nif(!(st_eval === eval)){\n $ERROR('#14: st_eval === eval. Actual: st_eval ==='+ st_eval );\n}\n\nif(!(st_parseFloat === parseFloat)){\n $ERROR('#15: st_parseFloat === parseFloat. Actual: st_parseFloat ==='+ st_parseFloat );\n}\n\nif(!(st_isNaN === isNaN)){\n $ERROR('#16: st_isNaN === isNaN. Actual: st_isNaN ==='+ st_isNaN );\n}\n\nif(!(st_isFinite === isFinite)){\n $ERROR('#17: st_isFinite === isFinite. Actual: st_isFinite ==='+ st_isFinite );\n}\n\ntry {\n value;\n $ERROR('#18: value is not defined');\n} catch(e) { \n}\n\nif(!(myObj.value === \"myObj_value\")){\n $ERROR('#19: myObj.value === \"myObj_value\". Actual: myObj.value ==='+ myObj.value );\n}\n",
+ "id": "S12.10_A1.11_T4",
+ "strict_only": ""
+ },
+ {
+ "section": "12.10",
+ "description": "Calling a function within \"with\" statement declared without the statement, leading to completion by exception",
+ "strict_mode_negative": "",
+ "test": "this.p1 = 1;\nthis.p2 = 2;\nthis.p3 = 3;\nvar result = \"result\";\nvar myObj = {p1: 'a', \n p2: 'b', \n p3: 'c',\n value: 'myObj_value',\n valueOf : function(){return 'obj_valueOf';},\n parseInt : function(){return 'obj_parseInt';},\n NaN : 'obj_NaN',\n Infinity : 'obj_Infinity',\n eval : function(){return 'obj_eval';},\n parseFloat : function(){return 'obj_parseFloat';},\n isNaN : function(){return 'obj_isNaN';},\n isFinite : function(){return 'obj_isFinite';}\n}\nvar del;\nvar st_p1 = \"p1\";\nvar st_p2 = \"p2\";\nvar st_p3 = \"p3\";\nvar st_parseInt = \"parseInt\";\nvar st_NaN = \"NaN\";\nvar st_Infinity = \"Infinity\";\nvar st_eval = \"eval\";\nvar st_parseFloat = \"parseFloat\";\nvar st_isNaN = \"isNaN\";\nvar st_isFinite = \"isFinite\";\n\ntry {\n var f = function(){\n throw value;\n st_p1 = p1;\n st_p2 = p2;\n st_p3 = p3;\n st_parseInt = parseInt;\n st_NaN = NaN;\n st_Infinity = Infinity;\n st_eval = eval;\n st_parseFloat = parseFloat;\n st_isNaN = isNaN;\n st_isFinite = isFinite;\n p1 = 'x1';\n this.p2 = 'x2';\n del = delete p3;\n var p4 = 'x4';\n p5 = 'x5';\n var value = 'value';\n }\n with(myObj){\n f();\n }\n} catch(e){\n result = e;\n}\n\nif(!(result === undefined)){\n $ERROR('#0: result === undefined. Actual: result ==='+ result );\n}\n\nif(!(p1 === 1)){\n $ERROR('#1: p1 === 1. Actual: p1 ==='+ p1 );\n}\n\nif(!(p2 === 2)){\n $ERROR('#2: p2 === 2. Actual: p2 ==='+ p2 );\n}\n\nif(!(p3 === 3)){\n $ERROR('#3: p3 === 3. Actual: p3 ==='+ p3 );\n}\n\ntry{\n p4;\n $ERROR('#4: p4 doesn\\'t exists');\n}\ncatch(e){\n}\n\ntry {\n p5;\n $ERROR('#5: p5 is not defined');\n} catch(e) { \n}\n\nif(!(myObj.p1 === \"a\")){\n $ERROR('#6: myObj.p1 === \"a\". Actual: myObj.p1 ==='+ myObj.p1 );\n}\n\nif(!(myObj.p2 === \"b\")){\n $ERROR('#7: myObj.p2 === \"b\". Actual: myObj.p2 ==='+ myObj.p2 );\n}\n\nif(!(myObj.p3 === \"c\")){\n $ERROR('#8: myObj.p3 === \"c\". Actual: myObj.p3 ==='+ myObj.p3 );\n}\n\nif(!(myObj.p4 === undefined)){\n $ERROR('#9: myObj.p4 === undefined. Actual: myObj.p4 ==='+ myObj.p4 );\n}\n\nif(!(myObj.p5 === undefined)){\n $ERROR('#10: myObj.p5 === undefined. Actual: myObj.p5 ==='+ myObj.p5 );\n}\n\nif(!(st_parseInt === \"parseInt\")){\n $ERROR('#11: myObj.parseInt === \"parseInt\". Actual: myObj.parseInt ==='+ myObj.parseInt );\n}\n\nif(!(st_NaN === \"NaN\")){\n $ERROR('#12: st_NaN === \"NaN\". Actual: st_NaN ==='+ st_NaN );\n}\n\nif(!(st_Infinity === \"Infinity\")){\n $ERROR('#13: st_Infinity === \"Infinity\". Actual: st_Infinity ==='+ st_Infinity );\n}\n\nif(!(st_eval === \"eval\")){\n $ERROR('#14: st_eval === \"eval\". Actual: st_eval ==='+ st_eval );\n}\n\nif(!(st_parseFloat === \"parseFloat\")){\n $ERROR('#15: st_parseFloat === \"parseFloat\". Actual: st_parseFloat ==='+ st_parseFloat );\n}\n\nif(!(st_isNaN === \"isNaN\")){\n $ERROR('#16: st_isNaN === \"isNaN\". Actual: st_isNaN ==='+ st_isNaN );\n}\n\nif(!(st_isFinite === \"isFinite\")){\n $ERROR('#17: st_isFinite === \"isFinite\". Actual: st_isFinite ==='+ st_isFinite );\n}\n\ntry {\n value;\n $ERROR('#18: value is not defined');\n} catch(e) { \n}\n\nif(!(myObj.value === \"myObj_value\")){\n $ERROR('#19: myObj.value === \"myObj_value\". Actual: myObj.value ==='+ myObj.value );\n}\n",
+ "id": "S12.10_A1.11_T5",
+ "strict_only": ""
+ },
+ {
+ "section": "12.10",
+ "description": "Calling a function without \"with\" statement declared within the statement, leading to normal completion",
+ "strict_mode_negative": "",
+ "test": "this.p1 = 1;\nthis.p2 = 2;\nthis.p3 = 3;\nvar result = \"result\";\nvar myObj = {p1: 'a', \n p2: 'b', \n p3: 'c',\n value: 'myObj_value',\n valueOf : function(){return 'obj_valueOf';},\n parseInt : function(){return 'obj_parseInt';},\n NaN : 'obj_NaN',\n Infinity : 'obj_Infinity',\n eval : function(){return 'obj_eval';},\n parseFloat : function(){return 'obj_parseFloat';},\n isNaN : function(){return 'obj_isNaN';},\n isFinite : function(){return 'obj_isFinite';}\n}\nvar del;\nvar st_p1 = \"p1\";\nvar st_p2 = \"p2\";\nvar st_p3 = \"p3\";\nvar st_parseInt = \"parseInt\";\nvar st_NaN = \"NaN\";\nvar st_Infinity = \"Infinity\";\nvar st_eval = \"eval\";\nvar st_parseFloat = \"parseFloat\";\nvar st_isNaN = \"isNaN\";\nvar st_isFinite = \"isFinite\";\n\nwith(myObj){\n var f = function(){\n st_p1 = p1;\n st_p2 = p2;\n st_p3 = p3;\n st_parseInt = parseInt;\n st_NaN = NaN;\n st_Infinity = Infinity;\n st_eval = eval;\n st_parseFloat = parseFloat;\n st_isNaN = isNaN;\n st_isFinite = isFinite;\n p1 = 'x1';\n this.p2 = 'x2';\n del = delete p3;\n var p4 = 'x4';\n p5 = 'x5';\n var value = 'value';\n }\n}\nf();\n\nif(!(p1 === 1)){\n $ERROR('#1: p1 === 1. Actual: p1 ==='+ p1 );\n}\n\nif(!(p2 === \"x2\")){\n $ERROR('#2: p2 === \"x2\". Actual: p2 ==='+ p2 );\n}\n\nif(!(p3 === 3)){\n $ERROR('#3: p3 === 3. Actual: p3 ==='+ p3 );\n}\n\ntry{\n p4;\n $ERROR('#4: p4 doesn\\'t exists');\n}\ncatch(e){\n}\n\nif(!(p5 === \"x5\")){\n $ERROR('#5: p5 === \"x5\". Actual: p5 ==='+ p5 );\n}\n\nif(!(myObj.p1 === \"x1\")){\n $ERROR('#6: myObj.p1 === \"x1\". Actual: myObj.p1 ==='+ myObj.p1 );\n}\n\nif(!(myObj.p2 === \"b\")){\n $ERROR('#7: myObj.p2 === \"b\". Actual: myObj.p2 ==='+ myObj.p2 );\n}\n\nif(!(myObj.p3 === undefined)){\n $ERROR('#8: myObj.p3 === undefined. Actual: myObj.p3 ==='+ myObj.p3 );\n}\n\nif(!(myObj.p4 === undefined)){\n $ERROR('#9: myObj.p4 === undefined. Actual: myObj.p4 ==='+ myObj.p4 );\n}\n\nif(!(myObj.p5 === undefined)){\n $ERROR('#10: myObj.p5 === undefined. Actual: myObj.p5 ==='+ myObj.p5 );\n}\n\nif(!(st_parseInt !== parseInt)){\n $ERROR('#11: myObj.parseInt !== parseInt');\n}\n\nif(!(st_NaN === \"obj_NaN\")){\n $ERROR('#12: myObj.NaN !== NaN');\n}\n\nif(!(st_Infinity !== Infinity)){\n $ERROR('#13: myObj.Infinity !== Infinity');\n}\n\nif(!(st_eval !== eval)){\n $ERROR('#14: myObj.eval !== eval');\n}\n\nif(!(st_parseFloat !== parseFloat)){\n $ERROR('#15: myObj.parseFloat !== parseFloat');\n}\n\nif(!(st_isNaN !== isNaN)){\n $ERROR('#16: myObj.isNaN !== isNaN');\n}\n\nif(!(st_isFinite !== isFinite)){\n $ERROR('#17: myObj.isFinite !== isFinite');\n}\n\ntry {\n value;\n $ERROR('#18: value is not defined');\n} catch(e) { \n}\n\nif(!(myObj.value === \"myObj_value\")){\n $ERROR('#19: myObj.value === \"myObj_value\". Actual: myObj.value ==='+ myObj.value );\n}\n",
+ "id": "S12.10_A1.12_T1",
+ "strict_only": ""
+ },
+ {
+ "section": "12.10",
+ "description": "Calling a function without \"with\" statement declared within the statement, leading to normal completion by \"return\"",
+ "strict_mode_negative": "",
+ "test": "this.p1 = 1;\nthis.p2 = 2;\nthis.p3 = 3;\nvar result = \"result\";\nvar myObj = {p1: 'a', \n p2: 'b', \n p3: 'c',\n value: 'myObj_value',\n valueOf : function(){return 'obj_valueOf';},\n parseInt : function(){return 'obj_parseInt';},\n NaN : 'obj_NaN',\n Infinity : 'obj_Infinity',\n eval : function(){return 'obj_eval';},\n parseFloat : function(){return 'obj_parseFloat';},\n isNaN : function(){return 'obj_isNaN';},\n isFinite : function(){return 'obj_isFinite';}\n}\nvar del;\nvar st_p1 = \"p1\";\nvar st_p2 = \"p2\";\nvar st_p3 = \"p3\";\nvar st_parseInt = \"parseInt\";\nvar st_NaN = \"NaN\";\nvar st_Infinity = \"Infinity\";\nvar st_eval = \"eval\";\nvar st_parseFloat = \"parseFloat\";\nvar st_isNaN = \"isNaN\";\nvar st_isFinite = \"isFinite\";\n\nwith(myObj){\n var f = function(){\n st_p1 = p1;\n st_p2 = p2;\n st_p3 = p3;\n st_parseInt = parseInt;\n st_NaN = NaN;\n st_Infinity = Infinity;\n st_eval = eval;\n st_parseFloat = parseFloat;\n st_isNaN = isNaN;\n st_isFinite = isFinite;\n p1 = 'x1';\n this.p2 = 'x2';\n del = delete p3;\n var p4 = 'x4';\n p5 = 'x5';\n var value = 'value';\n return value;\n }\n}\nresult = f();\n\nif(!(result === \"value\")){\n $ERROR('#0: result === \"value\". Actual: result ==='+ result );\n}\n\nif(!(p1 === 1)){\n $ERROR('#1: p1 === 1. Actual: p1 ==='+ p1 );\n}\n\nif(!(p2 === \"x2\")){\n $ERROR('#2: p2 === \"x2\". Actual: p2 ==='+ p2 );\n}\n\nif(!(p3 === 3)){\n $ERROR('#3: p3 === 3. Actual: p3 ==='+ p3 );\n}\n\ntry{\n p4;\n $ERROR('#4: p4 doesn\\'t exists');\n}\ncatch(e){\n}\n\nif(!(p5 === \"x5\")){\n $ERROR('#5: p5 === \"x5\". Actual: p5 ==='+ p5 );\n}\n\nif(!(myObj.p1 === \"x1\")){\n $ERROR('#6: myObj.p1 === \"x1\". Actual: myObj.p1 ==='+ myObj.p1 );\n}\n\nif(!(myObj.p2 === \"b\")){\n $ERROR('#7: myObj.p2 === \"b\". Actual: myObj.p2 ==='+ myObj.p2 );\n}\n\nif(!(myObj.p3 === undefined)){\n $ERROR('#8: myObj.p3 === undefined. Actual: myObj.p3 ==='+ myObj.p3 );\n}\n\nif(!(myObj.p4 === undefined)){\n $ERROR('#9: myObj.p4 === undefined. Actual: myObj.p4 ==='+ myObj.p4 );\n}\n\nif(!(myObj.p5 === undefined)){\n $ERROR('#10: myObj.p5 === undefined. Actual: myObj.p5 ==='+ myObj.p5 );\n}\n\nif(!(st_parseInt !== parseInt)){\n $ERROR('#11: myObj.parseInt !== parseInt');\n}\n\nif(!(st_NaN === \"obj_NaN\")){\n $ERROR('#12: myObj.NaN !== NaN');\n}\n\nif(!(st_Infinity !== Infinity)){\n $ERROR('#13: myObj.Infinity !== Infinity');\n}\n\nif(!(st_eval !== eval)){\n $ERROR('#14: myObj.eval !== eval');\n}\n\nif(!(st_parseFloat !== parseFloat)){\n $ERROR('#15: myObj.parseFloat !== parseFloat');\n}\n\nif(!(st_isNaN !== isNaN)){\n $ERROR('#16: myObj.isNaN !== isNaN');\n}\n\nif(!(st_isFinite !== isFinite)){\n $ERROR('#17: myObj.isFinite !== isFinite');\n}\n\ntry{\n value;\n $ERROR('#18: value is not defined');\n}\ncatch(e){\n}\n\nif(!(myObj.value === \"myObj_value\")){\n $ERROR('#19: myObj.value === \"myObj_value\". Actual: myObj.value ==='+ myObj.value );\n}\n",
+ "id": "S12.10_A1.12_T2",
+ "strict_only": ""
+ },
+ {
+ "section": "12.10",
+ "description": "Calling a function without \"with\" statement declared within the statement, leading to normal completion by \"return\"",
+ "strict_mode_negative": "",
+ "test": "this.p1 = 1;\nthis.p2 = 2;\nthis.p3 = 3;\nvar result = \"result\";\nvar myObj = {p1: 'a', \n p2: 'b', \n p3: 'c',\n value: 'myObj_value',\n valueOf : function(){return 'obj_valueOf';},\n parseInt : function(){return 'obj_parseInt';},\n NaN : 'obj_NaN',\n Infinity : 'obj_Infinity',\n eval : function(){return 'obj_eval';},\n parseFloat : function(){return 'obj_parseFloat';},\n isNaN : function(){return 'obj_isNaN';},\n isFinite : function(){return 'obj_isFinite';}\n}\nvar del;\nvar st_p1 = \"p1\";\nvar st_p2 = \"p2\";\nvar st_p3 = \"p3\";\nvar st_parseInt = \"parseInt\";\nvar st_NaN = \"NaN\";\nvar st_Infinity = \"Infinity\";\nvar st_eval = \"eval\";\nvar st_parseFloat = \"parseFloat\";\nvar st_isNaN = \"isNaN\";\nvar st_isFinite = \"isFinite\";\n\nwith(myObj){\n var f = function(){\n return value;\n st_p1 = p1;\n st_p2 = p2;\n st_p3 = p3;\n st_parseInt = parseInt;\n st_NaN = NaN;\n st_Infinity = Infinity;\n st_eval = eval;\n st_parseFloat = parseFloat;\n st_isNaN = isNaN;\n st_isFinite = isFinite;\n p1 = 'x1';\n this.p2 = 'x2';\n del = delete p3;\n var p4 = 'x4';\n p5 = 'x5';\n var value = 'value';\n }\n}\nresult = f();\n\nif(!(result === undefined)){\n $ERROR('#0: result === undefined. Actual: result ==='+ result );\n}\n\nif(!(p1 === 1)){\n $ERROR('#1: p1 === 1. Actual: p1 ==='+ p1 );\n}\n\nif(!(p2 === 2)){\n $ERROR('#2: p2 === 2. Actual: p2 ==='+ p2 );\n}\n\nif(!(p3 === 3)){\n $ERROR('#3: p3 === 3. Actual: p3 ==='+ p3 );\n}\n\ntry {\n p4;\n $ERROR('#4: p4 is not defined');\n} catch(e) { \n}\n\ntry {\n p5;\n $ERROR('#5: p5 is not defined');\n} catch(e) { \n}\n\nif(!(myObj.p1 === \"a\")){\n $ERROR('#6: myObj.p1 === \"a\". Actual: myObj.p1 ==='+ myObj.p1 );\n}\n\nif(!(myObj.p2 === \"b\")){\n $ERROR('#7: myObj.p2 === \"b\". Actual: myObj.p2 ==='+ myObj.p2 );\n}\n\nif(!(myObj.p3 === \"c\")){\n $ERROR('#8: myObj.p3 === \"c\". Actual: myObj.p3 ==='+ myObj.p3 );\n}\n\nif(!(myObj.p4 === undefined)){\n $ERROR('#9: myObj.p4 === undefined. Actual: myObj.p4 ==='+ myObj.p4 );\n}\n\nif(!(myObj.p5 === undefined)){\n $ERROR('#10: myObj.p5 === undefined. Actual: myObj.p5 ==='+ myObj.p5 );\n}\n\nif(!(st_parseInt === \"parseInt\")){\n $ERROR('#11: myObj.parseInt === \"parseInt\". Actual: myObj.parseInt ==='+ myObj.parseInt );\n}\n\nif(!(st_NaN === \"NaN\")){\n $ERROR('#12: st_NaN === \"NaN\". Actual: st_NaN ==='+ st_NaN );\n}\n\nif(!(st_Infinity === \"Infinity\")){\n $ERROR('#13: st_Infinity === \"Infinity\". Actual: st_Infinity ==='+ st_Infinity );\n}\n\nif(!(st_eval === \"eval\")){\n $ERROR('#14: st_eval === \"eval\". Actual: st_eval ==='+ st_eval );\n}\n\nif(!(st_parseFloat === \"parseFloat\")){\n $ERROR('#15: st_parseFloat === \"parseFloat\". Actual: st_parseFloat ==='+ st_parseFloat );\n}\n\nif(!(st_isNaN === \"isNaN\")){\n $ERROR('#16: st_isNaN === \"isNaN\". Actual: st_isNaN ==='+ st_isNaN );\n}\n\nif(!(st_isFinite === \"isFinite\")){\n $ERROR('#17: st_isFinite === \"isFinite\". Actual: st_isFinite ==='+ st_isFinite );\n}\n\ntry{\n value;\n $ERROR('#18: value is not defined');\n}\ncatch(e){\n}\n\nif(!(myObj.value === \"myObj_value\")){\n $ERROR('#19: myObj.value === \"myObj_value\". Actual: myObj.value ==='+ myObj.value );\n}\n\n",
+ "id": "S12.10_A1.12_T3",
+ "strict_only": ""
+ },
+ {
+ "section": "12.10",
+ "description": "Calling a function without \"with\" statement declared within the statement, leading to completion by exception",
+ "strict_mode_negative": "",
+ "test": "this.p1 = 1;\nthis.p2 = 2;\nthis.p3 = 3;\nvar result = \"result\";\nvar myObj = {p1: 'a', \n p2: 'b', \n p3: 'c',\n value: 'myObj_value',\n valueOf : function(){return 'obj_valueOf';},\n parseInt : function(){return 'obj_parseInt';},\n NaN : 'obj_NaN',\n Infinity : 'obj_Infinity',\n eval : function(){return 'obj_eval';},\n parseFloat : function(){return 'obj_parseFloat';},\n isNaN : function(){return 'obj_isNaN';},\n isFinite : function(){return 'obj_isFinite';}\n}\nvar del;\nvar st_p1 = \"p1\";\nvar st_p2 = \"p2\";\nvar st_p3 = \"p3\";\nvar st_parseInt = \"parseInt\";\nvar st_NaN = \"NaN\";\nvar st_Infinity = \"Infinity\";\nvar st_eval = \"eval\";\nvar st_parseFloat = \"parseFloat\";\nvar st_isNaN = \"isNaN\";\nvar st_isFinite = \"isFinite\";\n\ntry {\n with(myObj){\n var f = function(){\n st_p1 = p1;\n st_p2 = p2;\n st_p3 = p3;\n st_parseInt = parseInt;\n st_NaN = NaN;\n st_Infinity = Infinity;\n st_eval = eval;\n st_parseFloat = parseFloat;\n st_isNaN = isNaN;\n st_isFinite = isFinite;\n p1 = 'x1';\n this.p2 = 'x2';\n del = delete p3;\n var p4 = 'x4';\n p5 = 'x5';\n var value = 'value';\n throw value;\n }\n }\n f();\n} catch(e){\n result = e;\n}\n\nif(!(result === \"value\")){\n $ERROR('#0: result === \"value\". Actual: result ==='+ result );\n}\n\nif(!(p1 === 1)){\n $ERROR('#1: p1 === 1. Actual: p1 ==='+ p1 );\n}\n\nif(!(p2 === \"x2\")){\n $ERROR('#2: p2 === \"x2\". Actual: p2 ==='+ p2 );\n}\n\nif(!(p3 === 3)){\n $ERROR('#3: p3 === 3. Actual: p3 ==='+ p3 );\n}\n\ntry {\n p4;\n $ERROR('#4: p4 is not defined');\n} catch(e) { \n}\n\nif(!(p5 === \"x5\")){\n $ERROR('#5: p5 === \"x5\". Actual: p5 ==='+ p5 );\n}\n\nif(!(myObj.p1 === \"x1\")){\n $ERROR('#6: myObj.p1 === \"x1\". Actual: myObj.p1 ==='+ myObj.p1 );\n}\n\nif(!(myObj.p2 === \"b\")){\n $ERROR('#7: myObj.p2 === \"b\". Actual: myObj.p2 ==='+ myObj.p2 );\n}\n\nif(!(myObj.p3 === undefined)){\n $ERROR('#8: myObj.p3 === undefined. Actual: myObj.p3 ==='+ myObj.p3 );\n}\n\nif(!(myObj.p4 === undefined)){\n $ERROR('#9: myObj.p4 === undefined. Actual: myObj.p4 ==='+ myObj.p4 );\n}\n\nif(!(myObj.p5 === undefined)){\n $ERROR('#10: myObj.p5 === undefined. Actual: myObj.p5 ==='+ myObj.p5 );\n}\n\nif(!(st_parseInt !== parseInt)){\n $ERROR('#11: myObj.parseInt !== parseInt');\n}\n\nif(!(st_NaN === \"obj_NaN\")){\n $ERROR('#12: myObj.NaN !== NaN');\n}\n\nif(!(st_Infinity !== Infinity)){\n $ERROR('#13: myObj.Infinity !== Infinity');\n}\n\nif(!(st_eval !== eval)){\n $ERROR('#14: myObj.eval !== eval');\n}\n\nif(!(st_parseFloat !== parseFloat)){\n $ERROR('#15: myObj.parseFloat !== parseFloat');\n}\n\nif(!(st_isNaN !== isNaN)){\n $ERROR('#16: myObj.isNaN !== isNaN');\n}\n\nif(!(st_isFinite !== isFinite)){\n $ERROR('#17: myObj.isFinite !== isFinite');\n}\n\ntry {\n value;\n $ERROR('#18: value is not defined');\n} catch(e) { \n}\n\nif(!(myObj.value === \"myObj_value\")){\n $ERROR('#19: myObj.value === \"myObj_value\". Actual: myObj.value ==='+ myObj.value );\n}\n",
+ "id": "S12.10_A1.12_T4",
+ "strict_only": ""
+ },
+ {
+ "section": "12.10",
+ "description": "Calling a function without \"with\" statement declared within the statement, leading to completion by exception",
+ "strict_mode_negative": "",
+ "test": "this.p1 = 1;\nthis.p2 = 2;\nthis.p3 = 3;\nvar result = \"result\";\nvar myObj = {p1: 'a', \n p2: 'b', \n p3: 'c',\n value: 'myObj_value',\n valueOf : function(){return 'obj_valueOf';},\n parseInt : function(){return 'obj_parseInt';},\n NaN : 'obj_NaN',\n Infinity : 'obj_Infinity',\n eval : function(){return 'obj_eval';},\n parseFloat : function(){return 'obj_parseFloat';},\n isNaN : function(){return 'obj_isNaN';},\n isFinite : function(){return 'obj_isFinite';}\n}\nvar del;\nvar st_p1 = \"p1\";\nvar st_p2 = \"p2\";\nvar st_p3 = \"p3\";\nvar st_parseInt = \"parseInt\";\nvar st_NaN = \"NaN\";\nvar st_Infinity = \"Infinity\";\nvar st_eval = \"eval\";\nvar st_parseFloat = \"parseFloat\";\nvar st_isNaN = \"isNaN\";\nvar st_isFinite = \"isFinite\";\n\ntry {\n with(myObj){\n var f = function(){\n throw value;\n st_p1 = p1;\n st_p2 = p2;\n st_p3 = p3;\n st_parseInt = parseInt;\n st_NaN = NaN;\n st_Infinity = Infinity;\n st_eval = eval;\n st_parseFloat = parseFloat;\n st_isNaN = isNaN;\n st_isFinite = isFinite;\n p1 = 'x1';\n this.p2 = 'x2';\n del = delete p3;\n var p4 = 'x4';\n p5 = 'x5';\n var value = 'value';\n }\n }\n f();\n} catch(e){\n result = e;\n}\n\nif(!(result === undefined)){\n $ERROR('#0: result === undefined. Actual: result ==='+ result );\n}\n\nif(!(p1 === 1)){\n $ERROR('#1: p1 === 1. Actual: p1 ==='+ p1 );\n}\n\nif(!(p2 === 2)){\n $ERROR('#2: p2 === 2. Actual: p2 ==='+ p2 );\n}\n\nif(!(p3 === 3)){\n $ERROR('#3: p3 === 3. Actual: p3 ==='+ p3 );\n}\n\ntry {\n p4;\n $ERROR('#4: p4 is not defined');\n} catch(e) { \n}\n\ntry {\n p5;\n $ERROR('#5: p5 is not defined');\n} catch(e) { \n}\n\nif(!(myObj.p1 === \"a\")){\n $ERROR('#6: myObj.p1 === \"a\". Actual: myObj.p1 ==='+ myObj.p1 );\n}\n\nif(!(myObj.p2 === \"b\")){\n $ERROR('#7: myObj.p2 === \"b\". Actual: myObj.p2 ==='+ myObj.p2 );\n}\n\nif(!(myObj.p3 === \"c\")){\n $ERROR('#8: myObj.p3 === \"c\". Actual: myObj.p3 ==='+ myObj.p3 );\n}\n\nif(!(myObj.p4 === undefined)){\n $ERROR('#9: myObj.p4 === undefined. Actual: myObj.p4 ==='+ myObj.p4 );\n}\n\nif(!(myObj.p5 === undefined)){\n $ERROR('#10: myObj.p5 === undefined. Actual: myObj.p5 ==='+ myObj.p5 );\n}\n\nif(!(st_parseInt === \"parseInt\")){\n $ERROR('#11: myObj.parseInt === \"parseInt\". Actual: myObj.parseInt ==='+ myObj.parseInt );\n}\n\nif(!(st_NaN === \"NaN\")){\n $ERROR('#12: st_NaN === \"NaN\". Actual: st_NaN ==='+ st_NaN );\n}\n\nif(!(st_Infinity === \"Infinity\")){\n $ERROR('#13: st_Infinity === \"Infinity\". Actual: st_Infinity ==='+ st_Infinity );\n}\n\nif(!(st_eval === \"eval\")){\n $ERROR('#14: st_eval === \"eval\". Actual: st_eval ==='+ st_eval );\n}\n\nif(!(st_parseFloat === \"parseFloat\")){\n $ERROR('#15: st_parseFloat === \"parseFloat\". Actual: st_parseFloat ==='+ st_parseFloat );\n}\n\nif(!(st_isNaN === \"isNaN\")){\n $ERROR('#16: st_isNaN === \"isNaN\". Actual: st_isNaN ==='+ st_isNaN );\n}\n\nif(!(st_isFinite === \"isFinite\")){\n $ERROR('#17: st_isFinite === \"isFinite\". Actual: st_isFinite ==='+ st_isFinite );\n}\n\ntry{\n value;\n $ERROR('#18: value is not defined');\n}\ncatch(e){\n}\n\nif(!(myObj.value === \"myObj_value\")){\n $ERROR('#19: myObj.value === \"myObj_value\". Actual: myObj.value ==='+ myObj.value );\n}\n\n",
+ "id": "S12.10_A1.12_T5",
+ "strict_only": ""
+ },
+ {
+ "section": "12.10",
+ "description": "Using \"with\" inside of global context leading to normal completion",
+ "strict_mode_negative": "",
+ "test": "this.p1 = 1;\nthis.p2 = 2;\nthis.p3 = 3;\nvar result = \"result\";\nvar myObj = {p1: 'a', \n p2: 'b', \n p3: 'c',\n value: 'myObj_value',\n valueOf : function(){return 'obj_valueOf';},\n parseInt : function(){return 'obj_parseInt';},\n NaN : 'obj_NaN',\n Infinity : 'obj_Infinity',\n eval : function(){return 'obj_eval';},\n parseFloat : function(){return 'obj_parseFloat';},\n isNaN : function(){return 'obj_isNaN';},\n isFinite : function(){return 'obj_isFinite';}\n}\nvar del;\nvar st_p1 = \"p1\";\nvar st_p2 = \"p2\";\nvar st_p3 = \"p3\";\nvar st_parseInt = \"parseInt\";\nvar st_NaN = \"NaN\";\nvar st_Infinity = \"Infinity\";\nvar st_eval = \"eval\";\nvar st_parseFloat = \"parseFloat\";\nvar st_isNaN = \"isNaN\";\nvar st_isFinite = \"isFinite\";\n\nwith(myObj){\n st_p1 = p1;\n st_p2 = p2;\n st_p3 = p3;\n st_parseInt = parseInt;\n st_NaN = NaN;\n st_Infinity = Infinity;\n st_eval = eval;\n st_parseFloat = parseFloat;\n st_isNaN = isNaN;\n st_isFinite = isFinite;\n p1 = 'x1';\n this.p2 = 'x2';\n del = delete p3;\n var p4 = 'x4';\n p5 = 'x5';\n var value = 'value';\n}\n\nif(!(p1 === 1)){\n $ERROR('#1: p1 === 1. Actual: p1 ==='+ p1 );\n}\n\nif(!(p2 === \"x2\")){\n $ERROR('#2: p2 === \"x2\". Actual: p2 ==='+ p2 );\n}\n\nif(!(p3 === 3)){\n $ERROR('#3: p3 === 3. Actual: p3 ==='+ p3 );\n}\n\nif(!(p4 === \"x4\")){\n $ERROR('#4: p4 === \"x4\". Actual: p4 ==='+ p4 );\n}\n\nif(!(p5 === \"x5\")){\n $ERROR('#5: p5 === \"x5\". Actual: p5 ==='+ p5 );\n}\n\nif(!(myObj.p1 === \"x1\")){\n $ERROR('#6: myObj.p1 === \"x1\". Actual: myObj.p1 ==='+ myObj.p1 );\n}\n\nif(!(myObj.p2 === \"b\")){\n $ERROR('#7: myObj.p2 === \"b\". Actual: myObj.p2 ==='+ myObj.p2 );\n}\n\nif(!(myObj.p3 === undefined)){\n $ERROR('#8: myObj.p3 === undefined. Actual: myObj.p3 ==='+ myObj.p3 );\n}\n\nif(!(myObj.p4 === undefined)){\n $ERROR('#9: myObj.p4 === undefined. Actual: myObj.p4 ==='+ myObj.p4 );\n}\n\nif(!(myObj.p5 === undefined)){\n $ERROR('#10: myObj.p5 === undefined. Actual: myObj.p5 ==='+ myObj.p5 );\n}\n\nif(!(st_parseInt !== parseInt)){\n $ERROR('#11: myObj.parseInt !== parseInt');\n}\n\nif(!(st_NaN === \"obj_NaN\")){\n $ERROR('#12: myObj.NaN !== NaN');\n}\n\nif(!(st_Infinity !== Infinity)){\n $ERROR('#13: myObj.Infinity !== Infinity');\n}\n\nif(!(st_eval !== eval)){\n $ERROR('#14: myObj.eval !== eval');\n}\n\nif(!(st_parseFloat !== parseFloat)){\n $ERROR('#15: myObj.parseFloat !== parseFloat');\n}\n\nif(!(st_isNaN !== isNaN)){\n $ERROR('#16: myObj.isNaN !== isNaN');\n}\n\nif(!(st_isFinite !== isFinite)){\n $ERROR('#17: myObj.isFinite !== isFinite');\n}\n\nif(!(value === undefined)){\n $ERROR('#18: value === undefined. Actual: value ==='+ value );\n}\n\nif(!(myObj.value === \"value\")){\n $ERROR('#19: myObj.value === \"value\". Actual: myObj.value ==='+ myObj.value );\n}\n",
+ "id": "S12.10_A1.1_T1",
+ "strict_only": ""
+ },
+ {
+ "section": "12.10",
+ "description": "Using \"with\" inside of global context leading to completion by exception",
+ "strict_mode_negative": "",
+ "test": "this.p1 = 1;\nthis.p2 = 2;\nthis.p3 = 3;\nvar result = \"result\";\nvar myObj = {p1: 'a', \n p2: 'b', \n p3: 'c',\n value: 'myObj_value',\n valueOf : function(){return 'obj_valueOf';},\n parseInt : function(){return 'obj_parseInt';},\n NaN : 'obj_NaN',\n Infinity : 'obj_Infinity',\n eval : function(){return 'obj_eval';},\n parseFloat : function(){return 'obj_parseFloat';},\n isNaN : function(){return 'obj_isNaN';},\n isFinite : function(){return 'obj_isFinite';}\n}\nvar del;\nvar st_p1 = \"p1\";\nvar st_p2 = \"p2\";\nvar st_p3 = \"p3\";\nvar st_parseInt = \"parseInt\";\nvar st_NaN = \"NaN\";\nvar st_Infinity = \"Infinity\";\nvar st_eval = \"eval\";\nvar st_parseFloat = \"parseFloat\";\nvar st_isNaN = \"isNaN\";\nvar st_isFinite = \"isFinite\";\n\ntry {\n with(myObj){\n st_p1 = p1;\n st_p2 = p2;\n st_p3 = p3;\n st_parseInt = parseInt;\n st_NaN = NaN;\n st_Infinity = Infinity;\n st_eval = eval;\n st_parseFloat = parseFloat;\n st_isNaN = isNaN;\n st_isFinite = isFinite;\n p1 = 'x1';\n this.p2 = 'x2';\n del = delete p3;\n var p4 = 'x4';\n p5 = 'x5';\n var value = 'value';\n throw value;\n }\n} catch(e){\n result = e;\n}\n\nif(!(result === \"value\")){\n $ERROR('#0: result === \"value\". Actual: result ==='+ result );\n}\n\nif(!(p1 === 1)){\n $ERROR('#1: p1 === 1. Actual: p1 ==='+ p1 );\n}\n\nif(!(p2 === \"x2\")){\n $ERROR('#2: p2 === \"x2\". Actual: p2 ==='+ p2 );\n}\n\nif(!(p3 === 3)){\n $ERROR('#3: p3 === 3. Actual: p3 ==='+ p3 );\n}\n\nif(!(p4 === \"x4\")){\n $ERROR('#4: p4 === \"x4\". Actual: p4 ==='+ p4 );\n}\n\nif(!(p5 === \"x5\")){\n $ERROR('#5: p5 === \"x5\". Actual: p5 ==='+ p5 );\n}\n\nif(!(myObj.p1 === \"x1\")){\n $ERROR('#6: myObj.p1 === \"x1\". Actual: myObj.p1 ==='+ myObj.p1 );\n}\n\nif(!(myObj.p2 === \"b\")){\n $ERROR('#7: myObj.p2 === \"b\". Actual: myObj.p2 ==='+ myObj.p2 );\n}\n\nif(!(myObj.p3 === undefined)){\n $ERROR('#8: myObj.p3 === undefined. Actual: myObj.p3 ==='+ myObj.p3 );\n}\n\nif(!(myObj.p4 === undefined)){\n $ERROR('#9: myObj.p4 === undefined. Actual: myObj.p4 ==='+ myObj.p4 );\n}\n\nif(!(myObj.p5 === undefined)){\n $ERROR('#10: myObj.p5 === undefined. Actual: myObj.p5 ==='+ myObj.p5 );\n}\n\nif(!(st_parseInt !== parseInt)){\n $ERROR('#11: myObj.parseInt !== parseInt');\n}\n\nif(!(st_NaN === \"obj_NaN\")){\n $ERROR('#12: myObj.NaN !== NaN');\n}\n\nif(!(st_Infinity !== Infinity)){\n $ERROR('#13: myObj.Infinity !== Infinity');\n}\n\nif(!(st_eval !== eval)){\n $ERROR('#14: myObj.eval !== eval');\n}\n\nif(!(st_parseFloat !== parseFloat)){\n $ERROR('#15: myObj.parseFloat !== parseFloat');\n}\n\nif(!(st_isNaN !== isNaN)){\n $ERROR('#16: myObj.isNaN !== isNaN');\n}\n\nif(!(st_isFinite !== isFinite)){\n $ERROR('#17: myObj.isFinite !== isFinite');\n}\n\nif(!(value === undefined)){\n $ERROR('#18: value === undefined. Actual: value ==='+ value );\n}\n\nif(!(myObj.value === \"value\")){\n $ERROR('#19: myObj.value === \"value\". Actual: myObj.value ==='+ myObj.value );\n}\n",
+ "id": "S12.10_A1.1_T2",
+ "strict_only": ""
+ },
+ {
+ "section": "12.10",
+ "description": "Using \"with\" inside of global context leading to completion by exception",
+ "strict_mode_negative": "",
+ "test": "this.p1 = 1;\nthis.p2 = 2;\nthis.p3 = 3;\nvar result = \"result\";\nvar myObj = {p1: 'a', \n p2: 'b', \n p3: 'c',\n value: 'myObj_value',\n valueOf : function(){return 'obj_valueOf';},\n parseInt : function(){return 'obj_parseInt';},\n NaN : 'obj_NaN',\n Infinity : 'obj_Infinity',\n eval : function(){return 'obj_eval';},\n parseFloat : function(){return 'obj_parseFloat';},\n isNaN : function(){return 'obj_isNaN';},\n isFinite : function(){return 'obj_isFinite';}\n}\nvar del;\nvar st_p1 = \"p1\";\nvar st_p2 = \"p2\";\nvar st_p3 = \"p3\";\nvar st_parseInt = \"parseInt\";\nvar st_NaN = \"NaN\";\nvar st_Infinity = \"Infinity\";\nvar st_eval = \"eval\";\nvar st_parseFloat = \"parseFloat\";\nvar st_isNaN = \"isNaN\";\nvar st_isFinite = \"isFinite\";\n\ntry {\n with(myObj){\n throw value;\n st_p1 = p1;\n st_p2 = p2;\n st_p3 = p3;\n st_parseInt = parseInt;\n st_NaN = NaN;\n st_Infinity = Infinity;\n st_eval = eval;\n st_parseFloat = parseFloat;\n st_isNaN = isNaN;\n st_isFinite = isFinite;\n p1 = 'x1';\n this.p2 = 'x2';\n del = delete p3;\n var p4 = 'x4';\n p5 = 'x5';\n var value = 'value';\n }\n} catch(e){\n result = e;\n}\n\nif(!(result === \"myObj_value\")){\n $ERROR('#0: result === \"myObj_value\". Actual: result ==='+ result );\n}\n\nif(!(p1 === 1)){\n $ERROR('#1: p1 === 1. Actual: p1 ==='+ p1 );\n}\n\nif(!(p2 === 2)){\n $ERROR('#2: p2 === 2. Actual: p2 ==='+ p2 );\n}\n\nif(!(p3 === 3)){\n $ERROR('#3: p3 === 3. Actual: p3 ==='+ p3 );\n}\n\nif(!(p4 === undefined)){\n $ERROR('#4: p4 === undefined. Actual: p4 ==='+ p4 );\n}\n\ntry {\n p5;\n $ERROR('#5: p5 is not defined');\n} catch(e) { \n}\n\nif(!(myObj.p1 === \"a\")){\n $ERROR('#6: myObj.p1 === \"a\". Actual: myObj.p1 ==='+ myObj.p1 );\n}\n\nif(!(myObj.p2 === \"b\")){\n $ERROR('#7: myObj.p2 === \"b\". Actual: myObj.p2 ==='+ myObj.p2 );\n}\n\nif(!(myObj.p3 === \"c\")){\n $ERROR('#8: myObj.p3 === \"c\". Actual: myObj.p3 ==='+ myObj.p3 );\n}\n\nif(!(myObj.p4 === undefined)){\n $ERROR('#9: myObj.p4 === undefined. Actual: myObj.p4 ==='+ myObj.p4 );\n}\n\nif(!(myObj.p5 === undefined)){\n $ERROR('#10: myObj.p5 === undefined. Actual: myObj.p5 ==='+ myObj.p5 );\n}\n\nif(!(st_parseInt === \"parseInt\")){\n $ERROR('#11: myObj.parseInt === \"parseInt\". Actual: myObj.parseInt ==='+ myObj.parseInt );\n}\n\nif(!(st_NaN === \"NaN\")){\n $ERROR('#12: st_NaN === \"NaN\". Actual: st_NaN ==='+ st_NaN );\n}\n\nif(!(st_Infinity === \"Infinity\")){\n $ERROR('#13: st_Infinity === \"Infinity\". Actual: st_Infinity ==='+ st_Infinity );\n}\n\nif(!(st_eval === \"eval\")){\n $ERROR('#14: st_eval === \"eval\". Actual: st_eval ==='+ st_eval );\n}\n\nif(!(st_parseFloat === \"parseFloat\")){\n $ERROR('#15: st_parseFloat === \"parseFloat\". Actual: st_parseFloat ==='+ st_parseFloat );\n}\n\nif(!(st_isNaN === \"isNaN\")){\n $ERROR('#16: st_isNaN === \"isNaN\". Actual: st_isNaN ==='+ st_isNaN );\n}\n\nif(!(st_isFinite === \"isFinite\")){\n $ERROR('#17: st_isFinite === \"isFinite\". Actual: st_isFinite ==='+ st_isFinite );\n}\n\nif(!(value === undefined)){\n $ERROR('#18: value === undefined. Actual: value ==='+ value );\n}\n\nif(!(myObj.value === \"myObj_value\")){\n $ERROR('#19: myObj.value === \"myObj_value\". Actual: myObj.value ==='+ myObj.value );\n}\n",
+ "id": "S12.10_A1.1_T3",
+ "strict_only": ""
+ },
+ {
+ "section": "12.10",
+ "description": "Calling a function without \"with\" statement when the statement itself is declared within the function declaration, leading to normal completion",
+ "strict_mode_negative": "",
+ "test": "this.p1 = 1;\nthis.p2 = 2;\nthis.p3 = 3;\nvar result = \"result\";\nvar myObj = {p1: 'a', \n p2: 'b', \n p3: 'c',\n value: 'myObj_value',\n valueOf : function(){return 'obj_valueOf';},\n parseInt : function(){return 'obj_parseInt';},\n NaN : 'obj_NaN',\n Infinity : 'obj_Infinity',\n eval : function(){return 'obj_eval';},\n parseFloat : function(){return 'obj_parseFloat';},\n isNaN : function(){return 'obj_isNaN';},\n isFinite : function(){return 'obj_isFinite';}\n}\nvar del;\nvar st_p1 = \"p1\";\nvar st_p2 = \"p2\";\nvar st_p3 = \"p3\";\nvar st_parseInt = \"parseInt\";\nvar st_NaN = \"NaN\";\nvar st_Infinity = \"Infinity\";\nvar st_eval = \"eval\";\nvar st_parseFloat = \"parseFloat\";\nvar st_isNaN = \"isNaN\";\nvar st_isFinite = \"isFinite\";\n\nvar f = function(){\n with(myObj){\n st_p1 = p1;\n st_p2 = p2;\n st_p3 = p3;\n st_parseInt = parseInt;\n st_NaN = NaN;\n st_Infinity = Infinity;\n st_eval = eval;\n st_parseFloat = parseFloat;\n st_isNaN = isNaN;\n st_isFinite = isFinite;\n p1 = 'x1';\n this.p2 = 'x2';\n del = delete p3;\n var p4 = 'x4';\n p5 = 'x5';\n var value = 'value';\n }\n}\nf();\n\nif(!(p1 === 1)){\n $ERROR('#1: p1 === 1. Actual: p1 ==='+ p1 );\n}\n\nif(!(p2 === \"x2\")){\n $ERROR('#2: p2 === \"x2\". Actual: p2 ==='+ p2 );\n}\n\nif(!(p3 === 3)){\n $ERROR('#3: p3 === 3. Actual: p3 ==='+ p3 );\n}\n\ntry {\n p4;\n $ERROR('#4: p4 is not defined');\n} catch(e) { \n}\n\nif(!(p5 === \"x5\")){\n $ERROR('#5: p5 === \"x5\". Actual: p5 ==='+ p5 );\n}\n\nif(!(myObj.p1 === \"x1\")){\n $ERROR('#6: myObj.p1 === \"x1\". Actual: myObj.p1 ==='+ myObj.p1 );\n}\n\nif(!(myObj.p2 === \"b\")){\n $ERROR('#7: myObj.p2 === \"b\". Actual: myObj.p2 ==='+ myObj.p2 );\n}\n\nif(!(myObj.p3 === undefined)){\n $ERROR('#8: myObj.p3 === undefined. Actual: myObj.p3 ==='+ myObj.p3 );\n}\n\nif(!(myObj.p4 === undefined)){\n $ERROR('#9: myObj.p4 === undefined. Actual: myObj.p4 ==='+ myObj.p4 );\n}\n\nif(!(myObj.p5 === undefined)){\n $ERROR('#10: myObj.p5 === undefined. Actual: myObj.p5 ==='+ myObj.p5 );\n}\n\nif(!(st_parseInt !== parseInt)){\n $ERROR('#11: myObj.parseInt !== parseInt');\n}\n\nif(!(st_NaN === \"obj_NaN\")){\n $ERROR('#12: myObj.NaN !== NaN');\n}\n\nif(!(st_Infinity !== Infinity)){\n $ERROR('#13: myObj.Infinity !== Infinity');\n}\n\nif(!(st_eval !== eval)){\n $ERROR('#14: myObj.eval !== eval');\n}\n\nif(!(st_parseFloat !== parseFloat)){\n $ERROR('#15: myObj.parseFloat !== parseFloat');\n}\n\nif(!(st_isNaN !== isNaN)){\n $ERROR('#16: myObj.isNaN !== isNaN');\n}\n\nif(!(st_isFinite !== isFinite)){\n $ERROR('#17: myObj.isFinite !== isFinite');\n}\n\ntry{\n value;\n $ERROR('#18: value is not defined');\n}\ncatch(e){\n}\n\nif(!(myObj.value === \"value\")){\n $ERROR('#19: myObj.value === \"value\". Actual: myObj.value ==='+ myObj.value );\n}\n",
+ "id": "S12.10_A1.2_T1",
+ "strict_only": ""
+ },
+ {
+ "section": "12.10",
+ "description": "Calling a function without \"with\" statement when the statement itself is declared within the function declaration, leading to normal completion by \"return\"",
+ "strict_mode_negative": "",
+ "test": "this.p1 = 1;\nthis.p2 = 2;\nthis.p3 = 3;\nvar result = \"result\";\nvar myObj = {p1: 'a', \n p2: 'b', \n p3: 'c',\n value: 'myObj_value',\n valueOf : function(){return 'obj_valueOf';},\n parseInt : function(){return 'obj_parseInt';},\n NaN : 'obj_NaN',\n Infinity : 'obj_Infinity',\n eval : function(){return 'obj_eval';},\n parseFloat : function(){return 'obj_parseFloat';},\n isNaN : function(){return 'obj_isNaN';},\n isFinite : function(){return 'obj_isFinite';}\n}\nvar del;\nvar st_p1 = \"p1\";\nvar st_p2 = \"p2\";\nvar st_p3 = \"p3\";\nvar st_parseInt = \"parseInt\";\nvar st_NaN = \"NaN\";\nvar st_Infinity = \"Infinity\";\nvar st_eval = \"eval\";\nvar st_parseFloat = \"parseFloat\";\nvar st_isNaN = \"isNaN\";\nvar st_isFinite = \"isFinite\";\n\nvar f = function(){\n with(myObj){\n st_p1 = p1;\n st_p2 = p2;\n st_p3 = p3;\n st_parseInt = parseInt;\n st_NaN = NaN;\n st_Infinity = Infinity;\n st_eval = eval;\n st_parseFloat = parseFloat;\n st_isNaN = isNaN;\n st_isFinite = isFinite;\n p1 = 'x1';\n this.p2 = 'x2';\n del = delete p3;\n var p4 = 'x4';\n p5 = 'x5';\n var value = 'value';\n return value;\n }\n}\nresult = f();\n\nif(!(result === \"value\")){\n $ERROR('#0: result === \"value\". Actual: result ==='+ result );\n}\n\nif(!(p1 === 1)){\n $ERROR('#1: p1 === 1. Actual: p1 ==='+ p1 );\n}\n\nif(!(p2 === \"x2\")){\n $ERROR('#2: p2 === \"x2\". Actual: p2 ==='+ p2 );\n}\n\nif(!(p3 === 3)){\n $ERROR('#3: p3 === 3. Actual: p3 ==='+ p3 );\n}\n\ntry {\n p4;\n $ERROR('#4: p4 is not defined');\n} catch(e) { \n}\n\nif(!(p5 === \"x5\")){\n $ERROR('#5: p5 === \"x5\". Actual: p5 ==='+ p5 );\n}\n\nif(!(myObj.p1 === \"x1\")){\n $ERROR('#6: myObj.p1 === \"x1\". Actual: myObj.p1 ==='+ myObj.p1 );\n}\n\nif(!(myObj.p2 === \"b\")){\n $ERROR('#7: myObj.p2 === \"b\". Actual: myObj.p2 ==='+ myObj.p2 );\n}\n\nif(!(myObj.p3 === undefined)){\n $ERROR('#8: myObj.p3 === undefined. Actual: myObj.p3 ==='+ myObj.p3 );\n}\n\nif(!(myObj.p4 === undefined)){\n $ERROR('#9: myObj.p4 === undefined. Actual: myObj.p4 ==='+ myObj.p4 );\n}\n\nif(!(myObj.p5 === undefined)){\n $ERROR('#10: myObj.p5 === undefined. Actual: myObj.p5 ==='+ myObj.p5 );\n}\n\nif(!(st_parseInt !== parseInt)){\n $ERROR('#11: myObj.parseInt !== parseInt');\n}\n\nif(!(st_NaN === \"obj_NaN\")){\n $ERROR('#12: myObj.NaN !== NaN');\n}\n\nif(!(st_Infinity !== Infinity)){\n $ERROR('#13: myObj.Infinity !== Infinity');\n}\n\nif(!(st_eval !== eval)){\n $ERROR('#14: myObj.eval !== eval');\n}\n\nif(!(st_parseFloat !== parseFloat)){\n $ERROR('#15: myObj.parseFloat !== parseFloat');\n}\n\nif(!(st_isNaN !== isNaN)){\n $ERROR('#16: myObj.isNaN !== isNaN');\n}\n\nif(!(st_isFinite !== isFinite)){\n $ERROR('#17: myObj.isFinite !== isFinite');\n}\n\ntry{\n value;\n $ERROR('#18: value is not defined');\n}\ncatch(e){\n}\n\nif(!(myObj.value === \"value\")){\n $ERROR('#19: myObj.value === \"value\". Actual: myObj.value ==='+ myObj.value );\n}\n",
+ "id": "S12.10_A1.2_T2",
+ "strict_only": ""
+ },
+ {
+ "section": "12.10",
+ "description": "Calling a function without \"with\" statement when the statement itself is declared within the function declaration, leading to normal completion by \"return\"",
+ "strict_mode_negative": "",
+ "test": "this.p1 = 1;\nthis.p2 = 2;\nthis.p3 = 3;\nvar result = \"result\";\nvar myObj = {p1: 'a', \n p2: 'b', \n p3: 'c',\n value: 'myObj_value',\n valueOf : function(){return 'obj_valueOf';},\n parseInt : function(){return 'obj_parseInt';},\n NaN : 'obj_NaN',\n Infinity : 'obj_Infinity',\n eval : function(){return 'obj_eval';},\n parseFloat : function(){return 'obj_parseFloat';},\n isNaN : function(){return 'obj_isNaN';},\n isFinite : function(){return 'obj_isFinite';}\n}\nvar del;\nvar st_p1 = \"p1\";\nvar st_p2 = \"p2\";\nvar st_p3 = \"p3\";\nvar st_parseInt = \"parseInt\";\nvar st_NaN = \"NaN\";\nvar st_Infinity = \"Infinity\";\nvar st_eval = \"eval\";\nvar st_parseFloat = \"parseFloat\";\nvar st_isNaN = \"isNaN\";\nvar st_isFinite = \"isFinite\";\n\nvar f = function(){\n with(myObj){\n return value;\n st_p1 = p1;\n st_p2 = p2;\n st_p3 = p3;\n st_parseInt = parseInt;\n st_NaN = NaN;\n st_Infinity = Infinity;\n st_eval = eval;\n st_parseFloat = parseFloat;\n st_isNaN = isNaN;\n st_isFinite = isFinite;\n p1 = 'x1';\n this.p2 = 'x2';\n del = delete p3;\n var p4 = 'x4';\n p5 = 'x5';\n var value = 'value';\n }\n}\nresult = f();\n\nif(!(result === \"myObj_value\")){\n $ERROR('#0: result === \"myObj_value\". Actual: result ==='+ result );\n}\n\nif(!(p1 === 1)){\n $ERROR('#1: p1 === 1. Actual: p1 ==='+ p1 );\n}\n\nif(!(p2 === 2)){\n $ERROR('#2: p2 === 2. Actual: p2 ==='+ p2 );\n}\n\nif(!(p3 === 3)){\n $ERROR('#3: p3 === 3. Actual: p3 ==='+ p3 );\n}\n\ntry {\n p4;\n $ERROR('#4: p4 is not defined');\n} catch(e) { \n}\n\ntry {\n p5;\n $ERROR('#5: p5 is not defined');\n} catch(e) { \n}\n\nif(!(myObj.p1 === \"a\")){\n $ERROR('#6: myObj.p1 === \"a\". Actual: myObj.p1 ==='+ myObj.p1 );\n}\n\nif(!(myObj.p2 === \"b\")){\n $ERROR('#7: myObj.p2 === \"b\". Actual: myObj.p2 ==='+ myObj.p2 );\n}\n\nif(!(myObj.p3 === \"c\")){\n $ERROR('#8: myObj.p3 === \"c\". Actual: myObj.p3 ==='+ myObj.p3 );\n}\n\nif(!(myObj.p4 === undefined)){\n $ERROR('#9: myObj.p4 === undefined. Actual: myObj.p4 ==='+ myObj.p4 );\n}\n\nif(!(myObj.p5 === undefined)){\n $ERROR('#10: myObj.p5 === undefined. Actual: myObj.p5 ==='+ myObj.p5 );\n}\n\nif(!(st_parseInt === \"parseInt\")){\n $ERROR('#11: myObj.parseInt === \"parseInt\". Actual: myObj.parseInt ==='+ myObj.parseInt );\n}\n\nif(!(st_NaN === \"NaN\")){\n $ERROR('#12: st_NaN === \"NaN\". Actual: st_NaN ==='+ st_NaN );\n}\n\nif(!(st_Infinity === \"Infinity\")){\n $ERROR('#13: st_Infinity === \"Infinity\". Actual: st_Infinity ==='+ st_Infinity );\n}\n\nif(!(st_eval === \"eval\")){\n $ERROR('#14: st_eval === \"eval\". Actual: st_eval ==='+ st_eval );\n}\n\nif(!(st_parseFloat === \"parseFloat\")){\n $ERROR('#15: st_parseFloat === \"parseFloat\". Actual: st_parseFloat ==='+ st_parseFloat );\n}\n\nif(!(st_isNaN === \"isNaN\")){\n $ERROR('#16: st_isNaN === \"isNaN\". Actual: st_isNaN ==='+ st_isNaN );\n}\n\nif(!(st_isFinite === \"isFinite\")){\n $ERROR('#17: st_isFinite === \"isFinite\". Actual: st_isFinite ==='+ st_isFinite );\n}\n\ntry{\n value;\n $ERROR('#18: value is not defined');\n}\ncatch(e){\n}\n\nif(!(myObj.value === \"myObj_value\")){\n $ERROR('#19: myObj.value === \"myObj_value\". Actual: myObj.value ==='+ myObj.value );\n}\n\n",
+ "id": "S12.10_A1.2_T3",
+ "strict_only": ""
+ },
+ {
+ "section": "12.10",
+ "description": "Calling a function without \"with\" statement when the statement itself is declared within the function declaration, leading to completion by exception",
+ "strict_mode_negative": "",
+ "test": "this.p1 = 1;\nthis.p2 = 2;\nthis.p3 = 3;\nvar result = \"result\";\nvar myObj = {p1: 'a', \n p2: 'b', \n p3: 'c',\n value: 'myObj_value',\n valueOf : function(){return 'obj_valueOf';},\n parseInt : function(){return 'obj_parseInt';},\n NaN : 'obj_NaN',\n Infinity : 'obj_Infinity',\n eval : function(){return 'obj_eval';},\n parseFloat : function(){return 'obj_parseFloat';},\n isNaN : function(){return 'obj_isNaN';},\n isFinite : function(){return 'obj_isFinite';}\n}\nvar del;\nvar st_p1 = \"p1\";\nvar st_p2 = \"p2\";\nvar st_p3 = \"p3\";\nvar st_parseInt = \"parseInt\";\nvar st_NaN = \"NaN\";\nvar st_Infinity = \"Infinity\";\nvar st_eval = \"eval\";\nvar st_parseFloat = \"parseFloat\";\nvar st_isNaN = \"isNaN\";\nvar st_isFinite = \"isFinite\";\n\ntry {\n var f = function(){\n with(myObj){\n st_p1 = p1;\n st_p2 = p2;\n st_p3 = p3;\n st_parseInt = parseInt;\n st_NaN = NaN;\n st_Infinity = Infinity;\n st_eval = eval;\n st_parseFloat = parseFloat;\n st_isNaN = isNaN;\n st_isFinite = isFinite;\n p1 = 'x1';\n this.p2 = 'x2';\n del = delete p3;\n var p4 = 'x4';\n p5 = 'x5';\n var value = 'value';\n throw value;\n }\n }\n f();\n} catch(e){\n result = e;\n}\n\nif(!(result === \"value\")){\n $ERROR('#0: result === \"value\". Actual: result ==='+ result );\n}\n\nif(!(p1 === 1)){\n $ERROR('#1: p1 === 1. Actual: p1 ==='+ p1 );\n}\n\nif(!(p2 === \"x2\")){\n $ERROR('#2: p2 === \"x2\". Actual: p2 ==='+ p2 );\n}\n\nif(!(p3 === 3)){\n $ERROR('#3: p3 === 3. Actual: p3 ==='+ p3 );\n}\n\ntry {\n p4;\n $ERROR('#4: p4 is not defined');\n} catch(e) { \n}\n\nif(!(p5 === \"x5\")){\n $ERROR('#5: p5 === \"x5\". Actual: p5 ==='+ p5 );\n}\n\nif(!(myObj.p1 === \"x1\")){\n $ERROR('#6: myObj.p1 === \"x1\". Actual: myObj.p1 ==='+ myObj.p1 );\n}\n\nif(!(myObj.p2 === \"b\")){\n $ERROR('#7: myObj.p2 === \"b\". Actual: myObj.p2 ==='+ myObj.p2 );\n}\n\nif(!(myObj.p3 === undefined)){\n $ERROR('#8: myObj.p3 === undefined. Actual: myObj.p3 ==='+ myObj.p3 );\n}\n\nif(!(myObj.p4 === undefined)){\n $ERROR('#9: myObj.p4 === undefined. Actual: myObj.p4 ==='+ myObj.p4 );\n}\n\nif(!(myObj.p5 === undefined)){\n $ERROR('#10: myObj.p5 === undefined. Actual: myObj.p5 ==='+ myObj.p5 );\n}\n\nif(!(st_parseInt !== parseInt)){\n $ERROR('#11: myObj.parseInt !== parseInt');\n}\n\nif(!(st_NaN === \"obj_NaN\")){\n $ERROR('#12: myObj.NaN !== NaN');\n}\n\nif(!(st_Infinity !== Infinity)){\n $ERROR('#13: myObj.Infinity !== Infinity');\n}\n\nif(!(st_eval !== eval)){\n $ERROR('#14: myObj.eval !== eval');\n}\n\nif(!(st_parseFloat !== parseFloat)){\n $ERROR('#15: myObj.parseFloat !== parseFloat');\n}\n\nif(!(st_isNaN !== isNaN)){\n $ERROR('#16: myObj.isNaN !== isNaN');\n}\n\nif(!(st_isFinite !== isFinite)){\n $ERROR('#17: myObj.isFinite !== isFinite');\n}\n\ntry{\n value;\n $ERROR('#18: value is not defined');\n}\ncatch(e){\n}\n\nif(!(myObj.value === \"value\")){\n $ERROR('#19: myObj.value === \"value\". Actual: myObj.value ==='+ myObj.value );\n}\n",
+ "id": "S12.10_A1.2_T4",
+ "strict_only": ""
+ },
+ {
+ "section": "12.10",
+ "description": "Calling a function without \"with\" statement when the statement itself is declared within the function declaration, leading to completion by exception",
+ "strict_mode_negative": "",
+ "test": "this.p1 = 1;\nthis.p2 = 2;\nthis.p3 = 3;\nvar result = \"result\";\nvar myObj = {p1: 'a', \n p2: 'b', \n p3: 'c',\n value: 'myObj_value',\n valueOf : function(){return 'obj_valueOf';},\n parseInt : function(){return 'obj_parseInt';},\n NaN : 'obj_NaN',\n Infinity : 'obj_Infinity',\n eval : function(){return 'obj_eval';},\n parseFloat : function(){return 'obj_parseFloat';},\n isNaN : function(){return 'obj_isNaN';},\n isFinite : function(){return 'obj_isFinite';}\n}\nvar del;\nvar st_p1 = \"p1\";\nvar st_p2 = \"p2\";\nvar st_p3 = \"p3\";\nvar st_parseInt = \"parseInt\";\nvar st_NaN = \"NaN\";\nvar st_Infinity = \"Infinity\";\nvar st_eval = \"eval\";\nvar st_parseFloat = \"parseFloat\";\nvar st_isNaN = \"isNaN\";\nvar st_isFinite = \"isFinite\";\n\ntry {\n var f = function(){\n with(myObj){\n throw value;\n st_p1 = p1;\n st_p2 = p2;\n st_p3 = p3;\n st_parseInt = parseInt;\n st_NaN = NaN;\n st_Infinity = Infinity;\n st_eval = eval;\n st_parseFloat = parseFloat;\n st_isNaN = isNaN;\n st_isFinite = isFinite;\n p1 = 'x1';\n this.p2 = 'x2';\n del = delete p3;\n var p4 = 'x4';\n p5 = 'x5';\n var value = 'value';\n }\n }\n f();\n} catch(e){\n result = e;\n}\n\nif(!(result === \"myObj_value\")){\n $ERROR('#0: result === \"myObj_value\". Actual: result ==='+ result );\n}\n\nif(!(p2 === 2)){\n $ERROR('#2: p2 === 2. Actual: p2 ==='+ p2 );\n}\n\nif(!(p3 === 3)){\n $ERROR('#3: p3 === 3. Actual: p3 ==='+ p3 );\n}\n\ntry {\n p4;\n $ERROR('#4: p4 is not defined');\n} catch(e) { \n}\n\ntry {\n p5;\n $ERROR('#5: p5 is not defined');\n} catch(e) { \n}\n\nif(!(myObj.p1 === \"a\")){\n $ERROR('#6: myObj.p1 === \"a\". Actual: myObj.p1 ==='+ myObj.p1 );\n}\n\nif(!(myObj.p2 === \"b\")){\n $ERROR('#7: myObj.p2 === \"b\". Actual: myObj.p2 ==='+ myObj.p2 );\n}\n\nif(!(myObj.p3 === \"c\")){\n $ERROR('#8: myObj.p3 === \"c\". Actual: myObj.p3 ==='+ myObj.p3 );\n}\n\nif(!(myObj.p4 === undefined)){\n $ERROR('#9: myObj.p4 === undefined. Actual: myObj.p4 ==='+ myObj.p4 );\n}\n\nif(!(myObj.p5 === undefined)){\n $ERROR('#10: myObj.p5 === undefined. Actual: myObj.p5 ==='+ myObj.p5 );\n}\n\nif(!(st_parseInt === \"parseInt\")){\n $ERROR('#11: myObj.parseInt === \"parseInt\". Actual: myObj.parseInt ==='+ myObj.parseInt );\n}\n\nif(!(st_NaN === \"NaN\")){\n $ERROR('#12: st_NaN === \"NaN\". Actual: st_NaN ==='+ st_NaN );\n}\n\nif(!(st_Infinity === \"Infinity\")){\n $ERROR('#13: st_Infinity === \"Infinity\". Actual: st_Infinity ==='+ st_Infinity );\n}\n\nif(!(st_eval === \"eval\")){\n $ERROR('#14: st_eval === \"eval\". Actual: st_eval ==='+ st_eval );\n}\n\nif(!(st_parseFloat === \"parseFloat\")){\n $ERROR('#15: st_parseFloat === \"parseFloat\". Actual: st_parseFloat ==='+ st_parseFloat );\n}\n\nif(!(st_isNaN === \"isNaN\")){\n $ERROR('#16: st_isNaN === \"isNaN\". Actual: st_isNaN ==='+ st_isNaN );\n}\n\nif(!(st_isFinite === \"isFinite\")){\n $ERROR('#17: st_isFinite === \"isFinite\". Actual: st_isFinite ==='+ st_isFinite );\n}\n\ntry{\n value;\n $ERROR('#18: value is not defined');\n}\ncatch(e){\n}\n\nif(!(myObj.value === \"myObj_value\")){\n $ERROR('#19: myObj.value === \"myObj_value\". Actual: myObj.value ==='+ myObj.value );\n}\n",
+ "id": "S12.10_A1.2_T5",
+ "strict_only": ""
+ },
+ {
+ "section": "12.10",
+ "description": "Using \"with\" statement within function constructor, leading to normal completition",
+ "strict_mode_negative": "",
+ "test": "this.p1 = 1;\nthis.p2 = 2;\nthis.p3 = 3;\nvar result = \"result\";\nvar myObj = {p1: 'a', \n p2: 'b', \n p3: 'c',\n value: 'myObj_value',\n valueOf : function(){return 'obj_valueOf';},\n parseInt : function(){return 'obj_parseInt';},\n NaN : 'obj_NaN',\n Infinity : 'obj_Infinity',\n eval : function(){return 'obj_eval';},\n parseFloat : function(){return 'obj_parseFloat';},\n isNaN : function(){return 'obj_isNaN';},\n isFinite : function(){return 'obj_isFinite';}\n}\nvar del;\nvar st_p1 = \"p1\";\nvar st_p2 = \"p2\";\nvar st_p3 = \"p3\";\nvar st_parseInt = \"parseInt\";\nvar st_NaN = \"NaN\";\nvar st_Infinity = \"Infinity\";\nvar st_eval = \"eval\";\nvar st_parseFloat = \"parseFloat\";\nvar st_isNaN = \"isNaN\";\nvar st_isFinite = \"isFinite\";\n\nvar f = function(){\n with(myObj){\n st_p1 = p1;\n st_p2 = p2;\n st_p3 = p3;\n st_parseInt = parseInt;\n st_NaN = NaN;\n st_Infinity = Infinity;\n st_eval = eval;\n st_parseFloat = parseFloat;\n st_isNaN = isNaN;\n st_isFinite = isFinite;\n p1 = 'x1';\n this.p2 = 'x2';\n del = delete p3;\n var p4 = 'x4';\n p5 = 'x5';\n var value = 'value';\n }\n}\nvar obj = new f();\n\nif(!(p1 === 1)){\n $ERROR('#1: p1 === 1. Actual: p1 ==='+ p1 );\n}\n\nif(!(p2 === 2)){\n $ERROR('#2: p2 === 2. Actual: p2 ==='+ p2 );\n}\n\nif(!(p3 === 3)){\n $ERROR('#3: p3 === 3. Actual: p3 ==='+ p3 );\n}\n\ntry {\n p4;\n $ERROR('#4: p4 is not defined');\n} catch(e) { \n}\n\nif(!(p5 === \"x5\")){\n $ERROR('#5: p5 === \"x5\". Actual: p5 ==='+ p5 );\n}\n\nif(!(myObj.p1 === \"x1\")){\n $ERROR('#6: myObj.p1 === \"x1\". Actual: myObj.p1 ==='+ myObj.p1 );\n}\n\nif(!(myObj.p2 === \"b\")){\n $ERROR('#7: myObj.p2 === \"b\". Actual: myObj.p2 ==='+ myObj.p2 );\n}\n\nif(!(myObj.p3 === undefined)){\n $ERROR('#8: myObj.p3 === undefined. Actual: myObj.p3 ==='+ myObj.p3 );\n}\n\nif(!(myObj.p4 === undefined)){\n $ERROR('#9: myObj.p4 === undefined. Actual: myObj.p4 ==='+ myObj.p4 );\n}\n\nif(!(myObj.p5 === undefined)){\n $ERROR('#10: myObj.p5 === undefined. Actual: myObj.p5 ==='+ myObj.p5 );\n}\n\nif(!(st_parseInt !== parseInt)){\n $ERROR('#11: myObj.parseInt !== parseInt');\n}\n\nif(!(st_NaN === \"obj_NaN\")){\n $ERROR('#12: myObj.NaN !== NaN');\n}\n\nif(!(st_Infinity !== Infinity)){\n $ERROR('#13: myObj.Infinity !== Infinity');\n}\n\nif(!(st_eval !== eval)){\n $ERROR('#14: myObj.eval !== eval');\n}\n\nif(!(st_parseFloat !== parseFloat)){\n $ERROR('#15: myObj.parseFloat !== parseFloat');\n}\n\nif(!(st_isNaN !== isNaN)){\n $ERROR('#16: myObj.isNaN !== isNaN');\n}\n\nif(!(st_isFinite !== isFinite)){\n $ERROR('#17: myObj.isFinite !== isFinite');\n}\n\ntry{\n value;\n $ERROR('#18: value is not defined');\n}\ncatch(e){\n}\n\nif(!(myObj.value === \"value\")){\n $ERROR('#19: myObj.value === \"value\". Actual: myObj.value ==='+ myObj.value );\n}\n",
+ "id": "S12.10_A1.3_T1",
+ "strict_only": ""
+ },
+ {
+ "section": "12.10",
+ "description": "Using \"with\" statement within function constructor, leading to normal completition by \"return\"",
+ "strict_mode_negative": "",
+ "test": "this.p1 = 1;\nthis.p2 = 2;\nthis.p3 = 3;\nvar result = \"result\";\nvar myObj = {p1: 'a', \n p2: 'b', \n p3: 'c',\n value: 'myObj_value',\n valueOf : function(){return 'obj_valueOf';},\n parseInt : function(){return 'obj_parseInt';},\n NaN : 'obj_NaN',\n Infinity : 'obj_Infinity',\n eval : function(){return 'obj_eval';},\n parseFloat : function(){return 'obj_parseFloat';},\n isNaN : function(){return 'obj_isNaN';},\n isFinite : function(){return 'obj_isFinite';}\n}\nvar del;\nvar st_p1 = \"p1\";\nvar st_p2 = \"p2\";\nvar st_p3 = \"p3\";\nvar st_parseInt = \"parseInt\";\nvar st_NaN = \"NaN\";\nvar st_Infinity = \"Infinity\";\nvar st_eval = \"eval\";\nvar st_parseFloat = \"parseFloat\";\nvar st_isNaN = \"isNaN\";\nvar st_isFinite = \"isFinite\";\n\nvar f = function(){\n with(myObj){\n st_p1 = p1;\n st_p2 = p2;\n st_p3 = p3;\n st_parseInt = parseInt;\n st_NaN = NaN;\n st_Infinity = Infinity;\n st_eval = eval;\n st_parseFloat = parseFloat;\n st_isNaN = isNaN;\n st_isFinite = isFinite;\n p1 = 'x1';\n this.p2 = 'x2';\n del = delete p3;\n var p4 = 'x4';\n p5 = 'x5';\n var value = 'value';\n return value;\n }\n}\nvar obj = new f();\n\nif(!(p1 === 1)){\n $ERROR('#1: p1 === 1. Actual: p1 ==='+ p1 );\n}\n\nif(!(p2 === 2)){\n $ERROR('#2: p2 === 2. Actual: p2 ==='+ p2 );\n}\n\nif(!(p3 === 3)){\n $ERROR('#3: p3 === 3. Actual: p3 ==='+ p3 );\n}\n\ntry {\n p4;\n $ERROR('#4: p4 is not defined');\n} catch(e) { \n}\n\nif(!(p5 === \"x5\")){\n $ERROR('#5: p5 === \"x5\". Actual: p5 ==='+ p5 );\n}\n\nif(!(myObj.p1 === \"x1\")){\n $ERROR('#6: myObj.p1 === \"x1\". Actual: myObj.p1 ==='+ myObj.p1 );\n}\n\nif(!(myObj.p2 === \"b\")){\n $ERROR('#7: myObj.p2 === \"b\". Actual: myObj.p2 ==='+ myObj.p2 );\n}\n\nif(!(myObj.p3 === undefined)){\n $ERROR('#8: myObj.p3 === undefined. Actual: myObj.p3 ==='+ myObj.p3 );\n}\n\nif(!(myObj.p4 === undefined)){\n $ERROR('#9: myObj.p4 === undefined. Actual: myObj.p4 ==='+ myObj.p4 );\n}\n\nif(!(myObj.p5 === undefined)){\n $ERROR('#10: myObj.p5 === undefined. Actual: myObj.p5 ==='+ myObj.p5 );\n}\n\nif(!(st_parseInt !== parseInt)){\n $ERROR('#11: myObj.parseInt !== parseInt');\n}\n\nif(!(st_NaN === \"obj_NaN\")){\n $ERROR('#12: myObj.NaN !== NaN');\n}\n\nif(!(st_Infinity !== Infinity)){\n $ERROR('#13: myObj.Infinity !== Infinity');\n}\n\nif(!(st_eval !== eval)){\n $ERROR('#14: myObj.eval !== eval');\n}\n\nif(!(st_parseFloat !== parseFloat)){\n $ERROR('#15: myObj.parseFloat !== parseFloat');\n}\n\nif(!(st_isNaN !== isNaN)){\n $ERROR('#16: myObj.isNaN !== isNaN');\n}\n\nif(!(st_isFinite !== isFinite)){\n $ERROR('#17: myObj.isFinite !== isFinite');\n}\n\ntry{\n value;\n $ERROR('#18: value is not defined');\n}\ncatch(e){\n}\n\nif(!(myObj.value === \"value\")){\n $ERROR('#19: myObj.value === \"value\". Actual: myObj.value ==='+ myObj.value );\n}\n",
+ "id": "S12.10_A1.3_T2",
+ "strict_only": ""
+ },
+ {
+ "section": "12.10",
+ "description": "Using \"with\" statement within function constructor, leading to normal completition by \"return\"",
+ "strict_mode_negative": "",
+ "test": "this.p1 = 1;\nthis.p2 = 2;\nthis.p3 = 3;\nvar result = \"result\";\nvar myObj = {p1: 'a', \n p2: 'b', \n p3: 'c',\n value: 'myObj_value',\n valueOf : function(){return 'obj_valueOf';},\n parseInt : function(){return 'obj_parseInt';},\n NaN : 'obj_NaN',\n Infinity : 'obj_Infinity',\n eval : function(){return 'obj_eval';},\n parseFloat : function(){return 'obj_parseFloat';},\n isNaN : function(){return 'obj_isNaN';},\n isFinite : function(){return 'obj_isFinite';}\n}\nvar del;\nvar st_p1 = \"p1\";\nvar st_p2 = \"p2\";\nvar st_p3 = \"p3\";\nvar st_parseInt = \"parseInt\";\nvar st_NaN = \"NaN\";\nvar st_Infinity = \"Infinity\";\nvar st_eval = \"eval\";\nvar st_parseFloat = \"parseFloat\";\nvar st_isNaN = \"isNaN\";\nvar st_isFinite = \"isFinite\";\n\nvar f = function(){\n with(myObj){\n return value;\n st_p1 = p1;\n st_p2 = p2;\n st_p3 = p3;\n st_parseInt = parseInt;\n st_NaN = NaN;\n st_Infinity = Infinity;\n st_eval = eval;\n st_parseFloat = parseFloat;\n st_isNaN = isNaN;\n st_isFinite = isFinite;\n p1 = 'x1';\n this.p2 = 'x2';\n del = delete p3;\n var p4 = 'x4';\n p5 = 'x5';\n var value = 'value';\n }\n}\nvar obj = new f();\n\nif(!(p1 === 1)){\n $ERROR('#1: p1 === 1. Actual: p1 ==='+ p1 );\n}\n\nif(!(p2 === 2)){\n $ERROR('#2: p2 === 2. Actual: p2 ==='+ p2 );\n}\n\nif(!(p3 === 3)){\n $ERROR('#3: p3 === 3. Actual: p3 ==='+ p3 );\n}\n\ntry {\n p4;\n $ERROR('#4: p4 is not defined');\n} catch(e) { \n}\n\ntry {\n p5;\n $ERROR('#5: p5 is not defined');\n} catch(e) { \n}\n\nif(!(myObj.p1 === \"a\")){\n $ERROR('#6: myObj.p1 === \"a\". Actual: myObj.p1 ==='+ myObj.p1 );\n}\n\nif(!(myObj.p2 === \"b\")){\n $ERROR('#7: myObj.p2 === \"b\". Actual: myObj.p2 ==='+ myObj.p2 );\n}\n\nif(!(myObj.p3 === \"c\")){\n $ERROR('#8: myObj.p3 === \"c\". Actual: myObj.p3 ==='+ myObj.p3 );\n}\n\nif(!(myObj.p4 === undefined)){\n $ERROR('#9: myObj.p4 === undefined. Actual: myObj.p4 ==='+ myObj.p4 );\n}\n\nif(!(myObj.p5 === undefined)){\n $ERROR('#10: myObj.p5 === undefined. Actual: myObj.p5 ==='+ myObj.p5 );\n}\n\nif(!(st_parseInt === \"parseInt\")){\n $ERROR('#11: myObj.parseInt === \"parseInt\". Actual: myObj.parseInt ==='+ myObj.parseInt );\n}\n\nif(!(st_NaN === \"NaN\")){\n $ERROR('#12: st_NaN === \"NaN\". Actual: st_NaN ==='+ st_NaN );\n}\n\nif(!(st_Infinity === \"Infinity\")){\n $ERROR('#13: st_Infinity === \"Infinity\". Actual: st_Infinity ==='+ st_Infinity );\n}\n\nif(!(st_eval === \"eval\")){\n $ERROR('#14: st_eval === \"eval\". Actual: st_eval ==='+ st_eval );\n}\n\nif(!(st_parseFloat === \"parseFloat\")){\n $ERROR('#15: st_parseFloat === \"parseFloat\". Actual: st_parseFloat ==='+ st_parseFloat );\n}\n\nif(!(st_isNaN === \"isNaN\")){\n $ERROR('#16: st_isNaN === \"isNaN\". Actual: st_isNaN ==='+ st_isNaN );\n}\n\nif(!(st_isFinite === \"isFinite\")){\n $ERROR('#17: st_isFinite === \"isFinite\". Actual: st_isFinite ==='+ st_isFinite );\n}\n\ntry{\n value;\n $ERROR('#18: value is not defined');\n}\ncatch(e){\n}\n\nif(!(myObj.value === \"myObj_value\")){\n $ERROR('#19: myObj.value === \"myObj_value\". Actual: myObj.value ==='+ myObj.value );\n}\n\n",
+ "id": "S12.10_A1.3_T3",
+ "strict_only": ""
+ },
+ {
+ "section": "12.10",
+ "description": "Using \"with\" statement within function constructor, leading to completition by exception",
+ "strict_mode_negative": "",
+ "test": "this.p1 = 1;\nthis.p2 = 2;\nthis.p3 = 3;\nvar result = \"result\";\nvar myObj = {p1: 'a', \n p2: 'b', \n p3: 'c',\n value: 'myObj_value',\n valueOf : function(){return 'obj_valueOf';},\n parseInt : function(){return 'obj_parseInt';},\n NaN : 'obj_NaN',\n Infinity : 'obj_Infinity',\n eval : function(){return 'obj_eval';},\n parseFloat : function(){return 'obj_parseFloat';},\n isNaN : function(){return 'obj_isNaN';},\n isFinite : function(){return 'obj_isFinite';}\n}\nvar del;\nvar st_p1 = \"p1\";\nvar st_p2 = \"p2\";\nvar st_p3 = \"p3\";\nvar st_parseInt = \"parseInt\";\nvar st_NaN = \"NaN\";\nvar st_Infinity = \"Infinity\";\nvar st_eval = \"eval\";\nvar st_parseFloat = \"parseFloat\";\nvar st_isNaN = \"isNaN\";\nvar st_isFinite = \"isFinite\";\n\ntry {\n var f = function(){\n with(myObj){\n st_p1 = p1;\n st_p2 = p2;\n st_p3 = p3;\n st_parseInt = parseInt;\n st_NaN = NaN;\n st_Infinity = Infinity;\n st_eval = eval;\n st_parseFloat = parseFloat;\n st_isNaN = isNaN;\n st_isFinite = isFinite;\n p1 = 'x1';\n this.p2 = 'x2';\n del = delete p3;\n var p4 = 'x4';\n p5 = 'x5';\n var value = 'value';\n throw value;\n }\n }\n var obj = new f();\n} catch(e){\n result = e;\n}\n\nif(!(result === \"value\")){\n $ERROR('#0: result === \"value\". Actual: result ==='+ result );\n}\n\nif(!(p1 === 1)){\n $ERROR('#1: p1 === 1. Actual: p1 ==='+ p1 );\n}\n\nif(!(p2 === 2)){\n $ERROR('#2: p2 === 2. Actual: p2 ==='+ p2 );\n}\n\ntry {\n p4;\n $ERROR('#4: p4 is not defined');\n} catch(e) { \n}\n\nif(!(p5 === \"x5\")){\n $ERROR('#5: p5 === \"x5\". Actual: p5 ==='+ p5 );\n}\n\nif(!(myObj.p1 === \"x1\")){\n $ERROR('#6: myObj.p1 === \"x1\". Actual: myObj.p1 ==='+ myObj.p1 );\n}\n\nif(!(myObj.p2 === \"b\")){\n $ERROR('#7: myObj.p2 === \"b\". Actual: myObj.p2 ==='+ myObj.p2 );\n}\n\nif(!(myObj.p3 === undefined)){\n $ERROR('#8: myObj.p3 === undefined. Actual: myObj.p3 ==='+ myObj.p3 );\n}\n\nif(!(myObj.p4 === undefined)){\n $ERROR('#9: myObj.p4 === undefined. Actual: myObj.p4 ==='+ myObj.p4 );\n}\n\nif(!(myObj.p5 === undefined)){\n $ERROR('#10: myObj.p5 === undefined. Actual: myObj.p5 ==='+ myObj.p5 );\n}\n\nif(!(st_parseInt !== parseInt)){\n $ERROR('#11: myObj.parseInt !== parseInt');\n}\n\nif(!(st_NaN === \"obj_NaN\")){\n $ERROR('#12: myObj.NaN !== NaN');\n}\n\nif(!(st_Infinity !== Infinity)){\n $ERROR('#13: myObj.Infinity !== Infinity');\n}\n\nif(!(st_eval !== eval)){\n $ERROR('#14: myObj.eval !== eval');\n}\n\nif(!(st_parseFloat !== parseFloat)){\n $ERROR('#15: myObj.parseFloat !== parseFloat');\n}\n\nif(!(st_isNaN !== isNaN)){\n $ERROR('#16: myObj.isNaN !== isNaN');\n}\n\nif(!(st_isFinite !== isFinite)){\n $ERROR('#17: myObj.isFinite !== isFinite');\n}\n\ntry{\n value;\n $ERROR('#18: value is not defined');\n}\ncatch(e){\n}\n\nif(!(myObj.value === \"value\")){\n $ERROR('#19: myObj.value === \"value\". Actual: myObj.value ==='+ myObj.value );\n}\n",
+ "id": "S12.10_A1.3_T4",
+ "strict_only": ""
+ },
+ {
+ "section": "12.10",
+ "description": "Using \"with\" statement within function constructor, leading to completition by exception",
+ "strict_mode_negative": "",
+ "test": "this.p1 = 1;\nthis.p2 = 2;\nthis.p3 = 3;\nvar result = \"result\";\nvar myObj = {p1: 'a', \n p2: 'b', \n p3: 'c',\n value: 'myObj_value',\n valueOf : function(){return 'obj_valueOf';},\n parseInt : function(){return 'obj_parseInt';},\n NaN : 'obj_NaN',\n Infinity : 'obj_Infinity',\n eval : function(){return 'obj_eval';},\n parseFloat : function(){return 'obj_parseFloat';},\n isNaN : function(){return 'obj_isNaN';},\n isFinite : function(){return 'obj_isFinite';}\n}\nvar del;\nvar st_p1 = \"p1\";\nvar st_p2 = \"p2\";\nvar st_p3 = \"p3\";\nvar st_parseInt = \"parseInt\";\nvar st_NaN = \"NaN\";\nvar st_Infinity = \"Infinity\";\nvar st_eval = \"eval\";\nvar st_parseFloat = \"parseFloat\";\nvar st_isNaN = \"isNaN\";\nvar st_isFinite = \"isFinite\";\n\ntry {\n var f = function(){\n with(myObj){\n throw value;\n st_p1 = p1;\n st_p2 = p2;\n st_p3 = p3;\n st_parseInt = parseInt;\n st_NaN = NaN;\n st_Infinity = Infinity;\n st_eval = eval;\n st_parseFloat = parseFloat;\n st_isNaN = isNaN;\n st_isFinite = isFinite;\n p1 = 'x1';\n this.p2 = 'x2';\n del = delete p3;\n var p4 = 'x4';\n p5 = 'x5';\n var value = 'value';\n }\n }\n var obj = new f();\n} catch(e){\n result = e;\n}\n\nif(!(result === \"myObj_value\")){\n $ERROR('#0: result === \"myObj_value\". Actual: result ==='+ result );\n}\n\nif(!(p1 === 1)){\n $ERROR('#1: p1 === 1. Actual: p1 ==='+ p1 );\n}\n\nif(!(p2 === 2)){\n $ERROR('#2: p2 === 2. Actual: p2 ==='+ p2 );\n}\n\nif(!(p3 === 3)){\n $ERROR('#3: p3 === 3. Actual: p3 ==='+ p3 );\n}\n\ntry {\n p4;\n $ERROR('#4: p4 is not defined');\n} catch(e) { \n}\n\ntry {\n p5;\n $ERROR('#5: p5 is not defined');\n} catch(e) { \n}\n\nif(!(myObj.p1 === \"a\")){\n $ERROR('#6: myObj.p1 === \"a\". Actual: myObj.p1 ==='+ myObj.p1 );\n}\n\nif(!(myObj.p2 === \"b\")){\n $ERROR('#7: myObj.p2 === \"b\". Actual: myObj.p2 ==='+ myObj.p2 );\n}\n\nif(!(myObj.p3 === \"c\")){\n $ERROR('#8: myObj.p3 === \"c\". Actual: myObj.p3 ==='+ myObj.p3 );\n}\n\nif(!(myObj.p4 === undefined)){\n $ERROR('#9: myObj.p4 === undefined. Actual: myObj.p4 ==='+ myObj.p4 );\n}\n\nif(!(myObj.p5 === undefined)){\n $ERROR('#10: myObj.p5 === undefined. Actual: myObj.p5 ==='+ myObj.p5 );\n}\n\nif(!(st_parseInt === \"parseInt\")){\n $ERROR('#11: myObj.parseInt === \"parseInt\". Actual: myObj.parseInt ==='+ myObj.parseInt );\n}\n\nif(!(st_NaN === \"NaN\")){\n $ERROR('#12: st_NaN === \"NaN\". Actual: st_NaN ==='+ st_NaN );\n}\n\nif(!(st_Infinity === \"Infinity\")){\n $ERROR('#13: st_Infinity === \"Infinity\". Actual: st_Infinity ==='+ st_Infinity );\n}\n\nif(!(st_eval === \"eval\")){\n $ERROR('#14: st_eval === \"eval\". Actual: st_eval ==='+ st_eval );\n}\n\nif(!(st_parseFloat === \"parseFloat\")){\n $ERROR('#15: st_parseFloat === \"parseFloat\". Actual: st_parseFloat ==='+ st_parseFloat );\n}\n\nif(!(st_isNaN === \"isNaN\")){\n $ERROR('#16: st_isNaN === \"isNaN\". Actual: st_isNaN ==='+ st_isNaN );\n}\n\nif(!(st_isFinite === \"isFinite\")){\n $ERROR('#17: st_isFinite === \"isFinite\". Actual: st_isFinite ==='+ st_isFinite );\n}\n\ntry{\n value;\n $ERROR('#18: value is not defined');\n}\ncatch(e){\n}\n\nif(!(myObj.value === \"myObj_value\")){\n $ERROR('#19: myObj.value === \"myObj_value\". Actual: myObj.value ==='+ myObj.value );\n}\n\n",
+ "id": "S12.10_A1.3_T5",
+ "strict_only": ""
+ },
+ {
+ "section": "12.10",
+ "description": "Using \"with\" statement within iteration statement, leading to normal completion",
+ "strict_mode_negative": "",
+ "test": "this.p1 = 1;\nthis.p2 = 2;\nthis.p3 = 3;\nvar result = \"result\";\nvar myObj = {p1: 'a', \n p2: 'b', \n p3: 'c',\n value: 'myObj_value',\n valueOf : function(){return 'obj_valueOf';},\n parseInt : function(){return 'obj_parseInt';},\n NaN : 'obj_NaN',\n Infinity : 'obj_Infinity',\n eval : function(){return 'obj_eval';},\n parseFloat : function(){return 'obj_parseFloat';},\n isNaN : function(){return 'obj_isNaN';},\n isFinite : function(){return 'obj_isFinite';}\n}\nvar del;\nvar st_p1 = \"p1\";\nvar st_p2 = \"p2\";\nvar st_p3 = \"p3\";\nvar st_parseInt = \"parseInt\";\nvar st_NaN = \"NaN\";\nvar st_Infinity = \"Infinity\";\nvar st_eval = \"eval\";\nvar st_parseFloat = \"parseFloat\";\nvar st_isNaN = \"isNaN\";\nvar st_isFinite = \"isFinite\";\n\ndo{\n with(myObj){\n st_p1 = p1;\n st_p2 = p2;\n st_p3 = p3;\n st_parseInt = parseInt;\n st_NaN = NaN;\n st_Infinity = Infinity;\n st_eval = eval;\n st_parseFloat = parseFloat;\n st_isNaN = isNaN;\n st_isFinite = isFinite;\n p1 = 'x1';\n this.p2 = 'x2';\n del = delete p3;\n var p4 = 'x4';\n p5 = 'x5';\n var value = 'value';\n }\n}\nwhile(false);\n\nif(!(p1 === 1)){\n $ERROR('#1: p1 === 1. Actual: p1 ==='+ p1 );\n}\n\nif(!(p2 === \"x2\")){\n $ERROR('#2: p2 === \"x2\". Actual: p2 ==='+ p2 );\n}\n\nif(!(p3 === 3)){\n $ERROR('#3: p3 === 3. Actual: p3 ==='+ p3 );\n}\n\nif(!(p4 === \"x4\")){\n $ERROR('#4: p4 === \"x4\". Actual: p4 ==='+ p4 );\n}\n\nif(!(p5 === \"x5\")){\n $ERROR('#5: p5 === \"x5\". Actual: p5 ==='+ p5 );\n}\n\nif(!(myObj.p1 === \"x1\")){\n $ERROR('#6: myObj.p1 === \"x1\". Actual: myObj.p1 ==='+ myObj.p1 );\n}\n\nif(!(myObj.p2 === \"b\")){\n $ERROR('#7: myObj.p2 === \"b\". Actual: myObj.p2 ==='+ myObj.p2 );\n}\n\nif(!(myObj.p3 === undefined)){\n $ERROR('#8: myObj.p3 === undefined. Actual: myObj.p3 ==='+ myObj.p3 );\n}\n\nif(!(myObj.p4 === undefined)){\n $ERROR('#9: myObj.p4 === undefined. Actual: myObj.p4 ==='+ myObj.p4 );\n}\n\nif(!(myObj.p5 === undefined)){\n $ERROR('#10: myObj.p5 === undefined. Actual: myObj.p5 ==='+ myObj.p5 );\n}\n\nif(!(st_parseInt !== parseInt)){\n $ERROR('#11: myObj.parseInt !== parseInt');\n}\n\nif(!(st_NaN === \"obj_NaN\")){\n $ERROR('#12: myObj.NaN !== NaN');\n}\n\nif(!(st_Infinity !== Infinity)){\n $ERROR('#13: myObj.Infinity !== Infinity');\n}\n\nif(!(st_eval !== eval)){\n $ERROR('#14: myObj.eval !== eval');\n}\n\nif(!(st_parseFloat !== parseFloat)){\n $ERROR('#15: myObj.parseFloat !== parseFloat');\n}\n\nif(!(st_isNaN !== isNaN)){\n $ERROR('#16: myObj.isNaN !== isNaN');\n}\n\nif(!(st_isFinite !== isFinite)){\n $ERROR('#17: myObj.isFinite !== isFinite');\n}\n\nif(!(value === undefined)){\n $ERROR('#18: value === undefined. Actual: value ==='+ value );\n}\n\nif(!(myObj.value === \"value\")){\n $ERROR('#19: myObj.value === \"value\". Actual: myObj.value ==='+ myObj.value );\n}\n",
+ "id": "S12.10_A1.4_T1",
+ "strict_only": ""
+ },
+ {
+ "section": "12.10",
+ "description": "Using \"with\" statement within iteration statement, leading to completion by exception",
+ "strict_mode_negative": "",
+ "test": "this.p1 = 1;\nthis.p2 = 2;\nthis.p3 = 3;\nvar result = \"result\";\nvar myObj = {p1: 'a', \n p2: 'b', \n p3: 'c',\n value: 'myObj_value',\n valueOf : function(){return 'obj_valueOf';},\n parseInt : function(){return 'obj_parseInt';},\n NaN : 'obj_NaN',\n Infinity : 'obj_Infinity',\n eval : function(){return 'obj_eval';},\n parseFloat : function(){return 'obj_parseFloat';},\n isNaN : function(){return 'obj_isNaN';},\n isFinite : function(){return 'obj_isFinite';}\n}\nvar del;\nvar st_p1 = \"p1\";\nvar st_p2 = \"p2\";\nvar st_p3 = \"p3\";\nvar st_parseInt = \"parseInt\";\nvar st_NaN = \"NaN\";\nvar st_Infinity = \"Infinity\";\nvar st_eval = \"eval\";\nvar st_parseFloat = \"parseFloat\";\nvar st_isNaN = \"isNaN\";\nvar st_isFinite = \"isFinite\";\n\ntry {\n do{\n with(myObj){\n st_p1 = p1;\n st_p2 = p2;\n st_p3 = p3;\n st_parseInt = parseInt;\n st_NaN = NaN;\n st_Infinity = Infinity;\n st_eval = eval;\n st_parseFloat = parseFloat;\n st_isNaN = isNaN;\n st_isFinite = isFinite;\n p1 = 'x1';\n this.p2 = 'x2';\n del = delete p3;\n var p4 = 'x4';\n p5 = 'x5';\n var value = 'value';\n throw value;\n }\n }\n while(false);\n} catch(e){\n result = e;\n}\n\nif(!(result === \"value\")){\n $ERROR('#0: result === \"value\". Actual: result ==='+ result );\n}\n\nif(!(p1 === 1)){\n $ERROR('#1: p1 === 1. Actual: p1 ==='+ p1 );\n}\n\nif(!(p2 === \"x2\")){\n $ERROR('#2: p2 === \"x2\". Actual: p2 ==='+ p2 );\n}\n\nif(!(p3 === 3)){\n $ERROR('#3: p3 === 3. Actual: p3 ==='+ p3 );\n}\n\nif(!(p4 === \"x4\")){\n $ERROR('#4: p4 === \"x4\". Actual: p4 ==='+ p4 );\n}\n\nif(!(p5 === \"x5\")){\n $ERROR('#5: p5 === \"x5\". Actual: p5 ==='+ p5 );\n}\n\nif(!(myObj.p1 === \"x1\")){\n $ERROR('#6: myObj.p1 === \"x1\". Actual: myObj.p1 ==='+ myObj.p1 );\n}\n\nif(!(myObj.p2 === \"b\")){\n $ERROR('#7: myObj.p2 === \"b\". Actual: myObj.p2 ==='+ myObj.p2 );\n}\n\nif(!(myObj.p3 === undefined)){\n $ERROR('#8: myObj.p3 === undefined. Actual: myObj.p3 ==='+ myObj.p3 );\n}\n\nif(!(myObj.p4 === undefined)){\n $ERROR('#9: myObj.p4 === undefined. Actual: myObj.p4 ==='+ myObj.p4 );\n}\n\nif(!(myObj.p5 === undefined)){\n $ERROR('#10: myObj.p5 === undefined. Actual: myObj.p5 ==='+ myObj.p5 );\n}\n\nif(!(st_parseInt !== parseInt)){\n $ERROR('#11: myObj.parseInt !== parseInt');\n}\n\nif(!(st_NaN === \"obj_NaN\")){\n $ERROR('#12: myObj.NaN !== NaN');\n}\n\nif(!(st_Infinity !== Infinity)){\n $ERROR('#13: myObj.Infinity !== Infinity');\n}\n\nif(!(st_eval !== eval)){\n $ERROR('#14: myObj.eval !== eval');\n}\n\nif(!(st_parseFloat !== parseFloat)){\n $ERROR('#15: myObj.parseFloat !== parseFloat');\n}\n\nif(!(st_isNaN !== isNaN)){\n $ERROR('#16: myObj.isNaN !== isNaN');\n}\n\nif(!(st_isFinite !== isFinite)){\n $ERROR('#17: myObj.isFinite !== isFinite');\n}\n\nif(!(value === undefined)){\n $ERROR('#18: value === undefined. Actual: value ==='+ value );\n}\n\nif(!(myObj.value === \"value\")){\n $ERROR('#19: myObj.value === \"value\". Actual: myObj.value ==='+ myObj.value );\n}\n",
+ "id": "S12.10_A1.4_T2",
+ "strict_only": ""
+ },
+ {
+ "section": "12.10",
+ "description": "Using \"with\" statement within iteration statement, leading to completion by exception",
+ "strict_mode_negative": "",
+ "test": "this.p1 = 1;\nthis.p2 = 2;\nthis.p3 = 3;\nvar result = \"result\";\nvar myObj = {p1: 'a', \n p2: 'b', \n p3: 'c',\n value: 'myObj_value',\n valueOf : function(){return 'obj_valueOf';},\n parseInt : function(){return 'obj_parseInt';},\n NaN : 'obj_NaN',\n Infinity : 'obj_Infinity',\n eval : function(){return 'obj_eval';},\n parseFloat : function(){return 'obj_parseFloat';},\n isNaN : function(){return 'obj_isNaN';},\n isFinite : function(){return 'obj_isFinite';}\n}\nvar del;\nvar st_p1 = \"p1\";\nvar st_p2 = \"p2\";\nvar st_p3 = \"p3\";\nvar st_parseInt = \"parseInt\";\nvar st_NaN = \"NaN\";\nvar st_Infinity = \"Infinity\";\nvar st_eval = \"eval\";\nvar st_parseFloat = \"parseFloat\";\nvar st_isNaN = \"isNaN\";\nvar st_isFinite = \"isFinite\";\n\ntry {\n do{\n with(myObj){\n throw value;\n st_p1 = p1;\n st_p2 = p2;\n st_p3 = p3;\n st_parseInt = parseInt;\n st_NaN = NaN;\n st_Infinity = Infinity;\n st_eval = eval;\n st_parseFloat = parseFloat;\n st_isNaN = isNaN;\n st_isFinite = isFinite;\n p1 = 'x1';\n this.p2 = 'x2';\n del = delete p3;\n var p4 = 'x4';\n p5 = 'x5';\n var value = 'value';\n }\n }\n while(false);\n} catch(e){\n result = e;\n}\n\nif(!(result === \"myObj_value\")){\n $ERROR('#0: result === \"myObj_value\". Actual: result ==='+ result );\n}\n\nif(!(p1 === 1)){\n $ERROR('#1: p1 === 1. Actual: p1 ==='+ p1 );\n}\n\nif(!(p2 === 2)){\n $ERROR('#2: p2 === 2. Actual: p2 ==='+ p2 );\n}\n\nif(!(p3 === 3)){\n $ERROR('#3: p3 === 3. Actual: p3 ==='+ p3 );\n}\n\nif(!(p4 === undefined)){\n $ERROR('#4: p4 === undefined. Actual: p4 ==='+ p4 );\n}\n\ntry {\n p5;\n $ERROR('#5: p5 is not defined');\n} catch(e) { \n}\n\nif(!(myObj.p1 === \"a\")){\n $ERROR('#6: myObj.p1 === \"a\". Actual: myObj.p1 ==='+ myObj.p1 );\n}\n\nif(!(myObj.p2 === \"b\")){\n $ERROR('#7: myObj.p2 === \"b\". Actual: myObj.p2 ==='+ myObj.p2 );\n}\n\nif(!(myObj.p3 === \"c\")){\n $ERROR('#8: myObj.p3 === \"c\". Actual: myObj.p3 ==='+ myObj.p3 );\n}\n\nif(!(myObj.p4 === undefined)){\n $ERROR('#9: myObj.p4 === undefined. Actual: myObj.p4 ==='+ myObj.p4 );\n}\n\nif(!(myObj.p5 === undefined)){\n $ERROR('#10: myObj.p5 === undefined. Actual: myObj.p5 ==='+ myObj.p5 );\n}\n\nif(!(st_parseInt === \"parseInt\")){\n $ERROR('#11: myObj.parseInt === \"parseInt\". Actual: myObj.parseInt ==='+ myObj.parseInt );\n}\n\nif(!(st_NaN === \"NaN\")){\n $ERROR('#12: st_NaN === \"NaN\". Actual: st_NaN ==='+ st_NaN );\n}\n\nif(!(st_Infinity === \"Infinity\")){\n $ERROR('#13: st_Infinity === \"Infinity\". Actual: st_Infinity ==='+ st_Infinity );\n}\n\nif(!(st_eval === \"eval\")){\n $ERROR('#14: st_eval === \"eval\". Actual: st_eval ==='+ st_eval );\n}\n\nif(!(st_parseFloat === \"parseFloat\")){\n $ERROR('#15: st_parseFloat === \"parseFloat\". Actual: st_parseFloat ==='+ st_parseFloat );\n}\n\nif(!(st_isNaN === \"isNaN\")){\n $ERROR('#16: st_isNaN === \"isNaN\". Actual: st_isNaN ==='+ st_isNaN );\n}\n\nif(!(st_isFinite === \"isFinite\")){\n $ERROR('#17: st_isFinite === \"isFinite\". Actual: st_isFinite ==='+ st_isFinite );\n}\n\nif(!(value === undefined)){\n $ERROR('#18: value === undefined. Actual: value ==='+ value );\n}\n\nif(!(myObj.value === \"myObj_value\")){\n $ERROR('#19: myObj.value === \"myObj_value\". Actual: myObj.value ==='+ myObj.value );\n}\n",
+ "id": "S12.10_A1.4_T3",
+ "strict_only": ""
+ },
+ {
+ "section": "12.10",
+ "description": "Using \"with\" statement within iteration statement, leading to completion by break",
+ "strict_mode_negative": "",
+ "test": "this.p1 = 1;\nthis.p2 = 2;\nthis.p3 = 3;\nvar result = \"result\";\nvar myObj = {p1: 'a', \n p2: 'b', \n p3: 'c',\n value: 'myObj_value',\n valueOf : function(){return 'obj_valueOf';},\n parseInt : function(){return 'obj_parseInt';},\n NaN : 'obj_NaN',\n Infinity : 'obj_Infinity',\n eval : function(){return 'obj_eval';},\n parseFloat : function(){return 'obj_parseFloat';},\n isNaN : function(){return 'obj_isNaN';},\n isFinite : function(){return 'obj_isFinite';}\n}\nvar del;\nvar st_p1 = \"p1\";\nvar st_p2 = \"p2\";\nvar st_p3 = \"p3\";\nvar st_parseInt = \"parseInt\";\nvar st_NaN = \"NaN\";\nvar st_Infinity = \"Infinity\";\nvar st_eval = \"eval\";\nvar st_parseFloat = \"parseFloat\";\nvar st_isNaN = \"isNaN\";\nvar st_isFinite = \"isFinite\";\n\ndo{\n with(myObj){\n st_p1 = p1;\n st_p2 = p2;\n st_p3 = p3;\n st_parseInt = parseInt;\n st_NaN = NaN;\n st_Infinity = Infinity;\n st_eval = eval;\n st_parseFloat = parseFloat;\n st_isNaN = isNaN;\n st_isFinite = isFinite;\n p1 = 'x1';\n this.p2 = 'x2';\n del = delete p3;\n var p4 = 'x4';\n p5 = 'x5';\n var value = 'value';\n break;\n }\n}\nwhile(false);\n\nif(!(p1 === 1)){\n $ERROR('#1: p1 === 1. Actual: p1 ==='+ p1 );\n}\n\nif(!(p2 === \"x2\")){\n $ERROR('#2: p2 === \"x2\". Actual: p2 ==='+ p2 );\n}\n\nif(!(p3 === 3)){\n $ERROR('#3: p3 === 3. Actual: p3 ==='+ p3 );\n}\n\nif(!(p4 === \"x4\")){\n $ERROR('#4: p4 === \"x4\". Actual: p4 ==='+ p4 );\n}\n\nif(!(p5 === \"x5\")){\n $ERROR('#5: p5 === \"x5\". Actual: p5 ==='+ p5 );\n}\n\nif(!(myObj.p1 === \"x1\")){\n $ERROR('#6: myObj.p1 === \"x1\". Actual: myObj.p1 ==='+ myObj.p1 );\n}\n\nif(!(myObj.p2 === \"b\")){\n $ERROR('#7: myObj.p2 === \"b\". Actual: myObj.p2 ==='+ myObj.p2 );\n}\n\nif(!(myObj.p3 === undefined)){\n $ERROR('#8: myObj.p3 === undefined. Actual: myObj.p3 ==='+ myObj.p3 );\n}\n\nif(!(myObj.p4 === undefined)){\n $ERROR('#9: myObj.p4 === undefined. Actual: myObj.p4 ==='+ myObj.p4 );\n}\n\nif(!(myObj.p5 === undefined)){\n $ERROR('#10: myObj.p5 === undefined. Actual: myObj.p5 ==='+ myObj.p5 );\n}\n\nif(!(st_parseInt !== parseInt)){\n $ERROR('#11: myObj.parseInt !== parseInt');\n}\n\nif(!(st_NaN === \"obj_NaN\")){\n $ERROR('#12: myObj.NaN !== NaN');\n}\n\nif(!(st_Infinity !== Infinity)){\n $ERROR('#13: myObj.Infinity !== Infinity');\n}\n\nif(!(st_eval !== eval)){\n $ERROR('#14: myObj.eval !== eval');\n}\n\nif(!(st_parseFloat !== parseFloat)){\n $ERROR('#15: myObj.parseFloat !== parseFloat');\n}\n\nif(!(st_isNaN !== isNaN)){\n $ERROR('#16: myObj.isNaN !== isNaN');\n}\n\nif(!(st_isFinite !== isFinite)){\n $ERROR('#17: myObj.isFinite !== isFinite');\n}\n\nif(!(value === undefined)){\n $ERROR('#18: value === undefined. Actual: value ==='+ value );\n}\n\nif(!(myObj.value === \"value\")){\n $ERROR('#19: myObj.value === \"value\". Actual: myObj.value ==='+ myObj.value );\n}\n",
+ "id": "S12.10_A1.4_T4",
+ "strict_only": ""
+ },
+ {
+ "section": "12.10",
+ "description": "Using \"with\" statement within iteration statement, leading to completion by break",
+ "strict_mode_negative": "",
+ "test": "this.p1 = 1;\nthis.p2 = 2;\nthis.p3 = 3;\nvar result = \"result\";\nvar myObj = {p1: 'a', \n p2: 'b', \n p3: 'c',\n value: 'myObj_value',\n valueOf : function(){return 'obj_valueOf';},\n parseInt : function(){return 'obj_parseInt';},\n NaN : 'obj_NaN',\n Infinity : 'obj_Infinity',\n eval : function(){return 'obj_eval';},\n parseFloat : function(){return 'obj_parseFloat';},\n isNaN : function(){return 'obj_isNaN';},\n isFinite : function(){return 'obj_isFinite';}\n}\nvar del;\nvar st_p1 = \"p1\";\nvar st_p2 = \"p2\";\nvar st_p3 = \"p3\";\nvar st_parseInt = \"parseInt\";\nvar st_NaN = \"NaN\";\nvar st_Infinity = \"Infinity\";\nvar st_eval = \"eval\";\nvar st_parseFloat = \"parseFloat\";\nvar st_isNaN = \"isNaN\";\nvar st_isFinite = \"isFinite\";\n\ndo{\n with(myObj){\n break;\n st_p1 = p1;\n st_p2 = p2;\n st_p3 = p3;\n st_parseInt = parseInt;\n st_NaN = NaN;\n st_Infinity = Infinity;\n st_eval = eval;\n st_parseFloat = parseFloat;\n st_isNaN = isNaN;\n st_isFinite = isFinite;\n p1 = 'x1';\n this.p2 = 'x2';\n del = delete p3;\n var p4 = 'x4';\n p5 = 'x5';\n var value = 'value';\n }\n}\nwhile(false);\n\nif(!(p1 === 1)){\n $ERROR('#1: p1 === 1. Actual: p1 ==='+ p1 );\n}\n\nif(!(p2 === 2)){\n $ERROR('#2: p2 === 2. Actual: p2 ==='+ p2 );\n}\n\nif(!(p3 === 3)){\n $ERROR('#3: p3 === 3. Actual: p3 ==='+ p3 );\n}\n\nif(!(p4 === undefined)){\n $ERROR('#4: p4 ===undefined. Actual: p4 ==='+ p4 );\n}\n\ntry {\n p5;\n $ERROR('#5: p5 is not defined');\n} catch(e) { \n}\n\nif(!(myObj.p1 === \"a\")){\n $ERROR('#6: myObj.p1 === \"a\". Actual: myObj.p1 ==='+ myObj.p1 );\n}\n\nif(!(myObj.p2 === \"b\")){\n $ERROR('#7: myObj.p2 === \"b\". Actual: myObj.p2 ==='+ myObj.p2 );\n}\n\nif(!(myObj.p3 === \"c\")){\n $ERROR('#8: myObj.p3 === \"c\". Actual: myObj.p3 ==='+ myObj.p3 );\n}\n\nif(!(myObj.p4 === undefined)){\n $ERROR('#9: myObj.p4 === undefined. Actual: myObj.p4 ==='+ myObj.p4 );\n}\n\nif(!(myObj.p5 === undefined)){\n $ERROR('#10: myObj.p5 === undefined. Actual: myObj.p5 ==='+ myObj.p5 );\n}\n\nif(!(st_parseInt === \"parseInt\")){\n $ERROR('#11: myObj.parseInt === \"parseInt\". Actual: myObj.parseInt ==='+ myObj.parseInt );\n}\n\nif(!(st_NaN === \"NaN\")){\n $ERROR('#12: st_NaN === \"NaN\". Actual: st_NaN ==='+ st_NaN );\n}\n\nif(!(st_Infinity === \"Infinity\")){\n $ERROR('#13: st_Infinity === \"Infinity\". Actual: st_Infinity ==='+ st_Infinity );\n}\n\nif(!(st_eval === \"eval\")){\n $ERROR('#14: st_eval === \"eval\". Actual: st_eval ==='+ st_eval );\n}\n\nif(!(st_parseFloat === \"parseFloat\")){\n $ERROR('#15: st_parseFloat === \"parseFloat\". Actual: st_parseFloat ==='+ st_parseFloat );\n}\n\nif(!(st_isNaN === \"isNaN\")){\n $ERROR('#16: st_isNaN === \"isNaN\". Actual: st_isNaN ==='+ st_isNaN );\n}\n\nif(!(st_isFinite === \"isFinite\")){\n $ERROR('#17: st_isFinite === \"isFinite\". Actual: st_isFinite ==='+ st_isFinite );\n}\n\nif(!(value === undefined)){\n $ERROR('#18: value === undefined. Actual: value ==='+ value );\n}\n\nif(!(myObj.value === \"myObj_value\")){\n $ERROR('#19: myObj.value === \"myObj_value\". Actual: myObj.value ==='+ myObj.value );\n}\n",
+ "id": "S12.10_A1.4_T5",
+ "strict_only": ""
+ },
+ {
+ "section": "12.10",
+ "description": "Using \"with\" statement within \"for-in\" statement, leading to normal completion",
+ "strict_mode_negative": "",
+ "test": "this.p1 = 1;\nthis.p2 = 2;\nthis.p3 = 3;\nvar result = \"result\";\nvar myObj = {p1: 'a', \n p2: 'b', \n p3: 'c',\n value: 'myObj_value',\n valueOf : function(){return 'obj_valueOf';},\n parseInt : function(){return 'obj_parseInt';},\n NaN : 'obj_NaN',\n Infinity : 'obj_Infinity',\n eval : function(){return 'obj_eval';},\n parseFloat : function(){return 'obj_parseFloat';},\n isNaN : function(){return 'obj_isNaN';},\n isFinite : function(){return 'obj_isFinite';}\n}\nvar del;\nvar st_p1 = \"p1\";\nvar st_p2 = \"p2\";\nvar st_p3 = \"p3\";\nvar st_parseInt = \"parseInt\";\nvar st_NaN = \"NaN\";\nvar st_Infinity = \"Infinity\";\nvar st_eval = \"eval\";\nvar st_parseFloat = \"parseFloat\";\nvar st_isNaN = \"isNaN\";\nvar st_isFinite = \"isFinite\";\n\nfor(var prop in myObj){\n with(myObj){\n if(prop === 'p1') {\n st_p1 = p1;\n p1 = 'x1';\n }\n if(prop === 'p2') {\n st_p2 = p2;\n this.p2 = 'x2';\n }\n if(prop === 'p3') {\n st_p3 = p3;\n del = delete p3;\n }\n if(prop === 'parseInt') st_parseInt = parseInt;\n if(prop === 'NaN') st_NaN = NaN;\n if(prop === 'Infinity') st_Infinity = Infinity;\n if(prop === 'eval') st_eval = eval;\n if(prop === 'parseFloat') st_parseFloat = parseFloat;\n if(prop === 'isNaN') st_isNaN = isNaN;\n if(prop === 'isFinite') st_isFinite = isFinite;\n var p4 = 'x4';\n p5 = 'x5';\n var value = 'value';\n }\n}\n\nif(!(p1 === 1)){\n $ERROR('#1: p1 === 1. Actual: p1 ==='+ p1 );\n}\n\nif(!(p2 === \"x2\")){\n $ERROR('#2: p2 === \"x2\". Actual: p2 ==='+ p2 );\n}\n\nif(!(p3 === 3)){\n $ERROR('#3: p3 === 3. Actual: p3 ==='+ p3 );\n}\n\nif(!(p4 === \"x4\")){\n $ERROR('#4: p4 === \"x4\". Actual: p4 ==='+ p4 );\n}\n\nif(!(p5 === \"x5\")){\n $ERROR('#5: p5 === \"x5\". Actual: p5 ==='+ p5 );\n}\n\nif(!(myObj.p1 === \"x1\")){\n $ERROR('#6: myObj.p1 === \"x1\". Actual: myObj.p1 ==='+ myObj.p1 );\n}\n\nif(!(myObj.p2 === \"b\")){\n $ERROR('#7: myObj.p2 === \"b\". Actual: myObj.p2 ==='+ myObj.p2 );\n}\n\nif(!(myObj.p3 === undefined)){\n $ERROR('#8: myObj.p3 === undefined. Actual: myObj.p3 ==='+ myObj.p3 );\n}\n\nif(!(myObj.p4 === undefined)){\n $ERROR('#9: myObj.p4 === undefined. Actual: myObj.p4 ==='+ myObj.p4 );\n}\n\nif(!(myObj.p5 === undefined)){\n $ERROR('#10: myObj.p5 === undefined. Actual: myObj.p5 ==='+ myObj.p5 );\n}\n\nif(!(st_parseInt !== parseInt)){\n $ERROR('#11: myObj.parseInt !== parseInt');\n}\n\nif(!(st_NaN === \"obj_NaN\")){\n $ERROR('#12: myObj.NaN !== NaN');\n}\n\nif(!(st_Infinity !== Infinity)){\n $ERROR('#13: myObj.Infinity !== Infinity');\n}\n\nif(!(st_eval !== eval)){\n $ERROR('#14: myObj.eval !== eval');\n}\n\nif(!(st_parseFloat !== parseFloat)){\n $ERROR('#15: myObj.parseFloat !== parseFloat');\n}\n\nif(!(st_isNaN !== isNaN)){\n $ERROR('#16: myObj.isNaN !== isNaN');\n}\n\nif(!(st_isFinite !== isFinite)){\n $ERROR('#17: myObj.isFinite !== isFinite');\n}\n\nif(!(value === undefined)){\n $ERROR('#18: value === undefined. Actual: value ==='+ value );\n}\n\nif(!(myObj.value === \"value\")){\n $ERROR('#19: myObj.value === \"value\". Actual: myObj.value ==='+ myObj.value );\n}\n",
+ "id": "S12.10_A1.5_T1",
+ "strict_only": ""
+ },
+ {
+ "section": "12.10",
+ "description": "Using \"with\" statement within \"for-in\" statement, leading to completion by exception",
+ "strict_mode_negative": "",
+ "test": "this.p1 = 1;\nthis.p2 = 2;\nthis.p3 = 3;\nvar result = \"result\";\nvar myObj = {p1: 'a', \n p2: 'b', \n p3: 'c',\n value: 'myObj_value',\n valueOf : function(){return 'obj_valueOf';},\n parseInt : function(){return 'obj_parseInt';},\n NaN : 'obj_NaN',\n Infinity : 'obj_Infinity',\n eval : function(){return 'obj_eval';},\n parseFloat : function(){return 'obj_parseFloat';},\n isNaN : function(){return 'obj_isNaN';},\n isFinite : function(){return 'obj_isFinite';}\n}\nvar del;\nvar st_p1 = \"p1\";\nvar st_p2 = \"p2\";\nvar st_p3 = \"p3\";\nvar st_parseInt = \"parseInt\";\nvar st_NaN = \"NaN\";\nvar st_Infinity = \"Infinity\";\nvar st_eval = \"eval\";\nvar st_parseFloat = \"parseFloat\";\nvar st_isNaN = \"isNaN\";\nvar st_isFinite = \"isFinite\";\n\ntry {\n for(var prop in myObj){\n with(myObj){\n st_p1 = p1;\n p1 = 'x1';\n st_p2 = p2;\n this.p2 = 'x2';\n st_p3 = p3;\n del = delete p3;\n st_parseInt = parseInt;\n st_NaN = NaN;\n st_Infinity = Infinity;\n st_eval = eval;\n st_parseFloat = parseFloat;\n st_isNaN = isNaN;\n st_isFinite = isFinite;\n var p4 = 'x4';\n p5 = 'x5';\n var value = 'value';\n throw value;\n }\n }\n} catch(e){\n result = e;\n}\n\nif(!(result === \"value\")){\n $ERROR('#0: result === \"value\". Actual: result ==='+ result );\n}\n\nif(!(p1 === 1)){\n $ERROR('#1: p1 === 1. Actual: p1 ==='+ p1 );\n}\n\nif(!(p2 === \"x2\")){\n $ERROR('#2: p2 === \"x2\". Actual: p2 ==='+ p2 );\n}\n\nif(!(p3 === 3)){\n $ERROR('#3: p3 === 3. Actual: p3 ==='+ p3 );\n}\n\nif(!(p4 === \"x4\")){\n $ERROR('#4: p4 === \"x4\". Actual: p4 ==='+ p4 );\n}\n\nif(!(p5 === \"x5\")){\n $ERROR('#5: p5 === \"x5\". Actual: p5 ==='+ p5 );\n}\n\nif(!(myObj.p1 === \"x1\")){\n $ERROR('#6: myObj.p1 === \"x1\". Actual: myObj.p1 ==='+ myObj.p1 );\n}\n\nif(!(myObj.p2 === \"b\")){\n $ERROR('#7: myObj.p2 === \"b\". Actual: myObj.p2 ==='+ myObj.p2 );\n}\n\nif(!(myObj.p3 === undefined)){\n $ERROR('#8: myObj.p3 === undefined. Actual: myObj.p3 ==='+ myObj.p3 );\n}\n\nif(!(myObj.p4 === undefined)){\n $ERROR('#9: myObj.p4 === undefined. Actual: myObj.p4 ==='+ myObj.p4 );\n}\n\nif(!(myObj.p5 === undefined)){\n $ERROR('#10: myObj.p5 === undefined. Actual: myObj.p5 ==='+ myObj.p5 );\n}\n\nif(!(st_parseInt !== parseInt)){\n $ERROR('#11: myObj.parseInt !== parseInt');\n}\n\nif(!(st_NaN === \"obj_NaN\")){\n $ERROR('#12: myObj.NaN !== NaN');\n}\n\nif(!(st_Infinity !== Infinity)){\n $ERROR('#13: myObj.Infinity !== Infinity');\n}\n\nif(!(st_eval !== eval)){\n $ERROR('#14: myObj.eval !== eval');\n}\n\nif(!(st_parseFloat !== parseFloat)){\n $ERROR('#15: myObj.parseFloat !== parseFloat');\n}\n\nif(!(st_isNaN !== isNaN)){\n $ERROR('#16: myObj.isNaN !== isNaN');\n}\n\nif(!(st_isFinite !== isFinite)){\n $ERROR('#17: myObj.isFinite !== isFinite');\n}\n\nif(!(value === undefined)){\n $ERROR('#18: value === undefined. Actual: value ==='+ value );\n}\n\nif(!(myObj.value === \"value\")){\n $ERROR('#19: myObj.value === \"value\". Actual: myObj.value ==='+ myObj.value );\n}\n",
+ "id": "S12.10_A1.5_T2",
+ "strict_only": ""
+ },
+ {
+ "section": "12.10",
+ "description": "Using \"with\" statement within \"for-in\" statement, leading to completion by exception",
+ "strict_mode_negative": "",
+ "test": "this.p1 = 1;\nthis.p2 = 2;\nthis.p3 = 3;\nvar result = \"result\";\nvar myObj = {p1: 'a', \n p2: 'b', \n p3: 'c',\n value: 'myObj_value',\n valueOf : function(){return 'obj_valueOf';},\n parseInt : function(){return 'obj_parseInt';},\n NaN : 'obj_NaN',\n Infinity : 'obj_Infinity',\n eval : function(){return 'obj_eval';},\n parseFloat : function(){return 'obj_parseFloat';},\n isNaN : function(){return 'obj_isNaN';},\n isFinite : function(){return 'obj_isFinite';}\n}\nvar del;\nvar st_p1 = \"p1\";\nvar st_p2 = \"p2\";\nvar st_p3 = \"p3\";\nvar st_parseInt = \"parseInt\";\nvar st_NaN = \"NaN\";\nvar st_Infinity = \"Infinity\";\nvar st_eval = \"eval\";\nvar st_parseFloat = \"parseFloat\";\nvar st_isNaN = \"isNaN\";\nvar st_isFinite = \"isFinite\";\n\ntry {\n for(var prop in myObj){\n with(myObj){\n throw value;\n if(prop === 'p1') {\n st_p1 = p1;\n p1 = 'x1';\n }\n if(prop === 'p2') {\n st_p2 = p2;\n this.p2 = 'x2';\n }\n if(prop === 'p3') {\n st_p3 = p3;\n del = delete p3;\n }\n if(prop === 'parseInt') st_parseInt = parseInt;\n if(prop === 'NaN') st_NaN = NaN;\n if(prop === 'Infinity') st_Infinity = Infinity;\n if(prop === 'eval') st_eval = eval;\n if(prop === 'parseFloat') st_parseFloat = parseFloat;\n if(prop === 'isNaN') st_isNaN = isNaN;\n if(prop === 'isFinite') st_isFinite = isFinite;\n var p4 = 'x4';\n p5 = 'x5';\n var value = 'value';\n }\n }\n} catch(e){\n result = e;\n}\n\nif(!(result === \"myObj_value\")){\n $ERROR('#0: result === \"myObj_value\". Actual: result ==='+ result );\n}\n\nif(!(p1 === 1)){\n $ERROR('#1: p1 === 1. Actual: p1 ==='+ p1 );\n}\n\nif(!(p2 === 2)){\n $ERROR('#2: p2 === 2. Actual: p2 ==='+ p2 );\n}\n\nif(!(p3 === 3)){\n $ERROR('#3: p3 === 3. Actual: p3 ==='+ p3 );\n}\n\nif(!(p4 === undefined)){\n $ERROR('#4: p4 === undefined. Actual: p4 ==='+ p4 );\n}\n\ntry {\n p5;\n $ERROR('#5: p5 is not defined');\n} catch(e) { \n}\n\nif(!(myObj.p1 === \"a\")){\n $ERROR('#6: myObj.p1 === \"a\". Actual: myObj.p1 ==='+ myObj.p1 );\n}\n\nif(!(myObj.p2 === \"b\")){\n $ERROR('#7: myObj.p2 === \"b\". Actual: myObj.p2 ==='+ myObj.p2 );\n}\n\nif(!(myObj.p3 === \"c\")){\n $ERROR('#8: myObj.p3 === \"c\". Actual: myObj.p3 ==='+ myObj.p3 );\n}\n\nif(!(myObj.p4 === undefined)){\n $ERROR('#9: myObj.p4 === undefined. Actual: myObj.p4 ==='+ myObj.p4 );\n}\n\nif(!(myObj.p5 === undefined)){\n $ERROR('#10: myObj.p5 === undefined. Actual: myObj.p5 ==='+ myObj.p5 );\n}\n\nif(!(st_parseInt === \"parseInt\")){\n $ERROR('#11: myObj.parseInt === \"parseInt\". Actual: myObj.parseInt ==='+ myObj.parseInt );\n}\n\nif(!(st_NaN === \"NaN\")){\n $ERROR('#12: st_NaN === \"NaN\". Actual: st_NaN ==='+ st_NaN );\n}\n\nif(!(st_Infinity === \"Infinity\")){\n $ERROR('#13: st_Infinity === \"Infinity\". Actual: st_Infinity ==='+ st_Infinity );\n}\n\nif(!(st_eval === \"eval\")){\n $ERROR('#14: st_eval === \"eval\". Actual: st_eval ==='+ st_eval );\n}\n\nif(!(st_parseFloat === \"parseFloat\")){\n $ERROR('#15: st_parseFloat === \"parseFloat\". Actual: st_parseFloat ==='+ st_parseFloat );\n}\n\nif(!(st_isNaN === \"isNaN\")){\n $ERROR('#16: st_isNaN === \"isNaN\". Actual: st_isNaN ==='+ st_isNaN );\n}\n\nif(!(st_isFinite === \"isFinite\")){\n $ERROR('#17: st_isFinite === \"isFinite\". Actual: st_isFinite ==='+ st_isFinite );\n}\n\nif(!(value === undefined)){\n $ERROR('#18: value === undefined. Actual: value ==='+ value );\n}\n\nif(!(myObj.value === \"myObj_value\")){\n $ERROR('#19: myObj.value === \"myObj_value\". Actual: myObj.value ==='+ myObj.value );\n}\n",
+ "id": "S12.10_A1.5_T3",
+ "strict_only": ""
+ },
+ {
+ "section": "12.10",
+ "description": "Using \"with\" statement within \"for-in\" statement, leading to completion by break",
+ "strict_mode_negative": "",
+ "test": "this.p1 = 1;\nthis.p2 = 2;\nthis.p3 = 3;\nvar result = \"result\";\nvar myObj = {p1: 'a', \n p2: 'b', \n p3: 'c',\n value: 'myObj_value',\n valueOf : function(){return 'obj_valueOf';},\n parseInt : function(){return 'obj_parseInt';},\n NaN : 'obj_NaN',\n Infinity : 'obj_Infinity',\n eval : function(){return 'obj_eval';},\n parseFloat : function(){return 'obj_parseFloat';},\n isNaN : function(){return 'obj_isNaN';},\n isFinite : function(){return 'obj_isFinite';}\n}\nvar del;\nvar st_p1 = \"p1\";\nvar st_p2 = \"p2\";\nvar st_p3 = \"p3\";\nvar st_parseInt = \"parseInt\";\nvar st_NaN = \"NaN\";\nvar st_Infinity = \"Infinity\";\nvar st_eval = \"eval\";\nvar st_parseFloat = \"parseFloat\";\nvar st_isNaN = \"isNaN\";\nvar st_isFinite = \"isFinite\";\n\nfor(var prop in myObj){\n with(myObj){\n st_p1 = p1;\n p1 = 'x1';\n st_p2 = p2;\n this.p2 = 'x2';\n st_p3 = p3;\n del = delete p3;\n st_parseInt = parseInt;\n st_NaN = NaN;\n st_Infinity = Infinity;\n st_eval = eval;\n st_parseFloat = parseFloat;\n st_isNaN = isNaN;\n st_isFinite = isFinite;\n var p4 = 'x4';\n p5 = 'x5';\n var value = 'value';\n break;\n }\n}\n\nif(!(p1 === 1)){\n $ERROR('#1: p1 === 1. Actual: p1 ==='+ p1 );\n}\n\nif(!(p2 === \"x2\")){\n $ERROR('#2: p2 === \"x2\". Actual: p2 ==='+ p2 );\n}\n\nif(!(p3 === 3)){\n $ERROR('#3: p3 === 3. Actual: p3 ==='+ p3 );\n}\n\nif(!(p4 === \"x4\")){\n $ERROR('#4: p4 === \"x4\". Actual: p4 ==='+ p4 );\n}\n\nif(!(p5 === \"x5\")){\n $ERROR('#5: p5 === \"x5\". Actual: p5 ==='+ p5 );\n}\n\nif(!(myObj.p1 === \"x1\")){\n $ERROR('#6: myObj.p1 === \"x1\". Actual: myObj.p1 ==='+ myObj.p1 );\n}\n\nif(!(myObj.p2 === \"b\")){\n $ERROR('#7: myObj.p2 === \"b\". Actual: myObj.p2 ==='+ myObj.p2 );\n}\n\nif(!(myObj.p3 === undefined)){\n $ERROR('#8: myObj.p3 === undefined. Actual: myObj.p3 ==='+ myObj.p3 );\n}\n\nif(!(myObj.p4 === undefined)){\n $ERROR('#9: myObj.p4 === undefined. Actual: myObj.p4 ==='+ myObj.p4 );\n}\n\nif(!(myObj.p5 === undefined)){\n $ERROR('#10: myObj.p5 === undefined. Actual: myObj.p5 ==='+ myObj.p5 );\n}\n\nif(!(st_parseInt !== parseInt)){\n $ERROR('#11: myObj.parseInt !== parseInt');\n}\n\nif(!(st_NaN === \"obj_NaN\")){\n $ERROR('#12: myObj.NaN !== NaN');\n}\n\nif(!(st_Infinity !== Infinity)){\n $ERROR('#13: myObj.Infinity !== Infinity');\n}\n\nif(!(st_eval !== eval)){\n $ERROR('#14: myObj.eval !== eval');\n}\n\nif(!(st_parseFloat !== parseFloat)){\n $ERROR('#15: myObj.parseFloat !== parseFloat');\n}\n\nif(!(st_isNaN !== isNaN)){\n $ERROR('#16: myObj.isNaN !== isNaN');\n}\n\nif(!(st_isFinite !== isFinite)){\n $ERROR('#17: myObj.isFinite !== isFinite');\n}\n\nif(!(value === undefined)){\n $ERROR('#18: value === undefined. Actual: value ==='+ value );\n}\n\nif(!(myObj.value === \"value\")){\n $ERROR('#19: myObj.value === \"value\". Actual: myObj.value ==='+ myObj.value );\n}\n",
+ "id": "S12.10_A1.5_T4",
+ "strict_only": ""
+ },
+ {
+ "section": "12.10",
+ "description": "Using \"with\" statement within \"for-in\" statement, leading to completion by break",
+ "strict_mode_negative": "",
+ "test": "this.p1 = 1;\nthis.p2 = 2;\nthis.p3 = 3;\nvar result = \"result\";\nvar myObj = {p1: 'a', \n p2: 'b', \n p3: 'c',\n value: 'myObj_value',\n valueOf : function(){return 'obj_valueOf';},\n parseInt : function(){return 'obj_parseInt';},\n NaN : 'obj_NaN',\n Infinity : 'obj_Infinity',\n eval : function(){return 'obj_eval';},\n parseFloat : function(){return 'obj_parseFloat';},\n isNaN : function(){return 'obj_isNaN';},\n isFinite : function(){return 'obj_isFinite';}\n}\nvar del;\nvar st_p1 = \"p1\";\nvar st_p2 = \"p2\";\nvar st_p3 = \"p3\";\nvar st_parseInt = \"parseInt\";\nvar st_NaN = \"NaN\";\nvar st_Infinity = \"Infinity\";\nvar st_eval = \"eval\";\nvar st_parseFloat = \"parseFloat\";\nvar st_isNaN = \"isNaN\";\nvar st_isFinite = \"isFinite\";\n\nfor(var prop in myObj){\n with(myObj){\n break;\n if(prop === 'p1') {\n st_p1 = p1;\n p1 = 'x1';\n }\n if(prop === 'p2') {\n st_p2 = p2;\n this.p2 = 'x2';\n }\n if(prop === 'p3') {\n st_p3 = p3;\n del = delete p3;\n }\n if(prop === 'parseInt') st_parseInt = parseInt;\n if(prop === 'NaN') st_NaN = NaN;\n if(prop === 'Infinity') st_Infinity = Infinity;\n if(prop === 'eval') st_eval = eval;\n if(prop === 'parseFloat') st_parseFloat = parseFloat;\n if(prop === 'isNaN') st_isNaN = isNaN;\n if(prop === 'isFinite') st_isFinite = isFinite;\n var p4 = 'x4';\n p5 = 'x5';\n var value = 'value';\n }\n}\n\nif(!(p1 === 1)){\n $ERROR('#1: p1 === 1. Actual: p1 ==='+ p1 );\n}\n\nif(!(p2 === 2)){\n $ERROR('#2: p2 === 2. Actual: p2 ==='+ p2 );\n}\n\nif(!(p3 === 3)){\n $ERROR('#3: p3 === 3. Actual: p3 ==='+ p3 );\n}\n\nif(!(p4 === undefined)){\n $ERROR('#4: p4 === undefined. Actual: p4 ==='+ p4 );\n}\n\ntry {\n p5;\n $ERROR('#5: p5 is not defined');\n} catch(e) { \n}\n\nif(!(myObj.p1 === \"a\")){\n $ERROR('#6: myObj.p1 === \"a\". Actual: myObj.p1 ==='+ myObj.p1 );\n}\n\nif(!(myObj.p2 === \"b\")){\n $ERROR('#7: myObj.p2 === \"b\". Actual: myObj.p2 ==='+ myObj.p2 );\n}\n\nif(!(myObj.p3 === \"c\")){\n $ERROR('#8: myObj.p3 === \"c\". Actual: myObj.p3 ==='+ myObj.p3 );\n}\n\nif(!(myObj.p4 === undefined)){\n $ERROR('#9: myObj.p4 === undefined. Actual: myObj.p4 ==='+ myObj.p4 );\n}\n\nif(!(myObj.p5 === undefined)){\n $ERROR('#10: myObj.p5 === undefined. Actual: myObj.p5 ==='+ myObj.p5 );\n}\n\nif(!(st_parseInt === \"parseInt\")){\n $ERROR('#11: myObj.parseInt === \"parseInt\". Actual: myObj.parseInt ==='+ myObj.parseInt );\n}\n\nif(!(st_NaN === \"NaN\")){\n $ERROR('#12: st_NaN === \"NaN\". Actual: st_NaN ==='+ st_NaN );\n}\n\nif(!(st_Infinity === \"Infinity\")){\n $ERROR('#13: st_Infinity === \"Infinity\". Actual: st_Infinity ==='+ st_Infinity );\n}\n\nif(!(st_eval === \"eval\")){\n $ERROR('#14: st_eval === \"eval\". Actual: st_eval ==='+ st_eval );\n}\n\nif(!(st_parseFloat === \"parseFloat\")){\n $ERROR('#15: st_parseFloat === \"parseFloat\". Actual: st_parseFloat ==='+ st_parseFloat );\n}\n\nif(!(st_isNaN === \"isNaN\")){\n $ERROR('#16: st_isNaN === \"isNaN\". Actual: st_isNaN ==='+ st_isNaN );\n}\n\nif(!(st_isFinite === \"isFinite\")){\n $ERROR('#17: st_isFinite === \"isFinite\". Actual: st_isFinite ==='+ st_isFinite );\n}\n\nif(!(value === undefined)){\n $ERROR('#18: value === undefined. Actual: value ==='+ value );\n}\n\nif(!(myObj.value === \"myObj_value\")){\n $ERROR('#19: myObj.value === \"myObj_value\". Actual: myObj.value ==='+ myObj.value );\n}\n",
+ "id": "S12.10_A1.5_T5",
+ "strict_only": ""
+ },
+ {
+ "section": "12.10",
+ "description": "Using \"with\" statement within another \"with\" statement, leading to normal completion",
+ "strict_mode_negative": "",
+ "test": "this.p1 = 1;\nthis.p2 = 2;\nthis.p3 = 3;\nvar result = \"result\";\nvar myObj = {p1: 'a', \n p2: 'b', \n p3: 'c',\n value: 'myObj_value',\n valueOf : function(){return 'obj_valueOf';},\n parseInt : function(){return 'obj_parseInt';},\n NaN : 'obj_NaN',\n Infinity : 'obj_Infinity',\n eval : function(){return 'obj_eval';},\n parseFloat : function(){return 'obj_parseFloat';},\n isNaN : function(){return 'obj_isNaN';},\n isFinite : function(){return 'obj_isFinite';}\n}\nvar del;\nvar st_p1 = \"p1\";\nvar st_p2 = \"p2\";\nvar st_p3 = \"p3\";\nvar st_parseInt = \"parseInt\";\nvar st_NaN = \"NaN\";\nvar st_Infinity = \"Infinity\";\nvar st_eval = \"eval\";\nvar st_parseFloat = \"parseFloat\";\nvar st_isNaN = \"isNaN\";\nvar st_isFinite = \"isFinite\";\n\nwith(myObj){\n with(myObj){\n st_p1 = p1;\n st_p2 = p2;\n st_p3 = p3;\n st_parseInt = parseInt;\n st_NaN = NaN;\n st_Infinity = Infinity;\n st_eval = eval;\n st_parseFloat = parseFloat;\n st_isNaN = isNaN;\n st_isFinite = isFinite;\n p1 = 'x1';\n this.p2 = 'x2';\n del = delete p3;\n var p4 = 'x4';\n p5 = 'x5';\n var value = 'value';\n }\n}\n\nif(!(p1 === 1)){\n $ERROR('#1: p1 === 1. Actual: p1 ==='+ p1 );\n}\n\nif(!(p2 === \"x2\")){\n $ERROR('#2: p2 === \"x2\". Actual: p2 ==='+ p2 );\n}\n\nif(!(p3 === 3)){\n $ERROR('#3: p3 === 3. Actual: p3 ==='+ p3 );\n}\n\nif(!(p4 === \"x4\")){\n $ERROR('#4: p4 === \"x4\". Actual: p4 ==='+ p4 );\n}\n\nif(!(p5 === \"x5\")){\n $ERROR('#5: p5 === \"x5\". Actual: p5 ==='+ p5 );\n}\n\nif(!(myObj.p1 === \"x1\")){\n $ERROR('#6: myObj.p1 === \"x1\". Actual: myObj.p1 ==='+ myObj.p1 );\n}\n\nif(!(myObj.p2 === \"b\")){\n $ERROR('#7: myObj.p2 === \"b\". Actual: myObj.p2 ==='+ myObj.p2 );\n}\n\nif(!(myObj.p3 === undefined)){\n $ERROR('#8: myObj.p3 === undefined. Actual: myObj.p3 ==='+ myObj.p3 );\n}\n\nif(!(myObj.p4 === undefined)){\n $ERROR('#9: myObj.p4 === undefined. Actual: myObj.p4 ==='+ myObj.p4 );\n}\n\nif(!(myObj.p5 === undefined)){\n $ERROR('#10: myObj.p5 === undefined. Actual: myObj.p5 ==='+ myObj.p5 );\n}\n\nif(!(st_parseInt !== parseInt)){\n $ERROR('#11: myObj.parseInt !== parseInt');\n}\n\nif(!(st_NaN === \"obj_NaN\")){\n $ERROR('#12: myObj.NaN !== NaN');\n}\n\nif(!(st_Infinity !== Infinity)){\n $ERROR('#13: myObj.Infinity !== Infinity');\n}\n\nif(!(st_eval !== eval)){\n $ERROR('#14: myObj.eval !== eval');\n}\n\nif(!(st_parseFloat !== parseFloat)){\n $ERROR('#15: myObj.parseFloat !== parseFloat');\n}\n\nif(!(st_isNaN !== isNaN)){\n $ERROR('#16: myObj.isNaN !== isNaN');\n}\n\nif(!(st_isFinite !== isFinite)){\n $ERROR('#17: myObj.isFinite !== isFinite');\n}\n\nif(!(value === undefined)){\n $ERROR('#18: value === undefined. Actual: value ==='+ value );\n}\n\nif(!(myObj.value === \"value\")){\n $ERROR('#19: myObj.value === \"value\". Actual: myObj.value ==='+ myObj.value );\n}\n",
+ "id": "S12.10_A1.6_T1",
+ "strict_only": ""
+ },
+ {
+ "section": "12.10",
+ "description": "Using \"with\" statement within another \"with\" statement, leading to completion by exception",
+ "strict_mode_negative": "",
+ "test": "this.p1 = 1;\nthis.p2 = 2;\nthis.p3 = 3;\nvar result = \"result\";\nvar myObj = {p1: 'a', \n p2: 'b', \n p3: 'c',\n value: 'myObj_value',\n valueOf : function(){return 'obj_valueOf';},\n parseInt : function(){return 'obj_parseInt';},\n NaN : 'obj_NaN',\n Infinity : 'obj_Infinity',\n eval : function(){return 'obj_eval';},\n parseFloat : function(){return 'obj_parseFloat';},\n isNaN : function(){return 'obj_isNaN';},\n isFinite : function(){return 'obj_isFinite';}\n}\nvar del;\nvar st_p1 = \"p1\";\nvar st_p2 = \"p2\";\nvar st_p3 = \"p3\";\nvar st_parseInt = \"parseInt\";\nvar st_NaN = \"NaN\";\nvar st_Infinity = \"Infinity\";\nvar st_eval = \"eval\";\nvar st_parseFloat = \"parseFloat\";\nvar st_isNaN = \"isNaN\";\nvar st_isFinite = \"isFinite\";\n\ntry {\n with(myObj){\n with(myObj){\n st_p1 = p1;\n st_p2 = p2;\n st_p3 = p3;\n st_parseInt = parseInt;\n st_NaN = NaN;\n st_Infinity = Infinity;\n st_eval = eval;\n st_parseFloat = parseFloat;\n st_isNaN = isNaN;\n st_isFinite = isFinite;\n p1 = 'x1';\n this.p2 = 'x2';\n del = delete p3;\n var p4 = 'x4';\n p5 = 'x5';\n var value = 'value';\n throw value;\n }\n }\n} catch(e){\n result = e;\n}\n\nif(!(result === \"value\")){\n $ERROR('#0: result === \"value\". Actual: result ==='+ result );\n}\n\nif(!(p1 === 1)){\n $ERROR('#1: p1 === 1. Actual: p1 ==='+ p1 );\n}\n\nif(!(p2 === \"x2\")){\n $ERROR('#2: p2 === \"x2\". Actual: p2 ==='+ p2 );\n}\n\nif(!(p3 === 3)){\n $ERROR('#3: p3 === 3. Actual: p3 ==='+ p3 );\n}\n\nif(!(p4 === \"x4\")){\n $ERROR('#4: p4 === \"x4\". Actual: p4 ==='+ p4 );\n}\n\nif(!(p5 === \"x5\")){\n $ERROR('#5: p5 === \"x5\". Actual: p5 ==='+ p5 );\n}\n\nif(!(myObj.p1 === \"x1\")){\n $ERROR('#6: myObj.p1 === \"x1\". Actual: myObj.p1 ==='+ myObj.p1 );\n}\n\nif(!(myObj.p2 === \"b\")){\n $ERROR('#7: myObj.p2 === \"b\". Actual: myObj.p2 ==='+ myObj.p2 );\n}\n\nif(!(myObj.p3 === undefined)){\n $ERROR('#8: myObj.p3 === undefined. Actual: myObj.p3 ==='+ myObj.p3 );\n}\n\nif(!(myObj.p4 === undefined)){\n $ERROR('#9: myObj.p4 === undefined. Actual: myObj.p4 ==='+ myObj.p4 );\n}\n\nif(!(myObj.p5 === undefined)){\n $ERROR('#10: myObj.p5 === undefined. Actual: myObj.p5 ==='+ myObj.p5 );\n}\n\nif(!(st_parseInt !== parseInt)){\n $ERROR('#11: myObj.parseInt !== parseInt');\n}\n\nif(!(st_NaN === \"obj_NaN\")){\n $ERROR('#12: myObj.NaN !== NaN');\n}\n\nif(!(st_Infinity !== Infinity)){\n $ERROR('#13: myObj.Infinity !== Infinity');\n}\n\nif(!(st_eval !== eval)){\n $ERROR('#14: myObj.eval !== eval');\n}\n\nif(!(st_parseFloat !== parseFloat)){\n $ERROR('#15: myObj.parseFloat !== parseFloat');\n}\n\nif(!(st_isNaN !== isNaN)){\n $ERROR('#16: myObj.isNaN !== isNaN');\n}\n\nif(!(st_isFinite !== isFinite)){\n $ERROR('#17: myObj.isFinite !== isFinite');\n}\n\nif(!(value === undefined)){\n $ERROR('#18: value === undefined. Actual: value ==='+ value );\n}\n\nif(!(myObj.value === \"value\")){\n $ERROR('#19: myObj.value === \"value\". Actual: myObj.value ==='+ myObj.value );\n}\n",
+ "id": "S12.10_A1.6_T2",
+ "strict_only": ""
+ },
+ {
+ "section": "12.10",
+ "description": "Using \"with\" statement within another \"with\" statement, leading to completion by exception",
+ "strict_mode_negative": "",
+ "test": "this.p1 = 1;\nthis.p2 = 2;\nthis.p3 = 3;\nvar result = \"result\";\nvar myObj = {p1: 'a', \n p2: 'b', \n p3: 'c',\n value: 'myObj_value',\n valueOf : function(){return 'obj_valueOf';},\n parseInt : function(){return 'obj_parseInt';},\n NaN : 'obj_NaN',\n Infinity : 'obj_Infinity',\n eval : function(){return 'obj_eval';},\n parseFloat : function(){return 'obj_parseFloat';},\n isNaN : function(){return 'obj_isNaN';},\n isFinite : function(){return 'obj_isFinite';}\n}\nvar del;\nvar st_p1 = \"p1\";\nvar st_p2 = \"p2\";\nvar st_p3 = \"p3\";\nvar st_parseInt = \"parseInt\";\nvar st_NaN = \"NaN\";\nvar st_Infinity = \"Infinity\";\nvar st_eval = \"eval\";\nvar st_parseFloat = \"parseFloat\";\nvar st_isNaN = \"isNaN\";\nvar st_isFinite = \"isFinite\";\n\ntry {\n with(myObj){\n with(myObj){\n throw value;\n st_p1 = p1;\n st_p2 = p2;\n st_p3 = p3;\n st_parseInt = parseInt;\n st_NaN = NaN;\n st_Infinity = Infinity;\n st_eval = eval;\n st_parseFloat = parseFloat;\n st_isNaN = isNaN;\n st_isFinite = isFinite;\n p1 = 'x1';\n this.p2 = 'x2';\n del = delete p3;\n var p4 = 'x4';\n p5 = 'x5';\n var value = 'value';\n }\n }\n} catch(e){\n result = e;\n}\n\nif(!(result === \"myObj_value\")){\n $ERROR('#0: result === \"myObj_value\". Actual: result ==='+ result );\n}\n\nif(!(p1 === 1)){\n $ERROR('#1: p1 === 1. Actual: p1 ==='+ p1 );\n}\n\nif(!(p2 === 2)){\n $ERROR('#2: p2 === 2. Actual: p2 ==='+ p2 );\n}\n\nif(!(p3 === 3)){\n $ERROR('#3: p3 === 3. Actual: p3 ==='+ p3 );\n}\n\nif(!(p4 === undefined)){\n $ERROR('#4: p4 === undefined. Actual: p4 ==='+ p4 );\n}\n\ntry {\n p5;\n $ERROR('#5: p5 is not defined');\n} catch(e) { \n}\n\nif(!(myObj.p1 === \"a\")){\n $ERROR('#6: myObj.p1 === \"a\". Actual: myObj.p1 ==='+ myObj.p1 );\n}\n\nif(!(myObj.p2 === \"b\")){\n $ERROR('#7: myObj.p2 === \"b\". Actual: myObj.p2 ==='+ myObj.p2 );\n}\n\nif(!(myObj.p3 === \"c\")){\n $ERROR('#8: myObj.p3 === \"c\". Actual: myObj.p3 ==='+ myObj.p3 );\n}\n\nif(!(myObj.p4 === undefined)){\n $ERROR('#9: myObj.p4 === undefined. Actual: myObj.p4 ==='+ myObj.p4 );\n}\n\nif(!(myObj.p5 === undefined)){\n $ERROR('#10: myObj.p5 === undefined. Actual: myObj.p5 ==='+ myObj.p5 );\n}\n\nif(!(st_parseInt === \"parseInt\")){\n $ERROR('#11: myObj.parseInt === \"parseInt\". Actual: myObj.parseInt ==='+ myObj.parseInt );\n}\n\nif(!(st_NaN === \"NaN\")){\n $ERROR('#12: st_NaN === \"NaN\". Actual: st_NaN ==='+ st_NaN );\n}\n\nif(!(st_Infinity === \"Infinity\")){\n $ERROR('#13: st_Infinity === \"Infinity\". Actual: st_Infinity ==='+ st_Infinity );\n}\n\nif(!(st_eval === \"eval\")){\n $ERROR('#14: st_eval === \"eval\". Actual: st_eval ==='+ st_eval );\n}\n\nif(!(st_parseFloat === \"parseFloat\")){\n $ERROR('#15: st_parseFloat === \"parseFloat\". Actual: st_parseFloat ==='+ st_parseFloat );\n}\n\nif(!(st_isNaN === \"isNaN\")){\n $ERROR('#16: st_isNaN === \"isNaN\". Actual: st_isNaN ==='+ st_isNaN );\n}\n\nif(!(st_isFinite === \"isFinite\")){\n $ERROR('#17: st_isFinite === \"isFinite\". Actual: st_isFinite ==='+ st_isFinite );\n}\n\nif(!(value === undefined)){\n $ERROR('#18: value === undefined. Actual: value ==='+ value );\n}\n\nif(!(myObj.value === \"myObj_value\")){\n $ERROR('#19: myObj.value === \"myObj_value\". Actual: myObj.value ==='+ myObj.value );\n}\n",
+ "id": "S12.10_A1.6_T3",
+ "strict_only": ""
+ },
+ {
+ "section": "12.10",
+ "description": "Calling a function within \"with\" statement declared within the statement, leading to normal completion",
+ "strict_mode_negative": "",
+ "test": "this.p1 = 1;\nthis.p2 = 2;\nthis.p3 = 3;\nvar result = \"result\";\nvar myObj = {p1: 'a', \n p2: 'b', \n p3: 'c',\n value: 'myObj_value',\n valueOf : function(){return 'obj_valueOf';},\n parseInt : function(){return 'obj_parseInt';},\n NaN : 'obj_NaN',\n Infinity : 'obj_Infinity',\n eval : function(){return 'obj_eval';},\n parseFloat : function(){return 'obj_parseFloat';},\n isNaN : function(){return 'obj_isNaN';},\n isFinite : function(){return 'obj_isFinite';}\n}\nvar del;\nvar st_p1 = \"p1\";\nvar st_p2 = \"p2\";\nvar st_p3 = \"p3\";\nvar st_parseInt = \"parseInt\";\nvar st_NaN = \"NaN\";\nvar st_Infinity = \"Infinity\";\nvar st_eval = \"eval\";\nvar st_parseFloat = \"parseFloat\";\nvar st_isNaN = \"isNaN\";\nvar st_isFinite = \"isFinite\";\n\nwith(myObj){\n var f = function(){\n st_p1 = p1;\n st_p2 = p2;\n st_p3 = p3;\n st_parseInt = parseInt;\n st_NaN = NaN;\n st_Infinity = Infinity;\n st_eval = eval;\n st_parseFloat = parseFloat;\n st_isNaN = isNaN;\n st_isFinite = isFinite;\n p1 = 'x1';\n this.p2 = 'x2';\n del = delete p3;\n var p4 = 'x4';\n p5 = 'x5';\n var value = 'value';\n }\n f();\n}\n\nif(!(p1 === 1)){\n $ERROR('#1: p1 === 1. Actual: p1 ==='+ p1 );\n}\n\nif(!(p2 === \"x2\")){\n $ERROR('#2: p2 === \"x2\". Actual: p2 ==='+ p2 );\n}\n\nif(!(p3 === 3)){\n $ERROR('#3: p3 === 3. Actual: p3 ==='+ p3 );\n}\n\ntry {\n p4;\n $ERROR('#4: p4 is not defined');\n} catch(e) { \n}\n\nif(!(p5 === \"x5\")){\n $ERROR('#5: p5 === \"x5\". Actual: p5 ==='+ p5 );\n}\n\nif(!(myObj.p1 === \"x1\")){\n $ERROR('#6: myObj.p1 === \"x1\". Actual: myObj.p1 ==='+ myObj.p1 );\n}\n\nif(!(myObj.p2 === \"b\")){\n $ERROR('#7: myObj.p2 === \"b\". Actual: myObj.p2 ==='+ myObj.p2 );\n}\n\nif(!(myObj.p3 === undefined)){\n $ERROR('#8: myObj.p3 === undefined. Actual: myObj.p3 ==='+ myObj.p3 );\n}\n\nif(!(myObj.p4 === undefined)){\n $ERROR('#9: myObj.p4 === undefined. Actual: myObj.p4 ==='+ myObj.p4 );\n}\n\nif(!(myObj.p5 === undefined)){\n $ERROR('#10: myObj.p5 === undefined. Actual: myObj.p5 ==='+ myObj.p5 );\n}\n\nif(!(st_parseInt !== parseInt)){\n $ERROR('#11: myObj.parseInt !== parseInt');\n}\n\nif(!(st_NaN === \"obj_NaN\")){\n $ERROR('#12: myObj.NaN !== NaN');\n}\n\nif(!(st_Infinity !== Infinity)){\n $ERROR('#13: myObj.Infinity !== Infinity');\n}\n\nif(!(st_eval !== eval)){\n $ERROR('#14: myObj.eval !== eval');\n}\n\nif(!(st_parseFloat !== parseFloat)){\n $ERROR('#15: myObj.parseFloat !== parseFloat');\n}\n\nif(!(st_isNaN !== isNaN)){\n $ERROR('#16: myObj.isNaN !== isNaN');\n}\n\nif(!(st_isFinite !== isFinite)){\n $ERROR('#17: myObj.isFinite !== isFinite');\n}\n\ntry{\n value;\n $ERROR('#18: value is not defined');\n}\ncatch(e){\n}\n\nif(!(myObj.value === \"myObj_value\")){\n $ERROR('#19: myObj.value === \"myObj_value\". Actual: myObj.value ==='+ myObj.value );\n}\n",
+ "id": "S12.10_A1.7_T1",
+ "strict_only": ""
+ },
+ {
+ "section": "12.10",
+ "description": "Calling a function within \"with\" statement declared within the statement, leading to normal completion by \"return\"",
+ "strict_mode_negative": "",
+ "test": "this.p1 = 1;\nthis.p2 = 2;\nthis.p3 = 3;\nvar result = \"result\";\nvar myObj = {p1: 'a', \n p2: 'b', \n p3: 'c',\n value: 'myObj_value',\n valueOf : function(){return 'obj_valueOf';},\n parseInt : function(){return 'obj_parseInt';},\n NaN : 'obj_NaN',\n Infinity : 'obj_Infinity',\n eval : function(){return 'obj_eval';},\n parseFloat : function(){return 'obj_parseFloat';},\n isNaN : function(){return 'obj_isNaN';},\n isFinite : function(){return 'obj_isFinite';}\n}\nvar del;\nvar st_p1 = \"p1\";\nvar st_p2 = \"p2\";\nvar st_p3 = \"p3\";\nvar st_parseInt = \"parseInt\";\nvar st_NaN = \"NaN\";\nvar st_Infinity = \"Infinity\";\nvar st_eval = \"eval\";\nvar st_parseFloat = \"parseFloat\";\nvar st_isNaN = \"isNaN\";\nvar st_isFinite = \"isFinite\";\n\nwith(myObj){\n var f = function(){\n st_p1 = p1;\n st_p2 = p2;\n st_p3 = p3;\n st_parseInt = parseInt;\n st_NaN = NaN;\n st_Infinity = Infinity;\n st_eval = eval;\n st_parseFloat = parseFloat;\n st_isNaN = isNaN;\n st_isFinite = isFinite;\n p1 = 'x1';\n this.p2 = 'x2';\n del = delete p3;\n var p4 = 'x4';\n p5 = 'x5';\n var value = 'value';\n return value;\n }\n result = f();\n}\n\nif(!(result === \"value\")){\n $ERROR('#0: result === \"value\". Actual: result ==='+ result );\n}\n\nif(!(p1 === 1)){\n $ERROR('#1: p1 === 1. Actual: p1 ==='+ p1 );\n}\n\nif(!(p2 === \"x2\")){\n $ERROR('#2: p2 === \"x2\". Actual: p2 ==='+ p2 );\n}\n\nif(!(p3 === 3)){\n $ERROR('#3: p3 === 3. Actual: p3 ==='+ p3 );\n}\n\ntry {\n p4;\n $ERROR('#4: p4 is not defined');\n} catch(e) { \n}\n\nif(!(p5 === \"x5\")){\n $ERROR('#5: p5 === \"x5\". Actual: p5 ==='+ p5 );\n}\n\nif(!(myObj.p1 === \"x1\")){\n $ERROR('#6: myObj.p1 === \"x1\". Actual: myObj.p1 ==='+ myObj.p1 );\n}\n\nif(!(myObj.p2 === \"b\")){\n $ERROR('#7: myObj.p2 === \"b\". Actual: myObj.p2 ==='+ myObj.p2 );\n}\n\nif(!(myObj.p3 === undefined)){\n $ERROR('#8: myObj.p3 === undefined. Actual: myObj.p3 ==='+ myObj.p3 );\n}\n\nif(!(myObj.p4 === undefined)){\n $ERROR('#9: myObj.p4 === undefined. Actual: myObj.p4 ==='+ myObj.p4 );\n}\n\nif(!(myObj.p5 === undefined)){\n $ERROR('#10: myObj.p5 === undefined. Actual: myObj.p5 ==='+ myObj.p5 );\n}\n\nif(!(st_parseInt !== parseInt)){\n $ERROR('#11: myObj.parseInt !== parseInt');\n}\n\nif(!(st_NaN === \"obj_NaN\")){\n $ERROR('#12: myObj.NaN !== NaN');\n}\n\nif(!(st_Infinity !== Infinity)){\n $ERROR('#13: myObj.Infinity !== Infinity');\n}\n\nif(!(st_eval !== eval)){\n $ERROR('#14: myObj.eval !== eval');\n}\n\nif(!(st_parseFloat !== parseFloat)){\n $ERROR('#15: myObj.parseFloat !== parseFloat');\n}\n\nif(!(st_isNaN !== isNaN)){\n $ERROR('#16: myObj.isNaN !== isNaN');\n}\n\nif(!(st_isFinite !== isFinite)){\n $ERROR('#17: myObj.isFinite !== isFinite');\n}\n\ntry{\n value;\n $ERROR('#18: value is not defined');\n}\ncatch(e){\n}\n\nif(!(myObj.value === \"myObj_value\")){\n $ERROR('#19: myObj.value === \"myObj_value\". Actual: myObj.value ==='+ myObj.value );\n}\n",
+ "id": "S12.10_A1.7_T2",
+ "strict_only": ""
+ },
+ {
+ "section": "12.10",
+ "description": "Calling a function within \"with\" statement declared within the statement, leading to normal completion by \"return\"",
+ "strict_mode_negative": "",
+ "test": "this.p1 = 1;\nthis.p2 = 2;\nthis.p3 = 3;\nvar result = \"result\";\nvar myObj = {p1: 'a', \n p2: 'b', \n p3: 'c',\n value: 'myObj_value',\n valueOf : function(){return 'obj_valueOf';},\n parseInt : function(){return 'obj_parseInt';},\n NaN : 'obj_NaN',\n Infinity : 'obj_Infinity',\n eval : function(){return 'obj_eval';},\n parseFloat : function(){return 'obj_parseFloat';},\n isNaN : function(){return 'obj_isNaN';},\n isFinite : function(){return 'obj_isFinite';}\n}\nvar del;\nvar st_p1 = \"p1\";\nvar st_p2 = \"p2\";\nvar st_p3 = \"p3\";\nvar st_parseInt = \"parseInt\";\nvar st_NaN = \"NaN\";\nvar st_Infinity = \"Infinity\";\nvar st_eval = \"eval\";\nvar st_parseFloat = \"parseFloat\";\nvar st_isNaN = \"isNaN\";\nvar st_isFinite = \"isFinite\";\n\nwith(myObj){\n var f = function(){\n return value;\n st_p1 = p1;\n st_p2 = p2;\n st_p3 = p3;\n st_parseInt = parseInt;\n st_NaN = NaN;\n st_Infinity = Infinity;\n st_eval = eval;\n st_parseFloat = parseFloat;\n st_isNaN = isNaN;\n st_isFinite = isFinite;\n p1 = 'x1';\n this.p2 = 'x2';\n del = delete p3;\n var p4 = 'x4';\n p5 = 'x5';\n var value = 'value';\n }\n result = f();\n}\n\nif(!(result === undefined)){\n $ERROR('#0: result === undefined. Actual: result ==='+ result );\n}\n\nif(!(p1 === 1)){\n $ERROR('#1: p1 === 1. Actual: p1 ==='+ p1 );\n}\n\nif(!(p2 === 2)){\n $ERROR('#2: p2 === 2. Actual: p2 ==='+ p2 );\n}\n\nif(!(p3 === 3)){\n $ERROR('#3: p3 === 3. Actual: p3 ==='+ p3 );\n}\n\ntry {\n p4;\n $ERROR('#4: p4 is not defined');\n} catch(e) { \n}\n\ntry {\n p5;\n $ERROR('#5: p5 is not defined');\n} catch(e) { \n}\n\nif(!(myObj.p1 === \"a\")){\n $ERROR('#6: myObj.p1 === \"a\". Actual: myObj.p1 ==='+ myObj.p1 );\n}\n\nif(!(myObj.p2 === \"b\")){\n $ERROR('#7: myObj.p2 === \"b\". Actual: myObj.p2 ==='+ myObj.p2 );\n}\n\nif(!(myObj.p3 === \"c\")){\n $ERROR('#8: myObj.p3 === \"c\". Actual: myObj.p3 ==='+ myObj.p3 );\n}\n\nif(!(myObj.p4 === undefined)){\n $ERROR('#9: myObj.p4 === undefined. Actual: myObj.p4 ==='+ myObj.p4 );\n}\n\nif(!(myObj.p5 === undefined)){\n $ERROR('#10: myObj.p5 === undefined. Actual: myObj.p5 ==='+ myObj.p5 );\n}\n\nif(!(st_parseInt === \"parseInt\")){\n $ERROR('#11: myObj.parseInt === \"parseInt\". Actual: myObj.parseInt ==='+ myObj.parseInt );\n}\n\nif(!(st_NaN === \"NaN\")){\n $ERROR('#12: st_NaN === \"NaN\". Actual: st_NaN ==='+ st_NaN );\n}\n\nif(!(st_Infinity === \"Infinity\")){\n $ERROR('#13: st_Infinity === \"Infinity\". Actual: st_Infinity ==='+ st_Infinity );\n}\n\nif(!(st_eval === \"eval\")){\n $ERROR('#14: st_eval === \"eval\". Actual: st_eval ==='+ st_eval );\n}\n\nif(!(st_parseFloat === \"parseFloat\")){\n $ERROR('#15: st_parseFloat === \"parseFloat\". Actual: st_parseFloat ==='+ st_parseFloat );\n}\n\nif(!(st_isNaN === \"isNaN\")){\n $ERROR('#16: st_isNaN === \"isNaN\". Actual: st_isNaN ==='+ st_isNaN );\n}\n\nif(!(st_isFinite === \"isFinite\")){\n $ERROR('#17: st_isFinite === \"isFinite\". Actual: st_isFinite ==='+ st_isFinite );\n}\n\ntry{\n value;\n $ERROR('#18: value is not defined');\n}\ncatch(e){\n}\n\nif(!(myObj.value === \"myObj_value\")){\n $ERROR('#19: myObj.value === \"myObj_value\". Actual: myObj.value ==='+ myObj.value );\n}\n",
+ "id": "S12.10_A1.7_T3",
+ "strict_only": ""
+ },
+ {
+ "section": "12.10",
+ "description": "Calling a function within \"with\" statement declared within the statement, leading to completion by exception",
+ "strict_mode_negative": "",
+ "test": "this.p1 = 1;\nthis.p2 = 2;\nthis.p3 = 3;\nvar result = \"result\";\nvar myObj = {p1: 'a', \n p2: 'b', \n p3: 'c',\n value: 'myObj_value',\n valueOf : function(){return 'obj_valueOf';},\n parseInt : function(){return 'obj_parseInt';},\n NaN : 'obj_NaN',\n Infinity : 'obj_Infinity',\n eval : function(){return 'obj_eval';},\n parseFloat : function(){return 'obj_parseFloat';},\n isNaN : function(){return 'obj_isNaN';},\n isFinite : function(){return 'obj_isFinite';}\n}\nvar del;\nvar st_p1 = \"p1\";\nvar st_p2 = \"p2\";\nvar st_p3 = \"p3\";\nvar st_parseInt = \"parseInt\";\nvar st_NaN = \"NaN\";\nvar st_Infinity = \"Infinity\";\nvar st_eval = \"eval\";\nvar st_parseFloat = \"parseFloat\";\nvar st_isNaN = \"isNaN\";\nvar st_isFinite = \"isFinite\";\n\ntry {\n with(myObj){\n var f = function(){\n st_p1 = p1;\n st_p2 = p2;\n st_p3 = p3;\n st_parseInt = parseInt;\n st_NaN = NaN;\n st_Infinity = Infinity;\n st_eval = eval;\n st_parseFloat = parseFloat;\n st_isNaN = isNaN;\n st_isFinite = isFinite;\n p1 = 'x1';\n this.p2 = 'x2';\n del = delete p3;\n var p4 = 'x4';\n p5 = 'x5';\n var value = 'value';\n throw value;\n }\n f();\n }\n} catch(e){\n result = e;\n}\n\nif(!(result === \"value\")){\n $ERROR('#0: result === \"value\". Actual: result ==='+ result );\n}\n\nif(!(p1 === 1)){\n $ERROR('#1: p1 === 1. Actual: p1 ==='+ p1 );\n}\n\nif(!(p2 === \"x2\")){\n $ERROR('#2: p2 === \"x2\". Actual: p2 ==='+ p2 );\n}\n\nif(!(p3 === 3)){\n $ERROR('#3: p3 === 3. Actual: p3 ==='+ p3 );\n}\n\ntry {\n p4;\n $ERROR('#4: p4 is not defined');\n} catch(e) { \n}\n\nif(!(p5 === \"x5\")){\n $ERROR('#5: p5 === \"x5\". Actual: p5 ==='+ p5 );\n}\n\nif(!(myObj.p1 === \"x1\")){\n $ERROR('#6: myObj.p1 === \"x1\". Actual: myObj.p1 ==='+ myObj.p1 );\n}\n\nif(!(myObj.p2 === \"b\")){\n $ERROR('#7: myObj.p2 === \"b\". Actual: myObj.p2 ==='+ myObj.p2 );\n}\n\nif(!(myObj.p3 === undefined)){\n $ERROR('#8: myObj.p3 === undefined. Actual: myObj.p3 ==='+ myObj.p3 );\n}\n\nif(!(myObj.p4 === undefined)){\n $ERROR('#9: myObj.p4 === undefined. Actual: myObj.p4 ==='+ myObj.p4 );\n}\n\nif(!(myObj.p5 === undefined)){\n $ERROR('#10: myObj.p5 === undefined. Actual: myObj.p5 ==='+ myObj.p5 );\n}\n\nif(!(st_parseInt !== parseInt)){\n $ERROR('#11: myObj.parseInt !== parseInt');\n}\n\nif(!(st_NaN === \"obj_NaN\")){\n $ERROR('#12: myObj.NaN !== NaN');\n}\n\nif(!(st_Infinity !== Infinity)){\n $ERROR('#13: myObj.Infinity !== Infinity');\n}\n\nif(!(st_eval !== eval)){\n $ERROR('#14: myObj.eval !== eval');\n}\n\nif(!(st_parseFloat !== parseFloat)){\n $ERROR('#15: myObj.parseFloat !== parseFloat');\n}\n\nif(!(st_isNaN !== isNaN)){\n $ERROR('#16: myObj.isNaN !== isNaN');\n}\n\nif(!(st_isFinite !== isFinite)){\n $ERROR('#17: myObj.isFinite !== isFinite');\n}\n\ntry{\n value;\n $ERROR('#18: value is not defined');\n}\ncatch(e){\n}\n\nif(!(myObj.value === \"myObj_value\")){\n $ERROR('#19: myObj.value === \"myObj_value\". Actual: myObj.value ==='+ myObj.value );\n}\n",
+ "id": "S12.10_A1.7_T4",
+ "strict_only": ""
+ },
+ {
+ "section": "12.10",
+ "description": "Calling a function within \"with\" statement declared within the statement, leading to completion by exception",
+ "strict_mode_negative": "",
+ "test": "this.p1 = 1;\nthis.p2 = 2;\nthis.p3 = 3;\nvar result = \"result\";\nvar myObj = {p1: 'a', \n p2: 'b', \n p3: 'c',\n value: 'myObj_value',\n valueOf : function(){return 'obj_valueOf';},\n parseInt : function(){return 'obj_parseInt';},\n NaN : 'obj_NaN',\n Infinity : 'obj_Infinity',\n eval : function(){return 'obj_eval';},\n parseFloat : function(){return 'obj_parseFloat';},\n isNaN : function(){return 'obj_isNaN';},\n isFinite : function(){return 'obj_isFinite';}\n}\nvar del;\nvar st_p1 = \"p1\";\nvar st_p2 = \"p2\";\nvar st_p3 = \"p3\";\nvar st_parseInt = \"parseInt\";\nvar st_NaN = \"NaN\";\nvar st_Infinity = \"Infinity\";\nvar st_eval = \"eval\";\nvar st_parseFloat = \"parseFloat\";\nvar st_isNaN = \"isNaN\";\nvar st_isFinite = \"isFinite\";\n\ntry {\n with(myObj){\n var f = function(){\n throw value;\n st_p1 = p1;\n st_p2 = p2;\n st_p3 = p3;\n st_parseInt = parseInt;\n st_NaN = NaN;\n st_Infinity = Infinity;\n st_eval = eval;\n st_parseFloat = parseFloat;\n st_isNaN = isNaN;\n st_isFinite = isFinite;\n p1 = 'x1';\n this.p2 = 'x2';\n del = delete p3;\n var p4 = 'x4';\n p5 = 'x5';\n var value = 'value';\n }\n f();\n }\n} catch(e){\n result = e;\n}\n\nif(!(result === undefined)){\n $ERROR('#0: result === undefined. Actual: result ==='+ result );\n}\n\nif(!(p1 === 1)){\n $ERROR('#1: p1 === 1. Actual: p1 ==='+ p1 );\n}\n\nif(!(p2 === 2)){\n $ERROR('#2: p2 === 2. Actual: p2 ==='+ p2 );\n}\n\nif(!(p3 === 3)){\n $ERROR('#3: p3 === 3. Actual: p3 ==='+ p3 );\n}\n\ntry {\n p4;\n $ERROR('#4: p4 is not defined');\n} catch(e) { \n}\n\ntry {\n p5;\n $ERROR('#5: p5 is not defined');\n} catch(e) { \n}\n\nif(!(myObj.p1 === \"a\")){\n $ERROR('#6: myObj.p1 === \"a\". Actual: myObj.p1 ==='+ myObj.p1 );\n}\n\nif(!(myObj.p2 === \"b\")){\n $ERROR('#7: myObj.p2 === \"b\". Actual: myObj.p2 ==='+ myObj.p2 );\n}\n\nif(!(myObj.p3 === \"c\")){\n $ERROR('#8: myObj.p3 === \"c\". Actual: myObj.p3 ==='+ myObj.p3 );\n}\n\nif(!(myObj.p4 === undefined)){\n $ERROR('#9: myObj.p4 === undefined. Actual: myObj.p4 ==='+ myObj.p4 );\n}\n\nif(!(myObj.p5 === undefined)){\n $ERROR('#10: myObj.p5 === undefined. Actual: myObj.p5 ==='+ myObj.p5 );\n}\n\nif(!(st_parseInt === \"parseInt\")){\n $ERROR('#11: myObj.parseInt === \"parseInt\". Actual: myObj.parseInt ==='+ myObj.parseInt );\n}\n\nif(!(st_NaN === \"NaN\")){\n $ERROR('#12: st_NaN === \"NaN\". Actual: st_NaN ==='+ st_NaN );\n}\n\nif(!(st_Infinity === \"Infinity\")){\n $ERROR('#13: st_Infinity === \"Infinity\". Actual: st_Infinity ==='+ st_Infinity );\n}\n\nif(!(st_eval === \"eval\")){\n $ERROR('#14: st_eval === \"eval\". Actual: st_eval ==='+ st_eval );\n}\n\nif(!(st_parseFloat === \"parseFloat\")){\n $ERROR('#15: st_parseFloat === \"parseFloat\". Actual: st_parseFloat ==='+ st_parseFloat );\n}\n\nif(!(st_isNaN === \"isNaN\")){\n $ERROR('#16: st_isNaN === \"isNaN\". Actual: st_isNaN ==='+ st_isNaN );\n}\n\nif(!(st_isFinite === \"isFinite\")){\n $ERROR('#17: st_isFinite === \"isFinite\". Actual: st_isFinite ==='+ st_isFinite );\n}\n\ntry{\n value;\n $ERROR('#18: value is not defined');\n}\ncatch(e){\n}\n\nif(!(myObj.value === \"myObj_value\")){\n $ERROR('#19: myObj.value === \"myObj_value\". Actual: myObj.value ==='+ myObj.value );\n}\n",
+ "id": "S12.10_A1.7_T5",
+ "strict_only": ""
+ },
+ {
+ "section": "12.10",
+ "description": "Declaring function constructor within \"with\" statement, leading to normal completion",
+ "strict_mode_negative": "",
+ "test": "this.p1 = 1;\nthis.p2 = 2;\nthis.p3 = 3;\nvar result = \"result\";\nvar myObj = {p1: 'a', \n p2: 'b', \n p3: 'c',\n value: 'myObj_value',\n valueOf : function(){return 'obj_valueOf';},\n parseInt : function(){return 'obj_parseInt';},\n NaN : 'obj_NaN',\n Infinity : 'obj_Infinity',\n eval : function(){return 'obj_eval';},\n parseFloat : function(){return 'obj_parseFloat';},\n isNaN : function(){return 'obj_isNaN';},\n isFinite : function(){return 'obj_isFinite';}\n}\nvar del;\nvar st_p1 = \"p1\";\nvar st_p2 = \"p2\";\nvar st_p3 = \"p3\";\nvar st_parseInt = \"parseInt\";\nvar st_NaN = \"NaN\";\nvar st_Infinity = \"Infinity\";\nvar st_eval = \"eval\";\nvar st_parseFloat = \"parseFloat\";\nvar st_isNaN = \"isNaN\";\nvar st_isFinite = \"isFinite\";\n\nwith(myObj){\n var f = function(){\n st_p1 = p1;\n st_p2 = p2;\n st_p3 = p3;\n st_parseInt = parseInt;\n st_NaN = NaN;\n st_Infinity = Infinity;\n st_eval = eval;\n st_parseFloat = parseFloat;\n st_isNaN = isNaN;\n st_isFinite = isFinite;\n p1 = 'x1';\n this.p2 = 'x2';\n del = delete p3;\n var p4 = 'x4';\n p5 = 'x5';\n var value = 'value';\n }\n var obj = new f();\n}\n\nif(!(p1 === 1)){\n $ERROR('#1: p1 === 1. Actual: p1 ==='+ p1 );\n}\n\nif(!(p2 === 2)){\n $ERROR('#2: p2 === 2. Actual: p2 ==='+ p2 );\n}\n\nif(!(p3 === 3)){\n $ERROR('#3: p3 === 3. Actual: p3 ==='+ p3 );\n}\n\ntry {\n p4;\n $ERROR('#4: p4 is not defined');\n} catch(e) { \n}\n\nif(!(p5 === \"x5\")){\n $ERROR('#5: p5 === \"x5\". Actual: p5 ==='+ p5 );\n}\n\nif(!(myObj.p1 === \"x1\")){\n $ERROR('#6: myObj.p1 === \"x1\". Actual: myObj.p1 ==='+ myObj.p1 );\n}\n\nif(!(myObj.p2 === \"b\")){\n $ERROR('#7: myObj.p2 === \"b\". Actual: myObj.p2 ==='+ myObj.p2 );\n}\n\nif(!(myObj.p3 === undefined)){\n $ERROR('#8: myObj.p3 === undefined. Actual: myObj.p3 ==='+ myObj.p3 );\n}\n\nif(!(myObj.p4 === undefined)){\n $ERROR('#9: myObj.p4 === undefined. Actual: myObj.p4 ==='+ myObj.p4 );\n}\n\nif(!(myObj.p5 === undefined)){\n $ERROR('#10: myObj.p5 === undefined. Actual: myObj.p5 ==='+ myObj.p5 );\n}\n\nif(!(st_parseInt !== parseInt)){\n $ERROR('#11: myObj.parseInt !== parseInt');\n}\n\nif(!(st_NaN === \"obj_NaN\")){\n $ERROR('#12: myObj.NaN !== NaN');\n}\n\nif(!(st_Infinity !== Infinity)){\n $ERROR('#13: myObj.Infinity !== Infinity');\n}\n\nif(!(st_eval !== eval)){\n $ERROR('#14: myObj.eval !== eval');\n}\n\nif(!(st_parseFloat !== parseFloat)){\n $ERROR('#15: myObj.parseFloat !== parseFloat');\n}\n\nif(!(st_isNaN !== isNaN)){\n $ERROR('#16: myObj.isNaN !== isNaN');\n}\n\nif(!(st_isFinite !== isFinite)){\n $ERROR('#17: myObj.isFinite !== isFinite');\n}\n\ntry{\n value;\n $ERROR('#18: value is not defined');\n}\ncatch(e){\n}\n\nif(!(myObj.value === \"myObj_value\")){\n $ERROR('#19: myObj.value === \"myObj_value\". Actual: myObj.value ==='+ myObj.value );\n}\n",
+ "id": "S12.10_A1.8_T1",
+ "strict_only": ""
+ },
+ {
+ "section": "12.10",
+ "description": "Declaring function constructor within \"with\" statement, leading to normal completion by \"return\"",
+ "strict_mode_negative": "",
+ "test": "this.p1 = 1;\nthis.p2 = 2;\nthis.p3 = 3;\nvar result = \"result\";\nvar myObj = {p1: 'a', \n p2: 'b', \n p3: 'c',\n value: 'myObj_value',\n valueOf : function(){return 'obj_valueOf';},\n parseInt : function(){return 'obj_parseInt';},\n NaN : 'obj_NaN',\n Infinity : 'obj_Infinity',\n eval : function(){return 'obj_eval';},\n parseFloat : function(){return 'obj_parseFloat';},\n isNaN : function(){return 'obj_isNaN';},\n isFinite : function(){return 'obj_isFinite';}\n}\nvar del;\nvar st_p1 = \"p1\";\nvar st_p2 = \"p2\";\nvar st_p3 = \"p3\";\nvar st_parseInt = \"parseInt\";\nvar st_NaN = \"NaN\";\nvar st_Infinity = \"Infinity\";\nvar st_eval = \"eval\";\nvar st_parseFloat = \"parseFloat\";\nvar st_isNaN = \"isNaN\";\nvar st_isFinite = \"isFinite\";\n\nwith(myObj){\n var f = function(){\n st_p1 = p1;\n st_p2 = p2;\n st_p3 = p3;\n st_parseInt = parseInt;\n st_NaN = NaN;\n st_Infinity = Infinity;\n st_eval = eval;\n st_parseFloat = parseFloat;\n st_isNaN = isNaN;\n st_isFinite = isFinite;\n p1 = 'x1';\n this.p2 = 'x2';\n del = delete p3;\n var p4 = 'x4';\n p5 = 'x5';\n var value = 'value';\n return value;\n }\n var obj = new f();\n}\n\nif(!(p1 === 1)){\n $ERROR('#1: p1 === 1. Actual: p1 ==='+ p1 );\n}\n\nif(!(p2 === 2)){\n $ERROR('#2: p2 === 2. Actual: p2 ==='+ p2 );\n}\n\nif(!(p3 === 3)){\n $ERROR('#3: p3 === 3. Actual: p3 ==='+ p3 );\n}\ntry {\n p4;\n $ERROR('#4: p4 is not defined');\n} catch(e) { \n}\n\nif(!(p5 === \"x5\")){\n $ERROR('#5: p5 === \"x5\". Actual: p5 ==='+ p5 );\n}\n\nif(!(myObj.p1 === \"x1\")){\n $ERROR('#6: myObj.p1 === \"x1\". Actual: myObj.p1 ==='+ myObj.p1 );\n}\n\nif(!(myObj.p2 === \"b\")){\n $ERROR('#7: myObj.p2 === \"b\". Actual: myObj.p2 ==='+ myObj.p2 );\n}\n\nif(!(myObj.p3 === undefined)){\n $ERROR('#8: myObj.p3 === undefined. Actual: myObj.p3 ==='+ myObj.p3 );\n}\n\nif(!(myObj.p4 === undefined)){\n $ERROR('#9: myObj.p4 === undefined. Actual: myObj.p4 ==='+ myObj.p4 );\n}\n\nif(!(myObj.p5 === undefined)){\n $ERROR('#10: myObj.p5 === undefined. Actual: myObj.p5 ==='+ myObj.p5 );\n}\n\nif(!(st_parseInt !== parseInt)){\n $ERROR('#11: myObj.parseInt !== parseInt');\n}\n\nif(!(st_NaN === \"obj_NaN\")){\n $ERROR('#12: myObj.NaN !== NaN');\n}\n\nif(!(st_Infinity !== Infinity)){\n $ERROR('#13: myObj.Infinity !== Infinity');\n}\n\nif(!(st_eval !== eval)){\n $ERROR('#14: myObj.eval !== eval');\n}\n\nif(!(st_parseFloat !== parseFloat)){\n $ERROR('#15: myObj.parseFloat !== parseFloat');\n}\n\nif(!(st_isNaN !== isNaN)){\n $ERROR('#16: myObj.isNaN !== isNaN');\n}\n\nif(!(st_isFinite !== isFinite)){\n $ERROR('#17: myObj.isFinite !== isFinite');\n}\n\ntry{\n value;\n $ERROR('#18: value is not defined');\n}\ncatch(e){\n}\n\nif(!(myObj.value === \"myObj_value\")){\n $ERROR('#19: myObj.value === \"myObj_value\". Actual: myObj.value ==='+ myObj.value );\n}\n",
+ "id": "S12.10_A1.8_T2",
+ "strict_only": ""
+ },
+ {
+ "section": "12.10",
+ "description": "Declaring function constructor within \"with\" statement, leading to normal completion by \"return\"",
+ "strict_mode_negative": "",
+ "test": "this.p1 = 1;\nthis.p2 = 2;\nthis.p3 = 3;\nvar result = \"result\";\nvar myObj = {p1: 'a', \n p2: 'b', \n p3: 'c',\n value: 'myObj_value',\n valueOf : function(){return 'obj_valueOf';},\n parseInt : function(){return 'obj_parseInt';},\n NaN : 'obj_NaN',\n Infinity : 'obj_Infinity',\n eval : function(){return 'obj_eval';},\n parseFloat : function(){return 'obj_parseFloat';},\n isNaN : function(){return 'obj_isNaN';},\n isFinite : function(){return 'obj_isFinite';}\n}\nvar del;\nvar st_p1 = \"p1\";\nvar st_p2 = \"p2\";\nvar st_p3 = \"p3\";\nvar st_parseInt = \"parseInt\";\nvar st_NaN = \"NaN\";\nvar st_Infinity = \"Infinity\";\nvar st_eval = \"eval\";\nvar st_parseFloat = \"parseFloat\";\nvar st_isNaN = \"isNaN\";\nvar st_isFinite = \"isFinite\";\n\nwith(myObj){\n var f = function(){\n return value;\n st_p1 = p1;\n st_p2 = p2;\n st_p3 = p3;\n st_parseInt = parseInt;\n st_NaN = NaN;\n st_Infinity = Infinity;\n st_eval = eval;\n st_parseFloat = parseFloat;\n st_isNaN = isNaN;\n st_isFinite = isFinite;\n p1 = 'x1';\n this.p2 = 'x2';\n del = delete p3;\n var p4 = 'x4';\n p5 = 'x5';\n var value = 'value';\n }\n var obj = new f();\n}\n\nif(!(p1 === 1)){\n $ERROR('#1: p1 === 1. Actual: p1 ==='+ p1 );\n}\n\nif(!(p2 === 2)){\n $ERROR('#2: p2 === 2. Actual: p2 ==='+ p2 );\n}\n\nif(!(p3 === 3)){\n $ERROR('#3: p3 === 3. Actual: p3 ==='+ p3 );\n}\n\ntry {\n p4;\n $ERROR('#4: p4 is not defined');\n} catch(e) { \n}\n\ntry {\n p5;\n $ERROR('#5: p5 is not defined');\n} catch(e) { \n}\n\nif(!(myObj.p1 === \"a\")){\n $ERROR('#6: myObj.p1 === \"a\". Actual: myObj.p1 ==='+ myObj.p1 );\n}\n\nif(!(myObj.p2 === \"b\")){\n $ERROR('#7: myObj.p2 === \"b\". Actual: myObj.p2 ==='+ myObj.p2 );\n}\n\nif(!(myObj.p3 === \"c\")){\n $ERROR('#8: myObj.p3 === \"c\". Actual: myObj.p3 ==='+ myObj.p3 );\n}\n\nif(!(myObj.p4 === undefined)){\n $ERROR('#9: myObj.p4 === undefined. Actual: myObj.p4 ==='+ myObj.p4 );\n}\n\nif(!(myObj.p5 === undefined)){\n $ERROR('#10: myObj.p5 === undefined. Actual: myObj.p5 ==='+ myObj.p5 );\n}\n\nif(!(st_parseInt === \"parseInt\")){\n $ERROR('#11: myObj.parseInt === \"parseInt\". Actual: myObj.parseInt ==='+ myObj.parseInt );\n}\n\nif(!(st_NaN === \"NaN\")){\n $ERROR('#12: st_NaN === \"NaN\". Actual: st_NaN ==='+ st_NaN );\n}\n\nif(!(st_Infinity === \"Infinity\")){\n $ERROR('#13: st_Infinity === \"Infinity\". Actual: st_Infinity ==='+ st_Infinity );\n}\n\nif(!(st_eval === \"eval\")){\n $ERROR('#14: st_eval === \"eval\". Actual: st_eval ==='+ st_eval );\n}\n\nif(!(st_parseFloat === \"parseFloat\")){\n $ERROR('#15: st_parseFloat === \"parseFloat\". Actual: st_parseFloat ==='+ st_parseFloat );\n}\n\nif(!(st_isNaN === \"isNaN\")){\n $ERROR('#16: st_isNaN === \"isNaN\". Actual: st_isNaN ==='+ st_isNaN );\n}\n\nif(!(st_isFinite === \"isFinite\")){\n $ERROR('#17: st_isFinite === \"isFinite\". Actual: st_isFinite ==='+ st_isFinite );\n}\n\ntry{\n value;\n $ERROR('#18: value is not defined');\n}\ncatch(e){\n}\n\nif(!(myObj.value === \"myObj_value\")){\n $ERROR('#19: myObj.value === \"myObj_value\". Actual: myObj.value ==='+ myObj.value );\n}\n",
+ "id": "S12.10_A1.8_T3",
+ "strict_only": ""
+ },
+ {
+ "section": "12.10",
+ "description": "Declaring function constructor within \"with\" statement, leading to completion by exception",
+ "strict_mode_negative": "",
+ "test": "this.p1 = 1;\nthis.p2 = 2;\nthis.p3 = 3;\nvar result = \"result\";\nvar myObj = {p1: 'a', \n p2: 'b', \n p3: 'c',\n value: 'myObj_value',\n valueOf : function(){return 'obj_valueOf';},\n parseInt : function(){return 'obj_parseInt';},\n NaN : 'obj_NaN',\n Infinity : 'obj_Infinity',\n eval : function(){return 'obj_eval';},\n parseFloat : function(){return 'obj_parseFloat';},\n isNaN : function(){return 'obj_isNaN';},\n isFinite : function(){return 'obj_isFinite';}\n}\nvar del;\nvar st_p1 = \"p1\";\nvar st_p2 = \"p2\";\nvar st_p3 = \"p3\";\nvar st_parseInt = \"parseInt\";\nvar st_NaN = \"NaN\";\nvar st_Infinity = \"Infinity\";\nvar st_eval = \"eval\";\nvar st_parseFloat = \"parseFloat\";\nvar st_isNaN = \"isNaN\";\nvar st_isFinite = \"isFinite\";\n\ntry {\n with(myObj){\n var f = function(){\n st_p1 = p1;\n st_p2 = p2;\n st_p3 = p3;\n st_parseInt = parseInt;\n st_NaN = NaN;\n st_Infinity = Infinity;\n st_eval = eval;\n st_parseFloat = parseFloat;\n st_isNaN = isNaN;\n st_isFinite = isFinite;\n p1 = 'x1';\n this.p2 = 'x2';\n del = delete p3;\n var p4 = 'x4';\n p5 = 'x5';\n var value = 'value';\n throw value;\n }\n var obj = new f();\n }\n} catch(e){\n result = e;\n}\n\nif(!(result === \"value\")){\n $ERROR('#0: result === \"value\". Actual: result ==='+ result );\n}\n\nif(!(p1 === 1)){\n $ERROR('#1: p1 === 1. Actual: p1 ==='+ p1 );\n}\n\nif(!(p2 === 2)){\n $ERROR('#2: p2 === 2. Actual: p2 ==='+ p2 );\n}\n\nif(!(p3 === 3)){\n $ERROR('#3: p3 === 3. Actual: p3 ==='+ p3 );\n}\ntry {\n p4;\n $ERROR('#4: p4 is not defined');\n} catch(e) { \n}\n\nif(!(p5 === \"x5\")){\n $ERROR('#5: p5 === \"x5\". Actual: p5 ==='+ p5 );\n}\n\nif(!(myObj.p1 === \"x1\")){\n $ERROR('#6: myObj.p1 === \"x1\". Actual: myObj.p1 ==='+ myObj.p1 );\n}\n\nif(!(myObj.p2 === \"b\")){\n $ERROR('#7: myObj.p2 === \"b\". Actual: myObj.p2 ==='+ myObj.p2 );\n}\n\nif(!(myObj.p3 === undefined)){\n $ERROR('#8: myObj.p3 === undefined. Actual: myObj.p3 ==='+ myObj.p3 );\n}\n\nif(!(myObj.p4 === undefined)){\n $ERROR('#9: myObj.p4 === undefined. Actual: myObj.p4 ==='+ myObj.p4 );\n}\n\nif(!(myObj.p5 === undefined)){\n $ERROR('#10: myObj.p5 === undefined. Actual: myObj.p5 ==='+ myObj.p5 );\n}\n\nif(!(st_parseInt !== parseInt)){\n $ERROR('#11: myObj.parseInt !== parseInt');\n}\n\nif(!(st_NaN === \"obj_NaN\")){\n $ERROR('#12: myObj.NaN !== NaN');\n}\n\nif(!(st_Infinity !== Infinity)){\n $ERROR('#13: myObj.Infinity !== Infinity');\n}\n\nif(!(st_eval !== eval)){\n $ERROR('#14: myObj.eval !== eval');\n}\n\nif(!(st_parseFloat !== parseFloat)){\n $ERROR('#15: myObj.parseFloat !== parseFloat');\n}\n\nif(!(st_isNaN !== isNaN)){\n $ERROR('#16: myObj.isNaN !== isNaN');\n}\n\nif(!(st_isFinite !== isFinite)){\n $ERROR('#17: myObj.isFinite !== isFinite');\n}\n\ntry{\n value;\n $ERROR('#18: value is not defined');\n}\ncatch(e){\n}\n\nif(!(myObj.value === \"myObj_value\")){\n $ERROR('#19: myObj.value === \"myObj_value\". Actual: myObj.value ==='+ myObj.value );\n}\n",
+ "id": "S12.10_A1.8_T4",
+ "strict_only": ""
+ },
+ {
+ "section": "12.10",
+ "description": "Declaring function constructor within \"with\" statement, leading to completion by exception",
+ "strict_mode_negative": "",
+ "test": "this.p1 = 1;\nthis.p2 = 2;\nthis.p3 = 3;\nvar result = \"result\";\nvar myObj = {p1: 'a', \n p2: 'b', \n p3: 'c',\n value: 'myObj_value',\n valueOf : function(){return 'obj_valueOf';},\n parseInt : function(){return 'obj_parseInt';},\n NaN : 'obj_NaN',\n Infinity : 'obj_Infinity',\n eval : function(){return 'obj_eval';},\n parseFloat : function(){return 'obj_parseFloat';},\n isNaN : function(){return 'obj_isNaN';},\n isFinite : function(){return 'obj_isFinite';}\n}\nvar del;\nvar st_p1 = \"p1\";\nvar st_p2 = \"p2\";\nvar st_p3 = \"p3\";\nvar st_parseInt = \"parseInt\";\nvar st_NaN = \"NaN\";\nvar st_Infinity = \"Infinity\";\nvar st_eval = \"eval\";\nvar st_parseFloat = \"parseFloat\";\nvar st_isNaN = \"isNaN\";\nvar st_isFinite = \"isFinite\";\n\ntry {\n with(myObj){\n var f = function(){\n throw value;\n st_p1 = p1;\n st_p2 = p2;\n st_p3 = p3;\n st_parseInt = parseInt;\n st_NaN = NaN;\n st_Infinity = Infinity;\n st_eval = eval;\n st_parseFloat = parseFloat;\n st_isNaN = isNaN;\n st_isFinite = isFinite;\n p1 = 'x1';\n this.p2 = 'x2';\n del = delete p3;\n var p4 = 'x4';\n p5 = 'x5';\n var value = 'value';\n }\n var obj = new f();\n }\n} catch(e){\n result = e;\n}\n\nif(!(result === undefined)){\n $ERROR('#0: result === undefined. Actual: result ==='+ result );\n}\n\nif(!(p1 === 1)){\n $ERROR('#1: p1 === 1. Actual: p1 ==='+ p1 );\n}\n\nif(!(p2 === 2)){\n $ERROR('#2: p2 === 2. Actual: p2 ==='+ p2 );\n}\n\nif(!(p3 === 3)){\n $ERROR('#3: p3 === 3. Actual: p3 ==='+ p3 );\n}\n\ntry {\n p4;\n $ERROR('#4: p4 is not defined');\n} catch(e) { \n}\n\ntry {\n p5;\n $ERROR('#5: p5 is not defined');\n} catch(e) { \n}\n\nif(!(myObj.p1 === \"a\")){\n $ERROR('#6: myObj.p1 === \"a\". Actual: myObj.p1 ==='+ myObj.p1 );\n}\n\nif(!(myObj.p2 === \"b\")){\n $ERROR('#7: myObj.p2 === \"b\". Actual: myObj.p2 ==='+ myObj.p2 );\n}\n\nif(!(myObj.p3 === \"c\")){\n $ERROR('#8: myObj.p3 === \"c\". Actual: myObj.p3 ==='+ myObj.p3 );\n}\n\nif(!(myObj.p4 === undefined)){\n $ERROR('#9: myObj.p4 === undefined. Actual: myObj.p4 ==='+ myObj.p4 );\n}\n\nif(!(myObj.p5 === undefined)){\n $ERROR('#10: myObj.p5 === undefined. Actual: myObj.p5 ==='+ myObj.p5 );\n}\n\nif(!(st_parseInt === \"parseInt\")){\n $ERROR('#11: myObj.parseInt === \"parseInt\". Actual: myObj.parseInt ==='+ myObj.parseInt );\n}\n\nif(!(st_NaN === \"NaN\")){\n $ERROR('#12: st_NaN === \"NaN\". Actual: st_NaN ==='+ st_NaN );\n}\n\nif(!(st_Infinity === \"Infinity\")){\n $ERROR('#13: st_Infinity === \"Infinity\". Actual: st_Infinity ==='+ st_Infinity );\n}\n\nif(!(st_eval === \"eval\")){\n $ERROR('#14: st_eval === \"eval\". Actual: st_eval ==='+ st_eval );\n}\n\nif(!(st_parseFloat === \"parseFloat\")){\n $ERROR('#15: st_parseFloat === \"parseFloat\". Actual: st_parseFloat ==='+ st_parseFloat );\n}\n\nif(!(st_isNaN === \"isNaN\")){\n $ERROR('#16: st_isNaN === \"isNaN\". Actual: st_isNaN ==='+ st_isNaN );\n}\n\nif(!(st_isFinite === \"isFinite\")){\n $ERROR('#17: st_isFinite === \"isFinite\". Actual: st_isFinite ==='+ st_isFinite );\n}\n\ntry{\n value;\n $ERROR('#18: value is not defined');\n}\ncatch(e){\n}\n\nif(!(myObj.value === \"myObj_value\")){\n $ERROR('#19: myObj.value === \"myObj_value\". Actual: myObj.value ==='+ myObj.value );\n}\n",
+ "id": "S12.10_A1.8_T5",
+ "strict_only": ""
+ },
+ {
+ "section": "12.10",
+ "description": "Using \"for-in\" statement within \"with\" statement, leading to normal completion",
+ "strict_mode_negative": "",
+ "test": "this.p1 = 1;\nthis.p2 = 2;\nthis.p3 = 3;\nvar result = \"result\";\nvar myObj = {p1: 'a', \n p2: 'b', \n p3: 'c',\n value: 'myObj_value',\n valueOf : function(){return 'obj_valueOf';},\n parseInt : function(){return 'obj_parseInt';},\n NaN : 'obj_NaN',\n Infinity : 'obj_Infinity',\n eval : function(){return 'obj_eval';},\n parseFloat : function(){return 'obj_parseFloat';},\n isNaN : function(){return 'obj_isNaN';},\n isFinite : function(){return 'obj_isFinite';}\n}\nvar del;\nvar st_p1 = \"p1\";\nvar st_p2 = \"p2\";\nvar st_p3 = \"p3\";\nvar st_parseInt = \"parseInt\";\nvar st_NaN = \"NaN\";\nvar st_Infinity = \"Infinity\";\nvar st_eval = \"eval\";\nvar st_parseFloat = \"parseFloat\";\nvar st_isNaN = \"isNaN\";\nvar st_isFinite = \"isFinite\";\n\nwith(myObj){\n for(var prop in myObj){\n if(prop === 'p1') {\n st_p1 = p1;\n p1 = 'x1';\n }\n if(prop === 'p2') {\n st_p2 = p2;\n this.p2 = 'x2';\n }\n if(prop === 'p3') {\n st_p3 = p3;\n del = delete p3;\n }\n if(prop === 'parseInt') st_parseInt = parseInt;\n if(prop === 'NaN') st_NaN = NaN;\n if(prop === 'Infinity') st_Infinity = Infinity;\n if(prop === 'eval') st_eval = eval;\n if(prop === 'parseFloat') st_parseFloat = parseFloat;\n if(prop === 'isNaN') st_isNaN = isNaN;\n if(prop === 'isFinite') st_isFinite = isFinite;\n var p4 = 'x4';\n p5 = 'x5';\n var value = 'value';\n }\n}\n\nif(!(p1 === 1)){\n $ERROR('#1: p1 === 1. Actual: p1 ==='+ p1 );\n}\n\nif(!(p2 === \"x2\")){\n $ERROR('#2: p2 === \"x2\". Actual: p2 ==='+ p2 );\n}\n\nif(!(p3 === 3)){\n $ERROR('#3: p3 === 3. Actual: p3 ==='+ p3 );\n}\n\nif(!(p4 === \"x4\")){\n $ERROR('#4: p4 === \"x4\". Actual: p4 ==='+ p4 );\n}\n\nif(!(p5 === \"x5\")){\n $ERROR('#5: p5 === \"x5\". Actual: p5 ==='+ p5 );\n}\n\nif(!(myObj.p1 === \"x1\")){\n $ERROR('#6: myObj.p1 === \"x1\". Actual: myObj.p1 ==='+ myObj.p1 );\n}\n\nif(!(myObj.p2 === \"b\")){\n $ERROR('#7: myObj.p2 === \"b\". Actual: myObj.p2 ==='+ myObj.p2 );\n}\n\nif(!(myObj.p3 === undefined)){\n $ERROR('#8: myObj.p3 === undefined. Actual: myObj.p3 ==='+ myObj.p3 );\n}\n\nif(!(myObj.p4 === undefined)){\n $ERROR('#9: myObj.p4 === undefined. Actual: myObj.p4 ==='+ myObj.p4 );\n}\n\nif(!(myObj.p5 === undefined)){\n $ERROR('#10: myObj.p5 === undefined. Actual: myObj.p5 ==='+ myObj.p5 );\n}\n\nif(!(st_parseInt !== parseInt)){\n $ERROR('#11: myObj.parseInt !== parseInt');\n}\n\nif(!(st_NaN === \"obj_NaN\")){\n $ERROR('#12: myObj.NaN !== NaN');\n}\n\nif(!(st_Infinity !== Infinity)){\n $ERROR('#13: myObj.Infinity !== Infinity');\n}\n\nif(!(st_eval !== eval)){\n $ERROR('#14: myObj.eval !== eval');\n}\n\nif(!(st_parseFloat !== parseFloat)){\n $ERROR('#15: myObj.parseFloat !== parseFloat');\n}\n\nif(!(st_isNaN !== isNaN)){\n $ERROR('#16: myObj.isNaN !== isNaN');\n}\n\nif(!(st_isFinite !== isFinite)){\n $ERROR('#17: myObj.isFinite !== isFinite');\n}\n\nif(!(value === undefined)){\n $ERROR('#18: value === undefined. Actual: value ==='+ value );\n}\n\nif(!(myObj.value === \"value\")){\n $ERROR('#19: myObj.value === \"value\". Actual: myObj.value ==='+ myObj.value );\n}\n",
+ "id": "S12.10_A1.9_T1",
+ "strict_only": ""
+ },
+ {
+ "section": "12.10",
+ "description": "Using \"for-in\" statement within \"with\" statement, leading to completion by break",
+ "strict_mode_negative": "",
+ "test": "this.p1 = 1;\nthis.p2 = 2;\nthis.p3 = 3;\nvar result = \"result\";\nvar myObj = {p1: 'a', \n p2: 'b', \n p3: 'c',\n value: 'myObj_value',\n valueOf : function(){return 'obj_valueOf';},\n parseInt : function(){return 'obj_parseInt';},\n NaN : 'obj_NaN',\n Infinity : 'obj_Infinity',\n eval : function(){return 'obj_eval';},\n parseFloat : function(){return 'obj_parseFloat';},\n isNaN : function(){return 'obj_isNaN';},\n isFinite : function(){return 'obj_isFinite';}\n}\nvar del;\nvar st_p1 = \"p1\";\nvar st_p2 = \"p2\";\nvar st_p3 = \"p3\";\nvar st_parseInt = \"parseInt\";\nvar st_NaN = \"NaN\";\nvar st_Infinity = \"Infinity\";\nvar st_eval = \"eval\";\nvar st_parseFloat = \"parseFloat\";\nvar st_isNaN = \"isNaN\";\nvar st_isFinite = \"isFinite\";\n\nwith(myObj){\n for(var prop in myObj){\n st_p1 = p1;\n p1 = 'x1';\n st_p2 = p2;\n this.p2 = 'x2';\n st_p3 = p3;\n del = delete p3;\n st_parseInt = parseInt;\n st_NaN = NaN;\n st_Infinity = Infinity;\n st_eval = eval;\n st_parseFloat = parseFloat;\n st_isNaN = isNaN;\n st_isFinite = isFinite;\n var p4 = 'x4';\n p5 = 'x5';\n var value = 'value';\n break;\n }\n}\n\nif(!(p1 === 1)){\n $ERROR('#1: p1 === 1. Actual: p1 ==='+ p1 );\n}\n\nif(!(p2 === \"x2\")){\n $ERROR('#2: p2 === \"x2\". Actual: p2 ==='+ p2 );\n}\n\nif(!(p3 === 3)){\n $ERROR('#3: p3 === 3. Actual: p3 ==='+ p3 );\n}\n\nif(!(p4 === \"x4\")){\n $ERROR('#4: p4 === \"x4\". Actual: p4 ==='+ p4 );\n}\n\nif(!(p5 === \"x5\")){\n $ERROR('#5: p5 === \"x5\". Actual: p5 ==='+ p5 );\n}\n\nif(!(myObj.p1 === \"x1\")){\n $ERROR('#6: myObj.p1 === \"x1\". Actual: myObj.p1 ==='+ myObj.p1 );\n}\n\nif(!(myObj.p2 === \"b\")){\n $ERROR('#7: myObj.p2 === \"b\". Actual: myObj.p2 ==='+ myObj.p2 );\n}\n\nif(!(myObj.p3 === undefined)){\n $ERROR('#8: myObj.p3 === undefined. Actual: myObj.p3 ==='+ myObj.p3 );\n}\n\nif(!(myObj.p4 === undefined)){\n $ERROR('#9: myObj.p4 === undefined. Actual: myObj.p4 ==='+ myObj.p4 );\n}\n\nif(!(myObj.p5 === undefined)){\n $ERROR('#10: myObj.p5 === undefined. Actual: myObj.p5 ==='+ myObj.p5 );\n}\n\nif(!(st_parseInt !== parseInt)){\n $ERROR('#11: myObj.parseInt !== parseInt');\n}\n\nif(!(st_NaN === \"obj_NaN\")){\n $ERROR('#12: myObj.NaN !== NaN');\n}\n\nif(!(st_Infinity !== Infinity)){\n $ERROR('#13: myObj.Infinity !== Infinity');\n}\n\nif(!(st_eval !== eval)){\n $ERROR('#14: myObj.eval !== eval');\n}\n\nif(!(st_parseFloat !== parseFloat)){\n $ERROR('#15: myObj.parseFloat !== parseFloat');\n}\n\nif(!(st_isNaN !== isNaN)){\n $ERROR('#16: myObj.isNaN !== isNaN');\n}\n\nif(!(st_isFinite !== isFinite)){\n $ERROR('#17: myObj.isFinite !== isFinite');\n}\n\nif(!(value === undefined)){\n $ERROR('#18: value === undefined. Actual: value ==='+ value );\n}\n\nif(!(myObj.value === \"value\")){\n $ERROR('#19: myObj.value === \"value\". Actual: myObj.value ==='+ myObj.value );\n}\n",
+ "id": "S12.10_A1.9_T2",
+ "strict_only": ""
+ },
+ {
+ "section": "12.10",
+ "description": "Using \"for-in\" statement within \"with\" statement, leading to completion by break",
+ "strict_mode_negative": "",
+ "test": "this.p1 = 1;\nthis.p2 = 2;\nthis.p3 = 3;\nvar result = \"result\";\nvar myObj = {p1: 'a', \n p2: 'b', \n p3: 'c',\n value: 'myObj_value',\n valueOf : function(){return 'obj_valueOf';},\n parseInt : function(){return 'obj_parseInt';},\n NaN : 'obj_NaN',\n Infinity : 'obj_Infinity',\n eval : function(){return 'obj_eval';},\n parseFloat : function(){return 'obj_parseFloat';},\n isNaN : function(){return 'obj_isNaN';},\n isFinite : function(){return 'obj_isFinite';}\n}\nvar del;\nvar st_p1 = \"p1\";\nvar st_p2 = \"p2\";\nvar st_p3 = \"p3\";\nvar st_parseInt = \"parseInt\";\nvar st_NaN = \"NaN\";\nvar st_Infinity = \"Infinity\";\nvar st_eval = \"eval\";\nvar st_parseFloat = \"parseFloat\";\nvar st_isNaN = \"isNaN\";\nvar st_isFinite = \"isFinite\";\n\nwith(myObj){\n for(var prop in myObj){\n break;\n if(prop === 'p1') {\n st_p1 = p1;\n p1 = 'x1';\n }\n if(prop === 'p2') {\n st_p2 = p2;\n this.p2 = 'x2';\n }\n if(prop === 'p3') {\n st_p3 = p3;\n del = delete p3;\n }\n if(prop === 'parseInt') st_parseInt = parseInt;\n if(prop === 'NaN') st_NaN = NaN;\n if(prop === 'Infinity') st_Infinity = Infinity;\n if(prop === 'eval') st_eval = eval;\n if(prop === 'parseFloat') st_parseFloat = parseFloat;\n if(prop === 'isNaN') st_isNaN = isNaN;\n if(prop === 'isFinite') st_isFinite = isFinite;\n var p4 = 'x4';\n p5 = 'x5';\n var value = 'value';\n }\n}\n\nif(!(p1 === 1)){\n $ERROR('#1: p1 === 1. Actual: p1 ==='+ p1 );\n}\n\nif(!(p2 === 2)){\n $ERROR('#2: p2 === 2. Actual: p2 ==='+ p2 );\n}\n\nif(!(p3 === 3)){\n $ERROR('#3: p3 === 3. Actual: p3 ==='+ p3 );\n}\n\nif(!(p4 === undefined)){\n $ERROR('#4: p4 === undefined. Actual: p4 ==='+ p4 );\n}\n\ntry {\n p5;\n $ERROR('#5: p5 is not defined');\n} catch(e) { \n}\n\nif(!(myObj.p1 === \"a\")){\n $ERROR('#6: myObj.p1 === \"a\". Actual: myObj.p1 ==='+ myObj.p1 );\n}\n\nif(!(myObj.p2 === \"b\")){\n $ERROR('#7: myObj.p2 === \"b\". Actual: myObj.p2 ==='+ myObj.p2 );\n}\n\nif(!(myObj.p3 === \"c\")){\n $ERROR('#8: myObj.p3 === \"c\". Actual: myObj.p3 ==='+ myObj.p3 );\n}\n\nif(!(myObj.p4 === undefined)){\n $ERROR('#9: myObj.p4 === undefined. Actual: myObj.p4 ==='+ myObj.p4 );\n}\n\nif(!(myObj.p5 === undefined)){\n $ERROR('#10: myObj.p5 === undefined. Actual: myObj.p5 ==='+ myObj.p5 );\n}\n\nif(!(st_parseInt === \"parseInt\")){\n $ERROR('#11: myObj.parseInt === \"parseInt\". Actual: myObj.parseInt ==='+ myObj.parseInt );\n}\n\nif(!(st_NaN === \"NaN\")){\n $ERROR('#12: st_NaN === \"NaN\". Actual: st_NaN ==='+ st_NaN );\n}\n\nif(!(st_Infinity === \"Infinity\")){\n $ERROR('#13: st_Infinity === \"Infinity\". Actual: st_Infinity ==='+ st_Infinity );\n}\n\nif(!(st_eval === \"eval\")){\n $ERROR('#14: st_eval === \"eval\". Actual: st_eval ==='+ st_eval );\n}\n\nif(!(st_parseFloat === \"parseFloat\")){\n $ERROR('#15: st_parseFloat === \"parseFloat\". Actual: st_parseFloat ==='+ st_parseFloat );\n}\n\nif(!(st_isNaN === \"isNaN\")){\n $ERROR('#16: st_isNaN === \"isNaN\". Actual: st_isNaN ==='+ st_isNaN );\n}\n\nif(!(st_isFinite === \"isFinite\")){\n $ERROR('#17: st_isFinite === \"isFinite\". Actual: st_isFinite ==='+ st_isFinite );\n}\n\nif(!(value === undefined)){\n $ERROR('#18: value === undefined. Actual: value ==='+ value );\n}\n\nif(!(myObj.value === \"myObj_value\")){\n $ERROR('#19: myObj.value === \"myObj_value\". Actual: myObj.value ==='+ myObj.value );\n}\n",
+ "id": "S12.10_A1.9_T3",
+ "strict_only": ""
+ },
+ {
+ "section": "12.10",
+ "description": "Using iteration statement within \"with\" statement, leading to normal completion",
+ "strict_mode_negative": "",
+ "test": "this.p1 = 1;\n\nvar result = \"result\";\n\nvar myObj = {\n p1: 'a', \n value: 'myObj_value',\n valueOf : function(){return 'obj_valueOf';}\n}\n\nwith(myObj){\n do{\n p1 = 'x1';\n } while(false);\n}\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif(p1 !== 1){\n $ERROR('#1: p1 === 1. Actual: p1 ==='+ p1 );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif(myObj.p1 !== \"x1\"){\n $ERROR('#2: myObj.p1 === \"x1\". Actual: myObj.p1 ==='+ myObj.p1 );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n\n\n",
+ "id": "S12.10_A3.10_T1",
+ "strict_only": ""
+ },
+ {
+ "section": "12.10",
+ "description": "Using iteration statement within \"with\" statement, leading completion by exception",
+ "strict_mode_negative": "",
+ "test": "this.p1 = 1;\n\nvar result = \"result\";\n\nvar myObj = {\n p1: 'a', \n value: 'myObj_value',\n valueOf : function(){return 'obj_valueOf';}\n}\n\ntry {\n with(myObj){\n do{\n p1 = 'x1';\n throw value;\n } while(false);\n }\n} catch(e){\n result = p1;\n}\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif(result !== 1){\n $ERROR('#1: result === 1. Actual: result ==='+ result );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif(p1 !== 1){\n $ERROR('#2: p1 === 1. Actual: p1 ==='+ p1 );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#3\nif(myObj.p1 !== \"x1\"){\n $ERROR('#3: myObj.p1 === \"x1\". Actual: myObj.p1 ==='+ myObj.p1 );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S12.10_A3.10_T2",
+ "strict_only": ""
+ },
+ {
+ "section": "12.10",
+ "description": "Using iteration statement within \"with\" statement, leading completion by exception",
+ "strict_mode_negative": "",
+ "test": "this.p1 = 1;\n\nvar result = \"result\";\n\nvar myObj = {\n p1: 'a', \n value: 'myObj_value',\n valueOf : function(){return 'obj_valueOf';}\n}\n\ntry {\n with(myObj){\n do{\n throw value;\n p1 = 'x1';\n } while(false);\n }\n} catch(e){\n result = p1;\n}\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif(result !== 1){\n $ERROR('#1: result === 1. Actual: result ==='+ result );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif(p1 !== 1){\n $ERROR('#2: p1 === 1. Actual: p1 ==='+ p1 );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#3\nif(myObj.p1 !== \"a\"){\n $ERROR('#3: myObj.p1 === \"a\". Actual: myObj.p1 ==='+ myObj.p1 );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S12.10_A3.10_T3",
+ "strict_only": ""
+ },
+ {
+ "section": "12.10",
+ "description": "Using iteration statement within \"with\" statement, leading completion be break",
+ "strict_mode_negative": "",
+ "test": "this.p1 = 1;\n\nvar result = \"result\";\n\nvar myObj = {\n p1: 'a', \n value: 'myObj_value',\n valueOf : function(){return 'obj_valueOf';}\n}\n\nwith(myObj){\n do{\n p1 = 'x1';\n break;\n } while(false);\n}\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif(p1 !== 1){\n $ERROR('#1: p1 === 1. Actual: p1 ==='+ p1 );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif(myObj.p1 !== \"x1\"){\n $ERROR('#2: myObj.p1 === \"x1\". Actual: myObj.p1 ==='+ myObj.p1 );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n\n",
+ "id": "S12.10_A3.10_T4",
+ "strict_only": ""
+ },
+ {
+ "section": "12.10",
+ "description": "Using iteration statement within \"with\" statement, leading completion be break",
+ "strict_mode_negative": "",
+ "test": "this.p1 = 1;\n\nvar result = \"result\";\n\nvar myObj = {\n p1: 'a', \n value: 'myObj_value',\n valueOf : function(){return 'obj_valueOf';}\n}\n\nwith(myObj){\n do{\n break;\n p1 = 'x1';\n } while(false);\n}\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif(p1 !== 1){\n $ERROR('#1: p1 === 1. Actual: p1 ==='+ p1 );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif(myObj.p1 !== \"a\"){\n $ERROR('#2: myObj.p1 === \"a\". Actual: myObj.p1 ==='+ myObj.p1 );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S12.10_A3.10_T5",
+ "strict_only": ""
+ },
+ {
+ "section": "12.10",
+ "description": "Calling a function within \"with\" statement declared without the statement, leading to normal completion",
+ "strict_mode_negative": "",
+ "test": "this.p1 = 1;\nvar result = \"result\";\nvar myObj = {p1: 'a', \n value: 'myObj_value',\n valueOf : function(){return 'obj_valueOf';}\n}\n\nvar f = function(){\n p1 = 'x1';\n}\n\nwith(myObj){\n f();\n}\n\nif(!(p1 === \"x1\")){\n $ERROR('#1: p1 === \"x1\". Actual: p1 ==='+ p1 );\n}\n\nif(!(myObj.p1 === \"a\")){\n $ERROR('#2: myObj.p1 === \"a\". Actual: myObj.p1 ==='+ myObj.p1 );\n}\n",
+ "id": "S12.10_A3.11_T1",
+ "strict_only": ""
+ },
+ {
+ "section": "12.10",
+ "description": "Calling a function within \"with\" statement declared without the statement, leading to normal completion by \"return\"",
+ "strict_mode_negative": "",
+ "test": "this.p1 = 1;\nvar result = \"result\";\nvar value = \"value\";\nvar myObj = {p1: 'a', \n value: 'myObj_value',\n valueOf : function(){return 'obj_valueOf';}\n}\n\nvar f = function(){\n p1 = 'x1';\n return value;\n}\n\nwith(myObj){\n result = f();\n}\n\nif(!(p1 === \"x1\")){\n $ERROR('#1: p1 === \"x1\". Actual: p1 ==='+ p1 );\n}\n\nif(!(myObj.p1 === \"a\")){\n $ERROR('#2: myObj.p1 === \"a\". Actual: myObj.p1 ==='+ myObj.p1 );\n}\n\nif(!(result === \"value\")){\n $ERROR('#3: result === \"value\". Actual: result ==='+ result );\n}\n",
+ "id": "S12.10_A3.11_T2",
+ "strict_only": ""
+ },
+ {
+ "section": "12.10",
+ "description": "Calling a function within \"with\" statement declared without the statement, leading to normal completion by \"return\"",
+ "strict_mode_negative": "",
+ "test": "this.p1 = 1;\nvar result = \"result\";\nvar value = \"value\";\nvar myObj = {p1: 'a', \n value: 'myObj_value',\n valueOf : function(){return 'obj_valueOf';}\n}\n\nvar f = function(){\n return value;\n p1 = 'x1';\n}\n\nwith(myObj){\n result = f();\n}\n\nif(!(p1 === 1)){\n $ERROR('#1: p1 === 1. Actual: p1 ==='+ p1 );\n}\n\nif(!(myObj.p1 === \"a\")){\n $ERROR('#2: myObj.p1 === \"a\". Actual: myObj.p1 ==='+ myObj.p1 );\n}\n\nif(!(result === \"value\")){\n $ERROR('#3: result === \"value\". Actual: result ==='+ result );\n}\n\n",
+ "id": "S12.10_A3.11_T3",
+ "strict_only": ""
+ },
+ {
+ "section": "12.10",
+ "description": "Calling a function within \"with\" statement declared without the statement, leading to completion by exception",
+ "strict_mode_negative": "",
+ "test": "this.p1 = 1;\nvar result = \"result\";\nvar value = \"value\";\nvar myObj = {p1: 'a', \n value: 'myObj_value',\n valueOf : function(){return 'obj_valueOf';}\n}\n\ntry {\n var f = function(){\n p1 = 'x1';\n throw value;\n }\n \n with(myObj){\n f();\n }\n} catch(e){\n result = e;\n}\n\nif(!(p1 === \"x1\")){\n $ERROR('#1: p1 === \"x1\". Actual: p1 ==='+ p1 );\n}\n\nif(!(myObj.p1 === \"a\")){\n $ERROR('#2: myObj.p1 === \"a\". Actual: myObj.p1 ==='+ myObj.p1 );\n}\n\nif(!(result === \"value\")){\n $ERROR('#3: result === \"value\". Actual: result ==='+ result );\n}\n\n\n",
+ "id": "S12.10_A3.11_T4",
+ "strict_only": ""
+ },
+ {
+ "section": "12.10",
+ "description": "Calling a function within \"with\" statement declared without the statement, leading to completion by exception",
+ "strict_mode_negative": "",
+ "test": "this.p1 = 1;\nvar result = \"result\";\nvar value = \"value\";\nvar myObj = {p1: 'a', \n value: 'myObj_value',\n valueOf : function(){return 'obj_valueOf';}\n}\n\ntry {\n var f = function(){\n throw value;\n p1 = 'x1';\n }\n with(myObj){\n f();\n }\n} catch(e){\n result = e;\n}\n\nif(!(p1 === 1)){\n $ERROR('#1: p1 === 1. Actual: p1 ==='+ p1 );\n}\n\nif(!(myObj.p1 === \"a\")){\n $ERROR('#2: myObj.p1 === \"a\". Actual: myObj.p1 ==='+ myObj.p1 );\n}\n\nif(!(result === \"value\")){\n $ERROR('#3: result === \"value\". Actual: result ==='+ result );\n}\n\n",
+ "id": "S12.10_A3.11_T5",
+ "strict_only": ""
+ },
+ {
+ "section": "12.10",
+ "description": "Calling a function without \"with\" statement declared within the statement, leading to normal completion",
+ "strict_mode_negative": "",
+ "test": "this.p1 = 1;\nvar result = \"result\";\nvar myObj = {p1: 'a', \n value: 'myObj_value',\n valueOf : function(){return 'obj_valueOf';}\n}\n\nwith(myObj){\n var f = function(){\n p1 = 'x1';\n }\n}\n\nf();\n\nif(!(p1 === 1)){\n $ERROR('#1: p1 === 1. Actual: p1 ==='+ p1 );\n}\n\nif(!(myObj.p1 === \"x1\")){\n $ERROR('#2: myObj.p1 === \"x1\". Actual: myObj.p1 ==='+ myObj.p1 );\n}\n",
+ "id": "S12.10_A3.12_T1",
+ "strict_only": ""
+ },
+ {
+ "section": "12.10",
+ "description": "Calling a function without \"with\" statement declared within the statement, leading to normal completion by \"return\"",
+ "strict_mode_negative": "",
+ "test": "this.p1 = 1;\nvar result = \"result\";\nvar value = \"value\";\nvar myObj = {p1: 'a', \n value: 'myObj_value',\n valueOf : function(){return 'obj_valueOf';}\n}\n\nwith(myObj){\n var f = function(){\n p1 = 'x1'\n return value;\n }\n}\n\nresult = f();\n\nif(!(p1 === 1)){\n $ERROR('#1: p1 === 1. Actual: p1 ==='+ p1 );\n}\n\nif(!(myObj.p1 === \"x1\")){\n $ERROR('#2: myObj.p1 === \"x1\". Actual: myObj.p1 ==='+ myObj.p1 );\n}\n\nif(!(result === \"myObj_value\")){\n $ERROR('#3: result === \"myObj_value\". Actual: result ==='+ result );\n}\n",
+ "id": "S12.10_A3.12_T2",
+ "strict_only": ""
+ },
+ {
+ "section": "12.10",
+ "description": "Calling a function without \"with\" statement declared within the statement, leading to normal completion by \"return\"",
+ "strict_mode_negative": "",
+ "test": "this.p1 = 1;\nvar result = \"result\";\nvar value = \"value\";\nvar myObj = {p1: 'a', \n value: 'myObj_value',\n valueOf : function(){return 'obj_valueOf';}\n}\n\nwith(myObj){\n var f = function(){\n return value;\n p1 = 'x1';\n }\n}\nresult = f();\n\nif(!(p1 === 1)){\n $ERROR('#1: p1 === 1. Actual: p1 ==='+ p1 );\n}\n\nif(!(myObj.p1 === \"a\")){\n $ERROR('#2: myObj.p1 === \"a\". Actual: myObj.p1 ==='+ myObj.p1 );\n}\n\nif(!(result === \"myObj_value\")){\n $ERROR('#3: result === \"myObj_value\". Actual: result ==='+ result );\n}\n",
+ "id": "S12.10_A3.12_T3",
+ "strict_only": ""
+ },
+ {
+ "section": "12.10",
+ "description": "Calling a function without \"with\" statement declared within the statement, leading to completion by exception",
+ "strict_mode_negative": "",
+ "test": "this.p1 = 1;\nvar result = \"result\";\nvar value = \"value\";\nvar myObj = {p1: 'a', \n value: 'myObj_value',\n valueOf : function(){return 'obj_valueOf';}\n}\n\ntry {\n with(myObj){\n var f = function(){\n p1 = 'x1';\n throw value;\n }\n }\n f();\n} catch(e){\n result = e;\n}\n\nif(!(p1 === 1)){\n $ERROR('#1: p1 === 1. Actual: p1 ==='+ p1 );\n}\n\nif(!(myObj.p1 === \"x1\")){\n $ERROR('#2: myObj.p1 === \"x1\". Actual: myObj.p1 ==='+ myObj.p1 );\n}\n\nif(!(result === \"myObj_value\")){\n $ERROR('#3: result === \"myObj_value\". Actual: result ==='+ result );\n}\n\n",
+ "id": "S12.10_A3.12_T4",
+ "strict_only": ""
+ },
+ {
+ "section": "12.10",
+ "description": "Calling a function without \"with\" statement declared within the statement, leading to completion by exception",
+ "strict_mode_negative": "",
+ "test": "this.p1 = 1;\nvar result = \"result\";\nvar value = \"value\";\nvar myObj = {p1: 'a', \n value: 'myObj_value',\n valueOf : function(){return 'obj_valueOf';}\n}\n\ntry {\n with(myObj){\n var f = function(){\n throw value;\n p1 = 'x1';\n }\n }\n f();\n} catch(e){\n result = e;\n}\n\nif(!(p1 === 1)){\n $ERROR('#1: p1 === 1. Actual: p1 ==='+ p1 );\n}\n\nif(!(myObj.p1 === \"a\")){\n $ERROR('#2: myObj.p1 === \"a\". Actual: myObj.p1 ==='+ myObj.p1 );\n}\n\nif(!(result === \"myObj_value\")){\n $ERROR('#3: result === \"myObj_value\". Actual: result ==='+ result );\n}\n",
+ "id": "S12.10_A3.12_T5",
+ "strict_only": ""
+ },
+ {
+ "section": "12.10",
+ "description": "Using \"with\" statement within global context - normal completion",
+ "strict_mode_negative": "",
+ "test": "this.p1 = 1;\n\nvar result = \"result\";\n\nvar myObj = {\n p1: 'a', \n value: 'myObj_value',\n valueOf : function(){return 'obj_valueOf';}\n}\n\n\nwith(myObj){\n p1 = 'x1';\n}\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif(p1 !== 1){\n $ERROR('#1: p1 === 1. Actual: p1 ==='+ p1 );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif(myObj.p1 !== \"x1\"){\n $ERROR('#2: myObj.p1 === \"x1\". Actual: myObj.p1 ==='+ myObj.p1 );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n\n",
+ "id": "S12.10_A3.1_T1",
+ "strict_only": ""
+ },
+ {
+ "section": "12.10",
+ "description": "Using \"with\" statement within global context, leading to completion by exception",
+ "strict_mode_negative": "",
+ "test": "this.p1 = 1;\n\nvar result = \"result\";\n\nvar myObj = {\n p1: 'a', \n value: 'myObj_value',\n valueOf : function(){return 'obj_valueOf';}\n}\n\ntry {\n\n with(myObj){\n \n p1 = 'x1'\n throw value;\n \n }\n} catch(e){\n result = p1;\n}\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif(result !== 1){\n $ERROR('#1: result === 1. Actual: result ==='+ result );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif(p1 !== 1){\n $ERROR('#2: p1 === 1. Actual: p1 ==='+ p1 );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#3\nif (myObj.p1 !== \"x1\") {\n\t$ERROR('#3: myObj.p1 === \"x1\". Actual: myObj.p1 ==='+ myObj.p1 );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S12.10_A3.1_T2",
+ "strict_only": ""
+ },
+ {
+ "section": "12.10",
+ "description": "Using \"with\" statement within global context, leading to completion by exception",
+ "strict_mode_negative": "",
+ "test": "this.p1 = 1;\nvar result = \"result\";\nvar myObj = {p1: 'a', \n value: 'myObj_value',\n valueOf : function(){return 'obj_valueOf';}\n}\n\ntry {\n\n with(myObj){\n \n throw value;\n p1 = 'x1'\n }\n} catch(e){\n result = p1;\n}\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif(!(result === 1)){\n $ERROR('#1: result === 1. Actual: result ==='+ result );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif(!(p1 === 1)){\n $ERROR('#2: p1 === 1. Actual: p1 ==='+ p1 );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#3\nif(!(myObj.p1 === \"a\")){\n $ERROR('#3: myObj.p1 === \"a\". Actual: myObj.p1 ==='+ myObj.p1 );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n\n\n\n",
+ "id": "S12.10_A3.1_T3",
+ "strict_only": ""
+ },
+ {
+ "section": "12.10",
+ "description": "Declaring \"with\" statement within a function body, leading to normal completion",
+ "strict_mode_negative": "",
+ "test": "this.p1 = 1;\n\nvar result = \"result\";\n\nvar myObj = {\n p1: 'a', \n value: 'myObj_value',\n valueOf : function(){return 'obj_valueOf';}\n}\n\nvar f = function(){\n with(myObj){\n p1 = 'x1';\n }\n}\n\nf();\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif(p1 !== 1){\n $ERROR('#1: p1 === 1. Actual: p1 ==='+ p1 );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif(myObj.p1 !== \"x1\"){\n $ERROR('#2: myObj.p1 === \"x1\". Actual: myObj.p1 ==='+ myObj.p1 );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S12.10_A3.2_T1",
+ "strict_only": ""
+ },
+ {
+ "section": "12.10",
+ "description": "Declaring \"with\" statement within a function body, leading to normal completion by \"return\"",
+ "strict_mode_negative": "",
+ "test": "this.p1 = 1;\n\nvar result = \"result\";\n\nvar myObj = {\n p1: 'a', \n value: 'myObj_value',\n valueOf : function(){return 'obj_valueOf';}\n}\n\nvar f = function(){\n with(myObj){\n p1 = 'x1';\n return value;\n }\n};\n\nf();\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif(p1 !== 1){\n $ERROR('#1: p1 === 1. Actual: p1 ==='+ p1 );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif(myObj.p1 !== \"x1\"){\n $ERROR('#1: myObj.p1 === \"x1\". Actual: myObj.p1 ==='+ myObj.p1 );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n\n",
+ "id": "S12.10_A3.2_T2",
+ "strict_only": ""
+ },
+ {
+ "section": "12.10",
+ "description": "Declaring \"with\" statement within a function body, leading to normal completion by \"return\"",
+ "strict_mode_negative": "",
+ "test": "this.p1 = 1;\n\nvar result = \"result\";\n\nvar myObj = {\n p1: 'a', \n value: 'myObj_value',\n valueOf : function(){return 'obj_valueOf';}\n}\n\nvar f = function(){\n with(myObj){\n return value;\n p1 = 'x1';\n }\n};\n\nf();\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif(p1 !== 1){\n $ERROR('#1: p1 === 1. Actual: p1 ==='+ p1 );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif(myObj.p1 !== \"a\"){\n $ERROR('#2: myObj.p1 === \"a\". Actual: myObj.p1 ==='+ myObj.p1 );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S12.10_A3.2_T3",
+ "strict_only": ""
+ },
+ {
+ "section": "12.10",
+ "description": "Declaring \"with\" statement within a function body, leading to completion by exception",
+ "strict_mode_negative": "",
+ "test": "this.p1 = 1;\n\nvar result = \"result\";\n\nvar myObj = {\n p1: 'a', \n value: 'myObj_value',\n valueOf : function(){return 'obj_valueOf';}\n}\n\ntry {\n var f = function(){\n with(myObj){\n p1 = 'x1';\n throw value;\n }\n };\n \n f();\n} catch(e){\n result = p1;\n}\n\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif(result !== 1){\n $ERROR('#1: result === 1. Actual: result ==='+ result );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif(p1 !== 1){\n $ERROR('#2: p1 === 1. Actual: p1 ==='+ p1 );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#3\nif(myObj.p1 !== \"x1\"){\n $ERROR('#3: myObj.p1 === \"x1\". Actual: myObj.p1 ==='+ myObj.p1 );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S12.10_A3.2_T4",
+ "strict_only": ""
+ },
+ {
+ "section": "12.10",
+ "description": "Declaring \"with\" statement within a function body, leading to completion by exception",
+ "strict_mode_negative": "",
+ "test": "this.p1 = 1;\n\nvar result = \"result\";\n\nvar myObj = {\n p1: 'a', \n value: 'myObj_value',\n valueOf : function(){return 'obj_valueOf';}\n};\n\ntry {\n var f = function(){\n with(myObj){\n throw value;\n p1 = 'x1';\n }\n };\n f();\n} catch(e){\n result = p1;\n}\n\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif(result !== 1){\n $ERROR('#1: result === 1. Actual: result ==='+ result );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif(p1 !== 1){\n $ERROR('#2: p1 === 1. Actual: p1 ==='+ p1 );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#3\nif(myObj.p1 !== \"a\"){\n $ERROR('#3: myObj.p1 === \"a\". Actual: myObj.p1 ==='+ myObj.p1 );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n\n\n\n",
+ "id": "S12.10_A3.2_T5",
+ "strict_only": ""
+ },
+ {
+ "section": "12.10",
+ "description": "Declaring \"with\" statement within a function constructor, leading to normal completion",
+ "strict_mode_negative": "",
+ "test": "this.p1 = 1;\n\nvar result = \"result\";\n\nvar myObj = {\n p1: 'a', \n value: 'myObj_value',\n valueOf : function(){return 'obj_valueOf';}\n}\n\nfunction __FACTORY(){\n with(myObj){\n p1 = 'x1';\n }\n}\n\nvar obj = new __FACTORY();\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif(p1 !== 1){\n $ERROR('#1: p1 === 1. Actual: p1 ==='+ p1 );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif(myObj.p1 !== \"x1\"){\n $ERROR('#2: myObj.p1 === \"x1\". Actual: myObj.p1 ==='+ myObj.p1 );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n\n",
+ "id": "S12.10_A3.3_T1",
+ "strict_only": ""
+ },
+ {
+ "section": "12.10",
+ "description": "Declaring \"with\" statement within a function constructor, leading to normal completion by \"return\"",
+ "strict_mode_negative": "",
+ "test": "this.p1 = 1;\n\nvar result = \"result\";\n\nvar myObj = {\n p1: 'a', \n value: 'myObj_value',\n valueOf : function(){return 'obj_valueOf';}\n}\n\nfunction __FACTORY(){\n with(myObj){\n p1 = 'x1';\n return value;\n }\n}\n\nvar obj = new __FACTORY;\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif(p1 !== 1){\n $ERROR('#1: p1 === 1. Actual: p1 ==='+ p1 );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif(myObj.p1 !== \"x1\"){\n $ERROR('#2: myObj.p1 === \"x1\". Actual: myObj.p1 ==='+ myObj.p1 );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S12.10_A3.3_T2",
+ "strict_only": ""
+ },
+ {
+ "section": "12.10",
+ "description": "Declaring \"with\" statement within a function constructor, leading to normal completion by \"return\"",
+ "strict_mode_negative": "",
+ "test": "this.p1 = 1;\n\nvar result = \"result\";\n\nvar myObj = {\n p1: 'a', \n value: 'myObj_value',\n valueOf : function(){return 'obj_valueOf';}\n}\n\nfunction __FACTORY(){\n with(myObj){\n return value;\n p1 = 'x1';\n }\n}\n\nvar obj = new __FACTORY;\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif(p1 !== 1){\n $ERROR('#1: p1 === 1. Actual: p1 ==='+ p1 );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif(myObj.p1 !== \"a\"){\n $ERROR('#2: myObj.p1 === \"a\". Actual: myObj.p1 ==='+ myObj.p1 );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n\n",
+ "id": "S12.10_A3.3_T3",
+ "strict_only": ""
+ },
+ {
+ "section": "12.10",
+ "description": "Declaring \"with\" statement within a function constructor, leading to completion by exception",
+ "strict_mode_negative": "",
+ "test": "this.p1 = 1;\n\nvar result = \"result\";\n\nvar myObj = {\n p1: 'a',\n value: 'myObj_value',\n valueOf : function(){return 'obj_valueOf';}\n};\n\nfunction __FACTORY(){\n with(myObj){\n var p1 = 'x1';\n throw value;\n }\n}\n\ntry {\n var obj = new __FACTORY();\n} catch(e){\n result = p1;\n}\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (result !== 1) {\n $ERROR('#1: result === 1. Actual: result ==='+ result );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (p1 !== 1) {\n $ERROR('#2: p1 === 1. Actual: p1 ==='+ p1 );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#3\nif (myObj.p1 !== \"x1\") {\n $ERROR('#3: myObj.p1 === \"x1\". Actual: myObj.p1 ==='+ myObj.p1 );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S12.10_A3.3_T4",
+ "strict_only": ""
+ },
+ {
+ "section": "12.10",
+ "description": "Declaring \"with\" statement within a function constructor, leading to completion by exception",
+ "strict_mode_negative": "",
+ "test": "this.p1 = 1;\n\nvar result = \"result\";\n\nvar myObj = {\n p1: 'a', \n value: 'myObj_value',\n valueOf : function(){return 'obj_valueOf';}\n}\n\ntry {\n function __FACTORY(){\n with(myObj){\n throw value;\n p1 = 'x1';\n }\n }\n var obj = new __FACTORY();\n} catch(e){\n result = p1;\n}\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif(result !== 1){\n $ERROR('#1: result === 1. Actual: result ==='+ result );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif(p1 !== 1){\n $ERROR('#2: p1 === 1. Actual: p1 ==='+ p1 );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#3\nif(myObj.p1 !== \"a\"){\n $ERROR('#3: myObj.p1 === \"a\". Actual: myObj.p1 ==='+ myObj.p1 );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n",
+ "id": "S12.10_A3.3_T5",
+ "strict_only": ""
+ },
+ {
+ "section": "12.10",
+ "description": "Using \"with\" statement within iteration statement, leading to normal completion",
+ "strict_mode_negative": "",
+ "test": "this.p1 = 1;\n\nvar result = \"result\";\n\nvar myObj = {\n p1: 'a', \n value: 'myObj_value',\n valueOf : function(){return 'obj_valueOf';}\n}\n\ndo {\n with(myObj){\n p1 = 'x1';\n }\n} while(false);\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif(p1 !== 1){\n $ERROR('#1: p1 === 1. Actual: p1 ==='+ p1 );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif(myObj.p1 !== \"x1\"){\n $ERROR('#2: myObj.p1 === \"x1\". Actual: myObj.p1 ==='+ myObj.p1 );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n\n",
+ "id": "S12.10_A3.4_T1",
+ "strict_only": ""
+ },
+ {
+ "section": "12.10",
+ "description": "Using \"with\" statement within iteration statement, leading to completion by exception",
+ "strict_mode_negative": "",
+ "test": "this.p1 = 1;\n\nvar result = \"result\";\n\nvar myObj = {\n p1: 'a', \n value: 'myObj_value',\n valueOf : function(){return 'obj_valueOf';}\n}\n\ntry {\n do{\n with(myObj){\n p1 = 'x1';\n throw value;\n }\n } while(false);\n} catch(e){\n result = p1;\n}\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif(result !== 1){\n $ERROR('#1: result === 1. Actual: result ==='+ result );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif(p1 !== 1){\n $ERROR('#2: p1 === 1. Actual: p1 ==='+ p1 );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#3\nif(myObj.p1 !== \"x1\"){\n $ERROR('#3: myObj.p1 === \"x1\". Actual: myObj.p1 ==='+ myObj.p1 );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S12.10_A3.4_T2",
+ "strict_only": ""
+ },
+ {
+ "section": "12.10",
+ "description": "Using \"with\" statement within iteration statement, leading to completion by exception",
+ "strict_mode_negative": "",
+ "test": "this.p1 = 1;\n\nvar result = \"result\";\n\nvar myObj = {\n p1: 'a', \n value: 'myObj_value',\n valueOf : function(){return 'obj_valueOf';}\n}\n\ntry {\n do{\n with(myObj){\n throw value;\n p1 = 'x1';\n }\n } while(false);\n} catch(e){\n result = p1;\n}\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif(result !== 1){\n $ERROR('#1: result === 1. Actual: result ==='+ result );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif(p1 !== 1){\n $ERROR('#2: p1 === 1. Actual: p1 ==='+ p1 );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#3\nif(myObj.p1 !== \"a\"){\n $ERROR('#3: myObj.p1 === \"a\". Actual: myObj.p1 ==='+ myObj.p1 );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S12.10_A3.4_T3",
+ "strict_only": ""
+ },
+ {
+ "section": "12.10",
+ "description": "Using \"with\" statement within iteration statement, leading to completion by break",
+ "strict_mode_negative": "",
+ "test": "this.p1 = 1;\n\nvar result = \"result\";\n\nvar myObj = {\n p1: 'a', \n value: 'myObj_value',\n valueOf : function(){return 'obj_valueOf';}\n}\n\ndo {\n with(myObj){\n p1 = 'x1';\n break;\n }\n} while(false);\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif(p1 !== 1){\n $ERROR('#1: p1 === 1. Actual: p1 ==='+ p1 );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif(myObj.p1 !== \"x1\"){\n $ERROR('#2: myObj.p1 === \"x1\". Actual: myObj.p1 ==='+ myObj.p1 );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n\n",
+ "id": "S12.10_A3.4_T4",
+ "strict_only": ""
+ },
+ {
+ "section": "12.10",
+ "description": "Using \"with\" statement within iteration statement, leading to completion by break",
+ "strict_mode_negative": "",
+ "test": "this.p1 = 1;\n\nvar result = \"result\";\n\nvar myObj = {\n p1: 'a', \n value: 'myObj_value',\n valueOf : function(){return 'obj_valueOf';}\n}\n\ndo {\n with(myObj){\n break;\n p1 = 'x1';\n }\n} while(false);\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif(p1 !== 1){\n $ERROR('#1: p1 === 1. Actual: p1 ==='+ p1 );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif(myObj.p1 !== \"a\"){\n $ERROR('#2: myObj.p1 === \"a\". Actual: myObj.p1 ==='+ myObj.p1 );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n\n",
+ "id": "S12.10_A3.4_T5",
+ "strict_only": ""
+ },
+ {
+ "section": "12.10",
+ "description": "Using \"with\" statement within \"for-in\" statement, leading to normal completion",
+ "strict_mode_negative": "",
+ "test": "this.p1 = 1;\n\nvar result = \"result\";\n\nvar myObj = {\n p1: 'a', \n value: 'myObj_value',\n valueOf : function(){return 'obj_valueOf';}\n}\n\nfor(var prop in myObj){\n with(myObj){\n p1 = 'x1';\n }\n}\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif(p1 !== 1){\n $ERROR('#1: p1 === 1. Actual: p1 ==='+ p1 );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif(myObj.p1 !== \"x1\"){\n $ERROR('#2: myObj.p1 === \"x1\". Actual: myObj.p1 ==='+ myObj.p1 );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S12.10_A3.5_T1",
+ "strict_only": ""
+ },
+ {
+ "section": "12.10",
+ "description": "Using \"with\" statement within \"for-in\" statement, leading to completion by exception",
+ "strict_mode_negative": "",
+ "test": "this.p1 = 1;\n\nvar result = \"result\";\n\nvar myObj = {\n p1: 'a', \n value: 'myObj_value',\n valueOf : function(){return 'obj_valueOf';}\n}\n\ntry {\n for(var prop in myObj){\n with(myObj){\n p1 = 'x1';\n throw value;\n }\n }\n} catch(e){\n result = p1;\n}\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif(result !== 1){\n $ERROR('#1: result === 1. Actual: result ==='+ result );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif(p1 !== 1){\n $ERROR('#2: p1 === 1. Actual: p1 ==='+ p1 );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#3\nif(myObj.p1 !== \"x1\"){\n $ERROR('#3: myObj.p1 === \"x1\". Actual: myObj.p1 ==='+ myObj.p1 );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S12.10_A3.5_T2",
+ "strict_only": ""
+ },
+ {
+ "section": "12.10",
+ "description": "Using \"with\" statement within \"for-in\" statement, leading to completion by exception",
+ "strict_mode_negative": "",
+ "test": "this.p1 = 1;\n\nvar result = \"result\";\n\nvar myObj = {\n p1: 'a', \n value: 'myObj_value',\n valueOf : function(){return 'obj_valueOf';}\n}\n\ntry {\n for(var prop in myObj){\n with(myObj){\n throw value;\n p1 = 'x1';\n }\n }\n} catch(e){\n result = p1;\n}\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif(result !== 1){\n $ERROR('#1: result === 1. Actual: result ==='+ result );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif(p1 !== 1){\n $ERROR('#2: p1 === 1. Actual: p1 ==='+ p1 );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#3\nif(myObj.p1 !== \"a\"){\n $ERROR('#3: myObj.p1 === \"a\". Actual: myObj.p1 ==='+ myObj.p1 );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S12.10_A3.5_T3",
+ "strict_only": ""
+ },
+ {
+ "section": "12.10",
+ "description": "Using \"with\" statement within \"for-in\" statement, leading to completion by break",
+ "strict_mode_negative": "",
+ "test": "this.p1 = 1;\n\nvar result = \"result\";\n\nvar myObj = {\n p1: 'a', \n value: 'myObj_value',\n valueOf : function(){return 'obj_valueOf';}\n}\n\nfor(var prop in myObj){\n with(myObj){\n p1 = 'x1';\n break;\n }\n}\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif(p1 !== 1){\n $ERROR('#1: p1 === 1. Actual: p1 ==='+ p1 );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif(myObj.p1 !== \"x1\"){\n $ERROR('#2: myObj.p1 === \"x1\". Actual: myObj.p1 ==='+ myObj.p1 );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S12.10_A3.5_T4",
+ "strict_only": ""
+ },
+ {
+ "section": "12.10",
+ "description": "Using \"with\" statement within \"for-in\" statement, leading to completion by break",
+ "strict_mode_negative": "",
+ "test": "this.p1 = 1;\n\nvar result = \"result\";\n\nvar myObj = {\n p1: 'a', \n value: 'myObj_value',\n valueOf : function(){return 'obj_valueOf';}\n}\n\nfor(var prop in myObj){\n with(myObj){\n break;\n p1 = 'x1';\n }\n}\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif(p1 !== 1){\n $ERROR('#1: p1 === 1. Actual: p1 ==='+ p1 );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif(myObj.p1 !== \"a\"){\n $ERROR('#1: myObj.p1 === \"a\". Actual: myObj.p1 ==='+ myObj.p1 );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n\n\n",
+ "id": "S12.10_A3.5_T5",
+ "strict_only": ""
+ },
+ {
+ "section": "12.10",
+ "description": "Using \"with\" statement within another \"with\" statement, leading to normal completion",
+ "strict_mode_negative": "",
+ "test": "this.p1 = 1;\n\nvar result = \"result\";\n\nvar myObj = {\n p1: 'a', \n value: 'myObj_value',\n valueOf : function(){return 'obj_valueOf';}\n}\n\nvar theirObj = {\n p1: true, \n value: 'theirObj_value',\n valueOf : function(){return 'thr_valueOf';}\n}\n\nwith(myObj){\n with(theirObj){\n p1 = 'x1';\n }\n}\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif(p1 !== 1){\n $ERROR('#1: p1 === 1. Actual: p1 ==='+ p1 );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif(myObj.p1 !== \"a\"){\n $ERROR('#2: myObj.p1 === \"a\". Actual: myObj.p1 ==='+ myObj.p1 );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#3\nif(theirObj.p1 !== \"x1\"){\n $ERROR('#3: theirObj.p1 === \"x1\". Actual: theirObj.p1 ==='+ theirObj.p1 );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n\n",
+ "id": "S12.10_A3.6_T1",
+ "strict_only": ""
+ },
+ {
+ "section": "12.10",
+ "description": "Using \"with\" statement within another \"with\" statement, leading to completion by exception",
+ "strict_mode_negative": "",
+ "test": "this.p1 = 1;\n\nvar result = \"result\";\n\nvar myObj = {\n p1: 'a', \n value: 'myObj_value',\n valueOf : function(){return 'obj_valueOf';}\n}\n\nvar theirObj = {\n p1: true, \n value: 'theirObj_value',\n valueOf : function(){return 'thr_valueOf';}\n}\n\n\ntry {\n with(myObj){\n with(theirObj){\n p1 = 'x1';\n throw value;\n }\n }\n} catch(e){\n result = p1;\n}\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif(p1 !== 1){\n $ERROR('#1: p1 === 1. Actual: p1 ==='+ p1 );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif(myObj.p1 !== \"a\"){\n $ERROR('#2: myObj.p1 === \"a\". Actual: myObj.p1 ==='+ myObj.p1 );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#3\nif(theirObj.p1 !== \"x1\"){\n $ERROR('#3: theirObj.p1 === \"x1\". Actual: theirObj.p1 ==='+ theirObj.p1 );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n",
+ "id": "S12.10_A3.6_T2",
+ "strict_only": ""
+ },
+ {
+ "section": "12.10",
+ "description": "Using \"with\" statement within another \"with\" statement, leading to completion by exception",
+ "strict_mode_negative": "",
+ "test": "this.p1 = 1;\n\nvar result = \"result\";\n\nvar myObj = {\n p1: 'a', \n value: 'myObj_value',\n valueOf : function(){return 'obj_valueOf';}\n}\n\nvar theirObj = {\n p1: true, \n value: 'theirObj_value',\n valueOf : function(){return 'thr_valueOf';}\n}\n\n\ntry {\n with(myObj){\n with(theirObj){\n throw value;\n p1 = 'x1';\n \n }\n }\n} catch(e){\n result = p1;\n}\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif(p1 !== 1){\n $ERROR('#1: p1 === 1. Actual: p1 ==='+ p1 );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif(myObj.p1 !== \"a\"){\n $ERROR('#2: myObj.p1 === \"a\". Actual: myObj.p1 ==='+ myObj.p1 );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#3\nif(theirObj.p1 !== true){\n $ERROR('#3: theirObj.p1 === true. Actual: theirObj.p1 ==='+ theirObj.p1 );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n",
+ "id": "S12.10_A3.6_T3",
+ "strict_only": ""
+ },
+ {
+ "section": "12.10",
+ "description": "Declaring and calling a function within \"with\" statement, leading to normal completion",
+ "strict_mode_negative": "",
+ "test": "this.p1 = 1;\n\nvar result = \"result\";\n\nvar myObj = {\n p1: 'a', \n value: 'myObj_value',\n valueOf : function(){return 'obj_valueOf';}\n}\n\nwith(myObj){\n (function(){\n p1 = 'x1';\n })();\n}\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif(p1 !== 1){\n $ERROR('#1: p1 === 1. Actual: p1 ==='+ p1 );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif(myObj.p1 !== \"x1\"){\n $ERROR('#2: myObj.p1 === \"x1\". Actual: myObj.p1 ==='+ myObj.p1 );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n\n",
+ "id": "S12.10_A3.7_T1",
+ "strict_only": ""
+ },
+ {
+ "section": "12.10",
+ "description": "Declaring and calling a function within \"with\" statement, leading to normal completion by \"return\"",
+ "strict_mode_negative": "",
+ "test": "this.p1 = 1;\n\nvar result = \"result\";\n\nvar myObj = {\n p1: 'a', \n value: 'myObj_value',\n valueOf : function(){return 'obj_valueOf';}\n}\n\nwith(myObj){\n result=(function(){\n p1 = 'x1';\n return value;\n })();\n}\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif(p1 !== 1){\n $ERROR('#1: p1 === 1. Actual: p1 ==='+ p1 );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif(result !== \"myObj_value\"){\n $ERROR('#2: result === \"myObj_value\". Actual: result ==='+ result );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#3\nif(myObj.p1 !== \"x1\"){\n $ERROR('#3: myObj.p1 === \"x1\". Actual: myObj.p1 ==='+ myObj.p1 );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n\n",
+ "id": "S12.10_A3.7_T2",
+ "strict_only": ""
+ },
+ {
+ "section": "12.10",
+ "description": "Declaring and calling a function within \"with\" statement, leading to normal completion by \"return\"",
+ "strict_mode_negative": "",
+ "test": "this.p1 = 1;\n\nvar result = \"result\";\n\nvar myObj = {\n p1: 'a', \n value: 'myObj_value',\n valueOf : function(){return 'obj_valueOf';}\n}\n\nwith(myObj){\n result=(function(){\n return value;\n p1 = 'x1';\n })();\n}\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif(p1 !== 1){\n $ERROR('#1: p1 === 1. Actual: p1 ==='+ p1 );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif(result !== 'myObj_value'){\n $ERROR('#2: result === \\'myObj_value\\'. Actual: result ==='+ result );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#3\nif(myObj.p1 !== \"a\"){\n $ERROR('#3: myObj.p1 === \"a\". Actual: myObj.p1 ==='+ myObj.p1 );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S12.10_A3.7_T3",
+ "strict_only": ""
+ },
+ {
+ "section": "12.10",
+ "description": "Declaring and calling a function within \"with\" statement, leading to completion by exception",
+ "strict_mode_negative": "",
+ "test": "this.p1 = 1;\n\nvar result = \"result\";\n\nvar myObj = {\n p1: 'a', \n value: 'myObj_value',\n valueOf : function(){return 'obj_valueOf';}\n}\n\ntry {\n with(myObj){\n (function (){\n p1 = 'x1';\n throw value;\n })();\n }\n} catch(e){\n result = p1;\n}\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif(result !== 1){\n $ERROR('#1: result === 1. Actual: result ==='+ result );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif(p1 !== 1){\n $ERROR('#2: p1 === 1. Actual: p1 ==='+ p1 );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#3\nif(myObj.p1 !== \"x1\"){\n $ERROR('#3: myObj.p1 === \"x1\". Actual: myObj.p1 ==='+ myObj.p1 );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S12.10_A3.7_T4",
+ "strict_only": ""
+ },
+ {
+ "section": "12.10",
+ "description": "Declaring and calling a function within \"with\" statement, leading to completion by exception",
+ "strict_mode_negative": "",
+ "test": "this.p1 = 1;\n\nvar result = \"result\";\n\nvar myObj = {\n p1: 'a', \n value: 'myObj_value',\n valueOf : function(){return 'obj_valueOf';}\n}\n\ntry {\n with(myObj){\n (function f(){\n throw value;\n p1 = 'x1';\n })();\n }\n} catch(e){\n result = p1;\n}\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif(result !== 1){\n $ERROR('#1: result === 1. Actual: result ==='+ result );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif(p1 !== 1){\n $ERROR('#2: p1 === 1. Actual: p1 ==='+ p1 );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#3\nif(myObj.p1 !== \"a\"){\n $ERROR('#3: myObj.p1 === \"a\". Actual: myObj.p1 ==='+ myObj.p1 );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S12.10_A3.7_T5",
+ "strict_only": ""
+ },
+ {
+ "section": "12.10",
+ "description": "Declaring function constructor within \"with\" statement, leading to normal completion",
+ "strict_mode_negative": "",
+ "test": "this.p1 = 1;\n\nvar result = \"result\";\n\nvar myObj = {\n p1: 'a', \n value: 'myObj_value',\n valueOf : function(){return 'obj_valueOf';}\n}\n\nwith(myObj){\n var __FACTORY = function(){\n p1 = 'x1';\n }\n var obj = new __FACTORY;\n}\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif(p1 !== 1){\n $ERROR('#1: p1 === 1. Actual: p1 ==='+ p1 );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif(myObj.p1 !== \"x1\"){\n $ERROR('#2: myObj.p1 === \"x1\". Actual: myObj.p1 ==='+ myObj.p1 );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S12.10_A3.8_T1",
+ "strict_only": ""
+ },
+ {
+ "section": "12.10",
+ "description": "Declaring function constructor within \"with\" statement, leading to normal completion by \"return\"",
+ "strict_mode_negative": "",
+ "test": "this.p1 = 1;\n\nvar result = \"result\";\n\nvar myObj = {\n p1: 'a', \n value: 'myObj_value',\n valueOf : function(){return 'obj_valueOf';}\n}\n\nwith(myObj){\n var __FACTORY = function(){\n p1 = 'x1';\n return value;\n }\n var obj = new __FACTORY;\n}\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif(p1 !== 1){\n $ERROR('#1: p1 === 1. Actual: p1 ==='+ p1 );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif(myObj.p1 !== \"x1\"){\n $ERROR('#2: myObj.p1 === \"x1\". Actual: myObj.p1 ==='+ myObj.p1 );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S12.10_A3.8_T2",
+ "strict_only": ""
+ },
+ {
+ "section": "12.10",
+ "description": "Declaring function constructor within \"with\" statement, leading to normal completion by \"return\"",
+ "strict_mode_negative": "",
+ "test": "this.p1 = 1;\n\nvar result = \"result\";\n\nvar myObj = {\n p1: 'a', \n value: 'myObj_value',\n valueOf : function(){return 'obj_valueOf';}\n}\n\nwith(myObj){\n var __FACTORY = function(){\n return value;\n p1 = 'x1';\n }\n var obj = new __FACTORY;\n}\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif(p1 !== 1){\n $ERROR('#1: p1 === 1. Actual: p1 ==='+ p1 );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif(myObj.p1 !== \"a\"){\n $ERROR('#2: myObj.p1 === \"a\". Actual: myObj.p1 ==='+ myObj.p1 );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S12.10_A3.8_T3",
+ "strict_only": ""
+ },
+ {
+ "section": "12.10",
+ "description": "Declaring function constructor within \"with\" statement, leading to completion by exception",
+ "strict_mode_negative": "",
+ "test": "this.p1 = 1;\n\nvar result = \"result\";\n\nvar myObj = {\n p1: 'a', \n value: 'myObj_value',\n valueOf : function(){return 'obj_valueOf';}\n}\n\ntry {\n with(myObj){\n var __FACTORY = function(){\n p1 = 'x1';\n throw value;\n }\n var obj = new __FACTORY;\n }\n} catch(e){\n result = p1;\n}\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif(result !== 1){\n $ERROR('#1: result === 1. Actual: result ==='+ result );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif(p1 !== 1){\n $ERROR('#2: p1 === 1. Actual: p1 ==='+ p1 );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#3\nif(myObj.p1 !== \"x1\"){\n $ERROR('#3: myObj.p1 === \"x1\". Actual: myObj.p1 ==='+ myObj.p1 );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S12.10_A3.8_T4",
+ "strict_only": ""
+ },
+ {
+ "section": "12.10",
+ "description": "Declaring function constructor within \"with\" statement, leading to completion by exception",
+ "strict_mode_negative": "",
+ "test": "this.p1 = 1;\n\nvar result = \"result\";\n\nvar myObj = {\n p1: 'a', \n value: 'myObj_value',\n valueOf : function(){return 'obj_valueOf';}\n}\n\ntry {\n with(myObj){\n var __FACTORY = function(){\n throw value;\n p1 = 'x1';\n }\n var obj = new __FACTORY;\n }\n} catch(e){\n result = p1;\n}\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif(result !== 1){\n $ERROR('#1: result === 1. Actual: result ==='+ result );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif(p1 !== 1){\n $ERROR('#2: p1 === 1. Actual: p1 ==='+ p1 );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#3\nif(myObj.p1 !== \"a\"){\n $ERROR('#3: myObj.p1 === \"a\". Actual: myObj.p1 ==='+ myObj.p1 );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S12.10_A3.8_T5",
+ "strict_only": ""
+ },
+ {
+ "section": "12.10",
+ "description": "Using \"for-in\" statement within \"with\" statement, leading to normal completion",
+ "strict_mode_negative": "",
+ "test": "this.p1 = 1;\n\nvar result = \"result\";\n\nvar myObj = {\n p1: 'a', \n value: 'myObj_value',\n valueOf : function(){return 'obj_valueOf';}\n}\n\nwith(myObj){\n for(var prop in myObj){\n p1 = 'x1';\n }\n}\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif(p1 !== 1){\n $ERROR('#1: p1 === 1. Actual: p1 ==='+ p1 );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif(myObj.p1 !== \"x1\"){\n $ERROR('#2: myObj.p1 === \"x1\". Actual: myObj.p1 ==='+ myObj.p1 );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n\n",
+ "id": "S12.10_A3.9_T1",
+ "strict_only": ""
+ },
+ {
+ "section": "12.10",
+ "description": "Using \"for-in\" statement within \"with\" statement, leading to completion by break",
+ "strict_mode_negative": "",
+ "test": "this.p1 = 1;\n\nvar result = \"result\";\n\nvar myObj = {\n p1: 'a', \n value: 'myObj_value',\n valueOf : function(){return 'obj_valueOf';}\n}\n\nwith(myObj){\n for(var prop in myObj){\n p1 = 'x1';\n break;\n }\n}\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif(p1 !== 1){\n $ERROR('#1: p1 === 1. Actual: p1 ==='+ p1 );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif(myObj.p1 !== \"x1\"){\n $ERROR('#2: myObj.p1 === \"x1\". Actual: myObj.p1 ==='+ myObj.p1 );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n",
+ "id": "S12.10_A3.9_T2",
+ "strict_only": ""
+ },
+ {
+ "section": "12.10",
+ "description": "Using \"for-in\" statement within \"with\" statement, leading to completion by break",
+ "strict_mode_negative": "",
+ "test": "this.p1 = 1;\n\nvar result = \"result\";\n\nvar myObj = {\n p1: 'a', \n value: 'myObj_value',\n valueOf : function(){return 'obj_valueOf';}\n}\n\nwith(myObj){\n for(var prop in myObj){\n break;\n p1 = 'x1';\n }\n}\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif(p1 !== 1){\n $ERROR('#1: p1 === 1. Actual: p1 ==='+ p1 );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif(myObj.p1 !== \"a\"){\n $ERROR('#2: myObj.p1 === \"a\". Actual: myObj.p1 ==='+ myObj.p1 );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n",
+ "id": "S12.10_A3.9_T3",
+ "strict_only": ""
+ },
+ {
+ "section": "12.10",
+ "description": "Changing string property",
+ "strict_mode_negative": "",
+ "test": "this.p1 = 1;\nvar myObj = {\n p1: 'a', \n}\neval(\"with(myObj){p1='b'}\");\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif(myObj.p1 !== 'b'){\n $ERROR('#1: myObj.p1 === \"b\". Actual: myObj.p1 ==='+ myObj.p1 );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif(myObj.p1 === 1){\n $ERROR('#2: myObj.p1 !== 1');\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S12.10_A4_T1",
+ "strict_only": ""
+ },
+ {
+ "section": "12.10",
+ "description": "Changing number property",
+ "strict_mode_negative": "",
+ "test": "this.p1 = 'a';\nvar myObj = {\n p1: 1, \n}\neval(\"with(myObj){p1=2}\");\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif(myObj.p1 !== 2){\n $ERROR('#1: myObj.p1 === 2. Actual: myObj.p1 ==='+ myObj.p1 );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif(myObj.p1 === 'a'){\n $ERROR('#2: myObj.p1 !== \\'a\\'');\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S12.10_A4_T2",
+ "strict_only": ""
+ },
+ {
+ "section": "12.10",
+ "description": "Changing boolean property",
+ "strict_mode_negative": "",
+ "test": "this.p1 = 'a';\nvar myObj = {\n p1: true, \n}\neval(\"with(myObj){p1=false}\");\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif(myObj.p1 !== false){\n $ERROR('#1: myObj.p1 === false. Actual: myObj.p1 ==='+ myObj.p1 );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif(myObj.p1 === 'a'){\n $ERROR('#2: myObj.p1 !== \\'a\\'');\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S12.10_A4_T3",
+ "strict_only": ""
+ },
+ {
+ "section": "12.10",
+ "description": "Changing object property",
+ "strict_mode_negative": "",
+ "test": "this.p1 = 'a';\nvar myObj = {\n p1: {a:\"hello\"}, \n}\neval(\"with(myObj){p1={b:'hi'}}\");\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif(myObj.p1.a === \"hello\"){\n $ERROR('#1: myObj.p1.a !== \"hello\"');\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif(myObj.p1.b !== \"hi\"){\n $ERROR('#2: myObj.p1.b === \"hi\". Actual: myObj.p1.b ==='+ myObj.p1.b );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#3\nif(myObj.p1 === 'a'){\n $ERROR('#3: myObj.p1 !== \\'a\\'');\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S12.10_A4_T4",
+ "strict_only": ""
+ },
+ {
+ "section": "12.10",
+ "description": "Changing array property",
+ "strict_mode_negative": "",
+ "test": "this.p1 = 'a';\nvar myObj = {\n p1: [1,2,3], \n}\neval(\"with(myObj){p1=[3,2,1]}\");\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif(myObj.p1[2] !== 1){\n $ERROR('#1: myObj.p1[2] === 1. Actual: myObj.p1[2] ==='+ myObj.p1[2] );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#3\nif(myObj.p1 === 'a'){\n $ERROR('#2: myObj.p1 !== \\'a\\'');\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S12.10_A4_T5",
+ "strict_only": ""
+ },
+ {
+ "section": "12.10",
+ "description": "Changing function property",
+ "strict_mode_negative": "",
+ "test": "this.p1 = 'a';\nvar myObj = {\n p1: function(){return 0;}, \n}\neval(\"with(myObj){p1=function(){return 1;}}\");\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif(myObj.p1() !== 1){\n $ERROR('#1: myObj.p1 === 1. Actual: myObj.p1 ==='+ myObj.p1 );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#3\nif(myObj.p1 === 'a'){\n $ERROR('#2: myObj.p1 !== \\'a\\'');\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S12.10_A4_T6",
+ "strict_only": ""
+ },
+ {
+ "section": "12.10",
+ "description": "Deleting string property",
+ "strict_mode_negative": "",
+ "test": "this.p1 = 1;\nvar myObj = {\n p1: 'a', \n del:false\n}\neval(\"with(myObj){del = delete p1}\");\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif(myObj.p1 === 'a'){\n $ERROR('#1: myObj.p1 !== \"a\"');\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif(myObj.p1 !== undefined){\n $ERROR('#2: myObj.p1 === undefined. Actual: myObj.p1 ==='+ myObj.p1 );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#3\nif(myObj.del !== true){\n $ERROR('#3: myObj.del === true. Actual: myObj.del ==='+ myObj.del );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#4\nif(myObj.p1 === 1){\n $ERROR('#4: myObj.p1 !== 1');\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S12.10_A5_T1",
+ "strict_only": ""
+ },
+ {
+ "section": "12.10",
+ "description": "Deleting number property",
+ "strict_mode_negative": "",
+ "test": "this.p1 = 'a';\nvar myObj = {\n p1: 1,\n del:false \n}\neval(\"with(myObj){del = delete p1}\");\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif(myObj.p1 === 1){\n $ERROR('#1: myObj.p1 !== 1');\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif(myObj.p1 !== undefined){\n $ERROR('#2: myObj.p1 === undefined . Actual: myObj.p1 ==='+ myObj.p1 );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#3\nif(myObj.del !== true){\n $ERROR('#3: myObj.del === true. Actual: myObj.del ===. Actual: myObj.del ==='+ myObj.del +myObj.del);\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#4\nif(myObj.p1 === 'a'){\n $ERROR('#4: myObj.p1 !== \\'a\\'');\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S12.10_A5_T2",
+ "strict_only": ""
+ },
+ {
+ "section": "12.10",
+ "description": "Deleting boolean property",
+ "strict_mode_negative": "",
+ "test": "this.p1 = 'a';\nvar myObj = {\n p1: true,\n del:false \n}\n\neval(\"with(myObj){del = delete p1}\");\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif(myObj.p1 === true){\n $ERROR('#1: myObj.p1 !== true ');\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif(myObj.p1 !== undefined){\n $ERROR('#2: myObj.p1 === undefined . Actual: myObj.p1 ==='+ myObj.p1 );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#3\nif(myObj.del !== true){\n $ERROR('#3: myObj.del === true . Actual: myObj.del ==='+ myObj.del );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#4\nif(myObj.p1 === 'a'){\n $ERROR('#4: myObj.p1 !== \\'a\\'');\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S12.10_A5_T3",
+ "strict_only": ""
+ },
+ {
+ "section": "12.10",
+ "description": "Deleting object property",
+ "strict_mode_negative": "",
+ "test": "this.p1 = 'a';\nvar myObj = {\n p1: {a:\"hello\"},\n del:false \n}\neval(\"with(myObj){del = delete p1}\");\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\ntry{\nif(myObj.p1.a === \"hello\"){\n $ERROR('#1: myObj.p1.a !== \"hello\" ');\n}\n}catch(e){var x=1};\nif(x !== 1){\n $ERROR('#1: x === 1. Actual: x ==='+ x );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif(myObj.p1 !== undefined){\n $ERROR('#2: myObj.p1 === undefined . Actual: myObj.p1 ==='+ myObj.p1 );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#3\nif(myObj.del !== true){\n $ERROR('#3: myObj.del === true . Actual: myObj.del ==='+ myObj.del );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#4\nif(myObj.p1 === 'a'){\n $ERROR('#4: myObj.p1 !== \\'a\\'');\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S12.10_A5_T4",
+ "strict_only": ""
+ },
+ {
+ "section": "12.10",
+ "description": "Deleting array property",
+ "strict_mode_negative": "",
+ "test": "this.p1 = 'a';\nvar myObj = {\n p1: [1,2,3],\n del:false \n}\neval(\"with(myObj){del = delete p1}\");\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\ntry{\nif(myObj.p1[2] === 3){\n $ERROR('#1: myObj.p1[2] !== 3 ');\n}\n}catch(e){var x=1};\nif(x !== 1){\n $ERROR('#1: x === 1. Actual: x ==='+ x );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif(myObj.p1 !== undefined){\n $ERROR('#2: myObj.p1 === undefined . Actual: myObj.p1 ==='+ myObj.p1 );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#3\nif(myObj.del !== true){\n $ERROR('#3: myObj.del === true . Actual: myObj.del ==='+ myObj.del );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#4\nif(myObj.p1 === 'a'){\n $ERROR('#4: myObj.p1 !== \\'a\\'');\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S12.10_A5_T5",
+ "strict_only": ""
+ },
+ {
+ "section": "12.10",
+ "description": "Deleting function property",
+ "strict_mode_negative": "",
+ "test": "this.p1 = 'a';\nvar myObj = {\n p1: function(){return 0;}, \n del:false\n}\neval(\"with(myObj){del = delete p1}\");\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\ntry{\nif(myObj.p1() === 0){\n $ERROR('#1: myObj.p1() !== 0 ');\n}\n}catch(e){var x=1};\nif(x !== 1){\n $ERROR('#1: x === 1. Actual: x ==='+ x );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif(myObj.p1 !== undefined){\n $ERROR('#2: myObj.p1 === undefined . Actual: myObj.p1 ==='+ myObj.p1 );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#3\nif(myObj.del !== true){\n $ERROR('#3: myObj.del === true . Actual: myObj.del ==='+ myObj.del );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#4\nif(myObj.p1 === 'a'){\n $ERROR('#4: myObj.p1 !== \\'a\\'');\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S12.10_A5_T6",
+ "strict_only": ""
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/12.11_The_switch_Statement.json b/website/resources/scripts/testcases2/12.11_The_switch_Statement.json
new file mode 100644
index 000000000..b76d3c5db
--- /dev/null
+++ b/website/resources/scripts/testcases2/12.11_The_switch_Statement.json
@@ -0,0 +1,80 @@
+{
+ "testCollection": {
+ "name": "12.11_The_switch_Statement",
+ "numTests": 11,
+ "tests": [
+ {
+ "section": "12.11",
+ "description": "Simple test using switch statement",
+ "test": "function SwitchTest(value){\n var result = 0;\n \n switch(value) {\n case 0:\n result += 2;\n case 1:\n result += 4;\n break;\n case 2:\n result += 8;\n case 3:\n result += 16;\n default:\n result += 32;\n break;\n case 4:\n result += 64;\n }\n \n return result;\n}\n \nif(!(SwitchTest(0) === 6)){\n $ERROR(\"#1: SwitchTest(0) === 6. Actual: SwitchTest(0) ===\"+ SwitchTest(0) );\n}\n\nif(!(SwitchTest(1) === 4)){\n $ERROR(\"#2: SwitchTest(1) === 4. Actual: SwitchTest(1) ===\"+ SwitchTest(1) );\n}\n\nif(!(SwitchTest(2) === 56)){\n $ERROR(\"#3: SwitchTest(2) === 56. Actual: SwitchTest(2) ===\"+ SwitchTest(2) );\n}\n\nif(!(SwitchTest(3) === 48)){\n $ERROR(\"#4: SwitchTest(3) === 48. Actual: SwitchTest(3) ===\"+ SwitchTest(3) );\n}\n\nif(!(SwitchTest(4) === 64)){\n $ERROR(\"#5: SwitchTest(4) === 64. Actual: SwitchTest(4) ===\"+ SwitchTest(4) );\n}\n\nif(!(SwitchTest(true) === 32)){\n $ERROR(\"#6: SwitchTest(true) === 32. Actual: SwitchTest(true) ===\"+ SwitchTest(true) );\n}\n\nif(!(SwitchTest(false) === 32)){\n $ERROR(\"#7: SwitchTest(false) === 32. Actual: SwitchTest(false) ===\"+ SwitchTest(false) );\n}\n\nif(!(SwitchTest(null) === 32)){\n $ERROR(\"#8: SwitchTest(null) === 32. Actual: SwitchTest(null) ===\"+ SwitchTest(null) );\n}\n\nif(!(SwitchTest(void 0) === 32)){\n $ERROR(\"#9: SwitchTest(void 0) === 32. Actual: SwitchTest(void 0) ===\"+ SwitchTest(void 0) );\n}\n\nif(!(SwitchTest('0') === 32)){\n $ERROR(\"#10: SwitchTest('0') === 32. Actual: SwitchTest('0') ===\"+ SwitchTest('0') );\n}\n",
+ "id": "S12.11_A1_T1"
+ },
+ {
+ "section": "12.11",
+ "description": "Switch with different types of variables",
+ "test": "var x = new Number(2);\n\nfunction SwitchTest(value){\n var result = 0;\n \n switch(value) {\n case 0:\n result += 2;\n case '1':\n result += 4;\n break;\n case new Number(2):\n result += 8;\n case 3:\n result += 16;\n default:\n result += 32;\n break;\n case 4:\n result += 64;\n break;\n case x:\n result += 128;\n break;\n case 0:\n result += 256;\n case 1:\n result += 512;\n }\n \n return result;\n}\n \nif(!(SwitchTest(0) === 6)){\n $ERROR(\"#1: SwitchTest(0) === 6. Actual: SwitchTest(0) ===\"+ SwitchTest(0) );\n}\n\nif(!(SwitchTest(1) === 512)){\n $ERROR(\"#2: SwitchTest(1) === 512. Actual: SwitchTest(1) ===\"+ SwitchTest(1) );\n}\n\nif(!(SwitchTest(2) === 32)){\n $ERROR(\"#3: SwitchTest(2) === 32. Actual: SwitchTest(2) ===\"+ SwitchTest(2) );\n}\n\nif(!(SwitchTest(3) === 48)){\n $ERROR(\"#4: SwitchTest(3) === 48. Actual: SwitchTest(3) ===\"+ SwitchTest(3) );\n}\n\nif(!(SwitchTest(4) === 64)){\n $ERROR(\"#5: SwitchTest(4) === 64. Actual: SwitchTest(4) ===\"+ SwitchTest(4) );\n}\n\nif(!(SwitchTest(true) === 32)){\n $ERROR(\"#6: SwitchTest(true) === 32. Actual: SwitchTest(true) ===\"+ SwitchTest(true) );\n}\n\nif(!(SwitchTest(false) === 32)){\n $ERROR(\"#7: SwitchTest(false) === 32. Actual: SwitchTest(false) ===\"+ SwitchTest(false) );\n}\n\nif(!(SwitchTest(null) === 32)){\n $ERROR(\"#8: SwitchTest(null) === 32. Actual: SwitchTest(null) ===\"+ SwitchTest(null) );\n}\n\nif(!(SwitchTest(void 0) === 32)){\n $ERROR(\"#9: SwitchTest(void 0) === 32. Actual: SwitchTest(void 0) ===\"+ SwitchTest(void 0) );\n}\n\nif(!(SwitchTest('0') === 32)){\n $ERROR(\"#10: SwitchTest('0') === 32. Actual: SwitchTest('0') ===\"+ SwitchTest('0') );\n}\n\nif(!(SwitchTest(x) === 128)){\n $ERROR(\"#10: SwitchTest(x) === 128. Actual: SwitchTest(x) ===\"+ SwitchTest(x) );\n}\n",
+ "id": "S12.11_A1_T2"
+ },
+ {
+ "section": "12.11",
+ "description": "Using case with null, NaN, Infinity",
+ "test": "function SwitchTest(value){\n var result = 0;\n \n switch(value) {\n case 0:\n result += 2;\n case 1:\n result += 4;\n break;\n case 2:\n result += 8;\n case 3:\n result += 16;\n default:\n result += 32;\n break;\n case null:\n result += 64;\n case NaN:\n result += 128;\n break;\n case Infinity:\n result += 256;\n case 2+3:\n result += 512;\n break;\n case undefined:\n result += 1024;\n }\n \n return result;\n}\n \nif(!(SwitchTest(0) === 6)){\n $ERROR(\"#1: SwitchTest(0) === 6. Actual: SwitchTest(0) ===\"+ SwitchTest(0) );\n}\n\nif(!(SwitchTest(1) === 4)){\n $ERROR(\"#2: SwitchTest(1) === 4. Actual: SwitchTest(1) ===\"+ SwitchTest(1) );\n}\n\nif(!(SwitchTest(2) === 56)){\n $ERROR(\"#3: SwitchTest(2) === 56. Actual: SwitchTest(2) ===\"+ SwitchTest(2) );\n}\n\nif(!(SwitchTest(3) === 48)){\n $ERROR(\"#4: SwitchTest(3) === 48. Actual: SwitchTest(3) ===\"+ SwitchTest(3) );\n}\n\nif(!(SwitchTest(4) === 32)){\n $ERROR(\"#5: SwitchTest(4) === 32. Actual: SwitchTest(4) ===\"+ SwitchTest(4) );\n}\n\nif(!(SwitchTest(5) === 512)){\n $ERROR(\"#5: SwitchTest(5) === 512. Actual: SwitchTest(5) ===\"+ SwitchTest(5) );\n}\n\nif(!(SwitchTest(true) === 32)){\n $ERROR(\"#6: SwitchTest(true) === 32. Actual: SwitchTest(true) ===\"+ SwitchTest(true) );\n}\n\nif(!(SwitchTest(false) === 32)){\n $ERROR(\"#7: SwitchTest(false) === 32. Actual: SwitchTest(false) ===\"+ SwitchTest(false) );\n}\n\nif(!(SwitchTest(null) === 192)){\n $ERROR(\"#8: SwitchTest(null) === 192. Actual: SwitchTest(null) ===\"+ SwitchTest(null) );\n}\n\nif(!(SwitchTest(void 0) === 1024)){\n $ERROR(\"#9: SwitchTest(void 0) === 1024. Actual: SwitchTest(void 0) ===\"+ SwitchTest(void 0) );\n}\n\nif(!(SwitchTest(NaN) === 32)){\n $ERROR(\"#10: SwitchTest(NaN) === 32. Actual: SwitchTest(NaN) ===\"+ SwitchTest(NaN) );\n}\n\nif(!(SwitchTest(Infinity) === 768)){\n $ERROR(\"#10: SwitchTest(NaN) === 768. Actual: SwitchTest(NaN) ===\"+ SwitchTest(NaN) );\n}\n",
+ "id": "S12.11_A1_T3"
+ },
+ {
+ "section": "12.11",
+ "description": "Using case with isNaN and isNaN(value)",
+ "test": "function SwitchTest(value){\n var result = 0;\n \n switch(value) {\n case 0:\n result += 2;\n case 1:\n result += 4;\n break;\n case 2:\n result += 8;\n case isNaN(value):\n result += 16;\n default:\n result += 32;\n break;\n case null:\n result += 64;\n case isNaN:\n result += 128;\n break;\n case Infinity:\n result += 256;\n case 2+3:\n result += 512;\n break;\n case undefined:\n result += 1024;\n }\n \n return result;\n}\n \nif(!(SwitchTest(eval('Number(false)')) === 6)){\n $ERROR(\"#1: SwitchTest(0) === 6. Actual: SwitchTest(0) ===\"+ SwitchTest(0) );\n}\n\nif(!(SwitchTest(parseInt) === 32)){\n $ERROR(\"#2: SwitchTest(parseInt) === 32. Actual: SwitchTest(parseInt) ===\"+ SwitchTest(parseInt) );\n}\n\nif(!(SwitchTest(isNaN) === 128)){\n $ERROR(\"#3: SwitchTest(isNaN) === 128. Actual: SwitchTest(isNaN) ===\"+ SwitchTest(isNaN) );\n}\n\nif(!(SwitchTest(true) === 32)){\n $ERROR(\"#6: SwitchTest(true) === 32. Actual: SwitchTest(true) ===\"+ SwitchTest(true) );\n}\n\nif(!(SwitchTest(false) === 48)){\n $ERROR(\"#7: SwitchTest(false) === 48. Actual: SwitchTest(false) ===\"+ SwitchTest(false) );\n}\n\nif(!(SwitchTest(null) === 192)){\n $ERROR(\"#8: SwitchTest(null) === 192. Actual: SwitchTest(null) ===\"+ SwitchTest(null) );\n}\n\nif(!(SwitchTest(void 0) === 1024)){\n $ERROR(\"#9: SwitchTest(void 0) === 1024. Actual: SwitchTest(void 0) ===\"+ SwitchTest(void 0) );\n}\n\nif(!(SwitchTest(NaN) === 32)){\n $ERROR(\"#10: SwitchTest(NaN) === 32. Actual: SwitchTest(NaN) ===\"+ SwitchTest(NaN) );\n}\n\nif(!(SwitchTest(Infinity) === 768)){\n $ERROR(\"#10: SwitchTest(NaN) === 768. Actual: SwitchTest(NaN) ===\"+ SwitchTest(NaN) );\n}\n",
+ "id": "S12.11_A1_T4"
+ },
+ {
+ "section": "12.11",
+ "description": "Duplicate DefaultClause",
+ "negative": "",
+ "test": "function SwitchTest(value){\n var result = 0;\n \n switch(value) {\n case 0:\n result += 2;\n default:\n result += 32;\n break;\n default:\n result += 32;\n break;\n }\n \n return result;\n}\n\nvar x = SwitchTest(0);\n",
+ "id": "S12.11_A2_T1"
+ },
+ {
+ "section": "12.11",
+ "description": "Checking if execution of \"switch() {}\" fails",
+ "negative": "",
+ "test": "function SwitchTest(value){\n var result = 0;\n \n switch() {\n case 0:\n result += 2;\n default:\n result += 32;\n break;\n }\n \n return result;\n}\n\nvar x = SwitchTest(0);\n",
+ "id": "S12.11_A3_T1"
+ },
+ {
+ "section": "12.11",
+ "description": "Checking if execution of \"switch {}\" fails",
+ "negative": "",
+ "test": "function SwitchTest(value){\n var result = 0;\n \n switch {\n case 0:\n result += 2;\n default:\n result += 32;\n break;\n }\n \n return result;\n}\n\nvar x = SwitchTest(0);\n",
+ "id": "S12.11_A3_T2"
+ },
+ {
+ "section": "12.11",
+ "description": "Checking if execution of \"switch(value)\" fails",
+ "negative": "",
+ "test": "switch(value);\n",
+ "id": "S12.11_A3_T3"
+ },
+ {
+ "section": "12.11",
+ "description": "Using \"case\" that has no Expresson after it. \"CaseClause: case Expression : [StatementList]\"",
+ "negative": "",
+ "test": "function SwitchTest(value){\n var result = 0;\n \n switch(value) {\n case:\n result += 2;\n default:\n result += 32;\n break;\n }\n \n return result;\n}\n\nvar x = SwitchTest(0);\n",
+ "id": "S12.11_A3_T4"
+ },
+ {
+ "section": "12.11",
+ "description": "Introducing statement not followed by \"case\" keyword",
+ "negative": "",
+ "test": "function SwitchTest(value){\n var result = 0;\n \n switch(value) {\n \tresult =2;\n case 0:\n result += 2;\n default:\n result += 32;\n break;\n }\n \n return result;\n}\n\nvar x = SwitchTest(0);\n",
+ "id": "S12.11_A3_T5"
+ },
+ {
+ "section": "12.11",
+ "description": "Nesting one \"switch\" statement into StatementList of the other's",
+ "test": "function SwitchTest(value){\n var result = 0;\n \n switch(value) {\n case 0:\n switch(value) {\n case 0:\n result += 3;\n break;\n default:\n result += 32;\n break;\n }\n result *= 2;\n break;\n result=3;\n default:\n result += 32;\n break;\n }\n return result;\n}\n\nvar x = SwitchTest(0);\nif(x!==6) $ERROR(\"#1: SwitchTest(0) === 6. Actual: SwitchTest(0) ===\"+ SwitchTest(0) );\n",
+ "id": "S12.11_A4_T1"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/12.12_Labelled_Statements.json b/website/resources/scripts/testcases2/12.12_Labelled_Statements.json
new file mode 100644
index 000000000..4a805ac86
--- /dev/null
+++ b/website/resources/scripts/testcases2/12.12_Labelled_Statements.json
@@ -0,0 +1,14 @@
+{
+ "testCollection": {
+ "name": "12.12_Labelled_Statements",
+ "numTests": 1,
+ "tests": [
+ {
+ "section": "12.12",
+ "description": "Checking if labelled break works. See continue and break sections",
+ "test": "var object = {p1: 1, p2: 1};\nvar result = 0;\nlbl: for(var i in object){\n result += object[i];\n break lbl;\n}\n\nif(!(result === 1)){\n $ERROR(\"'break label' should break execution of labelled iteration statement\");\n}\n",
+ "id": "S12.12_A1_T1"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/12.13_The_throw_statement.json b/website/resources/scripts/testcases2/12.13_The_throw_statement.json
new file mode 100644
index 000000000..35a149c6f
--- /dev/null
+++ b/website/resources/scripts/testcases2/12.13_The_throw_statement.json
@@ -0,0 +1,93 @@
+{
+ "testCollection": {
+ "name": "12.13_The_throw_statement",
+ "numTests": 14,
+ "tests": [
+ {
+ "section": "12.13",
+ "description": "Trying to throw exception with \"throw\"",
+ "negative": "",
+ "test": "throw \"error\";\n",
+ "id": "S12.13_A1"
+ },
+ {
+ "section": "12.13",
+ "description": "Throwing undefined",
+ "test": "// CHECK#1\ntry{\n throw undefined;\n}\ncatch(e){\n if (e!==undefined) $ERROR('#1: Exception === undefined. Actual: Exception ==='+ e );\n}\n",
+ "id": "S12.13_A2_T1"
+ },
+ {
+ "section": "12.13",
+ "description": "Throwing null",
+ "test": "// CHECK#1\ntry{\n throw null;\n}\ncatch(e){\n if (e!==null) $ERROR('#1: Exception === null. Actual: Exception ==='+ e );\n}\n",
+ "id": "S12.13_A2_T2"
+ },
+ {
+ "section": "12.13",
+ "description": "Throwing boolean",
+ "test": "// CHECK#1\ntry{\n throw true;\n}\ncatch(e){\n if (e!==true) $ERROR('#1: Exception ===true. Actual: Exception ==='+ e );\n}\n\n// CHECK#2\ntry{\n throw false;\n}\ncatch(e){\n if (e!==false) $ERROR('#2: Exception ===false. Actual: Exception ==='+ e );\n}\n\n// CHECK#3\nvar b=false;\ntry{\n throw b;\n}\ncatch(e){\n if (e!==false) $ERROR('#3: Exception ===false. Actual: Exception ==='+ e );\n}\n\n// CHECK#4\nvar b=true;\ntry{\n throw b;\n}\ncatch(e){\n if (e!==true) $ERROR('#4: Exception ===true. Actual: Exception ==='+ e );\n}\n",
+ "id": "S12.13_A2_T3"
+ },
+ {
+ "section": "12.13",
+ "description": "Throwing string",
+ "test": "// CHECK#1\ntry{\n throw \"exception #1\";\n}\ncatch(e){\n if (e!==\"exception #1\") $ERROR('#1: Exception ===\"exception #1\". Actual: Exception ==='+ e );\n}\n\n// CHECK#2\nvar b=\"exception #1\";\ntry{\n throw b;\n}\ncatch(e){\n if (e!==\"exception #1\") $ERROR('#2: Exception ===\"exception #1\". Actual: Exception ==='+ e );\n}\n",
+ "id": "S12.13_A2_T4"
+ },
+ {
+ "section": "12.13",
+ "description": "Throwing number",
+ "test": "// CHECK#1\ntry{\n throw 13;\n}\ncatch(e){\n if (e!==13) $ERROR('#1: Exception ===13. Actual: Exception ==='+ e );\n}\n\n// CHECK#2\nvar b=13;\ntry{\n throw b;\n}\ncatch(e){\n if (e!==13) $ERROR('#2: Exception ===13. Actual: Exception ==='+ e );\n}\n\n// CHECK#3\ntry{\n throw 2.13;\n}\ncatch(e){\n if (e!==2.13) $ERROR('#3: Exception ===2.13. Actual: Exception ==='+ e );\n}\n\n// CHECK#4\ntry{\n throw NaN;\n}\ncatch(e){\n if (!isNaN(e)) $ERROR('#4: Exception is NaN');\n}\n\n// CHECK#5\ntry{\n throw +Infinity;\n}\ncatch(e){\n if (e!==+Infinity) $ERROR('#5: Exception ===+Infinity. Actual: Exception ==='+ e );\n}\n\n// CHECK#6\ntry{\n throw -Infinity;\n}\ncatch(e){\n if (e!==-Infinity) $ERROR('#6: Exception ===-Infinity. Actual: Exception ==='+ e );\n}\n\n// CHECK#7\ntry{\n throw +0;\n}\ncatch(e){\n if (e!==+0) $ERROR('#7: Exception ===+0. Actual: Exception ==='+ e );\n}\n\n// CHECK#8\ntry{\n throw -0;\n}\ncatch(e){\n if (e!==-0) $ERROR('#8: Exception ===-0. Actual: Exception ==='+ e );\n}\n",
+ "id": "S12.13_A2_T5"
+ },
+ {
+ "section": "12.13",
+ "description": "Throwing object",
+ "test": "var myObj = {p1: 'a', \n p2: 'b', \n p3: 'c',\n value: 'myObj_value',\n valueOf : function(){return 'obj_valueOf';},\n parseInt : function(){return 'obj_parseInt';},\n NaN : 'obj_NaN',\n Infinity : 'obj_Infinity',\n eval : function(){return 'obj_eval';},\n parseFloat : function(){return 'obj_parseFloat';},\n isNaN : function(){return 'obj_isNaN';},\n isFinite : function(){return 'obj_isFinite';},\n i:7\n}\n\ntry{\n throw myObj;\n}\ncatch(e){\t\n// CHECK#1\n if (e.p1!==\"a\") $ERROR('#1: e.p1 === \"a\". Actual: e.p1 ==='+ e.p1 );\n// CHECK#2\n if (e.value!=='myObj_value') $ERROR('#2: e.p1 === \\'myObj_value\\'. Actual: e.p1 ==='+ e.p1 );\n// CHECK#3\n if (e.eval()!=='obj_eval') $ERROR('#3: e.p1 === \\'obj_eval\\'. Actual: e.p1 ==='+ e.p1 );\n}\n\n// CHECK#4\nmyObj.i=6\ntry{\n throw myObj;\n}\ncatch(e){}\nif (myObj.i!==6) $ERROR('#4: Handling of catch must be correct');\n",
+ "id": "S12.13_A2_T6"
+ },
+ {
+ "section": "12.13",
+ "description": "Throwing Array",
+ "test": "var mycars = new Array();\nmycars[0] = \"Saab\";\nmycars[1] = \"Volvo\";\nmycars[2] = \"BMW\";\n\nvar mycars2 = new Array();\nmycars2[0] = \"Mercedes\";\nmycars2[1] = \"Jeep\";\nmycars2[2] = \"Suzuki\";\n\n// CHECK#1\ntry{\n throw mycars;\n}\ncatch(e){\n for (var i=0;i<3;i++){\n if (e[i]!==mycars[i]) $ERROR('#1.'+i+': Exception['+i+'] === mycars['+i+']. Actual: Exception['+i+'] ==='+ e[i] );\n }\n}\n",
+ "id": "S12.13_A2_T7"
+ },
+ {
+ "section": "12.13",
+ "description": "Evaluating boolean expression",
+ "test": "// CHECK#1\nvar b=true;\ntry{\n throw b&&false;\n}\ncatch(e){\n if (e!==false) $ERROR('#1: Exception === false(operaton &&). Actual: Exception ==='+ e );\n}\n\n// CHECK#2\nvar b=true;\ntry{\n throw b||false;\n}\ncatch(e){\n if (e!==true) $ERROR('#2: Exception === true(operaton ||). Actual: Exception ==='+ e );\n}\n\n// CHECK#3\ntry{\n throw !false;\n}\ncatch(e){\n if (e!==true) $ERROR('#3: Exception === true(operaton !). Actual: Exception ==='+ e );\n}\n\n// CHECK#4\nvar b=true;\ntry{\n throw !(b&&false);\n}\ncatch(e){\n if (e!==true) $ERROR('#4: Exception === true(operaton &&). Actual: Exception ==='+ e );\n}\n",
+ "id": "S12.13_A3_T1"
+ },
+ {
+ "section": "12.13",
+ "description": "Evaluating string expression",
+ "test": "// CHECK#1\ntry{\n throw \"exception\"+\" #1\";\n}\ncatch(e){\n if (e!==\"exception #1\") $ERROR('#1: Exception === \"exception #1\"(operaton +). Actual: Exception ==='+ e );\n}\n\n// CHECK#2\nvar b=\"exception\"\nvar a=\" #1\";\ntry{\n throw b+a;\n}\ncatch(e){\n if (e!==\"exception #1\") $ERROR('#2: Exception === \"exception #1\"(operaton +). Actual: Exception ==='+ e );\n}\n",
+ "id": "S12.13_A3_T2"
+ },
+ {
+ "section": "12.13",
+ "description": "Evaluating number expression",
+ "test": "// CHECK#1\ntry{\n throw 10+3;\n}\ncatch(e){\n if (e!==13) $ERROR('#1: Exception ===13(operaton +). Actual: Exception ==='+ e);\n}\n\n// CHECK#2\nvar b=10;\nvar a=3;\ntry{\n throw a+b;\n}\ncatch(e){\n if (e!==13) $ERROR('#2: Exception ===13(operaton +). Actual: Exception ==='+ e);\n}\n\n// CHECK#3\ntry{\n throw 3.15-1.02;\n}\ncatch(e){\n if (e!==2.13) $ERROR('#3: Exception ===2.13(operaton -). Actual: Exception ==='+ e);\n}\n\n// CHECK#4\ntry{\n throw 2*2;\n}\ncatch(e){\n if (e!==4) $ERROR('#4: Exception ===4(operaton *). Actual: Exception ==='+ e);\n}\n\n// CHECK#5\ntry{\n throw 1+Infinity;\n}\ncatch(e){\n if (e!==+Infinity) $ERROR('#5: Exception ===+Infinity(operaton +). Actual: Exception ==='+ e);\n}\n\n// CHECK#6\ntry{\n throw 1-Infinity;\n}\ncatch(e){\n if (e!==-Infinity) $ERROR('#6: Exception ===-Infinity(operaton -). Actual: Exception ==='+ e);\n}\n\n// CHECK#7\ntry{\n throw 10/5;\n}\ncatch(e){\n if (e!==2) $ERROR('#7: Exception ===2(operaton /). Actual: Exception ==='+ e);\n}\n\n// CHECK#8\ntry{\n throw 8>>2;\n}\ncatch(e){\n if (e!==2) $ERROR('#8: Exception ===2(operaton >>). Actual: Exception ==='+ e);\n}\n\n// CHECK#9\ntry{\n throw 2<<2;\n}\ncatch(e){\n if (e!==8) $ERROR('#9: Exception ===8(operaton <<). Actual: Exception ==='+ e);\n}\n\n// CHECK#10\ntry{\n throw 123%100;\n}\ncatch(e){\n if (e!==23) $ERROR('#10: Exception ===23(operaton %). Actual: Exception ==='+ e);\n}\n",
+ "id": "S12.13_A3_T3"
+ },
+ {
+ "section": "12.13",
+ "description": "Evaluating array expression",
+ "test": "var mycars = new Array();\nmycars[0] = \"Saab\";\nmycars[1] = \"Volvo\";\nmycars[2] = \"BMW\";\n\nvar mycars2 = new Array();\nmycars2[0] = \"Mercedes\";\nmycars2[1] = \"Jeep\";\nmycars2[2] = \"Suzuki\";\n\n// CHECK#1\ntry{\n throw mycars.concat(mycars2);\n}\ncatch(e){\n for (var i=0;i<3;i++){\n if (e[i]!==mycars[i]) $ERROR('#1.'+i+': Exception['+i+']===mycars['+i+'](operation .concat). Actual: Exception['+i+']==='+ e[i] );\n }\n for (var i=3;i<6;i++){\n if (e[i]!==mycars2[i-3]) $ERROR('#1.'+i+': Exception['+i+']===mycars2['+(i-3)+'](operation .concat). Actual: Exception['+i+']==='+ e[i] );\n }\n}\n\n// CHECK#2\ntry{\n throw new Array(\"Mercedes\",\"Jeep\",\"Suzuki\");\n}\ncatch(e){\n for (var i=0;i<3;i++){\n if (e[i]!==mycars2[i]) $ERROR('#2.'+i+': Exception['+i+']===mycars2['+i+'](operation new). Actual: Exception['+i+']==='+ e[i] );\n }\n}\n\n// CHECK#3\ntry{\n throw mycars.concat(new Array(\"Mercedes\",\"Jeep\",\"Suzuki\"));\n}\ncatch(e){\n for (var i=0;i<3;i++){\n if (e[i]!==mycars[i]) $ERROR('#3.'+i+': Exception['+i+']===mycars['+i+'](operation .concat(new)). Actual: Exception['+i+']==='+ e[i] );\n }\n for (var i=3;i<6;i++){\n if (e[i]!==mycars2[i-3]) $ERROR('#3.'+i+': Exception['+i+']===mycars2['+(i-3)+'](operation .concat(new)). Actual: Exception['+i+']==='+ e[i] );\n }\n}\n",
+ "id": "S12.13_A3_T4"
+ },
+ {
+ "section": "12.13",
+ "description": "Evaluating equation expression",
+ "test": "// CHECK#1\nvar a=true;\nvar b=false;\ntry{\n throw ((a&&(!b))?\"exception\":\" #1\");\n}\ncatch(e){\n if (e!==\"exception\") $ERROR('#1: Exception ===\"exception\"(operaton ? , ). Actual: Exception ==='+e );\n}\n",
+ "id": "S12.13_A3_T5"
+ },
+ {
+ "section": "12.13",
+ "description": "Evaluating functions",
+ "test": "// CHECK#1\nvar i=0;\nfunction adding1(){\n i++;\n return 1;\n}\ntry{\n throw (adding1());\n}\ncatch(e){\n if (e!==1) $ERROR('#1: Exception ===1. Actual: Exception ==='+ e);\n}\n\n// CHECK#2\nvar i=0;\nfunction adding2(){\n i++;\n return i;\n}\ntry{\n throw adding2();\n}\ncatch(e){}\nif (i!==1) $ERROR('#2: i===1. Actual: i==='+ i);\n\n// CHECK#3\nvar i=0;\nfunction adding3(){\n i++;\n}\ntry{\n throw adding3();\n}\ncatch(e){}\nif (i!==1) $ERROR('#3: i===1. Actual: i==='+i);\n\n// CHECK#4\nfunction adding4(i){\n i++;\n return i;\n}\ntry{\n throw (adding4(1));\n}\ncatch(e){\n if (e!==2) $ERROR('#4: Exception ===2. Actual: Exception ==='+ e);\n}\n",
+ "id": "S12.13_A3_T6"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/12.14.1.json b/website/resources/scripts/testcases2/12.14.1.json
new file mode 100644
index 000000000..c3caa2c3a
--- /dev/null
+++ b/website/resources/scripts/testcases2/12.14.1.json
@@ -0,0 +1,53 @@
+{
+ "testCollection": {
+ "name": "12.14.1",
+ "numTests": 6,
+ "tests": [
+ {
+ "id": "12.14.1-1-s",
+ "path": "TestCases/chapter12/12.14/12.14.1/12.14.1-1-s.js",
+ "description": "Strict Mode - SyntaxError is thrown if a TryStatement with a Catch occurs within strict code and the Identifier of the Catch production is eval",
+ "test": "assertTrue((function testcase() {\n \"use strict\";\n\n try {\n eval(\"\\\n try {} catch (eval) { }\\\n \");\n return false;\n } catch (e) {\n return e instanceof SyntaxError;\n }\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict())",
+ "strict_only": ""
+ },
+ {
+ "id": "12.14.1-2-s",
+ "path": "TestCases/chapter12/12.14/12.14.1/12.14.1-2-s.js",
+ "description": "Strict Mode - SyntaxError is thrown if a TryStatement with a Catch occurs within strict code and the Identifier of the Catch production is arguments",
+ "test": "assertTrue((function testcase() {\n \"use strict\";\n\n try {\n eval(\"\\\n try {} catch (arguments) { }\\\n \");\n return false;\n } catch (e) {\n return e instanceof SyntaxError;\n }\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict())",
+ "strict_only": ""
+ },
+ {
+ "id": "12.14.1-3-s",
+ "path": "TestCases/chapter12/12.14/12.14.1/12.14.1-3-s.js",
+ "description": "Strict Mode - SyntaxError isn't thrown if a TryStatement with a Catch occurs within strict code and the Identifier of the Catch production is EVAL but throws SyntaxError if it is eval",
+ "test": "assertTrue((function testcase() {\n \"use strict\";\n\n try{ eval(\" try { \\\n throw new Error(\\\"...\\\");\\\n return false;\\\n } catch (EVAL) {\\\n try\\\n {\\\n throw new Error(\\\"...\\\");\\\n }catch(eval)\\\n {\\\n return EVAL instanceof Error;\\\n }\\\n }\");\n return false;\n } catch(e) {\n return e instanceof SyntaxError;\n }\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict())",
+ "strict_only": ""
+ },
+ {
+ "id": "12.14.1-4-s",
+ "path": "TestCases/chapter12/12.14/12.14.1/12.14.1-4-s.js",
+ "description": "Strict Mode - SyntaxError isn't thrown if a TryStatement with a Catch occurs within strict code and the Identifier of the Catch production is EVAL",
+ "test": "assertTrue((function testcase() {\n \"use strict\";\n\n try {\n throw new Error(\"...\");\n return false;\n } catch (EVAL) {\n return EVAL instanceof Error;\n }\n }).call(this));\n",
+ "strict_only": ""
+ },
+ {
+ "id": "12.14.1-5-s",
+ "path": "TestCases/chapter12/12.14/12.14.1/12.14.1-5-s.js",
+ "description": "Strict Mode - SyntaxError isn't thrown if a TryStatement with a Catch occurs within strict code and the Identifier of the Catch production is Arguments",
+ "test": "assertTrue((function testcase() {\n \"use strict\";\n\n try {\n throw new Error(\"...\");\n return false;\n } catch (Arguments) {\n return Arguments instanceof Error;\n }\n }).call(this));\n",
+ "strict_only": ""
+ },
+ {
+ "id": "12.14.1-6-s",
+ "path": "TestCases/chapter12/12.14/12.14.1/12.14.1-6-s.js",
+ "description": "Strict Mode - SyntaxError isn't thrown if a TryStatement with a Catch occurs within strict code and the Identifier of the Catch production is ARGUMENTS",
+ "test": "assertTrue((function testcase() {\n \"use strict\";\n\n try {\n throw new Error(\"...\");\n return false;\n } catch (ARGUMENTS) {\n return ARGUMENTS instanceof Error;\n }\n }).call(this));\n",
+ "strict_only": ""
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/12.14.json b/website/resources/scripts/testcases2/12.14.json
new file mode 100644
index 000000000..aef7e6c4b
--- /dev/null
+++ b/website/resources/scripts/testcases2/12.14.json
@@ -0,0 +1,98 @@
+{
+ "testCollection": {
+ "name": "12.14",
+ "numTests": 15,
+ "tests": [
+ {
+ "id": "12.14-1",
+ "path": "TestCases/chapter12/12.14/12.14-1.js",
+ "description": "catch doesn't change declaration scope - var initializer in catch with same name as catch parameter changes parameter",
+ "test": "assertTrue((function testcase() {\n foo = \"prior to throw\";\n try {\n throw new Error();\n }\n catch (foo) {\n var foo = \"initializer in catch\";\n }\n return foo === \"prior to throw\";\n \n }).call(this));\n"
+ },
+ {
+ "id": "12.14-10",
+ "path": "TestCases/chapter12/12.14/12.14-10.js",
+ "description": "catch introduces scope - name lookup finds function parameter",
+ "test": "assertTrue((function testcase() {\n function f(o) {\n\n function innerf(o, x) {\n try {\n throw o;\n }\n catch (e) {\n return x;\n }\n }\n\n return innerf(o, 42);\n }\n \n if (f({}) === 42) {\n return true;\n }\n }).call(this));\n"
+ },
+ {
+ "id": "12.14-11",
+ "path": "TestCases/chapter12/12.14/12.14-11.js",
+ "description": "catch introduces scope - name lookup finds inner variable",
+ "test": "assertTrue((function testcase() {\n function f(o) {\n\n function innerf(o) {\n var x = 42;\n\n try {\n throw o;\n }\n catch (e) {\n return x;\n }\n }\n\n return innerf(o);\n }\n \n if (f({}) === 42) {\n return true;\n }\n }).call(this));\n"
+ },
+ {
+ "id": "12.14-12",
+ "path": "TestCases/chapter12/12.14/12.14-12.js",
+ "description": "catch introduces scope - name lookup finds property",
+ "test": "assertTrue((function testcase() {\n function f(o) {\n\n function innerf(o) {\n try {\n throw o;\n }\n catch (e) {\n return e.x;\n }\n }\n\n return innerf(o);\n }\n \n if (f({x:42}) === 42) {\n return true;\n }\n }).call(this));\n"
+ },
+ {
+ "id": "12.14-13",
+ "path": "TestCases/chapter12/12.14/12.14-13.js",
+ "description": "catch introduces scope - updates are based on scope",
+ "test": "assertTrue((function testcase() {\n var res1 = false;\n var res2 = false;\n var res3 = false;\n\n var x_12_14_13 = 'local';\n try {\n function foo() {\n this.x_12_14_13 = 'instance';\n }\n\n try {\n throw foo;\n }\n catch (e) {\n res1 = (x_12_14_13 === 'local');\n e();\n res2 = (x_12_14_13 === 'local');\n }\n res3 = (x_12_14_13 === 'local');\n\n if (res1 === true &&\n res2 === true &&\n res3 === true) {\n return true;\n }\n } finally {\n delete this.x_12_14_13;\n }\n }).call(this));\n"
+ },
+ {
+ "id": "12.14-14",
+ "path": "TestCases/chapter12/12.14/12.14-14.js",
+ "description": "Exception object is a function, when an exception parameter is called as a function in catch block, global object is passed as the this value",
+ "test": "assertTrue((function testcase() {\n try {\n throw function () {\n this._12_14_14_foo = \"test\";\n };\n return false;\n } catch (e) {\n e();\n return fnGlobalObject()._12_14_14_foo === \"test\";\n }\n finally {\n delete fnGlobalObject()._12_14_14_foo;\n }\n }).call(this));\n"
+ },
+ {
+ "id": "12.14-15",
+ "path": "TestCases/chapter12/12.14/12.14-15.js",
+ "description": "Exception object is a function which is a property of an object, when an exception parameter is called as a function in catch block, global object is passed as the this value",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n obj.test = function () {\n this._12_14_15_foo = \"test\";\n };\n try {\n throw obj.test;\n return false;\n } catch (e) {\n e();\n return fnGlobalObject()._12_14_15_foo === \"test\";\n }\n finally {\n delete fnGlobalObject()._12_14_15_foo;\n }\n }).call(this));\n"
+ },
+ {
+ "id": "12.14-16",
+ "path": "TestCases/chapter12/12.14/12.14-16.js",
+ "description": "Exception object is a function which update in catch block, when an exception parameter is called as a function in catch block, global object is passed as the this value",
+ "test": "assertTrue((function testcase() {\n try {\n throw function () {\n this._12_14_16_foo = \"test\";\n };\n return false;\n } catch (e) {\n var obj = {};\n obj.test = function () {\n this._12_14_16_foo = \"test1\";\n };\n e = obj.test;\n e();\n return fnGlobalObject()._12_14_16_foo === \"test1\";\n }\n finally {\n delete fnGlobalObject()._12_14_16_foo;\n }\n\n }).call(this));\n"
+ },
+ {
+ "id": "12.14-2",
+ "path": "TestCases/chapter12/12.14/12.14-2.js",
+ "description": "catch doesn't change declaration scope - var initializer in catch with same name as catch parameter changes parameter",
+ "test": "assertTrue((function testcase() {\n function capturedFoo() {return foo};\n foo = \"prior to throw\";\n try {\n throw new Error();\n }\n catch (foo) {\n var foo = \"initializer in catch\";\n return capturedFoo() !== \"initializer in catch\";\n }\n \n }).call(this));\n"
+ },
+ {
+ "id": "12.14-3",
+ "path": "TestCases/chapter12/12.14/12.14-3.js",
+ "description": "catch doesn't change declaration scope - var declaration are visible outside when name different from catch parameter",
+ "test": "assertTrue((function testcase() {\n try {\n throw new Error();\n }\n catch (e) {\n var foo = \"declaration in catch\";\n }\n \n return foo === \"declaration in catch\";\n }).call(this));\n"
+ },
+ {
+ "id": "12.14-4",
+ "path": "TestCases/chapter12/12.14/12.14-4.js",
+ "description": "catch introduces scope - block-local vars must shadow outer vars",
+ "test": "assertTrue((function testcase() {\n var o = { foo : 42};\n\n try {\n throw o;\n }\n catch (e) {\n var foo;\n\n if (foo === undefined) {\n return true;\n }\n }\n }).call(this));\n"
+ },
+ {
+ "id": "12.14-6",
+ "path": "TestCases/chapter12/12.14/12.14-6.js",
+ "description": "catch introduces scope - block-local function expression must shadow outer function expression",
+ "test": "assertTrue((function testcase() {\n var o = {foo : function () { return 42;}};\n\n try {\n throw o;\n }\n catch (e) {\n var foo = function () {};\n if (foo() === undefined) {\n return true;\n }\n }\n }).call(this));\n"
+ },
+ {
+ "id": "12.14-7",
+ "path": "TestCases/chapter12/12.14/12.14-7.js",
+ "description": "catch introduces scope - scope removed when exiting catch block",
+ "test": "assertTrue((function testcase() {\n var o = {foo: 1};\n var catchAccessed = false;\n \n try {\n throw o;\n }\n catch (expObj) {\n catchAccessed = (expObj.foo == 1);\n }\n\n try {\n expObj;\n }\n catch (e) {\n return catchAccessed && e instanceof ReferenceError\n }\n return false;\n }).call(this));\n"
+ },
+ {
+ "id": "12.14-8",
+ "path": "TestCases/chapter12/12.14/12.14-8.js",
+ "description": "catch introduces scope - scope removed when exiting catch block (properties)",
+ "test": "assertTrue((function testcase() {\n var o = {foo: 42};\n\n try {\n throw o;\n }\n catch (e) {\n var foo = 1;\n }\n\n if (o.foo === 42) {\n return true;\n }\n }).call(this));\n"
+ },
+ {
+ "id": "12.14-9",
+ "path": "TestCases/chapter12/12.14/12.14-9.js",
+ "description": "catch introduces scope - name lookup finds outer variable",
+ "test": "assertTrue((function testcase() {\n function f(o) {\n var x = 42;\n\n function innerf(o) {\n try {\n throw o;\n }\n catch (e) {\n return x;\n }\n }\n\n return innerf(o);\n }\n \n if (f({}) === 42) {\n return true;\n }\n }).call(this));\n"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/12.14_The_try_Statement.json b/website/resources/scripts/testcases2/12.14_The_try_Statement.json
new file mode 100644
index 000000000..abd193227
--- /dev/null
+++ b/website/resources/scripts/testcases2/12.14_The_try_Statement.json
@@ -0,0 +1,375 @@
+{
+ "testCollection": {
+ "name": "12.14_The_try_Statement",
+ "numTests": 58,
+ "tests": [
+ {
+ "section": "12.14",
+ "description": "Executing TryStatement : try Block Catch. The statements doesn't cause actual exceptions",
+ "test": "// CHECK#1\ntry {\n var x=0;\n}\ncatch (e) {\n $ERROR('#1: If Result(1).type is not throw, return Result(1). Actual: 4 Return(Result(3))');\n}\n\n// CHECK#2\nvar c1=0;\ntry{\n var x1=1;\n}\nfinally\n{\n c1=1;\n}\nif(x1!==1){\n $ERROR('#2.1: \"try\" block must be evaluated. Actual: try Block has not been evaluated');\n}\nif (c1!==1){\n $ERROR('#2.2: \"finally\" block must be evaluated. Actual: finally Block has not been evaluated');\n}\n\n// CHECK#3\nvar c2=0;\ntry{\n var x2=1;\n}\ncatch(e){\n $ERROR('#3.1: If Result(1).type is not throw, return Result(1). Actual: 4 Return(Result(3))');\t\n}\nfinally{\n c2=1;\n}\nif(x2!==1){\n $ERROR('#3.2: \"try\" block must be evaluated. Actual: try Block has not been evaluated');\n}\nif (c2!==1){\n $ERROR('#3.3: \"finally\" block must be evaluated. Actual: finally Block has not been evaluated');\n}\n",
+ "id": "S12.14_A1"
+ },
+ {
+ "section": "12.14",
+ "description": "Throwing exception while executing iteration statement placed into try Block",
+ "test": "// CHECK#1\nvar i=0;\ntry{\nwhile(i<10){\n if(i===5) throw i;\n i++;\n}\n}\ncatch(e){\n if(e!==5)$ERROR('#1: Exception === 5. Actual: Exception ==='+ e );\n}\n",
+ "id": "S12.14_A10_T1"
+ },
+ {
+ "section": "12.14",
+ "description": "Try statement inside loop, where use continue loop",
+ "test": "// CHECK#1\nvar c1=0,fin=0;\nwhile(c1<2){\n try{\n c1+=1;\n continue;\n }\n catch(er1){}\n finally{\n fin=1;\n }\n fin=-1;\n};\nif(fin!==1){\n $ERROR('#1: \"finally\" block must be evaluated at \"try{continue} catch finally\" construction');\n}\n\n// CHECK#2\nvar c2=0,fin2=0;\nwhile(c2<2){\n try{\n throw \"ex1\";\n }\n catch(er1){\n c2+=1;\n continue;\n }\n finally{\n fin2=1;\n }\n fin2=-1;\n}\nif(fin2!==1){\n $ERROR('#2: \"finally\" block must be evaluated at \"try catch{continue} finally\" construction');\n}\n\n// CHECK#3\nvar c3=0,fin3=0;\nwhile(c3<2){\n try{\n throw \"ex1\";\n }\n catch(er1){\n c3+=1;\n }\n finally{\n fin3=1;\n continue;\n }\n fin3=0;\n}\nif(fin3!==1){\n $ERROR('#3: \"finally\" block must be evaluated at \"try catch finally{continue}\" construction');\n}\n\n// CHECK#4\nvar c4=0,fin4=0;\nwhile(c4<2){\n try{\n c4+=1;\n continue;\n }\n finally{\n fin4=1;\n }\n fin4=-1;\n};\nif(fin4!==1){\n $ERROR('#4: \"finally\" block must be evaluated at \"try{continue} finally\" construction');\n}\n\n// CHECK#5\nvar c5=0;\nwhile(c5<2){\n try{\n throw \"ex1\";\n }\n catch(er1){\n c5+=1;\n continue;\n }\n}\nif(c5!==2){\n $ERROR('#5: \"try catch{continue}\" must work correctly');\n}\n\n// CHECK#6\nvar c6=0,fin6=0;\nwhile(c6<2){\n try{\n c6+=1;\n throw \"ex1\"\n }\n finally{\n fin6=1;\n continue;\n }\n fin6=-1;\n}\nif(fin6!==1){\n $ERROR('#6.1: \"finally\" block must be evaluated');\n}\nif(c6!==2){\n $ERROR('#6.2: \"try finally{continue}\" must work correctly');\n}\n",
+ "id": "S12.14_A10_T2"
+ },
+ {
+ "section": "12.14",
+ "description": "Try statement inside loop, where use break",
+ "test": "// CHECK#1\nvar c1=0,fin=0;\nwhile(c1<2){\n try{\n c1+=1;\n break;\n }\n catch(er1){}\n finally{\n fin=1;\n }\n fin=-1;\n c1+=2;\n}\nif(fin!==1){\n $ERROR('#1.1: \"finally\" block must be evaluated');\n}\nif(c1!==1){\n $ERROR('#1.2: \"try{break}catch finally\" must work correctly');\n}\n\n// CHECK#2\nvar c2=0,fin2=0;\nwhile(c2<2){\n try{\n throw \"ex1\";\n }\n catch(er1){\n c2+=1;\n break;\n }\n finally{\n fin2=1;\n }\n c2+=2;\n fin2=-1;\n}\nif(fin2!==1){\n $ERROR('#2.1: \"finally\" block must be evaluated');\n}\nif(c2!==1){\n $ERROR('#2.2: \"try catch{break} finally\" must work correctly');\n}\n\n// CHECK#3\nvar c3=0,fin3=0;\nwhile(c3<2){\n try{\n throw \"ex1\";\n }\n catch(er1){\n c3+=1;\n }\n finally{\n fin3=1;\n break;\n }\n c3+=2;\n fin3=0;\n}\nif(fin3!==1){\n $ERROR('#3.1: \"finally\" block must be evaluated');\n}\nif(c3!==1){\n $ERROR('#3.2: \"try catch finally{break}\" must work correctly');\n}\n\n// CHECK#4\nvar c4=0,fin4=0;\nwhile(c4<2){\n try{\n c4+=1;\n break;\n }\n finally{\n fin4=1;\n }\n fin4=-1;\n c4+=2;\n}\nif(fin4!==1){\n $ERROR('#4.1: \"finally\" block must be evaluated');\n}\nif(c4!==1){\n $ERROR('#4.2: \"try{break} finally\" must work correctly');\n}\n\n// CHECK#5\nvar c5=0;\nwhile(c5<2){\n try{\n throw \"ex1\";\n }\n catch(er1){\n break;\n }\n}\nif(c5!==0){\n $ERROR('#5: \"try catch{break}\" must work correctly');\n}\n\n// CHECK#6\nvar c6=0;\nwhile(c6<2){\n try{\n c6+=1;\n break;\n }\n catch(er1){}\n c6+=2;\n}\nif(c6!==1){\n $ERROR('#6: \"try{break} catch\" must work correctly');\n}\n\n// CHECK#7\nvar c7=0,fin7=0;\ntry{\n while(c7<2){\n try{\n c7+=1;\n throw \"ex1\";\n }\n finally{\n fin7=1;\n break;\n }\n fin7=-1;\n c7+=2;\n }\n}\ncatch(ex1){\n c7=10;\n}\nif(fin7!==1){\n $ERROR('#7.1: \"finally\" block must be evaluated');\n}\nif(c7!==1){\n $ERROR('#7.2: \"try finally{break}\" must work correctly');\n}\n",
+ "id": "S12.14_A10_T3"
+ },
+ {
+ "section": "12.14",
+ "description": "Try statement inside loop, where combinate using break and continue",
+ "test": "// CHECK#1\nvar c1=0,fin=0;\nwhile(c1<2){\n try{\n c1+=1;\n break;\n }\n catch(er1){}\n finally{\n fin=1;\n continue;\n }\n fin=-1;\n c1+=2;\n}\nif(fin!==1){\n $ERROR('#1.1: \"finally\" block must be evaluated');\n}\nif(c1!==2){\n $ERROR('#1.2: \"try{break} catch finally{continue}\" must work correctly');\n}\n\n// CHECK#2\nvar c2=0,fin2=0;\nwhile(c2<2){\n try{\n throw \"ex1\";\n }\n catch(er1){\n c2+=1;\n break;\n }\n finally{\n fin2=1;\n continue;\n }\n c2+=2;\n fin2=-1;\n}\nif(fin2!==1){\n $ERROR('#2.1: \"finally\" block must be evaluated');\n}\nif(c2!==2){\n $ERROR('#2.2: \"try catch{break} finally{continue} must work correctly');\n}\n",
+ "id": "S12.14_A10_T4"
+ },
+ {
+ "section": "12.14",
+ "description": "Throw some exceptions from different place of loop body",
+ "test": "// CHECK#1\nvar c=0, i=0;\nvar fin=0;\nwhile(i<10){\n i+=1;\n try{\n if(c===0){\n throw \"ex1\";\n $ERROR('#1.1: throw \"ex1\" lead to throwing exception');\n }\n c+=2;\n if(c===1){\n throw \"ex2\";\n $ERROR('#1.2: throw \"ex2\" lead to throwing exception');\n }\n }\n catch(er1){\n c-=1;\n continue;\n $ERROR('#1.3: \"try catch{continue} finally\" must work correctly');\n }\n finally{\n fin+=1;\n }\n}\nif(fin!==10){\n $ERROR('#1.4: \"finally\" block must be evaluated');\n}\n",
+ "id": "S12.14_A10_T5"
+ },
+ {
+ "section": "12.14",
+ "description": "Loop inside try Block, where throw exception",
+ "test": "// CHECK#1\ntry{\n for(var i=0;i<10;i++){\n if(i===5) throw i;\n }\n}\ncatch(e){\n if(e!==5)$ERROR('#1: Exception === 5. Actual: Exception ==='+ e );\n}\n",
+ "id": "S12.14_A11_T1"
+ },
+ {
+ "section": "12.14",
+ "description": "Try statement inside loop, where use continue loop",
+ "test": "// CHECK#1\nvar fin=0;\nfor(var i=0;i<5;i++){\n try{\n i+=1;\n continue;\n }\n catch(er1){}\n finally{\n fin=1;\n }\n fin=-1;\n}\nif(fin!==1){\n $ERROR('#1: \"finally\" block must be evaluated at \"try{continue} catch finally\" construction');\n}\n\n// CHECK#2\nvar c2=0,fin2=0;\nfor(var i=0;i<5;i++){\n try{\n throw \"ex1\";\n }\n catch(er1){\n c2+=1;\n continue;\n }\n finally{\n fin2=1;\n }\n fin2=-1;\n}\nif(fin2!==1){\n $ERROR('#2.1: \"finally\" block must be evaluated');\n}\nif(c2!==5){\n $ERROR('#2.1: \"try catch{continue} finally\" must work correctly');\n}\n\n// CHECK#3\nvar c3=0,fin3=0;\nfor(var i=0;i<5;i++){\n try{\n throw \"ex1\";\n }\n catch(er1){\n c3+=1;\n }\n finally{\n fin3=1;\n continue;\n }\n fin3=0;\n}\nif(fin3!==1){\n $ERROR('#3.1: \"finally\" block must be evaluated');\n}\nif(c3!==5){\n $ERROR('#3.2: \"try catch finally{continue}\" must work correctly');\n}\n\n// CHECK#4\nvar fin=0;\nfor(var i=0;i<5;i++){\n try{\n i+=1;\n continue;\n }\n finally{\n fin=1;\n }\n fin=-1;\n};\nif(fin!==1){\n $ERROR('#4: \"finally\" block must be evaluated at \"try{continue} finally\" construction');\n}\n\n// CHECK#5\nvar c5=0;\nfor(var c5=0;c5<10;){\n try{\n throw \"ex1\";\n }\n catch(er1){\n c5+=1;\n continue;\n }\n c5+=12;\n};\nif(c5!==10){\n $ERROR('#5: \"try catch{continue} must work correctly');\n}\n\n// CHECK#6\nvar c6=0,fin6=0;\nfor(var c6=0;c6<10;){\n try{\n c6+=1;\n throw \"ex1\"\n }\n finally{\n fin6=1;\n continue;\n }\n fin6=-1;\n};\nif(fin6!==1){\n $ERROR('#6.1: \"finally\" block must be evaluated');\n}\nif(c6!==10){\n $ERROR('#6.2: \"try finally{continue}\" must work correctly');\n}\n",
+ "id": "S12.14_A11_T2"
+ },
+ {
+ "section": "12.14",
+ "description": "Try statement inside loop, where use break",
+ "test": "// CHECK#1\nvar c1=0,fin=0;\nfor(var i=0;i<5;i++){\n try{\n c1+=1;\n break;\n }\n catch(er1){}\n finally{\n fin=1;\n }\n fin=-1;\n c1+=2;\n};\nif(fin!==1){\n $ERROR('#1.1: \"finally\" block must be evaluated');\n}\nif(c1!==1){\n $ERROR('#1.2: \"try{break}catch finally\" must work correctly');\n}\n\n// CHECK#2\nvar c2=0,fin2=0;\nfor(var i=0;i<5;i++){\n try{\n throw \"ex1\";\n }\n catch(er1){\n c2+=1;\n break;\n }\n finally{\n fin2=1;\n }\n c2+=2;\n fin2=-1;\n};\nif(fin2!==1){\n $ERROR('#2.1: \"finally\" block must be evaluated');\n}\nif(c2!==1){\n $ERROR('#2.2: \"try catch{break} finally\" must work correctly');\n}\n\n// CHECK#3\nvar c3=0,fin3=0;\nfor(var i=0;i<5;i++){\n try{\n throw \"ex1\";\n }\n catch(er1){\n c3+=1;\n }\n finally{\n fin3=1;\n break;\n }\n c3+=2;\n fin3=0;\n};\nif(fin3!==1){\n $ERROR('#3.1: \"finally\" block must be evaluated');\n}\nif(c3!==1){\n $ERROR('#3.2: \"try catch finally{break}\" must work correctly');\n}\n\n// CHECK#4\nvar c4=0,fin4=0;\nfor(var i=0;i<5;i++){\n try{\n c4+=1;\n break;\n }\n finally{\n fin4=1;\n }\n fin4=-1;\n c4+=2;\n};\nif(fin4!==1){\n $ERROR('#4.1: \"finally\" block must be evaluated');\n}\nif(c4!==1){\n $ERROR('#4.2: \"try{break} finally\" must work correctly');\n}\n\n// CHECK#5\nfor(var i=0;i<5;i++){\n try{\n throw \"ex1\";\n }\n catch(er1){\n break;\n }\n};\nif(i!==0){\n $ERROR('#5: \"try catch{break}\" must work correctly');\n}\n\n// CHECK#6\nvar c6=0;\nfor(var c6=0;c6<5;){\n try{\n c6+=1;\n break;\n }\n catch(er1){}\n c6+=2;\n};\nif(c6!==1){\n $ERROR('#6: \"try{break} catch\" must work correctly');\n}\n\n// CHECK#7\nvar c7=0,fin7=0;\ntry{\n for(var c7=0;c7<5;){\n try{\n c7+=1;\n throw \"ex1\";\n }\n finally{\n fin7=1;\n break;\n }\n fin7=-1;\n c7+=2;\n }\n}\ncatch(ex1){\n c7=10;\n}\nif(fin7!==1){\n $ERROR('#7.1: \"finally\" block must be evaluated');\n}\nif(c7!==1){\n $ERROR('#7.2: \"try finally{break}\" must work correctly');\n}\n",
+ "id": "S12.14_A11_T3"
+ },
+ {
+ "section": "12.14",
+ "description": "Try statement inside loop, where combinate using break and continue",
+ "test": "// CHECK#1\nvar c1=0,fin=0;\nfor(var i=0;i<5;i++){\n try{\n c1+=1;\n break;\n }\n catch(er1){}\n finally{\n fin=1;\n continue;\n }\n fin=-1;\n c1+=2;\n}\nif(fin!==1){\n $ERROR('#1.1: \"finally\" block must be evaluated');\n}\nif(c1!==5){\n $ERROR('#1.2: \"try{break} catch finally{continue}\" must work correctly');\n}\n\n// CHECK#2\nvar c2=0,fin2=0;\nfor(var i=0;i<5;i++){\n try{\n throw \"ex1\";\n }\n catch(er1){\n c2+=1;\n break;\n }\n finally{\n fin2=1;\n continue;\n }\n c2+=2;\n fin2=-1;\n}\nif(fin2!==1){\n $ERROR('#2.1: \"finally\" block must be evaluated');\n}\nif(c2!==5){\n $ERROR('#2.2: \"try catch{break} finally{continue}\" must work correctly');\n}\n",
+ "id": "S12.14_A11_T4"
+ },
+ {
+ "section": "12.14",
+ "description": "Loop inside try Block, where throw exception",
+ "test": "var x;\nvar mycars = new Array();\nmycars[0] = \"Saab\";\nmycars[1] = \"Volvo\";\nmycars[2] = \"BMW\";\n\n// CHECK#1\ntry{\n for (x in mycars){\n if (mycars[x]===\"BMW\") throw \"ex\";\n }\n}\ncatch(e){\n if(e!==\"ex\")$ERROR('#1: Exception ===\"ex\". Actual: Exception ==='+ e );\n}\n\n\n",
+ "id": "S12.14_A12_T1"
+ },
+ {
+ "section": "12.14",
+ "description": "Try statement inside loop, where use continue loop",
+ "test": "var x;\nvar mycars = new Array();\nmycars[0] = \"Saab\";\nmycars[1] = \"Volvo\";\nmycars[2] = \"BMW\";\n\n// CHECK#1\nvar fin=0;\nvar i=0;\nfor (x in mycars){\n try{\n i+=1;\n continue;\n }\n catch(er1){}\n finally{\n fin=1;\n }\n fin=-1;\n}\nif(fin!==1){\n $ERROR('#1.1: \"finally\" block must be evaluated');\n}\nif(i!==3){\n $ERROR('#1.2: \"try{continue} catch finally\" must work correctly');\n}\n\n// CHECK#2\nvar c2=0,fin2=0;\nfor (x in mycars){\n try{\n throw \"ex1\";\n }\n catch(er1){\n c2+=1;\n continue;\n }\n finally{\n fin2=1;\n }\n fin2=-1;\n}\nif(fin2!==1){\n $ERROR('#2.1: \"finally\" block must be evaluated');\n}\nif(c2!==3){\n $ERROR('#2.1: \"try catch{continue} finally\" must work correctly');\n}\n\n// CHECK#3\nvar c3=0,fin3=0;\nfor (x in mycars){\n try{\n throw \"ex1\";\n }\n catch(er1){\n c3+=1;\n }\n finally{\n fin3=1;\n continue;\n }\n fin3=0;\n}\nif(c3!==3){\n $ERROR('#3.1: \"finally\" block must be evaluated');\n}\nif(fin3!==1){\n $ERROR('#3.2: \"try catch finally{continue}\" must work correctly');\n}\n\n// CHECK#4\nvar fin=0;\nfor (x in mycars){\n try{\n continue;\n }\n finally{\n fin=1;\n }\n fin=-1;\n}\nif(fin!==1){\n $ERROR('#4: \"finally\" block must be evaluated at \"try{continue} finally\" construction');\n}\n\n// CHECK#5\nvar c5=0;\nfor (x in mycars){\n try{\n throw \"ex1\";\n }\n catch(er1){\n c5+=1;\n continue;\n }\n c5+=12;\n}\nif(c5!==3){\n $ERROR('#5: \"try catch{continue}\" must work correctly');\n}\n\n// CHECK#6\nvar c6=0,fin6=0;\nfor (x in mycars){\n try{\n c6+=1;\n throw \"ex1\";\n }\n finally{\n fin6=1;\n continue;\n }\n fin6=-1;\n}\nif(fin6!==1){\n $ERROR('#6.1: \"finally\" block must be evaluated');\n}\nif(c6!==3){\n $ERROR('#6.2: \"try finally{continue}\" must work correctly');\n}\n",
+ "id": "S12.14_A12_T2"
+ },
+ {
+ "section": "12.14",
+ "description": "Try statement inside loop, where use break",
+ "test": "var x;\nvar mycars = new Array();\nmycars[0] = \"Saab\";\nmycars[1] = \"Volvo\";\nmycars[2] = \"BMW\";\n\n// CHECK#1\nvar c1=0,fin=0;\nfor (x in mycars){\n try{\n c1+=1;\n break;\n }\n catch(er1){\n c1+=1;\n }\n finally{\n fin=1;\n }\n fin=-1;\n c1+=2;\n};\nif(fin!==1){\n $ERROR('#1.1: \"finally\" block must be evaluated');\n}\nif(c1!==1){\n $ERROR('#1.2: \"try{break}catch finally\" must work correctly');\n}\n\n// CHECK#2\nvar c2=0,fin2=0;\nfor (x in mycars){\n try{\n throw \"ex1\";\n }\n catch(er1){\n c2+=1;\n break;\n }\n finally{\n fin2=1;\n }\n c2+=2;\n fin2=-1;\n}\nif(fin2!==1){\n $ERROR('#2.1: \"finally\" block must be evaluated');\n}\nif(c2!==1){\n $ERROR('#2.2: \"try catch{break} finally\" must work correctly');\n}\n\n// CHECK#3\nvar c3=0,fin3=0;\nfor (x in mycars){\n try{\n throw \"ex1\";\n }\n catch(er1){\n c3+=1;\n }\n finally{\n fin3=1;\n break;\n }\n c3+=2;\n fin3=0;\n}\nif(fin3!==1){\n $ERROR('#3.1: \"finally\" block must be evaluated');\n}\nif(c3!==1){\n $ERROR('#3.2: \"try catch finally{break}\" must work correctly');\n}\n\n// CHECK#4\nvar c4=0,fin4=0;\nfor (x in mycars){\n try{\n c4+=1;\n break;\n }\n finally{\n fin4=1;\n }\n fin4=-1;\n c4+=2;\n}\nif(fin4!==1){\n $ERROR('#4.1: \"finally\" block must be evaluated');\n}\nif(c4!==1){\n $ERROR('#4.2: \"try{break} finally\" must work correctly');\n}\n\n// CHECK#5\nvar c5=0;\nfor (x in mycars){\n try{\n throw \"ex1\";\n c5++;\n }\n catch(er1){\n break;\n c5++;\n }\n c5++;\n}\nif(c5!==0){\n $ERROR('#5: \"try catch{break}\" must work correctly');\n}\n\n// CHECK#6\nvar c6=0;\nfor (x in mycars){\n try{\n c6+=1;\n break;\n }\n catch(er1){}\n c6+=2;\n}\nif(c6!==1){\n $ERROR('#6: \"try{break} catch\" must work correctly');\n}\n\n// CHECK#7\nvar c7=0,fin7=0;\ntry{\n for (x in mycars){\n try{\n c7+=1;\n throw \"ex1\";\n }\n finally{\n fin7=1;\n break;\n }\n fin7=-1;\n c7+=2;\n }\n}\ncatch(ex1){\n c7=10;\n}\nif(fin7!==1){\n $ERROR('#7.1: \"finally\" block must be evaluated');\n}\nif(c7!==1){\n $ERROR('#7.2: \"try finally{break}\" must work correctly');\n}\n",
+ "id": "S12.14_A12_T3"
+ },
+ {
+ "section": "12.14",
+ "description": "Try statement inside loop, where combinate using break and continue",
+ "test": "var x;\nvar mycars = new Array();\nmycars[0] = \"Saab\";\nmycars[1] = \"Volvo\";\nmycars[2] = \"BMW\";\n\n// CHECK#1\nvar c1=0,fin=0;\nfor (x in mycars){\n try{\n c1+=1;\n break;\n }\n catch(er1){}\n finally{\n fin=1;\n continue;\n }\n fin=-1;\n c1+=2;\n}\nif(fin!==1){\n $ERROR('#1.1: \"finally\" block must be evaluated');\n}\nif(c1!==3){\n $ERROR('#1.2: \"try{break} catch finally{continue}\" must work correctly');\n}\n\n// CHECK#2\nvar c2=0,fin2=0;\nfor (x in mycars){\n try{\n throw \"ex1\";\n }\n catch(er1){\n c2+=1;\n break;\n }\n finally{\n \tfin2=1;\n \tcontinue;\n }\n c2+=2;\n fin2=-1;\n}\nif(fin2!==1){\n $ERROR('#2.1: \"finally\" block must be evaluated');\n}\nif(c2!==3){\n $ERROR('#2.2: \"try catch{break} finally{continue}\" must work correctly');\n}\n",
+ "id": "S12.14_A12_T4"
+ },
+ {
+ "section": "12.14",
+ "description": "Using try/catch syntax construction",
+ "test": "// CHECK#1\nfunction myFunction1(){\n try{\n return 1;\n }\n catch(err){\n \t$ERROR('#1.1: \"return 1\" inside function does not lead to throwing exception');\n return 0;\n }\n return 2;\n}\nvar x1=myFunction1();\nif(x1!==1){\n $ERROR('#1.2: x1===1. Actual: x1==='+x1);\n}\n\n// CHECK#2\nfunction myFunction2(){\n try{\n throw \"exc\";\n return 1;\n }catch(err){ \t\n return 2;\n }\n return 3;\n}\nvar x2=myFunction2();\nif (x2!==2){\n $ERROR('#2: x2===2. Actual: x2==='+x2);\n}\n\n// CHECK#3\nfunction myFunction3(){\n try{\n return someValue;\n }catch(err){ \t\n return 1;\n }\n return 2;\n}\nvar x3=myFunction3();\nif (x3!==1){\n $ERROR('#3: x3===1. Actual: x3==='+x3);\n}\n\n// CHECK#4\nfunction myFunction4(){\n try{\n throw \"ex1\";\n return 1;\n }catch(err){\n throw \"ex2\"\n return 0;\n }\n return 2;\n}\ntry{\n var x4=myFunction4();\n $ERROR('#4.1: Throwing exception inside function lead to throwing exception outside this function');\n}\ncatch(e){\n if(e===\"ex1\"){\n $ERROR('#4.2: Exception !==\"ex1\". Actual: catch previous exception');\n }\n if(e!==\"ex2\"){\n $ERROR('#4.3: Exception ===\"ex2\". Actual: Exception ==='+ e );\n }\n}\n",
+ "id": "S12.14_A13_T1"
+ },
+ {
+ "section": "12.14",
+ "description": "Using try/finally syntax construction",
+ "test": "// CHECK#1\nvar c1=0;\nfunction myFunction1(){\n try{\n return 1;\n }finally{\n c1=1;\n }\n return 2;\n}\nvar x1=myFunction1();\nif(x1!==1){\n $ERROR('#1.1: x1===1. Actual: x1==='+x1);\n}\nif (c1!==1){\n $ERROR('#1.2: \"finally\" block must be evaluated');\n}\n\n// CHECK#2\nvar c2=0;\nfunction myFunction2(){\n try{\n throw \"exc\";\n return 1;\n }finally{\n c2=1;\n }\n return 2;\n}\ntry{\n var x2=myFunction2();\n $ERROR('#2.1: Throwing exception inside function lead to throwing exception outside this function');\n}\ncatch(e){\n if (c2!==1){\n $ERROR('#2.2: \"finally\" block must be evaluated');\n }\n}\n\n// CHECK#3\nvar c3=0;\nfunction myFunction3(){\n try{\n return someValue;\n }finally{\n c3=1;\n }\n return 2;\n}\ntry{\n var x3=myFunction3();\n $ERROR('#3.1: Throwing exception inside function lead to throwing exception outside this function');\n}\ncatch(e){\n if (c3!==1){\n $ERROR('#3.2: \"finally\" block must be evaluated');\n }\n}\n\n// CHECK#4\nvar c4=0;\nfunction myFunction4(){\n try{\n return 1;\n }finally{\n c4=1;\n throw \"exc\";\n return 0;\n }\n return 2;\n}\ntry{\n var x4=myFunction4();\n $ERROR('#4.2: Throwing exception inside function lead to throwing exception outside this function');\n}\ncatch(e){\n if (c4!==1){\n $ERROR('#4.3: \"finally\" block must be evaluated');\n }\n}\n\n// CHECK#5\nvar c5=0;\nfunction myFunction5(){\n try{\n return 1;\n }finally{\n c5=1;\n return someValue;\n return 0;\n }\n return 2;\n}\ntry{\n var x5=myFunction5();\n $ERROR('#5.2: Throwing exception inside function lead to throwing exception outside this function');\n}\ncatch(e){\n if (c5!==1){\n $ERROR('#5.3: \"finally\" block must be evaluated');\n }\n}\n\n// CHECK#6\nvar c6=0;\nfunction myFunction6(){\n try{\n throw \"ex1\";\n return 1;\n }finally{\n c6=1;\n throw \"ex2\";\n return 2;\n }\n return 3;\n}\ntry{\n var x6=myFunction6();\n $ERROR('#6.1: Throwing exception inside function lead to throwing exception outside this function');\n}\ncatch(e){\n if(e===\"ex1\"){\n $ERROR('#6.2: Exception !==\"ex1\". Actual: catch previous exception');\n }\n if(e!==\"ex2\"){\n $ERROR('#6.3: Exception !==\"ex1\". Actual: '+e);\n }\n if (c6!==1){\n $ERROR('#6.4: \"finally\" block must be evaluated');\n }\n}\n\n// CHECK#7\nvar c7=0;\nfunction myFunction7(){\n try{\n return 1;\n }finally{\n c7=1;\n return 2;\n }\n return 3;\n}\nvar x7=myFunction7();\nif(x7!==2){\n $ERROR('#7.1: \"catch\" block must be evaluated');\n}\nif (c7!==1){\n $ERROR('#7.2: \"finally\" block must be evaluated');\n}\n\n// CHECK#8\nvar c8=0;\nfunction myFunction8(){\n try{\n throw \"ex1\";\n }finally{\n c8=1;\n return 2;\n }\n return 3;\n}\ntry{\n var x8=myFunction8();\n}\ncatch(ex1){\n c8=10;\n}\nif (c8!==1){\n $ERROR('#8: \"finally\" block must be evaluated');\n}\n",
+ "id": "S12.14_A13_T2"
+ },
+ {
+ "section": "12.14",
+ "description": "Using try/catch/finally syntax construction",
+ "test": "// CHECK#1\nvar c1=0;\nfunction myFunction1(){\n try{\n return 1;\n }catch(err){\n $ERROR('#1.1: \"return 1\" inside function does not lead to throwing exception');\n return 0;\n }finally{\n c1=1;\n }\n return 2;\n}\nvar x1=myFunction1();\nif(x1!==1){\n $ERROR('#1.3: x1===1. Actual: x1==='+x1);\n}\nif (c1!==1){\n $ERROR('#1.4: \"finally\" block must be evaluated');\n}\n\n// CHECK#2\nvar c2=0;\nfunction myFunction2(){\n try{\n throw \"exc\";\n return 1;\n }catch(err){ \t\n return 0;\n }finally{\n c2=1;\n }\n return 2;\n}\nvar x2=myFunction2();\nif (c2!==1){\n $ERROR('#2.1: \"finally\" block must be evaluated');\n}\nif (x2!==0){\n $ERROR('#2.2: x2===0. Actual: x2==='+x2);\n}\n\n// CHECK#3\nvar c3=0;\nfunction myFunction3(){\n try{\n return someValue;\n }catch(err){ \t\n return 1;\n }finally{\n c3=1;\n }\n return 2;\n}\nvar x3=myFunction3();\nif (c3!==1){\n $ERROR('#3.1: \"finally\" block must be evaluated');\n}\nif (x3!==1){\n $ERROR('#3.2: x3===1. Actual: x3==='+x3);\n}\n\n// CHECK#4\nvar c4=0;\nfunction myFunction4(){\n try{\n throw \"ex1\";\n return 1;\n }catch(err){\n throw \"ex2\"\n return 0;\n }finally{\n c4=1;\n }\n return 2;\n}\ntry{\n var x4=myFunction4();\n $ERROR('#4.1: Throwing exception inside function lead to throwing exception outside this function');\n}\ncatch(e){\n if(e===\"ex1\"){\n $ERROR('#4.2: Exception !== \"ex1\". Actual: catch previous exception');\n }\n if(e!==\"ex2\"){\n $ERROR('#4.3: Exception === \"ex2\". Actual: Exception ==='+ e );\n }\n if (c4!==1){\n $ERROR('#4.4: \"finally\" block must be evaluated');\n }\t\n}\n\n// CHECK#5\nvar c5=0;\nfunction myFunction5(){\n try{\n throw \"ex1\";\n return 1;\n }catch(err){\n return 0;\n }finally{\n c5=1;\n throw \"ex2\";\n }\n return 2;\n}\ntry{\n var x5=myFunction5();\n $ERROR('#5.1: Throwing exception inside function lead to throwing exception outside this function');\n}\ncatch(e){\n if(e===\"ex1\"){\n $ERROR('#5.2: Exception !== \"ex1\". Actual: catch previous exception');\n }\n if(e!==\"ex2\"){\n $ERROR('#5.3: Exception === \"ex2\". Actual: Exception ==='+ e );\n }\n if (c5!==1){\n $ERROR('#5.4: \"finally\" block must be evaluated');\n } \t\n}\n\n// CHECK#6\nvar c6=0;\nfunction myFunction6(){\n try{\n throw \"ex1\";\n return 1;\n }catch(err){\n throw \"ex2\";\n return 0;\n }finally{\n c6=1;\n throw \"ex3\";\n }\n return 2;\n}\ntry{\n var x6=myFunction6();\n $ERROR('#6.1: Throwing exception inside function lead to throwing exception outside this function');\n}\ncatch(e){\n if(e===\"ex1\"){\n $ERROR('#6.2: Exception !== \"ex1\". Actual: catch previous exception');\n }\n if(e===\"ex2\"){\n $ERROR('#6.3: Exception !== \"ex2\". Actual: catch previous exception');\n }\n if(e!==\"ex3\"){\n $ERROR('#6.4: Exception === \"ex3\". Actual: Exception ==='+ e );\n }\t\n if(c6!==1) $ERROR('#6.5: \"finally\" block must be evaluated');\n}\n\n// CHECK#7\nvar c7=0;\nfunction myFunction7(){\n try{\n throw \"ex1\";\n return 1;\n }catch(err){\n throw \"ex2\";\n return 0;\n }finally{\n c7=1;\n return 2;\n }\n return 3;\n}\ntry{\n var x7=myFunction7();\n if(x7!==2) $ERROR('#7.1: x7===2. Actual: x7==='+x7);\n}\ncatch(e){}\nif(c7!==1) $ERROR('#7.2: \"finally\" block must be evaluated');\n",
+ "id": "S12.14_A13_T3"
+ },
+ {
+ "section": "12.14",
+ "description": "Using try/catch/finally in With and With in try/catch/finally",
+ "strict_mode_negative": "SyntaxError",
+ "test": "var myObj = {p1: 'a',\n p2: 'b',\n p3: 'c',\n value: 'myObj_value',\n valueOf : function(){return 'obj_valueOf';},\n parseInt : function(){return 'obj_parseInt';},\n NaN : 'obj_NaN',\n Infinity : 'obj_Infinity',\n eval : function(){return 'obj_eval';},\n parseFloat : function(){return 'obj_parseFloat';},\n isNaN : function(){return 'obj_isNaN';},\n isFinite : function(){return 'obj_isFinite';}\n}\n\n// CHECK#1\ntry{\n with(myObj){\n throw \"ex\";\n }\n}\ncatch(e){\n if (e!==\"ex\") $ERROR('#1: Exception ===\"ex\". Actual: Exception ==='+ e );\n}\n\n// CHECK#2\nwith(myObj){\n try{\n throw p1;\n }\n catch(e){\n if (e!==\"a\") $ERROR('#2.1: Exception ===\"a\". Actual: Exception ==='+ e );\n p1='pass';\n }\n}\nif(myObj.p1!=='pass') $ERROR('#2.2: \"throw p1\" lead to throwing exception');\n\n// CHECK#3\nwith(myObj){\n try{\n p1='fail';\n throw p2;\n }\n catch(e){\n if (e!==\"b\") $ERROR('#3.1: Exception ===\"b\". Actual: Exception ==='+ e );\n p1='pass';\n }\n finally{\n p2='pass';\n }\n}\nif(myObj.p1!=='pass') $ERROR('#3.2: \"throw p2\" lead to throwing exception');\nif(myObj.p2!=='pass') $ERROR('#3.3: \"finally\" block must be evaluated');\n\n// CHECK#4\nmyObj.p1='fail';\ntry{\n with(myObj){\n try{\n throw p3;\n }\n finally{\n p1='pass';\n }\n }\n}\ncatch(e){}\nif(myObj.p1!=='pass') $ERROR('#4: \"finally\" block must be evaluated');\n",
+ "id": "S12.14_A14",
+ "strict_only": ""
+ },
+ {
+ "section": "12.14",
+ "description": "Insert try/catch/finally to switch statement",
+ "test": "// CHECK#1\nfunction SwitchTest1(value){\n var result = 0;\n try{ \n switch(value) {\n case 1:\n result += 4;\n throw result;\n break;\n default:\n result += 32;\n break;\n case 4:\n result += 64;\n throw \"ex\";\n }\n return result;\n }\n catch(e){\t\n if ((value===1)&&(e!==4)) $ERROR('#1.1: Exception ===4. Actual: Exception ==='+ e );\n if ((value===4)&&(e!==\"ex\")) $ERROR('#1.2: Exception ===\"ex\". Actual: Exception ==='+ e );\n }\n finally{\n return result;\n }\n}\nif (SwitchTest1(1)!==4) $ERROR('#1.3: SwitchTest1(1)===4. Actual: SwitchTest1(1)==='+ SwitchTest1(1) );\nif (SwitchTest1(4)!==64) $ERROR('#1.4: SwitchTest1(4)===64. Actual: SwitchTest1(4)==='+ SwitchTest1(4) );\n\n// CHECK#2\nvar c2=0;\nfunction SwitchTest2(value){\n var result = 0;\n switch(value) {\n case 0:\n try{ \n result += 2;\n break;\n }\n finally{\n c2=1;\n }\n case 1:\n result += 4;\n break;\n default:\n result += 32;\n break;\n }\n return result;\n}\nif (SwitchTest2(1)!==4) $ERROR('#2.1: SwitchTest1(1)===4. Actual: SwitchTest1(1)==='+ SwitchTest1(1) );\nif (c2===1) $ERROR('#2.2: Evaluate finally block');\nif (SwitchTest2(0)!==2) $ERROR('#2.3: SwitchTest1(0)===2. Actual: SwitchTest1(0)==='+ SwitchTest1(0) );\nif (c2!==1) $ERROR('#2.4: \"finally\" block must be evaluated');\n\n// CHECK#3\nfunction SwitchTest3(value){\n var result = 0;\n switch(value) {\n case 0:\n try{ \n result += 2;\n throw \"ex\";\n }\n finally{\n break;\n }\n default:\n result += 32;\n break;\n }\n return result;\n}\ntry{\n var x3=SwitchTest3(0);\n if (x3!==2) $ERROR('#3.1: x3===2. Actual: x3==='+x3);\n}\ncatch(e){\n $ERROR('#3.2: Catching exception inside function does not lead to throwing exception outside this function');\n}\n",
+ "id": "S12.14_A15"
+ },
+ {
+ "section": "12.14",
+ "description": "Checking if pure \"try\" syntax construction passes",
+ "negative": "",
+ "test": "// CHECK#1\ntry\n",
+ "id": "S12.14_A16_T1"
+ },
+ {
+ "section": "12.14",
+ "description": "Catch: \"catch (Identifier ) Block\"",
+ "negative": "",
+ "test": "// CHECK#1\ntry{}\ncatch(){}\nfinally{}\n\n\n",
+ "id": "S12.14_A16_T10"
+ },
+ {
+ "section": "12.14",
+ "description": "Catch and Finally are placed into the Block of \"try\" (whitle expected outside)",
+ "negative": "",
+ "test": "// CHECK#1\ntry{\n {\n }\n catch(e){}\n finally{}\n}\n\n",
+ "id": "S12.14_A16_T11"
+ },
+ {
+ "section": "12.14",
+ "description": "Embedded \"try\" statements followed by two \"catch\" statements",
+ "negative": "",
+ "test": "// CHECK#1\ntry\n{\n try\n {\n }\n}\ncatch(e1){}\ncatch(e2){}\n\n\n",
+ "id": "S12.14_A16_T12"
+ },
+ {
+ "section": "12.14",
+ "description": "Catch: \"catch (Identifier ) Block\". Checking if execution of \"22\" passes at the place of Identifier of \"catch\"",
+ "negative": "",
+ "test": "// CHECK#1\ntry\n{\n}\ncatch(\"22\")\n{\n}\n\n\n\n",
+ "id": "S12.14_A16_T13"
+ },
+ {
+ "section": "12.14",
+ "description": "Checking if passing argument to \"try\" statement fails",
+ "negative": "",
+ "test": "// CHECK#1\ntry(e1){\t\n}\ncatch(e){}\n\n\n\n",
+ "id": "S12.14_A16_T14"
+ },
+ {
+ "section": "12.14",
+ "description": "Finally: \"finally Block\". Checking if passing argument to \"try\" statement fails",
+ "negative": "",
+ "test": "// CHECK#1\ntry{\t\n}\nfinally(e){}\n\n\n\n\n",
+ "id": "S12.14_A16_T15"
+ },
+ {
+ "section": "12.14",
+ "description": "Checking if execution of \"catch\" with no \"try\" fails",
+ "negative": "",
+ "test": "// CHECK#1\ncatch\n",
+ "id": "S12.14_A16_T2"
+ },
+ {
+ "section": "12.14",
+ "description": "Checking if execution of \"finally\" with no \"try\" fails",
+ "negative": "",
+ "test": "// CHECK#1\nfinally\n",
+ "id": "S12.14_A16_T3"
+ },
+ {
+ "section": "12.14",
+ "description": "Catch: \"catch (Identifier ) Block\". Checking if execution of \"catch\" that takes no arguments fails",
+ "negative": "",
+ "test": "// CHECK#1\ntry{}\ncatch{}\n",
+ "id": "S12.14_A16_T4"
+ },
+ {
+ "section": "12.14",
+ "description": "Catch: \"catch (Identifier ) Block\". Checking if execution of \"catch\" with no Block fails",
+ "negative": "",
+ "test": "// CHECK#1\ntry{}\ncatch()\n",
+ "id": "S12.14_A16_T5"
+ },
+ {
+ "section": "12.14, 12.1",
+ "description": "Block: \"{ StatementList }\". Checking if execution of \"try{ catch{}{}\" fails",
+ "negative": "",
+ "test": "// CHECK#1\ntry{\ncatch(){}\n",
+ "id": "S12.14_A16_T6"
+ },
+ {
+ "section": "12.14, 12.1",
+ "description": "Block: \"{ StatementList }\". Checking if execution of \"try{} catch(){\" fails",
+ "negative": "",
+ "test": "// CHECK#1\ntry{}\ncatch(){\n\n",
+ "id": "S12.14_A16_T7"
+ },
+ {
+ "section": "12.14, 12.1",
+ "description": "Block: \"{ StatementList }\". Catch: \"catch (Identifier ) Block\". Checking if execution of \"try{} catch(){finally{}\" fails",
+ "negative": "",
+ "test": "// CHECK#1\ntry{}\ncatch(){\nfinally{}\n\n\n",
+ "id": "S12.14_A16_T8"
+ },
+ {
+ "section": "12.14",
+ "description": "Checking if execution of \"catch(){} finally{}\" fails",
+ "negative": "",
+ "test": "// CHECK#1\ncatch(){}\nfinally{}\n\n\n",
+ "id": "S12.14_A16_T9"
+ },
+ {
+ "section": "12.14",
+ "description": "Creating exceptions within constructor",
+ "test": "var i=1;\nfunction Integer( value, exception ) {\n try{\n this.value = checkValue( value );\n if(exception) $ERROR('#'+i+'.1: Must be exception');\n }\n catch(e){\n this.value = e.toString();\n if(!exception) $ERROR('#'+i+'.2: Don`t must be exception');\n }\n i++;\n}\n\nfunction checkValue(value){\n if(Math.floor(value)!=value||isNaN(value)){\n throw (INVALID_INTEGER_VALUE +\": \" + value);\n }\n else{\n return value;\n }\n}\n\n// CHECK#1\nnew Integer(13, false);\n// CHECK#2\nnew Integer(NaN, true);\n// CHECK#3\nnew Integer(0, false);\n// CHECK#4\nnew Integer(Infinity, false);\n// CHECK#5\nnew Integer(-1.23, true);\n// CHECK#6\nnew Integer(Math.LN2, true);\n",
+ "id": "S12.14_A17"
+ },
+ {
+ "section": "12.14, 12.13",
+ "description": "Catching undefined",
+ "test": "// CHECK#1\ntry{\n throw undefined;\n}\ncatch(e){\n if (e!==undefined) $ERROR('#1: Exception === undefined. Actual: '+e);\n}\n",
+ "id": "S12.14_A18_T1"
+ },
+ {
+ "section": "12.14, 12.13",
+ "description": "Catching null",
+ "test": "// CHECK#1\ntry{\n throw null;\n}\ncatch(e){\n if (e!==null) $ERROR('#1: Exception ===null. Actual: '+e);\n}\n",
+ "id": "S12.14_A18_T2"
+ },
+ {
+ "section": "12.14, 12.13",
+ "description": "Catching boolean",
+ "test": "// CHECK#1\ntry{\n throw true;\n}\ncatch(e){\n if (e!==true) $ERROR('#1: Exception ===true. Actual: Exception ==='+ e );\n}\n\n// CHECK#2\ntry{\n throw false;\n}\ncatch(e){\n if (e!==false) $ERROR('#2: Exception ===false. Actual: Exception ==='+ e );\n}\n\n// CHECK#3\nvar b=false;\ntry{\n throw b;\n}\ncatch(e){\n if (e!==false) $ERROR('#3: Exception ===false. Actual: Exception ==='+ e );\n}\n\n// CHECK#4\nvar b=true;\ntry{\n throw b;\n}\ncatch(e){\n if (e!==true) $ERROR('#4: Exception ===true. Actual: Exception ==='+ e );\n}\n\n// CHECK#5\nvar b=true;\ntry{\n throw b&&false;\n}\ncatch(e){\n if (e!==false) $ERROR('#5: Exception ===false. Actual: Exception ==='+ e );\n}\n\n// CHECK#5\nvar b=true;\ntry{\n throw b||false;\n}\ncatch(e){\n if (e!==true) $ERROR('#6: Exception ===true. Actual: Exception ==='+ e );\n}\n",
+ "id": "S12.14_A18_T3"
+ },
+ {
+ "section": "12.14, 12.13",
+ "description": "Catching string",
+ "test": "// CHECK#1\ntry{\n throw \"exception #1\";\n}\ncatch(e){\n if (e!==\"exception #1\") $ERROR('#1: Exception ===\"exception #1\". Actual: Exception ==='+ e );\n}\n\n// CHECK#2\ntry{\n throw \"exception\"+\" #1\";\n}\ncatch(e){\n if (e!==\"exception #1\") $ERROR('#2: Exception ===\"exception #1\". Actual: Exception ==='+ e );\n}\n\n// CHECK#3\nvar b=\"exception #1\";\ntry{\n throw b;\n}\ncatch(e){\n if (e!==\"exception #1\") $ERROR('#3: Exception ===\"exception #1\". Actual: Exception ==='+ e );\n}\n\n// CHECK#4\nvar a=\"exception\";\nvar b=\" #1\";\ntry{\n throw a+b;\n}\ncatch(e){\n if (e!==\"exception #1\") $ERROR('#4: Exception ===\"exception #1\". Actual: Exception ==='+ e );\n}\n",
+ "id": "S12.14_A18_T4"
+ },
+ {
+ "section": "12.14, 12.13",
+ "description": "Catching Number",
+ "test": "// CHECK#1\ntry{\n throw 13;\n}\ncatch(e){\n if (e!==13) $ERROR('#1: Exception ===13. Actual: Exception ==='+ e );\n}\n\n// CHECK#2\ntry{\n throw 10+3;\n}\ncatch(e){\n if (e!==13) $ERROR('#2: Exception ===13. Actual: Exception ==='+ e );\n}\n\n// CHECK#3\nvar b=13;\ntry{\n throw b;\n}\ncatch(e){\n if (e!==13) $ERROR('#3: Exception ===13. Actual: Exception ==='+ e );\n}\n\n// CHECK#4\nvar a=3;\nvar b=10;\ntry{\n throw a+b;\n}\ncatch(e){\n if (e!==13) $ERROR('#4: Exception ===13. Actual: Exception ==='+ e );\n}\n\n// CHECK#5\ntry{\n throw 2.13;\n}\ncatch(e){\n if (e!==2.13) $ERROR('#5: Exception ===2.13. Actual: Exception ==='+ e );\n}\n\n// CHECK#6\nvar ex=2/3;\ntry{\n throw 2/3;\n}\ncatch(e){\n if (e!==ex) $ERROR('#6: Exception ===2/3. Actual: Exception ==='+ e );\n}\n\n// CHECK#7\ntry{\n throw NaN;\n}\ncatch(e){\n if (!isNaN(e)) $ERROR('#7: Exception is NaN');\n}\n\n// CHECK#8\ntry{\n throw +Infinity;\n}\ncatch(e){\n if (e!==+Infinity) $ERROR('#8: Exception ===+Infinity. Actual: Exception ==='+ e );\n}\n\n// CHECK#9\ntry{\n throw -Infinity;\n}\ncatch(e){\n if (e!==-Infinity) $ERROR('#9: Exception ===-Infinity. Actual: Exception ==='+ e );\n}\n\n// CHECK#10\ntry{\n throw +0;\n}\ncatch(e){\n if (e!==+0) $ERROR('#10: Exception ===+0. Actual: Exception ==='+ e );\n}\n\n// CHECK#11\ntry{\n throw -0;\n}\ncatch(e){\n if (e!==-0) $ERROR('#11: Exception ===-0. Actual: Exception ==='+ e );\n}\n",
+ "id": "S12.14_A18_T5"
+ },
+ {
+ "section": "12.14, 12.13",
+ "description": "Catching Object",
+ "test": "var myObj = {p1: 'a', \n p2: 'b', \n p3: 'c',\n value: 'myObj_value',\n valueOf : function(){return 'obj_valueOf';},\n parseInt : function(){return 'obj_parseInt';},\n NaN : 'obj_NaN',\n Infinity : 'obj_Infinity',\n eval : function(){return 'obj_eval';},\n parseFloat : function(){return 'obj_parseFloat';},\n isNaN : function(){return 'obj_isNaN';},\n isFinite : function(){return 'obj_isFinite';},\n i:7,\n}\n\ntry{\n throw myObj;\n}\ncatch(e){\t\n// CHECK#1\n if (e.p1!==\"a\") $ERROR('#1: e.p1===\"a\". Actual: e.p1==='+ e.p1 );\n// CHECK#2\n if (e.value!=='myObj_value') $ERROR('#2: e.value===\\'myObj_value\\'. Actual: e.value==='+ e.value );\n// CHECK#3\n if (e.eval()!=='obj_eval') $ERROR('#3: e.eval()===\\'obj_eval\\'. Actual: e.eval()==='+ e.eval() );\n}\n\n// CHECK#4\nmyObj.i=6;\ntry{\n throw myObj;\n}\ncatch(e){}\nif (myObj.i!==6) $ERROR('#4: Handling of catch must be correct');\n\n// CHECK#5\nmyObj.i=6;\ntry{\n throw myObj;\n}\ncatch(e){\n e.i=10;\n}\nif (myObj.i!==10) $ERROR('#5: Handling of catch must be correct');\n",
+ "id": "S12.14_A18_T6"
+ },
+ {
+ "section": "12.14, 12.13",
+ "description": "Catching Array",
+ "test": "var mycars = new Array();\nmycars[0] = \"Saab\";\nmycars[1] = \"Volvo\";\nmycars[2] = \"BMW\";\n\nvar mycars2 = new Array();\nmycars2[0] = \"Mercedes\";\nmycars2[1] = \"Jeep\";\nmycars2[2] = \"Suzuki\";\n\n// CHECK#1\ntry{\n throw mycars;\n}\ncatch(e){\n for (var i=0;i<3;i++){\n if (e[i]!==mycars[i]) $ERROR('#1.'+i+': Exception['+i+']===mycars['+i+']. Actual: Exception['+i+']==='+ e[i] );\n }\n}\n\n// CHECK#2\ntry{\n throw mycars.concat(mycars2);\n}\ncatch(e){\n for (var i=0;i<3;i++){\n if (e[i]!==mycars[i]) $ERROR('#2.'+i+': Exception['+i+']===mycars['+i+']. Actual: Exception['+i+']==='+ e[i] );\n }\n for (var i=3;i<6;i++){\n if (e[i]!==mycars2[i-3]) $ERROR('#2.'+i+': Exception['+i+']===mycars2['+i+']. Actual: Exception['+i+']==='+ e[i] );\n }\n}\n\n// CHECK#3\ntry{\n throw new Array(\"Mercedes\",\"Jeep\",\"Suzuki\");\n}\ncatch(e){\n for (var i=0;i<3;i++){\n if (e[i]!==mycars2[i]) $ERROR('#3.'+i+': Exception['+i+']===mycars2['+i+']. Actual: Exception['+i+']==='+ e[i]);\n }\n}\n\n// CHECK#4\ntry{\n throw mycars.concat(new Array(\"Mercedes\",\"Jeep\",\"Suzuki\"));\n}\ncatch(e){\n for (var i=0;i<3;i++){\n if (e[i]!==mycars[i]) $ERROR('#4.'+i+': Exception['+i+']===mycars['+i+']. Actual: Exception['+i+']==='+ e[i] );\n }\n for (var i=3;i<6;i++){\n if (e[i]!==mycars2[i-3]) $ERROR('#4.'+i+': Exception['+i+']===mycars2['+(i-3)+']. Actual: Exception['+i+']==='+ e[i]);\n }\n}\n",
+ "id": "S12.14_A18_T7"
+ },
+ {
+ "section": "12.14, 15.11, 16",
+ "description": "Testing try/catch syntax construction",
+ "test": "// CHECK#1\ntry{\n throw (Error(\"hello\"));\n}\ncatch(e){\n if (e.toString()!==\"Error: hello\") $ERROR('#1: Exception.toString()===\"Error: hello\". Actual: Exception is '+e);\n}\n\n// CHECK#2\ntry{\n throw (new Error(\"hello\"));\n}\ncatch(e){\n if (e.toString()!==\"Error: hello\") $ERROR('#2: Exception.toString()===\"Error: hello\". Actual: Exception is '+e);\n}\n\n// CHECK#3\nvar c3=0;\ntry{\n throw EvalError(1);\n}\ncatch(e){\n if (e.toString()!==\"EvalError: 1\") $ERROR('#3: Exception.toString()===\"EvalError: 1\". Actual: Exception is '+e);\n}\n\n// CHECK#4\ntry{\n throw RangeError(1);\n}\ncatch(e){\n if (e.toString()!==\"RangeError: 1\") $ERROR('#4: Exception.toString()===\"RangeError: 1\". Actual: Exception is '+e);\n}\n\n// CHECK#5\ntry{\n throw ReferenceError(1);\n}\ncatch(e){\n if (e.toString()!==\"ReferenceError: 1\") $ERROR('#5: Exception.toString()===\"ReferenceError: 1\". Actual: Exception is '+e);\n}\n\n// CHECK#6\nvar c6=0;\ntry{\n throw TypeError(1);\n}\ncatch(e){\n if (e.toString()!==\"TypeError: 1\") $ERROR('#6: Exception.toString()===\"TypeError: 1\". Actual: Exception is '+e);\n}\n\n// CHECK#7\ntry{\n throw URIError(\"message\", \"fileName\", \"1\"); \n}\ncatch(e){\n if (e.toString()!==\"URIError: message\") $ERROR('#7: Exception.toString()===\"URIError: message\". Actual: Exception is '+e);\n}\n",
+ "id": "S12.14_A19_T1"
+ },
+ {
+ "section": "12.14",
+ "description": "Testing try/catch/finally syntax construction",
+ "test": "var fin=0;\n// CHECK#1\ntry{\n throw (Error(\"hello\"));\n}\ncatch(e){\n if (e.toString()!==\"Error: hello\") $ERROR('#1.1: Exception.toString()===\"Error: hello\". Actual: Exception is '+e);\n}\nfinally{\n fin=1;\n}\nif (fin!==1) $ERROR('#1.2: \"finally\" block must be evaluated'); \n\n// CHECK#2\nfin=0;\ntry{\n throw (new Error(\"hello\"));\n}\ncatch(e){\n if (e.toString()!==\"Error: hello\") $ERROR('#2.1: Exception.toString()===\"Error: hello\". Actual: Exception is '+e);\n}\nfinally{\n fin=1;\n}\nif (fin!==1) $ERROR('#2.2: \"finally\" block must be evaluated'); \n\n// CHECK#3\nfin=0;\nvar c3=0;\ntry{\n throw EvalError(1);\n}\ncatch(e){\n if (e.toString()!==\"EvalError: 1\") $ERROR('#3.1: Exception.toString()===\"EvalError: 1\". Actual: Exception is '+e);\n}\nfinally{\n fin=1;\n}\nif (fin!==1) $ERROR('#3.2: \"finally\" block must be evaluated'); \n\n// CHECK#4\nfin=0;\ntry{\n throw RangeError(1);\n}\ncatch(e){\n if (e.toString()!==\"RangeError: 1\") $ERROR('#4.1: Exception.toString()===\"RangeError: 1\". Actual: Exception is '+e);\n}\nfinally{\n fin=1;\n}\nif (fin!==1) $ERROR('#4.2: \"finally\" block must be evaluated'); \n\n// CHECK#5\nfin=0;\ntry{\n throw ReferenceError(1);\n}\ncatch(e){\n if (e.toString()!==\"ReferenceError: 1\") $ERROR('#5.1: Exception.toString()===\"ReferenceError: 1\". Actual: Exception is '+e);\n}\nfinally{\n fin=1;\n}\nif (fin!==1) $ERROR('#5.2: \"finally\" block must be evaluated'); \n\n// CHECK#6\nfin=0;\ntry{\n throw TypeError(1);\n}\ncatch(e){\n if (e.toString()!==\"TypeError: 1\") $ERROR('#6.1: Exception.toString()===\"TypeError: 1\". Actual: Exception is '+e);\n}\nfinally{\n fin=1;\n}\nif (fin!==1) $ERROR('#6.2: \"finally\" block must be evaluated'); \n\n// CHECK#7\nfin=0;\ntry{\n throw URIError(\"message\", \"fileName\", \"1\"); \n}\ncatch(e){\n if (e.toString()!==\"URIError: message\") $ERROR('#7.1: Exception.toString()===\"URIError: message\". Actual: Exception is '+e);\n}\nfinally{\n fin=1;\n}\nif (fin!==1) $ERROR('#7.2: \"finally\" block must be evaluated'); \n",
+ "id": "S12.14_A19_T2"
+ },
+ {
+ "section": "12.14",
+ "description": "Checking if execution of \"catch\" catches an exception thrown with \"throw\"",
+ "test": "// CHECK#1\ntry {\n throw \"catchme\";\t\n $ERROR('#1: throw \"catchme\" lead to throwing exception');\n}\ncatch(e){}\n\n// CHECK#2\nvar c2=0;\ntry{\n try{\n throw \"exc\";\n $ERROR('#2.1: throw \"exc\" lead to throwing exception');\n }finally{\n c2=1;\n }\n}\ncatch(e){\n if (c2!==1){\n $ERROR('#2.2: \"finally\" block must be evaluated');\n }\n}\n \n// CHECK#3\nvar c3=0;\ntry{\n throw \"exc\";\n $ERROR('#3.1: throw \"exc\" lead to throwing exception');\n}\ncatch(err){ \t\n var x3=1;\n}\nfinally{\n c3=1;\n}\nif (x3!==1){\n $ERROR('#3.2: \"catch\" block must be evaluated');\n} \nif (c3!==1){\n $ERROR('#3.3: \"finally\" block must be evaluated');\n}\n",
+ "id": "S12.14_A2"
+ },
+ {
+ "section": "12.14",
+ "description": "Checking if execution of \"catch\" catches system exceptions",
+ "test": "// CHECK#1\ntry{\n y;\n $ERROR('#1: \"y\" lead to throwing exception');\n}\ncatch(e){}\n\n// CHECK#2\nvar c2=0;\ntry{\n try{\n someValue;\n $ERROR('#3.1: \"someValues\" lead to throwing exception');\n }\n finally{\n c2=1;\n }\n}\ncatch(e){\n if (c2!==1){\n $ERROR('#3.2: \"finally\" block must be evaluated');\n }\n}\n\n// CHECK#3\nvar c3=0,x3=0;\ntry{\n x3=someValue;\n $ERROR('#3.1: \"x3=someValues\" lead to throwing exception');\n}\ncatch(err){ \t\n x3=1;\n}\nfinally{\n c3=1;\n}\nif (x3!==1){\n $ERROR('#3.2: \"catch\" block must be evaluated');\n}\nif (c3!==1){\n $ERROR('#3.3: \"finally\" block must be evaluated');\n}\n",
+ "id": "S12.14_A3"
+ },
+ {
+ "section": "12.14",
+ "description": "Checking if deleting an exception fails",
+ "strict_mode_negative": "SyntaxError",
+ "test": "// CHECK#1\ntry {\n throw \"catchme\";\n $ERROR('#1.1: throw \"catchme\" lead to throwing exception');\n}\ncatch (e) {\n if (delete e){\n $ERROR('#1.2: Exception has DontDelete property');\n }\n if (e!==\"catchme\") {\n $ERROR('#1.3: Exception === \"catchme\". Actual: Exception ==='+ e );\n }\n}\n\n// CHECK#2\ntry {\n throw \"catchme\";\n $ERROR('#2.1: throw \"catchme\" lead to throwing exception');\n}\ncatch(e){}\ntry{\n e;\n $ERROR('#2.2: Deleting catching exception after ending \"catch\" block');\n}\ncatch(err){}\n",
+ "id": "S12.14_A4",
+ "strict_only": ""
+ },
+ {
+ "section": "12.14",
+ "description": "Checking \"catch\" catches the Identifier in appropriate way",
+ "test": "// CHECK#1\ntry {\n throw \"catchme\";\t\n throw \"dontcatchme\";\n $ERROR('#1.1: throw \"catchme\" lead to throwing exception');\n}\ncatch (e) {\n if(e===\"dontcatchme\"){\n $ERROR('#1.2: Exception !== \"dontcatchme\"');\n }\n if (e!==\"catchme\") {\n $ERROR('#1.3: Exception === \"catchme\". Actual: Exception ==='+ e );\n }\n}\n\n// CHECK#2\nfunction SwitchTest1(value){\n var result = 0;\n try{ \n switch(value) {\n case 1:\n result += 4;\n throw result;\n break;\n case 4:\n result += 64;\n throw \"ex\";\n }\n return result;\n }\n catch(e){\t\n if ((value===1)&&(e!==4)) $ERROR('#2.1: Exception === 4. Actual: '+e);\n if ((value===4)&&(e!==\"ex\"))$ERROR('#2.2: Exception === \"ex\". Actual: '+e);\n }\n finally{\n return result;\n }\n}\nif (SwitchTest1(1)!==4) $ERROR('#2.3: \"finally\" block must be evaluated');\nif (SwitchTest1(4)!==64)$ERROR('#2.4: \"finally\" block must be evaluated');\n",
+ "id": "S12.14_A5"
+ },
+ {
+ "section": "12.14",
+ "description": "Executing sequence of \"try\" statements, using counters with varying values within",
+ "test": "// CHECK#1\nvar c1=0;\ntry {\n c1+=1;\n y;\n $ERROR('#1.1: \"y\" lead to throwing exception');\n}\ncatch (e) {\n c1*=2;\n}\nif (c1!==2){\n $ERROR('#1.2: Sequence evaluation of commands try/catch is 1. try, 2. catch');\t\n}\n\n// CHECK#2\nvar c2=0;\ntry{\n c2+=1;\n}\nfinally{\n c2*=2;\n}\nif (c2!==2){\n $ERROR('#2: Sequence evaluation of commands try/finally is 1. try, 2. finally');\n}\n\n// CHECK#3\nvar c3=0;\ntry{\n c3=1;\n z;\n}\ncatch(err){\n c3*=2;\n}\nfinally{\n c3+=1;\n}\nif (c3!==3){\n $ERROR('#3: Sequence evaluation of commands try/catch/finally(with exception) is 1. try, 2. catch, 3. finally');\n}\t\n\n// CHECK#4\nvar c4=0;\ntry{\n c4=1;\n}\ncatch(err){\n c4*=3;\n}\nfinally{\n c4+=1;\n}\nif (c4!==2){\n $ERROR('#4: Sequence evaluation of commands try/catch/finally(without exception) is 1. try, 2. finally');\n}\t\n",
+ "id": "S12.14_A6"
+ },
+ {
+ "section": "12.14",
+ "description": "Checking if the production of nested TryStatement statements evaluates correct",
+ "test": "// CHECK#1\ntry{\n try{\n throw \"ex2\";\n }\n catch(er2){\n if (er2!==\"ex2\")\n $ERROR('#1.1: Exception === \"ex2\". Actual: Exception ==='+ e );\n throw \"ex1\";\n }\n }\n catch(er1){\n if (er1!==\"ex1\") $ERROR('#1.2: Exception === \"ex1\". Actual: '+er1);\n if (er1===\"ex2\") $ERROR('#1.3: Exception !== \"ex2\". Actual: catch previous embedded exception');\n}\n\n// CHECK#2\ntry{\n throw \"ex1\";\n}\ncatch(er1){\n try{\n throw \"ex2\";\n }\n catch(er1){\n if (er1===\"ex1\") $ERROR('#2.1: Exception !== \"ex1\". Actual: catch previous catching exception');\n if (er1!==\"ex2\") $ERROR('#2.2: Exception === \"ex2\". Actual: Exception ==='+ er1 );\n }\n if (er1!==\"ex1\") $ERROR('#2.3: Exception === \"ex1\". Actual: Exception ==='+ er1 );\n if (er1===\"ex2\") $ERROR('#2.4: Exception !== \"ex2\". Actual: catch previous catching exception');\n}\n\n// CHECK#3\ntry{\n throw \"ex1\";\n}\ncatch(er1){\n if (er1!==\"ex1\") $ERROR('#3.1: Exception ===\"ex1\". Actual: Exception ==='+ er1 );\n}\nfinally{\n try{\n throw \"ex2\";\n }\n catch(er1){\n if (er1===\"ex1\") $ERROR('#3.2: Exception !==\"ex1\". Actual: catch previous embedded exception');\n if (er1!==\"ex2\") $ERROR('#3.3: Exception ===\"ex2\". Actual: Exception ==='+ er1 );\n }\n}\n\n// CHECK#4\nvar c4=0;\ntry{\n throw \"ex1\";\n}\ncatch(er1){\n try{\n throw \"ex2\";\n }\n catch(er1){\n if (er1===\"ex1\") $ERROR('#4.1: Exception !==\"ex1\". Actual: catch previous catching exception');\n if (er1!==\"ex2\") $ERROR('#4.2: Exception ===\"ex2\". Actual: Exception ==='+ er1 );\n }\n if (er1!==\"ex1\") $ERROR('#4.3: Exception ===\"ex1\". Actual: Exception ==='+ er1 );\n if (er1===\"ex2\") $ERROR('#4.4: Exception !==\"ex2\". Actual: Catch previous embedded exception');\n}\nfinally{\n c4=1;\n}\nif (c4!==1) $ERROR('#4.5: \"finally\" block must be evaluated');\n\n// CHECK#5\nvar c5=0;\ntry{\n try{\n throw \"ex2\";\n }\n catch(er1){\n if (er1!==\"ex2\") $ERROR('#5.1: Exception ===\"ex2\". Actual: Exception ==='+ er1 );\n }\n throw \"ex1\";\n}\ncatch(er1){\n if (er1!==\"ex1\") $ERROR('#5.2: Exception ===\"ex1\". Actual: Exception ==='+ er1 );\n if (er1===\"ex2\") $ERROR('#5.3: Exception !==\"ex2\". Actual: catch previous embedded exception');\n}\nfinally{\n c5=1;\n}\nif (c5!==1) $ERROR('#5.4: \"finally\" block must be evaluated');\n\n// CHECK#6\nvar c6=0;\ntry{\n try{\n throw \"ex1\";\n }\n catch(er1){\n if (er1!==\"ex1\") $ERROR('#6.1: Exception ===\"ex1\". Actual: Exception ==='+ er1 );\n }\n}\nfinally{\n c6=1;\t\t\n}\nif (c6!==1) $ERROR('#6.2: \"finally\" block must be evaluated');\n\n// CHECK#7\nvar c7=0;\ntry{\n try{\n throw \"ex1\";\n }\n finally{\n try{\n c7=1;\n throw \"ex2\";\n }\n catch(er1){\n if (er1!==\"ex2\") $ERROR('#7.1: Exception ===\"ex2\". Actual: Exception ==='+ er1 );\n if (er1===\"ex1\") $ERROR('#7.2: Exception !==\"ex1\". Actual: catch previous embedded exception');\n c7++;\n }\n }\n}\ncatch(er1){\n if (er1!==\"ex1\") $ERROR('#7.3: Exception ===\"ex1\". Actual: Exception ==='+ er1 );\n}\nif (c7!==2) $ERROR('#7.4: \"finally\" block must be evaluated');\n",
+ "id": "S12.14_A7_T1"
+ },
+ {
+ "section": "12.14",
+ "description": "Checking if the production of nested TryStatement statements evaluates correct",
+ "test": "// CHECK#1\ntry{\n try{\n throw \"ex2\";\n }\n finally{\n throw \"ex1\";\n }\n}\ncatch(er1){\n if (er1!==\"ex1\") $ERROR('#1.2: Exception === \"ex1\". Actual: Exception ==='+er1 );\n if (er1===\"ex2\") $ERROR('#1.3: Exception !== \"ex2\". Actual: catch previous embedded exception');\n}\n\n// CHECK#2\ntry{\n try{\n throw \"ex1\";\n }\n catch(er1){\n if (er1!==\"ex1\") $ERROR('#2.1: Exception === \"ex1\". Actual: Exception ==='+er1 );\n try{\n throw \"ex2\";\n }\n finally{\n throw \"ex3\";\n }\n $ERROR('#2.2: throw \"ex1\" lead to throwing exception');\n }\n}\ncatch(er1){\n if (er1!==\"ex3\") $ERROR('#2.3: Exception === \"ex3\". Actual: Exception ==='+er1 );\n}\n\n// CHECK#3\ntry{\n try{\n throw \"ex1\";\n }\n catch(er1){\n if (er1!==\"ex1\") $ERROR('#3.1: Exception === \"ex1\". Actual: Exception ==='+er1 );\n }\n finally{\n try{\n throw \"ex2\";\n }\n finally{\n throw \"ex3\";\n }\n }\t\n}\ncatch(er1){\n if (er1!==\"ex3\") $ERROR('#3.2: Exception === \"ex3\". Actual: Exception ==='+er1 );\n}\n\n// CHECK#4\nvar c4=0;\ntry{\n try{\n throw \"ex1\";\n }\n catch(er1){\n if (er1!==\"ex1\") $ERROR('#4.1: Exception === \"ex1\". Actual: Exception ==='+er1 );\n try{\n throw \"ex2\";\n }\n finally{\n throw \"ex3\";\n }\n }\n finally{\n c4=1;\n }\n}\ncatch(er1){\n if (er1!==\"ex3\") $ERROR('#4.2: Exception === \"ex3\". Actual: Exception ==='+er1 );\n}\nif (c4!==1) $ERROR('#4.3: \"finally\" block must be evaluated');\n\n// CHECK#5\nvar c5=0;\ntry{\n try{\n throw \"ex2\";\n }\n finally{\n throw \"ex3\";\n }\n throw \"ex1\";\n}\ncatch(er1){\n if (er1!==\"ex3\") $ERROR('#5.1: Exception === \"ex3\". Actual: Exception ==='+er1 );\n if (er1===\"ex2\") $ERROR('#5.2: Exception !== \"ex2\". Actual: catch previous embedded exception');\n if (er1===\"ex1\") $ERROR('#5.3: Exception !==\"ex1\". Actual: catch previous embedded exception');\n}\nfinally{\n c5=1;\n}\nif (c5!==1) $ERROR('#5.4: \"finally\" block must be evaluated');\n\n// CHECK#6\nvar c6=0;\ntry{\n try{\n try{\n throw \"ex1\";\n }\n finally{\n throw \"ex2\";\n }\n }\n finally{\n c6=1;\n }\n}\ncatch(er1){\n if (er1!==\"ex2\") $ERROR('#6.1: Exception === \"ex2\". Actual: Exception ==='+er1 );\n}\nif (c6!==1) $ERROR('#6.2: \"finally\" block must be evaluated');\n\n// CHECK#7\nvar c7=0;\ntry{\n try{\n throw \"ex1\";\n }\n finally{\n try{\n c7=1;\n throw \"ex2\";\n }\n finally{\n c7++;\n throw \"ex3\";\n }\n }\n}\ncatch(er1){\n if (er1!==\"ex3\") $ERROR('#7.1: Exception === \"ex3\". Actual: Exception ==='+er1 );\n}\nif (c7!==2) $ERROR('#7.2: Embedded \"try/finally\" blocks must be evaluated');\n",
+ "id": "S12.14_A7_T2"
+ },
+ {
+ "section": "12.14",
+ "description": "Checking if the production of nested TryStatement statements evaluates correct",
+ "test": "// CHECK#1\ntry{\n try{\n throw \"ex2\";\n }\n catch(er2){\n if (er2!==\"ex2\") $ERROR('#1.1: Exception === \"ex2\". Actual: Exception ==='+er2);\n throw \"ex1\";\n }\n finally{\n throw \"ex3\";\n }\n}\ncatch(er1){\n if (er1!==\"ex3\") $ERROR('#1.2: Exception === \"ex3\". Actual: Exception ==='+er1);\n if (er1===\"ex2\") $ERROR('#1.3: Exception !==\"ex2\". Actual: catch previous catched exception');\n if (er1===\"ex1\") $ERROR('#1.4: Exception !==\"ex1\". Actual: catch previous embedded exception');\n}\n\n// CHECK#2\nvar c2=0;\ntry{\n throw \"ex1\";\n}\ncatch(er1){\n try{\n throw \"ex2\";\n }\n catch(er1){\n if (er1===\"ex1\") $ERROR('#2.1: Exception !==\"ex1\". Actual: catch previous catched exception');\n if (er1!==\"ex2\") $ERROR('#2.2: Exception === \"ex2\". Actual: Exception ==='+er1);\n }\n finally{\n c2=1;\n }\n if (er1!==\"ex1\") $ERROR('#2.3: Exception === \"ex1\". Actual: Exception ==='+er1);\n if (er1===\"ex2\") $ERROR('#2.4: Exception !== \"ex2\". Actual: catch previous embedded exception');\n}\nif (c2!==1)\t$ERROR('#2.5: \"finally\" block must be evaluated');\n\n// CHECK#3\nvar c3=0;\ntry{\n throw \"ex1\";\n}\ncatch(er1){\n if (er1!==\"ex1\") $ERROR('#3.1: Exception === \"ex1\". Actual: Exception ==='+er1);\n}\nfinally{\n try{\n throw \"ex2\";\n }\n catch(er1){\n if (er1===\"ex1\") $ERROR('#3.2: Exception !==\"ex1\". Actual: catch previous catched exception');\n if (er1!==\"ex2\") $ERROR('#3.3: Exception === \"ex2\". Actual: Exception ==='+er1);\n }\n finally{\n c3=1;\n }\n}\nif (c3!==1)\t$ERROR('#3.4: \"finally\" block must be evaluated');\n\n// CHECK#4\nvar c4=0;\ntry{\n try{\n throw \"ex1\";\n }\n catch(er1){\n try{\n throw \"ex2\";\n }\n catch(er1){\n if (er1===\"ex1\") $ERROR('#4.1: Exception !==\"ex2\". Actual: catch previous catched exception');\n if (er1!==\"ex2\") $ERROR('#4.2: Exception === \"ex2\". Actual: Exception ==='+er1);\n }\n finally{\n c4=2;\n throw \"ex3\";\n }\n if (er1!==\"ex1\") $ERROR('#4.3: Exception === \"ex2\". Actual: Exception ==='+er1);\n if (er1===\"ex2\") $ERROR('#4.4: Exception !==\"ex2\". Actual: catch previous catched exception');\n if (er1===\"ex3\") $ERROR('#4.5: Exception !==\"ex3\". Actual: Catch previous embedded exception');\n }\n finally{\n c4*=2;\n }\n}\ncatch(er1){}\nif (c4!==4) $ERROR('#4.6: \"finally\" block must be evaluated');\n\n// CHECK#5\nvar c5=0;\ntry{\n try{\n throw \"ex2\";\n }\n catch(er1){\n if (er1!==\"ex2\") $ERROR('#5.1: Exception === \"ex2\". Actual: Exception ==='+er1);\n }\n finally{\n throw \"ex3\";\n }\n throw \"ex1\";\n}\ncatch(er1){\n if (er1!==\"ex3\") $ERROR('#5.2: Exception === \"ex3\". Actual: Exception ==='+er1);\n if (er1===\"ex2\") $ERROR('#5.3: Exception !==\"ex2\". Actual: catch previous catched exception');\n if (er1===\"ex1\") $ERROR('#5.4: Exception !==\"ex1\". Actual: catch previous embedded exception');\n}\nfinally{\n c5=1;\n}\nif (c5!==1) $ERROR('#5.5: \"finally\" block must be evaluated');\n\n// CHECK#6\nvar c6=0;\ntry{\n try{\n throw \"ex1\";\n }\n catch(er1){\n if (er1!==\"ex1\") $ERROR('#6.1: Exception === \"ex1\". Actual: Exception ==='+er1);\n }\n finally{\n c6=2;\n }\n}\nfinally{\n c6*=2;\n}\nif (c6!==4) $ERROR('#6.2: \"finally\" block must be evaluated');\n\n// CHECK#7\nvar c7=0;\ntry{\n try{\n throw \"ex1\";\n }\n finally{\n try{\n c7=1;\n throw \"ex2\";\n }\n catch(er1){\n if (er1!==\"ex2\") $ERROR('#7.1: Exception === \"ex2\". Actual: Exception ==='+er1);\n if (er1===\"ex1\") $ERROR('#7.2: Exception !==\"ex2\". Actual: catch previous catched exception');\n c7++;\n }\n finally{\n c7*=2;\n }\n }\n}\ncatch(er1){\n if (er1!==\"ex1\") $ERROR('#7.3: Exception === \"ex1\". Actual: Exception ==='+er1);\n}\nif (c7!==4) $ERROR('#7.4: \"finally\" block must be evaluated');\n",
+ "id": "S12.14_A7_T3"
+ },
+ {
+ "section": "12.14",
+ "description": "Throwing exception within an \"if\" statement",
+ "test": "// CHECK#1\nvar c1=1;\ntry{\n if(c1===1){\n throw \"ex1\";\n $ERROR('#1.1: throw \"ex1\" lead to throwing exception');\n }\n $ERROR('#1.2: throw \"ex1\" inside the \"if\" statement lead to throwing exception');\n}\ncatch(er1){\t\n if (er1!==\"ex1\") $ERROR('#1.3: Exception ===\"ex1\". Actual: Exception ==='+er1);\n}\n\n// CHECK#2\nvar c2=1;\nif(c2===1){\n try{\n throw \"ex1\";\n $ERROR('#2.1: throw \"ex1\" lead to throwing exception');\n }\n catch(er1){\n if(er1!=\"ex1\") $ERROR('#2.2: Exception ===\"ex1\". Actual: Exception ==='+er1);\n }\n}\n",
+ "id": "S12.14_A8"
+ },
+ {
+ "section": "12.14",
+ "description": "Loop within a \"try\" Block, from where exception is thrown",
+ "test": "// CHECK#1\nvar i=0;\ntry{\n do{\n if(i===5) throw i;\n i++;\n }\n while(i<10);\n}\ncatch(e){\n if(e!==5)$ERROR('#1: Exception ===5. Actual: Exception ==='+ e );\n}\n",
+ "id": "S12.14_A9_T1"
+ },
+ {
+ "section": "12.14",
+ "description": "\"try\" statement within a loop, the statement contains \"continue\" statement",
+ "test": "// CHECK#1\nvar c1=0,fin=0;\ndo{\n try{\n c1+=1;\n continue;\n }\n catch(er1){}\n finally{\n fin=1;\n }\n fin=-1;\n}\nwhile(c1<2);\nif(fin!==1){\n $ERROR('#1: \"finally\" block must be evaluated at \"try{continue} catch finally\" construction');\n}\n\n// CHECK#2\nvar c2=0,fin2=0;\ndo{\n try{\n throw \"ex1\";\n }\n catch(er1){\n c2+=1;\n continue;\n }\n finally{\n fin2=1;\n }\n fin2=-1;\n}\nwhile(c2<2);\nif(fin2!==1){\n $ERROR('#2: \"finally\" block must be evaluated at \"try catch{continue} finally\" construction');\n}\n\n// CHECK#3\nvar c3=0,fin3=0;\ndo{\n try{\n throw \"ex1\";\n }\n catch(er1){\n c3+=1;\n }\n finally{\n fin3=1;\n continue;\n }\n fin3=0;\n}\nwhile(c3<2);\nif(fin3!==1){\n $ERROR('#3: \"finally\" block must be evaluated at \"try catch finally{continue}\" construction');\n}\n\n// CHECK#4\nvar c4=0,fin4=0;\ndo{\n try{\n c4+=1;\n continue;\n }\n finally{\n fin4=1;\n }\n fin4=-1;\n}\nwhile(c4<2);\nif(fin4!==1){\n $ERROR('#4: \"finally\" block must be evaluated at \"try{continue} finally\" construction');\n}\n\n// CHECK#5\nvar c5=0;\ndo{\n try{\n throw \"ex1\";\n }\n catch(er1){\n c5+=1;\n continue;\n }\n}\nwhile(c5<2);\nif(c5!==2){\n $ERROR('#5: \"try catch{continue}\" must work correctly');\n}\n\n// CHECK#6\nvar c6=0,fin6=0;\ndo{\n try{\n c6+=1;\n throw \"ex1\"\n }\n finally{\n fin6=1;\n continue;\n }\n fin6=-1;\n}\nwhile(c6<2);\nif(fin6!==1){\n $ERROR('#6.1: \"finally\" block must be evaluated');\n}\nif(c6!==2){\n $ERROR('#6.2: \"try finally{continue}\" must work correctly');\n}\n",
+ "id": "S12.14_A9_T2"
+ },
+ {
+ "section": "12.14",
+ "description": "\"try\" statement within a loop, the statement contains \"break\" statement",
+ "test": "// CHECK#1\nvar c1=0,fin=0;\ndo{\n try{\n c1+=1;\n break;\n }\n catch(er1){}\n finally{\n fin=1;\n }\n fin=-1;\n c1+=2;\n}\nwhile(c1<2);\nif(fin!==1){\n $ERROR('#1.1: \"finally\" block must be evaluated');\n}\nif(c1!==1){\n $ERROR('#1.2: \"try{break}catch finally\" must work correctly');\n}\n\n// CHECK#2\nvar c2=0,fin2=0;\ndo{\n try{\n throw \"ex1\";\n }\n catch(er1){\n c2+=1;\n break;\n }\n finally{\n fin2=1;\n }\n c2+=2;\n fin2=-1;\n}\nwhile(c2<2);\nif(fin2!==1){\n $ERROR('#2.1: \"finally\" block must be evaluated');\n}\nif(c2!==1){\n $ERROR('#2.2: \"try catch{break} finally\" must work correctly');\n}\n\n// CHECK#3\nvar c3=0,fin3=0;\ndo{\n try{\n throw \"ex1\";\n }\n catch(er1){\n c3+=1;\n }\n finally{\n fin3=1;\n break;\n }\n c3+=2;\n fin3=0;\n}\nwhile(c3<2);\nif(fin3!==1){\n $ERROR('#3.1: \"finally\" block must be evaluated');\n}\nif(c3!==1){\n $ERROR('#3.2: \"try catch finally{break}\" must work correctly');\n}\n\n// CHECK#4\nvar c4=0,fin4=0;\ndo{\n try{\n c4+=1;\n break;\n }\n finally{\n fin4=1;\n }\n fin4=-1;\n c4+=2;\n}\nwhile(c4<2);\nif(fin4!==1){\n $ERROR('#4.1: \"finally\" block must be evaluated');\n}\nif(c4!==1){\n $ERROR('#4.2: \"try{break} finally\" must work correctly');\n}\n\n// CHECK#5\nvar c5=0;\ndo{\n try{\n throw \"ex1\";\n }\n catch(er1){\n break;\n }\n}\nwhile(c5<2);\nif(c5!==0){\n $ERROR('#5: \"try catch{break}\" must work correctly');\n}\n\n// CHECK#6\nvar c6=0;\ndo{\n try{\n c6+=1;\n break;\n }\n catch(er1){}\n c6+=2;\n}\nwhile(c6<2);\nif(c6!==1){\n $ERROR('#6: \"try{break} catch\" must work correctly');\n}\n\n// CHECK#7\nvar c7=0,fin7=0;\ntry{\n do{\n try{\n c7+=1;\n throw \"ex1\";\n }\n finally{\n fin7=1;\n break;\n }\n fin7=-1;\n c7+=2;\n }\n while(c7<2);\n}\ncatch(ex1){\n c7=10;\n}\nif(fin7!==1){\n $ERROR('#7.1: \"finally\" block must be evaluated');\n}\nif(c7!==1){\n $ERROR('#7.2: try finally{break} error');\n}\n",
+ "id": "S12.14_A9_T3"
+ },
+ {
+ "section": "12.14",
+ "description": "\"try\" statement within a loop, the statement contains \"continue\" and \"break\" statements",
+ "test": "// CHECK#1\nvar c1=0,fin=0;\ndo{\n try{\n c1+=1;\n break;\n }\n catch(er1){}\n finally{\n fin=1;\n continue;\n }\n fin=-1;\n c1+=2;\n}\nwhile(c1<2);\nif(fin!==1){\n $ERROR('#1.1: \"finally\" block must be evaluated');\n}\nif(c1!==2){\n $ERROR('#1.2: \"try{break} catch finally{continue}\" must work correctly');\n}\n\n// CHECK#2\nvar c2=0,fin2=0;\ndo{\n try{\n throw \"ex1\";\n }\n catch(er1){\n c2+=1;\n break;\n }\n finally{\n fin2=1;\n continue;\n }\n c2+=2;\n fin2=-1;\n}\nwhile(c2<2);\nif(fin2!==1){\n $ERROR('#2.1: \"finally\" block must be evaluated');\n}\nif(c2!==2){\n $ERROR('#2.2: \"try catch{break} finally{continue}\" must work correctly');\n}\n",
+ "id": "S12.14_A9_T4"
+ },
+ {
+ "section": "12.14",
+ "description": "Checking if exceptions are thrown correctly from wherever of loop body",
+ "test": "// CHECK#1\nvar c=0, i=0;\nvar fin=0;\ndo{\n i+=1;\n try{\n if(c===0){\n throw \"ex1\";\n $ERROR('#1.1: throw \"ex1\" lead to throwing exception');\n }\n c+=2;\n if(c===1){\n throw \"ex2\";\n $ERROR('#1.2: throw \"ex2\" lead to throwing exception');\n }\n }\n catch(er1){\n c-=1;\n continue;\n $ERROR('#1.3: \"try catch{continue} finally\" must work correctly');\n }\n finally{\n fin+=1;\n }\n}\nwhile(i<10);\nif(fin!==10){\n $ERROR('#1.4: \"finally\" block must be evaluated');\n}\n\n",
+ "id": "S12.14_A9_T5"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/12.1_Block.json b/website/resources/scripts/testcases2/12.1_Block.json
new file mode 100644
index 000000000..d4f57a33c
--- /dev/null
+++ b/website/resources/scripts/testcases2/12.1_Block.json
@@ -0,0 +1,41 @@
+{
+ "testCollection": {
+ "name": "12.1_Block",
+ "numTests": 5,
+ "tests": [
+ {
+ "section": "12.1",
+ "description": "Trying to declare function at the Block statement",
+ "negative": "SyntaxError",
+ "test": "\"use strict\";\n{\n function __func(){}\n}\n",
+ "id": "S12.1_A1"
+ },
+ {
+ "section": "12.1",
+ "description": "Throwing exception within a Block",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\ntry {\n\tx();\n\t$ERROR('#1: \"x()\" lead to throwing exception');\n} catch (e) {\n\t$PRINT(e.message);\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\ntry {\n throw \"catchme\";\t\n $ERROR('#2: throw \"catchme\" lead to throwing exception');\n} catch (e) {\n\tif (e!==\"catchme\") {\n\t\t$ERROR('#2.1: Exception === \"catchme\". Actual: Exception ==='+ e );\n\t}\n}\n\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S12.1_A2"
+ },
+ {
+ "section": "12.1",
+ "description": "Checking if execution of \"y={__func}()\" fails",
+ "negative": "",
+ "test": "function __func(){};\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\ny={__func}();\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S12.1_A4_T1"
+ },
+ {
+ "section": "12.1",
+ "description": "Checking if execution of \"y={x}\" fails",
+ "negative": "",
+ "test": "x=1;\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\ny={x};\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S12.1_A4_T2"
+ },
+ {
+ "section": "12.1",
+ "description": "Throwing exceptions within embedded/sequence Blocks",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\ntry {\n\tthrow 1;\n throw 2;\n throw 3;\n $ERROR('1.1: throw 1 lead to throwing exception');\n} catch (e) {\n\tif (e!==1) {\n\t\t$ERROR('#1.2: Exception === 1. Actual: Exception ==='+ e);\n\t}\n}\n////////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\ntry {\n\t{\n\t throw 1;\n throw 2;\n }\n throw 3;\n $ERROR('#2.1: throw 1 lead to throwing exception');\n} catch (e) {\n\tif (e!==1) {\n\t\t$ERROR('#2.2: Exception === 1. Actual: Exception ==='+ e);\n\t}\n}\n////////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#3\ntry {\n\tthrow 1;\n {\n throw 2;\n throw 3;\n }\n $ERROR('#3.1: throw 1 lead to throwing exception');\n} catch (e) {\n\tif (e!==1) {\n\t\t$ERROR('#3.2: Exception === 1. Actual: Exception ==='+ e);\n\t}\n}\n////////////////////////////////////////////////////////////////////////////////\n\n",
+ "id": "S12.1_A5"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/12.2.1.json b/website/resources/scripts/testcases2/12.2.1.json
new file mode 100644
index 000000000..03a656c2b
--- /dev/null
+++ b/website/resources/scripts/testcases2/12.2.1.json
@@ -0,0 +1,146 @@
+{
+ "testCollection": {
+ "name": "12.2.1",
+ "numTests": 18,
+ "tests": [
+ {
+ "id": "12.2.1-1-s",
+ "path": "TestCases/chapter12/12.2/12.2.1/12.2.1-1-s.js",
+ "description": "eval - a function declaring a var named 'eval' throws SyntaxError in strict mode",
+ "test": "assertTrue((function testcase() {\n 'use strict';\n\n try {\n eval('function foo() { var eval; }');\n return false;\n }\n catch (e) {\n return (e instanceof SyntaxError);\n }\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict())",
+ "strict_only": ""
+ },
+ {
+ "id": "12.2.1-10-s",
+ "path": "TestCases/chapter12/12.2/12.2.1/12.2.1-10-s.js",
+ "description": "Strict Mode: an indirect eval assigning into 'eval' does not throw",
+ "test": "assertTrue((function testcase() {\n 'use strict';\n var s = eval;\n s('eval = 42;');\n return true;\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict())",
+ "strict_only": ""
+ },
+ {
+ "id": "12.2.1-11",
+ "path": "TestCases/chapter12/12.2/12.2.1/12.2.1-11.js",
+ "description": "arguments as var identifier in eval code is allowed",
+ "test": "assertTrue((function testcase() {\n eval(\"var arguments;\");\n return true;\n }).call(this));\n"
+ },
+ {
+ "id": "12.2.1-12-s",
+ "path": "TestCases/chapter12/12.2/12.2.1/12.2.1-12-s.js",
+ "description": "arguments as local var identifier throws SyntaxError in strict mode",
+ "test": "assertTrue((function testcase() {\n 'use strict';\n\n try {\n eval('function foo() { var arguments;}');\n return false;\n }\n catch (e) {\n return (e instanceof SyntaxError);\n }\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict())",
+ "strict_only": ""
+ },
+ {
+ "id": "12.2.1-12",
+ "path": "TestCases/chapter12/12.2/12.2.1/12.2.1-12.js",
+ "description": "arguments as local var identifier is allowed",
+ "test": "assertTrue((function testcase() {\n eval(\"(function (){var arguments;})\");\n return true;\n }).call(this));\n"
+ },
+ {
+ "id": "12.2.1-13-s",
+ "path": "TestCases/chapter12/12.2/12.2.1/12.2.1-13-s.js",
+ "description": "arguments assignment throws SyntaxError in strict mode",
+ "test": "assertTrue((function testcase() {\n 'use strict';\n\n try {\n eval('function foo() { arguments = 42; }; foo()');\n return false;\n }\n catch (e) {\n return (e instanceof SyntaxError);\n }\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict())",
+ "strict_only": ""
+ },
+ {
+ "id": "12.2.1-2-s",
+ "path": "TestCases/chapter12/12.2/12.2.1/12.2.1-2-s.js",
+ "description": "eval - a function assigning into 'eval' throws SyntaxError in strict mode",
+ "test": "assertTrue((function testcase() {\n 'use strict';\n\n try {\n eval('function foo() { eval = 42; }; foo()');\n return false;\n }\n catch (e) {\n return (e instanceof SyntaxError);\n }\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict())",
+ "strict_only": ""
+ },
+ {
+ "id": "12.2.1-3-s",
+ "path": "TestCases/chapter12/12.2/12.2.1/12.2.1-3-s.js",
+ "description": "eval - a function expr declaring a var named 'eval' throws SyntaxError in strict mode",
+ "test": "assertTrue((function testcase() {\n 'use strict';\n\n try {\n eval('(function () { var eval; })');\n return false;\n }\n catch (e) {\n return (e instanceof SyntaxError);\n }\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict())",
+ "strict_only": ""
+ },
+ {
+ "id": "12.2.1-34-s",
+ "path": "TestCases/chapter12/12.2/12.2.1/12.2.1-34-s.js",
+ "description": "'for(var eval in ...) {...}' throws SyntaxError in strict mode",
+ "test": "assertTrue((function testcase() {\n 'use strict';\n\n try {\n eval('for (var eval in null) {};');\n return false;\n }\n catch (e) {\n return (e instanceof SyntaxError);\n }\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict())",
+ "strict_only": ""
+ },
+ {
+ "id": "12.2.1-35-s",
+ "path": "TestCases/chapter12/12.2/12.2.1/12.2.1-35-s.js",
+ "description": "'for(var eval = 42 in ...) {...}' throws SyntaxError in strict mode",
+ "test": "assertTrue((function testcase() {\n 'use strict';\n\n try {\n eval('for (var eval = 42 in null) {};');\n return false;\n }\n catch (e) {\n return (e instanceof SyntaxError);\n }\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict())",
+ "strict_only": ""
+ },
+ {
+ "id": "12.2.1-36-s",
+ "path": "TestCases/chapter12/12.2/12.2.1/12.2.1-36-s.js",
+ "description": "'for(var arguments in ...) {...}' throws SyntaxError in strict mode",
+ "test": "assertTrue((function testcase() {\n 'use strict';\n\n try {\n eval('for (var arguments in null) {};');\n return false;\n }\n catch (e) {\n return (e instanceof SyntaxError);\n }\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict())",
+ "strict_only": ""
+ },
+ {
+ "id": "12.2.1-37-s",
+ "path": "TestCases/chapter12/12.2/12.2.1/12.2.1-37-s.js",
+ "description": "'for(var arguments = 42 in ...) {...}' throws SyntaxError in strict mode",
+ "test": "assertTrue((function testcase() {\n 'use strict';\n\n try {\n eval('for (var arguments = 42 in null) {};');\n return false;\n }\n catch (e) {\n return (e instanceof SyntaxError);\n }\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict())",
+ "strict_only": ""
+ },
+ {
+ "id": "12.2.1-4-s",
+ "path": "TestCases/chapter12/12.2/12.2.1/12.2.1-4-s.js",
+ "description": "eval - a function expr assigning into 'eval' throws a SyntaxError in strict mode",
+ "test": "assertTrue((function testcase() {\n 'use strict';\n\n try {\n eval('(function () { eval = 42; })()');\n return false;\n }\n catch (e) {\n return (e instanceof SyntaxError);\n }\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict())",
+ "strict_only": ""
+ },
+ {
+ "id": "12.2.1-5-s",
+ "path": "TestCases/chapter12/12.2/12.2.1/12.2.1-5-s.js",
+ "description": "Strict Mode - a Function declaring var named 'eval' does not throw SyntaxError",
+ "test": "assertTrue((function testcase() {\n 'use strict';\n Function('var eval;');\n return true;\n }).call(this));\n",
+ "strict_only": ""
+ },
+ {
+ "id": "12.2.1-6-s",
+ "path": "TestCases/chapter12/12.2/12.2.1/12.2.1-6-s.js",
+ "description": "eval - a Function assigning into 'eval' will not throw any error if contained within strict mode and its body does not start with strict mode",
+ "test": "assertTrue((function testcase() {\n 'use strict';\n \n var f = Function('eval = 42;');\n f();\n return true;\n }).call(this));\n",
+ "strict_only": ""
+ },
+ {
+ "id": "12.2.1-7-s",
+ "path": "TestCases/chapter12/12.2/12.2.1/12.2.1-7-s.js",
+ "description": "eval - a direct eval declaring a var named 'eval' throws SyntaxError in strict mode",
+ "test": "assertTrue((function testcase() {\n 'use strict';\n\n try {\n eval('var eval;');\n return false;\n }\n catch (e) {\n return (e instanceof SyntaxError);\n }\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict())",
+ "strict_only": ""
+ },
+ {
+ "id": "12.2.1-8-s",
+ "path": "TestCases/chapter12/12.2/12.2.1/12.2.1-8-s.js",
+ "description": "eval - a direct eval assigning into 'eval' throws SyntaxError in strict mode",
+ "test": "assertTrue((function testcase() {\n 'use strict';\n\n try {\n eval('eval = 42;');\n return false;\n }\n catch (e) {\n return (e instanceof SyntaxError) ;\n }\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict())",
+ "strict_only": ""
+ },
+ {
+ "id": "12.2.1-9-s",
+ "path": "TestCases/chapter12/12.2/12.2.1/12.2.1-9-s.js",
+ "description": "Strict Mode: an indirect eval declaring a var named 'eval' does not throw",
+ "test": "assertTrue((function testcase() {\n 'use strict';\n var s = eval;\n s('var eval;');\n return true;\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict())",
+ "strict_only": ""
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/12.2_Variable_Statement.json b/website/resources/scripts/testcases2/12.2_Variable_Statement.json
new file mode 100644
index 000000000..7ad2e67d4
--- /dev/null
+++ b/website/resources/scripts/testcases2/12.2_Variable_Statement.json
@@ -0,0 +1,136 @@
+{
+ "testCollection": {
+ "name": "12.2_Variable_Statement",
+ "numTests": 20,
+ "tests": [
+ {
+ "section": "12.2",
+ "description": "Creating variables after entering the execution scope",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\ntry {\n\t__x = __x;\n __y = __x ? \"good fellow\" : \"liar\"; // __y assigned to \"liar\" since __x undefined\n __z = __z === __x ? 1 : 0; // __z assigned to 1 since both __x and __z are undefined\n} catch (e) {\n\t$ERROR('#1: Using declarated variable before it declaration is admitted');\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\ntry{\n __something__undefined = __something__undefined;\n $ERROR('#2: \"__something__undefined = __something__undefined\" lead to throwing exception');\n} catch(e){\n $PRINT(e.message);\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#3\nif ((__y !== \"liar\")&(__z !== 1)) {\n\t$ERROR('#3: (__y === \"liar\") and (__z === 1). Actual: __y ==='+__y+' and __z ==='+__z );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\nvar __x, __y = true, __z = __y ? \"smeagol\" : \"golum\";\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#4\nif (!__y&!(__z = \"smeagol\")) {\n\t$ERROR('#4: A variable with an Initialiser is assigned the value of its AssignmentExpression when the VariableStatement is executed');\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S12.2_A1"
+ },
+ {
+ "section": "12.2",
+ "description": "Declaring variable within a \"for\" IterationStatement",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\ntry {\n\t__ind=__ind;\n} catch (e) {\n $ERROR('#1: var inside \"for\" is admitted '+e.message);\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\nfor (var __ind;;){\n break;\n}\n",
+ "id": "S12.2_A10"
+ },
+ {
+ "section": "12.2",
+ "description": "Changing variable value using property attributes",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nthis['__declared__var'] = \"baloon\";\nif (this['__declared__var'] !== \"baloon\") {\n\t$ERROR('#1: this[\\'__declared__var\\'] === \"baloon\". Actual: this[\\'__declared__var\\'] ==='+ this['__declared__var'] );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (__declared__var !== \"baloon\") {\n\t$ERROR('#2: __declared__var === \"baloon\". Actual: __declared__var ==='+ __declared__var );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\nvar __declared__var;\n",
+ "id": "S12.2_A11"
+ },
+ {
+ "section": "12.2",
+ "description": "Declaring variable within \"do-while\" statement",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\ntry {\n\tx=x;\n} catch (e) {\n\t$ERROR('#1: Declaration variable inside \"do-while\" statement is admitted');\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\ndo var x; while (false);\n",
+ "id": "S12.2_A12"
+ },
+ {
+ "section": "12.2",
+ "description": "Checking if deleting global variables that have the attributes {DontDelete} fails",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (delete(__variable)) {\n\t$ERROR('#1: delete(__variable)===false');\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (delete(this[\"__variable\"])) {\n\t$ERROR('#2: delete(this[\"__variable\"])===false');\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n\nvar __variable;\nvar __variable = \"defined\";\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#3\nif (delete(__variable) | delete(this[\"__variable\"])) {\n\t$ERROR('#3: (delete(__variable) | delete(this[\"__variable\"]))===false' );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#4\nif ((__variable !== \"defined\")|(this[\"__variable\"] !==\"defined\")) {\n\t$ERROR('#4: __variable === \"defined\" and this[\"__variable\"] ===\"defined\"');\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n",
+ "id": "S12.2_A2"
+ },
+ {
+ "section": "12.2",
+ "description": "Using Global scope and Function scope together",
+ "test": "var __var = \"OUT\";\n\n(function(){\n var __var =\"IN\";\n\t(function(){__var = \"INNER_SPACE\";})();\n\t(function(){var __var = \"INNER_SUN\";})();\n\t//////////////////////////////////////////////////////////////////////////////\n\t//CHECK#1\n if (__var !== \"INNER_SPACE\") {\n \t$ERROR('#1: __var === \"INNER_SPACE\". Actual: __var ==='+ __var );\n }\n\t//\n\t//////////////////////////////////////////////////////////////////////////////\n})();\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (__var !== \"OUT\") {\n\t$ERROR('#2: __var === \"OUT\". Actual: __var ==='+ __var );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n\n(function(){\n __var =\"IN\";\n\t(function(){__var = \"INNERED\"})();\n\t(function(){var __var = \"INNAGER\"})();\n\t//////////////////////////////////////////////////////////////////////////////\n\t//CHECK#3\n if (__var!==\"INNERED\") {\n \t$ERROR('#3: __var===\"INNERED\". Actual: __var==='+ __var );\n }\n\t//\n\t//////////////////////////////////////////////////////////////////////////////\n})();\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#4\nif (__var!==\"INNERED\") {\n\t$ERROR('#4: __var===\"INNERED\". Actual: __var==='+ __var );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S12.2_A3"
+ },
+ {
+ "section": "12.2",
+ "description": "Create and use unicode characters in variable Identifier",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\ntry {\n\t__var=__var;\n} catch (e) {\n\t$ERROR('#1: Unicode characters in variable Identifier allowed');\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\nvar \\u005f\\u005f\\u0076\\u0061\\u0072 = 1;\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (__var !== 1) {\n\t$ERROR('#2: __var === 1. Actual: __var ==='+ __var );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S12.2_A4"
+ },
+ {
+ "section": "12.2",
+ "description": "Executing eval(\"var x\")",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\ntry{\n\tx=x;\n\t$ERROR('#1: \"x=x\" lead to throwing exception');\n}catch(e){\n\t$PRINT(e.message);\n};\n//\n//////////////////////////////////////////////////////////////////////////////\n\neval(\"var x\");\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\ntry{\n\tx=x;\n}catch(e){\n\t$ERROR('#2: VariableDeclaration inside Eval statement is initialized when program reaches the eval statement '+e.message);\n};\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S12.2_A5"
+ },
+ {
+ "section": "12.2",
+ "description": "Declaring variable within \"try-catch\" statement",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\ntry{\n\tintry__var=intry__var;\n}catch(e){\n\t$ERROR('#1: Variable declaration inside \"try\" block is admitted');\n};\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\ntry{\n\tincatch__var=incatch__var;\n}catch(e){\n\t$ERROR('#2: Variable declaration inside \"catch\" block is admitted');\n};\n//\n//////////////////////////////////////////////////////////////////////////////\n\ntry{\n var intry__var;\n}catch(e){\n var incatch__var;\n};\n",
+ "id": "S12.2_A6_T1"
+ },
+ {
+ "section": "12.2",
+ "description": "Declaring variables within \"try-catch\" statement",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\ntry{\n\tintry__intry__var=intry__intry__var;\n\tintry__incatch__var=intry__incatch__var;\n\tincatch__intry__var=incatch__intry__var;\n\tincatch__incatch__var=incatch__incatch__var;\n}catch(e){\n\t$ERROR('#1: Variable declaration inside \"try-catch\" block is admitted');\n};\n//\n//////////////////////////////////////////////////////////////////////////////\n\ntry{\n try {\n \tvar intry__intry__var;\n } catch (e) {\n \tvar intry__incatch__var;\n }\n}catch(e){\n try {\n \tvar incatch__intry__var;\n } catch (e) {\n var incatch__incatch__var;\n }\n \n};\n",
+ "id": "S12.2_A6_T2"
+ },
+ {
+ "section": "12.2",
+ "description": "Declaring variable within \"for\" statement",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\ntry{\n\tinfor_var = infor_var;\n}catch(e){\n\t$ERROR('#1: Variable declaration inside \"for\" loop is admitted');\n};\n//\n//////////////////////////////////////////////////////////////////////////////\n\nfor (;;){\n break;\n var infor_var;\n}\n",
+ "id": "S12.2_A7"
+ },
+ {
+ "section": "12.2",
+ "description": "Checking if execution of \"var x += 1\" fails",
+ "negative": "",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nvar x += 1;\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S12.2_A8_T1"
+ },
+ {
+ "section": "12.2",
+ "description": "Checking if execution of \"var x | true\" fails",
+ "negative": "",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nvar x | true;\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S12.2_A8_T2"
+ },
+ {
+ "section": "12.2",
+ "description": "Checking if execution of \"var x && 1\" fails",
+ "negative": "",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nvar x && 1;\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S12.2_A8_T3"
+ },
+ {
+ "section": "12.2",
+ "description": "Checking if execution of \"var x++\" fails",
+ "negative": "",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nvar x++;\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S12.2_A8_T4"
+ },
+ {
+ "section": "12.2",
+ "description": "Checking if execution of \"var --x\" fails",
+ "negative": "",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nvar --x;\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S12.2_A8_T5"
+ },
+ {
+ "section": "12.2",
+ "description": "Checking if execution of \"var x*1\" fails",
+ "negative": "",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nvar x*1;\n//\n//////////////////////////////////////////////////////////////////////////////\n\n",
+ "id": "S12.2_A8_T6"
+ },
+ {
+ "section": "12.2",
+ "description": "Checking if execution of \"var x>>1\" fails",
+ "negative": "",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nvar x>>1;\n//\n//////////////////////////////////////////////////////////////////////////////\n\n",
+ "id": "S12.2_A8_T7"
+ },
+ {
+ "section": "12.2",
+ "description": "Checking if execution of \"var x in __arr\" fails",
+ "negative": "",
+ "test": "__arr = [];\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nvar x in __arr;\n//\n//////////////////////////////////////////////////////////////////////////////\n\n",
+ "id": "S12.2_A8_T8"
+ },
+ {
+ "section": "12.2",
+ "description": "Enumerating property attributes of \"this\" and then searching for the declared variable",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nfor (__prop in this){\n if (__prop === \"__declared__var\")\n enumed=true;\n}\nif (!(enumed)) {\n\t$ERROR('#1: When using property attributes, {DontEnum} not used');\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\nvar __declared__var;\n",
+ "id": "S12.2_A9"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/12.3_Empty_Statement.json b/website/resources/scripts/testcases2/12.3_Empty_Statement.json
new file mode 100644
index 000000000..8605694f4
--- /dev/null
+++ b/website/resources/scripts/testcases2/12.3_Empty_Statement.json
@@ -0,0 +1,14 @@
+{
+ "testCollection": {
+ "name": "12.3_Empty_Statement",
+ "numTests": 1,
+ "tests": [
+ {
+ "section": "12.3",
+ "description": ": Using EmptyStatement ;;",
+ "test": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;\n;;;;; ;;;;;; ;; ;; ;;;;;; ;;;;;;;; ;; ;; ;;;;;\n;;;;; ;; ;;;; ;;;; ;; ;; ;; ;; ;; ;;;;;\n;;;;; ;;;; ;; ;;;; ;; ;;;;;; ;; ;;;; ;;;;;\n;;;;; ;; ;; ;; ;; ;; ;; ;; ;;;;;\n;;;;; ;;;;;; ;; ;; ;; ;; ;; ;;;;;\n;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;\n",
+ "id": "S12.3_A1"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/12.4_Expression_Statement.json b/website/resources/scripts/testcases2/12.4_Expression_Statement.json
new file mode 100644
index 000000000..a9d017532
--- /dev/null
+++ b/website/resources/scripts/testcases2/12.4_Expression_Statement.json
@@ -0,0 +1,27 @@
+{
+ "testCollection": {
+ "name": "12.4_Expression_Statement",
+ "numTests": 3,
+ "tests": [
+ {
+ "section": "12.4",
+ "description": "Checking if execution of \"function(){}()\" fails",
+ "negative": "",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nfunction(){}();\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S12.4_A1"
+ },
+ {
+ "section": "12.4",
+ "description": "Checking by using eval \"(eval(\"x+1+x==1\"))\"",
+ "test": "x=1;\n\n__evaluated = eval(\"x+1+x==1\");\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__evaluated !== false) {\n\t$ERROR('#1: __evaluated === false. Actual: __evaluated ==='+ __evaluated );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n__evaluated = eval(\"1+1+1==1\");\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (__evaluated !== false) {\n\t$ERROR('#2: __evaluated === false. Actual: __evaluated ==='+ __evaluated );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S12.4_A2_T1"
+ },
+ {
+ "section": "12.4",
+ "description": "Checking by using eval(eval(x), where x is any string)",
+ "test": "x=\"5+1|0===0\";\n\n__evaluated = eval(x);\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__evaluated !== 7) {\n\t$ERROR('#1: __evaluated === 7. Actual: __evaluated ==='+ __evaluated );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n__evaluated = eval(\"2*\"+x+\">-1\");\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (__evaluated !== 11) {\n\t$ERROR('#2: __evaluated === 11. Actual: __evaluated ==='+ __evaluated );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S12.4_A2_T2"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/12.5_The_if_Statement.json b/website/resources/scripts/testcases2/12.5_The_if_Statement.json
new file mode 100644
index 000000000..86238d012
--- /dev/null
+++ b/website/resources/scripts/testcases2/12.5_The_if_Statement.json
@@ -0,0 +1,160 @@
+{
+ "testCollection": {
+ "name": "12.5_The_if_Statement",
+ "numTests": 24,
+ "tests": [
+ {
+ "section": "12.5",
+ "description": "Using \"if\" without \"else\" construction",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\n\nif(0)\n\t$ERROR('#1: 0 in expression is evaluated to false ');\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif(false)\n $ERROR('#2: false in expression is evaluated to false ');\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#3\nif(null)\n\t$ERROR('#3: null in expression is evaluated to false ');\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#4\nif(undefined)\n\t$ERROR('#4: undefined in expression is evaluated to false ');\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#5\nif(\"\")\n $ERROR('#5: empty string in expression is evaluated to false ');\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#6\nif(NaN)\n $ERROR('#5: NaN in expression is evaluated to false ');\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S12.5_A1.1_T1"
+ },
+ {
+ "section": "12.5",
+ "description": "Using \"if/else\" construction",
+ "test": "var c=0;\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif(0)\n\t$ERROR('#1.1: 0 in expression is evaluated to false ');\nelse\n c++;\nif (c!=1) $ERROR('#1.2: else branch don`t execute');\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif(false)\n $ERROR('#2.1: false in expression is evaluated to false ');\nelse\n c++;\nif (c!=2) $ERROR('#2.2: else branch don`t execute');\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#3\nif(null)\n\t$ERROR('#3.1: null in expression is evaluated to false ');\nelse\n c++;\nif (c!=3) $ERROR('#3.2: else branch don`t execute');\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#4\nif(undefined)\n\t$ERROR('#4.1: undefined in expression is evaluated to false ');\nelse\n c++;\nif (c!=4) $ERROR('#4.2: else branch don`t execute');\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#5\nif(\"\")\n $ERROR('#5.1: empty string in expression is evaluated to false ');\nelse\n c++;\nif (c!=5) $ERROR('#5.2: else branch don`t execute');\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#6\nif(NaN)\n $ERROR('#6.1: NaN in expression is evaluated to false ');\nelse\n c++;\nif (c!=6) $ERROR('#6.2: else branch don`t execute');\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S12.5_A1.1_T2"
+ },
+ {
+ "section": "12.5",
+ "description": "Using \"if\" without \"else\" construction",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif(!(new Number(1)))\n\t$ERROR('#1: new 1 in expression is evaluated to true');\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif(!(new Boolean(true)))\n\t$ERROR('#2: new true in expression is evaluated to true');\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#3\nif(!(new String(\"1\")))\n\t$ERROR('#3: new \"1\" in expression is evaluated to true');\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#4\nif(!(new String(\"A\")))\n\t$ERROR('#4: new \"A\" in expression is evaluated to true');\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#5\nif(!(new Boolean(false)))\n $ERROR('#2: new false in expression is evaluated to true ');\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#6\nif(!(new Number(NaN)))\n $ERROR('#6: new NaN in expression is evaluated to true ');\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#7\nif(!(new Number(null)))\n $ERROR('#7: new null in expression is evaluated to true ');\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#8\nif(!(new String(undefined)))\n $ERROR('#8: new undefined in expression is evaluated to true ');\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#9\nif(!(new String(\"\")))\n $ERROR('#9: new empty string in expression is evaluated to true ');\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S12.5_A1.2_T1"
+ },
+ {
+ "section": "12.5",
+ "description": "Using \"if/else\" construction",
+ "test": "var c=0;\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif(!(new Number(1)))\n\t$ERROR('#1.1: new 1 in expression is evaluated to true');\nelse\n c++;\nif (c!=1) $ERROR('#1.2: else branch don`t execute');\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif(!(new Boolean(true)))\n\t$ERROR('#2.1: new true in expression is evaluated to true');\nelse\n c++;\nif (c!=2) $ERROR('#2.2: else branch don`t execute');\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#3\nif(!(new String(\"1\")))\n\t$ERROR('#3.1: new \"1\" in expression is evaluated to true');\nelse\n c++;\nif (c!=3) $ERROR('#3.2: else branch don`t execute');\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#4\nif(!(new String(\"A\")))\n\t$ERROR('#4.1: new \"A\" in expression is evaluated to true');\nelse\n c++;\nif (c!=4) $ERROR('#4.2: else branch don`t execute');\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#5\nif(!(new Boolean(false)))\n $ERROR('#5.1: new false in expression is evaluated to true ');\nelse\n c++;\nif (c!=5) $ERROR('#5.2: else branch don`t execute');\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#6\nif(!(new Number(NaN)))\n $ERROR('#6.1: new NaN in expression is evaluated to true ');\nelse\n c++;\nif (c!=6) $ERROR('#6.2: else branch don`t execute');\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#7\nif(!(new Number(null)))\n $ERROR('#7.1: new null in expression is evaluated to true ');\nelse\n c++;\nif (c!=7) $ERROR('#7.2: else branch don`t execute');\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#8\nif(!(new String(undefined)))\n $ERROR('#8.1: new undefined in expression is evaluated to true ');\nelse\n c++;\nif (c!=8) $ERROR('#8.2: else branch don`t execute');\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#9\nif(!(new String(\"\")))\n $ERROR('#9.1: new empty string in expression is evaluated to true ');\nelse\n c++;\nif (c!=9) $ERROR('#9.2: else branch don`t execute');\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S12.5_A1.2_T2"
+ },
+ {
+ "section": "12.5",
+ "description": ": Using function expession(function __func(){return 0;}) inside the \"if\" expression ;",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#\nif(function __func(){return 0;}){\n ;\n}else {\n $ERROR('#1: Function expession inside the \"if\" expression is allowed');\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S12.5_A10_T1"
+ },
+ {
+ "section": "12.5",
+ "description": ": Using function expession \"function __func(){return 0;}()\" within \"if\" expression;",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#\nif(function __func(){return 0;}()){\n $ERROR('#1: Function expession inside the if expression is allowed');\n}else {\n ;\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S12.5_A10_T2"
+ },
+ {
+ "section": "12.5",
+ "description": "Checking if execution of \"if({1})\" fails",
+ "negative": "",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#\nif({1})\n {\n ;\n }else\n {\n ;\n }\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S12.5_A11"
+ },
+ {
+ "section": "12.5",
+ "description": "Using embedded \"if/else\" into \"if/else\" constructions",
+ "test": "//CHECK# 1\nif(true)\n if (false)\n $ERROR('#1.1: At embedded \"if/else\" constructions engine must select right branches');\n else\n ;\nelse \n if (true)\n $ERROR('#1.2: At embedded \"if/else\" constructions engine must select right branches');\n else\n $ERROR('#1.3: At embedded \"if/else\" constructions engine must select right branches');\n\n//CHECK# 2\nif(true)\n if (true)\n ;\n else\n $ERROR('#2.1: At embedded \"if/else\" constructions engine must select right branches');\nelse \n if (true)\n $ERROR('#2.2: At embedded \"if/else\" constructions engine must select right branches');\n else\n $ERROR('#2.3: At embedded \"if/else\" constructions engine must select right branches');\n\n//CHECK# 3\nif(false)\n if (true)\n $ERROR('#3.1: At embedded \"if/else\" constructions engine must select right branches');\n else\n $ERROR('#3.2: At embedded \"if/else\" constructions engine must select right branches');\nelse \n if (true)\n ;\n else\n $ERROR('#3.3: At embedded \"if/else\" constructions engine must select right branches');\n\n//CHECK# 4\nif(false)\n if (true)\n $ERROR('#4.1: At embedded \"if/else\" constructions engine must select right branches');\n else\n $ERROR('#4.2: At embedded \"if/else\" constructions engine must select right branches');\nelse \n if (false)\n $ERROR('#4.3: At embedded \"if/else\" constructions engine must select right branches');\n else\n ;\n",
+ "id": "S12.5_A12_T1"
+ },
+ {
+ "section": "12.5",
+ "description": "Using embedded \"if\" into \"if/else\" constructions",
+ "test": "//CHECK# 1\nif(true){\n if (false)\n $ERROR('#1.1: At embedded \"if/else\" constructions engine must select right branches');\n}\nelse{ \n if (true)\n $ERROR('#1.2: At embedded \"if/else\" constructions engine must select right branches');\n}\n\n//CHECK# 2\nif(true){\n if (true)\n ;\n}\nelse{ \n if (true)\n $ERROR('#2.2: At embedded \"if/else\" constructions engine must select right branches');\n}\n\n//CHECK# 3\nif(false){\n if (true)\n $ERROR('#3.1: At embedded \"if/else\" constructions engine must select right branches');\n}\nelse{ \n if (true)\n ;\n}\n\n//CHECK# 4\nif(false){\n if (true)\n $ERROR('#4.1: At embedded \"if/else\" constructions engine must select right branches');\n}\nelse{ \n if (false)\n $ERROR('#4.3: At embedded \"if/else\" constructions engine must select right branches');\n}\n",
+ "id": "S12.5_A12_T2"
+ },
+ {
+ "section": "12.5",
+ "description": "Using embedded \"if/else\" into \"if\" without \"else\" constructions",
+ "test": "//CHECK# 1\nif(true)\n if (false)\n $ERROR('#1.1: At embedded \"if/else\" constructions engine must select right branches');\n else\n ;\n\n//CHECK# 2\nif(true)\n if (true)\n ;\n else\n $ERROR('#2.1: At embedded \"if/else\" constructions engine must select right branches');\n\n//CHECK# 3\nif(false)\n if (true)\n $ERROR('#3.1: At embedded \"if/else\" constructions engine must select right branches');\n else\n $ERROR('#3.2: At embedded \"if/else\" constructions engine must select right branches');\n\n//CHECK# 4\nif(false)\n if (true)\n $ERROR('#4.1: At embedded \"if/else\" constructions engine must select right branches');\n else\n $ERROR('#4.2: At embedded \"if/else\" constructions engine must select right branches');\n",
+ "id": "S12.5_A12_T3"
+ },
+ {
+ "section": "12.5",
+ "description": "Using embedded \"if\" into \"if\" constructions",
+ "test": "//CHECK# 1\nif(true)\n if (false)\n $ERROR('#1.1: At embedded \"if/else\" constructions engine must select right branches');\n\n//CHECK# 2\nvar c=0;\nif(true)\n if (true)\n c=2;\nif (c!==2)\n $ERROR('#2: At embedded \"if/else\" constructions engine must select right branches');\n\n//CHECK# 3\nif(false)\n if (true)\n $ERROR('#3.1: At embedded \"if/else\" constructions engine must select right branches');\n\n//CHECK# 4\nif(false)\n if (true)\n $ERROR('#4.1: At embedded \"if/else\" constructions engine must select right branches');\n",
+ "id": "S12.5_A12_T4"
+ },
+ {
+ "section": "12.5",
+ "description": "Using \"if\" without \"else\" construction",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif(!(1))\n\t$ERROR('#1: 1 in expression is evaluated to true');\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif(!(true))\n\t$ERROR('#2: true in expression is evaluated to true');\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#3\nif(!(\"1\"))\n\t$ERROR('#3: \"1\" in expression is evaluated to true');\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#4\nif(!(\"A\"))\n\t$ERROR('#4: \"A\" in expression is evaluated to true');\n//\n//////////////////////////////////////////////////////////////////////////////\n\n",
+ "id": "S12.5_A1_T1"
+ },
+ {
+ "section": "12.5",
+ "description": "Using \"if/else\" construction",
+ "test": "var c=0;\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif(!(1))\n\t$ERROR('#1.1: 1 in expression is evaluated to true');\nelse\n c++;\nif (c!=1) $ERROR('#1.2: else branch don`t execute');\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif(!(true))\n\t$ERROR('#2.1: true in expression is evaluated to true');\nelse\n c++;\nif (c!=2) $ERROR('#2.2: else branch don`t execute');\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#3\nif(!(\"1\"))\n\t$ERROR('#3.1: \"1\" in expression is evaluated to true');\nelse\n c++;\nif (c!=3) $ERROR('#3.2: else branch don`t execute');\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#4\nif(!(\"A\"))\n\t$ERROR('#4.1: \"A\" in expression is evaluated to true');\nelse\n c++;\nif (c!=4) $ERROR('#4.2: else branch don`t execute');\n//\n//////////////////////////////////////////////////////////////////////////////\n\n",
+ "id": "S12.5_A1_T2"
+ },
+ {
+ "section": "12.5",
+ "description": "Checking by using eval \"eval(\"true\")\"",
+ "negative": "",
+ "test": "if (eval(\"true\")) $FAIL('#1: In the \"if\" Statement eval as Expression is admitted');\n",
+ "id": "S12.5_A2"
+ },
+ {
+ "section": "12.5",
+ "description": "The Expression is \"(function(){throw 1})()\"",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\ntry {\n\tif ((function(){throw 1})()) abracadabra\n} catch (e) {\n\tif (e !== 1) {\n\t\t$ERROR('#1: Exception === 1. Actual: Exception ==='+ e);\n\t}\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\ntry {\n\tif ((function(){throw 1})()) abracadabra; else blablachat;\n} catch (e) {\n\tif (e !== 1) {\n\t\t$ERROR('#2: Exception === 1. Actual: Exception ==='+ e);\n\t}\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n",
+ "id": "S12.5_A3"
+ },
+ {
+ "section": "12.5",
+ "description": "The first statement is \"(function(){throw \"instatement\"})()\"",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\ntry {\n\tif (true) (function(){throw \"instatement\"})();\n\t$FAIL(\"#1 failed\")\n} catch (e) {\n\tif (e !== \"instatement\") {\n\t\t$ERROR('#1: Exception === \"instatement\". Actual: Exception ==='+ e);\n\t}\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\ntry {\n\tif (false) (function(){throw \"truebranch\"})(); (function(){throw \"missbranch\"})();\n\t$FAIL(\"#2 failed\")\n} catch (e) {\n\tif (e !== \"missbranch\") {\n\t\t$ERROR('#2: Exception === \"missbranch\". Actual: Exception ==='+ e);\n\t}\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n",
+ "id": "S12.5_A4"
+ },
+ {
+ "section": "12.5",
+ "description": ": The \"if\" Expression is \"function __func(){throw \"FunctionExpression\";}\";",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\ntry {\n\t__func=__func;\n\t$ERROR('#1: \"__func=__func\" lead to throwing exception');\n} catch (e) {\n\t;\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\ntry {\n\tif(function __func(){throw \"FunctionExpression\";}) (function(){throw \"TrueBranch\"})(); else (function(){\"MissBranch\"})();\n} catch (e) {\n\tif (e !== \"TrueBranch\") {\n\t\t$ERROR('#2: Exception ===\"TrueBranch\". Actual: Exception ==='+ e);\n\t}\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#3\ntry {\n\t__func=__func;\n\t$ERROR('#3: \"__func=__func\" lead to throwing exception');\n} catch (e) {\n\t;\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n\n\n",
+ "id": "S12.5_A5"
+ },
+ {
+ "section": "12.5",
+ "description": "Checking if execution of \"if true\" fails",
+ "negative": "",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif true;\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S12.5_A6_T1"
+ },
+ {
+ "section": "12.5",
+ "description": "Checking if execution of \"if false\" fails",
+ "negative": "",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif false;\n//\n//////////////////////////////////////////////////////////////////////////////\n\n",
+ "id": "S12.5_A6_T2"
+ },
+ {
+ "section": "12.5",
+ "description": ": Checking by using eval \"eval(\"if(1);\"))\";",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\ntry {\n\tvar __evaluated = eval(\"if(1);\");\n\tif (__evaluated !== undefined) {\n\t\t$ERROR('#1: __evaluated === undefined. Actual: __evaluated ==='+ __evaluated );\n\t}\n\n} catch (e) {\n\t$ERROR('#1.1: \"__evaluated = eval(\"if(1);\")\" does not lead to throwing exception');\n\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S12.5_A7"
+ },
+ {
+ "section": "12.5",
+ "description": "Checking if execution of \"if()\" fails",
+ "negative": "",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif();\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S12.5_A8"
+ },
+ {
+ "section": "12.5",
+ "description": "Declaring function within an \"if\" statement",
+ "negative": "SyntaxError",
+ "test": "\"use strict\";\nif (true) {\n function __func(){};\n} else {\n function __func(){};\n}\n",
+ "id": "S12.5_A9_T1"
+ },
+ {
+ "section": "12.5",
+ "description": "Declaring function within an \"if\" that is declared within the strict function",
+ "negative": "SyntaxError",
+ "test": "(function(){\n\"use strict\";\n\nif (true) {\n function __func(){};\n} else {\n function __func(){};\n}\n\n});\n",
+ "id": "S12.5_A9_T2"
+ },
+ {
+ "section": "12.5",
+ "description": "Declaring function within an \"if\" statement that is declared within the function declaration",
+ "negative": "",
+ "test": "function(){\n\nif (true) {\n function __func(){};\n} else {\n function __func(){};\n}\n\n};\n",
+ "id": "S12.5_A9_T3"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/12.6.1_The_do_while_Statement.json b/website/resources/scripts/testcases2/12.6.1_The_do_while_Statement.json
new file mode 100644
index 000000000..efde8ccab
--- /dev/null
+++ b/website/resources/scripts/testcases2/12.6.1_The_do_while_Statement.json
@@ -0,0 +1,181 @@
+{
+ "testCollection": {
+ "name": "12.6.1_The_do_while_Statement",
+ "numTests": 27,
+ "tests": [
+ {
+ "section": "12.6.1",
+ "description": "Evaluating various Expressions",
+ "test": "var __in__do;\n\ndo __in__do=1; while ( false );\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__in__do!==1) {\n\t$ERROR('#1: false evaluates to false');\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\ndo __in__do=2; while ( 0 );\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (__in__do!==2) {\n\t$ERROR('#2: 0 evaluates to false');\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\ndo __in__do=3; while ( \"\" );\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#3\nif (__in__do!==3) {\n\t$ERROR('#3: \"\" evaluates to false');\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S12.6.1_A1"
+ },
+ {
+ "section": "12.6.1, 13",
+ "description": "Also this a test on FunctionExpression",
+ "test": "var check = 0;\ndo { \n if(typeof(f) === \"function\"){\n check = -1; \n break; \n } else {\n check = 1; \n break; \n }\n} while(function f(){});\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (check !== 1) {\n\t$ERROR('#1: FunctionExpression within a \"do-while\" statement is allowed, but no function with the given name will appear in the global context');\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S12.6.1_A10"
+ },
+ {
+ "section": "12.6.1",
+ "description": "Checking if execution of \"do {} while({})\" passes",
+ "test": "do {\n var __in__do=1;\n if(__in__do)break;\n} while({});\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__in__do !== 1) {\n\t$ERROR('#1: \"{}\" in do-while expression evaluates to true');\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S12.6.1_A11"
+ },
+ {
+ "section": "12.6.1",
+ "description": ": Checking if execution of \"do var x=1; var y =2; while (0)\" fails;",
+ "negative": "",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\ndo var x=1; var y =2; while (0);\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S12.6.1_A12"
+ },
+ {
+ "section": "12.6.1, 13",
+ "description": "Declaring function within a \"do-while\" loop",
+ "negative": "SyntaxError",
+ "test": "\"use strict\";\ndo{\n function __func(){};\n} while(0);\n",
+ "id": "S12.6.1_A13_T1"
+ },
+ {
+ "section": "12.6.1, 13",
+ "description": "Declaring a function within a \"do-while\" loop that is within a strict function",
+ "negative": "SyntaxError",
+ "test": "(function(){\n\"use strict\";\ndo{\n function __func(){};\n}while(0);\n\n});\n",
+ "id": "S12.6.1_A13_T2"
+ },
+ {
+ "section": "12.6.1, 13",
+ "description": "Declaring a function within a \"do-while\" loop that is within a function declaration itself",
+ "negative": "",
+ "test": "function(){\n\ndo{\n function __func(){};\n}while(0);\n\n};\n",
+ "id": "S12.6.1_A13_T3"
+ },
+ {
+ "section": "12.6.1, 13",
+ "description": ": Using FunctionExpression \"function __func(){return 0;}\" as an Expression;",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#\ndo{\n var __reached = 1;\n break;\n}while(function __func(){return 0;});\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (__reached !== 1) {\n\t$ERROR('#2: function expession inside of do-while expression is allowed');\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S12.6.1_A14_T1"
+ },
+ {
+ "section": "12.6.1",
+ "description": ": Using FunctionExpression \"function __func(){return 0;}()\" as an Expression;",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#\ndo{\n var __reached = 1;\n break;\n}while(function __func(){return 0;}());\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (__reached !== 1) {\n\t$ERROR('#2: function expession inside of do-while expression is allowed');\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S12.6.1_A14_T2"
+ },
+ {
+ "section": "12.6.1",
+ "description": "Using \"{0}\" Block as an Expression",
+ "negative": "",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#\ndo{\n ;\n}while({0});\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S12.6.1_A15"
+ },
+ {
+ "section": "12.6.1",
+ "description": "Evaluating Statement with error Expression",
+ "test": "try {\n\tdo __in__do = \"reached\"; while (abbracadabra);\n\t$ERROR('#1: \\'do __in__do = \"reached\"; while (abbracadabra)\\' lead to throwing exception');\n} catch (e) {}\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__in__do !== \"reached\") {\n\t$ERROR('#1.1: __in__do === \"reached\". Actual: __in__do ==='+ __in__do );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n\n",
+ "id": "S12.6.1_A2"
+ },
+ {
+ "section": "12.6.1",
+ "description": ": Using eval \"eval(\"do __in__do=1; while (false)\")\";",
+ "test": "__evaluated = eval(\"do __in__do=1; while (false)\");\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#\nif (__in__do !== 1) {\n\t$ERROR('#1: __in__do === 1. Actual: __in__do ==='+ __in__do );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (__evaluated !== 1) {\n\t$ERROR('#2: __evaluated === 1. Actual: __evaluated ==='+ __evaluated );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S12.6.1_A3"
+ },
+ {
+ "section": "12.6.1, 12.8",
+ "description": "Using \"break\" within a \"do-while\" loop",
+ "test": "do {\n __in__do__before__break=\"reached\"; \n break; \n __in__do__after__break=\"where am i\";\n} while(2===1);\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__in__do__before__break !== \"reached\") {\n\t$ERROR('#1: __in__do__before__break === \"reached\". Actual: __in__do__before__break ==='+ __in__do__before__break );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (typeof __in__do__after__break !== \"undefined\") {\n\t$ERROR('#2: typeof __in__do__after__break === \"undefined\". Actual: typeof __in__do__after__break ==='+ typeof __in__do__after__break );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S12.6.1_A4_T1"
+ },
+ {
+ "section": "12.6.1, 12.8",
+ "description": "\"break\" and VariableDeclaration within a \"do-while\" statement",
+ "test": "do_out : do {\n var __in__do__before__break=\"black\";\n do_in : do {\n var __in__do__IN__before__break=\"hole\";\n break do_in; \n var __in__do__IN__after__break=\"sun\";\n } while (0);\n var __in__do__after__break=\"won't you come\";\n} while(2==1);\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (!(__in__do__before__break&&__in__do__IN__before__break&&!__in__do__IN__after__break&&__in__do__after__break)) {\n\t$ERROR('#1: (__in__do__before__break&&__in__do__IN__before__break&&!__in__do__IN__after__break&&__in__do__after__break)===true. Actual: (__in__do__before__break&&__in__do__IN__before__break&&!__in__do__IN__after__break&&__in__do__after__break)==='+ (__in__do__before__break&&__in__do__IN__before__break&&!__in__do__IN__after__break&&__in__do__after__break) );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S12.6.1_A4_T2"
+ },
+ {
+ "section": "12.6.1, 12.2, 12.8",
+ "description": "\"break\" and VariableDeclaration within a \"do-while\" statement",
+ "test": "do_out : do {\n var __in__do__before__break=\"once\";\n do_in : do {\n var __in__do__IN__before__break=\"in\";\n break do_out;\n var __in__do__IN__after__break=\"the\";\n } while (0);\n var __in__do__after__break=\"lifetime\";\n} while(2===1);\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (!(__in__do__before__break&&__in__do__IN__before__break&&!__in__do__IN__after__break&&!__in__do__after__break)) {\n\t$ERROR('#1: (__in__do__before__break&&__in__do__IN__before__break&&!__in__do__IN__after__break&&!__in__do__after__break)===true. Actual: (__in__do__before__break&&__in__do__IN__before__break&&!__in__do__IN__after__break&&!__in__do__after__break)==='+ (__in__do__before__break&&__in__do__IN__before__break&&!__in__do__IN__after__break&&!__in__do__after__break) );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S12.6.1_A4_T3"
+ },
+ {
+ "section": "12.6.1, 12.8",
+ "description": "\"break\" and VariableDeclaration within a \"do-while\" statement",
+ "test": "do_out : do {\n var __in__do__before__break=\"reached\";\n do_in : do {\n var __in__do__IN__before__break=\"reached\";\n break;\n var __in__do__IN__after__break=\"where am i\";\n } while (0);\n var __in__do__after__break=\"where am i\";\n} while(2===1);\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (!(__in__do__before__break&&__in__do__IN__before__break&&!__in__do__IN__after__break&&__in__do__after__break)) {\n\t$ERROR('#1: (__in__do__before__break&&__in__do__IN__before__break&&!__in__do__IN__after__break&&__in__do__after__break)===true. Actual: (__in__do__before__break&&__in__do__IN__before__break&&!__in__do__IN__after__break&&__in__do__after__break)==='+ (__in__do__before__break&&__in__do__IN__before__break&&!__in__do__IN__after__break&&__in__do__after__break) );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n",
+ "id": "S12.6.1_A4_T4"
+ },
+ {
+ "section": "12.6.1, 12.8",
+ "description": "Using labeled \"break\" in order to continue a loop",
+ "test": "//CHECK#1\nvar i=0;\nwoohoo:{\n do{\n i++;\n if ( ! (i < 10) ) {\n break woohoo;\n $ERROR('#1.1: \"break woohoo\" must break loop');\n }\n } while ( true );\n if (i!==10) $ERROR('#1.2: i===10. Actual: i==='+ i );\n}\n",
+ "id": "S12.6.1_A4_T5"
+ },
+ {
+ "section": "12.6.1",
+ "description": "Using eval",
+ "test": "__evaluated = eval(\"do {__in__do__before__break=1; break; __in__do__after__break=2;} while(0)\");\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__in__do__before__break !== 1) {\n\t$ERROR('#1: __in__do__before__break === 1. Actual: __in__do__before__break ==='+ __in__do__before__break );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (typeof __in__do__after__break !== \"undefined\") {\n\t$ERROR('#2: typeof __in__do__after__break === \"undefined\". Actual: typeof __in__do__after__break ==='+ typeof __in__do__after__break );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#3\nif (__evaluated !== 1) {\n\t$ERROR('#3: __evaluated === 1. Actual: __evaluated ==='+ __evaluated );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S12.6.1_A5"
+ },
+ {
+ "section": "12.6.1",
+ "description": "Checking if execution of \"do{} while 1\" fails",
+ "negative": "",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\ndo break; while 1;\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S12.6.1_A6_T1"
+ },
+ {
+ "section": "12.6.1",
+ "description": "Checking if execution of \"do{} while 0\" fails",
+ "negative": "",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\ndo break; while 0;\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S12.6.1_A6_T2"
+ },
+ {
+ "section": "12.6.1",
+ "description": "Checking if execution of \"do{}while true\" fails",
+ "negative": "",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\ndo break; while true;\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S12.6.1_A6_T3"
+ },
+ {
+ "section": "12.6.1",
+ "description": "Checking if execution of \"do{}while false\" fails",
+ "negative": "",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\ndo break; while false;\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S12.6.1_A6_T4"
+ },
+ {
+ "section": "12.6.1",
+ "description": "Checking if execution of \"do{}while ''\" fails",
+ "negative": "",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\ndo break; while '';\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S12.6.1_A6_T5"
+ },
+ {
+ "section": "12.6.1",
+ "description": "Checking if execution of \"do{}while 'hood'\" fails",
+ "negative": "",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\ndo break; while 'hood';\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S12.6.1_A6_T6"
+ },
+ {
+ "section": "12.6.1",
+ "description": "Using eval",
+ "test": "var __condition=0\n\n__evaluated = eval(\"do eval(\\\"__condition++\\\"); while (__condition<5)\");\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__condition !== 5) {\n\t$ERROR('#1: The \"do-while\" statement is evaluted according to the Standard ');\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (__evaluated !== 4) {\n\t$ERROR('#2: The \"do-while\" statement returns (normal, V, empty)');\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n",
+ "id": "S12.6.1_A7"
+ },
+ {
+ "section": "12.6.1",
+ "description": "Using eval",
+ "test": "var __condition = 0, __odds=0;\n\n__evaluated = eval(\"do { __condition++; if (((''+__condition/2).split('.')).length>1) continue; __odds++;} while(__condition < 10)\");\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__odds !== 5) {\n\t$ERROR('#1: __odds === 5. Actual: __odds ==='+ __odds );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (__evaluated !== 4) {\n\t$ERROR('#2: __evaluated === 4. Actual: __evaluated ==='+ __evaluated );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n",
+ "id": "S12.6.1_A8"
+ },
+ {
+ "section": "12.6.1",
+ "description": "Throwing system exception whithin a \"do-while\" loop",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\ntry {\n\tdo {\n\t var x = 1; \n\t abaracadabara;\n\t} while(0);\n\t$ERROR('#1: \"abbracadabra\" lead to throwing exception');\n\n} catch (e) {}\n\nif (x !== 1) {\n\t$ERROR('#1.1: x === 1. Actual: x ==='+ x );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S12.6.1_A9"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/12.6.2_The_while_statement.json b/website/resources/scripts/testcases2/12.6.2_The_while_statement.json
new file mode 100644
index 000000000..e82c07c53
--- /dev/null
+++ b/website/resources/scripts/testcases2/12.6.2_The_while_statement.json
@@ -0,0 +1,174 @@
+{
+ "testCollection": {
+ "name": "12.6.2_The_while_statement",
+ "numTests": 26,
+ "tests": [
+ {
+ "section": "12.6.2",
+ "description": "Evaluating various Expressions",
+ "test": "var __in__do;\n\nwhile ( false ) __in__do=1;\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__in__do !== undefined) {\n\t$ERROR('#1: false evaluates to false');\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\nwhile ( 0 ) __in__do=2;\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (__in__do !== undefined) {\n\t$ERROR('#2: 0 evaluates to false');\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\nwhile ( \"\" ) __in__do=3;\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#3\nif (__in__do !== undefined) {\n\t$ERROR('#3: empty string evaluates to false');\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\nwhile ( null ) __in__do=4;\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#4\nif (__in__do !== undefined) {\n\t$ERROR('#4: null evaluates to false');\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\nwhile ( undefined ) __in__do=35;\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#5\nif (__in__do !== undefined) {\n\t$ERROR('#5: undefined evaluates to false');\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S12.6.2_A1"
+ },
+ {
+ "section": "12.6.2, 13.2",
+ "description": "Testing FunctionExpression too",
+ "test": "var check=0;\nwhile(function f(){}){ \n if(typeof(f) === \"function\") {\n check = -1;\n break; \n } else {\n check = 1;\n break; \n }\n}\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (check !== 1) {\n\t$ERROR('#1: FunctionExpression inside while construction expression allowed but function not declare');\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S12.6.2_A10"
+ },
+ {
+ "section": "12.6.2",
+ "description": "Checking if execution of \"while({}){}\" passes",
+ "test": "while({}){\n var __in__do=1;\n if(__in__do)break;\n};\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__in__do !== 1) {\n\t$ERROR('#1: \"{}\" in while expression evaluates to true');\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S12.6.2_A11"
+ },
+ {
+ "section": "12.6.2",
+ "description": "Checking if declaring a function within a \"while\" Statement leads to an exception",
+ "negative": "",
+ "test": "while(0){\n function __func(){};\n};\n",
+ "id": "S12.6.2_A13_T1"
+ },
+ {
+ "section": "12.6.2",
+ "description": "Checking if declaring a function within a \"while\" Statement that is in a function call leads to an exception",
+ "negative": "",
+ "test": "(function(){\n\nwhile(0){\n function __func(){};\n};\n\n})();\n",
+ "id": "S12.6.2_A13_T2"
+ },
+ {
+ "section": "12.6.2",
+ "description": "Checking if declaring a function within a \"while\" Statement that is in a function body leads to an exception",
+ "negative": "",
+ "test": "function(){\n\nwhile(0){\n function __func(){};\n};\n\n};\n",
+ "id": "S12.6.2_A13_T3"
+ },
+ {
+ "section": "12.6.2",
+ "description": ": Using \"function __func(){return 0;}\" as an Expression;",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#\nwhile(function __func(){return 0;}){\n var __reached = 1;\n break;\n};\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (__reached !== 1) {\n\t$ERROR('#2: function expression inside of while expression is allowed');\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S12.6.2_A14_T1"
+ },
+ {
+ "section": "12.6.2",
+ "description": "Using function call as an Expression",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#\nwhile(function __func(){return 1;}()){\n var __reached = 1;\n break;\n};\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (__reached !== 1) {\n\t$ERROR('#2: function expression inside of while expression is allowed');\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S12.6.2_A14_T2"
+ },
+ {
+ "section": "12.6.2",
+ "description": "Expression is \"{0}\"",
+ "negative": "",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#\nwhile({1}){\n break ;\n};\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S12.6.2_A15"
+ },
+ {
+ "section": "12.6.2",
+ "description": "Evaluating Statement with error Expression",
+ "test": "try {\n\twhile ((function(){throw 1})()) __in__while = \"reached\"; \n\t$ERROR('#1: \\'while ((function(){throw 1})()) __in__while = \"reached\"\\' lead to throwing exception');\n} catch (e) {\n\tif (e !== 1) {\n\t\t$ERROR('#1: Exception === 1. Actual: Exception ==='+e);\n\t}\n}\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (typeof __in__while !== \"undefined\") {\n\t$ERROR('#1.1: typeof __in__while === \"undefined\". Actual: typeof __in__while ==='+typeof __in__while);\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n\n",
+ "id": "S12.6.2_A2"
+ },
+ {
+ "section": "12.6.2",
+ "description": "Using eval",
+ "test": "var __in__do;\n\n__evaluated = eval(\"while (false) __in__do=1;\");\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#\nif (__in__do !== undefined) {\n\t$ERROR('#1: __in__do === undefined. Actual: __in__do ==='+ __in__do );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (__evaluated !== undefined) {\n\t$ERROR('#2: __evaluated === undefined. Actual: __evaluated ==='+ __evaluated );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S12.6.2_A3"
+ },
+ {
+ "section": "12.6.2, 12.8",
+ "description": "\"break\" within a \"while\" Statement",
+ "test": "while(1===1){\n __in__do__before__break=\"reached\"; \n break;\n __in__do__after__break=\"where am i\";\n}\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__in__do__before__break !== \"reached\") {\n\t$ERROR('#1: __in__do__before__break === \"reached\". Actual: __in__do__before__break ==='+ __in__do__before__break );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (typeof __in__do__after__break !== \"undefined\") {\n\t$ERROR('#2: typeof __in__do__after__break === \"undefined\". Actual: typeof __in__do__after__break ==='+ typeof __in__do__after__break );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S12.6.2_A4_T1"
+ },
+ {
+ "section": "12.6.2",
+ "description": "\"break\" and VariableDeclaration within a \"while\" Statement",
+ "test": "do_out : while(1===1) {\n if (__in__do__before__break) break;\n var __in__do__before__break=\"black\";\n do_in : while (1) {\n var __in__do__IN__before__break=\"hole\";\n break do_in; \n var __in__do__IN__after__break=\"sun\";\n } ;\n var __in__do__after__break=\"won't you come\";\n};\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (!(__in__do__before__break&&__in__do__IN__before__break&&!__in__do__IN__after__break&&__in__do__after__break)) {\n\t$ERROR('#1: Break inside do-while is allowed as its described at standard');\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S12.6.2_A4_T2"
+ },
+ {
+ "section": "12.6.2, 12.2",
+ "description": "\"break\" and VariableDeclaration within a \"while\" Statement",
+ "test": "do_out : while(1===1) {\n if (__in__do__before__break) break;\n var __in__do__before__break=\"once\";\n do_in : while (1) {\n var __in__do__IN__before__break=\"in\";\n break do_out;\n var __in__do__IN__after__break=\"the\";\n } ;\n var __in__do__after__break=\"lifetime\";\n} ;\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (!(__in__do__before__break&&__in__do__IN__before__break&&!__in__do__IN__after__break&&!__in__do__after__break)) {\n\t$ERROR('#1: Break inside do-while is allowed as its described at standard');\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S12.6.2_A4_T3"
+ },
+ {
+ "section": "12.6.2",
+ "description": "\"break\" and VariableDeclaration within a \"while\" Statement",
+ "test": "do_out : while(1===1) {\n if(__in__do__before__break)break;\n var __in__do__before__break=\"can't\";\n do_in : while (1) {\n var __in__do__IN__before__break=\"get\";\n break;\n var __in__do__IN__after__break=\"no\";\n } ;\n var __in__do__after__break=\"Satisfaction\";\n} ;\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (!(__in__do__before__break&&__in__do__IN__before__break&&!__in__do__IN__after__break&&__in__do__after__break)) {\n\t$ERROR('#1: Break inside do-while is allowed as its described at standard');\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n",
+ "id": "S12.6.2_A4_T4"
+ },
+ {
+ "section": "12.6.2",
+ "description": "Using labeled \"break\" in order to continue a \"while\" loop",
+ "test": "//CHECK#1\nvar i=0;\nwoohoo:{\n while(true){\n i++;\n if ( ! (i < 10) ) {\n break woohoo;\n $ERROR('#1.1: \"break woohoo\" must break loop');\n }\n }\n if (i!==10) $ERROR('#1.2: i===10. Actual: i==='+ i );\n}\n",
+ "id": "S12.6.2_A4_T5"
+ },
+ {
+ "section": "12.6.2",
+ "description": "Using eval",
+ "test": "__evaluated = eval(\"while(1) {__in__do__before__break=1; break; __in__do__after__break=2;}\");\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__in__do__before__break !== 1) {\n\t$ERROR('#1: __in__do__before__break === 1. Actual: __in__do__before__break ==='+ __in__do__before__break );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (typeof __in__do__after__break !== \"undefined\") {\n\t$ERROR('#2: typeof __in__do__after__break === \"undefined\". Actual: typeof __in__do__after__break ==='+ typeof __in__do__after__break );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#3\nif (__evaluated !== 1) {\n\t$ERROR('#3: __evaluated === 1. Actual: __evaluated ==='+ __evaluated );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S12.6.2_A5"
+ },
+ {
+ "section": "12.6.2",
+ "description": "Checking if execution of \"while 1 break\" fails",
+ "negative": "",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nwhile 1 break;\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S12.6.2_A6_T1"
+ },
+ {
+ "section": "12.6.2",
+ "description": "Checking if execution of \"while 0 break\" fails",
+ "negative": "",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nwhile 0 break;\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S12.6.2_A6_T2"
+ },
+ {
+ "section": "12.6.2",
+ "description": "Checking if execution of \"while true break\" fails",
+ "negative": "",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nwhile true break;\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S12.6.2_A6_T3"
+ },
+ {
+ "section": "12.6.2",
+ "description": "Checking if execution of \"while false break\" fails",
+ "negative": "",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nwhile false break;\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S12.6.2_A6_T4"
+ },
+ {
+ "section": "12.6.2",
+ "description": "Checking if execution of \"while '' break\" fails",
+ "negative": "",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nwhile '' break;\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S12.6.2_A6_T5"
+ },
+ {
+ "section": "12.6.2",
+ "description": "Checking if execution of \"while 'hood' break\" fails",
+ "negative": "",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nwhile 'hood' break;\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S12.6.2_A6_T6"
+ },
+ {
+ "section": "12.6.2",
+ "description": "using eval",
+ "test": "var __condition=0\n\n__evaluated = eval(\"while (__condition<5) eval(\\\"__condition++\\\");\");\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__condition !== 5) {\n\t$ERROR('#1: The \"while\" statement is evaluated as described in the Standard');\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (__evaluated !== 4) {\n\t$ERROR('#2: The \"while\" statement returns (normal, V, empty)');\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n",
+ "id": "S12.6.2_A7"
+ },
+ {
+ "section": "12.6.2",
+ "description": "using eval",
+ "test": "var __condition = 0, __odds=0;\n\n__evaluated = eval(\"while(__condition < 10) { __condition++; if (((''+__condition/2).split('.')).length>1) continue; __odds++;}\");\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__odds !== 5) {\n\t$ERROR('#1: __odds === 5. Actual: __odds ==='+ __odds );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (__evaluated !== 4) {\n\t$ERROR('#2: __evaluated === 4. Actual: __evaluated ==='+ __evaluated );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n",
+ "id": "S12.6.2_A8"
+ },
+ {
+ "section": "12.6.2",
+ "description": "Throwing system exception inside \"while\" loop",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\ntry {\n\twhile(x!=1) {\n\t var x = 1; \n\t abaracadabara;\n\t};\n\t$ERROR('#1: \"abbracadabra\" lead to throwing exception');\n\n} catch (e) {}\n\nif (x !== 1) {\n\t$ERROR('#1.1: while statement evaluates as is, without syntax checks');\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S12.6.2_A9"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/12.6.3.json b/website/resources/scripts/testcases2/12.6.3.json
new file mode 100644
index 000000000..37b156759
--- /dev/null
+++ b/website/resources/scripts/testcases2/12.6.3.json
@@ -0,0 +1,134 @@
+{
+ "testCollection": {
+ "name": "12.6.3",
+ "numTests": 21,
+ "tests": [
+ {
+ "id": "12.6.3_2-3-a-ii-1",
+ "path": "TestCases/chapter12/12.6/12.6.3/12.6.3_2-3-a-ii-1.js",
+ "description": "The for Statement - (normal, V, empty) will be returned when first Expression is an Object with value false",
+ "test": "assertTrue((function testcase() {\n var accessed = false;\n var obj = { value: false };\n for (var i = 0; obj; ) {\n accessed = true;\n break;\n }\n return accessed;\n }).call(this));\n"
+ },
+ {
+ "id": "12.6.3_2-3-a-ii-10",
+ "path": "TestCases/chapter12/12.6/12.6.3/12.6.3_2-3-a-ii-10.js",
+ "description": "The for Statement - (normal, V, empty) will be returned when first Expression is a String object (value is '1')",
+ "test": "assertTrue((function testcase() {\n var accessed = false;\n var strObj = new String(\"1\");\n for (var i = 0; strObj;) {\n accessed = true;\n break;\n }\n return accessed;\n }).call(this));\n"
+ },
+ {
+ "id": "12.6.3_2-3-a-ii-11",
+ "path": "TestCases/chapter12/12.6/12.6.3/12.6.3_2-3-a-ii-11.js",
+ "description": "The for Statement - (normal, V, empty) will be returned when first Expression is undefined",
+ "test": "assertTrue((function testcase() {\n var count = 0;\n for (var i = 0; undefined;) {\n count++;\n }\n return count === 0;\n }).call(this));\n"
+ },
+ {
+ "id": "12.6.3_2-3-a-ii-12",
+ "path": "TestCases/chapter12/12.6/12.6.3/12.6.3_2-3-a-ii-12.js",
+ "description": "The for Statement - (normal, V, empty) will be returned when first Expression is null",
+ "test": "assertTrue((function testcase() {\n var count = 0;\n for (var i = 0; null;) {\n count++;\n }\n return count === 0;\n }).call(this));\n"
+ },
+ {
+ "id": "12.6.3_2-3-a-ii-13",
+ "path": "TestCases/chapter12/12.6/12.6.3/12.6.3_2-3-a-ii-13.js",
+ "description": "The for Statement - (normal, V, empty) will be returned when first Expression is a boolean (value is false)",
+ "test": "assertTrue((function testcase() {\n var count = 0;\n for (var i = 0; false;) {\n count++;\n }\n return count === 0;\n }).call(this));\n"
+ },
+ {
+ "id": "12.6.3_2-3-a-ii-14",
+ "path": "TestCases/chapter12/12.6/12.6.3/12.6.3_2-3-a-ii-14.js",
+ "description": "The for Statement - (normal, V, empty) will be returned when first Expression is a number (value is NaN)",
+ "test": "assertTrue((function testcase() {\n var count = 0;\n for (var i = 0; NaN;) {\n count++;\n }\n return count === 0;\n }).call(this));\n"
+ },
+ {
+ "id": "12.6.3_2-3-a-ii-15",
+ "path": "TestCases/chapter12/12.6/12.6.3/12.6.3_2-3-a-ii-15.js",
+ "description": "The for Statement - (normal, V, empty) will be returned when first Expression is a number (value is +0)",
+ "test": "assertTrue((function testcase() {\n var count = 0;\n for (var i = 0; +0;) {\n count++;\n }\n return count === 0;\n }).call(this));\n"
+ },
+ {
+ "id": "12.6.3_2-3-a-ii-16",
+ "path": "TestCases/chapter12/12.6/12.6.3/12.6.3_2-3-a-ii-16.js",
+ "description": "The for Statement - (normal, V, empty) will be returned when first Expression is a number (value is -0)",
+ "test": "assertTrue((function testcase() {\n var count = 0;\n for (var i = 0; -0;) {\n count++;\n }\n return count === 0;\n }).call(this));\n"
+ },
+ {
+ "id": "12.6.3_2-3-a-ii-17",
+ "path": "TestCases/chapter12/12.6/12.6.3/12.6.3_2-3-a-ii-17.js",
+ "description": "The for Statement - (normal, V, empty) will be returned when first Expression is a number (value is a positive)",
+ "test": "assertTrue((function testcase() {\n var accessed = false;\n for (var i = 0; 2;) {\n accessed = true;\n break;\n }\n return accessed;\n }).call(this));\n"
+ },
+ {
+ "id": "12.6.3_2-3-a-ii-18",
+ "path": "TestCases/chapter12/12.6/12.6.3/12.6.3_2-3-a-ii-18.js",
+ "description": "The for Statement - (normal, V, empty) will be returned when first Expression is a string (value is empty string)",
+ "test": "assertTrue((function testcase() {\n var count = 0;\n for (var i = 0; \"\";) {\n count++;\n }\n return count === 0;\n }).call(this));\n"
+ },
+ {
+ "id": "12.6.3_2-3-a-ii-19",
+ "path": "TestCases/chapter12/12.6/12.6.3/12.6.3_2-3-a-ii-19.js",
+ "description": "The for Statement - (normal, V, empty) will be returned when first Expression is a string (value is 'undefined')",
+ "test": "assertTrue((function testcase() {\n var accessed = false;\n for (var i = 0; \"undefined\";) {\n accessed = true;\n break;\n }\n return accessed;\n }).call(this));\n"
+ },
+ {
+ "id": "12.6.3_2-3-a-ii-2",
+ "path": "TestCases/chapter12/12.6/12.6.3/12.6.3_2-3-a-ii-2.js",
+ "description": "The for Statement - (normal, V, empty) will be returned when first Expression is a Boolean object",
+ "test": "assertTrue((function testcase() {\n var accessed = false;\n var boolObj = new Boolean(false);\n for (var i = 0; boolObj;) {\n accessed = true;\n break;\n }\n return accessed;\n }).call(this));\n"
+ },
+ {
+ "id": "12.6.3_2-3-a-ii-20",
+ "path": "TestCases/chapter12/12.6/12.6.3/12.6.3_2-3-a-ii-20.js",
+ "description": "The for Statement - (normal, V, empty) will be returned when first Expression is a string (value is 'null')",
+ "test": "assertTrue((function testcase() {\n var accessed = false;\n for (var i = 0; \"null\";) {\n accessed = true;\n break;\n }\n return accessed;\n }).call(this));\n"
+ },
+ {
+ "id": "12.6.3_2-3-a-ii-21",
+ "path": "TestCases/chapter12/12.6/12.6.3/12.6.3_2-3-a-ii-21.js",
+ "description": "The for Statement - (normal, V, empty) will be returned when first Expression is a string (value is '1')",
+ "test": "assertTrue((function testcase() {\n var accessed = false;\n for (var i = 0; \"1\";) {\n accessed = true;\n break;\n }\n return accessed;\n }).call(this));\n"
+ },
+ {
+ "id": "12.6.3_2-3-a-ii-3",
+ "path": "TestCases/chapter12/12.6/12.6.3/12.6.3_2-3-a-ii-3.js",
+ "description": "The for Statement - (normal, V, empty) will be returned when first Expression is a Number object (value is NaN)",
+ "test": "assertTrue((function testcase() {\n var accessed = false;\n var numObj = new Number(NaN);\n for (var i = 0; numObj;) {\n accessed = true;\n break;\n }\n return accessed;\n }).call(this));\n"
+ },
+ {
+ "id": "12.6.3_2-3-a-ii-4",
+ "path": "TestCases/chapter12/12.6/12.6.3/12.6.3_2-3-a-ii-4.js",
+ "description": "The for Statement - (normal, V, empty) will be returned when first Expression is a Number object (value is +0)",
+ "test": "assertTrue((function testcase() {\n var accessed = false;\n var numObj = new Number(+0);\n for (var i = 0; numObj;) {\n accessed = true;\n break;\n }\n return accessed;\n }).call(this));\n"
+ },
+ {
+ "id": "12.6.3_2-3-a-ii-5",
+ "path": "TestCases/chapter12/12.6/12.6.3/12.6.3_2-3-a-ii-5.js",
+ "description": "The for Statement - (normal, V, empty) will be returned when first Expression is a Number object (value is -0)",
+ "test": "assertTrue((function testcase() {\n var accessed = false;\n var numObj = new Number(-0);\n for (var i = 0; numObj;) {\n accessed = true;\n break;\n }\n return accessed;\n }).call(this));\n"
+ },
+ {
+ "id": "12.6.3_2-3-a-ii-6",
+ "path": "TestCases/chapter12/12.6/12.6.3/12.6.3_2-3-a-ii-6.js",
+ "description": "The for Statement - (normal, V, empty) will be returned when first Expression is a Number object (value is a positive)",
+ "test": "assertTrue((function testcase() {\n var accessed = false;\n var numObj = new Number(12);\n for (var i = 0; numObj;) {\n accessed = true;\n break;\n }\n return accessed;\n }).call(this));\n"
+ },
+ {
+ "id": "12.6.3_2-3-a-ii-7",
+ "path": "TestCases/chapter12/12.6/12.6.3/12.6.3_2-3-a-ii-7.js",
+ "description": "The for Statement - (normal, V, empty) will be returned when first Expression is a String object (value is empty string)",
+ "test": "assertTrue((function testcase() {\n var accessed = false;\n var strObj = new String(\"\");\n for (var i = 0; strObj;) {\n accessed = true;\n break;\n }\n return accessed;\n }).call(this));\n"
+ },
+ {
+ "id": "12.6.3_2-3-a-ii-8",
+ "path": "TestCases/chapter12/12.6/12.6.3/12.6.3_2-3-a-ii-8.js",
+ "description": "The for Statement - (normal, V, empty) will be returned when first Expression is a String object (value is 'undefined')",
+ "test": "assertTrue((function testcase() {\n var accessed = false;\n var strObj = new String(\"undefined\");\n for (var i = 0; strObj;) {\n accessed = true;\n break;\n }\n return accessed;\n }).call(this));\n"
+ },
+ {
+ "id": "12.6.3_2-3-a-ii-9",
+ "path": "TestCases/chapter12/12.6/12.6.3/12.6.3_2-3-a-ii-9.js",
+ "description": "The for Statement - (normal, V, empty) will be returned when first Expression is a String object (value is 'null')",
+ "test": "assertTrue((function testcase() {\n var accessed = false;\n var strObj = new String(\"null\");\n for (var i = 0; strObj;) {\n accessed = true;\n break;\n }\n return accessed;\n }).call(this));\n"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/12.6.3_The_for_Statement.json b/website/resources/scripts/testcases2/12.6.3_The_for_Statement.json
new file mode 100644
index 000000000..ea92d610f
--- /dev/null
+++ b/website/resources/scripts/testcases2/12.6.3_The_for_Statement.json
@@ -0,0 +1,259 @@
+{
+ "testCollection": {
+ "name": "12.6.3_The_for_Statement",
+ "numTests": 39,
+ "tests": [
+ {
+ "section": "12.6.3",
+ "description": "Breaking an infinite loop by throwing exception",
+ "test": "var __in__for = 0;\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\ntry {\n\tfor (;;){\n //__in__for++;\n if(++__in__for>100)throw 1;\n}\n} catch (e) {\n\tif (e !== 1) {\n\t\t$ERROR('#1: for {;;} is admitted and leads to infinite loop');\n\t}\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (__in__for !== 101) {\n\t$ERROR('#2: __in__for === 101. Actual: __in__for ==='+ __in__for );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n",
+ "id": "S12.6.3_A1"
+ },
+ {
+ "section": "12.6.3",
+ "description": "Checking if executing nested \"var-loops\" nine blocks depth is evaluated properly",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\ntry {\n\t__in__deepest__loop=__in__deepest__loop;\n} catch (e) {\n\t$ERROR('#1: \"__in__deepest__loop=__in__deepest__loop\" does not lead to throwing exception');\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\ntry {\n\tindex0=index0;\n} catch (e) {\n\t$ERROR('#2: \"index0=index0\" does not lead to throwing exception');\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#3\ntry {\n\tindex1=index1;\n} catch (e) {\n\t$ERROR('#3: \"index1=index1\" does not lead to throwing exception');\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#4\ntry {\n\tindex4=index4;\n} catch (e) {\n\t$ERROR('#4: \"index4=index4\" does not lead to throwing exception');\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#5\ntry {\n\tindex5=index5;\n} catch (e) {\n\t$ERROR('#4: \"index5=index5\" does not lead to throwing exception');\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#6\ntry {\n\tindex7=index7;\n} catch (e) {\n\t$ERROR('#6: \"index7=index7\" does not lead to throwing exception');\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#7\ntry {\n\tindex8=index8;\n} catch (e) {\n\t$ERROR('#7: \"index8=index8\" does not lead to throwing exception');\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n__str=\"\";\n\nfor( var index0=0; index0<=1; index0++) {\n\tfor(var index1=0; index1<=index0; index1++) {\n\t\tfor( index2=0; index2<=index1; index2++) {\n\t\t\tfor( index3=0; index3<=index2; index3++) {\n\t\t\t\tfor(var index4=0; index4<=index3; index4++) {\n\t\t\t\t\tfor(var index5=0; index5<=index4; index5++) {\n\t\t\t\t\t\tfor( index6=0; index6<=index5; index6++) {\n\t\t\t\t\t\t\tfor(var index7=0; index7<=index6; index7++) {\n\t\t\t\t\t\t\t\tfor(var index8=0; index8<=index1; index8++) {\n\t\t\t\t\t\t\t\t\tvar __in__deepest__loop;\n\t\t\t\t\t\t\t\t\t__str+=\"\"+index0+index1+index2+index3+index4+index5+index6+index7+index8+'\\n';\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (__str!== \"000000000\\n100000000\\n110000000\\n110000001\\n111000000\\n111000001\\n111100000\\n111100001\\n111110000\\n111110001\\n111111000\\n111111001\\n111111100\\n111111101\\n111111110\\n111111111\\n\") {\n\t$ERROR('#2: __str === \"000000000\\\\n100000000\\\\n110000000\\\\n110000001\\\\n111000000\\\\n111000001\\\\n111100000\\\\n111100001\\\\n111110000\\\\n111110001\\\\n111111000\\\\n111111001\\\\n111111100\\\\n111111101\\\\n111111110\\\\n111111111\\\\n\". Actual: __str ==='+ __str );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S12.6.3_A10.1"
+ },
+ {
+ "section": "12.6.3",
+ "description": "Checking if executing nested \"var-loops\" nine blocks depth is evaluated properly",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#\ntry {\n\t__in__deepest__loop=__in__deepest__loop;\n} catch (e) {\n\t$ERROR('#1: \"__in__deepest__loop=__in__deepest__loop\" does not lead to throwing exception');\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n__str=\"\";\n\nfor( index0=0; index0<=1; index0++) {\n\tfor( index1=0; index1<=index0; index1++) {\n\t\tfor( index2=0; index2<=index1; index2++) {\n\t\t\tfor( index3=0; index3<=index2; index3++) {\n\t\t\t\tfor( index4=0; index4<=index3; index4++) {\n\t\t\t\t\tfor( index5=0; index5<=index4; index5++) {\n\t\t\t\t\t\tfor( index6=0; index6<=index5; index6++) {\n\t\t\t\t\t\t\tfor( index7=0; index7<=index6; index7++) {\n\t\t\t\t\t\t\t\tfor( index8=0; index8<=index1; index8++) {\n\t\t\t\t\t\t\t\t\tvar __in__deepest__loop;\n\t\t\t\t\t\t\t\t\t__str+=\"\"+index0+index1+index2+index3+index4+index5+index6+index7+index8+'\\n';\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (__str!== \"000000000\\n100000000\\n110000000\\n110000001\\n111000000\\n111000001\\n111100000\\n111100001\\n111110000\\n111110001\\n111111000\\n111111001\\n111111100\\n111111101\\n111111110\\n111111111\\n\") {\n\t$ERROR('#2: __str === \"000000000\\\\n100000000\\\\n110000000\\\\n110000001\\\\n111000000\\\\n111000001\\\\n111100000\\\\n111100001\\\\n111110000\\\\n111110001\\\\n111111000\\\\n111111001\\\\n111111100\\\\n111111101\\\\n111111110\\\\n111111111\\\\n\". Actual: __str ==='+ __str );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S12.6.3_A10"
+ },
+ {
+ "section": "12.6.3",
+ "description": "Using \"continue\" in order to continue a loop",
+ "test": "__str=\"\"\n\nfor(var index=0; index<10; index+=1) {\n\tif (index<5)continue;\n\t__str+=index;\n}\n\nif (__str!==\"56789\") {\n\t$ERROR('#1: __str === \"56789\". Actual: __str ==='+ __str );\n}\n",
+ "id": "S12.6.3_A11.1_T1"
+ },
+ {
+ "section": "12.6.3",
+ "description": "Embedded loops",
+ "test": "__str=\"\";\n\nouter : for(var index=0; index<4; index+=1) {\n nested : for(var index_n=0; index_n<=index; index_n++) {\n\tif (index*index_n == 6)continue nested;\n\t__str+=\"\"+index+index_n;\n } \n}\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__str !== \"001011202122303133\") {\n\t$ERROR('#1: __str === \"001011202122303133\". Actual: __str ==='+ __str );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n__str=\"\";\n\nouter : for(var index=0; index<4; index+=1) {\n nested : for(var index_n=0; index_n<=index; index_n++) {\n\tif (index*index_n == 6)continue outer;\n\t__str+=\"\"+index+index_n;\n } \n}\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (__str !== \"0010112021223031\") {\n\t$ERROR('#2: __str === \"0010112021223031\". Actual: __str ==='+ __str );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n__str=\"\";\n\nouter : for(var index=0; index<4; index+=1) {\n nested : for(var index_n=0; index_n<=index; index_n++) {\n\tif (index*index_n == 6)continue ;\n\t__str+=\"\"+index+index_n;\n } \n}\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#3\nif (__str !== \"001011202122303133\") {\n\t$ERROR('#3: __str === \"001011202122303133\". Actual: __str ==='+ __str );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n\n\n",
+ "id": "S12.6.3_A11.1_T2"
+ },
+ {
+ "section": "12.6.3",
+ "description": "Trying to continue non-existent label",
+ "negative": "",
+ "test": "__str=\"\";\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nouter:for(var index=0;index<4;index+=1){\n nested:for(var index_n=0;index_n<=index;index_n++){\n if(index*index_n == 6)continue nonexist;\n __str+=\"\"+index+index_n;\n }\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n\n\n",
+ "id": "S12.6.3_A11.1_T3"
+ },
+ {
+ "section": "12.6.3",
+ "description": "Simple test of continue loop with using \"continue\"",
+ "test": "__str=\"\"\n\nfor(index=0; index<10; index+=1) {\n\tif (index<5)continue;\n\t__str+=index;\n}\n\nif (__str!==\"56789\") {\n\t$ERROR('#1: __str === \"56789\". Actual: __str ==='+ __str );\n}\n",
+ "id": "S12.6.3_A11_T1"
+ },
+ {
+ "section": "12.6.3",
+ "description": "Embedded loops",
+ "test": "__str=\"\";\n\nouter : for(index=0; index<4; index+=1) {\n nested : for(index_n=0; index_n<=index; index_n++) {\n\tif (index*index_n == 6)continue nested;\n\t__str+=\"\"+index+index_n;\n } \n}\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__str !== \"001011202122303133\") {\n\t$ERROR('#1: __str === \"001011202122303133\". Actual: __str ==='+ __str );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n__str=\"\";\n\nouter : for(index=0; index<4; index+=1) {\n nested : for(index_n=0; index_n<=index; index_n++) {\n\tif (index*index_n == 6)continue outer;\n\t__str+=\"\"+index+index_n;\n } \n}\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (__str !== \"0010112021223031\") {\n\t$ERROR('#2: __str === \"0010112021223031\". Actual: __str ==='+ __str );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n__str=\"\";\n\nouter : for(index=0; index<4; index+=1) {\n nested : for(index_n=0; index_n<=index; index_n++) {\n\tif (index*index_n == 6)continue ;\n\t__str+=\"\"+index+index_n;\n } \n}\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#3\nif (__str !== \"001011202122303133\") {\n\t$ERROR('#3: __str === \"001011202122303133\". Actual: __str ==='+ __str );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n\n\n",
+ "id": "S12.6.3_A11_T2"
+ },
+ {
+ "section": "12.6.3",
+ "description": "Trying to continue non-existent label",
+ "negative": "",
+ "test": "__str=\"\";\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#\nouter:for(index=0;index<4;index+=1){\n nested:for(index_n=0;index_n<=index;index_n++){\n if(index*index_n == 6)continue nonexist;\n __str+=\"\"+index+index_n;\n }\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n\n\n",
+ "id": "S12.6.3_A11_T3"
+ },
+ {
+ "section": "12.6.3",
+ "description": "Breaking a loop with \"break\"",
+ "test": "__str=\"\"\n\nfor(var index=0; index<10; index+=1) {\n\tif (index>5)break;\n\t__str+=index;\n}\n\nif (__str!==\"012345\") {\n\t$ERROR('#1: __str === \"012345\". Actual: __str ==='+ __str );\n}\n",
+ "id": "S12.6.3_A12.1_T1"
+ },
+ {
+ "section": "12.6.3",
+ "description": "Embedded loops",
+ "test": "__str=\"\";\n\nouter : for(var index=0; index<4; index+=1) {\n nested : for(var index_n=0; index_n<=index; index_n++) {\n\tif (index*index_n >= 4)break nested;\n\t__str+=\"\"+index+index_n;\n } \n}\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__str !== \"00101120213031\") {\n\t$ERROR('#1: __str === \"00101120213031\". Actual: __str ==='+ __str );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n__str=\"\";\n\nouter : for(var index=0; index<4; index+=1) {\n nested : for(var index_n=0; index_n<=index; index_n++) {\n\tif (index*index_n >= 4)break outer;\n\t__str+=\"\"+index+index_n;\n } \n}\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (__str !== \"0010112021\") {\n\t$ERROR('#2: __str === \"0010112021\". Actual: __str ==='+ __str );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n__str=\"\";\n\nouter : for(var index=0; index<4; index+=1) {\n nested : for(var index_n=0; index_n<=index; index_n++) {\n\tif (index*index_n >= 4)break ;\n\t__str+=\"\"+index+index_n;\n } \n}\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#3\nif (__str !== \"00101120213031\") {\n\t$ERROR('#3: __str === \"00101120213031\". Actual: __str ==='+ __str );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n\n\n",
+ "id": "S12.6.3_A12.1_T2"
+ },
+ {
+ "section": "12.6.3",
+ "description": "Trying to break non-existent label",
+ "negative": "",
+ "test": "__str=\"\";\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nouter:for(var index=0;index<4;index+=1){\n nested:for(var index_n=0;index_n<=index;index_n++){\n if(index*index_n >= 4)break nonexist;\n __str+=\"\"+index+index_n;\n }\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S12.6.3_A12.1_T3"
+ },
+ {
+ "section": "12.6.3",
+ "description": "Breaking a loop with \"break\"",
+ "test": "__str=\"\"\n\nfor(index=0; index<10; index+=1) {\n\tif (index>5)break;\n\t__str+=index;\n}\n\nif (__str!==\"012345\") {\n\t$ERROR('#1:__str === \"012345\". Actual: __str ==='+__str );\n}\n",
+ "id": "S12.6.3_A12_T1"
+ },
+ {
+ "section": "12.6.3",
+ "description": "Embedded loops",
+ "test": "__str=\"\";\n\nouter : for(index=0; index<4; index+=1) {\n nested : for(index_n=0; index_n<=index; index_n++) {\n\tif (index*index_n >= 4)break nested;\n\t__str+=\"\"+index+index_n;\n } \n}\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__str !== \"00101120213031\") {\n\t$ERROR('#1: __str === \"00101120213031\". Actual: __str ==='+ __str );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n__str=\"\";\n\nouter : for(index=0; index<4; index+=1) {\n nested : for(index_n=0; index_n<=index; index_n++) {\n\tif (index*index_n >= 4)break outer;\n\t__str+=\"\"+index+index_n;\n } \n}\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (__str !== \"0010112021\") {\n\t$ERROR('#2: __str === \"0010112021\". Actual: __str ==='+ __str );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n__str=\"\";\n\nouter : for(index=0; index<4; index+=1) {\n nested : for(index_n=0; index_n<=index; index_n++) {\n\tif (index*index_n >= 4)break ;\n\t__str+=\"\"+index+index_n;\n } \n}\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#3\nif (__str !== \"00101120213031\") {\n\t$ERROR('#3: __str === \"00101120213031\". Actual: __str ==='+ __str );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n\n\n",
+ "id": "S12.6.3_A12_T2"
+ },
+ {
+ "section": "12.6.3",
+ "description": "Trying to break non-existent label",
+ "negative": "",
+ "test": "__str=\"\";\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#4\nouter:for(index=0;index<4;index+=1){\n nested:for(index_n=0;index_n<=index;index_n++){\n if(index*index_n >= 4)break nonexist;\n __str+=\"\"+index+index_n;\n }\n};\n//\n//////////////////////////////////////////////////////////////////////////////\n\n\n\n",
+ "id": "S12.6.3_A12_T3"
+ },
+ {
+ "section": "12.6.3",
+ "description": "Declaring variable in \"for\" ExpressionNoIn",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\ntry {\n\tindex = index;\n} catch (e) {\n\t$ERROR('#1: VariableDeclaration in \"var VariableDeclarationListNoIn\" of for IterationStatement is allowed');\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n\nfor(var index=0; index<6; index++) {\n\t;\n}\n",
+ "id": "S12.6.3_A13"
+ },
+ {
+ "section": "12.6.3",
+ "description": "Using +,*,/, as the second Expression",
+ "test": "//CHECK#1\nfor(var i=0;i<10;i++){}\nif (i!==10)\t$ERROR('#1: i === 10. Actual: i ==='+ i );\n\n//CHECK#2\nvar j=0;\nfor(var i=1;i<10;i*=2){\n\tj++;\n}\nif (i!==16) $ERROR('#2.1: i === 16. Actual: i ==='+ i );\nif (j!==4) $ERROR('#2.2: j === 4. Actual: j ==='+ j );\n\n//CHECK#3\nvar j=0;\nfor(var i=16;i>1;i=i/2){\n j++;\n}\nif (i!==1) $ERROR('#3.1: i === 1. Actual: i ==='+ i );\nif (j!==4) $ERROR('#3.2: j === 4. Actual: j ==='+ j );\n\n//CHECK#4\nvar j=0;\nfor(var i=10;i>1;i--){\n j++;\n}\nif (i!==1) $ERROR('#4.1: i === 1. Actual: i ==='+ i );\nif (j!==9) $ERROR('#4.2: j === 9. Actual: j ==='+ j );\n\n//CHECK#5\nvar j=0;\nfor(var i=2;i<10;i*=i){\n j++;\n}\nif (i!==16) $ERROR('#5.1: i === 16. Actual: i ==='+ i );\nif (j!==2) $ERROR('#5.2: j === 2. Actual: j ==='+ j );\n",
+ "id": "S12.6.3_A14"
+ },
+ {
+ "section": "12.6.3",
+ "description": "Statement must be evaluated before second Expression is evaluated",
+ "test": "//CHECK#1\nfor(var i=0;i<10;i++){\n\ti*=2;\n break;\t\n}\nif (i!==0) $ERROR('#1: i === 0. Actual: i ==='+ i );\n\n//CHECK#2\nfor(var i=0;i<10;i++){\n i*=2;\n if (i===3) $ERROR('#2: i !== 3');\n}\n\n",
+ "id": "S12.6.3_A15"
+ },
+ {
+ "section": "12.6.3",
+ "description": "Using \"(function(){throw \"NoInExpression\"})()\" as ExpressionNoIn",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\ntry {\n\tfor((function(){throw \"NoInExpression\"})(); ;(function(){throw \"SecondExpression\"})()) {\n\t\tthrow \"Statement\";\n\t}\n\t$ERROR('#1: (function(){throw \"NoInExpression\"})() lead to throwing exception');\n} catch (e) {\n\tif (e !== \"NoInExpression\") {\n\t\t$ERROR('#2: When for (ExpressionNoIn ; ; Expression) Statement is evaluated NoInExpression evaluates first');\n\t}\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S12.6.3_A2.1"
+ },
+ {
+ "section": "12.6.3",
+ "description": "Using \"(function(){throw \"NoInExpression\"})()\" as ExpressionNoIn",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\ntry {\n\tfor((function(){throw \"NoInExpression\"})();;) {\n\t\tthrow \"Statement\";\n\t}\n\t$ERROR('#1: (function(){throw \"NoInExpression\"})() lead to throwing exception');\n} catch (e) {\n\tif (e !== \"NoInExpression\") {\n\t\t$ERROR('#1: When for (ExpressionNoIn ; ; ) Statement is evaluated NoInExpression evaluates first');\n\t}\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S12.6.3_A2.2"
+ },
+ {
+ "section": "12.6.3",
+ "description": "Using \"(function(){throw \"NoInExpression\"})()\" as ExpressionNoIn",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\ntry {\n\tfor((function(){throw \"NoInExpression\";})(); (function(){throw \"FirstExpression\";})(); (function(){throw \"SecondExpression\";})()) {\n\t\tvar in_for = \"reached\";\n\t}\n\t$ERROR('#1: (function(){throw \"NoInExpression\";})() lead to throwing exception');\n} catch (e) {\n\tif (e !== \"NoInExpression\") {\n\t\t$ERROR('#1: When for (ExpressionNoIn ; Expression ; Expression) Statement is evaluated ExpressionNoIn evaluates first');\n\t}\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (in_for !== undefined) {\n\t$ERROR('#2: in_for === undefined. Actual: in_for ==='+ in_for );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S12.6.3_A2"
+ },
+ {
+ "section": "12.6.3",
+ "description": "Using \"(function(){throw \"FirstExpression\"})()\" as FirstExpression",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\ntry {\n\tfor((function(){__in__NotInExpression__ = \"checked\";__in__NotInExpression__2 = \"passed\";})(); (function(){throw \"FirstExpression\"})(); (function(){throw \"SecondExpression\"})()) {\n\t\t__in__for=\"reached\";\n\t}\n\t$ERROR('#1: (function(){throw \"SecondExpression\"} lead to throwing exception');\n} catch (e) {\n\tif (e !== \"FirstExpression\") {\n\t\t$ERROR('#1: When for (ExpressionNoIn ; FirstExpression ; SecondExpression) Statement is evaluated first evaluates ExpressionNoIn then FirstExpression');\n\t}\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif ((__in__NotInExpression__ !== \"checked\")&(__in__NotInExpression__2!==\"passed\")) {\n\t$ERROR('#2: (__in__NotInExpression__ === \"checked\")&(__in__NotInExpression__2===\"passed\")');\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#3\nif (typeof __in__for !== \"undefined\") {\n\t$ERROR('#3: typeof __in__for === \"undefined\". Actual: typeof __in__for ==='+ typeof __in__for );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S12.6.3_A3"
+ },
+ {
+ "section": "12.6.3",
+ "description": ": Checking if execution of \"for (var a in arr;1;){}\" fails;",
+ "negative": "",
+ "test": "arr = [1,2,3,4,5];\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nfor (var a in arr;1;){\n break;\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n",
+ "id": "S12.6.3_A4.1"
+ },
+ {
+ "section": "12.6.3",
+ "description": ": Checking if execution of \"for (a in arr;1;){}\" fails;",
+ "negative": "",
+ "test": "arr = [1,2,3,4,5];\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nfor (a in arr;1;){\n break;\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n",
+ "id": "S12.6.3_A4_T1"
+ },
+ {
+ "section": "12.6.3",
+ "description": ": Checking if execution of \"for (1 in arr;1;){}\" fails;",
+ "negative": "",
+ "test": "arr = [1,2,3,4,5];\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nfor(1 in arr;1;) {\n break;\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n",
+ "id": "S12.6.3_A4_T2"
+ },
+ {
+ "section": "12.6.3",
+ "description": ": Using eval \"for(eval(\"i in arr\");1;)\";",
+ "test": "arr = [1,2,3,4,5];\ni = 1;\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\ntry {\n\tfor(eval(\"i in arr\");1;) {break;};\t\n} catch (e) {\t\n\t\t$ERROR('#1.1: for(eval(\"i in arr\");1;) {break;}; does not lead to throwing exception');\t\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\ntry {\n\tfor(eval(\"var i = 1 in arr\");1;) {break;};\t\n} catch (e) {\t\n\t\t$ERROR('#2.1: for(eval(\"var i = 1 in arr\");1;) {break;}; does not lead to throwing exception');\t\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#3\ntry {\n\tfor(eval(\"1 in arr\");1;) {break;};\n} catch (e) {\t\n\t\t$ERROR('#3.1: for(eval(\"1 in arr\");1;) {break;}; does not lead to throwing exception');\t\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S12.6.3_A5"
+ },
+ {
+ "section": "12.6.3",
+ "description": ": Using \"(function(){throw \"SecondExpression\";})()\" as an Expression;",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\ntry {\n\tfor(;;(function(){throw \"SecondExpression\";})()){\n var __in__for = \"reached\";\n }\n $ERROR('#1: (function(){throw \"SecondExpression\"}() lead to throwing exception');\n} catch (e) {\n\tif (e !== \"SecondExpression\") {\n\t\t$ERROR('#1: When for ( ; ; Expression) Statement is evaluated Statement evaluates first then Expression evaluates');\n\t}\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (__in__for !== \"reached\") {\n\t$ERROR('#2: __in__for === \"reached\". Actual: __in__for ==='+ __in__for );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S12.6.3_A6"
+ },
+ {
+ "section": "12.6.3",
+ "description": ": Checking if execution of \"for(var index=0; index<10; index++; index--)\" fails;",
+ "negative": "",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nfor(var index=0; index<10; index++; index--);\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S12.6.3_A7.1_T1"
+ },
+ {
+ "section": "12.6.3",
+ "description": ": Checking if execution of \"for(var index=0; index<10; index+=4; index++; index--)\" fails ;",
+ "negative": "",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nfor(var index=0; index<10; index+=4; index++; index--) ;\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S12.6.3_A7.1_T2"
+ },
+ {
+ "section": "12.6.3",
+ "description": ": Checking if execution of \"for(index=0; index<10; index++; index--)\" fails;",
+ "negative": "",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nfor(index=0; index<10; index++; index--) ;\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S12.6.3_A7_T1"
+ },
+ {
+ "section": "12.6.3",
+ "description": ": Checking if execution of \"for(index=0; index<10; index+=4; index++; index--)\" fails ;",
+ "negative": "",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nfor(index=0; index<10; index+=4; index++; index--) ;\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S12.6.3_A7_T2"
+ },
+ {
+ "section": "12.6.3",
+ "description": ": Checking if execution of \"for(var index=0; index<100; {index++; index*2;}) { arr.add(\"\"+index);}\" fails;",
+ "negative": "",
+ "test": "var arr = [];\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nfor(var index=0; index<100; {index++; index*2;}) {\tarr.add(\"\"+index);};\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S12.6.3_A8.1_T1"
+ },
+ {
+ "section": "12.6.3",
+ "description": ": Checking if execution of \"for(var index=0; {index++;index<100;}; index*2;) { arr.add(\"\"+index);}\" fails;",
+ "negative": "",
+ "test": "var arr = [];\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nfor(var index=0; {index++;index<100;}; index*2;) {\tarr.add(\"\"+index);};\n//\n//////////////////////////////////////////////////////////////////////////////\n\n\n\n",
+ "id": "S12.6.3_A8.1_T2"
+ },
+ {
+ "section": "12.6.3",
+ "description": ": Checking if execution of \"for({var index=0; index+=1;} index++<=10; index*2;) { arr.add(\"\"+index);}\" fails;",
+ "negative": "",
+ "test": "var arr = [];\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#3\nfor({var index=0; index+=1;} index++<=10; index*2;) {\tarr.add(\"\"+index);};\n//\n//////////////////////////////////////////////////////////////////////////////\n\n\n\n",
+ "id": "S12.6.3_A8.1_T3"
+ },
+ {
+ "section": "12.6.3",
+ "description": ": Checking if execution of \"for(index=0; index<100; {index++; index*2;}) { arr.add(\"\"+index);}\" fails;",
+ "negative": "",
+ "test": "var arr = [];\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nfor(index=0; index<100; {index++; index*2;}) {\tarr.add(\"\"+index);};\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S12.6.3_A8_T1"
+ },
+ {
+ "section": "12.6.3",
+ "description": ": Checking if execution of \"for(index=0; {index++;index<100;}; index*2;) { arr.add(\"\"+index);}\" fails;",
+ "negative": "",
+ "test": "var arr = [];\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nfor(index=0; {index++;index<100;}; index*2;) {\tarr.add(\"\"+index);};\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S12.6.3_A8_T2"
+ },
+ {
+ "section": "12.6.3",
+ "description": ": Checking if execution of \"for({index=0; index+=1;} index++<=10; index*2;) { arr.add(\"\"+index);}\" fails;",
+ "negative": "",
+ "test": "var arr = [];\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nfor({index=0; index+=1;} index++<=10; index*2;) {\tarr.add(\"\"+index);};\n//\n//////////////////////////////////////////////////////////////////////////////\n\n\n\n",
+ "id": "S12.6.3_A8_T3"
+ },
+ {
+ "section": "12.6.3",
+ "description": "Using eval",
+ "test": "supreme=5;\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#\ntry {\n\tvar __evaluated = eval(\"for(count=0;;) {if (count===supreme)break;else count++; }\");\n\tif (__evaluated !== 4) {\n\t\t$ERROR('#1: __evaluated === 4. Actual: __evaluated ==='+ __evaluated );\n\t}\n} catch (e) {\n\t$ERROR('#1: var __evaluated = eval(\"for(count=0;;) {if (count===supreme)break;else count++; }\"); does not lead to throwing exception');\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S12.6.3_A9.1"
+ },
+ {
+ "section": "12.6.3",
+ "description": "Using eval",
+ "test": "supreme=5;\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#\ntry {\n\tvar __evaluated = eval(\"for(var count=0;;) {if (count===supreme)break;else count++; }\");\n\tif (__evaluated !== 4) {\n\t\t$ERROR('#1: __evaluated === 4. Actual: __evaluated ==='+ __evaluated );\n\t}\n} catch (e) {\n\t$ERROR('#1: var __evaluated = eval(\"for(var count=0;;) {if (count===supreme)break;else count++; }\"); does not lead to throwing exception');\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S12.6.3_A9"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/12.6.4.json b/website/resources/scripts/testcases2/12.6.4.json
new file mode 100644
index 000000000..615502d81
--- /dev/null
+++ b/website/resources/scripts/testcases2/12.6.4.json
@@ -0,0 +1,21 @@
+{
+ "testCollection": {
+ "name": "12.6.4",
+ "numTests": 2,
+ "tests": [
+ {
+ "id": "12.6.4-1",
+ "path": "TestCases/chapter12/12.6/12.6.4/12.6.4-1.js",
+ "description": "The for-in Statement - a property name must not be visited more than once in any enumeration.",
+ "test": "assertTrue((function testcase() {\n var obj = { prop1: \"abc\", prop2: \"bbc\", prop3: \"cnn\" };\n\n var countProp1 = 0;\n var countProp2 = 0;\n var countProp3 = 0;\n\n for (var p in obj) {\n if (obj.hasOwnProperty(p)) {\n if (p === \"prop1\") {\n countProp1++;\n }\n if (p === \"prop2\") {\n countProp2++;\n }\n if (p === \"prop3\") {\n countProp3++;\n }\n }\n }\n return countProp1 === 1 && countProp2 === 1 && countProp3 === 1;\n }).call(this));\n"
+ },
+ {
+ "id": "12.6.4-2",
+ "path": "TestCases/chapter12/12.6/12.6.4/12.6.4-2.js",
+ "description": "The for-in Statement - the values of [[Enumerable]] attributes are not considered when determining if a property of a prototype object is shadowed by a previous object on the prototype chain",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n var proto = {};\n\n Object.defineProperty(proto, \"prop\", {\n value: \"inheritedValue\",\n enumerable: false,\n configurable: true,\n writable: true\n });\n\n var ConstructFun = function () { };\n ConstructFun.prototype = proto;\n\n var child = new ConstructFun();\n\n Object.defineProperty(child, \"prop1\", {\n value: \"overridedValue1\",\n enumerable: false\n });\n Object.defineProperty(child, \"prop2\", {\n value: \"overridedValue2\",\n enumerable: true\n });\n var accessedProp1 = false;\n var accessedProp2 = false;\n\n for (var p in child) {\n if (child.hasOwnProperty(p)) {\n if (p === \"prop1\") {\n accessedProp1 = true;\n }\n if (p === \"prop2\") {\n accessedProp2 = true;\n }\n }\n }\n return !accessedProp1 && accessedProp2 && child.prop1 === \"overridedValue1\" && child.prop2 === \"overridedValue2\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/12.6.4_The_for_in_Statement.json b/website/resources/scripts/testcases2/12.6.4_The_for_in_Statement.json
new file mode 100644
index 000000000..1ca240801
--- /dev/null
+++ b/website/resources/scripts/testcases2/12.6.4_The_for_in_Statement.json
@@ -0,0 +1,120 @@
+{
+ "testCollection": {
+ "name": "12.6.4_The_for_in_Statement",
+ "numTests": 18,
+ "tests": [
+ {
+ "section": "12.6.4",
+ "description": "Checking if execution of \"for(key in undefined)\" passes",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\ntry {\n\tfor(__key in undefined){\n\t var key=__key;\n\t};\n} catch (e) {\n\t$ERROR('#1: \"for(key in undefined){}\" does not lead to throwing exception');\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (key!==undefined) {\n\t$ERROR('#2: key === undefined. Actual: key === '+key);\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n\n",
+ "id": "S12.6.4_A1"
+ },
+ {
+ "section": "12.6.4",
+ "description": "Declaring function within a \"for-in\" Statement",
+ "negative": "",
+ "test": "for(x in this){\n function __func(){};\n};\n",
+ "id": "S12.6.4_A13_T1"
+ },
+ {
+ "section": "12.6.4",
+ "description": "Declaring function within a \"for-in\" Statement that is within a function call",
+ "negative": "",
+ "test": "(function(){\n\nfor(x in this){\n function __func(){};\n};\n\n})();\n",
+ "id": "S12.6.4_A13_T2"
+ },
+ {
+ "section": "12.6.4",
+ "description": "Declaring function within a \"for-in\" Statement that is within function declaration",
+ "negative": "",
+ "test": "function(){\n\nfor(x in this){\n function __func(){};\n};\n\n};\n",
+ "id": "S12.6.4_A13_T3"
+ },
+ {
+ "section": "12.6.4",
+ "description": ": Using \"function __func(){return 0;}\" as Expession;",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#\nfor(x in function __func(){return 0;}){\n if (x==\"prototype\") \n var __reached = 1;\n};\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (__reached !== 1) {\n\t$ERROR('#2: function expession inside of for-in expression is allowed');\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S12.6.4_A14_T1"
+ },
+ {
+ "section": "12.6.4",
+ "description": ": Using \"function __func(){return {a:1};}()\" as Expession;",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#\nfor(x in function __func(){return {a:1};}()){\n var __reached = x;\n};\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (__reached !== \"a\") {\n\t$ERROR('#2: function expession inside of for-in expression allowed');\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S12.6.4_A14_T2"
+ },
+ {
+ "section": "12.6.4",
+ "description": "Using block within \"for-in\" Expression",
+ "negative": "",
+ "test": "var __arr=[1,2,3];\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#\nfor(x in {__arr}){\n break ;\n};\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S12.6.4_A15"
+ },
+ {
+ "section": "12.6.4",
+ "description": "Checking if execution of \"for(key in null)\" passes",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#\ntry {\n\tfor(__key in null){\n\t var key=__key;\n\t};\n} catch (e) {\n\t$ERROR('#1: \"for(__key in null){}\" does not lead to throwing exception');\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (key!==undefined) {\n\t$ERROR('#2: key === undefined. Actual: key ==='+key);\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n\n\n",
+ "id": "S12.6.4_A2"
+ },
+ {
+ "section": "12.6.4",
+ "description": "Using an array as an Expression is appropriate. Here Expression is an array of numbers",
+ "test": "__str=\"\";\n\n__evaluated = eval(\"for(var ind in (arr=[2,1,4,3]))__str+=arr[ind]\");\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__evaluated !== __str) {\n\t$ERROR('#1: __evaluated === __str. Actual: __evaluated ==='+ __evaluated );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (!( (__str.indexOf(\"2\")!==-1)&&(__str.indexOf(\"1\")!==-1)&&(__str.indexOf(\"4\")!==-1)&&(__str.indexOf(\"3\")!==-1) )) {\n\t$ERROR('#2: (__str.indexOf(\"2\")!==-1)&&(__str.indexOf(\"1\")!==-1)&&(__str.indexOf(\"4\")!==-1)&&(__str.indexOf(\"3\")!==-1)');\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n\n\n",
+ "id": "S12.6.4_A3.1"
+ },
+ {
+ "section": "12.6.4",
+ "description": "Using an array as an Expression is appropriate. Here Expression is an array of numbers. Eval is used",
+ "test": "__str=\"\";\n\n__evaluated = eval(\"for(ind in (arr=[2,1,4,3]))__str+=arr[ind]\");\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__evaluated !== __str) {\n\t$ERROR('#1: __evaluated === __str. Actual: __evaluated ==='+ __evaluated );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (!( (__str.indexOf(\"2\")!==-1)&&(__str.indexOf(\"1\")!==-1)&&(__str.indexOf(\"4\")!==-1)&&(__str.indexOf(\"3\")!==-1) )) {\n\t$ERROR('#2: (__str.indexOf(\"2\")!==-1)&&(__str.indexOf(\"1\")!==-1)&&(__str.indexOf(\"4\")!==-1)&&(__str.indexOf(\"3\")!==-1)');\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n\n\n",
+ "id": "S12.6.4_A3"
+ },
+ {
+ "section": "12.6.4",
+ "description": "Using Object as an Expression is appropriate. Eval is used",
+ "test": "__str=\"\";\n\n__evaluated = eval(\"for(var ind in (hash={2:'b',1:'a',4:'d',3:'c'}))__str+=hash[ind]\");\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif ( !( (__evaluated.indexOf(\"a\")!==-1)& (__evaluated.indexOf(\"b\")!==-1)& (__evaluated.indexOf(\"c\")!==-1)&(__evaluated.indexOf(\"d\")!==-1) ) ) {\n\t$ERROR('#1: (__evaluated.indexOf(\"a\")!==-1)& (__evaluated.indexOf(\"b\")!==-1)& (__evaluated.indexOf(\"c\")!==-1)&(__evaluated.indexOf(\"d\")!==-1)');\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (__str !== __evaluated) {\n\t$ERROR('#2: __str === __evaluated. Actual: __str ==='+ __str );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n\n\n\n",
+ "id": "S12.6.4_A4.1"
+ },
+ {
+ "section": "12.6.4",
+ "description": "Using Object as an Expression is appropriate. Eval is used",
+ "test": "__str=\"\";\n\n__evaluated = eval(\"for(ind in (hash={2:'b',1:'a',4:'d',3:'c'}))__str+=hash[ind]\");\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif ( !( (__evaluated.indexOf(\"a\")!==-1)& (__evaluated.indexOf(\"b\")!==-1)& (__evaluated.indexOf(\"c\")!==-1)&(__evaluated.indexOf(\"d\")!==-1) ) ) {\n\t$ERROR('#1: (__evaluated.indexOf(\"a\")!==-1)& (__evaluated.indexOf(\"b\")!==-1)& (__evaluated.indexOf(\"c\")!==-1)&(__evaluated.indexOf(\"d\")!==-1)');\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (__str !== __evaluated) {\n\t$ERROR('#2: __str === __evaluated. Actual: __str ==='+ __str );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n\n\n\n",
+ "id": "S12.6.4_A4"
+ },
+ {
+ "section": "12.6.4",
+ "description": "Using hierarchical Object as an Expression is appropriate. The depth is two",
+ "test": "__hash__map={a:{aa:1,ab:2,ac:3,ad:4},b:{ba:1,bb:2,bc:3,bd:4},c:{ca:1,cb:2,cc:3,cd:4},d:{da:1,db:2,dc:3,dd:4}};\n\n__arr = \"\";\n\nfor(var __key in __hash__map){\n for (var __ind in __hash__map[__key]){\n __arr+=(\"\" + __ind + __hash__map[__key][__ind]);\n }\n}\n\nif(!(\n(__arr.indexOf(\"aa1\")!==-1)&\n(__arr.indexOf(\"ab2\")!==-1)&\n(__arr.indexOf(\"ac3\")!==-1)&\n(__arr.indexOf(\"ad4\")!==-1)&\n(__arr.indexOf(\"ba1\")!==-1)&\n(__arr.indexOf(\"bb2\")!==-1)&\n(__arr.indexOf(\"bc3\")!==-1)&\n(__arr.indexOf(\"bd4\")!==-1)&\n(__arr.indexOf(\"ca1\")!==-1)&\n(__arr.indexOf(\"cb2\")!==-1)&\n(__arr.indexOf(\"cc3\")!==-1)&\n(__arr.indexOf(\"cd4\")!==-1)&\n(__arr.indexOf(\"da1\")!==-1)&\n(__arr.indexOf(\"db2\")!==-1)&\n(__arr.indexOf(\"dc3\")!==-1)&\n(__arr.indexOf(\"dd4\")!==-1)\n)) $ERROR('#1: The nested for-in Statement applied to hierarchial object works properly as described in the Standard');\n\n\n\n",
+ "id": "S12.6.4_A5.1"
+ },
+ {
+ "section": "12.6.4",
+ "description": "Using hierarchical Object as an Expression is appropriate. The depth is two",
+ "test": "__hash__map={a:{aa:1,ab:2,ac:3,ad:4},b:{ba:1,bb:2,bc:3,bd:4},c:{ca:1,cb:2,cc:3,cd:4},d:{da:1,db:2,dc:3,dd:4}};\n\n__arr = \"\";\n\nfor(__key in __hash__map){\n for (__ind in __hash__map[__key]){\n __arr+=(\"\" + __ind + __hash__map[__key][__ind]);\n }\n}\n\nif(!(\n(__arr.indexOf(\"aa1\")!==-1)&\n(__arr.indexOf(\"ab2\")!==-1)&\n(__arr.indexOf(\"ac3\")!==-1)&\n(__arr.indexOf(\"ad4\")!==-1)&\n(__arr.indexOf(\"ba1\")!==-1)&\n(__arr.indexOf(\"bb2\")!==-1)&\n(__arr.indexOf(\"bc3\")!==-1)&\n(__arr.indexOf(\"bd4\")!==-1)&\n(__arr.indexOf(\"ca1\")!==-1)&\n(__arr.indexOf(\"cb2\")!==-1)&\n(__arr.indexOf(\"cc3\")!==-1)&\n(__arr.indexOf(\"cd4\")!==-1)&\n(__arr.indexOf(\"da1\")!==-1)&\n(__arr.indexOf(\"db2\")!==-1)&\n(__arr.indexOf(\"dc3\")!==-1)&\n(__arr.indexOf(\"dd4\")!==-1)\n)) $ERROR('#1: The nested for-in Statement applied to hierarchial object works properly as described in the Standard');\n\n\n\n",
+ "id": "S12.6.4_A5"
+ },
+ {
+ "section": "12.6.4",
+ "description": "Using Object with custom prototype as an Expression is appropriate. The prototype is \"{feat:2,hint:\"protohint\"}\"",
+ "test": "function FACTORY(){this.prop=1;this.hint=\"hinted\"};\n\nFACTORY.prototype = {feat:2,hint:\"protohint\"};\n\nvar __instance = new FACTORY;\n\n__accum=\"\";\n\nfor (var key in __instance){\n\t__accum+=(key + __instance[key]);\n}\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (!((__accum.indexOf(\"prop1\")!==-1)&&(__accum.indexOf(\"feat2\")!==-1)&&(__accum.indexOf(\"hinthinted\")!==-1))) {\n\t$ERROR('#1: (__accum.indexOf(\"prop1\")!==-1)&&(__accum.indexOf(\"feat2\")!==-1)&&(__accum.indexOf(\"hinthinted\")!==-1)');\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (__accum.indexOf(\"hintprotohint\")!==-1) {\n\t$ERROR('#2: __accum.indexOf(\"hintprotohint\") === -1. Actual: __accum.indexOf(\"hintprotohint\") ==='+ __accum.indexOf(\"hintprotohint\") );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S12.6.4_A6.1"
+ },
+ {
+ "section": "12.6.4",
+ "description": "Using Object with custom prototype as an Expression is appropriate. The prototype is \"{feat:2,hint:\"protohint\"}\"",
+ "test": "function FACTORY(){this.prop=1;this.hint=\"hinted\"};\n\nFACTORY.prototype = {feat:2,hint:\"protohint\"};\n\nvar __instance = new FACTORY;\n\n__accum=\"\";\n\nfor (key in __instance){\n\t__accum+=(key + __instance[key]);\n}\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (!((__accum.indexOf(\"prop1\")!==-1)&&(__accum.indexOf(\"feat2\")!==-1)&&(__accum.indexOf(\"hinthinted\")!==-1))) {\n\t$ERROR('#1: (__accum.indexOf(\"prop1\")!==-1)&&(__accum.indexOf(\"feat2\")!==-1)&&(__accum.indexOf(\"hinthinted\")!==-1)');\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (__accum.indexOf(\"hintprotohint\")!==-1) {\n\t$ERROR('#2: __accum.indexOf(\"hintprotohint\") === -1. Actual: __accum.indexOf(\"hintprotohint\") ==='+ __accum.indexOf(\"hintprotohint\") );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S12.6.4_A6"
+ },
+ {
+ "section": "12.6.4",
+ "description": "Checking \"for (LeftHandSideExpression in Expression) Statement\" case",
+ "test": "__obj={aa:1,ba:2,ca:3};\n\n__accum=\"\";\n\nfor (__key in __obj){\n\t\n erasator_T_1000(__obj,\"b\");\n \n\t__accum+=(__key+__obj[__key]);\n\t\n}\n\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (!((__accum.indexOf(\"aa1\")!==-1)&&(__accum.indexOf(\"ca3\")!==-1))) {\n\t$ERROR('#1: (__accum.indexOf(\"aa1\")!==-1)&&(__accum.indexOf(\"ca3\")!==-1)');\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (__accum.indexOf(\"ba2\")!==-1) {\n\t$ERROR('#2: __accum.indexOf(\"ba2\") === -1. Actual: __accum.indexOf(\"ba2\") ==='+ __accum.indexOf(\"ba2\") );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n\n// erasator is the hash map terminator\nfunction erasator_T_1000(hash_map, charactr){\n\tfor (key in hash_map){\n\t\tif (key.indexOf(charactr)===0) {\n\t\t\tdelete hash_map[key];\n\t\t};\n\t}\n}\n",
+ "id": "S12.6.4_A7_T1"
+ },
+ {
+ "section": "12.6.4",
+ "description": "Checking \"for (var VariableDeclarationNoIn in Expression) Statement\" case",
+ "test": "__obj={aa:1,ba:2,ca:3};\n\n__accum=\"\";\n\nfor (var __key in __obj){\n\t\n erasator_T_1000(__obj,\"b\");\n \n\t__accum+=(__key+__obj[__key]);\n\t\n}\n\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (!((__accum.indexOf(\"aa1\")!==-1)&&(__accum.indexOf(\"ca3\")!==-1))) {\n\t$ERROR('#1: (__accum.indexOf(\"aa1\")!==-1)&&(__accum.indexOf(\"ca3\")!==-1)');\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (__accum.indexOf(\"ba2\")!==-1) {\n\t$ERROR('#2: __accum.indexOf(\"ba2\") === -1. Actual: __accum.indexOf(\"ba2\") ==='+ __accum.indexOf(\"ba2\") );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n\n// erasator is the hash map terminator\nfunction erasator_T_1000(hash_map, charactr){\n\tfor (key in hash_map){\n\t\tif (key.indexOf(charactr)===0) {\n\t\t\tdelete hash_map[key];\n\t\t};\n\t}\n}\n",
+ "id": "S12.6.4_A7_T2"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/12.7.json b/website/resources/scripts/testcases2/12.7.json
new file mode 100644
index 000000000..70418b285
--- /dev/null
+++ b/website/resources/scripts/testcases2/12.7.json
@@ -0,0 +1,14 @@
+{
+ "testCollection": {
+ "name": "12.7",
+ "numTests": 1,
+ "tests": [
+ {
+ "id": "12.7-1",
+ "path": "TestCases/chapter12/12.7/12.7-1.js",
+ "description": "The continue Statement - a continue statement without an identifier may have a LineTerminator before the semi-colon",
+ "test": "assertTrue((function testcase() {\n var sum = 0;\n for (var i = 1; i <= 10; i++) {\n continue\n ;\n sum += i;\n }\n return sum === 0;\n }).call(this));\n"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/12.7_The_continue_Statement.json b/website/resources/scripts/testcases2/12.7_The_continue_Statement.json
new file mode 100644
index 000000000..f4eabf50b
--- /dev/null
+++ b/website/resources/scripts/testcases2/12.7_The_continue_Statement.json
@@ -0,0 +1,126 @@
+{
+ "testCollection": {
+ "name": "12.7_The_continue_Statement",
+ "numTests": 18,
+ "tests": [
+ {
+ "section": "12.7",
+ "description": "Checking if execution of single \"continue\" without any IterationStatement fails",
+ "negative": "",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nvar x=1;\ncontinue;\nvar y=2;\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S12.7_A1_T1"
+ },
+ {
+ "section": "12.7",
+ "description": "Checking if single \"continue\" with Label but without any IterationStatement fails",
+ "negative": "",
+ "test": "LABEL : x=3.14;\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nvar x=1;\ncontinue LABEL;\nvar y=2;\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S12.7_A1_T2"
+ },
+ {
+ "section": "12.7",
+ "description": "Checking if laballed \"continue\" with no IterationStatement, placed into a block, fails",
+ "negative": "",
+ "test": "LABEL : x=3.14;\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\n{\n var x=1;\n continue LABEL;\n var y=2;\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S12.7_A1_T3"
+ },
+ {
+ "section": "12.7",
+ "description": "Checking if execution of \"continue\" with no IterationStatement, placed into a block, fails",
+ "negative": "",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\n{\n var x=1;\n continue;\n var y=2;\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n",
+ "id": "S12.7_A1_T4"
+ },
+ {
+ "section": "12.7",
+ "description": "Checking by using eval, inserting LineTerminator between continue and Identifier",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\ntry{\n\teval(\"FOR1 : for(var i=1;i<2;i++){FOR1NESTED : for(var j=1;j<2;j++) { continue\\u000AFOR1; } while(0);}\");\n\tif (j!==2) {\n\t\t$ERROR('#1: Since LineTerminator(U-000A) between continue and Identifier not allowed continue evaluates without label');\n\t}\n} catch(e){\n\t$ERROR('#1.1: eval(\"FOR1 : for(var i=1;i<2;i++){FOR1NESTED : for(var j=1;j<2;j++) { continue\\\\u000AFOR1; } while(0);}\") does not lead to throwing exception');\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\ntry{\n\teval(\"FOR2 : for(var i=1;i<2;i++){FOR2NESTED : for(var j=1;j<2;j++) { continue\\u000DFOR2; } while(0);}\");\n\tif (j!==2) {\n\t\t$ERROR('#2: Since LineTerminator(U-000D) between continue and Identifier not allowed continue evaluates without label');\n\t}\n} catch(e){\n\t$ERROR('#2.1: eval(\"FOR2 : for(var i=1;i<2;i++){FOR2NESTED : for(var j=1;j<2;j++) { continue\\\\u000DFOR2; } while(0);}\") does not lead to throwing exception');\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#3\ntry{\n\teval(\"FOR3 : for(var i=1;i<2;i++){FOR3NESTED : for(var j=1;j<2;j++) { continue\\u2028FOR3; } while(0);}\");\n\tif (j!==2) {\n\t\t$ERROR('#3: Since LineTerminator(U-2028) between continue and Identifier not allowed continue evaluates without label');\n\t}\n} catch(e){\n\t$ERROR('#3.1: eval(\"FOR3 : for(var i=1;i<2;i++){FOR3NESTED : for(var j=1;j<2;j++) { continue\\\\u2028FOR3; } while(0);}\") does not lead to throwing exception');\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#4\ntry{\n\teval(\"FOR4 : for(var i=1;i<2;i++){FOR4NESTED : for(var j=1;j<2;j++) { continue\\u2029FOR4; } while(0);}\");\n\tif (j!==2) {\n\t\t$ERROR('#4: Since LineTerminator(U-2029) between continue and Identifier not allowed continue evaluates without label');\n\t}\n} catch(e){\n\t$ERROR('#4.1: eval(\"FOR4 : for(var i=1;i<2;i++){FOR4NESTED : for(var j=1;j<2;j++) { continue\\\\u2029FOR4; } while(0);}\"); does not lead to throwing exception');\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n\n",
+ "id": "S12.7_A2"
+ },
+ {
+ "section": "12.7",
+ "description": "Simple using continue without Identifier and labeled loop",
+ "test": "LABEL_OUT : var x=0, y=0;\n\nLABEL_DO_LOOP : do {\n LABEL_IN : x=2;\n continue ;\n LABEL_IN_2 : var y=2;\n \n function IN_DO_FUNC(){}\n} while(0);\n\nLABEL_ANOTHER_LOOP : do {\n ;\n} while(0);\n\nfunction OUT_FUNC(){}\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif ((x!==2)&&(y!==0)) {\n\t$ERROR('#1: x === 2 and y === 0. Actual: x ==='+x+' and y ==='+ y );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S12.7_A3"
+ },
+ {
+ "section": "12.7",
+ "description": "Simple using continue Identifier construction",
+ "test": "LABEL_OUT : var x=0, y=0;\n\nLABEL_DO_LOOP : do {\n LABEL_IN : x++;\n if(x===10)break;\n continue LABEL_DO_LOOP;\n LABEL_IN_2 : y++;\n \n function IN_DO_FUNC(){}\n} while(0);\n\nLABEL_ANOTHER_LOOP : do {\n ;\n} while(0);\n\nfunction OUT_FUNC(){}\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif ((x!==1)&&(y!==0)) {\n\t$ERROR('#1: x===1 and y === 0. Actual: x==='+x+' and y ==='+y);\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S12.7_A4_T1"
+ },
+ {
+ "section": "12.7",
+ "description": "Using embedded and labeled loops, continue to nested loop",
+ "test": "LABEL_OUT : var x=0, y=0, xx=0, yy=0;\n\nLABEL_DO_LOOP : do {\n LABEL_IN : x++;\n if(x===10)break;\n LABEL_NESTED_LOOP : do {\n LABEL_IN_NESTED : xx++;\n if(xx===10)break;\n continue LABEL_NESTED_LOOP;\n LABEL_IN_NESTED_2 : yy++;\n } while (0);\n \n LABEL_IN_2 : y++;\n \n function IN_DO_FUNC(){}\n} while(0);\n\nLABEL_ANOTHER_LOOP : do {\n ;\n} while(0);\n\nfunction OUT_FUNC(){}\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif ((x!==1)&&(y!==1)&&(xx!==1)&(yy!==0)) {\n\t$ERROR('#1: (x===1) and (y===1) and (xx===1) and (yy===0). Actual: x==='+x+' and y==='+y+' and xx==='+xx+' and yy==='+yy );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S12.7_A4_T2"
+ },
+ {
+ "section": "12.7",
+ "description": "Using embedded and labeled loops, continue to outer loop",
+ "test": "LABEL_OUT : var x=0, y=0, xx=0, yy=0;\n\nLABEL_DO_LOOP : do {\n LABEL_IN : x++;\n if(x===10)break;\n LABEL_NESTED_LOOP : do {\n LABEL_IN_NESTED : xx++;\n if(xx===10)break;\n continue LABEL_DO_LOOP;\n LABEL_IN_NESTED_2 : yy++;\n } while (0);\n \n LABEL_IN_2 : y++;\n \n function IN_DO_FUNC(){}\n} while(0);\n\nLABEL_ANOTHER_LOOP : do {\n ;\n} while(0);\n\nfunction OUT_FUNC(){}\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif ((x!==1)&&(y!==0)&&(xx!==1)&(yy!==0)) {\n\t$ERROR('#1: (x===1) and (y===0) and (xx===1) and (yy===0). Actual: x==='+x+' and y==='+y+' and xx==='+xx+' and yy==='+yy );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S12.7_A4_T3"
+ },
+ {
+ "section": "12.7",
+ "description": "Trying to continue another labeled loop",
+ "negative": "",
+ "test": "LABEL_OUT : var x=0, y=0;\nLABEL_DO_LOOP : do {\n LABEL_IN : x++;\n if(x===10)break;\n continue LABEL_ANOTHER_LOOP;\n LABEL_IN_2 : y++;\n function IN_DO_FUNC(){}\n} while(0);\n\nLABEL_ANOTHER_LOOP : do {\n ;\n} while(0);\n\nfunction OUT_FUNC(){}\n",
+ "id": "S12.7_A5_T1"
+ },
+ {
+ "section": "12.7",
+ "description": "Identifier is a function name",
+ "negative": "",
+ "test": "LABEL_OUT : var x=0, y=0;\nLABEL_DO_LOOP : do {\n LABEL_IN : x++;\n if(x===10)break;\n continue IN_DO_FUNC;\n LABEL_IN_2 : y++;\n function IN_DO_FUNC(){}\n} while(0);\n\nLABEL_ANOTHER_LOOP : do {\n ;\n} while(0);\n\nfunction OUT_FUNC(){};\n",
+ "id": "S12.7_A5_T2"
+ },
+ {
+ "section": "12.7",
+ "description": "Identifier is within loop label",
+ "negative": "",
+ "test": "LABEL_OUT : var x=0, y=0;\n\nLABEL_DO_LOOP : do {\n LABEL_IN : x++;\n if(x===10)break;\n continue LABEL_IN;\n LABEL_IN_2 : y++;\n function IN_DO_FUNC(){}\n} while(0);\n\nLABEL_ANOTHER_LOOP : do {\n ;\n} while(0);\n\nfunction OUT_FUNC(){}\n",
+ "id": "S12.7_A5_T3"
+ },
+ {
+ "section": "12.7",
+ "description": "Using labaled \"continue Identifier\" within a function body",
+ "negative": "",
+ "test": "var x=0,y=0;\n\nLABEL1 : do {\n x++;\n (function(){continue LABEL1;})();\n y++;\n} while(0);\n",
+ "id": "S12.7_A6"
+ },
+ {
+ "section": "12.7",
+ "description": "Using eval \"eval(\"continue LABEL1\")\"",
+ "test": "var x=0,y=0;\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\ntry{\n\tLABEL1 : do {\n x++;\n eval(\"continue LABEL1\");\n y++;\n } while(0);\n\t$ERROR('#1: eval(\"continue LABEL1\") does not lead to throwing exception');\n} catch(e){\n\tif(!(e instanceof SyntaxError)){\n\t\t$ERROR(\"1.1: Appearing of continue within eval statement inside of IterationStatement yields SyntaxError\");\n\t}\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S12.7_A7"
+ },
+ {
+ "section": "12.7",
+ "description": "Checking if execution of \"continue Identifier\" within catch Block fails",
+ "negative": "",
+ "test": "var x=0,y=0;\n\ntry{\n\tLABEL1 : do {\n\t\tx++;\n\t\tthrow \"gonna leave it\";\n\t\ty++;\n\t} while(0);\n\t$ERROR('#1: throw \"gonna leave it\" lead to throwing exception');\n} catch(e){\n\tcontinue LABEL2;\n\tLABEL2 : do {\n\t\tx++;\n\t\ty++;\n\t} while(0);\n};\n",
+ "id": "S12.7_A8_T1"
+ },
+ {
+ "section": "12.7",
+ "description": "Checking if execution of \"continue\" within catch Block fails",
+ "negative": "",
+ "test": "var x=0,y=0;\n\ntry{\n\tLABEL1 : do {\n\t\tx++;\n\t\tthrow \"gonna leave it\";\n\t\ty++;\n\t} while(0);\n\t$ERROR('#1: throw \"gonna leave it\" lead to throwing exception');\n} catch(e){\n\tcontinue;\n\tLABEL2 : do {\n\t\tx++;\n\t\ty++;\n\t} while(0);\n};\n",
+ "id": "S12.7_A8_T2"
+ },
+ {
+ "section": "12.7",
+ "description": "Using \"continue Identifier\" within catch Block that is within a loop",
+ "test": "var x=0,y=0;\n\n(function(){\nFOR : for(;;){\n\ttry{\n\t\tx++;\n\t\tif(x===10)return;\n\t\tthrow 1;\n\t} catch(e){\n\t\tcontinue FOR;\n\t}\t\n}\n})();\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (x!==10) {\n\t$ERROR('#1: Continue inside of try-catch nested in loop is allowed');\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S12.7_A9_T1"
+ },
+ {
+ "section": "12.7",
+ "description": "Using \"continue\" within catch Block that is within a loop",
+ "test": "var x=0,y=0;\n\n(function(){\nFOR : for(;;){\n\ttry{\n\t\tx++;\n\t\tif(x===10)return;\n\t\tthrow 1;\n\t} catch(e){\n\t\tcontinue;\n\t}\t\n}\n})();\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (x!==10) {\n\t$ERROR('#1: Continue inside of try-catch nested in loop is allowed');\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S12.7_A9_T2"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/12.8.json b/website/resources/scripts/testcases2/12.8.json
new file mode 100644
index 000000000..97b844fb3
--- /dev/null
+++ b/website/resources/scripts/testcases2/12.8.json
@@ -0,0 +1,14 @@
+{
+ "testCollection": {
+ "name": "12.8",
+ "numTests": 1,
+ "tests": [
+ {
+ "id": "12.8-1",
+ "path": "TestCases/chapter12/12.8/12.8-1.js",
+ "description": "The break Statement - a break statement without an identifier may have a LineTerminator before the semi-colon",
+ "test": "assertTrue((function testcase() {\n var sum = 0;\n for (var i = 1; i <= 10; i++) {\n if (i === 6) {\n break\n ;\n }\n sum += i;\n }\n return sum === 15;\n }).call(this));\n"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/12.8_The_break_Statement.json b/website/resources/scripts/testcases2/12.8_The_break_Statement.json
new file mode 100644
index 000000000..7e71cbba0
--- /dev/null
+++ b/website/resources/scripts/testcases2/12.8_The_break_Statement.json
@@ -0,0 +1,126 @@
+{
+ "testCollection": {
+ "name": "12.8_The_break_Statement",
+ "numTests": 18,
+ "tests": [
+ {
+ "section": "12.8",
+ "description": "Checking if break statement with no loop fails",
+ "negative": "",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nvar x=1;\nbreak;\nvar y=2;\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S12.8_A1_T1"
+ },
+ {
+ "section": "12.8",
+ "description": "Checking if break Identifier with no loop fails",
+ "negative": "",
+ "test": "LABEL : x=3.14;\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nvar x=1;\nbreak LABEL;\nvar y=2;\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S12.8_A1_T2"
+ },
+ {
+ "section": "12.8",
+ "description": "Checking if break statement with no loop, placed into a block, fails",
+ "negative": "",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\n{\n var x=1;\n break;\n var y=2;\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S12.8_A1_T3"
+ },
+ {
+ "section": "12.8",
+ "description": "Checking if break Identifier with no loop, placed into a block, fails",
+ "negative": "",
+ "test": "LABEL : x=3.14;\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\n{\n var x=1;\n break LABEL;\n var y=2;\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S12.8_A1_T4"
+ },
+ {
+ "section": "12.8",
+ "description": "Checking by using eval, inserting LineTerminator between break and Identifier",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\ntry{\n\teval(\"FOR1 : for(var i=1;i<2;i++){ LABEL1 : do {var x =1;break\\u000AFOR1;var y=2;} while(0);}\");\n\tif (i!==2) {\n\t\t$ERROR('#1: Since LineTerminator(U-000A) between break and Identifier not allowed break evaluates without label');\n\t}\n} catch(e){\n\t$ERROR('#1.1: eval(\"FOR1 : for(var i=1;i<2;i++){ LABEL1 : do {var x =1;break\\\\u000AFOR1;var y=2;} while(0);}\") does not lead to throwing exception');\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\ntry{\n\teval(\"FOR2 : for(var i=1;i<2;i++){ LABEL2 : do {var x =1;break\\u000DFOR2;var y=2;} while(0);}\");\n\tif (i!==2) {\n\t\t$ERROR('#2: Since LineTerminator(U-000D) between break and Identifier not allowed break evaluates without label');\n\t}\n} catch(e){\n\t$ERROR('#2.1: eval(\"FOR2 : for(var i=1;i<2;i++){ LABEL2 : do {var x =1;break\\\\u000DFOR2;var y=2;} while(0);}\") does not lead to throwing exception');\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#3\ntry{\n\teval(\"FOR3 : for(var i=1;i<2;i++){ LABEL3 : do {var x =1;break\\u2028FOR3;var y=2;} while(0);}\");\n\tif (i!==2) {\n\t\t$ERROR('#3: Since LineTerminator(U-2028) between break and Identifier not allowed break evaluates without label');\n\t}\n} catch(e){\n\t$ERROR('#3.1: eval(\"FOR3 : for(var i=1;i<2;i++){ LABEL3 : do {var x =1;break\\\\u2028FOR3;var y=2;} while(0);}\") does not lead to throwing exception');\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#4\ntry{\n\teval(\"FOR4 : for(var i=1;i<2;i++){ LABEL4 : do {var x =1;break\\u2029FOR4;var y=2;} while(0);}\");\n\tif (i!==2) {\n\t\t$ERROR('#4: Since LineTerminator(U-2029) between break and Identifier not allowed break evaluates without label');\n\t}\n} catch(e){\n\t$ERROR('#4.1: eval(\"FOR4 : for(var i=1;i<2;i++){ LABEL4 : do {var x =1;break\\\\u2029FOR4;var y=2;} while(0);}\") does not lead to throwing exception');\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n\n",
+ "id": "S12.8_A2"
+ },
+ {
+ "section": "12.8",
+ "description": "Using \"break\" without Identifier within labeled loop",
+ "test": "LABEL_OUT : var x=0, y=0;\n\nLABEL_DO_LOOP : do {\n LABEL_IN : x=2;\n break ;\n LABEL_IN_2 : var y=2;\n \n function IN_DO_FUNC(){}\n} while(0);\n\nLABEL_ANOTHER_LOOP : do {\n ;\n} while(0);\n\nfunction OUT_FUNC(){}\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif ((x!==2)&&(y!==0)) {\n\t$ERROR('#1: x === 2 and y === 0. Actual: x ==='+x+' and y ==='+y);\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S12.8_A3"
+ },
+ {
+ "section": "12.8",
+ "description": "Using \"break Identifier\" within labaeled loop",
+ "test": "LABEL_OUT : var x=0, y=0;\n(function(){\nLABEL_DO_LOOP : do {\n LABEL_IN : x++;\n if(x===10)return;\n break LABEL_DO_LOOP;\n LABEL_IN_2 : y++;\n \n function IN_DO_FUNC(){}\n} while(0);\n\nLABEL_ANOTHER_LOOP : do {\n ;\n} while(0);\n\nfunction OUT_FUNC(){}\n})();\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif ((x!==1)&&(y!==0)) {\n\t$ERROR('#1: x === 1 and y === 0. Actual: x === '+x+' and y ==='+ y );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S12.8_A4_T1"
+ },
+ {
+ "section": "12.8",
+ "description": "Using embedded and labeled loops, breaking to nested loop",
+ "test": "LABEL_OUT : var x=0, y=0, xx=0, yy=0;\n(function(){\nLABEL_DO_LOOP : do {\n LABEL_IN : x++;\n if(x===10)return;\n LABEL_NESTED_LOOP : do {\n LABEL_IN_NESTED : xx++;\n if(xx===10)return;\n break LABEL_NESTED_LOOP;\n LABEL_IN_NESTED_2 : yy++;\n } while (0);\n \n LABEL_IN_2 : y++;\n \n function IN_DO_FUNC(){}\n} while(0);\n\nLABEL_ANOTHER_LOOP : do {\n ;\n} while(0);\n\nfunction OUT_FUNC(){}\n})();\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif ((x!==1)&&(y!==1)&&(xx!==1)&(yy!==0)) {\n\t$ERROR('#1: x === 1 and y === 1 and xx === 1 and yy === 0. Actual: x==='+x+' and y==='+y+' and xx==='+xx+' and yy==='+yy );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S12.8_A4_T2"
+ },
+ {
+ "section": "12.8",
+ "description": "Using embedded and labeled loops, breaking to outer loop",
+ "test": "LABEL_OUT : var x=0, y=0, xx=0, yy=0;\n(function(){\nLABEL_DO_LOOP : do {\n LABEL_IN : x++;\n if(x===10)return;\n LABEL_NESTED_LOOP : do {\n LABEL_IN_NESTED : xx++;\n if(xx===10)return;\n break LABEL_DO_LOOP;\n LABEL_IN_NESTED_2 : yy++;\n } while (0);\n \n LABEL_IN_2 : y++;\n \n function IN_DO_FUNC(){}\n} while(0);\n\nLABEL_ANOTHER_LOOP : do {\n ;\n} while(0);\n\nfunction OUT_FUNC(){}\n})();\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif ((x!==1)&&(y!==0)&&(xx!==1)&(yy!==0)) {\n\t$ERROR('#1: x === 1 and y === 0 and xx === 1 and yy === 0. Actual: x==='+x+' and y==='+y+' and xx==='+xx+' and yy==='+yy );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S12.8_A4_T3"
+ },
+ {
+ "section": "12.8",
+ "description": "Checking if breaking another labeled loop fails",
+ "negative": "",
+ "test": "(function(){\n LABEL_OUT : var x=0, y=0;\n LABEL_DO_LOOP : do {\n LABEL_IN : x++;\n if(x===10)\n return;\n break LABEL_ANOTHER_LOOP;\n LABEL_IN_2 : y++;\n function IN_DO_FUNC(){}\n } while(0);\n \n LABEL_ANOTHER_LOOP : do {\n ;\n } while(0);\n \n function OUT_FUNC(){}\n})();\n",
+ "id": "S12.8_A5_T1"
+ },
+ {
+ "section": "12.8",
+ "description": "Checking if using function name as an Identifier appears to be invalid",
+ "negative": "",
+ "test": "(function(){\n LABEL_OUT : var x=0, y=0;\n LABEL_DO_LOOP : do {\n LABEL_IN : x++;\n if(x===10)\n return;\n break IN_DO_FUNC;\n LABEL_IN_2 : y++;\n function IN_DO_FUNC(){}\n } while(0);\n \n LABEL_ANOTHER_LOOP : do {\n ;\n } while(0);\n \n function OUT_FUNC(){}\n})();\n",
+ "id": "S12.8_A5_T2"
+ },
+ {
+ "section": "12.8",
+ "description": "Checking if using internal loop label as an Identifier appears to be invalid",
+ "negative": "",
+ "test": "(function(){\n LABEL_OUT : var x=0, y=0;\n LABEL_DO_LOOP : do {\n LABEL_IN : x++;\n if(x===10)\n return;\n break LABEL_IN;\n LABEL_IN_2 : y++;\n\n function IN_DO_FUNC(){}\n \n } while(0);\n \n LABEL_ANOTHER_LOOP : do {\n ;\n } while(0);\n \n function OUT_FUNC(){}\n \n})();\n",
+ "id": "S12.8_A5_T3"
+ },
+ {
+ "section": "12.8",
+ "description": "Checking if using \"break Identifier\" within a function body appears to be invalid",
+ "negative": "",
+ "test": "var x=0,y=0;\n\nLABEL1 : do {\n x++;\n (function(){break LABEL1;})();\n y++;\n} while(0);\n",
+ "id": "S12.8_A6"
+ },
+ {
+ "section": "12.8",
+ "description": "Using eval \"eval(\"break LABEL1\")\"",
+ "test": "var x=0,y=0;\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\ntry{\n\tLABEL1 : do {\n x++;\n eval(\"break LABEL1\");\n y++;\n } while(0);\n\t$ERROR('#1: eval(\"break LABEL1\") does not lead to throwing exception');\n} catch(e){\n\tif(!(e instanceof SyntaxError)){\n\t\t$ERROR(\"1.1: Appearing of break within eval statement inside of IterationStatement yields SyntaxError\");\n\t}\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S12.8_A7"
+ },
+ {
+ "section": "12.8",
+ "description": "Checking if using \"break Identifier\" from within catch Block appears to be invalid",
+ "negative": "",
+ "test": "var x=0,y=0;\n\ntry{\n\tLABEL1 : do {\n\t\tx++;\n\t\tthrow \"gonna leave it\";\n\t\ty++;\n\t} while(0);\n\t$ERROR('#1: throw \"gonna leave it\" lead to throwing exception');\n} catch(e){\n\tbreak LABEL2;\n\tLABEL2 : do {\n\t\tx++;\n\t\ty++;\n\t} while(0);\n}\n\n",
+ "id": "S12.8_A8_T1"
+ },
+ {
+ "section": "12.8",
+ "description": "Checking if using \"break Identifier\" from within catch Block appears to be invalid",
+ "negative": "",
+ "test": "var x=0,y=0;\n\ntry{\n\tLABEL1 : do {\n\t\tx++;\n\t\tthrow \"gonna leave it\";\n\t\ty++;\n\t} while(0);\n\t$ERROR('#1: throw \"gonna leave it\" lead to throwing exception');\n} catch(e){\n\tbreak;\n\tLABEL2 : do {\n\t\tx++;\n\t\ty++;\n\t} while(0);\n}\n\n",
+ "id": "S12.8_A8_T2"
+ },
+ {
+ "section": "12.8",
+ "description": "Using \"continue Identifier\" within \"catch\" statement",
+ "test": "var x=0,y=0;\n\n(function(){\nFOR : for(;;){\n\ttry{\n\t\tx++;\n\t\tif(x===10)return;\n\t\tthrow 1;\n\t} catch(e){\n\t\tbreak FOR;\n\t}\t\n}\n})();\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (x!==1) {\n\t$ERROR('#1: break inside of try-catch nested in loop is allowed');\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S12.8_A9_T1"
+ },
+ {
+ "section": "12.8",
+ "description": "Using \"continue Identifier\" within \"catch\" statement",
+ "test": "var x=0,y=0;\n\n(function(){\nFOR : for(;;){\n\ttry{\n\t\tx++;\n\t\tif(x===10)return;\n\t\tthrow 1;\n\t} catch(e){\n\t\tbreak ;\n\t}\t\n}\n})();\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (x!==1) {\n\t$ERROR('#1: break inside of try-catch nested in loop is allowed');\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S12.8_A9_T2"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/12.9.json b/website/resources/scripts/testcases2/12.9.json
new file mode 100644
index 000000000..42808e741
--- /dev/null
+++ b/website/resources/scripts/testcases2/12.9.json
@@ -0,0 +1,14 @@
+{
+ "testCollection": {
+ "name": "12.9",
+ "numTests": 1,
+ "tests": [
+ {
+ "id": "12.9-1",
+ "path": "TestCases/chapter12/12.9/12.9-1.js",
+ "description": "The return Statement - a return statement without an expression may have a LineTerminator before the semi-colon",
+ "test": "assertTrue((function testcase() {\n var sum = 0;\n (function innerTest() {\n for (var i = 1; i <= 10; i++) {\n if (i === 6) {\n return\n ;\n }\n sum += i;\n }\n })();\n return sum === 15;\n }).call(this));\n"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/12.9_The_return_Statement.json b/website/resources/scripts/testcases2/12.9_The_return_Statement.json
new file mode 100644
index 000000000..7aee32cad
--- /dev/null
+++ b/website/resources/scripts/testcases2/12.9_The_return_Statement.json
@@ -0,0 +1,102 @@
+{
+ "testCollection": {
+ "name": "12.9_The_return_Statement",
+ "numTests": 14,
+ "tests": [
+ {
+ "section": "12.9",
+ "description": "Checking if execution of \"return\" with no function fails",
+ "negative": "",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nvar x=1;\nreturn;\nvar y=2;\n",
+ "id": "S12.9_A1_T1"
+ },
+ {
+ "section": "12.9",
+ "description": "Checking if execution of \"return (0)\" with no function fails",
+ "negative": "",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nreturn (0);\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S12.9_A1_T10"
+ },
+ {
+ "section": "12.9",
+ "description": "Checking if execution of \"return x\" with no function fails",
+ "negative": "",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nvar x=1;\nreturn x;\nvar y=2;\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S12.9_A1_T2"
+ },
+ {
+ "section": "12.9",
+ "description": "Checking if execution of \"return\" within \"try\" statement fails",
+ "negative": "",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\ntry {\n return 1;\n} catch(e){\n return 1;\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S12.9_A1_T3"
+ },
+ {
+ "section": "12.9",
+ "description": "Checking if execution of \"return\" with no function fails",
+ "negative": "",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nreturn;\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S12.9_A1_T4"
+ },
+ {
+ "section": "12.9",
+ "description": "Checking if execution of \"return\" with no function, placed into a Block, fails",
+ "negative": "",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\n{\n var x=1;\n return;\n var y=2;\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S12.9_A1_T5"
+ },
+ {
+ "section": "12.9",
+ "description": "Checking if execution of \"return\" with no function, placed into a loop, fails",
+ "negative": "",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\ndo {\n var x=1;\n return;\n var y=2;\n} while(0);\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S12.9_A1_T6"
+ },
+ {
+ "section": "12.9",
+ "description": "Checking if execution of \"return x\" with no function, placed inside Block, fails",
+ "negative": "",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\n{\n var x=1;\n return x;\n var y=2;\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S12.9_A1_T7"
+ },
+ {
+ "section": "12.9",
+ "description": "Checking if execution of \"return x\" with no function, placed into a loop, fails",
+ "negative": "",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\ndo {\n var x=1;\n return x;\n var y=2;\n} while(0);\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S12.9_A1_T8"
+ },
+ {
+ "section": "12.9",
+ "description": "Checking if execution of \"return\", placed into a catch Block, fails",
+ "negative": "",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\ntry {\n throw 1;\n} catch(e){\n return e;\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S12.9_A1_T9"
+ },
+ {
+ "section": "12.9",
+ "description": "Checking by using eval, inserting LineTerminator between return and Variable",
+ "test": "//CHECK#1\ntry{\n if (eval(\"(function(){var x = 1;return\\u000Ax;var y=2;})()\") !== undefined) {\n $ERROR(\"#1: LineTerminator(U-000A) between return and Identifier_opt yields return without Identifier_opt\");\t \n }\n} catch(e){\n $ERROR('#1: eval(\"(function(){var x = 1;return\\\\u000Ax;var y=2;})()\") does not lead to throwing exception');\n}\n\n\n\n\n//CHECK#2\ntry{\n if (eval(\"(function(){var x = 1;return\\u000Dx;var y=2;})()\") !== undefined) {\n $ERROR(\"#1: LineTerminator(U-000D) between return and Identifier_opt yields return without Identifier_opt\"); \n }\n} catch(e){\n $ERROR('#2: eval(\"(function(){var x = 1;return\\\\u000Dx;var y=2;})()\") does not lead to throwing exception');\n}\n\n\n\n\n//CHECK#3\ntry{\n if (eval(\"(function(){var x = 1;return\\u2028x;var y=2;})()\") !== undefined) {\n $ERROR(\"#1: LineTerminator(U-2028) between return and Identifier_opt yields return without Identifier_opt\"); \n }\n} catch(e){\n $ERROR('#3: eval(\"(function(){var x = 1;return\\\\u2028x;var y=2;})()\") does not lead to throwing exception');\n}\n\n\n\n\n//CHECK#4\ntry{\n if (eval(\"(function(){var x =1;return\\u2029x;var y=2;})()\") !== undefined) {\n $ERROR(\"#1: LineTerminator(U-2029) between return and Identifier_opt yields return without Identifier_opt\"); \n }\n} catch(e){\n $ERROR('#4: eval(\"(function(){var x =1;return\\\\u2029x;var y=2;})()\") does not lead to throwing exception');\n}\n",
+ "id": "S12.9_A2"
+ },
+ {
+ "section": "12.9",
+ "description": "Return without Expression",
+ "test": "__evaluated = (function (){return;})();\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__evaluated !== undefined) {\n\t$ERROR('#1: If Expression is omitted, the return value is undefined');\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S12.9_A3"
+ },
+ {
+ "section": "12.9",
+ "description": "Return very sophisticated expression and function",
+ "test": "// second derivative \nfunction DD_operator(f, delta){return function(x){return (f(x+delta)-2*f(x)+f(x-delta))/(delta*delta)};}\n\nDDsin = DD_operator(Math.sin, 0.00001);\n\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\n// ((sin(x))')' = -sin(x)\nif (DDsin( Math.PI/2 ) + Math.sin( Math.PI/2 ) > 0.00001) {\n\t$ERROR('#1: return Expression yields to Return (return, GetValue(Evaluate Expression), empty)');\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S12.9_A4"
+ },
+ {
+ "section": "12.9",
+ "description": "Using code after Return statement",
+ "test": "//CHECK#1\nvar x1=1;\nfunction myfunc1(){\n\tx1++;\n\treturn;\n\tx1*=2;\n}\nmyfunc1();\nif (x1!==2) $ERROR('#1: x1 === 2. Actual: x1 ==='+ x1 );\n\n//CHECK#2\nvar x2=1;\nfunction myfunc2(){\n x2++;\n return x2;\n x2*=2;\n}\nmyfunc2();\nif (x2!==2) $ERROR('#2: x2 === 2. Actual: x2 ==='+ x2 );\n\n//CHECK#3\nvar x3=1;\nfunction myfunc3(){\n x3++;\n return;\n return x3;\n x3*=2;\n}\nif (myfunc3()!==undefined) $ERROR('#3: myfunc3() === undefined. Actual: myfunc3() ==='+ myfunc3() );\n",
+ "id": "S12.9_A5"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/13.0.json b/website/resources/scripts/testcases2/13.0.json
new file mode 100644
index 000000000..2c073c998
--- /dev/null
+++ b/website/resources/scripts/testcases2/13.0.json
@@ -0,0 +1,118 @@
+{
+ "testCollection": {
+ "name": "13.0",
+ "numTests": 15,
+ "tests": [
+ {
+ "id": "13.0-1",
+ "path": "TestCases/chapter13/13.0/13.0-1.js",
+ "description": "13.0 - multiple names in one function declaration is not allowed, two function names",
+ "test": "assertTrue((function testcase() {\n try {\n eval(\"function x, y() {}\");\n return false;\n } catch (e) {\n return e instanceof SyntaxError;\n }\n }).call(this));\n"
+ },
+ {
+ "id": "13.0-10-s",
+ "path": "TestCases/chapter13/13.0/13.0-10-s.js",
+ "description": "Strict Mode - SourceElements is evaluated as strict mode code when the code of this FunctionBody with an inner function contains a Use Strict Directive",
+ "test": "assertTrue((function testcase() {\n\n function _13_0_10_fun() {\n function _13_0_10_inner() {\n \"use strict\";\n eval(\"eval = 42;\");\n }\n _13_0_10_inner();\n };\n try {\n _13_0_10_fun();\n return false;\n } catch (e) {\n return e instanceof SyntaxError;\n }\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict())",
+ "strict_only": ""
+ },
+ {
+ "id": "13.0-11-s",
+ "path": "TestCases/chapter13/13.0/13.0-11-s.js",
+ "description": "Strict Mode - SourceElements is evaluated as strict mode code when the code of this FunctionBody with an inner function which is in strict mode",
+ "test": "assertTrue((function testcase() {\n\n function _13_0_11_fun() {\n \"use strict\";\n function _13_0_11_inner() {\n eval(\"eval = 42;\");\n }\n _13_0_11_inner();\n };\n try {\n _13_0_11_fun();\n return false;\n } catch (e) {\n return e instanceof SyntaxError;\n }\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict())",
+ "strict_only": ""
+ },
+ {
+ "id": "13.0-12-s",
+ "path": "TestCases/chapter13/13.0/13.0-12-s.js",
+ "description": "Strict Mode - SourceElements is not evaluated as strict mode code when a Function constructor is contained in strict mode code and the function constructor body is not strict",
+ "test": "assertTrue((function testcase() {\n \"use strict\";\n\n var _13_0_12_fun = new Function(\" \",\"eval = 42;\");\n _13_0_12_fun();\n return true;\n\n }).call(this));\n",
+ "strict_only": ""
+ },
+ {
+ "id": "13.0-13-s",
+ "path": "TestCases/chapter13/13.0/13.0-13-s.js",
+ "description": "Strict Mode - SourceElements is evaluated as strict mode code when the function body of a Function constructor begins with a Strict Directive",
+ "test": "assertTrue((function testcase() {\n \n try {\n eval(\"var _13_0_13_fun = new Function(\\\" \\\", \\\"'use strict'; eval = 42;\\\"); _13_0_13_fun();\");\n return false;\n } catch (e) {\n return e instanceof SyntaxError;\n }\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict())",
+ "strict_only": ""
+ },
+ {
+ "id": "13.0-14-s",
+ "path": "TestCases/chapter13/13.0/13.0-14-s.js",
+ "description": "Strict Mode - SourceElements is evaluated as strict mode code when the function body of a Function constructor contains a Strict Directive",
+ "test": "assertTrue((function testcase() {\n\n try {\n var _13_0_14_fun = new Function(\" \", \"'use strict'; eval = 42; \");\n _13_0_14_fun();\n return false;\n } catch (e) {\n return e instanceof SyntaxError;\n }\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict())",
+ "strict_only": ""
+ },
+ {
+ "id": "13.0-15-s",
+ "path": "TestCases/chapter13/13.0/13.0-15-s.js",
+ "description": "Strict Mode - SourceElements is evaluated as strict mode code when a FunctionDeclaration is contained in strict mode code within eval code",
+ "test": "assertTrue((function testcase() {\n\n try {\n eval(\"'use strict'; function _13_0_15_fun() {eval = 42;};\");\n _13_0_15_fun();\n return false;\n } catch (e) {\n return e instanceof SyntaxError;\n }\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict())",
+ "strict_only": ""
+ },
+ {
+ "id": "13.0-16-s",
+ "path": "TestCases/chapter13/13.0/13.0-16-s.js",
+ "description": "Strict Mode - SourceElements is evaluated as strict mode code when a FunctionExpression is contained in strict mode code within eval code",
+ "test": "assertTrue((function testcase() {\n\n try {\n eval(\"'use strict'; var _13_0_16_fun = function () {eval = 42;};\");\n _13_0_16_fun();\n return false;\n } catch (e) {\n return e instanceof SyntaxError;\n }\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict())",
+ "strict_only": ""
+ },
+ {
+ "id": "13.0-17-s",
+ "path": "TestCases/chapter13/13.0/13.0-17-s.js",
+ "description": "Strict Mode - SourceElements is not evaluated as strict mode code when a Function constructor is contained in strict mode code within eval code",
+ "test": "assertTrue((function testcase() {\n\n eval(\"'use strict'; var _13_0_17_fun = new Function('eval = 42;'); _13_0_17_fun();\");\n return true;\n }).call(this));\n",
+ "strict_only": ""
+ },
+ {
+ "id": "13.0-2",
+ "path": "TestCases/chapter13/13.0/13.0-2.js",
+ "description": "13.0 - multiple names in one function declaration is not allowed, three function names",
+ "test": "assertTrue((function testcase() {\n try {\n eval(\"function x,y,z(){}\");\n return false;\n } catch (e) {\n return e instanceof SyntaxError;\n }\n }).call(this));\n"
+ },
+ {
+ "id": "13.0-3",
+ "path": "TestCases/chapter13/13.0/13.0-3.js",
+ "description": "13.0 - property names in function definition is not allowed, add a new property into object",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n try {\n eval(\"function obj.tt() {};\");\n return false;\n } catch (e) {\n return e instanceof SyntaxError;\n }\n }).call(this));\n"
+ },
+ {
+ "id": "13.0-4",
+ "path": "TestCases/chapter13/13.0/13.0-4.js",
+ "description": "13.0 - multiple names in one function declaration is not allowed, add a new property into a property which is a object",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n obj.tt = { len: 10 };\n try {\n eval(\"function obj.tt.ss() {};\");\n return false;\n } catch (e) {\n return e instanceof SyntaxError;\n }\n }).call(this));\n"
+ },
+ {
+ "id": "13.0-7-s",
+ "path": "TestCases/chapter13/13.0/13.0-7-s.js",
+ "description": "Strict Mode - SourceElements is evaluated as strict mode code when the code of this FunctionDeclaration is contained in non-strict mode but the call to eval is a direct call in strict mode code",
+ "test": "assertTrue((function testcase() {\n\n try {\n eval(\"'use strict'; function _13_0_7_fun() {eval = 42;};\");\n _13_0_7_fun();\n return false;\n } catch (e) {\n return e instanceof SyntaxError;\n }\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict())",
+ "strict_only": ""
+ },
+ {
+ "id": "13.0-8-s",
+ "path": "TestCases/chapter13/13.0/13.0-8-s.js",
+ "description": "Strict Mode - SourceElements is evaluated as strict mode code when the code of this FunctionExpression is contained in non-strict mode but the call to eval is a direct call in strict mode code",
+ "test": "assertTrue((function testcase() {\n \"use strict\";\n\n try {\n eval(\"var _13_0_8_fun = function () {eval = 42;};\");\n _13_0_8_fun();\n return false;\n } catch (e) {\n return e instanceof SyntaxError;\n }\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict())",
+ "strict_only": ""
+ },
+ {
+ "id": "13.0-9-s",
+ "path": "TestCases/chapter13/13.0/13.0-9-s.js",
+ "description": "Strict Mode - SourceElements is evaluated as strict mode code when a FunctionDeclaration that is contained in strict mode code has an inner function",
+ "test": "assertTrue((function testcase() {\n \"use strict\";\n\n var _13_0_9_fun = function () {\n function _13_0_9_inner() { eval(\"eval = 42;\"); }\n _13_0_9_inner();\n };\n try {\n _13_0_9_fun();\n return false;\n } catch (e) {\n return e instanceof SyntaxError;\n }\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict())",
+ "strict_only": ""
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/13.1.json b/website/resources/scripts/testcases2/13.1.json
new file mode 100644
index 000000000..5b6872d65
--- /dev/null
+++ b/website/resources/scripts/testcases2/13.1.json
@@ -0,0 +1,404 @@
+{
+ "testCollection": {
+ "name": "13.1",
+ "numTests": 52,
+ "tests": [
+ {
+ "id": "13.1-1-1",
+ "path": "TestCases/chapter13/13.1/13.1-1-1.js",
+ "description": "Duplicate identifier allowed in non-strict function declaration parameter list",
+ "test": "assertTrue((function testcase()\n{\n try \n {\n eval('function foo(a,a){}');\n return true;\n }\n catch (e) { return false }\n }).call(this));\n"
+ },
+ {
+ "id": "13.1-1-2",
+ "path": "TestCases/chapter13/13.1/13.1-1-2.js",
+ "description": "Duplicate identifier allowed in non-strict function expression parameter list",
+ "test": "assertTrue((function testcase()\n{\n try \n {\n eval('(function foo(a,a){})');\n return true;\n }\n catch (e) { return false }\n }).call(this));\n"
+ },
+ {
+ "id": "13.1-1-s",
+ "path": "TestCases/chapter13/13.1/13.1-1-s.js",
+ "description": "Strict Mode - SyntaxError is thrown if the identifier 'eval' appears within a FormalParameterList of a strict mode FunctionDeclaration",
+ "test": "assertTrue((function testcase() {\n \"use strict\";\n\n try {\n eval(\"function _13_1_1_fun(eval) { }\");\n return false;\n } catch (e) {\n return e instanceof SyntaxError;\n }\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict())",
+ "strict_only": ""
+ },
+ {
+ "id": "13.1-10-s",
+ "path": "TestCases/chapter13/13.1/13.1-10-s.js",
+ "description": "Strict Mode - SyntaxError is thrown if a function is created in 'strict mode' using a FunctionExpression and the function has three identical parameters",
+ "test": "assertTrue((function testcase() {\n \"use strict\";\n\n try {\n eval(\"var _13_1_10_fun = function (param, param, param) { };\")\n return false;\n } catch (e) {\n return e instanceof SyntaxError;\n }\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict())",
+ "strict_only": ""
+ },
+ {
+ "id": "13.1-11-s",
+ "path": "TestCases/chapter13/13.1/13.1-11-s.js",
+ "description": "StrictMode - SyntaxError is thrown if 'eval' occurs as the function name of a FunctionDeclaration in strict mode",
+ "test": "assertTrue((function testcase() {\n \"use strict\";\n try {\n eval(\"function eval() { };\")\n return false;\n } catch (e) {\n return e instanceof SyntaxError;\n }\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict())",
+ "strict_only": ""
+ },
+ {
+ "id": "13.1-12-s",
+ "path": "TestCases/chapter13/13.1/13.1-12-s.js",
+ "description": "StrictMode - SyntaxError is thrown if 'eval' occurs as the Identifier of a FunctionExpression in strict mode",
+ "test": "assertTrue((function testcase() {\n \"use strict\";\n var _13_1_12_s = {};\n\n try {\n eval(\"_13_1_12_s.x = function eval() {};\");\n return false;\n } catch (e) {\n return e instanceof SyntaxError;\n }\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict())",
+ "strict_only": ""
+ },
+ {
+ "id": "13.1-13-s",
+ "path": "TestCases/chapter13/13.1/13.1-13-s.js",
+ "description": "StrictMode - SyntaxError is thrown if 'arguments' occurs as the function name of a FunctionDeclaration in strict mode",
+ "test": "assertTrue((function testcase() {\n \"use strict\";\n\n try {\n eval(\"function arguments() { };\")\n return false;\n } catch (e) {\n return e instanceof SyntaxError;\n }\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict())",
+ "strict_only": ""
+ },
+ {
+ "id": "13.1-14-s",
+ "path": "TestCases/chapter13/13.1/13.1-14-s.js",
+ "description": "StrictMode - SyntaxError is thrown if 'arguments' occurs as the Identifier of a FunctionExpression in strict mode",
+ "test": "assertTrue((function testcase() {\n \"use strict\";\n var _13_1_14_s = {};\n\n try {\n eval(\"_13_1_14_s.x = function arguments() {};\");\n return false;\n } catch (e) {\n return e instanceof SyntaxError;\n }\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict())",
+ "strict_only": ""
+ },
+ {
+ "id": "13.1-15-s",
+ "path": "TestCases/chapter13/13.1/13.1-15-s.js",
+ "description": "Strict Mode - SyntaxError is thrown if the identifier 'eval' appears within a FormalParameterList of a strict mode FunctionDeclaration in strict eval code",
+ "test": "assertTrue((function testcase() {\n\n try {\n eval(\"'use strict';function _13_1_15_fun(eval) { }\");\n return false;\n } catch (e) {\n return e instanceof SyntaxError;\n }\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict())",
+ "strict_only": ""
+ },
+ {
+ "id": "13.1-16-s",
+ "path": "TestCases/chapter13/13.1/13.1-16-s.js",
+ "description": "StrictMode - SyntaxError is thrown if the identifier 'eval' appears within a FormalParameterList of a strict mode FunctionDeclaration when FuctionBody is strict code",
+ "test": "assertTrue((function testcase() {\n\n try {\n eval(\"function _13_1_16_fun(eval) { 'use strict'; }\");\n return false;\n } catch (e) {\n return e instanceof SyntaxError;\n }\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict())",
+ "strict_only": ""
+ },
+ {
+ "id": "13.1-17-s",
+ "path": "TestCases/chapter13/13.1/13.1-17-s.js",
+ "description": "StrictMode - SyntaxError is thrown if the identifier 'eval' appears within a FormalParameterList of a strict mode FunctionExpression in strict eval code",
+ "test": "assertTrue((function testcase() {\n\n try {\n eval(\"'use strict'; var _13_1_17_fun = function (eval) { }\");\n return false;\n } catch (e) {\n return e instanceof SyntaxError;\n }\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict())",
+ "strict_only": ""
+ },
+ {
+ "id": "13.1-18-s",
+ "path": "TestCases/chapter13/13.1/13.1-18-s.js",
+ "description": "StrictMode - SyntaxError is thrown if the identifier 'eval' appears within a FormalParameterList of a strict mode FunctionExpression when FuctionBody is strict code",
+ "test": "assertTrue((function testcase() {\n\n try {\n eval(\"var _13_1_18_fun = function (eval) { 'use strict'; }\");\n return false;\n } catch (e) {\n return e instanceof SyntaxError;\n }\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict())",
+ "strict_only": ""
+ },
+ {
+ "id": "13.1-19-s",
+ "path": "TestCases/chapter13/13.1/13.1-19-s.js",
+ "description": "Strict Mode - SyntaxError is thrown if the identifier 'arguments' appears within a FormalParameterList of a strict mode FunctionDeclaration in strict eval code",
+ "test": "assertTrue((function testcase() {\n\n try {\n eval(\"'use strict';function _13_1_19_fun(arguments) { }\");\n return false;\n } catch (e) {\n return e instanceof SyntaxError;\n }\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict())",
+ "strict_only": ""
+ },
+ {
+ "id": "13.1-2-1",
+ "path": "TestCases/chapter13/13.1/13.1-2-1.js",
+ "description": "eval allowed as formal parameter name of a non-strict function declaration",
+ "test": "assertTrue((function testcase()\n{\n try \n {\n eval(\"function foo(eval){};\");\n return true;\n }\n catch (e) { }\n }).call(this));\n"
+ },
+ {
+ "id": "13.1-2-2",
+ "path": "TestCases/chapter13/13.1/13.1-2-2.js",
+ "description": "eval allowed as formal parameter name of a non-strict function expression",
+ "test": "assertTrue((function testcase()\n{\n eval(\"(function foo(eval){});\");\n return true;\n }).call(this));\n"
+ },
+ {
+ "id": "13.1-2-5",
+ "path": "TestCases/chapter13/13.1/13.1-2-5.js",
+ "description": "arguments allowed as formal parameter name of a non-strict function declaration",
+ "test": "assertTrue((function testcase()\n{\n try \n {\n eval(\"function foo(arguments){};\");\n return true;\n }\n catch (e) { }\n }).call(this));\n"
+ },
+ {
+ "id": "13.1-2-6",
+ "path": "TestCases/chapter13/13.1/13.1-2-6.js",
+ "description": "arguments allowed as formal parameter name of a non-strict function expression",
+ "test": "assertTrue((function testcase()\n{\n eval(\"(function foo(arguments){});\");\n return true;\n }).call(this));\n"
+ },
+ {
+ "id": "13.1-2-s",
+ "path": "TestCases/chapter13/13.1/13.1-2-s.js",
+ "description": "Strict Mode - SyntaxError is thrown if the identifier 'eval' appears within a FormalParameterList of a strict mode FunctionExpression",
+ "test": "assertTrue((function testcase() {\n \"use strict\";\n\n try {\n eval(\"var _13_1_2_fun = function (eval) { }\");\n return false;\n } catch (e) {\n return e instanceof SyntaxError;\n }\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict())",
+ "strict_only": ""
+ },
+ {
+ "id": "13.1-20-s",
+ "path": "TestCases/chapter13/13.1/13.1-20-s.js",
+ "description": "StrictMode - SyntaxError is thrown if the identifier 'arguments' appears within a FormalParameterList of a strict mode FunctionDeclaration when FuctionBody is strict code",
+ "test": "assertTrue((function testcase() {\n\n try {\n eval(\"function _13_1_20_fun(arguments) { 'use strict'; }\");\n return false;\n } catch (e) {\n return e instanceof SyntaxError;\n }\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict())",
+ "strict_only": ""
+ },
+ {
+ "id": "13.1-21-s",
+ "path": "TestCases/chapter13/13.1/13.1-21-s.js",
+ "description": "StrictMode - SyntaxError is thrown if the identifier 'arguments' appears within a FormalParameterList of a strict mode FunctionExpression in strict eval code",
+ "test": "assertTrue((function testcase() {\n\n try {\n eval(\"'use strict'; var _13_1_21_fun = function (arguments) { }\");\n return false;\n } catch (e) {\n return e instanceof SyntaxError;\n }\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict())",
+ "strict_only": ""
+ },
+ {
+ "id": "13.1-22-s",
+ "path": "TestCases/chapter13/13.1/13.1-22-s.js",
+ "description": "StrictMode - SyntaxError is thrown if the identifier 'arguments' appears within a FormalParameterList of a strict mode FunctionExpression when FuctionBody is strict code",
+ "test": "assertTrue((function testcase() {\n\n try {\n eval(\"var _13_1_22_fun = function (arguments) { 'use strict'; }\");\n return false;\n } catch (e) {\n return e instanceof SyntaxError;\n }\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict())",
+ "strict_only": ""
+ },
+ {
+ "id": "13.1-23-s",
+ "path": "TestCases/chapter13/13.1/13.1-23-s.js",
+ "description": "Strict Mode - SyntaxError is thrown if a function is created using a FunctionDeclaration that is contained in eval strict code and the function has two identical parameters",
+ "test": "assertTrue((function testcase() {\n\n try {\n eval(\"'use strict'; function _13_1_23_fun(param, param) { }\");\n return false;\n } catch (e) {\n return e instanceof SyntaxError;\n }\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict())",
+ "strict_only": ""
+ },
+ {
+ "id": "13.1-24-s",
+ "path": "TestCases/chapter13/13.1/13.1-24-s.js",
+ "description": "Strict Mode - SyntaxError is thrown if a function is created using a FunctionDeclaration whose FunctionBody is contained in strict code and the function has two identical parameters",
+ "test": "assertTrue((function testcase() {\n\n try {\n eval(\"function _13_1_24_fun(param, param) { 'use strict'; }\");\n return false;\n } catch (e) {\n return e instanceof SyntaxError;\n }\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict())",
+ "strict_only": ""
+ },
+ {
+ "id": "13.1-25-s",
+ "path": "TestCases/chapter13/13.1/13.1-25-s.js",
+ "description": "Strict Mode - SyntaxError is thrown if a function is created using a FunctionDeclaration that is contained in eval strict code and the function has two identical parameters which are separated by a unique parameter name",
+ "test": "assertTrue((function testcase() {\n\n try {\n eval(\"'use strict'; function _13_1_25_fun(param1, param2, param1) { }\");\n return false;\n } catch (e) {\n return e instanceof SyntaxError;\n }\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict())",
+ "strict_only": ""
+ },
+ {
+ "id": "13.1-26-s",
+ "path": "TestCases/chapter13/13.1/13.1-26-s.js",
+ "description": "Strict Mode - SyntaxError is thrown if a function is created using a FunctionDeclaration whose FunctionBody is contained in strict code and the function has two identical parameters which are separated by a unique parameter name",
+ "test": "assertTrue((function testcase() {\n\n try {\n eval(\"function _13_1_26_fun(param1, param2, param1) { 'use strict'; }\");\n return false;\n } catch (e) {\n return e instanceof SyntaxError;\n }\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict())",
+ "strict_only": ""
+ },
+ {
+ "id": "13.1-27-s",
+ "path": "TestCases/chapter13/13.1/13.1-27-s.js",
+ "description": "Strict Mode - SyntaxError is thrown if a function is created using a FunctionDeclaration that is contained in eval strict code and the function has three identical parameters",
+ "test": "assertTrue((function testcase() {\n\n try {\n eval(\"'use strict'; function _13_1_27_fun(param, param, param) { }\");\n return false;\n } catch (e) {\n return e instanceof SyntaxError;\n }\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict())",
+ "strict_only": ""
+ },
+ {
+ "id": "13.1-28-s",
+ "path": "TestCases/chapter13/13.1/13.1-28-s.js",
+ "description": "Strict Mode - SyntaxError is thrown if a function is created using a FunctionDeclaration whose FunctionBody is contained in strict code and the function has three identical parameters",
+ "test": "assertTrue((function testcase() {\n \n\n try {\n eval(\"function _13_1_28_fun(param, param, param) { 'use strict'; }\");\n return false;\n } catch (e) {\n return e instanceof SyntaxError;\n }\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict())",
+ "strict_only": ""
+ },
+ {
+ "id": "13.1-29-s",
+ "path": "TestCases/chapter13/13.1/13.1-29-s.js",
+ "description": "Strict Mode - SyntaxError is thrown if a function is created using a FunctionExpression that is contained in eval strict code and the function has two identical parameters",
+ "test": "assertTrue((function testcase() {\n\n try {\n eval(\"'use strict'; var _13_1_29_fun = function (param, param) { };\");\n return false;\n } catch (e) {\n return e instanceof SyntaxError;\n }\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict())",
+ "strict_only": ""
+ },
+ {
+ "id": "13.1-3-1",
+ "path": "TestCases/chapter13/13.1/13.1-3-1.js",
+ "description": "eval allowed as function identifier in non-strict function declaration",
+ "test": "assertTrue((function testcase()\n{\n try \n {\n eval(\"function eval(){};\");\n return true;\n }\n catch (e) { } \n }).call(this));\n"
+ },
+ {
+ "id": "13.1-3-2",
+ "path": "TestCases/chapter13/13.1/13.1-3-2.js",
+ "description": "eval allowed as function identifier in non-strict function expression",
+ "test": "assertTrue((function testcase()\n{\n try \n {\n eval(\"(function eval(){});\");\n return true;\n }\n catch (e) { } \n }).call(this));\n"
+ },
+ {
+ "id": "13.1-3-7",
+ "path": "TestCases/chapter13/13.1/13.1-3-7.js",
+ "description": "arguments allowed as function identifier in non-strict function declaration",
+ "test": "assertTrue((function testcase()\n{\n try \n {\n eval(\"function arguments (){};\");\n return true;\n }\n catch (e) { } \n }).call(this));\n"
+ },
+ {
+ "id": "13.1-3-8",
+ "path": "TestCases/chapter13/13.1/13.1-3-8.js",
+ "description": "arguments allowed as function identifier in non-strict function expression",
+ "test": "assertTrue((function testcase()\n{\n try \n {\n eval(\"(function arguments (){});\");\n return true;\n }\n catch (e) { } \n }).call(this));\n"
+ },
+ {
+ "id": "13.1-3-s",
+ "path": "TestCases/chapter13/13.1/13.1-3-s.js",
+ "description": "Strict Mode - SyntaxError is thrown if the identifier 'arguments' appears within a FormalParameterList of a strict mode FunctionDeclaration",
+ "test": "assertTrue((function testcase() {\n \"use strict\";\n\n try {\n eval(\"function _13_1_3_fun(arguments) { }\");\n return false;\n } catch (e) {\n return e instanceof SyntaxError;\n }\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict())",
+ "strict_only": ""
+ },
+ {
+ "id": "13.1-30-s",
+ "path": "TestCases/chapter13/13.1/13.1-30-s.js",
+ "description": "Strict Mode - SyntaxError is thrown if a function is created using a FunctionExpression whose FunctionBody is contained in strict code and the function has two identical parameters",
+ "test": "assertTrue((function testcase() {\n\n try {\n eval(\"var _13_1_30_fun = function (param, param) { 'use strict'; };\");\n return false;\n } catch (e) {\n return e instanceof SyntaxError;\n }\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict())",
+ "strict_only": ""
+ },
+ {
+ "id": "13.1-31-s",
+ "path": "TestCases/chapter13/13.1/13.1-31-s.js",
+ "description": "Strict Mode - SyntaxError is thrown if a function is created using a FunctionExpression that is contained in eval strict code and the function has two identical parameters, which are separated by a unique parameter name",
+ "test": "assertTrue((function testcase() {\n\n try {\n eval(\"'use strict'; var _13_1_31_fun = function (param1, param2, param1) { };\");\n return false;\n } catch (e) {\n return e instanceof SyntaxError;\n }\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict())",
+ "strict_only": ""
+ },
+ {
+ "id": "13.1-32-s",
+ "path": "TestCases/chapter13/13.1/13.1-32-s.js",
+ "description": "Strict Mode - SyntaxError is thrown if a function is created using a FunctionExpression whose FunctionBody is strict and the function has two identical parameters, which are separated by a unique parameter name",
+ "test": "assertTrue((function testcase() {\n\n try {\n eval(\"var _13_1_32_fun = function (param1, param2, param1) { 'use strict'; };\");\n return false;\n } catch (e) {\n return e instanceof SyntaxError;\n }\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict())",
+ "strict_only": ""
+ },
+ {
+ "id": "13.1-33-s",
+ "path": "TestCases/chapter13/13.1/13.1-33-s.js",
+ "description": "Strict Mode - SyntaxError is thrown if function is created using a FunctionExpression that is contained in eval strict code and the function has three identical parameters",
+ "test": "assertTrue((function testcase() {\n\n try {\n eval(\"'use strict'; var _13_1_33_fun = function (param, param, param) { };\")\n return false;\n } catch (e) {\n return e instanceof SyntaxError;\n }\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict())",
+ "strict_only": ""
+ },
+ {
+ "id": "13.1-34-s",
+ "path": "TestCases/chapter13/13.1/13.1-34-s.js",
+ "description": "Strict Mode - SyntaxError is thrown if a function declaration has three identical parameters with a strict mode body",
+ "test": "assertTrue((function testcase() {\n\n try {\n eval(\"var _13_1_34_fun = function (param, param, param) { 'use strict'; };\")\n return false;\n } catch (e) {\n return e instanceof SyntaxError;\n }\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict())",
+ "strict_only": ""
+ },
+ {
+ "id": "13.1-35-s",
+ "path": "TestCases/chapter13/13.1/13.1-35-s.js",
+ "description": "StrictMode - SyntaxError is thrown if 'eval' occurs as the function name of a FunctionDeclaration in strict eval code",
+ "test": "assertTrue((function testcase() {\n\n try {\n eval(\"'use strict'; function eval() { };\")\n return false;\n } catch (e) {\n return e instanceof SyntaxError;\n }\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict())",
+ "strict_only": ""
+ },
+ {
+ "id": "13.1-36-s",
+ "path": "TestCases/chapter13/13.1/13.1-36-s.js",
+ "description": "StrictMode - SyntaxError is thrown if 'eval' occurs as the function name of a FunctionDeclaration whose FunctionBody is in strict mode",
+ "test": "assertTrue((function testcase() {\n\n try {\n eval(\"function eval() { 'use strict'; };\")\n return false;\n } catch (e) {\n return e instanceof SyntaxError;\n }\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict())",
+ "strict_only": ""
+ },
+ {
+ "id": "13.1-37-s",
+ "path": "TestCases/chapter13/13.1/13.1-37-s.js",
+ "description": "StrictMode - SyntaxError is thrown if 'eval' occurs as the Identifier of a FunctionExpression in strict eval code",
+ "test": "assertTrue((function testcase() {\n var _13_1_37_s = {};\n try {\n eval(\"'use strict'; _13_1_37_s.x = function eval() {};\");\n return false;\n } catch (e) {\n return e instanceof SyntaxError;\n }\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict())",
+ "strict_only": ""
+ },
+ {
+ "id": "13.1-38-s",
+ "path": "TestCases/chapter13/13.1/13.1-38-s.js",
+ "description": "StrictMode - SyntaxError is thrown if 'eval' occurs as the Identifier of a FunctionExpression whose FunctionBody is contained in strict code",
+ "test": "assertTrue((function testcase() {\n var _13_1_38_s = {};\n try {\n eval(\"_13_1_38_s.x = function eval() {'use strict'; };\");\n return false;\n } catch (e) {\n return e instanceof SyntaxError;\n }\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict())",
+ "strict_only": ""
+ },
+ {
+ "id": "13.1-39-s",
+ "path": "TestCases/chapter13/13.1/13.1-39-s.js",
+ "description": "StrictMode - SyntaxError is thrown if 'arguments' occurs as the function name of a FunctionDeclaration in strict eval code",
+ "test": "assertTrue((function testcase() {\n\n try {\n eval(\"'use strict'; function arguments() { };\")\n return false;\n } catch (e) {\n return e instanceof SyntaxError;\n }\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict())",
+ "strict_only": ""
+ },
+ {
+ "id": "13.1-4-s",
+ "path": "TestCases/chapter13/13.1/13.1-4-s.js",
+ "description": "Strict Mode - SyntaxError is thrown if the identifier 'arguments' appears within a FormalParameterList of a strict mode FunctionExpression",
+ "test": "assertTrue((function testcase() {\n \"use strict\";\n\n try {\n eval(\"var _13_1_4_fun = function (arguments) { };\");\n return false;\n } catch (e) {\n return e instanceof SyntaxError;\n }\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict())",
+ "strict_only": ""
+ },
+ {
+ "id": "13.1-40-s",
+ "path": "TestCases/chapter13/13.1/13.1-40-s.js",
+ "description": "StrictMode - SyntaxError is thrown if 'arguments' occurs as the Identifier of a FunctionDeclaration whose FunctionBody is contained in strict code",
+ "test": "assertTrue((function testcase() {\n\n try {\n eval(\"function arguments() { 'use strict'; };\")\n return false;\n } catch (e) {\n return e instanceof SyntaxError;\n }\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict())",
+ "strict_only": ""
+ },
+ {
+ "id": "13.1-41-s",
+ "path": "TestCases/chapter13/13.1/13.1-41-s.js",
+ "description": "StrictMode - SyntaxError is thrown if 'arguments' occurs as the Identifier of a FunctionExpression in strict eval code",
+ "test": "assertTrue((function testcase() {\n var _13_1_41_s = {};\n try {\n eval(\"'use strict'; _13_1_41_s.x = function arguments() {};\");\n return false;\n } catch (e) {\n return e instanceof SyntaxError;\n }\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict())",
+ "strict_only": ""
+ },
+ {
+ "id": "13.1-42-s",
+ "path": "TestCases/chapter13/13.1/13.1-42-s.js",
+ "description": "StrictMode - SyntaxError is thrown if 'arguments' occurs as the Identifier of a FunctionExpression whose FunctionBody is contained in strict code",
+ "test": "assertTrue((function testcase() {\n var _13_1_42_s = {};\n try {\n eval(\"_13_1_42_s.x = function arguments() {'use strict';};\");\n return false;\n } catch (e) {\n return e instanceof SyntaxError;\n }\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict())",
+ "strict_only": ""
+ },
+ {
+ "id": "13.1-5-s",
+ "path": "TestCases/chapter13/13.1/13.1-5-s.js",
+ "description": "Strict Mode - SyntaxError is thrown if a function is declared in 'strict mode' using a FunctionDeclaration and the function has two identical parameters",
+ "test": "assertTrue((function testcase() {\n \"use strict\";\n\n try {\n eval(\"function _13_1_5_fun(param, param) { }\");\n return false;\n } catch (e) {\n return e instanceof SyntaxError;\n }\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict())",
+ "strict_only": ""
+ },
+ {
+ "id": "13.1-6-s",
+ "path": "TestCases/chapter13/13.1/13.1-6-s.js",
+ "description": "Strict Mode - SyntaxError is thrown if a function is created in 'strict mode' using a FunctionDeclaration and the function has two identical parameters, which are separated by a unique parameter name",
+ "test": "assertTrue((function testcase() {\n \"use strict\";\n\n try {\n eval(\"function _13_1_6_fun(param1, param2, param1) { }\");\n return false;\n } catch (e) {\n return e instanceof SyntaxError;\n }\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict())",
+ "strict_only": ""
+ },
+ {
+ "id": "13.1-7-s",
+ "path": "TestCases/chapter13/13.1/13.1-7-s.js",
+ "description": "Strict Mode - SyntaxError is thrown if a function is created in 'strict mode' using a FunctionDeclaration and the function has three identical parameters",
+ "test": "assertTrue((function testcase() {\n \"use strict\";\n\n try {\n eval(\"function _13_1_7_fun(param, param, param) { }\");\n return false;\n } catch (e) {\n return e instanceof SyntaxError;\n }\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict())",
+ "strict_only": ""
+ },
+ {
+ "id": "13.1-8-s",
+ "path": "TestCases/chapter13/13.1/13.1-8-s.js",
+ "description": "Strict Mode - SyntaxError is thrown if a function is created in 'strict mode' using a FunctionExpression and the function has two identical parameters",
+ "test": "assertTrue((function testcase() {\n \"use strict\";\n\n try {\n eval(\"var _13_1_8_fun = function (param, param) { };\");\n return false;\n } catch (e) {\n return e instanceof SyntaxError;\n }\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict())",
+ "strict_only": ""
+ },
+ {
+ "id": "13.1-9-s",
+ "path": "TestCases/chapter13/13.1/13.1-9-s.js",
+ "description": "Strict Mode - SyntaxError is thrown if a function is created in 'strict mode' using a FunctionExpression and the function has two identical parameters, which are separated by a unique parameter name",
+ "test": "assertTrue((function testcase() {\n \"use strict\";\n\n try {\n eval(\"var _13_1_9_fun = function (param1, param2, param1) { };\");\n return false;\n } catch (e) {\n return e instanceof SyntaxError;\n }\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict())",
+ "strict_only": ""
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/13.2.json b/website/resources/scripts/testcases2/13.2.json
new file mode 100644
index 000000000..6a036b346
--- /dev/null
+++ b/website/resources/scripts/testcases2/13.2.json
@@ -0,0 +1,83 @@
+{
+ "testCollection": {
+ "name": "13.2",
+ "numTests": 10,
+ "tests": [
+ {
+ "id": "13.2-1-s",
+ "path": "TestCases/chapter13/13.2/13.2-1-s.js",
+ "description": "StrictMode - Writing or reading from a property named 'caller' of function objects is allowed under both strict and normal modes.",
+ "test": "assertTrue((function testcase() {\n \"use strict\";\n\n var foo = function () {\n this.caller = 12;\n }\n var obj = new foo();\n return obj.caller === 12;\n }).call(this));\n",
+ "strict_only": ""
+ },
+ {
+ "id": "13.2-15-1",
+ "path": "TestCases/chapter13/13.2/13.2-15-1.js",
+ "description": "Function Object has length as its own property and does not invoke the setter defined on Function.prototype.length (Step 15)",
+ "test": "assertTrue((function testcase() {\n var fun = function (x, y) { };\n\n var verifyValue = false;\n verifyValue = (fun.hasOwnProperty(\"length\") && fun.length === 2);\n\n var verifyWritable = false;\n fun.length = 1001;\n verifyWritable = (fun.length === 1001);\n\n var verifyEnumerable = false;\n for (var p in fun) {\n if (p === \"length\") {\n verifyEnumerable = true;\n }\n }\n\n var verifyConfigurable = false;\n delete fun.length;\n verifyConfigurable = fun.hasOwnProperty(\"length\");\n\n return verifyValue && !verifyWritable && !verifyEnumerable && verifyConfigurable;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "13.2-17-1",
+ "path": "TestCases/chapter13/13.2/13.2-17-1.js",
+ "description": "Function Object has 'constructor' as its own property, it is not enumerable and does not invoke the setter defined on Function.prototype.constructor (Step 17)",
+ "test": "assertTrue((function testcase() {\n var desc = Object.getOwnPropertyDescriptor(Object.prototype, \"constructor\");\n try {\n var getFunc = function () {\n return 100;\n };\n\n var data = \"data\";\n var setFunc = function (value) {\n data = value;\n };\n\n Object.defineProperty(Object.prototype, \"constructor\", {\n get: getFunc,\n set: setFunc,\n configurable: true\n });\n\n var fun = function () {};\n\n var verifyValue = false;\n verifyValue = typeof fun.prototype.constructor === \"function\";\n\n var verifyEnumerable = false;\n for (var p in fun.prototype) {\n if (p === \"constructor\" && fun.prototype.hasOwnProperty(\"constructor\")) {\n verifyEnumerable = true;\n }\n }\n\n var verifyWritable = false;\n fun.prototype.constructor = 12;\n verifyWritable = (fun.prototype.constructor === 12);\n\n var verifyConfigurable = false;\n delete fun.prototype.constructor;\n verifyConfigurable = fun.hasOwnProperty(\"constructor\");\n\n return verifyValue && verifyWritable && !verifyEnumerable && !verifyConfigurable && data === \"data\";\n } finally {\n Object.defineProperty(Object.prototype, \"constructor\", desc);\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "13.2-18-1",
+ "path": "TestCases/chapter13/13.2/13.2-18-1.js",
+ "description": "Function Object has 'prototype' as its own property, it is not enumerable and does not invoke the setter defined on Function.prototype (Step 18)",
+ "test": "assertTrue((function testcase() {\n try {\n var getFunc = function () {\n return 100;\n };\n\n var data = \"data\";\n var setFunc = function (value) {\n data = value;\n };\n Object.defineProperty(Function.prototype, \"prototype\", {\n get: getFunc,\n set: setFunc,\n configurable: true\n });\n\n var fun = function () { };\n\n var verifyValue = false;\n verifyValue = (fun.prototype !== 100 && fun.prototype.toString() === \"[object Object]\");\n\n var verifyEnumerable = false;\n for (var p in fun) {\n if (p === \"prototype\" && fun.hasOwnProperty(\"prototype\")) {\n verifyEnumerable = true;\n }\n }\n\n var verifyConfigurable = false;\n delete fun.prototype;\n verifyConfigurable = fun.hasOwnProperty(\"prototype\");\n\n var verifyWritable = false;\n fun.prototype = 12\n verifyWritable = (fun.prototype === 12);\n\n return verifyValue && verifyWritable && !verifyEnumerable && verifyConfigurable && data === \"data\";\n } finally {\n delete Function.prototype.prototype;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "13.2-2-s",
+ "path": "TestCases/chapter13/13.2/13.2-2-s.js",
+ "description": "StrictMode - A TypeError is thrown when a strict mode code writes to properties named 'caller' of function instances.",
+ "test": "assertTrue((function testcase() {\n \"use strict\";\n try {\n var foo = function () {\n }\n foo.caller = 20;\n return false;\n } catch (ex) {\n return ex instanceof TypeError;\n }\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict())",
+ "strict_only": ""
+ },
+ {
+ "id": "13.2-3-s",
+ "path": "TestCases/chapter13/13.2/13.2-3-s.js",
+ "description": "StrictMode - Writing or reading from a property named 'arguments' of function objects is allowed under both strict and normal modes.",
+ "test": "assertTrue((function testcase() {\n \"use strict\";\n\n var foo = function () {\n this.arguments = 12;\n } \n var obj = new foo();\n return obj.arguments === 12;\n }).call(this));\n",
+ "strict_only": ""
+ },
+ {
+ "id": "13.2-4-s",
+ "path": "TestCases/chapter13/13.2/13.2-4-s.js",
+ "description": "StrictMode - A TypeError is thrown when a code in strict mode tries to write to 'arguments' of function instances.",
+ "test": "assertTrue((function testcase() {\n \"use strict\";\n try {\n var foo = function () {\n }\n foo.arguments = 20;\n return false;\n } catch (ex) {\n return ex instanceof TypeError;\n }\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict())",
+ "strict_only": ""
+ },
+ {
+ "id": "13.2-5-s",
+ "path": "TestCases/chapter13/13.2/13.2-5-s.js",
+ "description": "StrictMode - reading a property named 'caller' of function objects is not allowed outside the function",
+ "test": "assertTrue((function testcase() {\n var foo = new Function(\"'use strict';\");\n try {\n var temp = foo.caller;\n return false;\n }\n catch (e) {\n return e instanceof TypeError;\n }\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict())",
+ "strict_only": ""
+ },
+ {
+ "id": "13.2-7-s",
+ "path": "TestCases/chapter13/13.2/13.2-7-s.js",
+ "description": "StrictMode - enumerating over a function object looking for 'caller' fails outside of the function",
+ "test": "assertTrue((function testcase() {\n var foo = new Function(\"'use strict';\");\n \n for (var tempIndex in foo) {\n if (tempIndex === \"caller\") {\n return false;\n }\n }\n return true;\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict())",
+ "strict_only": ""
+ },
+ {
+ "id": "13.2-8-s",
+ "path": "TestCases/chapter13/13.2/13.2-8-s.js",
+ "description": "StrictMode - enumerating over a function object looking for 'caller' fails inside the function",
+ "test": "assertTrue((function testcase() {\n var foo = new Function(\"'use strict'; for (var tempIndex in this) {if (tempIndex===\\\"caller\\\") {return false;}}; return true;\");\n return foo();\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict())",
+ "strict_only": ""
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/13.2_Creating_Function_Objects.json b/website/resources/scripts/testcases2/13.2_Creating_Function_Objects.json
new file mode 100644
index 000000000..f637f6b88
--- /dev/null
+++ b/website/resources/scripts/testcases2/13.2_Creating_Function_Objects.json
@@ -0,0 +1,422 @@
+{
+ "testCollection": {
+ "name": "13.2_Creating_Function_Objects",
+ "numTests": 69,
+ "tests": [
+ {
+ "section": "13.2.1",
+ "description": "Creating function calls 32 elements depth",
+ "test": "(function(){\n (function(){\n (function(){\n (function(){\n (function(){\n (function(){\n (function(){\n (function(){\n (function(){\n (function(){\n (function(){\n (function(){\n (function(){\n (function(){\n (function(){\n (function(){\n (function(){\n (function(){\n (function(){\n (function(){\n (function(){\n (function(){\n (function(){\n (function(){\n (function(){\n (function(){\n (function(){\n (function(){\n (function(){\n (function(){\n (function(){\n (function(){})()\n })()\n })()\n })()\n })()\n })()\n })()\n })()\n })()\n })()\n })()\n })()\n })()\n })()\n })()\n })()\n })()\n })()\n })()\n })()\n })()\n })()\n })()\n })()\n })()\n })()\n })()\n })()\n })()\n })()\n })()\n})() \n",
+ "id": "S13.2.1_A1_T1"
+ },
+ {
+ "section": "13.2.1",
+ "description": "Adding new number property to a function argument within the function body,\nwhere explicit argument is an object defined with \"var __obj={}\"",
+ "test": "function __func(__arg){\n __arg.foo=7;\n}\n\nvar __obj={};\n\n__func(__obj);\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__obj.foo !== 7) {\n\t$ERROR('#1: __obj.foo === 7. Actual: __obj.foo ==='+__obj.foo);\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S13.2.1_A4_T1"
+ },
+ {
+ "section": "13.2.1",
+ "description": "Adding new string property to a function argument within the function body,\nwhere explicit argument is an object defined with \"__obj={}\"",
+ "test": "function __func(__arg){\n __arg.foo=\"whiskey gogo\";\n}\n\nvar __obj={};\n\n __func(__obj);\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__obj.foo !== \"whiskey gogo\") {\n\t$ERROR('#1: __obj.foo === \"whiskey gogo\". Actual: __obj.foo ==='+__obj.foo);\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S13.2.1_A4_T2"
+ },
+ {
+ "section": "13.2.1",
+ "description": "Adding new number property to a function argument within the function body,\nwhere array element \"arguments[0]\" is an object defined with \"__obj={}\"",
+ "test": "function __func(){\n arguments[0][\"PI\"]=3.14;\n}\n\nvar __obj={};\n\n__func(__obj);\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__obj.PI !== 3.14) {\n\t$ERROR('#1: __obj.PI === 3.14. Actual: __obj.PI ==='+__obj.PI);\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S13.2.1_A4_T3"
+ },
+ {
+ "section": "13.2.1",
+ "description": "Adding new number property to a function argument within the function body,\nwhere array element \"arguments[0]\" is an object defined with \"var __obj={}\"",
+ "test": "function __func(){\n arguments[0][\"E\"]=2.74;\n}\n\nvar __obj={};\n\n__func(__obj);\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__obj.E !== 2.74) {\n\t$ERROR('#1: __obj.E === 2.74. Actual: __obj.E ==='+__obj.E);\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S13.2.1_A4_T4"
+ },
+ {
+ "section": "13.2.1",
+ "description": "Sorting with closure",
+ "test": "var __arr = [4,3,2,1,4,3,2,1,4,3,2,1];\n//Sort uses closure\n//\n__arr.sort(\n\tfunction(x,y) { \n\t\tif (x>y){return -1;} \n\t\tif (x<y){return 1;} \n\t\tif (x==y){return 0;} \n\t}\n);\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__arr.toString() !== [4,4,4,3,3,3,2,2,2,1,1,1].toString()) {\n\t$ERROR('#1: __arr.toString() === [4,4,4,3,3,3,2,2,2,1,1,1].toString(). Actual: __arr.toString() ==='+__arr.toString());\n}\n\n//\n////////////////////////////////////////////////////////////////////////////// \n",
+ "id": "S13.2.1_A5_T1"
+ },
+ {
+ "section": "13.2.1",
+ "description": "Returning a function that approximates the derivative of f\nusing an interval of dx, which should be appropriately small",
+ "test": "// Return a function that approximates the derivative of f\n// using an interval of dx, which should be appropriately small.\nfunction derivative(f, dx) {\n return function(x) {\n return (f(x + dx) - f(x)) / dx;\n };\n}\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (Math.abs(derivative(Math.sin, 0.0001)(0) - derivative(Math.sin, 0.0001)(2*Math.PI)) >= 1/65536.0) {\n\t$ERROR('#1: Math.abs(derivative(Math.sin, 0.0001)(0) - derivative(Math.sin, 0.0001)(2*Math.PI)) <= 1/65536.0');\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S13.2.1_A5_T2"
+ },
+ {
+ "section": "13.2.1",
+ "description": "Declaring a function with \"function __func(arg1, arg2)\"",
+ "test": "function __func(arg1, arg2){\n arg1++;\n arg2+=\"BA\";\n};\n\nvar x=1;\ny=2;\nvar a=\"AB\"\nb=\"SAM\";\n\n__func(x,a);\n__func(y,b);\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (x!==1 || y!==2 || a!==\"AB\" || b!==\"SAM\") {\n\t$ERROR('#1: x === 1 and y === 2 and a === \"AB\" and b === \"SAM\". Actual: x ==='+x+' and y ==='+y+' and a ==='+a+' and b ==='+b);\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S13.2.1_A6_T1"
+ },
+ {
+ "section": "13.2.1",
+ "description": "Declaring a function with \"__func = function(arg1, arg2)\"",
+ "test": "__func = function(arg1, arg2){\n arg1++;\n arg2+=\"BA\";\n};\n\nvar x=1;\ny=2;\nvar a=\"AB\"\nb=\"SAM\";\n\n__func(x,a);\n__func(y,b);\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (x!==1 || y!==2 || a!==\"AB\" || b!==\"SAM\") {\n\t$ERROR('#1: x === 1 and y === 2 and a === \"AB\" and b === \"SAM\". Actual: x ==='+x+' and y ==='+y+' and a ==='+a+' and b ==='+b);\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S13.2.1_A6_T2"
+ },
+ {
+ "section": "13.2.1",
+ "description": "Returning null. Declaring a function with \"function __func()\"",
+ "test": "function __func(){\n var x = null;\n return x;\n}\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\ntry{\n var x=__func();\n} catch(e){\n $ERROR('#1: var x=__func() does not lead to throwing exception. Actual: exception is '+e);\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S13.2.1_A7_T1"
+ },
+ {
+ "section": "13.2.1",
+ "description": "Returning null. Declaring a function with \"var __func = function ()\"",
+ "test": "var __func = function (){\n var x = null;\n return x;\n}\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\ntry{\n var x=__func();\n} catch(e){\n $ERROR('#1: var x=__func() does not lead to throwing exception. Actual: exception is '+e);\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S13.2.1_A7_T2"
+ },
+ {
+ "section": "13.2.1",
+ "description": "Returning number. Declaring a function with \"function __func()\"",
+ "test": "function __func(){\n x = 1;\n return x;\n}\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#\ntry {\n\tx=x;\n\t$ERROR('#0: \"x=x\" lead to throwing exception');\n} catch (e) {}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\ntry{\n var __x=__func()\n} catch(e){\n $ERROR('#1: var __x=__func() does not lead to throwing exception. Actual: exception is '+e);\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (__x !== 1) {\n\t$ERROR('#2: __x === 1. Actual: __x ==='+__x);\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#3\nif (x !== 1) {\n\t$ERROR('#3: x === 1. Actual: x ==='+x);\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n",
+ "id": "S13.2.1_A7_T3"
+ },
+ {
+ "section": "13.2.1",
+ "description": "Returning boolean. Declaring a function with \"function __func()\"",
+ "test": "function __func(){\n var x = true;\n return x;\n}\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#\ntry {\n\tx=x;\n\t$ERROR('#0: \"x=x\" lead to throwing exception');\n} catch (e) {}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\ntry{\n var __x=__func()\n} catch(e){\n $ERROR('#1: var __x=__func() does not lead to throwing exception. Actual: exception is '+e);\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (!(__x)) {\n\t$ERROR('#2: __x === true. Actual: __x ==='+__x);\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#3\ntry {\n\tx=x;\n\t$ERROR('#3: \"x=x\" lead to throwing exception');\n} catch (e) {}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n",
+ "id": "S13.2.1_A7_T4"
+ },
+ {
+ "section": "13.2.1",
+ "description": "Throwing an exception within a function body. Declaring function with \"function __func()\"",
+ "test": "function __func(){\n var x = 1;\n throw (\"Catch Me If You Can\")\n return x;\n}\n\ntry{\n var x=__func()\n $ERROR('#0: var x=__func() lead to throwing exception');\n} catch(e){\n if (e !== \"Catch Me If You Can\") {\n \t$ERROR('#1: Exception === \"Catch Me If You Can\". Actual: exception ==='+e);\n }\n}\n",
+ "id": "S13.2.1_A8_T1"
+ },
+ {
+ "section": "13.2.1",
+ "description": "Throwing an exception within a function body. Declaring function with \"var __func = function (message)\"",
+ "test": "var CATCH_ME_IF_YOU_CAN = true;\n\nvar __func = function (message){\n var x = 1;\n throw (message)\n return x;\n}\n\ntry{\n var x=__func(CATCH_ME_IF_YOU_CAN)\n $ERROR('#0: var x=__func(CATCH_ME_IF_YOU_CAN) lead to throwing exception');\n} catch(e){\n if (!e) {\n \t$ERROR('#1: Exception === true. Actual: exception ==='+e);\n }\n}\n",
+ "id": "S13.2.1_A8_T2"
+ },
+ {
+ "section": "13.2.1",
+ "description": "Declaring a function with \"function __func()\" and no \"return\" in the function body",
+ "test": "var x;\n\nfunction __func(){\n x = true;\n}\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__func() !== undefined) {\n\t$ERROR('#1: __func() === undefined. Actual: __func() ==='+__func());\n};\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (!x) {\n\t$ERROR('#2: x === true. Actual: x === '+x);\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S13.2.1_A9.1_T1"
+ },
+ {
+ "section": "13.2.1",
+ "description": "Declaring a function with \"var __func = function()\" and no \"return\" in the function body",
+ "test": "var x;\n\nvar __func = function(){\n x = true;\n}\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__func() !== undefined) {\n\t$ERROR('#1: __func() === undefined. Actual: __func() ==='+__func());\n};\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (!x) {\n\t$ERROR('#2: x === true. Actual: x === '+x);\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S13.2.1_A9.1_T2"
+ },
+ {
+ "section": "13.2.1",
+ "description": "Using \"return\" with no expression. Declaring a function with \"function __func()\"",
+ "test": "var x; \n\nfunction __func(){\n x = 1;\n return;\n}\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__func() !== undefined) {\n\t$ERROR('#1: __func() === undefined. Actual: __func() ==='+__func());\n};\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (x!==1) {\n\t$ERROR('#2: x === 1. Actual: x === '+x);\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S13.2.1_A9_T1"
+ },
+ {
+ "section": "13.2.1",
+ "description": "Using \"return\" with no expression. Declaring a function with \"var __func = function()\"",
+ "test": "var x; \n\nvar __func = function(){\n x = 1;\n return;\n}\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__func() !== undefined) {\n\t$ERROR('#1: __func() === undefined. Actual: __func() ==='+__func());\n};\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (x!==1) {\n\t$ERROR('#2: x === 1. Actual: x === '+x);\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S13.2.1_A9_T2"
+ },
+ {
+ "section": "13.2.2",
+ "description": "Calling a function as a constructor after it has been declared",
+ "test": "function FACTORY(){\n this.id = 0;\n \n this.func = function (){\n return 5;\n }\n \n this.id = this.func();\n \n}\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\ntry {\n\tvar obj = new FACTORY();\n} catch (e) {\n\t$ERROR('#1: var obj = new FACTORY() does not lead to throwing exception. Actual: Exception is '+e);\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (obj.id !== 5) {\n\t$ERROR('#2: obj.id === 5. Actual: obj.id ==='+obj.id);\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S13.2.2_A10"
+ },
+ {
+ "section": "13.2.2",
+ "description": "Calling a function as a constructor after it has been declared with \"function func()\"",
+ "test": "function FACTORY(){\n this.id = 0;\n \n this.id = this.func();\n \n function func(){\n return \"id_string\";\n }\n \n}\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\ntry {\n\tvar obj = new FACTORY();\n\t$ERROR('#1: var obj = new FACTORY() lead to throwing exception');\n} catch (e) {}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n",
+ "id": "S13.2.2_A11"
+ },
+ {
+ "section": "13.2.2",
+ "description": "Calling a function as a constructor after it has been declared with \"function func()\"",
+ "test": "function FACTORY(){\n this.id = 0;\n \n this.id = func();\n \n function func(){\n return \"id_string\";\n }\n \n}\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\ntry {\n\tvar obj = new FACTORY();\n} catch (e) {\n\t$ERROR('#1: var obj = new FACTORY() does not lead to throwing exception. Actual: Exception is '+e);\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (obj.id !== \"id_string\") {\n\t$ERROR('#2: obj.id === \"id_string\". Actual: obj.id ==='+obj.id);\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S13.2.2_A12"
+ },
+ {
+ "section": "13.2.2",
+ "description": "Calling a function as a constructor after it has been declared by eval",
+ "test": "function FACTORY(){\n this.id = 0;\n \n this.id = func();\n \n eval(\"function func(){return \\\"id_string\\\";}\");\n \n}\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\ntry {\n\tvar obj = new FACTORY();\n\t$ERROR('#1: var obj = new FACTORY() lead to throwing exception');\n} catch (e) {}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S13.2.2_A13"
+ },
+ {
+ "section": "13.2.2",
+ "description": "Calling a function as a constructor after it has been declared by eval",
+ "test": "function FACTORY(){\n this.id = 0;\n \n eval(\"function func(){return \\\"id_string\\\";}\");\n \n this.id = func();\n \n}\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\ntry {\n\tvar obj = new FACTORY();\n} catch (e) {\n\t$ERROR('#1: var obj = new FACTORY() does not lead to throwing exception');\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S13.2.2_A14"
+ },
+ {
+ "section": "13.2.2",
+ "description": "Function declared at the end of the program and \"obj\" property is declared with \"var obj = {}\"",
+ "test": "var __obj = new __FACTORY();\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (typeof obj !== \"undefined\") {\n\t$ERROR('#1: typeof obj === \"undefined\". Actual: typeof obj ==='+typeof obj);\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (__obj.prop !== \"A\") {\n\t$ERROR('#2: __obj.prop === \"A\". Actual: __obj.prop ==='+__obj.prop);\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#3\nif (__obj.slot.prop !==1) {\n\t$ERROR('#3: __obj.slot.prop ===1. Actual: __obj.slot.prop ==='+__obj.slot.prop);\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\nfunction __FACTORY(){\n this.prop = 1;\n var obj = {};\n obj.prop = \"A\";\n obj.slot = this;\n return obj;\n}\n",
+ "id": "S13.2.2_A15_T1"
+ },
+ {
+ "section": "13.2.2",
+ "description": "Function declared at the end of the program and \"obj\" property is declared with \"obj = {}\"",
+ "test": "var __obj = new __FACTORY();\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (obj.prop !== \"A\") {\n\t$ERROR('#1: obj.prop === \"A\". Actual: obj.prop ==='+obj.prop);\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (__obj.prop !== \"A\") {\n\t$ERROR('#2: __obj.prop === \"A\". Actual: __obj.prop ==='+__obj.prop);\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#3\nif (__obj.slot.prop !==1) {\n\t$ERROR('#3: __obj.slot.prop === 1. Actual: __obj.slot.prop ==='+__obj.slot.prop);\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\nfunction __FACTORY(){\n this.prop = 1;\n obj = {};\n obj.prop = \"A\";\n obj.slot = this;\n return obj;\n}\n",
+ "id": "S13.2.2_A15_T2"
+ },
+ {
+ "section": "13.2.2",
+ "description": "Function declared at the end of the program and \"obj\" property is declared with \"var obj = {}\"",
+ "test": "__FACTORY = function (){\n this.prop = 1;\n var obj = {};\n obj.prop = \"A\";\n obj.slot = this;\n return obj;\n}\n\n__obj = new __FACTORY();\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (typeof obj !== \"undefined\") {\n\t$ERROR('#1: typeof obj === \"undefined\". Actual: typeof obj ==='+typeof obj);\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (__obj.prop !== \"A\") {\n\t$ERROR('#2: __obj.prop === \"A\". Actual: __obj.prop ==='+__obj.prop);\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#3\nif (__obj.slot.prop !==1) {\n\t$ERROR('#3: __obj.slot.prop ===1. Actual: __obj.slot.prop ==='+__obj.slot.prop);\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S13.2.2_A15_T3"
+ },
+ {
+ "section": "13.2.2",
+ "description": "Function declared at the end of the program and \"obj\" property is declared with \"obj = {}\"",
+ "test": "__FACTORY = function(){\n this.prop = 1;\n obj = {};\n obj.prop = \"A\";\n obj.slot = this;\n return obj;\n}\n\n__obj = new __FACTORY();\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (obj.prop !== \"A\") {\n\t$ERROR('#1: obj.prop === \"A\". Actual: obj.prop ==='+obj.prop);\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (__obj.prop !== \"A\") {\n\t$ERROR('#2: __obj.prop === \"A\". Actual: __obj.prop ==='+obj.prop);\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#3\nif (__obj.slot.prop !==1) {\n\t$ERROR('#3: __obj.slot.prop ===1. Actual: __obj.slot.prop ==='+obj.slot.prop);\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n",
+ "id": "S13.2.2_A15_T4"
+ },
+ {
+ "section": "13.2.2",
+ "description": ": Using \"is __obj = new function __func(){this.prop=1;}\" as FunctionExpression;",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (typeof __func !== \"undefined\") {\n\t$ERROR('#1: typeof __func === \"undefined\". Actual: typeof __func ==='+typeof __func);\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\nvar __obj = new function __func(){this.prop=1;};\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (__obj.prop !== 1) {\n\t$ERROR('#2: __obj.prop === 1. Actual: __obj.prop ==='+__obj.prop);\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#5\nif (typeof __func !== \"undefined\") {\n\t$ERROR('#5: typeof __func === \"undefined\". Actual: typeof __func ==='+typeof __func);\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S13.2.2_A16_T1"
+ },
+ {
+ "section": "13.2.2",
+ "description": ": Using \"var __obj = new function __func(arg){this.prop=arg;}(5)\" as FunctionExpression;",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (typeof __func !== \"undefined\") {\n\t$ERROR('#1: typeof __func === \"undefined\". Actual: typeof __func ==='+typeof __func);\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\nvar __obj = new function __func(arg){this.prop=arg;}(5);\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (__obj.prop !== 5) {\n\t$ERROR('#2: __obj.prop === 5. Actual: __obj.prop ==='+__obj.prop);\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#3\nif (typeof __func !== \"undefined\") {\n\t$ERROR('#3: typeof __func === \"undefined\". Actual: typeof __func ==='+typeof __func);\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S13.2.2_A16_T2"
+ },
+ {
+ "section": "13.2.2",
+ "description": ": Using \"is __obj = new function __func(arg){this.prop=arg; return {feat: ++arg}}(5)\" as FunctionExpression;",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (typeof __func !== \"undefined\") {\n\t$ERROR('#1: typeof __func === \"undefined\"');\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\nvar __obj = new function __func(arg){this.prop=arg; return {feat: ++arg}}(5);\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (__obj.prop !== undefined) {\n\t$ERROR('#2: __obj.prop === undefined. Actual: __obj.prop ==='+__obj.prop);\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#3\nif (__obj.feat !== 6) {\n\t$ERROR('#3: __obj.feat === 6. Actual: __obj.feat ==='+__obj.feat);\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#4\nif (typeof __func !== \"undefined\") {\n\t$ERROR('#4: typeof __func === \"undefined\". Actual: typeof __func ==='+typeof __func);\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S13.2.2_A16_T3"
+ },
+ {
+ "section": "13.2.2",
+ "description": "Using \"with\" statement within a function body",
+ "test": "var p1=\"alert\";\n\nvar __obj={p1:1,getRight:function(){return \"right\";}};\n\nthis.getRight=function(){return \"napravo\";};\n\n(function(){\n with(__obj){\n p1=\"w1\";\n function getRight(){return false;}\n }\n})();\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (p1!==\"alert\") {\n\t$ERROR('#1: p1 === \"alert\". Actual: p1==='+p1);\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (getRight()!==\"napravo\") {\n\t$ERROR('#2: getRight() === \"napravo\". Actual: getRight() === '+getRight());\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#3\nif (__obj.p1!==\"w1\") {\n\t$ERROR('#3: __obj.p1 === \"w1\". Actual: __obj.p1 ==='+__obj.p1);\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#4\nif (__obj.getRight()!==\"right\") {\n\t$ERROR('#4: __obj.getRight() === \"right\". Actual: __obj.getRight() ==='+__obj.getRight());\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n",
+ "id": "S13.2.2_A17_T1"
+ },
+ {
+ "section": "13.2.2",
+ "description": "Throwing an exception within \"with\" statement",
+ "test": "this.p1=\"alert\";\n\n__obj={p1:1,getRight:function(){return \"right\";}};\n\ngetRight=function(){return \"napravo\";};\n\ntry {\n\t(function(){\n with(__obj){\n p1=\"w1\";\n getRight=function(){return false;}\n throw p1;\n }\n })();\n} catch (e) {\n\tresukt = p1;\n}\n\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (p1!==\"alert\") {\n\t$ERROR('#1: p1 === \"alert\". Actual: p1==='+p1);\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (getRight()!==\"napravo\") {\n\t$ERROR('#2: getRight() === \"napravo\". Actual: getRight() === '+getRight());\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#3\nif (__obj.p1!==\"w1\") {\n\t$ERROR('#3: __obj.p1 === \"w1\". Actual: __obj.p1 ==='+__obj.p1);\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#4\nif (__obj.getRight()!==false) {\n\t$ERROR('#4: __obj.getRight() === false. Actual: __obj.getRight() === '+__obj.getRight());\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#5\nif (resukt !== \"alert\") {\n\t$ERROR('#5: resukt === \"alert\". Actual: resukt ==='+resukt);\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\nvar resukt;\n\n",
+ "id": "S13.2.2_A17_T2"
+ },
+ {
+ "section": "13.2.2",
+ "description": "In the check 4 we populate field getRight in __obj object since var getRight declaration adds variable to function scope\nbut getRight in statement resolves within with(__obj) scope and searchs getRight in __obj first",
+ "test": "p1=\"alert\";\n\nthis.__obj={p1:1,getRight:function(){return \"right\";}};\n\nvar getRight=function(){return \"napravo\";};\n\nresukt=(function(){\n with(__obj){\n p1=\"w1\";\n var getRight=function(){return false;};\n return p1;\n }\n})();\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (p1!==\"alert\") {\n\t$ERROR('#1: p1 === \"alert\". Actual: p1==='+p1);\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (getRight()!==\"napravo\") {\n\t$ERROR('#2: getRight() === \"napravo\". Actual: getRight()==='+getRight());\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#3\nif (__obj.p1!==\"w1\") {\n\t$ERROR('#3: __obj.p1 === \"w1\". Actual: __obj.p1 ==='+__obj.p1);\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#4\nif (__obj.getRight()!==false) {\n\t$ERROR('#4: __obj.getRight() === false. Actual: __obj.getRight()==='+__obj.getRight());\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#5\nif (resukt !== \"w1\") {\n\t$ERROR('#5: resukt === \"w1\". Actual: resukt ==='+resukt);\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\nvar resukt;\n\n",
+ "id": "S13.2.2_A17_T3"
+ },
+ {
+ "section": "13.2.2",
+ "description": "Object is declared with \"var __obj={callee:\"a\"}\"",
+ "test": "var callee=0, b;\n\nvar __obj={callee:\"a\"};\n\nresult=(function(){\n with (arguments){\n callee=1;\n b=true;\n }\n return arguments;\n})(__obj);\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (callee !== 0) {\n\t$ERROR('#1: callee === 0. Actual: callee ==='+callee);\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (__obj.callee !== \"a\") {\n\t$ERROR('#2: __obj.callee === \"a\". Actual: __obj.callee==='+__obj.callee);\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#3\nif (result.callee !== 1) {\n\t$ERROR('#3: result.callee === 1. Actual: result.callee ==='+result.callee);\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#4\nif (!(this.b)) {\n\t$ERROR('#4: this.b === true. Actual: this.b ==='+this.b);\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S13.2.2_A18_T1"
+ },
+ {
+ "section": "13.2.2",
+ "description": "Object is declared with \"__obj={callee:\"a\"}\"",
+ "test": "this.callee = 0;\nvar b;\n\n__obj={callee:\"a\"};\n\nfunction f(){\n with (arguments){\n callee=1;\n b=true;\n return arguments;\n }\n};\n\nresult=f(__obj);\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (callee !== 0) {\n\t$ERROR('#1: callee === 0. Actual: callee ==='+callee);\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (__obj.callee !== \"a\") {\n\t$ERROR('#2: __obj.callee === \"a\". Actual: __obj.callee ==='+__obj.callee);\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#3\nif (result.callee !== 1) {\n\t$ERROR('#3: result.callee === 1. Actual: result.callee ==='+result.callee);\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#4\nif (!(this.b)) {\n\t$ERROR('#4: this.b === true. Actual: this.b ==='+this.b);\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S13.2.2_A18_T2"
+ },
+ {
+ "section": "13.2.2",
+ "description": "Function is declared in the global scope",
+ "test": "var a = 1;\n\nvar __func= function(){return a;};\n\nvar __obj = {a:2};\n\nwith (__obj)\n{\n result = __func();\n}\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (result !== 1) {\n\t$ERROR('#1: result === 1. Actual: result ==='+result);\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S13.2.2_A19_T1"
+ },
+ {
+ "section": "13.2.2",
+ "description": "Function is declared in the object scope. Using \"with\" statement",
+ "test": "var a = 1;\n\nvar __obj = {a:2};\n\nwith (__obj)\n{\n result = (function(){return a;})();\n}\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (result !== 2) {\n\t$ERROR('#1: result === 2. Actual: result ==='+result);\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S13.2.2_A19_T2"
+ },
+ {
+ "section": "13.2.2",
+ "description": "Function is declared in the object scope and then an exception is thrown",
+ "test": "var a = 1;\n\nvar __obj = {a:2};\n\ntry {\n\twith (__obj)\n {\n var __func = function (){return a;};\n throw 3;\n }\n} catch (e) {\n\t;\n}\n\nresult = __func();\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (result !== 2) {\n\t$ERROR('#1: result === 2. Actual: result ==='+result);\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n\n\n",
+ "id": "S13.2.2_A19_T3"
+ },
+ {
+ "section": "13.2.2",
+ "description": "Function is declared in the hierarchical object scope and then an exception is thrown",
+ "test": "var a = 1;\n\nvar __obj = {a:2,__obj:{a:3}};\n\ntry {\n\twith (__obj)\n {\n with(__obj){\n var __func = function(){return a;};\n throw 5;\n }\n }\n} catch (e) {\n\t;\n}\n\nresult = __func();\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (result !== 3) {\n\t$ERROR('#1: result === 3. Actual: result ==='+result);\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n\n\n",
+ "id": "S13.2.2_A19_T4"
+ },
+ {
+ "section": "13.2.2",
+ "description": "Function is declared in the object scope, then an exception is thrown and the object is deleted",
+ "test": "var a = 1;\n\nvar __obj = {a:2};\n\nwith (__obj)\n{\n try {\n \n \tvar __func = function()\n {\n return a;\n }\n throw 3;\n } catch (e) {\n \t;\n }\n}\n\ndelete __obj;\n\nresult = __func();\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (result !== 2) {\n\t$ERROR('#1: result === 2. Actual: result ==='+result);\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S13.2.2_A19_T5"
+ },
+ {
+ "section": "13.2.2",
+ "description": "Function is declared in the \"object->do-while\" scope, then the object is deleted and another object with the same name is declared",
+ "test": "var a = 1;\n\nvar __obj = {a:2};\n\nwith (__obj)\n{\n do {\n var __func = function()\n {\n return a;\n }\n } while(0);\n}\n\ndelete __obj;\n\nvar __obj = {a:3};\n\nwith (__obj)\n{\n result = __func();\n}\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (result !== 2) {\n\t$ERROR('#1: result === 2. Actual: result ==='+result);\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n\n\n\n\n",
+ "id": "S13.2.2_A19_T6"
+ },
+ {
+ "section": "13.2.2",
+ "description": "Function is declared in the object scope as a variable",
+ "test": "var a = 1;\n\nvar __obj = {a:2};\n\nwith (__obj)\n{\n var __func = function()\n {\n return a;\n }\n}\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__obj.hasOwnProperty('__func')) {\n\t$ERROR('#1: __obj.hasOwnProperty(\\'__func\\') === false');\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n///////////////////////////////////// /////////////////////////////////////////\n//CHECK#2\nif (!(this.hasOwnProperty('__func'))) {\n\t$ERROR('#2: this.hasOwnProperty(\\'__func\\') === true');\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#3\nif (__func in __obj) {\n\t$ERROR('#3: (__func in __obj) === false');\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#4\nif (this.__func === undefined) {\n\t$ERROR('#4: this.__func !== undefined');\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S13.2.2_A19_T7"
+ },
+ {
+ "section": "13.2.2",
+ "description": "Function is declared multiply times",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#0\nif (typeof __func !== \"undefined\") {\n\t$ERROR('#0: typeof __func === \"undefined\". Actual: typeof __func ==='+typeof __func);\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\nvar a = 1, b = \"a\";\n\nvar __obj = {a:2};\n\nwith (__obj)\n{\n while(1){\n var __func = function()\n {\n return a;\n }\n break;\n }\n}\n\ndelete __obj;\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__func() !== 2) {\n\t$ERROR('#1: __func() === 2. Actual: __func() ==='+__func());\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\nvar __obj = {a:3,b:\"b\"};\n\nwith (__obj)\n{\n var __func = function()\n {\n return b;\n }\n}\n\ndelete __obj;\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (__func()!==\"b\") {\n\t$ERROR('#2: __func()===\"b\". Actual: __func()==='+__func());\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\nwith ({a:99,b:\"c\"})\n{\n //////////////////////////////////////////////////////////////////////////////\n //CHECK#3\n if (__func() !== \"b\") {\n \t$ERROR('#3: __func()===\"b\". Actual: __func()==='+__func());\n }\n //\n //////////////////////////////////////////////////////////////////////////////\n}\n",
+ "id": "S13.2.2_A19_T8"
+ },
+ {
+ "section": "13.2.2",
+ "description": "Declaring a function with \"function __func()\"",
+ "test": "var __MONSTER=\"monster\";\nvar __PREDATOR=\"predator\";\n\nfunction __PROTO(){};\n\ntry{\n __PROTO.type=__MONSTER;\n}\ncatch(e){\n $ERROR('#0: __PROTO.type=__MONSTER does not lead to throwing exception')\n}\n\nfunction __FACTORY(){this.name=__PREDATOR};\n\n__FACTORY.prototype=__PROTO;\n\nvar __monster = new __FACTORY();\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (!(__PROTO.isPrototypeOf(__monster))) {\n\t$ERROR('#1: __PROTO.isPrototypeOf(__monster) must be true');\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (__monster.type !==__MONSTER) {\n\t$ERROR('#2: __monster.type ===__MONSTER. Actual: __monster.type ==='+__monster.type);\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S13.2.2_A1_T1"
+ },
+ {
+ "section": "13.2.2",
+ "description": "Declaring a function with \"var __PROTO = function()\"",
+ "test": "var __MONSTER=\"monster\";\nvar __PREDATOR=\"predator\";\n\nvar __PROTO = function(){};\n\ntry{\n __PROTO.type=__MONSTER;\n}\ncatch(e){\n $FAIL('#0: __PROTO.type=__MONSTER does not lead to throwing exception')\n}\n\nvar __FACTORY = function(){this.name=__PREDATOR};\n\n__FACTORY.prototype=__PROTO;\n\nvar __monster = new __FACTORY();\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (!(__PROTO.isPrototypeOf(__monster))) {\n\t$ERROR('#1: __PROTO.isPrototypeOf(__monster) must be true');\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (__monster.type !==__MONSTER) {\n\t$ERROR('#2: __monster.type ===__MONSTER. Actual: __monster.type ==='+__monster.type);\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S13.2.2_A1_T2"
+ },
+ {
+ "section": "13.2.2",
+ "description": "Trying to [[call]] this function",
+ "test": "var __PLANT=\"flower\";\nvar __ROSE=\"rose\";\n\nfunction __PROTO(){};\n\ntry{\n __PROTO.type=__PLANT;\n}\ncatch(e){\n $ERROR('#0: __PROTO.type=__PLANT does not lead to throwing exception')\n}\n\nfunction __FACTORY(){this.name=__ROSE};\n\n__FACTORY.prototype=__PROTO;\n\nvar __rose = new __FACTORY();\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\ntry{\n __rose();\n $ERROR('#1: __rose() lead to throwing exception');\n} catch(e){\n if (!(e instanceof TypeError)) {\n \t$ERROR('#2: Exception Type is TypeError. Actual: exception ==='+e);\n }\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S13.2.2_A2"
+ },
+ {
+ "section": "13.2.2, 15.2.3.1",
+ "description": "Declaring a function with \"function __FACTORY()\"",
+ "test": "function __FACTORY(){};\n__FACTORY.prototype=1;\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (typeof __FACTORY.prototype !== 'number') {\n\t$ERROR('#1: typeof __FACTORY.prototype === \\'number\\'. Actual: typeof __FACTORY.prototype ==='+(typeof __FACTORY.prototype));\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\nvar __device = new __FACTORY();\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (!(Object.prototype.isPrototypeOf(__device))) {\n\t$ERROR('#2: Object.prototype.isPrototypeOf(__device) === true');\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S13.2.2_A3_T1"
+ },
+ {
+ "section": "13.2.2, 15.2.3.1",
+ "description": "Declaring a function with \"var __FACTORY = function()\"",
+ "test": "var __FACTORY = function(){};\n__FACTORY.prototype=1;\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (typeof __FACTORY.prototype !== 'number') {\n\t$ERROR('#1: typeof __FACTORY.prototype === \\'number\\'. Actual: typeof __FACTORY.prototype ==='+(typeof __FACTORY.prototype));\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\nvar __device = new __FACTORY();\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (!(Object.prototype.isPrototypeOf(__device))) {\n\t$ERROR('#2: Object.prototype.isPrototypeOf(__device) === true');\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S13.2.2_A3_T2"
+ },
+ {
+ "section": "13.2.2",
+ "description": "Declaring a function with \"function __FACTORY()\"",
+ "test": "var __CUBE=\"cube\";\n\nfunction __FACTORY(){\n};\n__FACTORY.prototype={ shape:__CUBE, printShape:function(){return this.shape;} };\n\nvar __device = new __FACTORY();\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__device.printShape === undefined) {\n\t$ERROR('#1: __device.printShape !== undefined. Actual: __device.printShape ==='+__device.printShape);\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (__device.printShape() !== __CUBE) {\n\t$ERROR('#2: __device.printShape() === __CUBE. Actual: __device.printShape() ==='+__device.printShape());\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S13.2.2_A4_T1"
+ },
+ {
+ "section": "13.2.2",
+ "description": "Declaring a function with \"__FACTORY = function()\"",
+ "test": "__CUBE=\"cube\";\n\n__FACTORY = function(){};\n\n__FACTORY.prototype={ shape:__CUBE, printShape:function(){return this.shape;} };\n\n__device = new __FACTORY();\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__device.printShape === undefined) {\n\t$ERROR('#1: __device.printShape !== undefined. Actual: __device.printShape ==='+__device.printShape);\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (__device.printShape() !== __CUBE) {\n\t$ERROR('#2: __device.printShape() === __CUBE. Actual: __device.printShape() ==='+__device.printShape());\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S13.2.2_A4_T2"
+ },
+ {
+ "section": "13.2.2",
+ "description": "Declaring a function with \"function __FACTORY(arg1, arg2)\"",
+ "test": "__VOLUME=8;\n__RED=\"red\";\n__ID=12342;\n__TOP=1.1;\n__BOTTOM=0.0;\n__LEFT=0.0;\n\n\nfunction __FACTORY(arg1, arg2){\n\tthis.volume=__VOLUME;\n\tcolor=__RED;\n\tthis.id=arg1;\n\ttop=arg2;\n\tthis.bottom=arguments[3];\n\tleft=arguments[4];\n};\n\n__device = new __FACTORY(__ID, __TOP, __BOTTOM, __LEFT);\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__device.color !== undefined) {\n\t$ERROR('#1: __device.color === undefined. Actual: __device.color ==='+__device.color);\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (__device.volume !== __VOLUME) {\n\t$ERROR('#2: __device.volume === __VOLUME. Actual: __device.volume ==='+__device.volume);\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#3\nif (__device.top !== undefined) {\n\t$ERROR('#3: __device.top === undefined. Actual: __device.top ==='+__device.top);\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#4\nif (__device.id !== __ID) {\n\t$ERROR('#4: __device.id === __ID. Actual: __device.id ==='+__device.id);\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#5\nif (__device.left !== undefined) {\n\t$ERROR('#5: __device.left === undefined. Actual: __device.left ==='+__device.left);\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#6\nif (__device.bottom !== __BOTTOM) {\n\t$ERROR('#6: __device.bottom === __BOTTOM. Actual: __device.bottom ==='+__device.bottom);\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S13.2.2_A5_T1"
+ },
+ {
+ "section": "13.2.2",
+ "description": "Declaring a function with \"__FACTORY = function(arg1, arg2)\"",
+ "test": "__VOLUME=8;\n__RED=\"red\";\n__ID=12342;\n__TOP=1.1;\n__BOTTOM=0.0;\n__LEFT=0.0;\n\n\n__FACTORY = function(arg1, arg2){\n\tthis.volume=__VOLUME;\n\tcolor=__RED;\n\tthis.id=arg1;\n\ttop=arg2;\n\tthis.bottom=arguments[3];\n\tleft=arguments[4];\n};\n\n__device = new __FACTORY(__ID, __TOP, __BOTTOM, __LEFT);\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__device.color !== undefined) {\n\t$ERROR('#1: __device.color === undefined. Actual: __device.color ==='+__device.color);\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (__device.volume !== __VOLUME) {\n\t$ERROR('#2: __device.volume === __VOLUME. Actual: __device.volume ==='+__device.volume);\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#3\nif (__device.top !== undefined) {\n\t$ERROR('#3: __device.top === undefined. Actual: __device.top ==='+__device.top);\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#4\nif (__device.id !== __ID) {\n\t$ERROR('#4: __device.id === __ID. Actual: __device.id ==='+__device.id);\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#5\nif (__device.left !== undefined) {\n\t$ERROR('#5: __device.left === undefined. Actual: __device.left ==='+__device.left);\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#6\nif (__device.bottom !== __BOTTOM) {\n\t$ERROR('#6: __device.bottom === __BOTTOM. Actual: __device.bottom ==='+__device.bottom);\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S13.2.2_A5_T2"
+ },
+ {
+ "section": "13.2.2",
+ "description": "Declaring a function with \"__func = function(arg)\"",
+ "test": "__FOO=\"fooValue\";\n__BAR=\"barValue\";\n\n__func = function(arg){\n\tthis.foo=arg;\n return 0;\n\tthis.bar=arguments[1];\n};\n\n__obj = new __func(__FOO, __BAR);\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__obj.foo!==__FOO) {\n\t$ERROR('#1: __obj.foo === __FOO. Actual: __obj.foo==='+__obj.foo);\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (__obj.bar!==undefined) {\n\t$ERROR('#2: __obj.bar === undefined. Actual: __obj.bar==='+__obj.bar);\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S13.2.2_A6_T1"
+ },
+ {
+ "section": "13.2.2",
+ "description": "Declaring a function with \"function __func (arg)\"",
+ "test": "var __FOO=\"fooValue\";\nvar __BAR=\"barValue\";\n\nfunction __func (arg){\n\tthis.foo=arg;\n return true;\n\tthis.bar=arguments[1];\n};\n\nvar __obj = new __func(__FOO, __BAR);\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__obj.foo!==__FOO) {\n\t$ERROR('#1: __obj.foo === __FOO. Actual: __obj.foo==='+__obj.foo);\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (__obj.bar!==undefined) {\n\t$ERROR('#2: __obj.bar === undefined. Actual: __obj.bar==='+__obj.bar);\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S13.2.2_A6_T2"
+ },
+ {
+ "section": "13.2.2",
+ "description": "Declaring a function with \"as __func = function(arg)\"",
+ "test": "var __FRST=\"one\";\nvar __SCND=\"two\";\n\nfunction __func (arg1, arg2){\n\tthis.first=arg1;\n\tvar __obj={second:arg2};\n return __obj;\n\t\n};\n\nvar __obj__ = new __func(__FRST, __SCND);\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__obj__.first !== undefined) {\n\t$ERROR('#1: __obj__.first === undefined. Actual: __obj__.first==='+__obj__.first);\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (__obj__.second !== __SCND) {\n\t$ERROR('#2: __obj__.second === __SCND. Actual: __obj__.second ==='+__obj__.second);\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S13.2.2_A7_T1"
+ },
+ {
+ "section": "13.2.2",
+ "description": "Declaring a \"function as function __func (arg)\"",
+ "test": "__FRST=\"one\";\n__SCND=\"two\";\n\n__func = function(arg1, arg2){\n\tthis.first=arg1;\n\tvar __obj={second:arg2};\n return __obj;\n\t\n};\n\n__obj__ = new __func(__FRST, __SCND);\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__obj__.first !== undefined) {\n\t$ERROR('#1: __obj__.first === undefined. Actual: __obj__.first==='+__obj__.first);\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (__obj__.second !== __SCND) {\n\t$ERROR('#2: __obj__.second === __SCND. Actual: __obj__.second ==='+__obj__.second);\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S13.2.2_A7_T2"
+ },
+ {
+ "section": "13.2.2",
+ "description": "Creating a function whose prototype contains \"return\" followed by declaration of another function",
+ "test": "var __FRST=\"one\";\nvar __SCND=\"two\";\n\nvar __func = function(arg1, arg2){\n\tthis.first=arg1;\n\t\n\t__gunc.prop=arg2;\n return __gunc;\n // function declaration\n function __gunc(arg){return ++arg};\n\t\n};\n\nvar __instance = new __func(__FRST, __SCND);\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__instance.first !== undefined) {\n\t$ERROR('#1: __instance.first === undefined. Actual: __instance.first ==='+__instance.first);\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (__instance.prop!==__SCND) {\n\t$ERROR('#2: __instance.prop === __SCND. Actual: __instance.prop ==='+__instance.prop);\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#3\nif (__instance(1)!== 2) {\n\t$ERROR('#2: __instance(1)=== 2. Actual: __instance(1) ==='+__instance(1));\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n",
+ "id": "S13.2.2_A8_T1"
+ },
+ {
+ "section": "13.2.2",
+ "description": "Creating a function whose prototype contains declaration of another function declared as a variable",
+ "test": "var __FRST=\"one\";\nvar __SCND=\"two\";\n\nvar __func = function(arg1, arg2){\n\tthis.first=arg1;\n\tvar __gunc = function(arg){return arg+=\"BA\"};\n\t__gunc.prop=arg2;\n return __gunc;\n\t\n};\n\nvar __instance = new __func(__FRST, __SCND);\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__instance.first !== undefined) {\n\t$ERROR('#1: __instance.first === undefined. Actual: __instance.first ==='+__instance.first);\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (__instance.prop!==__SCND) {\n\t$ERROR('#2: __instance.prop === __SCND. Actual: __instance.prop ==='+__instance.prop);\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#3\nif (__instance(\"SAM\")!== \"SAMBA\") {\n\t$ERROR('#2: __instance(\"SAM\") === \"SAMBA\". Actual: __instance(\"SAM\") ==='+__instance(\"SAM\"));\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n",
+ "id": "S13.2.2_A8_T2"
+ },
+ {
+ "section": "13.2.2",
+ "description": "Creating a function whose prototype contains declaration of another function defined by using Function.call method",
+ "test": "var __FRST=\"one\";\nvar __SCND=\"two\";\n\nvar __func = function(arg1, arg2){\n\tthis.first=arg1;\n\tvar __gunc = Function.call(this,\"arg\",\"return ++arg;\");\n\t__gunc.prop=arg2;\n return __gunc;\n\t\n};\n\nvar __instance = new __func(__FRST, __SCND);\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__instance.first !== undefined) {\n\t$ERROR('#1: __instance.first === undefined. Actual: __instance.first ==='+__instance.first);\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (__instance.prop!==__SCND) {\n\t$ERROR('#2: __instance.prop === __SCND. Actual: __instance.prop ==='+__instance.prop);\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#3\nif (__instance(1)!== 2) {\n\t$ERROR('#2: __instance(1)=== 2. Actual: __instance(1) ==='+__instance(1));\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n",
+ "id": "S13.2.2_A8_T3"
+ },
+ {
+ "section": "13.2.2",
+ "description": "Calling a function as a constructor",
+ "test": "function FACTORY(){\n this.id = 0;\n \n this.id = this.func();\n \n this.func = function (){\n return 5;\n }\n \n}\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\ntry {\n\tvar obj = new FACTORY();\n\t$ERROR('#1: var obj = new FACTORY() lead to throwing exception');\n} catch (e) {}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S13.2.2_A9"
+ },
+ {
+ "section": "13.2",
+ "description": "Using \"function __func(){}\" as a FunctionDeclaration",
+ "test": "function __func(){};\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__func.prototype === undefined) {\n\t$ERROR('#1: __func.prototype !== undefined');\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S13.2_A1_T1"
+ },
+ {
+ "section": "13.2",
+ "description": "Using \"var __func = function(){}\" as a FunctionDeclaration",
+ "test": "var __func = function(){};\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__func.prototype === undefined) {\n\t$ERROR('#1: __func.prototype !== undefined');\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S13.2_A1_T2"
+ },
+ {
+ "section": "13.2",
+ "description": "Nesting level is two",
+ "test": "var __JEDI=\"jedi\";\n\nfunction __FUNC(){\n function __GUNC(){\n return arguments[0];\n };\n \n return __GUNC;\n};\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__FUNC()(__JEDI) !== __JEDI) {\n\t$ERROR('#1: __FUNC()(__JEDI) === __JEDI. Actual: __FUNC()(__JEDI) ==='+__FUNC()(__JEDI));\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S13.2_A2_T1"
+ },
+ {
+ "section": "13.2",
+ "description": "Nesting level is three",
+ "test": "var __ROBOT=\"C3PO\";\n\nfunction __FUNC(){\n function __GUNC(){\n return arguments[0];\n };\n function __HUNC(){\n return __GUNC;\n };\n return __HUNC;\n};\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__FUNC()()(__ROBOT) !== __ROBOT) {\n\t$ERROR('#1: __FUNC()()(__ROBOT) === __ROBOT. Actual: __FUNC()()(__ROBOT) ==='+__FUNC()()(__ROBOT));\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S13.2_A2_T2"
+ },
+ {
+ "section": "13.2",
+ "description": "Creating functions with various FormalParameterList and checking their lengths",
+ "test": "function __func(){};\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__func.length !== 0) {\n\t$ERROR('#1: __func.length === 0. Actual: __func.length ==='+__func.length);\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\nfunction __gunc(a,b,c){};\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (__gunc.length !== 3) {\n\t$ERROR('#2: __gunc.length === 3. Actual: __gunc.length ==='+__gunc.length);\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n",
+ "id": "S13.2_A3"
+ },
+ {
+ "section": "13.2",
+ "description": "Checking prototype, prototype.constructor properties and {DontEnum} property of a constructor.\nUsing \"function __func(){}\" as a FunctionDeclaration",
+ "test": "function __func(){};\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (typeof __func.prototype !== 'object') {\n\t$ERROR('#1: typeof __func.prototype === \\'object\\'. Actual: typeof __gunc.prototype ==='+typeof __gunc.prototype);\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (__func.prototype.constructor !== __func) {\n\t$ERROR('#2: __func.prototype.constructor === __func. Actual: __gunc.prototype.constructor ==='+__gunc.prototype.constructor);\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\nvar __constructor_was__enumed;\n\nfor (__prop in __func.prototype){\n if (__prop = 'constructor')\n __constructor_was__enumed = true;\n}\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#3\nif (__constructor_was__enumed) {\n\t$ERROR('#3: __constructor_was__enumed === false. Actual: __constructor_was__enumed ==='+__constructor_was__enumed);\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n\n\n\n\n",
+ "id": "S13.2_A4_T1"
+ },
+ {
+ "section": "13.2",
+ "description": "Checking prototype, prototype.constructor properties and {DontEnum} property of a constructor.\nUsing \"var __gunc = function(){}\" as a FunctionDeclaration",
+ "test": "var __gunc = function(){};\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (typeof __gunc.prototype !== 'object') {\n\t$ERROR('#1: typeof __gunc.prototype === \\'object\\'. Actual: typeof __gunc.prototype ==='+typeof __gunc.prototype);\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (__gunc.prototype.constructor !== __gunc) {\n\t$ERROR('#2: __gunc.prototype.constructor === __gunc. Actual: __gunc.prototype.constructor ==='+__gunc.prototype.constructor);\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\nvar __constructor_was__enumed;\n\nfor (__prop in __gunc.prototype){\n if (__prop = 'constructor')\n __constructor_was__enumed = true;\n}\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#3\nif (__constructor_was__enumed) {\n\t$ERROR('#3: __constructor_was__enumed === false. Actual: __constructor_was__enumed ==='+__constructor_was__enumed);\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n\n\n\n\n",
+ "id": "S13.2_A4_T2"
+ },
+ {
+ "section": "13.2, 15.3.3.1",
+ "description": "Function.prototype.isPrototypeOf() is used",
+ "test": "function __func(){};\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (!(Function.prototype.isPrototypeOf(__func))) {\n\t$ERROR('#1: Function.prototype.isPrototypeOf(__func)');\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n\nvar __gunc = function(){};\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (!(Function.prototype.isPrototypeOf(__gunc))) {\n\t$ERROR('#1: Function.prototype.isPrototypeOf(__gunc)');\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n\n",
+ "id": "S13.2_A5"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/13_Function_Definition.json b/website/resources/scripts/testcases2/13_Function_Definition.json
new file mode 100644
index 000000000..541ffccc8
--- /dev/null
+++ b/website/resources/scripts/testcases2/13_Function_Definition.json
@@ -0,0 +1,261 @@
+{
+ "testCollection": {
+ "name": "13_Function_Definition",
+ "numTests": 42,
+ "tests": [
+ {
+ "section": "13",
+ "description": "Checking the type of y",
+ "test": "var __func = function __exp__func(){return 0;};\n\n////////////////////////////////////////////////\n// //////////////////////////////\n//CHECK#1\nif (typeof __func !== \"function\") {\n\t$ERROR('#1: typeof __func === \"function\". Actual: typeof __func ==='+typeof __func);\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (typeof __exp__func !== \"undefined\"){\n $ERROR('#2: typeof __exp__func === \"undefined\". Actual: typeof __exp__func ==='+typeof __exp__func);\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S13_A1"
+ },
+ {
+ "section": "13",
+ "description": "Using function as a property of an object",
+ "test": "function __ziggy__func(){return \"ziggy stardust\"}\n\nvar __music_box={};\n\n__music_box.ziggy = __ziggy__func;\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#\nif (typeof __music_box.ziggy !== \"function\") {\n\t$ERROR('#1: typeof __music_box.ziggy === \"function\". Actual: typeof __music_box.ziggy ==='+typeof __music_box.ziggy);\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (__music_box.ziggy() !== \"ziggy stardust\") {\n\t$ERROR('#2: __music_box.ziggy() === \"ziggy stardust\". Actual: __music_box.ziggy() ==='+__music_box.ziggy());\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S13_A10"
+ },
+ {
+ "section": "13",
+ "description": "Returning result of \"delete arguments\"",
+ "test": "function __func(){ return delete arguments;}\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__func(\"A\",\"B\",1,2)) {\n\t$ERROR('#1: arguments property has attribute { DontDelete }');\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S13_A11_T1"
+ },
+ {
+ "section": "13",
+ "description": "Checking if deleting the arguments property fails and then returning it",
+ "test": "function __func(){ \n delete arguments;\n return arguments;\n}\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (typeof __func(\"A\",\"B\",1,2) !== \"object\") {\n\t$ERROR('#1: arguments property has attribute { DontDelete }');\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S13_A11_T2"
+ },
+ {
+ "section": "13",
+ "description": "Deleting arguments[i] and returning result of the operation",
+ "test": "function __func(){\n was_del=false;\n for (i=0; i < arguments.length; i++)\n was_del= was_del || delete arguments[i];\n return was_del;\n}\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (!__func(\"A\",\"B\",1,2)) {\n\t$ERROR('#1: Since arguments property has attribute { DontDelete } elements of arguments can be deleted');\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S13_A11_T3"
+ },
+ {
+ "section": "13",
+ "description": "Deleting arguments[i] and checking the type of arguments[i]",
+ "test": "function __func(){\n is_undef=true;\n for (i=0; i < arguments.length; i++)\n {\n delete arguments[i];\n is_undef= is_undef && (typeof arguments[i] === \"undefined\");\n }; \n return is_undef;\n};\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (!__func(\"A\",\"B\",1,2)) {\n\t$ERROR('#1: Since arguments property has attribute { DontDelete }, but elements of arguments can be deleted');\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S13_A11_T4"
+ },
+ {
+ "section": "13",
+ "description": "Checking if deleting a function that is declared in global scope fails",
+ "test": "ALIVE=\"Letov is alive\"\n\nfunction __func(){\n return ALIVE;\n};\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (delete __func) {\n\t$ERROR('#1: delete __func returning false');\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (__func() !== ALIVE) {\n\t$ERROR('#2: __func() === ALIVE. Actual: __func() ==='+__func());\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S13_A12_T1"
+ },
+ {
+ "section": "13",
+ "description": "Checking if deleting a function that is declared in function scope fails",
+ "test": "ALIVE=\"Letov is alive\"\n\nfunction __cont(){\n\n function __func(){\n return ALIVE;\n };\n \n //////////////////////////////////////////////////////////////////////////////\n //CHECK#1\n if (delete __func) {\n \t$ERROR('#1: delete __func returning false');\n }\n //\n //////////////////////////////////////////////////////////////////////////////\n \n //////////////////////////////////////////////////////////////////////////////\n //CHECK#2\n if (__func() !== ALIVE) {\n \t$ERROR('#2: __func() === ALIVE. Actual: __func() ==='+__func());\n }\n //\n //////////////////////////////////////////////////////////////////////////////\n};\n\n__cont();\n",
+ "id": "S13_A12_T2"
+ },
+ {
+ "section": "13",
+ "description": "Deleting arguments[i]",
+ "test": "function __func(__arg){\n delete arguments[0];\n if (arguments[0] !== undefined) {\n $ERROR('#1.1: arguments[0] === undefined');\n }\n return __arg;\n}\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__func(1) !== 1) {\n\t$ERROR('#1.2: __func(1) === 1. Actual: __func(1) ==='+__func(1));\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S13_A13_T1"
+ },
+ {
+ "section": "13",
+ "description": "Changing arguments value and then deleting the argument",
+ "test": "function __func(__arg){\n __arg = 2;\n delete arguments[0];\n if (arguments[0] !== undefined) {\n $ERROR('#1.1: arguments[0] === undefined');\n }\n return __arg;\n}\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__func(1) !== 2) {\n\t$ERROR('#1.2: __func(1) === 2. Actual: __func(1) ==='+__func(1));\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S13_A13_T2"
+ },
+ {
+ "section": "13",
+ "description": "Changing argument value, deleting the argument and then defining a new value for arguments[i]",
+ "test": "function __func(__arg){\n __arg = 2;\n delete arguments[0];\n if (arguments[0] !== undefined) {\n $ERROR('#1.1: arguments[0] === undefined');\n }\n arguments[0] = \"A\";\n if (arguments[0] !== \"A\") {\n $ERROR('#1.2: arguments[0] === \"A\"');\n }\n return __arg;\n}\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__func(1) !== 2) {\n\t$ERROR('#1.3: __func(1) === 2. Actual: __func(1) ==='+__func(1));\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S13_A13_T3"
+ },
+ {
+ "section": "13",
+ "description": "Defining function name with unicode symbols",
+ "test": "eval(\"function __func\\u0041(__arg){return __arg;};\");\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (typeof __funcA !== \"function\") {\n\t$ERROR('#1: unicode symbols in function name are allowed');\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S13_A14"
+ },
+ {
+ "section": "13",
+ "description": "Declaring a function with \"__func(arguments)\"",
+ "test": "function __func(arguments){\n return arguments;\n};\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__func(42) !== 42) {\n\t$ERROR('#1: \"arguments\" variable overrides ActivationObject.arguments');\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S13_A15_T1"
+ },
+ {
+ "section": "13",
+ "description": "Overriding arguments within functions body",
+ "test": "THE_ANSWER=\"Answer to Life, the Universe, and Everything\";\n\nfunction __func(){\n var arguments = THE_ANSWER;\n return arguments;\n};\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__func(42,42,42) !== THE_ANSWER) {\n\t$ERROR('#1: \"arguments\" variable overrides ActivationObject.arguments');\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S13_A15_T2"
+ },
+ {
+ "section": "13",
+ "description": "Declaring a variable named with \"arguments\" without a function",
+ "test": "THE_ANSWER=\"Answer to Life, the Universe, and Everything\";\n\nvar arguments = THE_ANSWER;\n\nfunction __func(arguments){\n return arguments;\n \n};\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (typeof __func() !== \"undefined\") {\n\t$ERROR('#1: typeof __func() === \"undefined\". Actual: typeof __func() ==='+typeof __func());\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (__func(\"The Ultimate Question\") !== \"The Ultimate Question\") {\n\t$ERROR('#2: __func(\"The Ultimate Question\") === \"The Ultimate Question\". Actual: __func(\"The Ultimate Question\")==='+__func(\"The Ultimate Question\"));\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S13_A15_T3"
+ },
+ {
+ "section": "13",
+ "description": "Declaring a variable named with \"arguments\" and following a \"return\" statement within a function body",
+ "test": "THE_ANSWER=\"Answer to Life, the Universe, and Everything\";\n\nfunction __func(){\n return typeof arguments;\n var arguments = THE_ANSWER;\n};\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__func(42,42,42) !== \"object\") {\n\t$ERROR('#1: __func(42,42,42) === \"object\". Actual: __func(42,42,42)==='+__func(42,42,42));\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S13_A15_T4"
+ },
+ {
+ "section": "13",
+ "description": "Creating a variable named with \"arguments\" without a function",
+ "test": "THE_ANSWER=\"Answer to Life, the Universe, and Everything\";\n\nvar arguments = THE_ANSWER;\n\nfunction __func(){\n return arguments;\n};\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif ( __func() === THE_ANSWER) {\n\t$ERROR('#1: __func() !== THE_ANSWER');\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (__func(\"The Ultimate Question\") === \"The Ultimate Question\") {\n\t$ERROR('#2: __func(\"The Ultimate Question\") !== \"The Ultimate Question\"');\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S13_A15_T5"
+ },
+ {
+ "section": "13",
+ "description": "Inserting separators between declaration chunks",
+ "test": "function\nx\n(\n)\n{\n}\n;\n\nx();\n\nfunction y ( ) {};\n\ny();\n\nfunction\n\nz\n\n(\n\n)\n\n{\n \n}\n\n;\n\nz();\n\neval(\"function\\u0009\\u2029w(\\u000C)\\u00A0{\\u000D};\");\n\nw();\n",
+ "id": "S13_A16"
+ },
+ {
+ "section": "13",
+ "description": "Trying to call a function before the FunctionExpression appears",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\ntry{\n var __result = __func();\n\t$FAIL(\"#1.1: var __result = __func() lead to throwing exception\");\n} catch(e) {\n if ((e instanceof TypeError) !== true) {\n $ERROR('#1.2: func should throw a TypeError Actual: ' + (e)); \n }\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\nvar __func = function (){return \"ONE\";};\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nvar __result = __func();\nif (__result !== \"ONE\") {\n\t$ERROR('#2: __result === \"ONE\". Actual: __result ==='+__result);\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n__func = function (){return \"TWO\";};\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#3\nvar __result = __func();\nif (__result !== \"TWO\") {\n\t$ERROR('#3: __result === \"TWO\". Actual: __result ==='+__result);\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S13_A17_T1"
+ },
+ {
+ "section": "13",
+ "description": "Trying to call a function before the FunctionExpression appears and then using the FunctionExpression one more time",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\ntry{\n var __result = __func();\n\t$ERROR(\"#1: var __result = __func() lead to throwing exception\");\n} catch(e) {\n if ((e instanceof TypeError) !== true) {\n $ERROR('#1.2: func should throw a TypeError Actual: ' + (e)); \n }\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n// now we reach the __func overwriting by new expression\nvar __func = function __func(){return \"ONE\";};\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nvar __result = __func();\nif (__result !== \"ONE\") {\n\t$ERROR('#2: __result === \"ONE\". Actual: __result ==='+__result);\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n__func = function __func(){return \"TWO\";};\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#3\nvar __result = __func();\nif (__result !== \"TWO\") {\n\t$ERROR('#3: __result === \"TWO\". Actual: __result ==='+__result);\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S13_A17_T2"
+ },
+ {
+ "section": "13",
+ "description": "Using a function declaration as a function parameter",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (typeof sinx !== 'undefined') {\n\t$ERROR('#1: typeof sinx === \\'undefined\\'. Actual: typeof sinx ==='+typeof sinx);\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\nvar __val = function derivative(f, dx) {\n return function(x) {\n return (f(x + dx) - f(x)) / dx;\n };\n}(function sinx(x){return Math.sin(x);},.0001)(0.5);\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (typeof sinx !== 'undefined') {\n\t$ERROR('#2: typeof sinx === \\'undefined\\'. Actual: typeof sinx ==='+typeof sinx);\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S13_A18"
+ },
+ {
+ "section": "13,13.2",
+ "description": "Creating a function and a variable with identical Identifiers in global scope",
+ "test": "// since \"var\" does not override function declaration __decl is set to function\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (typeof __decl !== \"function\") {\n\t$ERROR('#1: typeof __decl === \"function\". Actual: typeof __decl ==='+typeof __decl);\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\nvar __decl = 1;\n\n//since statement was evaluted __decl turns to 1 from function\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (__decl !== 1) {\n\t$ERROR('#2: __decl === 1. Actual: __decl ==='+__decl);\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\nfunction __decl(){return 1;}\n",
+ "id": "S13_A19_T1"
+ },
+ {
+ "section": "13,13.2",
+ "description": "Creating a function and a variable with identical Identifiers within function scope",
+ "test": "(function (){\n\n // since \"var\" does not override function declaration __decl is set to function\n //////////////////////////////////////////////////////////////////////////////\n //CHECK#1\n if (typeof __decl !== \"function\") {\n \t$ERROR('#1: typeof __decl === \"function\". Actual: typeof __decl ==='+typeof __decl);\n }\n //\n //////////////////////////////////////////////////////////////////////////////\n \n var __decl = 1;\n \n //since statement was evaluted __decl turns to 1 from function\n //////////////////////////////////////////////////////////////////////////////\n //CHECK#2\n if (__decl !== 1) {\n \t$ERROR('#2: __decl === 1. Actual: __decl ==='+__decl);\n }\n //\n //////////////////////////////////////////////////////////////////////////////\n\n function __decl(){return 1;}\n})(); \n",
+ "id": "S13_A19_T2"
+ },
+ {
+ "section": "13",
+ "description": "Defining function body with \"return arg\"",
+ "test": "var x = (function __func(arg){return arg})(1);\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (x !== 1) {\n\t$ERROR('#1: x === 1. Actual: x ==='+x);\n}\n\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (typeof __func !== 'undefined') {\n\t$ERROR('#2: typeof __func === \\'undefined\\'. Actual: typeof __func ==='+typeof __func);\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S13_A2_T1"
+ },
+ {
+ "section": "13",
+ "description": "Defining function body with \"return arg + arguments[1]\"",
+ "test": "var x = (function __func(arg){return arg + arguments[1]})(1,\"1\");\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (x !== \"11\") {\n\t$ERROR('#1: x === \"11\". Actual: x ==='+x);\n}\n\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (typeof __func !== 'undefined') {\n\t$ERROR('#2: typeof __func === \\'undefined\\'. Actual: typeof __func ==='+typeof __func);\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S13_A2_T2"
+ },
+ {
+ "section": "13",
+ "description": "Defining function body with \"return arguments[0] +\"-\"+ arguments[1]\"",
+ "test": "var x = (function __func(){return arguments[0] +\"-\"+ arguments[1]})(\"Obi\",\"Wan\");\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (x !== \"Obi-Wan\") {\n\t$ERROR('#1: x === \"Obi-Wan\". Actual: x ==='+x);\n}\n\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (typeof __func !== 'undefined') {\n\t$ERROR('#2: typeof __func === \\'undefined\\'. Actual: typeof __func ==='+typeof __func);\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S13_A2_T3"
+ },
+ {
+ "section": "13",
+ "description": "Creating a recursive function that calculates factorial, as a variable.\nFunction call itself by it`s name",
+ "test": "var __func = function __exp__func(arg){\n if (arg === 1) {\n \treturn arg;\n } else {\n \treturn __exp__func(arg-1)*arg;\n }\n};\n\nvar fact_of_3 = __func(3);\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (fact_of_3 !== 6) {\n\t$ERROR(\"#1: fact_of_3 === 6. Actual: fact_of_3 ===\"+fact_of_3);\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S13_A3_T1"
+ },
+ {
+ "section": "13",
+ "description": "Creating a recursive function that calculates factorial, as a variable.\nFunction calls itself by the name of the variable",
+ "test": "var __func = function (arg){\n if (arg === 1) {\n \treturn arg;\n } else {\n \treturn __func(arg-1)*arg;\n }\n};\n\nvar fact_of_3 = __func(3);\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (fact_of_3 !== 6) {\n\t$ERROR(\"#1: fact_of_3 === 6. Actual: fact_of_3 ===\"+fact_of_3);\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S13_A3_T2"
+ },
+ {
+ "section": "13",
+ "description": "Creating simple recursive function that calculates factorial",
+ "test": "function __func(arg){\n if (arg === 1) {\n \treturn arg;\n } else {\n \treturn __func(arg-1)*arg;\n }\n};\n\nvar fact_of_3 = __func(3);\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (fact_of_3 !== 6) {\n\t$ERROR(\"#1: fact_of_3 === 6. Actual: fact_of_3 ===\"+fact_of_3);\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S13_A3_T3"
+ },
+ {
+ "section": "13",
+ "description": "Declaring a function that returns string",
+ "test": "function __func(){return \"zig-zig-sputnik\";};\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1 \nif (typeof __func !== \"function\") {\n\t$ERROR('#1: typeof __func === \"function\". Actual: typeof __func ==='+typeof __func);\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (__func() !== \"zig-zig-sputnik\") {\n\t$ERROR('#2: __func() === \"zig-zig-sputnik\". Actual: __func() ==='+__func());\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S13_A4_T1"
+ },
+ {
+ "section": "13",
+ "description": "Declaring a function that uses prefix increment operator within its \"return\" Expression",
+ "test": "function __func(arg){return ++arg;};\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1 \nif (typeof __func !== \"function\") {\n\t$ERROR('#1: typeof __func === \"function\". Actual: typeof __func ==='+typeof __func);\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (__func(1) !== 2) {\n\t$ERROR('#2: __func(1) === 2. Actual: __func(1) ==='+__func(1));\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S13_A4_T2"
+ },
+ {
+ "section": "13",
+ "description": "Declaring a function that uses arithmetical operators within its \"return\" Expression",
+ "test": "function __func(arg1, arg2, arg3){return arg1+=(arg2+=arg3);};\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1 \nif (typeof __func !== \"function\") {\n\t$ERROR('#1: typeof __func === \"function\". Actual: typeof __func ==='+typeof __func);\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (__func(10, 20, 30) !== 60) {\n\t$ERROR('#2: __func(10, 20, 30) === 60. Actual: __func(10,20,30) ==='+__func(10,20,30));\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S13_A4_T3"
+ },
+ {
+ "section": "13",
+ "description": "Declaring a function that uses strings concatenaion opeator within its \"return\" Expression",
+ "test": "function __func(){return arguments[0].name + \" \" + arguments[0].surname;};\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1 \nif (typeof __func !== \"function\") {\n\t$ERROR('#1: typeof __func === \"function\". Actual: typeof __func ==='+typeof __func);\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (__func({name:'fox', surname:'malder'}) !== \"fox malder\") {\n\t$ERROR('#2: __func({name:\\'fox\\', surname:\\'malder\\'}) === \"fox malder\". Actual: __func({name:\\'fox\\', surname:\\'malder\\'}) ==='+__func({name:'fox', surname:'malder'}));\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\nfunction func__(arg){return arg.name + \" \" + arg.surname;};\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#3 \nif (typeof func__ !== \"function\") {\n\t$ERROR('#3: typeof func__ === \"function\". Actual: typeof __func ==='+typeof __func);\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#4\nif (func__({name:'john', surname:'lennon'}) !== \"john lennon\") {\n\t$ERROR('#4: func__({name:\\'john\\', surname:\\'lennon\\'}) === \"john lennon\". Actual: __func({name:\\'john\\', surname:\\'lennon\\'}) ==='+__func({name:'john', surname:'lennon'}));\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S13_A4_T4"
+ },
+ {
+ "section": "13, 10.1.2",
+ "description": "Trying to use [arg1, arg2, arg3], (arg1, arg2, arg3), etc. as a FormalParameterList",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\ntry{\n\teval(\"function __func([arg1, arg2, arg3]){return arguments.length;}\");\n\t$ERROR('#1: eval(\"function __func([arg1, arg2, arg3]){return arguments.length;}\") lead to throwing exception');\n} catch(e){\n\tif(!(e instanceof SyntaxError)){\n\t\t$ERROR('#1.1: eval(\"function __func([arg1, arg2, arg3]){return arguments.length;}\") lead to throwing exception of SyntaxError. Actual: exception is '+e);\n\t}\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\ntry{\n\teval(\"function __func((arg1, arg2, arg3)){return arguments.length;}\");\n\t$ERROR('#2: eval(\"function __func((arg1, arg2, arg3)){return arguments.length;}\") lead to throwing exception')\n} catch(e){\n\tif(!(e instanceof SyntaxError)){\n\t\t$ERROR('#2.1: eval(\"function __func((arg1, arg2, arg3)){return arguments.length;}\") lead to throwing exception of SyntaxError. Actual: exception is '+e);\n\t}\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#3\ntry{\n\teval(\"function __func(arg1, arg2, arg3,){return arguments.length;}\");\n\t$ERROR('#3: eval(\"function __func(arg1, arg2, arg3,){return arguments.length;}\") lead to throwing exception')\n} catch(e){\n\tif(!(e instanceof SyntaxError)){\n\t\t$ERROR('#3.1: eval(\"function __func(arg1, arg2, arg3,){return arguments.length;}\") lead to throwing exception of SyntaxError. Actual: exception is '+e);\n\t}\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S13_A5"
+ },
+ {
+ "section": "13",
+ "description": "Duplicating function declaration",
+ "test": "function __func(){return 1};\n \nvar __store__func = __func;\n \nvar __1 = __func();\n \n function __func(){return 'A'};\n \nvar __A = __func();\n \n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__store__func !== __func) {\n\t$ERROR('#1: __store__func === __func. Actual: __store__func ==='+__store__func);\n}\n//\n////////////////////////////////////////////////////////////////////////////// \n \n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (__1 !== __A) {\n\t$ERROR('#2: __1 === __A. Actual: __1 ==='+__1);\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S13_A6_T1"
+ },
+ {
+ "section": "13",
+ "description": "Calling a function before it is declared one more time",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\ntry{\n var __result = __func();\n} catch(e) {\n $FAIL(\"#1: Function call can appears in the program before the FunctionDeclaration appears\");\n}\nif (__result !== \"SECOND\") {\n\t$ERROR('#1.1: __result === \"SECOND\". Actual: __result ==='+__result);\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\nfunction __func(){return \"FIRST\";};\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\n__result = __func();\nif (__result !== \"SECOND\") {\n\t$ERROR('#2: __result === \"SECOND\". Actual: __result ==='+__result);\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\nfunction __func(){return \"SECOND\";};\n",
+ "id": "S13_A6_T2"
+ },
+ {
+ "section": "13",
+ "description": "Using only SourceElements within the FunctionBody",
+ "test": "function __func(){'ground control to major tom'};\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (typeof __func !== \"function\") {\n\t$ERROR('#1: typeof __func === \"function\". Actual: typeof __func ==='+typeof __func);\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\nfunction __func__2(){b};\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (typeof __func__2 !== \"function\") {\n\t$ERROR('#2: typeof __func__2 === \"function\". Actual: typeof __func__2 ==='+typeof __func__2);\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\nfunction __func__3(){1};\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#3\nif (typeof __func__3 !== \"function\") {\n\t$ERROR('#3: typeof __func__3 === \"function\". Actual: typeof __func__3 ==='+typeof __func__3);\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\nfunction __func__4(){1+c};\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#4\nif (typeof __func__4 !== \"function\") {\n\t$ERROR('#4: typeof __func__4 === \"function\". Actual: typeof __func__4 ==='+typeof __func__4);\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\nfunction __func__5(){inc(d)};\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#5\nif (typeof __func__5 !== \"function\") {\n\t$ERROR('#5: typeof __func__5 === \"function\". Actual: typeof __func__5 ==='+typeof __func__5);\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\nfunction __func__6(){var \\u0042 = 1;};\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#6\nif (typeof __func__6 !== \"function\") {\n\t$ERROR('#6: typeof __func__6 === \"function\". Actual: typeof __func__6 ==='+typeof __func__6);\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//function __func__7(){var \\u003d = 1;};\n////////////////////////////////////////////////////////////////////////////////\n////CHECK#7\n//if (typeof __func__7 !== \"function\") {\n//\t$ERROR('#7: The FunctionBody must be SourceElements');\n//}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S13_A7_T1"
+ },
+ {
+ "section": "13",
+ "description": "Inserting elements that is different from SourceElements into the FunctionBody",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\ntry{\n\teval(\"function __func(){/ ABC}\");\n\t$ERROR('#1: eval(\"function __func(){/ ABC}\") lead to throwing exception');\n} catch(e){\n\tif(!(e instanceof SyntaxError)){\n\t\t$ERROR('#1.1: eval(\"function __func(){/ ABC}\") lead to throwing exception of SyntaxError. Actual: exception is '+e);\n\t}\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#3\ntry{\n\teval(\"function __func(){&1}\");\n\t$ERROR('#3: eval(\"function __func(){&1}\") lead to throwing exception');\n} catch(e){\n\tif(!(e instanceof SyntaxError)){\n\t\t$ERROR('#3.1: eval(\"function __func(){&1}\") lead to throwing exception of SyntaxError. Actual: exception is '+e);\n\t}\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#4\ntry{\n\teval(\"function __func(){# ABC}\");\n\t$ERROR('#4: eval(\"function __func(){# ABC}\") lead to throwing exception');\n} catch(e){\n\tif(!(e instanceof SyntaxError)){\n\t\t$ERROR('#4.1: eval(\"function __func(){# ABC}\") lead to throwing exception of SyntaxError. Actual: exception is '+e);\n\t}\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S13_A7_T2"
+ },
+ {
+ "section": "13",
+ "description": "Checking if execution of \"function __func(){\\A\\B\\C}\" fails",
+ "negative": "",
+ "test": "function __func(){\\A\\B\\C};\n",
+ "id": "S13_A7_T3"
+ },
+ {
+ "section": "13",
+ "description": "Creating a function declared with \"function __func(param1, param2, param3)\" and using arguments.length property in order to perform the test",
+ "test": " function __func(param1, param2, param3) {\n \treturn arguments.length;\n }\n \n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__func('A') !== 1) {\n \t$ERROR('#1: __func(\\'A\\') === 1. Actual: __func(\\'A\\') ==='+__func('A'));\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (__func('A', 'B', 1, 2,__func) !== 5) {\n\t$ERROR('#2: __func(\\'A\\', \\'B\\', 1, 2,__func) === 5. Actual: __func(\\'A\\', \\'B\\', 1, 2,__func) ==='+__func('A', 'B', 1, 2,__func));\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n \n \n \n",
+ "id": "S13_A8_T1"
+ },
+ {
+ "section": "13",
+ "description": "Creating a function with no parameters and using arguments.length property in order to perform the test",
+ "test": " function __func() {\n \treturn arguments.length;\n }\n \n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__func('A') !== 1) {\n \t$ERROR('#1: __func(\\'A\\') === 1. Actual: __func(\\'A\\') ==='+__func('A'));\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (__func('A', 'B', 1, 2,__func) !== 5) {\n\t$ERROR('#2: __func(\\'A\\', \\'B\\', 1, 2,__func) === 5. Actual: __func(\\'A\\', \\'B\\', 1, 2,__func) ==='+__func('A', 'B', 1, 2,__func));\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#3\nif (__func() !== 0) {\n\t$ERROR('#3: __func() === 0. Actual: __func() ==='+__func());\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S13_A8_T2"
+ },
+ {
+ "section": "13",
+ "description": "Using function as argument of another function",
+ "test": "function __func__INC(arg){return arg + 1;};\nfunction __func__MULT(incrementator, arg, mult){ return incrementator(arg)*mult; };\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__func__MULT(__func__INC, 2, 2) !== 6) {\n\t$ERROR('#1: function can be passed as argument');\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n",
+ "id": "S13_A9"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/14.1.json b/website/resources/scripts/testcases2/14.1.json
new file mode 100644
index 000000000..23c5c1f9d
--- /dev/null
+++ b/website/resources/scripts/testcases2/14.1.json
@@ -0,0 +1,137 @@
+{
+ "testCollection": {
+ "name": "14.1",
+ "numTests": 17,
+ "tests": [
+ {
+ "id": "14.1-1-s",
+ "path": "TestCases/chapter14/14.1/14.1-1-s.js",
+ "description": "'use strict' directive - correct usage",
+ "test": "assertTrue((function testcase() {\n\n function foo()\n {\n 'use strict';\n return(this === undefined);\n }\n\n return foo.call(undefined);\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict())",
+ "strict_only": ""
+ },
+ {
+ "id": "14.1-10-s",
+ "path": "TestCases/chapter14/14.1/14.1-10-s.js",
+ "description": "other directives - may follow 'use strict' directive ",
+ "test": "assertTrue((function testcase() {\n\n function foo()\n {\n \"use strict\";\n \"bogus directive\";\n return (this === undefined);\n }\n\n return foo.call(undefined);\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict())",
+ "strict_only": ""
+ },
+ {
+ "id": "14.1-11-s",
+ "path": "TestCases/chapter14/14.1/14.1-11-s.js",
+ "description": "comments may preceed 'use strict' directive ",
+ "test": "assertTrue((function testcase() {\n\n function foo()\n {\n // comment\n /* comment */ \"use strict\";\n\n return(this === undefined);\n \n }\n\n return foo.call(undefined);\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict())",
+ "strict_only": ""
+ },
+ {
+ "id": "14.1-12-s",
+ "path": "TestCases/chapter14/14.1/14.1-12-s.js",
+ "description": "comments may follow 'use strict' directive ",
+ "test": "assertTrue((function testcase() {\n\n function foo()\n {\n \"use strict\"; /* comment */ // comment\n \n return (this === undefined);\n }\n\n return foo.call(undefined);\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict())",
+ "strict_only": ""
+ },
+ {
+ "id": "14.1-13-s",
+ "path": "TestCases/chapter14/14.1/14.1-13-s.js",
+ "description": "semicolon insertion works for'use strict' directive ",
+ "test": "assertTrue((function testcase() {\n\n function foo()\n {\n \"use strict\" \n return (this === undefined);\n }\n\n return foo.call(undefined);\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict())",
+ "strict_only": ""
+ },
+ {
+ "id": "14.1-14-s",
+ "path": "TestCases/chapter14/14.1/14.1-14-s.js",
+ "description": "semicolon insertion may come before 'use strict' directive ",
+ "test": "assertTrue((function testcase() {\n\n function foo()\n {\n \"another directive\"\n \"use strict\" ; \n return (this === undefined);\n }\n\n return foo.call(undefined);\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict())",
+ "strict_only": ""
+ },
+ {
+ "id": "14.1-15-s",
+ "path": "TestCases/chapter14/14.1/14.1-15-s.js",
+ "description": "blank lines may come before 'use strict' directive ",
+ "test": "assertTrue((function testcase() {\n\n function foo()\n {\n\n\n\n\n\n\n \"use strict\" ; \n return (this === undefined);\n }\n\n return foo.call(undefined);\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict())",
+ "strict_only": ""
+ },
+ {
+ "id": "14.1-16-s",
+ "path": "TestCases/chapter14/14.1/14.1-16-s.js",
+ "description": "'use strict' directive - not recognized if it follow an empty statement",
+ "test": "assertTrue((function testcase() {\n\n function foo()\n {\n ; 'use strict';\n return (this !== undefined);\n }\n\n return foo.call(undefined);\n }).call(this));\n",
+ "strict_only": ""
+ },
+ {
+ "id": "14.1-17-s",
+ "path": "TestCases/chapter14/14.1/14.1-17-s.js",
+ "description": "'use strict' directive - not recognized if it follow some other statment empty statement",
+ "test": "/// Copyright (c) 2009 Microsoft Corporation \n/// \n/// Redistribution and use in source and binary forms, with or without modification, are permitted provided\n/// that the following conditions are met: \n/// * Redistributions of source code must retain the above copyright notice, this list of conditions and\n/// the following disclaimer. \n/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and \n/// the following disclaimer in the documentation and/or other materials provided with the distribution. \n/// * Neither the name of Microsoft nor the names of its contributors may be used to\n/// endorse or promote products derived from this software without specific prior written permission.\n/// \n/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR\n/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS\n/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE\n/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,\n/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF\n/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.assertTrue((function testcase() {\n\n function foo()\n {\n var x;\n 'use strict';\n return (this !== undefined);\n }\n\n return foo.call(undefined);\n }).call(this));\n",
+ "strict_only": ""
+ },
+ {
+ "id": "14.1-2-s",
+ "path": "TestCases/chapter14/14.1/14.1-2-s.js",
+ "description": "\"use strict\" directive - correct usage double quotes",
+ "test": "assertTrue((function testcase() {\n\n function foo()\n {\n \"use strict\";\n return (this === undefined);\n }\n\n return foo.call(undefined);\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict())",
+ "strict_only": ""
+ },
+ {
+ "id": "14.1-3-s",
+ "path": "TestCases/chapter14/14.1/14.1-3-s.js",
+ "description": "'use strict' directive - not recognized if it contains extra whitespace",
+ "test": "assertTrue((function testcase() {\n\n function foo()\n {\n ' use strict ';\n return (this !== undefined);\n }\n\n return foo.call(undefined);\n }).call(this));\n",
+ "strict_only": ""
+ },
+ {
+ "id": "14.1-4-s",
+ "path": "TestCases/chapter14/14.1/14.1-4-s.js",
+ "description": "'use strict' directive - not recognized if contains Line Continuation",
+ "test": "assertTrue((function testcase() {\n\n function foo()\n {\n 'use str\\\nict';\n return (this !== undefined);\n }\n\n return foo.call(undefined);\n }).call(this));\n",
+ "strict_only": ""
+ },
+ {
+ "id": "14.1-5-s",
+ "path": "TestCases/chapter14/14.1/14.1-5-s.js",
+ "description": "'use strict' directive - not recognized if contains a EscapeSequence",
+ "test": "assertTrue((function testcase() {\n\n function foo()\n {\n 'use\\u0020strict';\n return(this !== undefined);\n }\n\n return foo.call(undefined);\n }).call(this));\n",
+ "strict_only": ""
+ },
+ {
+ "id": "14.1-6-s",
+ "path": "TestCases/chapter14/14.1/14.1-6-s.js",
+ "description": "'use strict' directive - not recognized if contains a <TAB> instead of a space",
+ "test": "assertTrue((function testcase() {\n\n function foo()\n {\n 'use\tstrict';\n return (this !== undefined);\n }\n\n return foo.call(undefined);\n }).call(this));\n",
+ "strict_only": ""
+ },
+ {
+ "id": "14.1-7-s",
+ "path": "TestCases/chapter14/14.1/14.1-7-s.js",
+ "description": "'use strict' directive - not recognized if upper case",
+ "test": "assertTrue((function testcase() {\n\n function foo()\n {\n 'Use Strict';\n return (this !== undefined);\n }\n\n return foo.call(undefined);\n }).call(this));\n",
+ "strict_only": ""
+ },
+ {
+ "id": "14.1-8-s",
+ "path": "TestCases/chapter14/14.1/14.1-8-s.js",
+ "description": "'use strict' directive - may follow other directives",
+ "test": "assertTrue((function testcase() {\n\n function foo()\n {\n \"bogus directive\";\n \"use strict\";\n return (this === undefined);\n }\n\n return foo.call(undefined);\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict())",
+ "strict_only": ""
+ },
+ {
+ "id": "14.1-9-s",
+ "path": "TestCases/chapter14/14.1/14.1-9-s.js",
+ "description": "'use strict' directive - may occur multiple times",
+ "test": "assertTrue((function testcase() {\n\n function foo()\n {\n 'use strict';\n \"use strict\";\n return (this === undefined);\n }\n\n return foo.call(undefined);\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict())",
+ "strict_only": ""
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/14_Program.json b/website/resources/scripts/testcases2/14_Program.json
new file mode 100644
index 000000000..111fa8976
--- /dev/null
+++ b/website/resources/scripts/testcases2/14_Program.json
@@ -0,0 +1,38 @@
+{
+ "testCollection": {
+ "name": "14_Program",
+ "numTests": 5,
+ "tests": [
+ {
+ "section": "14",
+ "description": "Declaring a function within an \"if\" Expression",
+ "test": "var THERE = \"I'm there\";\nvar HERE = \"I'm here\";\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif ( __func !== undefined) {\n\t$ERROR('#1: __func === undefined. Actual: __func ==='+ __func );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\nif (true){\n var __func = function(){return HERE;};\n} else {\n var __func = function (){return THERE;};\n};\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (__func() !== HERE) {\n\t$ERROR('#2: __func() === HERE. Actual: __func() ==='+ __func() );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S14_A1"
+ },
+ {
+ "section": "14",
+ "description": "Declaring a function within an \"if\" Expression",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (typeof f !== 'undefined') {\n\t$ERROR('#1: typeof f === \\'undefined\\'. Actual: typeof f ==='+ typeof f );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (function f(arg){\n\tif (arg===0)\n\t return 1;\n\telse\n\t return f(arg-1)*arg;\n}(3)!==6) {\n\t$ERROR('#2: FunctionDeclaration cannot be localed inside an Expression');\n};\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S14_A2"
+ },
+ {
+ "section": "14",
+ "description": "Declaring a function within the body of another function",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (typeof __func !== \"function\") {\n\t$ERROR('#1: typeof __func === \"function\". Actual: typeof __func ==='+ typeof __func );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (typeof __gunc !== \"undefined\") {\n\t$ERROR('#2: typeof __gunc === \"undefined\". Actual: typeof __gunc ==='+ typeof __gunc );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\nfunction __func(){\n function __gunc(){return true};\n}\n",
+ "id": "S14_A3"
+ },
+ {
+ "section": "14",
+ "description": "Declaring a function with \"function __\\u0066\\u0075\\u006e\\u0063(){return \"both\"}\"",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__func() !== \"both\") {\n\t$ERROR('#1: __func() === \"both\". Actual: __func() ==='+ __func() );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\nfunction __func(){return \"ascii\"};\nfunction \\u005f\\u005f\\u0066\\u0075\\u006e\\u0063(){return \"unicode\"};//__func in unicode\nfunction __\\u0066\\u0075\\u006e\\u0063(){return \"both\"};//__func in unicode\n",
+ "id": "S14_A5_T1"
+ },
+ {
+ "section": "14",
+ "description": "Declaring a function with \"function \\u005f\\u005f\\u0066\\u0075\\u006e\\u0063(){return \"unicode\"}\"",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__func() !== \"unicode\") {\n\t$ERROR('#1: __func() === \"unicode\". Actual: __func() ==='+ __func() );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\nfunction __func(){return \"ascii\"};\nfunction \\u005f\\u005f\\u0066\\u0075\\u006e\\u0063(){return \"unicode\"};//__func in unicode\n",
+ "id": "S14_A5_T2"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.1.1.1.json b/website/resources/scripts/testcases2/15.1.1.1.json
new file mode 100644
index 000000000..3feb30817
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.1.1.1.json
@@ -0,0 +1,15 @@
+{
+ "testCollection": {
+ "name": "15.1.1.1",
+ "numTests": 1,
+ "tests": [
+ {
+ "id": "15.1.1.1-0",
+ "path": "TestCases/chapter15/15.1/15.1.1/15.1.1.1/15.1.1.1-0.js",
+ "description": "Global.NaN is a data property with default attribute values (false)",
+ "test": "var global = this;assertTrue((function testcase() {\n var desc = Object.getOwnPropertyDescriptor(global, 'NaN');\n if (desc.writable === false &&\n desc.enumerable === false &&\n desc.configurable === false) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.1.1.1_NaN.json b/website/resources/scripts/testcases2/15.1.1.1_NaN.json
new file mode 100644
index 000000000..9c35d8328
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.1.1.1_NaN.json
@@ -0,0 +1,42 @@
+{
+ "testCollection": {
+ "name": "15.1.1.1_NaN",
+ "numTests": 5,
+ "tests": [
+ {
+ "section": "15.1.1.1, 11.4.3, 15.1.2.4, 15.1.2.5",
+ "description": "Use typeof, isNaN, isFinite",
+ "test": "// CHECK#1\nif (typeof(NaN) !== \"number\") {\n\t$ERROR('#1: typeof(NaN) === \"number\". Actual: ' + (typeof(NaN))); \n}\n\n// CHECK#2\nif (isNaN(NaN) !== true) {\n\t$ERROR('#2: NaN === Not-a-Number. Actual: ' + (NaN)); \n}\n\n// CHECK#3\nif (isFinite(NaN) !== false) {\n\t$ERROR('#3: NaN === Not-a-Finite. Actual: ' + (NaN)); \n}\n\n",
+ "id": "S15.1.1.1_A1"
+ },
+ {
+ "section": "15.1.1.1, 15.5.1, 15.6.1, 15.7.1",
+ "description": "Checking Boolean, Number, String Functions",
+ "strict_mode_negative": "",
+ "test": "// CHECK#1\nNaN = 1;\nif (Boolean(NaN) !== true) {\n\t$ERROR('#1: NaN = 1; Boolean(NaN) === true. Actual: ' + (Boolean(NaN))); \n}\n\n// CHECK#2\nNaN = true;\nif (Number(NaN) !== 1) {\n\t$ERROR('#2: NaN = true; Number(NaN) === 1. Actual: ' + (Number(NaN))); \n}\n\n// CHECK#3\nNaN = 1;\nif (String(NaN) !== \"1\") {\n\t$ERROR('#3: NaN = 1; String(NaN) === \"1\". Actual: ' + (String(NaN))); \n}\n",
+ "id": "S15.1.1.1_A2_T1",
+ "strict_only": ""
+ },
+ {
+ "section": "15.1.1.1, 11.4.3",
+ "description": "Checking typeof Operator",
+ "test": "// CHECK#1\nNaN = true;\nif (typeof(NaN) !== \"boolean\") {\n\t$ERROR('#1: NaN = true; typeof(NaN) === \"boolean\". Actual: ' + (typeof(NaN))); \n}\n",
+ "id": "S15.1.1.1_A2_T2"
+ },
+ {
+ "section": "15.1.1.1, 11.4.1",
+ "description": "Use delete",
+ "strict_mode_negative": "",
+ "test": "// CHECK#1\nif (delete NaN !== false) {\n\t$ERROR('#1: delete NaN === false. Actual: ' + (delete NaN)); \t\n}\n",
+ "id": "S15.1.1.1_A3.1",
+ "strict_only": ""
+ },
+ {
+ "section": "15.1.1.1, 12.6.4",
+ "description": "Use for-in statement",
+ "test": "// CHECK#1\nfor (var prop in this) {\n if (prop === \"NaN\") {\n\t$ERROR('#1: The NaN is DontEnum');\n }\t \t\n}\n",
+ "id": "S15.1.1.1_A3.2"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.1.1.2.json b/website/resources/scripts/testcases2/15.1.1.2.json
new file mode 100644
index 000000000..842f2ba1e
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.1.1.2.json
@@ -0,0 +1,15 @@
+{
+ "testCollection": {
+ "name": "15.1.1.2",
+ "numTests": 1,
+ "tests": [
+ {
+ "id": "15.1.1.2-0",
+ "path": "TestCases/chapter15/15.1/15.1.1/15.1.1.2/15.1.1.2-0.js",
+ "description": "Global.Infinity is a data property with default attribute values (false)",
+ "test": "var global = this;assertTrue((function testcase() {\n var desc = Object.getOwnPropertyDescriptor(global, 'Infinity');\n if (desc.writable === false &&\n desc.enumerable === false &&\n desc.configurable === false) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.1.1.2_Infinity.json b/website/resources/scripts/testcases2/15.1.1.2_Infinity.json
new file mode 100644
index 000000000..c9184b7f3
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.1.1.2_Infinity.json
@@ -0,0 +1,42 @@
+{
+ "testCollection": {
+ "name": "15.1.1.2_Infinity",
+ "numTests": 5,
+ "tests": [
+ {
+ "section": "15.1.1.2, 11.4.3, 15.1.2.4, 15.1.2.5",
+ "description": "Use typeof, isNaN, isFinite",
+ "test": "// CHECK#1\nif (typeof(Infinity) !== \"number\") {\n\t$ERROR('#1: typeof(Infinity) === \"number\". Actual: ' + (typeof(Infinity))); \n}\n\n// CHECK#2\nif (isFinite(Infinity) !== false) {\n\t$ERROR('#2: Infinity === Not-a-Finite. Actual: ' + (Infinity)); \n}\n\n// CHECK#3\nif (isNaN(Infinity) !== false) {\n\t$ERROR('#3: Infinity === Not-a-Number. Actual: ' + (Infinity)); \n}\n\n\n// CHECK#4\nif (Infinity !== Number.POSITIVE_INFINITY) {\n\t$ERROR('#4: Infinity === Number.POSITIVE_INFINITY. Actual: ' + (Infinity)); \n}\n",
+ "id": "S15.1.1.2_A1"
+ },
+ {
+ "section": "15.1.1.2, 15.5.1, 15.6.1, 15.7.1",
+ "description": "Checking Boolean, Number, String Functions",
+ "strict_mode_negative": "",
+ "test": "// CHECK#1\nInfinity = 0;\nif (Boolean(Infinity) !== false) {\n\t$ERROR('#1: Infinity = 0; Boolean(Infinity) === false. Actual: ' + (Boolean(Infinity))); \n}\n\n// CHECK#2\nInfinity = false;\nif (Number(Infinity) !== 0) {\n\t$ERROR('#2: Infinity = false; Number(Infinity) === 0. Actual: ' + (Number(Infinity))); \n}\n\n// CHECK#3\nInfinity = 0;\nif (String(Infinity) !== \"0\") {\n\t$ERROR('#3: Infinity = 0; String(Infinity) === \"0\". Actual: ' + (String(Infinity))); \n}\n\n",
+ "id": "S15.1.1.2_A2_T1",
+ "strict_only": ""
+ },
+ {
+ "section": "15.1.1.2, 11.4.3",
+ "description": "Checking typeof Functions",
+ "test": "// CHECK#1\nvar Finite = true;\nif (typeof(Finite) !== \"boolean\") {\n\t$ERROR('#1: Finite = true; typeof(NaN) === \"boolean\". Actual: ' + (typeof(NaN))); \n}\n",
+ "id": "S15.1.1.2_A2_T2"
+ },
+ {
+ "section": "15.1.1.2, 11.4.1",
+ "description": "Use delete",
+ "strict_mode_negative": "",
+ "test": "// CHECK#1\nif (delete Infinity !== false) {\n\t$ERROR('#1: delete Infinity === false. Actual: ' + (delete Infinity)); \n}\n",
+ "id": "S15.1.1.2_A3.1",
+ "strict_only": ""
+ },
+ {
+ "section": "15.1.1.2, 12.6.4",
+ "description": "Use for-in statement",
+ "test": "// CHECK#1\nfor (var prop in this) {\n if (prop === \"Infinity\") {\n\t$ERROR('#1: The Infinity is DontEnum');\n }\t \t\n}\n",
+ "id": "S15.1.1.2_A3.2"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.1.1.3.json b/website/resources/scripts/testcases2/15.1.1.3.json
new file mode 100644
index 000000000..746582905
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.1.1.3.json
@@ -0,0 +1,15 @@
+{
+ "testCollection": {
+ "name": "15.1.1.3",
+ "numTests": 1,
+ "tests": [
+ {
+ "id": "15.1.1.3-0",
+ "path": "TestCases/chapter15/15.1/15.1.1/15.1.1.3/15.1.1.3-0.js",
+ "description": "Global.undefined is a data property with default attribute values (false)",
+ "test": "var global = this;assertTrue((function testcase() {\n var desc = Object.getOwnPropertyDescriptor(global, 'undefined');\n if (desc.writable === false &&\n desc.enumerable === false &&\n desc.configurable === false) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.1.1.3_undefined.json b/website/resources/scripts/testcases2/15.1.1.3_undefined.json
new file mode 100644
index 000000000..423feae3a
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.1.1.3_undefined.json
@@ -0,0 +1,44 @@
+{
+ "testCollection": {
+ "name": "15.1.1.3_undefined",
+ "numTests": 5,
+ "tests": [
+ {
+ "section": "15.1.1.3, 11.4.3, 15.1.2.4, 15.1.2.5",
+ "description": "Use typeof, isNaN, isFinite",
+ "test": "// CHECK#1\nif (typeof(undefined) !== \"undefined\") {\n\t$ERROR('#1: typeof(undefined) === \"undefined\". Actual: ' + (typeof(undefined))); \n}\n\n// CHECK#2\nif (undefined !== void 0) {\n\t$ERROR('#2: undefined === void 0. Actual: ' + (undefined)); \n}\n\n// CHECK#3\nif (undefined !== eval(\"var x\")) {\n\t$ERROR('#3: undefined === eval(\"var x\"). Actual: ' + (undefined)); \n}\n",
+ "id": "S15.1.1.3_A1"
+ },
+ {
+ "section": "15.1.1.3, 15.5.1, 15.6.1, 15.7.1",
+ "description": "Checking Boolean, Number, String Functions",
+ "strict_mode_negative": "",
+ "test": "// CHECK#1\nundefined = 1;\nif (Boolean(undefined) !== true) {\n\t$ERROR('#1: undefined = 1; Boolean(undefined) === true. Actual: ' + (Boolean(undefined))); \n}\n\n// CHECK#2\nundefined = true;\nif (Number(undefined) !== 1) {\n\t$ERROR('#2: undefined = true; Number(undefined) === 1. Actual: ' + (Number(undefined))); \n}\n\n// CHECK#3\nundefined = 1;\nif (String(undefined) !== \"1\") {\n\t$ERROR('#3: undefined = 1; String(undefined) === \"1\". Actual: ' + (String(undefined))); \n}\n",
+ "id": "S15.1.1.3_A2_T1",
+ "strict_only": ""
+ },
+ {
+ "section": "15.1.1.3, 11.4.3",
+ "description": "Checking typeof Operator",
+ "strict_mode_negative": "",
+ "test": "// CHECK#1\nundefined = true;\nif (typeof(undefined) !== \"boolean\") { \n\tERROR('#1: undefined = true; typeof(undefined) === \"boolean\". Actual: ' + (typeof(undefined)));\t\n}\n",
+ "id": "S15.1.1.3_A2_T2",
+ "strict_only": ""
+ },
+ {
+ "section": "15.1.1.3, 11.4.1",
+ "description": "Use delete",
+ "strict_mode_negative": "",
+ "test": "// CHECK#1\nif (delete undefined !== false) {\n\t$ERROR('#1: delete undefined === false. Actual: ' + (delete undefined)); \n}\n",
+ "id": "S15.1.1.3_A3.1",
+ "strict_only": ""
+ },
+ {
+ "section": "15.1.1.3, 12.6.4",
+ "description": "Use for-in statement",
+ "test": "// CHECK#1\nfor (prop in this) {\n if (prop === \"undefined\") {\n\t$ERROR('#1: The undefined is DontEnum');\n }\t \t\n}\n",
+ "id": "S15.1.1.3_A3.2"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.1.2.1_eval.json b/website/resources/scripts/testcases2/15.1.2.1_eval.json
new file mode 100644
index 000000000..c783ffc4c
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.1.2.1_eval.json
@@ -0,0 +1,167 @@
+{
+ "testCollection": {
+ "name": "15.1.2.1_eval",
+ "numTests": 26,
+ "tests": [
+ {
+ "section": "15.1.2.1",
+ "description": "Checking all primitive",
+ "test": "//CHECK#1\nvar x = 1;\nif (eval(x) !== x) {\n $ERROR('#1: x = 1; eval(x) === x. Actual: ' + (eval(x)));\n}\n\n//CHECK#2\nif (eval(1) !== 1) {\n $ERROR('#2: eval(1) === 1. Actual: ' + (eval(1)));\n}\n\n//CHECK#3\nif (eval(true) !== true) {\n $ERROR('#3: eval(true) === true. Actual: ' + (eval(true)));\n}\n\n//CHECK#4\nif (eval(null) !== null) {\n $ERROR('#4: eval(null) === null. Actual: ' + (eval(null)));\n}\n\n//CHECK#5\nif (eval(undefined) !== undefined) {\n $ERROR('#5: eval(undefined) === undefined. Actual: ' + (eval(undefined)));\n} \n",
+ "id": "S15.1.2.1_A1.1_T1"
+ },
+ {
+ "section": "15.1.2.1",
+ "description": "Checking all object",
+ "test": "//CHECK#1\nvar x = {};\nif (eval(x) !== x) {\n $ERROR('#1: x = {}; eval(x) === x. Actual: ' + (eval(x)));\n}\n\n//CHECK#2\nx = new Number(1);\nif (eval(x) !== x) {\n $ERROR('#2: x = new Number(1); eval(x) === x. Actual: ' + (eval(x)));\n}\n\n//CHECK#3\nx = new Boolean(true);\nif (eval(x) !== x) {\n $ERROR('#3: x = new Boolean(true); eval(x) === x. Actual: ' + (eval(x)));\n}\n\n//CHECK#4\nx = new String(\"1+1\");\nif (eval(x) !== x) {\n $ERROR('#4: x = new String(\"1\"); eval(x) === x. Actual: ' + (eval(x)));\n} \n",
+ "id": "S15.1.2.1_A1.1_T2"
+ },
+ {
+ "section": "15.1.2.1",
+ "description": "eval(\"x = 1\", \"x = 2\"), x equal 1, not 2",
+ "test": "//CHECK#1\nvar x;\neval(\"x = 1\", \"x = 2\");\nif (x !== 1) {\n $ERROR('#1: eval(\"x = 1\", \"x = 2\"); x === 1. Actual: ' + (x));\n}\n",
+ "id": "S15.1.2.1_A1.2_T1"
+ },
+ {
+ "section": "15.1.2.1, 16",
+ "description": ": Checking if execution of \"eval(\"x = 1; x\\u000A++\"), catch SyntaxError\" passes;",
+ "test": "//CHECK#1\nvar x;\ntry {\n eval(\"x = 1; x\\u000A++\");\n $ERROR('#1.1: eval(\"x = 1; x\\\\u000A++\") must throw a SyntaxError. Actual: ' + (eval(\"x = 1; x\\u000A++\")));\n} catch (e) {\n if ((e instanceof SyntaxError) !== true) {\n $ERROR('#1.2: eval(\"x = 1; x\\\\u000A++\") must throw a SyntaxError. Actual: ' + (e));\n } \n} \n",
+ "id": "S15.1.2.1_A2_T1"
+ },
+ {
+ "section": "15.1.2.1, 16",
+ "description": ": Checking if execution of \"eval(\"x = 1; x\\u000A++\")\" fails;",
+ "negative": "",
+ "test": "//CHECK#1\nvar x;\neval(\"x = 1; x\\u000A++\"); \n",
+ "id": "S15.1.2.1_A2_T2"
+ },
+ {
+ "section": "15.1.2.1, 12.4",
+ "description": "Expression statement. Eval return primitive value",
+ "test": "var x;\n//CHECK#1\nif (eval(\"x = 1\") !== 1) {\n $ERROR('#1: eval(\"x = 1\") === 1. Actual: ' + (eval(\"x = 1\")));\n}\n\n//CHECK#2\nif (eval(\"1\") !== 1) {\n $ERROR('#2: eval(\"1\") === 1. Actual: ' + (eval(\"1\")));\n}\n\n//CHECK#3\nif (eval(\"'1'\") !== '1') {\n $ERROR('#3: eval(\"\\'1\\'\") === \\'1\\'. Actual: ' + (eval(\"'1'\")));\n}\n\n//CHECK#4\nx = 1;\nif (eval(\"++x\") !== 2) {\n $ERROR('#4: x = 1; eval(\"++x\") === 2. Actual: ' + (x));\n} \n",
+ "id": "S15.1.2.1_A3.1_T1"
+ },
+ {
+ "section": "15.1.2.1, 12.4",
+ "description": "Expression statement. Eval return object value",
+ "test": "//CHECK#1\nvar x = {};\nvar y;\nif (eval(\"y = x\") !== x) {\n $ERROR('#1: var x = {}; eval(\"y = x\") === x. Actual: ' + (eval(\"y = x\")));\n} \n\n\n//CHECK#2\nif (eval(\"x\") !== x) {\n $ERROR('#2: var x = {}; eval(\"x\") === x. Actual: ' + (eval(\"x\")));\n} \n\n",
+ "id": "S15.1.2.1_A3.1_T2"
+ },
+ {
+ "section": "15.1.2.1, 12.1",
+ "description": "Block statement",
+ "test": "//CHECK#1\nif (eval(\"{}\") !== undefined) {\n $ERROR('#1: eval(\"{}\") === undefined. Actual: ' + (eval(\"{}\")));\n} \n",
+ "id": "S15.1.2.1_A3.2_T1"
+ },
+ {
+ "section": "15.1.2.1, 12.2",
+ "description": "Var statement",
+ "test": "//CHECK#1\nif (eval(\"var x = 1\") !== undefined) {\n $ERROR('#1: eval(\"var x = 1\") === undefined. Actual: ' + (eval(\"var x = 1\")));\n} \n",
+ "id": "S15.1.2.1_A3.2_T2"
+ },
+ {
+ "section": "15.1.2.1, 12.3",
+ "description": "Empty statement",
+ "test": "//CHECK#1\nif (eval(\";\") !== undefined) {\n $ERROR('#1: eval(\";\") === undefined. Actual: ' + (eval(\";\")));\n} \n",
+ "id": "S15.1.2.1_A3.2_T3"
+ },
+ {
+ "section": "15.1.2.1, 12.5",
+ "description": "If statement",
+ "test": "//CHECK#1\nif (eval(\"if (false) ;\") !== undefined) {\n $ERROR('#1: eval(\"if (false) ;\") === undefined. Actual: ' + eval(\"if (false) ;\"));\n} \n",
+ "id": "S15.1.2.1_A3.2_T4"
+ },
+ {
+ "section": "15.1.2.1, 12.11",
+ "description": "Switch statement",
+ "test": "//CHECK#1\nif (eval(\"switch(1){}\") !== undefined) {\n $ERROR('#1: eval(\"switch(1){}\") === undefined. Actual: ' + (eval(\"switch(1){}\")));\n} \n",
+ "id": "S15.1.2.1_A3.2_T5"
+ },
+ {
+ "section": "15.1.2.1, 12.6.1",
+ "description": "do-while statement",
+ "test": "//CHECK#1\nif (eval(\"do ; while(false)\") !== undefined) {\n $ERROR('#1: eval(\"do ; while(false)\") === undefined. Actual: ' + (eval(\"do ; while(false)\")));\n} \n",
+ "id": "S15.1.2.1_A3.2_T6"
+ },
+ {
+ "section": "15.1.2.1, 12.6.2",
+ "description": "do-while statement",
+ "test": "//CHECK#1\nif (eval(\"while(false);\") !== undefined) {\n $ERROR('#1: eval(\"while(false);\") === undefined. Actual: ' + (eval(\"while(false);\")));\n} \n",
+ "id": "S15.1.2.1_A3.2_T7"
+ },
+ {
+ "section": "15.1.2.1, 12.6.3",
+ "description": "for statement",
+ "test": "//CHECK#1\nif (eval(\"for(false;false;false);\") !== undefined) {\n $ERROR('#1: eval(\"for(false;false;false);\") === undefined. Actual: ' + (eval(\"for(false;false;false);\")));\n} \n",
+ "id": "S15.1.2.1_A3.2_T8"
+ },
+ {
+ "section": "15.1.2.1, 12.7",
+ "description": "Continue statement",
+ "test": "//CHECK#1\ntry {\n eval(\"continue;\");\n $ERROR('#1.1: continue must throw SyntaxError. Actual: ' + (eval(\"continue;\")));\n} catch(e) {\n if ((e instanceof SyntaxError) !== true) {\n $ERROR('#1.2: continue must throw SyntaxError. Actual ' + (e));\n } \n}\n\n//CHECK#2\ntry {\n for (var i = 0; i <= 1; i++) {\n for (var j = 0; j <= 1; j++) {\n eval(\"continue;\"); \n }\n }\n $ERROR('#2.1: continue must throw SyntaxError. Actual: ' + (eval(\"continue;\"))); \n} catch(e) {\n if ((e instanceof SyntaxError) !== true) {\n $ERROR('#2.2: continue must throw SyntaxError. Actual: ' + (e));\n } \n} \n",
+ "id": "S15.1.2.1_A3.3_T1"
+ },
+ {
+ "section": "15.1.2.1, 12.8",
+ "description": "Break statement",
+ "test": "//CHECK#1\ntry {\n eval(\"break;\");\n $ERROR('#1.1: break must throw SyntaxError. Actual: ' + (eval(\"break;\")));\n} catch(e) {\n if ((e instanceof SyntaxError) !== true) {\n $ERROR('#1.2: break must throw SyntaxError. Actual: ' + (e));\n } \n}\n\n//CHECK#2\ntry {\n for (var i = 0; i <= 1; i++) {\n for (var j = 0; j <= 1; j++) {\n eval(\"break;\");\n }\n }\n $ERROR('#2.1: break must throw SyntaxError. Actual: ' + (eval(\"break;\"))); \n} catch(e) {\n if ((e instanceof SyntaxError) !== true) { \n $ERROR('#2.2: break must throw SyntaxError. Actual: ' + (e));\n } \n} \n",
+ "id": "S15.1.2.1_A3.3_T2"
+ },
+ {
+ "section": "15.1.2.1, 12.9",
+ "description": "Return statement",
+ "test": "//CHECK#1\ntry {\n eval(\"return;\");\n $ERROR('#1.1: return must throw SyntaxError. Actual: ' + (eval(\"return;\")));\n} catch(e) {\n if ((e instanceof SyntaxError) !== true) {\n $ERROR('#1.2: return must throw SyntaxError. Actual: ' + (e));\n } \n}\n\n//CHECK#2\n\nfunction f() { eval(\"return;\"); };\n\ntry {\n f(); \n $ERROR('#2.1: return must throw SyntaxError. Actual: ' + (f()));\n} catch(e) {\n if ((e instanceof SyntaxError) !== true) {\n $ERROR('#2.2: return must throw SyntaxError. Actual: ' + (e));\n } \n} \n",
+ "id": "S15.1.2.1_A3.3_T3"
+ },
+ {
+ "section": "15.1.2.1, 12.13",
+ "description": "Throw statement",
+ "test": "//CHECK#1\ntry {\n eval(\"throw 1;\");\n $ERROR('#1.1: throw 1 must throw SyntaxError. Actual: ' + (eval(\"throw 1;\")));\n} catch(e) {\n if (e !== 1) {\n $ERROR('#1.2: throw 1 must throw SyntaxError. Actual: ' + (e));\n } \n}\n",
+ "id": "S15.1.2.1_A3.3_T4"
+ },
+ {
+ "section": "15.1.2.1, 15.2.4.7, 12.6.4",
+ "description": "Checking use propertyIsEnumerable, for-in",
+ "test": "//CHECK#1\nif (eval.propertyIsEnumerable('length') !== false) {\n $ERROR('#1: eval.propertyIsEnumerable(\\'length\\') === false. Actual: ' + (eval.propertyIsEnumerable('length')));\n}\n\n//CHECK#2\nvar result = true;\nfor (p in eval){\n if (p === \"length\") {\n result = false;\n } \n}\n\nif (result !== true) {\n $ERROR('#2: result = true; for (p in eval) { if (p === \"length\") result = false; }; result === true;');\n}\n",
+ "id": "S15.1.2.1_A4.1"
+ },
+ {
+ "section": "15.1.2.1, 15.2.4.5, 11.4.1",
+ "description": "Checking use hasOwnProperty, delete",
+ "test": "//CHECK#1\nif (eval.hasOwnProperty('length') !== true) {\n $FAIL('#1: eval.hasOwnProperty(\\'length\\') === true. Actual: ' + (eval.hasOwnProperty('length')));\n}\n\ndelete eval.length;\n\n//CHECK#2\nif (eval.hasOwnProperty('length') !== true) {\n $ERROR('#2: delete eval.length; eval.hasOwnProperty(\\'length\\') === true. Actual: ' + (eval.hasOwnProperty('length')));\n}\n\n//CHECK#3\nif (eval.length === undefined) {\n $ERROR('#3: delete eval.length; eval.length !== undefined');\n}\n\n\n\n",
+ "id": "S15.1.2.1_A4.2"
+ },
+ {
+ "section": "15.1.2.1",
+ "description": "Checking if varying the length property fails",
+ "strict_mode_negative": "",
+ "test": "//CHECK#1\nvar x = eval.length;\neval.length = Infinity;\nif (eval.length !== x) {\n $ERROR('#1: x = eval.length; eval.length = Infinity; eval.length === x. Actual: ' + (eval.length));\n}\n\n",
+ "id": "S15.1.2.1_A4.3",
+ "strict_only": ""
+ },
+ {
+ "section": "15.1.2.1",
+ "description": "eval.length === 1",
+ "test": "//CHECK#1\nif (eval.length !== 1) {\n $ERROR('#1: eval.length === 1. Actual: ' + (eval.length));\n} \n\n",
+ "id": "S15.1.2.1_A4.4"
+ },
+ {
+ "section": "15.1.2.1, 15.2.4.7, 12.6.4",
+ "description": "Checking use propertyIsEnumerable, for-in",
+ "test": "//CHECK#1\nif (this.propertyIsEnumerable('eval') !== false) {\n $ERROR('#1: this.propertyIsEnumerable(\\'eval\\') === false. Actual: ' + (this.propertyIsEnumerable('eval')));\n}\n\n//CHECK#2\nvar result = true;\nfor (var p in this){\n if (p === \"eval\") {\n result = false;\n } \n}\n\nif (result !== true) {\n $ERROR('#2: result = true; for (p in this) { if (p === \"eval\") result = false; } result === true;');\n}\n",
+ "id": "S15.1.2.1_A4.5"
+ },
+ {
+ "section": "15.1.2.1",
+ "description": "Checking eval.prototype",
+ "test": "//CHECK#1\nif (eval.prototype !== undefined) {\n $ERROR('#1: eval.prototype === undefined. Actual: ' + (eval.prototype));\n}\n",
+ "id": "S15.1.2.1_A4.6"
+ },
+ {
+ "section": "15.1.2.1, 11.2.2",
+ "description": "If property does not implement the internal [[Construct]] method, throw a TypeError exception",
+ "test": "//CHECK#1\n\ntry {\n new eval();\n $ERROR('#1.1: new eval() throw TypeError. Actual: ' + (new eval()));\n} catch (e) {\n if ((e instanceof TypeError) !== true) {\n $ERROR('#1.2: new eval() throw TypeError. Actual: ' + (e));\n }\n}\n",
+ "id": "S15.1.2.1_A4.7"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.1.2.2.json b/website/resources/scripts/testcases2/15.1.2.2.json
new file mode 100644
index 000000000..1b395ff20
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.1.2.2.json
@@ -0,0 +1,14 @@
+{
+ "testCollection": {
+ "name": "15.1.2.2",
+ "numTests": 1,
+ "tests": [
+ {
+ "id": "15.1.2.2-2-1",
+ "path": "TestCases/chapter15/15.1/15.1.2/15.1.2.2/15.1.2.2-2-1.js",
+ "description": "pareseInt - 'S' is the empty string when inputString does not contain any such characters",
+ "test": "assertTrue((isNaN(parseInt(\"\")) && parseInt(\"\") !== parseInt(\"\")));\n"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.1.2.2_parseInt.json b/website/resources/scripts/testcases2/15.1.2.2_parseInt.json
new file mode 100644
index 000000000..9eb41c8e8
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.1.2.2_parseInt.json
@@ -0,0 +1,354 @@
+{
+ "testCollection": {
+ "name": "15.1.2.2_parseInt",
+ "numTests": 57,
+ "tests": [
+ {
+ "section": "15.1.2.2, 9.8",
+ "description": "Checking for boolean primitive",
+ "test": "//CHECK#1\nif (!(isNaN(parseInt(true)) && isNaN(parseInt(\"NaN\")))) {\n $ERROR('#1: parseInt(true) === Not-a-Number; parseInt(\"NaN\") === Not-a-Number. Actual: ' + (parseInt(\"NaN\")));\n}\n\n//CHECK#2\nif (String(parseInt(false)) !== \"NaN\") {\n $ERROR('#2: String(parseInt(false)) === \"NaN\". Actual: ' + (String(parseInt(false))));\n}\n",
+ "id": "S15.1.2.2_A1_T1"
+ },
+ {
+ "section": "15.1.2.2, 9.8",
+ "description": "Checking for number primitive",
+ "test": "//CHECK#1\nif (parseInt(-1) !== parseInt(\"-1\")) {\n $ERROR('#1: parseInt(-1) === parseInt(\"-1\"). Actual: ' + (parseInt(-1)));\n}\n\n//CHECK#2\nif (String(parseInt(Infinity)) !== \"NaN\") {\n $ERROR('#2: String(parseInt(Infinity)) === \"NaN\". Actual: ' + (String(parseInt(Infinity))));\n}\n\n//CHECK#3\nif (String(parseInt(NaN)) !== \"NaN\") {\n $ERROR('#3: String(parseInt(NaN)) === \"NaN\". Actual: ' + (String(parseInt(NaN))));\n}\n\n//CHECK#4\nif (parseInt(-0) !== 0) {\n $ERROR('#4: parseInt(-0) === 0. Actual: ' + (parseInt(-0)));\n} else {\n if (1 / parseInt(-0) !== Number.POSITIVE_INFINITY) {\n $ERROR('#4: parseInt(-0) === +0. Actual: ' + (parseInt(-0)));\n }\n} \n",
+ "id": "S15.1.2.2_A1_T2"
+ },
+ {
+ "section": "15.1.2.2, 9.8",
+ "description": "Checking for undefined and null",
+ "test": "//CHECK#1\nif (!(isNaN(parseInt(undefined)) && isNaN(parseInt(\"NaN\")))) {\n $ERROR('#1: parseInt(undefined) === Not-a-Number; parseInt(\"NaN\") === Not-a-Number. Actual: ' + (parseInt(\"NaN\")));\n}\n\n//CHECK#2\nif (!(isNaN(parseInt(null)) && isNaN(parseInt(\"NaN\")))) {\n $ERROR('#2: parseInt(null) === Not-a-Number; parseInt(\"NaN\") === Not-a-Number. Actual: ' + (parseInt(\"NaN\")));\n}\n\n//CHECK#3\nif (String(parseInt(undefined)) !== \"NaN\") {\n $ERROR('#3: String(parseInt(undefined)) === \"NaN\". Actual: ' + (String(parseInt(undefined))));\n}\n\n//CHECK#4\nif (String(parseInt(null)) !== \"NaN\") {\n $ERROR('#4: String(parseInt(null)) === \"NaN\". Actual: ' + (String(parseInt(null))));\n}\n",
+ "id": "S15.1.2.2_A1_T3"
+ },
+ {
+ "section": "15.1.2.2, 9.8",
+ "description": "Checking for Boolean object",
+ "test": "//CHECK#1\nif (!(isNaN(parseInt(new Boolean(true))) && isNaN(parseInt(\"NaN\")))) {\n $ERROR('#1: parseInt(new Boolean(true)) === Not-a-Number; parseInt(\"NaN\") === Not-a-Number. Actual: ' + (parseInt(\"NaN\")));\n}\n\n//CHECK#2\nif (String(parseInt(new Boolean(false))) !== \"NaN\") {\n $ERROR('#2: String(parseInt(new Boolean(false))) === \"NaN\". Actual: ' + (String(parseInt(new Boolean(false)))));\n}\n",
+ "id": "S15.1.2.2_A1_T4"
+ },
+ {
+ "section": "15.1.2.2, 9.8",
+ "description": "Checking for Number object",
+ "test": "//CHECK#1\nif (parseInt(new Number(-1)) !== parseInt(\"-1\")) {\n $ERROR('#1: parseInt(new Number(-1)) === parseInt(\"-1\"). Actual: ' + (parseInt(new Number(-1))));\n}\n\n//CHECK#2\nif (String(parseInt(new Number(Infinity))) !== \"NaN\") {\n $ERROR('#2: String(parseInt(new Number(Infinity))) === \"NaN\". Actual: ' + (String(parseInt(new Number(Infinity)))));\n}\n\n//CHECK#3\nif (String(parseInt(new Number(NaN))) !== \"NaN\") {\n $ERROR('#3: String(parseInt(new Number(NaN))) === \"NaN\". Actual: ' + (String(parseInt(new Number(NaN)))));\n}\n",
+ "id": "S15.1.2.2_A1_T5"
+ },
+ {
+ "section": "15.1.2.2, 9.8",
+ "description": "Checking for String object",
+ "test": "//CHECK#1\nif (parseInt(new String(\"-1\")) !== parseInt(\"-1\")) {\n $ERROR('#1: parseInt(new String(\"-1\")) === parseInt(\"-1\"). Actual: ' + (parseInt(new String(\"-1\"))));\n}\n\n//CHECK#2\nif (String(parseInt(new String(\"Infinity\"))) !== \"NaN\") {\n $ERROR('#2: String(parseInt(new String(\"Infinity\"))) === \"NaN\". Actual: ' + (String(parseInt(new String(\"Infinity\")))));\n}\n\n//CHECK#3\nif (String(parseInt(new String(\"NaN\"))) !== \"NaN\") {\n $ERROR('#3: String(parseInt(new String(\"NaN\"))) === \"NaN\". Actual: ' + (String(parseInt(new String(\"NaN\")))));\n}\n\n//CHECK#4\nif (String(parseInt(new String(\"false\"))) !== \"NaN\") {\n $ERROR('#4: String(parseInt(new String(\"false\"))) === \"NaN\". Actual: ' + (String(parseInt(new String(\"false\")))));\n}\n",
+ "id": "S15.1.2.2_A1_T6"
+ },
+ {
+ "section": "15.1.2.2, 9.8, 8.6.2.6",
+ "description": "If Type(value) is Object, evaluate ToPrimitive(value, String)",
+ "test": "//CHECK#1\nvar object = {valueOf: function() {return 1}};\nif (isNaN(parseInt(object)) !== true) {\n $ERROR('#1: var object = {valueOf: function() {return 1}}; parseInt(object) === Not-a-Number. Actual: ' + (parseInt(object)));\n}\n\n//CHECK#2\nvar object = {valueOf: function() {return 1}, toString: function() {return 0}};\nif (parseInt(object) !== 0) {\n $ERROR('#2: var object = {valueOf: function() {return 1}, toString: function() {return 0}}; parseInt(object) === 0. Actual: ' + (parseInt(object)));\n} \n\n//CHECK#3\nvar object = {valueOf: function() {return 1}, toString: function() {return {}}};\nif (parseInt(object) !== 1) {\n $ERROR('#3: var object = {valueOf: function() {return 1}, toString: function() {return {}}}; parseInt(object) === 1. Actual: ' + (parseInt(object)));\n}\n\n//CHECK#4\ntry {\n var object = {valueOf: function() {throw \"error\"}, toString: function() {return 1}};\n if (parseInt(object) !== 1) {\n $ERROR('#4.1: var object = {valueOf: function() {throw \"error\"}, toString: function() {return 1}}; parseInt(object) === 1. Actual: ' + (parseInt(object)));\n }\n}\ncatch (e) {\n if (e === \"error\") {\n $ERROR('#4.2: var object = {valueOf: function() {throw \"error\"}, toString: function() {return 1}}; parseInt(object) not throw \"error\"');\n } else {\n $ERROR('#4.3: var object = {valueOf: function() {throw \"error\"}, toString: function() {return 1}}; parseInt(object) not throw Error. Actual: ' + (e));\n }\n}\n\n//CHECK#5\nvar object = {toString: function() {return 1}};\nif (parseInt(object) !== 1) {\n $ERROR('#5: var object = {toString: function() {return 1}}; parseInt(object) === 1. Actual: ' + (parseInt(object)));\n}\n\n//CHECK#6\nvar object = {valueOf: function() {return {}}, toString: function() {return 1}}\nif (parseInt(object) !== 1) {\n $ERROR('#6: var object = {valueOf: function() {return {}}, toString: function() {return 1}}; parseInt(object) === 1. Actual: ' + (parseInt(object)));\n}\n\n//CHECK#7\ntry {\n var object = {valueOf: function() {return 1}, toString: function() {throw \"error\"}};\n parseInt(object);\n $ERROR('#7.1: var object = {valueOf: function() {return 1}, toString: function() {throw \"error\"}}; parseInt(object) throw \"error\". Actual: ' + (parseInt(object)));\n} \ncatch (e) {\n if (e !== \"error\") {\n $ERROR('#7.2: var object = {valueOf: function() {return 1}, toString: function() {throw \"error\"}}; parseInt(object) throw \"error\". Actual: ' + (e));\n } \n}\n\n//CHECK#8\ntry {\n var object = {valueOf: function() {return {}}, toString: function() {return {}}};\n parseInt(object);\n $ERROR('#8.1: var object = {valueOf: function() {return {}}, toString: function() {return {}}}; parseInt(object) throw TypeError. Actual: ' + (parseInt(object)));\n} \ncatch (e) {\n if ((e instanceof TypeError) !== true) {\n $ERROR('#8.2: var object = {valueOf: function() {return {}}, toString: function() {return {}}}; parseInt(object) throw TypeError. Actual: ' + (e));\n } \n}\n",
+ "id": "S15.1.2.2_A1_T7"
+ },
+ {
+ "section": "15.1.2.2",
+ "description": "StrWhiteSpaceChar :: TAB (U+0009)",
+ "test": "//CHECK#1\nif (parseInt(\"\\u00091\") !== parseInt(\"1\")) {\n $ERROR('#1: parseInt(\"\\\\u00091\") === parseInt(\"1\"). Actual: ' + (parseInt(\"\\u00091\")));\n}\n\n//CHECK#2\nif (parseInt(\"\\u0009\\u0009-1\") !== parseInt(\"-1\")) {\n $ERROR('#2: parseInt(\"\\\\u0009\\\\u0009-1\") === parseInt(\"-1\"). Actual: ' + (parseInt(\"\\u0009\\u0009-1\")));\n}\n\n//CHECK#3\nif (parseInt(\"\t1\") !== parseInt(\"1\")) {\n $ERROR('#3: parseInt(\"\t1\") === parseInt(\"1\"). Actual: ' + (parseInt(\"\t1\")));\n}\n\n//CHECK#4\nif (parseInt(\"\t\t\t1\") !== parseInt(\"1\")) {\n $ERROR('#4: parseInt(\"\t\t\t1\") === parseInt(\"1\"). Actual: ' + (parseInt(\"\t\t\t1\")));\n}\n\n//CHECK#5\nif (parseInt(\"\t\t\t\\u0009\t\t\t\\u0009-1\") !== parseInt(\"-1\")) {\n $ERROR('#5: parseInt(\"\t\t\t\\\\u0009\t\t\t\\\\u0009-1\") === parseInt(\"-1\"). Actual: ' + (parseInt(\"\t\t\t\\u0009\t\t\t\\u0009-1\")));\n}\n\n//CHECK#6\nif (isNaN(parseInt(\"\\u0009\")) !== true) {\n $ERROR('#6: parseInt(\"\\\\u0009\") === Not-a-Number. Actual: ' + (parseInt(\"\\u0009\")));\n}\n",
+ "id": "S15.1.2.2_A2_T1"
+ },
+ {
+ "section": "15.1.2.2",
+ "description": "StrWhiteSpaceChar :: USP",
+ "test": "//CHECK#\nvar count = 0;\nvar errorCount = 0;\nvar uspU = [\"\\u1680\", \"\\u180E\", \"\\u2000\", \"\\u2001\", \"\\u2002\", \"\\u2003\", \"\\u2004\", \"\\u2005\", \"\\u2006\", \"\\u2007\", \"\\u2008\", \"\\u2009\", \"\\u200A\", \"\\u202F\", \"\\u205F\", \"\\u3000\"];\nvar uspS = [\"1680\", \"180E\", \"2000\", \"2001\", \"2002\", \"2003\", \"2004\", \"2005\", \"2006\", \"2007\", \"2008\", \"2009\", \"200A\", \"202F\", \"205F\", \"3000\"];\n\nfor (var index = 0; index < uspU.length; index++) {\n var result = true;\n if (parseInt(uspU[index] + \"1\") !== parseInt(\"1\")) {\n $ERROR('#1.' + uspS[index] + ' ');\n result = false;\n }\n if (parseInt(uspU[index] + uspU[index] + uspU[index] + \"1\") !== parseInt(\"1\")) {\n $ERROR('#2.' + uspS[index] + ' ');\n result = false;\n }\n if (isNaN(parseInt(uspU[index])) !== true) {\n $ERROR('#3.' + uspS[index] + ' ');\n result = false;\n }\n if (result !== true) {\n errorCount++;\n }\n count++;\n}\n\nif (errorCount > 0) { \n $ERROR('Total error: ' + errorCount + ' bad Unicode character in ' + count);\n}\n",
+ "id": "S15.1.2.2_A2_T10"
+ },
+ {
+ "section": "15.1.2.2",
+ "description": "StrWhiteSpaceChar :: SP (U+0020)",
+ "test": "//CHECK#1\nif (parseInt(\"\\u00201\") !== parseInt(\"1\")) {\n $ERROR('#1: parseInt(\"\\\\u00201\") === parseInt(\"1\"). Actual: ' + (parseInt(\"\\u00201\")));\n}\n\n//CHECK#2\nif (parseInt(\"\\u0020\\u0020-1\") !== parseInt(\"-1\")) {\n $ERROR('#2: parseInt(\"\\\\u0020\\\\u0020-1\") === parseInt(\"-1\"). Actual: ' + (parseInt(\"\\u0020\\u0020-1\")));\n}\n\n//CHECK#3\nif (parseInt(\" 1\") !== parseInt(\"1\")) {\n $ERROR('#3: parseInt(\" 1\") === parseInt(\"1\"). Actual: ' + (parseInt(\" 1\")));\n}\n\n//CHECK#4\nif (parseInt(\" 1\") !== parseInt(\"1\")) {\n $ERROR('#4: parseInt(\" 1\") === parseInt(\"1\"). Actual: ' + (parseInt(\" 1\")));\n}\n\n//CHECK#5\nif (parseInt(\" \\u0020 \\u0020-1\") !== parseInt(\"-1\")) {\n $ERROR('#5: parseInt(\" \\\\u0020 \\\\u0020-1\") === parseInt(\"-1\"). Actual: ' + (parseInt(\" \\u0020 \\u0020-1\")));\n}\n\n//CHECK#6\nif (isNaN(parseInt(\"\\u0020\")) !== true) {\n $ERROR('#6: parseInt(\"\\\\u0020\") === Not-a-Number. Actual: ' + (parseInt(\"\\u0020\")));\n}\n",
+ "id": "S15.1.2.2_A2_T2"
+ },
+ {
+ "section": "15.1.2.2",
+ "description": "StrWhiteSpaceChar :: NBSB (U+00A0)",
+ "test": "//CHECK#1\nif (parseInt(\"\\u00A01\") !== parseInt(\"1\")) {\n $ERROR('#1: parseInt(\"\\\\u00A01\") === parseInt(\"1\"). Actual: ' + (parseInt(\"\\u00A01\")));\n}\n\n//CHECK#2\nif (parseInt(\"\\u00A0\\u00A0-1\") !== parseInt(\"-1\")) {\n $ERROR('#2: parseInt(\"\\\\u00A0\\\\u00A0-1\") === parseInt(\"-1\"). Actual: ' + (parseInt(\"\\u00A0\\u00A0-1\")));\n}\n\n//CHECK#3\nif (isNaN(parseInt(\"\\u00A0\")) !== true) {\n $ERROR('#3: parseInt(\"\\\\u00A0\") === Not-a-Number. Actual: ' + (parseInt(\"\\u00A0\")));\n}\n",
+ "id": "S15.1.2.2_A2_T3"
+ },
+ {
+ "section": "15.1.2.2",
+ "description": "StrWhiteSpaceChar :: FF (U+000C)",
+ "test": "//CHECK#1\nif (parseInt(\"\\u000C1\") !== parseInt(\"1\")) {\n $ERROR('#1: parseInt(\"\\\\u000C1\") === parseInt(\"1\"). Actual: ' + (parseInt(\"\\u000C1\")));\n}\n\n//CHECK#2\nif (parseInt(\"\\u000C\\u000C-1\") !== parseInt(\"-1\")) {\n $ERROR('#2: parseInt(\"\\\\u000C\\\\u000C-1\") === parseInt(\"-1\"). Actual: ' + (parseInt(\"\\u000C\\u000C-1\")));\n}\n\n//CHECK#3\nif (isNaN(parseInt(\"\\u000C\")) !== true) {\n $ERROR('#3: parseInt(\"\\\\u000C\") === Not-a-Number. Actual: ' + (parseInt(\"\\u000C\")));\n}\n",
+ "id": "S15.1.2.2_A2_T4"
+ },
+ {
+ "section": "15.1.2.2",
+ "description": "StrWhiteSpaceChar :: VT (U+000B)",
+ "test": "//CHECK#1\nif (parseInt(\"\\u000B1\") !== parseInt(\"1\")) {\n $ERROR('#1: parseInt(\"\\\\u000B1\") === parseInt(\"1\"). Actual: ' + (parseInt(\"\\u000B1\")));\n}\n\n//CHECK#2\nif (parseInt(\"\\u000B\\u000B-1\") !== parseInt(\"-1\")) {\n $ERROR('#2: parseInt(\"\\\\u000B\\\\u000B-1\") === parseInt(\"-1\"). Actual: ' + (parseInt(\"\\u000B\\u000B-1\")));\n}\n\n//CHECK#3\nif (isNaN(parseInt(\"\\u000B\")) !== true) {\n $ERROR('#3: parseInt(\"\\\\u000B\") === Not-a-Number. Actual: ' + (parseInt(\"\\u000B\")));\n}\n",
+ "id": "S15.1.2.2_A2_T5"
+ },
+ {
+ "section": "15.1.2.2",
+ "description": "StrWhiteSpaceChar :: CR (U+000D)",
+ "test": "//CHECK#1\nif (parseInt(\"\\u000D1\") !== parseInt(\"1\")) {\n $ERROR('#1: parseInt(\"\\\\u000D1\") === parseInt(\"1\"). Actual: ' + (parseInt(\"\\u000D1\")));\n}\n\n//CHECK#2\nif (parseInt(\"\\u000D\\u000D-1\") !== parseInt(\"-1\")) {\n $ERROR('#2: parseInt(\"\\\\u000D\\\\u000D-1\") === parseInt(\"-1\"). Actual: ' + (parseInt(\"\\u000D\\u000D-1\")));\n}\n\n//CHECK#3\nif (isNaN(parseInt(\"\\u000D\")) !== true) {\n $ERROR('#3: parseInt(\"\\\\u000D\") === Not-a-Number. Actual: ' + (parseInt(\"\\u000D\")));\n}\n",
+ "id": "S15.1.2.2_A2_T6"
+ },
+ {
+ "section": "15.1.2.2",
+ "description": "StrWhiteSpaceChar :: LF (U+000A)",
+ "test": "//CHECK#1\nif (parseInt(\"\\u000A1\") !== parseInt(\"1\")) {\n $ERROR('#1: parseInt(\"\\\\u000A1\") === parseInt(\"1\"). Actual: ' + (parseInt(\"\\u000A1\")));\n}\n\n//CHECK#2\nif (parseInt(\"\\u000A\\u000A-1\") !== parseInt(\"-1\")) {\n $ERROR('#2: parseInt(\"\\\\u000A\\\\u000A-1\") === parseInt(\"-1\"). Actual: ' + (parseInt(\"\\u000A\\u000A-1\")));\n}\n\n//CHECK#3\nif (isNaN(parseInt(\"\\u000A\")) !== true) {\n $ERROR('#3: parseInt(\"\\\\u000A\") === Not-a-Number. Actual: ' + (parseInt(\"\\u000A\")));\n}\n",
+ "id": "S15.1.2.2_A2_T7"
+ },
+ {
+ "section": "15.1.2.2",
+ "description": "StrWhiteSpaceChar :: LS (U+2028)",
+ "test": "//CHECK#1\nif (parseInt(\"\\u20281\") !== parseInt(\"1\")) {\n $ERROR('#1: parseInt(\"\\\\u20281\") === parseInt(\"1\"). Actual: ' + (parseInt(\"\\u20281\")));\n}\n\n//CHECK#2\nif (parseInt(\"\\u2028\\u2028-1\") !== parseInt(\"-1\")) {\n $ERROR('#2: parseInt(\"\\\\u2028\\\\u2028-1\") === parseInt(\"-1\"). Actual: ' + (parseInt(\"\\u2028\\u2028-1\")));\n}\n\n//CHECK#3\nif (isNaN(parseInt(\"\\u2028\")) !== true) {\n $ERROR('#3: parseInt(\"\\\\u2028\") === Not-a-Number. Actual: ' + (parseInt(\"\\u2028\")));\n}\n",
+ "id": "S15.1.2.2_A2_T8"
+ },
+ {
+ "section": "15.1.2.2",
+ "description": "StrWhiteSpaceChar :: PS (U+2029)",
+ "test": "//CHECK#1\nif (parseInt(\"\\u20291\") !== parseInt(\"1\")) {\n $ERROR('#1: parseInt(\"\\\\u20291\") === parseInt(\"1\"). Actual: ' + (parseInt(\"\\u20291\")));\n}\n\n//CHECK#2\nif (parseInt(\"\\u2029\\u2029-1\") !== parseInt(\"-1\")) {\n $ERROR('#2: parseInt(\"\\\\u2029\\\\u2029-1\") === parseInt(\"-1\"). Actual: ' + (parseInt(\"\\u2029\\u2029-1\")));\n}\n\n//CHECK#3\nif (isNaN(parseInt(\"\\u2029\")) !== true) {\n $ERROR('#3: parseInt(\"\\\\u2029\") === Not-a-Number. Actual: ' + (parseInt(\"\\u2029\")));\n}\n",
+ "id": "S15.1.2.2_A2_T9"
+ },
+ {
+ "section": "15.1.2.2, 9.3",
+ "description": "Checking for boolean primitive",
+ "test": "//CHECK#1\nif (parseInt(\"11\", false) !== parseInt(\"11\", 10)) {\n $ERROR('#1: parseInt(\"11\", false) === parseInt(\"11\", 10). Actual: ' + (parseInt(\"11\", false)));\n}\n\n//CHECK#2\nif (isNaN(parseInt(\"11\", true)) !== true) {\n $ERROR('#2: parseInt(\"11\", true) === Not-a-Number. Actual: ' + (parseInt(\"11\", true)));\n}\n",
+ "id": "S15.1.2.2_A3.1_T1"
+ },
+ {
+ "section": "15.1.2.2, 9.3",
+ "description": "Checking for string primitive",
+ "test": "//CHECK#1\nif (parseInt(\"11\", \"2\") !== parseInt(\"11\", 2)) {\n $ERROR('#1: parseInt(\"11\", \"2\") === parseInt(\"11\", 2). Actual: ' + (parseInt(\"11\", \"2\")));\n}\n\n//CHECK#2\nif (parseInt(\"11\", \"0\") !== parseInt(\"11\", 10)) {\n $ERROR('#2: parseInt(\"11\", \"0\") === parseInt(\"11\", 10). Actual: ' + (parseInt(\"11\", \"0\")));\n}\n\n//CHECK#3\nif (parseInt(\"11\", \"\") !== parseInt(\"11\", 10)) {\n $ERROR('#3: parseInt(\"11\", \"\") === parseInt(\"11\", 10). Actual: ' + (parseInt(\"11\", \"\")));\n}\n\n",
+ "id": "S15.1.2.2_A3.1_T2"
+ },
+ {
+ "section": "15.1.2.2, 9.3",
+ "description": "Checking for undefined and null",
+ "test": "//CHECK#1\nif (parseInt(\"11\", undefined) !== parseInt(\"11\", 10)) {\n $ERROR('#1: parseInt(\"11\", undefined) === parseInt(\"11\", 10). Actual: ' + (parseInt(\"11\", undefined)));\n}\n\n//CHECK#2\nif (parseInt(\"11\", null) !== parseInt(\"11\", 10)) {\n $ERROR('#2: parseInt(\"11\", null) === parseInt(\"11\", 10). Actual: ' + (parseInt(\"11\", null)));\n}\n",
+ "id": "S15.1.2.2_A3.1_T3"
+ },
+ {
+ "section": "15.1.2.2, 9.3",
+ "description": "Checking for Boolean object",
+ "test": "//CHECK#1\nif (parseInt(\"11\", new Boolean(false)) !== parseInt(\"11\", false)) {\n $ERROR('#1: parseInt(\"11\", new Boolean(false)) === parseInt(\"11\", false). Actual: ' + (parseInt(\"11\", new Boolean(false))));\n}\n\n//CHECK#2\nif (isNaN(parseInt(\"11\", new Boolean(true))) !== true) {\n $ERROR('#2: parseInt(\"11\", new Boolean(true)) === Not-a-Number. Actual: ' + (parseInt(\"11\", new Boolean(true))));\n}\n",
+ "id": "S15.1.2.2_A3.1_T4"
+ },
+ {
+ "section": "15.1.2.2, 9.3",
+ "description": "Checking for Number object",
+ "test": "//CHECK#1\nif (parseInt(\"11\", new Number(2)) !== parseInt(\"11\", 2)) {\n $ERROR('#1: parseInt(\"11\", new Number(2)) === parseInt(\"11\", 2). Actual: ' + (parseInt(\"11\", new Number(2))));\n}\n\n//CHECK#2\nif (parseInt(\"11\", new Number(Infinity)) !== parseInt(\"11\", Infinity)) {\n $ERROR('#2: parseInt(\"11\", new Number(Infinity)) === parseInt(\"11\", Infinity). Actual: ' + (parseInt(\"11\", new Number(Infinity))));\n}\n",
+ "id": "S15.1.2.2_A3.1_T5"
+ },
+ {
+ "section": "15.1.2.2, 9.3",
+ "description": "Checking for String object",
+ "test": "//CHECK#1\nif (parseInt(\"11\", new String(\"2\")) !== parseInt(\"11\", 2)) {\n $ERROR('#1: parseInt(\"11\", new String(\"2\")) === parseInt(\"11\", 2). Actual: ' + (parseInt(\"11\", new String(\"2\"))));\n}\n\n//CHECK#2\nif (parseInt(\"11\", new String(\"Infinity\")) !== parseInt(\"11\", Infinity)) {\n $ERROR('#2: parseInt(\"11\", new String(\"Infinity\")) === parseInt(\"11\", Infinity). Actual: ' + (parseInt(\"11\", new String(\"Infinity\"))));\n}\n",
+ "id": "S15.1.2.2_A3.1_T6"
+ },
+ {
+ "section": "15.1.2.2, 9.3, 8.6.2.6",
+ "description": "If Type(value) is Object, evaluate ToPrimitive(value, Number)",
+ "test": "//CHECK#1\nvar object = {valueOf: function() {return 2}};\nif (parseInt(\"11\", object) !== parseInt(\"11\", 2)) {\n $ERROR('#1: var object = {valueOf: function() {return 2}}; parseInt(\"11\", object) === parseInt(\"11\", 2). Actual: ' + (parseInt(\"11\", object)));\n}\n\n//CHECK#2\nvar object = {valueOf: function() {return 2}, toString: function() {return 1}};\nif (parseInt(\"11\", object) !== parseInt(\"11\", 2)) {\n $ERROR('#2: var object = {valueOf: function() {return 2}, toString: function() {return 1}}; parseInt(\"11\", object) === parseInt(\"11\", 2). Actual: ' + (parseInt(\"11\", object)));\n} \n\n//CHECK#3\nvar object = {valueOf: function() {return 2}, toString: function() {return {}}};\nif (parseInt(\"11\", object) !== parseInt(\"11\", 2)) {\n $ERROR('#3: var object = {valueOf: function() {return 2}, toString: function() {return {}}}; parseInt(\"11\", object) === parseInt(\"11\", 2). Actual: ' + (parseInt(\"11\", object)));\n}\n\n//CHECK#4\ntry {\n var object = {valueOf: function() {return 2}, toString: function() {throw \"error\"}};\n if (parseInt(\"11\", object) !== parseInt(\"11\", 2)) {\n $ERROR('#4.1: var object = {valueOf: function() {return 2}, toString: function() {throw \"error\"}}; parseInt(\"11\", object) === parseInt(\"11\", 2). Actual: ' + (parseInt(\"11\", object)));\n }\n}\ncatch (e) {\n if (e === \"error\") {\n $ERROR('#4.2: var object = {valueOf: function() {return 2}, toString: function() {throw \"error\"}}; parseInt(\"11\", object) not throw \"error\"');\n } else {\n $ERROR('#4.3: var object = {valueOf: function() {return 2}, toString: function() {throw \"error\"}}; parseInt(\"11\", object) not throw Error. Actual: ' + (e));\n }\n}\n\n//CHECK#5\nvar object = {toString: function() {return 2}};\nif (parseInt(\"11\", object) !== parseInt(\"11\", 2)) {\n $ERROR('#5: var object = {toString: function() {return 2}}; parseInt(\"11\", object) === parseInt(\"11\", 2). Actual: ' + (parseInt(\"11\", object)));\n}\n\n//CHECK#6\nvar object = {valueOf: function() {return {}}, toString: function() {return 2}}\nif (parseInt(\"11\", object) !== parseInt(\"11\", 2)) {\n $ERROR('#6: var object = {valueOf: function() {return {}}, toString: function() {return 2}}; parseInt(\"11\", object) === parseInt(\"11\", 2). Actual: ' + (parseInt(\"11\", object)));\n}\n\n//CHECK#7\ntry {\n var object = {valueOf: function() {throw \"error\"}, toString: function() {return 2}};\n parseInt(\"11\", object);\n $ERROR('#7.1: var object = {valueOf: function() {throw \"error\"}, toString: function() {return 2}}; parseInt(\"11\", object) throw \"error\". Actual: ' + (parseInt(\"11\", object)));\n} \ncatch (e) {\n if (e !== \"error\") {\n $ERROR('#7.2: var object = {valueOf: function() {throw \"error\"}, toString: function() {return 2}}; parseInt(\"11\", object) throw \"error\". Actual: ' + (e));\n } \n}\n\n//CHECK#8\ntry {\n var object = {valueOf: function() {return {}}, toString: function() {return {}}};\n parseInt(\"11\", object);\n $ERROR('#8.1: var object = {valueOf: function() {return {}}, toString: function() {return {}}}; parseInt(\"11\", object) throw TypeError. Actual: ' + (parseInt(\"11\", object)));\n} \ncatch (e) {\n if ((e instanceof TypeError) !== true) {\n $ERROR('#8.2: var object = {valueOf: function() {return {}}, toString: function() {return {}}}; parseInt(\"11\", object) throw TypeError. Actual: ' + (e));\n } \n}\n",
+ "id": "S15.1.2.2_A3.1_T7"
+ },
+ {
+ "section": "15.1.2.2",
+ "description": "If radix is NaN, +0, -0, +Infinity, -Infinity, return radix = +0",
+ "test": "//CHECK#1\nif (parseInt(\"11\", NaN) !== parseInt(\"11\", 10)) {\n $ERROR('#1: parseInt(\"11\", NaN) === parseInt(\"11\", 10). Actual: ' + (parseInt(\"11\", NaN)));\n}\n\n//CHECK#2\nif (parseInt(\"11\", +0) !== parseInt(\"11\", 10)) {\n $ERROR('#2: parseInt(\"11\", +0) === parseInt(\"11\", 10). Actual: ' + (parseInt(\"11\", +0)));\n}\n\n//CHECK#3\nif (parseInt(\"11\", -0) !== parseInt(\"11\", 10)) {\n $ERROR('#3: parseInt(\"11\", -0) === parseInt(\"11\", 10). Actual: ' + (parseInt(\"11\", -0)));\n}\n\n//CHECK#4\nif (parseInt(\"11\", Number.POSITIVE_INFINITY) !== parseInt(\"11\", 10)) {\n $ERROR('#4: parseInt(\"11\", Number.POSITIVE_INFINITY) === parseInt(\"11\", 10). Actual: ' + (parseInt(\"11\", Number.POSITIVE_INFINITY)));\n}\n\n//CHECK#5\nif (parseInt(\"11\", Number.NEGATIVE_INFINITY) !== parseInt(\"11\", 10)) {\n $ERROR('#5: parseInt(\"11\", Number.NEGATIVE_INFINITY) === parseInt(\"11\", 10). Actual: ' + (parseInt(\"11\", Number.NEGATIVE_INFINITY)));\n}\n",
+ "id": "S15.1.2.2_A3.2_T1"
+ },
+ {
+ "section": "15.1.2.2",
+ "description": "ToInt32 use floor",
+ "test": "//CHECK#1\nif (parseInt(\"11\", 2.1) !== parseInt(\"11\", 2)) {\n $ERROR('#1: parseInt(\"11\", 2.1) === parseInt(\"11\", 2). Actual: ' + (parseInt(\"11\", 2.1)));\n}\n\n//CHECK#2\nif (parseInt(\"11\", 2.5) !== parseInt(\"11\", 2)) {\n $ERROR('#2: parseInt(\"11\", 2.5) === parseInt(\"11\", 2). Actual: ' + (parseInt(\"11\", 2.5)));\n}\n\n//CHECK#3\nif (parseInt(\"11\", 2.9) !== parseInt(\"11\", 2)) {\n $ERROR('#3: parseInt(\"11\", 2.9) === parseInt(\"11\", 2). Actual: ' + (parseInt(\"11\", 2.9)));\n}\n\n//CHECK#4\nif (parseInt(\"11\", 2.000000000001) !== parseInt(\"11\", 2)) {\n $ERROR('#4: parseInt(\"11\", 2.000000000001) === parseInt(\"11\", 2). Actual: ' + (parseInt(\"11\", 2.000000000001)));\n}\n\n//CHECK#5\nif (parseInt(\"11\", 2.999999999999) !== parseInt(\"11\", 2)) {\n $ERROR('#5: parseInt(\"11\", 2.999999999999) === parseInt(\"11\", 2). Actual: ' + (parseInt(\"11\", 2.999999999999)));\n}\n",
+ "id": "S15.1.2.2_A3.2_T2"
+ },
+ {
+ "section": "15.1.2.2",
+ "description": "ToInt32 use modulo",
+ "test": "//CHECK#1\nif (parseInt(\"11\", 4294967298) !== parseInt(\"11\", 2)) {\n $ERROR('#1: parseInt(\"11\", 4294967298) === parseInt(\"11\", 2). Actual: ' + (parseInt(\"11\", 4294967298)));\n}\n\n//CHECK#2\nif (parseInt(\"11\", 4294967296) !== parseInt(\"11\", 10)) {\n $ERROR('#2: parseInt(\"11\", 4294967296) === parseInt(\"11\", 10). Actual: ' + (parseInt(\"11\", 4294967296)));\n}\n\n//CHECK#3\nif (isNaN(parseInt(\"11\", -2147483650)) !== true) {\n $ERROR('#3: parseInt(\"11\", 2147483650) === Not-a-Number. Actual: ' + (parseInt(\"11\", 2147483650)));\n}\n\n//CHECK#4\nif (parseInt(\"11\", -4294967294) !== parseInt(\"11\", 2)) {\n $ERROR('#4: parseInt(\"11\", -4294967294) === parseInt(\"11\", 2). Actual: ' + (parseInt(\"11\", -4294967294)));\n}\n",
+ "id": "S15.1.2.2_A3.2_T3"
+ },
+ {
+ "section": "15.1.2.2",
+ "description": "R = 0",
+ "test": "//CHECK#0\nif (parseInt(\"0\", 0) !== parseInt(\"0\", 10)) {\n $ERROR('#0: parseInt(\"0\", 0) === parseInt(\"0\", 10). Actual: ' + (parseInt(\"0\", 0)));\n} \n\n//CHECK#1\nif (parseInt(\"1\", 0) !== parseInt(\"1\", 10)) {\n $ERROR('#1: parseInt(\"1\", 0) === parseInt(\"01\", 10). Actual: ' + (parseInt(\"1\", 0)));\n} \n\n//CHECK#2\nif (parseInt(\"2\", 0) !== parseInt(\"2\", 10)) {\n $ERROR('#2: parseInt(\"2\", 0) === parseInt(\"2\", 10). Actual: ' + (parseInt(\"2\", 0)));\n} \n\n//CHECK#3\nif (parseInt(\"3\", 0) !== parseInt(\"3\", 10)) {\n $ERROR('#3: parseInt(\"3\", 0) === parseInt(\"3\", 10). Actual: ' + (parseInt(\"3\", 0)));\n} \n\n//CHECK#4\nif (parseInt(\"4\", 0) !== parseInt(\"4\", 10)) {\n $ERROR('#4: parseInt(\"4\", 0) === parseInt(4\", 10). Actual: ' + (parseInt(\"4\", 0)));\n} \n\n//CHECK#5\nif (parseInt(\"5\", 0) !== parseInt(\"5\", 10)) {\n $ERROR('#5: parseInt(\"5\", 0) === parseInt(\"5\", 10). Actual: ' + (parseInt(\"5\", 0)));\n} \n\n//CHECK#6\nif (parseInt(\"6\", 0) !== parseInt(\"6\", 10)) {\n $ERROR('#6: parseInt(\"6\", 0) === parseInt(\"6\", 10). Actual: ' + (parseInt(\"6\", 0)));\n} \n\n//CHECK#7\nif (parseInt(\"7\", 0) !== parseInt(\"7\", 10)) {\n $ERROR('#7: parseInt(\"7\", 0) === parseInt(\"7\", 10). Actual: ' + (parseInt(\"7\", 0)));\n} \n\n//CHECK#8\nif (parseInt(\"8\", 0) !== parseInt(\"8\", 10)) {\n $ERROR('#8: parseInt(\"8\", 0) === parseInt(\"8\", 10). Actual: ' + (parseInt(\"8\", 0)));\n} \n\n//CHECK#9\nif (parseInt(\"9\", 0) !== parseInt(\"9\", 10)) {\n $ERROR('#9: parseInt(\"9\", 0) === parseInt(\"9\", 10). Actual: ' + (parseInt(\"9\", 0)));\n} \n\n//CHECK#10\nif (parseInt(\"10\", 0) !== parseInt(\"10\", 10)) {\n $ERROR('#10: parseInt(\"10\", 0) === parseInt(\"10\", 10). Actual: ' + (parseInt(\"10\", 0)));\n} \n\n//CHECK#11\nif (parseInt(\"11\", 0) !== parseInt(\"11\", 10)) {\n $ERROR('#11: parseInt(\"11\", 0) === parseInt(\"11\", 10). Actual: ' + (parseInt(\"11\", 0)));\n} \n\n//CHECK#12\nif (parseInt(\"9999\", 0) !== parseInt(\"9999\", 10)) {\n $ERROR('#12: parseInt(\"9999\", 0) === parseInt(\"9999\", 10). Actual: ' + (parseInt(\"9999\", 0)));\n} \n",
+ "id": "S15.1.2.2_A4.1_T1"
+ },
+ {
+ "section": "15.1.2.2",
+ "description": "R = undefined",
+ "test": "//CHECK#0\nif (parseInt(\"0\") !== parseInt(\"0\", 10)) {\n $ERROR('#0: parseInt(\"0\") === parseInt(\"0\", 10). Actual: ' + (parseInt(\"0\")));\n} \n\n//CHECK#1\nif (parseInt(\"1\") !== parseInt(\"1\", 10)) {\n $ERROR('#1: parseInt(\"1\") === parseInt(\"01\", 10). Actual: ' + (parseInt(\"1\")));\n} \n\n//CHECK#2\nif (parseInt(\"2\") !== parseInt(\"2\", 10)) {\n $ERROR('#2: parseInt(\"2\") === parseInt(\"2\", 10). Actual: ' + (parseInt(\"2\")));\n} \n\n//CHECK#3\nif (parseInt(\"3\") !== parseInt(\"3\", 10)) {\n $ERROR('#3: parseInt(\"3\") === parseInt(\"3\", 10). Actual: ' + (parseInt(\"3\")));\n} \n\n//CHECK#4\nif (parseInt(\"4\") !== parseInt(\"4\", 10)) {\n $ERROR('#4: parseInt(\"4\") === parseInt(4\", 10). Actual: ' + (parseInt(\"4\")));\n} \n\n//CHECK#5\nif (parseInt(\"5\") !== parseInt(\"5\", 10)) {\n $ERROR('#5: parseInt(\"5\") === parseInt(\"5\", 10). Actual: ' + (parseInt(\"5\")));\n} \n\n//CHECK#6\nif (parseInt(\"6\") !== parseInt(\"6\", 10)) {\n $ERROR('#6: parseInt(\"6\") === parseInt(\"6\", 10). Actual: ' + (parseInt(\"6\")));\n} \n\n//CHECK#7\nif (parseInt(\"7\") !== parseInt(\"7\", 10)) {\n $ERROR('#7: parseInt(\"7\") === parseInt(\"7\", 10). Actual: ' + (parseInt(\"7\")));\n} \n\n//CHECK#8\nif (parseInt(\"8\") !== parseInt(\"8\", 10)) {\n $ERROR('#8: parseInt(\"8\") === parseInt(\"8\", 10). Actual: ' + (parseInt(\"8\")));\n} \n\n//CHECK#9\nif (parseInt(\"9\") !== parseInt(\"9\", 10)) {\n $ERROR('#9: parseInt(\"9\") === parseInt(\"9\", 10). Actual: ' + (parseInt(\"9\")));\n} \n\n//CHECK#10\nif (parseInt(\"10\") !== parseInt(\"10\", 10)) {\n $ERROR('#10: parseInt(\"10\") === parseInt(\"10\", 10). Actual: ' + (parseInt(\"10\")));\n} \n\n//CHECK#11\nif (parseInt(\"11\") !== parseInt(\"11\", 10)) {\n $ERROR('#11: parseInt(\"11\") === parseInt(\"11\", 10). Actual: ' + (parseInt(\"11\")));\n} \n\n//CHECK#12\nif (parseInt(\"9999\") !== parseInt(\"9999\", 10)) {\n $ERROR('#12: parseInt(\"9999\") === parseInt(\"9999\", 10). Actual: ' + (parseInt(\"9999\")));\n} \n",
+ "id": "S15.1.2.2_A4.1_T2"
+ },
+ {
+ "section": "15.1.2.2",
+ "description": "R = 1",
+ "test": "//CHECK#0\nif (isNaN(parseInt(\"0\", 1)) !== true) {\n $ERROR('#0: parseInt(\"0\", 1) === Not-a-Number. Actual: ' + (parseInt(\"0\", 1)));\n} \n\n//CHECK#1\nif (isNaN(parseInt(\"1\", 1)) !== true) {\n $ERROR('#1: parseInt(\"1\", 1) === Not-a-Number. Actual: ' + (parseInt(\"1\", 1)));\n} \n\n//CHECK#2\nif (isNaN(parseInt(\"2\", 1)) !== true) {\n $ERROR('#2: parseInt(\"2\", 1) === Not-a-Number. Actual: ' + (parseInt(\"2\", 1)));\n} \n\n//CHECK#3\nif (isNaN(parseInt(\"3\", 1)) !== true) {\n $ERROR('#3: parseInt(\"3\", 1) === Not-a-Number. Actual: ' + (parseInt(\"3\", 1)));\n} \n\n//CHECK#4\nif (isNaN(parseInt(\"4\", 1)) !== true) {\n $ERROR('#4: parseInt(\"4\", 1) === Not-a-Number. Actual: ' + (parseInt(\"4\", 1)));\n} \n\n//CHECK#5\nif (isNaN(parseInt(\"5\", 1)) !== true) {\n $ERROR('#5: parseInt(\"5\", 1) === Not-a-Number. Actual: ' + (parseInt(\"5\", 1)));\n} \n\n//CHECK#6\nif (isNaN(parseInt(\"6\", 1)) !== true) {\n $ERROR('#6: parseInt(\"6\", 1) === Not-a-Number. Actual: ' + (parseInt(\"6\", 1)));\n} \n\n//CHECK#7\nif (isNaN(parseInt(\"7\", 1)) !== true) {\n $ERROR('#7: parseInt(\"7\", 1) === Not-a-Number. Actual: ' + (parseInt(\"7\", 1)));\n} \n\n//CHECK#8\nif (isNaN(parseInt(\"8\", 1)) !== true) {\n $ERROR('#8: parseInt(\"8\", 1) === Not-a-Number. Actual: ' + (parseInt(\"8\", 1)));\n} \n\n//CHECK#9\nif (isNaN(parseInt(\"9\", 1)) !== true) {\n $ERROR('#9: parseInt(\"9\", 1) === Not-a-Number. Actual: ' + (parseInt(\"9\", 1)));\n} \n\n//CHECK#10\nif (isNaN(parseInt(\"10\", 1)) !== true) {\n $ERROR('#10: parseInt(\"10\", 1) === Not-a-Number. Actual: ' + (parseInt(\"10\", 1)));\n} \n\n//CHECK#11\nif (isNaN(parseInt(\"11\", 1)) !== true) {\n $ERROR('#11: parseInt(\"11\", 1) === Not-a-Number. Actual: ' + (parseInt(\"11\", 1)));\n} \n",
+ "id": "S15.1.2.2_A4.2_T1"
+ },
+ {
+ "section": "15.1.2.2",
+ "description": "R = 37",
+ "test": "//CHECK#0\nif (isNaN(parseInt(\"0\", 37)) !== true) {\n $ERROR('#0: parseInt(\"0\", 37) === Not-a-Number. Actual: ' + (parseInt(\"0\", 37)));\n} \n\n//CHECK#1\nif (isNaN(parseInt(\"1\", 37)) !== true) {\n $ERROR('#1: parseInt(\"1\", 37) === Not-a-Number. Actual: ' + (parseInt(\"1\", 37)));\n} \n\n//CHECK#2\nif (isNaN(parseInt(\"2\", 37)) !== true) {\n $ERROR('#2: parseInt(\"2\", 37) === Not-a-Number. Actual: ' + (parseInt(\"2\", 37)));\n} \n\n//CHECK#3\nif (isNaN(parseInt(\"3\", 37)) !== true) {\n $ERROR('#3: parseInt(\"3\", 37) === Not-a-Number. Actual: ' + (parseInt(\"3\", 37)));\n} \n\n//CHECK#4\nif (isNaN(parseInt(\"4\", 37)) !== true) {\n $ERROR('#4: parseInt(\"4\", 37) === Not-a-Number. Actual: ' + (parseInt(\"4\", 37)));\n} \n\n//CHECK#5\nif (isNaN(parseInt(\"5\", 37)) !== true) {\n $ERROR('#5: parseInt(\"5\", 37) === Not-a-Number. Actual: ' + (parseInt(\"5\", 37)));\n} \n\n//CHECK#6\nif (isNaN(parseInt(\"6\", 37)) !== true) {\n $ERROR('#6: parseInt(\"6\", 37) === Not-a-Number. Actual: ' + (parseInt(\"6\", 37)));\n} \n\n//CHECK#7\nif (isNaN(parseInt(\"7\", 37)) !== true) {\n $ERROR('#7: parseInt(\"7\", 37) === Not-a-Number. Actual: ' + (parseInt(\"7\", 37)));\n} \n\n//CHECK#8\nif (isNaN(parseInt(\"8\", 37)) !== true) {\n $ERROR('#8: parseInt(\"8\", 37) === Not-a-Number. Actual: ' + (parseInt(\"8\", 37)));\n} \n\n//CHECK#9\nif (isNaN(parseInt(\"9\", 37)) !== true) {\n $ERROR('#9: parseInt(\"9\", 37) === Not-a-Number. Actual: ' + (parseInt(\"9\", 37)));\n} \n\n//CHECK#10\nif (isNaN(parseInt(\"10\", 37)) !== true) {\n $ERROR('#10: parseInt(\"10\", 37) === Not-a-Number. Actual: ' + (parseInt(\"10\", 37)));\n} \n\n//CHECK#11\nif (isNaN(parseInt(\"11\", 37)) !== true) {\n $ERROR('#11: parseInt(\"11\", 37) === Not-a-Number. Actual: ' + (parseInt(\"11\", 37)));\n} \n",
+ "id": "S15.1.2.2_A4.2_T2"
+ },
+ {
+ "section": "15.1.2.2",
+ "description": "Complex test",
+ "test": "//CHECK#\nvar pow = 2;\nfor (var i = 1; i < 32; i++) { \n if (pow > 36) { \n var res = true; \n if (isNaN(parseInt(1, pow)) !== true) {\n $ERROR('#1.' + i + ': If R < 2 or R > 36, then return NaN');\n }\n if (isNaN(parseInt(1, -pow)) !== true) {\n $ERROR('#2.' + i + ': If R < 2 or R > 36, then return NaN');\n }\n }\n pow = pow * 2; \n} \n",
+ "id": "S15.1.2.2_A4.2_T3"
+ },
+ {
+ "section": "15.1.2.2",
+ "description": "Either R = 8, or R = 10",
+ "test": "//CHECK#\nvar res8 = 1;\nvar res10 = 1;\nif (parseInt(\"08\") !== parseInt(\"08\", 8)) {\n res8 = 0;\n}\nif (parseInt(\"08\") !== parseInt(\"08\", 10)) {\n res10 = 0;\n}\nif (parseInt(\"09\") !== parseInt(\"09\", 8)) {\n res8 = 0;\n}\nif (parseInt(\"09\") !== parseInt(\"09\", 10)) {\n res10 = 0;\n}\nif (parseInt(\"010\") !== parseInt(\"010\", 8)) {\n res8 = 0;\n}\nif (parseInt(\"010\") !== parseInt(\"010\", 10)) {\n res10 = 0;\n}\nif (res8 + res10 !== 1) {\n $ERROR('#1: If the length of S is at least 1 and the first character of S is 0, then at the implementation\\'s discretion either let R = 8 or R = 10');\n} \n",
+ "id": "S15.1.2.2_A5.1_T1"
+ },
+ {
+ "section": "15.1.2.2",
+ "description": ": 0x",
+ "test": "//CHECK#0\nif (parseInt(\"0x0\", 0) !== parseInt(\"0\", 16)) {\n $ERROR('#0: parseInt(\"0x0\", 0) === parseInt(\"0\", 16). Actual: ' + (parseInt(\"0x0\", 0)));\n}\n\n//CHECK#1\nif (parseInt(\"0x1\", 0) !== parseInt(\"1\", 16)) {\n $ERROR('#1: parseInt(\"0x1\", 0) === parseInt(\"1\", 16). Actual: ' + (parseInt(\"0x1\", 0)));\n}\n\n//CHECK#2\nif (parseInt(\"0x2\", 0) !== parseInt(\"2\", 16)) {\n $ERROR('#2: parseInt(\"0x2\", 0) === parseInt(\"2\", 16). Actual: ' + (parseInt(\"0x2\", 0)));\n}\n\n//CHECK#3\nif (parseInt(\"0x3\", 0) !== parseInt(\"3\", 16)) {\n $ERROR('#3: parseInt(\"0x3\", 0) === parseInt(\"3\", 16). Actual: ' + (parseInt(\"0x3\", 0)));\n}\n\n//CHECK#4\nif (parseInt(\"0x4\", 0) !== parseInt(\"4\", 16)) {\n $ERROR('#4: parseInt(\"0x4\", 0) === parseInt(\"4\", 16). Actual: ' + (parseInt(\"0x4\", 0)));\n}\n\n//CHECK#5\nif (parseInt(\"0x5\", 0) !== parseInt(\"5\", 16)) {\n $ERROR('#5: parseInt(\"0x5\", 0) === parseInt(\"5\", 16). Actual: ' + (parseInt(\"0x5\", 0)));\n}\n\n//CHECK#6\nif (parseInt(\"0x6\", 0) !== parseInt(\"6\", 16)) {\n $ERROR('#6: parseInt(\"0x6\", 0) === parseInt(\"6\", 16). Actual: ' + (parseInt(\"0x6\", 0)));\n}\n\n//CHECK#7\nif (parseInt(\"0x7\", 0) !== parseInt(\"7\", 16)) {\n $ERROR('#7: parseInt(\"0x7\", 0) === parseInt(\"7\", 16). Actual: ' + (parseInt(\"0x7\", 0)));\n}\n\n//CHECK#8\nif (parseInt(\"0x8\", 0) !== parseInt(\"8\", 16)) {\n $ERROR('#8: parseInt(\"0x8\", 0) === parseInt(\"8\", 16). Actual: ' + (parseInt(\"0x8\", 0)));\n}\n\n//CHECK#9\nif (parseInt(\"0x9\", 0) !== parseInt(\"9\", 16)) {\n $ERROR('#9: parseInt(\"0x9\", 0) === parseInt(\"9\", 16). Actual: ' + (parseInt(\"0x9\", 0)));\n}\n\n//CHECK#A\nif (parseInt(\"0xA\", 0) !== parseInt(\"A\", 16)) {\n $ERROR('#A: parseInt(\"0xA\", 0) === parseInt(\"A\", 16). Actual: ' + (parseInt(\"0xA\", 0)));\n}\n\n//CHECK#B\nif (parseInt(\"0xB\", 0) !== parseInt(\"B\", 16)) {\n $ERROR('#B: parseInt(\"0xB\", 0) === parseInt(\"B\", 16). Actual: ' + (parseInt(\"0xB\", 0)));\n}\n\n//CHECK#C\nif (parseInt(\"0xC\", 0) !== parseInt(\"C\", 16)) {\n $ERROR('#C: parseInt(\"0xC\", 0) === parseInt(\"C\", 16). Actual: ' + (parseInt(\"0xC\", 0)));\n}\n\n//CHECK#D\nif (parseInt(\"0xD\", 0) !== parseInt(\"D\", 16)) {\n $ERROR('#D: parseInt(\"0xD\", 0) === parseInt(\"D\", 16). Actual: ' + (parseInt(\"0xD\", 0)));\n}\n\n//CHECK#E\nif (parseInt(\"0xE\", 0) !== parseInt(\"E\", 16)) {\n $ERROR('#E: parseInt(\"0xE\", 0) === parseInt(\"E\", 16). Actual: ' + (parseInt(\"0xE\", 0)));\n}\n\n//CHECK#F\nif (parseInt(\"0xF\", 0) !== parseInt(\"F\", 16)) {\n $ERROR('#F: parseInt(\"0xF\", 0) === parseInt(\"F\", 16). Actual: ' + (parseInt(\"0xF\", 0)));\n}\n\n//CHECK#E\nif (parseInt(\"0xE\", 0) !== parseInt(\"E\", 16)) {\n $ERROR('#E: parseInt(\"0xE\", 0) === parseInt(\"E\", 16). Actual: ' + (parseInt(\"0xE\", 0)));\n}\n\n//CHECK#ABCDEF\nif (parseInt(\"0xABCDEF\", 0) !== parseInt(\"ABCDEF\", 16)) {\n $ERROR('#ABCDEF: parseInt(\"0xABCDEF\", 0) === parseInt(\"ABCDEF\", 16). Actual: ' + (parseInt(\"0xABCDEF\", 0)));\n} \n",
+ "id": "S15.1.2.2_A5.2_T1"
+ },
+ {
+ "section": "15.1.2.2",
+ "description": ": 0X",
+ "test": "//CHECK#0\nif (parseInt(\"0X0\", 0) !== parseInt(\"0\", 16)) {\n $ERROR('#0: parseInt(\"0X0\", 0) === parseInt(\"0\", 16). Actual: ' + (parseInt(\"0X0\", 0)));\n}\n\n//CHECK#1\nif (parseInt(\"0X1\") !== parseInt(\"1\", 16)) {\n $ERROR('#1: parseInt(\"0X1\") === parseInt(\"1\", 16). Actual: ' + (parseInt(\"0X1\")));\n}\n\n//CHECK#2\nif (parseInt(\"0X2\") !== parseInt(\"2\", 16)) {\n $ERROR('#2: parseInt(\"0X2\") === parseInt(\"2\", 16). Actual: ' + (parseInt(\"0X2\")));\n}\n\n//CHECK#3\nif (parseInt(\"0X3\") !== parseInt(\"3\", 16)) {\n $ERROR('#3: parseInt(\"0X3\") === parseInt(\"3\", 16). Actual: ' + (parseInt(\"0X3\")));\n}\n\n//CHECK#4\nif (parseInt(\"0X4\") !== parseInt(\"4\", 16)) {\n $ERROR('#4: parseInt(\"0X4\") === parseInt(\"4\", 16). Actual: ' + (parseInt(\"0X4\")));\n}\n\n//CHECK#5\nif (parseInt(\"0X5\") !== parseInt(\"5\", 16)) {\n $ERROR('#5: parseInt(\"0X5\") === parseInt(\"5\", 16). Actual: ' + (parseInt(\"0X5\")));\n}\n\n//CHECK#6\nif (parseInt(\"0X6\") !== parseInt(\"6\", 16)) {\n $ERROR('#6: parseInt(\"0X6\") === parseInt(\"6\", 16). Actual: ' + (parseInt(\"0X6\")));\n}\n\n//CHECK#7\nif (parseInt(\"0X7\") !== parseInt(\"7\", 16)) {\n $ERROR('#7: parseInt(\"0X7\") === parseInt(\"7\", 16). Actual: ' + (parseInt(\"0X7\")));\n}\n\n//CHECK#8\nif (parseInt(\"0X8\") !== parseInt(\"8\", 16)) {\n $ERROR('#8: parseInt(\"0X8\") === parseInt(\"8\", 16). Actual: ' + (parseInt(\"0X8\")));\n}\n\n//CHECK#9\nif (parseInt(\"0X9\") !== parseInt(\"9\", 16)) {\n $ERROR('#9: parseInt(\"0X9\") === parseInt(\"9\", 16). Actual: ' + (parseInt(\"0X9\")));\n}\n\n//CHECK#A\nif (parseInt(\"0XA\") !== parseInt(\"A\", 16)) {\n $ERROR('#A: parseInt(\"0XA\") === parseInt(\"A\", 16). Actual: ' + (parseInt(\"0XA\")));\n}\n\n//CHECK#B\nif (parseInt(\"0XB\") !== parseInt(\"B\", 16)) {\n $ERROR('#B: parseInt(\"0XB\") === parseInt(\"B\", 16). Actual: ' + (parseInt(\"0XB\")));\n}\n\n//CHECK#C\nif (parseInt(\"0XC\") !== parseInt(\"C\", 16)) {\n $ERROR('#C: parseInt(\"0XC\") === parseInt(\"C\", 16). Actual: ' + (parseInt(\"0XC\")));\n}\n\n//CHECK#D\nif (parseInt(\"0XD\") !== parseInt(\"D\", 16)) {\n $ERROR('#D: parseInt(\"0XD\") === parseInt(\"D\", 16). Actual: ' + (parseInt(\"0XD\")));\n}\n\n//CHECK#E\nif (parseInt(\"0XE\") !== parseInt(\"E\", 16)) {\n $ERROR('#E: parseInt(\"0XE\") === parseInt(\"E\", 16). Actual: ' + (parseInt(\"0XE\")));\n}\n\n//CHECK#F\nif (parseInt(\"0XF\") !== parseInt(\"F\", 16)) {\n $ERROR('#F: parseInt(\"0XF\") === parseInt(\"F\", 16). Actual: ' + (parseInt(\"0XF\")));\n}\n\n//CHECK#E\nif (parseInt(\"0XE\") !== parseInt(\"E\", 16)) {\n $ERROR('#E: parseInt(\"0XE\") === parseInt(\"E\", 16). Actual: ' + (parseInt(\"0XE\")));\n}\n\n//CHECK#ABCDEF\nif (parseInt(\"0XABCDEF\") !== parseInt(\"ABCDEF\", 16)) {\n $ERROR('#ABCDEF: parseInt(\"0XABCDEF\") === parseInt(\"ABCDEF\", 16). Actual: ' + (parseInt(\"0XABCDEF\")));\n} \n",
+ "id": "S15.1.2.2_A5.2_T2"
+ },
+ {
+ "section": "15.1.2.2",
+ "description": "Complex test. R in [2, 36]",
+ "test": "//CHECK#\nfor (var i = 2; i <= 36; i++) {\n if (parseInt(\"10$1\", i) !== i) {\n $ERROR('#' + i +': i = ' + i + 'parseInt(\"10$1\", i) === i. Actual: ' + (parseInt(\"10$1\", i)));\n }\n} \n",
+ "id": "S15.1.2.2_A6.1_T1"
+ },
+ {
+ "section": "15.1.2.2",
+ "description": "Complex test. Radix-R notation in [0..9, A-Z]",
+ "test": "//CHECK#\nvar R_digit = [\"1\", \"2\", \"3\", \"4\", \"5\", \"6\", \"7\", \"8\", \"9\", \"A\", \"B\", \"C\", \"D\", \"E\", \"F\", \"G\", \"H\", \"I\", \"J\", \"K\", \"L\", \"M\", \"N\", \"O\", \"P\", \"Q\", \"R\", \"S\", \"T\", \"U\", \"V\", \"W\", \"X\", \"Y\", \"Z\"];\nfor (var i = 2; i <= 36; i++) {\n if (parseInt(R_digit[i - 2] + \"$\", i) !== i - 1) {\n $ERROR('#' + i + ': ');\n }\n} \n",
+ "id": "S15.1.2.2_A6.1_T2"
+ },
+ {
+ "section": "15.1.2.2",
+ "description": "Complex test. Radix-R notation in [0..9, a-z]",
+ "test": "//CHECK#\nvar R_digit = [\"1\", \"2\", \"3\", \"4\", \"5\", \"6\", \"7\", \"8\", \"9\", \"a\", \"b\", \"c\", \"d\", \"e\", \"f\", \"g\", \"h\", \"i\", \"j\", \"k\", \"l\", \"m\", \"n\", \"o\", \"p\", \"q\", \"r\", \"s\", \"t\", \"u\", \"v\", \"w\", \"x\", \"y\", \"z\"];\nfor (var i = 2; i <= 36; i++) {\n if (parseInt(R_digit[i - 2] + \"$\", i) !== i - 1) {\n $ERROR('#' + i + ': ');\n }\n} \n",
+ "id": "S15.1.2.2_A6.1_T3"
+ },
+ {
+ "section": "15.1.2.2",
+ "description": "Complex test. Radix-R notation in [0..9, A-Z]",
+ "test": "//CHECK#\nvar R_digit = [\"1\", \"2\", \"3\", \"4\", \"5\", \"6\", \"7\", \"8\", \"9\", \"A\", \"B\", \"C\", \"D\", \"E\", \"F\", \"G\", \"H\", \"I\", \"J\", \"K\", \"L\", \"M\", \"N\", \"O\", \"P\", \"Q\", \"R\", \"S\", \"T\", \"U\", \"V\", \"W\", \"X\", \"Y\", \"Z\"];\nfor (var i = 2; i <= 35; i++) {\n if (parseInt(R_digit[i - 2] + R_digit[i - 1], i) !== i - 1) {\n $ERROR('#' + i + ': ');\n }\n} \n",
+ "id": "S15.1.2.2_A6.1_T4"
+ },
+ {
+ "section": "15.1.2.2",
+ "description": "Complex test. Radix-R notation in [0..9, a-z]",
+ "test": "//CHECK#\nvar R_digit = [\"1\", \"2\", \"3\", \"4\", \"5\", \"6\", \"7\", \"8\", \"9\", \"a\", \"b\", \"c\", \"d\", \"e\", \"f\", \"g\", \"h\", \"i\", \"j\", \"k\", \"l\", \"m\", \"n\", \"o\", \"p\", \"q\", \"r\", \"s\", \"t\", \"u\", \"v\", \"w\", \"x\", \"y\", \"z\"];\nfor (var i = 2; i <= 35; i++) {\n if (parseInt(R_digit[i - 2] + R_digit[i - 1], i) !== i - 1) {\n $ERROR('#' + i + ': ');\n }\n} \n",
+ "id": "S15.1.2.2_A6.1_T5"
+ },
+ {
+ "section": "15.1.2.2",
+ "description": "Complex test. Radix-R notation in [0..9]",
+ "test": "//CHECK#2\nif (parseInt(\"0123456789\", 2) !== 1) {\n $ERROR('#2: parseInt(\"0123456789\", 2) === 1. Actual: ' + (parseInt(\"0123456789\", 2)));\n} \n\n//CHECK#3\nif (parseInt(\"01234567890\", 3) !== 5) {\n $ERROR('#3: parseInt(\"01234567890\", 3) === 5. Actual: ' + (parseInt(\"01234567890\", 3)));\n} \n\n//CHECK#4\nif (parseInt(\"01234567890\", 4) !== 27) {\n $ERROR('#4: parseInt(\"01234567890\", 4) === 27. Actual: ' + (parseInt(\"01234567890\", 4)));\n} \n\n//CHECK#5\nif (parseInt(\"01234567890\", 5) !== 194) {\n $ERROR('#5: parseInt(\"01234567890\", 5) === 194. Actual: ' + (parseInt(\"01234567890\", 5)));\n} \n\n//CHECK#6\nif (parseInt(\"01234567890\", 6) !== 1865) {\n $ERROR('#6: parseInt(\"01234567890\", 6) === 1865. Actual: ' + (parseInt(\"01234567890\", 6)));\n} \n\n//CHECK#7\nif (parseInt(\"01234567890\", 7) !== 22875) {\n $ERROR('#7: parseInt(\"01234567890\", 7) === 22875. Actual: ' + (parseInt(\"01234567890\", 7)));\n} \n\n//CHECK#8\nif (parseInt(\"01234567890\", 8) !== 342391) {\n $ERROR('#8: parseInt(\"01234567890\", 8) === 342391. Actual: ' + (parseInt(\"01234567890\", 8)));\n} \n\n//CHECK#9\nif (parseInt(\"01234567890\", 9) !== 6053444) {\n $ERROR('#9: parseInt(\"01234567890\", 9) === 6053444. Actual: ' + (parseInt(\"01234567890\", 9)));\n} \n\n//CHECK#10\nif (parseInt(\"01234567890\", 10) !== Number(1234567890)) {\n $ERROR('#10: parseInt(\"01234567890\", 10) === Number(1234567890). Actual: ' + (parseInt(\"01234567890\", 10)));\n} \n",
+ "id": "S15.1.2.2_A6.1_T6"
+ },
+ {
+ "section": "15.1.2.2",
+ "description": "Complex test. R in [2, 36]",
+ "test": "//CHECK#\nfor (var i = 2; i <= 36; i++) {\n if (isNaN(parseInt(\"$string\", i)) !== true) {\n $ERROR('#' + i + ': parseInt(\"$string\", i) === Not-a-Number. Actual: ' + (parseInt(\"$string\", i)));\n }\n} \n",
+ "id": "S15.1.2.2_A7.1_T1"
+ },
+ {
+ "section": "15.1.2.2",
+ "description": "x is not a radix-R digit",
+ "test": "//CHECK#1\nif (isNaN(parseInt(\"$0x\")) !== true) {\n $ERROR('#1: parseInt(\"$0x\") === Not-a-Number. Actual: ' + (parseInt(\"$0x\")));\n}\n\n//CHECK#2\nif (isNaN(parseInt(\"$0X\")) !== true) {\n $ERROR('#2: parseInt(\"$0X\") === Not-a-Number. Actual: ' + (parseInt(\"$0X\")));\n}\n\n//CHECK#3\nif (isNaN(parseInt(\"$$$\")) !== true) {\n $ERROR('#3: parseInt(\"$$$\") === Not-a-Number. Actual: ' + (parseInt(\"$$$\")));\n}\n\n//CHECK#4\nif (isNaN(parseInt(\"\")) !== true) {\n $ERROR('#4: parseInt(\"\") === Not-a-Number. Actual: ' + (parseInt(\"\")));\n}\n\n//CHECK#5\nif (isNaN(parseInt(\" \")) !== true) {\n $ERROR('#5: parseInt(\" \") === Not-a-Number. Actual: ' + (parseInt(\" \")));\n} \n",
+ "id": "S15.1.2.2_A7.1_T2"
+ },
+ {
+ "section": "15.1.2.2",
+ "description": "Complex test. Check algorithm",
+ "test": "//CHECK#\nvar R_digit1 = [\"1\", \"2\", \"3\", \"4\", \"5\", \"6\", \"7\", \"8\", \"9\", \"A\", \"B\", \"C\", \"D\", \"E\", \"F\", \"G\", \"H\", \"I\", \"J\", \"K\", \"L\", \"M\", \"N\", \"O\", \"P\", \"Q\", \"R\", \"S\", \"T\", \"U\", \"V\", \"W\", \"X\", \"Y\", \"Z\"];\nvar R_digit2 = [\"1\", \"2\", \"3\", \"4\", \"5\", \"6\", \"7\", \"8\", \"9\", \"a\", \"b\", \"c\", \"d\", \"e\", \"f\", \"g\", \"h\", \"i\", \"j\", \"k\", \"l\", \"m\", \"n\", \"o\", \"p\", \"q\", \"r\", \"s\", \"t\", \"u\", \"v\", \"w\", \"x\", \"y\", \"z\"];\nfor (var i = 2; i <= 36; i++) {\n for (var j = 0; j < 10; j++) {\n var str = \"\"; \n var num = 0;\n var pow = 1;\n var k0 = Math.max(2, i - j);\n for (var k = k0; k <= i; k++) { \n if (k % 2 === 0) { \n str = str + R_digit1[k - 2];\n } else { \n str = str + R_digit2[k - 2];\n }\n num = num + (i + (k0 - k) - 1) * pow;\n pow = pow * i; \n } \n if (parseInt(str, i) !== num) {\n $ERROR('#' + i + '.' + j + ' : '); \n }\n } \n} \n",
+ "id": "S15.1.2.2_A7.2_T1"
+ },
+ {
+ "section": "15.1.2.2",
+ "description": "Checking algorithm for R = 2",
+ "test": "//CHECK#1\nif (parseInt(\"1\", 2) !== 1) {\n $ERROR('#1: parseInt(\"1\", 2) === 1. Actual: ' + (parseInt(\"1\", 2)));\n}\n\n//CHECK#2\nif (parseInt(\"11\", 2) !== 3) {\n $ERROR('#2: parseInt(\"11\", 2) === 3. Actual: ' + (parseInt(\"11\", 2)));\n}\n\n//CHECK#3\nif (parseInt(\"111\", 2) !== 7) {\n $ERROR('#3: parseInt(\"111\", 2) === 7. Actual: ' + (parseInt(\"111\", 2)));\n}\n\n//CHECK#4\nif (parseInt(\"1111\", 2) !== 15) {\n $ERROR('#4: parseInt(\"1111\", 2) === 15. Actual: ' + (parseInt(\"1111\", 2)));\n}\n\n//CHECK#5\nif (parseInt(\"11111\", 2) !== 31) {\n $ERROR('#5: parseInt(\"11111\", 2) === 31. Actual: ' + (parseInt(\"11111\", 2)));\n}\n\n//CHECK#6\nif (parseInt(\"111111\", 2) !== 63) {\n $ERROR('#6: parseInt(\"111111\", 2) === 63. Actual: ' + (parseInt(\"111111\", 2)));\n}\n\n//CHECK#7\nif (parseInt(\"1111111\", 2) !== 127) {\n $ERROR('#7: parseInt(\"1111111\", 2) === 127. Actual: ' + (parseInt(\"1111111\", 2)));\n}\n\n//CHECK#8\nif (parseInt(\"11111111\", 2) !== 255) {\n $ERROR('#8: parseInt(\"11111111\", 2) === 255. Actual: ' + (parseInt(\"11111111\", 2)));\n}\n\n//CHECK#9\nif (parseInt(\"111111111\", 2) !== 511) {\n $ERROR('#9: parseInt(\"111111111\", 2) === 511. Actual: ' + (parseInt(\"111111111\", 2)));\n}\n\n//CHECK#10\nif (parseInt(\"1111111111\", 2) !== 1023) {\n $ERROR('#10: parseInt(\"1111111111\", 2) === 1023. Actual: ' + (parseInt(\"1111111111\", 2)));\n}\n\n//CHECK#11\nif (parseInt(\"11111111111\", 2) !== 2047) {\n $ERROR('#11: parseInt(\"11111111111\", 2) === 2047. Actual: ' + (parseInt(\"11111111111\", 2)));\n}\n\n//CHECK#12\nif (parseInt(\"111111111111\", 2) !== 4095) {\n $ERROR('#12: parseInt(\"111111111111\", 2) === 4095. Actual: ' + (parseInt(\"111111111111\", 2)));\n}\n\n//CHECK#13\nif (parseInt(\"1111111111111\", 2) !== 8191) {\n $ERROR('#13: parseInt(\"1111111111111\", 2) === 8191. Actual: ' + (parseInt(\"1111111111111\", 2)));\n}\n\n//CHECK#14\nif (parseInt(\"11111111111111\", 2) !== 16383) {\n $ERROR('#14: parseInt(\"11111111111111\", 2) === 16383. Actual: ' + (parseInt(\"11111111111111\", 2)));\n}\n\n//CHECK#15\nif (parseInt(\"111111111111111\", 2) !== 32767) {\n $ERROR('#15: parseInt(\"111111111111111\", 2) === 32767. Actual: ' + (parseInt(\"111111111111111\", 2)));\n}\n\n//CHECK#16\nif (parseInt(\"1111111111111111\", 2) !== 65535) {\n $ERROR('#16: parseInt(\"1111111111111111\", 2) === 65535. Actual: ' + (parseInt(\"1111111111111111\", 2)));\n}\n\n//CHECK#17\nif (parseInt(\"11111111111111111\", 2) !== 131071) {\n $ERROR('#17: parseInt(\"11111111111111111\", 2) === 131071. Actual: ' + (parseInt(\"11111111111111111\", 2)));\n}\n\n//CHECK#18\nif (parseInt(\"111111111111111111\", 2) !== 262143) {\n $ERROR('#18: parseInt(\"111111111111111111\", 2) === 262143. Actual: ' + (parseInt(\"111111111111111111\", 2)));\n}\n\n//CHECK#19\nif (parseInt(\"1111111111111111111\", 2) !== 524287) {\n $ERROR('#19: parseInt(\"1111111111111111111\", 2) === 524287. Actual: ' + (parseInt(\"1111111111111111111\", 2)));\n}\n\n//CHECK#20\nif (parseInt(\"11111111111111111111\", 2) !== 1048575) {\n $ERROR('#20: parseInt(\"11111111111111111111\", 2) === 1048575. Actual: ' + (parseInt(\"11111111111111111111\", 2)));\n}\n",
+ "id": "S15.1.2.2_A7.2_T2"
+ },
+ {
+ "section": "15.1.2.2",
+ "description": "Checking algorithm for R = 16",
+ "test": "//CHECK#1\nif (parseInt(\"0x1\", 16) !== 1) {\n $ERROR('#1: parseInt(\"0x1\", 16) === 1. Actual: ' + (parseInt(\"0x1\", 16)));\n}\n\n//CHECK#2\nif (parseInt(\"0X10\", 16) !== 16) {\n $ERROR('#2: parseInt(\"0X10\", 16) === 16. Actual: ' + (parseInt(\"0X10\", 16)));\n}\n\n//CHECK#3\nif (parseInt(\"0x100\", 16) !== 256) {\n $ERROR('#3: parseInt(\"0x100\", 16) === 256. Actual: ' + (parseInt(\"0x100\", 16)));\n}\n\n//CHECK#4\nif (parseInt(\"0X1000\", 16) !== 4096) {\n $ERROR('#4: parseInt(\"0X1000\", 16) === 4096. Actual: ' + (parseInt(\"0X1000\", 16)));\n}\n\n//CHECK#5\nif (parseInt(\"0x10000\", 16) !== 65536) {\n $ERROR('#5: parseInt(\"0x10000\", 16) === 65536. Actual: ' + (parseInt(\"0x10000\", 16)));\n}\n\n//CHECK#6\nif (parseInt(\"0X100000\", 16) !== 1048576) {\n $ERROR('#6: parseInt(\"x100000\", 16) === 1048576. Actual: ' + (parseInt(\"x100000\", 16)));\n}\n\n//CHECK#7\nif (parseInt(\"0x1000000\", 16) !== 16777216) {\n $ERROR('#7: parseInt(\"0x1000000\", 16) === 16777216. Actual: ' + (parseInt(\"0x1000000\", 16)));\n}\n\n//CHECK#8\nif (parseInt(\"0x10000000\", 16) !== 268435456) {\n $ERROR('#8: parseInt(\"0x10000000\", 16) === 268435456. Actual: ' + (parseInt(\"0x10000000\", 16)));\n}\n\n//CHECK#9\nif (parseInt(\"0x100000000\", 16) !== 4294967296) {\n $ERROR('#9: parseInt(\"0x100000000\", 16) === 4294967296. Actual: ' + (parseInt(\"0x100000000\", 16)));\n}\n\n//CHECK#10\nif (parseInt(\"0x1000000000\", 16) !== 68719476736) {\n $ERROR('#10: parseInt(\"0x1000000000\", 16) === 68719476736. Actual: ' + (parseInt(\"0x1000000000\", 16)));\n}\n\n//CHECK#10\nif (parseInt(\"0x10000000000\", 16) !== 1099511627776) {\n $ERROR('#10: parseInt(\"0x10000000000\", 16) === 1099511627776. Actual: ' + (parseInt(\"0x10000000000\", 16)));\n}\n\n//CHECK#12\nif (parseInt(\"0x100000000000\", 16) !== 17592186044416) {\n $ERROR('#12: parseInt(\"0x100000000000\", 16) === 17592186044416. Actual: ' + (parseInt(\"0x100000000000\", 16)));\n}\n\n//CHECK#13\nif (parseInt(\"0x1000000000000\", 16) !== 281474976710656) {\n $ERROR('#13: parseInt(\"0x1000000000000\", 16) === 281474976710656. Actual: ' + (parseInt(\"0x1000000000000\", 16)));\n}\n\n//CHECK#14\nif (parseInt(\"0x10000000000000\", 16) !== 4503599627370496) {\n $ERROR('#14: parseInt(\"0x10000000000000\", 16) === 4503599627370496. Actual: ' + (parseInt(\"0x10000000000000\", 16)));\n}\n\n//CHECK#15\nif (parseInt(\"0x100000000000000\", 16) !== 72057594037927936) {\n $ERROR('#15: parseInt(\"0x100000000000000\", 16) === 72057594037927936. Actual: ' + (parseInt(\"0x100000000000000\", 16)));\n}\n\n//CHECK#16\nif (parseInt(\"0x1000000000000000\", 16) !== 1152921504606846976) {\n $ERROR('#16: parseInt(\"0x1000000000000000\", 16) === 1152921504606846976. Actual: ' + (parseInt(\"0x1000000000000000\", 16)));\n}\n\n//CHECK#17\nif (parseInt(\"0x10000000000000000\", 16) !== 18446744073709551616) {\n $ERROR('#17: parseInt(\"0x10000000000000000\", 16) === 18446744073709551616. Actual: ' + (parseInt(\"0x10000000000000000\", 16)));\n}\n\n//CHECK#18\nif (parseInt(\"0x100000000000000000\", 16) !== 295147905179352825856) {\n $ERROR('#18: parseInt(\"0x100000000000000000\", 16) === 295147905179352825856. Actual: ' + (parseInt(\"0x100000000000000000\", 16)));\n}\n\n//CHECK#19\nif (parseInt(\"0x1000000000000000000\", 16) !== 4722366482869645213696) {\n $ERROR('#19: parseInt(\"0x1000000000000000000\", 16) === 4722366482869645213696. Actual: ' + (parseInt(\"0x1000000000000000000\", 16)));\n}\n\n//CHECK#20\nif (parseInt(\"0x10000000000000000000\", 16) !== 75557863725914323419136) {\n $ERROR('#20: parseInt(\"0x10000000000000000000\", 16) === 75557863725914323419136. Actual: ' + (parseInt(\"0x10000000000000000000\", 16)));\n}\n",
+ "id": "S15.1.2.2_A7.2_T3"
+ },
+ {
+ "section": "15.1.2.2",
+ "description": "Complex test. Check algorithm",
+ "test": "//CHECK#\nvar R_digit1 = [\"1\", \"2\", \"3\", \"4\", \"5\", \"6\", \"7\", \"8\", \"9\", \"A\", \"B\", \"C\", \"D\", \"E\", \"F\", \"G\", \"H\", \"I\", \"J\", \"K\", \"L\", \"M\", \"N\", \"O\", \"P\", \"Q\", \"R\", \"S\", \"T\", \"U\", \"V\", \"W\", \"X\", \"Y\", \"Z\"];\nvar R_digit2 = [\"1\", \"2\", \"3\", \"4\", \"5\", \"6\", \"7\", \"8\", \"9\", \"a\", \"b\", \"c\", \"d\", \"e\", \"f\", \"g\", \"h\", \"i\", \"j\", \"k\", \"l\", \"m\", \"n\", \"o\", \"p\", \"q\", \"r\", \"s\", \"t\", \"u\", \"v\", \"w\", \"x\", \"y\", \"z\"];\nfor (var i = 2; i <= 36; i++) {\n for (var j = 0; j < 10; j++) {\n var str = \"+\"; \n var sign = 1;\n if (j % 2 !== 0) { \n str = \"-\";\n sign= -1;\n } \n var num = 0;\n var pow = 1;\n var k0 = Math.max(2, i - j);\n for (var k = k0; k <= i; k++) { \n if (k % 2 === 0) { \n str = str + R_digit1[k - 2];\n } else { \n str = str + R_digit2[k - 2];\n }\n num = num + (i + (k0 - k) - 1) * pow;\n pow = pow * i; \n } \n if (parseInt(str, i) !== num * sign) {\n $ERROR('#' + i + '.' + j + ' : '); \n }\n } \n} \n",
+ "id": "S15.1.2.2_A7.3_T1"
+ },
+ {
+ "section": "15.1.2.2",
+ "description": "Checking algorithm for R = 2",
+ "test": "//CHECK#1\nif (parseInt(\"-1\", 2) !== -1) {\n $ERROR('#1: parseInt(\"-1\", 2) === -1. Actual: ' + (parseInt(\"-1\", 2)));\n}\n\n//CHECK#2\nif (parseInt(\"-11\", 2) !== -3) {\n $ERROR('#2: parseInt(\"-11\", 2) === -3. Actual: ' + (parseInt(\"-11\", 2)));\n}\n\n//CHECK#3\nif (parseInt(\"-111\", 2) !== -7) {\n $ERROR('#3: parseInt(\"-111\", 2) === -7. Actual: ' + (parseInt(\"-111\", 2)));\n}\n\n//CHECK#4\nif (parseInt(\"-1111\", 2) !== -15) {\n $ERROR('#4: parseInt(\"-1111\", 2) === -15. Actual: ' + (parseInt(\"-1111\", 2)));\n}\n\n//CHECK#5\nif (parseInt(\"-11111\", 2) !== -31) {\n $ERROR('#5: parseInt(\"-11111\", 2) === -31. Actual: ' + (parseInt(\"-11111\", 2)));\n}\n\n//CHECK#6\nif (parseInt(\"-111111\", 2) !== -63) {\n $ERROR('#6: parseInt(\"-111111\", 2) === -63. Actual: ' + (parseInt(\"-111111\", 2)));\n}\n\n//CHECK#7\nif (parseInt(\"-1111111\", 2) !== -127) {\n $ERROR('#7: parseInt(\"-1111111\", 2) === -127. Actual: ' + (parseInt(\"-1111111\", 2)));\n}\n\n//CHECK#8\nif (parseInt(\"-11111111\", 2) !== -255) {\n $ERROR('#8: parseInt(\"-11111111\", 2) === -255. Actual: ' + (parseInt(\"-11111111\", 2)));\n}\n\n//CHECK#9\nif (parseInt(\"-111111111\", 2) !== -511) {\n $ERROR('#9: parseInt(\"-111111111\", 2) === -511. Actual: ' + (parseInt(\"-111111111\", 2)));\n}\n\n//CHECK#10\nif (parseInt(\"-1111111111\", 2) !== -1023) {\n $ERROR('#10: parseInt(\"-1111111111\", 2) === -1023. Actual: ' + (parseInt(\"-1111111111\", 2)));\n}\n\n//CHECK#11\nif (parseInt(\"-11111111111\", 2) !== -2047) {\n $ERROR('#11: parseInt(\"-11111111111\", 2) === -2047. Actual: ' + (parseInt(\"-11111111111\", 2)));\n}\n\n//CHECK#12\nif (parseInt(\"-111111111111\", 2) !== -4095) {\n $ERROR('#12: parseInt(\"-111111111111\", 2) === -4095. Actual: ' + (parseInt(\"-111111111111\", 2)));\n}\n\n//CHECK#13\nif (parseInt(\"-1111111111111\", 2) !== -8191) {\n $ERROR('#13: parseInt(\"-1111111111111\", 2) === -8191. Actual: ' + (parseInt(\"-1111111111111\", 2)));\n}\n\n//CHECK#14\nif (parseInt(\"-11111111111111\", 2) !== -16383) {\n $ERROR('#14: parseInt(\"-11111111111111\", 2) === -16383. Actual: ' + (parseInt(\"-11111111111111\", 2)));\n}\n\n//CHECK#15\nif (parseInt(\"-111111111111111\", 2) !== -32767) {\n $ERROR('#15: parseInt(\"-111111111111111\", 2) === -32767. Actual: ' + (parseInt(\"-111111111111111\", 2)));\n}\n\n//CHECK#16\nif (parseInt(\"-1111111111111111\", 2) !== -65535) {\n $ERROR('#16: parseInt(\"-1111111111111111\", 2) === -65535. Actual: ' + (parseInt(\"-1111111111111111\", 2)));\n}\n\n//CHECK#17\nif (parseInt(\"-11111111111111111\", 2) !== -131071) {\n $ERROR('#17: parseInt(\"-11111111111111111\", 2) === -131071. Actual: ' + (parseInt(\"-11111111111111111\", 2)));\n}\n\n//CHECK#18\nif (parseInt(\"-111111111111111111\", 2) !== -262143) {\n $ERROR('#18: parseInt(\"-111111111111111111\", 2) === -262143. Actual: ' + (parseInt(\"-111111111111111111\", 2)));\n}\n\n//CHECK#19\nif (parseInt(\"-1111111111111111111\", 2) !== -524287) {\n $ERROR('#19: parseInt(\"-1111111111111111111\", 2) === -524287. Actual: ' + (parseInt(\"-1111111111111111111\", 2)));\n}\n\n//CHECK#20\nif (parseInt(\"-11111111111111111111\", 2) !== -1048575) {\n $ERROR('#20: parseInt(\"-11111111111111111111\", 2) === -1048575. Actual: ' + (parseInt(\"-11111111111111111111\", 2)));\n}\n",
+ "id": "S15.1.2.2_A7.3_T2"
+ },
+ {
+ "section": "15.1.2.2",
+ "description": "Checking algorithm for R = 10",
+ "test": "//CHECK#1\nif (parseInt(\"-1\", 10) !== -1) {\n $ERROR('#1: parseInt(\"-1\", 10) === -1. Actual: ' + (parseInt(\"-1\", 10)));\n}\n\n//CHECK#2\nif (parseInt(\"-10\", 10) !== -10) {\n $ERROR('#2: parseInt(\"-10\", 10) === -10. Actual: ' + (parseInt(\"-10\", 10)));\n}\n\n//CHECK#3\nif (parseInt(\"-100\", 10) !== -100) {\n $ERROR('#3: parseInt(\"-100\", 10) === -100. Actual: ' + (parseInt(\"-100\", 10)));\n}\n\n//CHECK#4\nif (parseInt(\"-1000\", 10) !== -1000) {\n $ERROR('#4: parseInt(\"-1000\", 10) === -1000. Actual: ' + (parseInt(\"-1000\", 10)));\n}\n\n//CHECK#5\nif (parseInt(\"-10000\", 10) !== -10000) {\n $ERROR('#5: parseInt(\"-10000\", 10) === -10000. Actual: ' + (parseInt(\"-10000\", 10)));\n}\n\n//CHECK#6\nif (parseInt(\"-100000\", 10) !== -100000) {\n $ERROR('#6: parseInt(\"-100000\", 10) === -100000. Actual: ' + (parseInt(\"-100000\", 10)));\n}\n\n//CHECK#7\nif (parseInt(\"-1000000\", 10) !== -1000000) {\n $ERROR('#7: parseInt(\"-1000000\", 10) === -1000000. Actual: ' + (parseInt(\"-1000000\", 10)));\n}\n\n//CHECK#8\nif (parseInt(\"-10000000\", 10) !== -10000000) {\n $ERROR('#8: parseInt(\"-10000000\", 10) === -10000000. Actual: ' + (parseInt(\"-10000000\", 10)));\n}\n\n//CHECK#9\nif (parseInt(\"-100000000\", 10) !== -100000000) {\n $ERROR('#9: parseInt(\"-100000000\", 10) === -100000000. Actual: ' + (parseInt(\"-100000000\", 10)));\n}\n\n//CHECK#10\nif (parseInt(\"-1000000000\", 10) !== -1000000000) {\n $ERROR('#10: parseInt(\"-1000000000\", 10) === -1000000000. Actual: ' + (parseInt(\"-1000000000\", 10)));\n}\n\n//CHECK#10\nif (parseInt(\"-10000000000\", 10) !== -10000000000) {\n $ERROR('#10: parseInt(\"-10000000000\", 10) === -10000000000. Actual: ' + (parseInt(\"-10000000000\", 10)));\n}\n\n//CHECK#12\nif (parseInt(\"-100000000000\", 10) !== -100000000000) {\n $ERROR('#12: parseInt(\"-100000000000\", 10) === -100000000000. Actual: ' + (parseInt(\"-100000000000\", 10)));\n}\n\n//CHECK#13\nif (parseInt(\"-1000000000000\", 10) !== -1000000000000) {\n $ERROR('#13: parseInt(\"-1000000000000\", 10) === -1000000000000. Actual: ' + (parseInt(\"-1000000000000\", 10)));\n}\n\n//CHECK#14\nif (parseInt(\"-10000000000000\", 10) !== -10000000000000) {\n $ERROR('#14: parseInt(\"-10000000000000\", 10) === -10000000000000. Actual: ' + (parseInt(\"-10000000000000\", 10)));\n}\n\n//CHECK#15\nif (parseInt(\"-100000000000000\", 10) !== -100000000000000) {\n $ERROR('#15: parseInt(\"-100000000000000\", 10) === -100000000000000. Actual: ' + (parseInt(\"-100000000000000\", 10)));\n}\n\n//CHECK#10\nif (parseInt(\"-1000000000000000\", 10) !== -1000000000000000) {\n $ERROR('#10: parseInt(\"-1000000000000000\", 10) === -1000000000000000. Actual: ' + (parseInt(\"-1000000000000000\", 10)));\n}\n\n//CHECK#17\nif (parseInt(\"-10000000000000000\", 10) !== -10000000000000000) {\n $ERROR('#17: parseInt(\"-10000000000000000\", 10) === -10000000000000000. Actual: ' + (parseInt(\"-10000000000000000\", 10)));\n}\n\n//CHECK#18\nif (parseInt(\"-100000000000000000\", 10) !== -100000000000000000) {\n $ERROR('#18: parseInt(\"-100000000000000000\", 10) === -100000000000000000. Actual: ' + (parseInt(\"-100000000000000000\", 10)));\n}\n\n//CHECK#19\nif (parseInt(\"-1000000000000000000\", 10) !== -1000000000000000000) {\n $ERROR('#19: parseInt(\"-1000000000000000000\", 10) === -1000000000000000000. Actual: ' + (parseInt(\"-1000000000000000000\", 10)));\n}\n\n//CHECK#20\nif (parseInt(\"-10000000000000000000\", 10) !== -10000000000000000000) {\n $ERROR('#20: parseInt(\"-10000000000000000000\", 10) === -10000000000000000000. Actual: ' + (parseInt(\"-10000000000000000000\", 10)));\n}\n",
+ "id": "S15.1.2.2_A7.3_T3"
+ },
+ {
+ "section": "15.1.2.2, 9.3.1",
+ "description": "Complex test without eval",
+ "test": "//CHECK\nvar errorCount = 0;\nvar count = 0;\nvar indexP;\nvar indexO = 0;\nfor (var index = 0; index <= 65535; index++) { \n if ((index < 0x0030) || (index > 0x0039) && \n (index < 0x0041) || (index > 0x005A) && \n (index < 0x0061) || (index > 0x007A)) { \n var hex = decimalToHexString(index);\n if (parseInt(\"1Z\" + String.fromCharCode(index), 36) !== 71) { \n if (indexO === 0) { \n indexO = index;\n } else {\n if ((index - indexP) !== 1) { \n if ((indexP - indexO) !== 0) {\n var hexP = decimalToHexString(indexP);\n var hexO = decimalToHexString(indexO);\n $ERROR('#' + hexO + '-' + hexP + ' ');\n } \n else {\n var hexP = decimalToHexString(indexP);\n $ERROR('#' + hexP + ' ');\n } \n indexO = index;\n } \n }\n indexP = index;\n errorCount++; \n } \n count++;\n } \n}\n\nif (errorCount > 0) {\n if ((indexP - indexO) !== 0) {\n var hexP = decimalToHexString(indexP);\n var hexO = decimalToHexString(indexO);\n $ERROR('#' + hexO + '-' + hexP + ' ');\n } else {\n var hexP = decimalToHexString(indexP);\n $ERROR('#' + hexP + ' ');\n } \n $ERROR('Total error: ' + errorCount + ' bad Unicode character in ' + count + ' ');\n}\n\nfunction decimalToHexString(n) {\n n = Number(n);\n var h = \"\";\n for (var i = 3; i >= 0; i--) {\n if (n >= Math.pow(16, i)) {\n var t = Math.floor(n / Math.pow(16, i));\n n -= t * Math.pow(16, i);\n if ( t >= 10 ) {\n if ( t == 10 ) { h += \"A\"; }\n if ( t == 11 ) { h += \"B\"; }\n if ( t == 12 ) { h += \"C\"; }\n if ( t == 13 ) { h += \"D\"; }\n if ( t == 14 ) { h += \"E\"; }\n if ( t == 15 ) { h += \"F\"; }\n } else {\n h += String(t);\n }\n } else {\n h += \"0\";\n }\n }\n return h;\n}\n",
+ "id": "S15.1.2.2_A8"
+ },
+ {
+ "section": "15.1.2.2, 15.2.4.7, 12.6.4",
+ "description": "Checking use propertyIsEnumerable, for-in",
+ "test": "//CHECK#1\nif (parseInt.propertyIsEnumerable('length') !== false) {\n $ERROR('#1: parseInt.propertyIsEnumerable(\\'length\\') === false. Actual: ' + (parseInt.propertyIsEnumerable('length')));\n}\n\n//CHECK#2\nvar result = true;\nfor (var p in parseInt){\n if (p === \"length\") {\n result = false;\n } \n}\n\nif (result !== true) {\n $ERROR('#2: result = true; for (p in parseInt) { if (p === \"length\") result = false; } result === true;');\n}\n",
+ "id": "S15.1.2.2_A9.1"
+ },
+ {
+ "section": "15.1.2.2, 15.2.4.5, 11.4.1",
+ "description": "Checking use hasOwnProperty, delete",
+ "strict_mode_negative": "",
+ "test": "//CHECK#1\nif (parseInt.hasOwnProperty('length') !== true) {\n $FAIL('#1: parseInt.hasOwnProperty(\\'length\\') === true. Actual: ' + (parseInt.hasOwnProperty('length')));\n}\n\ndelete parseInt.length;\n\n//CHECK#2\nif (parseInt.hasOwnProperty('length') !== true) {\n $ERROR('#2: delete parseInt.length; parseInt.hasOwnProperty(\\'length\\') === true. Actual: ' + (parseInt.hasOwnProperty('length')));\n}\n\n//CHECK#3\nif (parseInt.length === undefined) {\n $ERROR('#3: delete parseInt.length; parseInt.length !== undefined');\n}\n",
+ "id": "S15.1.2.2_A9.2",
+ "strict_only": ""
+ },
+ {
+ "section": "15.1.2.2",
+ "description": "Checking if varying the length property fails",
+ "strict_mode_negative": "",
+ "test": "//CHECK#1\nx = parseInt.length;\nparseInt.length = Infinity;\nif (parseInt.length !== x) {\n $ERROR('#1: x = parseInt.length; parseInt.length = Infinity; parseInt.length === x. Actual: ' + (parseInt.length));\n}\n\n",
+ "id": "S15.1.2.2_A9.3",
+ "strict_only": ""
+ },
+ {
+ "section": "15.1.2.2",
+ "description": "parseInt.length === 2",
+ "test": "//CHECK#1\nif (parseInt.length !== 2) {\n $ERROR('#1: parseInt.length === 2. Actual: ' + (parseInt.length));\n} \n\n",
+ "id": "S15.1.2.2_A9.4"
+ },
+ {
+ "section": "15.1.2.2, 15.2.4.7, 12.6.4",
+ "description": "Checking use propertyIsEnumerable, for-in",
+ "test": "//CHECK#1\nif (this.propertyIsEnumerable('parseInt') !== false) {\n $ERROR('#1: this.propertyIsEnumerable(\\'parseInt\\') === false. Actual: ' + (this.propertyIsEnumerable('parseInt')));\n}\n\n//CHECK#2\nvar result = true;\nfor (var p in this){\n if (p === \"parseInt\") {\n result = false;\n } \n}\n\nif (result !== true) {\n $ERROR('#2: result = true; for (p in this) { if (p === \"parseInt\") result = false; } result === true;');\n}\n",
+ "id": "S15.1.2.2_A9.5"
+ },
+ {
+ "section": "15.1.2.2",
+ "description": "Checking parseInt.prototype",
+ "test": "//CHECK#1\nif (parseInt.prototype !== undefined) {\n $ERROR('#1: parseInt.prototype === undefined. Actual: ' + (parseInt.prototype));\n}\n",
+ "id": "S15.1.2.2_A9.6"
+ },
+ {
+ "section": "15.1.2.2, 11.2.2",
+ "description": "If property does not implement the internal [[Construct]] method, throw a TypeError exception",
+ "test": "//CHECK#1\n\ntry {\n new parseInt();\n $ERROR('#1.1: new parseInt() throw TypeError. Actual: ' + (new parseInt()));\n} catch (e) {\n if ((e instanceof TypeError) !== true) {\n $ERROR('#1.2: new parseInt() throw TypeError. Actual: ' + (e));\n }\n}\n",
+ "id": "S15.1.2.2_A9.7"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.1.2.3.json b/website/resources/scripts/testcases2/15.1.2.3.json
new file mode 100644
index 000000000..1cf022e0e
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.1.2.3.json
@@ -0,0 +1,14 @@
+{
+ "testCollection": {
+ "name": "15.1.2.3",
+ "numTests": 1,
+ "tests": [
+ {
+ "id": "15.1.2.3-2-1",
+ "path": "TestCases/chapter15/15.1/15.1.2/15.1.2.3/15.1.2.3-2-1.js",
+ "description": "pareseFloat - 'trimmedString' is the empty string when inputString does not contain any such characters",
+ "test": "assertTrue((isNaN(parseFloat(\"\")) && parseFloat(\"\") !== parseFloat(\"\")));\n"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.1.2.3_parseFloat.json b/website/resources/scripts/testcases2/15.1.2.3_parseFloat.json
new file mode 100644
index 000000000..3d2210c4b
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.1.2.3_parseFloat.json
@@ -0,0 +1,246 @@
+{
+ "testCollection": {
+ "name": "15.1.2.3_parseFloat",
+ "numTests": 39,
+ "tests": [
+ {
+ "section": "15.1.2.3, 9.8",
+ "description": "Checking for boolean primitive",
+ "test": "//CHECK#1\nif (!(isNaN(parseFloat(true)) && isNaN(parseFloat(\"NaN\")))) {\n $ERROR('#1: parseFloat(true) === Not-a-Number; parseFloat(\"NaN\") === Not-a-Number. Actual: ' + (parseFloat(\"NaN\")));\n}\n\n//CHECK#2\nif (String(parseFloat(false)) !== \"NaN\") {\n $ERROR('#2: String(parseFloat(false)) === \"NaN\". Actual: ' + (String(parseFloat(false))));\n}\n",
+ "id": "S15.1.2.3_A1_T1"
+ },
+ {
+ "section": "15.1.2.3, 9.8",
+ "description": "Checking for number primitive",
+ "test": "//CHECK#1\nif (parseFloat(-1.1) !== parseFloat(\"-1.1\")) {\n $ERROR('#1: parseFloat(-1.1) === parseFloat(\"-1.1\"). Actual: ' + (parseFloat(-1.1)));\n}\n\n//CHECK#2\nif (parseFloat(Infinity) !== parseFloat(\"Infinity\")) {\n $ERROR('#2: parseFloat(Infinity) === parseFloat(\"Infinity\"). Actual: ' + (parseFloat(Infinity)));\n}\n\n//CHECK#3\nif (String(parseFloat(NaN)) !== \"NaN\") {\n $ERROR('#3: String(parseFloat(NaN)) === \"NaN\". Actual: ' + (String(parseFloat(NaN))));\n}\n\n//CHECK#4\nif (parseFloat(.01e+2) !== parseFloat(\".01e+2\")) {\n $ERROR('#4: parseFloat(.01e+2) === parseFloat(\".01e+2\"). Actual: ' + (parseFloat(.01e+2)));\n}\n\n//CHECK#5\nif (parseFloat(-0) !== 0) {\n $ERROR('#5: parseFloat(-0) === 0. Actual: ' + (parseFloat(-0)));\n} else {\n if (1 / parseFloat(-0) !== Number.POSITIVE_INFINITY) {\n $ERROR('#5: parseFloat(-0) === +0. Actual: ' + (parseFloat(-0)));\n }\n} \n",
+ "id": "S15.1.2.3_A1_T2"
+ },
+ {
+ "section": "15.1.2.3, 9.8",
+ "description": "Checking for undefined and null",
+ "test": "//CHECK#1\nif (!(isNaN(parseFloat(undefined)) && isNaN(parseFloat(\"NaN\")))) {\n $ERROR('#1: parseFloat(undefined) === Not-a-Number; parseFloat(\"NaN\") === Not-a-Number. Actual: ' + (parseFloat(\"NaN\")));\n}\n\n//CHECK#2\nif (!(isNaN(parseFloat(null)) && isNaN(parseFloat(\"NaN\")))) {\n $ERROR('#2: parseFloat(null) === Not-a-Number; parseFloat(\"NaN\") === Not-a-Number. Actual: ' + (parseFloat(\"NaN\")));\n}\n\n\n//CHECK#3\nif (String(parseFloat(undefined)) !== \"NaN\") {\n $ERROR('#3: String(parseFloat(undefined)) === \"NaN\". Actual: ' + (String(parseFloat(undefined))));\n}\n\n//CHECK#4\nif (String(parseFloat(null)) !== \"NaN\") {\n $ERROR('#4: String(parseFloat(null)) === \"NaN\". Actual: ' + (String(parseFloat(null))));\n}\n",
+ "id": "S15.1.2.3_A1_T3"
+ },
+ {
+ "section": "15.1.2.3, 9.8",
+ "description": "Checking for Boolean object",
+ "test": "//CHECK#1\nif (!(isNaN(parseFloat(new Boolean(true))) && isNaN(parseFloat(\"NaN\")))) {\n $ERROR('#1: parseFloat(new Boolean(true)) === Not-a-Number; parseFloat(\"NaN\") === Not-a-Number. Actual: ' + (parseFloat(\"NaN\")));\n}\n\n//CHECK#2\nif (String(parseFloat(new Boolean(false))) !== \"NaN\") {\n $ERROR('#2: String(parseFloat(new Boolean(false))) === \"NaN\". Actual: ' + (String(parseFloat(new Boolean(false)))));\n}\n",
+ "id": "S15.1.2.3_A1_T4"
+ },
+ {
+ "section": "15.1.2.3, 9.8",
+ "description": "Checking for Number object",
+ "test": "//CHECK#1\nif (parseFloat(new Number(-1.1)) !== parseFloat(\"-1.1\")) {\n $ERROR('#1: parseFloat(new Number(-1.1)) === parseFloat(\"-1.1\"). Actual: ' + (parseFloat(new Number(-1.1))));\n}\n\n//CHECK#2\nif (parseFloat(new Number(Infinity)) !== parseFloat(\"Infinity\")) {\n $ERROR('#2: parseFloat(new Number(Infinity)) === parseFloat(\"Infinity\"). Actual: ' + (parseFloat(new Number(Infinity))));\n}\n\n//CHECK#3\nif (String(parseFloat(new Number(NaN))) !== \"NaN\") {\n $ERROR('#3: String(parseFloat(new Number(NaN))) === \"NaN\". Actual: ' + (String(parseFloat(new Number(NaN)))));\n}\n\n//CHECK#4\nif (parseFloat(new Number(.01e+2)) !== parseFloat(\".01e+2\")) {\n $ERROR('#4: parseFloat(new Number(.01e+2)) === parseFloat(\".01e+2\"). Actual: ' + (parseFloat(new Number(.01e+2))));\n}\n",
+ "id": "S15.1.2.3_A1_T5"
+ },
+ {
+ "section": "15.1.2.3, 9.8",
+ "description": "Checking for String object",
+ "test": "//CHECK#1\nif (parseFloat(new String(\"-1.1\")) !== parseFloat(\"-1.1\")) {\n $ERROR('#1: parseFloat(new String(\"-1.1\")) === parseFloat(\"-1.1\"). Actual: ' + (parseFloat(new String(\"-1.1\"))));\n}\n\n//CHECK#2\nif (parseFloat(new String(\"Infinity\")) !== parseFloat(\"Infinity\")) {\n $ERROR('#2: parseFloat(new String(\"Infinity\")) === parseFloat(\"Infinity\"). Actual: ' + (parseFloat(new String(\"Infinity\"))));\n}\n\n//CHECK#3\nif (String(parseFloat(new String(\"NaN\"))) !== \"NaN\") {\n $ERROR('#3: String(parseFloat(new String(\"NaN\"))) === \"NaN\". Actual: ' + (String(parseFloat(new String(\"NaN\")))));\n}\n\n//CHECK#4\nif (parseFloat(new String(\".01e+2\")) !== parseFloat(\".01e+2\")) {\n $ERROR('#4: parseFloat(new String(\".01e+2\")) === parseFloat(\".01e+2\"). Actual: ' + (parseFloat(new String(\".01e+2\"))));\n}\n\n//CHECK#5\nif (String(parseFloat(new String(\"false\"))) !== \"NaN\") {\n $ERROR('#5: String(parseFloat(new String(\"false\"))) === \"NaN\". Actual: ' + (String(parseFloat(new String(\"false\")))));\n}\n",
+ "id": "S15.1.2.3_A1_T6"
+ },
+ {
+ "section": "15.1.2.3, 9.8, 8.6.2.6",
+ "description": "If Type(value) is Object, evaluate ToPrimitive(value, String)",
+ "test": "//CHECK#1\nvar object = {valueOf: function() {return 1}};\nif (isNaN(parseFloat(object)) !== true) {\n $ERROR('#1: var object = {valueOf: function() {return 1}}; parseFloat(object) === Not-a-Number. Actual: ' + (parseFloat(object)));\n}\n\n//CHECK#2\nvar object = {valueOf: function() {return 1}, toString: function() {return 0}};\nif (parseFloat(object) !== 0) {\n $ERROR('#2: var object = {valueOf: function() {return 1}, toString: function() {return 0}}; parseFloat(object) === 0. Actual: ' + (parseFloat(object)));\n} \n\n//CHECK#3\nvar object = {valueOf: function() {return 1}, toString: function() {return {}}};\nif (parseFloat(object) !== 1) {\n $ERROR('#3: var object = {valueOf: function() {return 1}, toString: function() {return {}}}; parseFloat(object) === 1. Actual: ' + (parseFloat(object)));\n}\n\n//CHECK#4\ntry {\n var object = {valueOf: function() {throw \"error\"}, toString: function() {return 1}};\n if (parseFloat(object) !== 1) {\n $ERROR('#4.1: var object = {valueOf: function() {throw \"error\"}, toString: function() {return 1}}; parseFloat(object) === 1. Actual: ' + (parseFloat(object)));\n }\n}\ncatch (e) {\n if (e === \"error\") {\n $ERROR('#4.2: var object = {valueOf: function() {throw \"error\"}, toString: function() {return 1}}; parseFloat(object) not throw \"error\"');\n } else {\n $ERROR('#4.3: var object = {valueOf: function() {throw \"error\"}, toString: function() {return 1}}; parseFloat(object) not throw Error. Actual: ' + (e));\n }\n}\n\n//CHECK#5\nvar object = {toString: function() {return 1}};\nif (parseFloat(object) !== 1) {\n $ERROR('#5: var object = {toString: function() {return 1}}; parseFloat(object) === 1. Actual: ' + (parseFloat(object)));\n}\n\n//CHECK#6\nvar object = {valueOf: function() {return {}}, toString: function() {return 1}}\nif (parseFloat(object) !== 1) {\n $ERROR('#6: var object = {valueOf: function() {return {}}, toString: function() {return 1}}; parseFloat(object) === 1. Actual: ' + (parseFloat(object)));\n}\n\n//CHECK#7\ntry {\n var object = {valueOf: function() {return 1}, toString: function() {throw \"error\"}};\n parseFloat(object);\n $ERROR('#7.1: var object = {valueOf: function() {return 1}, toString: function() {throw \"error\"}}; parseFloat(object) throw \"error\". Actual: ' + (parseFloat(object)));\n} \ncatch (e) {\n if (e !== \"error\") {\n $ERROR('#7.2: var object = {valueOf: function() {return 1}, toString: function() {throw \"error\"}}; parseFloat(object) throw \"error\". Actual: ' + (e));\n } \n}\n\n//CHECK#8\ntry {\n var object = {valueOf: function() {return {}}, toString: function() {return {}}};\n parseFloat(object);\n $ERROR('#8.1: var object = {valueOf: function() {return {}}, toString: function() {return {}}}; parseFloat(object) throw TypeError. Actual: ' + (parseFloat(object)));\n} \ncatch (e) {\n if ((e instanceof TypeError) !== true) {\n $ERROR('#8.2: var object = {valueOf: function() {return {}}, toString: function() {return {}}}; parseFloat(object) throw TypeError. Actual: ' + (e));\n } \n}\n",
+ "id": "S15.1.2.3_A1_T7"
+ },
+ {
+ "section": "15.1.2.3",
+ "description": "StrWhiteSpaceChar :: TAB (U+0009)",
+ "test": "//CHECK#1\nif (parseFloat(\"\\u00091.1\") !== parseFloat(\"1.1\")) {\n $ERROR('#1: parseFloat(\"\\\\u00091.1\") === parseFloat(\"1.1\"). Actual: ' + (parseFloat(\"\\u00091.1\")));\n}\n\n//CHECK#2\nif (parseFloat(\"\\u0009\\u0009-1.1\") !== parseFloat(\"-1.1\")) {\n $ERROR('#2: parseFloat(\"\\\\u0009\\\\u0009-1.1\") === parseFloat(\"-1.1\"). Actual: ' + (parseFloat(\"\\u0009\\u0009-1.1\")));\n}\n\n//CHECK#3\nif (parseFloat(\"\t1.1\") !== parseFloat(\"1.1\")) {\n $ERROR('#3: parseFloat(\"\t1.1\") === parseFloat(\"1.1\"). Actual: ' + (parseFloat(\"\t1.1\")));\n}\n\n//CHECK#4\nif (parseFloat(\"\t\t\t1.1\") !== parseFloat(\"1.1\")) {\n $ERROR('#4: parseFloat(\"\t\t\t1.1\") === parseFloat(\"1.1\"). Actual: ' + (parseFloat(\"\t\t\t1.1\")));\n}\n\n//CHECK#5\nif (parseFloat(\"\t\t\t\\u0009\t\t\t\\u0009-1.1\") !== parseFloat(\"-1.1\")) {\n $ERROR('#5: parseFloat(\"\t\t\t\\\\u0009\t\t\t\\\\u0009-1.1\") === parseFloat(\"-1.1\"). Actual: ' + (parseFloat(\"\t\t\t\\u0009\t\t\t\\u0009-1.1\")));\n}\n\n//CHECK#6\nif (isNaN(parseFloat(\"\\u0009\")) !== true) {\n $ERROR('#6: parseFloat(\"\\\\u0009\") === Not-a-Number. Actual: ' + (parseFloat(\"\\u0009\")));\n}\n",
+ "id": "S15.1.2.3_A2_T1"
+ },
+ {
+ "section": "15.1.2.3",
+ "description": "StrWhiteSpaceChar :: USP",
+ "test": "//CHECK#\nvar count = 0;\nvar errorCount = 0;\nvar uspU = [\"\\u1680\", \"\\u180E\", \"\\u2000\", \"\\u2001\", \"\\u2002\", \"\\u2003\", \"\\u2004\", \"\\u2005\", \"\\u2006\", \"\\u2007\", \"\\u2008\", \"\\u2009\", \"\\u200A\", \"\\u202F\", \"\\u205F\", \"\\u3000\"];\nvar uspS = [\"1680\", \"180E\", \"2000\", \"2001\", \"2002\", \"2003\", \"2004\", \"2005\", \"2006\", \"2007\", \"2008\", \"2009\", \"200A\", \"202F\", \"205F\", \"3000\"];\nfor (var index = 0; index < uspU.length; index++) {\n var result = true; \n if (parseFloat(uspU[index] + \"1.1\") !== parseFloat(\"1.1\")) {\n $ERROR('#1.' + uspS[index] + ' ');\n result = false;\n }\n if (parseFloat(uspU[index] + uspU[index] + uspU[index] + \"1.1\") !== parseFloat(\"1.1\")) {\n $ERROR('#2.' + uspS[index] + ' ');\n result = false;\n }\n if (isNaN(parseFloat(uspU[index])) !== true) {\n $ERROR('#3.' + uspS[index] + ' ');\n result = false;\n }\n if (result !== true) {\n errorCount++;\n }\n count++;\n}\n\nif (errorCount > 0) { \n $ERROR('Total error: ' + errorCount + ' bad Unicode character in ' + count);\n}\n",
+ "id": "S15.1.2.3_A2_T10"
+ },
+ {
+ "section": "15.1.2.3",
+ "description": "StrWhiteSpaceChar :: SP (U+0020)",
+ "test": "//CHECK#1\nif (parseFloat(\"\\u00201.1\") !== parseFloat(\"1.1\")) {\n $ERROR('#1: parseFloat(\"\\\\u00201.1\") === parseFloat(\"1.1\"). Actual: ' + (parseFloat(\"\\u00201.1\")));\n}\n\n//CHECK#2\nif (parseFloat(\"\\u0020\\u0020-1.1\") !== parseFloat(\"-1.1\")) {\n $ERROR('#2: parseFloat(\"\\\\u0020\\\\u0020-1.1\") === parseFloat(\"-1.1\"). Actual: ' + (parseFloat(\"\\u0020\\u0020-1.1\")));\n}\n\n//CHECK#3\nif (parseFloat(\" 1.1\") !== parseFloat(\"1.1\")) {\n $ERROR('#3: parseFloat(\" 1.1\") === parseFloat(\"1.1\"). Actual: ' + (parseFloat(\" 1.1\")));\n}\n\n//CHECK#4\nif (parseFloat(\" 1.1\") !== parseFloat(\"1.1\")) {\n $ERROR('#4: parseFloat(\" 1.1\") === parseFloat(\"1.1\"). Actual: ' + (parseFloat(\" 1.1\")));\n}\n\n//CHECK#5\nif (parseFloat(\" \\u0020 \\u0020-1.1\") !== parseFloat(\"-1.1\")) {\n $ERROR('#5: parseFloat(\" \\\\u0020 \\\\u0020-1.1\") === parseFloat(\"-1.1\"). Actual: ' + (parseFloat(\" \\u0020 \\u0020-1.1\")));\n}\n\n//CHECK#6\nif (isNaN(parseFloat(\"\\u0020\")) !== true) {\n $ERROR('#6: parseFloat(\"\\\\u0020\") === Not-a-Number. Actual: ' + (parseFloat(\"\\u0020\")));\n}\n",
+ "id": "S15.1.2.3_A2_T2"
+ },
+ {
+ "section": "15.1.2.3",
+ "description": "StrWhiteSpaceChar :: NBSB (U+00A0)",
+ "test": "//CHECK#1\nif (parseFloat(\"\\u00A01.1\") !== parseFloat(\"1.1\")) {\n $ERROR('#1: parseFloat(\"\\\\u00A01.1\") === parseFloat(\"1.1\"). Actual: ' + (parseFloat(\"\\u00A01.1\")));\n}\n\n//CHECK#2\nif (parseFloat(\"\\u00A0\\u00A0-1.1\") !== parseFloat(\"-1.1\")) {\n $ERROR('#2: parseFloat(\"\\\\u00A0\\\\u00A0-1.1\") === parseFloat(\"-1.1\"). Actual: ' + (parseFloat(\"\\u00A0\\u00A0-1.1\")));\n}\n\n//CHECK#3\nif (isNaN(parseFloat(\"\\u00A0\")) !== true) {\n $ERROR('#3: parseFloat(\"\\\\u00A0\") === Not-a-Number. Actual: ' + (parseFloat(\"\\u00A0\")));\n}\n",
+ "id": "S15.1.2.3_A2_T3"
+ },
+ {
+ "section": "15.1.2.3",
+ "description": "StrWhiteSpaceChar :: FF (U+000C)",
+ "test": "//CHECK#1\nif (parseFloat(\"\\u000C1.1\") !== parseFloat(\"1.1\")) {\n $ERROR('#1: parseFloat(\"\\\\u000C1.1\") === parseFloat(\"1.1\"). Actual: ' + (parseFloat(\"\\u000C1.1\")));\n}\n\n//CHECK#2\nif (parseFloat(\"\\u000C\\u000C-1.1\") !== parseFloat(\"-1.1\")) {\n $ERROR('#2: parseFloat(\"\\\\u000C\\\\u000C-1.1\") === parseFloat(\"-1.1\"). Actual: ' + (parseFloat(\"\\u000C\\u000C-1.1\")));\n}\n\n//CHECK#3\nif (isNaN(parseFloat(\"\\u000C\")) !== true) {\n $ERROR('#3: parseFloat(\"\\\\u000C\") === Not-a-Number. Actual: ' + (parseFloat(\"\\u000C\")));\n}\n",
+ "id": "S15.1.2.3_A2_T4"
+ },
+ {
+ "section": "15.1.2.3",
+ "description": "StrWhiteSpaceChar :: VT (U+000B)",
+ "test": "//CHECK#1\nif (parseFloat(\"\\u000B1.1\") !== parseFloat(\"1.1\")) {\n $ERROR('#1: parseFloat(\"\\\\u000B1.1\") === parseFloat(\"1.1\"). Actual: ' + (parseFloat(\"\\u000B1.1\")));\n}\n\n//CHECK#2\nif (parseFloat(\"\\u000B\\u000B-1.1\") !== parseFloat(\"-1.1\")) {\n $ERROR('#2: parseFloat(\"\\\\u000B\\\\u000B-1.1\") === parseFloat(\"-1.1\"). Actual: ' + (parseFloat(\"\\u000B\\u000B-1.1\")));\n}\n\n//CHECK#3\nif (isNaN(parseFloat(\"\\u000B\")) !== true) {\n $ERROR('#3: parseFloat(\"\\\\u000B\") === Not-a-Number. Actual: ' + (parseFloat(\"\\u000B\")));\n}\n",
+ "id": "S15.1.2.3_A2_T5"
+ },
+ {
+ "section": "15.1.2.3",
+ "description": "StrWhiteSpaceChar :: CR (U+000D)",
+ "test": "//CHECK#1\nif (parseFloat(\"\\u000D1.1\") !== parseFloat(\"1.1\")) {\n $ERROR('#1: parseFloat(\"\\\\u000D1.1\") === parseFloat(\"1.1\"). Actual: ' + (parseFloat(\"\\u000D1.1\")));\n}\n\n//CHECK#2\nif (parseFloat(\"\\u000D\\u000D-1.1\") !== parseFloat(\"-1.1\")) {\n $ERROR('#2: parseFloat(\"\\\\u000D\\\\u000D-1.1\") === parseFloat(\"-1.1\"). Actual: ' + (parseFloat(\"\\u000D\\u000D-1.1\")));\n}\n\n//CHECK#3\nif (isNaN(parseFloat(\"\\u000D\")) !== true) {\n $ERROR('#3: parseFloat(\"\\\\u000D\") === Not-a-Number. Actual: ' + (parseFloat(\"\\u000D\")));\n}\n",
+ "id": "S15.1.2.3_A2_T6"
+ },
+ {
+ "section": "15.1.2.3",
+ "description": "StrWhiteSpaceChar :: LF (U+000A)",
+ "test": "//CHECK#1\nif (parseFloat(\"\\u000A1.1\") !== parseFloat(\"1.1\")) {\n $ERROR('#1: parseFloat(\"\\\\u000A1.1\") === parseFloat(\"1.1\"). Actual: ' + (parseFloat(\"\\u000A1.1\")));\n}\n\n//CHECK#2\nif (parseFloat(\"\\u000A\\u000A-1.1\") !== parseFloat(\"-1.1\")) {\n $ERROR('#2: parseFloat(\"\\\\u000A\\\\u000A-1.1\") === parseFloat(\"-1.1\"). Actual: ' + (parseFloat(\"\\u000A\\u000A-1.1\")));\n}\n\n//CHECK#3\nif (isNaN(parseFloat(\"\\u000A\")) !== true) {\n $ERROR('#3: parseFloat(\"\\\\u000A\") === Not-a-Number. Actual: ' + (parseFloat(\"\\u000A\")));\n}\n",
+ "id": "S15.1.2.3_A2_T7"
+ },
+ {
+ "section": "15.1.2.3",
+ "description": "StrWhiteSpaceChar :: LS (U+2028)",
+ "test": "//CHECK#1\nif (parseFloat(\"\\u20281.1\") !== parseFloat(\"1.1\")) {\n $ERROR('#1: parseFloat(\"\\\\u20281.1\") === parseFloat(\"1.1\"). Actual: ' + (parseFloat(\"\\u20281.1\")));\n}\n\n//CHECK#2\nif (parseFloat(\"\\u2028\\u2028-1.1\") !== parseFloat(\"-1.1\")) {\n $ERROR('#2: parseFloat(\"\\\\u2028\\\\u2028-1.1\") === parseFloat(\"-1.1\"). Actual: ' + (parseFloat(\"\\u2028\\u2028-1.1\")));\n}\n\n//CHECK#3\nif (isNaN(parseFloat(\"\\u2028\")) !== true) {\n $ERROR('#3: parseFloat(\"\\\\u2028\") === Not-a-Number. Actual: ' + (parseFloat(\"\\u2028\")));\n}\n",
+ "id": "S15.1.2.3_A2_T8"
+ },
+ {
+ "section": "15.1.2.3",
+ "description": "StrWhiteSpaceChar :: PS (U+2029)",
+ "test": "//CHECK#1\nif (parseFloat(\"\\u20291.1\") !== parseFloat(\"1.1\")) {\n $ERROR('#1: parseFloat(\"\\\\u20291.1\") === parseFloat(\"1.1\"). Actual: ' + (parseFloat(\"\\u20291.1\")));\n}\n\n//CHECK#2\nif (parseFloat(\"\\u2029\\u2029-1.1\") !== parseFloat(\"-1.1\")) {\n $ERROR('#2: parseFloat(\"\\\\u2029\\\\u2029-1.1\") === parseFloat(\"-1.1\"). Actual: ' + (parseFloat(\"\\u2029\\u2029-1.1\")));\n}\n\n//CHECK#3\nif (isNaN(parseFloat(\"\\u2029\")) !== true) {\n $ERROR('#3: parseFloat(\"\\\\u2029\") === Not-a-Number. Actual: ' + (parseFloat(\"\\u2029\")));\n}\n",
+ "id": "S15.1.2.3_A2_T9"
+ },
+ {
+ "section": "15.1.2.3, 9.3.1",
+ "description": "parseFloat(\"some string\") return NaN",
+ "test": "//CHECK#1\nif (isNaN(parseFloat(\"str\")) !== true) {\n $ERROR('#1: parseFloat(\"str\") === Not-a-Number. Actual: ' + (parseFloat(\"str\")));\n}\n\n//CHECK#2\nif (isNaN(parseFloat(\"s1\")) !== true) {\n $ERROR('#2: parseFloat(\"s1\") === Not-a-Number. Actual: ' + (parseFloat(\"s1\")));\n}\n\n//CHECK#3\nif (isNaN(parseFloat(\"\")) !== true) {\n $ERROR('#3: parseFloat(\"\") === Not-a-Number. Actual: ' + (parseFloat(\"\")));\n}\n\n//CHECK#4\nif (String(parseFloat(\"str\")) !== \"NaN\") {\n $ERROR('#4: String(parseFloat(\"str\")) === \"NaN\". Actual: ' + (String(parseFloat(\"str\"))));\n}\n\n//CHECK#5\nif (String(parseFloat(\"s1\")) !== \"NaN\") {\n $ERROR('#5: String(parseFloat(\"s1\")) === \"NaN\". Actual: ' + (String(parseFloat(\"s1\"))));\n}\n\n//CHECK#6\nif (String(parseFloat(\"\")) !== \"NaN\") {\n $ERROR('#6: String(parseFloat(\"\")) === \"NaN\". Actual: ' + (String(parseFloat(\"\"))));\n}\n\n//CHECK#7\nif (String(parseFloat(\"+\")) !== \"NaN\") {\n $ERROR('#7: String(parseFloat(\"+\")) === \"NaN\". Actual: ' + (String(parseFloat(\"+\"))));\n}\n",
+ "id": "S15.1.2.3_A3_T1"
+ },
+ {
+ "section": "15.1.2.3, 9.3.1",
+ "description": "parseFloat(\"wrong number format with ExponentIndicator\") return NaN",
+ "test": "//CHECK#1\nif (isNaN(parseFloat(\"e1\")) !== true) {\n $ERROR('#1: parseFloat(\"e1\") === Not-a-Number. Actual: ' + (parseFloat(\"e1\")));\n}\n\n//CHECK#2\nif (isNaN(parseFloat(\"e-1\")) !== true) {\n $ERROR('#2: parseFloat(\"e-1\") === Not-a-Number. Actual: ' + (parseFloat(\"e-1\")));\n}\n\n//CHECK#3\nif (isNaN(parseFloat(\"E+1\")) !== true) {\n $ERROR('#3: parseFloat(\"E+1\") === Not-a-Number. Actual: ' + (parseFloat(\"E+1\")));\n}\n\n//CHECK#4\nif (isNaN(parseFloat(\"E0\")) !== true) {\n $ERROR('#4: parseFloat(\"E0\") === Not-a-Number. Actual: ' + (parseFloat(\"E0\")));\n}\n\n//CHECK#5\nif (String(parseFloat(\"e1\")) !== \"NaN\") {\n $ERROR('#5: String(parseFloat(\"e1\")) === \"NaN\". Actual: ' + (String(parseFloat(\"e1\"))));\n}\n\n//CHECK#6\nif (String(parseFloat(\"e-1\")) !== \"NaN\") {\n $ERROR('#6: String(parseFloat(\"e-1\")) === \"NaN\". Actual: ' + (String(parseFloat(\"e-1\"))));\n}\n\n//CHECK#7\nif (String(parseFloat(\"E+1\")) !== \"NaN\") {\n $ERROR('#73: String(parseFloat(\"E+1\")) === \"NaN\". Actual: ' + (String(parseFloat(\"E+1\"))));\n}\n\n//CHECK#8\nif (String(parseFloat(\"E0\")) !== \"NaN\") {\n $ERROR('#8: String(parseFloat(\"E0\")) === \"NaN\". Actual: ' + (String(parseFloat(\"E0\"))));\n}\n\n//CHECK#9\nif (isNaN(parseFloat(\"-.e-1\")) !== true) {\n $ERROR('#9: parseFloat(\"-.e-1\") === Not-a-Number. Actual: ' + (parseFloat(\"-.e-1\")));\n}\n\n//CHECK#10\nif (isNaN(parseFloat(\".e1\")) !== true) {\n $ERROR('#10: parseFloat(\".e1\") === Not-a-Number. Actual: ' + (parseFloat(\".e1\")));\n}\n",
+ "id": "S15.1.2.3_A3_T2"
+ },
+ {
+ "section": "15.1.2.3, 9.3.1",
+ "description": "parseFloat(\"wrong numbr format\") return NaN",
+ "test": "//CHECK#1\nif (isNaN(parseFloat(\".x\")) !== true) {\n $ERROR('#1: parseFloat(\".x\") === Not-a-Number. Actual: ' + (parseFloat(\".x\")));\n}\n\n//CHECK#2\nif (isNaN(parseFloat(\"+x\")) !== true) {\n $ERROR('#2: parseFloat(\"+x\") === Not-a-Number. Actual: ' + (parseFloat(\"+x\")));\n}\n\n//CHECK#3\nif (isNaN(parseFloat(\"infinity\")) !== true) {\n $ERROR('#3: parseFloat(\"infinity\") === Not-a-Number. Actual: ' + (parseFloat(\"infinity\")));\n}\n\n//CHECK#4\nif (isNaN(parseFloat(\"A\")) !== true) {\n $ERROR('#4: parseFloat(\"A\") === Not-a-Number. Actual: ' + (parseFloat(\"A\")));\n}\n\n//CHECK#5\nif (String(parseFloat(\".s\")) !== \"NaN\") {\n $ERROR('#5: String(parseFloat(\".s\")) === \"NaN\". Actual: ' + (String(parseFloat(\".s\"))));\n}\n\n//CHECK#6\nif (String(parseFloat(\"+x\")) !== \"NaN\") {\n $ERROR('#6: String(parseFloat(\"+x\")) === \"NaN\". Actual: ' + (String(parseFloat(\"+x\"))));\n}\n\n//CHECK#7\nif (String(parseFloat(\"infinity\")) !== \"NaN\") {\n $ERROR('#73: String(parseFloat(\"infinity\")) === \"NaN\". Actual: ' + (String(parseFloat(\"infinity\"))));\n}\n\n//CHECK#8\nif (String(parseFloat(\"A\")) !== \"NaN\") {\n $ERROR('#8: String(parseFloat(\"A\")) === \"NaN\". Actual: ' + (String(parseFloat(\"A\"))));\n}\n",
+ "id": "S15.1.2.3_A3_T3"
+ },
+ {
+ "section": "15.1.2.3, 9.3.1",
+ "description": "Some wrong number",
+ "test": "//CHECK#1\nif (parseFloat(\"0x\") !== 0) {\n $ERROR('#1: parseFloat(\"0x\") === 0. Actual: ' + (parseFloat(\"0x\")));\n}\n\n//CHECK#2\nif (parseFloat(\"11x\") !== 11) {\n $ERROR('#2: parseFloat(\"11x\") === 11. Actual: ' + (parseFloat(\"11x\")));\n}\n\n//CHECK#3\nif (parseFloat(\"11s1\") !== 11) {\n $ERROR('#3: parseFloat(\"11s1\") === 11. Actual: ' + (parseFloat(\"11s1\")));\n}\n\n//CHECK#4\nif (parseFloat(\"11.s1\") !== 11) {\n $ERROR('#4: parseFloat(\"11.s1\") === 11. Actual: ' + (parseFloat(\"11.s1\")));\n}\n\n//CHECK#5\nif (parseFloat(\".0s1\") !== 0) {\n $ERROR('#5: parseFloat(\".0s1\") === 0. Actual: ' + (parseFloat(\".0s1\")));\n}\n\n//CHECK#6\nif (parseFloat(\"1.s1\") !== 1) {\n $ERROR('#6: parseFloat(\"1.s1\") === 1. Actual: ' + (parseFloat(\"1.s1\")));\n}\n\n//CHECK#7\nif (parseFloat(\"1..1\") !== 1) {\n $ERROR('#7: parseFloat(\"1..1\") === 1. Actual: ' + (parseFloat(\"1..1\")));\n}\n\n//CHECK#8\nif (parseFloat(\"0.1.1\") !== 0.1) {\n $ERROR('#8: parseFloat(\"0.1.1\") === 0.1. Actual: ' + (parseFloat(\"0.1.1\")));\n}\n\n//CHECK#9\nif (parseFloat(\"0. 1\") !== 0) {\n $ERROR('#9: parseFloat(\"0. 1\") === 0. Actual: ' + (parseFloat(\"0. 1\")));\n}\n",
+ "id": "S15.1.2.3_A4_T1"
+ },
+ {
+ "section": "15.1.2.3, 9.3.1",
+ "description": "With ExponentIndicator",
+ "test": "//CHECK#1\nif (parseFloat(\"1ex\") !== 1) {\n $ERROR('#1: parseFloat(\"1ex\") === 1. Actual: ' + (parseFloat(\"1ex\")));\n}\n\n//CHECK#2\nif (parseFloat(\"1e-x\") !== 1) {\n $ERROR('#2: parseFloat(\"1e-x\") === 1. Actual: ' + (parseFloat(\"1e-x\")));\n}\n\n//CHECK#3\nif (parseFloat(\"1e1x\") !== 10) {\n $ERROR('#3: parseFloat(\"1e1x\") === 10. Actual: ' + (parseFloat(\"1e1x\")));\n}\n\n//CHECK#4\nif (parseFloat(\"1e-1x\") !== 0.1) {\n $ERROR('#4: parseFloat(\"1e-1x\") === 0.1. Actual: ' + (parseFloat(\"1e-1x\")));\n}\n\n//CHECK#5\nif (parseFloat(\"0.1e-1x\") !== 0.01) {\n $ERROR('#5: parseFloat(\"0.1e-1x\") === 0.01. Actual: ' + (parseFloat(\"0.1e-1x\")));\n}\n",
+ "id": "S15.1.2.3_A4_T2"
+ },
+ {
+ "section": "15.1.2.3, 9.3.1",
+ "description": "StrDecimalLiteral not contain HexIntegerLiteral",
+ "test": "//CHECK#0\nif (parseFloat(\"0x0\") !== 0) {\n $ERROR('#0: parseFloat(\"0x0\") === 0. Actual: ' + (parseFloat(\"0x0\")));\n}\n\n//CHECK#1\nif (parseFloat(\"0x1\") !== 0) {\n $ERROR('#1: parseFloat(\"0x1\") === 0. Actual: ' + (parseFloat(\"0x1\")));\n}\n\n//CHECK#2\nif (parseFloat(\"0x2\") !== 0) {\n $ERROR('#2: parseFloat(\"0x2\") === 0. Actual: ' + (parseFloat(\"0x2\")));\n}\n\n//CHECK#3\nif (parseFloat(\"0x3\") !== 0) {\n $ERROR('#3: parseFloat(\"0x3\") === 0. Actual: ' + (parseFloat(\"0x3\")));\n}\n\n//CHECK#4\nif (parseFloat(\"0x4\") !== 0) {\n $ERROR('#4: parseFloat(\"0x4\") === 0. Actual: ' + (parseFloat(\"0x4\")));\n}\n\n//CHECK#5\nif (parseFloat(\"0x5\") !== 0) {\n $ERROR('#5: parseFloat(\"0x5\") === 0. Actual: ' + (parseFloat(\"0x5\")));\n}\n\n//CHECK#6\nif (parseFloat(\"0x6\") !== 0) {\n $ERROR('#6: parseFloat(\"0x6\") === 0. Actual: ' + (parseFloat(\"0x6\")));\n}\n\n//CHECK#7\nif (parseFloat(\"0x7\") !== 0) {\n $ERROR('#7: parseFloat(\"0x7\") === 0. Actual: ' + (parseFloat(\"0x7\")));\n}\n\n//CHECK#8\nif (parseFloat(\"0x8\") !== 0) {\n $ERROR('#8: parseFloat(\"0x8\") === 0. Actual: ' + (parseFloat(\"0x8\")));\n}\n\n//CHECK#9\nif (parseFloat(\"0x9\") !== 0) {\n $ERROR('#9: parseFloat(\"0x9\") === 0. Actual: ' + (parseFloat(\"0x9\")));\n}\n\n//CHECK#A\nif (parseFloat(\"0xA\") !== 0) {\n $ERROR('#A: parseFloat(\"0xA\") === 0. Actual: ' + (parseFloat(\"0xA\")));\n}\n\n//CHECK#B\nif (parseFloat(\"0xB\") !== 0) {\n $ERROR('#B: parseFloat(\"0xB\") === 0. Actual: ' + (parseFloat(\"0xB\")));\n}\n\n//CHECK#C\nif (parseFloat(\"0xC\") !== 0) {\n $ERROR('#C: parseFloat(\"0xC\") === 0. Actual: ' + (parseFloat(\"0xC\")));\n}\n\n//CHECK#D\nif (parseFloat(\"0xD\") !== 0) {\n $ERROR('#D: parseFloat(\"0xD\") === 0. Actual: ' + (parseFloat(\"0xD\")));\n}\n\n//CHECK#E\nif (parseFloat(\"0xE\") !== 0) {\n $ERROR('#E: parseFloat(\"0xE\") === 0. Actual: ' + (parseFloat(\"0xE\")));\n}\n\n//CHECK#F\nif (parseFloat(\"0xF\") !== 0) {\n $ERROR('#F: parseFloat(\"0xF\") === 0. Actual: ' + (parseFloat(\"0xF\")));\n}\n",
+ "id": "S15.1.2.3_A4_T3"
+ },
+ {
+ "section": "15.1.2.3, 9.3.1",
+ "description": "\"Infinity\"+\"some string\"",
+ "test": "//CHECK#1\nif (parseFloat(\"Infinity1\") !== Number.POSITIVE_INFINITY) {\n $ERROR('#1: parseFloat(\"Infinity1\") === Number.POSITIVE_INFINITY. Actual: ' + (parseFloat(\"Infinity1\")));\n}\n\n//CHECK#2\nif (parseFloat(\"Infinityx\") !== Number.POSITIVE_INFINITY) {\n $ERROR('#2: parseFloat(\"Infinityx\") === Number.POSITIVE_INFINITY. Actual: ' + (parseFloat(\"Infinityx\")));\n}\n\n//CHECK#3\nif (parseFloat(\"Infinity+1\") !== Number.POSITIVE_INFINITY) {\n $ERROR('#3: parseFloat(\"Infinity+1\") === Number.POSITIVE_INFINITY. Actual: ' + (parseFloat(\"Infinity+1\")));\n}\n",
+ "id": "S15.1.2.3_A4_T4"
+ },
+ {
+ "section": "15.1.2.3, 9.3.1",
+ "description": "Checking DecimalDigits . DecimalDigits_opt ExponentPart_opt",
+ "test": "//CHECK#1\nif (parseFloat(\"-11.string\") !== -11) {\n $ERROR('#1: parseFloat(\"-11.string\") === -11. Actual: ' + (parseFloat(\"-11.string\")));\n}\n\n//CHECK#2\nif (parseFloat(\"01.string\") !== 1) {\n $ERROR('#2: parseFloat(\"01.string\") === 1. Actual: ' + (parseFloat(\"01.string\")));\n}\n\n//CHECK#3\nif (parseFloat(\"+11.1string\") !== 11.1) {\n $ERROR('#3: parseFloat(\"+11.1string\") === 11.1. Actual: ' + (parseFloat(\"+11.1string\")));\n}\n\n//CHECK#4\nif (parseFloat(\"01.1string\") !== 1.1) {\n $ERROR('#4: parseFloat(\"01.1string\") === 1.1. Actual: ' + (parseFloat(\"01.1string\")));\n}\n\n//CHECK#5\nif (parseFloat(\"-11.e-1string\") !== -1.1) {\n $ERROR('#5: parseFloat(\"-11.e-1string\") === -1.1. Actual: ' + (parseFloat(\"-11.e-1string\")));\n}\n\n//CHECK#6\nif (parseFloat(\"01.e1string\") !== 10) {\n $ERROR('#6: parseFloat(\"01.e1string\") === 10. Actual: ' + (parseFloat(\"01.e1string\")));\n}\n\n//CHECK#7\nif (parseFloat(\"+11.22e-1string\") !== 1.122) {\n $ERROR('#7: parseFloat(\"+11.22e-1string\") === 1.122. Actual: ' + (parseFloat(\"+11.22e-1string\")));\n}\n\n//CHECK#8\nif (parseFloat(\"01.01e1string\") !== 10.1) {\n $ERROR('#8: parseFloat(\"01.01e1string\") === 10.1. Actual: ' + (parseFloat(\"01.01e1string\")));\n}\n\n//CHECK#9\nif (parseFloat(\"001.string\") !== 1) {\n $ERROR('#9: parseFloat(\"001.string\") === 1. Actual: ' + (parseFloat(\"001.string\")));\n}\n\n//CHECK#10\nif (parseFloat(\"010.string\") !== 10) {\n $ERROR('#10: parseFloat(\"010.string\") === 10. Actual: ' + (parseFloat(\"010.string\")));\n}\n",
+ "id": "S15.1.2.3_A4_T5"
+ },
+ {
+ "section": "15.1.2.3, 9.3.1",
+ "description": "Checking . DecimalDigits ExponentPart_opt",
+ "test": "//CHECK#1\nif (parseFloat(\"+.1string\") !== 0.1) {\n $ERROR('#1: parseFloat(\"+.1string\") === 0.1. Actual: ' + (parseFloat(\"+.1string\")));\n}\n\n//CHECK#2\nif (parseFloat(\".01string\") !== 0.01) {\n $ERROR('#2: parseFloat(\".01string\") === 0.01. Actual: ' + (parseFloat(\".01string\")));\n}\n\n//CHECK#3\nif (parseFloat(\"+.22e-1string\") !== 0.022) {\n $ERROR('#3: parseFloat(\"+.22e-1string\") === 0.022. Actual: ' + (parseFloat(\"+.22e-1string\")));\n}\n",
+ "id": "S15.1.2.3_A4_T6"
+ },
+ {
+ "section": "15.1.2.3, 9.3.1",
+ "description": "Checking DecimalDigits ExponentPart_opt",
+ "test": "//CHECK#1\nif (parseFloat(\"-11string\") !== -11) {\n $ERROR('#1: parseFloat(\"-11string\") === -11. Actual: ' + (parseFloat(\"-11string\")));\n}\n\n//CHECK#2\nif (parseFloat(\"01string\") !== 1) {\n $ERROR('#2: parseFloat(\"01string\") === 1. Actual: ' + (parseFloat(\"01string\")));\n}\n\n//CHECK#3\nif (parseFloat(\"-11e-1string\") !== -1.1) {\n $ERROR('#3: parseFloat(\"-11e-1string\") === -1.1. Actual: ' + (parseFloat(\"-11e-1string\")));\n}\n\n//CHECK#4\nif (parseFloat(\"01e1string\") !== 10) {\n $ERROR('#4: parseFloat(\"01e1string\") === 10. Actual: ' + (parseFloat(\"01e1string\")));\n}\n\n//CHECK#5\nif (parseFloat(\"001string\") !== 1) {\n $ERROR('#5: parseFloat(\"001string\") === 1. Actual: ' + (parseFloat(\"001string\")));\n}\n\n//CHECK#6\nif (parseFloat(\"1e001string\") !== 10) {\n $ERROR('#6: parseFloat(\"1e001string\") === 10. Actual: ' + (parseFloat(\"1e001string\")));\n}\n\n//CHECK#7\nif (parseFloat(\"010string\") !== 10) {\n $ERROR('#7: parseFloat(\"010string\") === 10. Actual: ' + (parseFloat(\"010string\")));\n}\n",
+ "id": "S15.1.2.3_A4_T7"
+ },
+ {
+ "section": "15.1.2.3, 9.3.1",
+ "description": "Checking Infinity",
+ "test": "//CHECK#1\nif (parseFloat(\"Infinity\") !== Number.POSITIVE_INFINITY) {\n $ERROR('#1: parseFloat(\"Infinity\") === Number.POSITIVE_INFINITY. Actual: ' + (parseFloat(\"Infinity\")));\n}\n\n//CHECK#2\nif (parseFloat(\"+Infinity\") !== Number.POSITIVE_INFINITY) {\n $ERROR('#2: parseFloat(\"+Infinity\") === Number.POSITIVE_INFINITY. Actual: ' + (parseFloat(\"+Infinity\")));\n}\n\n//CHECK#3\nif (parseFloat(\"-Infinity\") !== Number.NEGATIVE_INFINITY) {\n $ERROR('#3: parseFloat(\"-Infinity\") === Number.NEGATIVE_INFINITY. Actual: ' + (parseFloat(\"-Infinity\")));\n}\n",
+ "id": "S15.1.2.3_A5_T1"
+ },
+ {
+ "section": "15.1.2.3, 9.3.1",
+ "description": "Checking DecimalDigits . DecimalDigits_opt ExponentPart_opt",
+ "test": "//CHECK#1\nif (parseFloat(\"-11.\") !== -11) {\n $ERROR('#1: parseFloat(\"-11.\") === -11. Actual: ' + (parseFloat(\"-11.\")));\n}\n\n//CHECK#2\nif (parseFloat(\"01.\") !== 1) {\n $ERROR('#2: parseFloat(\"01.\") === 1. Actual: ' + (parseFloat(\"01.\")));\n}\n\n//CHECK#3\nif (parseFloat(\"+11.1\") !== 11.1) {\n $ERROR('#3: parseFloat(\"+11.1\") === 11.1. Actual: ' + (parseFloat(\"+11.1\")));\n}\n\n//CHECK#4\nif (parseFloat(\"01.1\") !== 1.1) {\n $ERROR('#4: parseFloat(\"01.1\") === 1.1. Actual: ' + (parseFloat(\"01.1\")));\n}\n\n//CHECK#5\nif (parseFloat(\"-11.e-1\") !== -1.1) {\n $ERROR('#5: parseFloat(\"-11.e-1\") === -1.1. Actual: ' + (parseFloat(\"-11.e-1\")));\n}\n\n//CHECK#6\nif (parseFloat(\"01.e1\") !== 10) {\n $ERROR('#6: parseFloat(\"01.e1\") === 10. Actual: ' + (parseFloat(\"01.e1\")));\n}\n\n//CHECK#7\nif (parseFloat(\"+11.22e-1\") !== 1.122) {\n $ERROR('#7: parseFloat(\"+11.22e-1\") === 1.122. Actual: ' + (parseFloat(\"+11.22e-1\")));\n}\n\n//CHECK#8\nif (parseFloat(\"01.01e1\") !== 10.1) {\n $ERROR('#8: parseFloat(\"01.01e1\") === 10.1. Actual: ' + (parseFloat(\"01.01e1\")));\n}\n\n//CHECK#9\nif (parseFloat(\"001.\") !== 1) {\n $ERROR('#9: parseFloat(\"001.\") === 1. Actual: ' + (parseFloat(\"001.\")));\n}\n\n//CHECK#10\nif (parseFloat(\"010.\") !== 10) {\n $ERROR('#10: parseFloat(\"010.\") === 10. Actual: ' + (parseFloat(\"010.\")));\n}\n",
+ "id": "S15.1.2.3_A5_T2"
+ },
+ {
+ "section": "15.1.2.3, 9.3.1",
+ "description": "Checking . DecimalDigits ExponentPart_opt",
+ "test": "//CHECK#1\nif (parseFloat(\"+.1\") !== 0.1) {\n $ERROR('#1: parseFloat(\"+.1\") === 0.1. Actual: ' + (parseFloat(\"+.1\")));\n}\n\n//CHECK#2\nif (parseFloat(\".01\") !== 0.01) {\n $ERROR('#2: parseFloat(\".01\") === 0.01. Actual: ' + (parseFloat(\".01\")));\n}\n\n//CHECK#3\nif (parseFloat(\"+.22e-1\") !== 0.022) {\n $ERROR('#3: parseFloat(\"+.22e-1\") === 0.022. Actual: ' + (parseFloat(\"+.22e-1\")));\n}\n",
+ "id": "S15.1.2.3_A5_T3"
+ },
+ {
+ "section": "15.1.2.3, 9.3.1",
+ "description": "Checking DecimalDigits ExponentPart_opt",
+ "test": "//CHECK#1\nif (parseFloat(\"-11\") !== -11) {\n $ERROR('#1: parseFloat(\"-11\") === -11. Actual: ' + (parseFloat(\"-11\")));\n}\n\n//CHECK#2\nif (parseFloat(\"01\") !== 1) {\n $ERROR('#2: parseFloat(\"01\") === 1. Actual: ' + (parseFloat(\"01\")));\n}\n\n//CHECK#3\nif (parseFloat(\"-11e-1\") !== -1.1) {\n $ERROR('#3: parseFloat(\"-11e-1\") === -1.1. Actual: ' + (parseFloat(\"-11e-1\")));\n}\n\n//CHECK#4\nif (parseFloat(\"01e1\") !== 10) {\n $ERROR('#4: parseFloat(\"01e1\") === 10. Actual: ' + (parseFloat(\"01e1\")));\n}\n\n//CHECK#5\nif (parseFloat(\"001\") !== 1) {\n $ERROR('#5: parseFloat(\"001\") === 1. Actual: ' + (parseFloat(\"001\")));\n}\n\n//CHECK#6\nif (parseFloat(\"1e001\") !== 10) {\n $ERROR('#6: parseFloat(\"1e001\") === 10. Actual: ' + (parseFloat(\"1e001\")));\n}\n\n//CHECK#7\nif (parseFloat(\"010\") !== 10) {\n $ERROR('#7: parseFloat(\"010\") === 10. Actual: ' + (parseFloat(\"010\")));\n}\n",
+ "id": "S15.1.2.3_A5_T4"
+ },
+ {
+ "section": "15.1.2.3, 9.3.1",
+ "description": "Complex test without eval",
+ "test": "//CHECK\nvar errorCount = 0;\nvar count = 0;\nvar indexP;\nvar indexO = 0;\nfor (var index = 0; index <= 65535; index++) { \n if ((index < 0x0030) || (index > 0x0039)) { \n var hex = decimalToHexString(index);\n if (parseFloat(\"0.1e1\" + String.fromCharCode(index)) !== 1) { \n if (indexO === 0) { \n indexO = index;\n } else {\n if ((index - indexP) !== 1) { \n if ((indexP - indexO) !== 0) {\n var hexP = decimalToHexString(indexP);\n var hexO = decimalToHexString(indexO);\n $ERROR('#' + hexO + '-' + hexP + ' ');\n } \n else {\n var hexP = decimalToHexString(indexP);\n $ERROR('#' + hexP + ' ');\n } \n indexO = index;\n } \n }\n indexP = index;\n errorCount++; \n } \n count++;\n } \n}\n\nif (errorCount > 0) {\n if ((indexP - indexO) !== 0) {\n var hexP = decimalToHexString(indexP);\n var hexO = decimalToHexString(indexO);\n $ERROR('#' + hexO + '-' + hexP + ' ');\n } else {\n var hexP = decimalToHexString(indexP);\n $ERROR('#' + hexP + ' ');\n } \n $ERROR('Total error: ' + errorCount + ' bad Unicode character in ' + count + ' ');\n}\n\nfunction decimalToHexString(n) {\n n = Number(n);\n var h = \"\";\n for (var i = 3; i >= 0; i--) {\n if (n >= Math.pow(16, i)) {\n var t = Math.floor(n / Math.pow(16, i));\n n -= t * Math.pow(16, i);\n if ( t >= 10 ) {\n if ( t == 10 ) { h += \"A\"; }\n if ( t == 11 ) { h += \"B\"; }\n if ( t == 12 ) { h += \"C\"; }\n if ( t == 13 ) { h += \"D\"; }\n if ( t == 14 ) { h += \"E\"; }\n if ( t == 15 ) { h += \"F\"; }\n } else {\n h += String(t);\n }\n } else {\n h += \"0\";\n }\n }\n return h;\n}\n",
+ "id": "S15.1.2.3_A6"
+ },
+ {
+ "section": "15.1.2.3, 15.2.4.7, 12.6.4",
+ "description": "Checking use propertyIsEnumerable, for-in",
+ "test": "//CHECK#1\nif (parseFloat.propertyIsEnumerable('length') !== false) {\n $ERROR('#1: parseFloat.propertyIsEnumerable(\\'length\\') === false. Actual: ' + (parseFloat.propertyIsEnumerable('length')));\n}\n\n//CHECK#2\nvar result = true;\nfor (var p in parseFloat){\n if (p === \"length\") {\n result = false;\n } \n}\n\nif (result !== true) {\n $ERROR('#2: result = true; for (p in parseFloat) { if (p === \"length\") result = false; } result === true;');\n}\n",
+ "id": "S15.1.2.3_A7.1"
+ },
+ {
+ "section": "15.1.2.3, 15.2.4.5, 11.4.1",
+ "description": "Checking use hasOwnProperty, delete",
+ "strict_mode_negative": "",
+ "test": "//CHECK#1\nif (parseFloat.hasOwnProperty('length') !== true) {\n $FAIL('#1: parseFloat.hasOwnProperty(\\'length\\') === true. Actual: ' + (parseFloat.hasOwnProperty('length')));\n}\n\ndelete parseFloat.length;\n\n//CHECK#2\nif (parseFloat.hasOwnProperty('length') !== true) {\n $ERROR('#2: delete parseFloat.length; parseFloat.hasOwnProperty(\\'length\\') === true. Actual: ' + (parseFloat.hasOwnProperty('length')));\n}\n\n//CHECK#3\nif (parseFloat.length === undefined) {\n $ERROR('#3: delete parseFloat.length; parseFloat.length !== undefined');\n}\n",
+ "id": "S15.1.2.3_A7.2",
+ "strict_only": ""
+ },
+ {
+ "section": "15.1.2.3",
+ "description": "Checking if varying the length property fails",
+ "strict_mode_negative": "",
+ "test": "//CHECK#1\nvar x = parseFloat.length;\nparseFloat.length = Infinity;\nif (parseFloat.length !== x) {\n $ERROR('#1: x = parseFloat.length; parseFloat.length = Infinity; parseFloat.length === x. Actual: ' + (parseFloat.length));\n}\n\n",
+ "id": "S15.1.2.3_A7.3",
+ "strict_only": ""
+ },
+ {
+ "section": "15.1.2.3",
+ "description": "parseFloat.length === 1",
+ "test": "//CHECK#1\nif (parseFloat.length !== 1) {\n $ERROR('#1: parseFloat.length === 1. Actual: ' + (parseFloat.length));\n} \n\n",
+ "id": "S15.1.2.3_A7.4"
+ },
+ {
+ "section": "15.1.2.3, 15.2.4.7, 12.6.4",
+ "description": "Checking use propertyIsEnumerable, for-in",
+ "test": "//CHECK#1\nif (this.propertyIsEnumerable('parseFloat') !== false) {\n $ERROR('#1:this.propertyIsEnumerable(\\'parseFloat\\') === false. Actual: ' + (this.propertyIsEnumerable('parseFloat')));\n}\n\n//CHECK#2\nvar result = true;\nfor (var p in this){\n if (p === \"parseFloat\") {\n result = false;\n } \n}\n\nif (result !== true) {\n $ERROR('#2: result = true; for (p in this) { if (p === \"parseFloat\") result = false; } result === true;');\n}\n",
+ "id": "S15.1.2.3_A7.5"
+ },
+ {
+ "section": "15.1.2.3",
+ "description": "Checking parseFloat.prototype",
+ "test": "//CHECK#1\nif (parseFloat.prototype !== undefined) {\n $ERROR('#1: parseFloat.prototype === undefined. Actual: ' + (parseFloat.prototype));\n}\n",
+ "id": "S15.1.2.3_A7.6"
+ },
+ {
+ "section": "15.1.2.3, 11.2.2",
+ "description": "If property does not implement the internal [[Construct]] method, throw a TypeError exception",
+ "test": "//CHECK#1\n\ntry {\n new parseFloat();\n $ERROR('#1.1: new parseFloat() throw TypeError. Actual: ' + (new parseFloat()));\n} catch (e) {\n if ((e instanceof TypeError) !== true) {\n $ERROR('#1.2: new parseFloat() throw TypeError. Actual: ' + (e));\n }\n}\n",
+ "id": "S15.1.2.3_A7.7"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.1.2.4_isNaN.json b/website/resources/scripts/testcases2/15.1.2.4_isNaN.json
new file mode 100644
index 000000000..18fd30a9b
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.1.2.4_isNaN.json
@@ -0,0 +1,66 @@
+{
+ "testCollection": {
+ "name": "15.1.2.4_isNaN",
+ "numTests": 9,
+ "tests": [
+ {
+ "section": "15.1.2.4",
+ "description": "Checking all primitive",
+ "test": "// CHECK#1\nif (!(isNaN(NaN) === true)) {\n\t$ERROR('#1: NaN === Not-a-Number. Actual: ' + (NaN)); \n}\n\n// CHECK#2\nif (!(isNaN(Number.NaN) === true)) {\n\t$ERROR('#2: Number.NaN === Not-a-Number. Actual: ' + (Number.NaN)); \n}\n\n// CHECK#3\nif (!(isNaN(Number(void 0)) === true)) {\n\t$ERROR('#3: Number(void 0) === Not-a-Number. Actual: ' + (Number(void 0))); \n}\n\n// CHECK#4\nif (!(isNaN(void 0) === true)) {\n\t$ERROR('#4: void 0 === Not-a-Number. Actual: ' + (void 0)); \n}\n\n// CHECK#5\nif (!(isNaN(\"string\") === true)) {\n\t$ERROR('#5: \"string\" === Not-a-Number. Actual: ' + (\"string\")); \n}\n\n// CHECK#6\nif (isNaN(Number.POSITIVE_INFINITY) === true) {\n\t$ERROR('#6: Number.POSITIVE_INFINITY !== Not-a-Number'); \n}\n\n// CHECK#7\nif (isNaN(Number.NEGATIVE_INFINITY) === true) {\n\t$ERROR('#7: Number.NEGATIVE_INFINITY !== Not-a-Number'); \n}\n\n// CHECK#8\nif (isNaN(Number.MAX_VALUE) === true) {\n\t$ERROR('#8: Number.MAX_VALUE !== Not-a-Number'); \n}\n\n// CHECK#9\nif (isNaN(Number.MIN_VALUE) === true) {\n\t$ERROR('#9: Number.MIN_VALUE !== Not-a-Number'); \n}\n\n// CHECK#10\nif (isNaN(-0) === true) {\n\t$ERROR('#10: -0 !== Not-a-Number'); \n}\n\n// CHECK#11\nif (isNaN(true) === true) {\n $ERROR('#11: true !== Not-a-Number'); \n}\n\n// CHECK#12\nif (isNaN(\"1\") === true) {\n $ERROR('#12: \"1\" !== Not-a-Number'); \n}\n\n\n\n\n",
+ "id": "S15.1.2.4_A1_T1"
+ },
+ {
+ "section": "15.1.2.4",
+ "description": "Checking all object",
+ "test": "// CHECK#1\nif (!(isNaN({}) === true)) {\n\t$ERROR('#1: {} === Not-a-Number. Actual: ' + ({})); \n}\n\n// CHECK#2\nif (!(isNaN(new String(\"string\")) === true)) {\n\t$ERROR('#2: new String(\"string\") === Not-a-Number. Actual: ' + (new String(\"string\"))); \n}\n\n// CHECK#3\nif (isNaN(new String(\"1\")) === true) {\n $ERROR('#3: new String(\"1\") === Not-a-Number. Actual: ' + (new String(\"1\"))); \n}\n\n// CHECK#4\nif (isNaN(new Number(1)) === true) {\n\t$ERROR('#4: new Number(1) !== Not-a-Number'); \n}\n\n// CHECK#5\nif (!(isNaN(new Number(NaN)) === true)) {\n $ERROR('#5: new Number(NaN) === Not-a-Number. Actual: ' + (new Number(NaN))); \n}\n\n// CHECK#6\nif (isNaN(new Boolean(true)) === true) {\n $ERROR('#6: new Boolean(true) !== Not-a-Number'); \n}\n\n\n\n\n",
+ "id": "S15.1.2.4_A1_T2"
+ },
+ {
+ "section": "15.1.2.4, 15.2.4.7, 12.6.4",
+ "description": "Checking use propertyIsEnumerable, for-in",
+ "test": "//CHECK#1\nif (isNaN.propertyIsEnumerable('length') !== false) {\n $ERROR('#1: isNaN.propertyIsEnumerable(\\'length\\') === false. Actual: ' + (isNaN.propertyIsEnumerable('length')));\n}\n\n//CHECK#2\nvar result = true;\nfor (p in isNaN){\n if (p === \"length\") {\n result = false;\n } \n}\n\nif (result !== true) {\n $ERROR('#2: result = true; for (p in isNaN) { if (p === \"length\") result = false; } result === true;');\n}\n",
+ "id": "S15.1.2.4_A2.1"
+ },
+ {
+ "section": "15.1.2.4, 15.2.4.5, 11.4.1",
+ "description": "Checking use hasOwnProperty, delete",
+ "strict_mode_negative": "",
+ "test": "//CHECK#1\nif (isNaN.hasOwnProperty('length') !== true) {\n $FAIL('#1: isNaN.hasOwnProperty(\\'length\\') === true. Actual: ' + (isNaN.hasOwnProperty('length')));\n}\n\ndelete isNaN.length;\n\n//CHECK#2\nif (isNaN.hasOwnProperty('length') !== true) {\n $ERROR('#2: delete isNaN.length; isNaN.hasOwnProperty(\\'length\\') === true. Actual: ' + (isNaN.hasOwnProperty('length')));\n}\n\n//CHECK#3\nif (isNaN.length === undefined) {\n $ERROR('#3: delete isNaN.length; isNaN.length !== undefined');\n}\n",
+ "id": "S15.1.2.4_A2.2",
+ "strict_only": ""
+ },
+ {
+ "section": "15.1.2.4",
+ "description": "Checking if varying the length property fails",
+ "strict_mode_negative": "",
+ "test": "//CHECK#1\nx = isNaN.length;\nisNaN.length = Infinity;\nif (isNaN.length !== x) {\n $ERROR('#1: x = isNaN.length; isNaN.length = Infinity; isNaN.length === x. Actual: ' + (isNaN.length));\n}\n\n",
+ "id": "S15.1.2.4_A2.3",
+ "strict_only": ""
+ },
+ {
+ "section": "15.1.2.4",
+ "description": "isNaN.length === 1",
+ "test": "//CHECK#1\nif (isNaN.length !== 1) {\n $ERROR('#1: isNaN.length === 1. Actual: ' + (isNaN.length));\n} \n\n",
+ "id": "S15.1.2.4_A2.4"
+ },
+ {
+ "section": "15.1.2.4, 15.2.4.7, 12.6.4",
+ "description": "Checking use propertyIsEnumerable, for-in",
+ "test": "//CHECK#1\nif (this.propertyIsEnumerable('isNaN') !== false) {\n $ERROR('#1: this.propertyIsEnumerable(\\'isNaN\\') === false. Actual: ' + (this.propertyIsEnumerable('isNaN')));\n}\n\n//CHECK#2\nvar result = true;\nfor (p in this){\n if (p === \"isNaN\") {\n result = false;\n } \n}\n\nif (result !== true) {\n $ERROR('#2: result = true; for (p in this) { if (p === \"isNaN\") result = false; } result === true;');\n}\n",
+ "id": "S15.1.2.4_A2.5"
+ },
+ {
+ "section": "15.1.2.4",
+ "description": "Checking isNaN.prototype",
+ "test": "//CHECK#1\nif (isNaN.prototype !== undefined) {\n $ERROR('#1: isNaN.prototype === undefined. Actual: ' + (isNaN.prototype));\n}\n",
+ "id": "S15.1.2.4_A2.6"
+ },
+ {
+ "section": "15.1.2.4, 11.2.2",
+ "description": "If property does not implement the internal [[Construct]] method, throw a TypeError exception",
+ "test": "//CHECK#1\n\ntry {\n new isNaN();\n $ERROR('#1.1: new isNaN() throw TypeError. Actual: ' + (new isNaN()));\n} catch (e) {\n if ((e instanceof TypeError) !== true) {\n $ERROR('#1.2: new isNaN() throw TypeError. Actual: ' + (e));\n }\n}\n",
+ "id": "S15.1.2.4_A2.7"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.1.2.5_isFinite.json b/website/resources/scripts/testcases2/15.1.2.5_isFinite.json
new file mode 100644
index 000000000..3746fd32b
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.1.2.5_isFinite.json
@@ -0,0 +1,66 @@
+{
+ "testCollection": {
+ "name": "15.1.2.5_isFinite",
+ "numTests": 9,
+ "tests": [
+ {
+ "section": "15.1.2.5",
+ "description": "Checking all primitive",
+ "test": "// CHECK#1\nif (!(isFinite(NaN) === false)) {\n $ERROR('#1: NaN === Not-a-Finite. Actual: ' + (NaN)); \n}\n\n// CHECK#2\nif (!(isFinite(Number.NaN) === false)) {\n $ERROR('#2: Number.NaN === Not-a-Finite. Actual: ' + (Number.NaN)); \n}\n\n// CHECK#3\nif (!(isFinite(Number(void 0)) === false)) {\n $ERROR('#3: Number(void 0) === Not-a-Finite. Actual: ' + (Number(void 0))); \n}\n\n// CHECK#4\nif (!(isFinite(void 0) === false)) {\n $ERROR('#4: void 0 === Not-a-Finite. Actual: ' + (void 0)); \n}\n\n// CHECK#5\nif (!(isFinite(\"string\") === false)) {\n $ERROR('#5: \"string\" === Not-a-Finite. Actual: ' + (\"string\")); \n}\n\n// CHECK#6\nif (isFinite(Number.POSITIVE_INFINITY) !== false) {\n $ERROR('#6: Number.POSITIVE_INFINITY === Not-a-Finite. Actual: ' + (Number.POSITIVE_INFINITY)); \n}\n\n// CHECK#7\nif (isFinite(Number.NEGATIVE_INFINITY) !== false) {\n $ERROR('#7: Number.NEGATIVE_INFINITY === Not-a-Finite. Actual: ' + (Number.NEGATIVE_INFINITY)); \n}\n\n// CHECK#8\nif (isFinite(Number.MAX_VALUE) === false) {\n $ERROR('#8: Number.MAX_VALUE !== Not-a-Finite'); \n}\n\n// CHECK#9\nif (isFinite(Number.MIN_VALUE) === false) {\n $ERROR('#9: Number.MIN_VALUE !== Not-a-Finite'); \n}\n\n// CHECK#10\nif (isFinite(-0) === false) {\n $ERROR('#10: -0 !== Not-a-Finite'); \n}\n\n// CHECK#11\nif (isFinite(false) === false) {\n $ERROR('#11: false !== Not-a-Finite'); \n}\n\n// CHECK#12\nif (isFinite(\"1\") === false) {\n $ERROR('#12: \"1\" !== Not-a-Finite'); \n}\n",
+ "id": "S15.1.2.5_A1_T1"
+ },
+ {
+ "section": "15.1.2.5",
+ "description": "Checking all object",
+ "test": "// CHECK#1\nif (!(isFinite({}) === false)) {\n $ERROR('#1: {} === Not-a-Finite. Actual: ' + ({})); \n}\n\n// CHECK#2\nif (!(isFinite(new String(\"string\")) === false)) {\n $ERROR('#2: new String(\"string\") === Not-a-Finite. Actual: ' + (new String(\"string\"))); \n}\n\n// CHECK#3\nif (isFinite(new String(\"1\")) === false) {\n $ERROR('#3: new String(\"1\") === Not-a-Finite. Actual: ' + (new String(\"1\"))); \n}\n\n// CHECK#4\nif (isFinite(new Number(1)) === false) {\n $ERROR('#4: new Number(1) !== Not-a-Finite'); \n}\n\n// CHECK#5\nif (!(isFinite(new Number(NaN)) === false)) {\n $ERROR('#5: new Number(NaN) === Not-a-Finite. Actual: ' + (new Number(NaN))); \n}\n\n// CHECK#6\nif (isFinite(new Boolean(true)) === false) {\n $ERROR('#6: new Boolean(true) !== Not-a-Finite'); \n}\n",
+ "id": "S15.1.2.5_A1_T2"
+ },
+ {
+ "section": "15.1.2.5, 15.2.4.7, 12.6.4",
+ "description": "Checking use propertyIsEnumerable, for-in",
+ "test": "//CHECK#1\nif (isFinite.propertyIsEnumerable('length') !== false) {\n $ERROR('#1: isFinite.propertyIsEnumerable(\\'length\\') === false. Actual: ' + (isFinite.propertyIsEnumerable('length')));\n}\n\n//CHECK#2\nvar result = true;\nfor (p in isFinite){\n if (p === \"length\") {\n result = false;\n } \n}\n\nif (result !== true) {\n $ERROR('#2: result = true; for (p in isFinite) { if (p === \"length\") result = false; } result === true;');\n}\n",
+ "id": "S15.1.2.5_A2.1"
+ },
+ {
+ "section": "15.1.2.5, 15.2.4.5, 11.4.1",
+ "description": "Checking use hasOwnProperty, delete",
+ "strict_mode_negative": "",
+ "test": "//CHECK#1\nif (isFinite.hasOwnProperty('length') !== true) {\n $FAIL('#1: isFinite.hasOwnProperty(\\'length\\') === true. Actual: ' + (isFinite.hasOwnProperty('length')));\n}\n\ndelete isFinite.length;\n\n//CHECK#2\nif (isFinite.hasOwnProperty('length') !== true) {\n $ERROR('#2: delete isFinite.length; isFinite.hasOwnProperty(\\'length\\') === true. Actual: ' + (isFinite.hasOwnProperty('length')));\n}\n\n//CHECK#3\nif (isFinite.length === undefined) {\n $ERROR('#3: delete isFinite.length; isFinite.length !== undefined');\n}\n",
+ "id": "S15.1.2.5_A2.2",
+ "strict_only": ""
+ },
+ {
+ "section": "15.1.2.5",
+ "description": "Checking if varying the length property fails",
+ "strict_mode_negative": "",
+ "test": "//CHECK#1\nx = isFinite.length;\nisFinite.length = Infinity;\nif (isFinite.length !== x) {\n $ERROR('#1: x = isFinite.length; isFinite.length = Infinity; isFinite.length === x. Actual: ' + (isFinite.length));\n}\n\n",
+ "id": "S15.1.2.5_A2.3",
+ "strict_only": ""
+ },
+ {
+ "section": "15.1.2.5",
+ "description": "isFinite.length === 1",
+ "test": "//CHECK#1\nif (isFinite.length !== 1) {\n $ERROR('#1: isFinite.length === 1. Actual: ' + (isFinite.length));\n} \n\n",
+ "id": "S15.1.2.5_A2.4"
+ },
+ {
+ "section": "15.1.2.5, 15.2.4.7, 12.6.4",
+ "description": "Checking use propertyIsEnumerable, for-in",
+ "test": "//CHECK#1\nif (this.propertyIsEnumerable('isFinite') !== false) {\n $ERROR('#1: this.propertyIsEnumerable(\\'isFinite\\') === false. Actual: ' + (this.propertyIsEnumerable('isFinite')));\n}\n\n//CHECK#2\nvar result = true;\nfor (p in this){\n if (p === \"isFinite\") {\n result = false;\n } \n}\n\nif (result !== true) {\n $ERROR('#2: result = true; for (p in this) { if (p === \"isFinite\") result = false; } result === true;');\n}\n",
+ "id": "S15.1.2.5_A2.5"
+ },
+ {
+ "section": "15.1.2.5",
+ "description": "Checking isFinit.prototype",
+ "test": "//CHECK#1\nif (isFinite.prototype !== undefined) {\n $ERROR('#1: isFinite.prototype === undefined. Actual: ' + (isFinite.prototype));\n}\n",
+ "id": "S15.1.2.5_A2.6"
+ },
+ {
+ "section": "15.1.2.5, 11.2.2",
+ "description": "If property does not implement the internal [[Construct]] method, throw a TypeError exception",
+ "test": "//CHECK#1\n\ntry {\n new isFinite();\n $ERROR('#1.1: new isFinite() throw TypeError. Actual: ' + (new isFinite()));\n} catch (e) {\n if ((e instanceof TypeError) !== true) {\n $ERROR('#1.2: new isFinite() throw TypeError. Actual: ' + (e));\n }\n}\n",
+ "id": "S15.1.2.5_A2.7"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.1.3.1_decodeURI.json b/website/resources/scripts/testcases2/15.1.3.1_decodeURI.json
new file mode 100644
index 000000000..978df2443
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.1.3.1_decodeURI.json
@@ -0,0 +1,324 @@
+{
+ "testCollection": {
+ "name": "15.1.3.1_decodeURI",
+ "numTests": 52,
+ "tests": [
+ {
+ "section": "15.1.3.1",
+ "description": "Complex tests",
+ "test": "//CHECK\nvar result = true;\nvar interval = [[0x00, 0x29], [0x40,0x40], [0x47, 0x60], [0x67, 0xFFFF]];\nfor (var indexI = 0; indexI < interval.length; indexI++) {\n for (var indexJ = interval[indexI][0]; indexJ <= interval[indexI][1]; indexJ++) {\n try {\n decodeURI(\"%C0%\" + String.fromCharCode(indexJ, indexJ));\n result = false; \n } catch (e) { \n if ((e instanceof URIError) !== true) {\n result = false; \n }\n } \n } \n} \n\nif (result !== true) { \n $ERROR('#1: If B = 110xxxxx (n = 2) and (string.charAt(k + 4) and string.charAt(k + 5)) do not represent hexadecimal digits, throw URIError');\n}\n",
+ "id": "S15.1.3.1_A1.10_T1"
+ },
+ {
+ "section": "15.1.3.1",
+ "description": "Complex tests, string.charAt(k + 4) and string.charAt(k + 5)\ndo not represent hexadecimal digits",
+ "test": "//CHECK\nvar result = true;\nvar interval = [[0x00, 0x29], [0x40,0x40], [0x47, 0x60], [0x67, 0xFFFF]];\nfor (var indexI = 0; indexI < interval.length; indexI++) {\n for (var indexJ = interval[indexI][0]; indexJ <= interval[indexI][1]; indexJ++) {\n try {\n decodeURI(\"%E0%\" + String.fromCharCode(indexJ, indexJ) + \"%A0\");\n result = false; \n } catch (e) { \n if ((e instanceof URIError) !== true) {\n result = false; \n }\n } \n } \n} \n\nif (result !== true) { \n $ERROR('#1: If B = 1110xxxx (n = 3) and (string.charAt(k + 4) and string.charAt(k + 5)) do not represent hexadecimal digits, throw URIError');\n}\n",
+ "id": "S15.1.3.1_A1.11_T1"
+ },
+ {
+ "section": "15.1.3.1",
+ "description": "Complex tests, string.charAt(k + 7) and string.charAt(k + 8)\ndo not represent hexadecimal digits",
+ "test": "//CHECK\nvar result = true;\nvar interval = [[0x00, 0x29], [0x40,0x40], [0x47, 0x60], [0x67, 0xFFFF]];\nfor (var indexI = 0; indexI < interval.length; indexI++) {\n for (var indexJ = interval[indexI][0]; indexJ <= interval[indexI][1]; indexJ++) {\n try {\n decodeURI(\"%E0%\" + \"%A0\" + String.fromCharCode(indexJ, indexJ));\n result = false; \n } catch (e) { \n if ((e instanceof URIError) !== true) {\n result = false; \n }\n } \n } \n} \n\nif (result !== true) { \n $ERROR('#1: If B = 1110xxxx (n = 3) and (string.charAt(k + 7) and string.charAt(k + 8)) do not represent hexadecimal digits, throw URIError');\n}\n",
+ "id": "S15.1.3.1_A1.11_T2"
+ },
+ {
+ "section": "15.1.3.1",
+ "description": "Complex tests, string.charAt(k + 4) and string.charAt(k + 5)\ndo not represent hexadecimal digits",
+ "test": "//CHECK\nvar result = true;\nvar interval = [[0x00, 0x29], [0x40,0x40], [0x47, 0x60], [0x67, 0xFFFF]];\nfor (var indexI = 0; indexI < interval.length; indexI++) {\n for (var indexJ = interval[indexI][0]; indexJ <= interval[indexI][1]; indexJ++) {\n try {\n decodeURI(\"%F0%\" + String.fromCharCode(indexJ, indexJ) + \"%A0%A0\");\n result = false; \n } catch (e) { \n if ((e instanceof URIError) !== true) {\n result = false; \n }\n } \n } \n} \n\nif (result !== true) { \n $ERROR('#1: If B = 11110xxx (n = 4) and (string.charAt(k + 4) and string.charAt(k + 5)) do not represent hexadecimal digits, throw URIError');\n}\n",
+ "id": "S15.1.3.1_A1.12_T1"
+ },
+ {
+ "section": "15.1.3.1",
+ "description": "Complex tests, string.charAt(k + 7) and string.charAt(k + 7)\ndo not represent hexadecimal digits",
+ "test": "//CHECK\nvar result = true;\nvar interval = [[0x00, 0x29], [0x40,0x40], [0x47, 0x60], [0x67, 0xFFFF]];\nfor (var indexI = 0; indexI < interval.length; indexI++) {\n for (var indexJ = interval[indexI][0]; indexJ <= interval[indexI][1]; indexJ++) {\n try {\n decodeURI(\"%F0%\" + \"%A0\" + String.fromCharCode(indexJ, indexJ) + \"%A0\");\n result = false; \n } catch (e) { \n if ((e instanceof URIError) !== true) {\n result = false; \n }\n } \n } \n} \n\nif (result !== true) { \n $ERROR('#1: If B = 11110xxx (n = 4) and (string.charAt(k + 7) and string.charAt(k + 8)) do not represent hexadecimal digits, throw URIError');\n}\n",
+ "id": "S15.1.3.1_A1.12_T2"
+ },
+ {
+ "section": "15.1.3.1",
+ "description": "Complex tests, string.charAt(k + 10) and string.charAt(k + 11)\ndo not represent hexadecimal digits",
+ "test": "//CHECK\nvar result = true;\nvar interval = [[0x00, 0x29], [0x40,0x40], [0x47, 0x60], [0x67, 0xFFFF]];\nfor (var indexI = 0; indexI < interval.length; indexI++) {\n for (var indexJ = interval[indexI][0]; indexJ <= interval[indexI][1]; indexJ++) {\n try {\n decodeURI(\"%F0%\" + \"%A0%A0\" + String.fromCharCode(indexJ, indexJ));\n result = false; \n } catch (e) { \n if ((e instanceof URIError) !== true) {\n result = false; \n }\n } \n } \n} \n\nif (result !== true) { \n $ERROR('#1: If B = 11110xxx (n = 4) and (string.charAt(k + 10) and string.charAt(k + 11)) do not represent hexadecimal digits, throw URIError');\n}\n",
+ "id": "S15.1.3.1_A1.12_T3"
+ },
+ {
+ "section": "15.1.3.1",
+ "description": "Complex tests. B = [0xC0 - 0xDF], C = [0x00, 0x7F]",
+ "test": "var errorCount = 0;\nvar count = 0;\nvar indexP;\nvar indexO = 0;\n\nfor (var indexB = 0xC0; indexB <= 0xDF; indexB++) {\n count++; \n var hexB = decimalToHexString(indexB); \n var result = true;\n for (var indexC = 0x00; indexC <= 0x7F; indexC++) {\n var hexC = decimalToHexString(indexC); \n try {\n decodeURI(\"%\" + hexB.substring(2) + \"%\" + hexC.substring(2));\n } catch (e) { \n if ((e instanceof URIError) === true) continue; \n }\n result = false;\n }\n if (result !== true) {\n if (indexO === 0) { \n indexO = indexB;\n } else {\n if ((indexB - indexP) !== 1) { \n if ((indexP - indexO) !== 0) {\n var hexP = decimalToHexString(indexP);\n var hexO = decimalToHexString(indexO);\n $ERROR('#' + hexO + '-' + hexP + ' ');\n } \n else {\n var hexP = decimalToHexString(indexP);\n $ERROR('#' + hexP + ' ');\n } \n indexO = indexB;\n } \n }\n indexP = indexB;\n errorCount++; \n }\n}\n\nif (errorCount > 0) {\n if ((indexP - indexO) !== 0) {\n var hexP = decimalToHexString(indexP);\n var hexO = decimalToHexString(indexO);\n $ERROR('#' + hexO + '-' + hexP + ' ');\n } else {\n var hexP = decimalToHexString(indexP);\n $ERROR('#' + hexP + ' ');\n } \n $ERROR('Total error: ' + errorCount + ' bad Unicode character in ' + count + ' ');\n}\n\nfunction decimalToHexString(n) {\n n = Number(n);\n var h = \"\";\n for (var i = 3; i >= 0; i--) {\n if (n >= Math.pow(16, i)) {\n var t = Math.floor(n / Math.pow(16, i));\n n -= t * Math.pow(16, i);\n if ( t >= 10 ) {\n if ( t == 10 ) { h += \"A\"; }\n if ( t == 11 ) { h += \"B\"; }\n if ( t == 12 ) { h += \"C\"; }\n if ( t == 13 ) { h += \"D\"; }\n if ( t == 14 ) { h += \"E\"; }\n if ( t == 15 ) { h += \"F\"; }\n } else {\n h += String(t);\n }\n } else {\n h += \"0\";\n }\n }\n return h;\n}\n",
+ "id": "S15.1.3.1_A1.13_T1"
+ },
+ {
+ "section": "15.1.3.1",
+ "description": "Complex tests. B = [0xC0 - 0xDF], C = [0xC0, 0xFF]",
+ "test": "var errorCount = 0;\nvar count = 0;\nvar indexP;\nvar indexO = 0;\n\nfor (var indexB = 0xC0; indexB <= 0xDF; indexB++) {\n count++; \n var hexB = decimalToHexString(indexB); \n var result = true;\n for (var indexC = 0xC0; indexC <= 0xFF; indexC++) {\n var hexC = decimalToHexString(indexC); \n try {\n decodeURI(\"%\" + hexB.substring(2) + \"%\" + hexC.substring(2));\n } catch (e) { \n if ((e instanceof URIError) === true) continue; \n }\n result = false;\n }\n if (result !== true) {\n if (indexO === 0) { \n indexO = indexB;\n } else {\n if ((indexB - indexP) !== 1) { \n if ((indexP - indexO) !== 0) {\n var hexP = decimalToHexString(indexP);\n var hexO = decimalToHexString(indexO);\n $ERROR('#' + hexO + '-' + hexP + ' ');\n } \n else {\n var hexP = decimalToHexString(indexP);\n $ERROR('#' + hexP + ' ');\n } \n indexO = indexB;\n } \n }\n indexP = indexB;\n errorCount++; \n }\n}\n\nif (errorCount > 0) {\n if ((indexP - indexO) !== 0) {\n var hexP = decimalToHexString(indexP);\n var hexO = decimalToHexString(indexO);\n $ERROR('#' + hexO + '-' + hexP + ' ');\n } else {\n var hexP = decimalToHexString(indexP);\n $ERROR('#' + hexP + ' ');\n } \n $ERROR('Total error: ' + errorCount + ' bad Unicode character in ' + count + ' ');\n}\n\nfunction decimalToHexString(n) {\n n = Number(n);\n var h = \"\";\n for (var i = 3; i >= 0; i--) {\n if (n >= Math.pow(16, i)) {\n var t = Math.floor(n / Math.pow(16, i));\n n -= t * Math.pow(16, i);\n if ( t >= 10 ) {\n if ( t == 10 ) { h += \"A\"; }\n if ( t == 11 ) { h += \"B\"; }\n if ( t == 12 ) { h += \"C\"; }\n if ( t == 13 ) { h += \"D\"; }\n if ( t == 14 ) { h += \"E\"; }\n if ( t == 15 ) { h += \"F\"; }\n } else {\n h += String(t);\n }\n } else {\n h += \"0\";\n }\n }\n return h;\n}\n",
+ "id": "S15.1.3.1_A1.13_T2"
+ },
+ {
+ "section": "15.1.3.1",
+ "description": "Complex tests. B = [0xE0 - 0xEF], C = [0x00, 0x7F]",
+ "test": "var errorCount = 0;\nvar count = 0;\nvar indexP;\nvar indexO = 0;\n\nfor (var indexB = 0xE0; indexB <= 0xEF; indexB++) {\n count++; \n var hexB = decimalToHexString(indexB); \n var result = true;\n for (var indexC = 0x00; indexC <= 0x7F; indexC++) {\n var hexC = decimalToHexString(indexC); \n try {\n decodeURI(\"%\" + hexB.substring(2) + \"%\" + hexC.substring(2) + \"%A0\");\n } catch (e) { \n if ((e instanceof URIError) === true) continue; \n }\n result = false;\n }\n if (result !== true) {\n if (indexO === 0) { \n indexO = indexB;\n } else {\n if ((indexB - indexP) !== 1) { \n if ((indexP - indexO) !== 0) {\n var hexP = decimalToHexString(indexP);\n var hexO = decimalToHexString(indexO);\n $ERROR('#' + hexO + '-' + hexP + ' ');\n } \n else {\n var hexP = decimalToHexString(indexP);\n $ERROR('#' + hexP + ' ');\n } \n indexO = indexB;\n } \n }\n indexP = indexB;\n errorCount++; \n }\n}\n\nif (errorCount > 0) {\n if ((indexP - indexO) !== 0) {\n var hexP = decimalToHexString(indexP);\n var hexO = decimalToHexString(indexO);\n $ERROR('#' + hexO + '-' + hexP + ' ');\n } else {\n var hexP = decimalToHexString(indexP);\n $ERROR('#' + hexP + ' ');\n } \n $ERROR('Total error: ' + errorCount + ' bad Unicode character in ' + count + ' ');\n}\n\nfunction decimalToHexString(n) {\n n = Number(n);\n var h = \"\";\n for (var i = 3; i >= 0; i--) {\n if (n >= Math.pow(16, i)) {\n var t = Math.floor(n / Math.pow(16, i));\n n -= t * Math.pow(16, i);\n if ( t >= 10 ) {\n if ( t == 10 ) { h += \"A\"; }\n if ( t == 11 ) { h += \"B\"; }\n if ( t == 12 ) { h += \"C\"; }\n if ( t == 13 ) { h += \"D\"; }\n if ( t == 14 ) { h += \"E\"; }\n if ( t == 15 ) { h += \"F\"; }\n } else {\n h += String(t);\n }\n } else {\n h += \"0\";\n }\n }\n return h;\n}\n",
+ "id": "S15.1.3.1_A1.14_T1"
+ },
+ {
+ "section": "15.1.3.1",
+ "description": "Complex tests. B = [0xE0 - 0xEF], C = [0x00, 0x7F]",
+ "test": "var errorCount = 0;\nvar count = 0;\nvar indexP;\nvar indexO = 0;\n\nfor (var indexB = 0xE0; indexB <= 0xEF; indexB++) {\n count++; \n var hexB = decimalToHexString(indexB); \n var result = true;\n for (var indexC = 0x00; indexC <= 0x7F; indexC++) {\n var hexC = decimalToHexString(indexC); \n try {\n decodeURI(\"%\" + hexB.substring(2) + \"%A0\" + \"%\" + hexC.substring(2));\n } catch (e) { \n if ((e instanceof URIError) === true) continue; \n }\n result = false;\n }\n if (result !== true) {\n if (indexO === 0) { \n indexO = indexB;\n } else {\n if ((indexB - indexP) !== 1) { \n if ((indexP - indexO) !== 0) {\n var hexP = decimalToHexString(indexP);\n var hexO = decimalToHexString(indexO);\n $ERROR('#' + hexO + '-' + hexP + ' ');\n } \n else {\n var hexP = decimalToHexString(indexP);\n $ERROR('#' + hexP + ' ');\n } \n indexO = indexB;\n } \n }\n indexP = indexB;\n errorCount++; \n }\n}\n\nif (errorCount > 0) {\n if ((indexP - indexO) !== 0) {\n var hexP = decimalToHexString(indexP);\n var hexO = decimalToHexString(indexO);\n $ERROR('#' + hexO + '-' + hexP + ' ');\n } else {\n var hexP = decimalToHexString(indexP);\n $ERROR('#' + hexP + ' ');\n } \n $ERROR('Total error: ' + errorCount + ' bad Unicode character in ' + count + ' ');\n}\n\nfunction decimalToHexString(n) {\n n = Number(n);\n var h = \"\";\n for (var i = 3; i >= 0; i--) {\n if (n >= Math.pow(16, i)) {\n var t = Math.floor(n / Math.pow(16, i));\n n -= t * Math.pow(16, i);\n if ( t >= 10 ) {\n if ( t == 10 ) { h += \"A\"; }\n if ( t == 11 ) { h += \"B\"; }\n if ( t == 12 ) { h += \"C\"; }\n if ( t == 13 ) { h += \"D\"; }\n if ( t == 14 ) { h += \"E\"; }\n if ( t == 15 ) { h += \"F\"; }\n } else {\n h += String(t);\n }\n } else {\n h += \"0\";\n }\n }\n return h;\n}\n",
+ "id": "S15.1.3.1_A1.14_T2"
+ },
+ {
+ "section": "15.1.3.1",
+ "description": "Complex tests. B = [0xE0 - 0xEF], C = [0xC0, 0xFF]",
+ "test": "var errorCount = 0;\nvar count = 0;\nvar indexP;\nvar indexO = 0;\n\nfor (var indexB = 0xE0; indexB <= 0xEF; indexB++) {\n count++; \n var hexB = decimalToHexString(indexB); \n var result = true;\n for (var indexC = 0xC0; indexC <= 0xFF; indexC++) {\n var hexC = decimalToHexString(indexC); \n try {\n decodeURI(\"%\" + hexB.substring(2) + \"%\" + hexC.substring(2) + \"%A0\");\n } catch (e) { \n if ((e instanceof URIError) === true) continue; \n }\n result = false;\n }\n if (result !== true) {\n if (indexO === 0) { \n indexO = indexB;\n } else {\n if ((indexB - indexP) !== 1) { \n if ((indexP - indexO) !== 0) {\n var hexP = decimalToHexString(indexP);\n var hexO = decimalToHexString(indexO);\n $ERROR('#' + hexO + '-' + hexP + ' ');\n } \n else {\n var hexP = decimalToHexString(indexP);\n $ERROR('#' + hexP + ' ');\n } \n indexO = indexB;\n } \n }\n indexP = indexB;\n errorCount++; \n }\n}\n\nif (errorCount > 0) {\n if ((indexP - indexO) !== 0) {\n var hexP = decimalToHexString(indexP);\n var hexO = decimalToHexString(indexO);\n $ERROR('#' + hexO + '-' + hexP + ' ');\n } else {\n var hexP = decimalToHexString(indexP);\n $ERROR('#' + hexP + ' ');\n } \n $ERROR('Total error: ' + errorCount + ' bad Unicode character in ' + count + ' ');\n}\n\nfunction decimalToHexString(n) {\n n = Number(n);\n var h = \"\";\n for (var i = 3; i >= 0; i--) {\n if (n >= Math.pow(16, i)) {\n var t = Math.floor(n / Math.pow(16, i));\n n -= t * Math.pow(16, i);\n if ( t >= 10 ) {\n if ( t == 10 ) { h += \"A\"; }\n if ( t == 11 ) { h += \"B\"; }\n if ( t == 12 ) { h += \"C\"; }\n if ( t == 13 ) { h += \"D\"; }\n if ( t == 14 ) { h += \"E\"; }\n if ( t == 15 ) { h += \"F\"; }\n } else {\n h += String(t);\n }\n } else {\n h += \"0\";\n }\n }\n return h;\n}\n",
+ "id": "S15.1.3.1_A1.14_T3"
+ },
+ {
+ "section": "15.1.3.1",
+ "description": "Complex tests. B = [0xE0 - 0xEF], C = [0xC0, 0xFF]",
+ "test": "var errorCount = 0;\nvar count = 0;\nvar indexP;\nvar indexO = 0;\n\nfor (var indexB = 0xE0; indexB <= 0xEF; indexB++) {\n count++; \n var hexB = decimalToHexString(indexB); \n var result = true;\n for (var indexC = 0xC0; indexC <= 0xFF; indexC++) {\n var hexC = decimalToHexString(indexC); \n try {\n decodeURI(\"%\" + hexB.substring(2) + \"%A0\" + \"%\" + hexC.substring(2));\n } catch (e) { \n if ((e instanceof URIError) === true) continue; \n }\n result = false;\n }\n if (result !== true) {\n if (indexO === 0) { \n indexO = indexB;\n } else {\n if ((indexB - indexP) !== 1) { \n if ((indexP - indexO) !== 0) {\n var hexP = decimalToHexString(indexP);\n var hexO = decimalToHexString(indexO);\n $ERROR('#' + hexO + '-' + hexP + ' ');\n } \n else {\n var hexP = decimalToHexString(indexP);\n $ERROR('#' + hexP + ' ');\n } \n indexO = indexB;\n } \n }\n indexP = indexB;\n errorCount++; \n }\n}\n\nif (errorCount > 0) {\n if ((indexP - indexO) !== 0) {\n var hexP = decimalToHexString(indexP);\n var hexO = decimalToHexString(indexO);\n $ERROR('#' + hexO + '-' + hexP + ' ');\n } else {\n var hexP = decimalToHexString(indexP);\n $ERROR('#' + hexP + ' ');\n } \n $ERROR('Total error: ' + errorCount + ' bad Unicode character in ' + count + ' ');\n}\n\nfunction decimalToHexString(n) {\n n = Number(n);\n var h = \"\";\n for (var i = 3; i >= 0; i--) {\n if (n >= Math.pow(16, i)) {\n var t = Math.floor(n / Math.pow(16, i));\n n -= t * Math.pow(16, i);\n if ( t >= 10 ) {\n if ( t == 10 ) { h += \"A\"; }\n if ( t == 11 ) { h += \"B\"; }\n if ( t == 12 ) { h += \"C\"; }\n if ( t == 13 ) { h += \"D\"; }\n if ( t == 14 ) { h += \"E\"; }\n if ( t == 15 ) { h += \"F\"; }\n } else {\n h += String(t);\n }\n } else {\n h += \"0\";\n }\n }\n return h;\n}\n",
+ "id": "S15.1.3.1_A1.14_T4"
+ },
+ {
+ "section": "15.1.3.1",
+ "description": "Complex tests. B = [0xF0 - 0x0F7], C = [0x00, 0x7F]",
+ "test": "var errorCount = 0;\nvar count = 0;\nvar indexP;\nvar indexO = 0;\n\nfor (var indexB = 0xF0; indexB <= 0xF7; indexB++) {\n count++; \n var hexB = decimalToHexString(indexB); \n var result = true;\n for (var indexC = 0x00; indexC <= 0x7F; indexC++) {\n var hexC = decimalToHexString(indexC); \n try {\n decodeURI(\"%\" + hexB.substring(2) + \"%\" + hexC.substring(2) + \"%A0%A0\");\n } catch (e) { \n if ((e instanceof URIError) === true) continue; \n }\n result = false;\n }\n if (result !== true) {\n if (indexO === 0) { \n indexO = indexB;\n } else {\n if ((indexB - indexP) !== 1) { \n if ((indexP - indexO) !== 0) {\n var hexP = decimalToHexString(indexP);\n var hexO = decimalToHexString(indexO);\n $ERROR('#' + hexO + '-' + hexP + ' ');\n } \n else {\n var hexP = decimalToHexString(indexP);\n $ERROR('#' + hexP + ' ');\n } \n indexO = indexB;\n } \n }\n indexP = indexB;\n errorCount++; \n }\n}\n\nif (errorCount > 0) {\n if ((indexP - indexO) !== 0) {\n var hexP = decimalToHexString(indexP);\n var hexO = decimalToHexString(indexO);\n $ERROR('#' + hexO + '-' + hexP + ' ');\n } else {\n var hexP = decimalToHexString(indexP);\n $ERROR('#' + hexP + ' ');\n } \n $ERROR('Total error: ' + errorCount + ' bad Unicode character in ' + count + ' ');\n}\n\nfunction decimalToHexString(n) {\n n = Number(n);\n var h = \"\";\n for (var i = 3; i >= 0; i--) {\n if (n >= Math.pow(16, i)) {\n var t = Math.floor(n / Math.pow(16, i));\n n -= t * Math.pow(16, i);\n if ( t >= 10 ) {\n if ( t == 10 ) { h += \"A\"; }\n if ( t == 11 ) { h += \"B\"; }\n if ( t == 12 ) { h += \"C\"; }\n if ( t == 13 ) { h += \"D\"; }\n if ( t == 14 ) { h += \"E\"; }\n if ( t == 15 ) { h += \"F\"; }\n } else {\n h += String(t);\n }\n } else {\n h += \"0\";\n }\n }\n return h;\n}\n",
+ "id": "S15.1.3.1_A1.15_T1"
+ },
+ {
+ "section": "15.1.3.1",
+ "description": "Complex tests. B = [0xF0 - 0x0F7], C = [0x00, 0x7F]",
+ "test": "var errorCount = 0;\nvar count = 0;\nvar indexP;\nvar indexO = 0;\n\nfor (var indexB = 0xF0; indexB <= 0xF7; indexB++) {\n count++; \n var hexB = decimalToHexString(indexB); \n var result = true;\n for (var indexC = 0x00; indexC <= 0x7F; indexC++) {\n var hexC = decimalToHexString(indexC); \n try {\n decodeURI(\"%\" + hexB.substring(2) + \"%A0\" + \"%\" + hexC.substring(2) + \"%A0\");\n } catch (e) { \n if ((e instanceof URIError) === true) continue; \n }\n result = false;\n }\n if (result !== true) {\n if (indexO === 0) { \n indexO = indexB;\n } else {\n if ((indexB - indexP) !== 1) { \n if ((indexP - indexO) !== 0) {\n var hexP = decimalToHexString(indexP);\n var hexO = decimalToHexString(indexO);\n $ERROR('#' + hexO + '-' + hexP + ' ');\n } \n else {\n var hexP = decimalToHexString(indexP);\n $ERROR('#' + hexP + ' ');\n } \n indexO = indexB;\n } \n }\n indexP = indexB;\n errorCount++; \n }\n}\n\nif (errorCount > 0) {\n if ((indexP - indexO) !== 0) {\n var hexP = decimalToHexString(indexP);\n var hexO = decimalToHexString(indexO);\n $ERROR('#' + hexO + '-' + hexP + ' ');\n } else {\n var hexP = decimalToHexString(indexP);\n $ERROR('#' + hexP + ' ');\n } \n $ERROR('Total error: ' + errorCount + ' bad Unicode character in ' + count + ' ');\n}\n\nfunction decimalToHexString(n) {\n n = Number(n);\n var h = \"\";\n for (var i = 3; i >= 0; i--) {\n if (n >= Math.pow(16, i)) {\n var t = Math.floor(n / Math.pow(16, i));\n n -= t * Math.pow(16, i);\n if ( t >= 10 ) {\n if ( t == 10 ) { h += \"A\"; }\n if ( t == 11 ) { h += \"B\"; }\n if ( t == 12 ) { h += \"C\"; }\n if ( t == 13 ) { h += \"D\"; }\n if ( t == 14 ) { h += \"E\"; }\n if ( t == 15 ) { h += \"F\"; }\n } else {\n h += String(t);\n }\n } else {\n h += \"0\";\n }\n }\n return h;\n}\n",
+ "id": "S15.1.3.1_A1.15_T2"
+ },
+ {
+ "section": "15.1.3.1",
+ "description": "Complex tests. B = [0xF0 - 0x0F7], C = [0x00, 0x7F]",
+ "test": "var errorCount = 0;\nvar count = 0;\nvar indexP;\nvar indexO = 0;\n\nfor (var indexB = 0xF0; indexB <= 0xF7; indexB++) {\n count++; \n var hexB = decimalToHexString(indexB); \n var result = true;\n for (var indexC = 0x00; indexC <= 0x7F; indexC++) {\n var hexC = decimalToHexString(indexC); \n try {\n decodeURI(\"%\" + hexB.substring(2) + \"%A0%A0\" + \"%\" + hexC.substring(2));\n } catch (e) { \n if ((e instanceof URIError) === true) continue; \n }\n result = false;\n }\n if (result !== true) {\n if (indexO === 0) { \n indexO = indexB;\n } else {\n if ((indexB - indexP) !== 1) { \n if ((indexP - indexO) !== 0) {\n var hexP = decimalToHexString(indexP);\n var hexO = decimalToHexString(indexO);\n $ERROR('#' + hexO + '-' + hexP + ' ');\n } \n else {\n var hexP = decimalToHexString(indexP);\n $ERROR('#' + hexP + ' ');\n } \n indexO = indexB;\n } \n }\n indexP = indexB;\n errorCount++; \n }\n}\n\nif (errorCount > 0) {\n if ((indexP - indexO) !== 0) {\n var hexP = decimalToHexString(indexP);\n var hexO = decimalToHexString(indexO);\n $ERROR('#' + hexO + '-' + hexP + ' ');\n } else {\n var hexP = decimalToHexString(indexP);\n $ERROR('#' + hexP + ' ');\n } \n $ERROR('Total error: ' + errorCount + ' bad Unicode character in ' + count + ' ');\n}\n\nfunction decimalToHexString(n) {\n n = Number(n);\n var h = \"\";\n for (var i = 3; i >= 0; i--) {\n if (n >= Math.pow(16, i)) {\n var t = Math.floor(n / Math.pow(16, i));\n n -= t * Math.pow(16, i);\n if ( t >= 10 ) {\n if ( t == 10 ) { h += \"A\"; }\n if ( t == 11 ) { h += \"B\"; }\n if ( t == 12 ) { h += \"C\"; }\n if ( t == 13 ) { h += \"D\"; }\n if ( t == 14 ) { h += \"E\"; }\n if ( t == 15 ) { h += \"F\"; }\n } else {\n h += String(t);\n }\n } else {\n h += \"0\";\n }\n }\n return h;\n}\n",
+ "id": "S15.1.3.1_A1.15_T3"
+ },
+ {
+ "section": "15.1.3.1",
+ "description": "Complex tests. B = [0xF0 - 0x0F7], C = [0xC0, 0xFF]",
+ "test": "var errorCount = 0;\nvar count = 0;\nvar indexP;\nvar indexO = 0;\n\nfor (var indexB = 0xF0; indexB <= 0xF7; indexB++) {\n count++; \n var hexB = decimalToHexString(indexB); \n var result = true;\n for (var indexC = 0xC0; indexC <= 0xFF; indexC++) {\n var hexC = decimalToHexString(indexC); \n try {\n decodeURI(\"%\" + hexB.substring(2) + \"%\" + hexC.substring(2) + \"%A0%A0\");\n } catch (e) { \n if ((e instanceof URIError) === true) continue; \n }\n result = false;\n }\n if (result !== true) {\n if (indexO === 0) { \n indexO = indexB;\n } else {\n if ((indexB - indexP) !== 1) { \n if ((indexP - indexO) !== 0) {\n var hexP = decimalToHexString(indexP);\n var hexO = decimalToHexString(indexO);\n $ERROR('#' + hexO + '-' + hexP + ' ');\n } \n else {\n var hexP = decimalToHexString(indexP);\n $ERROR('#' + hexP + ' ');\n } \n indexO = indexB;\n } \n }\n indexP = indexB;\n errorCount++; \n }\n}\n\nif (errorCount > 0) {\n if ((indexP - indexO) !== 0) {\n var hexP = decimalToHexString(indexP);\n var hexO = decimalToHexString(indexO);\n $ERROR('#' + hexO + '-' + hexP + ' ');\n } else {\n var hexP = decimalToHexString(indexP);\n $ERROR('#' + hexP + ' ');\n } \n $ERROR('Total error: ' + errorCount + ' bad Unicode character in ' + count + ' ');\n}\n\nfunction decimalToHexString(n) {\n n = Number(n);\n var h = \"\";\n for (var i = 3; i >= 0; i--) {\n if (n >= Math.pow(16, i)) {\n var t = Math.floor(n / Math.pow(16, i));\n n -= t * Math.pow(16, i);\n if ( t >= 10 ) {\n if ( t == 10 ) { h += \"A\"; }\n if ( t == 11 ) { h += \"B\"; }\n if ( t == 12 ) { h += \"C\"; }\n if ( t == 13 ) { h += \"D\"; }\n if ( t == 14 ) { h += \"E\"; }\n if ( t == 15 ) { h += \"F\"; }\n } else {\n h += String(t);\n }\n } else {\n h += \"0\";\n }\n }\n return h;\n}\n",
+ "id": "S15.1.3.1_A1.15_T4"
+ },
+ {
+ "section": "15.1.3.1",
+ "description": "Complex tests. B = [0xF0 - 0x0F7], C = [0xC0, 0xFF]",
+ "test": "var errorCount = 0;\nvar count = 0;\nvar indexP;\nvar indexO = 0;\n\nfor (var indexB = 0xF0; indexB <= 0xF7; indexB++) {\n count++; \n var hexB = decimalToHexString(indexB); \n var result = true;\n for (var indexC = 0xC0; indexC <= 0xFF; indexC++) {\n var hexC = decimalToHexString(indexC); \n try {\n decodeURI(\"%\" + hexB.substring(2) + \"%A0\" + \"%\" + hexC.substring(2) + \"%A0\");\n } catch (e) { \n if ((e instanceof URIError) === true) continue; \n }\n result = false;\n }\n if (result !== true) {\n if (indexO === 0) { \n indexO = indexB;\n } else {\n if ((indexB - indexP) !== 1) { \n if ((indexP - indexO) !== 0) {\n var hexP = decimalToHexString(indexP);\n var hexO = decimalToHexString(indexO);\n $ERROR('#' + hexO + '-' + hexP + ' ');\n } \n else {\n var hexP = decimalToHexString(indexP);\n $ERROR('#' + hexP + ' ');\n } \n indexO = indexB;\n } \n }\n indexP = indexB;\n errorCount++; \n }\n}\n\nif (errorCount > 0) {\n if ((indexP - indexO) !== 0) {\n var hexP = decimalToHexString(indexP);\n var hexO = decimalToHexString(indexO);\n $ERROR('#' + hexO + '-' + hexP + ' ');\n } else {\n var hexP = decimalToHexString(indexP);\n $ERROR('#' + hexP + ' ');\n } \n $ERROR('Total error: ' + errorCount + ' bad Unicode character in ' + count + ' ');\n}\n\nfunction decimalToHexString(n) {\n n = Number(n);\n var h = \"\";\n for (var i = 3; i >= 0; i--) {\n if (n >= Math.pow(16, i)) {\n var t = Math.floor(n / Math.pow(16, i));\n n -= t * Math.pow(16, i);\n if ( t >= 10 ) {\n if ( t == 10 ) { h += \"A\"; }\n if ( t == 11 ) { h += \"B\"; }\n if ( t == 12 ) { h += \"C\"; }\n if ( t == 13 ) { h += \"D\"; }\n if ( t == 14 ) { h += \"E\"; }\n if ( t == 15 ) { h += \"F\"; }\n } else {\n h += String(t);\n }\n } else {\n h += \"0\";\n }\n }\n return h;\n}\n",
+ "id": "S15.1.3.1_A1.15_T5"
+ },
+ {
+ "section": "15.1.3.1",
+ "description": "Complex tests. B = [0xF0 - 0x0F7], C = [0xC0, 0xFF]",
+ "test": "var errorCount = 0;\nvar count = 0;\nvar indexP;\nvar indexO = 0;\n\nfor (var indexB = 0xF0; indexB <= 0xF7; indexB++) {\n count++; \n var hexB = decimalToHexString(indexB); \n var result = true;\n for (var indexC = 0xC0; indexC <= 0xFF; indexC++) {\n var hexC = decimalToHexString(indexC); \n try {\n decodeURI(\"%\" + hexB.substring(2) + \"%A0%A0\" + \"%\" + hexC.substring(2));\n } catch (e) { \n if ((e instanceof URIError) === true) continue; \n }\n result = false;\n }\n if (result !== true) {\n if (indexO === 0) { \n indexO = indexB;\n } else {\n if ((indexB - indexP) !== 1) { \n if ((indexP - indexO) !== 0) {\n var hexP = decimalToHexString(indexP);\n var hexO = decimalToHexString(indexO);\n $ERROR('#' + hexO + '-' + hexP + ' ');\n } \n else {\n var hexP = decimalToHexString(indexP);\n $ERROR('#' + hexP + ' ');\n } \n indexO = indexB;\n } \n }\n indexP = indexB;\n errorCount++; \n }\n}\n\nif (errorCount > 0) {\n if ((indexP - indexO) !== 0) {\n var hexP = decimalToHexString(indexP);\n var hexO = decimalToHexString(indexO);\n $ERROR('#' + hexO + '-' + hexP + ' ');\n } else {\n var hexP = decimalToHexString(indexP);\n $ERROR('#' + hexP + ' ');\n } \n $ERROR('Total error: ' + errorCount + ' bad Unicode character in ' + count + ' ');\n}\n\nfunction decimalToHexString(n) {\n n = Number(n);\n var h = \"\";\n for (var i = 3; i >= 0; i--) {\n if (n >= Math.pow(16, i)) {\n var t = Math.floor(n / Math.pow(16, i));\n n -= t * Math.pow(16, i);\n if ( t >= 10 ) {\n if ( t == 10 ) { h += \"A\"; }\n if ( t == 11 ) { h += \"B\"; }\n if ( t == 12 ) { h += \"C\"; }\n if ( t == 13 ) { h += \"D\"; }\n if ( t == 14 ) { h += \"E\"; }\n if ( t == 15 ) { h += \"F\"; }\n } else {\n h += String(t);\n }\n } else {\n h += \"0\";\n }\n }\n return h;\n}\n",
+ "id": "S15.1.3.1_A1.15_T6"
+ },
+ {
+ "section": "15.1.3.1",
+ "description": "Complex tests",
+ "test": "var result = true;\n\n//CHECK#1\ntry {\n decodeURI(\"%\");\n result = false;\n} catch(e) {\n if ((e instanceof URIError) !== true) {\n result = false;\n }\n}\n\n//CHECK#2\ntry {\n decodeURI(\"%A\");\n result = false;\n} catch(e) {\n if ((e instanceof URIError) !== true) {\n result = false;\n }\n}\n\n//CHECK#3\ntry {\n decodeURI(\"%1\");\n result = false;\n} catch(e) {\n if ((e instanceof URIError) !== true) {\n result = false;\n }\n}\n\n//CHECK#4\ntry {\n decodeURI(\"% \");\n result = false;\n} catch(e) {\n if ((e instanceof URIError) !== true) {\n result = false;\n }\n}\n\nif (result !== true) {\n $ERROR('#1: If string.charAt(k) equal \"%\" and k + 2 >= string.length, throw URIError');\n}\n\n\n\n",
+ "id": "S15.1.3.1_A1.1_T1"
+ },
+ {
+ "section": "15.1.3.1",
+ "description": "Complex tests",
+ "test": "//CHECK\nvar result = true;\nvar interval = [[0x00, 0x29], [0x40,0x40], [0x47, 0x60], [0x67, 0xFFFF]];\nfor (var indexI = 0; indexI < interval.length; indexI++) {\n for (var indexJ = interval[indexI][0]; indexJ <= interval[indexI][1]; indexJ++) {\n try {\n decodeURI(\"%\" + String.fromCharCode(indexJ) + \"1\");\n result = false;\n } catch (e) { \n if ((e instanceof URIError) !== true) {\n result = false;\n }\n } \n } \n} \n\nif (result !== true) { \n $ERROR('#1: If string.charAt(k+1) does not represent hexadecimal digits, throw URIError');\n}\n",
+ "id": "S15.1.3.1_A1.2_T1"
+ },
+ {
+ "section": "15.1.3.1",
+ "description": "Complex tests",
+ "test": "//CHECK\nvar result = true;\nvar interval = [[0x00, 0x29], [0x40,0x40], [0x47, 0x60], [0x67, 0xFFFF]];\nfor (var indexI = 0; indexI < interval.length; indexI++) {\n for (var indexJ = interval[indexI][0]; indexJ <= interval[indexI][1]; indexJ++) {\n try {\n decodeURI(\"%\" + \"1\" + String.fromCharCode(indexJ));\n result = false;\n } catch (e) { \n if ((e instanceof URIError) !== true) {\n result = false;\n }\n } \n } \n} \n\nif (result !== true) { \n $ERROR('#1: If string.charAt(k+2) does not represent hexadecimal digits, throw URIError');\n}\n",
+ "id": "S15.1.3.1_A1.2_T2"
+ },
+ {
+ "section": "15.1.3.1",
+ "description": "Complex tests. B = 10xxxxxx -> B in [0x80 - 0xBF]",
+ "test": "var errorCount = 0;\nvar count = 0;\nvar indexP;\nvar indexO = 0;\n\nfor (var index = 0x80; index <= 0xBF; index++) {\n count++; \n var hex = decimalToHexString(index);\n try {\n decodeURI(\"%\" + hex.substring(2));\n } catch (e) { \n if ((e instanceof URIError) === true) continue; \n }\n if (indexO === 0) { \n indexO = index;\n } else {\n if ((index - indexP) !== 1) { \n if ((indexP - indexO) !== 0) {\n var hexP = decimalToHexString(indexP);\n var hexO = decimalToHexString(indexO);\n $ERROR('#' + hexO + '-' + hexP + ' ');\n } \n else {\n var hexP = decimalToHexString(indexP);\n $ERROR('#' + hexP + ' ');\n } \n indexO = index;\n } \n }\n indexP = index;\n errorCount++; \n}\n\nif (errorCount > 0) {\n if ((indexP - indexO) !== 0) {\n var hexP = decimalToHexString(indexP);\n var hexO = decimalToHexString(indexO);\n $ERROR('#' + hexO + '-' + hexP + ' ');\n } else {\n var hexP = decimalToHexString(indexP);\n $ERROR('#' + hexP + ' ');\n } \n $ERROR('Total error: ' + errorCount + ' bad Unicode character in ' + count + ' ');\n}\n\nfunction decimalToHexString(n) {\n n = Number(n);\n var h = \"\";\n for (var i = 3; i >= 0; i--) {\n if (n >= Math.pow(16, i)) {\n var t = Math.floor(n / Math.pow(16, i));\n n -= t * Math.pow(16, i);\n if ( t >= 10 ) {\n if ( t == 10 ) { h += \"A\"; }\n if ( t == 11 ) { h += \"B\"; }\n if ( t == 12 ) { h += \"C\"; }\n if ( t == 13 ) { h += \"D\"; }\n if ( t == 14 ) { h += \"E\"; }\n if ( t == 15 ) { h += \"F\"; }\n } else {\n h += String(t);\n }\n } else {\n h += \"0\";\n }\n }\n return h;\n}\n",
+ "id": "S15.1.3.1_A1.3_T1"
+ },
+ {
+ "section": "15.1.3.1",
+ "description": "Complex tests. B = 11111xxx -> B in [0xF8 - 0xFF]",
+ "test": "var errorCount = 0;\nvar count = 0;\nvar indexP;\nvar indexO = 0;\n\nfor (var index = 0xF8; index <= 0xFF; index++) {\n count++; \n var hex = decimalToHexString(index);\n try {\n decodeURI(\"%\" + hex.substring(2));\n } catch (e) { \n if ((e instanceof URIError) === true) continue; \n }\n if (indexO === 0) { \n indexO = index;\n } else {\n if ((index - indexP) !== 1) { \n if ((indexP - indexO) !== 0) {\n var hexP = decimalToHexString(indexP);\n var hexO = decimalToHexString(indexO);\n $ERROR('#' + hexO + '-' + hexP + ' ');\n } \n else {\n var hexP = decimalToHexString(indexP);\n $ERROR('#' + hexP + ' ');\n } \n indexO = index;\n } \n }\n indexP = index;\n errorCount++; \n}\n\nif (errorCount > 0) {\n if ((indexP - indexO) !== 0) {\n var hexP = decimalToHexString(indexP);\n var hexO = decimalToHexString(indexO);\n $ERROR('#' + hexO + '-' + hexP + ' ');\n } else {\n var hexP = decimalToHexString(indexP);\n $ERROR('#' + hexP + ' ');\n } \n $ERROR('Total error: ' + errorCount + ' bad Unicode character in ' + count + ' ');\n}\n\nfunction decimalToHexString(n) {\n n = Number(n);\n var h = \"\";\n for (var i = 3; i >= 0; i--) {\n if (n >= Math.pow(16, i)) {\n var t = Math.floor(n / Math.pow(16, i));\n n -= t * Math.pow(16, i);\n if ( t >= 10 ) {\n if ( t == 10 ) { h += \"A\"; }\n if ( t == 11 ) { h += \"B\"; }\n if ( t == 12 ) { h += \"C\"; }\n if ( t == 13 ) { h += \"D\"; }\n if ( t == 14 ) { h += \"E\"; }\n if ( t == 15 ) { h += \"F\"; }\n } else {\n h += String(t);\n }\n } else {\n h += \"0\";\n }\n }\n return h;\n}\n",
+ "id": "S15.1.3.1_A1.3_T2"
+ },
+ {
+ "section": "15.1.3.1",
+ "description": "Complex tests. B = [0xC0 - 0xDF]",
+ "test": "var errorCount = 0;\nvar count = 0;\nvar indexP;\nvar indexO = 0;\n\nfor (var index = 0xC0; index <= 0xDF; index++) {\n count++; \n var str = \"\";\n var result = true;\n for (var len = 0; len < 3; len++) {\n var hex = decimalToHexString(index);\n try {\n decodeURI(\"%\" + hex.substring(2) + str); \n } catch (e) { \n if ((e instanceof URIError) === true) continue; \n }\n result = false;\n str = str + \"1\";\n }\n if (result !== true) {\n if (indexO === 0) { \n indexO = index;\n } else {\n if ((index - indexP) !== 1) { \n if ((indexP - indexO) !== 0) {\n var hexP = decimalToHexString(indexP);\n var hexO = decimalToHexString(indexO);\n $ERROR('#' + hexO + '-' + hexP + ' ');\n } \n else {\n var hexP = decimalToHexString(indexP);\n $ERROR('#' + hexP + ' ');\n } \n indexO = index;\n } \n }\n indexP = index;\n errorCount++; \n } \n}\n\nif (errorCount > 0) {\n if ((indexP - indexO) !== 0) {\n var hexP = decimalToHexString(indexP);\n var hexO = decimalToHexString(indexO);\n $ERROR('#' + hexO + '-' + hexP + ' ');\n } else {\n var hexP = decimalToHexString(indexP);\n $ERROR('#' + hexP + ' ');\n } \n $ERROR('Total error: ' + errorCount + ' bad Unicode character in ' + count + ' ');\n}\n\nfunction decimalToHexString(n) {\n n = Number(n);\n var h = \"\";\n for (var i = 3; i >= 0; i--) {\n if (n >= Math.pow(16, i)) {\n var t = Math.floor(n / Math.pow(16, i));\n n -= t * Math.pow(16, i);\n if ( t >= 10 ) {\n if ( t == 10 ) { h += \"A\"; }\n if ( t == 11 ) { h += \"B\"; }\n if ( t == 12 ) { h += \"C\"; }\n if ( t == 13 ) { h += \"D\"; }\n if ( t == 14 ) { h += \"E\"; }\n if ( t == 15 ) { h += \"F\"; }\n } else {\n h += String(t);\n }\n } else {\n h += \"0\";\n }\n }\n return h;\n}\n",
+ "id": "S15.1.3.1_A1.4_T1"
+ },
+ {
+ "section": "15.1.3.1",
+ "description": "Complex tests. B = [0xE0 - 0xEF]",
+ "test": "var errorCount = 0;\nvar count = 0;\nvar indexP;\nvar indexO = 0;\n\nfor (var index = 0xE0; index <= 0xEF; index++) {\n count++; \n var str = \"\";\n var result = true;\n for (var len = 0; len < 6; len++) {\n var hex = decimalToHexString(index);\n try {\n decodeURI(\"%\" + hex.substring(2) + str); \n } catch (e) { \n if ((e instanceof URIError) === true) continue; \n }\n result = false;\n str = str + \"1\";\n }\n if (result !== true) {\n if (indexO === 0) { \n indexO = index;\n } else {\n if ((index - indexP) !== 1) { \n if ((indexP - indexO) !== 0) {\n var hexP = decimalToHexString(indexP);\n var hexO = decimalToHexString(indexO);\n $ERROR('#' + hexO + '-' + hexP + ' ');\n } \n else {\n var hexP = decimalToHexString(indexP);\n $ERROR('#' + hexP + ' ');\n } \n indexO = index;\n } \n }\n indexP = index;\n errorCount++; \n } \n}\n\nif (errorCount > 0) {\n if ((indexP - indexO) !== 0) {\n var hexP = decimalToHexString(indexP);\n var hexO = decimalToHexString(indexO);\n $ERROR('#' + hexO + '-' + hexP + ' ');\n } else {\n var hexP = decimalToHexString(indexP);\n $ERROR('#' + hexP + ' ');\n } \n $ERROR('Total error: ' + errorCount + ' bad Unicode character in ' + count + ' ');\n}\n\nfunction decimalToHexString(n) {\n n = Number(n);\n var h = \"\";\n for (var i = 3; i >= 0; i--) {\n if (n >= Math.pow(16, i)) {\n var t = Math.floor(n / Math.pow(16, i));\n n -= t * Math.pow(16, i);\n if ( t >= 10 ) {\n if ( t == 10 ) { h += \"A\"; }\n if ( t == 11 ) { h += \"B\"; }\n if ( t == 12 ) { h += \"C\"; }\n if ( t == 13 ) { h += \"D\"; }\n if ( t == 14 ) { h += \"E\"; }\n if ( t == 15 ) { h += \"F\"; }\n } else {\n h += String(t);\n }\n } else {\n h += \"0\";\n }\n }\n return h;\n}\n",
+ "id": "S15.1.3.1_A1.5_T1"
+ },
+ {
+ "section": "15.1.3.1",
+ "description": "Complex tests. B = [0xF0 - 0xF7]",
+ "test": "var errorCount = 0;\nvar count = 0;\nvar indexP;\nvar indexO = 0;\n\nfor (var index = 0xF0; index <= 0xF7; index++) {\n count++; \n var str = \"\";\n var result = true;\n for (var len = 0; len < 9; len++) {\n var hex = decimalToHexString(index);\n try {\n decodeURI(\"%\" + hex.substring(2) + str); \n } catch (e) { \n if ((e instanceof URIError) === true) continue; \n }\n result = false;\n str = str + \"1\";\n }\n if (result !== true) {\n if (indexO === 0) { \n indexO = index;\n } else {\n if ((index - indexP) !== 1) { \n if ((indexP - indexO) !== 0) {\n var hexP = decimalToHexString(indexP);\n var hexO = decimalToHexString(indexO);\n $ERROR('#' + hexO + '-' + hexP + ' ');\n } \n else {\n var hexP = decimalToHexString(indexP);\n $ERROR('#' + hexP + ' ');\n } \n indexO = index;\n } \n }\n indexP = index;\n errorCount++; \n } \n}\n\nif (errorCount > 0) {\n if ((indexP - indexO) !== 0) {\n var hexP = decimalToHexString(indexP);\n var hexO = decimalToHexString(indexO);\n $ERROR('#' + hexO + '-' + hexP + ' ');\n } else {\n var hexP = decimalToHexString(indexP);\n $ERROR('#' + hexP + ' ');\n } \n $ERROR('Total error: ' + errorCount + ' bad Unicode character in ' + count + ' ');\n}\n\nfunction decimalToHexString(n) {\n n = Number(n);\n var h = \"\";\n for (var i = 3; i >= 0; i--) {\n if (n >= Math.pow(16, i)) {\n var t = Math.floor(n / Math.pow(16, i));\n n -= t * Math.pow(16, i);\n if ( t >= 10 ) {\n if ( t == 10 ) { h += \"A\"; }\n if ( t == 11 ) { h += \"B\"; }\n if ( t == 12 ) { h += \"C\"; }\n if ( t == 13 ) { h += \"D\"; }\n if ( t == 14 ) { h += \"E\"; }\n if ( t == 15 ) { h += \"F\"; }\n } else {\n h += String(t);\n }\n } else {\n h += \"0\";\n }\n }\n return h;\n}\n",
+ "id": "S15.1.3.1_A1.6_T1"
+ },
+ {
+ "section": "15.1.3.1",
+ "description": "Complex tests. B = [0xC0 - 0xDF]",
+ "test": "var errorCount = 0;\nvar count = 0;\nvar indexP;\nvar indexO = 0;\n\nfor (var index = 0xC0; index <= 0xDF; index++) {\n count++; \n var hex = decimalToHexString(index);\n try {\n decodeURI(\"%\" + hex.substring(2) + \"111\");\n } catch (e) { \n if ((e instanceof URIError) === true) continue; \n }\n if (indexO === 0) { \n indexO = index;\n } else {\n if ((index - indexP) !== 1) { \n if ((indexP - indexO) !== 0) {\n var hexP = decimalToHexString(indexP);\n var hexO = decimalToHexString(indexO);\n $ERROR('#' + hexO + '-' + hexP + ' ');\n } \n else {\n var hexP = decimalToHexString(indexP);\n $ERROR('#' + hexP + ' ');\n } \n indexO = index;\n } \n }\n indexP = index;\n errorCount++; \n}\n\nif (errorCount > 0) {\n if ((indexP - indexO) !== 0) {\n var hexP = decimalToHexString(indexP);\n var hexO = decimalToHexString(indexO);\n $ERROR('#' + hexO + '-' + hexP + ' ');\n } else {\n var hexP = decimalToHexString(indexP);\n $ERROR('#' + hexP + ' ');\n } \n $ERROR('Total error: ' + errorCount + ' bad Unicode character in ' + count + ' ');\n}\n\nfunction decimalToHexString(n) {\n n = Number(n);\n var h = \"\";\n for (var i = 3; i >= 0; i--) {\n if (n >= Math.pow(16, i)) {\n var t = Math.floor(n / Math.pow(16, i));\n n -= t * Math.pow(16, i);\n if ( t >= 10 ) {\n if ( t == 10 ) { h += \"A\"; }\n if ( t == 11 ) { h += \"B\"; }\n if ( t == 12 ) { h += \"C\"; }\n if ( t == 13 ) { h += \"D\"; }\n if ( t == 14 ) { h += \"E\"; }\n if ( t == 15 ) { h += \"F\"; }\n } else {\n h += String(t);\n }\n } else {\n h += \"0\";\n }\n }\n return h;\n}\n",
+ "id": "S15.1.3.1_A1.7_T1"
+ },
+ {
+ "section": "15.1.3.1",
+ "description": "Complex tests. B = [0xE0 - 0xEF],\nstring.charAt(k + 3) not equal \"%\"",
+ "test": "var errorCount = 0;\nvar count = 0;\nvar indexP;\nvar indexO = 0;\n\nfor (var index = 0xE0; index <= 0xEF; index++) {\n count++; \n var hex = decimalToHexString(index);\n try {\n decodeURI(\"%\" + hex.substring(2) + \"111%A0\");\n } catch (e) { \n if ((e instanceof URIError) === true) continue; \n }\n if (indexO === 0) { \n indexO = index;\n } else {\n if ((index - indexP) !== 1) { \n if ((indexP - indexO) !== 0) {\n var hexP = decimalToHexString(indexP);\n var hexO = decimalToHexString(indexO);\n $ERROR('#' + hexO + '-' + hexP + ' ');\n } \n else {\n var hexP = decimalToHexString(indexP);\n $ERROR('#' + hexP + ' ');\n } \n indexO = index;\n } \n }\n indexP = index;\n errorCount++; \n}\n\nif (errorCount > 0) {\n if ((indexP - indexO) !== 0) {\n var hexP = decimalToHexString(indexP);\n var hexO = decimalToHexString(indexO);\n $ERROR('#' + hexO + '-' + hexP + ' ');\n } else {\n var hexP = decimalToHexString(indexP);\n $ERROR('#' + hexP + ' ');\n } \n $ERROR('Total error: ' + errorCount + ' bad Unicode character in ' + count + ' ');\n}\n\nfunction decimalToHexString(n) {\n n = Number(n);\n var h = \"\";\n for (var i = 3; i >= 0; i--) {\n if (n >= Math.pow(16, i)) {\n var t = Math.floor(n / Math.pow(16, i));\n n -= t * Math.pow(16, i);\n if ( t >= 10 ) {\n if ( t == 10 ) { h += \"A\"; }\n if ( t == 11 ) { h += \"B\"; }\n if ( t == 12 ) { h += \"C\"; }\n if ( t == 13 ) { h += \"D\"; }\n if ( t == 14 ) { h += \"E\"; }\n if ( t == 15 ) { h += \"F\"; }\n } else {\n h += String(t);\n }\n } else {\n h += \"0\";\n }\n }\n return h;\n}\n",
+ "id": "S15.1.3.1_A1.8_T1"
+ },
+ {
+ "section": "15.1.3.1",
+ "description": "Complex tests. B = [0xE0 - 0xEF],\nstring.charAt(k + 6) not equal \"%\"",
+ "test": "var errorCount = 0;\nvar count = 0;\nvar indexP;\nvar indexO = 0;\n\nfor (var index = 0xE0; index <= 0xEF; index++) {\n count++; \n var hex = decimalToHexString(index);\n try {\n decodeURI(\"%\" + hex.substring(2) + \"%A0111\");\n } catch (e) { \n if ((e instanceof URIError) === true) continue; \n }\n if (indexO === 0) { \n indexO = index;\n } else {\n if ((index - indexP) !== 1) { \n if ((indexP - indexO) !== 0) {\n var hexP = decimalToHexString(indexP);\n var hexO = decimalToHexString(indexO);\n $ERROR('#' + hexO + '-' + hexP + ' ');\n } \n else {\n var hexP = decimalToHexString(indexP);\n $ERROR('#' + hexP + ' ');\n } \n indexO = index;\n } \n }\n indexP = index;\n errorCount++; \n}\n\nif (errorCount > 0) {\n if ((indexP - indexO) !== 0) {\n var hexP = decimalToHexString(indexP);\n var hexO = decimalToHexString(indexO);\n $ERROR('#' + hexO + '-' + hexP + ' ');\n } else {\n var hexP = decimalToHexString(indexP);\n $ERROR('#' + hexP + ' ');\n } \n $ERROR('Total error: ' + errorCount + ' bad Unicode character in ' + count + ' ');\n}\n\nfunction decimalToHexString(n) {\n n = Number(n);\n var h = \"\";\n for (var i = 3; i >= 0; i--) {\n if (n >= Math.pow(16, i)) {\n var t = Math.floor(n / Math.pow(16, i));\n n -= t * Math.pow(16, i);\n if ( t >= 10 ) {\n if ( t == 10 ) { h += \"A\"; }\n if ( t == 11 ) { h += \"B\"; }\n if ( t == 12 ) { h += \"C\"; }\n if ( t == 13 ) { h += \"D\"; }\n if ( t == 14 ) { h += \"E\"; }\n if ( t == 15 ) { h += \"F\"; }\n } else {\n h += String(t);\n }\n } else {\n h += \"0\";\n }\n }\n return h;\n}\n",
+ "id": "S15.1.3.1_A1.8_T2"
+ },
+ {
+ "section": "15.1.3.1",
+ "description": "Complex tests. B = [0xF0 - 0x0F7],\nstring.charAt(k + 3) not equal \"%\"",
+ "test": "var errorCount = 0;\nvar count = 0;\nvar indexP;\nvar indexO = 0;\n\nfor (var index = 0xF0; index <= 0xF7; index++) {\n count++; \n var hex = decimalToHexString(index);\n try {\n decodeURI(\"%\" + hex.substring(2) + \"111%A0%A0\");\n } catch (e) { \n if ((e instanceof URIError) === true) continue; \n }\n if (indexO === 0) { \n indexO = index;\n } else {\n if ((index - indexP) !== 1) { \n if ((indexP - indexO) !== 0) {\n var hexP = decimalToHexString(indexP);\n var hexO = decimalToHexString(indexO);\n $ERROR('#' + hexO + '-' + hexP + ' ');\n } \n else {\n var hexP = decimalToHexString(indexP);\n $ERROR('#' + hexP + ' ');\n } \n indexO = index;\n } \n }\n indexP = index;\n errorCount++; \n}\n\nif (errorCount > 0) {\n if ((indexP - indexO) !== 0) {\n var hexP = decimalToHexString(indexP);\n var hexO = decimalToHexString(indexO);\n $ERROR('#' + hexO + '-' + hexP + ' ');\n } else {\n var hexP = decimalToHexString(indexP);\n $ERROR('#' + hexP + ' ');\n } \n $ERROR('Total error: ' + errorCount + ' bad Unicode character in ' + count + ' ');\n}\n\nfunction decimalToHexString(n) {\n n = Number(n);\n var h = \"\";\n for (var i = 3; i >= 0; i--) {\n if (n >= Math.pow(16, i)) {\n var t = Math.floor(n / Math.pow(16, i));\n n -= t * Math.pow(16, i);\n if ( t >= 10 ) {\n if ( t == 10 ) { h += \"A\"; }\n if ( t == 11 ) { h += \"B\"; }\n if ( t == 12 ) { h += \"C\"; }\n if ( t == 13 ) { h += \"D\"; }\n if ( t == 14 ) { h += \"E\"; }\n if ( t == 15 ) { h += \"F\"; }\n } else {\n h += String(t);\n }\n } else {\n h += \"0\";\n }\n }\n return h;\n}\n",
+ "id": "S15.1.3.1_A1.9_T1"
+ },
+ {
+ "section": "15.1.3.1",
+ "description": "Complex tests. B = [0xF0 - 0x0F7],\nstring.charAt(k + 6) not equal \"%\"",
+ "test": "var errorCount = 0;\nvar count = 0;\nvar indexP;\nvar indexO = 0;\n\nfor (var index = 0xF0; index <= 0xF7; index++) {\n count++; \n var hex = decimalToHexString(index);\n try {\n decodeURI(\"%\" + hex.substring(2) + \"%A0111%A0\");\n } catch (e) { \n if ((e instanceof URIError) === true) continue; \n }\n if (indexO === 0) { \n indexO = index;\n } else {\n if ((index - indexP) !== 1) { \n if ((indexP - indexO) !== 0) {\n var hexP = decimalToHexString(indexP);\n var hexO = decimalToHexString(indexO);\n $ERROR('#' + hexO + '-' + hexP + ' ');\n } \n else {\n var hexP = decimalToHexString(indexP);\n $ERROR('#' + hexP + ' ');\n } \n indexO = index;\n } \n }\n indexP = index;\n errorCount++; \n}\n\nif (errorCount > 0) {\n if ((indexP - indexO) !== 0) {\n var hexP = decimalToHexString(indexP);\n var hexO = decimalToHexString(indexO);\n $ERROR('#' + hexO + '-' + hexP + ' ');\n } else {\n var hexP = decimalToHexString(indexP);\n $ERROR('#' + hexP + ' ');\n } \n $ERROR('Total error: ' + errorCount + ' bad Unicode character in ' + count + ' ');\n}\n\nfunction decimalToHexString(n) {\n n = Number(n);\n var h = \"\";\n for (var i = 3; i >= 0; i--) {\n if (n >= Math.pow(16, i)) {\n var t = Math.floor(n / Math.pow(16, i));\n n -= t * Math.pow(16, i);\n if ( t >= 10 ) {\n if ( t == 10 ) { h += \"A\"; }\n if ( t == 11 ) { h += \"B\"; }\n if ( t == 12 ) { h += \"C\"; }\n if ( t == 13 ) { h += \"D\"; }\n if ( t == 14 ) { h += \"E\"; }\n if ( t == 15 ) { h += \"F\"; }\n } else {\n h += String(t);\n }\n } else {\n h += \"0\";\n }\n }\n return h;\n}\n",
+ "id": "S15.1.3.1_A1.9_T2"
+ },
+ {
+ "section": "15.1.3.1",
+ "description": "Complex tests. B = [0xF0 - 0x0F7],\nstring.charAt(k + 9) not equal \"%\"",
+ "test": "var errorCount = 0;\nvar count = 0;\nvar indexP;\nvar indexO = 0;\n\nfor (var index = 0xF0; index <= 0xF7; index++) {\n count++; \n var hex = decimalToHexString(index);\n try {\n decodeURI(\"%\" + hex.substring(2) + \"%A0%A0111\");\n } catch (e) { \n if ((e instanceof URIError) === true) continue; \n }\n if (indexO === 0) { \n indexO = index;\n } else {\n if ((index - indexP) !== 1) { \n if ((indexP - indexO) !== 0) {\n var hexP = decimalToHexString(indexP);\n var hexO = decimalToHexString(indexO);\n $ERROR('#' + hexO + '-' + hexP + ' ');\n } \n else {\n var hexP = decimalToHexString(indexP);\n $ERROR('#' + hexP + ' ');\n } \n indexO = index;\n } \n }\n indexP = index;\n errorCount++; \n}\n\nif (errorCount > 0) {\n if ((indexP - indexO) !== 0) {\n var hexP = decimalToHexString(indexP);\n var hexO = decimalToHexString(indexO);\n $ERROR('#' + hexO + '-' + hexP + ' ');\n } else {\n var hexP = decimalToHexString(indexP);\n $ERROR('#' + hexP + ' ');\n } \n $ERROR('Total error: ' + errorCount + ' bad Unicode character in ' + count + ' ');\n}\n\nfunction decimalToHexString(n) {\n n = Number(n);\n var h = \"\";\n for (var i = 3; i >= 0; i--) {\n if (n >= Math.pow(16, i)) {\n var t = Math.floor(n / Math.pow(16, i));\n n -= t * Math.pow(16, i);\n if ( t >= 10 ) {\n if ( t == 10 ) { h += \"A\"; }\n if ( t == 11 ) { h += \"B\"; }\n if ( t == 12 ) { h += \"C\"; }\n if ( t == 13 ) { h += \"D\"; }\n if ( t == 14 ) { h += \"E\"; }\n if ( t == 15 ) { h += \"F\"; }\n } else {\n h += String(t);\n }\n } else {\n h += \"0\";\n }\n }\n return h;\n}\n",
+ "id": "S15.1.3.1_A1.9_T3"
+ },
+ {
+ "section": "15.1.3.1",
+ "description": "Complex tests",
+ "test": "//CHECK\nvar errorCount = 0;\nvar count = 0;\nfor (var indexI = 0; indexI <= 65535; indexI++) {\n if (indexI !== 0x25) {\n var hex = decimalToHexString(indexI);\n try { \n var str = String.fromCharCode(indexI);\n if (decodeURI(str) !== str) { \n $ERROR('#' + hex + ' ');\n errorCount++;\n } \n } catch (e){\n $ERROR('#' + hex + ' ');\n errorCount++;\n } \n count++;\n }\n} \n\nif (errorCount > 0) { \n $ERROR('Total error: ' + errorCount + ' bad Unicode character in ' + count);\n}\n\nfunction decimalToHexString(n) {\n n = Number(n);\n var h = \"\";\n for (var i = 3; i >= 0; i--) {\n if (n >= Math.pow(16, i)) {\n var t = Math.floor(n / Math.pow(16, i));\n n -= t * Math.pow(16, i);\n if ( t >= 10 ) {\n if ( t == 10 ) { h += \"A\"; }\n if ( t == 11 ) { h += \"B\"; }\n if ( t == 12 ) { h += \"C\"; }\n if ( t == 13 ) { h += \"D\"; }\n if ( t == 14 ) { h += \"E\"; }\n if ( t == 15 ) { h += \"F\"; }\n } else {\n h += String(t);\n }\n } else {\n h += \"0\";\n }\n }\n return h;\n}\n",
+ "id": "S15.1.3.1_A2.1_T1"
+ },
+ {
+ "section": "15.1.3.1",
+ "description": "Complex tests, use RFC 3629",
+ "test": "var errorCount = 0;\nvar count = 0;\nvar indexP;\nvar indexO = 0;\nvar uriReserved = [\";\", \"/\", \"?\", \":\", \"@\", \"&\", \"=\", \"+\", \"$\", \",\"];\nl:\nfor (var indexB1 = 0x00; indexB1 <= 0x7F; indexB1++) { \n count++;\n var hexB1 = decimalToHexString(indexB1); \n var index = indexB1; \n try {\n var hex = String.fromCharCode(index);\n for (indexC = 0; indexC < uriReserved.length; indexC++) { \n if (hex === uriReserved[indexC]) continue l; \n } \n if (hex === \"#\") continue l;\n if (decodeURI(\"%\" + hexB1.substring(2)) === hex) continue;\n } catch (e) {} \n if (indexO === 0) { \n indexO = index;\n } else {\n if ((index - indexP) !== 1) { \n if ((indexP - indexO) !== 0) {\n var hexP = decimalToHexString(indexP);\n var hexO = decimalToHexString(indexO);\n $ERROR('#' + hexO + '-' + hexP + ' ');\n } \n else {\n var hexP = decimalToHexString(indexP);\n $ERROR('#' + hexP + ' ');\n } \n indexO = index;\n } \n }\n indexP = index;\n errorCount++; \n}\n\nif (errorCount > 0) {\n if ((indexP - indexO) !== 0) {\n var hexP = decimalToHexString(indexP);\n var hexO = decimalToHexString(indexO);\n $ERROR('#' + hexO + '-' + hexP + ' ');\n } else {\n var hexP = decimalToHexString(indexP);\n $ERROR('#' + hexP + ' ');\n } \n $ERROR('Total error: ' + errorCount + ' bad Unicode character in ' + count + ' ');\n}\n\nfunction decimalToHexString(n) {\n n = Number(n);\n var h = \"\";\n for (var i = 3; i >= 0; i--) {\n if (n >= Math.pow(16, i)) {\n var t = Math.floor(n / Math.pow(16, i));\n n -= t * Math.pow(16, i);\n if ( t >= 10 ) {\n if ( t == 10 ) { h += \"A\"; }\n if ( t == 11 ) { h += \"B\"; }\n if ( t == 12 ) { h += \"C\"; }\n if ( t == 13 ) { h += \"D\"; }\n if ( t == 14 ) { h += \"E\"; }\n if ( t == 15 ) { h += \"F\"; }\n } else {\n h += String(t);\n }\n } else {\n h += \"0\";\n }\n }\n return h;\n}\n",
+ "id": "S15.1.3.1_A2.2_T1"
+ },
+ {
+ "section": "15.1.3.1",
+ "description": "Complex tests, use RFC 3629",
+ "test": "var errorCount = 0;\nvar count = 0;\nvar indexP;\nvar indexO = 0;\n\nfor (var indexB1 = 0xC2; indexB1 <= 0xDF; indexB1++) { \n var hexB1 = decimalToHexString(indexB1);\n for (var indexB2 = 0x80; indexB2 <= 0xBF; indexB2++) {\n count++;\n var hexB2 = decimalToHexString(indexB2);\n var index = (indexB1 & 0x1F) * 0x40 + (indexB2 & 0x3F); \n try {\n if (decodeURI(\"%\" + hexB1.substring(2) + \"%\" + hexB2.substring(2)) === String.fromCharCode(index)) continue;\n } catch (e) {} \n if (indexO === 0) { \n indexO = index;\n } else {\n if ((index - indexP) !== 1) { \n if ((indexP - indexO) !== 0) {\n var hexP = decimalToHexString(indexP);\n var hexO = decimalToHexString(indexO);\n $ERROR('#' + hexO + '-' + hexP + ' ');\n } \n else {\n var hexP = decimalToHexString(indexP);\n $ERROR('#' + hexP + ' ');\n } \n indexO = index;\n } \n }\n indexP = index;\n errorCount++; \n }\n}\n\nif (errorCount > 0) {\n if ((indexP - indexO) !== 0) {\n var hexP = decimalToHexString(indexP);\n var hexO = decimalToHexString(indexO);\n $ERROR('#' + hexO + '-' + hexP + ' ');\n } else {\n var hexP = decimalToHexString(indexP);\n $ERROR('#' + hexP + ' ');\n } \n $ERROR('Total error: ' + errorCount + ' bad Unicode character in ' + count + ' ');\n}\n\nfunction decimalToHexString(n) {\n n = Number(n);\n var h = \"\";\n for (var i = 3; i >= 0; i--) {\n if (n >= Math.pow(16, i)) {\n var t = Math.floor(n / Math.pow(16, i));\n n -= t * Math.pow(16, i);\n if ( t >= 10 ) {\n if ( t == 10 ) { h += \"A\"; }\n if ( t == 11 ) { h += \"B\"; }\n if ( t == 12 ) { h += \"C\"; }\n if ( t == 13 ) { h += \"D\"; }\n if ( t == 14 ) { h += \"E\"; }\n if ( t == 15 ) { h += \"F\"; }\n } else {\n h += String(t);\n }\n } else {\n h += \"0\";\n }\n }\n return h;\n}\n",
+ "id": "S15.1.3.1_A2.3_T1"
+ },
+ {
+ "section": "15.1.3.1",
+ "description": "Complex tests, use RFC 3629",
+ "test": "var errorCount = 0;\nvar count = 0;\nvar indexP;\nvar indexO = 0;\n\nfor (var indexB1 = 0xE0; indexB1 <= 0xEF; indexB1++) { \n var hexB1 = decimalToHexString(indexB1);\n for (var indexB2 = 0x80; indexB2 <= 0xBF; indexB2++) {\n if ((indexB1 === 0xE0) && (indexB2 <= 0x9F)) continue;\n if ((indexB1 === 0xED) && (0xA0 <= indexB2)) continue; \n var hexB2 = decimalToHexString(indexB2);\n for (var indexB3 = 0x80; indexB3 <= 0xBF; indexB3++) {\n count++;\n var hexB3 = decimalToHexString(indexB3);\n var index = (indexB1 & 0x0F) * 0x1000 + (indexB2 & 0x3F) * 0x40 + (indexB3 & 0x3F); \n try {\n if (decodeURI(\"%\" + hexB1.substring(2) + \"%\" + hexB2.substring(2) + \"%\" + hexB3.substring(2)) === String.fromCharCode(index)) continue; \n } catch (e) {} \n if (indexO === 0) { \n indexO = index;\n } else {\n if ((index - indexP) !== 1) { \n if ((indexP - indexO) !== 0) {\n var hexP = decimalToHexString(indexP);\n var hexO = decimalToHexString(indexO);\n $ERROR('#' + hexO + '-' + hexP + ' ');\n } \n else {\n var hexP = decimalToHexString(indexP);\n $ERROR('#' + hexP + ' ');\n } \n indexO = index;\n } \n }\n indexP = index;\n errorCount++; \n } \n }\n}\n\nif (errorCount > 0) {\n if ((indexP - indexO) !== 0) {\n var hexP = decimalToHexString(indexP);\n var hexO = decimalToHexString(indexO);\n $ERROR('#' + hexO + '-' + hexP + ' ');\n } else {\n var hexP = decimalToHexString(indexP);\n $ERROR('#' + hexP + ' ');\n } \n $ERROR('Total error: ' + errorCount + ' bad Unicode character in ' + count + ' ');\n}\n\nfunction decimalToHexString(n) {\n n = Number(n);\n var h = \"\";\n for (var i = 3; i >= 0; i--) {\n if (n >= Math.pow(16, i)) {\n var t = Math.floor(n / Math.pow(16, i));\n n -= t * Math.pow(16, i);\n if ( t >= 10 ) {\n if ( t == 10 ) { h += \"A\"; }\n if ( t == 11 ) { h += \"B\"; }\n if ( t == 12 ) { h += \"C\"; }\n if ( t == 13 ) { h += \"D\"; }\n if ( t == 14 ) { h += \"E\"; }\n if ( t == 15 ) { h += \"F\"; }\n } else {\n h += String(t);\n }\n } else {\n h += \"0\";\n }\n }\n return h;\n}\n",
+ "id": "S15.1.3.1_A2.4_T1"
+ },
+ {
+ "section": "15.1.3.1",
+ "description": "Complex tests, use RFC 3629",
+ "test": "var errorCount = 0;\nvar count = 0;\nvar indexP;\nvar indexO = 0;\n\nfor (var indexB1 = 0xF0; indexB1 <= 0xF4; indexB1++) { \n var hexB1 = decimalToHexString(indexB1);\n for (var indexB2 = 0x80; indexB2 <= 0xBF; indexB2++) {\n if ((indexB1 === 0xF0) && (indexB2 <= 0x9F)) continue; \n if ((indexB1 === 0xF4) && (indexB2 >= 0x90)) continue;\n var hexB2 = decimalToHexString(indexB2);\n for (var indexB3 = 0x80; indexB3 <= 0xBF; indexB3++) {\n var hexB3 = decimalToHexString(indexB3);\n for (var indexB4 = 0x80; indexB4 <= 0xBF; indexB4++) {\n var hexB4 = decimalToHexString(indexB4);\n count++;\n var index = (indexB1 & 0x07) * 0x40000 + (indexB2 & 0x3F) * 0x1000 + (indexB3 & 0x3F) * 0x40 + (indexB4 & 0x3F);\n var L = ((index - 0x10000) & 0x03FF) + 0xDC00;\n var H = (((index - 0x10000) >> 10) & 0x03FF) + 0xD800; \n try {\n if (decodeURI(\"%\" + hexB1.substring(3) + \"%\" + hexB2.substring(3) + \"%\" + hexB3.substring(3) + \"%\" + hexB4.substring(3)) === String.fromCharCode(H) + String.fromCharCode(L)) continue; \n } catch (e) {} \n if (indexO === 0) { \n indexO = index;\n } else {\n if ((index - indexP) !== 1) { \n if ((indexP - indexO) !== 0) {\n var hexP = decimalToHexString(indexP);\n var hexO = decimalToHexString(indexO);\n $ERROR('#' + hexO + '-' + hexP + ' ');\n } \n else {\n var hexP = decimalToHexString(indexP);\n $ERROR('#' + hexP + ' ');\n } \n indexO = index;\n } \n }\n indexP = index;\n errorCount++; \n }\n } \n }\n}\n\nif (errorCount > 0) {\n if ((indexP - indexO) !== 0) {\n var hexP = decimalToHexString(indexP);\n var hexO = decimalToHexString(indexO);\n $ERROR('#' + hexO + '-' + hexP + ' ');\n } else {\n var hexP = decimalToHexString(indexP);\n $ERROR('#' + hexP + ' ');\n } \n $ERROR('Total error: ' + errorCount + ' bad Unicode character in ' + count + ' ');\n}\n\nfunction decimalToHexString(n) {\n n = Number(n);\n var h = \"\";\n for (var i = 4; i >= 0; i--) {\n if (n >= Math.pow(16, i)) {\n var t = Math.floor(n / Math.pow(16, i));\n n -= t * Math.pow(16, i);\n if ( t >= 10 ) {\n if ( t == 10 ) { h += \"A\"; }\n if ( t == 11 ) { h += \"B\"; }\n if ( t == 12 ) { h += \"C\"; }\n if ( t == 13 ) { h += \"D\"; }\n if ( t == 14 ) { h += \"E\"; }\n if ( t == 15 ) { h += \"F\"; }\n } else {\n h += String(t);\n }\n } else {\n h += \"0\";\n }\n }\n return h;\n}\n",
+ "id": "S15.1.3.1_A2.5_T1"
+ },
+ {
+ "section": "15.1.3.1",
+ "description": "Checking all character in reservedURISet. HexDigit in [0..9, A..F]",
+ "test": "//CHECK#1\nif (decodeURI(\"%3B\") !== \"%3B\") {\n $ERROR('#1: decodeURI(\"%3B\") equal \"%3B\", not \";\"');\n}\n\n//CHECK#2\nif (decodeURI(\"%2F\") !== \"%2F\") {\n $ERROR('#2: decodeURI(\"%2F\") equal \"%2F\", not \"/\"');\n}\n\n//CHECK#3\nif (decodeURI(\"%3F\") !== \"%3F\") {\n $ERROR('#3: decodeURI(\"%3F\") equal \"%3F\", not \"?\"');\n}\n\n//CHECK#4\nif (decodeURI(\"%3A\") !== \"%3A\") {\n $ERROR('#4: decodeURI(\"%3A\") equal \"%3A\", not \":\"');\n}\n\n//CHECK#5\nif (decodeURI(\"%40\") !== \"%40\") {\n $ERROR('#5: decodeURI(\"%40\") equal \"%40\", not \"@\"');\n}\n\n//CHECK#6\nif (decodeURI(\"%26\") !== \"%26\") {\n $ERROR('#6: decodeURI(\"%26\") equal \"%26\", not \"&\"');\n}\n\n//CHECK#7\nif (decodeURI(\"%3D\") !== \"%3D\") {\n $ERROR('#7.1: decodeURI(\"%3D\") equal \"%3D\", not \"=\"');\n}\n\n//CHECK#8\nif (decodeURI(\"%2B\") !== \"%2B\") {\n $ERROR('#8.1: decodeURI(\"%2B\") equal \"%2B\", not \"+\"');\n}\n\n//CHECK#9\nif (decodeURI(\"%24\") !== \"%24\") {\n $ERROR('#9: decodeURI(\"%24\") equal \"%24\", not \"$\"');\n}\n\n//CHECK#10\nif (decodeURI(\"%2C\") !== \"%2C\") {\n $ERROR('#10: decodeURI(\"%2C\") equal \"%2C\", not \",\"');\n}\n\n//CHECK#11\nif (decodeURI(\"%23\") !== \"%23\") {\n $ERROR('#11: decodeURI(\"%23\") equal \"%23\", not \"#\"');\n}\n",
+ "id": "S15.1.3.1_A3_T1"
+ },
+ {
+ "section": "15.1.3.1",
+ "description": "Checking all character in reservedURISet. HexDigit in [0..9, a..f]",
+ "test": "//CHECK#1\nif (decodeURI(\"%3b\") !== \"%3b\") {\n $ERROR('#1: decodeURI(\"%3b\") equal \"%3b\", not \";\" or \"%3B\"');\n}\n\n//CHECK#2\nif (decodeURI(\"%2f\") !== \"%2f\") {\n $ERROR('#2: decodeURI(\"%2f\") equal \"%2f\", not \"/\" or \"%2F\"');\n}\n\n//CHECK#3\nif (decodeURI(\"%3f\") !== \"%3f\") {\n $ERROR('#3: decodeURI(\"%3f\") equal \"%3f\", not \"?\" or \"%3F\"');\n}\n\n//CHECK#4\nif (decodeURI(\"%3a\") !== \"%3a\") {\n $ERROR('#4: decodeURI(\"%3a\") equal \"%3a\", not \":\" or \"%3A\"');\n}\n\n//CHECK#5\nif (decodeURI(\"%40\") !== \"%40\") {\n $ERROR('#5: decodeURI(\"%40\") equal \"%40\", not \"@\"');\n}\n\n//CHECK#6\nif (decodeURI(\"%26\") !== \"%26\") {\n $ERROR('#6: decodeURI(\"%26\") equal \"%26\", not \"&\"');\n}\n\n//CHECK#7\nif (decodeURI(\"%3d\") !== \"%3d\") {\n $ERROR('#7.1: decodeURI(\"%3d\") equal \"%3d\", not \"=\" or \"%3D\"');\n}\n\n//CHECK#8\nif (decodeURI(\"%2b\") !== \"%2b\") {\n $ERROR('#8.1: decodeURI(\"%2b\") equal \"%2b\", not \"+\" or \"%2B\"');\n}\n\n//CHECK#9\nif (decodeURI(\"%24\") !== \"%24\") {\n $ERROR('#9: decodeURI(\"%24\") equal \"%24\", not \"$\"');\n}\n\n//CHECK#10\nif (decodeURI(\"%2c\") !== \"%2c\") {\n $ERROR('#10: decodeURI(\"%2c\") equal \"%2c\", not \",\" or \"%2C\"');\n}\n\n//CHECK#11\nif (decodeURI(\"%23\") !== \"%23\") {\n $ERROR('#11: decodeURI(\"%23\") equal \"%23\", not \"#\"');\n}\n",
+ "id": "S15.1.3.1_A3_T2"
+ },
+ {
+ "section": "15.1.3.1",
+ "description": "Complex test",
+ "test": "//CHECK#1\nif (decodeURI(\"%3B%2F%3F%3A%40%26%3D%2B%24%2C%23\") !== \"%3B%2F%3F%3A%40%26%3D%2B%24%2C%23\") {\n $ERROR('#1: decodeURI(\"%3B%2F%3F%3A%40%26%3D%2B%24%2C%23\") equal \"%3B%2F%3F%3A%40%26%3D%2B%24%2C%23\", not \";/?:@&=+$,#\"');\n}\n\n//CHECK#2\nif (decodeURI(\"%3b%2f%3f%3a%40%26%3d%2b%24%2c%23\") !== \"%3b%2f%3f%3a%40%26%3d%2b%24%2c%23\") {\n $ERROR('#2: decodeURI(\"%3b%2f%3f%3a%40%26%3d%2b%24%2c%23\") equal \"%3b%2f%3f%3a%40%26%3d%2b%24%2c%23\", not \";/?:@&=+$,#\" or \"%3B%2F%3F%3A%40%26%3D%2B%24%2C%23\"');\n}\n",
+ "id": "S15.1.3.1_A3_T3"
+ },
+ {
+ "section": "15.1.3.1",
+ "description": "Checking ENGLISH ALPHABET",
+ "test": "//CHECK#1\nif (decodeURI(\"http://unipro.ru/0123456789\") !== \"http://unipro.ru/0123456789\") {\n $ERROR('#1: http://unipro.ru/0123456789');\n}\n\n//CHECK#2\nif (decodeURI(\"%41%42%43%44%45%46%47%48%49%4A%4B%4C%4D%4E%4F%50%51%52%53%54%55%56%57%58%59%5A\") !== \"ABCDEFGHIJKLMNOPQRSTUVWXYZ\") {\n $ERROR('#2: ABCDEFGHIJKLMNOPQRSTUVWXYZ');\n}\n\n//CHECK#3\nif (decodeURI(\"%61%62%63%64%65%66%67%68%69%6A%6B%6C%6D%6E%6F%70%71%72%73%74%75%76%77%78%79%7A\") !== \"abcdefghijklmnopqrstuvwxyz\") {\n $ERROR('#3: abcdefghijklmnopqrstuvwxyz');\n}\n",
+ "id": "S15.1.3.1_A4_T1"
+ },
+ {
+ "section": "15.1.3.1",
+ "description": "Checking RUSSIAN ALPHABET",
+ "test": "//CHECK#1\nif (decodeURI(\"http://ru.wikipedia.org/wiki/%d0%ae%D0%bd%D0%B8%D0%BA%D0%BE%D0%B4\") !== \"http://ru.wikipedia.org/wiki/Юникод\") {\n $ERROR('#1: http://ru.wikipedia.org/wiki/Юникод');\n}\n\n//CHECK#2\nif (decodeURI(\"http://ru.wikipedia.org/wiki/%D0%AE%D0%BD%D0%B8%D0%BA%D0%BE%D0%B4#%D0%A1%D1%81%D1%8B%D0%BB%D0%BA%D0%B8\") !== \"http://ru.wikipedia.org/wiki/Юникод#Ссылки\") {\n $ERROR('#2: http://ru.wikipedia.org/wiki/Юникод#Ссылки');\n}\n\n//CHECK#3\nif (decodeURI(\"http://ru.wikipedia.org/wiki/%D0%AE%D0%BD%D0%B8%D0%BA%D0%BE%D0%B4%23%D0%92%D0%B5%D1%80%D1%81%D0%B8%D0%B8%20%D0%AE%D0%BD%D0%B8%D0%BA%D0%BE%D0%B4%D0%B0\") !== \"http://ru.wikipedia.org/wiki/Юникод%23Версии Юникода\") {\n $ERROR('#3: http://ru.wikipedia.org/wiki/Юникод%23Версии Юникода');\n}\n",
+ "id": "S15.1.3.1_A4_T2"
+ },
+ {
+ "section": "15.1.3.1",
+ "description": "Checking URL with Line Terminator",
+ "test": "//CHECK#1\nif (decodeURI(\"http://unipro.ru/%0Aabout\") !== \"http://unipro.ru/\\nabout\") {\n $ERROR('#1: http://unipro.ru/%A0about');\n}\n\n//CHECK#2\nif (decodeURI(\"http://unipro.ru/%0Babout\") !== \"http://unipro.ru/\\vabout\") {\n $ERROR('#2: http://unipro.ru/%0Babout');\n}\n\n//CHECK#3\nif (decodeURI(\"http://unipro.ru/%0Cabout\") !== \"http://unipro.ru/\\fabout\") {\n $ERROR('#3: http://unipro.ru/%0Cabout');\n}\n\n//CHECK#4\nif (decodeURI(\"http://unipro.ru/%0Dabout\") !== \"http://unipro.ru/\\rabout\") {\n $ERROR('#4: http://unipro.ru/%0Dabout');\n}\n",
+ "id": "S15.1.3.1_A4_T3"
+ },
+ {
+ "section": "15.1.3.1",
+ "description": "Test some url",
+ "test": "//CHECK#1\nif (decodeURI(\"\") !== \"\") {\n $ERROR('#1: \"\"');\n}\n\n//CHECK#2\nif (decodeURI(\"http:%2f%2Funipro.ru\") !== \"http:%2f%2Funipro.ru\") {\n $ERROR('#2: http:%2f%2Funipro.ru');\n}\n\n//CHECK#3\nif (decodeURI(\"http://www.google.ru/support/jobs/bin/static.py%3Fpage%3dwhy-ru.html%26sid%3Dliveandwork\") !== \"http://www.google.ru/support/jobs/bin/static.py%3Fpage%3dwhy-ru.html%26sid%3Dliveandwork\") {\n $ERROR('#3: http://www.google.ru/support/jobs/bin/static.py%3Fpage%3dwhy-ru.html%26sid%3Dliveandwork\"');\n} \n\n//CHECK%234\nif (decodeURI(\"http://en.wikipedia.org/wiki/UTF-8%23Description\") !== \"http://en.wikipedia.org/wiki/UTF-8%23Description\") {\n $ERROR('%234: http://en.wikipedia.org/wiki/UTF-8%23Description');\n}\n",
+ "id": "S15.1.3.1_A4_T4"
+ },
+ {
+ "section": "15.1.3.1, 15.2.4.7, 12.6.4",
+ "description": "Checking use propertyIsEnumerable, for-in",
+ "test": "//CHECK#1\nif (decodeURI.propertyIsEnumerable('length') !== false) {\n $ERROR('#1: decodeURI.propertyIsEnumerable(\\'length\\') === false. Actual: ' + (decodeURI.propertyIsEnumerable('length')));\n}\n\n//CHECK#2\nresult = true;\nfor (p in decodeURI){\n if (p === \"length\") {\n result = false;\n } \n}\n\nif (result !== true) {\n $ERROR('#2: result = true; for (p in decodeURI) { if (p === \"length\") result = false; } result === true;');\n}\n",
+ "id": "S15.1.3.1_A5.1"
+ },
+ {
+ "section": "15.1.3.1, 15.2.4.5, 11.4.1",
+ "description": "Checking use hasOwnProperty, delete",
+ "strict_mode_negative": "",
+ "test": "//CHECK#1\nif (decodeURI.hasOwnProperty('length') !== true) {\n $FAIL('#1: decodeURI.hasOwnProperty(\\'length\\') === true. Actual: ' + (decodeURI.hasOwnProperty('length')));\n}\n\ndelete decodeURI.length;\n\n//CHECK#2\nif (decodeURI.hasOwnProperty('length') !== true) {\n $ERROR('#2: delete decodeURI.length; decodeURI.hasOwnProperty(\\'length\\') === true. Actual: ' + (decodeURI.hasOwnProperty('length')));\n}\n\n//CHECK#3\nif (decodeURI.length === undefined) {\n $ERROR('#3: delete decodeURI.length; decodeURI.length !== undefined');\n}\n\n\n\n",
+ "id": "S15.1.3.1_A5.2",
+ "strict_only": ""
+ },
+ {
+ "section": "15.1.3.1",
+ "description": "Checking if varying the length property fails",
+ "strict_mode_negative": "",
+ "test": "//CHECK#1\nvar x = decodeURI.length;\ndecodeURI.length = Infinity;\nif (decodeURI.length !== x) {\n $ERROR('#1: x = decodeURI.length; decodeURI.length = Infinity; decodeURI.length === x. Actual: ' + (decodeURI.length));\n}\n\n",
+ "id": "S15.1.3.1_A5.3",
+ "strict_only": ""
+ },
+ {
+ "section": "15.1.3.1",
+ "description": "decodeURI.length === 1",
+ "test": "//CHECK#1\nif (decodeURI.length !== 1) {\n $ERROR('#1: decodeURI.length === 1. Actual: ' + (decodeURI.length));\n} \n\n",
+ "id": "S15.1.3.1_A5.4"
+ },
+ {
+ "section": "15.1.3.1, 15.2.4.7, 12.6.4",
+ "description": "Checking use propertyIsEnumerable, for-in",
+ "test": "//CHECK#1\nif (this.propertyIsEnumerable('decodeURI') !== false) {\n $ERROR('#1: this.propertyIsEnumerable(\\'decodeURI\\') === false. Actual: ' + (this.propertyIsEnumerable('decodeURI')));\n}\n\n//CHECK#2\nresult = true;\nfor (p in this){\n if (p === \"decodeURI\") {\n result = false;\n } \n}\n\nif (result !== true) {\n $ERROR('#2: result = true; for (p in this) { if (p === \"decodeURI\") result = false; } result === true;');\n}\n",
+ "id": "S15.1.3.1_A5.5"
+ },
+ {
+ "section": "15.1.3.1",
+ "description": "Checking decodeURI.prototype",
+ "test": "//CHECK#1\nif (decodeURI.prototype !== undefined) {\n $ERROR('#1: decodeURI.prototype === undefined. Actual: ' + (decodeURI.prototype));\n}\n",
+ "id": "S15.1.3.1_A5.6"
+ },
+ {
+ "section": "15.1.3.1, 11.2.2",
+ "description": "If property does not implement the internal [[Construct]] method, throw a TypeError exception",
+ "test": "//CHECK#1\n\ntry {\n new decodeURI();\n $ERROR('#1.1: new decodeURI() throw TypeError. Actual: ' + (new decodeURI()));\n} catch (e) {\n if ((e instanceof TypeError) !== true) {\n $ERROR('#1.2: new decodeURI() throw TypeError. Actual: ' + (e));\n }\n}\n",
+ "id": "S15.1.3.1_A5.7"
+ },
+ {
+ "section": "15.1.3.1, 9.8, 8.6.2.6",
+ "description": "If Type(value) is Object, evaluate ToPrimitive(value, String)",
+ "test": "//CHECK#1\nvar object = {valueOf: function() {return \"%5E\"}};\nif (decodeURI(object) !== \"[object Object]\") {\n $ERROR('#1: var object = {valueOf: function() {return \"%5E\"}}; decodeURI(object) === [object Object]. Actual: ' + (decodeURI(object)));\n}\n\n//CHECK#2\nvar object = {valueOf: function() {return \"\"}, toString: function() {return \"%5E\"}};\nif (decodeURI(object) !== \"^\") {\n $ERROR('#2: var object = {valueOf: function() {return \"\"}, toString: function() {return \"%5E\"}}; decodeURI(object) === \"^\". Actual: ' + (decodeURI(object)));\n} \n\n//CHECK#3\nvar object = {valueOf: function() {return \"%5E\"}, toString: function() {return {}}};\nif (decodeURI(object) !== \"^\") {\n $ERROR('#3: var object = {valueOf: function() {return \"%5E\"}, toString: function() {return {}}}; decodeURI(object) === \"^\". Actual: ' + (decodeURI(object)));\n}\n\n//CHECK#4\ntry {\n var object = {valueOf: function() {throw \"error\"}, toString: function() {return \"%5E\"}};\n if (decodeURI(object) !== \"^\") {\n $ERROR('#4.1: var object = {valueOf: function() {throw \"error\"}, toString: function() {return \"%5E\"}}; decodeURI(object) === \"^\". Actual: ' + (decodeURI(object)));\n }\n}\ncatch (e) {\n if (e === \"error\") {\n $ERROR('#4.2: var object = {valueOf: function() {throw \"error\"}, toString: function() {return \"%5E\"}}; decodeURI(object) not throw \"error\"');\n } else {\n $ERROR('#4.3: var object = {valueOf: function() {throw \"error\"}, toString: function() {return \"%5E\"}}; decodeURI(object) not throw Error. Actual: ' + (e));\n }\n}\n\n//CHECK#5\nvar object = {toString: function() {return \"%5E\"}};\nif (decodeURI(object) !== \"^\") {\n $ERROR('#5: var object = {toString: function() {return \"%5E\"}}; decodeURI(object) === \"^\". Actual: ' + (decodeURI(object)));\n}\n\n//CHECK#6\nvar object = {valueOf: function() {return {}}, toString: function() {return \"%5E\"}}\nif (decodeURI(object) !== \"^\") {\n $ERROR('#6: var object = {valueOf: function() {return {}}, toString: function() {return \"%5E\"}}; decodeURI(object) === \"^\". Actual: ' + (decodeURI(object)));\n}\n\n//CHECK#7\ntry {\n var object = {valueOf: function() {return \"%5E\"}, toString: function() {throw \"error\"}};\n decodeURI(object);\n $ERROR('#7.1: var object = {valueOf: function() {return \"%5E\"}, toString: function() {throw \"error\"}}; decodeURI(object) throw \"error\". Actual: ' + (decodeURI(object)));\n} \ncatch (e) {\n if (e !== \"error\") {\n $ERROR('#7.2: var object = {valueOf: function() {return \"%5E\"}, toString: function() {throw \"error\"}}; decodeURI(object) throw \"error\". Actual: ' + (e));\n } \n}\n\n//CHECK#8\ntry {\n var object = {valueOf: function() {return {}}, toString: function() {return {}}};\n decodeURI(object);\n $ERROR('#8.1: var object = {valueOf: function() {return {}}, toString: function() {return {}}}; decodeURI(object) throw TypeError. Actual: ' + (decodeURI(object)));\n} \ncatch (e) {\n if ((e instanceof TypeError) !== true) {\n $ERROR('#8.2: var object = {valueOf: function() {return {}}, toString: function() {return {}}}; decodeURI(object) throw TypeError. Actual: ' + (e));\n } \n}\n",
+ "id": "S15.1.3.1_A6_T1"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.1.3.2_decodeURIComponent.json b/website/resources/scripts/testcases2/15.1.3.2_decodeURIComponent.json
new file mode 100644
index 000000000..637f33483
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.1.3.2_decodeURIComponent.json
@@ -0,0 +1,320 @@
+{
+ "testCollection": {
+ "name": "15.1.3.2_decodeURIComponent",
+ "numTests": 52,
+ "tests": [
+ {
+ "section": "15.1.3.2",
+ "description": "Complex tests",
+ "test": "//CHECK\nresult = true;\nvar interval = [[0x00, 0x29], [0x40,0x40], [0x47, 0x60], [0x67, 0xFFFF]];\nfor (indexI = 0; indexI < interval.length; indexI++) {\n for (indexJ = interval[indexI][0]; indexJ <= interval[indexI][1]; indexJ++) {\n try {\n decodeURIComponent(\"%C0%\" + String.fromCharCode(indexJ, indexJ));\n result = false; \n } catch (e) { \n if ((e instanceof URIError) !== true) {\n result = false; \n }\n } \n } \n} \n\nif (result !== true) { \n $ERROR('#1: If B = 110xxxxx (n = 2) and (string.charAt(k + 4) and string.charAt(k + 5)) do not represent hexadecimal digits, throw URIError');\n}\n",
+ "id": "S15.1.3.2_A1.10_T1"
+ },
+ {
+ "section": "15.1.3.2",
+ "description": "Complex tests, string.charAt(k + 4) and string.charAt(k + 5)\ndo not represent hexadecimal digits",
+ "test": "//CHECK\nresult = true;\nvar interval = [[0x00, 0x29], [0x40,0x40], [0x47, 0x60], [0x67, 0xFFFF]];\nfor (indexI = 0; indexI < interval.length; indexI++) {\n for (indexJ = interval[indexI][0]; indexJ <= interval[indexI][1]; indexJ++) {\n try {\n decodeURIComponent(\"%E0%\" + String.fromCharCode(indexJ, indexJ) + \"%A0\");\n result = false; \n } catch (e) { \n if ((e instanceof URIError) !== true) {\n result = false; \n }\n } \n } \n} \n\nif (result !== true) { \n $ERROR('#1: If B = 1110xxxx (n = 3) and (string.charAt(k + 4) and string.charAt(k + 5)) do not represent hexadecimal digits, throw URIError');\n}\n",
+ "id": "S15.1.3.2_A1.11_T1"
+ },
+ {
+ "section": "15.1.3.2",
+ "description": "Complex tests, string.charAt(k + 7) and string.charAt(k + 8)\ndo not represent hexadecimal digits",
+ "test": "//CHECK\nresult = true;\nvar interval = [[0x00, 0x29], [0x40,0x40], [0x47, 0x60], [0x67, 0xFFFF]];\nfor (indexI = 0; indexI < interval.length; indexI++) {\n for (indexJ = interval[indexI][0]; indexJ <= interval[indexI][1]; indexJ++) {\n try {\n decodeURIComponent(\"%E0%\" + \"%A0\" + String.fromCharCode(indexJ, indexJ));\n result = false; \n } catch (e) { \n if ((e instanceof URIError) !== true) {\n result = false; \n }\n } \n } \n} \n\nif (result !== true) { \n $ERROR('#1: If B = 1110xxxx (n = 3) and (string.charAt(k + 7) and string.charAt(k + 8)) do not represent hexadecimal digits, throw URIError');\n}\n",
+ "id": "S15.1.3.2_A1.11_T2"
+ },
+ {
+ "section": "15.1.3.2",
+ "description": "Complex tests, string.charAt(k + 4) and string.charAt(k + 5)\ndo not represent hexadecimal digits",
+ "test": "//CHECK\nresult = true;\nvar interval = [[0x00, 0x29], [0x40,0x40], [0x47, 0x60], [0x67, 0xFFFF]];\nfor (indexI = 0; indexI < interval.length; indexI++) {\n for (indexJ = interval[indexI][0]; indexJ <= interval[indexI][1]; indexJ++) {\n try {\n decodeURIComponent(\"%F0%\" + String.fromCharCode(indexJ, indexJ) + \"%A0%A0\");\n result = false; \n } catch (e) { \n if ((e instanceof URIError) !== true) {\n result = false; \n }\n } \n } \n} \n\nif (result !== true) { \n $ERROR('#1: If B = 11110xxx (n = 4) and (string.charAt(k + 4) and string.charAt(k + 5)) do not represent hexadecimal digits, throw URIError');\n}\n",
+ "id": "S15.1.3.2_A1.12_T1"
+ },
+ {
+ "section": "15.1.3.2",
+ "description": "Complex tests, string.charAt(k + 7) and string.charAt(k + 7)\ndo not represent hexadecimal digits",
+ "test": "//CHECK\nresult = true;\nvar interval = [[0x00, 0x29], [0x40,0x40], [0x47, 0x60], [0x67, 0xFFFF]];\nfor (indexI = 0; indexI < interval.length; indexI++) {\n for (indexJ = interval[indexI][0]; indexJ <= interval[indexI][1]; indexJ++) {\n try {\n decodeURIComponent(\"%F0%\" + \"%A0\" + String.fromCharCode(indexJ, indexJ) + \"%A0\");\n result = false; \n } catch (e) { \n if ((e instanceof URIError) !== true) {\n result = false; \n }\n } \n } \n} \n\nif (result !== true) { \n $ERROR('#1: If B = 11110xxx (n = 4) and (string.charAt(k + 7) and string.charAt(k + 8)) do not represent hexadecimal digits, throw URIError');\n}\n",
+ "id": "S15.1.3.2_A1.12_T2"
+ },
+ {
+ "section": "15.1.3.2",
+ "description": "Complex tests, string.charAt(k + 10) and string.charAt(k + 11)\ndo not represent hexadecimal digits",
+ "test": "//CHECK\nresult = true;\nvar interval = [[0x00, 0x29], [0x40,0x40], [0x47, 0x60], [0x67, 0xFFFF]];\nfor (indexI = 0; indexI < interval.length; indexI++) {\n for (indexJ = interval[indexI][0]; indexJ <= interval[indexI][1]; indexJ++) {\n try {\n decodeURIComponent(\"%F0%\" + \"%A0%A0\" + String.fromCharCode(indexJ, indexJ));\n result = false; \n } catch (e) { \n if ((e instanceof URIError) !== true) {\n result = false; \n }\n } \n } \n} \n\nif (result !== true) { \n $ERROR('#1: If B = 11110xxx (n = 4) and (string.charAt(k + 10) and string.charAt(k + 11)) do not represent hexadecimal digits, throw URIError');\n}\n",
+ "id": "S15.1.3.2_A1.12_T3"
+ },
+ {
+ "section": "15.1.3.2",
+ "description": "Complex tests. B = [0xC0 - 0xDF], C = [0x00, 0x7F]",
+ "test": "errorCount = 0;\ncount = 0;\nvar indexP;\nvar indexO = 0;\n\nfor (indexB = 0xC0; indexB <= 0xDF; indexB++) {\n count++; \n hexB = decimalToHexString(indexB); \n result = true;\n for (indexC = 0x00; indexC <= 0x7F; indexC++) {\n hexC = decimalToHexString(indexC); \n try {\n decodeURIComponent(\"%\" + hexB.substring(2) + \"%\" + hexC.substring(2));\n } catch (e) { \n if ((e instanceof URIError) === true) continue; \n }\n result = false;\n }\n if (result !== true) {\n if (indexO === 0) { \n indexO = indexB;\n } else {\n if ((indexB - indexP) !== 1) { \n if ((indexP - indexO) !== 0) {\n var hexP = decimalToHexString(indexP);\n var hexO = decimalToHexString(indexO);\n $ERROR('#' + hexO + '-' + hexP + ' ');\n } \n else {\n var hexP = decimalToHexString(indexP);\n $ERROR('#' + hexP + ' ');\n } \n indexO = indexB;\n } \n }\n indexP = indexB;\n errorCount++; \n }\n}\n\nif (errorCount > 0) {\n if ((indexP - indexO) !== 0) {\n var hexP = decimalToHexString(indexP);\n var hexO = decimalToHexString(indexO);\n $ERROR('#' + hexO + '-' + hexP + ' ');\n } else {\n var hexP = decimalToHexString(indexP);\n $ERROR('#' + hexP + ' ');\n } \n $ERROR('Total error: ' + errorCount + ' bad Unicode character in ' + count + ' ');\n}\n\nfunction decimalToHexString(n) {\n n = Number(n);\n var h = \"\";\n for (var i = 3; i >= 0; i--) {\n if (n >= Math.pow(16, i)) {\n var t = Math.floor(n / Math.pow(16, i));\n n -= t * Math.pow(16, i);\n if ( t >= 10 ) {\n if ( t == 10 ) { h += \"A\"; }\n if ( t == 11 ) { h += \"B\"; }\n if ( t == 12 ) { h += \"C\"; }\n if ( t == 13 ) { h += \"D\"; }\n if ( t == 14 ) { h += \"E\"; }\n if ( t == 15 ) { h += \"F\"; }\n } else {\n h += String(t);\n }\n } else {\n h += \"0\";\n }\n }\n return h;\n}\n",
+ "id": "S15.1.3.2_A1.13_T1"
+ },
+ {
+ "section": "15.1.3.2",
+ "description": "Complex tests. B = [0xC0 - 0xDF], C = [0xC0, 0xFF]",
+ "test": "errorCount = 0;\ncount = 0;\nvar indexP;\nvar indexO = 0;\n\nfor (indexB = 0xC0; indexB <= 0xDF; indexB++) {\n count++; \n hexB = decimalToHexString(indexB); \n result = true;\n for (indexC = 0xC0; indexC <= 0xFF; indexC++) {\n hexC = decimalToHexString(indexC); \n try {\n decodeURIComponent(\"%\" + hexB.substring(2) + \"%\" + hexC.substring(2));\n } catch (e) { \n if ((e instanceof URIError) === true) continue; \n }\n result = false;\n }\n if (result !== true) {\n if (indexO === 0) { \n indexO = indexB;\n } else {\n if ((indexB - indexP) !== 1) { \n if ((indexP - indexO) !== 0) {\n var hexP = decimalToHexString(indexP);\n var hexO = decimalToHexString(indexO);\n $ERROR('#' + hexO + '-' + hexP + ' ');\n } \n else {\n var hexP = decimalToHexString(indexP);\n $ERROR('#' + hexP + ' ');\n } \n indexO = indexB;\n } \n }\n indexP = indexB;\n errorCount++; \n }\n}\n\nif (errorCount > 0) {\n if ((indexP - indexO) !== 0) {\n var hexP = decimalToHexString(indexP);\n var hexO = decimalToHexString(indexO);\n $ERROR('#' + hexO + '-' + hexP + ' ');\n } else {\n var hexP = decimalToHexString(indexP);\n $ERROR('#' + hexP + ' ');\n } \n $ERROR('Total error: ' + errorCount + ' bad Unicode character in ' + count + ' ');\n}\n\nfunction decimalToHexString(n) {\n n = Number(n);\n var h = \"\";\n for (var i = 3; i >= 0; i--) {\n if (n >= Math.pow(16, i)) {\n var t = Math.floor(n / Math.pow(16, i));\n n -= t * Math.pow(16, i);\n if ( t >= 10 ) {\n if ( t == 10 ) { h += \"A\"; }\n if ( t == 11 ) { h += \"B\"; }\n if ( t == 12 ) { h += \"C\"; }\n if ( t == 13 ) { h += \"D\"; }\n if ( t == 14 ) { h += \"E\"; }\n if ( t == 15 ) { h += \"F\"; }\n } else {\n h += String(t);\n }\n } else {\n h += \"0\";\n }\n }\n return h;\n}\n",
+ "id": "S15.1.3.2_A1.13_T2"
+ },
+ {
+ "section": "15.1.3.2",
+ "description": "Complex tests. B = [0xE0 - 0xEF], C = [0x00, 0x7F]",
+ "test": "errorCount = 0;\ncount = 0;\nvar indexP;\nvar indexO = 0;\n\nfor (indexB = 0xE0; indexB <= 0xEF; indexB++) {\n count++; \n hexB = decimalToHexString(indexB); \n result = true;\n for (indexC = 0x00; indexC <= 0x7F; indexC++) {\n hexC = decimalToHexString(indexC); \n try {\n decodeURIComponent(\"%\" + hexB.substring(2) + \"%\" + hexC.substring(2) + \"%A0\");\n } catch (e) { \n if ((e instanceof URIError) === true) continue; \n }\n result = false;\n }\n if (result !== true) {\n if (indexO === 0) { \n indexO = indexB;\n } else {\n if ((indexB - indexP) !== 1) { \n if ((indexP - indexO) !== 0) {\n var hexP = decimalToHexString(indexP);\n var hexO = decimalToHexString(indexO);\n $ERROR('#' + hexO + '-' + hexP + ' ');\n } \n else {\n var hexP = decimalToHexString(indexP);\n $ERROR('#' + hexP + ' ');\n } \n indexO = indexB;\n } \n }\n indexP = indexB;\n errorCount++; \n }\n}\n\nif (errorCount > 0) {\n if ((indexP - indexO) !== 0) {\n var hexP = decimalToHexString(indexP);\n var hexO = decimalToHexString(indexO);\n $ERROR('#' + hexO + '-' + hexP + ' ');\n } else {\n var hexP = decimalToHexString(indexP);\n $ERROR('#' + hexP + ' ');\n } \n $ERROR('Total error: ' + errorCount + ' bad Unicode character in ' + count + ' ');\n}\n\nfunction decimalToHexString(n) {\n n = Number(n);\n var h = \"\";\n for (var i = 3; i >= 0; i--) {\n if (n >= Math.pow(16, i)) {\n var t = Math.floor(n / Math.pow(16, i));\n n -= t * Math.pow(16, i);\n if ( t >= 10 ) {\n if ( t == 10 ) { h += \"A\"; }\n if ( t == 11 ) { h += \"B\"; }\n if ( t == 12 ) { h += \"C\"; }\n if ( t == 13 ) { h += \"D\"; }\n if ( t == 14 ) { h += \"E\"; }\n if ( t == 15 ) { h += \"F\"; }\n } else {\n h += String(t);\n }\n } else {\n h += \"0\";\n }\n }\n return h;\n}\n",
+ "id": "S15.1.3.2_A1.14_T1"
+ },
+ {
+ "section": "15.1.3.2",
+ "description": "Complex tests. B = [0xE0 - 0xEF], C = [0x00, 0x7F]",
+ "test": "errorCount = 0;\ncount = 0;\nvar indexP;\nvar indexO = 0;\n\nfor (indexB = 0xE0; indexB <= 0xEF; indexB++) {\n count++; \n hexB = decimalToHexString(indexB); \n result = true;\n for (indexC = 0x00; indexC <= 0x7F; indexC++) {\n hexC = decimalToHexString(indexC); \n try {\n decodeURIComponent(\"%\" + hexB.substring(2) + \"%A0\" + \"%\" + hexC.substring(2));\n } catch (e) { \n if ((e instanceof URIError) === true) continue; \n }\n result = false;\n }\n if (result !== true) {\n if (indexO === 0) { \n indexO = indexB;\n } else {\n if ((indexB - indexP) !== 1) { \n if ((indexP - indexO) !== 0) {\n var hexP = decimalToHexString(indexP);\n var hexO = decimalToHexString(indexO);\n $ERROR('#' + hexO + '-' + hexP + ' ');\n } \n else {\n var hexP = decimalToHexString(indexP);\n $ERROR('#' + hexP + ' ');\n } \n indexO = indexB;\n } \n }\n indexP = indexB;\n errorCount++; \n }\n}\n\nif (errorCount > 0) {\n if ((indexP - indexO) !== 0) {\n var hexP = decimalToHexString(indexP);\n var hexO = decimalToHexString(indexO);\n $ERROR('#' + hexO + '-' + hexP + ' ');\n } else {\n var hexP = decimalToHexString(indexP);\n $ERROR('#' + hexP + ' ');\n } \n $ERROR('Total error: ' + errorCount + ' bad Unicode character in ' + count + ' ');\n}\n\nfunction decimalToHexString(n) {\n n = Number(n);\n var h = \"\";\n for (var i = 3; i >= 0; i--) {\n if (n >= Math.pow(16, i)) {\n var t = Math.floor(n / Math.pow(16, i));\n n -= t * Math.pow(16, i);\n if ( t >= 10 ) {\n if ( t == 10 ) { h += \"A\"; }\n if ( t == 11 ) { h += \"B\"; }\n if ( t == 12 ) { h += \"C\"; }\n if ( t == 13 ) { h += \"D\"; }\n if ( t == 14 ) { h += \"E\"; }\n if ( t == 15 ) { h += \"F\"; }\n } else {\n h += String(t);\n }\n } else {\n h += \"0\";\n }\n }\n return h;\n}\n",
+ "id": "S15.1.3.2_A1.14_T2"
+ },
+ {
+ "section": "15.1.3.2",
+ "description": "Complex tests. B = [0xE0 - 0xEF], C = [0xC0, 0xFF]",
+ "test": "errorCount = 0;\ncount = 0;\nvar indexP;\nvar indexO = 0;\n\nfor (indexB = 0xE0; indexB <= 0xEF; indexB++) {\n count++; \n hexB = decimalToHexString(indexB); \n result = true;\n for (indexC = 0xC0; indexC <= 0xFF; indexC++) {\n hexC = decimalToHexString(indexC); \n try {\n decodeURIComponent(\"%\" + hexB.substring(2) + \"%\" + hexC.substring(2) + \"%A0\");\n } catch (e) { \n if ((e instanceof URIError) === true) continue; \n }\n result = false;\n }\n if (result !== true) {\n if (indexO === 0) { \n indexO = indexB;\n } else {\n if ((indexB - indexP) !== 1) { \n if ((indexP - indexO) !== 0) {\n var hexP = decimalToHexString(indexP);\n var hexO = decimalToHexString(indexO);\n $ERROR('#' + hexO + '-' + hexP + ' ');\n } \n else {\n var hexP = decimalToHexString(indexP);\n $ERROR('#' + hexP + ' ');\n } \n indexO = indexB;\n } \n }\n indexP = indexB;\n errorCount++; \n }\n}\n\nif (errorCount > 0) {\n if ((indexP - indexO) !== 0) {\n var hexP = decimalToHexString(indexP);\n var hexO = decimalToHexString(indexO);\n $ERROR('#' + hexO + '-' + hexP + ' ');\n } else {\n var hexP = decimalToHexString(indexP);\n $ERROR('#' + hexP + ' ');\n } \n $ERROR('Total error: ' + errorCount + ' bad Unicode character in ' + count + ' ');\n}\n\nfunction decimalToHexString(n) {\n n = Number(n);\n var h = \"\";\n for (var i = 3; i >= 0; i--) {\n if (n >= Math.pow(16, i)) {\n var t = Math.floor(n / Math.pow(16, i));\n n -= t * Math.pow(16, i);\n if ( t >= 10 ) {\n if ( t == 10 ) { h += \"A\"; }\n if ( t == 11 ) { h += \"B\"; }\n if ( t == 12 ) { h += \"C\"; }\n if ( t == 13 ) { h += \"D\"; }\n if ( t == 14 ) { h += \"E\"; }\n if ( t == 15 ) { h += \"F\"; }\n } else {\n h += String(t);\n }\n } else {\n h += \"0\";\n }\n }\n return h;\n}\n",
+ "id": "S15.1.3.2_A1.14_T3"
+ },
+ {
+ "section": "15.1.3.2",
+ "description": "Complex tests. B = [0xE0 - 0xEF], C = [0xC0, 0xFF]",
+ "test": "errorCount = 0;\ncount = 0;\nvar indexP;\nvar indexO = 0;\n\nfor (indexB = 0xE0; indexB <= 0xEF; indexB++) {\n count++; \n hexB = decimalToHexString(indexB); \n result = true;\n for (indexC = 0xC0; indexC <= 0xFF; indexC++) {\n hexC = decimalToHexString(indexC); \n try {\n decodeURIComponent(\"%\" + hexB.substring(2) + \"%A0\" + \"%\" + hexC.substring(2));\n } catch (e) { \n if ((e instanceof URIError) === true) continue; \n }\n result = false;\n }\n if (result !== true) {\n if (indexO === 0) { \n indexO = indexB;\n } else {\n if ((indexB - indexP) !== 1) { \n if ((indexP - indexO) !== 0) {\n var hexP = decimalToHexString(indexP);\n var hexO = decimalToHexString(indexO);\n $ERROR('#' + hexO + '-' + hexP + ' ');\n } \n else {\n var hexP = decimalToHexString(indexP);\n $ERROR('#' + hexP + ' ');\n } \n indexO = indexB;\n } \n }\n indexP = indexB;\n errorCount++; \n }\n}\n\nif (errorCount > 0) {\n if ((indexP - indexO) !== 0) {\n var hexP = decimalToHexString(indexP);\n var hexO = decimalToHexString(indexO);\n $ERROR('#' + hexO + '-' + hexP + ' ');\n } else {\n var hexP = decimalToHexString(indexP);\n $ERROR('#' + hexP + ' ');\n } \n $ERROR('Total error: ' + errorCount + ' bad Unicode character in ' + count + ' ');\n}\n\nfunction decimalToHexString(n) {\n n = Number(n);\n var h = \"\";\n for (var i = 3; i >= 0; i--) {\n if (n >= Math.pow(16, i)) {\n var t = Math.floor(n / Math.pow(16, i));\n n -= t * Math.pow(16, i);\n if ( t >= 10 ) {\n if ( t == 10 ) { h += \"A\"; }\n if ( t == 11 ) { h += \"B\"; }\n if ( t == 12 ) { h += \"C\"; }\n if ( t == 13 ) { h += \"D\"; }\n if ( t == 14 ) { h += \"E\"; }\n if ( t == 15 ) { h += \"F\"; }\n } else {\n h += String(t);\n }\n } else {\n h += \"0\";\n }\n }\n return h;\n}\n",
+ "id": "S15.1.3.2_A1.14_T4"
+ },
+ {
+ "section": "15.1.3.2",
+ "description": "Complex tests. B = [0xF0 - 0x0F7], C = [0x00, 0x7F]",
+ "test": "errorCount = 0;\ncount = 0;\nvar indexP;\nvar indexO = 0;\n\nfor (indexB = 0xF0; indexB <= 0xF7; indexB++) {\n count++; \n hexB = decimalToHexString(indexB); \n result = true;\n for (indexC = 0x00; indexC <= 0x7F; indexC++) {\n hexC = decimalToHexString(indexC); \n try {\n decodeURIComponent(\"%\" + hexB.substring(2) + \"%\" + hexC.substring(2) + \"%A0%A0\");\n } catch (e) { \n if ((e instanceof URIError) === true) continue; \n }\n result = false;\n }\n if (result !== true) {\n if (indexO === 0) { \n indexO = indexB;\n } else {\n if ((indexB - indexP) !== 1) { \n if ((indexP - indexO) !== 0) {\n var hexP = decimalToHexString(indexP);\n var hexO = decimalToHexString(indexO);\n $ERROR('#' + hexO + '-' + hexP + ' ');\n } \n else {\n var hexP = decimalToHexString(indexP);\n $ERROR('#' + hexP + ' ');\n } \n indexO = indexB;\n } \n }\n indexP = indexB;\n errorCount++; \n }\n}\n\nif (errorCount > 0) {\n if ((indexP - indexO) !== 0) {\n var hexP = decimalToHexString(indexP);\n var hexO = decimalToHexString(indexO);\n $ERROR('#' + hexO + '-' + hexP + ' ');\n } else {\n var hexP = decimalToHexString(indexP);\n $ERROR('#' + hexP + ' ');\n } \n $ERROR('Total error: ' + errorCount + ' bad Unicode character in ' + count + ' ');\n}\n\nfunction decimalToHexString(n) {\n n = Number(n);\n var h = \"\";\n for (var i = 3; i >= 0; i--) {\n if (n >= Math.pow(16, i)) {\n var t = Math.floor(n / Math.pow(16, i));\n n -= t * Math.pow(16, i);\n if ( t >= 10 ) {\n if ( t == 10 ) { h += \"A\"; }\n if ( t == 11 ) { h += \"B\"; }\n if ( t == 12 ) { h += \"C\"; }\n if ( t == 13 ) { h += \"D\"; }\n if ( t == 14 ) { h += \"E\"; }\n if ( t == 15 ) { h += \"F\"; }\n } else {\n h += String(t);\n }\n } else {\n h += \"0\";\n }\n }\n return h;\n}\n",
+ "id": "S15.1.3.2_A1.15_T1"
+ },
+ {
+ "section": "15.1.3.2",
+ "description": "Complex tests. B = [0xF0 - 0x0F7], C = [0x00, 0x7F]",
+ "test": "errorCount = 0;\ncount = 0;\nvar indexP;\nvar indexO = 0;\n\nfor (indexB = 0xF0; indexB <= 0xF7; indexB++) {\n count++; \n hexB = decimalToHexString(indexB); \n result = true;\n for (indexC = 0x00; indexC <= 0x7F; indexC++) {\n hexC = decimalToHexString(indexC); \n try {\n decodeURIComponent(\"%\" + hexB.substring(2) + \"%A0\" + \"%\" + hexC.substring(2) + \"%A0\");\n } catch (e) { \n if ((e instanceof URIError) === true) continue; \n }\n result = false;\n }\n if (result !== true) {\n if (indexO === 0) { \n indexO = indexB;\n } else {\n if ((indexB - indexP) !== 1) { \n if ((indexP - indexO) !== 0) {\n var hexP = decimalToHexString(indexP);\n var hexO = decimalToHexString(indexO);\n $ERROR('#' + hexO + '-' + hexP + ' ');\n } \n else {\n var hexP = decimalToHexString(indexP);\n $ERROR('#' + hexP + ' ');\n } \n indexO = indexB;\n } \n }\n indexP = indexB;\n errorCount++; \n }\n}\n\nif (errorCount > 0) {\n if ((indexP - indexO) !== 0) {\n var hexP = decimalToHexString(indexP);\n var hexO = decimalToHexString(indexO);\n $ERROR('#' + hexO + '-' + hexP + ' ');\n } else {\n var hexP = decimalToHexString(indexP);\n $ERROR('#' + hexP + ' ');\n } \n $ERROR('Total error: ' + errorCount + ' bad Unicode character in ' + count + ' ');\n}\n\nfunction decimalToHexString(n) {\n n = Number(n);\n var h = \"\";\n for (var i = 3; i >= 0; i--) {\n if (n >= Math.pow(16, i)) {\n var t = Math.floor(n / Math.pow(16, i));\n n -= t * Math.pow(16, i);\n if ( t >= 10 ) {\n if ( t == 10 ) { h += \"A\"; }\n if ( t == 11 ) { h += \"B\"; }\n if ( t == 12 ) { h += \"C\"; }\n if ( t == 13 ) { h += \"D\"; }\n if ( t == 14 ) { h += \"E\"; }\n if ( t == 15 ) { h += \"F\"; }\n } else {\n h += String(t);\n }\n } else {\n h += \"0\";\n }\n }\n return h;\n}\n",
+ "id": "S15.1.3.2_A1.15_T2"
+ },
+ {
+ "section": "15.1.3.2",
+ "description": "Complex tests. B = [0xF0 - 0x0F7], C = [0x00, 0x7F]",
+ "test": "errorCount = 0;\ncount = 0;\nvar indexP;\nvar indexO = 0;\n\nfor (indexB = 0xF0; indexB <= 0xF7; indexB++) {\n count++; \n hexB = decimalToHexString(indexB); \n result = true;\n for (indexC = 0x00; indexC <= 0x7F; indexC++) {\n hexC = decimalToHexString(indexC); \n try {\n decodeURIComponent(\"%\" + hexB.substring(2) + \"%A0%A0\" + \"%\" + hexC.substring(2));\n } catch (e) { \n if ((e instanceof URIError) === true) continue; \n }\n result = false;\n }\n if (result !== true) {\n if (indexO === 0) { \n indexO = indexB;\n } else {\n if ((indexB - indexP) !== 1) { \n if ((indexP - indexO) !== 0) {\n var hexP = decimalToHexString(indexP);\n var hexO = decimalToHexString(indexO);\n $ERROR('#' + hexO + '-' + hexP + ' ');\n } \n else {\n var hexP = decimalToHexString(indexP);\n $ERROR('#' + hexP + ' ');\n } \n indexO = indexB;\n } \n }\n indexP = indexB;\n errorCount++; \n }\n}\n\nif (errorCount > 0) {\n if ((indexP - indexO) !== 0) {\n var hexP = decimalToHexString(indexP);\n var hexO = decimalToHexString(indexO);\n $ERROR('#' + hexO + '-' + hexP + ' ');\n } else {\n var hexP = decimalToHexString(indexP);\n $ERROR('#' + hexP + ' ');\n } \n $ERROR('Total error: ' + errorCount + ' bad Unicode character in ' + count + ' ');\n}\n\nfunction decimalToHexString(n) {\n n = Number(n);\n var h = \"\";\n for (var i = 3; i >= 0; i--) {\n if (n >= Math.pow(16, i)) {\n var t = Math.floor(n / Math.pow(16, i));\n n -= t * Math.pow(16, i);\n if ( t >= 10 ) {\n if ( t == 10 ) { h += \"A\"; }\n if ( t == 11 ) { h += \"B\"; }\n if ( t == 12 ) { h += \"C\"; }\n if ( t == 13 ) { h += \"D\"; }\n if ( t == 14 ) { h += \"E\"; }\n if ( t == 15 ) { h += \"F\"; }\n } else {\n h += String(t);\n }\n } else {\n h += \"0\";\n }\n }\n return h;\n}\n",
+ "id": "S15.1.3.2_A1.15_T3"
+ },
+ {
+ "section": "15.1.3.2",
+ "description": "Complex tests. B = [0xF0 - 0x0F7], C = [0xC0, 0xFF]",
+ "test": "errorCount = 0;\ncount = 0;\nvar indexP;\nvar indexO = 0;\n\nfor (indexB = 0xF0; indexB <= 0xF7; indexB++) {\n count++; \n hexB = decimalToHexString(indexB); \n result = true;\n for (indexC = 0xC0; indexC <= 0xFF; indexC++) {\n hexC = decimalToHexString(indexC); \n try {\n decodeURIComponent(\"%\" + hexB.substring(2) + \"%\" + hexC.substring(2) + \"%A0%A0\");\n } catch (e) { \n if ((e instanceof URIError) === true) continue; \n }\n result = false;\n }\n if (result !== true) {\n if (indexO === 0) { \n indexO = indexB;\n } else {\n if ((indexB - indexP) !== 1) { \n if ((indexP - indexO) !== 0) {\n var hexP = decimalToHexString(indexP);\n var hexO = decimalToHexString(indexO);\n $ERROR('#' + hexO + '-' + hexP + ' ');\n } \n else {\n var hexP = decimalToHexString(indexP);\n $ERROR('#' + hexP + ' ');\n } \n indexO = indexB;\n } \n }\n indexP = indexB;\n errorCount++; \n }\n}\n\nif (errorCount > 0) {\n if ((indexP - indexO) !== 0) {\n var hexP = decimalToHexString(indexP);\n var hexO = decimalToHexString(indexO);\n $ERROR('#' + hexO + '-' + hexP + ' ');\n } else {\n var hexP = decimalToHexString(indexP);\n $ERROR('#' + hexP + ' ');\n } \n $ERROR('Total error: ' + errorCount + ' bad Unicode character in ' + count + ' ');\n}\n\nfunction decimalToHexString(n) {\n n = Number(n);\n var h = \"\";\n for (var i = 3; i >= 0; i--) {\n if (n >= Math.pow(16, i)) {\n var t = Math.floor(n / Math.pow(16, i));\n n -= t * Math.pow(16, i);\n if ( t >= 10 ) {\n if ( t == 10 ) { h += \"A\"; }\n if ( t == 11 ) { h += \"B\"; }\n if ( t == 12 ) { h += \"C\"; }\n if ( t == 13 ) { h += \"D\"; }\n if ( t == 14 ) { h += \"E\"; }\n if ( t == 15 ) { h += \"F\"; }\n } else {\n h += String(t);\n }\n } else {\n h += \"0\";\n }\n }\n return h;\n}\n",
+ "id": "S15.1.3.2_A1.15_T4"
+ },
+ {
+ "section": "15.1.3.2",
+ "description": "Complex tests. B = [0xF0 - 0x0F7], C = [0xC0, 0xFF]",
+ "test": "errorCount = 0;\ncount = 0;\nvar indexP;\nvar indexO = 0;\n\nfor (indexB = 0xF0; indexB <= 0xF7; indexB++) {\n count++; \n hexB = decimalToHexString(indexB); \n result = true;\n for (indexC = 0xC0; indexC <= 0xFF; indexC++) {\n hexC = decimalToHexString(indexC); \n try {\n decodeURIComponent(\"%\" + hexB.substring(2) + \"%A0\" + \"%\" + hexC.substring(2) + \"%A0\");\n } catch (e) { \n if ((e instanceof URIError) === true) continue; \n }\n result = false;\n }\n if (result !== true) {\n if (indexO === 0) { \n indexO = indexB;\n } else {\n if ((indexB - indexP) !== 1) { \n if ((indexP - indexO) !== 0) {\n var hexP = decimalToHexString(indexP);\n var hexO = decimalToHexString(indexO);\n $ERROR('#' + hexO + '-' + hexP + ' ');\n } \n else {\n var hexP = decimalToHexString(indexP);\n $ERROR('#' + hexP + ' ');\n } \n indexO = indexB;\n } \n }\n indexP = indexB;\n errorCount++; \n }\n}\n\nif (errorCount > 0) {\n if ((indexP - indexO) !== 0) {\n var hexP = decimalToHexString(indexP);\n var hexO = decimalToHexString(indexO);\n $ERROR('#' + hexO + '-' + hexP + ' ');\n } else {\n var hexP = decimalToHexString(indexP);\n $ERROR('#' + hexP + ' ');\n } \n $ERROR('Total error: ' + errorCount + ' bad Unicode character in ' + count + ' ');\n}\n\nfunction decimalToHexString(n) {\n n = Number(n);\n var h = \"\";\n for (var i = 3; i >= 0; i--) {\n if (n >= Math.pow(16, i)) {\n var t = Math.floor(n / Math.pow(16, i));\n n -= t * Math.pow(16, i);\n if ( t >= 10 ) {\n if ( t == 10 ) { h += \"A\"; }\n if ( t == 11 ) { h += \"B\"; }\n if ( t == 12 ) { h += \"C\"; }\n if ( t == 13 ) { h += \"D\"; }\n if ( t == 14 ) { h += \"E\"; }\n if ( t == 15 ) { h += \"F\"; }\n } else {\n h += String(t);\n }\n } else {\n h += \"0\";\n }\n }\n return h;\n}\n",
+ "id": "S15.1.3.2_A1.15_T5"
+ },
+ {
+ "section": "15.1.3.2",
+ "description": "Complex tests. B = [0xF0 - 0x0F7], C = [0xC0, 0xFF]",
+ "test": "errorCount = 0;\ncount = 0;\nvar indexP;\nvar indexO = 0;\n\nfor (indexB = 0xF0; indexB <= 0xF7; indexB++) {\n count++; \n hexB = decimalToHexString(indexB); \n result = true;\n for (indexC = 0xC0; indexC <= 0xFF; indexC++) {\n hexC = decimalToHexString(indexC); \n try {\n decodeURIComponent(\"%\" + hexB.substring(2) + \"%A0%A0\" + \"%\" + hexC.substring(2));\n } catch (e) { \n if ((e instanceof URIError) === true) continue; \n }\n result = false;\n }\n if (result !== true) {\n if (indexO === 0) { \n indexO = indexB;\n } else {\n if ((indexB - indexP) !== 1) { \n if ((indexP - indexO) !== 0) {\n var hexP = decimalToHexString(indexP);\n var hexO = decimalToHexString(indexO);\n $ERROR('#' + hexO + '-' + hexP + ' ');\n } \n else {\n var hexP = decimalToHexString(indexP);\n $ERROR('#' + hexP + ' ');\n } \n indexO = indexB;\n } \n }\n indexP = indexB;\n errorCount++; \n }\n}\n\nif (errorCount > 0) {\n if ((indexP - indexO) !== 0) {\n var hexP = decimalToHexString(indexP);\n var hexO = decimalToHexString(indexO);\n $ERROR('#' + hexO + '-' + hexP + ' ');\n } else {\n var hexP = decimalToHexString(indexP);\n $ERROR('#' + hexP + ' ');\n } \n $ERROR('Total error: ' + errorCount + ' bad Unicode character in ' + count + ' ');\n}\n\nfunction decimalToHexString(n) {\n n = Number(n);\n var h = \"\";\n for (var i = 3; i >= 0; i--) {\n if (n >= Math.pow(16, i)) {\n var t = Math.floor(n / Math.pow(16, i));\n n -= t * Math.pow(16, i);\n if ( t >= 10 ) {\n if ( t == 10 ) { h += \"A\"; }\n if ( t == 11 ) { h += \"B\"; }\n if ( t == 12 ) { h += \"C\"; }\n if ( t == 13 ) { h += \"D\"; }\n if ( t == 14 ) { h += \"E\"; }\n if ( t == 15 ) { h += \"F\"; }\n } else {\n h += String(t);\n }\n } else {\n h += \"0\";\n }\n }\n return h;\n}\n",
+ "id": "S15.1.3.2_A1.15_T6"
+ },
+ {
+ "section": "15.1.3.2",
+ "description": "Complex tests",
+ "test": "result = true;\n\n//CHECK#1\ntry {\n decodeURIComponent(\"%\");\n result = false;\n} catch(e) {\n if ((e instanceof URIError) !== true) {\n result = false;\n }\n}\n\n//CHECK#2\ntry {\n decodeURIComponent(\"%A\");\n result = false;\n} catch(e) {\n if ((e instanceof URIError) !== true) {\n result = false;\n }\n}\n\n//CHECK#3\ntry {\n decodeURIComponent(\"%1\");\n result = false;\n} catch(e) {\n if ((e instanceof URIError) !== true) {\n result = false;\n }\n}\n\n//CHECK#4\ntry {\n decodeURIComponent(\"% \");\n result = false;\n} catch(e) {\n if ((e instanceof URIError) !== true) {\n result = false;\n }\n}\n\nif (result !== true) {\n $ERROR('#1: If string.charAt(k) equal \"%\" and k + 2 >= string.length, throw URIError');\n}\n\n\n\n",
+ "id": "S15.1.3.2_A1.1_T1"
+ },
+ {
+ "section": "15.1.3.2",
+ "description": "Complex tests",
+ "test": "//CHECK\nresult = true;\nvar interval = [[0x00, 0x29], [0x40,0x40], [0x47, 0x60], [0x67, 0xFFFF]];\nfor (indexI = 0; indexI < interval.length; indexI++) {\n for (indexJ = interval[indexI][0]; indexJ <= interval[indexI][1]; indexJ++) {\n try {\n decodeURIComponent(\"%\" + String.fromCharCode(indexJ) + \"1\");\n result = false;\n } catch (e) { \n if ((e instanceof URIError) !== true) {\n result = false;\n }\n } \n } \n} \n\nif (result !== true) { \n $ERROR('#1: If string.charAt(k+1) does not represent hexadecimal digits, throw URIError');\n}\n",
+ "id": "S15.1.3.2_A1.2_T1"
+ },
+ {
+ "section": "15.1.3.2",
+ "description": "Complex tests",
+ "test": "//CHECK\nresult = true;\nvar interval = [[0x00, 0x29], [0x40,0x40], [0x47, 0x60], [0x67, 0xFFFF]];\nfor (indexI = 0; indexI < interval.length; indexI++) {\n for (indexJ = interval[indexI][0]; indexJ <= interval[indexI][1]; indexJ++) {\n try {\n decodeURIComponent(\"%\" + \"1\" + String.fromCharCode(indexJ));\n result = false;\n } catch (e) { \n if ((e instanceof URIError) !== true) {\n result = false;\n }\n } \n } \n} \n\nif (result !== true) { \n $ERROR('#1: If string.charAt(k+2) does not represent hexadecimal digits, throw URIError');\n}\n",
+ "id": "S15.1.3.2_A1.2_T2"
+ },
+ {
+ "section": "15.1.3.2",
+ "description": "Complex tests. B = 10xxxxxx -> B in [0x80 - 0xBF]",
+ "test": "errorCount = 0;\ncount = 0;\nvar indexP;\nvar indexO = 0;\n\nfor (index = 0x80; index <= 0xBF; index++) {\n count++; \n hex = decimalToHexString(index);\n try {\n decodeURIComponent(\"%\" + hex.substring(2));\n } catch (e) { \n if ((e instanceof URIError) === true) continue; \n }\n if (indexO === 0) { \n indexO = index;\n } else {\n if ((index - indexP) !== 1) { \n if ((indexP - indexO) !== 0) {\n var hexP = decimalToHexString(indexP);\n var hexO = decimalToHexString(indexO);\n $ERROR('#' + hexO + '-' + hexP + ' ');\n } \n else {\n var hexP = decimalToHexString(indexP);\n $ERROR('#' + hexP + ' ');\n } \n indexO = index;\n } \n }\n indexP = index;\n errorCount++; \n}\n\nif (errorCount > 0) {\n if ((indexP - indexO) !== 0) {\n var hexP = decimalToHexString(indexP);\n var hexO = decimalToHexString(indexO);\n $ERROR('#' + hexO + '-' + hexP + ' ');\n } else {\n var hexP = decimalToHexString(indexP);\n $ERROR('#' + hexP + ' ');\n } \n $ERROR('Total error: ' + errorCount + ' bad Unicode character in ' + count + ' ');\n}\n\nfunction decimalToHexString(n) {\n n = Number(n);\n var h = \"\";\n for (var i = 3; i >= 0; i--) {\n if (n >= Math.pow(16, i)) {\n var t = Math.floor(n / Math.pow(16, i));\n n -= t * Math.pow(16, i);\n if ( t >= 10 ) {\n if ( t == 10 ) { h += \"A\"; }\n if ( t == 11 ) { h += \"B\"; }\n if ( t == 12 ) { h += \"C\"; }\n if ( t == 13 ) { h += \"D\"; }\n if ( t == 14 ) { h += \"E\"; }\n if ( t == 15 ) { h += \"F\"; }\n } else {\n h += String(t);\n }\n } else {\n h += \"0\";\n }\n }\n return h;\n}\n",
+ "id": "S15.1.3.2_A1.3_T1"
+ },
+ {
+ "section": "15.1.3.2",
+ "description": "Complex tests. B = 11111xxx -> B in [0xF8 - 0xFF]",
+ "test": "errorCount = 0;\ncount = 0;\nvar indexP;\nvar indexO = 0;\n\nfor (index = 0xF8; index <= 0xFF; index++) {\n count++; \n hex = decimalToHexString(index);\n try {\n decodeURIComponent(\"%\" + hex.substring(2));\n } catch (e) { \n if ((e instanceof URIError) === true) continue; \n }\n if (indexO === 0) { \n indexO = index;\n } else {\n if ((index - indexP) !== 1) { \n if ((indexP - indexO) !== 0) {\n var hexP = decimalToHexString(indexP);\n var hexO = decimalToHexString(indexO);\n $ERROR('#' + hexO + '-' + hexP + ' ');\n } \n else {\n var hexP = decimalToHexString(indexP);\n $ERROR('#' + hexP + ' ');\n } \n indexO = index;\n } \n }\n indexP = index;\n errorCount++; \n}\n\nif (errorCount > 0) {\n if ((indexP - indexO) !== 0) {\n var hexP = decimalToHexString(indexP);\n var hexO = decimalToHexString(indexO);\n $ERROR('#' + hexO + '-' + hexP + ' ');\n } else {\n var hexP = decimalToHexString(indexP);\n $ERROR('#' + hexP + ' ');\n } \n $ERROR('Total error: ' + errorCount + ' bad Unicode character in ' + count + ' ');\n}\n\nfunction decimalToHexString(n) {\n n = Number(n);\n var h = \"\";\n for (var i = 3; i >= 0; i--) {\n if (n >= Math.pow(16, i)) {\n var t = Math.floor(n / Math.pow(16, i));\n n -= t * Math.pow(16, i);\n if ( t >= 10 ) {\n if ( t == 10 ) { h += \"A\"; }\n if ( t == 11 ) { h += \"B\"; }\n if ( t == 12 ) { h += \"C\"; }\n if ( t == 13 ) { h += \"D\"; }\n if ( t == 14 ) { h += \"E\"; }\n if ( t == 15 ) { h += \"F\"; }\n } else {\n h += String(t);\n }\n } else {\n h += \"0\";\n }\n }\n return h;\n}\n",
+ "id": "S15.1.3.2_A1.3_T2"
+ },
+ {
+ "section": "15.1.3.2",
+ "description": "Complex tests. B = [0xC0 - 0xDF]",
+ "test": "errorCount = 0;\ncount = 0;\nvar indexP;\nvar indexO = 0;\n\nfor (index = 0xC0; index <= 0xDF; index++) {\n count++; \n str = \"\";\n result = true;\n for (len = 0; len < 3; len++) {\n hex = decimalToHexString(index);\n try {\n decodeURIComponent(\"%\" + hex.substring(2) + str); \n } catch (e) { \n if ((e instanceof URIError) === true) continue; \n }\n result = false;\n str = str + \"1\";\n }\n if (result !== true) {\n if (indexO === 0) { \n indexO = index;\n } else {\n if ((index - indexP) !== 1) { \n if ((indexP - indexO) !== 0) {\n var hexP = decimalToHexString(indexP);\n var hexO = decimalToHexString(indexO);\n $ERROR('#' + hexO + '-' + hexP + ' ');\n } \n else {\n var hexP = decimalToHexString(indexP);\n $ERROR('#' + hexP + ' ');\n } \n indexO = index;\n } \n }\n indexP = index;\n errorCount++; \n } \n}\n\nif (errorCount > 0) {\n if ((indexP - indexO) !== 0) {\n var hexP = decimalToHexString(indexP);\n var hexO = decimalToHexString(indexO);\n $ERROR('#' + hexO + '-' + hexP + ' ');\n } else {\n var hexP = decimalToHexString(indexP);\n $ERROR('#' + hexP + ' ');\n } \n $ERROR('Total error: ' + errorCount + ' bad Unicode character in ' + count + ' ');\n}\n\nfunction decimalToHexString(n) {\n n = Number(n);\n var h = \"\";\n for (var i = 3; i >= 0; i--) {\n if (n >= Math.pow(16, i)) {\n var t = Math.floor(n / Math.pow(16, i));\n n -= t * Math.pow(16, i);\n if ( t >= 10 ) {\n if ( t == 10 ) { h += \"A\"; }\n if ( t == 11 ) { h += \"B\"; }\n if ( t == 12 ) { h += \"C\"; }\n if ( t == 13 ) { h += \"D\"; }\n if ( t == 14 ) { h += \"E\"; }\n if ( t == 15 ) { h += \"F\"; }\n } else {\n h += String(t);\n }\n } else {\n h += \"0\";\n }\n }\n return h;\n}\n",
+ "id": "S15.1.3.2_A1.4_T1"
+ },
+ {
+ "section": "15.1.3.2",
+ "description": "Complex tests. B = [0xE0 - 0xEF]",
+ "test": "errorCount = 0;\ncount = 0;\nvar indexP;\nvar indexO = 0;\n\nfor (index = 0xE0; index <= 0xEF; index++) {\n count++; \n str = \"\";\n result = true;\n for (len = 0; len < 6; len++) {\n hex = decimalToHexString(index);\n try {\n decodeURIComponent(\"%\" + hex.substring(2) + str); \n } catch (e) { \n if ((e instanceof URIError) === true) continue; \n }\n result = false;\n str = str + \"1\";\n }\n if (result !== true) {\n if (indexO === 0) { \n indexO = index;\n } else {\n if ((index - indexP) !== 1) { \n if ((indexP - indexO) !== 0) {\n var hexP = decimalToHexString(indexP);\n var hexO = decimalToHexString(indexO);\n $ERROR('#' + hexO + '-' + hexP + ' ');\n } \n else {\n var hexP = decimalToHexString(indexP);\n $ERROR('#' + hexP + ' ');\n } \n indexO = index;\n } \n }\n indexP = index;\n errorCount++; \n } \n}\n\nif (errorCount > 0) {\n if ((indexP - indexO) !== 0) {\n var hexP = decimalToHexString(indexP);\n var hexO = decimalToHexString(indexO);\n $ERROR('#' + hexO + '-' + hexP + ' ');\n } else {\n var hexP = decimalToHexString(indexP);\n $ERROR('#' + hexP + ' ');\n } \n $ERROR('Total error: ' + errorCount + ' bad Unicode character in ' + count + ' ');\n}\n\nfunction decimalToHexString(n) {\n n = Number(n);\n var h = \"\";\n for (var i = 3; i >= 0; i--) {\n if (n >= Math.pow(16, i)) {\n var t = Math.floor(n / Math.pow(16, i));\n n -= t * Math.pow(16, i);\n if ( t >= 10 ) {\n if ( t == 10 ) { h += \"A\"; }\n if ( t == 11 ) { h += \"B\"; }\n if ( t == 12 ) { h += \"C\"; }\n if ( t == 13 ) { h += \"D\"; }\n if ( t == 14 ) { h += \"E\"; }\n if ( t == 15 ) { h += \"F\"; }\n } else {\n h += String(t);\n }\n } else {\n h += \"0\";\n }\n }\n return h;\n}\n",
+ "id": "S15.1.3.2_A1.5_T1"
+ },
+ {
+ "section": "15.1.3.2",
+ "description": "Complex tests. B = [0xF0 - 0xF7]",
+ "test": "errorCount = 0;\ncount = 0;\nvar indexP;\nvar indexO = 0;\n\nfor (index = 0xF0; index <= 0xF7; index++) {\n count++; \n str = \"\";\n result = true;\n for (len = 0; len < 9; len++) {\n hex = decimalToHexString(index);\n try {\n decodeURIComponent(\"%\" + hex.substring(2) + str); \n } catch (e) { \n if ((e instanceof URIError) === true) continue; \n }\n result = false;\n str = str + \"1\";\n }\n if (result !== true) {\n if (indexO === 0) { \n indexO = index;\n } else {\n if ((index - indexP) !== 1) { \n if ((indexP - indexO) !== 0) {\n var hexP = decimalToHexString(indexP);\n var hexO = decimalToHexString(indexO);\n $ERROR('#' + hexO + '-' + hexP + ' ');\n } \n else {\n var hexP = decimalToHexString(indexP);\n $ERROR('#' + hexP + ' ');\n } \n indexO = index;\n } \n }\n indexP = index;\n errorCount++; \n } \n}\n\nif (errorCount > 0) {\n if ((indexP - indexO) !== 0) {\n var hexP = decimalToHexString(indexP);\n var hexO = decimalToHexString(indexO);\n $ERROR('#' + hexO + '-' + hexP + ' ');\n } else {\n var hexP = decimalToHexString(indexP);\n $ERROR('#' + hexP + ' ');\n } \n $ERROR('Total error: ' + errorCount + ' bad Unicode character in ' + count + ' ');\n}\n\nfunction decimalToHexString(n) {\n n = Number(n);\n var h = \"\";\n for (var i = 3; i >= 0; i--) {\n if (n >= Math.pow(16, i)) {\n var t = Math.floor(n / Math.pow(16, i));\n n -= t * Math.pow(16, i);\n if ( t >= 10 ) {\n if ( t == 10 ) { h += \"A\"; }\n if ( t == 11 ) { h += \"B\"; }\n if ( t == 12 ) { h += \"C\"; }\n if ( t == 13 ) { h += \"D\"; }\n if ( t == 14 ) { h += \"E\"; }\n if ( t == 15 ) { h += \"F\"; }\n } else {\n h += String(t);\n }\n } else {\n h += \"0\";\n }\n }\n return h;\n}\n",
+ "id": "S15.1.3.2_A1.6_T1"
+ },
+ {
+ "section": "15.1.3.2",
+ "description": "Complex tests. B = [0xC0 - 0xDF]",
+ "test": "errorCount = 0;\ncount = 0;\nvar indexP;\nvar indexO = 0;\n\nfor (index = 0xC0; index <= 0xDF; index++) {\n count++; \n hex = decimalToHexString(index);\n try {\n decodeURIComponent(\"%\" + hex.substring(2) + \"111\");\n } catch (e) { \n if ((e instanceof URIError) === true) continue; \n }\n if (indexO === 0) { \n indexO = index;\n } else {\n if ((index - indexP) !== 1) { \n if ((indexP - indexO) !== 0) {\n var hexP = decimalToHexString(indexP);\n var hexO = decimalToHexString(indexO);\n $ERROR('#' + hexO + '-' + hexP + ' ');\n } \n else {\n var hexP = decimalToHexString(indexP);\n $ERROR('#' + hexP + ' ');\n } \n indexO = index;\n } \n }\n indexP = index;\n errorCount++; \n}\n\nif (errorCount > 0) {\n if ((indexP - indexO) !== 0) {\n var hexP = decimalToHexString(indexP);\n var hexO = decimalToHexString(indexO);\n $ERROR('#' + hexO + '-' + hexP + ' ');\n } else {\n var hexP = decimalToHexString(indexP);\n $ERROR('#' + hexP + ' ');\n } \n $ERROR('Total error: ' + errorCount + ' bad Unicode character in ' + count + ' ');\n}\n\nfunction decimalToHexString(n) {\n n = Number(n);\n var h = \"\";\n for (var i = 3; i >= 0; i--) {\n if (n >= Math.pow(16, i)) {\n var t = Math.floor(n / Math.pow(16, i));\n n -= t * Math.pow(16, i);\n if ( t >= 10 ) {\n if ( t == 10 ) { h += \"A\"; }\n if ( t == 11 ) { h += \"B\"; }\n if ( t == 12 ) { h += \"C\"; }\n if ( t == 13 ) { h += \"D\"; }\n if ( t == 14 ) { h += \"E\"; }\n if ( t == 15 ) { h += \"F\"; }\n } else {\n h += String(t);\n }\n } else {\n h += \"0\";\n }\n }\n return h;\n}\n",
+ "id": "S15.1.3.2_A1.7_T1"
+ },
+ {
+ "section": "15.1.3.2",
+ "description": "Complex tests. B = [0xE0 - 0xEF],\nstring.charAt(k + 3) not equal \"%\"",
+ "test": "errorCount = 0;\ncount = 0;\nvar indexP;\nvar indexO = 0;\n\nfor (index = 0xE0; index <= 0xEF; index++) {\n count++; \n hex = decimalToHexString(index);\n try {\n decodeURIComponent(\"%\" + hex.substring(2) + \"111%A0\");\n } catch (e) { \n if ((e instanceof URIError) === true) continue; \n }\n if (indexO === 0) { \n indexO = index;\n } else {\n if ((index - indexP) !== 1) { \n if ((indexP - indexO) !== 0) {\n var hexP = decimalToHexString(indexP);\n var hexO = decimalToHexString(indexO);\n $ERROR('#' + hexO + '-' + hexP + ' ');\n } \n else {\n var hexP = decimalToHexString(indexP);\n $ERROR('#' + hexP + ' ');\n } \n indexO = index;\n } \n }\n indexP = index;\n errorCount++; \n}\n\nif (errorCount > 0) {\n if ((indexP - indexO) !== 0) {\n var hexP = decimalToHexString(indexP);\n var hexO = decimalToHexString(indexO);\n $ERROR('#' + hexO + '-' + hexP + ' ');\n } else {\n var hexP = decimalToHexString(indexP);\n $ERROR('#' + hexP + ' ');\n } \n $ERROR('Total error: ' + errorCount + ' bad Unicode character in ' + count + ' ');\n}\n\nfunction decimalToHexString(n) {\n n = Number(n);\n var h = \"\";\n for (var i = 3; i >= 0; i--) {\n if (n >= Math.pow(16, i)) {\n var t = Math.floor(n / Math.pow(16, i));\n n -= t * Math.pow(16, i);\n if ( t >= 10 ) {\n if ( t == 10 ) { h += \"A\"; }\n if ( t == 11 ) { h += \"B\"; }\n if ( t == 12 ) { h += \"C\"; }\n if ( t == 13 ) { h += \"D\"; }\n if ( t == 14 ) { h += \"E\"; }\n if ( t == 15 ) { h += \"F\"; }\n } else {\n h += String(t);\n }\n } else {\n h += \"0\";\n }\n }\n return h;\n}\n",
+ "id": "S15.1.3.2_A1.8_T1"
+ },
+ {
+ "section": "15.1.3.2",
+ "description": "Complex tests. B = [0xE0 - 0xEF],\nstring.charAt(k + 6) not equal \"%\"",
+ "test": "errorCount = 0;\ncount = 0;\nvar indexP;\nvar indexO = 0;\n\nfor (index = 0xE0; index <= 0xEF; index++) {\n count++; \n hex = decimalToHexString(index);\n try {\n decodeURIComponent(\"%\" + hex.substring(2) + \"%A0111\");\n } catch (e) { \n if ((e instanceof URIError) === true) continue; \n }\n if (indexO === 0) { \n indexO = index;\n } else {\n if ((index - indexP) !== 1) { \n if ((indexP - indexO) !== 0) {\n var hexP = decimalToHexString(indexP);\n var hexO = decimalToHexString(indexO);\n $ERROR('#' + hexO + '-' + hexP + ' ');\n } \n else {\n var hexP = decimalToHexString(indexP);\n $ERROR('#' + hexP + ' ');\n } \n indexO = index;\n } \n }\n indexP = index;\n errorCount++; \n}\n\nif (errorCount > 0) {\n if ((indexP - indexO) !== 0) {\n var hexP = decimalToHexString(indexP);\n var hexO = decimalToHexString(indexO);\n $ERROR('#' + hexO + '-' + hexP + ' ');\n } else {\n var hexP = decimalToHexString(indexP);\n $ERROR('#' + hexP + ' ');\n } \n $ERROR('Total error: ' + errorCount + ' bad Unicode character in ' + count + ' ');\n}\n\nfunction decimalToHexString(n) {\n n = Number(n);\n var h = \"\";\n for (var i = 3; i >= 0; i--) {\n if (n >= Math.pow(16, i)) {\n var t = Math.floor(n / Math.pow(16, i));\n n -= t * Math.pow(16, i);\n if ( t >= 10 ) {\n if ( t == 10 ) { h += \"A\"; }\n if ( t == 11 ) { h += \"B\"; }\n if ( t == 12 ) { h += \"C\"; }\n if ( t == 13 ) { h += \"D\"; }\n if ( t == 14 ) { h += \"E\"; }\n if ( t == 15 ) { h += \"F\"; }\n } else {\n h += String(t);\n }\n } else {\n h += \"0\";\n }\n }\n return h;\n}\n",
+ "id": "S15.1.3.2_A1.8_T2"
+ },
+ {
+ "section": "15.1.3.2",
+ "description": "Complex tests. B = [0xF0 - 0x0F7],\nstring.charAt(k + 3) not equal \"%\"",
+ "test": "errorCount = 0;\ncount = 0;\nvar indexP;\nvar indexO = 0;\n\nfor (index = 0xF0; index <= 0xF7; index++) {\n count++; \n hex = decimalToHexString(index);\n try {\n decodeURIComponent(\"%\" + hex.substring(2) + \"111%A0%A0\");\n } catch (e) { \n if ((e instanceof URIError) === true) continue; \n }\n if (indexO === 0) { \n indexO = index;\n } else {\n if ((index - indexP) !== 1) { \n if ((indexP - indexO) !== 0) {\n var hexP = decimalToHexString(indexP);\n var hexO = decimalToHexString(indexO);\n $ERROR('#' + hexO + '-' + hexP + ' ');\n } \n else {\n var hexP = decimalToHexString(indexP);\n $ERROR('#' + hexP + ' ');\n } \n indexO = index;\n } \n }\n indexP = index;\n errorCount++; \n}\n\nif (errorCount > 0) {\n if ((indexP - indexO) !== 0) {\n var hexP = decimalToHexString(indexP);\n var hexO = decimalToHexString(indexO);\n $ERROR('#' + hexO + '-' + hexP + ' ');\n } else {\n var hexP = decimalToHexString(indexP);\n $ERROR('#' + hexP + ' ');\n } \n $ERROR('Total error: ' + errorCount + ' bad Unicode character in ' + count + ' ');\n}\n\nfunction decimalToHexString(n) {\n n = Number(n);\n var h = \"\";\n for (var i = 3; i >= 0; i--) {\n if (n >= Math.pow(16, i)) {\n var t = Math.floor(n / Math.pow(16, i));\n n -= t * Math.pow(16, i);\n if ( t >= 10 ) {\n if ( t == 10 ) { h += \"A\"; }\n if ( t == 11 ) { h += \"B\"; }\n if ( t == 12 ) { h += \"C\"; }\n if ( t == 13 ) { h += \"D\"; }\n if ( t == 14 ) { h += \"E\"; }\n if ( t == 15 ) { h += \"F\"; }\n } else {\n h += String(t);\n }\n } else {\n h += \"0\";\n }\n }\n return h;\n}\n",
+ "id": "S15.1.3.2_A1.9_T1"
+ },
+ {
+ "section": "15.1.3.2",
+ "description": "Complex tests. B = [0xF0 - 0x0F7],\nstring.charAt(k + 6) not equal \"%\"",
+ "test": "errorCount = 0;\ncount = 0;\nvar indexP;\nvar indexO = 0;\n\nfor (index = 0xF0; index <= 0xF7; index++) {\n count++; \n hex = decimalToHexString(index);\n try {\n decodeURIComponent(\"%\" + hex.substring(2) + \"%A0111%A0\");\n } catch (e) { \n if ((e instanceof URIError) === true) continue; \n }\n if (indexO === 0) { \n indexO = index;\n } else {\n if ((index - indexP) !== 1) { \n if ((indexP - indexO) !== 0) {\n var hexP = decimalToHexString(indexP);\n var hexO = decimalToHexString(indexO);\n $ERROR('#' + hexO + '-' + hexP + ' ');\n } \n else {\n var hexP = decimalToHexString(indexP);\n $ERROR('#' + hexP + ' ');\n } \n indexO = index;\n } \n }\n indexP = index;\n errorCount++; \n}\n\nif (errorCount > 0) {\n if ((indexP - indexO) !== 0) {\n var hexP = decimalToHexString(indexP);\n var hexO = decimalToHexString(indexO);\n $ERROR('#' + hexO + '-' + hexP + ' ');\n } else {\n var hexP = decimalToHexString(indexP);\n $ERROR('#' + hexP + ' ');\n } \n $ERROR('Total error: ' + errorCount + ' bad Unicode character in ' + count + ' ');\n}\n\nfunction decimalToHexString(n) {\n n = Number(n);\n var h = \"\";\n for (var i = 3; i >= 0; i--) {\n if (n >= Math.pow(16, i)) {\n var t = Math.floor(n / Math.pow(16, i));\n n -= t * Math.pow(16, i);\n if ( t >= 10 ) {\n if ( t == 10 ) { h += \"A\"; }\n if ( t == 11 ) { h += \"B\"; }\n if ( t == 12 ) { h += \"C\"; }\n if ( t == 13 ) { h += \"D\"; }\n if ( t == 14 ) { h += \"E\"; }\n if ( t == 15 ) { h += \"F\"; }\n } else {\n h += String(t);\n }\n } else {\n h += \"0\";\n }\n }\n return h;\n}\n",
+ "id": "S15.1.3.2_A1.9_T2"
+ },
+ {
+ "section": "15.1.3.2",
+ "description": "Complex tests. B = [0xF0 - 0x0F7],\nstring.charAt(k + 9) not equal \"%\"",
+ "test": "errorCount = 0;\ncount = 0;\nvar indexP;\nvar indexO = 0;\n\nfor (index = 0xF0; index <= 0xF7; index++) {\n count++; \n hex = decimalToHexString(index);\n try {\n decodeURIComponent(\"%\" + hex.substring(2) + \"%A0%A0111\");\n } catch (e) { \n if ((e instanceof URIError) === true) continue; \n }\n if (indexO === 0) { \n indexO = index;\n } else {\n if ((index - indexP) !== 1) { \n if ((indexP - indexO) !== 0) {\n var hexP = decimalToHexString(indexP);\n var hexO = decimalToHexString(indexO);\n $ERROR('#' + hexO + '-' + hexP + ' ');\n } \n else {\n var hexP = decimalToHexString(indexP);\n $ERROR('#' + hexP + ' ');\n } \n indexO = index;\n } \n }\n indexP = index;\n errorCount++; \n}\n\nif (errorCount > 0) {\n if ((indexP - indexO) !== 0) {\n var hexP = decimalToHexString(indexP);\n var hexO = decimalToHexString(indexO);\n $ERROR('#' + hexO + '-' + hexP + ' ');\n } else {\n var hexP = decimalToHexString(indexP);\n $ERROR('#' + hexP + ' ');\n } \n $ERROR('Total error: ' + errorCount + ' bad Unicode character in ' + count + ' ');\n}\n\nfunction decimalToHexString(n) {\n n = Number(n);\n var h = \"\";\n for (var i = 3; i >= 0; i--) {\n if (n >= Math.pow(16, i)) {\n var t = Math.floor(n / Math.pow(16, i));\n n -= t * Math.pow(16, i);\n if ( t >= 10 ) {\n if ( t == 10 ) { h += \"A\"; }\n if ( t == 11 ) { h += \"B\"; }\n if ( t == 12 ) { h += \"C\"; }\n if ( t == 13 ) { h += \"D\"; }\n if ( t == 14 ) { h += \"E\"; }\n if ( t == 15 ) { h += \"F\"; }\n } else {\n h += String(t);\n }\n } else {\n h += \"0\";\n }\n }\n return h;\n}\n",
+ "id": "S15.1.3.2_A1.9_T3"
+ },
+ {
+ "section": "15.1.3.2",
+ "description": "Complex tests",
+ "test": "//CHECK\nerrorCount = 0;\ncount = 0;\nfor (indexI = 0; indexI <= 65535; indexI++) {\n if (indexI !== 0x25) {\n hex = decimalToHexString(indexI);\n try { \n var str = String.fromCharCode(indexI);\n if (decodeURIComponent(str) !== str) { \n $ERROR('#' + hex + ' ');\n errorCount++;\n } \n } catch (e){\n $ERROR('#' + hex + ' ');\n errorCount++;\n } \n count++;\n }\n} \n\nif (errorCount > 0) { \n $ERROR('Total error: ' + errorCount + ' bad Unicode character in ' + count);\n}\n\nfunction decimalToHexString(n) {\n n = Number(n);\n var h = \"\";\n for (var i = 3; i >= 0; i--) {\n if (n >= Math.pow(16, i)) {\n var t = Math.floor(n / Math.pow(16, i));\n n -= t * Math.pow(16, i);\n if ( t >= 10 ) {\n if ( t == 10 ) { h += \"A\"; }\n if ( t == 11 ) { h += \"B\"; }\n if ( t == 12 ) { h += \"C\"; }\n if ( t == 13 ) { h += \"D\"; }\n if ( t == 14 ) { h += \"E\"; }\n if ( t == 15 ) { h += \"F\"; }\n } else {\n h += String(t);\n }\n } else {\n h += \"0\";\n }\n }\n return h;\n}\n",
+ "id": "S15.1.3.2_A2.1_T1"
+ },
+ {
+ "section": "15.1.3.2",
+ "description": "Complex tests, use RFC 3629",
+ "test": "errorCount = 0;\ncount = 0;\nvar indexP;\nvar indexO = 0;\nfor (indexB1 = 0x00; indexB1 <= 0x7F; indexB1++) { \n count++;\n var hexB1 = decimalToHexString(indexB1); \n var index = indexB1; \n try {\n hex = String.fromCharCode(index);\n if (decodeURIComponent(\"%\" + hexB1.substring(2)) === hex) continue;\n } catch (e) {} \n if (indexO === 0) { \n indexO = index;\n } else {\n if ((index - indexP) !== 1) { \n if ((indexP - indexO) !== 0) {\n var hexP = decimalToHexString(indexP);\n var hexO = decimalToHexString(indexO);\n $ERROR('#' + hexO + '-' + hexP + ' ');\n } \n else {\n var hexP = decimalToHexString(indexP);\n $ERROR('#' + hexP + ' ');\n } \n indexO = index;\n } \n }\n indexP = index;\n errorCount++; \n}\n\nif (errorCount > 0) {\n if ((indexP - indexO) !== 0) {\n var hexP = decimalToHexString(indexP);\n var hexO = decimalToHexString(indexO);\n $ERROR('#' + hexO + '-' + hexP + ' ');\n } else {\n var hexP = decimalToHexString(indexP);\n $ERROR('#' + hexP + ' ');\n } \n $ERROR('Total error: ' + errorCount + ' bad Unicode character in ' + count + ' ');\n}\n\nfunction decimalToHexString(n) {\n n = Number(n);\n var h = \"\";\n for (var i = 3; i >= 0; i--) {\n if (n >= Math.pow(16, i)) {\n var t = Math.floor(n / Math.pow(16, i));\n n -= t * Math.pow(16, i);\n if ( t >= 10 ) {\n if ( t == 10 ) { h += \"A\"; }\n if ( t == 11 ) { h += \"B\"; }\n if ( t == 12 ) { h += \"C\"; }\n if ( t == 13 ) { h += \"D\"; }\n if ( t == 14 ) { h += \"E\"; }\n if ( t == 15 ) { h += \"F\"; }\n } else {\n h += String(t);\n }\n } else {\n h += \"0\";\n }\n }\n return h;\n}\n",
+ "id": "S15.1.3.2_A2.2_T1"
+ },
+ {
+ "section": "15.1.3.2",
+ "description": "Complex tests, use RFC 3629",
+ "test": "errorCount = 0;\ncount = 0;\nvar indexP;\nvar indexO = 0;\n\nfor (indexB1 = 0xC2; indexB1 <= 0xDF; indexB1++) { \n var hexB1 = decimalToHexString(indexB1);\n for (indexB2 = 0x80; indexB2 <= 0xBF; indexB2++) {\n count++;\n var hexB2 = decimalToHexString(indexB2);\n var index = (indexB1 & 0x1F) * 0x40 + (indexB2 & 0x3F); \n try {\n if (decodeURIComponent(\"%\" + hexB1.substring(2) + \"%\" + hexB2.substring(2)) === String.fromCharCode(index)) continue;\n } catch (e) {} \n if (indexO === 0) { \n indexO = index;\n } else {\n if ((index - indexP) !== 1) { \n if ((indexP - indexO) !== 0) {\n var hexP = decimalToHexString(indexP);\n var hexO = decimalToHexString(indexO);\n $ERROR('#' + hexO + '-' + hexP + ' ');\n } \n else {\n var hexP = decimalToHexString(indexP);\n $ERROR('#' + hexP + ' ');\n } \n indexO = index;\n } \n }\n indexP = index;\n errorCount++; \n }\n}\n\nif (errorCount > 0) {\n if ((indexP - indexO) !== 0) {\n var hexP = decimalToHexString(indexP);\n var hexO = decimalToHexString(indexO);\n $ERROR('#' + hexO + '-' + hexP + ' ');\n } else {\n var hexP = decimalToHexString(indexP);\n $ERROR('#' + hexP + ' ');\n } \n $ERROR('Total error: ' + errorCount + ' bad Unicode character in ' + count + ' ');\n}\n\nfunction decimalToHexString(n) {\n n = Number(n);\n var h = \"\";\n for (var i = 3; i >= 0; i--) {\n if (n >= Math.pow(16, i)) {\n var t = Math.floor(n / Math.pow(16, i));\n n -= t * Math.pow(16, i);\n if ( t >= 10 ) {\n if ( t == 10 ) { h += \"A\"; }\n if ( t == 11 ) { h += \"B\"; }\n if ( t == 12 ) { h += \"C\"; }\n if ( t == 13 ) { h += \"D\"; }\n if ( t == 14 ) { h += \"E\"; }\n if ( t == 15 ) { h += \"F\"; }\n } else {\n h += String(t);\n }\n } else {\n h += \"0\";\n }\n }\n return h;\n}\n",
+ "id": "S15.1.3.2_A2.3_T1"
+ },
+ {
+ "section": "15.1.3.2",
+ "description": "Complex tests, use RFC 3629",
+ "test": "errorCount = 0;\ncount = 0;\nvar indexP;\nvar indexO = 0;\n\nfor (indexB1 = 0xE0; indexB1 <= 0xEF; indexB1++) { \n var hexB1 = decimalToHexString(indexB1);\n for (indexB2 = 0x80; indexB2 <= 0xBF; indexB2++) {\n if ((indexB1 === 0xE0) && (indexB2 <= 0x9F)) continue;\n if ((indexB1 === 0xED) && (0xA0 <= indexB2)) continue; \n var hexB2 = decimalToHexString(indexB2);\n for (indexB3 = 0x80; indexB3 <= 0xBF; indexB3++) {\n count++;\n var hexB3 = decimalToHexString(indexB3);\n var index = (indexB1 & 0x0F) * 0x1000 + (indexB2 & 0x3F) * 0x40 + (indexB3 & 0x3F); \n try {\n if (decodeURIComponent(\"%\" + hexB1.substring(2) + \"%\" + hexB2.substring(2) + \"%\" + hexB3.substring(2)) === String.fromCharCode(index)) continue; \n } catch (e) {} \n if (indexO === 0) { \n indexO = index;\n } else {\n if ((index - indexP) !== 1) { \n if ((indexP - indexO) !== 0) {\n var hexP = decimalToHexString(indexP);\n var hexO = decimalToHexString(indexO);\n $ERROR('#' + hexO + '-' + hexP + ' ');\n } \n else {\n var hexP = decimalToHexString(indexP);\n $ERROR('#' + hexP + ' ');\n } \n indexO = index;\n } \n }\n indexP = index;\n errorCount++; \n } \n }\n}\n\nif (errorCount > 0) {\n if ((indexP - indexO) !== 0) {\n var hexP = decimalToHexString(indexP);\n var hexO = decimalToHexString(indexO);\n $ERROR('#' + hexO + '-' + hexP + ' ');\n } else {\n var hexP = decimalToHexString(indexP);\n $ERROR('#' + hexP + ' ');\n } \n $ERROR('Total error: ' + errorCount + ' bad Unicode character in ' + count + ' ');\n}\n\nfunction decimalToHexString(n) {\n n = Number(n);\n var h = \"\";\n for (var i = 3; i >= 0; i--) {\n if (n >= Math.pow(16, i)) {\n var t = Math.floor(n / Math.pow(16, i));\n n -= t * Math.pow(16, i);\n if ( t >= 10 ) {\n if ( t == 10 ) { h += \"A\"; }\n if ( t == 11 ) { h += \"B\"; }\n if ( t == 12 ) { h += \"C\"; }\n if ( t == 13 ) { h += \"D\"; }\n if ( t == 14 ) { h += \"E\"; }\n if ( t == 15 ) { h += \"F\"; }\n } else {\n h += String(t);\n }\n } else {\n h += \"0\";\n }\n }\n return h;\n}\n",
+ "id": "S15.1.3.2_A2.4_T1"
+ },
+ {
+ "section": "15.1.3.2",
+ "description": "Complex tests, use RFC 3629",
+ "test": "errorCount = 0;\ncount = 0;\nvar indexP;\nvar indexO = 0;\n\nfor (indexB1 = 0xF0; indexB1 <= 0xF4; indexB1++) { \n var hexB1 = decimalToHexString(indexB1);\n for (indexB2 = 0x80; indexB2 <= 0xBF; indexB2++) {\n if ((indexB1 === 0xF0) && (indexB2 <= 0x9F)) continue; \n if ((indexB1 === 0xF4) && (indexB2 >= 0x90)) continue;\n var hexB2 = decimalToHexString(indexB2);\n for (indexB3 = 0x80; indexB3 <= 0xBF; indexB3++) {\n var hexB3 = decimalToHexString(indexB3);\n for (indexB4 = 0x80; indexB4 <= 0xBF; indexB4++) {\n var hexB4 = decimalToHexString(indexB4);\n count++;\n var index = (indexB1 & 0x07) * 0x40000 + (indexB2 & 0x3F) * 0x1000 + (indexB3 & 0x3F) * 0x40 + (indexB4 & 0x3F);\n var L = ((index - 0x10000) & 0x03FF) + 0xDC00;\n var H = (((index - 0x10000) >> 10) & 0x03FF) + 0xD800; \n try {\n if (decodeURIComponent(\"%\" + hexB1.substring(3) + \"%\" + hexB2.substring(3) + \"%\" + hexB3.substring(3) + \"%\" + hexB4.substring(3)) === String.fromCharCode(H) + String.fromCharCode(L)) continue; \n } catch (e) {} \n if (indexO === 0) { \n indexO = index;\n } else {\n if ((index - indexP) !== 1) { \n if ((indexP - indexO) !== 0) {\n var hexP = decimalToHexString(indexP);\n var hexO = decimalToHexString(indexO);\n $ERROR('#' + hexO + '-' + hexP + ' ');\n } \n else {\n var hexP = decimalToHexString(indexP);\n $ERROR('#' + hexP + ' ');\n } \n indexO = index;\n } \n }\n indexP = index;\n errorCount++; \n }\n } \n }\n}\n\nif (errorCount > 0) {\n if ((indexP - indexO) !== 0) {\n var hexP = decimalToHexString(indexP);\n var hexO = decimalToHexString(indexO);\n $ERROR('#' + hexO + '-' + hexP + ' ');\n } else {\n var hexP = decimalToHexString(indexP);\n $ERROR('#' + hexP + ' ');\n } \n $ERROR('Total error: ' + errorCount + ' bad Unicode character in ' + count + ' ');\n}\n\nfunction decimalToHexString(n) {\n n = Number(n);\n var h = \"\";\n for (var i = 4; i >= 0; i--) {\n if (n >= Math.pow(16, i)) {\n var t = Math.floor(n / Math.pow(16, i));\n n -= t * Math.pow(16, i);\n if ( t >= 10 ) {\n if ( t == 10 ) { h += \"A\"; }\n if ( t == 11 ) { h += \"B\"; }\n if ( t == 12 ) { h += \"C\"; }\n if ( t == 13 ) { h += \"D\"; }\n if ( t == 14 ) { h += \"E\"; }\n if ( t == 15 ) { h += \"F\"; }\n } else {\n h += String(t);\n }\n } else {\n h += \"0\";\n }\n }\n return h;\n}\n",
+ "id": "S15.1.3.2_A2.5_T1"
+ },
+ {
+ "section": "15.1.3.2",
+ "description": "uriReserved and \"#\" not in reservedURIComponentSet. HexDigit in [0..9, A..F]",
+ "test": "//CHECK#1\nif (decodeURIComponent(\"%3B\") !== \";\") {\n $ERROR('#1: decodeURIComponent(\"%3B\") equal \";\", not \"%3B\"');\n}\n\n//CHECK#2\nif (decodeURIComponent(\"%2F\") !== \"/\") {\n $ERROR('#2: decodeURIComponent(\"%2F\") equal \"/\", not \"%2F\"');\n}\n\n//CHECK#3\nif (decodeURIComponent(\"%3F\") !== \"?\") {\n $ERROR('#3: decodeURIComponent(\"%3F\") equal \"?\", not \"%3F\"');\n}\n\n//CHECK#4\nif (decodeURIComponent(\"%3A\") !== \":\") {\n $ERROR('#4: decodeURIComponent(\"%3A\") equal \":\", not \"%3A\"');\n}\n\n//CHECK#5\nif (decodeURIComponent(\"%40\") !== \"@\") {\n $ERROR('#5: decodeURIComponent(\"%40\") equal \"@\", not \"%40\"');\n}\n\n//CHECK#6\nif (decodeURIComponent(\"%26\") !== \"&\") {\n $ERROR('#6: decodeURIComponent(\"%26\") equal \"&\", not \"%26\"');\n}\n\n//CHECK#7\nif (decodeURIComponent(\"%3D\") !== \"=\") {\n $ERROR('#7.1: decodeURIComponent(\"%3D\") equal \"=\", not \"%3D\"');\n}\n\n//CHECK#8\nif (decodeURIComponent(\"%2B\") !== \"+\") {\n $ERROR('#8.1: decodeURIComponent(\"%2B\") equal \"+\", not \"%2B\"');\n}\n\n//CHECK#9\nif (decodeURIComponent(\"%24\") !== \"$\") {\n $ERROR('#9: decodeURIComponent(\"%24\") equal \"$\", not \"%24\"');\n}\n\n//CHECK#10\nif (decodeURIComponent(\"%2C\") !== \",\") {\n $ERROR('#10: decodeURIComponent(\"%2C\") equal \",\", not \"%2C\"');\n}\n\n//CHECK#11\nif (decodeURIComponent(\"%23\") !== \"#\") {\n $ERROR('#11: decodeURIComponent(\"%23\") equal \"#\", not \"%23\"');\n}\n",
+ "id": "S15.1.3.2_A3_T1"
+ },
+ {
+ "section": "15.1.3.2",
+ "description": "uriReserved and \"#\" not in reservedURIComponentSet. HexDigit in [0..9, a..f]",
+ "test": "//CHECK#1\nif (decodeURIComponent(\"%3b\") !== \";\") {\n $ERROR('#1: decodeURIComponent(\"%3b\") equal \";\", not \"%3B\" or \"%3b\"');\n}\n\n//CHECK#2\nif (decodeURIComponent(\"%2f\") !== \"/\") {\n $ERROR('#2: decodeURIComponent(\"%2f\") equal \"/\", not \"%2F\" or \"%2f\"');\n}\n\n//CHECK#3\nif (decodeURIComponent(\"%3f\") !== \"?\") {\n $ERROR('#3: decodeURIComponent(\"%3f\") equal \"?\", not \"%3F\" or \"%3f\"');\n}\n\n//CHECK#4\nif (decodeURIComponent(\"%3a\") !== \":\") {\n $ERROR('#4: decodeURIComponent(\"%3a\") equal \":\", not \"%3A\" or \"%3a\"');\n}\n\n//CHECK#5\nif (decodeURIComponent(\"%40\") !== \"@\") {\n $ERROR('#5: decodeURIComponent(\"%40\") equal \"@\", not \"%40\"');\n}\n\n//CHECK#6\nif (decodeURIComponent(\"%26\") !== \"&\") {\n $ERROR('#6: decodeURIComponent(\"%26\") equal \"&\", not \"%26\"');\n}\n\n//CHECK#7\nif (decodeURIComponent(\"%3d\") !== \"=\") {\n $ERROR('#7.1: decodeURIComponent(\"%3d\") equal \"=\", not \"%3D\" or \"%3d\"');\n}\n\n//CHECK#8\nif (decodeURIComponent(\"%2b\") !== \"+\") {\n $ERROR('#8.1: decodeURIComponent(\"%2b\") equal \"+\", not \"%2B\" or \"%2b\"');\n}\n\n//CHECK#9\nif (decodeURIComponent(\"%24\") !== \"$\") {\n $ERROR('#9: decodeURIComponent(\"%24\") equal \"$\", not \"%24\"');\n}\n\n//CHECK#10\nif (decodeURIComponent(\"%2c\") !== \",\") {\n $ERROR('#10: decodeURIComponent(\"%2c\") equal \",\", not \"%2C\" or \"%2c\"');\n}\n\n//CHECK#11\nif (decodeURIComponent(\"%23\") !== \"#\") {\n $ERROR('#11: decodeURIComponent(\"%23\") equal \"#\", not \"%23\"');\n}\n",
+ "id": "S15.1.3.2_A3_T2"
+ },
+ {
+ "section": "15.1.3.2",
+ "description": "Complex test",
+ "test": "//CHECK#1\nif (decodeURIComponent(\"%3B%2F%3F%3A%40%26%3D%2B%24%2C%23\") !== \";/?:@&=+$,#\") {\n $ERROR('#1: decodeURIComponent(\"%3B%2F%3F%3A%40%26%3D%2B%24%2C%23\") equal \";/?:@&=+$,#\", not \"%3B%2F%3F%3A%40%26%3D%2B%24%2C%23\"');\n}\n\n//CHECK#2\nif (decodeURIComponent(\"%3b%2f%3f%3a%40%26%3d%2b%24%2c%23\") !== \";/?:@&=+$,#\") {\n $ERROR('#2: decodeURIComponent(\"%3b%2f%3f%3a%40%26%3d%2b%24%2c%23\") equal \";/?:@&=+$,#\" or \"%3B%2F%3F%3A%40%26%3D%2B%24%2C%23\", not \"%3b%2f%3f%3a%40%26%3d%2b%24%2c%23\"');\n}\n",
+ "id": "S15.1.3.2_A3_T3"
+ },
+ {
+ "section": "15.1.3.2",
+ "description": "Checking ENGLISH ALPHABET",
+ "test": "//CHECK#1\nif (decodeURIComponent(\"http://unipro.ru/0123456789\") !== \"http://unipro.ru/0123456789\") {\n $ERROR('#1: http://unipro.ru/0123456789');\n}\n\n//CHECK#2\nif (decodeURIComponent(\"%41%42%43%44%45%46%47%48%49%4A%4B%4C%4D%4E%4F%50%51%52%53%54%55%56%57%58%59%5A\") !== \"ABCDEFGHIJKLMNOPQRSTUVWXYZ\") {\n $ERROR('#2: ABCDEFGHIJKLMNOPQRSTUVWXYZ');\n}\n\n//CHECK#3\nif (decodeURIComponent(\"%61%62%63%64%65%66%67%68%69%6A%6B%6C%6D%6E%6F%70%71%72%73%74%75%76%77%78%79%7A\") !== \"abcdefghijklmnopqrstuvwxyz\") {\n $ERROR('#3: abcdefghijklmnopqrstuvwxyz');\n}\n",
+ "id": "S15.1.3.2_A4_T1"
+ },
+ {
+ "section": "15.1.3.2",
+ "description": "Checking RUSSIAN ALPHABET",
+ "test": "//CHECK#1\nif (decodeURIComponent(\"http://ru.wikipedia.org/wiki/%d0%ae%D0%bd%D0%B8%D0%BA%D0%BE%D0%B4\") !== \"http://ru.wikipedia.org/wiki/Юникод\") {\n $ERROR('#1: http://ru.wikipedia.org/wiki/Юникод');\n}\n\n//CHECK#2\nif (decodeURIComponent(\"http://ru.wikipedia.org/wiki/%D0%AE%D0%BD%D0%B8%D0%BA%D0%BE%D0%B4#%D0%A1%D1%81%D1%8B%D0%BB%D0%BA%D0%B8\") !== \"http://ru.wikipedia.org/wiki/Юникод#Ссылки\") {\n $ERROR('#2: http://ru.wikipedia.org/wiki/Юникод#Ссылки');\n}\n\n//CHECK#3\nif (decodeURIComponent(\"http://ru.wikipedia.org/wiki/%D0%AE%D0%BD%D0%B8%D0%BA%D0%BE%D0%B4%23%D0%92%D0%B5%D1%80%D1%81%D0%B8%D0%B8%20%D0%AE%D0%BD%D0%B8%D0%BA%D0%BE%D0%B4%D0%B0\") !== \"http://ru.wikipedia.org/wiki/Юникод#Версии Юникода\") {\n $ERROR('#3: http://ru.wikipedia.org/wiki/Юникод%23Версии Юникода');\n}\n",
+ "id": "S15.1.3.2_A4_T2"
+ },
+ {
+ "section": "15.1.3.2",
+ "description": "Checking URL with Line Terminator",
+ "test": "//CHECK#1\nif (decodeURIComponent(\"http://unipro.ru/%0Aabout\") !== \"http://unipro.ru/\\nabout\") {\n $ERROR('#1: http://unipro.ru/%A0about');\n}\n\n//CHECK#2\nif (decodeURIComponent(\"http://unipro.ru/%0Babout\") !== \"http://unipro.ru/\\vabout\") {\n $ERROR('#2: http://unipro.ru/%0Babout');\n}\n\n//CHECK#3\nif (decodeURIComponent(\"http://unipro.ru/%0Cabout\") !== \"http://unipro.ru/\\fabout\") {\n $ERROR('#3: http://unipro.ru/%0Cabout');\n}\n\n//CHECK#4\nif (decodeURIComponent(\"http://unipro.ru/%0Dabout\") !== \"http://unipro.ru/\\rabout\") {\n $ERROR('#4: http://unipro.ru/%0Dabout');\n}\n",
+ "id": "S15.1.3.2_A4_T3"
+ },
+ {
+ "section": "15.1.3.2",
+ "description": "Test some url",
+ "test": "//CHECK#1\nif (decodeURIComponent(\"\") !== \"\") {\n $ERROR('#1: \"\"');\n}\n\n//CHECK#2\nif (decodeURIComponent(\"http://unipro.ru\") !== \"http://unipro.ru\") {\n $ERROR('#2: http://unipro.ru');\n}\n\n//CHECK#3\nif (decodeURIComponent(\"http:%2f%2Fwww.google.ru/support/jobs/bin/static.py%3Fpage%3dwhy-ru.html%26sid%3Dliveandwork\") !== \"http://www.google.ru/support/jobs/bin/static.py?page=why-ru.html&sid=liveandwork\") {\n $ERROR('#3: http:%2f%2Fwww.google.ru/support/jobs/bin/static.py%3Fpage3dwhy-ru.html%26sid3Dliveandwork\"');\n} \n\n//CHECK#4\nif (decodeURIComponent(\"http:%2F%2Fen.wikipedia.org/wiki/UTF-8%23Description\") !== \"http://en.wikipedia.org/wiki/UTF-8#Description\") {\n $ERROR('#4: http:%2F%2Fen.wikipedia.org/wiki/UTF-8%23Description');\n}\n",
+ "id": "S15.1.3.2_A4_T4"
+ },
+ {
+ "section": "15.1.3.2, 15.2.4.7, 12.6.4",
+ "description": "Checking use propertyIsEnumerable, for-in",
+ "test": "//CHECK#1\nif (decodeURIComponent.propertyIsEnumerable('length') !== false) {\n $ERROR('#1: decodeURIComponent.propertyIsEnumerable(\\'length\\') === false. Actual: ' + (decodeURIComponent.propertyIsEnumerable('length')));\n}\n\n//CHECK#2\nresult = true;\nfor (p in decodeURIComponent){\n if (p === \"length\") {\n result = false;\n } \n}\n\nif (result !== true) {\n $ERROR('#2: result = true; for (p in decodeURIComponent) { if (p === \"length\") result = false; } result === true;');\n}\n",
+ "id": "S15.1.3.2_A5.1"
+ },
+ {
+ "section": "15.1.3.2, 15.2.4.5, 11.4.1",
+ "description": "Checking use hasOwnProperty, delete",
+ "test": "//CHECK#1\nif (decodeURIComponent.hasOwnProperty('length') !== true) {\n $FAIL('#1: decodeURIComponent.hasOwnProperty(\\'length\\') === true. Actual: ' + (decodeURIComponent.hasOwnProperty('length')));\n}\n\ndelete decodeURIComponent.length;\n\n//CHECK#2\nif (decodeURIComponent.hasOwnProperty('length') !== true) {\n $ERROR('#2: delete decodeURIComponent.length; decodeURIComponent.hasOwnProperty(\\'length\\') === true. Actual: ' + (decodeURIComponent.hasOwnProperty('length')));\n}\n\n//CHECK#3\nif (decodeURIComponent.length === undefined) {\n $ERROR('#3: delete decodeURIComponent.length; decodeURIComponent.length !== undefined');\n}\n\n\n\n",
+ "id": "S15.1.3.2_A5.2"
+ },
+ {
+ "section": "15.1.3.2",
+ "description": "Checking if varying the length property fails",
+ "test": "//CHECK#1\nx = decodeURIComponent.length;\ndecodeURIComponent.length = Infinity;\nif (decodeURIComponent.length !== x) {\n $ERROR('#1: x = decodeURIComponent.length; decodeURIComponent.length = Infinity; decodeURIComponent.length === x. Actual: ' + (decodeURIComponent.length));\n}\n\n",
+ "id": "S15.1.3.2_A5.3"
+ },
+ {
+ "section": "15.1.3.2",
+ "description": "decodeURIComponent.length === 1",
+ "test": "//CHECK#1\nif (decodeURIComponent.length !== 1) {\n $ERROR('#1: decodeURIComponent.length === 1. Actual: ' + (decodeURIComponent.length));\n} \n\n",
+ "id": "S15.1.3.2_A5.4"
+ },
+ {
+ "section": "15.1.3.2, 15.2.4.7, 12.6.4",
+ "description": "Checking use propertyIsEnumerable, for-in",
+ "test": "//CHECK#1\nif (this.propertyIsEnumerable('decodeURIComponent') !== false) {\n $ERROR('#1: this.propertyIsEnumerable(\\'decodeURIComponent\\') === false. Actual: ' + (this.propertyIsEnumerable('decodeURIComponent')));\n}\n\n//CHECK#2\nresult = true;\nfor (p in this){\n if (p === \"decodeURIComponent\") {\n result = false;\n } \n}\n\nif (result !== true) {\n $ERROR('#2: result = true; for (p in this) { if (p === \"decodeURIComponent\") result = false; } result === true;');\n}\n",
+ "id": "S15.1.3.2_A5.5"
+ },
+ {
+ "section": "15.1.3.2",
+ "description": "Checking decodeURIComponent.prototype",
+ "test": "//CHECK#1\nif (decodeURIComponent.prototype !== undefined) {\n $ERROR('#1: decodeURIComponent.prototype === undefined. Actual: ' + (decodeURIComponent.prototype));\n}\n",
+ "id": "S15.1.3.2_A5.6"
+ },
+ {
+ "section": "15.1.3.2, 11.2.2",
+ "description": "If property does not implement the internal [[Construct]] method, throw a TypeError exception",
+ "test": "//CHECK#1\n\ntry {\n new decodeURIComponent();\n $ERROR('#1.1: new decodeURIComponent() throw TypeError. Actual: ' + (new decodeURIComponent()));\n} catch (e) {\n if ((e instanceof TypeError) !== true) {\n $ERROR('#1.2: new decodeURIComponent() throw TypeError. Actual: ' + (e));\n }\n}\n",
+ "id": "S15.1.3.2_A5.7"
+ },
+ {
+ "section": "15.1.3.2, 9.8, 8.6.2.6",
+ "description": "If Type(value) is Object, evaluate ToPrimitive(value, String)",
+ "test": "//CHECK#1\nvar object = {valueOf: function() {return \"%5E\"}};\nif (decodeURIComponent(object) !== \"[object Object]\") {\n $ERROR('#1: var object = {valueOf: function() {return \"%5E\"}}; decodeURIComponent(object) === [object Object]. Actual: ' + (decodeURIComponent(object)));\n}\n\n//CHECK#2\nvar object = {valueOf: function() {return \"\"}, toString: function() {return \"%5E\"}};\nif (decodeURIComponent(object) !== \"^\") {\n $ERROR('#2: var object = {valueOf: function() {return \"\"}, toString: function() {return \"%5E\"}}; decodeURIComponent(object) === \"^\". Actual: ' + (decodeURIComponent(object)));\n} \n\n//CHECK#3\nvar object = {valueOf: function() {return \"%5E\"}, toString: function() {return {}}};\nif (decodeURIComponent(object) !== \"^\") {\n $ERROR('#3: var object = {valueOf: function() {return \"%5E\"}, toString: function() {return {}}}; decodeURIComponent(object) === \"^\". Actual: ' + (decodeURIComponent(object)));\n}\n\n//CHECK#4\ntry {\n var object = {valueOf: function() {throw \"error\"}, toString: function() {return \"%5E\"}};\n if (decodeURIComponent(object) !== \"^\") {\n $ERROR('#4.1: var object = {valueOf: function() {throw \"error\"}, toString: function() {return \"%5E\"}}; decodeURIComponent(object) === \"^\". Actual: ' + (decodeURIComponent(object)));\n }\n}\ncatch (e) {\n if (e === \"error\") {\n $ERROR('#4.2: var object = {valueOf: function() {throw \"error\"}, toString: function() {return \"%5E\"}}; decodeURIComponent(object) not throw \"error\"');\n } else {\n $ERROR('#4.3: var object = {valueOf: function() {throw \"error\"}, toString: function() {return \"%5E\"}}; decodeURIComponent(object) not throw Error. Actual: ' + (e));\n }\n}\n\n//CHECK#5\nvar object = {toString: function() {return \"%5E\"}};\nif (decodeURIComponent(object) !== \"^\") {\n $ERROR('#5: var object = {toString: function() {return \"%5E\"}}; decodeURIComponent(object) === \"^\". Actual: ' + (decodeURIComponent(object)));\n}\n\n//CHECK#6\nvar object = {valueOf: function() {return {}}, toString: function() {return \"%5E\"}}\nif (decodeURIComponent(object) !== \"^\") {\n $ERROR('#6: var object = {valueOf: function() {return {}}, toString: function() {return \"%5E\"}}; decodeURIComponent(object) === \"^\". Actual: ' + (decodeURIComponent(object)));\n}\n\n//CHECK#7\ntry {\n var object = {valueOf: function() {return \"%5E\"}, toString: function() {throw \"error\"}};\n decodeURIComponent(object);\n $ERROR('#7.1: var object = {valueOf: function() {return \"%5E\"}, toString: function() {throw \"error\"}}; decodeURIComponent(object) throw \"error\". Actual: ' + (decodeURIComponent(object)));\n} \ncatch (e) {\n if (e !== \"error\") {\n $ERROR('#7.2: var object = {valueOf: function() {return \"%5E\"}, toString: function() {throw \"error\"}}; decodeURIComponent(object) throw \"error\". Actual: ' + (e));\n } \n}\n\n//CHECK#8\ntry {\n var object = {valueOf: function() {return {}}, toString: function() {return {}}};\n decodeURIComponent(object);\n $ERROR('#8.1: var object = {valueOf: function() {return {}}, toString: function() {return {}}}; decodeURIComponent(object) throw TypeError. Actual: ' + (decodeURIComponent(object)));\n} \ncatch (e) {\n if ((e instanceof TypeError) !== true) {\n $ERROR('#8.2: var object = {valueOf: function() {return {}}, toString: function() {return {}}}; decodeURIComponent(object) throw TypeError. Actual: ' + (e));\n } \n}\n",
+ "id": "S15.1.3.2_A6_T1"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.1.3.3_encodeURI.json b/website/resources/scripts/testcases2/15.1.3.3_encodeURI.json
new file mode 100644
index 000000000..0e2e42d12
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.1.3.3_encodeURI.json
@@ -0,0 +1,176 @@
+{
+ "testCollection": {
+ "name": "15.1.3.3_encodeURI",
+ "numTests": 28,
+ "tests": [
+ {
+ "section": "15.1.3.3",
+ "description": "Complex tests",
+ "test": "errorCount = 0;\ncount = 0;\nvar indexP;\nvar indexO = 0;\n\nfor (index = 0xDC00; index <= 0xDFFF; index++) {\n count++; \n hex = decimalToHexString(index);\n try {\n encodeURI(String.fromCharCode(index));\n } catch (e) { \n if ((e instanceof URIError) === true) continue; \n }\n if (indexO === 0) { \n indexO = index;\n } else {\n if ((index - indexP) !== 1) { \n if ((indexP - indexO) !== 0) {\n var hexP = decimalToHexString(indexP);\n var hexO = decimalToHexString(indexO);\n $ERROR('#' + hexO + '-' + hexP + ' ');\n } \n else {\n var hexP = decimalToHexString(indexP);\n $ERROR('#' + hexP + ' ');\n } \n indexO = index;\n } \n }\n indexP = index;\n errorCount++; \n}\n\nif (errorCount > 0) {\n if ((indexP - indexO) !== 0) {\n var hexP = decimalToHexString(indexP);\n var hexO = decimalToHexString(indexO);\n $ERROR('#' + hexO + '-' + hexP + ' ');\n } else {\n var hexP = decimalToHexString(indexP);\n $ERROR('#' + hexP + ' ');\n } \n $ERROR('Total error: ' + errorCount + ' bad Unicode character in ' + count + ' ');\n}\n\nfunction decimalToHexString(n) {\n n = Number(n);\n var h = \"\";\n for (var i = 3; i >= 0; i--) {\n if (n >= Math.pow(16, i)) {\n var t = Math.floor(n / Math.pow(16, i));\n n -= t * Math.pow(16, i);\n if ( t >= 10 ) {\n if ( t == 10 ) { h += \"A\"; }\n if ( t == 11 ) { h += \"B\"; }\n if ( t == 12 ) { h += \"C\"; }\n if ( t == 13 ) { h += \"D\"; }\n if ( t == 14 ) { h += \"E\"; }\n if ( t == 15 ) { h += \"F\"; }\n } else {\n h += String(t);\n }\n } else {\n h += \"0\";\n }\n }\n return h;\n}\n",
+ "id": "S15.1.3.3_A1.1_T1"
+ },
+ {
+ "section": "15.1.3.3",
+ "description": "Complex tests",
+ "test": "errorCount = 0;\ncount = 0;\nvar indexP;\nvar indexO = 0;\n\nfor (index = 0xDC00; index <= 0xDFFF; index++) { \n count++; \n hex = decimalToHexString(index);\n try {\n encodeURI(String.fromCharCode(index, 0x0041));\n } catch (e) { \n if ((e instanceof URIError) === true) continue; \n }\n if (indexO === 0) { \n indexO = index;\n } else {\n if ((index - indexP) !== 1) { \n if ((indexP - indexO) !== 0) {\n var hexP = decimalToHexString(indexP);\n var hexO = decimalToHexString(indexO);\n $ERROR('#' + hexO + '-' + hexP + ' ');\n } \n else {\n var hexP = decimalToHexString(indexP);\n $ERROR('#' + hexP + ' ');\n } \n indexO = index;\n } \n }\n indexP = index;\n errorCount++; \n}\n\nif (errorCount > 0) {\n if ((indexP - indexO) !== 0) {\n var hexP = decimalToHexString(indexP);\n var hexO = decimalToHexString(indexO);\n $ERROR('#' + hexO + '-' + hexP + ' ');\n } else {\n var hexP = decimalToHexString(indexP);\n $ERROR('#' + hexP + ' ');\n } \n $ERROR('Total error: ' + errorCount + ' bad Unicode character in ' + count + ' ');\n}\n\nfunction decimalToHexString(n) {\n n = Number(n);\n var h = \"\";\n for (var i = 3; i >= 0; i--) {\n if (n >= Math.pow(16, i)) {\n var t = Math.floor(n / Math.pow(16, i));\n n -= t * Math.pow(16, i);\n if ( t >= 10 ) {\n if ( t == 10 ) { h += \"A\"; }\n if ( t == 11 ) { h += \"B\"; }\n if ( t == 12 ) { h += \"C\"; }\n if ( t == 13 ) { h += \"D\"; }\n if ( t == 14 ) { h += \"E\"; }\n if ( t == 15 ) { h += \"F\"; }\n } else {\n h += String(t);\n }\n } else {\n h += \"0\";\n }\n }\n return h;\n}\n",
+ "id": "S15.1.3.3_A1.1_T2"
+ },
+ {
+ "section": "15.1.3.3",
+ "description": "Complex tests",
+ "test": "errorCount = 0;\ncount = 0;\nvar indexP;\nvar indexO = 0;\n\nfor (index = 0xD800; index <= 0xDBFF; index++) {\n count++; \n hex = decimalToHexString(index);\n try {\n encodeURI(String.fromCharCode(index));\n } catch (e) { \n if ((e instanceof URIError) === true) continue; \n }\n if (indexO === 0) { \n indexO = index;\n } else {\n if ((index - indexP) !== 1) { \n if ((indexP - indexO) !== 0) {\n var hexP = decimalToHexString(indexP);\n var hexO = decimalToHexString(indexO);\n $ERROR('#' + hexO + '-' + hexP + ' ');\n } \n else {\n var hexP = decimalToHexString(indexP);\n $ERROR('#' + hexP + ' ');\n } \n indexO = index;\n } \n }\n indexP = index;\n errorCount++; \n}\n\nif (errorCount > 0) {\n if ((indexP - indexO) !== 0) {\n var hexP = decimalToHexString(indexP);\n var hexO = decimalToHexString(indexO);\n $ERROR('#' + hexO + '-' + hexP + ' ');\n } else {\n var hexP = decimalToHexString(indexP);\n $ERROR('#' + hexP + ' ');\n } \n $ERROR('Total error: ' + errorCount + ' bad Unicode character in ' + count + ' ');\n}\n\nfunction decimalToHexString(n) {\n n = Number(n);\n var h = \"\";\n for (var i = 3; i >= 0; i--) {\n if (n >= Math.pow(16, i)) {\n var t = Math.floor(n / Math.pow(16, i));\n n -= t * Math.pow(16, i);\n if ( t >= 10 ) {\n if ( t == 10 ) { h += \"A\"; }\n if ( t == 11 ) { h += \"B\"; }\n if ( t == 12 ) { h += \"C\"; }\n if ( t == 13 ) { h += \"D\"; }\n if ( t == 14 ) { h += \"E\"; }\n if ( t == 15 ) { h += \"F\"; }\n } else {\n h += String(t);\n }\n } else {\n h += \"0\";\n }\n }\n return h;\n}\n",
+ "id": "S15.1.3.3_A1.2_T1"
+ },
+ {
+ "section": "15.1.3.3",
+ "description": "Complex tests",
+ "test": "errorCount = 0;\ncount = 0;\nvar indexP;\nvar indexO = 0;\n\nfor (index = 0xD800; index <= 0xDBFF; index++) { \n count++; \n hex = decimalToHexString(index);\n try {\n encodeURI(String.fromCharCode(0x0041, index));\n } catch (e) { \n if ((e instanceof URIError) === true) continue; \n }\n if (indexO === 0) { \n indexO = index;\n } else {\n if ((index - indexP) !== 1) { \n if ((indexP - indexO) !== 0) {\n var hexP = decimalToHexString(indexP);\n var hexO = decimalToHexString(indexO);\n $ERROR('#' + hexO + '-' + hexP + ' ');\n } \n else {\n var hexP = decimalToHexString(indexP);\n $ERROR('#' + hexP + ' ');\n } \n indexO = index;\n } \n }\n indexP = index;\n errorCount++; \n}\n\nif (errorCount > 0) {\n if ((indexP - indexO) !== 0) {\n var hexP = decimalToHexString(indexP);\n var hexO = decimalToHexString(indexO);\n $ERROR('#' + hexO + '-' + hexP + ' ');\n } else {\n var hexP = decimalToHexString(indexP);\n $ERROR('#' + hexP + ' ');\n } \n $ERROR('Total error: ' + errorCount + ' bad Unicode character in ' + count + ' ');\n}\n\nfunction decimalToHexString(n) {\n n = Number(n);\n var h = \"\";\n for (var i = 3; i >= 0; i--) {\n if (n >= Math.pow(16, i)) {\n var t = Math.floor(n / Math.pow(16, i));\n n -= t * Math.pow(16, i);\n if ( t >= 10 ) {\n if ( t == 10 ) { h += \"A\"; }\n if ( t == 11 ) { h += \"B\"; }\n if ( t == 12 ) { h += \"C\"; }\n if ( t == 13 ) { h += \"D\"; }\n if ( t == 14 ) { h += \"E\"; }\n if ( t == 15 ) { h += \"F\"; }\n } else {\n h += String(t);\n }\n } else {\n h += \"0\";\n }\n }\n return h;\n}\n",
+ "id": "S15.1.3.3_A1.2_T2"
+ },
+ {
+ "section": "15.1.3.3",
+ "description": "Complex tests, string.charAt(k+1) in [0x0000, 0xD7FF, 0xD800, 0xDBFE, 0xDBFF, 0xE000, 0xFFFF]",
+ "test": "chars = [0x0000, 0xD7FF, 0xD800, 0xDBFE, 0xDBFF, 0xE000, 0xFFFF];\nerrorCount = 0;\ncount = 0;\nvar indexP;\nvar indexO = 0;\n\nfor (index = 0xD800; index <= 0xDBFF; index++) {\n count++; \n res = true;\n for (indexC = 0; indexC < chars.length; indexC++) { \n hex = decimalToHexString(index);\n try {\n encodeURI(String.fromCharCode(index, chars[indexC])); \n } catch (e) { \n if ((e instanceof URIError) === true) continue;\n }\n res = false;\n }\n if (res !== true) {\n if (indexO === 0) { \n indexO = index;\n } else {\n if ((index - indexP) !== 1) { \n if ((indexP - indexO) !== 0) {\n var hexP = decimalToHexString(indexP);\n var hexO = decimalToHexString(indexO);\n $ERROR('#' + hexO + '-' + hexP + ' ');\n } \n else {\n var hexP = decimalToHexString(indexP);\n $ERROR('#' + hexP + ' ');\n } \n indexO = index;\n } \n }\n indexP = index;\n errorCount++; \n } \n}\n\nif (errorCount > 0) {\n if ((indexP - indexO) !== 0) {\n var hexP = decimalToHexString(indexP);\n var hexO = decimalToHexString(indexO);\n $ERROR('#' + hexO + '-' + hexP + ' ');\n } else {\n var hexP = decimalToHexString(indexP);\n $ERROR('#' + hexP + ' ');\n } \n $ERROR('Total error: ' + errorCount + ' bad Unicode character in ' + count + ' ');\n}\n\nfunction decimalToHexString(n) {\n n = Number(n);\n var h = \"\";\n for (var i = 3; i >= 0; i--) {\n if (n >= Math.pow(16, i)) {\n var t = Math.floor(n / Math.pow(16, i));\n n -= t * Math.pow(16, i);\n if ( t >= 10 ) {\n if ( t == 10 ) { h += \"A\"; }\n if ( t == 11 ) { h += \"B\"; }\n if ( t == 12 ) { h += \"C\"; }\n if ( t == 13 ) { h += \"D\"; }\n if ( t == 14 ) { h += \"E\"; }\n if ( t == 15 ) { h += \"F\"; }\n } else {\n h += String(t);\n }\n } else {\n h += \"0\";\n }\n }\n return h;\n}\n",
+ "id": "S15.1.3.3_A1.3_T1"
+ },
+ {
+ "section": "15.1.3.3",
+ "description": "Complex tests, use RFC 3629",
+ "test": "uriReserved = [\";\", \"/\", \"?\", \":\", \"@\", \"&\", \"=\", \"+\", \"$\", \",\"];\nuriUnescaped = [\"-\", \"_\", \".\", \"!\", \"~\", \"*\", \"'\", \"(\", \")\", \"A\", \"B\", \"C\", \"D\", \"E\", \"F\", \"G\", \"H\", \"I\", \"J\", \"K\", \"L\", \"M\", \"N\", \"O\", \"P\", \"Q\", \"R\", \"S\", \"T\", \"U\", \"V\", \"W\", \"X\", \"Y\", \"Z\", \"a\", \"b\", \"c\", \"d\", \"e\", \"f\", \"g\", \"h\", \"i\", \"j\", \"k\", \"l\", \"m\", \"n\", \"o\", \"p\", \"q\", \"r\", \"s\", \"t\", \"u\", \"v\", \"w\", \"x\", \"y\", \"z\", \"0\", \"1\", \"2\", \"3\", \"4\", \"5\", \"6\", \"7\", \"8\", \"9\"]; \nerrorCount = 0;\ncount = 0;\nvar indexP;\nvar indexO = 0;\n\nl : \nfor (index = 0x0000; index <= 0x007F; index++) {\n count++;\n str = String.fromCharCode(index);\n for (indexC = 0; indexC < uriReserved.length; indexC++) { \n if (uriReserved[indexC] === str) continue l;\n }\n for (indexC = 0; indexC < uriUnescaped.length; indexC++) {\n if (uriUnescaped[indexC] === str) continue l;\n } \n if (\"#\" === str) continue l; \n try {\n if (encodeURI(str).toUpperCase() === \"%\" + decimalToHexString(index).substring(2)) continue l; \n } catch(e) {} \n if (indexO === 0) { \n indexO = index;\n } else {\n if ((index - indexP) !== 1) { \n if ((indexP - indexO) !== 0) {\n var hexP = decimalToHexString(indexP);\n var hexO = decimalToHexString(indexO);\n $ERROR('#' + hexO + '-' + hexP + ' ');\n } \n else {\n var hexP = decimalToHexString(indexP);\n $ERROR('#' + hexP + ' ');\n } \n indexO = index;\n } \n }\n indexP = index;\n errorCount++; \n}\n\nif (errorCount > 0) {\n if ((indexP - indexO) !== 0) {\n var hexP = decimalToHexString(indexP);\n var hexO = decimalToHexString(indexO);\n $ERROR('#' + hexO + '-' + hexP + ' ');\n } else {\n var hexP = decimalToHexString(indexP);\n $ERROR('#' + hexP + ' ');\n } \n $ERROR('Total error: ' + errorCount + ' bad Unicode character in ' + count + ' ');\n}\n\nfunction decimalToHexString(n) {\n n = Number(n);\n var h = \"\";\n for (var i = 3; i >= 0; i--) {\n if (n >= Math.pow(16, i)) {\n var t = Math.floor(n / Math.pow(16, i));\n n -= t * Math.pow(16, i);\n if ( t >= 10 ) {\n if ( t == 10 ) { h += \"A\"; }\n if ( t == 11 ) { h += \"B\"; }\n if ( t == 12 ) { h += \"C\"; }\n if ( t == 13 ) { h += \"D\"; }\n if ( t == 14 ) { h += \"E\"; }\n if ( t == 15 ) { h += \"F\"; }\n } else {\n h += String(t);\n }\n } else {\n h += \"0\";\n }\n }\n return h;\n}\n",
+ "id": "S15.1.3.3_A2.1_T1"
+ },
+ {
+ "section": "15.1.3.3",
+ "description": "Complex tests, use RFC 3629",
+ "test": "errorCount = 0;\ncount = 0;\nvar indexP;\nvar indexO = 0; \nl:\nfor (index = 0x0080; index <= 0x07FF; index++) {\n count++; \n hex1 = decimalToHexString(0x0080 + (index & 0x003F)).substring(2);\n hex2 = decimalToHexString(0x00C0 + (index & 0x07C0) / 0x0040).substring(2); \n str = String.fromCharCode(index);\n try {\n if (encodeURI(str).toUpperCase() === \"%\" + hex2 + \"%\" + hex1) continue;\n } catch(e) {} \n if (indexO === 0) { \n indexO = index;\n } else {\n if ((index - indexP) !== 1) { \n if ((indexP - indexO) !== 0) {\n var hexP = decimalToHexString(indexP);\n var hexO = decimalToHexString(indexO);\n $ERROR('#' + hexO + '-' + hexP + ' ');\n } \n else {\n var hexP = decimalToHexString(indexP);\n $ERROR('#' + hexP + ' ');\n } \n indexO = index;\n } \n }\n indexP = index;\n errorCount++; \n}\n\nif (errorCount > 0) {\n if ((indexP - indexO) !== 0) {\n var hexP = decimalToHexString(indexP);\n var hexO = decimalToHexString(indexO);\n $ERROR('#' + hexO + '-' + hexP + ' ');\n } else {\n var hexP = decimalToHexString(indexP);\n $ERROR('#' + hexP + ' ');\n } \n $ERROR('Total error: ' + errorCount + ' bad Unicode character in ' + count + ' ');\n}\n\nfunction decimalToHexString(n) {\n n = Number(n);\n var h = \"\";\n for (var i = 3; i >= 0; i--) {\n if (n >= Math.pow(16, i)) {\n var t = Math.floor(n / Math.pow(16, i));\n n -= t * Math.pow(16, i);\n if ( t >= 10 ) {\n if ( t == 10 ) { h += \"A\"; }\n if ( t == 11 ) { h += \"B\"; }\n if ( t == 12 ) { h += \"C\"; }\n if ( t == 13 ) { h += \"D\"; }\n if ( t == 14 ) { h += \"E\"; }\n if ( t == 15 ) { h += \"F\"; }\n } else {\n h += String(t);\n }\n } else {\n h += \"0\";\n }\n }\n return h;\n}\n",
+ "id": "S15.1.3.3_A2.2_T1"
+ },
+ {
+ "section": "15.1.3.3",
+ "description": "Complex tests, use RFC 3629",
+ "test": "errorCount = 0;\ncount = 0;\nvar indexP;\nvar indexO = 0; \nfor (index = 0x0800; index <= 0xD7FF; index++) {\n count++; \n hex1 = decimalToHexString(0x0080 + (index & 0x003F)).substring(2);\n hex2 = decimalToHexString(0x0080 + (index & 0x0FC0) / 0x0040).substring(2);\n hex3 = decimalToHexString(0x00E0 + (index & 0xF000) / 0x1000).substring(2);\n str = String.fromCharCode(index);\n try {\n if (encodeURI(str).toUpperCase() === \"%\" + hex3 + \"%\" + hex2 + \"%\" + hex1) continue;\n } catch(e) {} \n if (indexO === 0) { \n indexO = index;\n } else {\n if ((index - indexP) !== 1) { \n if ((indexP - indexO) !== 0) {\n var hexP = decimalToHexString(indexP);\n var hexO = decimalToHexString(indexO);\n $ERROR('#' + hexO + '-' + hexP + ' ');\n } \n else {\n var hexP = decimalToHexString(indexP);\n $ERROR('#' + hexP + ' ');\n } \n indexO = index;\n } \n }\n indexP = index;\n errorCount++; \n} \n\nif (errorCount > 0) {\n if ((indexP - indexO) !== 0) {\n var hexP = decimalToHexString(indexP);\n var hexO = decimalToHexString(indexO);\n $ERROR('#' + hexO + '-' + hexP + ' ');\n } else {\n var hexP = decimalToHexString(indexP);\n $ERROR('#' + hexP + ' ');\n } \n $ERROR('Total error: ' + errorCount + ' bad Unicode character in ' + count + ' ');\n}\n\nfunction decimalToHexString(n) {\n n = Number(n);\n var h = \"\";\n for (var i = 3; i >= 0; i--) {\n if (n >= Math.pow(16, i)) {\n var t = Math.floor(n / Math.pow(16, i));\n n -= t * Math.pow(16, i);\n if ( t >= 10 ) {\n if ( t == 10 ) { h += \"A\"; }\n if ( t == 11 ) { h += \"B\"; }\n if ( t == 12 ) { h += \"C\"; }\n if ( t == 13 ) { h += \"D\"; }\n if ( t == 14 ) { h += \"E\"; }\n if ( t == 15 ) { h += \"F\"; }\n } else {\n h += String(t);\n }\n } else {\n h += \"0\";\n }\n }\n return h;\n}\n",
+ "id": "S15.1.3.3_A2.3_T1"
+ },
+ {
+ "section": "15.1.3.3",
+ "description": "Complex tests, use RFC 3629, string.charAt(k+1) in [0xDC00, 0xDDFF, 0xDFFF]",
+ "test": "chars = [0xDC00, 0xDDFF, 0xDFFF]; \nerrorCount = 0;\ncount = 0;\nvar indexP;\nvar indexO = 0; \nfor (index = 0xD800; index <= 0xDBFF; index++) {\n res = true;\n for (indexC = 0; indexC < chars.length; indexC++) {\n index1 = (index - 0xD800) * 0x400 + (chars[indexC] - 0xDC00) + 0x10000; \n hex1 = decimalToHexString(0x0080 + (index1 & 0x003F)).substring(2);\n hex2 = decimalToHexString(0x0080 + (index1 & 0x0FC0) / 0x0040).substring(2);\n hex3 = decimalToHexString(0x0080 + (index1 & 0x3F000) / 0x1000).substring(2);\n hex4 = decimalToHexString(0x00F0 + (index1 & 0x1C0000) / 0x40000).substring(2);\n str = String.fromCharCode(index, chars[indexC]);\n try {\n if (encodeURI(str).toUpperCase() !== \"%\" + hex4 + \"%\" + hex3 + \"%\" + hex2 + \"%\" + hex1) {\n res = false;\n }\n } catch(e) {res = false} \n }\n if (res !== true) { \n if (indexO === 0) { \n indexO = index;\n } else {\n if ((index - indexP) !== 1) { \n if ((indexP - indexO) !== 0) {\n var hexP = decimalToHexString(indexP);\n var hexO = decimalToHexString(indexO);\n $ERROR('#' + hexO + '-' + hexP + ' ');\n } \n else {\n var hexP = decimalToHexString(indexP);\n $ERROR('#' + hexP + ' ');\n } \n indexO = index;\n } \n }\n indexP = index;\n errorCount++; \n }\n count++; \n}\n\nif (errorCount > 0) {\n if ((indexP - indexO) !== 0) {\n var hexP = decimalToHexString(indexP);\n var hexO = decimalToHexString(indexO);\n $ERROR('#' + hexO + '-' + hexP + ' ');\n } else {\n var hexP = decimalToHexString(indexP);\n $ERROR('#' + hexP + ' ');\n } \n $ERROR('Total error: ' + errorCount + ' bad Unicode character in ' + count + ' ');\n}\n\nfunction decimalToHexString(n) {\n n = Number(n);\n var h = \"\";\n for (var i = 3; i >= 0; i--) {\n if (n >= Math.pow(16, i)) {\n var t = Math.floor(n / Math.pow(16, i));\n n -= t * Math.pow(16, i);\n if ( t >= 10 ) {\n if ( t == 10 ) { h += \"A\"; }\n if ( t == 11 ) { h += \"B\"; }\n if ( t == 12 ) { h += \"C\"; }\n if ( t == 13 ) { h += \"D\"; }\n if ( t == 14 ) { h += \"E\"; }\n if ( t == 15 ) { h += \"F\"; }\n } else {\n h += String(t);\n }\n } else {\n h += \"0\";\n }\n }\n return h;\n}\n",
+ "id": "S15.1.3.3_A2.4_T1"
+ },
+ {
+ "section": "15.1.3.3",
+ "description": "Complex tests, use RFC 3629, string.charAt(k) in [0xD800, 0xDBFF, 0xD9FF]",
+ "test": "chars = [0xD800, 0xDBFF, 0xD9FF]; \nerrorCount = 0;\ncount = 0;\nvar indexP;\nvar indexO = 0; \nfor (index = 0xDC00; index <= 0xDFFF; index++) {\n res = true;\n for (indexC = 0; indexC < chars.length; indexC++) {\n index1 = (chars[indexC] - 0xD800) * 0x400 + (index - 0xDC00) + 0x10000; \n hex1 = decimalToHexString(0x0080 + (index1 & 0x003F)).substring(2);\n hex2 = decimalToHexString(0x0080 + (index1 & 0x0FC0) / 0x0040).substring(2);\n hex3 = decimalToHexString(0x0080 + (index1 & 0x3F000) / 0x1000).substring(2);\n hex4 = decimalToHexString(0x00F0 + (index1 & 0x1C0000) / 0x40000).substring(2);\n str = String.fromCharCode(chars[indexC], index);\n try {\n if (encodeURI(str).toUpperCase() !== \"%\" + hex4 + \"%\" + hex3 + \"%\" + hex2 + \"%\" + hex1) {\n res = false;\n }\n } catch(e) {res = false} \n }\n if (res !== true) { \n if (indexO === 0) { \n indexO = index;\n } else {\n if ((index - indexP) !== 1) { \n if ((indexP - indexO) !== 0) {\n var hexP = decimalToHexString(indexP);\n var hexO = decimalToHexString(indexO);\n $ERROR('#' + hexO + '-' + hexP + ' ');\n } \n else {\n var hexP = decimalToHexString(indexP);\n $ERROR('#' + hexP + ' ');\n } \n indexO = index;\n } \n }\n indexP = index;\n errorCount++; \n }\n count++; \n}\n\nif (errorCount > 0) {\n if ((indexP - indexO) !== 0) {\n var hexP = decimalToHexString(indexP);\n var hexO = decimalToHexString(indexO);\n $ERROR('#' + hexO + '-' + hexP + ' ');\n } else {\n var hexP = decimalToHexString(indexP);\n $ERROR('#' + hexP + ' ');\n } \n $ERROR('Total error: ' + errorCount + ' bad Unicode character in ' + count + ' ');\n}\n\nfunction decimalToHexString(n) {\n n = Number(n);\n var h = \"\";\n for (var i = 3; i >= 0; i--) {\n if (n >= Math.pow(16, i)) {\n var t = Math.floor(n / Math.pow(16, i));\n n -= t * Math.pow(16, i);\n if ( t >= 10 ) {\n if ( t == 10 ) { h += \"A\"; }\n if ( t == 11 ) { h += \"B\"; }\n if ( t == 12 ) { h += \"C\"; }\n if ( t == 13 ) { h += \"D\"; }\n if ( t == 14 ) { h += \"E\"; }\n if ( t == 15 ) { h += \"F\"; }\n } else {\n h += String(t);\n }\n } else {\n h += \"0\";\n }\n }\n return h;\n}\n",
+ "id": "S15.1.3.3_A2.4_T2"
+ },
+ {
+ "section": "15.1.3.3",
+ "description": "Complex tests, use RFC 3629",
+ "test": "errorCount = 0;\ncount = 0;\nvar indexP;\nvar indexO = 0; \nfor (index = 0xE000; index <= 0xFFFF; index++) {\n count++; \n hex1 = decimalToHexString(0x0080 + (index & 0x003F)).substring(2);\n hex2 = decimalToHexString(0x0080 + (index & 0x0FC0) / 0x0040).substring(2);\n hex3 = decimalToHexString(0x00E0 + (index & 0xF000) / 0x1000).substring(2);\n str = String.fromCharCode(index);\n try {\n if (encodeURI(str).toUpperCase() === \"%\" + hex3 + \"%\" + hex2 + \"%\" + hex1) continue;\n } catch(e) {} \n if (indexO === 0) { \n indexO = index;\n } else {\n if ((index - indexP) !== 1) { \n if ((indexP - indexO) !== 0) {\n var hexP = decimalToHexString(indexP);\n var hexO = decimalToHexString(indexO);\n $ERROR('#' + hexO + '-' + hexP + ' ');\n } \n else {\n var hexP = decimalToHexString(indexP);\n $ERROR('#' + hexP + ' ');\n } \n indexO = index;\n } \n }\n indexP = index;\n errorCount++; \n}\n\nif (errorCount > 0) {\n if ((indexP - indexO) !== 0) {\n var hexP = decimalToHexString(indexP);\n var hexO = decimalToHexString(indexO);\n $ERROR('#' + hexO + '-' + hexP + ' ');\n } else {\n var hexP = decimalToHexString(indexP);\n $ERROR('#' + hexP + ' ');\n } \n $ERROR('Total error: ' + errorCount + ' bad Unicode character in ' + count + ' ');\n}\n\nfunction decimalToHexString(n) {\n n = Number(n);\n var h = \"\";\n for (var i = 3; i >= 0; i--) {\n if (n >= Math.pow(16, i)) {\n var t = Math.floor(n / Math.pow(16, i));\n n -= t * Math.pow(16, i);\n if ( t >= 10 ) {\n if ( t == 10 ) { h += \"A\"; }\n if ( t == 11 ) { h += \"B\"; }\n if ( t == 12 ) { h += \"C\"; }\n if ( t == 13 ) { h += \"D\"; }\n if ( t == 14 ) { h += \"E\"; }\n if ( t == 15 ) { h += \"F\"; }\n } else {\n h += String(t);\n }\n } else {\n h += \"0\";\n }\n }\n return h;\n}\n",
+ "id": "S15.1.3.3_A2.5_T1"
+ },
+ {
+ "section": "15.1.3.3",
+ "description": "Complex tests",
+ "test": "uriReserved = [\";\", \"/\", \"?\", \":\", \"@\", \"&\", \"=\", \"+\", \"$\", \",\"];\nfor (indexC = 0; indexC < uriReserved.length; indexC++) {\n var str = uriReserved[indexC]; \n if (encodeURI(str) !== str) {\n $ERROR('#' + (indexC + 1) + ': unescapedURISet containing' + str);\n } \n}\n",
+ "id": "S15.1.3.3_A3.1_T1"
+ },
+ {
+ "section": "15.1.3.3",
+ "description": "Complex tests, uriUnescaped :: uriAlpha",
+ "test": "uriAlpha = [\"A\", \"B\", \"C\", \"D\", \"E\", \"F\", \"G\", \"H\", \"I\", \"J\", \"K\", \"L\", \"M\", \"N\", \"O\", \"P\", \"Q\", \"R\", \"S\", \"T\", \"U\", \"V\", \"W\", \"X\", \"Y\", \"Z\", \"a\", \"b\", \"c\", \"d\", \"e\", \"f\", \"g\", \"h\", \"i\", \"j\", \"k\", \"l\", \"m\", \"n\", \"o\", \"p\", \"q\", \"r\", \"s\", \"t\", \"u\", \"v\", \"w\", \"x\", \"y\", \"z\"];\nfor (indexC = 0; indexC < uriAlpha.length; indexC++) {\n var str = uriAlpha[indexC]; \n if (encodeURI(str) !== str) {\n $ERROR('#' + (indexC + 1) + ': unescapedURISet containing ' + str);\n } \n}\n",
+ "id": "S15.1.3.3_A3.2_T1"
+ },
+ {
+ "section": "15.1.3.3",
+ "description": "Complex tests, uriUnescaped :: DecimalDigit",
+ "test": "DecimalDigit = [\"0\", \"1\", \"2\", \"3\", \"4\", \"5\", \"6\", \"7\", \"8\", \"9\"];\nfor (indexC = 0; indexC < DecimalDigit.length; indexC++) {\n var str = DecimalDigit[indexC]; \n if (encodeURI(str) !== str) {\n $ERROR('#' + (indexC + 1) + ': unescapedURISet containing' + str);\n } \n}\n",
+ "id": "S15.1.3.3_A3.2_T2"
+ },
+ {
+ "section": "15.1.3.3",
+ "description": "Complex tests, uriUnescaped :: uriMark",
+ "test": "uriMark = [\"-\", \"_\", \".\", \"!\", \"~\", \"*\", \"'\", \"(\", \")\"];\nfor (indexC = 0; indexC < uriMark.length; indexC++) {\n var str = uriMark[indexC]; \n if (encodeURI(str) !== str) {\n $ERROR('#' + (indexC + 1) + ': unescapedURISet containing' + str);\n } \n}\n",
+ "id": "S15.1.3.3_A3.2_T3"
+ },
+ {
+ "section": "15.1.3.3",
+ "description": "encodeURI(\"#\") === \"#\"",
+ "test": "if (encodeURI(\"#\") !== \"#\") {\n $ERROR('#1: unescapedURISet containing \"#\"');\n} \n",
+ "id": "S15.1.3.3_A3.3_T1"
+ },
+ {
+ "section": "15.1.3.3",
+ "description": "Checking ENGLISH ALPHABET",
+ "test": "//CHECK#1\nif (encodeURI(\"http://unipro.ru/0123456789\") !== \"http://unipro.ru/0123456789\") {\n $ERROR('#1: http://unipro.ru/0123456789');\n}\n\n//CHECK#2\nif (encodeURI(\"aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ\") !== \"aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ\") {\n $ERROR('#2: aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ');\n}\n\n//CHECK#3\nif (encodeURI(\"aA_bB-cC.dD!eE~fF*gG'hH(iI)jJ;kK/lL?mM:nN@oO&pP=qQ+rR$sS,tT9uU8vV7wW6xX5yY4zZ\") !== \"aA_bB-cC.dD!eE~fF*gG'hH(iI)jJ;kK/lL?mM:nN@oO&pP=qQ+rR$sS,tT9uU8vV7wW6xX5yY4zZ\") {\n $ERROR('#3: ');\n}\n",
+ "id": "S15.1.3.3_A4_T1"
+ },
+ {
+ "section": "15.1.3.3",
+ "description": "Checking RUSSIAN ALPHABET",
+ "test": "//CHECK#1\nif ((encodeURI(\"http://ru.wikipedia.org/wiki/Юникод\") !== \"http://ru.wikipedia.org/wiki/%D0%AE%D0%BD%D0%B8%D0%BA%D0%BE%D0%B4\") && (encodeURI(\"http://ru.wikipedia.org/wiki/Юникод\") !== \"http://ru.wikipedia.org/wiki/\" + \"%D0%AE%D0%BD%D0%B8%D0%BA%D0%BE%D0%B4\".toLowerCase())) {\n $ERROR('#1: http://ru.wikipedia.org/wiki/Юникод');\n}\n\n//CHECK#2\nif ((encodeURI(\"http://ru.wikipedia.org/wiki/Юникод#Ссылки\") !== \"http://ru.wikipedia.org/wiki/%D0%AE%D0%BD%D0%B8%D0%BA%D0%BE%D0%B4#%D0%A1%D1%81%D1%8B%D0%BB%D0%BA%D0%B8\") && (encodeURI(\"http://ru.wikipedia.org/wiki/Юникод#Ссылки\") !== \"http://ru.wikipedia.org/wiki/\" + \"%D0%AE%D0%BD%D0%B8%D0%BA%D0%BE%D0%B4#%D0%A1%D1%81%D1%8B%D0%BB%D0%BA%D0%B8\".toLowerCase())) {\n $ERROR('#2: http://ru.wikipedia.org/wiki/Юникод#Ссылки');\n}\n\n//CHECK#3\nif ((encodeURI(\"http://ru.wikipedia.org/wiki/Юникод#Версии Юникода\") !== \"http://ru.wikipedia.org/wiki/%D0%AE%D0%BD%D0%B8%D0%BA%D0%BE%D0%B4#%D0%92%D0%B5%D1%80%D1%81%D0%B8%D0%B8%20%D0%AE%D0%BD%D0%B8%D0%BA%D0%BE%D0%B4%D0%B0\") && ((encodeURI(\"http://ru.wikipedia.org/wiki/Юникод#Версии Юникода\") !== \"http://ru.wikipedia.org/wiki/\" + \"%D0%AE%D0%BD%D0%B8%D0%BA%D0%BE%D0%B4#%D0%92%D0%B5%D1%80%D1%81%D0%B8%D0%B8%20%D0%AE%D0%BD%D0%B8%D0%BA%D0%BE%D0%B4%D0%B0\".toLowerCase()))) {\n $ERROR('#3: http://ru.wikipedia.org/wiki/Юникод#Версии Юникода');\n}\n",
+ "id": "S15.1.3.3_A4_T2"
+ },
+ {
+ "section": "15.1.3.3",
+ "description": "Checking URL with Line Terminator",
+ "test": "//CHECK#1\nif ((encodeURI(\"http://unipro.ru/\\nabout\") !== \"http://unipro.ru/%0Aabout\") && encodeURI(\"http://unipro.ru/\\nabout\") !== \"http://unipro.ru/%0aabout\") {\n $ERROR('#1: http://unipro.ru/\\\\nabout');\n}\n\n//CHECK#2\nif ((encodeURI(\"http://unipro.ru/\\vabout\") !== \"http://unipro.ru/%0Babout\") && encodeURI(\"http://unipro.ru/\\vabout\") !== \"http://unipro.ru/%0babout\") {\n $ERROR('#2: http://unipro.ru/\\\\vabout');\n}\n\n//CHECK#3\nif ((encodeURI(\"http://unipro.ru/\\fabout\") !== \"http://unipro.ru/%0Cabout\") && encodeURI(\"http://unipro.ru/\\fabout\") !== \"http://unipro.ru/%0cabout\") {\n $ERROR('#3: http://unipro.ru/\\\\fabout');\n}\n\n//CHECK#4\nif ((encodeURI(\"http://unipro.ru/\\rabout\") !== \"http://unipro.ru/%0Dabout\") && encodeURI(\"http://unipro.ru/\\rabout\") !== \"http://unipro.ru/%0dabout\") {\n $ERROR('#4: http://unipro.ru/\\\\rabout');\n}\n",
+ "id": "S15.1.3.3_A4_T3"
+ },
+ {
+ "section": "15.1.3.3",
+ "description": "Test some url",
+ "test": "//CHECK#1\nif (encodeURI(\"\") !== \"\") {\n $ERROR('#1: \"\"');\n}\n\n//CHECK#2\nif (encodeURI(\"http://unipro.ru\") !== \"http://unipro.ru\") {\n $ERROR('#2: http://unipro.ru');\n}\n\n//CHECK#3\nif (encodeURI(\"http://www.google.ru/support/jobs/bin/static.py?page=why-ru.html&sid=liveandwork\") !== \"http://www.google.ru/support/jobs/bin/static.py?page=why-ru.html&sid=liveandwork\") {\n $ERROR('#3: http://www.google.ru/support/jobs/bin/static.py?page=why-ru.html&sid=liveandwork\"');\n} \n\n//CHECK#4\nif (encodeURI(\"http://en.wikipedia.org/wiki/UTF-8#Description\") !== \"http://en.wikipedia.org/wiki/UTF-8#Description\") {\n $ERROR('#4: http://en.wikipedia.org/wiki/UTF-8#Description');\n}\n",
+ "id": "S15.1.3.3_A4_T4"
+ },
+ {
+ "section": "15.1.3.3, 15.2.4.7, 12.6.4",
+ "description": "Checking use propertyIsEnumerable, for-in",
+ "test": "//CHECK#1\nif (encodeURI.propertyIsEnumerable('length') !== false) {\n $ERROR('#1: encodeURI.propertyIsEnumerable(\\'length\\') === false. Actual: ' + (encodeURI.propertyIsEnumerable('length')));\n}\n\n//CHECK#2\nresult = true;\nfor (p in encodeURI){\n if (p === \"length\") {\n result = false;\n } \n}\n\nif (result !== true) {\n $ERROR('#2: result = true; for (p in encodeURI) { if (p === \"length\") result = false; } result === true;');\n}\n",
+ "id": "S15.1.3.3_A5.1"
+ },
+ {
+ "section": "15.1.3.3, 15.2.4.5, 11.4.1",
+ "description": "Checking use hasOwnProperty, delete",
+ "test": "//CHECK#1\nif (encodeURI.hasOwnProperty('length') !== true) {\n $FAIL('#1: encodeURI.hasOwnProperty(\\'length\\') === true. Actual: ' + (encodeURI.hasOwnProperty('length')));\n}\n\ndelete encodeURI.length;\n\n//CHECK#2\nif (encodeURI.hasOwnProperty('length') !== true) {\n $ERROR('#2: delete encodeURI.length; encodeURI.hasOwnProperty(\\'length\\') === true. Actual: ' + (encodeURI.hasOwnProperty('length')));\n}\n\n//CHECK#3\nif (encodeURI.length === undefined) {\n $ERROR('#3: delete encodeURI.length; encodeURI.length !== undefined');\n}\n\n\n\n",
+ "id": "S15.1.3.3_A5.2"
+ },
+ {
+ "section": "15.1.3.3",
+ "description": "Checking if varying the length property fails",
+ "test": "//CHECK#1\nx = encodeURI.length;\nencodeURI.length = Infinity;\nif (encodeURI.length !== x) {\n $ERROR('#1: x = encodeURI.length; encodeURI.length = Infinity; encodeURI.length === x. Actual: ' + (encodeURI.length));\n}\n\n",
+ "id": "S15.1.3.3_A5.3"
+ },
+ {
+ "section": "15.1.3.3",
+ "description": "encodeURI.length === 1",
+ "test": "//CHECK#1\nif (encodeURI.length !== 1) {\n $ERROR('#1: encodeURI.length === 1. Actual: ' + (encodeURI.length));\n} \n\n",
+ "id": "S15.1.3.3_A5.4"
+ },
+ {
+ "section": "15.1.3.3, 15.2.4.7, 12.6.4",
+ "description": "Checking use propertyIsEnumerable, for-in",
+ "test": "//CHECK#1\nif (this.propertyIsEnumerable('encodeURI') !== false) {\n $ERROR('#1: this.propertyIsEnumerable(\\'encodeURI\\') === false. Actual: ' + (this.propertyIsEnumerable('encodeURI')));\n}\n\n//CHECK#2\nresult = true;\nfor (p in this){\n if (p === \"encodeURI\") {\n result = false;\n } \n}\n\nif (result !== true) {\n $ERROR('#2: result = true; for (p in this) { if (p === \"encodeURI\") result = false; } result === true;');\n}\n",
+ "id": "S15.1.3.3_A5.5"
+ },
+ {
+ "section": "15.1.3.3",
+ "description": "Checking encodeURI.prototype",
+ "test": "//CHECK#1\nif (encodeURI.prototype !== undefined) {\n $ERROR('#1: encodeURI.prototype === undefined. Actual: ' + (encodeURI.prototype));\n}\n",
+ "id": "S15.1.3.3_A5.6"
+ },
+ {
+ "section": "15.1.3.3, 11.2.2",
+ "description": "If property does not implement the internal [[Construct]] method, throw a TypeError exception",
+ "test": "//CHECK#1\n\ntry {\n new encodeURI();\n $ERROR('#1.1: new encodeURI() throw TypeError. Actual: ' + (new encodeURI()));\n} catch (e) {\n if ((e instanceof TypeError) !== true) {\n $ERROR('#1.2: new encodeURI() throw TypeError. Actual: ' + (e));\n }\n}\n",
+ "id": "S15.1.3.3_A5.7"
+ },
+ {
+ "section": "15.1.3.3, 9.8, 8.6.2.6",
+ "description": "If Type(value) is Object, evaluate ToPrimitive(value, String)",
+ "test": "//CHECK#1\nvar object = {valueOf: function() {return \"^\"}};\nif (encodeURI(object) !== \"%5Bobject%20Object%5D\") {\n $ERROR('#1: var object = {valueOf: function() {return \"^\"}}; encodeURI(object) === %5Bobject%20Object%5D. Actual: ' + (encodeURI(object)));\n}\n\n//CHECK#2\nvar object = {valueOf: function() {return \"\"}, toString: function() {return \"^\"}};\nif (encodeURI(object) !== \"%5E\") {\n $ERROR('#2: var object = {valueOf: function() {return \"\"}, toString: function() {return \"^\"}}; encodeURI(object) === \"%5E\". Actual: ' + (encodeURI(object)));\n} \n\n//CHECK#3\nvar object = {valueOf: function() {return \"^\"}, toString: function() {return {}}};\nif (encodeURI(object) !== \"%5E\") {\n $ERROR('#3: var object = {valueOf: function() {return \"^\"}, toString: function() {return {}}}; encodeURI(object) === \"%5E\". Actual: ' + (encodeURI(object)));\n}\n\n//CHECK#4\ntry {\n var object = {valueOf: function() {throw \"error\"}, toString: function() {return \"^\"}};\n if (encodeURI(object) !== \"%5E\") {\n $ERROR('#4.1: var object = {valueOf: function() {throw \"error\"}, toString: function() {return \"^\"}}; encodeURI(object) === \"%5E\". Actual: ' + (encodeURI(object)));\n }\n}\ncatch (e) {\n if (e === \"error\") {\n $ERROR('#4.2: var object = {valueOf: function() {throw \"error\"}, toString: function() {return \"^\"}}; encodeURI(object) not throw \"error\"');\n } else {\n $ERROR('#4.3: var object = {valueOf: function() {throw \"error\"}, toString: function() {return \"^\"}}; encodeURI(object) not throw Error. Actual: ' + (e));\n }\n}\n\n//CHECK#5\nvar object = {toString: function() {return \"^\"}};\nif (encodeURI(object) !== \"%5E\") {\n $ERROR('#5: var object = {toString: function() {return \"^\"}}; encodeURI(object) === \"%5E\". Actual: ' + (encodeURI(object)));\n}\n\n//CHECK#6\nvar object = {valueOf: function() {return {}}, toString: function() {return \"^\"}}\nif (encodeURI(object) !== \"%5E\") {\n $ERROR('#6: var object = {valueOf: function() {return {}}, toString: function() {return \"^\"}}; encodeURI(object) === \"%5E\". Actual: ' + (encodeURI(object)));\n}\n\n//CHECK#7\ntry {\n var object = {valueOf: function() {return \"^\"}, toString: function() {throw \"error\"}};\n encodeURI(object);\n $ERROR('#7.1: var object = {valueOf: function() {return \"^\"}, toString: function() {throw \"error\"}}; encodeURI(object) throw \"error\". Actual: ' + (encodeURI(object)));\n} \ncatch (e) {\n if (e !== \"error\") {\n $ERROR('#7.2: var object = {valueOf: function() {return \"^\"}, toString: function() {throw \"error\"}}; encodeURI(object) throw \"error\". Actual: ' + (e));\n } \n}\n\n//CHECK#8\ntry {\n var object = {valueOf: function() {return {}}, toString: function() {return {}}};\n encodeURI(object);\n $ERROR('#8.1: var object = {valueOf: function() {return {}}, toString: function() {return {}}}; encodeURI(object) throw TypeError. Actual: ' + (encodeURI(object)));\n} \ncatch (e) {\n if ((e instanceof TypeError) !== true) {\n $ERROR('#8.2: var object = {valueOf: function() {return {}}, toString: function() {return {}}}; encodeURI(object) throw TypeError. Actual: ' + (e));\n } \n}\n",
+ "id": "S15.1.3.3_A6_T1"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.1.3.4_encodeURIComponent.json b/website/resources/scripts/testcases2/15.1.3.4_encodeURIComponent.json
new file mode 100644
index 000000000..9ccb5ee2e
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.1.3.4_encodeURIComponent.json
@@ -0,0 +1,176 @@
+{
+ "testCollection": {
+ "name": "15.1.3.4_encodeURIComponent",
+ "numTests": 28,
+ "tests": [
+ {
+ "section": "15.1.3.4",
+ "description": "Complex tests",
+ "test": "errorCount = 0;\ncount = 0;\nvar indexP;\nvar indexO = 0;\n\nfor (index = 0xDC00; index <= 0xDFFF; index++) {\n count++; \n hex = decimalToHexString(index);\n try {\n encodeURIComponent(String.fromCharCode(index));\n } catch (e) { \n if ((e instanceof URIError) === true) continue; \n }\n if (indexO === 0) { \n indexO = index;\n } else {\n if ((index - indexP) !== 1) { \n if ((indexP - indexO) !== 0) {\n var hexP = decimalToHexString(indexP);\n var hexO = decimalToHexString(indexO);\n $ERROR('#' + hexO + '-' + hexP + ' ');\n } \n else {\n var hexP = decimalToHexString(indexP);\n $ERROR('#' + hexP + ' ');\n } \n indexO = index;\n } \n }\n indexP = index;\n errorCount++; \n}\n\nif (errorCount > 0) {\n if ((indexP - indexO) !== 0) {\n var hexP = decimalToHexString(indexP);\n var hexO = decimalToHexString(indexO);\n $ERROR('#' + hexO + '-' + hexP + ' ');\n } else {\n var hexP = decimalToHexString(indexP);\n $ERROR('#' + hexP + ' ');\n } \n $ERROR('Total error: ' + errorCount + ' bad Unicode character in ' + count + ' ');\n}\n\nfunction decimalToHexString(n) {\n n = Number(n);\n var h = \"\";\n for (var i = 3; i >= 0; i--) {\n if (n >= Math.pow(16, i)) {\n var t = Math.floor(n / Math.pow(16, i));\n n -= t * Math.pow(16, i);\n if ( t >= 10 ) {\n if ( t == 10 ) { h += \"A\"; }\n if ( t == 11 ) { h += \"B\"; }\n if ( t == 12 ) { h += \"C\"; }\n if ( t == 13 ) { h += \"D\"; }\n if ( t == 14 ) { h += \"E\"; }\n if ( t == 15 ) { h += \"F\"; }\n } else {\n h += String(t);\n }\n } else {\n h += \"0\";\n }\n }\n return h;\n}\n",
+ "id": "S15.1.3.4_A1.1_T1"
+ },
+ {
+ "section": "15.1.3.4",
+ "description": "Complex tests",
+ "test": "errorCount = 0;\ncount = 0;\nvar indexP;\nvar indexO = 0;\n\nfor (index = 0xDC00; index <= 0xDFFF; index++) { \n count++; \n hex = decimalToHexString(index);\n try {\n encodeURIComponent(String.fromCharCode(index, 0x0041));\n } catch (e) { \n if ((e instanceof URIError) === true) continue; \n }\n if (indexO === 0) { \n indexO = index;\n } else {\n if ((index - indexP) !== 1) { \n if ((indexP - indexO) !== 0) {\n var hexP = decimalToHexString(indexP);\n var hexO = decimalToHexString(indexO);\n $ERROR('#' + hexO + '-' + hexP + ' ');\n } \n else {\n var hexP = decimalToHexString(indexP);\n $ERROR('#' + hexP + ' ');\n } \n indexO = index;\n } \n }\n indexP = index;\n errorCount++; \n}\n\nif (errorCount > 0) {\n if ((indexP - indexO) !== 0) {\n var hexP = decimalToHexString(indexP);\n var hexO = decimalToHexString(indexO);\n $ERROR('#' + hexO + '-' + hexP + ' ');\n } else {\n var hexP = decimalToHexString(indexP);\n $ERROR('#' + hexP + ' ');\n } \n $ERROR('Total error: ' + errorCount + ' bad Unicode character in ' + count + ' ');\n}\n\nfunction decimalToHexString(n) {\n n = Number(n);\n var h = \"\";\n for (var i = 3; i >= 0; i--) {\n if (n >= Math.pow(16, i)) {\n var t = Math.floor(n / Math.pow(16, i));\n n -= t * Math.pow(16, i);\n if ( t >= 10 ) {\n if ( t == 10 ) { h += \"A\"; }\n if ( t == 11 ) { h += \"B\"; }\n if ( t == 12 ) { h += \"C\"; }\n if ( t == 13 ) { h += \"D\"; }\n if ( t == 14 ) { h += \"E\"; }\n if ( t == 15 ) { h += \"F\"; }\n } else {\n h += String(t);\n }\n } else {\n h += \"0\";\n }\n }\n return h;\n}\n",
+ "id": "S15.1.3.4_A1.1_T2"
+ },
+ {
+ "section": "15.1.3.4",
+ "description": "Complex tests",
+ "test": "errorCount = 0;\ncount = 0;\nvar indexP;\nvar indexO = 0;\n\nfor (index = 0xD800; index <= 0xDBFF; index++) {\n count++; \n hex = decimalToHexString(index);\n try {\n encodeURIComponent(String.fromCharCode(index));\n } catch (e) { \n if ((e instanceof URIError) === true) continue; \n }\n if (indexO === 0) { \n indexO = index;\n } else {\n if ((index - indexP) !== 1) { \n if ((indexP - indexO) !== 0) {\n var hexP = decimalToHexString(indexP);\n var hexO = decimalToHexString(indexO);\n $ERROR('#' + hexO + '-' + hexP + ' ');\n } \n else {\n var hexP = decimalToHexString(indexP);\n $ERROR('#' + hexP + ' ');\n } \n indexO = index;\n } \n }\n indexP = index;\n errorCount++; \n}\n\nif (errorCount > 0) {\n if ((indexP - indexO) !== 0) {\n var hexP = decimalToHexString(indexP);\n var hexO = decimalToHexString(indexO);\n $ERROR('#' + hexO + '-' + hexP + ' ');\n } else {\n var hexP = decimalToHexString(indexP);\n $ERROR('#' + hexP + ' ');\n } \n $ERROR('Total error: ' + errorCount + ' bad Unicode character in ' + count + ' ');\n}\n\nfunction decimalToHexString(n) {\n n = Number(n);\n var h = \"\";\n for (var i = 3; i >= 0; i--) {\n if (n >= Math.pow(16, i)) {\n var t = Math.floor(n / Math.pow(16, i));\n n -= t * Math.pow(16, i);\n if ( t >= 10 ) {\n if ( t == 10 ) { h += \"A\"; }\n if ( t == 11 ) { h += \"B\"; }\n if ( t == 12 ) { h += \"C\"; }\n if ( t == 13 ) { h += \"D\"; }\n if ( t == 14 ) { h += \"E\"; }\n if ( t == 15 ) { h += \"F\"; }\n } else {\n h += String(t);\n }\n } else {\n h += \"0\";\n }\n }\n return h;\n}\n",
+ "id": "S15.1.3.4_A1.2_T1"
+ },
+ {
+ "section": "15.1.3.4",
+ "description": "Complex tests",
+ "test": "errorCount = 0;\ncount = 0;\nvar indexP;\nvar indexO = 0;\n\nfor (index = 0xD800; index <= 0xDBFF; index++) { \n count++; \n hex = decimalToHexString(index);\n try {\n encodeURIComponent(String.fromCharCode(0x0041, index));\n } catch (e) { \n if ((e instanceof URIError) === true) continue; \n }\n if (indexO === 0) { \n indexO = index;\n } else {\n if ((index - indexP) !== 1) { \n if ((indexP - indexO) !== 0) {\n var hexP = decimalToHexString(indexP);\n var hexO = decimalToHexString(indexO);\n $ERROR('#' + hexO + '-' + hexP + ' ');\n } \n else {\n var hexP = decimalToHexString(indexP);\n $ERROR('#' + hexP + ' ');\n } \n indexO = index;\n } \n }\n indexP = index;\n errorCount++; \n}\n\nif (errorCount > 0) {\n if ((indexP - indexO) !== 0) {\n var hexP = decimalToHexString(indexP);\n var hexO = decimalToHexString(indexO);\n $ERROR('#' + hexO + '-' + hexP + ' ');\n } else {\n var hexP = decimalToHexString(indexP);\n $ERROR('#' + hexP + ' ');\n } \n $ERROR('Total error: ' + errorCount + ' bad Unicode character in ' + count + ' ');\n}\n\nfunction decimalToHexString(n) {\n n = Number(n);\n var h = \"\";\n for (var i = 3; i >= 0; i--) {\n if (n >= Math.pow(16, i)) {\n var t = Math.floor(n / Math.pow(16, i));\n n -= t * Math.pow(16, i);\n if ( t >= 10 ) {\n if ( t == 10 ) { h += \"A\"; }\n if ( t == 11 ) { h += \"B\"; }\n if ( t == 12 ) { h += \"C\"; }\n if ( t == 13 ) { h += \"D\"; }\n if ( t == 14 ) { h += \"E\"; }\n if ( t == 15 ) { h += \"F\"; }\n } else {\n h += String(t);\n }\n } else {\n h += \"0\";\n }\n }\n return h;\n}\n",
+ "id": "S15.1.3.4_A1.2_T2"
+ },
+ {
+ "section": "15.1.3.4",
+ "description": "Complex tests, string.charAt(k+1) in [0x0000, 0xD7FF, 0xD800, 0xDBFE, 0xDBFF, 0xE000, 0xFFFF]",
+ "test": "chars = [0x0000, 0xD7FF, 0xD800, 0xDBFE, 0xDBFF, 0xE000, 0xFFFF];\nerrorCount = 0;\ncount = 0;\nvar indexP;\nvar indexO = 0;\n\nfor (index = 0xD800; index <= 0xDBFF; index++) {\n count++; \n res = true;\n for (indexC = 0; indexC < chars.length; indexC++) { \n hex = decimalToHexString(index);\n try {\n encodeURIComponent(String.fromCharCode(index, chars[indexC])); \n } catch (e) { \n if ((e instanceof URIError) === true) continue;\n }\n res = false;\n }\n if (res !== true) {\n if (indexO === 0) { \n indexO = index;\n } else {\n if ((index - indexP) !== 1) { \n if ((indexP - indexO) !== 0) {\n var hexP = decimalToHexString(indexP);\n var hexO = decimalToHexString(indexO);\n $ERROR('#' + hexO + '-' + hexP + ' ');\n } \n else {\n var hexP = decimalToHexString(indexP);\n $ERROR('#' + hexP + ' ');\n } \n indexO = index;\n } \n }\n indexP = index;\n errorCount++; \n } \n}\n\nif (errorCount > 0) {\n if ((indexP - indexO) !== 0) {\n var hexP = decimalToHexString(indexP);\n var hexO = decimalToHexString(indexO);\n $ERROR('#' + hexO + '-' + hexP + ' ');\n } else {\n var hexP = decimalToHexString(indexP);\n $ERROR('#' + hexP + ' ');\n } \n $ERROR('Total error: ' + errorCount + ' bad Unicode character in ' + count + ' ');\n}\n\nfunction decimalToHexString(n) {\n n = Number(n);\n var h = \"\";\n for (var i = 3; i >= 0; i--) {\n if (n >= Math.pow(16, i)) {\n var t = Math.floor(n / Math.pow(16, i));\n n -= t * Math.pow(16, i);\n if ( t >= 10 ) {\n if ( t == 10 ) { h += \"A\"; }\n if ( t == 11 ) { h += \"B\"; }\n if ( t == 12 ) { h += \"C\"; }\n if ( t == 13 ) { h += \"D\"; }\n if ( t == 14 ) { h += \"E\"; }\n if ( t == 15 ) { h += \"F\"; }\n } else {\n h += String(t);\n }\n } else {\n h += \"0\";\n }\n }\n return h;\n}\n",
+ "id": "S15.1.3.4_A1.3_T1"
+ },
+ {
+ "section": "15.1.3.4",
+ "description": "Complex tests, use RFC 3629",
+ "test": "uriUnescaped = [\"-\", \"_\", \".\", \"!\", \"~\", \"*\", \"'\", \"(\", \")\", \"A\", \"B\", \"C\", \"D\", \"E\", \"F\", \"G\", \"H\", \"I\", \"J\", \"K\", \"L\", \"M\", \"N\", \"O\", \"P\", \"Q\", \"R\", \"S\", \"T\", \"U\", \"V\", \"W\", \"X\", \"Y\", \"Z\", \"a\", \"b\", \"c\", \"d\", \"e\", \"f\", \"g\", \"h\", \"i\", \"j\", \"k\", \"l\", \"m\", \"n\", \"o\", \"p\", \"q\", \"r\", \"s\", \"t\", \"u\", \"v\", \"w\", \"x\", \"y\", \"z\", \"0\", \"1\", \"2\", \"3\", \"4\", \"5\", \"6\", \"7\", \"8\", \"9\"]; \nerrorCount = 0;\ncount = 0;\nvar indexP;\nvar indexO = 0;\n\nl : \nfor (index = 0x0000; index <= 0x007F; index++) {\n count++;\n str = String.fromCharCode(index);\n for (indexC = 0; indexC < uriUnescaped.length; indexC++) {\n if (uriUnescaped[indexC] === str) continue l;\n } \n try {\n if (encodeURIComponent(str).toUpperCase() === \"%\" + decimalToHexString(index).substring(2)) continue l; \n } catch(e) {} \n if (indexO === 0) { \n indexO = index;\n } else {\n if ((index - indexP) !== 1) { \n if ((indexP - indexO) !== 0) {\n var hexP = decimalToHexString(indexP);\n var hexO = decimalToHexString(indexO);\n $ERROR('#' + hexO + '-' + hexP + ' ');\n } \n else {\n var hexP = decimalToHexString(indexP);\n $ERROR('#' + hexP + ' ');\n } \n indexO = index;\n } \n }\n indexP = index;\n errorCount++; \n}\n\nif (errorCount > 0) {\n if ((indexP - indexO) !== 0) {\n var hexP = decimalToHexString(indexP);\n var hexO = decimalToHexString(indexO);\n $ERROR('#' + hexO + '-' + hexP + ' ');\n } else {\n var hexP = decimalToHexString(indexP);\n $ERROR('#' + hexP + ' ');\n } \n $ERROR('Total error: ' + errorCount + ' bad Unicode character in ' + count + ' ');\n}\n\nfunction decimalToHexString(n) {\n n = Number(n);\n var h = \"\";\n for (var i = 3; i >= 0; i--) {\n if (n >= Math.pow(16, i)) {\n var t = Math.floor(n / Math.pow(16, i));\n n -= t * Math.pow(16, i);\n if ( t >= 10 ) {\n if ( t == 10 ) { h += \"A\"; }\n if ( t == 11 ) { h += \"B\"; }\n if ( t == 12 ) { h += \"C\"; }\n if ( t == 13 ) { h += \"D\"; }\n if ( t == 14 ) { h += \"E\"; }\n if ( t == 15 ) { h += \"F\"; }\n } else {\n h += String(t);\n }\n } else {\n h += \"0\";\n }\n }\n return h;\n}\n",
+ "id": "S15.1.3.4_A2.1_T1"
+ },
+ {
+ "section": "15.1.3.4",
+ "description": "Complex tests, use RFC 3629",
+ "test": "errorCount = 0;\ncount = 0;\nvar indexP;\nvar indexO = 0; \nl:\nfor (index = 0x0080; index <= 0x07FF; index++) {\n count++; \n hex1 = decimalToHexString(0x0080 + (index & 0x003F)).substring(2);\n hex2 = decimalToHexString(0x00C0 + (index & 0x07C0) / 0x0040).substring(2); \n str = String.fromCharCode(index);\n try {\n if (encodeURIComponent(str).toUpperCase() === \"%\" + hex2 + \"%\" + hex1) continue;\n } catch(e) {} \n if (indexO === 0) { \n indexO = index;\n } else {\n if ((index - indexP) !== 1) { \n if ((indexP - indexO) !== 0) {\n var hexP = decimalToHexString(indexP);\n var hexO = decimalToHexString(indexO);\n $ERROR('#' + hexO + '-' + hexP + ' ');\n } \n else {\n var hexP = decimalToHexString(indexP);\n $ERROR('#' + hexP + ' ');\n } \n indexO = index;\n } \n }\n indexP = index;\n errorCount++; \n}\n\nif (errorCount > 0) {\n if ((indexP - indexO) !== 0) {\n var hexP = decimalToHexString(indexP);\n var hexO = decimalToHexString(indexO);\n $ERROR('#' + hexO + '-' + hexP + ' ');\n } else {\n var hexP = decimalToHexString(indexP);\n $ERROR('#' + hexP + ' ');\n } \n $ERROR('Total error: ' + errorCount + ' bad Unicode character in ' + count + ' ');\n}\n\nfunction decimalToHexString(n) {\n n = Number(n);\n var h = \"\";\n for (var i = 3; i >= 0; i--) {\n if (n >= Math.pow(16, i)) {\n var t = Math.floor(n / Math.pow(16, i));\n n -= t * Math.pow(16, i);\n if ( t >= 10 ) {\n if ( t == 10 ) { h += \"A\"; }\n if ( t == 11 ) { h += \"B\"; }\n if ( t == 12 ) { h += \"C\"; }\n if ( t == 13 ) { h += \"D\"; }\n if ( t == 14 ) { h += \"E\"; }\n if ( t == 15 ) { h += \"F\"; }\n } else {\n h += String(t);\n }\n } else {\n h += \"0\";\n }\n }\n return h;\n}\n",
+ "id": "S15.1.3.4_A2.2_T1"
+ },
+ {
+ "section": "15.1.3.4",
+ "description": "Complex tests, use RFC 3629",
+ "test": "errorCount = 0;\ncount = 0;\nvar indexP;\nvar indexO = 0; \nfor (index = 0x0800; index <= 0xD7FF; index++) {\n count++; \n hex1 = decimalToHexString(0x0080 + (index & 0x003F)).substring(2);\n hex2 = decimalToHexString(0x0080 + (index & 0x0FC0) / 0x0040).substring(2);\n hex3 = decimalToHexString(0x00E0 + (index & 0xF000) / 0x1000).substring(2);\n str = String.fromCharCode(index);\n try {\n if (encodeURIComponent(str).toUpperCase() === \"%\" + hex3 + \"%\" + hex2 + \"%\" + hex1) continue;\n } catch(e) {} \n if (indexO === 0) { \n indexO = index;\n } else {\n if ((index - indexP) !== 1) { \n if ((indexP - indexO) !== 0) {\n var hexP = decimalToHexString(indexP);\n var hexO = decimalToHexString(indexO);\n $ERROR('#' + hexO + '-' + hexP + ' ');\n } \n else {\n var hexP = decimalToHexString(indexP);\n $ERROR('#' + hexP + ' ');\n } \n indexO = index;\n } \n }\n indexP = index;\n errorCount++; \n} \n\nif (errorCount > 0) {\n if ((indexP - indexO) !== 0) {\n var hexP = decimalToHexString(indexP);\n var hexO = decimalToHexString(indexO);\n $ERROR('#' + hexO + '-' + hexP + ' ');\n } else {\n var hexP = decimalToHexString(indexP);\n $ERROR('#' + hexP + ' ');\n } \n $ERROR('Total error: ' + errorCount + ' bad Unicode character in ' + count + ' ');\n}\n\nfunction decimalToHexString(n) {\n n = Number(n);\n var h = \"\";\n for (var i = 3; i >= 0; i--) {\n if (n >= Math.pow(16, i)) {\n var t = Math.floor(n / Math.pow(16, i));\n n -= t * Math.pow(16, i);\n if ( t >= 10 ) {\n if ( t == 10 ) { h += \"A\"; }\n if ( t == 11 ) { h += \"B\"; }\n if ( t == 12 ) { h += \"C\"; }\n if ( t == 13 ) { h += \"D\"; }\n if ( t == 14 ) { h += \"E\"; }\n if ( t == 15 ) { h += \"F\"; }\n } else {\n h += String(t);\n }\n } else {\n h += \"0\";\n }\n }\n return h;\n}\n",
+ "id": "S15.1.3.4_A2.3_T1"
+ },
+ {
+ "section": "15.1.3.4",
+ "description": "Complex tests, use RFC 3629, string.charAt(k+1) in [0xDC00, 0xDDFF, 0xDFFF]",
+ "test": "chars = [0xDC00, 0xDDFF, 0xDFFF]; \nerrorCount = 0;\ncount = 0;\nvar indexP;\nvar indexO = 0; \nfor (index = 0xD800; index <= 0xDBFF; index++) {\n res = true;\n for (indexC = 0; indexC < chars.length; indexC++) {\n index1 = (index - 0xD800) * 0x400 + (chars[indexC] - 0xDC00) + 0x10000; \n hex1 = decimalToHexString(0x0080 + (index1 & 0x003F)).substring(2);\n hex2 = decimalToHexString(0x0080 + (index1 & 0x0FC0) / 0x0040).substring(2);\n hex3 = decimalToHexString(0x0080 + (index1 & 0x3F000) / 0x1000).substring(2);\n hex4 = decimalToHexString(0x00F0 + (index1 & 0x1C0000) / 0x40000).substring(2);\n str = String.fromCharCode(index, chars[indexC]);\n try {\n if (encodeURIComponent(str).toUpperCase() !== \"%\" + hex4 + \"%\" + hex3 + \"%\" + hex2 + \"%\" + hex1) {\n res = false;\n }\n } catch(e) {res = false} \n }\n if (res !== true) { \n if (indexO === 0) { \n indexO = index;\n } else {\n if ((index - indexP) !== 1) { \n if ((indexP - indexO) !== 0) {\n var hexP = decimalToHexString(indexP);\n var hexO = decimalToHexString(indexO);\n $ERROR('#' + hexO + '-' + hexP + ' ');\n } \n else {\n var hexP = decimalToHexString(indexP);\n $ERROR('#' + hexP + ' ');\n } \n indexO = index;\n } \n }\n indexP = index;\n errorCount++; \n }\n count++; \n}\n\nif (errorCount > 0) {\n if ((indexP - indexO) !== 0) {\n var hexP = decimalToHexString(indexP);\n var hexO = decimalToHexString(indexO);\n $ERROR('#' + hexO + '-' + hexP + ' ');\n } else {\n var hexP = decimalToHexString(indexP);\n $ERROR('#' + hexP + ' ');\n } \n $ERROR('Total error: ' + errorCount + ' bad Unicode character in ' + count + ' ');\n}\n\nfunction decimalToHexString(n) {\n n = Number(n);\n var h = \"\";\n for (var i = 3; i >= 0; i--) {\n if (n >= Math.pow(16, i)) {\n var t = Math.floor(n / Math.pow(16, i));\n n -= t * Math.pow(16, i);\n if ( t >= 10 ) {\n if ( t == 10 ) { h += \"A\"; }\n if ( t == 11 ) { h += \"B\"; }\n if ( t == 12 ) { h += \"C\"; }\n if ( t == 13 ) { h += \"D\"; }\n if ( t == 14 ) { h += \"E\"; }\n if ( t == 15 ) { h += \"F\"; }\n } else {\n h += String(t);\n }\n } else {\n h += \"0\";\n }\n }\n return h;\n}\n",
+ "id": "S15.1.3.4_A2.4_T1"
+ },
+ {
+ "section": "15.1.3.4",
+ "description": "Complex tests, use RFC 3629, string.charAt(k) in [0xD800, 0xDBFF, 0xD9FF]",
+ "test": "chars = [0xD800, 0xDBFF, 0xD9FF]; \nerrorCount = 0;\ncount = 0;\nvar indexP;\nvar indexO = 0; \nfor (index = 0xDC00; index <= 0xDFFF; index++) {\n res = true;\n for (indexC = 0; indexC < chars.length; indexC++) {\n index1 = (chars[indexC] - 0xD800) * 0x400 + (index - 0xDC00) + 0x10000; \n hex1 = decimalToHexString(0x0080 + (index1 & 0x003F)).substring(2);\n hex2 = decimalToHexString(0x0080 + (index1 & 0x0FC0) / 0x0040).substring(2);\n hex3 = decimalToHexString(0x0080 + (index1 & 0x3F000) / 0x1000).substring(2);\n hex4 = decimalToHexString(0x00F0 + (index1 & 0x1C0000) / 0x40000).substring(2);\n str = String.fromCharCode(chars[indexC], index);\n try {\n if (encodeURIComponent(str).toUpperCase() !== \"%\" + hex4 + \"%\" + hex3 + \"%\" + hex2 + \"%\" + hex1) {\n res = false;\n }\n } catch(e) {res = false} \n }\n if (res !== true) { \n if (indexO === 0) { \n indexO = index;\n } else {\n if ((index - indexP) !== 1) { \n if ((indexP - indexO) !== 0) {\n var hexP = decimalToHexString(indexP);\n var hexO = decimalToHexString(indexO);\n $ERROR('#' + hexO + '-' + hexP + ' ');\n } \n else {\n var hexP = decimalToHexString(indexP);\n $ERROR('#' + hexP + ' ');\n } \n indexO = index;\n } \n }\n indexP = index;\n errorCount++; \n }\n count++; \n}\n\nif (errorCount > 0) {\n if ((indexP - indexO) !== 0) {\n var hexP = decimalToHexString(indexP);\n var hexO = decimalToHexString(indexO);\n $ERROR('#' + hexO + '-' + hexP + ' ');\n } else {\n var hexP = decimalToHexString(indexP);\n $ERROR('#' + hexP + ' ');\n } \n $ERROR('Total error: ' + errorCount + ' bad Unicode character in ' + count + ' ');\n}\n\nfunction decimalToHexString(n) {\n n = Number(n);\n var h = \"\";\n for (var i = 3; i >= 0; i--) {\n if (n >= Math.pow(16, i)) {\n var t = Math.floor(n / Math.pow(16, i));\n n -= t * Math.pow(16, i);\n if ( t >= 10 ) {\n if ( t == 10 ) { h += \"A\"; }\n if ( t == 11 ) { h += \"B\"; }\n if ( t == 12 ) { h += \"C\"; }\n if ( t == 13 ) { h += \"D\"; }\n if ( t == 14 ) { h += \"E\"; }\n if ( t == 15 ) { h += \"F\"; }\n } else {\n h += String(t);\n }\n } else {\n h += \"0\";\n }\n }\n return h;\n}\n",
+ "id": "S15.1.3.4_A2.4_T2"
+ },
+ {
+ "section": "15.1.3.4",
+ "description": "Complex tests, use RFC 3629",
+ "test": "errorCount = 0;\ncount = 0;\nvar indexP;\nvar indexO = 0; \nfor (index = 0xE000; index <= 0xFFFF; index++) {\n count++; \n hex1 = decimalToHexString(0x0080 + (index & 0x003F)).substring(2);\n hex2 = decimalToHexString(0x0080 + (index & 0x0FC0) / 0x0040).substring(2);\n hex3 = decimalToHexString(0x00E0 + (index & 0xF000) / 0x1000).substring(2);\n str = String.fromCharCode(index);\n try {\n if (encodeURIComponent(str).toUpperCase() === \"%\" + hex3 + \"%\" + hex2 + \"%\" + hex1) continue;\n } catch(e) {} \n if (indexO === 0) { \n indexO = index;\n } else {\n if ((index - indexP) !== 1) { \n if ((indexP - indexO) !== 0) {\n var hexP = decimalToHexString(indexP);\n var hexO = decimalToHexString(indexO);\n $ERROR('#' + hexO + '-' + hexP + ' ');\n } \n else {\n var hexP = decimalToHexString(indexP);\n $ERROR('#' + hexP + ' ');\n } \n indexO = index;\n } \n }\n indexP = index;\n errorCount++; \n}\n\nif (errorCount > 0) {\n if ((indexP - indexO) !== 0) {\n var hexP = decimalToHexString(indexP);\n var hexO = decimalToHexString(indexO);\n $ERROR('#' + hexO + '-' + hexP + ' ');\n } else {\n var hexP = decimalToHexString(indexP);\n $ERROR('#' + hexP + ' ');\n } \n $ERROR('Total error: ' + errorCount + ' bad Unicode character in ' + count + ' ');\n}\n\nfunction decimalToHexString(n) {\n n = Number(n);\n var h = \"\";\n for (var i = 3; i >= 0; i--) {\n if (n >= Math.pow(16, i)) {\n var t = Math.floor(n / Math.pow(16, i));\n n -= t * Math.pow(16, i);\n if ( t >= 10 ) {\n if ( t == 10 ) { h += \"A\"; }\n if ( t == 11 ) { h += \"B\"; }\n if ( t == 12 ) { h += \"C\"; }\n if ( t == 13 ) { h += \"D\"; }\n if ( t == 14 ) { h += \"E\"; }\n if ( t == 15 ) { h += \"F\"; }\n } else {\n h += String(t);\n }\n } else {\n h += \"0\";\n }\n }\n return h;\n}\n",
+ "id": "S15.1.3.4_A2.5_T1"
+ },
+ {
+ "section": "15.1.3.4",
+ "description": "Complex tests",
+ "test": "uriReserved = [\"%3B\", \"%2F\", \"%3F\", \"%3A\", \"%40\", \"%26\", \"%3D\", \"%2B\", \"%24\", \"%2C\"];\nuriReserved_ = [\";\", \"/\", \"?\", \":\", \"@\", \"&\", \"=\", \"+\", \"$\", \",\"]; \nfor (indexC = 0; indexC < 10; indexC++) { \n var str = uriReserved_[indexC];\n if (encodeURIComponent(str) !== uriReserved[indexC]) {\n $ERROR('#' + (indexC + 1) + ': unescapedURIComponentSet not containing' + str);\n } \n}\n",
+ "id": "S15.1.3.4_A3.1_T1"
+ },
+ {
+ "section": "15.1.3.4",
+ "description": "Complex tests, uriUnescaped :: uriAlpha",
+ "test": "uriAlpha = [\"A\", \"B\", \"C\", \"D\", \"E\", \"F\", \"G\", \"H\", \"I\", \"J\", \"K\", \"L\", \"M\", \"N\", \"O\", \"P\", \"Q\", \"R\", \"S\", \"T\", \"U\", \"V\", \"W\", \"X\", \"Y\", \"Z\", \"a\", \"b\", \"c\", \"d\", \"e\", \"f\", \"g\", \"h\", \"i\", \"j\", \"k\", \"l\", \"m\", \"n\", \"o\", \"p\", \"q\", \"r\", \"s\", \"t\", \"u\", \"v\", \"w\", \"x\", \"y\", \"z\"];\nfor (indexC = 0; indexC < uriAlpha.length; indexC++) {\n var str = uriAlpha[indexC]; \n if (encodeURIComponent(str) !== str) {\n $ERROR('#' + (indexC + 1) + ': unescapedURISet containing ' + str);\n } \n}\n",
+ "id": "S15.1.3.4_A3.2_T1"
+ },
+ {
+ "section": "15.1.3.4",
+ "description": "Complex tests, uriUnescaped :: DecimalDigit",
+ "test": "DecimalDigit = [\"0\", \"1\", \"2\", \"3\", \"4\", \"5\", \"6\", \"7\", \"8\", \"9\"];\nfor (indexC = 0; indexC < DecimalDigit.length; indexC++) {\n var str = DecimalDigit[indexC]; \n if (encodeURIComponent(str) !== str) {\n $ERROR('#' + (indexC + 1) + ': unescapedURISet containing' + str);\n } \n}\n",
+ "id": "S15.1.3.4_A3.2_T2"
+ },
+ {
+ "section": "15.1.3.4",
+ "description": "Complex tests, uriUnescaped :: uriMark",
+ "test": "uriMark = [\"-\", \"_\", \".\", \"!\", \"~\", \"*\", \"'\", \"(\", \")\"];\nfor (indexC = 0; indexC < uriMark.length; indexC++) {\n var str = uriMark[indexC]; \n if (encodeURIComponent(str) !== str) {\n $ERROR('#' + (indexC + 1) + ': unescapedURISet containing' + str);\n } \n}\n",
+ "id": "S15.1.3.4_A3.2_T3"
+ },
+ {
+ "section": "15.1.3.4",
+ "description": "encodeURIComponent(\"#\") === \"%23\"",
+ "test": "if (encodeURIComponent(\"#\") !== \"%23\") {\n $ERROR('#1: unescapedURIComponentSet not containing \"%23\"');\n} \n",
+ "id": "S15.1.3.4_A3.3_T1"
+ },
+ {
+ "section": "15.1.3.4",
+ "description": "Checking ENGLISH ALPHABET",
+ "test": "//CHECK#1\nif (encodeURIComponent(\"http://unipro.ru/0123456789\") !== \"http%3A%2F%2Funipro.ru%2F0123456789\") {\n $ERROR('#1: http://unipro.ru/0123456789');\n}\n\n//CHECK#2\nif (encodeURIComponent(\"aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ\") !== \"aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ\") {\n $ERROR('#2: aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ');\n}\n\n//CHECK#3\nif (encodeURIComponent(\";/?:@&=+$,\") !== \"%3B%2F%3F%3A%40%26%3D%2B%24%2C\") {\n $ERROR('#3: ');\n}\n",
+ "id": "S15.1.3.4_A4_T1"
+ },
+ {
+ "section": "15.1.3.4",
+ "description": "Checking RUSSIAN ALPHABET",
+ "test": "//CHECK#1\nif ((encodeURIComponent(\"http://ru.wikipedia.org/wiki/Юникод\") !== \"http%3A%2F%2Fru.wikipedia.org%2Fwiki%2F%D0%AE%D0%BD%D0%B8%D0%BA%D0%BE%D0%B4\") && (encodeURIComponent(\"http://ru.wikipedia.org/wiki/Юникод\") !== \"http%3A%2F%2Fru.wikipedia.org%2Fwiki%2F\" + \"%D0%AE%D0%BD%D0%B8%D0%BA%D0%BE%D0%B4\".toLowerCase())) {\n $ERROR('#1: http://ru.wikipedia.org/wiki/Юникод');\n}\n\n//CHECK#2\nif ((encodeURIComponent(\"http://ru.wikipedia.org/wiki/Юникод#Ссылки\") !== \"http%3A%2F%2Fru.wikipedia.org%2Fwiki%2F%D0%AE%D0%BD%D0%B8%D0%BA%D0%BE%D0%B4%23%D0%A1%D1%81%D1%8B%D0%BB%D0%BA%D0%B8\") && (encodeURIComponent(\"http://ru.wikipedia.org/wiki/Юникод#Ссылки\") !== \"http%3A%2F%2Fru.wikipedia.org%2Fwiki%2F\" + \"%D0%AE%D0%BD%D0%B8%D0%BA%D0%BE%D0%B4%23%D0%A1%D1%81%D1%8B%D0%BB%D0%BA%D0%B8\".toLowerCase())) {\n $ERROR('#2: http://ru.wikipedia.org/wiki/Юникод#Ссылки');\n}\n\n//CHECK#3\nif ((encodeURIComponent(\"http://ru.wikipedia.org/wiki/Юникод#Версии Юникода\") !== \"http%3A%2F%2Fru.wikipedia.org%2Fwiki%2F%D0%AE%D0%BD%D0%B8%D0%BA%D0%BE%D0%B4%23%D0%92%D0%B5%D1%80%D1%81%D0%B8%D0%B8%20%D0%AE%D0%BD%D0%B8%D0%BA%D0%BE%D0%B4%D0%B0\") && ((encodeURIComponent(\"http://ru.wikipedia.org/wiki/Юникод%23Версии Юникода\") !== \"http%3A%2F%2Fru.wikipedia.org%2Fwiki%2F\" + \"%D0%AE%D0%BD%D0%B8%D0%BA%D0%BE%D0%B4#%D0%92%D0%B5%D1%80%D1%81%D0%B8%D0%B8%20%D0%AE%D0%BD%D0%B8%D0%BA%D0%BE%D0%B4%D0%B0\".toLowerCase()))) {\n $ERROR('#3: http://ru.wikipedia.org/wiki/Юникод#Версии Юникода');\n}\n",
+ "id": "S15.1.3.4_A4_T2"
+ },
+ {
+ "section": "15.1.3.4",
+ "description": "Checking URL with Line Terminator",
+ "test": "//CHECK#1\nif ((encodeURIComponent(\"http://unipro.ru/\\nabout\") !== \"http%3A%2F%2Funipro.ru%2F%0Aabout\") && encodeURIComponent(\"http://unipro.ru/\\nabout\") !== \"http%3A%2F%2Funipro.ru%2F%0aabout\") {\n $ERROR('#1: http://unipro.ru/\\\\nabout');\n}\n\n//CHECK#2\nif ((encodeURIComponent(\"http://unipro.ru/\\vabout\") !== \"http%3A%2F%2Funipro.ru%2F%0Babout\") && encodeURIComponent(\"http://unipro.ru/\\vabout\") !== \"http%3A%2F%2Funipro.ru%2F%0babout\") {\n $ERROR('#2: http://unipro.ru/\\\\vabout');\n}\n\n//CHECK#3\nif ((encodeURIComponent(\"http://unipro.ru/\\fabout\") !== \"http%3A%2F%2Funipro.ru%2F%0Cabout\") && encodeURIComponent(\"http://unipro.ru/\\fabout\") !== \"http%3A%2F%2Funipro.ru%2F%0cabout\") {\n $ERROR('#3: http://unipro.ru/\\\\fabout');\n}\n\n//CHECK#4\nif ((encodeURIComponent(\"http://unipro.ru/\\rabout\") !== \"http%3A%2F%2Funipro.ru%2F%0Dabout\") && encodeURIComponent(\"http://unipro.ru/\\rabout\") !== \"http%3A%2F%2Funipro.ru%2F%0dabout\") {\n $ERROR('#4: http://unipro.ru/\\\\rabout');\n}\n",
+ "id": "S15.1.3.4_A4_T3"
+ },
+ {
+ "section": "15.1.3.4",
+ "description": "Test some url",
+ "test": "//CHECK#1\nif (encodeURIComponent(\"\") !== \"\") {\n $ERROR('#1: \"\"');\n}\n\n//CHECK#2\nif (encodeURIComponent(\"http://unipro.ru\") !== \"http%3A%2F%2Funipro.ru\") {\n $ERROR('#2: http://unipro.ru');\n}\n\n//CHECK#3\nif (encodeURIComponent(\"http://www.google.ru/support/jobs/bin/static.py?page=why-ru.html&sid=liveandwork\") !== \"http%3A%2F%2Fwww.google.ru%2Fsupport%2Fjobs%2Fbin%2Fstatic.py%3Fpage%3Dwhy-ru.html%26sid%3Dliveandwork\") {\n $ERROR('#3: http://www.google.ru/support/jobs/bin/static.py?page=why-ru.html&sid=liveandwork\"');\n} \n\n//CHECK#4\nif (encodeURIComponent(\"http://en.wikipedia.org/wiki/UTF-8#Description\") !== \"http%3A%2F%2Fen.wikipedia.org%2Fwiki%2FUTF-8%23Description\") {\n $ERROR('#4: http://en.wikipedia.org/wiki/UTF-8#Description');\n}\n",
+ "id": "S15.1.3.4_A4_T4"
+ },
+ {
+ "section": "15.1.3.4, 15.2.4.7, 12.6.4",
+ "description": "Checking use propertyIsEnumerable, for-in",
+ "test": "//CHECK#1\nif (encodeURIComponent.propertyIsEnumerable('length') !== false) {\n $ERROR('#1: encodeURIComponent.propertyIsEnumerable(\\'length\\') === false. Actual: ' + (encodeURIComponent.propertyIsEnumerable('length')));\n}\n\n//CHECK#2\nresult = true;\nfor (p in encodeURIComponent){\n if (p === \"length\") {\n result = false;\n } \n}\n\nif (result !== true) {\n $ERROR('#2: result = true; for (p in encodeURIComponent) { if (p === \"length\") result = false; } result === true;');\n}\n",
+ "id": "S15.1.3.4_A5.1"
+ },
+ {
+ "section": "15.1.3.4, 15.2.4.5, 11.4.1",
+ "description": "Checking use hasOwnProperty, delete",
+ "test": "//CHECK#1\nif (encodeURIComponent.hasOwnProperty('length') !== true) {\n $FAIL('#1: encodeURIComponent.hasOwnProperty(\\'length\\') === true. Actual: ' + (encodeURIComponent.hasOwnProperty('length')));\n}\n\ndelete encodeURIComponent.length;\n\n//CHECK#2\nif (encodeURIComponent.hasOwnProperty('length') !== true) {\n $ERROR('#2: delete encodeURIComponent.length; encodeURIComponent.hasOwnProperty(\\'length\\') === true. Actual: ' + (encodeURIComponent.hasOwnProperty('length')));\n}\n\n//CHECK#3\nif (encodeURIComponent.length === undefined) {\n $ERROR('#3: delete encodeURIComponent.length; encodeURIComponent.length !== undefined');\n}\n\n\n\n",
+ "id": "S15.1.3.4_A5.2"
+ },
+ {
+ "section": "15.1.3.4",
+ "description": "Checking if varying the length property fails",
+ "test": "//CHECK#1\nx = encodeURIComponent.length;\nencodeURIComponent.length = Infinity;\nif (encodeURIComponent.length !== x) {\n $ERROR('#1: x = encodeURIComponent.length; encodeURIComponent.length = Infinity; encodeURIComponent.length === x. Actual: ' + (encodeURIComponent.length));\n}\n\n",
+ "id": "S15.1.3.4_A5.3"
+ },
+ {
+ "section": "15.1.3.4",
+ "description": "encodeURIComponent.length === 1",
+ "test": "//CHECK#1\nif (encodeURIComponent.length !== 1) {\n $ERROR('#1: encodeURIComponent.length === 1. Actual: ' + (encodeURIComponent.length));\n} \n\n",
+ "id": "S15.1.3.4_A5.4"
+ },
+ {
+ "section": "15.1.3.4, 15.2.4.7, 12.6.4",
+ "description": "Checking use propertyIsEnumerable, for-in",
+ "test": "//CHECK#1\nif (this.propertyIsEnumerable('encodeURIComponent') !== false) {\n $ERROR('#1: this.propertyIsEnumerable(\\'encodeURIComponent\\') === false. Actual: ' + (this.propertyIsEnumerable('encodeURIComponent')));\n}\n\n//CHECK#2\nresult = true;\nfor (p in this){\n if (p === \"encodeURIComponent\") {\n result = false;\n } \n}\n\nif (result !== true) {\n $ERROR('#2: result = true; for (p in this) { if (p === \"encodeURIComponent\") result = false; } result === true;');\n}\n",
+ "id": "S15.1.3.4_A5.5"
+ },
+ {
+ "section": "15.1.3.4",
+ "description": "Checking encodeURIComponent.prototype",
+ "test": "//CHECK#1\nif (encodeURIComponent.prototype !== undefined) {\n $ERROR('#1: encodeURIComponent.prototype === undefined. Actual: ' + (encodeURIComponent.prototype));\n}\n",
+ "id": "S15.1.3.4_A5.6"
+ },
+ {
+ "section": "15.1.3.4, 11.2.2",
+ "description": "If property does not implement the internal [[Construct]] method, throw a TypeError exception",
+ "test": "//CHECK#1\n\ntry {\n new encodeURIComponent();\n $ERROR('#1.1: new encodeURIComponent() throw TypeError. Actual: ' + (new encodeURIComponent()));\n} catch (e) {\n if ((e instanceof TypeError) !== true) {\n $ERROR('#1.2: new encodeURIComponent() throw TypeError. Actual: ' + (e));\n }\n}\n",
+ "id": "S15.1.3.4_A5.7"
+ },
+ {
+ "section": "15.1.3.4, 9.8, 8.6.2.6",
+ "description": "If Type(value) is Object, evaluate ToPrimitive(value, String)",
+ "test": "//CHECK#1\nvar object = {valueOf: function() {return \"^\"}};\nif (encodeURIComponent(object) !== \"%5Bobject%20Object%5D\") {\n $ERROR('#1: var object = {valueOf: function() {return \"^\"}}; encodeURIComponent(object) === %5Bobject%20Object%5D. Actual: ' + (encodeURIComponent(object)));\n}\n\n//CHECK#2\nvar object = {valueOf: function() {return \"\"}, toString: function() {return \"^\"}};\nif (encodeURIComponent(object) !== \"%5E\") {\n $ERROR('#2: var object = {valueOf: function() {return \"\"}, toString: function() {return \"^\"}}; encodeURIComponent(object) === \"%5E\". Actual: ' + (encodeURIComponent(object)));\n} \n\n//CHECK#3\nvar object = {valueOf: function() {return \"^\"}, toString: function() {return {}}};\nif (encodeURIComponent(object) !== \"%5E\") {\n $ERROR('#3: var object = {valueOf: function() {return \"^\"}, toString: function() {return {}}}; encodeURIComponent(object) === \"%5E\". Actual: ' + (encodeURIComponent(object)));\n}\n\n//CHECK#4\ntry {\n var object = {valueOf: function() {throw \"error\"}, toString: function() {return \"^\"}};\n if (encodeURIComponent(object) !== \"%5E\") {\n $ERROR('#4.1: var object = {valueOf: function() {throw \"error\"}, toString: function() {return \"^\"}}; encodeURIComponent(object) === \"%5E\". Actual: ' + (encodeURIComponent(object)));\n }\n}\ncatch (e) {\n if (e === \"error\") {\n $ERROR('#4.2: var object = {valueOf: function() {throw \"error\"}, toString: function() {return \"^\"}}; encodeURIComponent(object) not throw \"error\"');\n } else {\n $ERROR('#4.3: var object = {valueOf: function() {throw \"error\"}, toString: function() {return \"^\"}}; encodeURIComponent(object) not throw Error. Actual: ' + (e));\n }\n}\n\n//CHECK#5\nvar object = {toString: function() {return \"^\"}};\nif (encodeURIComponent(object) !== \"%5E\") {\n $ERROR('#5: var object = {toString: function() {return \"^\"}}; encodeURIComponent(object) === \"%5E\". Actual: ' + (encodeURIComponent(object)));\n}\n\n//CHECK#6\nvar object = {valueOf: function() {return {}}, toString: function() {return \"^\"}}\nif (encodeURIComponent(object) !== \"%5E\") {\n $ERROR('#6: var object = {valueOf: function() {return {}}, toString: function() {return \"^\"}}; encodeURIComponent(object) === \"%5E\". Actual: ' + (encodeURIComponent(object)));\n}\n\n//CHECK#7\ntry {\n var object = {valueOf: function() {return \"^\"}, toString: function() {throw \"error\"}};\n encodeURIComponent(object);\n $ERROR('#7.1: var object = {valueOf: function() {return \"^\"}, toString: function() {throw \"error\"}}; encodeURIComponent(object) throw \"error\". Actual: ' + (encodeURIComponent(object)));\n} \ncatch (e) {\n if (e !== \"error\") {\n $ERROR('#7.2: var object = {valueOf: function() {return \"^\"}, toString: function() {throw \"error\"}}; encodeURIComponent(object) throw \"error\". Actual: ' + (e));\n } \n}\n\n//CHECK#8\ntry {\n var object = {valueOf: function() {return {}}, toString: function() {return {}}};\n encodeURIComponent(object);\n $ERROR('#8.1: var object = {valueOf: function() {return {}}, toString: function() {return {}}}; encodeURIComponent(object) throw TypeError. Actual: ' + (encodeURIComponent(object)));\n} \ncatch (e) {\n if ((e instanceof TypeError) !== true) {\n $ERROR('#8.2: var object = {valueOf: function() {return {}}, toString: function() {return {}}}; encodeURIComponent(object) throw TypeError. Actual: ' + (e));\n } \n}\n",
+ "id": "S15.1.3.4_A6_T1"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.10.1_Patterns.json b/website/resources/scripts/testcases2/15.10.1_Patterns.json
new file mode 100644
index 000000000..b7111d56b
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.10.1_Patterns.json
@@ -0,0 +1,104 @@
+{
+ "testCollection": {
+ "name": "15.10.1_Patterns",
+ "numTests": 16,
+ "tests": [
+ {
+ "section": "15.10.1",
+ "description": "Tested RegExp is \"a**\"",
+ "test": "//CHECK#1\ntry {\n\t$ERROR('#1.1: new RegExp(\"a**\") throw SyntaxError. Actual: ' + (new RegExp(\"a**\")));\n} catch (e) {\n\tif ((e instanceof SyntaxError !== true)) {\n\t\t$ERROR('#1.2: new RegExp(\"a**\") throw SyntaxError. Actual: ' + (e));\n\t}\n}\n",
+ "id": "S15.10.1_A1_T1"
+ },
+ {
+ "section": "15.10.1",
+ "description": "Tested RegExp is \"++a\"",
+ "test": "//CHECK#1\ntry {\n\t$ERROR('#1.1: new RegExp(\"++a\") throw SyntaxError. Actual: ' + (new RegExp(\"++a\")));\n} catch (e) {\n\tif ((e instanceof SyntaxError) !== true) {\n\t\t$ERROR('#1.2: new RegExp(\"++a\") throw SyntaxError. Actual: ' + (e));\n\t}\n}\n\n",
+ "id": "S15.10.1_A1_T10"
+ },
+ {
+ "section": "15.10.1",
+ "description": "Tested RegExp is \"?a\"",
+ "test": "//CHECK#1\ntry {\n\t$ERROR('#1.1: new RegExp(\"?a\") throw SyntaxError. Actual: ' + (new RegExp(\"?a\")));\n} catch (e) {\n\tif ((e instanceof SyntaxError) !== true) {\n\t\t$ERROR('#1.2: new RegExp(\"?a\") throw SyntaxError. Actual: ' + (e));\n\t}\n}\n\n",
+ "id": "S15.10.1_A1_T11"
+ },
+ {
+ "section": "15.10.1",
+ "description": "Tested RegExp is \"??a\"",
+ "test": "//CHECK#1\ntry {\n\t$ERROR('#1.1: new RegExp(\"??a\") throw SyntaxError. Actual: ' + (new RegExp(\"??a\")));\n} catch (e) {\n\tif ((e instanceof SyntaxError) !== true) {\n\t\t$ERROR('#1.2: new RegExp(\"??a\") throw SyntaxError. Actual: ' + (e));\n\t}\n}\n\n",
+ "id": "S15.10.1_A1_T12"
+ },
+ {
+ "section": "15.10.1",
+ "description": "Tested RegExp is \"x{1}{1,}\"",
+ "test": "//CHECK#1\ntry {\n\t$ERROR('#1.1: new RegExp(\"x{1}{1,}\") throw SyntaxError. Actual: ' + (new RegExp(\"x{1}{1,}\")));\n} catch (e) {\n\tif ((e instanceof SyntaxError) !== true) {\n\t\t$ERROR('#1.2: new RegExp(\"x{1}{1,}\") throw SyntaxError. Actual: ' + (e));\n\t}\n}\n\n",
+ "id": "S15.10.1_A1_T13"
+ },
+ {
+ "section": "15.10.1",
+ "description": "Tested RegExp is \"x{1,2}{1}\"",
+ "test": "//CHECK#1\ntry {\n\t$ERROR('#1.1: new RegExp(\"x{1,2}{1}\") throw SyntaxError. Actual: ' + (new RegExp(\"x{1,2}{1}\")));\n} catch (e) {\n\tif ((e instanceof SyntaxError) !== true) {\n\t\t$ERROR('#1.2: new RegExp(\"x{1,2}{1}\") throw SyntaxError. Actual: ' + (e));\n\t}\n}\n\n",
+ "id": "S15.10.1_A1_T14"
+ },
+ {
+ "section": "15.10.1",
+ "description": "Tested RegExp is \"x{1,}{1}\"",
+ "test": "//CHECK#1\ntry {\n\t$ERROR('#1.1: new RegExp(\"x{1,}{1}\") throw SyntaxError. Actual: ' + (new RegExp(\"x{1,}{1}\")));\n} catch (e) {\n\tif ((e instanceof SyntaxError) !== true) {\n\t\t$ERROR('#1.2: new RegExp(\"x{1,}{1}\") throw SyntaxError. Actual: ' + (e));\n\t}\n}\n\n",
+ "id": "S15.10.1_A1_T15"
+ },
+ {
+ "section": "15.10.1",
+ "description": "Tested RegExp is \"x{0,1}{1,}\"",
+ "test": "//CHECK#1\ntry {\n\t$ERROR('#1.1: new RegExp(\"x{0,1}{1,}\") throw SyntaxError. Actual: ' + (new RegExp(\"x{0,1}{1,}\")));\n} catch (e) {\n\tif ((e instanceof SyntaxError) !== true) {\n\t\t$ERROR('#1.2: new RegExp(\"x{0,1}{1,}\") throw SyntaxError. Actual: ' + (e));\n\t}\n}\n\n",
+ "id": "S15.10.1_A1_T16"
+ },
+ {
+ "section": "15.10.1",
+ "description": "Tested RegExp is \"a***\"",
+ "test": "//CHECK#1\ntry {\n\t$ERROR('#1.1: new RegExp(\"a***\") throw SyntaxError. Actual: ' + (new RegExp(\"a***\")));\n} catch (e) {\n\tif ((e instanceof SyntaxError) !== true) {\n\t\t$ERROR('#1.2: new RegExp(\"a***\") throw SyntaxError. Actual: ' + (e));\n\t}\n}\n\n",
+ "id": "S15.10.1_A1_T2"
+ },
+ {
+ "section": "15.10.1",
+ "description": "Tested RegExp is \"a++\"",
+ "test": "//CHECK#1\ntry {\n\t$ERROR('#1.1: new RegExp(\"a++\") throw SyntaxError. Actual: ' + (new RegExp(\"a++\")));\n} catch (e) {\n\tif ((e instanceof SyntaxError) !== true) {\n\t\t$ERROR('#1.2: new RegExp(\"a++\") throw SyntaxError. Actual: ' + (e));\n\t}\n}\n\n",
+ "id": "S15.10.1_A1_T3"
+ },
+ {
+ "section": "15.10.1",
+ "description": "Tested RegExp is \"a+++\"",
+ "test": "//CHECK#1\ntry {\n\t$ERROR('#1.1: new RegExp(\"a+++\") throw SyntaxError. Actual: ' + (new RegExp(\"a+++\")));\n} catch (e) {\n\tif ((e instanceof SyntaxError) !== true) {\n\t\t$ERROR('#1.2: new RegExp(\"a+++\") throw SyntaxError. Actual: ' + (e));\n\t}\n}\n\n",
+ "id": "S15.10.1_A1_T4"
+ },
+ {
+ "section": "15.10.1",
+ "description": "Tested RegExp is \"a???\"",
+ "test": "//CHECK#1\ntry {\n\t$ERROR('#1.1: new RegExp(\"a???\") throw SyntaxError. Actual: ' + (new RegExp(\"a???\")));\n} catch (e) {\n\tif ((e instanceof SyntaxError) !== true) {\n\t\t$ERROR('#1.2: new RegExp(\"a???\") throw SyntaxError. Actual: ' + (e));\n\t}\n}\n\n",
+ "id": "S15.10.1_A1_T5"
+ },
+ {
+ "section": "15.10.1",
+ "description": "Tested RegExp is \"a????\"",
+ "test": "//CHECK#1\ntry {\n\t$ERROR('#1.1: new RegExp(\"a????\") throw SyntaxError. Actual: ' + (new RegExp(\"a????\")));\n} catch (e) {\n\tif ((e instanceof SyntaxError) !== true) {\n\t\t$ERROR('#1.2: new RegExp(\"a????\") throw SyntaxError. Actual: ' + (e));\n\t}\n}\n\n",
+ "id": "S15.10.1_A1_T6"
+ },
+ {
+ "section": "15.10.1",
+ "description": "Tested RegExp is \"*a\"",
+ "test": "//CHECK#1\ntry {\n\t$ERROR('#1.1: new RegExp(\"*a\") throw SyntaxError. Actual: ' + (new RegExp(\"*a\")));\n} catch (e) {\n\tif ((e instanceof SyntaxError) !== true) {\n\t\t$ERROR('#1.2: new RegExp(\"*a\") throw SyntaxError. Actual: ' + (e));\n\t}\n}\n\n",
+ "id": "S15.10.1_A1_T7"
+ },
+ {
+ "section": "15.10.1",
+ "description": "Tested RegExp is \"**a\"",
+ "test": "//CHECK#1\ntry {\n\t$ERROR('#1.1: new RegExp(\"**a\") throw SyntaxError. Actual: ' + (new RegExp(\"**a\")));\n} catch (e) {\n\tif ((e instanceof SyntaxError) !== true) {\n\t\t$ERROR('#1.2: new RegExp(\"**a\") throw SyntaxError. Actual: ' + (e));\n\t}\n}\n\n",
+ "id": "S15.10.1_A1_T8"
+ },
+ {
+ "section": "15.10.1",
+ "description": "Tested RegExp is \"+a\"",
+ "test": "//CHECK#1\ntry {\n\t$ERROR('#1.1: new RegExp(\"+a\") throw SyntaxError. Actual: ' + (new RegExp(\"+a\")));\n} catch (e) {\n\tif ((e instanceof SyntaxError) !== true) {\n\t\t$ERROR('#1.2: new RegExp(\"+a\") throw SyntaxError. Actual: ' + (e));\n\t}\n}\n\n",
+ "id": "S15.10.1_A1_T9"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.10.2.10_CharacterEscape.json b/website/resources/scripts/testcases2/15.10.2.10_CharacterEscape.json
new file mode 100644
index 000000000..068db1ac2
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.10.2.10_CharacterEscape.json
@@ -0,0 +1,92 @@
+{
+ "testCollection": {
+ "name": "15.10.2.10_CharacterEscape",
+ "numTests": 14,
+ "tests": [
+ {
+ "section": "15.10.2.10",
+ "description": "Use \\t in RegExp and \\u0009 in tested string",
+ "test": "//CHECK#1\nvar arr = /\\t/.exec(\"\\u0009\");\nif ((arr === null) || (arr[0] !== \"\\u0009\")) {\n $ERROR('#1: var arr = /\\\\t/.exec(\"\\\\u0009\"); arr[0] === \"\\\\u0009\". Actual. ' + (arr && arr[0]));\n}\n\n//CHECK#2\nvar arr = /\\t\\t/.exec(\"a\\u0009\\u0009b\");\nif ((arr === null) || (arr[0] !== \"\\u0009\\u0009\")) {\n $ERROR('#2: var arr = /\\\\t\\\\t/.exec(\"a\\\\u0009\\\\u0009b\"); arr[0] === \"\\\\u0009\\\\u0009\". Actual. ' + (arr && arr[0]));\n} \n",
+ "id": "S15.10.2.10_A1.1_T1"
+ },
+ {
+ "section": "15.10.2.10",
+ "description": "Use \\n in RegExp and \\u000A in tested string",
+ "test": "//CHECK#1\nvar arr = /\\n/.exec(\"\\u000A\");\nif ((arr === null) || (arr[0] !== \"\\u000A\")) {\n $ERROR('#1: var arr = /\\\\n/.exec(\"\\\\u000A\"); arr[0] === \"\\\\u000A\". Actual. ' + (arr && arr[0]));\n}\n\n//CHECK#2\nvar arr = /\\n\\n/.exec(\"a\\u000A\\u000Ab\");\nif ((arr === null) || (arr[0] !== \"\\u000A\\u000A\")) {\n $ERROR('#2: var arr = /\\\\n\\\\n/.exec(\"a\\\\u000A\\\\u000Ab\"); arr[0] === \"\\\\u000A\\\\u000A\". Actual. ' + (arr && arr[0]));\n} \n",
+ "id": "S15.10.2.10_A1.2_T1"
+ },
+ {
+ "section": "15.10.2.10",
+ "description": "Use \\v in RegExp and \\u000B in tested string",
+ "test": "//CHECK#1\nvar arr = /\\v/.exec(\"\\u000B\");\nif ((arr === null) || (arr[0] !== \"\\u000B\")) {\n $ERROR('#1: var arr = /\\\\v/.exec(\"\\\\u000B\"); arr[0] === \"\\\\u000B\". Actual. ' + (arr && arr[0]));\n}\n\n//CHECK#2\nvar arr = /\\v\\v/.exec(\"a\\u000B\\u000Bb\");\nif ((arr === null) || (arr[0] !== \"\\u000B\\u000B\")) {\n $ERROR('#2: var arr = /\\\\v\\\\v/.exec(\"a\\\\u000B\\\\u000Bb\"); arr[0] === \"\\\\u000B\\\\u000B\". Actual. ' + (arr && arr[0]));\n} \n",
+ "id": "S15.10.2.10_A1.3_T1"
+ },
+ {
+ "section": "15.10.2.10",
+ "description": "Use \\f in RegExp and \\u000C in tested string",
+ "test": "//CHECK#1\nvar arr = /\\f/.exec(\"\\u000C\");\nif ((arr === null) || (arr[0] !== \"\\u000C\")) {\n $ERROR('#1: var arr = /\\\\f/.exec(\"\\\\u000C\"); arr[0] === \"\\\\u000C\". Actual. ' + (arr && arr[0]));\n}\n\n//CHECK#2\nvar arr = /\\f\\f/.exec(\"a\\u000C\\u000Cb\");\nif ((arr === null) || (arr[0] !== \"\\u000C\\u000C\")) {\n $ERROR('#2: var arr = /\\\\f\\\\f/.exec(\"a\\\\u000C\\\\u000Cb\"); arr[0] === \"\\\\u000C\\\\u000C\". Actual. ' + (arr && arr[0]));\n} \n",
+ "id": "S15.10.2.10_A1.4_T1"
+ },
+ {
+ "section": "15.10.2.10",
+ "description": "Use \\r in RegExp and \\u000D in tested string",
+ "test": "//CHECK#1\nvar arr = /\\r/.exec(\"\\u000D\");\nif ((arr === null) || (arr[0] !== \"\\u000D\")) {\n $ERROR('#1: var arr = /\\\\r/.exec(\"\\\\u000D\"); arr[0] === \"\\\\u000D\". Actual. ' + (arr && arr[0]));\n}\n\n//CHECK#2\nvar arr = /\\r\\r/.exec(\"a\\u000D\\u000Db\");\nif ((arr === null) || (arr[0] !== \"\\u000D\\u000D\")) {\n $ERROR('#2: var arr = /\\\\r\\\\r/.exec(\"a\\\\u000D\\\\u000Db\"); arr[0] === \"\\\\u000D\\\\u000D\". Actual. ' + (arr && arr[0]));\n} \n",
+ "id": "S15.10.2.10_A1.5_T1"
+ },
+ {
+ "section": "15.10.2.10",
+ "description": "ControlLetter :: A - Z",
+ "test": "//CHECK#0041-005A\nvar result = true; \nfor (alpha = 0x0041; alpha <= 0x005A; alpha++) {\n str = String.fromCharCode(alpha % 32);\n arr = (new RegExp(\"\\\\c\" + String.fromCharCode(alpha))).exec(str); \n if ((arr === null) || (arr[0] !== str)) {\n result = false;\n }\n}\n\nif (result !== true) {\n $ERROR('#1: CharacterEscape :: c A - Z');\n} \n",
+ "id": "S15.10.2.10_A2.1_T1"
+ },
+ {
+ "section": "15.10.2.10",
+ "description": "ControlLetter :: a - z",
+ "test": "//CHECK#0061-007A\nvar result = true; \nfor (alpha = 0x0061; alpha <= 0x007A; alpha++) {\n str = String.fromCharCode(alpha % 32);\n arr = (new RegExp(\"\\\\c\" + String.fromCharCode(alpha))).exec(str); \n if ((arr === null) || (arr[0] !== str)) {\n result = false;\n }\n}\n\nif (result !== true) {\n $ERROR('#1: CharacterEscape :: c a - z');\n} \n",
+ "id": "S15.10.2.10_A2.1_T2"
+ },
+ {
+ "section": "15.10.2.10",
+ "description": "ControlLetter :: RUSSIAN ALPHABET is incorrect",
+ "test": "//CHECK#0410-042F\nvar result = true; \nfor (alpha = 0x0410; alpha <= 0x042F; alpha++) {\n str = String.fromCharCode(alpha % 32);\n arr = (new RegExp(\"\\\\c\" + String.fromCharCode(alpha))).exec(str); \n if (arr !== null) {\n result = false;\n }\n}\n\nif (result !== true) {\n $ERROR('#1: RUSSIAN CAPITAL ALPHABET is incorrect');\n}\n\n//CHECK#0430-044F\nvar result = true; \nfor (alpha = 0x0430; alpha <= 0x044F; alpha++) {\n str = String.fromCharCode(alpha % 32);\n arr = (new RegExp(\"\\\\c\" + String.fromCharCode(alpha))).exec(str); \n if (arr !== null) {\n result = false;\n }\n}\n\nif (result !== true) {\n $ERROR('#2: russian small alphabet is incorrect');\n} \n",
+ "id": "S15.10.2.10_A2.1_T3"
+ },
+ {
+ "section": "15.10.2.10",
+ "description": "Tested string include equal unicode symbols",
+ "test": "//CHECK#0\nvar arr = /\\x00/.exec(\"\\u0000\"); \nif ((arr === null) || (arr[0] !== \"\\u0000\")) {\n $ERROR('#0: var arr = /\\\\x00/.exec(\\\\u0000); arr[0] === \"\\\\u0000\". Actual. ' + (arr && arr[0]));\n}\n\n//CHECK#1\nvar arr = /\\x01/.exec(\"\\u0001\"); \nif ((arr === null) || (arr[0] !== \"\\u0001\")) {\n $ERROR('#1: var arr = /\\\\x01/.exec(\\\\u0001); arr[0] === \"\\\\u0001\". Actual. ' + (arr && arr[0]));\n}\n\n//CHECK#2\nvar arr = /\\x0A/.exec(\"\\u000A\"); \nif ((arr === null) || (arr[0] !== \"\\u000A\")) {\n $ERROR('#2: var arr = /\\\\x0A/.exec(\\\\u000A); arr[0] === \"\\\\u000A\". Actual. ' + (arr && arr[0]));\n}\n\n//CHECK#3\nvar arr = /\\xFF/.exec(\"\\u00FF\"); \nif ((arr === null) || (arr[0] !== \"\\u00FF\")) {\n $ERROR('#3: var arr = /\\\\xFF/.exec(\\\\u00FF); arr[0] === \"\\\\u00FF\". Actual. ' + (arr && arr[0]));\n}\n",
+ "id": "S15.10.2.10_A3.1_T1"
+ },
+ {
+ "section": "15.10.2.10",
+ "description": "Checking ENGLISH CAPITAL ALPHABET and english small alphabet",
+ "test": "//CHECK#41-5A\nhex = [\"\\\\x41\", \"\\\\x42\", \"\\\\x43\", \"\\\\x44\", \"\\\\x45\", \"\\\\x46\", \"\\\\x47\", \"\\\\x48\", \"\\\\x49\", \"\\\\x4A\", \"\\\\x4B\", \"\\\\x4C\", \"\\\\x4D\", \"\\\\x4E\", \"\\\\x4F\", \"\\\\x50\", \"\\\\x51\", \"\\\\x52\", \"\\\\x53\", \"\\\\x54\", \"\\\\x55\", \"\\\\x56\", \"\\\\x57\", \"\\\\x58\", \"\\\\x59\", \"\\\\x5A\"];\ncharacter = [\"A\", \"B\", \"C\", \"D\", \"E\", \"F\", \"G\", \"H\", \"I\", \"J\", \"K\", \"L\", \"M\", \"N\", \"O\", \"P\", \"Q\", \"R\", \"S\", \"T\", \"U\", \"V\", \"W\", \"X\", \"Y\", \"Z\"];\nvar result = true;\nfor (index = 0; index < hex.length; index++) {\n arr = (new RegExp(hex[index])).exec(character[index]); \n if ((arr === null) || (arr[0] !== character[index])) {\n result = false;\n }\n}\n\nif (result !== true) {\n $ERROR('#1: ENGLISH CAPITAL ALPHABET');\n} \n\n//CHECK#61-7A\nhex = [\"\\\\x61\", \"\\\\x62\", \"\\\\x63\", \"\\\\x64\", \"\\\\x65\", \"\\\\x66\", \"\\\\x67\", \"\\\\x68\", \"\\\\x69\", \"\\\\x6A\", \"\\\\x6B\", \"\\\\x6C\", \"\\\\x6D\", \"\\\\x6E\", \"\\\\x6F\", \"\\\\x70\", \"\\\\x71\", \"\\\\x72\", \"\\\\x73\", \"\\\\x74\", \"\\\\x75\", \"\\\\x76\", \"\\\\x77\", \"\\\\x78\", \"\\\\x79\", \"\\\\x7A\"];\ncharacter = [\"a\", \"b\", \"c\", \"d\", \"e\", \"f\", \"g\", \"h\", \"i\", \"j\", \"k\", \"l\", \"m\", \"n\", \"o\", \"p\", \"q\", \"r\", \"s\", \"t\", \"u\", \"v\", \"w\", \"x\", \"y\", \"z\"];\nvar result = true;\nfor (index = 0; index < hex.length; index++) {\n arr = (new RegExp(hex[index])).exec(character[index]); \n if ((arr === null) || (arr[0] !== character[index])) {\n result = false;\n }\n}\n\nif (result !== true) {\n $ERROR('#1: english small alphabet');\n} \n",
+ "id": "S15.10.2.10_A3.1_T2"
+ },
+ {
+ "section": "15.10.2.10",
+ "description": "RegExp and tested string include uncode symbols",
+ "test": "//CHECK#0\nvar arr = /\\u0000/.exec(\"\\u0000\"); \nif ((arr === null) || (arr[0] !== \"\\u0000\")) {\n $ERROR('#0: var arr = /\\\\u0000/.exec(\\\\u0000); arr[0] === \"\\\\u0000\". Actual. ' + (arr && arr[0]));\n}\n\n//CHECK#1\nvar arr = /\\u0001/.exec(\"\\u0001\"); \nif ((arr === null) || (arr[0] !== \"\\u0001\")) {\n $ERROR('#1: var arr = /\\\\u0001/.exec(\\\\u0001); arr[0] === \"\\\\u0001\". Actual. ' + (arr && arr[0]));\n}\n\n//CHECK#2\nvar arr = /\\u000A/.exec(\"\\u000A\"); \nif ((arr === null) || (arr[0] !== \"\\u000A\")) {\n $ERROR('#2: var arr = /\\\\u000A/.exec(\\\\u000A); arr[0] === \"\\\\u000A\". Actual. ' + (arr && arr[0]));\n}\n\n//CHECK#3\nvar arr = /\\u00FF/.exec(\"\\u00FF\"); \nif ((arr === null) || (arr[0] !== \"\\u00FF\")) {\n $ERROR('#3: var arr = /\\\\u00FF/.exec(\\\\u00FF); arr[0] === \"\\\\u00FF\". Actual. ' + (arr && arr[0]));\n}\n\n//CHECK#4\nvar arr = /\\u0FFF/.exec(\"\\u0FFF\"); \nif ((arr === null) || (arr[0] !== \"\\u0FFF\")) {\n $ERROR('#4: var arr = /\\\\u0FFF/.exec(\\\\u0FFF); arr[0] === \"\\\\u0FFF\". Actual. ' + (arr && arr[0]));\n}\n\n//CHECK#5\nvar arr = /\\uFFFF/.exec(\"\\uFFFF\"); \nif ((arr === null) || (arr[0] !== \"\\uFFFF\")) {\n $ERROR('#5: var arr = /\\\\uFFFF/.exec(\\\\uFFFF); arr[0] === \"\\\\uFFFF\". Actual. ' + (arr && arr[0]));\n}\n",
+ "id": "S15.10.2.10_A4.1_T1"
+ },
+ {
+ "section": "15.10.2.10",
+ "description": "Tested string include ENGLISH CAPITAL ALPHABET and english small alphabet",
+ "test": "//CHECK#41-5A\nhex = [\"\\\\u0041\", \"\\\\u0042\", \"\\\\u0043\", \"\\\\u0044\", \"\\\\u0045\", \"\\\\u0046\", \"\\\\u0047\", \"\\\\u0048\", \"\\\\u0049\", \"\\\\u004A\", \"\\\\u004B\", \"\\\\u004C\", \"\\\\u004D\", \"\\\\u004E\", \"\\\\u004F\", \"\\\\u0050\", \"\\\\u0051\", \"\\\\u0052\", \"\\\\u0053\", \"\\\\u0054\", \"\\\\u0055\", \"\\\\u0056\", \"\\\\u0057\", \"\\\\u0058\", \"\\\\u0059\", \"\\\\u005A\"];\ncharacter = [\"A\", \"B\", \"C\", \"D\", \"E\", \"F\", \"G\", \"H\", \"I\", \"J\", \"K\", \"L\", \"M\", \"N\", \"O\", \"P\", \"Q\", \"R\", \"S\", \"T\", \"U\", \"V\", \"W\", \"X\", \"Y\", \"Z\"];\nvar result = true;\nfor (index = 0; index < hex.length; index++) {\n arr = (new RegExp(hex[index])).exec(character[index]); \n if ((arr === null) || (arr[0] !== character[index])) {\n result = false;\n }\n}\n\nif (result !== true) {\n $ERROR('#1: ENGLISH CAPITAL ALPHABET');\n} \n\n//CHECK#61-7A\nhex = [\"\\\\u0061\", \"\\\\u0062\", \"\\\\u0063\", \"\\\\u0064\", \"\\\\u0065\", \"\\\\u0066\", \"\\\\u0067\", \"\\\\u0068\", \"\\\\u0069\", \"\\\\u006A\", \"\\\\u006B\", \"\\\\u006C\", \"\\\\u006D\", \"\\\\u006E\", \"\\\\u006F\", \"\\\\u0070\", \"\\\\u0071\", \"\\\\u0072\", \"\\\\u0073\", \"\\\\u0074\", \"\\\\u0075\", \"\\\\u0076\", \"\\\\u0077\", \"\\\\u0078\", \"\\\\u0079\", \"\\\\u007A\"];\ncharacter = [\"a\", \"b\", \"c\", \"d\", \"e\", \"f\", \"g\", \"h\", \"i\", \"j\", \"k\", \"l\", \"m\", \"n\", \"o\", \"p\", \"q\", \"r\", \"s\", \"t\", \"u\", \"v\", \"w\", \"x\", \"y\", \"z\"];\nvar result = true;\nfor (index = 0; index < hex.length; index++) {\n arr = (new RegExp(hex[index])).exec(character[index]); \n if ((arr === null) || (arr[0] !== character[index])) {\n result = false;\n }\n}\n\nif (result !== true) {\n $ERROR('#1: english small alphabet');\n} \n",
+ "id": "S15.10.2.10_A4.1_T2"
+ },
+ {
+ "section": "15.10.2.10",
+ "description": "Tested string include RUSSIAN CAPITAL ALPHABET and russian small alphabet in unicode notation",
+ "test": "//CHECK#0410-042F, 0401 \nhex = [\"\\\\u0410\", \"\\\\u0411\", \"\\\\u0412\", \"\\\\u0413\", \"\\\\u0414\", \"\\\\u0415\", \"\\\\u0416\", \"\\\\u0417\", \"\\\\u0418\", \"\\\\u0419\", \"\\\\u041A\", \"\\\\u041B\", \"\\\\u041C\", \"\\\\u041D\", \"\\\\u041E\", \"\\\\u041F\", \"\\\\u0420\", \"\\\\u0421\", \"\\\\u0422\", \"\\\\u0423\", \"\\\\u0424\", \"\\\\u0425\", \"\\\\u0426\", \"\\\\u0427\", \"\\\\u0428\", \"\\\\u0429\", \"\\\\u042A\", \"\\\\u042B\", \"\\\\u042C\", \"\\\\u042D\", \"\\\\u042E\", \"\\\\u042F\", \"\\\\u0401\"];\ncharacter = [\"\\u0410\", \"\\u0411\", \"\\u0412\", \"\\u0413\", \"\\u0414\", \"\\u0415\", \"\\u0416\", \"\\u0417\", \"\\u0418\", \"\\u0419\", \"\\u041A\", \"\\u041B\", \"\\u041C\", \"\\u041D\", \"\\u041E\", \"\\u041F\", \"\\u0420\", \"\\u0421\", \"\\u0422\", \"\\u0423\", \"\\u0424\", \"\\u0425\", \"\\u0426\", \"\\u0427\", \"\\u0428\", \"\\u0429\", \"\\u042A\", \"\\u042B\", \"\\u042C\", \"\\u042D\", \"\\u042E\", \"\\u042F\", \"\\u0401\"];\nvar result = true;\nfor (index = 0; index < hex.length; index++) {\n arr = (new RegExp(hex[index])).exec(character[index]); \n if ((arr === null) || (arr[0] !== character[index])) {\n result = false;\n }\n}\n\nif (result !== true) {\n $ERROR('#1: RUSSIAN CAPITAL ALPHABET');\n} \n\n//CHECK#0430-044F, 0451\nhex = [\"\\\\u0430\", \"\\\\u0431\", \"\\\\u0432\", \"\\\\u0433\", \"\\\\u0434\", \"\\\\u0435\", \"\\\\u0436\", \"\\\\u0437\", \"\\\\u0438\", \"\\\\u0439\", \"\\\\u043A\", \"\\\\u043B\", \"\\\\u043C\", \"\\\\u043D\", \"\\\\u043E\", \"\\\\u043F\", \"\\\\u0440\", \"\\\\u0441\", \"\\\\u0442\", \"\\\\u0443\", \"\\\\u0444\", \"\\\\u0445\", \"\\\\u0446\", \"\\\\u0447\", \"\\\\u0448\", \"\\\\u0449\", \"\\\\u044A\", \"\\\\u044B\", \"\\\\u044C\", \"\\\\u044D\", \"\\\\u044E\", \"\\\\u044F\", \"\\\\u0451\"];\ncharacter = [\"\\u0430\", \"\\u0431\", \"\\u0432\", \"\\u0433\", \"\\u0434\", \"\\u0435\", \"\\u0436\", \"\\u0437\", \"\\u0438\", \"\\u0439\", \"\\u043A\", \"\\u043B\", \"\\u043C\", \"\\u043D\", \"\\u043E\", \"\\u043F\", \"\\u0440\", \"\\u0441\", \"\\u0442\", \"\\u0443\", \"\\u0444\", \"\\u0445\", \"\\u0446\", \"\\u0447\", \"\\u0448\", \"\\u0449\", \"\\u044A\", \"\\u044B\", \"\\u044C\", \"\\u044D\", \"\\u044E\", \"\\u044F\", \"\\u0451\"];\nvar result = true;\nfor (index = 0; index < hex.length; index++) {\n arr = (new RegExp(hex[index])).exec(character[index]); \n if ((arr === null) || (arr[0] !== character[index])) {\n result = false;\n }\n}\n\nif (result !== true) {\n $ERROR('#1: russian small alphabet');\n}\n",
+ "id": "S15.10.2.10_A4.1_T3"
+ },
+ {
+ "section": "15.10.2.10",
+ "description": ": Tested string is \"~`!@#$%^&*()-+={[}]|\\\\:;'<,>./?\" + '\"';",
+ "test": "//CHECK#1\nvar non_ident = \"~`!@#$%^&*()-+={[}]|\\\\:;'<,>./?\" + '\"';\nvar k = -1;\ndo {\n k++;\n arr = new RegExp(\"\\\\\" + non_ident[k], \"g\").exec(non_ident); \n} while ((arr !== null) && (arr[0] === non_ident[k]))\n\nif (non_ident.length !== k) {\n $ERROR('#1: IdentityEscapeSequence :: SourceCharacter but not IdentifierPart');\n} \n",
+ "id": "S15.10.2.10_A5.1_T1"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.10.2.11_DecimalEscape.json b/website/resources/scripts/testcases2/15.10.2.11_DecimalEscape.json
new file mode 100644
index 000000000..4730384da
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.10.2.11_DecimalEscape.json
@@ -0,0 +1,64 @@
+{
+ "testCollection": {
+ "name": "15.10.2.11_DecimalEscape",
+ "numTests": 9,
+ "tests": [
+ {
+ "section": "15.10.2.11",
+ "description": "DecimalEscape :: 0. If i is zero, return the EscapeValue consisting of a <NUL> character (Unicodevalue0000)",
+ "test": "//CHECK#1\nvar arr = /\\0/.exec(\"\\u0000\"); \nif ((arr === null) || (arr[0] !== \"\\u0000\")) {\n $ERROR('#1: var arr = /\\\\0/.exec(\\\\u0000); arr[0] === \"\\\\u0000\". Actual. ' + (arr && arr[0]));\n}\n\n//CHECK#2\nvar arr = (new RegExp(\"\\\\0\")).exec(\"\\u0000\"); \nif ((arr === null) || (arr[0] !== \"\\u0000\")) {\n $ERROR('#2: var arr = (new RegExp(\"\\\\0\")).exec(\\\\u0000); arr[0] === \"\\\\u0000\". Actual. ' + (arr && arr[0]));\n}\n",
+ "id": "S15.10.2.11_A1_T1"
+ },
+ {
+ "section": "15.10.2.11",
+ "description": "It is an error if n is greater than the total number of left capturing parentheses in the entire regular expression",
+ "negative": "",
+ "test": "/\\1/.exec(\"\");\n/\\2/.exec(\"\");\n/\\3/.exec(\"\");\n/\\4/.exec(\"\");\n/\\5/.exec(\"\");\n/\\6/.exec(\"\");\n/\\7/.exec(\"\");\n/\\8/.exec(\"\");\n/\\9/.exec(\"\");\n/\\10/.exec(\"\");\n",
+ "id": "S15.10.2.11_A1_T2"
+ },
+ {
+ "section": "15.10.2.11",
+ "description": "It is an error if n is greater than the total number of left capturing parentheses in the entire regular expression",
+ "negative": "",
+ "test": "/(?:A)\\2/.exec(\"AA\");\n",
+ "id": "S15.10.2.11_A1_T3"
+ },
+ {
+ "section": "15.10.2.11, 15.10.2.9",
+ "description": "DecimalIntegerLiteral is not 0",
+ "test": "var arr = /(A)\\1/.exec(\"AA\");\n\n//CHECK#1\nif ((arr === null) || (arr[0] !== \"AA\")) {\n $ERROR('#1: var arr = (/(A)\\\\1/.exec(\"AA\")); arr[0] === \"AA\". Actual. ' + (arr && arr[0]));\n}\n\n//CHECK#2\nif ((arr === null) || (arr[1] !== \"A\")) {\n $ERROR('#2: var arr = (/(A)\\\\1/.exec(\"AA\")); arr[1] === \"A\". Actual. ' + (arr && arr[1]));\n} \n",
+ "id": "S15.10.2.11_A1_T4"
+ },
+ {
+ "section": "15.10.2.11, 15.10.2.9",
+ "description": "DecimalIntegerLiteral is not 0",
+ "test": "var arr = /\\1(A)/.exec(\"AA\");\n\n//CHECK#1\nif ((arr === null) || (arr[0] !== \"A\")) {\n $ERROR('#1: var arr = (/\\\\1(A)/.exec(\"AA\")); arr[0] === \"A\". Actual. ' + (arr && arr[0]));\n}\n\n//CHECK#2\nif ((arr === null) || (arr[1] !== \"A\")) {\n $ERROR('#2: var arr = (/\\\\1(A)/.exec(\"AA\")); arr[1] === \"A\". Actual. ' + (arr && arr[1]));\n} \n",
+ "id": "S15.10.2.11_A1_T5"
+ },
+ {
+ "section": "15.10.2.11, 15.10.2.9",
+ "description": "DecimalIntegerLiteral is not 0",
+ "test": "var arr = /(A)\\1(B)\\2/.exec(\"AABB\");\n\n//CHECK#1\nif ((arr === null) || (arr[0] !== \"AABB\")) {\n $ERROR('#1: var arr = /(A)\\\\1(B)\\\\2/.exec(\"AABB\"); arr[0] === \"AABB\". Actual. ' + (arr && arr[0]));\n}\n\n//CHECK#2\nif ((arr === null) || (arr[1] !== \"A\")) {\n $ERROR('#2: var arr = /(A)\\\\1(B)\\\\2/.exec(\"AABB\"); arr[1] === \"A\". Actual. ' + (arr && arr[1]));\n}\n\n//CHECK#3\nif ((arr === null) || (arr[2] !== \"B\")) {\n $ERROR('#3: var arr = /(A)\\\\1(B)\\\\2/.exec(\"AABB\"); arr[2] === \"B\". Actual. ' + (arr && arr[2]));\n} \n",
+ "id": "S15.10.2.11_A1_T6"
+ },
+ {
+ "section": "15.10.2.11, 15.10.2.9",
+ "description": "DecimalIntegerLiteral is not 0",
+ "test": "var arr = /\\1(A)(B)\\2/.exec(\"ABB\");\n\n//CHECK#1\nif ((arr === null) || (arr[0] !== \"ABB\")) {\n $ERROR('#1: var arr = /\\\\1(A)(B)\\\\2/.exec(\"ABB\"); arr[0] === \"ABB\". Actual. ' + (arr && arr[0]));\n}\n\n//CHECK#2\nif ((arr === null) || (arr[1] !== \"A\")) {\n $ERROR('#2: var arr = /\\\\1(A)(B)\\\\2/.exec(\"ABB\"); arr[1] === \"A\". Actual. ' + (arr && arr[1]));\n}\n\n//CHECK#3\nif ((arr === null) || (arr[2] !== \"B\")) {\n $ERROR('#3: var arr = /\\\\1(A)(B)\\\\2/.exec(\"ABB\"); arr[2] === \"B\". Actual. ' + (arr && arr[2]));\n} \n",
+ "id": "S15.10.2.11_A1_T7"
+ },
+ {
+ "section": "15.10.2.11, 15.10.2.9",
+ "description": "DecimalIntegerLiteral is not 0",
+ "test": "var arr = /((((((((((A))))))))))\\1\\2\\3\\4\\5\\6\\7\\8\\9\\10/.exec(\"AAAAAAAAAAA\");\n\n//CHECK#1\nif ((arr === null) || (arr[0] !== \"AAAAAAAAAAA\")) {\n $ERROR('#1: var arr = /((((((((((A))))))))))\\\\1\\\\2\\\\3\\\\4\\\\5\\\\6\\\\7\\\\8\\\\9\\\\10/.exec(\"AAAAAAAAAAA\"); arr[0] === \"AAAAAAAAAAA\". Actual. ' + (arr && arr[0]));\n}\n\nfor (i = 1; i <= 10; i++) {\n //CHECK#i\n if ((arr === null) || (arr[i] !== \"A\")) {\n $ERROR('#2: var arr = /((((((((((A))))))))))\\\\1\\\\2\\\\3\\\\4\\\\5\\\\6\\\\7\\\\8\\\\9\\\\10/.exec(\"AAAAAAAAAAA\"); arr[' + i + '] === \"A\". Actual. ' + (arr && arr[i]));\n }\n} \n",
+ "id": "S15.10.2.11_A1_T8"
+ },
+ {
+ "section": "15.10.2.11, 15.10.2.9",
+ "description": "DecimalIntegerLiteral is not 0",
+ "test": "var arr = /((((((((((A))))))))))\\10\\9\\8\\7\\6\\5\\4\\3\\2\\1/.exec(\"AAAAAAAAAAA\");\n\n//CHECK#1\nif ((arr === null) || (arr[0] !== \"AAAAAAAAAAA\")) {\n $ERROR('#1: var arr = /((((((((((A))))))))))\\\\10\\\\9\\\\8\\\\7\\\\6\\\\5\\\\4\\\\3\\\\2\\\\1/.exec(\"AAAAAAAAAAA\"); arr[0] === \"AAAAAAAAAAA\". Actual. ' + (arr && arr[0]));\n}\n\nfor (i = 1; i <= 10; i++) {\n //CHECK#i\n if ((arr === null) || (arr[i] !== \"A\")) {\n $ERROR('#2: var arr = /((((((((((A))))))))))\\\\10\\\\9\\\\8\\\\7\\\\6\\\\5\\\\4\\\\3\\\\2\\\\1/.exec(\"AAAAAAAAAAA\"); arr[' + i + '] === \"A\". Actual. ' + (arr && arr[i]));\n }\n} \n",
+ "id": "S15.10.2.11_A1_T9"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.10.2.12_CharacterClassEscape.json b/website/resources/scripts/testcases2/15.10.2.12_CharacterClassEscape.json
new file mode 100644
index 000000000..dd73d4805
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.10.2.12_CharacterClassEscape.json
@@ -0,0 +1,176 @@
+{
+ "testCollection": {
+ "name": "15.10.2.12_CharacterClassEscape",
+ "numTests": 28,
+ "tests": [
+ {
+ "section": "15.10.2.12, 7.2, 7.3",
+ "description": "WhiteSpace",
+ "test": "var i0 = \"\";\nfor (var j = 0; j < 1024; j++)\n i0 += String.fromCharCode(j);\nvar o0 = \"\\u0000\\u0001\\u0002\\u0003\\u0004\\u0005\\u0006\\u0007\\u0008\\u000E\\u000F\\u0010\\u0011\\u0012\\u0013\\u0014\\u0015\\u0016\\u0017\\u0018\\u0019\\u001A\\u001B\\u001C\\u001D\\u001E\\u001F\\u0021\\u0022\\u0023\\u0024\\u0025\\u0026\\u0027\\u0028\\u0029\\u002A\\u002B\\u002C\\u002D\\u002E\\u002F\\u0030\\u0031\\u0032\\u0033\\u0034\\u0035\\u0036\\u0037\\u0038\\u0039\\u003A\\u003B\\u003C\\u003D\\u003E\\u003F\\u0040\\u0041\\u0042\\u0043\\u0044\\u0045\\u0046\\u0047\\u0048\\u0049\\u004A\\u004B\\u004C\\u004D\\u004E\\u004F\\u0050\\u0051\\u0052\\u0053\\u0054\\u0055\\u0056\\u0057\\u0058\\u0059\\u005A\\u005B\\u005C\\u005D\\u005E\\u005F\\u0060\\u0061\\u0062\\u0063\\u0064\\u0065\\u0066\\u0067\\u0068\\u0069\\u006A\\u006B\\u006C\\u006D\\u006E\\u006F\\u0070\\u0071\\u0072\\u0073\\u0074\\u0075\\u0076\\u0077\\u0078\\u0079\\u007A\\u007B\\u007C\\u007D\\u007E\\u007F\\u0080\\u0081\\u0082\\u0083\\u0084\\u0085\\u0086\\u0087\\u0088\\u0089\\u008A\\u008B\\u008C\\u008D\\u008E\\u008F\\u0090\\u0091\\u0092\\u0093\\u0094\\u0095\\u0096\\u0097\\u0098\\u0099\\u009A\\u009B\\u009C\\u009D\\u009E\\u009F\\u00A1\\u00A2\\u00A3\\u00A4\\u00A5\\u00A6\\u00A7\\u00A8\\u00A9\\u00AA\\u00AB\\u00AC\\u00AD\\u00AE\\u00AF\\u00B0\\u00B1\\u00B2\\u00B3\\u00B4\\u00B5\\u00B6\\u00B7\\u00B8\\u00B9\\u00BA\\u00BB\\u00BC\\u00BD\\u00BE\\u00BF\\u00C0\\u00C1\\u00C2\\u00C3\\u00C4\\u00C5\\u00C6\\u00C7\\u00C8\\u00C9\\u00CA\\u00CB\\u00CC\\u00CD\\u00CE\\u00CF\\u00D0\\u00D1\\u00D2\\u00D3\\u00D4\\u00D5\\u00D6\\u00D7\\u00D8\\u00D9\\u00DA\\u00DB\\u00DC\\u00DD\\u00DE\\u00DF\\u00E0\\u00E1\\u00E2\\u00E3\\u00E4\\u00E5\\u00E6\\u00E7\\u00E8\\u00E9\\u00EA\\u00EB\\u00EC\\u00ED\\u00EE\\u00EF\\u00F0\\u00F1\\u00F2\\u00F3\\u00F4\\u00F5\\u00F6\\u00F7\\u00F8\\u00F9\\u00FA\\u00FB\\u00FC\\u00FD\\u00FE\\u00FF\\u0100\\u0101\\u0102\\u0103\\u0104\\u0105\\u0106\\u0107\\u0108\\u0109\\u010A\\u010B\\u010C\\u010D\\u010E\\u010F\\u0110\\u0111\\u0112\\u0113\\u0114\\u0115\\u0116\\u0117\\u0118\\u0119\\u011A\\u011B\\u011C\\u011D\\u011E\\u011F\\u0120\\u0121\\u0122\\u0123\\u0124\\u0125\\u0126\\u0127\\u0128\\u0129\\u012A\\u012B\\u012C\\u012D\\u012E\\u012F\\u0130\\u0131\\u0132\\u0133\\u0134\\u0135\\u0136\\u0137\\u0138\\u0139\\u013A\\u013B\\u013C\\u013D\\u013E\\u013F\\u0140\\u0141\\u0142\\u0143\\u0144\\u0145\\u0146\\u0147\\u0148\\u0149\\u014A\\u014B\\u014C\\u014D\\u014E\\u014F\\u0150\\u0151\\u0152\\u0153\\u0154\\u0155\\u0156\\u0157\\u0158\\u0159\\u015A\\u015B\\u015C\\u015D\\u015E\\u015F\\u0160\\u0161\\u0162\\u0163\\u0164\\u0165\\u0166\\u0167\\u0168\\u0169\\u016A\\u016B\\u016C\\u016D\\u016E\\u016F\\u0170\\u0171\\u0172\\u0173\\u0174\\u0175\\u0176\\u0177\\u0178\\u0179\\u017A\\u017B\\u017C\\u017D\\u017E\\u017F\\u0180\\u0181\\u0182\\u0183\\u0184\\u0185\\u0186\\u0187\\u0188\\u0189\\u018A\\u018B\\u018C\\u018D\\u018E\\u018F\\u0190\\u0191\\u0192\\u0193\\u0194\\u0195\\u0196\\u0197\\u0198\\u0199\\u019A\\u019B\\u019C\\u019D\\u019E\\u019F\\u01A0\\u01A1\\u01A2\\u01A3\\u01A4\\u01A5\\u01A6\\u01A7\\u01A8\\u01A9\\u01AA\\u01AB\\u01AC\\u01AD\\u01AE\\u01AF\\u01B0\\u01B1\\u01B2\\u01B3\\u01B4\\u01B5\\u01B6\\u01B7\\u01B8\\u01B9\\u01BA\\u01BB\\u01BC\\u01BD\\u01BE\\u01BF\\u01C0\\u01C1\\u01C2\\u01C3\\u01C4\\u01C5\\u01C6\\u01C7\\u01C8\\u01C9\\u01CA\\u01CB\\u01CC\\u01CD\\u01CE\\u01CF\\u01D0\\u01D1\\u01D2\\u01D3\\u01D4\\u01D5\\u01D6\\u01D7\\u01D8\\u01D9\\u01DA\\u01DB\\u01DC\\u01DD\\u01DE\\u01DF\\u01E0\\u01E1\\u01E2\\u01E3\\u01E4\\u01E5\\u01E6\\u01E7\\u01E8\\u01E9\\u01EA\\u01EB\\u01EC\\u01ED\\u01EE\\u01EF\\u01F0\\u01F1\\u01F2\\u01F3\\u01F4\\u01F5\\u01F6\\u01F7\\u01F8\\u01F9\\u01FA\\u01FB\\u01FC\\u01FD\\u01FE\\u01FF\\u0200\\u0201\\u0202\\u0203\\u0204\\u0205\\u0206\\u0207\\u0208\\u0209\\u020A\\u020B\\u020C\\u020D\\u020E\\u020F\\u0210\\u0211\\u0212\\u0213\\u0214\\u0215\\u0216\\u0217\\u0218\\u0219\\u021A\\u021B\\u021C\\u021D\\u021E\\u021F\\u0220\\u0221\\u0222\\u0223\\u0224\\u0225\\u0226\\u0227\\u0228\\u0229\\u022A\\u022B\\u022C\\u022D\\u022E\\u022F\\u0230\\u0231\\u0232\\u0233\\u0234\\u0235\\u0236\\u0237\\u0238\\u0239\\u023A\\u023B\\u023C\\u023D\\u023E\\u023F\\u0240\\u0241\\u0242\\u0243\\u0244\\u0245\\u0246\\u0247\\u0248\\u0249\\u024A\\u024B\\u024C\\u024D\\u024E\\u024F\\u0250\\u0251\\u0252\\u0253\\u0254\\u0255\\u0256\\u0257\\u0258\\u0259\\u025A\\u025B\\u025C\\u025D\\u025E\\u025F\\u0260\\u0261\\u0262\\u0263\\u0264\\u0265\\u0266\\u0267\\u0268\\u0269\\u026A\\u026B\\u026C\\u026D\\u026E\\u026F\\u0270\\u0271\\u0272\\u0273\\u0274\\u0275\\u0276\\u0277\\u0278\\u0279\\u027A\\u027B\\u027C\\u027D\\u027E\\u027F\\u0280\\u0281\\u0282\\u0283\\u0284\\u0285\\u0286\\u0287\\u0288\\u0289\\u028A\\u028B\\u028C\\u028D\\u028E\\u028F\\u0290\\u0291\\u0292\\u0293\\u0294\\u0295\\u0296\\u0297\\u0298\\u0299\\u029A\\u029B\\u029C\\u029D\\u029E\\u029F\\u02A0\\u02A1\\u02A2\\u02A3\\u02A4\\u02A5\\u02A6\\u02A7\\u02A8\\u02A9\\u02AA\\u02AB\\u02AC\\u02AD\\u02AE\\u02AF\\u02B0\\u02B1\\u02B2\\u02B3\\u02B4\\u02B5\\u02B6\\u02B7\\u02B8\\u02B9\\u02BA\\u02BB\\u02BC\\u02BD\\u02BE\\u02BF\\u02C0\\u02C1\\u02C2\\u02C3\\u02C4\\u02C5\\u02C6\\u02C7\\u02C8\\u02C9\\u02CA\\u02CB\\u02CC\\u02CD\\u02CE\\u02CF\\u02D0\\u02D1\\u02D2\\u02D3\\u02D4\\u02D5\\u02D6\\u02D7\\u02D8\\u02D9\\u02DA\\u02DB\\u02DC\\u02DD\\u02DE\\u02DF\\u02E0\\u02E1\\u02E2\\u02E3\\u02E4\\u02E5\\u02E6\\u02E7\\u02E8\\u02E9\\u02EA\\u02EB\\u02EC\\u02ED\\u02EE\\u02EF\\u02F0\\u02F1\\u02F2\\u02F3\\u02F4\\u02F5\\u02F6\\u02F7\\u02F8\\u02F9\\u02FA\\u02FB\\u02FC\\u02FD\\u02FE\\u02FF\\u0300\\u0301\\u0302\\u0303\\u0304\\u0305\\u0306\\u0307\\u0308\\u0309\\u030A\\u030B\\u030C\\u030D\\u030E\\u030F\\u0310\\u0311\\u0312\\u0313\\u0314\\u0315\\u0316\\u0317\\u0318\\u0319\\u031A\\u031B\\u031C\\u031D\\u031E\\u031F\\u0320\\u0321\\u0322\\u0323\\u0324\\u0325\\u0326\\u0327\\u0328\\u0329\\u032A\\u032B\\u032C\\u032D\\u032E\\u032F\\u0330\\u0331\\u0332\\u0333\\u0334\\u0335\\u0336\\u0337\\u0338\\u0339\\u033A\\u033B\\u033C\\u033D\\u033E\\u033F\\u0340\\u0341\\u0342\\u0343\\u0344\\u0345\\u0346\\u0347\\u0348\\u0349\\u034A\\u034B\\u034C\\u034D\\u034E\\u034F\\u0350\\u0351\\u0352\\u0353\\u0354\\u0355\\u0356\\u0357\\u0358\\u0359\\u035A\\u035B\\u035C\\u035D\\u035E\\u035F\\u0360\\u0361\\u0362\\u0363\\u0364\\u0365\\u0366\\u0367\\u0368\\u0369\\u036A\\u036B\\u036C\\u036D\\u036E\\u036F\\u0370\\u0371\\u0372\\u0373\\u0374\\u0375\\u0376\\u0377\\u0378\\u0379\\u037A\\u037B\\u037C\\u037D\\u037E\\u037F\\u0380\\u0381\\u0382\\u0383\\u0384\\u0385\\u0386\\u0387\\u0388\\u0389\\u038A\\u038B\\u038C\\u038D\\u038E\\u038F\\u0390\\u0391\\u0392\\u0393\\u0394\\u0395\\u0396\\u0397\\u0398\\u0399\\u039A\\u039B\\u039C\\u039D\\u039E\\u039F\\u03A0\\u03A1\\u03A2\\u03A3\\u03A4\\u03A5\\u03A6\\u03A7\\u03A8\\u03A9\\u03AA\\u03AB\\u03AC\\u03AD\\u03AE\\u03AF\\u03B0\\u03B1\\u03B2\\u03B3\\u03B4\\u03B5\\u03B6\\u03B7\\u03B8\\u03B9\\u03BA\\u03BB\\u03BC\\u03BD\\u03BE\\u03BF\\u03C0\\u03C1\\u03C2\\u03C3\\u03C4\\u03C5\\u03C6\\u03C7\\u03C8\\u03C9\\u03CA\\u03CB\\u03CC\\u03CD\\u03CE\\u03CF\\u03D0\\u03D1\\u03D2\\u03D3\\u03D4\\u03D5\\u03D6\\u03D7\\u03D8\\u03D9\\u03DA\\u03DB\\u03DC\\u03DD\\u03DE\\u03DF\\u03E0\\u03E1\\u03E2\\u03E3\\u03E4\\u03E5\\u03E6\\u03E7\\u03E8\\u03E9\\u03EA\\u03EB\\u03EC\\u03ED\\u03EE\\u03EF\\u03F0\\u03F1\\u03F2\\u03F3\\u03F4\\u03F5\\u03F6\\u03F7\\u03F8\\u03F9\\u03FA\\u03FB\\u03FC\\u03FD\\u03FE\\u03FF\";\nif (i0.replace(/\\s+/g, \"\") !== o0) {\n $ERROR(\"#0: Error matching character class \\s between character 0 and 3ff\");\n}\n\nvar i1 = \"\";\nfor (var j = 1024; j < 2048; j++)\n i1 += String.fromCharCode(j);\nvar o1 = i1;\nif (i1.replace(/\\s+/g, \"\") !== o1) {\n $ERROR(\"#1: Error matching character class \\s between character 400 and 7ff\");\n}\n\nvar i2 = \"\";\nfor (var j = 2048; j < 3072; j++)\n i2 += String.fromCharCode(j);\nvar o2 = i2;\nif (i2.replace(/\\s+/g, \"\") !== o2) {\n $ERROR(\"#2: Error matching character class \\s between character 800 and bff\");\n}\n\nvar i3 = \"\";\nfor (var j = 3072; j < 4096; j++)\n i3 += String.fromCharCode(j);\nvar o3 = i3;\nif (i3.replace(/\\s+/g, \"\") !== o3) {\n $ERROR(\"#3: Error matching character class \\s between character c00 and fff\");\n}\n\nvar i4 = \"\";\nfor (var j = 4096; j < 5120; j++)\n i4 += String.fromCharCode(j);\nvar o4 = i4;\nif (i4.replace(/\\s+/g, \"\") !== o4) {\n $ERROR(\"#4: Error matching character class \\s between character 1000 and 13ff\");\n}\n\nvar i5 = \"\";\nfor (var j = 5120; j < 6144; j++)\n i5 += String.fromCharCode(j);\nvar o5 = \"\\u1400\\u1401\\u1402\\u1403\\u1404\\u1405\\u1406\\u1407\\u1408\\u1409\\u140A\\u140B\\u140C\\u140D\\u140E\\u140F\\u1410\\u1411\\u1412\\u1413\\u1414\\u1415\\u1416\\u1417\\u1418\\u1419\\u141A\\u141B\\u141C\\u141D\\u141E\\u141F\\u1420\\u1421\\u1422\\u1423\\u1424\\u1425\\u1426\\u1427\\u1428\\u1429\\u142A\\u142B\\u142C\\u142D\\u142E\\u142F\\u1430\\u1431\\u1432\\u1433\\u1434\\u1435\\u1436\\u1437\\u1438\\u1439\\u143A\\u143B\\u143C\\u143D\\u143E\\u143F\\u1440\\u1441\\u1442\\u1443\\u1444\\u1445\\u1446\\u1447\\u1448\\u1449\\u144A\\u144B\\u144C\\u144D\\u144E\\u144F\\u1450\\u1451\\u1452\\u1453\\u1454\\u1455\\u1456\\u1457\\u1458\\u1459\\u145A\\u145B\\u145C\\u145D\\u145E\\u145F\\u1460\\u1461\\u1462\\u1463\\u1464\\u1465\\u1466\\u1467\\u1468\\u1469\\u146A\\u146B\\u146C\\u146D\\u146E\\u146F\\u1470\\u1471\\u1472\\u1473\\u1474\\u1475\\u1476\\u1477\\u1478\\u1479\\u147A\\u147B\\u147C\\u147D\\u147E\\u147F\\u1480\\u1481\\u1482\\u1483\\u1484\\u1485\\u1486\\u1487\\u1488\\u1489\\u148A\\u148B\\u148C\\u148D\\u148E\\u148F\\u1490\\u1491\\u1492\\u1493\\u1494\\u1495\\u1496\\u1497\\u1498\\u1499\\u149A\\u149B\\u149C\\u149D\\u149E\\u149F\\u14A0\\u14A1\\u14A2\\u14A3\\u14A4\\u14A5\\u14A6\\u14A7\\u14A8\\u14A9\\u14AA\\u14AB\\u14AC\\u14AD\\u14AE\\u14AF\\u14B0\\u14B1\\u14B2\\u14B3\\u14B4\\u14B5\\u14B6\\u14B7\\u14B8\\u14B9\\u14BA\\u14BB\\u14BC\\u14BD\\u14BE\\u14BF\\u14C0\\u14C1\\u14C2\\u14C3\\u14C4\\u14C5\\u14C6\\u14C7\\u14C8\\u14C9\\u14CA\\u14CB\\u14CC\\u14CD\\u14CE\\u14CF\\u14D0\\u14D1\\u14D2\\u14D3\\u14D4\\u14D5\\u14D6\\u14D7\\u14D8\\u14D9\\u14DA\\u14DB\\u14DC\\u14DD\\u14DE\\u14DF\\u14E0\\u14E1\\u14E2\\u14E3\\u14E4\\u14E5\\u14E6\\u14E7\\u14E8\\u14E9\\u14EA\\u14EB\\u14EC\\u14ED\\u14EE\\u14EF\\u14F0\\u14F1\\u14F2\\u14F3\\u14F4\\u14F5\\u14F6\\u14F7\\u14F8\\u14F9\\u14FA\\u14FB\\u14FC\\u14FD\\u14FE\\u14FF\\u1500\\u1501\\u1502\\u1503\\u1504\\u1505\\u1506\\u1507\\u1508\\u1509\\u150A\\u150B\\u150C\\u150D\\u150E\\u150F\\u1510\\u1511\\u1512\\u1513\\u1514\\u1515\\u1516\\u1517\\u1518\\u1519\\u151A\\u151B\\u151C\\u151D\\u151E\\u151F\\u1520\\u1521\\u1522\\u1523\\u1524\\u1525\\u1526\\u1527\\u1528\\u1529\\u152A\\u152B\\u152C\\u152D\\u152E\\u152F\\u1530\\u1531\\u1532\\u1533\\u1534\\u1535\\u1536\\u1537\\u1538\\u1539\\u153A\\u153B\\u153C\\u153D\\u153E\\u153F\\u1540\\u1541\\u1542\\u1543\\u1544\\u1545\\u1546\\u1547\\u1548\\u1549\\u154A\\u154B\\u154C\\u154D\\u154E\\u154F\\u1550\\u1551\\u1552\\u1553\\u1554\\u1555\\u1556\\u1557\\u1558\\u1559\\u155A\\u155B\\u155C\\u155D\\u155E\\u155F\\u1560\\u1561\\u1562\\u1563\\u1564\\u1565\\u1566\\u1567\\u1568\\u1569\\u156A\\u156B\\u156C\\u156D\\u156E\\u156F\\u1570\\u1571\\u1572\\u1573\\u1574\\u1575\\u1576\\u1577\\u1578\\u1579\\u157A\\u157B\\u157C\\u157D\\u157E\\u157F\\u1580\\u1581\\u1582\\u1583\\u1584\\u1585\\u1586\\u1587\\u1588\\u1589\\u158A\\u158B\\u158C\\u158D\\u158E\\u158F\\u1590\\u1591\\u1592\\u1593\\u1594\\u1595\\u1596\\u1597\\u1598\\u1599\\u159A\\u159B\\u159C\\u159D\\u159E\\u159F\\u15A0\\u15A1\\u15A2\\u15A3\\u15A4\\u15A5\\u15A6\\u15A7\\u15A8\\u15A9\\u15AA\\u15AB\\u15AC\\u15AD\\u15AE\\u15AF\\u15B0\\u15B1\\u15B2\\u15B3\\u15B4\\u15B5\\u15B6\\u15B7\\u15B8\\u15B9\\u15BA\\u15BB\\u15BC\\u15BD\\u15BE\\u15BF\\u15C0\\u15C1\\u15C2\\u15C3\\u15C4\\u15C5\\u15C6\\u15C7\\u15C8\\u15C9\\u15CA\\u15CB\\u15CC\\u15CD\\u15CE\\u15CF\\u15D0\\u15D1\\u15D2\\u15D3\\u15D4\\u15D5\\u15D6\\u15D7\\u15D8\\u15D9\\u15DA\\u15DB\\u15DC\\u15DD\\u15DE\\u15DF\\u15E0\\u15E1\\u15E2\\u15E3\\u15E4\\u15E5\\u15E6\\u15E7\\u15E8\\u15E9\\u15EA\\u15EB\\u15EC\\u15ED\\u15EE\\u15EF\\u15F0\\u15F1\\u15F2\\u15F3\\u15F4\\u15F5\\u15F6\\u15F7\\u15F8\\u15F9\\u15FA\\u15FB\\u15FC\\u15FD\\u15FE\\u15FF\\u1600\\u1601\\u1602\\u1603\\u1604\\u1605\\u1606\\u1607\\u1608\\u1609\\u160A\\u160B\\u160C\\u160D\\u160E\\u160F\\u1610\\u1611\\u1612\\u1613\\u1614\\u1615\\u1616\\u1617\\u1618\\u1619\\u161A\\u161B\\u161C\\u161D\\u161E\\u161F\\u1620\\u1621\\u1622\\u1623\\u1624\\u1625\\u1626\\u1627\\u1628\\u1629\\u162A\\u162B\\u162C\\u162D\\u162E\\u162F\\u1630\\u1631\\u1632\\u1633\\u1634\\u1635\\u1636\\u1637\\u1638\\u1639\\u163A\\u163B\\u163C\\u163D\\u163E\\u163F\\u1640\\u1641\\u1642\\u1643\\u1644\\u1645\\u1646\\u1647\\u1648\\u1649\\u164A\\u164B\\u164C\\u164D\\u164E\\u164F\\u1650\\u1651\\u1652\\u1653\\u1654\\u1655\\u1656\\u1657\\u1658\\u1659\\u165A\\u165B\\u165C\\u165D\\u165E\\u165F\\u1660\\u1661\\u1662\\u1663\\u1664\\u1665\\u1666\\u1667\\u1668\\u1669\\u166A\\u166B\\u166C\\u166D\\u166E\\u166F\\u1670\\u1671\\u1672\\u1673\\u1674\\u1675\\u1676\\u1677\\u1678\\u1679\\u167A\\u167B\\u167C\\u167D\\u167E\\u167F\\u1681\\u1682\\u1683\\u1684\\u1685\\u1686\\u1687\\u1688\\u1689\\u168A\\u168B\\u168C\\u168D\\u168E\\u168F\\u1690\\u1691\\u1692\\u1693\\u1694\\u1695\\u1696\\u1697\\u1698\\u1699\\u169A\\u169B\\u169C\\u169D\\u169E\\u169F\\u16A0\\u16A1\\u16A2\\u16A3\\u16A4\\u16A5\\u16A6\\u16A7\\u16A8\\u16A9\\u16AA\\u16AB\\u16AC\\u16AD\\u16AE\\u16AF\\u16B0\\u16B1\\u16B2\\u16B3\\u16B4\\u16B5\\u16B6\\u16B7\\u16B8\\u16B9\\u16BA\\u16BB\\u16BC\\u16BD\\u16BE\\u16BF\\u16C0\\u16C1\\u16C2\\u16C3\\u16C4\\u16C5\\u16C6\\u16C7\\u16C8\\u16C9\\u16CA\\u16CB\\u16CC\\u16CD\\u16CE\\u16CF\\u16D0\\u16D1\\u16D2\\u16D3\\u16D4\\u16D5\\u16D6\\u16D7\\u16D8\\u16D9\\u16DA\\u16DB\\u16DC\\u16DD\\u16DE\\u16DF\\u16E0\\u16E1\\u16E2\\u16E3\\u16E4\\u16E5\\u16E6\\u16E7\\u16E8\\u16E9\\u16EA\\u16EB\\u16EC\\u16ED\\u16EE\\u16EF\\u16F0\\u16F1\\u16F2\\u16F3\\u16F4\\u16F5\\u16F6\\u16F7\\u16F8\\u16F9\\u16FA\\u16FB\\u16FC\\u16FD\\u16FE\\u16FF\\u1700\\u1701\\u1702\\u1703\\u1704\\u1705\\u1706\\u1707\\u1708\\u1709\\u170A\\u170B\\u170C\\u170D\\u170E\\u170F\\u1710\\u1711\\u1712\\u1713\\u1714\\u1715\\u1716\\u1717\\u1718\\u1719\\u171A\\u171B\\u171C\\u171D\\u171E\\u171F\\u1720\\u1721\\u1722\\u1723\\u1724\\u1725\\u1726\\u1727\\u1728\\u1729\\u172A\\u172B\\u172C\\u172D\\u172E\\u172F\\u1730\\u1731\\u1732\\u1733\\u1734\\u1735\\u1736\\u1737\\u1738\\u1739\\u173A\\u173B\\u173C\\u173D\\u173E\\u173F\\u1740\\u1741\\u1742\\u1743\\u1744\\u1745\\u1746\\u1747\\u1748\\u1749\\u174A\\u174B\\u174C\\u174D\\u174E\\u174F\\u1750\\u1751\\u1752\\u1753\\u1754\\u1755\\u1756\\u1757\\u1758\\u1759\\u175A\\u175B\\u175C\\u175D\\u175E\\u175F\\u1760\\u1761\\u1762\\u1763\\u1764\\u1765\\u1766\\u1767\\u1768\\u1769\\u176A\\u176B\\u176C\\u176D\\u176E\\u176F\\u1770\\u1771\\u1772\\u1773\\u1774\\u1775\\u1776\\u1777\\u1778\\u1779\\u177A\\u177B\\u177C\\u177D\\u177E\\u177F\\u1780\\u1781\\u1782\\u1783\\u1784\\u1785\\u1786\\u1787\\u1788\\u1789\\u178A\\u178B\\u178C\\u178D\\u178E\\u178F\\u1790\\u1791\\u1792\\u1793\\u1794\\u1795\\u1796\\u1797\\u1798\\u1799\\u179A\\u179B\\u179C\\u179D\\u179E\\u179F\\u17A0\\u17A1\\u17A2\\u17A3\\u17A4\\u17A5\\u17A6\\u17A7\\u17A8\\u17A9\\u17AA\\u17AB\\u17AC\\u17AD\\u17AE\\u17AF\\u17B0\\u17B1\\u17B2\\u17B3\\u17B4\\u17B5\\u17B6\\u17B7\\u17B8\\u17B9\\u17BA\\u17BB\\u17BC\\u17BD\\u17BE\\u17BF\\u17C0\\u17C1\\u17C2\\u17C3\\u17C4\\u17C5\\u17C6\\u17C7\\u17C8\\u17C9\\u17CA\\u17CB\\u17CC\\u17CD\\u17CE\\u17CF\\u17D0\\u17D1\\u17D2\\u17D3\\u17D4\\u17D5\\u17D6\\u17D7\\u17D8\\u17D9\\u17DA\\u17DB\\u17DC\\u17DD\\u17DE\\u17DF\\u17E0\\u17E1\\u17E2\\u17E3\\u17E4\\u17E5\\u17E6\\u17E7\\u17E8\\u17E9\\u17EA\\u17EB\\u17EC\\u17ED\\u17EE\\u17EF\\u17F0\\u17F1\\u17F2\\u17F3\\u17F4\\u17F5\\u17F6\\u17F7\\u17F8\\u17F9\\u17FA\\u17FB\\u17FC\\u17FD\\u17FE\\u17FF\";\nif (i5.replace(/\\s+/g, \"\") !== o5) {\n $ERROR(\"#5: Error matching character class \\s between character 1400 and 17ff\");\n}\n\nvar i6 = \"\";\nfor (var j = 6144; j < 7168; j++)\n i6 += String.fromCharCode(j);\nvar o6 = \"\\u1800\\u1801\\u1802\\u1803\\u1804\\u1805\\u1806\\u1807\\u1808\\u1809\\u180A\\u180B\\u180C\\u180D\\u180F\\u1810\\u1811\\u1812\\u1813\\u1814\\u1815\\u1816\\u1817\\u1818\\u1819\\u181A\\u181B\\u181C\\u181D\\u181E\\u181F\\u1820\\u1821\\u1822\\u1823\\u1824\\u1825\\u1826\\u1827\\u1828\\u1829\\u182A\\u182B\\u182C\\u182D\\u182E\\u182F\\u1830\\u1831\\u1832\\u1833\\u1834\\u1835\\u1836\\u1837\\u1838\\u1839\\u183A\\u183B\\u183C\\u183D\\u183E\\u183F\\u1840\\u1841\\u1842\\u1843\\u1844\\u1845\\u1846\\u1847\\u1848\\u1849\\u184A\\u184B\\u184C\\u184D\\u184E\\u184F\\u1850\\u1851\\u1852\\u1853\\u1854\\u1855\\u1856\\u1857\\u1858\\u1859\\u185A\\u185B\\u185C\\u185D\\u185E\\u185F\\u1860\\u1861\\u1862\\u1863\\u1864\\u1865\\u1866\\u1867\\u1868\\u1869\\u186A\\u186B\\u186C\\u186D\\u186E\\u186F\\u1870\\u1871\\u1872\\u1873\\u1874\\u1875\\u1876\\u1877\\u1878\\u1879\\u187A\\u187B\\u187C\\u187D\\u187E\\u187F\\u1880\\u1881\\u1882\\u1883\\u1884\\u1885\\u1886\\u1887\\u1888\\u1889\\u188A\\u188B\\u188C\\u188D\\u188E\\u188F\\u1890\\u1891\\u1892\\u1893\\u1894\\u1895\\u1896\\u1897\\u1898\\u1899\\u189A\\u189B\\u189C\\u189D\\u189E\\u189F\\u18A0\\u18A1\\u18A2\\u18A3\\u18A4\\u18A5\\u18A6\\u18A7\\u18A8\\u18A9\\u18AA\\u18AB\\u18AC\\u18AD\\u18AE\\u18AF\\u18B0\\u18B1\\u18B2\\u18B3\\u18B4\\u18B5\\u18B6\\u18B7\\u18B8\\u18B9\\u18BA\\u18BB\\u18BC\\u18BD\\u18BE\\u18BF\\u18C0\\u18C1\\u18C2\\u18C3\\u18C4\\u18C5\\u18C6\\u18C7\\u18C8\\u18C9\\u18CA\\u18CB\\u18CC\\u18CD\\u18CE\\u18CF\\u18D0\\u18D1\\u18D2\\u18D3\\u18D4\\u18D5\\u18D6\\u18D7\\u18D8\\u18D9\\u18DA\\u18DB\\u18DC\\u18DD\\u18DE\\u18DF\\u18E0\\u18E1\\u18E2\\u18E3\\u18E4\\u18E5\\u18E6\\u18E7\\u18E8\\u18E9\\u18EA\\u18EB\\u18EC\\u18ED\\u18EE\\u18EF\\u18F0\\u18F1\\u18F2\\u18F3\\u18F4\\u18F5\\u18F6\\u18F7\\u18F8\\u18F9\\u18FA\\u18FB\\u18FC\\u18FD\\u18FE\\u18FF\\u1900\\u1901\\u1902\\u1903\\u1904\\u1905\\u1906\\u1907\\u1908\\u1909\\u190A\\u190B\\u190C\\u190D\\u190E\\u190F\\u1910\\u1911\\u1912\\u1913\\u1914\\u1915\\u1916\\u1917\\u1918\\u1919\\u191A\\u191B\\u191C\\u191D\\u191E\\u191F\\u1920\\u1921\\u1922\\u1923\\u1924\\u1925\\u1926\\u1927\\u1928\\u1929\\u192A\\u192B\\u192C\\u192D\\u192E\\u192F\\u1930\\u1931\\u1932\\u1933\\u1934\\u1935\\u1936\\u1937\\u1938\\u1939\\u193A\\u193B\\u193C\\u193D\\u193E\\u193F\\u1940\\u1941\\u1942\\u1943\\u1944\\u1945\\u1946\\u1947\\u1948\\u1949\\u194A\\u194B\\u194C\\u194D\\u194E\\u194F\\u1950\\u1951\\u1952\\u1953\\u1954\\u1955\\u1956\\u1957\\u1958\\u1959\\u195A\\u195B\\u195C\\u195D\\u195E\\u195F\\u1960\\u1961\\u1962\\u1963\\u1964\\u1965\\u1966\\u1967\\u1968\\u1969\\u196A\\u196B\\u196C\\u196D\\u196E\\u196F\\u1970\\u1971\\u1972\\u1973\\u1974\\u1975\\u1976\\u1977\\u1978\\u1979\\u197A\\u197B\\u197C\\u197D\\u197E\\u197F\\u1980\\u1981\\u1982\\u1983\\u1984\\u1985\\u1986\\u1987\\u1988\\u1989\\u198A\\u198B\\u198C\\u198D\\u198E\\u198F\\u1990\\u1991\\u1992\\u1993\\u1994\\u1995\\u1996\\u1997\\u1998\\u1999\\u199A\\u199B\\u199C\\u199D\\u199E\\u199F\\u19A0\\u19A1\\u19A2\\u19A3\\u19A4\\u19A5\\u19A6\\u19A7\\u19A8\\u19A9\\u19AA\\u19AB\\u19AC\\u19AD\\u19AE\\u19AF\\u19B0\\u19B1\\u19B2\\u19B3\\u19B4\\u19B5\\u19B6\\u19B7\\u19B8\\u19B9\\u19BA\\u19BB\\u19BC\\u19BD\\u19BE\\u19BF\\u19C0\\u19C1\\u19C2\\u19C3\\u19C4\\u19C5\\u19C6\\u19C7\\u19C8\\u19C9\\u19CA\\u19CB\\u19CC\\u19CD\\u19CE\\u19CF\\u19D0\\u19D1\\u19D2\\u19D3\\u19D4\\u19D5\\u19D6\\u19D7\\u19D8\\u19D9\\u19DA\\u19DB\\u19DC\\u19DD\\u19DE\\u19DF\\u19E0\\u19E1\\u19E2\\u19E3\\u19E4\\u19E5\\u19E6\\u19E7\\u19E8\\u19E9\\u19EA\\u19EB\\u19EC\\u19ED\\u19EE\\u19EF\\u19F0\\u19F1\\u19F2\\u19F3\\u19F4\\u19F5\\u19F6\\u19F7\\u19F8\\u19F9\\u19FA\\u19FB\\u19FC\\u19FD\\u19FE\\u19FF\\u1A00\\u1A01\\u1A02\\u1A03\\u1A04\\u1A05\\u1A06\\u1A07\\u1A08\\u1A09\\u1A0A\\u1A0B\\u1A0C\\u1A0D\\u1A0E\\u1A0F\\u1A10\\u1A11\\u1A12\\u1A13\\u1A14\\u1A15\\u1A16\\u1A17\\u1A18\\u1A19\\u1A1A\\u1A1B\\u1A1C\\u1A1D\\u1A1E\\u1A1F\\u1A20\\u1A21\\u1A22\\u1A23\\u1A24\\u1A25\\u1A26\\u1A27\\u1A28\\u1A29\\u1A2A\\u1A2B\\u1A2C\\u1A2D\\u1A2E\\u1A2F\\u1A30\\u1A31\\u1A32\\u1A33\\u1A34\\u1A35\\u1A36\\u1A37\\u1A38\\u1A39\\u1A3A\\u1A3B\\u1A3C\\u1A3D\\u1A3E\\u1A3F\\u1A40\\u1A41\\u1A42\\u1A43\\u1A44\\u1A45\\u1A46\\u1A47\\u1A48\\u1A49\\u1A4A\\u1A4B\\u1A4C\\u1A4D\\u1A4E\\u1A4F\\u1A50\\u1A51\\u1A52\\u1A53\\u1A54\\u1A55\\u1A56\\u1A57\\u1A58\\u1A59\\u1A5A\\u1A5B\\u1A5C\\u1A5D\\u1A5E\\u1A5F\\u1A60\\u1A61\\u1A62\\u1A63\\u1A64\\u1A65\\u1A66\\u1A67\\u1A68\\u1A69\\u1A6A\\u1A6B\\u1A6C\\u1A6D\\u1A6E\\u1A6F\\u1A70\\u1A71\\u1A72\\u1A73\\u1A74\\u1A75\\u1A76\\u1A77\\u1A78\\u1A79\\u1A7A\\u1A7B\\u1A7C\\u1A7D\\u1A7E\\u1A7F\\u1A80\\u1A81\\u1A82\\u1A83\\u1A84\\u1A85\\u1A86\\u1A87\\u1A88\\u1A89\\u1A8A\\u1A8B\\u1A8C\\u1A8D\\u1A8E\\u1A8F\\u1A90\\u1A91\\u1A92\\u1A93\\u1A94\\u1A95\\u1A96\\u1A97\\u1A98\\u1A99\\u1A9A\\u1A9B\\u1A9C\\u1A9D\\u1A9E\\u1A9F\\u1AA0\\u1AA1\\u1AA2\\u1AA3\\u1AA4\\u1AA5\\u1AA6\\u1AA7\\u1AA8\\u1AA9\\u1AAA\\u1AAB\\u1AAC\\u1AAD\\u1AAE\\u1AAF\\u1AB0\\u1AB1\\u1AB2\\u1AB3\\u1AB4\\u1AB5\\u1AB6\\u1AB7\\u1AB8\\u1AB9\\u1ABA\\u1ABB\\u1ABC\\u1ABD\\u1ABE\\u1ABF\\u1AC0\\u1AC1\\u1AC2\\u1AC3\\u1AC4\\u1AC5\\u1AC6\\u1AC7\\u1AC8\\u1AC9\\u1ACA\\u1ACB\\u1ACC\\u1ACD\\u1ACE\\u1ACF\\u1AD0\\u1AD1\\u1AD2\\u1AD3\\u1AD4\\u1AD5\\u1AD6\\u1AD7\\u1AD8\\u1AD9\\u1ADA\\u1ADB\\u1ADC\\u1ADD\\u1ADE\\u1ADF\\u1AE0\\u1AE1\\u1AE2\\u1AE3\\u1AE4\\u1AE5\\u1AE6\\u1AE7\\u1AE8\\u1AE9\\u1AEA\\u1AEB\\u1AEC\\u1AED\\u1AEE\\u1AEF\\u1AF0\\u1AF1\\u1AF2\\u1AF3\\u1AF4\\u1AF5\\u1AF6\\u1AF7\\u1AF8\\u1AF9\\u1AFA\\u1AFB\\u1AFC\\u1AFD\\u1AFE\\u1AFF\\u1B00\\u1B01\\u1B02\\u1B03\\u1B04\\u1B05\\u1B06\\u1B07\\u1B08\\u1B09\\u1B0A\\u1B0B\\u1B0C\\u1B0D\\u1B0E\\u1B0F\\u1B10\\u1B11\\u1B12\\u1B13\\u1B14\\u1B15\\u1B16\\u1B17\\u1B18\\u1B19\\u1B1A\\u1B1B\\u1B1C\\u1B1D\\u1B1E\\u1B1F\\u1B20\\u1B21\\u1B22\\u1B23\\u1B24\\u1B25\\u1B26\\u1B27\\u1B28\\u1B29\\u1B2A\\u1B2B\\u1B2C\\u1B2D\\u1B2E\\u1B2F\\u1B30\\u1B31\\u1B32\\u1B33\\u1B34\\u1B35\\u1B36\\u1B37\\u1B38\\u1B39\\u1B3A\\u1B3B\\u1B3C\\u1B3D\\u1B3E\\u1B3F\\u1B40\\u1B41\\u1B42\\u1B43\\u1B44\\u1B45\\u1B46\\u1B47\\u1B48\\u1B49\\u1B4A\\u1B4B\\u1B4C\\u1B4D\\u1B4E\\u1B4F\\u1B50\\u1B51\\u1B52\\u1B53\\u1B54\\u1B55\\u1B56\\u1B57\\u1B58\\u1B59\\u1B5A\\u1B5B\\u1B5C\\u1B5D\\u1B5E\\u1B5F\\u1B60\\u1B61\\u1B62\\u1B63\\u1B64\\u1B65\\u1B66\\u1B67\\u1B68\\u1B69\\u1B6A\\u1B6B\\u1B6C\\u1B6D\\u1B6E\\u1B6F\\u1B70\\u1B71\\u1B72\\u1B73\\u1B74\\u1B75\\u1B76\\u1B77\\u1B78\\u1B79\\u1B7A\\u1B7B\\u1B7C\\u1B7D\\u1B7E\\u1B7F\\u1B80\\u1B81\\u1B82\\u1B83\\u1B84\\u1B85\\u1B86\\u1B87\\u1B88\\u1B89\\u1B8A\\u1B8B\\u1B8C\\u1B8D\\u1B8E\\u1B8F\\u1B90\\u1B91\\u1B92\\u1B93\\u1B94\\u1B95\\u1B96\\u1B97\\u1B98\\u1B99\\u1B9A\\u1B9B\\u1B9C\\u1B9D\\u1B9E\\u1B9F\\u1BA0\\u1BA1\\u1BA2\\u1BA3\\u1BA4\\u1BA5\\u1BA6\\u1BA7\\u1BA8\\u1BA9\\u1BAA\\u1BAB\\u1BAC\\u1BAD\\u1BAE\\u1BAF\\u1BB0\\u1BB1\\u1BB2\\u1BB3\\u1BB4\\u1BB5\\u1BB6\\u1BB7\\u1BB8\\u1BB9\\u1BBA\\u1BBB\\u1BBC\\u1BBD\\u1BBE\\u1BBF\\u1BC0\\u1BC1\\u1BC2\\u1BC3\\u1BC4\\u1BC5\\u1BC6\\u1BC7\\u1BC8\\u1BC9\\u1BCA\\u1BCB\\u1BCC\\u1BCD\\u1BCE\\u1BCF\\u1BD0\\u1BD1\\u1BD2\\u1BD3\\u1BD4\\u1BD5\\u1BD6\\u1BD7\\u1BD8\\u1BD9\\u1BDA\\u1BDB\\u1BDC\\u1BDD\\u1BDE\\u1BDF\\u1BE0\\u1BE1\\u1BE2\\u1BE3\\u1BE4\\u1BE5\\u1BE6\\u1BE7\\u1BE8\\u1BE9\\u1BEA\\u1BEB\\u1BEC\\u1BED\\u1BEE\\u1BEF\\u1BF0\\u1BF1\\u1BF2\\u1BF3\\u1BF4\\u1BF5\\u1BF6\\u1BF7\\u1BF8\\u1BF9\\u1BFA\\u1BFB\\u1BFC\\u1BFD\\u1BFE\\u1BFF\";\nif (i6.replace(/\\s+/g, \"\") !== o6) {\n $ERROR(\"#6: Error matching character class \\s between character 1800 and 1bff\");\n}\n\nvar i7 = \"\";\nfor (var j = 7168; j < 8192; j++)\n i7 += String.fromCharCode(j);\nvar o7 = i7;\nif (i7.replace(/\\s+/g, \"\") !== o7) {\n $ERROR(\"#7: Error matching character class \\s between character 1c00 and 1fff\");\n}\n\nvar i8 = \"\";\nfor (var j = 8192; j < 9216; j++)\n i8 += String.fromCharCode(j);\nvar o8 = \"\\u200B\\u200C\\u200D\\u200E\\u200F\\u2010\\u2011\\u2012\\u2013\\u2014\\u2015\\u2016\\u2017\\u2018\\u2019\\u201A\\u201B\\u201C\\u201D\\u201E\\u201F\\u2020\\u2021\\u2022\\u2023\\u2024\\u2025\\u2026\\u2027\\u202A\\u202B\\u202C\\u202D\\u202E\\u2030\\u2031\\u2032\\u2033\\u2034\\u2035\\u2036\\u2037\\u2038\\u2039\\u203A\\u203B\\u203C\\u203D\\u203E\\u203F\\u2040\\u2041\\u2042\\u2043\\u2044\\u2045\\u2046\\u2047\\u2048\\u2049\\u204A\\u204B\\u204C\\u204D\\u204E\\u204F\\u2050\\u2051\\u2052\\u2053\\u2054\\u2055\\u2056\\u2057\\u2058\\u2059\\u205A\\u205B\\u205C\\u205D\\u205E\\u2060\\u2061\\u2062\\u2063\\u2064\\u2065\\u2066\\u2067\\u2068\\u2069\\u206A\\u206B\\u206C\\u206D\\u206E\\u206F\\u2070\\u2071\\u2072\\u2073\\u2074\\u2075\\u2076\\u2077\\u2078\\u2079\\u207A\\u207B\\u207C\\u207D\\u207E\\u207F\\u2080\\u2081\\u2082\\u2083\\u2084\\u2085\\u2086\\u2087\\u2088\\u2089\\u208A\\u208B\\u208C\\u208D\\u208E\\u208F\\u2090\\u2091\\u2092\\u2093\\u2094\\u2095\\u2096\\u2097\\u2098\\u2099\\u209A\\u209B\\u209C\\u209D\\u209E\\u209F\\u20A0\\u20A1\\u20A2\\u20A3\\u20A4\\u20A5\\u20A6\\u20A7\\u20A8\\u20A9\\u20AA\\u20AB\\u20AC\\u20AD\\u20AE\\u20AF\\u20B0\\u20B1\\u20B2\\u20B3\\u20B4\\u20B5\\u20B6\\u20B7\\u20B8\\u20B9\\u20BA\\u20BB\\u20BC\\u20BD\\u20BE\\u20BF\\u20C0\\u20C1\\u20C2\\u20C3\\u20C4\\u20C5\\u20C6\\u20C7\\u20C8\\u20C9\\u20CA\\u20CB\\u20CC\\u20CD\\u20CE\\u20CF\\u20D0\\u20D1\\u20D2\\u20D3\\u20D4\\u20D5\\u20D6\\u20D7\\u20D8\\u20D9\\u20DA\\u20DB\\u20DC\\u20DD\\u20DE\\u20DF\\u20E0\\u20E1\\u20E2\\u20E3\\u20E4\\u20E5\\u20E6\\u20E7\\u20E8\\u20E9\\u20EA\\u20EB\\u20EC\\u20ED\\u20EE\\u20EF\\u20F0\\u20F1\\u20F2\\u20F3\\u20F4\\u20F5\\u20F6\\u20F7\\u20F8\\u20F9\\u20FA\\u20FB\\u20FC\\u20FD\\u20FE\\u20FF\\u2100\\u2101\\u2102\\u2103\\u2104\\u2105\\u2106\\u2107\\u2108\\u2109\\u210A\\u210B\\u210C\\u210D\\u210E\\u210F\\u2110\\u2111\\u2112\\u2113\\u2114\\u2115\\u2116\\u2117\\u2118\\u2119\\u211A\\u211B\\u211C\\u211D\\u211E\\u211F\\u2120\\u2121\\u2122\\u2123\\u2124\\u2125\\u2126\\u2127\\u2128\\u2129\\u212A\\u212B\\u212C\\u212D\\u212E\\u212F\\u2130\\u2131\\u2132\\u2133\\u2134\\u2135\\u2136\\u2137\\u2138\\u2139\\u213A\\u213B\\u213C\\u213D\\u213E\\u213F\\u2140\\u2141\\u2142\\u2143\\u2144\\u2145\\u2146\\u2147\\u2148\\u2149\\u214A\\u214B\\u214C\\u214D\\u214E\\u214F\\u2150\\u2151\\u2152\\u2153\\u2154\\u2155\\u2156\\u2157\\u2158\\u2159\\u215A\\u215B\\u215C\\u215D\\u215E\\u215F\\u2160\\u2161\\u2162\\u2163\\u2164\\u2165\\u2166\\u2167\\u2168\\u2169\\u216A\\u216B\\u216C\\u216D\\u216E\\u216F\\u2170\\u2171\\u2172\\u2173\\u2174\\u2175\\u2176\\u2177\\u2178\\u2179\\u217A\\u217B\\u217C\\u217D\\u217E\\u217F\\u2180\\u2181\\u2182\\u2183\\u2184\\u2185\\u2186\\u2187\\u2188\\u2189\\u218A\\u218B\\u218C\\u218D\\u218E\\u218F\\u2190\\u2191\\u2192\\u2193\\u2194\\u2195\\u2196\\u2197\\u2198\\u2199\\u219A\\u219B\\u219C\\u219D\\u219E\\u219F\\u21A0\\u21A1\\u21A2\\u21A3\\u21A4\\u21A5\\u21A6\\u21A7\\u21A8\\u21A9\\u21AA\\u21AB\\u21AC\\u21AD\\u21AE\\u21AF\\u21B0\\u21B1\\u21B2\\u21B3\\u21B4\\u21B5\\u21B6\\u21B7\\u21B8\\u21B9\\u21BA\\u21BB\\u21BC\\u21BD\\u21BE\\u21BF\\u21C0\\u21C1\\u21C2\\u21C3\\u21C4\\u21C5\\u21C6\\u21C7\\u21C8\\u21C9\\u21CA\\u21CB\\u21CC\\u21CD\\u21CE\\u21CF\\u21D0\\u21D1\\u21D2\\u21D3\\u21D4\\u21D5\\u21D6\\u21D7\\u21D8\\u21D9\\u21DA\\u21DB\\u21DC\\u21DD\\u21DE\\u21DF\\u21E0\\u21E1\\u21E2\\u21E3\\u21E4\\u21E5\\u21E6\\u21E7\\u21E8\\u21E9\\u21EA\\u21EB\\u21EC\\u21ED\\u21EE\\u21EF\\u21F0\\u21F1\\u21F2\\u21F3\\u21F4\\u21F5\\u21F6\\u21F7\\u21F8\\u21F9\\u21FA\\u21FB\\u21FC\\u21FD\\u21FE\\u21FF\\u2200\\u2201\\u2202\\u2203\\u2204\\u2205\\u2206\\u2207\\u2208\\u2209\\u220A\\u220B\\u220C\\u220D\\u220E\\u220F\\u2210\\u2211\\u2212\\u2213\\u2214\\u2215\\u2216\\u2217\\u2218\\u2219\\u221A\\u221B\\u221C\\u221D\\u221E\\u221F\\u2220\\u2221\\u2222\\u2223\\u2224\\u2225\\u2226\\u2227\\u2228\\u2229\\u222A\\u222B\\u222C\\u222D\\u222E\\u222F\\u2230\\u2231\\u2232\\u2233\\u2234\\u2235\\u2236\\u2237\\u2238\\u2239\\u223A\\u223B\\u223C\\u223D\\u223E\\u223F\\u2240\\u2241\\u2242\\u2243\\u2244\\u2245\\u2246\\u2247\\u2248\\u2249\\u224A\\u224B\\u224C\\u224D\\u224E\\u224F\\u2250\\u2251\\u2252\\u2253\\u2254\\u2255\\u2256\\u2257\\u2258\\u2259\\u225A\\u225B\\u225C\\u225D\\u225E\\u225F\\u2260\\u2261\\u2262\\u2263\\u2264\\u2265\\u2266\\u2267\\u2268\\u2269\\u226A\\u226B\\u226C\\u226D\\u226E\\u226F\\u2270\\u2271\\u2272\\u2273\\u2274\\u2275\\u2276\\u2277\\u2278\\u2279\\u227A\\u227B\\u227C\\u227D\\u227E\\u227F\\u2280\\u2281\\u2282\\u2283\\u2284\\u2285\\u2286\\u2287\\u2288\\u2289\\u228A\\u228B\\u228C\\u228D\\u228E\\u228F\\u2290\\u2291\\u2292\\u2293\\u2294\\u2295\\u2296\\u2297\\u2298\\u2299\\u229A\\u229B\\u229C\\u229D\\u229E\\u229F\\u22A0\\u22A1\\u22A2\\u22A3\\u22A4\\u22A5\\u22A6\\u22A7\\u22A8\\u22A9\\u22AA\\u22AB\\u22AC\\u22AD\\u22AE\\u22AF\\u22B0\\u22B1\\u22B2\\u22B3\\u22B4\\u22B5\\u22B6\\u22B7\\u22B8\\u22B9\\u22BA\\u22BB\\u22BC\\u22BD\\u22BE\\u22BF\\u22C0\\u22C1\\u22C2\\u22C3\\u22C4\\u22C5\\u22C6\\u22C7\\u22C8\\u22C9\\u22CA\\u22CB\\u22CC\\u22CD\\u22CE\\u22CF\\u22D0\\u22D1\\u22D2\\u22D3\\u22D4\\u22D5\\u22D6\\u22D7\\u22D8\\u22D9\\u22DA\\u22DB\\u22DC\\u22DD\\u22DE\\u22DF\\u22E0\\u22E1\\u22E2\\u22E3\\u22E4\\u22E5\\u22E6\\u22E7\\u22E8\\u22E9\\u22EA\\u22EB\\u22EC\\u22ED\\u22EE\\u22EF\\u22F0\\u22F1\\u22F2\\u22F3\\u22F4\\u22F5\\u22F6\\u22F7\\u22F8\\u22F9\\u22FA\\u22FB\\u22FC\\u22FD\\u22FE\\u22FF\\u2300\\u2301\\u2302\\u2303\\u2304\\u2305\\u2306\\u2307\\u2308\\u2309\\u230A\\u230B\\u230C\\u230D\\u230E\\u230F\\u2310\\u2311\\u2312\\u2313\\u2314\\u2315\\u2316\\u2317\\u2318\\u2319\\u231A\\u231B\\u231C\\u231D\\u231E\\u231F\\u2320\\u2321\\u2322\\u2323\\u2324\\u2325\\u2326\\u2327\\u2328\\u2329\\u232A\\u232B\\u232C\\u232D\\u232E\\u232F\\u2330\\u2331\\u2332\\u2333\\u2334\\u2335\\u2336\\u2337\\u2338\\u2339\\u233A\\u233B\\u233C\\u233D\\u233E\\u233F\\u2340\\u2341\\u2342\\u2343\\u2344\\u2345\\u2346\\u2347\\u2348\\u2349\\u234A\\u234B\\u234C\\u234D\\u234E\\u234F\\u2350\\u2351\\u2352\\u2353\\u2354\\u2355\\u2356\\u2357\\u2358\\u2359\\u235A\\u235B\\u235C\\u235D\\u235E\\u235F\\u2360\\u2361\\u2362\\u2363\\u2364\\u2365\\u2366\\u2367\\u2368\\u2369\\u236A\\u236B\\u236C\\u236D\\u236E\\u236F\\u2370\\u2371\\u2372\\u2373\\u2374\\u2375\\u2376\\u2377\\u2378\\u2379\\u237A\\u237B\\u237C\\u237D\\u237E\\u237F\\u2380\\u2381\\u2382\\u2383\\u2384\\u2385\\u2386\\u2387\\u2388\\u2389\\u238A\\u238B\\u238C\\u238D\\u238E\\u238F\\u2390\\u2391\\u2392\\u2393\\u2394\\u2395\\u2396\\u2397\\u2398\\u2399\\u239A\\u239B\\u239C\\u239D\\u239E\\u239F\\u23A0\\u23A1\\u23A2\\u23A3\\u23A4\\u23A5\\u23A6\\u23A7\\u23A8\\u23A9\\u23AA\\u23AB\\u23AC\\u23AD\\u23AE\\u23AF\\u23B0\\u23B1\\u23B2\\u23B3\\u23B4\\u23B5\\u23B6\\u23B7\\u23B8\\u23B9\\u23BA\\u23BB\\u23BC\\u23BD\\u23BE\\u23BF\\u23C0\\u23C1\\u23C2\\u23C3\\u23C4\\u23C5\\u23C6\\u23C7\\u23C8\\u23C9\\u23CA\\u23CB\\u23CC\\u23CD\\u23CE\\u23CF\\u23D0\\u23D1\\u23D2\\u23D3\\u23D4\\u23D5\\u23D6\\u23D7\\u23D8\\u23D9\\u23DA\\u23DB\\u23DC\\u23DD\\u23DE\\u23DF\\u23E0\\u23E1\\u23E2\\u23E3\\u23E4\\u23E5\\u23E6\\u23E7\\u23E8\\u23E9\\u23EA\\u23EB\\u23EC\\u23ED\\u23EE\\u23EF\\u23F0\\u23F1\\u23F2\\u23F3\\u23F4\\u23F5\\u23F6\\u23F7\\u23F8\\u23F9\\u23FA\\u23FB\\u23FC\\u23FD\\u23FE\\u23FF\";\nif (i8.replace(/\\s+/g, \"\") !== o8) {\n $ERROR(\"#8: Error matching character class \\s between character 2000 and 23ff\");\n}\n\nvar i9 = \"\";\nfor (var j = 9216; j < 10240; j++)\n i9 += String.fromCharCode(j);\nvar o9 = i9;\nif (i9.replace(/\\s+/g, \"\") !== o9) {\n $ERROR(\"#9: Error matching character class \\s between character 2400 and 27ff\");\n}\n\nvar i10 = \"\";\nfor (var j = 10240; j < 11264; j++)\n i10 += String.fromCharCode(j);\nvar o10 = i10;\nif (i10.replace(/\\s+/g, \"\") !== o10) {\n $ERROR(\"#10: Error matching character class \\s between character 2800 and 2bff\");\n}\n\nvar i11 = \"\";\nfor (var j = 11264; j < 12288; j++)\n i11 += String.fromCharCode(j);\nvar o11 = i11;\nif (i11.replace(/\\s+/g, \"\") !== o11) {\n $ERROR(\"#11: Error matching character class \\s between character 2c00 and 2fff\");\n}\n\nvar i12 = \"\";\nfor (var j = 12288; j < 13312; j++)\n i12 += String.fromCharCode(j);\nvar o12 = \"\\u3001\\u3002\\u3003\\u3004\\u3005\\u3006\\u3007\\u3008\\u3009\\u300A\\u300B\\u300C\\u300D\\u300E\\u300F\\u3010\\u3011\\u3012\\u3013\\u3014\\u3015\\u3016\\u3017\\u3018\\u3019\\u301A\\u301B\\u301C\\u301D\\u301E\\u301F\\u3020\\u3021\\u3022\\u3023\\u3024\\u3025\\u3026\\u3027\\u3028\\u3029\\u302A\\u302B\\u302C\\u302D\\u302E\\u302F\\u3030\\u3031\\u3032\\u3033\\u3034\\u3035\\u3036\\u3037\\u3038\\u3039\\u303A\\u303B\\u303C\\u303D\\u303E\\u303F\\u3040\\u3041\\u3042\\u3043\\u3044\\u3045\\u3046\\u3047\\u3048\\u3049\\u304A\\u304B\\u304C\\u304D\\u304E\\u304F\\u3050\\u3051\\u3052\\u3053\\u3054\\u3055\\u3056\\u3057\\u3058\\u3059\\u305A\\u305B\\u305C\\u305D\\u305E\\u305F\\u3060\\u3061\\u3062\\u3063\\u3064\\u3065\\u3066\\u3067\\u3068\\u3069\\u306A\\u306B\\u306C\\u306D\\u306E\\u306F\\u3070\\u3071\\u3072\\u3073\\u3074\\u3075\\u3076\\u3077\\u3078\\u3079\\u307A\\u307B\\u307C\\u307D\\u307E\\u307F\\u3080\\u3081\\u3082\\u3083\\u3084\\u3085\\u3086\\u3087\\u3088\\u3089\\u308A\\u308B\\u308C\\u308D\\u308E\\u308F\\u3090\\u3091\\u3092\\u3093\\u3094\\u3095\\u3096\\u3097\\u3098\\u3099\\u309A\\u309B\\u309C\\u309D\\u309E\\u309F\\u30A0\\u30A1\\u30A2\\u30A3\\u30A4\\u30A5\\u30A6\\u30A7\\u30A8\\u30A9\\u30AA\\u30AB\\u30AC\\u30AD\\u30AE\\u30AF\\u30B0\\u30B1\\u30B2\\u30B3\\u30B4\\u30B5\\u30B6\\u30B7\\u30B8\\u30B9\\u30BA\\u30BB\\u30BC\\u30BD\\u30BE\\u30BF\\u30C0\\u30C1\\u30C2\\u30C3\\u30C4\\u30C5\\u30C6\\u30C7\\u30C8\\u30C9\\u30CA\\u30CB\\u30CC\\u30CD\\u30CE\\u30CF\\u30D0\\u30D1\\u30D2\\u30D3\\u30D4\\u30D5\\u30D6\\u30D7\\u30D8\\u30D9\\u30DA\\u30DB\\u30DC\\u30DD\\u30DE\\u30DF\\u30E0\\u30E1\\u30E2\\u30E3\\u30E4\\u30E5\\u30E6\\u30E7\\u30E8\\u30E9\\u30EA\\u30EB\\u30EC\\u30ED\\u30EE\\u30EF\\u30F0\\u30F1\\u30F2\\u30F3\\u30F4\\u30F5\\u30F6\\u30F7\\u30F8\\u30F9\\u30FA\\u30FB\\u30FC\\u30FD\\u30FE\\u30FF\\u3100\\u3101\\u3102\\u3103\\u3104\\u3105\\u3106\\u3107\\u3108\\u3109\\u310A\\u310B\\u310C\\u310D\\u310E\\u310F\\u3110\\u3111\\u3112\\u3113\\u3114\\u3115\\u3116\\u3117\\u3118\\u3119\\u311A\\u311B\\u311C\\u311D\\u311E\\u311F\\u3120\\u3121\\u3122\\u3123\\u3124\\u3125\\u3126\\u3127\\u3128\\u3129\\u312A\\u312B\\u312C\\u312D\\u312E\\u312F\\u3130\\u3131\\u3132\\u3133\\u3134\\u3135\\u3136\\u3137\\u3138\\u3139\\u313A\\u313B\\u313C\\u313D\\u313E\\u313F\\u3140\\u3141\\u3142\\u3143\\u3144\\u3145\\u3146\\u3147\\u3148\\u3149\\u314A\\u314B\\u314C\\u314D\\u314E\\u314F\\u3150\\u3151\\u3152\\u3153\\u3154\\u3155\\u3156\\u3157\\u3158\\u3159\\u315A\\u315B\\u315C\\u315D\\u315E\\u315F\\u3160\\u3161\\u3162\\u3163\\u3164\\u3165\\u3166\\u3167\\u3168\\u3169\\u316A\\u316B\\u316C\\u316D\\u316E\\u316F\\u3170\\u3171\\u3172\\u3173\\u3174\\u3175\\u3176\\u3177\\u3178\\u3179\\u317A\\u317B\\u317C\\u317D\\u317E\\u317F\\u3180\\u3181\\u3182\\u3183\\u3184\\u3185\\u3186\\u3187\\u3188\\u3189\\u318A\\u318B\\u318C\\u318D\\u318E\\u318F\\u3190\\u3191\\u3192\\u3193\\u3194\\u3195\\u3196\\u3197\\u3198\\u3199\\u319A\\u319B\\u319C\\u319D\\u319E\\u319F\\u31A0\\u31A1\\u31A2\\u31A3\\u31A4\\u31A5\\u31A6\\u31A7\\u31A8\\u31A9\\u31AA\\u31AB\\u31AC\\u31AD\\u31AE\\u31AF\\u31B0\\u31B1\\u31B2\\u31B3\\u31B4\\u31B5\\u31B6\\u31B7\\u31B8\\u31B9\\u31BA\\u31BB\\u31BC\\u31BD\\u31BE\\u31BF\\u31C0\\u31C1\\u31C2\\u31C3\\u31C4\\u31C5\\u31C6\\u31C7\\u31C8\\u31C9\\u31CA\\u31CB\\u31CC\\u31CD\\u31CE\\u31CF\\u31D0\\u31D1\\u31D2\\u31D3\\u31D4\\u31D5\\u31D6\\u31D7\\u31D8\\u31D9\\u31DA\\u31DB\\u31DC\\u31DD\\u31DE\\u31DF\\u31E0\\u31E1\\u31E2\\u31E3\\u31E4\\u31E5\\u31E6\\u31E7\\u31E8\\u31E9\\u31EA\\u31EB\\u31EC\\u31ED\\u31EE\\u31EF\\u31F0\\u31F1\\u31F2\\u31F3\\u31F4\\u31F5\\u31F6\\u31F7\\u31F8\\u31F9\\u31FA\\u31FB\\u31FC\\u31FD\\u31FE\\u31FF\\u3200\\u3201\\u3202\\u3203\\u3204\\u3205\\u3206\\u3207\\u3208\\u3209\\u320A\\u320B\\u320C\\u320D\\u320E\\u320F\\u3210\\u3211\\u3212\\u3213\\u3214\\u3215\\u3216\\u3217\\u3218\\u3219\\u321A\\u321B\\u321C\\u321D\\u321E\\u321F\\u3220\\u3221\\u3222\\u3223\\u3224\\u3225\\u3226\\u3227\\u3228\\u3229\\u322A\\u322B\\u322C\\u322D\\u322E\\u322F\\u3230\\u3231\\u3232\\u3233\\u3234\\u3235\\u3236\\u3237\\u3238\\u3239\\u323A\\u323B\\u323C\\u323D\\u323E\\u323F\\u3240\\u3241\\u3242\\u3243\\u3244\\u3245\\u3246\\u3247\\u3248\\u3249\\u324A\\u324B\\u324C\\u324D\\u324E\\u324F\\u3250\\u3251\\u3252\\u3253\\u3254\\u3255\\u3256\\u3257\\u3258\\u3259\\u325A\\u325B\\u325C\\u325D\\u325E\\u325F\\u3260\\u3261\\u3262\\u3263\\u3264\\u3265\\u3266\\u3267\\u3268\\u3269\\u326A\\u326B\\u326C\\u326D\\u326E\\u326F\\u3270\\u3271\\u3272\\u3273\\u3274\\u3275\\u3276\\u3277\\u3278\\u3279\\u327A\\u327B\\u327C\\u327D\\u327E\\u327F\\u3280\\u3281\\u3282\\u3283\\u3284\\u3285\\u3286\\u3287\\u3288\\u3289\\u328A\\u328B\\u328C\\u328D\\u328E\\u328F\\u3290\\u3291\\u3292\\u3293\\u3294\\u3295\\u3296\\u3297\\u3298\\u3299\\u329A\\u329B\\u329C\\u329D\\u329E\\u329F\\u32A0\\u32A1\\u32A2\\u32A3\\u32A4\\u32A5\\u32A6\\u32A7\\u32A8\\u32A9\\u32AA\\u32AB\\u32AC\\u32AD\\u32AE\\u32AF\\u32B0\\u32B1\\u32B2\\u32B3\\u32B4\\u32B5\\u32B6\\u32B7\\u32B8\\u32B9\\u32BA\\u32BB\\u32BC\\u32BD\\u32BE\\u32BF\\u32C0\\u32C1\\u32C2\\u32C3\\u32C4\\u32C5\\u32C6\\u32C7\\u32C8\\u32C9\\u32CA\\u32CB\\u32CC\\u32CD\\u32CE\\u32CF\\u32D0\\u32D1\\u32D2\\u32D3\\u32D4\\u32D5\\u32D6\\u32D7\\u32D8\\u32D9\\u32DA\\u32DB\\u32DC\\u32DD\\u32DE\\u32DF\\u32E0\\u32E1\\u32E2\\u32E3\\u32E4\\u32E5\\u32E6\\u32E7\\u32E8\\u32E9\\u32EA\\u32EB\\u32EC\\u32ED\\u32EE\\u32EF\\u32F0\\u32F1\\u32F2\\u32F3\\u32F4\\u32F5\\u32F6\\u32F7\\u32F8\\u32F9\\u32FA\\u32FB\\u32FC\\u32FD\\u32FE\\u32FF\\u3300\\u3301\\u3302\\u3303\\u3304\\u3305\\u3306\\u3307\\u3308\\u3309\\u330A\\u330B\\u330C\\u330D\\u330E\\u330F\\u3310\\u3311\\u3312\\u3313\\u3314\\u3315\\u3316\\u3317\\u3318\\u3319\\u331A\\u331B\\u331C\\u331D\\u331E\\u331F\\u3320\\u3321\\u3322\\u3323\\u3324\\u3325\\u3326\\u3327\\u3328\\u3329\\u332A\\u332B\\u332C\\u332D\\u332E\\u332F\\u3330\\u3331\\u3332\\u3333\\u3334\\u3335\\u3336\\u3337\\u3338\\u3339\\u333A\\u333B\\u333C\\u333D\\u333E\\u333F\\u3340\\u3341\\u3342\\u3343\\u3344\\u3345\\u3346\\u3347\\u3348\\u3349\\u334A\\u334B\\u334C\\u334D\\u334E\\u334F\\u3350\\u3351\\u3352\\u3353\\u3354\\u3355\\u3356\\u3357\\u3358\\u3359\\u335A\\u335B\\u335C\\u335D\\u335E\\u335F\\u3360\\u3361\\u3362\\u3363\\u3364\\u3365\\u3366\\u3367\\u3368\\u3369\\u336A\\u336B\\u336C\\u336D\\u336E\\u336F\\u3370\\u3371\\u3372\\u3373\\u3374\\u3375\\u3376\\u3377\\u3378\\u3379\\u337A\\u337B\\u337C\\u337D\\u337E\\u337F\\u3380\\u3381\\u3382\\u3383\\u3384\\u3385\\u3386\\u3387\\u3388\\u3389\\u338A\\u338B\\u338C\\u338D\\u338E\\u338F\\u3390\\u3391\\u3392\\u3393\\u3394\\u3395\\u3396\\u3397\\u3398\\u3399\\u339A\\u339B\\u339C\\u339D\\u339E\\u339F\\u33A0\\u33A1\\u33A2\\u33A3\\u33A4\\u33A5\\u33A6\\u33A7\\u33A8\\u33A9\\u33AA\\u33AB\\u33AC\\u33AD\\u33AE\\u33AF\\u33B0\\u33B1\\u33B2\\u33B3\\u33B4\\u33B5\\u33B6\\u33B7\\u33B8\\u33B9\\u33BA\\u33BB\\u33BC\\u33BD\\u33BE\\u33BF\\u33C0\\u33C1\\u33C2\\u33C3\\u33C4\\u33C5\\u33C6\\u33C7\\u33C8\\u33C9\\u33CA\\u33CB\\u33CC\\u33CD\\u33CE\\u33CF\\u33D0\\u33D1\\u33D2\\u33D3\\u33D4\\u33D5\\u33D6\\u33D7\\u33D8\\u33D9\\u33DA\\u33DB\\u33DC\\u33DD\\u33DE\\u33DF\\u33E0\\u33E1\\u33E2\\u33E3\\u33E4\\u33E5\\u33E6\\u33E7\\u33E8\\u33E9\\u33EA\\u33EB\\u33EC\\u33ED\\u33EE\\u33EF\\u33F0\\u33F1\\u33F2\\u33F3\\u33F4\\u33F5\\u33F6\\u33F7\\u33F8\\u33F9\\u33FA\\u33FB\\u33FC\\u33FD\\u33FE\\u33FF\";\nif (i12.replace(/\\s+/g, \"\") !== o12) {\n $ERROR(\"#12: Error matching character class \\s between character 3000 and 33ff\");\n}\n\nvar i13 = \"\";\nfor (var j = 13312; j < 14336; j++)\n i13 += String.fromCharCode(j);\nvar o13 = i13;\nif (i13.replace(/\\s+/g, \"\") !== o13) {\n $ERROR(\"#13: Error matching character class \\s between character 3400 and 37ff\");\n}\n\nvar i14 = \"\";\nfor (var j = 14336; j < 15360; j++)\n i14 += String.fromCharCode(j);\nvar o14 = i14;\nif (i14.replace(/\\s+/g, \"\") !== o14) {\n $ERROR(\"#14: Error matching character class \\s between character 3800 and 3bff\");\n}\n\nvar i15 = \"\";\nfor (var j = 15360; j < 16384; j++)\n i15 += String.fromCharCode(j);\nvar o15 = i15;\nif (i15.replace(/\\s+/g, \"\") !== o15) {\n $ERROR(\"#15: Error matching character class \\s between character 3c00 and 3fff\");\n}\n\nvar i16 = \"\";\nfor (var j = 16384; j < 17408; j++)\n i16 += String.fromCharCode(j);\nvar o16 = i16;\nif (i16.replace(/\\s+/g, \"\") !== o16) {\n $ERROR(\"#16: Error matching character class \\s between character 4000 and 43ff\");\n}\n\nvar i17 = \"\";\nfor (var j = 17408; j < 18432; j++)\n i17 += String.fromCharCode(j);\nvar o17 = i17;\nif (i17.replace(/\\s+/g, \"\") !== o17) {\n $ERROR(\"#17: Error matching character class \\s between character 4400 and 47ff\");\n}\n\nvar i18 = \"\";\nfor (var j = 18432; j < 19456; j++)\n i18 += String.fromCharCode(j);\nvar o18 = i18;\nif (i18.replace(/\\s+/g, \"\") !== o18) {\n $ERROR(\"#18: Error matching character class \\s between character 4800 and 4bff\");\n}\n\nvar i19 = \"\";\nfor (var j = 19456; j < 20480; j++)\n i19 += String.fromCharCode(j);\nvar o19 = i19;\nif (i19.replace(/\\s+/g, \"\") !== o19) {\n $ERROR(\"#19: Error matching character class \\s between character 4c00 and 4fff\");\n}\n\nvar i20 = \"\";\nfor (var j = 20480; j < 21504; j++)\n i20 += String.fromCharCode(j);\nvar o20 = i20;\nif (i20.replace(/\\s+/g, \"\") !== o20) {\n $ERROR(\"#20: Error matching character class \\s between character 5000 and 53ff\");\n}\n\nvar i21 = \"\";\nfor (var j = 21504; j < 22528; j++)\n i21 += String.fromCharCode(j);\nvar o21 = i21;\nif (i21.replace(/\\s+/g, \"\") !== o21) {\n $ERROR(\"#21: Error matching character class \\s between character 5400 and 57ff\");\n}\n\nvar i22 = \"\";\nfor (var j = 22528; j < 23552; j++)\n i22 += String.fromCharCode(j);\nvar o22 = i22;\nif (i22.replace(/\\s+/g, \"\") !== o22) {\n $ERROR(\"#22: Error matching character class \\s between character 5800 and 5bff\");\n}\n\nvar i23 = \"\";\nfor (var j = 23552; j < 24576; j++)\n i23 += String.fromCharCode(j);\nvar o23 = i23;\nif (i23.replace(/\\s+/g, \"\") !== o23) {\n $ERROR(\"#23: Error matching character class \\s between character 5c00 and 5fff\");\n}\n\nvar i24 = \"\";\nfor (var j = 24576; j < 25600; j++)\n i24 += String.fromCharCode(j);\nvar o24 = i24;\nif (i24.replace(/\\s+/g, \"\") !== o24) {\n $ERROR(\"#24: Error matching character class \\s between character 6000 and 63ff\");\n}\n\nvar i25 = \"\";\nfor (var j = 25600; j < 26624; j++)\n i25 += String.fromCharCode(j);\nvar o25 = i25;\nif (i25.replace(/\\s+/g, \"\") !== o25) {\n $ERROR(\"#25: Error matching character class \\s between character 6400 and 67ff\");\n}\n\nvar i26 = \"\";\nfor (var j = 26624; j < 27648; j++)\n i26 += String.fromCharCode(j);\nvar o26 = i26;\nif (i26.replace(/\\s+/g, \"\") !== o26) {\n $ERROR(\"#26: Error matching character class \\s between character 6800 and 6bff\");\n}\n\nvar i27 = \"\";\nfor (var j = 27648; j < 28672; j++)\n i27 += String.fromCharCode(j);\nvar o27 = i27;\nif (i27.replace(/\\s+/g, \"\") !== o27) {\n $ERROR(\"#27: Error matching character class \\s between character 6c00 and 6fff\");\n}\n\nvar i28 = \"\";\nfor (var j = 28672; j < 29696; j++)\n i28 += String.fromCharCode(j);\nvar o28 = i28;\nif (i28.replace(/\\s+/g, \"\") !== o28) {\n $ERROR(\"#28: Error matching character class \\s between character 7000 and 73ff\");\n}\n\nvar i29 = \"\";\nfor (var j = 29696; j < 30720; j++)\n i29 += String.fromCharCode(j);\nvar o29 = i29;\nif (i29.replace(/\\s+/g, \"\") !== o29) {\n $ERROR(\"#29: Error matching character class \\s between character 7400 and 77ff\");\n}\n\nvar i30 = \"\";\nfor (var j = 30720; j < 31744; j++)\n i30 += String.fromCharCode(j);\nvar o30 = i30;\nif (i30.replace(/\\s+/g, \"\") !== o30) {\n $ERROR(\"#30: Error matching character class \\s between character 7800 and 7bff\");\n}\n\nvar i31 = \"\";\nfor (var j = 31744; j < 32768; j++)\n i31 += String.fromCharCode(j);\nvar o31 = i31;\nif (i31.replace(/\\s+/g, \"\") !== o31) {\n $ERROR(\"#31: Error matching character class \\s between character 7c00 and 7fff\");\n}\n\nvar i32 = \"\";\nfor (var j = 32768; j < 33792; j++)\n i32 += String.fromCharCode(j);\nvar o32 = i32;\nif (i32.replace(/\\s+/g, \"\") !== o32) {\n $ERROR(\"#32: Error matching character class \\s between character 8000 and 83ff\");\n}\n\nvar i33 = \"\";\nfor (var j = 33792; j < 34816; j++)\n i33 += String.fromCharCode(j);\nvar o33 = i33;\nif (i33.replace(/\\s+/g, \"\") !== o33) {\n $ERROR(\"#33: Error matching character class \\s between character 8400 and 87ff\");\n}\n\nvar i34 = \"\";\nfor (var j = 34816; j < 35840; j++)\n i34 += String.fromCharCode(j);\nvar o34 = i34;\nif (i34.replace(/\\s+/g, \"\") !== o34) {\n $ERROR(\"#34: Error matching character class \\s between character 8800 and 8bff\");\n}\n\nvar i35 = \"\";\nfor (var j = 35840; j < 36864; j++)\n i35 += String.fromCharCode(j);\nvar o35 = i35;\nif (i35.replace(/\\s+/g, \"\") !== o35) {\n $ERROR(\"#35: Error matching character class \\s between character 8c00 and 8fff\");\n}\n\nvar i36 = \"\";\nfor (var j = 36864; j < 37888; j++)\n i36 += String.fromCharCode(j);\nvar o36 = i36;\nif (i36.replace(/\\s+/g, \"\") !== o36) {\n $ERROR(\"#36: Error matching character class \\s between character 9000 and 93ff\");\n}\n\nvar i37 = \"\";\nfor (var j = 37888; j < 38912; j++)\n i37 += String.fromCharCode(j);\nvar o37 = i37;\nif (i37.replace(/\\s+/g, \"\") !== o37) {\n $ERROR(\"#37: Error matching character class \\s between character 9400 and 97ff\");\n}\n\nvar i38 = \"\";\nfor (var j = 38912; j < 39936; j++)\n i38 += String.fromCharCode(j);\nvar o38 = i38;\nif (i38.replace(/\\s+/g, \"\") !== o38) {\n $ERROR(\"#38: Error matching character class \\s between character 9800 and 9bff\");\n}\n\nvar i39 = \"\";\nfor (var j = 39936; j < 40960; j++)\n i39 += String.fromCharCode(j);\nvar o39 = i39;\nif (i39.replace(/\\s+/g, \"\") !== o39) {\n $ERROR(\"#39: Error matching character class \\s between character 9c00 and 9fff\");\n}\n\nvar i40 = \"\";\nfor (var j = 40960; j < 41984; j++)\n i40 += String.fromCharCode(j);\nvar o40 = i40;\nif (i40.replace(/\\s+/g, \"\") !== o40) {\n $ERROR(\"#40: Error matching character class \\s between character a000 and a3ff\");\n}\n\nvar i41 = \"\";\nfor (var j = 41984; j < 43008; j++)\n i41 += String.fromCharCode(j);\nvar o41 = i41;\nif (i41.replace(/\\s+/g, \"\") !== o41) {\n $ERROR(\"#41: Error matching character class \\s between character a400 and a7ff\");\n}\n\nvar i42 = \"\";\nfor (var j = 43008; j < 44032; j++)\n i42 += String.fromCharCode(j);\nvar o42 = i42;\nif (i42.replace(/\\s+/g, \"\") !== o42) {\n $ERROR(\"#42: Error matching character class \\s between character a800 and abff\");\n}\n\nvar i43 = \"\";\nfor (var j = 44032; j < 45056; j++)\n i43 += String.fromCharCode(j);\nvar o43 = i43;\nif (i43.replace(/\\s+/g, \"\") !== o43) {\n $ERROR(\"#43: Error matching character class \\s between character ac00 and afff\");\n}\n\nvar i44 = \"\";\nfor (var j = 45056; j < 46080; j++)\n i44 += String.fromCharCode(j);\nvar o44 = i44;\nif (i44.replace(/\\s+/g, \"\") !== o44) {\n $ERROR(\"#44: Error matching character class \\s between character b000 and b3ff\");\n}\n\nvar i45 = \"\";\nfor (var j = 46080; j < 47104; j++)\n i45 += String.fromCharCode(j);\nvar o45 = i45;\nif (i45.replace(/\\s+/g, \"\") !== o45) {\n $ERROR(\"#45: Error matching character class \\s between character b400 and b7ff\");\n}\n\nvar i46 = \"\";\nfor (var j = 47104; j < 48128; j++)\n i46 += String.fromCharCode(j);\nvar o46 = i46;\nif (i46.replace(/\\s+/g, \"\") !== o46) {\n $ERROR(\"#46: Error matching character class \\s between character b800 and bbff\");\n}\n\nvar i47 = \"\";\nfor (var j = 48128; j < 49152; j++)\n i47 += String.fromCharCode(j);\nvar o47 = i47;\nif (i47.replace(/\\s+/g, \"\") !== o47) {\n $ERROR(\"#47: Error matching character class \\s between character bc00 and bfff\");\n}\n\nvar i48 = \"\";\nfor (var j = 49152; j < 50176; j++)\n i48 += String.fromCharCode(j);\nvar o48 = i48;\nif (i48.replace(/\\s+/g, \"\") !== o48) {\n $ERROR(\"#48: Error matching character class \\s between character c000 and c3ff\");\n}\n\nvar i49 = \"\";\nfor (var j = 50176; j < 51200; j++)\n i49 += String.fromCharCode(j);\nvar o49 = i49;\nif (i49.replace(/\\s+/g, \"\") !== o49) {\n $ERROR(\"#49: Error matching character class \\s between character c400 and c7ff\");\n}\n\nvar i50 = \"\";\nfor (var j = 51200; j < 52224; j++)\n i50 += String.fromCharCode(j);\nvar o50 = i50;\nif (i50.replace(/\\s+/g, \"\") !== o50) {\n $ERROR(\"#50: Error matching character class \\s between character c800 and cbff\");\n}\n\nvar i51 = \"\";\nfor (var j = 52224; j < 53248; j++)\n i51 += String.fromCharCode(j);\nvar o51 = i51;\nif (i51.replace(/\\s+/g, \"\") !== o51) {\n $ERROR(\"#51: Error matching character class \\s between character cc00 and cfff\");\n}\n\nvar i52 = \"\";\nfor (var j = 53248; j < 54272; j++)\n i52 += String.fromCharCode(j);\nvar o52 = i52;\nif (i52.replace(/\\s+/g, \"\") !== o52) {\n $ERROR(\"#52: Error matching character class \\s between character d000 and d3ff\");\n}\n\nvar i53 = \"\";\nfor (var j = 54272; j < 55296; j++)\n i53 += String.fromCharCode(j);\nvar o53 = i53;\nif (i53.replace(/\\s+/g, \"\") !== o53) {\n $ERROR(\"#53: Error matching character class \\s between character d400 and d7ff\");\n}\n\nvar i54 = \"\";\nfor (var j = 55296; j < 56320; j++)\n i54 += String.fromCharCode(j);\nvar o54 = i54;\nif (i54.replace(/\\s+/g, \"\") !== o54) {\n $ERROR(\"#54: Error matching character class \\s between character d800 and dbff\");\n}\n\nvar i55 = \"\";\nfor (var j = 56320; j < 57344; j++)\n i55 += String.fromCharCode(j);\nvar o55 = i55;\nif (i55.replace(/\\s+/g, \"\") !== o55) {\n $ERROR(\"#55: Error matching character class \\s between character dc00 and dfff\");\n}\n\nvar i56 = \"\";\nfor (var j = 57344; j < 58368; j++)\n i56 += String.fromCharCode(j);\nvar o56 = i56;\nif (i56.replace(/\\s+/g, \"\") !== o56) {\n $ERROR(\"#56: Error matching character class \\s between character e000 and e3ff\");\n}\n\nvar i57 = \"\";\nfor (var j = 58368; j < 59392; j++)\n i57 += String.fromCharCode(j);\nvar o57 = i57;\nif (i57.replace(/\\s+/g, \"\") !== o57) {\n $ERROR(\"#57: Error matching character class \\s between character e400 and e7ff\");\n}\n\nvar i58 = \"\";\nfor (var j = 59392; j < 60416; j++)\n i58 += String.fromCharCode(j);\nvar o58 = i58;\nif (i58.replace(/\\s+/g, \"\") !== o58) {\n $ERROR(\"#58: Error matching character class \\s between character e800 and ebff\");\n}\n\nvar i59 = \"\";\nfor (var j = 60416; j < 61440; j++)\n i59 += String.fromCharCode(j);\nvar o59 = i59;\nif (i59.replace(/\\s+/g, \"\") !== o59) {\n $ERROR(\"#59: Error matching character class \\s between character ec00 and efff\");\n}\n\nvar i60 = \"\";\nfor (var j = 61440; j < 62464; j++)\n i60 += String.fromCharCode(j);\nvar o60 = i60;\nif (i60.replace(/\\s+/g, \"\") !== o60) {\n $ERROR(\"#60: Error matching character class \\s between character f000 and f3ff\");\n}\n\nvar i61 = \"\";\nfor (var j = 62464; j < 63488; j++)\n i61 += String.fromCharCode(j);\nvar o61 = i61;\nif (i61.replace(/\\s+/g, \"\") !== o61) {\n $ERROR(\"#61: Error matching character class \\s between character f400 and f7ff\");\n}\n\nvar i62 = \"\";\nfor (var j = 63488; j < 64512; j++)\n i62 += String.fromCharCode(j);\nvar o62 = i62;\nif (i62.replace(/\\s+/g, \"\") !== o62) {\n $ERROR(\"#62: Error matching character class \\s between character f800 and fbff\");\n}\n\nvar i63 = \"\";\nfor (var j = 64512; j < 65536; j++)\n i63 += String.fromCharCode(j);\nvar o63 = i63;\nif (i63.replace(/\\s+/g, \"\") !== o63) {\n $ERROR(\"#63: Error matching character class \\s between character fc00 and ffff\");\n}\n",
+ "id": "S15.10.2.12_A1_T1"
+ },
+ {
+ "section": "15.10.2.12, 7.2, 7.3",
+ "description": "LineTerminator",
+ "test": "//CHECK#1\nvar arr = /\\s/.exec(\"\\u000A\");\nif ((arr === null) || (arr[0] !== \"\\u000A\")) {\n $ERROR('#1: var arr = /\\\\s/.exec(\"\\\\u000A\"); arr[0] === \"\\\\u000A\". Actual. ' + (arr && arr[0]));\n}\n\n//CHECK#2\nvar arr = /\\s/.exec(\"\\u000D\");\nif ((arr === null) || (arr[0] !== \"\\u000D\")) {\n $ERROR('#2: var arr = /\\\\s/.exec(\"\\\\u000D\"); arr[0] === \"\\\\u000D\". Actual. ' + (arr && arr[0]));\n} \n\n//CHECK#3\nvar arr = /\\s/.exec(\"\\u2028\");\nif ((arr === null) || (arr[0] !== \"\\u2028\")) {\n $ERROR('#3: var arr = /\\\\s/.exec(\"\\\\u2028\"); arr[0] === \"\\\\u2028\". Actual. ' + (arr && arr[0]));\n} \n\n//CHECK#4\nvar arr = /\\s/.exec(\"\\u2029\");\nif ((arr === null) || (arr[0] !== \"\\u2029\")) {\n $ERROR('#4: var arr = /\\\\s/.exec(\"\\\\u2029\"); arr[0] === \"\\\\u2029\". Actual. ' + (arr && arr[0]));\n} \n",
+ "id": "S15.10.2.12_A1_T2"
+ },
+ {
+ "section": "15.10.2.12, 7.2, 7.3",
+ "description": "ENGLISH ALPHABET",
+ "test": "var regexp_s = /\\s/;\n\n//CHECK#0041-005A\nvar result = true; \nfor (alpha = 0x0041; alpha <= 0x005A; alpha++) {\n if (regexp_s.exec(String.fromCharCode(alpha)) !== null) {\n result = false;\n }\n}\n\nif (result !== true) {\n $ERROR('#1: ENGLISH CAPITAL ALPHABET');\n} \n\n//CHECK#0061-007A\nvar result = true; \nfor (alpha = 0x0061; alpha <= 0x007A; alpha++) {\n if (regexp_s.exec(String.fromCharCode(alpha)) !== null) {\n result = false;\n }\n}\n\nif (result !== true) {\n $ERROR('#2: english small alphabet');\n} \n",
+ "id": "S15.10.2.12_A1_T3"
+ },
+ {
+ "section": "15.10.2.12, 7.2, 7.3",
+ "description": "RUSSIAN ALPHABET",
+ "test": "var regexp_s = /\\s/;\n\n//CHECK#0410-042F\nvar result = true; \nfor (alpha = 0x0410; alpha <= 0x042F; alpha++) {\n if (regexp_s.exec(String.fromCharCode(alpha)) !== null) {\n result = false;\n }\n}\n\nif (result !== true) {\n $ERROR('#1: RUSSIAN CAPITAL ALPHABET');\n}\n\n//CHECK#0430-044F\nvar result = true; \nfor (alpha = 0x0430; alpha <= 0x044F; alpha++) {\n if (regexp_s.exec(String.fromCharCode(alpha)) !== null) {\n result = false;\n }\n}\n\nif (result !== true) {\n $ERROR('#2: russian small alphabet');\n}\n",
+ "id": "S15.10.2.12_A1_T4"
+ },
+ {
+ "section": "15.10.2.12, 7.2, 7.3",
+ "description": ": Tested string is \"0123456789_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ~`!@#$%^&*()-+={[}]|\\\\:;'<,>./?\" + '\"';",
+ "test": "//CHECK#1\nvar non_s = \"0123456789_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ~`!@#$%^&*()-+={[}]|\\\\:;'<,>./?\" + '\"';\nif (/\\s/.exec(non_s) !== null) {\n $ERROR('#1: non-s');\n}\n\n//CHECK#2\nvar non_S = '\\f\\n\\r\\t\\v ';\nvar regexp_s = /\\s/g;\nvar k = 0;\nwhile (regexp_s.exec(non_S) !== null) {\n k++;\n}\n\nif (non_S.length !== k) {\n $ERROR('#2: non-S');\n} \n",
+ "id": "S15.10.2.12_A1_T5"
+ },
+ {
+ "section": "15.10.2.12, 7.2, 7.3",
+ "description": "WhiteSpace",
+ "test": "var i0 = \"\";\nfor (var j = 0; j < 1024; j++)\n i0 += String.fromCharCode(j);\nvar o0 = \"\\u0009\\u000A\\u000B\\u000C\\u000D\\u0020\\u00A0\";\nif (i0.replace(/\\S+/g, \"\") !== o0) {\n $ERROR(\"#0: Error matching character class \\S between character 0 and 3ff\");\n}\n\nvar i1 = \"\";\nfor (var j = 1024; j < 2048; j++)\n i1 += String.fromCharCode(j);\nvar o1 = \"\";\nif (i1.replace(/\\S+/g, \"\") !== o1) {\n $ERROR(\"#1: Error matching character class \\S between character 400 and 7ff\");\n}\n\nvar i2 = \"\";\nfor (var j = 2048; j < 3072; j++)\n i2 += String.fromCharCode(j);\nvar o2 = \"\";\nif (i2.replace(/\\S+/g, \"\") !== o2) {\n $ERROR(\"#2: Error matching character class \\S between character 800 and bff\");\n}\n\nvar i3 = \"\";\nfor (var j = 3072; j < 4096; j++)\n i3 += String.fromCharCode(j);\nvar o3 = \"\";\nif (i3.replace(/\\S+/g, \"\") !== o3) {\n $ERROR(\"#3: Error matching character class \\S between character c00 and fff\");\n}\n\nvar i4 = \"\";\nfor (var j = 4096; j < 5120; j++)\n i4 += String.fromCharCode(j);\nvar o4 = \"\";\nif (i4.replace(/\\S+/g, \"\") !== o4) {\n $ERROR(\"#4: Error matching character class \\S between character 1000 and 13ff\");\n}\n\nvar i5 = \"\";\nfor (var j = 5120; j < 6144; j++)\n i5 += String.fromCharCode(j);\nvar o5 = \"\\u1680\";\nif (i5.replace(/\\S+/g, \"\") !== o5) {\n $ERROR(\"#5: Error matching character class \\S between character 1400 and 17ff\");\n}\n\nvar i6 = \"\";\nfor (var j = 6144; j < 7168; j++)\n i6 += String.fromCharCode(j);\nvar o6 = \"\\u180E\";\nif (i6.replace(/\\S+/g, \"\") !== o6) {\n $ERROR(\"#6: Error matching character class \\S between character 1800 and 1bff\");\n}\n\nvar i7 = \"\";\nfor (var j = 7168; j < 8192; j++)\n i7 += String.fromCharCode(j);\nvar o7 = \"\";\nif (i7.replace(/\\S+/g, \"\") !== o7) {\n $ERROR(\"#7: Error matching character class \\S between character 1c00 and 1fff\");\n}\n\nvar i8 = \"\";\nfor (var j = 8192; j < 9216; j++)\n i8 += String.fromCharCode(j);\nvar o8 = \"\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u2028\\u2029\\u202F\\u205F\";\nif (i8.replace(/\\S+/g, \"\") !== o8) {\n $ERROR(\"#8: Error matching character class \\S between character 2000 and 23ff\");\n}\n\nvar i9 = \"\";\nfor (var j = 9216; j < 10240; j++)\n i9 += String.fromCharCode(j);\nvar o9 = \"\";\nif (i9.replace(/\\S+/g, \"\") !== o9) {\n $ERROR(\"#9: Error matching character class \\S between character 2400 and 27ff\");\n}\n\nvar i10 = \"\";\nfor (var j = 10240; j < 11264; j++)\n i10 += String.fromCharCode(j);\nvar o10 = \"\";\nif (i10.replace(/\\S+/g, \"\") !== o10) {\n $ERROR(\"#10: Error matching character class \\S between character 2800 and 2bff\");\n}\n\nvar i11 = \"\";\nfor (var j = 11264; j < 12288; j++)\n i11 += String.fromCharCode(j);\nvar o11 = \"\";\nif (i11.replace(/\\S+/g, \"\") !== o11) {\n $ERROR(\"#11: Error matching character class \\S between character 2c00 and 2fff\");\n}\n\nvar i12 = \"\";\nfor (var j = 12288; j < 13312; j++)\n i12 += String.fromCharCode(j);\nvar o12 = \"\\u3000\";\nif (i12.replace(/\\S+/g, \"\") !== o12) {\n $ERROR(\"#12: Error matching character class \\S between character 3000 and 33ff\");\n}\n\nvar i13 = \"\";\nfor (var j = 13312; j < 14336; j++)\n i13 += String.fromCharCode(j);\nvar o13 = \"\";\nif (i13.replace(/\\S+/g, \"\") !== o13) {\n $ERROR(\"#13: Error matching character class \\S between character 3400 and 37ff\");\n}\n\nvar i14 = \"\";\nfor (var j = 14336; j < 15360; j++)\n i14 += String.fromCharCode(j);\nvar o14 = \"\";\nif (i14.replace(/\\S+/g, \"\") !== o14) {\n $ERROR(\"#14: Error matching character class \\S between character 3800 and 3bff\");\n}\n\nvar i15 = \"\";\nfor (var j = 15360; j < 16384; j++)\n i15 += String.fromCharCode(j);\nvar o15 = \"\";\nif (i15.replace(/\\S+/g, \"\") !== o15) {\n $ERROR(\"#15: Error matching character class \\S between character 3c00 and 3fff\");\n}\n\nvar i16 = \"\";\nfor (var j = 16384; j < 17408; j++)\n i16 += String.fromCharCode(j);\nvar o16 = \"\";\nif (i16.replace(/\\S+/g, \"\") !== o16) {\n $ERROR(\"#16: Error matching character class \\S between character 4000 and 43ff\");\n}\n\nvar i17 = \"\";\nfor (var j = 17408; j < 18432; j++)\n i17 += String.fromCharCode(j);\nvar o17 = \"\";\nif (i17.replace(/\\S+/g, \"\") !== o17) {\n $ERROR(\"#17: Error matching character class \\S between character 4400 and 47ff\");\n}\n\nvar i18 = \"\";\nfor (var j = 18432; j < 19456; j++)\n i18 += String.fromCharCode(j);\nvar o18 = \"\";\nif (i18.replace(/\\S+/g, \"\") !== o18) {\n $ERROR(\"#18: Error matching character class \\S between character 4800 and 4bff\");\n}\n\nvar i19 = \"\";\nfor (var j = 19456; j < 20480; j++)\n i19 += String.fromCharCode(j);\nvar o19 = \"\";\nif (i19.replace(/\\S+/g, \"\") !== o19) {\n $ERROR(\"#19: Error matching character class \\S between character 4c00 and 4fff\");\n}\n\nvar i20 = \"\";\nfor (var j = 20480; j < 21504; j++)\n i20 += String.fromCharCode(j);\nvar o20 = \"\";\nif (i20.replace(/\\S+/g, \"\") !== o20) {\n $ERROR(\"#20: Error matching character class \\S between character 5000 and 53ff\");\n}\n\nvar i21 = \"\";\nfor (var j = 21504; j < 22528; j++)\n i21 += String.fromCharCode(j);\nvar o21 = \"\";\nif (i21.replace(/\\S+/g, \"\") !== o21) {\n $ERROR(\"#21: Error matching character class \\S between character 5400 and 57ff\");\n}\n\nvar i22 = \"\";\nfor (var j = 22528; j < 23552; j++)\n i22 += String.fromCharCode(j);\nvar o22 = \"\";\nif (i22.replace(/\\S+/g, \"\") !== o22) {\n $ERROR(\"#22: Error matching character class \\S between character 5800 and 5bff\");\n}\n\nvar i23 = \"\";\nfor (var j = 23552; j < 24576; j++)\n i23 += String.fromCharCode(j);\nvar o23 = \"\";\nif (i23.replace(/\\S+/g, \"\") !== o23) {\n $ERROR(\"#23: Error matching character class \\S between character 5c00 and 5fff\");\n}\n\nvar i24 = \"\";\nfor (var j = 24576; j < 25600; j++)\n i24 += String.fromCharCode(j);\nvar o24 = \"\";\nif (i24.replace(/\\S+/g, \"\") !== o24) {\n $ERROR(\"#24: Error matching character class \\S between character 6000 and 63ff\");\n}\n\nvar i25 = \"\";\nfor (var j = 25600; j < 26624; j++)\n i25 += String.fromCharCode(j);\nvar o25 = \"\";\nif (i25.replace(/\\S+/g, \"\") !== o25) {\n $ERROR(\"#25: Error matching character class \\S between character 6400 and 67ff\");\n}\n\nvar i26 = \"\";\nfor (var j = 26624; j < 27648; j++)\n i26 += String.fromCharCode(j);\nvar o26 = \"\";\nif (i26.replace(/\\S+/g, \"\") !== o26) {\n $ERROR(\"#26: Error matching character class \\S between character 6800 and 6bff\");\n}\n\nvar i27 = \"\";\nfor (var j = 27648; j < 28672; j++)\n i27 += String.fromCharCode(j);\nvar o27 = \"\";\nif (i27.replace(/\\S+/g, \"\") !== o27) {\n $ERROR(\"#27: Error matching character class \\S between character 6c00 and 6fff\");\n}\n\nvar i28 = \"\";\nfor (var j = 28672; j < 29696; j++)\n i28 += String.fromCharCode(j);\nvar o28 = \"\";\nif (i28.replace(/\\S+/g, \"\") !== o28) {\n $ERROR(\"#28: Error matching character class \\S between character 7000 and 73ff\");\n}\n\nvar i29 = \"\";\nfor (var j = 29696; j < 30720; j++)\n i29 += String.fromCharCode(j);\nvar o29 = \"\";\nif (i29.replace(/\\S+/g, \"\") !== o29) {\n $ERROR(\"#29: Error matching character class \\S between character 7400 and 77ff\");\n}\n\nvar i30 = \"\";\nfor (var j = 30720; j < 31744; j++)\n i30 += String.fromCharCode(j);\nvar o30 = \"\";\nif (i30.replace(/\\S+/g, \"\") !== o30) {\n $ERROR(\"#30: Error matching character class \\S between character 7800 and 7bff\");\n}\n\nvar i31 = \"\";\nfor (var j = 31744; j < 32768; j++)\n i31 += String.fromCharCode(j);\nvar o31 = \"\";\nif (i31.replace(/\\S+/g, \"\") !== o31) {\n $ERROR(\"#31: Error matching character class \\S between character 7c00 and 7fff\");\n}\n\nvar i32 = \"\";\nfor (var j = 32768; j < 33792; j++)\n i32 += String.fromCharCode(j);\nvar o32 = \"\";\nif (i32.replace(/\\S+/g, \"\") !== o32) {\n $ERROR(\"#32: Error matching character class \\S between character 8000 and 83ff\");\n}\n\nvar i33 = \"\";\nfor (var j = 33792; j < 34816; j++)\n i33 += String.fromCharCode(j);\nvar o33 = \"\";\nif (i33.replace(/\\S+/g, \"\") !== o33) {\n $ERROR(\"#33: Error matching character class \\S between character 8400 and 87ff\");\n}\n\nvar i34 = \"\";\nfor (var j = 34816; j < 35840; j++)\n i34 += String.fromCharCode(j);\nvar o34 = \"\";\nif (i34.replace(/\\S+/g, \"\") !== o34) {\n $ERROR(\"#34: Error matching character class \\S between character 8800 and 8bff\");\n}\n\nvar i35 = \"\";\nfor (var j = 35840; j < 36864; j++)\n i35 += String.fromCharCode(j);\nvar o35 = \"\";\nif (i35.replace(/\\S+/g, \"\") !== o35) {\n $ERROR(\"#35: Error matching character class \\S between character 8c00 and 8fff\");\n}\n\nvar i36 = \"\";\nfor (var j = 36864; j < 37888; j++)\n i36 += String.fromCharCode(j);\nvar o36 = \"\";\nif (i36.replace(/\\S+/g, \"\") !== o36) {\n $ERROR(\"#36: Error matching character class \\S between character 9000 and 93ff\");\n}\n\nvar i37 = \"\";\nfor (var j = 37888; j < 38912; j++)\n i37 += String.fromCharCode(j);\nvar o37 = \"\";\nif (i37.replace(/\\S+/g, \"\") !== o37) {\n $ERROR(\"#37: Error matching character class \\S between character 9400 and 97ff\");\n}\n\nvar i38 = \"\";\nfor (var j = 38912; j < 39936; j++)\n i38 += String.fromCharCode(j);\nvar o38 = \"\";\nif (i38.replace(/\\S+/g, \"\") !== o38) {\n $ERROR(\"#38: Error matching character class \\S between character 9800 and 9bff\");\n}\n\nvar i39 = \"\";\nfor (var j = 39936; j < 40960; j++)\n i39 += String.fromCharCode(j);\nvar o39 = \"\";\nif (i39.replace(/\\S+/g, \"\") !== o39) {\n $ERROR(\"#39: Error matching character class \\S between character 9c00 and 9fff\");\n}\n\nvar i40 = \"\";\nfor (var j = 40960; j < 41984; j++)\n i40 += String.fromCharCode(j);\nvar o40 = \"\";\nif (i40.replace(/\\S+/g, \"\") !== o40) {\n $ERROR(\"#40: Error matching character class \\S between character a000 and a3ff\");\n}\n\nvar i41 = \"\";\nfor (var j = 41984; j < 43008; j++)\n i41 += String.fromCharCode(j);\nvar o41 = \"\";\nif (i41.replace(/\\S+/g, \"\") !== o41) {\n $ERROR(\"#41: Error matching character class \\S between character a400 and a7ff\");\n}\n\nvar i42 = \"\";\nfor (var j = 43008; j < 44032; j++)\n i42 += String.fromCharCode(j);\nvar o42 = \"\";\nif (i42.replace(/\\S+/g, \"\") !== o42) {\n $ERROR(\"#42: Error matching character class \\S between character a800 and abff\");\n}\n\nvar i43 = \"\";\nfor (var j = 44032; j < 45056; j++)\n i43 += String.fromCharCode(j);\nvar o43 = \"\";\nif (i43.replace(/\\S+/g, \"\") !== o43) {\n $ERROR(\"#43: Error matching character class \\S between character ac00 and afff\");\n}\n\nvar i44 = \"\";\nfor (var j = 45056; j < 46080; j++)\n i44 += String.fromCharCode(j);\nvar o44 = \"\";\nif (i44.replace(/\\S+/g, \"\") !== o44) {\n $ERROR(\"#44: Error matching character class \\S between character b000 and b3ff\");\n}\n\nvar i45 = \"\";\nfor (var j = 46080; j < 47104; j++)\n i45 += String.fromCharCode(j);\nvar o45 = \"\";\nif (i45.replace(/\\S+/g, \"\") !== o45) {\n $ERROR(\"#45: Error matching character class \\S between character b400 and b7ff\");\n}\n\nvar i46 = \"\";\nfor (var j = 47104; j < 48128; j++)\n i46 += String.fromCharCode(j);\nvar o46 = \"\";\nif (i46.replace(/\\S+/g, \"\") !== o46) {\n $ERROR(\"#46: Error matching character class \\S between character b800 and bbff\");\n}\n\nvar i47 = \"\";\nfor (var j = 48128; j < 49152; j++)\n i47 += String.fromCharCode(j);\nvar o47 = \"\";\nif (i47.replace(/\\S+/g, \"\") !== o47) {\n $ERROR(\"#47: Error matching character class \\S between character bc00 and bfff\");\n}\n\nvar i48 = \"\";\nfor (var j = 49152; j < 50176; j++)\n i48 += String.fromCharCode(j);\nvar o48 = \"\";\nif (i48.replace(/\\S+/g, \"\") !== o48) {\n $ERROR(\"#48: Error matching character class \\S between character c000 and c3ff\");\n}\n\nvar i49 = \"\";\nfor (var j = 50176; j < 51200; j++)\n i49 += String.fromCharCode(j);\nvar o49 = \"\";\nif (i49.replace(/\\S+/g, \"\") !== o49) {\n $ERROR(\"#49: Error matching character class \\S between character c400 and c7ff\");\n}\n\nvar i50 = \"\";\nfor (var j = 51200; j < 52224; j++)\n i50 += String.fromCharCode(j);\nvar o50 = \"\";\nif (i50.replace(/\\S+/g, \"\") !== o50) {\n $ERROR(\"#50: Error matching character class \\S between character c800 and cbff\");\n}\n\nvar i51 = \"\";\nfor (var j = 52224; j < 53248; j++)\n i51 += String.fromCharCode(j);\nvar o51 = \"\";\nif (i51.replace(/\\S+/g, \"\") !== o51) {\n $ERROR(\"#51: Error matching character class \\S between character cc00 and cfff\");\n}\n\nvar i52 = \"\";\nfor (var j = 53248; j < 54272; j++)\n i52 += String.fromCharCode(j);\nvar o52 = \"\";\nif (i52.replace(/\\S+/g, \"\") !== o52) {\n $ERROR(\"#52: Error matching character class \\S between character d000 and d3ff\");\n}\n\nvar i53 = \"\";\nfor (var j = 54272; j < 55296; j++)\n i53 += String.fromCharCode(j);\nvar o53 = \"\";\nif (i53.replace(/\\S+/g, \"\") !== o53) {\n $ERROR(\"#53: Error matching character class \\S between character d400 and d7ff\");\n}\n\nvar i54 = \"\";\nfor (var j = 55296; j < 56320; j++)\n i54 += String.fromCharCode(j);\nvar o54 = \"\";\nif (i54.replace(/\\S+/g, \"\") !== o54) {\n $ERROR(\"#54: Error matching character class \\S between character d800 and dbff\");\n}\n\nvar i55 = \"\";\nfor (var j = 56320; j < 57344; j++)\n i55 += String.fromCharCode(j);\nvar o55 = \"\";\nif (i55.replace(/\\S+/g, \"\") !== o55) {\n $ERROR(\"#55: Error matching character class \\S between character dc00 and dfff\");\n}\n\nvar i56 = \"\";\nfor (var j = 57344; j < 58368; j++)\n i56 += String.fromCharCode(j);\nvar o56 = \"\";\nif (i56.replace(/\\S+/g, \"\") !== o56) {\n $ERROR(\"#56: Error matching character class \\S between character e000 and e3ff\");\n}\n\nvar i57 = \"\";\nfor (var j = 58368; j < 59392; j++)\n i57 += String.fromCharCode(j);\nvar o57 = \"\";\nif (i57.replace(/\\S+/g, \"\") !== o57) {\n $ERROR(\"#57: Error matching character class \\S between character e400 and e7ff\");\n}\n\nvar i58 = \"\";\nfor (var j = 59392; j < 60416; j++)\n i58 += String.fromCharCode(j);\nvar o58 = \"\";\nif (i58.replace(/\\S+/g, \"\") !== o58) {\n $ERROR(\"#58: Error matching character class \\S between character e800 and ebff\");\n}\n\nvar i59 = \"\";\nfor (var j = 60416; j < 61440; j++)\n i59 += String.fromCharCode(j);\nvar o59 = \"\";\nif (i59.replace(/\\S+/g, \"\") !== o59) {\n $ERROR(\"#59: Error matching character class \\S between character ec00 and efff\");\n}\n\nvar i60 = \"\";\nfor (var j = 61440; j < 62464; j++)\n i60 += String.fromCharCode(j);\nvar o60 = \"\";\nif (i60.replace(/\\S+/g, \"\") !== o60) {\n $ERROR(\"#60: Error matching character class \\S between character f000 and f3ff\");\n}\n\nvar i61 = \"\";\nfor (var j = 62464; j < 63488; j++)\n i61 += String.fromCharCode(j);\nvar o61 = \"\";\nif (i61.replace(/\\S+/g, \"\") !== o61) {\n $ERROR(\"#61: Error matching character class \\S between character f400 and f7ff\");\n}\n\nvar i62 = \"\";\nfor (var j = 63488; j < 64512; j++)\n i62 += String.fromCharCode(j);\nvar o62 = \"\";\nif (i62.replace(/\\S+/g, \"\") !== o62) {\n $ERROR(\"#62: Error matching character class \\S between character f800 and fbff\");\n}\n\nvar i63 = \"\";\nfor (var j = 64512; j < 65536; j++)\n i63 += String.fromCharCode(j);\nvar o63 = \"\";\nif (i63.replace(/\\S+/g, \"\") !== o63) {\n $ERROR(\"#63: Error matching character class \\S between character fc00 and ffff\");\n}\n",
+ "id": "S15.10.2.12_A2_T1"
+ },
+ {
+ "section": "15.10.2.12, 7.2, 7.3",
+ "description": "LineTerminator",
+ "test": "//CHECK#1\nvar arr = /\\S/.exec(\"\\u000A\");\nif (arr !== null) {\n $ERROR('#1: var arr = /\\\\S/.exec(\"\\\\u000A\"); arr[0] === \"\\\\u000A\". Actual. ' + (arr && arr[0]));\n}\n\n//CHECK#2\nvar arr = /\\S/.exec(\"\\u000D\");\nif (arr !== null) {\n $ERROR('#2: var arr = /\\\\S/.exec(\"\\\\u000D\"); arr[0] === \"\\\\u000D\". Actual. ' + (arr && arr[0]));\n} \n\n//CHECK#3\nvar arr = /\\S/.exec(\"\\u2028\");\nif (arr !== null) {\n $ERROR('#3: var arr = /\\\\S/.exec(\"\\\\u2028\"); arr[0] === \"\\\\u2028\". Actual. ' + (arr && arr[0]));\n} \n\n//CHECK#4\nvar arr = /\\S/.exec(\"\\u2029\");\nif (arr !== null) {\n $ERROR('#4: var arr = /\\\\S/.exec(\"\\\\u2029\"); arr[0] === \"\\\\u2029\". Actual. ' + (arr && arr[0]));\n} \n",
+ "id": "S15.10.2.12_A2_T2"
+ },
+ {
+ "section": "15.10.2.12, 7.2, 7.3",
+ "description": "ENGLISH ALPHABET",
+ "test": "var regexp_S = /\\S/;\n\n//CHECK#0041-005A\nvar result = true;\nfor (alpha = 0x0041; alpha <= 0x005A; alpha++) {\n str = String.fromCharCode(alpha);\n arr = regexp_S.exec(str); \n if ((arr === null) || (arr[0] !== str)) {\n result = false;\n }\n}\n\nif (result !== true) {\n $ERROR('#1: ENGLISH CAPITAL ALPHABET');\n} \n\n//CHECK#0061-007A\nvar result = true; \nfor (alpha = 0x0061; alpha <= 0x007A; alpha++) {\n str = String.fromCharCode(alpha);\n arr = regexp_S.exec(str); \n if ((arr === null) || (arr[0] !== str)) {\n result = false;\n }\n}\n\nif (result !== true) {\n $ERROR('#2: english small alphabet');\n} \n",
+ "id": "S15.10.2.12_A2_T3"
+ },
+ {
+ "section": "15.10.2.12, 7.2, 7.3",
+ "description": "RUSSIAN ALPHABET",
+ "test": "var regexp_S = /\\S/;\n\n//CHECK#0410-042F \nvar result = true; \nfor (alpha = 0x0410; alpha <= 0x042F; alpha++) {\n str = String.fromCharCode(alpha);\n arr = regexp_S.exec(str); \n if ((arr === null) || (arr[0] !== str)) {\n result = false;\n }\n}\n\nif (result !== true) {\n $ERROR('#1: RUSSIAN CAPITAL ALPHABET');\n}\n\n//CHECK#0430-044F\nvar result = true; \nfor (alpha = 0x0430; alpha <= 0x044F; alpha++) {\n str = String.fromCharCode(alpha);\n arr = regexp_S.exec(str); \n if ((arr === null) || (arr[0] !== str)) {\n result = false;\n }\n}\n\nif (result !== true) {\n $ERROR('#2: russian small alphabet');\n}\n",
+ "id": "S15.10.2.12_A2_T4"
+ },
+ {
+ "section": "15.10.2.12, 7.2, 7.3",
+ "description": ": Tested string is \"0123456789_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ~`!@#$%^&*()-+={[}]|\\\\:;'<,>./?\" + '\"';",
+ "test": "//CHECK#1\nvar non_s = \"0123456789_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ~`!@#$%^&*()-+={[}]|\\\\:;'<,>./?\" + '\"';\nvar regexp_S = /\\S/g;\nvar k = 0;\nwhile (regexp_S.exec(non_s) !== null) {\n k++;\n}\n\nif (non_s.length !== k) {\n $ERROR('#1: non-s');\n} \n\n//CHECK#2\nvar non_S = '\\f\\n\\r\\t\\v ';\nif (/\\S/.exec(non_S) !== null) {\n $ERROR('#2: non-S');\n}\n",
+ "id": "S15.10.2.12_A2_T5"
+ },
+ {
+ "section": "15.10.2.12",
+ "description": "A - Z",
+ "test": "var i0 = \"\";\nfor (var j = 0; j < 256; j++)\n i0 += String.fromCharCode(j);\nvar o0 = \"\\u0000\\u0001\\u0002\\u0003\\u0004\\u0005\\u0006\\u0007\\u0008\\u0009\\u000A\\u000B\\u000C\\u000D\\u000E\\u000F\\u0010\\u0011\\u0012\\u0013\\u0014\\u0015\\u0016\\u0017\\u0018\\u0019\\u001A\\u001B\\u001C\\u001D\\u001E\\u001F\\u0020\\u0021\\u0022\\u0023\\u0024\\u0025\\u0026\\u0027\\u0028\\u0029\\u002A\\u002B\\u002C\\u002D\\u002E\\u002F\\u003A\\u003B\\u003C\\u003D\\u003E\\u003F\\u0040\\u005B\\u005C\\u005D\\u005E\\u0060\\u007B\\u007C\\u007D\\u007E\\u007F\\u0080\\u0081\\u0082\\u0083\\u0084\\u0085\\u0086\\u0087\\u0088\\u0089\\u008A\\u008B\\u008C\\u008D\\u008E\\u008F\\u0090\\u0091\\u0092\\u0093\\u0094\\u0095\\u0096\\u0097\\u0098\\u0099\\u009A\\u009B\\u009C\\u009D\\u009E\\u009F\\u00A0\\u00A1\\u00A2\\u00A3\\u00A4\\u00A5\\u00A6\\u00A7\\u00A8\\u00A9\\u00AA\\u00AB\\u00AC\\u00AD\\u00AE\\u00AF\\u00B0\\u00B1\\u00B2\\u00B3\\u00B4\\u00B5\\u00B6\\u00B7\\u00B8\\u00B9\\u00BA\\u00BB\\u00BC\\u00BD\\u00BE\\u00BF\\u00C0\\u00C1\\u00C2\\u00C3\\u00C4\\u00C5\\u00C6\\u00C7\\u00C8\\u00C9\\u00CA\\u00CB\\u00CC\\u00CD\\u00CE\\u00CF\\u00D0\\u00D1\\u00D2\\u00D3\\u00D4\\u00D5\\u00D6\\u00D7\\u00D8\\u00D9\\u00DA\\u00DB\\u00DC\\u00DD\\u00DE\\u00DF\\u00E0\\u00E1\\u00E2\\u00E3\\u00E4\\u00E5\\u00E6\\u00E7\\u00E8\\u00E9\\u00EA\\u00EB\\u00EC\\u00ED\\u00EE\\u00EF\\u00F0\\u00F1\\u00F2\\u00F3\\u00F4\\u00F5\\u00F6\\u00F7\\u00F8\\u00F9\\u00FA\\u00FB\\u00FC\\u00FD\\u00FE\\u00FF\";\nif (i0.replace(/\\w+/g, \"\") !== o0) {\n $ERROR(\"#0: Error matching character class \\w between character 0 and ff\");\n}\n\nvar i1 = \"\";\nfor (var j = 256; j < 512; j++)\n i1 += String.fromCharCode(j);\nvar o1 = i1;\nif (i1.replace(/\\w+/g, \"\") !== o1) {\n $ERROR(\"#1: Error matching character class \\w between character 100 and 1ff\");\n}\n\nvar i2 = \"\";\nfor (var j = 512; j < 768; j++)\n i2 += String.fromCharCode(j);\nvar o2 = i2;\nif (i2.replace(/\\w+/g, \"\") !== o2) {\n $ERROR(\"#2: Error matching character class \\w between character 200 and 2ff\");\n}\n\nvar i3 = \"\";\nfor (var j = 768; j < 1024; j++)\n i3 += String.fromCharCode(j);\nvar o3 = i3;\nif (i3.replace(/\\w+/g, \"\") !== o3) {\n $ERROR(\"#3: Error matching character class \\w between character 300 and 3ff\");\n}\n\nvar i4 = \"\";\nfor (var j = 1024; j < 1280; j++)\n i4 += String.fromCharCode(j);\nvar o4 = i4;\nif (i4.replace(/\\w+/g, \"\") !== o4) {\n $ERROR(\"#4: Error matching character class \\w between character 400 and 4ff\");\n}\n\nvar i5 = \"\";\nfor (var j = 1280; j < 1536; j++)\n i5 += String.fromCharCode(j);\nvar o5 = i5;\nif (i5.replace(/\\w+/g, \"\") !== o5) {\n $ERROR(\"#5: Error matching character class \\w between character 500 and 5ff\");\n}\n\nvar i6 = \"\";\nfor (var j = 1536; j < 1792; j++)\n i6 += String.fromCharCode(j);\nvar o6 = i6;\nif (i6.replace(/\\w+/g, \"\") !== o6) {\n $ERROR(\"#6: Error matching character class \\w between character 600 and 6ff\");\n}\n\nvar i7 = \"\";\nfor (var j = 1792; j < 2048; j++)\n i7 += String.fromCharCode(j);\nvar o7 = i7;\nif (i7.replace(/\\w+/g, \"\") !== o7) {\n $ERROR(\"#7: Error matching character class \\w between character 700 and 7ff\");\n}\n\nvar i8 = \"\";\nfor (var j = 2048; j < 2304; j++)\n i8 += String.fromCharCode(j);\nvar o8 = i8;\nif (i8.replace(/\\w+/g, \"\") !== o8) {\n $ERROR(\"#8: Error matching character class \\w between character 800 and 8ff\");\n}\n\nvar i9 = \"\";\nfor (var j = 2304; j < 2560; j++)\n i9 += String.fromCharCode(j);\nvar o9 = i9;\nif (i9.replace(/\\w+/g, \"\") !== o9) {\n $ERROR(\"#9: Error matching character class \\w between character 900 and 9ff\");\n}\n\nvar i10 = \"\";\nfor (var j = 2560; j < 2816; j++)\n i10 += String.fromCharCode(j);\nvar o10 = i10;\nif (i10.replace(/\\w+/g, \"\") !== o10) {\n $ERROR(\"#10: Error matching character class \\w between character a00 and aff\");\n}\n\nvar i11 = \"\";\nfor (var j = 2816; j < 3072; j++)\n i11 += String.fromCharCode(j);\nvar o11 = i11;\nif (i11.replace(/\\w+/g, \"\") !== o11) {\n $ERROR(\"#11: Error matching character class \\w between character b00 and bff\");\n}\n\nvar i12 = \"\";\nfor (var j = 3072; j < 3328; j++)\n i12 += String.fromCharCode(j);\nvar o12 = i12;\nif (i12.replace(/\\w+/g, \"\") !== o12) {\n $ERROR(\"#12: Error matching character class \\w between character c00 and cff\");\n}\n\nvar i13 = \"\";\nfor (var j = 3328; j < 3584; j++)\n i13 += String.fromCharCode(j);\nvar o13 = i13;\nif (i13.replace(/\\w+/g, \"\") !== o13) {\n $ERROR(\"#13: Error matching character class \\w between character d00 and dff\");\n}\n\nvar i14 = \"\";\nfor (var j = 3584; j < 3840; j++)\n i14 += String.fromCharCode(j);\nvar o14 = i14;\nif (i14.replace(/\\w+/g, \"\") !== o14) {\n $ERROR(\"#14: Error matching character class \\w between character e00 and eff\");\n}\n\nvar i15 = \"\";\nfor (var j = 3840; j < 4096; j++)\n i15 += String.fromCharCode(j);\nvar o15 = i15;\nif (i15.replace(/\\w+/g, \"\") !== o15) {\n $ERROR(\"#15: Error matching character class \\w between character f00 and fff\");\n}\n\nvar i16 = \"\";\nfor (var j = 4096; j < 4352; j++)\n i16 += String.fromCharCode(j);\nvar o16 = i16;\nif (i16.replace(/\\w+/g, \"\") !== o16) {\n $ERROR(\"#16: Error matching character class \\w between character 1000 and 10ff\");\n}\n\nvar i17 = \"\";\nfor (var j = 4352; j < 4608; j++)\n i17 += String.fromCharCode(j);\nvar o17 = i17;\nif (i17.replace(/\\w+/g, \"\") !== o17) {\n $ERROR(\"#17: Error matching character class \\w between character 1100 and 11ff\");\n}\n\nvar i18 = \"\";\nfor (var j = 4608; j < 4864; j++)\n i18 += String.fromCharCode(j);\nvar o18 = i18;\nif (i18.replace(/\\w+/g, \"\") !== o18) {\n $ERROR(\"#18: Error matching character class \\w between character 1200 and 12ff\");\n}\n\nvar i19 = \"\";\nfor (var j = 4864; j < 5120; j++)\n i19 += String.fromCharCode(j);\nvar o19 = i19;\nif (i19.replace(/\\w+/g, \"\") !== o19) {\n $ERROR(\"#19: Error matching character class \\w between character 1300 and 13ff\");\n}\n\nvar i20 = \"\";\nfor (var j = 5120; j < 5376; j++)\n i20 += String.fromCharCode(j);\nvar o20 = i20;\nif (i20.replace(/\\w+/g, \"\") !== o20) {\n $ERROR(\"#20: Error matching character class \\w between character 1400 and 14ff\");\n}\n\nvar i21 = \"\";\nfor (var j = 5376; j < 5632; j++)\n i21 += String.fromCharCode(j);\nvar o21 = i21;\nif (i21.replace(/\\w+/g, \"\") !== o21) {\n $ERROR(\"#21: Error matching character class \\w between character 1500 and 15ff\");\n}\n\nvar i22 = \"\";\nfor (var j = 5632; j < 5888; j++)\n i22 += String.fromCharCode(j);\nvar o22 = i22;\nif (i22.replace(/\\w+/g, \"\") !== o22) {\n $ERROR(\"#22: Error matching character class \\w between character 1600 and 16ff\");\n}\n\nvar i23 = \"\";\nfor (var j = 5888; j < 6144; j++)\n i23 += String.fromCharCode(j);\nvar o23 = i23;\nif (i23.replace(/\\w+/g, \"\") !== o23) {\n $ERROR(\"#23: Error matching character class \\w between character 1700 and 17ff\");\n}\n\nvar i24 = \"\";\nfor (var j = 6144; j < 6400; j++)\n i24 += String.fromCharCode(j);\nvar o24 = i24;\nif (i24.replace(/\\w+/g, \"\") !== o24) {\n $ERROR(\"#24: Error matching character class \\w between character 1800 and 18ff\");\n}\n\nvar i25 = \"\";\nfor (var j = 6400; j < 6656; j++)\n i25 += String.fromCharCode(j);\nvar o25 = i25;\nif (i25.replace(/\\w+/g, \"\") !== o25) {\n $ERROR(\"#25: Error matching character class \\w between character 1900 and 19ff\");\n}\n\nvar i26 = \"\";\nfor (var j = 6656; j < 6912; j++)\n i26 += String.fromCharCode(j);\nvar o26 = i26;\nif (i26.replace(/\\w+/g, \"\") !== o26) {\n $ERROR(\"#26: Error matching character class \\w between character 1a00 and 1aff\");\n}\n\nvar i27 = \"\";\nfor (var j = 6912; j < 7168; j++)\n i27 += String.fromCharCode(j);\nvar o27 = i27;\nif (i27.replace(/\\w+/g, \"\") !== o27) {\n $ERROR(\"#27: Error matching character class \\w between character 1b00 and 1bff\");\n}\n\nvar i28 = \"\";\nfor (var j = 7168; j < 7424; j++)\n i28 += String.fromCharCode(j);\nvar o28 = i28;\nif (i28.replace(/\\w+/g, \"\") !== o28) {\n $ERROR(\"#28: Error matching character class \\w between character 1c00 and 1cff\");\n}\n\nvar i29 = \"\";\nfor (var j = 7424; j < 7680; j++)\n i29 += String.fromCharCode(j);\nvar o29 = i29;\nif (i29.replace(/\\w+/g, \"\") !== o29) {\n $ERROR(\"#29: Error matching character class \\w between character 1d00 and 1dff\");\n}\n\nvar i30 = \"\";\nfor (var j = 7680; j < 7936; j++)\n i30 += String.fromCharCode(j);\nvar o30 = i30;\nif (i30.replace(/\\w+/g, \"\") !== o30) {\n $ERROR(\"#30: Error matching character class \\w between character 1e00 and 1eff\");\n}\n\nvar i31 = \"\";\nfor (var j = 7936; j < 8192; j++)\n i31 += String.fromCharCode(j);\nvar o31 = i31;\nif (i31.replace(/\\w+/g, \"\") !== o31) {\n $ERROR(\"#31: Error matching character class \\w between character 1f00 and 1fff\");\n}\n\nvar i32 = \"\";\nfor (var j = 8192; j < 8448; j++)\n i32 += String.fromCharCode(j);\nvar o32 = i32;\nif (i32.replace(/\\w+/g, \"\") !== o32) {\n $ERROR(\"#32: Error matching character class \\w between character 2000 and 20ff\");\n}\n\nvar i33 = \"\";\nfor (var j = 8448; j < 8704; j++)\n i33 += String.fromCharCode(j);\nvar o33 = i33;\nif (i33.replace(/\\w+/g, \"\") !== o33) {\n $ERROR(\"#33: Error matching character class \\w between character 2100 and 21ff\");\n}\n\nvar i34 = \"\";\nfor (var j = 8704; j < 8960; j++)\n i34 += String.fromCharCode(j);\nvar o34 = i34;\nif (i34.replace(/\\w+/g, \"\") !== o34) {\n $ERROR(\"#34: Error matching character class \\w between character 2200 and 22ff\");\n}\n\nvar i35 = \"\";\nfor (var j = 8960; j < 9216; j++)\n i35 += String.fromCharCode(j);\nvar o35 = i35;\nif (i35.replace(/\\w+/g, \"\") !== o35) {\n $ERROR(\"#35: Error matching character class \\w between character 2300 and 23ff\");\n}\n\nvar i36 = \"\";\nfor (var j = 9216; j < 9472; j++)\n i36 += String.fromCharCode(j);\nvar o36 = i36;\nif (i36.replace(/\\w+/g, \"\") !== o36) {\n $ERROR(\"#36: Error matching character class \\w between character 2400 and 24ff\");\n}\n\nvar i37 = \"\";\nfor (var j = 9472; j < 9728; j++)\n i37 += String.fromCharCode(j);\nvar o37 = i37;\nif (i37.replace(/\\w+/g, \"\") !== o37) {\n $ERROR(\"#37: Error matching character class \\w between character 2500 and 25ff\");\n}\n\nvar i38 = \"\";\nfor (var j = 9728; j < 9984; j++)\n i38 += String.fromCharCode(j);\nvar o38 = i38;\nif (i38.replace(/\\w+/g, \"\") !== o38) {\n $ERROR(\"#38: Error matching character class \\w between character 2600 and 26ff\");\n}\n\nvar i39 = \"\";\nfor (var j = 9984; j < 10240; j++)\n i39 += String.fromCharCode(j);\nvar o39 = i39;\nif (i39.replace(/\\w+/g, \"\") !== o39) {\n $ERROR(\"#39: Error matching character class \\w between character 2700 and 27ff\");\n}\n\nvar i40 = \"\";\nfor (var j = 10240; j < 10496; j++)\n i40 += String.fromCharCode(j);\nvar o40 = i40;\nif (i40.replace(/\\w+/g, \"\") !== o40) {\n $ERROR(\"#40: Error matching character class \\w between character 2800 and 28ff\");\n}\n\nvar i41 = \"\";\nfor (var j = 10496; j < 10752; j++)\n i41 += String.fromCharCode(j);\nvar o41 = i41;\nif (i41.replace(/\\w+/g, \"\") !== o41) {\n $ERROR(\"#41: Error matching character class \\w between character 2900 and 29ff\");\n}\n\nvar i42 = \"\";\nfor (var j = 10752; j < 11008; j++)\n i42 += String.fromCharCode(j);\nvar o42 = i42;\nif (i42.replace(/\\w+/g, \"\") !== o42) {\n $ERROR(\"#42: Error matching character class \\w between character 2a00 and 2aff\");\n}\n\nvar i43 = \"\";\nfor (var j = 11008; j < 11264; j++)\n i43 += String.fromCharCode(j);\nvar o43 = i43;\nif (i43.replace(/\\w+/g, \"\") !== o43) {\n $ERROR(\"#43: Error matching character class \\w between character 2b00 and 2bff\");\n}\n\nvar i44 = \"\";\nfor (var j = 11264; j < 11520; j++)\n i44 += String.fromCharCode(j);\nvar o44 = i44;\nif (i44.replace(/\\w+/g, \"\") !== o44) {\n $ERROR(\"#44: Error matching character class \\w between character 2c00 and 2cff\");\n}\n\nvar i45 = \"\";\nfor (var j = 11520; j < 11776; j++)\n i45 += String.fromCharCode(j);\nvar o45 = i45;\nif (i45.replace(/\\w+/g, \"\") !== o45) {\n $ERROR(\"#45: Error matching character class \\w between character 2d00 and 2dff\");\n}\n\nvar i46 = \"\";\nfor (var j = 11776; j < 12032; j++)\n i46 += String.fromCharCode(j);\nvar o46 = i46;\nif (i46.replace(/\\w+/g, \"\") !== o46) {\n $ERROR(\"#46: Error matching character class \\w between character 2e00 and 2eff\");\n}\n\nvar i47 = \"\";\nfor (var j = 12032; j < 12288; j++)\n i47 += String.fromCharCode(j);\nvar o47 = i47;\nif (i47.replace(/\\w+/g, \"\") !== o47) {\n $ERROR(\"#47: Error matching character class \\w between character 2f00 and 2fff\");\n}\n\nvar i48 = \"\";\nfor (var j = 12288; j < 12544; j++)\n i48 += String.fromCharCode(j);\nvar o48 = i48;\nif (i48.replace(/\\w+/g, \"\") !== o48) {\n $ERROR(\"#48: Error matching character class \\w between character 3000 and 30ff\");\n}\n\nvar i49 = \"\";\nfor (var j = 12544; j < 12800; j++)\n i49 += String.fromCharCode(j);\nvar o49 = i49;\nif (i49.replace(/\\w+/g, \"\") !== o49) {\n $ERROR(\"#49: Error matching character class \\w between character 3100 and 31ff\");\n}\n\nvar i50 = \"\";\nfor (var j = 12800; j < 13056; j++)\n i50 += String.fromCharCode(j);\nvar o50 = i50;\nif (i50.replace(/\\w+/g, \"\") !== o50) {\n $ERROR(\"#50: Error matching character class \\w between character 3200 and 32ff\");\n}\n\nvar i51 = \"\";\nfor (var j = 13056; j < 13312; j++)\n i51 += String.fromCharCode(j);\nvar o51 = i51;\nif (i51.replace(/\\w+/g, \"\") !== o51) {\n $ERROR(\"#51: Error matching character class \\w between character 3300 and 33ff\");\n}\n\nvar i52 = \"\";\nfor (var j = 13312; j < 13568; j++)\n i52 += String.fromCharCode(j);\nvar o52 = i52;\nif (i52.replace(/\\w+/g, \"\") !== o52) {\n $ERROR(\"#52: Error matching character class \\w between character 3400 and 34ff\");\n}\n\nvar i53 = \"\";\nfor (var j = 13568; j < 13824; j++)\n i53 += String.fromCharCode(j);\nvar o53 = i53;\nif (i53.replace(/\\w+/g, \"\") !== o53) {\n $ERROR(\"#53: Error matching character class \\w between character 3500 and 35ff\");\n}\n\nvar i54 = \"\";\nfor (var j = 13824; j < 14080; j++)\n i54 += String.fromCharCode(j);\nvar o54 = i54;\nif (i54.replace(/\\w+/g, \"\") !== o54) {\n $ERROR(\"#54: Error matching character class \\w between character 3600 and 36ff\");\n}\n\nvar i55 = \"\";\nfor (var j = 14080; j < 14336; j++)\n i55 += String.fromCharCode(j);\nvar o55 = i55;\nif (i55.replace(/\\w+/g, \"\") !== o55) {\n $ERROR(\"#55: Error matching character class \\w between character 3700 and 37ff\");\n}\n\nvar i56 = \"\";\nfor (var j = 14336; j < 14592; j++)\n i56 += String.fromCharCode(j);\nvar o56 = i56;\nif (i56.replace(/\\w+/g, \"\") !== o56) {\n $ERROR(\"#56: Error matching character class \\w between character 3800 and 38ff\");\n}\n\nvar i57 = \"\";\nfor (var j = 14592; j < 14848; j++)\n i57 += String.fromCharCode(j);\nvar o57 = i57;\nif (i57.replace(/\\w+/g, \"\") !== o57) {\n $ERROR(\"#57: Error matching character class \\w between character 3900 and 39ff\");\n}\n\nvar i58 = \"\";\nfor (var j = 14848; j < 15104; j++)\n i58 += String.fromCharCode(j);\nvar o58 = i58;\nif (i58.replace(/\\w+/g, \"\") !== o58) {\n $ERROR(\"#58: Error matching character class \\w between character 3a00 and 3aff\");\n}\n\nvar i59 = \"\";\nfor (var j = 15104; j < 15360; j++)\n i59 += String.fromCharCode(j);\nvar o59 = i59;\nif (i59.replace(/\\w+/g, \"\") !== o59) {\n $ERROR(\"#59: Error matching character class \\w between character 3b00 and 3bff\");\n}\n\nvar i60 = \"\";\nfor (var j = 15360; j < 15616; j++)\n i60 += String.fromCharCode(j);\nvar o60 = i60;\nif (i60.replace(/\\w+/g, \"\") !== o60) {\n $ERROR(\"#60: Error matching character class \\w between character 3c00 and 3cff\");\n}\n\nvar i61 = \"\";\nfor (var j = 15616; j < 15872; j++)\n i61 += String.fromCharCode(j);\nvar o61 = i61;\nif (i61.replace(/\\w+/g, \"\") !== o61) {\n $ERROR(\"#61: Error matching character class \\w between character 3d00 and 3dff\");\n}\n\nvar i62 = \"\";\nfor (var j = 15872; j < 16128; j++)\n i62 += String.fromCharCode(j);\nvar o62 = i62;\nif (i62.replace(/\\w+/g, \"\") !== o62) {\n $ERROR(\"#62: Error matching character class \\w between character 3e00 and 3eff\");\n}\n\nvar i63 = \"\";\nfor (var j = 16128; j < 16384; j++)\n i63 += String.fromCharCode(j);\nvar o63 = i63;\nif (i63.replace(/\\w+/g, \"\") !== o63) {\n $ERROR(\"#63: Error matching character class \\w between character 3f00 and 3fff\");\n}\n\nvar i64 = \"\";\nfor (var j = 16384; j < 16640; j++)\n i64 += String.fromCharCode(j);\nvar o64 = i64;\nif (i64.replace(/\\w+/g, \"\") !== o64) {\n $ERROR(\"#64: Error matching character class \\w between character 4000 and 40ff\");\n}\n\nvar i65 = \"\";\nfor (var j = 16640; j < 16896; j++)\n i65 += String.fromCharCode(j);\nvar o65 = i65;\nif (i65.replace(/\\w+/g, \"\") !== o65) {\n $ERROR(\"#65: Error matching character class \\w between character 4100 and 41ff\");\n}\n\nvar i66 = \"\";\nfor (var j = 16896; j < 17152; j++)\n i66 += String.fromCharCode(j);\nvar o66 = i66;\nif (i66.replace(/\\w+/g, \"\") !== o66) {\n $ERROR(\"#66: Error matching character class \\w between character 4200 and 42ff\");\n}\n\nvar i67 = \"\";\nfor (var j = 17152; j < 17408; j++)\n i67 += String.fromCharCode(j);\nvar o67 = i67;\nif (i67.replace(/\\w+/g, \"\") !== o67) {\n $ERROR(\"#67: Error matching character class \\w between character 4300 and 43ff\");\n}\n\nvar i68 = \"\";\nfor (var j = 17408; j < 17664; j++)\n i68 += String.fromCharCode(j);\nvar o68 = i68;\nif (i68.replace(/\\w+/g, \"\") !== o68) {\n $ERROR(\"#68: Error matching character class \\w between character 4400 and 44ff\");\n}\n\nvar i69 = \"\";\nfor (var j = 17664; j < 17920; j++)\n i69 += String.fromCharCode(j);\nvar o69 = i69;\nif (i69.replace(/\\w+/g, \"\") !== o69) {\n $ERROR(\"#69: Error matching character class \\w between character 4500 and 45ff\");\n}\n\nvar i70 = \"\";\nfor (var j = 17920; j < 18176; j++)\n i70 += String.fromCharCode(j);\nvar o70 = i70;\nif (i70.replace(/\\w+/g, \"\") !== o70) {\n $ERROR(\"#70: Error matching character class \\w between character 4600 and 46ff\");\n}\n\nvar i71 = \"\";\nfor (var j = 18176; j < 18432; j++)\n i71 += String.fromCharCode(j);\nvar o71 = i71;\nif (i71.replace(/\\w+/g, \"\") !== o71) {\n $ERROR(\"#71: Error matching character class \\w between character 4700 and 47ff\");\n}\n\nvar i72 = \"\";\nfor (var j = 18432; j < 18688; j++)\n i72 += String.fromCharCode(j);\nvar o72 = i72;\nif (i72.replace(/\\w+/g, \"\") !== o72) {\n $ERROR(\"#72: Error matching character class \\w between character 4800 and 48ff\");\n}\n\nvar i73 = \"\";\nfor (var j = 18688; j < 18944; j++)\n i73 += String.fromCharCode(j);\nvar o73 = i73;\nif (i73.replace(/\\w+/g, \"\") !== o73) {\n $ERROR(\"#73: Error matching character class \\w between character 4900 and 49ff\");\n}\n\nvar i74 = \"\";\nfor (var j = 18944; j < 19200; j++)\n i74 += String.fromCharCode(j);\nvar o74 = i74;\nif (i74.replace(/\\w+/g, \"\") !== o74) {\n $ERROR(\"#74: Error matching character class \\w between character 4a00 and 4aff\");\n}\n\nvar i75 = \"\";\nfor (var j = 19200; j < 19456; j++)\n i75 += String.fromCharCode(j);\nvar o75 = i75;\nif (i75.replace(/\\w+/g, \"\") !== o75) {\n $ERROR(\"#75: Error matching character class \\w between character 4b00 and 4bff\");\n}\n\nvar i76 = \"\";\nfor (var j = 19456; j < 19712; j++)\n i76 += String.fromCharCode(j);\nvar o76 = i76;\nif (i76.replace(/\\w+/g, \"\") !== o76) {\n $ERROR(\"#76: Error matching character class \\w between character 4c00 and 4cff\");\n}\n\nvar i77 = \"\";\nfor (var j = 19712; j < 19968; j++)\n i77 += String.fromCharCode(j);\nvar o77 = i77;\nif (i77.replace(/\\w+/g, \"\") !== o77) {\n $ERROR(\"#77: Error matching character class \\w between character 4d00 and 4dff\");\n}\n\nvar i78 = \"\";\nfor (var j = 19968; j < 20224; j++)\n i78 += String.fromCharCode(j);\nvar o78 = i78;\nif (i78.replace(/\\w+/g, \"\") !== o78) {\n $ERROR(\"#78: Error matching character class \\w between character 4e00 and 4eff\");\n}\n\nvar i79 = \"\";\nfor (var j = 20224; j < 20480; j++)\n i79 += String.fromCharCode(j);\nvar o79 = i79;\nif (i79.replace(/\\w+/g, \"\") !== o79) {\n $ERROR(\"#79: Error matching character class \\w between character 4f00 and 4fff\");\n}\n\nvar i80 = \"\";\nfor (var j = 20480; j < 20736; j++)\n i80 += String.fromCharCode(j);\nvar o80 = i80;\nif (i80.replace(/\\w+/g, \"\") !== o80) {\n $ERROR(\"#80: Error matching character class \\w between character 5000 and 50ff\");\n}\n\nvar i81 = \"\";\nfor (var j = 20736; j < 20992; j++)\n i81 += String.fromCharCode(j);\nvar o81 = i81;\nif (i81.replace(/\\w+/g, \"\") !== o81) {\n $ERROR(\"#81: Error matching character class \\w between character 5100 and 51ff\");\n}\n\nvar i82 = \"\";\nfor (var j = 20992; j < 21248; j++)\n i82 += String.fromCharCode(j);\nvar o82 = i82;\nif (i82.replace(/\\w+/g, \"\") !== o82) {\n $ERROR(\"#82: Error matching character class \\w between character 5200 and 52ff\");\n}\n\nvar i83 = \"\";\nfor (var j = 21248; j < 21504; j++)\n i83 += String.fromCharCode(j);\nvar o83 = i83;\nif (i83.replace(/\\w+/g, \"\") !== o83) {\n $ERROR(\"#83: Error matching character class \\w between character 5300 and 53ff\");\n}\n\nvar i84 = \"\";\nfor (var j = 21504; j < 21760; j++)\n i84 += String.fromCharCode(j);\nvar o84 = i84;\nif (i84.replace(/\\w+/g, \"\") !== o84) {\n $ERROR(\"#84: Error matching character class \\w between character 5400 and 54ff\");\n}\n\nvar i85 = \"\";\nfor (var j = 21760; j < 22016; j++)\n i85 += String.fromCharCode(j);\nvar o85 = i85;\nif (i85.replace(/\\w+/g, \"\") !== o85) {\n $ERROR(\"#85: Error matching character class \\w between character 5500 and 55ff\");\n}\n\nvar i86 = \"\";\nfor (var j = 22016; j < 22272; j++)\n i86 += String.fromCharCode(j);\nvar o86 = i86;\nif (i86.replace(/\\w+/g, \"\") !== o86) {\n $ERROR(\"#86: Error matching character class \\w between character 5600 and 56ff\");\n}\n\nvar i87 = \"\";\nfor (var j = 22272; j < 22528; j++)\n i87 += String.fromCharCode(j);\nvar o87 = i87;\nif (i87.replace(/\\w+/g, \"\") !== o87) {\n $ERROR(\"#87: Error matching character class \\w between character 5700 and 57ff\");\n}\n\nvar i88 = \"\";\nfor (var j = 22528; j < 22784; j++)\n i88 += String.fromCharCode(j);\nvar o88 = i88;\nif (i88.replace(/\\w+/g, \"\") !== o88) {\n $ERROR(\"#88: Error matching character class \\w between character 5800 and 58ff\");\n}\n\nvar i89 = \"\";\nfor (var j = 22784; j < 23040; j++)\n i89 += String.fromCharCode(j);\nvar o89 = i89;\nif (i89.replace(/\\w+/g, \"\") !== o89) {\n $ERROR(\"#89: Error matching character class \\w between character 5900 and 59ff\");\n}\n\nvar i90 = \"\";\nfor (var j = 23040; j < 23296; j++)\n i90 += String.fromCharCode(j);\nvar o90 = i90;\nif (i90.replace(/\\w+/g, \"\") !== o90) {\n $ERROR(\"#90: Error matching character class \\w between character 5a00 and 5aff\");\n}\n\nvar i91 = \"\";\nfor (var j = 23296; j < 23552; j++)\n i91 += String.fromCharCode(j);\nvar o91 = i91;\nif (i91.replace(/\\w+/g, \"\") !== o91) {\n $ERROR(\"#91: Error matching character class \\w between character 5b00 and 5bff\");\n}\n\nvar i92 = \"\";\nfor (var j = 23552; j < 23808; j++)\n i92 += String.fromCharCode(j);\nvar o92 = i92;\nif (i92.replace(/\\w+/g, \"\") !== o92) {\n $ERROR(\"#92: Error matching character class \\w between character 5c00 and 5cff\");\n}\n\nvar i93 = \"\";\nfor (var j = 23808; j < 24064; j++)\n i93 += String.fromCharCode(j);\nvar o93 = i93;\nif (i93.replace(/\\w+/g, \"\") !== o93) {\n $ERROR(\"#93: Error matching character class \\w between character 5d00 and 5dff\");\n}\n\nvar i94 = \"\";\nfor (var j = 24064; j < 24320; j++)\n i94 += String.fromCharCode(j);\nvar o94 = i94;\nif (i94.replace(/\\w+/g, \"\") !== o94) {\n $ERROR(\"#94: Error matching character class \\w between character 5e00 and 5eff\");\n}\n\nvar i95 = \"\";\nfor (var j = 24320; j < 24576; j++)\n i95 += String.fromCharCode(j);\nvar o95 = i95;\nif (i95.replace(/\\w+/g, \"\") !== o95) {\n $ERROR(\"#95: Error matching character class \\w between character 5f00 and 5fff\");\n}\n\nvar i96 = \"\";\nfor (var j = 24576; j < 24832; j++)\n i96 += String.fromCharCode(j);\nvar o96 = i96;\nif (i96.replace(/\\w+/g, \"\") !== o96) {\n $ERROR(\"#96: Error matching character class \\w between character 6000 and 60ff\");\n}\n\nvar i97 = \"\";\nfor (var j = 24832; j < 25088; j++)\n i97 += String.fromCharCode(j);\nvar o97 = i97;\nif (i97.replace(/\\w+/g, \"\") !== o97) {\n $ERROR(\"#97: Error matching character class \\w between character 6100 and 61ff\");\n}\n\nvar i98 = \"\";\nfor (var j = 25088; j < 25344; j++)\n i98 += String.fromCharCode(j);\nvar o98 = i98;\nif (i98.replace(/\\w+/g, \"\") !== o98) {\n $ERROR(\"#98: Error matching character class \\w between character 6200 and 62ff\");\n}\n\nvar i99 = \"\";\nfor (var j = 25344; j < 25600; j++)\n i99 += String.fromCharCode(j);\nvar o99 = i99;\nif (i99.replace(/\\w+/g, \"\") !== o99) {\n $ERROR(\"#99: Error matching character class \\w between character 6300 and 63ff\");\n}\n\nvar i100 = \"\";\nfor (var j = 25600; j < 25856; j++)\n i100 += String.fromCharCode(j);\nvar o100 = i100;\nif (i100.replace(/\\w+/g, \"\") !== o100) {\n $ERROR(\"#100: Error matching character class \\w between character 6400 and 64ff\");\n}\n\nvar i101 = \"\";\nfor (var j = 25856; j < 26112; j++)\n i101 += String.fromCharCode(j);\nvar o101 = i101;\nif (i101.replace(/\\w+/g, \"\") !== o101) {\n $ERROR(\"#101: Error matching character class \\w between character 6500 and 65ff\");\n}\n\nvar i102 = \"\";\nfor (var j = 26112; j < 26368; j++)\n i102 += String.fromCharCode(j);\nvar o102 = i102;\nif (i102.replace(/\\w+/g, \"\") !== o102) {\n $ERROR(\"#102: Error matching character class \\w between character 6600 and 66ff\");\n}\n\nvar i103 = \"\";\nfor (var j = 26368; j < 26624; j++)\n i103 += String.fromCharCode(j);\nvar o103 = i103;\nif (i103.replace(/\\w+/g, \"\") !== o103) {\n $ERROR(\"#103: Error matching character class \\w between character 6700 and 67ff\");\n}\n\nvar i104 = \"\";\nfor (var j = 26624; j < 26880; j++)\n i104 += String.fromCharCode(j);\nvar o104 = i104;\nif (i104.replace(/\\w+/g, \"\") !== o104) {\n $ERROR(\"#104: Error matching character class \\w between character 6800 and 68ff\");\n}\n\nvar i105 = \"\";\nfor (var j = 26880; j < 27136; j++)\n i105 += String.fromCharCode(j);\nvar o105 = i105;\nif (i105.replace(/\\w+/g, \"\") !== o105) {\n $ERROR(\"#105: Error matching character class \\w between character 6900 and 69ff\");\n}\n\nvar i106 = \"\";\nfor (var j = 27136; j < 27392; j++)\n i106 += String.fromCharCode(j);\nvar o106 = i106;\nif (i106.replace(/\\w+/g, \"\") !== o106) {\n $ERROR(\"#106: Error matching character class \\w between character 6a00 and 6aff\");\n}\n\nvar i107 = \"\";\nfor (var j = 27392; j < 27648; j++)\n i107 += String.fromCharCode(j);\nvar o107 = i107;\nif (i107.replace(/\\w+/g, \"\") !== o107) {\n $ERROR(\"#107: Error matching character class \\w between character 6b00 and 6bff\");\n}\n\nvar i108 = \"\";\nfor (var j = 27648; j < 27904; j++)\n i108 += String.fromCharCode(j);\nvar o108 = i108;\nif (i108.replace(/\\w+/g, \"\") !== o108) {\n $ERROR(\"#108: Error matching character class \\w between character 6c00 and 6cff\");\n}\n\nvar i109 = \"\";\nfor (var j = 27904; j < 28160; j++)\n i109 += String.fromCharCode(j);\nvar o109 = i109;\nif (i109.replace(/\\w+/g, \"\") !== o109) {\n $ERROR(\"#109: Error matching character class \\w between character 6d00 and 6dff\");\n}\n\nvar i110 = \"\";\nfor (var j = 28160; j < 28416; j++)\n i110 += String.fromCharCode(j);\nvar o110 = i110;\nif (i110.replace(/\\w+/g, \"\") !== o110) {\n $ERROR(\"#110: Error matching character class \\w between character 6e00 and 6eff\");\n}\n\nvar i111 = \"\";\nfor (var j = 28416; j < 28672; j++)\n i111 += String.fromCharCode(j);\nvar o111 = i111;\nif (i111.replace(/\\w+/g, \"\") !== o111) {\n $ERROR(\"#111: Error matching character class \\w between character 6f00 and 6fff\");\n}\n\nvar i112 = \"\";\nfor (var j = 28672; j < 28928; j++)\n i112 += String.fromCharCode(j);\nvar o112 = i112;\nif (i112.replace(/\\w+/g, \"\") !== o112) {\n $ERROR(\"#112: Error matching character class \\w between character 7000 and 70ff\");\n}\n\nvar i113 = \"\";\nfor (var j = 28928; j < 29184; j++)\n i113 += String.fromCharCode(j);\nvar o113 = i113;\nif (i113.replace(/\\w+/g, \"\") !== o113) {\n $ERROR(\"#113: Error matching character class \\w between character 7100 and 71ff\");\n}\n\nvar i114 = \"\";\nfor (var j = 29184; j < 29440; j++)\n i114 += String.fromCharCode(j);\nvar o114 = i114;\nif (i114.replace(/\\w+/g, \"\") !== o114) {\n $ERROR(\"#114: Error matching character class \\w between character 7200 and 72ff\");\n}\n\nvar i115 = \"\";\nfor (var j = 29440; j < 29696; j++)\n i115 += String.fromCharCode(j);\nvar o115 = i115;\nif (i115.replace(/\\w+/g, \"\") !== o115) {\n $ERROR(\"#115: Error matching character class \\w between character 7300 and 73ff\");\n}\n\nvar i116 = \"\";\nfor (var j = 29696; j < 29952; j++)\n i116 += String.fromCharCode(j);\nvar o116 = i116;\nif (i116.replace(/\\w+/g, \"\") !== o116) {\n $ERROR(\"#116: Error matching character class \\w between character 7400 and 74ff\");\n}\n\nvar i117 = \"\";\nfor (var j = 29952; j < 30208; j++)\n i117 += String.fromCharCode(j);\nvar o117 = i117;\nif (i117.replace(/\\w+/g, \"\") !== o117) {\n $ERROR(\"#117: Error matching character class \\w between character 7500 and 75ff\");\n}\n\nvar i118 = \"\";\nfor (var j = 30208; j < 30464; j++)\n i118 += String.fromCharCode(j);\nvar o118 = i118;\nif (i118.replace(/\\w+/g, \"\") !== o118) {\n $ERROR(\"#118: Error matching character class \\w between character 7600 and 76ff\");\n}\n\nvar i119 = \"\";\nfor (var j = 30464; j < 30720; j++)\n i119 += String.fromCharCode(j);\nvar o119 = i119;\nif (i119.replace(/\\w+/g, \"\") !== o119) {\n $ERROR(\"#119: Error matching character class \\w between character 7700 and 77ff\");\n}\n\nvar i120 = \"\";\nfor (var j = 30720; j < 30976; j++)\n i120 += String.fromCharCode(j);\nvar o120 = i120;\nif (i120.replace(/\\w+/g, \"\") !== o120) {\n $ERROR(\"#120: Error matching character class \\w between character 7800 and 78ff\");\n}\n\nvar i121 = \"\";\nfor (var j = 30976; j < 31232; j++)\n i121 += String.fromCharCode(j);\nvar o121 = i121;\nif (i121.replace(/\\w+/g, \"\") !== o121) {\n $ERROR(\"#121: Error matching character class \\w between character 7900 and 79ff\");\n}\n\nvar i122 = \"\";\nfor (var j = 31232; j < 31488; j++)\n i122 += String.fromCharCode(j);\nvar o122 = i122;\nif (i122.replace(/\\w+/g, \"\") !== o122) {\n $ERROR(\"#122: Error matching character class \\w between character 7a00 and 7aff\");\n}\n\nvar i123 = \"\";\nfor (var j = 31488; j < 31744; j++)\n i123 += String.fromCharCode(j);\nvar o123 = i123;\nif (i123.replace(/\\w+/g, \"\") !== o123) {\n $ERROR(\"#123: Error matching character class \\w between character 7b00 and 7bff\");\n}\n\nvar i124 = \"\";\nfor (var j = 31744; j < 32000; j++)\n i124 += String.fromCharCode(j);\nvar o124 = i124;\nif (i124.replace(/\\w+/g, \"\") !== o124) {\n $ERROR(\"#124: Error matching character class \\w between character 7c00 and 7cff\");\n}\n\nvar i125 = \"\";\nfor (var j = 32000; j < 32256; j++)\n i125 += String.fromCharCode(j);\nvar o125 = i125;\nif (i125.replace(/\\w+/g, \"\") !== o125) {\n $ERROR(\"#125: Error matching character class \\w between character 7d00 and 7dff\");\n}\n\nvar i126 = \"\";\nfor (var j = 32256; j < 32512; j++)\n i126 += String.fromCharCode(j);\nvar o126 = i126;\nif (i126.replace(/\\w+/g, \"\") !== o126) {\n $ERROR(\"#126: Error matching character class \\w between character 7e00 and 7eff\");\n}\n\nvar i127 = \"\";\nfor (var j = 32512; j < 32768; j++)\n i127 += String.fromCharCode(j);\nvar o127 = i127;\nif (i127.replace(/\\w+/g, \"\") !== o127) {\n $ERROR(\"#127: Error matching character class \\w between character 7f00 and 7fff\");\n}\n\nvar i128 = \"\";\nfor (var j = 32768; j < 33024; j++)\n i128 += String.fromCharCode(j);\nvar o128 = i128;\nif (i128.replace(/\\w+/g, \"\") !== o128) {\n $ERROR(\"#128: Error matching character class \\w between character 8000 and 80ff\");\n}\n\nvar i129 = \"\";\nfor (var j = 33024; j < 33280; j++)\n i129 += String.fromCharCode(j);\nvar o129 = i129;\nif (i129.replace(/\\w+/g, \"\") !== o129) {\n $ERROR(\"#129: Error matching character class \\w between character 8100 and 81ff\");\n}\n\nvar i130 = \"\";\nfor (var j = 33280; j < 33536; j++)\n i130 += String.fromCharCode(j);\nvar o130 = i130;\nif (i130.replace(/\\w+/g, \"\") !== o130) {\n $ERROR(\"#130: Error matching character class \\w between character 8200 and 82ff\");\n}\n\nvar i131 = \"\";\nfor (var j = 33536; j < 33792; j++)\n i131 += String.fromCharCode(j);\nvar o131 = i131;\nif (i131.replace(/\\w+/g, \"\") !== o131) {\n $ERROR(\"#131: Error matching character class \\w between character 8300 and 83ff\");\n}\n\nvar i132 = \"\";\nfor (var j = 33792; j < 34048; j++)\n i132 += String.fromCharCode(j);\nvar o132 = i132;\nif (i132.replace(/\\w+/g, \"\") !== o132) {\n $ERROR(\"#132: Error matching character class \\w between character 8400 and 84ff\");\n}\n\nvar i133 = \"\";\nfor (var j = 34048; j < 34304; j++)\n i133 += String.fromCharCode(j);\nvar o133 = i133;\nif (i133.replace(/\\w+/g, \"\") !== o133) {\n $ERROR(\"#133: Error matching character class \\w between character 8500 and 85ff\");\n}\n\nvar i134 = \"\";\nfor (var j = 34304; j < 34560; j++)\n i134 += String.fromCharCode(j);\nvar o134 = i134;\nif (i134.replace(/\\w+/g, \"\") !== o134) {\n $ERROR(\"#134: Error matching character class \\w between character 8600 and 86ff\");\n}\n\nvar i135 = \"\";\nfor (var j = 34560; j < 34816; j++)\n i135 += String.fromCharCode(j);\nvar o135 = i135;\nif (i135.replace(/\\w+/g, \"\") !== o135) {\n $ERROR(\"#135: Error matching character class \\w between character 8700 and 87ff\");\n}\n\nvar i136 = \"\";\nfor (var j = 34816; j < 35072; j++)\n i136 += String.fromCharCode(j);\nvar o136 = i136;\nif (i136.replace(/\\w+/g, \"\") !== o136) {\n $ERROR(\"#136: Error matching character class \\w between character 8800 and 88ff\");\n}\n\nvar i137 = \"\";\nfor (var j = 35072; j < 35328; j++)\n i137 += String.fromCharCode(j);\nvar o137 = i137;\nif (i137.replace(/\\w+/g, \"\") !== o137) {\n $ERROR(\"#137: Error matching character class \\w between character 8900 and 89ff\");\n}\n\nvar i138 = \"\";\nfor (var j = 35328; j < 35584; j++)\n i138 += String.fromCharCode(j);\nvar o138 = i138;\nif (i138.replace(/\\w+/g, \"\") !== o138) {\n $ERROR(\"#138: Error matching character class \\w between character 8a00 and 8aff\");\n}\n\nvar i139 = \"\";\nfor (var j = 35584; j < 35840; j++)\n i139 += String.fromCharCode(j);\nvar o139 = i139;\nif (i139.replace(/\\w+/g, \"\") !== o139) {\n $ERROR(\"#139: Error matching character class \\w between character 8b00 and 8bff\");\n}\n\nvar i140 = \"\";\nfor (var j = 35840; j < 36096; j++)\n i140 += String.fromCharCode(j);\nvar o140 = i140;\nif (i140.replace(/\\w+/g, \"\") !== o140) {\n $ERROR(\"#140: Error matching character class \\w between character 8c00 and 8cff\");\n}\n\nvar i141 = \"\";\nfor (var j = 36096; j < 36352; j++)\n i141 += String.fromCharCode(j);\nvar o141 = i141;\nif (i141.replace(/\\w+/g, \"\") !== o141) {\n $ERROR(\"#141: Error matching character class \\w between character 8d00 and 8dff\");\n}\n\nvar i142 = \"\";\nfor (var j = 36352; j < 36608; j++)\n i142 += String.fromCharCode(j);\nvar o142 = i142;\nif (i142.replace(/\\w+/g, \"\") !== o142) {\n $ERROR(\"#142: Error matching character class \\w between character 8e00 and 8eff\");\n}\n\nvar i143 = \"\";\nfor (var j = 36608; j < 36864; j++)\n i143 += String.fromCharCode(j);\nvar o143 = i143;\nif (i143.replace(/\\w+/g, \"\") !== o143) {\n $ERROR(\"#143: Error matching character class \\w between character 8f00 and 8fff\");\n}\n\nvar i144 = \"\";\nfor (var j = 36864; j < 37120; j++)\n i144 += String.fromCharCode(j);\nvar o144 = i144;\nif (i144.replace(/\\w+/g, \"\") !== o144) {\n $ERROR(\"#144: Error matching character class \\w between character 9000 and 90ff\");\n}\n\nvar i145 = \"\";\nfor (var j = 37120; j < 37376; j++)\n i145 += String.fromCharCode(j);\nvar o145 = i145;\nif (i145.replace(/\\w+/g, \"\") !== o145) {\n $ERROR(\"#145: Error matching character class \\w between character 9100 and 91ff\");\n}\n\nvar i146 = \"\";\nfor (var j = 37376; j < 37632; j++)\n i146 += String.fromCharCode(j);\nvar o146 = i146;\nif (i146.replace(/\\w+/g, \"\") !== o146) {\n $ERROR(\"#146: Error matching character class \\w between character 9200 and 92ff\");\n}\n\nvar i147 = \"\";\nfor (var j = 37632; j < 37888; j++)\n i147 += String.fromCharCode(j);\nvar o147 = i147;\nif (i147.replace(/\\w+/g, \"\") !== o147) {\n $ERROR(\"#147: Error matching character class \\w between character 9300 and 93ff\");\n}\n\nvar i148 = \"\";\nfor (var j = 37888; j < 38144; j++)\n i148 += String.fromCharCode(j);\nvar o148 = i148;\nif (i148.replace(/\\w+/g, \"\") !== o148) {\n $ERROR(\"#148: Error matching character class \\w between character 9400 and 94ff\");\n}\n\nvar i149 = \"\";\nfor (var j = 38144; j < 38400; j++)\n i149 += String.fromCharCode(j);\nvar o149 = i149;\nif (i149.replace(/\\w+/g, \"\") !== o149) {\n $ERROR(\"#149: Error matching character class \\w between character 9500 and 95ff\");\n}\n\nvar i150 = \"\";\nfor (var j = 38400; j < 38656; j++)\n i150 += String.fromCharCode(j);\nvar o150 = i150;\nif (i150.replace(/\\w+/g, \"\") !== o150) {\n $ERROR(\"#150: Error matching character class \\w between character 9600 and 96ff\");\n}\n\nvar i151 = \"\";\nfor (var j = 38656; j < 38912; j++)\n i151 += String.fromCharCode(j);\nvar o151 = i151;\nif (i151.replace(/\\w+/g, \"\") !== o151) {\n $ERROR(\"#151: Error matching character class \\w between character 9700 and 97ff\");\n}\n\nvar i152 = \"\";\nfor (var j = 38912; j < 39168; j++)\n i152 += String.fromCharCode(j);\nvar o152 = i152;\nif (i152.replace(/\\w+/g, \"\") !== o152) {\n $ERROR(\"#152: Error matching character class \\w between character 9800 and 98ff\");\n}\n\nvar i153 = \"\";\nfor (var j = 39168; j < 39424; j++)\n i153 += String.fromCharCode(j);\nvar o153 = i153;\nif (i153.replace(/\\w+/g, \"\") !== o153) {\n $ERROR(\"#153: Error matching character class \\w between character 9900 and 99ff\");\n}\n\nvar i154 = \"\";\nfor (var j = 39424; j < 39680; j++)\n i154 += String.fromCharCode(j);\nvar o154 = i154;\nif (i154.replace(/\\w+/g, \"\") !== o154) {\n $ERROR(\"#154: Error matching character class \\w between character 9a00 and 9aff\");\n}\n\nvar i155 = \"\";\nfor (var j = 39680; j < 39936; j++)\n i155 += String.fromCharCode(j);\nvar o155 = i155;\nif (i155.replace(/\\w+/g, \"\") !== o155) {\n $ERROR(\"#155: Error matching character class \\w between character 9b00 and 9bff\");\n}\n\nvar i156 = \"\";\nfor (var j = 39936; j < 40192; j++)\n i156 += String.fromCharCode(j);\nvar o156 = i156;\nif (i156.replace(/\\w+/g, \"\") !== o156) {\n $ERROR(\"#156: Error matching character class \\w between character 9c00 and 9cff\");\n}\n\nvar i157 = \"\";\nfor (var j = 40192; j < 40448; j++)\n i157 += String.fromCharCode(j);\nvar o157 = i157;\nif (i157.replace(/\\w+/g, \"\") !== o157) {\n $ERROR(\"#157: Error matching character class \\w between character 9d00 and 9dff\");\n}\n\nvar i158 = \"\";\nfor (var j = 40448; j < 40704; j++)\n i158 += String.fromCharCode(j);\nvar o158 = i158;\nif (i158.replace(/\\w+/g, \"\") !== o158) {\n $ERROR(\"#158: Error matching character class \\w between character 9e00 and 9eff\");\n}\n\nvar i159 = \"\";\nfor (var j = 40704; j < 40960; j++)\n i159 += String.fromCharCode(j);\nvar o159 = i159;\nif (i159.replace(/\\w+/g, \"\") !== o159) {\n $ERROR(\"#159: Error matching character class \\w between character 9f00 and 9fff\");\n}\n\nvar i160 = \"\";\nfor (var j = 40960; j < 41216; j++)\n i160 += String.fromCharCode(j);\nvar o160 = i160;\nif (i160.replace(/\\w+/g, \"\") !== o160) {\n $ERROR(\"#160: Error matching character class \\w between character a000 and a0ff\");\n}\n\nvar i161 = \"\";\nfor (var j = 41216; j < 41472; j++)\n i161 += String.fromCharCode(j);\nvar o161 = i161;\nif (i161.replace(/\\w+/g, \"\") !== o161) {\n $ERROR(\"#161: Error matching character class \\w between character a100 and a1ff\");\n}\n\nvar i162 = \"\";\nfor (var j = 41472; j < 41728; j++)\n i162 += String.fromCharCode(j);\nvar o162 = i162;\nif (i162.replace(/\\w+/g, \"\") !== o162) {\n $ERROR(\"#162: Error matching character class \\w between character a200 and a2ff\");\n}\n\nvar i163 = \"\";\nfor (var j = 41728; j < 41984; j++)\n i163 += String.fromCharCode(j);\nvar o163 = i163;\nif (i163.replace(/\\w+/g, \"\") !== o163) {\n $ERROR(\"#163: Error matching character class \\w between character a300 and a3ff\");\n}\n\nvar i164 = \"\";\nfor (var j = 41984; j < 42240; j++)\n i164 += String.fromCharCode(j);\nvar o164 = i164;\nif (i164.replace(/\\w+/g, \"\") !== o164) {\n $ERROR(\"#164: Error matching character class \\w between character a400 and a4ff\");\n}\n\nvar i165 = \"\";\nfor (var j = 42240; j < 42496; j++)\n i165 += String.fromCharCode(j);\nvar o165 = i165;\nif (i165.replace(/\\w+/g, \"\") !== o165) {\n $ERROR(\"#165: Error matching character class \\w between character a500 and a5ff\");\n}\n\nvar i166 = \"\";\nfor (var j = 42496; j < 42752; j++)\n i166 += String.fromCharCode(j);\nvar o166 = i166;\nif (i166.replace(/\\w+/g, \"\") !== o166) {\n $ERROR(\"#166: Error matching character class \\w between character a600 and a6ff\");\n}\n\nvar i167 = \"\";\nfor (var j = 42752; j < 43008; j++)\n i167 += String.fromCharCode(j);\nvar o167 = i167;\nif (i167.replace(/\\w+/g, \"\") !== o167) {\n $ERROR(\"#167: Error matching character class \\w between character a700 and a7ff\");\n}\n\nvar i168 = \"\";\nfor (var j = 43008; j < 43264; j++)\n i168 += String.fromCharCode(j);\nvar o168 = i168;\nif (i168.replace(/\\w+/g, \"\") !== o168) {\n $ERROR(\"#168: Error matching character class \\w between character a800 and a8ff\");\n}\n\nvar i169 = \"\";\nfor (var j = 43264; j < 43520; j++)\n i169 += String.fromCharCode(j);\nvar o169 = i169;\nif (i169.replace(/\\w+/g, \"\") !== o169) {\n $ERROR(\"#169: Error matching character class \\w between character a900 and a9ff\");\n}\n\nvar i170 = \"\";\nfor (var j = 43520; j < 43776; j++)\n i170 += String.fromCharCode(j);\nvar o170 = i170;\nif (i170.replace(/\\w+/g, \"\") !== o170) {\n $ERROR(\"#170: Error matching character class \\w between character aa00 and aaff\");\n}\n\nvar i171 = \"\";\nfor (var j = 43776; j < 44032; j++)\n i171 += String.fromCharCode(j);\nvar o171 = i171;\nif (i171.replace(/\\w+/g, \"\") !== o171) {\n $ERROR(\"#171: Error matching character class \\w between character ab00 and abff\");\n}\n\nvar i172 = \"\";\nfor (var j = 44032; j < 44288; j++)\n i172 += String.fromCharCode(j);\nvar o172 = i172;\nif (i172.replace(/\\w+/g, \"\") !== o172) {\n $ERROR(\"#172: Error matching character class \\w between character ac00 and acff\");\n}\n\nvar i173 = \"\";\nfor (var j = 44288; j < 44544; j++)\n i173 += String.fromCharCode(j);\nvar o173 = i173;\nif (i173.replace(/\\w+/g, \"\") !== o173) {\n $ERROR(\"#173: Error matching character class \\w between character ad00 and adff\");\n}\n\nvar i174 = \"\";\nfor (var j = 44544; j < 44800; j++)\n i174 += String.fromCharCode(j);\nvar o174 = i174;\nif (i174.replace(/\\w+/g, \"\") !== o174) {\n $ERROR(\"#174: Error matching character class \\w between character ae00 and aeff\");\n}\n\nvar i175 = \"\";\nfor (var j = 44800; j < 45056; j++)\n i175 += String.fromCharCode(j);\nvar o175 = i175;\nif (i175.replace(/\\w+/g, \"\") !== o175) {\n $ERROR(\"#175: Error matching character class \\w between character af00 and afff\");\n}\n\nvar i176 = \"\";\nfor (var j = 45056; j < 45312; j++)\n i176 += String.fromCharCode(j);\nvar o176 = i176;\nif (i176.replace(/\\w+/g, \"\") !== o176) {\n $ERROR(\"#176: Error matching character class \\w between character b000 and b0ff\");\n}\n\nvar i177 = \"\";\nfor (var j = 45312; j < 45568; j++)\n i177 += String.fromCharCode(j);\nvar o177 = i177;\nif (i177.replace(/\\w+/g, \"\") !== o177) {\n $ERROR(\"#177: Error matching character class \\w between character b100 and b1ff\");\n}\n\nvar i178 = \"\";\nfor (var j = 45568; j < 45824; j++)\n i178 += String.fromCharCode(j);\nvar o178 = i178;\nif (i178.replace(/\\w+/g, \"\") !== o178) {\n $ERROR(\"#178: Error matching character class \\w between character b200 and b2ff\");\n}\n\nvar i179 = \"\";\nfor (var j = 45824; j < 46080; j++)\n i179 += String.fromCharCode(j);\nvar o179 = i179;\nif (i179.replace(/\\w+/g, \"\") !== o179) {\n $ERROR(\"#179: Error matching character class \\w between character b300 and b3ff\");\n}\n\nvar i180 = \"\";\nfor (var j = 46080; j < 46336; j++)\n i180 += String.fromCharCode(j);\nvar o180 = i180;\nif (i180.replace(/\\w+/g, \"\") !== o180) {\n $ERROR(\"#180: Error matching character class \\w between character b400 and b4ff\");\n}\n\nvar i181 = \"\";\nfor (var j = 46336; j < 46592; j++)\n i181 += String.fromCharCode(j);\nvar o181 = i181;\nif (i181.replace(/\\w+/g, \"\") !== o181) {\n $ERROR(\"#181: Error matching character class \\w between character b500 and b5ff\");\n}\n\nvar i182 = \"\";\nfor (var j = 46592; j < 46848; j++)\n i182 += String.fromCharCode(j);\nvar o182 = i182;\nif (i182.replace(/\\w+/g, \"\") !== o182) {\n $ERROR(\"#182: Error matching character class \\w between character b600 and b6ff\");\n}\n\nvar i183 = \"\";\nfor (var j = 46848; j < 47104; j++)\n i183 += String.fromCharCode(j);\nvar o183 = i183;\nif (i183.replace(/\\w+/g, \"\") !== o183) {\n $ERROR(\"#183: Error matching character class \\w between character b700 and b7ff\");\n}\n\nvar i184 = \"\";\nfor (var j = 47104; j < 47360; j++)\n i184 += String.fromCharCode(j);\nvar o184 = i184;\nif (i184.replace(/\\w+/g, \"\") !== o184) {\n $ERROR(\"#184: Error matching character class \\w between character b800 and b8ff\");\n}\n\nvar i185 = \"\";\nfor (var j = 47360; j < 47616; j++)\n i185 += String.fromCharCode(j);\nvar o185 = i185;\nif (i185.replace(/\\w+/g, \"\") !== o185) {\n $ERROR(\"#185: Error matching character class \\w between character b900 and b9ff\");\n}\n\nvar i186 = \"\";\nfor (var j = 47616; j < 47872; j++)\n i186 += String.fromCharCode(j);\nvar o186 = i186;\nif (i186.replace(/\\w+/g, \"\") !== o186) {\n $ERROR(\"#186: Error matching character class \\w between character ba00 and baff\");\n}\n\nvar i187 = \"\";\nfor (var j = 47872; j < 48128; j++)\n i187 += String.fromCharCode(j);\nvar o187 = i187;\nif (i187.replace(/\\w+/g, \"\") !== o187) {\n $ERROR(\"#187: Error matching character class \\w between character bb00 and bbff\");\n}\n\nvar i188 = \"\";\nfor (var j = 48128; j < 48384; j++)\n i188 += String.fromCharCode(j);\nvar o188 = i188;\nif (i188.replace(/\\w+/g, \"\") !== o188) {\n $ERROR(\"#188: Error matching character class \\w between character bc00 and bcff\");\n}\n\nvar i189 = \"\";\nfor (var j = 48384; j < 48640; j++)\n i189 += String.fromCharCode(j);\nvar o189 = i189;\nif (i189.replace(/\\w+/g, \"\") !== o189) {\n $ERROR(\"#189: Error matching character class \\w between character bd00 and bdff\");\n}\n\nvar i190 = \"\";\nfor (var j = 48640; j < 48896; j++)\n i190 += String.fromCharCode(j);\nvar o190 = i190;\nif (i190.replace(/\\w+/g, \"\") !== o190) {\n $ERROR(\"#190: Error matching character class \\w between character be00 and beff\");\n}\n\nvar i191 = \"\";\nfor (var j = 48896; j < 49152; j++)\n i191 += String.fromCharCode(j);\nvar o191 = i191;\nif (i191.replace(/\\w+/g, \"\") !== o191) {\n $ERROR(\"#191: Error matching character class \\w between character bf00 and bfff\");\n}\n\nvar i192 = \"\";\nfor (var j = 49152; j < 49408; j++)\n i192 += String.fromCharCode(j);\nvar o192 = i192;\nif (i192.replace(/\\w+/g, \"\") !== o192) {\n $ERROR(\"#192: Error matching character class \\w between character c000 and c0ff\");\n}\n\nvar i193 = \"\";\nfor (var j = 49408; j < 49664; j++)\n i193 += String.fromCharCode(j);\nvar o193 = i193;\nif (i193.replace(/\\w+/g, \"\") !== o193) {\n $ERROR(\"#193: Error matching character class \\w between character c100 and c1ff\");\n}\n\nvar i194 = \"\";\nfor (var j = 49664; j < 49920; j++)\n i194 += String.fromCharCode(j);\nvar o194 = i194;\nif (i194.replace(/\\w+/g, \"\") !== o194) {\n $ERROR(\"#194: Error matching character class \\w between character c200 and c2ff\");\n}\n\nvar i195 = \"\";\nfor (var j = 49920; j < 50176; j++)\n i195 += String.fromCharCode(j);\nvar o195 = i195;\nif (i195.replace(/\\w+/g, \"\") !== o195) {\n $ERROR(\"#195: Error matching character class \\w between character c300 and c3ff\");\n}\n\nvar i196 = \"\";\nfor (var j = 50176; j < 50432; j++)\n i196 += String.fromCharCode(j);\nvar o196 = i196;\nif (i196.replace(/\\w+/g, \"\") !== o196) {\n $ERROR(\"#196: Error matching character class \\w between character c400 and c4ff\");\n}\n\nvar i197 = \"\";\nfor (var j = 50432; j < 50688; j++)\n i197 += String.fromCharCode(j);\nvar o197 = i197;\nif (i197.replace(/\\w+/g, \"\") !== o197) {\n $ERROR(\"#197: Error matching character class \\w between character c500 and c5ff\");\n}\n\nvar i198 = \"\";\nfor (var j = 50688; j < 50944; j++)\n i198 += String.fromCharCode(j);\nvar o198 = i198;\nif (i198.replace(/\\w+/g, \"\") !== o198) {\n $ERROR(\"#198: Error matching character class \\w between character c600 and c6ff\");\n}\n\nvar i199 = \"\";\nfor (var j = 50944; j < 51200; j++)\n i199 += String.fromCharCode(j);\nvar o199 = i199;\nif (i199.replace(/\\w+/g, \"\") !== o199) {\n $ERROR(\"#199: Error matching character class \\w between character c700 and c7ff\");\n}\n\nvar i200 = \"\";\nfor (var j = 51200; j < 51456; j++)\n i200 += String.fromCharCode(j);\nvar o200 = i200;\nif (i200.replace(/\\w+/g, \"\") !== o200) {\n $ERROR(\"#200: Error matching character class \\w between character c800 and c8ff\");\n}\n\nvar i201 = \"\";\nfor (var j = 51456; j < 51712; j++)\n i201 += String.fromCharCode(j);\nvar o201 = i201;\nif (i201.replace(/\\w+/g, \"\") !== o201) {\n $ERROR(\"#201: Error matching character class \\w between character c900 and c9ff\");\n}\n\nvar i202 = \"\";\nfor (var j = 51712; j < 51968; j++)\n i202 += String.fromCharCode(j);\nvar o202 = i202;\nif (i202.replace(/\\w+/g, \"\") !== o202) {\n $ERROR(\"#202: Error matching character class \\w between character ca00 and caff\");\n}\n\nvar i203 = \"\";\nfor (var j = 51968; j < 52224; j++)\n i203 += String.fromCharCode(j);\nvar o203 = i203;\nif (i203.replace(/\\w+/g, \"\") !== o203) {\n $ERROR(\"#203: Error matching character class \\w between character cb00 and cbff\");\n}\n\nvar i204 = \"\";\nfor (var j = 52224; j < 52480; j++)\n i204 += String.fromCharCode(j);\nvar o204 = i204;\nif (i204.replace(/\\w+/g, \"\") !== o204) {\n $ERROR(\"#204: Error matching character class \\w between character cc00 and ccff\");\n}\n\nvar i205 = \"\";\nfor (var j = 52480; j < 52736; j++)\n i205 += String.fromCharCode(j);\nvar o205 = i205;\nif (i205.replace(/\\w+/g, \"\") !== o205) {\n $ERROR(\"#205: Error matching character class \\w between character cd00 and cdff\");\n}\n\nvar i206 = \"\";\nfor (var j = 52736; j < 52992; j++)\n i206 += String.fromCharCode(j);\nvar o206 = i206;\nif (i206.replace(/\\w+/g, \"\") !== o206) {\n $ERROR(\"#206: Error matching character class \\w between character ce00 and ceff\");\n}\n\nvar i207 = \"\";\nfor (var j = 52992; j < 53248; j++)\n i207 += String.fromCharCode(j);\nvar o207 = i207;\nif (i207.replace(/\\w+/g, \"\") !== o207) {\n $ERROR(\"#207: Error matching character class \\w between character cf00 and cfff\");\n}\n\nvar i208 = \"\";\nfor (var j = 53248; j < 53504; j++)\n i208 += String.fromCharCode(j);\nvar o208 = i208;\nif (i208.replace(/\\w+/g, \"\") !== o208) {\n $ERROR(\"#208: Error matching character class \\w between character d000 and d0ff\");\n}\n\nvar i209 = \"\";\nfor (var j = 53504; j < 53760; j++)\n i209 += String.fromCharCode(j);\nvar o209 = i209;\nif (i209.replace(/\\w+/g, \"\") !== o209) {\n $ERROR(\"#209: Error matching character class \\w between character d100 and d1ff\");\n}\n\nvar i210 = \"\";\nfor (var j = 53760; j < 54016; j++)\n i210 += String.fromCharCode(j);\nvar o210 = i210;\nif (i210.replace(/\\w+/g, \"\") !== o210) {\n $ERROR(\"#210: Error matching character class \\w between character d200 and d2ff\");\n}\n\nvar i211 = \"\";\nfor (var j = 54016; j < 54272; j++)\n i211 += String.fromCharCode(j);\nvar o211 = i211;\nif (i211.replace(/\\w+/g, \"\") !== o211) {\n $ERROR(\"#211: Error matching character class \\w between character d300 and d3ff\");\n}\n\nvar i212 = \"\";\nfor (var j = 54272; j < 54528; j++)\n i212 += String.fromCharCode(j);\nvar o212 = i212;\nif (i212.replace(/\\w+/g, \"\") !== o212) {\n $ERROR(\"#212: Error matching character class \\w between character d400 and d4ff\");\n}\n\nvar i213 = \"\";\nfor (var j = 54528; j < 54784; j++)\n i213 += String.fromCharCode(j);\nvar o213 = i213;\nif (i213.replace(/\\w+/g, \"\") !== o213) {\n $ERROR(\"#213: Error matching character class \\w between character d500 and d5ff\");\n}\n\nvar i214 = \"\";\nfor (var j = 54784; j < 55040; j++)\n i214 += String.fromCharCode(j);\nvar o214 = i214;\nif (i214.replace(/\\w+/g, \"\") !== o214) {\n $ERROR(\"#214: Error matching character class \\w between character d600 and d6ff\");\n}\n\nvar i215 = \"\";\nfor (var j = 55040; j < 55296; j++)\n i215 += String.fromCharCode(j);\nvar o215 = i215;\nif (i215.replace(/\\w+/g, \"\") !== o215) {\n $ERROR(\"#215: Error matching character class \\w between character d700 and d7ff\");\n}\n\nvar i216 = \"\";\nfor (var j = 55296; j < 55552; j++)\n i216 += String.fromCharCode(j);\nvar o216 = i216;\nif (i216.replace(/\\w+/g, \"\") !== o216) {\n $ERROR(\"#216: Error matching character class \\w between character d800 and d8ff\");\n}\n\nvar i217 = \"\";\nfor (var j = 55552; j < 55808; j++)\n i217 += String.fromCharCode(j);\nvar o217 = i217;\nif (i217.replace(/\\w+/g, \"\") !== o217) {\n $ERROR(\"#217: Error matching character class \\w between character d900 and d9ff\");\n}\n\nvar i218 = \"\";\nfor (var j = 55808; j < 56064; j++)\n i218 += String.fromCharCode(j);\nvar o218 = i218;\nif (i218.replace(/\\w+/g, \"\") !== o218) {\n $ERROR(\"#218: Error matching character class \\w between character da00 and daff\");\n}\n\nvar i219 = \"\";\nfor (var j = 56064; j < 56320; j++)\n i219 += String.fromCharCode(j);\nvar o219 = i219;\nif (i219.replace(/\\w+/g, \"\") !== o219) {\n $ERROR(\"#219: Error matching character class \\w between character db00 and dbff\");\n}\n\nvar i220 = \"\";\nfor (var j = 56320; j < 56576; j++)\n i220 += String.fromCharCode(j);\nvar o220 = i220;\nif (i220.replace(/\\w+/g, \"\") !== o220) {\n $ERROR(\"#220: Error matching character class \\w between character dc00 and dcff\");\n}\n\nvar i221 = \"\";\nfor (var j = 56576; j < 56832; j++)\n i221 += String.fromCharCode(j);\nvar o221 = i221;\nif (i221.replace(/\\w+/g, \"\") !== o221) {\n $ERROR(\"#221: Error matching character class \\w between character dd00 and ddff\");\n}\n\nvar i222 = \"\";\nfor (var j = 56832; j < 57088; j++)\n i222 += String.fromCharCode(j);\nvar o222 = i222;\nif (i222.replace(/\\w+/g, \"\") !== o222) {\n $ERROR(\"#222: Error matching character class \\w between character de00 and deff\");\n}\n\nvar i223 = \"\";\nfor (var j = 57088; j < 57344; j++)\n i223 += String.fromCharCode(j);\nvar o223 = i223;\nif (i223.replace(/\\w+/g, \"\") !== o223) {\n $ERROR(\"#223: Error matching character class \\w between character df00 and dfff\");\n}\n\nvar i224 = \"\";\nfor (var j = 57344; j < 57600; j++)\n i224 += String.fromCharCode(j);\nvar o224 = i224;\nif (i224.replace(/\\w+/g, \"\") !== o224) {\n $ERROR(\"#224: Error matching character class \\w between character e000 and e0ff\");\n}\n\nvar i225 = \"\";\nfor (var j = 57600; j < 57856; j++)\n i225 += String.fromCharCode(j);\nvar o225 = i225;\nif (i225.replace(/\\w+/g, \"\") !== o225) {\n $ERROR(\"#225: Error matching character class \\w between character e100 and e1ff\");\n}\n\nvar i226 = \"\";\nfor (var j = 57856; j < 58112; j++)\n i226 += String.fromCharCode(j);\nvar o226 = i226;\nif (i226.replace(/\\w+/g, \"\") !== o226) {\n $ERROR(\"#226: Error matching character class \\w between character e200 and e2ff\");\n}\n\nvar i227 = \"\";\nfor (var j = 58112; j < 58368; j++)\n i227 += String.fromCharCode(j);\nvar o227 = i227;\nif (i227.replace(/\\w+/g, \"\") !== o227) {\n $ERROR(\"#227: Error matching character class \\w between character e300 and e3ff\");\n}\n\nvar i228 = \"\";\nfor (var j = 58368; j < 58624; j++)\n i228 += String.fromCharCode(j);\nvar o228 = i228;\nif (i228.replace(/\\w+/g, \"\") !== o228) {\n $ERROR(\"#228: Error matching character class \\w between character e400 and e4ff\");\n}\n\nvar i229 = \"\";\nfor (var j = 58624; j < 58880; j++)\n i229 += String.fromCharCode(j);\nvar o229 = i229;\nif (i229.replace(/\\w+/g, \"\") !== o229) {\n $ERROR(\"#229: Error matching character class \\w between character e500 and e5ff\");\n}\n\nvar i230 = \"\";\nfor (var j = 58880; j < 59136; j++)\n i230 += String.fromCharCode(j);\nvar o230 = i230;\nif (i230.replace(/\\w+/g, \"\") !== o230) {\n $ERROR(\"#230: Error matching character class \\w between character e600 and e6ff\");\n}\n\nvar i231 = \"\";\nfor (var j = 59136; j < 59392; j++)\n i231 += String.fromCharCode(j);\nvar o231 = i231;\nif (i231.replace(/\\w+/g, \"\") !== o231) {\n $ERROR(\"#231: Error matching character class \\w between character e700 and e7ff\");\n}\n\nvar i232 = \"\";\nfor (var j = 59392; j < 59648; j++)\n i232 += String.fromCharCode(j);\nvar o232 = i232;\nif (i232.replace(/\\w+/g, \"\") !== o232) {\n $ERROR(\"#232: Error matching character class \\w between character e800 and e8ff\");\n}\n\nvar i233 = \"\";\nfor (var j = 59648; j < 59904; j++)\n i233 += String.fromCharCode(j);\nvar o233 = i233;\nif (i233.replace(/\\w+/g, \"\") !== o233) {\n $ERROR(\"#233: Error matching character class \\w between character e900 and e9ff\");\n}\n\nvar i234 = \"\";\nfor (var j = 59904; j < 60160; j++)\n i234 += String.fromCharCode(j);\nvar o234 = i234;\nif (i234.replace(/\\w+/g, \"\") !== o234) {\n $ERROR(\"#234: Error matching character class \\w between character ea00 and eaff\");\n}\n\nvar i235 = \"\";\nfor (var j = 60160; j < 60416; j++)\n i235 += String.fromCharCode(j);\nvar o235 = i235;\nif (i235.replace(/\\w+/g, \"\") !== o235) {\n $ERROR(\"#235: Error matching character class \\w between character eb00 and ebff\");\n}\n\nvar i236 = \"\";\nfor (var j = 60416; j < 60672; j++)\n i236 += String.fromCharCode(j);\nvar o236 = i236;\nif (i236.replace(/\\w+/g, \"\") !== o236) {\n $ERROR(\"#236: Error matching character class \\w between character ec00 and ecff\");\n}\n\nvar i237 = \"\";\nfor (var j = 60672; j < 60928; j++)\n i237 += String.fromCharCode(j);\nvar o237 = i237;\nif (i237.replace(/\\w+/g, \"\") !== o237) {\n $ERROR(\"#237: Error matching character class \\w between character ed00 and edff\");\n}\n\nvar i238 = \"\";\nfor (var j = 60928; j < 61184; j++)\n i238 += String.fromCharCode(j);\nvar o238 = i238;\nif (i238.replace(/\\w+/g, \"\") !== o238) {\n $ERROR(\"#238: Error matching character class \\w between character ee00 and eeff\");\n}\n\nvar i239 = \"\";\nfor (var j = 61184; j < 61440; j++)\n i239 += String.fromCharCode(j);\nvar o239 = i239;\nif (i239.replace(/\\w+/g, \"\") !== o239) {\n $ERROR(\"#239: Error matching character class \\w between character ef00 and efff\");\n}\n\nvar i240 = \"\";\nfor (var j = 61440; j < 61696; j++)\n i240 += String.fromCharCode(j);\nvar o240 = i240;\nif (i240.replace(/\\w+/g, \"\") !== o240) {\n $ERROR(\"#240: Error matching character class \\w between character f000 and f0ff\");\n}\n\nvar i241 = \"\";\nfor (var j = 61696; j < 61952; j++)\n i241 += String.fromCharCode(j);\nvar o241 = i241;\nif (i241.replace(/\\w+/g, \"\") !== o241) {\n $ERROR(\"#241: Error matching character class \\w between character f100 and f1ff\");\n}\n\nvar i242 = \"\";\nfor (var j = 61952; j < 62208; j++)\n i242 += String.fromCharCode(j);\nvar o242 = i242;\nif (i242.replace(/\\w+/g, \"\") !== o242) {\n $ERROR(\"#242: Error matching character class \\w between character f200 and f2ff\");\n}\n\nvar i243 = \"\";\nfor (var j = 62208; j < 62464; j++)\n i243 += String.fromCharCode(j);\nvar o243 = i243;\nif (i243.replace(/\\w+/g, \"\") !== o243) {\n $ERROR(\"#243: Error matching character class \\w between character f300 and f3ff\");\n}\n\nvar i244 = \"\";\nfor (var j = 62464; j < 62720; j++)\n i244 += String.fromCharCode(j);\nvar o244 = i244;\nif (i244.replace(/\\w+/g, \"\") !== o244) {\n $ERROR(\"#244: Error matching character class \\w between character f400 and f4ff\");\n}\n\nvar i245 = \"\";\nfor (var j = 62720; j < 62976; j++)\n i245 += String.fromCharCode(j);\nvar o245 = i245;\nif (i245.replace(/\\w+/g, \"\") !== o245) {\n $ERROR(\"#245: Error matching character class \\w between character f500 and f5ff\");\n}\n\nvar i246 = \"\";\nfor (var j = 62976; j < 63232; j++)\n i246 += String.fromCharCode(j);\nvar o246 = i246;\nif (i246.replace(/\\w+/g, \"\") !== o246) {\n $ERROR(\"#246: Error matching character class \\w between character f600 and f6ff\");\n}\n\nvar i247 = \"\";\nfor (var j = 63232; j < 63488; j++)\n i247 += String.fromCharCode(j);\nvar o247 = i247;\nif (i247.replace(/\\w+/g, \"\") !== o247) {\n $ERROR(\"#247: Error matching character class \\w between character f700 and f7ff\");\n}\n\nvar i248 = \"\";\nfor (var j = 63488; j < 63744; j++)\n i248 += String.fromCharCode(j);\nvar o248 = i248;\nif (i248.replace(/\\w+/g, \"\") !== o248) {\n $ERROR(\"#248: Error matching character class \\w between character f800 and f8ff\");\n}\n\nvar i249 = \"\";\nfor (var j = 63744; j < 64000; j++)\n i249 += String.fromCharCode(j);\nvar o249 = i249;\nif (i249.replace(/\\w+/g, \"\") !== o249) {\n $ERROR(\"#249: Error matching character class \\w between character f900 and f9ff\");\n}\n\nvar i250 = \"\";\nfor (var j = 64000; j < 64256; j++)\n i250 += String.fromCharCode(j);\nvar o250 = i250;\nif (i250.replace(/\\w+/g, \"\") !== o250) {\n $ERROR(\"#250: Error matching character class \\w between character fa00 and faff\");\n}\n\nvar i251 = \"\";\nfor (var j = 64256; j < 64512; j++)\n i251 += String.fromCharCode(j);\nvar o251 = i251;\nif (i251.replace(/\\w+/g, \"\") !== o251) {\n $ERROR(\"#251: Error matching character class \\w between character fb00 and fbff\");\n}\n\nvar i252 = \"\";\nfor (var j = 64512; j < 64768; j++)\n i252 += String.fromCharCode(j);\nvar o252 = i252;\nif (i252.replace(/\\w+/g, \"\") !== o252) {\n $ERROR(\"#252: Error matching character class \\w between character fc00 and fcff\");\n}\n\nvar i253 = \"\";\nfor (var j = 64768; j < 65024; j++)\n i253 += String.fromCharCode(j);\nvar o253 = i253;\nif (i253.replace(/\\w+/g, \"\") !== o253) {\n $ERROR(\"#253: Error matching character class \\w between character fd00 and fdff\");\n}\n\nvar i254 = \"\";\nfor (var j = 65024; j < 65280; j++)\n i254 += String.fromCharCode(j);\nvar o254 = i254;\nif (i254.replace(/\\w+/g, \"\") !== o254) {\n $ERROR(\"#254: Error matching character class \\w between character fe00 and feff\");\n}\n\nvar i255 = \"\";\nfor (var j = 65280; j < 65536; j++)\n i255 += String.fromCharCode(j);\nvar o255 = i255;\nif (i255.replace(/\\w+/g, \"\") !== o255) {\n $ERROR(\"#255: Error matching character class \\w between character ff00 and ffff\");\n}\n",
+ "id": "S15.10.2.12_A3_T1"
+ },
+ {
+ "section": "15.10.2.12",
+ "description": "a - z",
+ "test": "var regexp_w = /\\w/;\n\n//CHECK#0061-007A\nvar result = true; \nfor (alpha = 0x0061; alpha <= 0x007A; alpha++) {\n str = String.fromCharCode(alpha);\n arr = regexp_w.exec(str); \n if ((arr === null) || (arr[0] !== str)) {\n result = false;\n }\n}\n\nif (result !== true) {\n $ERROR('#1: a - z');\n}\n",
+ "id": "S15.10.2.12_A3_T2"
+ },
+ {
+ "section": "15.10.2.12",
+ "description": "0 - 9, _",
+ "test": "var regexp_w = /\\w/;\n\n//CHECK#0030-0039\nvar result = true; \nfor (alpha = 0x0030; alpha <= 0x0039; alpha++) {\n str = String.fromCharCode(alpha);\n arr = regexp_w.exec(str); \n if ((arr === null) || (arr[0] !== str)) {\n result = false;\n }\n}\n\nif (result !== true) {\n $ERROR('#1: 0 - 9');\n}\n\n//CHECK#005F\nvar arr = regexp_w.exec(\"_\"); \nif ((arr === null) || (arr[0] !== \"\\u005F\")) {\n $ERROR('#2: _');\n}\n\n//CHECK#0020\nif (regexp_w.exec(\" \") !== null) {\n $ERROR('#3: ');\n}\n",
+ "id": "S15.10.2.12_A3_T3"
+ },
+ {
+ "section": "15.10.2.12",
+ "description": "RUSSIAN ALPHABET",
+ "test": "var regexp_w = /\\w/;\n\n//CHECK#0410-042F\nvar result = true; \nfor (alpha = 0x0410; alpha <= 0x042F; alpha++) {\n if (regexp_w.exec(String.fromCharCode(alpha)) !== null) {\n result = false;\n }\n}\n\nif (result !== true) {\n $ERROR('#1: RUSSIAN CAPITAL ALPHABET');\n}\n\n//CHECK#0430-044F\nvar result = true; \nfor (alpha = 0x0430; alpha <= 0x044F; alpha++) {\n if (regexp_w.exec(String.fromCharCode(alpha)) !== null) {\n result = false;\n }\n}\n\nif (result !== true) {\n $ERROR('#2: russian small alphabet');\n}\n",
+ "id": "S15.10.2.12_A3_T4"
+ },
+ {
+ "section": "15.10.2.12",
+ "description": "non-w",
+ "test": "//CHECK#1\nvar non_w = \"\\f\\n\\r\\t\\v~`!@#$%^&*()-+={[}]|\\\\:;'<,>./? \" + '\"';\nif (/\\w/.exec(non_w) !== null) {\n $ERROR('#1: non-w');\n}\n\n//CHECK#2\nvar non_W = \"_0123456789_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ\";\nvar regexp_w = /\\w/g;\nvar k = 0;\nwhile (regexp_w.exec(non_W) !== null) {\n k++;\n}\n\nif (non_W.length !== k) {\n $ERROR('#2: non-W');\n} \n",
+ "id": "S15.10.2.12_A3_T5"
+ },
+ {
+ "section": "15.10.2.12",
+ "description": "A - Z",
+ "test": "var i0 = \"\";\nfor (var j = 0; j < 1024; j++)\n i0 += String.fromCharCode(j);\nvar o0 = \"\\u0030\\u0031\\u0032\\u0033\\u0034\\u0035\\u0036\\u0037\\u0038\\u0039\\u0041\\u0042\\u0043\\u0044\\u0045\\u0046\\u0047\\u0048\\u0049\\u004A\\u004B\\u004C\\u004D\\u004E\\u004F\\u0050\\u0051\\u0052\\u0053\\u0054\\u0055\\u0056\\u0057\\u0058\\u0059\\u005A\\u005F\\u0061\\u0062\\u0063\\u0064\\u0065\\u0066\\u0067\\u0068\\u0069\\u006A\\u006B\\u006C\\u006D\\u006E\\u006F\\u0070\\u0071\\u0072\\u0073\\u0074\\u0075\\u0076\\u0077\\u0078\\u0079\\u007A\";\nif (i0.replace(/\\W+/g, \"\") !== o0) {\n $ERROR(\"#0: Error matching character class \\W between character 0 and 3ff\");\n}\n\nvar i1 = \"\";\nfor (var j = 1024; j < 2048; j++)\n i1 += String.fromCharCode(j);\nvar o1 = \"\";\nif (i1.replace(/\\W+/g, \"\") !== o1) {\n $ERROR(\"#1: Error matching character class \\W between character 400 and 7ff\");\n}\n\nvar i2 = \"\";\nfor (var j = 2048; j < 3072; j++)\n i2 += String.fromCharCode(j);\nvar o2 = \"\";\nif (i2.replace(/\\W+/g, \"\") !== o2) {\n $ERROR(\"#2: Error matching character class \\W between character 800 and bff\");\n}\n\nvar i3 = \"\";\nfor (var j = 3072; j < 4096; j++)\n i3 += String.fromCharCode(j);\nvar o3 = \"\";\nif (i3.replace(/\\W+/g, \"\") !== o3) {\n $ERROR(\"#3: Error matching character class \\W between character c00 and fff\");\n}\n\nvar i4 = \"\";\nfor (var j = 4096; j < 5120; j++)\n i4 += String.fromCharCode(j);\nvar o4 = \"\";\nif (i4.replace(/\\W+/g, \"\") !== o4) {\n $ERROR(\"#4: Error matching character class \\W between character 1000 and 13ff\");\n}\n\nvar i5 = \"\";\nfor (var j = 5120; j < 6144; j++)\n i5 += String.fromCharCode(j);\nvar o5 = \"\";\nif (i5.replace(/\\W+/g, \"\") !== o5) {\n $ERROR(\"#5: Error matching character class \\W between character 1400 and 17ff\");\n}\n\nvar i6 = \"\";\nfor (var j = 6144; j < 7168; j++)\n i6 += String.fromCharCode(j);\nvar o6 = \"\";\nif (i6.replace(/\\W+/g, \"\") !== o6) {\n $ERROR(\"#6: Error matching character class \\W between character 1800 and 1bff\");\n}\n\nvar i7 = \"\";\nfor (var j = 7168; j < 8192; j++)\n i7 += String.fromCharCode(j);\nvar o7 = \"\";\nif (i7.replace(/\\W+/g, \"\") !== o7) {\n $ERROR(\"#7: Error matching character class \\W between character 1c00 and 1fff\");\n}\n\nvar i8 = \"\";\nfor (var j = 8192; j < 9216; j++)\n i8 += String.fromCharCode(j);\nvar o8 = \"\";\nif (i8.replace(/\\W+/g, \"\") !== o8) {\n $ERROR(\"#8: Error matching character class \\W between character 2000 and 23ff\");\n}\n\nvar i9 = \"\";\nfor (var j = 9216; j < 10240; j++)\n i9 += String.fromCharCode(j);\nvar o9 = \"\";\nif (i9.replace(/\\W+/g, \"\") !== o9) {\n $ERROR(\"#9: Error matching character class \\W between character 2400 and 27ff\");\n}\n\nvar i10 = \"\";\nfor (var j = 10240; j < 11264; j++)\n i10 += String.fromCharCode(j);\nvar o10 = \"\";\nif (i10.replace(/\\W+/g, \"\") !== o10) {\n $ERROR(\"#10: Error matching character class \\W between character 2800 and 2bff\");\n}\n\nvar i11 = \"\";\nfor (var j = 11264; j < 12288; j++)\n i11 += String.fromCharCode(j);\nvar o11 = \"\";\nif (i11.replace(/\\W+/g, \"\") !== o11) {\n $ERROR(\"#11: Error matching character class \\W between character 2c00 and 2fff\");\n}\n\nvar i12 = \"\";\nfor (var j = 12288; j < 13312; j++)\n i12 += String.fromCharCode(j);\nvar o12 = \"\";\nif (i12.replace(/\\W+/g, \"\") !== o12) {\n $ERROR(\"#12: Error matching character class \\W between character 3000 and 33ff\");\n}\n\nvar i13 = \"\";\nfor (var j = 13312; j < 14336; j++)\n i13 += String.fromCharCode(j);\nvar o13 = \"\";\nif (i13.replace(/\\W+/g, \"\") !== o13) {\n $ERROR(\"#13: Error matching character class \\W between character 3400 and 37ff\");\n}\n\nvar i14 = \"\";\nfor (var j = 14336; j < 15360; j++)\n i14 += String.fromCharCode(j);\nvar o14 = \"\";\nif (i14.replace(/\\W+/g, \"\") !== o14) {\n $ERROR(\"#14: Error matching character class \\W between character 3800 and 3bff\");\n}\n\nvar i15 = \"\";\nfor (var j = 15360; j < 16384; j++)\n i15 += String.fromCharCode(j);\nvar o15 = \"\";\nif (i15.replace(/\\W+/g, \"\") !== o15) {\n $ERROR(\"#15: Error matching character class \\W between character 3c00 and 3fff\");\n}\n\nvar i16 = \"\";\nfor (var j = 16384; j < 17408; j++)\n i16 += String.fromCharCode(j);\nvar o16 = \"\";\nif (i16.replace(/\\W+/g, \"\") !== o16) {\n $ERROR(\"#16: Error matching character class \\W between character 4000 and 43ff\");\n}\n\nvar i17 = \"\";\nfor (var j = 17408; j < 18432; j++)\n i17 += String.fromCharCode(j);\nvar o17 = \"\";\nif (i17.replace(/\\W+/g, \"\") !== o17) {\n $ERROR(\"#17: Error matching character class \\W between character 4400 and 47ff\");\n}\n\nvar i18 = \"\";\nfor (var j = 18432; j < 19456; j++)\n i18 += String.fromCharCode(j);\nvar o18 = \"\";\nif (i18.replace(/\\W+/g, \"\") !== o18) {\n $ERROR(\"#18: Error matching character class \\W between character 4800 and 4bff\");\n}\n\nvar i19 = \"\";\nfor (var j = 19456; j < 20480; j++)\n i19 += String.fromCharCode(j);\nvar o19 = \"\";\nif (i19.replace(/\\W+/g, \"\") !== o19) {\n $ERROR(\"#19: Error matching character class \\W between character 4c00 and 4fff\");\n}\n\nvar i20 = \"\";\nfor (var j = 20480; j < 21504; j++)\n i20 += String.fromCharCode(j);\nvar o20 = \"\";\nif (i20.replace(/\\W+/g, \"\") !== o20) {\n $ERROR(\"#20: Error matching character class \\W between character 5000 and 53ff\");\n}\n\nvar i21 = \"\";\nfor (var j = 21504; j < 22528; j++)\n i21 += String.fromCharCode(j);\nvar o21 = \"\";\nif (i21.replace(/\\W+/g, \"\") !== o21) {\n $ERROR(\"#21: Error matching character class \\W between character 5400 and 57ff\");\n}\n\nvar i22 = \"\";\nfor (var j = 22528; j < 23552; j++)\n i22 += String.fromCharCode(j);\nvar o22 = \"\";\nif (i22.replace(/\\W+/g, \"\") !== o22) {\n $ERROR(\"#22: Error matching character class \\W between character 5800 and 5bff\");\n}\n\nvar i23 = \"\";\nfor (var j = 23552; j < 24576; j++)\n i23 += String.fromCharCode(j);\nvar o23 = \"\";\nif (i23.replace(/\\W+/g, \"\") !== o23) {\n $ERROR(\"#23: Error matching character class \\W between character 5c00 and 5fff\");\n}\n\nvar i24 = \"\";\nfor (var j = 24576; j < 25600; j++)\n i24 += String.fromCharCode(j);\nvar o24 = \"\";\nif (i24.replace(/\\W+/g, \"\") !== o24) {\n $ERROR(\"#24: Error matching character class \\W between character 6000 and 63ff\");\n}\n\nvar i25 = \"\";\nfor (var j = 25600; j < 26624; j++)\n i25 += String.fromCharCode(j);\nvar o25 = \"\";\nif (i25.replace(/\\W+/g, \"\") !== o25) {\n $ERROR(\"#25: Error matching character class \\W between character 6400 and 67ff\");\n}\n\nvar i26 = \"\";\nfor (var j = 26624; j < 27648; j++)\n i26 += String.fromCharCode(j);\nvar o26 = \"\";\nif (i26.replace(/\\W+/g, \"\") !== o26) {\n $ERROR(\"#26: Error matching character class \\W between character 6800 and 6bff\");\n}\n\nvar i27 = \"\";\nfor (var j = 27648; j < 28672; j++)\n i27 += String.fromCharCode(j);\nvar o27 = \"\";\nif (i27.replace(/\\W+/g, \"\") !== o27) {\n $ERROR(\"#27: Error matching character class \\W between character 6c00 and 6fff\");\n}\n\nvar i28 = \"\";\nfor (var j = 28672; j < 29696; j++)\n i28 += String.fromCharCode(j);\nvar o28 = \"\";\nif (i28.replace(/\\W+/g, \"\") !== o28) {\n $ERROR(\"#28: Error matching character class \\W between character 7000 and 73ff\");\n}\n\nvar i29 = \"\";\nfor (var j = 29696; j < 30720; j++)\n i29 += String.fromCharCode(j);\nvar o29 = \"\";\nif (i29.replace(/\\W+/g, \"\") !== o29) {\n $ERROR(\"#29: Error matching character class \\W between character 7400 and 77ff\");\n}\n\nvar i30 = \"\";\nfor (var j = 30720; j < 31744; j++)\n i30 += String.fromCharCode(j);\nvar o30 = \"\";\nif (i30.replace(/\\W+/g, \"\") !== o30) {\n $ERROR(\"#30: Error matching character class \\W between character 7800 and 7bff\");\n}\n\nvar i31 = \"\";\nfor (var j = 31744; j < 32768; j++)\n i31 += String.fromCharCode(j);\nvar o31 = \"\";\nif (i31.replace(/\\W+/g, \"\") !== o31) {\n $ERROR(\"#31: Error matching character class \\W between character 7c00 and 7fff\");\n}\n\nvar i32 = \"\";\nfor (var j = 32768; j < 33792; j++)\n i32 += String.fromCharCode(j);\nvar o32 = \"\";\nif (i32.replace(/\\W+/g, \"\") !== o32) {\n $ERROR(\"#32: Error matching character class \\W between character 8000 and 83ff\");\n}\n\nvar i33 = \"\";\nfor (var j = 33792; j < 34816; j++)\n i33 += String.fromCharCode(j);\nvar o33 = \"\";\nif (i33.replace(/\\W+/g, \"\") !== o33) {\n $ERROR(\"#33: Error matching character class \\W between character 8400 and 87ff\");\n}\n\nvar i34 = \"\";\nfor (var j = 34816; j < 35840; j++)\n i34 += String.fromCharCode(j);\nvar o34 = \"\";\nif (i34.replace(/\\W+/g, \"\") !== o34) {\n $ERROR(\"#34: Error matching character class \\W between character 8800 and 8bff\");\n}\n\nvar i35 = \"\";\nfor (var j = 35840; j < 36864; j++)\n i35 += String.fromCharCode(j);\nvar o35 = \"\";\nif (i35.replace(/\\W+/g, \"\") !== o35) {\n $ERROR(\"#35: Error matching character class \\W between character 8c00 and 8fff\");\n}\n\nvar i36 = \"\";\nfor (var j = 36864; j < 37888; j++)\n i36 += String.fromCharCode(j);\nvar o36 = \"\";\nif (i36.replace(/\\W+/g, \"\") !== o36) {\n $ERROR(\"#36: Error matching character class \\W between character 9000 and 93ff\");\n}\n\nvar i37 = \"\";\nfor (var j = 37888; j < 38912; j++)\n i37 += String.fromCharCode(j);\nvar o37 = \"\";\nif (i37.replace(/\\W+/g, \"\") !== o37) {\n $ERROR(\"#37: Error matching character class \\W between character 9400 and 97ff\");\n}\n\nvar i38 = \"\";\nfor (var j = 38912; j < 39936; j++)\n i38 += String.fromCharCode(j);\nvar o38 = \"\";\nif (i38.replace(/\\W+/g, \"\") !== o38) {\n $ERROR(\"#38: Error matching character class \\W between character 9800 and 9bff\");\n}\n\nvar i39 = \"\";\nfor (var j = 39936; j < 40960; j++)\n i39 += String.fromCharCode(j);\nvar o39 = \"\";\nif (i39.replace(/\\W+/g, \"\") !== o39) {\n $ERROR(\"#39: Error matching character class \\W between character 9c00 and 9fff\");\n}\n\nvar i40 = \"\";\nfor (var j = 40960; j < 41984; j++)\n i40 += String.fromCharCode(j);\nvar o40 = \"\";\nif (i40.replace(/\\W+/g, \"\") !== o40) {\n $ERROR(\"#40: Error matching character class \\W between character a000 and a3ff\");\n}\n\nvar i41 = \"\";\nfor (var j = 41984; j < 43008; j++)\n i41 += String.fromCharCode(j);\nvar o41 = \"\";\nif (i41.replace(/\\W+/g, \"\") !== o41) {\n $ERROR(\"#41: Error matching character class \\W between character a400 and a7ff\");\n}\n\nvar i42 = \"\";\nfor (var j = 43008; j < 44032; j++)\n i42 += String.fromCharCode(j);\nvar o42 = \"\";\nif (i42.replace(/\\W+/g, \"\") !== o42) {\n $ERROR(\"#42: Error matching character class \\W between character a800 and abff\");\n}\n\nvar i43 = \"\";\nfor (var j = 44032; j < 45056; j++)\n i43 += String.fromCharCode(j);\nvar o43 = \"\";\nif (i43.replace(/\\W+/g, \"\") !== o43) {\n $ERROR(\"#43: Error matching character class \\W between character ac00 and afff\");\n}\n\nvar i44 = \"\";\nfor (var j = 45056; j < 46080; j++)\n i44 += String.fromCharCode(j);\nvar o44 = \"\";\nif (i44.replace(/\\W+/g, \"\") !== o44) {\n $ERROR(\"#44: Error matching character class \\W between character b000 and b3ff\");\n}\n\nvar i45 = \"\";\nfor (var j = 46080; j < 47104; j++)\n i45 += String.fromCharCode(j);\nvar o45 = \"\";\nif (i45.replace(/\\W+/g, \"\") !== o45) {\n $ERROR(\"#45: Error matching character class \\W between character b400 and b7ff\");\n}\n\nvar i46 = \"\";\nfor (var j = 47104; j < 48128; j++)\n i46 += String.fromCharCode(j);\nvar o46 = \"\";\nif (i46.replace(/\\W+/g, \"\") !== o46) {\n $ERROR(\"#46: Error matching character class \\W between character b800 and bbff\");\n}\n\nvar i47 = \"\";\nfor (var j = 48128; j < 49152; j++)\n i47 += String.fromCharCode(j);\nvar o47 = \"\";\nif (i47.replace(/\\W+/g, \"\") !== o47) {\n $ERROR(\"#47: Error matching character class \\W between character bc00 and bfff\");\n}\n\nvar i48 = \"\";\nfor (var j = 49152; j < 50176; j++)\n i48 += String.fromCharCode(j);\nvar o48 = \"\";\nif (i48.replace(/\\W+/g, \"\") !== o48) {\n $ERROR(\"#48: Error matching character class \\W between character c000 and c3ff\");\n}\n\nvar i49 = \"\";\nfor (var j = 50176; j < 51200; j++)\n i49 += String.fromCharCode(j);\nvar o49 = \"\";\nif (i49.replace(/\\W+/g, \"\") !== o49) {\n $ERROR(\"#49: Error matching character class \\W between character c400 and c7ff\");\n}\n\nvar i50 = \"\";\nfor (var j = 51200; j < 52224; j++)\n i50 += String.fromCharCode(j);\nvar o50 = \"\";\nif (i50.replace(/\\W+/g, \"\") !== o50) {\n $ERROR(\"#50: Error matching character class \\W between character c800 and cbff\");\n}\n\nvar i51 = \"\";\nfor (var j = 52224; j < 53248; j++)\n i51 += String.fromCharCode(j);\nvar o51 = \"\";\nif (i51.replace(/\\W+/g, \"\") !== o51) {\n $ERROR(\"#51: Error matching character class \\W between character cc00 and cfff\");\n}\n\nvar i52 = \"\";\nfor (var j = 53248; j < 54272; j++)\n i52 += String.fromCharCode(j);\nvar o52 = \"\";\nif (i52.replace(/\\W+/g, \"\") !== o52) {\n $ERROR(\"#52: Error matching character class \\W between character d000 and d3ff\");\n}\n\nvar i53 = \"\";\nfor (var j = 54272; j < 55296; j++)\n i53 += String.fromCharCode(j);\nvar o53 = \"\";\nif (i53.replace(/\\W+/g, \"\") !== o53) {\n $ERROR(\"#53: Error matching character class \\W between character d400 and d7ff\");\n}\n\nvar i54 = \"\";\nfor (var j = 55296; j < 56320; j++)\n i54 += String.fromCharCode(j);\nvar o54 = \"\";\nif (i54.replace(/\\W+/g, \"\") !== o54) {\n $ERROR(\"#54: Error matching character class \\W between character d800 and dbff\");\n}\n\nvar i55 = \"\";\nfor (var j = 56320; j < 57344; j++)\n i55 += String.fromCharCode(j);\nvar o55 = \"\";\nif (i55.replace(/\\W+/g, \"\") !== o55) {\n $ERROR(\"#55: Error matching character class \\W between character dc00 and dfff\");\n}\n\nvar i56 = \"\";\nfor (var j = 57344; j < 58368; j++)\n i56 += String.fromCharCode(j);\nvar o56 = \"\";\nif (i56.replace(/\\W+/g, \"\") !== o56) {\n $ERROR(\"#56: Error matching character class \\W between character e000 and e3ff\");\n}\n\nvar i57 = \"\";\nfor (var j = 58368; j < 59392; j++)\n i57 += String.fromCharCode(j);\nvar o57 = \"\";\nif (i57.replace(/\\W+/g, \"\") !== o57) {\n $ERROR(\"#57: Error matching character class \\W between character e400 and e7ff\");\n}\n\nvar i58 = \"\";\nfor (var j = 59392; j < 60416; j++)\n i58 += String.fromCharCode(j);\nvar o58 = \"\";\nif (i58.replace(/\\W+/g, \"\") !== o58) {\n $ERROR(\"#58: Error matching character class \\W between character e800 and ebff\");\n}\n\nvar i59 = \"\";\nfor (var j = 60416; j < 61440; j++)\n i59 += String.fromCharCode(j);\nvar o59 = \"\";\nif (i59.replace(/\\W+/g, \"\") !== o59) {\n $ERROR(\"#59: Error matching character class \\W between character ec00 and efff\");\n}\n\nvar i60 = \"\";\nfor (var j = 61440; j < 62464; j++)\n i60 += String.fromCharCode(j);\nvar o60 = \"\";\nif (i60.replace(/\\W+/g, \"\") !== o60) {\n $ERROR(\"#60: Error matching character class \\W between character f000 and f3ff\");\n}\n\nvar i61 = \"\";\nfor (var j = 62464; j < 63488; j++)\n i61 += String.fromCharCode(j);\nvar o61 = \"\";\nif (i61.replace(/\\W+/g, \"\") !== o61) {\n $ERROR(\"#61: Error matching character class \\W between character f400 and f7ff\");\n}\n\nvar i62 = \"\";\nfor (var j = 63488; j < 64512; j++)\n i62 += String.fromCharCode(j);\nvar o62 = \"\";\nif (i62.replace(/\\W+/g, \"\") !== o62) {\n $ERROR(\"#62: Error matching character class \\W between character f800 and fbff\");\n}\n\nvar i63 = \"\";\nfor (var j = 64512; j < 65536; j++)\n i63 += String.fromCharCode(j);\nvar o63 = \"\";\nif (i63.replace(/\\W+/g, \"\") !== o63) {\n $ERROR(\"#63: Error matching character class \\W between character fc00 and ffff\");\n}\n",
+ "id": "S15.10.2.12_A4_T1"
+ },
+ {
+ "section": "15.10.2.12",
+ "description": "a - z",
+ "test": "var regexp_W = /\\W/;\n\n//CHECK#0061-007A\nvar result = true; \nfor (alpha = 0x0061; alpha <= 0x007A; alpha++) {\n if (regexp_W.exec(String.fromCharCode(alpha)) !== null) {\n result = false;\n }\n}\n\nif (result !== true) {\n $ERROR('#1: a - z');\n}\n",
+ "id": "S15.10.2.12_A4_T2"
+ },
+ {
+ "section": "15.10.2.12",
+ "description": "0 - 9",
+ "test": "var regexp_W = /\\W/;\n\n//CHECK#0030-0039\nvar result = true; \nfor (alpha = 0x0030; alpha <= 0x0039; alpha++) {\n if (regexp_W.exec(String.fromCharCode(alpha)) !== null) {\n result = false;\n }\n}\n\nif (result !== true) {\n $ERROR('#1: 0 - 9');\n}\n\n//CHECK#005F \nif (regexp_W.exec(\"_\") !== null) {\n $ERROR('#2: _');\n}\n\n//CHECK#0020\nvar arr = regexp_W.exec(\" \"); \nif ((arr === null) || (arr[0] !== \"\\u0020\")) {\n $ERROR('#2: ');\n}\n",
+ "id": "S15.10.2.12_A4_T3"
+ },
+ {
+ "section": "15.10.2.12",
+ "description": "RUSSIAN ALPHABET",
+ "test": "var regexp_W = /\\W/;\n\n//CHECK#0410-042F\nvar result = true; \nfor (alpha = 0x0410; alpha <= 0x042F; alpha++) {\n str = String.fromCharCode(alpha);\n arr = regexp_W.exec(str); \n if ((arr === null) || (arr[0] !== str)) {\n result = false;\n }\n}\n\nif (result !== true) {\n $ERROR('#1: RUSSIAN CAPITAL ALPHABET');\n}\n\n//CHECK#0430-044F\nvar result = true; \nfor (alpha = 0x0430; alpha <= 0x044F; alpha++) {\n str = String.fromCharCode(alpha);\n arr = regexp_W.exec(str); \n if ((arr === null) || (arr[0] !== str)) {\n result = false;\n }\n}\n\nif (result !== true) {\n $ERROR('#2: russian small alphabet');\n}\n",
+ "id": "S15.10.2.12_A4_T4"
+ },
+ {
+ "section": "15.10.2.12",
+ "description": "non-w",
+ "test": "//CHECK#1\nvar non_w = \"\\f\\n\\r\\t\\v~`!@#$%^&*()-+={[}]|\\\\:;'<,>./? \" + '\"';\nvar regexp_W = /\\W/g;\nvar k = 0;\nwhile (regexp_W.exec(non_w) !== null) {\n k++;\n}\n\nif (non_w.length !== k) {\n $ERROR('#1: non-w');\n}\n\n//CHECK#2\nvar non_W = \"_0123456789_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ\";\nif (/\\W/.exec(non_W) !== null) {\n $ERROR('#2: non-W');\n}\n",
+ "id": "S15.10.2.12_A4_T5"
+ },
+ {
+ "section": "15.10.2.12",
+ "description": "0 - 9",
+ "test": "var i0 = \"\";\nfor (var j = 0; j < 1024; j++)\n i0 += String.fromCharCode(j);\nvar o0 = \"\\u0000\\u0001\\u0002\\u0003\\u0004\\u0005\\u0006\\u0007\\u0008\\u0009\\u000A\\u000B\\u000C\\u000D\\u000E\\u000F\\u0010\\u0011\\u0012\\u0013\\u0014\\u0015\\u0016\\u0017\\u0018\\u0019\\u001A\\u001B\\u001C\\u001D\\u001E\\u001F\\u0020\\u0021\\u0022\\u0023\\u0024\\u0025\\u0026\\u0027\\u0028\\u0029\\u002A\\u002B\\u002C\\u002D\\u002E\\u002F\\u003A\\u003B\\u003C\\u003D\\u003E\\u003F\\u0040\\u0041\\u0042\\u0043\\u0044\\u0045\\u0046\\u0047\\u0048\\u0049\\u004A\\u004B\\u004C\\u004D\\u004E\\u004F\\u0050\\u0051\\u0052\\u0053\\u0054\\u0055\\u0056\\u0057\\u0058\\u0059\\u005A\\u005B\\u005C\\u005D\\u005E\\u005F\\u0060\\u0061\\u0062\\u0063\\u0064\\u0065\\u0066\\u0067\\u0068\\u0069\\u006A\\u006B\\u006C\\u006D\\u006E\\u006F\\u0070\\u0071\\u0072\\u0073\\u0074\\u0075\\u0076\\u0077\\u0078\\u0079\\u007A\\u007B\\u007C\\u007D\\u007E\\u007F\\u0080\\u0081\\u0082\\u0083\\u0084\\u0085\\u0086\\u0087\\u0088\\u0089\\u008A\\u008B\\u008C\\u008D\\u008E\\u008F\\u0090\\u0091\\u0092\\u0093\\u0094\\u0095\\u0096\\u0097\\u0098\\u0099\\u009A\\u009B\\u009C\\u009D\\u009E\\u009F\\u00A0\\u00A1\\u00A2\\u00A3\\u00A4\\u00A5\\u00A6\\u00A7\\u00A8\\u00A9\\u00AA\\u00AB\\u00AC\\u00AD\\u00AE\\u00AF\\u00B0\\u00B1\\u00B2\\u00B3\\u00B4\\u00B5\\u00B6\\u00B7\\u00B8\\u00B9\\u00BA\\u00BB\\u00BC\\u00BD\\u00BE\\u00BF\\u00C0\\u00C1\\u00C2\\u00C3\\u00C4\\u00C5\\u00C6\\u00C7\\u00C8\\u00C9\\u00CA\\u00CB\\u00CC\\u00CD\\u00CE\\u00CF\\u00D0\\u00D1\\u00D2\\u00D3\\u00D4\\u00D5\\u00D6\\u00D7\\u00D8\\u00D9\\u00DA\\u00DB\\u00DC\\u00DD\\u00DE\\u00DF\\u00E0\\u00E1\\u00E2\\u00E3\\u00E4\\u00E5\\u00E6\\u00E7\\u00E8\\u00E9\\u00EA\\u00EB\\u00EC\\u00ED\\u00EE\\u00EF\\u00F0\\u00F1\\u00F2\\u00F3\\u00F4\\u00F5\\u00F6\\u00F7\\u00F8\\u00F9\\u00FA\\u00FB\\u00FC\\u00FD\\u00FE\\u00FF\\u0100\\u0101\\u0102\\u0103\\u0104\\u0105\\u0106\\u0107\\u0108\\u0109\\u010A\\u010B\\u010C\\u010D\\u010E\\u010F\\u0110\\u0111\\u0112\\u0113\\u0114\\u0115\\u0116\\u0117\\u0118\\u0119\\u011A\\u011B\\u011C\\u011D\\u011E\\u011F\\u0120\\u0121\\u0122\\u0123\\u0124\\u0125\\u0126\\u0127\\u0128\\u0129\\u012A\\u012B\\u012C\\u012D\\u012E\\u012F\\u0130\\u0131\\u0132\\u0133\\u0134\\u0135\\u0136\\u0137\\u0138\\u0139\\u013A\\u013B\\u013C\\u013D\\u013E\\u013F\\u0140\\u0141\\u0142\\u0143\\u0144\\u0145\\u0146\\u0147\\u0148\\u0149\\u014A\\u014B\\u014C\\u014D\\u014E\\u014F\\u0150\\u0151\\u0152\\u0153\\u0154\\u0155\\u0156\\u0157\\u0158\\u0159\\u015A\\u015B\\u015C\\u015D\\u015E\\u015F\\u0160\\u0161\\u0162\\u0163\\u0164\\u0165\\u0166\\u0167\\u0168\\u0169\\u016A\\u016B\\u016C\\u016D\\u016E\\u016F\\u0170\\u0171\\u0172\\u0173\\u0174\\u0175\\u0176\\u0177\\u0178\\u0179\\u017A\\u017B\\u017C\\u017D\\u017E\\u017F\\u0180\\u0181\\u0182\\u0183\\u0184\\u0185\\u0186\\u0187\\u0188\\u0189\\u018A\\u018B\\u018C\\u018D\\u018E\\u018F\\u0190\\u0191\\u0192\\u0193\\u0194\\u0195\\u0196\\u0197\\u0198\\u0199\\u019A\\u019B\\u019C\\u019D\\u019E\\u019F\\u01A0\\u01A1\\u01A2\\u01A3\\u01A4\\u01A5\\u01A6\\u01A7\\u01A8\\u01A9\\u01AA\\u01AB\\u01AC\\u01AD\\u01AE\\u01AF\\u01B0\\u01B1\\u01B2\\u01B3\\u01B4\\u01B5\\u01B6\\u01B7\\u01B8\\u01B9\\u01BA\\u01BB\\u01BC\\u01BD\\u01BE\\u01BF\\u01C0\\u01C1\\u01C2\\u01C3\\u01C4\\u01C5\\u01C6\\u01C7\\u01C8\\u01C9\\u01CA\\u01CB\\u01CC\\u01CD\\u01CE\\u01CF\\u01D0\\u01D1\\u01D2\\u01D3\\u01D4\\u01D5\\u01D6\\u01D7\\u01D8\\u01D9\\u01DA\\u01DB\\u01DC\\u01DD\\u01DE\\u01DF\\u01E0\\u01E1\\u01E2\\u01E3\\u01E4\\u01E5\\u01E6\\u01E7\\u01E8\\u01E9\\u01EA\\u01EB\\u01EC\\u01ED\\u01EE\\u01EF\\u01F0\\u01F1\\u01F2\\u01F3\\u01F4\\u01F5\\u01F6\\u01F7\\u01F8\\u01F9\\u01FA\\u01FB\\u01FC\\u01FD\\u01FE\\u01FF\\u0200\\u0201\\u0202\\u0203\\u0204\\u0205\\u0206\\u0207\\u0208\\u0209\\u020A\\u020B\\u020C\\u020D\\u020E\\u020F\\u0210\\u0211\\u0212\\u0213\\u0214\\u0215\\u0216\\u0217\\u0218\\u0219\\u021A\\u021B\\u021C\\u021D\\u021E\\u021F\\u0220\\u0221\\u0222\\u0223\\u0224\\u0225\\u0226\\u0227\\u0228\\u0229\\u022A\\u022B\\u022C\\u022D\\u022E\\u022F\\u0230\\u0231\\u0232\\u0233\\u0234\\u0235\\u0236\\u0237\\u0238\\u0239\\u023A\\u023B\\u023C\\u023D\\u023E\\u023F\\u0240\\u0241\\u0242\\u0243\\u0244\\u0245\\u0246\\u0247\\u0248\\u0249\\u024A\\u024B\\u024C\\u024D\\u024E\\u024F\\u0250\\u0251\\u0252\\u0253\\u0254\\u0255\\u0256\\u0257\\u0258\\u0259\\u025A\\u025B\\u025C\\u025D\\u025E\\u025F\\u0260\\u0261\\u0262\\u0263\\u0264\\u0265\\u0266\\u0267\\u0268\\u0269\\u026A\\u026B\\u026C\\u026D\\u026E\\u026F\\u0270\\u0271\\u0272\\u0273\\u0274\\u0275\\u0276\\u0277\\u0278\\u0279\\u027A\\u027B\\u027C\\u027D\\u027E\\u027F\\u0280\\u0281\\u0282\\u0283\\u0284\\u0285\\u0286\\u0287\\u0288\\u0289\\u028A\\u028B\\u028C\\u028D\\u028E\\u028F\\u0290\\u0291\\u0292\\u0293\\u0294\\u0295\\u0296\\u0297\\u0298\\u0299\\u029A\\u029B\\u029C\\u029D\\u029E\\u029F\\u02A0\\u02A1\\u02A2\\u02A3\\u02A4\\u02A5\\u02A6\\u02A7\\u02A8\\u02A9\\u02AA\\u02AB\\u02AC\\u02AD\\u02AE\\u02AF\\u02B0\\u02B1\\u02B2\\u02B3\\u02B4\\u02B5\\u02B6\\u02B7\\u02B8\\u02B9\\u02BA\\u02BB\\u02BC\\u02BD\\u02BE\\u02BF\\u02C0\\u02C1\\u02C2\\u02C3\\u02C4\\u02C5\\u02C6\\u02C7\\u02C8\\u02C9\\u02CA\\u02CB\\u02CC\\u02CD\\u02CE\\u02CF\\u02D0\\u02D1\\u02D2\\u02D3\\u02D4\\u02D5\\u02D6\\u02D7\\u02D8\\u02D9\\u02DA\\u02DB\\u02DC\\u02DD\\u02DE\\u02DF\\u02E0\\u02E1\\u02E2\\u02E3\\u02E4\\u02E5\\u02E6\\u02E7\\u02E8\\u02E9\\u02EA\\u02EB\\u02EC\\u02ED\\u02EE\\u02EF\\u02F0\\u02F1\\u02F2\\u02F3\\u02F4\\u02F5\\u02F6\\u02F7\\u02F8\\u02F9\\u02FA\\u02FB\\u02FC\\u02FD\\u02FE\\u02FF\\u0300\\u0301\\u0302\\u0303\\u0304\\u0305\\u0306\\u0307\\u0308\\u0309\\u030A\\u030B\\u030C\\u030D\\u030E\\u030F\\u0310\\u0311\\u0312\\u0313\\u0314\\u0315\\u0316\\u0317\\u0318\\u0319\\u031A\\u031B\\u031C\\u031D\\u031E\\u031F\\u0320\\u0321\\u0322\\u0323\\u0324\\u0325\\u0326\\u0327\\u0328\\u0329\\u032A\\u032B\\u032C\\u032D\\u032E\\u032F\\u0330\\u0331\\u0332\\u0333\\u0334\\u0335\\u0336\\u0337\\u0338\\u0339\\u033A\\u033B\\u033C\\u033D\\u033E\\u033F\\u0340\\u0341\\u0342\\u0343\\u0344\\u0345\\u0346\\u0347\\u0348\\u0349\\u034A\\u034B\\u034C\\u034D\\u034E\\u034F\\u0350\\u0351\\u0352\\u0353\\u0354\\u0355\\u0356\\u0357\\u0358\\u0359\\u035A\\u035B\\u035C\\u035D\\u035E\\u035F\\u0360\\u0361\\u0362\\u0363\\u0364\\u0365\\u0366\\u0367\\u0368\\u0369\\u036A\\u036B\\u036C\\u036D\\u036E\\u036F\\u0370\\u0371\\u0372\\u0373\\u0374\\u0375\\u0376\\u0377\\u0378\\u0379\\u037A\\u037B\\u037C\\u037D\\u037E\\u037F\\u0380\\u0381\\u0382\\u0383\\u0384\\u0385\\u0386\\u0387\\u0388\\u0389\\u038A\\u038B\\u038C\\u038D\\u038E\\u038F\\u0390\\u0391\\u0392\\u0393\\u0394\\u0395\\u0396\\u0397\\u0398\\u0399\\u039A\\u039B\\u039C\\u039D\\u039E\\u039F\\u03A0\\u03A1\\u03A2\\u03A3\\u03A4\\u03A5\\u03A6\\u03A7\\u03A8\\u03A9\\u03AA\\u03AB\\u03AC\\u03AD\\u03AE\\u03AF\\u03B0\\u03B1\\u03B2\\u03B3\\u03B4\\u03B5\\u03B6\\u03B7\\u03B8\\u03B9\\u03BA\\u03BB\\u03BC\\u03BD\\u03BE\\u03BF\\u03C0\\u03C1\\u03C2\\u03C3\\u03C4\\u03C5\\u03C6\\u03C7\\u03C8\\u03C9\\u03CA\\u03CB\\u03CC\\u03CD\\u03CE\\u03CF\\u03D0\\u03D1\\u03D2\\u03D3\\u03D4\\u03D5\\u03D6\\u03D7\\u03D8\\u03D9\\u03DA\\u03DB\\u03DC\\u03DD\\u03DE\\u03DF\\u03E0\\u03E1\\u03E2\\u03E3\\u03E4\\u03E5\\u03E6\\u03E7\\u03E8\\u03E9\\u03EA\\u03EB\\u03EC\\u03ED\\u03EE\\u03EF\\u03F0\\u03F1\\u03F2\\u03F3\\u03F4\\u03F5\\u03F6\\u03F7\\u03F8\\u03F9\\u03FA\\u03FB\\u03FC\\u03FD\\u03FE\\u03FF\";\nif (i0.replace(/\\d+/g, \"\") !== o0) {\n $ERROR(\"#0: Error matching character class \\d between character 0 and 3ff\");\n}\n\nvar i1 = \"\";\nfor (var j = 1024; j < 2048; j++)\n i1 += String.fromCharCode(j);\nvar o1 = i1;\nif (i1.replace(/\\d+/g, \"\") !== o1) {\n $ERROR(\"#1: Error matching character class \\d between character 400 and 7ff\");\n}\n\nvar i2 = \"\";\nfor (var j = 2048; j < 3072; j++)\n i2 += String.fromCharCode(j);\nvar o2 = i2;\nif (i2.replace(/\\d+/g, \"\") !== o2) {\n $ERROR(\"#2: Error matching character class \\d between character 800 and bff\");\n}\n\nvar i3 = \"\";\nfor (var j = 3072; j < 4096; j++)\n i3 += String.fromCharCode(j);\nvar o3 = i3;\nif (i3.replace(/\\d+/g, \"\") !== o3) {\n $ERROR(\"#3: Error matching character class \\d between character c00 and fff\");\n}\n\nvar i4 = \"\";\nfor (var j = 4096; j < 5120; j++)\n i4 += String.fromCharCode(j);\nvar o4 = i4;\nif (i4.replace(/\\d+/g, \"\") !== o4) {\n $ERROR(\"#4: Error matching character class \\d between character 1000 and 13ff\");\n}\n\nvar i5 = \"\";\nfor (var j = 5120; j < 6144; j++)\n i5 += String.fromCharCode(j);\nvar o5 = i5;\nif (i5.replace(/\\d+/g, \"\") !== o5) {\n $ERROR(\"#5: Error matching character class \\d between character 1400 and 17ff\");\n}\n\nvar i6 = \"\";\nfor (var j = 6144; j < 7168; j++)\n i6 += String.fromCharCode(j);\nvar o6 = i6;\nif (i6.replace(/\\d+/g, \"\") !== o6) {\n $ERROR(\"#6: Error matching character class \\d between character 1800 and 1bff\");\n}\n\nvar i7 = \"\";\nfor (var j = 7168; j < 8192; j++)\n i7 += String.fromCharCode(j);\nvar o7 = i7;\nif (i7.replace(/\\d+/g, \"\") !== o7) {\n $ERROR(\"#7: Error matching character class \\d between character 1c00 and 1fff\");\n}\n\nvar i8 = \"\";\nfor (var j = 8192; j < 9216; j++)\n i8 += String.fromCharCode(j);\nvar o8 = i8;\nif (i8.replace(/\\d+/g, \"\") !== o8) {\n $ERROR(\"#8: Error matching character class \\d between character 2000 and 23ff\");\n}\n\nvar i9 = \"\";\nfor (var j = 9216; j < 10240; j++)\n i9 += String.fromCharCode(j);\nvar o9 = i9;\nif (i9.replace(/\\d+/g, \"\") !== o9) {\n $ERROR(\"#9: Error matching character class \\d between character 2400 and 27ff\");\n}\n\nvar i10 = \"\";\nfor (var j = 10240; j < 11264; j++)\n i10 += String.fromCharCode(j);\nvar o10 = i10;\nif (i10.replace(/\\d+/g, \"\") !== o10) {\n $ERROR(\"#10: Error matching character class \\d between character 2800 and 2bff\");\n}\n\nvar i11 = \"\";\nfor (var j = 11264; j < 12288; j++)\n i11 += String.fromCharCode(j);\nvar o11 = i11;\nif (i11.replace(/\\d+/g, \"\") !== o11) {\n $ERROR(\"#11: Error matching character class \\d between character 2c00 and 2fff\");\n}\n\nvar i12 = \"\";\nfor (var j = 12288; j < 13312; j++)\n i12 += String.fromCharCode(j);\nvar o12 = i12;\nif (i12.replace(/\\d+/g, \"\") !== o12) {\n $ERROR(\"#12: Error matching character class \\d between character 3000 and 33ff\");\n}\n\nvar i13 = \"\";\nfor (var j = 13312; j < 14336; j++)\n i13 += String.fromCharCode(j);\nvar o13 = i13;\nif (i13.replace(/\\d+/g, \"\") !== o13) {\n $ERROR(\"#13: Error matching character class \\d between character 3400 and 37ff\");\n}\n\nvar i14 = \"\";\nfor (var j = 14336; j < 15360; j++)\n i14 += String.fromCharCode(j);\nvar o14 = i14;\nif (i14.replace(/\\d+/g, \"\") !== o14) {\n $ERROR(\"#14: Error matching character class \\d between character 3800 and 3bff\");\n}\n\nvar i15 = \"\";\nfor (var j = 15360; j < 16384; j++)\n i15 += String.fromCharCode(j);\nvar o15 = i15;\nif (i15.replace(/\\d+/g, \"\") !== o15) {\n $ERROR(\"#15: Error matching character class \\d between character 3c00 and 3fff\");\n}\n\nvar i16 = \"\";\nfor (var j = 16384; j < 17408; j++)\n i16 += String.fromCharCode(j);\nvar o16 = i16;\nif (i16.replace(/\\d+/g, \"\") !== o16) {\n $ERROR(\"#16: Error matching character class \\d between character 4000 and 43ff\");\n}\n\nvar i17 = \"\";\nfor (var j = 17408; j < 18432; j++)\n i17 += String.fromCharCode(j);\nvar o17 = i17;\nif (i17.replace(/\\d+/g, \"\") !== o17) {\n $ERROR(\"#17: Error matching character class \\d between character 4400 and 47ff\");\n}\n\nvar i18 = \"\";\nfor (var j = 18432; j < 19456; j++)\n i18 += String.fromCharCode(j);\nvar o18 = i18;\nif (i18.replace(/\\d+/g, \"\") !== o18) {\n $ERROR(\"#18: Error matching character class \\d between character 4800 and 4bff\");\n}\n\nvar i19 = \"\";\nfor (var j = 19456; j < 20480; j++)\n i19 += String.fromCharCode(j);\nvar o19 = i19;\nif (i19.replace(/\\d+/g, \"\") !== o19) {\n $ERROR(\"#19: Error matching character class \\d between character 4c00 and 4fff\");\n}\n\nvar i20 = \"\";\nfor (var j = 20480; j < 21504; j++)\n i20 += String.fromCharCode(j);\nvar o20 = i20;\nif (i20.replace(/\\d+/g, \"\") !== o20) {\n $ERROR(\"#20: Error matching character class \\d between character 5000 and 53ff\");\n}\n\nvar i21 = \"\";\nfor (var j = 21504; j < 22528; j++)\n i21 += String.fromCharCode(j);\nvar o21 = i21;\nif (i21.replace(/\\d+/g, \"\") !== o21) {\n $ERROR(\"#21: Error matching character class \\d between character 5400 and 57ff\");\n}\n\nvar i22 = \"\";\nfor (var j = 22528; j < 23552; j++)\n i22 += String.fromCharCode(j);\nvar o22 = i22;\nif (i22.replace(/\\d+/g, \"\") !== o22) {\n $ERROR(\"#22: Error matching character class \\d between character 5800 and 5bff\");\n}\n\nvar i23 = \"\";\nfor (var j = 23552; j < 24576; j++)\n i23 += String.fromCharCode(j);\nvar o23 = i23;\nif (i23.replace(/\\d+/g, \"\") !== o23) {\n $ERROR(\"#23: Error matching character class \\d between character 5c00 and 5fff\");\n}\n\nvar i24 = \"\";\nfor (var j = 24576; j < 25600; j++)\n i24 += String.fromCharCode(j);\nvar o24 = i24;\nif (i24.replace(/\\d+/g, \"\") !== o24) {\n $ERROR(\"#24: Error matching character class \\d between character 6000 and 63ff\");\n}\n\nvar i25 = \"\";\nfor (var j = 25600; j < 26624; j++)\n i25 += String.fromCharCode(j);\nvar o25 = i25;\nif (i25.replace(/\\d+/g, \"\") !== o25) {\n $ERROR(\"#25: Error matching character class \\d between character 6400 and 67ff\");\n}\n\nvar i26 = \"\";\nfor (var j = 26624; j < 27648; j++)\n i26 += String.fromCharCode(j);\nvar o26 = i26;\nif (i26.replace(/\\d+/g, \"\") !== o26) {\n $ERROR(\"#26: Error matching character class \\d between character 6800 and 6bff\");\n}\n\nvar i27 = \"\";\nfor (var j = 27648; j < 28672; j++)\n i27 += String.fromCharCode(j);\nvar o27 = i27;\nif (i27.replace(/\\d+/g, \"\") !== o27) {\n $ERROR(\"#27: Error matching character class \\d between character 6c00 and 6fff\");\n}\n\nvar i28 = \"\";\nfor (var j = 28672; j < 29696; j++)\n i28 += String.fromCharCode(j);\nvar o28 = i28;\nif (i28.replace(/\\d+/g, \"\") !== o28) {\n $ERROR(\"#28: Error matching character class \\d between character 7000 and 73ff\");\n}\n\nvar i29 = \"\";\nfor (var j = 29696; j < 30720; j++)\n i29 += String.fromCharCode(j);\nvar o29 = i29;\nif (i29.replace(/\\d+/g, \"\") !== o29) {\n $ERROR(\"#29: Error matching character class \\d between character 7400 and 77ff\");\n}\n\nvar i30 = \"\";\nfor (var j = 30720; j < 31744; j++)\n i30 += String.fromCharCode(j);\nvar o30 = i30;\nif (i30.replace(/\\d+/g, \"\") !== o30) {\n $ERROR(\"#30: Error matching character class \\d between character 7800 and 7bff\");\n}\n\nvar i31 = \"\";\nfor (var j = 31744; j < 32768; j++)\n i31 += String.fromCharCode(j);\nvar o31 = i31;\nif (i31.replace(/\\d+/g, \"\") !== o31) {\n $ERROR(\"#31: Error matching character class \\d between character 7c00 and 7fff\");\n}\n\nvar i32 = \"\";\nfor (var j = 32768; j < 33792; j++)\n i32 += String.fromCharCode(j);\nvar o32 = i32;\nif (i32.replace(/\\d+/g, \"\") !== o32) {\n $ERROR(\"#32: Error matching character class \\d between character 8000 and 83ff\");\n}\n\nvar i33 = \"\";\nfor (var j = 33792; j < 34816; j++)\n i33 += String.fromCharCode(j);\nvar o33 = i33;\nif (i33.replace(/\\d+/g, \"\") !== o33) {\n $ERROR(\"#33: Error matching character class \\d between character 8400 and 87ff\");\n}\n\nvar i34 = \"\";\nfor (var j = 34816; j < 35840; j++)\n i34 += String.fromCharCode(j);\nvar o34 = i34;\nif (i34.replace(/\\d+/g, \"\") !== o34) {\n $ERROR(\"#34: Error matching character class \\d between character 8800 and 8bff\");\n}\n\nvar i35 = \"\";\nfor (var j = 35840; j < 36864; j++)\n i35 += String.fromCharCode(j);\nvar o35 = i35;\nif (i35.replace(/\\d+/g, \"\") !== o35) {\n $ERROR(\"#35: Error matching character class \\d between character 8c00 and 8fff\");\n}\n\nvar i36 = \"\";\nfor (var j = 36864; j < 37888; j++)\n i36 += String.fromCharCode(j);\nvar o36 = i36;\nif (i36.replace(/\\d+/g, \"\") !== o36) {\n $ERROR(\"#36: Error matching character class \\d between character 9000 and 93ff\");\n}\n\nvar i37 = \"\";\nfor (var j = 37888; j < 38912; j++)\n i37 += String.fromCharCode(j);\nvar o37 = i37;\nif (i37.replace(/\\d+/g, \"\") !== o37) {\n $ERROR(\"#37: Error matching character class \\d between character 9400 and 97ff\");\n}\n\nvar i38 = \"\";\nfor (var j = 38912; j < 39936; j++)\n i38 += String.fromCharCode(j);\nvar o38 = i38;\nif (i38.replace(/\\d+/g, \"\") !== o38) {\n $ERROR(\"#38: Error matching character class \\d between character 9800 and 9bff\");\n}\n\nvar i39 = \"\";\nfor (var j = 39936; j < 40960; j++)\n i39 += String.fromCharCode(j);\nvar o39 = i39;\nif (i39.replace(/\\d+/g, \"\") !== o39) {\n $ERROR(\"#39: Error matching character class \\d between character 9c00 and 9fff\");\n}\n\nvar i40 = \"\";\nfor (var j = 40960; j < 41984; j++)\n i40 += String.fromCharCode(j);\nvar o40 = i40;\nif (i40.replace(/\\d+/g, \"\") !== o40) {\n $ERROR(\"#40: Error matching character class \\d between character a000 and a3ff\");\n}\n\nvar i41 = \"\";\nfor (var j = 41984; j < 43008; j++)\n i41 += String.fromCharCode(j);\nvar o41 = i41;\nif (i41.replace(/\\d+/g, \"\") !== o41) {\n $ERROR(\"#41: Error matching character class \\d between character a400 and a7ff\");\n}\n\nvar i42 = \"\";\nfor (var j = 43008; j < 44032; j++)\n i42 += String.fromCharCode(j);\nvar o42 = i42;\nif (i42.replace(/\\d+/g, \"\") !== o42) {\n $ERROR(\"#42: Error matching character class \\d between character a800 and abff\");\n}\n\nvar i43 = \"\";\nfor (var j = 44032; j < 45056; j++)\n i43 += String.fromCharCode(j);\nvar o43 = i43;\nif (i43.replace(/\\d+/g, \"\") !== o43) {\n $ERROR(\"#43: Error matching character class \\d between character ac00 and afff\");\n}\n\nvar i44 = \"\";\nfor (var j = 45056; j < 46080; j++)\n i44 += String.fromCharCode(j);\nvar o44 = i44;\nif (i44.replace(/\\d+/g, \"\") !== o44) {\n $ERROR(\"#44: Error matching character class \\d between character b000 and b3ff\");\n}\n\nvar i45 = \"\";\nfor (var j = 46080; j < 47104; j++)\n i45 += String.fromCharCode(j);\nvar o45 = i45;\nif (i45.replace(/\\d+/g, \"\") !== o45) {\n $ERROR(\"#45: Error matching character class \\d between character b400 and b7ff\");\n}\n\nvar i46 = \"\";\nfor (var j = 47104; j < 48128; j++)\n i46 += String.fromCharCode(j);\nvar o46 = i46;\nif (i46.replace(/\\d+/g, \"\") !== o46) {\n $ERROR(\"#46: Error matching character class \\d between character b800 and bbff\");\n}\n\nvar i47 = \"\";\nfor (var j = 48128; j < 49152; j++)\n i47 += String.fromCharCode(j);\nvar o47 = i47;\nif (i47.replace(/\\d+/g, \"\") !== o47) {\n $ERROR(\"#47: Error matching character class \\d between character bc00 and bfff\");\n}\n\nvar i48 = \"\";\nfor (var j = 49152; j < 50176; j++)\n i48 += String.fromCharCode(j);\nvar o48 = i48;\nif (i48.replace(/\\d+/g, \"\") !== o48) {\n $ERROR(\"#48: Error matching character class \\d between character c000 and c3ff\");\n}\n\nvar i49 = \"\";\nfor (var j = 50176; j < 51200; j++)\n i49 += String.fromCharCode(j);\nvar o49 = i49;\nif (i49.replace(/\\d+/g, \"\") !== o49) {\n $ERROR(\"#49: Error matching character class \\d between character c400 and c7ff\");\n}\n\nvar i50 = \"\";\nfor (var j = 51200; j < 52224; j++)\n i50 += String.fromCharCode(j);\nvar o50 = i50;\nif (i50.replace(/\\d+/g, \"\") !== o50) {\n $ERROR(\"#50: Error matching character class \\d between character c800 and cbff\");\n}\n\nvar i51 = \"\";\nfor (var j = 52224; j < 53248; j++)\n i51 += String.fromCharCode(j);\nvar o51 = i51;\nif (i51.replace(/\\d+/g, \"\") !== o51) {\n $ERROR(\"#51: Error matching character class \\d between character cc00 and cfff\");\n}\n\nvar i52 = \"\";\nfor (var j = 53248; j < 54272; j++)\n i52 += String.fromCharCode(j);\nvar o52 = i52;\nif (i52.replace(/\\d+/g, \"\") !== o52) {\n $ERROR(\"#52: Error matching character class \\d between character d000 and d3ff\");\n}\n\nvar i53 = \"\";\nfor (var j = 54272; j < 55296; j++)\n i53 += String.fromCharCode(j);\nvar o53 = i53;\nif (i53.replace(/\\d+/g, \"\") !== o53) {\n $ERROR(\"#53: Error matching character class \\d between character d400 and d7ff\");\n}\n\nvar i54 = \"\";\nfor (var j = 55296; j < 56320; j++)\n i54 += String.fromCharCode(j);\nvar o54 = i54;\nif (i54.replace(/\\d+/g, \"\") !== o54) {\n $ERROR(\"#54: Error matching character class \\d between character d800 and dbff\");\n}\n\nvar i55 = \"\";\nfor (var j = 56320; j < 57344; j++)\n i55 += String.fromCharCode(j);\nvar o55 = i55;\nif (i55.replace(/\\d+/g, \"\") !== o55) {\n $ERROR(\"#55: Error matching character class \\d between character dc00 and dfff\");\n}\n\nvar i56 = \"\";\nfor (var j = 57344; j < 58368; j++)\n i56 += String.fromCharCode(j);\nvar o56 = i56;\nif (i56.replace(/\\d+/g, \"\") !== o56) {\n $ERROR(\"#56: Error matching character class \\d between character e000 and e3ff\");\n}\n\nvar i57 = \"\";\nfor (var j = 58368; j < 59392; j++)\n i57 += String.fromCharCode(j);\nvar o57 = i57;\nif (i57.replace(/\\d+/g, \"\") !== o57) {\n $ERROR(\"#57: Error matching character class \\d between character e400 and e7ff\");\n}\n\nvar i58 = \"\";\nfor (var j = 59392; j < 60416; j++)\n i58 += String.fromCharCode(j);\nvar o58 = i58;\nif (i58.replace(/\\d+/g, \"\") !== o58) {\n $ERROR(\"#58: Error matching character class \\d between character e800 and ebff\");\n}\n\nvar i59 = \"\";\nfor (var j = 60416; j < 61440; j++)\n i59 += String.fromCharCode(j);\nvar o59 = i59;\nif (i59.replace(/\\d+/g, \"\") !== o59) {\n $ERROR(\"#59: Error matching character class \\d between character ec00 and efff\");\n}\n\nvar i60 = \"\";\nfor (var j = 61440; j < 62464; j++)\n i60 += String.fromCharCode(j);\nvar o60 = i60;\nif (i60.replace(/\\d+/g, \"\") !== o60) {\n $ERROR(\"#60: Error matching character class \\d between character f000 and f3ff\");\n}\n\nvar i61 = \"\";\nfor (var j = 62464; j < 63488; j++)\n i61 += String.fromCharCode(j);\nvar o61 = i61;\nif (i61.replace(/\\d+/g, \"\") !== o61) {\n $ERROR(\"#61: Error matching character class \\d between character f400 and f7ff\");\n}\n\nvar i62 = \"\";\nfor (var j = 63488; j < 64512; j++)\n i62 += String.fromCharCode(j);\nvar o62 = i62;\nif (i62.replace(/\\d+/g, \"\") !== o62) {\n $ERROR(\"#62: Error matching character class \\d between character f800 and fbff\");\n}\n\nvar i63 = \"\";\nfor (var j = 64512; j < 65536; j++)\n i63 += String.fromCharCode(j);\nvar o63 = i63;\nif (i63.replace(/\\d+/g, \"\") !== o63) {\n $ERROR(\"#63: Error matching character class \\d between character fc00 and ffff\");\n}\n",
+ "id": "S15.10.2.12_A5_T1"
+ },
+ {
+ "section": "15.10.2.12",
+ "description": "ENGLISH ALPHABET",
+ "test": "var regexp_d = /\\d/;\n\n//CHECK#0041-005A\nvar result = true; \nfor (alpha = 0x0041; alpha <= 0x005A; alpha++) {\n if (regexp_d.exec(String.fromCharCode(alpha)) !== null) {\n result = false;\n }\n}\n\nif (result !== true) {\n $ERROR('#1: ENGLISH CAPITAL ALPHABET');\n} \n\n//CHECK#0061-007A\nvar result = true; \nfor (alpha = 0x0061; alpha <= 0x007A; alpha++) {\n if (regexp_d.exec(String.fromCharCode(alpha)) !== null) {\n result = false;\n }\n}\n\nif (result !== true) {\n $ERROR('#2: english small alphabet');\n} \n",
+ "id": "S15.10.2.12_A5_T2"
+ },
+ {
+ "section": "15.10.2.12",
+ "description": "RUSSIAN ALPHABET",
+ "test": "var regexp_d = /\\d/;\n\n//CHECK#0410-042F\nvar result = true; \nfor (alpha = 0x0410; alpha <= 0x042F; alpha++) {\n if (regexp_d.exec(String.fromCharCode(alpha)) !== null) {\n result = false;\n }\n}\n\nif (result !== true) {\n $ERROR('#1: RUSSIAN CAPITAL ALPHABET');\n}\n\n//CHECK#0430-044F\nvar result = true; \nfor (alpha = 0x0430; alpha <= 0x044F; alpha++) {\n if (regexp_d.exec(String.fromCharCode(alpha)) !== null) {\n result = false;\n }\n}\n\nif (result !== true) {\n $ERROR('#2: russian small alphabet');\n}\n",
+ "id": "S15.10.2.12_A5_T3"
+ },
+ {
+ "section": "15.10.2.12",
+ "description": "non-d",
+ "test": "//CHECK#1\nvar non_d = \"_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ\\f\\n\\r\\t\\v~`!@#$%^&*()-+={[}]|\\\\:;'<,>./? \" + '\"';\nif (/\\d/.exec(non_d) !== null) {\n $ERROR('#1: non-d');\n}\n\n//CHECK#2\nvar non_D = '0123456789';\nvar regexp_d = /\\d/g;\nvar k = 0;\nwhile (regexp_d.exec(non_D) !== null) {\n k++;\n}\n\nif (non_D.length !== k) {\n $ERROR('#2: non-D');\n} \n",
+ "id": "S15.10.2.12_A5_T4"
+ },
+ {
+ "section": "15.10.2.12",
+ "description": "0 - 9",
+ "test": "var i0 = \"\";\nfor (var j = 0; j < 1024; j++)\n i0 += String.fromCharCode(j);\nvar o0 = \"\\u0030\\u0031\\u0032\\u0033\\u0034\\u0035\\u0036\\u0037\\u0038\\u0039\";\nif (i0.replace(/\\D+/g, \"\") !== o0) {\n $ERROR(\"#0: Error matching character class \\D between character 0 and 3ff\");\n}\n\nvar i1 = \"\";\nfor (var j = 1024; j < 2048; j++)\n i1 += String.fromCharCode(j);\nvar o1 = \"\";\nif (i1.replace(/\\D+/g, \"\") !== o1) {\n $ERROR(\"#1: Error matching character class \\D between character 400 and 7ff\");\n}\n\nvar i2 = \"\";\nfor (var j = 2048; j < 3072; j++)\n i2 += String.fromCharCode(j);\nvar o2 = \"\";\nif (i2.replace(/\\D+/g, \"\") !== o2) {\n $ERROR(\"#2: Error matching character class \\D between character 800 and bff\");\n}\n\nvar i3 = \"\";\nfor (var j = 3072; j < 4096; j++)\n i3 += String.fromCharCode(j);\nvar o3 = \"\";\nif (i3.replace(/\\D+/g, \"\") !== o3) {\n $ERROR(\"#3: Error matching character class \\D between character c00 and fff\");\n}\n\nvar i4 = \"\";\nfor (var j = 4096; j < 5120; j++)\n i4 += String.fromCharCode(j);\nvar o4 = \"\";\nif (i4.replace(/\\D+/g, \"\") !== o4) {\n $ERROR(\"#4: Error matching character class \\D between character 1000 and 13ff\");\n}\n\nvar i5 = \"\";\nfor (var j = 5120; j < 6144; j++)\n i5 += String.fromCharCode(j);\nvar o5 = \"\";\nif (i5.replace(/\\D+/g, \"\") !== o5) {\n $ERROR(\"#5: Error matching character class \\D between character 1400 and 17ff\");\n}\n\nvar i6 = \"\";\nfor (var j = 6144; j < 7168; j++)\n i6 += String.fromCharCode(j);\nvar o6 = \"\";\nif (i6.replace(/\\D+/g, \"\") !== o6) {\n $ERROR(\"#6: Error matching character class \\D between character 1800 and 1bff\");\n}\n\nvar i7 = \"\";\nfor (var j = 7168; j < 8192; j++)\n i7 += String.fromCharCode(j);\nvar o7 = \"\";\nif (i7.replace(/\\D+/g, \"\") !== o7) {\n $ERROR(\"#7: Error matching character class \\D between character 1c00 and 1fff\");\n}\n\nvar i8 = \"\";\nfor (var j = 8192; j < 9216; j++)\n i8 += String.fromCharCode(j);\nvar o8 = \"\";\nif (i8.replace(/\\D+/g, \"\") !== o8) {\n $ERROR(\"#8: Error matching character class \\D between character 2000 and 23ff\");\n}\n\nvar i9 = \"\";\nfor (var j = 9216; j < 10240; j++)\n i9 += String.fromCharCode(j);\nvar o9 = \"\";\nif (i9.replace(/\\D+/g, \"\") !== o9) {\n $ERROR(\"#9: Error matching character class \\D between character 2400 and 27ff\");\n}\n\nvar i10 = \"\";\nfor (var j = 10240; j < 11264; j++)\n i10 += String.fromCharCode(j);\nvar o10 = \"\";\nif (i10.replace(/\\D+/g, \"\") !== o10) {\n $ERROR(\"#10: Error matching character class \\D between character 2800 and 2bff\");\n}\n\nvar i11 = \"\";\nfor (var j = 11264; j < 12288; j++)\n i11 += String.fromCharCode(j);\nvar o11 = \"\";\nif (i11.replace(/\\D+/g, \"\") !== o11) {\n $ERROR(\"#11: Error matching character class \\D between character 2c00 and 2fff\");\n}\n\nvar i12 = \"\";\nfor (var j = 12288; j < 13312; j++)\n i12 += String.fromCharCode(j);\nvar o12 = \"\";\nif (i12.replace(/\\D+/g, \"\") !== o12) {\n $ERROR(\"#12: Error matching character class \\D between character 3000 and 33ff\");\n}\n\nvar i13 = \"\";\nfor (var j = 13312; j < 14336; j++)\n i13 += String.fromCharCode(j);\nvar o13 = \"\";\nif (i13.replace(/\\D+/g, \"\") !== o13) {\n $ERROR(\"#13: Error matching character class \\D between character 3400 and 37ff\");\n}\n\nvar i14 = \"\";\nfor (var j = 14336; j < 15360; j++)\n i14 += String.fromCharCode(j);\nvar o14 = \"\";\nif (i14.replace(/\\D+/g, \"\") !== o14) {\n $ERROR(\"#14: Error matching character class \\D between character 3800 and 3bff\");\n}\n\nvar i15 = \"\";\nfor (var j = 15360; j < 16384; j++)\n i15 += String.fromCharCode(j);\nvar o15 = \"\";\nif (i15.replace(/\\D+/g, \"\") !== o15) {\n $ERROR(\"#15: Error matching character class \\D between character 3c00 and 3fff\");\n}\n\nvar i16 = \"\";\nfor (var j = 16384; j < 17408; j++)\n i16 += String.fromCharCode(j);\nvar o16 = \"\";\nif (i16.replace(/\\D+/g, \"\") !== o16) {\n $ERROR(\"#16: Error matching character class \\D between character 4000 and 43ff\");\n}\n\nvar i17 = \"\";\nfor (var j = 17408; j < 18432; j++)\n i17 += String.fromCharCode(j);\nvar o17 = \"\";\nif (i17.replace(/\\D+/g, \"\") !== o17) {\n $ERROR(\"#17: Error matching character class \\D between character 4400 and 47ff\");\n}\n\nvar i18 = \"\";\nfor (var j = 18432; j < 19456; j++)\n i18 += String.fromCharCode(j);\nvar o18 = \"\";\nif (i18.replace(/\\D+/g, \"\") !== o18) {\n $ERROR(\"#18: Error matching character class \\D between character 4800 and 4bff\");\n}\n\nvar i19 = \"\";\nfor (var j = 19456; j < 20480; j++)\n i19 += String.fromCharCode(j);\nvar o19 = \"\";\nif (i19.replace(/\\D+/g, \"\") !== o19) {\n $ERROR(\"#19: Error matching character class \\D between character 4c00 and 4fff\");\n}\n\nvar i20 = \"\";\nfor (var j = 20480; j < 21504; j++)\n i20 += String.fromCharCode(j);\nvar o20 = \"\";\nif (i20.replace(/\\D+/g, \"\") !== o20) {\n $ERROR(\"#20: Error matching character class \\D between character 5000 and 53ff\");\n}\n\nvar i21 = \"\";\nfor (var j = 21504; j < 22528; j++)\n i21 += String.fromCharCode(j);\nvar o21 = \"\";\nif (i21.replace(/\\D+/g, \"\") !== o21) {\n $ERROR(\"#21: Error matching character class \\D between character 5400 and 57ff\");\n}\n\nvar i22 = \"\";\nfor (var j = 22528; j < 23552; j++)\n i22 += String.fromCharCode(j);\nvar o22 = \"\";\nif (i22.replace(/\\D+/g, \"\") !== o22) {\n $ERROR(\"#22: Error matching character class \\D between character 5800 and 5bff\");\n}\n\nvar i23 = \"\";\nfor (var j = 23552; j < 24576; j++)\n i23 += String.fromCharCode(j);\nvar o23 = \"\";\nif (i23.replace(/\\D+/g, \"\") !== o23) {\n $ERROR(\"#23: Error matching character class \\D between character 5c00 and 5fff\");\n}\n\nvar i24 = \"\";\nfor (var j = 24576; j < 25600; j++)\n i24 += String.fromCharCode(j);\nvar o24 = \"\";\nif (i24.replace(/\\D+/g, \"\") !== o24) {\n $ERROR(\"#24: Error matching character class \\D between character 6000 and 63ff\");\n}\n\nvar i25 = \"\";\nfor (var j = 25600; j < 26624; j++)\n i25 += String.fromCharCode(j);\nvar o25 = \"\";\nif (i25.replace(/\\D+/g, \"\") !== o25) {\n $ERROR(\"#25: Error matching character class \\D between character 6400 and 67ff\");\n}\n\nvar i26 = \"\";\nfor (var j = 26624; j < 27648; j++)\n i26 += String.fromCharCode(j);\nvar o26 = \"\";\nif (i26.replace(/\\D+/g, \"\") !== o26) {\n $ERROR(\"#26: Error matching character class \\D between character 6800 and 6bff\");\n}\n\nvar i27 = \"\";\nfor (var j = 27648; j < 28672; j++)\n i27 += String.fromCharCode(j);\nvar o27 = \"\";\nif (i27.replace(/\\D+/g, \"\") !== o27) {\n $ERROR(\"#27: Error matching character class \\D between character 6c00 and 6fff\");\n}\n\nvar i28 = \"\";\nfor (var j = 28672; j < 29696; j++)\n i28 += String.fromCharCode(j);\nvar o28 = \"\";\nif (i28.replace(/\\D+/g, \"\") !== o28) {\n $ERROR(\"#28: Error matching character class \\D between character 7000 and 73ff\");\n}\n\nvar i29 = \"\";\nfor (var j = 29696; j < 30720; j++)\n i29 += String.fromCharCode(j);\nvar o29 = \"\";\nif (i29.replace(/\\D+/g, \"\") !== o29) {\n $ERROR(\"#29: Error matching character class \\D between character 7400 and 77ff\");\n}\n\nvar i30 = \"\";\nfor (var j = 30720; j < 31744; j++)\n i30 += String.fromCharCode(j);\nvar o30 = \"\";\nif (i30.replace(/\\D+/g, \"\") !== o30) {\n $ERROR(\"#30: Error matching character class \\D between character 7800 and 7bff\");\n}\n\nvar i31 = \"\";\nfor (var j = 31744; j < 32768; j++)\n i31 += String.fromCharCode(j);\nvar o31 = \"\";\nif (i31.replace(/\\D+/g, \"\") !== o31) {\n $ERROR(\"#31: Error matching character class \\D between character 7c00 and 7fff\");\n}\n\nvar i32 = \"\";\nfor (var j = 32768; j < 33792; j++)\n i32 += String.fromCharCode(j);\nvar o32 = \"\";\nif (i32.replace(/\\D+/g, \"\") !== o32) {\n $ERROR(\"#32: Error matching character class \\D between character 8000 and 83ff\");\n}\n\nvar i33 = \"\";\nfor (var j = 33792; j < 34816; j++)\n i33 += String.fromCharCode(j);\nvar o33 = \"\";\nif (i33.replace(/\\D+/g, \"\") !== o33) {\n $ERROR(\"#33: Error matching character class \\D between character 8400 and 87ff\");\n}\n\nvar i34 = \"\";\nfor (var j = 34816; j < 35840; j++)\n i34 += String.fromCharCode(j);\nvar o34 = \"\";\nif (i34.replace(/\\D+/g, \"\") !== o34) {\n $ERROR(\"#34: Error matching character class \\D between character 8800 and 8bff\");\n}\n\nvar i35 = \"\";\nfor (var j = 35840; j < 36864; j++)\n i35 += String.fromCharCode(j);\nvar o35 = \"\";\nif (i35.replace(/\\D+/g, \"\") !== o35) {\n $ERROR(\"#35: Error matching character class \\D between character 8c00 and 8fff\");\n}\n\nvar i36 = \"\";\nfor (var j = 36864; j < 37888; j++)\n i36 += String.fromCharCode(j);\nvar o36 = \"\";\nif (i36.replace(/\\D+/g, \"\") !== o36) {\n $ERROR(\"#36: Error matching character class \\D between character 9000 and 93ff\");\n}\n\nvar i37 = \"\";\nfor (var j = 37888; j < 38912; j++)\n i37 += String.fromCharCode(j);\nvar o37 = \"\";\nif (i37.replace(/\\D+/g, \"\") !== o37) {\n $ERROR(\"#37: Error matching character class \\D between character 9400 and 97ff\");\n}\n\nvar i38 = \"\";\nfor (var j = 38912; j < 39936; j++)\n i38 += String.fromCharCode(j);\nvar o38 = \"\";\nif (i38.replace(/\\D+/g, \"\") !== o38) {\n $ERROR(\"#38: Error matching character class \\D between character 9800 and 9bff\");\n}\n\nvar i39 = \"\";\nfor (var j = 39936; j < 40960; j++)\n i39 += String.fromCharCode(j);\nvar o39 = \"\";\nif (i39.replace(/\\D+/g, \"\") !== o39) {\n $ERROR(\"#39: Error matching character class \\D between character 9c00 and 9fff\");\n}\n\nvar i40 = \"\";\nfor (var j = 40960; j < 41984; j++)\n i40 += String.fromCharCode(j);\nvar o40 = \"\";\nif (i40.replace(/\\D+/g, \"\") !== o40) {\n $ERROR(\"#40: Error matching character class \\D between character a000 and a3ff\");\n}\n\nvar i41 = \"\";\nfor (var j = 41984; j < 43008; j++)\n i41 += String.fromCharCode(j);\nvar o41 = \"\";\nif (i41.replace(/\\D+/g, \"\") !== o41) {\n $ERROR(\"#41: Error matching character class \\D between character a400 and a7ff\");\n}\n\nvar i42 = \"\";\nfor (var j = 43008; j < 44032; j++)\n i42 += String.fromCharCode(j);\nvar o42 = \"\";\nif (i42.replace(/\\D+/g, \"\") !== o42) {\n $ERROR(\"#42: Error matching character class \\D between character a800 and abff\");\n}\n\nvar i43 = \"\";\nfor (var j = 44032; j < 45056; j++)\n i43 += String.fromCharCode(j);\nvar o43 = \"\";\nif (i43.replace(/\\D+/g, \"\") !== o43) {\n $ERROR(\"#43: Error matching character class \\D between character ac00 and afff\");\n}\n\nvar i44 = \"\";\nfor (var j = 45056; j < 46080; j++)\n i44 += String.fromCharCode(j);\nvar o44 = \"\";\nif (i44.replace(/\\D+/g, \"\") !== o44) {\n $ERROR(\"#44: Error matching character class \\D between character b000 and b3ff\");\n}\n\nvar i45 = \"\";\nfor (var j = 46080; j < 47104; j++)\n i45 += String.fromCharCode(j);\nvar o45 = \"\";\nif (i45.replace(/\\D+/g, \"\") !== o45) {\n $ERROR(\"#45: Error matching character class \\D between character b400 and b7ff\");\n}\n\nvar i46 = \"\";\nfor (var j = 47104; j < 48128; j++)\n i46 += String.fromCharCode(j);\nvar o46 = \"\";\nif (i46.replace(/\\D+/g, \"\") !== o46) {\n $ERROR(\"#46: Error matching character class \\D between character b800 and bbff\");\n}\n\nvar i47 = \"\";\nfor (var j = 48128; j < 49152; j++)\n i47 += String.fromCharCode(j);\nvar o47 = \"\";\nif (i47.replace(/\\D+/g, \"\") !== o47) {\n $ERROR(\"#47: Error matching character class \\D between character bc00 and bfff\");\n}\n\nvar i48 = \"\";\nfor (var j = 49152; j < 50176; j++)\n i48 += String.fromCharCode(j);\nvar o48 = \"\";\nif (i48.replace(/\\D+/g, \"\") !== o48) {\n $ERROR(\"#48: Error matching character class \\D between character c000 and c3ff\");\n}\n\nvar i49 = \"\";\nfor (var j = 50176; j < 51200; j++)\n i49 += String.fromCharCode(j);\nvar o49 = \"\";\nif (i49.replace(/\\D+/g, \"\") !== o49) {\n $ERROR(\"#49: Error matching character class \\D between character c400 and c7ff\");\n}\n\nvar i50 = \"\";\nfor (var j = 51200; j < 52224; j++)\n i50 += String.fromCharCode(j);\nvar o50 = \"\";\nif (i50.replace(/\\D+/g, \"\") !== o50) {\n $ERROR(\"#50: Error matching character class \\D between character c800 and cbff\");\n}\n\nvar i51 = \"\";\nfor (var j = 52224; j < 53248; j++)\n i51 += String.fromCharCode(j);\nvar o51 = \"\";\nif (i51.replace(/\\D+/g, \"\") !== o51) {\n $ERROR(\"#51: Error matching character class \\D between character cc00 and cfff\");\n}\n\nvar i52 = \"\";\nfor (var j = 53248; j < 54272; j++)\n i52 += String.fromCharCode(j);\nvar o52 = \"\";\nif (i52.replace(/\\D+/g, \"\") !== o52) {\n $ERROR(\"#52: Error matching character class \\D between character d000 and d3ff\");\n}\n\nvar i53 = \"\";\nfor (var j = 54272; j < 55296; j++)\n i53 += String.fromCharCode(j);\nvar o53 = \"\";\nif (i53.replace(/\\D+/g, \"\") !== o53) {\n $ERROR(\"#53: Error matching character class \\D between character d400 and d7ff\");\n}\n\nvar i54 = \"\";\nfor (var j = 55296; j < 56320; j++)\n i54 += String.fromCharCode(j);\nvar o54 = \"\";\nif (i54.replace(/\\D+/g, \"\") !== o54) {\n $ERROR(\"#54: Error matching character class \\D between character d800 and dbff\");\n}\n\nvar i55 = \"\";\nfor (var j = 56320; j < 57344; j++)\n i55 += String.fromCharCode(j);\nvar o55 = \"\";\nif (i55.replace(/\\D+/g, \"\") !== o55) {\n $ERROR(\"#55: Error matching character class \\D between character dc00 and dfff\");\n}\n\nvar i56 = \"\";\nfor (var j = 57344; j < 58368; j++)\n i56 += String.fromCharCode(j);\nvar o56 = \"\";\nif (i56.replace(/\\D+/g, \"\") !== o56) {\n $ERROR(\"#56: Error matching character class \\D between character e000 and e3ff\");\n}\n\nvar i57 = \"\";\nfor (var j = 58368; j < 59392; j++)\n i57 += String.fromCharCode(j);\nvar o57 = \"\";\nif (i57.replace(/\\D+/g, \"\") !== o57) {\n $ERROR(\"#57: Error matching character class \\D between character e400 and e7ff\");\n}\n\nvar i58 = \"\";\nfor (var j = 59392; j < 60416; j++)\n i58 += String.fromCharCode(j);\nvar o58 = \"\";\nif (i58.replace(/\\D+/g, \"\") !== o58) {\n $ERROR(\"#58: Error matching character class \\D between character e800 and ebff\");\n}\n\nvar i59 = \"\";\nfor (var j = 60416; j < 61440; j++)\n i59 += String.fromCharCode(j);\nvar o59 = \"\";\nif (i59.replace(/\\D+/g, \"\") !== o59) {\n $ERROR(\"#59: Error matching character class \\D between character ec00 and efff\");\n}\n\nvar i60 = \"\";\nfor (var j = 61440; j < 62464; j++)\n i60 += String.fromCharCode(j);\nvar o60 = \"\";\nif (i60.replace(/\\D+/g, \"\") !== o60) {\n $ERROR(\"#60: Error matching character class \\D between character f000 and f3ff\");\n}\n\nvar i61 = \"\";\nfor (var j = 62464; j < 63488; j++)\n i61 += String.fromCharCode(j);\nvar o61 = \"\";\nif (i61.replace(/\\D+/g, \"\") !== o61) {\n $ERROR(\"#61: Error matching character class \\D between character f400 and f7ff\");\n}\n\nvar i62 = \"\";\nfor (var j = 63488; j < 64512; j++)\n i62 += String.fromCharCode(j);\nvar o62 = \"\";\nif (i62.replace(/\\D+/g, \"\") !== o62) {\n $ERROR(\"#62: Error matching character class \\D between character f800 and fbff\");\n}\n\nvar i63 = \"\";\nfor (var j = 64512; j < 65536; j++)\n i63 += String.fromCharCode(j);\nvar o63 = \"\";\nif (i63.replace(/\\D+/g, \"\") !== o63) {\n $ERROR(\"#63: Error matching character class \\D between character fc00 and ffff\");\n}\n",
+ "id": "S15.10.2.12_A6_T1"
+ },
+ {
+ "section": "15.10.2.12",
+ "description": "ENGLISH ALPHABET",
+ "test": "var regexp_D = /\\D/;\n\n//CHECK#0041-005A\nvar result = true; \nfor (alpha = 0x0041; alpha <= 0x005A; alpha++) {\n str = String.fromCharCode(alpha);\n arr = regexp_D.exec(str); \n if ((arr === null) || (arr[0] !== str)) {\n result = false;\n }\n}\n\nif (result !== true) {\n $ERROR('#1: ENGLISH CAPITAL ALPHABET');\n} \n\n//CHECK#0061-007A\nvar result = true; \nfor (alpha = 0x0061; alpha <= 0x007A; alpha++) {\n str = String.fromCharCode(alpha);\n arr = regexp_D.exec(str); \n if ((arr === null) || (arr[0] !== str)) {\n result = false;\n }\n}\n\nif (result !== true) {\n $ERROR('#2: english small alphabet');\n} \n",
+ "id": "S15.10.2.12_A6_T2"
+ },
+ {
+ "section": "15.10.2.12",
+ "description": "RUSSIAN ALPHABET",
+ "test": "var regexp_D = /\\D/;\n\n//CHECK#0410-042F\nvar result = true; \nfor (alpha = 0x0410; alpha <= 0x042F; alpha++) {\n str = String.fromCharCode(alpha);\n arr = regexp_D.exec(str); \n if ((arr === null) || (arr[0] !== str)) {\n result = false;\n }\n}\n\nif (result !== true) {\n $ERROR('#1: RUSSIAN CAPITAL ALPHABET');\n}\n\n//CHECK#0430-044F\nvar result = true; \nfor (alpha = 0x0430; alpha <= 0x044F; alpha++) {\n str = String.fromCharCode(alpha);\n arr = regexp_D.exec(str); \n if ((arr === null) || (arr[0] !== str)) {\n result = false;\n }\n}\n\nif (result !== true) {\n $ERROR('#2: russian small alphabet');\n}\n",
+ "id": "S15.10.2.12_A6_T3"
+ },
+ {
+ "section": "15.10.2.12",
+ "description": "RUSSIAN ALPHABET",
+ "test": "//CHECK#1\nvar non_d = \"_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ\\f\\n\\r\\t\\v~`!@#$%^&*()-+={[}]|\\\\:;'<,>./? \" + '\"';\nvar regexp_D = /\\D/g;\nvar k = 0;\nwhile (regexp_D.exec(non_d) !== null) {\n k++;\n}\n\nif (non_d.length !== k) {\n $ERROR('#1: non-d');\n}\n\n//CHECK#2\nvar non_d = '0123456789';\nif (/\\D/.exec(non_d) !== null) {\n $ERROR('#2: non-d');\n}\n",
+ "id": "S15.10.2.12_A6_T4"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.10.2.13_CharacterClass.json b/website/resources/scripts/testcases2/15.10.2.13_CharacterClass.json
new file mode 100644
index 000000000..c9cc4eb15
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.10.2.13_CharacterClass.json
@@ -0,0 +1,182 @@
+{
+ "testCollection": {
+ "name": "15.10.2.13_CharacterClass",
+ "numTests": 29,
+ "tests": [
+ {
+ "section": "15.10.2.13",
+ "description": "Execute /[]a/.test(\"\\0a\\0a\") and check results",
+ "test": "__executed = /[]a/.test(\"\\0a\\0a\");;\n\n//CHECK#1\n if (__executed) {\n\t$ERROR('#1: /[]a/.test(\"\\\\0a\\\\0a\") === false');\n}\n\n",
+ "id": "S15.10.2.13_A1_T1"
+ },
+ {
+ "section": "15.10.2.13",
+ "description": "Execute /[a-c\\d]+/.exec(\"\\n\\n\\abc324234\\n\") and check results",
+ "test": "__executed = /[a-c\\d]+/.exec(\"\\n\\n\\abc324234\\n\");\n\n__expected = [\"abc324234\"];\n__expected.index = 2;\n__expected.input = \"\\n\\n\\abc324234\\n\";\n\n//CHECK#1\nif (__executed.length !== __expected.length) {\n\t$ERROR('#1: __executed = /[a-c\\\\d]+/.exec(\"\\\\n\\\\n\\\\abc324234\\\\n\"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length);\n}\n\n//CHECK#2\nif (__executed.index !== __expected.index) {\n\t$ERROR('#2: __executed = /[a-c\\\\d]+/.exec(\"\\\\n\\\\n\\\\abc324234\\\\n\"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index);\n}\n\n//CHECK#3\nif (__executed.input !== __expected.input) {\n\t$ERROR('#3: __executed = /[a-c\\\\d]+/.exec(\"\\\\n\\\\n\\\\abc324234\\\\n\"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input);\n}\n\n//CHECK#4\nfor(var index=0; index<__expected.length; index++) {\n\tif (__executed[index] !== __expected[index]) {\n\t\t$ERROR('#4: __executed = /[a-c\\\\d]+/.exec(\"\\\\n\\\\n\\\\abc324234\\\\n\"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]);\n\t}\n}\n\n",
+ "id": "S15.10.2.13_A1_T10"
+ },
+ {
+ "section": "15.10.2.13",
+ "description": "Execute /ab[.]?c/.exec(\"abc\") and check results",
+ "test": "__executed = /ab[.]?c/.exec(\"abc\");\n\n__expected = [\"abc\"];\n__expected.index = 0;\n__expected.input = \"abc\";\n\n//CHECK#1\nif (__executed.length !== __expected.length) {\n\t$ERROR('#1: __executed = /ab[.]?c/.exec(\"abc\"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length);\n}\n\n//CHECK#2\nif (__executed.index !== __expected.index) {\n\t$ERROR('#2: __executed = /ab[.]?c/.exec(\"abc\"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index);\n}\n\n//CHECK#3\nif (__executed.input !== __expected.input) {\n\t$ERROR('#3: __executed = /ab[.]?c/.exec(\"abc\"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input);\n}\n\n//CHECK#4\nfor(var index=0; index<__expected.length; index++) {\n\tif (__executed[index] !== __expected[index]) {\n\t\t$ERROR('#4: __executed = /ab[.]?c/.exec(\"abc\"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]);\n\t}\n}\n\n",
+ "id": "S15.10.2.13_A1_T11"
+ },
+ {
+ "section": "15.10.2.13",
+ "description": "Execute /a[b]c/.exec(\"abc\") and check results",
+ "test": "__executed = /a[b]c/.exec(\"abc\");\n\n__expected = [\"abc\"];\n__expected.index = 0;\n__expected.input = \"abc\";\n\n//CHECK#1\nif (__executed.length !== __expected.length) {\n\t$ERROR('#1: __executed = /a[b]c/.exec(\"abc\"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length);\n}\n\n//CHECK#2\nif (__executed.index !== __expected.index) {\n\t$ERROR('#2: __executed = /a[b]c/.exec(\"abc\"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index);\n}\n\n//CHECK#3\nif (__executed.input !== __expected.input) {\n\t$ERROR('#3: __executed = /a[b]c/.exec(\"abc\"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input);\n}\n\n//CHECK#4\nfor(var index=0; index<__expected.length; index++) {\n\tif (__executed[index] !== __expected[index]) {\n\t\t$ERROR('#4: __executed = /a[b]c/.exec(\"abc\"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]);\n\t}\n}\n\n",
+ "id": "S15.10.2.13_A1_T12"
+ },
+ {
+ "section": "15.10.2.13",
+ "description": "Execute /[a-z][^1-9][a-z]/.exec(\"a1b b2c c3d def f4g\") and check results",
+ "test": "__executed = /[a-z][^1-9][a-z]/.exec(\"a1b b2c c3d def f4g\");\n\n__expected = [\"def\"];\n__expected.index = 15;\n__expected.input = \"a1b b2c c3d def f4g\";\n\n//CHECK#1\nif (__executed.length !== __expected.length) {\n\t$ERROR('#1: __executed = /[a-z][^1-9][a-z]/.exec(\"a1b b2c c3d def f4g\"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length);\n}\n\n//CHECK#2\nif (__executed.index !== __expected.index) {\n\t$ERROR('#2: __executed = /[a-z][^1-9][a-z]/.exec(\"a1b b2c c3d def f4g\"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index);\n}\n\n//CHECK#3\nif (__executed.input !== __expected.input) {\n\t$ERROR('#3: __executed = /[a-z][^1-9][a-z]/.exec(\"a1b b2c c3d def f4g\"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input);\n}\n\n//CHECK#4\nfor(var index=0; index<__expected.length; index++) {\n\tif (__executed[index] !== __expected[index]) {\n\t\t$ERROR('#4: __executed = /[a-z][^1-9][a-z]/.exec(\"a1b b2c c3d def f4g\"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]);\n\t}\n}\n\n",
+ "id": "S15.10.2.13_A1_T13"
+ },
+ {
+ "section": "15.10.2.13",
+ "description": "Execute /[*&$]{3}/.exec(\"123*&$abc\") and check results",
+ "test": "__executed = /[*&$]{3}/.exec(\"123*&$abc\");\n\n__expected = [\"*&$\"];\n__expected.index = 3;\n__expected.input = \"123*&$abc\";\n\n//CHECK#1\nif (__executed.length !== __expected.length) {\n\t$ERROR('#1: __executed = /[*&$]{3}/.exec(\"123*&$abc\"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length);\n}\n\n//CHECK#2\nif (__executed.index !== __expected.index) {\n\t$ERROR('#2: __executed = /[*&$]{3}/.exec(\"123*&$abc\"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index);\n}\n\n//CHECK#3\nif (__executed.input !== __expected.input) {\n\t$ERROR('#3: __executed = /[*&$]{3}/.exec(\"123*&$abc\"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input);\n}\n\n//CHECK#4\nfor(var index=0; index<__expected.length; index++) {\n\tif (__executed[index] !== __expected[index]) {\n\t\t$ERROR('#4: __executed = /[*&$]{3}/.exec(\"123*&$abc\"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]);\n\t}\n}\n\n",
+ "id": "S15.10.2.13_A1_T14"
+ },
+ {
+ "section": "15.10.2.13",
+ "description": "Execute /[\\d][\\n][^\\d]/.exec(\"line1\\nline2\") and check results",
+ "test": "__executed = /[\\d][\\n][^\\d]/.exec(\"line1\\nline2\");\n\n__expected = [\"1\\nl\"];\n__expected.index = 4;\n__expected.input = \"line1\\nline2\";\n\n//CHECK#1\nif (__executed.length !== __expected.length) {\n\t$ERROR('#1: __executed = /[\\\\d][\\\\n][^\\\\d]/.exec(\"line1\\\\nline2\"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length);\n}\n\n//CHECK#2\nif (__executed.index !== __expected.index) {\n\t$ERROR('#2: __executed = /[\\\\d][\\\\n][^\\\\d]/.exec(\"line1\\\\nline2\"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index);\n}\n\n//CHECK#3\nif (__executed.input !== __expected.input) {\n\t$ERROR('#3: __executed = /[\\\\d][\\\\n][^\\\\d]/.exec(\"line1\\\\nline2\"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input);\n}\n\n//CHECK#4\nfor(var index=0; index<__expected.length; index++) {\n\tif (__executed[index] !== __expected[index]) {\n\t\t$ERROR('#4: __executed = /[\\\\d][\\\\n][^\\\\d]/.exec(\"line1\\\\nline2\"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]);\n\t}\n}\n\n",
+ "id": "S15.10.2.13_A1_T15"
+ },
+ {
+ "section": "15.10.2.13",
+ "description": "Execute /[\\d][\\12-\\14]{1,}[^\\d]/.exec(\"line1\\n\\n\\n\\n\\nline2\") and check results",
+ "test": "__executed = /[\\d][\\12-\\14]{1,}[^\\d]/.exec(\"line1\\n\\n\\n\\n\\nline2\");\n\n__expected = [\"1\\n\\n\\n\\n\\nl\"];\n__expected.index = 4;\n__expected.input = \"line1\\n\\n\\n\\n\\nline2\";\n\n//CHECK#1\nif (__executed.length !== __expected.length) {\n\t$ERROR('#1: __executed = /[\\\\d][\\\\12-\\\\14]{1,}[^\\\\d]/.exec(\"line1\\\\n\\\\n\\\\n\\\\n\\\\nline2\"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length);\n}\n\n//CHECK#2\nif (__executed.index !== __expected.index) {\n\t$ERROR('#2: __executed = /[\\\\d][\\\\12-\\\\14]{1,}[^\\\\d]/.exec(\"line1\\\\n\\\\n\\\\n\\\\n\\\\nline2\"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index);\n}\n\n//CHECK#3\nif (__executed.input !== __expected.input) {\n\t$ERROR('#3: __executed = /[\\\\d][\\\\12-\\\\14]{1,}[^\\\\d]/.exec(\"line1\\\\n\\\\n\\\\n\\\\n\\\\nline2\"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input);\n}\n\n//CHECK#4\nfor(var index=0; index<__expected.length; index++) {\n\tif (__executed[index] !== __expected[index]) {\n\t\t$ERROR('#4: __executed = /[\\\\d][\\\\12-\\\\14]{1,}[^\\\\d]/.exec(\"line1\\\\n\\\\n\\\\n\\\\n\\\\nline2\"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]);\n\t}\n}\n\n",
+ "id": "S15.10.2.13_A1_T16"
+ },
+ {
+ "section": "15.10.2.13",
+ "description": "Execute /[]/.exec(\"a[b\\n[]\\tc]d\") and check results",
+ "test": "__executed = /[]/.exec(\"a[b\\n[]\\tc]d\");\n\n//CHECK#1\nif (__executed !== null) {\n\t$ERROR('#1: /[]/.exec(\"a[b\\\\n[]\\\\tc]d\") === false');\n}\n\n",
+ "id": "S15.10.2.13_A1_T17"
+ },
+ {
+ "section": "15.10.2.13",
+ "description": "Execute /a[]/.test(\"\\0a\\0a\") and check results",
+ "test": "__executed = /a[]/.test(\"\\0a\\0a\");;\n\n//CHECK#1\nif (__executed) {\n\t$ERROR('#1: /a[]/.test(\"\\\\0a\\\\0a\") === false');\n}\n\n",
+ "id": "S15.10.2.13_A1_T2"
+ },
+ {
+ "section": "15.10.2.13",
+ "description": "Execute /q[ax-zb](?=\\s+)/.exec(\"qYqy \") and check results",
+ "test": "__executed = /q[ax-zb](?=\\s+)/.exec(\"qYqy \");\n\n__expected = [\"qy\"];\n__expected.index = 2;\n__expected.input = \"qYqy \";\n\n//CHECK#1\nif (__executed.length !== __expected.length) {\n\t$ERROR('#1: __executed = /q[ax-zb](?=\\\\s+)/.exec(\"qYqy \"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length);\n}\n\n//CHECK#2\nif (__executed.index !== __expected.index) {\n\t$ERROR('#2: __executed = /q[ax-zb](?=\\\\s+)/.exec(\"qYqy \"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index);\n}\n\n//CHECK#3\nif (__executed.input !== __expected.input) {\n\t$ERROR('#3: __executed = /q[ax-zb](?=\\\\s+)/.exec(\"qYqy \"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input);\n}\n\n//CHECK#4\nfor(var index=0; index<__expected.length; index++) {\n\tif (__executed[index] !== __expected[index]) {\n\t\t$ERROR('#4: __executed = /q[ax-zb](?=\\\\s+)/.exec(\"qYqy \"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]);\n\t}\n}\n\n",
+ "id": "S15.10.2.13_A1_T3"
+ },
+ {
+ "section": "15.10.2.13",
+ "description": "Execute /q[ax-zb](?=\\s+)/.exec(\"tqaqy \") and check results",
+ "test": "__executed = /q[ax-zb](?=\\s+)/.exec(\"tqaqy \");\n\n__expected = [\"qy\"];\n__expected.index = 3;\n__expected.input = \"tqaqy \";\n\n//CHECK#1\nif (__executed.length !== __expected.length) {\n\t$ERROR('#1: __executed = /q[ax-zb](?=\\\\s+)/.exec(\"tqaqy \"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length);\n}\n\n//CHECK#2\nif (__executed.index !== __expected.index) {\n\t$ERROR('#2: __executed = /q[ax-zb](?=\\\\s+)/.exec(\"tqaqy \"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index);\n}\n\n//CHECK#3\nif (__executed.input !== __expected.input) {\n\t$ERROR('#3: __executed = /q[ax-zb](?=\\\\s+)/.exec(\"tqaqy \"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input);\n}\n\n//CHECK#4\nfor(var index=0; index<__expected.length; index++) {\n\tif (__executed[index] !== __expected[index]) {\n\t\t$ERROR('#4: __executed = /q[ax-zb](?=\\\\s+)/.exec(\"tqaqy \"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]);\n\t}\n}\n\n",
+ "id": "S15.10.2.13_A1_T4"
+ },
+ {
+ "section": "15.10.2.13",
+ "description": "Execute /q[ax-zb](?=\\s+)/.exec(\"tqa\\t qy \") and check results",
+ "test": "__executed = /q[ax-zb](?=\\s+)/.exec(\"tqa\\t qy \");\n\n__expected = [\"qa\"];\n__expected.index = 1;\n__expected.input = \"tqa\\t qy \";\n\n//CHECK#1\nif (__executed.length !== __expected.length) {\n\t$ERROR('#1: __executed = /q[ax-zb](?=\\\\s+)/.exec(\"tqa\\\\t qy \"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length);\n}\n\n//CHECK#2\nif (__executed.index !== __expected.index) {\n\t$ERROR('#2: __executed = /q[ax-zb](?=\\\\s+)/.exec(\"tqa\\\\t qy \"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index);\n}\n\n//CHECK#3\nif (__executed.input !== __expected.input) {\n\t$ERROR('#3: __executed = /q[ax-zb](?=\\\\s+)/.exec(\"tqa\\\\t qy \"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input);\n}\n\n//CHECK#4\nfor(var index=0; index<__expected.length; index++) {\n\tif (__executed[index] !== __expected[index]) {\n\t\t$ERROR('#4: __executed = /q[ax-zb](?=\\\\s+)/.exec(\"tqa\\\\t qy \"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]);\n\t}\n}\n\n",
+ "id": "S15.10.2.13_A1_T5"
+ },
+ {
+ "section": "15.10.2.13",
+ "description": "Execute /ab[ercst]de/.exec(\"abcde\") and check results",
+ "test": "__executed = /ab[ercst]de/.exec(\"abcde\");\n\n__expected = [\"abcde\"];\n__expected.index = 0;\n__expected.input = \"abcde\";\n\n//CHECK#1\nif (__executed.length !== __expected.length) {\n\t$ERROR('#1: __executed = /ab[ercst]de/.exec(\"abcde\"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length);\n}\n\n//CHECK#2\nif (__executed.index !== __expected.index) {\n\t$ERROR('#2: __executed = /ab[ercst]de/.exec(\"abcde\"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index);\n}\n\n//CHECK#3\nif (__executed.input !== __expected.input) {\n\t$ERROR('#3: __executed = /ab[ercst]de/.exec(\"abcde\"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input);\n}\n\n//CHECK#4\nfor(var index=0; index<__expected.length; index++) {\n\tif (__executed[index] !== __expected[index]) {\n\t\t$ERROR('#4: __executed = /ab[ercst]de/.exec(\"abcde\"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]);\n\t}\n}\n\n",
+ "id": "S15.10.2.13_A1_T6"
+ },
+ {
+ "section": "15.10.2.13",
+ "description": "Execute /ab[erst]de/.test(\"abcde\") and check results",
+ "test": "__executed = /ab[erst]de/.test(\"abcde\");\n\n//CHECK#1\nif (__executed) {\n\t$ERROR('#1: /ab[erst]de/.test(\"abcde\") === false');\n}\n\n",
+ "id": "S15.10.2.13_A1_T7"
+ },
+ {
+ "section": "15.10.2.13",
+ "description": "Execute /[d-h]+/.exec(\"abcdefghijkl\") and check results",
+ "test": "__executed = /[d-h]+/.exec(\"abcdefghijkl\");\n\n__expected = [\"defgh\"];\n__expected.index = 3;\n__expected.input = \"abcdefghijkl\";\n\n//CHECK#1\nif (__executed.length !== __expected.length) {\n\t$ERROR('#1: __executed = /[d-h]+/.exec(\"abcdefghijkl\"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length);\n}\n\n//CHECK#2\nif (__executed.index !== __expected.index) {\n\t$ERROR('#2: __executed = /[d-h]+/.exec(\"abcdefghijkl\"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index);\n}\n\n//CHECK#3\nif (__executed.input !== __expected.input) {\n\t$ERROR('#3: __executed = /[d-h]+/.exec(\"abcdefghijkl\"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input);\n}\n\n//CHECK#4\nfor(var index=0; index<__expected.length; index++) {\n\tif (__executed[index] !== __expected[index]) {\n\t\t$ERROR('#4: __executed = /[d-h]+/.exec(\"abcdefghijkl\"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]);\n\t}\n}\n\n",
+ "id": "S15.10.2.13_A1_T8"
+ },
+ {
+ "section": "15.10.2.13",
+ "description": "Execute /[1234567].{2}/.exec(\"abc6defghijkl\") and check results",
+ "test": "__executed = /[1234567].{2}/.exec(\"abc6defghijkl\");\n\n__expected = [\"6de\"];\n__expected.index = 3;\n__expected.input = \"abc6defghijkl\";\n\n//CHECK#1\nif (__executed.length !== __expected.length) {\n\t$ERROR('#1: __executed = /[1234567].{2}/.exec(\"abc6defghijkl\"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length);\n}\n\n//CHECK#2\nif (__executed.index !== __expected.index) {\n\t$ERROR('#2: __executed = /[1234567].{2}/.exec(\"abc6defghijkl\"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index);\n}\n\n//CHECK#3\nif (__executed.input !== __expected.input) {\n\t$ERROR('#3: __executed = /[1234567].{2}/.exec(\"abc6defghijkl\"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input);\n}\n\n//CHECK#4\nfor(var index=0; index<__expected.length; index++) {\n\tif (__executed[index] !== __expected[index]) {\n\t\t$ERROR('#4: __executed = /[1234567].{2}/.exec(\"abc6defghijkl\"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]);\n\t}\n}\n\n",
+ "id": "S15.10.2.13_A1_T9"
+ },
+ {
+ "section": "15.10.2.13",
+ "description": "Execute /[^]a/m.exec(\"a\\naba\") and check results",
+ "test": "__executed = /[^]a/m.exec(\"a\\naba\");\n\n__expected = [\"\\na\"];\n__expected.index = 1;\n__expected.input = \"a\\naba\";\n\n//CHECK#1\nif (__executed.length !== __expected.length) {\n\t$ERROR('#1: __executed = /[^]a/m.exec(\"a\\\\naba\"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length);\n}\n\n//CHECK#2\nif (__executed.index !== __expected.index) {\n\t$ERROR('#2: __executed = /[^]a/m.exec(\"a\\\\naba\"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index);\n}\n\n//CHECK#3\nif (__executed.input !== __expected.input) {\n\t$ERROR('#3: __executed = /[^]a/m.exec(\"a\\\\naba\"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input);\n}\n\n//CHECK#4\nfor(var index=0; index<__expected.length; index++) {\n\tif (__executed[index] !== __expected[index]) {\n\t\t$ERROR('#4: __executed = /[^]a/m.exec(\"a\\\\naba\"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]);\n\t}\n}\n\n",
+ "id": "S15.10.2.13_A2_T1"
+ },
+ {
+ "section": "15.10.2.13",
+ "description": "Execute /a[^]/.exec(\" a\\t\\n\") and check results",
+ "test": "__executed = /a[^]/.exec(\" a\\t\\n\");\n\n__expected = [\"a\\t\"];\n__expected.index = 3;\n__expected.input = \" a\\t\\n\";\n\n//CHECK#1\nif (__executed.length !== __expected.length) {\n\t$ERROR('#1: __executed = /a[^]/.exec(\" a\\\\t\\\\n\"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length);\n}\n\n//CHECK#2\nif (__executed.index !== __expected.index) {\n\t$ERROR('#2: __executed = /a[^]/.exec(\" a\\\\t\\\\n\"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index);\n}\n\n//CHECK#3\nif (__executed.input !== __expected.input) {\n\t$ERROR('#3: __executed = /a[^]/.exec(\" a\\\\t\\\\n\"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input);\n}\n\n//CHECK#4\nfor(var index=0; index<__expected.length; index++) {\n\tif (__executed[index] !== __expected[index]) {\n\t\t$ERROR('#4: __executed = /a[^]/.exec(\" a\\\\t\\\\n\"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]);\n\t}\n}\n\n",
+ "id": "S15.10.2.13_A2_T2"
+ },
+ {
+ "section": "15.10.2.13",
+ "description": "Execute /a[^b-z]\\s+/.exec(\"ab an az aY n\") and check results",
+ "test": "__executed = /a[^b-z]\\s+/.exec(\"ab an az aY n\");\n\n__expected = [\"aY \"];\n__expected.index = 9;\n__expected.input = \"ab an az aY n\";\n\n//CHECK#1\nif (__executed.length !== __expected.length) {\n\t$ERROR('#1: __executed = /a[^b-z]\\\\s+/.exec(\"ab an az aY n\"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length);\n}\n\n//CHECK#2\nif (__executed.index !== __expected.index) {\n\t$ERROR('#2: __executed = /a[^b-z]\\\\s+/.exec(\"ab an az aY n\"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index);\n}\n\n//CHECK#3\nif (__executed.input !== __expected.input) {\n\t$ERROR('#3: __executed = /a[^b-z]\\\\s+/.exec(\"ab an az aY n\"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input);\n}\n\n//CHECK#4\nfor(var index=0; index<__expected.length; index++) {\n\tif (__executed[index] !== __expected[index]) {\n\t\t$ERROR('#4: __executed = /a[^b-z]\\\\s+/.exec(\"ab an az aY n\"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]);\n\t}\n}\n\n",
+ "id": "S15.10.2.13_A2_T3"
+ },
+ {
+ "section": "15.10.2.13",
+ "description": "Execute /[^\\b]+/g.exec(\"easy\\bto\\u0008ride\") and check results",
+ "test": "__executed = /[^\\b]+/g.exec(\"easy\\bto\\u0008ride\");\n\n__expected = [\"easy\"];\n__expected.index = 0;\n__expected.input = \"easy\\bto\\u0008ride\";\n\n//CHECK#1\nif (__executed.length !== __expected.length) {\n\t$ERROR('#1: __executed = /[^\\\\b]+/g.exec(\"easy\\\\bto\\\\u0008ride\"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length);\n}\n\n//CHECK#2\nif (__executed.index !== __expected.index) {\n\t$ERROR('#2: __executed = /[^\\\\b]+/g.exec(\"easy\\\\bto\\\\u0008ride\"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index);\n}\n\n//CHECK#3\nif (__executed.input !== __expected.input) {\n\t$ERROR('#3: __executed = /[^\\\\b]+/g.exec(\"easy\\\\bto\\\\u0008ride\"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input);\n}\n\n//CHECK#4\nfor(var index=0; index<__expected.length; index++) {\n\tif (__executed[index] !== __expected[index]) {\n\t\t$ERROR('#4: __executed = /[^\\\\b]+/g.exec(\"easy\\\\bto\\\\u0008ride\"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]);\n\t}\n}\n\n",
+ "id": "S15.10.2.13_A2_T4"
+ },
+ {
+ "section": "15.10.2.13",
+ "description": "Execute /a[^1-9]c/.exec(\"abc\") and check results",
+ "test": "__executed = /a[^1-9]c/.exec(\"abc\");\n\n__expected = [\"abc\"];\n__expected.index = 0;\n__expected.input = \"abc\";\n\n//CHECK#1\nif (__executed.length !== __expected.length) {\n\t$ERROR('#1: __executed = /a[^1-9]c/.exec(\"abc\"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length);\n}\n\n//CHECK#2\nif (__executed.index !== __expected.index) {\n\t$ERROR('#2: __executed = /a[^1-9]c/.exec(\"abc\"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index);\n}\n\n//CHECK#3\nif (__executed.input !== __expected.input) {\n\t$ERROR('#3: __executed = /a[^1-9]c/.exec(\"abc\"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input);\n}\n\n//CHECK#4\nfor(var index=0; index<__expected.length; index++) {\n\tif (__executed[index] !== __expected[index]) {\n\t\t$ERROR('#4: __executed = /a[^1-9]c/.exec(\"abc\"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]);\n\t}\n}\n\n",
+ "id": "S15.10.2.13_A2_T5"
+ },
+ {
+ "section": "15.10.2.13",
+ "description": "Execute /a[^b]c/.test(\"abc\") and check results",
+ "test": "__executed = /a[^b]c/.test(\"abc\");\n\n//CHECK#1\nif (__executed) {\n\t$ERROR('#1: /a[^b]c/.test(\"abc\") === false');\n}\n\n",
+ "id": "S15.10.2.13_A2_T6"
+ },
+ {
+ "section": "15.10.2.13",
+ "description": "Execute /[^a-z]{4}/.exec(\"abc#$%def%&*@ghi\") and check results",
+ "test": "__executed = /[^a-z]{4}/.exec(\"abc#$%def%&*@ghi\");\n\n__expected = [\"%&*@\"];\n__expected.index = 9;\n__expected.input = \"abc#$%def%&*@ghi\";\n\n//CHECK#1\nif (__executed.length !== __expected.length) {\n\t$ERROR('#1: __executed = /[^a-z]{4}/.exec(\"abc#$%def%&*@ghi\"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length);\n}\n\n//CHECK#2\nif (__executed.index !== __expected.index) {\n\t$ERROR('#2: __executed = /[^a-z]{4}/.exec(\"abc#$%def%&*@ghi\"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index);\n}\n\n//CHECK#3\nif (__executed.input !== __expected.input) {\n\t$ERROR('#3: __executed = /[^a-z]{4}/.exec(\"abc#$%def%&*@ghi\"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input);\n}\n\n//CHECK#4\nfor(var index=0; index<__expected.length; index++) {\n\tif (__executed[index] !== __expected[index]) {\n\t\t$ERROR('#4: __executed = /[^a-z]{4}/.exec(\"abc#$%def%&*@ghi\"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]);\n\t}\n}\n\n",
+ "id": "S15.10.2.13_A2_T7"
+ },
+ {
+ "section": "15.10.2.13",
+ "description": "Execute /[^]/.exec(\"abc#$%def%&*@ghi\") and check results",
+ "test": "__executed = /[^]/.exec(\"abc#$%def%&*@ghi\");\n\n__expected = [\"a\"];\n__expected.index = 0;\n__expected.input = \"abc#$%def%&*@ghi\";\n\n//CHECK#1\nif (__executed.length !== __expected.length) {\n\t$ERROR('#1: __executed = /[^]/.exec(\"abc#$%def%&*@ghi\"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length);\n}\n\n//CHECK#2\nif (__executed.index !== __expected.index) {\n\t$ERROR('#2: __executed = /[^]/.exec(\"abc#$%def%&*@ghi\"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index);\n}\n\n//CHECK#3\nif (__executed.input !== __expected.input) {\n\t$ERROR('#3: __executed = /[^]/.exec(\"abc#$%def%&*@ghi\"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input);\n}\n\n//CHECK#4\nfor(var index=0; index<__expected.length; index++) {\n\tif (__executed[index] !== __expected[index]) {\n\t\t$ERROR('#4: __executed = /[^]/.exec(\"abc#$%def%&*@ghi\"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]);\n\t}\n}\n\n",
+ "id": "S15.10.2.13_A2_T8"
+ },
+ {
+ "section": "15.10.2.13",
+ "description": "Execute /.[\\b]./.exec(\"abc\\bdef\") and check results",
+ "test": "__executed = /.[\\b]./.exec(\"abc\\bdef\");\n\n__expected = [\"c\\bd\"];\n__expected.index = 2;\n__expected.input = \"abc\\bdef\";\n\n//CHECK#1\nif (__executed.length !== __expected.length) {\n\t$ERROR('#1: __executed = /.[\\\\b]./.exec(\"abc\\\\bdef\"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length);\n}\n\n//CHECK#2\nif (__executed.index !== __expected.index) {\n\t$ERROR('#2: __executed = /.[\\\\b]./.exec(\"abc\\\\bdef\"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index);\n}\n\n//CHECK#3\nif (__executed.input !== __expected.input) {\n\t$ERROR('#3: __executed = /.[\\\\b]./.exec(\"abc\\\\bdef\"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input);\n}\n\n//CHECK#4\nfor(var index=0; index<__expected.length; index++) {\n\tif (__executed[index] !== __expected[index]) {\n\t\t$ERROR('#4: __executed = /.[\\\\b]./.exec(\"abc\\\\bdef\"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]);\n\t}\n}\n\n",
+ "id": "S15.10.2.13_A3_T1"
+ },
+ {
+ "section": "15.10.2.13",
+ "description": "Execute /c[\\b]{3}d/.exec(\"abc\\b\\b\\bdef\") and check results",
+ "test": "__executed = /c[\\b]{3}d/.exec(\"abc\\b\\b\\bdef\");\n\n__expected = [\"c\\b\\b\\bd\"];\n__expected.index = 2;\n__expected.input = \"abc\\b\\b\\bdef\";\n\n//CHECK#1\nif (__executed.length !== __expected.length) {\n\t$ERROR('#1: __executed = /c[\\\\b]{3}d/.exec(\"abc\\\\b\\\\b\\\\bdef\"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length);\n}\n\n//CHECK#2\nif (__executed.index !== __expected.index) {\n\t$ERROR('#2: __executed = /c[\\\\b]{3}d/.exec(\"abc\\\\b\\\\b\\\\bdef\"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index);\n}\n\n//CHECK#3\nif (__executed.input !== __expected.input) {\n\t$ERROR('#3: __executed = /c[\\\\b]{3}d/.exec(\"abc\\\\b\\\\b\\\\bdef\"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input);\n}\n\n//CHECK#4\nfor(var index=0; index<__expected.length; index++) {\n\tif (__executed[index] !== __expected[index]) {\n\t\t$ERROR('#4: __executed = /c[\\\\b]{3}d/.exec(\"abc\\\\b\\\\b\\\\bdef\"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]);\n\t}\n}\n\n",
+ "id": "S15.10.2.13_A3_T2"
+ },
+ {
+ "section": "15.10.2.13",
+ "description": "Execute /[^\\[\\b\\]]+/.exec(\"abc\\bdef\") and check results",
+ "test": "__executed = /[^\\[\\b\\]]+/.exec(\"abc\\bdef\");\n\n__expected = [\"abc\"];\n__expected.index = 0;\n__expected.input = \"abc\\bdef\";\n\n//CHECK#1\nif (__executed.length !== __expected.length) {\n\t$ERROR('#1: __executed = /[^\\\\[\\\\b\\\\]]+/.exec(\"abc\\\\bdef\"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length);\n}\n\n//CHECK#2\nif (__executed.index !== __expected.index) {\n\t$ERROR('#2: __executed = /[^\\\\[\\\\b\\\\]]+/.exec(\"abc\\\\bdef\"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index);\n}\n\n//CHECK#3\nif (__executed.input !== __expected.input) {\n\t$ERROR('#3: __executed = /[^\\\\[\\\\b\\\\]]+/.exec(\"abc\\\\bdef\"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input);\n}\n\n//CHECK#4\nfor(var index=0; index<__expected.length; index++) {\n\tif (__executed[index] !== __expected[index]) {\n\t\t$ERROR('#4: __executed = /[^\\\\[\\\\b\\\\]]+/.exec(\"abc\\\\bdef\"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]);\n\t}\n}\n\n",
+ "id": "S15.10.2.13_A3_T3"
+ },
+ {
+ "section": "15.10.2.13",
+ "description": "Execute /[^\\[\\b\\]]+/.exec(\"abcdef\") and check results",
+ "test": "__executed = /[^\\[\\b\\]]+/.exec(\"abcdef\");\n\n__expected = [\"abcdef\"];\n__expected.index = 0;\n__expected.input = \"abcdef\";\n\n//CHECK#1\nif (__executed.length !== __expected.length) {\n\t$ERROR('#1: __executed = /[^\\\\[\\\\b\\\\]]+/.exec(\"abcdef\"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length);\n}\n\n//CHECK#2\nif (__executed.index !== __expected.index) {\n\t$ERROR('#2: __executed = /[^\\\\[\\\\b\\\\]]+/.exec(\"abcdef\"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index);\n}\n\n//CHECK#3\nif (__executed.input !== __expected.input) {\n\t$ERROR('#3: __executed = /[^\\\\[\\\\b\\\\]]+/.exec(\"abcdef\"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input);\n}\n\n//CHECK#4\nfor(var index=0; index<__expected.length; index++) {\n\tif (__executed[index] !== __expected[index]) {\n\t\t$ERROR('#4: __executed = /[^\\\\[\\\\b\\\\]]+/.exec(\"abcdef\"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]);\n\t}\n}\n\n",
+ "id": "S15.10.2.13_A3_T4"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.10.2.15_NonemptyClassRanges.json b/website/resources/scripts/testcases2/15.10.2.15_NonemptyClassRanges.json
new file mode 100644
index 000000000..ab9403bdf
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.10.2.15_NonemptyClassRanges.json
@@ -0,0 +1,254 @@
+{
+ "testCollection": {
+ "name": "15.10.2.15_NonemptyClassRanges",
+ "numTests": 41,
+ "tests": [
+ {
+ "section": "15.10.2.15",
+ "description": "Checking if execution of \"/[b-ac-e]/.exec(\"a\")\" leads to throwing the correct exception",
+ "test": "//CHECK#1\ntry {\n $ERROR('#1.1: /[b-ac-e]/.exec(\"a\") throw SyntaxError. Actual: ' + (new RegExp(\"[b-ac-e]\").exec(\"a\")));\n} catch (e) {\n if((e instanceof SyntaxError) !== true){\n $ERROR('#1.2: /[b-ac-e]/.exec(\"a\") throw SyntaxError. Actual: ' + (e));\n }\n}\n",
+ "id": "S15.10.2.15_A1_T1"
+ },
+ {
+ "section": "15.10.2.15",
+ "description": "Checking if execution of \"/[\\10b-G]/.exec(\"a\")\" leads to throwing the correct exception",
+ "test": "//CHECK#1\ntry {\n $ERROR('#1.1: /[\\\\10b-G]/.exec(\"a\") throw SyntaxError. Actual: ' + (new RegExp(\"[\\\\10b-G]\").exec(\"a\")));\n} catch (e) {\n if((e instanceof SyntaxError) !== true){\n $ERROR('#1.2: /[\\\\10b-G]/.exec(\"a\") throw SyntaxError. Actual: ' + (e));\n }\n}\n",
+ "id": "S15.10.2.15_A1_T10"
+ },
+ {
+ "section": "15.10.2.15",
+ "description": "Checking if execution of \"/[\\bd-G]/.exec(\"a\")\" leads to throwing the correct exception",
+ "test": "//CHECK#1\ntry {\n $ERROR('#1.1: /[\\\\bd-G]/.exec(\"a\") throw SyntaxError. Actual: ' + (new RegExp(\"[\\\\bd-G]\").exec(\"a\")));\n} catch (e) {\n if((e instanceof SyntaxError) !== true){\n $ERROR('#1.2: /[\\\\bd-G]/.exec(\"a\") throw SyntaxError. Actual: ' + (e));\n }\n}\n",
+ "id": "S15.10.2.15_A1_T11"
+ },
+ {
+ "section": "15.10.2.15",
+ "description": "Checking if execution of \"/[\\Bd-G]/.exec(\"a\")\" leads to throwing the correct exception",
+ "test": "//CHECK#1\ntry {\n $ERROR('#1.1: /[\\\\Bd-G]/.exec(\"a\") throw SyntaxError. Actual: ' + (new RegExp(\"[\\\\Bd-G]\").exec(\"a\")));\n} catch (e) {\n if((e instanceof SyntaxError) !== true){\n $ERROR('#1.2: /[\\\\Bd-G]/.exec(\"a\") throw SyntaxError. Actual: ' + (e));\n }\n}\n",
+ "id": "S15.10.2.15_A1_T12"
+ },
+ {
+ "section": "15.10.2.15",
+ "description": "Checking if execution of \"/[\\td-G]/.exec(\"a\")\" leads to throwing the correct exception",
+ "test": "//CHECK#1\ntry {\n $ERROR('#1.1: /[\\\\td-G]/.exec(\"a\") throw SyntaxError. Actual: ' + (new RegExp(\"[\\\\td-G]\").exec(\"a\")));\n} catch (e) {\n if((e instanceof SyntaxError) !== true){\n $ERROR('#1.2: /[\\\\td-G]/.exec(\"a\") throw SyntaxError. Actual: ' + (e));\n }\n}\n",
+ "id": "S15.10.2.15_A1_T13"
+ },
+ {
+ "section": "15.10.2.15",
+ "description": "Checking if execution of \"/[\\nd-G]/.exec(\"a\")\" leads to throwing the correct exception",
+ "test": "//CHECK#1\ntry {\n $ERROR('#1.1: /[\\\\nd-G]/.exec(\"a\") throw SyntaxError. Actual: ' + (new RegExp(\"[\\\\nd-G]\").exec(\"a\")));\n} catch (e) {\n if((e instanceof SyntaxError) !== true){\n $ERROR('#1.2: /[\\\\nd-G]/.exec(\"a\") throw SyntaxError. Actual: ' + (e));\n }\n}\n",
+ "id": "S15.10.2.15_A1_T14"
+ },
+ {
+ "section": "15.10.2.15",
+ "description": "Checking if execution of \"/[\\vd-G]/.exec(\"a\")\" leads to throwing the correct exception",
+ "test": "//CHECK#1\ntry {\n $ERROR('#1.1: /[\\\\vd-G]/.exec(\"a\") throw SyntaxError. Actual: ' + (new RegExp(\"[\\\\vd-G]\").exec(\"a\")));\n} catch (e) {\n if((e instanceof SyntaxError) !== true){\n $ERROR('#1.2: /[\\\\vd-G]/.exec(\"a\") throw SyntaxError. Actual: ' + (e));\n }\n}\n",
+ "id": "S15.10.2.15_A1_T15"
+ },
+ {
+ "section": "15.10.2.15",
+ "description": "Checking if execution of \"/[\\fd-G]/.exec(\"a\")\" leads to throwing the correct exception",
+ "test": "//CHECK#1\ntry {\n $ERROR('#1.1: /[\\\\fd-G]/.exec(\"a\") throw SyntaxError. Actual: ' + (new RegExp(\"[\\\\fd-G]\").exec(\"a\")));\n} catch (e) {\n if((e instanceof SyntaxError) !== true){\n $ERROR('#1.2: /[\\\\fd-G]/.exec(\"a\") throw SyntaxError. Actual: ' + (e));\n }\n}\n",
+ "id": "S15.10.2.15_A1_T16"
+ },
+ {
+ "section": "15.10.2.15",
+ "description": "Checking if execution of \"/[\\rd-G]/.exec(\"a\")\" leads to throwing the correct exception",
+ "test": "//CHECK#1\ntry {\n $ERROR('#1.1: /[\\\\rd-G]/.exec(\"a\") throw SyntaxError. Actual: ' + (new RegExp(\"[\\\\rd-G]\").exec(\"a\")));\n} catch (e) {\n if((e instanceof SyntaxError) !== true){\n $ERROR('#1.2: /[\\\\rd-G]/.exec(\"a\") throw SyntaxError. Actual: ' + (e));\n }\n}\n",
+ "id": "S15.10.2.15_A1_T17"
+ },
+ {
+ "section": "15.10.2.15",
+ "description": "Checking if execution of \"/[\\c0001d-G]/.exec(\"1\")\" leads to throwing the correct exception",
+ "test": "//CHECK#1\ntry {\n $ERROR('#1.1: /[\\\\c0001d-G]/.exec(\"1\") throw SyntaxError. Actual: ' + (new RegExp(\"[\\\\c0001d-G]\").exec(\"1\")));\n} catch (e) {\n if((e instanceof SyntaxError) !== true){\n $ERROR('#1.2: /[\\\\c0001d-G]/.exec(\"1\") throw SyntaxError. Actual: ' + (e));\n }\n}\n",
+ "id": "S15.10.2.15_A1_T18"
+ },
+ {
+ "section": "15.10.2.15",
+ "description": "Checking if execution of \"/[\\x0061d-G]/.exec(\"1\")\" leads to throwing the correct exception",
+ "test": "//CHECK#1\ntry {\n $ERROR('#1.1: /[\\\\x0061d-G]/.exec(\"1\") throw SyntaxError. Actual: ' + (new RegExp(\"[\\\\x0061d-G]\").exec(\"1\")));\n} catch (e) {\n if((e instanceof SyntaxError) !== true){\n $ERROR('#1.2: /[\\\\x0061d-G]/.exec(\"1\") throw SyntaxError. Actual: ' + (e));\n }\n}\n",
+ "id": "S15.10.2.15_A1_T19"
+ },
+ {
+ "section": "15.10.2.15",
+ "description": "Checking if execution of \"/[a-dc-b]/.exec(\"a\")\" leads to throwing the correct exception",
+ "test": "//CHECK#1\ntry {\n $ERROR('#1.1: /[a-dc-b]/.exec(\"a\") throw SyntaxError. Actual: ' + (new RegExp(\"[a-dc-b]\").exec(\"a\")));\n} catch (e) {\n if((e instanceof SyntaxError) !== true){\n $ERROR('#1.2: /[a-dc-b]/.exec(\"a\") throw SyntaxError. Actual: ' + (e));\n }\n}\n",
+ "id": "S15.10.2.15_A1_T2"
+ },
+ {
+ "section": "15.10.2.15",
+ "description": "Checking if execution of \"/[\\u0061d-G]/.exec(\"a\")\" leads to throwing the correct exception",
+ "test": "//CHECK#1\ntry {\n $ERROR('#1.1: /[\\\\u0061d-G]/.exec(\"a\") throw SyntaxError. Actual: ' + (new RegExp(\"[\\\\u0061d-G]\").exec(\"a\")));\n} catch (e) {\n if((e instanceof SyntaxError) !== true){\n $ERROR('#1.2: /[\\\\u0061d-G]/.exec(\"a\") throw SyntaxError. Actual: ' + (e));\n }\n}\n",
+ "id": "S15.10.2.15_A1_T20"
+ },
+ {
+ "section": "15.10.2.15",
+ "description": "Checking if execution of \"/[\\ad-G]/.exec(\"a\")\" leads to throwing the correct exception",
+ "test": "//CHECK#1\ntry {\n $ERROR('#1.1: /[\\\\ad-G]/.exec(\"a\") throw SyntaxError. Actual: ' + (new RegExp(\"[\\\\ad-G]\").exec(\"a\")));\n} catch (e) {\n if((e instanceof SyntaxError) !== true){\n $ERROR('#1.2: /[\\\\ad-G]/.exec(\"a\") throw SyntaxError. Actual: ' + (e));\n }\n}\n",
+ "id": "S15.10.2.15_A1_T21"
+ },
+ {
+ "section": "15.10.2.15",
+ "description": "Checking if execution of \"/[c-eb-a]/.exec(\"a\")\" leads to throwing the correct exception",
+ "test": "//CHECK#1\ntry {\n $ERROR('#1.1: /[c-eb-a]/.exec(\"a\") throw SyntaxError. Actual: ' + (new RegExp(\"[c-eb-a]\").exec(\"a\")));\n} catch (e) {\n if((e instanceof SyntaxError) !== true){\n $ERROR('#1.2: /[c-eb-a]/.exec(\"a\") throw SyntaxError. Actual: ' + (e));\n }\n}\n",
+ "id": "S15.10.2.15_A1_T22"
+ },
+ {
+ "section": "15.10.2.15",
+ "description": "Checking if execution of \"/[b-G\\d]/.exec(\"a\")\" leads to throwing the correct exception",
+ "test": "//CHECK#1\ntry {\n $ERROR('#1.1: /[b-G\\\\d]/.exec(\"a\") throw SyntaxError. Actual: ' + (new RegExp(\"[b-G\\\\d]\").exec(\"a\")));\n} catch (e) {\n if((e instanceof SyntaxError) !== true){\n $ERROR('#1.2: /[b-G\\\\d]/.exec(\"a\") throw SyntaxError. Actual: ' + (e));\n }\n}\n",
+ "id": "S15.10.2.15_A1_T23"
+ },
+ {
+ "section": "15.10.2.15",
+ "description": "Checking if execution of \"/[b-G\\D]/.exec(\"a\")\" leads to throwing the correct exception",
+ "test": "//CHECK#1\ntry {\n $ERROR('#1.1: /[b-G\\\\D]/.exec(\"a\") throw SyntaxError. Actual: ' + (new RegExp(\"[b-G\\\\D]\").exec(\"a\")));\n} catch (e) {\n if((e instanceof SyntaxError) !== true){\n $ERROR('#1.2: /[b-G\\\\D]/.exec(\"a\") throw SyntaxError. Actual: ' + (e));\n }\n}\n",
+ "id": "S15.10.2.15_A1_T24"
+ },
+ {
+ "section": "15.10.2.15",
+ "description": "Checking if execution of \"/[b-G\\s]/.exec(\"a\")\" leads to throwing the correct exception",
+ "test": "//CHECK#1\ntry {\n $ERROR('#1.1: /[b-G\\\\s]/.exec(\"a\") throw SyntaxError. Actual: ' + (new RegExp(\"[b-G\\\\s]\").exec(\"a\")));\n} catch (e) {\n if((e instanceof SyntaxError) !== true){\n $ERROR('#1.2: /[b-G\\\\s]/.exec(\"a\") throw SyntaxError. Actual: ' + (e));\n }\n}\n",
+ "id": "S15.10.2.15_A1_T25"
+ },
+ {
+ "section": "15.10.2.15",
+ "description": "Checking if execution of \"/[b-G\\S]/.exec(\"a\")\" leads to throwing the correct exception",
+ "test": "//CHECK#1\ntry {\n $ERROR('#1.1: /[b-G\\\\S]/.exec(\"a\") throw SyntaxError. Actual: ' + (new RegExp(\"[b-G\\\\S]\").exec(\"a\")));\n} catch (e) {\n if((e instanceof SyntaxError) !== true){\n $ERROR('#1.2: /[b-G\\\\S]/.exec(\"a\") throw SyntaxError. Actual: ' + (e));\n }\n}\n",
+ "id": "S15.10.2.15_A1_T26"
+ },
+ {
+ "section": "15.10.2.15",
+ "description": "Checking if execution of \"/[b-G\\w]/.exec(\"a\")\" leads to throwing the correct exception",
+ "test": "//CHECK#1\ntry {\n $ERROR('#1.1: /[b-G\\\\w]/.exec(\"a\") throw SyntaxError. Actual: ' + (new RegExp(\"[b-G\\\\w]\").exec(\"a\")));\n} catch (e) {\n if((e instanceof SyntaxError) !== true){\n $ERROR('#1.2: /[b-G\\\\w]/.exec(\"a\") throw SyntaxError. Actual: ' + (e));\n }\n}\n",
+ "id": "S15.10.2.15_A1_T27"
+ },
+ {
+ "section": "15.10.2.15",
+ "description": "Checking if execution of \"/[b-G\\W]/.exec(\"a\")\" leads to throwing the correct exception",
+ "test": "//CHECK#1\ntry {\n $ERROR('#1.1: /[b-G\\\\W]/.exec(\"a\") throw SyntaxError. Actual: ' + (new RegExp(\"[b-G\\\\W]\").exec(\"a\")));\n} catch (e) {\n if((e instanceof SyntaxError) !== true){\n $ERROR('#1.2: /[b-G\\\\W]/.exec(\"a\") throw SyntaxError. Actual: ' + (e));\n }\n}\n",
+ "id": "S15.10.2.15_A1_T28"
+ },
+ {
+ "section": "15.10.2.15",
+ "description": "Checking if execution of \"/[b-G\\0]/.exec(\"a\")\" leads to throwing the correct exception",
+ "test": "//CHECK#1\ntry {\n $ERROR('#1.1: /[b-G\\\\0]/.exec(\"a\") throw SyntaxError. Actual: ' + (new RegExp(\"[b-G\\\\0]\").exec(\"a\")));\n} catch (e) {\n if((e instanceof SyntaxError) !== true){\n $ERROR('#1.2: /[b-G\\\\0]/.exec(\"a\") throw SyntaxError. Actual: ' + (e));\n }\n}\n",
+ "id": "S15.10.2.15_A1_T29"
+ },
+ {
+ "section": "15.10.2.15",
+ "description": "Checking if execution of \"/[\\db-G]/.exec(\"a\")\" leads to throwing the correct exception",
+ "test": "//CHECK#1\ntry {\n $ERROR('#1.1: /[\\\\db-G]/.exec(\"a\") throw SyntaxError. Actual: ' + (new RegExp(\"[\\\\db-G]\").exec(\"a\")));\n} catch (e) {\n if((e instanceof SyntaxError) !== true){\n $ERROR('#1.2: /[\\\\db-G]/.exec(\"a\") throw SyntaxError. Actual: ' + (e));\n }\n}\n",
+ "id": "S15.10.2.15_A1_T3"
+ },
+ {
+ "section": "15.10.2.15",
+ "description": "Checking if execution of \"/[b-G\\10]/.exec(\"a\")\" leads to throwing the correct exception",
+ "test": "//CHECK#1\ntry {\n $ERROR('#1.1: /[b-G\\\\10]/.exec(\"a\") throw SyntaxError. Actual: ' + (new RegExp(\"[b-G\\\\10]\").exec(\"a\")));\n} catch (e) {\n if((e instanceof SyntaxError) !== true){\n $ERROR('#1.2: /[b-G\\\\10]/.exec(\"a\") throw SyntaxError. Actual: ' + (e));\n }\n}\n",
+ "id": "S15.10.2.15_A1_T30"
+ },
+ {
+ "section": "15.10.2.15",
+ "description": "Checking if execution of \"/[d-G\\b]/.exec(\"a\")\" leads to throwing the correct exception",
+ "test": "//CHECK#1\ntry {\n $ERROR('#1.1: /[d-G\\\\b]/.exec(\"a\") throw SyntaxError. Actual: ' + (new RegExp(\"[d-G\\\\b]\").exec(\"a\")));\n} catch (e) {\n if((e instanceof SyntaxError) !== true){\n $ERROR('#1.2: /[d-G\\\\b]/.exec(\"a\") throw SyntaxError. Actual: ' + (e));\n }\n}\n",
+ "id": "S15.10.2.15_A1_T31"
+ },
+ {
+ "section": "15.10.2.15",
+ "description": "Checking if execution of \"/[d-G\\B]/.exec(\"a\")\" leads to throwing the correct exception",
+ "test": "//CHECK#1\ntry {\n $ERROR('#1.1: /[d-G\\\\B]/.exec(\"a\") throw SyntaxError. Actual: ' + (new RegExp(\"[d-G\\\\B]\").exec(\"a\")));\n} catch (e) {\n if((e instanceof SyntaxError) !== true){\n $ERROR('#1.2: /[d-G\\\\B]/.exec(\"a\") throw SyntaxError. Actual: ' + (e));\n }\n}\n",
+ "id": "S15.10.2.15_A1_T32"
+ },
+ {
+ "section": "15.10.2.15",
+ "description": "Checking if execution of \"/[d-G\\t]/.exec(\"a\")\" leads to throwing the correct exception",
+ "test": "//CHECK#1\ntry {\n $ERROR('#1.1: /[d-G\\\\t]/.exec(\"a\") throw SyntaxError. Actual: ' + (new RegExp(\"[d-G\\\\t]\").exec(\"a\")));\n} catch (e) {\n if((e instanceof SyntaxError) !== true){\n $ERROR('#1.2: /[d-G\\\\t]/.exec(\"a\") throw SyntaxError. Actual: ' + (e));\n }\n}\n",
+ "id": "S15.10.2.15_A1_T33"
+ },
+ {
+ "section": "15.10.2.15",
+ "description": "Checking if execution of \"/[d-G\\n]/.exec(\"a\")\" leads to throwing the correct exception",
+ "test": "//CHECK#1\ntry {\n $ERROR('#1.1: /[d-G\\\\n]/.exec(\"a\") throw SyntaxError. Actual: ' + (new RegExp(\"[d-G\\\\n]\").exec(\"a\")));\n} catch (e) {\n if((e instanceof SyntaxError) !== true){\n $ERROR('#1.2: /[d-G\\\\n]/.exec(\"a\") throw SyntaxError. Actual: ' + (e));\n }\n}\n",
+ "id": "S15.10.2.15_A1_T34"
+ },
+ {
+ "section": "15.10.2.15",
+ "description": "Checking if execution of \"/[d-G\\v]/.exec(\"a\")\" leads to throwing the correct exception",
+ "test": "//CHECK#1\ntry {\n $ERROR('#1.1: /[d-G\\\\v]/.exec(\"a\") throw SyntaxError. Actual: ' + (new RegExp(\"[d-G\\\\v]\").exec(\"a\")));\n} catch (e) {\n if((e instanceof SyntaxError) !== true){\n $ERROR('#1.2: /[d-G\\\\v]/.exec(\"a\") throw SyntaxError. Actual: ' + (e));\n }\n}\n",
+ "id": "S15.10.2.15_A1_T35"
+ },
+ {
+ "section": "15.10.2.15",
+ "description": "Checking if execution of \"/[d-G\\f]/.exec(\"a\")\" leads to throwing the correct exception",
+ "test": "//CHECK#1\ntry {\n $ERROR('#1.1: /[d-G\\\\f]/.exec(\"a\") throw SyntaxError. Actual: ' + (new RegExp(\"[d-G\\\\f]\").exec(\"a\")));\n} catch (e) {\n if((e instanceof SyntaxError) !== true){\n $ERROR('#1.2: /[d-G\\\\f]/.exec(\"a\") throw SyntaxError. Actual: ' + (e));\n }\n}\n",
+ "id": "S15.10.2.15_A1_T36"
+ },
+ {
+ "section": "15.10.2.15",
+ "description": "Checking if execution of \"/[d-G\\r]/.exec(\"a\")\" leads to throwing the correct exception",
+ "test": "//CHECK#1\ntry {\n $ERROR('#1.1: /[d-G\\\\r]/.exec(\"a\") throw SyntaxError. Actual: ' + (new RegExp(\"[d-G\\\\r]\").exec(\"a\")));\n} catch (e) {\n if((e instanceof SyntaxError) !== true){\n $ERROR('#1.2: /[d-G\\\\r]/.exec(\"a\") throw SyntaxError. Actual: ' + (e));\n }\n}\n",
+ "id": "S15.10.2.15_A1_T37"
+ },
+ {
+ "section": "15.10.2.15",
+ "description": "Checking if execution of \"/[d-G\\c0001]/.exec(\"1\")\" leads to throwing the correct exception",
+ "test": "//CHECK#1\ntry {\n $ERROR('#1.1: /[d-G\\\\c0001]/.exec(\"1\") throw SyntaxError. Actual: ' + (new RegExp(\"[d-G\\\\c0001]\").exec(\"1\")));\n} catch (e) {\n if((e instanceof SyntaxError) !== true){\n $ERROR('#1.2: /[d-G\\\\c0001]/.exec(\"1\") throw SyntaxError. Actual: ' + (e));\n }\n}\n",
+ "id": "S15.10.2.15_A1_T38"
+ },
+ {
+ "section": "15.10.2.15",
+ "description": "Checking if execution of \"/[d-G\\x0061]/.exec(\"1\")\" leads to throwing the correct exception",
+ "test": "//CHECK#1\ntry {\n $ERROR('#1.1: /[d-G\\\\x0061]/.exec(\"1\") throw SyntaxError. Actual: ' + (new RegExp(\"[d-G\\\\x0061]\").exec(\"1\")));\n} catch (e) {\n if((e instanceof SyntaxError) !== true){\n $ERROR('#1.2: /[d-G\\\\x0061]/.exec(\"1\") throw SyntaxError. Actual: ' + (e));\n }\n}\n",
+ "id": "S15.10.2.15_A1_T39"
+ },
+ {
+ "section": "15.10.2.15",
+ "description": "Checking if execution of \"/[\\Db-G]/.exec(\"a\")\" leads to throwing the correct exception",
+ "test": "//CHECK#1\ntry {\n $ERROR('#1.1: /[\\\\Db-G]/.exec(\"a\") throw SyntaxError. Actual: ' + (new RegExp(\"[\\\\Db-G]\").exec(\"a\")));\n} catch (e) {\n if((e instanceof SyntaxError) !== true){\n $ERROR('#1.2: /[\\\\Db-G]/.exec(\"a\") throw SyntaxError. Actual: ' + (e));\n }\n}\n",
+ "id": "S15.10.2.15_A1_T4"
+ },
+ {
+ "section": "15.10.2.15",
+ "description": "Checking if execution of \"/[d-G\\u0061]/.exec(\"a\")\" leads to throwing the correct exception",
+ "test": "//CHECK#1\ntry {\n $ERROR('#1.1: /[d-G\\\\u0061]/.exec(\"a\") throw SyntaxError. Actual: ' + (new RegExp(\"[d-G\\\\u0061]\").exec(\"a\")));\n} catch (e) {\n if((e instanceof SyntaxError) !== true){\n $ERROR('#1.2: /[d-G\\\\u0061]/.exec(\"a\") throw SyntaxError. Actual: ' + (e));\n }\n}\n",
+ "id": "S15.10.2.15_A1_T40"
+ },
+ {
+ "section": "15.10.2.15",
+ "description": "Checking if execution of \"/[d-G\\a]/.exec(\"a\")\" leads to throwing the correct exception",
+ "test": "//CHECK#1\ntry {\n $ERROR('#1.1: /[d-G\\\\a]/.exec(\"a\") throw SyntaxError. Actual: ' + (new RegExp(\"[d-G\\\\a]\").exec(\"a\")));\n} catch (e) {\n if((e instanceof SyntaxError) !== true){\n $ERROR('#1.2: /[d-G\\\\a]/.exec(\"a\") throw SyntaxError. Actual: ' + (e));\n }\n}\n",
+ "id": "S15.10.2.15_A1_T41"
+ },
+ {
+ "section": "15.10.2.15",
+ "description": "Checking if execution of \"/[\\sb-G]/.exec(\"a\")\" leads to throwing the correct exception",
+ "test": "//CHECK#1\ntry {\n $ERROR('#1.1: /[\\\\sb-G]/.exec(\"a\") throw SyntaxError. Actual: ' + (new RegExp(\"[\\\\sb-G]\").exec(\"a\")));\n} catch (e) {\n if((e instanceof SyntaxError) !== true){\n $ERROR('#1.2: /[\\\\sb-G]/.exec(\"a\") throw SyntaxError. Actual: ' + (e));\n }\n}\n",
+ "id": "S15.10.2.15_A1_T5"
+ },
+ {
+ "section": "15.10.2.15",
+ "description": "Checking if execution of \"/[\\Sb-G]/.exec(\"a\")\" leads to throwing the correct exception",
+ "test": "//CHECK#1\ntry {\n $ERROR('#1.1: /[\\\\Sb-G]/.exec(\"a\") throw SyntaxError. Actual: ' + (new RegExp(\"[\\\\Sb-G]\").exec(\"a\")));\n} catch (e) {\n if((e instanceof SyntaxError) !== true){\n $ERROR('#1.2: /[\\\\Sb-G]/.exec(\"a\") throw SyntaxError. Actual: ' + (e));\n }\n}\n",
+ "id": "S15.10.2.15_A1_T6"
+ },
+ {
+ "section": "15.10.2.15",
+ "description": "Checking if execution of \"/[\\wb-G]/.exec(\"a\")\" leads to throwing the correct exception",
+ "test": "//CHECK#1\ntry {\n $ERROR('#1.1: /[\\\\wb-G]/.exec(\"a\") throw SyntaxError. Actual: ' + (new RegExp(\"[\\\\wb-G]\").exec(\"a\")));\n} catch (e) {\n if((e instanceof SyntaxError) !== true){\n $ERROR('#1.2: /[\\\\wb-G]/.exec(\"a\") throw SyntaxError. Actual: ' + (e));\n }\n}\n",
+ "id": "S15.10.2.15_A1_T7"
+ },
+ {
+ "section": "15.10.2.15",
+ "description": "Checking if execution of \"/[\\Wb-G]/.exec(\"a\")\" leads to throwing the correct exception",
+ "test": "//CHECK#1\ntry {\n $ERROR('#1.1: /[\\\\Wb-G]/.exec(\"a\") throw SyntaxError. Actual: ' + (new RegExp(\"[\\\\Wb-G]\").exec(\"a\")));\n} catch (e) {\n if((e instanceof SyntaxError) !== true){\n $ERROR('#1.2: /[\\\\Wb-G]/.exec(\"a\") throw SyntaxError. Actual: ' + (e));\n }\n}\n",
+ "id": "S15.10.2.15_A1_T8"
+ },
+ {
+ "section": "15.10.2.15",
+ "description": "Checking if execution of \"/[\\0b-G]/.exec(\"a\")\" leads to throwing the correct exception",
+ "test": "//CHECK#1\ntry {\n $ERROR('#1.1: /[\\\\0b-G]/.exec(\"a\") throw SyntaxError. Actual: ' + (new RegExp(\"[\\\\0b-G]\").exec(\"a\")));\n} catch (e) {\n if((e instanceof SyntaxError) !== true){\n $ERROR('#1.2: /[\\\\0b-G]/.exec(\"a\") throw SyntaxError. Actual: ' + (e));\n }\n}\n",
+ "id": "S15.10.2.15_A1_T9"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.10.2.3_Disjunction.json b/website/resources/scripts/testcases2/15.10.2.3_Disjunction.json
new file mode 100644
index 000000000..a3ed96c09
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.10.2.3_Disjunction.json
@@ -0,0 +1,110 @@
+{
+ "testCollection": {
+ "name": "15.10.2.3_Disjunction",
+ "numTests": 17,
+ "tests": [
+ {
+ "section": "15.10.2.3",
+ "description": "Execute /a|ab/.exec(\"abc\") and check results",
+ "test": "__executed = /a|ab/.exec(\"abc\");\n\n__expected = [\"a\"];\n__expected.index = 0;\n__expected.input = \"abc\";\n\n//CHECK#1\nif (__executed.length !== __expected.length) {\n\t$ERROR('#1: __executed = /a|ab/.exec(\"abc\"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length);\n}\n\n//CHECK#2\nif (__executed.index !== __expected.index) {\n\t$ERROR('#2: __executed = /a|ab/.exec(\"abc\"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index);\n}\n\n//CHECK#3\nif (__executed.input !== __expected.input) {\n\t$ERROR('#3: __executed = /a|ab/.exec(\"abc\"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input);\n}\n\n//CHECK#4\nfor(var index=0; index<__expected.length; index++) {\n\tif (__executed[index] !== __expected[index]) {\n\t\t$ERROR('#4: __executed = /a|ab/.exec(\"abc\"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]);\n\t}\n}\n\n",
+ "id": "S15.10.2.3_A1_T1"
+ },
+ {
+ "section": "15.10.2.3",
+ "description": "Execute /(?:ab|cd)+|ef/i.exec(\"AEKeFCDab\") and check results",
+ "test": "__executed = /(?:ab|cd)+|ef/i.exec(\"AEKeFCDab\");\n\n__expected = [\"eF\"];\n__expected.index = 3;\n__expected.input = \"AEKeFCDab\";\n\n//CHECK#1\nif (__executed.length !== __expected.length) {\n\t$ERROR('#1: __executed = /(?:ab|cd)+|ef/i.exec(\"AEKeFCDab\"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length);\n}\n\n//CHECK#2\nif (__executed.index !== __expected.index) {\n\t$ERROR('#2: __executed = /(?:ab|cd)+|ef/i.exec(\"AEKeFCDab\"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index);\n}\n\n//CHECK#3\nif (__executed.input !== __expected.input) {\n\t$ERROR('#3: __executed = /(?:ab|cd)+|ef/i.exec(\"AEKeFCDab\"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input);\n}\n\n//CHECK#4\nfor(var index=0; index<__expected.length; index++) {\n\tif (__executed[index] !== __expected[index]) {\n\t\t$ERROR('#4: __executed = /(?:ab|cd)+|ef/i.exec(\"AEKeFCDab\"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]);\n\t}\n}\n\n",
+ "id": "S15.10.2.3_A1_T10"
+ },
+ {
+ "section": "15.10.2.3",
+ "description": "Execute /11111|111/.exec(\"1111111111111111\") and check results",
+ "test": "__executed = /11111|111/.exec(\"1111111111111111\");\n\n__expected = [\"11111\"];\n__expected.index = 0;\n__expected.input = \"1111111111111111\";\n\n//CHECK#1\nif (__executed.length !== __expected.length) {\n\t$ERROR('#1: __executed = /11111|111/.exec(\"1111111111111111\"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length);\n}\n\n//CHECK#2\nif (__executed.index !== __expected.index) {\n\t$ERROR('#2: __executed = /11111|111/.exec(\"1111111111111111\"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index);\n}\n\n//CHECK#3\nif (__executed.input !== __expected.input) {\n\t$ERROR('#3: __executed = /11111|111/.exec(\"1111111111111111\"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input);\n}\n\n//CHECK#4\nfor(var index=0; index<__expected.length; index++) {\n\tif (__executed[index] !== __expected[index]) {\n\t\t$ERROR('#4: __executed = /11111|111/.exec(\"1111111111111111\"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]);\n\t}\n}\n\n",
+ "id": "S15.10.2.3_A1_T11"
+ },
+ {
+ "section": "15.10.2.3",
+ "description": "Execute /xyz|.../.exec(\"abc\") and check results",
+ "test": "__executed = /xyz|.../.exec(\"abc\");\n\n__expected = [\"abc\"];\n__expected.index = 0;\n__expected.input = \"abc\";\n\n//CHECK#1\nif (__executed.length !== __expected.length) {\n\t$ERROR('#1: __executed = /xyz|.../.exec(\"abc\"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length);\n}\n\n//CHECK#2\nif (__executed.index !== __expected.index) {\n\t$ERROR('#2: __executed = /xyz|.../.exec(\"abc\"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index);\n}\n\n//CHECK#3\nif (__executed.input !== __expected.input) {\n\t$ERROR('#3: __executed = /xyz|.../.exec(\"abc\"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input);\n}\n\n//CHECK#4\nfor(var index=0; index<__expected.length; index++) {\n\tif (__executed[index] !== __expected[index]) {\n\t\t$ERROR('#4: __executed = /xyz|.../.exec(\"abc\"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]);\n\t}\n}\n\n",
+ "id": "S15.10.2.3_A1_T12"
+ },
+ {
+ "section": "15.10.2.3",
+ "description": "Execute /(.)..|abc/.exec(\"abc\") and check results",
+ "test": "__executed = /(.)..|abc/.exec(\"abc\");\n\n__expected = [\"abc\",\"a\"];\n__expected.index = 0;\n__expected.input = \"abc\";\n\n//CHECK#1\nif (__executed.length !== __expected.length) {\n\t$ERROR('#1: __executed = /(.)..|abc/.exec(\"abc\"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length);\n}\n\n//CHECK#2\nif (__executed.index !== __expected.index) {\n\t$ERROR('#2: __executed = /(.)..|abc/.exec(\"abc\"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index);\n}\n\n//CHECK#3\nif (__executed.input !== __expected.input) {\n\t$ERROR('#3: __executed = /(.)..|abc/.exec(\"abc\"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input);\n}\n\n//CHECK#4\nfor(var index=0; index<__expected.length; index++) {\n\tif (__executed[index] !== __expected[index]) {\n\t\t$ERROR('#4: __executed = /(.)..|abc/.exec(\"abc\"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]);\n\t}\n}\n\n",
+ "id": "S15.10.2.3_A1_T13"
+ },
+ {
+ "section": "15.10.2.3",
+ "description": "Execute /.+: gr(a|e)y/.exec(\"color: grey\") and check results",
+ "test": "__executed = /.+: gr(a|e)y/.exec(\"color: grey\");\n\n__expected = [\"color: grey\",\"e\"];\n__expected.index = 0;\n__expected.input = \"color: grey\";\n\n//CHECK#1\nif (__executed.length !== __expected.length) {\n\t$ERROR('#1: __executed = /.+: gr(a|e)y/.exec(\"color: grey\"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length);\n}\n\n//CHECK#2\nif (__executed.index !== __expected.index) {\n\t$ERROR('#2: __executed = /.+: gr(a|e)y/.exec(\"color: grey\"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index);\n}\n\n//CHECK#3\nif (__executed.input !== __expected.input) {\n\t$ERROR('#3: __executed = /.+: gr(a|e)y/.exec(\"color: grey\"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input);\n}\n\n//CHECK#4\nfor(var index=0; index<__expected.length; index++) {\n\tif (__executed[index] !== __expected[index]) {\n\t\t$ERROR('#4: __executed = /.+: gr(a|e)y/.exec(\"color: grey\"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]);\n\t}\n}\n\n",
+ "id": "S15.10.2.3_A1_T14"
+ },
+ {
+ "section": "15.10.2.3",
+ "description": "Execute /(Rob)|(Bob)|(Robert)|(Bobby)/.exec(\"Hi Bob\") and check results",
+ "test": "__executed = /(Rob)|(Bob)|(Robert)|(Bobby)/.exec(\"Hi Bob\");\n\n__expected = [\"Bob\",undefined,\"Bob\", undefined, undefined];\n__expected.index = 3;\n__expected.input = \"Hi Bob\";\n\n//CHECK#1\nif (__executed.length !== __expected.length) {\n\t$ERROR('#1: __executed = /(Rob)|(Bob)|(Robert)|(Bobby)/.exec(\"Hi Bob\"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length);\n}\n\n//CHECK#2\nif (__executed.index !== __expected.index) {\n\t$ERROR('#2: __executed = /(Rob)|(Bob)|(Robert)|(Bobby)/.exec(\"Hi Bob\"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index);\n}\n\n//CHECK#3\nif (__executed.input !== __expected.input) {\n\t$ERROR('#3: __executed = /(Rob)|(Bob)|(Robert)|(Bobby)/.exec(\"Hi Bob\"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input);\n}\n\n//CHECK#4\nfor(var index=0; index<__expected.length; index++) {\n\tif (__executed[index] !== __expected[index]) {\n\t\t$ERROR('#4: __executed = /(Rob)|(Bob)|(Robert)|(Bobby)/.exec(\"Hi Bob\"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]);\n\t}\n}\n\n",
+ "id": "S15.10.2.3_A1_T15"
+ },
+ {
+ "section": "15.10.2.3",
+ "description": "Execute /()|/.exec(\"\") and check results",
+ "test": "__executed = /()|/.exec(\"\");\n\n__expected = [\"\",\"\"];\n__expected.index = 0;\n__expected.input = \"\";\n\n//CHECK#1\nif (__executed.length !== __expected.length) {\n\t$ERROR('#1: __executed = /()|/.exec(\"\"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length);\n}\n\n//CHECK#2\nif (__executed.index !== __expected.index) {\n\t$ERROR('#2: __executed = /()|/.exec(\"\"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index);\n}\n\n//CHECK#3\nif (__executed.input !== __expected.input) {\n\t$ERROR('#3: __executed = /()|/.exec(\"\"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input);\n}\n\n//CHECK#4\nfor(var index=0; index<__expected.length; index++) {\n\tif (__executed[index] !== __expected[index]) {\n\t\t$ERROR('#4: __executed = /()|/.exec(\"\"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]);\n\t}\n}\n\n",
+ "id": "S15.10.2.3_A1_T16"
+ },
+ {
+ "section": "15.10.2.3",
+ "description": "Execute /|()/.exec(\"\") and check results",
+ "test": "__executed = /|()/.exec(\"\");\n\n__expected = [\"\",undefined];\n__expected.index = 0;\n__expected.input = \"\";\n\n//CHECK#1\nif (__executed.length !== __expected.length) {\n\t$ERROR('#1: __executed = /|()/.exec(\"\"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length);\n}\n\n//CHECK#2\nif (__executed.index !== __expected.index) {\n\t$ERROR('#2: __executed = /|()/.exec(\"\"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index);\n}\n\n//CHECK#3\nif (__executed.input !== __expected.input) {\n\t$ERROR('#3: __executed = /|()/.exec(\"\"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input);\n}\n\n//CHECK#4\nfor(var index=0; index<__expected.length; index++) {\n\tif (__executed[index] !== __expected[index]) {\n\t\t$ERROR('#4: __executed = /|()/.exec(\"\"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]);\n\t}\n}\n\n",
+ "id": "S15.10.2.3_A1_T17"
+ },
+ {
+ "section": "15.10.2.3",
+ "description": "Execute /((a)|(ab))((c)|(bc))/.exec(\"abc\") and check results",
+ "test": "__executed = /((a)|(ab))((c)|(bc))/.exec(\"abc\");\n\n__expected = [\"abc\", \"a\", \"a\", undefined, \"bc\", undefined, \"bc\"];\n__expected.index = 0;\n__expected.input = \"abc\";\n\n//CHECK#1\nif (__executed.length !== __expected.length) {\n\t$ERROR('#1: __executed = /((a)|(ab))((c)|(bc))/.exec(\"abc\"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length);\n}\n\n//CHECK#2\nif (__executed.index !== __expected.index) {\n\t$ERROR('#2: __executed = /((a)|(ab))((c)|(bc))/.exec(\"abc\"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index);\n}\n\n//CHECK#3\nif (__executed.input !== __expected.input) {\n\t$ERROR('#3: __executed = /((a)|(ab))((c)|(bc))/.exec(\"abc\"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input);\n}\n\n//CHECK#4\nfor(var index=0; index<__expected.length; index++) {\n\tif (__executed[index] !== __expected[index]) {\n\t\t$ERROR('#4: __executed = /((a)|(ab))((c)|(bc))/.exec(\"abc\"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]);\n\t}\n}\n\n",
+ "id": "S15.10.2.3_A1_T2"
+ },
+ {
+ "section": "15.10.2.3",
+ "description": "Execute /\\d{3}|[a-z]{4}/.exec(\"2, 12 and of course repeat 12\") and check results",
+ "test": "__executed = /\\d{3}|[a-z]{4}/.exec(\"2, 12 and of course repeat 12\");\n\n__expected = [\"cour\"];\n__expected.index = 13;\n__expected.input = \"2, 12 and of course repeat 12\";\n\n//CHECK#1\nif (__executed.length !== __expected.length) {\n\t$ERROR('#1: __executed = /\\\\d{3}|[a-z]{4}/.exec(\"2, 12 and of course repeat 12\"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length);\n}\n\n//CHECK#2\nif (__executed.index !== __expected.index) {\n\t$ERROR('#2: __executed = /\\\\d{3}|[a-z]{4}/.exec(\"2, 12 and of course repeat 12\"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index);\n}\n\n//CHECK#3\nif (__executed.input !== __expected.input) {\n\t$ERROR('#3: __executed = /\\\\d{3}|[a-z]{4}/.exec(\"2, 12 and of course repeat 12\"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input);\n}\n\n//CHECK#4\nfor(var index=0; index<__expected.length; index++) {\n\tif (__executed[index] !== __expected[index]) {\n\t\t$ERROR('#4: __executed = /\\\\d{3}|[a-z]{4}/.exec(\"2, 12 and of course repeat 12\"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]);\n\t}\n}\n\n",
+ "id": "S15.10.2.3_A1_T3"
+ },
+ {
+ "section": "15.10.2.3",
+ "description": "Execute /\\d{3}|[a-z]{4}/.exec(\"2, 12 and 234 AND of course repeat 12\") and check results",
+ "test": "__executed = /\\d{3}|[a-z]{4}/.exec(\"2, 12 and 234 AND of course repeat 12\");\n\n__expected = [\"234\"];\n__expected.index = 10;\n__expected.input = \"2, 12 and 234 AND of course repeat 12\";\n\n//CHECK#1\nif (__executed.length !== __expected.length) {\n\t$ERROR('#1: __executed = /\\\\d{3}|[a-z]{4}/.exec(\"2, 12 and 234 AND of course repeat 12\"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length);\n}\n\n//CHECK#2\nif (__executed.index !== __expected.index) {\n\t$ERROR('#2: __executed = /\\\\d{3}|[a-z]{4}/.exec(\"2, 12 and 234 AND of course repeat 12\"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index);\n}\n\n//CHECK#3\nif (__executed.input !== __expected.input) {\n\t$ERROR('#3: __executed = /\\\\d{3}|[a-z]{4}/.exec(\"2, 12 and 234 AND of course repeat 12\"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input);\n}\n\n//CHECK#4\nfor(var index=0; index<__expected.length; index++) {\n\tif (__executed[index] !== __expected[index]) {\n\t\t$ERROR('#4: __executed = /\\\\d{3}|[a-z]{4}/.exec(\"2, 12 and 234 AND of course repeat 12\"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]);\n\t}\n}\n\n",
+ "id": "S15.10.2.3_A1_T4"
+ },
+ {
+ "section": "15.10.2.3",
+ "description": "Execute /\\d{3}|[a-z]{4}/.test(\"2, 12 and 23 AND 0.00.1\") and check results",
+ "test": "__executed = /\\d{3}|[a-z]{4}/.test(\"2, 12 and 23 AND 0.00.1\");\n\n//CHECK#1\nif (__executed) {\n\t$ERROR('#1: /\\\\d{3}|[a-z]{4}/.test(\"2, 12 and 23 AND 0.00.1\") === false');\n}\n\n",
+ "id": "S15.10.2.3_A1_T5"
+ },
+ {
+ "section": "15.10.2.3",
+ "description": "Execute /ab|cd|ef/i.exec(\"AEKFCD\") and check results",
+ "test": "__executed = /ab|cd|ef/i.exec(\"AEKFCD\");\n\n__expected = [\"CD\"];\n__expected.index = 4;\n__expected.input = \"AEKFCD\";\n\n//CHECK#1\nif (__executed.length !== __expected.length) {\n\t$ERROR('#1: __executed = /ab|cd|ef/i.exec(\"AEKFCD\"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length);\n}\n\n//CHECK#2\nif (__executed.index !== __expected.index) {\n\t$ERROR('#2: __executed = /ab|cd|ef/i.exec(\"AEKFCD\"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index);\n}\n\n//CHECK#3\nif (__executed.input !== __expected.input) {\n\t$ERROR('#3: __executed = /ab|cd|ef/i.exec(\"AEKFCD\"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input);\n}\n\n//CHECK#4\nfor(var index=0; index<__expected.length; index++) {\n\tif (__executed[index] !== __expected[index]) {\n\t\t$ERROR('#4: __executed = /ab|cd|ef/i.exec(\"AEKFCD\"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]);\n\t}\n}\n\n",
+ "id": "S15.10.2.3_A1_T6"
+ },
+ {
+ "section": "15.10.2.3",
+ "description": "Execute /ab|cd|ef/.test(\"AEKFCD\") and check results",
+ "test": "__executed = /ab|cd|ef/.test(\"AEKFCD\");\n\n//CHECK#1\nif (__executed) {\n\t$ERROR('#1: /ab|cd|ef/.test(\"AEKFCD\") === false');\n}\n\n",
+ "id": "S15.10.2.3_A1_T7"
+ },
+ {
+ "section": "15.10.2.3",
+ "description": "Execute /(?:ab|cd)+|ef/i.exec(\"AEKFCD\") and check results",
+ "test": "__executed = /(?:ab|cd)+|ef/i.exec(\"AEKFCD\");\n\n__expected = [\"CD\"];\n__expected.index = 4;\n__expected.input = \"AEKFCD\";\n\n//CHECK#1\nif (__executed.length !== __expected.length) {\n\t$ERROR('#1: __executed = /(?:ab|cd)+|ef/i.exec(\"AEKFCD\"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length);\n}\n\n//CHECK#2\nif (__executed.index !== __expected.index) {\n\t$ERROR('#2: __executed = /(?:ab|cd)+|ef/i.exec(\"AEKFCD\"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index);\n}\n\n//CHECK#3\nif (__executed.input !== __expected.input) {\n\t$ERROR('#3: __executed = /(?:ab|cd)+|ef/i.exec(\"AEKFCD\"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input);\n}\n\n//CHECK#4\nfor(var index=0; index<__expected.length; index++) {\n\tif (__executed[index] !== __expected[index]) {\n\t\t$ERROR('#4: __executed = /(?:ab|cd)+|ef/i.exec(\"AEKFCD\"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]);\n\t}\n}\n\n",
+ "id": "S15.10.2.3_A1_T8"
+ },
+ {
+ "section": "15.10.2.3",
+ "description": "Execute /(?:ab|cd)+|ef/i.exec(\"AEKFCDab\") and check results",
+ "test": "__executed = /(?:ab|cd)+|ef/i.exec(\"AEKFCDab\");\n\n__expected = [\"CDab\"];\n__expected.index = 4;\n__expected.input = \"AEKFCDab\";\n\n//CHECK#1\nif (__executed.length !== __expected.length) {\n\t$ERROR('#1: __executed = /(?:ab|cd)+|ef/i.exec(\"AEKFCDab\"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length);\n}\n\n//CHECK#2\nif (__executed.index !== __expected.index) {\n\t$ERROR('#2: __executed = /(?:ab|cd)+|ef/i.exec(\"AEKFCDab\"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index);\n}\n\n//CHECK#3\nif (__executed.input !== __expected.input) {\n\t$ERROR('#3: __executed = /(?:ab|cd)+|ef/i.exec(\"AEKFCDab\"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input);\n}\n\n//CHECK#4\nfor(var index=0; index<__expected.length; index++) {\n\tif (__executed[index] !== __expected[index]) {\n\t\t$ERROR('#4: __executed = /(?:ab|cd)+|ef/i.exec(\"AEKFCDab\"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]);\n\t}\n}\n\n",
+ "id": "S15.10.2.3_A1_T9"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.10.2.5_Term.json b/website/resources/scripts/testcases2/15.10.2.5_Term.json
new file mode 100644
index 000000000..177e8fd6a
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.10.2.5_Term.json
@@ -0,0 +1,38 @@
+{
+ "testCollection": {
+ "name": "15.10.2.5_Term",
+ "numTests": 5,
+ "tests": [
+ {
+ "section": "15.10.2.5",
+ "description": "Execute /a[a-z]{2,4}/.exec(\"abcdefghi\") and check results",
+ "test": "__executed = /a[a-z]{2,4}/.exec(\"abcdefghi\");\n\n__expected = [\"abcde\"];\n__expected.index = 0;\n__expected.input = \"abcdefghi\";\n\n//CHECK#1\nif (__executed.length !== __expected.length) {\n\t$ERROR('#1: __executed = /a[a-z]{2,4}/.exec(\"abcdefghi\"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length);\n}\n\n//CHECK#2\nif (__executed.index !== __expected.index) {\n\t$ERROR('#2: __executed = /a[a-z]{2,4}/.exec(\"abcdefghi\"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index);\n}\n\n//CHECK#3\nif (__executed.input !== __expected.input) {\n\t$ERROR('#3: __executed = /a[a-z]{2,4}/.exec(\"abcdefghi\"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input);\n}\n\n//CHECK#4\nfor(var index=0; index<__expected.length; index++) {\n\tif (__executed[index] !== __expected[index]) {\n\t\t$ERROR('#4: __executed = /a[a-z]{2,4}/.exec(\"abcdefghi\"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]);\n\t}\n}\n\n",
+ "id": "S15.10.2.5_A1_T1"
+ },
+ {
+ "section": "15.10.2.5",
+ "description": "Execute /a[a-z]{2,4}?/.exec(\"abcdefghi\") and check results",
+ "test": "__executed = /a[a-z]{2,4}?/.exec(\"abcdefghi\");\n\n__expected = [\"abc\"];\n__expected.index = 0;\n__expected.input = \"abcdefghi\";\n\n//CHECK#1\nif (__executed.length !== __expected.length) {\n\t$ERROR('#1: __executed = /a[a-z]{2,4}?/.exec(\"abcdefghi\"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length);\n}\n\n//CHECK#2\nif (__executed.index !== __expected.index) {\n\t$ERROR('#2: __executed = /a[a-z]{2,4}?/.exec(\"abcdefghi\"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index);\n}\n\n//CHECK#3\nif (__executed.input !== __expected.input) {\n\t$ERROR('#3: __executed = /a[a-z]{2,4}?/.exec(\"abcdefghi\"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input);\n}\n\n//CHECK#4\nfor(var index=0; index<__expected.length; index++) {\n\tif (__executed[index] !== __expected[index]) {\n\t\t$ERROR('#4: __executed = /a[a-z]{2,4}?/.exec(\"abcdefghi\"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]);\n\t}\n}\n\n",
+ "id": "S15.10.2.5_A1_T2"
+ },
+ {
+ "section": "15.10.2.5",
+ "description": "Execute /(aa|aabaac|ba|b|c)* /.exec(\"aabaac\") and check results",
+ "test": "__executed = /(aa|aabaac|ba|b|c)*/.exec(\"aabaac\");\n\n__expected = [\"aaba\", \"ba\"];\n__expected.index = 0;\n__expected.input = \"aabaac\";\n\n//CHECK#1\nif (__executed.length !== __expected.length) {\n\t$ERROR('#1: __executed = /(aa|aabaac|ba|b|c)*/.exec(\"aabaac\"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length);\n}\n\n//CHECK#2\nif (__executed.index !== __expected.index) {\n\t$ERROR('#2: __executed = /(aa|aabaac|ba|b|c)*/.exec(\"aabaac\"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index);\n}\n\n//CHECK#3\nif (__executed.input !== __expected.input) {\n\t$ERROR('#3: __executed = /(aa|aabaac|ba|b|c)*/.exec(\"aabaac\"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input);\n}\n\n//CHECK#4\nfor(var index=0; index<__expected.length; index++) {\n\tif (__executed[index] !== __expected[index]) {\n\t\t$ERROR('#4: __executed = /(aa|aabaac|ba|b|c)*/.exec(\"aabaac\"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]);\n\t}\n}\n\n",
+ "id": "S15.10.2.5_A1_T3"
+ },
+ {
+ "section": "15.10.2.5",
+ "description": "Execute /(z)((a+)?(b+)?(c))* /.exec(\"zaacbbbcac\") and check results",
+ "test": "__executed = /(z)((a+)?(b+)?(c))*/.exec(\"zaacbbbcac\");\n\n__expected = [\"zaacbbbcac\", \"z\", \"ac\", \"a\", undefined, \"c\"];\n__expected.index = 0;\n__expected.input = \"zaacbbbcac\";\n\n//CHECK#1\nif (__executed.length !== __expected.length) {\n\t$ERROR('#1: __executed = /(z)((a+)?(b+)?(c))*/.exec(\"zaacbbbcac\"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length);\n}\n\n//CHECK#2\nif (__executed.index !== __expected.index) {\n\t$ERROR('#2: __executed = /(z)((a+)?(b+)?(c))*/.exec(\"zaacbbbcac\"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index);\n}\n\n//CHECK#3\nif (__executed.input !== __expected.input) {\n\t$ERROR('#3: __executed = /(z)((a+)?(b+)?(c))*/.exec(\"zaacbbbcac\"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input);\n}\n\n//CHECK#4\nfor(var index=0; index<__expected.length; index++) {\n\tif (__executed[index] !== __expected[index]) {\n\t\t$ERROR('#4: __executed = /(z)((a+)?(b+)?(c))*/.exec(\"zaacbbbcac\"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]);\n\t}\n}\n\n",
+ "id": "S15.10.2.5_A1_T4"
+ },
+ {
+ "section": "15.10.2.5",
+ "description": "Execute /(a*)b\\1+/.exec(\"baaaac\") and check results",
+ "test": "__executed = /(a*)b\\1+/.exec(\"baaaac\");\n\n__expected = [\"b\", \"\"];\n__expected.index = 0;\n__expected.input = \"baaaac\";\n\n//CHECK#1\nif (__executed.length !== __expected.length) {\n\t$ERROR('#1: __executed = /(a*)b\\\\1+/.exec(\"baaaac\"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length);\n}\n\n//CHECK#2\nif (__executed.index !== __expected.index) {\n\t$ERROR('#2: __executed = /(a*)b\\\\1+/.exec(\"baaaac\"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index);\n}\n\n//CHECK#3\nif (__executed.input !== __expected.input) {\n\t$ERROR('#3: __executed = /(a*)b\\\\1+/.exec(\"baaaac\"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input);\n}\n\n//CHECK#4\nfor(var index=0; index<__expected.length; index++) {\n\tif (__executed[index] !== __expected[index]) {\n\t\t$ERROR('#4: __executed = /(a*)b\\\\1+/.exec(\"baaaac\"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]);\n\t}\n}\n\n",
+ "id": "S15.10.2.5_A1_T5"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.10.2.6_Assertion.json b/website/resources/scripts/testcases2/15.10.2.6_Assertion.json
new file mode 100644
index 000000000..846af3382
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.10.2.6_Assertion.json
@@ -0,0 +1,272 @@
+{
+ "testCollection": {
+ "name": "15.10.2.6_Assertion",
+ "numTests": 44,
+ "tests": [
+ {
+ "section": "15.10.2.6",
+ "description": "Execute /s$/.test(\"pairs\\nmakes\\tdouble\") and check results",
+ "test": "__executed = /s$/.test(\"pairs\\nmakes\\tdouble\");\n\n//CHECK#1\nif (__executed) {\n\t$ERROR('#1: /s$/.test(\"pairs\\\\nmakes\\\\tdouble\") === false');\n}\n\n",
+ "id": "S15.10.2.6_A1_T1"
+ },
+ {
+ "section": "15.10.2.6",
+ "description": "Execute /e$/.exec(\"pairs\\nmakes\\tdouble\") and check results",
+ "test": "__executed = /e$/.exec(\"pairs\\nmakes\\tdouble\");\n\n__expected = [\"e\"];\n__expected.index = 17;\n__expected.input = \"pairs\\nmakes\\tdouble\";\n\n//CHECK#1\nif (__executed.length !== __expected.length) {\n\t$ERROR('#1: __executed = /e$/.exec(\"pairs\\\\nmakes\\\\tdouble\"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length);\n}\n\n//CHECK#2\nif (__executed.index !== __expected.index) {\n\t$ERROR('#2: __executed = /e$/.exec(\"pairs\\\\nmakes\\\\tdouble\"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index);\n}\n\n//CHECK#3\nif (__executed.input !== __expected.input) {\n\t$ERROR('#3: __executed = /e$/.exec(\"pairs\\\\nmakes\\\\tdouble\"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input);\n}\n\n//CHECK#4\nfor(var index=0; index<__expected.length; index++) {\n\tif (__executed[index] !== __expected[index]) {\n\t\t$ERROR('#4: __executed = /e$/.exec(\"pairs\\\\nmakes\\\\tdouble\"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]);\n\t}\n}\n\n",
+ "id": "S15.10.2.6_A1_T2"
+ },
+ {
+ "section": "15.10.2.6",
+ "description": "Execute /s$/m.exec(\"pairs\\nmakes\\tdouble\") and check results",
+ "test": "__executed = /s$/m.exec(\"pairs\\nmakes\\tdouble\");\n\n__expected = [\"s\"];\n__expected.index = 4;\n__expected.input = \"pairs\\nmakes\\tdouble\";\n\n//CHECK#1\nif (__executed.length !== __expected.length) {\n\t$ERROR('#1: __executed = /s$/m.exec(\"pairs\\\\nmakes\\\\tdouble\"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length);\n}\n\n//CHECK#2\nif (__executed.index !== __expected.index) {\n\t$ERROR('#2: __executed = /s$/m.exec(\"pairs\\\\nmakes\\\\tdouble\"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index);\n}\n\n//CHECK#3\nif (__executed.input !== __expected.input) {\n\t$ERROR('#3: __executed = /s$/m.exec(\"pairs\\\\nmakes\\\\tdouble\"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input);\n}\n\n//CHECK#4\nfor(var index=0; index<__expected.length; index++) {\n\tif (__executed[index] !== __expected[index]) {\n\t\t$ERROR('#4: __executed = /s$/m.exec(\"pairs\\\\nmakes\\\\tdouble\"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]);\n\t}\n}\n\n",
+ "id": "S15.10.2.6_A1_T3"
+ },
+ {
+ "section": "15.10.2.6",
+ "description": "Execute /[^e]$/mg.exec(\"pairs\\nmakes\\tdouble\") and check results",
+ "test": "__executed = /[^e]$/mg.exec(\"pairs\\nmakes\\tdouble\");\n\n__expected = [\"s\"];\n__expected.index = 4;\n__expected.input = \"pairs\\nmakes\\tdouble\";\n\n//CHECK#1\nif (__executed.length !== __expected.length) {\n\t$ERROR('#1: __executed = /[^e]$/mg.exec(\"pairs\\\\nmakes\\\\tdouble\"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length);\n}\n\n//CHECK#2\nif (__executed.index !== __expected.index) {\n\t$ERROR('#2: __executed = /[^e]$/mg.exec(\"pairs\\\\nmakes\\\\tdouble\"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index);\n}\n\n//CHECK#3\nif (__executed.input !== __expected.input) {\n\t$ERROR('#3: __executed = /[^e]$/mg.exec(\"pairs\\\\nmakes\\\\tdouble\"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input);\n}\n\n//CHECK#4\nfor(var index=0; index<__expected.length; index++) {\n\tif (__executed[index] !== __expected[index]) {\n\t\t$ERROR('#4: __executed = /[^e]$/mg.exec(\"pairs\\\\nmakes\\\\tdouble\"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]);\n\t}\n}\n\n",
+ "id": "S15.10.2.6_A1_T4"
+ },
+ {
+ "section": "15.10.2.6",
+ "description": "Execute /es$/mg.exec(\"pairs\\nmakes\\tdoubl\\u0065s\") and check results",
+ "test": "__executed = /es$/mg.exec(\"pairs\\nmakes\\tdoubl\\u0065s\");\n\n__expected = [\"es\"];\n__expected.index = 17;\n__expected.input = \"pairs\\nmakes\\tdoubles\";\n\n//CHECK#1\nif (__executed.length !== __expected.length) {\n\t$ERROR('#1: __executed = /es$/mg.exec(\"pairs\\\\nmakes\\\\tdoubl\\\\u0065s\"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length);\n}\n\n//CHECK#2\nif (__executed.index !== __expected.index) {\n\t$ERROR('#2: __executed = /es$/mg.exec(\"pairs\\\\nmakes\\\\tdoubl\\\\u0065s\"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index);\n}\n\n//CHECK#3\nif (__executed.input !== __expected.input) {\n\t$ERROR('#3: __executed = /es$/mg.exec(\"pairs\\\\nmakes\\\\tdoubl\\\\u0065s\"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input);\n}\n\n//CHECK#4\nfor(var index=0; index<__expected.length; index++) {\n\tif (__executed[index] !== __expected[index]) {\n\t\t$ERROR('#4: __executed = /es$/mg.exec(\"pairs\\\\nmakes\\\\tdoubl\\\\u0065s\"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]);\n\t}\n}\n\n",
+ "id": "S15.10.2.6_A1_T5"
+ },
+ {
+ "section": "15.10.2.6",
+ "description": "Execute /^m/.test(\"pairs\\nmakes\\tdouble\") and check results",
+ "test": "__executed = /^m/.test(\"pairs\\nmakes\\tdouble\");\n\n//CHECK#1\nif (__executed) {\n\t$ERROR('#1: /^m/.test(\"pairs\\\\nmakes\\\\tdouble\") === false');\n}\n\n",
+ "id": "S15.10.2.6_A2_T1"
+ },
+ {
+ "section": "15.10.2.6",
+ "description": "Execute /^\\d+/m.exec(\"abc\\n123xyz\") and check results",
+ "test": "__executed = /^\\d+/m.exec(\"abc\\n123xyz\");\n\n__expected = [\"123\"];\n__expected.index = 4;\n__expected.input = \"abc\\n123xyz\";\n\n//CHECK#1\nif (__executed.length !== __expected.length) {\n\t$ERROR('#1: __executed = /^\\\\d+/m.exec(\"abc\\\\n123xyz\"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length);\n}\n\n//CHECK#2\nif (__executed.index !== __expected.index) {\n\t$ERROR('#2: __executed = /^\\\\d+/m.exec(\"abc\\\\n123xyz\"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index);\n}\n\n//CHECK#3\nif (__executed.input !== __expected.input) {\n\t$ERROR('#3: __executed = /^\\\\d+/m.exec(\"abc\\\\n123xyz\"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input);\n}\n\n//CHECK#4\nfor(var index=0; index<__expected.length; index++) {\n\tif (__executed[index] !== __expected[index]) {\n\t\t$ERROR('#4: __executed = /^\\\\d+/m.exec(\"abc\\\\n123xyz\"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]);\n\t}\n}\n\n",
+ "id": "S15.10.2.6_A2_T10"
+ },
+ {
+ "section": "15.10.2.6",
+ "description": "Execute /^m/m.exec(\"pairs\\nmakes\\tdouble\") and check results",
+ "test": "__executed = /^m/m.exec(\"pairs\\nmakes\\tdouble\");\n\n__expected = [\"m\"];\n__expected.index = 6;\n__expected.input = \"pairs\\nmakes\\tdouble\";\n\n//CHECK#1\nif (__executed.length !== __expected.length) {\n\t$ERROR('#1: __executed = /^m/m.exec(\"pairs\\\\nmakes\\\\tdouble\"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length);\n}\n\n//CHECK#2\nif (__executed.index !== __expected.index) {\n\t$ERROR('#2: __executed = /^m/m.exec(\"pairs\\\\nmakes\\\\tdouble\"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index);\n}\n\n//CHECK#3\nif (__executed.input !== __expected.input) {\n\t$ERROR('#3: __executed = /^m/m.exec(\"pairs\\\\nmakes\\\\tdouble\"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input);\n}\n\n//CHECK#4\nfor(var index=0; index<__expected.length; index++) {\n\tif (__executed[index] !== __expected[index]) {\n\t\t$ERROR('#4: __executed = /^m/m.exec(\"pairs\\\\nmakes\\\\tdouble\"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]);\n\t}\n}\n\n",
+ "id": "S15.10.2.6_A2_T2"
+ },
+ {
+ "section": "15.10.2.6",
+ "description": "Execute /^p[a-z]/.exec(\"pairs\\nmakes\\tdouble\\npesos\") and check results",
+ "test": "__executed = /^p[a-z]/.exec(\"pairs\\nmakes\\tdouble\\npesos\");\n\n__expected = [\"pa\"];\n__expected.index = 0;\n__expected.input = \"pairs\\nmakes\\tdouble\\npesos\";\n\n//CHECK#1\nif (__executed.length !== __expected.length) {\n\t$ERROR('#1: __executed = /^p[a-z]/.exec(\"pairs\\\\nmakes\\\\tdouble\\\\npesos\"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length);\n}\n\n//CHECK#2\nif (__executed.index !== __expected.index) {\n\t$ERROR('#2: __executed = /^p[a-z]/.exec(\"pairs\\\\nmakes\\\\tdouble\\\\npesos\"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index);\n}\n\n//CHECK#3\nif (__executed.input !== __expected.input) {\n\t$ERROR('#3: __executed = /^p[a-z]/.exec(\"pairs\\\\nmakes\\\\tdouble\\\\npesos\"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input);\n}\n\n//CHECK#4\nfor(var index=0; index<__expected.length; index++) {\n\tif (__executed[index] !== __expected[index]) {\n\t\t$ERROR('#4: __executed = /^p[a-z]/.exec(\"pairs\\\\nmakes\\\\tdouble\\\\npesos\"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]);\n\t}\n}\n\n",
+ "id": "S15.10.2.6_A2_T3"
+ },
+ {
+ "section": "15.10.2.6",
+ "description": "Execute /^p[a-z]/m.exec(\"pairs\\nmakes\\tdouble\\npesos\") and check results",
+ "test": "__executed = /^p[b-z]/m.exec(\"pairs\\nmakes\\tdouble\\npesos\");\n\n__expected = [\"pe\"];\n__expected.index = 19;\n__expected.input = \"pairs\\nmakes\\tdouble\\npesos\";\n\n//CHECK#1\nif (__executed.length !== __expected.length) {\n\t$ERROR('#1: __executed = /^p[b-z]/m.exec(\"pairs\\\\nmakes\\\\tdouble\\\\npesos\"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length);\n}\n\n//CHECK#2\nif (__executed.index !== __expected.index) {\n\t$ERROR('#2: __executed = /^p[b-z]/m.exec(\"pairs\\\\nmakes\\\\tdouble\\\\npesos\"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index);\n}\n\n//CHECK#3\nif (__executed.input !== __expected.input) {\n\t$ERROR('#3: __executed = /^p[b-z]/m.exec(\"pairs\\\\nmakes\\\\tdouble\\\\npesos\"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input);\n}\n\n//CHECK#4\nfor(var index=0; index<__expected.length; index++) {\n\tif (__executed[index] !== __expected[index]) {\n\t\t$ERROR('#4: __executed = /^p[b-z]/m.exec(\"pairs\\\\nmakes\\\\tdouble\\\\npesos\"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]);\n\t}\n}\n\n",
+ "id": "S15.10.2.6_A2_T4"
+ },
+ {
+ "section": "15.10.2.6",
+ "description": "Execute /^[^p]/m.exec(\"pairs\\nmakes\\tdouble\\npesos\") and check results",
+ "test": "__executed = /^[^p]/m.exec(\"pairs\\nmakes\\tdouble\\npesos\");\n\n__expected = [\"m\"];\n__expected.index = 6;\n__expected.input = \"pairs\\nmakes\\tdouble\\npesos\";\n\n//CHECK#1\nif (__executed.length !== __expected.length) {\n\t$ERROR('#1: __executed = /^[^p]/m.exec(\"pairs\\\\nmakes\\\\tdouble\\\\npesos\"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length);\n}\n\n//CHECK#2\nif (__executed.index !== __expected.index) {\n\t$ERROR('#2: __executed = /^[^p]/m.exec(\"pairs\\\\nmakes\\\\tdouble\\\\npesos\"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index);\n}\n\n//CHECK#3\nif (__executed.input !== __expected.input) {\n\t$ERROR('#3: __executed = /^[^p]/m.exec(\"pairs\\\\nmakes\\\\tdouble\\\\npesos\"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input);\n}\n\n//CHECK#4\nfor(var index=0; index<__expected.length; index++) {\n\tif (__executed[index] !== __expected[index]) {\n\t\t$ERROR('#4: __executed = /^[^p]/m.exec(\"pairs\\\\nmakes\\\\tdouble\\\\npesos\"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]);\n\t}\n}\n\n",
+ "id": "S15.10.2.6_A2_T5"
+ },
+ {
+ "section": "15.10.2.6",
+ "description": "Execute /^ab/.exec(\"abcde\") and check results",
+ "test": "__executed = /^ab/.exec(\"abcde\");\n\n__expected = [\"ab\"];\n__expected.index = 0;\n__expected.input = \"abcde\";\n\n//CHECK#1\nif (__executed.length !== __expected.length) {\n\t$ERROR('#1: __executed = /^ab/.exec(\"abcde\"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length);\n}\n\n//CHECK#2\nif (__executed.index !== __expected.index) {\n\t$ERROR('#2: __executed = /^ab/.exec(\"abcde\"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index);\n}\n\n//CHECK#3\nif (__executed.input !== __expected.input) {\n\t$ERROR('#3: __executed = /^ab/.exec(\"abcde\"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input);\n}\n\n//CHECK#4\nfor(var index=0; index<__expected.length; index++) {\n\tif (__executed[index] !== __expected[index]) {\n\t\t$ERROR('#4: __executed = /^ab/.exec(\"abcde\"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]);\n\t}\n}\n\n",
+ "id": "S15.10.2.6_A2_T6"
+ },
+ {
+ "section": "15.10.2.6",
+ "description": "Execute /^..^e/.test(\"ab\\ncde\") and check results",
+ "test": "__executed = /^..^e/.test(\"ab\\ncde\");\n\n//CHECK#1\nif (__executed) {\n\t$ERROR('#1: /^..^e/.test(\"ab\\\\ncde\") === false');\n}\n\n",
+ "id": "S15.10.2.6_A2_T7"
+ },
+ {
+ "section": "15.10.2.6",
+ "description": "Execute /^xxx/.test(\"yyyyy\") and check results",
+ "test": "__executed = /^xxx/.test(\"yyyyy\");\n\n//CHECK#1\nif (__executed) {\n\t$ERROR('#1: /^xxx/.test(\"yyyyy\") === false');\n}\n\n",
+ "id": "S15.10.2.6_A2_T8"
+ },
+ {
+ "section": "15.10.2.6",
+ "description": "Execute /^\\^+/.exec(\"^^^x\") and check results",
+ "test": "__executed = /^\\^+/.exec(\"^^^x\");\n\n__expected = [\"^^^\"];\n__expected.index = 0;\n__expected.input = \"^^^x\";\n\n//CHECK#1\nif (__executed.length !== __expected.length) {\n\t$ERROR('#1: __executed = /^\\\\^+/.exec(\"^^^x\"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length);\n}\n\n//CHECK#2\nif (__executed.index !== __expected.index) {\n\t$ERROR('#2: __executed = /^\\\\^+/.exec(\"^^^x\"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index);\n}\n\n//CHECK#3\nif (__executed.input !== __expected.input) {\n\t$ERROR('#3: __executed = /^\\\\^+/.exec(\"^^^x\"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input);\n}\n\n//CHECK#4\nfor(var index=0; index<__expected.length; index++) {\n\tif (__executed[index] !== __expected[index]) {\n\t\t$ERROR('#4: __executed = /^\\\\^+/.exec(\"^^^x\"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]);\n\t}\n}\n\n",
+ "id": "S15.10.2.6_A2_T9"
+ },
+ {
+ "section": "15.10.2.6",
+ "description": "Execute /\\bp/.exec(\"pilot\\nsoviet robot\\topenoffice\") and check results",
+ "test": "__executed = /\\bp/.exec(\"pilot\\nsoviet robot\\topenoffice\");\n\n__expected = [\"p\"];\n__expected.index = 0;\n__expected.input = \"pilot\\nsoviet robot\\topenoffice\";\n\n//CHECK#1\nif (__executed.length !== __expected.length) {\n\t$ERROR('#1: __executed = /\\\\bp/.exec(\"pilot\\\\nsoviet robot\\\\topenoffice\"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length);\n}\n\n//CHECK#2\nif (__executed.index !== __expected.index) {\n\t$ERROR('#2: __executed = /\\\\bp/.exec(\"pilot\\\\nsoviet robot\\\\topenoffice\"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index);\n}\n\n//CHECK#3\nif (__executed.input !== __expected.input) {\n\t$ERROR('#3: __executed = /\\\\bp/.exec(\"pilot\\\\nsoviet robot\\\\topenoffice\"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input);\n}\n\n//CHECK#4\nfor(var index=0; index<__expected.length; index++) {\n\tif (__executed[index] !== __expected[index]) {\n\t\t$ERROR('#4: __executed = /\\\\bp/.exec(\"pilot\\\\nsoviet robot\\\\topenoffice\"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]);\n\t}\n}\n\n",
+ "id": "S15.10.2.6_A3_T1"
+ },
+ {
+ "section": "15.10.2.6",
+ "description": "Execute /\\brobot\\b/.exec(\"pilot\\nsoviet robot\\topenoffice\") and check results",
+ "test": "__executed = /\\brobot\\b/.exec(\"pilot\\nsoviet robot\\topenoffice\");\n\n__expected = [\"robot\"];\n__expected.index = 13;\n__expected.input = \"pilot\\nsoviet robot\\topenoffice\";\n\n//CHECK#1\nif (__executed.length !== __expected.length) {\n\t$ERROR('#1: __executed = /\\\\brobot\\\\b/.exec(\"pilot\\\\nsoviet robot\\\\topenoffice\"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length);\n}\n\n//CHECK#2\nif (__executed.index !== __expected.index) {\n\t$ERROR('#2: __executed = /\\\\brobot\\\\b/.exec(\"pilot\\\\nsoviet robot\\\\topenoffice\"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index);\n}\n\n//CHECK#3\nif (__executed.input !== __expected.input) {\n\t$ERROR('#3: __executed = /\\\\brobot\\\\b/.exec(\"pilot\\\\nsoviet robot\\\\topenoffice\"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input);\n}\n\n//CHECK#4\nfor(var index=0; index<__expected.length; index++) {\n\tif (__executed[index] !== __expected[index]) {\n\t\t$ERROR('#4: __executed = /\\\\brobot\\\\b/.exec(\"pilot\\\\nsoviet robot\\\\topenoffice\"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]);\n\t}\n}\n\n",
+ "id": "S15.10.2.6_A3_T10"
+ },
+ {
+ "section": "15.10.2.6",
+ "description": "Execute /\\b\\w{5}\\b/.exec(\"pilot\\nsoviet robot\\topenoffice\") and check results",
+ "test": "__executed = /\\b\\w{5}\\b/.exec(\"pilot\\nsoviet robot\\topenoffice\");\n\n__expected = [\"pilot\"];\n__expected.index = 0;\n__expected.input = \"pilot\\nsoviet robot\\topenoffice\";\n\n//CHECK#1\nif (__executed.length !== __expected.length) {\n\t$ERROR('#1: __executed = /\\\\b\\\\w{5}\\\\b/.exec(\"pilot\\\\nsoviet robot\\\\topenoffice\"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length);\n}\n\n//CHECK#2\nif (__executed.index !== __expected.index) {\n\t$ERROR('#2: __executed = /\\\\b\\\\w{5}\\\\b/.exec(\"pilot\\\\nsoviet robot\\\\topenoffice\"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index);\n}\n\n//CHECK#3\nif (__executed.input !== __expected.input) {\n\t$ERROR('#3: __executed = /\\\\b\\\\w{5}\\\\b/.exec(\"pilot\\\\nsoviet robot\\\\topenoffice\"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input);\n}\n\n//CHECK#4\nfor(var index=0; index<__expected.length; index++) {\n\tif (__executed[index] !== __expected[index]) {\n\t\t$ERROR('#4: __executed = /\\\\b\\\\w{5}\\\\b/.exec(\"pilot\\\\nsoviet robot\\\\topenoffice\"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]);\n\t}\n}\n\n",
+ "id": "S15.10.2.6_A3_T11"
+ },
+ {
+ "section": "15.10.2.6",
+ "description": "Execute /\\bop/.exec(\"pilot\\nsoviet robot\\topenoffice\") and check results",
+ "test": "__executed = /\\bop/.exec(\"pilot\\nsoviet robot\\topenoffice\");\n\n__expected = [\"op\"];\n__expected.index = 19;\n__expected.input = \"pilot\\nsoviet robot\\topenoffice\";\n\n//CHECK#1\nif (__executed.length !== __expected.length) {\n\t$ERROR('#1: __executed = /\\\\bop/.exec(\"pilot\\\\nsoviet robot\\\\topenoffice\"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length);\n}\n\n//CHECK#2\nif (__executed.index !== __expected.index) {\n\t$ERROR('#2: __executed = /\\\\bop/.exec(\"pilot\\\\nsoviet robot\\\\topenoffice\"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index);\n}\n\n//CHECK#3\nif (__executed.input !== __expected.input) {\n\t$ERROR('#3: __executed = /\\\\bop/.exec(\"pilot\\\\nsoviet robot\\\\topenoffice\"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input);\n}\n\n//CHECK#4\nfor(var index=0; index<__expected.length; index++) {\n\tif (__executed[index] !== __expected[index]) {\n\t\t$ERROR('#4: __executed = /\\\\bop/.exec(\"pilot\\\\nsoviet robot\\\\topenoffice\"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]);\n\t}\n}\n\n",
+ "id": "S15.10.2.6_A3_T12"
+ },
+ {
+ "section": "15.10.2.6",
+ "description": "Execute /op\\b/.test(\"pilot\\nsoviet robot\\topenoffice\") and check results",
+ "test": "__executed = /op\\b/.test(\"pilot\\nsoviet robot\\topenoffice\");\n\n//CHECK#1\nif (__executed) {\n\t$ERROR('#1: /op\\\\b/.test(\"pilot\\\\nsoviet robot\\\\topenoffice\") === false');\n}\n\n",
+ "id": "S15.10.2.6_A3_T13"
+ },
+ {
+ "section": "15.10.2.6",
+ "description": "Execute /e\\b/.exec(\"pilot\\nsoviet robot\\topenoffic\\u0065\") and check results",
+ "test": "__executed = /e\\b/.exec(\"pilot\\nsoviet robot\\topenoffic\\u0065\");\n\n__expected = [\"e\"];\n__expected.index = 28;\n__expected.input = \"pilot\\nsoviet robot\\topenoffice\";\n\n//CHECK#1\nif (__executed.length !== __expected.length) {\n\t$ERROR('#1: __executed = /e\\\\b/.exec(\"pilot\\\\nsoviet robot\\\\topenoffic\\\\u0065\"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length);\n}\n\n//CHECK#2\nif (__executed.index !== __expected.index) {\n\t$ERROR('#2: __executed = /e\\\\b/.exec(\"pilot\\\\nsoviet robot\\\\topenoffic\\\\u0065\"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index);\n}\n\n//CHECK#3\nif (__executed.input !== __expected.input) {\n\t$ERROR('#3: __executed = /e\\\\b/.exec(\"pilot\\\\nsoviet robot\\\\topenoffic\\\\u0065\"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input);\n}\n\n//CHECK#4\nfor(var index=0; index<__expected.length; index++) {\n\tif (__executed[index] !== __expected[index]) {\n\t\t$ERROR('#4: __executed = /e\\\\b/.exec(\"pilot\\\\nsoviet robot\\\\topenoffic\\\\u0065\"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]);\n\t}\n}\n\n",
+ "id": "S15.10.2.6_A3_T14"
+ },
+ {
+ "section": "15.10.2.6",
+ "description": "Execute /\\be/.test(\"pilot\\nsoviet robot\\topenoffic\\u0065\") and check results",
+ "test": "__executed = /\\be/.test(\"pilot\\nsoviet robot\\topenoffic\\u0065\");\n\n//CHECK#1\nif (__executed) {\n\t$ERROR('#1: /\\\\be/.test(\"pilot\\\\nsoviet robot\\\\topenoffic\\\\u0065\") === false');\n}\n\n",
+ "id": "S15.10.2.6_A3_T15"
+ },
+ {
+ "section": "15.10.2.6",
+ "description": "Execute /ot\\b/.exec(\"pilot\\nsoviet robot\\topenoffice\") and check results",
+ "test": "__executed = /ot\\b/.exec(\"pilot\\nsoviet robot\\topenoffice\");\n\n__expected = [\"ot\"];\n__expected.index = 3;\n__expected.input = \"pilot\\nsoviet robot\\topenoffice\";\n\n//CHECK#1\nif (__executed.length !== __expected.length) {\n\t$ERROR('#1: __executed = /ot\\\\b/.exec(\"pilot\\\\nsoviet robot\\\\topenoffice\"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length);\n}\n\n//CHECK#2\nif (__executed.index !== __expected.index) {\n\t$ERROR('#2: __executed = /ot\\\\b/.exec(\"pilot\\\\nsoviet robot\\\\topenoffice\"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index);\n}\n\n//CHECK#3\nif (__executed.input !== __expected.input) {\n\t$ERROR('#3: __executed = /ot\\\\b/.exec(\"pilot\\\\nsoviet robot\\\\topenoffice\"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input);\n}\n\n//CHECK#4\nfor(var index=0; index<__expected.length; index++) {\n\tif (__executed[index] !== __expected[index]) {\n\t\t$ERROR('#4: __executed = /ot\\\\b/.exec(\"pilot\\\\nsoviet robot\\\\topenoffice\"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]);\n\t}\n}\n\n",
+ "id": "S15.10.2.6_A3_T2"
+ },
+ {
+ "section": "15.10.2.6",
+ "description": "Execute /\\bot/.test(\"pilot\\nsoviet robot\\topenoffice\") and check results",
+ "test": "__executed = /\\bot/.test(\"pilot\\nsoviet robot\\topenoffice\");\n\n//CHECK#1\nif (__executed) {\n\t$ERROR('#1: /\\\\bot/.test(\"pilot\\\\nsoviet robot\\\\topenoffice\") === false');\n}\n\n",
+ "id": "S15.10.2.6_A3_T3"
+ },
+ {
+ "section": "15.10.2.6",
+ "description": "Execute /\\bso/.exec(\"pilot\\nsoviet robot\\topenoffice\") and check results",
+ "test": "__executed = /\\bso/.exec(\"pilot\\nsoviet robot\\topenoffice\");\n\n__expected = [\"so\"];\n__expected.index = 6;\n__expected.input = \"pilot\\nsoviet robot\\topenoffice\";\n\n//CHECK#1\nif (__executed.length !== __expected.length) {\n\t$ERROR('#1: __executed = /\\\\bso/.exec(\"pilot\\\\nsoviet robot\\\\topenoffice\"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length);\n}\n\n//CHECK#2\nif (__executed.index !== __expected.index) {\n\t$ERROR('#2: __executed = /\\\\bso/.exec(\"pilot\\\\nsoviet robot\\\\topenoffice\"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index);\n}\n\n//CHECK#3\nif (__executed.input !== __expected.input) {\n\t$ERROR('#3: __executed = /\\\\bso/.exec(\"pilot\\\\nsoviet robot\\\\topenoffice\"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input);\n}\n\n//CHECK#4\nfor(var index=0; index<__expected.length; index++) {\n\tif (__executed[index] !== __expected[index]) {\n\t\t$ERROR('#4: __executed = /\\\\bso/.exec(\"pilot\\\\nsoviet robot\\\\topenoffice\"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]);\n\t}\n}\n\n",
+ "id": "S15.10.2.6_A3_T4"
+ },
+ {
+ "section": "15.10.2.6",
+ "description": "Execute /so\\b/.test(\"pilot\\nsoviet robot\\topenoffice\") and check results",
+ "test": "__executed = /so\\b/.test(\"pilot\\nsoviet robot\\topenoffice\");\n\n//CHECK#1\nif (__executed) {\n\t$ERROR('#1: /so\\\\b/.test(\"pilot\\\\nsoviet robot\\\\topenoffice\") === false');\n}\n\n",
+ "id": "S15.10.2.6_A3_T5"
+ },
+ {
+ "section": "15.10.2.6",
+ "description": "Execute /[^o]t\\b/.exec(\"pilOt\\nsoviet robot\\topenoffice\") and check results",
+ "test": "__executed = /[^o]t\\b/.exec(\"pilOt\\nsoviet robot\\topenoffice\");\n\n__expected = [\"Ot\"];\n__expected.index = 3;\n__expected.input = \"pilOt\\nsoviet robot\\topenoffice\";\n\n//CHECK#1\nif (__executed.length !== __expected.length) {\n\t$ERROR('#1: __executed = /[^o]t\\\\b/.exec(\"pilOt\\\\nsoviet robot\\\\topenoffice\"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length);\n}\n\n//CHECK#2\nif (__executed.index !== __expected.index) {\n\t$ERROR('#2: __executed = /[^o]t\\\\b/.exec(\"pilOt\\\\nsoviet robot\\\\topenoffice\"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index);\n}\n\n//CHECK#3\nif (__executed.input !== __expected.input) {\n\t$ERROR('#3: __executed = /[^o]t\\\\b/.exec(\"pilOt\\\\nsoviet robot\\\\topenoffice\"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input);\n}\n\n//CHECK#4\nfor(var index=0; index<__expected.length; index++) {\n\tif (__executed[index] !== __expected[index]) {\n\t\t$ERROR('#4: __executed = /[^o]t\\\\b/.exec(\"pilOt\\\\nsoviet robot\\\\topenoffice\"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]);\n\t}\n}\n\n",
+ "id": "S15.10.2.6_A3_T6"
+ },
+ {
+ "section": "15.10.2.6",
+ "description": "Execute /[^o]t\\b/i.exec(\"pilOt\\nsoviet robot\\topenoffice\") and check results",
+ "test": "__executed = /[^o]t\\b/i.exec(\"pilOt\\nsoviet robot\\topenoffice\");\n\n__expected = [\"et\"];\n__expected.index = 10;\n__expected.input = \"pilOt\\nsoviet robot\\topenoffice\";\n\n//CHECK#1\nif (__executed.length !== __expected.length) {\n\t$ERROR('#1: __executed = /[^o]t\\\\b/i.exec(\"pilOt\\\\nsoviet robot\\\\topenoffice\"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length);\n}\n\n//CHECK#2\nif (__executed.index !== __expected.index) {\n\t$ERROR('#2: __executed = /[^o]t\\\\b/i.exec(\"pilOt\\\\nsoviet robot\\\\topenoffice\"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index);\n}\n\n//CHECK#3\nif (__executed.input !== __expected.input) {\n\t$ERROR('#3: __executed = /[^o]t\\\\b/i.exec(\"pilOt\\\\nsoviet robot\\\\topenoffice\"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input);\n}\n\n//CHECK#4\nfor(var index=0; index<__expected.length; index++) {\n\tif (__executed[index] !== __expected[index]) {\n\t\t$ERROR('#4: __executed = /[^o]t\\\\b/i.exec(\"pilOt\\\\nsoviet robot\\\\topenoffice\"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]);\n\t}\n}\n\n",
+ "id": "S15.10.2.6_A3_T7"
+ },
+ {
+ "section": "15.10.2.6",
+ "description": "Execute /\\bro/.exec(\"pilot\\nsoviet robot\\topenoffice\") and check results",
+ "test": "__executed = /\\bro/.exec(\"pilot\\nsoviet robot\\topenoffice\");\n\n__expected = [\"ro\"];\n__expected.index = 13;\n__expected.input = \"pilot\\nsoviet robot\\topenoffice\";\n\n//CHECK#1\nif (__executed.length !== __expected.length) {\n\t$ERROR('#1: __executed = /\\\\bro/.exec(\"pilot\\\\nsoviet robot\\\\topenoffice\"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length);\n}\n\n//CHECK#2\nif (__executed.index !== __expected.index) {\n\t$ERROR('#2: __executed = /\\\\bro/.exec(\"pilot\\\\nsoviet robot\\\\topenoffice\"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index);\n}\n\n//CHECK#3\nif (__executed.input !== __expected.input) {\n\t$ERROR('#3: __executed = /\\\\bro/.exec(\"pilot\\\\nsoviet robot\\\\topenoffice\"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input);\n}\n\n//CHECK#4\nfor(var index=0; index<__expected.length; index++) {\n\tif (__executed[index] !== __expected[index]) {\n\t\t$ERROR('#4: __executed = /\\\\bro/.exec(\"pilot\\\\nsoviet robot\\\\topenoffice\"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]);\n\t}\n}\n\n",
+ "id": "S15.10.2.6_A3_T8"
+ },
+ {
+ "section": "15.10.2.6",
+ "description": "Execute /r\\b/.exec(\"pilot\\nsoviet robot\\topenoffice\") and check results",
+ "test": "__executed = /r\\b/.test(\"pilot\\nsoviet robot\\topenoffice\");\n\n//CHECK#1\nif (__executed) {\n\t$ERROR('#1: /r\\\\b/.test(\"pilot\\\\nsoviet robot\\\\topenoffice\") === false');\n}\n\n",
+ "id": "S15.10.2.6_A3_T9"
+ },
+ {
+ "section": "15.10.2.6",
+ "description": "Execute /\\Bevil\\B/.exec(\"devils arise\\tfor\\nevil\") and check results",
+ "test": "__executed = /\\Bevil\\B/.exec(\"devils arise\\tfor\\nevil\");\n\n__expected = [\"evil\"];\n__expected.index = 1;\n__expected.input = \"devils arise\\tfor\\nevil\";\n\n//CHECK#1\nif (__executed.length !== __expected.length) {\n\t$ERROR('#1: __executed = /\\\\Bevil\\\\B/.exec(\"devils arise\\\\tfor\\\\nevil\"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length);\n}\n\n//CHECK#2\nif (__executed.index !== __expected.index) {\n\t$ERROR('#2: __executed = /\\\\Bevil\\\\B/.exec(\"devils arise\\\\tfor\\\\nevil\"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index);\n}\n\n//CHECK#3\nif (__executed.input !== __expected.input) {\n\t$ERROR('#3: __executed = /\\\\Bevil\\\\B/.exec(\"devils arise\\\\tfor\\\\nevil\"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input);\n}\n\n//CHECK#4\nfor(var index=0; index<__expected.length; index++) {\n\tif (__executed[index] !== __expected[index]) {\n\t\t$ERROR('#4: __executed = /\\\\Bevil\\\\B/.exec(\"devils arise\\\\tfor\\\\nevil\"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]);\n\t}\n}\n\n",
+ "id": "S15.10.2.6_A4_T1"
+ },
+ {
+ "section": "15.10.2.6",
+ "description": "Execute /[f-z]e\\B/.exec(\"devils arise\\tfor\\nevil\") and check results",
+ "test": "__executed = /[f-z]e\\B/.exec(\"devils arise\\tfor\\nrevil\");\n\n__expected = [\"re\"];\n__expected.index = 17;\n__expected.input = \"devils arise\\tfor\\nrevil\";\n\n//CHECK#1\nif (__executed.length !== __expected.length) {\n\t$ERROR('#1: __executed = /[f-z]e\\\\B/.exec(\"devils arise\\\\tfor\\\\nrevil\"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length);\n}\n\n//CHECK#2\nif (__executed.index !== __expected.index) {\n\t$ERROR('#2: __executed = /[f-z]e\\\\B/.exec(\"devils arise\\\\tfor\\\\nrevil\"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index);\n}\n\n//CHECK#3\nif (__executed.input !== __expected.input) {\n\t$ERROR('#3: __executed = /[f-z]e\\\\B/.exec(\"devils arise\\\\tfor\\\\nrevil\"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input);\n}\n\n//CHECK#4\nfor(var index=0; index<__expected.length; index++) {\n\tif (__executed[index] !== __expected[index]) {\n\t\t$ERROR('#4: __executed = /[f-z]e\\\\B/.exec(\"devils arise\\\\tfor\\\\nrevil\"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]);\n\t}\n}\n\n",
+ "id": "S15.10.2.6_A4_T2"
+ },
+ {
+ "section": "15.10.2.6",
+ "description": "Execute /\\Bo\\B/.exec(\"devils arise\\tfor\\nevil\") and check results",
+ "test": "__executed = /\\Bo\\B/i.exec(\"devils arise\\tfOr\\nrevil\");\n\n__expected = [\"O\"];\n__expected.index = 14;\n__expected.input = \"devils arise\\tfOr\\nrevil\";\n\n//CHECK#1\nif (__executed.length !== __expected.length) {\n\t$ERROR('#1: __executed = /\\\\Bo\\\\B/i.exec(\"devils arise\\\\tfOr\\\\nrevil\"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length);\n}\n\n//CHECK#2\nif (__executed.index !== __expected.index) {\n\t$ERROR('#2: __executed = /\\\\Bo\\\\B/i.exec(\"devils arise\\\\tfOr\\\\nrevil\"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index);\n}\n\n//CHECK#3\nif (__executed.input !== __expected.input) {\n\t$ERROR('#3: __executed = /\\\\Bo\\\\B/i.exec(\"devils arise\\\\tfOr\\\\nrevil\"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input);\n}\n\n//CHECK#4\nfor(var index=0; index<__expected.length; index++) {\n\tif (__executed[index] !== __expected[index]) {\n\t\t$ERROR('#4: __executed = /\\\\Bo\\\\B/i.exec(\"devils arise\\\\tfOr\\\\nrevil\"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]);\n\t}\n}\n\n",
+ "id": "S15.10.2.6_A4_T3"
+ },
+ {
+ "section": "15.10.2.6",
+ "description": "Execute /\\B\\w\\B/.exec(\"devils arise\\tfor\\nevil\") and check results",
+ "test": "__executed = /\\B\\w\\B/.exec(\"devils arise\\tfor\\nrevil\");\n\n__expected = [\"e\"];\n__expected.index = 1;\n__expected.input = \"devils arise\\tfor\\nrevil\";\n\n//CHECK#1\nif (__executed.length !== __expected.length) {\n\t$ERROR('#1: __executed = /\\\\B\\\\w\\\\B/.exec(\"devils arise\\\\tfor\\\\nrevil\"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length);\n}\n\n//CHECK#2\nif (__executed.index !== __expected.index) {\n\t$ERROR('#2: __executed = /\\\\B\\\\w\\\\B/.exec(\"devils arise\\\\tfor\\\\nrevil\"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index);\n}\n\n//CHECK#3\nif (__executed.input !== __expected.input) {\n\t$ERROR('#3: __executed = /\\\\B\\\\w\\\\B/.exec(\"devils arise\\\\tfor\\\\nrevil\"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input);\n}\n\n//CHECK#4\nfor(var index=0; index<__expected.length; index++) {\n\tif (__executed[index] !== __expected[index]) {\n\t\t$ERROR('#4: __executed = /\\\\B\\\\w\\\\B/.exec(\"devils arise\\\\tfor\\\\nrevil\"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]);\n\t}\n}\n\n",
+ "id": "S15.10.2.6_A4_T4"
+ },
+ {
+ "section": "15.10.2.6",
+ "description": "Execute /\\w\\B/.exec(\"devils arise\\tfor\\nevil\") and check results",
+ "test": "__executed = /\\w\\B/.exec(\"devils arise\\tfor\\nrevil\");\n\n__expected = [\"d\"];\n__expected.index = 0;\n__expected.input = \"devils arise\\tfor\\nrevil\";\n\n//CHECK#1\nif (__executed.length !== __expected.length) {\n\t$ERROR('#1: __executed = /\\\\w\\\\B/.exec(\"devils arise\\\\tfor\\\\nrevil\"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length);\n}\n\n//CHECK#2\nif (__executed.index !== __expected.index) {\n\t$ERROR('#2: __executed = /\\\\w\\\\B/.exec(\"devils arise\\\\tfor\\\\nrevil\"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index);\n}\n\n//CHECK#3\nif (__executed.input !== __expected.input) {\n\t$ERROR('#3: __executed = /\\\\w\\\\B/.exec(\"devils arise\\\\tfor\\\\nrevil\"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input);\n}\n\n//CHECK#4\nfor(var index=0; index<__expected.length; index++) {\n\tif (__executed[index] !== __expected[index]) {\n\t\t$ERROR('#4: __executed = /\\\\w\\\\B/.exec(\"devils arise\\\\tfor\\\\nrevil\"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]);\n\t}\n}\n\n",
+ "id": "S15.10.2.6_A4_T5"
+ },
+ {
+ "section": "15.10.2.6",
+ "description": "Execute /\\B\\w/.exec(\"devils arise\\tfor\\nevil\") and check results",
+ "test": "__executed = /\\B\\w/.exec(\"devils arise\\tfor\\nrevil\");\n\n__expected = [\"e\"];\n__expected.index = 1;\n__expected.input = \"devils arise\\tfor\\nrevil\";\n\n//CHECK#1\nif (__executed.length !== __expected.length) {\n\t$ERROR('#1: __executed = /\\\\B\\\\w/.exec(\"devils arise\\\\tfor\\\\nrevil\"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length);\n}\n\n//CHECK#2\nif (__executed.index !== __expected.index) {\n\t$ERROR('#2: __executed = /\\\\B\\\\w/.exec(\"devils arise\\\\tfor\\\\nrevil\"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index);\n}\n\n//CHECK#3\nif (__executed.input !== __expected.input) {\n\t$ERROR('#3: __executed = /\\\\B\\\\w/.exec(\"devils arise\\\\tfor\\\\nrevil\"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input);\n}\n\n//CHECK#4\nfor(var index=0; index<__expected.length; index++) {\n\tif (__executed[index] !== __expected[index]) {\n\t\t$ERROR('#4: __executed = /\\\\B\\\\w/.exec(\"devils arise\\\\tfor\\\\nrevil\"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]);\n\t}\n}\n\n",
+ "id": "S15.10.2.6_A4_T6"
+ },
+ {
+ "section": "15.10.2.6",
+ "description": "Execute /\\B\\[^z]{4}\\B/.test(\"devil arise\\tforzzx\\nevils\") and check results",
+ "test": "__executed = /\\B\\[^z]{4}\\B/.test(\"devil arise\\tforzzx\\nevils\");\n\n//CHECK#1\nif (__executed) {\n\t$ERROR('#1: /\\\\B\\\\[^z]{4}\\\\B/.test(\"devil arise\\\\tforzzx\\\\nevils\") === false');\n}\n\n",
+ "id": "S15.10.2.6_A4_T7"
+ },
+ {
+ "section": "15.10.2.6",
+ "description": "Execute /\\B\\w{4}\\B/.exec(\"devil arise\\tforzzx\\nevils\") and check results",
+ "test": "__executed = /\\B\\w{4}\\B/.exec(\"devil arise\\tforzzx\\nevils\");\n\n__expected = [\"orzz\"];\n__expected.index = 13;\n__expected.input = \"devil arise\\tforzzx\\nevils\";\n\n//CHECK#1\nif (__executed.length !== __expected.length) {\n\t$ERROR('#1: __executed = /\\\\B\\\\w{4}\\\\B/.exec(\"devil arise\\\\tforzzx\\\\nevils\"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length);\n}\n\n//CHECK#2\nif (__executed.index !== __expected.index) {\n\t$ERROR('#2: __executed = /\\\\B\\\\w{4}\\\\B/.exec(\"devil arise\\\\tforzzx\\\\nevils\"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index);\n}\n\n//CHECK#3\nif (__executed.input !== __expected.input) {\n\t$ERROR('#3: __executed = /\\\\B\\\\w{4}\\\\B/.exec(\"devil arise\\\\tforzzx\\\\nevils\"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input);\n}\n\n//CHECK#4\nfor(var index=0; index<__expected.length; index++) {\n\tif (__executed[index] !== __expected[index]) {\n\t\t$ERROR('#4: __executed = /\\\\B\\\\w{4}\\\\B/.exec(\"devil arise\\\\tforzzx\\\\nevils\"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]);\n\t}\n}\n\n",
+ "id": "S15.10.2.6_A4_T8"
+ },
+ {
+ "section": "15.10.2.6",
+ "description": "Execute /^^^^^^^robot$$$$/.exec(\"robot\") and check results",
+ "test": "__executed = /^^^^^^^robot$$$$/.exec(\"robot\");\n\n__expected = [\"robot\"];\n__expected.index = 0;\n__expected.input = \"robot\";\n\n//CHECK#1\nif (__executed.length !== __expected.length) {\n\t$ERROR('#1: __executed = /^^^^^^^robot$$$$/.exec(\"robot\"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length);\n}\n\n//CHECK#2\nif (__executed.index !== __expected.index) {\n\t$ERROR('#2: __executed = /^^^^^^^robot$$$$/.exec(\"robot\"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index);\n}\n\n//CHECK#3\nif (__executed.input !== __expected.input) {\n\t$ERROR('#3: __executed = /^^^^^^^robot$$$$/.exec(\"robot\"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input);\n}\n\n//CHECK#4\nfor(var index=0; index<__expected.length; index++) {\n\tif (__executed[index] !== __expected[index]) {\n\t\t$ERROR('#4: __executed = /^^^^^^^robot$$$$/.exec(\"robot\"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]);\n\t}\n}\n\n",
+ "id": "S15.10.2.6_A5_T1"
+ },
+ {
+ "section": "15.10.2.6",
+ "description": "Execute /\\B\\B\\B\\B\\B\\Bbot\\b\\b\\b\\b\\b\\b\\b/.exec(\"robot wall-e\") and check results",
+ "test": "__executed = /\\B\\B\\B\\B\\B\\Bbot\\b\\b\\b\\b\\b\\b\\b/.exec(\"robot wall-e\");\n\n__expected = [\"bot\"];\n__expected.index = 2;\n__expected.input = \"robot wall-e\";\n\n//CHECK#1\nif (__executed.length !== __expected.length) {\n\t$ERROR('#1: __executed = /\\\\B\\\\B\\\\B\\\\B\\\\B\\\\Bbot\\\\b\\\\b\\\\b\\\\b\\\\b\\\\b\\\\b/.exec(\"robot wall-e\"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length);\n}\n\n//CHECK#2\nif (__executed.index !== __expected.index) {\n\t$ERROR('#2: __executed = /\\\\B\\\\B\\\\B\\\\B\\\\B\\\\Bbot\\\\b\\\\b\\\\b\\\\b\\\\b\\\\b\\\\b/.exec(\"robot wall-e\"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index);\n}\n\n//CHECK#3\nif (__executed.input !== __expected.input) {\n\t$ERROR('#3: __executed = /\\\\B\\\\B\\\\B\\\\B\\\\B\\\\Bbot\\\\b\\\\b\\\\b\\\\b\\\\b\\\\b\\\\b/.exec(\"robot wall-e\"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input);\n}\n\n//CHECK#4\nfor(var index=0; index<__expected.length; index++) {\n\tif (__executed[index] !== __expected[index]) {\n\t\t$ERROR('#4: __executed = /\\\\B\\\\B\\\\B\\\\B\\\\B\\\\Bbot\\\\b\\\\b\\\\b\\\\b\\\\b\\\\b\\\\b/.exec(\"robot wall-e\"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]);\n\t}\n}\n\n",
+ "id": "S15.10.2.6_A5_T2"
+ },
+ {
+ "section": "15.10.2.6",
+ "description": "while asterix is non greedy it is run till the end because of dollar assertion",
+ "test": "__executed = /^.*?$/.exec(\"Hello World\");\n\n__expected = [\"Hello World\"];\n__expected.index = 0;\n__expected.input = \"Hello World\";\n\n//CHECK#1\nif (__executed.length !== __expected.length) {\n\t$ERROR('#1: __executed = /^.*?$/.exec(\"Hello World\"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length);\n}\n\n//CHECK#2\nif (__executed.index !== __expected.index) {\n\t$ERROR('#2: __executed = /^.*?$/.exec(\"Hello World\"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index);\n}\n\n//CHECK#3\nif (__executed.input !== __expected.input) {\n\t$ERROR('#3: __executed = /^.*?$/.exec(\"Hello World\"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input);\n}\n\n//CHECK#4\nfor(var index=0; index<__expected.length; index++) {\n\tif (__executed[index] !== __expected[index]) {\n\t\t$ERROR('#4: __executed = /^.*?$/.exec(\"Hello World\"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]);\n\t}\n}\n\n",
+ "id": "S15.10.2.6_A6_T1"
+ },
+ {
+ "section": "15.10.2.6",
+ "description": "Execute /^.*?/.exec(\"Hello World\") and check results",
+ "test": "__executed = /^.*?/.exec(\"Hello World\");\n\n__expected = [\"\"];\n__expected.index = 0;\n__expected.input = \"Hello World\";\n\n//CHECK#1\nif (__executed.length !== __expected.length) {\n\t$ERROR('#1: __executed = /^.*?/.exec(\"Hello World\"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length);\n}\n\n//CHECK#2\nif (__executed.index !== __expected.index) {\n\t$ERROR('#2: __executed = /^.*?/.exec(\"Hello World\"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index);\n}\n\n//CHECK#3\nif (__executed.input !== __expected.input) {\n\t$ERROR('#3: __executed = /^.*?/.exec(\"Hello World\"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input);\n}\n\n//CHECK#4\nfor(var index=0; index<__expected.length; index++) {\n\tif (__executed[index] !== __expected[index]) {\n\t\t$ERROR('#4: __executed = /^.*?/.exec(\"Hello World\"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]);\n\t}\n}\n\n",
+ "id": "S15.10.2.6_A6_T2"
+ },
+ {
+ "section": "15.10.2.6",
+ "description": "while asterix is non greedy it is run till matches end or colon",
+ "test": "__executed = /^.*?(:|$)/.exec(\"Hello: World\");\n\n__expected = [\"Hello:\", \":\"];\n__expected.index = 0;\n__expected.input = \"Hello: World\";\n\n//CHECK#1\nif (__executed.length !== __expected.length) {\n\t$ERROR('#1: __executed = /^.*?(:|$)/.exec(\"Hello: World\"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length);\n}\n\n//CHECK#2\nif (__executed.index !== __expected.index) {\n\t$ERROR('#2: __executed = /^.*?(:|$)/.exec(\"Hello: World\"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index);\n}\n\n//CHECK#3\nif (__executed.input !== __expected.input) {\n\t$ERROR('#3: __executed = /^.*?(:|$)/.exec(\"Hello: World\"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input);\n}\n\n//CHECK#4\nfor(var index=0; index<__expected.length; index++) {\n\tif (__executed[index] !== __expected[index]) {\n\t\t$ERROR('#4: __executed = /^.*?(:|$)/.exec(\"Hello: World\"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]);\n\t}\n}\n\n",
+ "id": "S15.10.2.6_A6_T3"
+ },
+ {
+ "section": "15.10.2.6",
+ "description": "Execute /^.*(:|$)/.exec(\"Hello: World\") and check results",
+ "test": "__executed = /^.*(:|$)/.exec(\"Hello: World\");\n\n__expected = [\"Hello: World\", \"\"];\n__expected.index = 0;\n__expected.input = \"Hello: World\";\n\n//CHECK#1\nif (__executed.length !== __expected.length) {\n\t$ERROR('#1: __executed = /^.*(:|$)/.exec(\"Hello: World\"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length);\n}\n\n//CHECK#2\nif (__executed.index !== __expected.index) {\n\t$ERROR('#2: __executed = /^.*(:|$)/.exec(\"Hello: World\"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index);\n}\n\n//CHECK#3\nif (__executed.input !== __expected.input) {\n\t$ERROR('#3: __executed = /^.*(:|$)/.exec(\"Hello: World\"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input);\n}\n\n//CHECK#4\nfor(var index=0; index<__expected.length; index++) {\n\tif (__executed[index] !== __expected[index]) {\n\t\t$ERROR('#4: __executed = /^.*(:|$)/.exec(\"Hello: World\"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]);\n\t}\n}\n\n",
+ "id": "S15.10.2.6_A6_T4"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.10.2.7_Quantifier.json b/website/resources/scripts/testcases2/15.10.2.7_Quantifier.json
new file mode 100644
index 000000000..19c4d057b
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.10.2.7_Quantifier.json
@@ -0,0 +1,422 @@
+{
+ "testCollection": {
+ "name": "15.10.2.7_Quantifier",
+ "numTests": 69,
+ "tests": [
+ {
+ "section": "15.10.2.7",
+ "description": "Execute /\\d{2,4}/.exec(\"the answer is 42\") and check results",
+ "test": "__executed = /\\d{2,4}/.exec(\"the answer is 42\");\n\n__expected = [\"42\"];\n__expected.index = 14;\n__expected.input = \"the answer is 42\";\n\n//CHECK#1\nif (__executed.length !== __expected.length) {\n\t$ERROR('#1: __executed = /\\\\d{2,4}/.exec(\"the answer is 42\"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length);\n}\n\n//CHECK#2\nif (__executed.index !== __expected.index) {\n\t$ERROR('#2: __executed = /\\\\d{2,4}/.exec(\"the answer is 42\"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index);\n}\n\n//CHECK#3\nif (__executed.input !== __expected.input) {\n\t$ERROR('#3: __executed = /\\\\d{2,4}/.exec(\"the answer is 42\"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input);\n}\n\n//CHECK#4\nfor(var index=0; index<__expected.length; index++) {\n\tif (__executed[index] !== __expected[index]) {\n\t\t$ERROR('#4: __executed = /\\\\d{2,4}/.exec(\"the answer is 42\"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]);\n\t}\n}\n\n",
+ "id": "S15.10.2.7_A1_T1"
+ },
+ {
+ "section": "15.10.2.7",
+ "description": "Execute /b{0,93}c/.exec(\"aaabbbbcccddeeeefffff\") and check results",
+ "test": "__executed = /b{0,93}c/.exec(\"aaabbbbcccddeeeefffff\");\n\n__expected = [\"bbbbc\"];\n__expected.index = 3;\n__expected.input = \"aaabbbbcccddeeeefffff\";\n\n//CHECK#1\nif (__executed.length !== __expected.length) {\n\t$ERROR('#1: __executed = /b{0,93}c/.exec(\"aaabbbbcccddeeeefffff\"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length);\n}\n\n//CHECK#2\nif (__executed.index !== __expected.index) {\n\t$ERROR('#2: __executed = /b{0,93}c/.exec(\"aaabbbbcccddeeeefffff\"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index);\n}\n\n//CHECK#3\nif (__executed.input !== __expected.input) {\n\t$ERROR('#3: __executed = /b{0,93}c/.exec(\"aaabbbbcccddeeeefffff\"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input);\n}\n\n//CHECK#4\nfor(var index=0; index<__expected.length; index++) {\n\tif (__executed[index] !== __expected[index]) {\n\t\t$ERROR('#4: __executed = /b{0,93}c/.exec(\"aaabbbbcccddeeeefffff\"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]);\n\t}\n}\n\n",
+ "id": "S15.10.2.7_A1_T10"
+ },
+ {
+ "section": "15.10.2.7",
+ "description": "Execute /bx{0,93}c/.exec(\"aaabbbbcccddeeeefffff\") and check results",
+ "test": "__executed = /bx{0,93}c/.exec(\"aaabbbbcccddeeeefffff\");\n\n__expected = [\"bc\"];\n__expected.index = 6;\n__expected.input = \"aaabbbbcccddeeeefffff\";\n\n//CHECK#1\nif (__executed.length !== __expected.length) {\n\t$ERROR('#1: __executed = /bx{0,93}c/.exec(\"aaabbbbcccddeeeefffff\"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length);\n}\n\n//CHECK#2\nif (__executed.index !== __expected.index) {\n\t$ERROR('#2: __executed = /bx{0,93}c/.exec(\"aaabbbbcccddeeeefffff\"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index);\n}\n\n//CHECK#3\nif (__executed.input !== __expected.input) {\n\t$ERROR('#3: __executed = /bx{0,93}c/.exec(\"aaabbbbcccddeeeefffff\"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input);\n}\n\n//CHECK#4\nfor(var index=0; index<__expected.length; index++) {\n\tif (__executed[index] !== __expected[index]) {\n\t\t$ERROR('#4: __executed = /bx{0,93}c/.exec(\"aaabbbbcccddeeeefffff\"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]);\n\t}\n}\n\n",
+ "id": "S15.10.2.7_A1_T11"
+ },
+ {
+ "section": "15.10.2.7",
+ "description": "Execute /.{0,93}/.exec(\"weirwerdf\") and check results",
+ "test": "__executed = /.{0,93}/.exec(\"weirwerdf\");\n\n__expected = [\"weirwerdf\"];\n__expected.index = 0;\n__expected.input = \"weirwerdf\";\n\n//CHECK#1\nif (__executed.length !== __expected.length) {\n\t$ERROR('#1: __executed = /.{0,93}/.exec(\"weirwerdf\"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length);\n}\n\n//CHECK#2\nif (__executed.index !== __expected.index) {\n\t$ERROR('#2: __executed = /.{0,93}/.exec(\"weirwerdf\"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index);\n}\n\n//CHECK#3\nif (__executed.input !== __expected.input) {\n\t$ERROR('#3: __executed = /.{0,93}/.exec(\"weirwerdf\"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input);\n}\n\n//CHECK#4\nfor(var index=0; index<__expected.length; index++) {\n\tif (__executed[index] !== __expected[index]) {\n\t\t$ERROR('#4: __executed = /.{0,93}/.exec(\"weirwerdf\"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]);\n\t}\n}\n\n",
+ "id": "S15.10.2.7_A1_T12"
+ },
+ {
+ "section": "15.10.2.7",
+ "description": "Execute /\\d{2,4}/.test(\"the 7 movie\") and check results",
+ "test": "__executed = /\\d{2,4}/.test(\"the 7 movie\");\n\n//CHECK#1\nif (__executed) {\n\t$ERROR('#1: /\\\\d{2,4}/.test(\"the 7 movie\") === false');\n}\n\n",
+ "id": "S15.10.2.7_A1_T2"
+ },
+ {
+ "section": "15.10.2.7",
+ "description": "Execute /\\d{2,4}/.exec(\"the 20000 Leagues Under the Sea book\") and check results",
+ "test": "__executed = /\\d{2,4}/.exec(\"the 20000 Leagues Under the Sea book\");\n\n__expected = [\"2000\"];\n__expected.index = 4;\n__expected.input = \"the 20000 Leagues Under the Sea book\";\n\n//CHECK#1\nif (__executed.length !== __expected.length) {\n\t$ERROR('#1: __executed = /\\\\d{2,4}/.exec(\"the 20000 Leagues Under the Sea book\"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length);\n}\n\n//CHECK#2\nif (__executed.index !== __expected.index) {\n\t$ERROR('#2: __executed = /\\\\d{2,4}/.exec(\"the 20000 Leagues Under the Sea book\"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index);\n}\n\n//CHECK#3\nif (__executed.input !== __expected.input) {\n\t$ERROR('#3: __executed = /\\\\d{2,4}/.exec(\"the 20000 Leagues Under the Sea book\"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input);\n}\n\n//CHECK#4\nfor(var index=0; index<__expected.length; index++) {\n\tif (__executed[index] !== __expected[index]) {\n\t\t$ERROR('#4: __executed = /\\\\d{2,4}/.exec(\"the 20000 Leagues Under the Sea book\"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]);\n\t}\n}\n\n",
+ "id": "S15.10.2.7_A1_T3"
+ },
+ {
+ "section": "15.10.2.7",
+ "description": "Execute /\\d{2,4}/.exec(\"the Fahrenheit 451 book\") and check results",
+ "test": "__executed = /\\d{2,4}/.exec(\"the Fahrenheit 451 book\");\n\n__expected = [\"451\"];\n__expected.index = 15;\n__expected.input = \"the Fahrenheit 451 book\";\n\n//CHECK#1\nif (__executed.length !== __expected.length) {\n\t$ERROR('#1: __executed = /\\\\d{2,4}/.exec(\"the Fahrenheit 451 book\"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length);\n}\n\n//CHECK#2\nif (__executed.index !== __expected.index) {\n\t$ERROR('#2: __executed = /\\\\d{2,4}/.exec(\"the Fahrenheit 451 book\"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index);\n}\n\n//CHECK#3\nif (__executed.input !== __expected.input) {\n\t$ERROR('#3: __executed = /\\\\d{2,4}/.exec(\"the Fahrenheit 451 book\"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input);\n}\n\n//CHECK#4\nfor(var index=0; index<__expected.length; index++) {\n\tif (__executed[index] !== __expected[index]) {\n\t\t$ERROR('#4: __executed = /\\\\d{2,4}/.exec(\"the Fahrenheit 451 book\"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]);\n\t}\n}\n\n",
+ "id": "S15.10.2.7_A1_T4"
+ },
+ {
+ "section": "15.10.2.7",
+ "description": "Execute /\\d{2,4}/.exec(\"the 1984 novel\") and check results",
+ "test": "__executed = /\\d{2,4}/.exec(\"the 1984 novel\");\n\n__expected = [\"1984\"];\n__expected.index = 4;\n__expected.input = \"the 1984 novel\";\n\n//CHECK#1\nif (__executed.length !== __expected.length) {\n\t$ERROR('#1: __executed = /\\\\d{2,4}/.exec(\"the 1984 novel\"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length);\n}\n\n//CHECK#2\nif (__executed.index !== __expected.index) {\n\t$ERROR('#2: __executed = /\\\\d{2,4}/.exec(\"the 1984 novel\"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index);\n}\n\n//CHECK#3\nif (__executed.input !== __expected.input) {\n\t$ERROR('#3: __executed = /\\\\d{2,4}/.exec(\"the 1984 novel\"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input);\n}\n\n//CHECK#4\nfor(var index=0; index<__expected.length; index++) {\n\tif (__executed[index] !== __expected[index]) {\n\t\t$ERROR('#4: __executed = /\\\\d{2,4}/.exec(\"the 1984 novel\"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]);\n\t}\n}\n\n",
+ "id": "S15.10.2.7_A1_T5"
+ },
+ {
+ "section": "15.10.2.7",
+ "description": "Execute /\\d{2,4}/.exec(\"0a0\\u0031\\u0031b\") and check results",
+ "test": "__executed = /\\d{2,4}/.exec(\"0a0\\u0031\\u0031b\");\n\n__expected = [\"011\"];\n__expected.index = 2;\n__expected.input = \"0a011b\";\n\n//CHECK#1\nif (__executed.length !== __expected.length) {\n\t$ERROR('#1: __executed = /\\\\d{2,4}/.exec(\"0a0\\\\u0031\\\\u0031b\"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length);\n}\n\n//CHECK#2\nif (__executed.index !== __expected.index) {\n\t$ERROR('#2: __executed = /\\\\d{2,4}/.exec(\"0a0\\\\u0031\\\\u0031b\"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index);\n}\n\n//CHECK#3\nif (__executed.input !== __expected.input) {\n\t$ERROR('#3: __executed = /\\\\d{2,4}/.exec(\"0a0\\\\u0031\\\\u0031b\"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input);\n}\n\n//CHECK#4\nfor(var index=0; index<__expected.length; index++) {\n\tif (__executed[index] !== __expected[index]) {\n\t\t$ERROR('#4: __executed = /\\\\d{2,4}/.exec(\"0a0\\\\u0031\\\\u0031b\"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]);\n\t}\n}\n\n",
+ "id": "S15.10.2.7_A1_T6"
+ },
+ {
+ "section": "15.10.2.7",
+ "description": "Execute /\\d{2,4}/.exec(\"0a0\\u0031\\u003122b\") and check results",
+ "test": "__executed = /\\d{2,4}/.exec(\"0a0\\u0031\\u003122b\");\n\n__expected = [\"0112\"];\n__expected.index = 2;\n__expected.input = \"0a01122b\";\n\n//CHECK#1\nif (__executed.length !== __expected.length) {\n\t$ERROR('#1: __executed = /\\\\d{2,4}/.exec(\"0a0\\\\u0031\\\\u003122b\"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length);\n}\n\n//CHECK#2\nif (__executed.index !== __expected.index) {\n\t$ERROR('#2: __executed = /\\\\d{2,4}/.exec(\"0a0\\\\u0031\\\\u003122b\"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index);\n}\n\n//CHECK#3\nif (__executed.input !== __expected.input) {\n\t$ERROR('#3: __executed = /\\\\d{2,4}/.exec(\"0a0\\\\u0031\\\\u003122b\"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input);\n}\n\n//CHECK#4\nfor(var index=0; index<__expected.length; index++) {\n\tif (__executed[index] !== __expected[index]) {\n\t\t$ERROR('#4: __executed = /\\\\d{2,4}/.exec(\"0a0\\\\u0031\\\\u003122b\"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]);\n\t}\n}\n\n",
+ "id": "S15.10.2.7_A1_T7"
+ },
+ {
+ "section": "15.10.2.7",
+ "description": "Execute /b{2,3}c/.exec(\"aaabbbbcccddeeeefffff\") and check results",
+ "test": "__executed = /b{2,3}c/.exec(\"aaabbbbcccddeeeefffff\");\n\n__expected = [\"bbbc\"];\n__expected.index = 4;\n__expected.input = \"aaabbbbcccddeeeefffff\";\n\n//CHECK#1\nif (__executed.length !== __expected.length) {\n\t$ERROR('#1: __executed = /b{2,3}c/.exec(\"aaabbbbcccddeeeefffff\"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length);\n}\n\n//CHECK#2\nif (__executed.index !== __expected.index) {\n\t$ERROR('#2: __executed = /b{2,3}c/.exec(\"aaabbbbcccddeeeefffff\"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index);\n}\n\n//CHECK#3\nif (__executed.input !== __expected.input) {\n\t$ERROR('#3: __executed = /b{2,3}c/.exec(\"aaabbbbcccddeeeefffff\"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input);\n}\n\n//CHECK#4\nfor(var index=0; index<__expected.length; index++) {\n\tif (__executed[index] !== __expected[index]) {\n\t\t$ERROR('#4: __executed = /b{2,3}c/.exec(\"aaabbbbcccddeeeefffff\"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]);\n\t}\n}\n\n",
+ "id": "S15.10.2.7_A1_T8"
+ },
+ {
+ "section": "15.10.2.7",
+ "description": "Execute /b{42,93}c/.exec(\"aaabbbbcccddeeeefffff\") and check results",
+ "test": "__executed = /b{42,93}c/.test(\"aaabbbbcccddeeeefffff\");\n\n//CHECK#1\nif (__executed) {\n\t$ERROR('#1: /b{42,93}c/.test(\"aaabbbbcccddeeeefffff\") === false');\n}\n\n",
+ "id": "S15.10.2.7_A1_T9"
+ },
+ {
+ "section": "15.10.2.7",
+ "description": "Execute /\\w{3}\\d?/.exec(\"CE\\uFFFFL\\uFFDDbox127\") and check results",
+ "test": "__executed = /\\w{3}\\d?/.exec(\"CE\\uFFFFL\\uFFDDbox127\");\n\n__expected = [\"box1\"];\n__expected.index = 5;\n__expected.input = \"CE\\uFFFFL\\uFFDDbox127\";\n\n//CHECK#1\nif (__executed.length !== __expected.length) {\n\t$ERROR('#1: __executed = /\\\\w{3}\\\\d?/.exec(\"CE\\\\uFFFFL\\\\uFFDDbox127\"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length);\n}\n\n//CHECK#2\nif (__executed.index !== __expected.index) {\n\t$ERROR('#2: __executed = /\\\\w{3}\\\\d?/.exec(\"CE\\\\uFFFFL\\\\uFFDDbox127\"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index);\n}\n\n//CHECK#3\nif (__executed.input !== __expected.input) {\n\t$ERROR('#3: __executed = /\\\\w{3}\\\\d?/.exec(\"CE\\\\uFFFFL\\\\uFFDDbox127\"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input);\n}\n\n//CHECK#4\nfor(var index=0; index<__expected.length; index++) {\n\tif (__executed[index] !== __expected[index]) {\n\t\t$ERROR('#4: __executed = /\\\\w{3}\\\\d?/.exec(\"CE\\\\uFFFFL\\\\uFFDDbox127\"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]);\n\t}\n}\n\n",
+ "id": "S15.10.2.7_A2_T1"
+ },
+ {
+ "section": "15.10.2.7",
+ "description": "Execute /\\w{3}\\d?/.exec(\"CELL\\uFFDDbox127\") and check results",
+ "test": "__executed = /\\w{3}\\d?/.exec(\"CELL\\uFFDDbox127\");\n\n__expected = [\"CEL\"];\n__expected.index = 0;\n__expected.input = \"CELL\\uFFDDbox127\";\n\n//CHECK#1\nif (__executed.length !== __expected.length) {\n\t$ERROR('#1: __executed = /\\\\w{3}\\\\d?/.exec(\"CELL\\\\uFFDDbox127\"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length);\n}\n\n//CHECK#2\nif (__executed.index !== __expected.index) {\n\t$ERROR('#2: __executed = /\\\\w{3}\\\\d?/.exec(\"CELL\\\\uFFDDbox127\"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index);\n}\n\n//CHECK#3\nif (__executed.input !== __expected.input) {\n\t$ERROR('#3: __executed = /\\\\w{3}\\\\d?/.exec(\"CELL\\\\uFFDDbox127\"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input);\n}\n\n//CHECK#4\nfor(var index=0; index<__expected.length; index++) {\n\tif (__executed[index] !== __expected[index]) {\n\t\t$ERROR('#4: __executed = /\\\\w{3}\\\\d?/.exec(\"CELL\\\\uFFDDbox127\"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]);\n\t}\n}\n\n",
+ "id": "S15.10.2.7_A2_T2"
+ },
+ {
+ "section": "15.10.2.7",
+ "description": "Execute /b{2}c/.exec(\"aaabbbbcccddeeeefffff\") and check results",
+ "test": "__executed = /b{2}c/.exec(\"aaabbbbcccddeeeefffff\");\n\n__expected = [\"bbc\"];\n__expected.index = 5;\n__expected.input = \"aaabbbbcccddeeeefffff\";\n\n//CHECK#1\nif (__executed.length !== __expected.length) {\n\t$ERROR('#1: __executed = /b{2}c/.exec(\"aaabbbbcccddeeeefffff\"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length);\n}\n\n//CHECK#2\nif (__executed.index !== __expected.index) {\n\t$ERROR('#2: __executed = /b{2}c/.exec(\"aaabbbbcccddeeeefffff\"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index);\n}\n\n//CHECK#3\nif (__executed.input !== __expected.input) {\n\t$ERROR('#3: __executed = /b{2}c/.exec(\"aaabbbbcccddeeeefffff\"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input);\n}\n\n//CHECK#4\nfor(var index=0; index<__expected.length; index++) {\n\tif (__executed[index] !== __expected[index]) {\n\t\t$ERROR('#4: __executed = /b{2}c/.exec(\"aaabbbbcccddeeeefffff\"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]);\n\t}\n}\n\n",
+ "id": "S15.10.2.7_A2_T3"
+ },
+ {
+ "section": "15.10.2.7",
+ "description": "Execute /b{8}c/.test(\"aaabbbbcccddeeeefffff\") and check results",
+ "test": "__executed = /b{8}/.test(\"aaabbbbcccddeeeefffff\");\n\n//CHECK#1\nif (__executed) {\n\t$ERROR('#1: /b{8}/.test(\"aaabbbbcccddeeeefffff\") === false');\n}\n\n",
+ "id": "S15.10.2.7_A2_T4"
+ },
+ {
+ "section": "15.10.2.7",
+ "description": "Execute /\\s+java\\s+/.exec(\"language java\\n\") and check results",
+ "test": "__executed = /\\s+java\\s+/.exec(\"language java\\n\");\n\n__expected = [\" java\\n\"];\n__expected.index = 8;\n__expected.input = \"language java\\n\";\n\n//CHECK#1\nif (__executed.length !== __expected.length) {\n\t$ERROR('#1: __executed = /\\\\s+java\\\\s+/.exec(\"language java\\\\n\"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length);\n}\n\n//CHECK#2\nif (__executed.index !== __expected.index) {\n\t$ERROR('#2: __executed = /\\\\s+java\\\\s+/.exec(\"language java\\\\n\"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index);\n}\n\n//CHECK#3\nif (__executed.input !== __expected.input) {\n\t$ERROR('#3: __executed = /\\\\s+java\\\\s+/.exec(\"language java\\\\n\"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input);\n}\n\n//CHECK#4\nfor(var index=0; index<__expected.length; index++) {\n\tif (__executed[index] !== __expected[index]) {\n\t\t$ERROR('#4: __executed = /\\\\s+java\\\\s+/.exec(\"language java\\\\n\"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]);\n\t}\n}\n\n",
+ "id": "S15.10.2.7_A3_T1"
+ },
+ {
+ "section": "15.10.2.7",
+ "description": "Execute /o+/.test(\"abcdefg\") and check results",
+ "test": "__executed = /o+/.test(\"abcdefg\");\n\n//CHECK#1\nif (__executed) {\n\t$ERROR('#1: /o+/.test(\"abcdefg\") === false');\n}\n\n",
+ "id": "S15.10.2.7_A3_T10"
+ },
+ {
+ "section": "15.10.2.7",
+ "description": "Execute /d+/.exec(\"abcdefg\") and check results",
+ "test": "__executed = /d+/.exec(\"abcdefg\");\n\n__expected = [\"d\"];\n__expected.index = 3;\n__expected.input = \"abcdefg\";\n\n//CHECK#1\nif (__executed.length !== __expected.length) {\n\t$ERROR('#1: __executed = /d+/.exec(\"abcdefg\"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length);\n}\n\n//CHECK#2\nif (__executed.index !== __expected.index) {\n\t$ERROR('#2: __executed = /d+/.exec(\"abcdefg\"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index);\n}\n\n//CHECK#3\nif (__executed.input !== __expected.input) {\n\t$ERROR('#3: __executed = /d+/.exec(\"abcdefg\"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input);\n}\n\n//CHECK#4\nfor(var index=0; index<__expected.length; index++) {\n\tif (__executed[index] !== __expected[index]) {\n\t\t$ERROR('#4: __executed = /d+/.exec(\"abcdefg\"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]);\n\t}\n}\n\n",
+ "id": "S15.10.2.7_A3_T11"
+ },
+ {
+ "section": "15.10.2.7",
+ "description": "Execute /(b+)(b+)(b+)/.exec(\"abbbbbbbc\") and check results",
+ "test": "__executed = /(b+)(b+)(b+)/.exec(\"abbbbbbbc\");\n\n__expected = [\"bbbbbbb\",\"bbbbb\",\"b\",\"b\"];\n__expected.index = 1;\n__expected.input = \"abbbbbbbc\";\n\n//CHECK#1\nif (__executed.length !== __expected.length) {\n\t$ERROR('#1: __executed = /(b+)(b+)(b+)/.exec(\"abbbbbbbc\"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length);\n}\n\n//CHECK#2\nif (__executed.index !== __expected.index) {\n\t$ERROR('#2: __executed = /(b+)(b+)(b+)/.exec(\"abbbbbbbc\"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index);\n}\n\n//CHECK#3\nif (__executed.input !== __expected.input) {\n\t$ERROR('#3: __executed = /(b+)(b+)(b+)/.exec(\"abbbbbbbc\"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input);\n}\n\n//CHECK#4\nfor(var index=0; index<__expected.length; index++) {\n\tif (__executed[index] !== __expected[index]) {\n\t\t$ERROR('#4: __executed = /(b+)(b+)(b+)/.exec(\"abbbbbbbc\"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]);\n\t}\n}\n\n",
+ "id": "S15.10.2.7_A3_T12"
+ },
+ {
+ "section": "15.10.2.7",
+ "description": "Execute /(b+)(b*)/.exec(\"abbbbbbbc\") and check results",
+ "test": "__executed = /(b+)(b*)/.exec(\"abbbbbbbc\");\n\n__expected = [\"bbbbbbb\",\"bbbbbbb\",\"\"];\n__expected.index = 1;\n__expected.input = \"abbbbbbbc\";\n\n//CHECK#1\nif (__executed.length !== __expected.length) {\n\t$ERROR('#1: __executed = /(b+)(b*)/.exec(\"abbbbbbbc\"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length);\n}\n\n//CHECK#2\nif (__executed.index !== __expected.index) {\n\t$ERROR('#2: __executed = /(b+)(b*)/.exec(\"abbbbbbbc\"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index);\n}\n\n//CHECK#3\nif (__executed.input !== __expected.input) {\n\t$ERROR('#3: __executed = /(b+)(b*)/.exec(\"abbbbbbbc\"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input);\n}\n\n//CHECK#4\nfor(var index=0; index<__expected.length; index++) {\n\tif (__executed[index] !== __expected[index]) {\n\t\t$ERROR('#4: __executed = /(b+)(b*)/.exec(\"abbbbbbbc\"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]);\n\t}\n}\n\n",
+ "id": "S15.10.2.7_A3_T13"
+ },
+ {
+ "section": "15.10.2.7",
+ "description": "Execute /b*b+/.exec(\"abbbbbbbc\") and check results",
+ "test": "__executed = /b*b+/.exec(\"abbbbbbbc\");\n\n__expected = [\"bbbbbbb\"];\n__expected.index = 1;\n__expected.input = \"abbbbbbbc\";\n\n//CHECK#1\nif (__executed.length !== __expected.length) {\n\t$ERROR('#1: __executed = /b*b+/.exec(\"abbbbbbbc\"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length);\n}\n\n//CHECK#2\nif (__executed.index !== __expected.index) {\n\t$ERROR('#2: __executed = /b*b+/.exec(\"abbbbbbbc\"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index);\n}\n\n//CHECK#3\nif (__executed.input !== __expected.input) {\n\t$ERROR('#3: __executed = /b*b+/.exec(\"abbbbbbbc\"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input);\n}\n\n//CHECK#4\nfor(var index=0; index<__expected.length; index++) {\n\tif (__executed[index] !== __expected[index]) {\n\t\t$ERROR('#4: __executed = /b*b+/.exec(\"abbbbbbbc\"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]);\n\t}\n}\n\n",
+ "id": "S15.10.2.7_A3_T14"
+ },
+ {
+ "section": "15.10.2.7",
+ "description": "Execute /\\s+java\\s+/.exec(\"\\t java object\") and check results",
+ "test": "__executed = /\\s+java\\s+/.exec(\"\\t java object\");\n\n__expected = [\"\\t java \"];\n__expected.index = 0;\n__expected.input = \"\\t java object\";\n\n//CHECK#1\nif (__executed.length !== __expected.length) {\n\t$ERROR('#1: __executed = /\\\\s+java\\\\s+/.exec(\"\\\\t java object\"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length);\n}\n\n//CHECK#2\nif (__executed.index !== __expected.index) {\n\t$ERROR('#2: __executed = /\\\\s+java\\\\s+/.exec(\"\\\\t java object\"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index);\n}\n\n//CHECK#3\nif (__executed.input !== __expected.input) {\n\t$ERROR('#3: __executed = /\\\\s+java\\\\s+/.exec(\"\\\\t java object\"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input);\n}\n\n//CHECK#4\nfor(var index=0; index<__expected.length; index++) {\n\tif (__executed[index] !== __expected[index]) {\n\t\t$ERROR('#4: __executed = /\\\\s+java\\\\s+/.exec(\"\\\\t java object\"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]);\n\t}\n}\n\n",
+ "id": "S15.10.2.7_A3_T2"
+ },
+ {
+ "section": "15.10.2.7",
+ "description": "Execute /\\s+java\\s+/.test(\"\\t javax package\") and check results",
+ "test": "__executed = /\\s+java\\s+/.test(\"\\t javax package\");\n\n//CHECK#1\nif (__executed) {\n\t$ERROR('#1: /\\\\s+java\\\\s+/.test(\"\\\\t javax package\") === false');\n}\n\n",
+ "id": "S15.10.2.7_A3_T3"
+ },
+ {
+ "section": "15.10.2.7",
+ "description": "Execute /\\s+java\\s+/.test(\"java\\n\\nobject\") and check results",
+ "test": "__executed = /\\s+java\\s+/.test(\"java\\n\\nobject\");\n\n//CHECK#1\nif (__executed) {\n\t$ERROR('#1: /\\\\s+java\\\\s+/.test(\"java\\\\n\\\\nobject\") === false');\n}\n\n",
+ "id": "S15.10.2.7_A3_T4"
+ },
+ {
+ "section": "15.10.2.7",
+ "description": "Execute /[a-z]+\\d+/.exec(\"x 2 ff 55 x2 as1 z12 abc12.0\") and check results",
+ "test": "__executed = /[a-z]+\\d+/.exec(\"x 2 ff 55 x2 as1 z12 abc12.0\");\n\n__expected = [\"x2\"];\n__expected.index = 10;\n__expected.input = \"x 2 ff 55 x2 as1 z12 abc12.0\";\n\n//CHECK#1\nif (__executed.length !== __expected.length) {\n\t$ERROR('#1: __executed = /[a-z]+\\\\d+/.exec(\"x 2 ff 55 x2 as1 z12 abc12.0\"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length);\n}\n\n//CHECK#2\nif (__executed.index !== __expected.index) {\n\t$ERROR('#2: __executed = /[a-z]+\\\\d+/.exec(\"x 2 ff 55 x2 as1 z12 abc12.0\"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index);\n}\n\n//CHECK#3\nif (__executed.input !== __expected.input) {\n\t$ERROR('#3: __executed = /[a-z]+\\\\d+/.exec(\"x 2 ff 55 x2 as1 z12 abc12.0\"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input);\n}\n\n//CHECK#4\nfor(var index=0; index<__expected.length; index++) {\n\tif (__executed[index] !== __expected[index]) {\n\t\t$ERROR('#4: __executed = /[a-z]+\\\\d+/.exec(\"x 2 ff 55 x2 as1 z12 abc12.0\"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]);\n\t}\n}\n\n",
+ "id": "S15.10.2.7_A3_T5"
+ },
+ {
+ "section": "15.10.2.7",
+ "description": "Execute /[a-z]+\\d+/.exec(\"__abc123.0\") and check results",
+ "test": "__executed = /[a-z]+\\d+/.exec(\"__abc123.0\");\n\n__expected = [\"abc123\"];\n__expected.index = 2;\n__expected.input = \"__abc123.0\";\n\n//CHECK#1\nif (__executed.length !== __expected.length) {\n\t$ERROR('#1: __executed = /[a-z]+\\\\d+/.exec(\"__abc123.0\"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length);\n}\n\n//CHECK#2\nif (__executed.index !== __expected.index) {\n\t$ERROR('#2: __executed = /[a-z]+\\\\d+/.exec(\"__abc123.0\"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index);\n}\n\n//CHECK#3\nif (__executed.input !== __expected.input) {\n\t$ERROR('#3: __executed = /[a-z]+\\\\d+/.exec(\"__abc123.0\"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input);\n}\n\n//CHECK#4\nfor(var index=0; index<__expected.length; index++) {\n\tif (__executed[index] !== __expected[index]) {\n\t\t$ERROR('#4: __executed = /[a-z]+\\\\d+/.exec(\"__abc123.0\"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]);\n\t}\n}\n\n",
+ "id": "S15.10.2.7_A3_T6"
+ },
+ {
+ "section": "15.10.2.7",
+ "description": "Execute /[a-z]+(\\d+)/.exec(\"x 2 ff 55 x2 as1 z12 abc12.0\") and check results",
+ "test": "__executed = /[a-z]+(\\d+)/.exec(\"x 2 ff 55 x2 as1 z12 abc12.0\");\n\n__expected = [\"x2\",\"2\"];\n__expected.index = 10;\n__expected.input = \"x 2 ff 55 x2 as1 z12 abc12.0\";\n\n//CHECK#1\nif (__executed.length !== __expected.length) {\n\t$ERROR('#1: __executed = /[a-z]+(\\\\d+)/.exec(\"x 2 ff 55 x2 as1 z12 abc12.0\"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length);\n}\n\n//CHECK#2\nif (__executed.index !== __expected.index) {\n\t$ERROR('#2: __executed = /[a-z]+(\\\\d+)/.exec(\"x 2 ff 55 x2 as1 z12 abc12.0\"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index);\n}\n\n//CHECK#3\nif (__executed.input !== __expected.input) {\n\t$ERROR('#3: __executed = /[a-z]+(\\\\d+)/.exec(\"x 2 ff 55 x2 as1 z12 abc12.0\"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input);\n}\n\n//CHECK#4\nfor(var index=0; index<__expected.length; index++) {\n\tif (__executed[index] !== __expected[index]) {\n\t\t$ERROR('#4: __executed = /[a-z]+(\\\\d+)/.exec(\"x 2 ff 55 x2 as1 z12 abc12.0\"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]);\n\t}\n}\n\n",
+ "id": "S15.10.2.7_A3_T7"
+ },
+ {
+ "section": "15.10.2.7",
+ "description": "Execute /[a-z]+(\\d+)/.exec(\"__abc123.0\") and check results",
+ "test": "__executed = /[a-z]+(\\d+)/.exec(\"__abc123.0\");\n\n__expected = [\"abc123\",\"123\"];\n__expected.index = 2;\n__expected.input = \"__abc123.0\";\n\n//CHECK#1\nif (__executed.length !== __expected.length) {\n\t$ERROR('#1: __executed = /[a-z]+(\\\\d+)/.exec(\"__abc123.0\"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length);\n}\n\n//CHECK#2\nif (__executed.index !== __expected.index) {\n\t$ERROR('#2: __executed = /[a-z]+(\\\\d+)/.exec(\"__abc123.0\"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index);\n}\n\n//CHECK#3\nif (__executed.input !== __expected.input) {\n\t$ERROR('#3: __executed = /[a-z]+(\\\\d+)/.exec(\"__abc123.0\"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input);\n}\n\n//CHECK#4\nfor(var index=0; index<__expected.length; index++) {\n\tif (__executed[index] !== __expected[index]) {\n\t\t$ERROR('#4: __executed = /[a-z]+(\\\\d+)/.exec(\"__abc123.0\"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]);\n\t}\n}\n\n",
+ "id": "S15.10.2.7_A3_T8"
+ },
+ {
+ "section": "15.10.2.7",
+ "description": "Execute /d+/.exec(\"abcdddddefg\") and check results",
+ "test": "__executed = /d+/.exec(\"abcdddddefg\");\n\n__expected = [\"ddddd\"];\n__expected.index = 3;\n__expected.input = \"abcdddddefg\";\n\n//CHECK#1\nif (__executed.length !== __expected.length) {\n\t$ERROR('#1: __executed = /d+/.exec(\"abcdddddefg\"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length);\n}\n\n//CHECK#2\nif (__executed.index !== __expected.index) {\n\t$ERROR('#2: __executed = /d+/.exec(\"abcdddddefg\"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index);\n}\n\n//CHECK#3\nif (__executed.input !== __expected.input) {\n\t$ERROR('#3: __executed = /d+/.exec(\"abcdddddefg\"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input);\n}\n\n//CHECK#4\nfor(var index=0; index<__expected.length; index++) {\n\tif (__executed[index] !== __expected[index]) {\n\t\t$ERROR('#4: __executed = /d+/.exec(\"abcdddddefg\"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]);\n\t}\n}\n\n",
+ "id": "S15.10.2.7_A3_T9"
+ },
+ {
+ "section": "15.10.2.7",
+ "description": "Execute /[^\"]* /.exec('\"beast\"-nickname') and check results",
+ "test": "__executed = /[^\"]*/.exec('\"beast\"-nickname');\n\n__expected = [\"\"];\n__expected.index = 0;\n__expected.input = '\"beast\"-nickname';\n\n//CHECK#1\nif (__executed.length !== __expected.length) {\n\t$ERROR('#1: __executed = /[^\"]*/.exec(\\'\"beast\"-nickname\\'); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length);\n}\n\n//CHECK#2\nif (__executed.index !== __expected.index) {\n\t$ERROR('#2: __executed = /[^\"]*/.exec(\\'\"beast\"-nickname\\'); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index);\n}\n\n//CHECK#3\nif (__executed.input !== __expected.input) {\n\t$ERROR('#3: __executed = /[^\"]*/.exec(\\'\"beast\"-nickname\\'); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input);\n}\n\n//CHECK#4\nfor(var index=0; index<__expected.length; index++) {\n\tif (__executed[index] !== __expected[index]) {\n\t\t$ERROR('#4: __executed = /[^\"]*/.exec(\\'\"beast\"-nickname\\'); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]);\n\t}\n}\n\n",
+ "id": "S15.10.2.7_A4_T1"
+ },
+ {
+ "section": "15.10.2.7",
+ "description": "Execute /d* /.exec('abcddddefg') and check results",
+ "test": "__executed = /d*/.exec('abcddddefg');\n\n__expected = [\"\"];\n__expected.index = 0;\n__expected.input = 'abcddddefg';\n\n//CHECK#1\nif (__executed.length !== __expected.length) {\n\t$ERROR('#1: __executed = /d*/.exec(\\'abcddddefg\\'); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length);\n}\n\n//CHECK#2\nif (__executed.index !== __expected.index) {\n\t$ERROR('#2: __executed = /d*/.exec(\\'abcddddefg\\'); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index);\n}\n\n//CHECK#3\nif (__executed.input !== __expected.input) {\n\t$ERROR('#3: __executed = /d*/.exec(\\'abcddddefg\\'); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input);\n}\n\n//CHECK#4\nfor(var index=0; index<__expected.length; index++) {\n\tif (__executed[index] !== __expected[index]) {\n\t\t$ERROR('#4: __executed = /d*/.exec(\\'abcddddefg\\'); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]);\n\t}\n}\n\n",
+ "id": "S15.10.2.7_A4_T10"
+ },
+ {
+ "section": "15.10.2.7",
+ "description": "Execute /cd* /.exec('abcddddefg') and check results",
+ "test": "__executed = /cd*/.exec('abcddddefg');\n\n__expected = [\"cdddd\"];\n__expected.index = 2;\n__expected.input = 'abcddddefg';\n\n//CHECK#1\nif (__executed.length !== __expected.length) {\n\t$ERROR('#1: __executed = /cd*/.exec(\\'abcddddefg\\'); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length);\n}\n\n//CHECK#2\nif (__executed.index !== __expected.index) {\n\t$ERROR('#2: __executed = /cd*/.exec(\\'abcddddefg\\'); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index);\n}\n\n//CHECK#3\nif (__executed.input !== __expected.input) {\n\t$ERROR('#3: __executed = /cd*/.exec(\\'abcddddefg\\'); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input);\n}\n\n//CHECK#4\nfor(var index=0; index<__expected.length; index++) {\n\tif (__executed[index] !== __expected[index]) {\n\t\t$ERROR('#4: __executed = /cd*/.exec(\\'abcddddefg\\'); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]);\n\t}\n}\n\n",
+ "id": "S15.10.2.7_A4_T11"
+ },
+ {
+ "section": "15.10.2.7",
+ "description": "Execute /cx*d/.exec('abcdefg') and check results",
+ "test": "__executed = /cx*d/.exec('abcdefg');\n\n__expected = [\"cd\"];\n__expected.index = 2;\n__expected.input = 'abcdefg';\n\n//CHECK#1\nif (__executed.length !== __expected.length) {\n\t$ERROR('#1: __executed = /cx*d/.exec(\\'abcdefg\\'); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length);\n}\n\n//CHECK#2\nif (__executed.index !== __expected.index) {\n\t$ERROR('#2: __executed = /cx*d/.exec(\\'abcdefg\\'); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index);\n}\n\n//CHECK#3\nif (__executed.input !== __expected.input) {\n\t$ERROR('#3: __executed = /cx*d/.exec(\\'abcdefg\\'); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input);\n}\n\n//CHECK#4\nfor(var index=0; index<__expected.length; index++) {\n\tif (__executed[index] !== __expected[index]) {\n\t\t$ERROR('#4: __executed = /cx*d/.exec(\\'abcdefg\\'); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]);\n\t}\n}\n\n",
+ "id": "S15.10.2.7_A4_T12"
+ },
+ {
+ "section": "15.10.2.7",
+ "description": "Execute /(x*)(x+)/.exec('xxxxxxx') and check results",
+ "test": "__executed = /(x*)(x+)/.exec('xxxxxxx');\n\n__expected = [\"xxxxxxx\",\"xxxxxx\",\"x\"];\n__expected.index = 0;\n__expected.input = 'xxxxxxx';\n\n//CHECK#1\nif (__executed.length !== __expected.length) {\n\t$ERROR('#1: __executed = /(x*)(x+)/.exec(\\'xxxxxxx\\'); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length);\n}\n\n//CHECK#2\nif (__executed.index !== __expected.index) {\n\t$ERROR('#2: __executed = /(x*)(x+)/.exec(\\'xxxxxxx\\'); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index);\n}\n\n//CHECK#3\nif (__executed.input !== __expected.input) {\n\t$ERROR('#3: __executed = /(x*)(x+)/.exec(\\'xxxxxxx\\'); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input);\n}\n\n//CHECK#4\nfor(var index=0; index<__expected.length; index++) {\n\tif (__executed[index] !== __expected[index]) {\n\t\t$ERROR('#4: __executed = /(x*)(x+)/.exec(\\'xxxxxxx\\'); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]);\n\t}\n}\n\n",
+ "id": "S15.10.2.7_A4_T13"
+ },
+ {
+ "section": "15.10.2.7",
+ "description": "Execute /(\\d*)(\\d+)/.exec('1234567890') and check results",
+ "test": "__executed = /(\\d*)(\\d+)/.exec('1234567890');\n\n__expected = [\"1234567890\",\"123456789\",\"0\"];\n__expected.index = 0;\n__expected.input = '1234567890';\n\n//CHECK#1\nif (__executed.length !== __expected.length) {\n\t$ERROR('#1: __executed = /(\\\\d*)(\\\\d+)/.exec(\\'1234567890\\'); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length);\n}\n\n//CHECK#2\nif (__executed.index !== __expected.index) {\n\t$ERROR('#2: __executed = /(\\\\d*)(\\\\d+)/.exec(\\'1234567890\\'); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index);\n}\n\n//CHECK#3\nif (__executed.input !== __expected.input) {\n\t$ERROR('#3: __executed = /(\\\\d*)(\\\\d+)/.exec(\\'1234567890\\'); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input);\n}\n\n//CHECK#4\nfor(var index=0; index<__expected.length; index++) {\n\tif (__executed[index] !== __expected[index]) {\n\t\t$ERROR('#4: __executed = /(\\\\d*)(\\\\d+)/.exec(\\'1234567890\\'); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]);\n\t}\n}\n\n",
+ "id": "S15.10.2.7_A4_T14"
+ },
+ {
+ "section": "15.10.2.7",
+ "description": "Execute /(\\d*)\\d(\\d+)/.exec('1234567890') and check results",
+ "test": "__executed = /(\\d*)\\d(\\d+)/.exec('1234567890');\n\n__expected = [\"1234567890\",\"12345678\",\"0\"];\n__expected.index = 0;\n__expected.input = '1234567890';\n\n//CHECK#1\nif (__executed.length !== __expected.length) {\n\t$ERROR('#1: __executed = /(\\\\d*)\\\\d(\\\\d+)/.exec(\\'1234567890\\'); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length);\n}\n\n//CHECK#2\nif (__executed.index !== __expected.index) {\n\t$ERROR('#2: __executed = /(\\\\d*)\\\\d(\\\\d+)/.exec(\\'1234567890\\'); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index);\n}\n\n//CHECK#3\nif (__executed.input !== __expected.input) {\n\t$ERROR('#3: __executed = /(\\\\d*)\\\\d(\\\\d+)/.exec(\\'1234567890\\'); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input);\n}\n\n//CHECK#4\nfor(var index=0; index<__expected.length; index++) {\n\tif (__executed[index] !== __expected[index]) {\n\t\t$ERROR('#4: __executed = /(\\\\d*)\\\\d(\\\\d+)/.exec(\\'1234567890\\'); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]);\n\t}\n}\n\n",
+ "id": "S15.10.2.7_A4_T15"
+ },
+ {
+ "section": "15.10.2.7",
+ "description": "Execute /(x+)(x*)/.exec('xxxxxxx') and check results",
+ "test": "__executed = /(x+)(x*)/.exec('xxxxxxx');\n\n__expected = [\"xxxxxxx\",\"xxxxxxx\",\"\"];\n__expected.index = 0;\n__expected.input = 'xxxxxxx';\n\n//CHECK#1\nif (__executed.length !== __expected.length) {\n\t$ERROR('#1: __executed = /(x+)(x*)/.exec(\\'xxxxxxx\\'); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length);\n}\n\n//CHECK#2\nif (__executed.index !== __expected.index) {\n\t$ERROR('#2: __executed = /(x+)(x*)/.exec(\\'xxxxxxx\\'); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index);\n}\n\n//CHECK#3\nif (__executed.input !== __expected.input) {\n\t$ERROR('#3: __executed = /(x+)(x*)/.exec(\\'xxxxxxx\\'); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input);\n}\n\n//CHECK#4\nfor(var index=0; index<__expected.length; index++) {\n\tif (__executed[index] !== __expected[index]) {\n\t\t$ERROR('#4: __executed = /(x+)(x*)/.exec(\\'xxxxxxx\\'); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]);\n\t}\n}\n\n",
+ "id": "S15.10.2.7_A4_T16"
+ },
+ {
+ "section": "15.10.2.7",
+ "description": "Execute /x*y+$/.exec('xxxxxxyyyyyy') and check results",
+ "test": "__executed = /x*y+$/.exec('xxxxxxyyyyyy');\n\n__expected = [\"xxxxxxyyyyyy\"];\n__expected.index = 0;\n__expected.input = 'xxxxxxyyyyyy';\n\n//CHECK#1\nif (__executed.length !== __expected.length) {\n\t$ERROR('#1: __executed = /x*y+$/.exec(\\'xxxxxxyyyyyy\\'); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length);\n}\n\n//CHECK#2\nif (__executed.index !== __expected.index) {\n\t$ERROR('#2: __executed = /x*y+$/.exec(\\'xxxxxxyyyyyy\\'); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index);\n}\n\n//CHECK#3\nif (__executed.input !== __expected.input) {\n\t$ERROR('#3: __executed = /x*y+$/.exec(\\'xxxxxxyyyyyy\\'); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input);\n}\n\n//CHECK#4\nfor(var index=0; index<__expected.length; index++) {\n\tif (__executed[index] !== __expected[index]) {\n\t\t$ERROR('#4: __executed = /x*y+$/.exec(\\'xxxxxxyyyyyy\\'); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]);\n\t}\n}\n\n",
+ "id": "S15.10.2.7_A4_T17"
+ },
+ {
+ "section": "15.10.2.7",
+ "description": "Execute /[\\d]*[\\s]*bc./.exec('abcdef') and check results",
+ "test": "__executed = /[\\d]*[\\s]*bc./.exec('abcdef');\n\n__expected = [\"bcd\"];\n__expected.index = 1;\n__expected.input = 'abcdef';\n\n//CHECK#1\nif (__executed.length !== __expected.length) {\n\t$ERROR('#1: __executed = /[\\\\d]*[\\\\s]*bc./.exec(\\'abcdef\\'); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length);\n}\n\n//CHECK#2\nif (__executed.index !== __expected.index) {\n\t$ERROR('#2: __executed = /[\\\\d]*[\\\\s]*bc./.exec(\\'abcdef\\'); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index);\n}\n\n//CHECK#3\nif (__executed.input !== __expected.input) {\n\t$ERROR('#3: __executed = /[\\\\d]*[\\\\s]*bc./.exec(\\'abcdef\\'); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input);\n}\n\n//CHECK#4\nfor(var index=0; index<__expected.length; index++) {\n\tif (__executed[index] !== __expected[index]) {\n\t\t$ERROR('#4: __executed = /[\\\\d]*[\\\\s]*bc./.exec(\\'abcdef\\'); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]);\n\t}\n}\n\n",
+ "id": "S15.10.2.7_A4_T18"
+ },
+ {
+ "section": "15.10.2.7",
+ "description": "Execute /bc..[\\d]*[\\s]* /.exec('abcdef') and check results",
+ "test": "__executed = /bc..[\\d]*[\\s]*/.exec('abcdef');\n\n__expected = [\"bcde\"];\n__expected.index = 1;\n__expected.input = 'abcdef';\n\n//CHECK#1\nif (__executed.length !== __expected.length) {\n\t$ERROR('#1: __executed = /bc..[\\\\d]*[\\\\s]*/.exec(\\'abcdef\\'); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length);\n}\n\n//CHECK#2\nif (__executed.index !== __expected.index) {\n\t$ERROR('#2: __executed = /bc..[\\\\d]*[\\\\s]*/.exec(\\'abcdef\\'); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index);\n}\n\n//CHECK#3\nif (__executed.input !== __expected.input) {\n\t$ERROR('#3: __executed = /bc..[\\\\d]*[\\\\s]*/.exec(\\'abcdef\\'); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input);\n}\n\n//CHECK#4\nfor(var index=0; index<__expected.length; index++) {\n\tif (__executed[index] !== __expected[index]) {\n\t\t$ERROR('#4: __executed = /bc..[\\\\d]*[\\\\s]*/.exec(\\'abcdef\\'); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]);\n\t}\n}\n\n",
+ "id": "S15.10.2.7_A4_T19"
+ },
+ {
+ "section": "15.10.2.7",
+ "description": "Execute /[^\"]* /.exec('alice said: \"don\\'t\"') and check results",
+ "test": "__executed = /[^\"]*/.exec('alice said: \"don\\'t\"');\n\n__expected = [\"alice said: \"];\n__expected.index = 0;\n__expected.input = 'alice said: \"don\\'t\"';\n\n//CHECK#1\nif (__executed.length !== __expected.length) {\n\t$ERROR('#1: __executed = /[^\"]*/.exec(\\'alice said: \"don\\'t\"\\'); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length);\n}\n\n//CHECK#2\nif (__executed.index !== __expected.index) {\n\t$ERROR('#2: __executed = /[^\"]*/.exec(\\'alice said: \"don\\'t\"\\'); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index);\n}\n\n//CHECK#3\nif (__executed.input !== __expected.input) {\n\t$ERROR('#3: __executed = /[^\"]*/.exec(\\'alice said: \"don\\'t\"\\'); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input);\n}\n\n//CHECK#4\nfor(var index=0; index<__expected.length; index++) {\n\tif (__executed[index] !== __expected[index]) {\n\t\t$ERROR('#4: __executed = /[^\"]*/.exec(\\'alice said: \"don\\'t\"\\'); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]);\n\t}\n}\n\n",
+ "id": "S15.10.2.7_A4_T2"
+ },
+ {
+ "section": "15.10.2.7",
+ "description": "Execute /.* /.exec('a1b2c3') and check results",
+ "test": "__executed = /.*/.exec('a1b2c3');\n\n__expected = [\"a1b2c3\"];\n__expected.index = 0;\n__expected.input = 'a1b2c3';\n\n//CHECK#1\nif (__executed.length !== __expected.length) {\n\t$ERROR('#1: __executed = /.*/.exec(\\'a1b2c3\\'); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length);\n}\n\n//CHECK#2\nif (__executed.index !== __expected.index) {\n\t$ERROR('#2: __executed = /.*/.exec(\\'a1b2c3\\'); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index);\n}\n\n//CHECK#3\nif (__executed.input !== __expected.input) {\n\t$ERROR('#3: __executed = /.*/.exec(\\'a1b2c3\\'); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input);\n}\n\n//CHECK#4\nfor(var index=0; index<__expected.length; index++) {\n\tif (__executed[index] !== __expected[index]) {\n\t\t$ERROR('#4: __executed = /.*/.exec(\\'a1b2c3\\'); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]);\n\t}\n}\n\n",
+ "id": "S15.10.2.7_A4_T20"
+ },
+ {
+ "section": "15.10.2.7",
+ "description": "Execute /[xyz]*1/.test('a0.b2.c3') and check results",
+ "test": "__executed = /[xyz]*1/.test('a0.b2.c3');\n\n//CHECK#1\nif (__executed) {\n\t$ERROR('#1: /[xyz]*1/.test(\\'a0.b2.c3\\') === false');\n}\n\n",
+ "id": "S15.10.2.7_A4_T21"
+ },
+ {
+ "section": "15.10.2.7",
+ "description": "Execute /[^\"]* /.exec(\"before\\'i\\'start\") and check results",
+ "test": "__executed = /[^\"]*/.exec(\"before\\'i\\'start\");\n\n__expected = [\"before\\'i\\'start\"];\n__expected.index = 0;\n__expected.input = \"before\\'i\\'start\";\n\n//CHECK#1\nif (__executed.length !== __expected.length) {\n\t$ERROR('#1: __executed = /[^\"]*/.exec(\"before\\'i\\'start\"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length);\n}\n\n//CHECK#2\nif (__executed.index !== __expected.index) {\n\t$ERROR('#2: __executed = /[^\"]*/.exec(\"before\\'i\\'start\"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index);\n}\n\n//CHECK#3\nif (__executed.input !== __expected.input) {\n\t$ERROR('#3: __executed = /[^\"]*/.exec(\"before\\'i\\'start\"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input);\n}\n\n//CHECK#4\nfor(var index=0; index<__expected.length; index++) {\n\tif (__executed[index] !== __expected[index]) {\n\t\t$ERROR('#4: __executed = /[^\"]*/.exec(\"before\\'i\\'start\"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]);\n\t}\n}\n\n",
+ "id": "S15.10.2.7_A4_T3"
+ },
+ {
+ "section": "15.10.2.7",
+ "description": "Execute /[^\"]* /.exec('alice \\\"sweep\\\": \"don\\'t\"') and check results",
+ "test": "__executed = /[^\"]*/.exec('alice \\\"sweep\\\": \"don\\'t\"');\n\n__expected = [\"alice \"];\n__expected.index = 0;\n__expected.input = 'alice \\\"sweep\\\": \"don\\'t\"';\n\n//CHECK#1\nif (__executed.length !== __expected.length) {\n\t$ERROR('#1: __executed = /[^\"]*/.exec(\\'alice \\\\\"sweep\\\\\": \"don\\'t\"\\'); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length);\n}\n\n//CHECK#2\nif (__executed.index !== __expected.index) {\n\t$ERROR('#2: __executed = /[^\"]*/.exec(\\'alice \\\\\"sweep\\\\\": \"don\\'t\"\\'); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index);\n}\n\n//CHECK#3\nif (__executed.input !== __expected.input) {\n\t$ERROR('#3: __executed = /[^\"]*/.exec(\\'alice \\\\\"sweep\\\\\": \"don\\'t\"\\'); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input);\n}\n\n//CHECK#4\nfor(var index=0; index<__expected.length; index++) {\n\tif (__executed[index] !== __expected[index]) {\n\t\t$ERROR('#4: __executed = /[^\"]*/.exec(\\'alice \\\\\"sweep\\\\\": \"don\\'t\"\\'); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]);\n\t}\n}\n\n",
+ "id": "S15.10.2.7_A4_T4"
+ },
+ {
+ "section": "15.10.2.7",
+ "description": "Execute /[^\"]* /.exec('alice \\u0022sweep\\u0022: \"don\\'t\"') and check results",
+ "test": "__executed = /[^\"]*/.exec('alice \\u0022sweep\\u0022: \"don\\'t\"');\n\n__expected = [\"alice \"];\n__expected.index = 0;\n__expected.input = 'alice \"sweep\": \"don\\'t\"';\n\n//CHECK#1\nif (__executed.length !== __expected.length) {\n\t$ERROR('#1: __executed = /[^\"]*/.exec(\\'alice \\\\u0022sweep\\\\u0022: \"don\\'t\"\\'); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length);\n}\n\n//CHECK#2\nif (__executed.index !== __expected.index) {\n\t$ERROR('#2: __executed = /[^\"]*/.exec(\\'alice \\\\u0022sweep\\\\u0022: \"don\\'t\"\\'); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index);\n}\n\n//CHECK#3\nif (__executed.input !== __expected.input) {\n\t$ERROR('#3: __executed = /[^\"]*/.exec(\\'alice \\\\u0022sweep\\\\u0022: \"don\\'t\"\\'); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input);\n}\n\n//CHECK#4\nfor(var index=0; index<__expected.length; index++) {\n\tif (__executed[index] !== __expected[index]) {\n\t\t$ERROR('#4: __executed = /[^\"]*/.exec(\\'alice \\\\u0022sweep\\\\u0022: \"don\\'t\"\\'); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]);\n\t}\n}\n\n",
+ "id": "S15.10.2.7_A4_T5"
+ },
+ {
+ "section": "15.10.2.7",
+ "description": "Execute /[\"'][^\"']*[\"']/.exec('alice \\u0022sweep\\u0022: \"don\\'t\"') and check results",
+ "test": "__executed = /[\"'][^\"']*[\"']/.exec('alice \\u0022sweep\\u0022: \"don\\'t\"');\n\n__expected = [\"\\\"sweep\\\"\"];\n__expected.index = 6;\n__expected.input = 'alice \"sweep\": \"don\\'t\"';\n\n//CHECK#1\nif (__executed.length !== __expected.length) {\n\t$ERROR('#1: __executed = /[\"\\'][^\"\\']*[\"\\']/.exec(\\'alice \\\\u0022sweep\\\\u0022: \"don\\'t\"\\'); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length);\n}\n\n//CHECK#2\nif (__executed.index !== __expected.index) {\n\t$ERROR('#2: __executed = /[\"\\'][^\"\\']*[\"\\']/.exec(\\'alice \\\\u0022sweep\\\\u0022: \"don\\'t\"\\'); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index);\n}\n\n//CHECK#3\nif (__executed.input !== __expected.input) {\n\t$ERROR('#3: __executed = /[\"\\'][^\"\\']*[\"\\']/.exec(\\'alice \\\\u0022sweep\\\\u0022: \"don\\'t\"\\'); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input);\n}\n\n//CHECK#4\nfor(var index=0; index<__expected.length; index++) {\n\tif (__executed[index] !== __expected[index]) {\n\t\t$ERROR('#4: __executed = /[\"\\'][^\"\\']*[\"\\']/.exec(\\'alice \\\\u0022sweep\\\\u0022: \"don\\'t\"\\'); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]);\n\t}\n}\n\n",
+ "id": "S15.10.2.7_A4_T6"
+ },
+ {
+ "section": "15.10.2.7",
+ "description": "Execute /[\"'][^\"']*[\"']/.exec('alice cries out: \\'don\\'t\\'') and check results",
+ "test": "__executed = /[\"'][^\"']*[\"']/.exec('alice cries out: \\'don\\'t\\'');\n\n__expected = [\"\\'don\\'\"];\n__expected.index = 17;\n__expected.input = 'alice cries out: \\'don\\'t\\'';\n\n//CHECK#1\nif (__executed.length !== __expected.length) {\n\t$ERROR('#1: __executed = /[\"\\'][^\"\\']*[\"\\']/.exec(\\'alice cries out: \\'don\\'t\\'\\'); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length);\n}\n\n//CHECK#2\nif (__executed.index !== __expected.index) {\n\t$ERROR('#2: __executed = /[\"\\'][^\"\\']*[\"\\']/.exec(\\'alice cries out: \\'don\\'t\\'\\'); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index);\n}\n\n//CHECK#3\nif (__executed.input !== __expected.input) {\n\t$ERROR('#3: __executed = /[\"\\'][^\"\\']*[\"\\']/.exec(\\'alice cries out: \\'don\\'t\\'\\'); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input);\n}\n\n//CHECK#4\nfor(var index=0; index<__expected.length; index++) {\n\tif (__executed[index] !== __expected[index]) {\n\t\t$ERROR('#4: __executed = /[\"\\'][^\"\\']*[\"\\']/.exec(\\'alice cries out: \\'don\\'t\\'\\'); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]);\n\t}\n}\n\n",
+ "id": "S15.10.2.7_A4_T7"
+ },
+ {
+ "section": "15.10.2.7",
+ "description": "Execute /[\"'][^\"']*[\"']/.test('alice cries out: don\\'t') and check results",
+ "test": "__executed = /[\"'][^\"']*[\"']/.test('alice cries out: don\\'t');\n\n//CHECK#1\nif (__executed) {\n\t$ERROR('#1: /[\"\\'][^\"\\']*[\"\\']/.test(\\'alice cries out: don\\'t\\') === false');\n}\n\n",
+ "id": "S15.10.2.7_A4_T8"
+ },
+ {
+ "section": "15.10.2.7",
+ "description": "Execute /[\"'][^\"']*[\"']/.exec('alice cries out:\\\"\\\"') and check results",
+ "test": "__executed = /[\"'][^\"']*[\"']/.exec('alice cries out:\\\"\\\"');\n\n__expected = ['\\\"\\\"'];\n__expected.index = 16;\n__expected.input = 'alice cries out:\\\"\\\"';\n\n//CHECK#1\nif (__executed.length !== __expected.length) {\n\t$ERROR('#1: __executed = /[\"\\'][^\"\\']*[\"\\']/.exec(\\'alice cries out:\\\\\"\\\\\"\\'); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length);\n}\n\n//CHECK#2\nif (__executed.index !== __expected.index) {\n\t$ERROR('#2: __executed = /[\"\\'][^\"\\']*[\"\\']/.exec(\\'alice cries out:\\\\\"\\\\\"\\'); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index);\n}\n\n//CHECK#3\nif (__executed.input !== __expected.input) {\n\t$ERROR('#3: __executed = /[\"\\'][^\"\\']*[\"\\']/.exec(\\'alice cries out:\\\\\"\\\\\"\\'); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input);\n}\n\n//CHECK#4\nfor(var index=0; index<__expected.length; index++) {\n\tif (__executed[index] !== __expected[index]) {\n\t\t$ERROR('#4: __executed = /[\"\\'][^\"\\']*[\"\\']/.exec(\\'alice cries out:\\\\\"\\\\\"\\'); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]);\n\t}\n}\n\n",
+ "id": "S15.10.2.7_A4_T9"
+ },
+ {
+ "section": "15.10.2.7",
+ "description": "Execute /java(script)?/.exec(\"state: javascript is extension of ecma script\") and check results",
+ "test": "__executed = /java(script)?/.exec(\"state: javascript is extension of ecma script\");\n\n__expected = [\"javascript\", \"script\"];\n__expected.index = 7;\n__expected.input = \"state: javascript is extension of ecma script\";\n\n//CHECK#1\nif (__executed.length !== __expected.length) {\n\t$ERROR('#1: __executed = /java(script)?/.exec(\"state: javascript is extension of ecma script\"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length);\n}\n\n//CHECK#2\nif (__executed.index !== __expected.index) {\n\t$ERROR('#2: __executed = /java(script)?/.exec(\"state: javascript is extension of ecma script\"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index);\n}\n\n//CHECK#3\nif (__executed.input !== __expected.input) {\n\t$ERROR('#3: __executed = /java(script)?/.exec(\"state: javascript is extension of ecma script\"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input);\n}\n\n//CHECK#4\nfor(var index=0; index<__expected.length; index++) {\n\tif (__executed[index] !== __expected[index]) {\n\t\t$ERROR('#4: __executed = /java(script)?/.exec(\"state: javascript is extension of ecma script\"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]);\n\t}\n}\n\n",
+ "id": "S15.10.2.7_A5_T1"
+ },
+ {
+ "section": "15.10.2.7",
+ "description": "Execute /ab?c?d?x?y?z/.exec(\"123az789\") and check results",
+ "test": "__executed = /ab?c?d?x?y?z/.exec(\"123az789\");\n\n__expected = [\"az\"];\n__expected.index = 3;\n__expected.input = \"123az789\";\n\n//CHECK#1\nif (__executed.length !== __expected.length) {\n\t$ERROR('#1: __executed = /ab?c?d?x?y?z/.exec(\"123az789\"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length);\n}\n\n//CHECK#2\nif (__executed.index !== __expected.index) {\n\t$ERROR('#2: __executed = /ab?c?d?x?y?z/.exec(\"123az789\"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index);\n}\n\n//CHECK#3\nif (__executed.input !== __expected.input) {\n\t$ERROR('#3: __executed = /ab?c?d?x?y?z/.exec(\"123az789\"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input);\n}\n\n//CHECK#4\nfor(var index=0; index<__expected.length; index++) {\n\tif (__executed[index] !== __expected[index]) {\n\t\t$ERROR('#4: __executed = /ab?c?d?x?y?z/.exec(\"123az789\"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]);\n\t}\n}\n\n",
+ "id": "S15.10.2.7_A5_T10"
+ },
+ {
+ "section": "15.10.2.7",
+ "description": "Execute /\\??\\??\\??\\??\\??/.exec(\"?????\") and check results",
+ "test": "__executed = /\\??\\??\\??\\??\\??/.exec(\"?????\");\n\n__expected = [\"?????\"];\n__expected.index = 0;\n__expected.input = \"?????\";\n\n//CHECK#1\nif (__executed.length !== __expected.length) {\n\t$ERROR('#1: __executed = /\\\\??\\\\??\\\\??\\\\??\\\\??/.exec(\"?????\"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length);\n}\n\n//CHECK#2\nif (__executed.index !== __expected.index) {\n\t$ERROR('#2: __executed = /\\\\??\\\\??\\\\??\\\\??\\\\??/.exec(\"?????\"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index);\n}\n\n//CHECK#3\nif (__executed.input !== __expected.input) {\n\t$ERROR('#3: __executed = /\\\\??\\\\??\\\\??\\\\??\\\\??/.exec(\"?????\"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input);\n}\n\n//CHECK#4\nfor(var index=0; index<__expected.length; index++) {\n\tif (__executed[index] !== __expected[index]) {\n\t\t$ERROR('#4: __executed = /\\\\??\\\\??\\\\??\\\\??\\\\??/.exec(\"?????\"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]);\n\t}\n}\n\n",
+ "id": "S15.10.2.7_A5_T11"
+ },
+ {
+ "section": "15.10.2.7",
+ "description": "Execute /.?.?.?.?.?.?.?/.exec(\"test\") and check results",
+ "test": "__executed = /.?.?.?.?.?.?.?/.exec(\"test\");\n\n__expected = [\"test\"];\n__expected.index = 0;\n__expected.input = \"test\";\n\n//CHECK#1\nif (__executed.length !== __expected.length) {\n\t$ERROR('#1: __executed = /.?.?.?.?.?.?.?/.exec(\"test\"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length);\n}\n\n//CHECK#2\nif (__executed.index !== __expected.index) {\n\t$ERROR('#2: __executed = /.?.?.?.?.?.?.?/.exec(\"test\"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index);\n}\n\n//CHECK#3\nif (__executed.input !== __expected.input) {\n\t$ERROR('#3: __executed = /.?.?.?.?.?.?.?/.exec(\"test\"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input);\n}\n\n//CHECK#4\nfor(var index=0; index<__expected.length; index++) {\n\tif (__executed[index] !== __expected[index]) {\n\t\t$ERROR('#4: __executed = /.?.?.?.?.?.?.?/.exec(\"test\"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]);\n\t}\n}\n\n",
+ "id": "S15.10.2.7_A5_T12"
+ },
+ {
+ "section": "15.10.2.7",
+ "description": "Execute /java(script)?/.exec(\"state: java and javascript are vastly different\") and check results",
+ "test": "__executed = /java(script)?/.exec(\"state: java and javascript are vastly different\");\n\n__expected = [\"java\", undefined];\n__expected.index = 7;\n__expected.input = \"state: java and javascript are vastly different\";\n\n//CHECK#1\nif (__executed.length !== __expected.length) {\n\t$ERROR('#1: __executed = /java(script)?/.exec(\"state: java and javascript are vastly different\"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length);\n}\n\n//CHECK#2\nif (__executed.index !== __expected.index) {\n\t$ERROR('#2: __executed = /java(script)?/.exec(\"state: java and javascript are vastly different\"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index);\n}\n\n//CHECK#3\nif (__executed.input !== __expected.input) {\n\t$ERROR('#3: __executed = /java(script)?/.exec(\"state: java and javascript are vastly different\"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input);\n}\n\n//CHECK#4\nfor(var index=0; index<__expected.length; index++) {\n\tif (__executed[index] !== __expected[index]) {\n\t\t$ERROR('#4: __executed = /java(script)?/.exec(\"state: java and javascript are vastly different\"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]);\n\t}\n}\n\n",
+ "id": "S15.10.2.7_A5_T2"
+ },
+ {
+ "section": "15.10.2.7",
+ "description": "Execute /java(script)?/.test(\"state: both Java and JavaScript used in web development\") and check results",
+ "test": "__executed = /java(script)?/.test(\"state: both Java and JavaScript used in web development\");\n\n//CHECK#1\nif (__executed) {\n\t$ERROR('#1: /java(script)?/.test(\"state: both Java and JavaScript used in web development\") === false');\n}\n\n",
+ "id": "S15.10.2.7_A5_T3"
+ },
+ {
+ "section": "15.10.2.7",
+ "description": "Execute /cd?e/.exec(\"abcdef\") and check results",
+ "test": "__executed = /cd?e/.exec(\"abcdef\");\n\n__expected = [\"cde\"];\n__expected.index = 2;\n__expected.input = \"abcdef\";\n\n//CHECK#1\nif (__executed.length !== __expected.length) {\n\t$ERROR('#1: __executed = /cd?e/.exec(\"abcdef\"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length);\n}\n\n//CHECK#2\nif (__executed.index !== __expected.index) {\n\t$ERROR('#2: __executed = /cd?e/.exec(\"abcdef\"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index);\n}\n\n//CHECK#3\nif (__executed.input !== __expected.input) {\n\t$ERROR('#3: __executed = /cd?e/.exec(\"abcdef\"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input);\n}\n\n//CHECK#4\nfor(var index=0; index<__expected.length; index++) {\n\tif (__executed[index] !== __expected[index]) {\n\t\t$ERROR('#4: __executed = /cd?e/.exec(\"abcdef\"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]);\n\t}\n}\n\n",
+ "id": "S15.10.2.7_A5_T4"
+ },
+ {
+ "section": "15.10.2.7",
+ "description": "Execute /cdx?e/.exec(\"abcdef\") and check results",
+ "test": "__executed = /cdx?e/.exec(\"abcdef\");\n\n__expected = [\"cde\"];\n__expected.index = 2;\n__expected.input = \"abcdef\";\n\n//CHECK#1\nif (__executed.length !== __expected.length) {\n\t$ERROR('#1: __executed = /cdx?e/.exec(\"abcdef\"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length);\n}\n\n//CHECK#2\nif (__executed.index !== __expected.index) {\n\t$ERROR('#2: __executed = /cdx?e/.exec(\"abcdef\"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index);\n}\n\n//CHECK#3\nif (__executed.input !== __expected.input) {\n\t$ERROR('#3: __executed = /cdx?e/.exec(\"abcdef\"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input);\n}\n\n//CHECK#4\nfor(var index=0; index<__expected.length; index++) {\n\tif (__executed[index] !== __expected[index]) {\n\t\t$ERROR('#4: __executed = /cdx?e/.exec(\"abcdef\"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]);\n\t}\n}\n\n",
+ "id": "S15.10.2.7_A5_T5"
+ },
+ {
+ "section": "15.10.2.7",
+ "description": "Execute /o?pqrst/.exec(\"pqrstuvw\") and check results",
+ "test": "__executed = /o?pqrst/.exec(\"pqrstuvw\");\n\n__expected = [\"pqrst\"];\n__expected.index = 0;\n__expected.input = \"pqrstuvw\";\n\n//CHECK#1\nif (__executed.length !== __expected.length) {\n\t$ERROR('#1: __executed = /o?pqrst/.exec(\"pqrstuvw\"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length);\n}\n\n//CHECK#2\nif (__executed.index !== __expected.index) {\n\t$ERROR('#2: __executed = /o?pqrst/.exec(\"pqrstuvw\"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index);\n}\n\n//CHECK#3\nif (__executed.input !== __expected.input) {\n\t$ERROR('#3: __executed = /o?pqrst/.exec(\"pqrstuvw\"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input);\n}\n\n//CHECK#4\nfor(var index=0; index<__expected.length; index++) {\n\tif (__executed[index] !== __expected[index]) {\n\t\t$ERROR('#4: __executed = /o?pqrst/.exec(\"pqrstuvw\"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]);\n\t}\n}\n\n",
+ "id": "S15.10.2.7_A5_T6"
+ },
+ {
+ "section": "15.10.2.7",
+ "description": "Execute /x?y?z?/.exec(\"abcd\") and check results",
+ "test": "__executed = /x?y?z?/.exec(\"abcd\");\n\n__expected = [\"\"];\n__expected.index = 0;\n__expected.input = \"abcd\";\n\n//CHECK#1\nif (__executed.length !== __expected.length) {\n\t$ERROR('#1: __executed = /x?y?z?/.exec(\"abcd\"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length);\n}\n\n//CHECK#2\nif (__executed.index !== __expected.index) {\n\t$ERROR('#2: __executed = /x?y?z?/.exec(\"abcd\"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index);\n}\n\n//CHECK#3\nif (__executed.input !== __expected.input) {\n\t$ERROR('#3: __executed = /x?y?z?/.exec(\"abcd\"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input);\n}\n\n//CHECK#4\nfor(var index=0; index<__expected.length; index++) {\n\tif (__executed[index] !== __expected[index]) {\n\t\t$ERROR('#4: __executed = /x?y?z?/.exec(\"abcd\"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]);\n\t}\n}\n\n",
+ "id": "S15.10.2.7_A5_T7"
+ },
+ {
+ "section": "15.10.2.7",
+ "description": "Execute /x?ay?bz?c/.exec(\"abcd\") and check results",
+ "test": "__executed = /x?ay?bz?c/.exec(\"abcd\");\n\n__expected = [\"abc\"];\n__expected.index = 0;\n__expected.input = \"abcd\";\n\n//CHECK#1\nif (__executed.length !== __expected.length) {\n\t$ERROR('#1: __executed = /x?ay?bz?c/.exec(\"abcd\"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length);\n}\n\n//CHECK#2\nif (__executed.index !== __expected.index) {\n\t$ERROR('#2: __executed = /x?ay?bz?c/.exec(\"abcd\"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index);\n}\n\n//CHECK#3\nif (__executed.input !== __expected.input) {\n\t$ERROR('#3: __executed = /x?ay?bz?c/.exec(\"abcd\"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input);\n}\n\n//CHECK#4\nfor(var index=0; index<__expected.length; index++) {\n\tif (__executed[index] !== __expected[index]) {\n\t\t$ERROR('#4: __executed = /x?ay?bz?c/.exec(\"abcd\"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]);\n\t}\n}\n\n",
+ "id": "S15.10.2.7_A5_T8"
+ },
+ {
+ "section": "15.10.2.7",
+ "description": "Execute /b?b?b?b/.exec(\"abbbbc\") and check results",
+ "test": "__executed = /b?b?b?b/.exec(\"abbbbc\");\n\n__expected = [\"bbbb\"];\n__expected.index = 1;\n__expected.input = \"abbbbc\";\n\n//CHECK#1\nif (__executed.length !== __expected.length) {\n\t$ERROR('#1: __executed = /b?b?b?b/.exec(\"abbbbc\"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length);\n}\n\n//CHECK#2\nif (__executed.index !== __expected.index) {\n\t$ERROR('#2: __executed = /b?b?b?b/.exec(\"abbbbc\"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index);\n}\n\n//CHECK#3\nif (__executed.input !== __expected.input) {\n\t$ERROR('#3: __executed = /b?b?b?b/.exec(\"abbbbc\"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input);\n}\n\n//CHECK#4\nfor(var index=0; index<__expected.length; index++) {\n\tif (__executed[index] !== __expected[index]) {\n\t\t$ERROR('#4: __executed = /b?b?b?b/.exec(\"abbbbc\"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]);\n\t}\n}\n\n",
+ "id": "S15.10.2.7_A5_T9"
+ },
+ {
+ "section": "15.10.2.7",
+ "description": "Execute /b{2,}c/.exec(\"aaabbbbcccddeeeefffff\") and check results",
+ "test": "__executed = /b{2,}c/.exec(\"aaabbbbcccddeeeefffff\");\n\n__expected = [\"bbbbc\"];\n__expected.index = 3;\n__expected.input = \"aaabbbbcccddeeeefffff\";\n\n//CHECK#1\nif (__executed.length !== __expected.length) {\n\t$ERROR('#1: __executed = /b{2,}c/.exec(\"aaabbbbcccddeeeefffff\"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length);\n}\n\n//CHECK#2\nif (__executed.index !== __expected.index) {\n\t$ERROR('#2: __executed = /b{2,}c/.exec(\"aaabbbbcccddeeeefffff\"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index);\n}\n\n//CHECK#3\nif (__executed.input !== __expected.input) {\n\t$ERROR('#3: __executed = /b{2,}c/.exec(\"aaabbbbcccddeeeefffff\"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input);\n}\n\n//CHECK#4\nfor(var index=0; index<__expected.length; index++) {\n\tif (__executed[index] !== __expected[index]) {\n\t\t$ERROR('#4: __executed = /b{2,}c/.exec(\"aaabbbbcccddeeeefffff\"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]);\n\t}\n}\n\n",
+ "id": "S15.10.2.7_A6_T1"
+ },
+ {
+ "section": "15.10.2.7",
+ "description": "Execute /b{8,}c/.test(\"aaabbbbcccddeeeefffff\") and check results",
+ "test": "__executed = /b{8,}c/.test(\"aaabbbbcccddeeeefffff\");\n\n//CHECK#1\nif (__executed) {\n\t$ERROR('#1: /b{8,}c/.test(\"aaabbbbcccddeeeefffff\") === false');\n}\n\n",
+ "id": "S15.10.2.7_A6_T2"
+ },
+ {
+ "section": "15.10.2.7",
+ "description": "Execute /\\d{1,}/.exec(\"wqe456646dsff\") and check results",
+ "test": "__executed = /\\d{1,}/.exec(\"wqe456646dsff\");\n\n__expected = [\"456646\"];\n__expected.index = 3;\n__expected.input = \"wqe456646dsff\";\n\n//CHECK#1\nif (__executed.length !== __expected.length) {\n\t$ERROR('#1: __executed = /\\\\d{1,}/.exec(\"wqe456646dsff\"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length);\n}\n\n//CHECK#2\nif (__executed.index !== __expected.index) {\n\t$ERROR('#2: __executed = /\\\\d{1,}/.exec(\"wqe456646dsff\"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index);\n}\n\n//CHECK#3\nif (__executed.input !== __expected.input) {\n\t$ERROR('#3: __executed = /\\\\d{1,}/.exec(\"wqe456646dsff\"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input);\n}\n\n//CHECK#4\nfor(var index=0; index<__expected.length; index++) {\n\tif (__executed[index] !== __expected[index]) {\n\t\t$ERROR('#4: __executed = /\\\\d{1,}/.exec(\"wqe456646dsff\"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]);\n\t}\n}\n\n",
+ "id": "S15.10.2.7_A6_T3"
+ },
+ {
+ "section": "15.10.2.7",
+ "description": "Execute /(123){1,}/.exec(\"123123\") and check results",
+ "test": "__executed = /(123){1,}/.exec(\"123123\");\n\n__expected = [\"123123\",\"123\"];\n__expected.index = 0;\n__expected.input = \"123123\";\n\n//CHECK#1\nif (__executed.length !== __expected.length) {\n\t$ERROR('#1: __executed = /(123){1,}/.exec(\"123123\"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length);\n}\n\n//CHECK#2\nif (__executed.index !== __expected.index) {\n\t$ERROR('#2: __executed = /(123){1,}/.exec(\"123123\"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index);\n}\n\n//CHECK#3\nif (__executed.input !== __expected.input) {\n\t$ERROR('#3: __executed = /(123){1,}/.exec(\"123123\"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input);\n}\n\n//CHECK#4\nfor(var index=0; index<__expected.length; index++) {\n\tif (__executed[index] !== __expected[index]) {\n\t\t$ERROR('#4: __executed = /(123){1,}/.exec(\"123123\"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]);\n\t}\n}\n\n",
+ "id": "S15.10.2.7_A6_T4"
+ },
+ {
+ "section": "15.10.2.7",
+ "description": "Execute /(123){1,}x\\1/.exec(\"123123x123\") and check results",
+ "test": "__executed = /(123){1,}x\\1/.exec(\"123123x123\");\n\n__expected = [\"123123x123\",\"123\"];\n__expected.index = 0;\n__expected.input = \"123123x123\";\n\n//CHECK#1\nif (__executed.length !== __expected.length) {\n\t$ERROR('#1: __executed = /(123){1,}x\\\\1/.exec(\"123123x123\"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length);\n}\n\n//CHECK#2\nif (__executed.index !== __expected.index) {\n\t$ERROR('#2: __executed = /(123){1,}x\\\\1/.exec(\"123123x123\"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index);\n}\n\n//CHECK#3\nif (__executed.input !== __expected.input) {\n\t$ERROR('#3: __executed = /(123){1,}x\\\\1\\\\/.exec(\"123123x123\"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input);\n}\n\n//CHECK#4\nfor(var index=0; index<__expected.length; index++) {\n\tif (__executed[index] !== __expected[index]) {\n\t\t$ERROR('#4: __executed = /(123){1,}x\\\\1/.exec(\"123123x123\"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]);\n\t}\n}\n\n",
+ "id": "S15.10.2.7_A6_T5"
+ },
+ {
+ "section": "15.10.2.7",
+ "description": "Execute /x{1,2}x{1,}/.exec(\"xxxxxxx\") and check results",
+ "test": "__executed = /x{1,2}x{1,}/.exec(\"xxxxxxx\");\n\n__expected = [\"xxxxxxx\"];\n__expected.index = 0;\n__expected.input = \"xxxxxxx\";\n\n//CHECK#1\nif (__executed.length !== __expected.length) {\n\t$ERROR('#1: __executed = /x{1,2}x{1,}/.exec(\"xxxxxxx\"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length);\n}\n\n//CHECK#2\nif (__executed.index !== __expected.index) {\n\t$ERROR('#2: __executed = /x{1,2}x{1,}/.exec(\"xxxxxxx\"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index);\n}\n\n//CHECK#3\nif (__executed.input !== __expected.input) {\n\t$ERROR('#3: __executed = /x{1,2}x{1,}/.exec(\"xxxxxxx\"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input);\n}\n\n//CHECK#4\nfor(var index=0; index<__expected.length; index++) {\n\tif (__executed[index] !== __expected[index]) {\n\t\t$ERROR('#4: __executed = /x{1,2}x{1,}/.exec(\"xxxxxxx\"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]);\n\t}\n}\n\n",
+ "id": "S15.10.2.7_A6_T6"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.10.2.8_Atom.json b/website/resources/scripts/testcases2/15.10.2.8_Atom.json
new file mode 100644
index 000000000..14bd61a34
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.10.2.8_Atom.json
@@ -0,0 +1,368 @@
+{
+ "testCollection": {
+ "name": "15.10.2.8_Atom",
+ "numTests": 60,
+ "tests": [
+ {
+ "section": "15.10.2.8",
+ "description": "Execute /(?=(a+))/.exec(\"baaabac\") and check results",
+ "test": "__executed = /(?=(a+))/.exec(\"baaabac\");\n\n__expected = [\"\", \"aaa\"];\n__expected.index = 1;\n__expected.input = \"baaabac\";\n\n//CHECK#1\nif (__executed.length !== __expected.length) {\n\t$ERROR('#1: __executed = /(?=(a+))/.exec(\"baaabac\"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length);\n}\n\n//CHECK#2\nif (__executed.index !== __expected.index) {\n\t$ERROR('#2: __executed = /(?=(a+))/.exec(\"baaabac\"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index);\n}\n\n//CHECK#3\nif (__executed.input !== __expected.input) {\n\t$ERROR('#3: __executed = /(?=(a+))/.exec(\"baaabac\"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input);\n}\n\n//CHECK#4\nfor(var index=0; index<__expected.length; index++) {\n\tif (__executed[index] !== __expected[index]) {\n\t\t$ERROR('#4: __executed = /(?=(a+))/.exec(\"baaabac\"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]);\n\t}\n}\n\n",
+ "id": "S15.10.2.8_A1_T1"
+ },
+ {
+ "section": "15.10.2.8",
+ "description": "Execute /(?=(a+))a*b\\1/.exec(\"baaabac\") and check results",
+ "test": "__executed = /(?=(a+))a*b\\1/.exec(\"baaabac\");\n\n__expected = [\"aba\", \"a\"];\n__expected.index = 3;\n__expected.input = \"baaabac\";\n\n//CHECK#1\nif (__executed.length !== __expected.length) {\n\t$ERROR('#1: __executed = /(?=(a+))a*b\\\\1/.exec(\"baaabac\"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length);\n}\n\n//CHECK#2\nif (__executed.index !== __expected.index) {\n\t$ERROR('#2: __executed = /(?=(a+))a*b\\\\1/.exec(\"baaabac\"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index);\n}\n\n//CHECK#3\nif (__executed.input !== __expected.input) {\n\t$ERROR('#3: __executed = /(?=(a+))a*b\\\\1/.exec(\"baaabac\"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input);\n}\n\n//CHECK#4\nfor(var index=0; index<__expected.length; index++) {\n\tif (__executed[index] !== __expected[index]) {\n\t\t$ERROR('#4: __executed = /(?=(a+))a*b\\\\1/.exec(\"baaabac\"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]);\n\t}\n}\n\n",
+ "id": "S15.10.2.8_A1_T2"
+ },
+ {
+ "section": "15.10.2.8",
+ "description": "Execute /[Jj]ava([Ss]cript)?(?=\\:)/.exec(\"just Javascript: the way af jedi\") and check results",
+ "test": "__executed = /[Jj]ava([Ss]cript)?(?=\\:)/.exec(\"just Javascript: the way af jedi\");\n\n__expected = [\"Javascript\", \"script\"];\n__expected.index = 5;\n__expected.input = \"just Javascript: the way af jedi\";\n\n//CHECK#1\nif (__executed.length !== __expected.length) {\n\t$ERROR('#1: __executed = /[Jj]ava([Ss]cript)?(?=\\\\:)/.exec(\"just Javascript: the way af jedi\"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length);\n}\n\n//CHECK#2\nif (__executed.index !== __expected.index) {\n\t$ERROR('#2: __executed = /[Jj]ava([Ss]cript)?(?=\\\\:)/.exec(\"just Javascript: the way af jedi\"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index);\n}\n\n//CHECK#3\nif (__executed.input !== __expected.input) {\n\t$ERROR('#3: __executed = /[Jj]ava([Ss]cript)?(?=\\\\:)/.exec(\"just Javascript: the way af jedi\"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input);\n}\n\n//CHECK#4\nfor(var index=0; index<__expected.length; index++) {\n\tif (__executed[index] !== __expected[index]) {\n\t\t$ERROR('#4: __executed = /[Jj]ava([Ss]cript)?(?=\\\\:)/.exec(\"just Javascript: the way af jedi\"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]);\n\t}\n}\n\n",
+ "id": "S15.10.2.8_A1_T3"
+ },
+ {
+ "section": "15.10.2.8",
+ "description": "Execute /[Jj]ava([Ss]cript)?(?=\\:)/.exec(\"taste of java: the cookbook \") and check results",
+ "test": "__executed = /[Jj]ava([Ss]cript)?(?=\\:)/.exec(\"taste of java: the cookbook \");\n\n__expected = [\"java\", undefined];\n__expected.index = 9;\n__expected.input = \"taste of java: the cookbook \";\n\n//CHECK#1\nif (__executed.length !== __expected.length) {\n\t$ERROR('#1: __executed = /[Jj]ava([Ss]cript)?(?=\\\\:)/.exec(\"taste of java: the cookbook \"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length);\n}\n\n//CHECK#2\nif (__executed.index !== __expected.index) {\n\t$ERROR('#2: __executed = /[Jj]ava([Ss]cript)?(?=\\\\:)/.exec(\"taste of java: the cookbook \"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index);\n}\n\n//CHECK#3\nif (__executed.input !== __expected.input) {\n\t$ERROR('#3: __executed = /[Jj]ava([Ss]cript)?(?=\\\\:)/.exec(\"taste of java: the cookbook \"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input);\n}\n\n//CHECK#4\nfor(var index=0; index<__expected.length; index++) {\n\tif (__executed[index] !== __expected[index]) {\n\t\t$ERROR('#4: __executed = /[Jj]ava([Ss]cript)?(?=\\\\:)/.exec(\"taste of java: the cookbook \"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]);\n\t}\n}\n\n",
+ "id": "S15.10.2.8_A1_T4"
+ },
+ {
+ "section": "15.10.2.8",
+ "description": "Execute /[Jj]ava([Ss]cript)?(?=\\:)/.test(\"rhino is JavaScript engine\") and check results",
+ "test": "__executed = /[Jj]ava([Ss]cript)?(?=\\:)/.test(\"rhino is JavaScript engine\");\n\n//CHECK#1\nif (__executed) {\n\t$ERROR('#1: /[Jj]ava([Ss]cript)?(?=\\\\:)/.test(\"rhino is JavaScript engine\") === false');\n}\n\n",
+ "id": "S15.10.2.8_A1_T5"
+ },
+ {
+ "section": "15.10.2.8",
+ "description": "Execute /(.*?)a(?!(a+)b\\2c)\\2(.*)/.exec(\"baaabaac\") and check results",
+ "test": "__executed = /(.*?)a(?!(a+)b\\2c)\\2(.*)/.exec(\"baaabaac\");\n\n__expected = [\"baaabaac\", \"ba\", undefined, \"abaac\"];\n__expected.index = 0;\n__expected.input = \"baaabaac\";\n\n//CHECK#1\nif (__executed.length !== __expected.length) {\n\t$ERROR('#1: __executed = /(.*?)a(?!(a+)b\\\\2c)\\\\2(.*)/.exec(\"baaabaac\"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length);\n}\n\n//CHECK#2\nif (__executed.index !== __expected.index) {\n\t$ERROR('#2: __executed = /(.*?)a(?!(a+)b\\\\2c)\\\\2(.*)/.exec(\"baaabaac\"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index);\n}\n\n//CHECK#3\nif (__executed.input !== __expected.input) {\n\t$ERROR('#3: __executed = /(.*?)a(?!(a+)b\\\\2c)\\\\2(.*)/.exec(\"baaabaac\"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input);\n}\n\n//CHECK#4\nfor(var index=0; index<__expected.length; index++) {\n\tif (__executed[index] !== __expected[index]) {\n\t\t$ERROR('#4: __executed = /(.*?)a(?!(a+)b\\\\2c)\\\\2(.*)/.exec(\"baaabaac\"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]);\n\t}\n}\n\n",
+ "id": "S15.10.2.8_A2_T1"
+ },
+ {
+ "section": "15.10.2.8",
+ "description": "Execute /(?!a|b)|c/.exec(\"bc\") and check results",
+ "test": "__executed = /(?!a|b)|c/.exec(\"bc\");\n\n__expected = [\"\"];\n__expected.index = 1;\n__expected.input = \"bc\";\n\n//CHECK#1\nif (__executed.length !== __expected.length) {\n\t$ERROR('#1: __executed = /(?!a|b)|c/.exec(\"bc\"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length);\n}\n\n//CHECK#2\nif (__executed.index !== __expected.index) {\n\t$ERROR('#2: __executed = /(?!a|b)|c/.exec(\"bc\"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index);\n}\n\n//CHECK#3\nif (__executed.input !== __expected.input) {\n\t$ERROR('#3: __executed = /(?!a|b)|c/.exec(\"bc\"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input);\n}\n\n//CHECK#4\nfor(var index=0; index<__expected.length; index++) {\n\tif (__executed[index] !== __expected[index]) {\n\t\t$ERROR('#4: __executed = /(?!a|b)|c/.exec(\"bc\"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]);\n\t}\n}\n\n",
+ "id": "S15.10.2.8_A2_T10"
+ },
+ {
+ "section": "15.10.2.8",
+ "description": "Execute /(?!a|b)|c/.exec(\"d\") and check results",
+ "test": "__executed = /(?!a|b)|c/.exec(\"d\");\n\n__expected = [\"\"];\n__expected.index = 0;\n__expected.input = \"d\";\n\n//CHECK#1\nif (__executed.length !== __expected.length) {\n\t$ERROR('#1: __executed = /(?!a|b)|c/.exec(\"d\"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length);\n}\n\n//CHECK#2\nif (__executed.index !== __expected.index) {\n\t$ERROR('#2: __executed = /(?!a|b)|c/.exec(\"d\"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index);\n}\n\n//CHECK#3\nif (__executed.input !== __expected.input) {\n\t$ERROR('#3: __executed = /(?!a|b)|c/.exec(\"d\"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input);\n}\n\n//CHECK#4\nfor(var index=0; index<__expected.length; index++) {\n\tif (__executed[index] !== __expected[index]) {\n\t\t$ERROR('#4: __executed = /(?!a|b)|c/.exec(\"d\"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]);\n\t}\n}\n\n",
+ "id": "S15.10.2.8_A2_T11"
+ },
+ {
+ "section": "15.10.2.8",
+ "description": "Execute /Java(?!Script)([A-Z]\\w*)/.exec(\"using of JavaBeans technology\") and check results",
+ "test": "__executed = /Java(?!Script)([A-Z]\\w*)/.exec(\"using of JavaBeans technology\");\n\n__expected = [\"JavaBeans\", \"Beans\"];\n__expected.index = 9;\n__expected.input = \"using of JavaBeans technology\";\n\n//CHECK#1\nif (__executed.length !== __expected.length) {\n\t$ERROR('#1: __executed = /Java(?!Script)([A-Z]\\\\w*)/.exec(\"using of JavaBeans technology\"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length);\n}\n\n//CHECK#2\nif (__executed.index !== __expected.index) {\n\t$ERROR('#2: __executed = /Java(?!Script)([A-Z]\\\\w*)/.exec(\"using of JavaBeans technology\"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index);\n}\n\n//CHECK#3\nif (__executed.input !== __expected.input) {\n\t$ERROR('#3: __executed = /Java(?!Script)([A-Z]\\\\w*)/.exec(\"using of JavaBeans technology\"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input);\n}\n\n//CHECK#4\nfor(var index=0; index<__expected.length; index++) {\n\tif (__executed[index] !== __expected[index]) {\n\t\t$ERROR('#4: __executed = /Java(?!Script)([A-Z]\\\\w*)/.exec(\"using of JavaBeans technology\"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]);\n\t}\n}\n\n",
+ "id": "S15.10.2.8_A2_T2"
+ },
+ {
+ "section": "15.10.2.8",
+ "description": "Execute /Java(?!Script)([A-Z]\\w*)/.test(\"using of Java language\") and check results",
+ "test": "__executed = /Java(?!Script)([A-Z]\\w*)/.test(\"using of Java language\");\n\n//CHECK#1\nif (__executed) {\n\t$ERROR('#1: /Java(?!Script)([A-Z]\\\\w*)/.test(\"using of Java language\") === false');\n}\n\n",
+ "id": "S15.10.2.8_A2_T3"
+ },
+ {
+ "section": "15.10.2.8",
+ "description": "Execute /Java(?!Script)([A-Z]\\w*)/.test(\"i'm a JavaScripter \") and check results",
+ "test": "__executed = /Java(?!Script)([A-Z]\\w*)/.test(\"i'm a JavaScripter \");\n\n//CHECK#1\nif (__executed) {\n\t$ERROR('#1: /Java(?!Script)([A-Z]\\\\w*)/.test(\"i\\'m a JavaScripter \") === false');\n}\n\n",
+ "id": "S15.10.2.8_A2_T4"
+ },
+ {
+ "section": "15.10.2.8",
+ "description": "Execute /Java(?!Script)([A-Z]\\w*)/.exec(\"JavaScr oops ipt \") and check results",
+ "test": "__executed = /Java(?!Script)([A-Z]\\w*)/.exec(\"JavaScr oops ipt \");\n\n__expected = [\"JavaScr\", \"Scr\"];\n__expected.index = 0;\n__expected.input = \"JavaScr oops ipt \";\n\n//CHECK#1\nif (__executed.length !== __expected.length) {\n\t$ERROR('#1: __executed = /Java(?!Script)([A-Z]\\\\w*)/.exec(\"JavaScr oops ipt \"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length);\n}\n\n//CHECK#2\nif (__executed.index !== __expected.index) {\n\t$ERROR('#2: __executed = /Java(?!Script)([A-Z]\\\\w*)/.exec(\"JavaScr oops ipt \"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index);\n}\n\n//CHECK#3\nif (__executed.input !== __expected.input) {\n\t$ERROR('#3: __executed = /Java(?!Script)([A-Z]\\\\w*)/.exec(\"JavaScr oops ipt \"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input);\n}\n\n//CHECK#4\nfor(var index=0; index<__expected.length; index++) {\n\tif (__executed[index] !== __expected[index]) {\n\t\t$ERROR('#4: __executed = /Java(?!Script)([A-Z]\\\\w*)/.exec(\"JavaScr oops ipt \"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]);\n\t}\n}\n\n",
+ "id": "S15.10.2.8_A2_T5"
+ },
+ {
+ "section": "15.10.2.8",
+ "description": "Execute /(\\.(?!com|org)|\\/)/.exec(\"ah.info\") and check results",
+ "test": "__executed = /(\\.(?!com|org)|\\/)/.exec(\"ah.info\");\n\n__expected = ['.', '.'];\n__expected.index = 2;\n__expected.input = \"ah.info\";\n\n//CHECK#1\nif (__executed.length !== __expected.length) {\n\t$ERROR('#1: __executed = /(\\\\.(?!com|org)|\\\\/)/.exec(\"ah.info\"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length);\n}\n\n//CHECK#2\nif (__executed.index !== __expected.index) {\n\t$ERROR('#2: __executed = /(\\\\.(?!com|org)|\\\\/)/.exec(\"ah.info\"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index);\n}\n\n//CHECK#3\nif (__executed.input !== __expected.input) {\n\t$ERROR('#3: __executed = /(\\\\.(?!com|org)|\\\\/)/.exec(\"ah.info\"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input);\n}\n\n//CHECK#4\nfor(var index=0; index<__expected.length; index++) {\n\tif (__executed[index] !== __expected[index]) {\n\t\t$ERROR('#4: __executed = /(\\\\.(?!com|org)|\\\\/)/.exec(\"ah.info\"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]);\n\t}\n}\n\n",
+ "id": "S15.10.2.8_A2_T6"
+ },
+ {
+ "section": "15.10.2.8",
+ "description": "Execute /(\\.(?!com|org)|\\/)/.exec(\"ah/info\") and check results",
+ "test": "__executed = /(\\.(?!com|org)|\\/)/.exec(\"ah/info\");\n\n__expected = ['/', '/'];\n__expected.index = 2;\n__expected.input = \"ah/info\";\n\n//CHECK#1\nif (__executed.length !== __expected.length) {\n\t$ERROR('#1: __executed = /(\\\\.(?!com|org)|\\\\/)/.exec(\"ah/info\"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length);\n}\n\n//CHECK#2\nif (__executed.index !== __expected.index) {\n\t$ERROR('#2: __executed = /(\\\\.(?!com|org)|\\\\/)/.exec(\"ah/info\"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index);\n}\n\n//CHECK#3\nif (__executed.input !== __expected.input) {\n\t$ERROR('#3: __executed = /(\\\\.(?!com|org)|\\\\/)/.exec(\"ah/info\"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input);\n}\n\n//CHECK#4\nfor(var index=0; index<__expected.length; index++) {\n\tif (__executed[index] !== __expected[index]) {\n\t\t$ERROR('#4: __executed = /(\\\\.(?!com|org)|\\\\/)/.exec(\"ah/info\"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]);\n\t}\n}\n\n",
+ "id": "S15.10.2.8_A2_T7"
+ },
+ {
+ "section": "15.10.2.8",
+ "description": "Execute /(\\.(?!com|org)|\\/)/.test(\"ah.com\") and check results",
+ "test": "__executed = /(\\.(?!com|org)|\\/)/.test(\"ah.com\");\n\n//CHECK#1\nif (__executed) {\n\t$ERROR('#1: /(\\\\.(?!com|org)|\\\\/)/.test(\"ah.com\") === false');\n}\n\n",
+ "id": "S15.10.2.8_A2_T8"
+ },
+ {
+ "section": "15.10.2.8",
+ "description": "Execute /(?!a|b)|c/.exec(\"\") and check results",
+ "test": "__executed = /(?!a|b)|c/.exec(\"\");\n\n__expected = [\"\"];\n__expected.index = 0;\n__expected.input = \"\";\n\n//CHECK#1\nif (__executed.length !== __expected.length) {\n\t$ERROR('#1: __executed = /(?!a|b)|c/.exec(\"\"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length);\n}\n\n//CHECK#2\nif (__executed.index !== __expected.index) {\n\t$ERROR('#2: __executed = /(?!a|b)|c/.exec(\"\"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index);\n}\n\n//CHECK#3\nif (__executed.input !== __expected.input) {\n\t$ERROR('#3: __executed = /(?!a|b)|c/.exec(\"\"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input);\n}\n\n//CHECK#4\nfor(var index=0; index<__expected.length; index++) {\n\tif (__executed[index] !== __expected[index]) {\n\t\t$ERROR('#4: __executed = /(?!a|b)|c/.exec(\"\"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]);\n\t}\n}\n\n",
+ "id": "S15.10.2.8_A2_T9"
+ },
+ {
+ "section": "15.10.2.8",
+ "description": "Execute /([Jj]ava([Ss]cript)?)\\sis\\s(fun\\w*)/.exec(\"Learning javaScript is funny, really\") and check results",
+ "test": "__executed = /([Jj]ava([Ss]cript)?)\\sis\\s(fun\\w*)/.exec(\"Learning javaScript is funny, really\");\n\n__expected = [\"javaScript is funny\",\"javaScript\",\"Script\",\"funny\"];\n__expected.index = 9;\n__expected.input = \"Learning javaScript is funny, really\";\n\n//CHECK#1\nif (__executed.length !== __expected.length) {\n\t$ERROR('#1: __executed = /([Jj]ava([Ss]cript)?)\\\\sis\\\\s(fun\\\\w*)/.exec(\"Learning javaScript is funny, really\"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length);\n}\n\n//CHECK#2\nif (__executed.index !== __expected.index) {\n\t$ERROR('#2: __executed = /([Jj]ava([Ss]cript)?)\\\\sis\\\\s(fun\\\\w*)/.exec(\"Learning javaScript is funny, really\"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index);\n}\n\n//CHECK#3\nif (__executed.input !== __expected.input) {\n\t$ERROR('#3: __executed = /([Jj]ava([Ss]cript)?)\\\\sis\\\\s(fun\\\\w*)/.exec(\"Learning javaScript is funny, really\"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input);\n}\n\n//CHECK#4\nfor(var index=0; index<__expected.length; index++) {\n\tif (__executed[index] !== __expected[index]) {\n\t\t$ERROR('#4: __executed = /([Jj]ava([Ss]cript)?)\\\\sis\\\\s(fun\\\\w*)/.exec(\"Learning javaScript is funny, really\"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]);\n\t}\n}\n\n",
+ "id": "S15.10.2.8_A3_T1"
+ },
+ {
+ "section": "15.10.2.8",
+ "description": "Execute /(\\d{3})(\\d{3})\\1\\2/.exec(\"123456123456\") and check results",
+ "test": "__executed = /(\\d{3})(\\d{3})\\1\\2/.exec(\"123456123456\");\n\n__expected = [\"123456123456\",\"123\",\"456\"];\n__expected.index = 0;\n__expected.input = \"123456123456\";\n\n//CHECK#1\nif (__executed.length !== __expected.length) {\n\t$ERROR('#1: __executed = /(\\\\d{3})(\\\\d{3})\\\\1\\\\2/.exec(\"123456123456\"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length);\n}\n\n//CHECK#2\nif (__executed.index !== __expected.index) {\n\t$ERROR('#2: __executed = /(\\\\d{3})(\\\\d{3})\\\\1\\\\2/.exec(\"123456123456\"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index);\n}\n\n//CHECK#3\nif (__executed.input !== __expected.input) {\n\t$ERROR('#3: __executed = /(\\\\d{3})(\\\\d{3})\\\\1\\\\2/.exec(\"123456123456\"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input);\n}\n\n//CHECK#4\nfor(var index=0; index<__expected.length; index++) {\n\tif (__executed[index] !== __expected[index]) {\n\t\t$ERROR('#4: __executed = /(\\\\d{3})(\\\\d{3})\\\\1\\\\2/.exec(\"123456123456\"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]);\n\t}\n}\n\n",
+ "id": "S15.10.2.8_A3_T10"
+ },
+ {
+ "section": "15.10.2.8",
+ "description": "Execute /a(..(..)..)/.exec(\"abcdefgh\") and check results",
+ "test": "__executed = /a(..(..)..)/.exec(\"abcdefgh\");\n\n__expected = [\"abcdefg\",\"bcdefg\",\"de\"];\n__expected.index = 0;\n__expected.input = \"abcdefgh\";\n\n//CHECK#1\nif (__executed.length !== __expected.length) {\n\t$ERROR('#1: __executed = /a(..(..)..)/.exec(\"abcdefgh\"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length);\n}\n\n//CHECK#2\nif (__executed.index !== __expected.index) {\n\t$ERROR('#2: __executed = /a(..(..)..)/.exec(\"abcdefgh\"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index);\n}\n\n//CHECK#3\nif (__executed.input !== __expected.input) {\n\t$ERROR('#3: __executed = /a(..(..)..)/.exec(\"abcdefgh\"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input);\n}\n\n//CHECK#4\nfor(var index=0; index<__expected.length; index++) {\n\tif (__executed[index] !== __expected[index]) {\n\t\t$ERROR('#4: __executed = /a(..(..)..)/.exec(\"abcdefgh\"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]);\n\t}\n}\n\n",
+ "id": "S15.10.2.8_A3_T11"
+ },
+ {
+ "section": "15.10.2.8",
+ "description": "Execute /(a(b(c)))(d(e(f)))/.exec(\"xabcdefg\") and check results",
+ "test": "__executed = /(a(b(c)))(d(e(f)))/.exec(\"xabcdefg\");\n\n__expected = [\"abcdef\",\"abc\",\"bc\",\"c\",\"def\",\"ef\",\"f\"];\n__expected.index = 1;\n__expected.input = \"xabcdefg\";\n\n//CHECK#1\nif (__executed.length !== __expected.length) {\n\t$ERROR('#1: __executed = /(a(b(c)))(d(e(f)))/.exec(\"xabcdefg\"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length);\n}\n\n//CHECK#2\nif (__executed.index !== __expected.index) {\n\t$ERROR('#2: __executed = /(a(b(c)))(d(e(f)))/.exec(\"xabcdefg\"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index);\n}\n\n//CHECK#3\nif (__executed.input !== __expected.input) {\n\t$ERROR('#3: __executed = /(a(b(c)))(d(e(f)))/.exec(\"xabcdefg\"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input);\n}\n\n//CHECK#4\nfor(var index=0; index<__expected.length; index++) {\n\tif (__executed[index] !== __expected[index]) {\n\t\t$ERROR('#4: __executed = /(a(b(c)))(d(e(f)))/.exec(\"xabcdefg\"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]);\n\t}\n}\n\n",
+ "id": "S15.10.2.8_A3_T12"
+ },
+ {
+ "section": "15.10.2.8",
+ "description": "Execute /(a(b(c)))(d(e(f)))\\2\\5/.exec(\"xabcdefbcefg\") and check results",
+ "test": "__executed = /(a(b(c)))(d(e(f)))\\2\\5/.exec(\"xabcdefbcefg\");\n\n__expected = [\"abcdefbcef\",\"abc\",\"bc\",\"c\",\"def\",\"ef\",\"f\"];\n__expected.index = 1;\n__expected.input = \"xabcdefbcefg\";\n\n//CHECK#1\nif (__executed.length !== __expected.length) {\n\t$ERROR('#1: __executed = /(a(b(c)))(d(e(f)))\\\\2\\\\5/.exec(\"xabcdefbcefg\"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length);\n}\n\n//CHECK#2\nif (__executed.index !== __expected.index) {\n\t$ERROR('#2: __executed = /(a(b(c)))(d(e(f)))\\\\2\\\\5/.exec(\"xabcdefbcefg\"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index);\n}\n\n//CHECK#3\nif (__executed.input !== __expected.input) {\n\t$ERROR('#3: __executed = /(a(b(c)))(d(e(f)))\\\\2\\\\5/.exec(\"xabcdefbcefg\"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input);\n}\n\n//CHECK#4\nfor(var index=0; index<__expected.length; index++) {\n\tif (__executed[index] !== __expected[index]) {\n\t\t$ERROR('#4: __executed = /(a(b(c)))(d(e(f)))\\\\2\\\\5/.exec(\"xabcdefbcefg\"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]);\n\t}\n}\n\n",
+ "id": "S15.10.2.8_A3_T13"
+ },
+ {
+ "section": "15.10.2.8",
+ "description": "Execute /a(.?)b\\1c\\1d\\1/.exec(\"abcd\") and check results",
+ "test": "__executed = /a(.?)b\\1c\\1d\\1/.exec(\"abcd\");\n\n__expected = [\"abcd\",\"\"];\n__expected.index = 0;\n__expected.input = \"abcd\";\n\n//CHECK#1\nif (__executed.length !== __expected.length) {\n\t$ERROR('#1: __executed = /a(.?)b\\\\1c\\\\1d\\\\1/.exec(\"abcd\"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length);\n}\n\n//CHECK#2\nif (__executed.index !== __expected.index) {\n\t$ERROR('#2: __executed = /a(.?)b\\\\1c\\\\1d\\\\1/.exec(\"abcd\"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index);\n}\n\n//CHECK#3\nif (__executed.input !== __expected.input) {\n\t$ERROR('#3: __executed = /a(.?)b\\\\1c\\\\1d\\\\1/.exec(\"abcd\"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input);\n}\n\n//CHECK#4\nfor(var index=0; index<__expected.length; index++) {\n\tif (__executed[index] !== __expected[index]) {\n\t\t$ERROR('#4: __executed = /a(.?)b\\\\1c\\\\1d\\\\1/.exec(\"abcd\"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]);\n\t}\n}\n\n",
+ "id": "S15.10.2.8_A3_T14"
+ },
+ {
+ "section": "15.10.2.8",
+ "description": "see bug http:bugzilla.mozilla.org/show_bug.cgi?id=119909",
+ "test": "__strOriginal = \"hello\";\n__openParen = '(';\n__closeParen = ')';\n__pattern = '';\n numParens = 200;\n \nfor (var i=0; i<numParens; i++)\n __pattern += __openParen;\n \n__pattern += __strOriginal;\n\nfor (i=0; i<numParens; i++) \n __pattern += __closeParen;\n \n__re = new RegExp(__pattern);\n\n__executed = __re.exec(__strOriginal);\n\n__expected = [];\nfor (var i=0; i<=numParens; i++)\n __expected.push(__strOriginal);\n__expected.index = 0;\n__expected.input = __strOriginal;\n\n//CHECK#1\nif (__executed.length !== __expected.length) {\n\t$ERROR('#1: __re = new RegExp(__pattern); __executed = __re.exec(__strOriginal); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length);\n}\n\n//CHECK#2\nif (__executed.index !== __expected.index) {\n\t$ERROR('#2: __re = new RegExp(__pattern); __executed = __re.exec(__strOriginal); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index);\n}\n\n//CHECK#3\nif (__executed.input !== __expected.input) {\n\t$ERROR('#3: __re = new RegExp(__pattern); __executed = __re.exec(__strOriginal); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input);\n}\n\n//CHECK#4\nfor(var index=0; index<__expected.length; index++) {\n\tif (__executed[index] !== __expected[index]) {\n\t\t$ERROR('#4: __re = new RegExp(__pattern); __executed = __re.exec(__strOriginal); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]);\n\t}\n}\n\n",
+ "id": "S15.10.2.8_A3_T15"
+ },
+ {
+ "section": "15.10.2.8",
+ "description": "see bug http:bugzilla.mozilla.org/show_bug.cgi?id=119909",
+ "test": "__strOriginal = \"hello\";\n__openParen = '(?:';\n__closeParen = ')';\n__pattern = '';\n numParens = 200;\n \nfor (var i=0; i<numParens; i++)\n __pattern += __openParen;\n \n__pattern += __strOriginal;\n\nfor (i=0; i<numParens; i++) \n __pattern += __closeParen;\n \n__re = new RegExp(__pattern);\n\n__executed = __re.exec(__strOriginal);\n\n__expected = [__strOriginal];\n__expected.index = 0;\n__expected.input = __strOriginal;\n\n//CHECK#1\nif (__executed.length !== __expected.length) {\n\t$ERROR('#1: __re = new RegExp(__pattern); __executed = __re.exec(__strOriginal); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length);\n}\n\n//CHECK#2\nif (__executed.index !== __expected.index) {\n\t$ERROR('#2: __re = new RegExp(__pattern); __executed = __re.exec(__strOriginal); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index);\n}\n\n//CHECK#3\nif (__executed.input !== __expected.input) {\n\t$ERROR('#3: __re = new RegExp(__pattern); __executed = __re.exec(__strOriginal); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input);\n}\n\n//CHECK#4\nfor(var index=0; index<__expected.length; index++) {\n\tif (__executed[index] !== __expected[index]) {\n\t\t$ERROR('#4: __re = new RegExp(__pattern); __executed = __re.exec(__strOriginal); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]);\n\t}\n}\n\n",
+ "id": "S15.10.2.8_A3_T16"
+ },
+ {
+ "section": "15.10.2.8",
+ "description": "see bug http:bugzilla.mozilla.org/show_bug.cgi?id=169497",
+ "test": "__body=\"\";\n__body += '<body onXXX=\"alert(event.type);\">\\n';\n__body += '<p>Kibology for all<\\/p>\\n';\n__body += '<p>All for Kibology<\\/p>\\n';\n__body += '<\\/body>';\n\n__html=\"\";\n__html += '<html>\\n';\n__html += __body;\n__html += '\\n<\\/html>';\n\n__executed = /<body.*>((.*\\n?)*?)<\\/body>/i.exec(__html);\n\n__expected = [__body, '\\n<p>Kibology for all</p>\\n<p>All for Kibology</p>\\n', '<p>All for Kibology</p>\\n'];\n__expected.index = 7;\n__expected.input = __html;\n\n//CHECK#1\nif (__executed.length !== __expected.length) {\n\t$ERROR('#1: __executed = /<body.*>((.*\\\\n?)*?)<\\\\/body>/i.exec(__html); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length);\n}\n\n//CHECK#2\nif (__executed.index !== __expected.index) {\n\t$ERROR('#2: __executed = /<body.*>((.*\\\\n?)*?)<\\\\/body>/i.exec(__html); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index);\n}\n\n//CHECK#3\nif (__executed.input !== __expected.input) {\n\t$ERROR('#3: __executed = /<body.*>((.*\\\\n?)*?)<\\\\/body>/i.exec(__html); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input);\n}\n\n//CHECK#4\nfor(var index=0; index<__expected.length; index++) {\n\tif (__executed[index] !== __expected[index]) {\n\t\t$ERROR('#4: __executed = /<body.*>((.*\\\\n?)*?)<\\\\/body>/i.exec(__html); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]);\n\t}\n}\n\n",
+ "id": "S15.10.2.8_A3_T17"
+ },
+ {
+ "section": "15.10.2.8",
+ "description": "see bug http:bugzilla.mozilla.org/show_bug.cgi?id=169534",
+ "test": "__replaced = \"To sign up click |here|https:www.xxxx.org/subscribe.htm|\".replace(/(\\|)([\\w\\x81-\\xff ]*)(\\|)([\\/a-z][\\w:\\/\\.]*\\.[a-z]{3,4})(\\|)/ig, '<a href=\"$4\">$2</a>');\n\n__expected = 'To sign up click <a href=\"https:www.xxxx.org/subscribe.htm\">here</a>';\n\n//CHECK#1\nif (__replaced !== __expected) {\n\t$ERROR('#1: __replaced = \"To sign up click |here|https:www.xxxx.org/subscribe.htm|\".replace(/(\\\\|)([\\\\w\\\\x81-\\\\xff ]*)(\\\\|)([\\\\/a-z][\\\\w:\\\\/\\\\.]*\\\\.[a-z]{3,4})(\\\\|)/ig, \\'<a href=\"$4\">$2</a>\\'); __replaced === ' + __expected + '. Actual: ' + __replaced);\n}\n\n",
+ "id": "S15.10.2.8_A3_T18"
+ },
+ {
+ "section": "15.10.2.8",
+ "description": "Execute /([\\S]+([ \\t]+[\\S]+)*)[ \\t]*=[ \\t]*[\\S]+/.exec(\"Course_Creator = Test\") and check results",
+ "test": "__executed = /([\\S]+([ \\t]+[\\S]+)*)[ \\t]*=[ \\t]*[\\S]+/.exec(\"Course_Creator = Test\");\n\n__expected = [\"Course_Creator = Test\",\"Course_Creator\",undefined];\n__expected.index = 0;\n__expected.input = \"Course_Creator = Test\";\n\n//CHECK#1\nif (__executed.length !== __expected.length) {\n\t$ERROR('#1: __executed = /([\\\\S]+([ \\\\t]+[\\\\S]+)*)[ \\\\t]*=[ \\\\t]*[\\\\S]+/.exec(\"Course_Creator = Test\"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length);\n}\n\n//CHECK#2\nif (__executed.index !== __expected.index) {\n\t$ERROR('#2: __executed = /([\\\\S]+([ \\\\t]+[\\\\S]+)*)[ \\\\t]*=[ \\\\t]*[\\\\S]+/.exec(\"Course_Creator = Test\"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index);\n}\n\n//CHECK#3\nif (__executed.input !== __expected.input) {\n\t$ERROR('#3: __executed = /([\\\\S]+([ \\\\t]+[\\\\S]+)*)[ \\\\t]*=[ \\\\t]*[\\\\S]+/.exec(\"Course_Creator = Test\"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input);\n}\n\n//CHECK#4\nfor(var index=0; index<__expected.length; index++) {\n\tif (__executed[index] !== __expected[index]) {\n\t\t$ERROR('#4: __executed = /([\\\\S]+([ \\\\t]+[\\\\S]+)*)[ \\\\t]*=[ \\\\t]*[\\\\S]+/.exec(\"Course_Creator = Test\"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]);\n\t}\n}\n\n",
+ "id": "S15.10.2.8_A3_T19"
+ },
+ {
+ "section": "15.10.2.8",
+ "description": "Execute /([Jj]ava([Ss]cript)?)\\sis\\s(fun\\w*)/.exec(\"Developing with Java is fun, try it\") and check results",
+ "test": "__executed = /([Jj]ava([Ss]cript)?)\\sis\\s(fun\\w*)/.exec(\"Developing with Java is fun, try it\");\n\n__expected = [\"Java is fun\",\"Java\",undefined,\"fun\"];\n__expected.index = 16;\n__expected.input = \"Developing with Java is fun, try it\";\n\n//CHECK#1\nif (__executed.length !== __expected.length) {\n\t$ERROR('#1: __executed = /([Jj]ava([Ss]cript)?)\\\\sis\\\\s(fun\\\\w*)/.exec(\"Developing with Java is fun, try it\"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length);\n}\n\n//CHECK#2\nif (__executed.index !== __expected.index) {\n\t$ERROR('#2: __executed = /([Jj]ava([Ss]cript)?)\\\\sis\\\\s(fun\\\\w*)/.exec(\"Developing with Java is fun, try it\"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index);\n}\n\n//CHECK#3\nif (__executed.input !== __expected.input) {\n\t$ERROR('#3: __executed = /([Jj]ava([Ss]cript)?)\\\\sis\\\\s(fun\\\\w*)/.exec(\"Developing with Java is fun, try it\"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input);\n}\n\n//CHECK#4\nfor(var index=0; index<__expected.length; index++) {\n\tif (__executed[index] !== __expected[index]) {\n\t\t$ERROR('#4: __executed = /([Jj]ava([Ss]cript)?)\\\\sis\\\\s(fun\\\\w*)/.exec(\"Developing with Java is fun, try it\"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]);\n\t}\n}\n\n",
+ "id": "S15.10.2.8_A3_T2"
+ },
+ {
+ "section": "15.10.2.8",
+ "description": "Execute /^(A)?(A.*)$/.exec(\"AAA\") and check results",
+ "test": "__executed = /^(A)?(A.*)$/.exec(\"AAA\");\n\n__expected = [\"AAA\",\"A\",\"AA\"];\n__expected.index = 0;\n__expected.input = \"AAA\";\n\n//CHECK#1\nif (__executed.length !== __expected.length) {\n\t$ERROR('#1: __executed = /^(A)?(A.*)$/.exec(\"AAA\"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length);\n}\n\n//CHECK#2\nif (__executed.index !== __expected.index) {\n\t$ERROR('#2: __executed = /^(A)?(A.*)$/.exec(\"AAA\"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index);\n}\n\n//CHECK#3\nif (__executed.input !== __expected.input) {\n\t$ERROR('#3: __executed = /^(A)?(A.*)$/.exec(\"AAA\"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input);\n}\n\n//CHECK#4\nfor(var index=0; index<__expected.length; index++) {\n\tif (__executed[index] !== __expected[index]) {\n\t\t$ERROR('#4: __executed = /^(A)?(A.*)$/.exec(\"AAA\"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]);\n\t}\n}\n\n",
+ "id": "S15.10.2.8_A3_T20"
+ },
+ {
+ "section": "15.10.2.8",
+ "description": "Execute /^(A)?(A.*)$/.exec(\"AA\") and check results",
+ "test": "__executed = /^(A)?(A.*)$/.exec(\"AA\");\n\n__expected = [\"AA\",\"A\",\"A\"];\n__expected.index = 0;\n__expected.input = \"AA\";\n\n//CHECK#1\nif (__executed.length !== __expected.length) {\n\t$ERROR('#1: __executed = /^(A)?(A.*)$/.exec(\"AA\"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length);\n}\n\n//CHECK#2\nif (__executed.index !== __expected.index) {\n\t$ERROR('#2: __executed = /^(A)?(A.*)$/.exec(\"AA\"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index);\n}\n\n//CHECK#3\nif (__executed.input !== __expected.input) {\n\t$ERROR('#3: __executed = /^(A)?(A.*)$/.exec(\"AA\"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input);\n}\n\n//CHECK#4\nfor(var index=0; index<__expected.length; index++) {\n\tif (__executed[index] !== __expected[index]) {\n\t\t$ERROR('#4: __executed = /^(A)?(A.*)$/.exec(\"AA\"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]);\n\t}\n}\n\n",
+ "id": "S15.10.2.8_A3_T21"
+ },
+ {
+ "section": "15.10.2.8",
+ "description": "Execute /^(A)?(A.*)$/.exec(\"A\") and check results",
+ "test": "__executed = /^(A)?(A.*)$/.exec(\"A\");\n\n__expected = [\"A\",undefined,\"A\"];\n__expected.index = 0;\n__expected.input = \"A\";\n\n//CHECK#1\nif (__executed.length !== __expected.length) {\n\t$ERROR('#1: __executed = /^(A)?(A.*)$/.exec(\"A\"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length);\n}\n\n//CHECK#2\nif (__executed.index !== __expected.index) {\n\t$ERROR('#2: __executed = /^(A)?(A.*)$/.exec(\"A\"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index);\n}\n\n//CHECK#3\nif (__executed.input !== __expected.input) {\n\t$ERROR('#3: __executed = /^(A)?(A.*)$/.exec(\"A\"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input);\n}\n\n//CHECK#4\nfor(var index=0; index<__expected.length; index++) {\n\tif (__executed[index] !== __expected[index]) {\n\t\t$ERROR('#4: __executed = /^(A)?(A.*)$/.exec(\"A\"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]);\n\t}\n}\n\n",
+ "id": "S15.10.2.8_A3_T22"
+ },
+ {
+ "section": "15.10.2.8",
+ "description": ": Execute /(A)?(A.*)/.exec(\"zxcasd;fl\\\\\\ ^AAAaaAAaaaf;lrlrzs\") and check results;",
+ "test": "__string = \"zxcasd;fl\\\\\\ ^AAAaaAAaaaf;lrlrzs\";\n\n__executed = /(A)?(A.*)/.exec(__string);\n\n__expected = [\"AAAaaAAaaaf;lrlrzs\",\"A\",\"AAaaAAaaaf;lrlrzs\"];\n__expected.index = 13;\n__expected.input = __string;\n\n//CHECK#1\nif (__executed.length !== __expected.length) {\n\t$ERROR('#1: __string = \"zxcasd;fl\\\\\\ ^AAAaaAAaaaf;lrlrzs\"; __executed = /(A)?(A.*)/.exec(__string); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length);\n}\n\n//CHECK#2\nif (__executed.index !== __expected.index) {\n\t$ERROR('#2: __string = \"zxcasd;fl\\\\\\ ^AAAaaAAaaaf;lrlrzs\"; __executed = /(A)?(A.*)/.exec(__string); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index);\n}\n\n//CHECK#3\nif (__executed.input !== __expected.input) {\n\t$ERROR('#3: __string = \"zxcasd;fl\\\\\\ ^AAAaaAAaaaf;lrlrzs\"; __executed = /(A)?(A.*)/.exec(__string); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input);\n}\n\n//CHECK#4\nfor(var index=0; index<__expected.length; index++) {\n\tif (__executed[index] !== __expected[index]) {\n\t\t$ERROR('#4: __string = \"zxcasd;fl\\\\\\ ^AAAaaAAaaaf;lrlrzs\"; __executed = /(A)?(A.*)/.exec(__string); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]);\n\t}\n}\n\n",
+ "id": "S15.10.2.8_A3_T23"
+ },
+ {
+ "section": "15.10.2.8",
+ "description": ": Execute /(A)?(A.*)/.exec(\"zxcasd;fl\\\\\\ ^AAaaAAaaaf;lrlrzs\") and check results;",
+ "test": "__string = \"zxcasd;fl\\\\\\ ^AAaaAAaaaf;lrlrzs\";\n\n__executed = /(A)?(A.*)/.exec(__string);\n\n__expected = [\"AAaaAAaaaf;lrlrzs\",\"A\",\"AaaAAaaaf;lrlrzs\"];\n__expected.index = 13;\n__expected.input = __string;\n\n//CHECK#1\nif (__executed.length !== __expected.length) {\n\t$ERROR('#1: __string = \"zxcasd;fl\\\\\\ ^AAaaAAaaaf;lrlrzs\"; __executed = /(A)?(A.*)/.exec(__string); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length);\n}\n\n//CHECK#2\nif (__executed.index !== __expected.index) {\n\t$ERROR('#2: __string = \"zxcasd;fl\\\\\\ ^AAaaAAaaaf;lrlrzs\"; __executed = /(A)?(A.*)/.exec(__string); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index);\n}\n\n//CHECK#3\nif (__executed.input !== __expected.input) {\n\t$ERROR('#3: __string = \"zxcasd;fl\\\\\\ ^AAaaAAaaaf;lrlrzs\"; __executed = /(A)?(A.*)/.exec(__string); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input);\n}\n\n//CHECK#4\nfor(var index=0; index<__expected.length; index++) {\n\tif (__executed[index] !== __expected[index]) {\n\t\t$ERROR('#4: __string = \"zxcasd;fl\\\\\\ ^AAaaAAaaaf;lrlrzs\"; __executed = /(A)?(A.*)/.exec(__string); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]);\n\t}\n}\n\n",
+ "id": "S15.10.2.8_A3_T24"
+ },
+ {
+ "section": "15.10.2.8",
+ "description": ": Execute /(A)?(A.*)/.exec(\"zxcasd;fl\\\\\\ ^AaaAAaaaf;lrlrzs\") and check results;",
+ "test": "__string = \"zxcasd;fl\\\\\\ ^AaaAAaaaf;lrlrzs\";\n\n__executed = /(A)?(A.*)/.exec(__string);\n\n__expected = [\"AaaAAaaaf;lrlrzs\",undefined,\"AaaAAaaaf;lrlrzs\"];\n__expected.index = 13;\n__expected.input = __string;\n\n//CHECK#1\nif (__executed.length !== __expected.length) {\n\t$ERROR('#1: __string = \"zxcasd;fl\\\\\\ ^AaaAAaaaf;lrlrzs\"; __executed = /(A)?(A.*)/.exec(__string); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length);\n}\n\n//CHECK#2\nif (__executed.index !== __expected.index) {\n\t$ERROR('#2: __string = \"zxcasd;fl\\\\\\ ^AaaAAaaaf;lrlrzs\"; __executed = /(A)?(A.*)/.exec(__string); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index);\n}\n\n//CHECK#3\nif (__executed.input !== __expected.input) {\n\t$ERROR('#3: __string = \"zxcasd;fl\\\\\\ ^AaaAAaaaf;lrlrzs\"; __executed = /(A)?(A.*)/.exec(__string); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input);\n}\n\n//CHECK#4\nfor(var index=0; index<__expected.length; index++) {\n\tif (__executed[index] !== __expected[index]) {\n\t\t$ERROR('#4: __string = \"zxcasd;fl\\\\\\ ^AaaAAaaaf;lrlrzs\"; __executed = /(A)?(A.*)/.exec(__string); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]);\n\t}\n}\n\n",
+ "id": "S15.10.2.8_A3_T25"
+ },
+ {
+ "section": "15.10.2.8",
+ "description": "Execute /(a)?a/.exec(\"a\") and check results",
+ "test": "__string = \"a\";\n\n__executed = /(a)?a/.exec(__string);\n\n__expected = [\"a\",undefined];\n__expected.index = 0;\n__expected.input = __string;\n\n//CHECK#1\nif (__executed.length !== __expected.length) {\n\t$ERROR('#1: __string = \"a\"; __executed = /(a)?a/.exec(__string); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length);\n}\n\n//CHECK#2\nif (__executed.index !== __expected.index) {\n\t$ERROR('#2: __string = \"a\"; __executed = /(a)?a/.exec(__string); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index);\n}\n\n//CHECK#3\nif (__executed.input !== __expected.input) {\n\t$ERROR('#3: __string = \"a\"; __executed = /(a)?a/.exec(__string); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input);\n}\n\n//CHECK#4\nfor(var index=0; index<__expected.length; index++) {\n\tif (__executed[index] !== __expected[index]) {\n\t\t$ERROR('#4: __string = \"a\"; __executed = /(a)?a/.exec(__string); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]);\n\t}\n}\n\n",
+ "id": "S15.10.2.8_A3_T26"
+ },
+ {
+ "section": "15.10.2.8",
+ "description": "Execute /a|(b)/.exec(\"a\") and check results",
+ "test": "__string = \"a\";\n\n__executed = /a|(b)/.exec(__string);\n\n__expected = [\"a\",undefined];\n__expected.index = 0;\n__expected.input = __string;\n\n//CHECK#1\nif (__executed.length !== __expected.length) {\n\t$ERROR('#1: __string = \"a\"; __executed = /a|(b)/.exec(__string); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length);\n}\n\n//CHECK#2\nif (__executed.index !== __expected.index) {\n\t$ERROR('#2: __string = \"a\"; __executed = /a|(b)/.exec(__string); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index);\n}\n\n//CHECK#3\nif (__executed.input !== __expected.input) {\n\t$ERROR('#3: __string = \"a\"; __executed = /a|(b)/.exec(__string); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input);\n}\n\n//CHECK#4\nfor(var index=0; index<__expected.length; index++) {\n\tif (__executed[index] !== __expected[index]) {\n\t\t$ERROR('#4: __string = \"a\"; __executed = /a|(b)/.exec(__string); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]);\n\t}\n}\n\n",
+ "id": "S15.10.2.8_A3_T27"
+ },
+ {
+ "section": "15.10.2.8",
+ "description": "Execute /(a)?(a)/.exec(\"a\") and check results",
+ "test": "__string = \"a\";\n\n__executed = /(a)?(a)/.exec(__string);\n\n__expected = ['a', undefined, 'a'];\n__expected.index = 0;\n__expected.input = __string;\n\n//CHECK#1\nif (__executed.length !== __expected.length) {\n\t$ERROR('#1: __string = \"a\"; __executed = /(a)?(a)/.exec(__string); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length);\n}\n\n//CHECK#2\nif (__executed.index !== __expected.index) {\n\t$ERROR('#2: __string = \"a\"; __executed = /(a)?(a)/.exec(__string); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index);\n}\n\n//CHECK#3\nif (__executed.input !== __expected.input) {\n\t$ERROR('#3: __string = \"a\"; __executed = /(a)?(a)/.exec(__string); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input);\n}\n\n//CHECK#4\nfor(var index=0; index<__expected.length; index++) {\n\tif (__executed[index] !== __expected[index]) {\n\t\t$ERROR('#4: __string = \"a\"; __executed = /(a)?(a)/.exec(__string); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]);\n\t}\n}\n\n",
+ "id": "S15.10.2.8_A3_T28"
+ },
+ {
+ "section": "15.10.2.8",
+ "description": "See bug http:bugzilla.mozilla.org/show_bug.cgi?id=165353",
+ "test": "__string = \"a\";\n\n__executed = /^([a-z]+)*[a-z]$/.exec(__string);\n\n__expected = ['a', undefined];\n__expected.index = 0;\n__expected.input = __string;\n\n//CHECK#1\nif (__executed.length !== __expected.length) {\n\t$ERROR('#1: __string = \"a\"; __executed = /^([a-z]+)*[a-z]$/.exec(__string); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length);\n}\n\n//CHECK#2\nif (__executed.index !== __expected.index) {\n\t$ERROR('#2: __string = \"a\"; __executed = /^([a-z]+)*[a-z]$/.exec(__string); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index);\n}\n\n//CHECK#3\nif (__executed.input !== __expected.input) {\n\t$ERROR('#3: __string = \"a\"; __executed = /^([a-z]+)*[a-z]$/.exec(__string); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input);\n}\n\n//CHECK#4\nfor(var index=0; index<__expected.length; index++) {\n\tif (__executed[index] !== __expected[index]) {\n\t\t$ERROR('#4: __string = \"a\"; __executed = /^([a-z]+)*[a-z]$/.exec(__string); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]);\n\t}\n}\n\n",
+ "id": "S15.10.2.8_A3_T29"
+ },
+ {
+ "section": "15.10.2.8",
+ "description": "Execute /([Jj]ava([Ss]cript)?)\\sis\\s(fun\\w*)/.test(\"Developing with JavaScript is dangerous, do not try it without assistance\") and check results",
+ "test": "__executed = /([Jj]ava([Ss]cript)?)\\sis\\s(fun\\w*)/.test(\"Developing with JavaScript is dangerous, do not try it without assistance\");\n\n//CHECK#1\nif (__executed) {\n\t$ERROR('#1: /([Jj]ava([Ss]cript)?)\\\\sis\\\\s(fun\\\\w*)/.test(\"Developing with JavaScript is dangerous, do not try it without assistance\") === false');\n}\n\n",
+ "id": "S15.10.2.8_A3_T3"
+ },
+ {
+ "section": "15.10.2.8",
+ "description": "See bug http:bugzilla.mozilla.org/show_bug.cgi?id=165353",
+ "test": "__string = \"ab\";\n\n__executed = /^([a-z]+)*[a-z]$/.exec(__string);\n\n__expected = ['ab', \"a\"];\n__expected.index = 0;\n__expected.input = __string;\n\n//CHECK#1\nif (__executed.length !== __expected.length) {\n\t$ERROR('#1: __string = \"ab\"; __executed = /^([a-z]+)*[a-z]$/.exec(__string); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length);\n}\n\n//CHECK#2\nif (__executed.index !== __expected.index) {\n\t$ERROR('#2: __string = \"ab\"; __executed = /^([a-z]+)*[a-z]$/.exec(__string); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index);\n}\n\n//CHECK#3\nif (__executed.input !== __expected.input) {\n\t$ERROR('#3: __string = \"ab\"; __executed = /^([a-z]+)*[a-z]$/.exec(__string); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input);\n}\n\n//CHECK#4\nfor(var index=0; index<__expected.length; index++) {\n\tif (__executed[index] !== __expected[index]) {\n\t\t$ERROR('#4: __string = \"ab\"; __executed = /^([a-z]+)*[a-z]$/.exec(__string); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]);\n\t}\n}\n\n",
+ "id": "S15.10.2.8_A3_T30"
+ },
+ {
+ "section": "15.10.2.8",
+ "description": "See bug http:bugzilla.mozilla.org/show_bug.cgi?id=165353",
+ "test": "__string = \"abc\";\n\n__executed = /^([a-z]+)*[a-z]$/.exec(__string);\n\n__expected = ['abc', \"ab\"];\n__expected.index = 0;\n__expected.input = __string;\n\n//CHECK#1\nif (__executed.length !== __expected.length) {\n\t$ERROR('#1: __string = \"abc\"; __executed = /^([a-z]+)*[a-z]$/.exec(__string); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length);\n}\n\n//CHECK#2\nif (__executed.index !== __expected.index) {\n\t$ERROR('#2: __string = \"abc\"; __executed = /^([a-z]+)*[a-z]$/.exec(__string); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index);\n}\n\n//CHECK#3\nif (__executed.input !== __expected.input) {\n\t$ERROR('#3: __string = \"abc\"; __executed = /^([a-z]+)*[a-z]$/.exec(__string); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input);\n}\n\n//CHECK#4\nfor(var index=0; index<__expected.length; index++) {\n\tif (__executed[index] !== __expected[index]) {\n\t\t$ERROR('#4: __string = \"abc\"; __executed = /^([a-z]+)*[a-z]$/.exec(__string); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]);\n\t}\n}\n\n",
+ "id": "S15.10.2.8_A3_T31"
+ },
+ {
+ "section": "15.10.2.8",
+ "description": "See bug http:bugzilla.mozilla.org/show_bug.cgi?id=165353",
+ "test": "__string = \"www.netscape.com\";\n\n__executed = /^(([a-z]+)*[a-z]\\.)+[a-z]{2,}$/.exec(__string);\n\n__expected = ['www.netscape.com', 'netscape.', 'netscap'];\n__expected.index = 0;\n__expected.input = __string;\n\n//CHECK#1\nif (__executed.length !== __expected.length) {\n\t$ERROR('#1: __string = \"www.netscape.com\"; __executed = /^(([a-z]+)*[a-z]\\\\.)+[a-z]{2,}$/.exec(__string); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length);\n}\n\n//CHECK#2\nif (__executed.index !== __expected.index) {\n\t$ERROR('#2: __string = \"www.netscape.com\"; __executed = /^(([a-z]+)*[a-z]\\\\.)+[a-z]{2,}$/.exec(__string); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index);\n}\n\n//CHECK#3\nif (__executed.input !== __expected.input) {\n\t$ERROR('#3: __string = \"www.netscape.com\"; __executed = /^(([a-z]+)*[a-z]\\\\.)+[a-z]{2,}$/.exec(__string); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input);\n}\n\n//CHECK#4\nfor(var index=0; index<__expected.length; index++) {\n\tif (__executed[index] !== __expected[index]) {\n\t\t$ERROR('#4: __string = \"www.netscape.com\"; __executed = /^(([a-z]+)*[a-z]\\\\.)+[a-z]{2,}$/.exec(__string); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]);\n\t}\n}\n\n",
+ "id": "S15.10.2.8_A3_T32"
+ },
+ {
+ "section": "15.10.2.8",
+ "description": "See bug http:bugzilla.mozilla.org/show_bug.cgi?id=165353",
+ "test": "__string = \"www.netscape.com\";\n\n__executed = /^(([a-z]+)*([a-z])\\.)+[a-z]{2,}$/.exec(__string);\n\n__expected = ['www.netscape.com', 'netscape.', 'netscap', 'e'];\n__expected.index = 0;\n__expected.input = __string;\n\n//CHECK#1\nif (__executed.length !== __expected.length) {\n\t$ERROR('#1: __string = \"www.netscape.com\"; __executed = /^(([a-z]+)*([a-z])\\\\.)+[a-z]{2,}$/.exec(__string); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length);\n}\n\n//CHECK#2\nif (__executed.index !== __expected.index) {\n\t$ERROR('#2: __string = \"www.netscape.com\"; __executed = /^(([a-z]+)*([a-z])\\\\.)+[a-z]{2,}$/.exec(__string); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index);\n}\n\n//CHECK#3\nif (__executed.input !== __expected.input) {\n\t$ERROR('#3: __string = \"www.netscape.com\"; __executed = /^(([a-z]+)*([a-z])\\\\.)+[a-z]{2,}$/.exec(__string); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input);\n}\n\n//CHECK#4\nfor(var index=0; index<__expected.length; index++) {\n\tif (__executed[index] !== __expected[index]) {\n\t\t$ERROR('#4: __string = \"www.netscape.com\"; __executed = /^(([a-z]+)*([a-z])\\\\.)+[a-z]{2,}$/.exec(__string); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]);\n\t}\n}\n\n",
+ "id": "S15.10.2.8_A3_T33"
+ },
+ {
+ "section": "15.10.2.8",
+ "description": "Execute /(abc)/.exec(\"abc\") and check results",
+ "test": "__executed = /(abc)/.exec(\"abc\");\n\n__expected = [\"abc\",\"abc\"];\n__expected.index = 0;\n__expected.input = \"abc\";\n\n//CHECK#1\nif (__executed.length !== __expected.length) {\n\t$ERROR('#1: __executed = /(abc)/.exec(\"abc\"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length);\n}\n\n//CHECK#2\nif (__executed.index !== __expected.index) {\n\t$ERROR('#2: __executed = /(abc)/.exec(\"abc\"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index);\n}\n\n//CHECK#3\nif (__executed.input !== __expected.input) {\n\t$ERROR('#3: __executed = /(abc)/.exec(\"abc\"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input);\n}\n\n//CHECK#4\nfor(var index=0; index<__expected.length; index++) {\n\tif (__executed[index] !== __expected[index]) {\n\t\t$ERROR('#4: __executed = /(abc)/.exec(\"abc\"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]);\n\t}\n}\n\n",
+ "id": "S15.10.2.8_A3_T4"
+ },
+ {
+ "section": "15.10.2.8",
+ "description": "Execute /a(bc)d(ef)g/.exec(\"abcdefg\") and check results",
+ "test": "__executed = /a(bc)d(ef)g/.exec(\"abcdefg\");\n\n__expected = [\"abcdefg\",\"bc\",\"ef\"];\n__expected.index = 0;\n__expected.input = \"abcdefg\";\n\n//CHECK#1\nif (__executed.length !== __expected.length) {\n\t$ERROR('#1: __executed = /a(bc)d(ef)g/.exec(\"abcdefg\"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length);\n}\n\n//CHECK#2\nif (__executed.index !== __expected.index) {\n\t$ERROR('#2: __executed = /a(bc)d(ef)g/.exec(\"abcdefg\"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index);\n}\n\n//CHECK#3\nif (__executed.input !== __expected.input) {\n\t$ERROR('#3: __executed = /a(bc)d(ef)g/.exec(\"abcdefg\"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input);\n}\n\n//CHECK#4\nfor(var index=0; index<__expected.length; index++) {\n\tif (__executed[index] !== __expected[index]) {\n\t\t$ERROR('#4: __executed = /a(bc)d(ef)g/.exec(\"abcdefg\"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]);\n\t}\n}\n\n",
+ "id": "S15.10.2.8_A3_T5"
+ },
+ {
+ "section": "15.10.2.8",
+ "description": "Execute /(.{3})(.{4})/.exec(\"abcdefgh\") and check results",
+ "test": "__executed = /(.{3})(.{4})/.exec(\"abcdefgh\");\n\n__expected = [\"abcdefg\",\"abc\",\"defg\"];\n__expected.index = 0;\n__expected.input = \"abcdefgh\";\n\n//CHECK#1\nif (__executed.length !== __expected.length) {\n\t$ERROR('#1: __executed = /(.{3})(.{4})/.exec(\"abcdefgh\"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length);\n}\n\n//CHECK#2\nif (__executed.index !== __expected.index) {\n\t$ERROR('#2: __executed = /(.{3})(.{4})/.exec(\"abcdefgh\"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index);\n}\n\n//CHECK#3\nif (__executed.input !== __expected.input) {\n\t$ERROR('#3: __executed = /(.{3})(.{4})/.exec(\"abcdefgh\"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input);\n}\n\n//CHECK#4\nfor(var index=0; index<__expected.length; index++) {\n\tif (__executed[index] !== __expected[index]) {\n\t\t$ERROR('#4: __executed = /(.{3})(.{4})/.exec(\"abcdefgh\"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]);\n\t}\n}\n\n",
+ "id": "S15.10.2.8_A3_T6"
+ },
+ {
+ "section": "15.10.2.8",
+ "description": "Execute /(aa)bcd\\1/.exec(\"aabcdaabcd\") and check results",
+ "test": "__executed = /(aa)bcd\\1/.exec(\"aabcdaabcd\");\n\n__expected = [\"aabcdaa\",\"aa\"];\n__expected.index = 0;\n__expected.input = \"aabcdaabcd\";\n\n//CHECK#1\nif (__executed.length !== __expected.length) {\n\t$ERROR('#1: __executed = /(aa)bcd\\\\1/.exec(\"aabcdaabcd\"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length);\n}\n\n//CHECK#2\nif (__executed.index !== __expected.index) {\n\t$ERROR('#2: __executed = /(aa)bcd\\\\1/.exec(\"aabcdaabcd\"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index);\n}\n\n//CHECK#3\nif (__executed.input !== __expected.input) {\n\t$ERROR('#3: __executed = /(aa)bcd\\\\1/.exec(\"aabcdaabcd\"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input);\n}\n\n//CHECK#4\nfor(var index=0; index<__expected.length; index++) {\n\tif (__executed[index] !== __expected[index]) {\n\t\t$ERROR('#4: __executed = /(aa)bcd\\\\1/.exec(\"aabcdaabcd\"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]);\n\t}\n}\n\n",
+ "id": "S15.10.2.8_A3_T7"
+ },
+ {
+ "section": "15.10.2.8",
+ "description": "Execute /(aa).+\\1/.exec(\"aabcdaabcd\") and check results",
+ "test": "__executed = /(aa).+\\1/.exec(\"aabcdaabcd\");\n\n__expected = [\"aabcdaa\",\"aa\"];\n__expected.index = 0;\n__expected.input = \"aabcdaabcd\";\n\n//CHECK#1\nif (__executed.length !== __expected.length) {\n\t$ERROR('#1: __executed = /(aa).+\\\\1/.exec(\"aabcdaabcd\"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length);\n}\n\n//CHECK#2\nif (__executed.index !== __expected.index) {\n\t$ERROR('#2: __executed = /(aa).+\\\\1/.exec(\"aabcdaabcd\"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index);\n}\n\n//CHECK#3\nif (__executed.input !== __expected.input) {\n\t$ERROR('#3: __executed = /(aa).+\\\\1/.exec(\"aabcdaabcd\"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input);\n}\n\n//CHECK#4\nfor(var index=0; index<__expected.length; index++) {\n\tif (__executed[index] !== __expected[index]) {\n\t\t$ERROR('#4: __executed = /(aa).+\\\\1/.exec(\"aabcdaabcd\"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]);\n\t}\n}\n\n",
+ "id": "S15.10.2.8_A3_T8"
+ },
+ {
+ "section": "15.10.2.8",
+ "description": "Execute /(.{2}).+\\1/.exec(\"aabcdaabcd\") and check results",
+ "test": "__executed = /(.{2}).+\\1/.exec(\"aabcdaabcd\");\n\n__expected = [\"aabcdaa\",\"aa\"];\n__expected.index = 0;\n__expected.input = \"aabcdaabcd\";\n\n//CHECK#1\nif (__executed.length !== __expected.length) {\n\t$ERROR('#1: __executed = /(.{2}).+\\\\1/.exec(\"aabcdaabcd\"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length);\n}\n\n//CHECK#2\nif (__executed.index !== __expected.index) {\n\t$ERROR('#2: __executed = /(.{2}).+\\\\1/.exec(\"aabcdaabcd\"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index);\n}\n\n//CHECK#3\nif (__executed.input !== __expected.input) {\n\t$ERROR('#3: __executed = /(.{2}).+\\\\1/.exec(\"aabcdaabcd\"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input);\n}\n\n//CHECK#4\nfor(var index=0; index<__expected.length; index++) {\n\tif (__executed[index] !== __expected[index]) {\n\t\t$ERROR('#4: __executed = /(.{2}).+\\\\1/.exec(\"aabcdaabcd\"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]);\n\t}\n}\n\n",
+ "id": "S15.10.2.8_A3_T9"
+ },
+ {
+ "section": "15.10.2.8",
+ "description": "Execute /ab.de/.exec(\"abcde\") and check results",
+ "test": "__string = \"abcde\";\n__executed = /ab.de/.exec(__string);\n\n__expected = [\"abcde\"];\n__expected.index = 0;\n__expected.input = __string;\n\n//CHECK#1\nif (__executed.length !== __expected.length) {\n\t$ERROR('#1: __string = \"abcde\"; __executed = /ab.de/.exec(__string); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length);\n}\n\n//CHECK#2\nif (__executed.index !== __expected.index) {\n\t$ERROR('#2: __string = \"abcde\"; __executed = /ab.de/.exec(__string); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index);\n}\n\n//CHECK#3\nif (__executed.input !== __expected.input) {\n\t$ERROR('#3: __string = \"abcde\"; __executed = /ab.de/.exec(__string); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input);\n}\n\n//CHECK#4\nfor(var index=0; index<__expected.length; index++) {\n\tif (__executed[index] !== __expected[index]) {\n\t\t$ERROR('#4: __string = \"abcde\"; __executed = /ab.de/.exec(__string); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]);\n\t}\n}\n\n",
+ "id": "S15.10.2.8_A4_T1"
+ },
+ {
+ "section": "15.10.2.8",
+ "description": "Execute /.+/.exec(\"line 1\\nline 2\") and check results",
+ "test": "__string = \"line 1\\nline 2\";\n__executed = /.+/.exec(__string);\n\n__expected = [\"line 1\"];\n__expected.index = 0;\n__expected.input = __string;\n\n//CHECK#1\nif (__executed.length !== __expected.length) {\n\t$ERROR('#1: __string = \"line 1\\nline 2\"; __executed = /.+/.exec(__string); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length);\n}\n\n//CHECK#2\nif (__executed.index !== __expected.index) {\n\t$ERROR('#2: __string = \"line 1\\nline 2\"; __executed = /.+/.exec(__string); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index);\n}\n\n//CHECK#3\nif (__executed.input !== __expected.input) {\n\t$ERROR('#3: __string = \"line 1\\nline 2\"; __executed = /.+/.exec(__string); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input);\n}\n\n//CHECK#4\nfor(var index=0; index<__expected.length; index++) {\n\tif (__executed[index] !== __expected[index]) {\n\t\t$ERROR('#4: __string = \"line 1\\nline 2\"; __executed = /.+/.exec(__string); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]);\n\t}\n}\n\n",
+ "id": "S15.10.2.8_A4_T2"
+ },
+ {
+ "section": "15.10.2.8",
+ "description": "Execute /.*a.* /.exec(\"this is a test\") and check results",
+ "test": "__string = \"this is a test\";\n__executed = /.*a.*/.exec(__string);\n\n__expected = [\"this is a test\"];\n__expected.index = 0;\n__expected.input = __string;\n\n//CHECK#1\nif (__executed.length !== __expected.length) {\n\t$ERROR('#1: __string = \"this is a test\"; __executed = /.*a.*/.exec(__string); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length);\n}\n\n//CHECK#2\nif (__executed.index !== __expected.index) {\n\t$ERROR('#2: __string = \"this is a test\"; __executed = /.*a.*/.exec(__string); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index);\n}\n\n//CHECK#3\nif (__executed.input !== __expected.input) {\n\t$ERROR('#3: __string = \"this is a test\"; __executed = /.*a.*/.exec(__string); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input);\n}\n\n//CHECK#4\nfor(var index=0; index<__expected.length; index++) {\n\tif (__executed[index] !== __expected[index]) {\n\t\t$ERROR('#4: __string = \"this is a test\"; __executed = /.*a.*/.exec(__string); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]);\n\t}\n}\n\n",
+ "id": "S15.10.2.8_A4_T3"
+ },
+ {
+ "section": "15.10.2.8",
+ "description": "Execute /.+/.exec(\"this is a *&^%$# test\") and check results",
+ "test": "__string = \"this is a *&^%$# test\";\n__executed = /.+/.exec(__string);\n\n__expected = [\"this is a *&^%$# test\"];\n__expected.index = 0;\n__expected.input = __string;\n\n//CHECK#1\nif (__executed.length !== __expected.length) {\n\t$ERROR('#1: __string = \"this is a *&^%$# test\"; __executed = /.+/.exec(__string); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length);\n}\n\n//CHECK#2\nif (__executed.index !== __expected.index) {\n\t$ERROR('#2: __string = \"this is a *&^%$# test\"; __executed = /.+/.exec(__string); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index);\n}\n\n//CHECK#3\nif (__executed.input !== __expected.input) {\n\t$ERROR('#3: __string = \"this is a *&^%$# test\"; __executed = /.+/.exec(__string); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input);\n}\n\n//CHECK#4\nfor(var index=0; index<__expected.length; index++) {\n\tif (__executed[index] !== __expected[index]) {\n\t\t$ERROR('#4: __string = \"this is a *&^%$# test\"; __executed = /.+/.exec(__string); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]);\n\t}\n}\n\n",
+ "id": "S15.10.2.8_A4_T4"
+ },
+ {
+ "section": "15.10.2.8",
+ "description": "Execute /.+/.exec(\"....\") and check results",
+ "test": "__string = \"....\";\n__executed = /.+/.exec(__string);\n\n__expected = [\"....\"];\n__expected.index = 0;\n__expected.input = __string;\n\n//CHECK#1\nif (__executed.length !== __expected.length) {\n\t$ERROR('#1: __string = \"....\"; __executed = /.+/.exec(__string); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length);\n}\n\n//CHECK#2\nif (__executed.index !== __expected.index) {\n\t$ERROR('#2: __string = \"....\"; __executed = /.+/.exec(__string); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index);\n}\n\n//CHECK#3\nif (__executed.input !== __expected.input) {\n\t$ERROR('#3: __string = \"....\"; __executed = /.+/.exec(__string); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input);\n}\n\n//CHECK#4\nfor(var index=0; index<__expected.length; index++) {\n\tif (__executed[index] !== __expected[index]) {\n\t\t$ERROR('#4: __string = \"....\"; __executed = /.+/.exec(__string); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]);\n\t}\n}\n\n",
+ "id": "S15.10.2.8_A4_T5"
+ },
+ {
+ "section": "15.10.2.8",
+ "description": "Execute /.+/.exec(\"abcdefghijklmnopqrstuvwxyz\") and check results",
+ "test": "__string = \"abcdefghijklmnopqrstuvwxyz\";\n__executed = /.+/.exec(__string);\n\n__expected = [\"abcdefghijklmnopqrstuvwxyz\"];\n__expected.index = 0;\n__expected.input = __string;\n\n//CHECK#1\nif (__executed.length !== __expected.length) {\n\t$ERROR('#1: __string = \"abcdefghijklmnopqrstuvwxyz\"; __executed = /.+/.exec(__string); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length);\n}\n\n//CHECK#2\nif (__executed.index !== __expected.index) {\n\t$ERROR('#2: __string = \"abcdefghijklmnopqrstuvwxyz\"; __executed = /.+/.exec(__string); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index);\n}\n\n//CHECK#3\nif (__executed.input !== __expected.input) {\n\t$ERROR('#3: __string = \"abcdefghijklmnopqrstuvwxyz\"; __executed = /.+/.exec(__string); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input);\n}\n\n//CHECK#4\nfor(var index=0; index<__expected.length; index++) {\n\tif (__executed[index] !== __expected[index]) {\n\t\t$ERROR('#4: __string = \"abcdefghijklmnopqrstuvwxyz\"; __executed = /.+/.exec(__string); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]);\n\t}\n}\n\n",
+ "id": "S15.10.2.8_A4_T6"
+ },
+ {
+ "section": "15.10.2.8",
+ "description": "Execute /.+/.exec(\"ABCDEFGHIJKLMNOPQRSTUVWXYZ\") and check results",
+ "test": "__string = \"ABCDEFGHIJKLMNOPQRSTUVWXYZ\";\n__executed = /.+/.exec(__string);\n\n__expected = [\"ABCDEFGHIJKLMNOPQRSTUVWXYZ\"];\n__expected.index = 0;\n__expected.input = __string;\n\n//CHECK#1\nif (__executed.length !== __expected.length) {\n\t$ERROR('#1: __string = \"ABCDEFGHIJKLMNOPQRSTUVWXYZ\"; __executed = /.+/.exec(__string); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length);\n}\n\n//CHECK#2\nif (__executed.index !== __expected.index) {\n\t$ERROR('#2: __string = \"ABCDEFGHIJKLMNOPQRSTUVWXYZ\"; __executed = /.+/.exec(__string); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index);\n}\n\n//CHECK#3\nif (__executed.input !== __expected.input) {\n\t$ERROR('#3: __string = \"ABCDEFGHIJKLMNOPQRSTUVWXYZ\"; __executed = /.+/.exec(__string); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input);\n}\n\n//CHECK#4\nfor(var index=0; index<__expected.length; index++) {\n\tif (__executed[index] !== __expected[index]) {\n\t\t$ERROR('#4: __string = \"ABCDEFGHIJKLMNOPQRSTUVWXYZ\"; __executed = /.+/.exec(__string); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]);\n\t}\n}\n\n",
+ "id": "S15.10.2.8_A4_T7"
+ },
+ {
+ "section": "15.10.2.8",
+ "description": "Execute /.+/.exec(\"`1234567890-=~!@#$%^&*()_+\") and check results",
+ "test": "__string = \"`1234567890-=~!@#$%^&*()_+\";\n__executed = /.+/.exec(__string);\n\n__expected = [\"`1234567890-=~!@#$%^&*()_+\"];\n__expected.index = 0;\n__expected.input = __string;\n\n//CHECK#1\nif (__executed.length !== __expected.length) {\n\t$ERROR('#1: __string = \"`1234567890-=~!@#$%^&*()_+\"; __executed = /.+/.exec(__string); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length);\n}\n\n//CHECK#2\nif (__executed.index !== __expected.index) {\n\t$ERROR('#2: __string = \"`1234567890-=~!@#$%^&*()_+\"; __executed = /.+/.exec(__string); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index);\n}\n\n//CHECK#3\nif (__executed.input !== __expected.input) {\n\t$ERROR('#3: __string = \"`1234567890-=~!@#$%^&*()_+\"; __executed = /.+/.exec(__string); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input);\n}\n\n//CHECK#4\nfor(var index=0; index<__expected.length; index++) {\n\tif (__executed[index] !== __expected[index]) {\n\t\t$ERROR('#4: __string = \"`1234567890-=~!@#$%^&*()_+\"; __executed = /.+/.exec(__string); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]);\n\t}\n}\n\n",
+ "id": "S15.10.2.8_A4_T8"
+ },
+ {
+ "section": "15.10.2.8",
+ "description": ": Execute /.+/.exec(\"|\\\\[{]};:\\\"\\',<>.?/\") and check results;",
+ "test": "__string = \"|\\\\[{]};:\\\"\\',<>.?/\";\n__executed = /.+/.exec(__string);\n\n__expected = [\"|\\\\[{]};:\\\"\\',<>.?/\"];\n__expected.index = 0;\n__expected.input = __string;\n\n//CHECK#1\nif (__executed.length !== __expected.length) {\n\t$ERROR('#1: __string = \"|\\\\[{]};:\\\"\\',<>.?/\"; __executed = /.+/.exec(__string); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length);\n}\n\n//CHECK#2\nif (__executed.index !== __expected.index) {\n\t$ERROR('#2: __string = \"|\\\\[{]};:\\\"\\',<>.?/\"; __executed = /.+/.exec(__string); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index);\n}\n\n//CHECK#3\nif (__executed.input !== __expected.input) {\n\t$ERROR('#3: __string = \"|\\\\[{]};:\\\"\\',<>.?/\"; __executed = /.+/.exec(__string); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input);\n}\n\n//CHECK#4\nfor(var index=0; index<__expected.length; index++) {\n\tif (__executed[index] !== __expected[index]) {\n\t\t$ERROR('#4: __string = \"|\\\\[{]};:\\\"\\',<>.?/\"; __executed = /.+/.exec(__string); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]);\n\t}\n}\n\n",
+ "id": "S15.10.2.8_A4_T9"
+ },
+ {
+ "section": "15.10.2.8",
+ "description": "Execute /[a-z]+/ig.exec(\"ABC def ghi\") and check results",
+ "test": "__string = \"ABC def ghi\";\n__executed = /[a-z]+/ig.exec(__string);\n\n__expected = [\"ABC\"];\n__expected.index = 0;\n__expected.input = __string;\n\n//CHECK#1\nif (__executed.length !== __expected.length) {\n\t$ERROR('#1: __string = \"ABC def ghi\"; __executed = /[a-z]+/ig.exec(__string); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length);\n}\n\n//CHECK#2\nif (__executed.index !== __expected.index) {\n\t$ERROR('#2: __string = \"ABC def ghi\"; __executed = /[a-z]+/ig.exec(__string); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index);\n}\n\n//CHECK#3\nif (__executed.input !== __expected.input) {\n\t$ERROR('#3: __string = \"ABC def ghi\"; __executed = /[a-z]+/ig.exec(__string); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input);\n}\n\n//CHECK#4\nfor(var index=0; index<__expected.length; index++) {\n\tif (__executed[index] !== __expected[index]) {\n\t\t$ERROR('#4: __string = \"ABC def ghi\"; __executed = /[a-z]+/ig.exec(__string); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]);\n\t}\n}\n\n",
+ "id": "S15.10.2.8_A5_T1"
+ },
+ {
+ "section": "15.10.2.8",
+ "description": "Execute /[a-z]+/.exec(\"ABC def ghi\") and check results",
+ "test": "__string = \"ABC def ghi\";\n__executed = /[a-z]+/.exec(__string);\n\n__expected = [\"def\"];\n__expected.index = 4;\n__expected.input = __string;\n\n//CHECK#1\nif (__executed.length !== __expected.length) {\n\t$ERROR('#1: __string = \"ABC def ghi\"; __executed = /[a-z]+/.exec(__string); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length);\n}\n\n//CHECK#2\nif (__executed.index !== __expected.index) {\n\t$ERROR('#2: __string = \"ABC def ghi\"; __executed = /[a-z]+/.exec(__string); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index);\n}\n\n//CHECK#3\nif (__executed.input !== __expected.input) {\n\t$ERROR('#3: __string = \"ABC def ghi\"; __executed = /[a-z]+/.exec(__string); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input);\n}\n\n//CHECK#4\nfor(var index=0; index<__expected.length; index++) {\n\tif (__executed[index] !== __expected[index]) {\n\t\t$ERROR('#4: __string = \"ABC def ghi\"; __executed = /[a-z]+/.exec(__string); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]);\n\t}\n}\n\n",
+ "id": "S15.10.2.8_A5_T2"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.10.2.9_AtomEscape.json b/website/resources/scripts/testcases2/15.10.2.9_AtomEscape.json
new file mode 100644
index 000000000..1ab80dbd4
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.10.2.9_AtomEscape.json
@@ -0,0 +1,38 @@
+{
+ "testCollection": {
+ "name": "15.10.2.9_AtomEscape",
+ "numTests": 5,
+ "tests": [
+ {
+ "section": "15.10.2.9, 15.10.2.11",
+ "description": "Execute /\\b(\\w+) \\1\\b/.exec(\"do you listen the the band\") and check results",
+ "test": "__executed = /\\b(\\w+) \\1\\b/.exec(\"do you listen the the band\");\n\n__expected = [\"the the\", \"the\"];\n__expected.index = 14;\n__expected.input = \"do you listen the the band\";\n\n//CHECK#1\nif (__executed.length !== __expected.length) {\n\t$ERROR('#1: __executed = /\\\\b(\\\\w+) \\\\1\\\\b/.exec(\"do you listen the the band\"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length);\n}\n\n//CHECK#2\nif (__executed.index !== __expected.index) {\n\t$ERROR('#2: __executed = /\\\\b(\\\\w+) \\\\1\\\\b/.exec(\"do you listen the the band\"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index);\n}\n\n//CHECK#3\nif (__executed.input !== __expected.input) {\n\t$ERROR('#3: __executed = /\\\\b(\\\\w+) \\\\1\\\\b/.exec(\"do you listen the the band\"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input);\n}\n\n//CHECK#4\nfor(var index=0; index<__expected.length; index++) {\n\tif (__executed[index] !== __expected[index]) {\n\t\t$ERROR('#4: __executed = /\\\\b(\\\\w+) \\\\1\\\\b/.exec(\"do you listen the the band\"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]);\n\t}\n}\n\n",
+ "id": "S15.10.2.9_A1_T1"
+ },
+ {
+ "section": "15.10.2.9, 15.10.2.11",
+ "description": "Execute /([xu]\\d{2}([A-H]{2})?)\\1/.exec(\"x09x12x01x01u00FFu00FFx04x04x23\") and check results",
+ "test": "__executed = /([xu]\\d{2}([A-H]{2})?)\\1/.exec(\"x09x12x01x01u00FFu00FFx04x04x23\");\n\n__expected = [\"x01x01\", \"x01\", undefined];\n__expected.index = 6;\n__expected.input = \"x09x12x01x01u00FFu00FFx04x04x23\";\n\n//CHECK#1\nif (__executed.length !== __expected.length) {\n\t$ERROR('#1: __executed = /([xu]\\\\d{2}([A-H]{2})?)\\\\1/.exec(\"x09x12x01x01u00FFu00FFx04x04x23\"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length);\n}\n\n//CHECK#2\nif (__executed.index !== __expected.index) {\n\t$ERROR('#2: __executed = /([xu]\\\\d{2}([A-H]{2})?)\\\\1/.exec(\"x09x12x01x01u00FFu00FFx04x04x23\"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index);\n}\n\n//CHECK#3\nif (__executed.input !== __expected.input) {\n\t$ERROR('#3: __executed = /([xu]\\\\d{2}([A-H]{2})?)\\\\1/.exec(\"x09x12x01x01u00FFu00FFx04x04x23\"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input);\n}\n\n//CHECK#4\nfor(var index=0; index<__expected.length; index++) {\n\tif (__executed[index] !== __expected[index]) {\n\t\t$ERROR('#4: __executed = /([xu]\\\\d{2}([A-H]{2})?)\\\\1/.exec(\"x09x12x01x01u00FFu00FFx04x04x23\"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]);\n\t}\n}\n\n",
+ "id": "S15.10.2.9_A1_T2"
+ },
+ {
+ "section": "15.10.2.9, 15.10.2.11",
+ "description": "Execute /([xu]\\d{2}([A-H]{2})?)\\1/.exec(\"x09x12x01x05u00FFu00FFx04x04x23\") and check results",
+ "test": "__executed = /([xu]\\d{2}([A-H]{2})?)\\1/.exec(\"x09x12x01x05u00FFu00FFx04x04x23\");\n\n__expected = [\"u00FFu00FF\", \"u00FF\", \"FF\"];\n__expected.index = 12;\n__expected.input = \"x09x12x01x05u00FFu00FFx04x04x23\";\n\n//CHECK#1\nif (__executed.length !== __expected.length) {\n\t$ERROR('#1: __executed = /([xu]\\\\d{2}([A-H]{2})?)\\\\1/.exec(\"x09x12x01x05u00FFu00FFx04x04x23\"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length);\n}\n\n//CHECK#2\nif (__executed.index !== __expected.index) {\n\t$ERROR('#2: __executed = /([xu]\\\\d{2}([A-H]{2})?)\\\\1/.exec(\"x09x12x01x05u00FFu00FFx04x04x23\"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index);\n}\n\n//CHECK#3\nif (__executed.input !== __expected.input) {\n\t$ERROR('#3: __executed = /([xu]\\\\d{2}([A-H]{2})?)\\\\1/.exec(\"x09x12x01x05u00FFu00FFx04x04x23\"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input);\n}\n\n//CHECK#4\nfor(var index=0; index<__expected.length; index++) {\n\tif (__executed[index] !== __expected[index]) {\n\t\t$ERROR('#4: __executed = /([xu]\\\\d{2}([A-H]{2})?)\\\\1/.exec(\"x09x12x01x05u00FFu00FFx04x04x23\"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]);\n\t}\n}\n\n",
+ "id": "S15.10.2.9_A1_T3"
+ },
+ {
+ "section": "15.10.2.9, 15.10.2.11",
+ "description": "Execute /\\b(\\w+) \\2\\b/.test(\"do you listen the the band\") and check results",
+ "test": "__executed = /\\b(\\w+) \\2\\b/.test(\"do you listen the the band\");\n\n//CHECK#1\nif (__executed) {\n\t$ERROR('#1: /\\\\b(\\\\w+) \\\\2\\\\b/.test(\"do you listen the the band\") === false');\n}\n\n",
+ "id": "S15.10.2.9_A1_T4"
+ },
+ {
+ "section": "15.10.2.9, 15.10.2.11",
+ "description": "Execute /(a*)b\\1+/.exec(\"baaac\") and check results",
+ "test": "__executed = /(a*)b\\1+/.exec(\"baaac\");\n\n__expected = [\"b\", \"\"];\n__expected.index = 0;\n__expected.input = \"baaac\";\n\n//CHECK#1\nif (__executed.length !== __expected.length) {\n\t$ERROR('#1: __executed = /(a*)b\\\\1+/.exec(\"baaac\"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length);\n}\n\n//CHECK#2\nif (__executed.index !== __expected.index) {\n\t$ERROR('#2: __executed = /(a*)b\\\\1+/.exec(\"baaac\"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index);\n}\n\n//CHECK#3\nif (__executed.input !== __expected.input) {\n\t$ERROR('#3: __executed = /(a*)b\\\\1+/.exec(\"baaac\"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input);\n}\n\n//CHECK#4\nfor(var index=0; index<__expected.length; index++) {\n\tif (__executed[index] !== __expected[index]) {\n\t\t$ERROR('#4: __executed = /(a*)b\\\\1+/.exec(\"baaac\"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]);\n\t}\n}\n\n",
+ "id": "S15.10.2.9_A1_T5"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.10.2.json b/website/resources/scripts/testcases2/15.10.2.json
new file mode 100644
index 000000000..98ccff2bc
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.10.2.json
@@ -0,0 +1,38 @@
+{
+ "testCollection": {
+ "name": "15.10.2",
+ "numTests": 5,
+ "tests": [
+ {
+ "id": "15.10.2.15-3-1",
+ "path": "TestCases/chapter15/15.10/15.10.2/15.10.2.15-3-1.js",
+ "description": "Pattern - SyntaxError was thrown when 'A' does not contain exactly one character (15.10.2.5 step 3)",
+ "test": "assertTrue((function testcase() {\n try {\n var regExp = new RegExp(\"^[/w-c]$\");\n\n return false;\n } catch (e) {\n return e instanceof SyntaxError;\n }\n }).call(this));\n"
+ },
+ {
+ "id": "15.10.2.15-3-2",
+ "path": "TestCases/chapter15/15.10/15.10.2/15.10.2.15-3-2.js",
+ "description": "Pattern - SyntaxError was thrown when 'B' does not contain exactly one character (15.10.2.5 step 3)",
+ "test": "assertTrue((function testcase() {\n try {\n var regExp = new RegExp(\"^[a-/w]$\");\n\n return false;\n } catch (e) {\n return e instanceof SyntaxError;\n }\n }).call(this));\n"
+ },
+ {
+ "id": "15.10.2.15-6-1",
+ "path": "TestCases/chapter15/15.10/15.10.2/15.10.2.15-6-1.js",
+ "description": "Pattern - SyntaxError was thrown when one character in CharSet 'A' greater than one character in CharSet 'B' (15.10.2.15 CharacterRange step 6)",
+ "test": "assertTrue((function testcase() {\n try {\n var regExp = new RegExp(\"^[z-a]$\");\n\n return false;\n } catch (e) {\n return e instanceof SyntaxError;\n }\n }).call(this));\n"
+ },
+ {
+ "id": "15.10.2.2-1",
+ "path": "TestCases/chapter15/15.10/15.10.2/15.10.2.2-1.js",
+ "description": "Pattern - SyntaxError was thrown when compile a pattern",
+ "test": "assertTrue((function testcase() {\n try {\n var regExp = new RegExp(\"\\\\\");\n\n return false;\n } catch (e) {\n return e instanceof SyntaxError;\n }\n }).call(this));\n"
+ },
+ {
+ "id": "15.10.2.5-3-1",
+ "path": "TestCases/chapter15/15.10/15.10.2/15.10.2.5-3-1.js",
+ "description": "Term - SyntaxError was thrown when max is finite and less than min (15.10.2.5 step 3)",
+ "test": "assertTrue((function testcase() {\n try {\n var regExp = new RegExp(\"0{2,1}\");\n\n return false;\n } catch (e) {\n return e instanceof SyntaxError;\n }\n }).call(this));\n"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.10.2_Pattern_Semantics.json b/website/resources/scripts/testcases2/15.10.2_Pattern_Semantics.json
new file mode 100644
index 000000000..408766e29
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.10.2_Pattern_Semantics.json
@@ -0,0 +1,14 @@
+{
+ "testCollection": {
+ "name": "15.10.2_Pattern_Semantics",
+ "numTests": 1,
+ "tests": [
+ {
+ "section": "15.10.2",
+ "description": "See bug http://bugzilla.mozilla.org/show_bug.cgi?id=103087",
+ "test": "// REX/Javascript 1.0 \n// Robert D. Cameron \"REX: XML Shallow Parsing with Regular Expressions\",\n// Technical Report TR 1998-17, School of Computing Science, Simon Fraser \n// University, November, 1998.\n// Copyright (c) 1998, Robert D. Cameron. \n// The following code may be freely used and distributed provided that\n// this copyright and citation notice remains intact and that modifications\n// or additions are clearly identified.\n\nTextSE = \"[^<]+\";\nUntilHyphen = \"[^-]*-\";\nUntil2Hyphens = UntilHyphen + \"([^-]\" + UntilHyphen + \")*-\";\nCommentCE = Until2Hyphens + \">?\";\nUntilRSBs = \"[^]]*]([^]]+])*]+\";\nCDATA_CE = UntilRSBs + \"([^]>]\" + UntilRSBs + \")*>\";\nS = \"[ \\\\n\\\\t\\\\r]+\";\nNameStrt = \"[A-Za-z_:]|[^\\\\x00-\\\\x7F]\";\nNameChar = \"[A-Za-z0-9_:.-]|[^\\\\x00-\\\\x7F]\";\nName = \"(\" + NameStrt + \")(\" + NameChar + \")*\";\nQuoteSE = '\"[^\"]' + \"*\" + '\"' + \"|'[^']*'\";\nDT_IdentSE = S + Name + \"(\" + S + \"(\" + Name + \"|\" + QuoteSE + \"))*\";\nMarkupDeclCE = \"([^]\\\"'><]+|\" + QuoteSE + \")*>\";\nS1 = \"[\\\\n\\\\r\\\\t ]\";\nUntilQMs = \"[^?]*\\\\?+\";\nPI_Tail = \"\\\\?>|\" + S1 + UntilQMs + \"([^>?]\" + UntilQMs + \")*>\";\nDT_ItemSE = \"<(!(--\" + Until2Hyphens + \">|[^-]\" + MarkupDeclCE + \")|\\\\?\" + Name + \"(\" + PI_Tail + \"))|%\" + Name + \";|\" + S;\nDocTypeCE = DT_IdentSE + \"(\" + S + \")?(\\\\[(\" + DT_ItemSE + \")*](\" + S + \")?)?>?\";\nDeclCE = \"--(\" + CommentCE + \")?|\\\\[CDATA\\\\[(\" + CDATA_CE + \")?|DOCTYPE(\" + DocTypeCE + \")?\";\nPI_CE = Name + \"(\" + PI_Tail + \")?\";\nEndTagCE = Name + \"(\" + S + \")?>?\";\nAttValSE = '\"[^<\"]' + \"*\" + '\"' + \"|'[^<']*'\";\nElemTagCE = Name + \"(\" + S + Name + \"(\" + S + \")?=(\" + S + \")?(\" + AttValSE + \"))*(\" + S + \")?/?>?\";\nMarkupSPE = \"<(!(\" + DeclCE + \")?|\\\\?(\" + PI_CE + \")?|/(\" + EndTagCE + \")?|(\" + ElemTagCE + \")?)\";\nXML_SPE = TextSE + \"|\" + MarkupSPE;\n\n///\n////\n/////\n\n__patterns = [TextSE,UntilHyphen,Until2Hyphens,CommentCE,UntilRSBs,CDATA_CE,S,NameStrt, NameChar, \nName, QuoteSE, DT_IdentSE, MarkupDeclCE, S1,UntilQMs, PI_Tail, DT_ItemSE, DocTypeCE, DeclCE, \nPI_CE, EndTagCE, AttValSE, ElemTagCE, MarkupSPE, XML_SPE];\n\n__html=\"\"+\n'<html xmlns=\"http://www.w3.org/1999/xhtml\"\\n' +\n' xmlns:xlink=\"http://www.w3.org/XML/XLink/0.9\">\\n' +\n' <head><title>Three Namespaces</title></head>\\n' +\n' <body>\\n' +\n' <h1 align=\"center\">An Ellipse and a Rectangle</h1>\\n' +\n' <svg xmlns=\"http://www.w3.org/Graphics/SVG/SVG-19991203.dtd\"\\n' +\n' width=\"12cm\" height=\"10cm\">\\n' +\n' <ellipse rx=\"110\" ry=\"130\" />\\n' +\n' <rect x=\"4cm\" y=\"1cm\" width=\"3cm\" height=\"6cm\" />\\n' +\n' </svg>\\n' +\n' <p xlink:type=\"simple\" xlink:href=\"ellipses.html\">\\n' +\n' More about ellipses\\n' +\n' </p>\\n' +\n' <p xlink:type=\"simple\" xlink:href=\"rectangles.html\">\\n' +\n' More about rectangles\\n' +\n' </p>\\n' +\n' <hr/>\\n' +\n' <p>Last Modified February 13, 2000</p>\\n' +\n' </body>\\n' +\n'</html>';\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\ntry {\n for(var index=0; index<__patterns.length; index++) {\n \t__re = new RegExp(__patterns[index]);\n \t__re.test(__html);\n }\n} catch (e) {\n\t$ERROR('#'+index+\": XML Shallow Parsing with Regular Expression: \"+__patterns[index]);\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n",
+ "id": "S15.10.2_A1_T1"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.10.3_The_RegExp_Constructor_Called_as_a_Function.json b/website/resources/scripts/testcases2/15.10.3_The_RegExp_Constructor_Called_as_a_Function.json
new file mode 100644
index 000000000..f081d4931
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.10.3_The_RegExp_Constructor_Called_as_a_Function.json
@@ -0,0 +1,62 @@
+{
+ "testCollection": {
+ "name": "15.10.3_The_RegExp_Constructor_Called_as_a_Function",
+ "numTests": 9,
+ "tests": [
+ {
+ "section": "15.10.3.1",
+ "description": "R is /x/i and instance is RegExp(R)",
+ "test": "__re = /x/i;\n__instance = RegExp(__re);\n__re.indicator = 1;\n\n//CHECK#1\nif (__instance.indicator !== 1) {\n\t$ERROR('#1: __re = /x/i; __instance = RegExp(__re); __re.indicator = 1; __instance.indicator === 1. Actual: ' + (__instance.indicator));\n}\n\n",
+ "id": "S15.10.3.1_A1_T1"
+ },
+ {
+ "section": "15.10.3.1",
+ "description": "R is new RegExp and instance is RegExp(R, function(){}())",
+ "test": "__re = new RegExp;\n__instance = RegExp(__re, function(){}());\n__re.indicator = 1;\n\n//CHECK#1\nif (__instance.indicator !== 1) {\n\t$ERROR('#1: __re = new RegExp; __instance = RegExp(__re, function(){}()); __re.indicator = 1; __instance.indicator === 1. Actual: ' + (__instance.indicator));\n}\n",
+ "id": "S15.10.3.1_A1_T2"
+ },
+ {
+ "section": "15.10.3.1",
+ "description": "R is new RegExp() and instance is RegExp(R, x), where x is undefined variable",
+ "test": "__re = new RegExp();\n__instance = RegExp(__re, x);\n__re.indicator = 1;\n\n//CHECK#1\nif (__instance.indicator !== 1) {\n\t$ERROR('#1: __re = new RegExp(); __instance = RegExp(__re, x); __re.indicator = 1; __instance.indicator === 1. Actual: ' + (__instance.indicator));\n}\n\nvar x;\n",
+ "id": "S15.10.3.1_A1_T3"
+ },
+ {
+ "section": "15.10.3.1",
+ "description": "R is new RegExp() and instance is RegExp(R, void 0)",
+ "test": "__re = RegExp();\n__instance = RegExp(__re, void 0);\n__re.indicator = 1;\n\n//CHECK#1\nif (__instance.indicator !== 1) {\n\t$ERROR('#1: __re = RegExp(); __instance = RegExp(__re, void 0); __re.indicator = 1; __instance.indicator === 1. Actual: ' + (__instance.indicator));\n}\n\n",
+ "id": "S15.10.3.1_A1_T4"
+ },
+ {
+ "section": "15.10.3.1",
+ "description": "R is /\\b/m and instance is RegExp(R, undefined)",
+ "test": "__re = /\\b/m;\n__instance = RegExp(__re, undefined);\n__re.indicator = 1;\n\n//CHECK#1\nif (__instance.indicator !== 1) {\n\t$ERROR('#1: __re = /\\\\b/m; __instance = RegExp(__re, undefined); __re.indicator = 1; __instance.indicator === 1. Actual: ' + (__instance.indicator));\n}\n\n",
+ "id": "S15.10.3.1_A1_T5"
+ },
+ {
+ "section": "15.10.3.1",
+ "description": "Checking if using \"1\" as flags leads to throwing the correct exception",
+ "test": "//CHECK#1\ntry {\n\t$ERROR('#1.1: RegExp(new RegExp(\"\\\\d\"), \"1\")) throw TypeError. Actual: ' + (RegExp(new RegExp(\"\\d\"), \"1\")));\n} catch (e) {\n\tif ((e instanceof TypeError) !== true) {\n\t\t$ERROR('#1.2: RegExp(new RegExp(\"\\\\d\"), \"1\")) throw TypeError. Actual: ' + (e));\n\t}\n}\n\n",
+ "id": "S15.10.3.1_A2_T1"
+ },
+ {
+ "section": "15.10.3.1",
+ "description": "Checking if using dafined variable \"x = 1\" as flags leads to throwing the correct exception",
+ "test": "var x = 1;\n\n//CHECK#1\ntry {\n\t$ERROR('#1.1: var x = 1; RegExp(/[a-b]?/, x) throw TypeError. Actual: ' + (RegExp(/[a-b]?/, x)));\n} catch (e) {\n\tif ((e instanceof TypeError) !== true) {\n\t\t$ERROR('#1.2: var x = 1; RegExp(/[a-b]?/, x) throw TypeError. Actual: ' + (e));\n\t} \n}\n\n",
+ "id": "S15.10.3.1_A2_T2"
+ },
+ {
+ "section": "15.10.3.1",
+ "description": "R is \"d+\" and instance is RegExp(R,\"i\")",
+ "test": "__re = \"d+\";\n__instance = RegExp(__re, \"i\");\n\n//CHECK#1\nif (__instance.constructor !== RegExp) {\n\t$ERROR('#1: __re = \"d+\"; __instance = RegExp(__re, \"i\"); __instance.constructor === RegExp. Actual: ' + (__instance.constructor));\n}\n\n//CHECK#2\nif (__instance.source !== __re) {\n\t$ERROR('#2: __re = \"d+\"; __instance = RegExp(__re, \"i\"); __instance.source === __re. Actual: '+ (__instance.source));\n}\n\n",
+ "id": "S15.10.3.1_A3_T1"
+ },
+ {
+ "section": "15.10.3.1",
+ "description": ": R is {toString:function(){return \"[a-c]*\";}} and instance is RegExp(R,\"gm\");",
+ "test": "__instance = RegExp({toString:function(){return \"[a-c]*\";}}, \"gm\");\n\n//CHECK#1\nif (__instance.constructor !== RegExp) {\n\t$ERROR('#1: __instance = RegExp({toString:function(){return \"[a-c]*\";}}, \"gm\"); __instance.constructor === RegExp. Actual: ' + (__instance.constructor));\n}\n\n//CHECK#2\nif (__instance.source !== \"[a-c]*\") {\n\t$ERROR('#2: __instance = RegExp({toString:function(){return \"[a-c]*\";}}, \"gm\"); __instance.source === \"[a-c]*\". Actual: '+ (__instance.source));\n}\n\n",
+ "id": "S15.10.3.1_A3_T2"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.10.4.json b/website/resources/scripts/testcases2/15.10.4.json
new file mode 100644
index 000000000..d155a1a85
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.10.4.json
@@ -0,0 +1,32 @@
+{
+ "testCollection": {
+ "name": "15.10.4",
+ "numTests": 4,
+ "tests": [
+ {
+ "id": "15.10.4.1-1",
+ "path": "TestCases/chapter15/15.10/15.10.4/15.10.4.1-1.js",
+ "description": "RegExp - the thrown error is TypeError instead of RegExpError when pattern is an object whose [[Class]] property is 'RegExp' and flags is not undefined ",
+ "test": "assertTrue((function testcase() {\n var regObj = new RegExp();\n try {\n var regExpObj = new RegExp(regObj, true);\n\n return false;\n } catch (e) {\n return e instanceof TypeError;\n }\n }).call(this));\n"
+ },
+ {
+ "id": "15.10.4.1-2",
+ "path": "TestCases/chapter15/15.10/15.10.4/15.10.4.1-2.js",
+ "description": "RegExp - the thrown error is SyntaxError instead of RegExpError when the characters of 'P' do not have the syntactic form Pattern",
+ "test": "assertTrue((function testcase() {\n try {\n var regExpObj = new RegExp('\\\\');\n\n return false;\n } catch (e) {\n return e instanceof SyntaxError;\n }\n }).call(this));\n"
+ },
+ {
+ "id": "15.10.4.1-3",
+ "path": "TestCases/chapter15/15.10/15.10.4/15.10.4.1-3.js",
+ "description": "RegExp - the thrown error is SyntaxError instead of RegExpError when 'F' contains any character other than 'g', 'i', or 'm' ",
+ "test": "assertTrue((function testcase() {\n try {\n var regExpObj = new RegExp('abc', 'a');\n\n return false;\n } catch (e) {\n return e instanceof SyntaxError;\n }\n }).call(this));\n"
+ },
+ {
+ "id": "15.10.4.1-4",
+ "path": "TestCases/chapter15/15.10/15.10.4/15.10.4.1-4.js",
+ "description": "RegExp - the SyntaxError is not thrown when flags is 'gim'",
+ "test": "assertTrue((function testcase() {\n try {\n var regExpObj = new RegExp('abc', 'gim');\n\n return true;\n } catch (e) {\n return false;\n }\n }).call(this));\n"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.10.4_The_RegExp_Constructor.json b/website/resources/scripts/testcases2/15.10.4_The_RegExp_Constructor.json
new file mode 100644
index 000000000..1751fa039
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.10.4_The_RegExp_Constructor.json
@@ -0,0 +1,278 @@
+{
+ "testCollection": {
+ "name": "15.10.4_The_RegExp_Constructor",
+ "numTests": 45,
+ "tests": [
+ {
+ "section": "15.10.4.1",
+ "description": "Pattern is /./i and RegExp is new RegExp(pattern)",
+ "test": "__pattern = /./i;\n__re = new RegExp(__pattern); \n\n//CHECK#1\nif (__re.source !== __pattern.source) {\n $ERROR('#1: __pattern = /./i; __re = new RegExp(__pattern); __re.source === __pattern.source. Actual: '+ (__re.source));\n}\n\n//CHECK#2\nif (__re.multiline !== __pattern.multiline) {\n $ERROR('#2: __pattern = /./i; __re = new RegExp(__pattern); __re.multiline === __pattern.multiline. Actual: ' + (__re.multiline));\n}\n\n//CHECK#3\nif (__re.global !== __pattern.global) {\n $ERROR('#3: __pattern = /./i; __re = new RegExp(__pattern); __re.global === __pattern.global. Actual: ' + (__re.global));\n}\n\n//CHECK#4\nif (__re.ignoreCase !== __pattern.ignoreCase) {\n $ERROR('#4: __pattern = /./i; __re = new RegExp(__pattern); __re.ignoreCase === __pattern.ignoreCase. Actual: ' + (__re.ignoreCase));\n}\n",
+ "id": "S15.10.4.1_A1_T1"
+ },
+ {
+ "section": "15.10.4.1",
+ "description": "Pattern is /\\t/m and RegExp is new RegExp(pattern,x), where x is undefined variable",
+ "test": "__pattern = /\\t/m;\n__re = new RegExp(__pattern, x);\n\n//CHECK#1\nif (__re.source !== __pattern.source) {\n $ERROR('#1: __pattern = /\\\\t/m; _re = new RegExp(__pattern, x); var x; __re.source === __pattern.source. Actual: '+ (__re.source));\n}\n\n//CHECK#2\nif (__re.multiline !== __pattern.multiline) {\n $ERROR('#2: __pattern = /\\\\t/m; _re = new RegExp(__pattern, x); var x; __re.multiline === __pattern.multiline. Actual: ' + (__re.multiline));\n}\n\n//CHECK#3\nif (__re.global !== __pattern.global) {\n $ERROR('#3: __pattern = /\\\\t/m; _re = new RegExp(__pattern, x); var x; __re.global === __pattern.global. Actual: ' + (__re.global));\n}\n\n//CHECK#4\nif (__re.ignoreCase !== __pattern.ignoreCase) {\n $ERROR('#4: __pattern = /\\\\t/m; _re = new RegExp(__pattern, x); var x; __re.ignoreCase === __pattern.ignoreCase. Actual: ' + (__re.ignoreCase));\n}\n\nvar x;\n",
+ "id": "S15.10.4.1_A1_T2"
+ },
+ {
+ "section": "15.10.4.1",
+ "description": "Pattern is /[a-b]/g and RegExp is new RegExp(pattern,void 0)",
+ "test": "__pattern = /[a-b]/g;\n__re = new RegExp(__pattern, void 0);\n\n//CHECK#1\nif (__re.source !== __pattern.source) {\n $ERROR('#1: __pattern = /[a-b]/g; __re = new RegExp(__pattern, void 0); __re.source === __pattern.source. Actual: '+ (__re.source));\n}\n\n//CHECK#2\nif (__re.multiline !== __pattern.multiline) {\n $ERROR('#2: __pattern = /[a-b]/g; __re = new RegExp(__pattern, void 0); __re.multiline === __pattern.multiline. Actual: ' + (__re.multiline));\n}\n\n//CHECK#3\nif (__re.global !== __pattern.global) {\n $ERROR('#3: __pattern = /[a-b]/g; __re = new RegExp(__pattern, void 0); __re.global === __pattern.global. Actual: ' + (__re.global));\n}\n\n//CHECK#4\nif (__re.ignoreCase !== __pattern.ignoreCase) {\n $ERROR('#4: __pattern = /[a-b]/g; __re = new RegExp(__pattern, void 0); __re.ignoreCase === __pattern.ignoreCase. Actual: ' + (__re.ignoreCase));\n}\n\n\n",
+ "id": "S15.10.4.1_A1_T3"
+ },
+ {
+ "section": "15.10.4.1",
+ "description": "Pattern is new RegExp and RegExp is new RegExp(pattern,undefined)",
+ "test": "__pattern = new RegExp;\n__re = new RegExp(__pattern, undefined);\n\n//CHECK#1\nif (__re.source !== __pattern.source) {\n $ERROR('#1: __pattern = new RegExp; __re = new RegExp(__pattern, undefined); __re.source === __pattern.source. Actual: '+ (__re.source));\n}\n\n//CHECK#2\nif (__re.multiline !== __pattern.multiline) {\n $ERROR('#2: __pattern = new RegExp; __re = new RegExp(__pattern, undefined); __re.multiline === __pattern.multiline. Actual: ' + (__re.multiline));\n}\n\n//CHECK#3\nif (__re.global !== __pattern.global) {\n $ERROR('#3: __pattern = new RegExp; __re = new RegExp(__pattern, undefined); __re.global === __pattern.global. Actual: ' + (__re.global));\n}\n\n//CHECK#4\nif (__re.ignoreCase !== __pattern.ignoreCase) {\n $ERROR('#4: __pattern = new RegExp; __re = new RegExp(__pattern, undefined); __re.ignoreCase === __pattern.ignoreCase. Actual: ' + (__re.ignoreCase));\n}\n\n",
+ "id": "S15.10.4.1_A1_T4"
+ },
+ {
+ "section": "15.10.4.1",
+ "description": "Pattern is RegExp(\"1?\",\"mig\") and RegExp is new RegExp(pattern,(function(){})())",
+ "test": "__pattern = RegExp(\"1?\",\"mig\");\n__re = new RegExp(__pattern, (function(){})());\n\n//CHECK#1\nif (__re.source !== __pattern.source) {\n $ERROR('#1: __pattern = RegExp(\"1?\",\"mig\"); __re = new RegExp(__pattern, (function(){})()); __re.source === __pattern.source. Actual: '+ (__re.source));\n}\n\n//CHECK#2\nif (__re.multiline !== __pattern.multiline) {\n $ERROR('#2: __pattern = RegExp(\"1?\",\"mig\"); __re = new RegExp(__pattern, (function(){})()); __re.multiline === __pattern.multiline. Actual: ' + (__re.multiline));\n}\n\n//CHECK#3\nif (__re.global !== __pattern.global) {\n $ERROR('#3: __pattern = RegExp(\"1?\",\"mig\"); __re = new RegExp(__pattern, (function(){})()); __re.global === __pattern.global. Actual: ' + (__re.global));\n}\n\n//CHECK#4\nif (__re.ignoreCase !== __pattern.ignoreCase) {\n $ERROR('#4: __pattern = RegExp(\"1?\",\"mig\"); __re = new RegExp(__pattern, (function(){})()); __re.ignoreCase === __pattern.ignoreCase. Actual: ' + (__re.ignoreCase));\n}\n\n\n",
+ "id": "S15.10.4.1_A1_T5"
+ },
+ {
+ "section": "15.10.4.1",
+ "description": "Checking if execution of \"new RegExp(pattern, \"i\")\", where the pattern is \"/\\u0042/i\", fails",
+ "test": "//CHECK#1\ntry {\n\t$ERROR('#1.1: new RegExp(/\\\\u0042/i, \"i\") throw TypeError. Actual: ' + (new RegExp(/\\u0042/i, \"i\"))); \n} catch (e) {\n\tif ((e instanceof TypeError) !== true) {\n\t\t$ERROR('#1.2: new RegExp(/\\\\u0042/i, \"i\") throw TypeError. Actual: ' + (e));\n\t}\n}\n\n",
+ "id": "S15.10.4.1_A2_T1"
+ },
+ {
+ "section": "15.10.4.1",
+ "description": "Checking if execution of \"new RegExp(pattern, {})\", where the pattern is \"/1?1/mig\", fails",
+ "test": "//CHECK#1\ntry {\n $ERROR('#1.1: new RegExp(/1?1/mig, {}) throw TypeError. Actual: ' + (new RegExp(/1?1/mig, {}))); \n} catch (e) {\n if ((e instanceof TypeError) !== true) {\n $ERROR('#1.2: new RegExp(/1?1/mig, {}) throw TypeError. Actual: ' + (e));\n }\n}\n\n",
+ "id": "S15.10.4.1_A2_T2"
+ },
+ {
+ "section": "15.10.4.1",
+ "description": "RegExp is new RegExp",
+ "test": "__re = new RegExp;\n\n//CHECK#1\nif (__re.source !== \"\") {\n $ERROR('#1: __re = new RegExp; __re.source === \"\". Actual: '+ (__re.source));\n}\n\n//CHECK#2\nif (__re.multiline !== false) {\n $ERROR('#2: __re = new RegExp; __re.multiline === false. Actual: ' + (__re.multiline));\n}\n\n//CHECK#3\nif (__re.global !== false) {\n $ERROR('#3: __re = new RegExp; __re.global === false. Actual: ' + (__re.global));\n}\n\n//CHECK#4\nif (__re.ignoreCase !== false) {\n $ERROR('#4: __re = new RegExp; __re.ignoreCase === false. Actual: ' + (__re.ignoreCase));\n}\n\n\n",
+ "id": "S15.10.4.1_A3_T1"
+ },
+ {
+ "section": "15.10.4.1",
+ "description": "RegExp is new RegExp(void 0)",
+ "test": "__re = new RegExp(void 0);\n\n//CHECK#1\nif (__re.source !== \"\") {\n $ERROR('#1: __re = new RegExp(void 0); __re.source === \"\". Actual: '+ (__re.source));\n}\n\n//CHECK#2\nif (__re.multiline !== false) {\n $ERROR('#2: __re = new RegExp(void 0); __re.multiline === false. Actual: ' + (__re.multiline));\n}\n\n//CHECK#3\nif (__re.global !== false) {\n $ERROR('#3: __re = new RegExp(void 0); __re.global === false. Actual: ' + (__re.global));\n}\n\n//CHECK#4\nif (__re.ignoreCase !== false) {\n $ERROR('#4: __re = new RegExp(void 0); __re.ignoreCase === false. Actual: ' + (__re.ignoreCase));\n}\n\n",
+ "id": "S15.10.4.1_A3_T2"
+ },
+ {
+ "section": "15.10.4.1",
+ "description": "RegExp is new RegExp(x), where x is undefined variable",
+ "test": "__re = new RegExp(x);\n\n//CHECK#1\nif (__re.source !== \"\") {\n $ERROR('#1: __re = new RegExp(x); var x; __re.source === \"\". Actual: '+ (__re.source));\n}\n\n//CHECK#2\nif (__re.multiline !== false) {\n $ERROR('#2: __re = new RegExp(x); var x; __re.multiline === false. Actual: ' + (__re.multiline));\n}\n\n//CHECK#3\nif (__re.global !== false) {\n $ERROR('#3: __re = new RegExp(x); var x; __re.global === false. Actual: ' + (__re.global));\n}\n\n//CHECK#4\nif (__re.ignoreCase !== false) {\n $ERROR('#4: __re = new RegExp(x); var x; __re.ignoreCase === false. Actual: ' + (__re.ignoreCase));\n}\n\nvar x;\n\n",
+ "id": "S15.10.4.1_A3_T3"
+ },
+ {
+ "section": "15.10.4.1",
+ "description": "RegExp is new RegExp(undefined)",
+ "test": "__re = new RegExp(undefined);\n\n//CHECK#1\nif (__re.source !== \"\") {\n $ERROR('#1: __re = new RegExp(undefined); __re.source === \"\". Actual: '+ (__re.source));\n}\n\n//CHECK#2\nif (__re.multiline !== false) {\n $ERROR('#2: __re = new RegExp(undefined); __re.multiline === false. Actual: ' + (__re.multiline));\n}\n\n//CHECK#3\nif (__re.global !== false) {\n $ERROR('#3: __re = new RegExp(undefined); __re.global === false. Actual: ' + (__re.global));\n}\n\n//CHECK#4\nif (__re.ignoreCase !== false) {\n $ERROR('#4: __re = new RegExp(undefined); __re.ignoreCase === false. Actual: ' + (__re.ignoreCase));\n}\n",
+ "id": "S15.10.4.1_A3_T4"
+ },
+ {
+ "section": "15.10.4.1",
+ "description": "RegExp is new RegExp((function(){})())",
+ "test": "__re = new RegExp((function(){})());\n\n//CHECK#1\nif (__re.source !== \"\") {\n $ERROR('#1: __re = new RegExp((function(){})()); __re.source === \"\". Actual: '+ (__re.source));\n}\n\n//CHECK#2\nif (__re.multiline !== false) {\n $ERROR('#2: __re = new RegExp((function(){})()); __re.multiline === false. Actual: ' + (__re.multiline));\n}\n\n//CHECK#3\nif (__re.global !== false) {\n $ERROR('#3: __re = new RegExp((function(){})()); __re.global === false. Actual: ' + (__re.global));\n}\n\n//CHECK#4\nif (__re.ignoreCase !== false) {\n $ERROR('#4: __re = new RegExp((function(){})()); __re.ignoreCase === false. Actual: ' + (__re.ignoreCase));\n}\n\n",
+ "id": "S15.10.4.1_A3_T5"
+ },
+ {
+ "section": "15.10.4.1",
+ "description": "RegExp is new RegExp(undefined)",
+ "test": "__re = new RegExp(null, void 0);\n\n//CHECK#1\nif (__re.source !== \"null\") {\n $ERROR('#1: __re = new RegExp(null, void 0); __re.source === \"null\". Actual: '+ (__re.source));\n}\n\n//CHECK#2\nif (__re.multiline !== false) {\n $ERROR('#2: __re = new RegExp(null, void 0); __re.multiline === false. Actual: ' + (__re.multiline));\n}\n\n//CHECK#3\nif (__re.global !== false) {\n $ERROR('#3: __re = new RegExp(null, void 0); __re.global === false. Actual: ' + (__re.global));\n}\n\n//CHECK#4\nif (__re.ignoreCase !== false) {\n $ERROR('#4: __re = new RegExp(null, void 0); __re.ignoreCase === false. Actual: ' + (__re.ignoreCase));\n}\n\n\n",
+ "id": "S15.10.4.1_A4_T1"
+ },
+ {
+ "section": "15.10.4.1",
+ "description": "RegExp is new RegExp(undefined,undefined)",
+ "test": "__re = new RegExp(undefined, undefined);\n\n//CHECK#1\nif (__re.source !== \"\") {\n $ERROR('#1: __re = new RegExp(undefined, undefined); __re.source === \"\". Actual: '+ (__re.source));\n}\n\n//CHECK#2\nif (__re.multiline !== false) {\n $ERROR('#2: __re = new RegExp(undefined, undefined); __re.multiline === false. Actual: ' + (__re.multiline));\n}\n\n//CHECK#3\nif (__re.global !== false) {\n $ERROR('#3: __re = new RegExp(undefined, undefined); __re.global === false. Actual: ' + (__re.global));\n}\n\n//CHECK#4\nif (__re.ignoreCase !== false) {\n $ERROR('#4: __re = new RegExp(undefined, undefined); __re.ignoreCase === false. Actual: ' + (__re.ignoreCase));\n}\n\n",
+ "id": "S15.10.4.1_A4_T2"
+ },
+ {
+ "section": "15.10.4.1",
+ "description": "Use undefined properties of object as flags of RegExp",
+ "test": "__re = new RegExp({}.p, {}.q);\n\n//CHECK#1\nif (__re.source !== \"\") {\n $ERROR('#1: __re = new RegExp({}.p, {}.q); __re.source === \"\". Actual: '+ (__re.source));\n}\n\n//CHECK#2\nif (__re.multiline !== false) {\n $ERROR('#2: __re = new RegExp({}.p, {}.q); __re.multiline === false. Actual: ' + (__re.multiline));\n}\n\n//CHECK#3\nif (__re.global !== false) {\n $ERROR('#3: __re = new RegExp({}.p, {}.q); __re.global === false. Actual: ' + (__re.global));\n}\n\n//CHECK#4\nif (__re.ignoreCase !== false) {\n $ERROR('#4: __re = new RegExp({}.p, {}.q); __re.ignoreCase === false. Actual: ' + (__re.ignoreCase));\n}\n\n",
+ "id": "S15.10.4.1_A4_T3"
+ },
+ {
+ "section": "15.10.4.1",
+ "description": "RegExp is new RegExp(null,void 0)",
+ "test": "__re = new RegExp(null, void 0);\n\n//CHECK#1\nif (__re.source !== \"null\") {\n $ERROR('#1: __re = new RegExp(null, void 0); __re.source === \"null\". Actual: '+ (__re.source));\n}\n\n//CHECK#2\nif (__re.multiline !== false) {\n $ERROR('#2: __re = new RegExp(null, void 0); __re.multiline === false. Actual: ' + (__re.multiline));\n}\n\n//CHECK#3\nif (__re.global !== false) {\n $ERROR('#3: __re = new RegExp(null, void 0); __re.global === false. Actual: ' + (__re.global));\n}\n\n//CHECK#4\nif (__re.ignoreCase !== false) {\n $ERROR('#4: __re = new RegExp(null, void 0); __re.ignoreCase === false. Actual: ' + (__re.ignoreCase));\n}\n\n",
+ "id": "S15.10.4.1_A4_T4"
+ },
+ {
+ "section": "15.10.4.1",
+ "description": "RegExp is new RegExp(\"\",(function(){})())",
+ "test": "__re = new RegExp(\"\", (function(){})());\n\n//CHECK#1\nif (__re.source !== \"\") {\n $ERROR('#1: __re = new RegExp(\"\", (function(){})()); __re.source === \"\". Actual: '+ (__re.source));\n}\n\n//CHECK#2\nif (__re.multiline !== false) {\n $ERROR('#2: __re = new RegExp(\"\", (function(){})()); __re.multiline === false. Actual: ' + (__re.multiline));\n}\n\n//CHECK#3\nif (__re.global !== false) {\n $ERROR('#3: __re = new RegExp(\"\", (function(){})()); __re.global === false. Actual: ' + (__re.global));\n}\n\n//CHECK#4\nif (__re.ignoreCase !== false) {\n $ERROR('#4: __re = new RegExp(\"\", (function(){})()); __re.ignoreCase === false. Actual: ' + (__re.ignoreCase));\n}\n",
+ "id": "S15.10.4.1_A4_T5"
+ },
+ {
+ "section": "15.10.4.1",
+ "description": "Checking if using \"ii\" as F leads to throwing the correct exception",
+ "test": "//CHECK#1\ntry {\n\t$ERROR('#1.1: new RegExp(undefined,\"ii\") throw SyntaxError. Actual: ' + (new RegExp(undefined,\"ii\")));\n} catch (e) {\n\tif ((e instanceof SyntaxError) !== true) {\n\t\t$ERROR('#1.2: new RegExp(undefined,\"ii\") throw SyntaxError. Actual: ' + (e));\n\t}\n}\n\n",
+ "id": "S15.10.4.1_A5_T1"
+ },
+ {
+ "section": "15.10.4.1",
+ "description": "Checking if using \"migg\" as F leads to throwing the correct exception",
+ "test": "//CHECK#1\ntry {\n\t$ERROR('#1.1: new RegExp(null,\"migg\") throw SyntaxError. Actual: ' + (new RegExp(null,\"migg\")));\n} catch (e) {\n\tif ((e instanceof SyntaxError) !== true) {\n\t\t$ERROR('#1.2: new RegExp(null,\"migg\") throw SyntaxError. Actual: ' + (e));\n\t}\n}\n\n",
+ "id": "S15.10.4.1_A5_T2"
+ },
+ {
+ "section": "15.10.4.1",
+ "description": "Checking by using eval, try to use eval(\"\\\"migg\\\"\") as F",
+ "test": "//CHECK#1\ntry {\n\t$ERROR('#1.1: new RegExp(\"\",eval(\"\\\\\"migr\\\\\"\")) throw SyntaxError. Actual: ' + (new RegExp(\"\",eval(\"\\\"migr\\\"\"))));\n} catch (e) {\n\tif ((e instanceof SyntaxError) !== true) {\n\t\t$ERROR('#1.2: new RegExp(\"\",eval(\"\\\\\"migr\\\\\"\")) throw SyntaxError. Actual: ' + (e));\n\t}\n}\n\n",
+ "id": "S15.10.4.1_A5_T3"
+ },
+ {
+ "section": "15.10.4.1",
+ "description": "Checking if using \"z\" as F leads to throwing the correct exception",
+ "test": "//CHECK#1\ntry {\n\t$ERROR('#1.1: new RegExp(\"a|b\",\"z\") throw SyntaxError. Actual: ' + (new RegExp(\"a|b\",\"z\")));\n} catch (e) {\n\tif ((e instanceof SyntaxError) !== true) {\n\t\t$ERROR('#1.2: new RegExp(\"a|b\",\"z\") throw SyntaxError. Actual: ' + (e));\n\t}\n}\n\n",
+ "id": "S15.10.4.1_A5_T4"
+ },
+ {
+ "section": "15.10.4.1",
+ "description": ": Checking if using \"{toString:function(){return \"x\";}}\" as F leads to throwing the correct exception;",
+ "test": "//CHECK#1\ntry {\n\t$ERROR('#1.1: new RegExp(\"a|b|[a-b]\",{toString:function(){return \"x\" throw SyntaxError. Actual: ' + (new RegExp(\"a|b|[a-b]\",{toString:function(){return \"x\"}})));\n} catch (e) {\n\tif ((e instanceof SyntaxError) !== true) {\n\t\t$ERROR('#1.2: new RegExp(\"a|b|[a-b]\",{toString:function(){return \"x\" throw SyntaxError. Actual: ' + (e));\n\t}\n}\n\n",
+ "id": "S15.10.4.1_A5_T5"
+ },
+ {
+ "section": "15.10.4.1",
+ "description": "Checking if using \"null\" as F leads to throwing the correct exception",
+ "test": "//CHECK#1\ntry {\n\t$ERROR('#1.1: new RegExp(\".\",null) throw SyntaxError. Actual: ' + (new RegExp(\".\",null)));\n} catch (e) {\n\tif ((e instanceof SyntaxError) !== true) {\n\t\t$ERROR('#1.2: new RegExp(\".\",null) throw SyntaxError. Actual: ' + (e));\n\t}\n}\n\n",
+ "id": "S15.10.4.1_A5_T6"
+ },
+ {
+ "section": "15.10.4.1",
+ "description": "Checking if using 1.0 as F leads to throwing the correct exception",
+ "test": "//CHECK#1\ntry {\n\t$ERROR('#1.1: new RegExp(\"^\",1.0) throw SyntaxError. Actual: ' + (new RegExp(\"^\",1.0)));\n} catch (e) {\n\tif ((e instanceof SyntaxError) !== true) {\n\t\t$ERROR('#1.2: new RegExp(\"^\",1.0) throw SyntaxError. Actual: ' + (e));\n\t}\n}\n\n",
+ "id": "S15.10.4.1_A5_T7"
+ },
+ {
+ "section": "15.10.4.1",
+ "description": "Checking if using \"true\" as F leads to throwing the correct exception",
+ "test": "//CHECK#1\ntry {\n\t$ERROR('#1.1: new RegExp(\"|\",true) throw SyntaxError. Actual: ' + (new RegExp(\"|\",true)));\n} catch (e) {\n\tif ((e instanceof SyntaxError) !== true) {\n\t\t$ERROR('#1.2: new RegExp(\"|\",true) throw SyntaxError. Actual: ' + (e));\n\t}\n}\n\n",
+ "id": "S15.10.4.1_A5_T8"
+ },
+ {
+ "section": "15.10.4.1",
+ "description": "Checking if using \"{toString:function(){}}\" as F leads to throwing the correct exception",
+ "test": "//CHECK#1\ntry {\n\t$ERROR('#1.1: new RegExp(\"$sup\",{toString:function(){}}) throw SyntaxError. Actual: ' + (new RegExp(\"$sup\",{toString:function(){}})));\n} catch (e) {\n\tif ((e instanceof SyntaxError) !== true) {\n\t\t$ERROR('#1.2: new RegExp(\"$sup\",{toString:function(){}}) throw SyntaxError. Actual: ' + (e));\n\t}\n}\n\n",
+ "id": "S15.10.4.1_A5_T9"
+ },
+ {
+ "section": "15.10.4.1",
+ "description": "Checking [[Class]] property of the newly constructed object",
+ "test": "__re = new RegExp;\n__re.toString = Object.prototype.toString;\n\n//CHECK#1\nif (__re.toString() !== \"[object \"+\"RegExp\"+\"]\") {\n\t$ERROR('#1: __re = new RegExp; __re.toString = Object.prototype.toString; __re.toString() === \"[object \"+\"RegExp\"+\"]\". Actual: ' + (__re.toString()));\n}\n\n",
+ "id": "S15.10.4.1_A6_T1"
+ },
+ {
+ "section": "15.10.4.1",
+ "description": "Add new property to [[Prototype]] of REgExp and check this property of the newly constructed object",
+ "test": "__re = new RegExp;\nRegExp.prototype.indicator = 1;\n\n//CHECK#1\nif (__re.indicator !== 1) {\n\t$ERROR('#1: __re = new RegExp; RegExp.prototype.indicator = 1; __re.indicator === 1. Actual: ' + (__re.indicator));\n}\n\n",
+ "id": "S15.10.4.1_A7_T1"
+ },
+ {
+ "section": "15.10.4.1",
+ "description": "Checking [[Prototype]] property of the newly constructed object",
+ "test": "__re = new RegExp();\n\n//CHECK#1\nif (RegExp.prototype.isPrototypeOf(__re) !== true) {\n\t$ERROR('#1: __re = new RegExp(); RegExp.prototype.isPrototypeOf(__re) === true. Actual: ' + (RegExp.prototype.isPrototypeOf(__re)));\n}\n\n",
+ "id": "S15.10.4.1_A7_T2"
+ },
+ {
+ "section": "15.10.4.1",
+ "description": "Pattern is \"a|b\" and flags is \"i\"",
+ "test": "__re = new RegExp(\"a|b\",\"i\");\n\n//CHECK#1\nif (__re.ignoreCase !== true) {\n\t$ERROR('#1: __re = new RegExp(\"a|b\",\"i\"); __re.ignoreCase === true. Actual: ' + (__re.ignoreCase));\n}\n\n//CHECK#2\nif (__re.multiline !== false) {\n\t$ERROR('#2: __re = new RegExp(\"a|b\",\"i\"); __re.multiline === false. Actual: ' + (__re.multiline));\n}\n\n//CHECK#3\nif (__re.global !== false) {\n\t$ERROR('#3: __re = new RegExp(\"a|b\",\"i\"); __re.global === false. Actual: ' + (__re.global));\n}\n\n//CHECK#4\nif (__re.lastIndex !== 0) {\n\t$ERROR('#4: __re = new RegExp(\"a|b\",\"i\"); __re.lastIndex === 0. Actual: ' + (__re.lastIndex));\n}\n\n//CHECK#5\nif (typeof __re.source === \"undefined\") {\n\t$ERROR('#5: __re = new RegExp(\"a|b\",\"i\"); typeof __re.source !== \"undefined\"');\n}\n\n",
+ "id": "S15.10.4.1_A8_T1"
+ },
+ {
+ "section": "15.10.4.1",
+ "description": "Pattern is true and flags is \"m\"",
+ "test": "__re = new RegExp(true,\"m\");\n\n//CHECK#1\nif (__re.ignoreCase !== false) {\n\t$ERROR('#1: __re = new RegExp(true,\"m\"); __re.ignoreCase === false. Actual: ' + (__re.ignoreCase));\n}\n\n//CHECK#2\nif (__re.multiline !== true) {\n\t$ERROR('#2: __re = new RegExp(true,\"m\"); __re.multiline === true. Actual: ' + (__re.multiline));\n}\n\n//CHECK#3\nif (__re.global !== false) {\n\t$ERROR('#3: __re = new RegExp(true,\"m\"); __re.global === false. Actual: ' + (__re.global));\n}\n\n//CHECK#4\nif (__re.lastIndex !== 0) {\n\t$ERROR('#4: __re = new RegExp(true,\"m\"); __re.lastIndex === 0. Actual: ' + (__re.lastIndex));\n}\n\n//CHECK#5\nif (typeof __re.source === \"undefined\") {\n\t$ERROR('#5: __re = new RegExp(true,\"m\"); typeof __re.source !== \"undefined\"');\n}\n\n",
+ "id": "S15.10.4.1_A8_T10"
+ },
+ {
+ "section": "15.10.4.1",
+ "description": "Checking by using eval, pattern is Math and flags is eval(\"\\\"g\\\"\")",
+ "test": "__re = new RegExp(Math,eval(\"\\\"g\\\"\"));\n\n//CHECK#1\nif (__re.ignoreCase !== false) {\n\t$ERROR('#1: __re = new RegExp(Math,eval(\"\\\\\"g\\\\\"\")); __re.ignoreCase === false. Actual: ' + (__re.ignoreCase));\n}\n\n//CHECK#2\nif (__re.multiline !== false) {\n\t$ERROR('#2: __re = new RegExp(Math,eval(\"\\\\\"g\\\\\"\")); __re.multiline === false. Actual: ' + (__re.multiline));\n}\n\n//CHECK#3\nif (__re.global !== true) {\n\t$ERROR('#3: __re = new RegExp(Math,eval(\"\\\\\"g\\\\\"\")); __re.global === true. Actual: ' + (__re.global));\n}\n\n//CHECK#4\nif (__re.lastIndex !== 0) {\n\t$ERROR('#4: __re = new RegExp(Math,eval(\"\\\\\"g\\\\\"\")); __re.lastIndex === 0. Actual: ' + (__re.lastIndex));\n}\n\n//CHECK#5\nif (typeof __re.source === \"undefined\") {\n\t$ERROR('#5: __re = new RegExp(Math,eval(\"\\\\\"g\\\\\"\")); typeof __re.source !== \"undefined\"');\n}\n\n",
+ "id": "S15.10.4.1_A8_T11"
+ },
+ {
+ "section": "15.10.4.1",
+ "description": ": Pattern is \"\\u0042\" and flags is {toString:void 0, valueOf:function(){throw \"invalof\";} };",
+ "test": "//CHECK#1\ntry {\n\t$ERROR('#1.1: new RegExp(\"\\\\u0042\", {toString:void 0, valueOf:function(){throw \"invalof\";}}) throw \"invalof\". Actual: ' + (new RegExp(\"\\u0042\", {toString:void 0, valueOf:function(){throw \"invalof\";}})));\n} catch (e) {\n\tif (e !== \"invalof\" ) {\n\t\t$ERROR('#1.2: new RegExp(\"\\\\u0042\", {toString:void 0, valueOf:function(){throw \"invalof\";}}) throw \"invalof\". Actual: ' + (e));\n\t}\n}\n\n",
+ "id": "S15.10.4.1_A8_T12"
+ },
+ {
+ "section": "15.10.4.1",
+ "description": ": Pattern is \"1\" and flags is {toString:function(){throw \"intostr\";} };",
+ "test": "//CHECK#1\ntry {\n\t$ERROR('#1.1: new RegExp(\"1\", {toString:function(){throw \"intostr\";}}) throw \"intostr\". Actual: ' + (new RegExp(\"1\", {toString:function(){throw \"intostr\";}})));\n} catch (e) {\n\tif (e !== \"intostr\" ) {\n\t\t$ERROR('#1.2: new RegExp(\"1\", {toString:function(){throw \"intostr\";}}) throw \"intostr\". Actual: ' + (e));\n\t}\n}\n\n",
+ "id": "S15.10.4.1_A8_T13"
+ },
+ {
+ "section": "15.10.4.1",
+ "description": ": Pattern is function(){return \"a|b|[]\";}() and flags is \"ig\";",
+ "test": "__re = new RegExp(function(){return \"a|b|[]\";}(),\"ig\");\n\n//CHECK#1\nif (__re.ignoreCase !== true) {\n\t$ERROR('#1: __re = new RegExp(function(){return \"a|b|[]\"; __re.ignoreCase === true. Actual: ' + (__re.ignoreCase));\n}\n\n//CHECK#2\nif (__re.multiline !== false) {\n\t$ERROR('#2: __re = new RegExp(function(){return \"a|b|[]\"; __re.multiline === false. Actual: ' + (__re.multiline));\n}\n\n//CHECK#3\nif (__re.global !== true) {\n\t$ERROR('#3: __re = new RegExp(function(){return \"a|b|[]\"; __re.global === true. Actual: ' + (__re.global));\n}\n\n//CHECK#4\nif (__re.lastIndex !== 0) {\n\t$ERROR('#4: __re = new RegExp(function(){return \"a|b|[]\"; __re.lastIndex === 0. Actual: ' + (__re.lastIndex));\n}\n\n//CHECK#5\nif (typeof __re.source === \"undefined\") {\n\t$ERROR('#5: __re = new RegExp(function(){return \"a|b|[]\"; typeof __re.source !== \"undefined\"');\n}\n\n",
+ "id": "S15.10.4.1_A8_T2"
+ },
+ {
+ "section": "15.10.4.1",
+ "description": ": Pattern is {toString:function(){return \"[0-9]\";}} and flags is (function(){return \"m\";})();",
+ "test": "__re = new RegExp({toString:function(){return \"[0-9]\";}}, (function(){return \"m\";})());\n\n//CHECK#1\nif (__re.ignoreCase !== false) {\n\t$ERROR('#1: __re = new RegExp({toString:function(){return \"[0-9]\"; __re.ignoreCase === false. Actual: ' + (__re.ignoreCase));\n}\n\n//CHECK#2\nif (__re.multiline !== true) {\n\t$ERROR('#2: __re = new RegExp({toString:function(){return \"[0-9]\"; __re.multiline === true. Actual: ' + (__re.multiline));\n}\n\n//CHECK#3\nif (__re.global !== false) {\n\t$ERROR('#3: __re = new RegExp({toString:function(){return \"[0-9]\"; __re.global === false. Actual: ' + (__re.global));\n}\n\n//CHECK#4\nif (__re.lastIndex !== 0) {\n\t$ERROR('#4: __re = new RegExp({toString:function(){return \"[0-9]\"; __re.lastIndex === 0. Actual: ' + (__re.lastIndex));\n}\n\n//CHECK#5\nif (typeof __re.source === \"undefined\") {\n\t$ERROR('#5: __re = new RegExp({toString:function(){return \"[0-9]\"; typeof __re.source !== \"undefined\"');\n}\n\n",
+ "id": "S15.10.4.1_A8_T3"
+ },
+ {
+ "section": "15.10.4.1",
+ "description": ": Pattern is {toString:void 0,valueOf:function(){return \"[z-z]\";}} and flags is {toString:void 0,valueOf:function(){return \"mig\";}};",
+ "test": "__re = new RegExp({toString:void 0,valueOf:function(){return \"[z-z]\";}}, {toString:void 0,valueOf:function(){return \"mig\";}});\n\n//CHECK#1\nif (__re.ignoreCase !== true) {\n\t$ERROR('#1: __re = new RegExp({toString:void 0,valueOf:function(){return \"[z-z]\"; __re.ignoreCase === true. Actual: ' + (__re.ignoreCase));\n}\n\n//CHECK#2\nif (__re.multiline !== true) {\n\t$ERROR('#2: __re = new RegExp({toString:void 0,valueOf:function(){return \"[z-z]\"; __re.multiline === true. Actual: ' + (__re.multiline));\n}\n\n//CHECK#3\nif (__re.global !== true) {\n\t$ERROR('#3: __re = new RegExp({toString:void 0,valueOf:function(){return \"[z-z]\"; __re.global === true. Actual: ' + (__re.global));\n}\n\n//CHECK#4\nif (__re.lastIndex !== 0) {\n\t$ERROR('#4: __re = new RegExp({toString:void 0,valueOf:function(){return \"[z-z]\"; __re.lastIndex === 0. Actual: ' + (__re.lastIndex));\n}\n\n//CHECK#5\nif (typeof __re.source === \"undefined\") {\n\t$ERROR('#5: __re = new RegExp({toString:void 0,valueOf:function(){return \"[z-z]\"; typeof __re.source !== \"undefined\"');\n}\n\n",
+ "id": "S15.10.4.1_A8_T4"
+ },
+ {
+ "section": "15.10.4.1",
+ "description": ": Pattern is new Object(\"abc{1}\") and flags is {toString:function(){return \"\";}};",
+ "test": "__re = new RegExp(new Object(\"abc{1}\"), {toString:function(){return \"\";}});\n\n//CHECK#1\nif (__re.ignoreCase !== false) {\n\t$ERROR('#1: __re = new RegExp(new Object(\"abc{1}\"), {toString:function(){return \"\"; __re.ignoreCase === false. Actual: ' + (__re.ignoreCase));\n}\n\n//CHECK#2\nif (__re.multiline !== false) {\n\t$ERROR('#2: __re = new RegExp(new Object(\"abc{1}\"), {toString:function(){return \"\"; __re.multiline === false. Actual: ' + (__re.multiline));\n}\n\n//CHECK#3\nif (__re.global !== false) {\n\t$ERROR('#3: __re = new RegExp(new Object(\"abc{1}\"), {toString:function(){return \"\"; __re.global === false. Actual: ' + (__re.global));\n}\n\n//CHECK#4\nif (__re.lastIndex !== 0) {\n\t$ERROR('#4: __re = new RegExp(new Object(\"abc{1}\"), {toString:function(){return \"\"; __re.lastIndex === 0. Actual: ' + (__re.lastIndex));\n}\n\n//CHECK#5\nif (typeof __re.source === \"undefined\") {\n\t$ERROR('#5: __re = new RegExp(new Object(\"abc{1}\"), {toString:function(){return \"\"; typeof __re.source !== \"undefined\"');\n}\n\n",
+ "id": "S15.10.4.1_A8_T5"
+ },
+ {
+ "section": "15.10.4.1",
+ "description": ": Pattern is {toString:function(){throw \"intostr\";} } and flags is \"i\";",
+ "test": "//CHECK#1\ntry {\n\t$ERROR('#1.1: new RegExp({toString:function(){throw \"intostr\";}}, \"i\") throw \"intostr\". Actual: ' + (new RegExp({toString:function(){throw \"intostr\";}}, \"i\")));\n} catch (e) {\n\tif (e !== \"intostr\" ) {\n\t\t$ERROR('#1.2: new RegExp({toString:function(){throw \"intostr\";}}, \"i\") throw \"intostr\". Actual: ' + (e));\n\t}\n}\n\n",
+ "id": "S15.10.4.1_A8_T6"
+ },
+ {
+ "section": "15.10.4.1",
+ "description": ": Pattern is {toString:void 0, valueOf:function(){throw \"invalof\";} } and flags is \"i\";",
+ "test": "//CHECK#1\ntry {\n\t$ERROR('#1.1: new RegExp({toString:void 0, valueOf:function(){throw \"invalof\";}}) throw \"invalof\". Actual: ' + (new RegExp({toString:void 0, valueOf:function(){throw \"invalof\";}})));\n} catch (e) {\n\tif (e !== \"invalof\" ) {\n\t\t$ERROR('#1.2: new RegExp({toString:void 0, valueOf:function(){throw \"invalof\";}}) throw \"invalof\". Actual: ' + (e));\n\t}\n}\n\n",
+ "id": "S15.10.4.1_A8_T7"
+ },
+ {
+ "section": "15.10.4.1",
+ "description": ": Pattern is {toString:function(){throw \"intostr\";} } and flags is \"error\";",
+ "test": "//CHECK#1\ntry {\n\t$ERROR('#1.1: new RegExp({toString:function(){throw \"intostr\";}}, \"error\") throw \"intostr\". Actual: ' + (new RegExp({toString:function(){throw \"intostr\";}}, \"error\")));\n} catch (e) {\n\tif (e !== \"intostr\" ) {\n\t\t$ERROR('#1.2: new RegExp({toString:function(){throw \"intostr\";}}, \"error\") throw \"intostr\". Actual: ' + (e));\n\t}\n}\n\n",
+ "id": "S15.10.4.1_A8_T8"
+ },
+ {
+ "section": "15.10.4.1",
+ "description": "Pattern is 1 and flags is new Object(\"gi\")",
+ "test": "__re = new RegExp(1, new Object(\"gi\"));\n\n//CHECK#1\nif (__re.ignoreCase !== true) {\n\t$ERROR('#1: __re = new RegExp(1, new Object(\"gi\")); __re.ignoreCase === true. Actual: ' + (__re.ignoreCase));\n}\n\n//CHECK#2\nif (__re.multiline !== false) {\n\t$ERROR('#2: __re = new RegExp(1, new Object(\"gi\")); __re.multiline === false. Actual: ' + (__re.multiline));\n}\n\n//CHECK#3\nif (__re.global !== true) {\n\t$ERROR('#3: __re = new RegExp(1, new Object(\"gi\")); __re.global === true. Actual: ' + (__re.global));\n}\n\n//CHECK#4\nif (__re.lastIndex !== 0) {\n\t$ERROR('#4: __re = new RegExp(1, new Object(\"gi\")); __re.lastIndex === 0. Actual: ' + (__re.lastIndex));\n}\n\n//CHECK#5\nif (typeof __re.source === \"undefined\") {\n\t$ERROR('#5: __re = new RegExp(1, new Object(\"gi\")); typeof __re.source !== \"undefined\"');\n}\n\n",
+ "id": "S15.10.4.1_A8_T9"
+ },
+ {
+ "section": "15.10.4.1",
+ "description": "Pattern is \"??\"",
+ "test": "//CHECK#1\ntry {\n\t$ERROR('#1.1: new RegExp(\"??\") throw SyntaxError. Actual: ' + (new RegExp(\"??\")));\n} catch (e) {\n\tif ((e instanceof SyntaxError) !== true) {\n\t\t$ERROR('#1.2: new RegExp(\"??\") throw SyntaxError. Actual: ' + (e));\n\t}\n}\n\n",
+ "id": "S15.10.4.1_A9_T1"
+ },
+ {
+ "section": "15.10.4.1",
+ "description": "Pattern is \"[{-z]\"",
+ "test": "//CHECK#1\ntry {\n\t$ERROR('#1.1: new RegExp(\"[{-z]\") throw SyntaxError. Actual: ' + (new RegExp(\"[{-z]\")));\n} catch (e) {\n\tif ((e instanceof SyntaxError) !== true) {\n\t\t$ERROR('#1.2: new RegExp(\"[{-z]\") throw SyntaxError. Actual: ' + (e));\n\t}\n}\n\n",
+ "id": "S15.10.4.1_A9_T2"
+ },
+ {
+ "section": "15.10.4.1",
+ "description": "Pattern is \"[a--z]\"",
+ "test": "//CHECK#1\ntry {\n\t$ERROR('#1.1: new RegExp(\"[a--z]\") throw SyntaxError. Actual: ' + (new RegExp(\"[a--z]\")));\n} catch (e) {\n\tif ((e instanceof SyntaxError) !== true) {\n\t\t$ERROR('#1.2: new RegExp(\"[a--z]\") throw SyntaxError. Actual: ' + (e));\n\t}\n}\n\n",
+ "id": "S15.10.4.1_A9_T3"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.10.5_Properties_of_the_RegExp_Constructor.json b/website/resources/scripts/testcases2/15.10.5_Properties_of_the_RegExp_Constructor.json
new file mode 100644
index 000000000..bfb09e1e8
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.10.5_Properties_of_the_RegExp_Constructor.json
@@ -0,0 +1,50 @@
+{
+ "testCollection": {
+ "name": "15.10.5_Properties_of_the_RegExp_Constructor",
+ "numTests": 7,
+ "tests": [
+ {
+ "section": "15.10.5.1",
+ "description": "Checking RegExp.prototype property",
+ "test": "//CHECK#1\nif (RegExp.hasOwnProperty('prototype') !== true) {\n\t$ERROR('#1: RegExp.hasOwnProperty(\\'prototype\\') === true');\n}\n\n",
+ "id": "S15.10.5.1_A1"
+ },
+ {
+ "section": "15.10.5.1",
+ "description": "Checking if enumerating the RegExp.prototype property fails",
+ "test": "//CHECK#0\nif (RegExp.hasOwnProperty('prototype') !== true) {\n\t$ERROR('#0: RegExp.hasOwnProperty(\\'prototype\\') === true');\n}\n\n //CHECK#1\nif (RegExp.propertyIsEnumerable('prototype') !== false) {\n\t$ERROR('#1: RegExp.propertyIsEnumerable(\\'prototype\\') === false');\n}\n\n //CHECK#2\ncount=0;\nfor (p in RegExp){\n\tif (p===\"prototype\") count++;\n}\n\nif (count !== 0) {\n\t$ERROR('#2: count=0; for (p in RegExp){ if (p===\"prototype\") count++; } count === 0. Actual: ' + (count));\n}\n\n",
+ "id": "S15.10.5.1_A2"
+ },
+ {
+ "section": "15.10.5.1",
+ "description": "Checking if deleting the RegExp.prototype property fails",
+ "test": "//CHECK#0\nif (RegExp.hasOwnProperty('prototype') !== true) {\n\t$FAIL('#0: RegExp.hasOwnProperty(\\'prototype\\') === true');\n}\n\n//CHECK#1\nif (delete RegExp.prototype !== false) {\n $ERROR('#1: delete RegExp.prototype === false');\n}\n\n//CHECK#2\nif (RegExp.hasOwnProperty('prototype') !== true) {\n\t$ERROR('#2: delete RegExp.prototype; RegExp.hasOwnProperty(\\'prototype\\') === true');\n}\n\n",
+ "id": "S15.10.5.1_A3"
+ },
+ {
+ "section": "15.10.5.1",
+ "description": "Checking if varying the RegExp.prototype property fails",
+ "test": "//CHECK#1\nif (RegExp.hasOwnProperty('prototype') !== true) {\n\t$FAIL('#1: RegExp.hasOwnProperty(\\'prototype\\') === true');\n}\n\n__obj = RegExp.prototype;\n\nRegExp.prototype = function(){return \"shifted\";};\n\n//CHECK#2\nif (RegExp.prototype !== __obj) {\n\t$ERROR('#2: __obj = RegExp.prototype; RegExp.prototype = function(){return \"shifted\";}; RegExp.prototype === __obj. Actual: ' + (RegExp.prototype));\n}\n\n",
+ "id": "S15.10.5.1_A4"
+ },
+ {
+ "section": "15.10.5",
+ "description": "Checking RegExp.length property",
+ "test": " //CHECK#1\nif (RegExp.length !== 2) {\n\t$ERROR('#1: RegExp.length === 2. Actual: ' + (RegExp.length));\n}\n\n",
+ "id": "S15.10.5_A1"
+ },
+ {
+ "section": "15.10.5",
+ "description": "Checking Function.prototype.isPrototypeOf(RegExp)",
+ "test": " //CHECK#1\nif (Function.prototype.isPrototypeOf(RegExp) !== true) {\n\t$ERROR('#1: Function.prototype.isPrototypeOf(RegExp) === true');\n}\n\n",
+ "id": "S15.10.5_A2_T1"
+ },
+ {
+ "section": "15.10.5",
+ "description": "Add new property to Function.prototype and then check this property of RegExp",
+ "test": "Function.prototype.indicator = 1;\n\n //CHECK#1\nif (RegExp.indicator !== 1) {\n\t$ERROR('#1: Function.prototype.indicator = 1; RegExp.indicator === 1. Actual: ' + (RegExp.indicator));\n}\n\n",
+ "id": "S15.10.5_A2_T2"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.10.6.2.json b/website/resources/scripts/testcases2/15.10.6.2.json
new file mode 100644
index 000000000..c84ab3462
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.10.6.2.json
@@ -0,0 +1,14 @@
+{
+ "testCollection": {
+ "name": "15.10.6.2",
+ "numTests": 1,
+ "tests": [
+ {
+ "id": "15.10.6.2-9-e-1",
+ "path": "TestCases/chapter15/15.10/15.10.6/15.10.6.2/15.10.6.2-9-e-1.js",
+ "description": "RegExp.prototype.exec - the removed step 9.e won't affected current algorithm",
+ "test": "assertTrue((function testcase() {\n var str = \"Hello World!\";\n var regObj = new RegExp(\"World\");\n var result = false;\n result = regObj.exec(str).toString() === \"World\";\n return result;\n }).call(this));\n"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.10.6.2_RegExp.prototype.exec.json b/website/resources/scripts/testcases2/15.10.6.2_RegExp.prototype.exec.json
new file mode 100644
index 000000000..25211d20c
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.10.6.2_RegExp.prototype.exec.json
@@ -0,0 +1,368 @@
+{
+ "testCollection": {
+ "name": "15.10.6.2_RegExp.prototype.exec",
+ "numTests": 60,
+ "tests": [
+ {
+ "section": "15.10.6.2",
+ "description": "Checking if varying the RegExp.prototype.exec.length property fails",
+ "test": "//CHECK#1\nif (RegExp.prototype.exec.hasOwnProperty('length') !== true) {\n $FAIL('#1: RegExp.prototype.exec.hasOwnProperty(\\'length\\') === true');\n}\n\n__obj = RegExp.prototype.exec.length;\n\nRegExp.prototype.exec.length = function(){return \"shifted\";};\n\n//CHECK#2\nif (RegExp.prototype.exec.length !== __obj) {\n $ERROR('#2: __obj = RegExp.prototype.exec.length; RegExp.prototype.exec.length = function(){return \"shifted\";}; RegExp.prototype.exec.length === __obj. Actual: ' + (RegExp.prototype.exec.length));\n}\n",
+ "id": "S15.10.6.2_A10"
+ },
+ {
+ "section": "15.10.6.2",
+ "description": "Checking RegExp.prototype.exec.length",
+ "test": "//CHECK#1\nif (RegExp.prototype.exec.hasOwnProperty(\"length\") !== true) {\n $FAIL('#1: RegExp.prototype.exec.hasOwnProperty(\\'length\\') === true');\n}\n\n//CHECK#2\nif (RegExp.prototype.exec.length !== 1) {\n $ERROR('#2: RegExp.prototype.exec.length === 1. Actual: ' + (RegExp.prototype.exec.length));\n}\n\n",
+ "id": "S15.10.6.2_A11"
+ },
+ {
+ "section": "15.10.6.2",
+ "description": "Checking RegExp.prototype.exec",
+ "test": "(/foo/).test('xfoox');\nvar match = new RegExp('(.|\\r|\\n)*','').exec()[0];\nif (match === 'xfoox') {\n $FAIL('#1: regExp.exec() leaks match globally');\n}\nif (match !== 'undefined') {\n $FAIL('#2: regExp.exec() must coerce absent first arg to \"undefined\"');\n}\n",
+ "id": "S15.10.6.2_A12"
+ },
+ {
+ "section": "15.10.6.2",
+ "description": "String is \"123\" and RegExp is /1|12/",
+ "test": "__executed = /1|12/.exec(\"123\");\n\n__expected = [\"1\"];\n__expected.index=0;\n__expected.input=\"123\";\n\n//CHECK#0\nif ((__executed instanceof Array) !== true) {\n\t$ERROR('#0: __executed = /1|12/.exec(\"123\"); (__executed instanceof Array) === true');\n}\n\n//CHECK#1\nif (__executed.length !== __expected.length) {\n $ERROR('#1: __executed = /1|12/.exec(\"123\"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length);\n}\n\n//CHECK#2\nif (__executed.index !== __expected.index) {\n $ERROR('#2: __executed = /1|12/.exec(\"123\"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index);\n}\n\n//CHECK#3\nif (__executed.input !== __expected.input) {\n $ERROR('#3: __executed = /1|12/.exec(\"123\"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input);\n}\n\n//CHECK#4\nfor(var index=0; index<__expected.length; index++) {\n if (__executed[index] !== __expected[index]) {\n $ERROR('#4: __executed = /1|12/.exec(\"123\"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]);\n }\n}\n\n",
+ "id": "S15.10.6.2_A1_T1"
+ },
+ {
+ "section": "15.10.6.2",
+ "description": "String is 1.01 and RegExp is /1|12/",
+ "test": "__executed = /1|12/.exec(1.01);\n\n__expected = [\"1\"];\n__expected.index=0;\n__expected.input=\"1.01\";\n\n//CHECK#0\nif ((__executed instanceof Array) !== true) {\n\t$ERROR('#0: __executed = /1|12/.exec(1.01); (__executed instanceof Array) === true');\n}\n\n//CHECK#1\nif (__executed.length !== __expected.length) {\n $ERROR('#1: __executed = /1|12/.exec(1.01); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length);\n}\n\n//CHECK#2\nif (__executed.index !== __expected.index) {\n $ERROR('#2: __executed = /1|12/.exec(1.01); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index);\n}\n\n//CHECK#3\nif (__executed.input !== __expected.input) {\n $ERROR('#3: __executed = /1|12/.exec(1.01); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input);\n}\n\n//CHECK#4\nfor(var index=0; index<__expected.length; index++) {\n if (__executed[index] !== __expected[index]) {\n $ERROR('#4: __executed = /1|12/.exec(1.01); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]);\n }\n}\n\n",
+ "id": "S15.10.6.2_A1_T10"
+ },
+ {
+ "section": "15.10.6.2",
+ "description": "String is new Number(1.012) and RegExp is /2|12/",
+ "test": "__executed = /2|12/.exec(new Number(1.012));\n\n__expected = [\"12\"];\n__expected.index=3;\n__expected.input=\"1.012\";\n\n//CHECK#0\nif ((__executed instanceof Array) !== true) {\n\t$ERROR('#0: __executed = /2|12/.exec(new Number(1.012)); (__executed instanceof Array) === true');\n}\n\n//CHECK#1\nif (__executed.length !== __expected.length) {\n $ERROR('#1: __executed = /2|12/.exec(new Number(1.012)); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length);\n}\n\n//CHECK#2\nif (__executed.index !== __expected.index) {\n $ERROR('#2: __executed = /2|12/.exec(new Number(1.012)); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index);\n}\n\n//CHECK#3\nif (__executed.input !== __expected.input) {\n $ERROR('#3: __executed = /2|12/.exec(new Number(1.012)); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input);\n}\n\n//CHECK#4\nfor(var index=0; index<__expected.length; index++) {\n if (__executed[index] !== __expected[index]) {\n $ERROR('#4: __executed = /2|12/.exec(new Number(1.012)); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]);\n }\n}\n\n",
+ "id": "S15.10.6.2_A1_T11"
+ },
+ {
+ "section": "15.10.6.2",
+ "description": ": String is {toString:function(){return Math.PI;}} and RegExp is /\\.14/;",
+ "test": "__executed = /\\.14/.exec({toString:function(){return Math.PI}});\n\n__expected = [\".14\"];\n__expected.index=1;\n__expected.input=String(Math.PI);\n\n//CHECK#0\nif ((__executed instanceof Array) !== true) {\n\t$ERROR('#0: __executed = /\\\\.14/.exec({toString:function(){return Math.PI}}); (__executed instanceof Array) === true');\n}\n\n//CHECK#1\nif (__executed.length !== __expected.length) {\n $ERROR('#1: __executed = /\\\\.14/.exec({toString:function(){return Math.PI}}); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length);\n}\n\n//CHECK#2\nif (__executed.index !== __expected.index) {\n $ERROR('#2: __executed = /\\\\.14/.exec({toString:function(){return Math.PI}}); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index);\n}\n\n//CHECK#3\nif (__executed.input !== __expected.input) {\n $ERROR('#3: __executed = /\\\\.14/.exec({toString:function(){return Math.PI}}); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input);\n}\n\n//CHECK#4\nfor(var index=0; index<__expected.length; index++) {\n if (__executed[index] !== __expected[index]) {\n $ERROR('#4: __executed = /\\\\.14/.exec({toString:function(){return Math.PI}}); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]);\n }\n}\n\n",
+ "id": "S15.10.6.2_A1_T12"
+ },
+ {
+ "section": "15.10.6.2",
+ "description": "String is true and RegExp is /t[a-b|q-s]/",
+ "test": "__executed = /t[a-b|q-s]/.exec(true);\n\n__expected = [\"tr\"];\n__expected.index=0;\n__expected.input=\"true\";\n\n//CHECK#0\nif ((__executed instanceof Array) !== true) {\n\t$ERROR('#0: __executed = /t[a-b|q-s]/.exec(true); (__executed instanceof Array) === true');\n}\n\n//CHECK#1\nif (__executed.length !== __expected.length) {\n $ERROR('#1: __executed = /t[a-b|q-s]/.exec(true); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length);\n}\n\n//CHECK#2\nif (__executed.index !== __expected.index) {\n $ERROR('#2: __executed = /t[a-b|q-s]/.exec(true); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index);\n}\n\n//CHECK#3\nif (__executed.input !== __expected.input) {\n $ERROR('#3: __executed = /t[a-b|q-s]/.exec(true); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input);\n}\n\n//CHECK#4\nfor(var index=0; index<__expected.length; index++) {\n if (__executed[index] !== __expected[index]) {\n $ERROR('#4: __executed = /t[a-b|q-s]/.exec(true); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]);\n }\n}\n\n",
+ "id": "S15.10.6.2_A1_T13"
+ },
+ {
+ "section": "15.10.6.2",
+ "description": "String is new Boolean and RegExp is /AL|se/",
+ "test": "__executed = /AL|se/.exec(new Boolean);\n\n__expected = [\"se\"];\n__expected.index=3;\n__expected.input=\"false\";\n\n//CHECK#0\nif ((__executed instanceof Array) !== true) {\n\t$ERROR('#0: __executed = /AL|se/.exec(new Boolean); (__executed instanceof Array) === true');\n}\n\n//CHECK#1\nif (__executed.length !== __expected.length) {\n $ERROR('#1: __executed = /AL|se/.exec(new Boolean); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length);\n}\n\n//CHECK#2\nif (__executed.index !== __expected.index) {\n $ERROR('#2: __executed = /AL|se/.exec(new Boolean); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index);\n}\n\n//CHECK#3\nif (__executed.input !== __expected.input) {\n $ERROR('#3: __executed = /AL|se/.exec(new Boolean); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input);\n}\n\n//CHECK#4\nfor(var index=0; index<__expected.length; index++) {\n if (__executed[index] !== __expected[index]) {\n $ERROR('#4: __executed = /AL|se/.exec(new Boolean); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]);\n }\n}\n\n",
+ "id": "S15.10.6.2_A1_T14"
+ },
+ {
+ "section": "15.10.6.2",
+ "description": ": String is {toString:function(){return false;}} and RegExp is /LS/i;",
+ "test": "__executed = /LS/i.exec({toString:function(){return false}});\n\n__expected = [\"ls\"];\n__expected.index=2;\n__expected.input=\"false\";\n\n//CHECK#0\nif ((__executed instanceof Array) !== true) {\n\t$ERROR('#0: __executed = /LS/i.exec({toString:function(){return false}}); (__executed instanceof Array) === true');\n}\n\n//CHECK#1\nif (__executed.length !== __expected.length) {\n $ERROR('#1: __executed = /LS/i.exec({toString:function(){return false}}); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length);\n}\n\n//CHECK#2\nif (__executed.index !== __expected.index) {\n $ERROR('#2: __executed = /LS/i.exec({toString:function(){return false}}); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index);\n}\n\n//CHECK#3\nif (__executed.input !== __expected.input) {\n $ERROR('#3: __executed = /LS/i.exec({toString:function(){return false}}); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input);\n}\n\n//CHECK#4\nfor(var index=0; index<__expected.length; index++) {\n if (__executed[index] !== __expected[index]) {\n $ERROR('#4: __executed = /LS/i.exec({toString:function(){return false}}); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]);\n }\n}\n\n",
+ "id": "S15.10.6.2_A1_T15"
+ },
+ {
+ "section": "15.10.6.2",
+ "description": "RegExp is /undefined/ and call exec() without arguments",
+ "test": "__re = /undefined/.exec()[0];\nif (__re !== \"undefined\") {\n\t$ERROR('#1: /undefined/.exec()[0] === \"undefined\". Actual: ' + (__re));\n}\n\n",
+ "id": "S15.10.6.2_A1_T16"
+ },
+ {
+ "section": "15.10.6.2",
+ "description": "String is null and RegExp is /ll|l/",
+ "test": "__executed = /ll|l/.exec(null);\n\n__expected = [\"ll\"];\n__expected.index=2;\n__expected.input=\"null\";\n\n//CHECK#0\nif ((__executed instanceof Array) !== true) {\n\t$ERROR('#0: __executed = /ll|l/.exec(null); (__executed instanceof Array) === true');\n}\n\n//CHECK#1\nif (__executed.length !== __expected.length) {\n $ERROR('#1: __executed = /ll|l/.exec(null); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length);\n}\n\n//CHECK#2\nif (__executed.index !== __expected.index) {\n $ERROR('#2: __executed = /ll|l/.exec(null); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index);\n}\n\n//CHECK#3\nif (__executed.input !== __expected.input) {\n $ERROR('#3: __executed = /ll|l/.exec(null); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input);\n}\n\n//CHECK#4\nfor(var index=0; index<__expected.length; index++) {\n if (__executed[index] !== __expected[index]) {\n $ERROR('#4: __executed = /ll|l/.exec(null); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]);\n }\n}\n\n",
+ "id": "S15.10.6.2_A1_T17"
+ },
+ {
+ "section": "15.10.6.2",
+ "description": "String is undefined and RegExp is /nd|ne/",
+ "test": "__executed = /nd|ne/.exec(undefined);\n\n__expected = [\"nd\"];\n__expected.index=1;\n__expected.input=\"undefined\";\n\n//CHECK#0\nif ((__executed instanceof Array) !== true) {\n\t$ERROR('#0: __executed = /nd|ne/.exec(undefined); (__executed instanceof Array) === true');\n}\n\n//CHECK#1\nif (__executed.length !== __expected.length) {\n $ERROR('#1: __executed = /nd|ne/.exec(undefined); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length);\n}\n\n//CHECK#2\nif (__executed.index !== __expected.index) {\n $ERROR('#2: __executed = /nd|ne/.exec(undefined); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index);\n}\n\n//CHECK#3\nif (__executed.input !== __expected.input) {\n $ERROR('#3: __executed = /nd|ne/.exec(undefined); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input);\n}\n\n//CHECK#4\nfor(var index=0; index<__expected.length; index++) {\n if (__executed[index] !== __expected[index]) {\n $ERROR('#4: __executed = /nd|ne/.exec(undefined); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]);\n }\n}\n\n",
+ "id": "S15.10.6.2_A1_T18"
+ },
+ {
+ "section": "15.10.6.2",
+ "description": "String is void 0 and RegExp is /e{1}/",
+ "test": "__executed = /e{1}/.exec(void 0);\n\n__expected = [\"e\"];\n__expected.index=3;\n__expected.input=\"undefined\";\n\n//CHECK#0\nif ((__executed instanceof Array) !== true) {\n\t$ERROR('#0: __executed = /e{1}/.exec(void 0); (__executed instanceof Array) === true');\n}\n\n//CHECK#1\nif (__executed.length !== __expected.length) {\n $ERROR('#1: __executed = /e{1}/.exec(void 0); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length);\n}\n\n//CHECK#2\nif (__executed.index !== __expected.index) {\n $ERROR('#2: __executed = /e{1}/.exec(void 0); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index);\n}\n\n//CHECK#3\nif (__executed.input !== __expected.input) {\n $ERROR('#3: __executed = /e{1}/.exec(void 0); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input);\n}\n\n//CHECK#4\nfor(var index=0; index<__expected.length; index++) {\n if (__executed[index] !== __expected[index]) {\n $ERROR('#4: __executed = /e{1}/.exec(void 0); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]);\n }\n}\n\n",
+ "id": "S15.10.6.2_A1_T19"
+ },
+ {
+ "section": "15.10.6.2",
+ "description": "String is new String(\"123\") and RegExp is /((1)|(12))((3)|(23))/",
+ "test": "with(/((1)|(12))((3)|(23))/){\n __executed = exec(new String(\"123\"));\n}\n\n__expected = [\"123\", \"1\", \"1\", undefined, \"23\", undefined, \"23\"];\n__expected.index=0;\n__expected.input=\"123\";\n\n//CHECK#0\nif ((__executed instanceof Array) !== true) {\n\t$ERROR('#0: with(/((1)|(12))((3)|(23))/){__executed = exec(new String(\"123\"));} (__executed instanceof Array) === true');\n}\n\n//CHECK#1\nif (__executed.length !== __expected.length) {\n $ERROR('#1: with(/((1)|(12))((3)|(23))/){__executed = exec(new String(\"123\"));} __executed.length === ' + __expected.length + '. Actual: ' + __executed.length);\n}\n\n//CHECK#2\nif (__executed.index !== __expected.index) {\n $ERROR('#2: with(/((1)|(12))((3)|(23))/){__executed = exec(new String(\"123\"));} __executed.index === ' + __expected.index + '. Actual: ' + __executed.index);\n}\n\n//CHECK#3\nif (__executed.input !== __expected.input) {\n $ERROR('#3: with(/((1)|(12))((3)|(23))/){__executed = exec(new String(\"123\"));} __executed.input === ' + __expected.input + '. Actual: ' + __executed.input);\n}\n\n//CHECK#4\nfor(var index=0; index<__expected.length; index++) {\n if (__executed[index] !== __expected[index]) {\n $ERROR('#4: with(/((1)|(12))((3)|(23))/){__executed = exec(new String(\"123\"));} __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]);\n }\n}\n\n",
+ "id": "S15.10.6.2_A1_T2"
+ },
+ {
+ "section": "15.10.6.2",
+ "description": "String is x and RegExp is /[a-f]d/, where x is undefined variable",
+ "test": "__executed = /[a-f]d/.exec(x);\n\n__expected = [\"ed\"];\n__expected.index=7;\n__expected.input=\"undefined\";\n\n//CHECK#0\nif ((__executed instanceof Array) !== true) {\n\t$ERROR('#0: __executed = /[a-f]d/.exec(x); var x; (__executed instanceof Array) === true');\n}\n\n//CHECK#1\nif (__executed.length !== __expected.length) {\n $ERROR('#1: __executed = /[a-f]d/.exec(x); var x; __executed.length === ' + __expected.length + '. Actual: ' + __executed.length);\n}\n\n//CHECK#2\nif (__executed.index !== __expected.index) {\n $ERROR('#2: __executed = /[a-f]d/.exec(x); var x; __executed.index === ' + __expected.index + '. Actual: ' + __executed.index);\n}\n\n//CHECK#3\nif (__executed.input !== __expected.input) {\n $ERROR('#3: __executed = /[a-f]d/.exec(x); var x; __executed.input === ' + __expected.input + '. Actual: ' + __executed.input);\n}\n\n//CHECK#4\nfor(var index=0; index<__expected.length; index++) {\n if (__executed[index] !== __expected[index]) {\n $ERROR('#4: __executed = /[a-f]d/.exec(x); var x; __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]);\n }\n}\n\nvar x;\n",
+ "id": "S15.10.6.2_A1_T20"
+ },
+ {
+ "section": "15.10.6.2",
+ "description": "String is function(){}() and RegExp is /[a-z]n/",
+ "test": "__executed = /[a-z]n/.exec(function(){}());\n\n__expected = [\"un\"];\n__expected.index=0;\n__expected.input=\"undefined\";\n\n//CHECK#0\nif ((__executed instanceof Array) !== true) {\n\t$ERROR('#0: __executed = /[a-z]n/.exec(function(){}()); (__executed instanceof Array) === true');\n}\n\n//CHECK#1\nif (__executed.length !== __expected.length) {\n $ERROR('#1: __executed = /[a-z]n/.exec(function(){}()); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length);\n}\n\n//CHECK#2\nif (__executed.index !== __expected.index) {\n $ERROR('#2: __executed = /[a-z]n/.exec(function(){}()); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index);\n}\n\n//CHECK#3\nif (__executed.input !== __expected.input) {\n $ERROR('#3: __executed = /[a-z]n/.exec(function(){}()); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input);\n}\n\n//CHECK#4\nfor(var index=0; index<__expected.length; index++) {\n if (__executed[index] !== __expected[index]) {\n $ERROR('#4: __executed = /[a-z]n/.exec(function(){}()); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]);\n }\n}\n\n",
+ "id": "S15.10.6.2_A1_T21"
+ },
+ {
+ "section": "15.10.6.2",
+ "description": "String is new Object(\"abcdefghi\") and RegExp is /a[a-z]{2,4}/",
+ "test": "__executed = /a[a-z]{2,4}/.exec(new Object(\"abcdefghi\"));\n\n__expected = [\"abcde\"];\n__expected.index=0;\n__expected.input=\"abcdefghi\";\n\n//CHECK#0\nif ((__executed instanceof Array) !== true) {\n\t$ERROR('#0: __executed = /a[a-z]{2,4}/.exec(new Object(\"abcdefghi\")); (__executed instanceof Array) === true');\n}\n\n//CHECK#1\nif (__executed.length !== __expected.length) {\n $ERROR('#1: __executed = /a[a-z]{2,4}/.exec(new Object(\"abcdefghi\")); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length);\n}\n\n//CHECK#2\nif (__executed.index !== __expected.index) {\n $ERROR('#2: __executed = /a[a-z]{2,4}/.exec(new Object(\"abcdefghi\")); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index);\n}\n\n//CHECK#3\nif (__executed.input !== __expected.input) {\n $ERROR('#3: __executed = /a[a-z]{2,4}/.exec(new Object(\"abcdefghi\")); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input);\n}\n\n//CHECK#4\nfor(var index=0; index<__expected.length; index++) {\n if (__executed[index] !== __expected[index]) {\n $ERROR('#4: __executed = /a[a-z]{2,4}/.exec(new Object(\"abcdefghi\")); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]);\n }\n}\n\n",
+ "id": "S15.10.6.2_A1_T3"
+ },
+ {
+ "section": "15.10.6.2",
+ "description": ": String is {toString:function(){return \"abcdefghi\";}} and RegExp is /a[a-z]{2,4}?/;",
+ "test": "__executed = /a[a-z]{2,4}?/.exec({toString:function(){return \"abcdefghi\"}});\n\n__expected = [\"abc\"];\n__expected.index=0;\n__expected.input=\"abcdefghi\";\n\n//CHECK#0\nif ((__executed instanceof Array) !== true) {\n\t$ERROR('#0: __executed = /a[a-z]{2,4}?/.exec({toString:function(){return \"abcdefghi\"}}); (__executed instanceof Array) === true');\n}\n\n//CHECK#1\nif (__executed.length !== __expected.length) {\n $ERROR('#1: __executed = /a[a-z]{2,4}?/.exec({toString:function(){return \"abcdefghi\"}}); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length);\n}\n\n//CHECK#2\nif (__executed.index !== __expected.index) {\n $ERROR('#2: __executed = /a[a-z]{2,4}?/.exec({toString:function(){return \"abcdefghi\"}}); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index);\n}\n\n//CHECK#3\nif (__executed.input !== __expected.input) {\n $ERROR('#3: __executed = /a[a-z]{2,4}?/.exec({toString:function(){return \"abcdefghi\"}}); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input);\n}\n\n//CHECK#4\nfor(var index=0; index<__expected.length; index++) {\n if (__executed[index] !== __expected[index]) {\n $ERROR('#4: __executed = /a[a-z]{2,4}?/.exec({toString:function(){return \"abcdefghi\"}}); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]);\n }\n}\n\n",
+ "id": "S15.10.6.2_A1_T4"
+ },
+ {
+ "section": "15.10.6.2",
+ "description": ": String is {toString:function(){return {};}, valueOf:function(){return \"aabaac\";}} and RegExp is /(aa|aabaac|ba|b|c)* /;",
+ "test": "__executed = /(aa|aabaac|ba|b|c)*/.exec({toString:function(){return {};}, valueOf:function(){return \"aabaac\";}});\n\n__expected = [\"aaba\", \"ba\"];\n__expected.index=0;\n__expected.input=\"aabaac\";\n\n//CHECK#0\nif ((__executed instanceof Array) !== true) {\n\t$ERROR('#0: __executed = /(aa|aabaac|ba|b|c)*/.exec({toString:function(){return {};}, valueOf:function(){return \"aabaac\";}}); (__executed instanceof Array) === true');\n}\n\n//CHECK#1\nif (__executed.length !== __expected.length) {\n $ERROR('#1: __executed = /(aa|aabaac|ba|b|c)*/.exec({toString:function(){return {};}, valueOf:function(){return \"aabaac\";}}); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length);\n}\n\n//CHECK#2\nif (__executed.index !== __expected.index) {\n $ERROR('#2: __executed = /(aa|aabaac|ba|b|c)*/.exec({toString:function(){return {};}, valueOf:function(){return \"aabaac\";}}); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index);\n}\n\n//CHECK#3\nif (__executed.input !== __expected.input) {\n $ERROR('#3: __executed = /(aa|aabaac|ba|b|c)*/.exec({toString:function(){return {};}, valueOf:function(){return \"aabaac\";}}); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input);\n}\n\n//CHECK#4\nfor(var index=0; index<__expected.length; index++) {\n if (__executed[index] !== __expected[index]) {\n $ERROR('#4: __executed = /(aa|aabaac|ba|b|c)*/.exec({toString:function(){return {};}, valueOf:function(){return \"aabaac\";}}); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]);\n }\n}\n\n",
+ "id": "S15.10.6.2_A1_T5"
+ },
+ {
+ "section": "15.10.6.2",
+ "description": "String is (function(){return \"zaacbbbcac\"})() and RegExp is /(z)((a+)?(b+)?(c))* /",
+ "test": "__executed = /(z)((a+)?(b+)?(c))*/.exec((function(){return \"zaacbbbcac\"})());\n\n__expected = [\"zaacbbbcac\", \"z\", \"ac\", \"a\", undefined, \"c\"];\n__expected.index=0;\n__expected.input=\"zaacbbbcac\";\n\n//CHECK#0\nif ((__executed instanceof Array) !== true) {\n\t$ERROR('#0: __executed = /(z)((a+)?(b+)?(c))*/.exec((function(){return \"zaacbbbcac\"})()); (__executed instanceof Array) === true');\n}\n\n//CHECK#1\nif (__executed.length !== __expected.length) {\n $ERROR('#1: __executed = /(z)((a+)?(b+)?(c))*/.exec((function(){return \"zaacbbbcac\"})()); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length);\n}\n\n//CHECK#2\nif (__executed.index !== __expected.index) {\n $ERROR('#2: __executed = /(z)((a+)?(b+)?(c))*/.exec((function(){return \"zaacbbbcac\"})()); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index);\n}\n\n//CHECK#3\nif (__executed.input !== __expected.input) {\n $ERROR('#3: __executed = /(z)((a+)?(b+)?(c))*/.exec((function(){return \"zaacbbbcac\"})()); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input);\n}\n\n//CHECK#4\nfor(var index=0; index<__expected.length; index++) {\n if (__executed[index] !== __expected[index]) {\n $ERROR('#4: __executed = /(z)((a+)?(b+)?(c))*/.exec((function(){return \"zaacbbbcac\"})()); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]);\n }\n}\n\n",
+ "id": "S15.10.6.2_A1_T6"
+ },
+ {
+ "section": "15.10.6.2",
+ "description": ": String is {toString:function(){throw \"intostr\";}} and RegExp is /[a-z]/;",
+ "test": "//CHECK#1\ntry {\n\t$ERROR('#1.1: /[a-z]/.exec({toString:function(){throw \"intostr\"}}) throw \"intostr\". Actual: ' + (/[a-z]/.exec({toString:function(){throw \"intostr\"}})));\n} catch (e) {\n\tif (e !== \"intostr\") {\n\t\t$ERROR('#1.2: /[a-z]/.exec({toString:function(){throw \"intostr\"}}) throw \"intostr\". Actual: ' + (e));\n\t}\n}\n\n",
+ "id": "S15.10.6.2_A1_T7"
+ },
+ {
+ "section": "15.10.6.2",
+ "description": ": String is {toString:void 0, valueOf:function(){throw \"invalof\";}} and RegExp is /[a-z]/;",
+ "test": "//CHECK#1\ntry {\n $ERROR('#1.1: /[a-z]/.exec({toString:void 0, valueOf:function(){throw \"invalof\"}}) throw \"invalof\". Actual: ' + (/[a-z]/.exec({toString:void 0, valueOf:function(){throw \"invalof\"}})));\n} catch (e) {\n if (e !== \"invalof\") {\n $ERROR('#1.2: /[a-z]/.exec({toString:void 0, valueOf:function(){throw \"invalof\"}}) throw \"invalof\". Actual: ' + (e));\n }\n}\n\n",
+ "id": "S15.10.6.2_A1_T8"
+ },
+ {
+ "section": "15.10.6.2",
+ "description": "String is undefined variable and RegExp is /1|12/",
+ "test": "var __string;\n\n//CHECK#1\n__re = /1|12/;\nif (__re.exec(__string) !== null) {\n\t$ERROR('#1: var __string; /1|12/.exec(__string) === null; function __string(){}. Actual: ' + (__re));\n}\n\nfunction __string(){};\n",
+ "id": "S15.10.6.2_A1_T9"
+ },
+ {
+ "section": "15.10.6.2",
+ "description": "The internal [[Class]] property is \"Object\"",
+ "test": "__instance = new Object;\n\n__instance.exec = RegExp.prototype.exec;\n\n//CHECK#1\ntry {\n\t$ERROR('#1.1: __instance = new Object; __instance.exec = RegExp.prototype.exec; __instance.exec(\"message to investigate\"). Actual: ' + (__instance.exec(\"message to investigate\")));\n} catch (e) {\n\tif ((e instanceof TypeError) !== true) {\n\t\t$ERROR('#1.2: __instance = new Object; __instance.exec = RegExp.prototype.exec. Actual: ' + (e));\n\t}\n}\n\n",
+ "id": "S15.10.6.2_A2_T1"
+ },
+ {
+ "section": "15.10.6.2",
+ "description": "The tested object is undefined",
+ "test": "exec = RegExp.prototype.exec;\n\n//CHECK#1\ntry {\n\t$ERROR('#1.1: exec = RegExp.prototype.exec; exec(\"message to investigate\"). Actual: ' + (exec(\"message to investigate\")));\n} catch (e) {\n\tif ((e instanceof TypeError) !== true) {\n\t\t$ERROR('#1.2: exec = RegExp.prototype.exec; exec(\"message to investigate\"). Actual: ' + (e));\n\t}\n}\n\n",
+ "id": "S15.10.6.2_A2_T10"
+ },
+ {
+ "section": "15.10.6.2",
+ "description": "The tested object is Math",
+ "test": "__instance = Math;\n\n__instance.exec = RegExp.prototype.exec;\n\n//CHECK#1\ntry { \n with(__instance) exec(\"message to investigate\");\n\t$ERROR('#1.1: __instance = Math; __instance.exec = RegExp.prototype.exec; with(__instance) exec(\"message to investigate\")');\n} catch (e) {\n\tif ((e instanceof TypeError) !== true) {\n\t\t$ERROR('#1.2: __instance = Math; __instance.exec = RegExp.prototype.exec; with(__instance) exec(\"message to investigate\"). Actual: ' + (e));\n\t}\n}\n\n",
+ "id": "S15.10.6.2_A2_T2"
+ },
+ {
+ "section": "15.10.6.2",
+ "description": "The tested object is function object",
+ "test": "__instance.exec = RegExp.prototype.exec;\n\n//CHECK#1\ntry {\n with(__instance) exec(\"message to investigate\");\n\t$ERROR('#1.1: __instance.exec = RegExp.prototype.exec; with(__instance) exec(\"message to investigate\"); function __instance(){}');\n} catch (e) {\n\tif ((e instanceof TypeError) !== true) {\n\t\t$ERROR('#1.2: __instance.exec = RegExp.prototype.exec; with(__instance) exec(\"message to investigate\"); function __instance(){}. Actual: ' + (e));\n\t}\n}\n\nfunction __instance(){};\n",
+ "id": "S15.10.6.2_A2_T3"
+ },
+ {
+ "section": "15.10.6.2",
+ "description": "The tested object is new String(\"[a-b]\")",
+ "test": "__instance = new String(\"[a-b]\");\n\n__instance.exec = RegExp.prototype.exec;\n\n//CHECK#1\nwith(__instance){\n try {\n \t$ERROR('#1.1: __instance = new String(\"[a-b]\"); __instance.exec = RegExp.prototype.exec; exec(\"message to investigate\"). Actual: ' + (exec(\"message to investigate\")));\n } catch (e) {\n \tif ((e instanceof TypeError) !== true) {\n \t\t$ERROR('#1.2: __instance = new String(\"[a-b]\"); __instance.exec = RegExp.prototype.exec; exec(\"message to investigate\"). Actual: ' + (e));\n \t}\n }\n}\n\n",
+ "id": "S15.10.6.2_A2_T4"
+ },
+ {
+ "section": "15.10.6.2",
+ "description": "The tested object is new Boolean(false)",
+ "test": "__instance = new Boolean(false);\n\n__instance.exec = RegExp.prototype.exec;\n\n//CHECK#1\nwith(__instance) {\n try {\n $ERROR('#1.1: __instance = new Boolean(false); __instance.exec = RegExp.prototype.exec; exec(\"message to investigate\"). Actual: ' + (exec(\"message to investigate\")));\n } catch (e) {\n if ((e instanceof TypeError !== true)) {\n $ERROR('#1.2: __instance = new Boolean(false); __instance.exec = RegExp.prototype.exec; exec(\"message to investigate\"). Actual: ' + (e));\n }\n } \n}\n\n",
+ "id": "S15.10.6.2_A2_T5"
+ },
+ {
+ "section": "15.10.6.2",
+ "description": "The tested object is new Number(1.0)",
+ "test": "__instance = new Number(1.0);\n\n__instance.exec = RegExp.prototype.exec;\n\n//CHECK#1\ntry {\n\t$ERROR('#1.1: __instance = new Number(1.0); __instance.exec = RegExp.prototype.exec; __instance[\"exec\"](\"message to investigate\"). Actual: ' + (__instance[\"exec\"](\"message to investigate\")));\n} catch (e) {\n\tif ((e instanceof TypeError) !== true) {\n\t\t$ERROR('#1.2: __instance = new Number(1.0); __instance.exec = RegExp.prototype.exec; __instance[\"exec\"](\"message to investigate\"). Actual: ' + (e));\n\t}\n}\n\n",
+ "id": "S15.10.6.2_A2_T6"
+ },
+ {
+ "section": "15.10.6.2",
+ "description": "The tested object is false",
+ "test": "__instance = false;\n\nObject.prototype.exec = RegExp.prototype.exec;\n\n//CHECK#1\ntry {\n\t$ERROR('#1.1: __instance = false; Object.prototype.exec = RegExp.prototype.exec; __instance.exec(\"message to investigate\"). Actual: ' + (__instance.exec(\"message to investigate\")));\n} catch (e) {\n\tif ((e instanceof TypeError) !== true) {\n\t\t$ERROR('#1.2: __instance = false; Object.prototype.exec = RegExp.prototype.exec; __instance.exec(\"message to investigate\"). Actual: ' + (e));\n\t}\n}\n\n",
+ "id": "S15.10.6.2_A2_T7"
+ },
+ {
+ "section": "15.10.6.2",
+ "description": "The tested object is \".\"",
+ "test": "__instance = \".\";\n\nObject.prototype.exec = RegExp.prototype.exec;\n\n//CHECK#1\ntry {\n\t$ERROR('#1.1: __instance = \".\"; Object.prototype.exec = RegExp.prototype.exec; __instance.exec(\"message to investigate\"). Actual: ' + (__instance.exec(\"message to investigate\")));\n} catch (e) {\n\tif ((e instanceof TypeError) !== true) {\n\t\t$ERROR('#1.2: __instance = \".\"; Object.prototype.exec = RegExp.prototype.exec; __instance.exec(\"message to investigate\"). Actual: ' + (e));\n\t}\n}\n\n",
+ "id": "S15.10.6.2_A2_T8"
+ },
+ {
+ "section": "15.10.6.2",
+ "description": "The tested object is 1.0",
+ "test": "__instance = 1.0;\n\nObject.prototype.exec = RegExp.prototype.exec;\n\n//CHECK#1\ntry {\n\t$ERROR('#1.1: __instance = 1.0; Object.prototype.exec = RegExp.prototype.exec; __instance.exec(\"message to investigate\"). Actual: ' + (__instance.exec(\"message to investigate\")));\n} catch (e) {\n\tif ((e instanceof TypeError) !== true) {\n\t\t$ERROR('#1.2: __instance = 1.0; Object.prototype.exec = RegExp.prototype.exec; __instance.exec(\"message to investigate\"). Actual: ' + (e));\n\t}\n}\n\n",
+ "id": "S15.10.6.2_A2_T9"
+ },
+ {
+ "section": "15.10.6.2, 13.2",
+ "description": "RegExp is /(?:ab|cd)\\d?/g and tested string is \"ab cd2 ab34 cd\"",
+ "test": "__re = /(?:ab|cd)\\d?/g;\n\n__matched = [];\n\n__expected = [\"ab\", \"cd2\", \"ab3\", \"cd\"];\n\ndo{\n __executed = __re.exec(\"ab cd2 ab34 cd\");\n if (__executed !== null) {\n __matched.push(__executed[0]);\n } else {\n break;\n }\n}while(true);\n\n//CHECK#1\nif (__expected.length !== __matched.length) {\n\t$ERROR('#1: __executed = /(?:ab|cd)\\\\d?/g.exec(\"ab cd2 ab34 cd\"); __matched.length === ' + (__expected.length) + '.Actual: ' + (__matched.length));\n}\n\n//CHECK#2\nfor(var index=0; index<__expected.length; index++) {\n\tif (__expected[index] !== __matched[index]) {\n\t\t$ERROR('#2: __executed = /(?:ab|cd)\\\\d?/g.exec(\"ab cd2 ab34 cd\"); __matched[' + index + '] === ' + __expected[index] + '. Actual: ' + __matched[index]);\n\t}\n}\n\n",
+ "id": "S15.10.6.2_A3_T1"
+ },
+ {
+ "section": "15.10.6.2, 13.2",
+ "description": "RegExp is /[Nn]evermore/g and tested string is very long string",
+ "test": "__the__raven = \"\tOnce upon a midnight dreary, while I pondered weak and weary,\" +\n \"Over many a quaint and curious volume of forgotten lore,\" +\n \"While I nodded, nearly napping, suddenly there came a tapping,\" +\n \"As of some one gently rapping, rapping at my chamber door.\" +\n \"`'Tis some visitor,' I muttered, `tapping at my chamber door -\" +\n \"Only this, and nothing more.'\" +\n \"Ah, distinctly I remember it was in the bleak December,\" +\n \"And each separate dying ember wrought its ghost upon the floor.\" +\n \"Eagerly I wished the morrow; - vainly I had sought to borrow\" +\n \"From my books surcease of sorrow - sorrow for the lost Lenore -\" +\n \"For the rare and radiant maiden whom the angels named Lenore -\" +\n \"Nameless here for evermore.\" +\n \"\\n\" +\n \"And the silken sad uncertain rustling of each purple curtain\" +\n \"Thrilled me - filled me with fantastic terrors never felt before;\" +\n \"So that now, to still the beating of my heart, I stood repeating\" +\n \"`'Tis some visitor entreating entrance at my chamber door -\" +\n \"Some late visitor entreating entrance at my chamber door; -\" +\n \"This it is, and nothing more,'\" +\n \"Presently my soul grew stronger; hesitating then no longer,\" +\n \"`Sir,' said I, `or Madam, truly your forgiveness I implore;\" +\n \"But the fact is I was napping, and so gently you came rapping,\" +\n \"And so faintly you came tapping, tapping at my chamber door,\" +\n \"That I scarce was sure I heard you' - here I opened wide the door; -\" +\n \"Darkness there, and nothing more.\" +\n \"\\n\" +\n \"Deep into that darkness peering, long I stood there wondering, fearing,\" +\n \"Doubting, dreaming dreams no mortal ever dared to dream before\" +\n \"But the silence was unbroken, and the darkness gave no token,\" +\n \"And the only word there spoken was the whispered word, `Lenore!'\" +\n \"This I whispered, and an echo murmured back the word, `Lenore!'\" +\n \"Merely this and nothing more.\" +\n \"\\n\" +\n \"Back into the chamber turning, all my soul within me burning,\" +\n \"Soon again I heard a tapping somewhat louder than before.\" +\n \"`Surely,' said I, `surely that is something at my window lattice;\" +\n \"Let me see then, what thereat is, and this mystery explore -\" +\n \"Let my heart be still a moment and this mystery explore; -\" +\n \"'Tis the wind and nothing more!'\" +\n \"\\n\" +\n \"Open here I flung the shutter, when, with many a flirt and flutter,\" +\n \"In there stepped a stately raven of the saintly days of yore.\" +\n \"Not the least obeisance made he; not a minute stopped or stayed he;\" +\n \"But, with mien of lord or lady, perched above my chamber door -\" +\n \"Perched upon a bust of Pallas just above my chamber door -\" +\n \"Perched, and sat, and nothing more.\" +\n \"\\n\" +\n \"Then this ebony bird beguiling my sad fancy into smiling,\" +\n \"By the grave and stern decorum of the countenance it wore,\" +\n \"`Though thy crest be shorn and shaven, thou,' I said, `art sure no craven.\" +\n \"Ghastly grim and ancient raven wandering from the nightly shore -\" +\n \"Tell me what thy lordly name is on the Night's Plutonian shore!'\" +\n \"Quoth the raven, `Nevermore.'\" +\n \"-n\" +\n \"Much I marvelled this ungainly fowl to hear discourse so plainly,\" +\n \"Though its answer little meaning - little relevancy bore;\" +\n \"For we cannot help agreeing that no living human being\" +\n \"Ever yet was blessed with seeing bird above his chamber door -\" +\n \"Bird or beast above the sculptured bust above his chamber door,\" +\n \"With such name as `Nevermore.'\" +\n \"\\n\" +\n \"But the raven, sitting lonely on the placid bust, spoke only,\" +\n \"That one word, as if his soul in that one word he did outpour.\" +\n \"Nothing further then he uttered - not a feather then he fluttered -\" +\n \"Till I scarcely more than muttered `Other friends have flown before -\" +\n \"On the morrow he will leave me, as my hopes have flown before.'\" +\n \"Then the bird said, `Nevermore.'\" +\n \"\\n\" +\n \"Startled at the stillness broken by reply so aptly spoken,\" +\n \"`Doubtless,' said I, `what it utters is its only stock and store,\" +\n \"Caught from some unhappy master whom unmerciful disaster\" +\n \"Followed fast and followed faster till his songs one burden bore -\" +\n \"Till the dirges of his hope that melancholy burden bore\" +\n \"Of \\\"Never-nevermore.\\\"'\" +\n \"\\n\" +\n \"But the raven still beguiling all my sad soul into smiling,\" +\n \"Straight I wheeled a cushioned seat in front of bird and bust and door;\" +\n \"Then, upon the velvet sinking, I betook myself to linking\" +\n \"Fancy unto fancy, thinking what this ominous bird of yore -\" +\n \"What this grim, ungainly, ghastly, gaunt, and ominous bird of yore\" +\n \"Meant in croaking `Nevermore.'\" +\n \"\\n\" +\n \"This I sat engaged in guessing, but no syllable expressing\" +\n \"To the fowl whose fiery eyes now burned into my bosom's core;\" +\n \"This and more I sat divining, with my head at ease reclining\" +\n \"On the cushion's velvet lining that the lamp-light gloated o'er,\" +\n \"But whose velvet violet lining with the lamp-light gloating o'er,\" +\n \"She shall press, ah, nevermore!\" +\n \"\\n\" +\n \"Then, methought, the air grew denser, perfumed from an unseen censer\" +\n \"Swung by Seraphim whose foot-falls tinkled on the tufted floor.\" +\n \"`Wretch,' I cried, `thy God hath lent thee - by these angels he has sent thee\" +\n \"Respite - respite and nepenthe from thy memories of Lenore!\" +\n \"Quaff, oh quaff this kind nepenthe, and forget this lost Lenore!'\" +\n \"Quoth the raven, `Nevermore.'\" +\n \"\\n\" +\n \"`Prophet!' said I, `thing of evil! - prophet still, if bird or devil! -\" +\n \"Whether tempter sent, or whether tempest tossed thee here ashore,\" +\n \"Desolate yet all undaunted, on this desert land enchanted -\" +\n \"On this home by horror haunted - tell me truly, I implore -\" +\n \"Is there - is there balm in Gilead? - tell me - tell me, I implore!'\" +\n \"Quoth the raven, `Nevermore.'\" +\n \"\\n\" +\n \"`Prophet!' said I, `thing of evil! - prophet still, if bird or devil!\" +\n \"By that Heaven that bends above us - by that God we both adore -\" +\n \"Tell this soul with sorrow laden if, within the distant Aidenn,\" +\n \"It shall clasp a sainted maiden whom the angels named Lenore -\" +\n \"Clasp a rare and radiant maiden, whom the angels named Lenore?'\" +\n \"Quoth the raven, `Nevermore.'\" +\n \"\\n\" +\n \"`Be that word our sign of parting, bird or fiend!' I shrieked upstarting -\" +\n \"`Get thee back into the tempest and the Night's Plutonian shore!\" +\n \"Leave no black plume as a token of that lie thy soul hath spoken!\" +\n \"Leave my loneliness unbroken! - quit the bust above my door!\" +\n \"Take thy beak from out my heart, and take thy form from off my door!'\" +\n \"Quoth the raven, `Nevermore.'\" +\n \"\\n\" +\n \"And the raven, never flitting, still is sitting, still is sitting\" +\n \"On the pallid bust of Pallas just above my chamber door;\" +\n \"And his eyes have all the seeming of a demon's that is dreaming,\" +\n \"And the lamp-light o'er him streaming throws his shadow on the floor;\" +\n \"And my soul from out that shadow that lies floating on the floor\" +\n \"Shall be lifted - nevermore!\"\n\nNEVERMORE=11; \n \n__re = /[Nn]evermore/g;\n__matched=0;\n\ndo{\n __executed = __re.exec(__the__raven);\n if (__executed !== null) {\n \t__matched++;\n } else {\n \tbreak;\n }\n}while(1);\n\n//CHECK#1\nif (__matched !== NEVERMORE) {\n\t$ERROR('#1: __re = /[Nn]evermore/g; __executed = __re.exec(__the__raven)'+__matched);\n}\n\n",
+ "id": "S15.10.6.2_A3_T2"
+ },
+ {
+ "section": "15.10.6.2, 13.2",
+ "description": "RegExp is /[Nn]?evermore/g and tested string is very long string",
+ "test": "__the__raven = \"\tOnce upon a midnight dreary, while I pondered weak and weary,\" +\n \"Over many a quaint and curious volume of forgotten lore,\" +\n \"While I nodded, nearly napping, suddenly there came a tapping,\" +\n \"As of some one gently rapping, rapping at my chamber door.\" +\n \"`'Tis some visitor,' I muttered, `tapping at my chamber door -\" +\n \"Only this, and nothing more.'\" +\n \"Ah, distinctly I remember it was in the bleak December,\" +\n \"And each separate dying ember wrought its ghost upon the floor.\" +\n \"Eagerly I wished the morrow; - vainly I had sought to borrow\" +\n \"From my books surcease of sorrow - sorrow for the lost Lenore -\" +\n \"For the rare and radiant maiden whom the angels named Lenore -\" +\n \"Nameless here for evermore.\" +\n \"\\n\" +\n \"And the silken sad uncertain rustling of each purple curtain\" +\n \"Thrilled me - filled me with fantastic terrors never felt before;\" +\n \"So that now, to still the beating of my heart, I stood repeating\" +\n \"`'Tis some visitor entreating entrance at my chamber door -\" +\n \"Some late visitor entreating entrance at my chamber door; -\" +\n \"This it is, and nothing more,'\" +\n \"Presently my soul grew stronger; hesitating then no longer,\" +\n \"`Sir,' said I, `or Madam, truly your forgiveness I implore;\" +\n \"But the fact is I was napping, and so gently you came rapping,\" +\n \"And so faintly you came tapping, tapping at my chamber door,\" +\n \"That I scarce was sure I heard you' - here I opened wide the door; -\" +\n \"Darkness there, and nothing more.\" +\n \"\\n\" +\n \"Deep into that darkness peering, long I stood there wondering, fearing,\" +\n \"Doubting, dreaming dreams no mortal ever dared to dream before\" +\n \"But the silence was unbroken, and the darkness gave no token,\" +\n \"And the only word there spoken was the whispered word, `Lenore!'\" +\n \"This I whispered, and an echo murmured back the word, `Lenore!'\" +\n \"Merely this and nothing more.\" +\n \"\\n\" +\n \"Back into the chamber turning, all my soul within me burning,\" +\n \"Soon again I heard a tapping somewhat louder than before.\" +\n \"`Surely,' said I, `surely that is something at my window lattice;\" +\n \"Let me see then, what thereat is, and this mystery explore -\" +\n \"Let my heart be still a moment and this mystery explore; -\" +\n \"'Tis the wind and nothing more!'\" +\n \"\\n\" +\n \"Open here I flung the shutter, when, with many a flirt and flutter,\" +\n \"In there stepped a stately raven of the saintly days of yore.\" +\n \"Not the least obeisance made he; not a minute stopped or stayed he;\" +\n \"But, with mien of lord or lady, perched above my chamber door -\" +\n \"Perched upon a bust of Pallas just above my chamber door -\" +\n \"Perched, and sat, and nothing more.\" +\n \"\\n\" +\n \"Then this ebony bird beguiling my sad fancy into smiling,\" +\n \"By the grave and stern decorum of the countenance it wore,\" +\n \"`Though thy crest be shorn and shaven, thou,' I said, `art sure no craven.\" +\n \"Ghastly grim and ancient raven wandering from the nightly shore -\" +\n \"Tell me what thy lordly name is on the Night's Plutonian shore!'\" +\n \"Quoth the raven, `Nevermore.'\" +\n \"-n\" +\n \"Much I marvelled this ungainly fowl to hear discourse so plainly,\" +\n \"Though its answer little meaning - little relevancy bore;\" +\n \"For we cannot help agreeing that no living human being\" +\n \"Ever yet was blessed with seeing bird above his chamber door -\" +\n \"Bird or beast above the sculptured bust above his chamber door,\" +\n \"With such name as `Nevermore.'\" +\n \"\\n\" +\n \"But the raven, sitting lonely on the placid bust, spoke only,\" +\n \"That one word, as if his soul in that one word he did outpour.\" +\n \"Nothing further then he uttered - not a feather then he fluttered -\" +\n \"Till I scarcely more than muttered `Other friends have flown before -\" +\n \"On the morrow he will leave me, as my hopes have flown before.'\" +\n \"Then the bird said, `Nevermore.'\" +\n \"\\n\" +\n \"Startled at the stillness broken by reply so aptly spoken,\" +\n \"`Doubtless,' said I, `what it utters is its only stock and store,\" +\n \"Caught from some unhappy master whom unmerciful disaster\" +\n \"Followed fast and followed faster till his songs one burden bore -\" +\n \"Till the dirges of his hope that melancholy burden bore\" +\n \"Of \\\"Never-nevermore.\\\"'\" +\n \"\\n\" +\n \"But the raven still beguiling all my sad soul into smiling,\" +\n \"Straight I wheeled a cushioned seat in front of bird and bust and door;\" +\n \"Then, upon the velvet sinking, I betook myself to linking\" +\n \"Fancy unto fancy, thinking what this ominous bird of yore -\" +\n \"What this grim, ungainly, ghastly, gaunt, and ominous bird of yore\" +\n \"Meant in croaking `Nevermore.'\" +\n \"\\n\" +\n \"This I sat engaged in guessing, but no syllable expressing\" +\n \"To the fowl whose fiery eyes now burned into my bosom's core;\" +\n \"This and more I sat divining, with my head at ease reclining\" +\n \"On the cushion's velvet lining that the lamp-light gloated o'er,\" +\n \"But whose velvet violet lining with the lamp-light gloating o'er,\" +\n \"She shall press, ah, nevermore!\" +\n \"\\n\" +\n \"Then, methought, the air grew denser, perfumed from an unseen censer\" +\n \"Swung by Seraphim whose foot-falls tinkled on the tufted floor.\" +\n \"`Wretch,' I cried, `thy God hath lent thee - by these angels he has sent thee\" +\n \"Respite - respite and nepenthe from thy memories of Lenore!\" +\n \"Quaff, oh quaff this kind nepenthe, and forget this lost Lenore!'\" +\n \"Quoth the raven, `Nevermore.'\" +\n \"\\n\" +\n \"`Prophet!' said I, `thing of evil! - prophet still, if bird or devil! -\" +\n \"Whether tempter sent, or whether tempest tossed thee here ashore,\" +\n \"Desolate yet all undaunted, on this desert land enchanted -\" +\n \"On this home by horror haunted - tell me truly, I implore -\" +\n \"Is there - is there balm in Gilead? - tell me - tell me, I implore!'\" +\n \"Quoth the raven, `Nevermore.'\" +\n \"\\n\" +\n \"`Prophet!' said I, `thing of evil! - prophet still, if bird or devil!\" +\n \"By that Heaven that bends above us - by that God we both adore -\" +\n \"Tell this soul with sorrow laden if, within the distant Aidenn,\" +\n \"It shall clasp a sainted maiden whom the angels named Lenore -\" +\n \"Clasp a rare and radiant maiden, whom the angels named Lenore?'\" +\n \"Quoth the raven, `Nevermore.'\" +\n \"\\n\" +\n \"`Be that word our sign of parting, bird or fiend!' I shrieked upstarting -\" +\n \"`Get thee back into the tempest and the Night's Plutonian shore!\" +\n \"Leave no black plume as a token of that lie thy soul hath spoken!\" +\n \"Leave my loneliness unbroken! - quit the bust above my door!\" +\n \"Take thy beak from out my heart, and take thy form from off my door!'\" +\n \"Quoth the raven, `Nevermore.'\" +\n \"\\n\" +\n \"And the raven, never flitting, still is sitting, still is sitting\" +\n \"On the pallid bust of Pallas just above my chamber door;\" +\n \"And his eyes have all the seeming of a demon's that is dreaming,\" +\n \"And the lamp-light o'er him streaming throws his shadow on the floor;\" +\n \"And my soul from out that shadow that lies floating on the floor\" +\n \"Shall be lifted - nevermore!\"\n\nNEVERMORE_AND_EVERMORE=12; \n \n__re = /[Nn]?evermore/g;\n__matched=0;\n\ndo{\n __executed = __re.exec(__the__raven);\n if (__executed !== null) {\n \t__matched++;\n } else {\n \tbreak;\n }\n}while(1);\n\n//CHECK#1\nif (__matched !== NEVERMORE_AND_EVERMORE) {\n\t$ERROR('#1: __re = /[Nn]?evermore/g; __executed = __re.exec(__the__raven)'+__matched);\n}\n\n",
+ "id": "S15.10.6.2_A3_T3"
+ },
+ {
+ "section": "15.10.6.2, 13.2",
+ "description": "RegExp is /([Nn]?ever|([Nn]othing\\s{1,}))more/g and tested string is very long string",
+ "test": "__the__raven = \"\tOnce upon a midnight dreary, while I pondered weak and weary,\" +\n \"Over many a quaint and curious volume of forgotten lore,\" +\n \"While I nodded, nearly napping, suddenly there came a tapping,\" +\n \"As of some one gently rapping, rapping at my chamber door.\" +\n \"`'Tis some visitor,' I muttered, `tapping at my chamber door -\" +\n \"Only this, and nothing more.'\" +\n \"Ah, distinctly I remember it was in the bleak December,\" +\n \"And each separate dying ember wrought its ghost upon the floor.\" +\n \"Eagerly I wished the morrow; - vainly I had sought to borrow\" +\n \"From my books surcease of sorrow - sorrow for the lost Lenore -\" +\n \"For the rare and radiant maiden whom the angels named Lenore -\" +\n \"Nameless here for evermore.\" +\n \"\\n\" +\n \"And the silken sad uncertain rustling of each purple curtain\" +\n \"Thrilled me - filled me with fantastic terrors never felt before;\" +\n \"So that now, to still the beating of my heart, I stood repeating\" +\n \"`'Tis some visitor entreating entrance at my chamber door -\" +\n \"Some late visitor entreating entrance at my chamber door; -\" +\n \"This it is, and nothing more,'\" +\n \"Presently my soul grew stronger; hesitating then no longer,\" +\n \"`Sir,' said I, `or Madam, truly your forgiveness I implore;\" +\n \"But the fact is I was napping, and so gently you came rapping,\" +\n \"And so faintly you came tapping, tapping at my chamber door,\" +\n \"That I scarce was sure I heard you' - here I opened wide the door; -\" +\n \"Darkness there, and nothing more.\" +\n \"\\n\" +\n \"Deep into that darkness peering, long I stood there wondering, fearing,\" +\n \"Doubting, dreaming dreams no mortal ever dared to dream before\" +\n \"But the silence was unbroken, and the darkness gave no token,\" +\n \"And the only word there spoken was the whispered word, `Lenore!'\" +\n \"This I whispered, and an echo murmured back the word, `Lenore!'\" +\n \"Merely this and nothing more.\" +\n \"\\n\" +\n \"Back into the chamber turning, all my soul within me burning,\" +\n \"Soon again I heard a tapping somewhat louder than before.\" +\n \"`Surely,' said I, `surely that is something at my window lattice;\" +\n \"Let me see then, what thereat is, and this mystery explore -\" +\n \"Let my heart be still a moment and this mystery explore; -\" +\n \"'Tis the wind and nothing more!'\" +\n \"\\n\" +\n \"Open here I flung the shutter, when, with many a flirt and flutter,\" +\n \"In there stepped a stately raven of the saintly days of yore.\" +\n \"Not the least obeisance made he; not a minute stopped or stayed he;\" +\n \"But, with mien of lord or lady, perched above my chamber door -\" +\n \"Perched upon a bust of Pallas just above my chamber door -\" +\n \"Perched, and sat, and nothing more.\" +\n \"\\n\" +\n \"Then this ebony bird beguiling my sad fancy into smiling,\" +\n \"By the grave and stern decorum of the countenance it wore,\" +\n \"`Though thy crest be shorn and shaven, thou,' I said, `art sure no craven.\" +\n \"Ghastly grim and ancient raven wandering from the nightly shore -\" +\n \"Tell me what thy lordly name is on the Night's Plutonian shore!'\" +\n \"Quoth the raven, `Nevermore.'\" +\n \"-n\" +\n \"Much I marvelled this ungainly fowl to hear discourse so plainly,\" +\n \"Though its answer little meaning - little relevancy bore;\" +\n \"For we cannot help agreeing that no living human being\" +\n \"Ever yet was blessed with seeing bird above his chamber door -\" +\n \"Bird or beast above the sculptured bust above his chamber door,\" +\n \"With such name as `Nevermore.'\" +\n \"\\n\" +\n \"But the raven, sitting lonely on the placid bust, spoke only,\" +\n \"That one word, as if his soul in that one word he did outpour.\" +\n \"Nothing further then he uttered - not a feather then he fluttered -\" +\n \"Till I scarcely more than muttered `Other friends have flown before -\" +\n \"On the morrow he will leave me, as my hopes have flown before.'\" +\n \"Then the bird said, `Nevermore.'\" +\n \"\\n\" +\n \"Startled at the stillness broken by reply so aptly spoken,\" +\n \"`Doubtless,' said I, `what it utters is its only stock and store,\" +\n \"Caught from some unhappy master whom unmerciful disaster\" +\n \"Followed fast and followed faster till his songs one burden bore -\" +\n \"Till the dirges of his hope that melancholy burden bore\" +\n \"Of \\\"Never-nevermore.\\\"'\" +\n \"\\n\" +\n \"But the raven still beguiling all my sad soul into smiling,\" +\n \"Straight I wheeled a cushioned seat in front of bird and bust and door;\" +\n \"Then, upon the velvet sinking, I betook myself to linking\" +\n \"Fancy unto fancy, thinking what this ominous bird of yore -\" +\n \"What this grim, ungainly, ghastly, gaunt, and ominous bird of yore\" +\n \"Meant in croaking `Nevermore.'\" +\n \"\\n\" +\n \"This I sat engaged in guessing, but no syllable expressing\" +\n \"To the fowl whose fiery eyes now burned into my bosom's core;\" +\n \"This and more I sat divining, with my head at ease reclining\" +\n \"On the cushion's velvet lining that the lamp-light gloated o'er,\" +\n \"But whose velvet violet lining with the lamp-light gloating o'er,\" +\n \"She shall press, ah, nevermore!\" +\n \"\\n\" +\n \"Then, methought, the air grew denser, perfumed from an unseen censer\" +\n \"Swung by Seraphim whose foot-falls tinkled on the tufted floor.\" +\n \"`Wretch,' I cried, `thy God hath lent thee - by these angels he has sent thee\" +\n \"Respite - respite and nepenthe from thy memories of Lenore!\" +\n \"Quaff, oh quaff this kind nepenthe, and forget this lost Lenore!'\" +\n \"Quoth the raven, `Nevermore.'\" +\n \"\\n\" +\n \"`Prophet!' said I, `thing of evil! - prophet still, if bird or devil! -\" +\n \"Whether tempter sent, or whether tempest tossed thee here ashore,\" +\n \"Desolate yet all undaunted, on this desert land enchanted -\" +\n \"On this home by horror haunted - tell me truly, I implore -\" +\n \"Is there - is there balm in Gilead? - tell me - tell me, I implore!'\" +\n \"Quoth the raven, `Nevermore.'\" +\n \"\\n\" +\n \"`Prophet!' said I, `thing of evil! - prophet still, if bird or devil!\" +\n \"By that Heaven that bends above us - by that God we both adore -\" +\n \"Tell this soul with sorrow laden if, within the distant Aidenn,\" +\n \"It shall clasp a sainted maiden whom the angels named Lenore -\" +\n \"Clasp a rare and radiant maiden, whom the angels named Lenore?'\" +\n \"Quoth the raven, `Nevermore.'\" +\n \"\\n\" +\n \"`Be that word our sign of parting, bird or fiend!' I shrieked upstarting -\" +\n \"`Get thee back into the tempest and the Night's Plutonian shore!\" +\n \"Leave no black plume as a token of that lie thy soul hath spoken!\" +\n \"Leave my loneliness unbroken! - quit the bust above my door!\" +\n \"Take thy beak from out my heart, and take thy form from off my door!'\" +\n \"Quoth the raven, `Nevermore.'\" +\n \"\\n\" +\n \"And the raven, never flitting, still is sitting, still is sitting\" +\n \"On the pallid bust of Pallas just above my chamber door;\" +\n \"And his eyes have all the seeming of a demon's that is dreaming,\" +\n \"And the lamp-light o'er him streaming throws his shadow on the floor;\" +\n \"And my soul from out that shadow that lies floating on the floor\" +\n \"Shall be lifted - nevermore!\"\n\nALL_THE_HOPELESS_MORE=18; \n \n__re = /([Nn]?ever|([Nn]othing\\s{1,}))more/g;\n__matched=0;\n\ndo{\n __executed = __re.exec(__the__raven);\n if (__executed !== null) {\n \t__matched++;\n } else {\n \tbreak;\n }\n}while(1);\n\n//CHECK#1\nif (__matched !== ALL_THE_HOPELESS_MORE) {\n\t$ERROR('#1: __re = /([Nn]?ever|([Nn]othing\\\\s{1,}))more/g; __executed = __re.exec(__the__raven)'+__matched);\n}\n\n",
+ "id": "S15.10.6.2_A3_T4"
+ },
+ {
+ "section": "15.10.6.2, 13.2",
+ "description": "RegExp is /\\d+/g and tested string is \"123 456 789\"",
+ "test": "__re = /\\d+/g;\n\n__matched = [];\n\n__expected = [\"123\",\"456\",\"789\"];\n\ndo{\n __executed = __re.exec(\"123 456 789\");\n if (__executed !== null) {\n \t__matched.push(__executed[0]);\n } else {\n \tbreak;\n }\n}while(true);\n\n//CHECK#1\nif (__expected.length !== __matched.length) {\n $ERROR('#1: __executed = /\\\\d+/g.exec(\"123 456 789\"); __matched.length === ' + (__expected.length) + '.Actual: ' + (__matched.length));\n}\n\n//CHECK#2\nfor(var index=0; index<__expected.length; index++) {\n if (__expected[index] !== __matched[index]) {\n $ERROR('#2: __executed = /\\\\d+/g.exec(\"123 456 789\"); __matched[' + index + '] === ' + __expected[index] + '. Actual: ' + __matched[index]);\n }\n}\n\n",
+ "id": "S15.10.6.2_A3_T5"
+ },
+ {
+ "section": "15.10.6.2, 13.2",
+ "description": "RegExp is /(\\d+)/g and tested string is \"123 456 789\"",
+ "test": "__re = /(\\d+)/g;\n\n__matched = [];\n\n__expected = [\"123\",\"456\",\"789\"];\n\ndo{\n __executed = __re.exec(\"123 456 789\");\n if (__executed !== null) {\n \t__matched.push(__executed[0]);\n } else {\n \tbreak;\n }\n}while(true);\n\n//CHECK#1\nif (__expected.length !== __matched.length) {\n $ERROR('#1: __executed = /(\\\\d+)/g.exec(\"123 456 789\"); __matched.length === ' + (__expected.length) + '.Actual: ' + (__matched.length));\n}\n\n//CHECK#2\nfor(var index=0; index<__expected.length; index++) {\n if (__expected[index] !== __matched[index]) {\n $ERROR('#2: __executed = /(\\\\d+)/g.exec(\"123 456 789\"); __matched[' + index + '] === ' + __expected[index] + '. Actual: ' + __matched[index]);\n }\n}\n\n",
+ "id": "S15.10.6.2_A3_T6"
+ },
+ {
+ "section": "15.10.6.2, 13.2",
+ "description": "RegExp is /\\d+/ and tested string is \"123 456 789\"",
+ "test": "__re = /\\d+/;\n\n__matched = [];\n\n__expected = [\"123\",\"123\",\"123\",\"123\",\"123\",\"123\",\"123\",\"123\",\"123\",\"123\"];\n\ndo{\n __executed = __re.exec(\"123 456 789\");\n if (__executed !== null) {\n \t__matched.push(__executed[0]);\n } else {\n \tbreak;\n }\n}while(__matched.length<10);\n\n//CHECK#1\nif (__expected.length !== __matched.length) {\n $ERROR('#1: __executed = /\\\\d+/.exec(\"123 456 789\"); __matched.length === ' + (__expected.length) + '.Actual: ' + (__matched.length));\n}\n\n//CHECK#2\nfor(var index=0; index<__expected.length; index++) {\n if (__expected[index] !== __matched[index]) {\n $ERROR('#2: __executed = /\\\\d+/.exec(\"123 456 789\"); __matched[' + index + '] === ' + __expected[index] + '. Actual: ' + __matched[index]);\n }\n}\n\n",
+ "id": "S15.10.6.2_A3_T7"
+ },
+ {
+ "section": "15.10.6.2, 13.2",
+ "description": "Call first exec, then set re.lastIndex = 12 and again call exec",
+ "test": "__re = /(?:ab|cd)\\d?/g;\n\n__executed = __re.exec(\"aacd2233ab12nm444ab42\");\n\n__expected = [\"cd2\"];\n__expected.index = 2;\n__expected.input = \"aacd2233ab12nm444ab42\";\n\n//CHECK#1\nif (__executed.length !== __expected.length) {\n\t$ERROR('#1: __re = /(?:ab|cd)\\\\d?/g; __executed = __re.exec(\"aacd2233ab12nm444ab42\"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length);\n}\n\n//CHECK#2\nif (__executed.index !== __expected.index) {\n\t$ERROR('#2: __re = /(?:ab|cd)\\\\d?/g; __executed = __re.exec(\"aacd2233ab12nm444ab42\"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index);\n}\n\n//CHECK#3\nif (__executed.input !== __expected.input) {\n\t$ERROR('#3: __re = /(?:ab|cd)\\\\d?/g; __executed = __re.exec(\"aacd2233ab12nm444ab42\"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input);\n}\n\n//CHECK#4\nfor(var index=0; index<__expected.length; index++) {\n\tif (__executed[index] !== __expected[index]) {\n\t\t$ERROR('#4: __re = /(?:ab|cd)\\\\d?/g; __executed = __re.exec(\"aacd2233ab12nm444ab42\"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]);\n\t}\n}\n\n__re.lastIndex = 12;\n\n__executed = __re.exec(\"aacd2233ab12nm444ab42\");\n\n__expected = [\"ab4\"];\n__expected.index = 17;\n__expected.input = \"aacd2233ab12nm444ab42\";\n\n//CHECK#5\nif (__executed.length !== __expected.length) {\n\t$ERROR('#5: __re = /(?:ab|cd)\\\\d?/g; __re.lastIndex = 12; __executed = __re.exec(\"aacd2233ab12nm444ab42\"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length);\n}\n\n//CHECK#6\nif (__executed.index !== __expected.index) {\n\t$ERROR('#6: __re = /(?:ab|cd)\\\\d?/g; __re.lastIndex = 12; __executed = __re.exec(\"aacd2233ab12nm444ab42\"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index);\n}\n\n//CHECK#7\nif (__executed.input !== __expected.input) {\n\t$ERROR('#7: __re = /(?:ab|cd)\\\\d?/g; __re.lastIndex = 12; __executed = __re.exec(\"aacd2233ab12nm444ab42\"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input);\n}\n\n//CHECK#8\nfor(var index=0; index<__expected.length; index++) {\n\tif (__executed[index] !== __expected[index]) {\n\t\t$ERROR('#8: __re = /(?:ab|cd)\\\\d?/g; __re.lastIndex = 12; __executed = __re.exec(\"aacd2233ab12nm444ab42\"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]);\n\t}\n}\n\n",
+ "id": "S15.10.6.2_A4_T1"
+ },
+ {
+ "section": "15.10.6.2, 13.2",
+ "description": ": Call first exec, then set re.lastIndex = {valueOf:function(){return 12;}} and again call exec;",
+ "test": "__re = /(?:ab|cd)\\d?/g;\n\n__executed = __re.exec(\"aacd2233ab12nm444ab42\");\n\n__expected = [\"cd2\"];\n__expected.index = 2;\n__expected.input = \"aacd2233ab12nm444ab42\";\n\n//CHECK#1\nif (__executed.length !== __expected.length) {\n\t$ERROR('#1: __re = /(?:ab|cd)\\\\d?/g; __executed = __re.exec(\"aacd2233ab12nm444ab42\"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length);\n}\n\n//CHECK#2\nif (__executed.index !== __expected.index) {\n\t$ERROR('#2: __re = /(?:ab|cd)\\\\d?/g; __executed = __re.exec(\"aacd2233ab12nm444ab42\"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index);\n}\n\n//CHECK#3\nif (__executed.input !== __expected.input) {\n\t$ERROR('#3: __re = /(?:ab|cd)\\\\d?/g; __executed = __re.exec(\"aacd2233ab12nm444ab42\"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input);\n}\n\n//CHECK#4\nfor(var index=0; index<__expected.length; index++) {\n\tif (__executed[index] !== __expected[index]) {\n\t\t$ERROR('#4: __re = /(?:ab|cd)\\\\d?/g; __executed = __re.exec(\"aacd2233ab12nm444ab42\"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]);\n\t}\n}\n\n__obj = {valueOf:function(){return 12;}};\n\n__re.lastIndex = __obj;\n\n__executed = __re.exec(\"aacd2233ab12nm444ab42\");\n\n__expected = [\"ab4\"];\n__expected.index = 17;\n__expected.input = \"aacd2233ab12nm444ab42\";\n\n//CHECK#5\nif (__executed.length !== __expected.length) {\n\t$ERROR('#5: __re = /(?:ab|cd)\\\\d?/g; __obj = {valueOf:function(){return 12;}}; __re.lastIndex = __obj; __executed = __re.exec(\"aacd2233ab12nm444ab42\"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length);\n}\n\n//CHECK#6\nif (__executed.index !== __expected.index) {\n\t$ERROR('#6: __re = /(?:ab|cd)\\\\d?/g; __obj = {valueOf:function(){return 12;}}; __re.lastIndex = __obj; __executed = __re.exec(\"aacd2233ab12nm444ab42\"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index);\n}\n\n//CHECK#7\nif (__executed.input !== __expected.input) {\n\t$ERROR('#7: __re = /(?:ab|cd)\\\\d?/g; __obj = {valueOf:function(){return 12;}}; __re.lastIndex = __obj; __executed = __re.exec(\"aacd2233ab12nm444ab42\"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input);\n}\n\n//CHECK#8\nfor(var index=0; index<__expected.length; index++) {\n\tif (__executed[index] !== __expected[index]) {\n\t\t$ERROR('#8: __re = /(?:ab|cd)\\\\d?/g; __obj = {valueOf:function(){return 12;}}; __re.lastIndex = __obj; __executed = __re.exec(\"aacd2233ab12nm444ab42\"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]);\n\t}\n}\n\n",
+ "id": "S15.10.6.2_A4_T10"
+ },
+ {
+ "section": "15.10.6.2, 13.2",
+ "description": ": Call first exec, then set re.lastIndex = {valueOf:function(){throw \"intoint\";}} and again call exec;",
+ "test": "__re = /(?:ab|cd)\\d?/g;\n\n__executed = __re.exec(\"aacd2233ab12nm444ab42\");\n\n__expected = [\"cd2\"];\n__expected.index = 2;\n__expected.input = \"aacd2233ab12nm444ab42\";\n\n//CHECK#1\nif (__executed.length !== __expected.length) {\n\t$ERROR('#1: __re = /(?:ab|cd)\\\\d?/g; __executed = __re.exec(\"aacd2233ab12nm444ab42\"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length);\n}\n\n//CHECK#2\nif (__executed.index !== __expected.index) {\n\t$ERROR('#2: __re = /(?:ab|cd)\\\\d?/g; __executed = __re.exec(\"aacd2233ab12nm444ab42\"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index);\n}\n\n//CHECK#3\nif (__executed.input !== __expected.input) {\n\t$ERROR('#3: __re = /(?:ab|cd)\\\\d?/g; __executed = __re.exec(\"aacd2233ab12nm444ab42\"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input);\n}\n\n//CHECK#4\nfor(var index=0; index<__expected.length; index++) {\n\tif (__executed[index] !== __expected[index]) {\n\t\t$ERROR('#4: __re = /(?:ab|cd)\\\\d?/g; __executed = __re.exec(\"aacd2233ab12nm444ab42\"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]);\n\t}\n}\n\n__obj = {valueOf:function(){throw \"intoint\";}};\n\n__re.lastIndex = __obj;\n\n//CHECK#5\ntry {\n $FAIL('#5.1: __obj = {valueOf:function(){throw \"intoint\";}}; __re.lastIndex = __obj; __executed = __re.exec(\"aacd2233ab12nm444ab42\") throw \"intoint\". Actual: ' + (__re.exec(\"aacd2233ab12nm444ab42\")));\n} catch (e) {\n\tif (e !== \"intoint\") {\n\t\t$ERROR('#5.2: __obj = {valueOf:function(){throw \"intoint\";}}; __re.lastIndex = __obj; __executed = __re.exec(\"aacd2233ab12nm444ab42\") throw \"intoint\". Actual: ' + (e));\n\t}\n}\n\n",
+ "id": "S15.10.6.2_A4_T11"
+ },
+ {
+ "section": "15.10.6.2, 13.2",
+ "description": ": Call first exec, then set re.lastIndex = {toString:function(){return 12;},valueOf:function(){return {};}} and again call exec;",
+ "test": "__re = /(?:ab|cd)\\d?/g;\n\n__executed = __re.exec(\"aacd2233ab12nm444ab42\");\n\n__expected = [\"cd2\"];\n__expected.index = 2;\n__expected.input = \"aacd2233ab12nm444ab42\";\n\n//CHECK#1\nif (__executed.length !== __expected.length) {\n\t$ERROR('#1: __re = /(?:ab|cd)\\\\d?/g; __executed = __re.exec(\"aacd2233ab12nm444ab42\"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length);\n}\n\n//CHECK#2\nif (__executed.index !== __expected.index) {\n\t$ERROR('#2: __re = /(?:ab|cd)\\\\d?/g; __executed = __re.exec(\"aacd2233ab12nm444ab42\"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index);\n}\n\n//CHECK#3\nif (__executed.input !== __expected.input) {\n\t$ERROR('#3: __re = /(?:ab|cd)\\\\d?/g; __executed = __re.exec(\"aacd2233ab12nm444ab42\"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input);\n}\n\n//CHECK#4\nfor(var index=0; index<__expected.length; index++) {\n\tif (__executed[index] !== __expected[index]) {\n\t\t$ERROR('#4: __re = /(?:ab|cd)\\\\d?/g; __executed = __re.exec(\"aacd2233ab12nm444ab42\"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]);\n\t}\n}\n\n__obj = {toString:function(){return 12;},valueOf:function(){return {};}};\n\n__re.lastIndex = __obj;\n\n__executed = __re.exec(\"aacd2233ab12nm444ab42\");\n\n__expected = [\"ab4\"];\n__expected.index = 17;\n__expected.input = \"aacd2233ab12nm444ab42\";\n\n//CHECK#5\nif (__executed.length !== __expected.length) {\n\t$ERROR('#5: __re = /(?:ab|cd)\\\\d?/g; __obj = {toString:function(){return 12;},valueOf:function(){return {};}}; __re.lastIndex = __obj; __executed = __re.exec(\"aacd2233ab12nm444ab42\"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length);\n}\n\n//CHECK#6\nif (__executed.index !== __expected.index) {\n\t$ERROR('#6: __re = /(?:ab|cd)\\\\d?/g; __obj = {toString:function(){return 12;},valueOf:function(){return {};}}; __re.lastIndex = __obj; __executed = __re.exec(\"aacd2233ab12nm444ab42\"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index);\n}\n\n//CHECK#7\nif (__executed.input !== __expected.input) {\n\t$ERROR('#7: __re = /(?:ab|cd)\\\\d?/g; __obj = {toString:function(){return 12;},valueOf:function(){return {};}}; __re.lastIndex = __obj; __executed = __re.exec(\"aacd2233ab12nm444ab42\"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input);\n}\n\n//CHECK#8\nfor(var index=0; index<__expected.length; index++) {\n\tif (__executed[index] !== __expected[index]) {\n\t\t$ERROR('#8: __re = /(?:ab|cd)\\\\d?/g; __obj = {toString:function(){return 12;},valueOf:function(){return {};}}; __re.lastIndex = __obj; __executed = __re.exec(\"aacd2233ab12nm444ab42\"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]);\n\t}\n}\n\n",
+ "id": "S15.10.6.2_A4_T12"
+ },
+ {
+ "section": "15.10.6.2, 13.2",
+ "description": "Call first exec, then set re.lastIndex = undefined and again call exec",
+ "test": "__re = /(?:ab|cd)\\d?/g;\n\n__executed = __re.exec(\"aacd2233ab12nm444ab42\");\n\n__expected = [\"cd2\"];\n__expected.index = 2;\n__expected.input = \"aacd2233ab12nm444ab42\";\n\n//CHECK#1\nif (__executed.length !== __expected.length) {\n\t$ERROR('#1: __re = /(?:ab|cd)\\\\d?/g; __executed = __re.exec(\"aacd2233ab12nm444ab42\"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length);\n}\n\n//CHECK#2\nif (__executed.index !== __expected.index) {\n\t$ERROR('#2: __re = /(?:ab|cd)\\\\d?/g; __executed = __re.exec(\"aacd2233ab12nm444ab42\"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index);\n}\n\n//CHECK#3\nif (__executed.input !== __expected.input) {\n\t$ERROR('#3: __re = /(?:ab|cd)\\\\d?/g; __executed = __re.exec(\"aacd2233ab12nm444ab42\"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input);\n}\n\n//CHECK#4\nfor(var index=0; index<__expected.length; index++) {\n\tif (__executed[index] !== __expected[index]) {\n\t\t$ERROR('#4: __re = /(?:ab|cd)\\\\d?/g; __executed = __re.exec(\"aacd2233ab12nm444ab42\"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]);\n\t}\n}\n\n__re.lastIndex = undefined;\n\n__executed = __re.exec(\"aacd2233ab12nm444ab42\");\n\n__expected = [\"cd2\"];\n__expected.index = 2;\n__expected.input = \"aacd2233ab12nm444ab42\";\n\n//CHECK#5\nif (__executed.length !== __expected.length) {\n\t$ERROR('#5: __re = /(?:ab|cd)\\\\d?/g; __re.lastIndex = undefined; __executed = __re.exec(\"aacd2233ab12nm444ab42\"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length);\n}\n\n//CHECK#6\nif (__executed.index !== __expected.index) {\n\t$ERROR('#6: __re = /(?:ab|cd)\\\\d?/g; __re.lastIndex = undefined; __executed = __re.exec(\"aacd2233ab12nm444ab42\"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index);\n}\n\n//CHECK#7\nif (__executed.input !== __expected.input) {\n\t$ERROR('#7: __re = /(?:ab|cd)\\\\d?/g; __re.lastIndex = undefined; __executed = __re.exec(\"aacd2233ab12nm444ab42\"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input);\n}\n\n//CHECK#8\nfor(var index=0; index<__expected.length; index++) {\n\tif (__executed[index] !== __expected[index]) {\n\t\t$ERROR('#8: __re = /(?:ab|cd)\\\\d?/g; __re.lastIndex = undefined; __executed = __re.exec(\"aacd2233ab12nm444ab42\"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]);\n\t}\n}\n\n",
+ "id": "S15.10.6.2_A4_T2"
+ },
+ {
+ "section": "15.10.6.2, 13.2",
+ "description": "Call first exec, then set re.lastIndex = void 0 and again call exec",
+ "test": "__re = /(?:ab|cd)\\d?/g;\n\n__executed = __re.exec(\"aacd2233ab12nm444ab42\");\n\n__expected = [\"cd2\"];\n__expected.index = 2;\n__expected.input = \"aacd2233ab12nm444ab42\";\n\n//CHECK#1\nif (__executed.length !== __expected.length) {\n\t$ERROR('#1: __re = /(?:ab|cd)\\\\d?/g; __executed = __re.exec(\"aacd2233ab12nm444ab42\"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length);\n}\n\n//CHECK#2\nif (__executed.index !== __expected.index) {\n\t$ERROR('#2: __re = /(?:ab|cd)\\\\d?/g; __executed = __re.exec(\"aacd2233ab12nm444ab42\"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index);\n}\n\n//CHECK#3\nif (__executed.input !== __expected.input) {\n\t$ERROR('#3: __re = /(?:ab|cd)\\\\d?/g; __executed = __re.exec(\"aacd2233ab12nm444ab42\"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input);\n}\n\n//CHECK#4\nfor(var index=0; index<__expected.length; index++) {\n\tif (__executed[index] !== __expected[index]) {\n\t\t$ERROR('#4: __re = /(?:ab|cd)\\\\d?/g; __executed = __re.exec(\"aacd2233ab12nm444ab42\"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]);\n\t}\n}\n\n__re.lastIndex = void 0;\n\n__executed = __re.exec(\"aacd2233ab12nm444ab42\");\n\n__expected = [\"cd2\"];\n__expected.index = 2;\n__expected.input = \"aacd2233ab12nm444ab42\";\n\n//CHECK#5\nif (__executed.length !== __expected.length) {\n\t$ERROR('#5: __re = /(?:ab|cd)\\\\d?/g; __re.lastIndex = void 0; __executed = __re.exec(\"aacd2233ab12nm444ab42\"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length);\n}\n\n//CHECK#6\nif (__executed.index !== __expected.index) {\n\t$ERROR('#6: __re = /(?:ab|cd)\\\\d?/g; __re.lastIndex = void 0; __executed = __re.exec(\"aacd2233ab12nm444ab42\"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index);\n}\n\n//CHECK#7\nif (__executed.input !== __expected.input) {\n\t$ERROR('#7: __re = /(?:ab|cd)\\\\d?/g; __re.lastIndex = void 0; __executed = __re.exec(\"aacd2233ab12nm444ab42\"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input);\n}\n\n//CHECK#8\nfor(var index=0; index<__expected.length; index++) {\n\tif (__executed[index] !== __expected[index]) {\n\t\t$ERROR('#8: __re = /(?:ab|cd)\\\\d?/g; __re.lastIndex = void 0; __executed = __re.exec(\"aacd2233ab12nm444ab42\"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]);\n\t}\n}\n\n",
+ "id": "S15.10.6.2_A4_T3"
+ },
+ {
+ "section": "15.10.6.2, 13.2",
+ "description": "Call first exec, then set re.lastIndex = null and again call exec",
+ "test": "__re = /(?:ab|cd)\\d?/g;\n\n__executed = __re.exec(\"aacd2233ab12nm444ab42\");\n\n__expected = [\"cd2\"];\n__expected.index = 2;\n__expected.input = \"aacd2233ab12nm444ab42\";\n\n//CHECK#1\nif (__executed.length !== __expected.length) {\n\t$ERROR('#1: __re = /(?:ab|cd)\\\\d?/g; __executed = __re.exec(\"aacd2233ab12nm444ab42\"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length);\n}\n\n//CHECK#2\nif (__executed.index !== __expected.index) {\n\t$ERROR('#2: __re = /(?:ab|cd)\\\\d?/g; __executed = __re.exec(\"aacd2233ab12nm444ab42\"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index);\n}\n\n//CHECK#3\nif (__executed.input !== __expected.input) {\n\t$ERROR('#3: __re = /(?:ab|cd)\\\\d?/g; __executed = __re.exec(\"aacd2233ab12nm444ab42\"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input);\n}\n\n//CHECK#4\nfor(var index=0; index<__expected.length; index++) {\n\tif (__executed[index] !== __expected[index]) {\n\t\t$ERROR('#4: __re = /(?:ab|cd)\\\\d?/g; __executed = __re.exec(\"aacd2233ab12nm444ab42\"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]);\n\t}\n}\n\n__re.lastIndex = null;\n\n__executed = __re.exec(\"aacd2233ab12nm444ab42\");\n\n__expected = [\"cd2\"];\n__expected.index = 2;\n__expected.input = \"aacd2233ab12nm444ab42\";\n\n//CHECK#5\nif (__executed.length !== __expected.length) {\n\t$ERROR('#5: __re = /(?:ab|cd)\\\\d?/g; __re.lastIndex = null; __executed = __re.exec(\"aacd2233ab12nm444ab42\"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length);\n}\n\n//CHECK#6\nif (__executed.index !== __expected.index) {\n\t$ERROR('#6: __re = /(?:ab|cd)\\\\d?/g; __re.lastIndex = null; __executed = __re.exec(\"aacd2233ab12nm444ab42\"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index);\n}\n\n//CHECK#7\nif (__executed.input !== __expected.input) {\n\t$ERROR('#7: __re = /(?:ab|cd)\\\\d?/g; __re.lastIndex = null; __executed = __re.exec(\"aacd2233ab12nm444ab42\"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input);\n}\n\n//CHECK#8\nfor(var index=0; index<__expected.length; index++) {\n\tif (__executed[index] !== __expected[index]) {\n\t\t$ERROR('#8: __re = /(?:ab|cd)\\\\d?/g; __re.lastIndex = null; __executed = __re.exec(\"aacd2233ab12nm444ab42\"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]);\n\t}\n}\n\n",
+ "id": "S15.10.6.2_A4_T4"
+ },
+ {
+ "section": "15.10.6.2, 13.2",
+ "description": "Call first exec, then set re.lastIndex = x and again call exec, where x is undefined variable",
+ "test": "__re = /(?:ab|cd)\\d?/g;\n\n__executed = __re.exec(\"aacd2233ab12nm444ab42\");\n\n__expected = [\"cd2\"];\n__expected.index = 2;\n__expected.input = \"aacd2233ab12nm444ab42\";\n\n//CHECK#1\nif (__executed.length !== __expected.length) {\n\t$ERROR('#1: __re = /(?:ab|cd)\\\\d?/g; __executed = __re.exec(\"aacd2233ab12nm444ab42\"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length);\n}\n\n//CHECK#2\nif (__executed.index !== __expected.index) {\n\t$ERROR('#2: __re = /(?:ab|cd)\\\\d?/g; __executed = __re.exec(\"aacd2233ab12nm444ab42\"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index);\n}\n\n//CHECK#3\nif (__executed.input !== __expected.input) {\n\t$ERROR('#3: __re = /(?:ab|cd)\\\\d?/g; __executed = __re.exec(\"aacd2233ab12nm444ab42\"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input);\n}\n\n//CHECK#4\nfor(var index=0; index<__expected.length; index++) {\n\tif (__executed[index] !== __expected[index]) {\n\t\t$ERROR('#4: __re = /(?:ab|cd)\\\\d?/g; __executed = __re.exec(\"aacd2233ab12nm444ab42\"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]);\n\t}\n}\n\n__re.lastIndex = x;\n\n__executed = __re.exec(\"aacd2233ab12nm444ab42\");\n\n__expected = [\"cd2\"];\n__expected.index = 2;\n__expected.input = \"aacd2233ab12nm444ab42\";\n\n//CHECK#5\nif (__executed.length !== __expected.length) {\n\t$ERROR('#5: __re = /(?:ab|cd)\\\\d?/g; __re.lastIndex = x; __executed = __re.exec(\"aacd2233ab12nm444ab42\"); var x; __executed.length === ' + __expected.length + '. Actual: ' + __executed.length);\n}\n\n//CHECK#6\nif (__executed.index !== __expected.index) {\n\t$ERROR('#6: __re = /(?:ab|cd)\\\\d?/g; __re.lastIndex = x; __executed = __re.exec(\"aacd2233ab12nm444ab42\"); var x; __executed.index === ' + __expected.index + '. Actual: ' + __executed.index);\n}\n\n//CHECK#7\nif (__executed.input !== __expected.input) {\n\t$ERROR('#7: __re = /(?:ab|cd)\\\\d?/g; __re.lastIndex = x; __executed = __re.exec(\"aacd2233ab12nm444ab42\"); var x; __executed.input === ' + __expected.input + '. Actual: ' + __executed.input);\n}\n\n//CHECK#8\nfor(var index=0; index<__expected.length; index++) {\n\tif (__executed[index] !== __expected[index]) {\n\t\t$ERROR('#8: __re = /(?:ab|cd)\\\\d?/g; __re.lastIndex = x; __executed = __re.exec(\"aacd2233ab12nm444ab42\"); var x; __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]);\n\t}\n}\n\nvar x;\n",
+ "id": "S15.10.6.2_A4_T5"
+ },
+ {
+ "section": "15.10.6.2, 13.2",
+ "description": "Call first exec, then set re.lastIndex = false and again call exec",
+ "test": "__re = /(?:ab|cd)\\d?/g;\n\n__executed = __re.exec(\"aacd2233ab12nm444ab42\");\n\n__expected = [\"cd2\"];\n__expected.index = 2;\n__expected.input = \"aacd2233ab12nm444ab42\";\n\n//CHECK#1\nif (__executed.length !== __expected.length) {\n\t$ERROR('#1: __re = /(?:ab|cd)\\\\d?/g; __executed = __re.exec(\"aacd2233ab12nm444ab42\"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length);\n}\n\n//CHECK#2\nif (__executed.index !== __expected.index) {\n\t$ERROR('#2: __re = /(?:ab|cd)\\\\d?/g; __executed = __re.exec(\"aacd2233ab12nm444ab42\"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index);\n}\n\n//CHECK#3\nif (__executed.input !== __expected.input) {\n\t$ERROR('#3: __re = /(?:ab|cd)\\\\d?/g; __executed = __re.exec(\"aacd2233ab12nm444ab42\"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input);\n}\n\n//CHECK#4\nfor(var index=0; index<__expected.length; index++) {\n\tif (__executed[index] !== __expected[index]) {\n\t\t$ERROR('#4: __re = /(?:ab|cd)\\\\d?/g; __executed = __re.exec(\"aacd2233ab12nm444ab42\"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]);\n\t}\n}\n\n__re.lastIndex = false;\n\n__executed = __re.exec(\"aacd2233ab12nm444ab42\");\n\n__expected = [\"cd2\"];\n__expected.index = 2;\n__expected.input = \"aacd2233ab12nm444ab42\";\n\n//CHECK#5\nif (__executed.length !== __expected.length) {\n\t$ERROR('#5: __re = /(?:ab|cd)\\\\d?/g; __re.lastIndex = false; __executed = __re.exec(\"aacd2233ab12nm444ab42\"); __executed = __re.exec(\"aacd2233ab12nm444ab42\"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length);\n}\n\n//CHECK#6\nif (__executed.index !== __expected.index) {\n\t$ERROR('#6: __re = /(?:ab|cd)\\\\d?/g; __re.lastIndex = false; __executed = __re.exec(\"aacd2233ab12nm444ab42\"); __executed = __re.exec(\"aacd2233ab12nm444ab42\"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index);\n}\n\n//CHECK#7\nif (__executed.input !== __expected.input) {\n\t$ERROR('#7: __re = /(?:ab|cd)\\\\d?/g; __re.lastIndex = false; __executed = __re.exec(\"aacd2233ab12nm444ab42\"); __executed = __re.exec(\"aacd2233ab12nm444ab42\"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input);\n}\n\n//CHECK#8\nfor(var index=0; index<__expected.length; index++) {\n\tif (__executed[index] !== __expected[index]) {\n\t\t$ERROR('#8: __re = /(?:ab|cd)\\\\d?/g; __re.lastIndex = false; __executed = __re.exec(\"aacd2233ab12nm444ab42\"); __executed = __re.exec(\"aacd2233ab12nm444ab42\"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]);\n\t}\n}\n\n",
+ "id": "S15.10.6.2_A4_T6"
+ },
+ {
+ "section": "15.10.6.2, 13.2",
+ "description": "Call first exec, then set re.lastIndex = Math.NaN and again call exec",
+ "test": "__re = /(?:ab|cd)\\d?/g;\n\n__executed = __re.exec(\"aacd2233ab12nm444ab42\");\n\n__expected = [\"cd2\"];\n__expected.index = 2;\n__expected.input = \"aacd2233ab12nm444ab42\";\n\n//CHECK#1\nif (__executed.length !== __expected.length) {\n\t$ERROR('#1: __re = /(?:ab|cd)\\\\d?/g; __executed = __re.exec(\"aacd2233ab12nm444ab42\"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length);\n}\n\n//CHECK#2\nif (__executed.index !== __expected.index) {\n\t$ERROR('#2: __re = /(?:ab|cd)\\\\d?/g; __executed = __re.exec(\"aacd2233ab12nm444ab42\"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index);\n}\n\n//CHECK#3\nif (__executed.input !== __expected.input) {\n\t$ERROR('#3: __re = /(?:ab|cd)\\\\d?/g; __executed = __re.exec(\"aacd2233ab12nm444ab42\"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input);\n}\n\n//CHECK#4\nfor(var index=0; index<__expected.length; index++) {\n\tif (__executed[index] !== __expected[index]) {\n\t\t$ERROR('#4: __re = /(?:ab|cd)\\\\d?/g; __executed = __re.exec(\"aacd2233ab12nm444ab42\"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]);\n\t}\n}\n\n__re.lastIndex = Math.NaN;\n\n__executed = __re.exec(\"aacd2233ab12nm444ab42\");\n\n__expected = [\"cd2\"];\n__expected.index = 2;\n__expected.input = \"aacd2233ab12nm444ab42\";\n\n//CHECK#5\nif (__executed.length !== __expected.length) {\n\t$ERROR('#5: __re = /(?:ab|cd)\\\\d?/g; __re.lastIndex = Math.NaN; __executed = __re.exec(\"aacd2233ab12nm444ab42\"); __executed = __re.exec(\"aacd2233ab12nm444ab42\"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length);\n}\n\n//CHECK#6\nif (__executed.index !== __expected.index) {\n\t$ERROR('#6: __re = /(?:ab|cd)\\\\d?/g; __re.lastIndex = Math.NaN; __executed = __re.exec(\"aacd2233ab12nm444ab42\"); __executed = __re.exec(\"aacd2233ab12nm444ab42\"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index);\n}\n\n//CHECK#7\nif (__executed.input !== __expected.input) {\n\t$ERROR('#7: __re = /(?:ab|cd)\\\\d?/g; __re.lastIndex = Math.NaN; __executed = __re.exec(\"aacd2233ab12nm444ab42\"); __executed = __re.exec(\"aacd2233ab12nm444ab42\"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input);\n}\n\n//CHECK#8\nfor(var index=0; index<__expected.length; index++) {\n\tif (__executed[index] !== __expected[index]) {\n\t\t$ERROR('#8: __re = /(?:ab|cd)\\\\d?/g; re.lastIndex = Math.NaN; __executed = __re.exec(\"aacd2233ab12nm444ab42\"); __executed = __re.exec(\"aacd2233ab12nm444ab42\"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]);\n\t}\n}\n\n",
+ "id": "S15.10.6.2_A4_T7"
+ },
+ {
+ "section": "15.10.6.2, 13.2",
+ "description": "Call first exec, then set re.lastIndex = \"12\" and again call exec",
+ "test": "__re = /(?:ab|cd)\\d?/g;\n\n__executed = __re.exec(\"aacd2233ab12nm444ab42\");\n\n__expected = [\"cd2\"];\n__expected.index = 2;\n__expected.input = \"aacd2233ab12nm444ab42\";\n\n//CHECK#1\nif (__executed.length !== __expected.length) {\n\t$ERROR('#1: __re = /(?:ab|cd)\\\\d?/g; __executed = __re.exec(\"aacd2233ab12nm444ab42\"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length);\n}\n\n//CHECK#2\nif (__executed.index !== __expected.index) {\n\t$ERROR('#2: __re = /(?:ab|cd)\\\\d?/g; __executed = __re.exec(\"aacd2233ab12nm444ab42\"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index);\n}\n\n//CHECK#3\nif (__executed.input !== __expected.input) {\n\t$ERROR('#3: __re = /(?:ab|cd)\\\\d?/g; __executed = __re.exec(\"aacd2233ab12nm444ab42\"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input);\n}\n\n//CHECK#4\nfor(var index=0; index<__expected.length; index++) {\n\tif (__executed[index] !== __expected[index]) {\n\t\t$ERROR('#4: __re = /(?:ab|cd)\\\\d?/g; __executed = __re.exec(\"aacd2233ab12nm444ab42\"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]);\n\t}\n}\n\n__re.lastIndex = \"12\";\n\n__executed = __re.exec(\"aacd2233ab12nm444ab42\");\n\n__expected = [\"ab4\"];\n__expected.index = 17;\n__expected.input = \"aacd2233ab12nm444ab42\";\n\n//CHECK#5\nif (__executed.length !== __expected.length) {\n\t$ERROR('#5: __re = /(?:ab|cd)\\\\d?/g; __re.lastIndex = \"12\"; __executed = __re.exec(\"aacd2233ab12nm444ab42\");__executed = __re.exec(\"aacd2233ab12nm444ab42\"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length);\n}\n\n//CHECK#6\nif (__executed.index !== __expected.index) {\n\t$ERROR('#6: __re = /(?:ab|cd)\\\\d?/g; __re.lastIndex = \"12\"; __executed = __re.exec(\"aacd2233ab12nm444ab42\");__executed = __re.exec(\"aacd2233ab12nm444ab42\"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index);\n}\n\n//CHECK#7\nif (__executed.input !== __expected.input) {\n\t$ERROR('#7: __re = /(?:ab|cd)\\\\d?/g; __re.lastIndex = \"12\"; __executed = __re.exec(\"aacd2233ab12nm444ab42\");__executed = __re.exec(\"aacd2233ab12nm444ab42\"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input);\n}\n\n//CHECK#8\nfor(var index=0; index<__expected.length; index++) {\n\tif (__executed[index] !== __expected[index]) {\n\t\t$ERROR('#8: __re = /(?:ab|cd)\\\\d?/g; __re.lastIndex = \"12\"; __executed = __re.exec(\"aacd2233ab12nm444ab42\");__executed = __re.exec(\"aacd2233ab12nm444ab42\"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]);\n\t}\n}\n\n",
+ "id": "S15.10.6.2_A4_T8"
+ },
+ {
+ "section": "15.10.6.2, 13.2",
+ "description": "Call first exec, then set re.lastIndex = \"eleven\" and again call exec",
+ "test": "__re = /(?:ab|cd)\\d?/g;\n\n__executed = __re.exec(\"aacd2233ab12nm444ab42\");\n\n__expected = [\"cd2\"];\n__expected.index = 2;\n__expected.input = \"aacd2233ab12nm444ab42\";\n\n//CHECK#1\nif (__executed.length !== __expected.length) {\n\t$ERROR('#1: __re = /(?:ab|cd)\\\\d?/g; __executed = __re.exec(\"aacd2233ab12nm444ab42\"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length);\n}\n\n//CHECK#2\nif (__executed.index !== __expected.index) {\n\t$ERROR('#2: __re = /(?:ab|cd)\\\\d?/g; __executed = __re.exec(\"aacd2233ab12nm444ab42\"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index);\n}\n\n//CHECK#3\nif (__executed.input !== __expected.input) {\n\t$ERROR('#3: __re = /(?:ab|cd)\\\\d?/g; __executed = __re.exec(\"aacd2233ab12nm444ab42\"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input);\n}\n\n//CHECK#4\nfor(var index=0; index<__expected.length; index++) {\n\tif (__executed[index] !== __expected[index]) {\n\t\t$ERROR('#4: __re = /(?:ab|cd)\\\\d?/g; __executed = __re.exec(\"aacd2233ab12nm444ab42\"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]);\n\t}\n}\n\n__re.lastIndex = \"eleven\";\n\n__executed = __re.exec(\"aacd2233ab12nm444ab42\");\n\n__expected = [\"cd2\"];\n__expected.index = 2;\n__expected.input = \"aacd2233ab12nm444ab42\";\n\n//CHECK#5\nif (__executed.length !== __expected.length) {\n\t$ERROR('#5: __re = /(?:ab|cd)\\\\d?/g; __re.lastIndex = \"eleven\"; __executed = __re.exec(\"aacd2233ab12nm444ab42\"); __executed = __re.exec(\"aacd2233ab12nm444ab42\"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length);\n}\n\n//CHECK#6\nif (__executed.index !== __expected.index) {\n\t$ERROR('#6: __re = /(?:ab|cd)\\\\d?/g; __re.lastIndex = \"eleven\"; __executed = __re.exec(\"aacd2233ab12nm444ab42\"); __executed = __re.exec(\"aacd2233ab12nm444ab42\"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index);\n}\n\n//CHECK#7\nif (__executed.input !== __expected.input) {\n\t$ERROR('#7: __re = /(?:ab|cd)\\\\d?/g; __re.lastIndex = \"eleven\"; __executed = __re.exec(\"aacd2233ab12nm444ab42\"); __executed = __re.exec(\"aacd2233ab12nm444ab42\"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input);\n}\n\n//CHECK#8\nfor(var index=0; index<__expected.length; index++) {\n\tif (__executed[index] !== __expected[index]) {\n\t\t$ERROR('#8: __re = /(?:ab|cd)\\\\d?/g;__re.lastIndex = \"eleven\"; __executed = __re.exec(\"aacd2233ab12nm444ab42\"); __executed = __re.exec(\"aacd2233ab12nm444ab42\"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]);\n\t}\n}\n\n",
+ "id": "S15.10.6.2_A4_T9"
+ },
+ {
+ "section": "15.10.6.2, 13.2",
+ "description": "First call /(?:ab|cd)\\d?/g.exec(\"aac1dz2233a1bz12nm444ab42\"), and then First call /(?:ab|cd)\\d?/g.exec(\"aacd22\")",
+ "test": "__re = /(?:ab|cd)\\d?/g;\n__executed = __re.exec(\"aac1dz2233a1bz12nm444ab42\");\n\n__expected = [\"ab4\"];\n__expected.index = 21;\n__expected.input = \"aac1dz2233a1bz12nm444ab42\";\n\n//CHECK#1\nif (__executed.length !== __expected.length) {\n\t$ERROR('#1: __re = /(?:ab|cd)\\\\d?/g; __executed = __re.exec(\"aac1dz2233a1bz12nm444ab42\"); __executed.length === ' + __expected.length + '. Actual: ' + __executed.length);\n}\n\n//CHECK#2\nif (__executed.index !== __expected.index) {\n\t$ERROR('#2: __re = /(?:ab|cd)\\\\d?/g; __executed = __re.exec(\"aac1dz2233a1bz12nm444ab42\"); __executed.index === ' + __expected.index + '. Actual: ' + __executed.index);\n}\n\n//CHECK#3\nif (__executed.input !== __expected.input) {\n\t$ERROR('#3: __re = /(?:ab|cd)\\\\d?/g; __executed = __re.exec(\"aac1dz2233a1bz12nm444ab42\"); __executed.input === ' + __expected.input + '. Actual: ' + __executed.input);\n}\n\n//CHECK#4\nfor(var index=0; index<__expected.length; index++) {\n\tif (__executed[index] !== __expected[index]) {\n\t\t$ERROR('#4: __re = /(?:ab|cd)\\\\d?/g; __executed = __re.exec(\"aac1dz2233a1bz12nm444ab42\"); __executed[' + index + '] === ' + __expected[index] + '. Actual: ' + __executed[index]);\n\t}\n}\n\n__executed = __re.exec(\"aacd22\");\n\n//CHECK#5\nif (__executed) {\n\t$ERROR('#5: __re = /(?:ab|cd)\\\\d?/g; __executed = __re.exec(\"aacd22\"); __executed === true');\n}\n\n//CHECK#6\nif (__re.lastIndex !== 0) {\n\t$ERROR('#6: __re = /(?:ab|cd)\\\\d?/g; __executed = __re.exec(\"aacd22\"); __re.lastIndex === 0. Actual: ' + (__re.lastIndex));\n}\n\n",
+ "id": "S15.10.6.2_A5_T1"
+ },
+ {
+ "section": "15.10.6.2, 13.2",
+ "description": "Set lastIndex to 100 and call /(?:ab|cd)\\d?/g.exec(\"aacd22 \")",
+ "test": "__re = /(?:ab|cd)\\d?/g;\n__re.lastIndex=100;\n__executed = __re.exec(\"aacd22 \");\n\n//CHECK#1\nif (__executed) {\n\t$ERROR('#1: __re = /(?:ab|cd)\\\\d?/g; __re.lastIndex=100; __executed = __re.exec(\"aacd22 \"); __executed === true');\n}\n\n//CHECK#2\nif (__re.lastIndex !== 0) {\n\t$ERROR('#2: __re = /(?:ab|cd)\\\\d?/g; __re.lastIndex=100; __executed = __re.exec(\"aacd22 \"); __re.lastIndex === 0. Actual: ' + (__re.lastIndex));\n}\n\n",
+ "id": "S15.10.6.2_A5_T2"
+ },
+ {
+ "section": "15.10.6.2, 13.2",
+ "description": "Set lastIndex to -1 and call /(?:ab|cd)\\d?/g.exec(\"aacd22 \")",
+ "test": "__re = /(?:ab|cd)\\d?/g;\n__re.lastIndex=-1;\n__executed = __re.test(\"aacd22 \");\n\n//CHECK#1\nif (__executed) {\n\t$ERROR('#1: __re = /(?:ab|cd)\\\\d?/g; __re.lastIndex=-1; __executed = __re.test(\"aacd22 \"); __executed === true');\n}\n\n//CHECK#2\nif (__re.lastIndex !== 0) {\n\t$ERROR('#2: __re = /(?:ab|cd)\\\\d?/g; __re.lastIndex=-1; __executed = __re.test(\"aacd22 \"); __re.lastIndex === 0. Actual: ' + (__re.lastIndex));\n}\n\n__re.lastIndex=-100;\n__executed = __re.test(\"aacd22 \");\n\n//CHECK#3\nif (__executed) {\n\t$ERROR('#3: __re = /(?:ab|cd)\\\\d?/g; __re.lastIndex=-1; __executed = __re.test(\"aacd22 \"); __re.lastIndex=-100; __executed = __re.test(\"aacd22 \"); __executed === true');\n}\n\n//CHECK#4\nif (__re.lastIndex !== 0) {\n\t$ERROR('#4: __re = /(?:ab|cd)\\\\d?/g; __re.lastIndex=-1; __executed = __re.test(\"aacd22 \"); __re.lastIndex=-100; __executed = __re.test(\"aacd22 \"); __re.lastIndex === 0. Actual: ' + (__re.lastIndex));\n}\n\n",
+ "id": "S15.10.6.2_A5_T3"
+ },
+ {
+ "section": "15.10.6.2, 13.2",
+ "description": "Checking RegExp.prototype.exec.prototype",
+ "test": "//CHECK#1\nif (RegExp.prototype.exec.prototype !== undefined) {\n $ERROR('#1: RegExp.prototype.exec.prototype === undefined. Actual: ' + (RegExp.prototype.exec.prototype));\n}\n",
+ "id": "S15.10.6.2_A6"
+ },
+ {
+ "section": "15.10.6.2, 13.2",
+ "description": "Checking if creating the RegExp.prototype.exec object fails",
+ "test": "__FACTORY = RegExp.prototype.exec;\n\ntry {\n __instance = new __FACTORY;\n $ERROR('#1.1: __FACTORY = RegExp.prototype.exec throw TypeError. Actual: ' + (__instance));\n} catch (e) {\n if ((e instanceof TypeError) !== true) {\n $ERROR('#1.2: __FACTORY = RegExp.prototype.exec throw TypeError. Actual: ' + (e));\n }\n}\n",
+ "id": "S15.10.6.2_A7"
+ },
+ {
+ "section": "15.10.6.2",
+ "description": "Checking if enumerating the RegExp.prototype.exec.length property fails",
+ "test": "//CHECK#0\nif (RegExp.prototype.exec.hasOwnProperty('length') !== true) {\n $ERROR('#0: RegExp.prototype.exec.hasOwnProperty(\\'length\\') === true');\n}\n\n //CHECK#1\nif (RegExp.prototype.exec.propertyIsEnumerable('length') !== false) {\n $ERROR('#1: RegExp.prototype.exec.propertyIsEnumerable(\\'length\\') === true');\n}\n\n //CHECK#2\ncount=0;\n\nfor (p in RegExp.prototype.exec){\n if (p===\"length\") count++;\n}\n\nif (count !== 0) {\n $ERROR('#2: count = 0; for (p in RegExp.prototype.exec){ if (p===\"length\") count++; } count === 0. Actual: ' + (count));\n}\n\n",
+ "id": "S15.10.6.2_A8"
+ },
+ {
+ "section": "15.10.6.2",
+ "description": "Checking if deleting the RegExp.prototype.exec.length property fails",
+ "test": "//CHECK#0\nif ((RegExp.prototype.exec.hasOwnProperty('length') !== true)) {\n $FAIL('#0: RegExp.prototype.exec.hasOwnProperty(\\'length\\') === true');\n}\n\n//CHECK#1\nif (delete RegExp.prototype.exec.length !== false) {\n $ERROR('#1: delete RegExp.prototype.exec.length === false');\n}\n\n//CHECK#2\nif (RegExp.prototype.exec.hasOwnProperty('length') !== true) {\n $ERROR('#2: delete RegExp.prototype.exec.length; RegExp.prototype.exec.hasOwnProperty(\\'length\\') === true');\n}\n\n",
+ "id": "S15.10.6.2_A9"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.10.6.3_RegExp.prototype.test.json b/website/resources/scripts/testcases2/15.10.6.3_RegExp.prototype.test.json
new file mode 100644
index 000000000..eaf9fb0a5
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.10.6.3_RegExp.prototype.test.json
@@ -0,0 +1,230 @@
+{
+ "testCollection": {
+ "name": "15.10.6.3_RegExp.prototype.test",
+ "numTests": 37,
+ "tests": [
+ {
+ "section": "15.10.6.3",
+ "description": "Checking if varying the RegExp.prototype.test.length property fails",
+ "test": "//CHECK#1\nif (RegExp.prototype.test.hasOwnProperty('length') !== true) {\n $FAIL('#1: RegExp.prototype.test.hasOwnProperty(\\'length\\') === true');\n}\n\n__obj = RegExp.prototype.test.length;\n\nRegExp.prototype.test.length = function(){return \"shifted\";};\n\n//CHECK#2\nif (RegExp.prototype.test.length !== __obj) {\n $ERROR('#2: __obj = RegExp.prototype.test.length; RegExp.prototype.test.length = function(){return \"shifted\";}; RegExp.prototype.test.length === __obj. Actual: ' + (RegExp.prototype.test.length));\n}\n\n",
+ "id": "S15.10.6.3_A10"
+ },
+ {
+ "section": "15.10.6.3",
+ "description": "Checking RegExp.prototype.test.length",
+ "test": "//CHECK#1\nif (RegExp.prototype.test.hasOwnProperty(\"length\") !== true) {\n $FAIL('#1: RegExp.prototype.test.hasOwnProperty(\\'length\\') === true');\n}\n\n//CHECK#2\nif (RegExp.prototype.test.length !== 1) {\n $ERROR('#2: RegExp.prototype.test.length === 1. Actual: ' + (RegExp.prototype.test.length));\n}\n\n",
+ "id": "S15.10.6.3_A11"
+ },
+ {
+ "section": "15.10.6.3",
+ "description": "RegExp is /1|12/ and tested string is \"123\"",
+ "test": "var __string = \"123\";\n__re = /1|12/;\n\n//CHECK#0\nif (__re.test(__string) !== (__re.exec(__string) !== null)) {\n\t$ERROR('#0: var __string = \"123\";__re = /1|12/; __re.test(__string) === (__re.exec(__string) !== null)');\n}\n\n",
+ "id": "S15.10.6.3_A1_T1"
+ },
+ {
+ "section": "15.10.6.3",
+ "description": "RegExp is /1|12/ and tested string is 1.01",
+ "test": "var __string = 1.01;\n__re = /1|12/;\n\n//CHECK#0\nif (__re.test(__string) !== (__re.exec(__string) !== null)) {\n\t$ERROR('#0: var __string = 1.01;__re = /1|12/; __re.test(__string) === (__re.exec(__string) !== null)');\n}\n\n",
+ "id": "S15.10.6.3_A1_T10"
+ },
+ {
+ "section": "15.10.6.3",
+ "description": "RegExp is /2|12/ and tested string is new Number(1.012)",
+ "test": "var __string = new Number(1.012);\n__re = /2|12/;\n\n//CHECK#0\nif (__re.test(__string) !== (__re.exec(__string) !== null)) {\n\t$ERROR('#0: var __string = new Number(1.012); __re = /2|12/; __re.test(__string) === (__re.exec(__string) !== null)');\n}\n\n",
+ "id": "S15.10.6.3_A1_T11"
+ },
+ {
+ "section": "15.10.6.3",
+ "description": ": RegExp is /\\.14/ and tested string is {toString:function(){return Math.PI;}};",
+ "test": "var __string = {toString:function(){return Math.PI;}};\n__re = /\\.14/;\n\n//CHECK#0\nif (__re.test(__string) !== (__re.exec(__string) !== null)) {\n\t$ERROR('#0: var __string = {toString:function(){return Math.PI;}}; __re = /\\\\.14/; __re.test(__string) === (__re.exec(__string) !== null)');\n}\n\n",
+ "id": "S15.10.6.3_A1_T12"
+ },
+ {
+ "section": "15.10.6.3",
+ "description": "RegExp is /t[a-b|q-s]/ and tested string is true",
+ "test": "var __string = true;\n__re = /t[a-b|q-s]/;\n\n//CHECK#0\nif (__re.test(__string) !== (__re.exec(__string) !== null)) {\n\t$ERROR('#0: var __string = true;__re = /t[a-b|q-s]/; __re.test(__string) === (__re.exec(__string) !== null)');\n}\n\n",
+ "id": "S15.10.6.3_A1_T13"
+ },
+ {
+ "section": "15.10.6.3",
+ "description": "RegExp is /AL|se/ and tested string is new Boolean",
+ "test": "var __string = new Boolean;\n__re = /AL|se/;\n\n//CHECK#0\nif (__re.test(__string) !== (__re.exec(__string) !== null)) {\n\t$ERROR('#0: var __string = new Boolean;__re = /AL|se/; __re.test(__string) === (__re.exec(__string) !== null)');\n}\n\n",
+ "id": "S15.10.6.3_A1_T14"
+ },
+ {
+ "section": "15.10.6.3",
+ "description": ": RegExp is /LS/i and tested string is {toString:function(){return false;}};",
+ "test": "var __string = {toString:function(){return false;}};\n__re = /LS/i;\n\n//CHECK#0\nif (__re.test(__string) !== (__re.exec(__string) !== null)) {\n\t$ERROR('#0: var __string = {toString:function(){return false;}}; __re = /LS/i; __re.test(__string) === (__re.exec(__string) !== null)');\n}\n\n",
+ "id": "S15.10.6.3_A1_T15"
+ },
+ {
+ "section": "15.10.6.3",
+ "description": "RegExp is /undefined/ and call test() without arguments",
+ "test": "__re = /undefined/;\n\n//CHECK#0\nif (__re.test() !== (__re.exec() !== null)) {\n\t$ERROR('#0: __re = /undefined/; __re.test() === (__re.exec() !== null)');\n}\n\n",
+ "id": "S15.10.6.3_A1_T16"
+ },
+ {
+ "section": "15.10.6.3",
+ "description": "RegExp is /ll|l/ and tested string is null",
+ "test": "__re = /ll|l/;\n\n//CHECK#0\nif (__re.test(null) !== (__re.exec(null) !== null)) {\n\t$ERROR('#0: __re = /ll|l/; __re.test(null) === (__re.exec(null) !== null)');\n}\n\n",
+ "id": "S15.10.6.3_A1_T17"
+ },
+ {
+ "section": "15.10.6.3",
+ "description": "RegExp is /nd|ne/ and tested string is undefined",
+ "test": "__re = /nd|ne/;\n\n//CHECK#0\nif (__re.test(undefined) !== (__re.exec(undefined) !== null)) {\n\t$ERROR('#0: __re = /nd|ne/; __re.test(undefined) === (__re.exec(undefined) !== null)');\n}\n\n",
+ "id": "S15.10.6.3_A1_T18"
+ },
+ {
+ "section": "15.10.6.3",
+ "description": "RegExp is /e{1}/ and tested string is void 0",
+ "test": "__re = /e{1}/;\n\n//CHECK#0\nif (__re.test(void 0) !== (__re.exec(void 0) !== null)) {\n\t$ERROR('#0: __re = /e{1}/; __re.test(void 0) === (__re.exec(void 0) !== null)');\n}\n\n",
+ "id": "S15.10.6.3_A1_T19"
+ },
+ {
+ "section": "15.10.6.3",
+ "description": "RegExp is /((1)|(12))((3)|(23))/ and tested string is new String(\"123\")",
+ "test": "var __string = new String(\"123\");\n__re = /((1)|(12))((3)|(23))/;\n\n//CHECK#0\nif (__re.test(__string) !== (__re.exec(__string) !== null)) {\n\t$ERROR('#0: var __string = new String(\"123\"); __re = /((1)|(12))((3)|(23))/; __re.test(__string) === (__re.exec(__string) !== null)');\n}\n\n",
+ "id": "S15.10.6.3_A1_T2"
+ },
+ {
+ "section": "15.10.6.3",
+ "description": "RegExp is /[a-f]d/ and tested string is x, where x is undefined",
+ "test": "__re = /[a-f]d/;\n\n//CHECK#0\nif (__re.test(x) !== (__re.exec(x) !== null)) {\n\t$ERROR('#0: __re = /[a-f]d/; __re.test(x) === (__re.exec(x) !== null); var x;');\n}\n\nvar x;\n",
+ "id": "S15.10.6.3_A1_T20"
+ },
+ {
+ "section": "15.10.6.3",
+ "description": "RegExp is /[a-z]n/ and tested string is x, where x is function(){}()",
+ "test": "__re = /[a-z]n/;\n\n//CHECK#0\nif (__re.test(function(){}()) !== (__re.exec(function(){}()) !== null)) {\n\t$ERROR('#0: __re = /[a-z]n/; __re.test(function(){}()) === (__re.exec(function(){}()) !== null)');\n}\n\n",
+ "id": "S15.10.6.3_A1_T21"
+ },
+ {
+ "section": "15.10.6.3",
+ "description": "RegExp is /a[a-z]{2,4}/ and tested string is new Object(\"abcdefghi\")",
+ "test": "var __string = new Object(\"abcdefghi\");\n__re = /a[a-z]{2,4}/;\n\n//CHECK#0\nif (__re.test(__string) !== (__re.exec(__string) !== null)) {\n\t$ERROR('#0: var __string = new Object(\"abcdefghi\"); __re = /a[a-z]{2,4}/; __re.test(__string) === (__re.exec(__string) !== null)');\n}\n\n",
+ "id": "S15.10.6.3_A1_T3"
+ },
+ {
+ "section": "15.10.6.3",
+ "description": ": RegExp is /a[a-z]{2,4}?/ and tested string is {toString:function(){return \"abcdefghi\";}};",
+ "test": "var __string = {toString:function(){return \"abcdefghi\";}};\n__re = /a[a-z]{2,4}?/;\n\n//CHECK#0\nif (__re.test(__string) !== (__re.exec(__string) !== null)) {\n\t$ERROR('#0: var __string = {toString:function(){return \"abcdefghi\";}}; __re = /a[a-z]{2,4}?/; __re.test(__string) === (__re.exec(__string) !== null)');\n}\n\n",
+ "id": "S15.10.6.3_A1_T4"
+ },
+ {
+ "section": "15.10.6.3",
+ "description": ": RegExp is /(aa|aabaac|ba|b|c)* / and tested string is {toString:function(){return {};}, valueOf:function(){return \"aabaac\";}};",
+ "test": "var __string = {toString:function(){return {};}, valueOf:function(){return \"aabaac\";}};\n__re = /(aa|aabaac|ba|b|c)*/;\n\n//CHECK#0\nif (__re.test(__string) !== (__re.exec(__string) !== null)) {\n\t$ERROR('#0: var __string = {toString:function(){return {};}, valueOf:function(){return \"aabaac\";}}; __re = /(aa|aabaac|ba|b|c)*/; __re.test(__string) === (__re.exec(__string) !== null)');\n}\n\n",
+ "id": "S15.10.6.3_A1_T5"
+ },
+ {
+ "section": "15.10.6.3",
+ "description": "RegExp is /(z)((a+)?(b+)?(c))* / and tested string is (function(){return \"zaacbbbcac\"})()",
+ "test": "__re = /(z)((a+)?(b+)?(c))*/;\n\n//CHECK#0\nif (__re.test((function(){return \"zaacbbbcac\"})()) !== (__re.exec((function(){return \"zaacbbbcac\"})()) !== null)) {\n\t$ERROR('#0: __re = /(z)((a+)?(b+)?(c))*/; __re.test((function(){return \"zaacbbbcac\"})()) === (__re.exec((function(){return \"zaacbbbcac\"})()) !== null)');\n}\n\n",
+ "id": "S15.10.6.3_A1_T6"
+ },
+ {
+ "section": "15.10.6.3",
+ "description": ": RegExp is /[a-z]/ and tested string is {toString:function(){throw \"intostr\";}};",
+ "test": "//CHECK#1\ntry {\n\t$ERROR('#1.1: /[a-z]/.test({toString:function(){throw \"intostr\";}}) throw \"intostr\". Actual: ' + (/[a-z]/.test({toString:function(){throw \"intostr\";}})));\n} catch (e) {\n\tif (e !== \"intostr\") {\n\t\t$ERROR('#1.2: /[a-z]/.test({toString:function(){throw \"intostr\";}}) throw \"intostr\". Actual: ' + (e));\n\t}\n}\n\n",
+ "id": "S15.10.6.3_A1_T7"
+ },
+ {
+ "section": "15.10.6.3",
+ "description": ": RegExp is /[a-z]/ and tested string is {toString:void 0, valueOf:function(){throw \"invalof\";}};",
+ "test": "//CHECK#1\ntry {\n $ERROR('#1.1: /[a-z]/.test({toString:void 0, valueOf:function(){throw \"invalof\";}}) throw \"invalof\". Actual: ' + (/[a-z]/.test({toString:void 0, valueOf:function(){throw \"invalof\";}})));\n} catch (e) {\n if (e !== \"invalof\") {\n $ERROR('#1.2: /[a-z]/.test({toString:void 0, valueOf:function(){throw \"invalof\";}}) throw \"invalof\". Actual: ' + (e));\n }\n}\n",
+ "id": "S15.10.6.3_A1_T8"
+ },
+ {
+ "section": "15.10.6.3",
+ "description": "RegExp is /1|12/ and tested string is function object",
+ "test": "var __string;\n__re = /1|12/;\n\n//CHECK#0\nif (__re.test(__string) !== (__re.exec(__string) !== null)) {\n\t$ERROR('#0: var __string;__re = /1|12/; __re.test(__string) === (__re.exec(__string) !== null); function __string(){};');\n}\n\nfunction __string(){};\n",
+ "id": "S15.10.6.3_A1_T9"
+ },
+ {
+ "section": "15.10.6.3",
+ "description": "The tested object is new Object",
+ "test": "__instance = new Object;\n\n__instance.test = RegExp.prototype.test;\n\n//CHECK#1\ntry {\n $ERROR('#1.1: __instance = new Object; __instance.test = RegExp.prototype.test; __instance.test(\"message to investigate\"). Actual: ' + (__instance.test(\"message to investigate\")));\n} catch (e) {\n if ((e instanceof TypeError) !== true) {\n $ERROR('#1.2: __instance = new Object; __instance.test = RegExp.prototype.test. Actual: ' + (e));\n }\n}\n\n",
+ "id": "S15.10.6.3_A2_T1"
+ },
+ {
+ "section": "15.10.6.3",
+ "description": "The tested object is undefined",
+ "test": "test = RegExp.prototype.test;\n\n//CHECK#1\ntry {\n $ERROR('#1.1: test = RegExp.prototype.test; test(\"message to investigate\"). Actual: ' + (test(\"message to investigate\")));\n} catch (e) {\n if ((e instanceof TypeError) !== true) {\n $ERROR('#1.2: test = RegExp.prototype.test; test(\"message to investigate\"). Actual: ' + (e));\n }\n}\n",
+ "id": "S15.10.6.3_A2_T10"
+ },
+ {
+ "section": "15.10.6.3",
+ "description": "The tested object is Math",
+ "test": "__instance = Math;\n\n__instance.test = RegExp.prototype.test;\n\n//CHECK#1\ntry { \n with(__instance) test(\"message to investigate\");\n $ERROR('#1.1: __instance = Math; __instance.test = RegExp.prototype.test; with(__instance) test(\"message to investigate\")');\n} catch (e) {\n if ((e instanceof TypeError) !== true) {\n $ERROR('#1.2: __instance = Math; __instance.test = RegExp.prototype.test; with(__instance) test(\"message to investigate\"). Actual: ' + (e));\n }\n}\n\n\n",
+ "id": "S15.10.6.3_A2_T2"
+ },
+ {
+ "section": "15.10.6.3",
+ "description": "The tested object is function object",
+ "test": "__instance.test = RegExp.prototype.test;\n\n//CHECK#1\ntry {\n with(__instance) test(\"message to investigate\");\n $ERROR('#1.1: __instance.test = RegExp.prototype.test; with(__instance) test(\"message to investigate\"); function __instance(){}');\n} catch (e) {\n if ((e instanceof TypeError) !== true) {\n $ERROR('#1.2: __instance.test = RegExp.prototype.test; with(__instance) test(\"message to investigate\"); function __instance(){}. Actual: ' + (e));\n }\n}\n\nfunction __instance(){};\n",
+ "id": "S15.10.6.3_A2_T3"
+ },
+ {
+ "section": "15.10.6.3",
+ "description": "The tested object is new String(\"[a-b]\")",
+ "test": "__instance = new String(\"[a-b]\");\n\n__instance.test = RegExp.prototype.test;\n\n//CHECK#1\nwith(__instance){\n try {\n $ERROR('#1.1: __instance = new String(\"[a-b]\"); __instance.test = RegExp.prototype.test; test(\"message to investigate\"). Actual: ' + (test(\"message to investigate\")));\n } catch (e) {\n if ((e instanceof TypeError) !== true) {\n $ERROR('#1.2: __instance = new String(\"[a-b]\"); __instance.test = RegExp.prototype.test; test(\"message to investigate\"). Actual: ' + (e));\n }\n }\n}\n\n",
+ "id": "S15.10.6.3_A2_T4"
+ },
+ {
+ "section": "15.10.6.3",
+ "description": "The tested object is new Boolean(false)",
+ "test": "__instance = new Boolean(false);\n\n__instance.test = RegExp.prototype.test;\n\n//CHECK#1\nwith(__instance) {\n try {\n $ERROR('#1.1: __instance = new Boolean(false); __instance.test = RegExp.prototype.test; test(\"message to investigate\"). Actual: ' + (test(\"message to investigate\")));\n } catch (e) {\n if ((e instanceof TypeError !== true)) {\n $ERROR('#1.2: __instance = new Boolean(false); __instance.test = RegExp.prototype.test; test(\"message to investigate\"). Actual: ' + (e));\n }\n } \n}\n",
+ "id": "S15.10.6.3_A2_T5"
+ },
+ {
+ "section": "15.10.6.3",
+ "description": "The tested object is new Number(1.0)",
+ "test": "__instance = new Number(1.0);\n\n__instance.test = RegExp.prototype.test;\n\n//CHECK#1\ntry {\n $ERROR('#1.1: __instance = new Number(1.0); __instance.test = RegExp.prototype.test; __instance[\"test\"](\"message to investigate\"). Actual: ' + (__instance[\"test\"](\"message to investigate\")));\n} catch (e) {\n if ((e instanceof TypeError) !== true) {\n $ERROR('#1.2: __instance = new Number(1.0); __instance.test = RegExp.prototype.test; __instance[\"test\"](\"message to investigate\"). Actual: ' + (e));\n }\n}\n\n",
+ "id": "S15.10.6.3_A2_T6"
+ },
+ {
+ "section": "15.10.6.3",
+ "description": "The tested object is false",
+ "test": "__instance = false;\n\nObject.prototype.test = RegExp.prototype.test;\n\n//CHECK#1\ntry {\n $ERROR('#1.1: __instance = false; Object.prototype.test = RegExp.prototype.test; __instance.test(\"message to investigate\"). Actual: ' + (__instance.test(\"message to investigate\")));\n} catch (e) {\n if ((e instanceof TypeError) !== true) {\n $ERROR('#1.2: __instance = false; Object.prototype.test = RegExp.prototype.test; __instance.test(\"message to investigate\"). Actual: ' + (e));\n }\n}\n\n\n",
+ "id": "S15.10.6.3_A2_T7"
+ },
+ {
+ "section": "15.10.6.3",
+ "description": "The tested object is \".\"",
+ "test": "__instance = \".\";\n\nObject.prototype.test = RegExp.prototype.test;\n\n//CHECK#1\ntry {\n $ERROR('#1.1: __instance = \".\"; Object.prototype.test = RegExp.prototype.test; __instance.test(\"message to investigate\"). Actual: ' + (__instance.test(\"message to investigate\")));\n} catch (e) {\n if ((e instanceof TypeError) !== true) {\n $ERROR('#1.2: __instance = \".\"; Object.prototype.test = RegExp.prototype.test; __instance.test(\"message to investigate\"). Actual: ' + (e));\n }\n}\n",
+ "id": "S15.10.6.3_A2_T8"
+ },
+ {
+ "section": "15.10.6.3",
+ "description": "The tested object is 1.0",
+ "test": "__instance = 1.0;\n\nObject.prototype.test = RegExp.prototype.test;\n\n//CHECK#1\ntry {\n $ERROR('#1.1: __instance = 1.0; Object.prototype.test = RegExp.prototype.test; __instance.test(\"message to investigate\"). Actual: ' + (__instance.test(\"message to investigate\")));\n} catch (e) {\n if ((e instanceof TypeError) !== true) {\n $ERROR('#1.2: __instance = 1.0; Object.prototype.test = RegExp.prototype.test; __instance.test(\"message to investigate\"). Actual: ' + (e));\n }\n}\n\n",
+ "id": "S15.10.6.3_A2_T9"
+ },
+ {
+ "section": "15.10.6.3, 13.2",
+ "description": "Checking RegExp.prototype.test.prototype",
+ "test": "//CHECK#1\nif (RegExp.prototype.test.prototype !== undefined) {\n $ERROR('#1: RegExp.prototype.test.prototype === undefined. Actual: ' + (RegExp.prototype.test.prototype));\n}\n\n",
+ "id": "S15.10.6.3_A6"
+ },
+ {
+ "section": "15.10.6.3, 13.2",
+ "description": "Checking if creating the RegExp.prototype.test object fails",
+ "test": "__FACTORY = RegExp.prototype.test;\n\ntry {\n __instance = new __FACTORY;\n $ERROR('#1.1: __FACTORY = RegExp.prototype.test throw TypeError. Actual: ' + (__instance));\n} catch (e) {\n if ((e instanceof TypeError) !== true) {\n $ERROR('#1.2: __FACTORY = RegExp.prototype.test throw TypeError. Actual: ' + (e));\n }\n}\n",
+ "id": "S15.10.6.3_A7"
+ },
+ {
+ "section": "15.10.6.3",
+ "description": "Checking if enumerating the RegExp.prototype.test.length property fails",
+ "test": "//CHECK#0\nif (RegExp.prototype.test.hasOwnProperty('length') !== true) {\n $ERROR('#0: RegExp.prototype.test.hasOwnProperty(\\'length\\') === true');\n}\n\n //CHECK#1\nif (RegExp.prototype.test.propertyIsEnumerable('length') !== false) {\n $ERROR('#1: RegExp.prototype.test.propertyIsEnumerable(\\'length\\') === true');\n}\n\n //CHECK#2\ncount=0;\n\nfor (p in RegExp.prototype.test){\n if (p===\"length\") count++;\n}\n\nif (count !== 0) {\n $ERROR('#2: count = 0; for (p in RegExp.prototype.test){ if (p===\"length\") count++; } count === 0. Actual: ' + (count));\n}\n\n",
+ "id": "S15.10.6.3_A8"
+ },
+ {
+ "section": "15.10.6.3",
+ "description": "Checking if deleting RegExp.prototype.test.length property fails",
+ "test": "//CHECK#0\nif ((RegExp.prototype.exec.hasOwnProperty('length') !== true)) {\n $FAIL('#0: RegExp.prototype.exec.hasOwnProperty(\\'length\\') === true');\n}\n\n//CHECK#1\nif (delete RegExp.prototype.exec.length !== false) {\n $ERROR('#1: delete RegExp.prototype.exec.length === false');\n}\n\n//CHECK#2\nif (RegExp.prototype.exec.hasOwnProperty('length') !== true) {\n $ERROR('#2: delete RegExp.prototype.exec.length; RegExp.prototype.exec.hasOwnProperty(\\'length\\') === true');\n}\n\n",
+ "id": "S15.10.6.3_A9"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.10.6.4_RegExp.prototype.toString.json b/website/resources/scripts/testcases2/15.10.6.4_RegExp.prototype.toString.json
new file mode 100644
index 000000000..0b3e9086f
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.10.6.4_RegExp.prototype.toString.json
@@ -0,0 +1,44 @@
+{
+ "testCollection": {
+ "name": "15.10.6.4_RegExp.prototype.toString",
+ "numTests": 6,
+ "tests": [
+ {
+ "section": "15.10.6.4",
+ "description": "Checking if varying the RegExp.prototype.toString.length property fails",
+ "test": "//CHECK#1\nif (RegExp.prototype.toString.hasOwnProperty('length') !== true) {\n\t$FAIL('#1: RegExp.prototype.toString.hasOwnProperty(\\'length\\') === true');\n}\n\n__obj = RegExp.prototype.toString.length;\n\nRegExp.prototype.toString.length = function(){return \"shifted\";};\n\n//CHECK#2\nif (RegExp.prototype.toString.length !== __obj) {\n\t$ERROR('#2: __obj = RegExp.prototype.toString.length; RegExp.prototype.toString.length = function(){return \"shifted\";}; RegExp.prototype.toString.length === __obj. Actual: ' + (RegExp.prototype.toString.length));\n}\n\n",
+ "id": "S15.10.6.4_A10"
+ },
+ {
+ "section": "15.10.6.4",
+ "description": "Checking RegExp.prototype.toString.length",
+ "test": "//CHECK#1\nif (RegExp.prototype.toString.hasOwnProperty(\"length\") !== true) {\n\t$FAIL('#1: RegExp.prototype.toString.hasOwnProperty(\\'length\\') === true');\n}\n\n//CHECK#2\nif (RegExp.prototype.toString.length !== 0) {\n\t$ERROR('#2: RegExp.prototype.toString.length === 0. Actual: ' + (RegExp.prototype.toString.length));\n}\n\n",
+ "id": "S15.10.6.4_A11"
+ },
+ {
+ "section": "15.10.6.4, 13.2",
+ "description": "Checking RegExp.prototype.toString.prototype",
+ "test": "//CHECK#1\nif (RegExp.prototype.toString.prototype !== undefined) {\n\t$ERROR('#1: RegExp.prototype.toString.prototype === undefined. Actual: ' + (RegExp.prototype.toString.prototype));\n}\n\n",
+ "id": "S15.10.6.4_A6"
+ },
+ {
+ "section": "15.10.6.4, 13.2",
+ "description": "Checking if creating the RegExp.prototype.toString object fails",
+ "test": "__FACTORY = RegExp.prototype.toString;\n\ntry {\n\t__instance = new __FACTORY;\n\t$ERROR('#1.1: __FACTORY = RegExp.prototype.toString throw TypeError. Actual: ' + (__instance));\n} catch (e) {\n if ((e instanceof TypeError) !== true) {\n $ERROR('#1.2: __FACTORY = RegExp.prototype.toString throw TypeError. Actual: ' + (e));\n }\n}\n",
+ "id": "S15.10.6.4_A7"
+ },
+ {
+ "section": "15.10.6.4",
+ "description": "Checking if enumerating the RegExp.prototype.toString.length property fails",
+ "test": "//CHECK#0\nif (RegExp.prototype.toString.hasOwnProperty('length') !== true) {\n\t$ERROR('#0: RegExp.prototype.toString.hasOwnProperty(\\'length\\') === true');\n}\n\n //CHECK#1\nif (RegExp.prototype.toString.propertyIsEnumerable('length') !== false) {\n\t$ERROR('#1: RegExp.prototype.toString.propertyIsEnumerable(\\'length\\') === true');\n}\n\n //CHECK#2\ncount=0;\n\nfor (p in RegExp.prototype.toString){\n\tif (p===\"length\") count++;\n}\n\nif (count !== 0) {\n\t$ERROR('#2: count = 0; for (p in RegExp.prototype.toString){ if (p===\"length\") count++; } count === 0. Actual: ' + (count));\n}\n\n",
+ "id": "S15.10.6.4_A8"
+ },
+ {
+ "section": "15.10.6.4",
+ "description": "Checking if deleting the RegExp.prototype.toString.length property fails",
+ "test": "//CHECK#0\nif ((RegExp.prototype.toString.hasOwnProperty('length') !== true)) {\n\t$FAIL('#0: RegExp.prototype.toString.hasOwnProperty(\\'length\\') === true');\n}\n\n//CHECK#1\nif (delete RegExp.prototype.toString.length !== false) {\n\t$ERROR('#1: delete RegExp.prototype.toString.length === false');\n}\n\n//CHECK#2\nif (RegExp.prototype.toString.hasOwnProperty('length') !== true) {\n\t$ERROR('#2: delete RegExp.prototype.toString.length; RegExp.prototype.toString.hasOwnProperty(\\'length\\') === true');\n}\n\n",
+ "id": "S15.10.6.4_A9"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.10.6.json b/website/resources/scripts/testcases2/15.10.6.json
new file mode 100644
index 000000000..7f158a9cb
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.10.6.json
@@ -0,0 +1,14 @@
+{
+ "testCollection": {
+ "name": "15.10.6",
+ "numTests": 1,
+ "tests": [
+ {
+ "id": "15.10.6",
+ "path": "TestCases/chapter15/15.10/15.10.6/15.10.6.js",
+ "description": "RegExp.prototype is itself a RegExp",
+ "test": "assertTrue((function testcase() {\n var s = Object.prototype.toString.call(RegExp.prototype);\n return s === '[object RegExp]';\n }).call(this));\n"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.10.6_Properties_of_the_RegExp_Prototype_Object.json b/website/resources/scripts/testcases2/15.10.6_Properties_of_the_RegExp_Prototype_Object.json
new file mode 100644
index 000000000..4fbf73c26
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.10.6_Properties_of_the_RegExp_Prototype_Object.json
@@ -0,0 +1,38 @@
+{
+ "testCollection": {
+ "name": "15.10.6_Properties_of_the_RegExp_Prototype_Object",
+ "numTests": 5,
+ "tests": [
+ {
+ "section": "15.10.6.1",
+ "description": "Compare RegExp.prototype.constructor with RegExp",
+ "test": "//CHECK#1\nif (RegExp.prototype.constructor !== RegExp) {\n\t$ERROR('#1: RegExp.prototype.constructor === RegExp. Actual: ' + (RegExp.prototype.constructor));\n}\n\n",
+ "id": "S15.10.6.1_A1_T1"
+ },
+ {
+ "section": "15.10.6.1",
+ "description": "Compare instance.constructor !== RegExp, where instance is new RegExp.prototype.constructor",
+ "test": "__FACTORY = RegExp.prototype.constructor;\n\n__instance = new __FACTORY;\n\n//CHECK#1\nif ((__instance instanceof RegExp) !== true) {\n\t$ERROR('#1: __FACTORY = RegExp.prototype.constructor; __instance = new __FACTORY; (__instance instanceof RegExp) === true');\n}\n\n//CHECK#2\nif (__instance.constructor !== RegExp) {\n\t$ERROR('#2: __FACTORY = RegExp.prototype.constructor; __instance = new __FACTORY; __instance.constructor === RegExp. Actual: ' + (__instance.constructor));\n}\n\n",
+ "id": "S15.10.6.1_A1_T2"
+ },
+ {
+ "section": "15.10.6",
+ "description": "Checking Object.prototype.isPrototypeOf(RegExp.prototype)",
+ "test": "//CHECK#1\nif (Object.prototype.isPrototypeOf(RegExp.prototype) !== true) {\n\t$ERROR('#1: Object.prototype.isPrototypeOf(RegExp.prototype) === true');\n}\n\n",
+ "id": "S15.10.6_A1_T1"
+ },
+ {
+ "section": "15.10.6",
+ "description": "Add new property to Object.prototype and check it of RegExp.prototype",
+ "test": "Object.prototype.indicator = 1;\n\n//CHECK#1\nif (RegExp.prototype.indicator !== 1) {\n\t$ERROR('#1: Object.prototype.indicator = 1; RegExp.prototype.indicator === 1. Actual: ' + (RegExp.prototype.indicator));\n}\n\n",
+ "id": "S15.10.6_A1_T2"
+ },
+ {
+ "section": "15.10.6",
+ "description": "Checking performs with toString function",
+ "test": "RegExp.prototype.toString = Object.prototype.toString;\n\n//CHECK#1\nif (RegExp.prototype.toString() !== \"[object \" + \"Object\" + \"]\") {\n\t$ERROR('#1: RegExp.prototype.toString = Object.prototype.toString; RegExp.prototype.toString() === \"[object \" + \"Object\" + \"]\". Actual: ' + RegExp.prototype.toString());\n}\n\n",
+ "id": "S15.10.6_A2"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.10.7.1.json b/website/resources/scripts/testcases2/15.10.7.1.json
new file mode 100644
index 000000000..f464e0e03
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.10.7.1.json
@@ -0,0 +1,21 @@
+{
+ "testCollection": {
+ "name": "15.10.7.1",
+ "numTests": 2,
+ "tests": [
+ {
+ "id": "15.10.7.1-1",
+ "path": "TestCases/chapter15/15.10/15.10.7/15.10.7.1/15.10.7.1-1.js",
+ "description": "RegExp.prototype.source is of type String",
+ "test": "assertTrue(((typeof(RegExp.prototype.source)) === 'string'));\n"
+ },
+ {
+ "id": "15.10.7.1-2",
+ "path": "TestCases/chapter15/15.10/15.10.7/15.10.7.1/15.10.7.1-2.js",
+ "description": "RegExp.prototype.source is a data property with default attribute values (false)",
+ "test": "assertTrue((function testcase() {\n var d = Object.getOwnPropertyDescriptor(RegExp.prototype, 'source');\n \n if (d.writable === false &&\n d.enumerable === false &&\n d.configurable === false) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.10.7.1_source.json b/website/resources/scripts/testcases2/15.10.7.1_source.json
new file mode 100644
index 000000000..1416094da
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.10.7.1_source.json
@@ -0,0 +1,26 @@
+{
+ "testCollection": {
+ "name": "15.10.7.1_source",
+ "numTests": 3,
+ "tests": [
+ {
+ "section": "15.10.7.1",
+ "description": "Checking if varying the source property fails",
+ "test": "__re = /./;\n\n//CHECK#1\nif (__re.hasOwnProperty('source') !== true) {\n $FAIL('#1: __re = /./; __re.hasOwnProperty(\\'source\\') === true');\n}\n\n__obj = __re.source;\n\n__re.source = \"shifted\";\n\n//CHECK#2\nif (__re.source !== __obj) {\n $ERROR('#2: __re = /./; __obj = __re.source; __re.source = \"shifted\"; __re.source === __obj. Actual: ' + (__re.source));\n}\n\n",
+ "id": "S15.10.7.1_A10"
+ },
+ {
+ "section": "15.10.7.1",
+ "description": "Checking if enumerating the source property of RegExp instance fails",
+ "test": "__re = new RegExp(\"[1-2]\",\"i\");\n\n//CHECK#0\nif (__re.hasOwnProperty('source') !== true) {\n\t$FAIL('#0: __re = new RegExp(\"[1-2]\",\"i\"); __re.hasOwnProperty(\\'source\\') === true');\n}\n\n //CHECK#1\nif (__re.propertyIsEnumerable('source') !== false) {\n\t$ERROR('#1: __re = new RegExp(\"[1-2]\",\"i\"); __re.propertyIsEnumerable(\\'source\\') === false');\n}\n\n //CHECK#2\ncount = 0\nfor (p in __re){\n\tif (p===\"source\") count++\t \n}\n\nif (count !== 0) {\n $ERROR('#2: count = 0; __re = new RegExp(\"[1-2]\",\"i\"); for (p in __re){ if (p===\"source\") count++; } count === 0. Actual: ' + (count));\n} \n\n",
+ "id": "S15.10.7.1_A8"
+ },
+ {
+ "section": "15.10.7.1",
+ "description": "Checking if deleting the source property fails",
+ "test": "__re = new RegExp;\n\n//CHECK#0\nif (__re.hasOwnProperty('source') !== true) {\n\t$FAIL('#0: __re = new RegExp; __re.hasOwnProperty(\\'source\\') === true');\n}\n\n//CHECK#1\nif ((delete __re.source) !== false) {\n\t$ERROR('#1: __re = new RegExp; (delete __re.source) === false');\n}\n\n//CHECK#2\nif (__re.hasOwnProperty('source') !== true) {\n\t$ERROR('#2: __re = new RegExp;delete __re.source === true; __re.hasOwnProperty(\\'source\\') === true');\n}\n\n",
+ "id": "S15.10.7.1_A9"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.10.7.2.json b/website/resources/scripts/testcases2/15.10.7.2.json
new file mode 100644
index 000000000..23009376e
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.10.7.2.json
@@ -0,0 +1,21 @@
+{
+ "testCollection": {
+ "name": "15.10.7.2",
+ "numTests": 2,
+ "tests": [
+ {
+ "id": "15.10.7.2-1",
+ "path": "TestCases/chapter15/15.10/15.10.7/15.10.7.2/15.10.7.2-1.js",
+ "description": "RegExp.prototype.global is of type Boolean",
+ "test": "assertTrue(((typeof(RegExp.prototype.global)) === 'boolean'));\n"
+ },
+ {
+ "id": "15.10.7.2-2",
+ "path": "TestCases/chapter15/15.10/15.10.7/15.10.7.2/15.10.7.2-2.js",
+ "description": "RegExp.prototype.global is a data property with default attribute values (false)",
+ "test": "assertTrue((function testcase() {\n var desc = Object.getOwnPropertyDescriptor(RegExp.prototype, 'global');\n \n if (desc.writable === false &&\n desc.enumerable === false &&\n desc.configurable === false) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.10.7.2_global.json b/website/resources/scripts/testcases2/15.10.7.2_global.json
new file mode 100644
index 000000000..af3b39493
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.10.7.2_global.json
@@ -0,0 +1,26 @@
+{
+ "testCollection": {
+ "name": "15.10.7.2_global",
+ "numTests": 3,
+ "tests": [
+ {
+ "section": "15.10.7.2",
+ "description": "Checking if varying the global property fails",
+ "test": "__re = /^|^/;\n\n//CHECK#1\nif (__re.hasOwnProperty('global') !== true) {\n $FAIL('#1: __re = /^|^/; __re.hasOwnProperty(\\'global\\') === true');\n}\n\n__obj = __re.global;\n\n__re.global = \"shifted\";\n\n//CHECK#2\nif (__re.global !== __obj) {\n $ERROR('#2: __re = /^|^/; __obj = __re.global; __re.global = \"shifted\"; __re.global === __obj. Actual: ' + (__re.global));\n}\n\n",
+ "id": "S15.10.7.2_A10"
+ },
+ {
+ "section": "15.10.7.2",
+ "description": "Checking if enumerating the global property of RegExp instance fails",
+ "test": "__re = new RegExp(\"[o-o]\",\"m\");\n\n//CHECK#0\nif (__re.hasOwnProperty('global') !== true) {\n $FAIL('#0: __re = new RegExp(\"[o-o]\",\"m\"); __re.hasOwnProperty(\\'global\\') === true');\n}\n\n //CHECK#1\nif (__re.propertyIsEnumerable('global') !== false) {\n $ERROR('#1: __re = new RegExp(\"[o-o]\",\"m\"); __re.propertyIsEnumerable(\\'global\\') === false');\n}\n\n //CHECK#2\ncount = 0\nfor (p in __re){\n if (p===\"global\") count++ \n}\n\nif (count !== 0) {\n $ERROR('#2: count = 0; __re = new RegExp(\"[o-o]\",\"m\"); for (p in __re){ if (p===\"global\") count++; } count === 0. Actual: ' + (count));\n} \n\n",
+ "id": "S15.10.7.2_A8"
+ },
+ {
+ "section": "15.10.7.2",
+ "description": "Checking if deleting the global property fails",
+ "test": "__re = new RegExp;\n\n//CHECK#0\nif (__re.hasOwnProperty('global') !== true) {\n $FAIL('#0: __re = new RegExp; __re.hasOwnProperty(\\'global\\') === true');\n}\n\n//CHECK#1\nif ((delete __re.global) !== false) {\n $ERROR('#1: __re = new RegExp; (delete __re.global) === false');\n}\n\n//CHECK#2\nif (__re.hasOwnProperty('global') !== true) {\n $ERROR('#2: __re = new RegExp;delete __re.global === true; __re.hasOwnProperty(\\'global\\') === true');\n}\n\n",
+ "id": "S15.10.7.2_A9"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.10.7.3.json b/website/resources/scripts/testcases2/15.10.7.3.json
new file mode 100644
index 000000000..37adb34e5
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.10.7.3.json
@@ -0,0 +1,21 @@
+{
+ "testCollection": {
+ "name": "15.10.7.3",
+ "numTests": 2,
+ "tests": [
+ {
+ "id": "15.10.7.3-1",
+ "path": "TestCases/chapter15/15.10/15.10.7/15.10.7.3/15.10.7.3-1.js",
+ "description": "RegExp.prototype.ignoreCase is of type Boolean",
+ "test": "assertTrue(((typeof(RegExp.prototype.ignoreCase)) === 'boolean'));\n"
+ },
+ {
+ "id": "15.10.7.3-2",
+ "path": "TestCases/chapter15/15.10/15.10.7/15.10.7.3/15.10.7.3-2.js",
+ "description": "RegExp.prototype.ignoreCase is a data property with default attribute values (false)",
+ "test": "assertTrue((function testcase() {\n var d = Object.getOwnPropertyDescriptor(RegExp.prototype, 'ignoreCase');\n \n if (d.writable === false &&\n d.enumerable === false &&\n d.configurable === false) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.10.7.3_ignoreCase.json b/website/resources/scripts/testcases2/15.10.7.3_ignoreCase.json
new file mode 100644
index 000000000..410d63f0f
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.10.7.3_ignoreCase.json
@@ -0,0 +1,26 @@
+{
+ "testCollection": {
+ "name": "15.10.7.3_ignoreCase",
+ "numTests": 3,
+ "tests": [
+ {
+ "section": "15.10.7.3",
+ "description": "Checking if varying the ignoreCase property fails",
+ "test": "__re = /a|b|c/;\n\n//CHECK#1\nif (__re.hasOwnProperty('ignoreCase') !== true) {\n $FAIL('#1: __re = /a|b|c/; __re.hasOwnProperty(\\'ignoreCase\\') === true');\n}\n\n__obj = __re.ignoreCase;\n\n__re.ignoreCase = \"shifted\";\n\n//CHECK#2\nif (__re.ignoreCase !== __obj) {\n $ERROR('#2: __re = /a|b|c/; __obj = __re.ignoreCase; __re.ignoreCase = \"shifted\"; __re.ignoreCase === __obj. Actual: ' + (__re.ignoreCase));\n}\n\n",
+ "id": "S15.10.7.3_A10"
+ },
+ {
+ "section": "15.10.7.3",
+ "description": "Checking if enumerating the ignoreCase property of RegExp instance fails",
+ "test": "__re = new RegExp(\"[|||||||]\",\"\");\n\n//CHECK#0\nif (__re.hasOwnProperty('ignoreCase') !== true) {\n $FAIL('#0: __re = new RegExp(\"[|||||||]\",\"\"); __re.hasOwnProperty(\\'ignoreCase\\') === true');\n}\n\n //CHECK#1\nif (__re.propertyIsEnumerable('ignoreCase') !== false) {\n $ERROR('#1: __re = new RegExp(\"[|||||||]\",\"\"); __re.propertyIsEnumerable(\\'ignoreCase\\') === false');\n}\n\n //CHECK#2\ncount = 0\nfor (p in __re){\n if (p===\"ignoreCase\") count++ \n}\n\nif (count !== 0) {\n $ERROR('#2: count = 0; __re = new RegExp(\"[|||||||]\",\"\"); for (p in __re){ if (p===\"ignoreCase\") count++; } count === 0. Actual: ' + (count));\n} \n",
+ "id": "S15.10.7.3_A8"
+ },
+ {
+ "section": "15.10.7.3",
+ "description": "Checking if deleting the ignoreCase property fails",
+ "test": "__re = new RegExp;\n\n//CHECK#0\nif (__re.hasOwnProperty('ignoreCase') !== true) {\n $FAIL('#0: __re = new RegExp; __re.hasOwnProperty(\\'ignoreCase\\') === true');\n}\n\n//CHECK#1\nif ((delete __re.ignoreCase) !== false) {\n $ERROR('#1: __re = new RegExp; (delete __re.ignoreCase) === false');\n}\n\n//CHECK#2\nif (__re.hasOwnProperty('ignoreCase') !== true) {\n $ERROR('#2: __re = new RegExp;delete __re.ignoreCase === true; __re.hasOwnProperty(\\'ignoreCase\\') === true');\n}\n\n\n\n",
+ "id": "S15.10.7.3_A9"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.10.7.4.json b/website/resources/scripts/testcases2/15.10.7.4.json
new file mode 100644
index 000000000..49ae1f14d
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.10.7.4.json
@@ -0,0 +1,21 @@
+{
+ "testCollection": {
+ "name": "15.10.7.4",
+ "numTests": 2,
+ "tests": [
+ {
+ "id": "15.10.7.4-1",
+ "path": "TestCases/chapter15/15.10/15.10.7/15.10.7.4/15.10.7.4-1.js",
+ "description": "RegExp.prototype.multiline is of type Boolean",
+ "test": "assertTrue(((typeof(RegExp.prototype.multiline)) === 'boolean'));\n"
+ },
+ {
+ "id": "15.10.7.4-2",
+ "path": "TestCases/chapter15/15.10/15.10.7/15.10.7.4/15.10.7.4-2.js",
+ "description": "RegExp.prototype.multiline is a data property with default attribute values (false)",
+ "test": "assertTrue((function testcase() {\n var d = Object.getOwnPropertyDescriptor(RegExp.prototype, 'multiline');\n \n if (d.writable === false &&\n d.enumerable === false &&\n d.configurable === false) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.10.7.4_multiline.json b/website/resources/scripts/testcases2/15.10.7.4_multiline.json
new file mode 100644
index 000000000..832dc2d07
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.10.7.4_multiline.json
@@ -0,0 +1,26 @@
+{
+ "testCollection": {
+ "name": "15.10.7.4_multiline",
+ "numTests": 3,
+ "tests": [
+ {
+ "section": "15.10.7.4",
+ "description": "Checking if varying the multiline property fails",
+ "test": "__re = /\\n/;\n\n//CHECK#1\nif (__re.hasOwnProperty('multiline') !== true) {\n $FAIL('#1: __re = /\\\\n/; __re.hasOwnProperty(\\'multiline\\') === true');\n}\n\n__obj = __re.multiline;\n\n__re.multiline = \"shifted\";\n\n//CHECK#2\nif (__re.multiline !== __obj) {\n $ERROR('#2: __re = /\\\\n/; __obj = __re.multiline; __re.multiline = \"shifted\"; __re.multiline === __obj. Actual: ' + (__re.multiline));\n}\n\n",
+ "id": "S15.10.7.4_A10"
+ },
+ {
+ "section": "15.10.7.4",
+ "description": "Checking if enumerating the multiline property of RegExp instance fails",
+ "test": "__re = new RegExp(\"[\\u0041-\\u0049]\");\n\n//CHECK#0\nif (__re.hasOwnProperty('multiline') !== true) {\n $FAIL('#0: __re = new RegExp(\"[\\\\u0041-\\\\u0049]\"); __re.hasOwnProperty(\\'multiline\\') === true');\n}\n\n //CHECK#1\nif (__re.propertyIsEnumerable('multiline') !== false) {\n $ERROR('#1: __re = new RegExp(\"[\\\\u0041-\\\\u0049]\"); __re.propertyIsEnumerable(\\'multiline\\') === false');\n}\n\n //CHECK#2\ncount = 0\nfor (p in __re){\n if (p===\"multiline\") count++ \n}\n\nif (count !== 0) {\n $ERROR('#2: count = 0; __re = new RegExp(\"[\\\\u0041-\\\\u0049]\"); for (p in __re){ if (p===\"multiline\") count++; } count === 0. Actual: ' + (count));\n} \n",
+ "id": "S15.10.7.4_A8"
+ },
+ {
+ "section": "15.10.7.4",
+ "description": "Checking if deleting the multiline property fails",
+ "test": "__re = new RegExp;\n\n//CHECK#0\nif (__re.hasOwnProperty('multiline') !== true) {\n $FAIL('#0: __re = new RegExp; __re.hasOwnProperty(\\'multiline\\') === true');\n}\n\n//CHECK#1\nif ((delete __re.multiline) !== false) {\n $ERROR('#1: __re = new RegExp; (delete __re.multiline) === false');\n}\n\n//CHECK#2\nif (__re.hasOwnProperty('multiline') !== true) {\n $ERROR('#2: __re = new RegExp;delete __re.multiline === true; __re.hasOwnProperty(\\'multiline\\') === true');\n}\n\n",
+ "id": "S15.10.7.4_A9"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.10.7.5.json b/website/resources/scripts/testcases2/15.10.7.5.json
new file mode 100644
index 000000000..99e6a5e98
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.10.7.5.json
@@ -0,0 +1,21 @@
+{
+ "testCollection": {
+ "name": "15.10.7.5",
+ "numTests": 2,
+ "tests": [
+ {
+ "id": "15.10.7.5-1",
+ "path": "TestCases/chapter15/15.10/15.10.7/15.10.7.5/15.10.7.5-1.js",
+ "description": "RegExp.prototype.lastIndex is of type Number",
+ "test": "assertTrue(((typeof(RegExp.prototype.lastIndex)) === 'number'));\n"
+ },
+ {
+ "id": "15.10.7.5-2",
+ "path": "TestCases/chapter15/15.10/15.10.7/15.10.7.5/15.10.7.5-2.js",
+ "description": "RegExp.prototype.lastIndex is a data property with specified attribute values",
+ "test": "assertTrue((function testcase() {\n var d = Object.getOwnPropertyDescriptor(RegExp.prototype, 'lastIndex');\n \n if (d.writable === true &&\n d.enumerable === false &&\n d.configurable === false) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.10.7.5_lastIndex.json b/website/resources/scripts/testcases2/15.10.7.5_lastIndex.json
new file mode 100644
index 000000000..c4235d3b7
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.10.7.5_lastIndex.json
@@ -0,0 +1,20 @@
+{
+ "testCollection": {
+ "name": "15.10.7.5_lastIndex",
+ "numTests": 2,
+ "tests": [
+ {
+ "section": "15.10.7.5",
+ "description": "Checking if enumerating the lastIndex property of RegExp instance fails",
+ "test": "__re = new RegExp(\"A?B\");\n\n//CHECK#0\nif (__re.hasOwnProperty('lastIndex') !== true) {\n $FAIL('#0: __re = new RegExp(\"A?B\"); __re.hasOwnProperty(\\'lastIndex\\') === true');\n}\n\n //CHECK#1\nif (__re.propertyIsEnumerable('lastIndex') !== false) {\n $ERROR('#1: __re = new RegExp(\"A?B\"); __re.propertyIsEnumerable(\\'lastIndex\\') === false');\n}\n\n //CHECK#2\ncount = 0\nfor (p in __re){\n if (p===\"lastIndex\") count++ \n}\n\nif (count !== 0) {\n $ERROR('#2: count = 0; __re = new RegExp(\"A?B\"); for (p in __re){ if (p===\"lastIndex\") count++; } count === 0. Actual: ' + (count));\n} \n",
+ "id": "S15.10.7.5_A8"
+ },
+ {
+ "section": "15.10.7.5",
+ "description": "Checking if deleting the lastIndex property fails",
+ "test": "__re = new RegExp;\n\n//CHECK#0\nif (__re.hasOwnProperty('lastIndex') !== true) {\n $FAIL('#0: __re = new RegExp; __re.hasOwnProperty(\\'lastIndex\\') === true');\n}\n\n//CHECK#1\nif ((delete __re.lastIndex) !== false) {\n $ERROR('#1: __re = new RegExp; (delete __re.lastIndex) === false');\n}\n\n//CHECK#2\nif (__re.hasOwnProperty('lastIndex') !== true) {\n $ERROR('#2: __re = new RegExp;delete __re.lastIndex === true; __re.hasOwnProperty(\\'lastIndex\\') === true');\n}\n\n",
+ "id": "S15.10.7.5_A9"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.10.7_Properties_of_RegExp_Instances.json b/website/resources/scripts/testcases2/15.10.7_Properties_of_RegExp_Instances.json
new file mode 100644
index 000000000..55829bd9c
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.10.7_Properties_of_RegExp_Instances.json
@@ -0,0 +1,44 @@
+{
+ "testCollection": {
+ "name": "15.10.7_Properties_of_RegExp_Instances",
+ "numTests": 6,
+ "tests": [
+ {
+ "section": "15.10.7",
+ "description": "Checking if call of RegExp instance fails",
+ "test": "//CHECK#1\ntry {\n\t$ERROR('#1.1: /[^a]*/() throw TypeError. Actual: ' + (/[^a]*/()));\n} catch (e) {\n\tif ((e instanceof TypeError) !== true) {\n\t\t$ERROR('#1.2: /[^a]*/() throw TypeError. Actual: ' + (e));\n\t}\n}\n\n",
+ "id": "S15.10.7_A1_T1"
+ },
+ {
+ "section": "15.10.7",
+ "description": "Checking if call of RegExp(\"a|b\",\"g\")() fails",
+ "test": "//CHECK#1\ntry {\n $ERROR('#1.1: RegExp(\"a|b\",\"g\")() throw TypeError. Actual: ' + (RegExp(\"a|b\",\"g\")()));\n} catch (e) {\n if ((e instanceof TypeError) !== true) {\n $ERROR('#1.2: RegExp(\"a|b\",\"g\")() throw TypeError. Actual: ' + (e));\n }\n}\n\n\n",
+ "id": "S15.10.7_A1_T2"
+ },
+ {
+ "section": "15.10.7",
+ "description": "Checking if creating new RegExp instance fails",
+ "test": "//CHECK#1\ntry {\n $ERROR('#1.1: new /z/() throw TypeError. Actual: ' + (new /z/()));\n} catch (e) {\n if ((e instanceof TypeError) !== true) {\n $ERROR('#1.2: new /z/() throw TypeError. Actual: ' + (e));\n }\n}\n\n",
+ "id": "S15.10.7_A2_T1"
+ },
+ {
+ "section": "15.10.7",
+ "description": "Checking if creating \"new RegExp\" instance fails",
+ "test": "//CHECK#1\ntry {\n $ERROR('#1.1: new new RegExp throw TypeError. Actual: ' + (new new RegExp));\n} catch (e) {\n if ((e instanceof TypeError) !== true) {\n $ERROR('#1.2: new new RegExp throw TypeError. Actual: ' + (e));\n }\n}\n\n",
+ "id": "S15.10.7_A2_T2"
+ },
+ {
+ "section": "15.10.7",
+ "description": "Checking type of RegExp instance with operators typeof, instanceof and check it constructor.\nRegExp instance is /[^a]* /",
+ "test": "__re = /[^a]*/;\n\n//CHECK#1\nif (typeof __re !== \"object\") {\n\t$ERROR('#1: __re = /[^a]*/; typeof __re === \"object\". Actual: ' + (typeof __re));\n}\n\n//CHECK#1\nif (__re.constructor !== RegExp) {\n\t$ERROR('#2: __re = /[^a]*/; __re.constructor === RegExp. Actual: ' + (__re.constructor));\n}\n\n//CHECK#3\nif ((__re instanceof RegExp) !== true) {\n\t$ERROR('#3: __re = /[^a]*/; (__re instanceof RegExp) === true');\n}\n\n",
+ "id": "S15.10.7_A3_T1"
+ },
+ {
+ "section": "15.10.7",
+ "description": "Checking type of RegExp instance with operators typeof, instanceof and check it constructor.\nRegExp instance is new RegExp",
+ "test": "__re = new RegExp;\n\n//CHECK#1\nif (typeof __re !== \"object\") {\n\t$ERROR('#1: __re = new RegExp; typeof __re === \"object\". Actual: ' + (typeof __re));\n}\n\n//CHECK#1\nif (__re.constructor !== RegExp) {\n\t$ERROR('#2: __re = new RegExp; __re.constructor === RegExp. Actual: ' + (__re.constructor));\n}\n\n//CHECK#3\nif ((__re instanceof RegExp) !== true) {\n\t$ERROR('#3: __re = new RegExp; (__re instanceof RegExp) === true');\n}\n\n",
+ "id": "S15.10.7_A3_T2"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.11.1_The_Error_Constructor_Called_as_a_Function.json b/website/resources/scripts/testcases2/15.11.1_The_Error_Constructor_Called_as_a_Function.json
new file mode 100644
index 000000000..7b4fd4007
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.11.1_The_Error_Constructor_Called_as_a_Function.json
@@ -0,0 +1,32 @@
+{
+ "testCollection": {
+ "name": "15.11.1_The_Error_Constructor_Called_as_a_Function",
+ "numTests": 4,
+ "tests": [
+ {
+ "section": "15.11.1.1, 16",
+ "description": "Checking message property of different error objects",
+ "test": "function otherScope(msg)\n{\n return Error(msg);\n}\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nvar err1=Error('msg1');\nif(err1.message!==\"msg1\"){\n $ERROR('#1: var err1=Error(\\'msg1\\'); err1.message===\"msg1\". Actual: '+err1.message);\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nvar err2=otherScope('msg2');\nif(err2.message!==\"msg2\"){\n $ERROR('#2: function otherScope(msg){return Error(msg);} var err2=otherScope(\\'msg2\\'); err2.message===\"msg2\". Actual: '+err2.message);\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#3\nvar err3=otherScope();\nif(err3.hasOwnProperty('message')){\n $ERROR('#3: function otherScope(msg){return Error(msg);} var err3=otherScope(); err3.hasOwnProperty(\"message\"). Actual: '+err3.message);\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#4\nvar err4=eval(\"Error('msg4')\");\nif(err4.message!==\"msg4\"){\n $ERROR('#4: var err4=eval(\"Error(\\'msg4\\')\"); err4.message===\"msg4\". Actual: '+err4.message);\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.11.1.1_A1_T1"
+ },
+ {
+ "section": "15.11.1.1, 16",
+ "description": "Checking prototype of the newly constructed Error object",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nvar err1=Error('msg1');\nif(!Error.prototype.isPrototypeOf(err1)){\n $ERROR('#1: var err1=Error(\\'msg1\\'); Error.prototype.isPrototypeOf(err1) return true. Actual: '+Error.prototype.isPrototypeOf(err1));\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.11.1.1_A2_T1"
+ },
+ {
+ "section": "15.11.1.1, 16",
+ "description": "Checking Class of the newly constructed Error object using toSting() function",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nError.prototype.toString=Object.prototype.toString;\nvar err1=Error();\nif(err1.toString()!=='[object '+ 'Error' +']'){\n $ERROR('#1: Error.prototype.toString=Object.prototype.toString; var err1=Error(); err1.toString()===\\'[object Error]\\'. Actual: '+err1.toString());\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.11.1.1_A3_T1"
+ },
+ {
+ "section": "15.11.1, 16",
+ "description": "Checking constructor of the newly constructed Error object",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nError.prototype.toString=Object.prototype.toString;\nvar err1=Error();\nif(err1.constructor!==Error){\n $ERROR('#1: Error.prototype.toString=Object.prototype.toString; var err1=Error(); err1.constructor===Error. Actual: '+err1.constructor);\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.11.1_A1_T1"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.11.2_The_Error_Constructor.json b/website/resources/scripts/testcases2/15.11.2_The_Error_Constructor.json
new file mode 100644
index 000000000..dd9163c1d
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.11.2_The_Error_Constructor.json
@@ -0,0 +1,26 @@
+{
+ "testCollection": {
+ "name": "15.11.2_The_Error_Constructor",
+ "numTests": 3,
+ "tests": [
+ {
+ "section": "15.11.2.1, 16",
+ "description": "Checking message property of different error objects",
+ "test": "function otherScope(msg)\n{\n return new Error(msg);\n}\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nvar err1=new Error('msg1');\nif(err1.message!==\"msg1\"){\n $ERROR('#1: var err1=new Error(\\'msg1\\'); err1.message===\"msg1\". Actual: '+err1.message);\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nvar err2=otherScope('msg2');\nif(err2.message!==\"msg2\"){\n $ERROR('#2: function otherScope(msg){return new Error(msg);} var err2=otherScope(\\'msg2\\'); err2.message===\"msg2\". Actual: '+err2.message);\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#3\nvar err3=otherScope();\nif(err3.hasOwnProperty('message')){\n $ERROR('#3: function otherScope(msg){return new Error(msg);} var err3=otherScope(); err3.hasOwnProperty(\"message\"). Actual: '+err3.message);\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#4\nvar err4=eval(\"new Error('msg4')\");\nif(err4.message!==\"msg4\"){\n $ERROR('#4: var err4=eval(\"new Error(\\'msg4\\')\"); err4.message===\"msg4\". Actual: '+err4.message);\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.11.2.1_A1_T1"
+ },
+ {
+ "section": "15.11.2.1, 16",
+ "description": "Checking prototype of the newly constructed Error object",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nvar err1=new Error('msg1');\nif(!Error.prototype.isPrototypeOf(err1)){\n $ERROR('#1: Error.prototype.isPrototypeOf(err1) return true. Actual: '+Error.prototype.isPrototypeOf(err1));\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.11.2.1_A2_T1"
+ },
+ {
+ "section": "15.11.2.1, 16",
+ "description": "Checking Class of the newly constructed Error object using toSting() function",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nError.prototype.toString=Object.prototype.toString;\nvar err1=new Error();\nif(err1.toString()!=='[object '+ 'Error' +']'){\n $ERROR('#1: err1.toString()===\\'[object Error]\\'. Actual: '+err1.toString());\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.11.2.1_A3_T1"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.11.3_Properties_of_the_Error_Constructor.json b/website/resources/scripts/testcases2/15.11.3_Properties_of_the_Error_Constructor.json
new file mode 100644
index 000000000..bbfb51d8b
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.11.3_Properties_of_the_Error_Constructor.json
@@ -0,0 +1,44 @@
+{
+ "testCollection": {
+ "name": "15.11.3_Properties_of_the_Error_Constructor",
+ "numTests": 6,
+ "tests": [
+ {
+ "section": "15.11.3.1, 16",
+ "description": "Checking if deleting the Error.prototype property fails",
+ "test": "var proto=Error.prototype;\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif(delete Error.prototype){\n $ERROR('#1: delete Error.prototype return false');\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif(Error.prototype!==proto){\n $ERROR('#2: var proto=Error.prototype; delete Error.prototype; Error.prototype===proto. Actual: '+Error.prototype);\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.11.3.1_A1_T1"
+ },
+ {
+ "section": "15.11.3.1, 16",
+ "description": "Checking if enumerating the Error.prototype property fails",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#0\nif (!(Error.hasOwnProperty('prototype'))) {\n $ERROR('#0: Error.hasOwnProperty(\\'prototype\\') return true. Actual: '+Error.hasOwnProperty('prototype'));\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n\n//////////////////////////////////////////////////////////////////////////////\n// CHECK#1\nif (Error.propertyIsEnumerable('prototype')) {\n $ERROR('#1: Error.propertyIsEnumerable(\\'prototype\\') return false. Actual: '+Error.propertyIsEnumerable('prototype'));\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n\n//////////////////////////////////////////////////////////////////////////////\n// CHECK#2\ncout=0;\n\nfor (p in Error){\n if (p===\"prototype\") cout++;\n}\n\nif (cout !== 0) {\n $ERROR('#2: cout === 0. Actual: '+cout );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.11.3.1_A2_T1"
+ },
+ {
+ "section": "15.11.3.1, 16",
+ "description": "Checking if varying the Error.prototype property fails",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (!(Error.hasOwnProperty('prototype'))) {\n $ERROR('#1: Error.hasOwnProperty(\\'prototype\\') return true. Actual: '+Error.hasOwnProperty('prototype'));\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n__obj = Error.prototype;\n\nError.prototype = function(){return \"shifted\";};\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (Error.prototype !== __obj) {\n $ERROR('#2: __obj = Error.prototype; Error.prototype = function(){return \"shifted\";}; Error.prototype === __obj. Actual: '+Error.prototype );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#3\ntry {\n Error.prototype();\n $ERROR('#3: \"Error.prototype()\" lead to throwing exception');\n} catch (e) {\n ;\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.11.3.1_A3_T1"
+ },
+ {
+ "section": "15.11.3.1, 16",
+ "description": "Checking Error.hasOwnProperty('prototype')",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (!(Error.hasOwnProperty('prototype'))) {\n $ERROR('#1: Error.hasOwnProperty(\\'prototype\\') return true. Actual: '+Error.hasOwnProperty('prototype'));\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.11.3.1_A4_T1"
+ },
+ {
+ "section": "15.11.3, 16",
+ "description": "Checking prototype of constructor of the newly constructed Error object",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nvar err1=Error(\"err\");\nif(!Function.prototype.isPrototypeOf(err1.constructor)){\n $ERROR('#1: var err1=Error(\"err\"); Function.prototype.isPrototypeOf(err1.constructor) return true. Actual:'+Function.prototype.isPrototypeOf(err1.constructor));\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif(!Function.prototype.isPrototypeOf(Error.constructor)){\n $ERROR('#2: Function.prototype.isPrototypeOf(Error.constructor) return true. Actual:'+Function.prototype.isPrototypeOf(Error.constructor));\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.11.3_A1_T1"
+ },
+ {
+ "section": "15.11.3, 16",
+ "description": "Checking length property",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nvar err1=Error(\"err\");\nif(err1.constructor.length!==1){\n $ERROR('#1: var err1=Error(\"err\"); err1.constructor.length===1. Actual: '+err1.constructor.length);\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif(Error.constructor.length!==1){\n $ERROR('#2: Error.constructor.length===1. Actual: '+Error.constructor.length);\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.11.3_A2_T1"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.11.4.4.json b/website/resources/scripts/testcases2/15.11.4.4.json
new file mode 100644
index 000000000..ce1628cfc
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.11.4.4.json
@@ -0,0 +1,44 @@
+{
+ "testCollection": {
+ "name": "15.11.4.4",
+ "numTests": 6,
+ "tests": [
+ {
+ "id": "15.11.4.4-10-1",
+ "path": "TestCases/chapter15/15.11/15.11.4/15.11.4.4/15.11.4.4-10-1.js",
+ "description": "Error.prototype.toString return the result of concatenating 'name', ':', a single space character, and 'msg' when 'name' and 'msg' are non-empty string",
+ "test": "assertTrue((function testcase() {\n var errObj = new Error(\"ErrorMessage\");\n errObj.name = \"ErrorName\";\n return errObj.toString() === \"ErrorName: ErrorMessage\";\n }).call(this));\n"
+ },
+ {
+ "id": "15.11.4.4-6-1",
+ "path": "TestCases/chapter15/15.11/15.11.4/15.11.4.4/15.11.4.4-6-1.js",
+ "description": "Error.prototype.toString - 'Error' is returned when 'name' is absent and empty string is returned when 'msg' is undefined",
+ "test": "assertTrue((function testcase() {\n var errObj = new Error();\n return errObj.toString() === \"Error\";\n }).call(this));\n"
+ },
+ {
+ "id": "15.11.4.4-6-2",
+ "path": "TestCases/chapter15/15.11/15.11.4/15.11.4.4/15.11.4.4-6-2.js",
+ "description": "Error.prototype.toString - 'Error' is returned when 'name' is absent and value of 'msg' is returned when 'msg' is non-empty string",
+ "test": "assertTrue((function testcase() {\n var errObj = new Error(\"ErrorMessage\");\n return errObj.toString() === \"Error: ErrorMessage\";\n }).call(this));\n"
+ },
+ {
+ "id": "15.11.4.4-8-1",
+ "path": "TestCases/chapter15/15.11/15.11.4/15.11.4.4/15.11.4.4-8-1.js",
+ "description": "Error.prototype.toString return the value of 'msg' when 'name' is empty string and 'msg' isn't undefined",
+ "test": "assertTrue((function testcase() {\n var errObj = new Error(\"ErrorMessage\");\n errObj.name = \"\";\n return errObj.toString() === \"ErrorMessage\";\n }).call(this));\n"
+ },
+ {
+ "id": "15.11.4.4-8-2",
+ "path": "TestCases/chapter15/15.11/15.11.4/15.11.4.4/15.11.4.4-8-2.js",
+ "description": "Error.prototype.toString return empty string when 'name' is empty string and 'msg' is undefined",
+ "test": "assertTrue((function testcase() {\n var errObj = new Error();\n errObj.name = \"\";\n return errObj.toString() === \"\";\n }).call(this));\n"
+ },
+ {
+ "id": "15.11.4.4-9-1",
+ "path": "TestCases/chapter15/15.11/15.11.4/15.11.4.4/15.11.4.4-9-1.js",
+ "description": "Error.prototype.toString return 'name' when 'name' is non-empty string and 'msg' is empty string",
+ "test": "assertTrue((function testcase() {\n var errObj = new Error();\n errObj.name = \"ErrorName\";\n return errObj.toString() === \"ErrorName\";\n }).call(this));\n"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.11.4_Properties_of_the_Error_Prototype_Object.json b/website/resources/scripts/testcases2/15.11.4_Properties_of_the_Error_Prototype_Object.json
new file mode 100644
index 000000000..82e83a4ba
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.11.4_Properties_of_the_Error_Prototype_Object.json
@@ -0,0 +1,80 @@
+{
+ "testCollection": {
+ "name": "15.11.4_Properties_of_the_Error_Prototype_Object",
+ "numTests": 12,
+ "tests": [
+ {
+ "section": "15.11.4.1, 16",
+ "description": "Checking Error.prototype.constructor",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (Error.prototype.constructor !== Error) {\n\t$ERROR('#1: Error.prototype.constructor === Error. Actual: '+Error.prototype.constructor );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.11.4.1_A1_T1"
+ },
+ {
+ "section": "15.11.4.1, 16",
+ "description": "Checking if creating \"new Error.prototype.constructor\" passes and checking its properties",
+ "test": "constr = Error.prototype.constructor;\n\nerr = new constr;\n\n//////////////////////////////////////////////////////////////////////////////\n// CHECK#0\nif (err === undefined) {\n\t$ERROR('#0: constr = Error.prototype.constructor; err = new constr; err === undefined');\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n// CHECK#1\nif (err.constructor !== Error) {\n\t$ERROR('#1: constr = Error.prototype.constructor; err = new constr; err.constructor === Error. Actual: '+err.constructor );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n// CHECK#2\nif (!(Error.prototype.isPrototypeOf(err))) {\n\t$ERROR('#2: constr = Error.prototype.constructor; err = new constr; Error.prototype.isPrototypeOf(err) return true. Actual: '+Error.prototype.isPrototypeOf(err));\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n// CHECK#3\nError.prototype.toString=Object.prototype.toString;\nto_string_result = '[object '+ 'Error' +']';\nif (err.toString() !== to_string_result) {\n\t$ERROR('#3: constr = Error.prototype.constructor; err = new constr; Error.prototype.toString=Object.prototype.toString; err.toString() === \\'[object Error]\\'. Actual: '+err.toString() );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n// CHECK#4\nif (err.valueOf().toString() !== to_string_result) {\n\t$ERROR('#4: constr = Error.prototype.constructor; err = new constr; Error.prototype.toString=Object.prototype.toString; err.valueOf().toString() === \\'[object Error]\\'. Actual: '+err.valueOf().toString() );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.11.4.1_A1_T2"
+ },
+ {
+ "section": "15.11.4.2, 16",
+ "description": "Checking Error.prototype.name",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n// CHECK#1\nif (!Error.prototype.hasOwnProperty('name')) {\n\t$ERROR('#1: Error.prototype.hasOwnProperty(\\'name\\') return true. Actual: '+Error.prototype.hasOwnProperty('name'));\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.11.4.2_A1"
+ },
+ {
+ "section": "15.11.4.2, 16",
+ "description": "Checking value of Error.prototype.name",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n// CHECK#1\nif (Error.prototype.name!==\"Error\") {\n\t$ERROR('#1: Error.prototype.name===\"Error\". Actual: '+Error.prototype.name);\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.11.4.2_A2"
+ },
+ {
+ "section": "15.11.4.3, 16",
+ "description": "Checking Error.prototype.message",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n// CHECK#1\nif (!Error.prototype.hasOwnProperty('message')) {\n\t$ERROR('#1: Error.prototype.hasOwnProperty(\\'message\\') reurn true. Actual: '+Error.prototype.hasOwnProperty('message'));\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.11.4.3_A1"
+ },
+ {
+ "section": "15.11.4.3, 16",
+ "description": "Checking value of Error.prototype.message",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n// CHECK#1\nif (typeof Error.prototype.message !== \"string\") {\n $ERROR('#1: typeof Error.prototype.message === \"string\". Actual: ' + Error.prototype.message);\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.11.4.3_A2"
+ },
+ {
+ "section": "15.11.4.4, 16",
+ "description": "Checking Error.prototype.toString",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n// CHECK#1\nif (!Error.prototype.hasOwnProperty('toString')) {\n\t$ERROR('#1: Error.prototype.hasOwnProperty(\\'toString\\') return true. Actual: '+Error.prototype.hasOwnProperty('toString'));\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.11.4.4_A1"
+ },
+ {
+ "section": "15.11.4.4, 16",
+ "description": "Checking if call of Error.prototype.toSting() fails",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n// CHECK#1\nvar err1=new Error(\"Error\");\ntry{\n\tvar toStr=err1.toString();\n}\ncatch(e){\n\t$ERROR('#1: var err1=new Error(\"Error\"); var toStr=err1.toString(); lead to throwing exception. Exception is '+e);\n}\nif (toStr===undefined) {\n\t$ERROR('#2: var err1=new Error(\"Error\"); var toStr=err1.toString(); toStr!==undefined. Actual: '+toStr);\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.11.4.4_A2"
+ },
+ {
+ "section": "15.11.4, 16",
+ "description": "Get Error.prototype and compare with Object.prototype",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n// CHECK#1\nif (!Object.prototype.isPrototypeOf(Error.prototype)) {\n\t$ERROR('#1: Object.prototype.isPrototypeOf(Error.prototype) return true. Actual: '+Object.prototype.isPrototypeOf(Error.prototype));\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.11.4_A1"
+ },
+ {
+ "section": "15.11.4, 16",
+ "description": "Getting the value of the internal [[Class]] property using Error.prototype.toString() function",
+ "test": "Error.prototype.toString=Object.prototype.toString;\n__tostr = Error.prototype.toString();\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__tostr !== \"[object Error]\") {\n\t$ERROR('#1: Error.prototype.toString=Object.prototype.toString; __tostr = Error.prototype.toString(); __tostr === \"[object Error]\". Actual: '+__tostr );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.11.4_A2"
+ },
+ {
+ "section": "15.11.4, 16",
+ "description": "Checking if call of Error prototype as a function fails",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\ntry {\n\tError.prototype();\n\t$FAIL('#1: \"Error.prototype()\" lead to throwing exception');\n} catch (e) {}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.11.4_A3"
+ },
+ {
+ "section": "15.11.4, 16",
+ "description": "Checking if creating \"new Error.prototype\" fails",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\ntry {\n\t__instance = new Object.prototype;\n\t$FAIL('#1: \"__instance = new Object.prototype\" lead to throwing exception');\n} catch (e) {}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.11.4_A4"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.11.json b/website/resources/scripts/testcases2/15.11.json
new file mode 100644
index 000000000..2aeed5c76
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.11.json
@@ -0,0 +1,20 @@
+{
+ "testCollection": {
+ "name": "15.11",
+ "numTests": 2,
+ "tests": [
+ {
+ "id": "15.11-1",
+ "path": "TestCases/chapter15/15.11/15.11-1.js",
+ "description": "Error - ConversionError has been removed from IE9 standard mode",
+ "test": "assertTrue((typeof ConversionError === \"undefined\"));\n"
+ },
+ {
+ "id": "15.11-2",
+ "path": "TestCases/chapter15/15.11/15.11-2.js",
+ "description": "Error - RegExpError has been removed from IE9 standard mode",
+ "test": "assertTrue((typeof RegExpError === \"undefined\"));\n"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.12.1.1.json b/website/resources/scripts/testcases2/15.12.1.1.json
new file mode 100644
index 000000000..45f613226
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.12.1.1.json
@@ -0,0 +1,232 @@
+{
+ "testCollection": {
+ "name": "15.12.1.1",
+ "numTests": 32,
+ "tests": [
+ {
+ "id": "15.12.1.1-0-1",
+ "path": "TestCases/chapter15/15.12/15.12.1/15.12.1.1/15.12.1.1-0-1.js",
+ "description": "The JSON lexical grammar treats whitespace as a token seperator",
+ "test": "assertTrue((function testcase() {\n \n try {\n JSON.parse('12\\t\\r\\n 34'); // should produce a syntax error as whitespace results in two tokens\n }\n catch (e) {\n if (e.name === 'SyntaxError') return true;\n }\n }).call(this));\n",
+ "precondition": "(JSON && fnExists(JSON.parse) && JSON.parse('1234')===1234)"
+ },
+ {
+ "id": "15.12.1.1-0-2",
+ "path": "TestCases/chapter15/15.12/15.12.1/15.12.1.1/15.12.1.1-0-2.js",
+ "description": "<VT> is not valid JSON whitespace as specified by the production JSONWhitespace.",
+ "test": "assertTrue((function testcase() {\n \n try {\n JSON.parse('\\u000b1234'); // should produce a syntax error \n }\n catch (e) {\n return true; // treat any exception as a pass, other tests ensure that JSON.parse throws SyntaxError exceptions\n }\n }).call(this));\n",
+ "precondition": "(JSON && fnExists(JSON.parse) && JSON.parse(' 1234')===1234)"
+ },
+ {
+ "id": "15.12.1.1-0-3",
+ "path": "TestCases/chapter15/15.12/15.12.1/15.12.1.1/15.12.1.1-0-3.js",
+ "description": "<FF> is not valid JSON whitespace as specified by the production JSONWhitespace.",
+ "test": "assertTrue((function testcase() {\n \n try {\n JSON.parse('\\u000c1234'); // should produce a syntax error \n }\n catch (e) {\n return true; // treat any exception as a pass, other tests ensure that JSON.parse throws SyntaxError exceptions\n }\n }).call(this));\n",
+ "precondition": "(JSON && fnExists(JSON.parse) && JSON.parse(' 1234')===1234)"
+ },
+ {
+ "id": "15.12.1.1-0-4",
+ "path": "TestCases/chapter15/15.12/15.12.1/15.12.1.1/15.12.1.1-0-4.js",
+ "description": "<NBSP> is not valid JSON whitespace as specified by the production JSONWhitespace.",
+ "test": "assertTrue((function testcase() {\n \n try {\n JSON.parse('\\u00a01234'); // should produce a syntax error \n }\n catch (e) {\n return true; // treat any exception as a pass, other tests ensure that JSON.parse throws SyntaxError exceptions\n }\n }).call(this));\n",
+ "precondition": "(JSON && fnExists(JSON.parse) && JSON.parse(' 1234')===1234)"
+ },
+ {
+ "id": "15.12.1.1-0-5",
+ "path": "TestCases/chapter15/15.12/15.12.1/15.12.1.1/15.12.1.1-0-5.js",
+ "description": "<ZWSPP> is not valid JSON whitespace as specified by the production JSONWhitespace.",
+ "test": "assertTrue((function testcase() {\n \n try {\n JSON.parse('\\u200b1234'); // should produce a syntax error \n }\n catch (e) {\n return true; // treat any exception as a pass, other tests ensure that JSON.parse throws SyntaxError exceptions\n }\n }).call(this));\n",
+ "precondition": "(JSON && fnExists(JSON.parse) && JSON.parse(' 1234')===1234)"
+ },
+ {
+ "id": "15.12.1.1-0-6",
+ "path": "TestCases/chapter15/15.12/15.12.1/15.12.1.1/15.12.1.1-0-6.js",
+ "description": "<BOM> is not valid JSON whitespace as specified by the production JSONWhitespace.",
+ "test": "assertTrue((function testcase() {\n \n try {\n JSON.parse('\\ufeff1234'); // should produce a syntax error a\n }\n catch (e) {\n return true; // treat any exception as a pass, other tests ensure that JSON.parse throws SyntaxError exceptions\n }\n }).call(this));\n",
+ "precondition": "(JSON && fnExists(JSON.parse) && JSON.parse(' 1234')===1234)"
+ },
+ {
+ "id": "15.12.1.1-0-7",
+ "path": "TestCases/chapter15/15.12/15.12.1/15.12.1.1/15.12.1.1-0-7.js",
+ "description": "other category z spaces are not valid JSON whitespace as specified by the production JSONWhitespace.",
+ "test": "assertTrue((function testcase() {\n \n try {\n // the following should produce a syntax error \n JSON.parse('\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u30001234'); \n }\n catch (e) {\n return true; // treat any exception as a pass, other tests ensure that JSON.parse throws SyntaxError exceptions\n }\n }).call(this));\n",
+ "precondition": "(JSON && fnExists(JSON.parse) && JSON.parse(' 1234')===1234)"
+ },
+ {
+ "id": "15.12.1.1-0-8",
+ "path": "TestCases/chapter15/15.12/15.12.1/15.12.1.1/15.12.1.1-0-8.js",
+ "description": "U+2028 and U+2029 are not valid JSON whitespace as specified by the production JSONWhitespace.",
+ "test": "assertTrue((function testcase() {\n \n try {\n JSON.parse('\\u2028\\u20291234'); // should produce a syntax error \n }\n catch (e) {\n return true; // treat any exception as a pass, other tests ensure that JSON.parse throws SyntaxError exceptions\n }\n }).call(this));\n",
+ "precondition": "(JSON && fnExists(JSON.parse) && JSON.parse(' 1234')===1234)"
+ },
+ {
+ "id": "15.12.1.1-0-9",
+ "path": "TestCases/chapter15/15.12/15.12.1/15.12.1.1/15.12.1.1-0-9.js",
+ "description": "Whitespace characters can appear before/after any JSONtoken",
+ "test": "assertTrue((function testcase() {\n\n JSON.parse('\\t\\r \\n{\\t\\r \\n'+\n '\"property\"\\t\\r \\n:\\t\\r \\n{\\t\\r \\n}\\t\\r \\n,\\t\\r \\n' +\n '\"prop2\"\\t\\r \\n:\\t\\r \\n'+\n '[\\t\\r \\ntrue\\t\\r \\n,\\t\\r \\nnull\\t\\r \\n,123.456\\t\\r \\n]'+\n '\\t\\r \\n}\\t\\r \\n'); // should JOSN parse without error\n return true;\n }).call(this));\n",
+ "precondition": "(JSON && fnExists(JSON.parse) && JSON.parse('1234')===1234)"
+ },
+ {
+ "id": "15.12.1.1-g1-1",
+ "path": "TestCases/chapter15/15.12/15.12.1/15.12.1.1/15.12.1.1-g1-1.js",
+ "description": "The JSON lexical grammar treats <TAB> as a whitespace character",
+ "test": "assertTrue((function testcase() {\n if (JSON.parse('\\t1234')!==1234) return false; // <TAB> should be ignored\n try {\n JSON.parse('12\\t34'); // <TAB> should produce a syntax error as whitespace results in two tokens\n }\n catch (e) {\n return true; // treat any exception as a pass, other tests ensure that JSON.parse throws SyntaxError exceptions\n }\n }).call(this));\n",
+ "precondition": "(JSON && fnExists(JSON.parse) && JSON.parse('1234')===1234)"
+ },
+ {
+ "id": "15.12.1.1-g1-2",
+ "path": "TestCases/chapter15/15.12/15.12.1/15.12.1.1/15.12.1.1-g1-2.js",
+ "description": "The JSON lexical grammar treats <CR> as a whitespace character",
+ "test": "assertTrue((function testcase() {\n if (JSON.parse('\\r1234')!==1234) return false; // <cr> should be ignored\n try {\n JSON.parse('12\\r34'); // <CR> should produce a syntax error as whitespace results in two tokens\n }\n catch (e) {\n if (e.name === 'SyntaxError') return true;\n }\n }).call(this));\n",
+ "precondition": "(JSON && fnExists(JSON.parse) && JSON.parse('1234')===1234)"
+ },
+ {
+ "id": "15.12.1.1-g1-3",
+ "path": "TestCases/chapter15/15.12/15.12.1/15.12.1.1/15.12.1.1-g1-3.js",
+ "description": "The JSON lexical grammar treats <LF> as a whitespace character",
+ "test": "assertTrue((function testcase() {\n if (JSON.parse('\\n1234')!==1234) return false; // <LF> should be ignored\n try {\n JSON.parse('12\\n34'); // <LF> should produce a syntax error as whitespace results in two tokens\n }\n catch (e) {\n if (e.name === 'SyntaxError') return true;\n }\n }).call(this));\n",
+ "precondition": "(JSON && fnExists(JSON.parse) && JSON.parse('1234')===1234)"
+ },
+ {
+ "id": "15.12.1.1-g1-4",
+ "path": "TestCases/chapter15/15.12/15.12.1/15.12.1.1/15.12.1.1-g1-4.js",
+ "description": "The JSON lexical grammar treats <SP> as a whitespace character",
+ "test": "assertTrue((function testcase() {\n if (JSON.parse(' 1234')!=1234) return false; // <SP> should be ignored\n try {\n JSON.parse('12 34'); // <SP> should produce a syntax error as whitespace results in two tokens\n }\n catch (e) {\n if (e.name === 'SyntaxError') return true;\n }\n }).call(this));\n",
+ "precondition": "(JSON && fnExists(JSON.parse)&& JSON.parse('1234')===1234)"
+ },
+ {
+ "id": "15.12.1.1-g2-1",
+ "path": "TestCases/chapter15/15.12/15.12.1/15.12.1.1/15.12.1.1-g2-1.js",
+ "description": "JSONStrings can be written using double quotes",
+ "test": "assertTrue((JSON.parse('\"abc\"')===\"abc\"));\n",
+ "precondition": "(JSON && fnExists(JSON.parse))"
+ },
+ {
+ "id": "15.12.1.1-g2-2",
+ "path": "TestCases/chapter15/15.12/15.12.1/15.12.1.1/15.12.1.1-g2-2.js",
+ "description": "A JSONString may not be delimited by single quotes ",
+ "test": "/// Copyright (c) 2009 Microsoft Corporation \n/// \n/// Redistribution and use in source and binary forms, with or without modification, are permitted provided\n/// that the following conditions are met: \n/// * Redistributions of source code must retain the above copyright notice, this list of conditions and\n/// the following disclaimer. \n/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and \n/// the following disclaimer in the documentation and/or other materials provided with the distribution. \n/// * Neither the name of Microsoft nor the names of its contributors may be used to\n/// endorse or promote products derived from this software without specific prior written permission.\n/// \n/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR\n/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS\n/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE\n/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,\n/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF\n/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.assertTrue((function testcase() {\n try {\n if (JSON.parse(\"'abc'\") ==='abc') return false;\n }\n catch (e) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(JSON && fnExists(JSON.parse)&& JSON.parse('\"1234\"')===\"1234\")"
+ },
+ {
+ "id": "15.12.1.1-g2-3",
+ "path": "TestCases/chapter15/15.12/15.12.1/15.12.1.1/15.12.1.1-g2-3.js",
+ "description": "A JSONString may not be delimited by Uncode escaped quotes ",
+ "test": "/// Copyright (c) 2009 Microsoft Corporation \n/// \n/// Redistribution and use in source and binary forms, with or without modification, are permitted provided\n/// that the following conditions are met: \n/// * Redistributions of source code must retain the above copyright notice, this list of conditions and\n/// the following disclaimer. \n/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and \n/// the following disclaimer in the documentation and/or other materials provided with the distribution. \n/// * Neither the name of Microsoft nor the names of its contributors may be used to\n/// endorse or promote products derived from this software without specific prior written permission.\n/// \n/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR\n/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS\n/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE\n/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,\n/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF\n/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.assertTrue((function testcase() {\n try {\n if (JSON.parse(\"\\\\u0022abc\\\\u0022\") ==='abc') return false;\n }\n catch (e) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(JSON && fnExists(JSON.parse) && JSON.parse('\"1234\"')===\"1234\")"
+ },
+ {
+ "id": "15.12.1.1-g2-4",
+ "path": "TestCases/chapter15/15.12/15.12.1/15.12.1.1/15.12.1.1-g2-4.js",
+ "description": "A JSONString must both begin and end with double quotes",
+ "test": "/// Copyright (c) 2009 Microsoft Corporation \n/// \n/// Redistribution and use in source and binary forms, with or without modification, are permitted provided\n/// that the following conditions are met: \n/// * Redistributions of source code must retain the above copyright notice, this list of conditions and\n/// the following disclaimer. \n/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and \n/// the following disclaimer in the documentation and/or other materials provided with the distribution. \n/// * Neither the name of Microsoft nor the names of its contributors may be used to\n/// endorse or promote products derived from this software without specific prior written permission.\n/// \n/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR\n/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS\n/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE\n/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,\n/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF\n/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.assertTrue((function testcase() {\n try {\n if (JSON.parse('\"ab'+\"c'\") ==='abc') return false;\n }\n catch (e) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(JSON && fnExists(JSON.parse) && JSON.parse('\"1234\"')===\"1234\")"
+ },
+ {
+ "id": "15.12.1.1-g2-5",
+ "path": "TestCases/chapter15/15.12/15.12.1/15.12.1.1/15.12.1.1-g2-5.js",
+ "description": "A JSONStrings can contain no JSONStringCharacters (Empty JSONStrings)",
+ "test": "assertTrue((JSON.parse('\"\"')===\"\"));\n",
+ "precondition": "(JSON && fnExists(JSON.parse) && JSON.parse('\"1234\"')==='1234')"
+ },
+ {
+ "id": "15.12.1.1-g4-1",
+ "path": "TestCases/chapter15/15.12/15.12.1/15.12.1.1/15.12.1.1-g4-1.js",
+ "description": "The JSON lexical grammar does not allow a JSONStringCharacter to be any of the Unicode characters U+0000 thru U+0007",
+ "test": "assertTrue((function testcase() {\n try {\n JSON.parse('\"\\u0000\\u0001\\u0002\\u0003\\u0004\\u0005\\u0006\\u0007\"'); // invalid string characters should produce a syntax error\n }\n catch (e) {\n return true; // treat any exception as a pass, other tests ensure that JSON.parse throws SyntaxError exceptions\n }\n }).call(this));\n",
+ "precondition": "(JSON && fnExists(JSON.parse)&& JSON.parse('\"1234\"')===\"1234\")"
+ },
+ {
+ "id": "15.12.1.1-g4-2",
+ "path": "TestCases/chapter15/15.12/15.12.1/15.12.1.1/15.12.1.1-g4-2.js",
+ "description": "The JSON lexical grammar does not allow a JSONStringCharacter to be any of the Unicode characters U+0008 thru U+000F",
+ "test": "assertTrue((function testcase() {\n try {\n JSON.parse('\"\\u0008\\u0009\\u000a\\u000b\\u000c\\u000d\\u000e\\u000f\"'); // invalid string characters should produce a syntax error\n }\n catch (e) {\n return true; // treat any exception as a pass, other tests ensure that JSON.parse throws SyntaxError exceptions\n }\n }).call(this));\n",
+ "precondition": "(JSON && fnExists(JSON.parse)&& JSON.parse('\"1234\"')===\"1234\")"
+ },
+ {
+ "id": "15.12.1.1-g4-3",
+ "path": "TestCases/chapter15/15.12/15.12.1/15.12.1.1/15.12.1.1-g4-3.js",
+ "description": "The JSON lexical grammar does not allow a JSONStringCharacter to be any of the Unicode characters U+0010 thru U+0017",
+ "test": "assertTrue((function testcase() {\n try {\n JSON.parse('\"\\u0010\\u0011\\u0012\\u0013\\u0014\\u0015\\u0016\\u0017\"'); // invalid string characters should produce a syntax error\n }\n catch (e) {\n return true; // treat any exception as a pass, other tests ensure that JSON.parse throws SyntaxError exceptions\n }\n }).call(this));\n",
+ "precondition": "(JSON && fnExists(JSON.parse)&& JSON.parse('\"1234\"')===\"1234\")"
+ },
+ {
+ "id": "15.12.1.1-g4-4",
+ "path": "TestCases/chapter15/15.12/15.12.1/15.12.1.1/15.12.1.1-g4-4.js",
+ "description": "The JSON lexical grammar does not allow a JSONStringCharacter to be any of the Unicode characters U+0018 thru U+001F",
+ "test": "assertTrue((function testcase() {\n try {\n JSON.parse('\"\\u0018\\u0019\\u001a\\u001b\\u001c\\u001d\\u001e\\u001f\"'); // invalid string characters should produce a syntax error\n }\n catch (e) {\n if (e.name === 'SyntaxError') return true;\n }\n }).call(this));\n",
+ "precondition": "(JSON && fnExists(JSON.parse)&& JSON.parse('\"1234\"')===\"1234\")"
+ },
+ {
+ "id": "15.12.1.1-g5-1",
+ "path": "TestCases/chapter15/15.12/15.12.1/15.12.1.1/15.12.1.1-g5-1.js",
+ "description": "The JSON lexical grammar allows Unicode escape sequences in a JSONString",
+ "test": "/// Copyright (c) 2009 Microsoft Corporation \n/// \n/// Redistribution and use in source and binary forms, with or without modification, are permitted provided\n/// that the following conditions are met: \n/// * Redistributions of source code must retain the above copyright notice, this list of conditions and\n/// the following disclaimer. \n/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and \n/// the following disclaimer in the documentation and/or other materials provided with the distribution. \n/// * Neither the name of Microsoft nor the names of its contributors may be used to\n/// endorse or promote products derived from this software without specific prior written permission.\n/// \n/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR\n/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS\n/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE\n/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,\n/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF\n/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.assertTrue((JSON.parse('\"\\\\u0058\"')==='X'));\n",
+ "precondition": "(JSON && fnExists(JSON.parse)&& '\\u0058'==='X' && JSON.parse('\"1234\"')===\"1234\")"
+ },
+ {
+ "id": "15.12.1.1-g5-2",
+ "path": "TestCases/chapter15/15.12/15.12.1/15.12.1.1/15.12.1.1-g5-2.js",
+ "description": "A JSONStringCharacter UnicodeEscape may not have fewer than 4 hex characters",
+ "test": "/// Copyright (c) 2009 Microsoft Corporation \n/// \n/// Redistribution and use in source and binary forms, with or without modification, are permitted provided\n/// that the following conditions are met: \n/// * Redistributions of source code must retain the above copyright notice, this list of conditions and\n/// the following disclaimer. \n/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and \n/// the following disclaimer in the documentation and/or other materials provided with the distribution. \n/// * Neither the name of Microsoft nor the names of its contributors may be used to\n/// endorse or promote products derived from this software without specific prior written permission.\n/// \n/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR\n/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS\n/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE\n/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,\n/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF\n/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.assertTrue((function testcase() {\n try {\n JSON.parse('\"\\\\u005\"') \n }\n catch (e) {\n return e.name==='SyntaxError'\n }\n }).call(this));\n",
+ "precondition": "(JSON && fnExists(JSON.parse)&& '\\u0058'==='X' && JSON.parse('\"1234\"')===\"1234\")"
+ },
+ {
+ "id": "15.12.1.1-g5-3",
+ "path": "TestCases/chapter15/15.12/15.12.1/15.12.1.1/15.12.1.1-g5-3.js",
+ "description": "A JSONStringCharacter UnicodeEscape may not include any non=hex characters",
+ "test": "/// Copyright (c) 2009 Microsoft Corporation \n/// \n/// Redistribution and use in source and binary forms, with or without modification, are permitted provided\n/// that the following conditions are met: \n/// * Redistributions of source code must retain the above copyright notice, this list of conditions and\n/// the following disclaimer. \n/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and \n/// the following disclaimer in the documentation and/or other materials provided with the distribution. \n/// * Neither the name of Microsoft nor the names of its contributors may be used to\n/// endorse or promote products derived from this software without specific prior written permission.\n/// \n/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR\n/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS\n/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE\n/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,\n/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF\n/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.assertTrue((function testcase() {\n try {\n JSON.parse('\"\\\\u0X50\"') \n }\n catch (e) {\n return e.name==='SyntaxError'\n }\n }).call(this));\n",
+ "precondition": "(JSON && fnExists(JSON.parse)&& '\\u0058'==='X' && JSON.parse('\"1234\"')===\"1234\")"
+ },
+ {
+ "id": "15.12.1.1-g6-1",
+ "path": "TestCases/chapter15/15.12/15.12.1/15.12.1.1/15.12.1.1-g6-1.js",
+ "description": "The JSON lexical grammer allows '/' as a JSONEscapeCharacter after '' in a JSONString",
+ "test": "assertTrue((JSON.parse('\"\\\\/\"')==='/'));\n",
+ "precondition": "(JSON && fnExists(JSON.parse)&& JSON.parse('\"1234\"')===\"1234\")"
+ },
+ {
+ "id": "15.12.1.1-g6-2",
+ "path": "TestCases/chapter15/15.12/15.12.1/15.12.1.1/15.12.1.1-g6-2.js",
+ "description": "The JSON lexical grammer allows '' as a JSONEscapeCharacter after '' in a JSONString",
+ "test": "assertTrue((JSON.parse('\"\\\\\\\\\"')==='\\\\'));\n",
+ "precondition": "(JSON && fnExists(JSON.parse)&& JSON.parse('\"1234\"')===\"1234\")"
+ },
+ {
+ "id": "15.12.1.1-g6-3",
+ "path": "TestCases/chapter15/15.12/15.12.1/15.12.1.1/15.12.1.1-g6-3.js",
+ "description": "The JSON lexical grammer allows 'b' as a JSONEscapeCharacter after '' in a JSONString",
+ "test": "assertTrue((JSON.parse('\"\\\\b\"')==='\\b'));\n",
+ "precondition": "(JSON && fnExists(JSON.parse)&& JSON.parse('\"1234\"')===\"1234\")"
+ },
+ {
+ "id": "15.12.1.1-g6-4",
+ "path": "TestCases/chapter15/15.12/15.12.1/15.12.1.1/15.12.1.1-g6-4.js",
+ "description": "The JSON lexical grammer allows 'f' as a JSONEscapeCharacter after '' in a JSONString",
+ "test": "assertTrue((JSON.parse('\"\\\\f\"')==='\\f'));\n",
+ "precondition": "(JSON && fnExists(JSON.parse)&& JSON.parse('\"1234\"')===\"1234\")"
+ },
+ {
+ "id": "15.12.1.1-g6-5",
+ "path": "TestCases/chapter15/15.12/15.12.1/15.12.1.1/15.12.1.1-g6-5.js",
+ "description": "The JSON lexical grammer allows 'n' as a JSONEscapeCharacter after '' in a JSONString",
+ "test": "assertTrue((JSON.parse('\"\\\\n\"')==='\\n'));\n",
+ "precondition": "(JSON && fnExists(JSON.parse)&& JSON.parse('\"1234\"')===\"1234\")"
+ },
+ {
+ "id": "15.12.1.1-g6-6",
+ "path": "TestCases/chapter15/15.12/15.12.1/15.12.1.1/15.12.1.1-g6-6.js",
+ "description": "The JSON lexical grammer allows 'r' as a JSONEscapeCharacter after '' in a JSONString",
+ "test": "assertTrue((JSON.parse('\"\\\\r\"')==='\\r'));\n",
+ "precondition": "(JSON && fnExists(JSON.parse)&& JSON.parse('\"1234\"')===\"1234\")"
+ },
+ {
+ "id": "15.12.1.1-g6-7",
+ "path": "TestCases/chapter15/15.12/15.12.1/15.12.1.1/15.12.1.1-g6-7.js",
+ "description": "The JSON lexical grammer allows 't' as a JSONEscapeCharacter after '' in a JSONString",
+ "test": "assertTrue((JSON.parse('\"\\\\t\"')==='\\t'));\n",
+ "precondition": "(JSON && fnExists(JSON.parse)&& JSON.parse('\"1234\"')===\"1234\")"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.12.2.json b/website/resources/scripts/testcases2/15.12.2.json
new file mode 100644
index 000000000..94019003e
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.12.2.json
@@ -0,0 +1,89 @@
+{
+ "testCollection": {
+ "name": "15.12.2",
+ "numTests": 13,
+ "tests": [
+ {
+ "id": "15.12.2-0-1",
+ "path": "TestCases/chapter15/15.12/15.12.2/15.12.2-0-1.js",
+ "description": "JSON.parse must exist as a function",
+ "test": "assertTrue((function testcase() {\n var f = JSON.parse;\n\n if (typeof(f) === \"function\") {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(JSON !== undefined)"
+ },
+ {
+ "id": "15.12.2-0-2",
+ "path": "TestCases/chapter15/15.12/15.12.2/15.12.2-0-2.js",
+ "description": "JSON.parse must exist as a function taking 2 parameters",
+ "test": "assertTrue((function testcase() {\n var f = JSON.parse;\n\n if (typeof(f) === \"function\" && f.length === 2) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(JSON !== undefined)"
+ },
+ {
+ "id": "15.12.2-0-3",
+ "path": "TestCases/chapter15/15.12/15.12.2/15.12.2-0-3.js",
+ "description": "JSON.parse must be deletable (configurable)",
+ "test": "assertTrue((function testcase() {\n var o = JSON;\n var desc = Object.getOwnPropertyDescriptor(o, \"parse\");\n return desc.configurable === true;\n }).call(this));\n",
+ "precondition": "(function preq() {\n return typeof JSON != \"undefined\" && fnExists(Object.getOwnPropertyDescriptor)\n }).call(this)"
+ },
+ {
+ "id": "15.12.2-2-1",
+ "path": "TestCases/chapter15/15.12/15.12.2/15.12.2-2-1.js",
+ "description": "JSON.parse - parsing an object where property name is a null character",
+ "test": "assertTrue((function testcase() {\n\n var result = true;\n\n var nullChars = new Array();\n nullChars[0] = '\\\"\\u0000\\\"';\n nullChars[1] = '\\\"\\u0001\\\"';\n nullChars[2] = '\\\"\\u0002\\\"';\n nullChars[3] = '\\\"\\u0003\\\"';\n nullChars[4] = '\\\"\\u0004\\\"';\n nullChars[5] = '\\\"\\u0005\\\"';\n nullChars[6] = '\\\"\\u0006\\\"';\n nullChars[7] = '\\\"\\u0007\\\"';\n nullChars[8] = '\\\"\\u0008\\\"';\n nullChars[9] = '\\\"\\u0009\\\"';\n nullChars[10] = '\\\"\\u000A\\\"';\n nullChars[11] = '\\\"\\u000B\\\"';\n nullChars[12] = '\\\"\\u000C\\\"';\n nullChars[13] = '\\\"\\u000D\\\"';\n nullChars[14] = '\\\"\\u000E\\\"';\n nullChars[15] = '\\\"\\u000F\\\"';\n nullChars[16] = '\\\"\\u0010\\\"';\n nullChars[17] = '\\\"\\u0011\\\"';\n nullChars[18] = '\\\"\\u0012\\\"';\n nullChars[19] = '\\\"\\u0013\\\"';\n nullChars[20] = '\\\"\\u0014\\\"';\n nullChars[21] = '\\\"\\u0015\\\"';\n nullChars[22] = '\\\"\\u0016\\\"';\n nullChars[23] = '\\\"\\u0017\\\"';\n nullChars[24] = '\\\"\\u0018\\\"';\n nullChars[25] = '\\\"\\u0019\\\"';\n nullChars[26] = '\\\"\\u001A\\\"';\n nullChars[27] = '\\\"\\u001B\\\"';\n nullChars[28] = '\\\"\\u001C\\\"';\n nullChars[29] = '\\\"\\u001D\\\"';\n nullChars[30] = '\\\"\\u001E\\\"';\n nullChars[31] = '\\\"\\u001F\\\"';\n\n for (var index in nullChars) {\n try {\n var obj = JSON.parse('{ ' + nullChars[index] + ' : \"John\" } ');\n result = (result && false);\n } catch (e) {\n result = (result && (e instanceof SyntaxError));\n }\n }\n return result;\n }).call(this));\n"
+ },
+ {
+ "id": "15.12.2-2-10",
+ "path": "TestCases/chapter15/15.12/15.12.2/15.12.2-2-10.js",
+ "description": "JSON.parse - parsing an object where property value middles with a null character",
+ "test": "assertTrue((function testcase() {\n\n var result = true;\n\n var nullChars = new Array();\n nullChars[0] = '\\\"\\u0000\\\"';\n nullChars[1] = '\\\"\\u0001\\\"';\n nullChars[2] = '\\\"\\u0002\\\"';\n nullChars[3] = '\\\"\\u0003\\\"';\n nullChars[4] = '\\\"\\u0004\\\"';\n nullChars[5] = '\\\"\\u0005\\\"';\n nullChars[6] = '\\\"\\u0006\\\"';\n nullChars[7] = '\\\"\\u0007\\\"';\n nullChars[8] = '\\\"\\u0008\\\"';\n nullChars[9] = '\\\"\\u0009\\\"';\n nullChars[10] = '\\\"\\u000A\\\"';\n nullChars[11] = '\\\"\\u000B\\\"';\n nullChars[12] = '\\\"\\u000C\\\"';\n nullChars[13] = '\\\"\\u000D\\\"';\n nullChars[14] = '\\\"\\u000E\\\"';\n nullChars[15] = '\\\"\\u000F\\\"';\n nullChars[16] = '\\\"\\u0010\\\"';\n nullChars[17] = '\\\"\\u0011\\\"';\n nullChars[18] = '\\\"\\u0012\\\"';\n nullChars[19] = '\\\"\\u0013\\\"';\n nullChars[20] = '\\\"\\u0014\\\"';\n nullChars[21] = '\\\"\\u0015\\\"';\n nullChars[22] = '\\\"\\u0016\\\"';\n nullChars[23] = '\\\"\\u0017\\\"';\n nullChars[24] = '\\\"\\u0018\\\"';\n nullChars[25] = '\\\"\\u0019\\\"';\n nullChars[26] = '\\\"\\u001A\\\"';\n nullChars[27] = '\\\"\\u001B\\\"';\n nullChars[28] = '\\\"\\u001C\\\"';\n nullChars[29] = '\\\"\\u001D\\\"';\n nullChars[30] = '\\\"\\u001E\\\"';\n nullChars[31] = '\\\"\\u001F\\\"';\n\n for (var index in nullChars) {\n try {\n var obj = JSON.parse('{ \"name\" : ' + \"Jo\" + nullChars[index] + \"hn\" + ' } ');\n result = (result && false);\n } catch (e) {\n result = (result && (e instanceof SyntaxError));\n }\n }\n return result;\n }).call(this));\n"
+ },
+ {
+ "id": "15.12.2-2-2",
+ "path": "TestCases/chapter15/15.12/15.12.2/15.12.2-2-2.js",
+ "description": "JSON.parse - parsing an object where property name starts with a null character",
+ "test": "assertTrue((function testcase() {\n\n var result = true;\n\n var nullChars = new Array();\n nullChars[0] = '\\\"\\u0000\\\"';\n nullChars[1] = '\\\"\\u0001\\\"';\n nullChars[2] = '\\\"\\u0002\\\"';\n nullChars[3] = '\\\"\\u0003\\\"';\n nullChars[4] = '\\\"\\u0004\\\"';\n nullChars[5] = '\\\"\\u0005\\\"';\n nullChars[6] = '\\\"\\u0006\\\"';\n nullChars[7] = '\\\"\\u0007\\\"';\n nullChars[8] = '\\\"\\u0008\\\"';\n nullChars[9] = '\\\"\\u0009\\\"';\n nullChars[10] = '\\\"\\u000A\\\"';\n nullChars[11] = '\\\"\\u000B\\\"';\n nullChars[12] = '\\\"\\u000C\\\"';\n nullChars[13] = '\\\"\\u000D\\\"';\n nullChars[14] = '\\\"\\u000E\\\"';\n nullChars[15] = '\\\"\\u000F\\\"';\n nullChars[16] = '\\\"\\u0010\\\"';\n nullChars[17] = '\\\"\\u0011\\\"';\n nullChars[18] = '\\\"\\u0012\\\"';\n nullChars[19] = '\\\"\\u0013\\\"';\n nullChars[20] = '\\\"\\u0014\\\"';\n nullChars[21] = '\\\"\\u0015\\\"';\n nullChars[22] = '\\\"\\u0016\\\"';\n nullChars[23] = '\\\"\\u0017\\\"';\n nullChars[24] = '\\\"\\u0018\\\"';\n nullChars[25] = '\\\"\\u0019\\\"';\n nullChars[26] = '\\\"\\u001A\\\"';\n nullChars[27] = '\\\"\\u001B\\\"';\n nullChars[28] = '\\\"\\u001C\\\"';\n nullChars[29] = '\\\"\\u001D\\\"';\n nullChars[30] = '\\\"\\u001E\\\"';\n nullChars[31] = '\\\"\\u001F\\\"';\n\n for (var index in nullChars) {\n try {\n var obj = JSON.parse('{ ' + nullChars[index] + \"name\" + ' : \"John\" } ');\n result = (result && false);\n } catch (e) {\n result = (result && (e instanceof SyntaxError));\n }\n }\n return result;\n }).call(this));\n"
+ },
+ {
+ "id": "15.12.2-2-3",
+ "path": "TestCases/chapter15/15.12/15.12.2/15.12.2-2-3.js",
+ "description": "JSON.parse - parsing an object where property name ends with a null character",
+ "test": "assertTrue((function testcase() {\n\n var result = true;\n\n var nullChars = new Array();\n nullChars[0] = '\\\"\\u0000\\\"';\n nullChars[1] = '\\\"\\u0001\\\"';\n nullChars[2] = '\\\"\\u0002\\\"';\n nullChars[3] = '\\\"\\u0003\\\"';\n nullChars[4] = '\\\"\\u0004\\\"';\n nullChars[5] = '\\\"\\u0005\\\"';\n nullChars[6] = '\\\"\\u0006\\\"';\n nullChars[7] = '\\\"\\u0007\\\"';\n nullChars[8] = '\\\"\\u0008\\\"';\n nullChars[9] = '\\\"\\u0009\\\"';\n nullChars[10] = '\\\"\\u000A\\\"';\n nullChars[11] = '\\\"\\u000B\\\"';\n nullChars[12] = '\\\"\\u000C\\\"';\n nullChars[13] = '\\\"\\u000D\\\"';\n nullChars[14] = '\\\"\\u000E\\\"';\n nullChars[15] = '\\\"\\u000F\\\"';\n nullChars[16] = '\\\"\\u0010\\\"';\n nullChars[17] = '\\\"\\u0011\\\"';\n nullChars[18] = '\\\"\\u0012\\\"';\n nullChars[19] = '\\\"\\u0013\\\"';\n nullChars[20] = '\\\"\\u0014\\\"';\n nullChars[21] = '\\\"\\u0015\\\"';\n nullChars[22] = '\\\"\\u0016\\\"';\n nullChars[23] = '\\\"\\u0017\\\"';\n nullChars[24] = '\\\"\\u0018\\\"';\n nullChars[25] = '\\\"\\u0019\\\"';\n nullChars[26] = '\\\"\\u001A\\\"';\n nullChars[27] = '\\\"\\u001B\\\"';\n nullChars[28] = '\\\"\\u001C\\\"';\n nullChars[29] = '\\\"\\u001D\\\"';\n nullChars[30] = '\\\"\\u001E\\\"';\n nullChars[31] = '\\\"\\u001F\\\"';\n\n for (var index in nullChars) {\n try {\n var obj = JSON.parse('{' + \"name\" + nullChars[index] + ' : \"John\" } ');\n result = (result && false);\n } catch (e) {\n result = (result && (e instanceof SyntaxError));\n }\n }\n return result;\n }).call(this));\n"
+ },
+ {
+ "id": "15.12.2-2-4",
+ "path": "TestCases/chapter15/15.12/15.12.2/15.12.2-2-4.js",
+ "description": "JSON.parse - parsing an object where property name starts and ends with a null character",
+ "test": "assertTrue((function testcase() {\n\n var result = true;\n\n var nullChars = new Array();\n nullChars[0] = '\\\"\\u0000\\\"';\n nullChars[1] = '\\\"\\u0001\\\"';\n nullChars[2] = '\\\"\\u0002\\\"';\n nullChars[3] = '\\\"\\u0003\\\"';\n nullChars[4] = '\\\"\\u0004\\\"';\n nullChars[5] = '\\\"\\u0005\\\"';\n nullChars[6] = '\\\"\\u0006\\\"';\n nullChars[7] = '\\\"\\u0007\\\"';\n nullChars[8] = '\\\"\\u0008\\\"';\n nullChars[9] = '\\\"\\u0009\\\"';\n nullChars[10] = '\\\"\\u000A\\\"';\n nullChars[11] = '\\\"\\u000B\\\"';\n nullChars[12] = '\\\"\\u000C\\\"';\n nullChars[13] = '\\\"\\u000D\\\"';\n nullChars[14] = '\\\"\\u000E\\\"';\n nullChars[15] = '\\\"\\u000F\\\"';\n nullChars[16] = '\\\"\\u0010\\\"';\n nullChars[17] = '\\\"\\u0011\\\"';\n nullChars[18] = '\\\"\\u0012\\\"';\n nullChars[19] = '\\\"\\u0013\\\"';\n nullChars[20] = '\\\"\\u0014\\\"';\n nullChars[21] = '\\\"\\u0015\\\"';\n nullChars[22] = '\\\"\\u0016\\\"';\n nullChars[23] = '\\\"\\u0017\\\"';\n nullChars[24] = '\\\"\\u0018\\\"';\n nullChars[25] = '\\\"\\u0019\\\"';\n nullChars[26] = '\\\"\\u001A\\\"';\n nullChars[27] = '\\\"\\u001B\\\"';\n nullChars[28] = '\\\"\\u001C\\\"';\n nullChars[29] = '\\\"\\u001D\\\"';\n nullChars[30] = '\\\"\\u001E\\\"';\n nullChars[31] = '\\\"\\u001F\\\"';\n\n for (var index in nullChars) {\n try {\n var obj = JSON.parse('{' + nullChars[index] + \"name\" + nullChars[index] + ' : \"John\" } ');\n result = (result && false);\n } catch (e) {\n result = (result && (e instanceof SyntaxError));\n }\n }\n return result;\n }).call(this));\n"
+ },
+ {
+ "id": "15.12.2-2-5",
+ "path": "TestCases/chapter15/15.12/15.12.2/15.12.2-2-5.js",
+ "description": "JSON.parse - parsing an object where property name middles with a null character",
+ "test": "assertTrue((function testcase() {\n\n var result = true;\n\n var nullChars = new Array();\n nullChars[0] = '\\\"\\u0000\\\"';\n nullChars[1] = '\\\"\\u0001\\\"';\n nullChars[2] = '\\\"\\u0002\\\"';\n nullChars[3] = '\\\"\\u0003\\\"';\n nullChars[4] = '\\\"\\u0004\\\"';\n nullChars[5] = '\\\"\\u0005\\\"';\n nullChars[6] = '\\\"\\u0006\\\"';\n nullChars[7] = '\\\"\\u0007\\\"';\n nullChars[8] = '\\\"\\u0008\\\"';\n nullChars[9] = '\\\"\\u0009\\\"';\n nullChars[10] = '\\\"\\u000A\\\"';\n nullChars[11] = '\\\"\\u000B\\\"';\n nullChars[12] = '\\\"\\u000C\\\"';\n nullChars[13] = '\\\"\\u000D\\\"';\n nullChars[14] = '\\\"\\u000E\\\"';\n nullChars[15] = '\\\"\\u000F\\\"';\n nullChars[16] = '\\\"\\u0010\\\"';\n nullChars[17] = '\\\"\\u0011\\\"';\n nullChars[18] = '\\\"\\u0012\\\"';\n nullChars[19] = '\\\"\\u0013\\\"';\n nullChars[20] = '\\\"\\u0014\\\"';\n nullChars[21] = '\\\"\\u0015\\\"';\n nullChars[22] = '\\\"\\u0016\\\"';\n nullChars[23] = '\\\"\\u0017\\\"';\n nullChars[24] = '\\\"\\u0018\\\"';\n nullChars[25] = '\\\"\\u0019\\\"';\n nullChars[26] = '\\\"\\u001A\\\"';\n nullChars[27] = '\\\"\\u001B\\\"';\n nullChars[28] = '\\\"\\u001C\\\"';\n nullChars[29] = '\\\"\\u001D\\\"';\n nullChars[30] = '\\\"\\u001E\\\"';\n nullChars[31] = '\\\"\\u001F\\\"';\n\n for (var index in nullChars) {\n try {\n var obj = JSON.parse('{ ' + \"na\" + nullChars[index] + \"me\" + ' : \"John\" } ');\n result = (result && false);\n } catch (e) {\n result = (result && (e instanceof SyntaxError));\n }\n }\n return result;\n }).call(this));\n"
+ },
+ {
+ "id": "15.12.2-2-6",
+ "path": "TestCases/chapter15/15.12/15.12.2/15.12.2-2-6.js",
+ "description": "JSON.parse - parsing an object where property value is a null character",
+ "test": "assertTrue((function testcase() {\n\n var result = true;\n\n var nullChars = new Array();\n nullChars[0] = '\\\"\\u0000\\\"';\n nullChars[1] = '\\\"\\u0001\\\"';\n nullChars[2] = '\\\"\\u0002\\\"';\n nullChars[3] = '\\\"\\u0003\\\"';\n nullChars[4] = '\\\"\\u0004\\\"';\n nullChars[5] = '\\\"\\u0005\\\"';\n nullChars[6] = '\\\"\\u0006\\\"';\n nullChars[7] = '\\\"\\u0007\\\"';\n nullChars[8] = '\\\"\\u0008\\\"';\n nullChars[9] = '\\\"\\u0009\\\"';\n nullChars[10] = '\\\"\\u000A\\\"';\n nullChars[11] = '\\\"\\u000B\\\"';\n nullChars[12] = '\\\"\\u000C\\\"';\n nullChars[13] = '\\\"\\u000D\\\"';\n nullChars[14] = '\\\"\\u000E\\\"';\n nullChars[15] = '\\\"\\u000F\\\"';\n nullChars[16] = '\\\"\\u0010\\\"';\n nullChars[17] = '\\\"\\u0011\\\"';\n nullChars[18] = '\\\"\\u0012\\\"';\n nullChars[19] = '\\\"\\u0013\\\"';\n nullChars[20] = '\\\"\\u0014\\\"';\n nullChars[21] = '\\\"\\u0015\\\"';\n nullChars[22] = '\\\"\\u0016\\\"';\n nullChars[23] = '\\\"\\u0017\\\"';\n nullChars[24] = '\\\"\\u0018\\\"';\n nullChars[25] = '\\\"\\u0019\\\"';\n nullChars[26] = '\\\"\\u001A\\\"';\n nullChars[27] = '\\\"\\u001B\\\"';\n nullChars[28] = '\\\"\\u001C\\\"';\n nullChars[29] = '\\\"\\u001D\\\"';\n nullChars[30] = '\\\"\\u001E\\\"';\n nullChars[31] = '\\\"\\u001F\\\"';\n\n for (var index in nullChars) {\n try {\n var obj = JSON.parse('{ \"name\" : ' + nullChars[index] + ' } ');\n result = (result && false);\n } catch (e) {\n result = (result && (e instanceof SyntaxError));\n }\n }\n return result;\n }).call(this));\n"
+ },
+ {
+ "id": "15.12.2-2-7",
+ "path": "TestCases/chapter15/15.12/15.12.2/15.12.2-2-7.js",
+ "description": "JSON.parse - parsing an object where property value starts with a null character",
+ "test": "assertTrue((function testcase() {\n\n var result = true;\n\n var nullChars = new Array();\n nullChars[0] = '\\\"\\u0000\\\"';\n nullChars[1] = '\\\"\\u0001\\\"';\n nullChars[2] = '\\\"\\u0002\\\"';\n nullChars[3] = '\\\"\\u0003\\\"';\n nullChars[4] = '\\\"\\u0004\\\"';\n nullChars[5] = '\\\"\\u0005\\\"';\n nullChars[6] = '\\\"\\u0006\\\"';\n nullChars[7] = '\\\"\\u0007\\\"';\n nullChars[8] = '\\\"\\u0008\\\"';\n nullChars[9] = '\\\"\\u0009\\\"';\n nullChars[10] = '\\\"\\u000A\\\"';\n nullChars[11] = '\\\"\\u000B\\\"';\n nullChars[12] = '\\\"\\u000C\\\"';\n nullChars[13] = '\\\"\\u000D\\\"';\n nullChars[14] = '\\\"\\u000E\\\"';\n nullChars[15] = '\\\"\\u000F\\\"';\n nullChars[16] = '\\\"\\u0010\\\"';\n nullChars[17] = '\\\"\\u0011\\\"';\n nullChars[18] = '\\\"\\u0012\\\"';\n nullChars[19] = '\\\"\\u0013\\\"';\n nullChars[20] = '\\\"\\u0014\\\"';\n nullChars[21] = '\\\"\\u0015\\\"';\n nullChars[22] = '\\\"\\u0016\\\"';\n nullChars[23] = '\\\"\\u0017\\\"';\n nullChars[24] = '\\\"\\u0018\\\"';\n nullChars[25] = '\\\"\\u0019\\\"';\n nullChars[26] = '\\\"\\u001A\\\"';\n nullChars[27] = '\\\"\\u001B\\\"';\n nullChars[28] = '\\\"\\u001C\\\"';\n nullChars[29] = '\\\"\\u001D\\\"';\n nullChars[30] = '\\\"\\u001E\\\"';\n nullChars[31] = '\\\"\\u001F\\\"';\n\n for (var index in nullChars) {\n try {\n var obj = JSON.parse('{ \"name\" : ' + nullChars[index] + \"John\" + ' } ');\n result = (result && false);\n } catch (e) {\n result = (result && (e instanceof SyntaxError));\n }\n }\n return result;\n }).call(this));\n"
+ },
+ {
+ "id": "15.12.2-2-8",
+ "path": "TestCases/chapter15/15.12/15.12.2/15.12.2-2-8.js",
+ "description": "JSON.parse - parsing an object where property value ends with a null character",
+ "test": "assertTrue((function testcase() {\n\n var result = true;\n\n var nullChars = new Array();\n nullChars[0] = '\\\"\\u0000\\\"';\n nullChars[1] = '\\\"\\u0001\\\"';\n nullChars[2] = '\\\"\\u0002\\\"';\n nullChars[3] = '\\\"\\u0003\\\"';\n nullChars[4] = '\\\"\\u0004\\\"';\n nullChars[5] = '\\\"\\u0005\\\"';\n nullChars[6] = '\\\"\\u0006\\\"';\n nullChars[7] = '\\\"\\u0007\\\"';\n nullChars[8] = '\\\"\\u0008\\\"';\n nullChars[9] = '\\\"\\u0009\\\"';\n nullChars[10] = '\\\"\\u000A\\\"';\n nullChars[11] = '\\\"\\u000B\\\"';\n nullChars[12] = '\\\"\\u000C\\\"';\n nullChars[13] = '\\\"\\u000D\\\"';\n nullChars[14] = '\\\"\\u000E\\\"';\n nullChars[15] = '\\\"\\u000F\\\"';\n nullChars[16] = '\\\"\\u0010\\\"';\n nullChars[17] = '\\\"\\u0011\\\"';\n nullChars[18] = '\\\"\\u0012\\\"';\n nullChars[19] = '\\\"\\u0013\\\"';\n nullChars[20] = '\\\"\\u0014\\\"';\n nullChars[21] = '\\\"\\u0015\\\"';\n nullChars[22] = '\\\"\\u0016\\\"';\n nullChars[23] = '\\\"\\u0017\\\"';\n nullChars[24] = '\\\"\\u0018\\\"';\n nullChars[25] = '\\\"\\u0019\\\"';\n nullChars[26] = '\\\"\\u001A\\\"';\n nullChars[27] = '\\\"\\u001B\\\"';\n nullChars[28] = '\\\"\\u001C\\\"';\n nullChars[29] = '\\\"\\u001D\\\"';\n nullChars[30] = '\\\"\\u001E\\\"';\n nullChars[31] = '\\\"\\u001F\\\"';\n\n for (var index in nullChars) {\n try {\n var obj = JSON.parse('{ \"name\" : ' + \"John\" + nullChars[index] + ' } ');\n result = (result && false);\n } catch (e) {\n result = (result && (e instanceof SyntaxError));\n }\n }\n return result;\n }).call(this));\n"
+ },
+ {
+ "id": "15.12.2-2-9",
+ "path": "TestCases/chapter15/15.12/15.12.2/15.12.2-2-9.js",
+ "description": "JSON.parse - parsing an object where property value starts and ends with a null character",
+ "test": "assertTrue((function testcase() {\n\n var result = true;\n\n var nullChars = new Array();\n nullChars[0] = '\\\"\\u0000\\\"';\n nullChars[1] = '\\\"\\u0001\\\"';\n nullChars[2] = '\\\"\\u0002\\\"';\n nullChars[3] = '\\\"\\u0003\\\"';\n nullChars[4] = '\\\"\\u0004\\\"';\n nullChars[5] = '\\\"\\u0005\\\"';\n nullChars[6] = '\\\"\\u0006\\\"';\n nullChars[7] = '\\\"\\u0007\\\"';\n nullChars[8] = '\\\"\\u0008\\\"';\n nullChars[9] = '\\\"\\u0009\\\"';\n nullChars[10] = '\\\"\\u000A\\\"';\n nullChars[11] = '\\\"\\u000B\\\"';\n nullChars[12] = '\\\"\\u000C\\\"';\n nullChars[13] = '\\\"\\u000D\\\"';\n nullChars[14] = '\\\"\\u000E\\\"';\n nullChars[15] = '\\\"\\u000F\\\"';\n nullChars[16] = '\\\"\\u0010\\\"';\n nullChars[17] = '\\\"\\u0011\\\"';\n nullChars[18] = '\\\"\\u0012\\\"';\n nullChars[19] = '\\\"\\u0013\\\"';\n nullChars[20] = '\\\"\\u0014\\\"';\n nullChars[21] = '\\\"\\u0015\\\"';\n nullChars[22] = '\\\"\\u0016\\\"';\n nullChars[23] = '\\\"\\u0017\\\"';\n nullChars[24] = '\\\"\\u0018\\\"';\n nullChars[25] = '\\\"\\u0019\\\"';\n nullChars[26] = '\\\"\\u001A\\\"';\n nullChars[27] = '\\\"\\u001B\\\"';\n nullChars[28] = '\\\"\\u001C\\\"';\n nullChars[29] = '\\\"\\u001D\\\"';\n nullChars[30] = '\\\"\\u001E\\\"';\n nullChars[31] = '\\\"\\u001F\\\"';\n\n for (var index in nullChars) {\n try {\n var obj = JSON.parse('{ \"name\" : ' + nullChars[index] + \"John\" + nullChars[index] + ' } ');\n result = (result && false);\n } catch (e) {\n result = (result && (e instanceof SyntaxError));\n }\n }\n return result;\n }).call(this));\n"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.12.2_JSON.parse.json b/website/resources/scripts/testcases2/15.12.2_JSON.parse.json
new file mode 100644
index 000000000..33253ab7f
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.12.2_JSON.parse.json
@@ -0,0 +1,14 @@
+{
+ "testCollection": {
+ "name": "15.12.2_JSON.parse",
+ "numTests": 1,
+ "tests": [
+ {
+ "section": "15.12.2",
+ "description": "Tests that JSON.parse treats \"__proto__\" as a regular property name",
+ "test": "var x = JSON.parse('{\"__proto__\":[]}');\nif (Object.getPrototypeOf(x) !== Object.prototype) {\n $FAIL('#1: JSON.parse confused by \"__proto__\"');\n}\nif (!Array.isArray(x.__proto__)) {\n $FAIL('#2: JSON.parse did not set \"__proto__\" as a regular property');\n}\n",
+ "id": "S15.12.2_A1"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.12.3.json b/website/resources/scripts/testcases2/15.12.3.json
new file mode 100644
index 000000000..83ec4c1d9
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.12.3.json
@@ -0,0 +1,368 @@
+{
+ "testCollection": {
+ "name": "15.12.3",
+ "numTests": 53,
+ "tests": [
+ {
+ "id": "15.12.3-0-1",
+ "path": "TestCases/chapter15/15.12/15.12.3/15.12.3-0-1.js",
+ "description": "JSON.stringify must exist as be a function",
+ "test": "assertTrue((function testcase() {\n var f = JSON.stringify;\n\n if (typeof(f) === \"function\") {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(JSON !== undefined)"
+ },
+ {
+ "id": "15.12.3-0-2",
+ "path": "TestCases/chapter15/15.12/15.12.3/15.12.3-0-2.js",
+ "description": "JSON.stringify must exist as be a function taking 3 parameters",
+ "test": "assertTrue((function testcase() {\n var f = JSON.stringify;\n\n if (typeof(f) === \"function\" && f.length === 3) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(JSON !== undefined)"
+ },
+ {
+ "id": "15.12.3-0-3",
+ "path": "TestCases/chapter15/15.12/15.12.3/15.12.3-0-3.js",
+ "description": "JSON.stringify must be deletable (configurable)",
+ "test": "assertTrue((function testcase() {\n var o = JSON;\n var desc = Object.getOwnPropertyDescriptor(o, \"stringify\");\n if (desc.configurable === true) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(function preq() {\n return typeof JSON != \"undefined\" && fnExists(Object.getOwnPropertyDescriptor)\n }).call(this)"
+ },
+ {
+ "id": "15.12.3-11-1",
+ "path": "TestCases/chapter15/15.12/15.12.3/15.12.3-11-1.js",
+ "description": "JSON.stringify(undefined) returns undefined",
+ "test": "assertTrue((JSON.stringify(undefined) === undefined));\n",
+ "precondition": "(JSON && fnExists(JSON.stringify))"
+ },
+ {
+ "id": "15.12.3-11-10",
+ "path": "TestCases/chapter15/15.12/15.12.3/15.12.3-11-10.js",
+ "description": "A JSON.stringify replacer function applied to a top level scalar value can return undefined.",
+ "test": "assertTrue((JSON.stringify(42, function(k, v) { return undefined }) === undefined));\n",
+ "precondition": "(JSON && fnExists(JSON.stringify))"
+ },
+ {
+ "id": "15.12.3-11-11",
+ "path": "TestCases/chapter15/15.12/15.12.3/15.12.3-11-11.js",
+ "description": "A JSON.stringify replacer function applied to a top level Object can return undefined.",
+ "test": "assertTrue((JSON.stringify({prop:1}, function(k, v) { return undefined }) === undefined));\n",
+ "precondition": "(JSON && fnExists(JSON.stringify))"
+ },
+ {
+ "id": "15.12.3-11-12",
+ "path": "TestCases/chapter15/15.12/15.12.3/15.12.3-11-12.js",
+ "description": "A JSON.stringify replacer function applied to a top level scalar can return an Array.",
+ "test": "assertTrue((JSON.stringify(42, function(k, v) { return v==42 ?[4,2]:v }) === '[4,2]'));\n",
+ "precondition": "(JSON && fnExists(JSON.stringify))"
+ },
+ {
+ "id": "15.12.3-11-13",
+ "path": "TestCases/chapter15/15.12/15.12.3/15.12.3-11-13.js",
+ "description": "A JSON.stringify replacer function applied to a top level scalar can return an Object.",
+ "test": "assertTrue((JSON.stringify(42, function(k, v) { return v==42 ? {forty:2}: v}) === '{\"forty\":2}'));\n",
+ "precondition": "(JSON && fnExists(JSON.stringify))"
+ },
+ {
+ "id": "15.12.3-11-14",
+ "path": "TestCases/chapter15/15.12/15.12.3/15.12.3-11-14.js",
+ "description": "Applying JSON.stringify to a function returns undefined.",
+ "test": "assertTrue((JSON.stringify(function() {}) === undefined));\n",
+ "precondition": "(JSON && fnExists(JSON.stringify))"
+ },
+ {
+ "id": "15.12.3-11-15",
+ "path": "TestCases/chapter15/15.12/15.12.3/15.12.3-11-15.js",
+ "description": "Applying JSON.stringify with a replacer function to a function returns the replacer value.",
+ "test": "assertTrue((JSON.stringify(function() {}, function(k,v) {return 99}) === '99'));\n",
+ "precondition": "(JSON && fnExists(JSON.stringify))"
+ },
+ {
+ "id": "15.12.3-11-16",
+ "path": "TestCases/chapter15/15.12/15.12.3/15.12.3-11-16.js",
+ "description": "JSON.stringify - stringifying an object where property name is the union of all null character (The abstract operation Quote(value) step 2.c)",
+ "test": "assertTrue((function testcase() {\n\n var result = true;\n\n var expectedNullChars = new Array();\n expectedNullChars[0] = \"\\\\u0000\";\n expectedNullChars[1] = \"\\\\u0001\";\n expectedNullChars[2] = \"\\\\u0002\";\n expectedNullChars[3] = \"\\\\u0003\";\n expectedNullChars[4] = \"\\\\u0004\";\n expectedNullChars[5] = \"\\\\u0005\";\n expectedNullChars[6] = \"\\\\u0006\";\n expectedNullChars[7] = \"\\\\u0007\";\n expectedNullChars[8] = \"\\\\b\";\n expectedNullChars[9] = \"\\\\t\";\n expectedNullChars[10] = \"\\\\n\";\n expectedNullChars[11] = \"\\\\u000b\";\n expectedNullChars[12] = \"\\\\f\";\n expectedNullChars[13] = \"\\\\r\";\n expectedNullChars[14] = \"\\\\u000e\";\n expectedNullChars[15] = \"\\\\u000f\";\n expectedNullChars[16] = \"\\\\u0010\";\n expectedNullChars[17] = \"\\\\u0011\";\n expectedNullChars[18] = \"\\\\u0012\";\n expectedNullChars[19] = \"\\\\u0013\";\n expectedNullChars[20] = \"\\\\u0014\";\n expectedNullChars[21] = \"\\\\u0015\";\n expectedNullChars[22] = \"\\\\u0016\";\n expectedNullChars[23] = \"\\\\u0017\";\n expectedNullChars[24] = \"\\\\u0018\";\n expectedNullChars[25] = \"\\\\u0019\";\n expectedNullChars[26] = \"\\\\u001a\";\n expectedNullChars[27] = \"\\\\u001b\";\n expectedNullChars[28] = \"\\\\u001c\";\n expectedNullChars[29] = \"\\\\u001d\";\n expectedNullChars[30] = \"\\\\u001e\";\n expectedNullChars[31] = \"\\\\u001f\";\n\n for (var index in expectedNullChars) {\n\n var str = JSON.stringify({ \"\\u0000\\u0001\\u0002\\u0003\\u0004\\u0005\\u0006\\u0007\\u0008\\u0009\\u000A\\u000B\\u000C\\u000D\\u000E\\u000F\\u0010\\u0011\\u0012\\u0013\\u0014\\u0015\\u0016\\u0017\\u0018\\u0019\\u001A\\u001B\\u001C\\u001D\\u001E\\u001F\": \"John\" });\n result = (result && str.indexOf(expectedNullChars[index]) !== -1); \n }\n return result;\n }).call(this));\n"
+ },
+ {
+ "id": "15.12.3-11-17",
+ "path": "TestCases/chapter15/15.12/15.12.3/15.12.3-11-17.js",
+ "description": "JSON.stringify - stringifying an object where property name starts with the union of all null character (The abstract operation Quote(value) step 2.c)",
+ "test": "assertTrue((function testcase() {\n\n var result = true;\n\n var expectedNullChars = new Array();\n expectedNullChars[0] = \"\\\\u0000\";\n expectedNullChars[1] = \"\\\\u0001\";\n expectedNullChars[2] = \"\\\\u0002\";\n expectedNullChars[3] = \"\\\\u0003\";\n expectedNullChars[4] = \"\\\\u0004\";\n expectedNullChars[5] = \"\\\\u0005\";\n expectedNullChars[6] = \"\\\\u0006\";\n expectedNullChars[7] = \"\\\\u0007\";\n expectedNullChars[8] = \"\\\\b\";\n expectedNullChars[9] = \"\\\\t\";\n expectedNullChars[10] = \"\\\\n\";\n expectedNullChars[11] = \"\\\\u000b\";\n expectedNullChars[12] = \"\\\\f\";\n expectedNullChars[13] = \"\\\\r\";\n expectedNullChars[14] = \"\\\\u000e\";\n expectedNullChars[15] = \"\\\\u000f\";\n expectedNullChars[16] = \"\\\\u0010\";\n expectedNullChars[17] = \"\\\\u0011\";\n expectedNullChars[18] = \"\\\\u0012\";\n expectedNullChars[19] = \"\\\\u0013\";\n expectedNullChars[20] = \"\\\\u0014\";\n expectedNullChars[21] = \"\\\\u0015\";\n expectedNullChars[22] = \"\\\\u0016\";\n expectedNullChars[23] = \"\\\\u0017\";\n expectedNullChars[24] = \"\\\\u0018\";\n expectedNullChars[25] = \"\\\\u0019\";\n expectedNullChars[26] = \"\\\\u001a\";\n expectedNullChars[27] = \"\\\\u001b\";\n expectedNullChars[28] = \"\\\\u001c\";\n expectedNullChars[29] = \"\\\\u001d\";\n expectedNullChars[30] = \"\\\\u001e\";\n expectedNullChars[31] = \"\\\\u001f\";\n\n for (var index in expectedNullChars) {\n\n var str = JSON.stringify({ \"\\u0000\\u0001\\u0002\\u0003\\u0004\\u0005\\u0006\\u0007\\u0008\\u0009\\u000A\\u000B\\u000C\\u000D\\u000E\\u000F\\u0010\\u0011\\u0012\\u0013\\u0014\\u0015\\u0016\\u0017\\u0018\\u0019\\u001A\\u001B\\u001C\\u001D\\u001E\\u001Fname\": \"John\" });\n result = (result && str.indexOf(expectedNullChars[index]) !== -1);\n }\n return result;\n }).call(this));\n"
+ },
+ {
+ "id": "15.12.3-11-18",
+ "path": "TestCases/chapter15/15.12/15.12.3/15.12.3-11-18.js",
+ "description": "JSON.stringify - stringifying an object where property name ends with the union of all null character (The abstract operation Quote(value) step 2.c)",
+ "test": "assertTrue((function testcase() {\n\n var result = true;\n\n var expectedNullChars = new Array();\n expectedNullChars[0] = \"\\\\u0000\";\n expectedNullChars[1] = \"\\\\u0001\";\n expectedNullChars[2] = \"\\\\u0002\";\n expectedNullChars[3] = \"\\\\u0003\";\n expectedNullChars[4] = \"\\\\u0004\";\n expectedNullChars[5] = \"\\\\u0005\";\n expectedNullChars[6] = \"\\\\u0006\";\n expectedNullChars[7] = \"\\\\u0007\";\n expectedNullChars[8] = \"\\\\b\";\n expectedNullChars[9] = \"\\\\t\";\n expectedNullChars[10] = \"\\\\n\";\n expectedNullChars[11] = \"\\\\u000b\";\n expectedNullChars[12] = \"\\\\f\";\n expectedNullChars[13] = \"\\\\r\";\n expectedNullChars[14] = \"\\\\u000e\";\n expectedNullChars[15] = \"\\\\u000f\";\n expectedNullChars[16] = \"\\\\u0010\";\n expectedNullChars[17] = \"\\\\u0011\";\n expectedNullChars[18] = \"\\\\u0012\";\n expectedNullChars[19] = \"\\\\u0013\";\n expectedNullChars[20] = \"\\\\u0014\";\n expectedNullChars[21] = \"\\\\u0015\";\n expectedNullChars[22] = \"\\\\u0016\";\n expectedNullChars[23] = \"\\\\u0017\";\n expectedNullChars[24] = \"\\\\u0018\";\n expectedNullChars[25] = \"\\\\u0019\";\n expectedNullChars[26] = \"\\\\u001a\";\n expectedNullChars[27] = \"\\\\u001b\";\n expectedNullChars[28] = \"\\\\u001c\";\n expectedNullChars[29] = \"\\\\u001d\";\n expectedNullChars[30] = \"\\\\u001e\";\n expectedNullChars[31] = \"\\\\u001f\";\n\n for (var index in expectedNullChars) {\n\n var str = JSON.stringify({ \"name\\u0000\\u0001\\u0002\\u0003\\u0004\\u0005\\u0006\\u0007\\u0008\\u0009\\u000A\\u000B\\u000C\\u000D\\u000E\\u000F\\u0010\\u0011\\u0012\\u0013\\u0014\\u0015\\u0016\\u0017\\u0018\\u0019\\u001A\\u001B\\u001C\\u001D\\u001E\\u001F\": \"John\" });\n result = (result && str.indexOf(expectedNullChars[index]) !== -1);\n }\n return result;\n }).call(this));\n"
+ },
+ {
+ "id": "15.12.3-11-19",
+ "path": "TestCases/chapter15/15.12/15.12.3/15.12.3-11-19.js",
+ "description": "JSON.stringify - stringifying an object where property name starts and ends with the union of all null character (The abstract operation Quote(value) step 2.c)",
+ "test": "assertTrue((function testcase() {\n\n var result = true;\n\n var expectedNullChars = new Array();\n expectedNullChars[0] = \"\\\\u0000\";\n expectedNullChars[1] = \"\\\\u0001\";\n expectedNullChars[2] = \"\\\\u0002\";\n expectedNullChars[3] = \"\\\\u0003\";\n expectedNullChars[4] = \"\\\\u0004\";\n expectedNullChars[5] = \"\\\\u0005\";\n expectedNullChars[6] = \"\\\\u0006\";\n expectedNullChars[7] = \"\\\\u0007\";\n expectedNullChars[8] = \"\\\\b\";\n expectedNullChars[9] = \"\\\\t\";\n expectedNullChars[10] = \"\\\\n\";\n expectedNullChars[11] = \"\\\\u000b\";\n expectedNullChars[12] = \"\\\\f\";\n expectedNullChars[13] = \"\\\\r\";\n expectedNullChars[14] = \"\\\\u000e\";\n expectedNullChars[15] = \"\\\\u000f\";\n expectedNullChars[16] = \"\\\\u0010\";\n expectedNullChars[17] = \"\\\\u0011\";\n expectedNullChars[18] = \"\\\\u0012\";\n expectedNullChars[19] = \"\\\\u0013\";\n expectedNullChars[20] = \"\\\\u0014\";\n expectedNullChars[21] = \"\\\\u0015\";\n expectedNullChars[22] = \"\\\\u0016\";\n expectedNullChars[23] = \"\\\\u0017\";\n expectedNullChars[24] = \"\\\\u0018\";\n expectedNullChars[25] = \"\\\\u0019\";\n expectedNullChars[26] = \"\\\\u001a\";\n expectedNullChars[27] = \"\\\\u001b\";\n expectedNullChars[28] = \"\\\\u001c\";\n expectedNullChars[29] = \"\\\\u001d\";\n expectedNullChars[30] = \"\\\\u001e\";\n expectedNullChars[31] = \"\\\\u001f\";\n\n for (var index in expectedNullChars) {\n\n var str = JSON.stringify({ \"\\u0000\\u0001\\u0002\\u0003\\u0004\\u0005\\u0006\\u0007\\u0008\\u0009\\u000A\\u000B\\u000C\\u000D\\u000E\\u000F\\u0010\\u0011\\u0012\\u0013\\u0014\\u0015\\u0016\\u0017\\u0018\\u0019\\u001A\\u001B\\u001C\\u001D\\u001E\\u001Fname\\u0000\\u0001\\u0002\\u0003\\u0004\\u0005\\u0006\\u0007\\u0008\\u0009\\u000A\\u000B\\u000C\\u000D\\u000E\\u000F\\u0010\\u0011\\u0012\\u0013\\u0014\\u0015\\u0016\\u0017\\u0018\\u0019\\u001A\\u001B\\u001C\\u001D\\u001E\\u001F\": \"John\" });\n result = (result && str.indexOf(expectedNullChars[index]) !== -1 && str.indexOf(expectedNullChars[index]) !== -1);\n }\n return result;\n }).call(this));\n"
+ },
+ {
+ "id": "15.12.3-11-2",
+ "path": "TestCases/chapter15/15.12/15.12.3/15.12.3-11-2.js",
+ "description": "A JSON.stringify replacer function works is applied to a top level undefined value.",
+ "test": "assertTrue((JSON.stringify(undefined, function(k, v) { return \"replacement\" }) === '\"replacement\"'));\n",
+ "precondition": "(JSON && fnExists(JSON.stringify))"
+ },
+ {
+ "id": "15.12.3-11-20",
+ "path": "TestCases/chapter15/15.12/15.12.3/15.12.3-11-20.js",
+ "description": "JSON.stringify - stringifying an object where property name middles with the union of all null character (The abstract operation Quote(value) step 2.c)",
+ "test": "assertTrue((function testcase() {\n\n var result = true;\n\n var expectedNullChars = new Array();\n expectedNullChars[0] = \"\\\\u0000\";\n expectedNullChars[1] = \"\\\\u0001\";\n expectedNullChars[2] = \"\\\\u0002\";\n expectedNullChars[3] = \"\\\\u0003\";\n expectedNullChars[4] = \"\\\\u0004\";\n expectedNullChars[5] = \"\\\\u0005\";\n expectedNullChars[6] = \"\\\\u0006\";\n expectedNullChars[7] = \"\\\\u0007\";\n expectedNullChars[8] = \"\\\\b\";\n expectedNullChars[9] = \"\\\\t\";\n expectedNullChars[10] = \"\\\\n\";\n expectedNullChars[11] = \"\\\\u000b\";\n expectedNullChars[12] = \"\\\\f\";\n expectedNullChars[13] = \"\\\\r\";\n expectedNullChars[14] = \"\\\\u000e\";\n expectedNullChars[15] = \"\\\\u000f\";\n expectedNullChars[16] = \"\\\\u0010\";\n expectedNullChars[17] = \"\\\\u0011\";\n expectedNullChars[18] = \"\\\\u0012\";\n expectedNullChars[19] = \"\\\\u0013\";\n expectedNullChars[20] = \"\\\\u0014\";\n expectedNullChars[21] = \"\\\\u0015\";\n expectedNullChars[22] = \"\\\\u0016\";\n expectedNullChars[23] = \"\\\\u0017\";\n expectedNullChars[24] = \"\\\\u0018\";\n expectedNullChars[25] = \"\\\\u0019\";\n expectedNullChars[26] = \"\\\\u001a\";\n expectedNullChars[27] = \"\\\\u001b\";\n expectedNullChars[28] = \"\\\\u001c\";\n expectedNullChars[29] = \"\\\\u001d\";\n expectedNullChars[30] = \"\\\\u001e\";\n expectedNullChars[31] = \"\\\\u001f\";\n\n for (var index in expectedNullChars) {\n\n var str = JSON.stringify({ \"na\\u0000\\u0001\\u0002\\u0003\\u0004\\u0005\\u0006\\u0007\\u0008\\u0009\\u000A\\u000B\\u000C\\u000D\\u000E\\u000F\\u0010\\u0011\\u0012\\u0013\\u0014\\u0015\\u0016\\u0017\\u0018\\u0019\\u001A\\u001B\\u001C\\u001D\\u001E\\u001Fme\": \"John\" });\n result = (result && str.indexOf(expectedNullChars[index]) !== -1);\n }\n return result;\n }).call(this));\n"
+ },
+ {
+ "id": "15.12.3-11-21",
+ "path": "TestCases/chapter15/15.12/15.12.3/15.12.3-11-21.js",
+ "description": "JSON.stringify - stringifying an object where property value is the union of all null character (The abstract operation Quote(value) step 2.c)",
+ "test": "assertTrue((function testcase() {\n\n var result = true;\n\n var expectedNullChars = new Array();\n expectedNullChars[0] = \"\\\\u0000\";\n expectedNullChars[1] = \"\\\\u0001\";\n expectedNullChars[2] = \"\\\\u0002\";\n expectedNullChars[3] = \"\\\\u0003\";\n expectedNullChars[4] = \"\\\\u0004\";\n expectedNullChars[5] = \"\\\\u0005\";\n expectedNullChars[6] = \"\\\\u0006\";\n expectedNullChars[7] = \"\\\\u0007\";\n expectedNullChars[8] = \"\\\\b\";\n expectedNullChars[9] = \"\\\\t\";\n expectedNullChars[10] = \"\\\\n\";\n expectedNullChars[11] = \"\\\\u000b\";\n expectedNullChars[12] = \"\\\\f\";\n expectedNullChars[13] = \"\\\\r\";\n expectedNullChars[14] = \"\\\\u000e\";\n expectedNullChars[15] = \"\\\\u000f\";\n expectedNullChars[16] = \"\\\\u0010\";\n expectedNullChars[17] = \"\\\\u0011\";\n expectedNullChars[18] = \"\\\\u0012\";\n expectedNullChars[19] = \"\\\\u0013\";\n expectedNullChars[20] = \"\\\\u0014\";\n expectedNullChars[21] = \"\\\\u0015\";\n expectedNullChars[22] = \"\\\\u0016\";\n expectedNullChars[23] = \"\\\\u0017\";\n expectedNullChars[24] = \"\\\\u0018\";\n expectedNullChars[25] = \"\\\\u0019\";\n expectedNullChars[26] = \"\\\\u001a\";\n expectedNullChars[27] = \"\\\\u001b\";\n expectedNullChars[28] = \"\\\\u001c\";\n expectedNullChars[29] = \"\\\\u001d\";\n expectedNullChars[30] = \"\\\\u001e\";\n expectedNullChars[31] = \"\\\\u001f\";\n\n for (var index in expectedNullChars) {\n\n var str = JSON.stringify({ \"name\": \"\\u0000\\u0001\\u0002\\u0003\\u0004\\u0005\\u0006\\u0007\\u0008\\u0009\\u000A\\u000B\\u000C\\u000D\\u000E\\u000F\\u0010\\u0011\\u0012\\u0013\\u0014\\u0015\\u0016\\u0017\\u0018\\u0019\\u001A\\u001B\\u001C\\u001D\\u001E\\u001F\" });\n result = (result && str.indexOf(expectedNullChars[index]) !== -1);\n }\n return result;\n }).call(this));\n"
+ },
+ {
+ "id": "15.12.3-11-22",
+ "path": "TestCases/chapter15/15.12/15.12.3/15.12.3-11-22.js",
+ "description": "JSON.stringify - stringifying an object where property value starts with the union of all null character (The abstract operation Quote(value) step 2.c)",
+ "test": "assertTrue((function testcase() {\n\n var result = true;\n\n var expectedNullChars = new Array();\n expectedNullChars[0] = \"\\\\u0000\";\n expectedNullChars[1] = \"\\\\u0001\";\n expectedNullChars[2] = \"\\\\u0002\";\n expectedNullChars[3] = \"\\\\u0003\";\n expectedNullChars[4] = \"\\\\u0004\";\n expectedNullChars[5] = \"\\\\u0005\";\n expectedNullChars[6] = \"\\\\u0006\";\n expectedNullChars[7] = \"\\\\u0007\";\n expectedNullChars[8] = \"\\\\b\";\n expectedNullChars[9] = \"\\\\t\";\n expectedNullChars[10] = \"\\\\n\";\n expectedNullChars[11] = \"\\\\u000b\";\n expectedNullChars[12] = \"\\\\f\";\n expectedNullChars[13] = \"\\\\r\";\n expectedNullChars[14] = \"\\\\u000e\";\n expectedNullChars[15] = \"\\\\u000f\";\n expectedNullChars[16] = \"\\\\u0010\";\n expectedNullChars[17] = \"\\\\u0011\";\n expectedNullChars[18] = \"\\\\u0012\";\n expectedNullChars[19] = \"\\\\u0013\";\n expectedNullChars[20] = \"\\\\u0014\";\n expectedNullChars[21] = \"\\\\u0015\";\n expectedNullChars[22] = \"\\\\u0016\";\n expectedNullChars[23] = \"\\\\u0017\";\n expectedNullChars[24] = \"\\\\u0018\";\n expectedNullChars[25] = \"\\\\u0019\";\n expectedNullChars[26] = \"\\\\u001a\";\n expectedNullChars[27] = \"\\\\u001b\";\n expectedNullChars[28] = \"\\\\u001c\";\n expectedNullChars[29] = \"\\\\u001d\";\n expectedNullChars[30] = \"\\\\u001e\";\n expectedNullChars[31] = \"\\\\u001f\";\n\n for (var index in expectedNullChars) {\n\n var str = JSON.stringify({ \"name\": \"\\u0000\\u0001\\u0002\\u0003\\u0004\\u0005\\u0006\\u0007\\u0008\\u0009\\u000A\\u000B\\u000C\\u000D\\u000E\\u000F\\u0010\\u0011\\u0012\\u0013\\u0014\\u0015\\u0016\\u0017\\u0018\\u0019\\u001A\\u001B\\u001C\\u001D\\u001E\\u001FJohn\" });\n result = (result && str.indexOf(expectedNullChars[index]) !== -1);\n }\n return result;\n }).call(this));\n"
+ },
+ {
+ "id": "15.12.3-11-23",
+ "path": "TestCases/chapter15/15.12/15.12.3/15.12.3-11-23.js",
+ "description": "JSON.stringify - stringifying an object where property value ends with the union of all null character (The abstract operation Quote(value) step 2.c)",
+ "test": "assertTrue((function testcase() {\n\n var result = true;\n\n var expectedNullChars = new Array();\n expectedNullChars[0] = \"\\\\u0000\";\n expectedNullChars[1] = \"\\\\u0001\";\n expectedNullChars[2] = \"\\\\u0002\";\n expectedNullChars[3] = \"\\\\u0003\";\n expectedNullChars[4] = \"\\\\u0004\";\n expectedNullChars[5] = \"\\\\u0005\";\n expectedNullChars[6] = \"\\\\u0006\";\n expectedNullChars[7] = \"\\\\u0007\";\n expectedNullChars[8] = \"\\\\b\";\n expectedNullChars[9] = \"\\\\t\";\n expectedNullChars[10] = \"\\\\n\";\n expectedNullChars[11] = \"\\\\u000b\";\n expectedNullChars[12] = \"\\\\f\";\n expectedNullChars[13] = \"\\\\r\";\n expectedNullChars[14] = \"\\\\u000e\";\n expectedNullChars[15] = \"\\\\u000f\";\n expectedNullChars[16] = \"\\\\u0010\";\n expectedNullChars[17] = \"\\\\u0011\";\n expectedNullChars[18] = \"\\\\u0012\";\n expectedNullChars[19] = \"\\\\u0013\";\n expectedNullChars[20] = \"\\\\u0014\";\n expectedNullChars[21] = \"\\\\u0015\";\n expectedNullChars[22] = \"\\\\u0016\";\n expectedNullChars[23] = \"\\\\u0017\";\n expectedNullChars[24] = \"\\\\u0018\";\n expectedNullChars[25] = \"\\\\u0019\";\n expectedNullChars[26] = \"\\\\u001a\";\n expectedNullChars[27] = \"\\\\u001b\";\n expectedNullChars[28] = \"\\\\u001c\";\n expectedNullChars[29] = \"\\\\u001d\";\n expectedNullChars[30] = \"\\\\u001e\";\n expectedNullChars[31] = \"\\\\u001f\";\n\n for (var index in expectedNullChars) {\n\n var str = JSON.stringify({ \"name\": \"John\\u0000\\u0001\\u0002\\u0003\\u0004\\u0005\\u0006\\u0007\\u0008\\u0009\\u000A\\u000B\\u000C\\u000D\\u000E\\u000F\\u0010\\u0011\\u0012\\u0013\\u0014\\u0015\\u0016\\u0017\\u0018\\u0019\\u001A\\u001B\\u001C\\u001D\\u001E\\u001F\" });\n result = (result && str.indexOf(expectedNullChars[index]) !== -1);\n }\n return result;\n }).call(this));\n"
+ },
+ {
+ "id": "15.12.3-11-24",
+ "path": "TestCases/chapter15/15.12/15.12.3/15.12.3-11-24.js",
+ "description": "JSON.stringify - stringifying an object where property value starts and ends with the union of all null character (The abstract operation Quote(value) step 2.c)",
+ "test": "assertTrue((function testcase() {\n\n var result = true;\n\n var expectedNullChars = new Array();\n expectedNullChars[0] = \"\\\\u0000\";\n expectedNullChars[1] = \"\\\\u0001\";\n expectedNullChars[2] = \"\\\\u0002\";\n expectedNullChars[3] = \"\\\\u0003\";\n expectedNullChars[4] = \"\\\\u0004\";\n expectedNullChars[5] = \"\\\\u0005\";\n expectedNullChars[6] = \"\\\\u0006\";\n expectedNullChars[7] = \"\\\\u0007\";\n expectedNullChars[8] = \"\\\\b\";\n expectedNullChars[9] = \"\\\\t\";\n expectedNullChars[10] = \"\\\\n\";\n expectedNullChars[11] = \"\\\\u000b\";\n expectedNullChars[12] = \"\\\\f\";\n expectedNullChars[13] = \"\\\\r\";\n expectedNullChars[14] = \"\\\\u000e\";\n expectedNullChars[15] = \"\\\\u000f\";\n expectedNullChars[16] = \"\\\\u0010\";\n expectedNullChars[17] = \"\\\\u0011\";\n expectedNullChars[18] = \"\\\\u0012\";\n expectedNullChars[19] = \"\\\\u0013\";\n expectedNullChars[20] = \"\\\\u0014\";\n expectedNullChars[21] = \"\\\\u0015\";\n expectedNullChars[22] = \"\\\\u0016\";\n expectedNullChars[23] = \"\\\\u0017\";\n expectedNullChars[24] = \"\\\\u0018\";\n expectedNullChars[25] = \"\\\\u0019\";\n expectedNullChars[26] = \"\\\\u001a\";\n expectedNullChars[27] = \"\\\\u001b\";\n expectedNullChars[28] = \"\\\\u001c\";\n expectedNullChars[29] = \"\\\\u001d\";\n expectedNullChars[30] = \"\\\\u001e\";\n expectedNullChars[31] = \"\\\\u001f\";\n\n for (var index in expectedNullChars) {\n\n var str = JSON.stringify({ \"name\": \"\\u0000\\u0001\\u0002\\u0003\\u0004\\u0005\\u0006\\u0007\\u0008\\u0009\\u000A\\u000B\\u000C\\u000D\\u000E\\u000F\\u0010\\u0011\\u0012\\u0013\\u0014\\u0015\\u0016\\u0017\\u0018\\u0019\\u001A\\u001B\\u001C\\u001D\\u001E\\u001FJohn\\u0000\\u0001\\u0002\\u0003\\u0004\\u0005\\u0006\\u0007\\u0008\\u0009\\u000A\\u000B\\u000C\\u000D\\u000E\\u000F\\u0010\\u0011\\u0012\\u0013\\u0014\\u0015\\u0016\\u0017\\u0018\\u0019\\u001A\\u001B\\u001C\\u001D\\u001E\\u001F\" });\n result = (result && str.indexOf(expectedNullChars[index]) !== -1 && str.indexOf(expectedNullChars[index]) !== -1);\n }\n return result;\n }).call(this));\n"
+ },
+ {
+ "id": "15.12.3-11-25",
+ "path": "TestCases/chapter15/15.12/15.12.3/15.12.3-11-25.js",
+ "description": "JSON.stringify - stringifying an object where property value middles with the union of all null character (The abstract operation Quote(value) step 2.c)",
+ "test": "assertTrue((function testcase() {\n\n var result = true;\n\n var expectedNullChars = new Array();\n expectedNullChars[0] = \"\\\\u0000\";\n expectedNullChars[1] = \"\\\\u0001\";\n expectedNullChars[2] = \"\\\\u0002\";\n expectedNullChars[3] = \"\\\\u0003\";\n expectedNullChars[4] = \"\\\\u0004\";\n expectedNullChars[5] = \"\\\\u0005\";\n expectedNullChars[6] = \"\\\\u0006\";\n expectedNullChars[7] = \"\\\\u0007\";\n expectedNullChars[8] = \"\\\\b\";\n expectedNullChars[9] = \"\\\\t\";\n expectedNullChars[10] = \"\\\\n\";\n expectedNullChars[11] = \"\\\\u000b\";\n expectedNullChars[12] = \"\\\\f\";\n expectedNullChars[13] = \"\\\\r\";\n expectedNullChars[14] = \"\\\\u000e\";\n expectedNullChars[15] = \"\\\\u000f\";\n expectedNullChars[16] = \"\\\\u0010\";\n expectedNullChars[17] = \"\\\\u0011\";\n expectedNullChars[18] = \"\\\\u0012\";\n expectedNullChars[19] = \"\\\\u0013\";\n expectedNullChars[20] = \"\\\\u0014\";\n expectedNullChars[21] = \"\\\\u0015\";\n expectedNullChars[22] = \"\\\\u0016\";\n expectedNullChars[23] = \"\\\\u0017\";\n expectedNullChars[24] = \"\\\\u0018\";\n expectedNullChars[25] = \"\\\\u0019\";\n expectedNullChars[26] = \"\\\\u001a\";\n expectedNullChars[27] = \"\\\\u001b\";\n expectedNullChars[28] = \"\\\\u001c\";\n expectedNullChars[29] = \"\\\\u001d\";\n expectedNullChars[30] = \"\\\\u001e\";\n expectedNullChars[31] = \"\\\\u001f\";\n\n for (var index in expectedNullChars) {\n\n var str = JSON.stringify({ \"name\": \"Jo\\u0000\\u0001\\u0002\\u0003\\u0004\\u0005\\u0006\\u0007\\u0008\\u0009\\u000A\\u000B\\u000C\\u000D\\u000E\\u000F\\u0010\\u0011\\u0012\\u0013\\u0014\\u0015\\u0016\\u0017\\u0018\\u0019\\u001A\\u001B\\u001C\\u001D\\u001E\\u001Fhn\" });\n result = (result && str.indexOf(expectedNullChars[index]) !== -1 && str.indexOf(expectedNullChars[index]) !== -1);\n }\n return result;\n }).call(this));\n"
+ },
+ {
+ "id": "15.12.3-11-26",
+ "path": "TestCases/chapter15/15.12/15.12.3/15.12.3-11-26.js",
+ "description": "JSON.stringify - the last element of the concatenation is ']' (The abstract operation JA(value) step 10.b.iii)",
+ "test": "assertTrue((function testcase() {\n var arrObj = [];\n arrObj[0] = \"a\";\n arrObj[1] = \"b\";\n arrObj[2] = \"c\";\n\n var jsonText = JSON.stringify(arrObj, undefined, \"\").toString();\n return jsonText.substr(jsonText.length - 1, 1) === \"]\";\n }).call(this));\n"
+ },
+ {
+ "id": "15.12.3-11-3",
+ "path": "TestCases/chapter15/15.12/15.12.3/15.12.3-11-3.js",
+ "description": "A JSON.stringify correctly works on top level string values.",
+ "test": "assertTrue((JSON.stringify(\"a string\") === '\"a string\"'));\n",
+ "precondition": "(JSON && fnExists(JSON.stringify))"
+ },
+ {
+ "id": "15.12.3-11-4",
+ "path": "TestCases/chapter15/15.12/15.12.3/15.12.3-11-4.js",
+ "description": "JSON.stringify correctly works on top level Number values.",
+ "test": "assertTrue((JSON.stringify(123) === '123'));\n",
+ "precondition": "(JSON && fnExists(JSON.stringify))"
+ },
+ {
+ "id": "15.12.3-11-5",
+ "path": "TestCases/chapter15/15.12/15.12.3/15.12.3-11-5.js",
+ "description": "JSON.stringify correctly works on top level Boolean values.",
+ "test": "assertTrue((JSON.stringify(true) === 'true'));\n",
+ "precondition": "(JSON && fnExists(JSON.stringify))"
+ },
+ {
+ "id": "15.12.3-11-6",
+ "path": "TestCases/chapter15/15.12/15.12.3/15.12.3-11-6.js",
+ "description": "JSON.stringify correctly works on top level null values.",
+ "test": "assertTrue((JSON.stringify(null) === 'null'));\n",
+ "precondition": "(JSON && fnExists(JSON.stringify))"
+ },
+ {
+ "id": "15.12.3-11-7",
+ "path": "TestCases/chapter15/15.12/15.12.3/15.12.3-11-7.js",
+ "description": "JSON.stringify correctly works on top level Number objects.",
+ "test": "assertTrue((JSON.stringify(new Number(42)) === '42'));\n",
+ "precondition": "(JSON && fnExists(JSON.stringify))"
+ },
+ {
+ "id": "15.12.3-11-8",
+ "path": "TestCases/chapter15/15.12/15.12.3/15.12.3-11-8.js",
+ "description": "JSON.stringify correctly works on top level String objects.",
+ "test": "assertTrue((JSON.stringify(new String('wrappered')) === '\"wrappered\"'));\n",
+ "precondition": "(JSON && fnExists(JSON.stringify))"
+ },
+ {
+ "id": "15.12.3-11-9",
+ "path": "TestCases/chapter15/15.12/15.12.3/15.12.3-11-9.js",
+ "description": "JSON.stringify correctly works on top level Boolean objects.",
+ "test": "assertTrue((JSON.stringify(new Boolean(false)) === 'false'));\n",
+ "precondition": "(JSON && fnExists(JSON.stringify))"
+ },
+ {
+ "id": "15.12.3-4-1",
+ "path": "TestCases/chapter15/15.12/15.12.3/15.12.3-4-1.js",
+ "description": "JSON.stringify ignores replacer aruguments that are not functions or arrays..",
+ "test": "assertTrue((function testcase() {\n try {\n return JSON.stringify([42],{})=== '[42]';\n }\n catch (e) {return false}\n }).call(this));\n",
+ "precondition": "(JSON && fnExists(JSON.stringify))"
+ },
+ {
+ "id": "15.12.3-5-a-i-1",
+ "path": "TestCases/chapter15/15.12/15.12.3/15.12.3-5-a-i-1.js",
+ "description": "JSON.stringify converts Number wrapper object space aruguments to Number values",
+ "test": "assertTrue((function testcase() {\n var obj = {a1: {b1: [1,2,3,4], b2: {c1: 1, c2: 2}},a2: 'a2'};\n return JSON.stringify(obj,null, new Number(5))=== JSON.stringify(obj,null, 5);\n }).call(this));\n",
+ "precondition": "(JSON && fnExists(JSON.stringify))"
+ },
+ {
+ "id": "15.12.3-5-b-i-1",
+ "path": "TestCases/chapter15/15.12/15.12.3/15.12.3-5-b-i-1.js",
+ "description": "JSON.stringify converts String wrapper object space aruguments to String values",
+ "test": "assertTrue((function testcase() {\n var obj = {a1: {b1: [1,2,3,4], b2: {c1: 1, c2: 2}},a2: 'a2'};\n return JSON.stringify(obj,null, new String('xxx'))=== JSON.stringify(obj,null, 'xxx');\n }).call(this));\n",
+ "precondition": "(JSON && fnExists(JSON.stringify))"
+ },
+ {
+ "id": "15.12.3-6-a-1",
+ "path": "TestCases/chapter15/15.12/15.12.3/15.12.3-6-a-1.js",
+ "description": "JSON.stringify treats numeric space arguments greater than 10 the same as a space argument of 10.",
+ "test": "assertTrue((function testcase() {\n var obj = {a1: {b1: [1,2,3,4], b2: {c1: 1, c2: 2}},a2: 'a2'};\n return JSON.stringify(obj,null, 10)=== JSON.stringify(obj,null, 100);\n }).call(this));\n",
+ "precondition": "(JSON && fnExists(JSON.stringify))"
+ },
+ {
+ "id": "15.12.3-6-a-2",
+ "path": "TestCases/chapter15/15.12/15.12.3/15.12.3-6-a-2.js",
+ "description": "JSON.stringify truccates non-integer numeric space arguments to their integer part.",
+ "test": "assertTrue((function testcase() {\n var obj = {a1: {b1: [1,2,3,4], b2: {c1: 1, c2: 2}},a2: 'a2'};\n return JSON.stringify(obj,null, 5.99999)=== JSON.stringify(obj,null, 5);\n }).call(this));\n",
+ "precondition": "(JSON && fnExists(JSON.stringify))"
+ },
+ {
+ "id": "15.12.3-6-b-1",
+ "path": "TestCases/chapter15/15.12/15.12.3/15.12.3-6-b-1.js",
+ "description": "JSON.stringify treats numeric space arguments less than 1 (0.999999)the same as emptry string space argument.",
+ "test": "assertTrue((function testcase() {\n var obj = {a1: {b1: [1,2,3,4], b2: {c1: 1, c2: 2}},a2: 'a2'};\n return JSON.stringify(obj,null, 0.999999)=== JSON.stringify(obj); /* emptry string should be same as no space arg */\n }).call(this));\n",
+ "precondition": "(JSON && fnExists(JSON.stringify))"
+ },
+ {
+ "id": "15.12.3-6-b-2",
+ "path": "TestCases/chapter15/15.12/15.12.3/15.12.3-6-b-2.js",
+ "description": "JSON.stringify treats numeric space arguments less than 1 (0)the same as emptry string space argument.",
+ "test": "assertTrue((function testcase() {\n var obj = {a1: {b1: [1,2,3,4], b2: {c1: 1, c2: 2}},a2: 'a2'};\n return JSON.stringify(obj,null, 0)=== JSON.stringify(obj); /* emptry string should be same as no space arg */\n }).call(this));\n",
+ "precondition": "(JSON && fnExists(JSON.stringify))"
+ },
+ {
+ "id": "15.12.3-6-b-3",
+ "path": "TestCases/chapter15/15.12/15.12.3/15.12.3-6-b-3.js",
+ "description": "JSON.stringify treats numeric space arguments less than 1 (-5) the same as emptry string space argument.",
+ "test": "assertTrue((function testcase() {\n var obj = {a1: {b1: [1,2,3,4], b2: {c1: 1, c2: 2}},a2: 'a2'};\n return JSON.stringify(obj,null, -5)=== JSON.stringify(obj); /* emptry string should be same as no space arg */\n }).call(this));\n",
+ "precondition": "(JSON && fnExists(JSON.stringify))"
+ },
+ {
+ "id": "15.12.3-6-b-4",
+ "path": "TestCases/chapter15/15.12/15.12.3/15.12.3-6-b-4.js",
+ "description": "JSON.stringify treats numeric space arguments (in the range 1..10) is equivalent to a string of spaces of that length.",
+ "test": "assertTrue((function testcase() {\n var obj = {a1: {b1: [1,2,3,4], b2: {c1: 1, c2: 2}},a2: 'a2'};\n var fiveSpaces = ' ';\n // '12345'\n return JSON.stringify(obj,null, 5)=== JSON.stringify(obj, null, fiveSpaces); \n }).call(this));\n",
+ "precondition": "(JSON && fnExists(JSON.stringify))"
+ },
+ {
+ "id": "15.12.3-7-a-1",
+ "path": "TestCases/chapter15/15.12/15.12.3/15.12.3-7-a-1.js",
+ "description": "JSON.stringify only uses the first 10 characters of a string space arguments.",
+ "test": "assertTrue((function testcase() {\n var obj = {a1: {b1: [1,2,3,4], b2: {c1: 1, c2: 2}},a2: 'a2'};\n return JSON.stringify(obj,null, '0123456789xxxxxxxxx')=== JSON.stringify(obj,null, '0123456789'); \n }).call(this));\n",
+ "precondition": "(JSON && fnExists(JSON.stringify))"
+ },
+ {
+ "id": "15.12.3-8-a-1",
+ "path": "TestCases/chapter15/15.12/15.12.3/15.12.3-8-a-1.js",
+ "description": "JSON.stringify treats an empty string space argument the same as a missing space argument.",
+ "test": "assertTrue((function testcase() {\n var obj = {a1: {b1: [1,2,3,4], b2: {c1: 1, c2: 2}},a2: 'a2'};\n return JSON.stringify(obj)=== JSON.stringify(obj,null, '');\n }).call(this));\n",
+ "precondition": "(JSON && fnExists(JSON.stringify))"
+ },
+ {
+ "id": "15.12.3-8-a-2",
+ "path": "TestCases/chapter15/15.12/15.12.3/15.12.3-8-a-2.js",
+ "description": "JSON.stringify treats an Boolean space argument the same as a missing space argument.",
+ "test": "assertTrue((function testcase() {\n var obj = {a1: {b1: [1,2,3,4], b2: {c1: 1, c2: 2}},a2: 'a2'};\n return JSON.stringify(obj)=== JSON.stringify(obj,null, true);\n }).call(this));\n",
+ "precondition": "(JSON && fnExists(JSON.stringify))"
+ },
+ {
+ "id": "15.12.3-8-a-3",
+ "path": "TestCases/chapter15/15.12/15.12.3/15.12.3-8-a-3.js",
+ "description": "JSON.stringify treats an null space argument the same as a missing space argument.",
+ "test": "assertTrue((function testcase() {\n var obj = {a1: {b1: [1,2,3,4], b2: {c1: 1, c2: 2}},a2: 'a2'};\n return JSON.stringify(obj)=== JSON.stringify(obj,null, null);\n }).call(this));\n",
+ "precondition": "(JSON && fnExists(JSON.stringify))"
+ },
+ {
+ "id": "15.12.3-8-a-4",
+ "path": "TestCases/chapter15/15.12/15.12.3/15.12.3-8-a-4.js",
+ "description": "JSON.stringify treats an Boolean wrapper space argument the same as a missing space argument.",
+ "test": "assertTrue((function testcase() {\n var obj = {a1: {b1: [1,2,3,4], b2: {c1: 1, c2: 2}},a2: 'a2'};\n return JSON.stringify(obj)=== JSON.stringify(obj,null, new Boolean(true));\n }).call(this));\n",
+ "precondition": "(JSON && fnExists(JSON.stringify))"
+ },
+ {
+ "id": "15.12.3-8-a-5",
+ "path": "TestCases/chapter15/15.12/15.12.3/15.12.3-8-a-5.js",
+ "description": "JSON.stringify treats non-Number or String object space arguments the same as a missing space argument.",
+ "test": "assertTrue((function testcase() {\n var obj = {a1: {b1: [1,2,3,4], b2: {c1: 1, c2: 2}},a2: 'a2'};\n return JSON.stringify(obj)=== JSON.stringify(obj,null, obj);\n }).call(this));\n",
+ "precondition": "(JSON && fnExists(JSON.stringify))"
+ },
+ {
+ "id": "15.12.3_2-2-b-i-1",
+ "path": "TestCases/chapter15/15.12/15.12.3/15.12.3_2-2-b-i-1.js",
+ "description": "JSON.stringify converts string wrapper objects returned from a toJSON call to literal strings.",
+ "test": "assertTrue((function testcase() {\n var obj = {\n prop:42,\n toJSON: function () {return 'fortytwo objects'}\n };\n return JSON.stringify([obj]) === '[\"fortytwo objects\"]';\n }).call(this));\n",
+ "precondition": "(JSON && fnExists(JSON.stringify))"
+ },
+ {
+ "id": "15.12.3_2-2-b-i-2",
+ "path": "TestCases/chapter15/15.12/15.12.3/15.12.3_2-2-b-i-2.js",
+ "description": "JSON.stringify converts Number wrapper objects returned from a toJSON call to literal Number.",
+ "test": "assertTrue((function testcase() {\n var obj = {\n prop:42,\n toJSON: function () {return new Number(42)}\n };\n return JSON.stringify([obj]) === '[42]';\n }).call(this));\n",
+ "precondition": "(JSON && fnExists(JSON.stringify))"
+ },
+ {
+ "id": "15.12.3_2-2-b-i-3",
+ "path": "TestCases/chapter15/15.12/15.12.3/15.12.3_2-2-b-i-3.js",
+ "description": "JSON.stringify converts Boolean wrapper objects returned from a toJSON call to literal Boolean values.",
+ "test": "assertTrue((function testcase() {\n var obj = {\n prop:42,\n toJSON: function () {return new Boolean(true)}\n };\n return JSON.stringify([obj]) === '[true]';\n }).call(this));\n",
+ "precondition": "(JSON && fnExists(JSON.stringify))"
+ },
+ {
+ "id": "15.12.3_2-3-a-1",
+ "path": "TestCases/chapter15/15.12/15.12.3/15.12.3_2-3-a-1.js",
+ "description": "JSON.stringify converts string wrapper objects returned from replacer functions to literal strings.",
+ "test": "assertTrue((JSON.stringify([42], function(k,v) {return v===42? new String('fortytwo'):v}) === '[\"fortytwo\"]'));\n",
+ "precondition": "(JSON && fnExists(JSON.stringify))"
+ },
+ {
+ "id": "15.12.3_2-3-a-2",
+ "path": "TestCases/chapter15/15.12/15.12.3/15.12.3_2-3-a-2.js",
+ "description": "JSON.stringify converts Number wrapper objects returned from replacer functions to literal numbers.",
+ "test": "assertTrue((JSON.stringify([42], function(k,v) {return v===42? new Number(84):v}) === '[84]'));\n",
+ "precondition": "(JSON && fnExists(JSON.stringify))"
+ },
+ {
+ "id": "15.12.3_2-3-a-3",
+ "path": "TestCases/chapter15/15.12/15.12.3/15.12.3_2-3-a-3.js",
+ "description": "JSON.stringify converts Boolean wrapper objects returned from replacer functions to literal numbers.",
+ "test": "assertTrue((JSON.stringify([42], function(k,v) {return v===42? new Boolean(false):v}) === '[false]'));\n",
+ "precondition": "(JSON && fnExists(JSON.stringify))"
+ },
+ {
+ "id": "15.12.3_4-1-1",
+ "path": "TestCases/chapter15/15.12/15.12.3/15.12.3_4-1-1.js",
+ "description": "JSON.stringify a circular object throws a error",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n obj.prop = obj;\n try {\n JSON.stringify(obj);\n return false; // should not reach here\n }\n catch (e) {return true}\n }).call(this));\n",
+ "precondition": "(JSON && fnExists(JSON.stringify))"
+ },
+ {
+ "id": "15.12.3_4-1-2",
+ "path": "TestCases/chapter15/15.12/15.12.3/15.12.3_4-1-2.js",
+ "description": "JSON.stringify a circular object throws a TypeError",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n obj.prop = obj;\n try {\n JSON.stringify(obj);\n return false; // should not reach here\n }\n catch (e) {return e.name==='TypeError'}\n }).call(this));\n",
+ "precondition": "(JSON && fnExists(JSON.stringify))"
+ },
+ {
+ "id": "15.12.3_4-1-3",
+ "path": "TestCases/chapter15/15.12/15.12.3/15.12.3_4-1-3.js",
+ "description": "JSON.stringify a indirectly circular object throws a error",
+ "test": "assertTrue((function testcase() {\n var obj = {p1: {p2: {}}};\n obj.p1.p2.prop = obj;\n try {\n JSON.stringify(obj);\n return false; // should not reach here\n }\n catch (e) {return true}\n }).call(this));\n",
+ "precondition": "(JSON && fnExists(JSON.stringify))"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.12.json b/website/resources/scripts/testcases2/15.12.json
new file mode 100644
index 000000000..c4e57b0b0
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.12.json
@@ -0,0 +1,36 @@
+{
+ "testCollection": {
+ "name": "15.12",
+ "numTests": 4,
+ "tests": [
+ {
+ "id": "15.12-0-1",
+ "path": "TestCases/chapter15/15.12/15.12-0-1.js",
+ "description": "JSON must be a built-in object",
+ "test": "assertTrue((function testcase() {\n var o = JSON;\n if (typeof(o) === \"object\") { \n return true;\n }\n }).call(this));\n",
+ "precondition": "(JSON !== undefined)"
+ },
+ {
+ "id": "15.12-0-2",
+ "path": "TestCases/chapter15/15.12/15.12-0-2.js",
+ "description": "JSON must not support the [[Construct]] method",
+ "test": "assertTrue((function testcase() {\n var o = JSON;\n\n try {\n var j = new JSON();\n }\n catch (e) {\n if (e instanceof TypeError) {\n return true;\n }\n }\n }).call(this));\n",
+ "precondition": "(JSON !== undefined)"
+ },
+ {
+ "id": "15.12-0-3",
+ "path": "TestCases/chapter15/15.12/15.12-0-3.js",
+ "description": "JSON must not support the [[Call]] method",
+ "test": "assertTrue((function testcase() {\n var o = JSON;\n\n try {\n var j = JSON();\n }\n catch (e) {\n if (e instanceof TypeError) {\n return true;\n }\n }\n }).call(this));\n",
+ "precondition": "(JSON !== undefined)"
+ },
+ {
+ "id": "15.12-0-4",
+ "path": "TestCases/chapter15/15.12/15.12-0-4.js",
+ "description": "JSON object's properties must be non enumerable",
+ "test": "assertTrue((function testcase() { \n var o = JSON;\n var i = 0;\n for (var p in o) {\n i++;\n }\n \n if (i === 0) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(JSON !== undefined)"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.1_The_Global_Object.json b/website/resources/scripts/testcases2/15.1_The_Global_Object.json
new file mode 100644
index 000000000..94e825d07
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.1_The_Global_Object.json
@@ -0,0 +1,29 @@
+{
+ "testCollection": {
+ "name": "15.1_The_Global_Object",
+ "numTests": 3,
+ "tests": [
+ {
+ "section": "15.1",
+ "description": "It is not possible to use the global object as a constructor\nwith the new operator",
+ "negative": "",
+ "test": "new this;\n",
+ "id": "S15.1_A1_T1"
+ },
+ {
+ "section": "15.1",
+ "description": "It is not possible to use the global object as a constructor\nwith the new operator",
+ "negative": "",
+ "test": "new this();\n",
+ "id": "S15.1_A1_T2"
+ },
+ {
+ "section": "15.1",
+ "description": "It is not possible to invoke the global object as a function",
+ "negative": "",
+ "test": "this();\n",
+ "id": "S15.1_A2_T1"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.2.1_The_Object_Constructor_Called_as_a_Function.json b/website/resources/scripts/testcases2/15.2.1_The_Object_Constructor_Called_as_a_Function.json
new file mode 100644
index 000000000..e1d899f77
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.2.1_The_Object_Constructor_Called_as_a_Function.json
@@ -0,0 +1,140 @@
+{
+ "testCollection": {
+ "name": "15.2.1_The_Object_Constructor_Called_as_a_Function",
+ "numTests": 22,
+ "tests": [
+ {
+ "section": "15.2.1.1, 15.2.2.1",
+ "description": "Creating Object(null) and checking its properties",
+ "test": "var __obj = Object(null);\n\nvar n__obj = new Object(null); \n\nif (__obj.toString() !== n__obj.toString()){\n\t$ERROR('#1');\t\n}\n\nif (__obj.constructor !== n__obj.constructor) {\n\t$ERROR('#2');\n}\n\nif (__obj.prototype !== n__obj.prototype) {\n\t$ERROR('#3');\n}\t\n\nif (__obj.toLocaleString() !== n__obj.toLocaleString()) {\n\t$ERROR('#4');\n}\n\nif (typeof __obj !== typeof n__obj) {\n\t$ERROR('#5');\n}\n",
+ "id": "S15.2.1.1_A1_T1"
+ },
+ {
+ "section": "15.2.1.1, 15.2.2.1",
+ "description": "Creating Object(void 0) and checking its properties",
+ "test": "//var y= void 0;\n\nvar __obj = Object(void 0);\n\nvar n__obj = new Object(void 0);\n\n\nif (__obj.toString() !== n__obj.toString()){\n\t$ERROR('#1');\t\n}\n\nif (__obj.constructor !== n__obj.constructor) {\n\t$ERROR('#2');\n}\n\nif (__obj.prototype !== n__obj.prototype) {\n\t$ERROR('#3');\n}\t\n\nif (__obj.toLocaleString() !== n__obj.toLocaleString()) {\n\t$ERROR('#4');\n}\n\nif (typeof __obj !== typeof n__obj) {\n\t$ERROR('#5');\n}\n",
+ "id": "S15.2.1.1_A1_T2"
+ },
+ {
+ "section": "15.2.1.1, 15.2.2.1",
+ "description": "Creating Object() and checking its properties",
+ "test": "var __obj = Object();\n\nvar n__obj = new Object();\n \nif (__obj.toString() !== n__obj.toString()){\n\t$ERROR('#1');\t\n}\n\nif (__obj.constructor !== n__obj.constructor) {\n\t$ERROR('#2');\n}\n\nif (__obj.prototype !== n__obj.prototype) {\n\t$ERROR('#3');\n}\t\n\nif (__obj.toLocaleString() !== n__obj.toLocaleString()) {\n\t$ERROR('#4');\n}\n\nif (typeof __obj !== typeof n__obj) {\n\t$ERROR('#5');\n}\n",
+ "id": "S15.2.1.1_A1_T3"
+ },
+ {
+ "section": "15.2.1.1, 15.2.2.1",
+ "description": "Creating Object(undefined) and checking its properties",
+ "test": "var __obj = Object(undefined);\n\nvar n__obj = new Object(undefined); \n\nif (__obj.toString() !== n__obj.toString()){\n\t$ERROR('#1');\t\n}\n\nif (__obj.constructor !== n__obj.constructor) {\n\t$ERROR('#2');\n}\n\nif (__obj.prototype !== n__obj.prototype) {\n\t$ERROR('#3');\n}\t\n\nif (__obj.toLocaleString() !== n__obj.toLocaleString()) {\n\t$ERROR('#4');\n}\n\nif (typeof __obj !== typeof n__obj) {\n\t$ERROR('#5');\n}\n",
+ "id": "S15.2.1.1_A1_T4"
+ },
+ {
+ "section": "15.2.1.1, 15.2.2.1",
+ "description": "Creating Object(x) and checking its properties",
+ "test": "var __obj = Object(x);\n\nvar n__obj = new Object(x); \n\nif (__obj.toString() !== n__obj.toString()){\n\t$ERROR('#1');\t\n}\n\nif (__obj.constructor !== n__obj.constructor) {\n\t$ERROR('#2');\n}\n\nif (__obj.prototype !== n__obj.prototype) {\n\t$ERROR('#3');\n}\t\n\nif (__obj.toLocaleString() !== n__obj.toLocaleString()) {\n\t$ERROR('#4');\n}\n\nif (typeof __obj !== typeof n__obj) {\n\t$ERROR('#5');\n}\n\nvar x;\n",
+ "id": "S15.2.1.1_A1_T5"
+ },
+ {
+ "section": "15.2.1.1",
+ "description": "Calling Object function with boolean argument value",
+ "test": "var bool = true;\n\nif(typeof bool !== 'boolean'){\n $FAIL('#1: bool should be boolean primitive');\n}\n\nvar obj = Object(bool);\n\nif (obj.constructor !== Boolean) {\n $ERROR('#2: Object(true) returns ToObject(true)');\n}\n\nif (typeof obj !== \"object\") {\n $ERROR('#3: Object(true) returns ToObject(true)');\n}\n\nif (!obj) {\n $ERROR('#4: Object(true) returns ToObject(true)');\n}\n\nif (obj === true) {\n $ERROR('#5: Object(true) returns ToObject(true)');\n}\n",
+ "id": "S15.2.1.1_A2_T1"
+ },
+ {
+ "section": "15.2.1.1",
+ "description": "Calling Object function with array of numbers as argument value",
+ "test": "var arr = [1,2,3];\n\n//CHECK#1\nif (typeof arr !== 'object') {\n $ERROR('#1: arr = [1,2,3] is NOT an object');\n}\n\nvar n_obj = Object(arr);\n\narr.push(4);\n\n//CHECK#2\nif ((n_obj !== arr)||(n_obj[3]!==4)) {\n $ERROR('#2: Object([1,2,3]) returns ToObject([1,2,3])');\n}\n\n\n\n",
+ "id": "S15.2.1.1_A2_T10"
+ },
+ {
+ "section": "15.2.1.1",
+ "description": "Calling Object function with function declaration as argument value",
+ "test": "//CHECK#1\nif (typeof func !== 'undefined') {\n $ERROR('#1: function expression can\\'t be declarated');\n}\n\nvar n_obj = Object(function func(){return 1;});\n\n//CHECK#2\nif ((n_obj.constructor !== Function)||(n_obj()!==1)) {\n $ERROR('#2: Object(function func(){return 1;}) returns function');\n}\n\n//CHECK#3\nif (typeof func !== 'undefined') {\n $ERROR('#3: function expression can\\'t be declarated');\n}\n\n",
+ "id": "S15.2.1.1_A2_T11"
+ },
+ {
+ "section": "15.2.1.1",
+ "description": "Calling Object function with numeric expression as argument value",
+ "test": "var obj = Object(1.1*([].length+{q:1}[\"q\"]));\n\n//CHECK#2\nif (typeof obj !== \"object\") {\n $ERROR('#2: Object(expression) returns ToObject(expression)');\n}\n\n//CHECK#3\nif (obj.constructor !== Number) {\n $ERROR('#3: Object(expression) returns ToObject(expression)');\n}\n\n//CHECK#4\nif ((obj != 1.1)||(obj === 1.1)) {\n $ERROR('#4: Object(expression) returns ToObject(expression)');\n}\n//\n",
+ "id": "S15.2.1.1_A2_T12"
+ },
+ {
+ "section": "15.2.1.1",
+ "description": "Calling Object function with boolean expression as argument value",
+ "test": "var obj = Object((1===1)&&(!false));\n\n//CHECK#1\nif (obj.constructor !== Boolean) {\n $ERROR('#1: Object(expression) returns ToObject(expression)');\n}\n\n//CHECK#1.1\nif (typeof obj !== \"object\") {\n $ERROR('#1.1: Object(expression) returns ToObject(expression)');\n}\n\n//CHECK#2\nif (!(obj)) {\n $ERROR('#2: Object(expression) returns ToObject(expression)');\n}\n\n//CHECK#3\nif (obj===true) {\n $ERROR('#3: Object(expression) returns ToObject(expression)');\n}\n",
+ "id": "S15.2.1.1_A2_T13"
+ },
+ {
+ "section": "15.2.1.1",
+ "description": "Calling Object function with sum of empty string and a number as argument value",
+ "test": "var obj = Object(\"\"+1);\n\n//CHECK#2\nif (obj.constructor !== String) {\n $ERROR('#2: Object(expression) returns ToObject(expression)');\n}\n\n//CHECK#3\nif (typeof obj !== \"object\") {\n $ERROR('#3: Object(expression) returns ToObject(expression)');\n}\n\n//CHECK#4\nif ((obj != \"1\")||(obj === \"1\")) {\n $ERROR('#4: Object(expression) returns ToObject(expression)');\n}\n",
+ "id": "S15.2.1.1_A2_T14"
+ },
+ {
+ "section": "15.2.1.1",
+ "description": "Calling Object function with number argument value",
+ "test": "var num = 1.1;\n\n// CHECK#1\nif(typeof num !== 'number'){\n $ERROR('#1: num = 1.1 should be Number primitive');\n}\n\nvar obj = Object(num);\n\n//CHECK#2\nif (typeof obj !== \"object\") {\n $ERROR('#2: Object(1.1) returns ToObject(1.1)');\n}\n\n//CHECK#3\nif (obj.constructor !== Number) {\n $ERROR('#3: Object(1.1) returns ToObject(1.1)');\n}\n\n//CHECK#4\nif ((obj != 1.1)||(obj === 1.1)) {\n $ERROR('#4: Object(1.1) returns ToObject(1.1)');\n}\n//\n",
+ "id": "S15.2.1.1_A2_T2"
+ },
+ {
+ "section": "15.2.1.1",
+ "description": "Calling Object function with string argument value",
+ "test": "var str = 'Luke Skywalker';\n\n// CHECK#1\nif (typeof str !== 'string') {\n $ERROR('#1: \"Luke Skywalker\" should be a String primitive');\n}\n\nvar obj = Object(str);\n\n//CHECK#2\nif (obj.constructor !== String) {\n $ERROR('#2: Object(\"Luke Skywalker\") returns ToObject(\"Luke Skywalker\")');\n}\n\n//CHECK#3\nif (typeof obj !== \"object\") {\n $ERROR('#3: Object(\"Luke Skywalker\") returns ToObject(\"Luke Skywalker\")');\n}\n\n//CHECK#4\nif ((obj != \"Luke Skywalker\")||(obj === \"Luke Skywalker\")) {\n $ERROR('#4: Object(\"Luke Skywalker\") returns ToObject(\"Luke Skywalker\")');\n}\n",
+ "id": "S15.2.1.1_A2_T3"
+ },
+ {
+ "section": "15.2.1.1",
+ "description": "Calling Object function with object argument value",
+ "test": "var obj = {flag:true};\n\n//CHECK#1\nif (typeof(obj) !== 'object') {\n $FAIL('#1: obj = {flag:true} should be an Object');\n}\n\nvar n_obj = Object(obj);\n\n//CHECK#2\nif ((n_obj !== obj)||(!(n_obj['flag']))) {\n $ERROR('#2: Object({flag:true}) returns ToObject({flag:true})');\n}\n\n",
+ "id": "S15.2.1.1_A2_T4"
+ },
+ {
+ "section": "15.2.1.1",
+ "description": "Calling Object function with NaN argument value",
+ "test": "var num = NaN;\n\n// CHECK#1\nif(typeof num !== 'number'){\n $ERROR('#1: num = NaN should have number type');\n}\n\nvar obj = Object(num);\n\n//CHECK#2\nif (obj.constructor !== Number) {\n $ERROR('#2: Object(NaN) returns ToObject(NaN)');\n}\n\n//CHECK#3\nif (typeof obj!==\"object\") {\n $ERROR('#2: Object(NaN) returns ToObject(NaN)');\n}\n//\n",
+ "id": "S15.2.1.1_A2_T5"
+ },
+ {
+ "section": "15.2.1.1",
+ "description": "Calling Object function with Infinity argument value",
+ "test": "var num = Infinity;\n\n// CHECK#1\nif(typeof num !== 'number'){\n $ERROR('#1: num = Infinity should be a Number primitive');\n}\n\nvar obj = Object(num);\n\n//CHECK#2\nif (obj.constructor !== Number) {\n $ERROR('#2: Object(Infinity) returns ToObject(Infinity)');\n}\n\n//CHECK#3\nif (typeof obj!==\"object\") {\n $ERROR('#3: Object(Infinity) returns ToObject(Infinity)');\n}\n\n//CHECK#4\nif ((obj != Infinity)||(obj === Infinity)) {\n $ERROR('#4: Object(Infinity) returns ToObject(Infinity)');\n}\n\n",
+ "id": "S15.2.1.1_A2_T6"
+ },
+ {
+ "section": "15.2.1.1",
+ "description": "Calling Object function with empty string argument value",
+ "test": "var str = '';\n\n// CHECK#1\nif (typeof(str) !== 'string') {\n $FAIL('#1: \"\" is NOT a String');\n}\n\nvar obj = Object(str);\n\n//CHECK#2\nif (obj.constructor !== String) {\n $ERROR('#2: Object(\"\") returns ToObject(\"\")');\n}\n\n//CHECK#3\nif (typeof obj !== \"object\") {\n $ERROR('#3: Object(\"\") returns ToObject(\"\")');\n}\n\n//CHECK#4\nif ((obj != \"\")||(obj === \"\")) {\n $ERROR('#4: Object(\"\") returns ToObject(\"\")');\n}\n",
+ "id": "S15.2.1.1_A2_T7"
+ },
+ {
+ "section": "15.2.1.1",
+ "description": "Calling Object function with function variable argument value",
+ "test": "var func = function(){return 1;};\n\n//CHECK#1\nif (typeof func !== 'function') {\n $ERROR('#1: func = function(){return 1;} is NOT an function');\n}\n\nvar n_obj = Object(func);\n\n//CHECK#2\nif ((n_obj !== func)||(n_obj()!==1)) {\n $ERROR('#2: Object(function) returns function');\n}\n\n",
+ "id": "S15.2.1.1_A2_T8"
+ },
+ {
+ "section": "15.2.1.1",
+ "description": "Calling Object function with function argument value. The function is declared",
+ "test": "//CHECK#1\nif (typeof func !== 'function') {\n $ERROR('#1: func = function(){return 1;} is NOT an function');\n}\n\nvar n_obj = Object(func);\n\n//CHECK#2\nif ((n_obj !== func)||(n_obj()!==1)) {\n $ERROR('#2: Object(function) returns function');\n}\n\nfunction func(){return 1;};\n\n",
+ "id": "S15.2.1.1_A2_T9"
+ },
+ {
+ "section": "15.2.1.1",
+ "description": "Creating an object with \"Object(1,2,3)\"",
+ "test": "var obj = Object(1,2,3);\n\n//CHECK#1\nif (obj.constructor !== Number) {\n $ERROR('#1: Since Object as a function calling is the same as function calling list of arguments can appears in braces;');\n}\n\n//CHECK#2\nif (typeof obj !== \"object\") {\n $ERROR('#2: Since Object as a function calling is the same as function calling list of arguments can appears in braces;');\n}\n\n//CHECK#3\nif ((obj != 1)||(obj === 1)) {\n $ERROR('3#: Since Object as a function calling is the same as function calling list of arguments can appears in braces;');\n}\n",
+ "id": "S15.2.1.1_A3_T1"
+ },
+ {
+ "section": "15.2.1.1",
+ "description": "Creating an object with \"Object(null,2,3)\"",
+ "test": "var obj = Object(null,2,3);\n\n//CHECK#1\nif (obj.constructor !== Object) {\n $ERROR('#1: Since Object as a function calling is the same as function calling list of arguments can appears in braces;');\n}\n\n//CHECK#2\nif (typeof obj !== \"object\") {\n $ERROR('#2: Since Object as a function calling is the same as function calling list of arguments can appears in braces;');\n}\n",
+ "id": "S15.2.1.1_A3_T2"
+ },
+ {
+ "section": "15.2.1.1",
+ "description": "Creating an object with \"Object((null,2,3),1,2)\"",
+ "test": "var obj = Object((null,2,3),1,2);\n\n//CHECK#1\nif (obj.constructor !== Number) {\n $ERROR('#1: Since Object as a function calling is the same as function calling list of arguments can appears in braces;');\n}\n\n//CHECK#2\nif (typeof obj !== \"object\") {\n $ERROR('#2: Since Object as a function calling is the same as function calling list of arguments can appears in braces;');\n}\n\n//CHECK#3\nif ((obj != 3)||(obj === 3)) {\n $ERROR('3#: Since Object as a function calling is the same as function calling list of arguments can appears in braces;');\n}\n",
+ "id": "S15.2.1.1_A3_T3"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.2.2_The_Object_Constructor.json b/website/resources/scripts/testcases2/15.2.2_The_Object_Constructor.json
new file mode 100644
index 000000000..4ee3017bc
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.2.2_The_Object_Constructor.json
@@ -0,0 +1,158 @@
+{
+ "testCollection": {
+ "name": "15.2.2_The_Object_Constructor",
+ "numTests": 25,
+ "tests": [
+ {
+ "section": "15.2.2.1",
+ "description": "Creating new Object() and checking its properties",
+ "test": "var obj = new Object();\n\n// CHECK#0\nif (obj === undefined) {\n $ERROR('#0: new Object() return the newly created native object.');\n}\n\n// CHECK#1\nif (obj.constructor !== Object) {\n $ERROR('#1: new Object() create a new native ECMAScript object');\n}\n\n// CHECK#2\nif (!(Object.prototype.isPrototypeOf(obj))) {\n $ERROR('#2: when new Object() calls the [[Prototype]] property of the newly constructed object is set to the Object prototype object.');\n}\n\n// CHECK#3\nvar to_string_result = '[object '+ 'Object' +']';\nif (obj.toString() !== to_string_result) {\n $ERROR('#3: when new Object() calls the [[Class]] property of the newly constructed object is set to \"Object\".');\n}\n\n// CHECK#4\nif (obj.valueOf().toString() !== to_string_result.toString()) {\n $ERROR('#4: when new Object() calls the newly constructed object has no [[Value]] property.');\n}\n\n",
+ "id": "S15.2.2.1_A1_T1"
+ },
+ {
+ "section": "15.2.2.1",
+ "description": "Creating new Object(void 0) and checking its properties",
+ "test": "//var foo = void 0;\nvar obj = new Object(void 0);\n\n// CHECK#0\nif (obj === undefined) {\n $ERROR('#0: new Object(undefined) return the newly created native object.');\n}\n\n// CHECK#1\nif (obj.constructor !== Object) {\n $ERROR('#1: new Object(undefined) create a new native ECMAScript object');\n}\n\n// CHECK#2\nif (!(Object.prototype.isPrototypeOf(obj))) {\n $ERROR('#2: when new Object(undefined) calls the [[Prototype]] property of the newly constructed object is set to the Object prototype object.');\n}\n\n// CHECK#3\nvar to_string_result = '[object '+ 'Object' +']';\nif (obj.toString() !== to_string_result) {\n $ERROR('#3: when new Object(undefined) calls the [[Class]] property of the newly constructed object is set to \"Object\".');\n}\n\n// CHECK#4\nif (obj.valueOf().toString() !== to_string_result.toString()) {\n $ERROR('#4: when new Object(undefined) calls the newly constructed object has no [[Value]] property.');\n}\n\n",
+ "id": "S15.2.2.1_A1_T2"
+ },
+ {
+ "section": "15.2.2.1",
+ "description": "Creating new Object(null) and checking its properties",
+ "test": "var obj = new Object(null);\n\n// CHECK#0\nif (obj === undefined) {\n $ERROR('#0: new Object(null) return the newly created native object.');\n}\n\n// CHECK#1\nif (obj.constructor !== Object) {\n $ERROR('#1: new Object(null) create a new native ECMAScript object');\n}\n\n// CHECK#2\nif (!(Object.prototype.isPrototypeOf(obj))) {\n $ERROR('#2: when new Object(null) calls the [[Prototype]] property of the newly constructed object is set to the Object prototype object.');\n}\n\n// CHECK#3\nvar to_string_result = '[object '+ 'Object' +']';\nif (obj.toString() !== to_string_result) {\n $ERROR('#3: when new Object(null) calls the [[Class]] property of the newly constructed object is set to \"Object\".');\n}\n\n// CHECK#4\nif (obj.valueOf().toString() !== to_string_result.toString()) {\n $ERROR('#4: when new Object(null) calls the newly constructed object has no [[Value]] property.');\n}\n\n",
+ "id": "S15.2.2.1_A1_T3"
+ },
+ {
+ "section": "15.2.2.1",
+ "description": "Creating new Object(undefined) and checking its properties",
+ "test": "var obj = new Object(undefined);\n\n// CHECK#0\nif (obj === undefined) {\n $ERROR('#0: new Object(undefined) return the newly created native object.');\n}\n\n// CHECK#1\nif (obj.constructor !== Object) {\n $ERROR('#1: new Object(undefined) create a new native ECMAScript object');\n}\n\n// CHECK#2\nif (!(Object.prototype.isPrototypeOf(obj))) {\n $ERROR('#2: when new Object(undefined) calls the [[Prototype]] property of the newly constructed object is set to the Object prototype object.');\n}\n\n// CHECK#3\nvar to_string_result = '[object '+ 'Object' +']';\nif (obj.toString() !== to_string_result) {\n $ERROR('#3: when new Object(undefined) calls the [[Class]] property of the newly constructed object is set to \"Object\".');\n}\n\n// CHECK#4\nif (obj.valueOf().toString() !== to_string_result.toString()) {\n $ERROR('#4: when new Object(undefined) calls the newly constructed object has no [[Value]] property.');\n}\n\n",
+ "id": "S15.2.2.1_A1_T4"
+ },
+ {
+ "section": "15.2.2.1",
+ "description": "Creating new Object(x), where x is \"undefined\", and checking it properties",
+ "test": "var obj = new Object(x);\n\n// CHECK#0\nif (obj === undefined) {\n $ERROR('#0: new Object(undefined) return the newly created native object.');\n}\n\n// CHECK#1\nif (obj.constructor !== Object) {\n $ERROR('#1: new Object(undefined) create a new native ECMAScript object');\n}\n\n// CHECK#2\nif (!(Object.prototype.isPrototypeOf(obj))) {\n $ERROR('#2: when new Object(undefined) calls the [[Prototype]] property of the newly constructed object is set to the Object prototype object.');\n}\n\n// CHECK#3\nvar to_string_result = '[object '+ 'Object' +']';\nif (obj.toString() !== to_string_result) {\n $ERROR('#3: when new Object(undefined) calls the [[Class]] property of the newly constructed object is set to \"Object\".');\n}\n\n// CHECK#4\nif (obj.valueOf().toString() !== to_string_result.toString()) {\n $ERROR('#4: when new Object(undefined) calls the newly constructed object has no [[Value]] property.');\n}\n\nvar x;\n\n",
+ "id": "S15.2.2.1_A1_T5"
+ },
+ {
+ "section": "15.2.2.1",
+ "description": "The value is Object",
+ "test": "var obj = {prop:1};\n\nvar n_obj = new Object(obj);\n\n//CHECK#1\nif (n_obj !== obj) {\n $ERROR('#1: When the Object constructor is called and if the value is an Object simply value returns.');\n}\n\n//CHECK#2\nif (n_obj['prop'] !== 1) {\n $ERROR('#2: When the Object constructor is called and if the value is an Object simply value returns.');\n}\n",
+ "id": "S15.2.2.1_A2_T1"
+ },
+ {
+ "section": "15.2.2.1",
+ "description": "The value is a function variable",
+ "test": "var func = function(){return 1;};\n\nvar n_obj = new Object(func);\n\n//CHECK#1\nif (n_obj !== func) {\n $ERROR('#1: When the Object constructor is called and if the value is an Object simply value returns');\n}\n\n//CHECK#2\nif (n_obj() !== 1) {\n $ERROR('When the Object constructor is called and if the value is an Object simply value returns');\n}\n//\n",
+ "id": "S15.2.2.1_A2_T2"
+ },
+ {
+ "section": "15.2.2.1",
+ "description": "The value is an array",
+ "test": "var arr = [1,2,3];\n\nvar n_obj = new Object(arr);\n\narr.push(4);\n\n//CHECK#1\nif (n_obj !== arr) {\n $ERROR('#1: When the Object constructor is called and if the value is an Object simply value returns.');\n}\n\n//CHECK#2\nif (n_obj[3] !== 4) {\n $ERROR('#2: When the Object constructor is called and if the value is an Object simply value returns.');\n}\n",
+ "id": "S15.2.2.1_A2_T3"
+ },
+ {
+ "section": "15.2.2.1",
+ "description": "The value is \"this\"",
+ "test": "var x=1;\n\nvar obj = this;\n\nvar n_obj = new Object(obj);\n\n//CHECK#1\nif (n_obj !== obj) {\n $ERROR('#1: When the Object constructor is called and if the value is an Object simply value returns.');\n}\n\n//CHECK#2\nif (n_obj['x'] !== 1) {\n $ERROR('#2: When the Object constructor is called and if the value is an Object simply value returns.');\n}\n",
+ "id": "S15.2.2.1_A2_T4"
+ },
+ {
+ "section": "15.2.2.1",
+ "description": "The value is a Date object",
+ "test": "var obj = new Date(1978,3);\n\nvar n_obj = new Object(obj);\n\n//CHECK#1\nif (n_obj !== obj) {\n $ERROR('#1: When the Object constructor is called and if the value is an Object simply value returns.');\n}\n\n//CHECK#2\nif ((n_obj.getYear() !== 78)||(n_obj.getMonth() !== 3)) {\n $ERROR('#2: When the Object constructor is called and if the value is an Object simply value returns.');\n}\n",
+ "id": "S15.2.2.1_A2_T5"
+ },
+ {
+ "section": "15.2.2.1",
+ "description": "The value is a declared function",
+ "test": "var n_obj = new Object(func);\n\n//CHECK#1\nif (n_obj !== func) {\n $ERROR('#1: When the Object constructor is called and if the value is an Object simply value returns');\n}\n\n//CHECK#2\nif (n_obj() !== 1) {\n $ERROR('When the Object constructor is called and if the value is an Object simply value returns');\n}\n\nfunction func(){return 1;};\n",
+ "id": "S15.2.2.1_A2_T6"
+ },
+ {
+ "section": "15.2.2.1",
+ "description": "The value is a function declaration",
+ "test": "//CHECK#0\nif (typeof func !== 'undefined') {\n $ERROR('#0: function expression can\\'t be declarated');\n}\n\nvar n_obj = new Object(function func(){return 1;});\n\n//CHECK#1\nif (n_obj.constructor !== Function) {\n $ERROR('#1: When the Object constructor is called and if the value is an Object simply value returns');\n}\n\n//CHECK#2\nif (n_obj() !== 1) {\n $ERROR('#2: When the Object constructor is called and if the value is an Object simply value returns');\n}\n\n//CHECK#3\nif (typeof func !== 'undefined') {\n $ERROR('#3: function expression can\\'t be declarated');\n}\n\n",
+ "id": "S15.2.2.1_A2_T7"
+ },
+ {
+ "section": "15.2.2.1, 8.6",
+ "description": "Argument value is a nonempty string",
+ "test": "var str = 'Obi-Wan Kenobi';\n\n//CHECK#1\nif (typeof str !== 'string') {\n $FAIL('#1: \"Obi-Wan Kenobi\" is NOT a String');\n}\n\n\nvar n_obj = new Object(str);\n\n//CHECK#2\nif (n_obj.constructor !== String) {\n $ERROR('#2: When the Object constructor is called with String argument return ToObject(string)');\n}\n\n//CHECK#3\nif (typeof n_obj !== 'object') {\n $ERROR('#3: When the Object constructor is called with String argument return ToObject(string)');\n}\n\n//CHECK#4\nif ( n_obj != str) {\n $ERROR('#4: When the Object constructor is called with String argument return ToObject(string)');\n}\n\n//CHECK#5\nif ( n_obj === str) {\n $ERROR('#5: When the Object constructor is called with String argument return ToObject(string)');\n}\n\n",
+ "id": "S15.2.2.1_A3_T1"
+ },
+ {
+ "section": "15.2.2.1, 8.6",
+ "description": "Argument value is an empty string",
+ "test": "var str = '';\n\n//CHECK#1\nif (typeof str !== 'string') {\n $FAIL('#1: \"\" is NOT a String');\n}\n\nvar n_obj = new Object(str);\n\n//CHECK#2\nif (n_obj.constructor !== String) {\n $ERROR('#2: When the Object constructor is called with String argument return ToObject(string)');\n}\n\n//CHECK#3\nif (typeof n_obj !== 'object') {\n $ERROR('#3: When the Object constructor is called with String argument return ToObject(string)');\n}\n\n//CHECK#4\nif ( n_obj != str) {\n $ERROR('#4: When the Object constructor is called with String argument return ToObject(string)');\n}\n\n//CHECK#5\nif ( n_obj === str) {\n $ERROR('#5: When the Object constructor is called with String argument return ToObject(string)');\n}\n",
+ "id": "S15.2.2.1_A3_T2"
+ },
+ {
+ "section": "15.2.2.1, 8.6",
+ "description": "Argument value is sum of empty string and number",
+ "test": "var n_obj = new Object(\"\"+1);\n\n//CHECK#2\nif (n_obj.constructor !== String) {\n $ERROR('#2: When the Object constructor is called with String argument return ToObject(string)');\n}\n\n//CHECK#3\nif (typeof n_obj !== 'object') {\n $ERROR('#3: When the Object constructor is called with String argument return ToObject(string)');\n}\n\n//CHECK#4\nif ( n_obj != \"1\") {\n $ERROR('#4: When the Object constructor is called with String argument return ToObject(string)');\n}\n\n//CHECK#5\nif ( n_obj === \"1\") {\n $ERROR('#5: When the Object constructor is called with String argument return ToObject(string)');\n}\n",
+ "id": "S15.2.2.1_A3_T3"
+ },
+ {
+ "section": "15.2.2.1, 8.6",
+ "description": "Argument value is \"true\"",
+ "test": "var bool = true;\n\n//CHECK#1\nif (typeof bool !== 'boolean') {\n $FAIL('#1: true is NOT a boolean');\n}\n\nvar n_obj = new Object(bool);\n\n//CHECK#2\nif (n_obj.constructor !== Boolean) {\n $ERROR('#2: When the Object constructor is called with Boolean argument return ToObject(boolean)');\n}\n\n//CHECK#3\nif (typeof n_obj !== 'object') {\n $ERROR('#3: When the Object constructor is called with Boolean argument return ToObject(boolean)');\n}\n\n//CHECK#4\nif ( n_obj != bool) {\n $ERROR('#4: When the Object constructor is called with Boolean argument return ToObject(boolean)');\n}\n\n//CHECK#5\nif ( n_obj === bool) {\n $ERROR('#5: When the Object constructor is called with Boolean argument return ToObject(boolean)');\n}\n",
+ "id": "S15.2.2.1_A4_T1"
+ },
+ {
+ "section": "15.2.2.1, 8.6",
+ "description": "Argument value is \"false\"",
+ "test": "var bool = false;\n\n//CHECK#1\nif (typeof bool !== 'boolean') {\n $FAIL('#1: false is NOT a boolean');\n}\n\nvar n_obj = new Object(bool);\n\n//CHECK#2\nif (n_obj.constructor !== Boolean) {\n $ERROR('#2: When the Object constructor is called with Boolean argument return ToObject(boolean)');\n}\n\n//CHECK#3\nif (typeof n_obj !== 'object') {\n $ERROR('#3: When the Object constructor is called with Boolean argument return ToObject(boolean)');\n}\n\n//CHECK#4\nif ( n_obj != bool) {\n $ERROR('#4: When the Object constructor is called with Boolean argument return ToObject(boolean)');\n}\n\n//CHECK#5\nif ( n_obj === bool) {\n $ERROR('#5: When the Object constructor is called with Boolean argument return ToObject(boolean)');\n}\n",
+ "id": "S15.2.2.1_A4_T2"
+ },
+ {
+ "section": "15.2.2.1, 8.6",
+ "description": "Argument value is boolean expression",
+ "test": "var n_obj = new Object((1===1)&&!(false));\n\n//CHECK#2\nif (n_obj.constructor !== Boolean) {\n $ERROR('#2: When the Object constructor is called with Boolean argument return ToObject(boolean)');\n}\n\n//CHECK#3\nif (typeof n_obj !== 'object') {\n $ERROR('#3: When the Object constructor is called with Boolean argument return ToObject(boolean)');\n}\n\n//CHECK#4\nif ( n_obj != true) {\n $ERROR('#4: When the Object constructor is called with Boolean argument return ToObject(boolean)');\n}\n\n//CHECK#5\nif ( n_obj === true) {\n $ERROR('#5: When the Object constructor is called with Boolean argument return ToObject(boolean)');\n}\n",
+ "id": "S15.2.2.1_A4_T3"
+ },
+ {
+ "section": "15.2.2.1, 8.6",
+ "description": "Argument value is any number",
+ "test": "var num = 1.0;\n\n//CHECK#1\nif (typeof num !== 'number') {\n $FAIL('#1: 1.0 is NOT a number');\n}\n\nvar n_obj = new Object(num);\n\n//CHECK#2\nif (n_obj.constructor !== Number) {\n $ERROR('#2: When the Object constructor is called with Number argument return ToObject(number)');\n}\n\n//CHECK#3\nif (typeof n_obj !== 'object') {\n $ERROR('#3: When the Object constructor is called with Number argument return ToObject(number)');\n}\n\n//CHECK#4\nif ( n_obj != num) {\n $ERROR('#4: When the Object constructor is called with Number argument return ToObject(number)');\n}\n\n//CHECK#5\nif ( n_obj === num) {\n $ERROR('#5: When the Object constructor is called with Number argument return ToObject(number)');\n}\n",
+ "id": "S15.2.2.1_A5_T1"
+ },
+ {
+ "section": "15.2.2.1, 8.6",
+ "description": "Argument value is NaN",
+ "test": "var num = NaN;\n\n//CHECK#1\nif (typeof num !== 'number') {\n $FAIL('#1: NaN is NOT a number');\n}\n\nvar n_obj = new Object(num);\n\n//CHECK#2\nif (n_obj.constructor !== Number) {\n $ERROR('#2: When the Object constructor is called with Number argument return ToObject(number)');\n}\n\n//CHECK#3\nif (typeof n_obj !== 'object') {\n $ERROR('#3: When the Object constructor is called with Number argument return ToObject(number)');\n}\n",
+ "id": "S15.2.2.1_A5_T2"
+ },
+ {
+ "section": "15.2.2.1, 8.6",
+ "description": "Argument value is Infinity",
+ "test": "var num = Infinity;\n\n//CHECK#1\nif (typeof num !== 'number') {\n $FAIL('#1: Infinity is NOT a number');\n}\n\nvar n_obj = new Object(num);\n\n//CHECK#2\nif (n_obj.constructor !== Number) {\n $ERROR('#2: When the Object constructor is called with Number argument return ToObject(number)');\n}\n\n//CHECK#3\nif (typeof n_obj !== 'object') {\n $ERROR('#3: When the Object constructor is called with Number argument return ToObject(number)');\n}\n\n//CHECK#4\nif ( n_obj != num) {\n $ERROR('#4: When the Object constructor is called with Number argument return ToObject(number)');\n}\n\n//CHECK#5\nif ( n_obj === num) {\n $ERROR('#5: When the Object constructor is called with Number argument return ToObject(number)');\n}\n",
+ "id": "S15.2.2.1_A5_T3"
+ },
+ {
+ "section": "15.2.2.1, 8.6",
+ "description": "Argument value is numeric expression",
+ "test": "var n_obj = new Object( 2*([].length + {q:1}[\"q\"]));\n\n//CHECK#2\nif (n_obj.constructor !== Number) {\n $ERROR('#2: When the Object constructor is called with Number argument return ToObject(number)');\n}\n\n//CHECK#3\nif (typeof n_obj !== 'object') {\n $ERROR('#3: When the Object constructor is called with Number argument return ToObject(number)');\n}\n\n//CHECK#4\nif ( n_obj != 2) {\n $ERROR('#4: When the Object constructor is called with Number argument return ToObject(number)');\n}\n\n//CHECK#5\nif ( n_obj === 2) {\n $ERROR('#5: When the Object constructor is called with Number argument return ToObject(number)');\n}\n",
+ "id": "S15.2.2.1_A5_T4"
+ },
+ {
+ "section": "15.2.2.1",
+ "description": "Creating an object with \"new Object(1,2,3)\"",
+ "test": "var obj = new Object(1,2,3);\n\n//CHECK#1\nif (obj.constructor !== Number) {\n $ERROR('#1: Since Object as a function calling is the same as function calling list of arguments can appears in braces;');\n}\n\n//CHECK#2\nif (typeof obj !== \"object\") {\n $ERROR('#2: Since Object as a function calling is the same as function calling list of arguments can appears in braces;');\n}\n\n//CHECK#3\nif ((obj != 1)||(obj === 1)) {\n $ERROR('3#: Since Object as a function calling is the same as function calling list of arguments can appears in braces;');\n}\n",
+ "id": "S15.2.2.1_A6_T1"
+ },
+ {
+ "section": "15.2.2.1",
+ "description": "Creating an object with \"new Object(null,2,3)\"",
+ "test": "var obj = new Object(null,2,3);\n\n//CHECK#1\nif (obj.constructor !== Object) {\n $ERROR('#1: Since Object as a function calling is the same as function calling list of arguments can appears in braces;');\n}\n\n//CHECK#2\nif (typeof obj !== \"object\") {\n $ERROR('#2: Since Object as a function calling is the same as function calling list of arguments can appears in braces;');\n}\n",
+ "id": "S15.2.2.1_A6_T2"
+ },
+ {
+ "section": "15.2.2.1",
+ "description": "Creating an object with \"new Object((null,2,3),2,3)\"",
+ "test": "var obj = new Object((null,2,3),1,2);\n\n//CHECK#1\nif (obj.constructor !== Number) {\n $ERROR('#1: Since Object as a function calling is the same as function calling list of arguments can appears in braces;');\n}\n\n//CHECK#2\nif (typeof obj !== \"object\") {\n $ERROR('#2: Since Object as a function calling is the same as function calling list of arguments can appears in braces;');\n}\n\n//CHECK#3\nif ((obj != 3)||(obj === 3)) {\n $ERROR('3#: Since Object as a function calling is the same as function calling list of arguments can appears in braces;');\n}\n",
+ "id": "S15.2.2.1_A6_T3"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.2.3.1.json b/website/resources/scripts/testcases2/15.2.3.1.json
new file mode 100644
index 000000000..f92057615
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.2.3.1.json
@@ -0,0 +1,15 @@
+{
+ "testCollection": {
+ "name": "15.2.3.1",
+ "numTests": 1,
+ "tests": [
+ {
+ "id": "15.2.3.1",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.1/15.2.3.1.js",
+ "description": "Object.prototype is a data property with default attribute values (false)",
+ "test": "assertTrue((function testcase() {\n var desc = Object.getOwnPropertyDescriptor(Object, 'prototype');\n if (desc.writable === false &&\n desc.enumerable === false &&\n desc.configurable === false) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.2.3.10.json b/website/resources/scripts/testcases2/15.2.3.10.json
new file mode 100644
index 000000000..d65128691
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.2.3.10.json
@@ -0,0 +1,245 @@
+{
+ "testCollection": {
+ "name": "15.2.3.10",
+ "numTests": 34,
+ "tests": [
+ {
+ "id": "15.2.3.10-0-1",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.10/15.2.3.10-0-1.js",
+ "description": "Object.preventExtensions must exist as a function",
+ "test": "assertTrue((function testcase() {\n var f = Object.preventExtensions;\n if (typeof(f) === \"function\") {\n return true;\n }\n }).call(this));\n"
+ },
+ {
+ "id": "15.2.3.10-0-2",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.10/15.2.3.10-0-2.js",
+ "description": "Object.preventExtensions must exist as a function taking 1 parameter",
+ "test": "assertTrue((Object.preventExtensions.length === 1));\n",
+ "precondition": "(fnExists(Object.preventExtensions))"
+ },
+ {
+ "id": "15.2.3.10-1-1",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.10/15.2.3.10-1-1.js",
+ "description": "Object.preventExtensions throws TypeError if 'O' is undefined",
+ "test": "assertTrue((function testcase() {\n try {\n Object.preventExtensions(undefined);\n } catch (e) {\n return (e instanceof TypeError);\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.preventExtensions))"
+ },
+ {
+ "id": "15.2.3.10-1-2",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.10/15.2.3.10-1-2.js",
+ "description": "Object.preventExtensions throws TypeError if 'O' is null",
+ "test": "assertTrue((function testcase() {\n try {\n Object.preventExtensions(null);\n } catch (e) {\n return (e instanceof TypeError);\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.preventExtensions))"
+ },
+ {
+ "id": "15.2.3.10-1-3",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.10/15.2.3.10-1-3.js",
+ "description": "Object.preventExtensions throws TypeError if 'O' is a boolean primitive value",
+ "test": "assertTrue((function testcase() {\n try {\n Object.preventExtensions(true);\n } catch (e) {\n return (e instanceof TypeError);\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.preventExtensions))"
+ },
+ {
+ "id": "15.2.3.10-1-4",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.10/15.2.3.10-1-4.js",
+ "description": "Object.preventExtensions throws TypeError if 'O' is a string primitive value",
+ "test": "assertTrue((function testcase() {\n try {\n Object.preventExtensions(\"abc\");\n } catch (e) {\n return (e instanceof TypeError);\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.preventExtensions))"
+ },
+ {
+ "id": "15.2.3.10-1",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.10/15.2.3.10-1.js",
+ "description": "Object.preventExtensions throws TypeError if type of first param is not Object",
+ "test": "assertTrue((function testcase() {\n try {\n Object.preventExtensions(0);\n }\n catch (e) {\n if (e instanceof TypeError) {\n return true;\n }\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.preventExtensions))"
+ },
+ {
+ "id": "15.2.3.10-2-1",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.10/15.2.3.10-2-1.js",
+ "description": "Object.preventExtensions - repeated calls to preventExtensions have no side effects",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n var testResult1 = true;\n var testResult2 = true;\n\n var preCheck = Object.isExtensible(obj);\n\n Object.preventExtensions(obj);\n testResult1 = Object.isExtensible(obj);\n Object.preventExtensions(obj);\n testResult2 = Object.isExtensible(obj);\n\n return preCheck && !testResult1 && !testResult2;\n\n }).call(this));\n",
+ "precondition": "(fnExists(Object.preventExtensions) && fnExists(Object.isExtensible))"
+ },
+ {
+ "id": "15.2.3.10-2",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.10/15.2.3.10-2.js",
+ "description": "Object.preventExtensions returns its arguments after setting its extensible property to false",
+ "test": "assertTrue((function testcase() {\n var o = {};\n var o2 = undefined;\n\n o2 = Object.preventExtensions(o);\n if (o2 === o && Object.isExtensible(o2) === false) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.preventExtensions))"
+ },
+ {
+ "id": "15.2.3.10-3-1",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.10/15.2.3.10-3-1.js",
+ "description": "Object.preventExtensions - Object.isExtensible(arg) returns false if arg is the returned object",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n var preCheck = Object.isExtensible(obj);\n Object.preventExtensions(obj);\n\n return preCheck && !Object.isExtensible(obj);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.preventExtensions) && fnExists(Object.isExtensible))"
+ },
+ {
+ "id": "15.2.3.10-3-10",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.10/15.2.3.10-3-10.js",
+ "description": "Object.preventExtensions - indexed properties cannot be added into an Error object",
+ "test": "assertTrue((function testcase() {\n var errObj = new Error();\n var preCheck = Object.isExtensible(errObj);\n Object.preventExtensions(errObj);\n\n errObj[0] = 12;\n return preCheck && !errObj.hasOwnProperty(\"0\");\n }).call(this));\n",
+ "precondition": "(fnExists(Object.preventExtensions) && fnExists(Object.isExtensible))"
+ },
+ {
+ "id": "15.2.3.10-3-11",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.10/15.2.3.10-3-11.js",
+ "description": "Object.preventExtensions - indexed properties cannot be added into an Arguments object",
+ "test": "assertTrue((function testcase() {\n var argObj;\n (function () {\n argObj = arguments;\n }());\n var preCheck = Object.isExtensible(argObj);\n Object.preventExtensions(argObj);\n\n argObj[0] = 12;\n return preCheck && !argObj.hasOwnProperty(\"0\");\n }).call(this));\n",
+ "precondition": "(fnExists(Object.preventExtensions) && fnExists(Object.isExtensible))"
+ },
+ {
+ "id": "15.2.3.10-3-12",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.10/15.2.3.10-3-12.js",
+ "description": "Object.preventExtensions - named properties cannot be added into the returned object",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n var preCheck = Object.isExtensible(obj);\n Object.preventExtensions(obj);\n\n obj.exName = 2;\n return preCheck && !Object.hasOwnProperty(\"exName\");\n }).call(this));\n",
+ "precondition": "(fnExists(Object.preventExtensions) && fnExists(Object.isExtensible))"
+ },
+ {
+ "id": "15.2.3.10-3-13",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.10/15.2.3.10-3-13.js",
+ "description": "Object.preventExtensions - named properties cannot be added into a Function object",
+ "test": "assertTrue((function testcase() {\n var funObj = function () { };\n var preCheck = Object.isExtensible(funObj);\n Object.preventExtensions(funObj);\n\n funObj.exName = 2;\n return preCheck && !funObj.hasOwnProperty(\"exName\");\n }).call(this));\n",
+ "precondition": "(fnExists(Object.preventExtensions) && fnExists(Object.isExtensible))"
+ },
+ {
+ "id": "15.2.3.10-3-14",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.10/15.2.3.10-3-14.js",
+ "description": "Object.preventExtensions - named properties cannot be added into an Array object",
+ "test": "assertTrue((function testcase() {\n var arrObj = [];\n var preCheck = Object.isExtensible(arrObj);\n Object.preventExtensions(arrObj);\n\n arrObj.exName = 2;\n return preCheck && !arrObj.hasOwnProperty(\"exName\");\n }).call(this));\n",
+ "precondition": "(fnExists(Object.preventExtensions) && fnExists(Object.isExtensible))"
+ },
+ {
+ "id": "15.2.3.10-3-15",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.10/15.2.3.10-3-15.js",
+ "description": "Object.preventExtensions - named properties cannot be added into a String object",
+ "test": "assertTrue((function testcase() {\n var strObj = new String(\"bbq\");\n var preCheck = Object.isExtensible(strObj);\n Object.preventExtensions(strObj);\n\n strObj.exName = 2;\n return preCheck && !strObj.hasOwnProperty(\"exName\");\n }).call(this));\n",
+ "precondition": "(fnExists(Object.preventExtensions) && fnExists(Object.isExtensible))"
+ },
+ {
+ "id": "15.2.3.10-3-16",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.10/15.2.3.10-3-16.js",
+ "description": "Object.preventExtensions - named properties cannot be added into a Boolean object",
+ "test": "assertTrue((function testcase() {\n var boolObj = new Boolean(true);\n var preCheck = Object.isExtensible(boolObj);\n Object.preventExtensions(boolObj);\n\n boolObj.exName = 2;\n return preCheck && !boolObj.hasOwnProperty(\"exName\");\n }).call(this));\n",
+ "precondition": "(fnExists(Object.preventExtensions) && fnExists(Object.isExtensible))"
+ },
+ {
+ "id": "15.2.3.10-3-17",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.10/15.2.3.10-3-17.js",
+ "description": "Object.preventExtensions - named properties cannot be added into a Number object",
+ "test": "assertTrue((function testcase() {\n var numObj = new Number(123);\n var preCheck = Object.isExtensible(numObj);\n Object.preventExtensions(numObj);\n\n numObj.exName = 2;\n return preCheck && !numObj.hasOwnProperty(\"exName\");\n }).call(this));\n",
+ "precondition": "(fnExists(Object.preventExtensions) && fnExists(Object.isExtensible))"
+ },
+ {
+ "id": "15.2.3.10-3-18",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.10/15.2.3.10-3-18.js",
+ "description": "Object.preventExtensions - named properties cannot be added into a Date object",
+ "test": "assertTrue((function testcase() {\n var dateObj = new Date();\n var preCheck = Object.isExtensible(dateObj);\n Object.preventExtensions(dateObj);\n\n dateObj.exName = 2;\n return preCheck && !dateObj.hasOwnProperty(\"exName\");\n }).call(this));\n",
+ "precondition": "(fnExists(Object.preventExtensions) && fnExists(Object.isExtensible))"
+ },
+ {
+ "id": "15.2.3.10-3-19",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.10/15.2.3.10-3-19.js",
+ "description": "Object.preventExtensions - named properties cannot be added into a RegExp object",
+ "test": "assertTrue((function testcase() {\n var regObj = new RegExp();\n var preCheck = Object.isExtensible(regObj);\n Object.preventExtensions(regObj);\n\n regObj.exName = 2;\n return preCheck && !regObj.hasOwnProperty(\"exName\");\n }).call(this));\n",
+ "precondition": "(fnExists(Object.preventExtensions) && fnExists(Object.isExtensible))"
+ },
+ {
+ "id": "15.2.3.10-3-2",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.10/15.2.3.10-3-2.js",
+ "description": "Object.preventExtensions - indexed properties cannot be added into the returned object",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n var preCheck = Object.isExtensible(obj);\n Object.preventExtensions(obj);\n\n obj[0] = 12;\n return preCheck && !obj.hasOwnProperty(\"0\");\n }).call(this));\n",
+ "precondition": "(fnExists(Object.preventExtensions) && fnExists(Object.isExtensible))"
+ },
+ {
+ "id": "15.2.3.10-3-20",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.10/15.2.3.10-3-20.js",
+ "description": "Object.preventExtensions - named properties cannot be added into an Error object",
+ "test": "assertTrue((function testcase() {\n var errObj = new Error();\n var preCheck = Object.isExtensible(errObj);\n Object.preventExtensions(errObj);\n\n errObj.exName = 2;\n return preCheck && !errObj.hasOwnProperty(\"exName\");\n }).call(this));\n",
+ "precondition": "(fnExists(Object.preventExtensions) && fnExists(Object.isExtensible))"
+ },
+ {
+ "id": "15.2.3.10-3-21",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.10/15.2.3.10-3-21.js",
+ "description": "Object.preventExtensions - named properties cannot be added into an Arguments object",
+ "test": "assertTrue((function testcase() {\n var argObj;\n (function () {\n argObj = arguments;\n }());\n var preCheck = Object.isExtensible(argObj);\n Object.preventExtensions(argObj);\n\n argObj.exName = 2;\n return preCheck && !argObj.hasOwnProperty(\"exName\");\n }).call(this));\n",
+ "precondition": "(fnExists(Object.preventExtensions) && fnExists(Object.isExtensible))"
+ },
+ {
+ "id": "15.2.3.10-3-22",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.10/15.2.3.10-3-22.js",
+ "description": "Object.preventExtensions - properties can still be deleted after extensions have been prevented",
+ "test": "assertTrue((function testcase() {\n var obj = { prop: 12 };\n var preCheck = Object.isExtensible(obj);\n Object.preventExtensions(obj);\n\n delete obj.prop;\n\n return preCheck && !obj.hasOwnProperty(\"prop\");\n\n }).call(this));\n",
+ "precondition": "(fnExists(Object.preventExtensions) && fnExists(Object.isExtensible))"
+ },
+ {
+ "id": "15.2.3.10-3-23",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.10/15.2.3.10-3-23.js",
+ "description": "Object.preventExtensions - properties can still be reassigned after extensions have been prevented",
+ "test": "assertTrue((function testcase() {\n var obj = { prop: 12 };\n var preCheck = Object.isExtensible(obj);\n Object.preventExtensions(obj);\n\n obj.prop = -1;\n\n return preCheck && obj.prop === -1;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.preventExtensions) && fnExists(Object.isExtensible))"
+ },
+ {
+ "id": "15.2.3.10-3-24",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.10/15.2.3.10-3-24.js",
+ "description": "Object.preventExtensions - [[Extensible]]: false on a prototype doesn't prevent adding properties to an instance that inherits from that prototype",
+ "test": "assertTrue((function testcase() {\n var proto = {};\n var preCheck = Object.isExtensible(proto);\n Object.preventExtensions(proto);\n\n var ConstructFun = function () { };\n ConstructFun.prototype = proto;\n var child = new ConstructFun();\n\n child.prop = 10;\n\n return preCheck && child.hasOwnProperty(\"prop\");\n }).call(this));\n",
+ "precondition": "(fnExists(Object.preventExtensions) && fnExists(Object.isExtensible))"
+ },
+ {
+ "id": "15.2.3.10-3-3",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.10/15.2.3.10-3-3.js",
+ "description": "Object.preventExtensions - indexed properties cannot be added into a Function object",
+ "test": "assertTrue((function testcase() {\n var funObj = function () { };\n var preCheck = Object.isExtensible(funObj);\n Object.preventExtensions(funObj);\n\n funObj[0] = 12;\n return preCheck && !funObj.hasOwnProperty(\"0\");\n }).call(this));\n",
+ "precondition": "(fnExists(Object.preventExtensions) && fnExists(Object.isExtensible))"
+ },
+ {
+ "id": "15.2.3.10-3-4",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.10/15.2.3.10-3-4.js",
+ "description": "Object.preventExtensions - indexed properties cannot be added into an Array object",
+ "test": "assertTrue((function testcase() {\n var arrObj = [];\n var preCheck = Object.isExtensible(arrObj);\n Object.preventExtensions(arrObj);\n\n arrObj[0] = 12;\n return preCheck && !arrObj.hasOwnProperty(\"0\");\n }).call(this));\n",
+ "precondition": "(fnExists(Object.preventExtensions) && fnExists(Object.isExtensible))"
+ },
+ {
+ "id": "15.2.3.10-3-5-1",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.10/15.2.3.10-3-5-1.js",
+ "description": "Object.preventExtensions - indexed properties cannot be added into a String object",
+ "test": "assertTrue((function testcase() {\n var strObj = new String(\"bbq\");\n var preCheck = Object.isExtensible(strObj);\n Object.preventExtensions(strObj);\n\n strObj[10] = 12;\n return preCheck && !strObj.hasOwnProperty(\"10\");\n }).call(this));\n",
+ "precondition": "(fnExists(Object.preventExtensions) && fnExists(Object.isExtensible))"
+ },
+ {
+ "id": "15.2.3.10-3-5",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.10/15.2.3.10-3-5.js",
+ "description": "Object.preventExtensions - indexed properties cannot be added into a String object",
+ "test": "assertTrue((function testcase() {\n var strObj = new String();\n var preCheck = Object.isExtensible(strObj);\n Object.preventExtensions(strObj);\n try {\n Object.defineProperty(strObj, \"0\", { value: \"c\" });\n return false;\n } catch (e) {\n return e instanceof TypeError && preCheck &&\n !strObj.hasOwnProperty(\"0\") && typeof strObj[0] === \"undefined\";\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.preventExtensions) && fnExists(Object.isExtensible) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.10-3-6",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.10/15.2.3.10-3-6.js",
+ "description": "Object.preventExtensions - indexed properties cannot be added into a Boolean object",
+ "test": "assertTrue((function testcase() {\n var boolObj = new Boolean(true);\n var preCheck = Object.isExtensible(boolObj);\n Object.preventExtensions(boolObj);\n\n boolObj[0] = 12;\n return preCheck && !boolObj.hasOwnProperty(\"0\");\n }).call(this));\n",
+ "precondition": "(fnExists(Object.preventExtensions) && fnExists(Object.isExtensible))"
+ },
+ {
+ "id": "15.2.3.10-3-7",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.10/15.2.3.10-3-7.js",
+ "description": "Object.preventExtensions - indexed properties cannot be added into a Number object",
+ "test": "assertTrue((function testcase() {\n var numObj = new Number(123);\n var preCheck = Object.isExtensible(numObj);\n Object.preventExtensions(numObj);\n\n numObj[0] = 12;\n return preCheck && !numObj.hasOwnProperty(\"0\");\n }).call(this));\n",
+ "precondition": "(fnExists(Object.preventExtensions) && fnExists(Object.isExtensible))"
+ },
+ {
+ "id": "15.2.3.10-3-8",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.10/15.2.3.10-3-8.js",
+ "description": "Object.preventExtensions - indexed properties cannot be added into a Date object",
+ "test": "assertTrue((function testcase() {\n var dateObj = new Date();\n var preCheck = Object.isExtensible(dateObj);\n Object.preventExtensions(dateObj);\n\n dateObj[0] = 12;\n return preCheck && !dateObj.hasOwnProperty(\"0\");\n }).call(this));\n",
+ "precondition": "(fnExists(Object.preventExtensions) && fnExists(Object.isExtensible))"
+ },
+ {
+ "id": "15.2.3.10-3-9",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.10/15.2.3.10-3-9.js",
+ "description": "Object.preventExtensions - indexed properties cannot be added into a RegExp object",
+ "test": "assertTrue((function testcase() {\n var regObj = new RegExp();\n var preCheck = Object.isExtensible(regObj);\n Object.preventExtensions(regObj);\n\n regObj[0] = 12;\n return preCheck && !regObj.hasOwnProperty(\"0\");\n }).call(this));\n",
+ "precondition": "(fnExists(Object.preventExtensions) && fnExists(Object.isExtensible))"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.2.3.11.json b/website/resources/scripts/testcases2/15.2.3.11.json
new file mode 100644
index 000000000..1ec2e3dab
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.2.3.11.json
@@ -0,0 +1,217 @@
+{
+ "testCollection": {
+ "name": "15.2.3.11",
+ "numTests": 30,
+ "tests": [
+ {
+ "id": "15.2.3.11-0-1",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.11/15.2.3.11-0-1.js",
+ "description": "Object.isSealed must exist as a function",
+ "test": "assertTrue((function testcase() {\n var f = Object.isSealed;\n if (typeof(f) === \"function\") {\n return true;\n }\n }).call(this));\n"
+ },
+ {
+ "id": "15.2.3.11-0-2",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.11/15.2.3.11-0-2.js",
+ "description": "Object.isSealed must exist as a function taking 1 parameter",
+ "test": "assertTrue((Object.isSealed.length === 1));\n",
+ "precondition": "(fnExists(Object.isSealed))"
+ },
+ {
+ "id": "15.2.3.11-1",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.11/15.2.3.11-1.js",
+ "description": "Object.isSealed throws TypeError if type of first param is not Object",
+ "test": "assertTrue((function testcase() {\n try {\n Object.isSealed(0);\n }\n catch (e) {\n if (e instanceof TypeError) {\n return true;\n }\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.isSealed))"
+ },
+ {
+ "id": "15.2.3.11-4-1",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-1.js",
+ "description": "Object.isSealed returns false for all built-in objects (Global)",
+ "test": "assertTrue((function testcase() {\n // in non-strict mode, 'this' is bound to the global object.\n var b = Object.isSealed(this);\n if (b === false) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.isSealed))"
+ },
+ {
+ "id": "15.2.3.11-4-10",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-10.js",
+ "description": "Object.isSealed returns false for all built-in objects (Boolean)",
+ "test": "assertTrue((function testcase() {\n var b = Object.isSealed(Boolean);\n if (b === false) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.isSealed))"
+ },
+ {
+ "id": "15.2.3.11-4-11",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-11.js",
+ "description": "Object.isSealed returns false for all built-in objects (Boolean.prototype)",
+ "test": "assertTrue((function testcase() {\n var b = Object.isSealed(Boolean.prototype);\n if (b === false) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.isSealed))"
+ },
+ {
+ "id": "15.2.3.11-4-12",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-12.js",
+ "description": "Object.isSealed returns false for all built-in objects (Number)",
+ "test": "assertTrue((function testcase() {\n var b = Object.isSealed(Number);\n if (b === false) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.isSealed))"
+ },
+ {
+ "id": "15.2.3.11-4-13",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-13.js",
+ "description": "Object.isSealed returns false for all built-in objects (Number.prototype)",
+ "test": "assertTrue((function testcase() {\n var b = Object.isSealed(Number.prototype);\n if (b === false) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.isSealed))"
+ },
+ {
+ "id": "15.2.3.11-4-14",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-14.js",
+ "description": "Object.isSealed returns false for all built-in objects (Math)",
+ "test": "assertTrue((function testcase() {\n var b = Object.isSealed(Math);\n if (b === false) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.isSealed))"
+ },
+ {
+ "id": "15.2.3.11-4-15",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-15.js",
+ "description": "Object.isSealed returns false for all built-in objects (Date)",
+ "test": "assertTrue((function testcase() {\n var b = Object.isSealed(Date);\n if (b === false) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.isSealed))"
+ },
+ {
+ "id": "15.2.3.11-4-16",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-16.js",
+ "description": "Object.isSealed returns false for all built-in objects (Date.prototype)",
+ "test": "assertTrue((function testcase() {\n var b = Object.isSealed(Date.prototype);\n if (b === false) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.isSealed))"
+ },
+ {
+ "id": "15.2.3.11-4-17",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-17.js",
+ "description": "Object.isSealed returns false for all built-in objects (RegExp)",
+ "test": "assertTrue((function testcase() {\n var b = Object.isSealed(RegExp);\n if (b === false) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.isSealed))"
+ },
+ {
+ "id": "15.2.3.11-4-18",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-18.js",
+ "description": "Object.isSealed returns false for all built-in objects (RegExp.prototype)",
+ "test": "assertTrue((function testcase() {\n var b = Object.isSealed(RegExp.prototype);\n if (b === false) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.isSealed))"
+ },
+ {
+ "id": "15.2.3.11-4-19",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-19.js",
+ "description": "Object.isSealed returns false for all built-in objects (Error)",
+ "test": "assertTrue((function testcase() {\n var b = Object.isSealed(Error);\n if (b === false) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.isSealed))"
+ },
+ {
+ "id": "15.2.3.11-4-2",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-2.js",
+ "description": "Object.isSealed returns false for all built-in objects (Object)",
+ "test": "assertTrue((function testcase() {\n var b = Object.isSealed(Object);\n if (b === false) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.isSealed))"
+ },
+ {
+ "id": "15.2.3.11-4-20",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-20.js",
+ "description": "Object.isSealed returns false for all built-in objects (Error.prototype)",
+ "test": "assertTrue((function testcase() {\n var b = Object.isSealed(Error.prototype);\n if (b === false) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.isSealed))"
+ },
+ {
+ "id": "15.2.3.11-4-21",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-21.js",
+ "description": "Object.isSealed returns false for all built-in objects (EvalError)",
+ "test": "assertTrue((function testcase() {\n var b = Object.isSealed(EvalError);\n if (b === false) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.isSealed))"
+ },
+ {
+ "id": "15.2.3.11-4-22",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-22.js",
+ "description": "Object.isSealed returns false for all built-in objects (RangeError)",
+ "test": "assertTrue((function testcase() {\n var b = Object.isSealed(RangeError);\n if (b === false) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.isSealed))"
+ },
+ {
+ "id": "15.2.3.11-4-23",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-23.js",
+ "description": "Object.isSealed returns false for all built-in objects (ReferenceError)",
+ "test": "assertTrue((function testcase() {\n var b = Object.isSealed(ReferenceError);\n if (b === false) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.isSealed))"
+ },
+ {
+ "id": "15.2.3.11-4-24",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-24.js",
+ "description": "Object.isSealed returns false for all built-in objects (SyntaxError)",
+ "test": "assertTrue((function testcase() {\n var b = Object.isSealed(SyntaxError);\n if (b === false) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.isSealed))"
+ },
+ {
+ "id": "15.2.3.11-4-25",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-25.js",
+ "description": "Object.isSealed returns false for all built-in objects (TypeError)",
+ "test": "assertTrue((function testcase() {\n var b = Object.isSealed(TypeError);\n if (b === false) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.isSealed))"
+ },
+ {
+ "id": "15.2.3.11-4-26",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-26.js",
+ "description": "Object.isSealed returns false for all built-in objects (URIError)",
+ "test": "assertTrue((function testcase() {\n var b = Object.isSealed(URIError);\n if (b === false) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.isSealed))"
+ },
+ {
+ "id": "15.2.3.11-4-27",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-27.js",
+ "description": "Object.isSealed returns false for all built-in objects (JSON)",
+ "test": "assertTrue((function testcase() {\n var b = Object.isSealed(JSON);\n if (b === false) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.isSealed))"
+ },
+ {
+ "id": "15.2.3.11-4-3",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-3.js",
+ "description": "Object.isSealed returns false for all built-in objects (Object.prototype)",
+ "test": "assertTrue((function testcase() {\n var b = Object.isSealed(Object.prototype);\n if (b === false) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.isSealed))"
+ },
+ {
+ "id": "15.2.3.11-4-4",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-4.js",
+ "description": "Object.isSealed returns false for all built-in objects (Function)",
+ "test": "assertTrue((function testcase() {\n var b = Object.isSealed(Function);\n if (b === false) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.isSealed))"
+ },
+ {
+ "id": "15.2.3.11-4-5",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-5.js",
+ "description": "Object.isSealed returns false for all built-in objects (Function.prototype)",
+ "test": "assertTrue((function testcase() {\n var b = Object.isSealed(Function.prototype);\n if (b === false) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.isSealed))"
+ },
+ {
+ "id": "15.2.3.11-4-6",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-6.js",
+ "description": "Object.isSealed returns false for all built-in objects (Array)",
+ "test": "assertTrue((function testcase() {\n var b = Object.isSealed(Array);\n if (b === false) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.isSealed))"
+ },
+ {
+ "id": "15.2.3.11-4-7",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-7.js",
+ "description": "Object.isSealed returns false for all built-in objects (Array.prototype)",
+ "test": "assertTrue((function testcase() {\n var b = Object.isSealed(Array.prototype);\n if (b === false) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.isSealed))"
+ },
+ {
+ "id": "15.2.3.11-4-8",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-8.js",
+ "description": "Object.isSealed returns false for all built-in objects (String)",
+ "test": "assertTrue((function testcase() {\n var b = Object.isSealed(String);\n if (b === false) {\n return true;\n }\n}).call(this));\n",
+ "precondition": "(fnExists(Object.isSealed))"
+ },
+ {
+ "id": "15.2.3.11-4-9",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.11/15.2.3.11-4-9.js",
+ "description": "Object.isSealed returns false for all built-in objects (String.prototype)",
+ "test": "assertTrue((function testcase() {\n var b = Object.isSealed(String.prototype);\n if (b === false) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.isSealed))"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.2.3.12.json b/website/resources/scripts/testcases2/15.2.3.12.json
new file mode 100644
index 000000000..e9f3b67cb
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.2.3.12.json
@@ -0,0 +1,399 @@
+{
+ "testCollection": {
+ "name": "15.2.3.12",
+ "numTests": 56,
+ "tests": [
+ {
+ "id": "15.2.3.12-0-1",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.12/15.2.3.12-0-1.js",
+ "description": "Object.isFrozen must exist as a function",
+ "test": "assertTrue((function testcase() {\n var f = Object.isFrozen;\n if (typeof(f) === \"function\") {\n return true;\n }\n }).call(this));\n"
+ },
+ {
+ "id": "15.2.3.12-0-2",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.12/15.2.3.12-0-2.js",
+ "description": "Object.isFrozen must exist as a function taking 1 parameter",
+ "test": "assertTrue((Object.isFrozen.length === 1));\n",
+ "precondition": "(fnExists(Object.isFrozen))"
+ },
+ {
+ "id": "15.2.3.12-1-1",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.12/15.2.3.12-1-1.js",
+ "description": "Object.isFrozen - TypeError is thrown when the first param 'O' is undefined",
+ "test": "assertTrue((function testcase() {\n try {\n Object.isFrozen(undefined);\n } catch (e) {\n return (e instanceof TypeError);\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.isFrozen))"
+ },
+ {
+ "id": "15.2.3.12-1-2",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.12/15.2.3.12-1-2.js",
+ "description": "Object.isFrozen - TypeError is thrown when the first param 'O' is null",
+ "test": "assertTrue((function testcase() {\n try {\n Object.isFrozen(null);\n } catch (e) {\n return (e instanceof TypeError);\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.isFrozen))"
+ },
+ {
+ "id": "15.2.3.12-1-3",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.12/15.2.3.12-1-3.js",
+ "description": "Object.isFrozen - TypeError is thrown when the first param 'O' is a boolean",
+ "test": "assertTrue((function testcase() {\n try {\n Object.isFrozen(true);\n } catch (e) {\n return (e instanceof TypeError);\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.isFrozen))"
+ },
+ {
+ "id": "15.2.3.12-1-4",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.12/15.2.3.12-1-4.js",
+ "description": "Object.isFrozen - TypeError is thrown when the first param 'O' is a string",
+ "test": "assertTrue((function testcase() {\n try {\n Object.isFrozen(\"abc\");\n } catch (e) {\n return (e instanceof TypeError);\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.isFrozen))"
+ },
+ {
+ "id": "15.2.3.12-1-5",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.12/15.2.3.12-1-5.js",
+ "description": "Object.isFrozen applies to dense array",
+ "test": "assertTrue((function testcase() {\n var obj = Object.freeze([0, 1, 2]);\n return Object.isFrozen(obj);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.isFrozen) && fnExists(Object.freeze))"
+ },
+ {
+ "id": "15.2.3.12-1-6",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.12/15.2.3.12-1-6.js",
+ "description": "Object.isFrozen applies to sparse array",
+ "test": "assertTrue((function testcase() {\n var sparseArr = [0, 1];\n sparseArr[10000] = 10000;\n\n sparseArr = Object.freeze(sparseArr);\n return Object.isFrozen(sparseArr);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.isFrozen) && fnExists(Object.freeze))"
+ },
+ {
+ "id": "15.2.3.12-1-7",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.12/15.2.3.12-1-7.js",
+ "description": "Object.isFrozen applies to non-array object which contains index named properties",
+ "test": "assertTrue((function testcase() {\n var obj = Object.freeze({ 0: 0, 1: 1, 1000: 1000 });\n return Object.isFrozen(obj);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.isFrozen) && fnExists(Object.freeze))"
+ },
+ {
+ "id": "15.2.3.12-1",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.12/15.2.3.12-1.js",
+ "description": "Object.isFrozen throws TypeError if type of first param is not Object",
+ "test": "assertTrue((function testcase() {\n try {\n Object.isFrozen(0);\n }\n catch (e) {\n if (e instanceof TypeError) {\n return true;\n }\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.isFrozen))"
+ },
+ {
+ "id": "15.2.3.12-2-1",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.12/15.2.3.12-2-1.js",
+ "description": "Object.isFrozen - inherited data property is not considered into the for each loop",
+ "test": "assertTrue((function testcase() {\n\n var proto = {};\n Object.defineProperty(proto, \"Father\", {\n value: 10,\n writable: false,\n configurable: true\n });\n\n var Con = function () { };\n Con.prototype = proto;\n\n var child = new Con();\n\n Object.preventExtensions(child);\n\n return Object.isFrozen(child);\n\n }).call(this));\n",
+ "precondition": "(fnExists(Object.isFrozen) && fnExists(Object.preventExtensions) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.12-2-2",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.12/15.2.3.12-2-2.js",
+ "description": "Object.isFrozen - inherited accessor property is not considered into the for each loop",
+ "test": "assertTrue((function testcase() {\n\n var proto = {};\n \n function get_func() {\n return 10;\n }\n function set_func() { }\n\n Object.defineProperty(proto, \"Father\", {\n get: get_func,\n set: set_func,\n configurable: true\n });\n\n var Con = function () { };\n Con.prototype = proto;\n\n var child = new Con();\n\n Object.preventExtensions(child);\n\n return Object.isFrozen(child);\n\n }).call(this));\n",
+ "precondition": "(fnExists(Object.isFrozen) && fnExists(Object.preventExtensions) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.12-2-a-1",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.12/15.2.3.12-2-a-1.js",
+ "description": "Object.isFrozen - 'P' is own data property",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n\n Object.defineProperty(obj, \"foo\", {\n value: 12,\n writable: true,\n configurable: false\n });\n\n Object.preventExtensions(obj);\n\n return !Object.isFrozen(obj);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.isFrozen) && fnExists(Object.defineProperty) && fnExists(Object.preventExtensions))"
+ },
+ {
+ "id": "15.2.3.12-2-a-11",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.12/15.2.3.12-2-a-11.js",
+ "description": "Object.isFrozen - 'O' is the Arguments object",
+ "test": "assertTrue((function testcase() {\n\n var arg;\n\n (function fun() {\n arg = arguments;\n }(1, 2, 3));\n\n Object.preventExtensions(arg);\n return !Object.isFrozen(arg);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.isFrozen) && fnExists(Object.preventExtensions))"
+ },
+ {
+ "id": "15.2.3.12-2-a-12",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.12/15.2.3.12-2-a-12.js",
+ "description": "Object.isFrozen - 'O' is a String object",
+ "test": "assertTrue((function testcase() {\n\n var obj = new String(\"abc\");\n\n obj.len = 100;\n\n Object.preventExtensions(obj);\n\n return !Object.isFrozen(obj);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.isFrozen) && fnExists(Object.preventExtensions))"
+ },
+ {
+ "id": "15.2.3.12-2-a-13",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.12/15.2.3.12-2-a-13.js",
+ "description": "Object.isFrozen - 'O' is a Function object",
+ "test": "assertTrue((function testcase() {\n\n var obj = function () { };\n \n Object.defineProperty(obj, \"property\", {\n value: 12,\n writable: true,\n configurable: false\n });\n\n Object.preventExtensions(obj);\n\n return !Object.isFrozen(obj);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.isFrozen) && fnExists(Object.preventExtensions) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.12-2-a-14",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.12/15.2.3.12-2-a-14.js",
+ "description": "Object.isFrozen - 'O' is an Array object",
+ "test": "assertTrue((function testcase() {\n\n var obj = [2];\n obj.len = 200;\n\n Object.preventExtensions(obj);\n\n return !Object.isFrozen(obj);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.isFrozen) && fnExists(Object.preventExtensions))"
+ },
+ {
+ "id": "15.2.3.12-2-a-2",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.12/15.2.3.12-2-a-2.js",
+ "description": "Object.isFrozen - 'P' is own data property that overrides an inherited data property",
+ "test": "assertTrue((function testcase() {\n\n var proto = {};\n\n Object.defineProperty(proto, \"foo\", {\n value: 9,\n writable: false,\n configurable: false\n });\n\n var Con = function () { };\n Con.prototype = proto;\n var child = new Con();\n\n Object.defineProperty(child, \"foo\", {\n value: 12,\n writable: true,\n configurable: false\n });\n\n Object.preventExtensions(child);\n return !Object.isFrozen(child);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.isFrozen) && fnExists(Object.defineProperty) && fnExists(Object.preventExtensions))"
+ },
+ {
+ "id": "15.2.3.12-2-a-3",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.12/15.2.3.12-2-a-3.js",
+ "description": "Object.isFrozen - 'P' is own data property that overrides an inherited accessor property",
+ "test": "assertTrue((function testcase() {\n\n var proto = {};\n\n Object.defineProperty(proto, \"foo\", {\n get: function () {\n return 9;\n },\n configurable: false\n });\n\n var Con = function () { };\n Con.prototype = proto;\n var child = new Con();\n\n\n Object.defineProperty(child, \"foo\", {\n value: 12,\n configurable: true\n });\n\n Object.preventExtensions(child);\n return !Object.isFrozen(child);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.isFrozen) && fnExists(Object.defineProperty) && fnExists(Object.preventExtensions))"
+ },
+ {
+ "id": "15.2.3.12-2-a-4",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.12/15.2.3.12-2-a-4.js",
+ "description": "Object.isFrozen - 'P' is own accessor property",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n Object.defineProperty(obj, \"foo\", {\n get: function () {\n return 9;\n },\n configurable: true\n });\n\n Object.preventExtensions(obj);\n return !Object.isFrozen(obj);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.isFrozen) && fnExists(Object.defineProperty) && fnExists(Object.preventExtensions))"
+ },
+ {
+ "id": "15.2.3.12-2-a-5",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.12/15.2.3.12-2-a-5.js",
+ "description": "Object.isFrozen - 'P' is own accessor property that overrides an inherited data property",
+ "test": "assertTrue((function testcase() {\n\n var proto = {};\n\n Object.defineProperty(proto, \"foo\", {\n value: 12,\n configurable: false\n });\n\n var Con = function () { };\n Con.prototype = proto;\n var child = new Con();\n\n Object.defineProperty(child, \"foo\", {\n get: function () {\n return 9;\n },\n configurable: true\n });\n\n Object.preventExtensions(child);\n return !Object.isFrozen(child);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.isFrozen) && fnExists(Object.defineProperty) && fnExists(Object.preventExtensions))"
+ },
+ {
+ "id": "15.2.3.12-2-a-6",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.12/15.2.3.12-2-a-6.js",
+ "description": "Object.isFrozen - 'P' is own accessor property that overrides an inherited accessor property",
+ "test": "assertTrue((function testcase() {\n\n var proto = {};\n\n Object.defineProperty(proto, \"foo\", {\n get: function () {\n return 12;\n },\n configurable: false\n });\n\n var Con = function () { };\n Con.prototype = proto;\n var child = new Con();\n\n\n Object.defineProperty(child, \"foo\", {\n get: function () {\n return 9;\n },\n configurable: true\n });\n\n Object.preventExtensions(child);\n return !Object.isFrozen(child);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.isFrozen) && fnExists(Object.defineProperty) && fnExists(Object.preventExtensions))"
+ },
+ {
+ "id": "15.2.3.12-2-a-7",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.12/15.2.3.12-2-a-7.js",
+ "description": "Object.isFrozen - 'P' is own accessor property without a get function",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n Object.defineProperty(obj, \"foo\", {\n set: function () { },\n configurable: true\n });\n\n Object.preventExtensions(obj);\n return !Object.isFrozen(obj);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.isFrozen) && fnExists(Object.defineProperty) && fnExists(Object.preventExtensions))"
+ },
+ {
+ "id": "15.2.3.12-2-a-8",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.12/15.2.3.12-2-a-8.js",
+ "description": "Object.isFrozen - 'P' is own accessor property without a get function that overrides an inherited accessor property",
+ "test": "assertTrue((function testcase() {\n\n var proto = {};\n\n Object.defineProperty(proto, \"foo\", {\n get: function () {\n return 9;\n },\n configurable: false\n });\n\n var Con = function () { };\n Con.prototype = proto;\n var child = new Con();\n\n Object.defineProperty(child, \"foo\", {\n set: function () { },\n configurable: true\n });\n\n Object.preventExtensions(child);\n return !Object.isFrozen(child);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.isFrozen) && fnExists(Object.defineProperty) && fnExists(Object.preventExtensions))"
+ },
+ {
+ "id": "15.2.3.12-2-b-i-1",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.12/15.2.3.12-2-b-i-1.js",
+ "description": "Object.isFrozen returns false if 'O' contains own writable data property",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n Object.defineProperty(obj, \"foo\", {\n value: 20,\n writable: true,\n configurable: false\n });\n Object.preventExtensions(obj);\n return !Object.isFrozen(obj);\n\n }).call(this));\n",
+ "precondition": "(fnExists(Object.isFrozen) && fnExists(Object.defineProperty) && fnExists(Object.preventExtensions))"
+ },
+ {
+ "id": "15.2.3.12-2-c-1",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.12/15.2.3.12-2-c-1.js",
+ "description": "Object.isFrozen returns false if 'O' contains own configurable data property",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n Object.defineProperty(obj, \"foo\", {\n value: 20,\n writable: false,\n configurable: true\n });\n\n Object.preventExtensions(obj);\n return !Object.isFrozen(obj);\n\n }).call(this));\n",
+ "precondition": "(fnExists(Object.isFrozen) && fnExists(Object.defineProperty) && fnExists(Object.preventExtensions))"
+ },
+ {
+ "id": "15.2.3.12-2-c-2",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.12/15.2.3.12-2-c-2.js",
+ "description": "Object.isFrozen returns false if 'O' contains own configurable accessor property",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n\n function get_func() {\n return 10;\n }\n function set_func() { }\n\n Object.defineProperty(obj, \"foo\", {\n get: get_func,\n set: set_func,\n configurable: true\n });\n\n Object.preventExtensions(obj);\n return !Object.isFrozen(obj);\n\n }).call(this));\n",
+ "precondition": "(fnExists(Object.isFrozen) && fnExists(Object.defineProperty) && fnExists(Object.preventExtensions))"
+ },
+ {
+ "id": "15.2.3.12-3-1",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-1.js",
+ "description": "Object.isFrozen returns false for all built-in objects (Global)",
+ "test": "assertTrue((function testcase() {\n // in non-strict mode, 'this' is bound to the global object.\n var b = Object.isFrozen(this);\n if (b === false) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.isFrozen))"
+ },
+ {
+ "id": "15.2.3.12-3-10",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-10.js",
+ "description": "Object.isFrozen returns false for all built-in objects (Boolean)",
+ "test": "assertTrue((function testcase() {\n var b = Object.isFrozen(Boolean);\n if (b === false) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.isFrozen))"
+ },
+ {
+ "id": "15.2.3.12-3-11",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-11.js",
+ "description": "Object.isFrozen returns false for all built-in objects (Boolean.prototype)",
+ "test": "assertTrue((function testcase() {\n var b = Object.isFrozen(Boolean.prototype);\n if (b === false) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.isFrozen))"
+ },
+ {
+ "id": "15.2.3.12-3-12",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-12.js",
+ "description": "Object.isFrozen returns false for all built-in objects (Number)",
+ "test": "assertTrue((function testcase() {\n var b = Object.isFrozen(Number);\n if (b === false) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.isFrozen))"
+ },
+ {
+ "id": "15.2.3.12-3-13",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-13.js",
+ "description": "Object.isFrozen returns false for all built-in objects (Number.prototype)",
+ "test": "assertTrue((function testcase() {\n var b = Object.isFrozen(Number.prototype);\n if (b === false) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.isFrozen))"
+ },
+ {
+ "id": "15.2.3.12-3-14",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-14.js",
+ "description": "Object.isFrozen returns false for all built-in objects (Math)",
+ "test": "assertTrue((function testcase() {\n var b = Object.isFrozen(Math);\n if (b === false) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.isFrozen))"
+ },
+ {
+ "id": "15.2.3.12-3-15",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-15.js",
+ "description": "Object.isFrozen returns false for all built-in objects (Date)",
+ "test": "assertTrue((function testcase() {\n var b = Object.isFrozen(Date);\n if (b === false) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.isFrozen))"
+ },
+ {
+ "id": "15.2.3.12-3-16",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-16.js",
+ "description": "Object.isFrozen returns false for all built-in objects (Date.prototype)",
+ "test": "assertTrue((function testcase() {\n var b = Object.isFrozen(Date.prototype);\n if (b === false) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.isFrozen))"
+ },
+ {
+ "id": "15.2.3.12-3-17",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-17.js",
+ "description": "Object.isFrozen returns false for all built-in objects (RegExp)",
+ "test": "assertTrue((function testcase() {\n var b = Object.isFrozen(RegExp);\n if (b === false) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.isFrozen))"
+ },
+ {
+ "id": "15.2.3.12-3-18",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-18.js",
+ "description": "Object.isFrozen returns false for all built-in objects (RegExp.prototype)",
+ "test": "assertTrue((function testcase() {\n var b = Object.isFrozen(RegExp.prototype);\n if (b === false) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.isFrozen))"
+ },
+ {
+ "id": "15.2.3.12-3-19",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-19.js",
+ "description": "Object.isFrozen returns false for all built-in objects (Error)",
+ "test": "assertTrue((function testcase() {\n var b = Object.isFrozen(Error);\n if (b === false) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.isFrozen))"
+ },
+ {
+ "id": "15.2.3.12-3-2",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-2.js",
+ "description": "Object.isFrozen returns false for all built-in objects (Object)",
+ "test": "assertTrue((function testcase() {\n var b = Object.isFrozen(Object);\n if (b === false) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.isFrozen))"
+ },
+ {
+ "id": "15.2.3.12-3-20",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-20.js",
+ "description": "Object.isFrozen returns false for all built-in objects (Error.prototype)",
+ "test": "assertTrue((function testcase() {\n var b = Object.isFrozen(Error.prototype);\n if (b === false) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.isFrozen))"
+ },
+ {
+ "id": "15.2.3.12-3-21",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-21.js",
+ "description": "Object.isFrozen returns false for all built-in objects (EvalError)",
+ "test": "assertTrue((function testcase() {\n var b = Object.isFrozen(EvalError);\n if (b === false) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.isFrozen))"
+ },
+ {
+ "id": "15.2.3.12-3-22",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-22.js",
+ "description": "Object.isFrozen returns false for all built-in objects (RangeError)",
+ "test": "assertTrue((function testcase() {\n var b = Object.isFrozen(RangeError);\n if (b === false) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.isFrozen))"
+ },
+ {
+ "id": "15.2.3.12-3-23",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-23.js",
+ "description": "Object.isFrozen returns false for all built-in objects (ReferenceError)",
+ "test": "assertTrue((function testcase() {\n var b = Object.isFrozen(ReferenceError);\n if (b === false) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.isFrozen))"
+ },
+ {
+ "id": "15.2.3.12-3-24",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-24.js",
+ "description": "Object.isFrozen returns false for all built-in objects (SyntaxError)",
+ "test": "assertTrue((function testcase() {\n var b = Object.isFrozen(SyntaxError);\n if (b === false) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.isFrozen))"
+ },
+ {
+ "id": "15.2.3.12-3-25",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-25.js",
+ "description": "Object.isFrozen returns false for all built-in objects (TypeError)",
+ "test": "assertTrue((function testcase() {\n var b = Object.isFrozen(TypeError);\n if (b === false) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.isFrozen))"
+ },
+ {
+ "id": "15.2.3.12-3-26",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-26.js",
+ "description": "Object.isFrozen returns false for all built-in objects (URIError)",
+ "test": "assertTrue((function testcase() {\n var b = Object.isFrozen(URIError);\n if (b === false) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.isFrozen))"
+ },
+ {
+ "id": "15.2.3.12-3-27",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-27.js",
+ "description": "Object.isFrozen returns false for all built-in objects (JSON)",
+ "test": "assertTrue((function testcase() {\n var b = Object.isFrozen(JSON);\n if (b === false) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.isFrozen))"
+ },
+ {
+ "id": "15.2.3.12-3-28",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-28.js",
+ "description": "Object.isFrozen returns true when all own properties of 'O' are not writable and not configurable, and 'O' is not extensible",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n\n Object.defineProperty(obj, \"foo1\", {\n value: 20,\n writable: false,\n enumerable: false,\n configurable: false\n });\n\n\n function get_func() {\n return 10;\n }\n function set_func() { }\n\n Object.defineProperty(obj, \"foo2\", {\n get: get_func,\n set: set_func,\n configurable: false\n });\n\n Object.preventExtensions(obj);\n return Object.isFrozen(obj);\n\n }).call(this));\n",
+ "precondition": "(fnExists(Object.isFrozen) && fnExists(Object.preventExtensions) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.12-3-3",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-3.js",
+ "description": "Object.isFrozen returns false for all built-in objects (Object.prototype)",
+ "test": "assertTrue((function testcase() {\n var b = Object.isFrozen(Object.prototype);\n if (b === false) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.isFrozen))"
+ },
+ {
+ "id": "15.2.3.12-3-4",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-4.js",
+ "description": "Object.isFrozen returns false for all built-in objects (Function)",
+ "test": "assertTrue((function testcase() {\n var b = Object.isFrozen(Function);\n if (b === false) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.isFrozen))"
+ },
+ {
+ "id": "15.2.3.12-3-5",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-5.js",
+ "description": "Object.isFrozen returns false for all built-in objects (Function.prototype)",
+ "test": "assertTrue((function testcase() {\n var b = Object.isFrozen(Function.prototype);\n if (b === false) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.isFrozen))"
+ },
+ {
+ "id": "15.2.3.12-3-6",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-6.js",
+ "description": "Object.isFrozen returns false for all built-in objects (Array)",
+ "test": "assertTrue((function testcase() {\n var b = Object.isFrozen(Array);\n if (b === false) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.isFrozen))"
+ },
+ {
+ "id": "15.2.3.12-3-7",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-7.js",
+ "description": "Object.isFrozen returns false for all built-in objects (Array.prototype)",
+ "test": "assertTrue((function testcase() {\n var b = Object.isFrozen(Array.prototype);\n if (b === false) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.isFrozen))"
+ },
+ {
+ "id": "15.2.3.12-3-8",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-8.js",
+ "description": "Object.isFrozen returns false for all built-in objects (String)",
+ "test": "assertTrue((function testcase() {\n var b = Object.isFrozen(String);\n if (b === false) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.isFrozen))"
+ },
+ {
+ "id": "15.2.3.12-3-9",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.12/15.2.3.12-3-9.js",
+ "description": "Object.isFrozen returns false for all built-in objects (String.prototype)",
+ "test": "assertTrue((function testcase() {\n var b = Object.isFrozen(String.prototype);\n if (b === false) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.isFrozen))"
+ },
+ {
+ "id": "15.2.3.12-4-1",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.12/15.2.3.12-4-1.js",
+ "description": "Object.isFrozen returns false if extensible is true",
+ "test": "assertTrue((!Object.isFrozen({})));\n",
+ "precondition": "(fnExists(Object.isFrozen))"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.2.3.13.json b/website/resources/scripts/testcases2/15.2.3.13.json
new file mode 100644
index 000000000..7a8bb3b2a
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.2.3.13.json
@@ -0,0 +1,259 @@
+{
+ "testCollection": {
+ "name": "15.2.3.13",
+ "numTests": 36,
+ "tests": [
+ {
+ "id": "15.2.3.13-0-1",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.13/15.2.3.13-0-1.js",
+ "description": "Object.isExtensible must exist as a function",
+ "test": "assertTrue((function testcase() {\n var f = Object.isExtensible ;\n if (typeof(f) === \"function\") {\n return true;\n }\n }).call(this));\n"
+ },
+ {
+ "id": "15.2.3.13-0-2",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.13/15.2.3.13-0-2.js",
+ "description": "Object.isExtensible must exist as a function taking 1 parameter",
+ "test": "assertTrue((Object.isExtensible.length === 1));\n",
+ "precondition": "(fnExists(Object.isExtensible))"
+ },
+ {
+ "id": "15.2.3.13-0-3",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.13/15.2.3.13-0-3.js",
+ "description": "Object.isExtensible is true for objects created using the Object constructor",
+ "test": "assertTrue((function testcase() {\n var o = new Object();\n\n if (Object.isExtensible(o) === true) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.isExtensible))"
+ },
+ {
+ "id": "15.2.3.13-1-1",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.13/15.2.3.13-1-1.js",
+ "description": "Object.isExtensible throws TypeError if 'O' is undefined",
+ "test": "assertTrue((function testcase() {\n\n try {\n Object.isExtensible(undefined);\n } catch (e) {\n return (e instanceof TypeError);\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.isExtensible))"
+ },
+ {
+ "id": "15.2.3.13-1-2",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.13/15.2.3.13-1-2.js",
+ "description": "Object.isExtensible throws TypeError if 'O' is null",
+ "test": "assertTrue((function testcase() {\n\n try {\n Object.isExtensible(null);\n } catch (e) {\n return (e instanceof TypeError);\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.isExtensible))"
+ },
+ {
+ "id": "15.2.3.13-1-3",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.13/15.2.3.13-1-3.js",
+ "description": "Object.isExtensible throws TypeError if 'O' is a boolean",
+ "test": "assertTrue((function testcase() {\n\n try {\n Object.isExtensible(true);\n } catch (e) {\n return (e instanceof TypeError);\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.isExtensible))"
+ },
+ {
+ "id": "15.2.3.13-1-4",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.13/15.2.3.13-1-4.js",
+ "description": "Object.isExtensible throws TypeError if 'O' is a string",
+ "test": "assertTrue((function testcase() {\n\n try {\n Object.isExtensible(\"abc\");\n } catch (e) {\n return (e instanceof TypeError);\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.isExtensible))"
+ },
+ {
+ "id": "15.2.3.13-1",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.13/15.2.3.13-1.js",
+ "description": "Object.isExtensible throws TypeError if type of first param is not Object",
+ "test": "assertTrue((function testcase() {\n try {\n Object.isExtensible(0);\n }\n catch (e) {\n if (e instanceof TypeError) {\n return true;\n }\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.isExtensible))"
+ },
+ {
+ "id": "15.2.3.13-2-1",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-1.js",
+ "description": "Object.isExtensible returns true for all built-in objects (Global)",
+ "test": "global = this;assertTrue((function testcase() {\n // in non-strict mode, 'this' is bound to the global object.\n var e = Object.isExtensible(this);\n if (e === true) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.isExtensible))"
+ },
+ {
+ "id": "15.2.3.13-2-10",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-10.js",
+ "description": "Object.isExtensible returns true for all built-in objects (RegExp)",
+ "test": "assertTrue((function testcase() {\n var e = Object.isExtensible(RegExp);\n if (e === true) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.isExtensible))"
+ },
+ {
+ "id": "15.2.3.13-2-11",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-11.js",
+ "description": "Object.isExtensible returns true for all built-in objects (Error)",
+ "test": "assertTrue((function testcase() {\n var e = Object.isExtensible(Error);\n if (e === true) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.isExtensible))"
+ },
+ {
+ "id": "15.2.3.13-2-12",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-12.js",
+ "description": "Object.isExtensible returns true for all built-in objects (JSON)",
+ "test": "assertTrue((function testcase() {\n var e = Object.isExtensible(JSON);\n if (e === true) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.isExtensible))"
+ },
+ {
+ "id": "15.2.3.13-2-13",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-13.js",
+ "description": "Object.isExtensible returns true for all built-in objects (Function.constructor)",
+ "test": "assertTrue((function testcase() {\n var e = Object.isExtensible(Function.constructor);\n if (e === true) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.isExtensible))"
+ },
+ {
+ "id": "15.2.3.13-2-14",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-14.js",
+ "description": "Object.isExtensible returns true for all built-in objects (Function.prototype)",
+ "test": "assertTrue((function testcase() {\n var e = Object.isExtensible(Function.prototype);\n if (e === true) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.isExtensible))"
+ },
+ {
+ "id": "15.2.3.13-2-15",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-15.js",
+ "description": "Object.isExtensible returns true for all built-in objects (Array.prototype)",
+ "test": "assertTrue((function testcase() {\n var e = Object.isExtensible(Array.prototype);\n if (e === true) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.isExtensible))"
+ },
+ {
+ "id": "15.2.3.13-2-16",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-16.js",
+ "description": "Object.isExtensible returns true for all built-in objects (String.prototype)",
+ "test": "assertTrue((function testcase() {\n var e = Object.isExtensible(String.prototype);\n if (e === true) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.isExtensible))"
+ },
+ {
+ "id": "15.2.3.13-2-17",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-17.js",
+ "description": "Object.isExtensible returns true for all built-in objects (Boolean.prototype)",
+ "test": "assertTrue((function testcase() {\n var e = Object.isExtensible(Boolean.prototype);\n if (e === true) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.isExtensible))"
+ },
+ {
+ "id": "15.2.3.13-2-18",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-18.js",
+ "description": "Object.isExtensible returns true for all built-in objects (Number.prototype)",
+ "test": "assertTrue((function testcase() {\n var e = Object.isExtensible(Number.prototype);\n if (e === true) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.isExtensible))"
+ },
+ {
+ "id": "15.2.3.13-2-19",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-19.js",
+ "description": "Object.isExtensible returns true for all built-in objects (Date.prototype)",
+ "test": "assertTrue((function testcase() {\n var e = Object.isExtensible(Date.prototype);\n if (e === true) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.isExtensible))"
+ },
+ {
+ "id": "15.2.3.13-2-2",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-2.js",
+ "description": "Object.isExtensible returns true for all built-in objects (Object)",
+ "test": "assertTrue((function testcase() {\n var o = {};\n var e = Object.isExtensible(o);\n if (e === true) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.isExtensible))"
+ },
+ {
+ "id": "15.2.3.13-2-20",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-20.js",
+ "description": "Object.isExtensible returns true for all built-in objects (RegExp.prototype)",
+ "test": "assertTrue((function testcase() {\n var e = Object.isExtensible(RegExp.prototype);\n if (e === true) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.isExtensible))"
+ },
+ {
+ "id": "15.2.3.13-2-21",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-21.js",
+ "description": "Object.isExtensible returns true for all built-in objects (Error.prototype)",
+ "test": "assertTrue((function testcase() {\n var e = Object.isExtensible(Error.prototype);\n if (e === true) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.isExtensible))"
+ },
+ {
+ "id": "15.2.3.13-2-22",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-22.js",
+ "description": "Object.isExtensible returns true if 'O' is extensible",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n return Object.isExtensible(obj);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.isExtensible))"
+ },
+ {
+ "id": "15.2.3.13-2-23",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-23.js",
+ "description": "Object.isExtensible returns false if 'O' is not extensible",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n Object.preventExtensions(obj);\n return !Object.isExtensible(obj);\n\n }).call(this));\n",
+ "precondition": "(fnExists(Object.isExtensible) && fnExists(Object.preventExtensions))"
+ },
+ {
+ "id": "15.2.3.13-2-24",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-24.js",
+ "description": "Object.isExtensible returns true if O is extensible and has a prototype that is extensible",
+ "test": "assertTrue((function testcase() {\n \n var proto = {};\n\n var ConstructFun = function () { };\n ConstructFun.prototype = proto;\n\n var obj = new ConstructFun();\n\n return Object.isExtensible(obj);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.isExtensible))"
+ },
+ {
+ "id": "15.2.3.13-2-25",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-25.js",
+ "description": "Object.isExtensible returns true if O is extensible and has a prototype that is not extensible",
+ "test": "assertTrue((function testcase() {\n\n var proto = {};\n Object.preventExtensions(proto);\n \n var ConstructFun = function () { };\n ConstructFun.prototype = proto;\n\n var obj = new ConstructFun();\n\n return Object.isExtensible(obj);\n\n }).call(this));\n",
+ "precondition": "(fnExists(Object.isExtensible) && fnExists(Object.preventExtensions))"
+ },
+ {
+ "id": "15.2.3.13-2-26",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-26.js",
+ "description": "Object.isExtensible returns false if O is not extensible and has a prototype that is extensible",
+ "test": "assertTrue((function testcase() {\n\n var proto = {};\n\n var ConstructFun = function () { };\n ConstructFun.prototype = proto;\n var obj = new ConstructFun();\n\n Object.preventExtensions(obj);\n\n return !Object.isExtensible(obj);\n\n }).call(this));\n",
+ "precondition": "(fnExists(Object.isExtensible) && fnExists(Object.preventExtensions))"
+ },
+ {
+ "id": "15.2.3.13-2-27",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-27.js",
+ "description": "Object.isExtensible returns false if O is not extensible and has a prototype that is not extensible",
+ "test": "assertTrue((function testcase() {\n\n var proto = {};\n Object.preventExtensions(proto);\n\n var ConstructFun = function () { };\n ConstructFun.prototype = proto;\n\n var obj = new ConstructFun();\n Object.preventExtensions(obj);\n\n return !Object.isExtensible(obj);\n\n }).call(this));\n",
+ "precondition": "(fnExists(Object.isExtensible) && fnExists(Object.preventExtensions))"
+ },
+ {
+ "id": "15.2.3.13-2-29",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-29.js",
+ "description": "Object.isExtensible returns true for the global object",
+ "test": "assertTrue((Object.isExtensible(fnGlobalObject())));\n",
+ "precondition": "(fnExists(Object.isExtensible))"
+ },
+ {
+ "id": "15.2.3.13-2-3",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-3.js",
+ "description": "Object.isExtensible returns true for all built-in objects (Function)",
+ "test": "assertTrue((function testcase() {\n function foo() {}\n \n var e = Object.isExtensible(foo);\n if (e === true) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.isExtensible))"
+ },
+ {
+ "id": "15.2.3.13-2-4",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-4.js",
+ "description": "Object.isExtensible returns true for all built-in objects (Array)",
+ "test": "assertTrue((function testcase() {\n var e = Object.isExtensible(Array);\n if (e === true) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.isExtensible))"
+ },
+ {
+ "id": "15.2.3.13-2-5",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-5.js",
+ "description": "Object.isExtensible returns true for all built-in objects (String)",
+ "test": "assertTrue((function testcase() {\n var e = Object.isExtensible(String);\n if (e === true) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.isExtensible))"
+ },
+ {
+ "id": "15.2.3.13-2-6",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-6.js",
+ "description": "Object.isExtensible returns true for all built-in objects (Boolean)",
+ "test": "assertTrue((function testcase() {\n var e = Object.isExtensible(Boolean);\n if (e === true) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.isExtensible))"
+ },
+ {
+ "id": "15.2.3.13-2-7",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-7.js",
+ "description": "Object.isExtensible returns true for all built-in objects (Number)",
+ "test": "assertTrue((function testcase() {\n var e = Object.isExtensible(Number);\n if (e === true) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.isExtensible))"
+ },
+ {
+ "id": "15.2.3.13-2-8",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-8.js",
+ "description": "Object.isExtensible returns true for all built-in objects (Math)",
+ "test": "assertTrue((function testcase() {\n var e = Object.isExtensible(Math);\n if (e === true) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.isExtensible))"
+ },
+ {
+ "id": "15.2.3.13-2-9",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.13/15.2.3.13-2-9.js",
+ "description": "Object.isExtensible returns true for all built-in objects (Date)",
+ "test": "assertTrue((function testcase() {\n var e = Object.isExtensible(Date);\n if (e === true) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.isExtensible))"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.2.3.14.json b/website/resources/scripts/testcases2/15.2.3.14.json
new file mode 100644
index 000000000..d6fc19b69
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.2.3.14.json
@@ -0,0 +1,357 @@
+{
+ "testCollection": {
+ "name": "15.2.3.14",
+ "numTests": 50,
+ "tests": [
+ {
+ "id": "15.2.3.14-0-1",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.14/15.2.3.14-0-1.js",
+ "description": "Object.keys must exist as a function",
+ "test": "assertTrue((function testcase() {\n var f = Object.keys;\n if (typeof(f) === \"function\") {\n return true;\n }\n }).call(this));\n"
+ },
+ {
+ "id": "15.2.3.14-0-2",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.14/15.2.3.14-0-2.js",
+ "description": "Object.keys must exist as a function taking 1 parameter",
+ "test": "assertTrue((Object.keys.length === 1));\n",
+ "precondition": "(fnExists(Object.keys))"
+ },
+ {
+ "id": "15.2.3.14-1-1",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.14/15.2.3.14-1-1.js",
+ "description": "Object.keys throws TypeError if type of first param is not Object",
+ "test": "assertTrue((function testcase() {\n try {\n Object.keys(0);\n }\n catch (e) {\n if (e instanceof TypeError) {\n return true;\n }\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.keys))"
+ },
+ {
+ "id": "15.2.3.14-1-2",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.14/15.2.3.14-1-2.js",
+ "description": "Object.keys throws TypeError if type of first param is not Object (boolean)",
+ "test": "assertTrue((function testcase() {\n try {\n Object.keys(true);\n }\n catch (e) {\n if (e instanceof TypeError) {\n return true;\n }\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.keys))"
+ },
+ {
+ "id": "15.2.3.14-1-3",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.14/15.2.3.14-1-3.js",
+ "description": "Object.keys throws TypeError if type of first param is not Object (string)",
+ "test": "assertTrue((function testcase() {\n try {\n Object.keys('abc');\n }\n catch (e) {\n if (e instanceof TypeError) {\n return true;\n }\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.keys))"
+ },
+ {
+ "id": "15.2.3.14-1-4",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.14/15.2.3.14-1-4.js",
+ "description": "Object.keys throws TypeError if type of first param is not Object (null)",
+ "test": "assertTrue((function testcase() {\n try {\n Object.keys(null);\n }\n catch (e) {\n if (e instanceof TypeError) {\n return true;\n }\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.keys))"
+ },
+ {
+ "id": "15.2.3.14-1-5",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.14/15.2.3.14-1-5.js",
+ "description": "Object.keys throws TypeError if type of first param is not Object (undefined)",
+ "test": "assertTrue((function testcase() {\n try {\n Object.keys(undefined);\n }\n catch (e) {\n if (e instanceof TypeError) {\n return true;\n }\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.keys))"
+ },
+ {
+ "id": "15.2.3.14-2-1",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.14/15.2.3.14-2-1.js",
+ "description": "Object.keys returns the standard built-in Array",
+ "test": "assertTrue((function testcase() {\n var o = { x: 1, y: 2};\n\n var a = Object.keys(o);\n if (Array.isArray(a) === true) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.keys) && fnExists(Array.isArray))"
+ },
+ {
+ "id": "15.2.3.14-2-2",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.14/15.2.3.14-2-2.js",
+ "description": "Object.keys returns the standard built-in Array (check [[Class]]",
+ "test": "assertTrue((function testcase() {\n var o = { x: 1, y: 2};\n\n var a = Object.keys(o);\n var s = Object.prototype.toString.call(a);\n if (s === '[object Array]') {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.keys))"
+ },
+ {
+ "id": "15.2.3.14-2-3",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.14/15.2.3.14-2-3.js",
+ "description": "Object.keys returns the standard built-in Array (Array overridden)",
+ "test": "assertTrue((function testcase() {\n function Array() { }\n\n var o = { x: 1, y: 2};\n\n var a = Object.keys(o);\n\n var s = Object.prototype.toString.call(a);\n if (s === '[object Array]') {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.keys))"
+ },
+ {
+ "id": "15.2.3.14-2-4",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.14/15.2.3.14-2-4.js",
+ "description": "Object.keys returns the standard built-in Array that is extensible",
+ "test": "assertTrue((function testcase() {\n var o = { x: 1, y: 2};\n\n var a = Object.keys(o);\n if (Object.isExtensible(a) === true) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.keys) && fnExists(Object.isExtensible))"
+ },
+ {
+ "id": "15.2.3.14-2-5",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.14/15.2.3.14-2-5.js",
+ "description": "Object.keys returns the standard built-in Array that is not sealed",
+ "test": "assertTrue((function testcase() {\n var o = { x: 1, y: 2};\n\n var a = Object.keys(o);\n if (Object.isSealed(a) === false) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.keys) && fnExists(Object.isSealed))"
+ },
+ {
+ "id": "15.2.3.14-2-6",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.14/15.2.3.14-2-6.js",
+ "description": "Object.keys returns the standard built-in Array that is not frozen",
+ "test": "assertTrue((function testcase() {\n var o = { x: 1, y: 2};\n\n var a = Object.keys(o);\n if (Object.isFrozen(a) === false) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.keys) && fnExists(Object.isFrozen))"
+ },
+ {
+ "id": "15.2.3.14-2-7",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.14/15.2.3.14-2-7.js",
+ "description": "Object.keys - 'n' is 0 when 'O' doesn't contain own enumerable data or accessor properties",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n Object.defineProperty(obj, \"prop1\", {\n value: 1001,\n enumerable: false,\n configurable: true\n });\n\n Object.defineProperty(obj, \"prop2\", {\n get: function () {\n return 1002;\n },\n enumerable: false,\n configurable: true\n });\n\n var arr = Object.keys(obj);\n\n return arr.length === 0;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.keys) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.14-2-8",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.14/15.2.3.14-2-8.js",
+ "description": "Object.keys - 'n' is the correct value when enumerable properties exist in 'O'",
+ "test": "assertTrue((function testcase() {\n var obj = {\n prop1: 1001,\n prop2: function () {\n return 1002;\n }\n };\n\n Object.defineProperty(obj, \"prop3\", {\n value: 1003,\n enumerable: false,\n configurable: true\n });\n\n Object.defineProperty(obj, \"prop4\", {\n get: function () {\n return 1004;\n },\n enumerable: false,\n configurable: true\n });\n\n var arr = Object.keys(obj);\n\n return (arr.length === 2) && (arr[0] === \"prop1\") && (arr[1] === \"prop2\");\n }).call(this));\n",
+ "precondition": "(fnExists(Object.keys) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.14-3-1",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.14/15.2.3.14-3-1.js",
+ "description": "Object.keys returns the standard built-in Array containing own enumerable properties",
+ "test": "assertTrue((function testcase() {\n var o = { x: 1, y: 2};\n\n var a = Object.keys(o);\n if (a.length === 2 &&\n a[0] === 'x' &&\n a[1] === 'y') {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.keys))"
+ },
+ {
+ "id": "15.2.3.14-3-2",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.14/15.2.3.14-3-2.js",
+ "description": "Object.keys returns the standard built-in Array containing own enumerable properties (function)",
+ "test": "assertTrue((function testcase() {\n function foo() {}\n foo.x = 1;\n \n var a = Object.keys(foo);\n if (a.length === 1 &&\n a[0] === 'x') {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.keys))"
+ },
+ {
+ "id": "15.2.3.14-3-3",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.14/15.2.3.14-3-3.js",
+ "description": "Object.keys returns the standard built-in Array containing own enumerable properties (array)",
+ "test": "assertTrue((function testcase() {\n var o = [1, 2];\n var a = Object.keys(o);\n if (a.length === 2 &&\n a[0] === '0' &&\n a[1] === '1') {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.keys))"
+ },
+ {
+ "id": "15.2.3.14-3-4",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.14/15.2.3.14-3-4.js",
+ "description": "Object.keys of an arguments object returns the indices of the given arguments",
+ "test": "assertTrue((function testcase() {\n function testArgs2(x, y, z) {\n // Properties of the arguments object are enumerable.\n var a = Object.keys(arguments);\n if (a.length === 2 && a[0] === \"0\" && a[1] === \"1\")\n return true;\n }\n function testArgs3(x, y, z) {\n // Properties of the arguments object are enumerable.\n var a = Object.keys(arguments);\n if (a.length === 3 && a[0] === \"0\" && a[1] === \"1\" && a[2] === \"2\")\n return true;\n }\n function testArgs4(x, y, z) {\n // Properties of the arguments object are enumerable.\n var a = Object.keys(arguments);\n if (a.length === 4 && a[0] === \"0\" && a[1] === \"1\" && a[2] === \"2\" && a[3] === \"3\")\n return true;\n }\n return testArgs2(1, 2) && testArgs3(1, 2, 3) && testArgs4(1, 2, 3, 4);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.keys))"
+ },
+ {
+ "id": "15.2.3.14-3-5",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.14/15.2.3.14-3-5.js",
+ "description": "Object.keys must return a fresh array on each invocation",
+ "test": "assertTrue((function testcase() {\n var literal = {a: 1};\n var keysBefore = Object.keys(literal);\n if (keysBefore[0] != 'a') return false;\n keysBefore[0] = 'x';\n var keysAfter = Object.keys(literal);\n return (keysBefore[0] == 'x') && (keysAfter[0] == 'a');\n }).call(this));\n",
+ "precondition": "(fnExists(Object.keys))"
+ },
+ {
+ "id": "15.2.3.14-3-6",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.14/15.2.3.14-3-6.js",
+ "description": "Object.keys - returns the standard built-in Array (instanceof Array)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n var arr = Object.keys(obj);\n\n return arr instanceof Array;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.keys))"
+ },
+ {
+ "id": "15.2.3.14-3-7",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.14/15.2.3.14-3-7.js",
+ "description": "Object.keys - length of the returned array equals the number of own enumerable properties of 'O'",
+ "test": "assertTrue((function testcase() {\n var obj = { prop1: 1001, prop2: 1002 };\n\n Object.defineProperty(obj, \"prop3\", {\n value: 1003,\n enumerable: true,\n configurable: true\n });\n\n Object.defineProperty(obj, \"prop4\", {\n get: function () {\n return 1003;\n },\n enumerable: false,\n configurable: true\n });\n\n var arr = Object.keys(obj);\n\n return arr.length === 3;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.keys) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.14-4-1",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.14/15.2.3.14-4-1.js",
+ "description": "Object.keys - elements of the returned array start from index 0",
+ "test": "assertTrue((function testcase() {\n var obj = { prop1: 1001, prop2: 1002 };\n\n Object.defineProperty(obj, \"prop3\", {\n value: 1003,\n enumerable: true,\n configurable: true\n });\n\n Object.defineProperty(obj, \"prop4\", {\n get: function () {\n return 1003;\n },\n enumerable: true,\n configurable: true\n });\n\n var arr = Object.keys(obj);\n\n return arr.hasOwnProperty(0) && arr[0] === \"prop1\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.keys) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.14-5-1",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.14/15.2.3.14-5-1.js",
+ "description": "Object.keys - own enumerable data property of 'O' is defined in returned array",
+ "test": "assertTrue((function testcase() {\n var obj = { };\n\n Object.defineProperty(obj, \"prop\", {\n value: 1003,\n enumerable: true,\n configurable: true\n });\n\n var arr = Object.keys(obj);\n\n return arr.hasOwnProperty(0) && arr[0] === \"prop\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.keys) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.14-5-10",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.14/15.2.3.14-5-10.js",
+ "description": "Object.keys - inherted enumerable accessor property that is over-ridden by non-enumerable own accessor property is not defined in returned array",
+ "test": "assertTrue((function testcase() {\n var proto = {};\n Object.defineProperty(proto, \"prop\", {\n get: function () { },\n enumerable: true,\n configurable: true\n });\n var Con = function () { };\n Con.prototype = proto;\n\n var obj = new Con();\n Object.defineProperty(obj, \"prop\", {\n get: function () { },\n enumerable: false,\n configurable: true\n });\n\n var arr = Object.keys(obj);\n\n for (var p in arr) {\n if (arr[p] === \"prop\") {\n return false;\n }\n }\n\n return true;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.keys) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.14-5-11",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.14/15.2.3.14-5-11.js",
+ "description": "Object.keys - own enumerable indexed data property of dense array 'O' is defined in returned array",
+ "test": "assertTrue((function testcase() {\n var obj = [1, 2, 3, 4, 5];\n\n var arr = Object.keys(obj);\n\n var initValue = 0;\n for (var p in arr) {\n if (arr.hasOwnProperty(p)) {\n if (arr[p] !== initValue.toString()) {\n return false;\n }\n initValue++;\n }\n }\n\n return true;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.keys))"
+ },
+ {
+ "id": "15.2.3.14-5-12",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.14/15.2.3.14-5-12.js",
+ "description": "Object.keys - own enumerable indexed accessor property of dense array 'O' is defined in returned array",
+ "test": "assertTrue((function testcase() {\n var obj = [2, 3, 4, 5];\n\n Object.defineProperty(obj, \"prop\", {\n get: function () {\n return 6;\n },\n enumerable: true,\n configurable: true\n });\n\n var arr = Object.keys(obj);\n\n for (var p in arr) {\n if (arr.hasOwnProperty(p)) {\n if (arr[p] === \"prop\") {\n return true;\n }\n }\n }\n\n return false;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.keys) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.14-5-13",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.14/15.2.3.14-5-13.js",
+ "description": "Object.keys - own enumerable indexed data property of sparse array 'O' is defined in returned array",
+ "test": "assertTrue((function testcase() {\n var obj = [1, , 3, , 5];\n\n Object.defineProperty(obj, 5, {\n value: 7,\n enumerable: false,\n configurable: true\n });\n\n Object.defineProperty(obj, 10000, {\n value: \"ElementWithLargeIndex\",\n enumerable: true,\n configurable: true\n });\n\n var arr = Object.keys(obj);\n\n var index;\n var initValue = 0;\n for (index = 0; index < 3; index++) {\n if (arr[index] !== initValue.toString()) {\n return false;\n }\n initValue += 2;\n }\n\n if (arr.length !== 4 || arr[3] !== \"10000\") {\n return false;\n }\n\n return true;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.keys) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.14-5-14",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.14/15.2.3.14-5-14.js",
+ "description": "Object.keys - own enumerable indexed accessor property of sparse array 'O' is defined in returned array",
+ "test": "assertTrue((function testcase() {\n var obj = [1, , 3, , 5];\n\n Object.defineProperty(obj, \"10000\", {\n get: function () {\n return \"ElementWithLargeIndex\";\n },\n enumerable: true,\n configurable: true\n });\n\n var arr = Object.keys(obj);\n\n for (var p in arr) {\n if (arr[p] === \"10000\") {\n return true;\n }\n }\n\n return false;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.keys) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.14-5-15",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.14/15.2.3.14-5-15.js",
+ "description": "Object.keys - own enumerable indexed data property of String object 'O' is defined in returned array",
+ "test": "assertTrue((function testcase() {\n var obj = new String(\"xyz\");\n obj[-20] = -20;\n obj[20] = 20;\n\n Object.defineProperty(obj, \"prop\", {\n value: 1003,\n enumerable: false,\n configurable: true\n });\n\n var arr = Object.keys(obj);\n\n for (var i = 0; i < arr.length; i++) {\n if (!obj.hasOwnProperty(arr[i])) {\n return false;\n }\n }\n\n return true;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.keys) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.14-5-16",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.14/15.2.3.14-5-16.js",
+ "description": "Object.keys - own enumerable indexed accessor property of String object 'O' is defined in returned array",
+ "test": "assertTrue((function testcase() {\n var obj = new String(\"xyz\");\n obj[-20] = -20;\n obj[20] = 20;\n\n Object.defineProperty(obj, \"prop1\", {\n get: function () { },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(obj, \"prop2\", {\n get: function () { },\n enumerable: false,\n configurable: true\n });\n\n var arr = Object.keys(obj);\n\n for (var i = 0; i < arr.length; i++) {\n if (!obj.hasOwnProperty(arr[i])) {\n return false;\n }\n }\n\n return true;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.keys) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.14-5-2",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.14/15.2.3.14-5-2.js",
+ "description": "Object.keys - own enumerable accessor property of 'O' is defined in returned array",
+ "test": "assertTrue((function testcase() {\n var obj = { };\n\n Object.defineProperty(obj, \"prop\", {\n get: function () {\n return 1003;\n },\n enumerable: true,\n configurable: true\n });\n\n var arr = Object.keys(obj);\n\n return arr.hasOwnProperty(0) && arr[0] === \"prop\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.keys) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.14-5-3",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.14/15.2.3.14-5-3.js",
+ "description": "Object.keys - non-enumerable own data property of 'O' is not defined in returned array",
+ "test": "assertTrue((function testcase() {\n var obj = { prop1: 1001, prop2: 1002 };\n\n Object.defineProperty(obj, \"prop3\", {\n value: 1003,\n enumerable: true,\n configurable: true\n });\n\n Object.defineProperty(obj, \"prop4\", {\n value: 1004,\n enumerable: false,\n configurable: true\n });\n\n var arr = Object.keys(obj);\n\n for (var p in arr) {\n if (arr.hasOwnProperty(p)) {\n if (arr[p] === \"prop4\") {\n return false;\n }\n }\n }\n\n return true;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.keys) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.14-5-4",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.14/15.2.3.14-5-4.js",
+ "description": "Object.keys - non-enumerable own accessor property of 'O' is not defined in returned array",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n Object.defineProperty(obj, \"prop1\", {\n get: function () { },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(obj, \"prop2\", {\n get: function () { },\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(obj, \"prop3\", {\n get: function () { },\n enumerable: true,\n configurable: true\n });\n\n var arr = Object.keys(obj);\n\n for (var p in arr) {\n if (arr.hasOwnProperty(p)) {\n if (arr[p] === \"prop2\") {\n return false;\n }\n }\n }\n\n return true;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.keys) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.14-5-5",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.14/15.2.3.14-5-5.js",
+ "description": "Object.keys - inherited enumerable data property of 'O' is not defined in returned array",
+ "test": "assertTrue((function testcase() {\n var proto = {};\n Object.defineProperty(proto, \"inheritedProp\", {\n value: 1003,\n enumerable: true,\n configurable: true\n });\n var Con = function () { };\n Con.prototype = proto;\n\n var obj = new Con();\n obj.prop = 1004;\n\n var arr = Object.keys(obj);\n\n for (var p in arr) {\n if (arr[p] === \"inheritedProp\") {\n return false;\n }\n }\n\n return true;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.keys) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.14-5-6",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.14/15.2.3.14-5-6.js",
+ "description": "Object.keys - inherited enumerable accessor property of 'O' is not defined in returned array",
+ "test": "assertTrue((function testcase() {\n var proto = {};\n Object.defineProperty(proto, \"inheritedProp\", {\n get: function () {\n return 1003;\n },\n enumerable: true,\n configurable: true\n });\n var Con = function () { };\n Con.prototype = proto;\n\n var obj = new Con();\n Object.defineProperty(obj, \"prop\", {\n get: function () {\n return 1004;\n },\n enumerable: true,\n configurable: true\n });\n\n var arr = Object.keys(obj);\n\n for (var p in arr) {\n if (arr[p] === \"inheritedProp\") {\n return false;\n }\n }\n\n return true;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.keys) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.14-5-7",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.14/15.2.3.14-5-7.js",
+ "description": "Object.keys - inherted enumerable data property that is over-ridden by non-enumerable own data property is not defined in returned array",
+ "test": "assertTrue((function testcase() {\n var proto = {};\n Object.defineProperty(proto, \"prop\", {\n value: 1003,\n enumerable: true,\n configurable: true\n });\n var Con = function () { };\n Con.prototype = proto;\n\n var obj = new Con();\n Object.defineProperty(obj, \"prop\", {\n value: 1004,\n enumerable: false,\n configurable: true\n });\n\n var arr = Object.keys(obj);\n\n for (var p in arr) {\n if (arr[p] === \"prop\") {\n return false;\n }\n }\n\n return true;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.keys) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.14-5-8",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.14/15.2.3.14-5-8.js",
+ "description": "Object.keys - inherted enumerable data property that is over-ridden by non-enumerable own accessor property is not defined in returned array",
+ "test": "assertTrue((function testcase() {\n var proto = {};\n Object.defineProperty(proto, \"prop\", {\n value: 1003,\n enumerable: true,\n configurable: true\n });\n var Con = function () { };\n Con.prototype = proto;\n\n var obj = new Con();\n Object.defineProperty(obj, \"prop\", {\n get: function () { },\n enumerable: false,\n configurable: true\n });\n\n var arr = Object.keys(obj);\n\n for (var p in arr) {\n if (arr[p] === \"prop\") {\n return false;\n }\n }\n\n return true;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.keys) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.14-5-9",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.14/15.2.3.14-5-9.js",
+ "description": "Object.keys - inherted enumerable accessor property that is over-ridden by non-enumerable own data property is not defined in returned array",
+ "test": "assertTrue((function testcase() {\n var proto = {};\n Object.defineProperty(proto, \"prop\", {\n get: function () { },\n enumerable: true,\n configurable: true\n });\n var Con = function () { };\n Con.prototype = proto;\n\n var obj = new Con();\n Object.defineProperty(obj, \"prop\", {\n value: 1003,\n enumerable: false,\n configurable: true\n });\n\n var arr = Object.keys(obj);\n\n for (var p in arr) {\n if (arr[p] === \"prop\") {\n return false;\n }\n }\n\n return true;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.keys) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.14-5-a-1",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.14/15.2.3.14-5-a-1.js",
+ "description": "Object.keys - 'value' attribute of element in returned array is correct.",
+ "test": "assertTrue((function testcase() {\n var obj = { prop1: 1 };\n\n var array = Object.keys(obj);\n\n var desc = Object.getOwnPropertyDescriptor(array, \"0\");\n\n return desc.hasOwnProperty(\"value\") && desc.value === \"prop1\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.keys))"
+ },
+ {
+ "id": "15.2.3.14-5-a-2",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.14/15.2.3.14-5-a-2.js",
+ "description": "Object.keys - 'writable' attribute of element of returned array is correct",
+ "test": "assertTrue((function testcase() {\n var obj = { prop1: 100 };\n\n var array = Object.keys(obj);\n\n try {\n array[0] = \"isWritable\";\n\n var desc = Object.getOwnPropertyDescriptor(array, \"0\");\n\n return array[0] === \"isWritable\" && desc.hasOwnProperty(\"writable\") && desc.writable === true;\n } catch (e) {\n return false;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.keys))"
+ },
+ {
+ "id": "15.2.3.14-5-a-3",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.14/15.2.3.14-5-a-3.js",
+ "description": "Object.keys - 'enumerable' attribute of element of returned array is correct",
+ "test": "assertTrue((function testcase() {\n var obj = { prop1: 100 };\n\n var array = Object.keys(obj);\n var desc = Object.getOwnPropertyDescriptor(array, \"0\");\n var result = false;\n for (var index in array) {\n if (obj.hasOwnProperty(array[index]) && array[index] === \"prop1\") {\n result = true;\n }\n }\n\n return result && desc.hasOwnProperty(\"enumerable\") && desc.enumerable === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.keys))"
+ },
+ {
+ "id": "15.2.3.14-5-a-4",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.14/15.2.3.14-5-a-4.js",
+ "description": "Object.keys - Verify that 'configurable' attribute of element of returned array is correct",
+ "test": "assertTrue((function testcase() {\n var obj = { prop1: 100 };\n\n var array = Object.keys(obj);\n var desc = Object.getOwnPropertyDescriptor(array, \"0\");\n\n delete array[0];\n\n return typeof array[0] === \"undefined\" && desc.hasOwnProperty(\"configurable\") && desc.configurable === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.keys))"
+ },
+ {
+ "id": "15.2.3.14-5-b-1",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.14/15.2.3.14-5-b-1.js",
+ "description": "Object.keys - Verify that 'index' of returned array is ascend by 1",
+ "test": "assertTrue((function testcase() {\n var obj = { prop1: 100, prop2: 200, prop3: 300 };\n\n var array = Object.keys(obj);\n\n var idx = 0;\n for (var index in array) {\n if (array.hasOwnProperty(index)) {\n if (index !== idx.toString()) {\n return false;\n }\n idx++;\n }\n }\n\n return true;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.keys))"
+ },
+ {
+ "id": "15.2.3.14-6-1",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.14/15.2.3.14-6-1.js",
+ "description": "Object.keys - the order of elements in returned array is the same with the order of properties in 'O' (dense array)",
+ "test": "assertTrue((function testcase() {\n var denseArray = [1, 2, 3];\n\n var tempArray = [];\n for (var p in denseArray) {\n if (denseArray.hasOwnProperty(p)) {\n tempArray.push(p);\n }\n }\n\n var returnedArray = Object.keys(denseArray);\n\n for (var index in returnedArray) {\n if (tempArray[index] !== returnedArray[index]) {\n return false;\n }\n }\n return true;\n\n }).call(this));\n",
+ "precondition": "(fnExists(Object.keys))"
+ },
+ {
+ "id": "15.2.3.14-6-2",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.14/15.2.3.14-6-2.js",
+ "description": "Object.keys - the order of elements in returned array is the same with the order of properties in 'O' (sparse array)",
+ "test": "assertTrue((function testcase() {\n var sparseArray = [1, 2, , 4, , 6];\n\n var tempArray = [];\n for (var p in sparseArray) {\n if (sparseArray.hasOwnProperty(p)) {\n tempArray.push(p);\n }\n }\n\n var returnedArray = Object.keys(sparseArray);\n\n for (var index in returnedArray) {\n if (tempArray[index] !== returnedArray[index]) {\n return false;\n }\n }\n return true;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.keys))"
+ },
+ {
+ "id": "15.2.3.14-6-3",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.14/15.2.3.14-6-3.js",
+ "description": "Object.keys - the order of elements in returned array is the same with the order of properties in 'O' (String object)",
+ "test": "assertTrue((function testcase() {\n var str = new String(\"abc\");\n\n var tempArray = [];\n for (var p in str) {\n if (str.hasOwnProperty(p)) {\n tempArray.push(p);\n }\n }\n\n var returnedArray = Object.keys(str);\n\n for (var index in returnedArray) {\n if (tempArray[index] !== returnedArray[index]) {\n return false;\n }\n }\n return true;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.keys))"
+ },
+ {
+ "id": "15.2.3.14-6-4",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.14/15.2.3.14-6-4.js",
+ "description": "Object.keys - the order of elements in returned array is the same with the order of properties in 'O' (Arguments object)",
+ "test": "assertTrue((function testcase() {\n var func = function (a, b, c) {\n return arguments;\n };\n\n var args = func(1, \"b\", false);\n\n var tempArray = [];\n for (var p in args) {\n if (args.hasOwnProperty(p)) {\n tempArray.push(p);\n }\n }\n\n var returnedArray = Object.keys(args);\n\n for (var index in returnedArray) {\n if (tempArray[index] !== returnedArray[index]) {\n return false;\n }\n }\n return true;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.keys))"
+ },
+ {
+ "id": "15.2.3.14-6-5",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.14/15.2.3.14-6-5.js",
+ "description": "Object.keys - the order of elements in returned array is the same with the order of properties in 'O' (any other built-in object)",
+ "test": "assertTrue((function testcase() {\n var obj = new Date();\n obj.prop1 = 100;\n obj.prop2 = \"prop2\";\n\n var tempArray = [];\n for (var p in obj) {\n if (obj.hasOwnProperty(p)) {\n tempArray.push(p);\n }\n }\n\n var returnedArray = Object.keys(obj);\n\n for (var index in returnedArray) {\n if (tempArray[index] !== returnedArray[index]) {\n return false;\n }\n }\n return true;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.keys))"
+ },
+ {
+ "id": "15.2.3.14-6-6",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.14/15.2.3.14-6-6.js",
+ "description": "Object.keys - the order of elements in returned array is the same with the order of properties in 'O' (global Object)",
+ "test": "assertTrue((function testcase() {\n var obj = fnGlobalObject();\n\n var tempArray = [];\n for (var p in obj) {\n if (obj.hasOwnProperty(p)) {\n tempArray.push(p);\n }\n }\n\n var returnedArray = Object.keys(obj);\n\n for (var index in returnedArray) {\n if (tempArray[index] !== returnedArray[index]) {\n return false;\n }\n }\n return true;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.keys))"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.2.3.1_Object.prototype.json b/website/resources/scripts/testcases2/15.2.3.1_Object.prototype.json
new file mode 100644
index 000000000..f837da8d7
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.2.3.1_Object.prototype.json
@@ -0,0 +1,23 @@
+{
+ "testCollection": {
+ "name": "15.2.3.1_Object.prototype",
+ "numTests": 3,
+ "tests": [
+ {
+ "section": "15.2.3.1, 15.2.4",
+ "description": "Checking if varying \"Object.prototype\" property fails",
+ "test": "var obj = Object.prototype;\nObject.prototype = function(){return \"shifted\";};\n\n//CHECK#1\nif (Object.prototype !== obj) {\n $ERROR('#1: the Object.prototype property has the attributes ReadOnly.');\n}\n\n//CHECK#2\ntry {\n Object.prototype();\n $ERROR('#2: the Object.prototype property has the attributes ReadOnly');\n} catch (e) {\n ;\n}\n",
+ "id": "S15.2.3.1_A1"
+ },
+ {
+ "section": "15.2.3.1, 15.2.4",
+ "description": "Checking if enumerating \"Object.prototype\" property fails",
+ "test": "// CHECK#1\nif (Object.propertyIsEnumerable('prototype')) {\n $ERROR('#1: the Object.prototype property has the attributes DontEnum');\n}\n\n// CHECK#2\nvar cout=0;\n\nfor (p in Object){\n if (p===\"prototype\") cout++;\n}\n\nif (cout !== 0) {\n $ERROR('#2: the Object.prototype property has the attributes DontEnum');\n}\n",
+ "id": "S15.2.3.1_A2"
+ },
+ {
+ "test": " // Copyright 2009 the Sputnik authors. All rights reserved.\n// This code is governed by the BSD license found in the LICENSE file.\n\n/**\n* @name: S15.2.3.1_A3;\n* @section: 15.2.3.1, 15.2.4;\n* @assertion: The Object.prototype property has the attribute DontDelete;\n* @description: Checking if deleting \"Object.prototype\" property fails;\n* @strict_mode_negative\n*/\n\ndelete Object.prototype;\n\n//CHECK#2\nif (!(Object.hasOwnProperty('prototype'))) {\n $ERROR('#2: the Object.prototype property has the attributes DontDelete.');\n}\n"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.2.3.2.json b/website/resources/scripts/testcases2/15.2.3.2.json
new file mode 100644
index 000000000..ad38ccac6
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.2.3.2.json
@@ -0,0 +1,266 @@
+{
+ "testCollection": {
+ "name": "15.2.3.2",
+ "numTests": 37,
+ "tests": [
+ {
+ "id": "15.2.3.2-0-1",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.2/15.2.3.2-0-1.js",
+ "description": "Object.getPrototypeOf must exist as a function",
+ "test": "assertTrue((typeof(Object.getPrototypeOf) === \"function\"));\n"
+ },
+ {
+ "id": "15.2.3.2-0-2",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.2/15.2.3.2-0-2.js",
+ "description": "Object.getPrototypeOf must exist as a function taking 1 parameter",
+ "test": "assertTrue((Object.getPrototypeOf.length === 1));\n",
+ "precondition": "(fnExists(Object.getPrototypeOf))"
+ },
+ {
+ "id": "15.2.3.2-0-3",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.2/15.2.3.2-0-3.js",
+ "description": "Object.getPrototypeOf must take 1 parameter",
+ "test": "assertTrue((function testcase() {\n try\n {\n Object.getPrototypeOf();\n }\n catch(e)\n {\n if(e instanceof TypeError)\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getPrototypeOf))"
+ },
+ {
+ "id": "15.2.3.2-1-2",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.2/15.2.3.2-1-2.js",
+ "description": "Object.getPrototypeOf throws TypeError if 'O' is null",
+ "test": "assertTrue((function testcase() {\n try {\n Object.getPrototypeOf(null);\n return false;\n } catch (e) {\n return (e instanceof TypeError);\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getPrototypeOf))"
+ },
+ {
+ "id": "15.2.3.2-1-3",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.2/15.2.3.2-1-3.js",
+ "description": "Object.getPrototypeOf throws TypeError if 'O' is a boolean",
+ "test": "assertTrue((function testcase() {\n try {\n Object.getPrototypeOf(true);\n return false;\n } catch (e) {\n return (e instanceof TypeError);\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getPrototypeOf))"
+ },
+ {
+ "id": "15.2.3.2-1-4",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.2/15.2.3.2-1-4.js",
+ "description": "Object.getPrototypeOf throws TypeError if 'O' is a string",
+ "test": "assertTrue((function testcase() {\n try {\n Object.getPrototypeOf(\"abc\");\n return false;\n } catch (e) {\n return (e instanceof TypeError);\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getPrototypeOf))"
+ },
+ {
+ "id": "15.2.3.2-1",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.2/15.2.3.2-1.js",
+ "description": "Object.getPrototypeOf throws TypeError if type of first param is not Object",
+ "test": "assertTrue((function testcase() {\n try {\n Object.getPrototypeOf(0);\n }\n catch (e) {\n if (e instanceof TypeError) {\n return true;\n }\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getPrototypeOf))"
+ },
+ {
+ "id": "15.2.3.2-2-1",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-1.js",
+ "description": "Object.getPrototypeOf returns the [[Prototype]] of its parameter (Boolean)",
+ "test": "assertTrue((Object.getPrototypeOf(Boolean) === Function.prototype));\n",
+ "precondition": "(fnExists(Object.getPrototypeOf))"
+ },
+ {
+ "id": "15.2.3.2-2-10",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-10.js",
+ "description": "Object.getPrototypeOf returns the [[Prototype]] of its parameter (RegExp)",
+ "test": "assertTrue((Object.getPrototypeOf(RegExp) === Function.prototype));\n",
+ "precondition": "(fnExists(Object.getPrototypeOf))"
+ },
+ {
+ "id": "15.2.3.2-2-11",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-11.js",
+ "description": "Object.getPrototypeOf returns the [[Prototype]] of its parameter (Error)",
+ "test": "assertTrue((Object.getPrototypeOf(Error) === Function.prototype));\n",
+ "precondition": "(fnExists(Object.getPrototypeOf))"
+ },
+ {
+ "id": "15.2.3.2-2-12",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-12.js",
+ "description": "Object.getPrototypeOf returns the [[Prototype]] of its parameter (EvalError)",
+ "test": "assertTrue((Object.getPrototypeOf(EvalError) === Function.prototype));\n",
+ "precondition": "(fnExists(Object.getPrototypeOf))"
+ },
+ {
+ "id": "15.2.3.2-2-13",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-13.js",
+ "description": "Object.getPrototypeOf returns the [[Prototype]] of its parameter (RangeError)",
+ "test": "assertTrue((Object.getPrototypeOf(RangeError) === Function.prototype));\n",
+ "precondition": "(fnExists(Object.getPrototypeOf))"
+ },
+ {
+ "id": "15.2.3.2-2-14",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-14.js",
+ "description": "Object.getPrototypeOf returns the [[Prototype]] of its parameter (ReferenceError)",
+ "test": "assertTrue((Object.getPrototypeOf(ReferenceError) === Function.prototype));\n",
+ "precondition": "(fnExists(Object.getPrototypeOf))"
+ },
+ {
+ "id": "15.2.3.2-2-15",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-15.js",
+ "description": "Object.getPrototypeOf returns the [[Prototype]] of its parameter (SyntaxError)",
+ "test": "assertTrue((Object.getPrototypeOf(SyntaxError) === Function.prototype));\n",
+ "precondition": "(fnExists(Object.getPrototypeOf))"
+ },
+ {
+ "id": "15.2.3.2-2-16",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-16.js",
+ "description": "Object.getPrototypeOf returns the [[Prototype]] of its parameter (TypeError)",
+ "test": "assertTrue((Object.getPrototypeOf(TypeError) === Function.prototype));\n",
+ "precondition": "(fnExists(Object.getPrototypeOf))"
+ },
+ {
+ "id": "15.2.3.2-2-17",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-17.js",
+ "description": "Object.getPrototypeOf returns the [[Prototype]] of its parameter (URIError)",
+ "test": "assertTrue((Object.getPrototypeOf(URIError) === Function.prototype));\n",
+ "precondition": "(fnExists(Object.getPrototypeOf))"
+ },
+ {
+ "id": "15.2.3.2-2-18",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-18.js",
+ "description": "Object.getPrototypeOf returns the [[Prototype]] of its parameter (JSON)",
+ "test": "assertTrue((Object.getPrototypeOf(JSON) === Object.prototype));\n",
+ "precondition": "(fnExists(Object.getPrototypeOf))"
+ },
+ {
+ "id": "15.2.3.2-2-19",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-19.js",
+ "description": "Object.getPrototypeOf returns the [[Prototype]] of its parameter (Object object)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n return Object.getPrototypeOf(obj) === Object.prototype;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getPrototypeOf))"
+ },
+ {
+ "id": "15.2.3.2-2-2",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-2.js",
+ "description": "Object.getPrototypeOf returns the [[Prototype]] of its parameter (custom object)",
+ "test": "assertTrue((function testcase() {\n function base() {}\n\n function derived() {}\n derived.prototype = new base();\n\n var d = new derived();\n var x = Object.getPrototypeOf(d);\n if (x.isPrototypeOf(d) === true) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getPrototypeOf))"
+ },
+ {
+ "id": "15.2.3.2-2-20",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-20.js",
+ "description": "Object.getPrototypeOf returns the [[Prototype]] of its parameter (Function Object)",
+ "test": "assertTrue((function testcase() {\n var obj = function (a, b) {\n return a + b;\n };\n\n return Object.getPrototypeOf(obj) === Function.prototype;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getPrototypeOf))"
+ },
+ {
+ "id": "15.2.3.2-2-21",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-21.js",
+ "description": "Object.getPrototypeOf returns the [[Prototype]] of its parameter (Array object)",
+ "test": "assertTrue((function testcase() {\n var arr = [1, 2, 3];\n\n return Object.getPrototypeOf(arr) === Array.prototype; \n }).call(this));\n",
+ "precondition": "(fnExists(Object.getPrototypeOf))"
+ },
+ {
+ "id": "15.2.3.2-2-22",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-22.js",
+ "description": "Object.getPrototypeOf returns the [[Prototype]] of its parameter (String object)",
+ "test": "assertTrue((function testcase() {\n var obj = new String(\"abc\");\n\n return Object.getPrototypeOf(obj) === String.prototype;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getPrototypeOf))"
+ },
+ {
+ "id": "15.2.3.2-2-23",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-23.js",
+ "description": "Object.getPrototypeOf returns the [[Prototype]] of its parameter (Boolean object)",
+ "test": "assertTrue((function testcase() {\n var obj = new Boolean(true);\n\n return Object.getPrototypeOf(obj) === Boolean.prototype;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getPrototypeOf))"
+ },
+ {
+ "id": "15.2.3.2-2-24",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-24.js",
+ "description": "Object.getPrototypeOf returns the [[Prototype]] of its parameter (Number object)",
+ "test": "assertTrue((function testcase() {\n var obj = new Number(-3);\n\n return Object.getPrototypeOf(obj) === Number.prototype;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getPrototypeOf))"
+ },
+ {
+ "id": "15.2.3.2-2-25",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-25.js",
+ "description": "Object.getPrototypeOf returns the [[Prototype]] of its parameter (Date object)",
+ "test": "assertTrue((function testcase() {\n var obj = new Date();\n\n return Object.getPrototypeOf(obj) === Date.prototype;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getPrototypeOf))"
+ },
+ {
+ "id": "15.2.3.2-2-26",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-26.js",
+ "description": "Object.getPrototypeOf returns the [[Prototype]] of its parameter (RegExp object)",
+ "test": "assertTrue((function testcase() {\n var obj = new RegExp();\n\n return Object.getPrototypeOf(obj) === RegExp.prototype;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getPrototypeOf))"
+ },
+ {
+ "id": "15.2.3.2-2-27",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-27.js",
+ "description": "Object.getPrototypeOf returns the [[Prototype]] of its parameter (Error object)",
+ "test": "assertTrue((function testcase() {\n var obj = new Error();\n\n return Object.getPrototypeOf(obj) === Error.prototype;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getPrototypeOf))"
+ },
+ {
+ "id": "15.2.3.2-2-28",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-28.js",
+ "description": "Object.getPrototypeOf returns the [[Prototype]] of its parameter (the Arguments object)",
+ "test": "assertTrue((function testcase() {\n function fun() {\n return arguments;\n }\n var obj = fun(1, true, 3);\n\n return Object.getPrototypeOf(obj) === Object.prototype;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getPrototypeOf))"
+ },
+ {
+ "id": "15.2.3.2-2-3",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-3.js",
+ "description": "Object.getPrototypeOf returns the [[Prototype]] of its parameter (Object)",
+ "test": "assertTrue((Object.getPrototypeOf(Object) === Function.prototype));\n",
+ "precondition": "(fnExists(Object.getPrototypeOf))"
+ },
+ {
+ "id": "15.2.3.2-2-30",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-30.js",
+ "description": "Object.getPrototypeOf returns the [[Prototype]] of its parameter (the global object)",
+ "test": "assertTrue((function testcase() {\n var proto = Object.getPrototypeOf(fnGlobalObject());\n\n return proto.isPrototypeOf(fnGlobalObject()) === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getPrototypeOf))"
+ },
+ {
+ "id": "15.2.3.2-2-31",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-31.js",
+ "description": "Object.getPrototypeOf returns null",
+ "test": "assertTrue(((Object.getPrototypeOf(Object.prototype) === null)));\n",
+ "precondition": "(fnExists(Object.getPrototypeOf))"
+ },
+ {
+ "id": "15.2.3.2-2-4",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-4.js",
+ "description": "Object.getPrototypeOf returns the [[Prototype]] of its parameter (Function)",
+ "test": "assertTrue((Object.getPrototypeOf(Function) === Function.prototype));\n",
+ "precondition": "(fnExists(Object.getPrototypeOf))"
+ },
+ {
+ "id": "15.2.3.2-2-5",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-5.js",
+ "description": "Object.getPrototypeOf returns the [[Prototype]] of its parameter (Array)",
+ "test": "assertTrue((Object.getPrototypeOf(Array) === Function.prototype));\n",
+ "precondition": "(fnExists(Object.getPrototypeOf))"
+ },
+ {
+ "id": "15.2.3.2-2-6",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-6.js",
+ "description": "Object.getPrototypeOf returns the [[Prototype]] of its parameter (String)",
+ "test": "assertTrue((Object.getPrototypeOf(String) === Function.prototype));\n",
+ "precondition": "(fnExists(Object.getPrototypeOf))"
+ },
+ {
+ "id": "15.2.3.2-2-7",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-7.js",
+ "description": "Object.getPrototypeOf returns the [[Prototype]] of its parameter (Number)",
+ "test": "assertTrue((Object.getPrototypeOf(Number) === Function.prototype));\n",
+ "precondition": "(fnExists(Object.getPrototypeOf))"
+ },
+ {
+ "id": "15.2.3.2-2-8",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-8.js",
+ "description": "Object.getPrototypeOf returns the [[Prototype]] of its parameter (Math)",
+ "test": "assertTrue((Object.getPrototypeOf(Math) === Object.prototype));\n",
+ "precondition": "(fnExists(Object.getPrototypeOf))"
+ },
+ {
+ "id": "15.2.3.2-2-9",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.2/15.2.3.2-2-9.js",
+ "description": "Object.getPrototypeOf returns the [[Prototype]] of its parameter (Date)",
+ "test": "assertTrue((Object.getPrototypeOf(Date) === Function.prototype));\n",
+ "precondition": "(fnExists(Object.getPrototypeOf))"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.2.3.3.json b/website/resources/scripts/testcases2/15.2.3.3.json
new file mode 100644
index 000000000..8a5104542
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.2.3.3.json
@@ -0,0 +1,2198 @@
+{
+ "testCollection": {
+ "name": "15.2.3.3",
+ "numTests": 313,
+ "tests": [
+ {
+ "id": "15.2.3.3-0-1",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-0-1.js",
+ "description": "Object.getOwnPropertyDescriptor must exist as a function",
+ "test": "assertTrue((typeof(Object.getOwnPropertyDescriptor) === \"function\"));\n"
+ },
+ {
+ "id": "15.2.3.3-0-2",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-0-2.js",
+ "description": "Object.getOwnPropertyDescriptor must exist as a function taking 2 parameters",
+ "test": "assertTrue((Object.getOwnPropertyDescriptor.length === 2));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-1-1",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-1-1.js",
+ "description": "Object.getOwnPropertyDescriptor - TypeError is thrown when first param is undefined",
+ "test": "assertTrue((function testcase() {\n try {\n Object.getOwnPropertyDescriptor(undefined, \"foo\");\n } catch (e) {\n return (e instanceof TypeError);\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-1-2",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-1-2.js",
+ "description": "Object.getOwnPropertyDescriptor - TypeError is thrown when first param is null",
+ "test": "assertTrue((function testcase() {\n try {\n Object.getOwnPropertyDescriptor(null, \"foo\");\n } catch (e) {\n return (e instanceof TypeError);\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-1-3",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-1-3.js",
+ "description": "Object.getOwnPropertyDescriptor - TypeError is thrown when first param is a boolean",
+ "test": "assertTrue((function testcase() {\n try {\n Object.getOwnPropertyDescriptor(true, \"foo\");\n } catch (e) {\n return (e instanceof TypeError);\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-1-4",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-1-4.js",
+ "description": "Object.getOwnPropertyDescriptor - TypeError is thrown when first param is a number",
+ "test": "assertTrue((function testcase() {\n try {\n Object.getOwnPropertyDescriptor(-2, \"foo\");\n } catch (e) {\n return (e instanceof TypeError);\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-1",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-1.js",
+ "description": "Object.getOwnPropertyDescriptor throws TypeError if type of first param is not Object",
+ "test": "assertTrue((function testcase() {\n try {\n Object.getOwnPropertyDescriptor(0, \"foo\");\n }\n catch (e) {\n if (e instanceof TypeError) {\n return true;\n }\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-2-1",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-1.js",
+ "description": "Object.getOwnPropertyDescriptor returns undefined for undefined property name",
+ "test": "assertTrue((function testcase() {\n var o = {};\n var desc = Object.getOwnPropertyDescriptor(o, undefined);\n if (desc === undefined) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-2-10",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-10.js",
+ "description": "Object.getOwnPropertyDescriptor - argument 'P' is a number that converts to a string (value is -0)",
+ "test": "assertTrue((function testcase() {\n var obj = { \"0\": 1 };\n\n var desc = Object.getOwnPropertyDescriptor(obj, -0);\n\n return desc.value === 1;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-2-11",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-11.js",
+ "description": "Object.getOwnPropertyDescriptor - argument 'P' is a number that converts to a string (value is positive number)",
+ "test": "assertTrue((function testcase() {\n var obj = { \"30\": 1 };\n\n var desc = Object.getOwnPropertyDescriptor(obj, 30);\n\n return desc.value === 1;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-2-12",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-12.js",
+ "description": "Object.getOwnPropertyDescriptor - argument 'P' is a number that converts to a string (value is negative number)",
+ "test": "assertTrue((function testcase() {\n var obj = { \"-20\": 1 };\n\n var desc = Object.getOwnPropertyDescriptor(obj, -20);\n\n return desc.value === 1;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-2-13",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-13.js",
+ "description": "Object.getOwnPropertyDescriptor - argument 'P' is a number that converts to a string (value is Infinity)",
+ "test": "assertTrue((function testcase() {\n var obj = { \"Infinity\": 1 };\n\n var desc = Object.getOwnPropertyDescriptor(obj, Infinity);\n\n return desc.value === 1;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-2-14",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-14.js",
+ "description": "Object.getOwnPropertyDescriptor - argument 'P' is a number that converts to a string (value is +Infinity)",
+ "test": "assertTrue((function testcase() {\n var obj = { \"Infinity\": 1 };\n\n var desc = Object.getOwnPropertyDescriptor(obj, +Infinity);\n\n return desc.value === 1;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-2-15",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-15.js",
+ "description": "Object.getOwnPropertyDescriptor - argument 'P' is a number that converts to a string (value is -Infinity)",
+ "test": "assertTrue((function testcase() {\n var obj = { \"-Infinity\": 1 };\n\n var desc = Object.getOwnPropertyDescriptor(obj, -Infinity);\n\n return desc.value === 1;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-2-16",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-16.js",
+ "description": "Object.getOwnPropertyDescriptor - argument 'P' is a number that converts to a string (value is 1(following 20 zeros))",
+ "test": "assertTrue((function testcase() {\n var obj = { \"100000000000000000000\": 1 };\n\n var desc = Object.getOwnPropertyDescriptor(obj, 100000000000000000000);\n\n return desc.value === 1;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-2-17",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-17.js",
+ "description": "Object.getOwnPropertyDescriptor - argument 'P' is a number that converts to a string (value is 1(following 21 zeros))",
+ "test": "assertTrue((function testcase() {\n var obj = { \"1e+21\": 1 };\n\n var desc = Object.getOwnPropertyDescriptor(obj, 1000000000000000000000);\n\n return desc.value === 1;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-2-18",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-18.js",
+ "description": "Object.getOwnPropertyDescriptor - argument 'P' is a number that converts to a string (value is 1(following 22 zeros))",
+ "test": "assertTrue((function testcase() {\n var obj = { \"1e+22\": 1 };\n\n var desc = Object.getOwnPropertyDescriptor(obj, 10000000000000000000000);\n\n return desc.value === 1;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-2-19",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-19.js",
+ "description": "Object.getOwnPropertyDescriptor - argument 'P' is a number that converts to a string (value is 1e+20)",
+ "test": "assertTrue((function testcase() {\n var obj = { \"100000000000000000000\": 1 };\n\n var desc = Object.getOwnPropertyDescriptor(obj, 1e+20);\n\n return desc.value === 1;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-2-2",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-2.js",
+ "description": "Object.getOwnPropertyDescriptor returns undefined for null property name",
+ "test": "assertTrue((function testcase() {\n var o = {};\n var desc = Object.getOwnPropertyDescriptor(o, null);\n if (desc === undefined) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-2-20",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-20.js",
+ "description": "Object.getOwnPropertyDescriptor - argument 'P' is a number that converts to string (value is 1e+21)",
+ "test": "assertTrue((function testcase() {\n var obj = { \"1e+21\": 1 };\n\n var desc = Object.getOwnPropertyDescriptor(obj, 1e+21);\n\n return desc.value === 1;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-2-21",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-21.js",
+ "description": "Object.getOwnPropertyDescriptor - argument 'P' is a number that converts to a string (value is 1e+22)",
+ "test": "assertTrue((function testcase() {\n var obj = { \"1e+22\": 1 };\n\n var desc = Object.getOwnPropertyDescriptor(obj, 1e+22);\n\n return desc.value === 1;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-2-22",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-22.js",
+ "description": "Object.getOwnPropertyDescriptor - argument 'P' is a number that converts to a string (value is 0.000001)",
+ "test": "assertTrue((function testcase() {\n var obj = { \"0.000001\": 1 };\n\n var desc = Object.getOwnPropertyDescriptor(obj, 0.000001);\n\n return desc.value === 1;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-2-23",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-23.js",
+ "description": "Object.getOwnPropertyDescriptor - argument 'P' is a number that converts to a string (value is 0.0000001)",
+ "test": "assertTrue((function testcase() {\n var obj = { \"1e-7\": 1 };\n\n var desc = Object.getOwnPropertyDescriptor(obj, 0.0000001);\n\n return desc.value === 1;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-2-24",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-24.js",
+ "description": "Object.getOwnPropertyDescriptor - argument 'P' is a number that converts to a string (value is 0.00000001)",
+ "test": "assertTrue((function testcase() {\n var obj = { \"1e-8\": 1 };\n\n var desc = Object.getOwnPropertyDescriptor(obj, 0.00000001);\n\n return desc.value === 1;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-2-25",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-25.js",
+ "description": "Object.getOwnPropertyDescriptor - argument 'P' is a number that converts to a string (value is 1e-7)",
+ "test": "assertTrue((function testcase() {\n var obj = { \"1e-7\": 1 };\n\n var desc = Object.getOwnPropertyDescriptor(obj, 1e-7);\n\n return desc.value === 1;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-2-26",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-26.js",
+ "description": "Object.getOwnPropertyDescriptor - argument 'P' is a number that converts to a string (value is 1e-6)",
+ "test": "assertTrue((function testcase() {\n var obj = { \"0.000001\": 1 };\n\n var desc = Object.getOwnPropertyDescriptor(obj, 1e-6);\n\n return desc.value === 1;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-2-27",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-27.js",
+ "description": "Object.getOwnPropertyDescriptor - argument 'P' is a number that converts to a string (value is 1e-5)",
+ "test": "assertTrue((function testcase() {\n var obj = { \"0.00001\": 1 };\n\n var desc = Object.getOwnPropertyDescriptor(obj, 1e-5);\n\n return desc.value === 1;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-2-28",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-28.js",
+ "description": "Object.getOwnPropertyDescriptor - argument 'P' is an integer that converts to a string (value is 123)",
+ "test": "assertTrue((function testcase() {\n var obj = { \"123\": 1 };\n\n var desc = Object.getOwnPropertyDescriptor(obj, 123);\n\n return desc.value === 1;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-2-29",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-29.js",
+ "description": "Object.getOwnPropertyDescriptor - argument 'P' is a decimal that converts to a string (value is 123.456)",
+ "test": "assertTrue((function testcase() {\n var obj = { \"123.456\": 1 };\n\n var desc = Object.getOwnPropertyDescriptor(obj, 123.456);\n\n return desc.value === 1;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-2-3",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-3.js",
+ "description": "Object.getOwnPropertyDescriptor - argument 'P' is undefined",
+ "test": "assertTrue((function testcase() {\n var obj = { \"undefined\": 1 };\n\n var desc1 = Object.getOwnPropertyDescriptor(obj, undefined);\n var desc2 = Object.getOwnPropertyDescriptor(obj, \"undefined\");\n\n return desc1.value === 1 && desc2.value === 1;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-2-30",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-30.js",
+ "description": "Object.getOwnPropertyDescriptor - argument 'P' is a number that converts to a string (value is 100000000000000000000.123)",
+ "test": "assertTrue((function testcase() {\n var obj = { \"100000000000000000000\": 1 };\n\n var desc = Object.getOwnPropertyDescriptor(obj, 100000000000000000000.123);\n\n return typeof desc !== \"undefined\" && desc.value === 1;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-2-31",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-31.js",
+ "description": "Object.getOwnPropertyDescriptor - argument 'P' is a number that converts to a string (value is 123.1234567)",
+ "test": "assertTrue((function testcase() {\n var obj = { \"123.1234567\": 1 };\n\n var desc = Object.getOwnPropertyDescriptor(obj, 123.1234567);\n\n return desc.value === 1;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-2-32",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-32.js",
+ "description": "Object.getOwnPropertyDescriptor - argument 'P' is applied to an empty string ",
+ "test": "assertTrue((function testcase() {\n var obj = { \"\": 1 };\n\n var desc = Object.getOwnPropertyDescriptor(obj, \"\");\n\n return desc.value === 1;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-2-33",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-33.js",
+ "description": "Object.getOwnPropertyDescriptor - argument 'P' is applied to string 'AB\n\\cd' ",
+ "test": "assertTrue((function testcase() {\n var obj = { \"AB\\n\\\\cd\": 1 };\n\n var desc = Object.getOwnPropertyDescriptor(obj, \"AB\\n\\\\cd\");\n\n return desc.value === 1;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-2-34",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-34.js",
+ "description": "Object.getOwnPropertyDescriptor - argument 'P' is applied to string 'undefined' ",
+ "test": "assertTrue((function testcase() {\n var obj = { \"undefined\": 1 };\n\n var desc = Object.getOwnPropertyDescriptor(obj, \"undefined\");\n\n return desc.value === 1;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-2-35",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-35.js",
+ "description": "Object.getOwnPropertyDescriptor - argument 'P' is applied to string 'null' ",
+ "test": "assertTrue((function testcase() {\n var obj = { \"null\": 1 };\n\n var desc = Object.getOwnPropertyDescriptor(obj, \"null\");\n\n return desc.value === 1;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-2-36",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-36.js",
+ "description": "Object.getOwnPropertyDescriptor - argument 'P' is applied to string '123���¦�cd' ",
+ "test": "assertTrue((function testcase() {\n var obj = { \"123���¦�cd\": 1 };\n\n var desc = Object.getOwnPropertyDescriptor(obj, \"123���¦�cd\");\n\n return desc.value === 1;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-2-37",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-37.js",
+ "description": "Object.getOwnPropertyDescriptor - argument 'P' is applied to string '1' ",
+ "test": "assertTrue((function testcase() {\n var obj = { \"1\": 1 };\n\n var desc = Object.getOwnPropertyDescriptor(obj, 1);\n\n return desc.value === 1;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-2-38",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-38.js",
+ "description": "Object.getOwnPropertyDescriptor - argument 'P' is an array that converts to a string",
+ "test": "assertTrue((function testcase() {\n var obj = { \"1\": 1 };\n\n var desc = Object.getOwnPropertyDescriptor(obj, [1]);\n\n return desc.value === 1;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-2-39",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-39.js",
+ "description": "Object.getOwnPropertyDescriptor - argument 'P' is a String Object that converts to a string",
+ "test": "assertTrue((function testcase() {\n var obj = { \"Hello\": 1 };\n\n var desc = Object.getOwnPropertyDescriptor(obj, new String(\"Hello\"));\n\n return desc.value === 1;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-2-4",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-4.js",
+ "description": "Object.getOwnPropertyDescriptor - argument 'P' is null that converts to string 'null'",
+ "test": "assertTrue((function testcase() {\n var obj = { \"null\": 1 };\n\n var desc = Object.getOwnPropertyDescriptor(obj, null);\n\n return desc.value === 1;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-2-40",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-40.js",
+ "description": "Object.getOwnPropertyDescriptor - argument 'P' is a Boolean Object that converts to a string",
+ "test": "assertTrue((function testcase() {\n var obj = { \"true\": 1 };\n\n var desc = Object.getOwnPropertyDescriptor(obj, new Boolean(true));\n\n return desc.value === 1;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-2-41",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-41.js",
+ "description": "Object.getOwnPropertyDescriptor - argument 'P' is a Number Object that converts to a string",
+ "test": "assertTrue((function testcase() {\n var obj = { \"123\": 1 };\n\n var desc = Object.getOwnPropertyDescriptor(obj, new Number(123));\n\n return desc.value === 1;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-2-42",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-42.js",
+ "description": "Object.getOwnPropertyDescriptor - argument 'P' is an object which has an own toString method",
+ "test": "assertTrue((function testcase() {\n var obj = { \"abc\": 1 };\n\n var ownProp = {\n toString: function () {\n return \"abc\";\n }\n };\n\n var desc = Object.getOwnPropertyDescriptor(obj, ownProp);\n\n return desc.value === 1;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-2-43",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-43.js",
+ "description": "Object.getOwnPropertyDescriptor - argument 'P' is an object which has an own valueOf method",
+ "test": "assertTrue((function testcase() {\n var obj = { \"[object Object]\": 1, \"abc\" : 2 };\n\n var ownProp = {\n valueOf: function () {\n return \"abc\";\n }\n };\n\n var desc = Object.getOwnPropertyDescriptor(obj, ownProp);\n\n return desc.value === 1;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-2-44",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-44.js",
+ "description": "Object.getOwnPropertyDescriptor - argument 'P' is an object that has an own toString method that returns an object and toValue method that returns a primitive value",
+ "test": "assertTrue((function testcase() {\n var obj = { \"abc\": 1 };\n var valueOfAccessed = false;\n var toStringAccessed = false;\n\n var ownProp = {\n toString: function () {\n toStringAccessed = true;\n return {};\n },\n valueOf: function () {\n valueOfAccessed = true;\n return \"abc\";\n }\n };\n\n var desc = Object.getOwnPropertyDescriptor(obj, ownProp);\n\n return desc.value === 1 && valueOfAccessed && toStringAccessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-2-45",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-45.js",
+ "description": "Object.getOwnPropertyDescriptor - argument 'P' is an object which has an own toString and valueOf method",
+ "test": "assertTrue((function testcase() {\n var obj = { \"bbq\": 1, \"abc\": 2 };\n var valueOfAccessed = false;\n\n var ownProp = {\n toString: function () {\n return \"bbq\";\n },\n valueOf: function () {\n valueOfAccessed = true;\n return \"abc\";\n }\n };\n\n var desc = Object.getOwnPropertyDescriptor(obj, ownProp);\n\n return desc.value === 1 && !valueOfAccessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-2-46",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-46.js",
+ "description": "Object.getOwnPropertyDescriptor - TypeError exception was thrown when 'P' is an object that both toString and valueOf wouldn't return primitive value",
+ "test": "assertTrue((function testcase() {\n var obj = { \"1\": 1 };\n var toStringAccessed = false;\n var valueOfAccessed = false;\n\n var ownProp = {\n toString: function () {\n toStringAccessed = true;\n return [1];\n },\n valueOf: function () {\n valueOfAccessed = true;\n return [1];\n }\n };\n\n try {\n Object.getOwnPropertyDescriptor(obj, ownProp);\n return false;\n } catch (e) {\n return toStringAccessed && valueOfAccessed && e instanceof TypeError;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-2-47",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-47.js",
+ "description": "Object.getOwnPropertyDescriptor - uses inherited toString method when 'P' is an object with an own valueOf and inherited toString methods",
+ "test": "assertTrue((function testcase() {\n var proto = {};\n var valueOfAccessed = false;\n var toStringAccessed = false;\n\n proto.toString = function () {\n toStringAccessed = true;\n return \"test\";\n };\n\n var Con = function () { };\n Con.prototype = proto;\n\n var child = new Con();\n child.valueOf = function () {\n valueOfAccessed = true;\n return \"10\";\n };\n var obj = { \"10\": \"length1\", \"test\": \"length2\" };\n var desc = Object.getOwnPropertyDescriptor(obj, child);\n\n return desc.value === \"length2\" && toStringAccessed && !valueOfAccessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-2-5",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-5.js",
+ "description": "Object.getOwnPropertyDescriptor - argument 'P' is a boolean whose value is false",
+ "test": "assertTrue((function testcase() {\n var obj = { \"false\": 1 };\n\n var desc = Object.getOwnPropertyDescriptor(obj, false);\n\n return desc.value === 1;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-2-6",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-6.js",
+ "description": "Object.getOwnPropertyDescriptor - argument 'P' is a boolean whose value is true",
+ "test": "assertTrue((function testcase() {\n var obj = { \"true\": 1 };\n\n var desc = Object.getOwnPropertyDescriptor(obj, true);\n\n return desc.value === 1;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-2-7",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-7.js",
+ "description": "Object.getOwnPropertyDescriptor - argument 'P' is a number that converts to a string (value is NaN)",
+ "test": "assertTrue((function testcase() {\n var obj = { \"NaN\": 1 };\n\n var desc = Object.getOwnPropertyDescriptor(obj, NaN);\n\n return desc.value === 1;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-2-8",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-8.js",
+ "description": "Object.getOwnPropertyDescriptor - argument 'P' is a number that converts to a string (value is 0)",
+ "test": "assertTrue((function testcase() {\n var obj = { \"0\": 1 };\n\n var desc = Object.getOwnPropertyDescriptor(obj, 0);\n\n return desc.value === 1;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-2-9",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-2-9.js",
+ "description": "Object.getOwnPropertyDescriptor - argument 'P' is a number that converts to a string (value is +0)",
+ "test": "assertTrue((function testcase() {\n var obj = { \"0\": 1 };\n\n var desc = Object.getOwnPropertyDescriptor(obj, +0);\n\n return desc.value === 1;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-3-1",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-3-1.js",
+ "description": "Object.getOwnPropertyDescriptor - 'P' is own data property",
+ "test": "assertTrue((function testcase() {\n\n var obj = {\n property: \"ownDataProperty\"\n };\n\n var desc = Object.getOwnPropertyDescriptor(obj, \"property\");\n\n return desc.value === \"ownDataProperty\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-3-10",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-3-10.js",
+ "description": "Object.getOwnPropertyDescriptor - 'P' is not an existing property",
+ "test": "assertTrue((function testcase() {\n\n var obj = {\n property: \"ownDataProperty\"\n };\n\n var desc = Object.getOwnPropertyDescriptor(obj, \"propertyNonExist\");\n\n return typeof desc === \"undefined\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-3-13",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-3-13.js",
+ "description": "Object.getOwnPropertyDescriptor applied to the Arguments object which implements its own property get method",
+ "test": "assertTrue((function testcase() {\n\n var arg = (function () {\n return arguments;\n }(\"ownProperty\", true));\n\n var desc = Object.getOwnPropertyDescriptor(arg, \"0\");\n\n return desc.value === \"ownProperty\" && desc.writable === true && desc.enumerable === true && desc.configurable === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-3-14",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-3-14.js",
+ "description": "Object.getOwnPropertyDescriptor applied to a String object which implements its own property get method",
+ "test": "assertTrue((function testcase() {\n\n var str = new String(\"123\");\n\n var desc = Object.getOwnPropertyDescriptor(str, \"2\");\n\n return desc.value === \"3\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-3-15",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-3-15.js",
+ "description": "Object.getOwnPropertyDescriptor applied to a Function object which implements its own property get method",
+ "test": "assertTrue((function testcase() {\n\n var obj = function (a, b) {\n return a + b;\n };\n obj[1] = \"ownProperty\";\n\n var desc = Object.getOwnPropertyDescriptor(obj, \"1\");\n\n return desc.value === \"ownProperty\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-3-2",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-3-2.js",
+ "description": "Object.getOwnPropertyDescriptor - 'P' is inherited data property",
+ "test": "assertTrue((function testcase() {\n\n var proto = {\n property: \"inheritedDataProperty\"\n };\n\n var Con = function () { };\n Con.ptototype = proto;\n\n var child = new Con();\n\n var desc = Object.getOwnPropertyDescriptor(child, \"property\");\n\n return typeof desc === \"undefined\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-3-3",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-3-3.js",
+ "description": "Object.getOwnPropertyDescriptor - 'P' is own data property that overrides an inherited data property",
+ "test": "assertTrue((function testcase() {\n\n var proto = {\n property: \"inheritedDataProperty\"\n };\n\n var Con = function () { };\n Con.ptototype = proto;\n\n var child = new Con();\n child.property = \"ownDataProperty\";\n\n var desc = Object.getOwnPropertyDescriptor(child, \"property\");\n\n return desc.value === \"ownDataProperty\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-3-4",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-3-4.js",
+ "description": "Object.getOwnPropertyDescriptor - 'P' is own data property that overrides an inherited accessor property",
+ "test": "assertTrue((function testcase() {\n\n var proto = {};\n Object.defineProperty(proto, \"property\", {\n get: function () {\n return \"inheritedDataProperty\";\n },\n configurable: true\n });\n\n var Con = function () { };\n Con.ptototype = proto;\n\n var child = new Con();\n Object.defineProperty(child, \"property\", {\n value: \"ownDataProperty\",\n configurable: true\n });\n\n var desc = Object.getOwnPropertyDescriptor(child, \"property\");\n\n return desc.value === \"ownDataProperty\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.3-3-5",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-3-5.js",
+ "description": "Object.getOwnPropertyDescriptor - 'P' is own accessor property",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n var fun = function () {\n return \"ownAccessorProperty\";\n };\n Object.defineProperty(obj, \"property\", {\n get: fun,\n configurable: true\n });\n\n var desc = Object.getOwnPropertyDescriptor(obj, \"property\");\n\n return desc.get === fun;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.3-3-6",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-3-6.js",
+ "description": "Object.getOwnPropertyDescriptor - 'P' is inherited accessor property",
+ "test": "assertTrue((function testcase() {\n\n var proto = {};\n var fun = function () {\n return \"ownAccessorProperty\";\n };\n Object.defineProperty(proto, \"property\", {\n get: fun,\n configurable: true\n });\n\n var Con = function () { };\n Con.prototype = proto;\n\n var child = new Con();\n\n var desc = Object.getOwnPropertyDescriptor(child, \"property\");\n\n return typeof desc === \"undefined\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.3-3-7",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-3-7.js",
+ "description": "Object.getOwnPropertyDescriptor - 'P' is own accessor property that overrides an inherited data property",
+ "test": "assertTrue((function testcase() {\n\n var proto = {\n property: \"inheritedDataProperty\"\n };\n\n var Con = function () { };\n Con.ptototype = proto;\n\n var child = new Con();\n var fun = function () {\n return \"ownAccessorProperty\";\n };\n Object.defineProperty(child, \"property\", {\n get: fun,\n configurable: true\n });\n\n var desc = Object.getOwnPropertyDescriptor(child, \"property\");\n\n return desc.get === fun;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.3-3-8",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-3-8.js",
+ "description": "Object.getOwnPropertyDescriptor - 'P' is own accessor property that overrides an inherited accessor property",
+ "test": "assertTrue((function testcase() {\n\n var proto = {};\n Object.defineProperty(proto, \"property\", {\n get: function () {\n return \"inheritedAccessorProperty\";\n },\n configurable: true\n });\n\n var Con = function () { };\n Con.ptototype = proto;\n\n var child = new Con();\n var fun = function () {\n return \"ownAccessorProperty\";\n };\n Object.defineProperty(child, \"property\", {\n get: fun,\n configurable: true\n });\n\n var desc = Object.getOwnPropertyDescriptor(child, \"property\");\n\n return desc.get === fun;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.3-3-9",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-3-9.js",
+ "description": "Object.getOwnPropertyDescriptor - 'P' is own accessor property without a get function",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n var fun = function () { };\n Object.defineProperty(obj, \"property\", {\n set: fun,\n configurable: true\n });\n\n var desc = Object.getOwnPropertyDescriptor(obj, \"property\");\n\n return desc.set === fun;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.3-4-1",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-1.js",
+ "description": "Object.getOwnPropertyDescriptor returns an object representing a data desc for valid data valued properties",
+ "test": "assertTrue((function testcase() {\n var o = {};\n o[\"foo\"] = 101;\n\n var desc = Object.getOwnPropertyDescriptor(o, \"foo\");\n if (desc.value === 101 &&\n desc.enumerable === true &&\n desc.writable === true &&\n desc.configurable === true &&\n !desc.hasOwnProperty(\"get\") &&\n !desc.hasOwnProperty(\"set\")) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-4-10",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-10.js",
+ "description": "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Global.decodeURIComponent)",
+ "test": "assertTrue((function testcase() {\n var global = fnGlobalObject();\n var desc = Object.getOwnPropertyDescriptor(global, \"decodeURIComponent\");\n if (desc.value === global.decodeURIComponent &&\n desc.writable === true &&\n desc.enumerable === false &&\n desc.configurable === true) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-4-100",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-100.js",
+ "description": "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Math.atan2)",
+ "test": "assertTrue((function testcase() {\n var desc = Object.getOwnPropertyDescriptor(Math, \"atan2\");\n if (desc.value === Math.atan2 &&\n desc.writable === true &&\n desc.enumerable === false &&\n desc.configurable === true) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-4-101",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-101.js",
+ "description": "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Math.ceil)",
+ "test": "assertTrue((function testcase() {\n var desc = Object.getOwnPropertyDescriptor(Math, \"ceil\");\n if (desc.value === Math.ceil &&\n desc.writable === true &&\n desc.enumerable === false &&\n desc.configurable === true) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-4-102",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-102.js",
+ "description": "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Math.cos)",
+ "test": "assertTrue((function testcase() {\n var desc = Object.getOwnPropertyDescriptor(Math, \"cos\");\n if (desc.value === Math.cos &&\n desc.writable === true &&\n desc.enumerable === false &&\n desc.configurable === true) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-4-103",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-103.js",
+ "description": "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Math.exp)",
+ "test": "assertTrue((function testcase() {\n var desc = Object.getOwnPropertyDescriptor(Math, \"exp\");\n if (desc.value === Math.exp &&\n desc.writable === true &&\n desc.enumerable === false &&\n desc.configurable === true) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-4-104",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-104.js",
+ "description": "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Math.floor)",
+ "test": "assertTrue((function testcase() {\n var desc = Object.getOwnPropertyDescriptor(Math, \"floor\");\n if (desc.value === Math.floor &&\n desc.writable === true &&\n desc.enumerable === false &&\n desc.configurable === true) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-4-105",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-105.js",
+ "description": "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Math.log)",
+ "test": "assertTrue((function testcase() {\n var desc = Object.getOwnPropertyDescriptor(Math, \"log\");\n if (desc.value === Math.log &&\n desc.writable === true &&\n desc.enumerable === false &&\n desc.configurable === true) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-4-106",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-106.js",
+ "description": "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Math.max)",
+ "test": "assertTrue((function testcase() {\n var desc = Object.getOwnPropertyDescriptor(Math, \"max\");\n if (desc.value === Math.max &&\n desc.writable === true &&\n desc.enumerable === false &&\n desc.configurable === true) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-4-107",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-107.js",
+ "description": "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Math.min)",
+ "test": "assertTrue((function testcase() {\n var desc = Object.getOwnPropertyDescriptor(Math, \"min\");\n if (desc.value === Math.min &&\n desc.writable === true &&\n desc.enumerable === false &&\n desc.configurable === true) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-4-108",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-108.js",
+ "description": "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Math.pow)",
+ "test": "assertTrue((function testcase() {\n var desc = Object.getOwnPropertyDescriptor(Math, \"pow\");\n if (desc.value === Math.pow &&\n desc.writable === true &&\n desc.enumerable === false &&\n desc.configurable === true) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-4-109",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-109.js",
+ "description": "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Math.random)",
+ "test": "assertTrue((function testcase() {\n var desc = Object.getOwnPropertyDescriptor(Math, \"random\");\n if (desc.value === Math.random &&\n desc.writable === true &&\n desc.enumerable === false &&\n desc.configurable === true) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-4-11",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-11.js",
+ "description": "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Global.encodeURIComponent)",
+ "test": "assertTrue((function testcase() {\n var global = fnGlobalObject();\n var desc = Object.getOwnPropertyDescriptor(global, \"encodeURIComponent\");\n if (desc.value === global.encodeURIComponent &&\n desc.writable === true &&\n desc.enumerable === false &&\n desc.configurable === true) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-4-110",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-110.js",
+ "description": "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Math.round)",
+ "test": "assertTrue((function testcase() {\n var desc = Object.getOwnPropertyDescriptor(Math, \"round\");\n if (desc.value === Math.round &&\n desc.writable === true &&\n desc.enumerable === false &&\n desc.configurable === true) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-4-111",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-111.js",
+ "description": "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Math.sin)",
+ "test": "assertTrue((function testcase() {\n var desc = Object.getOwnPropertyDescriptor(Math, \"sin\");\n if (desc.value === Math.sin &&\n desc.writable === true &&\n desc.enumerable === false &&\n desc.configurable === true) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-4-112",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-112.js",
+ "description": "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Math.sqrt)",
+ "test": "assertTrue((function testcase() {\n var desc = Object.getOwnPropertyDescriptor(Math, \"sqrt\");\n if (desc.value === Math.sqrt &&\n desc.writable === true &&\n desc.enumerable === false &&\n desc.configurable === true) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-4-113",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-113.js",
+ "description": "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Math.tan)",
+ "test": "assertTrue((function testcase() {\n var desc = Object.getOwnPropertyDescriptor(Math, \"tan\");\n if (desc.value === Math.tan &&\n desc.writable === true &&\n desc.enumerable === false &&\n desc.configurable === true) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-4-114",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-114.js",
+ "description": "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Date.parse)",
+ "test": "assertTrue((function testcase() {\n var desc = Object.getOwnPropertyDescriptor(Date, \"parse\");\n if (desc.value === Date.parse &&\n desc.writable === true &&\n desc.enumerable === false &&\n desc.configurable === true) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-4-115",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-115.js",
+ "description": "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Date.UTC)",
+ "test": "assertTrue((function testcase() {\n var desc = Object.getOwnPropertyDescriptor(Date, \"UTC\");\n if (desc.value === Date.UTC &&\n desc.writable === true &&\n desc.enumerable === false &&\n desc.configurable === true) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-4-116",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-116.js",
+ "description": "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Date.prototype.constructor)",
+ "test": "assertTrue((function testcase() {\n var desc = Object.getOwnPropertyDescriptor(Date.prototype, \"constructor\");\n if (desc.value === Date.prototype.constructor &&\n desc.writable === true &&\n desc.enumerable === false &&\n desc.configurable === true) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-4-117",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-117.js",
+ "description": "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Date.prototype.getTime)",
+ "test": "assertTrue((function testcase() {\n var desc = Object.getOwnPropertyDescriptor(Date.prototype, \"getTime\");\n if (desc.value === Date.prototype.getTime &&\n desc.writable === true &&\n desc.enumerable === false &&\n desc.configurable === true) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-4-118",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-118.js",
+ "description": "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Date.prototype.getTimezoneOffset)",
+ "test": "assertTrue((function testcase() {\n var desc = Object.getOwnPropertyDescriptor(Date.prototype, \"getTimezoneOffset\");\n if (desc.value === Date.prototype.getTimezoneOffset &&\n desc.writable === true &&\n desc.enumerable === false &&\n desc.configurable === true) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-4-119",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-119.js",
+ "description": "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Date.prototype.getYear)",
+ "test": "assertTrue((function testcase() {\n var desc = Object.getOwnPropertyDescriptor(Date.prototype, \"getYear\");\n if (desc.value === Date.prototype.getYear &&\n desc.writable === true &&\n desc.enumerable === false &&\n desc.configurable === true) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-4-12",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-12.js",
+ "description": "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Global.escape)",
+ "test": "assertTrue((function testcase() {\n var global = fnGlobalObject();\n var desc = Object.getOwnPropertyDescriptor(global, \"escape\");\n if (desc.value === global.escape &&\n desc.writable === true &&\n desc.enumerable === false &&\n desc.configurable === true) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-4-120",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-120.js",
+ "description": "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Date.prototype.getFullYear)",
+ "test": "assertTrue((function testcase() {\n var desc = Object.getOwnPropertyDescriptor(Date.prototype, \"getFullYear\");\n if (desc.value === Date.prototype.getFullYear &&\n desc.writable === true &&\n desc.enumerable === false &&\n desc.configurable === true) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-4-121",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-121.js",
+ "description": "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Date.prototype.getMonth)",
+ "test": "assertTrue((function testcase() {\n var desc = Object.getOwnPropertyDescriptor(Date.prototype, \"getMonth\");\n if (desc.value === Date.prototype.getMonth &&\n desc.writable === true &&\n desc.enumerable === false &&\n desc.configurable === true) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-4-122",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-122.js",
+ "description": "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Date.prototype.getDate)",
+ "test": "assertTrue((function testcase() {\n var desc = Object.getOwnPropertyDescriptor(Date.prototype, \"getDate\");\n if (desc.value === Date.prototype.getDate &&\n desc.writable === true &&\n desc.enumerable === false &&\n desc.configurable === true) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-4-123",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-123.js",
+ "description": "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Date.prototype.getDay)",
+ "test": "assertTrue((function testcase() {\n var desc = Object.getOwnPropertyDescriptor(Date.prototype, \"getDay\");\n if (desc.value === Date.prototype.getDay &&\n desc.writable === true &&\n desc.enumerable === false &&\n desc.configurable === true) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-4-124",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-124.js",
+ "description": "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Date.prototype.getHours)",
+ "test": "assertTrue((function testcase() {\n var desc = Object.getOwnPropertyDescriptor(Date.prototype, \"getHours\");\n if (desc.value === Date.prototype.getHours &&\n desc.writable === true &&\n desc.enumerable === false &&\n desc.configurable === true) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-4-125",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-125.js",
+ "description": "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Date.prototype.getMinutes)",
+ "test": "assertTrue((function testcase() {\n var desc = Object.getOwnPropertyDescriptor(Date.prototype, \"getMinutes\");\n if (desc.value === Date.prototype.getMinutes &&\n desc.writable === true &&\n desc.enumerable === false &&\n desc.configurable === true) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-4-126",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-126.js",
+ "description": "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Date.prototype.getSeconds)",
+ "test": "assertTrue((function testcase() {\n var desc = Object.getOwnPropertyDescriptor(Date.prototype, \"getSeconds\");\n if (desc.value === Date.prototype.getSeconds &&\n desc.writable === true &&\n desc.enumerable === false &&\n desc.configurable === true) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-4-127",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-127.js",
+ "description": "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Date.prototype.getMilliseconds)",
+ "test": "assertTrue((function testcase() {\n var desc = Object.getOwnPropertyDescriptor(Date.prototype, \"getMilliseconds\");\n if (desc.value === Date.prototype.getMilliseconds &&\n desc.writable === true &&\n desc.enumerable === false &&\n desc.configurable === true) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-4-128",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-128.js",
+ "description": "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Date.prototype.getUTCFullYear)",
+ "test": "assertTrue((function testcase() {\n var desc = Object.getOwnPropertyDescriptor(Date.prototype, \"getUTCFullYear\");\n if (desc.value === Date.prototype.getUTCFullYear &&\n desc.writable === true &&\n desc.enumerable === false &&\n desc.configurable === true) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-4-129",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-129.js",
+ "description": "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Date.prototype.getUTCMonth)",
+ "test": "assertTrue((function testcase() {\n var desc = Object.getOwnPropertyDescriptor(Date.prototype, \"getUTCMonth\");\n if (desc.value === Date.prototype.getUTCMonth &&\n desc.writable === true &&\n desc.enumerable === false &&\n desc.configurable === true) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-4-13",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-13.js",
+ "description": "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Global.unescape)",
+ "test": "assertTrue((function testcase() {\n var global = fnGlobalObject();\n var desc = Object.getOwnPropertyDescriptor(global, \"unescape\");\n if (desc.value === global.unescape &&\n desc.writable === true &&\n desc.enumerable === false &&\n desc.configurable === true) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-4-130",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-130.js",
+ "description": "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Date.prototype.getUTCDate)",
+ "test": "assertTrue((function testcase() {\n var desc = Object.getOwnPropertyDescriptor(Date.prototype, \"getUTCDate\");\n if (desc.value === Date.prototype.getUTCDate &&\n desc.writable === true &&\n desc.enumerable === false &&\n desc.configurable === true) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-4-131",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-131.js",
+ "description": "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Date.prototype.getUTCDay)",
+ "test": "assertTrue((function testcase() {\n var desc = Object.getOwnPropertyDescriptor(Date.prototype, \"getUTCDay\");\n if (desc.value === Date.prototype.getUTCDay &&\n desc.writable === true &&\n desc.enumerable === false &&\n desc.configurable === true) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-4-132",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-132.js",
+ "description": "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Date.prototype.getUTCHours)",
+ "test": "assertTrue((function testcase() {\n var desc = Object.getOwnPropertyDescriptor(Date.prototype, \"getUTCHours\");\n if (desc.value === Date.prototype.getUTCHours &&\n desc.writable === true &&\n desc.enumerable === false &&\n desc.configurable === true) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-4-133",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-133.js",
+ "description": "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Date.prototype.getUTCMinutes)",
+ "test": "assertTrue((function testcase() {\n var desc = Object.getOwnPropertyDescriptor(Date.prototype, \"getUTCMinutes\");\n if (desc.value === Date.prototype.getUTCMinutes &&\n desc.writable === true &&\n desc.enumerable === false &&\n desc.configurable === true) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-4-134",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-134.js",
+ "description": "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Date.prototype.getUTCSeconds)",
+ "test": "assertTrue((function testcase() {\n var desc = Object.getOwnPropertyDescriptor(Date.prototype, \"getUTCSeconds\");\n if (desc.value === Date.prototype.getUTCSeconds &&\n desc.writable === true &&\n desc.enumerable === false &&\n desc.configurable === true) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-4-135",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-135.js",
+ "description": "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Date.prototype.getUTCMilliseconds)",
+ "test": "assertTrue((function testcase() {\n var desc = Object.getOwnPropertyDescriptor(Date.prototype, \"getUTCMilliseconds\");\n if (desc.value === Date.prototype.getUTCMilliseconds &&\n desc.writable === true &&\n desc.enumerable === false &&\n desc.configurable === true) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-4-136",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-136.js",
+ "description": "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Date.prototype.setTime)",
+ "test": "assertTrue((function testcase() {\n var desc = Object.getOwnPropertyDescriptor(Date.prototype, \"setTime\");\n if (desc.value === Date.prototype.setTime &&\n desc.writable === true &&\n desc.enumerable === false &&\n desc.configurable === true) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-4-137",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-137.js",
+ "description": "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Date.prototype.setYear)",
+ "test": "assertTrue((function testcase() {\n var desc = Object.getOwnPropertyDescriptor(Date.prototype, \"setYear\");\n if (desc.value === Date.prototype.setYear &&\n desc.writable === true &&\n desc.enumerable === false &&\n desc.configurable === true) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-4-138",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-138.js",
+ "description": "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Date.prototype.setFullYear)",
+ "test": "assertTrue((function testcase() {\n var desc = Object.getOwnPropertyDescriptor(Date.prototype, \"setFullYear\");\n if (desc.value === Date.prototype.setFullYear &&\n desc.writable === true &&\n desc.enumerable === false &&\n desc.configurable === true) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-4-139",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-139.js",
+ "description": "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Date.prototype.setMonth)",
+ "test": "assertTrue((function testcase() {\n var desc = Object.getOwnPropertyDescriptor(Date.prototype, \"setMonth\");\n if (desc.value === Date.prototype.setMonth &&\n desc.writable === true &&\n desc.enumerable === false &&\n desc.configurable === true) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-4-14",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-14.js",
+ "description": "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Object.getPrototypeOf)",
+ "test": "assertTrue((function testcase() {\n var desc = Object.getOwnPropertyDescriptor(Object, \"getPrototypeOf\");\n if (desc.value === Object.getPrototypeOf &&\n desc.writable === true &&\n desc.enumerable === false &&\n desc.configurable === true) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-4-140",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-140.js",
+ "description": "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Date.prototype.setDate)",
+ "test": "assertTrue((function testcase() {\n var desc = Object.getOwnPropertyDescriptor(Date.prototype, \"setDate\");\n if (desc.value === Date.prototype.setDate &&\n desc.writable === true &&\n desc.enumerable === false &&\n desc.configurable === true) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-4-141",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-141.js",
+ "description": "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Date.prototype.setHours)",
+ "test": "assertTrue((function testcase() {\n var desc = Object.getOwnPropertyDescriptor(Date.prototype, \"setHours\");\n if (desc.value === Date.prototype.setHours &&\n desc.writable === true &&\n desc.enumerable === false &&\n desc.configurable === true) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-4-142",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-142.js",
+ "description": "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Date.prototype.setMinutes)",
+ "test": "assertTrue((function testcase() {\n var desc = Object.getOwnPropertyDescriptor(Date.prototype, \"setMinutes\");\n if (desc.value === Date.prototype.setMinutes &&\n desc.writable === true &&\n desc.enumerable === false &&\n desc.configurable === true) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-4-143",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-143.js",
+ "description": "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Date.prototype.setSeconds)",
+ "test": "assertTrue((function testcase() {\n var desc = Object.getOwnPropertyDescriptor(Date.prototype, \"setSeconds\");\n if (desc.value === Date.prototype.setSeconds &&\n desc.writable === true &&\n desc.enumerable === false &&\n desc.configurable === true) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-4-144",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-144.js",
+ "description": "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Date.prototype.setMilliseconds)",
+ "test": "assertTrue((function testcase() {\n var desc = Object.getOwnPropertyDescriptor(Date.prototype, \"setMilliseconds\");\n if (desc.value === Date.prototype.setMilliseconds &&\n desc.writable === true &&\n desc.enumerable === false &&\n desc.configurable === true) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-4-145",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-145.js",
+ "description": "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Date.prototype.setUTCFullYear)",
+ "test": "assertTrue((function testcase() {\n var desc = Object.getOwnPropertyDescriptor(Date.prototype, \"setUTCFullYear\");\n if (desc.value === Date.prototype.setUTCFullYear &&\n desc.writable === true &&\n desc.enumerable === false &&\n desc.configurable === true) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-4-146",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-146.js",
+ "description": "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Date.prototype.setUTCMonth)",
+ "test": "assertTrue((function testcase() {\n var desc = Object.getOwnPropertyDescriptor(Date.prototype, \"setUTCMonth\");\n if (desc.value === Date.prototype.setUTCMonth &&\n desc.writable === true &&\n desc.enumerable === false &&\n desc.configurable === true) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-4-147",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-147.js",
+ "description": "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Date.prototype.setUTCDate)",
+ "test": "assertTrue((function testcase() {\n var desc = Object.getOwnPropertyDescriptor(Date.prototype, \"setUTCDate\");\n if (desc.value === Date.prototype.setUTCDate &&\n desc.writable === true &&\n desc.enumerable === false &&\n desc.configurable === true) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-4-148",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-148.js",
+ "description": "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Date.prototype.setUTCHours)",
+ "test": "assertTrue((function testcase() {\n var desc = Object.getOwnPropertyDescriptor(Date.prototype, \"setUTCHours\");\n if (desc.value === Date.prototype.setUTCHours &&\n desc.writable === true &&\n desc.enumerable === false &&\n desc.configurable === true) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-4-149",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-149.js",
+ "description": "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Date.prototype.setUTCMinutes)",
+ "test": "assertTrue((function testcase() {\n var desc = Object.getOwnPropertyDescriptor(Date.prototype, \"setUTCMinutes\");\n if (desc.value === Date.prototype.setUTCMinutes &&\n desc.writable === true &&\n desc.enumerable === false &&\n desc.configurable === true) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-4-15",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-15.js",
+ "description": "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Object.getOwnPropertyDescriptor)",
+ "test": "assertTrue((function testcase() {\n var desc = Object.getOwnPropertyDescriptor(Object, \"getOwnPropertyDescriptor\");\n if (desc.value === Object.getOwnPropertyDescriptor &&\n desc.writable === true &&\n desc.enumerable === false &&\n desc.configurable === true) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-4-150",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-150.js",
+ "description": "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Date.prototype.setUTCSeconds)",
+ "test": "assertTrue((function testcase() {\n var desc = Object.getOwnPropertyDescriptor(Date.prototype, \"setUTCSeconds\");\n if (desc.value === Date.prototype.setUTCSeconds &&\n desc.writable === true &&\n desc.enumerable === false &&\n desc.configurable === true) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-4-151",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-151.js",
+ "description": "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Date.prototype.setUTCMilliseconds)",
+ "test": "assertTrue((function testcase() {\n var desc = Object.getOwnPropertyDescriptor(Date.prototype, \"setUTCMilliseconds\");\n if (desc.value === Date.prototype.setUTCMilliseconds &&\n desc.writable === true &&\n desc.enumerable === false &&\n desc.configurable === true) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-4-152",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-152.js",
+ "description": "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Date.prototype.toLocaleString)",
+ "test": "assertTrue((function testcase() {\n var desc = Object.getOwnPropertyDescriptor(Date.prototype, \"toLocaleString\");\n if (desc.value === Date.prototype.toLocaleString &&\n desc.writable === true &&\n desc.enumerable === false &&\n desc.configurable === true) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-4-153",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-153.js",
+ "description": "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Date.prototype.toString)",
+ "test": "assertTrue((function testcase() {\n var desc = Object.getOwnPropertyDescriptor(Date.prototype, \"toString\");\n if (desc.value === Date.prototype.toString &&\n desc.writable === true &&\n desc.enumerable === false &&\n desc.configurable === true) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-4-154",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-154.js",
+ "description": "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Date.prototype.toUTCString)",
+ "test": "assertTrue((function testcase() {\n var desc = Object.getOwnPropertyDescriptor(Date.prototype, \"toUTCString\");\n if (desc.value === Date.prototype.toUTCString &&\n desc.writable === true &&\n desc.enumerable === false &&\n desc.configurable === true) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-4-155",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-155.js",
+ "description": "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Date.prototype.toGMTString)",
+ "test": "assertTrue((function testcase() {\n var desc = Object.getOwnPropertyDescriptor(Date.prototype, \"toGMTString\");\n if (desc.value === Date.prototype.toGMTString &&\n desc.writable === true &&\n desc.enumerable === false &&\n desc.configurable === true) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-4-156",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-156.js",
+ "description": "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Date.prototype.toTimeString)",
+ "test": "assertTrue((function testcase() {\n var desc = Object.getOwnPropertyDescriptor(Date.prototype, \"toTimeString\");\n if (desc.value === Date.prototype.toTimeString &&\n desc.writable === true &&\n desc.enumerable === false &&\n desc.configurable === true) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-4-157",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-157.js",
+ "description": "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Date.prototype.toDateString)",
+ "test": "assertTrue((function testcase() {\n var desc = Object.getOwnPropertyDescriptor(Date.prototype, \"toDateString\");\n if (desc.value === Date.prototype.toDateString &&\n desc.writable === true &&\n desc.enumerable === false &&\n desc.configurable === true) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-4-158",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-158.js",
+ "description": "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Date.prototype.toLocaleDateString)",
+ "test": "assertTrue((function testcase() {\n var desc = Object.getOwnPropertyDescriptor(Date.prototype, \"toLocaleDateString\");\n if (desc.value === Date.prototype.toLocaleDateString &&\n desc.writable === true &&\n desc.enumerable === false &&\n desc.configurable === true) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-4-159",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-159.js",
+ "description": "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Date.prototype.toLocaleTimeString)",
+ "test": "assertTrue((function testcase() {\n var desc = Object.getOwnPropertyDescriptor(Date.prototype, \"toLocaleTimeString\");\n if (desc.value === Date.prototype.toLocaleTimeString &&\n desc.writable === true &&\n desc.enumerable === false &&\n desc.configurable === true) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-4-16",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-16.js",
+ "description": "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Object.getOwnPropertyNames)",
+ "test": "assertTrue((function testcase() {\n var desc = Object.getOwnPropertyDescriptor(Object, \"getOwnPropertyNames\");\n if (desc.value === Object.getOwnPropertyNames &&\n desc.writable === true &&\n desc.enumerable === false &&\n desc.configurable === true) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-4-160",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-160.js",
+ "description": "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Date.prototype.valueOf)",
+ "test": "assertTrue((function testcase() {\n var desc = Object.getOwnPropertyDescriptor(Date.prototype, \"valueOf\");\n if (desc.value === Date.prototype.valueOf &&\n desc.writable === true &&\n desc.enumerable === false &&\n desc.configurable === true) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-4-161",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-161.js",
+ "description": "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Date.prototype.toISOString)",
+ "test": "assertTrue((function testcase() {\n var desc = Object.getOwnPropertyDescriptor(Date.prototype, \"toISOString\");\n if (desc.value === Date.prototype.toISOString &&\n desc.writable === true &&\n desc.enumerable === false &&\n desc.configurable === true) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-4-162",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-162.js",
+ "description": "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Date.prototype.toJSON)",
+ "test": "assertTrue((function testcase() {\n var desc = Object.getOwnPropertyDescriptor(Date.prototype, \"toJSON\");\n if (desc.value === Date.prototype.toJSON &&\n desc.writable === true &&\n desc.enumerable === false &&\n desc.configurable === true) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-4-163",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-163.js",
+ "description": "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (RegExp.prototype.constructor)",
+ "test": "assertTrue((function testcase() {\n var desc = Object.getOwnPropertyDescriptor(RegExp.prototype, \"constructor\");\n if (desc.value === RegExp.prototype.constructor &&\n desc.writable === true &&\n desc.enumerable === false &&\n desc.configurable === true) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-4-164",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-164.js",
+ "description": "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (RegExp.prototype.compile)",
+ "test": "assertTrue((function testcase() {\n var desc = Object.getOwnPropertyDescriptor(RegExp.prototype, \"compile\");\n if (desc.value === RegExp.prototype.compile &&\n desc.writable === true &&\n desc.enumerable === false &&\n desc.configurable === true) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-4-165",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-165.js",
+ "description": "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (RegExp.prototype.exec)",
+ "test": "assertTrue((function testcase() {\n var desc = Object.getOwnPropertyDescriptor(RegExp.prototype, \"exec\");\n if (desc.value === RegExp.prototype.exec &&\n desc.writable === true &&\n desc.enumerable === false &&\n desc.configurable === true) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-4-166",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-166.js",
+ "description": "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (RegExp.prototype.test)",
+ "test": "assertTrue((function testcase() {\n var desc = Object.getOwnPropertyDescriptor(RegExp.prototype, \"test\");\n if (desc.value === RegExp.prototype.test &&\n desc.writable === true &&\n desc.enumerable === false &&\n desc.configurable === true) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-4-167",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-167.js",
+ "description": "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (RegExp.prototype.toString)",
+ "test": "assertTrue((function testcase() {\n var desc = Object.getOwnPropertyDescriptor(RegExp.prototype, \"toString\");\n if (desc.value === RegExp.prototype.toString &&\n desc.writable === true &&\n desc.enumerable === false &&\n desc.configurable === true) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-4-168",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-168.js",
+ "description": "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Error.prototype.constructor)",
+ "test": "assertTrue((function testcase() {\n var desc = Object.getOwnPropertyDescriptor(Error.prototype, \"constructor\");\n if (desc.value === Error.prototype.constructor &&\n desc.writable === true &&\n desc.enumerable === false &&\n desc.configurable === true) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-4-169",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-169.js",
+ "description": "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Error.prototype.toString)",
+ "test": "assertTrue((function testcase() {\n var desc = Object.getOwnPropertyDescriptor(Error.prototype, \"toString\");\n if (desc.value === Error.prototype.toString &&\n desc.writable === true &&\n desc.enumerable === false &&\n desc.configurable === true) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-4-17",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-17.js",
+ "description": "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Object.create)",
+ "test": "assertTrue((function testcase() {\n var desc = Object.getOwnPropertyDescriptor(Object, \"create\");\n if (desc.value === Object.create &&\n desc.writable === true &&\n desc.enumerable === false &&\n desc.configurable === true) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-4-170",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-170.js",
+ "description": "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (EvalError.prototype.constructor)",
+ "test": "assertTrue((function testcase() {\n var desc = Object.getOwnPropertyDescriptor(EvalError.prototype, \"constructor\");\n if (desc.value === EvalError.prototype.constructor &&\n desc.writable === true &&\n desc.enumerable === false &&\n desc.configurable === true) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-4-171",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-171.js",
+ "description": "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (RangeError.prototype.constructor)",
+ "test": "assertTrue((function testcase() {\n var desc = Object.getOwnPropertyDescriptor(RangeError.prototype, \"constructor\");\n if (desc.value === RangeError.prototype.constructor &&\n desc.writable === true &&\n desc.enumerable === false &&\n desc.configurable === true) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-4-172",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-172.js",
+ "description": "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (ReferenceError.prototype.constructor)",
+ "test": "assertTrue((function testcase() {\n var desc = Object.getOwnPropertyDescriptor(ReferenceError.prototype, \"constructor\");\n if (desc.value === ReferenceError.prototype.constructor &&\n desc.writable === true &&\n desc.enumerable === false &&\n desc.configurable === true) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-4-173",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-173.js",
+ "description": "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (SyntaxError.prototype.constructor)",
+ "test": "assertTrue((function testcase() {\n var desc = Object.getOwnPropertyDescriptor(SyntaxError.prototype, \"constructor\");\n if (desc.value === SyntaxError.prototype.constructor &&\n desc.writable === true &&\n desc.enumerable === false &&\n desc.configurable === true) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-4-174",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-174.js",
+ "description": "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (TypeError.prototype.constructor)",
+ "test": "assertTrue((function testcase() {\n var desc = Object.getOwnPropertyDescriptor(TypeError.prototype, \"constructor\");\n if (desc.value === TypeError.prototype.constructor &&\n desc.writable === true &&\n desc.enumerable === false &&\n desc.configurable === true) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-4-175",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-175.js",
+ "description": "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (URIError.prototype.constructor)",
+ "test": "assertTrue((function testcase() {\n var desc = Object.getOwnPropertyDescriptor(URIError.prototype, \"constructor\");\n if (desc.value === URIError.prototype.constructor &&\n desc.writable === true &&\n desc.enumerable === false &&\n desc.configurable === true) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-4-176",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-176.js",
+ "description": "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (JSON.stringify)",
+ "test": "assertTrue((function testcase() {\n var desc = Object.getOwnPropertyDescriptor(JSON, \"stringify\");\n if (desc.value === JSON.stringify &&\n desc.writable === true &&\n desc.enumerable === false &&\n desc.configurable === true) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-4-177",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-177.js",
+ "description": "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (JSON.parse)",
+ "test": "assertTrue((function testcase() {\n var desc = Object.getOwnPropertyDescriptor(JSON, \"parse\");\n if (desc.value === JSON.parse &&\n desc.writable === true &&\n desc.enumerable === false &&\n desc.configurable === true) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-4-178",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-178.js",
+ "description": "Object.getOwnPropertyDescriptor returns data desc (all false) for properties on built-ins (Global.NaN)",
+ "test": "assertTrue((function testcase() {\n // in non-strict mode, 'this' is bound to the global object.\n var desc = Object.getOwnPropertyDescriptor(fnGlobalObject(), \"NaN\");\n\n if (desc.writable === false &&\n desc.enumerable === false &&\n desc.configurable === false &&\n desc.hasOwnProperty('get') === false &&\n desc.hasOwnProperty('set') === false) {\n return true;\n }\n return false;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-4-179",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-179.js",
+ "description": "Object.getOwnPropertyDescriptor returns data desc (all false) for properties on built-ins (Global.Infinity)",
+ "test": "assertTrue((function testcase() {\n // in non-strict mode, 'this' is bound to the global object.\n var desc = Object.getOwnPropertyDescriptor(fnGlobalObject(), \"Infinity\");\n\n if (desc.writable === false &&\n desc.enumerable === false &&\n desc.configurable === false &&\n desc.hasOwnProperty('get') === false &&\n desc.hasOwnProperty('set') === false) {\n return true;\n }\n return false;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-4-18",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-18.js",
+ "description": "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Object.defineProperty)",
+ "test": "assertTrue((function testcase() {\n var desc = Object.getOwnPropertyDescriptor(Object, \"defineProperty\");\n if (desc.value === Object.defineProperty &&\n desc.writable === true &&\n desc.enumerable === false &&\n desc.configurable === true) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-4-180",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-180.js",
+ "description": "Object.getOwnPropertyDescriptor returns data desc (all false) for properties on built-ins (Global.undefined)",
+ "test": "assertTrue((function testcase() {\n // in non-strict mode, 'this' is bound to the global object.\n var desc = Object.getOwnPropertyDescriptor(fnGlobalObject(), \"undefined\");\n\n if (desc.writable === false &&\n desc.enumerable === false &&\n desc.configurable === false &&\n desc.hasOwnProperty('get') === false &&\n desc.hasOwnProperty('set') === false) {\n return true;\n }\n return false;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-4-182",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-182.js",
+ "description": "Object.getOwnPropertyDescriptor returns data desc (all false) for properties on built-ins (Object.prototype)",
+ "test": "assertTrue((function testcase() {\n var desc = Object.getOwnPropertyDescriptor(Object, \"prototype\");\n\n if (desc.writable === false &&\n desc.enumerable === false &&\n desc.configurable === false &&\n desc.hasOwnProperty('get') === false &&\n desc.hasOwnProperty('set') === false) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-4-183",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-183.js",
+ "description": "Object.getOwnPropertyDescriptor returns undefined for non-existent property (arguments_1) on built-in object (Function)",
+ "test": "assertTrue((function testcase() {\n var desc = Object.getOwnPropertyDescriptor(Function, \"arguments_1\");\n\n if (desc === undefined)\n return true;\n else\n return false; \n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-4-184",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-184.js",
+ "description": "Object.getOwnPropertyDescriptor returns undefined for non-existent property (caller) on built-in object (Math)",
+ "test": "assertTrue((function testcase() {\n var desc = Object.getOwnPropertyDescriptor(Math, \"caller\");\n\n if (desc === undefined)\n return true; \n else\n return false;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-4-185",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-185.js",
+ "description": "Object.getOwnPropertyDescriptor returns data desc (all false) for properties on built-ins (Function.prototype)",
+ "test": "assertTrue((function testcase() {\n var desc = Object.getOwnPropertyDescriptor(Function, \"prototype\");\n\n if (desc.writable === false &&\n desc.enumerable === false &&\n desc.configurable === false &&\n desc.hasOwnProperty('get') === false &&\n desc.hasOwnProperty('set') === false) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-4-186",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-186.js",
+ "description": "Object.getOwnPropertyDescriptor returns data desc (all false) for properties on built-ins (Function.length)",
+ "test": "assertTrue((function testcase() {\n var desc = Object.getOwnPropertyDescriptor(Function, \"length\");\n\n if (desc.writable === false &&\n desc.enumerable === false &&\n desc.configurable === false &&\n desc.hasOwnProperty('get') === false &&\n desc.hasOwnProperty('set') === false) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-4-187",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-187.js",
+ "description": "Object.getOwnPropertyDescriptor returns data desc (all false) for properties on built-ins (Function (instance).length)",
+ "test": "assertTrue((function testcase() {\n var f = Function('return 42;');\n\n var desc = Object.getOwnPropertyDescriptor(f, \"length\");\n\n if (desc.writable === false &&\n desc.enumerable === false &&\n desc.configurable === false &&\n desc.hasOwnProperty('get') === false &&\n desc.hasOwnProperty('set') === false) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-4-188",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-188.js",
+ "description": "Object.getOwnPropertyDescriptor returns undefined for non-existent properties on built-ins (Function (instance).name)",
+ "test": "assertTrue((function testcase() {\n var f = Function('return 42;');\n var desc = Object.getOwnPropertyDescriptor(f, \"functionNameHopefullyDoesNotExist\");\n return desc === undefined;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-4-189",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-189.js",
+ "description": "Object.getOwnPropertyDescriptor returns data desc (all false) for properties on built-ins (Array.prototype)",
+ "test": "assertTrue((function testcase() {\n var desc = Object.getOwnPropertyDescriptor(Array, \"prototype\");\n\n if (desc.writable === false &&\n desc.enumerable === false &&\n desc.configurable === false &&\n desc.hasOwnProperty('get') === false &&\n desc.hasOwnProperty('set') === false) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-4-19",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-19.js",
+ "description": "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Object.defineProperties)",
+ "test": "assertTrue((function testcase() {\n var desc = Object.getOwnPropertyDescriptor(Object, \"defineProperties\");\n if (desc.value === Object.defineProperties &&\n desc.writable === true &&\n desc.enumerable === false &&\n desc.configurable === true) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-4-190",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-190.js",
+ "description": "Object.getOwnPropertyDescriptor returns data desc (all false) for properties on built-ins (String.prototype)",
+ "test": "assertTrue((function testcase() {\n var desc = Object.getOwnPropertyDescriptor(String, \"prototype\");\n\n if (desc.writable === false &&\n desc.enumerable === false &&\n desc.configurable === false &&\n desc.hasOwnProperty('get') === false &&\n desc.hasOwnProperty('set') === false) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-4-191",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-191.js",
+ "description": "Object.getOwnPropertyDescriptor returns data desc (all false) for properties on built-ins (String.length)",
+ "test": "assertTrue((function testcase() {\n var desc = Object.getOwnPropertyDescriptor(String, \"length\");\n\n if (desc.writable === false &&\n desc.enumerable === false &&\n desc.configurable === false &&\n desc.hasOwnProperty('get') === false &&\n desc.hasOwnProperty('set') === false) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-4-192",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-192.js",
+ "description": "Object.getOwnPropertyDescriptor returns data desc (all false) for properties on built-ins (String (instance).length)",
+ "test": "assertTrue((function testcase() {\n var s = new String(\"abc\");\n var desc = Object.getOwnPropertyDescriptor(s, \"length\");\n\n if (desc.writable === false &&\n desc.enumerable === false &&\n desc.configurable === false &&\n desc.hasOwnProperty('get') === false &&\n desc.hasOwnProperty('set') === false) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-4-193",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-193.js",
+ "description": "Object.getOwnPropertyDescriptor returns data desc (all false) for properties on built-ins (Boolean.prototype)",
+ "test": "assertTrue((function testcase() {\n var desc = Object.getOwnPropertyDescriptor(Boolean, \"prototype\");\n\n if (desc.writable === false &&\n desc.enumerable === false &&\n desc.configurable === false &&\n desc.hasOwnProperty('get') === false &&\n desc.hasOwnProperty('set') === false) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-4-194",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-194.js",
+ "description": "Object.getOwnPropertyDescriptor returns data desc (all false) for properties on built-ins (Boolean.length)",
+ "test": "assertTrue((function testcase() {\n var desc = Object.getOwnPropertyDescriptor(Boolean, \"length\");\n\n if (desc.writable === false &&\n desc.enumerable === false &&\n desc.configurable === false &&\n desc.hasOwnProperty('get') === false &&\n desc.hasOwnProperty('set') === false) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-4-195",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-195.js",
+ "description": "Object.getOwnPropertyDescriptor returns data desc (all false) for properties on built-ins (Number.prototype)",
+ "test": "assertTrue((function testcase() {\n var desc = Object.getOwnPropertyDescriptor(Number, \"prototype\");\n\n if (desc.writable === false &&\n desc.enumerable === false &&\n desc.configurable === false &&\n desc.hasOwnProperty('get') === false &&\n desc.hasOwnProperty('set') === false) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-4-196",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-196.js",
+ "description": "Object.getOwnPropertyDescriptor returns data desc (all false) for properties on built-ins (Number.MAX_VALUE)",
+ "test": "assertTrue((function testcase() {\n var desc = Object.getOwnPropertyDescriptor(Number, \"MAX_VALUE\");\n\n if (desc.writable === false &&\n desc.enumerable === false &&\n desc.configurable === false &&\n desc.hasOwnProperty('get') === false &&\n desc.hasOwnProperty('set') === false) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-4-197",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-197.js",
+ "description": "Object.getOwnPropertyDescriptor returns data desc (all false) for properties on built-ins (Number.MIN_VALUE)",
+ "test": "assertTrue((function testcase() {\n var desc = Object.getOwnPropertyDescriptor(Number, \"MIN_VALUE\");\n\n if (desc.writable === false &&\n desc.enumerable === false &&\n desc.configurable === false &&\n desc.hasOwnProperty('get') === false &&\n desc.hasOwnProperty('set') === false) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-4-198",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-198.js",
+ "description": "Object.getOwnPropertyDescriptor returns data desc (all false) for properties on built-ins (Number.NaN)",
+ "test": "assertTrue((function testcase() {\n var desc = Object.getOwnPropertyDescriptor(Number, \"NaN\");\n\n if (desc.writable === false &&\n desc.enumerable === false &&\n desc.configurable === false &&\n desc.hasOwnProperty('get') === false &&\n desc.hasOwnProperty('set') === false) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-4-199",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-199.js",
+ "description": "Object.getOwnPropertyDescriptor returns data desc (all false) for properties on built-ins (Number.NEGATIVE_INFINITY)",
+ "test": "assertTrue((function testcase() {\n var desc = Object.getOwnPropertyDescriptor(Number, \"NEGATIVE_INFINITY\");\n\n if (desc.writable === false &&\n desc.enumerable === false &&\n desc.configurable === false &&\n desc.hasOwnProperty('get') === false &&\n desc.hasOwnProperty('set') === false) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-4-2",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-2.js",
+ "description": "Object.getOwnPropertyDescriptor returns undefined for non-existent properties",
+ "test": "assertTrue((function testcase() {\n var o = {};\n\n var desc = Object.getOwnPropertyDescriptor(o, \"foo\");\n if (desc === undefined) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-4-20",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-20.js",
+ "description": "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Object.seal)",
+ "test": "assertTrue((function testcase() {\n var desc = Object.getOwnPropertyDescriptor(Object, \"seal\");\n if (desc.value === Object.seal &&\n desc.writable === true &&\n desc.enumerable === false &&\n desc.configurable === true) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-4-200",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-200.js",
+ "description": "Object.getOwnPropertyDescriptor returns data desc (all false) for properties on built-ins (Number.POSITIVE_INFINITY)",
+ "test": "assertTrue((function testcase() {\n var desc = Object.getOwnPropertyDescriptor(Number, \"POSITIVE_INFINITY\");\n\n if (desc.writable === false &&\n desc.enumerable === false &&\n desc.configurable === false &&\n desc.hasOwnProperty('get') === false &&\n desc.hasOwnProperty('set') === false) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-4-201",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-201.js",
+ "description": "Object.getOwnPropertyDescriptor returns data desc (all false) for properties on built-ins (Number.length)",
+ "test": "assertTrue((function testcase() {\n var desc = Object.getOwnPropertyDescriptor(Number, \"length\");\n\n if (desc.writable === false &&\n desc.enumerable === false &&\n desc.configurable === false &&\n desc.hasOwnProperty('get') === false &&\n desc.hasOwnProperty('set') === false) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-4-202",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-202.js",
+ "description": "Object.getOwnPropertyDescriptor returns data desc (all false) for properties on built-ins (Math.E)",
+ "test": "assertTrue((function testcase() {\n var desc = Object.getOwnPropertyDescriptor(Math, \"E\");\n\n if (desc.writable === false &&\n desc.enumerable === false &&\n desc.configurable === false &&\n desc.hasOwnProperty('get') === false &&\n desc.hasOwnProperty('set') === false) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-4-203",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-203.js",
+ "description": "Object.getOwnPropertyDescriptor returns data desc (all false) for properties on built-ins (Math.LN10)",
+ "test": "assertTrue((function testcase() {\n var desc = Object.getOwnPropertyDescriptor(Math, \"LN10\");\n\n if (desc.writable === false &&\n desc.enumerable === false &&\n desc.configurable === false &&\n desc.hasOwnProperty('get') === false &&\n desc.hasOwnProperty('set') === false) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-4-204",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-204.js",
+ "description": "Object.getOwnPropertyDescriptor returns data desc (all false) for properties on built-ins (Math.LN2)",
+ "test": "assertTrue((function testcase() {\n var desc = Object.getOwnPropertyDescriptor(Math, \"LN2\");\n\n if (desc.writable === false &&\n desc.enumerable === false &&\n desc.configurable === false &&\n desc.hasOwnProperty('get') === false &&\n desc.hasOwnProperty('set') === false) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-4-205",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-205.js",
+ "description": "Object.getOwnPropertyDescriptor returns data desc (all false) for properties on built-ins (Math.LOG2E)",
+ "test": "assertTrue((function testcase() {\n var desc = Object.getOwnPropertyDescriptor(Math, \"LOG2E\");\n\n if (desc.writable === false &&\n desc.enumerable === false &&\n desc.configurable === false &&\n desc.hasOwnProperty('get') === false &&\n desc.hasOwnProperty('set') === false) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-4-206",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-206.js",
+ "description": "Object.getOwnPropertyDescriptor returns data desc (all false) for properties on built-ins (Math.LOG10E)",
+ "test": "assertTrue((function testcase() {\n var desc = Object.getOwnPropertyDescriptor(Math, \"LOG10E\");\n\n if (desc.writable === false &&\n desc.enumerable === false &&\n desc.configurable === false &&\n desc.hasOwnProperty('get') === false &&\n desc.hasOwnProperty('set') === false) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-4-207",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-207.js",
+ "description": "Object.getOwnPropertyDescriptor returns data desc (all false) for properties on built-ins (Math.PI)",
+ "test": "assertTrue((function testcase() {\n var desc = Object.getOwnPropertyDescriptor(Math, \"PI\");\n\n if (desc.writable === false &&\n desc.enumerable === false &&\n desc.configurable === false &&\n desc.hasOwnProperty('get') === false &&\n desc.hasOwnProperty('set') === false) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-4-208",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-208.js",
+ "description": "Object.getOwnPropertyDescriptor returns data desc (all false) for properties on built-ins (Math.SQRT1_2)",
+ "test": "assertTrue((function testcase() {\n var desc = Object.getOwnPropertyDescriptor(Math, \"SQRT1_2\");\n\n if (desc.writable === false &&\n desc.enumerable === false &&\n desc.configurable === false &&\n desc.hasOwnProperty('get') === false &&\n desc.hasOwnProperty('set') === false) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-4-209",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-209.js",
+ "description": "Object.getOwnPropertyDescriptor returns data desc (all false) for properties on built-ins (Math.SQRT2)",
+ "test": "assertTrue((function testcase() {\n var desc = Object.getOwnPropertyDescriptor(Math, \"SQRT2\");\n\n if (desc.writable === false &&\n desc.enumerable === false &&\n desc.configurable === false &&\n desc.hasOwnProperty('get') === false &&\n desc.hasOwnProperty('set') === false) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-4-21",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-21.js",
+ "description": "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Object.freeze)",
+ "test": "assertTrue((function testcase() {\n var desc = Object.getOwnPropertyDescriptor(Object, \"freeze\");\n if (desc.value === Object.freeze &&\n desc.writable === true &&\n desc.enumerable === false &&\n desc.configurable === true) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-4-210",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-210.js",
+ "description": "Object.getOwnPropertyDescriptor returns data desc (all false) for properties on built-ins (Date.prototype)",
+ "test": "assertTrue((function testcase() {\n var desc = Object.getOwnPropertyDescriptor(Date, \"prototype\");\n\n if (desc.writable === false &&\n desc.enumerable === false &&\n desc.configurable === false &&\n desc.hasOwnProperty('get') === false &&\n desc.hasOwnProperty('set') === false) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-4-211",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-211.js",
+ "description": "Object.getOwnPropertyDescriptor returns data desc (all false) for properties on built-ins (RegExp.prototype)",
+ "test": "assertTrue((function testcase() {\n var desc = Object.getOwnPropertyDescriptor(RegExp, \"prototype\");\n\n if (desc.writable === false &&\n desc.enumerable === false &&\n desc.configurable === false &&\n desc.hasOwnProperty('get') === false &&\n desc.hasOwnProperty('set') === false) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-4-212",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-212.js",
+ "description": "Object.getOwnPropertyDescriptor returns data desc (all false) for properties on built-ins (RegExp.prototype.source)",
+ "test": "assertTrue((function testcase() {\n var desc = Object.getOwnPropertyDescriptor(RegExp.prototype, \"source\");\n\n if (desc.writable === false &&\n desc.enumerable === false &&\n desc.configurable === false &&\n desc.hasOwnProperty('get') === false &&\n desc.hasOwnProperty('set') === false) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-4-213",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-213.js",
+ "description": "Object.getOwnPropertyDescriptor returns data desc (all false) for properties on built-ins (RegExp.prototype.global)",
+ "test": "assertTrue((function testcase() {\n var desc = Object.getOwnPropertyDescriptor(RegExp.prototype, \"global\");\n\n if (desc.writable === false &&\n desc.enumerable === false &&\n desc.configurable === false &&\n desc.hasOwnProperty('get') === false &&\n desc.hasOwnProperty('set') === false) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-4-214",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-214.js",
+ "description": "Object.getOwnPropertyDescriptor returns data desc (all false) for properties on built-ins (RegExp.prototype.ignoreCase)",
+ "test": "assertTrue((function testcase() {\n var desc = Object.getOwnPropertyDescriptor(RegExp.prototype, \"ignoreCase\");\n\n if (desc.writable === false &&\n desc.enumerable === false &&\n desc.configurable === false &&\n desc.hasOwnProperty('get') === false &&\n desc.hasOwnProperty('set') === false) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-4-215",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-215.js",
+ "description": "Object.getOwnPropertyDescriptor returns data desc (all false) for properties on built-ins (RegExp.prototype.multiline)",
+ "test": "assertTrue((function testcase() {\n var desc = Object.getOwnPropertyDescriptor(RegExp.prototype, \"multiline\");\n\n if (desc.writable === false &&\n desc.enumerable === false &&\n desc.configurable === false &&\n desc.hasOwnProperty('get') === false &&\n desc.hasOwnProperty('set') === false) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-4-216",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-216.js",
+ "description": "Object.getOwnPropertyDescriptor returns data desc (all false) for properties on built-ins (Error.prototype)",
+ "test": "assertTrue((function testcase() {\n var desc = Object.getOwnPropertyDescriptor(Error, \"prototype\");\n\n if (desc.writable === false &&\n desc.enumerable === false &&\n desc.configurable === false &&\n desc.hasOwnProperty('get') === false &&\n desc.hasOwnProperty('set') === false) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-4-217",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-217.js",
+ "description": "Object.getOwnPropertyDescriptor returns data desc (all false) for properties on built-ins (EvalError.prototype)",
+ "test": "assertTrue((function testcase() {\n var desc = Object.getOwnPropertyDescriptor(EvalError, \"prototype\");\n\n if (desc.writable === false &&\n desc.enumerable === false &&\n desc.configurable === false &&\n desc.hasOwnProperty('get') === false &&\n desc.hasOwnProperty('set') === false) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-4-218",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-218.js",
+ "description": "Object.getOwnPropertyDescriptor returns data desc (all false) for properties on built-ins (RangeError.prototype)",
+ "test": "assertTrue((function testcase() {\n var desc = Object.getOwnPropertyDescriptor(RangeError, \"prototype\");\n\n if (desc.writable === false &&\n desc.enumerable === false &&\n desc.configurable === false &&\n desc.hasOwnProperty('get') === false &&\n desc.hasOwnProperty('set') === false) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-4-219",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-219.js",
+ "description": "Object.getOwnPropertyDescriptor returns data desc (all false) for properties on built-ins (ReferenceError.prototype)",
+ "test": "assertTrue((function testcase() {\n var desc = Object.getOwnPropertyDescriptor(ReferenceError, \"prototype\");\n\n if (desc.writable === false &&\n desc.enumerable === false &&\n desc.configurable === false &&\n desc.hasOwnProperty('get') === false &&\n desc.hasOwnProperty('set') === false) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-4-22",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-22.js",
+ "description": "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Object.preventExtensions)",
+ "test": "assertTrue((function testcase() {\n var desc = Object.getOwnPropertyDescriptor(Object, \"preventExtensions\");\n if (desc.value === Object.preventExtensions &&\n desc.writable === true &&\n desc.enumerable === false &&\n desc.configurable === true) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-4-220",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-220.js",
+ "description": "Object.getOwnPropertyDescriptor returns data desc (all false) for properties on built-ins (SyntaxError.prototype)",
+ "test": "assertTrue((function testcase() {\n var desc = Object.getOwnPropertyDescriptor(SyntaxError, \"prototype\");\n\n if (desc.writable === false &&\n desc.enumerable === false &&\n desc.configurable === false &&\n desc.hasOwnProperty('get') === false &&\n desc.hasOwnProperty('set') === false) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-4-221",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-221.js",
+ "description": "Object.getOwnPropertyDescriptor returns data desc (all false) for properties on built-ins (TypeError.prototype)",
+ "test": "assertTrue((function testcase() {\n var desc = Object.getOwnPropertyDescriptor(TypeError, \"prototype\");\n\n if (desc.writable === false &&\n desc.enumerable === false &&\n desc.configurable === false &&\n desc.hasOwnProperty('get') === false &&\n desc.hasOwnProperty('set') === false) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-4-222",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-222.js",
+ "description": "Object.getOwnPropertyDescriptor returns data desc (all false) for properties on built-ins (URIError.prototype)",
+ "test": "assertTrue((function testcase() {\n var desc = Object.getOwnPropertyDescriptor(URIError, \"prototype\");\n\n if (desc.writable === false &&\n desc.enumerable === false &&\n desc.configurable === false &&\n desc.hasOwnProperty('get') === false &&\n desc.hasOwnProperty('set') === false) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-4-223",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-223.js",
+ "description": "Object.getOwnPropertyDescriptor - ensure that 'value' property of returned object is data property with correct 'value' attribute",
+ "test": "assertTrue((function testcase() {\n var obj = { \"property\": \"ownDataProperty\" };\n\n var desc = Object.getOwnPropertyDescriptor(obj, \"property\");\n\n return desc.value === \"ownDataProperty\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-4-224",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-224.js",
+ "description": "Object.getOwnPropertyDescriptor - ensure that 'value' property of returned object is data property with correct 'writable' attribute",
+ "test": "assertTrue((function testcase() {\n var obj = { \"property\": \"ownDataProperty\" };\n\n var desc = Object.getOwnPropertyDescriptor(obj, \"property\");\n\n try {\n desc.value = \"overwriteDataProperty\";\n return desc.value === \"overwriteDataProperty\";\n } catch (e) {\n return false;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-4-225",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-225.js",
+ "description": "Object.getOwnPropertyDescriptor - ensure that 'value' property of returned object is data property with correct 'enumerable' attribute",
+ "test": "assertTrue((function testcase() {\n var obj = { \"property\": \"ownDataProperty\" };\n\n var desc = Object.getOwnPropertyDescriptor(obj, \"property\");\n var accessed = false;\n\n for (var prop in desc) {\n if (prop === \"value\") {\n accessed = true;\n }\n }\n\n return accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-4-226",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-226.js",
+ "description": "Object.getOwnPropertyDescriptor - ensure that 'value' property of returned object is data property with correct 'configurable' attribute",
+ "test": "assertTrue((function testcase() {\n var obj = { \"property\": \"ownDataProperty\" };\n\n var desc = Object.getOwnPropertyDescriptor(obj, \"property\");\n\n var propDefined = \"value\" in desc;\n\n try {\n delete desc.value;\n var propDeleted = \"value\" in desc;\n\n return propDefined && !propDeleted;\n } catch (e) {\n return false;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-4-227",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-227.js",
+ "description": "Object.getOwnPropertyDescriptor - ensure that 'writable' property of returned object is data property with correct 'value' attribute",
+ "test": "assertTrue((function testcase() {\n var obj = { \"property\": \"ownDataProperty\" };\n\n var desc = Object.getOwnPropertyDescriptor(obj, \"property\");\n\n return desc.writable === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-4-228",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-228.js",
+ "description": "Object.getOwnPropertyDescriptor - ensure that 'writable' property of returned object is data property with correct 'writable' attribute",
+ "test": "/// Copyright (c) 2009 Microsoft Corporation \n/// \n/// Redistribution and use in source and binary forms, with or without modification, are permitted provided\n/// that the following conditions are met: \n/// * Redistributions of source code must retain the above copyright notice, this list of conditions and\n/// the following disclaimer. \n/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and \n/// the following disclaimer in the documentation and/or other materials provided with the distribution. \n/// * Neither the name of Microsoft nor the names of its contributors may be used to\n/// endorse or promote products derived from this software without specific prior written permission.\n/// \n/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR\n/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS\n/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE\n/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,\n/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF\n/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.assertTrue((function testcase() {\n var obj = { \"property\": \"ownDataProperty\" };\n\n var desc = Object.getOwnPropertyDescriptor(obj, \"property\");\n\n try {\n desc.writable = \"overwriteDataProperty\";\n return desc.writable === \"overwriteDataProperty\";\n } catch (e) {\n return false;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-4-229",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-229.js",
+ "description": "Object.getOwnPropertyDescriptor - ensure that 'writable' property of returned object is data property with correct 'enumerable' attribute",
+ "test": "assertTrue((function testcase() {\n var obj = { \"property\": \"ownDataProperty\" };\n\n var desc = Object.getOwnPropertyDescriptor(obj, \"property\");\n var accessed = false;\n\n for (var props in desc) {\n if (props === \"writable\") {\n accessed = true;\n }\n }\n\n return accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-4-23",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-23.js",
+ "description": "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Object.isSealed)",
+ "test": "assertTrue((function testcase() {\n var desc = Object.getOwnPropertyDescriptor(Object, \"isSealed\");\n if (desc.value === Object.isSealed &&\n desc.writable === true &&\n desc.enumerable === false &&\n desc.configurable === true) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-4-230",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-230.js",
+ "description": "Object.getOwnPropertyDescriptor - ensure that 'writable' property of returned object is data property with correct 'configurable' attribute",
+ "test": "assertTrue((function testcase() {\n var obj = { \"property\": \"ownDataProperty\" };\n\n var desc = Object.getOwnPropertyDescriptor(obj, \"property\");\n\n var propDefined = (\"writable\" in desc);\n\n try {\n delete desc.writable;\n var propDeleted = \"writable\" in desc;\n\n return propDefined && !propDeleted;\n } catch (e) {\n return false;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-4-231",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-231.js",
+ "description": "Object.getOwnPropertyDescriptor - ensure that 'enumerable' property of returned object is data property with correct 'value' attribute",
+ "test": "assertTrue((function testcase() {\n var obj = { \"property\": \"ownDataProperty\" };\n\n var desc = Object.getOwnPropertyDescriptor(obj, \"property\");\n\n return desc.enumerable === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-4-232",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-232.js",
+ "description": "Object.getOwnPropertyDescriptor - ensure that 'enumerable' property of returned object is data property with correct 'writable' attribute",
+ "test": "assertTrue((function testcase() {\n var obj = { \"property\": \"ownDataProperty\" };\n\n var desc = Object.getOwnPropertyDescriptor(obj, \"property\");\n\n try {\n desc.enumerable = \"overwriteDataProperty\";\n return desc.enumerable === \"overwriteDataProperty\";\n } catch (e) {\n return false;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-4-233",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-233.js",
+ "description": "Object.getOwnPropertyDescriptor - ensure that 'enumerable' property of returned object is data property with correct 'enumerable' attribute",
+ "test": "assertTrue((function testcase() {\n var obj = { \"property\": \"ownDataProperty\" };\n\n var desc = Object.getOwnPropertyDescriptor(obj, \"property\");\n var accessed = false;\n\n for (var props in desc) {\n if (props === \"enumerable\") {\n accessed = true;\n }\n }\n\n return accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-4-234",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-234.js",
+ "description": "Object.getOwnPropertyDescriptor - ensure that 'enumerable' property of returned object is data property with correct 'configurable' attribute",
+ "test": "assertTrue((function testcase() {\n var obj = { \"property\": \"ownDataProperty\" };\n\n var desc = Object.getOwnPropertyDescriptor(obj, \"property\");\n\n var propDefined = \"enumerable\" in desc;\n\n try {\n delete desc.enumerable;\n var propDeleted = \"enumerable\" in desc;\n\n return propDefined && !propDeleted;\n } catch (e) {\n return false;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-4-235",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-235.js",
+ "description": "Object.getOwnPropertyDescriptor - ensure that 'configurable' property of returned object is data property with correct 'value' attribute",
+ "test": "assertTrue((function testcase() {\n var obj = { \"property\": \"ownDataProperty\" };\n\n var desc = Object.getOwnPropertyDescriptor(obj, \"property\");\n\n return desc.configurable === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-4-236",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-236.js",
+ "description": "Object.getOwnPropertyDescriptor - ensure that 'configurable' property of returned object is data property with correct 'writable' attribute",
+ "test": "assertTrue((function testcase() {\n var obj = { \"property\": \"ownDataProperty\" };\n\n var desc = Object.getOwnPropertyDescriptor(obj, \"property\");\n\n try {\n desc.writable = \"overwriteDataProperty\";\n return desc.writable === \"overwriteDataProperty\";\n } catch (e) {\n return false;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-4-237",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-237.js",
+ "description": "Object.getOwnPropertyDescriptor - ensure that 'configurable' property of returned object is data property with correct 'enumerable' attribute",
+ "test": "assertTrue((function testcase() {\n var obj = { \"property\": \"ownDataProperty\" };\n\n var desc = Object.getOwnPropertyDescriptor(obj, \"property\");\n var accessed = false;\n\n for (var prop in desc) {\n if (prop === \"configurable\") {\n accessed = true;\n }\n }\n\n return accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-4-238",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-238.js",
+ "description": "Object.getOwnPropertyDescriptor - ensure that 'configurable' property of returned object is data property with correct 'configurable' attribute",
+ "test": "assertTrue((function testcase() {\n var obj = { \"property\": \"ownDataProperty\" };\n\n var desc = Object.getOwnPropertyDescriptor(obj, \"property\");\n\n var propDefined = \"configurable\" in desc;\n \n try {\n delete desc.configurable;\n var propDeleted = \"configurable\" in desc;\n\n return propDefined && !propDeleted;\n } catch (e) {\n return false;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-4-239",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-239.js",
+ "description": "Object.getOwnPropertyDescriptor - ensure that 'get' property of returned object is data property with correct 'value' attribute",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n var fun = function () {\n return \"ownDataProperty\";\n };\n Object.defineProperty(obj, \"property\", {\n get: fun,\n configurable: true\n });\n\n var desc = Object.getOwnPropertyDescriptor(obj, \"property\");\n\n return desc.get === fun;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.3-4-24",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-24.js",
+ "description": "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Object.isFrozen)",
+ "test": "assertTrue((function testcase() {\n var desc = Object.getOwnPropertyDescriptor(Object, \"isFrozen\");\n if (desc.value === Object.isFrozen &&\n desc.writable === true &&\n desc.enumerable === false &&\n desc.configurable === true) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-4-240",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-240.js",
+ "description": "Object.getOwnPropertyDescriptor - ensure that 'get' property of returned object is data property with correct 'writable' attribute",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n var fun = function () {\n return \"ownGetProperty\";\n };\n Object.defineProperty(obj, \"property\", {\n get: fun,\n configurable: true\n });\n\n var desc = Object.getOwnPropertyDescriptor(obj, \"property\");\n\n try {\n desc.get = \"overwriteGetProperty\";\n return desc.get === \"overwriteGetProperty\";\n } catch (e) {\n return false;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.3-4-241",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-241.js",
+ "description": "Object.getOwnPropertyDescriptor - ensure that 'get' property of returned object is data property with correct 'enumerable' attribute",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n var fun = function () {\n return \"ownDataProperty\";\n };\n Object.defineProperty(obj, \"property\", {\n get: fun,\n configurable: true\n });\n\n var desc = Object.getOwnPropertyDescriptor(obj, \"property\");\n var accessed = false;\n\n for (var prop in desc) {\n if (prop === \"get\") {\n accessed = true;\n }\n }\n\n return accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.3-4-242",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-242.js",
+ "description": "Object.getOwnPropertyDescriptor - ensure that 'get' property of returned object is data property with correct 'configurable' attribute",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n var fun = function () {\n return \"ownDataProperty\";\n };\n Object.defineProperty(obj, \"property\", {\n get: fun,\n configurable: true\n });\n\n var desc = Object.getOwnPropertyDescriptor(obj, \"property\");\n\n var propDefined = \"get\" in desc;\n\n try {\n delete desc.get;\n var propDeleted = \"get\" in desc;\n\n return propDefined && !propDeleted;\n } catch (e) {\n return false;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.3-4-243",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-243.js",
+ "description": "Object.getOwnPropertyDescriptor - ensure that 'set' property of returned object is data property with correct 'value' attribute",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n var fun = function () {\n return \"ownSetProperty\";\n };\n Object.defineProperty(obj, \"property\", {\n set: fun,\n configurable: true\n });\n\n var desc = Object.getOwnPropertyDescriptor(obj, \"property\");\n\n return desc.set === fun;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.3-4-244",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-244.js",
+ "description": "Object.getOwnPropertyDescriptor - ensure that 'set' property of returned object is data property with correct 'writable' attribute",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n var fun = function () {\n return \"ownSetProperty\";\n };\n Object.defineProperty(obj, \"property\", {\n set: fun,\n configurable: true\n });\n\n var desc = Object.getOwnPropertyDescriptor(obj, \"property\");\n\n try {\n desc.set = \"overwriteSetProperty\";\n return desc.set === \"overwriteSetProperty\";\n } catch (e) {\n return false;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.3-4-245",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-245.js",
+ "description": "Object.getOwnPropertyDescriptor - ensure that 'set' property of returned object is data property with correct 'enumerable' attribute",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n var fun = function () {\n return \"ownSetProperty\";\n };\n Object.defineProperty(obj, \"property\", {\n set: fun,\n configurable: true\n });\n\n var desc = Object.getOwnPropertyDescriptor(obj, \"property\");\n var accessed = false;\n\n for (var prop in desc) {\n if (prop === \"set\") {\n accessed = true;\n }\n }\n\n return accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.3-4-246",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-246.js",
+ "description": "Object.getOwnPropertyDescriptor - ensure that 'set' property of returned object is data property with correct 'configurable' attribute",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n var fun = function () {\n return \"ownSetProperty\";\n };\n Object.defineProperty(obj, \"property\", {\n set: fun,\n configurable: true\n });\n\n var desc = Object.getOwnPropertyDescriptor(obj, \"property\");\n\n var propDefined = \"set\" in desc;\n\n try {\n delete desc.set;\n var propDeleted = \"set\" in desc;\n\n return propDefined && !propDeleted;\n } catch (e) {\n return false;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.3-4-247",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-247.js",
+ "description": "Object.getOwnPropertyDescriptor - returned value is an instance of object",
+ "test": "assertTrue((function testcase() {\n var obj = { \"property\": 100 };\n\n var desc = Object.getOwnPropertyDescriptor(obj, \"property\");\n\n return desc instanceof Object;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-4-248",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-248.js",
+ "description": "Object.getOwnPropertyDescriptor - returned object contains the property 'value' if the value of property 'value' is not explicitly specified when defined by Object.defineProperty",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n Object.defineProperty(obj, \"property\", {\n writable: true,\n configurable: true\n });\n\n var desc = Object.getOwnPropertyDescriptor(obj, \"property\");\n\n return \"value\" in desc;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.3-4-249",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-249.js",
+ "description": "Object.getOwnPropertyDescriptor - returned object contains the property 'set' if the value of property 'set' is not explicitly specified when defined by Object.defineProperty.",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n Object.defineProperty(obj, \"property\", {\n get: function () { },\n configurable: true\n });\n\n var desc = Object.getOwnPropertyDescriptor(obj, \"property\");\n\n return \"set\" in desc;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.3-4-25",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-25.js",
+ "description": "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Object.isExtensible)",
+ "test": "assertTrue((function testcase() {\n var desc = Object.getOwnPropertyDescriptor(Object, \"isExtensible\");\n if (desc.value === Object.isExtensible &&\n desc.writable === true &&\n desc.enumerable === false &&\n desc.configurable === true) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-4-250",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-250.js",
+ "description": "Object.getOwnPropertyDescriptor - returned object contains the property 'get' if the value of property 'get' is not explicitly specified when defined by Object.defineProperty.",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n Object.defineProperty(obj, \"property\", {\n set: function () {},\n configurable: true\n });\n\n var desc = Object.getOwnPropertyDescriptor(obj, \"property\");\n\n return \"get\" in desc;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.3-4-26",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-26.js",
+ "description": "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Object.keys)",
+ "test": "assertTrue((function testcase() {\n var desc = Object.getOwnPropertyDescriptor(Object, \"keys\");\n if (desc.value === Object.keys &&\n desc.writable === true &&\n desc.enumerable === false &&\n desc.configurable === true) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-4-27",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-27.js",
+ "description": "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Object.prototype.constructor)",
+ "test": "assertTrue((function testcase() {\n var desc = Object.getOwnPropertyDescriptor(Object.prototype, \"constructor\");\n if (desc.value === Object.prototype.constructor &&\n desc.writable === true &&\n desc.enumerable === false &&\n desc.configurable === true) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-4-28",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-28.js",
+ "description": "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Object.prototype.toString)",
+ "test": "assertTrue((function testcase() {\n var desc = Object.getOwnPropertyDescriptor(Object.prototype, \"toString\");\n if (desc.value === Object.prototype.toString &&\n desc.writable === true &&\n desc.enumerable === false &&\n desc.configurable === true) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-4-29",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-29.js",
+ "description": "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Object.prototype.valueOf)",
+ "test": "assertTrue((function testcase() {\n var desc = Object.getOwnPropertyDescriptor(Object.prototype, \"valueOf\");\n if (desc.value === Object.prototype.valueOf &&\n desc.writable === true &&\n desc.enumerable === false &&\n desc.configurable === true) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-4-3",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-3.js",
+ "description": "Object.getOwnPropertyDescriptor returns an object representing an accessor desc for valid accessor properties",
+ "test": "assertTrue((function testcase() {\n var o = {};\n\n // dummy getter\n var getter = function () { return 1; }\n var d = { get: getter };\n\n Object.defineProperty(o, \"foo\", d);\n\n var desc = Object.getOwnPropertyDescriptor(o, \"foo\");\n if (desc.get === getter &&\n desc.set === undefined &&\n desc.enumerable === false &&\n desc.configurable === false) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-4-30",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-30.js",
+ "description": "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Object.prototype.isPrototypeOf)",
+ "test": "assertTrue((function testcase() {\n var desc = Object.getOwnPropertyDescriptor(Object.prototype, \"isPrototypeOf\");\n if (desc.value === Object.prototype.isPrototypeOf &&\n desc.writable === true &&\n desc.enumerable === false &&\n desc.configurable === true) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-4-31",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-31.js",
+ "description": "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Object.prototype.hasOwnProperty)",
+ "test": "assertTrue((function testcase() {\n var desc = Object.getOwnPropertyDescriptor(Object.prototype, \"hasOwnProperty\");\n if (desc.value === Object.prototype.hasOwnProperty &&\n desc.writable === true &&\n desc.enumerable === false &&\n desc.configurable === true) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-4-32",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-32.js",
+ "description": "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Object.prototype.propertyIsEnumerable)",
+ "test": "assertTrue((function testcase() {\n var desc = Object.getOwnPropertyDescriptor(Object.prototype, \"propertyIsEnumerable\");\n if (desc.value === Object.prototype.propertyIsEnumerable &&\n desc.writable === true &&\n desc.enumerable === false &&\n desc.configurable === true) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-4-33",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-33.js",
+ "description": "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Object.prototype.toLocaleString)",
+ "test": "assertTrue((function testcase() {\n var desc = Object.getOwnPropertyDescriptor(Object.prototype, \"toLocaleString\");\n if (desc.value === Object.prototype.toLocaleString &&\n desc.writable === true &&\n desc.enumerable === false &&\n desc.configurable === true) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-4-34",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-34.js",
+ "description": "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Function.prototype.constructor)",
+ "test": "assertTrue((function testcase() {\n var desc = Object.getOwnPropertyDescriptor(Function.prototype, \"constructor\");\n if (desc.value === Function.prototype.constructor &&\n desc.writable === true &&\n desc.enumerable === false &&\n desc.configurable === true) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-4-35",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-35.js",
+ "description": "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Function.prototype.toString)",
+ "test": "assertTrue((function testcase() {\n var desc = Object.getOwnPropertyDescriptor(Function.prototype, \"toString\");\n if (desc.value === Function.prototype.toString &&\n desc.writable === true &&\n desc.enumerable === false &&\n desc.configurable === true) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-4-36",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-36.js",
+ "description": "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Function.prototype.apply)",
+ "test": "assertTrue((function testcase() {\n var desc = Object.getOwnPropertyDescriptor(Function.prototype, \"apply\");\n if (desc.value === Function.prototype.apply &&\n desc.writable === true &&\n desc.enumerable === false &&\n desc.configurable === true) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-4-37",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-37.js",
+ "description": "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Function.prototype.call)",
+ "test": "assertTrue((function testcase() {\n var desc = Object.getOwnPropertyDescriptor(Function.prototype, \"call\");\n if (desc.value === Function.prototype.call &&\n desc.writable === true &&\n desc.enumerable === false &&\n desc.configurable === true) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-4-38",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-38.js",
+ "description": "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Function.prototype.bind)",
+ "test": "assertTrue((function testcase() {\n var desc = Object.getOwnPropertyDescriptor(Function.prototype, \"bind\");\n if (desc.value === Function.prototype.bind &&\n desc.writable === true &&\n desc.enumerable === false &&\n desc.configurable === true) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-4-39",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-39.js",
+ "description": "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Array.prototype.constructor)",
+ "test": "assertTrue((function testcase() {\n var desc = Object.getOwnPropertyDescriptor(Array.prototype, \"constructor\");\n if (desc.value === Array.prototype.constructor &&\n desc.writable === true &&\n desc.enumerable === false &&\n desc.configurable === true) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-4-4",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-4.js",
+ "description": "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Global.eval)",
+ "test": "assertTrue((function testcase() {\n var global = fnGlobalObject();\n var desc = Object.getOwnPropertyDescriptor(global, \"eval\");\n if (desc.value === global.eval &&\n desc.writable === true &&\n desc.enumerable === false &&\n desc.configurable === true) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-4-40",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-40.js",
+ "description": "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Array.prototype.concat)",
+ "test": "assertTrue((function testcase() {\n var desc = Object.getOwnPropertyDescriptor(Array.prototype, \"concat\");\n if (desc.value === Array.prototype.concat &&\n desc.writable === true &&\n desc.enumerable === false &&\n desc.configurable === true) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-4-41",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-41.js",
+ "description": "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Array.prototype.join)",
+ "test": "assertTrue((function testcase() {\n var desc = Object.getOwnPropertyDescriptor(Array.prototype, \"join\");\n if (desc.value === Array.prototype.join &&\n desc.writable === true &&\n desc.enumerable === false &&\n desc.configurable === true) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-4-42",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-42.js",
+ "description": "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Array.prototype.reverse)",
+ "test": "assertTrue((function testcase() {\n var desc = Object.getOwnPropertyDescriptor(Array.prototype, \"reverse\");\n if (desc.value === Array.prototype.reverse &&\n desc.writable === true &&\n desc.enumerable === false &&\n desc.configurable === true) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-4-43",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-43.js",
+ "description": "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Array.prototype.slice)",
+ "test": "assertTrue((function testcase() {\n var desc = Object.getOwnPropertyDescriptor(Array.prototype, \"slice\");\n if (desc.value === Array.prototype.slice &&\n desc.writable === true &&\n desc.enumerable === false &&\n desc.configurable === true) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-4-44",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-44.js",
+ "description": "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Array.prototype.sort)",
+ "test": "assertTrue((function testcase() {\n var desc = Object.getOwnPropertyDescriptor(Array.prototype, \"sort\");\n if (desc.value === Array.prototype.sort &&\n desc.writable === true &&\n desc.enumerable === false &&\n desc.configurable === true) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-4-45",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-45.js",
+ "description": "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Array.prototype.toString)",
+ "test": "assertTrue((function testcase() {\n var desc = Object.getOwnPropertyDescriptor(Array.prototype, \"toString\");\n if (desc.value === Array.prototype.toString &&\n desc.writable === true &&\n desc.enumerable === false &&\n desc.configurable === true) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-4-46",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-46.js",
+ "description": "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Array.prototype.push)",
+ "test": "assertTrue((function testcase() {\n var desc = Object.getOwnPropertyDescriptor(Array.prototype, \"push\");\n if (desc.value === Array.prototype.push &&\n desc.writable === true &&\n desc.enumerable === false &&\n desc.configurable === true) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-4-47",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-47.js",
+ "description": "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Array.prototype.pop)",
+ "test": "assertTrue((function testcase() {\n var desc = Object.getOwnPropertyDescriptor(Array.prototype, \"pop\");\n if (desc.value === Array.prototype.pop &&\n desc.writable === true &&\n desc.enumerable === false &&\n desc.configurable === true) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-4-48",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-48.js",
+ "description": "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Array.prototype.shift)",
+ "test": "assertTrue((function testcase() {\n var desc = Object.getOwnPropertyDescriptor(Array.prototype, \"shift\");\n if (desc.value === Array.prototype.shift &&\n desc.writable === true &&\n desc.enumerable === false &&\n desc.configurable === true) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-4-49",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-49.js",
+ "description": "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Array.prototype.unshift)",
+ "test": "assertTrue((function testcase() {\n var desc = Object.getOwnPropertyDescriptor(Array.prototype, \"unshift\");\n if (desc.value === Array.prototype.unshift &&\n desc.writable === true &&\n desc.enumerable === false &&\n desc.configurable === true) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-4-5",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-5.js",
+ "description": "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Global.parseInt)",
+ "test": "assertTrue((function testcase() {\n var global = fnGlobalObject();\n var desc = Object.getOwnPropertyDescriptor(global, \"parseInt\");\n if (desc.value === global.parseInt &&\n desc.writable === true &&\n desc.enumerable === false &&\n desc.configurable === true) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-4-50",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-50.js",
+ "description": "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Array.prototype.splice)",
+ "test": "assertTrue((function testcase() {\n var desc = Object.getOwnPropertyDescriptor(Array.prototype, \"splice\");\n if (desc.value === Array.prototype.splice &&\n desc.writable === true &&\n desc.enumerable === false &&\n desc.configurable === true) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-4-51",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-51.js",
+ "description": "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Array.prototype.toLocaleString)",
+ "test": "assertTrue((function testcase() {\n var desc = Object.getOwnPropertyDescriptor(Array.prototype, \"toLocaleString\");\n if (desc.value === Array.prototype.toLocaleString &&\n desc.writable === true &&\n desc.enumerable === false &&\n desc.configurable === true) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-4-52",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-52.js",
+ "description": "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Array.prototype.indexOf)",
+ "test": "assertTrue((function testcase() {\n var desc = Object.getOwnPropertyDescriptor(Array.prototype, \"indexOf\");\n if (desc.value === Array.prototype.indexOf &&\n desc.writable === true &&\n desc.enumerable === false &&\n desc.configurable === true) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-4-53",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-53.js",
+ "description": "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Array.prototype.lastIndexOf)",
+ "test": "assertTrue((function testcase() {\n var desc = Object.getOwnPropertyDescriptor(Array.prototype, \"lastIndexOf\");\n if (desc.value === Array.prototype.lastIndexOf &&\n desc.writable === true &&\n desc.enumerable === false &&\n desc.configurable === true) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-4-54",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-54.js",
+ "description": "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Array.prototype.every)",
+ "test": "assertTrue((function testcase() {\n var desc = Object.getOwnPropertyDescriptor(Array.prototype, \"every\");\n if (desc.value === Array.prototype.every &&\n desc.writable === true &&\n desc.enumerable === false &&\n desc.configurable === true) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-4-55",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-55.js",
+ "description": "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Array.prototype.some)",
+ "test": "assertTrue((function testcase() {\n var desc = Object.getOwnPropertyDescriptor(Array.prototype, \"some\");\n if (desc.value === Array.prototype.some &&\n desc.writable === true &&\n desc.enumerable === false &&\n desc.configurable === true) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-4-56",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-56.js",
+ "description": "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Array.prototype.forEach)",
+ "test": "assertTrue((function testcase() {\n var desc = Object.getOwnPropertyDescriptor(Array.prototype, \"forEach\");\n if (desc.value === Array.prototype.forEach &&\n desc.writable === true &&\n desc.enumerable === false &&\n desc.configurable === true) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-4-57",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-57.js",
+ "description": "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Array.prototype.map)",
+ "test": "assertTrue((function testcase() {\n var desc = Object.getOwnPropertyDescriptor(Array.prototype, \"map\");\n if (desc.value === Array.prototype.map &&\n desc.writable === true &&\n desc.enumerable === false &&\n desc.configurable === true) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-4-58",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-58.js",
+ "description": "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Array.prototype.filter)",
+ "test": "assertTrue((function testcase() {\n var desc = Object.getOwnPropertyDescriptor(Array.prototype, \"filter\");\n if (desc.value === Array.prototype.filter &&\n desc.writable === true &&\n desc.enumerable === false &&\n desc.configurable === true) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-4-59",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-59.js",
+ "description": "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Array.prototype.reduce)",
+ "test": "assertTrue((function testcase() {\n var desc = Object.getOwnPropertyDescriptor(Array.prototype, \"reduce\");\n if (desc.value === Array.prototype.reduce &&\n desc.writable === true &&\n desc.enumerable === false &&\n desc.configurable === true) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-4-6",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-6.js",
+ "description": "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Global.parseFloat)",
+ "test": "assertTrue((function testcase() {\n var global = fnGlobalObject();\n var desc = Object.getOwnPropertyDescriptor(global, \"parseFloat\");\n if (desc.value === global.parseFloat &&\n desc.writable === true &&\n desc.enumerable === false &&\n desc.configurable === true) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-4-60",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-60.js",
+ "description": "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Array.prototype.reduceRight)",
+ "test": "assertTrue((function testcase() {\n var desc = Object.getOwnPropertyDescriptor(Array.prototype, \"reduceRight\");\n if (desc.value === Array.prototype.reduceRight &&\n desc.writable === true &&\n desc.enumerable === false &&\n desc.configurable === true) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-4-61",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-61.js",
+ "description": "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (String.fromCharCode)",
+ "test": "assertTrue((function testcase() {\n var desc = Object.getOwnPropertyDescriptor(String, \"fromCharCode\");\n if (desc.value === String.fromCharCode &&\n desc.writable === true &&\n desc.enumerable === false &&\n desc.configurable === true) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-4-62",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-62.js",
+ "description": "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (String.prototype.constructor)",
+ "test": "assertTrue((function testcase() {\n var desc = Object.getOwnPropertyDescriptor(String.prototype, \"constructor\");\n if (desc.value === String.prototype.constructor &&\n desc.writable === true &&\n desc.enumerable === false &&\n desc.configurable === true) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-4-63",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-63.js",
+ "description": "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (String.prototype.charAt)",
+ "test": "assertTrue((function testcase() {\n var desc = Object.getOwnPropertyDescriptor(String.prototype, \"charAt\");\n if (desc.value === String.prototype.charAt &&\n desc.writable === true &&\n desc.enumerable === false &&\n desc.configurable === true) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-4-64",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-64.js",
+ "description": "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (String.prototype.charCodeAt)",
+ "test": "assertTrue((function testcase() {\n var desc = Object.getOwnPropertyDescriptor(String.prototype, \"charCodeAt\");\n if (desc.value === String.prototype.charCodeAt &&\n desc.writable === true &&\n desc.enumerable === false &&\n desc.configurable === true) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-4-65",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-65.js",
+ "description": "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (String.prototype.concat)",
+ "test": "assertTrue((function testcase() {\n var desc = Object.getOwnPropertyDescriptor(String.prototype, \"concat\");\n if (desc.value === String.prototype.concat &&\n desc.writable === true &&\n desc.enumerable === false &&\n desc.configurable === true) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-4-66",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-66.js",
+ "description": "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (String.prototype.indexOf)",
+ "test": "assertTrue((function testcase() {\n var desc = Object.getOwnPropertyDescriptor(String.prototype, \"indexOf\");\n if (desc.value === String.prototype.indexOf &&\n desc.writable === true &&\n desc.enumerable === false &&\n desc.configurable === true) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-4-67",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-67.js",
+ "description": "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (String.prototype.lastIndexOf)",
+ "test": "assertTrue((function testcase() {\n var desc = Object.getOwnPropertyDescriptor(String.prototype, \"lastIndexOf\");\n if (desc.value === String.prototype.lastIndexOf &&\n desc.writable === true &&\n desc.enumerable === false &&\n desc.configurable === true) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-4-68",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-68.js",
+ "description": "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (String.prototype.match)",
+ "test": "assertTrue((function testcase() {\n var desc = Object.getOwnPropertyDescriptor(String.prototype, \"match\");\n if (desc.value === String.prototype.match &&\n desc.writable === true &&\n desc.enumerable === false &&\n desc.configurable === true) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-4-69",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-69.js",
+ "description": "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (String.prototype.replace)",
+ "test": "assertTrue((function testcase() {\n var desc = Object.getOwnPropertyDescriptor(String.prototype, \"replace\");\n if (desc.value === String.prototype.replace &&\n desc.writable === true &&\n desc.enumerable === false &&\n desc.configurable === true) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-4-7",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-7.js",
+ "description": "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Global.isNaN)",
+ "test": "assertTrue((function testcase() {\n var global = fnGlobalObject();\n var desc = Object.getOwnPropertyDescriptor(global, \"isNaN\");\n if (desc.value === global.isNaN &&\n desc.writable === true &&\n desc.enumerable === false &&\n desc.configurable === true) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-4-70",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-70.js",
+ "description": "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (String.prototype.search)",
+ "test": "assertTrue((function testcase() {\n var desc = Object.getOwnPropertyDescriptor(String.prototype, \"search\");\n if (desc.value === String.prototype.search &&\n desc.writable === true &&\n desc.enumerable === false &&\n desc.configurable === true) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-4-71",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-71.js",
+ "description": "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (String.prototype.slice)",
+ "test": "assertTrue((function testcase() {\n var desc = Object.getOwnPropertyDescriptor(String.prototype, \"slice\");\n if (desc.value === String.prototype.slice &&\n desc.writable === true &&\n desc.enumerable === false &&\n desc.configurable === true) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-4-72",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-72.js",
+ "description": "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (String.prototype.split)",
+ "test": "assertTrue((function testcase() {\n var desc = Object.getOwnPropertyDescriptor(String.prototype, \"split\");\n if (desc.value === String.prototype.split &&\n desc.writable === true &&\n desc.enumerable === false &&\n desc.configurable === true) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-4-73",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-73.js",
+ "description": "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (String.prototype.substring)",
+ "test": "assertTrue((function testcase() {\n var desc = Object.getOwnPropertyDescriptor(String.prototype, \"substring\");\n if (desc.value === String.prototype.substring &&\n desc.writable === true &&\n desc.enumerable === false &&\n desc.configurable === true) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-4-74",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-74.js",
+ "description": "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (String.prototype.substr)",
+ "test": "assertTrue((function testcase() {\n var desc = Object.getOwnPropertyDescriptor(String.prototype, \"substr\");\n if (desc.value === String.prototype.substr &&\n desc.writable === true &&\n desc.enumerable === false &&\n desc.configurable === true) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-4-75",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-75.js",
+ "description": "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (String.prototype.toLowerCase)",
+ "test": "assertTrue((function testcase() {\n var desc = Object.getOwnPropertyDescriptor(String.prototype, \"toLowerCase\");\n if (desc.value === String.prototype.toLowerCase &&\n desc.writable === true &&\n desc.enumerable === false &&\n desc.configurable === true) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-4-76",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-76.js",
+ "description": "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (String.prototype.toString)",
+ "test": "assertTrue((function testcase() {\n var desc = Object.getOwnPropertyDescriptor(String.prototype, \"toString\");\n if (desc.value === String.prototype.toString &&\n desc.writable === true &&\n desc.enumerable === false &&\n desc.configurable === true) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-4-77",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-77.js",
+ "description": "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (String.prototype.toUpperCase)",
+ "test": "assertTrue((function testcase() {\n var desc = Object.getOwnPropertyDescriptor(String.prototype, \"toUpperCase\");\n if (desc.value === String.prototype.toUpperCase &&\n desc.writable === true &&\n desc.enumerable === false &&\n desc.configurable === true) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-4-78",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-78.js",
+ "description": "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (String.prototype.valueOf)",
+ "test": "assertTrue((function testcase() {\n var desc = Object.getOwnPropertyDescriptor(String.prototype, \"valueOf\");\n if (desc.value === String.prototype.valueOf &&\n desc.writable === true &&\n desc.enumerable === false &&\n desc.configurable === true) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-4-79",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-79.js",
+ "description": "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (String.prototype.toLocaleLowerCase)",
+ "test": "assertTrue((function testcase() {\n var desc = Object.getOwnPropertyDescriptor(String.prototype, \"toLocaleLowerCase\");\n if (desc.value === String.prototype.toLocaleLowerCase &&\n desc.writable === true &&\n desc.enumerable === false &&\n desc.configurable === true) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-4-8",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-8.js",
+ "description": "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Global.isFinite)",
+ "test": "assertTrue((function testcase() {\n var global = fnGlobalObject();\n var desc = Object.getOwnPropertyDescriptor(global, \"isFinite\");\n if (desc.value === global.isFinite &&\n desc.writable === true &&\n desc.enumerable === false &&\n desc.configurable === true) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-4-80",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-80.js",
+ "description": "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (String.prototype.toLocaleUpperCase)",
+ "test": "assertTrue((function testcase() {\n var desc = Object.getOwnPropertyDescriptor(String.prototype, \"toLocaleUpperCase\");\n if (desc.value === String.prototype.toLocaleUpperCase &&\n desc.writable === true &&\n desc.enumerable === false &&\n desc.configurable === true) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-4-81",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-81.js",
+ "description": "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (String.prototype.localeCompare)",
+ "test": "assertTrue((function testcase() {\n var desc = Object.getOwnPropertyDescriptor(String.prototype, \"localeCompare\");\n if (desc.value === String.prototype.localeCompare &&\n desc.writable === true &&\n desc.enumerable === false &&\n desc.configurable === true) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-4-82",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-82.js",
+ "description": "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (String.prototype.trim)",
+ "test": "assertTrue((function testcase() {\n var desc = Object.getOwnPropertyDescriptor(String.prototype, \"trim\");\n if (desc.value === String.prototype.trim &&\n desc.writable === true &&\n desc.enumerable === false &&\n desc.configurable === true) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-4-84",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-84.js",
+ "description": "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Boolean.prototype.constructor)",
+ "test": "assertTrue((function testcase() {\n var desc = Object.getOwnPropertyDescriptor(Boolean.prototype, \"constructor\");\n if (desc.value === Boolean.prototype.constructor &&\n desc.writable === true &&\n desc.enumerable === false &&\n desc.configurable === true) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-4-85",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-85.js",
+ "description": "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Boolean.prototype.toString)",
+ "test": "assertTrue((function testcase() {\n var desc = Object.getOwnPropertyDescriptor(Boolean.prototype, \"toString\");\n if (desc.value === Boolean.prototype.toString &&\n desc.writable === true &&\n desc.enumerable === false &&\n desc.configurable === true) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-4-86",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-86.js",
+ "description": "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Boolean.prototype.valueOf)",
+ "test": "assertTrue((function testcase() {\n var desc = Object.getOwnPropertyDescriptor(Boolean.prototype, \"valueOf\");\n if (desc.value === Boolean.prototype.valueOf &&\n desc.writable === true &&\n desc.enumerable === false &&\n desc.configurable === true) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-4-88",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-88.js",
+ "description": "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Number.prototype.constructor)",
+ "test": "assertTrue((function testcase() {\n var desc = Object.getOwnPropertyDescriptor(Number.prototype, \"constructor\");\n if (desc.value === Number.prototype.constructor &&\n desc.writable === true &&\n desc.enumerable === false &&\n desc.configurable === true) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-4-89",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-89.js",
+ "description": "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Number.prototype.toString)",
+ "test": "assertTrue((function testcase() {\n var desc = Object.getOwnPropertyDescriptor(Number.prototype, \"toString\");\n if (desc.value === Number.prototype.toString &&\n desc.writable === true &&\n desc.enumerable === false &&\n desc.configurable === true) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-4-9",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-9.js",
+ "description": "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Global.decodeURI)",
+ "test": "assertTrue((function testcase() {\n var global = fnGlobalObject();\n var desc = Object.getOwnPropertyDescriptor(global, \"decodeURI\");\n if (desc.value === global.decodeURI &&\n desc.writable === true &&\n desc.enumerable === false &&\n desc.configurable === true) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-4-90",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-90.js",
+ "description": "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Number.prototype.toLocaleString)",
+ "test": "assertTrue((function testcase() {\n var desc = Object.getOwnPropertyDescriptor(Number.prototype, \"toLocaleString\");\n if (desc.value === Number.prototype.toLocaleString &&\n desc.writable === true &&\n desc.enumerable === false &&\n desc.configurable === true) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-4-91",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-91.js",
+ "description": "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Number.prototype.toFixed)",
+ "test": "assertTrue((function testcase() {\n var desc = Object.getOwnPropertyDescriptor(Number.prototype, \"toFixed\");\n if (desc.value === Number.prototype.toFixed &&\n desc.writable === true &&\n desc.enumerable === false &&\n desc.configurable === true) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-4-92",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-92.js",
+ "description": "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Number.prototype.toExponential)",
+ "test": "assertTrue((function testcase() {\n var desc = Object.getOwnPropertyDescriptor(Number.prototype, \"toExponential\");\n if (desc.value === Number.prototype.toExponential &&\n desc.writable === true &&\n desc.enumerable === false &&\n desc.configurable === true) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-4-93",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-93.js",
+ "description": "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Number.prototype.toPrecision)",
+ "test": "assertTrue((function testcase() {\n var desc = Object.getOwnPropertyDescriptor(Number.prototype, \"toPrecision\");\n if (desc.value === Number.prototype.toPrecision &&\n desc.writable === true &&\n desc.enumerable === false &&\n desc.configurable === true) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-4-94",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-94.js",
+ "description": "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Number.prototype.valueOf)",
+ "test": "assertTrue((function testcase() {\n var desc = Object.getOwnPropertyDescriptor(Number.prototype, \"valueOf\");\n if (desc.value === Number.prototype.valueOf &&\n desc.writable === true &&\n desc.enumerable === false &&\n desc.configurable === true) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-4-96",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-96.js",
+ "description": "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Math.abs)",
+ "test": "assertTrue((function testcase() {\n var desc = Object.getOwnPropertyDescriptor(Math, \"abs\");\n if (desc.value === Math.abs &&\n desc.writable === true &&\n desc.enumerable === false &&\n desc.configurable === true) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-4-97",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-97.js",
+ "description": "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Math.acos)",
+ "test": "assertTrue((function testcase() {\n var desc = Object.getOwnPropertyDescriptor(Math, \"acos\");\n if (desc.value === Math.acos &&\n desc.writable === true &&\n desc.enumerable === false &&\n desc.configurable === true) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-4-98",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-98.js",
+ "description": "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Math.asin)",
+ "test": "assertTrue((function testcase() {\n var desc = Object.getOwnPropertyDescriptor(Math, \"asin\");\n if (desc.value === Math.asin &&\n desc.writable === true &&\n desc.enumerable === false &&\n desc.configurable === true) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.3-4-99",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-99.js",
+ "description": "Object.getOwnPropertyDescriptor returns data desc for functions on built-ins (Math.atan)",
+ "test": "assertTrue((function testcase() {\n var desc = Object.getOwnPropertyDescriptor(Math, \"atan\");\n if (desc.value === Math.atan &&\n desc.writable === true &&\n desc.enumerable === false &&\n desc.configurable === true) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.2.3.4.json b/website/resources/scripts/testcases2/15.2.3.4.json
new file mode 100644
index 000000000..c0dae9be8
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.2.3.4.json
@@ -0,0 +1,252 @@
+{
+ "testCollection": {
+ "name": "15.2.3.4",
+ "numTests": 35,
+ "tests": [
+ {
+ "id": "15.2.3.4-0-1",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.4/15.2.3.4-0-1.js",
+ "description": "Object.getOwnPropertyNames must exist as a function",
+ "test": "assertTrue((typeof(Object.getOwnPropertyNames) === \"function\"));\n"
+ },
+ {
+ "id": "15.2.3.4-0-2",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.4/15.2.3.4-0-2.js",
+ "description": "Object.getOwnPropertyNames must exist as a function taking 1 parameter",
+ "test": "assertTrue((Object.getOwnPropertyNames.length === 1));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyNames))"
+ },
+ {
+ "id": "15.2.3.4-1-2",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.4/15.2.3.4-1-2.js",
+ "description": "Object.getOwnPropertyNames throws TypeError if 'O' is undefined",
+ "test": "assertTrue((function testcase() {\n try {\n Object.getOwnPropertyNames(undefined);\n return false;\n } catch (e) {\n return e instanceof TypeError;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyNames))"
+ },
+ {
+ "id": "15.2.3.4-1-3",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.4/15.2.3.4-1-3.js",
+ "description": "Object.getOwnPropertyNames throws TypeError if 'O' is null",
+ "test": "assertTrue((function testcase() {\n try {\n Object.getOwnPropertyNames(null);\n return false;\n } catch (e) {\n return e instanceof TypeError;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyNames))"
+ },
+ {
+ "id": "15.2.3.4-1-4",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.4/15.2.3.4-1-4.js",
+ "description": "Object.getOwnPropertyNames throws TypeError if 'O' is a boolean",
+ "test": "assertTrue((function testcase() {\n try {\n Object.getOwnPropertyNames(true);\n return false;\n } catch (e) {\n return e instanceof TypeError;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyNames))"
+ },
+ {
+ "id": "15.2.3.4-1-5",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.4/15.2.3.4-1-5.js",
+ "description": "Object.getOwnPropertyNames throws TypeError if 'O' is a string",
+ "test": "assertTrue((function testcase() {\n try {\n Object.getOwnPropertyNames(\"abc\");\n return false;\n } catch (e) {\n return e instanceof TypeError;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyNames))"
+ },
+ {
+ "id": "15.2.3.4-1",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.4/15.2.3.4-1.js",
+ "description": "Object.getOwnPropertyNames throws TypeError if type of first param is not Object",
+ "test": "assertTrue((function testcase() {\n try {\n Object.getOwnPropertyNames(0);\n }\n catch (e) {\n if (e instanceof TypeError) {\n return true;\n }\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyNames))"
+ },
+ {
+ "id": "15.2.3.4-2-1",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.4/15.2.3.4-2-1.js",
+ "description": "Object.getOwnPropertyNames - returned array is an array according to Array.isArray",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n var result = Object.getOwnPropertyNames(obj);\n\n return Array.isArray(result);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyNames) && fnExists(Array.isArray))"
+ },
+ {
+ "id": "15.2.3.4-2-2",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.4/15.2.3.4-2-2.js",
+ "description": "Object.getOwnPropertyNames - returned array is an instance of Array",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n var result = Object.getOwnPropertyNames(obj);\n\n return result instanceof Array;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyNames))"
+ },
+ {
+ "id": "15.2.3.4-2-3",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.4/15.2.3.4-2-3.js",
+ "description": "Object.getOwnPropertyNames - length of returned array is initialized to 0",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n var result = Object.getOwnPropertyNames(obj);\n\n return result.length === 0;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyNames))"
+ },
+ {
+ "id": "15.2.3.4-2-4",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.4/15.2.3.4-2-4.js",
+ "description": "Object.getOwnPropertyNames - returned array is the standard built-in constructor",
+ "test": "assertTrue((function testcase() {\n var oldArray = Array;\n Array = function () {\n throw new Error(\"invoke customer defined Array!\");\n };\n\n var obj = {};\n try {\n var result = Object.getOwnPropertyNames(obj);\n return Object.prototype.toString.call(result) === \"[object Array]\";\n } catch (ex) {\n return false;\n } finally {\n Array = oldArray;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyNames))"
+ },
+ {
+ "id": "15.2.3.4-3-1",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.4/15.2.3.4-3-1.js",
+ "description": "Object.getOwnPropertyNames - elements of the returned array start from index 0",
+ "test": "assertTrue((function testcase() {\n var obj = { prop1: 1001 };\n\n var arr = Object.getOwnPropertyNames(obj);\n\n return arr.hasOwnProperty(0) && arr[0] === \"prop1\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyNames))"
+ },
+ {
+ "id": "15.2.3.4-4-1",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-1.js",
+ "description": "Object.getOwnPropertyNames returns array of property names (Global)",
+ "test": "assertTrue((function testcase() {\n var result = Object.getOwnPropertyNames(fnGlobalObject());\n var expResult = [\"NaN\", \"Infinity\", \"undefined\", \"eval\", \"parseInt\", \"parseFloat\", \"isNaN\", \"isFinite\", \"decodeURI\", \"decodeURIComponent\", \"encodeURI\", \"encodeURIComponent\", \"Object\", \"Function\", \"Array\", \"String\", \"Boolean\", \"Number\", \"Date\", \"Date\", \"RegExp\", \"Error\", \"EvalError\", \"RangeError\", \"ReferenceError\", \"SyntaxError\", \"TypeError\", \"URIError\", \"Math\", \"JSON\"];\n\n var result1 = {};\n for (var p in result) {\n result1[result[p]] = true;\n }\n\n for (var p1 in expResult) {\n if (!result1[expResult[p1]]) {\n return false;\n }\n }\n\n return true;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyNames))"
+ },
+ {
+ "id": "15.2.3.4-4-2",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-2.js",
+ "description": "Object.getOwnPropertyNames returns array of property names (Object)",
+ "test": "assertTrue((function testcase() {\n var result = Object.getOwnPropertyNames(Object);\n var expResult = [\"getPrototypeOf\", \"getOwnPropertyDescriptor\", \"getOwnPropertyNames\", \"create\", \"defineProperty\", \"defineProperties\", \"seal\", \"freeze\", \"preventExtensions\", \"isSealed\", \"isFrozen\", \"isExtensible\", \"keys\", \"prototype\", \"length\"];\n var found;\n\n return arrayContains(result, expResult);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyNames))"
+ },
+ {
+ "id": "15.2.3.4-4-36",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-36.js",
+ "description": "Object.getOwnPropertyNames - inherited data properties are not pushed into the returned array",
+ "test": "assertTrue((function testcase() {\n\n var proto = { \"parent\": \"parent\" };\n\n var Con = function () { };\n Con.prototype = proto;\n\n var child = new Con();\n\n var result = Object.getOwnPropertyNames(child);\n\n for (var p in result) {\n if (result[p] === \"parent\") {\n return false;\n }\n }\n return true;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyNames))"
+ },
+ {
+ "id": "15.2.3.4-4-37",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-37.js",
+ "description": "Object.getOwnPropertyNames - inherited accessor properties are not pushed into the returned array",
+ "test": "assertTrue((function testcase() {\n var proto = {};\n Object.defineProperty(proto, \"parent\", {\n get: function () {\n return \"parent\";\n },\n configurable: true\n });\n\n var Con = function () { };\n Con.prototype = proto;\n\n var child = new Con();\n\n var result = Object.getOwnPropertyNames(child);\n\n for (var p in result) {\n if (result[p] === \"parent\") {\n return false;\n }\n }\n return true;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyNames) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.4-4-38",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-38.js",
+ "description": "Object.getOwnPropertyNames - own data properties are pushed into the returned array",
+ "test": "assertTrue((function testcase() {\n\n var obj = { \"a\": \"a\" };\n\n var result = Object.getOwnPropertyNames(obj);\n\n return result[0] === \"a\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyNames))"
+ },
+ {
+ "id": "15.2.3.4-4-39",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-39.js",
+ "description": "Object.getOwnPropertyNames - own accessor properties are pushed into the returned array",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n Object.defineProperty(obj, \"a\", {\n get: function () {\n return \"a\";\n },\n configurable: true\n });\n\n var result = Object.getOwnPropertyNames(obj);\n\n return result[0] === \"a\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyNames) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.4-4-40",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-40.js",
+ "description": "Object.getOwnPropertyNames - inherited data property of String object 'O' is not pushed into the returned array",
+ "test": "assertTrue((function testcase() {\n try {\n var str = new String(\"abc\");\n\n String.prototype.protoProperty = \"protoString\";\n\n var result = Object.getOwnPropertyNames(str);\n\n for (var p in result) {\n if (result[p] === \"protoProperty\") {\n return false;\n }\n }\n\n return true;\n } finally {\n delete String.prototype.protoProperty;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyNames))"
+ },
+ {
+ "id": "15.2.3.4-4-41",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-41.js",
+ "description": "Object.getOwnPropertyNames - inherited accessor property of String object 'O' is not pushed into the returned array",
+ "test": "assertTrue((function testcase() {\n try {\n var str = new String(\"abc\");\n\n Object.defineProperty(String.prototype, \"protoProperty\", {\n get: function () {\n return \"protoString\";\n },\n configurable: true\n });\n\n var result = Object.getOwnPropertyNames(str);\n\n for (var p in result) {\n if (result[p] === \"protoProperty\") {\n return false;\n }\n }\n return true;\n } finally {\n delete String.prototype.protoProperty;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyNames) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.4-4-42",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-42.js",
+ "description": "Object.getOwnPropertyNames - own data property of String object 'O' is pushed into the returned array",
+ "test": "assertTrue((function testcase() {\n var str = new String(\"abc\");\n\n Object.defineProperty(str, \"ownProperty\", {\n value: \"ownString\",\n configurable: true\n });\n\n var result = Object.getOwnPropertyNames(str);\n\n for (var p in result) {\n if (result[p] === \"ownProperty\") {\n return true;\n }\n }\n\n return false;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyNames) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.4-4-43",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-43.js",
+ "description": "Object.getOwnPropertyNames - own accessor property of String object 'O' is pushed into the returned array",
+ "test": "assertTrue((function testcase() {\n var str = new String(\"abc\");\n\n Object.defineProperty(str, \"ownProperty\", {\n get: function () {\n return \"ownString\";\n },\n configurable: true\n });\n\n var result = Object.getOwnPropertyNames(str);\n\n for (var p in result) {\n if (result[p] === \"ownProperty\") {\n return true;\n }\n }\n\n return false;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyNames) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.4-4-44",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-44.js",
+ "description": "Object.getOwnPropertyNames - own index properties of String object are pushed into the returned Array",
+ "test": "assertTrue((function testcase() {\n\n var str = new String(\"abc\");\n str[5] = \"de\";\n\n var expResult = [\"0\", \"1\", \"2\", \"length\", \"5\"];\n\n var result = Object.getOwnPropertyNames(str);\n\n return compareArray(expResult, result);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyNames))"
+ },
+ {
+ "id": "15.2.3.4-4-45",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-45.js",
+ "description": "Object.getOwnPropertyNames - inherited data property of Array object 'O' is not pushed into the returned array.",
+ "test": "assertTrue((function testcase() {\n try {\n var arr = [0, 1, 2];\n\n Array.prototype.protoProperty = \"protoArray\";\n\n var result = Object.getOwnPropertyNames(arr);\n\n for (var p in result) {\n if (result[p] === \"protoProperty\") {\n return false;\n }\n }\n return true;\n } finally {\n delete Array.prototype.protoProperty;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyNames))"
+ },
+ {
+ "id": "15.2.3.4-4-46",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-46.js",
+ "description": "Object.getOwnPropertyNames - inherited accessor property of Array object 'O' is not pushed into the returned array.",
+ "test": "assertTrue((function testcase() {\n try {\n var arr = [0, 1, 2];\n\n Object.defineProperty(Array.prototype, \"protoProperty\", {\n get: function () {\n return \"protoArray\";\n },\n configurable: true\n });\n\n var result = Object.getOwnPropertyNames(arr);\n\n for (var p in result) {\n if (result[p] === \"protoProperty\") {\n return false;\n }\n }\n return true;\n } finally {\n delete Array.prototype.protoProperty;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyNames) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.4-4-47",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-47.js",
+ "description": "Object.getOwnPropertyNames - own data property of Array object 'O' is pushed into the returned array",
+ "test": "assertTrue((function testcase() {\n var arr = [0, 1, 2];\n arr.ownProperty = \"ownArray\";\n\n var result = Object.getOwnPropertyNames(arr);\n\n for (var p in result) {\n if (result[p] === \"ownProperty\") {\n return true;\n }\n }\n\n return false;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyNames))"
+ },
+ {
+ "id": "15.2.3.4-4-48",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-48.js",
+ "description": "Object.getOwnPropertyNames - own accessor property of Array object 'O' is pushed into the returned array.",
+ "test": "assertTrue((function testcase() {\n var arr = [0, 1, 2];\n\n Object.defineProperty(arr, \"ownProperty\", {\n get: function () {\n return \"ownArray\";\n },\n configurable: true\n });\n\n var result = Object.getOwnPropertyNames(arr);\n\n for (var p in result) {\n if (result[p] === \"ownProperty\") {\n return true;\n }\n }\n\n return false;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyNames) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.4-4-49",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-49.js",
+ "description": "Object.getOwnPropertyNames - own index properties of Array objcect are pushed into the returned Array",
+ "test": "assertTrue((function testcase() {\n var arr = [0, 1, 2];\n\n var expResult = [\"0\", \"1\", \"2\", \"length\"];\n\n var result = Object.getOwnPropertyNames(arr);\n\n return compareArray(expResult, result);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyNames))"
+ },
+ {
+ "id": "15.2.3.4-4-50",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-50.js",
+ "description": "Object.getOwnPropertyNames - non-enumerable own property of 'O' is pushed into the returned Array",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n Object.defineProperty(obj, \"nonEnumerableProp\", {\n value: 10,\n enumerable: false,\n configurable: true\n });\n\n var result = Object.getOwnPropertyNames(obj);\n\n return result[0] === \"nonEnumerableProp\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyNames) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.4-4-b-1",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-b-1.js",
+ "description": "Object.getOwnPropertyNames - descriptor of resultant array is all true",
+ "test": "assertTrue((function testcase() {\n var obj = new Object();\n obj.x = 1;\n obj.y = 2;\n var result = Object.getOwnPropertyNames(obj);\n var desc = Object.getOwnPropertyDescriptor(result,\"0\");\n if (desc.enumerable === true &&\n desc.configurable === true &&\n desc.writable === true) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyNames))"
+ },
+ {
+ "id": "15.2.3.4-4-b-2",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-b-2.js",
+ "description": "Object.getOwnPropertyNames - all own properties are pushed into the returned array",
+ "test": "assertTrue((function testcase() {\n var obj = { \"a\": \"a\" };\n\n Object.defineProperty(obj, \"b\", {\n get: function () {\n return \"b\";\n },\n enumerable: false,\n configurable: true\n });\n\n Object.defineProperty(obj, \"c\", {\n get: function () {\n return \"c\";\n },\n enumerable: true,\n configurable: true\n });\n\n Object.defineProperty(obj, \"d\", {\n value: \"d\",\n enumerable: false,\n configurable: true\n });\n\n var result = Object.getOwnPropertyNames(obj);\n var expResult = [\"a\", \"b\", \"c\", \"d\"];\n\n return compareArray(expResult, result);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyNames) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.4-4-b-3",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-b-3.js",
+ "description": "Object.getOwnPropertyNames - own property named empty('') is pushed into the returned array",
+ "test": "assertTrue((function testcase() {\n var obj = { \"\": \"empty\" };\n\n var result = Object.getOwnPropertyNames(obj);\n\n for (var p in result) {\n if (result[p] === \"\") {\n return true;\n }\n }\n\n return false;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyNames))"
+ },
+ {
+ "id": "15.2.3.4-4-b-4",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-b-4.js",
+ "description": "Object.getOwnPropertyNames - elements of the returned array are writable",
+ "test": "assertTrue((function testcase() {\n var obj = { \"a\": \"a\" };\n\n var result = Object.getOwnPropertyNames(obj);\n\n try {\n var beforeOverride = (result[0] === \"a\");\n result[0] = \"b\";\n var afterOverride = (result[0] === \"b\");\n\n return beforeOverride && afterOverride;\n } catch (ex) {\n return false;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyNames))"
+ },
+ {
+ "id": "15.2.3.4-4-b-5",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-b-5.js",
+ "description": "Object.getOwnPropertyNames - elements of the returned array are enumerable",
+ "test": "assertTrue((function testcase() {\n var obj = { \"a\": \"a\" };\n\n var result = Object.getOwnPropertyNames(obj);\n\n for (var p in result) {\n if (result[p] === \"a\") {\n return true;\n }\n }\n\n return false;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyNames))"
+ },
+ {
+ "id": "15.2.3.4-4-b-6",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-b-6.js",
+ "description": "Object.getOwnPropertyNames - elements of the returned array are configurable",
+ "test": "assertTrue((function testcase() {\n var obj = { \"a\": \"a\" };\n\n var result = Object.getOwnPropertyNames(obj);\n\n var beforeDeleted = (result.hasOwnProperty(\"0\"));\n delete result[0];\n var afterDeleted = (result.hasOwnProperty(\"0\"));\n\n return beforeDeleted && !afterDeleted;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyNames))"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.2.3.5.json b/website/resources/scripts/testcases2/15.2.3.5.json
new file mode 100644
index 000000000..65cccbe4c
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.2.3.5.json
@@ -0,0 +1,2205 @@
+{
+ "testCollection": {
+ "name": "15.2.3.5",
+ "numTests": 314,
+ "tests": [
+ {
+ "id": "15.2.3.5-0-1",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-0-1.js",
+ "description": "Object.create must exist as a function",
+ "test": "assertTrue((typeof(Object.create) === \"function\"));\n"
+ },
+ {
+ "id": "15.2.3.5-0-2",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-0-2.js",
+ "description": "Object.create must exist as a function taking 2 parameters",
+ "test": "assertTrue((Object.create.length === 2));\n",
+ "precondition": "(fnExists(Object.create))"
+ },
+ {
+ "id": "15.2.3.5-1-1",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-1-1.js",
+ "description": "Object.create throws TypeError if 'O' is undefined",
+ "test": "assertTrue((function testcase() {\n\n try {\n Object.create(undefined);\n return false;\n } catch (e) {\n return (e instanceof TypeError);\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create))"
+ },
+ {
+ "id": "15.2.3.5-1-2",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-1-2.js",
+ "description": "Object.create TypeError is not thrown if 'O' is null",
+ "test": "assertTrue((function testcase() {\n try {\n Object.create(null);\n return true;\n } catch (e) {\n return false;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create))"
+ },
+ {
+ "id": "15.2.3.5-1-3",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-1-3.js",
+ "description": "Object.create throws TypeError if 'O' is a boolean primitive",
+ "test": "assertTrue((function testcase() {\n\n try {\n Object.create(true);\n return false;\n } catch (e) {\n return (e instanceof TypeError);\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create))"
+ },
+ {
+ "id": "15.2.3.5-1-4",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-1-4.js",
+ "description": "Object.create throws TypeError if 'O' is a number primitive",
+ "test": "assertTrue((function testcase() {\n\n try {\n Object.create(2);\n return false;\n } catch (e) {\n return (e instanceof TypeError);\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create))"
+ },
+ {
+ "id": "15.2.3.5-1",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-1.js",
+ "description": "Object.create throws TypeError if type of first param is not Object",
+ "test": "assertTrue((function testcase() {\n try {\n Object.create(0);\n }\n catch (e) {\n if (e instanceof TypeError) {\n return true;\n }\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create))"
+ },
+ {
+ "id": "15.2.3.5-2-1",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-2-1.js",
+ "description": "Object.create creates new Object",
+ "test": "assertTrue((function testcase() {\n function base() {}\n var b = new base();\n var prop = new Object();\n var d = Object.create(b);\n\n if (typeof d === 'object') {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create) && fnExists(Object.getPrototypeOf))"
+ },
+ {
+ "id": "15.2.3.5-2-2",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-2-2.js",
+ "description": "Object.create - returned object is an instance of Object",
+ "test": "assertTrue((function testcase() {\n\n var newObj = Object.create({});\n return newObj instanceof Object;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create))"
+ },
+ {
+ "id": "15.2.3.5-3-1",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-3-1.js",
+ "description": "Object.create sets the prototype of the passed-in object",
+ "test": "assertTrue((function testcase() {\n function base() {}\n var b = new base();\n var d = Object.create(b);\n\n if (Object.getPrototypeOf(d) === b &&\n b.isPrototypeOf(d) === true) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create) && fnExists(Object.getPrototypeOf))"
+ },
+ {
+ "id": "15.2.3.5-4-1",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-1.js",
+ "description": "Object.create sets the prototype of the passed-in object and adds new properties",
+ "test": "assertTrue((function testcase() {\n function base() {}\n var b = new base();\n var prop = new Object();\n var d = Object.create(b,{ \"x\": {value: true,writable: false},\n \"y\": {value: \"str\",writable: false} });\n\n if (Object.getPrototypeOf(d) === b &&\n b.isPrototypeOf(d) === true &&\n d.x === true &&\n d.y === \"str\" &&\n b.x === undefined &&\n b.y === undefined) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create) && fnExists(Object.getPrototypeOf))"
+ },
+ {
+ "id": "15.2.3.5-4-10",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-10.js",
+ "description": "Object.create - argument 'Properties' is the Math object (15.2.3.7 step 2)",
+ "test": "assertTrue((function testcase() {\n\n var result = false;\n Object.defineProperty(Math, \"prop\", {\n get: function () {\n result = (this === Math);\n return {};\n },\n enumerable: true,\n configurable: true\n });\n\n try {\n var newObj = Object.create({}, Math);\n return result && newObj.hasOwnProperty(\"prop\");\n } finally {\n delete Math.prop;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.5-4-100",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-100.js",
+ "description": "Object.create - 'configurable' property of one property in 'Properties' is not present (8.10.5 step 4)",
+ "test": "assertTrue((function testcase() {\n\n var newObj = Object.create({}, {\n prop: {\n value: \"ownDataProperty\"\n }\n });\n\n var result1 = newObj.hasOwnProperty(\"prop\");\n delete newObj.prop;\n var result2 = newObj.hasOwnProperty(\"prop\");\n\n return result1 === true && result2 === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create))"
+ },
+ {
+ "id": "15.2.3.5-4-101",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-101.js",
+ "description": "Object.create - 'configurable' property of one property in 'Properties' is own data property (8.10.5 step 4.a)",
+ "test": "assertTrue((function testcase() {\n\n var newObj = Object.create({}, {\n prop: {\n configurable: false\n }\n });\n\n var result1 = newObj.hasOwnProperty(\"prop\");\n delete newObj.prop;\n var result2 = newObj.hasOwnProperty(\"prop\");\n\n return result1 === true && result2 === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create))"
+ },
+ {
+ "id": "15.2.3.5-4-102",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-102.js",
+ "description": "Object.create - 'configurable' property of one property in 'Properties' is an inherited data property (8.10.5 step 4.a)",
+ "test": "assertTrue((function testcase() {\n \n var proto = {\n configurable: true\n };\n\n var ConstructFun = function () { };\n ConstructFun.prototype = proto;\n var descObj = new ConstructFun();\n\n var newObj = Object.create({}, {\n prop: descObj \n });\n\n var result1 = newObj.hasOwnProperty(\"prop\");\n delete newObj.prop;\n var result2 = newObj.hasOwnProperty(\"prop\");\n\n return result1 === true && result2 === false;\n\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create))"
+ },
+ {
+ "id": "15.2.3.5-4-103",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-103.js",
+ "description": "Object.create - 'configurable' property of one property in 'Properties' is own data property that overrides an inherited data property (8.10.5 step 4.a)",
+ "test": "assertTrue((function testcase() {\n\n var proto = {\n configurable: true\n };\n\n var ConstructFun = function () { };\n ConstructFun.prototype = proto;\n var descObj = new ConstructFun();\n\n Object.defineProperty(descObj, \"configurable\", {\n value: false\n });\n\n var newObj = Object.create({}, {\n prop: descObj \n });\n var result1 = newObj.hasOwnProperty(\"prop\");\n delete newObj.prop;\n var result2 = newObj.hasOwnProperty(\"prop\");\n\n return result1 === true && result2 === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.5-4-104",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-104.js",
+ "description": "Object.create - 'configurable' property of one property in 'Properties' is own data property that overrides an inherited accessor property (8.10.5 step 4.a)",
+ "test": "assertTrue((function testcase() {\n\n var proto = {};\n Object.defineProperty(proto, \"configurable\", {\n get: function () {\n return true;\n }\n });\n\n var ConstructFun = function () { };\n ConstructFun.prototype = proto;\n var descObj = new ConstructFun();\n\n Object.defineProperty(descObj, \"configurable\", {\n value: false\n });\n\n var newObj = Object.create({}, {\n prop: descObj \n });\n var result1 = newObj.hasOwnProperty(\"prop\");\n delete newObj.prop;\n var result2 = newObj.hasOwnProperty(\"prop\");\n\n return result1 === true && result2 === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.5-4-105",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-105.js",
+ "description": "Object.create - 'configurable' property of one property in 'Properties' is own accessor property (8.10.5 step 4.a)",
+ "test": "assertTrue((function testcase() {\n\n var descObj = {};\n Object.defineProperty(descObj, \"configurable\", {\n get: function () {\n return true;\n }\n });\n\n var newObj = Object.create({}, {\n prop: descObj \n });\n var result1 = newObj.hasOwnProperty(\"prop\");\n delete newObj.prop;\n var result2 = newObj.hasOwnProperty(\"prop\");\n\n return result1 === true && result2 === false;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.5-4-106",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-106.js",
+ "description": "Object.create - 'configurable' property of one property in 'Properties' is an inherited accessor property (8.10.5 step 4.a)",
+ "test": "assertTrue((function testcase() {\n\n var proto = {};\n\n Object.defineProperty(proto, \"configurable\", {\n get: function () {\n return true;\n }\n });\n\n var ConstructFun = function () { };\n ConstructFun.prototype = proto;\n var descObj = new ConstructFun();\n\n var newObj = Object.create({}, {\n prop: descObj \n });\n var result1 = newObj.hasOwnProperty(\"prop\");\n delete newObj.prop;\n var result2 = newObj.hasOwnProperty(\"prop\");\n\n return result1 === true && result2 === false;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.5-4-107",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-107.js",
+ "description": "Object.create - 'configurable' property of one property in 'Properties' is own accessor property that overrides an inherited data property (8.10.5 step 4.a)",
+ "test": "assertTrue((function testcase() {\n\n var proto = {\n configurable: true\n };\n\n var ConstructFun = function () { };\n ConstructFun.prototype = proto;\n var descObj = new ConstructFun();\n\n Object.defineProperty(descObj, \"configurable\", {\n get: function () {\n return false;\n }\n });\n\n var newObj = Object.create({}, {\n prop: descObj\n });\n var result1 = newObj.hasOwnProperty(\"prop\");\n delete newObj.prop;\n var result2 = newObj.hasOwnProperty(\"prop\");\n\n return result1 === true && result2 === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.5-4-108",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-108.js",
+ "description": "Object.create - 'configurable' property of one property in 'Properties' is own accessor property that overrides an inherited accessor property (8.10.5 step 4.a)",
+ "test": "assertTrue((function testcase() {\n\n var proto = {};\n Object.defineProperty(proto, \"configurable\", {\n get: function () {\n return true;\n }\n });\n\n var ConstructFun = function () { };\n ConstructFun.prototype = proto;\n var descObj = new ConstructFun();\n\n Object.defineProperty(descObj, \"configurable\", {\n get: function () {\n return false;\n }\n });\n\n var newObj = Object.create({}, {\n prop: descObj \n });\n var result1 = newObj.hasOwnProperty(\"prop\");\n delete newObj.prop;\n var result2 = newObj.hasOwnProperty(\"prop\");\n\n return result1 === true && result2 === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.5-4-109",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-109.js",
+ "description": "Object.create - 'configurable' property of one property in 'Properties' is own accessor property without a get function (8.10.5 step 4.a)",
+ "test": "assertTrue((function testcase() {\n\n var descObj = {};\n Object.defineProperty(descObj, \"configurable\", {\n set: function () { }\n });\n\n var newObj = Object.create({}, {\n prop: descObj \n });\n var result1 = newObj.hasOwnProperty(\"prop\");\n delete newObj.prop;\n var result2 = newObj.hasOwnProperty(\"prop\");\n\n return result1 === true && result2 === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.5-4-11",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-11.js",
+ "description": "Object.create - argument 'Properties' is a Date object (15.2.3.7 step 2)",
+ "test": "assertTrue((function testcase() {\n\n var props = new Date();\n var result = false;\n\n Object.defineProperty(props, \"prop\", {\n get: function () {\n result = this instanceof Date;\n return {};\n },\n enumerable: true\n });\n var newObj = Object.create({}, props);\n return result && newObj.hasOwnProperty(\"prop\");\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.5-4-110",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-110.js",
+ "description": "Object.create - 'configurable' property of one property in 'Properties' is own accessor property without a get function, which overrides an inherited accessor property (8.10.5 step 4.a)",
+ "test": "assertTrue((function testcase() {\n\n var proto = {};\n Object.defineProperty(proto, \"configurable\", {\n get: function () {\n return true;\n }\n });\n\n var ConstructFun = function () { };\n ConstructFun.prototype = proto;\n var descObj = new ConstructFun();\n\n Object.defineProperty(descObj, \"configurable\", {\n set: function () { }\n });\n\n var newObj = Object.create({}, {\n prop: descObj \n });\n var result1 = newObj.hasOwnProperty(\"prop\");\n delete newObj.prop;\n var result2 = newObj.hasOwnProperty(\"prop\");\n\n return result1 === true && result2 === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.5-4-111",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-111.js",
+ "description": "Object.create - 'configurable' property of one property in 'Properties' is an inherited accessor property without a get function (8.10.5 step 4.a)",
+ "test": "assertTrue((function testcase() {\n\n var proto = {};\n\n Object.defineProperty(proto, \"configurable\", {\n set: function () { }\n });\n\n var ConstructFun = function () { };\n ConstructFun.prototype = proto;\n var descObj = new ConstructFun();\n\n var newObj = Object.create({}, {\n prop: descObj \n });\n var result1 = newObj.hasOwnProperty(\"prop\");\n delete newObj.prop;\n var result2 = newObj.hasOwnProperty(\"prop\");\n\n return result1 === true && result2 === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.5-4-112",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-112.js",
+ "description": "Object.create - one property in 'Properties' is a Function object which implements its own [[Get]] method to access the 'configurable' property (8.10.5 step 4.a)",
+ "test": "assertTrue((function testcase() {\n\n var descObj = function () { };\n\n descObj.configurable = true;\n\n var newObj = Object.create({}, {\n prop: descObj \n });\n\n var result1 = newObj.hasOwnProperty(\"prop\");\n delete newObj.prop;\n var result2 = newObj.hasOwnProperty(\"prop\");\n\n return result1 === true && result2 === false;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create))"
+ },
+ {
+ "id": "15.2.3.5-4-113",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-113.js",
+ "description": "Object.create - one property in 'Properties' is an Array object that uses Object's [[Get]] method to access the 'configurable' property (8.10.5 step 4.a)",
+ "test": "assertTrue((function testcase() {\n\n var descObj = [];\n\n descObj.configurable = true;\n\n var newObj = Object.create({}, {\n prop: descObj \n });\n\n var result1 = newObj.hasOwnProperty(\"prop\");\n delete newObj.prop;\n var result2 = newObj.hasOwnProperty(\"prop\");\n\n return result1 === true && result2 === false;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create))"
+ },
+ {
+ "id": "15.2.3.5-4-114",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-114.js",
+ "description": "Object.create - one property in 'Properties' is a String object that uses Object's [[Get]] method to access the 'configurable' property (8.10.5 step 4.a)",
+ "test": "assertTrue((function testcase() {\n\n var descObj = new String();\n\n descObj.configurable = true;\n\n var newObj = Object.create({}, {\n prop: descObj\n });\n var result1 = newObj.hasOwnProperty(\"prop\");\n delete newObj.prop;\n var result2 = newObj.hasOwnProperty(\"prop\");\n\n return result1 === true && result2 === false;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create))"
+ },
+ {
+ "id": "15.2.3.5-4-115",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-115.js",
+ "description": "Object.create - one property in 'Properties' is a Boolean object that uses Object's [[Get]] method to access the 'configurable' property (8.10.5 step 4.a)",
+ "test": "assertTrue((function testcase() {\n\n var descObj = new Boolean(false);\n\n descObj.configurable = true;\n\n var newObj = Object.create({}, {\n prop: descObj \n });\n\n var result1 = newObj.hasOwnProperty(\"prop\");\n delete newObj.prop;\n var result2 = newObj.hasOwnProperty(\"prop\");\n\n return result1 === true && result2 === false;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create))"
+ },
+ {
+ "id": "15.2.3.5-4-116",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-116.js",
+ "description": "Object.create - one property in 'Properties' is a Number object that uses Object's [[Get]] method to access the 'configurable' property (8.10.5 step 4.a)",
+ "test": "assertTrue((function testcase() {\n\n var descObj = new Number(-9);\n\n descObj.configurable = true;\n\n var newObj = Object.create({}, {\n prop: descObj \n });\n\n var result1 = newObj.hasOwnProperty(\"prop\");\n delete newObj.prop;\n var result2 = newObj.hasOwnProperty(\"prop\");\n\n return result1 === true && result2 === false;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create))"
+ },
+ {
+ "id": "15.2.3.5-4-117",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-117.js",
+ "description": "Object.create - one property in 'Properties' is the Math object that uses Object's [[Get]] method to access the 'configurable' property (8.10.5 step 4.a)",
+ "test": "assertTrue((function testcase() {\n\n try {\n Math.configurable = true;\n\n var newObj = Object.create({}, {\n prop: Math\n });\n\n var result1 = newObj.hasOwnProperty(\"prop\");\n delete newObj.prop;\n var result2 = newObj.hasOwnProperty(\"prop\");\n\n return result1 === true && result2 === false;\n } finally {\n delete Math.configurable;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create))"
+ },
+ {
+ "id": "15.2.3.5-4-118",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-118.js",
+ "description": "Object.create - one property in 'Properties' is a Date object that uses Object's [[Get]] method to access the 'configurable' property (8.10.5 step 4.a)",
+ "test": "assertTrue((function testcase() {\n\n var descObj = new Date();\n\n descObj.configurable = true;\n\n var newObj = Object.create({}, {\n prop: descObj \n });\n\n var result1 = newObj.hasOwnProperty(\"prop\");\n delete newObj.prop;\n var result2 = newObj.hasOwnProperty(\"prop\");\n\n return result1 === true && result2 === false;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create))"
+ },
+ {
+ "id": "15.2.3.5-4-119",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-119.js",
+ "description": "Object.create - one property in 'Properties' is a Date object that uses Object's [[Get]] method to access the 'configurable' property (8.10.5 step 4.a)",
+ "test": "assertTrue((function testcase() {\n\n var descObj = new RegExp();\n\n descObj.configurable = true;\n\n var newObj = Object.create({}, {\n prop: descObj \n });\n\n var result1 = newObj.hasOwnProperty(\"prop\");\n delete newObj.prop;\n var result2 = newObj.hasOwnProperty(\"prop\");\n\n return result1 === true && result2 === false;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create))"
+ },
+ {
+ "id": "15.2.3.5-4-12",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-12.js",
+ "description": "Object.create - argument 'Properties' is a RegExp object (15.2.3.7 step 2)",
+ "test": "assertTrue((function testcase() {\n\n var props = new RegExp();\n var result = false;\n\n Object.defineProperty(props, \"prop\", {\n get: function () {\n result = this instanceof RegExp;\n return {};\n },\n enumerable: true\n });\n var newObj = Object.create({}, props);\n return result && newObj.hasOwnProperty(\"prop\");\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.5-4-120",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-120.js",
+ "description": "Object.create - one property in 'Properties' is the JSON object that uses Object's [[Get]] method to access the 'configurable' property (8.10.5 step 4.a)",
+ "test": "assertTrue((function testcase() {\n\n try {\n JSON.configurable = true;\n\n var newObj = Object.create({}, {\n prop: JSON \n });\n\n var result1 = newObj.hasOwnProperty(\"prop\");\n delete newObj.prop;\n var result2 = newObj.hasOwnProperty(\"prop\");\n\n return result1 === true && result2 === false;\n } finally {\n delete JSON.configurable;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create))"
+ },
+ {
+ "id": "15.2.3.5-4-121",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-121.js",
+ "description": "Object.create - one property in 'Properties' is an Error object that uses Object's [[Get]] method to access the 'configurable' property (8.10.5 step 4.a)",
+ "test": "assertTrue((function testcase() {\n\n var descObj = new Error();\n\n descObj.configurable = true;\n\n var newObj = Object.create({}, {\n prop: descObj \n });\n\n var result1 = newObj.hasOwnProperty(\"prop\");\n delete newObj.prop;\n var result2 = newObj.hasOwnProperty(\"prop\");\n\n return result1 === true && result2 === false;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create))"
+ },
+ {
+ "id": "15.2.3.5-4-122",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-122.js",
+ "description": "Object.create - one property in 'Properties' is an Arguments object which implements its own [[Get]] method to access the 'configurable' property (8.10.5 step 4.a)",
+ "test": "assertTrue((function testcase() {\n\n var argObj = (function () { return arguments; })();\n\n argObj.configurable = true;\n\n var newObj = Object.create({}, {\n prop: argObj\n });\n var result1 = newObj.hasOwnProperty(\"prop\");\n delete newObj.prop;\n var result2 = newObj.hasOwnProperty(\"prop\");\n\n return result1 === true && result2 === false;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create))"
+ },
+ {
+ "id": "15.2.3.5-4-124",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-124.js",
+ "description": "Object.create - one property in 'Properties' is the global object that uses Object's [[Get]] method to access the 'configurable' property (8.10.5 step 4.a)",
+ "test": "assertTrue((function testcase() {\n\n try {\n fnGlobalObject().configurable = true;\n\n var newObj = Object.create({}, {\n prop: fnGlobalObject() \n });\n\n var result1 = newObj.hasOwnProperty(\"prop\");\n delete newObj.prop;\n var result2 = newObj.hasOwnProperty(\"prop\");\n\n return result1 === true && result2 === false;\n } finally {\n delete fnGlobalObject().configurable;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create))"
+ },
+ {
+ "id": "15.2.3.5-4-125",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-125.js",
+ "description": "Object.create - 'configurable' property of one property in 'Properties' is undefined (8.10.5 step 4.b)",
+ "test": "assertTrue((function testcase() {\n\n var newObj = Object.create({}, {\n prop: {\n configurable: undefined\n }\n });\n\n var result1 = newObj.hasOwnProperty(\"prop\");\n delete newObj.prop;\n var result2 = newObj.hasOwnProperty(\"prop\");\n\n return result1 === true && result2 === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create))"
+ },
+ {
+ "id": "15.2.3.5-4-126",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-126.js",
+ "description": "Object.create - 'configurable' property of one property in 'Properties' is null (8.10.5 step 4.b)",
+ "test": "assertTrue((function testcase() {\n\n var newObj = Object.create({}, {\n prop: {\n configurable: null\n }\n });\n\n var beforeDeleted = newObj.hasOwnProperty(\"prop\");\n\n delete newObj.prop;\n\n var afterDeleted = newObj.hasOwnProperty(\"prop\");\n\n return beforeDeleted === true && afterDeleted === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create))"
+ },
+ {
+ "id": "15.2.3.5-4-127",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-127.js",
+ "description": "Object.create - 'configurable' property of one property in 'Properties' is true (8.10.5 step 4.b)",
+ "test": "assertTrue((function testcase() {\n\n var newObj = Object.create({}, {\n prop: {\n configurable: true\n }\n });\n\n var beforeDeleted = newObj.hasOwnProperty(\"prop\");\n\n delete newObj.prop;\n\n var afterDeleted = newObj.hasOwnProperty(\"prop\");\n\n return beforeDeleted === true && afterDeleted === false;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create))"
+ },
+ {
+ "id": "15.2.3.5-4-128",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-128.js",
+ "description": "Object.create - 'configurable' property of one property in 'Properties' is false (8.10.5 step 4.b)",
+ "test": "assertTrue((function testcase() {\n\n var newObj = Object.create({}, {\n prop: {\n configurable: false\n }\n });\n\n var beforeDeleted = newObj.hasOwnProperty(\"prop\");\n\n delete newObj.prop;\n\n var afterDeleted = newObj.hasOwnProperty(\"prop\");\n\n return beforeDeleted === true && afterDeleted === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create))"
+ },
+ {
+ "id": "15.2.3.5-4-129",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-129.js",
+ "description": "Object.create - 'configurable' property of one property in 'Properties' is 0 (8.10.5 step 4.b)",
+ "test": "assertTrue((function testcase() {\n\n var newObj = Object.create({}, {\n prop: {\n configurable: 0\n }\n });\n\n var beforeDeleted = newObj.hasOwnProperty(\"prop\");\n\n delete newObj.prop;\n\n var afterDeleted = newObj.hasOwnProperty(\"prop\");\n\n return beforeDeleted === true && afterDeleted === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create))"
+ },
+ {
+ "id": "15.2.3.5-4-13",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-13.js",
+ "description": "Object.create - argument 'Properties' is the JSON object (15.2.3.7 step 2)",
+ "test": "assertTrue((function testcase() {\n\n var result = false;\n\n Object.defineProperty(JSON, \"prop\", {\n get: function () {\n result = (this === JSON);\n return {};\n },\n enumerable: true,\n configurable: true\n });\n\n try {\n var newObj = Object.create({}, JSON);\n return result && newObj.hasOwnProperty(\"prop\");\n } finally {\n delete JSON.prop;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.5-4-130",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-130.js",
+ "description": "Object.create - 'configurable' property of one property in 'Properties' is +0 (8.10.5 step 4.b)",
+ "test": "assertTrue((function testcase() {\n\n var newObj = Object.create({}, {\n prop: {\n configurable: +0\n }\n });\n\n var beforeDeleted = newObj.hasOwnProperty(\"prop\");\n\n delete newObj.prop;\n\n var afterDeleted = newObj.hasOwnProperty(\"prop\");\n\n return beforeDeleted === true && afterDeleted === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create))"
+ },
+ {
+ "id": "15.2.3.5-4-131",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-131.js",
+ "description": "Object.create - 'configurable' property of one property in 'Properties' is -0 (8.10.5 step 4.b)",
+ "test": "assertTrue((function testcase() {\n\n var newObj = Object.create({}, {\n prop: {\n configurable: -0\n }\n });\n\n var beforeDeleted = newObj.hasOwnProperty(\"prop\");\n\n delete newObj.prop;\n\n var afterDeleted = newObj.hasOwnProperty(\"prop\");\n\n return beforeDeleted === true && afterDeleted === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create))"
+ },
+ {
+ "id": "15.2.3.5-4-132",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-132.js",
+ "description": "Object.create - 'configurable' property of one property in 'Properties' is NaN (8.10.5 step 4.b)",
+ "test": "assertTrue((function testcase() {\n\n var newObj = Object.create({}, {\n prop: {\n configurable: NaN\n }\n });\n\n var beforeDeleted = newObj.hasOwnProperty(\"prop\");\n\n delete newObj.prop;\n\n var afterDeleted = newObj.hasOwnProperty(\"prop\");\n\n return beforeDeleted === true && afterDeleted === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create))"
+ },
+ {
+ "id": "15.2.3.5-4-133",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-133.js",
+ "description": "Object.create - 'configurable' property of one property in 'Properties' is a positive number (8.10.5 step 4.b)",
+ "test": "assertTrue((function testcase() {\n\n var newObj = Object.create({}, {\n prop: {\n configurable: 123\n }\n });\n\n var beforeDeleted = newObj.hasOwnProperty(\"prop\");\n\n delete newObj.prop;\n\n var afterDeleted = newObj.hasOwnProperty(\"prop\");\n\n return beforeDeleted === true && afterDeleted === false;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create))"
+ },
+ {
+ "id": "15.2.3.5-4-134",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-134.js",
+ "description": "Object.create - 'configurable' property of one property in 'Properties' is a negative number (8.10.5 step 4.b)",
+ "test": "assertTrue((function testcase() {\n\n var newObj = Object.create({}, {\n prop: {\n configurable: -123\n }\n });\n\n var beforeDeleted = newObj.hasOwnProperty(\"prop\");\n\n delete newObj.prop;\n\n var afterDeleted = newObj.hasOwnProperty(\"prop\");\n\n return beforeDeleted === true && afterDeleted === false;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create))"
+ },
+ {
+ "id": "15.2.3.5-4-135",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-135.js",
+ "description": "Object.create - 'configurable' property of one property in 'Properties' is an empty string (8.10.5 step 4.b)",
+ "test": "assertTrue((function testcase() {\n\n var newObj = Object.create({}, {\n prop: {\n configurable: \"\"\n }\n });\n\n var beforeDeleted = newObj.hasOwnProperty(\"prop\");\n\n delete newObj.prop;\n\n var afterDeleted = newObj.hasOwnProperty(\"prop\");\n\n return beforeDeleted === true && afterDeleted === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create))"
+ },
+ {
+ "id": "15.2.3.5-4-136",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-136.js",
+ "description": "Object.create - 'configurable' property of one property in 'Properties' is a non-empty string (8.10.5 step 4.b)",
+ "test": "assertTrue((function testcase() {\n\n var newObj = Object.create({}, {\n prop: {\n configurable: \"abc\"\n }\n });\n\n var beforeDeleted = newObj.hasOwnProperty(\"prop\");\n\n delete newObj.prop;\n\n var afterDeleted = newObj.hasOwnProperty(\"prop\");\n\n return beforeDeleted === true && afterDeleted === false;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create))"
+ },
+ {
+ "id": "15.2.3.5-4-137",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-137.js",
+ "description": "Object.create - 'configurable' property of one property in 'Properties' is a Function object (8.10.5 step 4.b)",
+ "test": "assertTrue((function testcase() {\n\n var newObj = Object.create({}, {\n prop: {\n configurable: function () { }\n }\n });\n\n var beforeDeleted = newObj.hasOwnProperty(\"prop\");\n\n delete newObj.prop;\n\n var afterDeleted = newObj.hasOwnProperty(\"prop\");\n\n return beforeDeleted === true && afterDeleted === false;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create))"
+ },
+ {
+ "id": "15.2.3.5-4-138",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-138.js",
+ "description": "Object.create - 'configurable' property of one property in 'Properties' is an Array object (8.10.5 step 4.b)",
+ "test": "assertTrue((function testcase() {\n\n var newObj = Object.create({}, {\n prop: {\n configurable: []\n }\n });\n\n var beforeDeleted = newObj.hasOwnProperty(\"prop\");\n\n delete newObj.prop;\n\n var afterDeleted = newObj.hasOwnProperty(\"prop\");\n\n return beforeDeleted === true && afterDeleted === false;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create))"
+ },
+ {
+ "id": "15.2.3.5-4-139",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-139.js",
+ "description": "Object.create - 'configurable' property of one property in 'Properties' is a String object (8.10.5 step 4.b)",
+ "test": "assertTrue((function testcase() {\n\n var newObj = Object.create({}, {\n prop: {\n configurable: new String(\"abc\")\n }\n });\n\n var beforeDeleted = newObj.hasOwnProperty(\"prop\");\n\n delete newObj.prop;\n\n var afterDeleted = newObj.hasOwnProperty(\"prop\");\n\n return beforeDeleted === true && afterDeleted === false;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create))"
+ },
+ {
+ "id": "15.2.3.5-4-14",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-14.js",
+ "description": "Object.create - argument 'Properties' is an Error object (15.2.3.7 step 2)",
+ "test": "assertTrue((function testcase() {\n\n var props = new Error(\"test\");\n var result = false;\n\n (Object.getOwnPropertyNames(props)).forEach(function(name){\n props[name] = {value:11, configurable:true}\n });\n\n Object.defineProperty(props, \"prop15_2_3_5_4_14\", {\n get: function () {\n result = this instanceof Error;\n return {};\n },\n enumerable: true\n });\n var newObj = Object.create({}, props);\n return result && newObj.hasOwnProperty(\"prop15_2_3_5_4_14\");\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create) && fnExists(Object.defineProperty) && fnExists(Array.prototype.forEach) && fnExists(Object.getOwnPropertyNames))"
+ },
+ {
+ "id": "15.2.3.5-4-140",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-140.js",
+ "description": "Object.create - 'configurable' property of one property in 'Properties' is a Boolean object (8.10.5 step 4.b)",
+ "test": "assertTrue((function testcase() {\n\n var newObj = Object.create({}, {\n prop: {\n configurable: new Boolean(true)\n }\n });\n\n var beforeDeleted = newObj.hasOwnProperty(\"prop\");\n\n delete newObj.prop;\n\n var afterDeleted = newObj.hasOwnProperty(\"prop\");\n\n return beforeDeleted === true && afterDeleted === false;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create))"
+ },
+ {
+ "id": "15.2.3.5-4-141",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-141.js",
+ "description": "Object.create - 'configurable' property of one property in 'Properties' is a Number object (8.10.5 step 4.b)",
+ "test": "assertTrue((function testcase() {\n\n var newObj = Object.create({}, {\n prop: {\n configurable: new Number(123)\n }\n });\n\n var beforeDeleted = newObj.hasOwnProperty(\"prop\");\n\n delete newObj.prop;\n\n var afterDeleted = newObj.hasOwnProperty(\"prop\");\n\n return beforeDeleted === true && afterDeleted === false;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create))"
+ },
+ {
+ "id": "15.2.3.5-4-142",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-142.js",
+ "description": "Object.create - 'configurable' property of one property in 'Properties' is the Math object (8.10.5 step 4.b)",
+ "test": "assertTrue((function testcase() {\n\n var newObj = Object.create({}, {\n prop: {\n configurable: Math\n }\n });\n\n var beforeDeleted = newObj.hasOwnProperty(\"prop\");\n\n delete newObj.prop;\n\n var afterDeleted = newObj.hasOwnProperty(\"prop\");\n\n return beforeDeleted === true && afterDeleted === false;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create))"
+ },
+ {
+ "id": "15.2.3.5-4-143",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-143.js",
+ "description": "Object.create - 'configurable' property of one property in 'Properties' is a Date object (8.10.5 step 4.b)",
+ "test": "assertTrue((function testcase() {\n\n var newObj = Object.create({}, {\n prop: {\n configurable: new Date()\n }\n });\n\n var beforeDeleted = newObj.hasOwnProperty(\"prop\");\n\n delete newObj.prop;\n\n var afterDeleted = newObj.hasOwnProperty(\"prop\");\n\n return beforeDeleted === true && afterDeleted === false;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create))"
+ },
+ {
+ "id": "15.2.3.5-4-144",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-144.js",
+ "description": "Object.create - 'configurable' property of one property in 'Properties' is a RegExp object (8.10.5 step 4.b)",
+ "test": "assertTrue((function testcase() {\n\n var newObj = Object.create({}, {\n prop: {\n configurable: new RegExp()\n }\n });\n\n var beforeDeleted = newObj.hasOwnProperty(\"prop\");\n\n delete newObj.prop;\n\n var afterDeleted = newObj.hasOwnProperty(\"prop\");\n\n return beforeDeleted === true && afterDeleted === false;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create))"
+ },
+ {
+ "id": "15.2.3.5-4-145",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-145.js",
+ "description": "Object.create - 'configurable' property of one property in 'Properties' is the JSON object (8.10.5 step 4.b)",
+ "test": "assertTrue((function testcase() {\n\n var newObj = Object.create({}, {\n prop: {\n configurable: JSON\n }\n });\n\n var beforeDeleted = newObj.hasOwnProperty(\"prop\");\n\n delete newObj.prop;\n\n var afterDeleted = newObj.hasOwnProperty(\"prop\");\n\n return beforeDeleted === true && afterDeleted === false;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create))"
+ },
+ {
+ "id": "15.2.3.5-4-146",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-146.js",
+ "description": "Object.create - 'configurable' property of one property in 'Properties' is an Error object (8.10.5 step 4.b)",
+ "test": "assertTrue((function testcase() {\n\n var newObj = Object.create({}, {\n prop: {\n configurable: new Error()\n }\n });\n\n var beforeDeleted = newObj.hasOwnProperty(\"prop\");\n\n delete newObj.prop;\n\n var afterDeleted = newObj.hasOwnProperty(\"prop\");\n\n return beforeDeleted === true && afterDeleted === false;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create))"
+ },
+ {
+ "id": "15.2.3.5-4-147",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-147.js",
+ "description": "Object.create - 'configurable' property of one property in 'Properties' is an Arguments object (8.10.5 step 4.b)",
+ "test": "assertTrue((function testcase() {\n\n var argObj = (function () { return arguments; })();\n\n var newObj = Object.create({}, {\n prop: {\n configurable: argObj\n }\n });\n\n var beforeDeleted = newObj.hasOwnProperty(\"prop\");\n\n delete newObj.prop;\n\n var afterDeleted = newObj.hasOwnProperty(\"prop\");\n\n return beforeDeleted === true && afterDeleted === false;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create))"
+ },
+ {
+ "id": "15.2.3.5-4-149",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-149.js",
+ "description": "Object.create - 'configurable' property of one property in 'Properties' is the global object (8.10.5 step 4.b)",
+ "test": "assertTrue((function testcase() {\n\n var newObj = Object.create({}, {\n prop: {\n configurable: fnGlobalObject()\n }\n });\n\n var beforeDeleted = newObj.hasOwnProperty(\"prop\");\n\n delete newObj.prop;\n\n var afterDeleted = newObj.hasOwnProperty(\"prop\");\n\n return beforeDeleted === true && afterDeleted === false;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create))"
+ },
+ {
+ "id": "15.2.3.5-4-15",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-15.js",
+ "description": "Object.create - argument 'Properties' is the Aguments object (15.2.3.7 step 2)",
+ "test": "assertTrue((function testcase() {\n\n var result = false;\n\n var argObj = (function () { return arguments; })();\n\n Object.defineProperty(argObj, \"prop\", {\n get: function () {\n result = ('[object Arguments]' === Object.prototype.toString.call(this));\n return {};\n },\n enumerable: true\n });\n\n var newObj = Object.create({}, argObj);\n return result && newObj.hasOwnProperty(\"prop\");\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.5-4-150",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-150.js",
+ "description": "Object.create - 'configurable' property of one property in 'Properties' is a string (value is 'false') which is treated as the value true (8.10.5 step 4.b)",
+ "test": "assertTrue((function testcase() {\n\n var newObj = Object.create({}, {\n prop: {\n configurable: \"false\"\n }\n });\n\n var beforeDeleted = newObj.hasOwnProperty(\"prop\");\n\n delete newObj.prop;\n\n var afterDeleted = newObj.hasOwnProperty(\"prop\");\n\n return beforeDeleted === true && afterDeleted === false;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create))"
+ },
+ {
+ "id": "15.2.3.5-4-151",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-151.js",
+ "description": "Object.create - 'configurable' property of one property in 'Properties' is new Boolean(false) which is treated as the value true (8.10.5 step 4.b)",
+ "test": "assertTrue((function testcase() {\n\n var newObj = Object.create({}, {\n prop: {\n configurable: new Boolean(false)\n }\n });\n\n var beforeDeleted = newObj.hasOwnProperty(\"prop\");\n\n delete newObj.prop;\n\n var afterDeleted = newObj.hasOwnProperty(\"prop\");\n\n return beforeDeleted === true && afterDeleted === false;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create))"
+ },
+ {
+ "id": "15.2.3.5-4-152",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-152.js",
+ "description": "Object.create - 'value' property of one property in 'Properties' is present (8.10.5 step 5)",
+ "test": "assertTrue((function testcase() {\n\n var newObj = Object.create({}, {\n prop: {\n value: 100\n }\n });\n\n return newObj.prop === 100;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create))"
+ },
+ {
+ "id": "15.2.3.5-4-153",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-153.js",
+ "description": "Object.create - 'value' property of one property in 'Properties' is not present (8.10.5 step 5)",
+ "test": "assertTrue((function testcase() {\n\n var newObj = Object.create({}, {\n prop: {}\n });\n\n return newObj.hasOwnProperty(\"prop\") && typeof (newObj.prop) === \"undefined\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create))"
+ },
+ {
+ "id": "15.2.3.5-4-154",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-154.js",
+ "description": "Object.create - 'value' property of one property in 'Properties' is own data property (8.10.5 step 5.a)",
+ "test": "assertTrue((function testcase() {\n\n var newObj = Object.create({}, {\n prop: {\n value: \"ownDataProperty\"\n }\n });\n\n return newObj.prop === \"ownDataProperty\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create))"
+ },
+ {
+ "id": "15.2.3.5-4-155",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-155.js",
+ "description": "Object.create - 'value' property of one property in 'Properties' is an inherited data property (8.10.5 step 5.a)",
+ "test": "assertTrue((function testcase() {\n\n var proto = {\n value: \"inheritedDataProperty\"\n };\n\n var ConstructFun = function () { };\n ConstructFun.prototype = proto;\n\n var descObj = new ConstructFun();\n\n var newObj = Object.create({}, {\n prop: descObj\n });\n\n return newObj.prop === \"inheritedDataProperty\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create))"
+ },
+ {
+ "id": "15.2.3.5-4-156",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-156.js",
+ "description": "Object.create - 'value' property of one property in 'Properties' is own data property that overrides an inherited data property (8.10.5 step 5.a)",
+ "test": "assertTrue((function testcase() {\n\n var proto = {\n value: \"inheritedDataProperty\"\n };\n\n var ConstructFun = function () { };\n ConstructFun.prototype = proto;\n\n var descObj = new ConstructFun();\n\n descObj.value = \"ownDataProperty\";\n\n var newObj = Object.create({}, {\n prop: descObj\n });\n\n return newObj.prop === \"ownDataProperty\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create))"
+ },
+ {
+ "id": "15.2.3.5-4-157",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-157.js",
+ "description": "Object.create - 'value' property of one property in 'Properties' is own data property that overrides an inherited accessor property (8.10.5 step 5.a)",
+ "test": "assertTrue((function testcase() {\n\n var proto = {};\n\n Object.defineProperty(proto, \"value\", {\n get: function () {\n return \"inheritedAccessorProperty\";\n }\n });\n\n var ConstructFun = function () { };\n ConstructFun.prototype = proto;\n\n var descObj = new ConstructFun();\n\n Object.defineProperty(descObj, \"value\", {\n get: function () {\n return \"ownDataProperty\";\n }\n });\n\n var newObj = Object.create({}, {\n prop: descObj\n });\n\n return newObj.prop === \"ownDataProperty\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.5-4-158",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-158.js",
+ "description": "Object.create - 'value' property of one property in 'Properties' is own accessor property (8.10.5 step 5.a)",
+ "test": "assertTrue((function testcase() {\n\n var descObj = {};\n\n Object.defineProperty(descObj, \"value\", {\n get: function () {\n return \"ownAccessorProperty\";\n }\n });\n\n var newObj = Object.create({}, {\n prop: descObj\n });\n\n return newObj.prop === \"ownAccessorProperty\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.5-4-159",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-159.js",
+ "description": "Object.create - 'value' property of one property in 'Properties' is an inherited accessor property (8.10.5 step 5.a)",
+ "test": "assertTrue((function testcase() {\n\n var proto = {};\n\n Object.defineProperty(proto, \"value\", {\n get: function () {\n return \"inheritedAccessorProperty\";\n }\n });\n\n var ConstructFun = function () { };\n ConstructFun.prototype = proto;\n\n var descObj = new ConstructFun();\n\n var newObj = Object.create({}, {\n prop: descObj\n });\n\n return newObj.prop === \"inheritedAccessorProperty\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.5-4-16",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-16.js",
+ "description": "Object.create - own enumerable data property in 'Properties' is defined in 'obj' (15.2.3.7 step 3)",
+ "test": "assertTrue((function testcase() {\n\n var newObj = Object.create({}, {\n prop: {} \n });\n return newObj.hasOwnProperty(\"prop\");\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create))"
+ },
+ {
+ "id": "15.2.3.5-4-160",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-160.js",
+ "description": "Object.create - 'value' property of one property in 'Properties' is own accessor property that overrides an inherited data property (8.10.5 step 5.a)",
+ "test": "assertTrue((function testcase() {\n\n var proto = {\n value: \"inheritedDataProperty\"\n };\n\n var ConstructFun = function () { };\n ConstructFun.prototype = proto;\n\n var descObj = new ConstructFun();\n\n Object.defineProperty(descObj, \"value\", {\n get: function () {\n return \"ownAccessorProperty\";\n }\n });\n\n var newObj = Object.create({}, {\n prop: descObj\n });\n\n return newObj.prop === \"ownAccessorProperty\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.5-4-161",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-161.js",
+ "description": "Object.create - 'value' property of one property in 'Properties' is own accessor property that overrides an inherited accessor property (8.10.5 step 5.a)",
+ "test": "assertTrue((function testcase() {\n\n var proto = {};\n\n Object.defineProperty(proto, \"value\", {\n get: function () {\n return \"inheritedAccessorProperty\";\n }\n });\n\n var ConstructFun = function () { };\n ConstructFun.prototype = proto;\n\n var descObj = new ConstructFun();\n\n Object.defineProperty(descObj, \"value\", {\n get: function () {\n return \"ownAccessorProperty\";\n }\n });\n\n var newObj = Object.create({}, {\n prop: descObj\n });\n\n return newObj.prop === \"ownAccessorProperty\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.5-4-162",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-162.js",
+ "description": "Object.create - 'value' property of one property in 'Properties' is own accessor property without a get function (8.10.5 step 5.a)",
+ "test": "assertTrue((function testcase() {\n\n var descObj = {};\n\n Object.defineProperty(descObj, \"value\", {\n set: function () { }\n });\n\n var newObj = Object.create({}, {\n prop: descObj\n });\n\n return newObj.hasOwnProperty(\"prop\") && typeof (newObj.prop) === \"undefined\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.5-4-163",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-163.js",
+ "description": "Object.create - 'value' property of one property in 'Properties' is own accessor property without a get function, which overrides an inherited accessor property (8.10.5 step 5.a)",
+ "test": "assertTrue((function testcase() {\n\n var proto = {};\n\n Object.defineProperty(proto, \"value\", {\n get: function () {\n return \"inheritedAccessorProperty\";\n }\n });\n\n var ConstructFun = function () { };\n ConstructFun.prototype = proto;\n\n var descObj = new ConstructFun();\n\n Object.defineProperty(descObj, \"value\", {\n set: function () { }\n });\n\n var newObj = Object.create({}, {\n prop: descObj\n });\n\n return newObj.hasOwnProperty(\"prop\") && typeof (newObj.prop) === \"undefined\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.5-4-164",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-164.js",
+ "description": "Object.create - 'value' property of one property in 'Properties' is an inherited accessor property without a get function (8.10.5 step 5.a)",
+ "test": "assertTrue((function testcase() {\n\n var proto = {};\n\n Object.defineProperty(proto, \"value\", {\n set: function () { }\n });\n\n var ConstructFun = function () { };\n ConstructFun.prototype = proto;\n\n var descObj = new ConstructFun();\n\n var newObj = Object.create({}, {\n prop: descObj\n });\n\n return newObj.hasOwnProperty(\"prop\") && typeof (newObj.prop) === \"undefined\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.5-4-165",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-165.js",
+ "description": "Object.create - one property in 'Properties' is a Function object which implements its own [[Get]] method to access the 'value' property (8.10.5 step 5.a)",
+ "test": "assertTrue((function testcase() {\n\n var Func = function (a, b) {\n return a + b;\n };\n\n var fun = new Func();\n fun.value = \"FunValue\";\n\n var newObj = Object.create({}, {\n prop: fun\n });\n return newObj.prop === \"FunValue\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create))"
+ },
+ {
+ "id": "15.2.3.5-4-166",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-166.js",
+ "description": "Object.create - one property in 'Properties' is an Array object that uses Object's [[Get]] method to access the 'value' property (8.10.5 step 5.a)",
+ "test": "assertTrue((function testcase() {\n\n var arr = [1, 2, 3];\n\n arr.value = \"ArrValue\";\n\n var newObj = Object.create({}, {\n prop: arr\n });\n\n return newObj.prop === \"ArrValue\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create))"
+ },
+ {
+ "id": "15.2.3.5-4-167",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-167.js",
+ "description": "Object.create - one property in 'Properties' is a String object that uses Object's [[Get]] method to access the 'value' property (8.10.5 step 5.a)",
+ "test": "assertTrue((function testcase() {\n\n var str = new String(\"abc\");\n\n str.value = \"StrValue\";\n\n var newObj = Object.create({}, {\n prop: str\n });\n\n return newObj.prop === \"StrValue\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create))"
+ },
+ {
+ "id": "15.2.3.5-4-168",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-168.js",
+ "description": "Object.create - one property in 'Properties' is a Boolean object that uses Object's [[Get]] method to access the 'value' property (8.10.5 step 5.a)",
+ "test": "assertTrue((function testcase() {\n\n var booleanObj = new Boolean(false);\n\n booleanObj.value = \"BooleanValue\";\n\n var newObj = Object.create({}, {\n prop: booleanObj\n });\n\n return newObj.prop === \"BooleanValue\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create))"
+ },
+ {
+ "id": "15.2.3.5-4-169",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-169.js",
+ "description": "Object.create - one property in 'Properties' is a Number object that uses Object's [[Get]] method to access the 'value' property (8.10.5 step 5.a)",
+ "test": "assertTrue((function testcase() {\n\n var numObj = new Number(123);\n\n numObj.value = \"NumValue\";\n\n var newObj = Object.create({}, {\n prop: numObj\n });\n\n return newObj.prop === \"NumValue\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create))"
+ },
+ {
+ "id": "15.2.3.5-4-17",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-17.js",
+ "description": "Object.create - own data property in 'Properties' which is not enumerable is not defined in 'obj' (15.2.3.7 step 3)",
+ "test": "assertTrue((function testcase() {\n\n var props = {};\n Object.defineProperty(props, \"prop\", {\n value: {},\n enumerable: false\n });\n var newObj = Object.create({}, props);\n\n return !newObj.hasOwnProperty(\"prop\");\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.5-4-170",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-170.js",
+ "description": "Object.create - one property in 'Properties' is the Math object that uses Object's [[Get]] method to access the 'value' property (8.10.5 step 5.a)",
+ "test": "assertTrue((function testcase() {\n\n try {\n Math.value = \"MathValue\";\n\n var newObj = Object.create({}, {\n prop: Math\n });\n\n return newObj.prop === \"MathValue\";\n } finally {\n delete Math.value;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create))"
+ },
+ {
+ "id": "15.2.3.5-4-171",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-171.js",
+ "description": "Object.create - one property in 'Properties' is a Date object that uses Object's [[Get]] method to access the 'value' property (8.10.5 step 5.a)",
+ "test": "assertTrue((function testcase() {\n\n var dateObj = new Date();\n\n dateObj.value = \"DateValue\";\n\n var newObj = Object.create({}, {\n prop: dateObj\n });\n\n return newObj.prop === \"DateValue\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create))"
+ },
+ {
+ "id": "15.2.3.5-4-172",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-172.js",
+ "description": "Object.create - one property in 'Properties' is a RegExp object that uses Object's [[Get]] method to access the 'value' property (8.10.5 step 5.a)",
+ "test": "assertTrue((function testcase() {\n\n var regObj = new RegExp();\n\n regObj.value = \"RegExpValue\";\n\n var newObj = Object.create({}, {\n prop: regObj\n });\n\n return newObj.prop === \"RegExpValue\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create))"
+ },
+ {
+ "id": "15.2.3.5-4-173",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-173.js",
+ "description": "Object.create - one property in 'Properties' is the JSON object that uses Object's [[Get]] method to access the 'value' property (8.10.5 step 5.a)",
+ "test": "assertTrue((function testcase() {\n\n try {\n JSON.value = \"JSONValue\";\n\n var newObj = Object.create({}, {\n prop: JSON\n });\n\n return newObj.prop === \"JSONValue\";\n } finally {\n delete JSON.value;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create))"
+ },
+ {
+ "id": "15.2.3.5-4-174",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-174.js",
+ "description": "Object.create - one property in 'Properties' is an Error object that uses Object's [[Get]] method to access the 'value' property (8.10.5 step 5.a)",
+ "test": "assertTrue((function testcase() {\n\n var errorObj = new Error();\n\n errorObj.value = \"ErrorValue\";\n\n var newObj = Object.create({}, {\n prop: errorObj\n });\n\n return newObj.prop === \"ErrorValue\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create))"
+ },
+ {
+ "id": "15.2.3.5-4-175",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-175.js",
+ "description": "Object.create - one property in 'Properties' is an Arguments object which implements its own [[Get]] method to access the 'value' property (8.10.5 step 5.a)",
+ "test": "assertTrue((function testcase() {\n\n var argObj = (function () { return arguments; })();\n\n argObj.value = \"ArgValue\";\n\n var newObj = Object.create({}, {\n prop: argObj\n });\n\n return newObj.prop === \"ArgValue\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create))"
+ },
+ {
+ "id": "15.2.3.5-4-177",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-177.js",
+ "description": "Object.create - one property in 'Properties' is the global object that uses Object's [[Get]] method to access the 'value' property (8.10.5 step 5.a)",
+ "test": "assertTrue((function testcase() {\n\n try {\n fnGlobalObject().value = \"GlobalValue\";\n\n var newObj = Object.create({}, {\n prop: fnGlobalObject()\n });\n\n return newObj.prop === \"GlobalValue\";\n } finally {\n delete fnGlobalObject().value;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create))"
+ },
+ {
+ "id": "15.2.3.5-4-178",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-178.js",
+ "description": "Object.create - 'writable' property of one property in 'Properties' is true (8.10.5 step 6)",
+ "test": "assertTrue((function testcase() {\n\n var newObj = Object.create({}, {\n prop: {\n writable: true\n }\n });\n\n var beforeWrite = ((newObj.hasOwnProperty(\"prop\") && typeof (newObj.prop) === \"undefined\"));\n\n newObj.prop = \"isWritable\";\n\n var afterWrite = (newObj.prop === \"isWritable\");\n\n return beforeWrite === true && afterWrite === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create))"
+ },
+ {
+ "id": "15.2.3.5-4-179",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-179.js",
+ "description": "Object.create - 'writable' property of one property in 'Properties' is not present (8.10.5 step 6)",
+ "test": "assertTrue((function testcase() {\n\n var newObj = Object.create({}, {\n prop: {\n value: 100\n }\n });\n\n var beforeWrite = (newObj.prop === 100);\n\n newObj.prop = \"isWritable\";\n\n var afterWrite = (newObj.prop === 100);\n\n return beforeWrite === true && afterWrite === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create))"
+ },
+ {
+ "id": "15.2.3.5-4-18",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-18.js",
+ "description": "Object.create - an enumerable inherited data property in 'Properties' is not defined in 'obj' (15.2.3.7 step 3)",
+ "test": "assertTrue((function testcase() {\n\n var proto = {};\n\n proto.prop = {};\n\n var ConstructFun = function () { };\n ConstructFun.prototype = proto;\n var child = new ConstructFun();\n\n var newObj = Object.create({}, child);\n\n return !newObj.hasOwnProperty(\"prop\");\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create))"
+ },
+ {
+ "id": "15.2.3.5-4-180",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-180.js",
+ "description": "Object.create - 'writable' property of one property in 'Properties' is own data property (8.10.5 step 6.a)",
+ "test": "assertTrue((function testcase() {\n\n var newObj = Object.create({}, {\n prop: {\n writable: true\n }\n });\n\n var beforeWrite = (newObj.hasOwnProperty(\"prop\") && typeof (newObj.prop) === \"undefined\");\n\n newObj.prop = \"isWritable\";\n\n var afterWrite = (newObj.prop === \"isWritable\");\n\n return beforeWrite === true && afterWrite === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create))"
+ },
+ {
+ "id": "15.2.3.5-4-181",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-181.js",
+ "description": "Object.create - 'writable' property of one property in 'Properties' is an inherited data property (8.10.5 step 6.a)",
+ "test": "assertTrue((function testcase() {\n\n var proto = {\n writable: true\n };\n\n var ConstructFun = function () { };\n ConstructFun.prototype = proto;\n\n var descObj = new ConstructFun();\n\n var newObj = Object.create({}, {\n prop: descObj\n });\n\n var beforeWrite = (newObj.hasOwnProperty(\"prop\") && typeof (newObj.prop) === \"undefined\");\n\n newObj.prop = \"isWritable\";\n\n var afterWrite = (newObj.prop === \"isWritable\");\n\n return beforeWrite === true && afterWrite === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create))"
+ },
+ {
+ "id": "15.2.3.5-4-182",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-182.js",
+ "description": "Object.create - 'writable' property of one property in 'Properties' is own data property that overrides an inherited data property (8.10.5 step 6.a)",
+ "test": "assertTrue((function testcase() {\n\n var proto = {\n writable: false\n };\n\n var ConstructFun = function () { };\n ConstructFun.prototype = proto;\n\n var descObj = new ConstructFun();\n\n descObj.writable = true;\n\n var newObj = Object.create({}, {\n prop: descObj\n });\n\n var beforeWrite = (newObj.hasOwnProperty(\"prop\") && typeof (newObj.prop) === \"undefined\");\n\n newObj.prop = \"isWritable\";\n\n var afterWrite = (newObj.prop === \"isWritable\");\n\n return beforeWrite === true && afterWrite === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create))"
+ },
+ {
+ "id": "15.2.3.5-4-183",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-183.js",
+ "description": "Object.create - 'writable' property of one property in 'Properties' is own data property that overrides an inherited accessor property (8.10.5 step 6.a)",
+ "test": "assertTrue((function testcase() {\n\n var proto = {};\n\n Object.defineProperty(proto, \"writable\", {\n get: function () {\n return false;\n }\n });\n\n var ConstructFun = function () { };\n ConstructFun.prototype = proto;\n\n var descObj = new ConstructFun();\n\n Object.defineProperty(descObj, \"writable\", {\n value: true\n });\n\n var newObj = Object.create({}, {\n prop: descObj\n });\n\n var beforeWrite = (newObj.hasOwnProperty(\"prop\") && typeof (newObj.prop) === \"undefined\");\n\n newObj.prop = \"isWritable\";\n\n var afterWrite = (newObj.prop === \"isWritable\");\n\n return beforeWrite === true && afterWrite === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.5-4-184",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-184.js",
+ "description": "Object.create - 'writable' property of one property in 'Properties' is own accessor property (8.10.5 step 6.a)",
+ "test": "assertTrue((function testcase() {\n\n var descObj = {};\n\n Object.defineProperty(descObj, \"writable\", {\n get: function () {\n return true;\n }\n });\n\n var newObj = Object.create({}, {\n prop: descObj\n });\n\n var beforeWrite = (newObj.hasOwnProperty(\"prop\") && typeof (newObj.prop) === \"undefined\");\n\n newObj.prop = \"isWritable\";\n\n var afterWrite = (newObj.prop === \"isWritable\");\n\n return beforeWrite === true && afterWrite === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.5-4-185",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-185.js",
+ "description": "Object.create - 'writable' property of one property in 'Properties' is an inherited accessor property (8.10.5 step 6.a)",
+ "test": "assertTrue((function testcase() {\n\n var proto = {};\n\n Object.defineProperty(proto, \"writable\", {\n get: function () {\n return true;\n }\n });\n\n var ConstructFun = function () { };\n ConstructFun.prototype = proto;\n\n var descObj = new ConstructFun();\n\n var newObj = Object.create({}, {\n prop: descObj\n });\n\n var beforeWrite = (newObj.hasOwnProperty(\"prop\") && typeof (newObj.prop) === \"undefined\");\n\n newObj.prop = \"isWritable\";\n\n var afterWrite = (newObj.prop === \"isWritable\");\n\n return beforeWrite === true && afterWrite === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.5-4-186",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-186.js",
+ "description": "Object.create - 'writable' property of one property in 'Properties' is own accessor property that overrides an inherited data property (8.10.5 step 6.a)",
+ "test": "assertTrue((function testcase() {\n\n var proto = {\n writable: false\n };\n\n var ConstructFun = function () { };\n ConstructFun.prototype = proto;\n\n var descObj = new ConstructFun();\n\n Object.defineProperty(descObj, \"writable\", {\n get: function () {\n return true;\n }\n });\n\n var newObj = Object.create({}, {\n prop: descObj\n });\n\n var beforeWrite = (newObj.hasOwnProperty(\"prop\") && typeof (newObj.prop) === \"undefined\");\n\n newObj.prop = \"isWritable\";\n\n var afterWrite = (newObj.prop === \"isWritable\");\n\n return beforeWrite === true && afterWrite === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.5-4-187",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-187.js",
+ "description": "Object.create - 'writable' property of one property in 'Properties' is own accessor property that overrides an inherited accessor property (8.10.5 step 6.a)",
+ "test": "assertTrue((function testcase() {\n\n var proto = {};\n\n Object.defineProperty(proto, \"writable\", {\n get: function () {\n return false;\n }\n });\n\n var ConstructFun = function () { };\n ConstructFun.prototype = proto;\n\n var descObj = new ConstructFun();\n\n Object.defineProperty(descObj, \"writable\", {\n get: function () {\n return true;\n }\n });\n\n var newObj = Object.create({}, {\n prop: descObj\n });\n\n var beforeWrite = (newObj.hasOwnProperty(\"prop\") && typeof (newObj.prop) === \"undefined\");\n\n newObj.prop = \"isWritable\";\n\n var afterWrite = (newObj.prop === \"isWritable\");\n\n return beforeWrite === true && afterWrite === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.5-4-188",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-188.js",
+ "description": "Object.create - 'writable' property of one property in 'Properties' is own accessor property without a get function (8.10.5 step 6.a)",
+ "test": "assertTrue((function testcase() {\n\n var descObj = { value: 100 };\n\n Object.defineProperty(descObj, \"writable\", {\n set: function () { }\n });\n\n var newObj = Object.create({}, {\n prop: descObj\n });\n\n var beforeWrite = (newObj.prop === 100);\n\n newObj.prop = \"isWritable\";\n\n var afterWrite = (newObj.prop === 100);\n\n return beforeWrite === true && afterWrite === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.5-4-189",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-189.js",
+ "description": "Object.create - 'writable' property of one property in 'Properties' is own accessor property without a get function, which overrides an inherited accessor property (8.10.5 step 6.a)",
+ "test": "assertTrue((function testcase() {\n\n var proto = {};\n\n Object.defineProperty(proto, \"writable\", {\n get: function () {\n return true;\n }\n });\n\n var ConstructFun = function () { };\n ConstructFun.prototype = proto;\n\n var descObj = new ConstructFun();\n\n Object.defineProperty(descObj, \"writable\", {\n set: function () { }\n });\n\n var newObj = Object.create({}, {\n prop: descObj\n });\n\n var beforeWrite = (newObj.hasOwnProperty(\"prop\") && typeof (newObj.prop) === \"undefined\");\n\n newObj.prop = \"isWritable\";\n\n var afterWrite = (newObj.prop === \"isWritable\");\n\n return beforeWrite === true && afterWrite === false;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.5-4-19",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-19.js",
+ "description": "Object.create - own enumerable accessor property in 'Properties' is defined in 'obj' (15.2.3.7 step 3)",
+ "test": "assertTrue((function testcase() {\n\n var props = {};\n\n Object.defineProperty(props, \"prop\", {\n get: function () {\n return {};\n },\n enumerable: true\n });\n\n var newObj = Object.create({}, props);\n\n return newObj.hasOwnProperty(\"prop\");\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.5-4-190",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-190.js",
+ "description": "Object.create - 'writable' property of one property in 'Properties' is an inherited accessor property without a get function (8.10.5 step 6.a)",
+ "test": "assertTrue((function testcase() {\n\n var proto = { value: 100 };\n\n Object.defineProperty(proto, \"writable\", {\n set: function () { }\n });\n\n var ConstructFun = function () { };\n ConstructFun.prototype = proto;\n\n var descObj = new ConstructFun();\n\n var newObj = Object.create({}, {\n prop: descObj\n });\n\n var beforeWrite = (newObj.prop === 100);\n\n newObj.prop = \"isWritable\";\n\n var afterWrite = (newObj.prop === 100);\n\n return beforeWrite === true && afterWrite === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.5-4-191",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-191.js",
+ "description": "Object.create - one property in 'Properties' is a Function object which implements its own [[Get]] method to access the 'writable' property (8.10.5 step 6.a)",
+ "test": "assertTrue((function testcase() {\n\n var Func = function (a, b) {\n return a + b;\n };\n\n var fun = new Func();\n fun.writable = true;\n\n var newObj = Object.create({}, {\n prop: fun\n });\n\n var beforeWrite = (newObj.hasOwnProperty(\"prop\") && typeof (newObj.prop) === \"undefined\");\n\n newObj.prop = \"isWritable\";\n\n var afterWrite = (newObj.prop === \"isWritable\");\n\n return beforeWrite === true && afterWrite === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create))"
+ },
+ {
+ "id": "15.2.3.5-4-192",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-192.js",
+ "description": "Object.create - one property in 'Properties' is an Array object that uses Object's [[Get]] method to access the 'writable' property (8.10.5 step 6.a)",
+ "test": "assertTrue((function testcase() {\n\n var array = [1, 2, 3];\n\n array.writable = true;\n\n var newObj = Object.create({}, {\n prop: array\n });\n\n var beforeWrite = (newObj.hasOwnProperty(\"prop\") && typeof (newObj.prop) === \"undefined\");\n\n newObj.prop = \"isWritable\";\n\n var afterWrite = (newObj.prop === \"isWritable\");\n\n return beforeWrite === true && afterWrite === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create))"
+ },
+ {
+ "id": "15.2.3.5-4-193",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-193.js",
+ "description": "Object.create - one property in 'Properties' is a String object that uses Object's [[Get]] method to access the 'writable' property (8.10.5 step 6.a)",
+ "test": "assertTrue((function testcase() {\n\n var str = new String(\"abc\");\n\n str.writable = true;\n\n var newObj = Object.create({}, {\n prop: str\n });\n\n var beforeWrite = (newObj.hasOwnProperty(\"prop\") && typeof (newObj.prop) === \"undefined\");\n\n newObj.prop = \"isWritable\";\n\n var afterWrite = (newObj.prop === \"isWritable\");\n\n return beforeWrite === true && afterWrite === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create))"
+ },
+ {
+ "id": "15.2.3.5-4-194",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-194.js",
+ "description": "Object.create - one property in 'Properties' is a Boolean object that uses Object's [[Get]] method to access the 'writable' property (8.10.5 step 6.a)",
+ "test": "assertTrue((function testcase() {\n\n var booleanObj = new Boolean(false);\n\n booleanObj.writable = true;\n\n var newObj = Object.create({}, {\n prop: booleanObj\n });\n\n var beforeWrite = (newObj.hasOwnProperty(\"prop\") && typeof (newObj.prop) === \"undefined\");\n\n newObj.prop = \"isWritable\";\n\n var afterWrite = (newObj.prop === \"isWritable\");\n\n return beforeWrite === true && afterWrite === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create))"
+ },
+ {
+ "id": "15.2.3.5-4-195",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-195.js",
+ "description": "Object.create - one property in 'Properties' is a Number object that uses Object's [[Get]] method to access the 'writable' property (8.10.5 step 6.a)",
+ "test": "assertTrue((function testcase() {\n\n var numObj = new Number(123);\n\n numObj.writable = true;\n\n var newObj = Object.create({}, {\n prop: numObj\n });\n\n var beforeWrite = (newObj.hasOwnProperty(\"prop\") && typeof (newObj.prop) === \"undefined\");\n\n newObj.prop = \"isWritable\";\n\n var afterWrite = (newObj.prop === \"isWritable\");\n\n return beforeWrite === true && afterWrite === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create))"
+ },
+ {
+ "id": "15.2.3.5-4-196",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-196.js",
+ "description": "Object.create - one property in 'Properties' is the Math object that uses Object's [[Get]] method to access the 'writable' property (8.10.5 step 6.a)",
+ "test": "assertTrue((function testcase() {\n\n try {\n Math.writable = true;\n\n var newObj = Object.create({}, {\n prop: Math\n });\n\n var beforeWrite = (newObj.hasOwnProperty(\"prop\") && typeof (newObj.prop) === \"undefined\");\n\n newObj.prop = \"isWritable\";\n\n var afterWrite = (newObj.prop === \"isWritable\");\n\n return beforeWrite === true && afterWrite === true;\n } finally {\n delete Math.writable;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create))"
+ },
+ {
+ "id": "15.2.3.5-4-197",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-197.js",
+ "description": "Object.create - one property in 'Properties' is a Date object that uses Object's [[Get]] method to access the 'writable' property (8.10.5 step 6.a)",
+ "test": "assertTrue((function testcase() {\n\n var dateObj = new Date();\n\n dateObj.writable = true;\n\n var newObj = Object.create({}, {\n prop: dateObj\n });\n\n var beforeWrite = (newObj.hasOwnProperty(\"prop\") && typeof (newObj.prop) === \"undefined\");\n\n newObj.prop = \"isWritable\";\n\n var afterWrite = (newObj.prop === \"isWritable\");\n\n return beforeWrite === true && afterWrite === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create))"
+ },
+ {
+ "id": "15.2.3.5-4-198",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-198.js",
+ "description": "Object.create - one property in 'Properties' is a RegExp object that uses Object's [[Get]] method to access the 'writable' property (8.10.5 step 6.a)",
+ "test": "assertTrue((function testcase() {\n\n var regObj = new RegExp();\n\n regObj.writable = true;\n\n var newObj = Object.create({}, {\n prop: regObj\n });\n\n var beforeWrite = (newObj.hasOwnProperty(\"prop\") && typeof (newObj.prop) === \"undefined\");\n\n newObj.prop = \"isWritable\";\n\n var afterWrite = (newObj.prop === \"isWritable\");\n\n return beforeWrite === true && afterWrite === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create))"
+ },
+ {
+ "id": "15.2.3.5-4-199",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-199.js",
+ "description": "Object.create - one property in 'Properties' is the JSON object that uses Object's [[Get]] method to access the 'writable' property (8.10.5 step 6.a)",
+ "test": "assertTrue((function testcase() {\n\n try {\n JSON.writable = true;\n\n var newObj = Object.create({}, {\n prop: JSON \n });\n\n var beforeWrite = (newObj.hasOwnProperty(\"prop\") && typeof (newObj.prop) === \"undefined\");\n\n newObj.prop = \"isWritable\";\n\n var afterWrite = (newObj.prop === \"isWritable\");\n\n return beforeWrite === true && afterWrite === true;\n } finally {\n delete JSON.writable;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create))"
+ },
+ {
+ "id": "15.2.3.5-4-2",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-2.js",
+ "description": "Object.create - 'Properties' is undefined",
+ "test": "assertTrue((function testcase() {\n\n var newObj = Object.create({}, undefined);\n return (newObj instanceof Object);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create))"
+ },
+ {
+ "id": "15.2.3.5-4-20",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-20.js",
+ "description": "Object.create - own accessor property in 'Properties' which is not enumerable is not defined in 'obj' (15.2.3.7 step 3)",
+ "test": "assertTrue((function testcase() {\n\n var props = {};\n\n Object.defineProperty(props, \"prop\", {\n get: function () {\n return {};\n },\n enumerable: false\n });\n\n var newObj = Object.create({}, props);\n\n return !newObj.hasOwnProperty(\"prop\");\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.5-4-200",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-200.js",
+ "description": "Object.create - one property in 'Properties' is an Error object that uses Object's [[Get]] method to access the 'writable' property (8.10.5 step 6.a)",
+ "test": "assertTrue((function testcase() {\n\n var errorObj = new Error();\n\n errorObj.writable = true;\n\n var newObj = Object.create({}, {\n prop: errorObj\n });\n\n var beforeWrite = (newObj.hasOwnProperty(\"prop\") && typeof (newObj.prop) === \"undefined\");\n\n newObj.prop = \"isWritable\";\n\n var afterWrite = (newObj.prop === \"isWritable\");\n\n return beforeWrite === true && afterWrite === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create))"
+ },
+ {
+ "id": "15.2.3.5-4-201",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-201.js",
+ "description": "Object.create - one property in 'Properties' is an Arguments object which implements its own [[Get]] method to access the 'writable' property (8.10.5 step 6.a)",
+ "test": "assertTrue((function testcase() {\n\n var argObj = (function () { return arguments; })();\n\n argObj.writable = true;\n\n var newObj = Object.create({}, {\n prop: argObj\n });\n\n var beforeWrite = (newObj.hasOwnProperty(\"prop\") && typeof (newObj.prop) === \"undefined\");\n\n newObj.prop = \"isWritable\";\n\n var afterWrite = (newObj.prop === \"isWritable\");\n\n return beforeWrite === true && afterWrite === true;\n\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create))"
+ },
+ {
+ "id": "15.2.3.5-4-203",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-203.js",
+ "description": "Object.create - one property in 'Properties' is the global object that uses Object's [[Get]] method to access the 'writable' property (8.10.5 step 6.a)",
+ "test": "assertTrue((function testcase() {\n\n try {\n fnGlobalObject().writable = true;\n\n var newObj = Object.create({}, {\n prop: fnGlobalObject() \n });\n\n var beforeWrite = (newObj.hasOwnProperty(\"prop\") && typeof (newObj.prop) === \"undefined\");\n\n newObj.prop = \"isWritable\";\n\n var afterWrite = (newObj.prop === \"isWritable\");\n\n return beforeWrite === true && afterWrite === true;\n } finally {\n delete fnGlobalObject().writable;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create))"
+ },
+ {
+ "id": "15.2.3.5-4-204",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-204.js",
+ "description": "Object.create - 'writable' property of one property in 'Properties' is undefined (8.10.5 step 6.b)",
+ "test": "assertTrue((function testcase() {\n var newObj = Object.create({}, {\n prop: {\n writable: undefined\n }\n });\n\n var hasProperty = newObj.hasOwnProperty(\"prop\") && typeof newObj.prop === \"undefined\";\n\n newObj.prop = 121;\n\n return hasProperty && typeof newObj.prop === \"undefined\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create))"
+ },
+ {
+ "id": "15.2.3.5-4-205",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-205.js",
+ "description": "Object.create - 'writable' property of one property in 'Properties' is null (8.10.5 step 6.b)",
+ "test": "assertTrue((function testcase() {\n\n var newObj = Object.create({}, {\n prop: {\n writable: null\n }\n });\n var hasProperty = newObj.hasOwnProperty(\"prop\") && typeof newObj.prop === \"undefined\";\n\n newObj.prop = 121;\n\n return hasProperty && typeof newObj.prop === \"undefined\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create))"
+ },
+ {
+ "id": "15.2.3.5-4-206",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-206.js",
+ "description": "Object.create - 'writable' property of one property in 'Properties' is true (8.10.5 step 6.b)",
+ "test": "assertTrue((function testcase() {\n\n var newObj = Object.create({}, {\n prop: {\n writable: true\n }\n });\n var hasProperty = newObj.hasOwnProperty(\"prop\");\n\n newObj.prop = 121;\n\n return hasProperty && newObj.prop === 121;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create))"
+ },
+ {
+ "id": "15.2.3.5-4-207",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-207.js",
+ "description": "Object.create - 'writable' property of one property in 'Properties' is false (8.10.5 step 6.b)",
+ "test": "assertTrue((function testcase() {\n\n var newObj = Object.create({}, {\n prop: {\n writable: false\n }\n });\n var hasProperty = newObj.hasOwnProperty(\"prop\") && typeof newObj.prop === \"undefined\";\n\n newObj.prop = 121;\n\n return hasProperty && typeof newObj.prop === \"undefined\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create))"
+ },
+ {
+ "id": "15.2.3.5-4-208",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-208.js",
+ "description": "Object.create - 'writable' property of one property in 'Properties' is 0 (8.10.5 step 6.b)",
+ "test": "assertTrue((function testcase() {\n\n var newObj = Object.create({}, {\n prop: {\n writable: 0\n }\n });\n var hasProperty = newObj.hasOwnProperty(\"prop\") && typeof newObj.prop === \"undefined\";\n\n newObj.prop = 121;\n\n return hasProperty && typeof newObj.prop === \"undefined\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create))"
+ },
+ {
+ "id": "15.2.3.5-4-209",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-209.js",
+ "description": "Object.create - 'writable' property of one property in 'Properties' is +0 (8.10.5 step 6.b)",
+ "test": "assertTrue((function testcase() {\n\n var newObj = Object.create({}, {\n prop: {\n writable: +0\n }\n });\n var hasProperty = newObj.hasOwnProperty(\"prop\") && typeof newObj.prop === \"undefined\";\n\n newObj.prop = 121;\n\n return hasProperty && typeof newObj.prop === \"undefined\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create))"
+ },
+ {
+ "id": "15.2.3.5-4-21",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-21.js",
+ "description": "Object.create - an enumerable inherited accessor property in 'Properties' is not defined in 'obj' (15.2.3.7 step 3)",
+ "test": "assertTrue((function testcase() {\n\n var proto = {};\n\n Object.defineProperty(proto, \"prop\", {\n get: function () {\n return {};\n },\n enumerable: true\n });\n\n var ConstructFun = function () { };\n ConstructFun.prototype = proto;\n var child = new ConstructFun();\n\n var newObj = Object.create({}, child);\n\n return !newObj.hasOwnProperty(\"prop\");\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.5-4-210",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-210.js",
+ "description": "Object.create - 'writable' property of one property in 'Properties' is -0 (8.10.5 step 6.b)",
+ "test": "assertTrue((function testcase() {\n\n var newObj = Object.create({}, {\n prop: {\n writable: -0\n }\n });\n var hasProperty = newObj.hasOwnProperty(\"prop\") && typeof newObj.prop === \"undefined\";\n\n newObj.prop = 121;\n\n return hasProperty && typeof newObj.prop === \"undefined\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create))"
+ },
+ {
+ "id": "15.2.3.5-4-211",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-211.js",
+ "description": "Object.create - 'writable' property of one property in 'Properties' is NaN (8.10.5 step 6.b)",
+ "test": "assertTrue((function testcase() {\n\n var newObj = Object.create({}, {\n prop: {\n writable: NaN\n }\n });\n var hasProperty = newObj.hasOwnProperty(\"prop\") && typeof newObj.prop === \"undefined\";\n\n newObj.prop = 121;\n\n return hasProperty && typeof newObj.prop === \"undefined\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create))"
+ },
+ {
+ "id": "15.2.3.5-4-212",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-212.js",
+ "description": "Object.create - 'writable' property of one property in 'Properties' is a positive number primitive (8.10.5 step 6.b)",
+ "test": "assertTrue((function testcase() {\n\n var newObj = Object.create({}, {\n prop: {\n writable: 12\n }\n });\n var hasProperty = newObj.hasOwnProperty(\"prop\");\n\n newObj.prop = 121;\n\n return hasProperty && newObj.prop === 121;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create))"
+ },
+ {
+ "id": "15.2.3.5-4-213",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-213.js",
+ "description": "Object.create - 'writable' property of one property in 'Properties' is a negative number primitive (8.10.5 step 6.b)",
+ "test": "assertTrue((function testcase() {\n\n var newObj = Object.create({}, {\n prop: {\n writable: -9\n }\n });\n var hasProperty = newObj.hasOwnProperty(\"prop\");\n\n newObj.prop = 121;\n\n return hasProperty && newObj.prop === 121;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create))"
+ },
+ {
+ "id": "15.2.3.5-4-214",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-214.js",
+ "description": "Object.create - 'writable' property of one property in 'Properties' is an empty string (8.10.5 step 6.b)",
+ "test": "assertTrue((function testcase() {\n var descObj = {\n writable: \"\"\n };\n\n var newObj = Object.create({}, {\n prop: descObj\n });\n var hasProperty = newObj.hasOwnProperty(\"prop\") && typeof newObj.prop === \"undefined\";\n\n newObj.prop = 121;\n\n return hasProperty && typeof newObj.prop === \"undefined\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create))"
+ },
+ {
+ "id": "15.2.3.5-4-215",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-215.js",
+ "description": "Object.create - 'writable' property of one property in 'Properties' is a non-empty string (8.10.5 step 6.b)",
+ "test": "assertTrue((function testcase() {\n\n var newObj = Object.create({}, {\n prop: {\n writable: \"abc\"\n }\n });\n var hasProperty = newObj.hasOwnProperty(\"prop\");\n\n newObj.prop = 121;\n\n return hasProperty && newObj.prop === 121;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create))"
+ },
+ {
+ "id": "15.2.3.5-4-216",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-216.js",
+ "description": "Object.create - 'writable' property of one property in 'Properties' is a Function object (8.10.5 step 6.b)",
+ "test": "assertTrue((function testcase() {\n\n var newObj = Object.create({}, {\n prop: {\n writable: function () { }\n }\n });\n var hasProperty = newObj.hasOwnProperty(\"prop\");\n\n newObj.prop = 121;\n\n return hasProperty && newObj.prop === 121;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create))"
+ },
+ {
+ "id": "15.2.3.5-4-217",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-217.js",
+ "description": "Object.create - 'writable' property of one property in 'Properties' is an Array object (8.10.5 step 6.b)",
+ "test": "assertTrue((function testcase() {\n\n var newObj = Object.create({}, {\n prop: {\n writable: []\n }\n });\n var hasProperty = newObj.hasOwnProperty(\"prop\");\n\n newObj.prop = 121;\n\n return hasProperty && newObj.prop === 121;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create))"
+ },
+ {
+ "id": "15.2.3.5-4-218",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-218.js",
+ "description": "Object.create - 'writable' property of one property in 'Properties' is a String object (8.10.5 step 6.b)",
+ "test": "assertTrue((function testcase() {\n\n var newObj = Object.create({}, {\n prop: {\n writable: new String()\n }\n });\n var hasProperty = newObj.hasOwnProperty(\"prop\");\n\n newObj.prop = 121;\n\n return hasProperty && newObj.prop === 121;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create))"
+ },
+ {
+ "id": "15.2.3.5-4-219",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-219.js",
+ "description": "Object.create - 'writable' property of one property in 'Properties' is a Boolean object (8.10.5 step 6.b)",
+ "test": "assertTrue((function testcase() {\n\n var newObj = Object.create({}, {\n prop: {\n writable: new Boolean()\n }\n });\n var hasProperty = newObj.hasOwnProperty(\"prop\");\n\n newObj.prop = 121;\n\n return hasProperty && newObj.prop === 121;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create))"
+ },
+ {
+ "id": "15.2.3.5-4-22",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-22.js",
+ "description": "Object.create - own enumerable data property that overrides an enumerable inherited data property in 'Properties' is defined in 'obj' (15.2.3.7 step 5.a)",
+ "test": "assertTrue((function testcase() {\n\n var proto = {};\n proto.prop = {\n value: \"abc\"\n };\n\n var ConstructFun = function () { };\n ConstructFun.prototype = proto;\n\n var child = new ConstructFun();\n child.prop = {\n value: \"bbq\"\n };\n var newObj = Object.create({}, child);\n\n return newObj.hasOwnProperty(\"prop\") && newObj.prop === \"bbq\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create))"
+ },
+ {
+ "id": "15.2.3.5-4-220",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-220.js",
+ "description": "Object.create - 'writable' property of one property in 'Properties' is a Number object (8.10.5 step 6.b)",
+ "test": "assertTrue((function testcase() {\n\n var newObj = Object.create({}, {\n prop: {\n writable: new Number()\n }\n });\n var hasProperty = newObj.hasOwnProperty(\"prop\");\n\n newObj.prop = 121;\n\n return hasProperty && newObj.prop === 121;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create))"
+ },
+ {
+ "id": "15.2.3.5-4-221",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-221.js",
+ "description": "Object.create - 'writable' property of one property in 'Properties' is the Math object (8.10.5 step 6.b)",
+ "test": "assertTrue((function testcase() {\n\n var newObj = Object.create({}, {\n prop: {\n writable: Math\n }\n });\n var hasProperty = newObj.hasOwnProperty(\"prop\");\n\n newObj.prop = 121;\n\n return hasProperty && newObj.prop === 121;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create))"
+ },
+ {
+ "id": "15.2.3.5-4-222",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-222.js",
+ "description": "Object.create - 'writable' property of one property in 'Properties' is a Date object (8.10.5 step 6.b)",
+ "test": "assertTrue((function testcase() {\n\n var newObj = Object.create({}, {\n prop: {\n writable: new Date()\n }\n });\n var hasProperty = newObj.hasOwnProperty(\"prop\");\n\n newObj.prop = 121;\n\n return hasProperty && newObj.prop === 121;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create))"
+ },
+ {
+ "id": "15.2.3.5-4-223",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-223.js",
+ "description": "Object.create - 'writable' property of one property in 'Properties' is a RegExp object (8.10.5 step 6.b)",
+ "test": "assertTrue((function testcase() {\n\n var newObj = Object.create({}, {\n prop: {\n writable: new RegExp()\n }\n });\n var hasProperty = newObj.hasOwnProperty(\"prop\");\n\n newObj.prop = 121;\n\n return hasProperty && newObj.prop === 121;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create))"
+ },
+ {
+ "id": "15.2.3.5-4-224",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-224.js",
+ "description": "Object.create - 'writable' property of one property in 'Properties' is the JSON object (8.10.5 step 6.b)",
+ "test": "assertTrue((function testcase() {\n\n var newObj = Object.create({}, {\n prop: {\n writable: JSON\n }\n });\n var hasProperty = newObj.hasOwnProperty(\"prop\");\n newObj.prop = 121;\n return hasProperty && newObj.prop === 121;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create))"
+ },
+ {
+ "id": "15.2.3.5-4-225",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-225.js",
+ "description": "Object.create - 'writable' property of one property in 'Properties' is an Error object (8.10.5 step 6.b)",
+ "test": "assertTrue((function testcase() {\n\n var newObj = Object.create({}, {\n prop: {\n writable: new Error()\n }\n });\n var hasProperty = newObj.hasOwnProperty(\"prop\");\n newObj.prop = 121;\n return hasProperty && newObj.prop === 121;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create))"
+ },
+ {
+ "id": "15.2.3.5-4-226",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-226.js",
+ "description": "Object.create - 'writable' property of one property in 'Properties' is an Arguments object (8.10.5 step 6.b)",
+ "test": "assertTrue((function testcase() {\n\n var argObj = (function () { return arguments; })();\n\n var newObj = Object.create({}, {\n prop: {\n writable: argObj\n }\n });\n var hasProperty = newObj.hasOwnProperty(\"prop\");\n\n newObj.prop = 121;\n\n return hasProperty && newObj.prop === 121;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create))"
+ },
+ {
+ "id": "15.2.3.5-4-228",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-228.js",
+ "description": "Object.create - 'writable' property of one property in 'Properties' is the global object (8.10.5 step 6.b)",
+ "test": "assertTrue((function testcase() {\n\n var newObj = Object.create({}, {\n prop: {\n writable: fnGlobalObject()\n }\n });\n var hasProperty = newObj.hasOwnProperty(\"prop\");\n\n newObj.prop = 121;\n\n return hasProperty && newObj.prop === 121;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create))"
+ },
+ {
+ "id": "15.2.3.5-4-229",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-229.js",
+ "description": "Object.create - 'writable' property of one property in 'Properties' is a string (value is 'false') which is treated as the value true (8.10.5 step 6.b)",
+ "test": "assertTrue((function testcase() {\n\n var newObj = Object.create({}, {\n prop: {\n writable: \"false\"\n }\n });\n var hasProperty = newObj.hasOwnProperty(\"prop\");\n\n newObj.prop = 121;\n\n return hasProperty && newObj.prop === 121;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create))"
+ },
+ {
+ "id": "15.2.3.5-4-23",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-23.js",
+ "description": "Object.create - own enumerable data property that overrides an enumerable inherited accessor property in 'Properties' is defined in 'obj' (15.2.3.7 step 5.a)",
+ "test": "assertTrue((function testcase() {\n\n var proto = {};\n Object.defineProperty(proto, \"prop\", {\n get: function () {\n return { value: 9 };\n },\n enumerable: true\n });\n\n var ConstructFun = function () { };\n ConstructFun.prototype = proto;\n\n var child = new ConstructFun();\n Object.defineProperty(child, \"prop\", {\n value: {\n value: 12\n },\n enumerable: true\n });\n var newObj = Object.create({}, child);\n\n return newObj.hasOwnProperty(\"prop\") && newObj.prop === 12;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.5-4-230",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-230.js",
+ "description": "Object.create - 'writable' property of one property in 'Properties' is new Boolean(false) which is treated as the value true (8.10.5 step 6.b)",
+ "test": "assertTrue((function testcase() {\n\n var newObj = Object.create({}, {\n prop: {\n writable: new Boolean(false)\n }\n });\n var hasProperty = newObj.hasOwnProperty(\"prop\");\n\n newObj.prop = 121;\n\n return hasProperty && newObj.prop === 121;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create))"
+ },
+ {
+ "id": "15.2.3.5-4-231",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-231.js",
+ "description": "Object.create - 'get' property of one property in 'Properties' is present (8.10.5 step 7)",
+ "test": "assertTrue((function testcase() {\n\n var newObj = Object.create({}, {\n prop: {\n get: function () {\n return \"present\";\n }\n }\n });\n return newObj.prop === \"present\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create))"
+ },
+ {
+ "id": "15.2.3.5-4-232",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-232.js",
+ "description": "Object.create - 'get' property of one property in 'Properties' is not present (8.10.5 step 7)",
+ "test": "assertTrue((function testcase() {\n\n var newObj = Object.create({}, {\n prop: {}\n });\n return typeof (newObj.prop) === \"undefined\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create))"
+ },
+ {
+ "id": "15.2.3.5-4-233",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-233.js",
+ "description": "Object.create - 'get' property of one property in 'Properties' is own data property (8.10.5 step 7.a)",
+ "test": "assertTrue((function testcase() {\n\n var newObj = Object.create({}, {\n prop: {\n get: function () {\n return \"ownDataProperty\";\n }\n }\n });\n return newObj.prop === \"ownDataProperty\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create))"
+ },
+ {
+ "id": "15.2.3.5-4-234",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-234.js",
+ "description": "Object.create - 'get' property of one property in 'Properties' is an inherited data property (8.10.5 step 7.a)",
+ "test": "assertTrue((function testcase() {\n\n var proto = {\n get: function () {\n return \"inheritedDataProperty\";\n }\n };\n\n var ConstructFun = function () { };\n ConstructFun.prototype = proto;\n\n var descObj = new ConstructFun();\n\n var newObj = Object.create({}, {\n prop: descObj\n });\n\n return newObj.prop === \"inheritedDataProperty\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create))"
+ },
+ {
+ "id": "15.2.3.5-4-235",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-235.js",
+ "description": "Object.create - 'get' property of one property in 'Properties' is own data property that overrides an inherited data property (8.10.5 step 7.a)",
+ "test": "assertTrue((function testcase() {\n\n var proto = {\n get: function () {\n return \"inheritedDataProperty\";\n }\n };\n\n var ConstructFun = function () { };\n ConstructFun.prototype = proto;\n\n var descObj = new ConstructFun();\n\n Object.defineProperty(descObj, \"get\", {\n value: function () {\n return \"ownDataProperty\";\n }\n });\n\n var newObj = Object.create({}, {\n prop: descObj\n });\n\n return newObj.prop === \"ownDataProperty\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.5-4-236",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-236.js",
+ "description": "Object.create - 'get' property of one property in 'Properties' is own data property that overrides an inherited accessor property (8.10.5 step 7.a)",
+ "test": "assertTrue((function testcase() {\n\n var proto = {};\n\n Object.defineProperty(proto, \"get\", {\n get: function () {\n return function () {\n return \"inheritedAccessorProperty\";\n };\n }\n });\n\n var ConstructFun = function () { };\n ConstructFun.prototype = proto;\n var descObj = new ConstructFun();\n\n Object.defineProperty(descObj, \"get\", {\n value: function () {\n return \"ownDataProperty\";\n }\n });\n\n var newObj = Object.create({}, {\n prop: descObj\n });\n\n return newObj.prop === \"ownDataProperty\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.5-4-237",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-237.js",
+ "description": "Object.create - 'get' property of one property in 'Properties' is own accessor property (8.10.5 step 7.a)",
+ "test": "assertTrue((function testcase() {\n\n var descObj = {};\n\n Object.defineProperty(descObj, \"get\", {\n get: function () {\n return function () {\n return \"ownAccessorProperty\";\n };\n }\n });\n\n var newObj = Object.create({}, {\n prop: descObj \n });\n\n return newObj.prop === \"ownAccessorProperty\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.5-4-238",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-238.js",
+ "description": "Object.create - 'get' property of one property in 'Properties' is an inherited accessor property (8.10.5 step 7.a)",
+ "test": "assertTrue((function testcase() {\n\n var proto = {};\n\n Object.defineProperty(proto, \"get\", {\n get: function () {\n return function () {\n return \"inheritedAccessorProperty\";\n };\n }\n });\n\n var ConstructFun = function () { };\n ConstructFun.prototype = proto;\n var descObj = new ConstructFun();\n\n var newObj = Object.create({}, {\n prop: descObj \n });\n\n return newObj.prop === \"inheritedAccessorProperty\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.5-4-239",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-239.js",
+ "description": "Object.create - 'get' property of one property in 'Properties' is own accessor property that overrides an inherited data property (8.10.5 step 7.a)",
+ "test": "assertTrue((function testcase() {\n var proto = {\n get: function () {\n return \"inheritedDataProperty\";\n }\n };\n\n var ConstructFun = function () { };\n ConstructFun.prototype = proto;\n var descObj = new ConstructFun();\n\n Object.defineProperty(descObj, \"get\", {\n get: function () {\n return function () {\n return \"ownAccessorProperty\";\n };\n }\n });\n\n var newObj = Object.create({}, {\n prop: descObj\n });\n\n return newObj.prop === \"ownAccessorProperty\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.5-4-24",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-24.js",
+ "description": "Object.create - own enumerable accessor property that overrides an enumerable inherited data property in 'Properties' is defined in 'obj' (15.2.3.7 step 5.a)",
+ "test": "assertTrue((function testcase() {\n\n var proto = {};\n proto.prop = {\n value: 12\n };\n\n var ConstructFun = function () { };\n ConstructFun.prototype = proto;\n\n var child = new ConstructFun();\n Object.defineProperty(child, \"prop\", {\n get: function () {\n return {\n value: 9\n };\n },\n enumerable: true\n });\n\n var newObj = Object.create({}, child);\n\n return newObj.hasOwnProperty(\"prop\") && newObj.prop === 9;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.5-4-240",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-240.js",
+ "description": "Object.create - 'get' property of one property in 'Properties' is own accessor property that overrides an inherited accessor property (8.10.5 step 7.a)",
+ "test": "assertTrue((function testcase() {\n var proto = {};\n\n Object.defineProperty(proto, \"get\", {\n get: function () {\n return function () {\n return \"inheritedAccessorProperty\";\n };\n }\n });\n\n var ConstructFun = function () { };\n ConstructFun.prototype = proto;\n var descObj = new ConstructFun();\n\n Object.defineProperty(descObj, \"get\", {\n get: function () {\n return function () {\n return \"ownAccessorProperty\";\n };\n }\n });\n\n var newObj = Object.create({}, {\n prop: descObj \n });\n\n return newObj.prop === \"ownAccessorProperty\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.5-4-241",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-241.js",
+ "description": "Object.create - 'get' property of one property in 'Properties' is own accessor property without a get function (8.10.5 step 7.a)",
+ "test": "assertTrue((function testcase() {\n var descObj = {};\n\n Object.defineProperty(descObj, \"get\", {\n set: function () { }\n });\n\n var newObj = Object.create({}, {\n prop: descObj \n });\n\n return newObj.hasOwnProperty(\"prop\") && typeof (newObj.prop) === \"undefined\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.5-4-242",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-242.js",
+ "description": "Object.create - 'get' property of one property in 'Properties' is own accessor property without a get function, which overrides an inherited accessor property (8.10.5 step 7.a)",
+ "test": "assertTrue((function testcase() {\n var proto = {};\n\n Object.defineProperty(proto, \"get\", {\n get: function () {\n return function () {\n return \"inheritedAccessorProperty\";\n };\n }\n });\n\n var ConstructFun = function () { };\n ConstructFun.prototype = proto;\n var descObj = new ConstructFun();\n\n Object.defineProperty(descObj, \"get\", {\n set: function () { }\n });\n\n var newObj = Object.create({}, {\n prop: descObj \n });\n\n return newObj.hasOwnProperty(\"prop\") && typeof newObj.prop === \"undefined\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.5-4-243",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-243.js",
+ "description": "Object.create - 'get' property of one property in 'Properties' is an inherited accessor property without a get function (8.10.5 step 7.a)",
+ "test": "assertTrue((function testcase() {\n var proto = {};\n\n Object.defineProperty(proto, \"get\", {\n set: function () { }\n });\n\n var ConstructFun = function () { };\n ConstructFun.prototype = proto;\n var descObj = new ConstructFun();\n\n var newObj = Object.create({}, {\n prop: descObj \n });\n\n return newObj.hasOwnProperty(\"prop\") && typeof (newObj.prop) === \"undefined\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.5-4-244",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-244.js",
+ "description": "Object.create - one property in 'Properties' is a Function object which implements its own [[Get]] method to access the 'get' property (8.10.5 step 7.a)",
+ "test": "assertTrue((function testcase() {\n var funObj = function () {};\n\n funObj.get = function () {\n return \"VerifyFunctionObject\";\n };\n\n var newObj = Object.create({}, {\n prop: funObj\n });\n\n return newObj.prop === \"VerifyFunctionObject\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create))"
+ },
+ {
+ "id": "15.2.3.5-4-245",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-245.js",
+ "description": "Object.create - one property in 'Properties' is an Array object that uses Object's [[Get]] method to access the 'get' property (8.10.5 step 7.a)",
+ "test": "assertTrue((function testcase() {\n var arrayObj = [1, 2, 3];\n\n arrayObj.get = function () {\n return \"VerifyArrayObject\";\n };\n\n var newObj = Object.create({}, {\n prop: arrayObj\n });\n\n return newObj.prop === \"VerifyArrayObject\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create))"
+ },
+ {
+ "id": "15.2.3.5-4-246",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-246.js",
+ "description": "Object.create - one property in 'Properties' is a String object that uses Object's [[Get]] method to access the 'get' property (8.10.5 step 7.a)",
+ "test": "assertTrue((function testcase() {\n var strObj = new String(\"abc\");\n\n strObj.get = function () {\n return \"VerifyStringObject\";\n };\n\n var newObj = Object.create({}, {\n prop: strObj\n });\n\n return newObj.prop === \"VerifyStringObject\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create))"
+ },
+ {
+ "id": "15.2.3.5-4-247",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-247.js",
+ "description": "Object.create - one property in 'Properties' is a Boolean object that uses Object's [[Get]] method to access the 'get' property (8.10.5 step 7.a)",
+ "test": "assertTrue((function testcase() {\n var boolObj = new Boolean(true);\n\n boolObj.get = function () {\n return \"VerifyBooleanObject\";\n };\n\n var newObj = Object.create({}, {\n prop: boolObj \n });\n\n return newObj.prop === \"VerifyBooleanObject\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create))"
+ },
+ {
+ "id": "15.2.3.5-4-248",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-248.js",
+ "description": "Object.create - one property in 'Properties' is a Number object that uses Object's [[Get]] method to access the 'get' property (8.10.5 step 7.a)",
+ "test": "assertTrue((function testcase() {\n var numObj = new Number(5);\n\n numObj.get = function () {\n return \"VerifyNumberObject\";\n };\n\n var newObj = Object.create({}, {\n prop: numObj \n });\n\n return newObj.prop === \"VerifyNumberObject\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create))"
+ },
+ {
+ "id": "15.2.3.5-4-249",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-249.js",
+ "description": "Object.create - one property in 'Properties' is a Date object that uses Object's [[Get]] method to access the 'get' property (8.10.5 step 7.a)",
+ "test": "assertTrue((function testcase() {\n var dateObj = new Date();\n\n dateObj.get = function () {\n return \"VerifyDateObject\";\n };\n\n var newObj = Object.create({}, {\n prop: dateObj \n });\n\n return newObj.prop === \"VerifyDateObject\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create))"
+ },
+ {
+ "id": "15.2.3.5-4-25",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-25.js",
+ "description": "Object.create - own enumerable accessor property that overrides an enumerable inherited accessor property in 'Properties' is defined in 'obj' (15.2.3.7 step 5.a) ",
+ "test": "assertTrue((function testcase() {\n\n var proto = {};\n Object.defineProperty(proto, \"prop\", {\n get: function () {\n return {\n value: 9\n };\n },\n enumerable: true\n });\n\n var ConstructFun = function () { };\n ConstructFun.prototype = proto;\n\n var child = new ConstructFun();\n Object.defineProperty(child, \"prop\", {\n get: function () {\n return {\n value: 12\n };\n },\n enumerable: true\n });\n var newObj = Object.create({}, child);\n\n return newObj.hasOwnProperty(\"prop\") && newObj.prop === 12;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.5-4-250",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-250.js",
+ "description": "Object.create - one property in 'Properties' is a RegExp object that uses Object's [[Get]] method to access the 'get' property (8.10.5 step 7.a)",
+ "test": "assertTrue((function testcase() {\n var regObj = new RegExp();\n\n regObj.get = function () {\n return \"VerifyRegExpObject\";\n };\n\n var newObj = Object.create({}, {\n prop: regObj\n });\n\n return newObj.prop === \"VerifyRegExpObject\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create))"
+ },
+ {
+ "id": "15.2.3.5-4-251",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-251.js",
+ "description": "Object.create - one property in 'Properties' is the Math object that uses Object's [[Get]] method to access the 'get' property (8.10.5 step 7.a)",
+ "test": "assertTrue((function testcase() {\n try {\n Math.get = function () {\n return \"VerifyMathObject\";\n };\n\n var newObj = Object.create({}, {\n prop: Math \n });\n\n return newObj.prop === \"VerifyMathObject\";\n } finally {\n delete Math.get;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create))"
+ },
+ {
+ "id": "15.2.3.5-4-252",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-252.js",
+ "description": "Object.create - one property in 'Properties' is the JSON object that uses Object's [[Get]] method to access the 'get' property (8.10.5 step 7.a)",
+ "test": "assertTrue((function testcase() {\n JSON.get = function () {\n return \"VerifyJSONObject\";\n };\n\n try {\n var newObj = Object.create({}, {\n prop: JSON \n });\n\n return newObj.prop === \"VerifyJSONObject\";\n } finally {\n delete JSON.get;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create))"
+ },
+ {
+ "id": "15.2.3.5-4-253",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-253.js",
+ "description": "Object.create - one property in 'Properties' is an Error object that uses Object's [[Get]] method to access the 'get' property (8.10.5 step 7.a)",
+ "test": "assertTrue((function testcase() {\n var errObj = new Error(\"error\");\n\n errObj.get = function () {\n return \"VerifyErrorObject\";\n };\n\n var newObj = Object.create({}, {\n prop: errObj \n });\n\n return newObj.prop === \"VerifyErrorObject\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create))"
+ },
+ {
+ "id": "15.2.3.5-4-254",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-254.js",
+ "description": "Object.create - one property in 'Properties' is an Arguments object which implements its own [[Get]] method to access the 'get' property (8.10.5 step 7.a)",
+ "test": "assertTrue((function testcase() {\n\n var argObj = (function () { return arguments; })();\n\n argObj.get = function () {\n return \"VerifyArgumentsObject\";\n };\n\n var newObj = Object.create({}, {\n prop: argObj\n });\n\n return newObj.prop === \"VerifyArgumentsObject\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create))"
+ },
+ {
+ "id": "15.2.3.5-4-256",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-256.js",
+ "description": "Object.create - one property in 'Properties' is the global object that uses Object's [[Get]] method to access the 'get' property (8.10.5 step 7.a)",
+ "test": "assertTrue((function testcase() {\n fnGlobalObject().get = function () {\n return \"VerifyGlobalObject\";\n };\n\n try {\n var newObj = Object.create({}, {\n prop: fnGlobalObject()\n });\n\n return newObj.prop === \"VerifyGlobalObject\";\n } finally {\n delete fnGlobalObject().get;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create))"
+ },
+ {
+ "id": "15.2.3.5-4-257",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-257.js",
+ "description": "Object.create - 'get' property of one property in 'Properties' is undefined (8.10.5 step 7.b)",
+ "test": "assertTrue((function testcase() {\n var newObj = Object.create({}, {\n prop: {\n get: undefined\n }\n });\n\n return newObj.hasOwnProperty(\"prop\") && typeof newObj.prop === \"undefined\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create))"
+ },
+ {
+ "id": "15.2.3.5-4-258",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-258.js",
+ "description": "Object.create - 'get' property of one property in 'Properties' is the primitive value null (8.10.5 step 7.b)",
+ "test": "assertTrue((function testcase() {\n try {\n Object.create({}, {\n prop: {\n get: null\n }\n });\n\n return false;\n } catch (e) {\n return (e instanceof TypeError);\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create))"
+ },
+ {
+ "id": "15.2.3.5-4-259",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-259.js",
+ "description": "Object.create - 'get' property of one property in 'Properties' is a boolean primitive (8.10.5 step 7.b)",
+ "test": "assertTrue((function testcase() {\n try {\n Object.create({}, {\n prop: {\n get: false\n }\n });\n\n return false;\n } catch (e) {\n return (e instanceof TypeError);\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create))"
+ },
+ {
+ "id": "15.2.3.5-4-26",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-26.js",
+ "description": "Object.create - TypeError is thrown when own enumerable accessor property of 'Properties' without a get function (15.2.3.7 step 5.a)",
+ "test": "assertTrue((function testcase() {\n\n var props = {};\n Object.defineProperty(props, \"prop\", {\n set: function () { },\n enumerable: true\n });\n try {\n Object.create({}, props);\n\n return false;\n } catch (ex) {\n return ex instanceof TypeError;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.5-4-260",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-260.js",
+ "description": "Object.create - 'get' property of one property in 'Properties' is a number primitive (8.10.5 step 7.b)",
+ "test": "assertTrue((function testcase() {\n try {\n Object.create({}, {\n prop: {\n get: 123\n }\n });\n\n return false;\n } catch (e) {\n return (e instanceof TypeError);\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create))"
+ },
+ {
+ "id": "15.2.3.5-4-261",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-261.js",
+ "description": "Object.create - 'get' property of one property in 'Properties' is a primitive string (8.10.5 step 7.b)",
+ "test": "assertTrue((function testcase() {\n\n try {\n Object.create({}, {\n prop: {\n get: \"string\"\n }\n });\n\n return false;\n } catch (e) {\n return (e instanceof TypeError);\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create))"
+ },
+ {
+ "id": "15.2.3.5-4-262",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-262.js",
+ "description": "Object.create - 'get' property of one property in 'Properties' is an Array object (8.10.5 step 7.b)",
+ "test": "assertTrue((function testcase() {\n try {\n Object.create({}, {\n prop: {\n get: [1, 2, 3]\n }\n });\n\n return false;\n } catch (e) {\n return (e instanceof TypeError);\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create))"
+ },
+ {
+ "id": "15.2.3.5-4-263",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-263.js",
+ "description": "Object.create - 'get' property of one property in 'Properties' is a function (8.10.5 step 7.b)",
+ "test": "assertTrue((function testcase() {\n var newObj = Object.create({}, {\n prop: {\n get: function () { }\n }\n });\n\n return newObj.hasOwnProperty(\"prop\") && typeof newObj.prop === \"undefined\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create))"
+ },
+ {
+ "id": "15.2.3.5-4-266",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-266.js",
+ "description": "Object.create - 'set' property of one property in 'Properties' is present (8.10.5 step 8)",
+ "test": "assertTrue((function testcase() {\n var data = \"data\";\n\n var newObj = Object.create({}, {\n prop: {\n set: function (value) {\n data = value;\n }\n }\n });\n\n var hasProperty = newObj.hasOwnProperty(\"prop\");\n\n newObj.prop = \"overrideData\";\n\n return hasProperty && data === \"overrideData\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create))"
+ },
+ {
+ "id": "15.2.3.5-4-267",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-267.js",
+ "description": "Object.create - 'set' property of one property in 'Properties' is not present (8.10.5 step 8)",
+ "test": "assertTrue((function testcase() {\n var newObj = Object.create({}, {\n prop: {\n get: function () {\n return \"data\";\n }\n }\n });\n\n var hasProperty = newObj.hasOwnProperty(\"prop\");\n\n newObj.prop = \"overrideData\";\n\n return hasProperty && newObj.prop === \"data\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create))"
+ },
+ {
+ "id": "15.2.3.5-4-268",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-268.js",
+ "description": "Object.create - 'set' property of one property in 'Properties' is own data property (8.10.5 step 8.a)",
+ "test": "assertTrue((function testcase() {\n var data = \"data\";\n\n var newObj = Object.create({}, {\n prop: {\n set: function (value) {\n data = value;\n }\n }\n });\n\n var hasProperty = newObj.hasOwnProperty(\"prop\");\n\n newObj.prop = \"overrideData\";\n\n return hasProperty && data === \"overrideData\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create))"
+ },
+ {
+ "id": "15.2.3.5-4-269",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-269.js",
+ "description": "Object.create - 'set' property of one property in 'Properties' is an inherited data property (8.10.5 step 8.a)",
+ "test": "assertTrue((function testcase() {\n var data = \"data\";\n var proto = {\n set: function (value) {\n data = value;\n }\n };\n\n var ConstructFun = function () { };\n ConstructFun.prototype = proto;\n var child = new ConstructFun();\n\n var newObj = Object.create({}, {\n prop: child \n });\n\n var hasProperty = newObj.hasOwnProperty(\"prop\");\n\n newObj.prop = \"overrideData\";\n\n return hasProperty && data === \"overrideData\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create))"
+ },
+ {
+ "id": "15.2.3.5-4-27",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-27.js",
+ "description": "Object.create - own enumerable accessor property in 'Properties' without a get function that overrides an enumerable inherited accessor property in 'Properties' is defined in 'obj' (15.2.3.7 step 5.a)",
+ "test": "assertTrue((function testcase() {\n\n var proto = {};\n Object.defineProperty(proto, \"prop\", {\n get: function () {\n return {};\n },\n enumerable: true\n });\n\n var ConstructFun = function () { };\n ConstructFun.prototype = proto;\n\n var child = new ConstructFun();\n Object.defineProperty(child, \"prop\", {\n set: function () { },\n enumerable: true\n });\n\n try {\n Object.create({}, child);\n\n return false;\n } catch (ex) {\n return ex instanceof TypeError;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.5-4-270",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-270.js",
+ "description": "Object.create - 'set' property of one property in 'Properties' is own data property that overrides an inherited data property (8.10.5 step 8.a)",
+ "test": "assertTrue((function testcase() {\n var data1 = \"data\";\n var data2 = \"data\";\n var proto = {\n set: function (value) {\n data2 = value;\n }\n };\n\n var ConstructFun = function () { };\n ConstructFun.prototype = proto;\n var child = new ConstructFun();\n child.set = function (value) {\n data1 = value;\n };\n\n var newObj = Object.create({}, {\n prop: child \n });\n\n var hasProperty = newObj.hasOwnProperty(\"prop\");\n\n newObj.prop = \"overrideData\";\n\n return hasProperty && data1 === \"overrideData\" && data2 === \"data\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create))"
+ },
+ {
+ "id": "15.2.3.5-4-271",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-271.js",
+ "description": "Object.create - 'set' property of one property in 'Properties' is own data property that overrides an inherited accessor property (8.10.5 step 8.a)",
+ "test": "assertTrue((function testcase() {\n var data1 = \"data\";\n var data2 = \"data\";\n\n var proto = {};\n Object.defineProperty(proto, \"set\", {\n get: function () {\n return function (value) {\n data2 = value;\n };\n }\n });\n\n var ConstructFun = function () { };\n ConstructFun.prototype = proto;\n var child = new ConstructFun();\n Object.defineProperty(child, \"set\", {\n value: function (value) {\n data1 = value;\n }\n });\n\n var newObj = Object.create({}, {\n prop: child \n });\n\n var hasProperty = newObj.hasOwnProperty(\"prop\");\n\n newObj.prop = \"overrideData\";\n\n return hasProperty && data1 === \"overrideData\" && data2 === \"data\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.5-4-272",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-272.js",
+ "description": "Object.create - 'set' property of one property in 'Properties' is own accessor property (8.10.5 step 8.a)",
+ "test": "assertTrue((function testcase() {\n var data = \"data\";\n var descObj = {};\n\n Object.defineProperty(descObj, \"set\", {\n get: function () {\n return function (value) {\n data = value;\n };\n }\n });\n\n var newObj = Object.create({}, {\n prop: descObj \n });\n\n var hasProperty = newObj.hasOwnProperty(\"prop\");\n\n newObj.prop = \"overrideData\";\n\n return hasProperty && data === \"overrideData\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.5-4-273",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-273.js",
+ "description": "Object.create - 'set' property of one property in 'Properties' is an inherited accessor property (8.10.5 step 8.a)",
+ "test": "assertTrue((function testcase() {\n var data = \"data\";\n var proto = {};\n\n Object.defineProperty(proto, \"set\", {\n get: function () {\n return function (value) {\n data = value;\n };\n }\n });\n\n var ConstructFun = function () { };\n ConstructFun.prototype = proto;\n var child = new ConstructFun();\n\n var newObj = Object.create({}, {\n prop: child \n });\n\n var hasProperty = newObj.hasOwnProperty(\"prop\");\n\n newObj.prop = \"overrideData\";\n\n return hasProperty && data === \"overrideData\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.5-4-274",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-274.js",
+ "description": "Object.create - 'set' property of one property in 'Properties' is own accessor property that overrides an inherited data property (8.10.5 step 8.a)",
+ "test": "assertTrue((function testcase() {\n var data1 = \"data\";\n var data2 = \"data\";\n\n var proto = {};\n proto.set = function (value) {\n data2 = value;\n };\n\n var ConstructFun = function () { };\n ConstructFun.prototype = proto;\n var child = new ConstructFun();\n Object.defineProperty(child, \"set\", {\n get: function () {\n return function (value) {\n data1 = value;\n };\n }\n });\n\n var newObj = Object.create({}, {\n prop: child \n });\n\n var hasProperty = newObj.hasOwnProperty(\"prop\");\n\n newObj.prop = \"overrideData\";\n\n return hasProperty && data1 === \"overrideData\" && data2 === \"data\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.5-4-275",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-275.js",
+ "description": "Object.create - 'set' property of one property in 'Properties' is own accessor property that overrides an inherited accessor property (8.10.5 step 8.a)",
+ "test": "assertTrue((function testcase() {\n var data1 = \"data\";\n var data2 = \"data\";\n var proto = {};\n\n Object.defineProperty(proto, \"set\", {\n get: function () {\n return function (value) {\n data2 = value;\n };\n }\n });\n\n var ConstructFun = function () { };\n ConstructFun.prototype = proto;\n var child = new ConstructFun();\n Object.defineProperty(child, \"set\", {\n get: function () {\n return function (value) {\n data1 = value;\n };\n }\n });\n\n var newObj = Object.create({}, {\n prop: child\n });\n\n var hasProperty = newObj.hasOwnProperty(\"prop\");\n\n newObj.prop = \"overrideData\";\n\n return hasProperty && data1 === \"overrideData\" && data2 === \"data\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.5-4-276",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-276.js",
+ "description": "Object.create - 'set' property of one property in 'Properties' is own accessor property without a get function (8.10.5 step 8.a)",
+ "test": "assertTrue((function testcase() {\n var descObj = {};\n Object.defineProperty(descObj, \"set\", {\n set: function () { }\n });\n\n var newObj = Object.create({}, {\n prop: descObj\n });\n\n var hasProperty = newObj.hasOwnProperty(\"prop\");\n\n var desc = Object.getOwnPropertyDescriptor(newObj, \"prop\");\n\n return hasProperty && typeof desc.set === \"undefined\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create) && fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.5-4-277",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-277.js",
+ "description": "Object.create - 'set' property of one property in 'Properties' is own accessor property without a get function, which overrides an inherited accessor property (8.10.5 step 8.a)",
+ "test": "assertTrue((function testcase() {\n var proto = {};\n Object.defineProperty(proto, \"set\", {\n get: function () {\n return function () { };\n }\n });\n\n var ConstructFun = function () { };\n ConstructFun.prototype = proto;\n var child = new ConstructFun();\n Object.defineProperty(child, \"set\", {\n set: function () { }\n });\n\n var newObj = Object.create({}, {\n prop: child\n });\n\n var desc = Object.getOwnPropertyDescriptor(newObj, \"prop\");\n\n return newObj.hasOwnProperty(\"prop\") && typeof desc.set === \"undefined\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create) && fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.5-4-278",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-278.js",
+ "description": "Object.create - 'set' property of one property in 'Properties' is an inherited accessor property without a get function (8.10.5 step 8.a)",
+ "test": "assertTrue((function testcase() {\n var proto = {};\n Object.defineProperty(proto, \"set\", {\n set: function () { }\n });\n\n var ConstructFun = function () { };\n ConstructFun.prototype = proto;\n var child = new ConstructFun();\n\n var newObj = Object.create({}, {\n prop: child\n });\n\n var desc = Object.getOwnPropertyDescriptor(newObj, \"prop\");\n\n return newObj.hasOwnProperty(\"prop\") && typeof desc.set === \"undefined\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create) && fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.5-4-279",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-279.js",
+ "description": "Object.create - one property in 'Properties' is a Function object which implements its own [[Get]] method to access the 'set' property (8.10.5 step 8.a)",
+ "test": "assertTrue((function testcase() {\n var funObj = function () { };\n var data = \"data\";\n funObj.set = function (value) {\n data = value;\n };\n\n var newObj = Object.create({}, {\n prop: funObj\n });\n\n var hasProperty = newObj.hasOwnProperty(\"prop\");\n\n newObj.prop = \"overrideData\";\n\n return hasProperty && data === \"overrideData\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create))"
+ },
+ {
+ "id": "15.2.3.5-4-28",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-28.js",
+ "description": "Object.create - 'Properties' is a Function object which implements its own [[Get]] method to access own enumerable property (15.2.3.7 step 5.a)",
+ "test": "assertTrue((function testcase() {\n\n var props = function () { };\n props.prop = {\n value: 12,\n enumerable: true\n };\n var newObj = Object.create({}, props);\n return newObj.hasOwnProperty(\"prop\");\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create))"
+ },
+ {
+ "id": "15.2.3.5-4-280",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-280.js",
+ "description": "Object.create - one property in 'Properties' is an Array object that uses Object's [[Get]] method to access the 'set' property (8.10.5 step 8.a)",
+ "test": "assertTrue((function testcase() {\n var arrObj = [];\n var data = \"data\";\n arrObj.set = function (value) {\n data = value;\n };\n\n var newObj = Object.create({}, {\n prop: arrObj\n });\n\n var hasProperty = newObj.hasOwnProperty(\"prop\");\n\n newObj.prop = \"overrideData\";\n\n return hasProperty && data === \"overrideData\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create))"
+ },
+ {
+ "id": "15.2.3.5-4-281",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-281.js",
+ "description": "Object.create - one property in 'Properties' is a String object that uses Object's [[Get]] method to access the 'set' property (8.10.5 step 8.a)",
+ "test": "assertTrue((function testcase() {\n var strObj = new String();\n var data = \"data\";\n strObj.set = function (value) {\n data = value;\n };\n\n var newObj = Object.create({}, {\n prop: strObj\n });\n\n var hasProperty = newObj.hasOwnProperty(\"prop\");\n\n newObj.prop = \"overrideData\";\n\n return hasProperty && data === \"overrideData\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create))"
+ },
+ {
+ "id": "15.2.3.5-4-282",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-282.js",
+ "description": "Object.create - one property in 'Properties' is a Boolean object that uses Object's [[Get]] method to access the 'set' property (8.10.5 step 8.a)",
+ "test": "assertTrue((function testcase() {\n var boolObj = new Boolean(true);\n var data = \"data\";\n boolObj.set = function (value) {\n data = value;\n };\n\n var newObj = Object.create({}, {\n prop: boolObj\n });\n\n var hasProperty = newObj.hasOwnProperty(\"prop\");\n\n newObj.prop = \"overrideData\";\n\n return hasProperty && data === \"overrideData\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create))"
+ },
+ {
+ "id": "15.2.3.5-4-283",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-283.js",
+ "description": "Object.create - one property in 'Properties' is a Number object that uses Object's [[Get]] method to access the 'set' property (8.10.5 step 8.a)",
+ "test": "assertTrue((function testcase() {\n var numObj = new Number(5);\n var data = \"data\";\n numObj.set = function (value) {\n data = value;\n };\n\n var newObj = Object.create({}, {\n prop: numObj\n });\n\n var hasProperty = newObj.hasOwnProperty(\"prop\");\n\n newObj.prop = \"overrideData\";\n\n return hasProperty && data === \"overrideData\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create))"
+ },
+ {
+ "id": "15.2.3.5-4-284",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-284.js",
+ "description": "Object.create - one property in 'Properties' is the Math object that uses Object's [[Get]] method to access the 'set' property (8.10.5 step 8.a)",
+ "test": "assertTrue((function testcase() {\n var data = \"data\";\n\n try {\n Math.set = function (value) {\n data = value;\n };\n\n var newObj = Object.create({}, {\n prop: Math\n });\n\n var hasProperty = newObj.hasOwnProperty(\"prop\");\n\n newObj.prop = \"overrideData\";\n\n return hasProperty && data === \"overrideData\";\n } finally {\n delete Math.set;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create))"
+ },
+ {
+ "id": "15.2.3.5-4-285",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-285.js",
+ "description": "Object.create - one property in 'Properties' is a Date object that uses Object's [[Get]] method to access the 'set' property (8.10.5 step 8.a)",
+ "test": "assertTrue((function testcase() {\n var dateObj = new Date();\n var data = \"data\";\n dateObj.set = function (value) {\n data = value;\n };\n\n var newObj = Object.create({}, {\n prop: dateObj\n });\n\n var hasProperty = newObj.hasOwnProperty(\"prop\");\n\n newObj.prop = \"overrideData\";\n\n return hasProperty && data === \"overrideData\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create))"
+ },
+ {
+ "id": "15.2.3.5-4-286",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-286.js",
+ "description": "Object.create - one property in 'Properties' is a RegExp object that uses Object's [[Get]] method to access the 'set' property (8.10.5 step 8.a)",
+ "test": "assertTrue((function testcase() {\n var regObj = new RegExp();\n var data = \"data\";\n regObj.set = function (value) {\n data = value;\n };\n\n var newObj = Object.create({}, {\n prop: regObj\n });\n\n var hasProperty = newObj.hasOwnProperty(\"prop\");\n\n newObj.prop = \"overrideData\";\n\n return hasProperty && data === \"overrideData\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create))"
+ },
+ {
+ "id": "15.2.3.5-4-287",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-287.js",
+ "description": "Object.create - one property in 'Properties' is the JSON object that uses Object's [[Get]] method to access the 'set' property (8.10.5 step 8.a)",
+ "test": "assertTrue((function testcase() {\n var data = \"data\";\n\n try {\n JSON.set = function (value) {\n data = value;\n };\n\n var newObj = Object.create({}, {\n prop: JSON\n });\n\n var hasProperty = newObj.hasOwnProperty(\"prop\");\n\n newObj.prop = \"overrideData\";\n\n return hasProperty && data === \"overrideData\";\n } finally {\n delete JSON.set;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create))"
+ },
+ {
+ "id": "15.2.3.5-4-288",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-288.js",
+ "description": "Object.create - one property in 'Properties' is an Error object that uses Object's [[Get]] method to access the 'set' property (8.10.5 step 8.a)",
+ "test": "assertTrue((function testcase() {\n var errObj = new Error(\"error\");\n var data = \"data\";\n\n errObj.set = function (value) {\n data = value;\n };\n\n var newObj = Object.create({}, {\n prop: errObj\n });\n\n newObj.prop = \"overrideData\";\n\n return newObj.hasOwnProperty(\"prop\") && data === \"overrideData\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create))"
+ },
+ {
+ "id": "15.2.3.5-4-289",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-289.js",
+ "description": "Object.create - one property in 'Properties' is an Arguments object which implements its own [[Get]] method to access the 'set' property (8.10.5 step 8.a)",
+ "test": "assertTrue((function testcase() {\n var argObj = (function () { return arguments; })();\n\n var data = \"data\";\n\n argObj.set = function (value) {\n data = value;\n };\n\n var newobj = Object.create({}, {\n prop: argObj\n });\n\n var hasProperty = newobj.hasOwnProperty(\"prop\");\n\n newobj.prop = \"overrideData\";\n\n return hasProperty && data === \"overrideData\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create))"
+ },
+ {
+ "id": "15.2.3.5-4-29",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-29.js",
+ "description": "Object.create - 'Properties' is an Array object that uses Object's [[Get]] method to access own enumerable property (15.2.3.7 step 5.a)",
+ "test": "assertTrue((function testcase() {\n\n var props = [];\n props.prop = {\n value: {},\n enumerable: true\n };\n var newObj = Object.create({}, props);\n return newObj.hasOwnProperty(\"prop\");\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create))"
+ },
+ {
+ "id": "15.2.3.5-4-291",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-291.js",
+ "description": "Object.create - one property in 'Properties' is the global object that uses Object's [[Get]] method to access the 'set' property (8.10.5 step 8.a)",
+ "test": "assertTrue((function testcase() {\n var data = \"data\";\n\n try {\n fnGlobalObject().set = function (value) {\n data = value;\n };\n\n var newObj = Object.create({}, {\n prop: fnGlobalObject()\n });\n\n var hasProperty = newObj.hasOwnProperty(\"prop\");\n\n newObj.prop = \"overrideData\";\n\n return hasProperty && data === \"overrideData\";\n } finally {\n delete fnGlobalObject().set;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create))"
+ },
+ {
+ "id": "15.2.3.5-4-292",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-292.js",
+ "description": "Object.create - 'set' property of one property in 'Properties' is undefined (8.10.5 step 8.b)",
+ "test": "assertTrue((function testcase() {\n\n var newObj = Object.create({}, {\n prop: {\n set: undefined\n }\n });\n\n newObj.prop = \"overrideData\";\n\n return newObj.hasOwnProperty(\"prop\") && typeof (newObj.prop) === \"undefined\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create))"
+ },
+ {
+ "id": "15.2.3.5-4-293",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-293.js",
+ "description": "Object.create - 'set' property of one property in 'Properties' is a primitive value null (8.10.5 step 8.b)",
+ "test": "assertTrue((function testcase() {\n\n try {\n Object.create({}, {\n prop: {\n set: null\n }\n });\n\n return false;\n } catch (e) {\n return (e instanceof TypeError);\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create))"
+ },
+ {
+ "id": "15.2.3.5-4-294",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-294.js",
+ "description": "Object.create - 'set' property of one property in 'Properties' is a primitive boolean value true (8.10.5 step 8.b)",
+ "test": "assertTrue((function testcase() {\n\n try {\n Object.create({}, {\n prop: {\n set: true\n } \n });\n\n return false;\n } catch (e) {\n return (e instanceof TypeError);\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create))"
+ },
+ {
+ "id": "15.2.3.5-4-295",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-295.js",
+ "description": "Object.create - 'set' property of one property in 'Properties' is a primitive number value (8.10.5 step 8.b)",
+ "test": "assertTrue((function testcase() {\n\n try {\n Object.create({}, {\n prop: {\n set: 123\n }\n });\n\n return false;\n } catch (e) {\n return (e instanceof TypeError);\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create))"
+ },
+ {
+ "id": "15.2.3.5-4-296",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-296.js",
+ "description": "Object.create - 'set' property of one property in 'Properties' is a primitive string value (8.10.5 step 8.b)",
+ "test": "assertTrue((function testcase() {\n\n try {\n Object.create({}, {\n prop: {\n set: \"abc\"\n }\n });\n\n return false;\n } catch (e) {\n return (e instanceof TypeError);\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create))"
+ },
+ {
+ "id": "15.2.3.5-4-297",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-297.js",
+ "description": "Object.create - 'set' property of one property in 'Properties' is an Date object (8.10.5 step 8.b)",
+ "test": "assertTrue((function testcase() {\n\n try {\n Object.create({}, {\n prop: {\n set: new Date()\n }\n });\n\n return false;\n } catch (e) {\n return (e instanceof TypeError);\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create))"
+ },
+ {
+ "id": "15.2.3.5-4-298",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-298.js",
+ "description": "Object.create - 'set' property of one property in 'Properties' is a function (8.10.5 step 8.b)",
+ "test": "assertTrue((function testcase() {\n var data = \"data\";\n\n var newObj = Object.create({}, {\n prop: {\n set: function (value) {\n data = value;\n }\n }\n });\n\n newObj.prop = \"overrideData\";\n\n return newObj.hasOwnProperty(\"prop\") && data === \"overrideData\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create))"
+ },
+ {
+ "id": "15.2.3.5-4-3",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-3.js",
+ "description": "Object.create throws TypeError if 'Properties' is null (15.2.3.7 step 2)",
+ "test": "assertTrue((function testcase() {\n\n try {\n Object.create({}, null);\n return false;\n } catch (e) {\n return (e instanceof TypeError);\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create))"
+ },
+ {
+ "id": "15.2.3.5-4-30",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-30.js",
+ "description": "Object.create - 'Properties' is a String object that uses Object's [[Get]] method to access own enumerable property (15.2.3.7 step 5.a)",
+ "test": "assertTrue((function testcase() {\n\n var props = new String();\n props.prop = {\n value: 12,\n enumerable: true\n };\n var newObj = Object.create({}, props);\n\n return newObj.hasOwnProperty(\"prop\");\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create))"
+ },
+ {
+ "id": "15.2.3.5-4-300",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-300.js",
+ "description": "Object.create - 'set' property of one property in 'Properties' is a host object that isn't callable (8.10.5 step 8.b)",
+ "test": "assertTrue((function testcase() {\n\n try {\n Object.create({}, {\n prop: {\n set: fnGlobalObject()\n }\n });\n\n return false;\n } catch (e) {\n return (e instanceof TypeError);\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create))"
+ },
+ {
+ "id": "15.2.3.5-4-301",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-301.js",
+ "description": "Object.create - TypeError is thrown if both 'set' property and 'value' property of one property in 'Properties' are present (8.10.5 step 9.a)",
+ "test": "assertTrue((function testcase() {\n\n try {\n Object.create({}, {\n prop: {\n set: function () { },\n value: 100\n }\n });\n\n return false;\n } catch (e) {\n return (e instanceof TypeError);\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create))"
+ },
+ {
+ "id": "15.2.3.5-4-302",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-302.js",
+ "description": "Object.create - TypeError is thrown if both 'set' property and 'writable' property of one property in 'Properties' are present (8.10.5 step 9.a)",
+ "test": "assertTrue((function testcase() {\n\n try {\n Object.create({}, {\n prop: {\n set: function () { },\n writable: true\n }\n });\n\n return false;\n } catch (e) {\n return (e instanceof TypeError);\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create))"
+ },
+ {
+ "id": "15.2.3.5-4-303",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-303.js",
+ "description": "Object.create - TypeError is thrown if both 'get' property and 'value' property of one property in 'Properties' are present (8.10.5 step 9.a)",
+ "test": "assertTrue((function testcase() {\n\n try {\n Object.create({}, {\n prop: {\n get: function () { },\n value: 100\n }\n });\n\n return false;\n } catch (e) {\n return (e instanceof TypeError);\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create))"
+ },
+ {
+ "id": "15.2.3.5-4-304",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-304.js",
+ "description": "Object.create - TypeError is thrown if both 'get' property and 'writable' property of one property in 'Properties' are present (8.10.5 step 9.a)",
+ "test": "assertTrue((function testcase() {\n\n try {\n Object.create({}, {\n prop: {\n get: function () { },\n writable: true\n }\n });\n\n return false;\n } catch (e) {\n return (e instanceof TypeError);\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create))"
+ },
+ {
+ "id": "15.2.3.5-4-305",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-305.js",
+ "description": "Object.create defines a data property when one property in 'Properties' is generic descriptor (8.12.9 step 4.a)",
+ "test": "assertTrue((function testcase() {\n\n try {\n var newObj = Object.create({}, {\n prop: {\n enumerable: true\n }\n });\n return newObj.hasOwnProperty(\"prop\");\n } catch (e) {\n return false;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create))"
+ },
+ {
+ "id": "15.2.3.5-4-306",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-306.js",
+ "description": "Object.create - [[Value]] is set as undefined if it is absent in data descriptor of one property in 'Properties' (8.12.9 step 4.a.i)",
+ "test": "assertTrue((function testcase() {\n\n try {\n var newObj = Object.create({}, {\n prop: {\n writable: true,\n configurable: true,\n enumerable: true\n }\n });\n return newObj.hasOwnProperty(\"prop\") && newObj.prop === undefined;\n } catch (e) {\n return false;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create))"
+ },
+ {
+ "id": "15.2.3.5-4-307",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-307.js",
+ "description": "Object.create - [[Writable]] is set as false if it is absent in data descriptor of one property in 'Properties' (8.12.9 step 4.a.i)",
+ "test": "assertTrue((function testcase() {\n var newObj = Object.create({}, {\n prop: {\n value: 1001,\n configurable: true,\n enumerable: true\n }\n });\n\n var hasProperty = newObj.hasOwnProperty(\"prop\");\n\n newObj.prop = 12;\n\n return hasProperty && newObj.prop === 1001;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create))"
+ },
+ {
+ "id": "15.2.3.5-4-308",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-308.js",
+ "description": "Object.create - [[Enumerable]] is set as false if it is absent in data descriptor of one property in 'Properties' (8.12.9 step 4.a.i)",
+ "test": "assertTrue((function testcase() {\n var isEnumerable = false;\n\n var newObj = Object.create({}, {\n prop: {\n value: 1001,\n writable: true,\n configurable: true\n }\n });\n\n var hasProperty = newObj.hasOwnProperty(\"prop\");\n\n for (var p in newObj) {\n if (p === \"prop\") {\n isEnumerable = true;\n }\n }\n return hasProperty && !isEnumerable;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create))"
+ },
+ {
+ "id": "15.2.3.5-4-309",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-309.js",
+ "description": "Object.create - [[Configurable]] is set as false if it is absent in data descriptor of one property in 'Properties' (8.12.9 step 4.a.i)",
+ "test": "assertTrue((function testcase() {\n var isNotConfigurable = false;\n\n try {\n var newObj = Object.create({}, {\n prop: {\n value: 1001,\n writable: true,\n enumerable: true\n }\n });\n var hasProperty = newObj.hasOwnProperty(\"prop\");\n delete newObj.prop;\n isNotConfigurable = newObj.hasOwnProperty(\"prop\");\n return hasProperty && isNotConfigurable;\n } catch (e) {\n return false;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create))"
+ },
+ {
+ "id": "15.2.3.5-4-31",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-31.js",
+ "description": "Object.create - 'Properties' is a Boolean object that uses Object's [[Get]] method to access own enumerable property (15.2.3.7 step 5.a)",
+ "test": "assertTrue((function testcase() {\n\n var props = new Boolean(false);\n props.prop = {\n value: 12,\n enumerable: true\n };\n var newObj = Object.create({}, props);\n return newObj.hasOwnProperty(\"prop\");\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create))"
+ },
+ {
+ "id": "15.2.3.5-4-310",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-310.js",
+ "description": "Object.create - [[Get]] is set as undefined if it is absent in accessor descriptor of one property in 'Properties' (8.12.9 step 4.b)",
+ "test": "assertTrue((function testcase() {\n var newObj = Object.create({}, {\n prop: {\n set: function () { },\n enumerable: true,\n configurable: true\n }\n });\n return newObj.hasOwnProperty(\"prop\") && newObj.prop === undefined;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create))"
+ },
+ {
+ "id": "15.2.3.5-4-311",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-311.js",
+ "description": "Object.create - [[Set]] is set as undefined if it is absent in accessor descriptor of one property in 'Properties' (8.12.9 step 4.b)",
+ "test": "assertTrue((function testcase() {\n var newObj = Object.create({}, {\n prop: {\n get: function () {\n return \"verifyCreate\";\n },\n enumerable: true,\n configurable: true\n }\n });\n\n var desc = Object.getOwnPropertyDescriptor(newObj, \"prop\");\n var verifySet = desc.hasOwnProperty(\"set\") && typeof desc.set === \"undefined\";\n\n var verifyGet = false;\n if (newObj.prop === \"verifyCreate\") {\n verifyGet = true;\n }\n\n var verifyEnumerable = false;\n for (var p in newObj) {\n if (p === \"prop\") {\n verifyEnumerable = true;\n }\n }\n\n var verifyConfigurable = false;\n var hasProperty = newObj.hasOwnProperty(\"prop\");\n delete newObj.prop;\n verifyConfigurable = !newObj.hasOwnProperty(\"prop\") && hasProperty;\n\n return verifySet && verifyGet && verifyEnumerable && verifyConfigurable;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create))"
+ },
+ {
+ "id": "15.2.3.5-4-312",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-312.js",
+ "description": "Object.create - [[Enumerable]] is set as false if it is absent in accessor descriptor of one property in 'Properties' (8.12.9 step 4.b)",
+ "test": "assertTrue((function testcase() {\n var isEnumerable = false;\n var newObj = Object.create({}, {\n prop: {\n set: function () { },\n get: function () { },\n configurable: true\n }\n });\n var hasProperty = newObj.hasOwnProperty(\"prop\");\n for (var p in newObj) {\n if (p === \"prop\") {\n isEnumerable = true;\n }\n }\n return hasProperty && !isEnumerable;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create))"
+ },
+ {
+ "id": "15.2.3.5-4-313",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-313.js",
+ "description": "Object.create - [[Configurable]] is set as false if it is absent in accessor descriptor of one property in 'Properties' (8.12.9 step 4.b)",
+ "test": "assertTrue((function testcase() { \n var newObj = Object.create({}, {\n prop: {\n set: function () { },\n get: function () { },\n enumerable: true\n }\n });\n var hasProperty = newObj.hasOwnProperty(\"prop\");\n delete newObj.prop;\n var isNotConfigurable = newObj.hasOwnProperty(\"prop\");\n return hasProperty && isNotConfigurable;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create))"
+ },
+ {
+ "id": "15.2.3.5-4-314",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-314.js",
+ "description": "Object.create - some enumerable own property in 'Properties' is empty object (15.2.3.7 step 7)",
+ "test": "assertTrue((function testcase() {\n\n var newObj = Object.create({}, {\n foo: {}\n });\n return newObj.hasOwnProperty(\"foo\");\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create))"
+ },
+ {
+ "id": "15.2.3.5-4-315",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-315.js",
+ "description": "Object.create - all properties in 'Properties' are enumerable (data property and accessor property) (15.2.3.7 step 7)",
+ "test": "assertTrue((function testcase() {\n\n var newObj = {};\n function getFunc() {\n return 10;\n }\n function setFunc(value) {\n newObj.setVerifyHelpProp = value;\n }\n\n newObj = Object.create({}, {\n foo1: {\n value: 200,\n enumerable: true,\n writable: true,\n configurable: true\n },\n foo2: {\n get: getFunc,\n set: setFunc,\n enumerable: true,\n configurable: true\n }\n });\n return dataPropertyAttributesAreCorrect(newObj, \"foo1\", 200, true, true, true) &&\n accessorPropertyAttributesAreCorrect(newObj, \"foo2\", getFunc, setFunc, \"setVerifyHelpProp\", true, true);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create))"
+ },
+ {
+ "id": "15.2.3.5-4-316",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-316.js",
+ "description": "Object.create - enumerable properties of 'Properties' are given numerical names (15.2.3.7 step 7)",
+ "test": "assertTrue((function testcase() {\n\n function getFunc() {\n return 20;\n }\n function setFunc() { }\n\n var newObj = Object.create({}, {\n 0: {\n value: 100,\n enumerable: true,\n writable: true,\n configurable: true\n },\n 1: {\n get: getFunc,\n set: setFunc,\n enumerable: true,\n configurable: true\n },\n 2: {\n value: 200,\n enumerable: true,\n writable: true,\n configurable: true\n }\n });\n return newObj[0] === 100 && newObj[1] === 20 && newObj[2] === 200;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create))"
+ },
+ {
+ "id": "15.2.3.5-4-32",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-32.js",
+ "description": "Object.create - 'Properties' is a Number object that uses Object's [[Get]] method to access own enumerable property (15.2.3.7 step 5.a)",
+ "test": "assertTrue((function testcase() {\n\n var props = new Number(-9);\n props.prop = {\n value: 12,\n enumerable: true\n };\n var newObj = Object.create({}, props);\n return newObj.hasOwnProperty(\"prop\");\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create))"
+ },
+ {
+ "id": "15.2.3.5-4-33",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-33.js",
+ "description": "Object.create - 'Properties' is the Math object that uses Object's [[Get]] method to access own enumerable property (15.2.3.7 step 5.a)",
+ "test": "assertTrue((function testcase() {\n\n try {\n Math.prop = {\n value: 12,\n enumerable: true\n };\n var newObj = Object.create({}, Math);\n return newObj.hasOwnProperty(\"prop\");\n } finally {\n delete Math.prop;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create))"
+ },
+ {
+ "id": "15.2.3.5-4-34",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-34.js",
+ "description": "Object.create - 'Properties' is a Date object that uses Object's [[Get]] method to access own enumerable property (15.2.3.7 step 5.a)",
+ "test": "assertTrue((function testcase() {\n\n var props = new Date();\n props.prop = {\n value: 12,\n enumerable: true\n };\n var newObj = Object.create({}, props);\n return newObj.hasOwnProperty(\"prop\");\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create))"
+ },
+ {
+ "id": "15.2.3.5-4-35",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-35.js",
+ "description": "Object.create - 'Properties' is a RegExp object that uses Object's [[Get]] method to access own enumerable property (15.2.3.7 step 5.a)",
+ "test": "assertTrue((function testcase() {\n\n var props = new RegExp();\n props.prop = {\n value: 12,\n enumerable: true\n };\n var newObj = Object.create({}, props);\n return newObj.hasOwnProperty(\"prop\");\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create))"
+ },
+ {
+ "id": "15.2.3.5-4-36",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-36.js",
+ "description": "Object.create - 'Properties' is the JSON object that uses Object's [[Get]] method to access own enumerable property (15.2.3.7 step 5.a)",
+ "test": "assertTrue((function testcase() {\n\n try {\n JSON.prop = {\n value: 12,\n enumerable: true\n };\n var newObj = Object.create({}, JSON);\n return newObj.hasOwnProperty(\"prop\");\n } finally {\n delete JSON.prop;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create))"
+ },
+ {
+ "id": "15.2.3.5-4-37",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-37.js",
+ "description": "Object.create - 'Properties' is an Error object that uses Object's [[Get]] method to access own enumerable property (15.2.3.7 step 5.a)",
+ "test": "assertTrue((function testcase() {\n\n var props = new Error(\"test\");\n\n (Object.getOwnPropertyNames(props)).forEach(function(name){\n props[name] = {value:11, configurable:true}\n });\n\n props.prop15_2_3_5_4_37 = {\n value: 12,\n enumerable: true\n };\n var newObj = Object.create({}, props);\n return newObj.hasOwnProperty(\"prop15_2_3_5_4_37\");\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create) && fnExists(Array.prototype.forEach) && fnExists(Object.getOwnPropertyNames))"
+ },
+ {
+ "id": "15.2.3.5-4-38",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-38.js",
+ "description": "Object.create - 'Properties' is an Arguments object which implements its own [[Get]] method to access own enumerable property (15.2.3.7 step 5.a)",
+ "test": "assertTrue((function testcase() {\n\n var argObj = (function () { return arguments; })();\n\n argObj.prop = {\n value: 12,\n enumerable: true\n };\n\n var newObj = Object.create({}, argObj);\n\n return newObj.hasOwnProperty(\"prop\");\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create))"
+ },
+ {
+ "id": "15.2.3.5-4-39",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-39.js",
+ "description": "Object.create - ensure that side-effects of gets occur in the same order as they would for: for (P in props) props[P] (15.2.3.7 step 5.a)",
+ "test": "assertTrue((function testcase() {\n\n var props = {};\n props.prop1 = { value: 12, enumerable: true };\n props.prop2 = { value: true, enumerable: true };\n\n var tempArray = [];\n for (var p in props) {\n if (props.hasOwnProperty(p)) {\n tempArray.push(p);\n }\n }\n\n var newObj = Object.create({}, props);\n var index = 0;\n for (var q in newObj) {\n if (tempArray[index++] !== q && newObj.hasOwnProperty(q)) {\n return false;\n }\n }\n return true; \n }).call(this));\n",
+ "precondition": "(fnExists(Object.create))"
+ },
+ {
+ "id": "15.2.3.5-4-4",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-4.js",
+ "description": "Object.create - argument 'Properties' is an object (15.2.3.7 step 2).",
+ "test": "assertTrue((function testcase() {\n\n var props = {};\n var result = false;\n\n Object.defineProperty(props, \"prop\", {\n get: function () {\n result = this instanceof Object;\n return {};\n },\n enumerable: true\n });\n Object.create({}, props);\n return result;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.5-4-40",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-40.js",
+ "description": "Object.create - ensure that if an exception is thrown it occurs in the correct order relative to prior and subsequent side-effects (15.2.3.7 step 5.a)",
+ "test": "assertTrue((function testcase() {\n\n var newObj = {};\n var props = {};\n var i = 0;\n\n Object.defineProperty(props, \"prop1\", {\n get: function () {\n i++;\n return {};\n },\n enumerable: true\n });\n\n Object.defineProperty(props, \"prop2\", {\n get: function () {\n if (1 === i++) {\n throw new RangeError();\n } else {\n return {};\n }\n },\n enumerable: true\n });\n\n try {\n newObj = Object.create({}, props);\n return false;\n } catch (e) {\n return (e instanceof RangeError) && !newObj.hasOwnProperty(\"prop1\") && i === 2;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.5-4-41",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-41.js",
+ "description": "Object.create - value of one property in 'Properties' is undefined (8.10.5 step 1)",
+ "test": "assertTrue((function testcase() {\n\n try {\n Object.create({}, {\n prop: undefined \n });\n return false;\n } catch (e) {\n return (e instanceof TypeError);\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create))"
+ },
+ {
+ "id": "15.2.3.5-4-42",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-42.js",
+ "description": "Object.create - value of one property in 'Properties' is null (8.10.5 step 1)",
+ "test": "assertTrue((function testcase() {\n\n try {\n Object.create({}, {\n prop: null \n });\n return false;\n } catch (e) {\n return (e instanceof TypeError);\n }\n\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create))"
+ },
+ {
+ "id": "15.2.3.5-4-43",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-43.js",
+ "description": "Object.create - value of one property in 'Properties' is false (8.10.5 step 1)",
+ "test": "assertTrue((function testcase() {\n\n try {\n Object.create({}, {\n prop: false \n });\n return false;\n } catch (e) {\n return (e instanceof TypeError);\n }\n\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create))"
+ },
+ {
+ "id": "15.2.3.5-4-44",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-44.js",
+ "description": "Object.create - value of one property in 'Properties' is a number primitive (8.10.5 step 1)",
+ "test": "assertTrue((function testcase() {\n\n try {\n Object.create({}, {\n prop: 12 \n });\n return false;\n } catch (e) {\n return (e instanceof TypeError);\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create))"
+ },
+ {
+ "id": "15.2.3.5-4-45",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-45.js",
+ "description": "Object.create - value of one property in 'Properties' is a string (8.10.5 step 1)",
+ "test": "assertTrue((function testcase() {\n\n try {\n Object.create({}, {\n prop: \"abc\" \n });\n return false;\n } catch (e) {\n return (e instanceof TypeError);\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create))"
+ },
+ {
+ "id": "15.2.3.5-4-46",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-46.js",
+ "description": "Object.create - 'enumerable' property of one property in 'Properties' is true (8.10.5 step 3)",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n var newObj = Object.create({}, {\n prop: {\n enumerable: true\n }\n });\n for (var property in newObj) {\n if (property === \"prop\") {\n accessed = true;\n }\n }\n return accessed;\n\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create))"
+ },
+ {
+ "id": "15.2.3.5-4-47",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-47.js",
+ "description": "Object.create - 'enumerable' property of one property in 'Properties' is not present (8.10.5 step 3)",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n\n var newObj = Object.create({}, {\n prop: {} \n });\n for (var property in newObj) {\n if (property === \"prop\") {\n accessed = true;\n }\n }\n return !accessed;\n\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create))"
+ },
+ {
+ "id": "15.2.3.5-4-48",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-48.js",
+ "description": "Object.create - 'enumerable' property of one property in 'Properties' is own data property (8.10.5 step 3.a)",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n\n var newObj = Object.create({}, {\n prop: {\n enumerable: true\n } \n });\n\n for (var property in newObj) {\n if (property === \"prop\") {\n accessed = true;\n }\n }\n return accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create))"
+ },
+ {
+ "id": "15.2.3.5-4-49",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-49.js",
+ "description": "Object.create - 'enumerable' property of one property in 'Properties' is an inherited data property (8.10.5 step 3.a)",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n\n var proto = {\n enumerable: true\n };\n var ConstructFun = function () { };\n ConstructFun.prototype = proto;\n var descObj = new ConstructFun();\n\n var newObj = Object.create({}, {\n prop: descObj \n });\n\n for (var property in newObj) {\n if (property === \"prop\") {\n accessed = true;\n }\n }\n return accessed;\n\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create))"
+ },
+ {
+ "id": "15.2.3.5-4-5",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-5.js",
+ "description": "Object.create - argument 'Properties' is a Function object (15.2.3.7 step 2)",
+ "test": "assertTrue((function testcase() {\n\n var props = function () { };\n var result = false;\n\n Object.defineProperty(props, \"prop\", {\n get: function () {\n result = this instanceof Function;\n return {};\n },\n enumerable: true\n });\n Object.create({}, props);\n return result;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.5-4-50",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-50.js",
+ "description": "Object.create - 'enumerable' property of one property in 'Properties' is own data property that overrides an inherited data property (8.10.5 step 3.a)",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n var proto = {\n enumerable: true\n };\n\n var ConstructFun = function () { };\n ConstructFun.prototype = proto;\n var descObj = new ConstructFun();\n\n Object.defineProperty(descObj, \"enumerable\", {\n value: false\n });\n\n var newObj = Object.create({}, {\n prop: descObj \n });\n\n for (var property in newObj) {\n if (property === \"prop\") {\n accessed = true;\n }\n }\n return !accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.5-4-51",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-51.js",
+ "description": "Object.create - 'enumerable' property of one property in 'Properties' is own data property that overrides an inherited accessor property (8.10.5 step 3.a)",
+ "test": "assertTrue((function testcase() {\n\n var proto = {};\n var accessed = false;\n\n Object.defineProperty(proto, \"enumerable\", {\n get: function () {\n return true;\n }\n });\n\n var ConstructFun = function () { };\n ConstructFun.prototype = proto;\n var descObj = new ConstructFun();\n\n Object.defineProperty(descObj, \"enumerable\", {\n value: false\n });\n\n var newObj = Object.create({}, {\n prop: descObj \n });\n\n for (var property in newObj) {\n if (property === \"prop\") {\n accessed = true;\n }\n }\n return !accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.5-4-52",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-52.js",
+ "description": "Object.create - 'enumerable' property of one property in 'Properties' is own accessor property (8.10.5 step 3.a)",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n\n var descObj = {};\n Object.defineProperty(descObj, \"enumerable\", {\n get: function () {\n return true;\n }\n });\n\n var newObj = Object.create({}, {\n prop: descObj\n });\n\n for (var property in newObj) {\n if (property === \"prop\") {\n accessed = true;\n }\n }\n return accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.5-4-53",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-53.js",
+ "description": "Object.create - 'enumerable' property of one property in 'Properties' is an inherited accessor property (8.10.5 step 3.a)",
+ "test": "assertTrue((function testcase() {\n\n var proto = {};\n var accessed = false;\n\n Object.defineProperty(proto, \"enumerable\", {\n get: function () {\n return true;\n }\n });\n\n var ConstructFun = function () { };\n ConstructFun.prototype = proto;\n var descObj = new ConstructFun();\n\n var newObj = Object.create({}, {\n prop: descObj\n });\n\n for (var property in newObj) {\n if (property === \"prop\") {\n accessed = true;\n }\n }\n return accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.5-4-54",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-54.js",
+ "description": "Object.create - 'enumerable' property of one property in 'Properties' is own accessor property that overrides an inherited data property (8.10.5 step 3.a)",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n var proto = {\n enumerable: true\n };\n\n var ConstructFun = function () { };\n ConstructFun.prototype = proto;\n var descObj = new ConstructFun();\n\n Object.defineProperty(descObj, \"enumerable\", {\n get: function () {\n return false;\n }\n });\n\n var newObj = Object.create({}, {\n prop: descObj\n });\n for (var property in newObj) {\n if (property === \"prop\") {\n accessed = true;\n }\n }\n return !accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.5-4-55",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-55.js",
+ "description": "Object.create - 'enumerable' property of one property in 'Properties' is own accessor property that overrides an inherited accessor property (8.10.5 step 3.a)",
+ "test": "assertTrue((function testcase() {\n\n var proto = {};\n var accessed = false;\n Object.defineProperty(proto, \"enumerable\", {\n get: function () {\n return true;\n }\n });\n\n var ConstructFun = function () { };\n ConstructFun.prototype = proto;\n var descObj = new ConstructFun();\n\n Object.defineProperty(descObj, \"enumerable\", {\n get: function () {\n return false;\n }\n });\n\n var newObj = Object.create({}, {\n prop: descObj \n });\n for (var property in newObj) {\n if (property === \"prop\") {\n accessed = true;\n }\n }\n return !accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.5-4-56",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-56.js",
+ "description": "Object.create - 'enumerable' property of one property in 'Properties' is own accessor property without a get function (8.10.5 step 3.a)",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n var descObj = {};\n Object.defineProperty(descObj, \"enumerable\", {\n set: function () { }\n });\n\n var newObj = Object.create({}, {\n prop: descObj \n });\n for (var property in newObj) {\n if (property === \"prop\") {\n accessed = true;\n }\n }\n return !accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.5-4-57",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-57.js",
+ "description": "Object.create - 'enumerable' property of one property in 'Properties' is own accessor property without a get function, which overrides an inherited accessor property (8.10.5 step 3.a)",
+ "test": "assertTrue((function testcase() {\n\n var proto = {};\n var accessed = false;\n Object.defineProperty(proto, \"enumerable\", {\n get: function () {\n return true;\n }\n });\n\n var ConstructFun = function () { };\n ConstructFun.prototype = proto;\n var descObj = new ConstructFun();\n\n Object.defineProperty(descObj, \"enumerable\", {\n set: function () { }\n });\n\n var newObj = Object.create({}, {\n prop: descObj \n });\n for (var property in newObj) {\n if (property === \"prop\") {\n accessed = true;\n }\n }\n return !accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.5-4-58",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-58.js",
+ "description": "Object.create - 'enumerable' property of one property in 'Properties' is an inherited accessor property without a get function (8.10.5 step 3.a)",
+ "test": "assertTrue((function testcase() {\n\n\n var proto = {};\n var accessed = false;\n\n Object.defineProperty(proto, \"enumerable\", {\n set: function () { }\n });\n\n var ConstructFun = function () { };\n ConstructFun.prototype = proto;\n var descObj = new ConstructFun();\n\n var newObj = Object.create({}, {\n prop: descObj \n });\n for (var property in newObj) {\n if (property === \"prop\") {\n accessed = true;\n }\n }\n return !accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.5-4-59",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-59.js",
+ "description": "Object.create - one property in 'Properties' is a Function object which implements its own [[Get]] method to access the 'enumerable' property (8.10.5 step 3.a)",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n var descObj = function () { };\n\n descObj.enumerable = true;\n\n var newObj = Object.create({}, {\n prop: descObj \n });\n for (var property in newObj) {\n if (property === \"prop\") {\n accessed = true;\n }\n }\n return accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create))"
+ },
+ {
+ "id": "15.2.3.5-4-6",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-6.js",
+ "description": "Object.create - argument 'Properties' is an Array object (15.2.3.7 step 2).",
+ "test": "assertTrue((function testcase() {\n\n var props = [];\n var result = false;\n\n Object.defineProperty(props, \"prop\", {\n get: function () {\n result = this instanceof Array;\n return {};\n },\n enumerable: true\n });\n Object.create({}, props);\n return result;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.5-4-60",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-60.js",
+ "description": "Object.create - one property in 'Properties' is an Array object that uses Object's [[Get]] method to access the 'enumerable' property (8.10.5 step 3.a)",
+ "test": "assertTrue((function testcase() {\n\n\n var accessed = false;\n var descObj = [];\n\n descObj.enumerable = true;\n\n var newObj = Object.create({}, {\n prop: descObj \n });\n for (var property in newObj) {\n if (property === \"prop\") {\n accessed = true;\n }\n }\n return accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create))"
+ },
+ {
+ "id": "15.2.3.5-4-61",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-61.js",
+ "description": "Object.create - one property in 'Properties' is a String object that uses Object's [[Get]] method to access the 'enumerable' property (8.10.5 step 3.a)",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n var descObj = new String();\n\n descObj.enumerable = true;\n\n var newObj = Object.create({}, {\n prop: descObj \n });\n for (var property in newObj) {\n if (property === \"prop\") {\n accessed = true;\n }\n }\n return accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create))"
+ },
+ {
+ "id": "15.2.3.5-4-62",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-62.js",
+ "description": "Object.create - one property in 'Properties' is a Boolean object that uses Object's [[Get]] method to access the 'enumerable' property (8.10.5 step 3.a)",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n var descObj = new Boolean(false);\n\n descObj.enumerable = true;\n\n var newObj = Object.create({}, {\n prop: descObj \n });\n for (var property in newObj) {\n if (property === \"prop\") {\n accessed = true;\n }\n }\n return accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create))"
+ },
+ {
+ "id": "15.2.3.5-4-63",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-63.js",
+ "description": "Object.create - one property in 'Properties' is a Number object that uses Object's [[Get]] method to access the 'enumerable' property (8.10.5 step 3.a)",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n var descObj = new Number(-9);\n\n descObj.enumerable = true;\n\n var newObj = Object.create({}, {\n prop: descObj \n });\n for (var property in newObj) {\n if (property === \"prop\") {\n accessed = true;\n }\n }\n return accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create))"
+ },
+ {
+ "id": "15.2.3.5-4-64",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-64.js",
+ "description": "Object.create - one property in 'Properties' is the Math object that uses Object's [[Get]] method to access the 'enumerable' property (8.10.5 step 3.a)",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n\n try {\n Math.enumerable = true;\n\n var newObj = Object.create({}, {\n prop: Math \n });\n for (var property in newObj) {\n if (property === \"prop\") {\n accessed = true;\n }\n }\n return accessed;\n } finally {\n delete Math.enumerable;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create))"
+ },
+ {
+ "id": "15.2.3.5-4-65",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-65.js",
+ "description": "Object.create - one property in 'Properties' is a Date object that uses Object's [[Get]] method to access the 'enumerable' property (8.10.5 step 3.a)",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n var descObj = new Date();\n\n descObj.enumerable = true;\n\n var newObj = Object.create({}, {\n prop: descObj \n });\n for (var property in newObj) {\n if (property === \"prop\") {\n accessed = true;\n }\n }\n return accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create))"
+ },
+ {
+ "id": "15.2.3.5-4-66",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-66.js",
+ "description": "Object.create - one property in 'Properties' is a RegExp object that uses Object's [[Get]] method to access the 'enumerable' property (8.10.5 step 3.a)",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n var descObj = new RegExp();\n\n descObj.enumerable = true;\n\n var newObj = Object.create({}, {\n prop: descObj\n });\n for (var property in newObj) {\n if (property === \"prop\") {\n accessed = true;\n }\n }\n return accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create))"
+ },
+ {
+ "id": "15.2.3.5-4-67",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-67.js",
+ "description": "Object.create - one property in 'Properties' is the JSON object that uses Object's [[Get]] method to access the 'enumerable' property (8.10.5 step 3.a)",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n\n try {\n JSON.enumerable = true;\n\n var newObj = Object.create({}, {\n prop: JSON\n });\n for (var property in newObj) {\n if (property === \"prop\") {\n accessed = true;\n }\n }\n return accessed;\n } finally {\n delete JSON.enumerable;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create))"
+ },
+ {
+ "id": "15.2.3.5-4-68",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-68.js",
+ "description": "Object.create - one property in 'Properties' is an Error object that uses Object's [[Get]] method to access the 'enumerable' property (8.10.5 step 3.a)",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n var descObj = new Error();\n\n descObj.enumerable = true;\n\n var newObj = Object.create({}, {\n prop: descObj\n });\n for (var property in newObj) {\n if (property === \"prop\") {\n accessed = true;\n }\n }\n return accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create))"
+ },
+ {
+ "id": "15.2.3.5-4-69",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-69.js",
+ "description": "Object.create - one property in 'Properties' is an Arguments object which implements its own [[Get]] method to access the 'enumerable' property (8.10.5 step 3.a)",
+ "test": "assertTrue((function testcase() {\n \n var accessed = false;\n var argObj = (function () { return arguments; })();\n\n argObj.enumerable = true;\n\n var newObj = Object.create({}, {\n prop: argObj\n });\n for (var property in newObj) {\n if (property === \"prop\") {\n accessed = true;\n }\n }\n return accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create))"
+ },
+ {
+ "id": "15.2.3.5-4-7",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-7.js",
+ "description": "Object.create - argument 'Properties' is a String object (15.2.3.7 step 2)",
+ "test": "assertTrue((function testcase() {\n\n var props = new String();\n var result = false;\n\n Object.defineProperty(props, \"prop\", {\n get: function () {\n result = this instanceof String;\n return {};\n },\n enumerable: true\n });\n Object.create({}, props);\n return result;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.5-4-71",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-71.js",
+ "description": "Object.create - one property in 'Properties' is the global object that uses Object's [[Get]] method to access the 'enumerable' property (8.10.5 step 3.a)",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n\n try {\n fnGlobalObject().enumerable = true;\n\n var newObj = Object.create({}, {\n prop: fnGlobalObject()\n });\n for (var property in newObj) {\n if (property === \"prop\") {\n accessed = true;\n }\n }\n return accessed;\n } finally {\n delete fnGlobalObject().enumerable;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create))"
+ },
+ {
+ "id": "15.2.3.5-4-72",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-72.js",
+ "description": "Object.create - 'enumerable' property of one property in 'Properties' is undefined (8.10.5 step 3.b)",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n\n var newObj = Object.create({}, {\n prop: {\n enumerable: undefined\n }\n });\n for (var property in newObj) {\n if (property === \"prop\") {\n accessed = true;\n }\n }\n return !accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create))"
+ },
+ {
+ "id": "15.2.3.5-4-73",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-73.js",
+ "description": "Object.create - value of 'enumerable' property of one property in 'Properties' is null (8.10.5 step 3.b)",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n\n var newObj = Object.create({}, {\n prop: {\n enumerable: null\n }\n });\n for (var property in newObj) {\n if (property === \"prop\") {\n accessed = true;\n }\n }\n return !accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create))"
+ },
+ {
+ "id": "15.2.3.5-4-74",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-74.js",
+ "description": "Object.create - 'enumerable' property of one property in 'Properties' is true (8.10.5 step 3.b)",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n\n var newObj = Object.create({}, {\n prop: {\n enumerable: true\n } \n });\n for (var property in newObj) {\n if (property === \"prop\") {\n accessed = true;\n }\n }\n return accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create))"
+ },
+ {
+ "id": "15.2.3.5-4-75",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-75.js",
+ "description": "Object.create - 'enumerable' property of one property in 'Properties' is false (8.10.5 step 3.b)",
+ "test": "assertTrue((function testcase() {\n\n\n var accessed = false;\n var descObj = {\n enumerable: false\n };\n\n var newObj = Object.create({}, {\n prop: descObj\n });\n for (var property in newObj) {\n if (property === \"prop\") {\n accessed = true;\n }\n }\n return !accessed && newObj.hasOwnProperty(\"prop\");\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create))"
+ },
+ {
+ "id": "15.2.3.5-4-76",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-76.js",
+ "description": "Object.create - 'enumerable' property of one property in 'Properties' is 0 (8.10.5 step 3.b)",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n\n var newObj = Object.create({}, {\n prop: {\n enumerable: 0\n }\n });\n for (var property in newObj) {\n if (property === \"prop\") {\n accessed = true;\n }\n }\n return !accessed && newObj.hasOwnProperty(\"prop\");\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create))"
+ },
+ {
+ "id": "15.2.3.5-4-77",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-77.js",
+ "description": "Object.create - 'enumerable' property of one property in 'Properties' is +0 (8.10.5 step 3.b)",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n\n var newObj = Object.create({}, {\n prop: {\n enumerable: +0\n }\n });\n for (var property in newObj) {\n if (property === \"prop\") {\n accessed = true;\n }\n }\n return !accessed && newObj.hasOwnProperty(\"prop\");\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create))"
+ },
+ {
+ "id": "15.2.3.5-4-78",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-78.js",
+ "description": "Object.create - 'enumerable' property of one property in 'Properties' is -0 (8.10.5 step 3.b)",
+ "test": "assertTrue((function testcase() {\n \n var accessed = false;\n\n var newObj = Object.create({}, {\n prop: {\n enumerable: -0\n }\n });\n for (var property in newObj) {\n if (property === \"prop\") {\n accessed = true;\n }\n }\n return !accessed && newObj.hasOwnProperty(\"prop\");\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create))"
+ },
+ {
+ "id": "15.2.3.5-4-79",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-79.js",
+ "description": "Object.create - 'enumerable' property of one property in 'Properties' is NaN (8.10.5 step 3.b)",
+ "test": "assertTrue((function testcase() {\n \n var accessed = false;\n\n var newObj = Object.create({}, {\n prop: {\n enumerable: NaN\n }\n });\n for (var property in newObj) {\n if (property === \"prop\") {\n accessed = true;\n }\n }\n return !accessed && newObj.hasOwnProperty(\"prop\");\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create))"
+ },
+ {
+ "id": "15.2.3.5-4-8",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-8.js",
+ "description": "Object.create - argument 'Properties' is a Boolean object whose primitive value is true (15.2.3.7 step 2).",
+ "test": "assertTrue((function testcase() {\n\n var props = new Boolean(true);\n var result = false;\n\n Object.defineProperty(props, \"prop\", {\n get: function () {\n result = this instanceof Boolean;\n return {};\n },\n enumerable: true\n });\n Object.create({}, props);\n return result;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.5-4-80",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-80.js",
+ "description": "Object.create - 'enumerable' property of one property in 'Properties' is a positive number primitive (8.10.5 step 3.b)",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n\n var newObj = Object.create({}, {\n prop: {\n enumerable: 12\n }\n });\n for (var property in newObj) {\n if (property === \"prop\") {\n accessed = true;\n }\n }\n return accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create))"
+ },
+ {
+ "id": "15.2.3.5-4-81",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-81.js",
+ "description": "Object.create - 'enumerable' property of one property in 'Properties' is a negative number primitive (8.10.5 step 3.b)",
+ "test": "assertTrue((function testcase() {\n \n var accessed = false;\n\n var newObj = Object.create({}, {\n prop: {\n enumerable: -9\n }\n });\n for (var property in newObj) {\n if (property === \"prop\") {\n accessed = true;\n }\n }\n return accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create))"
+ },
+ {
+ "id": "15.2.3.5-4-82",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-82.js",
+ "description": "Object.create - 'enumerable' property of one property in 'Properties' is an empty string (8.10.5 step 3.b)",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n\n var newObj = Object.create({}, {\n prop: {\n enumerable: \"\"\n }\n });\n for (var property in newObj) {\n if (property === \"prop\") {\n accessed = true;\n }\n }\n return !accessed && newObj.hasOwnProperty(\"prop\");\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create))"
+ },
+ {
+ "id": "15.2.3.5-4-83",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-83.js",
+ "description": "Object.create - 'enumerable' property of one property in 'Properties' is a non-empty string (8.10.5 step 3.b)",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n\n var newObj = Object.create({}, {\n prop: {\n enumerable: \"AB\\n\\\\cd\"\n }\n });\n for (var property in newObj) {\n if (property === \"prop\") {\n accessed = true;\n }\n }\n return accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create))"
+ },
+ {
+ "id": "15.2.3.5-4-84",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-84.js",
+ "description": "Object.create - 'enumerable' property of one property in 'Properties' is a Function object (8.10.5 step 3.b)",
+ "test": "assertTrue((function testcase() {\n \n var accessed = false;\n\n var newObj = Object.create({}, {\n prop: {\n enumerable: function () { }\n }\n });\n for (var property in newObj) {\n if (property === \"prop\") {\n accessed = true;\n }\n }\n return accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create))"
+ },
+ {
+ "id": "15.2.3.5-4-85",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-85.js",
+ "description": "Object.create - 'enumerable' property of one property in 'Properties' is an Array object (8.10.5 step 3.b)",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n\n var newObj = Object.create({}, {\n prop: {\n enumerable: []\n }\n });\n\n for (var property in newObj) {\n if (property === \"prop\") {\n accessed = true;\n }\n }\n return accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create))"
+ },
+ {
+ "id": "15.2.3.5-4-86",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-86.js",
+ "description": "Object.create - 'enumerable' property of one property in 'Properties' is a String object (8.10.5 step 3.b)",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n\n var newObj = Object.create({}, {\n prop: {\n enumerable: new String()\n }\n });\n for (var property in newObj) {\n if (property === \"prop\") {\n accessed = true;\n }\n }\n return accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create))"
+ },
+ {
+ "id": "15.2.3.5-4-87",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-87.js",
+ "description": "Object.create - 'enumerable' property of one property in 'Properties' is a Boolean object (8.10.5 step 3.b)",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n\n var newObj = Object.create({}, {\n prop: {\n enumerable: new Boolean(true)\n }\n });\n for (var property in newObj) {\n if (property === \"prop\") {\n accessed = true;\n }\n }\n return accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create))"
+ },
+ {
+ "id": "15.2.3.5-4-88",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-88.js",
+ "description": "Object.create - 'enumerable' property of one property in 'Properties' is a Number object (8.10.5 step 3.b)",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n\n var newObj = Object.create({}, {\n prop: {\n enumerable: new Number(-9)\n }\n });\n for (var property in newObj) {\n if (property === \"prop\") {\n accessed = true;\n }\n }\n return accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create))"
+ },
+ {
+ "id": "15.2.3.5-4-89",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-89.js",
+ "description": "Object.create - 'enumerable' property of one property in 'Properties' is the Math object (8.10.5 step 3.b)",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n\n var newObj = Object.create({}, {\n prop: {\n enumerable: Math\n }\n });\n for (var property in newObj) {\n if (property === \"prop\") {\n accessed = true;\n }\n }\n return accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create))"
+ },
+ {
+ "id": "15.2.3.5-4-9",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-9.js",
+ "description": "Object.create - argument 'Properties' is a Number object whose primitive value is any interesting number (15.2.3.7 step 2).",
+ "test": "assertTrue((function testcase() {\n\n var props = new Number(12);\n var result = false;\n\n Object.defineProperty(props, \"prop\", {\n get: function () {\n result = this instanceof Number;\n return {};\n },\n enumerable: true\n });\n Object.create({}, props);\n return result;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.5-4-90",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-90.js",
+ "description": "Object.create - 'enumerable' property of one property in 'Properties' is a Date object (8.10.5 step 3.b)",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n\n var newObj = Object.create({}, {\n prop: {\n enumerable: new Date()\n }\n });\n for (var property in newObj) {\n if (property === \"prop\") {\n accessed = true;\n }\n }\n return accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create))"
+ },
+ {
+ "id": "15.2.3.5-4-91",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-91.js",
+ "description": "Object.create - 'enumerable' property of one property in 'Properties' is a RegExp object (8.10.5 step 3.b)",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n\n var newObj = Object.create({}, {\n prop: {\n enumerable: new RegExp()\n }\n });\n for (var property in newObj) {\n if (property === \"prop\") {\n accessed = true;\n }\n }\n return accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create))"
+ },
+ {
+ "id": "15.2.3.5-4-92",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-92.js",
+ "description": "Object.create - 'enumerable' property of one property in 'Properties' is the JSON object (8.10.5 step 3.b)",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n\n var newObj = Object.create({}, {\n prop: {\n enumerable: JSON\n }\n });\n for (var property in newObj) {\n if (property === \"prop\") {\n accessed = true;\n }\n }\n return accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create))"
+ },
+ {
+ "id": "15.2.3.5-4-93",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-93.js",
+ "description": "Object.create - 'enumerable' property of one property in 'Properties' is an Error object (8.10.5 step 3.b)",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n\n var newObj = Object.create({}, {\n prop: {\n enumerable: new Error()\n }\n });\n for (var property in newObj) {\n if (property === \"prop\") {\n accessed = true;\n }\n }\n return accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create))"
+ },
+ {
+ "id": "15.2.3.5-4-94",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-94.js",
+ "description": "Object.create - 'enumerable' property of one property in 'Properties' is an Arguments object (8.10.5 step 3.b)",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n var argObj = (function () { return arguments; })();\n\n var newObj = Object.create({}, {\n prop: {\n enumerable: argObj\n }\n });\n for (var property in newObj) {\n if (property === \"prop\") {\n accessed = true;\n }\n }\n return accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create))"
+ },
+ {
+ "id": "15.2.3.5-4-96",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-96.js",
+ "description": "Object.create - 'enumerable' property of one property in 'Properties' is the global object (8.10.5 step 3.b)",
+ "test": "assertTrue((function testcase() {\n \n var accessed = false;\n\n var newObj = Object.create({}, {\n prop: {\n enumerable: fnGlobalObject()\n }\n });\n for (var property in newObj) {\n if (property === \"prop\") {\n accessed = true;\n }\n }\n return accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create))"
+ },
+ {
+ "id": "15.2.3.5-4-97",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-97.js",
+ "description": "Object.create - 'enumerable' property of one property in 'Properties' is a string (value is 'false'), which is treated as the value true (8.10.5 step 3.b)",
+ "test": "assertTrue((function testcase() {\n \n var accessed = false;\n\n var newObj = Object.create({}, {\n prop: {\n enumerable: \"false\"\n }\n });\n for (var property in newObj) {\n if (property === \"prop\") {\n accessed = true;\n }\n }\n return accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create))"
+ },
+ {
+ "id": "15.2.3.5-4-98",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-98.js",
+ "description": "Object.create - 'enumerable' property of one property in 'Properties' is new Boolean(false), which is treated as the value true (8.10.5 step 3.b)",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n\n var newObj = Object.create({}, {\n prop: {\n enumerable: new Boolean(false)\n }\n });\n for (var property in newObj) {\n if (property === \"prop\") {\n accessed = true;\n }\n }\n return accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create))"
+ },
+ {
+ "id": "15.2.3.5-4-99",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.5/15.2.3.5-4-99.js",
+ "description": "Object.create - 'configurable' property of one property in 'Properties' is true (8.10.5 step 4)",
+ "test": "assertTrue((function testcase() {\n\n var newObj = Object.create({}, {\n prop: {\n configurable: true\n }\n });\n\n var result1 = newObj.hasOwnProperty(\"prop\");\n delete newObj.prop;\n var result2 = newObj.hasOwnProperty(\"prop\");\n\n return result1 === true && result2 === false;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.create))"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.2.3.6.json b/website/resources/scripts/testcases2/15.2.3.6.json
new file mode 100644
index 000000000..e37c3d332
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.2.3.6.json
@@ -0,0 +1,7805 @@
+{
+ "testCollection": {
+ "name": "15.2.3.6",
+ "numTests": 1114,
+ "tests": [
+ {
+ "id": "15.2.3.6-0-1",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-0-1.js",
+ "description": "Object.defineProperty must exist as a function",
+ "test": "assertTrue((function testcase() {\n var f = Object.defineProperty;\n if (typeof(f) === \"function\") {\n return true;\n }\n }).call(this));\n"
+ },
+ {
+ "id": "15.2.3.6-0-2",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-0-2.js",
+ "description": "Object.defineProperty must exist as a function taking 3 parameters",
+ "test": "assertTrue((Object.defineProperty.length === 3));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-1-1",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-1-1.js",
+ "description": "Object.defineProperty applied to undefined throws a TypeError",
+ "test": "assertTrue((function testcase() {\n try {\n Object.defineProperty(undefined, \"foo\", {});\n return false;\n } catch (e) {\n return e instanceof TypeError;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-1-2",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-1-2.js",
+ "description": "Object.defineProperty applied to null throws a TypeError",
+ "test": "assertTrue((function testcase() {\n try {\n Object.defineProperty(null, \"foo\", {});\n return false;\n } catch (e) {\n return e instanceof TypeError;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-1-3",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-1-3.js",
+ "description": "Object.defineProperty applied to number primitive throws a TypeError",
+ "test": "assertTrue((function testcase() {\n try {\n Object.defineProperty(5, \"foo\", {});\n return false;\n } catch (e) {\n return e instanceof TypeError;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-1-4",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-1-4.js",
+ "description": "Object.defineProperty applied to string primitive throws a TypeError",
+ "test": "assertTrue((function testcase() {\n try {\n Object.defineProperty(\"hello\\nworld\\\\!\", \"foo\", {});\n return false;\n } catch (e) {\n return e instanceof TypeError;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-1",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-1.js",
+ "description": "Object.defineProperty throws TypeError if type of first param is not Object",
+ "test": "assertTrue((function testcase() {\n try {\n Object.defineProperty(true, \"foo\", {});\n }\n catch (e) {\n if (e instanceof TypeError) {\n return true;\n }\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-2-1",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-1.js",
+ "description": "Object.defineProperty - argument 'P' is undefined that converts to string 'undefined'",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n Object.defineProperty(obj, undefined, {});\n\n return obj.hasOwnProperty(\"undefined\");\n\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-2-10",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-10.js",
+ "description": "Object.defineProperty - argument 'P' is a number that converts to a string (value is a negative number)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n Object.defineProperty(obj, -20, {});\n\n return obj.hasOwnProperty(\"-20\");\n\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-2-11",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-11.js",
+ "description": "Object.defineProperty - argument 'P' is a number that converts to a string (value is Infinity)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n Object.defineProperty(obj, Infinity, {});\n\n return obj.hasOwnProperty(\"Infinity\");\n\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-2-12",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-12.js",
+ "description": "Object.defineProperty - argument 'P' is a number that converts to a string (value is +Infinity)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n Object.defineProperty(obj, +Infinity, {});\n\n return obj.hasOwnProperty(\"Infinity\");\n\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-2-13",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-13.js",
+ "description": "Object.defineProperty - argument 'P' is a number that converts to a string (value is -Infinity)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n Object.defineProperty(obj, -Infinity, {});\n\n return obj.hasOwnProperty(\"-Infinity\");\n\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-2-14",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-14.js",
+ "description": "Object.defineProperty - argument 'P' is a number that converts to a string (value is 1(following 20 zeros))",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n Object.defineProperty(obj, 100000000000000000000, {});\n\n return obj.hasOwnProperty(\"100000000000000000000\");\n\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-2-15",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-15.js",
+ "description": "Object.defineProperty - argument 'P' is a number that converts to a string (value is 1(following 21 zeros))",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n Object.defineProperty(obj, 1000000000000000000000, {});\n\n return obj.hasOwnProperty(\"1e+21\");\n\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-2-16",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-16.js",
+ "description": "Object.defineProperty - argument 'P' is a number that converts to a string (value is 1(following 22 zeros))",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n Object.defineProperty(obj, 10000000000000000000000, {});\n\n return obj.hasOwnProperty(\"1e+22\");\n\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-2-17-1",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-17-1.js",
+ "description": "Object.defineProperty - argument 'P' is a number that converts to a string (value is 1(trailing 5 zeros))",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n Object.defineProperty(obj, 000001, {});\n\n return obj.hasOwnProperty(\"1\");\n\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-2-17",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-17.js",
+ "description": "Object.defineProperty - argument 'P' is a number that converts to a string (value is 1e+20)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n Object.defineProperty(obj, 1e+20, {});\n\n return obj.hasOwnProperty(\"100000000000000000000\");\n\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-2-18",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-18.js",
+ "description": "Object.defineProperty - argument 'P' is a number that converts to string (value is 1e+21)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n Object.defineProperty(obj, 1e+21, {});\n\n return obj.hasOwnProperty(\"1e+21\");\n\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-2-19",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-19.js",
+ "description": "Object.defineProperty - argument 'P' is a number that converts to string (value is 1e+22)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n Object.defineProperty(obj, 1e+22, {});\n\n return obj.hasOwnProperty(\"1e+22\");\n\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-2-2",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-2.js",
+ "description": "Object.defineProperty - argument 'P' is null that converts to string 'null'",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n Object.defineProperty(obj, null, {});\n\n return obj.hasOwnProperty(\"null\");\n\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-2-20",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-20.js",
+ "description": "Object.defineProperty - argument 'P' is a number that converts to a string (value is 0.000001)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n Object.defineProperty(obj, 0.000001, {});\n\n return obj.hasOwnProperty(\"0.000001\");\n\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-2-21",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-21.js",
+ "description": "Object.defineProperty - argument 'P' is a number that converts to a string (value is 0.0000001)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n Object.defineProperty(obj, 0.0000001, {});\n\n return obj.hasOwnProperty(\"1e-7\");\n\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-2-22",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-22.js",
+ "description": "Object.defineProperty - argument 'P' is a number that converts to a string (value is 0.00000001)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n Object.defineProperty(obj, 0.00000001, {});\n\n return obj.hasOwnProperty(\"1e-8\");\n\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-2-23",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-23.js",
+ "description": "Object.defineProperty - argument 'P' is a number that converts to a string (value is 1e-7)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n Object.defineProperty(obj, 1e-7, {});\n\n return obj.hasOwnProperty(\"1e-7\");\n\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-2-24",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-24.js",
+ "description": "Object.defineProperty - argument 'P' is a number that converts to a string (value is 1e-6)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n Object.defineProperty(obj, 1e-6, {});\n\n return obj.hasOwnProperty(\"0.000001\");\n\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-2-25",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-25.js",
+ "description": "Object.defineProperty - argument 'P' is a number that converts to a string (value is 1e-5)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n Object.defineProperty(obj, 1e-5, {});\n\n return obj.hasOwnProperty(\"0.00001\");\n\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-2-26",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-26.js",
+ "description": "Object.defineProperty - argument 'P' is an integer that converts to a string (value is 123)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n Object.defineProperty(obj, 123, {});\n\n return obj.hasOwnProperty(\"123\");\n\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-2-27",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-27.js",
+ "description": "Object.defineProperty - argument 'P' is a decimal that converts to a string (value is 123.456)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n Object.defineProperty(obj, 123.456, {});\n\n return obj.hasOwnProperty(\"123.456\");\n\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-2-28",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-28.js",
+ "description": "Object.defineProperty - argument 'P' is a number that converts to a string (value is 1(following 19 zeros).1)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n Object.defineProperty(obj, 10000000000000000000.1, {});\n\n return obj.hasOwnProperty(\"10000000000000000000\");\n\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-2-29",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-29.js",
+ "description": "Object.defineProperty - argument 'P' is a number that converts to a string (value is 1(following 20 zeros).1)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n Object.defineProperty(obj, 100000000000000000000.1, {});\n\n return obj.hasOwnProperty(\"100000000000000000000\");\n\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-2-3",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-3.js",
+ "description": "Object.defineProperty - argument 'P' is a boolean whose value is false",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n Object.defineProperty(obj, false, {});\n\n return obj.hasOwnProperty(\"false\");\n\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-2-30",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-30.js",
+ "description": "Object.defineProperty - argument 'P' is a number that converts to a string (value is 1(following 21 zeros).1)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n Object.defineProperty(obj, 1000000000000000000000.1, {});\n\n return obj.hasOwnProperty(\"1e+21\");\n\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-2-31",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-31.js",
+ "description": "Object.defineProperty - argument 'P' is a number that converts to a string (value is 1(following 22 zeros).1)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n Object.defineProperty(obj, 10000000000000000000000.1, {});\n\n return obj.hasOwnProperty(\"1e+22\");\n\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-2-32",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-32.js",
+ "description": "Object.defineProperty - argument 'P' is a number that converts to a string (value is 123.1234567)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n Object.defineProperty(obj, 123.1234567, {});\n\n return obj.hasOwnProperty(\"123.1234567\");\n\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-2-33",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-33.js",
+ "description": "Object.defineProperty - argument 'P' is applied to an empty string ",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n Object.defineProperty(obj, \"\", {});\n\n return obj.hasOwnProperty(\"\");\n\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-2-34",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-34.js",
+ "description": "Object.defineProperty - argument 'P' is applied to string 'AB\n\\cd' ",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n Object.defineProperty(obj, \"AB\\n\\\\cd\", {});\n\n return obj.hasOwnProperty(\"AB\\n\\\\cd\");\n\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-2-35",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-35.js",
+ "description": "Object.defineProperty - argument 'P' is applied to string 'undefined' ",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n Object.defineProperty(obj, \"undefined\", {});\n\n return obj.hasOwnProperty(\"undefined\");\n\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-2-36",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-36.js",
+ "description": "Object.defineProperty - argument 'P' is applied to string 'null' ",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n Object.defineProperty(obj, \"null\", {});\n\n return obj.hasOwnProperty(\"null\");\n\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-2-37",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-37.js",
+ "description": "Object.defineProperty - argument 'P' is applied to string '123αβπcd' ",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n Object.defineProperty(obj, \"123αβπcd\", {});\n\n return obj.hasOwnProperty(\"123αβπcd\");\n\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-2-38",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-38.js",
+ "description": "Object.defineProperty - argument 'P' is applied to string '1' ",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n Object.defineProperty(obj, \"1\", {});\n\n return obj.hasOwnProperty(\"1\");\n\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-2-39",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-39.js",
+ "description": "Object.defineProperty - argument 'P' is an array that converts to a string",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n Object.defineProperty(obj, [1, 2], {});\n\n return obj.hasOwnProperty(\"1,2\");\n\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-2-4",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-4.js",
+ "description": "Object.defineProperty - argument 'P' is a boolean whose value is true",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n Object.defineProperty(obj, true, {});\n\n return obj.hasOwnProperty(\"true\");\n\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-2-40",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-40.js",
+ "description": "Object.defineProperty - argument 'P' is a String Object that converts to a string",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n Object.defineProperty(obj, new String(\"Hello\"), {});\n\n return obj.hasOwnProperty(\"Hello\");\n\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-2-41",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-41.js",
+ "description": "Object.defineProperty - argument 'P' is a Boolean Object that converts to a string",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n Object.defineProperty(obj, new Boolean(false), {});\n\n return obj.hasOwnProperty(\"false\");\n\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-2-42",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-42.js",
+ "description": "Object.defineProperty - argument 'P' is a Number Object that converts to a string",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n Object.defineProperty(obj, new Number(123), {});\n\n return obj.hasOwnProperty(\"123\");\n\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-2-43",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-43.js",
+ "description": "Object.defineProperty - argument 'P' is an object that has an own toString method",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n var ownProp = {\n toString: function () {\n return \"abc\";\n }\n };\n\n Object.defineProperty(obj, ownProp, {});\n\n return obj.hasOwnProperty(\"abc\");\n\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-2-44",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-44.js",
+ "description": "Object.defineProperty - argument 'P' is an object that has an own valueOf method",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n var ownProp = {\n valueOf: function () {\n return \"abc\";\n },\n toString: undefined\n };\n\n Object.defineProperty(obj, ownProp, {});\n\n return obj.hasOwnProperty(\"abc\");\n\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-2-45",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-45.js",
+ "description": "Object.defineProperty - argument 'P' is an object whose toString method returns an object and whose valueOf method returns a primitive value",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n var toStringAccessed = false;\n var valueOfAccessed = false;\n\n var ownProp = {\n toString: function () {\n toStringAccessed = true;\n return {};\n },\n valueOf: function () {\n valueOfAccessed = true;\n return \"abc\";\n }\n };\n\n Object.defineProperty(obj, ownProp, {});\n\n return obj.hasOwnProperty(\"abc\") && valueOfAccessed && toStringAccessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-2-46",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-46.js",
+ "description": "Object.defineProperty - argument 'P' is an object that has an own toString and valueOf method",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n var toStringAccessed = false;\n var valueOfAccessed = false;\n\n var ownProp = {\n toString: function () {\n toStringAccessed = true;\n return \"abc\";\n },\n valueOf: function () {\n valueOfAccessed = true;\n return \"prop\";\n }\n };\n Object.defineProperty(obj, ownProp, {});\n\n return obj.hasOwnProperty(\"abc\") && !valueOfAccessed && toStringAccessed;\n\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-2-47",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-47.js",
+ "description": "Object.defineProperty - TypeError exception is thrown when 'P' is an object that neither toString nor valueOf returns a primitive value",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n var toStringAccessed = false;\n var valueOfAccessed = false;\n\n var ownProp = {\n toString: function () {\n toStringAccessed = true;\n return {};\n },\n valueOf: function () {\n valueOfAccessed = true;\n return {};\n }\n };\n\n try {\n Object.defineProperty(obj, ownProp, {});\n return false;\n } catch (e) {\n return valueOfAccessed && toStringAccessed && e instanceof TypeError;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-2-48",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-48.js",
+ "description": "Object.defineProperty - an inherited toString method is invoked when 'P' is an object with an own valueOf and an inherited toString methods",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n var toStringAccessed = false;\n var valueOfAccessed = false;\n\n var proto = {\n toString: function () {\n toStringAccessed = true;\n return \"test\";\n }\n };\n\n var ConstructFun = function () { };\n ConstructFun.prototype = proto;\n\n var child = new ConstructFun();\n child.valueOf = function () {\n valueOfAccessed = true;\n return \"10\";\n };\n\n Object.defineProperty(obj, child, {});\n\n return obj.hasOwnProperty(\"test\") && !valueOfAccessed && toStringAccessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-2-5",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-5.js",
+ "description": "Object.defineProperty - argument 'P' is a number that converts to a string (value is NaN)",
+ "test": "/// Copyright (c) 2009 Microsoft Corporation \n/// \n/// Redistribution and use in source and binary forms, with or without modification, are permitted provided\n/// that the following conditions are met: \n/// * Redistributions of source code must retain the above copyright notice, this list of conditions and\n/// the following disclaimer. \n/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and \n/// the following disclaimer in the documentation and/or other materials provided with the distribution. \n/// * Neither the name of Microsoft nor the names of its contributors may be used to\n/// endorse or promote products derived from this software without specific prior written permission.\n/// \n/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR\n/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS\n/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE\n/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,\n/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF\n/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.assertTrue((function testcase() {\n var obj = {};\n Object.defineProperty(obj, NaN, {});\n\n return obj.hasOwnProperty(\"NaN\");\n\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-2-6",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-6.js",
+ "description": "Object.defineProperty - argument 'P' is a number that converts to a string (value is 0)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n Object.defineProperty(obj, 0, {});\n\n return obj.hasOwnProperty(\"0\");\n\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-2-7",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-7.js",
+ "description": "Object.defineProperty - argument 'P' is a number that converts to a string (value is +0)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n Object.defineProperty(obj, +0, {});\n\n return obj.hasOwnProperty(\"0\");\n\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-2-8",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-8.js",
+ "description": "Object.defineProperty - argument 'P' is a number that converts to a string (value is -0)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n Object.defineProperty(obj, -0, {});\n\n return obj.hasOwnProperty(\"0\");\n\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-2-9",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-2-9.js",
+ "description": "Object.defineProperty - argument 'P' is a number that converts to a string (value is a positive number)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n Object.defineProperty(obj, 30, {});\n\n return obj.hasOwnProperty(\"30\");\n\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-1",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-1.js",
+ "description": "Object.defineProperty throws TypeError if desc has 'get' and 'value' present(8.10.5 step 9.a)",
+ "test": "assertTrue((function testcase() {\n var o = {};\n\n // dummy getter\n var getter = function () { return 1; }\n var desc = { get: getter, value: 101};\n \n try {\n Object.defineProperty(o, \"foo\", desc);\n }\n catch (e) {\n if (e instanceof TypeError &&\n (o.hasOwnProperty(\"foo\") === false)) {\n return true;\n }\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-10",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-10.js",
+ "description": "Object.defineProperty throws TypeError if setter is not callable but not undefined (Number)(8.10.5 step 8.b)",
+ "test": "assertTrue((function testcase() {\n var o = {};\n \n // dummy setter\n var setter = 42;\n var desc = { set: setter };\n \n try {\n Object.defineProperty(o, \"foo\", desc);\n }\n catch (e) {\n if (e instanceof TypeError &&\n (o.hasOwnProperty(\"foo\") === false)) {\n return true;\n }\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-100",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-100.js",
+ "description": "Object.defineProperty - 'configurable' property in 'Attributes' is null (8.10.5 step 4.b)",
+ "test": "assertTrue((function testcase() {\n var obj = { };\n\n Object.defineProperty(obj, \"property\", { configurable: null });\n\n var beforeDeleted = obj.hasOwnProperty(\"property\");\n\n delete obj.property;\n\n var afterDeleted = obj.hasOwnProperty(\"property\") && typeof (obj.property) === \"undefined\";\n\n return beforeDeleted === true && afterDeleted === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-101",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-101.js",
+ "description": "Object.defineProperty - 'configurable' property in 'Attributes' is true (8.10.5 step 4.b)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n Object.defineProperty(obj, \"property\", { configurable: true });\n\n var beforeDeleted = obj.hasOwnProperty(\"property\");\n\n delete obj.property;\n\n var afterDeleted = obj.hasOwnProperty(\"property\");\n\n return beforeDeleted === true && afterDeleted === false;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-102",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-102.js",
+ "description": "Object.defineProperty - 'configurable' property in 'Attributes' is false (8.10.5 step 4.b)",
+ "test": "assertTrue((function testcase() {\n var obj = { };\n\n Object.defineProperty(obj, \"property\", { configurable: false });\n\n var beforeDeleted = obj.hasOwnProperty(\"property\");\n\n delete obj.property;\n\n var afterDeleted = obj.hasOwnProperty(\"property\") && typeof (obj.property) === \"undefined\";\n\n return beforeDeleted === true && afterDeleted === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-103",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-103.js",
+ "description": "Object.defineProperty - 'configurable' property in 'Attributes' is 0 (8.10.5 step 4.b)",
+ "test": "assertTrue((function testcase() {\n var obj = { };\n\n Object.defineProperty(obj, \"property\", { configurable: 0 });\n\n var beforeDeleted = obj.hasOwnProperty(\"property\");\n\n delete obj.property;\n\n var afterDeleted = obj.hasOwnProperty(\"property\") && typeof (obj.property) === \"undefined\";\n\n return beforeDeleted === true && afterDeleted === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-104",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-104.js",
+ "description": "Object.defineProperty - 'configurable' property in 'Attributes' is +0 (8.10.5 step 4.b)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n Object.defineProperty(obj, \"property\", { configurable: +0 });\n\n var beforeDeleted = obj.hasOwnProperty(\"property\");\n\n delete obj.property;\n\n var afterDeleted = obj.hasOwnProperty(\"property\") && typeof (obj.property) === \"undefined\";\n\n return beforeDeleted === true && afterDeleted === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-105",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-105.js",
+ "description": "Object.defineProperty - 'configurable' property in 'Attributes' is -0 (8.10.5 step 4.b)",
+ "test": "assertTrue((function testcase() {\n var obj = { };\n\n Object.defineProperty(obj, \"property\", { configurable: -0 });\n\n var beforeDeleted = obj.hasOwnProperty(\"property\");\n\n delete obj.property;\n\n var afterDeleted = obj.hasOwnProperty(\"property\") && typeof (obj.property) === \"undefined\";\n\n return beforeDeleted === true && afterDeleted === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-106",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-106.js",
+ "description": "Object.defineProperty - 'configurable' property in 'Attributes' is NaN (8.10.5 step 4.b)",
+ "test": "assertTrue((function testcase() {\n var obj = { };\n\n Object.defineProperty(obj, \"property\", { configurable: NaN });\n\n var beforeDeleted = obj.hasOwnProperty(\"property\");\n\n delete obj.property;\n\n var afterDeleted = obj.hasOwnProperty(\"property\") && typeof (obj.property) === \"undefined\";\n\n return beforeDeleted === true && afterDeleted === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-107",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-107.js",
+ "description": "Object.defineProperty - 'configurable' property in 'Attributes' is a positive number (8.10.5 step 4.b)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n Object.defineProperty(obj, \"property\", { configurable: 12345 });\n\n var beforeDeleted = obj.hasOwnProperty(\"property\");\n\n delete obj.property;\n\n var afterDeleted = obj.hasOwnProperty(\"property\");\n\n return beforeDeleted === true && afterDeleted === false;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-108",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-108.js",
+ "description": "Object.defineProperty - 'configurable' property in 'Attributes' is a negative number (8.10.5 step 4.b)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n Object.defineProperty(obj, \"property\", { configurable: -12345 });\n\n var beforeDeleted = obj.hasOwnProperty(\"property\");\n\n delete obj.property;\n\n var afterDeleted = obj.hasOwnProperty(\"property\");\n\n return beforeDeleted === true && afterDeleted === false;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-109",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-109.js",
+ "description": "Object.defineProperty - 'configurable' property in 'Attributes' is an empty string (8.10.5 step 4.b)",
+ "test": "assertTrue((function testcase() {\n var obj = { };\n\n Object.defineProperty(obj, \"property\", { configurable: \"\" });\n\n var beforeDeleted = obj.hasOwnProperty(\"property\");\n\n delete obj.property;\n\n var afterDeleted = obj.hasOwnProperty(\"property\") && typeof (obj.property) === \"undefined\";\n\n return beforeDeleted === true && afterDeleted === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-11",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-11.js",
+ "description": "Object.defineProperty throws TypeError if setter is not callable but not undefined (Boolean)(8.10.5 step 8.b)",
+ "test": "assertTrue((function testcase() {\n var o = {};\n \n // dummy setter\n var setter = true;\n var desc = { set: setter };\n \n try {\n Object.defineProperty(o, \"foo\", desc);\n }\n catch (e) {\n if (e instanceof TypeError &&\n (o.hasOwnProperty(\"foo\") === false)) {\n return true;\n }\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-110",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-110.js",
+ "description": "Object.defineProperty - 'configurable' property in 'Attributes' is a non-empty string (8.10.5 step 4.b)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n Object.defineProperty(obj, \"property\", { configurable: \" \" });\n\n var beforeDeleted = obj.hasOwnProperty(\"property\");\n\n delete obj.property;\n\n var afterDeleted = obj.hasOwnProperty(\"property\");\n\n return beforeDeleted === true && afterDeleted === false;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-111",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-111.js",
+ "description": "Object.defineProperty - 'configurable' property in 'Attributes' is a Function object (8.10.5 step 4.b)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n Object.defineProperty(obj, \"property\", {\n configurable: function () { }\n });\n\n var beforeDeleted = obj.hasOwnProperty(\"property\");\n\n delete obj.property;\n\n var afterDeleted = obj.hasOwnProperty(\"property\");\n\n return beforeDeleted === true && afterDeleted === false;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-112",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-112.js",
+ "description": "Object.defineProperty - 'configurable' property in 'Attributes' is an Array object (8.10.5 step 4.b)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n Object.defineProperty(obj, \"property\", { configurable: [1, 2, 3] });\n\n var beforeDeleted = obj.hasOwnProperty(\"property\");\n\n delete obj.property;\n\n var afterDeleted = obj.hasOwnProperty(\"property\");\n\n return beforeDeleted === true && afterDeleted === false;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-113",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-113.js",
+ "description": "Object.defineProperty - 'configurable' property in 'Attributes' is a String object (8.10.5 step 4.b)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n Object.defineProperty(obj, \"property\", { configurable: new String(\"bbq\") });\n\n var beforeDeleted = obj.hasOwnProperty(\"property\");\n\n delete obj.property;\n\n var afterDeleted = obj.hasOwnProperty(\"property\");\n\n return beforeDeleted === true && afterDeleted === false;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-114",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-114.js",
+ "description": "Object.defineProperty - 'configurable' property in 'Attributes' is a Boolean object (8.10.5 step 4.b)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n Object.defineProperty(obj, \"property\", { configurable: new Boolean(true) });\n\n var beforeDeleted = obj.hasOwnProperty(\"property\");\n\n delete obj.property;\n\n var afterDeleted = obj.hasOwnProperty(\"property\");\n\n return beforeDeleted === true && afterDeleted === false;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-115",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-115.js",
+ "description": "Object.defineProperty - 'configurable' property in 'Attributes' is a Number object (8.10.5 step 4.b)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n Object.defineProperty(obj, \"property\", { configurable: new Number(0) });\n\n var beforeDeleted = obj.hasOwnProperty(\"property\");\n\n delete obj.property;\n\n var afterDeleted = obj.hasOwnProperty(\"property\");\n\n return beforeDeleted === true && afterDeleted === false;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-116",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-116.js",
+ "description": "Object.defineProperty - 'configurable' property in 'Attributes' is the Math object (8.10.5 step 4.b)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n Object.defineProperty(obj, \"property\", { configurable: Math });\n\n var beforeDeleted = obj.hasOwnProperty(\"property\");\n\n delete obj.property;\n\n var afterDeleted = obj.hasOwnProperty(\"property\");\n\n return beforeDeleted === true && afterDeleted === false;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-117",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-117.js",
+ "description": "Object.defineProperty - 'configurable' property in 'Attributes' is a Date object (8.10.5 step 4.b)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n Object.defineProperty(obj, \"property\", { configurable: new Date() });\n\n var beforeDeleted = obj.hasOwnProperty(\"property\");\n\n delete obj.property;\n\n var afterDeleted = obj.hasOwnProperty(\"property\");\n\n return beforeDeleted === true && afterDeleted === false;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-118",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-118.js",
+ "description": "Object.defineProperty - 'configurable' property in 'Attributes' is a RegExp object (8.10.5 step 4.b)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n var attr = {\n configurable: new RegExp()\n };\n\n Object.defineProperty(obj, \"property\", attr);\n\n var beforeDeleted = obj.hasOwnProperty(\"property\");\n\n delete obj.property;\n\n var afterDeleted = obj.hasOwnProperty(\"property\");\n\n return beforeDeleted === true && afterDeleted === false;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-119",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-119.js",
+ "description": "Object.defineProperty - 'configurable' property in 'Attributes' is the JSON object (8.10.5 step 4.b)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n var attr = {\n configurable: JSON\n };\n\n Object.defineProperty(obj, \"property\", attr);\n\n var beforeDeleted = obj.hasOwnProperty(\"property\");\n\n delete obj.property;\n\n var afterDeleted = obj.hasOwnProperty(\"property\");\n\n return beforeDeleted === true && afterDeleted === false;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-12",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-12.js",
+ "description": "Object.defineProperty throws TypeError if setter is not callable but not undefined (String)(8.10.5 step 8.b)",
+ "test": "assertTrue((function testcase() {\n var o = {};\n \n // dummy setter\n var setter = \"abc\";\n var desc = { set: setter };\n \n try {\n Object.defineProperty(o, \"foo\", desc);\n }\n catch (e) {\n if (e instanceof TypeError &&\n (o.hasOwnProperty(\"foo\") === false)) {\n return true;\n }\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-120",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-120.js",
+ "description": "Object.defineProperty - 'configurable' property in 'Attributes' is a Error object (8.10.5 step 4.b)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n var attr = {\n configurable: new SyntaxError()\n };\n\n Object.defineProperty(obj, \"property\", attr);\n\n var beforeDeleted = obj.hasOwnProperty(\"property\");\n\n delete obj.property;\n\n var afterDeleted = obj.hasOwnProperty(\"property\");\n\n return beforeDeleted === true && afterDeleted === false;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-121",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-121.js",
+ "description": "Object.defineProperty - 'configurable' property in 'Attributes' is the Argument object (8.10.5 step 4.b)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n var argObj = (function () { return arguments; })(1, true, \"a\");\n\n var attr = {\n configurable: argObj\n };\n\n Object.defineProperty(obj, \"property\", attr);\n\n var beforeDeleted = obj.hasOwnProperty(\"property\");\n\n delete obj.property;\n\n var afterDeleted = obj.hasOwnProperty(\"property\");\n\n return beforeDeleted === true && afterDeleted === false;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-123",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-123.js",
+ "description": "Object.defineProperty - 'configurable' property in 'Attributes' is the global object (8.10.5 step 4.b)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n var attr = {\n configurable: fnGlobalObject()\n };\n\n Object.defineProperty(obj, \"property\", attr);\n\n var beforeDeleted = obj.hasOwnProperty(\"property\");\n\n delete obj.property;\n\n var afterDeleted = obj.hasOwnProperty(\"property\");\n\n return beforeDeleted === true && afterDeleted === false;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-124",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-124.js",
+ "description": "Object.defineProperty - 'configurable' property in 'Attributes' is treated as true when it is a string (value is 'false') (8.10.5 step 4.b)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n var attr = {\n configurable: \"false\"\n };\n\n Object.defineProperty(obj, \"property\", attr);\n\n var beforeDeleted = obj.hasOwnProperty(\"property\");\n\n delete obj.property;\n\n var afterDeleted = obj.hasOwnProperty(\"property\");\n\n return beforeDeleted === true && afterDeleted === false;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-125",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-125.js",
+ "description": "Object.defineProperty - 'configurable' property in 'Attributes' is treated as true when it is new Boolean(false) (8.10.5 step 4.b)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n var attr = {\n configurable: new Boolean(false)\n };\n\n Object.defineProperty(obj, \"property\", attr);\n\n var beforeDeleted = obj.hasOwnProperty(\"property\");\n\n delete obj.property;\n\n var afterDeleted = obj.hasOwnProperty(\"property\");\n\n return beforeDeleted === true && afterDeleted === false;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-126",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-126.js",
+ "description": "Object.defineProperty - 'value' property in 'Attributes' is present (8.10.5 step 5)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n var attr = { value: 100 };\n\n Object.defineProperty(obj, \"property\", attr);\n\n return obj.property === 100;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-127",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-127.js",
+ "description": "Object.defineProperty - 'value' property in 'Attributes' is not present (8.10.5 step 5)",
+ "test": "assertTrue((function testcase() {\n var obj = { };\n\n var attr = {\n writable: true\n };\n\n Object.defineProperty(obj, \"property\", attr);\n\n return obj.hasOwnProperty(\"property\") && typeof (obj.property) === \"undefined\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-129",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-129.js",
+ "description": "Object.defineProperty - 'value' property in 'Attributes' is an inherited data property (8.10.5 step 5.a)",
+ "test": "assertTrue((function testcase() {\n var obj = { };\n\n var proto = {\n value: \"inheritedDataProperty\"\n };\n\n var ConstructFun = function () { };\n ConstructFun.prototype = proto;\n\n var child = new ConstructFun();\n\n Object.defineProperty(obj, \"property\", child);\n\n return obj.property === \"inheritedDataProperty\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-13",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-13.js",
+ "description": "Object.defineProperty throws TypeError if the setter in desc is not callable (Null)(8.10.5 step 8.b)",
+ "test": "assertTrue((function testcase() {\n var o = {};\n \n // dummy setter\n var setter = null;\n var desc = { set: setter };\n \n try {\n Object.defineProperty(o, \"foo\", desc);\n }\n catch (e) {\n if (e instanceof TypeError &&\n (o.hasOwnProperty(\"foo\") === false)) {\n return true;\n }\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-130",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-130.js",
+ "description": "Object.defineProperty - 'value' property in 'Attributes' is own data property that overrides an inherited data property (8.10.5 step 5.a)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n var proto = { value: \"inheritedDataProperty\" };\n\n var ConstructFun = function () { };\n ConstructFun.prototype = proto;\n\n var child = new ConstructFun();\n\n child.value = \"ownDataProperty\";\n\n Object.defineProperty(obj, \"property\", child);\n\n return obj.property === \"ownDataProperty\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-131",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-131.js",
+ "description": "Object.defineProperty - 'value' property in 'Attributes' is own data property that overrides an inherited accessor property (8.10.5 step 5.a)",
+ "test": "assertTrue((function testcase() {\n var obj = { };\n\n var proto = {};\n\n Object.defineProperty(proto, \"value\", {\n get: function () {\n return \"inheritedAccessorProperty\";\n }\n });\n\n var ConstructFun = function () { };\n ConstructFun.prototype = proto;\n\n var child = new ConstructFun();\n Object.defineProperty(child, \"value\", {\n value: \"ownDataProperty\"\n });\n\n Object.defineProperty(obj, \"property\", child);\n\n return obj.property === \"ownDataProperty\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-132",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-132.js",
+ "description": "Object.defineProperty - 'value' property in 'Attributes' is own accessor property (8.10.5 step 5.a)",
+ "test": "assertTrue((function testcase() {\n var obj = { };\n\n var attr = {};\n Object.defineProperty(attr, \"value\", {\n get: function () {\n return \"ownAccessorProperty\";\n }\n });\n\n Object.defineProperty(obj, \"property\", attr);\n\n return obj.property === \"ownAccessorProperty\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-133",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-133.js",
+ "description": "Object.defineProperty - 'value' property in 'Attributes' is an inherited accessor property (8.10.5 step 5.a)",
+ "test": "assertTrue((function testcase() {\n var obj = { };\n\n var proto = {};\n Object.defineProperty(proto, \"value\", {\n get: function () {\n return \"inheritedAccessorProperty\";\n }\n });\n\n var ConstructFun = function () { };\n ConstructFun.prototype = proto;\n\n var child = new ConstructFun();\n\n Object.defineProperty(obj, \"property\", child);\n\n return obj.property === \"inheritedAccessorProperty\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-134",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-134.js",
+ "description": "Object.defineProperty - 'value' property in 'Attributes' is own accessor property that overrides an inherited data property (8.10.5 step 5.a)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n var proto = {\n value: \"inheritedDataProperty\"\n };\n\n var ConstructFun = function () { };\n ConstructFun.prototype = proto;\n\n var child = new ConstructFun();\n Object.defineProperty(child, \"value\", {\n get: function () {\n return \"ownAccessorProperty\";\n }\n });\n\n Object.defineProperty(obj, \"property\", child);\n\n return obj.property === \"ownAccessorProperty\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-135",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-135.js",
+ "description": "Object.defineProperty - 'value' property in 'Attributes' is own accessor property that overrides an inherited accessor property (8.10.5 step 5.a)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n var proto = {};\n Object.defineProperty(proto, \"value\", {\n get: function () {\n return \"inheritedAccessorProperty\";\n }\n });\n\n var ConstructFun = function () { };\n ConstructFun.prototype = proto;\n\n var child = new ConstructFun();\n Object.defineProperty(child, \"value\", {\n get: function () {\n return \"ownAccessorProperty\";\n }\n });\n\n Object.defineProperty(obj, \"property\", child);\n\n return obj.property === \"ownAccessorProperty\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-136",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-136.js",
+ "description": "Object.defineProperty - 'value' property in 'Attributes' is own accessor property without a get function (8.10.5 step 5.a)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n var attr = {};\n Object.defineProperty(attr, \"value\", {\n set: function () { }\n });\n\n Object.defineProperty(obj, \"property\", attr);\n\n return obj.hasOwnProperty(\"property\") && typeof (obj.property) === \"undefined\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-137",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-137.js",
+ "description": "Object.defineProperty - 'value' property in 'Attributes' is own accessor property(without a get function) that overrides an inherited accessor property (8.10.5 step 5.a)",
+ "test": "assertTrue((function testcase() {\n var obj = { };\n\n var proto = {};\n Object.defineProperty(proto, \"value\", {\n get: function () {\n return \"inheritedAccessorProperty\";\n }\n });\n\n var ConstructFun = function () { };\n ConstructFun.prototype = proto;\n\n var child = new ConstructFun();\n Object.defineProperty(child, \"value\", {\n set : function () { }\n });\n\n Object.defineProperty(obj, \"property\", child);\n\n return obj.hasOwnProperty(\"property\") && typeof (obj.property) === \"undefined\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-138",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-138.js",
+ "description": "Object.defineProperty - 'value' property in 'Attributes' is an inherited accessor property without a get function (8.10.5 step 5.a)",
+ "test": "assertTrue((function testcase() {\n var obj = { property : 120 };\n\n var proto = {};\n Object.defineProperty(proto, \"value\", {\n set: function () { }\n });\n\n var ConstructFun = function () { };\n ConstructFun.prototype = proto;\n\n var child = new ConstructFun();\n\n Object.defineProperty(obj, \"property\", child);\n\n return obj.hasOwnProperty(\"property\") && typeof (obj.property) === \"undefined\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-139-1",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-139-1.js",
+ "description": "Object.defineProperty - 'Attributes' is a Function object which implements its own [[Get]] method to access the 'value' property of prototype object (8.10.5 step 5.a)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n try {\n Function.prototype.value = \"Function\";\n var funObj = function (a, b) {\n return a + b;\n };\n\n Object.defineProperty(obj, \"property\", funObj);\n\n return obj.property === \"Function\";\n } finally {\n delete Function.prototype.value;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-139",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-139.js",
+ "description": "Object.defineProperty - 'Attributes' is a Function object which implements its own [[Get]] method to access the 'value' property (8.10.5 step 5.a)",
+ "test": "assertTrue((function testcase() {\n var obj = { };\n\n var funObj = function (a, b) {\n return a + b;\n };\n\n funObj.value = \"Function\";\n\n Object.defineProperty(obj, \"property\", funObj);\n\n return obj.property === \"Function\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-14",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-14.js",
+ "description": "Object.defineProperty throws TypeError if setter is not callable but not undefined (Object)(8.10.5 step 8.b)",
+ "test": "assertTrue((function testcase() {\n var o = {};\n \n // dummy getter\n var setter = { a: 1 };\n var desc = { set: setter };\n \n try {\n Object.defineProperty(o, \"foo\", desc);\n }\n catch (e) {\n if (e instanceof TypeError &&\n (o.hasOwnProperty(\"foo\") === false)) {\n return true;\n }\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-140-1",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-140-1.js",
+ "description": "Object.defineProperty - 'Attributes' is an Array object that uses Object's [[Get]] method to access the 'value' property of prototype object (8.10.5 step 5.a)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n try {\n Array.prototype.value = \"Array\";\n var arrObj = [1, 2, 3];\n\n Object.defineProperty(obj, \"property\", arrObj);\n\n return obj.property === \"Array\";\n } finally {\n delete Array.prototype.value;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-140",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-140.js",
+ "description": "Object.defineProperty - 'Attributes' is an Array object that uses Object's [[Get]] method to access the 'value' property (8.10.5 step 5.a)",
+ "test": "assertTrue((function testcase() {\n var obj = { };\n\n var arrObj = [1, 2, 3];\n\n arrObj.value = \"Array\";\n\n Object.defineProperty(obj, \"property\", arrObj);\n\n return obj.property === \"Array\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-141-1",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-141-1.js",
+ "description": "Object.defineProperty - 'Attributes' is a String object that uses Object's [[Get]] method to access the 'value' property of prototype object (8.10.5 step 5.a)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n try {\n String.prototype.value = \"String\";\n var strObj = new String(\"abc\");\n\n Object.defineProperty(obj, \"property\", strObj);\n\n return obj.property === \"String\";\n } finally {\n delete String.prototype.value;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-141",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-141.js",
+ "description": "Object.defineProperty - 'Attributes' is a String object that uses Object's [[Get]] method to access the 'value' property (8.10.5 step 5.a)",
+ "test": "assertTrue((function testcase() {\n var obj = { };\n\n var strObj = new String(\"abc\");\n\n strObj.value = \"String\";\n\n Object.defineProperty(obj, \"property\", strObj);\n\n return obj.property === \"String\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-142-1",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-142-1.js",
+ "description": "Object.defineProperty - 'Attributes' is a Boolean object that uses Object's [[Get]] method to access the 'value' property of prototype object (8.10.5 step 5.a)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n try {\n Boolean.prototype.value = \"Boolean\";\n var boolObj = new Boolean(true);\n\n Object.defineProperty(obj, \"property\", boolObj);\n\n return obj.property === \"Boolean\";\n } finally {\n delete Boolean.prototype.value;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-142",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-142.js",
+ "description": "Object.defineProperty - 'Attributes' is a Boolean object that uses Object's [[Get]] method to access the 'value' property (8.10.5 step 5.a)",
+ "test": "assertTrue((function testcase() {\n var obj = { };\n\n var boolObj = new Boolean(true);\n\n boolObj.value = \"Boolean\";\n\n Object.defineProperty(obj, \"property\", boolObj);\n\n return obj.property === \"Boolean\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-143-1",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-143-1.js",
+ "description": "Object.defineProperty - 'Attributes' is a Number object that uses Object's [[Get]] method to access the 'value' property of prototype object (8.10.5 step 5.a)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n try {\n Number.prototype.value = \"Number\";\n var numObj = new Number(-2);\n\n Object.defineProperty(obj, \"property\", numObj);\n\n return obj.property === \"Number\";\n } finally {\n delete Number.prototype.value;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-143",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-143.js",
+ "description": "Object.defineProperty - 'Attributes' is a Number object that uses Object's [[Get]] method to access the 'value' property (8.10.5 step 5.a)",
+ "test": "assertTrue((function testcase() {\n var obj = { };\n\n var numObj = new Number(-2);\n\n numObj.value = \"Number\";\n\n Object.defineProperty(obj, \"property\", numObj);\n\n return obj.property === \"Number\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-144-1",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-144-1.js",
+ "description": "Object.defineProperty - 'Attributes' is the Math object that uses Object's [[Get]] method to access the 'value' property of prototype object (8.10.5 step 5.a)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n try {\n Object.prototype.value = \"Math\";\n\n Object.defineProperty(obj, \"property\", Math);\n\n return obj.property === \"Math\";\n } finally {\n delete Object.prototype.value;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-144",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-144.js",
+ "description": "Object.defineProperty - 'Attributes' is the Math object that uses Object's [[Get]] method to access the 'value' property (8.10.5 step 5.a)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n try {\n Math.value = \"Math\";\n\n Object.defineProperty(obj, \"property\", Math);\n\n return obj.property === \"Math\";\n } finally {\n delete Math.value;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-145-1",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-145-1.js",
+ "description": "Object.defineProperty - 'Attributes' is a Date object that uses Object's [[Get]] method to access the 'value' property of prototype object (8.10.5 step 5.a)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n try {\n Date.prototype.value = \"Date\";\n var dateObj = new Date();\n\n Object.defineProperty(obj, \"property\", dateObj);\n\n return obj.property === \"Date\";\n } finally {\n delete Date.prototype.value;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-145",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-145.js",
+ "description": "Object.defineProperty - 'Attributes' is a Date object that uses Object's [[Get]] method to access the 'value' property (8.10.5 step 5.a)",
+ "test": "assertTrue((function testcase() {\n var obj = { };\n\n var dateObj = new Date();\n\n dateObj.value = \"Date\";\n\n Object.defineProperty(obj, \"property\", dateObj);\n\n return obj.property === \"Date\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-146-1",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-146-1.js",
+ "description": "Object.defineProperty - 'Attributes' is a RegExp object that uses Object's [[Get]] method to access the 'value' property of prototype object (8.10.5 step 5.a)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n try {\n RegExp.prototype.value = \"RegExp\";\n var regObj = new RegExp();\n\n Object.defineProperty(obj, \"property\", regObj);\n\n return obj.property === \"RegExp\";\n } finally {\n delete RegExp.prototype.value;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-146",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-146.js",
+ "description": "Object.defineProperty - 'Attributes' is a RegExp object that uses Object's [[Get]] method to access the 'value' property (8.10.5 step 5.a)",
+ "test": "assertTrue((function testcase() {\n var obj = { };\n\n var regObj = new RegExp();\n\n regObj.value = \"RegExp\";\n\n Object.defineProperty(obj, \"property\", regObj);\n\n return obj.property === \"RegExp\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-147-1",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-147-1.js",
+ "description": "Object.defineProperty - 'Attributes' is the JSON object that uses Object's [[Get]] method to access the 'value' property of prototype object (8.10.5 step 5.a)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n try {\n Object.prototype.value = \"JSON\";\n\n Object.defineProperty(obj, \"property\", JSON);\n\n return obj.property === \"JSON\";\n } finally {\n delete Object.prototype.value;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-147",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-147.js",
+ "description": "Object.defineProperty - 'Attributes' is the JSON object that uses Object's [[Get]] method to access the 'value' property (8.10.5 step 5.a)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n try {\n JSON.value = \"JSON\";\n\n Object.defineProperty(obj, \"property\", JSON);\n\n return obj.property === \"JSON\";\n } finally {\n delete JSON.value;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-148-1",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-148-1.js",
+ "description": "Object.defineProperty - 'Attributes' is an Error object that uses Object's [[Get]] method to access the 'value' property of prototype object (8.10.5 step 5.a)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n try {\n Error.prototype.value = \"Error\";\n var errObj = new Error();\n\n Object.defineProperty(obj, \"property\", errObj);\n\n return obj.property === \"Error\";\n } finally {\n delete Error.prototype.value;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-148",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-148.js",
+ "description": "Object.defineProperty - 'Attributes' is an Error object that uses Object's [[Get]] method to access the 'value' property (8.10.5 step 5.a)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n var errObj = new Error();\n\n errObj.value = \"Error\";\n\n Object.defineProperty(obj, \"property\", errObj);\n\n return obj.property === \"Error\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-149-1",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-149-1.js",
+ "description": "Object.defineProperty - 'Attributes' is an Arguments object which implements its own [[Get]] method to access the 'value' property of prototype object (8.10.5 step 5.a)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n try {\n Object.prototype.value = \"arguments\";\n var argObj = (function () { return arguments; })();\n\n\n Object.defineProperty(obj, \"property\", argObj);\n\n return obj.property === \"arguments\";\n } finally {\n delete Object.prototype.value;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-149",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-149.js",
+ "description": "Object.defineProperty - 'Attributes' is an Arguments object which implements its own [[Get]] method to access the 'value' property (8.10.5 step 5.a)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n var argObj = (function () { return arguments; })();\n\n argObj.value = \"arguments\";\n\n Object.defineProperty(obj, \"property\", argObj);\n\n return obj.property === \"arguments\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-15",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-15.js",
+ "description": "Object.defineProperty - 'Attributes' is undefined (8.10.5 step 1)",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n\n try {\n Object.defineProperty(obj, \"property\", undefined);\n return false;\n } catch (e) {\n return e instanceof TypeError;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-151",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-151.js",
+ "description": "Object.defineProperty - 'Attributes' is the global object that uses Object's [[Get]] method to access the 'value' property (8.10.5 step 5.a)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n try {\n fnGlobalObject().value = \"global\";\n\n Object.defineProperty(obj, \"property\", fnGlobalObject());\n\n return obj.property === \"global\";\n } finally {\n delete fnGlobalObject().value;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-152",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-152.js",
+ "description": "Object.defineProperty - 'writable' property in 'Attributes' is present (8.10.5 step 6)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n var attr = {\n writable: false\n };\n\n Object.defineProperty(obj, \"property\", attr);\n\n var beforeWrite = obj.hasOwnProperty(\"property\");\n\n obj.property = \"isWritable\";\n\n var afterWrite = (obj.property === \"isWritable\");\n\n return beforeWrite === true && afterWrite === false;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-153",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-153.js",
+ "description": "Object.defineProperty - 'writable' property in 'Attributes' is not present (8.10.5 step 6)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n var attr = {\n value: 100\n };\n\n Object.defineProperty(obj, \"property\", attr);\n\n var beforeWrite = obj.hasOwnProperty(\"property\");\n\n obj.property = \"isWritable\";\n\n var afterWrite = (obj.property === \"isWritable\");\n\n return beforeWrite === true && afterWrite === false;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-154",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-154.js",
+ "description": "Object.defineProperty - 'writable' property in 'Attributes' is own data property (8.10.5 step 6.a)",
+ "test": "assertTrue((function testcase() {\n var obj = { };\n\n var attr = {\n writable: true\n };\n\n Object.defineProperty(obj, \"property\", attr);\n\n var beforeWrite = obj.hasOwnProperty(\"property\");\n\n obj.property = \"isWritable\";\n\n var afterWrite = (obj.property === \"isWritable\");\n\n return beforeWrite === true && afterWrite === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-155",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-155.js",
+ "description": "Object.defineProperty - 'writable' property in 'Attributes' is an inherited data property (8.10.5 step 6.a)",
+ "test": "assertTrue((function testcase() {\n var obj = { };\n\n var proto = {\n writable: true\n };\n\n var ConstructFun = function () { };\n ConstructFun.prototype = proto;\n\n var child = new ConstructFun();\n\n Object.defineProperty(obj, \"property\", child);\n\n var beforeWrite = obj.hasOwnProperty(\"property\");\n\n obj.property = \"isWritable\";\n\n var afterWrite = (obj.property === \"isWritable\");\n\n return beforeWrite === true && afterWrite === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-156",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-156.js",
+ "description": "Object.defineProperty - 'writable' property in 'Attributes' is own data property that overrides an inherited data property (8.10.5 step 6.a)",
+ "test": "assertTrue((function testcase() {\n var obj = { };\n\n var proto = {\n writable: false \n };\n\n var ConstructFun = function () { };\n ConstructFun.prototype = proto;\n\n var child = new ConstructFun();\n child.writable = true;\n\n Object.defineProperty(obj, \"property\", child);\n\n var beforeWrite = obj.hasOwnProperty(\"property\");\n\n obj.property = \"isWritable\";\n\n var afterWrite = (obj.property === \"isWritable\");\n\n return beforeWrite === true && afterWrite === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-157",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-157.js",
+ "description": "Object.defineProperty - 'writable' property in 'Attributes' is own data property that overrides an inherited accessor property (8.10.5 step 6.a)",
+ "test": "assertTrue((function testcase() {\n var obj = { };\n\n var proto = { };\n Object.defineProperty(proto, \"writable\", {\n get : function () {\n return false;\n }\n });\n\n var ConstructFun = function () { };\n ConstructFun.prototype = proto;\n\n var child = new ConstructFun();\n Object.defineProperty(child, \"writable\", {\n value: true\n });\n\n Object.defineProperty(obj, \"property\", child);\n\n var beforeWrite = obj.hasOwnProperty(\"property\");\n\n obj.property = \"isWritable\";\n\n var afterWrite = (obj.property === \"isWritable\");\n\n return beforeWrite === true && afterWrite === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-158",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-158.js",
+ "description": "Object.defineProperty - 'writable' property in 'Attributes' is own accessor property (8.10.5 step 6.a)",
+ "test": "assertTrue((function testcase() {\n var obj = { };\n\n var attr = { };\n Object.defineProperty(attr, \"writable\", {\n get: function () {\n return true;\n }\n });\n\n Object.defineProperty(obj, \"property\", attr);\n\n var beforeWrite = obj.hasOwnProperty(\"property\");\n\n obj.property = \"isWritable\";\n\n var afterWrite = (obj.property === \"isWritable\");\n\n return beforeWrite === true && afterWrite === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-159",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-159.js",
+ "description": "Object.defineProperty - 'writable' property in 'Attributes' is an inherited accessor property (8.10.5 step 6.a)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n var proto = {};\n Object.defineProperty(proto, \"writable\", {\n get: function () {\n return true;\n }\n });\n\n var ConstructFun = function () { };\n ConstructFun.prototype = proto;\n\n var child = new ConstructFun();\n\n Object.defineProperty(obj, \"property\", child);\n\n var beforeWrite = obj.hasOwnProperty(\"property\");\n\n obj.property = \"isWritable\";\n\n var afterWrite = (obj.property === \"isWritable\");\n\n return beforeWrite === true && afterWrite === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-16",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-16.js",
+ "description": "Object.defineProperty - 'Attributes' is null (8.10.5 step 1)",
+ "test": "assertTrue((function testcase() {\n\n try {\n Object.defineProperty({}, \"property\", null);\n return false;\n } catch (e) {\n return e instanceof TypeError;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-160",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-160.js",
+ "description": "Object.defineProperty - 'writable' property in 'Attributes' is own accessor property that overrides an inherited data property (8.10.5 step 6.a)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n var proto = {\n writable: false\n };\n\n var ConstructFun = function () { };\n ConstructFun.prototype = proto;\n\n var child = new ConstructFun();\n Object.defineProperty(child, \"writable\", {\n get: function () {\n return true;\n }\n });\n\n Object.defineProperty(obj, \"property\", child);\n\n var beforeWrite = obj.hasOwnProperty(\"property\");\n\n obj.property = \"isWritable\";\n\n var afterWrite = (obj.property === \"isWritable\");\n\n return beforeWrite === true && afterWrite === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-161",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-161.js",
+ "description": "Object.defineProperty - 'writable' property in 'Attributes' is own accessor property that overrides an inherited accessor property (8.10.5 step 6.a)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n var proto = {};\n Object.defineProperty(proto, \"writable\", {\n get: function () {\n return false;\n }\n });\n\n var ConstructFun = function () { };\n ConstructFun.prototype = proto;\n\n var child = new ConstructFun();\n Object.defineProperty(child, \"writable\", {\n get: function () {\n return true;\n }\n });\n\n Object.defineProperty(obj, \"property\", child);\n\n var beforeWrite = obj.hasOwnProperty(\"property\");\n\n obj.property = \"isWritable\";\n\n var afterWrite = (obj.property === \"isWritable\");\n\n return beforeWrite === true && afterWrite === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-162",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-162.js",
+ "description": "Object.defineProperty - 'writable' property in 'Attributes' is own accessor property without a get function (8.10.5 step 6.a)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n var attr = {};\n Object.defineProperty(attr, \"writable\", {\n set: function () { }\n });\n\n Object.defineProperty(obj, \"property\", attr);\n\n var beforeWrite = obj.hasOwnProperty(\"property\");\n\n obj.property = \"isWritable\";\n\n var afterWrite = (typeof (obj.property) === \"undefined\");\n\n return beforeWrite === true && afterWrite === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-163",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-163.js",
+ "description": "Object.defineProperty - 'writable' property in 'Attributes' is own accessor property(without a get function) that overrides an inherited accessor property (8.10.5 step 6.a)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n var proto = {};\n Object.defineProperty(proto, \"writable\", {\n get: function () {\n return true;\n }\n });\n\n var ConstructFun = function () { };\n ConstructFun.prototype = proto;\n\n var child = new ConstructFun();\n Object.defineProperty(child, \"writable\", {\n set: function () { }\n });\n\n Object.defineProperty(obj, \"property\", child);\n\n var beforeWrite = obj.hasOwnProperty(\"property\");\n\n obj.property = \"isWritable\";\n\n var afterWrite = (typeof (obj.property) === \"undefined\");\n\n return beforeWrite === true && afterWrite === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-164",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-164.js",
+ "description": "Object.defineProperty - 'writable' property in 'Attributes' is an inherited accessor property without a get function (8.10.5 step 6.a)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n var proto = {};\n Object.defineProperty(proto, \"writable\", {\n set: function () { }\n });\n\n var ConstructFun = function () { };\n ConstructFun.prototype = proto;\n\n var child = new ConstructFun();\n\n Object.defineProperty(obj, \"property\", child);\n\n var beforeWrite = obj.hasOwnProperty(\"property\");\n\n obj.property = \"isWritable\";\n\n var afterWrite = (typeof (obj.property) === \"undefined\");\n\n return beforeWrite === true && afterWrite === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-165-1",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-165-1.js",
+ "description": "Object.defineProperty - 'Attributes' is a Function object which implements its own [[Get]] method to access the 'writable' property of prototype object (8.10.5 step 6.b)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n try {\n Function.prototype.writable = true;\n var funObj = function (a, b) {\n return a + b;\n };\n\n Object.defineProperty(obj, \"property\", funObj);\n\n var beforeWrite = obj.hasOwnProperty(\"property\");\n\n obj.property = \"isWritable\";\n\n var afterWrite = (obj.property === \"isWritable\");\n\n return beforeWrite === true && afterWrite === true;\n } finally {\n delete Function.prototype.writable;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-165",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-165.js",
+ "description": "Object.defineProperty - 'Attributes' is a Function object which implements its own [[Get]] method to access the 'writable' property (8.10.5 step 6.a)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n var funObj = function (a, b) {\n return a + b;\n };\n\n funObj.writable = true;\n\n Object.defineProperty(obj, \"property\", funObj);\n\n var beforeWrite = obj.hasOwnProperty(\"property\");\n\n obj.property = \"isWritable\";\n\n var afterWrite = (obj.property === \"isWritable\");\n\n return beforeWrite === true && afterWrite === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-166-1",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-166-1.js",
+ "description": "Object.defineProperty - 'Attributes' is an Array object that uses Object's [[Get]] method to access the 'writable' property of prototype object (8.10.5 step 6.b)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n try {\n Array.prototype.writable = true;\n var arrObj = [1, 2, 3];\n\n Object.defineProperty(obj, \"property\", arrObj);\n\n var beforeWrite = obj.hasOwnProperty(\"property\");\n\n obj.property = \"isWritable\";\n\n var afterWrite = (obj.property === \"isWritable\");\n\n return beforeWrite === true && afterWrite === true;\n } finally {\n delete Array.prototype.writable;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-166",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-166.js",
+ "description": "Object.defineProperty - 'Attributes' is an Array object that uses Object's [[Get]] method to access the 'writable' property (8.10.5 step 6.a)",
+ "test": "assertTrue((function testcase() {\n var obj = { };\n\n var arrObj = [1, 2, 3];\n\n arrObj.writable = true;\n\n Object.defineProperty(obj, \"property\", arrObj);\n\n var beforeWrite = obj.hasOwnProperty(\"property\");\n\n obj.property = \"isWritable\";\n\n var afterWrite = (obj.property === \"isWritable\");\n\n return beforeWrite === true && afterWrite === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-167-1",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-167-1.js",
+ "description": "Object.defineProperty - 'Attributes' is a String object that uses Object's [[Get]] method to access the 'writable' property of prototype object (8.10.5 step 6.b)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n try {\n String.prototype.writable = true;\n var strObj = new String(\"abc\");\n\n Object.defineProperty(obj, \"property\", strObj);\n\n var beforeWrite = obj.hasOwnProperty(\"property\");\n\n obj.property = \"isWritable\";\n\n var afterWrite = (obj.property === \"isWritable\");\n\n return beforeWrite === true && afterWrite === true;\n } finally {\n delete String.prototype.writable;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-167",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-167.js",
+ "description": "Object.defineProperty - 'Attributes' is a String object that uses Object's [[Get]] method to access the 'writable' property (8.10.5 step 6.a)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n var strObj = new String(\"abc\");\n\n strObj.writable = true;\n\n Object.defineProperty(obj, \"property\", strObj);\n\n var beforeWrite = obj.hasOwnProperty(\"property\");\n\n obj.property = \"isWritable\";\n\n var afterWrite = (obj.property === \"isWritable\");\n\n return beforeWrite === true && afterWrite === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-168-1",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-168-1.js",
+ "description": "Object.defineProperty - 'Attributes' is a Boolean object that uses Object's [[Get]] method to access the 'writable' property of prototype object (8.10.5 step 6.b)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n try {\n Boolean.prototype.writable = true;\n var boolObj = new Boolean(true);\n\n Object.defineProperty(obj, \"property\", boolObj);\n\n var beforeWrite = obj.hasOwnProperty(\"property\");\n\n obj.property = \"isWritable\";\n\n var afterWrite = (obj.property === \"isWritable\");\n\n return beforeWrite === true && afterWrite === true;\n } finally {\n delete Boolean.prototype.writable;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-168",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-168.js",
+ "description": "Object.defineProperty - 'Attributes' is a Boolean object that uses Object's [[Get]] method to access the 'writable' property (8.10.5 step 6.a)",
+ "test": "assertTrue((function testcase() {\n var obj = { };\n\n var boolObj = new Boolean(true);\n\n boolObj.writable = true;\n\n Object.defineProperty(obj, \"property\", boolObj);\n\n var beforeWrite = obj.hasOwnProperty(\"property\");\n\n obj.property = \"isWritable\";\n\n var afterWrite = (obj.property === \"isWritable\");\n\n return beforeWrite === true && afterWrite === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-169-1",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-169-1.js",
+ "description": "Object.defineProperty - 'Attributes' is a Number object that uses Object's [[Get]] method to access the 'writable' property of prototype object (8.10.5 step 6.b)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n try {\n Number.prototype.writable = true;\n var numObj = new Number(-2);\n\n Object.defineProperty(obj, \"property\", numObj);\n\n var beforeWrite = obj.hasOwnProperty(\"property\");\n\n obj.property = \"isWritable\";\n\n var afterWrite = (obj.property === \"isWritable\");\n\n return beforeWrite === true && afterWrite === true;\n } finally {\n delete Number.prototype.writable;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-169",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-169.js",
+ "description": "Object.defineProperty - 'Attributes' is a Number object that uses Object's [[Get]] method to access the 'writable' property (8.10.5 step 6.a)",
+ "test": "assertTrue((function testcase() {\n var obj = { };\n\n var numObj = new Number(-2);\n\n numObj.writable = true;\n\n Object.defineProperty(obj, \"property\", numObj);\n\n var beforeWrite = obj.hasOwnProperty(\"property\");\n\n obj.property = \"isWritable\";\n\n var afterWrite = (obj.property === \"isWritable\");\n\n return beforeWrite === true && afterWrite === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-17",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-17.js",
+ "description": "Object.defineProperty - 'Attributes' is a boolean primitive (8.10.5 step 1)",
+ "test": "assertTrue((function testcase() {\n\n try {\n Object.defineProperty({}, \"property\", true);\n return false;\n } catch (e) {\n return e instanceof TypeError;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-170-1",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-170-1.js",
+ "description": "Object.defineProperty - 'Attributes' is the Math object that uses Object's [[Get]] method to access the 'writable' property of prototype object (8.10.5 step 6.b)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n try {\n Object.prototype.writable = true;\n\n Object.defineProperty(obj, \"property\", Math);\n\n var beforeWrite = obj.hasOwnProperty(\"property\");\n\n obj.property = \"isWritable\";\n\n var afterWrite = (obj.property === \"isWritable\");\n\n return beforeWrite === true && afterWrite === true;\n } finally {\n delete Object.prototype.writable;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-170",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-170.js",
+ "description": "Object.defineProperty - 'Attributes' is the Math object that uses Object's [[Get]] method to access the 'writable' property (8.10.5 step 6.a)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n try {\n Math.writable = true;\n\n Object.defineProperty(obj, \"property\", Math);\n\n var beforeWrite = obj.hasOwnProperty(\"property\");\n\n obj.property = \"isWritable\";\n\n var afterWrite = (obj.property === \"isWritable\");\n\n return beforeWrite === true && afterWrite === true;\n } finally {\n delete Math.writable;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-171-1",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-171-1.js",
+ "description": "Object.defineProperty - 'Attributes' is a Date object that uses Object's [[Get]] method to access the 'writable' property of prototype object (8.10.5 step 6.b)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n try {\n Date.prototype.writable = true;\n\n dateObj = new Date();\n\n Object.defineProperty(obj, \"property\", dateObj);\n\n var beforeWrite = obj.hasOwnProperty(\"property\");\n\n obj.property = \"isWritable\";\n\n var afterWrite = (obj.property === \"isWritable\");\n\n return beforeWrite === true && afterWrite === true;\n } finally {\n delete Date.prototype.writable;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-171",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-171.js",
+ "description": "Object.defineProperty - 'Attributes' is a Date object that uses Object's [[Get]] method to access the 'writable' property (8.10.5 step 6.a)",
+ "test": "assertTrue((function testcase() {\n var obj = { };\n\n var dateObj = new Date();\n\n dateObj.writable = true;\n\n Object.defineProperty(obj, \"property\", dateObj);\n\n var beforeWrite = obj.hasOwnProperty(\"property\");\n\n obj.property = \"isWritable\";\n\n var afterWrite = (obj.property === \"isWritable\");\n\n return beforeWrite === true && afterWrite === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-172-1",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-172-1.js",
+ "description": "Object.defineProperty - 'Attributes' is a RegExp object that uses Object's [[Get]] method to access the 'writable' property of prototype object (8.10.5 step 6.b)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n try {\n RegExp.prototype.writable = true;\n\n var regObj = new RegExp();\n\n Object.defineProperty(obj, \"property\", regObj);\n\n var beforeWrite = obj.hasOwnProperty(\"property\");\n\n obj.property = \"isWritable\";\n\n var afterWrite = (obj.property === \"isWritable\");\n\n return beforeWrite === true && afterWrite === true;\n } finally {\n delete RegExp.prototype.writable;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-172",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-172.js",
+ "description": "Object.defineProperty - 'Attributes' is a RegExp object that uses Object's [[Get]] method to access the 'writable' property (8.10.5 step 6.a)",
+ "test": "assertTrue((function testcase() {\n var obj = { };\n\n var regObj = new RegExp();\n\n regObj.writable = true;\n\n Object.defineProperty(obj, \"property\", regObj);\n\n var beforeWrite = obj.hasOwnProperty(\"property\");\n\n obj.property = \"isWritable\";\n\n var afterWrite = (obj.property === \"isWritable\");\n\n return beforeWrite === true && afterWrite === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-173-1",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-173-1.js",
+ "description": "Object.defineProperty - 'Attributes' is the JSON object that uses Object's [[Get]] method to access the 'writable' property of prototype object (8.10.5 step 6.b)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n try {\n Object.prototype.writable = true;\n\n Object.defineProperty(obj, \"property\", JSON);\n\n var beforeWrite = obj.hasOwnProperty(\"property\");\n\n obj.property = \"isWritable\";\n\n var afterWrite = (obj.property === \"isWritable\");\n\n return beforeWrite === true && afterWrite === true;\n } finally {\n delete Object.prototype.writable;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-173",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-173.js",
+ "description": "Object.defineProperty - 'Attributes' is the JSON object that uses Object's [[Get]] method to access the 'writable' property (8.10.5 step 6.a)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n try {\n JSON.writable = true;\n\n Object.defineProperty(obj, \"property\", JSON);\n\n var beforeWrite = obj.hasOwnProperty(\"property\");\n\n obj.property = \"isWritable\";\n\n var afterWrite = (obj.property === \"isWritable\");\n\n return beforeWrite === true && afterWrite === true;\n } finally {\n delete JSON.writable;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-174-1",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-174-1.js",
+ "description": "Object.defineProperty - 'Attributes' is an Error object that uses Object's [[Get]] method to access the 'writable' property of prototype object (8.10.5 step 6.b)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n try {\n Error.prototype.writable = true;\n\n var errObj = new Error();\n\n Object.defineProperty(obj, \"property\", errObj);\n\n var beforeWrite = obj.hasOwnProperty(\"property\");\n\n obj.property = \"isWritable\";\n\n var afterWrite = (obj.property === \"isWritable\");\n\n return beforeWrite === true && afterWrite === true;\n } finally {\n delete Error.prototype.writable;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-174",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-174.js",
+ "description": "Object.defineProperty - 'Attributes' is an Error object that uses Object's [[Get]] method to access the 'writable' property (8.10.5 step 6.a)",
+ "test": "assertTrue((function testcase() {\n var obj = { };\n\n var errObj = new Error();\n\n errObj.writable = true;\n\n Object.defineProperty(obj, \"property\", errObj);\n\n var beforeWrite = obj.hasOwnProperty(\"property\");\n\n obj.property = \"isWritable\";\n\n var afterWrite = (obj.property === \"isWritable\");\n\n return beforeWrite === true && afterWrite === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-175-1",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-175-1.js",
+ "description": "Object.defineProperty - 'Attributes' is an Arguments object which implements its own [[Get]] method to access the 'writable' property of prototype object (8.10.5 step 6.b)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n try {\n Object.prototype.writable = true;\n\n var argObj = (function () { return arguments; })();\n\n Object.defineProperty(obj, \"property\", argObj);\n\n var beforeWrite = obj.hasOwnProperty(\"property\");\n\n obj.property = \"isWritable\";\n\n var afterWrite = (obj.property === \"isWritable\");\n\n return beforeWrite === true && afterWrite === true;\n } finally {\n delete Object.prototype.writable;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-175",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-175.js",
+ "description": "Object.defineProperty - 'Attributes' is an Arguments object which implements its own [[Get]] method to access the 'writable' property (8.10.5 step 6.a)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n var argObj = (function () { return arguments; })();\n\n argObj.writable = true;\n\n Object.defineProperty(obj, \"property\", argObj);\n\n var beforeWrite = obj.hasOwnProperty(\"property\");\n\n obj.property = \"isWritable\";\n\n var afterWrite = (obj.property === \"isWritable\");\n\n return beforeWrite === true && afterWrite === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-177",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-177.js",
+ "description": "Object.defineProperty - 'Attributes' is the global object that uses Object's [[Get]] method to access the 'writable' property (8.10.5 step 6.a)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n try {\n fnGlobalObject().writable = true;\n\n Object.defineProperty(obj, \"property\", fnGlobalObject());\n\n var beforeWrite = obj.hasOwnProperty(\"property\");\n\n obj.property = \"isWritable\";\n\n var afterWrite = (obj.property === \"isWritable\");\n\n return beforeWrite === true && afterWrite === true;\n } finally {\n delete fnGlobalObject().writable;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-178",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-178.js",
+ "description": "Object.defineProperty - 'writable' property in 'Attributes' is undefined (8.10.5 step 6.b)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n Object.defineProperty(obj, \"property\", {\n writable: undefined\n });\n\n var beforeWrite = obj.hasOwnProperty(\"property\");\n\n obj.property = \"isWritable\";\n\n var afterWrite = (typeof (obj.property) === \"undefined\");\n\n return beforeWrite === true && afterWrite === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-179",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-179.js",
+ "description": "Object.defineProperty - 'writable' property in 'Attributes' is null (8.10.5 step 6.b)",
+ "test": "assertTrue((function testcase() {\n var obj = { };\n\n Object.defineProperty(obj, \"property\", { writable: null });\n\n var beforeWrite = obj.hasOwnProperty(\"property\");\n\n obj.property = \"isWritable\";\n\n var afterWrite = (typeof (obj.property) === \"undefined\");\n\n return beforeWrite === true && afterWrite === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-18",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-18.js",
+ "description": "Object.defineProperty - 'Attributes' is a number primitive (8.10.5 step 1)",
+ "test": "assertTrue((function testcase() {\n\n try {\n Object.defineProperty({}, \"property\", 12);\n return false;\n } catch (e) {\n return e instanceof TypeError;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-180",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-180.js",
+ "description": "Object.defineProperty - 'writable' property in 'Attributes' is true (8.10.5 step 6.b)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n Object.defineProperty(obj, \"property\", { writable: true });\n\n var beforeWrite = obj.hasOwnProperty(\"property\");\n\n obj.property = \"isWritable\";\n\n var afterWrite = (obj.property === \"isWritable\");\n\n return beforeWrite === true && afterWrite === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-181",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-181.js",
+ "description": "Object.defineProperty - 'writable' property in 'Attributes' is false (8.10.5 step 6.b)",
+ "test": "assertTrue((function testcase() {\n var obj = { };\n\n Object.defineProperty(obj, \"property\", { writable: false });\n\n var beforeWrite = obj.hasOwnProperty(\"property\");\n\n obj.property = \"isWritable\";\n\n var afterWrite = (typeof (obj.property) === \"undefined\");\n\n return beforeWrite === true && afterWrite === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-182",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-182.js",
+ "description": "Object.defineProperty - 'writable' property in 'Attributes' is 0 (8.10.5 step 6.b)",
+ "test": "assertTrue((function testcase() {\n var obj = { };\n\n Object.defineProperty(obj, \"property\", { writable: 0 });\n\n var beforeWrite = obj.hasOwnProperty(\"property\");\n\n obj.property = \"isWritable\";\n\n var afterWrite = (typeof (obj.property) === \"undefined\");\n\n return beforeWrite === true && afterWrite === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-183",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-183.js",
+ "description": "Object.defineProperty - 'writable' property in 'Attributes' is +0 (8.10.5 step 6.b)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n Object.defineProperty(obj, \"property\", { writable: +0 });\n\n var beforeWrite = obj.hasOwnProperty(\"property\");\n\n obj.property = \"isWritable\";\n\n var afterWrite = (typeof (obj.property) === \"undefined\");\n\n return beforeWrite === true && afterWrite === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-184",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-184.js",
+ "description": "Object.defineProperty - 'writable' property in 'Attributes' is -0 (8.10.5 step 6.b)",
+ "test": "assertTrue((function testcase() {\n var obj = { };\n\n Object.defineProperty(obj, \"property\", { writable: -0 });\n\n var beforeWrite = obj.hasOwnProperty(\"property\");\n\n obj.property = \"isWritable\";\n\n var afterWrite = (typeof (obj.property) === \"undefined\");\n\n return beforeWrite === true && afterWrite === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-185",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-185.js",
+ "description": "Object.defineProperty - 'writable' property in 'Attributes' is NaN (8.10.5 step 6.b)",
+ "test": "assertTrue((function testcase() {\n var obj = { };\n\n Object.defineProperty(obj, \"property\", { writable: NaN});\n\n var beforeWrite = obj.hasOwnProperty(\"property\");\n\n obj.property = \"isWritable\";\n\n var afterWrite = (typeof (obj.property) === \"undefined\");\n\n return beforeWrite === true && afterWrite === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-186",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-186.js",
+ "description": "Object.defineProperty - 'writable' property in 'Attributes' is a positive number (8.10.5 step 6.b)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n Object.defineProperty(obj, \"property\", { writable: 12345 });\n\n var beforeWrite = obj.hasOwnProperty(\"property\");\n\n obj.property = \"isWritable\";\n\n var afterWrite = (obj.property === \"isWritable\");\n\n return beforeWrite === true && afterWrite === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-187",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-187.js",
+ "description": "Object.defineProperty - 'writable' property in 'Attributes' is a negative number (8.10.5 step 6.b)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n Object.defineProperty(obj, \"property\", { writable: -12345 });\n\n var beforeWrite = obj.hasOwnProperty(\"property\");\n\n obj.property = \"isWritable\";\n\n var afterWrite = (obj.property === \"isWritable\");\n\n return beforeWrite === true && afterWrite === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-188",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-188.js",
+ "description": "Object.defineProperty - 'writable' property in 'Attributes' is an empty string (8.10.5 step 6.b)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n Object.defineProperty(obj, \"property\", { writable: \"\" });\n\n var beforeWrite = obj.hasOwnProperty(\"property\");\n\n obj.property = \"isWritable\";\n\n var afterWrite = (typeof (obj.property) === \"undefined\");\n\n return beforeWrite === true && afterWrite === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-189",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-189.js",
+ "description": "Object.defineProperty - 'writable' property in 'Attributes' is a non-empty string (8.10.5 step 6.b)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n Object.defineProperty(obj, \"property\", { writable: \" \" });\n\n var beforeWrite = obj.hasOwnProperty(\"property\");\n\n obj.property = \"isWritable\";\n\n var afterWrite = (obj.property === \"isWritable\");\n\n return beforeWrite === true && afterWrite === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-19",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-19.js",
+ "description": "Object.defineProperty - 'Attributes' is a string primitive (8.10.5 step 1)",
+ "test": "assertTrue((function testcase() {\n\n try {\n Object.defineProperty({}, \"property\", \"abc\");\n return false;\n } catch (e) {\n return e instanceof TypeError;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-190",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-190.js",
+ "description": "Object.defineProperty - 'writable' property in 'Attributes' is a Function object (8.10.5 step 6.b)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n Object.defineProperty(obj, \"property\", {\n writable: function () { }\n });\n\n var beforeWrite = obj.hasOwnProperty(\"property\");\n\n obj.property = \"isWritable\";\n\n var afterWrite = (obj.property === \"isWritable\");\n\n return beforeWrite === true && afterWrite === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-191",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-191.js",
+ "description": "Object.defineProperty - 'writable' property in 'Attributes' is an Array object (8.10.5 step 6.b)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n Object.defineProperty(obj, \"property\", { writable: [1, 2, 3] });\n\n var beforeWrite = obj.hasOwnProperty(\"property\");\n\n obj.property = \"isWritable\";\n\n var afterWrite = (obj.property === \"isWritable\");\n\n return beforeWrite === true && afterWrite === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-192",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-192.js",
+ "description": "Object.defineProperty - 'writable' property in 'Attributes' is a String object (8.10.5 step 6.b)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n Object.defineProperty(obj, \"property\", { writable: new String(\"bbq\") });\n\n var beforeWrite = obj.hasOwnProperty(\"property\");\n\n obj.property = \"isWritable\";\n\n var afterWrite = (obj.property === \"isWritable\");\n\n return beforeWrite === true && afterWrite === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-193",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-193.js",
+ "description": "Object.defineProperty - 'writable' property in 'Attributes' is a Boolean object (8.10.5 step 6.b)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n Object.defineProperty(obj, \"property\", { writable: new Boolean(true) });\n\n var beforeWrite = obj.hasOwnProperty(\"property\");\n\n obj.property = \"isWritable\";\n\n var afterWrite = (obj.property === \"isWritable\");\n\n return beforeWrite === true && afterWrite === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-194",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-194.js",
+ "description": "Object.defineProperty - 'writable' property in 'Attributes' is a Number object (8.10.5 step 6.b)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n Object.defineProperty(obj, \"property\", { writable: new Number(123) });\n\n var beforeWrite = obj.hasOwnProperty(\"property\");\n\n obj.property = \"isWritable\";\n\n var afterWrite = (obj.property === \"isWritable\");\n\n return beforeWrite === true && afterWrite === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-195",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-195.js",
+ "description": "Object.defineProperty - 'writable' property in 'Attributes' is the Math object (8.10.5 step 6.b)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n Object.defineProperty(obj, \"property\", { writable: Math });\n\n var beforeWrite = obj.hasOwnProperty(\"property\");\n\n obj.property = \"isWritable\";\n\n var afterWrite = (obj.property === \"isWritable\");\n\n return beforeWrite === true && afterWrite === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-196",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-196.js",
+ "description": "Object.defineProperty - 'writable' property in 'Attributes' is a Date object (8.10.5 step 6.b)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n Object.defineProperty(obj, \"property\", { writable: new Date() });\n\n var beforeWrite = obj.hasOwnProperty(\"property\");\n\n obj.property = \"isWritable\";\n\n var afterWrite = (obj.property === \"isWritable\");\n\n return beforeWrite === true && afterWrite === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-197",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-197.js",
+ "description": "Object.defineProperty - 'writable' property in 'Attributes' is a RegExp object (8.10.5 step 6.b)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n Object.defineProperty(obj, \"property\", {\n writable: new RegExp()\n });\n\n var beforeWrite = obj.hasOwnProperty(\"property\") && typeof obj.property === \"undefined\";\n\n obj.property = \"isWritable\";\n\n var afterWrite = (obj.property === \"isWritable\");\n\n return beforeWrite && afterWrite;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-198",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-198.js",
+ "description": "Object.defineProperty - 'writable' property in 'Attributes' is the JSON object (8.10.5 step 6.b)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n Object.defineProperty(obj, \"property\", { writable: JSON });\n\n var beforeWrite = obj.hasOwnProperty(\"property\");\n\n obj.property = \"isWritable\";\n\n var afterWrite = (obj.property === \"isWritable\");\n\n return beforeWrite === true && afterWrite === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-199",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-199.js",
+ "description": "Object.defineProperty - 'writable' property in 'Attributes' is a Error object (8.10.5 step 6.b)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n Object.defineProperty(obj, \"property\", { writable: new SyntaxError() });\n\n var beforeWrite = obj.hasOwnProperty(\"property\");\n\n obj.property = \"isWritable\";\n\n var afterWrite = (obj.property === \"isWritable\");\n\n return beforeWrite === true && afterWrite === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-2",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-2.js",
+ "description": "Object.defineProperty throws TypeError if desc has 'get' and 'writable' present(8.10.5 step 9.a)",
+ "test": "assertTrue((function testcase() {\n var o = {};\n \n // dummy getter\n var getter = function () { return 1; }\n var desc = { get: getter, writable: false };\n \n try {\n Object.defineProperty(o, \"foo\", desc);\n }\n catch (e) {\n if (e instanceof TypeError &&\n (o.hasOwnProperty(\"foo\") === false)) {\n return true;\n }\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-20",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-20.js",
+ "description": "Object.defineProperty - 'enumerable' property in 'Attributes' is present (8.10.5 step 3)",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n\n var accessed = false;\n Object.defineProperty(obj, \"property\", {\n enumerable: false\n });\n\n for (var prop in obj) {\n if (prop === \"property\") {\n accessed = true;\n }\n }\n return !accessed && obj.hasOwnProperty(\"property\");\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-200",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-200.js",
+ "description": "Object.defineProperty - 'writable' property in 'Attributes' is the Argument object (8.10.5 step 6.b)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n var argObj = (function () { return arguments; })(1, true, \"a\");\n\n Object.defineProperty(obj, \"property\", { writable: argObj });\n\n var beforeWrite = obj.hasOwnProperty(\"property\");\n\n obj.property = \"isWritable\";\n\n var afterWrite = (obj.property === \"isWritable\");\n\n return beforeWrite === true && afterWrite === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-202",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-202.js",
+ "description": "Object.defineProperty - 'writable' property in 'Attributes' is the global object (8.10.5 step 6.b)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n Object.defineProperty(obj, \"property\", {\n writable: fnGlobalObject()\n });\n\n var beforeWrite = obj.hasOwnProperty(\"property\");\n\n obj.property = \"isWritable\";\n\n var afterWrite = (obj.property === \"isWritable\");\n\n return beforeWrite === true && afterWrite === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-203",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-203.js",
+ "description": "Object.defineProperty - 'writable' property in 'Attributes' is treated as true when it is a string(value is 'false') (8.10.5 step 6.b)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n Object.defineProperty(obj, \"property\", { writable: \"false\" });\n\n var beforeWrite = obj.hasOwnProperty(\"property\");\n\n obj.property = \"isWritable\";\n\n var afterWrite = (obj.property === \"isWritable\");\n\n return beforeWrite === true && afterWrite === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-204",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-204.js",
+ "description": "Object.defineProperty - 'writable' property in 'Attributes' is treated as true when it is new Boolean(false) (8.10.5 step 6.b)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n Object.defineProperty(obj, \"property\", { writable: new Boolean(false) });\n\n var beforeWrite = obj.hasOwnProperty(\"property\");\n\n obj.property = \"isWritable\";\n\n var afterWrite = (obj.property === \"isWritable\");\n\n return beforeWrite === true && afterWrite === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-205",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-205.js",
+ "description": "Object.defineProperty - 'get' property in 'Attributes' is present (8.10.5 step 7)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n Object.defineProperty(obj, \"property\", {\n get: function () {\n return \"present\";\n }\n });\n\n return obj.property === \"present\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-206",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-206.js",
+ "description": "Object.defineProperty - 'get' property in 'Attributes' is not present (8.10.5 step 7)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n Object.defineProperty(obj, \"property\", {\n set: function () {}\n });\n\n return typeof obj.property === \"undefined\" && obj.hasOwnProperty(\"property\");\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-207",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-207.js",
+ "description": "Object.defineProperty - 'get' property in 'Attributes' is own data property (8.10.5 step 7.a)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n var attributes = {\n get: function () {\n return \"ownDataProperty\";\n }\n };\n\n Object.defineProperty(obj, \"property\", attributes);\n\n return obj.property === \"ownDataProperty\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-208",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-208.js",
+ "description": "Object.defineProperty - 'get' property in 'Attributes' is an inherited data property (8.10.5 step 7.a)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n var proto = {\n get: function () {\n return \"inheritedDataProperty\";\n }\n };\n\n var ConstructFun = function () { };\n ConstructFun.prototype = proto;\n\n var child = new ConstructFun();\n\n Object.defineProperty(obj, \"property\", child);\n\n return obj.property === \"inheritedDataProperty\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-209",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-209.js",
+ "description": "Object.defineProperty - 'get' property in 'Attributes' is own data property that overrides an inherited data property (8.10.5 step 7.a)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n var proto = {\n get: function () {\n return \"inheritedDataProperty\";\n }\n };\n\n var ConstructFun = function () { };\n ConstructFun.prototype = proto;\n\n var child = new ConstructFun();\n child.get = function () {\n return \"ownDataProperty\";\n };\n\n Object.defineProperty(obj, \"property\", child);\n\n return obj.property === \"ownDataProperty\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-21",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-21.js",
+ "description": "Object.defineProperty - 'enumerable' property in 'Attributes' is not present (8.10.5 step 3)",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n\n var attr = {};\n var accessed = false;\n Object.defineProperty(obj, \"property\", attr);\n\n for (var prop in obj) {\n if (prop === \"property\") {\n accessed = true;\n }\n }\n return !accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-210",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-210.js",
+ "description": "Object.defineProperty - 'get' property in 'Attributes' is own data property that overrides an inherited accessor property (8.10.5 step 7.a)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n var proto = {};\n var fun = function () {\n return \"inheritedAccessorProperty\";\n };\n Object.defineProperty(proto, \"get\", {\n get: function () {\n return fun;\n }\n });\n\n var ConstructFun = function () { };\n ConstructFun.prototype = proto;\n\n var child = new ConstructFun();\n Object.defineProperty(child, \"get\", {\n value: function () {\n return \"ownDataProperty\";\n }\n });\n\n Object.defineProperty(obj, \"property\", child);\n\n return obj.property === \"ownDataProperty\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-211",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-211.js",
+ "description": "Object.defineProperty - 'get' property in 'Attributes' is own accessor property (8.10.5 step 7.a)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n var attributes = {};\n Object.defineProperty(attributes, \"get\", {\n get: function () {\n return function () {\n return \"ownAccessorProperty\";\n };\n }\n });\n\n Object.defineProperty(obj, \"property\", attributes);\n\n return obj.property === \"ownAccessorProperty\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-212",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-212.js",
+ "description": "Object.defineProperty - 'get' property in 'Attributes' is an inherited accessor property (8.10.5 step 7.a)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n var proto = {};\n Object.defineProperty(proto, \"get\", {\n get: function () {\n return function () {\n return \"inheritedAccessorProperty\";\n };\n }\n });\n\n var ConstructFun = function () { };\n ConstructFun.prototype = proto;\n\n var child = new ConstructFun();\n\n Object.defineProperty(obj, \"property\", child);\n\n return obj.property === \"inheritedAccessorProperty\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-213",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-213.js",
+ "description": "Object.defineProperty - 'get' property in 'Attributes' is own accessor property that overrides an inherited data property (8.10.5 step 7.a)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n var proto = {\n get: function () {\n return \"inheritedDataProperty\";\n }\n };\n\n var ConstructFun = function () { };\n ConstructFun.prototype = proto;\n\n var child = new ConstructFun();\n Object.defineProperty(child, \"get\", {\n get: function () {\n return function () {\n return \"ownAccessorProperty\";\n };\n }\n });\n\n Object.defineProperty(obj, \"property\", child);\n\n return obj.property === \"ownAccessorProperty\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-214",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-214.js",
+ "description": "Object.defineProperty - 'get' property in 'Attributes' is own accessor property that overrides an inherited accessor property (8.10.5 step 7.a)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n var proto = {};\n Object.defineProperty(proto, \"get\", {\n get: function () {\n return function () {\n return \"inheritedAccessorProperty\";\n };\n }\n });\n\n var ConstructFun = function () { };\n ConstructFun.prototype = proto;\n\n var child = new ConstructFun();\n Object.defineProperty(child, \"get\", {\n get: function () {\n return function () {\n return \"ownAccessorProperty\";\n };\n }\n });\n\n Object.defineProperty(obj, \"property\", child);\n\n return obj.property === \"ownAccessorProperty\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-215",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-215.js",
+ "description": "Object.defineProperty - 'get' property in 'Attributes' is own accessor property without a get function (8.10.5 step 7.a)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n var attributes = {};\n Object.defineProperty(attributes, \"get\", {\n set: function () { }\n });\n\n Object.defineProperty(obj, \"property\", attributes);\n\n return typeof obj.property === \"undefined\" && obj.hasOwnProperty(\"property\");\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-216",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-216.js",
+ "description": "Object.defineProperty - 'get' property in 'Attributes' is own accessor property(without a get function) that overrides an inherited accessor property (8.10.5 step 7.a)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n var proto = {};\n Object.defineProperty(proto, \"get\", {\n get: function () {\n return function () {\n return \"inheritedAccessorProperty\";\n };\n }\n });\n\n var ConstructFun = function () { };\n ConstructFun.prototype = proto;\n\n var child = new ConstructFun();\n Object.defineProperty(child, \"get\", {\n set: function () { }\n });\n\n Object.defineProperty(obj, \"property\", child);\n\n return obj.hasOwnProperty(\"property\") && typeof obj.property === \"undefined\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-217",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-217.js",
+ "description": "Object.defineProperty - 'get' property in 'Attributes' is an inherited accessor property without a get function (8.10.5 step 7.a)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n var proto = {};\n Object.defineProperty(proto, \"get\", {\n set: function () { }\n });\n\n var ConstructFun = function () { };\n ConstructFun.prototype = proto;\n\n var child = new ConstructFun();\n\n Object.defineProperty(obj, \"property\", child);\n\n return obj.hasOwnProperty(\"property\") && typeof obj.property === \"undefined\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-218-1",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-218-1.js",
+ "description": "Object.defineProperty - 'Attributes' is a Function object which implements its own [[Get]] method to access the 'get' property of prototype object (8.10.5 step 7.a)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n try {\n Function.prototype.get = function () {\n return \"functionGetProperty\";\n };\n var funObj = function () { };\n\n Object.defineProperty(obj, \"property\", funObj);\n\n return obj.property === \"functionGetProperty\";\n } finally {\n delete Function.prototype.get;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-218",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-218.js",
+ "description": "Object.defineProperty - 'Attributes' is a Function object which implements its own [[Get]] method to access the 'get' property (8.10.5 step 7.a)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n var funObj = function () { };\n\n funObj.get = function () {\n return \"functionGetProperty\";\n };\n\n Object.defineProperty(obj, \"property\", funObj);\n\n return obj.property === \"functionGetProperty\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-219-1",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-219-1.js",
+ "description": "Object.defineProperty - 'Attributes' is an Array object that uses Object's [[Get]] method to access the 'get' property of prototype object (8.10.5 step 7.a)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n try {\n Array.prototype.get = function () {\n return \"arrayGetProperty\";\n };\n var arrObj = [];\n\n Object.defineProperty(obj, \"property\", arrObj);\n\n return obj.property === \"arrayGetProperty\";\n } finally {\n delete Array.prototype.get;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-219",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-219.js",
+ "description": "Object.defineProperty - 'Attributes' is an Array object that uses Object's [[Get]] method to access the 'get' property (8.10.5 step 7.a)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n var arrObj = [];\n\n arrObj.get = function () {\n return \"arrayGetProperty\";\n };\n\n Object.defineProperty(obj, \"property\", arrObj);\n\n return obj.property === \"arrayGetProperty\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-22",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-22.js",
+ "description": "Object.defineProperty - 'enumerable' property in 'Attributes' is own data property (8.10.5 step 3.a)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n var accessed = false;\n\n Object.defineProperty(obj, \"property\", {\n enumerable: true\n });\n\n for (var prop in obj) {\n if (prop === \"property\") {\n accessed = true;\n }\n }\n return accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-220-1",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-220-1.js",
+ "description": "Object.defineProperty - 'Attributes' is a String object that uses Object's [[Get]] method to access the 'get' property of prototype object (8.10.5 step 7.a)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n try {\n String.prototype.get = function () {\n return \"stringGetProperty\";\n };\n var strObj = new String();\n\n Object.defineProperty(obj, \"property\", strObj);\n\n return obj.property === \"stringGetProperty\";\n } finally {\n delete String.prototype.get;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-220",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-220.js",
+ "description": "Object.defineProperty - 'Attributes' is a String object that uses Object's [[Get]] method to access the 'get' property (8.10.5 step 7.a)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n var strObj = new String();\n\n strObj.get = function () {\n return \"stringGetProperty\";\n };\n\n Object.defineProperty(obj, \"property\", strObj);\n\n return obj.property === \"stringGetProperty\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-221-1",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-221-1.js",
+ "description": "Object.defineProperty - 'Attributes' is a Boolean object that uses Object's [[Get]] method to access the 'get' property of prototype object (8.10.5 step 7.a)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n try {\n Boolean.prototype.get = function () {\n return \"booleanGetProperty\";\n };\n var boolObj = new Boolean(true);\n\n Object.defineProperty(obj, \"property\", boolObj);\n\n return obj.property === \"booleanGetProperty\";\n } finally {\n delete Boolean.prototype.get;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-221",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-221.js",
+ "description": "Object.defineProperty - 'Attributes' is a Boolean object that uses Object's [[Get]] method to access the 'get' property (8.10.5 step 7.a)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n var boolObj = new Boolean(true);\n\n boolObj.get = function () {\n return \"booleanGetProperty\";\n };\n\n Object.defineProperty(obj, \"property\", boolObj);\n\n return obj.property === \"booleanGetProperty\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-222-1",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-222-1.js",
+ "description": "Object.defineProperty - 'Attributes' is a Number object that uses Object's [[Get]] method to access the 'get' property of prototype object (8.10.5 step 7.a)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n try {\n Number.prototype.get = function () {\n return \"numberGetProperty\";\n };\n var numObj = new Number(-2);\n\n Object.defineProperty(obj, \"property\", numObj);\n\n return obj.property === \"numberGetProperty\";\n } finally {\n delete Number.prototype.get;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-222",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-222.js",
+ "description": "Object.defineProperty - 'Attributes' is a Number object that uses Object's [[Get]] method to access the 'get' property (8.10.5 step 7.a)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n var numObj = new Number(-2);\n\n numObj.get = function () {\n return \"numberGetProperty\";\n };\n\n Object.defineProperty(obj, \"property\", numObj);\n\n return obj.property === \"numberGetProperty\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-223-1",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-223-1.js",
+ "description": "Object.defineProperty - 'Attributes' is the Math object that uses Object's [[Get]] method to access the 'get' property of prototype object (8.10.5 step 7.a)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n try {\n Object.prototype.get = function () {\n return \"mathGetProperty\";\n };\n\n Object.defineProperty(obj, \"property\", Math);\n\n return obj.property === \"mathGetProperty\";\n } finally {\n delete Object.prototype.get;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-223",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-223.js",
+ "description": "Object.defineProperty - 'Attributes' is the Math object that uses Object's [[Get]] method to access the 'get' property (8.10.5 step 7.a)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n try {\n Math.get = function () {\n return \"mathGetProperty\";\n };\n\n Object.defineProperty(obj, \"property\", Math);\n\n return obj.property === \"mathGetProperty\";\n } finally {\n delete Math.get;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-224-1",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-224-1.js",
+ "description": "Object.defineProperty - 'Attributes' is a Date object that uses Object's [[Get]] method to access the 'get' property of prototype object (8.10.5 step 7.a)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n try {\n Date.prototype.get = function () {\n return \"dateGetProperty\";\n };\n var dateObj = new Date();\n\n Object.defineProperty(obj, \"property\", dateObj);\n\n return obj.property === \"dateGetProperty\";\n } finally {\n delete Date.prototype.get;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-224",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-224.js",
+ "description": "Object.defineProperty - 'Attributes' is a Date object that uses Object's [[Get]] method to access the 'get' property (8.10.5 step 7.a)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n var dateObj = new Date();\n\n dateObj.get = function () {\n return \"dateGetProperty\";\n };\n\n Object.defineProperty(obj, \"property\", dateObj);\n\n return obj.property === \"dateGetProperty\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-225-1",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-225-1.js",
+ "description": "Object.defineProperty - 'Attributes' is a RegExp object that uses Object's [[Get]] method to access the 'get' property of prototype object (8.10.5 step 7.a)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n try {\n RegExp.prototype.get = function () {\n return \"regExpGetProperty\";\n };\n var regObj = new RegExp();\n\n\n Object.defineProperty(obj, \"property\", regObj);\n\n return obj.property === \"regExpGetProperty\";\n } finally {\n delete RegExp.prototype.get;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-225",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-225.js",
+ "description": "Object.defineProperty - 'Attributes' is a RegExp object that uses Object's [[Get]] method to access the 'get' property (8.10.5 step 7.a)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n var regObj = new RegExp();\n\n regObj.get = function () {\n return \"regExpGetProperty\";\n };\n\n Object.defineProperty(obj, \"property\", regObj);\n\n return obj.property === \"regExpGetProperty\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-226-1",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-226-1.js",
+ "description": "Object.defineProperty - 'Attributes' is the JSON object that uses Object's [[Get]] method to access the 'get' property of prototype object (8.10.5 step 7.a)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n try {\n Object.prototype.get = function () {\n return \"jsonGetProperty\";\n };\n\n Object.defineProperty(obj, \"property\", JSON);\n\n return obj.property === \"jsonGetProperty\";\n } finally {\n delete Object.prototype.get;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-226",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-226.js",
+ "description": "Object.defineProperty - 'Attributes' is the JSON object that uses Object's [[Get]] method to access the 'get' property (8.10.5 step 7.a)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n try {\n JSON.get = function () {\n return \"jsonGetProperty\";\n };\n\n Object.defineProperty(obj, \"property\", JSON);\n\n return obj.property === \"jsonGetProperty\";\n } finally {\n delete JSON.get;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-227-1",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-227-1.js",
+ "description": "Object.defineProperty - 'Attributes' is an Error object that uses Object's [[Get]] method to access the 'get' property of prototype object (8.10.5 step 7.a)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n try {\n Error.prototype.get = function () {\n return \"errorGetProperty\";\n };\n var errObj = new Error();\n\n Object.defineProperty(obj, \"property\", errObj);\n\n return obj.property === \"errorGetProperty\";\n } finally {\n delete Error.prototype.get;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-227",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-227.js",
+ "description": "Object.defineProperty - 'Attributes' is an Error object that uses Object's [[Get]] method to access the 'get' property (8.10.5 step 7.a)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n var errObj = new Error();\n\n errObj.get = function () {\n return \"errorGetProperty\";\n };\n\n Object.defineProperty(obj, \"property\", errObj);\n\n return obj.property === \"errorGetProperty\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-228-1",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-228-1.js",
+ "description": "Object.defineProperty - 'Attributes' is an Arguments object which implements its own [[Get]] method to access the 'get' property of prototype object (8.10.5 step 7.a)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n try {\n Object.prototype.get = function () {\n return \"argumentGetProperty\";\n };\n var argObj = (function () { return arguments; })();\n\n Object.defineProperty(obj, \"property\", argObj);\n\n return obj.property === \"argumentGetProperty\";\n } finally {\n delete Object.prototype.get;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-228",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-228.js",
+ "description": "Object.defineProperty - 'Attributes' is an Arguments object which implements its own [[Get]] method to access the 'get' property (8.10.5 step 7.a)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n var argObj = (function () { return arguments; })();\n\n argObj.get = function () {\n return \"argumentGetProperty\";\n };\n\n Object.defineProperty(obj, \"property\", argObj);\n\n return obj.property === \"argumentGetProperty\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-23",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-23.js",
+ "description": "Object.defineProperty - 'enumerable' property in 'Attributes' is an inherited data property (8.10.5 step 3.a)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n var accessed = false;\n\n var proto = {};\n Object.defineProperty(proto, \"enumerable\", {\n value: true\n });\n\n var ConstructFun = function () { };\n ConstructFun.prototype = proto;\n\n var child = new ConstructFun();\n\n Object.defineProperty(obj, \"property\", child);\n\n for (var prop in obj) {\n if (prop === \"property\") {\n accessed = true;\n }\n }\n return accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-230",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-230.js",
+ "description": "Object.defineProperty - 'Attributes' is the global object that uses Object's [[Get]] method to access the 'get' property (8.10.5 step 7.a)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n try {\n fnGlobalObject().get = function () {\n return \"globalGetProperty\";\n };\n\n Object.defineProperty(obj, \"property\", fnGlobalObject());\n\n return obj.property === \"globalGetProperty\";\n } finally {\n delete fnGlobalObject().get;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-231",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-231.js",
+ "description": "Object.defineProperty - value of 'get' property in 'Attributes' is undefined (8.10.5 step 7.b)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n Object.defineProperty(obj, \"property\", {\n get: undefined\n });\n\n return obj.hasOwnProperty(\"property\") && typeof obj.property === \"undefined\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-232",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-232.js",
+ "description": "Object.defineProperty - value of 'get' property in 'Attributes' is a function (8.10.5 step 7.b)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n Object.defineProperty(obj, \"property\", {\n get: function () {\n return \"getFunction\";\n }\n });\n\n return obj.hasOwnProperty(\"property\") && obj.property === \"getFunction\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-235",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-235.js",
+ "description": "Object.defineProperty - 'set' property in 'Attributes' is present (8.10.5 step 8)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n var data = \"data\";\n\n Object.defineProperty(obj, \"property\", {\n set: function (value) {\n data = value;\n }\n });\n\n obj.property = \"overrideData\";\n\n return obj.hasOwnProperty(\"property\") && data === \"overrideData\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-236",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-236.js",
+ "description": "Object.defineProperty - 'set' property in 'Attributes' is not present (8.10.5 step 8)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n Object.defineProperty(obj, \"property\", {\n get: function () {\n return 11;\n }\n });\n\n obj.property = 14;\n var desc = Object.getOwnPropertyDescriptor(obj, \"property\");\n return obj.hasOwnProperty(\"property\") && obj.property === 11 && typeof desc.set === \"undefined\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-3-237",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-237.js",
+ "description": "Object.defineProperty - 'set' property in 'Attributes' is own data property (8.10.5 step 8.a)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n var data = \"data\";\n\n Object.defineProperty(obj, \"property\", {\n set: function (value) {\n data = value;\n }\n });\n\n obj.property = \"overrideData\";\n\n return obj.hasOwnProperty(\"property\") && data === \"overrideData\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-238",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-238.js",
+ "description": "Object.defineProperty - 'set' property in 'Attributes' is an inherited data property (8.10.5 step 8.a)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n var data = \"data\";\n var proto = {\n set: function (value) {\n data = value;\n }\n };\n\n var ConstructFun = function () { };\n ConstructFun.prototype = proto;\n\n var child = new ConstructFun();\n\n Object.defineProperty(obj, \"property\", child);\n\n obj.property = \"overrideData\";\n\n return obj.hasOwnProperty(\"property\") && data === \"overrideData\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-239",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-239.js",
+ "description": "Object.defineProperty - 'set' property in 'Attributes' is own data property that overrides an inherited data property (8.10.5 step 8.a)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n var data1 = \"data\";\n var data2 = \"data\";\n var proto = {\n set: function (value) {\n data1 = value;\n }\n };\n\n var ConstructFun = function () { };\n ConstructFun.prototype = proto;\n\n var child = new ConstructFun();\n child.set = function (value) {\n data2 = value;\n };\n\n Object.defineProperty(obj, \"property\", child);\n\n obj.property = \"overrideData\";\n\n return obj.hasOwnProperty(\"property\") && data1 === \"data\" && data2 === \"overrideData\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-24",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-24.js",
+ "description": "Object.defineProperty - 'enumerable' property in 'Attributes' is own data property that overrides an inherited data property (8.10.5 step 3.a)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n var accessed = false;\n\n var proto = {};\n Object.defineProperty(proto, \"enumerable\", {\n value: false\n });\n\n var ConstructFun = function () { };\n ConstructFun.prototype = proto;\n\n var child = new ConstructFun();\n Object.defineProperty(child, \"enumerable\", {\n value: true\n });\n\n Object.defineProperty(obj, \"property\", child);\n\n for (var prop in obj) {\n if (prop === \"property\") {\n accessed = true;\n }\n }\n\n return accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-240",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-240.js",
+ "description": "Object.defineProperty - 'set' property in 'Attributes' is own data property that overrides an inherited accessor property (8.10.5 step 8.a)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n var proto = {};\n var data1 = \"data\";\n var data2 = \"data\";\n\n Object.defineProperty(proto, \"set\", {\n get: function () {\n return function (value) {\n data1 = value;\n };\n }\n });\n\n var ConstructFun = function () { };\n ConstructFun.prototype = proto;\n\n var child = new ConstructFun();\n Object.defineProperty(child, \"set\", {\n value: function (value) {\n data2 = value;\n }\n });\n\n Object.defineProperty(obj, \"property\", child);\n\n obj.property = \"overrideData\";\n\n return obj.hasOwnProperty(\"property\") && data1 === \"data\" && data2 === \"overrideData\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-241",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-241.js",
+ "description": "Object.defineProperty - 'set' property in 'Attributes' is own accessor property (8.10.5 step 8.a)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n var data = \"data\";\n var attributes = {};\n Object.defineProperty(attributes, \"set\", {\n get: function () {\n return function (value) {\n data = value;\n };\n }\n });\n\n Object.defineProperty(obj, \"property\", attributes);\n obj.property = \"ownAccessorProperty\";\n\n return obj.hasOwnProperty(\"property\") && data === \"ownAccessorProperty\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-242",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-242.js",
+ "description": "Object.defineProperty - 'set' property in 'Attributes' is an inherited accessor property (8.10.5 step 8.a)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n var proto = {};\n var data = \"data\";\n Object.defineProperty(proto, \"set\", {\n get: function () {\n return function (value) {\n data = value;\n };\n }\n });\n\n var ConstructFun = function () { };\n ConstructFun.prototype = proto;\n\n var child = new ConstructFun();\n\n Object.defineProperty(obj, \"property\", child);\n obj.property = \"inheritedAccessorProperty\";\n\n return obj.hasOwnProperty(\"property\") && data === \"inheritedAccessorProperty\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-243",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-243.js",
+ "description": "Object.defineProperty - 'set' property in 'Attributes' is own accessor property that overrides an inherited data property (8.10.5 step 8.a)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n var data1 = \"data\";\n var data2 = \"data\";\n\n var proto = {\n set: function (value) {\n data1 = value;\n }\n };\n\n var ConstructFun = function () { };\n ConstructFun.prototype = proto;\n\n var child = new ConstructFun();\n Object.defineProperty(child, \"set\", {\n get: function () {\n return function (value) {\n data2 = value;\n };\n }\n });\n\n Object.defineProperty(obj, \"property\", child);\n obj.property = \"ownAccessorProperty\";\n\n return obj.hasOwnProperty(\"property\") && data1 === \"data\" && data2 === \"ownAccessorProperty\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-244",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-244.js",
+ "description": "Object.defineProperty - 'set' property in 'Attributes' is own accessor property that overrides an inherited accessor property (8.10.5 step 8.a)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n var proto = {};\n var data1 = \"data\";\n var data2 = \"data\";\n Object.defineProperty(proto, \"set\", {\n get: function () {\n return function (value) {\n data1 = value;\n };\n }\n });\n\n var ConstructFun = function () { };\n ConstructFun.prototype = proto;\n\n var child = new ConstructFun();\n Object.defineProperty(child, \"set\", {\n get: function () {\n return function (value) {\n data2 = value;\n };\n }\n });\n\n Object.defineProperty(obj, \"property\", child);\n obj.property = \"ownAccessorProperty\";\n\n return obj.hasOwnProperty(\"property\") && data1 === \"data\" && data2 === \"ownAccessorProperty\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-245",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-245.js",
+ "description": "Object.defineProperty - 'set' property in 'Attributes' is own accessor property without a get function (8.10.5 step 8.a)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n var attributes = {};\n Object.defineProperty(attributes, \"set\", {\n set: function () { }\n });\n\n Object.defineProperty(obj, \"property\", attributes);\n\n obj.property = \"overrideOwnData\";\n\n var desc = Object.getOwnPropertyDescriptor(obj, \"property\");\n return obj.hasOwnProperty(\"property\") && typeof obj.property === \"undefined\" &&\n typeof desc.set === \"undefined\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-3-246",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-246.js",
+ "description": "Object.defineProperty - 'set' property in 'Attributes' is own accessor property(without a get function) that overrides an inherited accessor property (8.10.5 step 8.a)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n var proto = {};\n var data = \"data\";\n Object.defineProperty(proto, \"set\", {\n get: function () {\n return function (value) {\n data = value;\n };\n }\n });\n\n var ConstructFun = function () { };\n ConstructFun.prototype = proto;\n\n var child = new ConstructFun();\n Object.defineProperty(child, \"set\", {\n set: function () { }\n });\n\n Object.defineProperty(obj, \"property\", child);\n\n obj.property = \"overrideData\";\n return obj.hasOwnProperty(\"property\") && typeof obj.property === \"undefined\" && data === \"data\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-247",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-247.js",
+ "description": "Object.defineProperty - 'set' property in 'Attributes' is an inherited accessor property without a get function (8.10.5 step 8.a)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n var proto = {};\n Object.defineProperty(proto, \"set\", {\n set: function () { }\n });\n\n var ConstructFun = function () { };\n ConstructFun.prototype = proto;\n\n var child = new ConstructFun();\n\n Object.defineProperty(obj, \"property\", child);\n\n obj.property = \"overrideData\";\n return obj.hasOwnProperty(\"property\") && typeof obj.property === \"undefined\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-248-1",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-248-1.js",
+ "description": "Object.defineProperty - 'Attributes' is a Function object which implements its own [[Get]] method to access the 'set' property of prototype object (8.10.5 step 8.a)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n var data = \"data\";\n try {\n Function.prototype.set = function (value) {\n data = value;\n };\n var funObj = function () { };\n\n Object.defineProperty(obj, \"property\", funObj);\n obj.property = \"overrideData\";\n\n return obj.hasOwnProperty(\"property\") && data === \"overrideData\";\n } finally {\n delete Function.prototype.set;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-248",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-248.js",
+ "description": "Object.defineProperty - 'Attributes' is a Function object which implements its own [[Get]] method to access the 'set' property (8.10.5 step 8.a)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n var data = \"data\";\n var funObj = function () { };\n\n funObj.set = function (value) {\n data = value;\n };\n\n Object.defineProperty(obj, \"property\", funObj);\n obj.property = \"overrideData\";\n\n return obj.hasOwnProperty(\"property\") && data === \"overrideData\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-249-1",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-249-1.js",
+ "description": "Object.defineProperty - 'Attributes' is an Array object that uses Object's [[Get]] method to access the 'set' property of prototype object (8.10.5 step 8.a)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n var data = \"data\";\n try {\n Array.prototype.set = function (value) {\n data = value;\n };\n var arrObj = [];\n\n Object.defineProperty(obj, \"property\", arrObj);\n obj.property = \"overrideData\";\n\n return obj.hasOwnProperty(\"property\") && data === \"overrideData\";\n } finally {\n delete Array.prototype.set;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-249",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-249.js",
+ "description": "Object.defineProperty - 'Attributes' is an Array object that uses Object's [[Get]] method to access the 'set' property (8.10.5 step 8.a)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n var data = \"data\";\n var arrObj = [];\n\n arrObj.set = function (value) {\n data = value;\n };\n\n Object.defineProperty(obj, \"property\", arrObj);\n obj.property = \"overrideData\";\n\n return obj.hasOwnProperty(\"property\") && data === \"overrideData\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-25",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-25.js",
+ "description": "Object.defineProperty - 'enumerable' property in 'Attributes' is own data property that overrides an inherited accessor property (8.10.5 step 3.a)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n var accessed = false;\n\n var proto = {};\n Object.defineProperty(proto, \"enumerable\", {\n get: function () {\n return false;\n }\n });\n\n var ConstructFun = function () { };\n ConstructFun.prototype = proto;\n\n var child = new ConstructFun();\n Object.defineProperty(child, \"enumerable\", {\n value: true\n });\n\n Object.defineProperty(obj, \"property\", child);\n\n for (var prop in obj) {\n if (prop === \"property\") {\n accessed = true;\n }\n }\n\n return accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-250-1",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-250-1.js",
+ "description": "Object.defineProperty - 'Attributes' is a String object that uses Object's [[Get]] method to access the 'set' property of prototype object (8.10.5 step 8.a)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n try {\n String.prototype.set = function (value) {\n data = value;\n };\n var strObj = new String();\n var data = \"data\";\n\n Object.defineProperty(obj, \"property\", strObj);\n obj.property = \"overrideData\";\n\n return obj.hasOwnProperty(\"property\") && data === \"overrideData\";\n } finally {\n delete String.prototype.set;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-250",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-250.js",
+ "description": "Object.defineProperty - 'Attributes' is a String object that uses Object's [[Get]] method to access the 'set' property (8.10.5 step 8.a)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n var strObj = new String();\n var data = \"data\";\n\n strObj.set = function (value) {\n data = value;\n };\n\n Object.defineProperty(obj, \"property\", strObj);\n obj.property = \"overrideData\";\n\n return obj.hasOwnProperty(\"property\") && data === \"overrideData\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-251-1",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-251-1.js",
+ "description": "Object.defineProperty - 'Attributes' is a Boolean object that uses Object's [[Get]] method to access the 'set' property of prototype object (8.10.5 step 8.a)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n var data = \"data\";\n try {\n Boolean.prototype.set = function (value) {\n data = value;\n };\n var boolObj = new Boolean(true);\n\n Object.defineProperty(obj, \"property\", boolObj);\n obj.property = \"overrideData\";\n\n return obj.hasOwnProperty(\"property\") && data === \"overrideData\";\n } finally {\n delete Boolean.prototype.set;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-251",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-251.js",
+ "description": "Object.defineProperty - 'Attributes' is a Boolean object that uses Object's [[Get]] method to access the 'set' property (8.10.5 step 8.a)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n var data = \"data\";\n var boolObj = new Boolean(true);\n\n boolObj.set = function (value) {\n data = value;\n };\n\n Object.defineProperty(obj, \"property\", boolObj);\n obj.property = \"overrideData\";\n\n return obj.hasOwnProperty(\"property\") && data === \"overrideData\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-252-1",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-252-1.js",
+ "description": "Object.defineProperty - 'Attributes' is a Number object that uses Object's [[Get]] method to access the 'set' property of prototype object (8.10.5 step 8.a)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n var data = \"data\";\n try {\n Number.prototype.set = function (value) {\n data = value;\n };\n var numObj = new Number(-2);\n\n Object.defineProperty(obj, \"property\", numObj);\n obj.property = \"overrideData\";\n\n return obj.hasOwnProperty(\"property\") && data === \"overrideData\";\n } finally {\n delete Number.prototype.set;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-252",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-252.js",
+ "description": "Object.defineProperty - 'Attributes' is a Number object that uses Object's [[Get]] method to access the 'set' property (8.10.5 step 8.a)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n var data = \"data\";\n var numObj = new Number(-2);\n\n numObj.set = function (value) {\n data = value;\n };\n\n Object.defineProperty(obj, \"property\", numObj);\n obj.property = \"overrideData\";\n\n return obj.hasOwnProperty(\"property\") && data === \"overrideData\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-253-1",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-253-1.js",
+ "description": "Object.defineProperty - 'Attributes' is the Math object that uses Object's [[Get]] method to access the 'set' property of prototype object (8.10.5 step 8.a)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n var data = \"data\";\n\n try {\n Object.prototype.set = function (value) {\n data = value;\n };\n\n Object.defineProperty(obj, \"property\", Math);\n obj.property = \"overrideData\";\n\n return obj.hasOwnProperty(\"property\") && data === \"overrideData\";\n } finally {\n delete Object.prototype.set;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-253",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-253.js",
+ "description": "Object.defineProperty - 'Attributes' is the Math object that uses Object's [[Get]] method to access the 'set' property (8.10.5 step 8.a)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n var data = \"data\";\n\n try {\n Math.set = function (value) {\n data = value;\n };\n\n Object.defineProperty(obj, \"property\", Math);\n obj.property = \"overrideData\";\n\n return obj.hasOwnProperty(\"property\") && data === \"overrideData\";\n } finally {\n delete Math.set;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-254-1",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-254-1.js",
+ "description": "Object.defineProperty - 'Attributes' is a Date object that uses Object's [[Get]] method to access the 'set' property of prototype object (8.10.5 step 8.a)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n var data = \"data\";\n try {\n Date.prototype.set = function (value) {\n data = value;\n };\n var dateObj = new Date();\n\n Object.defineProperty(obj, \"property\", dateObj);\n obj.property = \"overrideData\";\n\n return obj.hasOwnProperty(\"property\") && data === \"overrideData\";\n } finally {\n delete Date.prototype.set;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-254",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-254.js",
+ "description": "Object.defineProperty - 'Attributes' is a Date object that uses Object's [[Get]] method to access the 'set' property (8.10.5 step 8.a)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n var data = \"data\";\n var dateObj = new Date();\n\n dateObj.set = function (value) {\n data = value;\n };\n\n Object.defineProperty(obj, \"property\", dateObj);\n obj.property = \"overrideData\";\n\n return obj.hasOwnProperty(\"property\") && data === \"overrideData\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-255-1",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-255-1.js",
+ "description": "Object.defineProperty - 'Attributes' is a RegExp object that uses Object's [[Get]] method to access the 'set' property of prototype object (8.10.5 step 8.a)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n var data = \"data\";\n try {\n RegExp.prototype.set = function (value) {\n data = value;\n };\n var regObj = new RegExp();\n\n Object.defineProperty(obj, \"property\", regObj);\n obj.property = \"overrideData\";\n\n return obj.hasOwnProperty(\"property\") && data === \"overrideData\";\n } finally {\n delete RegExp.prototype.set;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-255",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-255.js",
+ "description": "Object.defineProperty - 'Attributes' is a RegExp object that uses Object's [[Get]] method to access the 'set' property (8.10.5 step 8.a)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n var data = \"data\";\n var regObj = new RegExp();\n\n regObj.set = function (value) {\n data = value;\n };\n\n Object.defineProperty(obj, \"property\", regObj);\n obj.property = \"overrideData\";\n\n return obj.hasOwnProperty(\"property\") && data === \"overrideData\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-256-1",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-256-1.js",
+ "description": "Object.defineProperty - 'Attributes' is the JSON object that uses Object's [[Get]] method to access the 'set' property of prototype object (8.10.5 step 8.a)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n var data = \"data\";\n\n try {\n Object.prototype.set = function (value) {\n data = value;\n };\n\n Object.defineProperty(obj, \"property\", JSON);\n obj.property = \"overrideData\";\n\n return obj.hasOwnProperty(\"property\") && data === \"overrideData\";\n } finally {\n delete Object.prototype.set;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-256",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-256.js",
+ "description": "Object.defineProperty - 'Attributes' is the JSON object that uses Object's [[Get]] method to access the 'set' property (8.10.5 step 8.a)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n var data = \"data\";\n\n try {\n JSON.set = function (value) {\n data = value;\n };\n\n Object.defineProperty(obj, \"property\", JSON);\n obj.property = \"overrideData\";\n\n return obj.hasOwnProperty(\"property\") && data === \"overrideData\";\n } finally {\n delete JSON.set;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-257-1",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-257-1.js",
+ "description": "Object.defineProperty - 'Attributes' is an Error object that uses Object's [[Get]] method to access the 'set' property of prototype object (8.10.5 step 8.a)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n var data = \"data\";\n\n try {\n Error.prototype.set = function (value) {\n data = value;\n };\n var errObj = new Error();\n\n Object.defineProperty(obj, \"property\", errObj);\n obj.property = \"overrideData\";\n\n return obj.hasOwnProperty(\"property\") && data === \"overrideData\";\n } finally {\n delete Error.prototype.set;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-257",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-257.js",
+ "description": "Object.defineProperty - 'Attributes' is an Error object that uses Object's [[Get]] method to access the 'set' property (8.10.5 step 8.a)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n var data = \"data\";\n var errObj = new Error();\n\n errObj.set = function (value) {\n data = value;\n };\n\n Object.defineProperty(obj, \"property\", errObj);\n obj.property = \"overrideData\";\n\n return obj.hasOwnProperty(\"property\") && data === \"overrideData\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-258-1",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-258-1.js",
+ "description": "Object.defineProperty - 'Attributes' is an Arguments object which implements its own [[Get]] method to access the 'set' property of prototype object (8.10.5 step 8.a)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n var data = \"data\";\n try {\n Object.prototype.set = function (value) {\n data = value;\n };\n var argObj = (function () { return arguments; })();\n\n Object.defineProperty(obj, \"property\", argObj);\n obj.property = \"overrideData\";\n\n return obj.hasOwnProperty(\"property\") && data === \"overrideData\";\n } finally {\n delete Object.prototype.set;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-258",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-258.js",
+ "description": "Object.defineProperty - 'Attributes' is an Arguments object which implements its own [[Get]] method to access the 'set' property (8.10.5 step 8.a)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n var data = \"data\";\n var argObj = (function () { return arguments; })();\n argObj.set = function (value) {\n data = value;\n };\n\n Object.defineProperty(obj, \"property\", argObj);\n obj.property = \"overrideData\";\n\n return obj.hasOwnProperty(\"property\") && data === \"overrideData\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-26",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-26.js",
+ "description": "Object.defineProperty - 'enumerable' property in 'Attributes' is own accessor property (8.10.5 step 3.a)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n var accessed = false;\n\n var attr = {};\n Object.defineProperty(attr, \"enumerable\", {\n get: function () {\n return true;\n }\n });\n\n Object.defineProperty(obj, \"property\", attr);\n\n for (var prop in obj) {\n if (prop === \"property\") {\n accessed = true;\n }\n }\n return accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-260",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-260.js",
+ "description": "Object.defineProperty - 'Attributes' is the global object that uses Object's [[Get]] method to access the 'set' property (8.10.5 step 8.a)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n var data = \"data\";\n\n try {\n fnGlobalObject().set = function (value) {\n data = value;\n };\n\n Object.defineProperty(obj, \"property\", fnGlobalObject());\n obj.property = \"overrideData\";\n\n return obj.hasOwnProperty(\"property\") && data === \"overrideData\";\n } finally {\n delete fnGlobalObject().set;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-261",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-261.js",
+ "description": "Object.defineProperty - value of 'set' property in 'Attributes' is undefined (8.10.5 step 8.b)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n Object.defineProperty(obj, \"property\", {\n set: undefined\n });\n\n obj.property = \"overrideData\";\n var desc = Object.getOwnPropertyDescriptor(obj, \"property\");\n return obj.hasOwnProperty(\"property\") && typeof obj.property === \"undefined\" &&\n typeof desc.set === \"undefined\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-3-262",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-262.js",
+ "description": "Object.defineProperty - value of 'set' property in 'Attributes' is a function (8.10.5 step 8.b)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n var data = \"data\";\n\n Object.defineProperty(obj, \"property\", {\n set: function (value) {\n data = value;\n }\n });\n obj.property = \"overrideData\";\n\n return obj.hasOwnProperty(\"property\") && data === \"overrideData\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-27",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-27.js",
+ "description": "Object.defineProperty - 'enumerable' property in 'Attributes' is an inherited accessor property (8.10.5 step 3.a)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n var accessed = false;\n\n var proto = {};\n Object.defineProperty(proto, \"enumerable\", {\n get: function () {\n return true;\n }\n });\n\n var ConstructFun = function () { };\n ConstructFun.prototype = proto;\n\n var child = new ConstructFun();\n\n Object.defineProperty(obj, \"property\", child);\n\n for (var prop in obj) {\n if (prop === \"property\") {\n accessed = true;\n }\n }\n return accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-28",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-28.js",
+ "description": "Object.defineProperty - 'enumerable' property in 'Attributes' is own accessor property that overrides an inherited data property (8.10.5 step 3.a)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n var accessed = false;\n\n var proto = { enumerable: false };\n\n var ConstructFun = function () { };\n ConstructFun.prototype = proto;\n\n var child = new ConstructFun();\n\n Object.defineProperty(child, \"enumerable\", {\n get: function () {\n return true;\n }\n });\n\n Object.defineProperty(obj, \"property\", child);\n\n for (var prop in obj) {\n if (prop === \"property\") {\n accessed = true;\n }\n }\n return accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-29",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-29.js",
+ "description": "Object.defineProperty - 'enumerable' property in 'Attributes' is own accessor property that overrides an inherited accessor property (8.10.5 step 3.a)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n var accessed = false;\n var proto = {};\n\n Object.defineProperty(proto, \"enumerable\", {\n get: function () {\n return false;\n }\n });\n\n var ConstructFun = function () { };\n ConstructFun.prototype = proto;\n\n var child = new ConstructFun();\n\n Object.defineProperty(child, \"enumerable\", {\n get: function () {\n return true;\n }\n });\n\n Object.defineProperty(obj, \"property\", child);\n\n for (var prop in obj) {\n if (prop === \"property\") {\n accessed = true;\n }\n }\n return accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-3",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-3.js",
+ "description": "Object.defineProperty throws TypeError if desc has 'set' and 'value' present(8.10.5 step 9.a)",
+ "test": "assertTrue((function testcase() {\n var o = {};\n\n // dummy setter\n var setter = function () { }\n var desc = { set: setter, value: 101};\n \n try {\n Object.defineProperty(o, \"foo\", desc);\n }\n catch (e) {\n if (e instanceof TypeError &&\n (o.hasOwnProperty(\"foo\") === false)) {\n return true;\n }\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-30",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-30.js",
+ "description": "Object.defineProperty - 'enumerable' property in 'Attributes' is own accessor property without a get function (8.10.5 step 3.a)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n var accessed = false;\n\n var attr = {};\n Object.defineProperty(attr, \"enumerable\", {\n set: function () { }\n });\n\n Object.defineProperty(obj, \"property\", attr);\n\n for (var prop in obj) {\n if (prop === \"property\") {\n accessed = true;\n }\n }\n return !accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-31",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-31.js",
+ "description": "Object.defineProperty - 'enumerable' property in 'Attributes' is own accessor property(without a get function) that overrides an inherited accessor property (8.10.5 step 3.a)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n var accessed = false;\n var proto = {};\n\n Object.defineProperty(proto, \"enumerable\", {\n get: function () {\n return true;\n }\n });\n\n var ConstructFun = function () { };\n ConstructFun.prototype = proto;\n\n var child = new ConstructFun();\n\n Object.defineProperty(child, \"enumerable\", {\n set: function () { }\n });\n\n Object.defineProperty(obj, \"property\", child);\n\n for (var prop in obj) {\n if (prop === \"property\") {\n accessed = true;\n }\n }\n return !accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-32",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-32.js",
+ "description": "Object.defineProperty - 'enumerable' property in 'Attributes' is an inherited accessor property without a get function (8.10.5 step 3.a)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n var accessed = false;\n var proto = {};\n\n Object.defineProperty(proto, \"enumerable\", {\n set: function () { }\n });\n\n var ConstructFun = function () { };\n ConstructFun.prototype = proto;\n\n var child = new ConstructFun();\n\n Object.defineProperty(obj, \"property\", child);\n\n for (var prop in obj) {\n if (prop === \"property\") {\n accessed = true;\n }\n }\n return !accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-33-1",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-33-1.js",
+ "description": "Object.defineProperty - 'Attributes' is a Function object which implements its own [[Get]] method to access the 'enumerable' property of prototype object (8.10.5 step 3.a)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n var accessed = false;\n try {\n Function.prototype.enumerable = true;\n var fun = function () { };\n\n Object.defineProperty(obj, \"property\", fun);\n\n for (var prop in obj) {\n if (prop === \"property\") {\n accessed = true;\n }\n }\n\n return accessed;\n } finally {\n delete Function.prototype.enumerable;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-33",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-33.js",
+ "description": "Object.defineProperty - 'Attributes' is a Function object which implements its own [[Get]] method to access the 'enumerable' property (8.10.5 step 3.a)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n var accessed = false;\n\n var fun = function () { };\n fun.enumerable = true;\n\n Object.defineProperty(obj, \"property\", fun);\n\n for (var prop in obj) {\n if (prop === \"property\") {\n accessed = true;\n }\n }\n\n return accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-34-1",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-34-1.js",
+ "description": "Object.defineProperty - 'Attributes' is an Array object that uses Object's [[Get]] method to access the 'enumerable' property of prototype object (8.10.5 step 3.a)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n var accessed = false;\n try {\n Array.prototype.enumerable = true;\n var arrObj = [];\n\n Object.defineProperty(obj, \"property\", arrObj);\n\n for (var prop in obj) {\n if (prop === \"property\") {\n accessed = true;\n }\n }\n\n return accessed;\n } finally {\n delete Array.prototype.enumerable;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-34",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-34.js",
+ "description": "Object.defineProperty - 'Attributes' is an Array object that uses Object's [[Get]] method to access the 'enumerable' property (8.10.5 step 3.a)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n var accessed = false;\n\n var arrObj = [];\n arrObj.enumerable = true;\n\n Object.defineProperty(obj, \"property\", arrObj);\n\n for (var prop in obj) {\n if (prop === \"property\") {\n accessed = true;\n }\n }\n\n return accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-35-1",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-35-1.js",
+ "description": "Object.defineProperty - 'Attributes' is a String object that uses Object's [[Get]] method to access the 'enumerable' property of prototype object (8.10.5 step 3.a)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n var accessed = false;\n try {\n String.prototype.enumerable = true;\n var strObj = new String();\n\n Object.defineProperty(obj, \"property\", strObj);\n\n for (var prop in obj) {\n if (prop === \"property\") {\n accessed = true;\n }\n }\n\n return accessed;\n } finally {\n delete String.prototype.enumerable;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-35",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-35.js",
+ "description": "Object.defineProperty - 'Attributes' is a String object that uses Object's [[Get]] method to access the 'enumerable' property (8.10.5 step 3.a)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n var accessed = false;\n\n var strObj = new String();\n strObj.enumerable = true;\n\n Object.defineProperty(obj, \"property\", strObj);\n\n for (var prop in obj) {\n if (prop === \"property\") {\n accessed = true;\n }\n }\n\n return accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-36-1",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-36-1.js",
+ "description": "Object.defineProperty - 'Attributes' is a Boolean object that uses Object's [[Get]] method to access the 'enumerable' property of prototype object (8.10.5 step 3.a)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n var accessed = false;\n try {\n Boolean.prototype.enumerable = true;\n var boolObj = new Boolean(true);\n\n Object.defineProperty(obj, \"property\", boolObj);\n\n for (var prop in obj) {\n if (prop === \"property\") {\n accessed = true;\n }\n }\n\n return accessed;\n } finally {\n delete Boolean.prototype.enumerable;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-36",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-36.js",
+ "description": "Object.defineProperty - 'Attributes' is a Boolean object that uses Object's [[Get]] method to access the 'enumerable' property (8.10.5 step 3.a)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n var accessed = false;\n\n var boolObj = new Boolean(true);\n boolObj.enumerable = true;\n\n Object.defineProperty(obj, \"property\", boolObj);\n\n for (var prop in obj) {\n if (prop === \"property\") {\n accessed = true;\n }\n }\n\n return accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-37-1",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-37-1.js",
+ "description": "Object.defineProperty - 'Attributes' is a Number object that uses Object's [[Get]] method to access the 'enumerable' property of prototype object (8.10.5 step 3.a)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n var accessed = false;\n try {\n Number.prototype.enumerable = true;\n var numObj = new Number(-2);\n\n Object.defineProperty(obj, \"property\", numObj);\n\n for (var prop in obj) {\n if (prop === \"property\") {\n accessed = true;\n }\n }\n\n return accessed;\n } finally {\n delete Number.prototype.enumerable;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-37",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-37.js",
+ "description": "Object.defineProperty - 'Attributes' is a Number object that uses Object's [[Get]] method to access the 'enumerable' property (8.10.5 step 3.a)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n var accessed = false;\n\n var numObj = new Number(-2);\n numObj.enumerable = true;\n\n Object.defineProperty(obj, \"property\", numObj);\n\n for (var prop in obj) {\n if (prop === \"property\") {\n accessed = true;\n }\n }\n\n return accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-38-1",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-38-1.js",
+ "description": "Object.defineProperty - 'Attributes' is the Math object that uses Object's [[Get]] method to access the 'enumerable' property of prototype object (8.10.5 step 3.a)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n var accessed = false;\n try {\n Object.prototype.enumerable = true;\n\n Object.defineProperty(obj, \"property\", Math);\n\n for (var prop in obj) {\n if (prop === \"property\") {\n accessed = true;\n }\n }\n return accessed;\n } finally {\n delete Object.prototype.enumerable;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-38",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-38.js",
+ "description": "Object.defineProperty - 'Attributes' is the Math object that uses Object's [[Get]] method to access the 'enumerable' property (8.10.5 step 3.a)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n var accessed = false;\n\n try {\n Math.enumerable = true;\n\n Object.defineProperty(obj, \"property\", Math);\n\n for (var prop in obj) {\n if (prop === \"property\") {\n accessed = true;\n }\n }\n return accessed;\n } finally {\n delete Math.enumerable;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-39-1",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-39-1.js",
+ "description": "Object.defineProperty - 'Attributes' is a Date object that uses Object's [[Get]] method to access the 'enumerable' property of prototype object (8.10.5 step 3.a)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n var accessed = false;\n\n try {\n Date.prototype.enumerable = true;\n var dateObj = new Date();\n\n Object.defineProperty(obj, \"property\", dateObj);\n\n for (var prop in obj) {\n if (prop === \"property\") {\n accessed = true;\n }\n }\n return accessed;\n } finally {\n delete Date.prototype.enumerable;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-39",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-39.js",
+ "description": "Object.defineProperty - 'Attributes' is a Date object that uses Object's [[Get]] method to access the 'enumerable' property (8.10.5 step 3.a)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n var accessed = false;\n\n var dateObj = new Date();\n dateObj.enumerable = true;\n\n Object.defineProperty(obj, \"property\", dateObj);\n\n for (var prop in obj) {\n if (prop === \"property\") {\n accessed = true;\n }\n }\n return accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-4",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-4.js",
+ "description": "Object.defineProperty throws TypeError if desc has 'set' and 'writable' present(8.10.5 step 9.a)",
+ "test": "assertTrue((function testcase() {\n var o = {};\n \n // dummy getter\n var setter = function () { }\n var desc = { set: setter, writable: false };\n \n try {\n Object.defineProperty(o, \"foo\", desc);\n }\n catch (e) {\n if (e instanceof TypeError &&\n (o.hasOwnProperty(\"foo\") === false)) {\n return true;\n }\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-40-1",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-40-1.js",
+ "description": "Object.defineProperty - 'Attributes' is an RegExp object that uses Object's [[Get]] method to access the 'enumerable' property of prototype object (8.10.5 step 3.a)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n var accessed = false;\n try {\n RegExp.prototype.enumerable = true;\n var regObj = new RegExp();\n\n Object.defineProperty(obj, \"property\", regObj);\n\n for (var prop in obj) {\n if (prop === \"property\") {\n accessed = true;\n }\n }\n\n return accessed;\n } finally {\n delete RegExp.prototype.enumerable;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-40",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-40.js",
+ "description": "Object.defineProperty - 'Attributes' is an RegExp object that uses Object's [[Get]] method to access the 'enumerable' property (8.10.5 step 3.a)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n var accessed = false;\n\n var regObj = new RegExp();\n regObj.enumerable = true;\n\n Object.defineProperty(obj, \"property\", regObj);\n\n for (var prop in obj) {\n if (prop === \"property\") {\n accessed = true;\n }\n }\n\n return accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-41-1",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-41-1.js",
+ "description": "Object.defineProperty - 'Attributes' is the JSON object that uses Object's [[Get]] method to access the 'enumerable' property of prototype object (8.10.5 step 3.a)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n var accessed = false;\n try {\n Object.prototype.enumerable = true;\n\n Object.defineProperty(obj, \"property\", JSON);\n\n for (var prop in obj) {\n if (prop === \"property\") {\n accessed = true;\n }\n }\n\n return accessed;\n } finally {\n delete Object.prototype.enumerable;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-41",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-41.js",
+ "description": "Object.defineProperty - 'Attributes' is the JSON object that uses Object's [[Get]] method to access the 'enumerable' property (8.10.5 step 3.a)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n var accessed = false;\n\n try {\n JSON.enumerable = true;\n\n Object.defineProperty(obj, \"property\", JSON);\n\n for (var prop in obj) {\n if (prop === \"property\") {\n accessed = true;\n }\n }\n\n return accessed;\n } finally {\n delete JSON.enumerable;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-42-1",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-42-1.js",
+ "description": "Object.defineProperty - 'Attributes' is an Error object that uses Object's [[Get]] method to access the 'enumerable' property of prototype object (8.10.5 step 3.a)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n var accessed = false;\n try {\n Error.prototype.enumerable = true;\n var errObj = new Error();\n\n Object.defineProperty(obj, \"property\", errObj);\n\n for (var prop in obj) {\n if (prop === \"property\") {\n accessed = true;\n }\n }\n\n return accessed;\n } finally {\n delete Error.prototype.enumerable;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-42",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-42.js",
+ "description": "Object.defineProperty - 'Attributes' is an Error object that uses Object's [[Get]] method to access the 'enumerable' property (8.10.5 step 3.a)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n var accessed = false;\n\n var errObj = new Error();\n errObj.enumerable = true;\n\n Object.defineProperty(obj, \"property\", errObj);\n\n for (var prop in obj) {\n if (prop === \"property\") {\n accessed = true;\n }\n }\n\n return accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-43-1",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-43-1.js",
+ "description": "Object.defineProperty - 'Attributes' is an Arguments object which implements its own [[Get]] method to access the 'enumerable' property of prototype object (8.10.5 step 3.a)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n var accessed = false;\n try {\n Object.prototype.enumerable = true;\n var argObj = (function () { return arguments; })();\n\n Object.defineProperty(obj, \"property\", argObj);\n\n for (var prop in obj) {\n if (prop === \"property\") {\n accessed = true;\n }\n }\n\n return accessed;\n } finally {\n delete Object.prototype.enumerable;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-43",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-43.js",
+ "description": "Object.defineProperty - 'Attributes' is an Arguments object which implements its own [[Get]] method to access the 'enumerable' property (8.10.5 step 3.a)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n var accessed = false;\n\n var argObj = (function () { return arguments; })();\n argObj.enumerable = true;\n\n Object.defineProperty(obj, \"property\", argObj);\n\n for (var prop in obj) {\n if (prop === \"property\") {\n accessed = true;\n }\n }\n\n return accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-45",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-45.js",
+ "description": "Object.defineProperty - 'Attributes' is the global object that uses Object's [[Get]] method to access the 'enumerable' property (8.10.5 step 3.a)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n var accessed = false;\n\n try {\n fnGlobalObject().enumerable = true;\n\n Object.defineProperty(obj, \"property\", fnGlobalObject());\n\n for (var prop in obj) {\n if (prop === \"property\") {\n accessed = true;\n }\n }\n\n return accessed;\n } finally {\n delete fnGlobalObject().enumerable;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-46",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-46.js",
+ "description": "Object.defineProperty - value of 'enumerable' property in 'Attributes' is undefined (8.10.5 step 3.b)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n var accessed = false;\n\n Object.defineProperty(obj, \"property\", {\n enumerable: undefined\n });\n\n for (var prop in obj) {\n if (prop === \"property\") {\n accessed = true;\n }\n }\n return !accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-47",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-47.js",
+ "description": "Object.defineProperty - value of 'enumerable' property in 'Attributes' is null (8.10.5 step 3.b)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n var accessed = false;\n\n Object.defineProperty(obj, \"property\", { enumerable: null });\n\n for (var prop in obj) {\n if (prop === \"property\") {\n accessed = true;\n }\n }\n return !accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-48",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-48.js",
+ "description": "Object.defineProperty - value of 'enumerable' property in 'Attributes' is true (8.10.5 step 3.b)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n var accessed = false;\n\n Object.defineProperty(obj, \"property\", { enumerable: true });\n\n for (var prop in obj) {\n if (prop === \"property\") {\n accessed = true;\n }\n }\n return accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-49",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-49.js",
+ "description": "Object.defineProperty - value of 'enumerable' property in 'Attributes' is false (8.10.5 step 3.b)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n var accessed = false;\n\n Object.defineProperty(obj, \"property\", { enumerable: false });\n\n for (var prop in obj) {\n if (prop === \"property\") {\n accessed = true;\n }\n }\n return !accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-5",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-5.js",
+ "description": "Object.defineProperty throws TypeError if getter is not callable but not undefined (Number)(8.10.5 step 7.b)",
+ "test": "assertTrue((function testcase() {\n var o = {};\n \n // dummy getter\n var getter = 42;\n var desc = { get: getter };\n \n try {\n Object.defineProperty(o, \"foo\", desc);\n }\n catch (e) {\n if (e instanceof TypeError &&\n (o.hasOwnProperty(\"foo\") === false)) {\n return true;\n }\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-50",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-50.js",
+ "description": "Object.defineProperty - value of 'enumerable' property in 'Attributes' is 0 (8.10.5 step 3.b)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n var accessed = false;\n\n Object.defineProperty(obj, \"property\", { enumerable: 0 });\n\n for (var prop in obj) {\n if (prop === \"property\") {\n accessed = true;\n }\n }\n return !accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-51",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-51.js",
+ "description": "Object.defineProperty - value of 'enumerable' property in 'Attributes' is +0 (8.10.5 step 3.b)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n var accessed = false;\n\n Object.defineProperty(obj, \"property\", { enumerable: +0 });\n\n for (var prop in obj) {\n if (prop === \"property\") {\n accessed = true;\n }\n }\n return !accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-52",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-52.js",
+ "description": "Object.defineProperty - value of 'enumerable' property in 'Attributes' is -0 (8.10.5 step 3.b)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n var accessed = false;\n\n Object.defineProperty(obj, \"property\", { enumerable: -0 });\n\n for (var prop in obj) {\n if (prop === \"property\") {\n accessed = true;\n }\n }\n return !accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-53",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-53.js",
+ "description": "Object.defineProperty - value of 'enumerable' property in 'Attributes' is NaN (8.10.5 step 3.b)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n var accessed = false;\n\n Object.defineProperty(obj, \"property\", { enumerable: NaN });\n\n for (var prop in obj) {\n if (prop === \"property\") {\n accessed = true;\n }\n }\n return !accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-54",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-54.js",
+ "description": "Object.defineProperty - value of 'enumerable' property in 'Attributes' is a positive number (8.10.5 step 3.b)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n var accessed = false;\n\n Object.defineProperty(obj, \"property\", { enumerable: 12 });\n\n for (var prop in obj) {\n if (prop === \"property\") {\n accessed = true;\n }\n }\n return accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-55",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-55.js",
+ "description": "Object.defineProperty - value of 'enumerable' property in 'Attributes' is a negative number (8.10.5 step 3.b)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n var accessed = false;\n\n Object.defineProperty(obj, \"property\", { enumerable: -2 });\n\n for (var prop in obj) {\n if (prop === \"property\") {\n accessed = true;\n }\n }\n return accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-56",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-56.js",
+ "description": "Object.defineProperty - value of 'enumerable' property in 'Attributes' is an empty string (8.10.5 step 3.b)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n var accessed = false;\n\n Object.defineProperty(obj, \"property\", { enumerable: \"\" });\n\n for (var prop in obj) {\n if (prop === \"property\") {\n accessed = true;\n }\n }\n return !accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-57",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-57.js",
+ "description": "Object.defineProperty - value of 'enumerable' property in 'Attributes' is a non-empty string (8.10.5 step 3.b)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n var accessed = false;\n\n Object.defineProperty(obj, \"property\", { enumerable: \"AB\\n\\\\cd\" });\n\n for (var prop in obj) {\n if (prop === \"property\") {\n accessed = true;\n }\n }\n return accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-58",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-58.js",
+ "description": "Object.defineProperty - value of 'enumerable' property in 'Attributes' is a Function object (8.10.5 step 3.b)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n var accessed = false;\n\n Object.defineProperty(obj, \"property\", {\n enumerable: function () { }\n });\n\n for (var prop in obj) {\n if (prop === \"property\") {\n accessed = true;\n }\n }\n return accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-59",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-59.js",
+ "description": "Object.defineProperty - value of 'enumerable' property in 'Attributes' is an Array object (8.10.5 step 3.b)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n var accessed = false;\n\n Object.defineProperty(obj, \"property\", { enumerable: [] });\n\n for (var prop in obj) {\n if (prop === \"property\") {\n accessed = true;\n }\n }\n return accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-6",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-6.js",
+ "description": "Object.defineProperty throws TypeError if getter is not callable but not undefined (Boolean)(8.10.5 step 7.b)",
+ "test": "assertTrue((function testcase() {\n var o = {};\n \n // dummy getter\n var getter = true;\n var desc = { get: getter };\n \n try {\n Object.defineProperty(o, \"foo\", desc);\n }\n catch (e) {\n if (e instanceof TypeError &&\n (o.hasOwnProperty(\"foo\") === false)) {\n return true;\n }\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-60",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-60.js",
+ "description": "Object.defineProperty - value of 'enumerable' property in 'Attributes' is a String Object (8.10.5 step 3.b)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n var accessed = false;\n\n Object.defineProperty(obj, \"property\", { enumerable: new String() });\n\n for (var prop in obj) {\n if (prop === \"property\") {\n accessed = true;\n }\n }\n return accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-61",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-61.js",
+ "description": "Object.defineProperty - value of 'enumerable' property in 'Attributes' is a Boolean Object (8.10.5 step 3.b)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n var accessed = false;\n\n Object.defineProperty(obj, \"property\", { enumerable: new Boolean() });\n\n for (var prop in obj) {\n if (prop === \"property\") {\n accessed = true;\n }\n }\n return accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-62",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-62.js",
+ "description": "Object.defineProperty - value of 'enumerable' property in 'Attributes' is a Number Object (8.10.5 step 3.b)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n var accessed = false;\n\n Object.defineProperty(obj, \"property\", { enumerable: new Number() });\n\n for (var prop in obj) {\n if (prop === \"property\") {\n accessed = true;\n }\n }\n return accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-63",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-63.js",
+ "description": "Object.defineProperty - value of 'enumerable' property in 'Attributes' is the Math Object (8.10.5 step 3.b)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n var accessed = false;\n\n Object.defineProperty(obj, \"property\", { enumerable: Math });\n\n for (var prop in obj) {\n if (prop === \"property\") {\n accessed = true;\n }\n }\n return accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-64",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-64.js",
+ "description": "Object.defineProperty - value of 'enumerable' property in 'Attributes' is a Date Object (8.10.5 step 3.b)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n var accessed = false;\n\n Object.defineProperty(obj, \"property\", { enumerable: new Date() });\n\n for (var prop in obj) {\n if (prop === \"property\") {\n accessed = true;\n }\n }\n return accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-65",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-65.js",
+ "description": "Object.defineProperty - value of 'enumerable' property in 'Attributes' is a RegExp Object (8.10.5 step 3.b)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n var accessed = false;\n\n Object.defineProperty(obj, \"property\", { enumerable: new RegExp() });\n\n for (var prop in obj) {\n if (prop === \"property\") {\n accessed = true;\n }\n }\n return accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-66",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-66.js",
+ "description": "Object.defineProperty - value of 'enumerable' property in 'Attributes' is the JSON Object (8.10.5 step 3.b)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n var accessed = false;\n\n Object.defineProperty(obj, \"property\", { enumerable: JSON });\n\n for (var prop in obj) {\n if (prop === \"property\") {\n accessed = true;\n }\n }\n return accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-67",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-67.js",
+ "description": "Object.defineProperty - value of 'enumerable' property in 'Attributes' is an Error Object (8.10.5 step 3.b)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n var accessed = false;\n\n Object.defineProperty(obj, \"property\", { enumerable: new Error() });\n\n for (var prop in obj) {\n if (prop === \"property\") {\n accessed = true;\n }\n }\n return accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-68",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-68.js",
+ "description": "Object.defineProperty - value of 'enumerable' property in 'Attributes' is an Arguments Object (8.10.5 step 3.b)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n var accessed = false;\n var argObj = (function () { return arguments; })(0, 1, 2);\n\n Object.defineProperty(obj, \"property\", { enumerable: argObj });\n\n for (var prop in obj) {\n if (prop === \"property\") {\n accessed = true;\n }\n }\n return accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-7",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-7.js",
+ "description": "Object.defineProperty throws TypeError if getter is not callable but not undefined (String)(8.10.5 step 7.b)",
+ "test": "assertTrue((function testcase() {\n var o = {};\n \n // dummy getter\n var getter = \"abc\";\n var desc = { get: getter };\n \n try {\n Object.defineProperty(o, \"foo\", desc);\n }\n catch (e) {\n if (e instanceof TypeError &&\n (o.hasOwnProperty(\"foo\") === false)) {\n return true;\n }\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-70",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-70.js",
+ "description": "Object.defineProperty - value of 'enumerable' property in 'Attributes' is the global object (8.10.5 step 3.b)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n var accessed = false;\n\n Object.defineProperty(obj, \"property\", { enumerable: fnGlobalObject() });\n\n for (var prop in obj) {\n if (prop === \"property\") {\n accessed = true;\n }\n }\n return accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-71",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-71.js",
+ "description": "Object.defineProperty - value of 'enumerable' property in 'Attributes' is treated as true when it is a string (value is 'false') (8.10.5 step 3.b)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n var accessed = false;\n\n Object.defineProperty(obj, \"property\", { enumerable: \"false\" });\n\n for (var prop in obj) {\n if (prop === \"property\") {\n accessed = true;\n }\n }\n return accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-72",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-72.js",
+ "description": "Object.defineProperty - value of 'enumerable' property in 'Attributes' is new Boolean(false) which is treated as true value (8.10.5 step 3.b)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n var accessed = false;\n\n Object.defineProperty(obj, \"property\", { enumerable: new Boolean(false) });\n\n for (var prop in obj) {\n if (prop === \"property\") {\n accessed = true;\n }\n }\n return accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-73",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-73.js",
+ "description": "Object.defineProperty - 'configurable' property in 'Attributes' is present (8.10.5 step 4)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n Object.defineProperty(obj, \"property\", {\n configurable: false\n });\n\n var beforeDeleted = obj.hasOwnProperty(\"property\");\n\n delete obj.property;\n\n var afterDeleted = obj.hasOwnProperty(\"property\");\n\n return beforeDeleted === true && afterDeleted === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-74",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-74.js",
+ "description": "Object.defineProperty - 'configurable' property in 'Attributes' is not present (8.10.5 step 4)",
+ "test": "assertTrue((function testcase() {\n var obj = { };\n\n Object.defineProperty(obj, \"property\", { value: 100 });\n\n var beforeDeleted = obj.hasOwnProperty(\"property\");\n\n delete obj.property;\n\n var afterDeleted = (obj.property === 100);\n\n return beforeDeleted === true && afterDeleted === true;\n\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-75",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-75.js",
+ "description": "Object.defineProperty - 'configurable' property in 'Attributes' is own data property (8.10.5 step 4.a)",
+ "test": "assertTrue((function testcase() {\n var obj = { };\n\n Object.defineProperty(obj, \"property\", {\n configurable: true\n });\n\n var beforeDeleted = obj.hasOwnProperty(\"property\");\n\n delete obj.property;\n\n var afterDeleted = obj.hasOwnProperty(\"property\");\n\n return beforeDeleted === true && afterDeleted === false;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-76",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-76.js",
+ "description": "Object.defineProperty - 'configurable' property in 'Attributes' is an inherited data property (8.10.5 step 4.a)",
+ "test": "assertTrue((function testcase() {\n var obj = { };\n\n var proto = {\n configurable: false\n };\n\n var ConstructFun = function () { };\n ConstructFun.prototype = proto;\n\n var child = new ConstructFun();\n\n Object.defineProperty(obj, \"property\", child);\n\n var beforeDeleted = obj.hasOwnProperty(\"property\");\n\n delete obj.property;\n\n var afterDeleted = obj.hasOwnProperty(\"property\");\n return beforeDeleted && afterDeleted && typeof (obj.property) === \"undefined\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-77",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-77.js",
+ "description": "Object.defineProperty - 'configurable' property in 'Attributes' is own data property that overrides an inherited data property (8.10.5 step 4.a)",
+ "test": "assertTrue((function testcase() {\n var obj = { };\n\n var proto = {\n configurable: false\n };\n\n var ConstructFun = function () { };\n ConstructFun.prototype = proto;\n\n var child = new ConstructFun();\n child.configurable = true;\n\n Object.defineProperty(obj, \"property\", child);\n\n var beforeDeleted = obj.hasOwnProperty(\"property\");\n\n delete obj.property;\n\n var afterDeleted = obj.hasOwnProperty(\"property\");\n\n return beforeDeleted === true && afterDeleted === false;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-78",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-78.js",
+ "description": "Object.defineProperty - 'configurable' property in 'Attributes' is own data property that overrides an inherited accessor property (8.10.5 step 4.a)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n var proto = { };\n\n Object.defineProperty(proto, \"configurable\", {\n get: function () {\n return false;\n }\n });\n\n var ConstructFun = function () { };\n ConstructFun.prototype = proto;\n\n var child = new ConstructFun();\n Object.defineProperty(child, \"configurable\", {\n value: true\n });\n\n Object.defineProperty(obj, \"property\", child);\n\n var beforeDeleted = obj.hasOwnProperty(\"property\");\n\n delete obj.property;\n\n var afterDeleted = obj.hasOwnProperty(\"property\");\n\n return beforeDeleted === true && afterDeleted === false;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-79",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-79.js",
+ "description": "Object.defineProperty - 'configurable' property in 'Attributes' is own accessor property (8.10.5 step 4.a)",
+ "test": "assertTrue((function testcase() {\n var obj = { };\n\n var attr = {};\n Object.defineProperty(attr, \"configurable\", {\n get: function () {\n return true;\n }\n });\n\n Object.defineProperty(obj, \"property\", attr);\n\n var beforeDeleted = obj.hasOwnProperty(\"property\");\n\n delete obj.property;\n\n var afterDeleted = obj.hasOwnProperty(\"property\");\n\n return beforeDeleted === true && afterDeleted === false;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-8",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-8.js",
+ "description": "Object.defineProperty throws TypeError if getter is not callable but not undefined (Null)(8.10.5 step 7.b)",
+ "test": "assertTrue((function testcase() {\n var o = {};\n \n // dummy getter\n var getter = null;\n var desc = { get: getter };\n \n try {\n Object.defineProperty(o, \"foo\", desc);\n }\n catch (e) {\n if (e instanceof TypeError &&\n (o.hasOwnProperty(\"foo\") === false)) {\n return true;\n }\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-80",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-80.js",
+ "description": "Object.defineProperty - 'configurable' property in 'Attributes' is an inherited accessor property (8.10.5 step 4.a)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n var proto = {};\n Object.defineProperty(proto, \"configurable\", {\n get: function () {\n return true;\n }\n });\n\n var ConstructFun = function () { };\n ConstructFun.prototype = proto;\n\n var child = new ConstructFun();\n\n Object.defineProperty(obj, \"property\", child);\n\n var beforeDeleted = obj.hasOwnProperty(\"property\");\n\n delete obj.property;\n\n var afterDeleted = obj.hasOwnProperty(\"property\");\n\n return beforeDeleted === true && afterDeleted === false;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-81",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-81.js",
+ "description": "Object.defineProperty - 'configurable' property in 'Attributes' is own accessor property that overrides an inherited data property (8.10.5 step 4.a)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n var proto = {\n configurable: false\n };\n\n var ConstructFun = function () { };\n ConstructFun.prototype = proto;\n\n var child = new ConstructFun();\n Object.defineProperty(child, \"configurable\", {\n get: function () {\n return true;\n }\n });\n\n Object.defineProperty(obj, \"property\", child);\n\n var beforeDeleted = obj.hasOwnProperty(\"property\");\n\n delete obj.property;\n\n var afterDeleted = obj.hasOwnProperty(\"property\");\n\n return beforeDeleted === true && afterDeleted === false;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-82",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-82.js",
+ "description": "Object.defineProperty - 'configurable' property in 'Attributes' is own accessor property that overrides an inherited accessor property (8.10.5 step 4.a)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n var proto = {};\n Object.defineProperty(proto, \"configurable\", {\n get: function () {\n return false;\n }\n });\n\n var ConstructFun = function () { };\n ConstructFun.prototype = proto;\n\n var child = new ConstructFun();\n Object.defineProperty(child, \"configurable\", {\n get: function () {\n return true;\n }\n });\n\n Object.defineProperty(obj, \"property\", child);\n\n var beforeDeleted = obj.hasOwnProperty(\"property\");\n\n delete obj.property;\n\n var afterDeleted = obj.hasOwnProperty(\"property\");\n\n return beforeDeleted === true && afterDeleted === false;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-83",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-83.js",
+ "description": "Object.defineProperty - 'configurable' property in 'Attributes' is own accessor property without a get function (8.10.5 step 4.a)",
+ "test": "assertTrue((function testcase() {\n var obj = { };\n\n var attr = {};\n Object.defineProperty(attr, \"configurable\", {\n set : function () { }\n });\n\n Object.defineProperty(obj, \"property\", attr);\n\n var beforeDeleted = obj.hasOwnProperty(\"property\");\n\n delete obj.property;\n\n var afterDeleted = obj.hasOwnProperty(\"property\") && typeof (obj.property) === \"undefined\";\n\n return beforeDeleted === true && afterDeleted === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-84",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-84.js",
+ "description": "Object.defineProperty - 'configurable' property in 'Attributes' is own accessor property(without a get function) that overrides an inherited accessor property (8.10.5 step 4.a)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n var proto = {};\n Object.defineProperty(proto, \"configurable\", {\n get: function () {\n return true;\n }\n });\n\n var ConstructFun = function () { };\n ConstructFun.prototype = proto;\n\n var child = new ConstructFun();\n Object.defineProperty(child, \"configurable\", {\n set: function () { }\n });\n\n Object.defineProperty(obj, \"property\", child);\n\n var beforeDeleted = obj.hasOwnProperty(\"property\");\n\n delete obj.property;\n\n var afterDeleted = obj.hasOwnProperty(\"property\") && typeof (obj.property) === \"undefined\";\n\n return beforeDeleted === true && afterDeleted === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-85",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-85.js",
+ "description": "Object.defineProperty - 'configurable' property in 'Attributes' is an inherited accessor property without a get function (8.10.5 step 4.a)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n var proto = {};\n Object.defineProperty(proto, \"configurable\", {\n set: function () { }\n });\n\n var ConstructFun = function () { };\n ConstructFun.prototype = proto;\n\n var child = new ConstructFun();\n\n Object.defineProperty(obj, \"property\", child);\n\n var beforeDeleted = obj.hasOwnProperty(\"property\");\n\n delete obj.property;\n\n var afterDeleted = obj.hasOwnProperty(\"property\") && typeof (obj.property) === \"undefined\";\n\n return beforeDeleted === true && afterDeleted === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-86-1",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-86-1.js",
+ "description": "Object.defineProperty - 'Attributes' is a Function object which implements its own [[Get]] method to access the 'configurable' property of prototype object (8.10.5 step 4.a)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n try {\n Function.prototype.configurable = true;\n var funObj = function (a, b) {\n return a + b;\n };\n\n Object.defineProperty(obj, \"property\", funObj);\n\n var beforeDeleted = obj.hasOwnProperty(\"property\");\n\n delete obj.property;\n\n var afterDeleted = obj.hasOwnProperty(\"property\");\n\n return beforeDeleted === true && afterDeleted === false;\n } finally {\n delete Function.prototype.configurable;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-86",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-86.js",
+ "description": "Object.defineProperty - 'Attributes' is a Function object which implements its own [[Get]] method to access the 'configurable' property (8.10.5 step 4.a)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n var funObj = function (a, b) {\n return a + b;\n };\n\n funObj.configurable = true;\n\n Object.defineProperty(obj, \"property\", funObj);\n\n var beforeDeleted = obj.hasOwnProperty(\"property\");\n\n delete obj.property;\n\n var afterDeleted = obj.hasOwnProperty(\"property\");\n\n return beforeDeleted === true && afterDeleted === false;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-87-1",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-87-1.js",
+ "description": "Object.defineProperty - 'Attributes' is an Array object that uses Object's [[Get]] method to access the 'configurable' property (8.10.5 step 4.a)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n try {\n Array.prototype.configurable = true;\n var arrObj = [1, 2, 3];\n\n Object.defineProperty(obj, \"property\", arrObj);\n\n var beforeDeleted = obj.hasOwnProperty(\"property\");\n\n delete obj.property;\n\n var afterDeleted = obj.hasOwnProperty(\"property\");\n\n return beforeDeleted === true && afterDeleted === false;\n } finally {\n delete Array.prototype.configurable;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-87",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-87.js",
+ "description": "Object.defineProperty - 'Attributes' is an Array object that uses Object's [[Get]] method to access the 'configurable' property (8.10.5 step 4.a)",
+ "test": "assertTrue((function testcase() {\n var obj = { };\n\n var arrObj = [1, 2, 3];\n\n arrObj.configurable = true;\n\n Object.defineProperty(obj, \"property\", arrObj);\n\n var beforeDeleted = obj.hasOwnProperty(\"property\");\n\n delete obj.property;\n\n var afterDeleted = obj.hasOwnProperty(\"property\");\n\n return beforeDeleted === true && afterDeleted === false;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-88-1",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-88-1.js",
+ "description": "Object.defineProperty - 'Attributes' is a String object that uses Object's [[Get]] method to access the 'configurable' property (8.10.5 step 4.a)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n try {\n String.prototype.configurable = true;\n var strObj = new String(\"abc\");\n\n Object.defineProperty(obj, \"property\", strObj);\n\n var beforeDeleted = obj.hasOwnProperty(\"property\");\n\n delete obj.property;\n\n var afterDeleted = obj.hasOwnProperty(\"property\");\n\n return beforeDeleted === true && afterDeleted === false;\n } finally {\n delete String.prototype.configurable;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-88",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-88.js",
+ "description": "Object.defineProperty - 'Attributes' is a String object that uses Object's [[Get]] method to access the 'configurable' property (8.10.5 step 4.a)",
+ "test": "assertTrue((function testcase() {\n var obj = { };\n\n var strObj = new String(\"abc\");\n\n strObj.configurable = true;\n\n Object.defineProperty(obj, \"property\", strObj);\n\n var beforeDeleted = obj.hasOwnProperty(\"property\");\n\n delete obj.property;\n\n var afterDeleted = obj.hasOwnProperty(\"property\");\n\n return beforeDeleted === true && afterDeleted === false;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-89-1",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-89-1.js",
+ "description": "Object.defineProperty - 'Attributes' is a Boolean object that uses Object's [[Get]] method to access the 'configurable' property (8.10.5 step 4.a)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n try {\n Boolean.prototype.configurable = true;\n var boolObj = new Boolean(true);\n\n Object.defineProperty(obj, \"property\", boolObj);\n\n var beforeDeleted = obj.hasOwnProperty(\"property\");\n\n delete obj.property;\n\n var afterDeleted = obj.hasOwnProperty(\"property\");\n\n return beforeDeleted === true && afterDeleted === false;\n } finally {\n delete Boolean.prototype.configurable;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-89",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-89.js",
+ "description": "Object.defineProperty - 'Attributes' is a Boolean object that uses Object's [[Get]] method to access the 'configurable' property (8.10.5 step 4.a)",
+ "test": "assertTrue((function testcase() {\n var obj = { };\n\n var boolObj = new Boolean(true);\n\n boolObj.configurable = true;\n\n Object.defineProperty(obj, \"property\", boolObj);\n\n var beforeDeleted = obj.hasOwnProperty(\"property\");\n\n delete obj.property;\n\n var afterDeleted = obj.hasOwnProperty(\"property\");\n\n return beforeDeleted === true && afterDeleted === false;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-9",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-9.js",
+ "description": "Object.defineProperty throws TypeError if getter is not callable but not undefined (Object)(8.10.5 step 7.b)",
+ "test": "assertTrue((function testcase() {\n var o = {};\n \n // dummy getter\n var getter = { a: 1 };\n var desc = { get: getter };\n \n try {\n Object.defineProperty(o, \"foo\", desc);\n }\n catch (e) {\n if (e instanceof TypeError &&\n (o.hasOwnProperty(\"foo\") === false)) {\n return true;\n }\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-90-1",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-90-1.js",
+ "description": "Object.defineProperty - 'Attributes' is a Number object that uses Object's [[Get]] method to access the 'configurable' property (8.10.5 step 4.a)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n try {\n Number.prototype.configurable = true;\n var numObj = new Number(-2);\n\n Object.defineProperty(obj, \"property\", numObj);\n\n var beforeDeleted = obj.hasOwnProperty(\"property\");\n\n delete obj.property;\n\n var afterDeleted = obj.hasOwnProperty(\"property\");\n\n return beforeDeleted === true && afterDeleted === false;\n } finally {\n delete Number.prototype.configurable;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-90",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-90.js",
+ "description": "Object.defineProperty - 'Attributes' is a Number object that uses Object's [[Get]] method to access the 'configurable' property (8.10.5 step 4.a)",
+ "test": "assertTrue((function testcase() {\n var obj = { };\n\n var numObj = new Number(-2);\n\n numObj.configurable = true;\n\n Object.defineProperty(obj, \"property\", numObj);\n\n var beforeDeleted = obj.hasOwnProperty(\"property\");\n\n delete obj.property;\n\n var afterDeleted = obj.hasOwnProperty(\"property\");\n\n return beforeDeleted === true && afterDeleted === false;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-91-1",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-91-1.js",
+ "description": "Object.defineProperty - 'Attributes' is the Math object that uses Object's [[Get]] method to access the 'configurable' property (8.10.5 step 4.a)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n try {\n Object.prototype.configurable = true;\n\n Object.defineProperty(obj, \"property\", Math);\n\n var beforeDeleted = obj.hasOwnProperty(\"property\");\n\n delete obj.property;\n\n var afterDeleted = obj.hasOwnProperty(\"property\");\n\n return beforeDeleted === true && afterDeleted === false;\n } finally {\n delete Object.prototype.configurable;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-91",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-91.js",
+ "description": "Object.defineProperty - 'Attributes' is the Math object that uses Object's [[Get]] method to access the 'configurable' property (8.10.5 step 4.a)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n try {\n Math.configurable = true;\n\n Object.defineProperty(obj, \"property\", Math);\n\n var beforeDeleted = obj.hasOwnProperty(\"property\");\n\n delete obj.property;\n\n var afterDeleted = obj.hasOwnProperty(\"property\");\n\n return beforeDeleted === true && afterDeleted === false;\n } finally {\n delete Math.configurable;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-92-1",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-92-1.js",
+ "description": "Object.defineProperty - 'Attributes' is a Date object that uses Object's [[Get]] method to access the 'configurable' property (8.10.5 step 4.a)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n try {\n Date.prototype.configurable = true;\n var dateObj = new Date();\n\n Object.defineProperty(obj, \"property\", dateObj);\n\n var beforeDeleted = obj.hasOwnProperty(\"property\");\n\n delete obj.property;\n\n var afterDeleted = obj.hasOwnProperty(\"property\");\n\n return beforeDeleted === true && afterDeleted === false;\n } finally {\n delete Date.prototype.configurable;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-92",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-92.js",
+ "description": "Object.defineProperty - 'Attributes' is a Date object that uses Object's [[Get]] method to access the 'configurable' property (8.10.5 step 4.a)",
+ "test": "assertTrue((function testcase() {\n var obj = { };\n\n var dateObj = new Date();\n\n dateObj.configurable = true;\n\n Object.defineProperty(obj, \"property\", dateObj);\n\n var beforeDeleted = obj.hasOwnProperty(\"property\");\n\n delete obj.property;\n\n var afterDeleted = obj.hasOwnProperty(\"property\");\n\n return beforeDeleted === true && afterDeleted === false;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-93-1",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-93-1.js",
+ "description": "Object.defineProperty - 'Attributes' is an RegExp object that uses Object's [[Get]] method to access the 'configurable' property (8.10.5 step 4.a)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n try {\n RegExp.prototype.configurable = true;\n var regObj = new RegExp();\n\n Object.defineProperty(obj, \"property\", regObj);\n\n var beforeDeleted = obj.hasOwnProperty(\"property\");\n\n delete obj.property;\n\n var afterDeleted = obj.hasOwnProperty(\"property\");\n\n return beforeDeleted === true && afterDeleted === false;\n } finally {\n delete RegExp.prototype.configurable;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-93",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-93.js",
+ "description": "Object.defineProperty - 'Attributes' is an RegExp object that uses Object's [[Get]] method to access the 'configurable' property (8.10.5 step 4.a)",
+ "test": "assertTrue((function testcase() {\n var obj = { };\n\n var regObj = new RegExp();\n\n regObj.configurable = true;\n\n Object.defineProperty(obj, \"property\", regObj);\n\n var beforeDeleted = obj.hasOwnProperty(\"property\");\n\n delete obj.property;\n\n var afterDeleted = obj.hasOwnProperty(\"property\");\n\n return beforeDeleted === true && afterDeleted === false;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-94-1",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-94-1.js",
+ "description": "Object.defineProperty - 'Attributes' is the JSON object that uses Object's [[Get]] method to access the 'configurable' property (8.10.5 step 4.a)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n try {\n Object.prototype.configurable = true;\n\n Object.defineProperty(obj, \"property\", JSON);\n\n var beforeDeleted = obj.hasOwnProperty(\"property\");\n\n delete obj.property;\n\n var afterDeleted = obj.hasOwnProperty(\"property\");\n\n return beforeDeleted === true && afterDeleted === false;\n } finally {\n delete Object.prototype.configurable;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-94",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-94.js",
+ "description": "Object.defineProperty - 'Attributes' is the JSON object that uses Object's [[Get]] method to access the 'configurable' property (8.10.5 step 4.a)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n try {\n JSON.configurable = true;\n\n Object.defineProperty(obj, \"property\", JSON);\n\n var beforeDeleted = obj.hasOwnProperty(\"property\");\n\n delete obj.property;\n\n var afterDeleted = obj.hasOwnProperty(\"property\");\n\n return beforeDeleted === true && afterDeleted === false;\n } finally {\n delete JSON.configurable;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-95-1",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-95-1.js",
+ "description": "Object.defineProperty - 'Attributes' is an Error object that uses Object's [[Get]] method to access the 'configurable' property (8.10.5 step 4.a)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n try {\n Error.prototype.configurable = true;\n var errObj = new Error();\n\n Object.defineProperty(obj, \"property\", errObj);\n\n var beforeDeleted = obj.hasOwnProperty(\"property\");\n\n delete obj.property;\n\n var afterDeleted = obj.hasOwnProperty(\"property\");\n\n return beforeDeleted === true && afterDeleted === false;\n } finally {\n delete Error.prototype.configurable;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-95",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-95.js",
+ "description": "Object.defineProperty - 'Attributes' is an Error object that uses Object's [[Get]] method to access the 'configurable' property (8.10.5 step 4.a)",
+ "test": "assertTrue((function testcase() {\n var obj = { };\n\n var errObj = new Error();\n\n errObj.configurable = true;\n\n Object.defineProperty(obj, \"property\", errObj);\n\n var beforeDeleted = obj.hasOwnProperty(\"property\");\n\n delete obj.property;\n\n var afterDeleted = obj.hasOwnProperty(\"property\");\n\n return beforeDeleted === true && afterDeleted === false;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-96-1",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-96-1.js",
+ "description": "Object.defineProperty - 'Attributes' is an Arguments object which implements its own [[Get]] method to access the 'configurable' property (8.10.5 step 4.a)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n try {\n Object.prototype.configurable = true;\n var argObj = (function () { return arguments; })();\n\n Object.defineProperty(obj, \"property\", argObj);\n\n var beforeDeleted = obj.hasOwnProperty(\"property\");\n\n delete obj.property;\n\n var afterDeleted = obj.hasOwnProperty(\"property\");\n\n return beforeDeleted === true && afterDeleted === false;\n } finally {\n delete Object.prototype.configurable;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-96",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-96.js",
+ "description": "Object.defineProperty - 'Attributes' is an Arguments object which implements its own [[Get]] method to access the 'configurable' property (8.10.5 step 4.a)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n var argObj = (function () { return arguments; })();\n argObj.configurable = true;\n\n Object.defineProperty(obj, \"property\", argObj);\n\n var beforeDeleted = obj.hasOwnProperty(\"property\");\n\n delete obj.property;\n\n var afterDeleted = obj.hasOwnProperty(\"property\");\n\n return beforeDeleted === true && afterDeleted === false;\n\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-98",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-98.js",
+ "description": "Object.defineProperty - 'Attributes' is the global object that uses Object's [[Get]] method to access the 'configurable' property (8.10.5 step 4.a)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n try {\n fnGlobalObject().configurable = true;\n\n Object.defineProperty(obj, \"property\", fnGlobalObject());\n\n var beforeDeleted = obj.hasOwnProperty(\"property\");\n\n delete obj.property;\n\n var afterDeleted = obj.hasOwnProperty(\"property\");\n\n return beforeDeleted === true && afterDeleted === false;\n } finally {\n delete fnGlobalObject().configurable;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-3-99",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-3-99.js",
+ "description": "Object.defineProperty - 'configurable' property in 'Attributes' is undefined (8.10.5 step 4.b)",
+ "test": "assertTrue((function testcase() {\n var obj = { };\n\n Object.defineProperty(obj, \"property\", { configurable: undefined });\n\n var beforeDeleted = obj.hasOwnProperty(\"property\");\n\n delete obj.property;\n\n var afterDeleted = obj.hasOwnProperty(\"property\") && typeof (obj.property) === \"undefined\";\n\n return beforeDeleted === true && afterDeleted === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-1",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-1.js",
+ "description": "Object.defineProperty throws TypeError when adding properties to non-extensible objects(8.12.9 step 3)",
+ "test": "assertTrue((function testcase() {\n var o = {};\n Object.preventExtensions(o);\n\n try {\n var desc = { value: 1 };\n Object.defineProperty(o, \"foo\", desc);\n }\n catch (e) {\n if (e instanceof TypeError &&\n (o.hasOwnProperty(\"foo\") === false)) {\n return true;\n }\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.preventExtensions))"
+ },
+ {
+ "id": "15.2.3.6-4-10",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-10.js",
+ "description": "Object.defineProperty throws TypeError when changing [[Enumerable]] from false to true on non-configurable accessor properties",
+ "test": "assertTrue((function testcase() {\n var o = {};\n\n // create an accessor property; all other attributes default to false.\n // dummy getter\n var getter = function () { return 1; }\n var d1 = { get: getter, enumerable: false, configurable: false };\n Object.defineProperty(o, \"foo\", d1);\n\n // now, setting enumerable to true should fail, since [[Configurable]]\n // on the original property will be false.\n var desc = { get: getter, enumerable: true };\n\n try {\n Object.defineProperty(o, \"foo\", desc);\n }\n catch (e) {\n if (e instanceof TypeError) {\n // the property should remain unchanged.\n var d2 = Object.getOwnPropertyDescriptor(o, \"foo\");\n if (d2.get === getter &&\n d2.enumerable === false &&\n d2.configurable === false) {\n return true;\n }\n }\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-100",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-100.js",
+ "description": "Object.defineProperty - 'name' and 'desc' are data properties, desc.value and name.value are two different values (8.12.9 step 12)",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n\n obj.foo = 100; // default value of attributes: writable: true, configurable: true, enumerable: true\n\n Object.defineProperty(obj, \"foo\", {\n value: 200\n });\n return dataPropertyAttributesAreCorrect(obj, \"foo\", 200, true, true, true);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-101",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-101.js",
+ "description": "Object.defineProperty - 'name' and 'desc' are data properties, name.value is present and desc.value is undefined (8.12.9 step 12)",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n\n obj.foo = 100; // default value of attributes: writable: true, configurable: true, enumerable: true\n\n Object.defineProperty(obj, \"foo\", { value: undefined });\n return dataPropertyAttributesAreCorrect(obj, \"foo\", undefined, true, true, true);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-102",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-102.js",
+ "description": "Object.defineProperty - 'name' and 'desc' are data properties, desc.value is present and name.value is undefined (8.12.9 step 12)",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n\n obj.foo = undefined; // default value of attributes: writable: true, configurable: true, enumerable: true\n\n Object.defineProperty(obj, \"foo\", { value: 100 });\n return dataPropertyAttributesAreCorrect(obj, \"foo\", 100, true, true, true);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-103",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-103.js",
+ "description": "Object.defineProperty - 'name' and 'desc' are data properties, name.writable and desc.writable are different values (8.12.9 step 12)",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n\n Object.defineProperty(obj, \"foo\", {\n writable: false, configurable: true\n });\n\n Object.defineProperty(obj, \"foo\", {\n writable: true\n });\n return dataPropertyAttributesAreCorrect(obj, \"foo\", undefined, true, false, true);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-104",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-104.js",
+ "description": "Object.defineProperty - 'name' and 'desc' are data properties, name.enumerable and desc.enumerable are different values (8.12.9 step 12)",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n\n Object.defineProperty(obj, \"foo\", {\n enumerable: false,\n configurable: true\n });\n\n Object.defineProperty(obj, \"foo\", {\n enumerable: true\n });\n return dataPropertyAttributesAreCorrect(obj, \"foo\", undefined, false, true, true);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-105",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-105.js",
+ "description": "Object.defineProperty - 'name' and 'desc' are data properties, name.configurable = true and desc.configurable = false (8.12.9 step 12)",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n\n Object.defineProperty(obj, \"foo\", {\n value: 200,\n enumerable: true,\n writable: true,\n configurable: true \n });\n\n Object.defineProperty(obj, \"foo\", {\n configurable: false\n });\n \n return dataPropertyAttributesAreCorrect(obj, \"foo\", 200, true, true, false);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-106",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-106.js",
+ "description": "Object.defineProperty - 'name' and 'desc' are data properties, several attributes values of name and desc are different (8.12.9 step 12)",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n\n Object.defineProperty(obj, \"foo\", { \n value: 100, \n writable: true, \n enumerable: true, \n configurable: true \n });\n \n Object.defineProperty(obj, \"foo\", { \n value: 200, \n writable: false, \n enumerable: false \n });\n return dataPropertyAttributesAreCorrect(obj, \"foo\", 200, false, false, true);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-107",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-107.js",
+ "description": "Object.defineProperty - 'name' and 'desc' are accessor properties, both desc.[[Get]] and name.[[Get]] are two different values (8.12.9 step 12)",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n\n function getFunc() {\n return 10;\n }\n\n function setFunc(value) {\n obj.setVerifyHelpProp = value;\n }\n\n Object.defineProperty(obj, \"foo\", {\n get: getFunc,\n set: setFunc,\n configurable: true\n });\n\n function getFunc2() {\n return 20;\n }\n\n Object.defineProperty(obj, \"foo\", {\n get: getFunc2\n });\n return accessorPropertyAttributesAreCorrect(obj, \"foo\", getFunc2, setFunc, \"setVerifyHelpProp\", false, true);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-108",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-108.js",
+ "description": "Object.defineProperty - 'name' and 'desc' are accessor properties, name.[[Get]] is present and desc.[[Get]] is undefined (8.12.9 step 12)",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n\n function getFunc() {\n return 10;\n }\n\n function setFunc(value) {\n obj.setVerifyHelpProp = value;\n }\n\n Object.defineProperty(obj, \"foo\", {\n get: getFunc,\n set: setFunc,\n enumerable: true,\n configurable: true\n });\n\n Object.defineProperty(obj, \"foo\", {\n set: setFunc,\n get: undefined\n });\n return accessorPropertyAttributesAreCorrect(obj, \"foo\", undefined, setFunc, \"setVerifyHelpProp\", true, true);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-109",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-109.js",
+ "description": "Object.defineProperty - 'name' and 'desc' are accessor properties, name.[[Get]] is undefined and desc.[[Get]] is function (8.12.9 step 12)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n function setFunc(value) {\n obj.setVerifyHelpProp = value;\n }\n \n Object.defineProperty(obj, \"foo\", {\n set: setFunc,\n get: undefined,\n enumerable: true,\n configurable: true\n });\n\n function getFunc() {\n return 10;\n }\n\n Object.defineProperty(obj, \"foo\", {\n get: getFunc\n });\n return accessorPropertyAttributesAreCorrect(obj, \"foo\", getFunc, setFunc, \"setVerifyHelpProp\", true, true);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-11",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-11.js",
+ "description": "Object.defineProperty throws TypeError when changing [[Enumerable]] from true to false on non-configurable accessor properties",
+ "test": "assertTrue((function testcase() {\n var o = {};\n\n // create an accessor property; all other attributes default to false.\n // dummy getter\n var getter = function () { return 1; }\n var d1 = { get: getter, enumerable: true, configurable: false };\n Object.defineProperty(o, \"foo\", d1);\n\n // now, setting enumerable to true should fail, since [[Configurable]]\n // on the original property will be false.\n var desc = { get: getter, enumerable: false };\n\n try {\n Object.defineProperty(o, \"foo\", desc);\n }\n catch (e) {\n if (e instanceof TypeError) {\n // the property should remain unchanged.\n var d2 = Object.getOwnPropertyDescriptor(o, \"foo\");\n if (d2.get === getter &&\n d2.enumerable === true &&\n d2.configurable === false) {\n return true;\n }\n }\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-110",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-110.js",
+ "description": "Object.defineProperty - 'name' and 'desc' are accessor properties, both desc.[[Set]] and name.[[Set]] are two different values (8.12.9 step 12)",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n\n function setFunc1() {\n return 10;\n }\n\n Object.defineProperty(obj, \"foo\", {\n set: setFunc1,\n enumerable: true,\n configurable: true\n });\n\n function setFunc2(value) {\n obj.setVerifyHelpProp = value;\n }\n\n Object.defineProperty(obj, \"foo\", {\n set: setFunc2\n });\n return accessorPropertyAttributesAreCorrect(obj, \"foo\", undefined, setFunc2, \"setVerifyHelpProp\", true, true);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-111",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-111.js",
+ "description": "Object.defineProperty - 'name' and 'desc' are accessor properties, name.[[Set]] is present and desc.[[Set]] is undefined (8.12.9 step 12)",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n\n function getFunc() {\n return 10;\n }\n\n function setFunc(value) {\n obj.setVerifyHelpProp = value;\n }\n\n Object.defineProperty(obj, \"foo\", {\n get: getFunc,\n set: setFunc,\n enumerable: true,\n configurable: true\n });\n\n Object.defineProperty(obj, \"foo\", {\n set: undefined,\n get: getFunc\n });\n\n\n var desc = Object.getOwnPropertyDescriptor(obj, \"foo\");\n return obj.hasOwnProperty(\"foo\") && typeof (desc.set) === \"undefined\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-112",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-112.js",
+ "description": "Object.defineProperty - 'name' and 'desc' are accessor properties, name.[[Set]] is undefined and desc.[[Set]] is function (8.12.9 step 12)",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n\n function getFunc() {\n return 10;\n }\n\n Object.defineProperty(obj, \"foo\", {\n set: undefined,\n get: getFunc,\n enumerable: true,\n configurable: true\n });\n\n function setFunc(value) {\n obj.setVerifyHelpProp = value;\n }\n\n Object.defineProperty(obj, \"foo\", {\n set: setFunc\n });\n return accessorPropertyAttributesAreCorrect(obj, \"foo\", getFunc, setFunc, \"setVerifyHelpProp\", true, true);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-113",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-113.js",
+ "description": "Object.defineProperty - 'name' and 'desc' are accessor properties, name.enumerable and desc.enumerable are different values (8.12.9 step 12)",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n\n function getFunc() {\n return 10;\n }\n\n Object.defineProperty(obj, \"foo\", {\n get: getFunc,\n enumerable: true,\n configurable: true\n });\n\n Object.defineProperty(obj, \"foo\", {\n get: getFunc,\n enumerable: false\n });\n\n return accessorPropertyAttributesAreCorrect(obj, \"foo\", getFunc, undefined, undefined, false, true);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-114",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-114.js",
+ "description": "Object.defineProperty - 'name' and 'desc' are accessor properties, name.configurable = true and desc.configurable = false (8.12.9 step 12)",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n\n function setFunc(value) {\n obj.setVerifyHelpProp = value;\n }\n\n function getFunc() {\n return 10;\n }\n\n Object.defineProperty(obj, \"foo\", {\n get: getFunc,\n set: setFunc,\n configurable: true\n });\n\n Object.defineProperty(obj, \"foo\", {\n get: getFunc,\n configurable: false\n });\n return accessorPropertyAttributesAreCorrect(obj, \"foo\", getFunc, setFunc, \"setVerifyHelpProp\", false, false);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-115",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-115.js",
+ "description": "Object.defineProperty - 'name' and 'desc' are accessor properties, several attributes values of 'name' and 'desc' are different (8.12.9 step 12)",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n\n function getFunc1() {\n return 10;\n }\n function setFunc1() {}\n\n Object.defineProperty(obj, \"foo\", {\n get: getFunc1,\n set: setFunc1,\n enumerable: true,\n configurable: true\n });\n\n function getFunc2() {\n return 20;\n }\n function setFunc2(value) {\n obj.setVerifyHelpProp = value;\n }\n Object.defineProperty(obj, \"foo\", {\n get: getFunc2,\n set: setFunc2,\n enumerable: false\n });\n return accessorPropertyAttributesAreCorrect(obj, \"foo\", getFunc2, setFunc2, \"setVerifyHelpProp\", false, true);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-116",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-116.js",
+ "description": "Object.defineProperty - 'O' is an Array, test the length property of 'O' is own data property (15.4.5.1 step 1)",
+ "test": "assertTrue((function testcase() {\n\n var arrObj = [0, 1];\n Object.defineProperty(arrObj, \"1\", {\n value: 1,\n configurable: false\n });\n try {\n Object.defineProperty(arrObj, \"length\", { value: 1 });\n return false;\n } catch (e) {\n var desc = Object.getOwnPropertyDescriptor(arrObj, \"length\");\n\n return Object.hasOwnProperty.call(arrObj, \"length\") && desc.value === 2 &&\n desc.writable === true && desc.configurable === false && desc.enumerable === false;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-117",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-117.js",
+ "description": "Object.defineProperty - 'O' is an Array, test the length property of 'O' is own data property that overrides an inherited data property (15.4.5.1 step 1)",
+ "test": "assertTrue((function testcase() {\n var arrObj = [0, 1, 2];\n var arrProtoLen;\n\n try {\n arrProtoLen = Array.prototype.length;\n Array.prototype.length = 0;\n\n \n Object.defineProperty(arrObj, \"2\", {\n configurable: false\n });\n\n Object.defineProperty(arrObj, \"length\", {\n value: 1\n });\n return false;\n } catch (e) {\n return e instanceof TypeError && arrObj.length === 3 && Array.prototype.length === 0;\n } finally {\n Array.prototype.length = arrProtoLen;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-118",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-118.js",
+ "description": "Object.defineProperty - 'O' is an Array, 'name' is the length property of 'O', the [[Value]] field of 'desc' is absent, test every field in 'desc' is absent (15.4.5.1 step 3.a.i)",
+ "test": "assertTrue((function testcase() {\n var arrObj = [];\n\n Object.defineProperty(arrObj, \"length\", {});\n\n var verifyValue = false;\n if (arrObj.length === 0) {\n verifyValue = true;\n }\n\n arrObj.length = 2;\n var verifyWritable = arrObj.length === 2;\n\n var verifyEnumerable = false;\n for (var p in arrObj) {\n if (p === \"length\" && arrObj.hasOwnProperty(p)) {\n verifyEnumerable = true;\n }\n }\n\n delete arrObj.length;\n var verifyConfigurable = arrObj.hasOwnProperty(\"length\");\n\n return verifyValue && verifyWritable && !verifyEnumerable && verifyConfigurable;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-119",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-119.js",
+ "description": "Object.defineProperty - 'O' is an Array, 'name' is the length property of 'O', the [[Value]] field of 'desc' is absent, test every field in 'desc' is same with corresponding attribute value of the length property in 'O' (15.4.5.1 step 3.a.i)",
+ "test": "assertTrue((function testcase() {\n\n var arrObj = [];\n Object.defineProperty(arrObj, \"length\", {\n writable: true,\n enumerable: false,\n configurable: false\n });\n\n var verifyValue = false;\n if (arrObj.length === 0) {\n verifyValue = true;\n }\n\n arrObj.length = 2;\n var verifyWritable = arrObj.length === 2 ? true : false;\n\n var verifyEnumerable = false;\n for (var p in arrObj) {\n if (p === \"length\" && arrObj.hasOwnProperty(p)) {\n verifyEnumerable = true;\n }\n }\n\n delete arrObj.length;\n var verifyConfigurable = arrObj.hasOwnProperty(\"length\");\n\n return verifyValue && verifyWritable && !verifyEnumerable && verifyConfigurable;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-12",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-12.js",
+ "description": "Object.defineProperty throws TypeError when changing non-configurable data properties to accessor properties",
+ "test": "assertTrue((function testcase() {\n var o = {};\n\n // create a data valued property; all other attributes default to false.\n var d1 = { value: 101, configurable: false };\n Object.defineProperty(o, \"foo\", d1);\n\n // changing \"foo\" to be an accessor should fail, since [[Configurable]]\n // on the original property will be false.\n\n // dummy getter\n var getter = function () { return 1; }\n\n var desc = { get: getter };\n try {\n Object.defineProperty(o, \"foo\", desc);\n }\n catch (e) {\n if (e instanceof TypeError) {\n // the property should remain a data valued property.\n var d2 = Object.getOwnPropertyDescriptor(o, \"foo\");\n if (d2.value === 101 &&\n d2.writable === false &&\n d2.enumerable === false &&\n d2.configurable === false) {\n return true;\n }\n }\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-120",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-120.js",
+ "description": "Object.defineProperty - 'O' is an Array, 'name' is the length property of 'O', the [[Value]] field of 'desc' is absent, test TypeError is thrown when updating the [[Configurable]] attribute of the length property from false to true (15.4.5.1 step 3.a.i)",
+ "test": "assertTrue((function testcase() {\n\n var arrObj = [];\n try {\n Object.defineProperty(arrObj, \"length\", {\n configurable: true\n });\n return false;\n } catch (e) {\n return e instanceof TypeError;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-121",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-121.js",
+ "description": "Object.defineProperty - 'O' is an Array, 'name' is the length property of 'O', the [[Value]] field of 'desc' is absent, test TypeError is thrown when updating the [[Enumerable]] attribute of the length property from false to true (15.4.5.1 step 3.a.i)",
+ "test": "assertTrue((function testcase() {\n\n var arrObj = [];\n try {\n Object.defineProperty(arrObj, \"length\", {\n enumerable: true\n });\n return false;\n } catch (e) {\n return e instanceof TypeError;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-122",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-122.js",
+ "description": "Object.defineProperty - 'O' is an Array, 'name' is the length property of 'O', test TypeError is thrown when 'desc' is accessor descriptor (15.4.5.1 step 3.a.i)",
+ "test": "assertTrue((function testcase() {\n\n var arrObj = [];\n try {\n Object.defineProperty(arrObj, \"length\", {\n get: function () {\n return 2;\n }\n });\n return false;\n } catch (e) {\n return e instanceof TypeError;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-123",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-123.js",
+ "description": "Object.defineProperty - 'O' is an Array, 'name' is the length property of 'O', the [[Value]] field of 'desc' is absent, test TypeError is thrown when updating the [[Writable]] attribute of the length property from false to true (15.4.5.1 step 3.a.i)",
+ "test": "assertTrue((function testcase() {\n\n var arrObj = [];\n try {\n Object.defineProperty(arrObj, \"length\", {\n writable: false\n });\n Object.defineProperty(arrObj, \"length\", {\n writable: true\n });\n\n return false;\n } catch (e) {\n return e instanceof TypeError;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-124",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-124.js",
+ "description": "Object.defineProperty - 'O' is an Array, 'name' is the length property of 'O', the [[Value]] field of 'desc' is absent, test updating the [[Writable]] attribute of the length property from true to false (15.4.5.1 step 3.a.i)",
+ "test": "assertTrue((function testcase() {\n\n var arrObj = [];\n\n Object.defineProperty(arrObj, \"length\", {\n writable: false\n });\n return dataPropertyAttributesAreCorrect(arrObj, \"length\", 0, false, false, false);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-125",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-125.js",
+ "description": "Object.defineProperty - 'O' is an Array, 'name' is the length property of 'O', test that RangeError exception is thrown when [[Value]] field of 'desc' is undefined (15.4.5.1 step 3.c)",
+ "test": "assertTrue((function testcase() {\n\n var arrObj = [];\n\n try {\n Object.defineProperty(arrObj, \"length\", {\n value: undefined\n });\n return false;\n } catch (e) {\n return e instanceof RangeError;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-126",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-126.js",
+ "description": "Object.defineProperty - 'O' is an Array, 'name' is the length property of 'O', test the [[Value]] field of 'desc' is null (15.4.5.1 step 3.c)",
+ "test": "assertTrue((function testcase() {\n\n var arrObj = [0, 1];\n\n Object.defineProperty(arrObj, \"length\", {\n value: null\n });\n return arrObj.length === 0;\n\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-127",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-127.js",
+ "description": "Object.defineProperty - 'O' is an Array, 'name' is the length property of 'O', test the [[Value]] field of 'desc' is a boolean with value false (15.4.5.1 step 3.c)",
+ "test": "assertTrue((function testcase() {\n\n var arrObj = [0, 1];\n\n Object.defineProperty(arrObj, \"length\", {\n value: false\n });\n return arrObj.length === 0 && !arrObj.hasOwnProperty(\"0\") && !arrObj.hasOwnProperty(\"1\");\n\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-128",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-128.js",
+ "description": "Object.defineProperty - 'O' is an Array, 'name' is the length property of 'O', test the [[Value]] field of 'desc' is a boolean with value true (15.4.5.1 step 3.c)",
+ "test": "assertTrue((function testcase() {\n\n var arrObj = [];\n\n Object.defineProperty(arrObj, \"length\", {\n value: true\n });\n return arrObj.length === 1;\n\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-129",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-129.js",
+ "description": "Object.defineProperty - 'O' is an Array, 'name' is the length property of 'O', test RangeError exception is not thrown when the [[Value]] field of 'desc' is 0 (15.4.5.1 step 3.c)",
+ "test": "assertTrue((function testcase() {\n\n var arrObj = [0, 1];\n\n Object.defineProperty(arrObj, \"length\", {\n value: 0\n });\n return arrObj.length === 0;\n\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-13",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-13.js",
+ "description": "Object.defineProperty throws TypeError when changing non-configurable accessor properties to data properties",
+ "test": "assertTrue((function testcase() {\n var o = {};\n\n // create an accessor property; all other attributes default to false.\n \n // dummy getter\n var getter = function () { return 1; }\n var d1 = { get: getter, configurable: false };\n Object.defineProperty(o, \"foo\", d1);\n\n // changing \"foo\" to be a data property should fail, since [[Configurable]]\n // on the original property will be false.\n var desc = { value: 101 };\n\n try {\n Object.defineProperty(o, \"foo\", desc);\n }\n catch (e) {\n if (e instanceof TypeError) {\n // the property should remain an accessor property.\n var d2 = Object.getOwnPropertyDescriptor(o, \"foo\");\n if (d2.get === getter &&\n d2.configurable === false) {\n return true;\n }\n }\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-130",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-130.js",
+ "description": "Object.defineProperty - 'O' is an Array, 'name' is the length property of 'O', test RangeError exception is not thrown when the [[Value]] field of 'desc' is +0 (15.4.5.1 step 3.c)",
+ "test": "assertTrue((function testcase() {\n\n var arrObj = [0, 1];\n\n Object.defineProperty(arrObj, \"length\", {\n value: +0\n });\n return arrObj.length === 0;\n\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-131",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-131.js",
+ "description": "Object.defineProperty - 'O' is an Array, 'name' is the length property of 'O', test RangeError exception is not thrown when the [[Value]] field of 'desc' is -0 (15.4.5.1 step 3.c)",
+ "test": "assertTrue((function testcase() {\n\n var arrObj = [0, 1];\n\n Object.defineProperty(arrObj, \"length\", {\n value: -0\n });\n return arrObj.length === 0;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-132",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-132.js",
+ "description": "Object.defineProperty - 'O' is an Array, 'name' is the length property of 'O', test RangeError exception is not thrown when the [[Value]] field of 'desc' is a positive number (15.4.5.1 step 3.c)",
+ "test": "assertTrue((function testcase() {\n\n var arrObj = [];\n\n Object.defineProperty(arrObj, \"length\", {\n value: 12\n });\n return arrObj.length === 12;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-133",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-133.js",
+ "description": "Object.defineProperty - 'O' is an Array, 'name' is the length property of 'O', test RangeError exception is thrown when the [[Value]] field of 'desc' is a negative number (15.4.5.1 step 3.c)",
+ "test": "assertTrue((function testcase() {\n\n var arrObj = [];\n\n try {\n Object.defineProperty(arrObj, \"length\", {\n value: -9\n });\n return false;\n } catch (e) {\n return e instanceof RangeError;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-134",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-134.js",
+ "description": "Object.defineProperty - 'O' is an Array, 'name' is the length property of 'O', test RangeError exception is thrown when the [[Value]] field of 'desc' is +Infinity (15.4.5.1 step 3.c)",
+ "test": "assertTrue((function testcase() {\n\n var arrObj = [];\n\n try {\n Object.defineProperty(arrObj, \"length\", {\n value: +Infinity\n });\n return false;\n } catch (e) {\n return e instanceof RangeError;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-135",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-135.js",
+ "description": "Object.defineProperty - 'O' is an Array, 'name' is the length property of 'O', test RangeError exception is thrown when the [[Value]] field of 'desc' is -Infinity (15.4.5.1 step 3.c)",
+ "test": "assertTrue((function testcase() {\n\n var arrObj = [];\n\n try {\n Object.defineProperty(arrObj, \"length\", {\n value: -Infinity\n });\n return false;\n } catch (e) {\n return e instanceof RangeError;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-136",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-136.js",
+ "description": "Object.defineProperty - 'O' is an Array, 'name' is the length property of 'O', test RangeError exception is thrown when the [[Value]] field of 'desc' is NaN (15.4.5.1 step 3.c)",
+ "test": "assertTrue((function testcase() {\n\n var arrObj = [];\n\n try {\n Object.defineProperty(arrObj, \"length\", {\n value: NaN\n });\n return false;\n } catch (e) {\n return e instanceof RangeError;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-137",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-137.js",
+ "description": "Object.defineProperty - 'O' is an Array, 'name' is the length property of 'O', test RangeError exception is not thrown when the [[Value]] field of 'desc' is a string containing a positive number (15.4.5.1 step 3.c)",
+ "test": "assertTrue((function testcase() {\n\n var arrObj = [];\n\n Object.defineProperty(arrObj, \"length\", {\n value: \"2\"\n });\n return arrObj.length === 2;\n\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-138",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-138.js",
+ "description": "Object.defineProperty - 'O' is an Array, 'name' is the length property of 'O', test RangeError exception is thrown when the [[Value]] field of 'desc' is a string containing a negative number (15.4.5.1 step 3.c)",
+ "test": "assertTrue((function testcase() {\n\n var arrObj = [];\n\n try {\n Object.defineProperty(arrObj, \"length\", {\n value: \"-42\"\n });\n return false;\n } catch (e) {\n return e instanceof RangeError;\n }\n\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-139",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-139.js",
+ "description": "Object.defineProperty - 'O' is an Array, 'name' is the length property of 'O', test RangeError exception is thrown when the [[Value]] field of 'desc' is a string containing a decimal number (15.4.5.1 step 3.c)",
+ "test": "assertTrue((function testcase() {\n\n var arrObj = [];\n\n try {\n Object.defineProperty(arrObj, \"length\", {\n value: \"200.59\"\n });\n return false;\n } catch (e) {\n return e instanceof RangeError;\n }\n\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-14",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-14.js",
+ "description": "Object.defineProperty permits changing data property to accessor property for configurable properties",
+ "test": "assertTrue((function testcase() {\n var o = {};\n\n // create a data property. In this case,\n // [[Enumerable]] and [[Configurable]] are true\n o[\"foo\"] = 101;\n\n // changing \"foo\" to be an accessor should succeed, since [[Configurable]]\n // on the original property will be true. Existing values of [[Configurable]]\n // and [[Enumerable]] need to be preserved and the rest need to be set to\n // their default values\n\n // dummy getter\n var getter = function () { return 1; }\n var d1 = { get: getter };\n Object.defineProperty(o, \"foo\", d1);\n\n var d2 = Object.getOwnPropertyDescriptor(o, \"foo\");\n\n if (d2.get === getter &&\n d2.enumerable === true &&\n d2.configurable === true) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-140",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-140.js",
+ "description": "Object.defineProperty - 'O' is an Array, 'name' is the length property of 'O', test RangeError exception is thrown when the [[Value]] field of 'desc' is a string containing +Infinity (15.4.5.1 step 3.c)",
+ "test": "assertTrue((function testcase() {\n\n var arrObj = [];\n\n try {\n Object.defineProperty(arrObj, \"length\", {\n value: \"+Infinity\"\n });\n return false;\n } catch (e) {\n return e instanceof RangeError;\n }\n\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-141",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-141.js",
+ "description": "Object.defineProperty - 'O' is an Array, 'name' is the length property of 'O', test RangeError exception is thrown when the [[Value]] field of 'desc' is a string containing -Infinity (15.4.5.1 step 3.c)",
+ "test": "assertTrue((function testcase() {\n\n var arrObj = [];\n\n try {\n Object.defineProperty(arrObj, \"length\", {\n value: \"-Infinity\"\n });\n return false;\n } catch (e) {\n return e instanceof RangeError;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-142",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-142.js",
+ "description": "Object.defineProperty - 'O' is an Array, 'name' is the length property of 'O', test the [[Value]] field of 'desc' is a string containing an exponential number (15.4.5.1 step 3.c)",
+ "test": "assertTrue((function testcase() {\n\n var arrObj = [];\n\n Object.defineProperty(arrObj, \"length\", {\n value: \"2E3\"\n });\n return arrObj.length === 2E3;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-143",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-143.js",
+ "description": "Object.defineProperty - 'O' is an Array, 'name' is the length property of 'O', test the [[Value]] field of 'desc' is a string containing a hex number (15.4.5.1 step 3.c)",
+ "test": "assertTrue((function testcase() {\n\n var arrObj = [];\n\n Object.defineProperty(arrObj, \"length\", {\n value: \"0x00B\"\n });\n return arrObj.length === 0x00B;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-144",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-144.js",
+ "description": "Object.defineProperty - 'O' is an Array, 'name' is the length property of 'O', test the [[Value]] field of 'desc' is a string containing a number with leading zeros (15.4.5.1 step 3.c)",
+ "test": "assertTrue((function testcase() {\n\n var arrObj = [];\n\n Object.defineProperty(arrObj, \"length\", {\n value: \"0002.0\"\n });\n return arrObj.length === 2;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-145",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-145.js",
+ "description": "Object.defineProperty - 'O' is an Array, 'name' is the length property of 'O', test RangeError exception is thrown when the [[Value]] field of 'desc' is a string which doesn't convert to a number (15.4.5.1 step 3.c)",
+ "test": "assertTrue((function testcase() {\n\n var arrObj = [];\n\n try {\n Object.defineProperty(arrObj, \"length\", {\n value: \"two\"\n });\n return false;\n } catch (e) {\n return e instanceof RangeError;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-146",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-146.js",
+ "description": "Object.defineProperty - 'O' is an Array, 'name' is the length property of 'O', test the [[Value]] field of 'desc' is an object which has an own toString method (15.4.5.1 step 3.c)",
+ "test": "assertTrue((function testcase() {\n\n var arrObj = [];\n\n Object.defineProperty(arrObj, \"length\", {\n value: {\n toString: function () {\n return '2';\n } \n }\n });\n return arrObj.length === 2;\n\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-147",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-147.js",
+ "description": "Object.defineProperty - 'O' is an Array, 'name' is the length property of 'O', test the [[Value]] field of 'desc' is an Object which has an own valueOf method (15.4.5.1 step 3.c)",
+ "test": "assertTrue((function testcase() {\n\n var arrObj = [];\n\n Object.defineProperty(arrObj, \"length\", {\n value: {\n valueOf: function () {\n return 2;\n }\n }\n });\n return arrObj.length === 2;\n\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-148",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-148.js",
+ "description": "Object.defineProperty - 'O' is an Array, 'name' is the length property of 'O', test the [[Value]] field of 'desc' is an Object which has an own valueOf method that returns an object and toString method that returns a string (15.4.5.1 step 3.c)",
+ "test": "assertTrue((function testcase() {\n\n var arrObj = [];\n var toStringAccessed = false;\n var valueOfAccessed = false;\n\n Object.defineProperty(arrObj, \"length\", {\n value: {\n toString: function () {\n toStringAccessed = true;\n return '2';\n },\n\n valueOf: function () {\n valueOfAccessed = true;\n return {};\n }\n }\n });\n return arrObj.length === 2 && toStringAccessed && valueOfAccessed;\n\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-149",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-149.js",
+ "description": "Object.defineProperty - 'O' is an Array, 'name' is the length property of 'O', test the [[Value]] field of 'desc' is an Object which has an own toString and valueOf method (15.4.5.1 step 3.c)",
+ "test": "assertTrue((function testcase() {\n\n var arrObj = [];\n var toStringAccessed = false;\n var valueOfAccessed = false;\n\n Object.defineProperty(arrObj, \"length\", {\n value: {\n toString: function () {\n toStringAccessed = true;\n return '2';\n },\n\n valueOf: function () {\n valueOfAccessed = true;\n return 3;\n }\n }\n });\n return arrObj.length === 3 && !toStringAccessed && valueOfAccessed;\n\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-15",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-15.js",
+ "description": "Object.defineProperty permits changing accessor property to data property for configurable properties",
+ "test": "assertTrue((function testcase() {\n var o = {};\n\n // define an accessor property\n // dummy getter\n var getter = function () { return 1; }\n var d1 = { get: getter, configurable: true };\n Object.defineProperty(o, \"foo\", d1);\n\n // changing \"foo\" to be a data valued property should succeed, since\n // [[Configurable]] on the original property will be true. Existing\n // values of [[Configurable]] and [[Enumerable]] need to be preserved\n // and the rest need to be set to their default values.\n var desc = { value: 101 };\n Object.defineProperty(o, \"foo\", desc);\n var d2 = Object.getOwnPropertyDescriptor(o, \"foo\");\n\n if (d2.value === 101 &&\n d2.writable === false &&\n d2.enumerable === false &&\n d2.configurable === true) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-150",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-150.js",
+ "description": "Object.defineProperty - 'O' is an Array, 'name' is the length property of 'O', test TypeError is thrown when the [[Value]] field of 'desc' is an Object that both toString and valueOf wouldn't return primitive value (15.4.5.1 step 3.c)",
+ "test": "assertTrue((function testcase() {\n\n var arrObj = [];\n var toStringAccessed = false;\n var valueOfAccessed = false;\n\n try {\n Object.defineProperty(arrObj, \"length\", {\n value: {\n toString: function () {\n toStringAccessed = true;\n return {};\n },\n\n valueOf: function () {\n valueOfAccessed = true;\n return {};\n }\n }\n });\n return false;\n\n } catch (e) {\n return e instanceof TypeError && toStringAccessed && valueOfAccessed;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-151",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-151.js",
+ "description": "Object.defineProperty - 'O' is an Array, 'name' is the length property of 'O', and the [[Value]] field of 'desc' is an Object with an own toString method and an inherited valueOf method (15.4.5.1 step 3.c), test that the inherited valueOf method is used",
+ "test": "assertTrue((function testcase() {\n\n var arrObj = [];\n var toStringAccessed = false;\n var valueOfAccessed = false;\n\n var proto = {\n valueOf: function () {\n valueOfAccessed = true;\n return 2;\n }\n };\n\n var ConstructFun = function () { };\n ConstructFun.prototype = proto;\n\n var child = new ConstructFun();\n child.toString = function () {\n toStringAccessed = true;\n return 3;\n };\n\n Object.defineProperty(arrObj, \"length\", {\n value: child\n });\n return arrObj.length === 2 && !toStringAccessed && valueOfAccessed;\n\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-152",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-152.js",
+ "description": "Object.defineProperty - 'O' is an Array, 'name' is the length property of 'O', test RangeError is thrown when the [[Value]] field of 'desc' is a positive non-integer values (15.4.5.1 step 3.c)",
+ "test": "assertTrue((function testcase() {\n\n var arrObj = [];\n\n try {\n Object.defineProperty(arrObj, \"length\", {\n value: 123.5\n });\n\n return false;\n } catch (e) {\n return e instanceof RangeError;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-153",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-153.js",
+ "description": "Object.defineProperty - 'O' is an Array, 'name' is the length property of 'O', test RangeError is thrown when the [[Value]] field of 'desc' is a negative non-integer values (15.4.5.1 step 3.c)",
+ "test": "assertTrue((function testcase() {\n\n var arrObj = [];\n\n try {\n Object.defineProperty(arrObj, \"length\", {\n value: -4294967294.5\n });\n\n return false;\n } catch (e) {\n return e instanceof RangeError;\n }\n\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-154",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-154.js",
+ "description": "Object.defineProperty - 'O' is an Array, 'name' is the length property of 'O', test the [[Value]] field of 'desc' is boundary value 2^32 - 2 (15.4.5.1 step 3.c)",
+ "test": "assertTrue((function testcase() {\n\n var arrObj = [];\n\n Object.defineProperty(arrObj, \"length\", {\n value: 4294967294 \n });\n\n return arrObj.length === 4294967294;\n\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-155",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-155.js",
+ "description": "Object.defineProperty - 'O' is an Array, 'name' is the length property of 'O', test the [[Value]] field of 'desc' is boundary value 2^32 - 1 (15.4.5.1 step 3.c)",
+ "test": "assertTrue((function testcase() {\n\n var arrObj = [];\n\n Object.defineProperty(arrObj, \"length\", {\n value: 4294967295\n });\n\n return arrObj.length === 4294967295;\n\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-156",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-156.js",
+ "description": "Object.defineProperty - 'O' is an Array, 'name' is the length property of 'O', test RangeError is thrown when the [[Value]] field of 'desc' is boundary value 2^32 (15.4.5.1 step 3.c)",
+ "test": "assertTrue((function testcase() {\n\n var arrObj = [];\n\n try {\n Object.defineProperty(arrObj, \"length\", {\n value: 4294967296\n });\n return false;\n } catch (e) {\n return e instanceof RangeError;\n }\n\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-157",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-157.js",
+ "description": "Object.defineProperty - 'O' is an Array, 'name' is the length property of 'O', test RangeError is thrown when the [[Value]] field of 'desc' is boundary value 2^32 + 1 (15.4.5.1 step 3.c)",
+ "test": "assertTrue((function testcase() {\n\n var arrObj = [];\n\n try {\n Object.defineProperty(arrObj, \"length\", {\n value: 4294967297\n });\n return false;\n } catch (e) {\n return e instanceof RangeError;\n }\n\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-159",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-159.js",
+ "description": "Object.defineProperty - 'O' is an Array, 'name' is the length property of 'O', set the [[Value]] field of 'desc' to a value greater than the existing value of length (15.4.5.1 step 3.f)",
+ "test": "assertTrue((function testcase() {\n\n var arrObj = [0, , 2];\n\n Object.defineProperty(arrObj, \"length\", {\n value: 5\n });\n\n return arrObj.length === 5 && arrObj[0] === 0 &&\n !arrObj.hasOwnProperty(\"1\") && arrObj[2] === 2 &&\n !arrObj.hasOwnProperty(\"4\");\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-16",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-16.js",
+ "description": "Object.defineProperty throws TypeError when relaxing [[Writable]] on non-configurable data properties",
+ "test": "assertTrue((function testcase() {\n var o = {};\n\n // create a data valued property; all other attributes default to false.\n var d1 = { value: 101 };\n Object.defineProperty(o, \"foo\", d1);\n\n // now, relaxing [[Writable]] on \"foo\" should fail, since both\n // [[Configurable]] and [[Writable]] on the original property will be false.\n var desc = { value: 101, writable: true };\n\n try {\n Object.defineProperty(o, \"foo\", desc);\n }\n catch (e) {\n if (e instanceof TypeError) {\n // the property should remain unchanged.\n var d2 = Object.getOwnPropertyDescriptor(o, \"foo\");\n if (d2.value === 101 &&\n d2.writable === false &&\n d2.enumerable === false &&\n d2.configurable === false) {\n return true;\n }\n }\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-160",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-160.js",
+ "description": "Object.defineProperty - 'O' is an Array, 'name' is the length property of 'O', set the [[Value]] field of 'desc' to a value equal to the existing value of length (15.4.5.1 step 3.f)",
+ "test": "assertTrue((function testcase() {\n\n var arrObj = [0, , 2];\n\n Object.defineProperty(arrObj, \"length\", {\n value: 3\n });\n\n return arrObj.length === 3 && arrObj[0] === 0 && !arrObj.hasOwnProperty(\"1\") && arrObj[2] === 2;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-161",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-161.js",
+ "description": "Object.defineProperty - 'O' is an Array, 'name' is the length property of 'O', set the [[Value]] field of 'desc' to a value lesser than the existing value of length and test that indexes beyond the new length are deleted(15.4.5.1 step 3.f)",
+ "test": "assertTrue((function testcase() {\n\n var arrObj = [0, 1];\n \n Object.defineProperty(arrObj, \"length\", {\n value: 1\n });\n return arrObj.length === 1 && !arrObj.hasOwnProperty(\"1\");\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-162",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-162.js",
+ "description": "Object.defineProperty - 'O' is an Array, 'name' is the length property of 'O', the [[Value]] field of 'desc' is greater than value of the length property, test TypeError is thrown when the length property is not writable (15.4.5.1 step 3.f.i)",
+ "test": "assertTrue((function testcase() {\n\n var arrObj = [];\n\n Object.defineProperty(arrObj, \"length\", {\n writable: false\n });\n\n try {\n Object.defineProperty(arrObj, \"length\", {\n value: 12\n });\n return false;\n } catch (e) {\n return e instanceof TypeError;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-163",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-163.js",
+ "description": "Object.defineProperty - 'O' is an Array, 'name' is the length property of 'O', the [[Value]] field of 'desc' equals to value of the length property, test no TypeError is thrown when the length property is not writable (15.4.5.1 step 3.f.i)",
+ "test": "assertTrue((function testcase() {\n\n var arrObj = [];\n\n Object.defineProperty(arrObj, \"length\", {\n writable: false\n });\n\n try {\n Object.defineProperty(arrObj, \"length\", {\n value: 0\n });\n return true;\n } catch (e) {\n return false;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-164",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-164.js",
+ "description": "Object.defineProperty - 'O' is an Array, 'name' is the length property of 'O', the [[Value]] field of 'desc' is less than value of the length property, test TypeError is thrown when the [[Writable]] attribute of the length property is false (15.4.5.1 step 3.g)",
+ "test": "assertTrue((function testcase() {\n\n var arrObj = [0, 1];\n\n Object.defineProperty(arrObj, \"length\", {\n writable: false\n });\n\n try {\n Object.defineProperty(arrObj, \"length\", {\n value: 0\n });\n return false;\n } catch (e) {\n return e instanceof TypeError;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-165",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-165.js",
+ "description": "Object.defineProperty - 'O' is an Array, 'name' is the length property of 'O', the [[Value]] field of 'desc' is less than value of the length property, test the [[Writable]] attribute of the length property is set to true after deleting properties with large index named if the [[Writable]] field of 'desc' is absent (15.4.5.1 step 3.h)",
+ "test": "assertTrue((function testcase() {\n\n var arrObj = [0, 1];\n\n Object.defineProperty(arrObj, \"length\", {\n value: 1\n });\n\n var indexDeleted = !arrObj.hasOwnProperty(\"1\");\n\n arrObj.length = 10;\n\n return indexDeleted && arrObj.length === 10;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-166",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-166.js",
+ "description": "Object.defineProperty - 'O' is an Array, 'name' is the length property of 'O', the [[Value]] field of 'desc' is less than value of the length property, test the [[Writable]] attribute of the length property is set to true after deleting properties with large index named if the [[Writable]] field of 'desc' is true (15.4.5.1 step 3.h)",
+ "test": "assertTrue((function testcase() {\n\n var arrObj = [0, 1];\n\n Object.defineProperty(arrObj, \"length\", {\n value: 1,\n writable: true\n });\n\n var indexDeleted = !arrObj.hasOwnProperty(\"1\");\n\n arrObj.length = 10;\n\n return indexDeleted && arrObj.length === 10;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-167",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-167.js",
+ "description": "Object.defineProperty - 'O' is an Array, 'name' is the length property of 'O', the [[Value]] field of 'desc' is less than value of the length property, test the [[Writable]] attribute of the length property is set to false after deleting properties with large index named if the [[Writable]] field of 'desc' is false (15.4.5.1 step 3.i.ii)",
+ "test": "assertTrue((function testcase() {\n\n var arrObj = [0, 1];\n\n Object.defineProperty(arrObj, \"length\", {\n value: 1,\n writable: false\n });\n\n var indexDeleted = !arrObj.hasOwnProperty(\"1\");\n\n arrObj.length = 10;\n\n return indexDeleted && arrObj.length === 1;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-168",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-168.js",
+ "description": "Object.defineProperty - 'O' is an Array, 'name' is the length property of 'O', whose writable attribute is being changed to false and the [[Value]] field of 'desc' is less than value of the length property and also lesser than an index of the array which is set to configurable:false, test that new length is set to a value greater than the non-deletable index by 1, writable attribute of length is set to false and TypeError exception is thrown (15.4.5.1 step 3.i.iii)",
+ "test": "assertTrue((function testcase() {\n\n var arrObj = [0, 1, 2];\n\n try {\n Object.defineProperty(arrObj, \"1\", {\n configurable: false\n });\n\n Object.defineProperty(arrObj, \"length\", {\n value: 0,\n writable: false\n });\n return false;\n } catch (e) {\n return e instanceof TypeError && arrObj.length === 2;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-169",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-169.js",
+ "description": "Object.defineProperty - 'O' is an Array, 'name' is the length property of 'O', the [[Value]] field of 'desc' is less than value of the length property and also lesser than an index of the array which is set to configurable: false, test that new length is set to a value greater than the non-deletable index by 1, and TypeError is thrown (15.4.5.1 step 3.l.i)",
+ "test": "assertTrue((function testcase() {\n\n var arrObj = [0, 1, 2];\n\n Object.defineProperty(arrObj, \"1\", {\n configurable: false\n });\n\n Object.defineProperty(arrObj, \"2\", {\n configurable: true\n });\n\n try {\n Object.defineProperty(arrObj, \"length\", {\n value: 1\n });\n return false;\n } catch (e) {\n return e instanceof TypeError && arrObj.length === 2 && !arrObj.hasOwnProperty(\"2\");\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-17",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-17.js",
+ "description": "Object.defineProperty throws TypeError when changing value of non-writable non-configurable data properties",
+ "test": "assertTrue((function testcase() {\n var o = {};\n\n // create a data valued property; all other attributes default to false.\n var d1 = { value: 101 };\n Object.defineProperty(o, \"foo\", d1);\n\n // now, trying to change the value of \"foo\" should fail, since both\n // [[Configurable]] and [[Writable]] on the original property will be false.\n var desc = { value: 102 };\n\n try {\n Object.defineProperty(o, \"foo\", desc);\n }\n catch (e) {\n if (e instanceof TypeError) {\n // the property should remain unchanged.\n var d2 = Object.getOwnPropertyDescriptor(o, \"foo\");\n\n if (d2.value === 101 &&\n d2.writable === false &&\n d2.enumerable === false &&\n d2.configurable === false) {\n return true;\n }\n }\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-170",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-170.js",
+ "description": "Object.defineProperty - 'O' is an Array, 'name' is the length property of 'O', the [[Value]] field of 'desc' is less than value of the length property and also lesser than an index of the array which is set to configurable: false, test that new length is set to a value greater than the non-deletable index by 1, writable attribute of length is set to false and TypeError exception is thrown (15.4.5.1 step 3.l.ii)",
+ "test": "assertTrue((function testcase() {\n\n var arrObj = [0, 1];\n\n try {\n Object.defineProperty(arrObj, \"1\", {\n configurable: false\n });\n\n Object.defineProperty(arrObj, \"length\", {\n value: 1\n });\n\n return false;\n } catch (e) {\n return e instanceof TypeError && arrObj.length === 2 && arrObj.hasOwnProperty(\"1\");\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-171",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-171.js",
+ "description": "Object.defineProperty - 'O' is an Array, 'name' is the length property of 'O', the [[Value]] field of 'desc' is less than value of the length property, test the [[Configurable]] attribute of an inherited data property with large index named in 'O' can't stop deleting index named properties (15.4.5.1 step 3.l.ii)",
+ "test": "assertTrue((function testcase() {\n\n var arrObj = [0, 1];\n try {\n Array.prototype[1] = 2; // Not setting the [[Configurable]] attribute of property \"1\" to false here, since Array.prototype is a global object, and non-configurbale property can't revert to configurable\n Object.defineProperty(arrObj, \"length\", {\n value: 1\n });\n return arrObj.length === 1 && !arrObj.hasOwnProperty(\"1\");\n } finally {\n delete Array.prototype[1];\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-172",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-172.js",
+ "description": "Object.defineProperty - 'O' is an Array, 'name' is the length property of 'O', the [[Value]] field of 'desc' is less than value of the length property, test the [[Configurable]] attribute of own data property with large index named in 'O' that overrides an inherited data property can stop deleting index named properties (15.4.5.1 step 3.l.ii)",
+ "test": "assertTrue((function testcase() {\n\n var arrObj = [0, 1];\n try {\n Object.defineProperty(arrObj, \"1\", {\n configurable: false\n });\n \n Array.prototype[1] = 2;\n Object.defineProperty(arrObj, \"length\", {\n value: 1\n });\n return false;\n } catch (e) {\n return e instanceof TypeError && arrObj.length === 2 && arrObj.hasOwnProperty(\"1\"); \n } finally {\n delete Array.prototype[1];\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-173",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-173.js",
+ "description": "Object.defineProperty - 'O' is an Array, 'name' is the length property of 'O', the [[Value]] field of 'desc' is less than value of the length property, test the [[Configurable]] attribute of own data property with large index named in 'O' that overrides an inherited accessor property can stop deleting index named properties (15.4.5.1 step 3.l.ii)",
+ "test": "assertTrue((function testcase() {\n\n var arrObj = [0, 1];\n try {\n Object.defineProperty(arrObj, \"1\", {\n configurable: false\n });\n\n Object.defineProperty(Array.prototype, \"1\", {\n get: function () {\n return 2;\n },\n configurable: true\n });\n\n Object.defineProperty(arrObj, \"length\", {\n value: 1\n });\n\n return false;\n } catch (e) {\n return e instanceof TypeError && arrObj.length === 2 && arrObj.hasOwnProperty(\"1\");\n } finally {\n delete Array.prototype[1];\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-174",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-174.js",
+ "description": "Object.defineProperty - 'O' is an Array, 'name' is the length property of 'O', the [[Value]] field of 'desc' is less than value of the length property, test the [[Configurable]] attribute of own accessor property with large index named in 'O' can stop deleting index named properties (15.4.5.1 step 3.l.ii)",
+ "test": "assertTrue((function testcase() {\n\n var arrObj = [0, 1];\n\n try {\n Object.defineProperty(arrObj, \"1\", {\n get: function () {\n return 1;\n },\n configurable: false\n });\n\n Object.defineProperty(arrObj, \"length\", {\n value: 1\n });\n\n return false;\n } catch (e) {\n return e instanceof TypeError && arrObj.length === 2 && arrObj.hasOwnProperty(\"1\");\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-175",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-175.js",
+ "description": "Object.defineProperty - 'O' is an Array, 'name' is the length property of 'O', the [[Value]] field of 'desc' is less than value of the length property, test the [[Configurable]] attribute of an inherited accessor property with large index named in 'O' can't stop deleting index named properties (15.4.5.1 step 3.l.ii)",
+ "test": "assertTrue((function testcase() {\n\n var arrObj = [0, 1];\n try {\n Object.defineProperty(Array.prototype, \"1\", {\n get: function () {\n return 1;\n },\n configurable: true // Not setting the [[Configurable]] attribute of property \"1\" to false here, since Array.prototype is a global object, and non-configurbale property can't revert to configurable\n });\n\n Object.defineProperty(arrObj, \"length\", {\n value: 1\n });\n\n return arrObj.length === 1 && !arrObj.hasOwnProperty(\"1\");\n } finally {\n delete Array.prototype[1];\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-176",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-176.js",
+ "description": "Object.defineProperty - 'O' is an Array, 'name' is the length property of 'O', the [[Value]] field of 'desc' is less than value of the length property, test the [[Configurable]] attribute of own accessor property with large index named in 'O' that overrides an inherited data property can stop deleting index named properties (15.4.5.1 step 3.l.ii)",
+ "test": "assertTrue((function testcase() {\n\n var arrObj = [0, 1];\n try {\n Object.defineProperty(arrObj, \"1\", {\n get: function () {\n return 2;\n },\n configurable: false\n });\n \n Array.prototype[1] = 2;\n Object.defineProperty(arrObj, \"length\", {\n value: 1\n });\n return false;\n } catch (e) {\n return e instanceof TypeError && arrObj.length === 2 && arrObj.hasOwnProperty(\"1\"); \n } finally {\n delete Array.prototype[1];\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-177",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-177.js",
+ "description": "Object.defineProperty - 'O' is an Array, 'name' is the length property of 'O', the [[Value]] field of 'desc' is less than value of the length property, test the [[Configurable]] attribute of own accessor property with large index named in 'O' that overrides an inherited accessor property can stop deleting index named properties (15.4.5.1 step 3.l.ii)",
+ "test": "assertTrue((function testcase() {\n\n var arrObj = [0, 1];\n try {\n Object.defineProperty(arrObj, \"1\", {\n get: function () {\n return 1;\n },\n configurable: false\n });\n \n Object.defineProperty(Array.prototype, \"1\", {\n get: function () {\n return 2;\n },\n configurable: true\n });\n\n Object.defineProperty(arrObj, \"length\", {\n value: 1\n });\n return false;\n } catch (e) {\n return e instanceof TypeError && arrObj.length === 2 && arrObj.hasOwnProperty(\"1\"); \n } finally {\n delete Array.prototype[1];\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-178",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-178.js",
+ "description": "Object.defineProperty - 'O' is an Array, 'name' is the length property of 'O', the [[Value]] field of 'desc' is less than value of the length property, test the configurable large index named property of 'O' is deleted (15.4.5.1 step 3.l.ii)",
+ "test": "assertTrue((function testcase() {\n\n var arrObj = [0, 1];\n\n Object.defineProperty(arrObj, \"length\", {\n value: 1\n });\n\n return !arrObj.hasOwnProperty(\"1\");\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-179-1",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-179-1.js",
+ "description": "Object.defineProperty - 'O' is an Array, 'name' is the length property of 'O', the [[Value]] field of 'desc' is greater than value of the length property, test value of the length property is same as [[Value]] (15.4.5.1 step 3.l.iii.1)",
+ "test": "assertTrue((function testcase() {\n var arrObj = [0, 1, 2, 3];\n\n Object.defineProperty(arrObj, \"1\", {\n configurable: false\n });\n\n Object.defineProperty(arrObj, \"length\", {\n value: 3\n }); \n\n return arrObj.length === 3;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-18",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-18.js",
+ "description": "Object.defineProperty throws TypeError when changing setter of non-configurable accessor properties(8.12.9 step 11.a.i)",
+ "test": "assertTrue((function testcase() {\n var o = {};\n\n // create an accessor property; all other attributes default to false.\n // dummy getter\n var getter = function () { return 1;}\n var d1 = { get: getter };\n Object.defineProperty(o, \"foo\", d1);\n\n // now, trying to change the setter should fail, since [[Configurable]]\n // on the original property will be false.\n var setter = function (x) {};\n var desc = { set: setter };\n\n try {\n Object.defineProperty(o, \"foo\", desc);\n }\n catch (e) {\n if (e instanceof TypeError) {\n // the property should remain unchanged.\n var d2 = Object.getOwnPropertyDescriptor(o, \"foo\");\n if (d2.get === getter &&\n\t d2.configurable === false &&\n d2.enumerable === false) {\n return true;\n }\n }\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-181",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-181.js",
+ "description": "Object.defineProperty - 'O' is an Array, 'name' is the length property of 'O', the [[Value]] field of 'desc' is less than value of the length property, test the [[Writable]] attribute of the length property is set to false at last when the [[Writable]] field of 'desc' is false and 'O' doesn't contain non-configurable large index named property (15.4.5.1 step 3.m)",
+ "test": "assertTrue((function testcase() {\n\n var arrObj = [0, 1];\n\n Object.defineProperty(arrObj, \"length\", {\n value: 0,\n writable: false\n });\n \n arrObj.length = 10; //try to overwrite length value of arr\n return !arrObj.hasOwnProperty(\"1\") && arrObj.length === 0;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-182",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-182.js",
+ "description": "Object.defineProperty - 'O' is an Array, 'name' is an array index named property, 'name' is available String values that convert to numbers (15.4.5.1 step 4.a)",
+ "test": "assertTrue((function testcase() {\n\n var arrObj = [];\n\n Object.defineProperty(arrObj, \"0\", {\n value: 12\n });\n\n return arrObj[0] === 12;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-183",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-183.js",
+ "description": "Object.defineProperty - 'O' is an Array, 'name' is an array index named property, 'name' is boundary value 2^32 - 2 (15.4.5.1 step 4.a)",
+ "test": "assertTrue((function testcase() {\n var arrObj = [];\n\n Object.defineProperty(arrObj, 4294967294, {\n value: 100\n });\n\n return arrObj.hasOwnProperty(\"4294967294\") && arrObj.length === 4294967295 && arrObj[4294967294] === 100;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-184",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-184.js",
+ "description": "Object.defineProperty - 'O' is an Array, 'name' is an array index named property, 'name' is boundary value 2^32 - 1 (15.4.5.1 step 4.a)",
+ "test": "assertTrue((function testcase() {\n var arrObj = [];\n\n Object.defineProperty(arrObj, 4294967295, {\n value: 100\n });\n\n return arrObj.hasOwnProperty(\"4294967295\") && arrObj.length === 0 && arrObj[4294967295] === 100; ;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-185",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-185.js",
+ "description": "Object.defineProperty - 'O' is an Array, 'name' is an array index named property, 'name' is boundary value 2^32 (15.4.5.1 step 4.a)",
+ "test": "assertTrue((function testcase() {\n var arrObj = [];\n\n Object.defineProperty(arrObj, 4294967296, {\n value: 100\n });\n\n return arrObj.hasOwnProperty(\"4294967296\") && arrObj.length === 0 && arrObj[4294967296] === 100;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-186",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-186.js",
+ "description": "Object.defineProperty - 'O' is an Array, 'name' is an array index named property, 'name' is boundary value 2^32 + 1 (15.4.5.1 step 4.a)",
+ "test": "assertTrue((function testcase() {\n var arrObj = [];\n\n Object.defineProperty(arrObj, 4294967297, {\n value: 100\n });\n\n return arrObj.hasOwnProperty(\"4294967297\") && arrObj.length === 0 && arrObj[4294967297] === 100;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-187",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-187.js",
+ "description": "Object.defineProperty - 'O' is an Array, 'name' is an array index named property, test TypeError is not thrown if the [[Writable]] attribute of the length property in 'O' is false and value of 'name' is less than value of the length property (15.4.5.1 step 4.b)",
+ "test": "assertTrue((function testcase() {\n var arrObj = [1, 2, 3];\n\n Object.defineProperty(arrObj, \"length\", {\n writable: false\n });\n\n try {\n Object.defineProperty(arrObj, 1, {\n value: \"abc\"\n });\n\n return true;\n } catch (e) {\n return false;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-188",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-188.js",
+ "description": "Object.defineProperty - 'O' is an Array, 'name' is an array index named property, test TypeError is thrown if the [[Writable]] attribute of the length property in 'O' is false and value of 'name' equals to value of the length property (15.4.5.1 step 4.b)",
+ "test": "assertTrue((function testcase() {\n var arrObj = [1, 2, 3];\n\n Object.defineProperty(arrObj, \"length\", {\n writable: false\n });\n\n try {\n Object.defineProperty(arrObj, 3, {\n value: \"abc\"\n });\n\n return false;\n } catch (e) {\n return e instanceof TypeError;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-189",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-189.js",
+ "description": "Object.defineProperty - 'O' is an Array, 'name' is an array index named property, test TypeError is thrown if the [[Writable]] attribute of the length property in 'O' is false and value of 'name' is greater than value of the length property (15.4.5.1 step 4.b)",
+ "test": "assertTrue((function testcase() {\n var arrObj = [1, 2, 3];\n\n Object.defineProperty(arrObj, \"length\", {\n writable: false\n });\n\n try {\n Object.defineProperty(arrObj, 4, {\n value: \"abc\"\n });\n\n return false;\n } catch (e) {\n return e instanceof TypeError;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-19",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-19.js",
+ "description": "Object.defineProperty permits setting a setter (if absent) of non-configurable accessor properties(8.12.9 step 10.a.ii.1)",
+ "test": "assertTrue((function testcase() {\n var o = {};\n\n // create an accessor property; all other attributes default to false.\n // dummy getter\n var getter = function () { return 1;}\n var d1 = { get: getter };\n Object.defineProperty(o, \"foo\", d1);\n\n // now, trying to set the setter should succeed even though [[Configurable]]\n // on the original property will be false.\n var desc = { set: undefined };\n Object.defineProperty(o, \"foo\", desc);\n\n var d2 = Object.getOwnPropertyDescriptor(o, \"foo\");\n\n if (d2.get === getter &&\n\t d2.set === undefined &&\n\t d2.configurable === false &&\n\t d2.enumerable === false) {\n\treturn true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-190",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-190.js",
+ "description": "Object.defineProperty - 'O' is an Array, 'name' is an array index named property, 'name' is own data property, test TypeError is thrown on updating the configurable attribute from false to true (15.4.5.1 step 4.c)",
+ "test": "assertTrue((function testcase() {\n var arrObj = [];\n Object.defineProperty(arrObj, 0, {\n value: \"ownDataProperty\",\n configurable: false\n });\n\n try {\n Object.defineProperty(arrObj, 0, {\n configurable: true\n });\n return false;\n } catch (e) {\n return e instanceof TypeError &&\n dataPropertyAttributesAreCorrect(arrObj, \"0\", \"ownDataProperty\", false, false, false);\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-191",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-191.js",
+ "description": "Object.defineProperty - 'O' is an Array, 'name' is an array index named property, 'name' is an inherited data property, test that defining own index named property is successful (15.4.5.1 step 4.c)",
+ "test": "assertTrue((function testcase() {\n try {\n Object.defineProperty(Array.prototype, \"0\", {\n value: 11,\n configurable: true\n });\n\n var arrObj = [];\n\n Object.defineProperty(arrObj, \"0\", {\n configurable: false\n });\n return arrObj.hasOwnProperty(\"0\") && Array.prototype[0] === 11 && typeof arrObj[0] === \"undefined\";\n } finally {\n delete Array.prototype[0];\n }\n\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-192",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-192.js",
+ "description": "Object.defineProperty - 'O' is an Array, 'name' is an array index named property, 'name' is own data property that overrides an inherited data property, test TypeError is thrown on updating the [[Configurable]] attribute from false to true (15.4.5.1 step 4.c)",
+ "test": "assertTrue((function testcase() {\n try {\n Object.defineProperty(Array.prototype, \"0\", {\n value: 11,\n configurable: true\n });\n\n var arrObj = [];\n Object.defineProperty(arrObj, \"0\", {\n value: 12,\n configurable: false\n });\n \n Object.defineProperty(arrObj, \"0\", {\n configurable: true\n });\n return false;\n } catch (e) {\n return e instanceof TypeError && Array.prototype[0] === 11 && arrObj[0] === 12;\n } finally {\n delete Array.prototype[0];\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-193",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-193.js",
+ "description": "Object.defineProperty - 'O' is an Array, 'name' is an array index named property, 'name' is own data property that overrides an inherited accessor property, test TypeError is thrown when update the [[Configurable]] attribute to true and value of [[Configurable]] attribute of original is false (15.4.5.1 step 4.c)",
+ "test": "assertTrue((function testcase() {\n try {\n Object.defineProperty(Array.prototype, \"0\", {\n get: function () {\n return 11;\n },\n configurable: true\n });\n\n var arrObj = [];\n Object.defineProperty(arrObj, \"0\", {\n value: 12,\n configurable: false\n });\n\n Object.defineProperty(arrObj, \"0\", {\n configurable: true\n });\n return false;\n } catch (e) {\n return e instanceof TypeError && Array.prototype[0] === 11 && arrObj[0] === 12;\n } finally {\n delete Array.prototype[0];\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.2.3.6-4-194",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-194.js",
+ "description": "Object.defineProperty - 'O' is an Array, 'name' is an array index named property, 'name' is own accessor property, test TypeError is thrown on updating the configurable attribute from false to true (15.4.5.1 step 4.c)",
+ "test": "assertTrue((function testcase() {\n var arrObj = [];\n var getFunc = function () {\n return 11;\n };\n\n Object.defineProperty(arrObj, \"0\", {\n get: getFunc,\n configurable: false\n });\n\n try {\n Object.defineProperty(arrObj, \"0\", {\n configurable: true\n });\n return false;\n } catch (e) {\n return e instanceof TypeError &&\n accessorPropertyAttributesAreCorrect(arrObj, \"0\", getFunc, undefined, undefined, false, false);\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.2.3.6-4-195",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-195.js",
+ "description": "Object.defineProperty - 'O' is an Array, 'name' is an array index named property, 'name' is an inherited accessor property (15.4.5.1 step 4.c)",
+ "test": "assertTrue((function testcase() {\n try {\n Object.defineProperty(Array.prototype, \"0\", {\n get: function () {\n return 11;\n },\n configurable: true\n });\n\n var arrObj = [];\n\n function getFunc() {\n return arrObj.helpVerifySet;\n }\n function setFunc(value) {\n arrObj.helpVerifySet = value;\n }\n\n Object.defineProperty(arrObj, \"0\", {\n get: getFunc,\n set: setFunc,\n configurable: false\n });\n\n arrObj[0] = 13;\n\n return accessorPropertyAttributesAreCorrect(arrObj, \"0\", getFunc, setFunc, \"helpVerifySet\", false, false);\n } finally {\n delete Array.prototype[0];\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.2.3.6-4-196",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-196.js",
+ "description": "Object.defineProperty - 'O' is an Array, 'name' is an array index named property, 'name' is own accessor property that overrides an inherited data property (15.4.5.1 step 4.c)",
+ "test": "assertTrue((function testcase() {\n try {\n Object.defineProperty(Array.prototype, \"0\", {\n value: 11,\n configurable: true\n });\n\n var arrObj = [];\n Object.defineProperty(arrObj, \"0\", {\n get: function () { },\n configurable: false\n });\n\n Object.defineProperty(arrObj, \"0\", {\n configurable: true\n });\n return false;\n } catch (e) {\n return e instanceof TypeError;\n } finally {\n delete Array.prototype[0];\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.2.3.6-4-197",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-197.js",
+ "description": "Object.defineProperty - 'O' is an Array, 'name' is an array index named property, 'name' is own accessor property that overrides an inherited accessor property (15.4.5.1 step 4.c)",
+ "test": "assertTrue((function testcase() {\n try {\n Object.defineProperty(Array.prototype, \"0\", {\n get: function () { },\n configurable: true\n });\n\n var arrObj = [];\n Object.defineProperty(arrObj, \"0\", {\n get: function () { },\n configurable: false\n });\n\n Object.defineProperty(arrObj, \"0\", {\n configurable: true\n });\n return false;\n } catch (e) {\n return e instanceof TypeError;\n } finally {\n delete Array.prototype[0];\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.2.3.6-4-198",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-198.js",
+ "description": "Object.defineProperty - 'O' is an Array, 'name' is an array index named property, 'name' property doesn't exist in 'O', test TypeError is thrown when 'O' is not extensible (15.4.5.1 step 4.c)",
+ "test": "assertTrue((function testcase() {\n var arrObj = [];\n Object.preventExtensions(arrObj);\n\n try {\n var desc = { value: 1 };\n Object.defineProperty(arrObj, \"0\", desc);\n return false;\n } catch (e) {\n return e instanceof TypeError && (arrObj.hasOwnProperty(\"0\") === false);\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.preventExtensions))"
+ },
+ {
+ "id": "15.2.3.6-4-199",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-199.js",
+ "description": "Object.defineProperty - 'O' is an Array, 'name' is an array index named property, 'name' property doesn't exist in 'O', test 'name' is defined as data property when 'desc' is generic descriptor (15.4.5.1 step 4.c)",
+ "test": "assertTrue((function testcase() {\n var arrObj = [];\n\n Object.defineProperty(arrObj, \"0\", {\n enumerable: true\n });\n\n return dataPropertyAttributesAreCorrect(arrObj, \"0\", undefined, false, true, false);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-2",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-2.js",
+ "description": "Object.defineProperty sets missing attributes to their default values (data properties)(8.12.9 step 4.a.i)",
+ "test": "assertTrue((function testcase() {\n var o = {};\n\n var desc = { value: 1 };\n Object.defineProperty(o, \"foo\", desc);\n \n var propDesc = Object.getOwnPropertyDescriptor(o, \"foo\");\n \n if (propDesc.value === 1 && // this is the value that was set\n propDesc.writable === false && // false by default\n propDesc.enumerable === false && // false by default\n propDesc.configurable === false) { // false by default\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-20",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-20.js",
+ "description": "Object.defineProperty throws TypeError when changing getter (if present) of non-configurable accessor properties(8.12.9 step 11.a.ii)",
+ "test": "assertTrue((function testcase() {\n var o = {};\n\n // create an accessor property; all other attributes default to false.\n // dummy getter/setter\n var getter = function () { return 1;}\n var d1 = { get: getter, configurable: false };\n Object.defineProperty(o, \"foo\", d1);\n\n // now, trying to change the setter should fail, since [[Configurable]]\n // on the original property will be false.\n var desc = { get: undefined };\n\n try {\n Object.defineProperty(o, \"foo\", desc);\n }\n catch (e) {\n if (e instanceof TypeError) {\n var d2 = Object.getOwnPropertyDescriptor(o, \"foo\");\n\n if (d2.get === getter &&\n\t d2.configurable === false &&\n d2.enumerable === false) {\n return true;\n }\n }\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-200",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-200.js",
+ "description": "Object.defineProperty - 'O' is an Array, 'name' is an array index named property, 'name' property doesn't exist in 'O', test [[Value]] of 'name' property of 'Attributes' is set as undefined if [[Value]] is absent in data descriptor 'desc' (15.4.5.1 step 4.c)",
+ "test": "assertTrue((function testcase() {\n var arrObj = [];\n\n Object.defineProperty(arrObj, \"0\", {\n writable: true,\n enumerable: true,\n configurable: false\n });\n\n return dataPropertyAttributesAreCorrect(arrObj, \"0\", undefined, true, true, false);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-201",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-201.js",
+ "description": "Object.defineProperty - 'O' is an Array, 'name' is an array index named property, 'name' property doesn't exist in 'O' and [[Writable]] is absent in data descriptor 'desc', test [[Writable]] attribute of property 'name' is set to false (15.4.5.1 step 4.c)",
+ "test": "assertTrue((function testcase() {\n var arrObj = [];\n\n Object.defineProperty(arrObj, \"0\", {\n value: 1001,\n enumerable: true,\n configurable: false\n });\n return dataPropertyAttributesAreCorrect(arrObj, \"0\", 1001, false, true, false);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-202",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-202.js",
+ "description": "Object.defineProperty - 'O' is an Array, 'name' is an array index named property, 'name' property doesn't exist in 'O' and [[Enumerable]] is absent in data descriptor 'desc', test [[Enumerable]] of property 'name' is set to false (15.4.5.1 step 4.c)",
+ "test": "assertTrue((function testcase() {\n var arrObj = [];\n\n Object.defineProperty(arrObj, \"0\", {\n value: 1001,\n writable: true,\n configurable: true\n });\n return dataPropertyAttributesAreCorrect(arrObj, \"0\", 1001, true, false, true);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-203",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-203.js",
+ "description": "Object.defineProperty - 'O' is an Array, 'name' is an array index named property, 'name' property doesn't exist in 'O' and [[Configurable]] is absent in data descriptor 'desc', test [[Configurable]] of property 'name' is set to false (15.4.5.1 step 4.c)",
+ "test": "assertTrue((function testcase() {\n var arrObj = [];\n\n Object.defineProperty(arrObj, \"0\", {\n value: 1001,\n writable: true,\n enumerable: true\n });\n return dataPropertyAttributesAreCorrect(arrObj, \"0\", 1001, true, true, false);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-204",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-204.js",
+ "description": "Object.defineProperty - 'O' is an Array, 'name' is an array index named property, 'desc' is data descriptor, test updating all attribute values of 'name' (15.4.5.1 step 4.c)",
+ "test": "assertTrue((function testcase() {\n var arrObj = [1]; // default value of attributes: writable: true, configurable: true, enumerable: true\n\n Object.defineProperty(arrObj, \"0\", {\n value: 1001,\n writable: false,\n enumerable: false,\n configurable: false\n });\n\n return dataPropertyAttributesAreCorrect(arrObj, \"0\", 1001, false, false, false);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-205",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-205.js",
+ "description": "Object.defineProperty - 'O' is an Array, 'name' is an array index named property, 'name' property doesn't exist in 'O' and [[Get]] is absent in accessor descriptor 'desc', test [[Get]] attribute of property 'name' is set to undefined (15.4.5.1 step 4.c)",
+ "test": "assertTrue((function testcase() {\n var arrObj = [];\n var setFunc = function (value) {\n arrObj.setVerifyHelpProp = value;\n };\n\n Object.defineProperty(arrObj, \"0\", {\n set: setFunc,\n enumerable: true,\n configurable: true\n });\n\n return accessorPropertyAttributesAreCorrect(arrObj, \"0\", undefined, setFunc, \"setVerifyHelpProp\", true, true);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.2.3.6-4-206",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-206.js",
+ "description": "Object.defineProperty - 'O' is an Array, 'name' is an array index named property, 'name' property doesn't exist in 'O', test [[Set]] of 'name' property in 'Attributes' is set as undefined if [[Set]] is absent in accessor descriptor 'desc' (15.4.5.1 step 4.c)",
+ "test": "assertTrue((function testcase() {\n var arrObj = [];\n var getFunc = function () { };\n\n Object.defineProperty(arrObj, \"0\", {\n get: getFunc,\n enumerable: true,\n configurable: true\n });\n\n var desc = Object.getOwnPropertyDescriptor(arrObj, \"0\");\n\n return arrObj.hasOwnProperty(\"0\") && desc.hasOwnProperty(\"set\") && typeof desc.set === \"undefined\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays() &&\n fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-207",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-207.js",
+ "description": "Object.defineProperty - 'O' is an Array, 'name' is an array index named property, 'name' property doesn't exist in 'O' and [[Enumerable]] is absent in accessor descriptor 'desc', test [[Enumerable]] attribute of property 'name' is set to false (15.4.5.1 step 4.c)",
+ "test": "assertTrue((function testcase() {\n var arrObj = [];\n\n var setFunc = function (value) {\n arrObj.setVerifyHelpProp = value;\n };\n var getFunc = function () { };\n\n Object.defineProperty(arrObj, \"0\", {\n set: setFunc,\n get: getFunc,\n configurable: true\n });\n return accessorPropertyAttributesAreCorrect(arrObj, \"0\", getFunc, setFunc, \"setVerifyHelpProp\", false, true);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.2.3.6-4-208",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-208.js",
+ "description": "Object.defineProperty - 'O' is an Array, 'name' is an array index named property, 'name' property doesn't exist in 'O' and [[Configurable]] is absent in accessor descriptor 'desc', test [[Configurable]] attribute of property 'name' is set to false (15.4.5.1 step 4.c)",
+ "test": "assertTrue((function testcase() {\n var arrObj = [];\n var setFunc = function (value) {\n arrObj.setVerifyHelpProp = value;\n };\n var getFunc = function () { };\n\n Object.defineProperty(arrObj, \"0\", {\n set: setFunc,\n get: getFunc,\n enumerable: true\n });\n return accessorPropertyAttributesAreCorrect(arrObj, \"0\", getFunc, setFunc, \"setVerifyHelpProp\", true, false);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.2.3.6-4-209",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-209.js",
+ "description": "Object.defineProperty - 'O' is an Array, 'name' is an array index named property, 'desc' is accessor descriptor, test updating all attribute values of 'name' (15.4.5.1 step 4.c)",
+ "test": "assertTrue((function testcase() {\n var arrObj = [];\n var setFunc = function (value) {\n arrObj.setVerifyHelpProp = value;\n };\n var getFunc = function () {\n return 14;\n };\n\n Object.defineProperty(arrObj, \"0\", {\n get: function () {\n return 11;\n },\n set: function () { },\n configurable: true,\n enumerable: true\n });\n\n Object.defineProperty(arrObj, \"0\", {\n get: getFunc,\n set: setFunc,\n configurable: false,\n enumerable: false\n });\n\n return accessorPropertyAttributesAreCorrect(arrObj, \"0\", getFunc, setFunc, \"setVerifyHelpProp\", false, false);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.2.3.6-4-21",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-21.js",
+ "description": "Object.defineProperty permits setting a getter (if absent) of non-configurable accessor properties(8.12.9 step 11.a.ii)",
+ "test": "assertTrue((function testcase() {\n var o = {};\n\n // create an accessor property; all other attributes default to false.\n // dummy setter\n var setter = function (x) {}\n var d1 = { set: setter };\n Object.defineProperty(o, \"foo\", d1);\n\n // now, trying to set the getter should succeed even though [[Configurable]]\n // on the original property will be false. Existing values of need to be preserved.\n var getter = undefined;\n var desc = { get: getter };\n\n Object.defineProperty(o, \"foo\", desc);\n var d2 = Object.getOwnPropertyDescriptor(o, \"foo\");\n\n if (d2.get === getter &&\n d2.set === setter &&\n d2.configurable === false &&\n d2.enumerable === false) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-210",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-210.js",
+ "description": "Object.defineProperty - 'O' is an Array, 'name' is an array index named property, 'name' makes no change if every field in 'desc' is absent (name is data property) (15.4.5.1 step 4.c)",
+ "test": "assertTrue((function testcase() {\n var arrObj = [];\n\n arrObj[0] = 101; // default value of attributes: writable: true, configurable: true, enumerable: true\n\n Object.defineProperty(arrObj, \"0\", {});\n return dataPropertyAttributesAreCorrect(arrObj, \"0\", 101, true, true, true);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-211",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-211.js",
+ "description": "Object.defineProperty - 'O' is an Array, 'name' is an array index named property, 'name' makes no change if every field in 'desc' is absent(name is accessor property) (15.4.5.1 step 4.c)",
+ "test": "assertTrue((function testcase() {\n var arrObj = [];\n\n function getFunc() {\n return 11;\n }\n function setFunc(value) {\n arrObj.setVerifyHelpProp = value;\n }\n\n Object.defineProperty(arrObj, \"0\", {\n get: getFunc,\n set: setFunc,\n enumerable: true,\n configurable: true\n });\n\n Object.defineProperty(arrObj, \"0\", {});\n return accessorPropertyAttributesAreCorrect(arrObj, \"0\", getFunc, setFunc, \"setVerifyHelpProp\", true, true);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.2.3.6-4-212",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-212.js",
+ "description": "Object.defineProperty - 'O' is an Array, 'name' is an array index named property, 'name' makes no change if the value of every field in 'desc' is the same value as the corresponding field in 'name'(desc is data property) (15.4.5.1 step 4.c)",
+ "test": "assertTrue((function testcase() {\n var arrObj = [];\n\n arrObj[0] = 100; // default value of attributes: writable: true, configurable: true, enumerable: true\n\n Object.defineProperty(arrObj, \"0\", {\n value: 100,\n writable: true,\n enumerable: true,\n configurable: true\n });\n\n return dataPropertyAttributesAreCorrect(arrObj, \"0\", 100, true, true, true);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-213",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-213.js",
+ "description": "Object.defineProperty - 'O' is an Array, 'name' is an array index named property, 'name' makes no change if the value of every field in 'desc' is the same value as the corresponding field in 'name'(desc is accessor property) (15.4.5.1 step 4.c)",
+ "test": "assertTrue((function testcase() {\n var arrObj = [];\n var getFunc = function () {\n return \"100\";\n };\n var setFunc = function (value) {\n arrObj.setVerifyHelpProp = value;\n };\n\n var desc = {\n get: getFunc,\n set: setFunc,\n enumerable: true,\n configurable: true\n };\n\n Object.defineProperty(arrObj, \"0\", {\n get: getFunc,\n set: setFunc,\n enumerable: true,\n configurable: true\n });\n\n Object.defineProperty(arrObj, \"0\", desc);\n\n return accessorPropertyAttributesAreCorrect(arrObj, \"0\", getFunc, setFunc, \"setVerifyHelpProp\", true, true);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.2.3.6-4-214",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-214.js",
+ "description": "Object.defineProperty - 'O' is an Array, 'name' is an array index property and its configurable and writable attributes are set to false, test TypeError is thrown when the type of the [[Value]] field of 'desc' is different from the type of the [[Value]] attribute value of 'name' (15.4.5.1 step 4.c)",
+ "test": "assertTrue((function testcase() {\n var arrObj = [];\n\n Object.defineProperty(arrObj, 0, {\n value: 101,\n writable: false,\n configurable: false \n });\n\n try {\n Object.defineProperty(arrObj, \"0\", { value: \"abc\" });\n return false;\n } catch (e) {\n return e instanceof TypeError && dataPropertyAttributesAreCorrect(arrObj, \"0\", 101, false, false, false);\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-215",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-215.js",
+ "description": "Object.defineProperty - 'O' is an Array, 'name' is an array index property, both the [[Value]] field of 'desc' and the [[Value]] attribute value of 'name' are undefined (15.4.5.1 step 4.c)",
+ "test": "assertTrue((function testcase() {\n var arrObj = [];\n\n Object.defineProperty(arrObj, \"0\", { value: undefined });\n\n Object.defineProperty(arrObj, \"0\", { value: undefined });\n return dataPropertyAttributesAreCorrect(arrObj, \"0\", undefined, false, false, false);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-216",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-216.js",
+ "description": "Object.defineProperty - 'O' is an Array, 'name' is an array index property, both the [[Value]] field of 'desc' and the [[Value]] attribute value of 'name' are null (15.4.5.1 step 4.c)",
+ "test": "assertTrue((function testcase() {\n var arrObj = [];\n\n Object.defineProperty(arrObj, \"0\", { value: null });\n\n Object.defineProperty(arrObj, \"0\", { value: null });\n return dataPropertyAttributesAreCorrect(arrObj, \"0\", null, false, false, false);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-217",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-217.js",
+ "description": "Object.defineProperty - 'O' is an Array, 'name' is an array index property, both the [[Value]] field of 'desc' and the [[Value]] attribute value of 'name' are NaN (15.4.5.1 step 4.c)",
+ "test": "assertTrue((function testcase() {\n var arrObj = [];\n\n Object.defineProperty(arrObj, \"0\", { value: NaN });\n\n Object.defineProperty(arrObj, \"0\", { value: NaN });\n\n var hasProperty = arrObj.hasOwnProperty(\"0\");\n var verifyValue = (arrObj[0] !== arrObj[0]);\n\n var verifyWritable = false;\n arrObj[0] = 1001;\n verifyWritable = arrObj[0] !== 1001 && arrObj[0] !== arrObj[0];\n\n var verifyEnumerable = false;\n for (var p in arrObj) {\n if (p === \"0\") {\n verifyEnumerable = true;\n }\n }\n\n var verifyConfigurable = false;\n delete arrObj[0];\n verifyConfigurable = arrObj.hasOwnProperty(\"0\");\n\n return hasProperty && verifyValue && verifyWritable && !verifyEnumerable && verifyConfigurable;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-218",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-218.js",
+ "description": "Object.defineProperty - 'O' is an Array, 'name' is an array index property, test TypeError is thrown when the [[Value]] field of 'desc' is +0, and the [[Value]] attribute value of 'name' is -0 (15.4.5.1 step 4.c)",
+ "test": "assertTrue((function testcase() {\n var arrObj = [];\n\n Object.defineProperty(arrObj, \"0\", { value: -0 });\n\n try {\n Object.defineProperty(arrObj, \"0\", { value: +0 });\n return false;\n } catch (e) {\n return e instanceof TypeError && dataPropertyAttributesAreCorrect(arrObj, \"0\", -0, false, false, false);\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-219",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-219.js",
+ "description": "Object.defineProperty - 'O' is an Array, 'name' is an array index property, test TypeError is thrown when the [[Value]] field of 'desc' is -0, and the [[Value]] attribute value of 'name' is +0 (15.4.5.1 step 4.c)",
+ "test": "assertTrue((function testcase() {\n var arrObj = [];\n\n Object.defineProperty(arrObj, \"0\", { value: +0 });\n\n try {\n Object.defineProperty(arrObj, \"0\", { value: -0 });\n return false;\n } catch (e) {\n return e instanceof TypeError && dataPropertyAttributesAreCorrect(arrObj, \"0\", +0, false, false, false);\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-22",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-22.js",
+ "description": "Object.defineProperty - 'name' is existing own data property (8.12.9 step 1)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n Object.defineProperty(obj, \"foo\", {\n value: 11,\n configurable: false\n });\n\n try {\n Object.defineProperty(obj, \"foo\", {\n value: 12,\n configurable: true\n });\n return false;\n } catch (e) {\n return e instanceof TypeError && obj.foo === 11;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-220",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-220.js",
+ "description": "Object.defineProperty - 'O' is an Array, 'name' is an array index property, the [[Value]] field of 'desc' and the [[Value]] attribute value of 'name' are two numbers with same vaule (15.4.5.1 step 4.c)",
+ "test": "assertTrue((function testcase() {\n var arrObj = [];\n\n Object.defineProperty(arrObj, \"0\", { value: 101 });\n\n Object.defineProperty(arrObj, \"0\", { value: 101 });\n return dataPropertyAttributesAreCorrect(arrObj, \"0\", 101, false, false, false);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-221",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-221.js",
+ "description": "Object.defineProperty - 'O' is an Array, 'name' is an array index property, test TypeError is thrown when the [[Value]] field of 'desc' and the [[Value]] attribute value of 'name' are two numbers with different values (15.4.5.1 step 4.c)",
+ "test": "assertTrue((function testcase() {\n var arrObj = [];\n\n Object.defineProperty(arrObj, 0, {\n value: 101,\n writable: false,\n configurable: false\n });\n\n try {\n Object.defineProperty(arrObj, \"0\", { value: 123 });\n return false;\n } catch (e) {\n return e instanceof TypeError && dataPropertyAttributesAreCorrect(arrObj, \"0\", 101, false, false, false);\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-222",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-222.js",
+ "description": "Object.defineProperty - 'O' is an Array, 'name' is an array index property, the [[Value]] field of 'desc' and the [[Value]] attribute value of 'name' are two strings which have same length and same characters in corresponding positions (15.4.5.1 step 4.c)",
+ "test": "assertTrue((function testcase() {\n var arrObj = [];\n\n Object.defineProperty(arrObj, \"0\", { value: \"abcd\" });\n\n Object.defineProperty(arrObj, \"0\", { value: \"abcd\" });\n return dataPropertyAttributesAreCorrect(arrObj, \"0\", \"abcd\", false, false, false);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-223",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-223.js",
+ "description": "Object.defineProperty - 'O' is an Array, 'name' is an array index property, test TypeError is thrown when the [[Value]] field of 'desc' and the [[Value]] attribute value of 'name' are two strings with different values (15.4.5.1 step 4.c)",
+ "test": "assertTrue((function testcase() {\n var arrObj = [];\n\n Object.defineProperty(arrObj, 0, {\n value: \"abcd\",\n writable: false,\n configurable: false\n });\n\n try {\n Object.defineProperty(arrObj, \"0\", { value: \"fghj\" });\n return false;\n } catch (e) {\n return e instanceof TypeError && dataPropertyAttributesAreCorrect(arrObj, \"0\", \"abcd\", false, false, false);\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-224",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-224.js",
+ "description": "Object.defineProperty - 'O' is an Array, 'name' is an array index property, the [[Value]] field of 'desc' and the [[Value]] attribute value of 'name' are two booleans with same value (15.4.5.1 step 4.c)",
+ "test": "assertTrue((function testcase() {\n var arrObj = [];\n\n Object.defineProperty(arrObj, \"0\", { value: true });\n\n Object.defineProperty(arrObj, \"0\", { value: true });\n return dataPropertyAttributesAreCorrect(arrObj, \"0\", true, false, false, false);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-225",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-225.js",
+ "description": "Object.defineProperty - 'O' is an Array, 'name' is an array index property, test TypeError is thrown when the [[Value]] field of 'desc' and the [[Value]] attribute value of 'name' are two booleans with different values (15.4.5.1 step 4.c)",
+ "test": "assertTrue((function testcase() {\n var arrObj = [];\n\n Object.defineProperty(arrObj, 0, {\n value: true,\n writable: false,\n configurable: false\n });\n\n try {\n Object.defineProperty(arrObj, \"0\", { value: false });\n return false;\n } catch (e) {\n return e instanceof TypeError && dataPropertyAttributesAreCorrect(arrObj, \"0\", true, false, false, false);\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-226",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-226.js",
+ "description": "Object.defineProperty - 'O' is an Array, 'name' is an array index property, the [[Value]] field of 'desc' and the [[Value]] attribute value of 'name' are two objects which refer to the same object (15.4.5.1 step 4.c)",
+ "test": "assertTrue((function testcase() {\n var arrObj = [];\n\n var obj1 = { length: 10 };\n\n Object.defineProperty(arrObj, \"0\", { value: obj1 });\n\n Object.defineProperty(arrObj, \"0\", { value: obj1 });\n return dataPropertyAttributesAreCorrect(arrObj, \"0\", obj1, false, false, false);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-227",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-227.js",
+ "description": "Object.defineProperty - 'O' is an Array, 'name' is an array index property, test TypeError is thrown when the [[Value]] field of 'desc' and the [[Value]] attribute value of 'name' are two objects which refer to two different objects (15.4.5.1 step 4.c)",
+ "test": "assertTrue((function testcase() {\n var arrObj = [];\n\n var obj1 = { length: 10 };\n Object.defineProperty(arrObj, 0, {\n value: obj1,\n writable: false,\n configurable: false\n });\n\n var obj2 = { length: 20 };\n\n try {\n Object.defineProperty(arrObj, \"0\", { value: obj2 });\n return false;\n } catch (e) {\n return e instanceof TypeError && dataPropertyAttributesAreCorrect(arrObj, \"0\", obj1, false, false, false);\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-228",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-228.js",
+ "description": "Object.defineProperty - 'O' is an Array, 'name' is an array index property, the [[Writable]] field of 'desc' and the [[Writable]] attribute value of 'name' are two booleans with same value (15.4.5.1 step 4.c)",
+ "test": "assertTrue((function testcase() {\n var arrObj = [];\n\n Object.defineProperty(arrObj, \"0\", { writable: false });\n\n Object.defineProperty(arrObj, \"0\", { writable: false });\n return dataPropertyAttributesAreCorrect(arrObj, \"0\", undefined, false, false, false);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-229",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-229.js",
+ "description": "Object.defineProperty - 'O' is an Array, 'name' is an array index property, the [[Writable]] field of 'desc' and the [[Writable]] attribute value of 'name' are two booleans with different values (15.4.5.1 step 4.c)",
+ "test": "assertTrue((function testcase() {\n var arrObj = [];\n\n Object.defineProperty(arrObj, \"0\", { writable: false, configurable: true });\n\n Object.defineProperty(arrObj, \"0\", { writable: true });\n return dataPropertyAttributesAreCorrect(arrObj, \"0\", undefined, true, false, true);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-23",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-23.js",
+ "description": "Object.defineProperty - 'name' is existing an inherited data property (8.12.9 step 1)",
+ "test": "assertTrue((function testcase() {\n var proto = {};\n Object.defineProperty(proto, \"foo\", {\n value: 11,\n configurable: false\n });\n\n var ConstructFun = function () {};\n ConstructFun.prototype = proto;\n var obj = new ConstructFun();\n\n Object.defineProperty(obj, \"foo\", {\n configurable: true\n });\n return obj.hasOwnProperty(\"foo\") && (typeof obj.foo) === \"undefined\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-230",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-230.js",
+ "description": "Object.defineProperty - 'O' is an Array, 'name' is an array index property, the [[Get]] field of 'desc' and the [[Get]] attribute value of 'name' are two objects which refer to the same object (15.4.5.1 step 4.c)",
+ "test": "assertTrue((function testcase() {\n var arrObj = [];\n arrObj.helpVerifySet = 10;\n\n function getFunc() {\n return arrObj.helpVerifySet;\n }\n function setFunc(value) {\n arrObj.helpVerifySet = value;\n }\n\n Object.defineProperty(arrObj, \"0\", {\n get: getFunc,\n set: setFunc\n });\n\n Object.defineProperty(arrObj, \"0\", {\n get: getFunc\n });\n return accessorPropertyAttributesAreCorrect(arrObj, \"0\", getFunc, setFunc, \"helpVerifySet\", false, false);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.2.3.6-4-231",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-231.js",
+ "description": "Object.defineProperty - 'O' is an Array, 'name' is an array index property, the [[Get]] field of 'desc' and the [[Get]] attribute value of 'name' are two objects which refer to the different objects (15.4.5.1 step 4.c)",
+ "test": "assertTrue((function testcase() {\n var arrObj = [];\n arrObj.helpVerifySet = 10;\n\n function getFunc1() {\n return 20;\n }\n function getFunc2() {\n return arrObj.helpVerifySet;\n }\n function setFunc(value) {\n arrObj.helpVerifySet = value;\n }\n\n Object.defineProperty(arrObj, \"0\", {\n get: getFunc1,\n set: setFunc,\n configurable: true\n });\n \n Object.defineProperty(arrObj, \"0\", {\n get: getFunc2\n });\n\n return accessorPropertyAttributesAreCorrect(arrObj, \"0\", getFunc2, setFunc, \"helpVerifySet\", false, true);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.2.3.6-4-232",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-232.js",
+ "description": "Object.defineProperty - 'O' is an Array, 'name' is an array index property, the [[Set]] field of 'desc' and the [[Set]] attribute value of 'name' are two objects which refer to the same object (15.4.5.1 step 4.c)",
+ "test": "assertTrue((function testcase() {\n var arrObj = [];\n\n function setFunc(value) {\n arrObj.setVerifyHelpProp = value;\n }\n\n Object.defineProperty(arrObj, \"0\", { set: setFunc });\n\n Object.defineProperty(arrObj, \"0\", { set: setFunc });\n return accessorPropertyAttributesAreCorrect(arrObj, \"0\", undefined, setFunc, \"setVerifyHelpProp\", false, false);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.2.3.6-4-233",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-233.js",
+ "description": "Object.defineProperty - 'O' is an Array, 'name' is an array index property, the [[Set]] field of 'desc' and the [[Set]] attribute value of 'name' are two objects which refer to the different objects (15.4.5.1 step 4.c)",
+ "test": "assertTrue((function testcase() {\n var arrObj = [];\n\n function setFunc1() { }\n\n Object.defineProperty(arrObj, \"0\", {\n set: setFunc1,\n configurable: true\n });\n\n function setFunc2(value) {\n arrObj.setVerifyHelpProp = value;\n }\n\n Object.defineProperty(arrObj, \"0\", { set: setFunc2 });\n return accessorPropertyAttributesAreCorrect(arrObj, \"0\", undefined, setFunc2, \"setVerifyHelpProp\", false, true);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.2.3.6-4-234",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-234.js",
+ "description": "Object.defineProperty - 'O' is an Array, 'name' is an array index property, the [[Enumerable]] field of 'desc' and the [[Enumerable]] attribute value of 'name' are two booleans with same value (15.4.5.1 step 4.c)",
+ "test": "assertTrue((function testcase() {\n var arrObj = [];\n\n Object.defineProperty(arrObj, \"0\", { enumerable: false });\n\n Object.defineProperty(arrObj, \"0\", { enumerable: false });\n return dataPropertyAttributesAreCorrect(arrObj, \"0\", undefined, false, false, false);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-235",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-235.js",
+ "description": "Object.defineProperty - 'O' is an Array, 'name' is an array index property, the [[Enumerable]] field of 'desc' and the [[Enumerable]] attribute value of 'name' are two booleans with different values (15.4.5.1 step 4.c)",
+ "test": "assertTrue((function testcase() {\n var arrObj = [];\n\n Object.defineProperty(arrObj, \"0\", { enumerable: false, configurable: true });\n\n Object.defineProperty(arrObj, \"0\", { enumerable: true });\n return dataPropertyAttributesAreCorrect(arrObj, \"0\", undefined, false, true, true);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-236",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-236.js",
+ "description": "Object.defineProperty - 'O' is an Array, 'name' is an array index property, the [[Configurable]] field of 'desc' and the [[Configurable]] attribute value of 'name' are two booleans with same value (15.4.5.1 step 4.c)",
+ "test": "assertTrue((function testcase() {\n var arrObj = [];\n\n Object.defineProperty(arrObj, \"0\", { configurable: false });\n\n Object.defineProperty(arrObj, \"0\", { configurable: false });\n return dataPropertyAttributesAreCorrect(arrObj, \"0\", undefined, false, false, false);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-237",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-237.js",
+ "description": "Object.defineProperty - 'O' is an Array, 'name' is an array index property, the [[Configurable]] field of 'desc' and the [[Configurable]] attribute value of 'name' are two booleans with different values (15.4.5.1 step 4.c)",
+ "test": "assertTrue((function testcase() {\n var arrObj = [];\n\n Object.defineProperty(arrObj, \"0\", { configurable: true });\n\n Object.defineProperty(arrObj, \"0\", { configurable: false });\n return dataPropertyAttributesAreCorrect(arrObj, \"0\", undefined, false, false, false);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-238",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-238.js",
+ "description": "Object.defineProperty - 'O' is an Array, 'name' is an array index named property, TypeError is thrown if the [[Configurable]] attribute value of 'name' is false and the [[Configurable]] field of 'desc' is true (15.4.5.1 step 4.c)",
+ "test": "assertTrue((function testcase() {\n\n var arrObj = [];\n\n Object.defineProperty(arrObj, \"1\", {\n value: 3,\n writable: true,\n configurable: false\n });\n\n try {\n Object.defineProperty(arrObj, \"1\", {\n value: 13,\n writable: true,\n configurable: true\n });\n return false;\n\n } catch (e) {\n return e instanceof TypeError && dataPropertyAttributesAreCorrect(arrObj, \"1\", 3, true, false, false);\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-239",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-239.js",
+ "description": "Object.defineProperty - 'O' is an Array, 'name' is an array index named property, TypeError is thrown if the [[Configurable]] attribute value of 'name' is false, and [[Enumerable]] of 'desc' is present and its value is different from the [[Enumerable]] attribute value of 'name' (15.4.5.1 step 4.c)",
+ "test": "assertTrue((function testcase() {\n\n var arrObj = [];\n\n Object.defineProperty(arrObj, \"1\", {\n value: 3,\n writable: true,\n configurable: false,\n enumerable: false\n });\n\n try {\n Object.defineProperty(arrObj, \"1\", {\n value: 13,\n writable: true,\n enumerable: true\n });\n return false;\n\n } catch (e) {\n return e instanceof TypeError && dataPropertyAttributesAreCorrect(arrObj, \"1\", 3, true, false, false);\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-24",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-24.js",
+ "description": "Object.defineProperty - 'name' is own data property that overrides an inherited data property (8.12.9 step 1)",
+ "test": "assertTrue((function testcase() {\n var proto = {};\n Object.defineProperty(proto, \"foo\", {\n value: 12,\n configurable: true\n });\n\n var ConstructFun = function () { };\n ConstructFun.prototype = proto;\n var obj = new ConstructFun();\n Object.defineProperty(obj, \"foo\", {\n value: 11,\n configurable: false\n });\n\n try {\n Object.defineProperty(obj, \"foo\", {\n configurable: true\n });\n return false;\n } catch (e) {\n return e instanceof TypeError && obj.foo === 11;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-240",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-240.js",
+ "description": "Object.defineProperty - 'O' is an Array, 'name' is an array index named property, TypeError is thrown if 'name' is accessor property, and 'desc' is data descriptor, and the [[Configurable]] attribute value of 'name' is false (15.4.5.1 step 4.c)",
+ "test": "assertTrue((function testcase() {\n\n var arrObj = [];\n\n function setFunc(value) {\n arrObj.setVerifyHelpProp = value;\n }\n\n Object.defineProperty(arrObj, \"1\", {\n set: setFunc,\n configurable: false\n });\n\n try {\n Object.defineProperty(arrObj, \"1\", {\n value: 13\n });\n return false;\n\n } catch (e) {\n return e instanceof TypeError && accessorPropertyAttributesAreCorrect(arrObj, \"1\", undefined, setFunc, \"setVerifyHelpProp\", false, false);\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.2.3.6-4-241",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-241.js",
+ "description": "Object.defineProperty - 'O' is an Array, 'name' is an array index named property, TypeError is thrown if 'name' is data property, and'desc' is accessor descriptor, and the [[Configurable]] attribute value of 'name' is false (15.4.5.1 step 4.c)",
+ "test": "assertTrue((function testcase() {\n\n var arrObj = [];\n\n Object.defineProperty(arrObj, \"1\", {\n value: 3,\n configurable: false\n });\n\n try {\n Object.defineProperty(arrObj, \"1\", {\n set: function () { }\n });\n return false;\n\n } catch (e) {\n return e instanceof TypeError && dataPropertyAttributesAreCorrect(arrObj, \"1\", 3, false, false, false);\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.2.3.6-4-242-1",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-242-1.js",
+ "description": "Object.defineProperty - 'O' is an Array, 'name' is an array index named property, 'name' is data property and 'desc' is data descriptor, and the [[Configurable]] attribute value of 'name' is true, test 'name' is updated successfully (15.4.5.1 step 4.c)",
+ "test": "assertTrue((function testcase() {\n\n var arrObj = [3];\n\n Object.defineProperty(arrObj, \"0\", {\n value: 1001,\n writable: false,\n enumerable: false\n });\n\n return dataPropertyAttributesAreCorrect(arrObj, \"0\", 1001, false, false, true);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.2.3.6-4-242",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-242.js",
+ "description": "Object.defineProperty - 'O' is an Array, 'name' is an array index named property, 'name' is data property and 'desc' is accessor descriptor, and the [[Configurable]] attribute value of 'name' is true, test 'name' is converted from data property to accessor property (15.4.5.1 step 4.c)",
+ "test": "assertTrue((function testcase() {\n\n var arrObj = [3];\n\n function setFunc(value) {\n arrObj.setVerifyHelpProp = value;\n }\n Object.defineProperty(arrObj, \"0\", {\n set: setFunc\n });\n\n return accessorPropertyAttributesAreCorrect(arrObj, \"0\", undefined, setFunc, \"setVerifyHelpProp\", true, true);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.2.3.6-4-243-1",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-243-1.js",
+ "description": "Object.defineProperty - 'O' is an Array, 'name' is an array index named property, 'name' is accessor property and assignment to the accessor property, fails to convert accessor property from accessor property to data property (15.4.5.1 step 4.c)",
+ "test": "assertTrue((function testcase() {\n\n var arrObj = [];\n\n function getFunc() {\n return 3;\n }\n Object.defineProperty(arrObj, \"1\", {\n get: getFunc,\n configurable: true\n });\n\n arrObj[1] = 4;\n\n return accessorPropertyAttributesAreCorrect(arrObj, \"1\", getFunc, undefined, undefined, false, true);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.2.3.6-4-243",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-243.js",
+ "description": "Object.defineProperty - 'O' is an Array, 'name' is an array index named property, 'name' is accessor property and 'desc' is data descriptor, and the [[Configurable]] attribute value of 'name' is true, test 'name' is converted from accessor property to data property (15.4.5.1 step 4.c)",
+ "test": "assertTrue((function testcase() {\n\n var arrObj = [];\n\n function getFunc() {\n return 3;\n }\n Object.defineProperty(arrObj, \"1\", {\n get: getFunc,\n configurable: true\n });\n\n Object.defineProperty(arrObj, \"1\", {\n value: 12\n });\n\n return dataPropertyAttributesAreCorrect(arrObj, \"1\", 12, false, false, true);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.2.3.6-4-244",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-244.js",
+ "description": "Object.defineProperty - 'O' is an Array, 'name' is an array index named property, 'name' is data property and 'desc' is data descriptor, and the [[Configurable]] attribute value of 'name' is false, test TypeError is thrown if the [[Writable]] attribute value of 'name' is false and the [[Writable]] field of 'desc' is true (15.4.5.1 step 4.c)",
+ "test": "assertTrue((function testcase() {\n\n var arrObj = [];\n\n Object.defineProperty(arrObj, \"1\", {\n writable: false,\n configurable: false\n });\n\n try {\n\n Object.defineProperty(arrObj, \"1\", {\n writable: true\n });\n return false;\n } catch (e) {\n return e instanceof TypeError && dataPropertyAttributesAreCorrect(arrObj, \"1\", undefined, false, false, false);\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-245",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-245.js",
+ "description": "Object.defineProperty - 'O' is an Array, 'name' is an array index named property, 'name' is data property and 'desc' is data descriptor, and the [[Configurable]] attribute value of 'name' is false, test TypeError is thrown if the [[Writable]] attribute value of 'name' is false, and the type of the [[Value]] field of 'desc' is different from the type of the [[Value]] attribute value of 'name' (15.4.5.1 step 4.c)",
+ "test": "assertTrue((function testcase() {\n\n var arrObj = [];\n\n Object.defineProperty(arrObj, \"1\", {\n value: 3,\n writable: false,\n configurable: false\n });\n\n try {\n\n Object.defineProperty(arrObj, \"1\", {\n value: \"abc\"\n });\n return false;\n } catch (e) {\n return e instanceof TypeError && dataPropertyAttributesAreCorrect(arrObj, \"1\", 3, false, false, false);\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-246",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-246.js",
+ "description": "Object.defineProperty - 'O' is an Array, 'name' is an array index named property, 'name' is data property and 'desc' is data descriptor, and the [[Configurable]] attribute value of 'name' is false, test TypeError is thrown if the [[Writable]] attribute value of 'name' is false, and the [[Value]] field of 'desc' is +0, and the [[Value]] attribute value of 'name' is -0 (15.4.5.1 step 4.c)",
+ "test": "assertTrue((function testcase() {\n var arrObj = [];\n\n Object.defineProperty(arrObj, \"1\", {\n value: -0\n\n });\n\n try {\n Object.defineProperty(arrObj, \"1\", {\n value: +0\n });\n\n return false;\n } catch (e) {\n return e instanceof TypeError && dataPropertyAttributesAreCorrect(arrObj, \"1\", -0, false, false, false);\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-247",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-247.js",
+ "description": "Object.defineProperty - 'O' is an Array, 'name' is an array index named property, 'name' is data property and 'desc' is data descriptor, and the [[Configurable]] attribute value of 'name' is false, test TypeError is thrown if the [[Writable]] attribute value of 'name' is false, and the [[Value]] field of 'desc' is -0, and the [[Value]] attribute value of 'name' is +0 (15.4.5.1 step 4.c)",
+ "test": "assertTrue((function testcase() {\n var arrObj = [];\n\n Object.defineProperty(arrObj, \"1\", {\n value: +0\n });\n\n try {\n\n Object.defineProperty(arrObj, \"1\", {\n value: -0\n });\n return false;\n } catch (e) {\n return e instanceof TypeError && dataPropertyAttributesAreCorrect(arrObj, \"1\", +0, false, false, false);\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-248",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-248.js",
+ "description": "Object.defineProperty - 'O' is an Array, 'name' is an array index named property, 'name' is data property and 'desc' is data descriptor, and the [[Configurable]] attribute value of 'name' is false, test TypeError is thrown if the [[Writable]] attribute value of 'name' is false, and the [[Value]] field of 'desc' and the [[Value]] attribute value of 'name' are two numbers with different vaules (15.4.5.1 step 4.c)",
+ "test": "assertTrue((function testcase() {\n var arrObj = [];\n\n Object.defineProperty(arrObj, \"1\", {\n value: 12\n });\n\n try {\n Object.defineProperty(arrObj, \"1\", {\n value: 15\n });\n return false;\n } catch (e) {\n return e instanceof TypeError && dataPropertyAttributesAreCorrect(arrObj, \"1\", 12, false, false, false);\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-249",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-249.js",
+ "description": "Object.defineProperty - 'O' is an Array, 'name' is an array index named property, 'name' is data property and 'desc' is data descriptor, and the [[Configurable]] attribute value of 'name' is false, test TypeError is thrown if the [[Writable]] attribute value of 'name' is false, and the [[Value]] field of 'desc' and the [[Value]] attribute value of 'name' are two strings with different values (15.4.5.1 step 4.c)",
+ "test": "assertTrue((function testcase() {\n var arrObj = [];\n\n Object.defineProperty(arrObj, \"1\", {\n value: \"abc\"\n });\n\n try {\n Object.defineProperty(arrObj, \"1\", {\n value: \"fgh\"\n });\n\n return false;\n } catch (e) {\n return e instanceof TypeError && dataPropertyAttributesAreCorrect(arrObj, \"1\", \"abc\", false, false, false);\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-25",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-25.js",
+ "description": "Object.defineProperty - 'data' is own data property that overrides an inherited accessor property (8.12.9 step 1)",
+ "test": "assertTrue((function testcase() {\n var proto = {};\n Object.defineProperty(proto, \"foo\", {\n get: function () { },\n configurable: true\n });\n\n var ConstructFun = function () { };\n ConstructFun.prototype = proto;\n var obj = new ConstructFun();\n Object.defineProperty(obj, \"foo\", {\n value: 11,\n configurable: false\n });\n\n try {\n Object.defineProperty(obj, \"foo\", {\n configurable: true\n });\n return false;\n } catch (e) {\n return e instanceof TypeError && obj.foo === 11;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-250",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-250.js",
+ "description": "Object.defineProperty - 'O' is an Array, 'name' is an array index named property, 'name' is data property and 'desc' is data descriptor, and the [[Configurable]] attribute value of 'name' is false, test TypeError is thrown if the [[Writable]] attribute value of 'name' is false, and the [[Value]] field of 'desc' and the [[Value]] attribute value of 'name' are two booleans with different values (15.4.5.1 step 4.c)",
+ "test": "assertTrue((function testcase() {\n var arrObj = [];\n\n Object.defineProperty(arrObj, \"1\", {\n value: false\n });\n\n try {\n Object.defineProperty(arrObj, \"1\", {\n value: true\n });\n\n return false;\n } catch (e) {\n return e instanceof TypeError && dataPropertyAttributesAreCorrect(arrObj, \"1\", false, false, false, false);\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-251",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-251.js",
+ "description": "Object.defineProperty - 'O' is an Array, 'name' is an array index named property, 'name' is data property and 'desc' is data descriptor, and the [[Configurable]] attribute value of 'name' is false, test TypeError is thrown if the [[Writable]] attribute value of 'name' is false, and the [[Value]] field of 'desc' and the [[Value]] attribute value of 'name' are two objects which refer to the different objects (15.4.5.1 step 4.c)",
+ "test": "assertTrue((function testcase() {\n var arrObj = [];\n var obj = { length: 10 };\n\n Object.defineProperty(arrObj, \"1\", {\n value: obj\n });\n\n try {\n Object.defineProperty(arrObj, \"1\", { value: {} });\n\n return false;\n } catch (e) {\n return e instanceof TypeError && dataPropertyAttributesAreCorrect(arrObj, \"1\", obj, false, false, false);\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-252",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-252.js",
+ "description": "Object.defineProperty - 'O' is an Array, 'name' is an array index named property, 'name' is accessor property and 'desc' is accessor descriptor, and the [[Configurable]] attribute value of 'name' is false, test TypeError is thrown if the [[Set]] field of 'desc' is present, and the [[Set]] field of 'desc' and the [[Set]] attribute value of 'name' are two objects which refer to the different objects (15.4.5.1 step 4.c)",
+ "test": "assertTrue((function testcase() {\n var arrObj = [];\n\n function setFunc(value) {\n arrObj.setVerifyHelpProp = value;\n }\n Object.defineProperty(arrObj, \"1\", {\n set: setFunc\n });\n\n try {\n Object.defineProperty(arrObj, \"1\", {\n set: function () { }\n });\n\n return false;\n } catch (e) {\n return e instanceof TypeError && accessorPropertyAttributesAreCorrect(arrObj, \"1\", undefined, setFunc, \"setVerifyHelpProp\", false, false);\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.2.3.6-4-253",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-253.js",
+ "description": "Object.defineProperty - 'O' is an Array, 'name' is an array index named property, 'name' is accessor property and 'desc' is accessor descriptor, and the [[Configurable]] attribute value of 'name' is false, test TypeError is thrown if the [[Set]] field of 'desc' is present, and the [[Set]] field of 'desc' is an object and the [[Set]] attribute value of 'name' is undefined (15.4.5.1 step 4.c)",
+ "test": "assertTrue((function testcase() {\n var arrObj = [];\n function getFunc() {\n return 12;\n }\n\n Object.defineProperty(arrObj, \"1\", {\n get: getFunc,\n set: undefined\n });\n\n try {\n Object.defineProperty(arrObj, \"1\", {\n set: function () { }\n });\n return false;\n } catch (e) {\n return e instanceof TypeError && accessorPropertyAttributesAreCorrect(arrObj, \"1\", getFunc, undefined, undefined, false, false);\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.2.3.6-4-254",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-254.js",
+ "description": "Object.defineProperty - 'O' is an Array, 'name' is an array index named property, 'name' is accessor property and 'desc' is accessor descriptor, and the [[Configurable]] attribute value of 'name' is false, test TypeError is not thrown if the [[Set]] field of 'desc' is present, and the [[Set]] field of 'desc' and the [[Set]] attribute value of 'name' are undefined (15.4.5.1 step 4.c)",
+ "test": "assertTrue((function testcase() {\n var arrObj = [];\n\n Object.defineProperty(arrObj, \"1\", {\n set: undefined\n });\n var hasProperty = arrObj.hasOwnProperty(\"1\");\n\n Object.defineProperty(arrObj, \"1\", {\n set: undefined\n });\n\n var desc = Object.getOwnPropertyDescriptor(arrObj, \"1\");\n\n var verifyGet = desc.hasOwnProperty(\"get\") && typeof desc.get === \"undefined\";\n\n var verifySet = desc.hasOwnProperty(\"set\") && typeof desc.set === \"undefined\";\n\n var verifyEnumerable = false;\n for (var p in arrObj) {\n if (p === \"1\") {\n verifyEnumerable = true\n }\n }\n\n var verifyConfigurable = false;\n delete arrObj[1];\n verifyConfigurable = arrObj.hasOwnProperty(\"1\");\n\n return hasProperty && verifyGet && verifySet && !verifyEnumerable && verifyConfigurable;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.2.3.6-4-255",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-255.js",
+ "description": "Object.defineProperty - 'O' is an Array, 'name' is an array index named property, 'name' is accessor property and 'desc' is accessor descriptor, and the [[Configurable]] attribute value of 'name' is false, test TypeError is thrown if the [[Get]] field of 'desc' is present, and the [[Get]] field of 'desc' and the [[Get]] attribute value of 'name' are two objects which refer to the different objects (15.4.5.1 step 4.c)",
+ "test": "assertTrue((function testcase() {\n var arrObj = [];\n\n function getFunc() {\n return 12;\n }\n Object.defineProperty(arrObj, \"1\", {\n get: getFunc\n });\n\n try {\n Object.defineProperty(arrObj, \"1\", {\n get: function () {\n return 14;\n }\n });\n\n return false;\n } catch (e) {\n var hasProperty = arrObj.hasOwnProperty(\"1\");\n var desc = Object.getOwnPropertyDescriptor(arrObj, \"1\");\n\n var verifyGet = arrObj[1] === getFunc();\n\n var verifySet = desc.hasOwnProperty(\"set\") && typeof desc.set === \"undefined\";\n\n var verifyEnumerable = false;\n for (var p in arrObj) {\n if (p === \"1\") {\n verifyEnumerable = true\n }\n }\n\n var verifyConfigurable = false;\n delete arrObj[1];\n verifyConfigurable = arrObj.hasOwnProperty(\"1\");\n\n return e instanceof TypeError && hasProperty && verifyGet &&\n verifySet && !verifyEnumerable && verifyConfigurable;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.2.3.6-4-256",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-256.js",
+ "description": "Object.defineProperty - 'O' is an Array, 'name' is an array index named property, 'name' is accessor property and 'desc' is accessor descriptor, and the [[Configurable]] attribute value of 'name' is false, test TypeError is thrown if the [[Get]] field of 'desc' is present, and the [[Get]] field of 'desc' is an object and the [[Get]] attribute value of 'name' is undefined (15.4.5.1 step 4.c)",
+ "test": "assertTrue((function testcase() {\n var arrObj = [];\n function getFunc() {\n return 12;\n }\n\n Object.defineProperty(arrObj, \"1\", {\n get: getFunc\n });\n\n try {\n Object.defineProperty(arrObj, \"1\", {\n get: undefined\n });\n return false;\n } catch (e) {\n var hasProperty = arrObj.hasOwnProperty(\"1\");\n var desc = Object.getOwnPropertyDescriptor(arrObj, \"1\");\n\n var verifyGet = arrObj[1] === getFunc();\n\n var verifySet = desc.hasOwnProperty(\"set\") && typeof desc.set === \"undefined\";\n\n var verifyEnumerable = false;\n for (var p in arrObj) {\n if (p === \"1\") {\n verifyEnumerable = true\n }\n }\n\n var verifyConfigurable = false;\n delete arrObj[1];\n verifyConfigurable = arrObj.hasOwnProperty(\"1\");\n\n return e instanceof TypeError && hasProperty && verifyGet &&\n verifySet && !verifyEnumerable && verifyConfigurable;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.2.3.6-4-257",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-257.js",
+ "description": "Object.defineProperty - 'O' is an Array, 'name' is an array index named property, 'name' is accessor property and 'desc' is accessor descriptor, and the [[Configurable]] attribute value of 'name' is false, test TypeError is not thrown if the [[Get]] field of 'desc' is present, and the [[Get]] field of 'desc' and the [[Get]] attribute value of 'name' are undefined (15.4.5.1 step 4.c)",
+ "test": "assertTrue((function testcase() {\n var arrObj = [];\n function setFunc(value) {\n arrObj.setVerifyHelpProp = value;\n }\n\n Object.defineProperty(arrObj, \"1\", {\n get: undefined,\n set: setFunc,\n configurable: false\n });\n\n try {\n Object.defineProperty(arrObj, \"1\", {\n get: undefined\n });\n\n return accessorPropertyAttributesAreCorrect(arrObj, \"1\", undefined, setFunc, \"setVerifyHelpProp\", false, false);\n } catch (e) {\n return false;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.2.3.6-4-258",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-258.js",
+ "description": "Object.defineProperty - 'O' is an Array, 'name' is an array index named property, name is data property and 'desc' is data descriptor, test updating the [[Value]] attribute value of 'name' (15.4.5.1 step 4.c)",
+ "test": "assertTrue((function testcase() {\n\n var arrObj = [100];\n\n Object.defineProperty(arrObj, \"0\", {\n value: 200\n });\n return dataPropertyAttributesAreCorrect(arrObj, \"0\", 200, true, true, true);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-259",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-259.js",
+ "description": "Object.defineProperty - 'O' is an Array, 'name' is an array index named property, name is data property and 'desc' is data descriptor, test setting the [[Value]] attribute value of 'name' as undefined (15.4.5.1 step 4.c)",
+ "test": "assertTrue((function testcase() {\n\n var arrObj = [100];\n\n Object.defineProperty(arrObj, \"0\", {\n value: undefined\n });\n return dataPropertyAttributesAreCorrect(arrObj, \"0\", undefined, true, true, true);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-26",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-26.js",
+ "description": "Object.defineProperty - 'name' is own accessor property (8.12.9 step 1)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n Object.defineProperty(obj, \"property\", {\n get: function () {\n return 11;\n },\n configurable: false\n });\n\n try {\n Object.defineProperty(obj, \"property\", {\n get: function () {\n return 12;\n },\n configurable: true\n });\n return false;\n } catch (e) {\n return e instanceof TypeError && obj.property === 11;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-260",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-260.js",
+ "description": "Object.defineProperty - 'O' is an Array, 'name' is an array index named property, name is data property and 'desc' is data descriptor, test setting the [[Value]] attribute value of 'name' from undefined to number (15.4.5.1 step 4.c)",
+ "test": "assertTrue((function testcase() {\n\n var arrObj = [undefined];\n Object.defineProperty(arrObj, \"0\", {\n value: 100\n });\n return dataPropertyAttributesAreCorrect(arrObj, \"0\", 100, true, true, true);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-261",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-261.js",
+ "description": "Object.defineProperty - 'O' is an Array, 'name' is an array index named property, name is data property and 'desc' is data descriptor, test updating the [[Writable]] attribute value of 'name' (15.4.5.1 step 4.c)",
+ "test": "assertTrue((function testcase() {\n\n var arrObj = [100];\n Object.defineProperty(arrObj, \"0\", {\n writable: false\n });\n return dataPropertyAttributesAreCorrect(arrObj, \"0\", 100, false, true, true);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-262",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-262.js",
+ "description": "Object.defineProperty - 'O' is an Array, 'name' is an array index named property, name is data property and 'desc' is data descriptor, test updating the [[Enumerable]] attribute value of 'name' (15.4.5.1 step 4.c)",
+ "test": "assertTrue((function testcase() {\n\n var arrObj = [100];\n\n Object.defineProperty(arrObj, \"0\", {\n enumerable: false\n });\n return dataPropertyAttributesAreCorrect(arrObj, \"0\", 100, true, false, true);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-263",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-263.js",
+ "description": "Object.defineProperty - 'O' is an Array, 'name' is an array index named property, name is data property and 'desc' is data descriptor, test updating the [[Configurable]] attribute value of 'name' (15.4.5.1 step 4.c)",
+ "test": "assertTrue((function testcase() {\n\n var arrObj = [100];\n\n Object.defineProperty(arrObj, \"0\", {\n configurable: false\n });\n return dataPropertyAttributesAreCorrect(arrObj, \"0\", 100, true, true, false);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-264",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-264.js",
+ "description": "Object.defineProperty - 'O' is an Array, 'name' is an array index named property, name is data property and 'desc' is data descriptor, test updating multiple attribute values of 'name' (15.4.5.1 step 4.c)",
+ "test": "assertTrue((function testcase() {\n\n var arrObj = [100];\n Object.defineProperty(arrObj, \"0\", {\n writable: false,\n enumerable: false,\n configurable: false\n });\n return dataPropertyAttributesAreCorrect(arrObj, \"0\", 100, false, false, false);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-265",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-265.js",
+ "description": "Object.defineProperty - 'O' is an Array, 'name' is an array index named property, name is accessor property and 'desc' is accessor descriptor, test updating the [[Get]] attribute value of 'name' (15.4.5.1 step 4.c)",
+ "test": "assertTrue((function testcase() {\n\n var arrObj = [];\n\n function getFunc() {\n return 100;\n }\n Object.defineProperty(arrObj, \"0\", {\n get: function () {\n return 12;\n },\n configurable: true\n });\n Object.defineProperty(arrObj, \"0\", {\n get: getFunc\n });\n return accessorPropertyAttributesAreCorrect(arrObj, \"0\", getFunc, undefined, undefined, false, true);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.2.3.6-4-266",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-266.js",
+ "description": "Object.defineProperty - 'O' is an Array, 'name' is an array index named property, name is accessor property and 'desc' is accessor descriptor, test setting the [[Get]] attribute value of 'name' as undefined (15.4.5.1 step 4.c)",
+ "test": "assertTrue((function testcase() {\n\n var arrObj = [];\n function getFunc() {\n return 12;\n }\n\n Object.defineProperty(arrObj, \"0\", {\n get: getFunc,\n configurable: true\n });\n\n Object.defineProperty(arrObj, \"0\", {\n get: undefined\n });\n return accessorPropertyAttributesAreCorrect(arrObj, \"0\", undefined, undefined, undefined, false, true);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.2.3.6-4-267",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-267.js",
+ "description": "Object.defineProperty - 'O' is an Array, 'name' is an array index named property, name is accessor property and 'desc' is accessor descriptor, test updating the [[Get]] attribute value of 'name' from undefined to function object (15.4.5.1 step 4.c)",
+ "test": "assertTrue((function testcase() {\n\n var arrObj = [];\n\n function getFunc() {\n return 12;\n }\n Object.defineProperty(arrObj, \"0\", {\n get: undefined,\n configurable: true\n });\n\n Object.defineProperty(arrObj, \"0\", {\n get: getFunc\n });\n return accessorPropertyAttributesAreCorrect(arrObj, \"0\", getFunc, undefined, undefined, false, true);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.2.3.6-4-268",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-268.js",
+ "description": "Object.defineProperty - 'O' is an Array, 'name' is an array index named property, name is accessor property and 'desc' is accessor descriptor, test updating the [[Set]] attribute value of 'name' (15.4.5.1 step 4.c)",
+ "test": "assertTrue((function testcase() {\n\n var arrObj = [];\n\n function setFunc(value) {\n arrObj.setVerifyHelpProp = value;\n }\n Object.defineProperty(arrObj, \"0\", {\n set: function () { },\n configurable: true\n });\n\n Object.defineProperty(arrObj, \"0\", {\n set: setFunc\n });\n return accessorPropertyAttributesAreCorrect(arrObj, \"0\", undefined, setFunc, \"setVerifyHelpProp\", false, true);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.2.3.6-4-269",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-269.js",
+ "description": "Object.defineProperty - 'O' is an Array, 'name' is an array index named property, name is accessor property and 'desc' is accessor descriptor, test setting the [[Set]] attribute value of 'name' as undefined (15.4.5.1 step 4.c)",
+ "test": "assertTrue((function testcase() {\n\n var arrObj = [];\n\n Object.defineProperty(arrObj, \"0\", {\n set: function () { },\n configurable: true\n });\n\n Object.defineProperty(arrObj, \"0\", {\n set: undefined\n });\n return accessorPropertyAttributesAreCorrect(arrObj, \"0\", undefined, undefined, undefined, false, true);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.2.3.6-4-27",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-27.js",
+ "description": "Object.defineProperty - 'name' is an inherited accessor property (8.12.9 step 1)",
+ "test": "assertTrue((function testcase() {\n var proto = {};\n Object.defineProperty(proto, \"property\", {\n get: function () {\n return 11;\n },\n configurable: false\n });\n\n var ConstructFun = function () { };\n ConstructFun.prototype = proto;\n var obj = new ConstructFun();\n\n Object.defineProperty(obj, \"property\", {\n get: function () {\n return 12;\n },\n configurable: true\n });\n return obj.hasOwnProperty(\"property\") && obj.property === 12;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-270",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-270.js",
+ "description": "Object.defineProperty - 'O' is an Array, 'name' is an array index named property, name is accessor property and 'desc' is accessor descriptor, test updating the [[Set]] attribute value of 'name' from undefined to function object (15.4.5.1 step 4.c)",
+ "test": "assertTrue((function testcase() {\n\n var arrObj = [];\n\n function setFunc(value) {\n arrObj.setVerifyHelpProp = value;\n }\n\n Object.defineProperty(arrObj, \"0\", {\n set: undefined,\n configurable: true\n });\n\n Object.defineProperty(arrObj, \"0\", {\n set: setFunc\n });\n return accessorPropertyAttributesAreCorrect(arrObj, \"0\", undefined, setFunc, \"setVerifyHelpProp\", false, true);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.2.3.6-4-271",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-271.js",
+ "description": "Object.defineProperty - 'O' is an Array, 'name' is an array index named property, name is accessor property and 'desc' is accessor descriptor, test updating the [[Enumerable]] attribute value of 'name' (15.4.5.1 step 4.c)",
+ "test": "assertTrue((function testcase() {\n\n var arrObj = [];\n\n function setFunc(value) {\n arrObj.setVerifyHelpProp = value;\n }\n\n Object.defineProperty(arrObj, \"0\", {\n set: setFunc,\n enumerable: true,\n configurable: true\n });\n\n Object.defineProperty(arrObj, \"0\", {\n enumerable: false\n });\n return accessorPropertyAttributesAreCorrect(arrObj, \"0\", undefined, setFunc, \"setVerifyHelpProp\", false, true);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.2.3.6-4-272",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-272.js",
+ "description": "Object.defineProperty - 'O' is an Array, 'name' is an array index named property, name is accessor property and 'desc' is accessor descriptor, test updating the [[Configurable]] attribute value of 'name' (15.4.5.1 step 4.c)",
+ "test": "assertTrue((function testcase() {\n\n var arrObj = [];\n function setFunc(value) {\n arrObj.setVerifyHelpProp = value;\n }\n\n Object.defineProperty(arrObj, \"0\", {\n set: setFunc,\n configurable: true\n });\n\n Object.defineProperty(arrObj, \"0\", {\n configurable: false\n });\n return accessorPropertyAttributesAreCorrect(arrObj, \"0\", undefined, setFunc, \"setVerifyHelpProp\", false, false);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.2.3.6-4-273",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-273.js",
+ "description": "Object.defineProperty - 'O' is an Array, 'name' is an array index named property, name is accessor property and 'desc' is accessor descriptor, test updating multiple attribute values of 'name' (15.4.5.1 step 4.c)",
+ "test": "assertTrue((function testcase() {\n\n var arrObj = [];\n\n function setFunc(value) {\n arrObj.setVerifyHelpProp = value;\n }\n function getFunc() {\n return 12;\n }\n Object.defineProperty(arrObj, \"1\", {\n get: function () {\n return 6;\n },\n set: setFunc,\n enumerable: true,\n configurable: true\n });\n\n Object.defineProperty(arrObj, \"1\", {\n get: getFunc,\n enumerable: false,\n configurable: false\n });\n return accessorPropertyAttributesAreCorrect(arrObj, \"1\", getFunc, setFunc, \"setVerifyHelpProp\", false, false);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.2.3.6-4-274",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-274.js",
+ "description": "Object.defineProperty - 'O' is an Array, 'name' is an array index named property, test the length property of 'O' is not changed if ToUint32('name') is less than value of the length property in 'O' (15.4.5.1 step 4.e)",
+ "test": "assertTrue((function testcase() {\n\n var arrObj = [];\n arrObj.length = 3; // default value of length: writable: true, configurable: false, enumerable: false\n\n Object.defineProperty(arrObj, \"1\", {\n value: 14\n });\n\n return arrObj.length === 3 && arrObj[1] === 14;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-275",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-275.js",
+ "description": "Object.defineProperty - 'O' is an Array, 'name' is an array index named property, test the length property of 'O' is set as ToUint32('name') + 1 if ToUint32('name') equals to value of the length property in 'O' (15.4.5.1 step 4.e.ii)",
+ "test": "assertTrue((function testcase() {\n\n var arrObj = [];\n arrObj.length = 3; // default value of length: writable: true, configurable: false, enumerable: false\n\n Object.defineProperty(arrObj, \"3\", {\n value: 3\n });\n\n return arrObj.length === 4 && arrObj[3] === 3;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-276",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-276.js",
+ "description": "Object.defineProperty - 'O' is an Array, 'name' is an array index named property, test the length property of 'O' is set as ToUint32('name') + 1 if ToUint32('name') is greater than value of the length property in 'O' (15.4.5.1 step 4.e.ii)",
+ "test": "assertTrue((function testcase() {\n\n var arrObj = [];\n\n Object.defineProperty(arrObj, \"5\", {\n value: 3\n });\n\n return arrObj.length === 6 && arrObj[5] === 3;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-277",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-277.js",
+ "description": "Object.defineProperty - 'O' is an Array, 'name' is generic property that won't exist on 'O', and 'desc' is data descriptor, test 'name' is defined in 'O' with all correct attribute values (15.4.5.1 step 5)",
+ "test": "assertTrue((function testcase() {\n\n var arrObj = [];\n\n Object.defineProperty(arrObj, \"property\", {\n value: 12,\n writable: true,\n enumerable: true,\n configurable: true\n });\n\n return dataPropertyAttributesAreCorrect(arrObj, \"property\", 12, true, true, true);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-278",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-278.js",
+ "description": "Object.defineProperty - 'name' is generic property that won't exist on 'O', and 'desc' is accessor descriptor, test 'name' is defined in 'O' with all correct attribute values (15.4.5.1 step 5)",
+ "test": "assertTrue((function testcase() {\n\n var arrObj = [];\n\n function getFunc() {\n return 12;\n }\n function setFunc(value) {\n arrObj.setVerifyHelpProp = value;\n }\n\n Object.defineProperty(arrObj, \"property\", {\n get: getFunc,\n set: setFunc,\n enumerable: true,\n configurable: true\n });\n\n return accessorPropertyAttributesAreCorrect(arrObj, \"property\", getFunc, setFunc, \"setVerifyHelpProp\", true, true);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-279",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-279.js",
+ "description": "Object.defineProperty - 'O' is an Array, 'name' is generic own accessor property of 'O', and 'desc' is accessor descriptor, test updating multiple attribute values of 'name' (15.4.5.1 step 5)",
+ "test": "assertTrue((function testcase() {\n\n var arrObj = [];\n\n function getFunc() {\n return 12;\n }\n function setFunc(value) {\n arrObj.setVerifyHelpProp = value;\n }\n Object.defineProperty(arrObj, \"property\", {\n get: function () {\n return 24;\n },\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(arrObj, \"property\", {\n get: getFunc,\n set: setFunc,\n enumerable: false,\n configurable: false\n });\n\n return accessorPropertyAttributesAreCorrect(arrObj, \"property\", getFunc, setFunc, \"setVerifyHelpProp\", false, false);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-28",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-28.js",
+ "description": "Object.defineProperty - 'name' is own accessor property that overrides an inherited data property (8.12.9 step 1)",
+ "test": "assertTrue((function testcase() {\n var proto = {};\n Object.defineProperty(proto, \"foo\", {\n value: 11,\n configurable: true\n });\n\n var ConstructFun = function () { };\n ConstructFun.prototype = proto;\n var obj = new ConstructFun();\n Object.defineProperty(obj, \"foo\", {\n get: function () { },\n configurable: false\n });\n\n try {\n Object.defineProperty(obj, \"foo\", {\n configurable: true\n });\n return false;\n } catch (e) {\n return e instanceof TypeError;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-280",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-280.js",
+ "description": "Object.defineProperty - 'O' is an Array, 'name' is generic own data property of 'O', and 'desc' is data descriptor, test updating multiple attribute values of 'name' (15.4.5.1 step 5)",
+ "test": "assertTrue((function testcase() {\n\n var arrObj = [];\n\n arrObj.property = 12; // default value of attributes: writable: true, configurable: true, enumerable: true\n\n Object.defineProperty(arrObj, \"property\", {\n writable: false,\n enumerable: false,\n configurable: false\n });\n\n return dataPropertyAttributesAreCorrect(arrObj, \"property\", 12, false, false, false);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-281",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-281.js",
+ "description": "Object.defineProperty - 'O' is an Array, 'name' is generic own data property of 'O', test TypeError is thrown when updating the [[Value]] attribute value of 'name' which is defined as non-writable and non-configurable (15.4.5.1 step 5)",
+ "test": "assertTrue((function testcase() {\n\n var arrObj = [];\n\n Object.defineProperty(arrObj, \"property\", {\n value: 12\n });\n try {\n Object.defineProperty(arrObj, \"property\", {\n value: 36\n });\n return false;\n } catch (e) {\n return e instanceof TypeError && dataPropertyAttributesAreCorrect(arrObj, \"property\", 12, false, false, false);\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-282",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-282.js",
+ "description": "Object.defineProperty - 'O' is an Array, 'name' is generic own data property of 'O', test TypeError is thrown when updating the [[Writable]] attribute value of 'name' which is defined as non-configurable (15.4.5.1 step 5)",
+ "test": "assertTrue((function testcase() {\n\n var arrObj = [];\n\n Object.defineProperty(arrObj, \"property\", {\n writable: false\n });\n try {\n Object.defineProperty(arrObj, \"property\", {\n writable: true\n });\n return false;\n } catch (e) {\n return e instanceof TypeError && dataPropertyAttributesAreCorrect(arrObj, \"property\", undefined, false, false, false);\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-283",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-283.js",
+ "description": "Object.defineProperty - 'O' is an Array, 'name' is generic own data property of 'O', test TypeError is thrown when updating the [[Enumerable]] attribute value of 'name' which is defined as non-configurable (15.4.5.1 step 5)",
+ "test": "assertTrue((function testcase() {\n var arrObj = [];\n\n Object.defineProperty(arrObj, \"property\", {\n value: 12,\n enumerable: false\n });\n try {\n Object.defineProperty(arrObj, \"property\", {\n enumerable: true\n });\n return false;\n } catch (e) {\n return e instanceof TypeError && dataPropertyAttributesAreCorrect(arrObj, \"property\", 12, false, false, false);\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-284",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-284.js",
+ "description": "Object.defineProperty - 'O' is an Array, 'name' is generic own data property of 'O', test TypeError is thrown when updating the [[Configurable]] attribute value of 'name' which is defined as non-configurable (15.4.5.1 step 5)",
+ "test": "assertTrue((function testcase() {\n\n var arrObj = [];\n\n Object.defineProperty(arrObj, \"property\", {\n value: 12\n });\n try {\n Object.defineProperty(arrObj, \"property\", {\n configurable: true\n });\n return false;\n } catch (e) {\n return e instanceof TypeError && dataPropertyAttributesAreCorrect(arrObj, \"property\", 12, false, false, false);\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-285",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-285.js",
+ "description": "Object.defineProperty - 'O' is an Array, 'name' is generic own accessor property of 'O', test TypeError is thrown when updating the [[Get]] attribute value of 'name' which is defined as non-configurable (15.4.5.1 step 5)",
+ "test": "assertTrue((function testcase() {\n\n var arrObj = [];\n\n function getFunc() {\n return 12;\n }\n function setFunc(value) {\n arrObj.setVerifyHelpProp = value;\n }\n Object.defineProperty(arrObj, \"property\", {\n get: getFunc,\n set: setFunc\n });\n try {\n Object.defineProperty(arrObj, \"property\", {\n get: function () {\n return 36;\n }\n });\n return false;\n } catch (e) {\n return e instanceof TypeError && accessorPropertyAttributesAreCorrect(arrObj, \"property\", getFunc, setFunc, \"setVerifyHelpProp\", false, false);\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-286",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-286.js",
+ "description": "Object.defineProperty - 'O' is an Array, 'name' is generic own accessor property of 'O', and 'desc' is accessor descriptor, test TypeError is thrown when updating the [[Set]] attribute value of 'name' (15.4.5.1 step 5)",
+ "test": "assertTrue((function testcase() {\n\n var arrObj = [];\n\n function setFunc(value) {\n arrObj.setVerifyHelpProp = value;\n }\n Object.defineProperty(arrObj, \"property\", {\n set: setFunc\n });\n try {\n Object.defineProperty(arrObj, \"property\", {\n set: function () {}\n });\n return false;\n } catch (e) {\n return e instanceof TypeError && accessorPropertyAttributesAreCorrect(arrObj, \"property\", undefined, setFunc, \"setVerifyHelpProp\", false, false);\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-287",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-287.js",
+ "description": "Object.defineProperty - 'O' is an Array, 'name' is generic own accessor property of 'O', test TypeError is thrown when updating the [[Enumerable]] attribute value of 'name' which is defined as non-configurable (15.4.5.1 step 5)",
+ "test": "assertTrue((function testcase() {\n\n var arrObj = [];\n\n function setFunc(value) {\n arrObj.setVerifyHelpProp = value;\n }\n Object.defineProperty(arrObj, \"property\", {\n set: setFunc,\n enumerable: false\n });\n try {\n Object.defineProperty(arrObj, \"property\", {\n enumerable: true\n });\n return false;\n } catch (e) {\n return e instanceof TypeError && accessorPropertyAttributesAreCorrect(arrObj, \"property\", undefined, setFunc, \"setVerifyHelpProp\", false, false);\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-288",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-288.js",
+ "description": "Object.defineProperty - 'O' is an Array, 'name' is generic own accessor property of 'O', test TypeError is thrown when updating the [[Configurable]] attribute value of 'name' which is defined as non-configurable (15.4.5.1 step 5)",
+ "test": "assertTrue((function testcase() {\n\n var arrObj = [];\n\n function setFunc(value) {\n arrObj.setVerifyHelpProp = value;\n }\n Object.defineProperty(arrObj, \"property\", {\n set: setFunc,\n configurable: false\n });\n try {\n Object.defineProperty(arrObj, \"property\", {\n configurable: true\n });\n return false;\n } catch (e) {\n return e instanceof TypeError && accessorPropertyAttributesAreCorrect(arrObj, \"property\", undefined, setFunc, \"setVerifyHelpProp\", false, false);\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-289-1",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-289-1.js",
+ "description": "Object.defineProperty - 'O' is an Arguments object of a function that has formal parameters, 'name' is own property which is defined in both [[ParameterMap]] of 'O' and 'O', and is deleted afterwards, and 'desc' is data descriptor, test 'name' is redefined in 'O' with all correct attribute values (10.6 [[DefineOwnProperty]] step 3)",
+ "test": "assertTrue(((function (a, b, c) {\n delete arguments[0];\n Object.defineProperty(arguments, \"0\", {\n value: 10,\n writable: true,\n enumerable: true,\n configurable: true\n });\n var verifyFormal = a === 0;\n return dataPropertyAttributesAreCorrect(arguments, \"0\", 10, true, true, true) && verifyFormal;\n }(0, 1, 2))));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-289",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-289.js",
+ "description": "Object.defineProperty - 'O' is an Arguments object, 'name' is own property of 'O', and is deleted afterwards, and 'desc' is data descriptor, test 'name' is redefined in 'O' with all correct attribute values (10.6 [[DefineOwnProperty]] step 3)",
+ "test": "assertTrue(((function () { \n delete arguments[0];\n Object.defineProperty(arguments, \"0\", {\n value: 10,\n writable: true,\n enumerable: true,\n configurable: true\n });\n return dataPropertyAttributesAreCorrect(arguments, \"0\", 10, true, true, true);\n }(0, 1, 2))));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-29",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-29.js",
+ "description": "Object.defineProperty - 'name' is own accessor property that overrides an inherited accessor property (8.12.9 step 1)",
+ "test": "assertTrue((function testcase() {\n var proto = {};\n Object.defineProperty(proto, \"foo\", {\n get: function () { },\n configurable: true\n });\n\n var ConstructFun = function () { };\n ConstructFun.prototype = proto;\n var obj = new ConstructFun();\n Object.defineProperty(obj, \"foo\", {\n get: function () { },\n configurable: false\n });\n\n try {\n Object.defineProperty(obj, \"foo\", {\n configurable: true\n });\n return false;\n } catch (e) {\n return e instanceof TypeError;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-290-1",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-290-1.js",
+ "description": "Object.defineProperty - 'O' is an Arguments object of a function that has formal parameters, 'name' is own property which is defined in both [[ParameterMap]] of 'O' and 'O', is deleted afterwards, and 'desc' is accessor descriptor, test 'name' is redefined in 'O' with all correct attribute values (10.6 [[DefineOwnProperty]] step 3)",
+ "test": "assertTrue(((function (a, b, c) { \n delete arguments[0];\n function getFunc() {\n return 10;\n }\n function setFunc(value) {\n this.setVerifyHelpProp = value;\n }\n Object.defineProperty(arguments, \"0\", {\n get: getFunc,\n set: setFunc,\n enumerable: true,\n configurable: true\n });\n var verifyFormal = a === 0;\n return accessorPropertyAttributesAreCorrect(arguments, \"0\", getFunc, setFunc, \"setVerifyHelpProp\", true, true) && verifyFormal;\n }(0, 1, 2))));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects() &&\n fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-290",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-290.js",
+ "description": "Object.defineProperty - 'O' is an Arguments object, 'name' is own property of 'O', and is deleted afterwards, and 'desc' is accessor descriptor, test 'name' is redefined in 'O' with all correct attribute values (10.6 [[DefineOwnProperty]] step 3)",
+ "test": "assertTrue(((function () { \n delete arguments[0];\n function getFunc() {\n return 10;\n }\n function setFunc(value) {\n this.setVerifyHelpProp = value;\n }\n Object.defineProperty(arguments, \"0\", {\n get: getFunc,\n set: setFunc,\n enumerable: true,\n configurable: true\n });\n return accessorPropertyAttributesAreCorrect(arguments, \"0\", getFunc, setFunc, \"setVerifyHelpProp\", true, true);\n }(0, 1, 2))));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects() && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-291-1",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-291-1.js",
+ "description": "Object.defineProperty - 'O' is an Arguments object of a function that has formal parameters, 'name' is own accessor property of 'O' which is also defined in [[ParameterMap]] of 'O', and 'desc' is accessor descriptor, test updating multiple attribute values of 'name' (10.6 [[DefineOwnProperty]] step 3 and 5.a.i)",
+ "test": "assertTrue(((function (a, b, c) { \n function getFunc1() {\n return 10;\n }\n Object.defineProperty(arguments, \"0\", {\n get: getFunc1,\n enumerable: true,\n configurable: true\n });\n function getFunc2() {\n return 20;\n }\n Object.defineProperty(arguments, \"0\", {\n get: getFunc2,\n enumerable: false,\n configurable: false\n });\n var verifyFormal = a === 0;\n return accessorPropertyAttributesAreCorrect(arguments, \"0\", getFunc2, undefined, undefined, false, false) && verifyFormal;\n }(0, 1, 2))));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects() &&\n fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-291",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-291.js",
+ "description": "Object.defineProperty - 'O' is an Arguments object, 'name' is own accessor property of 'O', and 'desc' is accessor descriptor, test updating multiple attribute values of 'name' (10.6 [[DefineOwnProperty]] step 3)",
+ "test": "assertTrue(((function () {\n function getFunc1() {\n return 10;\n }\n Object.defineProperty(arguments, \"0\", {\n get: getFunc1,\n enumerable: true,\n configurable: true\n });\n function getFunc2() {\n return 20;\n }\n Object.defineProperty(arguments, \"0\", {\n get: getFunc2,\n enumerable: false,\n configurable: false\n });\n return accessorPropertyAttributesAreCorrect(arguments, \"0\", getFunc2, undefined, undefined, false, false);\n }(0, 1, 2))));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects() && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-292-1",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-292-1.js",
+ "description": "Object.defineProperty - 'O' is an Arguments object of a function that has formal parameters, 'name' is own property of 'O' which is also defined in [[ParameterMap]] of 'O', and 'desc' is data descriptor, test updating multiple attribute values of 'name' (10.6 [[DefineOwnProperty]] step 3 and 5.b)",
+ "test": "assertTrue(((function (a, b, c) { \n Object.defineProperty(arguments, \"0\", {\n value: 20,\n writable: false,\n enumerable: false,\n configurable: false\n });\n var verifyFormal = a === 20;\n return dataPropertyAttributesAreCorrect(arguments, \"0\", 20, false, false, false) && verifyFormal;\n }(0, 1, 2))));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-292",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-292.js",
+ "description": "Object.defineProperty - 'O' is an Arguments object, 'name' is own data property of 'O', and 'desc' is data descriptor, test updating multiple attribute values of 'name' (10.6 [[DefineOwnProperty]] step 3)",
+ "test": "assertTrue(((function () {\n Object.defineProperty(arguments, \"0\", {\n value: 20,\n writable: false,\n enumerable: false,\n configurable: false\n });\n return dataPropertyAttributesAreCorrect(arguments, \"0\", 20, false, false, false);\n }(0, 1, 2))));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-293-1",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-293-1.js",
+ "description": "Object.defineProperty - 'O' is an Arguments object, 'name' is own data property of 'O', test TypeError is not thrown when updating the [[Value]] attribute value of 'name' which is defined as non-writable and configurable (10.6 [[DefineOwnProperty]] step 3 and 5b)",
+ "test": "assertTrue(((function () {\n Object.defineProperty(arguments, \"0\", {\n value: 10,\n writable: false\n });\n Object.defineProperty(arguments, \"0\", {\n value: 20\n });\n return dataPropertyAttributesAreCorrect(arguments, \"0\", 20, false, true, true);\n }(0, 1, 2))));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-293-2",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-293-2.js",
+ "description": "Object.defineProperty - 'O' is an Arguments object of a function that has formal parameters, 'name' is own data property of 'O' which is also defined in [[ParameterMap]] of 'O', test TypeError is thrown when updating the [[Value]] attribute value of 'name' which is defined as unwritable and non-configurable (10.6 [[DefineOwnProperty]] step 4 and step 5b)",
+ "test": "assertTrue(((function (a, b, c) {\n Object.defineProperty(arguments, \"0\", {\n value: 10,\n writable: false,\n enumerable: false,\n configurable: false\n });\n try {\n Object.defineProperty(arguments, \"0\", {\n value: 20\n });\n } catch (e) {\n var verifyFormal = a === 10;\n return e instanceof TypeError && dataPropertyAttributesAreCorrect(arguments, \"0\", 10, false, false, false) && verifyFormal;\n }\n return false;\n }(0, 1, 2))));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-293-3",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-293-3.js",
+ "description": "Object.defineProperty - 'O' is an Arguments object of a function that has formal parameters, 'name' is own data property of 'O' which is also defined in [[ParameterMap]] of 'O', test TypeError is not thrown when updating the [[Value]] attribute value of 'name' which is defined as non-writable and configurable (10.6 [[DefineOwnProperty]] step 3 and step 5.b)",
+ "test": "assertTrue(((function (a, b, c) {\n Object.defineProperty(arguments, \"0\", {\n value: 10,\n writable: false,\n });\n Object.defineProperty(arguments, \"0\", {\n value: 20\n });\n var verifyFormal = a === 10; \n return dataPropertyAttributesAreCorrect(arguments, \"0\", 20, false, true, true) && verifyFormal;\n }(0, 1, 2))));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-293",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-293.js",
+ "description": "Object.defineProperty - 'O' is an Arguments object, 'name' is own data property of 'O', test TypeError is thrown when updating the [[Value]] attribute value of 'name' which is defined as non-writable and non-configurable (10.6 [[DefineOwnProperty]] step 3)",
+ "test": "assertTrue(((function () {\n Object.defineProperty(arguments, \"0\", {\n value: 10,\n writable: false,\n enumerable: false,\n configurable: false\n });\n try {\n Object.defineProperty(arguments, \"0\", {\n value: 20\n });\n } catch (e) {\n return e instanceof TypeError && dataPropertyAttributesAreCorrect(arguments, \"0\", 10, false, false, false);\n }\n return false;\n }(0, 1, 2))));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-294-1",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-294-1.js",
+ "description": "Object.defineProperty - 'O' is an Arguments object of a function that has formal parameters, 'name' is own data property of 'O' which is also defined in [[ParameterMap]] of 'O', test TypeError is thrown when updating the [[Writable]] attribute value of 'name' which is defined as non-configurable (10.6 [[DefineOwnProperty]] step 4 and 5b)",
+ "test": "assertTrue(((function (a, b, c) {\n Object.defineProperty(arguments, \"0\", {\n value: 10,\n writable: false,\n enumerable: false,\n configurable: false\n });\n try {\n Object.defineProperty(arguments, \"0\", {\n writable: true\n });\n } catch (e) {\n var verifyFormal = a === 10;\n return e instanceof TypeError && dataPropertyAttributesAreCorrect(arguments, \"0\", 10, false, false, false) && verifyFormal;\n }\n return false;\n }(0, 1, 2))));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-294",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-294.js",
+ "description": "Object.defineProperty - 'O' is an Arguments object, 'name' is own data property of 'O', test TypeError is thrown when updating the [[Writable]] attribute value of 'name' which is defined as non-configurable (10.6 [[DefineOwnProperty]] step 4)",
+ "test": "assertTrue(((function () {\n Object.defineProperty(arguments, \"0\", {\n value: 10,\n writable: false,\n enumerable: false,\n configurable: false\n });\n try {\n Object.defineProperty(arguments, \"0\", {\n writable: true\n });\n } catch (e) {\n return e instanceof TypeError && dataPropertyAttributesAreCorrect(arguments, \"0\", 10, false, false, false);\n }\n return false;\n }(0, 1, 2))));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-295-1",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-295-1.js",
+ "description": "Object.defineProperty - 'O' is an Arguments object of a function that has formal parameters, 'name' is own data property of 'O' which is also defined in [[ParameterMap]] of 'O', test TypeError is thrown when updating the [[Enumerable]] attribute value of 'name' which is defined as non-configurable (10.6 [[DefineOwnProperty]] step 4 and step 5b)",
+ "test": "assertTrue(((function (a, b, c) {\n Object.defineProperty(arguments, \"0\", {\n value: 10,\n writable: false,\n enumerable: true,\n configurable: false\n });\n try {\n Object.defineProperty(arguments, \"0\", {\n enumerable: false\n });\n } catch (e) {\n var verifyFormal = a === 10;\n return e instanceof TypeError && dataPropertyAttributesAreCorrect(arguments, \"0\", 10, false, true, false) && verifyFormal;\n }\n return false;\n }(0, 1, 2))));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-295",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-295.js",
+ "description": "Object.defineProperty - 'O' is an Arguments object, 'name' is own data property of 'O', test TypeError is thrown when updating the [[Enumerable]] attribute value of 'name' which is defined as non-configurable (10.6 [[DefineOwnProperty]] step 4)",
+ "test": "assertTrue(((function () {\n Object.defineProperty(arguments, \"0\", {\n value: 10,\n writable: false,\n enumerable: true,\n configurable: false\n });\n try {\n Object.defineProperty(arguments, \"0\", {\n enumerable: false\n });\n } catch (e) {\n return e instanceof TypeError && dataPropertyAttributesAreCorrect(arguments, \"0\", 10, false, true, false);\n }\n return false;\n }(0, 1, 2))));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-296-1",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-296-1.js",
+ "description": "Object.defineProperty - 'O' is an Arguments object of a function that has formal parameters, 'name' is own data property of 'O' which is also defined in [[ParameterMap]] of 'O', test TypeError is thrown when updating the [[Configurable]] attribute value of 'name' which is defined as non-configurable (10.6 [[DefineOwnProperty]] step 4 and step 5b)",
+ "test": "assertTrue(((function (a, b, c) {\n Object.defineProperty(arguments, \"0\", {\n value: 10,\n writable: false,\n enumerable: false,\n configurable: false\n });\n try {\n Object.defineProperty(arguments, \"0\", {\n configurable: true\n });\n } catch (e) {\n var verifyFormal = a === 10;\n return e instanceof TypeError && dataPropertyAttributesAreCorrect(arguments, \"0\", 10, false, false, false) && verifyFormal;\n }\n return false;\n }(0, 1, 2))));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-296",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-296.js",
+ "description": "Object.defineProperty - 'O' is an Arguments object, 'name' is own data property of 'O', test TypeError is thrown when updating the [[Configurable]] attribute value of 'name' which is defined as non-configurable (10.6 [[DefineOwnProperty]] step 4)",
+ "test": "assertTrue(((function () {\n Object.defineProperty(arguments, \"0\", {\n value: 10,\n writable: false,\n enumerable: false,\n configurable: false\n });\n try {\n Object.defineProperty(arguments, \"0\", {\n configurable: true\n });\n } catch (e) {\n return e instanceof TypeError && dataPropertyAttributesAreCorrect(arguments, \"0\", 10, false, false, false);\n }\n return false;\n }(0, 1, 2))));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-297-1",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-297-1.js",
+ "description": "Object.defineProperty - 'O' is an Arguments object of a function that has formal parameters, 'name' is own accessor property of 'O' which is also defined in [[ParameterMap]] of 'O', test TypeError is thrown when updating the [[Get]] attribute value of 'name' which is defined as non-configurable (10.6 [[DefineOwnProperty]] step 4 and step 5a)",
+ "test": "assertTrue(((function (a, b, c) {\n function getFunc1() {\n return 10;\n }\n Object.defineProperty(arguments, \"0\", {\n get: getFunc1,\n enumerable: false,\n configurable: false\n });\n function getFunc2() {\n return 20;\n }\n try {\n Object.defineProperty(arguments, \"0\", {\n get: getFunc2\n });\n } catch (e) {\n var verifyFormal = a === 0;\n return e instanceof TypeError && accessorPropertyAttributesAreCorrect(arguments, \"0\", getFunc1, undefined, undefined, false, false) && verifyFormal;\n }\n return false;\n }(0, 1, 2))));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects() &&\n fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-297",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-297.js",
+ "description": "Object.defineProperty - 'O' is an Arguments object, 'name' is own accessor property of 'O', test TypeError is thrown when updating the [[Get]] attribute value of 'name' which is defined as non-configurable (10.6 [[DefineOwnProperty]] step 4)",
+ "test": "assertTrue(((function () {\n function getFunc1() {\n return 10;\n }\n Object.defineProperty(arguments, \"0\", {\n get: getFunc1,\n enumerable: false,\n configurable: false\n });\n function getFunc2() {\n return 20;\n }\n try {\n Object.defineProperty(arguments, \"0\", {\n get: getFunc2\n });\n } catch (e) {\n return e instanceof TypeError && accessorPropertyAttributesAreCorrect(arguments, \"0\", getFunc1, undefined, undefined, false, false);\n }\n return false;\n }(0, 1, 2))));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects() && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-298-1",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-298-1.js",
+ "description": "Object.defineProperty - 'O' is an Arguments object of a function that has formal parameters, 'name' is own accessor property of 'O' which is also defined in [[ParameterMap]] of 'O', test TypeError is thrown when updating the [[Set]] attribute value of 'name' which is defined as non-configurable (10.6 [[DefineOwnProperty]] steps 4 and 5a)",
+ "test": "assertTrue(((function (a, b, c) {\n function getFunc() {\n return 10;\n }\n Object.defineProperty(arguments, \"0\", {\n get: getFunc,\n set: undefined,\n enumerable: false,\n configurable: false\n });\n function setFunc(value) {\n this.setVerifyHelpProp = value;\n }\n try {\n Object.defineProperty(arguments, \"0\", {\n set: setFunc\n });\n } catch (e) {\n var verifyFormal = a === 0;\n return e instanceof TypeError &&\n accessorPropertyAttributesAreCorrect(arguments, \"0\", getFunc, undefined, undefined, false, false) && verifyFormal;\n }\n return false;\n }(0, 1, 2))));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects() &&\n fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-298",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-298.js",
+ "description": "Object.defineProperty - 'O' is an Arguments object, 'name' is own accessor property of 'O', test TypeError is thrown when updating the [[Set]] attribute value of 'name' which is defined as non-configurable (10.6 [[DefineOwnProperty]] step 4)",
+ "test": "assertTrue(((function () {\n function getFunc() {\n return 10;\n }\n Object.defineProperty(arguments, \"0\", {\n get: getFunc,\n set: undefined,\n enumerable: false,\n configurable: false\n });\n function setFunc(value) {\n this.setVerifyHelpProp = value;\n }\n try {\n Object.defineProperty(arguments, \"0\", {\n set: setFunc\n });\n } catch (e) {\n return e instanceof TypeError && accessorPropertyAttributesAreCorrect(arguments, \"0\", getFunc, undefined, undefined, false, false);\n }\n return false;\n }(0, 1, 2))));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects() && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-299-1",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-299-1.js",
+ "description": "Object.defineProperty - 'O' is an Arguments object of a function that has formal parameters, 'name' is own accessor property of 'O' which is also defined in [[ParameterMap]] of 'O', test TypeError is thrown when updating the [[Enumerable]] attribute value of 'name' which is defined as non-configurable (10.6 [[DefineOwnProperty]] steps 4 and 5a)",
+ "test": "assertTrue(((function (a, b, c) {\n function getFunc() {\n return 10;\n }\n Object.defineProperty(arguments, \"0\", {\n get: getFunc,\n enumerable: true,\n configurable: false\n });\n try {\n Object.defineProperty(arguments, \"0\", {\n enumerable: false\n });\n } catch (e) {\n var verifyFormal = a === 0;\n return e instanceof TypeError &&\n accessorPropertyAttributesAreCorrect(arguments, \"0\", getFunc, undefined, undefined, true, false) && verifyFormal;\n }\n return false;\n }(0, 1, 2))));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects() &&\n fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-299",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-299.js",
+ "description": "Object.defineProperty - 'O' is an Arguments object, 'name' is own accessor property of 'O', test TypeError is thrown when updating the [[Enumerable]] attribute value of 'name' which is defined as non-configurable (10.6 [[DefineOwnProperty]] step 4)",
+ "test": "assertTrue(((function () {\n function getFunc() {\n return 10;\n }\n Object.defineProperty(arguments, \"0\", {\n get: getFunc,\n enumerable: true,\n configurable: false\n });\n try {\n Object.defineProperty(arguments, \"0\", {\n enumerable: false\n });\n } catch (e) {\n return e instanceof TypeError && accessorPropertyAttributesAreCorrect(arguments, \"0\", getFunc, undefined, undefined, true, false);\n }\n return false;\n }(0, 1, 2))));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects() && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-3",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-3.js",
+ "description": "Object.defineProperty sets missing attributes to their default values (accessor)(8.12.9 step 4.b.i)",
+ "test": "assertTrue((function testcase() {\n var o = {};\n\n var getter = function () { return 1; };\n var desc = { get: getter };\n\n Object.defineProperty(o, \"foo\", desc);\n\n var propDesc = Object.getOwnPropertyDescriptor(o, \"foo\");\n\n if (typeof(propDesc.get) === \"function\" && // the getter must be the function that was provided\n propDesc.get === getter &&\n propDesc.enumerable === false && // false by default\n propDesc.configurable === false) { // false by default\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-30",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-30.js",
+ "description": "Object.defineProperty - 'name' is own accessor property without a get function (8.12.9 step 1)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n Object.defineProperty(obj, \"foo\", {\n set: function () { },\n configurable: false\n });\n\n try {\n Object.defineProperty(obj, \"foo\", {\n configurable: true\n });\n return false;\n } catch (e) {\n return e instanceof TypeError;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-300-1",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-300-1.js",
+ "description": "Object.defineProperty - 'O' is an Arguments object of a function that has formal parameters, 'name' is own accessor property of 'O' which is also defined in [[ParameterMap]] of 'O', test TypeError is thrown when updating the [[Configurable]] attribute value of 'name' which is defined as non-configurable (10.6 [[DefineOwnProperty]] step 4 and step 5a)",
+ "test": "assertTrue(((function (a, b, c) {\n function getFunc() {\n return 0;\n }\n Object.defineProperty(arguments, \"0\", {\n get: getFunc,\n enumerable: true,\n configurable: false\n });\n try {\n Object.defineProperty(arguments, \"0\", {\n configurable: true\n });\n } catch (e) {\n var verifyFormal = a === 0;\n return e instanceof TypeError &&\n accessorPropertyAttributesAreCorrect(arguments, \"0\", getFunc, undefined, undefined, true, false) && verifyFormal;\n }\n return false;\n }(0, 1, 2))));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects() &&\n fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-300",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-300.js",
+ "description": "Object.defineProperty - 'O' is an Arguments object, 'name' is own accessor property of 'O', test TypeError is thrown when updating the [[Configurable]] attribute value of 'name' which is defined as non-configurable (10.6 [[DefineOwnProperty]] step 4)",
+ "test": "assertTrue(((function () {\n function getFunc() {\n return 10;\n }\n Object.defineProperty(arguments, \"0\", {\n get: getFunc,\n enumerable: true,\n configurable: false\n });\n try {\n Object.defineProperty(arguments, \"0\", {\n configurable: true\n });\n } catch (e) {\n return e instanceof TypeError && accessorPropertyAttributesAreCorrect(arguments, \"0\", getFunc, undefined, undefined, true, false);\n }\n return false;\n }(0, 1, 2))));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects() && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-301-1",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-301-1.js",
+ "description": "Object.defineProperty - 'O' is an Arguments object of a function that has formal parameters, 'name' is an index named property of 'O', and 'desc' is data descriptor, test 'name' is defined in 'O' with all correct attribute values (10.6 [[DefineOwnProperty]] step 3)",
+ "test": "assertTrue(((function (a, b, c) {\n delete arguments[0];\n Object.defineProperty(arguments, \"0\", {\n value: 10,\n writable: false,\n enumerable: false,\n configurable: false\n });\n var verifyFormal = a === 0;\n return dataPropertyAttributesAreCorrect(arguments, \"0\", 10, false, false, false) && verifyFormal;\n }(0, 1, 2))));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-301",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-301.js",
+ "description": "Object.defineProperty - 'O' is an Arguments object, 'name' is an array index named property of 'O' but not defined in [[ParameterMap]] of 'O', and 'desc' is data descriptor, test 'name' is defined in 'O' with all correct attribute values (10.6 [[DefineOwnProperty]] step 3)",
+ "test": "assertTrue(((function () { \n delete arguments[0];\n Object.defineProperty(arguments, \"0\", {\n value: 10,\n writable: false,\n enumerable: false,\n configurable: false\n });\n return dataPropertyAttributesAreCorrect(arguments, \"0\", 10, false, false, false);\n }(0, 1, 2))));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-302-1",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-302-1.js",
+ "description": "Object.defineProperty - 'O' is an Arguments object of a function that has formal parameters, 'name' is an index named property of 'O' but not defined in [[ParameterMap]] of 'O', and 'desc' is accessor descriptor, test 'name' is defined in 'O' with all correct attribute values (10.6 [[DefineOwnProperty]] step 3 and step 5a)",
+ "test": "assertTrue(((function (a, b, c) {\n delete arguments[0];\n function getFunc() {\n return 10;\n }\n function setFunc(value) {\n this.setVerifyHelpProp = value;\n }\n Object.defineProperty(arguments, \"0\", {\n get: getFunc,\n set: setFunc,\n enumerable: false,\n configurable: false\n });\n var verifyFormal = a === 0;\n return accessorPropertyAttributesAreCorrect(arguments, \"0\", getFunc, setFunc, \"setVerifyHelpProp\", false, false) && verifyFormal;\n }(0, 1, 2))));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects() &&\n fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-302",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-302.js",
+ "description": "Object.defineProperty - 'O' is an Arguments object, 'name' is an index named property of 'O' but not defined in [[ParameterMap]] of 'O', and 'desc' is accessor descriptor, test 'name' is defined in 'O' with all correct attribute values (10.6 [[DefineOwnProperty]] step 3)",
+ "test": "assertTrue(((function () {\n delete arguments[0];\n function getFunc() {\n return 10;\n }\n function setFunc(value) {\n this.setVerifyHelpProp = value;\n }\n Object.defineProperty(arguments, \"0\", {\n get: getFunc,\n set: setFunc,\n enumerable: false,\n configurable: false\n });\n return accessorPropertyAttributesAreCorrect(arguments, \"0\", getFunc, setFunc, \"setVerifyHelpProp\", false, false);\n }(0, 1, 2))));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects() && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-303",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-303.js",
+ "description": "Object.defineProperty - 'O' is an Arguments object, 'name' is an index named accessor property of 'O' but not defined in [[ParameterMap]] of 'O', and 'desc' is accessor descriptor, test updating multiple attribute values of 'name' (10.6 [[DefineOwnProperty]] step 3)",
+ "test": "assertTrue(((function () {\n function getFunc1() {\n return 10;\n }\n Object.defineProperty(arguments, \"0\", {\n get: getFunc1,\n enumerable: true,\n configurable: true\n });\n function getFunc2() {\n return 20;\n }\n Object.defineProperty(arguments, \"0\", {\n get: getFunc2,\n enumerable: false,\n configurable: false\n });\n return accessorPropertyAttributesAreCorrect(arguments, \"0\", getFunc2, undefined, undefined, false, false);\n }())));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects() && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-304",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-304.js",
+ "description": "Object.defineProperty - 'O' is an Arguments object, 'name' is an index named data property of 'O' but not defined in [[ParameterMap]] of 'O', and 'desc' is data descriptor, test updating multiple attribute values of 'name' (10.6 [[DefineOwnProperty]] step 3)",
+ "test": "assertTrue(((function () {\n Object.defineProperty(arguments, \"0\", {\n value: 20,\n writable: false,\n enumerable: false,\n configurable: false\n });\n return dataPropertyAttributesAreCorrect(arguments, \"0\", 20, false, false, false);\n }())));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-305",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-305.js",
+ "description": "Object.defineProperty - 'O' is an Arguments object, 'name' is an index named data property of 'O' but not defined in [[ParameterMap]] of 'O', test TypeError is thrown when updating the [[Value]] attribute value of 'name' which is not writable and not configurable (10.6 [[DefineOwnProperty]] step 4)",
+ "test": "assertTrue(((function () {\n Object.defineProperty(arguments, \"0\", {\n value: 0,\n writable: false,\n configurable: false\n });\n\n try {\n Object.defineProperty(arguments, \"0\", {\n value: 10\n });\n } catch (e) {\n return e instanceof TypeError && dataPropertyAttributesAreCorrect(arguments, \"0\", 0, false, false, false);\n }\n return false;\n }())));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-306",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-306.js",
+ "description": "Object.defineProperty - 'O' is an Arguments object, 'name' is an index named data property of 'O' but not defined in [[ParameterMap]] of 'O', test TypeError is thrown when updating the [[Writable]] attribute value of 'name' which is not configurable (10.6 [[DefineOwnProperty]] step 4)",
+ "test": "assertTrue(((function () {\n Object.defineProperty(arguments, \"0\", {\n value: 0,\n writable: false,\n enumerable: false,\n configurable: false\n });\n try {\n Object.defineProperty(arguments, \"0\", {\n writable: true\n });\n } catch (e) {\n return e instanceof TypeError && dataPropertyAttributesAreCorrect(arguments, \"0\", 0, false, false, false);\n }\n return false;\n }())));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-307",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-307.js",
+ "description": "Object.defineProperty - 'O' is an Arguments object, 'name' is an index named data property of 'O' but not defined in [[ParameterMap]] of 'O', test TypeError is thrown when updating the [[Enumerable]] attribute value of 'name' which is not configurable (10.6 [[DefineOwnProperty]] step 4)",
+ "test": "assertTrue(((function () {\n Object.defineProperty(arguments, \"0\", {\n value: 0,\n writable: false,\n enumerable: true,\n configurable: false\n });\n try {\n Object.defineProperty(arguments, \"0\", {\n enumerable: false\n });\n } catch (e) {\n return e instanceof TypeError && dataPropertyAttributesAreCorrect(arguments, \"0\", 0, false, true, false);\n }\n return false;\n }())));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-308",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-308.js",
+ "description": "Object.defineProperty - 'O' is an Arguments object, 'name' is an index named data property of 'O' but not defined in [[ParameterMap]] of 'O', test TypeError is thrown when updating the [[Configurable]] attribute value of 'name' which is not configurable (10.6 [[DefineOwnProperty]] step 4)",
+ "test": "assertTrue(((function () {\n Object.defineProperty(arguments, \"0\", {\n value: 0,\n writable: false,\n enumerable: false,\n configurable: false\n });\n try {\n Object.defineProperty(arguments, \"0\", {\n configurable: true\n });\n } catch (e) {\n return e instanceof TypeError && dataPropertyAttributesAreCorrect(arguments, \"0\", 0, false, false, false);\n }\n return false;\n }())));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-309",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-309.js",
+ "description": "Object.defineProperty - 'O' is an Arguments object, 'name' is an index named accessor property of 'O' but not defined in [[ParameterMap]] of 'O', test TypeError is thrown when updating the [[Get]] attribute value of 'name' which is not configurable (10.6 [[DefineOwnProperty]] step 4)",
+ "test": "assertTrue(((function () {\n function getFunc1() {\n return 0;\n }\n Object.defineProperty(arguments, \"0\", {\n get: getFunc1,\n enumerable: false,\n configurable: false\n });\n function getFunc2() {\n return 10;\n }\n try {\n Object.defineProperty(arguments, \"0\", {\n get: getFunc2\n });\n return false;\n } catch (e) {\n return e instanceof TypeError && accessorPropertyAttributesAreCorrect(arguments, \"0\", getFunc1, undefined, undefined, false, false);\n }\n }())));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects() && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-31",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-31.js",
+ "description": "Object.defineProperty - 'name' is own accessor property without a get function that overrides an inherited accessor property(8.12.9 step 1)",
+ "test": "assertTrue((function testcase() {\n var proto = {};\n Object.defineProperty(proto, \"foo\", {\n get: function () { },\n configurable: true\n });\n\n var ConstructFun = function () { };\n ConstructFun.prototype = proto;\n var obj = new ConstructFun();\n Object.defineProperty(obj, \"foo\", {\n set: function () { },\n configurable: false\n });\n\n try {\n Object.defineProperty(obj, \"foo\", {\n configurable: true\n });\n return false;\n } catch (e) {\n return e instanceof TypeError;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-310",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-310.js",
+ "description": "Object.defineProperty - 'O' is an Arguments object, 'name' is an index named accessor property of 'O' but not defined in [[ParameterMap]] of 'O', test TypeError is thrown when updating the [[Set]] attribute value of 'name' which is not configurable (10.6 [[DefineOwnProperty]] step 4)",
+ "test": "assertTrue(((function () {\n function getFunc() {\n return 0;\n }\n Object.defineProperty(arguments, \"0\", {\n get: getFunc,\n set: undefined,\n enumerable: false,\n configurable: false\n });\n function setFunc(value) {\n this.setVerifyHelpProp = value;\n }\n try {\n Object.defineProperty(arguments, \"0\", {\n set: setFunc\n }); \n } catch (e) {\n return e instanceof TypeError && accessorPropertyAttributesAreCorrect(arguments, \"0\", getFunc, undefined, undefined, false, false);\n }\n return false;\n }())));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects() && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-311",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-311.js",
+ "description": "Object.defineProperty - 'O' is an Arguments object, 'name' is an index named accessor property of 'O' but not defined in [[ParameterMap]] of 'O', test TypeError is thrown when updating the [[Enumerable]] attribute value of 'name' which is not configurable (10.6 [[DefineOwnProperty]] step 4)",
+ "test": "assertTrue(((function () {\n function getFunc() {\n return 0;\n }\n Object.defineProperty(arguments, \"0\", {\n get: getFunc,\n enumerable: true,\n configurable: false\n });\n try {\n Object.defineProperty(arguments, \"0\", {\n enumerable: false\n });\n } catch (e) {\n return e instanceof TypeError && accessorPropertyAttributesAreCorrect(arguments, \"0\", getFunc, undefined, undefined, true, false);\n }\n return false;\n }())));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects() && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-312",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-312.js",
+ "description": "Object.defineProperty - 'O' is an Arguments object, 'name' is an index named accessor property of 'O' but not defined in [[ParameterMap]] of 'O', test TypeError is thrown when updating the [[Configurable]] attribute value of 'name' which is not configurable (10.6 [[DefineOwnProperty]] step 4)",
+ "test": "assertTrue(((function () {\n function getFunc() {\n return 0;\n }\n Object.defineProperty(arguments, \"0\", {\n get: getFunc,\n enumerable: true,\n configurable: false\n });\n try {\n Object.defineProperty(arguments, \"0\", {\n configurable: true\n });\n } catch (e) {\n return e instanceof TypeError && accessorPropertyAttributesAreCorrect(arguments, \"0\", getFunc, undefined, undefined, true, false);\n }\n return false;\n }())));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects() && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-313-1",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-313-1.js",
+ "description": "Object.defineProperty - 'O' is an Arguments object of a function that has formal parameters, 'P' is own property, and 'desc' is data descriptor, test 'P' is defined in 'O' with all correct attribute values (10.6 [[DefineOwnProperty]] step 3)",
+ "test": "assertTrue(((function (a, b, c) {\n Object.defineProperty(arguments, \"genericProperty\", {\n value: 1001,\n writable: true,\n enumerable: true,\n configurable: true\n });\n return dataPropertyAttributesAreCorrect(arguments, \"genericProperty\", 1001, true, true, true);\n }(1, 2, 3))));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-313",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-313.js",
+ "description": "Object.defineProperty - 'O' is an Arguments object, 'P' is generic property, and 'desc' is data descriptor, test 'P' is defined in 'O' with all correct attribute values (10.6 [[DefineOwnProperty]] step 3)",
+ "test": "assertTrue(((function () {\n Object.defineProperty(arguments, \"genericProperty\", {\n value: 1001,\n writable: true,\n enumerable: true,\n configurable: true\n });\n return dataPropertyAttributesAreCorrect(arguments, \"genericProperty\", 1001, true, true, true);\n }(1, 2, 3))));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-314-1",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-314-1.js",
+ "description": "Object.defineProperty - 'O' is an Arguments object of a function that has formal parameters, 'P' is property, and 'desc' is accessor descriptor, test 'P' is defined in 'O' with all correct attribute values (10.6 [[DefineOwnProperty]] step 3)",
+ "test": "assertTrue(((function (a, b, c) {\n function getFunc() {\n return \"getFunctionString\";\n }\n function setFunc(value) {\n this.testgetFunction = value;\n }\n Object.defineProperty(arguments, \"genericProperty\", {\n get: getFunc,\n set: setFunc,\n enumerable: true,\n configurable: true\n });\n return accessorPropertyAttributesAreCorrect(arguments, \"genericProperty\", getFunc, setFunc, \"testgetFunction\", true, true);\n }(1, 2, 3))));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-314",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-314.js",
+ "description": "Object.defineProperty - 'O' is an Arguments object, 'P' is generic property, and 'desc' is accessor descriptor, test 'P' is defined in 'O' with all correct attribute values (10.6 [[DefineOwnProperty]] step 3)",
+ "test": "assertTrue(((function () {\n function getFunc() {\n return \"getFunctionString\";\n }\n function setFunc(value) {\n this.testgetFunction = value;\n }\n Object.defineProperty(arguments, \"genericProperty\", {\n get: getFunc,\n set: setFunc,\n enumerable: true,\n configurable: true\n });\n return accessorPropertyAttributesAreCorrect(arguments, \"genericProperty\", getFunc, setFunc, \"testgetFunction\", true, true);\n }(1, 2, 3))));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-315-1",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-315-1.js",
+ "description": "Object.defineProperty - 'O' is an Arguments object of a function that has formal parameters, 'P' is own accessor property of 'O', and 'desc' is accessor descriptor, test updating multiple attribute values of 'P' (10.6 [[DefineOwnProperty]] step 3)",
+ "test": "assertTrue(((function (a, b, c) {\n Object.defineProperty(arguments, \"genericProperty\", {\n get: function () {\n return 1001;\n },\n set: function (value) {\n this.testgetFunction1 = value;\n },\n enumerable: true,\n configurable: true\n });\n function getFunc() {\n return \"getFunctionString\";\n }\n function setFunc(value) {\n this.testgetFunction = value;\n }\n Object.defineProperty(arguments, \"genericProperty\", {\n get: getFunc,\n set: setFunc,\n enumerable: false,\n configurable: false\n });\n var verifyFormal = c === 3;\n return accessorPropertyAttributesAreCorrect(arguments, \"genericProperty\", getFunc, setFunc, \"testgetFunction\", false, false) && verifyFormal;\n }(1, 2, 3))));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-315",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-315.js",
+ "description": "Object.defineProperty - 'O' is an Arguments object, 'P' is generic own accessor property of 'O', and 'desc' is accessor descriptor, test updating multiple attribute values of 'P' (10.6 [[DefineOwnProperty]] step 3)",
+ "test": "assertTrue(((function () {\n Object.defineProperty(arguments, \"genericProperty\", {\n get: function () {\n return 1001;\n },\n set: function (value) {\n this.testgetFunction1 = value;\n },\n enumerable: true,\n configurable: true\n });\n function getFunc() {\n return \"getFunctionString\";\n }\n function setFunc(value) {\n this.testgetFunction = value;\n }\n Object.defineProperty(arguments, \"genericProperty\", {\n get: getFunc,\n set: setFunc,\n enumerable: false,\n configurable: false\n });\n return accessorPropertyAttributesAreCorrect(arguments, \"genericProperty\", getFunc, setFunc, \"testgetFunction\", false, false);\n }(1, 2, 3))));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-316-1",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-316-1.js",
+ "description": "Object.defineProperty - 'O' is an Arguments object of a function that has formal parameters, 'P' is own data property of 'O', and 'desc' is data descriptor, test updating multiple attribute values of 'P' (10.6 [[DefineOwnProperty]] step 3)",
+ "test": "assertTrue(((function (a, b, c) {\n Object.defineProperty(arguments, \"genericProperty\", {\n value: 1001,\n writable: true,\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(arguments, \"genericProperty\", {\n value: 1002,\n enumerable: false,\n configurable: false\n });\n return dataPropertyAttributesAreCorrect(arguments, \"genericProperty\", 1002, true, false, false);\n }(1, 2, 3))));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-316",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-316.js",
+ "description": "Object.defineProperty - 'O' is an Arguments object, 'P' is generic own data property of 'O', and 'desc' is data descriptor, test updating multiple attribute values of 'P' (10.6 [[DefineOwnProperty]] step 3)",
+ "test": "assertTrue(((function () {\n Object.defineProperty(arguments, \"genericProperty\", {\n value: 1001,\n writable: true,\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(arguments, \"genericProperty\", {\n value: 1002,\n enumerable: false,\n configurable: false\n });\n return dataPropertyAttributesAreCorrect(arguments, \"genericProperty\", 1002, true, false, false);\n }(1, 2, 3))));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-317-1",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-317-1.js",
+ "description": "Object.defineProperty - 'O' is an Arguments object of a function that has formal parameters, 'P' is own data property of 'O', test TypeError is thrown when updating the [[Value]] attribute value of 'P' which is not writable and not configurable (10.6 [[DefineOwnProperty]] step 4)",
+ "test": "assertTrue(((function (a, b, c) {\n Object.defineProperty(arguments, \"genericProperty\", {\n value: 1001,\n writable: false,\n configurable: false\n });\n try {\n Object.defineProperty(arguments, \"genericProperty\", {\n value: 1002\n });\n } catch (e) {\n var verifyFormal = b === 2;\n return e instanceof TypeError &&\n dataPropertyAttributesAreCorrect(arguments, \"genericProperty\", 1001, false, false, false) && verifyFormal;\n }\n return false;\n }(1, 2, 3))));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-317",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-317.js",
+ "description": "Object.defineProperty - 'O' is an Arguments object, 'P' is generic own data property of 'O', test TypeError is thrown when updating the [[Value]] attribute value of 'P' which is not writable and not configurable (10.6 [[DefineOwnProperty]] step 4)",
+ "test": "assertTrue(((function () {\n Object.defineProperty(arguments, \"genericProperty\", {\n value: 1001,\n writable: false,\n configurable: false\n });\n try {\n Object.defineProperty(arguments, \"genericProperty\", {\n value: 1002\n });\n } catch (e) {\n return e instanceof TypeError &&\n dataPropertyAttributesAreCorrect(arguments, \"genericProperty\", 1001, false, false, false);\n }\n return false;\n }(1, 2, 3))));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-318-1",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-318-1.js",
+ "description": "Object.defineProperty - 'O' is an Arguments object of a function that has formal parameters, 'name' is own data property of 'O', test TypeError is thrown when updating the [[Writable]] attribute value of 'name' which is not configurable (10.6 [[DefineOwnProperty]] step 4)",
+ "test": "assertTrue(((function (a, b, c) {\n Object.defineProperty(arguments, \"genericProperty\", {\n writable: false,\n configurable: false\n });\n try {\n Object.defineProperty(arguments, \"genericProperty\", {\n writable: true\n });\n } catch (e) {\n return e instanceof TypeError &&\n dataPropertyAttributesAreCorrect(arguments, \"genericProperty\", undefined, false, false, false);\n }\n return false;\n }(1, 2, 3))));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-318",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-318.js",
+ "description": "Object.defineProperty - 'O' is an Arguments object, 'name' is generic own data property of 'O', test TypeError is thrown when updating the [[Writable]] attribute value of 'name' which is not configurable (10.6 [[DefineOwnProperty]] step 4)",
+ "test": "assertTrue(((function () {\n Object.defineProperty(arguments, \"genericProperty\", {\n writable: false,\n configurable: false\n });\n try {\n Object.defineProperty(arguments, \"genericProperty\", {\n writable: true\n });\n } catch (e) {\n return e instanceof TypeError &&\n dataPropertyAttributesAreCorrect(arguments, \"genericProperty\", undefined, false, false, false);\n }\n return false;\n }(1, 2, 3))));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-319-1",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-319-1.js",
+ "description": "Object.defineProperty - 'O' is an Arguments object of a function that has formal parameters, 'P' is own data property of 'O', test TypeError is thrown when updating the [[Enumerable]] attribute value of 'P' which is not configurable (10.6 [[DefineOwnProperty]] step 4)",
+ "test": "assertTrue(((function (a, b, c) {\n Object.defineProperty(arguments, \"genericProperty\", {\n enumerable: true,\n configurable: false\n });\n try {\n Object.defineProperty(arguments, \"genericProperty\", {\n enumerable: false\n });\n } catch (e) {\n return e instanceof TypeError &&\n dataPropertyAttributesAreCorrect(arguments, \"genericProperty\", undefined, false, true, false);\n }\n return false;\n }(1, 2, 3))));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-319",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-319.js",
+ "description": "Object.defineProperty - 'O' is an Arguments object, 'P' is own data property of 'O', test TypeError is thrown when updating the [[Enumerable]] attribute value of 'P' which is not configurable (10.6 [[DefineOwnProperty]] step 4)",
+ "test": "assertTrue(((function () {\n Object.defineProperty(arguments, \"genericProperty\", {\n enumerable: true,\n configurable: false\n });\n try {\n Object.defineProperty(arguments, \"genericProperty\", {\n enumerable: false\n });\n } catch (e) {\n return e instanceof TypeError &&\n dataPropertyAttributesAreCorrect(arguments, \"genericProperty\", undefined, false, true, false);\n }\n return false;\n }(1, 2, 3))));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-32",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-32.js",
+ "description": "Object.defineProperty - 'name' is an inherited accessor property without a get function (8.12.9 step 1)",
+ "test": "assertTrue((function testcase() {\n var proto = {};\n Object.defineProperty(proto, \"foo\", {\n set: function () { },\n configurable: false\n });\n\n var ConstructFun = function () { };\n ConstructFun.prototype = proto;\n var obj = new ConstructFun();\n\n Object.defineProperty(obj, \"foo\", {\n configurable: true\n });\n return obj.hasOwnProperty(\"foo\") && typeof obj.foo === \"undefined\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-320-1",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-320-1.js",
+ "description": "Object.defineProperty - 'O' is an Arguments object of a function that has formal parameters, 'P' is own data property of 'O', test TypeError is thrown when updating the [[Configurable]] attribute value of 'P' which is not configurable (10.6 [[DefineOwnProperty]] step 4)",
+ "test": "assertTrue(((function (a, b, c) {\n Object.defineProperty(arguments, \"genericProperty\", {\n configurable: false\n });\n try {\n Object.defineProperty(arguments, \"genericProperty\", {\n configurable: true\n });\n } catch (e) {\n return e instanceof TypeError &&\n dataPropertyAttributesAreCorrect(arguments, \"genericProperty\", undefined, false, false, false);\n }\n return false;\n }(1, 2, 3))));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-320",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-320.js",
+ "description": "Object.defineProperty - 'O' is an Arguments object, 'P' is own data property of 'O', test TypeError is thrown when updating the [[Configurable]] attribute value of 'P' which is not configurable (10.6 [[DefineOwnProperty]] step 4)",
+ "test": "assertTrue(((function () {\n Object.defineProperty(arguments, \"genericProperty\", {\n configurable: false\n });\n try {\n Object.defineProperty(arguments, \"genericProperty\", {\n configurable: true\n });\n } catch (e) {\n return e instanceof TypeError &&\n dataPropertyAttributesAreCorrect(arguments, \"genericProperty\", undefined, false, false, false);\n }\n return false;\n }(1, 2, 3))));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-321-1",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-321-1.js",
+ "description": "Object.defineProperty - 'O' is an Arguments object of a function that has formal parameters, 'P' is own accessor property of 'O', test TypeError is thrown when updating the [[Get]] attribute value of 'P' which is not configurable (10.6 [[DefineOwnProperty]] step 4)",
+ "test": "assertTrue(((function (a, b, c) {\n function getFunc() {\n return \"genericPropertyString\";\n }\n function setFunc(value) {\n this.helpVerifyGet = value;\n }\n Object.defineProperty(arguments, \"genericProperty\", {\n get: getFunc,\n set: setFunc,\n configurable: false\n });\n try {\n Object.defineProperty(arguments, \"genericProperty\", {\n get: function () {\n return \"overideGenericPropertyString\";\n }\n });\n } catch (e) {\n var verifyFormal = a === 1;\n return e instanceof TypeError &&\n accessorPropertyAttributesAreCorrect(arguments, \"genericProperty\", getFunc, setFunc, \"helpVerifyGet\", false, false, false) && verifyFormal;\n }\n return false;\n }(1, 2, 3))));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-321",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-321.js",
+ "description": "Object.defineProperty - 'O' is an Arguments object, 'P' is own accessor property of 'O', test TypeError is thrown when updating the [[Get]] attribute value of 'P' which is not configurable (10.6 [[DefineOwnProperty]] step 4)",
+ "test": "assertTrue(((function () {\n function getFunc() {\n return \"genericPropertyString\";\n }\n function setFunc(value) {\n this.helpVerifyGet = value;\n }\n Object.defineProperty(arguments, \"genericProperty\", {\n get: getFunc,\n set: setFunc,\n configurable: false\n });\n try {\n Object.defineProperty(arguments, \"genericProperty\", {\n get: function () {\n return \"overideGenericPropertyString\";\n }\n });\n } catch (e) {\n return e instanceof TypeError &&\n accessorPropertyAttributesAreCorrect(arguments, \"genericProperty\", getFunc, setFunc, \"helpVerifyGet\", false, false, false);\n }\n return false;\n }(1, 2, 3))));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-322-1",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-322-1.js",
+ "description": "Object.defineProperty - 'O' is an Arguments object of a function that has formal parameters, 'P' is own accessor property of 'O', test TypeError is thrown when updating the [[Set]] attribute value of 'P' which is not configurable (10.6 [[DefineOwnProperty]] step 4)",
+ "test": "assertTrue(((function (a, b, c) {\n function setFunc(value) {\n this.genericPropertyString = value;\n }\n Object.defineProperty(arguments, \"genericProperty\", {\n set: setFunc,\n configurable: false\n });\n try {\n Object.defineProperty(arguments, \"genericProperty\", {\n set: function (value) {\n this.genericPropertyString1 = value;\n }\n });\n } catch (e) {\n return e instanceof TypeError &&\n accessorPropertyAttributesAreCorrect(arguments, \"genericProperty\", undefined, setFunc, \"genericPropertyString\", false, false, false);\n }\n return false;\n }(1, 2, 3))));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-322",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-322.js",
+ "description": "Object.defineProperty - 'O' is an Arguments object, 'P' is own accessor property of 'O', test TypeError is thrown when updating the [[Set]] attribute value of 'P' which is not configurable (10.6 [[DefineOwnProperty]] step 4)",
+ "test": "assertTrue(((function () {\n function setFunc(value) {\n this.genericPropertyString = value;\n }\n Object.defineProperty(arguments, \"genericProperty\", {\n set: setFunc,\n configurable: false\n });\n try {\n Object.defineProperty(arguments, \"genericProperty\", {\n set: function (value) {\n this.genericPropertyString1 = value;\n }\n });\n } catch (e) {\n return e instanceof TypeError &&\n accessorPropertyAttributesAreCorrect(arguments, \"genericProperty\", undefined, setFunc, \"genericPropertyString\", false, false, false);\n }\n return false;\n }(1, 2, 3))));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-323-1",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-323-1.js",
+ "description": "Object.defineProperty - ''O' is an Arguments object of a function that has formal parameters, 'P' is own accessor property of 'O', test TypeError is thrown when updating the [[Enumerable]] attribute value of 'P' which is not configurable (10.6 [[DefineOwnProperty]] step 4)",
+ "test": "assertTrue(((function (a, b, c) {\n function setFunc(value) {\n this.genericPropertyString = value;\n }\n Object.defineProperty(arguments, \"genericProperty\", {\n set: setFunc,\n enumerable: true,\n configurable: false\n });\n try {\n Object.defineProperty(arguments, \"genericProperty\", {\n enumerable: false\n });\n } catch (e) {\n verifyFormal = c === 3;\n return e instanceof TypeError &&\n accessorPropertyAttributesAreCorrect(arguments, \"genericProperty\", undefined, setFunc, \"genericPropertyString\", true, false) && verifyFormal;\n }\n return false;\n }(1, 2, 3))));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-323",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-323.js",
+ "description": "Object.defineProperty - ''O' is an Arguments object, 'P' is own accessor property of 'O', test TypeError is thrown when updating the [[Enumerable]] attribute value of 'P' which is not configurable (10.6 [[DefineOwnProperty]] step 4)",
+ "test": "assertTrue(((function () {\n function setFunc(value) {\n this.genericPropertyString = value;\n }\n Object.defineProperty(arguments, \"genericProperty\", {\n set: setFunc,\n enumerable: true,\n configurable: false\n });\n try {\n Object.defineProperty(arguments, \"genericProperty\", {\n enumerable: false\n });\n } catch (e) {\n return e instanceof TypeError &&\n accessorPropertyAttributesAreCorrect(arguments, \"genericProperty\", undefined, setFunc, \"genericPropertyString\", true, false);\n }\n return false;\n }(1, 2, 3))));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-324-1",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-324-1.js",
+ "description": "Object.defineProperty - 'O' is an Arguments object of a function that has formal parameters, 'P' is own accessor property of 'O', test TypeError is thrown when updating the [[Configurable]] attribute value of 'P' which is not configurable (10.6 [[DefineOwnProperty]] step 4)",
+ "test": "assertTrue(((function (a, b, c) {\n function setFunc(value) {\n this.genericPropertyString = value;\n }\n Object.defineProperty(arguments, \"genericProperty\", {\n set: setFunc,\n configurable: false\n });\n try {\n Object.defineProperty(arguments, \"genericProperty\", {\n configurable: true\n });\n } catch (e) {\n return e instanceof TypeError &&\n accessorPropertyAttributesAreCorrect(arguments, \"genericProperty\", undefined, setFunc, \"genericPropertyString\", false, false, false);\n }\n return false;\n }(1, 2, 3))));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-324",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-324.js",
+ "description": "Object.defineProperty - 'O' is an Arguments object, 'P' is own accessor property of 'O', test TypeError is thrown when updating the [[Configurable]] attribute value of 'P' which is not configurable (10.6 [[DefineOwnProperty]] step 4)",
+ "test": "assertTrue(((function () {\n function setFunc(value) {\n this.genericPropertyString = value;\n }\n Object.defineProperty(arguments, \"genericProperty\", {\n set: setFunc,\n configurable: false\n });\n try {\n Object.defineProperty(arguments, \"genericProperty\", {\n configurable: true\n });\n } catch (e) {\n return e instanceof TypeError &&\n accessorPropertyAttributesAreCorrect(arguments, \"genericProperty\", undefined, setFunc, \"genericPropertyString\", false, false, false);\n }\n return false;\n }(1, 2, 3))));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-325-1",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-325-1.js",
+ "description": "Object.defineProperty - 'O' is an Arguments object which created with function take formal parameters, 'name' is own property of [[ParameterMap]] of 'O', test 'name' is deleted if 'name' is configurable and 'desc' is accessor descriptor (10.6 [[DefineOwnProperty]] step 5.a.i)",
+ "test": "assertTrue((function testcase() {\n var argObj = (function (a, b, c) { return arguments; })(1, 2, 3);\n var accessed = false;\n\n Object.defineProperty(argObj, 0, {\n get: function () {\n accessed = true;\n return 12;\n }\n });\n\n return argObj[0] === 12 && accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects())"
+ },
+ {
+ "id": "15.2.3.6-4-325",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-325.js",
+ "description": "Object.defineProperty - 'O' is an Arguments object, 'name' is own property of [[ParameterMap]] of 'O', test 'name' is deleted if 'name' is configurable and 'desc' is accessor descriptor (10.6 [[DefineOwnProperty]] step 5.a.i)",
+ "test": "assertTrue((function testcase() {\n var argObj = (function () { return arguments; })(1, 2, 3);\n var accessed = false;\n\n Object.defineProperty(argObj, 0, {\n get: function () {\n accessed = true;\n return 12;\n }\n });\n\n return argObj[0] === 12 && accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects())"
+ },
+ {
+ "id": "15.2.3.6-4-326",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-326.js",
+ "description": "ES5 Attributes - property ([[Writable]] is true, [[Enumerable]] is true, [[Configurable]] is true) is writable",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n Object.defineProperty(obj, \"prop\", {\n value: 2010,\n writable: true,\n enumerable: true,\n configurable: true\n });\n var propertyDefineCorrect = (obj.prop === 2010);\n obj.prop = 1001;\n\n return propertyDefineCorrect && obj.prop === 1001;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-327",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-327.js",
+ "description": "ES5 Attributes - property ([[Writable]] is true, [[Enumerable]] is true, [[Configurable]] is true) is enumerable",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n Object.defineProperty(obj, \"prop\", {\n value: 2010,\n writable: true,\n enumerable: true,\n configurable: true\n });\n var propertyDefineCorrect = obj.hasOwnProperty(\"prop\");\n var desc = Object.getOwnPropertyDescriptor(obj, \"prop\");\n for (var property in obj) {\n if (property === \"prop\") {\n return propertyDefineCorrect && desc.enumerable === true;\n }\n }\n return false;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-328",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-328.js",
+ "description": "ES5 Attributes - property ([[Writable]] is true, [[Enumerable]] is true, [[Configurable]] is true) is deletable",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n Object.defineProperty(obj, \"prop\", {\n value: 2010,\n writable: true,\n enumerable: true,\n configurable: true\n });\n var beforeDelete = obj.hasOwnProperty(\"prop\");\n delete obj.prop;\n var afterDelete = obj.hasOwnProperty(\"prop\");\n return beforeDelete && !afterDelete;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-329",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-329.js",
+ "description": "ES5 Attributes - success to update [[Writable]] attribute of data property ([[Writable]] is true, [[Enumerable]] is true, [[Configurable]] is true) to different value",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n Object.defineProperty(obj, \"prop\", {\n value: 2010,\n writable: true,\n enumerable: true,\n configurable: true\n });\n var propertyDefineCorrect = obj.hasOwnProperty(\"prop\");\n var desc1 = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n Object.defineProperty(obj, \"prop\", {\n writable: false\n });\n var desc2 = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n return propertyDefineCorrect && desc1.writable === true && obj.prop === 2010 && desc2.writable === false;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-33",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-33.js",
+ "description": "Object.defineProperty - 'O' is a Function object that uses Object's [[GetOwnProperty]] method to access the 'name' property (8.12.9 step 1)",
+ "test": "assertTrue((function testcase() {\n var fun = function () { };\n\n Object.defineProperty(fun, \"foo\", {\n value: 12,\n configurable: false\n });\n\n try {\n Object.defineProperty(fun, \"foo\", {\n value: 11,\n configurable: true\n });\n return false;\n } catch (e) {\n return e instanceof TypeError && fun.foo === 12;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-330",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-330.js",
+ "description": "ES5 Attributes - success to update [[enumerable]] attribute of data property ([[Writable]] is true, [[Enumerable]] is true, [[Configurable]] is true) to different value",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n Object.defineProperty(obj, \"prop\", {\n value: 2010,\n writable: true,\n enumerable: true,\n configurable: true\n });\n var propertyDefineCorrect = obj.hasOwnProperty(\"prop\");\n var desc1 = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n Object.defineProperty(obj, \"prop\", {\n enumerable: false\n });\n var desc2 = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n return propertyDefineCorrect && desc1.enumerable === true && obj.prop === 2010 && desc2.enumerable === false;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-331",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-331.js",
+ "description": "ES5 Attributes - success to update [[Configurable]] attribute of data property ([[Writable]] is true, [[Enumerable]] is true, [[Configurable]] is true) to different value",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n Object.defineProperty(obj, \"prop\", {\n value: 2010,\n writable: true,\n enumerable: true,\n configurable: true\n });\n var propertyDefineCorrect = obj.hasOwnProperty(\"prop\");\n var desc1 = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n Object.defineProperty(obj, \"prop\", {\n configurable: false\n });\n var desc2 = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n return propertyDefineCorrect && desc1.configurable === true && obj.prop === 2010 && desc2.configurable === false;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-332",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-332.js",
+ "description": "ES5 Attributes - success to update the data property ([[Writable]] is true, [[Enumerable]] is true, [[Configurable]] is true) to an accessor property",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n Object.defineProperty(obj, \"prop\", {\n value: 2010,\n writable: true,\n enumerable: true,\n configurable: true\n });\n var desc1 = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n function getFunc() {\n return 20;\n }\n Object.defineProperty(obj, \"prop\", {\n get: getFunc\n });\n var desc2 = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n return desc1.hasOwnProperty(\"value\") && desc2.get === getFunc;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-333-1",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-333-1.js",
+ "description": "Object.defineProperty will update [[Value]] attribute of named property 'P' successfully when [[Configurable]] attribute is false, [[Writable]] attribute is true and 'O' is an Object object (8.12.9 - step 10)",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n\n Object.defineProperty(obj, \"property\", {\n value: 1001,\n writable: true,\n configurable: false\n });\n\n Object.defineProperty(obj, \"property\", {\n value: 1002\n });\n\n return dataPropertyAttributesAreCorrect(obj, \"property\", 1002, true, false, false);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-333-10",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-333-10.js",
+ "description": "ES5 Attributes - indexed data property 'P' with attributes [[Writable]]: true, [[Enumerable]]: true, [[Configurable]]: false is writable using simple assignment, 'O' is an Arguments object",
+ "test": "assertTrue((function testcase() {\n var obj = (function () {\n return arguments;\n }());\n\n Object.defineProperty(obj, \"0\", {\n value: 2010,\n writable: true,\n enumerable: true,\n configurable: false\n });\n var verifyValue = (obj[0] === 2010);\n obj[0] = 1001;\n\n return verifyValue && obj[0] === 1001;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-333-11",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-333-11.js",
+ "description": "ES5 Attributes - indexed property 'P' with attributes [[Writable]]: true, [[Enumerable]]: true, [[Configurable]]: false is writable using simple assignment, 'O' is an Arguments object",
+ "test": "assertTrue((function testcase() {\n var obj = (function (x) {\n return arguments;\n }(1001));\n\n Object.defineProperty(obj, \"0\", {\n value: 2010,\n writable: true,\n enumerable: true,\n configurable: false\n });\n var verifyValue = (obj[0] === 2010);\n\n return verifyValue;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-333-2",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-333-2.js",
+ "description": "Object.defineProperty will update [[Value]] attribute of indexed property 'P' successfully when [[Configurable]] attribute is false, [[Writable]] attribute is true and 'A' is an Array object (8.12.9 - step 10)",
+ "test": "assertTrue((function testcase() {\n\n var obj = [];\n\n Object.defineProperty(obj, \"0\", {\n value: 1001,\n writable: true,\n configurable: false\n });\n\n Object.defineProperty(obj, \"0\", {\n value: 1002\n });\n\n return dataPropertyAttributesAreCorrect(obj, \"0\", 1002, true, false, false);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-333-3",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-333-3.js",
+ "description": "Object.defineProperty will update [[Value]] attribute of named property 'P' successfully when [[Configurable]] attribute is false, [[Writable]] attribute is true and 'O' is an Arguments object (8.12.9 - step 10)",
+ "test": "assertTrue((function testcase() {\n\n var obj = (function () {\n return arguments;\n }());\n\n Object.defineProperty(obj, \"property\", {\n value: 1001,\n writable: true,\n configurable: false\n });\n\n Object.defineProperty(obj, \"property\", {\n value: 1002\n });\n\n return dataPropertyAttributesAreCorrect(obj, \"property\", 1002, true, false, false);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-333-4",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-333-4.js",
+ "description": "Indexed property 'P' with attributes [[Writable]]: true, [[Enumerable]]:true, [[Configurable]]:false is writable using simple assignment, 'A' is an Array Object",
+ "test": "assertTrue((function testcase() {\n var obj = [];\n\n Object.defineProperty(obj, \"0\", {\n value: 2010,\n writable: true,\n enumerable: true,\n configurable: false\n });\n var verifyValue = (obj[0] === 2010);\n obj[0] = 1001;\n\n return verifyValue && obj[0] === 1001;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-333-5",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-333-5.js",
+ "description": "ES5 Attributes - named data property 'P' with attributes [[Writable]]: true, [[Enumerable]]: true, [[Configurable]]: false is writable using simple assignment, 'O' is an Arguments object",
+ "test": "assertTrue((function testcase() {\n var obj = (function () {\n return arguments;\n }());\n\n Object.defineProperty(obj, \"prop\", {\n value: 2010,\n writable: true,\n enumerable: true,\n configurable: false\n });\n var verifyValue = (obj.prop === 2010);\n obj.prop = 1001;\n\n return verifyValue && obj.prop === 1001;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-333-6",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-333-6.js",
+ "description": "Object.defineProperty will update [[Value]] attribute of indexed property 'P' successfully when [[Configurable]] attribute is false, [[Writable]] attribute is true and 'O' is an Object object (8.12.9 - step 10)",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n\n Object.defineProperty(obj, \"0\", {\n value: 1001,\n writable: true,\n configurable: false\n });\n\n Object.defineProperty(obj, \"0\", {\n value: 1002\n });\n\n return dataPropertyAttributesAreCorrect(obj, \"0\", 1002, true, false, false);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-333-7",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-333-7.js",
+ "description": "Object.defineProperty will update [[Value]] attribute of named property 'P' successfully when [[Configurable]] attribute is false, [[Writable]] attribute is true and 'A' is an Array object (8.12.9 - step 10)",
+ "test": "assertTrue((function testcase() {\n\n var obj = [];\n\n Object.defineProperty(obj, \"prop\", {\n value: 1001,\n writable: true,\n configurable: false\n });\n\n Object.defineProperty(obj, \"prop\", {\n value: 1002\n });\n\n return dataPropertyAttributesAreCorrect(obj, \"prop\", 1002, true, false, false);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-333-8",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-333-8.js",
+ "description": "Object.defineProperty will update [[Value]] attribute of indexed property 'P'successfully when [[Configurable]] attribute is false, [[Writable]] attribute is true and 'O' is an Arguments object (8.12.9 - step 10)",
+ "test": "assertTrue((function testcase() {\n\n var obj = (function () {\n return arguments;\n }());\n\n Object.defineProperty(obj, \"0\", {\n value: 1001,\n writable: true,\n configurable: false\n });\n\n Object.defineProperty(obj, \"0\", {\n value: 1002\n });\n\n return dataPropertyAttributesAreCorrect(obj, \"0\", 1002, true, false, false);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-333-9",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-333-9.js",
+ "description": "Object.defineProperty - Named property 'P' with attributes [[Writable]]: true, [[Enumerable]]:true, [[Configurable]]:false is writable using simple assignment, 'A' is an Array Object",
+ "test": "assertTrue((function testcase() {\n var obj = [];\n\n Object.defineProperty(obj, \"prop\", {\n value: 2010,\n writable: true,\n enumerable: true,\n configurable: false\n });\n var verifyValue = (obj.prop === 2010);\n obj.prop = 1001;\n\n return verifyValue && obj.prop === 1001;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-333",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-333.js",
+ "description": "ES5 Attributes - property ([[Writable]] is true, [[Enumerable]] is true, [[Configurable]] is false) is writable",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n Object.defineProperty(obj, \"prop\", {\n value: 2010,\n writable: true,\n enumerable: true,\n configurable: false\n });\n var propertyDefineCorrect = (obj.prop === 2010);\n obj.prop = 1001;\n\n return propertyDefineCorrect && obj.prop === 1001;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-334",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-334.js",
+ "description": "ES5 Attributes - property ([[Writable]] is true, [[Enumerable]] is true, [[Configurable]] is false) is enumerable",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n Object.defineProperty(obj, \"prop\", {\n value: 2010,\n writable: true,\n enumerable: true,\n configurable: false\n });\n var propertyDefineCorrect = obj.hasOwnProperty(\"prop\");\n var desc = Object.getOwnPropertyDescriptor(obj, \"prop\");\n for (var p in obj) {\n if (p === \"prop\") {\n return propertyDefineCorrect && desc.enumerable === true;\n }\n }\n return false;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-335",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-335.js",
+ "description": "ES5 Attributes - property ([[Writable]] is true, [[Enumerable]] is true, [[Configurable]] is false) is undeletable",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n Object.defineProperty(obj, \"prop\", {\n value: 2010,\n writable: true,\n enumerable: true,\n configurable: false\n });\n var beforeDelete = obj.hasOwnProperty(\"prop\");\n delete obj.prop;\n var afterDelete = obj.hasOwnProperty(\"prop\");\n return beforeDelete && obj.prop === 2010 && afterDelete;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-336",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-336.js",
+ "description": "ES5 Attributes - Success to update [[Writable]] attribute of data property ([[Writable]] is true, [[Enumerable]] is true, [[Configurable]] is false) to different value",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n Object.defineProperty(obj, \"prop\", {\n value: 2010,\n writable: true,\n enumerable: true,\n configurable: false\n });\n var propertyDefineCorrect = obj.hasOwnProperty(\"prop\");\n var desc1 = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n Object.defineProperty(obj, \"prop\", {\n writable: false\n });\n var desc2 = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n return propertyDefineCorrect && desc1.writable === true && obj.prop === 2010 && desc2.writable === false;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-337",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-337.js",
+ "description": "ES5 Attributes - fail to update [[Enumerable]] attribute of data property ([[Writable]] is true, [[Enumerable]] is true, [[Configurable]] is false) to different value",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n Object.defineProperty(obj, \"prop\", {\n value: 2010,\n writable: true,\n enumerable: true,\n configurable: false\n });\n\n var propertyDefineCorrect = obj.hasOwnProperty(\"prop\");\n var desc1 = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n try {\n Object.defineProperty(obj, \"prop\", {\n enumerable: false\n });\n return false;\n } catch (e) {\n var desc2 = Object.getOwnPropertyDescriptor(obj, \"prop\");\n return propertyDefineCorrect && desc1.enumerable === true && obj.prop === 2010 && desc2.enumerable === true && e instanceof TypeError;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-338",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-338.js",
+ "description": "ES5 Attributes - fail to update [[Configurable]] attribute of data property ([[Writable]] is true, [[Enumerable]] is true, [[Configurable]] is false) to different value",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n Object.defineProperty(obj, \"prop\", {\n value: 2010,\n writable: true,\n enumerable: true,\n configurable: false\n });\n var propertyDefineCorrect = obj.hasOwnProperty(\"prop\");\n var desc1 = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n try {\n Object.defineProperty(obj, \"prop\", {\n configurable: true\n });\n return false;\n } catch (e) {\n var desc2 = Object.getOwnPropertyDescriptor(obj, \"prop\");\n return propertyDefineCorrect && desc1.configurable === false && obj.prop === 2010 && desc2.configurable === false && e instanceof TypeError;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-339-1",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-339-1.js",
+ "description": "Object.defineProperty - Updating indexed data property 'P' with attributes [[Writable]]: true, [[Enumerable]]: true, [[Configurable]]: false to an accessor property does not succeed, 'A' is an Array object (8.12.9 - step 9.a)",
+ "test": "assertTrue((function testcase() {\n var obj = [];\n\n Object.defineProperty(obj, \"0\", {\n value: 2010,\n writable: true,\n enumerable: true,\n configurable: false\n });\n var propertyDefineCorrect = obj.hasOwnProperty(\"0\");\n var desc1 = Object.getOwnPropertyDescriptor(obj, \"0\");\n\n function getFunc() {\n return 20;\n }\n try {\n Object.defineProperty(obj, \"0\", {\n get: getFunc\n });\n return false;\n } catch (e) {\n var desc2 = Object.getOwnPropertyDescriptor(obj, \"0\");\n return propertyDefineCorrect && desc1.value === 2010 && obj[0] === 2010 && typeof desc2.get === \"undefined\" && e instanceof TypeError;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-339-2",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-339-2.js",
+ "description": "Object.defineProperty - Updating named data property 'P' with attributes [[Writable]]: true, [[Enumerable]]: true, [[Configurable]]: false to an accessor property does not succeed, 'O' is an Arguments object (8.12.9 - step 9.a)",
+ "test": "assertTrue((function testcase() {\n var obj = (function () {\n return arguments;\n }());\n\n Object.defineProperty(obj, \"prop\", {\n value: 2010,\n writable: true,\n enumerable: true,\n configurable: false\n });\n var propertyDefineCorrect = obj.hasOwnProperty(\"prop\");\n var desc1 = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n function getFunc() {\n return 20;\n }\n try {\n Object.defineProperty(obj, \"prop\", {\n get: getFunc\n });\n return false;\n } catch (e) {\n var desc2 = Object.getOwnPropertyDescriptor(obj, \"prop\");\n return propertyDefineCorrect && desc1.value === 2010 && obj.prop === 2010 && typeof desc2.get === \"undefined\" && e instanceof TypeError;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-339-3",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-339-3.js",
+ "description": "Object.defineProperty - Updating named data property 'P' with attributes [[Writable]]: true, [[Enumerable]]: true, [[Configurable]]: false to an accessor property does not succeed, 'A' is an Array object (8.12.9 - step 9.a)",
+ "test": "assertTrue((function testcase() {\n var obj = [];\n\n Object.defineProperty(obj, \"prop\", {\n value: 2010,\n writable: true,\n enumerable: true,\n configurable: false\n });\n var propertyDefineCorrect = obj.hasOwnProperty(\"prop\");\n var desc1 = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n function getFunc() {\n return 20;\n }\n try {\n Object.defineProperty(obj, \"prop\", {\n get: getFunc\n });\n return false;\n } catch (e) {\n var desc2 = Object.getOwnPropertyDescriptor(obj, \"prop\");\n return propertyDefineCorrect && desc1.value === 2010 && obj.prop === 2010 &&\n typeof desc2.get === \"undefined\" && e instanceof TypeError;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-339-4",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-339-4.js",
+ "description": "Object.defineProperty - Updating indexed data property 'P' with attributes [[Writable]]: true, [[Enumerable]]: true, [[Configurable]]: false to an accessor property does not succeed, 'O' is an Arguments object (8.12.9 - step 9.a)",
+ "test": "assertTrue((function testcase() {\n var obj = (function () {\n return arguments;\n }());\n\n Object.defineProperty(obj, \"0\", {\n value: 2010,\n writable: true,\n enumerable: true,\n configurable: false\n });\n var propertyDefineCorrect = obj.hasOwnProperty(\"0\");\n var desc1 = Object.getOwnPropertyDescriptor(obj, \"0\");\n\n function getFunc() {\n return 20;\n }\n try {\n Object.defineProperty(obj, \"0\", {\n get: getFunc\n });\n return false;\n } catch (e) {\n var desc2 = Object.getOwnPropertyDescriptor(obj, \"0\");\n return propertyDefineCorrect && desc1.value === 2010 && obj[0] === 2010 &&\n typeof desc2.get === \"undefined\" && e instanceof TypeError;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-339",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-339.js",
+ "description": "ES5 Attributes - fail to update the data property ([[Writable]] is true, [[Enumerable]] is true, [[Configurable]] is false) to an accessor property",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n Object.defineProperty(obj, \"prop\", {\n value: 2010,\n writable: true,\n enumerable: true,\n configurable: false\n });\n var propertyDefineCorrect = obj.hasOwnProperty(\"prop\");\n var desc1 = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n function getFunc() {\n return 20;\n }\n try {\n Object.defineProperty(obj, \"prop\", {\n get: getFunc\n });\n return false;\n } catch (e) {\n var desc2 = Object.getOwnPropertyDescriptor(obj, \"prop\");\n return propertyDefineCorrect && desc1.value === 2010 && obj.prop === 2010 && typeof desc2.get === \"undefined\" && e instanceof TypeError;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-34",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-34.js",
+ "description": "Object.defineProperty - 'O' is an Array object that uses Object's [[GetOwnProperty]] method to access the 'name' property (8.12.9 step 1)",
+ "test": "assertTrue((function testcase() {\n var arrObj = [];\n\n Object.defineProperty(arrObj, \"foo\", {\n value: 12,\n configurable: false\n });\n\n try {\n Object.defineProperty(arrObj, \"foo\", {\n value: 11,\n configurable: true\n });\n return false;\n } catch (e) {\n return e instanceof TypeError && arrObj.foo === 12;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-340",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-340.js",
+ "description": "ES5 Attributes - property ([[Writable]] is true, [[Enumerable]] is false, [[Configurable]] is true) is writable",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n Object.defineProperty(obj, \"prop\", {\n value: 2010,\n writable: true,\n enumerable: false,\n configurable: true\n });\n var propertyDefineCorrect = (obj.prop === 2010);\n obj.prop = 1001;\n\n return propertyDefineCorrect && obj.prop === 1001;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-341",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-341.js",
+ "description": "ES5 Attributes - property ([[Writable]] is true, [[Enumerable]] is false, [[Configurable]] is true) is non-enumerable",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n Object.defineProperty(obj, \"prop\", {\n value: 2010,\n writable: true,\n enumerable: false,\n configurable: true\n });\n var propertyDefineCorrect = obj.hasOwnProperty(\"prop\");\n var desc = Object.getOwnPropertyDescriptor(obj, \"prop\");\n for (var p in obj) {\n if (p === \"prop\") {\n return false;\n }\n }\n return propertyDefineCorrect && desc.enumerable === false;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-342",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-342.js",
+ "description": "ES5 Attributes - property ([[Writable]] is true, [[Enumerable]] is false, [[Configurable]] is true) is deletable",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n Object.defineProperty(obj, \"prop\", {\n value: 2010,\n writable: true,\n enumerable: false,\n configurable: true\n });\n var beforeDelete = obj.hasOwnProperty(\"prop\");\n delete obj.prop;\n var afterDelete = obj.hasOwnProperty(\"prop\");\n return beforeDelete && !afterDelete;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-343",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-343.js",
+ "description": "ES5 Attributes - success to update [[Writable]] attribute of data property ([[Writable]] is true, [[Enumerable]] is false, [[Configurable]] is true) to different value",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n Object.defineProperty(obj, \"prop\", {\n value: 2010,\n writable: true,\n enumerable: false,\n configurable: true\n });\n var propertyDefineCorrect = obj.hasOwnProperty(\"prop\");\n var desc1 = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n Object.defineProperty(obj, \"prop\", {\n writable: false\n });\n var desc2 = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n return propertyDefineCorrect && desc1.writable === true && obj.prop === 2010 && desc2.writable === false;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-344",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-344.js",
+ "description": "ES5 Attributes - success to update [[Enumerable]] attribute of data property ([[Writable]] is true, [[Enumerable]] is false, [[Configurable]] is true) to different value",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n Object.defineProperty(obj, \"prop\", {\n value: 2010,\n writable: true,\n enumerable: false,\n configurable: true\n });\n var propertyDefineCorrect = obj.hasOwnProperty(\"prop\");\n var desc1 = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n Object.defineProperty(obj, \"prop\", {\n enumerable: true\n });\n var desc2 = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n return propertyDefineCorrect && desc1.enumerable === false && obj.prop === 2010 && desc2.enumerable === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-345",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-345.js",
+ "description": "ES5 Attributes - success to update [[Configurable]] attribute of data property ([[Writable]] is true, [[Enumerable]] is false, [[Configurable]] is true) to different value",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n Object.defineProperty(obj, \"prop\", {\n value: 2010,\n writable: true,\n enumerable: false,\n configurable: true\n });\n var propertyDefineCorrect = obj.hasOwnProperty(\"prop\");\n var desc1 = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n Object.defineProperty(obj, \"prop\", {\n configurable: false\n });\n var desc2 = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n return propertyDefineCorrect && desc1.configurable === true && obj.prop === 2010 && desc2.configurable === false;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-346",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-346.js",
+ "description": "ES5 Attributes - success to update the data property ([[Writable]] is true, [[Enumerable]] is false, [[Configurable]] is true) to an accessor property",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n Object.defineProperty(obj, \"prop\", {\n value: 2010,\n writable: true,\n enumerable: false,\n configurable: true\n });\n var desc1 = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n function getFunc() {\n return 20;\n }\n Object.defineProperty(obj, \"prop\", {\n get: getFunc\n });\n var desc2 = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n return desc1.hasOwnProperty(\"value\") && desc2.hasOwnProperty(\"get\");\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-347",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-347.js",
+ "description": "ES5 Attributes - property ([[Writable]] is true, [[Enumerable]] is false, [[Configurable]] is false) is writable",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n Object.defineProperty(obj, \"prop\", {\n value: 2010,\n writable: true,\n enumerable: false,\n configurable: false\n });\n var propertyDefineCorrect = (obj.prop === 2010);\n obj.prop = 1001;\n\n return propertyDefineCorrect && obj.prop === 1001;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-348",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-348.js",
+ "description": "ES5 Attributes - property ([[Writable]] is true, [[Enumerable]] is false, [[Configurable]] is false) is non-enumerable",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n Object.defineProperty(obj, \"prop\", {\n value: 2010,\n writable: true,\n enumerable: false,\n configurable: false\n });\n var propertyDefineCorrect = obj.hasOwnProperty(\"prop\");\n var desc = Object.getOwnPropertyDescriptor(obj, \"prop\");\n for (var p in obj) {\n if (p === \"prop\") {\n return false;\n }\n }\n return propertyDefineCorrect && desc.enumerable === false;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-349",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-349.js",
+ "description": "ES5 Attributes - property ([[Writable]] is true, [[Enumerable]] is false, [[Configurable]] is false) is undeletable",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n Object.defineProperty(obj, \"prop\", {\n value: 2010,\n writable: true,\n enumerable: false,\n configurable: false\n });\n var beforeDelete = obj.hasOwnProperty(\"prop\");\n delete obj.prop;\n var afterDelete = obj.hasOwnProperty(\"prop\");\n return beforeDelete && obj.prop === 2010 && afterDelete;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-35",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-35.js",
+ "description": "Object.defineProperty - 'O' is a String object which implements its own [[GetOwnProperty]] method to access the 'name' property (8.12.9 step 1)",
+ "test": "assertTrue((function testcase() {\n var str = new String(\"abc\");\n\n Object.defineProperty(str, \"foo\", {\n value: 12,\n configurable: false\n });\n\n try {\n Object.defineProperty(str, \"foo\", {\n value: 11,\n configurable: true\n });\n return false;\n } catch (e) {\n return e instanceof TypeError && str.foo === 12;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-350",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-350.js",
+ "description": "ES5 Attributes - fail to update [[Writable]] attribute of data property ([[Writable]] is true, [[Enumerable]] is false, [[Configurable]] is false) to different value",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n Object.defineProperty(obj, \"prop\", {\n value: 2010,\n writable: true,\n enumerable: false,\n configurable: false\n });\n var propertyDefineCorrect = obj.hasOwnProperty(\"prop\");\n var desc1 = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n Object.defineProperty(obj, \"prop\", {\n writable: false\n });\n var desc2 = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n return propertyDefineCorrect && desc1.writable === true && obj.prop === 2010 && desc2.writable === false;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-351",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-351.js",
+ "description": "ES5 Attributes - fail to update [[Enumerable]] attribute of data property ([[Writable]] is true, [[Enumerable]] is false, [[Configurable]] is false) to different value",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n Object.defineProperty(obj, \"prop\", {\n value: 2010,\n writable: true,\n enumerable: false,\n configurable: false\n });\n\n var propertyDefineCorrect = obj.hasOwnProperty(\"prop\");\n var desc1 = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n try {\n Object.defineProperty(obj, \"prop\", {\n enumerable: true\n });\n return false;\n } catch (e) {\n var desc2 = Object.getOwnPropertyDescriptor(obj, \"prop\");\n return propertyDefineCorrect && desc1.enumerable === false && obj.prop === 2010 && desc2.enumerable === false && e instanceof TypeError;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-352",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-352.js",
+ "description": "ES5 Attributes - fail to update [[Configurable]] attribute of data property ([[Writable]] is true, [[Enumerable]] is false, [[Configurable]] is false) to different value",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n Object.defineProperty(obj, \"prop\", {\n value: 2010,\n writable: true,\n enumerable: false,\n configurable: false\n });\n\n var propertyDefineCorrect = obj.hasOwnProperty(\"prop\");\n var desc1 = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n try {\n Object.defineProperty(obj, \"prop\", {\n configurable: true\n });\n return false;\n } catch (e) {\n var desc2 = Object.getOwnPropertyDescriptor(obj, \"prop\");\n return propertyDefineCorrect && desc1.configurable === false && obj.prop === 2010 && desc2.configurable === false && e instanceof TypeError;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-353",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-353.js",
+ "description": "ES5 Attributes - fail to update the data property ([[Writable]] is true, [[Enumerable]] is false, [[Configurable]] is false) to an accessor property",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n Object.defineProperty(obj, \"prop\", {\n value: 2010,\n writable: true,\n enumerable: false,\n configurable: false\n });\n var propertyDefineCorrect = obj.hasOwnProperty(\"prop\");\n var desc1 = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n function getFunc() {\n return 20;\n }\n try {\n Object.defineProperty(obj, \"prop\", {\n get: getFunc\n });\n return false;\n } catch (e) {\n var desc2 = Object.getOwnPropertyDescriptor(obj, \"prop\");\n return propertyDefineCorrect && desc1.value === 2010 && obj.prop === 2010 && typeof desc2.get === \"undefined\" && e instanceof TypeError;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-354-1",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-354-1.js",
+ "description": "Object.defineProperty will update [[Value]] attribute of named property 'P' successfully when [[Configurable]] attribute is true and [[Writable]] attribute is false, 'O' is an Object object (8.12.9 step - Note)",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n\n Object.defineProperty(obj, \"property\", {\n value: 1001,\n writable: false,\n configurable: true\n });\n\n Object.defineProperty(obj, \"property\", {\n value: 1002\n });\n\n return dataPropertyAttributesAreCorrect(obj, \"property\", 1002, false, false, true);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-354-10",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-354-10.js",
+ "description": "Object.defineProperty will update [[Value]] attribute of indexed property 'P' successfully when [[Configurable]] attribute is true and [[Writable]] attribute is false, 'O' is an Object object (8.12.9 step - Note)",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n\n Object.defineProperty(obj, \"0\", {\n value: 1001,\n writable: false,\n configurable: true\n });\n\n Object.defineProperty(obj, \"0\", {\n value: 1002\n });\n\n return dataPropertyAttributesAreCorrect(obj, \"0\", 1002, false, false, true);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-354-11",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-354-11.js",
+ "description": "Object.defineProperty will update [[Value]] attribute of named property 'P' successfully when [[Configurable]] attribute is true and [[Writable]] attribute is false, 'A' is an Array object (8.12.9 step - Note)",
+ "test": "assertTrue((function testcase() {\n\n var obj = [];\n\n Object.defineProperty(obj, \"prop\", {\n value: 1001,\n writable: false,\n configurable: true\n });\n\n Object.defineProperty(obj, \"prop\", {\n value: 1002\n });\n\n return dataPropertyAttributesAreCorrect(obj, \"prop\", 1002, false, false, true);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-354-12",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-354-12.js",
+ "description": "Object.defineProperty will update [[Value]] attribute of indexed property successfully when [[Configurable]] attribute is true and [[Writable]] attribute is false, 'O' is an Arguments object (8.12.9 - step Note)",
+ "test": "assertTrue((function testcase() {\n\n var obj = (function () {\n return arguments;\n }());\n\n Object.defineProperty(obj, \"0\", {\n value: 1001,\n writable: false,\n configurable: true\n });\n\n Object.defineProperty(obj, \"0\", {\n value: 1002\n });\n\n return dataPropertyAttributesAreCorrect(obj, \"0\", 1002, false, false, true);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-354-13",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-354-13.js",
+ "description": "Object.defineProperty will update [[Value]] attribute of indexed property successfully when [[Configurable]] attribute is true and [[Writable]] attribute is false, 'O' is the global object (8.12.9 - step Note)",
+ "test": "assertTrue((function testcase() {\n\n var obj = fnGlobalObject();\n\n try {\n Object.defineProperty(obj, \"0\", {\n value: 1001,\n writable: false,\n configurable: true\n });\n\n Object.defineProperty(obj, \"0\", {\n value: 1002\n });\n\n return dataPropertyAttributesAreCorrect(obj, \"0\", 1002, false, false, true);\n } finally {\n delete obj[0];\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-354-15",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-354-15.js",
+ "description": "Object.defineProperty - Named property 'P' with attributes [[Writable]]: false, [[Enumerable]]: true, [[Configurable]]: true is non-writable using simple assignment, 'A' is an Array object",
+ "test": "assertTrue((function testcase() {\n var obj = [];\n\n Object.defineProperty(obj, \"prop\", {\n value: 2010,\n writable: false,\n enumerable: true,\n configurable: true\n });\n var verifyValue = (obj.prop === 2010);\n obj.prop = 1001;\n\n return verifyValue && obj.prop === 2010;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-354-16",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-354-16.js",
+ "description": "ES5 Attributes - property 'P' is an indexed data property with attributes [[Writable]]: false, [[Enumerable]]: true, [[Configurable]] : true) is non-writable using simple assignment, 'O' is an Arguments object",
+ "test": "assertTrue((function testcase() {\n var obj = (function () {\n return arguments;\n }());\n\n Object.defineProperty(obj, \"0\", {\n value: 2010,\n writable: false,\n enumerable: true,\n configurable: true\n });\n var valueVerify = (obj[0] === 2010);\n obj[0] = 1001;\n\n return valueVerify && obj[0] === 2010;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-354-2",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-354-2.js",
+ "description": "Object.defineProperty will update [[Value]] attribute of indexed property 'P' successfully when [[Configurable]] attribute is true and [[Writable]] attribute is false, 'A' is an Array object (8.12.9 step - Note)",
+ "test": "assertTrue((function testcase() {\n\n var obj = [];\n\n Object.defineProperty(obj, \"0\", {\n value: 1001,\n writable: false,\n configurable: true\n });\n\n Object.defineProperty(obj, \"0\", {\n value: 1002\n });\n\n return dataPropertyAttributesAreCorrect(obj, \"0\", 1002, false, false, true);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-354-3",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-354-3.js",
+ "description": "Object.defineProperty will update [[Value]] attribute successfully when [[Configurable]] attribute is true and [[Writable]] attribute is false, 'O' is an Arguments object (8.12.9 - step Note)",
+ "test": "assertTrue((function testcase() {\n\n var obj = (function () {\n return arguments;\n }());\n\n Object.defineProperty(obj, \"property\", {\n value: 1001,\n writable: false,\n configurable: true\n });\n\n Object.defineProperty(obj, \"property\", {\n value: 1002\n });\n\n return dataPropertyAttributesAreCorrect(obj, \"property\", 1002, false, false, true);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-354-4",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-354-4.js",
+ "description": "Object.defineProperty will update [[Value]] attribute successfully when [[Configurable]] attribute is true and [[Writable]] attribute is false, 'O' is the global object (8.12.9 - step Note)",
+ "test": "assertTrue((function testcase() {\n\n var obj = fnGlobalObject();\n\n try {\n Object.defineProperty(obj, \"property\", {\n value: 1001,\n writable: false,\n configurable: true\n });\n\n Object.defineProperty(obj, \"property\", {\n value: 1002\n });\n\n return dataPropertyAttributesAreCorrect(obj, \"property\", 1002, false, false, true);\n } finally {\n delete obj.property;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-354-6",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-354-6.js",
+ "description": "Object.defineProperty - Indexed property 'P' with attributes [[Writable]]: false, [[Enumerable]]: true, [[Configurable]]: true is non-writable using simple assignment, 'A' is an Array object",
+ "test": "assertTrue((function testcase() {\n var obj = [];\n\n Object.defineProperty(obj, \"0\", {\n value: 2010,\n writable: false,\n enumerable: true,\n configurable: true\n });\n var verifyValue = (obj[0] === 2010);\n obj[0] = 1001;\n\n return verifyValue && obj[0] === 2010;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-354-7",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-354-7.js",
+ "description": "ES5 Attributes - property 'P' with attributes [[Writable]]: false, [[Enumerable]]: true, [[Configurable]] : true) is non-writable using simple assignment, 'O' is an Arguments object",
+ "test": "assertTrue((function testcase() {\n var obj = (function () {\n return arguments;\n }());\n\n Object.defineProperty(obj, \"prop\", {\n value: 2010,\n writable: false,\n enumerable: true,\n configurable: true\n });\n var valueVerify = (obj.prop === 2010);\n obj.prop = 1001;\n\n return valueVerify && obj.prop === 2010;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-354-8",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-354-8.js",
+ "description": "ES5 Attributes - property 'P' with attributes [[Writable]]: false, [[Enumerable]]: true, [[Configurable]]: true is non-writable using simple assignment, 'O' is the global object",
+ "test": "assertTrue((function testcase() {\n var obj = fnGlobalObject();\n try {\n Object.defineProperty(obj, \"prop\", {\n value: 2010,\n writable: false,\n enumerable: true,\n configurable: true\n });\n var valueVerify = (obj.prop === 2010);\n obj.prop = 1001;\n\n return valueVerify && obj.prop === 2010;\n } finally {\n delete obj.prop;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-354",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-354.js",
+ "description": "ES5 Attributes - property ([[Writable]] is false, [[Enumerable]] is true, [[Configurable]] is true) is unwritable",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n Object.defineProperty(obj, \"prop\", {\n value: 2010,\n writable: false,\n enumerable: true,\n configurable: true\n });\n var propertyDefineCorrect = (obj.prop === 2010);\n obj.prop = 1001;\n\n return propertyDefineCorrect && obj.prop === 2010;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-355",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-355.js",
+ "description": "ES5 Attributes - property ([[Writable]] is false, [[Enumerable]] is true, [[Configurable]] is true) is enumerable",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n Object.defineProperty(obj, \"prop\", {\n value: 2010,\n writable: false,\n enumerable: true,\n configurable: true\n });\n var propertyDefineCorrect = obj.hasOwnProperty(\"prop\");\n var desc = Object.getOwnPropertyDescriptor(obj, \"prop\");\n for (var property in obj) {\n if (property === \"prop\") {\n return propertyDefineCorrect && desc.enumerable === true;\n }\n }\n return false;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-356",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-356.js",
+ "description": "ES5 Attributes - property ([[Writable]] is false, [[Enumerable]] is true, [[Configurable]] is true) is deletable",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n Object.defineProperty(obj, \"prop\", {\n value: 2010,\n writable: false,\n enumerable: true,\n configurable: true\n });\n var beforeDelete = obj.hasOwnProperty(\"prop\");\n delete obj.prop;\n var afterDelete = obj.hasOwnProperty(\"prop\");\n return beforeDelete && !afterDelete;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-357",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-357.js",
+ "description": "ES5 Attributes - success to update [[Writable]] attribute of data property ([[Writable]] is false, [[Enumerable]] is true, [[Configurable]] is true) to different value",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n Object.defineProperty(obj, \"prop\", {\n value: 2010,\n writable: false,\n enumerable: true,\n configurable: true\n });\n var propertyDefineCorrect = obj.hasOwnProperty(\"prop\");\n var desc1 = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n Object.defineProperty(obj, \"prop\", {\n writable: true\n });\n var desc2 = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n return propertyDefineCorrect && desc1.writable === false && obj.prop === 2010 && desc2.writable === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-358",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-358.js",
+ "description": "ES5 Attributes - success to update [[Enumerable]] attribute of data property ([[Writable]] is false, [[Enumerable]] is true, [[Configurable]] is true) to different value",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n Object.defineProperty(obj, \"prop\", {\n value: 2010,\n writable: false,\n enumerable: true,\n configurable: true\n });\n var propertyDefineCorrect = obj.hasOwnProperty(\"prop\");\n var desc1 = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n Object.defineProperty(obj, \"prop\", {\n enumerable: false\n });\n var desc2 = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n return propertyDefineCorrect && desc1.enumerable === true && obj.prop === 2010 && desc2.enumerable === false;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-359",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-359.js",
+ "description": "ES5 Attributes - success to update [[Configurable]] attribute of data property ([[Writable]] is false, [[Enumerable]] is true, [[Configurable]] is true) to different value",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n Object.defineProperty(obj, \"prop\", {\n value: 2010,\n writable: false,\n enumerable: true,\n configurable: true\n });\n var propertyDefineCorrect = obj.hasOwnProperty(\"prop\");\n var desc1 = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n Object.defineProperty(obj, \"prop\", {\n configurable: false\n });\n var desc2 = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n return propertyDefineCorrect && desc1.configurable === true && obj.prop === 2010 && desc2.configurable === false;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-36",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-36.js",
+ "description": "Object.defineProperty - 'O' is a Boolean object that uses Object's [[GetOwnProperty]] method to access the 'name' property (8.12.9 step 1)",
+ "test": "assertTrue((function testcase() {\n var obj = new Boolean(true);\n\n Object.defineProperty(obj, \"foo\", {\n value: 12,\n configurable: false\n });\n\n try {\n Object.defineProperty(obj, \"foo\", {\n value: 11,\n configurable: true\n });\n return false;\n } catch (e) {\n return e instanceof TypeError && obj.foo === 12;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-360-1",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-360-1.js",
+ "description": "ES5 Attributes - Updating indexed data property 'P' whose attributes are [[Writable]]: false, [[Enumerable]]: true, [[Configurable]]: true to an accessor property, 'A' is an Array object (8.12.9 - step 9.b.i)",
+ "test": "assertTrue((function testcase() {\n var obj = [];\n\n Object.defineProperty(obj, \"0\", {\n value: 2010,\n writable: false,\n enumerable: true,\n configurable: true\n });\n var desc1 = Object.getOwnPropertyDescriptor(obj, \"0\");\n\n function getFunc() {\n return 20;\n }\n Object.defineProperty(obj, \"0\", {\n get: getFunc\n });\n var desc2 = Object.getOwnPropertyDescriptor(obj, \"0\");\n\n return desc1.hasOwnProperty(\"value\") && desc2.hasOwnProperty(\"get\") &&\n desc2.enumerable === true && desc2.configurable === true &&\n obj[0] === 20 && typeof desc2.set === \"undefined\" && desc2.get === getFunc;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-360-2",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-360-2.js",
+ "description": "ES5 Attributes - Updating data property 'P' whose attributes are [[Writable]]: false, [[Enumerable]]: true, [[Configurable]]: true to an accessor property, 'O' is an Arguments object (8.12.9 - step 9.b.i)",
+ "test": "assertTrue((function testcase() {\n var obj = (function () {\n return arguments;\n }());\n\n Object.defineProperty(obj, \"prop\", {\n value: 2010,\n writable: false,\n enumerable: true,\n configurable: true\n });\n var desc1 = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n function getFunc() {\n return 20;\n }\n Object.defineProperty(obj, \"prop\", {\n get: getFunc\n });\n var desc2 = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n return desc1.hasOwnProperty(\"value\") && desc2.hasOwnProperty(\"get\") &&\n desc2.enumerable === true && desc2.configurable === true &&\n obj.prop === 20 && typeof desc2.set === \"undefined\" && desc2.get === getFunc;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-360-3",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-360-3.js",
+ "description": "ES5 Attributes - Updating data property 'P' whose attributes are [[Writable]]: false, [[Enumerable]]: true, [[Configurable]]: true to an accessor property, 'O' is the global object (8.12.9 - step 9.b.i)",
+ "test": "assertTrue((function testcase() {\n var obj = fnGlobalObject();\n try {\n Object.defineProperty(obj, \"prop\", {\n value: 2010,\n writable: false,\n enumerable: true,\n configurable: true\n });\n var desc1 = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n function getFunc() {\n return 20;\n }\n Object.defineProperty(obj, \"prop\", {\n get: getFunc\n });\n var desc2 = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n return desc1.hasOwnProperty(\"value\") && desc2.hasOwnProperty(\"get\") &&\n desc2.enumerable === true && desc2.configurable === true &&\n obj.prop === 20 && typeof desc2.set === \"undefined\" && desc2.get === getFunc;\n } finally {\n delete obj.prop;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-360-5",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-360-5.js",
+ "description": "ES5 Attributes - Updating named data property 'P' whose attributes are [[Writable]]: false, [[Enumerable]]: true, [[Configurable]]: true to an accessor property, 'A' is an Array object (8.12.9 - step 9.b.i)",
+ "test": "assertTrue((function testcase() {\n var obj = [];\n\n Object.defineProperty(obj, \"prop\", {\n value: 2010,\n writable: false,\n enumerable: true,\n configurable: true\n });\n var desc1 = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n function getFunc() {\n return 20;\n }\n Object.defineProperty(obj, \"prop\", {\n get: getFunc\n });\n var desc2 = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n return desc1.hasOwnProperty(\"value\") && desc2.hasOwnProperty(\"get\") &&\n desc2.enumerable === true && desc2.configurable === true &&\n obj.prop === 20 && typeof desc2.set === \"undefined\" && desc2.get === getFunc;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-360-6",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-360-6.js",
+ "description": "ES5 Attributes - Updating indexed data property 'P' whose attributes are [[Writable]]: false, [[Enumerable]]: true, [[Configurable]]: true to an accessor property, 'O' is an Arguments object (8.12.9 - step 9.b.i)",
+ "test": "assertTrue((function testcase() {\n var obj = (function () {\n return arguments;\n }());\n\n Object.defineProperty(obj, \"0\", {\n value: 2010,\n writable: false,\n enumerable: true,\n configurable: true\n });\n var desc1 = Object.getOwnPropertyDescriptor(obj, \"0\");\n\n function getFunc() {\n return 20;\n }\n Object.defineProperty(obj, \"0\", {\n get: getFunc\n });\n var desc2 = Object.getOwnPropertyDescriptor(obj, \"0\");\n\n return desc1.hasOwnProperty(\"value\") && desc2.hasOwnProperty(\"get\") &&\n desc2.enumerable === true && desc2.configurable === true &&\n obj[0] === 20 && typeof desc2.set === \"undefined\" && desc2.get === getFunc;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-360-7",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-360-7.js",
+ "description": "ES5 Attributes - Updating indexed data property 'P' whose attributes are [[Writable]]: false, [[Enumerable]]: true, [[Configurable]]: true to an accessor property, 'O' is the global object (8.12.9 - step 9.b.i)",
+ "test": "assertTrue((function testcase() {\n var obj = fnGlobalObject();\n try {\n Object.defineProperty(obj, \"0\", {\n value: 2010,\n writable: false,\n enumerable: true,\n configurable: true\n });\n var desc1 = Object.getOwnPropertyDescriptor(obj, \"0\");\n\n function getFunc() {\n return 20;\n }\n Object.defineProperty(obj, \"0\", {\n get: getFunc\n });\n var desc2 = Object.getOwnPropertyDescriptor(obj, \"0\");\n\n return desc1.hasOwnProperty(\"value\") && desc2.hasOwnProperty(\"get\") &&\n desc2.enumerable === true && desc2.configurable === true &&\n obj[0] === 20 && typeof desc2.set === \"undefined\" && desc2.get === getFunc;\n } finally {\n delete obj[0];\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-360",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-360.js",
+ "description": "ES5 Attributes - success to update the data property ([[Writable]] is false, [[Enumerable]] is true, [[Configurable]] is true) to an accessor property",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n Object.defineProperty(obj, \"prop\", {\n value: 2010,\n writable: false,\n enumerable: true,\n configurable: true\n });\n var desc1 = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n function getFunc() {\n return 20;\n }\n Object.defineProperty(obj, \"prop\", {\n get: getFunc\n });\n var desc2 = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n return desc1.hasOwnProperty(\"value\") && desc2.hasOwnProperty(\"get\");\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-361",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-361.js",
+ "description": "ES5 Attributes - property ([[Writable]] is false, [[Enumerable]] is true, [[Configurable]] is false) is unwritable",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n Object.defineProperty(obj, \"prop\", {\n value: 2010,\n writable: false,\n enumerable: true,\n configurable: false\n });\n var propertyDefineCorrect = (obj.prop === 2010);\n obj.prop = 1001;\n\n return propertyDefineCorrect && obj.prop === 2010;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-362",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-362.js",
+ "description": "ES5 Attributes - property ([[Writable]] is false, [[Enumerable]] is true, [[Configurable]] is false) is enumerable",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n Object.defineProperty(obj, \"prop\", {\n value: 2010,\n writable: false,\n enumerable: true,\n configurable: false\n });\n var propertyDefineCorrect = obj.hasOwnProperty(\"prop\");\n var desc = Object.getOwnPropertyDescriptor(obj, \"prop\");\n for (var property in obj) {\n if (property === \"prop\") {\n return propertyDefineCorrect && desc.enumerable === true;\n }\n }\n return false;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-363",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-363.js",
+ "description": "ES5 Attributes - property ([[Writable]] is false, [[Enumerable]] is true, [[Configurable]] is false) is undeletable",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n Object.defineProperty(obj, \"prop\", {\n value: 2010,\n writable: false,\n enumerable: true,\n configurable: false\n });\n var beforeDelete = obj.hasOwnProperty(\"prop\");\n delete obj.prop;\n var afterDelete = obj.hasOwnProperty(\"prop\");\n return beforeDelete && obj.prop === 2010 && afterDelete;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-364",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-364.js",
+ "description": "ES5 Attributes - fail to update [[Writable]] attribute of data property ([[Writable]] is false, [[Enumerable]] is true, [[Configurable]] is false) to different value",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n Object.defineProperty(obj, \"prop\", {\n value: 2010,\n writable: false,\n enumerable: true,\n configurable: false\n });\n var propertyDefineCorrect = obj.hasOwnProperty(\"prop\");\n var desc1 = Object.getOwnPropertyDescriptor(obj, \"prop\");\n try {\n Object.defineProperty(obj, \"prop\", {\n writable: true\n });\n\n return false;\n } catch (e) {\n var desc2 = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n return propertyDefineCorrect && desc1.writable === false && obj.prop === 2010 && desc2.writable === false && e instanceof TypeError;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-365",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-365.js",
+ "description": "ES5 Attributes - fail to update [[Enumerable]] attribute of data property ([[Writable]] is false, [[Enumerable]] is true, [[Configurable]] is false) to different value",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n Object.defineProperty(obj, \"prop\", {\n value: 2010,\n writable: false,\n enumerable: true,\n configurable: false\n });\n var propertyDefineCorrect = obj.hasOwnProperty(\"prop\");\n var desc1 = Object.getOwnPropertyDescriptor(obj, \"prop\");\n try {\n Object.defineProperty(obj, \"prop\", {\n enumerable: false\n });\n\n return false;\n } catch (e) {\n var desc2 = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n return propertyDefineCorrect && desc1.enumerable === true && obj.prop === 2010 && desc2.enumerable === true && e instanceof TypeError;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-366",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-366.js",
+ "description": "ES5 Attributes - fail to update [[Configurable]] attribute of data property ([[Writable]] is false, [[Enumerable]] is true, [[Configurable]] is false) to different value",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n Object.defineProperty(obj, \"prop\", {\n value: 2010,\n writable: false,\n enumerable: true,\n configurable: false\n });\n var propertyDefineCorrect = obj.hasOwnProperty(\"prop\");\n var desc1 = Object.getOwnPropertyDescriptor(obj, \"prop\");\n try {\n Object.defineProperty(obj, \"prop\", {\n configurable: true\n });\n\n return false;\n } catch (e) {\n var desc2 = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n return propertyDefineCorrect && desc1.configurable === false && obj.prop === 2010 && desc2.configurable === false && e instanceof TypeError;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-367",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-367.js",
+ "description": "ES5 Attributes - fail to update the data property ([[Writable]] is false, [[Enumerable]] is true, [[Configurable]] is false) to an accessor property",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n Object.defineProperty(obj, \"prop\", {\n value: 2010,\n writable: false,\n enumerable: true,\n configurable: false\n });\n var propertyDefineCorrect = obj.hasOwnProperty(\"prop\");\n var desc1 = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n function getFunc() {\n return 20;\n }\n try {\n Object.defineProperty(obj, \"prop\", {\n get: getFunc\n });\n return false;\n } catch (e) {\n var desc2 = Object.getOwnPropertyDescriptor(obj, \"prop\");\n return propertyDefineCorrect && desc1.value === 2010 && obj.prop === 2010 && typeof desc2.get === \"undefined\" && e instanceof TypeError;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-368",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-368.js",
+ "description": "ES5 Attributes - property ([[Writable]] is false, [[Enumerable]] is false, [[Configurable]] is true) is unwritable",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n Object.defineProperty(obj, \"prop\", {\n value: 2010,\n writable: false,\n enumerable: false,\n configurable: true\n });\n var propertyDefineCorrect = (obj.prop === 2010);\n obj.prop = 1001;\n\n return propertyDefineCorrect && obj.prop === 2010;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-369",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-369.js",
+ "description": "ES5 Attributes - property ([[Writable]] is false, [[Enumerable]] is false, [[Configurable]] is true) is non-enumerable",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n Object.defineProperty(obj, \"prop\", {\n value: 2010,\n writable: false,\n enumerable: false,\n configurable: true\n });\n var propertyDefineCorrect = obj.hasOwnProperty(\"prop\");\n var desc = Object.getOwnPropertyDescriptor(obj, \"prop\");\n for (var p in obj) {\n if (p === \"prop\") {\n return false;\n }\n }\n return propertyDefineCorrect && desc.enumerable === false;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-37",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-37.js",
+ "description": "Object.defineProperty - 'O' is a Number object that uses Object's [[GetOwnProperty]] method to access the 'name' property (8.12.9 step 1)",
+ "test": "assertTrue((function testcase() {\n var obj = new Number(-2);\n\n Object.defineProperty(obj, \"foo\", {\n value: 12,\n configurable: false\n });\n\n try {\n Object.defineProperty(obj, \"foo\", {\n value: 11,\n configurable: true\n });\n return false;\n } catch (e) {\n return e instanceof TypeError && obj.foo === 12;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-370",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-370.js",
+ "description": "ES5 Attributes - property ([[Writable]] is false, [[Enumerable]] is false, [[Configurable]] is true) is deletable",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n Object.defineProperty(obj, \"prop\", {\n value: 2010,\n writable: false,\n enumerable: false,\n configurable: true\n });\n var beforeDelete = obj.hasOwnProperty(\"prop\");\n delete obj.prop;\n var afterDelete = obj.hasOwnProperty(\"prop\");\n return beforeDelete && !afterDelete;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-371",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-371.js",
+ "description": "ES5 Attributes - success to update [[Writable]] attribute of data property ([[Writable]] is false, [[Enumerable]] is false, [[Configurable]] is true) to different value",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n Object.defineProperty(obj, \"prop\", {\n value: 2010,\n writable: false,\n enumerable: false,\n configurable: true\n });\n var propertyDefineCorrect = obj.hasOwnProperty(\"prop\");\n var desc1 = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n Object.defineProperty(obj, \"prop\", {\n writable: true\n });\n var desc2 = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n return propertyDefineCorrect && desc1.writable === false && obj.prop === 2010 && desc2.writable === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-372",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-372.js",
+ "description": "ES5 Attributes - success to update [[Enumerable]] attribute of data property ([[Writable]] is false, [[Enumerable]] is false, [[Configurable]] is true) to different value",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n Object.defineProperty(obj, \"prop\", {\n value: 2010,\n writable: false,\n enumerable: false,\n configurable: true\n });\n var propertyDefineCorrect = obj.hasOwnProperty(\"prop\");\n var desc1 = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n Object.defineProperty(obj, \"prop\", {\n enumerable: true\n });\n var desc2 = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n return propertyDefineCorrect && desc1.enumerable === false && obj.prop === 2010 && desc2.enumerable === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-373",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-373.js",
+ "description": "ES5 Attributes - success to update [[Configurable]] attribute of data property ([[Writable]] is false, [[Enumerable]] is false, [[Configurable]] is true) to different value",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n Object.defineProperty(obj, \"prop\", {\n value: 2010,\n writable: false,\n enumerable: false,\n configurable: true\n });\n var propertyDefineCorrect = obj.hasOwnProperty(\"prop\");\n var desc1 = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n Object.defineProperty(obj, \"prop\", {\n configurable: false\n });\n var desc2 = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n return propertyDefineCorrect && desc1.configurable === true && obj.prop === 2010 && desc2.configurable === false;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-374",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-374.js",
+ "description": "ES5 Attributes - success to update the data property ([[Writable]] is false, [[Enumerable]] is false, [[Configurable]] is true) to an accessor property",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n Object.defineProperty(obj, \"prop\", {\n value: 2010,\n writable: false,\n enumerable: false,\n configurable: true\n });\n var desc1 = Object.getOwnPropertyDescriptor(obj, \"prop\");\n function getFunc() {\n return 20;\n }\n Object.defineProperty(obj, \"prop\", {\n get: getFunc\n });\n var desc2 = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n return desc1.hasOwnProperty(\"value\") && desc2.get === getFunc;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-375",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-375.js",
+ "description": "ES5 Attributes - property ([[Writable]] is false, [[Enumerable]] is false, [[Configurable]] is false) is unwritable",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n Object.defineProperty(obj, \"prop\", {\n value: 2010,\n writable: false,\n enumerable: false,\n configurable: false\n });\n var propertyDefineCorrect = (obj.prop === 2010);\n obj.prop = 1001;\n\n return propertyDefineCorrect && obj.prop === 2010;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-376",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-376.js",
+ "description": "ES5 Attributes - property ([[Writable]] is false, [[Enumerable]] is false, [[Configurable]] is false) is non-enumerable",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n Object.defineProperty(obj, \"prop\", {\n value: 2010,\n writable: false,\n enumerable: false,\n configurable: false\n });\n var propertyDefineCorrect = obj.hasOwnProperty(\"prop\");\n var desc = Object.getOwnPropertyDescriptor(obj, \"prop\");\n for (var p in obj) {\n if (p === \"prop\") {\n return false;\n }\n }\n return propertyDefineCorrect && desc.enumerable === false;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-377",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-377.js",
+ "description": "ES5 Attributes - property ([[Writable]] is false, [[Enumerable]] is false, [[Configurable]] is false) is undeletable",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n Object.defineProperty(obj, \"prop\", {\n value: 2010,\n writable: false,\n enumerable: false,\n configurable: false\n });\n var beforeDelete = obj.hasOwnProperty(\"prop\");\n delete obj.prop;\n var afterDelete = obj.hasOwnProperty(\"prop\");\n return beforeDelete && obj.prop === 2010 && afterDelete;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-378",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-378.js",
+ "description": "ES5 Attributes - fail to update [[Writable]] attribute of data property ([[Writable]] is false, [[Enumerable]] is false, [[Configurable]] is false) to different value",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n Object.defineProperty(obj, \"prop\", {\n value: 2010,\n writable: false,\n enumerable: false,\n configurable: false\n });\n var propertyDefineCorrect = obj.hasOwnProperty(\"prop\");\n var desc1 = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n try {\n Object.defineProperty(obj, \"prop\", {\n writable: true\n });\n\n return false;\n } catch (e) {\n var desc2 = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n return propertyDefineCorrect && desc1.writable === false && obj.prop === 2010 && desc2.writable === false && e instanceof TypeError;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-379",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-379.js",
+ "description": "ES5 Attributes - fail to update [[Enumerable]] attribute of data property ([[Writable]] is false, [[Enumerable]] is false, [[Configurable]] is false) to different value",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n Object.defineProperty(obj, \"prop\", {\n value: 2010,\n writable: false,\n enumerable: false,\n configurable: false\n });\n var propertyDefineCorrect = obj.hasOwnProperty(\"prop\");\n var desc1 = Object.getOwnPropertyDescriptor(obj, \"prop\");\n try {\n Object.defineProperty(obj, \"prop\", {\n enumerable: true\n });\n\n return false;\n } catch (e) {\n var desc2 = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n return propertyDefineCorrect && desc1.enumerable === false && obj.prop === 2010 && desc2.enumerable === false && e instanceof TypeError;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-38",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-38.js",
+ "description": "Object.defineProperty - 'O' is the Math object that uses Object's [[GetOwnProperty]] method to access the 'name' property (8.12.9 step 1)",
+ "test": "assertTrue((function testcase() {\n try {\n Object.defineProperty(Math, \"foo\", {\n value: 12,\n configurable: true\n });\n \n return dataPropertyAttributesAreCorrect(Math, \"foo\", 12, false, false, true);\n } finally {\n delete Math.foo;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-380",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-380.js",
+ "description": "ES5 Attributes - fail to update [[Configurable]] attribute of data property ([[Writable]] is false, [[Enumerable]] is false, [[Configurable]] is false) to different value",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n Object.defineProperty(obj, \"prop\", {\n value: 2010,\n writable: false,\n enumerable: false,\n configurable: false\n });\n var propertyDefineCorrect = obj.hasOwnProperty(\"prop\");\n var desc1 = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n try {\n Object.defineProperty(obj, \"prop\", {\n configurable: true\n });\n\n return false;\n } catch (e) {\n var desc2 = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n return propertyDefineCorrect && desc1.configurable === false && obj.prop === 2010 && desc2.configurable === false && e instanceof TypeError;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-381",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-381.js",
+ "description": "ES5 Attributes - fail to update the data property ([[Writable]] is false, [[Enumerable]] is false, [[Configurable]] is false) to an accessor property",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n Object.defineProperty(obj, \"prop\", {\n value: 2010,\n writable: false,\n enumerable: false,\n configurable: false\n });\n var propertyDefineCorrect = obj.hasOwnProperty(\"prop\");\n var desc1 = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n function getFunc() {\n return 20;\n }\n try {\n Object.defineProperty(obj, \"prop\", {\n get: getFunc\n });\n return false;\n } catch (e) {\n var desc2 = Object.getOwnPropertyDescriptor(obj, \"prop\");\n return propertyDefineCorrect && desc1.value === 2010 && obj.prop === 2010 && typeof desc2.get === \"undefined\" && e instanceof TypeError;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-382",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-382.js",
+ "description": "ES5 Attributes - [[Value]] attribute of data property is a number",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n Object.defineProperty(obj, \"prop\", {\n value: 1001\n });\n\n var desc = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n return obj.prop === 1001 && desc.value === 1001;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-383",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-383.js",
+ "description": "ES5 Attributes - [[Value]] attribute of data property is a string",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n Object.defineProperty(obj, \"prop\", {\n value: \"ThisIsAString\"\n });\n\n var desc = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n return obj.prop === \"ThisIsAString\" && desc.value === \"ThisIsAString\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-384",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-384.js",
+ "description": "ES5 Attributes - [[Value]] attribute of data property is a boolean",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n Object.defineProperty(obj, \"prop\", {\n value: false\n });\n\n var desc = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n return obj.prop === false && desc.value === false;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-385",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-385.js",
+ "description": "ES5 Attributes - [[Value]] attribute of data property is a generic object",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n var tempObj = { testproperty: 100 };\n\n Object.defineProperty(obj, \"prop\", {\n value: tempObj\n });\n\n var desc = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n return obj.prop === tempObj && desc.value === tempObj;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-386",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-386.js",
+ "description": "ES5 Attributes - [[Value]] attribute of data property is an Array object",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n var arrObj = [];\n\n Object.defineProperty(obj, \"prop\", {\n value: arrObj\n });\n\n var desc = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n return obj.prop === arrObj && desc.value === arrObj;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-387",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-387.js",
+ "description": "ES5 Attributes - [[Value]] attribute of data property is a String object",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n var strObj = new String();\n\n Object.defineProperty(obj, \"prop\", {\n value: strObj\n });\n\n var desc = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n return obj.prop === strObj && desc.value === strObj;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-388",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-388.js",
+ "description": "ES5 Attributes - [[Value]] attribute of data property is a Number object",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n var numObj = new Number();\n\n Object.defineProperty(obj, \"prop\", {\n value: numObj\n });\n\n var desc = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n return obj.prop === numObj && desc.value === numObj;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-389",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-389.js",
+ "description": "ES5 Attributes - [[Value]] attribute of data property is a Boolean Object",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n var boolObj = new Boolean();\n\n Object.defineProperty(obj, \"prop\", {\n value: boolObj\n });\n\n var desc = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n return obj.prop === boolObj && desc.value === boolObj;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-39",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-39.js",
+ "description": "Object.defineProperty - 'O' is a Date object that uses Object's [[GetOwnProperty]] method to access the 'name' property (8.12.9 step 1)",
+ "test": "assertTrue((function testcase() {\n var desc = new Date();\n\n Object.defineProperty(desc, \"foo\", {\n value: 12,\n configurable: false\n });\n\n try {\n Object.defineProperty(desc, \"foo\", {\n value: 11,\n configurable: true\n });\n return false;\n } catch (e) {\n return e instanceof TypeError && desc.foo === 12;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-390",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-390.js",
+ "description": "ES5 Attributes - [[Value]] attribute of data property is a Function object",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n var funObj = function () { };\n\n Object.defineProperty(obj, \"prop\", {\n value: funObj\n });\n\n var desc = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n return obj.prop === funObj && desc.value === funObj;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-391",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-391.js",
+ "description": "ES5 Attributes - [[Value]] attribute of data property is an Error object",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n var errObj = new Error();\n\n Object.defineProperty(obj, \"prop\", {\n value: errObj\n });\n\n var desc = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n return obj.prop === errObj && desc.value === errObj;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-392",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-392.js",
+ "description": "ES5 Attributes - [[Value]] attribute of data property is a Date object",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n var dateObj = new Date();\n\n Object.defineProperty(obj, \"prop\", {\n value: dateObj\n });\n\n var desc = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n return obj.prop === dateObj && desc.value === dateObj;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-393",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-393.js",
+ "description": "ES5 Attributes - [[Value]] attribute of data property is a RegExp object",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n var regObj = new RegExp();\n\n Object.defineProperty(obj, \"prop\", {\n value: regObj\n });\n\n var desc = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n return obj.prop === regObj && desc.value === regObj;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-394",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-394.js",
+ "description": "ES5 Attributes - [[Value]] attribute of data property is undefined",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n Object.defineProperty(obj, \"prop\", {\n value: undefined\n });\n\n var desc = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n return obj.hasOwnProperty(\"prop\") && typeof obj.prop === \"undefined\" && typeof desc.value === \"undefined\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-395",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-395.js",
+ "description": "ES5 Attributes - [[Value]] attribute of data property is null",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n Object.defineProperty(obj, \"prop\", {\n value: null\n });\n\n var desc = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n return obj.prop === null && desc.value === null;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-396",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-396.js",
+ "description": "ES5 Attributes - [[Value]] attribute of data property is NaN",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n Object.defineProperty(obj, \"prop\", {\n value: NaN\n });\n\n var desc = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n return obj.prop !== obj.prop && desc.value !== desc.value;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-397",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-397.js",
+ "description": "ES5 Attributes - [[Value]] attribute of data property is Infinity",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n Object.defineProperty(obj, \"prop\", {\n value: Infinity\n });\n\n var desc = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n return obj.prop === Infinity && desc.value === Infinity;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-398",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-398.js",
+ "description": "ES5 Attributes - [[Value]] attribute of data property is -Infinity",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n Object.defineProperty(obj, \"prop\", {\n value: -Infinity\n });\n\n var desc = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n return obj.prop === -Infinity && desc.value === -Infinity;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-399",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-399.js",
+ "description": "ES5 Attributes - [[Value]] attribute of data property is the global object",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n Object.defineProperty(obj, \"prop\", {\n value: fnGlobalObject()\n });\n\n var desc = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n return obj.prop === fnGlobalObject() && desc.value === fnGlobalObject();\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-4",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-4.js",
+ "description": "Object.defineProperty defines a data property if given a generic desc(8.12.9 step 4.a.i)",
+ "test": "assertTrue((function testcase() {\n var o = {};\n \n var desc = {};\n Object.defineProperty(o, \"foo\", desc);\n\n var propDesc = Object.getOwnPropertyDescriptor(o, \"foo\");\n if (propDesc.value === undefined && // this is the value that was set\n propDesc.writable === false && // false by default\n propDesc.enumerable === false && // false by default\n propDesc.configurable === false) { // false by default\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-40",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-40.js",
+ "description": "Object.defineProperty - 'O' is a RegExp object that uses Object's [[GetOwnProperty]] method to access the 'name' property (8.12.9 step 1)",
+ "test": "assertTrue((function testcase() {\n var desc = new RegExp();\n\n Object.defineProperty(desc, \"foo\", {\n value: 12,\n configurable: false\n });\n\n try {\n Object.defineProperty(desc, \"foo\", {\n value: 11,\n configurable: true\n });\n return false;\n } catch (e) {\n return e instanceof TypeError && desc.foo === 12;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-402",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-402.js",
+ "description": "ES5 Attributes - [[Value]] attribute of inherited property of [[Prototype]] internal property is correct (String instance)",
+ "test": "assertTrue((function testcase() {\n try {\n Object.defineProperty(String.prototype, \"prop\", {\n value: 1001,\n writable: true,\n enumerable: true,\n configurable: true\n });\n var strObj = new String();\n\n return !strObj.hasOwnProperty(\"prop\") && strObj.prop === 1001;\n } finally {\n delete String.prototype.prop;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-403",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-403.js",
+ "description": "ES5 Attributes - Successfully add a property to an object when the object's prototype has a property with same name and [[Writable]] attribute is set to true (Array instance)",
+ "test": "assertTrue((function testcase() {\n try {\n Object.defineProperty(Array.prototype, \"prop\", {\n value: 1001,\n writable: true,\n enumerable: true,\n configurable: true\n });\n var arrObj = [];\n arrObj.prop = 1002;\n\n return arrObj.hasOwnProperty(\"prop\") && arrObj.prop === 1002;\n } finally {\n delete Array.prototype.prop;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-404",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-404.js",
+ "description": "ES5 Attributes - Inherited property whose [[Enumerable]] attribute is set to true is enumerable (Boolean instance)",
+ "test": "assertTrue((function testcase() {\n try {\n Object.defineProperty(Boolean.prototype, \"prop\", {\n value: 1001,\n writable: true,\n enumerable: true,\n configurable: true\n });\n var boolObj = new Boolean();\n\n var verifyEnumerable = false;\n for (var p in boolObj) {\n if (p === \"prop\") {\n verifyEnumerable = true;\n }\n }\n\n return !boolObj.hasOwnProperty(\"prop\") && verifyEnumerable;\n } finally {\n delete Boolean.prototype.prop;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-405",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-405.js",
+ "description": "ES5 Attributes - Failed to add a property to an object when the object's object has a property with same name and [[Writable]] attribute is set to false (Number instance)",
+ "test": "assertTrue((function testcase() {\n try {\n Object.defineProperty(Number.prototype, \"prop\", {\n value: 1001,\n writable: false,\n enumerable: false,\n configurable: true\n });\n var numObj = new Number();\n numObj.prop = 1002;\n\n return !numObj.hasOwnProperty(\"prop\") && numObj.prop === 1001;\n } finally {\n delete Number.prototype.prop;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-406",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-406.js",
+ "description": "ES5 Attributes - Inherited property whose [[Enumerable]] attribute is set to false is non-enumerable (Function instance)",
+ "test": "assertTrue((function testcase() {\n try {\n Object.defineProperty(Function.prototype, \"prop\", {\n value: 1001,\n writable: false,\n enumerable: false,\n configurable: true\n });\n var funObj = function () { };\n\n var verifyEnumerable = false;\n for (var p in funObj) {\n if (p === \"prop\") {\n verifyEnumerable = true;\n }\n }\n\n return !funObj.hasOwnProperty(\"prop\") && !verifyEnumerable;\n } finally {\n delete Function.prototype.prop;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-407",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-407.js",
+ "description": "ES5 Attributes - [[Value]] attribute of inherited property of [[Prototype]] internal property is correct (Error Instance)",
+ "test": "assertTrue((function testcase() {\n try {\n Object.defineProperty(Error.prototype, \"prop\", {\n value: 1001,\n writable: true,\n enumerable: true,\n configurable: true\n });\n var errObj = new Error();\n\n return !errObj.hasOwnProperty(\"prop\") && errObj.prop === 1001;\n } finally {\n delete Error.prototype.prop;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-408",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-408.js",
+ "description": "ES5 Attributes - Successfully add a property to an object when the object's prototype has a property with same name and [[Writable]] attribute is set to true (Date instance)",
+ "test": "assertTrue((function testcase() {\n try {\n Object.defineProperty(Date.prototype, \"prop\", {\n value: 1001,\n writable: true,\n enumerable: true,\n configurable: true\n });\n var dateObj = new Date();\n dateObj.prop = 1002;\n\n return dateObj.hasOwnProperty(\"prop\") && dateObj.prop === 1002;\n } finally {\n delete Date.prototype.prop;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-409",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-409.js",
+ "description": "ES5 Attributes - Inherited property whose [[Enumerable]] attribute is set to false is enumerable (RegExp instance)",
+ "test": "assertTrue((function testcase() {\n try {\n Object.defineProperty(RegExp.prototype, \"prop\", {\n value: 1001,\n writable: true,\n enumerable: true,\n configurable: true\n });\n var regObj = new RegExp();\n\n var verifyEnumerable = false;\n for (var p in regObj) {\n if (p === \"prop\") {\n verifyEnumerable = true;\n }\n }\n\n return !regObj.hasOwnProperty(\"prop\") && verifyEnumerable;\n } finally {\n delete RegExp.prototype.prop;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-41",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-41.js",
+ "description": "Object.defineProperty - 'O' is the JSON object that uses Object's [[GetOwnProperty]] method to access the 'name' property (8.12.9 step 1)",
+ "test": "assertTrue((function testcase() {\n\n try {\n Object.defineProperty(JSON, \"foo\", {\n value: 12,\n configurable: true\n });\n\n return dataPropertyAttributesAreCorrect(JSON, \"foo\", 12, false, false, true);\n } finally {\n delete JSON.foo;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-410",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-410.js",
+ "description": "ES5 Attributes - Failed to add a property to an object when the object's prototype has a property with the same name and [[Writable]] set to false (JSON)",
+ "test": "assertTrue((function testcase() {\n try {\n Object.defineProperty(Object.prototype, \"prop\", {\n value: 1001,\n writable: false,\n enumerable: false,\n configurable: true\n });\n JSON.prop = 1002;\n\n return !JSON.hasOwnProperty(\"prop\") && JSON.prop === 1001;\n } finally {\n delete Object.prototype.prop;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-411",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-411.js",
+ "description": "ES5 Attributes - Inherited property whose [[Enumerable]] attribute is set to false is non-enumerable (Math)",
+ "test": "assertTrue((function testcase() {\n try {\n Object.defineProperty(Object.prototype, \"prop\", {\n value: 1001,\n writable: false,\n enumerable: false,\n configurable: true\n });\n\n var verifyEnumerable = false;\n for (var p in Math) {\n if (p === \"prop\") {\n verifyEnumerable = true;\n }\n }\n\n return !Math.hasOwnProperty(\"prop\") && !verifyEnumerable;\n } finally {\n delete Object.prototype.prop;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-412",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-412.js",
+ "description": "ES5 Attributes - [[Value]] field of inherited property of [[Prototype]] internal property is correct(Object.create)",
+ "test": "assertTrue((function testcase() {\n var appointment = {};\n\n Object.defineProperty(appointment, \"startTime\", {\n value: 1001,\n writable: true,\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(appointment, \"name\", {\n value: \"NAME\",\n writable: true,\n enumerable: true,\n configurable: true\n });\n\n var meeting = Object.create(appointment);\n Object.defineProperty(meeting, \"conferenceCall\", {\n value: \"In-person meeting\",\n writable: true,\n enumerable: true,\n configurable: true\n });\n\n var teamMeeting = Object.create(meeting);\n\n var hasOwnProperty = !teamMeeting.hasOwnProperty(\"name\") &&\n !teamMeeting.hasOwnProperty(\"startTime\") &&\n !teamMeeting.hasOwnProperty('conferenceCall');\n\n return hasOwnProperty && teamMeeting.name === \"NAME\" &&\n teamMeeting.startTime === 1001 &&\n teamMeeting.conferenceCall === \"In-person meeting\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.create))"
+ },
+ {
+ "id": "15.2.3.6-4-413",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-413.js",
+ "description": "ES5 Attributes - Successfully add a property to an object when the object's prototype has a property with the same name and [[Writable]] set to true (Object.create)",
+ "test": "assertTrue((function testcase() {\n var appointment = {};\n\n Object.defineProperty(appointment, \"startTime\", {\n value: 1001,\n writable: true,\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(appointment, \"name\", {\n value: \"NAME\",\n writable: true,\n enumerable: true,\n configurable: true\n });\n\n var meeting = Object.create(appointment);\n Object.defineProperty(meeting, \"conferenceCall\", {\n value: \"In-person meeting\",\n writable: true,\n enumerable: true,\n configurable: true\n });\n\n var teamMeeting = Object.create(meeting);\n teamMeeting.name = \"Team Meeting\";\n var dateObj = new Date(\"10/31/2010 08:00\");\n teamMeeting.startTime = dateObj;\n teamMeeting.conferenceCall = \"4255551212\";\n\n var hasOwnProperty = teamMeeting.hasOwnProperty(\"name\") &&\n teamMeeting.hasOwnProperty(\"startTime\") &&\n teamMeeting.hasOwnProperty('conferenceCall');\n\n return hasOwnProperty && teamMeeting.name === \"Team Meeting\" &&\n teamMeeting.startTime === dateObj &&\n teamMeeting.conferenceCall === \"4255551212\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.create))"
+ },
+ {
+ "id": "15.2.3.6-4-414",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-414.js",
+ "description": "ES5 Attributes - Inherited property whose [[Enumerable]] attribute is set to true is enumerable (Object.create)",
+ "test": "assertTrue((function testcase() {\n var appointment = new Object();\n\n Object.defineProperty(appointment, \"startTime\", {\n value: 1001,\n writable: true,\n enumerable: true,\n configurable: true\n });\n Object.defineProperty(appointment, \"name\", {\n value: \"NAME\",\n writable: true,\n enumerable: true,\n configurable: true\n });\n\n var meeting = Object.create(appointment);\n Object.defineProperty(meeting, \"conferenceCall\", {\n value: \"In-person meeting\",\n writable: true,\n enumerable: true,\n configurable: true\n });\n\n var teamMeeting = Object.create(meeting);\n\n var verifyTimeProp = false;\n var verifyNameProp = false;\n var verifyCallProp = false;\n for (var p in teamMeeting) {\n if (p === \"startTime\") {\n verifyTimeProp = true;\n }\n if (p === \"name\") {\n verifyNameProp = true;\n }\n if (p === \"conferenceCall\") {\n verifyCallProp = true;\n }\n }\n\n var hasOwnProperty = !teamMeeting.hasOwnProperty(\"name\") &&\n !teamMeeting.hasOwnProperty(\"startTime\") &&\n !teamMeeting.hasOwnProperty(\"conferenceCall\");\n\n return hasOwnProperty && verifyTimeProp && verifyNameProp && verifyCallProp;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.create))"
+ },
+ {
+ "id": "15.2.3.6-4-415",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-415.js",
+ "description": "ES5 Attributes - Failed to add properties to an object when the object's prototype has properties with the same name and [[Writable]] set to false (Object.create)",
+ "test": "assertTrue((function testcase() {\n var appointment = new Object();\n\n Object.defineProperty(appointment, \"startTime\", {\n value: 1001,\n writable: false,\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(appointment, \"name\", {\n value: \"NAME\",\n writable: false,\n enumerable: false,\n configurable: true\n });\n\n var meeting = Object.create(appointment);\n Object.defineProperty(meeting, \"conferenceCall\", {\n value: \"In-person meeting\",\n writable: false,\n enumerable: false,\n configurable: true\n });\n\n var teamMeeting = Object.create(meeting);\n teamMeeting.name = \"Team Meeting\";\n var dateObj = new Date(\"10/31/2010 08:00\");\n teamMeeting.startTime = dateObj;\n teamMeeting.conferenceCall = \"4255551212\";\n\n var hasOwnProperty = !teamMeeting.hasOwnProperty(\"name\") &&\n !teamMeeting.hasOwnProperty(\"startTime\") &&\n !teamMeeting.hasOwnProperty('conferenceCall');\n\n return hasOwnProperty && teamMeeting.name === \"NAME\" &&\n teamMeeting.startTime === 1001 &&\n teamMeeting.conferenceCall === \"In-person meeting\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.create))"
+ },
+ {
+ "id": "15.2.3.6-4-416",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-416.js",
+ "description": "ES5 Attributes - Inherited properties whose [[Enumerable]] attribute is set to false is non-enumerable (Object.create)",
+ "test": "assertTrue((function testcase() {\n var appointment = {};\n\n Object.defineProperty(appointment, \"startTime\", {\n value: 1001,\n writable: false,\n enumerable: false,\n configurable: true\n });\n Object.defineProperty(appointment, \"name\", {\n value: \"NAME\",\n writable: false,\n enumerable: false,\n configurable: true\n });\n\n var meeting = Object.create(appointment);\n Object.defineProperty(meeting, \"conferenceCall\", {\n value: \"In-person meeting\",\n writable: false,\n enumerable: false,\n configurable: true\n });\n\n var teamMeeting = Object.create(meeting);\n\n var verifyTimeProp = false;\n var verifyNameProp = false;\n var verifyCallProp = false;\n for (var p in teamMeeting) {\n if (p === \"startTime\") {\n verifyTimeProp = true;\n }\n if (p === \"name\") {\n verifyNameProp = true;\n }\n if (p === \"conferenceCall\") {\n verifyCallProp = true;\n }\n }\n\n var hasOwnProperty = !teamMeeting.hasOwnProperty(\"name\") &&\n !teamMeeting.hasOwnProperty(\"startTime\") &&\n !teamMeeting.hasOwnProperty(\"conferenceCall\");\n\n return hasOwnProperty && !verifyTimeProp && !verifyNameProp && !verifyCallProp;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.create))"
+ },
+ {
+ "id": "15.2.3.6-4-417",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-417.js",
+ "description": "ES5 Attributes - [[Value]] attribute of inherited property of [[Prototype]] internal property is correct(Function.prototype.bind)",
+ "test": "assertTrue((function testcase() {\n var foo = function () { };\n try {\n Object.defineProperty(Function.prototype, \"prop\", {\n value: 1001,\n writable: true,\n enumerable: true,\n configurable: true\n });\n\n var obj = foo.bind({});\n\n return !obj.hasOwnProperty(\"prop\") && obj.prop === 1001;\n } finally {\n delete Function.prototype.prop;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Function.prototype.bind))"
+ },
+ {
+ "id": "15.2.3.6-4-418",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-418.js",
+ "description": "ES5 Attributes - Successfully add a property to an object when the object's prototype has a property with the same name and [[Writable]] set to true (Function.prototype.bind)",
+ "test": "assertTrue((function testcase() {\n var foo = function () { };\n try {\n Object.defineProperty(Function.prototype, \"prop\", {\n value: 1001,\n writable: true,\n enumerable: true,\n configurable: true\n });\n\n var obj = foo.bind({});\n obj.prop = 1002;\n\n return obj.hasOwnProperty(\"prop\") && obj.prop === 1002;\n } finally {\n delete Function.prototype.prop;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Function.prototype.bind))"
+ },
+ {
+ "id": "15.2.3.6-4-419",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-419.js",
+ "description": "ES5 Attributes - Inherited property whose [[Enumerable]] attribute is set to true is enumerable (Function.prototype.bind)",
+ "test": "assertTrue((function testcase() {\n var foo = function () { };\n try {\n Object.defineProperty(Function.prototype, \"prop\", {\n value: 1001,\n writable: true,\n enumerable: true,\n configurable: true\n });\n\n var obj = foo.bind({});\n var verifyEnumerable = false;\n for (var p in obj) {\n if (p === \"prop\") {\n verifyEnumerable = true;\n }\n }\n\n return !obj.hasOwnProperty(\"prop\") && verifyEnumerable;\n } finally {\n delete Function.prototype.prop;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Function.prototype.bind))"
+ },
+ {
+ "id": "15.2.3.6-4-42",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-42.js",
+ "description": "Object.defineProperty - 'O' is an Error object that uses Object's [[GetOwnProperty]] method to access the 'name' property (8.12.9 step 1)",
+ "test": "assertTrue((function testcase() {\n var desc = new Error();\n\n Object.defineProperty(desc, \"foo\", {\n value: 12,\n configurable: false\n });\n\n try {\n Object.defineProperty(desc, \"foo\", {\n value: 11,\n configurable: true\n });\n return false;\n } catch (e) {\n return e instanceof TypeError && desc.foo === 12;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-420",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-420.js",
+ "description": "ES5 Attributes - Failed to add a property to an object when the object's prototype has a property with the same name and [[Writable]] set to false(Function.prototype.bind)",
+ "test": "assertTrue((function testcase() {\n var foo = function () { };\n try {\n Object.defineProperty(Function.prototype, \"prop\", {\n value: 1001,\n writable: false,\n enumerable: false,\n configurable: true\n });\n\n var obj = foo.bind({});\n obj.prop = 1002;\n\n return !obj.hasOwnProperty(\"prop\") && obj.prop === 1001;\n } finally {\n delete Function.prototype.prop;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Function.prototype.bind))"
+ },
+ {
+ "id": "15.2.3.6-4-421",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-421.js",
+ "description": "ES5 Attributes - Inherited property whose [[Enumerable]] attribute is set to false is non-enumerable (Function.prototype.bind)",
+ "test": "assertTrue((function testcase() {\n var foo = function () { };\n try {\n Object.defineProperty(Function.prototype, \"prop\", {\n value: 1001,\n writable: false,\n enumerable: false,\n configurable: true\n });\n\n var obj = foo.bind({});\n var verifyEnumerable = false;\n for (var p in obj) {\n if (p === \"prop\") {\n verifyEnumerable = true;\n }\n }\n\n return !obj.hasOwnProperty(\"prop\") && !verifyEnumerable;\n } finally {\n delete Function.prototype.prop;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Function.prototype.bind))"
+ },
+ {
+ "id": "15.2.3.6-4-422",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-422.js",
+ "description": "ES5 Attributes - [[Get]] attribute of accessor property ([[Get]] is undefined, [[Set]] is undefined, [[Enumerable]] is true, [[Configurable]] is true) is undefined",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n Object.defineProperty(obj, \"prop\", {\n get: undefined,\n set: undefined,\n enumerable: true,\n configurable: true\n });\n\n var propertyDefineCorrect = obj.hasOwnProperty(\"prop\");\n var desc = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n return propertyDefineCorrect && typeof desc.get === \"undefined\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-423",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-423.js",
+ "description": "ES5 Attributes - [[Set]] attribute of accessor property ([[Get]] is undefined, [[Set]] is undefined, [[Enumerable]] is true, [[Configurable]] is true) is undefined",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n Object.defineProperty(obj, \"prop\", {\n get: undefined,\n set: undefined,\n enumerable: true,\n configurable: true\n });\n\n var propertyDefineCorrect = obj.hasOwnProperty(\"prop\");\n var desc = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n return propertyDefineCorrect && typeof desc.set === \"undefined\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-424",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-424.js",
+ "description": "ES5 Attributes - property ([[Get]] is undefined, [[Set]] is undefined, [[Enumerable]] is true, [[Configurable]] is true) is enumerable",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n Object.defineProperty(obj, \"prop\", {\n get: undefined,\n set: undefined,\n enumerable: true,\n configurable: true\n });\n\n var propertyDefineCorrect = obj.hasOwnProperty(\"prop\");\n var desc = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n for (var p in obj) {\n if (p === \"prop\") {\n return propertyDefineCorrect && desc.enumerable === true;\n }\n }\n\n return false;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-425",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-425.js",
+ "description": "ES5 Attributes - property ([[Get]] is undefined, [[Set]] is undefined, [[Enumerable]] is true, [[Configurable]] is true) is deletable",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n Object.defineProperty(obj, \"prop\", {\n get: undefined,\n set: undefined,\n enumerable: true,\n configurable: true\n });\n\n var propertyDefineCorrect = obj.hasOwnProperty(\"prop\");\n var desc = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n delete obj.prop;\n\n return propertyDefineCorrect && desc.configurable === true && !obj.hasOwnProperty(\"prop\");\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-426",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-426.js",
+ "description": "ES5 Attributes - success to update [[Get]] attribute of accessor property ([[Get]] is undefined, [[Set]] is undefined, [[Enumerable]] is true, [[Configurable]] is true) to different value",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n var getFunc = function () {\n return 1001;\n };\n\n Object.defineProperty(obj, \"prop\", {\n get: undefined,\n set: undefined,\n enumerable: true,\n configurable: true\n });\n\n var result1 = typeof obj.prop === \"undefined\";\n var desc1 = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n Object.defineProperty(obj, \"prop\", {\n get: getFunc\n });\n\n var result2 = obj.prop === 1001;\n var desc2 = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n return result1 && result2 && typeof desc1.get === \"undefined\" && desc2.get === getFunc;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-427",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-427.js",
+ "description": "ES5 Attributes - success to update [[Set]] attribute of accessor property ([[Get]] is undefined, [[Set]] is undefined, [[Enumerable]] is true, [[Configurable]] is true) to different value",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n var verifySetFunc = \"data\";\n var setFunc = function (value) {\n verifySetFunc = value;\n };\n\n Object.defineProperty(obj, \"prop\", {\n get: undefined,\n set: undefined,\n enumerable: true,\n configurable: true\n });\n\n var desc1 = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n Object.defineProperty(obj, \"prop\", {\n set: setFunc\n });\n\n obj.prop = \"overrideData\";\n var propertyDefineCorrect = obj.hasOwnProperty(\"prop\");\n var desc2 = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n return propertyDefineCorrect && typeof desc1.set === \"undefined\" && desc2.set === setFunc && verifySetFunc === \"overrideData\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-428",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-428.js",
+ "description": "ES5 Attributes - success to update [[Enumerable]] attribute of accessor property ([[Get]] is undefined, [[Set]] is undefined, [[Enumerable]] is true, [[Configurable]] is true) to different value",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n Object.defineProperty(obj, \"prop\", {\n get: undefined,\n set: undefined,\n enumerable: true,\n configurable: true\n });\n var result1 = false;\n var desc1 = Object.getOwnPropertyDescriptor(obj, \"prop\");\n for (var p1 in obj) {\n if (p1 === \"prop\") {\n result1 = true;\n }\n }\n\n Object.defineProperty(obj, \"prop\", {\n enumerable: false\n });\n var result2 = false;\n var desc2 = Object.getOwnPropertyDescriptor(obj, \"prop\");\n for (var p2 in obj) {\n if (p2 === \"prop\") {\n result2 = true;\n }\n }\n\n return result1 && !result2 && desc1.enumerable === true && desc2.enumerable === false;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-429",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-429.js",
+ "description": "ES5 Attributes - success to update [[Configurable]] attribute of accessor property ([[Get]] is undefined, [[Set]] is undefined, [[Enumerable]] is true, [[Configurable]] is true) to different value",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n Object.defineProperty(obj, \"prop\", {\n get: undefined,\n set: undefined,\n enumerable: true,\n configurable: true\n });\n var desc1 = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n Object.defineProperty(obj, \"prop\", {\n configurable: false\n });\n var desc2 = Object.getOwnPropertyDescriptor(obj, \"prop\");\n delete obj.prop;\n\n return desc1.configurable === true && desc2.configurable === false && obj.hasOwnProperty(\"prop\");\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-43",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-43.js",
+ "description": "Object.defineProperty - 'O' is an Arguments object which implements its own [[GetOwnProperty]] method to access the 'name' property (8.12.9 step 1)",
+ "test": "assertTrue((function testcase() {\n var argObj = (function () { return arguments; })();\n\n Object.defineProperty(argObj, \"foo\", {\n value: 12,\n configurable: false\n });\n\n try {\n Object.defineProperty(argObj, \"foo\", {\n value: 11,\n configurable: true\n });\n return false;\n } catch (e) {\n return e instanceof TypeError && argObj.foo === 12;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-430",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-430.js",
+ "description": "ES5 Attributes - success to update the accessor property ([[Get]] is undefined, [[Set]] is undefined, [[Enumerable]] is true, [[Configurable]] is true) to a data property",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n Object.defineProperty(obj, \"prop\", {\n get: undefined,\n set: undefined,\n enumerable: true,\n configurable: true\n });\n var desc1 = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n Object.defineProperty(obj, \"prop\", {\n value: 1001\n });\n var desc2 = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n return desc1.hasOwnProperty(\"get\") && desc2.hasOwnProperty(\"value\");\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-431",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-431.js",
+ "description": "ES5 Attributes - [[Get]] attribute of accessor property ([[Get]] is undefined, [[Set]] is undefined, [[Enumerable]] is true, [[Configurable]] is false) is undefined",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n Object.defineProperty(obj, \"prop\", {\n get: undefined,\n set: undefined,\n enumerable: true,\n configurable: false\n });\n\n var propertyDefineCorrect = obj.hasOwnProperty(\"prop\");\n var desc = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n return propertyDefineCorrect && typeof desc.get === \"undefined\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-432",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-432.js",
+ "description": "ES5 Attributes - [[Set]] attribute of accessor property ([[Get]] is undefined, [[Set]] is undefined, [[Enumerable]] is true, [[Configurable]] is false) is undefined",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n Object.defineProperty(obj, \"prop\", {\n get: undefined,\n set: undefined,\n enumerable: true,\n configurable: false\n });\n\n var propertyDefineCorrect = obj.hasOwnProperty(\"prop\");\n var desc = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n return propertyDefineCorrect && typeof desc.set === \"undefined\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-433",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-433.js",
+ "description": "ES5 Attributes - property ([[Get]] is undefined, [[Set]] is undefined, [[Enumerable]] is true, [[Configurable]] is false) is enumerable",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n Object.defineProperty(obj, \"prop\", {\n get: undefined,\n set: undefined,\n enumerable: true,\n configurable: false\n });\n\n var propertyDefineCorrect = obj.hasOwnProperty(\"prop\");\n var desc = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n for (var p in obj) {\n if (p === \"prop\") {\n return propertyDefineCorrect && desc.enumerable === true;\n }\n }\n\n return false;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-434",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-434.js",
+ "description": "ES5 Attributes - property ([[Get]] is undefined, [[Set]] is undefined, [[Enumerable]] is true, [[Configurable]] is false) is undeletable",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n Object.defineProperty(obj, \"prop\", {\n get: undefined,\n set: undefined,\n enumerable: true,\n configurable: false\n });\n\n var propertyDefineCorrect = obj.hasOwnProperty(\"prop\");\n var desc = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n delete obj.prop;\n\n return propertyDefineCorrect && desc.configurable === false && obj.hasOwnProperty(\"prop\");\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-435",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-435.js",
+ "description": "ES5 Attributes - fail to update [[Get]] attribute of accessor property ([[Get]] is undefined, [[Set]] is undefined, [[Enumerable]] is true, [[Configurable]] is false) to different value",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n var getFunc = function () {\n return 1001;\n };\n\n Object.defineProperty(obj, \"prop\", {\n get: undefined,\n set: undefined,\n enumerable: true,\n configurable: false\n });\n\n var result1 = typeof obj.prop === \"undefined\";\n var desc1 = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n try {\n Object.defineProperty(obj, \"prop\", {\n get: getFunc\n });\n\n return false;\n } catch (e) {\n var result2 = typeof obj.prop === \"undefined\";\n var desc2 = Object.getOwnPropertyDescriptor(obj, \"prop\");\n return result1 && result2 && typeof desc1.get === \"undefined\" && typeof desc2.get === \"undefined\" && e instanceof TypeError;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-436",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-436.js",
+ "description": "ES5 Attributes - fail to update [[Set]] attribute of accessor property ([[Get]] is undefined, [[Set]] is undefined, [[Enumerable]] is true, [[Configurable]] is false) to different value",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n var verifySetFunc = \"data\";\n var setFunc = function (value) {\n verifySetFunc = value;\n };\n\n Object.defineProperty(obj, \"prop\", {\n get: undefined,\n set: undefined,\n enumerable: true,\n configurable: false\n });\n\n var desc1 = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n try {\n Object.defineProperty(obj, \"prop\", {\n set: setFunc\n });\n\n return false;\n } catch (e) {\n var desc2 = Object.getOwnPropertyDescriptor(obj, \"prop\");\n return typeof desc1.set === \"undefined\" && typeof desc2.set === \"undefined\" && e instanceof TypeError;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-437",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-437.js",
+ "description": "ES5 Attributes - fail to update [[Enumerable]] attribute of accessor property ([[Get]] is undefined, [[Set]] is undefined, [[Enumerable]] is true, [[Configurable]] is false) to different value",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n Object.defineProperty(obj, \"prop\", {\n get: undefined,\n set: undefined,\n enumerable: true,\n configurable: false\n });\n var result1 = false;\n var desc1 = Object.getOwnPropertyDescriptor(obj, \"prop\");\n for (var p1 in obj) {\n if (p1 === \"prop\") {\n result1 = true;\n }\n }\n\n try {\n Object.defineProperty(obj, \"prop\", {\n enumerable: false\n });\n\n return false;\n } catch (e) {\n var result2 = false;\n var desc2 = Object.getOwnPropertyDescriptor(obj, \"prop\");\n for (var p2 in obj) {\n if (p2 === \"prop\") {\n result2 = true;\n }\n }\n\n return result1 && result2 && desc1.enumerable === true && desc2.enumerable === true && e instanceof TypeError;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-438",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-438.js",
+ "description": "ES5 Attributes - fail to update [[Configurable]] attribute of accessor property ([[Get]] is undefined, [[Set]] is undefined, [[Enumerable]] is true, [[Configurable]] is false) to different value",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n Object.defineProperty(obj, \"prop\", {\n get: undefined,\n set: undefined,\n enumerable: true,\n configurable: false\n });\n var desc1 = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n try {\n Object.defineProperty(obj, \"prop\", {\n configurable: true\n });\n\n return false;\n } catch (e) {\n var desc2 = Object.getOwnPropertyDescriptor(obj, \"prop\");\n delete obj.prop;\n\n return desc1.configurable === false && desc2.configurable === false && obj.hasOwnProperty(\"prop\") && e instanceof TypeError;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-439",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-439.js",
+ "description": "ES5 Attributes - fail to update the accessor property ([[Get]] is undefined, [[Set]] is undefined, [[Enumerable]] is true, [[Configurable]] is false) to a data property",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n Object.defineProperty(obj, \"prop\", {\n get: undefined,\n set: undefined,\n enumerable: true,\n configurable: false\n });\n var desc1 = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n try {\n Object.defineProperty(obj, \"prop\", {\n value: 1001\n });\n\n return false;\n } catch (e) {\n var desc2 = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n return desc1.hasOwnProperty(\"get\") && !desc2.hasOwnProperty(\"value\") && e instanceof TypeError;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-440",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-440.js",
+ "description": "ES5 Attributes - [[Get]] attribute of accessor property ([[Get]] is undefined, [[Set]] is undefined, [[Enumerable]] is false, [[Configurable]] is true) is undefined",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n Object.defineProperty(obj, \"prop\", {\n get: undefined,\n set: undefined,\n enumerable: false,\n configurable: true\n });\n\n var propertyDefineCorrect = obj.hasOwnProperty(\"prop\");\n var desc = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n return propertyDefineCorrect && typeof desc.get === \"undefined\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-441",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-441.js",
+ "description": "ES5 Attributes - [[Set]] attribute of accessor property ([[Get]] is undefined, [[Set]] is undefined, [[Enumerable]] is false, [[Configurable]] is true) is undefined",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n Object.defineProperty(obj, \"prop\", {\n get: undefined,\n set: undefined,\n enumerable: false,\n configurable: true\n });\n\n var propertyDefineCorrect = obj.hasOwnProperty(\"prop\");\n var desc = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n return propertyDefineCorrect && typeof desc.set === \"undefined\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-442",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-442.js",
+ "description": "ES5 Attributes - property ([[Get]] is undefined, [[Set]] is undefined, [[Enumerable]] is false, [[Configurable]] is true) is non-enumerable",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n Object.defineProperty(obj, \"prop\", {\n get: undefined,\n set: undefined,\n enumerable: false,\n configurable: true\n });\n\n var propertyDefineCorrect = obj.hasOwnProperty(\"prop\");\n var desc = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n for (var p in obj) {\n if (p === \"prop\") {\n return false;\n }\n }\n\n return propertyDefineCorrect && desc.enumerable === false;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-443",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-443.js",
+ "description": "ES5 Attributes - property ([[Get]] is undefined, [[Set]] is undefined, [[Enumerable]] is false, [[Configurable]] is true) is deletable",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n Object.defineProperty(obj, \"prop\", {\n get: undefined,\n set: undefined,\n enumerable: false,\n configurable: true\n });\n\n var propertyDefineCorrect = obj.hasOwnProperty(\"prop\");\n var desc = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n delete obj.prop;\n\n return propertyDefineCorrect && desc.configurable === true && !obj.hasOwnProperty(\"prop\");\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-444",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-444.js",
+ "description": "ES5 Attributes - success to update [[Get]] attribute of accessor property ([[Get]] is undefined, [[Set]] is undefined, [[Enumerable]] is false, [[Configurable]] is true) to different value",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n var getFunc = function () {\n return 1001;\n };\n\n Object.defineProperty(obj, \"prop\", {\n get: undefined,\n set: undefined,\n enumerable: false,\n configurable: true\n });\n\n var result1 = typeof obj.prop === \"undefined\";\n var desc1 = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n Object.defineProperty(obj, \"prop\", {\n get: getFunc\n });\n\n var result2 = obj.prop === 1001;\n var desc2 = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n return result1 && result2 && typeof desc1.get === \"undefined\" && desc2.get === getFunc;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-445",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-445.js",
+ "description": "ES5 Attributes - success to update [[Set]] attribute of accessor property ([[Get]] is undefined, [[Set]] is undefined, [[Enumerable]] is false, [[Configurable]] is true) to different value",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n var verifySetFunc = \"data\";\n var setFunc = function (value) {\n verifySetFunc = value;\n };\n\n Object.defineProperty(obj, \"prop\", {\n get: undefined,\n set: undefined,\n enumerable: false,\n configurable: true\n });\n\n var desc1 = Object.getOwnPropertyDescriptor(obj, \"prop\");\n var propertyDefineCorrect = obj.hasOwnProperty(\"prop\");\n\n Object.defineProperty(obj, \"prop\", {\n set: setFunc\n });\n\n obj.prop = \"overrideData\";\n var desc2 = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n return typeof desc1.set === \"undefined\" && propertyDefineCorrect && desc2.set === setFunc && verifySetFunc === \"overrideData\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-446",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-446.js",
+ "description": "ES5 Attributes - success to update [[Enumerable]] attribute of accessor property ([[Get]] is undefined, [[Set]] is undefined, [[Enumerable]] is false, [[Configurable]] is true) to different value",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n Object.defineProperty(obj, \"prop\", {\n get: undefined,\n set: undefined,\n enumerable: false,\n configurable: true\n });\n var result1 = false;\n var desc1 = Object.getOwnPropertyDescriptor(obj, \"prop\");\n for (var p1 in obj) {\n if (p1 === \"prop\") {\n result1 = true;\n }\n }\n\n Object.defineProperty(obj, \"prop\", {\n enumerable: true\n });\n var result2 = false;\n var desc2 = Object.getOwnPropertyDescriptor(obj, \"prop\");\n for (var p2 in obj) {\n if (p2 === \"prop\") {\n result2 = true;\n }\n }\n\n return !result1 && result2 && desc1.enumerable === false && desc2.enumerable === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-447",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-447.js",
+ "description": "ES5 Attributes - success to update [[Configurable]] attribute of accessor property ([[Get]] is undefined, [[Set]] is undefined, [[Enumerable]] is false, [[Configurable]] is true) to different value",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n Object.defineProperty(obj, \"prop\", {\n get: undefined,\n set: undefined,\n enumerable: false,\n configurable: true\n });\n var desc1 = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n Object.defineProperty(obj, \"prop\", {\n configurable: false\n });\n var desc2 = Object.getOwnPropertyDescriptor(obj, \"prop\");\n delete obj.prop;\n\n return desc1.configurable === true && desc2.configurable === false && obj.hasOwnProperty(\"prop\");\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-448",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-448.js",
+ "description": "ES5 Attributes - success to update the accessor property ([[Get]] is undefined, [[Set]] is undefined, [[Enumerable]] is false, [[Configurable]] is true) to a data property",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n Object.defineProperty(obj, \"prop\", {\n get: undefined,\n set: undefined,\n enumerable: false,\n configurable: true\n });\n var desc1 = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n Object.defineProperty(obj, \"prop\", {\n value: 1001\n });\n var desc2 = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n return desc1.hasOwnProperty(\"get\") && desc2.hasOwnProperty(\"value\");\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-449",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-449.js",
+ "description": "ES5 Attributes - [[Get]] attribute of accessor property ([[Get]] is undefined, [[Set]] is undefined, [[Enumerable]] is false, [[Configurable]] is false) is undefined",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n Object.defineProperty(obj, \"prop\", {\n get: undefined,\n set: undefined,\n enumerable: false,\n configurable: false\n });\n\n var propertyDefineCorrect = obj.hasOwnProperty(\"prop\");\n var desc = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n return propertyDefineCorrect && typeof desc.get === \"undefined\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-45",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-45.js",
+ "description": "Object.defineProperty - 'O' is the global object that uses Object's [[GetOwnProperty]] method to access the 'name' property (8.12.9 step 1)",
+ "test": "assertTrue((function testcase() {\n try {\n Object.defineProperty(fnGlobalObject(), \"foo\", {\n value: 12,\n configurable: true\n });\n\n return dataPropertyAttributesAreCorrect(fnGlobalObject(), \"foo\", 12, false, false, true);\n } finally {\n delete fnGlobalObject().foo;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-450",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-450.js",
+ "description": "ES5 Attributes - [[Set]] attribute of accessor property ([[Get]] is undefined, [[Set]] is undefined, [[Enumerable]] is false, [[Configurable]] is false) is undefined",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n Object.defineProperty(obj, \"prop\", {\n get: undefined,\n set: undefined,\n enumerable: false,\n configurable: false\n });\n\n var propertyDefineCorrect = obj.hasOwnProperty(\"prop\");\n var desc = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n return propertyDefineCorrect && typeof desc.set === \"undefined\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-451",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-451.js",
+ "description": "ES5 Attributes - property ([[Get]] is undefined, [[Set]] is undefined, [[Enumerable]] is false, [[Configurable]] is false) is non-enumerable",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n Object.defineProperty(obj, \"prop\", {\n get: undefined,\n set: undefined,\n enumerable: false,\n configurable: false\n });\n\n var propertyDefineCorrect = obj.hasOwnProperty(\"prop\");\n var desc = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n for (var p in obj) {\n if (p === \"prop\") {\n return false;\n }\n }\n\n return propertyDefineCorrect && desc.enumerable === false;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-452",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-452.js",
+ "description": "ES5 Attributes - property ([[Get]] is undefined, [[Set]] is undefined, [[Enumerable]] is false, [[Configurable]] is false) is undeletable",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n Object.defineProperty(obj, \"prop\", {\n get: undefined,\n set: undefined,\n enumerable: false,\n configurable: false\n });\n\n var propertyDefineCorrect = obj.hasOwnProperty(\"prop\");\n var desc = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n delete obj.prop;\n\n return propertyDefineCorrect && desc.configurable === false && obj.hasOwnProperty(\"prop\");\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-453",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-453.js",
+ "description": "ES5 Attributes - fail to update [[Get]] attribute of accessor property ([[Get]] is undefined, [[Set]] is undefined, [[Enumerable]] is false, [[Configurable]] is false) to different value",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n var getFunc = function () {\n return 1001;\n };\n\n Object.defineProperty(obj, \"prop\", {\n get: undefined,\n set: undefined,\n enumerable: false,\n configurable: false\n });\n\n var result1 = typeof obj.prop === \"undefined\";\n var desc1 = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n try {\n Object.defineProperty(obj, \"prop\", {\n get: getFunc\n });\n\n return false;\n } catch (e) {\n var result2 = typeof obj.prop === \"undefined\";\n var desc2 = Object.getOwnPropertyDescriptor(obj, \"prop\");\n return result1 && result2 && typeof desc1.get === \"undefined\" && typeof desc2.get === \"undefined\" && e instanceof TypeError;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-454",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-454.js",
+ "description": "ES5 Attributes - fail to update [[Set]] attribute of accessor property ([[Get]] is undefined, [[Set]] is undefined, [[Enumerable]] is false, [[Configurable]] is false) to different value",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n var verifySetFunc = \"data\";\n var setFunc = function (value) {\n verifySetFunc = value;\n };\n\n Object.defineProperty(obj, \"prop\", {\n get: undefined,\n set: undefined,\n enumerable: false,\n configurable: false\n });\n\n var desc1 = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n try {\n Object.defineProperty(obj, \"prop\", {\n set: setFunc\n });\n\n return false;\n } catch (e) {\n var desc2 = Object.getOwnPropertyDescriptor(obj, \"prop\");\n return typeof desc1.set === \"undefined\" && typeof desc2.set === \"undefined\" && e instanceof TypeError;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-455",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-455.js",
+ "description": "ES5 Attributes - fail to update [[Enumerable]] attribute of accessor property ([[Get]] is undefined, [[Set]] is undefined, [[Enumerable]] is false, [[Configurable]] is false) to different value",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n Object.defineProperty(obj, \"prop\", {\n get: undefined,\n set: undefined,\n enumerable: false,\n configurable: false\n });\n var result1 = false;\n var desc1 = Object.getOwnPropertyDescriptor(obj, \"prop\");\n for (var p1 in obj) {\n if (p1 === \"prop\") {\n result1 = true;\n }\n }\n\n try {\n Object.defineProperty(obj, \"prop\", {\n enumerable: true\n });\n\n return false;\n } catch (e) {\n var result2 = false;\n var desc2 = Object.getOwnPropertyDescriptor(obj, \"prop\");\n for (var p2 in obj) {\n if (p2 === \"prop\") {\n result2 = true;\n }\n }\n\n return !result1 && !result2 && desc1.enumerable === false && desc2.enumerable === false && e instanceof TypeError;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-456",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-456.js",
+ "description": "ES5 Attributes - fail to update [[Configurable]] attribute of accessor property ([[Get]] is undefined, [[Set]] is undefined, [[Enumerable]] is false, [[Configurable]] is false) to different value",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n Object.defineProperty(obj, \"prop\", {\n get: undefined,\n set: undefined,\n enumerable: false,\n configurable: false\n });\n var desc1 = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n try {\n Object.defineProperty(obj, \"prop\", {\n configurable: true\n });\n\n return false;\n } catch (e) {\n var desc2 = Object.getOwnPropertyDescriptor(obj, \"prop\");\n delete obj.prop;\n\n return desc1.configurable === false && desc2.configurable === false && obj.hasOwnProperty(\"prop\") && e instanceof TypeError;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-457",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-457.js",
+ "description": "ES5 Attributes - fail to update the accessor property ([[Get]] is undefined, [[Set]] is undefined, [[Enumerable]] is false, [[Configurable]] is false) to a data property",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n Object.defineProperty(obj, \"prop\", {\n get: undefined,\n set: undefined,\n enumerable: false,\n configurable: false\n });\n var desc1 = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n try {\n Object.defineProperty(obj, \"prop\", {\n value: 1001\n });\n\n return false;\n } catch (e) {\n var desc2 = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n return desc1.hasOwnProperty(\"get\") && !desc2.hasOwnProperty(\"value\") && e instanceof TypeError;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-458",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-458.js",
+ "description": "ES5 Attributes - [[Get]] attribute of accessor property ([[Get]] is undefined, [[Set]] is a Function, [[Enumerable]] is true, [[Configurable]] is true) is undefined",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n var verifySetFunc = \"data\";\n var setFunc = function (value) {\n verifySetFunc = value;\n };\n\n Object.defineProperty(obj, \"prop\", {\n get: undefined,\n set: setFunc,\n enumerable: true,\n configurable: true\n });\n\n var propertyDefineCorrect = obj.hasOwnProperty(\"prop\");\n var desc = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n return propertyDefineCorrect && typeof desc.get === \"undefined\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-459",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-459.js",
+ "description": "ES5 Attributes - [[Set]] attribute of accessor property ([[Get]] is undefined, [[Set]] is a Function, [[Enumerable]] is true, [[Configurable]] is true) is the expected function",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n var verifySetFunc = \"data\";\n var setFunc = function (value) {\n verifySetFunc = value;\n };\n\n Object.defineProperty(obj, \"prop\", {\n get: undefined,\n set: setFunc,\n enumerable: true,\n configurable: true\n });\n\n obj.prop = \"overrideData\";\n var propertyDefineCorrect = obj.hasOwnProperty(\"prop\");\n var desc = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n return propertyDefineCorrect && desc.set === setFunc && verifySetFunc === \"overrideData\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-46",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-46.js",
+ "description": "Object.defineProperty - 'name' is defined as data property if 'name' property doesn't exist in 'O' and 'desc' is generic descriptor (8.12.9 step 4.a)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n Object.defineProperty(obj, \"property\", {\n enumerable: true\n });\n\n var isEnumerable = false;\n for (var item in obj) {\n if (obj.hasOwnProperty(item) && item === \"property\") {\n isEnumerable = true;\n }\n }\n\n return obj.hasOwnProperty(\"property\") && isEnumerable;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-460",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-460.js",
+ "description": "ES5 Attributes - property ([[Get]] is undefined, [[Set]] is a Function, [[Enumerable]] is true, [[Configurable]] is true) is enumerable",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n var verifySetFunc = \"data\";\n var setFunc = function (value) {\n verifySetFunc = value;\n };\n\n Object.defineProperty(obj, \"prop\", {\n get: undefined,\n set: setFunc,\n enumerable: true,\n configurable: true\n });\n\n var propertyDefineCorrect = obj.hasOwnProperty(\"prop\");\n var desc = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n for (var p in obj) {\n if (p === \"prop\") {\n return propertyDefineCorrect && desc.enumerable === true;\n }\n }\n\n return false;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-461",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-461.js",
+ "description": "ES5 Attributes - property ([[Get]] is undefined, [[Set]] is a Function, [[Enumerable]] is true, [[Configurable]] is true) is deletable",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n var verifySetFunc = \"data\";\n var setFunc = function (value) {\n verifySetFunc = value;\n };\n\n Object.defineProperty(obj, \"prop\", {\n get: undefined,\n set: setFunc,\n enumerable: true,\n configurable: true\n });\n\n var propertyDefineCorrect = obj.hasOwnProperty(\"prop\");\n var desc = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n delete obj.prop;\n\n return propertyDefineCorrect && desc.configurable === true && !obj.hasOwnProperty(\"prop\");\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-462",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-462.js",
+ "description": "ES5 Attributes - success to update [[Get]] attribute of accessor property ([[Get]] is undefined, [[Set]] is a Function, [[Enumerable]] is true, [[Configurable]] is true) to different value",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n var getFunc = function () {\n return 1001;\n };\n\n var verifySetFunc = \"data\";\n var setFunc = function (value) {\n verifySetFunc = value;\n };\n\n Object.defineProperty(obj, \"prop\", {\n get: undefined,\n set: setFunc,\n enumerable: true,\n configurable: true\n });\n\n var result1 = typeof obj.prop === \"undefined\";\n var desc1 = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n Object.defineProperty(obj, \"prop\", {\n get: getFunc\n });\n\n var result2 = obj.prop === 1001;\n var desc2 = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n return result1 && result2 && typeof desc1.get === \"undefined\" && desc2.get === getFunc;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-463",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-463.js",
+ "description": "ES5 Attributes - success to update [[Set]] attribute of accessor property ([[Get]] is undefined, [[Set]] is a Function, [[Enumerable]] is true, [[Configurable]] is true) to different value",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n var verifySetFunc = \"data\";\n var setFunc = function (value) {\n verifySetFunc = value;\n };\n\n Object.defineProperty(obj, \"prop\", {\n get: undefined,\n set: setFunc,\n enumerable: true,\n configurable: true\n });\n\n var desc1 = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n Object.defineProperty(obj, \"prop\", {\n set: undefined\n });\n\n var desc2 = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n return desc1.set === setFunc && typeof desc2.set === \"undefined\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-464",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-464.js",
+ "description": "ES5 Attributes - success to update [[Enumerable]] attribute of accessor property ([[Get]] is undefined, [[Set]] is a Function, [[Enumerable]] is true, [[Configurable]] is true) to different value",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n var verifySetFunc = \"data\";\n var setFunc = function (value) {\n verifySetFunc = value;\n };\n\n Object.defineProperty(obj, \"prop\", {\n get: undefined,\n set: setFunc,\n enumerable: true,\n configurable: true\n });\n\n var result1 = false;\n var desc1 = Object.getOwnPropertyDescriptor(obj, \"prop\");\n for (var p1 in obj) {\n if (p1 === \"prop\") {\n result1 = true;\n }\n }\n\n Object.defineProperty(obj, \"prop\", {\n enumerable: false\n });\n var result2 = false;\n var desc2 = Object.getOwnPropertyDescriptor(obj, \"prop\");\n for (var p2 in obj) {\n if (p2 === \"prop\") {\n result2 = true;\n }\n }\n\n return result1 && !result2 && desc1.enumerable === true && desc2.enumerable === false;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-465",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-465.js",
+ "description": "ES5 Attributes - success to update [[Configurable]] attribute of accessor property ([[Get]] is undefined, [[Set]] is a Function, [[Enumerable]] is true, [[Configurable]] is true) to different value",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n var verifySetFunc = \"data\";\n var setFunc = function (value) {\n verifySetFunc = value;\n };\n\n Object.defineProperty(obj, \"prop\", {\n get: undefined,\n set: setFunc,\n enumerable: true,\n configurable: true\n });\n var desc1 = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n Object.defineProperty(obj, \"prop\", {\n configurable: false\n });\n var desc2 = Object.getOwnPropertyDescriptor(obj, \"prop\");\n delete obj.prop;\n\n return desc1.configurable === true && desc2.configurable === false && obj.hasOwnProperty(\"prop\");\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-466",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-466.js",
+ "description": "ES5 Attributes - success to update the accessor property ([[Get]] is undefined, [[Set]] is a Function, [[Enumerable]] is true, [[Configurable]] is true) to a data property",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n var verifySetFunc = \"data\";\n var setFunc = function (value) {\n verifySetFunc = value;\n };\n\n Object.defineProperty(obj, \"prop\", {\n get: undefined,\n set: setFunc,\n enumerable: true,\n configurable: true\n });\n var desc1 = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n Object.defineProperty(obj, \"prop\", {\n value: 1001\n });\n var desc2 = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n return desc1.hasOwnProperty(\"get\") && desc2.hasOwnProperty(\"value\");\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-467",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-467.js",
+ "description": "ES5 Attributes - [[Get]] attribute of accessor property ([[Get]] is undefined, [[Set]] is a Function, [[Enumerable]] is true, [[Configurable]] is false) is undefined",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n var verifySetFunc = \"data\";\n var setFunc = function (value) {\n verifySetFunc = value;\n };\n\n Object.defineProperty(obj, \"prop\", {\n get: undefined,\n set: setFunc,\n enumerable: true,\n configurable: false\n });\n\n var propertyDefineCorrect = obj.hasOwnProperty(\"prop\");\n var desc = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n return propertyDefineCorrect && typeof desc.get === \"undefined\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-468",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-468.js",
+ "description": "ES5 Attributes - [[Set]] attribute of accessor property ([[Get]] is undefined, [[Set]] is a Function, [[Enumerable]] is true, [[Configurable]] is false) is the expected function",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n var verifySetFunc = \"data\";\n var setFunc = function (value) {\n verifySetFunc = value;\n };\n\n Object.defineProperty(obj, \"prop\", {\n get: undefined,\n set: setFunc,\n enumerable: true,\n configurable: false\n });\n\n obj.prop = \"overrideData\";\n var propertyDefineCorrect = obj.hasOwnProperty(\"prop\");\n var desc = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n return propertyDefineCorrect && desc.set === setFunc && verifySetFunc === \"overrideData\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-469",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-469.js",
+ "description": "ES5 Attributes - property ([[Get]] is undefined, [[Set]] is a Function, [[Enumerable]] is true, [[Configurable]] is false) is enumerable",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n var verifySetFunc = \"data\";\n var setFunc = function (value) {\n verifySetFunc = value;\n };\n\n Object.defineProperty(obj, \"prop\", {\n get: undefined,\n set: setFunc,\n enumerable: true,\n configurable: false\n });\n\n var propertyDefineCorrect = obj.hasOwnProperty(\"prop\");\n var desc = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n for (var p in obj) {\n if (p === \"prop\") {\n return propertyDefineCorrect && desc.enumerable === true;\n }\n }\n\n return false;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-47",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-47.js",
+ "description": "Object.defineProperty - 'name' property doesn't exist in 'O', [[Value]] of 'name' property is set as undefined if it is absent in data descriptor 'desc' (8.12.9 step 4.a.i)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n Object.defineProperty(obj, \"property\", {\n writable: true,\n enumerable: true,\n configurable: false\n });\n\n return dataPropertyAttributesAreCorrect(obj, \"property\", undefined, true, true, false);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-470",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-470.js",
+ "description": "ES5 Attributes - property ([[Get]] is undefined, [[Set]] is a Function, [[Enumerable]] is true, [[Configurable]] is false) is undeletable",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n var verifySetFunc = \"data\";\n var setFunc = function (value) {\n verifySetFunc = value;\n };\n\n Object.defineProperty(obj, \"prop\", {\n get: undefined,\n set: setFunc,\n enumerable: true,\n configurable: false\n });\n\n var propertyDefineCorrect = obj.hasOwnProperty(\"prop\");\n var desc = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n delete obj.prop;\n\n return propertyDefineCorrect && desc.configurable === false && obj.hasOwnProperty(\"prop\");\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-471",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-471.js",
+ "description": "ES5 Attributes - fail to update [[Get]] attribute of accessor property ([[Get]] is undefined, [[Set]] is a Function, [[Enumerable]] is true, [[Configurable]] is false) to different value",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n var getFunc = function () {\n return 1001;\n };\n\n var verifySetFunc = \"data\";\n var setFunc = function (value) {\n verifySetFunc = value;\n };\n\n Object.defineProperty(obj, \"prop\", {\n get: undefined,\n set: setFunc,\n enumerable: true,\n configurable: false\n });\n\n var result1 = typeof obj.prop === \"undefined\";\n var desc1 = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n try {\n Object.defineProperty(obj, \"prop\", {\n get: getFunc\n });\n\n return false;\n } catch (e) {\n var result2 = typeof obj.prop === \"undefined\";\n var desc2 = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n return result1 && result2 && typeof desc1.get === \"undefined\" && typeof desc2.get === \"undefined\" && e instanceof TypeError;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-472",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-472.js",
+ "description": "ES5 Attributes - fail to update [[Set]] attribute of accessor property ([[Get]] is undefined, [[Set]] is a Function, [[Enumerable]] is true, [[Configurable]] is false) to different value",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n var verifySetFunc = \"data\";\n var setFunc = function (value) {\n verifySetFunc = value;\n };\n\n Object.defineProperty(obj, \"prop\", {\n get: undefined,\n set: setFunc,\n enumerable: true,\n configurable: false\n });\n\n var desc1 = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n try {\n Object.defineProperty(obj, \"prop\", {\n set: undefined\n });\n\n return false;\n } catch (e) {\n var desc2 = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n return desc1.set === setFunc && desc2.set === setFunc && e instanceof TypeError;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-473",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-473.js",
+ "description": "ES5 Attributes - fail to update [[Enumerable]] attribute of accessor property ([[Get]] is undefined, [[Set]] is a Function, [[Enumerable]] is true, [[Configurable]] is false) to different value",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n var verifySetFunc = \"data\";\n var setFunc = function (value) {\n verifySetFunc = value;\n };\n\n Object.defineProperty(obj, \"prop\", {\n get: undefined,\n set: setFunc,\n enumerable: true,\n configurable: false\n });\n\n var result1 = false;\n var desc1 = Object.getOwnPropertyDescriptor(obj, \"prop\");\n for (var p1 in obj) {\n if (p1 === \"prop\") {\n result1 = true;\n }\n }\n\n try {\n Object.defineProperty(obj, \"prop\", {\n enumerable: false\n });\n\n return false;\n } catch (e) {\n var result2 = false;\n var desc2 = Object.getOwnPropertyDescriptor(obj, \"prop\");\n for (var p2 in obj) {\n if (p2 === \"prop\") {\n result2 = true;\n }\n }\n\n return result1 && result2 && desc1.enumerable === true && desc2.enumerable === true && e instanceof TypeError;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-474",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-474.js",
+ "description": "ES5 Attributes - fail to update [[Configurable]] attribute of accessor property ([[Get]] is undefined, [[Set]] is a Function, [[Enumerable]] is true, [[Configurable]] is false) to different value",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n var verifySetFunc = \"data\";\n var setFunc = function (value) {\n verifySetFunc = value;\n };\n\n Object.defineProperty(obj, \"prop\", {\n get: undefined,\n set: setFunc,\n enumerable: true,\n configurable: false\n });\n var desc1 = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n try {\n Object.defineProperty(obj, \"prop\", {\n configurable: true\n });\n\n return false;\n } catch (e) {\n var desc2 = Object.getOwnPropertyDescriptor(obj, \"prop\");\n delete obj.prop;\n\n return desc1.configurable === false && desc2.configurable === false && obj.hasOwnProperty(\"prop\") && e instanceof TypeError;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-475",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-475.js",
+ "description": "ES5 Attributes - fail to update the accessor property ([[Get]] is undefined, [[Set]] is a Function, [[Enumerable]] is true, [[Configurable]] is false) to a data property",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n var verifySetFunc = \"data\";\n var setFunc = function (value) {\n verifySetFunc = value;\n };\n\n Object.defineProperty(obj, \"prop\", {\n get: undefined,\n set: setFunc,\n enumerable: true,\n configurable: false\n });\n var desc1 = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n try {\n Object.defineProperty(obj, \"prop\", {\n value: 1001\n });\n\n return false;\n } catch (e) {\n var desc2 = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n return desc1.hasOwnProperty(\"get\") && !desc2.hasOwnProperty(\"value\") && e instanceof TypeError;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-476",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-476.js",
+ "description": "ES5 Attributes - [[Get]] attribute of accessor property ([[Get]] is undefined, [[Set]] is a Function, [[Enumerable]] is false, [[Configurable]] is true) is undefined",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n var verifySetFunc = \"data\";\n var setFunc = function (value) {\n verifySetFunc = value;\n };\n\n Object.defineProperty(obj, \"prop\", {\n get: undefined,\n set: setFunc,\n enumerable: false,\n configurable: true\n });\n\n var propertyDefineCorrect = obj.hasOwnProperty(\"prop\");\n var desc = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n return propertyDefineCorrect && typeof desc.get === \"undefined\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-477",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-477.js",
+ "description": "ES5 Attributes - [[Set]] attribute of accessor property ([[Get]] is undefined, [[Set]] is a Function, [[Enumerable]] is false, [[Configurable]] is true) is the expected function",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n var verifySetFunc = \"data\";\n var setFunc = function (value) {\n verifySetFunc = value;\n };\n\n Object.defineProperty(obj, \"prop\", {\n get: undefined,\n set: setFunc,\n enumerable: false,\n configurable: true\n });\n\n obj.prop = \"overrideData\";\n var propertyDefineCorrect = obj.hasOwnProperty(\"prop\");\n var desc = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n return propertyDefineCorrect && desc.set === setFunc && verifySetFunc === \"overrideData\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-478",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-478.js",
+ "description": "ES5 Attributes - property ([[Get]] is undefined, [[Set]] is a Function, [[Enumerable]] is false, [[Configurable]] is true) is non-enumerable",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n var verifySetFunc = \"data\";\n var setFunc = function (value) {\n verifySetFunc = value;\n };\n\n Object.defineProperty(obj, \"prop\", {\n get: undefined,\n set: setFunc,\n enumerable: false,\n configurable: true\n });\n\n var propertyDefineCorrect = obj.hasOwnProperty(\"prop\");\n var desc = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n for (var p in obj) {\n if (p === \"prop\") {\n return false;\n }\n }\n\n return propertyDefineCorrect && desc.enumerable === false;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-479",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-479.js",
+ "description": "ES5 Attributes - property ([[Get]] is undefined, [[Set]] is a Function, [[Enumerable]] is false, [[Configurable]] is true) is deletable",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n var verifySetFunc = \"data\";\n var setFunc = function (value) {\n verifySetFunc = value;\n };\n\n Object.defineProperty(obj, \"prop\", {\n get: undefined,\n set: setFunc,\n enumerable: false,\n configurable: true\n });\n\n var propertyDefineCorrect = obj.hasOwnProperty(\"prop\");\n var desc = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n delete obj.prop;\n\n return propertyDefineCorrect && desc.configurable === true && !obj.hasOwnProperty(\"prop\");\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-48",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-48.js",
+ "description": "Object.defineProperty - 'name' property doesn't exist in 'O', test [[Writable]] of 'name' property of 'Attributes' is set as false value if absent in data descriptor 'desc' (8.12.9 step 4.a.i)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n Object.defineProperty(obj, \"property\", {\n value: 1001,\n enumerable: true,\n configurable: false\n });\n\n return dataPropertyAttributesAreCorrect(obj, \"property\", 1001, false, true, false);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-480",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-480.js",
+ "description": "ES5 Attributes - success to update [[Get]] attribute of accessor property ([[Get]] is undefined, [[Set]] is a Function, [[Enumerable]] is false, [[Configurable]] is true) to different value",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n var getFunc = function () {\n return 1001;\n };\n\n var verifySetFunc = \"data\";\n var setFunc = function (value) {\n verifySetFunc = value;\n };\n\n Object.defineProperty(obj, \"prop\", {\n get: undefined,\n set: setFunc,\n enumerable: false,\n configurable: true\n });\n\n var result1 = typeof obj.prop === \"undefined\";\n var desc1 = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n Object.defineProperty(obj, \"prop\", {\n get: getFunc\n });\n\n var result2 = obj.prop === 1001;\n var desc2 = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n return result1 && result2 && typeof desc1.get === \"undefined\" && desc2.get === getFunc;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-481",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-481.js",
+ "description": "ES5 Attributes - success to update [[Set]] attribute of accessor property ([[Get]] is undefined, [[Set]] is a Function, [[Enumerable]] is false, [[Configurable]] is true) to different value",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n var verifySetFunc = \"data\";\n var setFunc = function (value) {\n verifySetFunc = value;\n };\n\n Object.defineProperty(obj, \"prop\", {\n get: undefined,\n set: setFunc,\n enumerable: false,\n configurable: true\n });\n\n var desc1 = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n Object.defineProperty(obj, \"prop\", {\n set: undefined\n });\n\n var desc2 = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n return desc1.set === setFunc && typeof desc2.set === \"undefined\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-482",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-482.js",
+ "description": "ES5 Attributes - success to update [[Enumerable]] attribute of accessor property ([[Get]] is undefined, [[Set]] is a Function, [[Enumerable]] is false, [[Configurable]] is true) to different value",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n var verifySetFunc = \"data\";\n var setFunc = function (value) {\n verifySetFunc = value;\n };\n\n Object.defineProperty(obj, \"prop\", {\n get: undefined,\n set: setFunc,\n enumerable: false,\n configurable: true\n });\n\n var result1 = false;\n var desc1 = Object.getOwnPropertyDescriptor(obj, \"prop\");\n for (var p1 in obj) {\n if (p1 === \"prop\") {\n result1 = true;\n }\n }\n\n Object.defineProperty(obj, \"prop\", {\n enumerable: true\n });\n var result2 = false;\n var desc2 = Object.getOwnPropertyDescriptor(obj, \"prop\");\n for (var p2 in obj) {\n if (p2 === \"prop\") {\n result2 = true;\n }\n }\n\n return !result1 && result2 && desc1.enumerable === false && desc2.enumerable === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-483",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-483.js",
+ "description": "ES5 Attributes - success to update [[Configurable]] attribute of accessor property ([[Get]] is undefined, [[Set]] is a Function, [[Enumerable]] is false, [[Configurable]] is true) to different value",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n var verifySetFunc = \"data\";\n var setFunc = function (value) {\n verifySetFunc = value;\n };\n\n Object.defineProperty(obj, \"prop\", {\n get: undefined,\n set: setFunc,\n enumerable: false,\n configurable: true\n });\n var desc1 = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n Object.defineProperty(obj, \"prop\", {\n configurable: false\n });\n var desc2 = Object.getOwnPropertyDescriptor(obj, \"prop\");\n delete obj.prop;\n\n return desc1.configurable === true && desc2.configurable === false && obj.hasOwnProperty(\"prop\");\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-484",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-484.js",
+ "description": "ES5 Attributes - success to update the accessor property ([[Get]] is undefined, [[Set]] is a Function, [[Enumerable]] is false, [[Configurable]] is true) to a data property",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n var verifySetFunc = \"data\";\n var setFunc = function (value) {\n verifySetFunc = value;\n };\n\n Object.defineProperty(obj, \"prop\", {\n get: undefined,\n set: setFunc,\n enumerable: false,\n configurable: true\n });\n var desc1 = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n Object.defineProperty(obj, \"prop\", {\n value: 1001\n });\n var desc2 = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n return desc1.hasOwnProperty(\"get\") && desc2.hasOwnProperty(\"value\");\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-485",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-485.js",
+ "description": "ES5 Attributes - [[Get]] attribute of accessor property ([[Get]] is undefined, [[Set]] is a Function, [[Enumerable]] is false, [[Configurable]] is false) is undefined",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n var verifySetFunc = \"data\";\n var setFunc = function (value) {\n verifySetFunc = value;\n };\n\n Object.defineProperty(obj, \"prop\", {\n get: undefined,\n set: setFunc,\n enumerable: false,\n configurable: false\n });\n\n var propertyDefineCorrect = obj.hasOwnProperty(\"prop\");\n var desc = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n return propertyDefineCorrect && typeof desc.get === \"undefined\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-486",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-486.js",
+ "description": "ES5 Attributes - [[Set]] attribute of accessor property ([[Get]] is undefined, [[Set]] is a Function, [[Enumerable]] is false, [[Configurable]] is false) is the expected function",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n var verifySetFunc = \"data\";\n var setFunc = function (value) {\n verifySetFunc = value;\n };\n\n Object.defineProperty(obj, \"prop\", {\n get: undefined,\n set: setFunc,\n enumerable: false,\n configurable: false\n });\n\n obj.prop = \"overrideData\";\n var propertyDefineCorrect = obj.hasOwnProperty(\"prop\");\n var desc = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n return propertyDefineCorrect && desc.set === setFunc && verifySetFunc === \"overrideData\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-487",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-487.js",
+ "description": "ES5 Attributes - property ([[Get]] is undefined, [[Set]] is a Function, [[Enumerable]] is false, [[Configurable]] is false) is non-enumerable",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n var verifySetFunc = \"data\";\n var setFunc = function (value) {\n verifySetFunc = value;\n };\n\n Object.defineProperty(obj, \"prop\", {\n get: undefined,\n set: setFunc,\n enumerable: false,\n configurable: false\n });\n\n var propertyDefineCorrect = obj.hasOwnProperty(\"prop\");\n var desc = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n for (var p in obj) {\n if (p === \"prop\") {\n return false;\n }\n }\n\n return propertyDefineCorrect && desc.enumerable === false;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-488",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-488.js",
+ "description": "ES5 Attributes - property ([[Get]] is undefined, [[Set]] is a Function, [[Enumerable]] is false, [[Configurable]] is false) is undeletable",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n var verifySetFunc = \"data\";\n var setFunc = function (value) {\n verifySetFunc = value;\n };\n\n Object.defineProperty(obj, \"prop\", {\n get: undefined,\n set: setFunc,\n enumerable: false,\n configurable: false\n });\n\n var propertyDefineCorrect = obj.hasOwnProperty(\"prop\");\n var desc = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n delete obj.prop;\n\n return propertyDefineCorrect && desc.configurable === false && obj.hasOwnProperty(\"prop\");\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-489",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-489.js",
+ "description": "ES5 Attributes - fail to update [[Get]] attribute of accessor property ([[Get]] is undefined, [[Set]] is a Function, [[Enumerable]] is false, [[Configurable]] is false) to different value",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n var getFunc = function () {\n return 1001;\n };\n\n var verifySetFunc = \"data\";\n var setFunc = function (value) {\n verifySetFunc = value;\n };\n\n Object.defineProperty(obj, \"prop\", {\n get: undefined,\n set: setFunc,\n enumerable: false,\n configurable: false\n });\n\n var result1 = typeof obj.prop === \"undefined\";\n var desc1 = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n try {\n Object.defineProperty(obj, \"prop\", {\n get: getFunc\n });\n\n return false;\n } catch (e) {\n var result2 = typeof obj.prop === \"undefined\";\n var desc2 = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n return result1 && result2 && typeof desc1.get === \"undefined\" && typeof desc2.get === \"undefined\" && e instanceof TypeError;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-49",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-49.js",
+ "description": "Object.defineProperty - 'name' property doesn't exist in 'O', test [[Enumerable]] of 'name' property of 'Attributes' is set as false value if absent in data descriptor 'desc' (8.12.9 step 4.a.i)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n Object.defineProperty(obj, \"property\", {\n value: 1001,\n writable: true,\n configurable: true\n });\n return dataPropertyAttributesAreCorrect(obj, \"property\", 1001, true, false, true);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-490",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-490.js",
+ "description": "ES5 Attributes - fail to update [[Set]] attribute of accessor property ([[Get]] is undefined, [[Set]] is a Function, [[Enumerable]] is false, [[Configurable]] is false) to different value",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n var verifySetFunc = \"data\";\n var setFunc = function (value) {\n verifySetFunc = value;\n };\n\n Object.defineProperty(obj, \"prop\", {\n get: undefined,\n set: setFunc,\n enumerable: false,\n configurable: false\n });\n\n var desc1 = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n try {\n Object.defineProperty(obj, \"prop\", {\n set: undefined\n });\n\n return false;\n } catch (e) {\n var desc2 = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n return desc1.set === setFunc && desc2.set === setFunc && e instanceof TypeError;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-491",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-491.js",
+ "description": "ES5 Attributes - fail to update [[Enumerable]] attribute of accessor property ([[Get]] is undefined, [[Set]] is a Function, [[Enumerable]] is false, [[Configurable]] is false) to different value",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n var verifySetFunc = \"data\";\n var setFunc = function (value) {\n verifySetFunc = value;\n };\n\n Object.defineProperty(obj, \"prop\", {\n get: undefined,\n set: setFunc,\n enumerable: false,\n configurable: false\n });\n\n var result1 = false;\n var desc1 = Object.getOwnPropertyDescriptor(obj, \"prop\");\n for (var p1 in obj) {\n if (p1 === \"prop\") {\n result1 = true;\n }\n }\n\n try {\n Object.defineProperty(obj, \"prop\", {\n enumerable: true\n });\n\n return false;\n } catch (e) {\n var result2 = false;\n var desc2 = Object.getOwnPropertyDescriptor(obj, \"prop\");\n for (var p2 in obj) {\n if (p2 === \"prop\") {\n result2 = true;\n }\n }\n\n return !result1 && !result2 && desc1.enumerable === false && desc2.enumerable === false && e instanceof TypeError;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-492",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-492.js",
+ "description": "ES5 Attributes - fail to update [[Configurable]] attribute of accessor property ([[Get]] is undefined, [[Set]] is a Function, [[Enumerable]] is false, [[Configurable]] is false) to different value",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n var verifySetFunc = \"data\";\n var setFunc = function (value) {\n verifySetFunc = value;\n };\n\n Object.defineProperty(obj, \"prop\", {\n get: undefined,\n set: setFunc,\n enumerable: false,\n configurable: false\n });\n var desc1 = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n try {\n Object.defineProperty(obj, \"prop\", {\n configurable: true\n });\n\n return false;\n } catch (e) {\n var desc2 = Object.getOwnPropertyDescriptor(obj, \"prop\");\n delete obj.prop;\n\n return desc1.configurable === false && desc2.configurable === false && obj.hasOwnProperty(\"prop\") && e instanceof TypeError;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-493",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-493.js",
+ "description": "ES5 Attributes - fail to update the accessor property ([[Get]] is undefined, [[Set]] is a Function, [[Enumerable]] is false, [[Configurable]] is false) to a data property",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n var verifySetFunc = \"data\";\n var setFunc = function (value) {\n verifySetFunc = value;\n };\n\n Object.defineProperty(obj, \"prop\", {\n get: undefined,\n set: setFunc,\n enumerable: false,\n configurable: false\n });\n var desc1 = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n try {\n Object.defineProperty(obj, \"prop\", {\n value: 1001\n });\n\n return false;\n } catch (e) {\n var desc2 = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n return desc1.hasOwnProperty(\"get\") && !desc2.hasOwnProperty(\"value\") && e instanceof TypeError;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-494",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-494.js",
+ "description": "ES5 Attributes - [[Get]] attribute of accessor property ([[Get]] is a Function, [[Set]] is undefined, [[Enumerable]] is true, [[Configurable]] is true) is the expected function",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n var getFunc = function () {\n return 1001;\n };\n\n Object.defineProperty(obj, \"prop\", {\n get: getFunc,\n set: undefined,\n enumerable: true,\n configurable: true\n });\n\n var propertyDefineCorrect = obj.hasOwnProperty(\"prop\");\n var desc = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n return propertyDefineCorrect && desc.get === getFunc && obj.prop === 1001;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-495",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-495.js",
+ "description": "ES5 Attributes - [[Set]] attribute of accessor property ([[Get]] is a Function, [[Set]] is undefined, [[Enumerable]] is true, [[Configurable]] is true) is undefined",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n var getFunc = function () {\n return 1001;\n };\n\n Object.defineProperty(obj, \"prop\", {\n get: getFunc,\n set: undefined,\n enumerable: true,\n configurable: true\n });\n\n var propertyDefineCorrect = obj.hasOwnProperty(\"prop\");\n var desc = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n return propertyDefineCorrect && typeof desc.set === \"undefined\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-496",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-496.js",
+ "description": "ES5 Attributes - property ([[Get]] is a Function, [[Set]] is undefined, [[Enumerable]] is true, [[Configurable]] is true) is enumerable",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n var getFunc = function () {\n return 1001;\n };\n\n Object.defineProperty(obj, \"prop\", {\n get: getFunc,\n set: undefined,\n enumerable: true,\n configurable: true\n });\n\n var propertyDefineCorrect = obj.hasOwnProperty(\"prop\");\n var desc = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n for (var p in obj) {\n if (p === \"prop\") {\n return propertyDefineCorrect && desc.enumerable === true;\n }\n }\n\n return false;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-497",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-497.js",
+ "description": "ES5 Attributes - property ([[Get]] is a Function, [[Set]] is undefined, [[Enumerable]] is true, [[Configurable]] is true) is deletable",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n var getFunc = function () {\n return 1001;\n };\n\n Object.defineProperty(obj, \"prop\", {\n get: getFunc,\n set: undefined,\n enumerable: true,\n configurable: true\n });\n\n var propertyDefineCorrect = obj.hasOwnProperty(\"prop\");\n var desc = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n delete obj.prop;\n\n return propertyDefineCorrect && desc.configurable === true && !obj.hasOwnProperty(\"prop\");\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-498",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-498.js",
+ "description": "ES5 Attributes - success to update [[Get]] attribute of accessor property ([[Get]] is a Function, [[Set]] is undefined, [[Enumerable]] is true, [[Configurable]] is true) to different value",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n var getFunc = function () {\n return 1001;\n };\n\n Object.defineProperty(obj, \"prop\", {\n get: getFunc,\n set: undefined,\n enumerable: true,\n configurable: true\n });\n\n var result1 = obj.prop === 1001;\n var desc1 = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n Object.defineProperty(obj, \"prop\", {\n get: undefined\n });\n\n var result2 = typeof obj.prop === \"undefined\";\n var desc2 = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n return result1 && result2 && desc1.get === getFunc && typeof desc2.get === \"undefined\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-499",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-499.js",
+ "description": "ES5 Attributes - success to update [[Set]] attribute of accessor property ([[Get]] is a Function, [[Set]] is undefined, [[Enumerable]] is true, [[Configurable]] is true) to different value",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n var getFunc = function () {\n return 1001;\n };\n\n var verifySetFunc = \"data\";\n var setFunc = function (value) {\n verifySetFunc = value;\n };\n\n Object.defineProperty(obj, \"prop\", {\n get: getFunc,\n set: undefined,\n enumerable: true,\n configurable: true\n });\n\n var desc1 = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n Object.defineProperty(obj, \"prop\", {\n set: setFunc\n });\n\n var desc2 = Object.getOwnPropertyDescriptor(obj, \"prop\");\n obj.prop = \"overrideData\";\n return typeof desc1.set === \"undefined\" && desc2.set === setFunc && verifySetFunc === \"overrideData\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-5",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-5.js",
+ "description": "Object.defineProperty is no-op if current and desc are the same data desc",
+ "test": "assertTrue((function testcase() {\n function sameDataDescriptorValues(d1, d2) {\n return (d1.value === d2.value &&\n d1.enumerable === d2.enumerable &&\n d1.writable === d2.writable &&\n d1.configurable === d2.configurable);\n }\n\n var o = {};\n\n // create a data valued property with the following attributes:\n // value: 101, enumerable: true, writable: true, configurable: true\n o[\"foo\"] = 101;\n\n // query for, and save, the desc. A subsequent call to defineProperty\n // with the same desc should not disturb the property definition.\n var d1 = Object.getOwnPropertyDescriptor(o, \"foo\"); \n\n // now, redefine the property with the same descriptor\n // the property defintion should not get disturbed.\n var desc = { value: 101, enumerable: true, writable: true, configurable: true };\n Object.defineProperty(o, \"foo\", desc);\n\n var d2 = Object.getOwnPropertyDescriptor(o, \"foo\"); \n\n if (sameDataDescriptorValues(d1, d2) === true) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-50",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-50.js",
+ "description": "Object.defineProperty - 'name' property doesn't exist in 'O', test [[Configurable]] of 'name' property is set as false if it is absent in data descriptor 'desc' (8.12.9 step 4.a.i)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n Object.defineProperty(obj, \"property\", {\n value: 1001,\n writable: true,\n enumerable: true\n });\n return dataPropertyAttributesAreCorrect(obj, \"property\", 1001, true, true, false);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-500",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-500.js",
+ "description": "ES5 Attributes - success to update [[Enumerable]] attribute of accessor property ([[Get]] is Function, [[Set]] is undefined, [[Enumerable]] is true, [[Configurable]] is true) to different value",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n var getFunc = function () {\n return 1001;\n };\n\n Object.defineProperty(obj, \"prop\", {\n get: getFunc,\n set: undefined,\n enumerable: true,\n configurable: true\n });\n var result1 = false;\n var desc1 = Object.getOwnPropertyDescriptor(obj, \"prop\");\n for (var p1 in obj) {\n if (p1 === \"prop\") {\n result1 = true;\n }\n }\n\n Object.defineProperty(obj, \"prop\", {\n enumerable: false\n });\n var result2 = false;\n var desc2 = Object.getOwnPropertyDescriptor(obj, \"prop\");\n for (var p2 in obj) {\n if (p2 === \"prop\") {\n result2 = true;\n }\n }\n\n return result1 && !result2 && desc1.enumerable === true && desc2.enumerable === false;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-501",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-501.js",
+ "description": "ES5 Attributes - success to update [[Configurable]] attribute of accessor property ([[Get]] is a Function, [[Set]] is undefined, [[Enumerable]] is true, [[Configurable]] is true) to different value",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n var getFunc = function () {\n return 1001;\n };\n\n Object.defineProperty(obj, \"prop\", {\n get: getFunc,\n set: undefined,\n enumerable: true,\n configurable: true\n });\n var desc1 = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n Object.defineProperty(obj, \"prop\", {\n configurable: false\n });\n var desc2 = Object.getOwnPropertyDescriptor(obj, \"prop\");\n delete obj.prop;\n\n return desc1.configurable === true && desc2.configurable === false && obj.hasOwnProperty(\"prop\");\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-502",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-502.js",
+ "description": "ES5 Attributes - success to update the accessor property ([[Get]] is a Function, [[Set]] is undefined, [[Enumerable]] is true, [[Configurable]] is true) to a data property",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n var getFunc = function () {\n return 1001;\n };\n\n Object.defineProperty(obj, \"prop\", {\n get: getFunc,\n set: undefined,\n enumerable: true,\n configurable: true\n });\n var desc1 = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n Object.defineProperty(obj, \"prop\", {\n value: 1001\n });\n var desc2 = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n return desc1.hasOwnProperty(\"get\") && desc2.hasOwnProperty(\"value\");\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-503",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-503.js",
+ "description": "ES5 Attributes - [[Get]] attribute of accessor property ([[Get]] is a Function, [[Set]] is undefined, [[Enumerable]] is true, [[Configurable]] is false) is the expected function",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n var getFunc = function () {\n return 1001;\n };\n\n Object.defineProperty(obj, \"prop\", {\n get: getFunc,\n set: undefined,\n enumerable: true,\n configurable: false\n });\n\n var propertyDefineCorrect = obj.hasOwnProperty(\"prop\");\n var desc = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n return propertyDefineCorrect && desc.get === getFunc && obj.prop === 1001;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-504",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-504.js",
+ "description": "ES5 Attributes - [[Set]] attribute of accessor property ([[Get]] is a Function, [[Set]] is undefined, [[Enumerable]] is true, [[Configurable]] is false) is undefined",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n var getFunc = function () {\n return 1001;\n };\n\n Object.defineProperty(obj, \"prop\", {\n get: getFunc,\n set: undefined,\n enumerable: true,\n configurable: false\n });\n\n var propertyDefineCorrect = obj.hasOwnProperty(\"prop\");\n var desc = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n return propertyDefineCorrect && typeof desc.set === \"undefined\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-505",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-505.js",
+ "description": "ES5 Attributes - property ([[Get]] is a Function, [[Set]] is undefined, [[Enumerable]] is true, [[Configurable]] is false) is enumerable",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n var getFunc = function () {\n return 1001;\n };\n\n Object.defineProperty(obj, \"prop\", {\n get: getFunc,\n set: undefined,\n enumerable: true,\n configurable: false\n });\n\n var propertyDefineCorrect = obj.hasOwnProperty(\"prop\");\n var desc = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n for (var p in obj) {\n if (p === \"prop\") {\n return propertyDefineCorrect && desc.enumerable === true;\n }\n }\n\n return false;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-506",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-506.js",
+ "description": "ES5 Attributes - property ([[Get]] is a Function, [[Set]] is undefined, [[Enumerable]] is true, [[Configurable]] is false) is undeletable",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n var getFunc = function () {\n return 1001;\n };\n\n Object.defineProperty(obj, \"prop\", {\n get: getFunc,\n set: undefined,\n enumerable: true,\n configurable: false\n });\n\n var propertyDefineCorrect = obj.hasOwnProperty(\"prop\");\n var desc = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n delete obj.prop;\n\n return propertyDefineCorrect && desc.configurable === false && obj.hasOwnProperty(\"prop\");\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-507",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-507.js",
+ "description": "ES5 Attributes - fail to update [[Get]] attribute of accessor property ([[Get]] is a Function, [[Set]] is undefined, [[Enumerable]] is true, [[Configurable]] is false) to different value",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n var getFunc = function () {\n return 1001;\n };\n\n Object.defineProperty(obj, \"prop\", {\n get: getFunc,\n set: undefined,\n enumerable: true,\n configurable: false\n });\n\n var result1 = obj.prop === 1001;\n var desc1 = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n try {\n Object.defineProperty(obj, \"prop\", {\n get: undefined\n });\n\n return false;\n } catch (e) {\n var result2 = obj.prop === 1001;\n var desc2 = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n return result1 && result2 && desc1.get === getFunc && desc2.get === getFunc && e instanceof TypeError;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-508",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-508.js",
+ "description": "ES5 Attributes - fail to update [[Set]] attribute of accessor property ([[Get]] is a Function, [[Set]] is undefined, [[Enumerable]] is true, [[Configurable]] is false) to different value",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n var getFunc = function () {\n return 1001;\n };\n\n var verifySetFunc = \"data\";\n var setFunc = function (value) {\n verifySetFunc = value;\n };\n\n Object.defineProperty(obj, \"prop\", {\n get: getFunc,\n set: undefined,\n enumerable: true,\n configurable: false\n });\n\n var desc1 = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n try {\n Object.defineProperty(obj, \"prop\", {\n set: setFunc\n });\n\n return false;\n } catch (e) {\n var desc2 = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n return typeof desc1.set === \"undefined\" && typeof desc2.set === \"undefined\" && e instanceof TypeError;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-509",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-509.js",
+ "description": "ES5 Attributes - fail to update [[Enumerable]] attribute of accessor property ([[Get]] is a Function, [[Set]] is undefined, [[Enumerable]] is true, [[Configurable]] is false) to different value",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n var getFunc = function () {\n return 1001;\n };\n\n Object.defineProperty(obj, \"prop\", {\n get: getFunc,\n set: undefined,\n enumerable: true,\n configurable: false\n });\n var result1 = false;\n var desc1 = Object.getOwnPropertyDescriptor(obj, \"prop\");\n for (var p1 in obj) {\n if (p1 === \"prop\") {\n result1 = true;\n }\n }\n\n try {\n Object.defineProperty(obj, \"prop\", {\n enumerable: false\n });\n\n return false;\n } catch (e) {\n var result2 = false;\n var desc2 = Object.getOwnPropertyDescriptor(obj, \"prop\");\n for (var p2 in obj) {\n if (p2 === \"prop\") {\n result2 = true;\n }\n }\n\n return result1 && result2 && desc1.enumerable === true && desc2.enumerable === true && e instanceof TypeError;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-51",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-51.js",
+ "description": "Object.defineProperty - desc is data descriptor, test updating all attribute values of 'name' (8.12.9 step 4.a.i)",
+ "test": "assertTrue((function testcase() {\n var obj = { \"property\": 1 }; // default value of attributes: writable: true, configurable: true, enumerable: true\n\n Object.defineProperty(obj, \"property\", {\n value: 1001,\n writable: false,\n enumerable: false,\n configurable: false\n });\n\n return dataPropertyAttributesAreCorrect(obj, \"property\", 1001, false, false, false);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-510",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-510.js",
+ "description": "ES5 Attributes - fail to update [[Configurable]] attribute of accessor property ([[Get]] is a Function, [[Set]] is undefined, [[Enumerable]] is true, [[Configurable]] is false) to different value",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n var getFunc = function () {\n return 1001;\n };\n\n Object.defineProperty(obj, \"prop\", {\n get: getFunc,\n set: undefined,\n enumerable: true,\n configurable: false\n });\n var desc1 = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n try {\n Object.defineProperty(obj, \"prop\", {\n configurable: true\n });\n\n return false;\n } catch (e) {\n var desc2 = Object.getOwnPropertyDescriptor(obj, \"prop\");\n delete obj.prop;\n\n return desc1.configurable === false && desc2.configurable === false && obj.hasOwnProperty(\"prop\") && e instanceof TypeError;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-511",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-511.js",
+ "description": "ES5 Attributes - fail to update the accessor property ([[Get]] is a Function, [[Set]] is undefined, [[Enumerable]] is true, [[Configurable]] is false) to a data property",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n var getFunc = function () {\n return 1001;\n };\n\n Object.defineProperty(obj, \"prop\", {\n get: getFunc,\n set: undefined,\n enumerable: true,\n configurable: false\n });\n var desc1 = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n try {\n Object.defineProperty(obj, \"prop\", {\n value: 1001\n });\n\n return false;\n } catch (e) {\n var desc2 = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n return desc1.hasOwnProperty(\"get\") && !desc2.hasOwnProperty(\"value\") && e instanceof TypeError;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-512",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-512.js",
+ "description": "ES5 Attributes - [[Get]] attribute of accessor property ([[Get]] is a Function, [[Set]] is undefined, [[Enumerable]] is false, [[Configurable]] is true) is the expected function",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n var getFunc = function () {\n return 1001;\n };\n\n Object.defineProperty(obj, \"prop\", {\n get: getFunc,\n set: undefined,\n enumerable: false,\n configurable: true\n });\n\n var propertyDefineCorrect = obj.hasOwnProperty(\"prop\");\n var desc = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n return propertyDefineCorrect && desc.get === getFunc && obj.prop === 1001;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-513",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-513.js",
+ "description": "ES5 Attributes - [[Set]] attribute of accessor property ([[Get]] is a Function, [[Set]] is undefined, [[Enumerable]] is false, [[Configurable]] is true) is undefined",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n var getFunc = function () {\n return 1001;\n };\n\n Object.defineProperty(obj, \"prop\", {\n get: getFunc,\n set: undefined,\n enumerable: false,\n configurable: true\n });\n\n var propertyDefineCorrect = obj.hasOwnProperty(\"prop\");\n var desc = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n return propertyDefineCorrect && typeof desc.set === \"undefined\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-514",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-514.js",
+ "description": "ES5 Attributes - property ([[Get]] is a Function, [[Set]] is undefined, [[Enumerable]] is false, [[Configurable]] is true) is non-enumerable",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n var getFunc = function () {\n return 1001;\n };\n\n Object.defineProperty(obj, \"prop\", {\n get: getFunc,\n set: undefined,\n enumerable: false,\n configurable: true\n });\n\n var propertyDefineCorrect = obj.hasOwnProperty(\"prop\");\n var desc = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n for (var p in obj) {\n if (p === \"prop\") {\n return false;\n }\n }\n\n return propertyDefineCorrect && desc.enumerable === false;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-515",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-515.js",
+ "description": "ES5 Attributes - property ([[Get]] is a Function, [[Set]] is undefined, [[Enumerable]] is false, [[Configurable]] is true) is deletable",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n var getFunc = function () {\n return 1001;\n };\n\n Object.defineProperty(obj, \"prop\", {\n get: getFunc,\n set: undefined,\n enumerable: false,\n configurable: true\n });\n\n var propertyDefineCorrect = obj.hasOwnProperty(\"prop\");\n var desc = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n delete obj.prop;\n\n return propertyDefineCorrect && desc.configurable === true && !obj.hasOwnProperty(\"prop\");\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-516",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-516.js",
+ "description": "ES5 Attributes - success to update [[Get]] attribute of accessor property ([[Get]] is a Function, [[Set]] is undefined, [[Enumerable]] is false, [[Configurable]] is true) to different value",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n var getFunc = function () {\n return 1001;\n };\n\n Object.defineProperty(obj, \"prop\", {\n get: getFunc,\n set: undefined,\n enumerable: false,\n configurable: true\n });\n\n var result1 = obj.prop === 1001;\n var desc1 = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n Object.defineProperty(obj, \"prop\", {\n get: undefined\n });\n\n var result2 = typeof obj.prop === \"undefined\";\n var desc2 = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n return result1 && result2 && desc1.get === getFunc && typeof desc2.get === \"undefined\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-517",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-517.js",
+ "description": "ES5 Attributes - success to update [[Set]] attribute of accessor property ([[Get]] is a Function, [[Set]] is undefined, [[Enumerable]] is false, [[Configurable]] is true) to different value",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n var getFunc = function () {\n return 1001;\n };\n\n var verifySetFunc = \"data\";\n var setFunc = function (value) {\n verifySetFunc = value;\n };\n\n Object.defineProperty(obj, \"prop\", {\n get: getFunc,\n set: undefined,\n enumerable: false,\n configurable: true\n });\n\n var desc1 = Object.getOwnPropertyDescriptor(obj, \"prop\");\n var propertyDefineCorrect = obj.hasOwnProperty(\"prop\");\n\n Object.defineProperty(obj, \"prop\", {\n set: setFunc\n });\n\n obj.prop = \"overrideData\";\n var desc2 = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n return typeof desc1.set === \"undefined\" && propertyDefineCorrect && desc2.set === setFunc && verifySetFunc === \"overrideData\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-518",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-518.js",
+ "description": "ES5 Attributes - success to update [[Enumerable]] attribute of accessor property ([[Get]] is a Function, [[Set]] is undefined, [[Enumerable]] is false, [[Configurable]] is true) to different value",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n var getFunc = function () {\n return 1001;\n };\n\n Object.defineProperty(obj, \"prop\", {\n get: getFunc,\n set: undefined,\n enumerable: false,\n configurable: true\n });\n var result1 = false;\n var desc1 = Object.getOwnPropertyDescriptor(obj, \"prop\");\n for (var p1 in obj) {\n if (p1 === \"prop\") {\n result1 = true;\n }\n }\n\n Object.defineProperty(obj, \"prop\", {\n enumerable: true\n });\n var result2 = false;\n var desc2 = Object.getOwnPropertyDescriptor(obj, \"prop\");\n for (var p2 in obj) {\n if (p2 === \"prop\") {\n result2 = true;\n }\n }\n\n return !result1 && result2 && desc1.enumerable === false && desc2.enumerable === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-519",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-519.js",
+ "description": "ES5 Attributes - success to update [[Configurable]] attribute of accessor property ([[Get]] is a Function, [[Set]] is undefined, [[Enumerable]] is false, [[Configurable]] is true) to different value",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n var getFunc = function () {\n return 1001;\n };\n\n Object.defineProperty(obj, \"prop\", {\n get: getFunc,\n set: undefined,\n enumerable: false,\n configurable: true\n });\n var desc1 = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n Object.defineProperty(obj, \"prop\", {\n configurable: false\n });\n var desc2 = Object.getOwnPropertyDescriptor(obj, \"prop\");\n delete obj.prop;\n\n return desc1.configurable === true && desc2.configurable === false && obj.hasOwnProperty(\"prop\");\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-52",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-52.js",
+ "description": "Object.defineProperty - 'desc' is generic descriptor without any attribute, test 'name' is defined in 'obj' with all default attribute values (8.12.9 step 4.a.i)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n Object.defineProperty(obj, \"property\", {});\n\n return dataPropertyAttributesAreCorrect(obj, \"property\", undefined, false, false, false);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-520",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-520.js",
+ "description": "ES5 Attributes - success to update the accessor property ([[Get]] is a Function, [[Set]] is undefined, [[Enumerable]] is false, [[Configurable]] is true) to a data property",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n var getFunc = function () {\n return 1001;\n };\n\n Object.defineProperty(obj, \"prop\", {\n get: getFunc,\n set: undefined,\n enumerable: false,\n configurable: true\n });\n var desc1 = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n Object.defineProperty(obj, \"prop\", {\n value: 1001\n });\n var desc2 = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n return desc1.hasOwnProperty(\"get\") && desc2.hasOwnProperty(\"value\");\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-521",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-521.js",
+ "description": "ES5 Attributes - [[Get]] attribute of accessor property ([[Get]] is a Function, [[Set]] is undefined, [[Enumerable]] is false, [[Configurable]] is false) is the expected function",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n var getFunc = function () {\n return 1001;\n };\n\n Object.defineProperty(obj, \"prop\", {\n get: getFunc,\n set: undefined,\n enumerable: false,\n configurable: false\n });\n\n var propertyDefineCorrect = obj.hasOwnProperty(\"prop\");\n var desc = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n return propertyDefineCorrect && desc.get === getFunc && obj.prop === 1001;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-522",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-522.js",
+ "description": "ES5 Attributes - [[Set]] attribute of accessor property ([[Get]] is a Function, [[Set]] is undefined, [[Enumerable]] is false, [[Configurable]] is false) is undefined",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n var getFunc = function () {\n return 1001;\n };\n\n Object.defineProperty(obj, \"prop\", {\n get: getFunc,\n set: undefined,\n enumerable: false,\n configurable: false\n });\n\n var propertyDefineCorrect = obj.hasOwnProperty(\"prop\");\n var desc = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n return propertyDefineCorrect && typeof desc.set === \"undefined\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-523",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-523.js",
+ "description": "ES5 Attributes - property ([[Get]] is a Function, [[Set]] is undefined, [[Enumerable]] is false, [[Configurable]] is false) is non-enumerable",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n var getFunc = function () {\n return 1001;\n };\n\n Object.defineProperty(obj, \"prop\", {\n get: getFunc,\n set: undefined,\n enumerable: false,\n configurable: false\n });\n\n var propertyDefineCorrect = obj.hasOwnProperty(\"prop\");\n var desc = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n for (var p in obj) {\n if (p === \"prop\") {\n return false;\n }\n }\n\n return propertyDefineCorrect && desc.enumerable === false;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-524",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-524.js",
+ "description": "ES5 Attributes - property ([[Get]] is a Function, [[Set]] is undefined, [[Enumerable]] is false, [[Configurable]] is false) is undeletable",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n var getFunc = function () {\n return 1001;\n };\n\n Object.defineProperty(obj, \"prop\", {\n get: getFunc,\n set: undefined,\n enumerable: false,\n configurable: false\n });\n\n var propertyDefineCorrect = obj.hasOwnProperty(\"prop\");\n var desc = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n delete obj.prop;\n\n return propertyDefineCorrect && desc.configurable === false && obj.hasOwnProperty(\"prop\");\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-525",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-525.js",
+ "description": "ES5 Attributes - fail to update [[Get]] attribute of accessor property ([[Get]] is a Function, [[Set]] is undefined, [[Enumerable]] is false, [[Configurable]] is false) to different value",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n var getFunc = function () {\n return 1001;\n };\n\n Object.defineProperty(obj, \"prop\", {\n get: getFunc,\n set: undefined,\n enumerable: false,\n configurable: false\n });\n\n var result1 = obj.prop === 1001;\n var desc1 = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n try {\n Object.defineProperty(obj, \"prop\", {\n get: undefined\n });\n\n return false;\n } catch (e) {\n var result2 = obj.prop === 1001;\n var desc2 = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n return result1 && result2 && desc1.get === getFunc && desc2.get === getFunc && e instanceof TypeError;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-526",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-526.js",
+ "description": "ES5 Attributes - fail to update [[Set]] attribute of accessor property ([[Get]] is a Function, [[Set]] is undefined, [[Enumerable]] is false, [[Configurable]] is false) to different value",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n var getFunc = function () {\n return 1001;\n };\n\n var verifySetFunc = \"data\";\n var setFunc = function (value) {\n verifySetFunc = value;\n };\n\n Object.defineProperty(obj, \"prop\", {\n get: getFunc,\n set: undefined,\n enumerable: false,\n configurable: false\n });\n\n var desc1 = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n try {\n Object.defineProperty(obj, \"prop\", {\n set: setFunc\n });\n\n return false;\n } catch (e) {\n var desc2 = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n return typeof desc1.set === \"undefined\" && typeof desc2.set === \"undefined\" && e instanceof TypeError;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-527",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-527.js",
+ "description": "ES5 Attributes - fail to update [[Enumerable]] attribute of accessor property ([[Get]] is a Function, [[Set]] is undefined, [[Enumerable]] is false, [[Configurable]] is false) to different value",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n var getFunc = function () {\n return 1001;\n };\n\n Object.defineProperty(obj, \"prop\", {\n get: getFunc,\n set: undefined,\n enumerable: false,\n configurable: false\n });\n var result1 = false;\n var desc1 = Object.getOwnPropertyDescriptor(obj, \"prop\");\n for (var p1 in obj) {\n if (p1 === \"prop\") {\n result1 = true;\n }\n }\n\n try {\n Object.defineProperty(obj, \"prop\", {\n enumerable: true\n });\n\n return false;\n } catch (e) {\n var result2 = false;\n var desc2 = Object.getOwnPropertyDescriptor(obj, \"prop\");\n for (var p2 in obj) {\n if (p2 === \"prop\") {\n result2 = true;\n }\n }\n\n return !result1 && !result2 && desc1.enumerable === false && desc2.enumerable === false && e instanceof TypeError;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-528",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-528.js",
+ "description": "ES5 Attributes - fail to update [[Configurable]] attribute of accessor property ([[Get]] is a Function, [[Set]] is undefined, [[Enumerable]] is false, [[Configurable]] is false) to different value",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n var getFunc = function () {\n return 1001;\n };\n\n Object.defineProperty(obj, \"prop\", {\n get: getFunc,\n set: undefined,\n enumerable: false,\n configurable: false\n });\n var desc1 = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n try {\n Object.defineProperty(obj, \"prop\", {\n configurable: true\n });\n\n return false;\n } catch (e) {\n var desc2 = Object.getOwnPropertyDescriptor(obj, \"prop\");\n delete obj.prop;\n\n return desc1.configurable === false && desc2.configurable === false && obj.hasOwnProperty(\"prop\") && e instanceof TypeError;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-529",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-529.js",
+ "description": "ES5 Attributes - fail to update the accessor property ([[Get]] is a Function, [[Set]] is undefined, [[Enumerable]] is false, [[Configurable]] is false) to a data property",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n var getFunc = function () {\n return 1001;\n };\n\n Object.defineProperty(obj, \"prop\", {\n get: getFunc,\n set: undefined,\n enumerable: false,\n configurable: false\n });\n var desc1 = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n try {\n Object.defineProperty(obj, \"prop\", {\n value: 1001\n });\n\n return false;\n } catch (e) {\n var desc2 = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n return desc1.hasOwnProperty(\"get\") && !desc2.hasOwnProperty(\"value\") && e instanceof TypeError;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-53",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-53.js",
+ "description": "Object.defineProperty - 'name' property doesn't exist in 'O', test [[Get]] of 'name' property is set as undefined if it is absent in accessor descriptor 'desc' (8.12.9 step 4.b)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n var setFunc = function (value) {\n obj.setVerifyHelpProp = value;\n };\n\n Object.defineProperty(obj, \"property\", {\n set: setFunc,\n enumerable: true,\n configurable: true\n });\n\n return accessorPropertyAttributesAreCorrect(obj, \"property\", undefined, setFunc, \"setVerifyHelpProp\", true, true);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-530",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-530.js",
+ "description": "ES5 Attributes - [[Get]] attribute of accessor property ([[Get]] is a Function, [[Set]] is a Function, [[Enumerable]] is true, [[Configurable]] is true) is the expected function",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n var getFunc = function () {\n return 1001;\n };\n\n var verifySetFunc = \"data\";\n var setFunc = function (value) {\n verifySetFunc = value;\n };\n\n Object.defineProperty(obj, \"prop\", {\n get: getFunc,\n set: setFunc,\n enumerable: true,\n configurable: true\n });\n\n var propertyDefineCorrect = obj.hasOwnProperty(\"prop\");\n var desc = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n return propertyDefineCorrect && desc.get === getFunc && obj.prop === 1001;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-531-1",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-531-1.js",
+ "description": "Object.defineProperty will update [[Get]] and [[Set]] attributes of named accessor property 'P' successfully when [[Configurable]] attribute is true, 'O' is an Object object (8.12.9 step 11)",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n obj.verifySetFunction = \"data\";\n Object.defineProperty(obj, \"property\", {\n get: function () {\n return obj.verifySetFunction;\n },\n set: function (value) {\n obj.verifySetFunction = value;\n },\n configurable: true\n });\n\n obj.verifySetFunction1 = \"data1\";\n var getFunc = function () {\n return obj.verifySetFunction1;\n };\n var setFunc = function (value) {\n obj.verifySetFunction1 = value;\n };\n\n Object.defineProperty(obj, \"property\", {\n get: getFunc,\n set: setFunc\n });\n\n return accessorPropertyAttributesAreCorrect(obj, \"property\", getFunc, setFunc, \"verifySetFunction1\", false, true);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-531-10",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-531-10.js",
+ "description": "Object.defineProperty will update [[Get]] and [[Set]] attributes of indexed accessor property 'P' successfully when [[Configurable]] attribute is true, 'O' is an Object object (8.12.9 step 11)",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n\n obj.verifySetFunction = \"data\";\n Object.defineProperty(obj, \"0\", {\n get: function () {\n return obj.verifySetFunction;\n },\n set: function (value) {\n obj.verifySetFunction = value;\n },\n configurable: true\n });\n\n obj.verifySetFunction1 = \"data1\";\n var getFunc = function () {\n return obj.verifySetFunction1;\n };\n var setFunc = function (value) {\n obj.verifySetFunction1 = value;\n };\n\n Object.defineProperty(obj, \"0\", {\n get: getFunc,\n set: setFunc\n });\n\n return accessorPropertyAttributesAreCorrect(obj, \"0\", getFunc, setFunc, \"verifySetFunction1\", false, true);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-531-11",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-531-11.js",
+ "description": "Object.defineProperty will update [[Get]] and [[Set]] attributes of named accessor property 'P' successfully when [[Configurable]] attribute is true, 'A' is an Array object (8.12.9 step 11)",
+ "test": "assertTrue((function testcase() {\n\n var obj = [];\n\n obj.verifySetFunction = \"data\";\n Object.defineProperty(obj, \"prop\", {\n get: function () {\n return obj.verifySetFunction;\n },\n set: function (value) {\n obj.verifySetFunction = value;\n },\n configurable: true\n });\n\n obj.verifySetFunction1 = \"data1\";\n var getFunc = function () {\n return obj.verifySetFunction1;\n };\n var setFunc = function (value) {\n obj.verifySetFunction1 = value;\n };\n\n Object.defineProperty(obj, \"prop\", {\n get: getFunc,\n set: setFunc\n });\n\n return accessorPropertyAttributesAreCorrect(obj, \"prop\", getFunc, setFunc, \"verifySetFunction1\", false, true);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-531-12",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-531-12.js",
+ "description": "Object.defineProperty will update [[Get]] and [[Set]] attributes of indexed accessor property successfully when [[Configurable]] attribute is true, 'O' is an Arguments object (8.12.9 step 11)",
+ "test": "assertTrue((function testcase() {\n\n var obj = (function () {\n return arguments;\n }());\n\n obj.verifySetFunction = \"data\";\n Object.defineProperty(obj, \"0\", {\n get: function () {\n return obj.verifySetFunction;\n },\n set: function (value) {\n obj.verifySetFunction = value;\n },\n configurable: true\n });\n\n obj.verifySetFunction1 = \"data1\";\n var getFunc = function () {\n return obj.verifySetFunction1;\n };\n var setFunc = function (value) {\n obj.verifySetFunction1 = value;\n };\n\n Object.defineProperty(obj, \"0\", {\n get: getFunc,\n set: setFunc\n });\n\n return accessorPropertyAttributesAreCorrect(obj, \"0\", getFunc, setFunc, \"verifySetFunction1\", false, true);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-531-13",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-531-13.js",
+ "description": "Object.defineProperty will update [[Get]] and [[Set]] attributes of indexed accessor property 'P' successfully when [[Configurable]] attribute is true, 'O' is the global object (8.12.9 step 11)",
+ "test": "assertTrue((function testcase() {\n\n var obj = fnGlobalObject();\n try {\n obj.verifySetFunction = \"data\";\n Object.defineProperty(obj, \"0\", {\n get: function () {\n return obj.verifySetFunction;\n },\n set: function (value) {\n obj.verifySetFunction = value;\n },\n configurable: true\n });\n\n obj.verifySetFunction1 = \"data1\";\n var getFunc = function () {\n return obj.verifySetFunction1;\n };\n var setFunc = function (value) {\n obj.verifySetFunction1 = value;\n };\n\n Object.defineProperty(obj, \"0\", {\n get: getFunc,\n set: setFunc\n });\n\n return accessorPropertyAttributesAreCorrect(obj, \"0\", getFunc, setFunc, \"verifySetFunction1\", false, true);\n } finally {\n delete obj[0];\n delete obj.verifySetFunction;\n delete obj.verifySetFunction1;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-531-15",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-531-15.js",
+ "description": "ES5 Attributes - Updating a named accessor property 'P' using simple assignment is successful, 'A' is an Array object (8.12.5 step 5.b)",
+ "test": "assertTrue((function testcase() {\n var obj = [];\n\n var verifySetFunc = \"data\";\n var setFunc = function (value) {\n verifySetFunc = value;\n };\n var getFunc = function () {\n return verifySetFunc;\n };\n\n Object.defineProperty(obj, \"prop\", {\n get: getFunc,\n set: setFunc,\n enumerable: true,\n configurable: true\n });\n\n obj.prop = \"overrideData\";\n var propertyDefineCorrect = obj.hasOwnProperty(\"prop\");\n var desc = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n return propertyDefineCorrect && desc.set === setFunc && obj.prop === \"overrideData\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-531-16",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-531-16.js",
+ "description": "ES5 Attributes - Updating an indexed accessor property 'P' using simple assignment, 'O' is an Arguments object (8.12.5 step 5.b)",
+ "test": "assertTrue((function testcase() {\n var obj = (function () {\n return arguments;\n }());\n\n var verifySetFunc = \"data\";\n var setFunc = function (value) {\n verifySetFunc = value;\n };\n var getFunc = function () {\n return verifySetFunc;\n };\n\n Object.defineProperty(obj, \"0\", {\n get: getFunc,\n set: setFunc,\n enumerable: true,\n configurable: true\n });\n\n obj[0] = \"overrideData\";\n var propertyDefineCorrect = obj.hasOwnProperty(\"0\");\n var desc = Object.getOwnPropertyDescriptor(obj, \"0\");\n\n return propertyDefineCorrect && desc.set === setFunc && obj[0] === \"overrideData\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-531-17",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-531-17.js",
+ "description": "ES5 Attributes - Updating an indexed accessor property 'P' using simple assignment is successful, 'O' is the global object (8.12.5 step 5.b)",
+ "test": "assertTrue((function testcase() {\n var obj = fnGlobalObject();\n try {\n obj.verifySetFunc = \"data\";\n var setFunc = function (value) {\n obj.verifySetFunc = value;\n };\n var getFunc = function () {\n return obj.verifySetFunc;\n };\n\n Object.defineProperty(obj, \"0\", {\n get: getFunc,\n set: setFunc,\n enumerable: true,\n configurable: true\n });\n\n obj[0] = \"overrideData\";\n var propertyDefineCorrect = obj.hasOwnProperty(\"0\");\n var desc = Object.getOwnPropertyDescriptor(obj, \"0\");\n\n return propertyDefineCorrect && desc.set === setFunc && obj[0] === \"overrideData\";\n } finally {\n delete obj[0];\n delete obj.verifySetFunc;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-531-2",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-531-2.js",
+ "description": "Object.defineProperty will update [[Get]] and [[Set]] attributes of indexed accessor property 'P' successfully when [[Configurable]] attribute is true, 'A' is an Array object (8.12.9 step 11)",
+ "test": "assertTrue((function testcase() {\n\n var obj = [];\n\n obj.verifySetFunction = \"data\";\n Object.defineProperty(obj, \"0\", {\n get: function () {\n return obj.verifySetFunction;\n },\n set: function (value) {\n obj.verifySetFunction = value;\n },\n configurable: true\n });\n\n obj.verifySetFunction1 = \"data1\";\n var getFunc = function () {\n return obj.verifySetFunction1;\n };\n var setFunc = function (value) {\n obj.verifySetFunction1 = value;\n };\n\n Object.defineProperty(obj, \"0\", {\n get: getFunc,\n set: setFunc\n });\n\n return accessorPropertyAttributesAreCorrect(obj, \"0\", getFunc, setFunc, \"verifySetFunction1\", false, true);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-531-3",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-531-3.js",
+ "description": "Object.defineProperty will update [[Get]] and [[Set]] attributes of named accessor property successfully when [[Configurable]] attribute is true, 'O' is an Arguments object (8.12.9 step 11)",
+ "test": "assertTrue((function testcase() {\n\n var obj = (function () {\n return arguments;\n }());\n\n obj.verifySetFunction = \"data\";\n Object.defineProperty(obj, \"property\", {\n get: function () {\n return obj.verifySetFunction;\n },\n set: function (value) {\n obj.verifySetFunction = value;\n },\n configurable: true\n });\n\n obj.verifySetFunction1 = \"data1\";\n var getFunc = function () {\n return obj.verifySetFunction1;\n };\n var setFunc = function (value) {\n obj.verifySetFunction1 = value;\n };\n\n Object.defineProperty(obj, \"property\", {\n get: getFunc,\n set: setFunc\n });\n\n return accessorPropertyAttributesAreCorrect(obj, \"property\", getFunc, setFunc, \"verifySetFunction1\", false, true);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-531-4",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-531-4.js",
+ "description": "Object.defineProperty will update [[Get]] and [[Set]] attributes of named accessor property 'P' successfully when [[Configurable]] attribute is true, 'O' is the global object (8.12.9 step 11)",
+ "test": "assertTrue((function testcase() {\n\n var obj = fnGlobalObject();\n try {\n obj.verifySetFunction = \"data\";\n Object.defineProperty(obj, \"property\", {\n get: function () {\n return obj.verifySetFunction;\n },\n set: function (value) {\n obj.verifySetFunction = value;\n },\n configurable: true\n });\n\n obj.verifySetFunction1 = \"data1\";\n var getFunc = function () {\n return obj.verifySetFunction1;\n };\n var setFunc = function (value) {\n obj.verifySetFunction1 = value;\n };\n\n Object.defineProperty(obj, \"property\", {\n get: getFunc,\n set: setFunc\n });\n\n return accessorPropertyAttributesAreCorrect(obj, \"property\", getFunc, setFunc, \"verifySetFunction1\", false, true);\n } finally {\n delete obj.property;\n delete obj.verifySetFunction;\n delete obj.verifySetFunction1;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-531-6",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-531-6.js",
+ "description": "ES5 Attributes - Updating an indexed accessor property 'P' without [[Set]] using simple assignment is failed, 'A' is an Array object (8.12.5 step 5.b)",
+ "test": "assertTrue((function testcase() {\n var obj = [];\n\n var verifySetFunc = \"data\";\n var getFunc = function () {\n return verifySetFunc;\n };\n\n Object.defineProperty(obj, \"0\", {\n get: getFunc,\n enumerable: true,\n configurable: true\n });\n\n obj[0] = \"overrideData\";\n var propertyDefineCorrect = obj.hasOwnProperty(\"0\");\n var desc = Object.getOwnPropertyDescriptor(obj, \"0\");\n\n return propertyDefineCorrect && typeof desc.set === \"undefined\" && obj[0] === \"data\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-531-7",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-531-7.js",
+ "description": "ES5 Attributes - Updating a named accessor property 'P' without [[Set]] using simple assignment is failed, 'O' is an Arguments object (8.12.5 step 5.b)",
+ "test": "assertTrue((function testcase() {\n var obj = (function () {\n return arguments;\n }());\n\n var verifySetFunc = \"data\";\n var getFunc = function () {\n return verifySetFunc;\n };\n\n Object.defineProperty(obj, \"prop\", {\n get: getFunc,\n enumerable: true,\n configurable: true\n });\n\n obj.prop = \"overrideData\";\n var propertyDefineCorrect = obj.hasOwnProperty(\"prop\");\n var desc = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n return propertyDefineCorrect && typeof desc.set === \"undefined\" && obj.prop === \"data\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-531-8",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-531-8.js",
+ "description": "ES5 Attributes - Updating a named accessor property 'P' without [[Set]] using simple assignment is failed, 'O' is the global object (8.12.5 step 5.b)",
+ "test": "assertTrue((function testcase() {\n var obj = fnGlobalObject();\n try {\n obj.verifySetFunc = \"data\";\n var getFunc = function () {\n return obj.verifySetFunc;\n };\n\n Object.defineProperty(obj, \"prop\", {\n get: getFunc,\n enumerable: true,\n configurable: true\n });\n\n obj.prop = \"overrideData\";\n var propertyDefineCorrect = obj.hasOwnProperty(\"prop\");\n var desc = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n return propertyDefineCorrect && typeof desc.set === \"undefined\" && obj.prop === \"data\";\n } finally {\n delete obj.prop;\n delete obj.verifySetFunc;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-531",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-531.js",
+ "description": "ES5 Attributes - [[Set]] attribute of accessor property ([[Get]] is a Function, [[Set]] is a Function, [[Enumerable]] is true, [[Configurable]] is true) is the expected function",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n var getFunc = function () {\n return 1001;\n };\n\n var verifySetFunc = \"data\";\n var setFunc = function (value) {\n verifySetFunc = value;\n };\n\n Object.defineProperty(obj, \"prop\", {\n get: getFunc,\n set: setFunc,\n enumerable: true,\n configurable: true\n });\n\n obj.prop = \"overrideData\";\n var propertyDefineCorrect = obj.hasOwnProperty(\"prop\");\n var desc = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n return propertyDefineCorrect && desc.set === setFunc && verifySetFunc === \"overrideData\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-532",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-532.js",
+ "description": "ES5 Attributes - property ([[Get]] is a Function, [[Set]] is a Function, [[Enumerable]] is true, [[Configurable]] is true) is enumerable",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n var getFunc = function () {\n return 1001;\n };\n\n var verifySetFunc = \"data\";\n var setFunc = function (value) {\n verifySetFunc = value;\n };\n\n Object.defineProperty(obj, \"prop\", {\n get: getFunc,\n set: setFunc,\n enumerable: true,\n configurable: true\n });\n\n var propertyDefineCorrect = obj.hasOwnProperty(\"prop\");\n var desc = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n for (var p in obj) {\n if (p === \"prop\") {\n return propertyDefineCorrect && desc.enumerable === true;\n }\n }\n\n return false;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-533",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-533.js",
+ "description": "ES5 Attributes - property ([[Get]] is a Function, [[Set]] is a Function, [[Enumerable]] is true, [[Configurable]] is true) is deletable",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n var getFunc = function () {\n return 1001;\n };\n\n var verifySetFunc = \"data\";\n var setFunc = function (value) {\n verifySetFunc = value;\n };\n\n Object.defineProperty(obj, \"prop\", {\n get: getFunc,\n set: setFunc,\n enumerable: true,\n configurable: true\n });\n\n var propertyDefineCorrect = obj.hasOwnProperty(\"prop\");\n var desc = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n delete obj.prop;\n\n return propertyDefineCorrect && desc.configurable === true && !obj.hasOwnProperty(\"prop\");\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-534",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-534.js",
+ "description": "ES5 Attributes - success to update [[Get]] attribute of accessor property ([[Get]] is a Function, [[Set]] is a Function, [[Enumerable]] is true, [[Configurable]] is true) to different value",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n var getFunc = function () {\n return 1001;\n };\n\n var verifySetFunc = \"data\";\n var setFunc = function (value) {\n verifySetFunc = value;\n };\n\n Object.defineProperty(obj, \"prop\", {\n get: getFunc,\n set: setFunc,\n enumerable: true,\n configurable: true\n });\n\n var result1 = obj.prop === 1001;\n var desc1 = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n Object.defineProperty(obj, \"prop\", {\n get: undefined\n });\n\n var result2 = typeof obj.prop === \"undefined\";\n var desc2 = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n return result1 && result2 && desc1.get === getFunc && typeof desc2.get === \"undefined\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-535",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-535.js",
+ "description": "ES5 Attributes - success to update [[Set]] attribute of accessor property ([[Get]] is a Function, [[Set]] is a Function, [[Enumerable]] is true, [[Configurable]] is true) to different value",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n var getFunc = function () {\n return 1001;\n };\n\n var verifySetFunc = \"data\";\n var setFunc = function (value) {\n verifySetFunc = value;\n };\n\n Object.defineProperty(obj, \"prop\", {\n get: getFunc,\n set: setFunc,\n enumerable: true,\n configurable: true\n });\n\n var desc1 = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n Object.defineProperty(obj, \"prop\", {\n set: undefined\n });\n\n var desc2 = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n return desc1.set === setFunc && typeof desc2.set === \"undefined\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-536",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-536.js",
+ "description": "ES5 Attributes - success to update [[Enumerable]] attribute of accessor property ([[Get]] is a Function, [[Set]] is a Function, [[Enumerable]] is true, [[Configurable]] is true) to different value",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n var getFunc = function () {\n return 1001;\n };\n\n var verifySetFunc = \"data\";\n var setFunc = function (value) {\n verifySetFunc = value;\n };\n\n Object.defineProperty(obj, \"prop\", {\n get: getFunc,\n set: setFunc,\n enumerable: true,\n configurable: true\n });\n var result1 = false;\n var desc1 = Object.getOwnPropertyDescriptor(obj, \"prop\");\n for (var p1 in obj) {\n if (p1 === \"prop\") {\n result1 = true;\n }\n }\n\n Object.defineProperty(obj, \"prop\", {\n enumerable: false\n });\n var result2 = false;\n var desc2 = Object.getOwnPropertyDescriptor(obj, \"prop\");\n for (var p2 in obj) {\n if (p2 === \"prop\") {\n result2 = true;\n }\n }\n\n return result1 && !result2 && desc1.enumerable === true && desc2.enumerable === false;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-537",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-537.js",
+ "description": "ES5 Attributes - success to update [[Configurable]] attribute of accessor property ([[Get]] is a Function, [[Set]] is a Function, [[Enumerable]] is true, [[Configurable]] is true) to different value",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n var getFunc = function () {\n return 1001;\n };\n\n var verifySetFunc = \"data\";\n var setFunc = function (value) {\n verifySetFunc = value;\n };\n\n Object.defineProperty(obj, \"prop\", {\n get: getFunc,\n set: setFunc,\n enumerable: true,\n configurable: true\n });\n var desc1 = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n Object.defineProperty(obj, \"prop\", {\n configurable: false\n });\n var desc2 = Object.getOwnPropertyDescriptor(obj, \"prop\");\n delete obj.prop;\n\n return desc1.configurable === true && desc2.configurable === false && obj.hasOwnProperty(\"prop\");\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-538-1",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-538-1.js",
+ "description": "ES5 Attributes - Updating an indexed 'P' whose [[Configurable]] attribute is true to a data property is successful, 'A' is an Array object (8.12.9 - step 9.c.i)",
+ "test": "assertTrue((function testcase() {\n var obj = [];\n\n obj.verifySetFunc = \"data\";\n var getFunc = function () {\n return obj.verifySetFunc;\n };\n\n var setFunc = function (value) {\n obj.verifySetFunc = value;\n };\n\n Object.defineProperty(obj, \"0\", {\n get: getFunc,\n set: setFunc,\n enumerable: true,\n configurable: true\n });\n var desc1 = Object.getOwnPropertyDescriptor(obj, \"0\");\n\n Object.defineProperty(obj, \"0\", {\n value: 1001\n });\n var desc2 = Object.getOwnPropertyDescriptor(obj, \"0\");\n\n return desc1.hasOwnProperty(\"get\") && desc2.hasOwnProperty(\"value\") &&\n typeof desc2.get === \"undefined\" && typeof desc2.get === \"undefined\" &&\n dataPropertyAttributesAreCorrect(obj, \"0\", 1001, false, true, true);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-538-2",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-538-2.js",
+ "description": "ES5 Attributes - Updating a named accessor property 'P' whose [[Configurable]] attribute is true to a data property is successful, 'O' is an Arguments object",
+ "test": "assertTrue((function testcase() {\n var obj = (function () {\n return arguments;\n }());\n\n obj.verifySetFunc = \"data\";\n var getFunc = function () {\n return obj.verifySetFunc;\n };\n\n var setFunc = function (value) {\n obj.verifySetFunc = value;\n };\n\n Object.defineProperty(obj, \"prop\", {\n get: getFunc,\n set: setFunc,\n enumerable: true,\n configurable: true\n });\n var desc1 = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n Object.defineProperty(obj, \"prop\", {\n value: 1001\n });\n var desc2 = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n return desc1.hasOwnProperty(\"get\") && desc2.hasOwnProperty(\"value\") &&\n typeof desc2.get === \"undefined\" && typeof desc2.get === \"undefined\" &&\n dataPropertyAttributesAreCorrect(obj, \"prop\", 1001, false, true, true);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-538-3",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-538-3.js",
+ "description": "ES5 Attributes - Updating a named accessor property 'P' whose [[Configurable]] attribute is true to a data property is successful, 'O' is the global object",
+ "test": "assertTrue((function testcase() {\n var obj = fnGlobalObject();\n\n obj.verifySetFunc = \"data\";\n var getFunc = function () {\n return obj.verifySetFunc;\n };\n\n var setFunc = function (value) {\n obj.verifySetFunc = value;\n };\n try {\n Object.defineProperty(obj, \"prop\", {\n get: getFunc,\n set: setFunc,\n enumerable: true,\n configurable: true\n });\n var desc1 = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n Object.defineProperty(obj, \"prop\", {\n value: 1001\n });\n var desc2 = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n return desc1.hasOwnProperty(\"get\") && desc2.hasOwnProperty(\"value\") &&\n typeof desc2.get === \"undefined\" && typeof desc2.get === \"undefined\" &&\n dataPropertyAttributesAreCorrect(obj, \"prop\", 1001, false, true, true);\n } finally {\n delete obj.prop;\n delete obj.verifySetFunc;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-538-5",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-538-5.js",
+ "description": "ES5 Attributes - Updating a named accessor property 'P' whose [[Configurable]] attribute is true to a data property is successful, 'A' is an Array object (8.12.9 - step 9.c.i)",
+ "test": "assertTrue((function testcase() {\n var obj = [];\n\n obj.verifySetFunc = \"data\";\n var getFunc = function () {\n return obj.verifySetFunc;\n };\n\n var setFunc = function (value) {\n obj.verifySetFunc = value;\n };\n\n Object.defineProperty(obj, \"prop\", {\n get: getFunc,\n set: setFunc,\n enumerable: true,\n configurable: true\n });\n var desc1 = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n Object.defineProperty(obj, \"prop\", {\n value: 1001\n });\n var desc2 = Object.getOwnPropertyDescriptor(obj, \"prop\"); \n\n return desc1.hasOwnProperty(\"get\") && desc2.hasOwnProperty(\"value\") &&\n typeof desc2.get === \"undefined\" && typeof desc2.get === \"undefined\" &&\n dataPropertyAttributesAreCorrect(obj, \"prop\", 1001, false, true, true);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-538-6",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-538-6.js",
+ "description": "ES5 Attributes - Updating an indexed accessor property 'P' whose [[Configurable]] attribute is true to a data property is successful, 'O' is an Arguments object",
+ "test": "assertTrue((function testcase() {\n var obj = (function () {\n return arguments;\n }());\n\n obj.verifySetFunc = \"data\";\n var getFunc = function () {\n return obj.verifySetFunc;\n };\n\n var setFunc = function (value) {\n obj.verifySetFunc = value;\n };\n\n Object.defineProperty(obj, \"0\", {\n get: getFunc,\n set: setFunc,\n enumerable: true,\n configurable: true\n });\n var desc1 = Object.getOwnPropertyDescriptor(obj, \"0\");\n\n Object.defineProperty(obj, \"0\", {\n value: 1001\n });\n var desc2 = Object.getOwnPropertyDescriptor(obj, \"0\");\n\n return desc1.hasOwnProperty(\"get\") && desc2.hasOwnProperty(\"value\") &&\n typeof desc2.get === \"undefined\" && typeof desc2.get === \"undefined\" &&\n dataPropertyAttributesAreCorrect(obj, \"0\", 1001, false, true, true);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-538-7",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-538-7.js",
+ "description": "ES5 Attributes - Updating an indexed accessor property 'P' whose [[Configurable]] attribute is true to a data property is successful, 'O' is the global object",
+ "test": "assertTrue((function testcase() {\n var obj = fnGlobalObject();\n\n obj.verifySetFunc = \"data\";\n var getFunc = function () {\n return obj.verifySetFunc;\n };\n\n var setFunc = function (value) {\n obj.verifySetFunc = value;\n };\n try {\n Object.defineProperty(obj, \"0\", {\n get: getFunc,\n set: setFunc,\n enumerable: true,\n configurable: true\n });\n var desc1 = Object.getOwnPropertyDescriptor(obj, \"0\");\n\n Object.defineProperty(obj, \"0\", {\n value: 1001\n });\n var desc2 = Object.getOwnPropertyDescriptor(obj, \"0\");\n\n return desc1.hasOwnProperty(\"get\") && desc2.hasOwnProperty(\"value\") &&\n typeof desc2.get === \"undefined\" && typeof desc2.get === \"undefined\" &&\n dataPropertyAttributesAreCorrect(obj, \"0\", 1001, false, true, true);\n } finally {\n delete obj[0];\n delete obj.verifySetFunc;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-538",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-538.js",
+ "description": "ES5 Attributes - success to update the accessor property ([[Get]] is a Function, [[Set]] is a Function, [[Enumerable]] is true, [[Configurable]] is true) to a data property",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n var getFunc = function () {\n return 1001;\n };\n\n var verifySetFunc = \"data\";\n var setFunc = function (value) {\n verifySetFunc = value;\n };\n\n Object.defineProperty(obj, \"prop\", {\n get: getFunc,\n set: setFunc,\n enumerable: true,\n configurable: true\n });\n var desc1 = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n Object.defineProperty(obj, \"prop\", {\n value: 1001\n });\n var desc2 = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n return desc1.hasOwnProperty(\"get\") && desc2.hasOwnProperty(\"value\") &&\n typeof desc2.get === \"undefined\" && typeof desc2.get === \"undefined\" &&\n dataPropertyAttributesAreCorrect(obj, \"prop\", 1001, false, true, true);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-539",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-539.js",
+ "description": "ES5 Attributes - [[Get]] attribute of accessor property ([[Get]] is a Function, [[Set]] is a Function, [[Enumerable]] is true, [[Configurable]] is false) is the expected function",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n var getFunc = function () {\n return 1001;\n };\n\n var verifySetFunc = \"data\";\n var setFunc = function (value) {\n verifySetFunc = value;\n };\n\n Object.defineProperty(obj, \"prop\", {\n get: getFunc,\n set: setFunc,\n enumerable: true,\n configurable: false\n });\n\n var propertyDefineCorrect = obj.hasOwnProperty(\"prop\");\n var desc = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n return propertyDefineCorrect && desc.get === getFunc && obj.prop === 1001;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-54",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-54.js",
+ "description": "Object.defineProperty - 'name' property doesn't exist in 'O', test [[Set]] of 'name' property of 'Attributes' is set as undefined value if absent in accessor descriptor 'desc' (8.12.9 step 4.b.i)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n Object.defineProperty(obj, \"property\", {\n get: function () {\n return \"property\";\n },\n enumerable: false,\n configurable: false\n });\n\n\n if (obj.property !== \"property\") {\n return false;\n }\n var desc = Object.getOwnPropertyDescriptor(obj, \"property\");\n if (typeof desc.set !== \"undefined\") {\n return false;\n }\n for (var p in obj) {\n if (p === \"property\") {\n return false;\n }\n }\n delete obj.property;\n if (!obj.hasOwnProperty(\"property\")) {\n return false;\n }\n\n return true;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-540-1",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-540-1.js",
+ "description": "Object.defineProperty fails to update [[Get]] and [[Set]] attributes of a named accessor property 'P' whose [[Configurable]] attribute is false and throws TypeError exception, 'O' is an Object object (8.12.9 step 11.a)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n obj.verifySetFunction = \"data\";\n var getFunc = function () {\n return obj.verifySetFunction;\n };\n var setFunc = function (value) {\n obj.verifySetFunction = value;\n };\n Object.defineProperty(obj, \"property\", {\n get: getFunc,\n set: setFunc,\n configurable: false\n });\n\n var result = false;\n try {\n Object.defineProperty(obj, \"property\", {\n get: function () {\n return 100;\n }\n });\n } catch (e) {\n result = e instanceof TypeError &&\n accessorPropertyAttributesAreCorrect(obj, \"property\", getFunc, setFunc, \"verifySetFunction\", false, false);\n }\n\n try {\n Object.defineProperty(obj, \"property\", {\n set: function (value) {\n obj.verifySetFunction1 = value;\n }\n });\n } catch (e1) {\n return result && e1 instanceof TypeError &&\n accessorPropertyAttributesAreCorrect(obj, \"property\", getFunc, setFunc, \"verifySetFunction\", false, false);\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-540-10",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-540-10.js",
+ "description": "ES5 Attributes - Updating an indexed accessor property 'P' using simple assignment is successful, 'O' is an Arguments object (8.12.5 step 5.b)",
+ "test": "assertTrue((function testcase() {\n var obj = (function () {\n return arguments;\n }());\n\n obj.verifySetFunc = \"data\";\n var getFunc = function () {\n return obj.verifySetFunc;\n };\n\n var setFunc = function (value) {\n obj.verifySetFunc = value;\n };\n\n Object.defineProperty(obj, \"0\", {\n get: getFunc,\n set: setFunc,\n enumerable: true,\n configurable: false\n });\n\n obj[0] = \"overrideData\";\n var propertyDefineCorrect = obj.hasOwnProperty(\"0\");\n var desc = Object.getOwnPropertyDescriptor(obj, \"0\");\n\n return propertyDefineCorrect && desc.set === setFunc && obj.verifySetFunc === \"overrideData\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-540-2",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-540-2.js",
+ "description": "Object.defineProperty fails to update [[Get]] and [[Set]] attributes of an indexed property 'P' whose [[Configurable]] attribute is false and throws TypeError exception, 'A' is an Array object (8.12.9 step 11.a)",
+ "test": "assertTrue((function testcase() {\n var obj = [];\n\n obj.verifySetFunction = \"data\";\n var getFunc = function () {\n return obj.verifySetFunction;\n };\n var setFunc = function (value) {\n obj.verifySetFunction = value;\n };\n Object.defineProperty(obj, \"0\", {\n get: getFunc,\n set: setFunc,\n configurable: false\n });\n\n var result = false;\n try {\n Object.defineProperty(obj, \"0\", {\n get: function () {\n return 100;\n }\n });\n } catch (e) {\n result = e instanceof TypeError &&\n accessorPropertyAttributesAreCorrect(obj, \"0\", getFunc, setFunc, \"verifySetFunction\", false, false);\n }\n\n try {\n Object.defineProperty(obj, \"0\", {\n set: function (value) {\n obj.verifySetFunction1 = value;\n }\n });\n } catch (e1) {\n return result && e1 instanceof TypeError &&\n accessorPropertyAttributesAreCorrect(obj, \"0\", getFunc, setFunc, \"verifySetFunction\", false, false);\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-540-3",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-540-3.js",
+ "description": "Object.defineProperty fails to update [[Get]] and [[Set]] attributes of a named accessor property 'P' whose [[Configurable]] attribute is false, 'O' is an Arguments object (8.12.9 step 11.a)",
+ "test": "assertTrue((function testcase() {\n var obj = (function () {\n return arguments;\n }());\n\n obj.verifySetFunction = \"data\";\n var getFunc = function () {\n return obj.verifySetFunction;\n };\n var setFunc = function (value) {\n obj.verifySetFunction = value;\n };\n Object.defineProperty(obj, \"property\", {\n get: getFunc,\n set: setFunc,\n configurable: false\n });\n\n var result = false;\n try {\n Object.defineProperty(obj, \"property\", {\n get: function () {\n return 100;\n }\n });\n } catch (e) {\n result = e instanceof TypeError &&\n accessorPropertyAttributesAreCorrect(obj, \"property\", getFunc, setFunc, \"verifySetFunction\", false, false);\n }\n\n try {\n Object.defineProperty(obj, \"property\", {\n set: function (value) {\n obj.verifySetFunction1 = value;\n }\n });\n } catch (e1) {\n return result && e1 instanceof TypeError &&\n accessorPropertyAttributesAreCorrect(obj, \"property\", getFunc, setFunc, \"verifySetFunction\", false, false);\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-540-4",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-540-4.js",
+ "description": "ES5 Attributes - Updating an indexed accessor property 'P' using simple assignment is successful, 'A' is an Array object (8.12.5 step 5.b)",
+ "test": "assertTrue((function testcase() {\n var obj = [];\n\n obj.verifySetFunc = \"data\";\n var getFunc = function () {\n return obj.verifySetFunc;\n };\n\n var setFunc = function (value) {\n obj.verifySetFunc = value;\n };\n\n Object.defineProperty(obj, \"0\", {\n get: getFunc,\n set: setFunc,\n enumerable: true,\n configurable: false\n });\n\n obj[0] = \"overrideData\";\n var propertyDefineCorrect = obj.hasOwnProperty(\"0\");\n var desc = Object.getOwnPropertyDescriptor(obj, \"0\");\n\n return propertyDefineCorrect && desc.set === setFunc && obj.verifySetFunc === \"overrideData\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-540-5",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-540-5.js",
+ "description": "ES5 Attributes - Updating a named accessor property 'P' using simple assignment is successful, 'O' is an Arguments object (8.12.5 step 5.b)",
+ "test": "assertTrue((function testcase() {\n var obj = (function () {\n return arguments;\n }());\n\n obj.verifySetFunc = \"data\";\n var getFunc = function () {\n return obj.verifySetFunc;\n };\n\n var setFunc = function (value) {\n obj.verifySetFunc = value;\n };\n\n Object.defineProperty(obj, \"prop\", {\n get: getFunc,\n set: setFunc,\n enumerable: true,\n configurable: false\n });\n\n obj.prop = \"overrideData\";\n var propertyDefineCorrect = obj.hasOwnProperty(\"prop\");\n var desc = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n return propertyDefineCorrect && desc.set === setFunc && obj.verifySetFunc === \"overrideData\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-540-6",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-540-6.js",
+ "description": "Object.defineProperty fails to update [[Get]] and [[Set]] attributes of an indexed accessor property 'P' whose [[Configurable]] attribute is false and throws TypeError exception, 'O' is an Object object (8.12.9 step 11.a)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n obj.verifySetFunction = \"data\";\n var getFunc = function () {\n return obj.verifySetFunction;\n };\n var setFunc = function (value) {\n obj.verifySetFunction = value;\n };\n Object.defineProperty(obj, \"0\", {\n get: getFunc,\n set: setFunc,\n configurable: false\n });\n\n var result = false;\n try {\n Object.defineProperty(obj, \"0\", {\n get: function () {\n return 100;\n }\n });\n } catch (e) {\n result = e instanceof TypeError &&\n accessorPropertyAttributesAreCorrect(obj, \"0\", getFunc, setFunc, \"verifySetFunction\", false, false);\n }\n\n try {\n Object.defineProperty(obj, \"0\", {\n set: function (value) {\n obj.verifySetFunction1 = value;\n }\n });\n } catch (e1) {\n return result && e1 instanceof TypeError &&\n accessorPropertyAttributesAreCorrect(obj, \"0\", getFunc, setFunc, \"verifySetFunction\", false, false);\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-540-7",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-540-7.js",
+ "description": "Object.defineProperty fails to update [[Get]] and [[Set]] attributes of a named property 'P' whose [[Configurable]] attribute is false and throws TypeError exception, 'A' is an Array object (8.12.9 step 11.a)",
+ "test": "assertTrue((function testcase() {\n var obj = [];\n\n obj.verifySetFunction = \"data\";\n var getFunc = function () {\n return obj.verifySetFunction;\n };\n var setFunc = function (value) {\n obj.verifySetFunction = value;\n };\n Object.defineProperty(obj, \"prop\", {\n get: getFunc,\n set: setFunc,\n configurable: false\n });\n\n var result = false;\n try {\n Object.defineProperty(obj, \"prop\", {\n get: function () {\n return 100;\n }\n });\n } catch (e) {\n result = e instanceof TypeError &&\n accessorPropertyAttributesAreCorrect(obj, \"prop\", getFunc, setFunc, \"verifySetFunction\", false, false);\n }\n\n try {\n Object.defineProperty(obj, \"prop\", {\n set: function (value) {\n obj.verifySetFunction1 = value;\n }\n });\n } catch (e1) {\n return result && e1 instanceof TypeError &&\n accessorPropertyAttributesAreCorrect(obj, \"prop\", getFunc, setFunc, \"verifySetFunction\", false, false);\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-540-8",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-540-8.js",
+ "description": "Object.defineProperty fails to update [[Get]] and [[Set]] attributes of an indexed accessor property 'P' whose [[Configurable]] attribute is false, 'O' is an Arguments object (8.12.9 step 11.a)",
+ "test": "assertTrue((function testcase() {\n var obj = (function () {\n return arguments;\n }());\n\n obj.verifySetFunction = \"data\";\n var getFunc = function () {\n return obj.verifySetFunction;\n };\n var setFunc = function (value) {\n obj.verifySetFunction = value;\n };\n Object.defineProperty(obj, \"0\", {\n get: getFunc,\n set: setFunc,\n configurable: false\n });\n\n var result = false;\n try {\n Object.defineProperty(obj, \"0\", {\n get: function () {\n return 100;\n }\n });\n } catch (e) {\n result = e instanceof TypeError &&\n accessorPropertyAttributesAreCorrect(obj, \"0\", getFunc, setFunc, \"verifySetFunction\", false, false);\n }\n\n try {\n Object.defineProperty(obj, \"0\", {\n set: function (value) {\n obj.verifySetFunction1 = value;\n }\n });\n } catch (e1) {\n return result && e1 instanceof TypeError &&\n accessorPropertyAttributesAreCorrect(obj, \"0\", getFunc, setFunc, \"verifySetFunction\", false, false);\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-540-9",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-540-9.js",
+ "description": "ES5 Attributes - Updating a named accessor property 'P' using simple assignment is successful, 'A' is an Array object (8.12.5 step 5.b)",
+ "test": "assertTrue((function testcase() {\n var obj = [];\n\n obj.verifySetFunc = \"data\";\n var getFunc = function () {\n return obj.verifySetFunc;\n };\n\n var setFunc = function (value) {\n obj.verifySetFunc = value;\n };\n\n Object.defineProperty(obj, \"prop\", {\n get: getFunc,\n set: setFunc,\n enumerable: true,\n configurable: false\n });\n\n obj.prop = \"overrideData\";\n var propertyDefineCorrect = obj.hasOwnProperty(\"prop\");\n var desc = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n return propertyDefineCorrect && desc.set === setFunc && obj.verifySetFunc === \"overrideData\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-540",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-540.js",
+ "description": "ES5 Attributes - [[Set]] attribute of accessor property ([[Get]] is a Function, [[Set]] is a Function, [[Enumerable]] is true, [[Configurable]] is false) is the expected function",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n var getFunc = function () {\n return 1001;\n };\n\n var verifySetFunc = \"data\";\n var setFunc = function (value) {\n verifySetFunc = value;\n };\n\n Object.defineProperty(obj, \"prop\", {\n get: getFunc,\n set: setFunc,\n enumerable: true,\n configurable: false\n });\n\n obj.prop = \"overrideData\";\n var propertyDefineCorrect = obj.hasOwnProperty(\"prop\");\n var desc = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n return propertyDefineCorrect && desc.set === setFunc && verifySetFunc === \"overrideData\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-541",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-541.js",
+ "description": "ES5 Attributes - property ([[Get]] is a Function, [[Set]] is a Function, [[Enumerable]] is true, [[Configurable]] is false) is enumerable",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n var getFunc = function () {\n return 1001;\n };\n\n var verifySetFunc = \"data\";\n var setFunc = function (value) {\n verifySetFunc = value;\n };\n\n Object.defineProperty(obj, \"prop\", {\n get: getFunc,\n set: setFunc,\n enumerable: true,\n configurable: false\n });\n\n var propertyDefineCorrect = obj.hasOwnProperty(\"prop\");\n var desc = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n for (var p in obj) {\n if (p === \"prop\") {\n return propertyDefineCorrect && desc.enumerable === true;\n }\n }\n\n return false;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-542",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-542.js",
+ "description": "ES5 Attributes - property ([[Get]] is a Function, [[Set]] is a Function, [[Enumerable]] is true, [[Configurable]] is false) is undeletable",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n var getFunc = function () {\n return 1001;\n };\n\n var verifySetFunc = \"data\";\n var setFunc = function (value) {\n verifySetFunc = value;\n };\n\n Object.defineProperty(obj, \"prop\", {\n get: getFunc,\n set: setFunc,\n enumerable: true,\n configurable: false\n });\n\n var propertyDefineCorrect = obj.hasOwnProperty(\"prop\");\n var desc = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n delete obj.prop;\n\n return propertyDefineCorrect && desc.configurable === false && obj.hasOwnProperty(\"prop\");\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-543",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-543.js",
+ "description": "ES5 Attributes - fail to update [[Get]] attribute of accessor property ([[Get]] is a Function, [[Set]] is a Function, [[Enumerable]] is true, [[Configurable]] is false) to different value",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n var getFunc = function () {\n return 1001;\n };\n\n var verifySetFunc = \"data\";\n var setFunc = function (value) {\n verifySetFunc = value;\n };\n\n Object.defineProperty(obj, \"prop\", {\n get: getFunc,\n set: setFunc,\n enumerable: true,\n configurable: false\n });\n\n var result1 = obj.prop === 1001;\n var desc1 = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n try {\n Object.defineProperty(obj, \"prop\", {\n get: undefined\n });\n\n return false;\n } catch (e) {\n var result2 = obj.prop === 1001;\n var desc2 = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n return result1 && result2 && desc1.get === getFunc && desc2.get === getFunc && e instanceof TypeError;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-544",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-544.js",
+ "description": "ES5 Attributes - fail to update [[Set]] attribute of accessor property ([[Get]] is a Function, [[Set]] is a Function, [[Enumerable]] is true, [[Configurable]] is false) to different value",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n var getFunc = function () {\n return 1001;\n };\n\n var verifySetFunc = \"data\";\n var setFunc = function (value) {\n verifySetFunc = value;\n };\n\n Object.defineProperty(obj, \"prop\", {\n get: getFunc,\n set: setFunc,\n enumerable: true,\n configurable: false\n });\n\n var desc1 = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n try {\n Object.defineProperty(obj, \"prop\", {\n set: undefined\n });\n\n return false;\n } catch (e) {\n var desc2 = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n return desc1.set === setFunc && desc2.set === setFunc && e instanceof TypeError;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-545",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-545.js",
+ "description": "ES5 Attributes - fail to update [[Enumerable]] attribute of accessor property ([[Get]] is a Function, [[Set]] is a Function, [[Enumerable]] is true, [[Configurable]] is false) to different value",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n var getFunc = function () {\n return 1001;\n };\n\n var verifySetFunc = \"data\";\n var setFunc = function (value) {\n verifySetFunc = value;\n };\n\n Object.defineProperty(obj, \"prop\", {\n get: getFunc,\n set: setFunc,\n enumerable: true,\n configurable: false\n });\n var result1 = false;\n var desc1 = Object.getOwnPropertyDescriptor(obj, \"prop\");\n for (var p1 in obj) {\n if (p1 === \"prop\") {\n result1 = true;\n }\n }\n\n try {\n Object.defineProperty(obj, \"prop\", {\n enumerable: false\n });\n\n return false;\n } catch (e) {\n var result2 = false;\n var desc2 = Object.getOwnPropertyDescriptor(obj, \"prop\");\n for (var p2 in obj) {\n if (p2 === \"prop\") {\n result2 = true;\n }\n }\n\n return result1 && result2 && desc1.enumerable === true && desc2.enumerable === true && e instanceof TypeError;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-546",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-546.js",
+ "description": "ES5 Attributes - fail to update [[Configurable]] attribute of accessor property ([[Get]] is a Function, [[Set]] is a Function, [[Enumerable]] is true, [[Configurable]] is false) to different value",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n var getFunc = function () {\n return 1001;\n };\n\n var verifySetFunc = \"data\";\n var setFunc = function (value) {\n verifySetFunc = value;\n };\n\n Object.defineProperty(obj, \"prop\", {\n get: getFunc,\n set: setFunc,\n enumerable: true,\n configurable: false\n });\n var desc1 = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n try {\n Object.defineProperty(obj, \"prop\", {\n configurable: true\n });\n\n return false;\n } catch (e) {\n var desc2 = Object.getOwnPropertyDescriptor(obj, \"prop\");\n delete obj.prop;\n\n return desc1.configurable === false && desc2.configurable === false && obj.hasOwnProperty(\"prop\") && e instanceof TypeError;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-547-1",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-547-1.js",
+ "description": "ES5 Attributes - Updating an indexed accessor property 'P' whose [[Configurable]] attribute is false to a data property does not succeed, 'A' is an Array object (8.12.9 step 9.a)",
+ "test": "assertTrue((function testcase() {\n var obj = [];\n \n obj.verifySetFunc = \"data\";\n var getFunc = function () {\n return obj.verifySetFunc;\n };\n\n var setFunc = function (value) {\n obj.verifySetFunc = value;\n };\n\n Object.defineProperty(obj, \"0\", {\n get: getFunc,\n set: setFunc,\n enumerable: true,\n configurable: false\n });\n var desc1 = Object.getOwnPropertyDescriptor(obj, \"0\");\n\n try {\n Object.defineProperty(obj, \"0\", {\n value: 1001\n });\n\n return false;\n } catch (e) {\n var desc2 = Object.getOwnPropertyDescriptor(obj, \"0\");\n\n return desc1.hasOwnProperty(\"get\") && !desc2.hasOwnProperty(\"value\") && e instanceof TypeError &&\n accessorPropertyAttributesAreCorrect(obj, \"0\", getFunc, setFunc, \"verifySetFunc\", true, false);\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-547-2",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-547-2.js",
+ "description": "ES5 Attributes - Updating a named accessor property 'P' whose [[Configurable]] attribute is false to a data property does not succeed, 'A' is an Arguments object (8.12.9 step 9.a)",
+ "test": "assertTrue((function testcase() {\n var obj = (function () {\n return arguments;\n }());\n\n obj.verifySetFunc = \"data\";\n var getFunc = function () {\n return obj.verifySetFunc;\n };\n\n var setFunc = function (value) {\n obj.verifySetFunc = value;\n };\n\n Object.defineProperty(obj, \"prop\", {\n get: getFunc,\n set: setFunc,\n enumerable: true,\n configurable: false\n });\n var desc1 = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n try {\n Object.defineProperty(obj, \"prop\", {\n value: 1001\n });\n\n return false;\n } catch (e) {\n var desc2 = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n return desc1.hasOwnProperty(\"get\") && !desc2.hasOwnProperty(\"value\") && e instanceof TypeError &&\n accessorPropertyAttributesAreCorrect(obj, \"prop\", getFunc, setFunc, \"verifySetFunc\", true, false);\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-547-3",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-547-3.js",
+ "description": "ES5 Attributes - Updating a named accessor property 'P' whose [[Configurable]] attribute is false to a data property does not succeed, 'A' is an Array object (8.12.9 step 9.a)",
+ "test": "assertTrue((function testcase() {\n var obj = [];\n \n obj.verifySetFunc = \"data\";\n var getFunc = function () {\n return obj.verifySetFunc;\n };\n\n var setFunc = function (value) {\n obj.verifySetFunc = value;\n };\n\n Object.defineProperty(obj, \"prop\", {\n get: getFunc,\n set: setFunc,\n enumerable: true,\n configurable: false\n });\n var desc1 = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n try {\n Object.defineProperty(obj, \"prop\", {\n value: 1001\n });\n\n return false;\n } catch (e) {\n var desc2 = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n return desc1.hasOwnProperty(\"get\") && !desc2.hasOwnProperty(\"value\") && e instanceof TypeError &&\n accessorPropertyAttributesAreCorrect(obj, \"prop\", getFunc, setFunc, \"verifySetFunc\", true, false);\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-547-4",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-547-4.js",
+ "description": "ES5 Attributes - Updating an indexed accessor property 'P' whose [[Configurable]] attribute is false to a data property does not succeed, 'A' is an Arguments object (8.12.9 step 9.a)",
+ "test": "assertTrue((function testcase() {\n var obj = (function () {\n return arguments;\n }());\n\n obj.verifySetFunc = \"data\";\n var getFunc = function () {\n return obj.verifySetFunc;\n };\n\n var setFunc = function (value) {\n obj.verifySetFunc = value;\n };\n\n Object.defineProperty(obj, \"0\", {\n get: getFunc,\n set: setFunc,\n enumerable: true,\n configurable: false\n });\n var desc1 = Object.getOwnPropertyDescriptor(obj, \"0\");\n\n try {\n Object.defineProperty(obj, \"0\", {\n value: 1001\n });\n\n return false;\n } catch (e) {\n var desc2 = Object.getOwnPropertyDescriptor(obj, \"0\");\n\n return desc1.hasOwnProperty(\"get\") && !desc2.hasOwnProperty(\"value\") && e instanceof TypeError &&\n accessorPropertyAttributesAreCorrect(obj, \"0\", getFunc, setFunc, \"verifySetFunc\", true, false);\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-547",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-547.js",
+ "description": "ES5 Attributes - fail to update the accessor property ([[Get]] is a Function, [[Set]] is a Function, [[Enumerable]] is true, [[Configurable]] is false) to a data property",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n var getFunc = function () {\n return 1001;\n };\n\n var verifySetFunc = \"data\";\n var setFunc = function (value) {\n verifySetFunc = value;\n };\n\n Object.defineProperty(obj, \"prop\", {\n get: getFunc,\n set: setFunc,\n enumerable: true,\n configurable: false\n });\n var desc1 = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n try {\n Object.defineProperty(obj, \"prop\", {\n value: 1001\n });\n\n return false;\n } catch (e) {\n var desc2 = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n return desc1.hasOwnProperty(\"get\") && !desc2.hasOwnProperty(\"value\") && e instanceof TypeError;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-548",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-548.js",
+ "description": "ES5 Attributes - [[Get]] attribute of accessor property ([[Get]] is a Function, [[Set]] is a Function, [[Enumerable]] is false, [[Configurable]] is true) is the expected function",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n var getFunc = function () {\n return 1001;\n };\n\n var verifySetFunc = \"data\";\n var setFunc = function (value) {\n verifySetFunc = value;\n };\n\n Object.defineProperty(obj, \"prop\", {\n get: getFunc,\n set: setFunc,\n enumerable: false,\n configurable: true\n });\n\n var propertyDefineCorrect = obj.hasOwnProperty(\"prop\");\n var desc = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n return propertyDefineCorrect && desc.get === getFunc && obj.prop === 1001;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-549",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-549.js",
+ "description": "ES5 Attributes - [[Set]] attribute of accessor property ([[Get]] is a Function, [[Set]] is a Function, [[Enumerable]] is false, [[Configurable]] is true) is the expected function",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n var getFunc = function () {\n return 1001;\n };\n\n var verifySetFunc = \"data\";\n var setFunc = function (value) {\n verifySetFunc = value;\n };\n\n Object.defineProperty(obj, \"prop\", {\n get: getFunc,\n set: setFunc,\n enumerable: false,\n configurable: true\n });\n\n obj.prop = \"overrideData\";\n var propertyDefineCorrect = obj.hasOwnProperty(\"prop\");\n var desc = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n return propertyDefineCorrect && desc.set === setFunc && verifySetFunc === \"overrideData\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-55",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-55.js",
+ "description": "Object.defineProperty - 'name' property doesn't exist in 'O', test [[Enumerable]] of 'name' property of 'Attributes' is set as false value if absent in accessor descriptor 'desc' (8.12.9 step 4.b.i)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n var setFunc = function (value) {\n obj.setVerifyHelpProp = value;\n };\n var getFunc = function () {\n return 10;\n };\n\n Object.defineProperty(obj, \"property\", {\n set: setFunc,\n get: getFunc,\n configurable: true\n });\n return accessorPropertyAttributesAreCorrect(obj, \"property\", getFunc, setFunc, \"setVerifyHelpProp\", false, true);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-550",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-550.js",
+ "description": "ES5 Attributes - property ([[Get]] is a Function, [[Set]] is a Function, [[Enumerable]] is false, [[Configurable]] is true) is non-enumerable",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n var getFunc = function () {\n return 1001;\n };\n\n var verifySetFunc = \"data\";\n var setFunc = function (value) {\n verifySetFunc = value;\n };\n\n Object.defineProperty(obj, \"prop\", {\n get: getFunc,\n set: setFunc,\n enumerable: false,\n configurable: true\n });\n\n var propertyDefineCorrect = obj.hasOwnProperty(\"prop\");\n var desc = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n for (var p in obj) {\n if (p === \"prop\") {\n return false;\n }\n }\n\n return propertyDefineCorrect && desc.enumerable === false;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-551",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-551.js",
+ "description": "ES5 Attributes - property ([[Get]] is a Function, [[Set]] is a Function, [[Enumerable]] is false, [[Configurable]] is true) is deletable",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n var getFunc = function () {\n return 1001;\n };\n\n var verifySetFunc = \"data\";\n var setFunc = function (value) {\n verifySetFunc = value;\n };\n\n Object.defineProperty(obj, \"prop\", {\n get: getFunc,\n set: setFunc,\n enumerable: false,\n configurable: true\n });\n\n var propertyDefineCorrect = obj.hasOwnProperty(\"prop\");\n var desc = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n delete obj.prop;\n\n return propertyDefineCorrect && desc.configurable === true && !obj.hasOwnProperty(\"prop\");\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-552",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-552.js",
+ "description": "ES5 Attributes - success to update [[Get]] attribute of accessor property ([[Get]] is a Function, [[Set]] is a Function, [[Enumerable]] is false, [[Configurable]] is true) to different value",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n var getFunc = function () {\n return 1001;\n };\n\n var verifySetFunc = \"data\";\n var setFunc = function (value) {\n verifySetFunc = value;\n };\n\n Object.defineProperty(obj, \"prop\", {\n get: getFunc,\n set: setFunc,\n enumerable: false,\n configurable: true\n });\n\n var result1 = obj.prop === 1001;\n var desc1 = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n Object.defineProperty(obj, \"prop\", {\n get: undefined\n });\n\n var result2 = typeof obj.prop === \"undefined\";\n var desc2 = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n return result1 && result2 && desc1.get === getFunc && typeof desc2.get === \"undefined\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-553",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-553.js",
+ "description": "ES5 Attributes - success to update [[Set]] attribute of accessor property ([[Get]] is a Function, [[Set]] is a Function, [[Enumerable]] is false, [[Configurable]] is true) to different value",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n var getFunc = function () {\n return 1001;\n };\n\n var verifySetFunc = \"data\";\n var setFunc = function (value) {\n verifySetFunc = value;\n };\n\n Object.defineProperty(obj, \"prop\", {\n get: getFunc,\n set: setFunc,\n enumerable: false,\n configurable: true\n });\n\n var desc1 = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n Object.defineProperty(obj, \"prop\", {\n set: undefined\n });\n\n var desc2 = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n return desc1.set === setFunc && typeof desc2.set === \"undefined\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-554",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-554.js",
+ "description": "ES5 Attributes - success to update [[Enumerable]] attribute of accessor property ([[Get]] is a Function, [[Set]] is a Function, [[Enumerable]] is false, [[Configurable]] is true) to different value",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n var getFunc = function () {\n return 1001;\n };\n\n var verifySetFunc = \"data\";\n var setFunc = function (value) {\n verifySetFunc = value;\n };\n\n Object.defineProperty(obj, \"prop\", {\n get: getFunc,\n set: setFunc,\n enumerable: false,\n configurable: true\n });\n\n var result1 = false;\n var desc1 = Object.getOwnPropertyDescriptor(obj, \"prop\");\n for (var p1 in obj) {\n if (p1 === \"prop\") {\n result1 = true;\n }\n }\n\n Object.defineProperty(obj, \"prop\", {\n enumerable: true\n });\n var result2 = false;\n var desc2 = Object.getOwnPropertyDescriptor(obj, \"prop\");\n for (var p2 in obj) {\n if (p2 === \"prop\") {\n result2 = true;\n }\n }\n\n return !result1 && result2 && desc1.enumerable === false && desc2.enumerable === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-555",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-555.js",
+ "description": "ES5 Attributes - success to update [[Configurable]] attribute of accessor property ([[Get]] is a Function, [[Set]] is a Function, [[Enumerable]] is false, [[Configurable]] is true) to different value",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n var getFunc = function () {\n return 1001;\n };\n\n var verifySetFunc = \"data\";\n var setFunc = function (value) {\n verifySetFunc = value;\n };\n\n Object.defineProperty(obj, \"prop\", {\n get: getFunc,\n set: setFunc,\n enumerable: false,\n configurable: true\n });\n\n var desc1 = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n Object.defineProperty(obj, \"prop\", {\n configurable: false\n });\n var desc2 = Object.getOwnPropertyDescriptor(obj, \"prop\");\n delete obj.prop;\n\n return desc1.configurable === true && desc2.configurable === false && obj.hasOwnProperty(\"prop\");\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-556",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-556.js",
+ "description": "ES5 Attributes - success to update the accessor property ([[Get]] is a Function, [[Set]] is a Function, [[Enumerable]] is false, [[Configurable]] is true) to a data property",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n var getFunc = function () {\n return 1001;\n };\n\n var verifySetFunc = \"data\";\n var setFunc = function (value) {\n verifySetFunc = value;\n };\n\n Object.defineProperty(obj, \"prop\", {\n get: getFunc,\n set: setFunc,\n enumerable: false,\n configurable: true\n });\n\n var desc1 = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n Object.defineProperty(obj, \"prop\", {\n value: 1001\n });\n var desc2 = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n return desc1.hasOwnProperty(\"get\") && desc2.hasOwnProperty(\"value\");\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-557",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-557.js",
+ "description": "ES5 Attributes - [[Get]] attribute of accessor property ([[Get]] is a Function, [[Set]] is a Function, [[Enumerable]] is false, [[Configurable]] is false) is the expected function",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n var getFunc = function () {\n return 1001;\n };\n\n var verifySetFunc = \"data\";\n var setFunc = function (value) {\n verifySetFunc = value;\n };\n\n Object.defineProperty(obj, \"prop\", {\n get: getFunc,\n set: setFunc,\n enumerable: false,\n configurable: false\n });\n\n var propertyDefineCorrect = obj.hasOwnProperty(\"prop\");\n var desc = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n return propertyDefineCorrect && desc.get === getFunc && obj.prop === 1001;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-558",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-558.js",
+ "description": "ES5 Attributes - [[Set]] attribute of accessor property ([[Get]] is a Function, [[Set]] is a Function, [[Enumerable]] is false, [[Configurable]] is false) is the expected function",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n var getFunc = function () {\n return 1001;\n };\n\n var verifySetFunc = \"data\";\n var setFunc = function (value) {\n verifySetFunc = value;\n };\n\n Object.defineProperty(obj, \"prop\", {\n get: getFunc,\n set: setFunc,\n enumerable: false,\n configurable: false\n });\n\n obj.prop = \"overrideData\";\n var propertyDefineCorrect = obj.hasOwnProperty(\"prop\");\n var desc = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n return propertyDefineCorrect && desc.set === setFunc && verifySetFunc === \"overrideData\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-559",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-559.js",
+ "description": "ES5 Attributes - property ([[Get]] is a Function, [[Set]] is a Function, [[Enumerable]] is false, [[Configurable]] is false) is non-enumerable",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n var getFunc = function () {\n return 1001;\n };\n\n var verifySetFunc = \"data\";\n var setFunc = function (value) {\n verifySetFunc = value;\n };\n\n Object.defineProperty(obj, \"prop\", {\n get: getFunc,\n set: setFunc,\n enumerable: false,\n configurable: false\n });\n\n var propertyDefineCorrect = obj.hasOwnProperty(\"prop\");\n var desc = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n for (var p in obj) {\n if (p === \"prop\") {\n return false;\n }\n }\n\n return propertyDefineCorrect && desc.enumerable === false;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-56",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-56.js",
+ "description": "Object.defineProperty - 'name' property doesn't exist in 'O', test [[Configurable]] of 'name' property is set as false if it is absent in accessor descriptor 'desc' (8.12.9 step 4.b.i)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n var setFunc = function (value) {\n obj.setVerifyHelpProp = value;\n };\n var getFunc = function () {\n return 10;\n };\n\n Object.defineProperty(obj, \"property\", {\n set: setFunc,\n get: getFunc,\n enumerable: true\n });\n return accessorPropertyAttributesAreCorrect(obj, \"property\", getFunc, setFunc, \"setVerifyHelpProp\", true, false);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-560",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-560.js",
+ "description": "ES5 Attributes - property ([[Get]] is a Function, [[Set]] is a Function, [[Enumerable]] is false, [[Configurable]] is false) is undeletable",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n var getFunc = function () {\n return 1001;\n };\n\n var verifySetFunc = \"data\";\n var setFunc = function (value) {\n verifySetFunc = value;\n };\n\n Object.defineProperty(obj, \"prop\", {\n get: getFunc,\n set: setFunc,\n enumerable: false,\n configurable: false\n });\n\n var propertyDefineCorrect = obj.hasOwnProperty(\"prop\");\n var desc = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n delete obj.prop;\n\n return propertyDefineCorrect && desc.configurable === false && obj.hasOwnProperty(\"prop\");\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-561",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-561.js",
+ "description": "ES5 Attributes - fail to update [[Get]] attribute of accessor property ([[Get]] is a Function, [[Set]] is a Function, [[Enumerable]] is false, [[Configurable]] is false) to different value",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n var getFunc = function () {\n return 1001;\n };\n\n var verifySetFunc = \"data\";\n var setFunc = function (value) {\n verifySetFunc = value;\n };\n\n Object.defineProperty(obj, \"prop\", {\n get: getFunc,\n set: setFunc,\n enumerable: false,\n configurable: false\n });\n\n var result1 = obj.prop === 1001;\n var desc1 = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n try {\n Object.defineProperty(obj, \"prop\", {\n get: undefined\n });\n\n return false;\n } catch (e) {\n var result2 = obj.prop === 1001;\n var desc2 = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n return result1 && result2 && desc1.get === getFunc && desc2.get === getFunc && e instanceof TypeError;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-562",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-562.js",
+ "description": "ES5 Attributes - fail to update [[Set]] attribute of accessor property ([[Get]] is a Function, [[Set]] is a Function, [[Enumerable]] is false, [[Configurable]] is false) to different value",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n var getFunc = function () {\n return 1001;\n };\n\n var verifySetFunc = \"data\";\n var setFunc = function (value) {\n verifySetFunc = value;\n };\n\n Object.defineProperty(obj, \"prop\", {\n get: getFunc,\n set: setFunc,\n enumerable: false,\n configurable: false\n });\n\n var desc1 = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n try {\n Object.defineProperty(obj, \"prop\", {\n set: undefined\n });\n\n return false;\n } catch (e) {\n var desc2 = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n return desc1.set === setFunc && desc2.set === setFunc && e instanceof TypeError;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-563",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-563.js",
+ "description": "ES5 Attributes - fail to update [[Enumerable]] attribute of accessor property ([[Get]] is a Function, [[Set]] is a Function, [[Enumerable]] is false, [[Configurable]] is false) to different value",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n var getFunc = function () {\n return 1001;\n };\n\n var verifySetFunc = \"data\";\n var setFunc = function (value) {\n verifySetFunc = value;\n };\n\n Object.defineProperty(obj, \"prop\", {\n get: getFunc,\n set: setFunc,\n enumerable: false,\n configurable: false\n });\n var result1 = false;\n var desc1 = Object.getOwnPropertyDescriptor(obj, \"prop\");\n for (var p1 in obj) {\n if (p1 === \"prop\") {\n result1 = true;\n }\n }\n\n try {\n Object.defineProperty(obj, \"prop\", {\n enumerable: true\n });\n\n return false;\n } catch (e) {\n var result2 = false;\n var desc2 = Object.getOwnPropertyDescriptor(obj, \"prop\");\n for (var p2 in obj) {\n if (p2 === \"prop\") {\n result2 = true;\n }\n }\n\n return !result1 && !result2 && desc1.enumerable === false && desc2.enumerable === false && e instanceof TypeError;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-564",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-564.js",
+ "description": "ES5 Attributes - fail to update [[Configurable]] attribute of accessor property ([[Get]] is a Function, [[Set]] is a Function, [[Enumerable]] is false, [[Configurable]] is false) to different value",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n var getFunc = function () {\n return 1001;\n };\n\n var verifySetFunc = \"data\";\n var setFunc = function (value) {\n verifySetFunc = value;\n };\n\n Object.defineProperty(obj, \"prop\", {\n get: getFunc,\n set: setFunc,\n enumerable: false,\n configurable: false\n });\n var desc1 = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n try {\n Object.defineProperty(obj, \"prop\", {\n configurable: true\n });\n\n return false;\n } catch (e) {\n var desc2 = Object.getOwnPropertyDescriptor(obj, \"prop\");\n delete obj.prop;\n\n return desc1.configurable === false && desc2.configurable === false && obj.hasOwnProperty(\"prop\") && e instanceof TypeError;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-565",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-565.js",
+ "description": "ES5 Attributes - fail to update the accessor property ([[Get]] is a Function, [[Set]] is a Function, [[Enumerable]] is false, [[Configurable]] is false) to a data property",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n var getFunc = function () {\n return 1001;\n };\n\n var verifySetFunc = \"data\";\n var setFunc = function (value) {\n verifySetFunc = value;\n };\n\n Object.defineProperty(obj, \"prop\", {\n get: getFunc,\n set: setFunc,\n enumerable: false,\n configurable: false\n });\n var desc1 = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n try {\n Object.defineProperty(obj, \"prop\", {\n value: 1001\n });\n\n return false;\n } catch (e) {\n var desc2 = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n return desc1.hasOwnProperty(\"get\") && !desc2.hasOwnProperty(\"value\") && e instanceof TypeError;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-566",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-566.js",
+ "description": "ES5 Attributes - [[Get]] attribute is a function which has zero argument",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n var getFunc = function () {\n return 2010;\n };\n\n Object.defineProperty(obj, \"prop\", {\n get: getFunc\n });\n\n var desc = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n return obj.hasOwnProperty(\"prop\") && obj.prop === 2010 && desc.get === getFunc;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-567",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-567.js",
+ "description": "ES5 Attributes - [[Get]] attribute is a function which has one argument",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n var getFunc = function (arg1) {\n return 2010;\n };\n\n Object.defineProperty(obj, \"prop\", {\n get: getFunc\n });\n\n var desc = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n return obj.hasOwnProperty(\"prop\") && obj.prop === 2010 && desc.get === getFunc;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-568",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-568.js",
+ "description": "ES5 Attributes - [[Get]] attribute is a function which has two arguments",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n var getFunc = function (arg1, arg2) {\n return 2010;\n };\n\n Object.defineProperty(obj, \"prop\", {\n get: getFunc\n });\n\n var desc = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n return obj.hasOwnProperty(\"prop\") && obj.prop === 2010 && desc.get === getFunc;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-569",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-569.js",
+ "description": "ES5 Attributes - [[Get]] attribute is a function which contains global variable",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n var globalVariable = 20;\n var getFunc = function () {\n globalVariable = 2010;\n return globalVariable;\n };\n\n Object.defineProperty(obj, \"prop\", {\n get: getFunc\n });\n var desc = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n return obj.hasOwnProperty(\"prop\") && desc.get === getFunc && obj.prop === 2010 && globalVariable === 2010;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-57",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-57.js",
+ "description": "Object.defineProperty - 'desc' is accessor descriptor, test updating all attribute values of 'name' (8.12.9 step 4.b.i)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n var setFunc = function (value) {\n obj.setVerifyHelpProp = value;\n };\n var getFunc = function () {\n return 14;\n };\n\n Object.defineProperty(obj, \"property\", {\n get: function () {\n return 11;\n },\n set: function (value) { },\n configurable: true,\n enumerable: true\n });\n\n Object.defineProperty(obj, \"property\", {\n get: getFunc,\n set: setFunc,\n configurable: false,\n enumerable: false\n });\n\n return accessorPropertyAttributesAreCorrect(obj, \"property\", getFunc, setFunc, \"setVerifyHelpProp\", false, false);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-570",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-570.js",
+ "description": "ES5 Attributes - [[Get]] attribute is a function which doesn't contains return statement",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n var verifyExecute = false;\n var getFunc = function () {\n verifyExecute = true;\n };\n\n Object.defineProperty(obj, \"prop\", {\n get: getFunc\n });\n\n var desc = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n return obj.hasOwnProperty(\"prop\") && desc.get === getFunc && typeof obj.prop === \"undefined\" && verifyExecute;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-571",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-571.js",
+ "description": "ES5 Attributes - [[Get]] attribute is a function which involves 'this' object into statement(s)",
+ "test": "assertTrue((function testcase() {\n var obj = {\n len: 2010\n };\n var getFunc = function () {\n return this;\n };\n\n Object.defineProperty(obj, \"prop\", {\n get: getFunc\n });\n\n var desc = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n return obj.hasOwnProperty(\"prop\") && obj.prop === obj && desc.get === getFunc;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-572",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-572.js",
+ "description": "ES5 Attributes - [[Set]] attribute is a function which has zero argument",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n var setFunc = function () { };\n\n Object.defineProperty(obj, \"prop\", {\n set: setFunc\n });\n\n var desc = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n return obj.hasOwnProperty(\"prop\") && desc.set === setFunc;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-573",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-573.js",
+ "description": "ES5 Attributes - [[Set]] attribute is a function which has one argument",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n var verifySetFunc = 20;\n var setFunc = function (value) {\n verifySetFunc = value;\n };\n Object.defineProperty(obj, \"prop\", {\n set: setFunc\n });\n obj.prop = 2010;\n var desc = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n return obj.hasOwnProperty(\"prop\") && desc.set === setFunc && verifySetFunc === 2010;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-574",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-574.js",
+ "description": "ES5 Attributes - [[Set]] attribute is a function which has two arguments",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n var firstArg = 12;\n var secondArg = 12;\n\n var setFunc = function (a, b) {\n firstArg = a;\n secondArg = b;\n };\n Object.defineProperty(obj, \"prop\", {\n set: setFunc\n });\n obj.prop = 100;\n var desc = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n return obj.hasOwnProperty(\"prop\") && desc.set === setFunc && firstArg === 100 && typeof secondArg === \"undefined\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-575",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-575.js",
+ "description": "ES5 Attributes - [[Set]] attribute is a function which contains global variable",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n var globalVariable = 20;\n var setFunc = function () {\n globalVariable = 2010;\n };\n\n Object.defineProperty(obj, \"prop\", {\n set: setFunc\n });\n obj.prop = 10;\n var desc = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n return obj.hasOwnProperty(\"prop\") && desc.set === setFunc && globalVariable === 2010;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-576",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-576.js",
+ "description": "ES5 Attributes - [[Set]] attribute is a function which contains return statement",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n var setFunc = function () {\n return 2010;\n };\n\n Object.defineProperty(obj, \"prop\", {\n set: setFunc\n });\n\n var desc = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n return obj.hasOwnProperty(\"prop\") && desc.set === setFunc;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-577",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-577.js",
+ "description": "ES5 Attributes - [[Set]] attribute is a function which involves 'this' object into statement(s)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n var setFunc = function (value) {\n this.len = value;\n };\n\n Object.defineProperty(obj, \"prop\", {\n set: setFunc\n });\n obj.prop = 2010;\n\n var desc = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n return obj.hasOwnProperty(\"prop\") && desc.set === setFunc && obj.len === 2010;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-578",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-578.js",
+ "description": "ES5 Attributes - [[Get]] field of inherited property of [[Prototype]] internal property is correct (String instance)",
+ "test": "assertTrue((function testcase() {\n var data = \"data\";\n try {\n Object.defineProperty(String.prototype, \"prop\", {\n get: function () {\n return data;\n },\n set: function (value) {\n data = value;\n },\n enumerable: true,\n configurable: true\n });\n var strObj = new String();\n\n return !strObj.hasOwnProperty(\"prop\") && strObj.prop === \"data\";\n } finally {\n delete String.prototype.prop;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-579",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-579.js",
+ "description": "ES5 Attributes - Success to add property into object (Array instance)",
+ "test": "assertTrue((function testcase() {\n var data = \"data\";\n try {\n Object.defineProperty(Array.prototype, \"prop\", {\n get: function () {\n return data;\n },\n set: function (value) {\n data = value;\n },\n enumerable: true,\n configurable: true\n });\n var arrObj = [];\n arrObj.prop = \"myOwnProperty\";\n\n return !arrObj.hasOwnProperty(\"prop\") && arrObj.prop === \"myOwnProperty\" && data === \"myOwnProperty\";\n } finally {\n delete Array.prototype.prop;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-58",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-58.js",
+ "description": "Object.defineProperty - 'name' is data descriptor and every fields in 'desc' is absent (8.12.9 step 5)",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n\n obj.foo = 101; // default value of attributes: writable: true, configurable: true, enumerable: true\n\n Object.defineProperty(obj, \"foo\", {});\n return dataPropertyAttributesAreCorrect(obj, \"foo\", 101, true, true, true);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-580",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-580.js",
+ "description": "ES5 Attributes - Inherited property is enumerable (Boolean instance)",
+ "test": "assertTrue((function testcase() {\n var data = \"data\";\n try {\n Object.defineProperty(Boolean.prototype, \"prop\", {\n get: function () {\n return data;\n },\n set: function (value) {\n data = value;\n },\n enumerable: true,\n configurable: true\n });\n var boolObj = new Boolean();\n var verifyEnumerable = false;\n for (var p in boolObj) {\n if(p === \"prop\") {\n verifyEnumerable = true;\n }\n }\n\n return !boolObj.hasOwnProperty(\"prop\") && verifyEnumerable;\n } finally {\n delete Boolean.prototype.prop;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-581",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-581.js",
+ "description": "ES5 Attributes - Fail to add property into object (Number instance)",
+ "test": "assertTrue((function testcase() {\n var data = \"data\";\n try {\n Object.defineProperty(Number.prototype, \"prop\", {\n get: function () {\n return data;\n },\n enumerable: false,\n configurable: true\n });\n var numObj = new Number();\n numObj.prop = \"myOwnProperty\";\n\n return !numObj.hasOwnProperty(\"prop\") && numObj.prop === \"data\" && data === \"data\";\n } finally {\n delete Number.prototype.prop;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-582",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-582.js",
+ "description": "ES5 Attributes - Inherited property is non-enumerable (Function instance)",
+ "test": "assertTrue((function testcase() {\n var data = \"data\";\n try {\n Object.defineProperty(Function.prototype, \"prop\", {\n get: function () {\n return data;\n },\n enumerable: false,\n configurable: true\n });\n var funObj = function () { };\n var verifyEnumerable = false;\n for (var p in funObj) {\n if (p === \"prop\") {\n verifyEnumerable = true;\n }\n }\n\n return !funObj.hasOwnProperty(\"prop\") && !verifyEnumerable;\n } finally {\n delete Function.prototype.prop;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-583",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-583.js",
+ "description": "ES5 Attributes - [[Get]] field of inherited property of [[Prototype]] internal property is correct (Error Instance)",
+ "test": "assertTrue((function testcase() {\n var data = \"data\";\n try {\n Object.defineProperty(Error.prototype, \"prop\", {\n get: function () {\n return data;\n },\n set: function (value) {\n data = value;\n },\n enumerable: true,\n configurable: true\n });\n var errObj = new Error();\n\n return !errObj.hasOwnProperty(\"prop\") && errObj.prop === \"data\";\n } finally {\n delete Error.prototype.prop;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-584",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-584.js",
+ "description": "ES5 Attributes - Failed to add property into object (Date instance)",
+ "test": "assertTrue((function testcase() {\n var data = \"data\";\n try {\n Object.defineProperty(Date.prototype, \"prop\", {\n get: function () {\n return data;\n },\n set: function (value) {\n data = value;\n },\n enumerable: true,\n configurable: true\n });\n var dateObj = new Date();\n dateObj.prop = \"myOwnProperty\";\n\n return !dateObj.hasOwnProperty(\"prop\") && dateObj.prop === \"myOwnProperty\" && data === \"myOwnProperty\";\n } finally {\n delete Date.prototype.prop;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-585",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-585.js",
+ "description": "ES5 Attributes - Inherited property is enumerable (RegExp instance)",
+ "test": "assertTrue((function testcase() {\n var data = \"data\";\n try {\n Object.defineProperty(RegExp.prototype, \"prop\", {\n get: function () {\n return data;\n },\n set: function (value) {\n data = value;\n },\n enumerable: true,\n configurable: true\n });\n var regObj = new RegExp();\n var verifyEnumerable = false;\n for (var p in regObj) {\n if (p === \"prop\") {\n verifyEnumerable = true;\n }\n }\n\n return !regObj.hasOwnProperty(\"prop\") && verifyEnumerable;\n } finally {\n delete RegExp.prototype.prop;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-586",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-586.js",
+ "description": "ES5 Attributes - Fail to update value of property into of [[Proptotype]] internal property (JSON)",
+ "test": "assertTrue((function testcase() {\n var data = \"data\";\n try {\n Object.defineProperty(Object.prototype, \"prop\", {\n get: function () {\n return data;\n },\n enumerable: false,\n configurable: true\n });\n JSON.prop = \"myOwnProperty\";\n\n return !JSON.hasOwnProperty(\"prop\") && JSON.prop === \"data\" && data === \"data\";\n } finally {\n delete Object.prototype.prop;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-587",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-587.js",
+ "description": "ES5 Attributes - Inherited property is non-enumerable (Math)",
+ "test": "assertTrue((function testcase() {\n var data = \"data\";\n try {\n Object.defineProperty(Object.prototype, \"prop\", {\n get: function () {\n return data;\n },\n enumerable: false,\n configurable: true\n });\n var verifyEnumerable = false;\n for (var p in Math) {\n if (p === \"prop\") {\n verifyEnumerable = true;\n }\n }\n\n return !Math.hasOwnProperty(\"prop\") && !verifyEnumerable;\n } finally {\n delete Object.prototype.prop;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-588",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-588.js",
+ "description": "ES5 Attributes - [[Get]] field of inherited property of [[Prototype]] internal property is correct (Object.create)",
+ "test": "assertTrue((function testcase() {\n var appointment = {};\n\n var data1 = 1001;\n Object.defineProperty(appointment, \"startTime\", {\n get: function () {\n return data1;\n },\n enumerable: true,\n configurable: false\n });\n var data2 = \"NAME\";\n Object.defineProperty(appointment, \"name\", {\n get: function () {\n return data2;\n },\n set: function (value) {\n data2 = value;\n },\n enumerable: true,\n configurable: true\n });\n\n var meeting = Object.create(appointment);\n var data3 = \"In-person meeting\";\n Object.defineProperty(meeting, \"conferenceCall\", {\n get: function () {\n return data3;\n },\n enumerable: true,\n configurable: false\n });\n\n var teamMeeting = Object.create(meeting);\n\n var hasOwnProperty = !teamMeeting.hasOwnProperty(\"name\") &&\n !teamMeeting.hasOwnProperty(\"startTime\") &&\n !teamMeeting.hasOwnProperty('conferenceCall');\n\n return hasOwnProperty && teamMeeting.name === \"NAME\" &&\n teamMeeting.startTime === 1001 &&\n teamMeeting.conferenceCall === \"In-person meeting\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-589",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-589.js",
+ "description": "ES5 Attributes - Success to update value of property into of [[Proptotype]] internal property (Object.create)",
+ "test": "assertTrue((function testcase() {\n var appointment = {};\n\n var data1 = 1001;\n Object.defineProperty(appointment, \"startTime\", {\n get: function () {\n return data1;\n },\n set: function (value) {\n data1 = value;\n },\n enumerable: true,\n configurable: true\n });\n var data2 = \"NAME\";\n Object.defineProperty(appointment, \"name\", {\n get: function () {\n return data2;\n },\n set: function (value) {\n data2 = value;\n },\n enumerable: true,\n configurable: false\n });\n\n var meeting = Object.create(appointment);\n var data3 = \"In-person meeting\";\n Object.defineProperty(meeting, \"conferenceCall\", {\n get: function () {\n return data3;\n },\n set: function (value) {\n data3 = value;\n },\n enumerable: true,\n configurable: false\n });\n\n var teamMeeting = Object.create(meeting);\n teamMeeting.name = \"Team Meeting\";\n var dateObj = new Date(\"10/31/2010 08:00\");\n teamMeeting.startTime = dateObj;\n teamMeeting.conferenceCall = \"4255551212\";\n\n var hasOwnProperty = !teamMeeting.hasOwnProperty(\"name\") &&\n !teamMeeting.hasOwnProperty(\"startTime\") &&\n !teamMeeting.hasOwnProperty('conferenceCall');\n\n return hasOwnProperty && teamMeeting.name === \"Team Meeting\" &&\n teamMeeting.startTime === dateObj &&\n teamMeeting.conferenceCall === \"4255551212\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-59",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-59.js",
+ "description": "Object.defineProperty - 'name' is accessor descriptor and every fields in 'desc' is absent (8.12.9 step 5)",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n\n function getFunc() {\n return 0;\n }\n function setFunc(value) {\n obj.helpVerifySet = value;\n }\n\n Object.defineProperty(obj, \"foo\", {\n get: getFunc,\n set: setFunc\n });\n\n Object.defineProperty(obj, \"foo\", {});\n return accessorPropertyAttributesAreCorrect(obj, \"foo\", getFunc, setFunc, \"helpVerifySet\", false, false);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-590",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-590.js",
+ "description": "ES5 Attributes - Inherited property is enumerable (Object.create)",
+ "test": "assertTrue((function testcase() {\n var appointment = {};\n\n var data1 = 1001;\n Object.defineProperty(appointment, \"startTime\", {\n get: function () {\n return data1;\n },\n set: function (value) {\n data1 = value;\n },\n enumerable: true,\n configurable: true\n });\n var data2 = \"NAME\";\n Object.defineProperty(appointment, \"name\", {\n get: function () {\n return data2;\n },\n set: function (value) {\n data2 = value;\n },\n enumerable: true,\n configurable: false\n });\n\n var meeting = Object.create(appointment);\n var data3 = \"In-person meeting\";\n Object.defineProperty(meeting, \"conferenceCall\", {\n get: function () {\n return data3;\n },\n set: function (value) {\n data3 = value;\n },\n enumerable: true,\n configurable: false\n });\n\n var teamMeeting = Object.create(meeting);\n\n var verifyTimeProp = false;\n var verifyNameProp = false;\n var verifyCallProp = false;\n for (var p in teamMeeting) {\n if (p === \"startTime\") {\n verifyTimeProp = true;\n }\n if (p === \"name\") {\n verifyNameProp = true;\n }\n if (p === \"conferenceCall\") {\n verifyCallProp = true;\n }\n }\n\n var hasOwnProperty = !teamMeeting.hasOwnProperty(\"name\") &&\n !teamMeeting.hasOwnProperty(\"startTime\") &&\n !teamMeeting.hasOwnProperty('conferenceCall');\n\n return hasOwnProperty && verifyTimeProp && verifyNameProp && verifyCallProp;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-591",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-591.js",
+ "description": "ES5 Attributes - Fail to update value of property of [[Proptotype]] internal property (Object.create)",
+ "test": "assertTrue((function testcase() {\n var appointment = {};\n\n var data1 = 1001;\n Object.defineProperty(appointment, \"startTime\", {\n get: function () {\n return data1;\n },\n enumerable: false,\n configurable: false\n });\n var data2 = \"NAME\";\n Object.defineProperty(appointment, \"name\", {\n get: function () {\n return data2;\n },\n enumerable: false,\n configurable: true\n });\n\n var meeting = Object.create(appointment);\n var data3 = \"In-person meeting\";\n Object.defineProperty(meeting, \"conferenceCall\", {\n get: function () {\n return data3;\n },\n enumerable: false,\n configurable: false\n });\n\n var teamMeeting = Object.create(meeting);\n teamMeeting.name = \"IE Team Meeting\";\n var dateObj = new Date(\"10/31/2010 08:00\");\n teamMeeting.startTime = dateObj;\n teamMeeting.conferenceCall = \"4255551212\";\n\n var hasOwnProperty = !teamMeeting.hasOwnProperty(\"name\") &&\n !teamMeeting.hasOwnProperty(\"startTime\") &&\n !teamMeeting.hasOwnProperty('conferenceCall');\n\n return hasOwnProperty && teamMeeting.name === \"NAME\" &&\n teamMeeting.startTime === 1001 &&\n teamMeeting.conferenceCall === \"In-person meeting\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-592",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-592.js",
+ "description": "ES5 Attributes - Inherited property is non-enumerable (Object.create)",
+ "test": "assertTrue((function testcase() {\n var appointment = {};\n\n var data1 = 1001;\n Object.defineProperty(appointment, \"startTime\", {\n get: function () {\n return data1;\n },\n enumerable: false,\n configurable: true\n });\n var data2 = \"NAME\";\n Object.defineProperty(appointment, \"name\", {\n get: function () {\n return data2;\n },\n enumerable: false,\n configurable: false\n });\n\n var meeting = Object.create(appointment);\n var data3 = \"In-person meeting\";\n Object.defineProperty(meeting, \"conferenceCall\", {\n get: function () {\n return data3;\n },\n enumerable: false,\n configurable: true\n });\n\n var teamMeeting = Object.create(meeting);\n\n var verifyTimeProp = false;\n var verifyNameProp = false;\n var verifyCallProp = false;\n for (var p in teamMeeting) {\n if (p === \"startTime\") {\n verifyTimeProp = true;\n }\n if (p === \"name\") {\n verifyNameProp = true;\n }\n if (p === \"conferenceCall\") {\n verifyCallProp = true;\n }\n }\n\n var hasOwnProperty = !teamMeeting.hasOwnProperty(\"name\") &&\n !teamMeeting.hasOwnProperty(\"startTime\") &&\n !teamMeeting.hasOwnProperty('conferenceCall');\n\n return hasOwnProperty && !verifyTimeProp && !verifyNameProp && !verifyCallProp;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-593",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-593.js",
+ "description": "ES5 Attributes - [[Get]] field of inherited property of [[Prototype]] internal property is correct (Function.prototype.bind)",
+ "test": "assertTrue((function testcase() {\n var foo = function () { };\n var data = \"data\";\n try {\n Object.defineProperty(Function.prototype, \"prop\", {\n get: function () {\n return data;\n },\n set: function (value) {\n data = value;\n },\n enumerable: true,\n configurable: true\n });\n\n var obj = foo.bind({});\n\n return !obj.hasOwnProperty(\"prop\") && obj.prop === data;\n } finally {\n delete Function.prototype.prop;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-594",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-594.js",
+ "description": "ES5 Attributes - Success to update value of property into of [[Proptotype]] internal property (Function.prototype.bind)",
+ "test": "assertTrue((function testcase() {\n var foo = function () { };\n var data = \"data\";\n try {\n Object.defineProperty(Function.prototype, \"prop\", {\n get: function () {\n return data;\n },\n set: function (value) {\n data = value;\n },\n enumerable: true,\n configurable: true\n });\n\n var obj = foo.bind({});\n obj.prop = \"overrideData\";\n\n return !obj.hasOwnProperty(\"prop\") && obj.prop === \"overrideData\";\n } finally {\n delete Function.prototype.prop;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-595",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-595.js",
+ "description": "ES5 Attributes - Inherited property is enumerable (Function.prototype.bind)",
+ "test": "assertTrue((function testcase() {\n var foo = function () { };\n var data = \"data\";\n try {\n Object.defineProperty(Function.prototype, \"prop\", {\n get: function () {\n return data;\n },\n set: function (value) {\n data = value;\n },\n enumerable: true,\n configurable: true\n });\n\n var obj = foo.bind({});\n\n var verifyEnumerable = false;\n for (var p in obj) {\n if (p === \"prop\") {\n verifyEnumerable = true;\n }\n }\n\n return !obj.hasOwnProperty(\"prop\") && verifyEnumerable;\n } finally {\n delete Function.prototype.prop;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-596",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-596.js",
+ "description": "ES5 Attributes - Fail to update value of property into of [[Proptotype]] internal property (Function.prototype.bind)",
+ "test": "assertTrue((function testcase() {\n var foo = function () { };\n var data = \"data\";\n try {\n Object.defineProperty(Function.prototype, \"prop\", {\n get: function () {\n return data;\n },\n enumerable: false,\n configurable: true\n });\n\n var obj = foo.bind({});\n obj.prop = \"overrideData\";\n\n return !obj.hasOwnProperty(\"prop\") && obj.prop === \"data\";\n } finally {\n delete Function.prototype.prop;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-597",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-597.js",
+ "description": "ES5 Attributes - Inherited property is non-enumerable (Function.prototype.bind)",
+ "test": "assertTrue((function testcase() {\n var foo = function () { };\n var data = \"data\";\n try {\n Object.defineProperty(Function.prototype, \"prop\", {\n get: function () {\n return data;\n },\n enumerable: false,\n configurable: true\n });\n\n var obj = foo.bind({});\n\n var verifyEnumerable = false;\n for (var p in obj) {\n if (p === \"prop\") {\n verifyEnumerable = true;\n }\n }\n\n return !obj.hasOwnProperty(\"prop\") && !verifyEnumerable;\n } finally {\n delete Function.prototype.prop;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-598",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-598.js",
+ "description": "ES5 Attributes - all attributes in Object.getPrototypeOf are correct",
+ "test": "assertTrue((function testcase() {\n var desc = Object.getOwnPropertyDescriptor(Object, \"getPrototypeOf\");\n\n var propertyAreCorrect = (desc.writable === true && desc.enumerable === false && desc.configurable === true);\n\n var temp = Object.getPrototypeOf;\n\n try {\n Object.getPrototypeOf = \"2010\";\n\n var isWritable = (Object.getPrototypeOf === \"2010\");\n\n var isEnumerable = false;\n\n for (var prop in Object) {\n if (prop === \"getPrototypeOf\") {\n isEnumerable = true;\n }\n }\n \n delete Object.getPrototypeOf;\n\n var isConfigurable = !Object.hasOwnProperty(\"getPrototypeOf\");\n\n return propertyAreCorrect && isWritable && !isEnumerable && isConfigurable;\n } finally {\n Object.defineProperty(Object, \"getPrototypeOf\", {\n value: temp,\n writable: true,\n enumerable: false,\n configurable: true\n });\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor) && fnExists(Object.getPrototypeOf))"
+ },
+ {
+ "id": "15.2.3.6-4-599",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-599.js",
+ "description": "ES5 Attributes - all attributes in Object.getOwnPropertyDescriptor are correct",
+ "test": "assertTrue((function testcase() {\n var desc = Object.getOwnPropertyDescriptor(Object, \"getOwnPropertyDescriptor\");\n\n var propertyAreCorrect = (desc.writable === true && desc.enumerable === false && desc.configurable === true);\n\n var temp = Object.getOwnPropertyDescriptor;\n\n try {\n Object.getOwnPropertyDescriptor = \"2010\";\n\n var isWritable = (Object.getOwnPropertyDescriptor === \"2010\");\n\n var isEnumerable = false;\n\n for (var prop in Object) {\n if (prop === \"getOwnPropertyDescriptor\") {\n isEnumerable = true;\n }\n }\n\n delete Object.getOwnPropertyDescriptor;\n\n var isConfigurable = !Object.hasOwnProperty(\"getOwnPropertyDescriptor\");\n\n return propertyAreCorrect && isWritable && !isEnumerable && isConfigurable;\n } finally {\n Object.defineProperty(Object, \"getOwnPropertyDescriptor\", {\n value: temp,\n writable: true,\n enumerable: false,\n configurable: true\n });\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-6",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-6.js",
+ "description": "Object.defineProperty is no-op if current and desc are the same accessor desc",
+ "test": "assertTrue((function testcase() {\n function sameAccessorDescriptorValues(d1, d2) {\n return (d1.get == d2.get &&\n d1.enumerable == d2.enumerable &&\n d1.configurable == d2.configurable);\n }\n\n var o = {};\n\n // create an accessor property with the following attributes:\n // enumerable: true, configurable: true\n var desc = {\n get: function () {},\n enumerable: true,\n configurable: true\n };\n\n Object.defineProperty(o, \"foo\", desc);\n\n // query for, and save, the desc. A subsequent call to defineProperty\n // with the same desc should not disturb the property definition.\n var d1 = Object.getOwnPropertyDescriptor(o, \"foo\"); \n\n // now, redefine the property with the same descriptor\n // the property defintion should not get disturbed.\n Object.defineProperty(o, \"foo\", desc);\n\n var d2 = Object.getOwnPropertyDescriptor(o, \"foo\"); \n\n if (sameAccessorDescriptorValues(d1, d2) === true) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-60",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-60.js",
+ "description": "Object.defineProperty - type of desc.value is different from type of name.value (8.12.9 step 6)",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n\n obj.foo = 101; // default value of attributes: writable: true, configurable: true, enumerable: true\n\n Object.defineProperty(obj, \"foo\", { value: \"abc\" });\n return dataPropertyAttributesAreCorrect(obj, \"foo\", \"abc\", true, true, true);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-600",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-600.js",
+ "description": "ES5 Attributes - all attributes in Object.getOwnPropertyNames are correct",
+ "test": "assertTrue((function testcase() {\n var desc = Object.getOwnPropertyDescriptor(Object, \"getOwnPropertyNames\");\n\n var propertyAreCorrect = (desc.writable === true && desc.enumerable === false && desc.configurable === true);\n\n var temp = Object.getOwnPropertyNames;\n\n try {\n Object.getOwnPropertyNames = \"2010\";\n\n var isWritable = (Object.getOwnPropertyNames === \"2010\");\n\n var isEnumerable = false;\n\n for (var prop in Object) {\n if (prop === \"getOwnPropertyNames\") {\n isEnumerable = true;\n }\n }\n \n delete Object.getOwnPropertyNames;\n\n var isConfigurable = !Object.hasOwnProperty(\"getOwnPropertyNames\");\n\n return propertyAreCorrect && isWritable && !isEnumerable && isConfigurable;\n } finally {\n Object.defineProperty(Object, \"getOwnPropertyNames\", {\n value: temp,\n writable: true,\n enumerable: false,\n configurable: true\n });\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor) && fnExists(Object.getOwnPropertyNames))"
+ },
+ {
+ "id": "15.2.3.6-4-601",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-601.js",
+ "description": "ES5 Attributes - all attributes in Object.create are correct",
+ "test": "assertTrue((function testcase() {\n var desc = Object.getOwnPropertyDescriptor(Object, \"create\");\n\n var propertyAreCorrect = (desc.writable === true && desc.enumerable === false && desc.configurable === true);\n\n var temp = Object.create;\n\n try {\n Object.create = \"2010\";\n\n var isWritable = (Object.create === \"2010\");\n\n var isEnumerable = false;\n\n for (var prop in Object) {\n if (prop === \"create\") {\n isEnumerable = true;\n }\n }\n \n delete Object.create;\n\n var isConfigurable = !Object.hasOwnProperty(\"create\");\n\n return propertyAreCorrect && isWritable && !isEnumerable && isConfigurable;\n } finally {\n Object.defineProperty(Object, \"create\", {\n value: temp,\n writable: true,\n enumerable: false,\n configurable: true\n });\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor) && fnExists(Object.create))"
+ },
+ {
+ "id": "15.2.3.6-4-602",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-602.js",
+ "description": "ES5 Attributes - all attributes in Object.defineProperty are correct",
+ "test": "assertTrue((function testcase() {\n var desc = Object.getOwnPropertyDescriptor(Object, \"defineProperty\");\n\n var propertyAreCorrect = (desc.writable === true && desc.enumerable === false && desc.configurable === true);\n var temp = Object.defineProperty;\n try {\n Object.defineProperty = \"2010\";\n\n var isWritable = (Object.defineProperty === \"2010\");\n\n var isEnumerable = false;\n\n for (var prop in Object) {\n if (prop === \"defineProperty\") {\n isEnumerable = true;\n }\n }\n\n delete Object.defineProperty;\n\n var isConfigurable = !Object.hasOwnProperty(\"defineProperty\");\n\n return propertyAreCorrect && isWritable && !isEnumerable && isConfigurable;\n } finally {\n Object.defineProperty = temp;\n Object.defineProperty(Object, \"defineProperty\", {\n enumerable: false\n });\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-603",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-603.js",
+ "description": "ES5 Attributes - all attributes in Object.defineProperties are correct",
+ "test": "assertTrue((function testcase() {\n var desc = Object.getOwnPropertyDescriptor(Object, \"defineProperties\");\n\n var propertyAreCorrect = (desc.writable === true && desc.enumerable === false && desc.configurable === true);\n\n var temp = Object.defineProperties;\n\n try {\n Object.defineProperties = \"2010\";\n\n var isWritable = (Object.defineProperties === \"2010\");\n\n var isEnumerable = false;\n\n for (var prop in Object) {\n if (prop === \"defineProperties\") {\n isEnumerable = true;\n }\n }\n \n delete Object.defineProperties;\n\n var isConfigurable = !Object.hasOwnProperty(\"defineProperties\");\n\n return propertyAreCorrect && isWritable && !isEnumerable && isConfigurable;\n } finally {\n Object.defineProperty(Object, \"defineProperties\", {\n value: temp,\n writable: true,\n enumerable: false,\n configurable: true\n });\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor) && fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.6-4-604",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-604.js",
+ "description": "ES5 Attributes - all attributes in Object.seal are correct",
+ "test": "assertTrue((function testcase() {\n var desc = Object.getOwnPropertyDescriptor(Object, \"seal\");\n\n var propertyAreCorrect = (desc.writable === true && desc.enumerable === false && desc.configurable === true);\n\n var temp = Object.seal;\n\n try {\n Object.seal = \"2010\";\n\n var isWritable = (Object.seal === \"2010\");\n\n var isEnumerable = false;\n\n for (var prop in Object) {\n if (prop === \"seal\") {\n isEnumerable = true;\n }\n }\n \n delete Object.seal;\n\n var isConfigurable = !Object.hasOwnProperty(\"seal\");\n\n return propertyAreCorrect && isWritable && !isEnumerable && isConfigurable;\n } finally {\n Object.defineProperty(Object, \"seal\", {\n value: temp,\n writable: true,\n enumerable: false,\n configurable: true\n });\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor) && fnExists(Object.seal))"
+ },
+ {
+ "id": "15.2.3.6-4-605",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-605.js",
+ "description": "ES5 Attributes - all attributes in Object.freeze are correct",
+ "test": "assertTrue((function testcase() {\n var desc = Object.getOwnPropertyDescriptor(Object, \"freeze\");\n\n var propertyAreCorrect = (desc.writable === true && desc.enumerable === false && desc.configurable === true);\n\n var temp = Object.freeze;\n\n try {\n Object.freeze = \"2010\";\n\n var isWritable = (Object.freeze === \"2010\");\n\n var isEnumerable = false;\n\n for (var prop in Object) {\n if (prop === \"freeze\") {\n isEnumerable = true;\n }\n }\n \n delete Object.freeze;\n\n var isConfigurable = !Object.hasOwnProperty(\"freeze\");\n\n return propertyAreCorrect && isWritable && !isEnumerable && isConfigurable;\n } finally {\n Object.defineProperty(Object, \"freeze\", {\n value: temp,\n writable: true,\n enumerable: false,\n configurable: true\n });\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor) && fnExists(Object.freeze))"
+ },
+ {
+ "id": "15.2.3.6-4-606",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-606.js",
+ "description": "ES5 Attributes - all attributes in Object.preventExtensions are correct",
+ "test": "assertTrue((function testcase() {\n var desc = Object.getOwnPropertyDescriptor(Object, \"preventExtensions\");\n\n var propertyAreCorrect = (desc.writable === true && desc.enumerable === false && desc.configurable === true);\n\n var temp = Object.preventExtensions;\n\n try {\n Object.preventExtensions = \"2010\";\n\n var isWritable = (Object.preventExtensions === \"2010\");\n\n var isEnumerable = false;\n\n for (var prop in Object) {\n if (prop === \"preventExtensions\") {\n isEnumerable = true;\n }\n }\n \n delete Object.preventExtensions;\n\n var isConfigurable = !Object.hasOwnProperty(\"preventExtensions\");\n\n return propertyAreCorrect && isWritable && !isEnumerable && isConfigurable;\n } finally {\n Object.defineProperty(Object, \"preventExtensions\", {\n value: temp,\n writable: true,\n enumerable: false,\n configurable: true\n });\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor) && fnExists(Object.preventExtensions))"
+ },
+ {
+ "id": "15.2.3.6-4-607",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-607.js",
+ "description": "ES5 Attributes - all attributes in Object.isSealed are correct",
+ "test": "assertTrue((function testcase() {\n var desc = Object.getOwnPropertyDescriptor(Object, \"isSealed\");\n\n var propertyAreCorrect = (desc.writable === true && desc.enumerable === false && desc.configurable === true);\n\n var temp = Object.isSealed;\n\n try {\n Object.isSealed = \"2010\";\n\n var isWritable = (Object.isSealed === \"2010\");\n\n var isEnumerable = false;\n\n for (var prop in Object) {\n if (prop === \"isSealed\") {\n isEnumerable = true;\n }\n }\n \n delete Object.isSealed;\n\n var isConfigurable = !Object.hasOwnProperty(\"isSealed\");\n\n return propertyAreCorrect && isWritable && !isEnumerable && isConfigurable;\n } finally {\n Object.defineProperty(Object, \"isSealed\", {\n value: temp,\n writable: true,\n enumerable: false,\n configurable: true\n });\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor) && fnExists(Object.isSealed))"
+ },
+ {
+ "id": "15.2.3.6-4-608",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-608.js",
+ "description": "ES5 Attributes - all attributes in Object.isFrozen are correct",
+ "test": "assertTrue((function testcase() {\n var desc = Object.getOwnPropertyDescriptor(Object, \"isFrozen\");\n\n var propertyAreCorrect = (desc.writable === true && desc.enumerable === false && desc.configurable === true);\n\n var temp = Object.isFrozen;\n\n try {\n Object.isFrozen = \"2010\";\n\n var isWritable = (Object.isFrozen === \"2010\");\n\n var isEnumerable = false;\n\n for (var prop in Object) {\n if (prop === \"isFrozen\") {\n isEnumerable = true;\n }\n }\n \n delete Object.isFrozen;\n\n var isConfigurable = !Object.hasOwnProperty(\"isFrozen\");\n\n return propertyAreCorrect && isWritable && !isEnumerable && isConfigurable;\n } finally {\n Object.defineProperty(Object, \"isFrozen\", {\n value: temp,\n writable: true,\n enumerable: false,\n configurable: true\n });\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor) && fnExists(Object.isFrozen))"
+ },
+ {
+ "id": "15.2.3.6-4-609",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-609.js",
+ "description": "ES5 Attributes - all attributes in Object.isExtensible are correct",
+ "test": "assertTrue((function testcase() {\n var desc = Object.getOwnPropertyDescriptor(Object, \"isExtensible\");\n\n var propertyAreCorrect = (desc.writable === true && desc.enumerable === false && desc.configurable === true);\n\n var temp = Object.isExtensible;\n\n try {\n Object.isExtensible = \"2010\";\n\n var isWritable = (Object.isExtensible === \"2010\");\n\n var isEnumerable = false;\n\n for (var prop in Object) {\n if (prop === \"isExtensible\") {\n isEnumerable = true;\n }\n }\n \n delete Object.isExtensible;\n\n var isConfigurable = !Object.hasOwnProperty(\"isExtensible\");\n\n return propertyAreCorrect && isWritable && !isEnumerable && isConfigurable;\n } finally {\n Object.defineProperty(Object, \"isExtensible\", {\n value: temp,\n writable: true,\n enumerable: false,\n configurable: true\n });\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor) && fnExists(Object.isExtensible))"
+ },
+ {
+ "id": "15.2.3.6-4-61",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-61.js",
+ "description": "Object.defineProperty - both desc.value and name.value are undefined (8.12.9 step 6)",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n\n Object.defineProperty(obj, \"foo\", { value: undefined });\n\n Object.defineProperty(obj, \"foo\", { value: undefined });\n return dataPropertyAttributesAreCorrect(obj, \"foo\", undefined, false, false, false);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-610",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-610.js",
+ "description": "ES5 Attributes - all attributes in Object.keys are correct",
+ "test": "assertTrue((function testcase() {\n var desc = Object.getOwnPropertyDescriptor(Object, \"keys\");\n\n var propertyAreCorrect = (desc.writable === true && desc.enumerable === false && desc.configurable === true);\n\n var temp = Object.keys;\n\n try {\n Object.keys = \"2010\";\n\n var isWritable = (Object.keys === \"2010\");\n\n var isEnumerable = false;\n\n for (var prop in Object) {\n if (prop === \"keys\") {\n isEnumerable = true;\n }\n }\n \n delete Object.keys;\n\n var isConfigurable = !Object.hasOwnProperty(\"keys\");\n\n return propertyAreCorrect && isWritable && !isEnumerable && isConfigurable;\n } finally {\n Object.defineProperty(Object, \"keys\", {\n value: temp,\n writable: true,\n enumerable: false,\n configurable: true\n });\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor) && fnExists(Object.keys))"
+ },
+ {
+ "id": "15.2.3.6-4-611",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-611.js",
+ "description": "ES5 Attributes - all attributes in Function.prototype.bind are correct",
+ "test": "assertTrue((function testcase() {\n var desc = Object.getOwnPropertyDescriptor(Function.prototype, \"bind\");\n\n var propertyAreCorrect = (desc.writable === true && desc.enumerable === false && desc.configurable === true);\n\n var temp = Function.prototype.bind;\n\n try {\n Function.prototype.bind = \"2010\";\n\n var isWritable = (Function.prototype.bind === \"2010\");\n\n var isEnumerable = false;\n\n for (var prop in Function.prototype) {\n if (prop === \"bind\") {\n isEnumerable = true;\n }\n }\n \n delete Function.prototype.bind;\n\n var isConfigurable = !Function.prototype.hasOwnProperty(\"bind\");\n\n return propertyAreCorrect && isWritable && !isEnumerable && isConfigurable;\n } finally {\n Object.defineProperty(Function.prototype, \"bind\", {\n value: temp,\n writable: true,\n enumerable: false,\n configurable: true\n });\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor) && fnExists(Function.prototype.bind))"
+ },
+ {
+ "id": "15.2.3.6-4-612",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-612.js",
+ "description": "ES5 Attributes - all attributes in Array.prototype.indexOf are correct",
+ "test": "assertTrue((function testcase() {\n var desc = Object.getOwnPropertyDescriptor(Array.prototype, \"indexOf\");\n\n var propertyAreCorrect = (desc.writable === true && desc.enumerable === false && desc.configurable === true);\n\n var temp = Array.prototype.indexOf;\n\n try {\n Array.prototype.indexOf = \"2010\";\n\n var isWritable = (Array.prototype.indexOf === \"2010\");\n\n var isEnumerable = false;\n\n for (var prop in Array.prototype) {\n if (prop === \"indexOf\") {\n isEnumerable = true;\n }\n }\n\n delete Array.prototype.indexOf;\n\n var isConfigurable = !Array.prototype.hasOwnProperty(\"indexOf\");\n\n return propertyAreCorrect && isWritable && !isEnumerable && isConfigurable;\n } finally {\n Object.defineProperty(Array.prototype, \"indexOf\", {\n value: temp,\n writable: true,\n enumerable: false,\n configurable: true\n });\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor) && fnExists(Array.prototype.indexOf))"
+ },
+ {
+ "id": "15.2.3.6-4-613",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-613.js",
+ "description": "ES5 Attributes - all attributes in Object.lastIndexOf are correct",
+ "test": "assertTrue((function testcase() {\n var desc = Object.getOwnPropertyDescriptor(Array.prototype, \"lastIndexOf\");\n\n var propertyAreCorrect = (desc.writable === true && desc.enumerable === false && desc.configurable === true);\n\n var temp = Array.prototype.lastIndexOf;\n\n try {\n Array.prototype.lastIndexOf = \"2010\";\n\n var isWritable = (Array.prototype.lastIndexOf === \"2010\");\n\n var isEnumerable = false;\n\n for (var prop in Array.prototype) {\n if (prop === \"lastIndexOf\") {\n isEnumerable = true;\n }\n }\n\n delete Array.prototype.lastIndexOf;\n\n var isConfigurable = !Array.prototype.hasOwnProperty(\"lastIndexOf\");\n\n return propertyAreCorrect && isWritable && !isEnumerable && isConfigurable;\n } finally {\n Object.defineProperty(Array.prototype, \"lastIndexOf\", {\n value: temp,\n writable: true,\n enumerable: false,\n configurable: true\n });\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor) && fnExists(Array.prototype.lastIndexOf))"
+ },
+ {
+ "id": "15.2.3.6-4-614",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-614.js",
+ "description": "ES5 Attributes - all attributes in Array.prototype.every are correct",
+ "test": "assertTrue((function testcase() {\n var desc = Object.getOwnPropertyDescriptor(Array.prototype, \"every\");\n\n var propertyAreCorrect = (desc.writable === true && desc.enumerable === false && desc.configurable === true);\n\n var temp = Array.prototype.every;\n\n try {\n Array.prototype.every = \"2010\";\n\n var isWritable = (Array.prototype.every === \"2010\");\n\n var isEnumerable = false;\n\n for (var prop in Array.prototype) {\n if (prop === \"every\") {\n isEnumerable = true;\n }\n }\n\n delete Array.prototype.every;\n\n var isConfigurable = !Array.prototype.hasOwnProperty(\"every\");\n\n return propertyAreCorrect && isWritable && !isEnumerable && isConfigurable;\n } finally {\n Object.defineProperty(Array.prototype, \"every\", {\n value: temp,\n writable: true,\n enumerable: false,\n configurable: true\n });\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor) && fnExists(Array.prototype.every))"
+ },
+ {
+ "id": "15.2.3.6-4-615",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-615.js",
+ "description": "ES5 Attributes - all attributes in Array.prototype.some are correct",
+ "test": "assertTrue((function testcase() {\n var desc = Object.getOwnPropertyDescriptor(Array.prototype, \"some\");\n\n var propertyAreCorrect = (desc.writable === true && desc.enumerable === false && desc.configurable === true);\n\n var temp = Array.prototype.some;\n\n try {\n Array.prototype.some = \"2010\";\n\n var isWritable = (Array.prototype.some === \"2010\");\n\n var isEnumerable = false;\n\n for (var prop in Array.prototype) {\n if (prop === \"some\") {\n isEnumerable = true;\n }\n }\n\n delete Array.prototype.some;\n\n var isConfigurable = !Array.prototype.hasOwnProperty(\"some\");\n\n return propertyAreCorrect && isWritable && !isEnumerable && isConfigurable;\n } finally {\n Object.defineProperty(Array.prototype, \"some\", {\n value: temp,\n writable: true,\n enumerable: false,\n configurable: true\n });\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor) && fnExists(Array.prototype.some))"
+ },
+ {
+ "id": "15.2.3.6-4-616",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-616.js",
+ "description": "ES5 Attributes - all attributes in Array.prototype.forEach are correct",
+ "test": "assertTrue((function testcase() {\n var desc = Object.getOwnPropertyDescriptor(Array.prototype, \"forEach\");\n\n var propertyAreCorrect = (desc.writable === true && desc.enumerable === false && desc.configurable === true);\n\n var temp = Array.prototype.forEach;\n\n try {\n Array.prototype.forEach = \"2010\";\n\n var isWritable = (Array.prototype.forEach === \"2010\");\n\n var isEnumerable = false;\n\n for (var prop in Array.prototype) {\n if (prop === \"forEach\") {\n isEnumerable = true;\n }\n }\n\n delete Array.prototype.forEach;\n\n var isConfigurable = !Array.prototype.hasOwnProperty(\"forEach\");\n\n return propertyAreCorrect && isWritable && !isEnumerable && isConfigurable;\n } finally {\n Object.defineProperty(Array.prototype, \"forEach\", {\n value: temp,\n writable: true,\n enumerable: false,\n configurable: true\n });\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor) && fnExists(Array.prototype.forEach))"
+ },
+ {
+ "id": "15.2.3.6-4-617",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-617.js",
+ "description": "ES5 Attributes - all attributes in Array.prototype.map are correct",
+ "test": "assertTrue((function testcase() {\n var desc = Object.getOwnPropertyDescriptor(Array.prototype, \"map\");\n\n var propertyAreCorrect = (desc.writable === true && desc.enumerable === false && desc.configurable === true);\n\n var temp = Array.prototype.map;\n\n try {\n Array.prototype.map = \"2010\";\n\n var isWritable = (Array.prototype.map === \"2010\");\n\n var isEnumerable = false;\n\n for (var prop in Array.prototype) {\n if (prop === \"map\") {\n isEnumerable = true;\n }\n }\n\n delete Array.prototype.map;\n\n var isConfigurable = !Array.prototype.hasOwnProperty(\"map\");\n\n return propertyAreCorrect && isWritable && !isEnumerable && isConfigurable;\n } finally {\n Object.defineProperty(Array.prototype, \"map\", {\n value: temp,\n writable: true,\n enumerable: false,\n configurable: true\n });\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor) && fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.2.3.6-4-618",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-618.js",
+ "description": "ES5 Attributes - all attributes in Array.prototype.filter are correct",
+ "test": "assertTrue((function testcase() {\n var desc = Object.getOwnPropertyDescriptor(Array.prototype, \"filter\");\n\n var propertyAreCorrect = (desc.writable === true && desc.enumerable === false && desc.configurable === true);\n\n var temp = Array.prototype.filter;\n\n try {\n Array.prototype.filter = \"2010\";\n\n var isWritable = (Array.prototype.filter === \"2010\");\n\n var isEnumerable = false;\n\n for (var prop in Array.prototype) {\n if (prop === \"filter\") {\n isEnumerable = true;\n }\n }\n\n delete Array.prototype.filter;\n\n var isConfigurable = !Array.prototype.hasOwnProperty(\"filter\");\n\n return propertyAreCorrect && isWritable && !isEnumerable && isConfigurable;\n } finally {\n Object.defineProperty(Array.prototype, \"filter\", {\n value: temp,\n writable: true,\n enumerable: false,\n configurable: true\n });\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor) && fnExists(Array.prototype.filter))"
+ },
+ {
+ "id": "15.2.3.6-4-619",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-619.js",
+ "description": "ES5 Attributes - all attributes in Array.prototype.reduce are correct",
+ "test": "assertTrue((function testcase() {\n var desc = Object.getOwnPropertyDescriptor(Array.prototype, \"reduce\");\n\n var propertyAreCorrect = (desc.writable === true && desc.enumerable === false && desc.configurable === true);\n\n var temp = Array.prototype.reduce;\n\n try {\n Array.prototype.reduce = \"2010\";\n\n var isWritable = (Array.prototype.reduce === \"2010\");\n\n var isEnumerable = false;\n\n for (var prop in Array.prototype) {\n if (prop === \"reduce\") {\n isEnumerable = true;\n }\n }\n\n delete Array.prototype.reduce;\n\n var isConfigurable = !Array.prototype.hasOwnProperty(\"reduce\");\n\n return propertyAreCorrect && isWritable && !isEnumerable && isConfigurable;\n } finally {\n Object.defineProperty(Array.prototype, \"reduce\", {\n value: temp,\n writable: true,\n enumerable: false,\n configurable: true\n });\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor) && fnExists(Array.prototype.reduce))"
+ },
+ {
+ "id": "15.2.3.6-4-62",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-62.js",
+ "description": "Object.defineProperty - both desc.value and name.value are null (8.12.9 step 6)",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n\n Object.defineProperty(obj, \"foo\", { value: null });\n\n Object.defineProperty(obj, \"foo\", { value: null });\n return dataPropertyAttributesAreCorrect(obj, \"foo\", null, false, false, false);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-620",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-620.js",
+ "description": "ES5 Attributes - all attributes in Array.prototype.reduceRight are correct",
+ "test": "assertTrue((function testcase() {\n var desc = Object.getOwnPropertyDescriptor(Array.prototype, \"reduceRight\");\n\n var propertyAreCorrect = (desc.writable === true && desc.enumerable === false && desc.configurable === true);\n\n var temp = Array.prototype.reduceRight;\n\n try {\n Array.prototype.reduceRight = \"2010\";\n\n var isWritable = (Array.prototype.reduceRight === \"2010\");\n\n var isEnumerable = false;\n\n for (var prop in Array.prototype) {\n if (prop === \"reduceRight\") {\n isEnumerable = true;\n }\n }\n\n delete Array.prototype.reduceRight;\n\n var isConfigurable = !Array.prototype.hasOwnProperty(\"reduceRight\");\n\n return propertyAreCorrect && isWritable && !isEnumerable && isConfigurable;\n } finally {\n Object.defineProperty(Array.prototype, \"reduceRight\", {\n value: temp,\n writable: true,\n enumerable: false,\n configurable: true\n });\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor) && fnExists(Array.prototype.reduceRight))"
+ },
+ {
+ "id": "15.2.3.6-4-621",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-621.js",
+ "description": "ES5 Attributes - all attributes in String.prototype.trim are correct",
+ "test": "assertTrue((function testcase() {\n var desc = Object.getOwnPropertyDescriptor(String.prototype, \"trim\");\n\n var propertyAreCorrect = (desc.writable === true && desc.enumerable === false && desc.configurable === true);\n\n var temp = String.prototype.trim;\n\n try {\n String.prototype.trim = \"2010\";\n\n var isWritable = (String.prototype.trim === \"2010\");\n\n var isEnumerable = false;\n\n for (var prop in String.prototype) {\n if (prop === \"trim\") {\n isEnumerable = true;\n }\n }\n\n delete String.prototype.trim;\n\n var isConfigurable = !String.prototype.hasOwnProperty(\"trim\");\n\n return propertyAreCorrect && isWritable && !isEnumerable && isConfigurable;\n } finally {\n Object.defineProperty(String.prototype, \"trim\", {\n value: temp,\n writable: true,\n enumerable: false,\n configurable: true\n });\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor) && fnExists(String.prototype.trim))"
+ },
+ {
+ "id": "15.2.3.6-4-622",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-622.js",
+ "description": "ES5 Attributes - all attributes in Date.now are correct",
+ "test": "assertTrue((function testcase() {\n var desc = Object.getOwnPropertyDescriptor(Date, \"now\");\n\n var propertyAreCorrect = (desc.writable === true && desc.enumerable === false && desc.configurable === true);\n\n var temp = Date.now;\n\n try {\n Date.now = \"2010\";\n\n var isWritable = (Date.now === \"2010\");\n\n var isEnumerable = false;\n\n for (var prop in Date) {\n if (prop === \"now\") {\n isEnumerable = true;\n }\n }\n\n delete Date.now;\n\n var isConfigurable = !Date.hasOwnProperty(\"now\");\n\n return propertyAreCorrect && isWritable && !isEnumerable && isConfigurable;\n } finally {\n Object.defineProperty(Date, \"now\", {\n value: temp,\n writable: true,\n enumerable: false,\n configurable: true\n });\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor) && fnExists(Date.now))"
+ },
+ {
+ "id": "15.2.3.6-4-623",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-623.js",
+ "description": "ES5 Attributes - all attributes in Date.prototype.toISOString are correct",
+ "test": "assertTrue((function testcase() {\n var desc = Object.getOwnPropertyDescriptor(Date.prototype, \"toISOString\");\n\n var propertyAreCorrect = (desc.writable === true && desc.enumerable === false && desc.configurable === true);\n\n var temp = Date.prototype.toISOString;\n\n try {\n Date.prototype.toISOString = \"2010\";\n\n var isWritable = (Date.prototype.toISOString === \"2010\");\n\n var isEnumerable = false;\n\n for (var prop in Date.prototype) {\n if (prop === \"toISOString\") {\n isEnumerable = true;\n }\n }\n\n delete Date.prototype.toISOString;\n\n var isConfigurable = !Date.prototype.hasOwnProperty(\"toISOString\");\n\n return propertyAreCorrect && isWritable && !isEnumerable && isConfigurable;\n } finally {\n Object.defineProperty(Date.prototype, \"toISOString\", {\n value: temp,\n writable: true,\n enumerable: false,\n configurable: true\n });\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor) && fnExists(Date.prototype.toISOString))"
+ },
+ {
+ "id": "15.2.3.6-4-624",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-624.js",
+ "description": "ES5 Attributes - all attributes in Date.prototype.toJSON are correct",
+ "test": "assertTrue((function testcase() {\n var desc = Object.getOwnPropertyDescriptor(Date.prototype, \"toJSON\");\n\n var propertyAreCorrect = (desc.writable === true && desc.enumerable === false && desc.configurable === true);\n\n var temp = Date.prototype.toJSON;\n\n try {\n Date.prototype.toJSON = \"2010\";\n\n var isWritable = (Date.prototype.toJSON === \"2010\");\n\n var isEnumerable = false;\n\n for (var prop in Date.prototype) {\n if (prop === \"toJSON\") {\n isEnumerable = true;\n }\n }\n\n delete Date.prototype.toJSON;\n\n var isConfigurable = !Date.prototype.hasOwnProperty(\"toJSON\");\n\n return propertyAreCorrect && isWritable && !isEnumerable && isConfigurable;\n } finally {\n Object.defineProperty(Date.prototype, \"toJSON\", {\n value: temp,\n writable: true,\n enumerable: false,\n configurable: true\n });\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor) && fnExists(Date.prototype.toJSON))"
+ },
+ {
+ "id": "15.2.3.6-4-63",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-63.js",
+ "description": "Object.defineProperty - both desc.value and name.value are NaN (8.12.9 step 6)",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n\n Object.defineProperty(obj, \"foo\", { value: NaN });\n\n Object.defineProperty(obj, \"foo\", { value: NaN });\n\n if (!isNaN(obj.foo)) {\n return false;\n }\n\n obj.foo = \"verifyValue\";\n if (obj.foo === \"verifyValue\") {\n return false;\n }\n\n for (var prop in obj) {\n if (obj.hasOwnProperty(prop) && prop === \"foo\") {\n return false;\n }\n }\n\n delete obj.foo;\n if (!obj.hasOwnProperty(\"foo\")) {\n return false;\n }\n\n return true;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-64",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-64.js",
+ "description": "Object.defineProperty - desc.value = +0 and name.value = -0 (8.12.9 step 6)",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n\n Object.defineProperty(obj, \"foo\", { value: -0 });\n\n try {\n Object.defineProperty(obj, \"foo\", { value: +0 });\n return false;\n } catch (e) {\n return e instanceof TypeError && dataPropertyAttributesAreCorrect(obj, \"foo\", -0, false, false, false);\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-65",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-65.js",
+ "description": "Object.defineProperty - desc.value = -0 and name.value = +0 (8.12.9 step 6)",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n\n Object.defineProperty(obj, \"foo\", { value: +0 });\n\n try {\n Object.defineProperty(obj, \"foo\", { value: -0 });\n return false;\n } catch (e) {\n return e instanceof TypeError && dataPropertyAttributesAreCorrect(obj, \"foo\", +0, false, false, false);\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-66",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-66.js",
+ "description": "Object.defineProperty - desc.value and name.value are two numbers with different values (8.12.9 step 6)",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n\n obj.foo = 101; // default value of attributes: writable: true, configurable: true, enumerable: true\n\n Object.defineProperty(obj, \"foo\", { value: 102 });\n return dataPropertyAttributesAreCorrect(obj, \"foo\", 102, true, true, true);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-67",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-67.js",
+ "description": "Object.defineProperty - both desc.value and name.value are two strings which have same length and same characters in corresponding positions (8.12.9 step 6)",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n\n Object.defineProperty(obj, \"foo\", { value: \"abcd\" });\n\n Object.defineProperty(obj, \"foo\", { value: \"abcd\" });\n return dataPropertyAttributesAreCorrect(obj, \"foo\", \"abcd\", false, false, false);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-68",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-68.js",
+ "description": "Object.defineProperty - desc.value and name.value are two strings with different values (8.12.9 step 6)",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n\n obj.foo = \"abcd\"; // default value of attributes: writable: true, configurable: true, enumerable: true\n\n Object.defineProperty(obj, \"foo\", { value: \"fghj\" });\n return dataPropertyAttributesAreCorrect(obj, \"foo\", \"fghj\", true, true, true);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-69",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-69.js",
+ "description": "Object.defineProperty - both desc.value and name.value are boolean values with the same value (8.12.9 step 6)",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n\n Object.defineProperty(obj, \"foo\", { value: true });\n\n Object.defineProperty(obj, \"foo\", { value: true });\n return dataPropertyAttributesAreCorrect(obj, \"foo\", true, false, false, false);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-7",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-7.js",
+ "description": "Object.defineProperty throws TypeError when changing [[Configurable]] from false to true",
+ "test": "assertTrue((function testcase() {\n var o = {};\n\n // create a data valued property; all other attributes default to false.\n var d1 = { value: 101, configurable: false };\n Object.defineProperty(o, \"foo\", d1);\n\n var desc = { value: 101, configurable: true };\n\n try {\n Object.defineProperty(o, \"foo\", desc);\n }\n catch (e) {\n if (e instanceof TypeError) {\n // the property should remain unchanged.\n var d2 = Object.getOwnPropertyDescriptor(o, \"foo\");\n if (d2.value === 101 &&\n d2.configurable === false) {\n return true;\n }\n }\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-70",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-70.js",
+ "description": "Object.defineProperty - desc.value and name.value are two boolean values with different values (8.12.9 step 6)",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n\n obj.foo = true; // default value of attributes: writable: true, configurable: true, enumerable: true\n\n Object.defineProperty(obj, \"foo\", { value: false });\n return dataPropertyAttributesAreCorrect(obj, \"foo\", false, true, true, true);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-71",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-71.js",
+ "description": "Object.defineProperty - both desc.value and name.value are Ojbects which refer to the same Object (8.12.9 step 6)",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n\n var obj1 = { length: 10 };\n\n Object.defineProperty(obj, \"foo\", { value: obj1 });\n\n Object.defineProperty(obj, \"foo\", { value: obj1 });\n return dataPropertyAttributesAreCorrect(obj, \"foo\", obj1, false, false, false);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-72",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-72.js",
+ "description": "Object.defineProperty - desc.value and name.value are two Ojbects which refer to the different objects (8.12.9 step 6)",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n\n var obj1 = { length: 10 };\n obj.foo = obj1; // default value of attributes: writable: true, configurable: true, enumerable: true\n\n var obj2 = { length: 20 };\n\n Object.defineProperty(obj, \"foo\", { value: obj2 });\n return dataPropertyAttributesAreCorrect(obj, \"foo\", obj2, true, true, true);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-73",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-73.js",
+ "description": "Object.defineProperty - both desc.writable and name.writable are boolean values with the same value (8.12.9 step 6)",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n\n Object.defineProperty(obj, \"foo\", { writable: false});\n\n Object.defineProperty(obj, \"foo\", { writable: false });\n return dataPropertyAttributesAreCorrect(obj, \"foo\", undefined, false, false, false);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-74",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-74.js",
+ "description": "Object.defineProperty - desc.writable and name.writable are two boolean values with different values (8.12.9 step 6)",
+ "test": "assertTrue((function testcase() {\n \n var obj = {};\n\n Object.defineProperty(obj, \"foo\", { writable: false, configurable: true });\n\n Object.defineProperty(obj, \"foo\", { writable: true });\n return dataPropertyAttributesAreCorrect(obj, \"foo\", undefined, true, false, true);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-75",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-75.js",
+ "description": "Object.defineProperty - both desc.[[Get]] and name.[[Get]] are two objects which refer to the same object (8.12.9 step 6)",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n\n function getFunc() {\n return 10;\n }\n function setFunc(value) {\n obj.helpVerifySet = value;\n }\n\n Object.defineProperty(obj, \"foo\", {\n get: getFunc,\n set: setFunc\n });\n\n Object.defineProperty(obj, \"foo\", { get: getFunc });\n return accessorPropertyAttributesAreCorrect(obj, \"foo\", getFunc, setFunc, \"helpVerifySet\", false, false);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-76",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-76.js",
+ "description": "Object.defineProperty - desc.[[Get]] and name.[[Get]] are two objects which refer to the different objects (8.12.9 step 6)",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n\n function getFunc1() {\n return 10;\n }\n function setFunc1(value) {\n obj.helpVerifySet = value;\n }\n\n Object.defineProperty(obj, \"foo\", {\n get: getFunc1,\n set: setFunc1,\n configurable: true\n });\n\n function getFunc2() {\n return 20;\n }\n\n Object.defineProperty(obj, \"foo\", { get: getFunc2 });\n return accessorPropertyAttributesAreCorrect(obj, \"foo\", getFunc2, setFunc1, \"helpVerifySet\", false, true);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-77",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-77.js",
+ "description": "Object.defineProperty - both desc.[[Set]] and name.[[Set]] are two objects which refer to the same object (8.12.9 step 6)",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n\n function setFunc(value) {\n obj.setVerifyHelpProp = value;\n }\n\n Object.defineProperty(obj, \"foo\", { set: setFunc });\n\n Object.defineProperty(obj, \"foo\", { set: setFunc });\n return accessorPropertyAttributesAreCorrect(obj, \"foo\", undefined, setFunc, \"setVerifyHelpProp\", false, false);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-78",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-78.js",
+ "description": "Object.defineProperty - desc.[[Set]] and name.[[Set]] are two objects which refer to the different objects (8.12.9 step 6)",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n\n function setFunc1() { }\n\n Object.defineProperty(obj, \"foo\", {\n set: setFunc1,\n configurable: true\n });\n\n function setFunc2(value) {\n obj.setVerifyHelpProp = value;\n }\n\n Object.defineProperty(obj, \"foo\", { set: setFunc2 });\n return accessorPropertyAttributesAreCorrect(obj, \"foo\", undefined, setFunc2, \"setVerifyHelpProp\", false, true);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-79",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-79.js",
+ "description": "Object.defineProperty - both desc.enumerable and name.enumerable are boolean values with the same value (8.12.9 step 6)",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n\n Object.defineProperty(obj, \"foo\", { enumerable: false });\n\n Object.defineProperty(obj, \"foo\", { enumerable: false });\n return dataPropertyAttributesAreCorrect(obj, \"foo\", undefined, false, false, false);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-8",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-8.js",
+ "description": "Object.defineProperty throws TypeError when changing [[Enumerable]] from false to true on non-configurable data properties",
+ "test": "assertTrue((function testcase() {\n var o = {};\n\n // create a data valued property; all other attributes default to false.\n var d1 = { value: 101, enumerable: false, configurable: false };\n Object.defineProperty(o, \"foo\", d1);\n\n // now, setting enumerable to true should fail, since [[Configurable]]\n // on the original property will be false.\n var desc = { value: 101, enumerable: true };\n\n try {\n Object.defineProperty(o, \"foo\", desc);\n }\n catch (e) {\n if (e instanceof TypeError) {\n // the property should remain unchanged.\n var d2 = Object.getOwnPropertyDescriptor(o, \"foo\");\n if (d2.value === 101 &&\n d2.enumerable === false &&\n d2.configurable === false) {\n return true;\n }\n }\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-80",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-80.js",
+ "description": "Object.defineProperty - desc.enumerable and name.enumerable are boolean negation of each other (8.12.9 step 6)",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n\n Object.defineProperty(obj, \"foo\", { enumerable: false, configurable: true });\n\n Object.defineProperty(obj, \"foo\", { enumerable: true });\n return dataPropertyAttributesAreCorrect(obj, \"foo\", undefined, false, true, true);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-81",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-81.js",
+ "description": "Object.defineProperty - both desc.configurable and name.configurable are booleans with the same value (8.12.9 step 6)",
+ "test": "assertTrue((function testcase() {\n \n var obj = {};\n\n Object.defineProperty(obj, \"foo\", { configurable: false });\n\n Object.defineProperty(obj, \"foo\", { configurable: false });\n return dataPropertyAttributesAreCorrect(obj, \"foo\", undefined, false, false, false);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-82-1",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-1.js",
+ "description": "Object.defineProperty - Update [[Enumerable]] attribute of 'name' property to false successfully when [[Enumerable]] and [[Configurable]] attributes of 'name' property are true, the 'desc' is a generic descriptor which only contains [[Enumerable]] attribute as false, 'name' property is a data property (8.12.9 step 8)",
+ "test": "assertTrue((function testcase() {\n \n var obj = {};\n\n Object.defineProperty(obj, \"foo\", {\n value: 1001,\n writable: true,\n enumerable: true,\n configurable: true\n });\n\n Object.defineProperty(obj, \"foo\", {\n enumerable: false\n });\n \n return dataPropertyAttributesAreCorrect(obj, \"foo\", 1001, true, false, true);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-82-10",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-10.js",
+ "description": "Object.defineProperty - Update [[Configurable]] attribute of 'name' property to false successfully when [[Enumerable]] and [[Configurable]] attributes of 'name' property are true, the 'desc' is a generic descriptor which contains [[Enumerable]] attribute as true and [[Configurable]] attribute is false, 'name' property is an accessor property (8.12.9 step 8)",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n obj.verifySetFunction = \"data\";\n var get_func = function () {\n return obj.verifySetFunction;\n };\n var set_func = function (value) {\n obj.verifySetFunction = value;\n };\n Object.defineProperty(obj, \"foo\", {\n get: get_func,\n set: set_func,\n enumerable: true,\n configurable: true\n });\n\n Object.defineProperty(obj, \"foo\", {\n enumerable: true,\n configurable: false\n });\n\n return accessorPropertyAttributesAreCorrect(obj, \"foo\", get_func, set_func, \"verifySetFunction\", true, false);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-82-11",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-11.js",
+ "description": "Object.defineProperty - Update [[Enumerable]] and [[Configurable]] attributes of 'name' property to false successfully when [[Enumerable]] and [[Configurable]] attributes of 'name' property are true, the 'desc' is a generic descriptor which contains [[Enumerable]] and [[Configurable]] attributes as false, 'name' property is an accessor property (8.12.9 step 8)",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n obj.verifySetFunction = \"data\";\n var get_func = function () {\n return obj.verifySetFunction;\n };\n var set_func = function (value) {\n obj.verifySetFunction = value;\n };\n Object.defineProperty(obj, \"foo\", {\n get: get_func,\n set: set_func,\n enumerable: true,\n configurable: true\n });\n\n Object.defineProperty(obj, \"foo\", {\n enumerable: false,\n configurable: false\n });\n\n return accessorPropertyAttributesAreCorrect(obj, \"foo\", get_func, set_func, \"verifySetFunction\", false, false);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-82-12",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-12.js",
+ "description": "Object.defineProperty - Update [[Enumerable]] attributes of 'name' property to true successfully when [[Enumerable]] attribute of 'name' is false and [[Configurable]] attribute of 'name' is true, the 'desc' is a generic descriptor which only contains [[Enumerable]] attribute as true, 'name' property is an accessor property (8.12.9 step 8)",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n obj.verifySetFunction = \"data\";\n var get_func = function () {\n return obj.verifySetFunction;\n };\n var set_func = function (value) {\n obj.verifySetFunction = value;\n };\n Object.defineProperty(obj, \"foo\", {\n get: get_func,\n set: set_func,\n enumerable: false,\n configurable: true\n });\n\n Object.defineProperty(obj, \"foo\", {\n enumerable: true\n });\n\n return accessorPropertyAttributesAreCorrect(obj, \"foo\", get_func, set_func, \"verifySetFunction\", true, true);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-82-13",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-13.js",
+ "description": "Object.defineProperty - Update [[Enumerable]] attribute of 'name' property to false successfully when [[Enumerable]] and [[Configurable]] attributes of 'name' property are true, the 'desc' is a generic descriptor which only contains [[Enumerable]] attribute as false, 'name' property is an index data property (8.12.9 step 8)",
+ "test": "assertTrue((function testcase() {\n \n var obj = {};\n\n Object.defineProperty(obj, \"0\", {\n value: 1001,\n writable: true,\n enumerable: true,\n configurable: true\n });\n\n Object.defineProperty(obj, \"0\", {\n enumerable: false\n });\n \n return dataPropertyAttributesAreCorrect(obj, \"0\", 1001, true, false, true);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-82-14",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-14.js",
+ "description": "Object.defineProperty - Update [[Enumerable]] attribute of 'name' property to false successfully when [[Enumerable]] and [[Configurable]] attributes of 'name' property are true, the 'desc' is a generic descriptor which contains [[Enumerable]] attribute as false and [[Configurable]] attribute as true, 'name' property is an index data property (8.12.9 step 8)",
+ "test": "assertTrue((function testcase() {\n \n var obj = {};\n\n Object.defineProperty(obj, \"0\", {\n value: 1001,\n writable: true,\n enumerable: true,\n configurable: true\n });\n\n Object.defineProperty(obj, \"0\", {\n enumerable: false,\n configurable: true\n });\n \n return dataPropertyAttributesAreCorrect(obj, \"0\", 1001, true, false, true);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-82-15",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-15.js",
+ "description": "Object.defineProperty - Update [[Configurable]] attribute of 'name' property to false successfully when [[Configurable]] attribute of 'name' property is true, the 'desc' is a generic descriptor which contains [[Configurable]] attribute as false, 'name' property is an index data property (8.12.9 step 8)",
+ "test": "assertTrue((function testcase() {\n \n var obj = {};\n\n Object.defineProperty(obj, \"0\", {\n value: 1001,\n writable: true,\n enumerable: true,\n configurable: true\n });\n\n Object.defineProperty(obj, \"0\", {\n configurable: false\n });\n\n return dataPropertyAttributesAreCorrect(obj, \"0\", 1001, true, true, false);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-82-16",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-16.js",
+ "description": "Object.defineProperty - Update [[Configurable]] attribute of 'name' property to false successfully when [[Enumerable]] and [[Configurable]] attributes of 'name' property are true, the 'desc' is a generic descriptor which contains [[Enumerable]] attribute as true and [[Configurable]] attribute as false, 'name' property is an index data property (8.12.9 step 8)",
+ "test": "assertTrue((function testcase() {\n \n var obj = {};\n\n Object.defineProperty(obj, \"0\", {\n value: 1001,\n writable: true,\n enumerable: true,\n configurable: true\n });\n\n Object.defineProperty(obj, \"0\", {\n enumerable: true, \n configurable: false\n });\n\n return dataPropertyAttributesAreCorrect(obj, \"0\", 1001, true, true, false);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-82-17",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-17.js",
+ "description": "Object.defineProperty - Update [[Enumerable]] and [[Configurable]] attributes of 'name' property to false successfully when [[Enumerable]] and [[Configurable]] attributes of 'name' property are true, the 'desc' is a generic descriptor which contains [[Enumerable]] and [[Configurable]] attributes as false, 'name' property is an index data property (8.12.9 step 8)",
+ "test": "assertTrue((function testcase() {\n \n var obj = {};\n\n Object.defineProperty(obj, \"0\", {\n value: 1001,\n writable: true,\n enumerable: true,\n configurable: true\n });\n\n Object.defineProperty(obj, \"0\", {\n enumerable: false,\n configurable: false\n });\n\n return dataPropertyAttributesAreCorrect(obj, \"0\", 1001, true, false, false);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-82-18",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-18.js",
+ "description": "Object.defineProperty - Update [[Enumerable]] attribute of 'name' property to true successfully when [[Enumerable]] attribute of 'name' is false and [[Configurable]] attribute of 'name' is true, the 'desc' is a generic descriptor which only contains [[Enumerable]] attribute as true, 'name' property is an index data property (8.12.9 step 8)",
+ "test": "assertTrue((function testcase() {\n \n var obj = {};\n\n Object.defineProperty(obj, \"0\", {\n value: 1001,\n writable: true,\n enumerable: false,\n configurable: true\n });\n\n Object.defineProperty(obj, \"0\", {\n enumerable: true\n });\n\n return dataPropertyAttributesAreCorrect(obj, \"0\", 1001, true, true, true);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-82-19",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-19.js",
+ "description": "Object.defineProperty - Update [[Enumerable]] attribute of 'name' property to false successfully when [[Enumerable]] and [[Configurable]] attributes of 'name' property are true, the 'desc' is a generic descriptor which only contains [Enumerable]] attribute as false and 'name' property is an index accessor property (8.12.9 step 8)",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n obj.verifySetFunction = \"data\";\n var get_func = function () {\n return obj.verifySetFunction;\n };\n var set_func = function (value) {\n obj.verifySetFunction = value;\n };\n Object.defineProperty(obj, \"0\", {\n get: get_func,\n set: set_func,\n enumerable: true,\n configurable: true\n });\n\n Object.defineProperty(obj, \"0\", {\n enumerable: false\n });\n\n return accessorPropertyAttributesAreCorrect(obj, \"0\", get_func, set_func, \"verifySetFunction\", false, true);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-82-2",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-2.js",
+ "description": "Object.defineProperty - Update [[Enumerable]] attribute of 'name' property to false successfully when [[Enumerable]] and [[Configurable]] attributes of 'name' property are true, the 'desc' is a generic descriptor which contains [[Enumerable]] attribute as false and [[Configurable]] attribute as true, 'name' property is a data property (8.12.9 step 8)",
+ "test": "assertTrue((function testcase() {\n \n var obj = {};\n\n Object.defineProperty(obj, \"foo\", {\n value: 1001,\n writable: true,\n enumerable: true,\n configurable: true\n });\n\n Object.defineProperty(obj, \"foo\", {\n enumerable: false,\n configurable: true\n });\n \n return dataPropertyAttributesAreCorrect(obj, \"foo\", 1001, true, false, true);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-82-20",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-20.js",
+ "description": "Object.defineProperty - Update [[Enumerable]] attribute of 'name' property to false successfully when [[Enumerable]] and [[Configurable]] attributes of 'name' property are true, the 'desc' is a generic descriptor which contains [Enumerable]] attribute as false and [[Configurable]] property is true, 'name' property is an index accessor property (8.12.9 step 8)",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n obj.verifySetFunction = \"data\";\n var get_func = function () {\n return obj.verifySetFunction;\n };\n var set_func = function (value) {\n obj.verifySetFunction = value;\n };\n Object.defineProperty(obj, \"0\", {\n get: get_func,\n set: set_func,\n enumerable: true,\n configurable: true\n });\n\n Object.defineProperty(obj, \"0\", {\n enumerable: false,\n configurable: true\n });\n\n return accessorPropertyAttributesAreCorrect(obj, \"0\", get_func, set_func, \"verifySetFunction\", false, true);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-82-21",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-21.js",
+ "description": "Object.defineProperty - Update [[Configurable]] attribute of 'name' property to false successfully when [[Enumerable]] and [[Configurable]] attributes of 'name' property are true, the 'desc' is a generic descriptor which only contains [[Configurable]] attribute as false, 'name' property is an index accessor property (8.12.9 step 8)",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n obj.verifySetFunction = \"data\";\n var get_func = function () {\n return obj.verifySetFunction;\n };\n var set_func = function (value) {\n obj.verifySetFunction = value;\n };\n Object.defineProperty(obj, \"0\", {\n get: get_func,\n set: set_func,\n enumerable: true,\n configurable: true\n });\n\n Object.defineProperty(obj, \"0\", {\n configurable: false\n });\n\n return accessorPropertyAttributesAreCorrect(obj, \"0\", get_func, set_func, \"verifySetFunction\", true, false);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-82-22",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-22.js",
+ "description": "Object.defineProperty - Update [[Configurable]] attribute of 'name' property to false successfully when [[Enumerable]] and [[Configurable]] attributes of 'name' property are true, the 'desc' is a generic descriptor which contains [[Enumerable]] attribute as true and [[Configurable]] attribute is false, 'name' property is an index accessor property (8.12.9 step 8)",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n obj.verifySetFunction = \"data\";\n var get_func = function () {\n return obj.verifySetFunction;\n };\n var set_func = function (value) {\n obj.verifySetFunction = value;\n };\n Object.defineProperty(obj, \"0\", {\n get: get_func,\n set: set_func,\n enumerable: true,\n configurable: true\n });\n\n Object.defineProperty(obj, \"0\", {\n enumerable: true,\n configurable: false\n });\n\n return accessorPropertyAttributesAreCorrect(obj, \"0\", get_func, set_func, \"verifySetFunction\", true, false);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-82-23",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-23.js",
+ "description": "Object.defineProperty - Update [[Enumerable]] and [[Configurable]] attributes of 'name' property to false successfully when [[Enumerable]] and [[Configurable]] attributes of 'name' property are true, the 'desc' is a generic descriptor which contains [[Enumerable]] and [[Configurable]] attributes as false, 'name' property is an index accessor property (8.12.9 step 8)",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n obj.verifySetFunction = \"data\";\n var get_func = function () {\n return obj.verifySetFunction;\n };\n var set_func = function (value) {\n obj.verifySetFunction = value;\n };\n Object.defineProperty(obj, \"0\", {\n get: get_func,\n set: set_func,\n enumerable: true,\n configurable: true\n });\n\n Object.defineProperty(obj, \"0\", {\n enumerable: false,\n configurable: false\n });\n\n return accessorPropertyAttributesAreCorrect(obj, \"0\", get_func, set_func, \"verifySetFunction\", false, false);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-82-24",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-24.js",
+ "description": "Object.defineProperty - Update [[Enumerable]] attributes of 'name' property to true successfully when [[Enumerable]] attribute of 'name' is false and [[Configurable]] attribute of 'name' is true, the 'desc' is a generic descriptor which only contains [[Enumerable]] attribute as true, 'name' property is an index accessor property (8.12.9 step 8)",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n obj.verifySetFunction = \"data\";\n var get_func = function () {\n return obj.verifySetFunction;\n };\n var set_func = function (value) {\n obj.verifySetFunction = value;\n };\n Object.defineProperty(obj, \"0\", {\n get: get_func,\n set: set_func,\n enumerable: false,\n configurable: true\n });\n\n Object.defineProperty(obj, \"0\", {\n enumerable: true\n });\n\n return accessorPropertyAttributesAreCorrect(obj, \"0\", get_func, set_func, \"verifySetFunction\", true, true);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-82-3",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-3.js",
+ "description": "Object.defineProperty - Update [[Configurable]] attribute of 'name' property to false successfully when [[Configurable]] attribute of 'name' property is true, the 'desc' is a generic descriptor which contains [[Configurable]] attribute as false, 'name' property is a data property (8.12.9 step 8)",
+ "test": "assertTrue((function testcase() {\n \n var obj = {};\n\n Object.defineProperty(obj, \"foo\", {\n value: 1001,\n writable: true,\n enumerable: true,\n configurable: true\n });\n\n Object.defineProperty(obj, \"foo\", {\n configurable: false\n });\n\n return dataPropertyAttributesAreCorrect(obj, \"foo\", 1001, true, true, false);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-82-4",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-4.js",
+ "description": "Object.defineProperty - Update [[Configurable]] attribute of 'name' property to false successfully when [[Enumerable]] and [[Configurable]] attributes of 'name' property are true, the 'desc' is a generic descriptor which contains [[Enumerable]] attribute as true and [[Configurable]] attribute as false, 'name' property is a data property (8.12.9 step 8)",
+ "test": "assertTrue((function testcase() {\n \n var obj = {};\n\n Object.defineProperty(obj, \"foo\", {\n value: 1001,\n writable: true,\n enumerable: true,\n configurable: true\n });\n\n Object.defineProperty(obj, \"foo\", {\n enumerable: true, \n configurable: false\n });\n\n return dataPropertyAttributesAreCorrect(obj, \"foo\", 1001, true, true, false);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-82-5",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-5.js",
+ "description": "Object.defineProperty - Update [[Enumerable]] and [[Configurable]] attributes of 'name' property to false successfully when [[Enumerable]] and [[Configurable]] attributes of 'name' property are true, the 'desc' is a generic descriptor which contains [[Enumerable]] and [[Configurable]] attributes as false, 'name' property is a data property (8.12.9 step 8)",
+ "test": "assertTrue((function testcase() {\n \n var obj = {};\n\n Object.defineProperty(obj, \"foo\", {\n value: 1001,\n writable: true,\n enumerable: true,\n configurable: true\n });\n\n Object.defineProperty(obj, \"foo\", {\n enumerable: false,\n configurable: false\n });\n\n return dataPropertyAttributesAreCorrect(obj, \"foo\", 1001, true, false, false);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-82-6",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-6.js",
+ "description": "Object.defineProperty - Update [[Enumerable]] attribute of 'name' property to true successfully when [[Enumerable]] attribute of 'name' is false and [[Configurable]] attribute of 'name' is true, the 'desc' is a generic descriptor which only contains [[Enumerable]] attribute as true, 'name' property is a data property (8.12.9 step 8)",
+ "test": "assertTrue((function testcase() {\n \n var obj = {};\n\n Object.defineProperty(obj, \"foo\", {\n value: 1001,\n writable: true,\n enumerable: false,\n configurable: true\n });\n\n Object.defineProperty(obj, \"foo\", {\n enumerable: true\n });\n\n return dataPropertyAttributesAreCorrect(obj, \"foo\", 1001, true, true, true);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-82-7",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-7.js",
+ "description": "Object.defineProperty - Update [[Enumerable]] attribute of 'name' property to false successfully when [[Enumerable]] and [[Configurable]] attributes of 'name' property are true, the 'desc' is a generic descriptor which only contains [Enumerable]] attribute as false and 'name' property is an accessor property (8.12.9 step 8)",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n obj.verifySetFunction = \"data\";\n var get_func = function () {\n return obj.verifySetFunction;\n };\n var set_func = function (value) {\n obj.verifySetFunction = value;\n };\n Object.defineProperty(obj, \"foo\", {\n get: get_func,\n set: set_func,\n enumerable: true,\n configurable: true\n });\n\n Object.defineProperty(obj, \"foo\", {\n enumerable: false\n });\n\n return accessorPropertyAttributesAreCorrect(obj, \"foo\", get_func, set_func, \"verifySetFunction\", false, true);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-82-8",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-8.js",
+ "description": "Object.defineProperty - Update [[Enumerable]] attribute of 'name' property to false successfully when [[Enumerable]] and [[Configurable]] attributes of 'name' property are true, the 'desc' is a generic descriptor which contains [Enumerable]] attribute as false and [[Configurable]] property is true, 'name' property is an accessor property (8.12.9 step 8)",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n obj.verifySetFunction = \"data\";\n var get_func = function () {\n return obj.verifySetFunction;\n };\n var set_func = function (value) {\n obj.verifySetFunction = value;\n };\n Object.defineProperty(obj, \"foo\", {\n get: get_func,\n set: set_func,\n enumerable: true,\n configurable: true\n });\n\n Object.defineProperty(obj, \"foo\", {\n enumerable: false,\n configurable: true\n });\n\n return accessorPropertyAttributesAreCorrect(obj, \"foo\", get_func, set_func, \"verifySetFunction\", false, true);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-82-9",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82-9.js",
+ "description": "Object.defineProperty - Update [[Configurable]] attribute of 'name' property to false successfully when [[Enumerable]] and [[Configurable]] attributes of 'name' property are true, the 'desc' is a generic descriptor which only contains [[Configurable]] attribute as false, 'name' property is an accessor property (8.12.9 step 8)",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n obj.verifySetFunction = \"data\";\n var get_func = function () {\n return obj.verifySetFunction;\n };\n var set_func = function (value) {\n obj.verifySetFunction = value;\n };\n Object.defineProperty(obj, \"foo\", {\n get: get_func,\n set: set_func,\n enumerable: true,\n configurable: true\n });\n\n Object.defineProperty(obj, \"foo\", {\n configurable: false\n });\n\n return accessorPropertyAttributesAreCorrect(obj, \"foo\", get_func, set_func, \"verifySetFunction\", true, false);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-82",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-82.js",
+ "description": "Object.defineProperty - desc.configurable and name.configurable are boolean negation of each other (8.12.9 step 6)",
+ "test": "assertTrue((function testcase() {\n \n var obj = {};\n\n Object.defineProperty(obj, \"foo\", { configurable: true });\n\n Object.defineProperty(obj, \"foo\", { configurable: false });\n return dataPropertyAttributesAreCorrect(obj, \"foo\", undefined, false, false, false);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-83",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-83.js",
+ "description": "Object.defineProperty will not throw TypeError if name.configurable = false, name.writable = false, name.value = undefined and desc.value = undefined (8.12.9 step 10.a.ii.1)",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n\n Object.defineProperty(obj, \"foo\", { \n value: undefined, \n writable: false, \n configurable: false \n });\n\n Object.defineProperty(obj, \"foo\", { \n value: undefined, \n writable: false, \n configurable: false\n });\n return dataPropertyAttributesAreCorrect(obj, \"foo\", undefined, false, false, false);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-84",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-84.js",
+ "description": "Object.defineProperty will not throw TypeError if name.configurable = false, name.writable = false, name.value = null and desc.value = null (8.12.9 step 10.a.ii.1)",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n\n Object.defineProperty(obj, \"foo\", { \n value: null, \n writable: false, \n configurable: false \n });\n\n Object.defineProperty(obj, \"foo\", { \n value: null, \n writable: false, \n configurable: false \n });\n return dataPropertyAttributesAreCorrect(obj, \"foo\", null, false, false, false);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-85",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-85.js",
+ "description": "Object.defineProperty will not throw TypeError if name.configurable = false, name.writable = false, name.value = NaN and desc.value = NaN (8.12.9 step 10.a.ii.1)",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n\n Object.defineProperty(obj, \"foo\", {\n value: NaN,\n writable: false,\n configurable: false\n });\n\n Object.defineProperty(obj, \"foo\", {\n value: NaN,\n writable: false,\n configurable: false\n });\n\n if (!isNaN(obj.foo)) {\n return false;\n }\n\n obj.foo = \"verifyValue\";\n if (obj.foo === \"verifyValue\") {\n return false;\n }\n\n for (var prop in obj) {\n if (obj.hasOwnProperty(prop) && prop === \"foo\") {\n return false;\n }\n }\n\n delete obj.foo;\n if (!obj.hasOwnProperty(\"foo\")) {\n return false;\n }\n\n return true;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-86",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-86.js",
+ "description": "Object.defineProperty will throw TypeError when name.configurable = false, name.writable = false, desc.value = +0 and name.value = -0 (8.12.9 step 10.a.ii.1)",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n\n Object.defineProperty(obj, \"foo\", { \n value: -0, \n writable: false, \n configurable: false \n });\n\n try {\n Object.defineProperty(obj, \"foo\", { value: +0 });\n return false;\n } catch (e) {\n return e instanceof TypeError && dataPropertyAttributesAreCorrect(obj, \"foo\", -0, false, false, false);\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-87",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-87.js",
+ "description": "Object.defineProperty will throw TypeError when name.configurable = false, name.writable = false, desc.value = -0 and name.value = +0 (8.12.9 step 10.a.ii.1)",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n\n Object.defineProperty(obj, \"foo\", { \n value: +0, \n writable: false, \n configurable: false \n });\n\n try {\n Object.defineProperty(obj, \"foo\", { value: -0 });\n return false;\n } catch (e) {\n return e instanceof TypeError && dataPropertyAttributesAreCorrect(obj, \"foo\", +0, false, false, false);\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-88",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-88.js",
+ "description": "Object.defineProperty will not throw TypeError when name.configurable = false, name.writable = false, desc.value and name.value are two numbers with the same value (8.12.9 step 10.a.ii.1)",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n\n Object.defineProperty(obj, \"foo\", { \n value: 100, \n writable: false, \n configurable: false \n });\n\n try {\n Object.defineProperty(obj, \"foo\", { value: 100 });\n return dataPropertyAttributesAreCorrect(obj, \"foo\", 100, false, false, false);\n } catch (e) {\n return false;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-89",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-89.js",
+ "description": "Object.defineProperty will throw TypeError when name.configurable = false, name.writable = false, desc.value and name.value are two numbers with different values (8.12.9 step 10.a.ii.1)",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n\n Object.defineProperty(obj, \"foo\", { \n value: 10, \n writable: false, \n configurable: false \n });\n \n try {\n Object.defineProperty(obj, \"foo\", { value: 20 });\n return false;\n } catch (e) {\n return e instanceof TypeError && dataPropertyAttributesAreCorrect(obj, \"foo\", 10, false, false, false);\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-9",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-9.js",
+ "description": "Object.defineProperty throws TypeError when changing [[Enumerable]] from true to false on non-configurable data properties",
+ "test": "assertTrue((function testcase() {\n var o = {};\n\n // create a data valued property with [[Enumerable]] explicitly set to true;\n // all other attributes default to false.\n var d1 = { value: 101, enumerable: true, configurable: false };\n Object.defineProperty(o, \"foo\", d1);\n\n // now, setting enumerable to false should fail, since [[Configurable]]\n // on the original property will be false.\n var desc = { value: 101, enumerable: false };\n\n try {\n Object.defineProperty(o, \"foo\", desc);\n }\n catch (e) {\n if (e instanceof TypeError) {\n // the property should remain unchanged.\n var d2 = Object.getOwnPropertyDescriptor(o, \"foo\");\n if (d2.value === 101 &&\n d2.enumerable === true &&\n d2.configurable === false) {\n return true;\n }\n }\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-90",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-90.js",
+ "description": "Object.defineProperty will not throw TypeError when name.configurable = false, name.writable = false, desc.value and name.value are two strings with the same value (8.12.9 step 10.a.ii.1)",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n\n Object.defineProperty(obj, \"foo\", {\n value: \"abcd\",\n writable: false,\n configurable: false \n });\n\n try {\n Object.defineProperty(obj, \"foo\", { value: \"abcd\" });\n return dataPropertyAttributesAreCorrect(obj, \"foo\", \"abcd\", false, false, false);\n } catch (e) {\n return false;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-91",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-91.js",
+ "description": "Object.defineProperty will throw TypeError when name.configurable = false, name.writable = false, desc.value and name.value are two strings with different values (8.12.9 step 10.a.ii.1)",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n\n Object.defineProperty(obj, \"foo\", {\n value: \"abcd\",\n writable: false,\n configurable: false \n });\n\n try {\n Object.defineProperty(obj, \"foo\", { value: \"fghj\" });\n return false;\n } catch (e) {\n return e instanceof TypeError && dataPropertyAttributesAreCorrect(obj, \"foo\", \"abcd\", false, false, false);\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-92",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-92.js",
+ "description": "Object.defineProperty will not throw TypeError when name.configurable = false, name.writable = false, desc.value and name.value are two booleans with the same value (8.12.9 step 10.a.ii.1)",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n\n Object.defineProperty(obj, \"foo\", {\n value: false,\n writable: false,\n configurable: false \n });\n\n try {\n Object.defineProperty(obj, \"foo\", { value: false });\n return dataPropertyAttributesAreCorrect(obj, \"foo\", false, false, false, false);\n } catch (e) {\n return false;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-93",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-93.js",
+ "description": "Object.defineProperty will throw TypeError when name.configurable = false, name.writable = false, desc.value and name.value are two booleans with different values (8.12.9 step 10.a.ii.1)",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n\n Object.defineProperty(obj, \"foo\", {\n value: false,\n writable: false,\n configurable: false \n });\n\n try {\n Object.defineProperty(obj, \"foo\", { value: true });\n return false;\n } catch (e) {\n return e instanceof TypeError && dataPropertyAttributesAreCorrect(obj, \"foo\", false, false, false, false);\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-94",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-94.js",
+ "description": "Object.defineProperty will not throw TypeError when name.configurable = false, name.writable = false, desc.value and name.value are two Objects refer to the same object (8.12.9 step 10.a.ii.1)",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n\n var obj1 = { length: 10 };\n\n Object.defineProperty(obj, \"foo\", {\n value: obj1,\n writable: false,\n configurable: false \n });\n\n try {\n Object.defineProperty(obj, \"foo\", { value: obj1 });\n return dataPropertyAttributesAreCorrect(obj, \"foo\", obj1, false, false, false);\n } catch (e) {\n return false;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-95",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-95.js",
+ "description": "Object.defineProperty will throw TypeError when name.configurable = false, name.writable = false, desc.value and name.value are two objects which refer to the different objects (8.12.9 step 10.a.ii.1)",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n\n var obj1 = { length: 10 };\n\n Object.defineProperty(obj, \"foo\", {\n value: obj1,\n writable: false,\n configurable: false \n });\n\n var obj2 = { length: 20 };\n\n try {\n Object.defineProperty(obj, \"foo\", { value: obj2 });\n return false;\n } catch (e) {\n return e instanceof TypeError && dataPropertyAttributesAreCorrect(obj, \"foo\", obj1, false, false, false);\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-96",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-96.js",
+ "description": "Object.defineProperty will not throw TypeError when name.configurable = false, both desc.[[Set]] and name.[[Set]] are two objects which refer to the same object (8.12.9 step 11.a.i)",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n\n function setFunc(value) {\n obj.setVerifyHelpProp = value;\n }\n\n Object.defineProperty(obj, \"foo\", {\n set: setFunc,\n configurable: false\n });\n\n try {\n Object.defineProperty(obj, \"foo\", { set: setFunc });\n return accessorPropertyAttributesAreCorrect(obj, \"foo\", undefined, setFunc, \"setVerifyHelpProp\", false, false);\n } catch (e) {\n return false;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-97",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-97.js",
+ "description": "Object.defineProperty will throw TypeError when name.configurable = false, name.[[Set]] is undefined, desc.[[Set]] refers to an object (8.12.9 step 11.a.i)",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n\n function getFunc() {\n return \"property\";\n }\n\n Object.defineProperty(obj, \"property\", {\n get: getFunc,\n configurable: false\n });\n\n try {\n Object.defineProperty(obj, \"property\", {\n get: getFunc,\n set: function () { },\n configurable: false\n });\n\n return false;\n } catch (e) {\n return e instanceof TypeError &&\n accessorPropertyAttributesAreCorrect(obj, \"property\", getFunc, undefined, undefined, false, false);\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.6-4-98",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-98.js",
+ "description": "Object.defineProperty will not throw TypeError when name.configurable = false, both desc.[[Get]] and name.[[Get]] are two objects which refer to the same object (8.12.9 step 11.a.ii)",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n\n function getFunc() {\n return 10;\n }\n function setFunc(value) {\n obj.verifyGetHelpMethod = value;\n }\n\n Object.defineProperty(obj, \"foo\", {\n get: getFunc,\n set: setFunc,\n configurable: false\n });\n\n try {\n Object.defineProperty(obj, \"foo\", { get: getFunc });\n return accessorPropertyAttributesAreCorrect(obj, \"foo\", getFunc, setFunc, \"verifyGetHelpMethod\", false, false);\n } catch (e) {\n return false;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.6-4-99",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-99.js",
+ "description": "Object.defineProperty will throw TypeError when name.configurable = false, name.[[Get]] is undefined, desc.[[Get]] refers to an object (8.12.9 step 11.a.ii)",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n\n function setFunc(value) {\n obj.setVerifyHelpProp = value;\n }\n\n Object.defineProperty(obj, \"foo\", {\n set: setFunc,\n configurable: false\n });\n\n function getFunc() {\n return 10;\n }\n\n try {\n Object.defineProperty(obj, \"foo\", {\n get: getFunc,\n set: setFunc\n });\n return false;\n } catch (e) {\n return e instanceof TypeError && accessorPropertyAttributesAreCorrect(obj, \"foo\", undefined, setFunc, \"setVerifyHelpProp\", false, false);\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.2.3.7.json b/website/resources/scripts/testcases2/15.2.3.7.json
new file mode 100644
index 000000000..cf127118e
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.2.3.7.json
@@ -0,0 +1,4340 @@
+{
+ "testCollection": {
+ "name": "15.2.3.7",
+ "numTests": 619,
+ "tests": [
+ {
+ "id": "15.2.3.7-0-1",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-0-1.js",
+ "description": "Object.defineProperties must exist as a function",
+ "test": "assertTrue((function testcase() {\n var f = Object.defineProperties;\n if (typeof(f) === \"function\") {\n return true;\n }\n }).call(this));\n"
+ },
+ {
+ "id": "15.2.3.7-0-2",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-0-2.js",
+ "description": "Object.defineProperties must exist as a function taking 2 parameters",
+ "test": "assertTrue((Object.defineProperties.length === 2));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-1-1",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-1-1.js",
+ "description": "Object.defineProperties throws TypeError if 'O' is undefined",
+ "test": "assertTrue((function testcase() {\n\n try {\n Object.defineProperties(undefined, {});\n return false;\n } catch (e) {\n return (e instanceof TypeError);\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-1-2",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-1-2.js",
+ "description": "Object.defineProperties throws TypeError if 'O' is null",
+ "test": "assertTrue((function testcase() {\n\n try {\n Object.defineProperties(null, {});\n return false;\n } catch (e) {\n return (e instanceof TypeError);\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-1-3",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-1-3.js",
+ "description": "Object.defineProperties throws TypeError if 'O' is a boolean",
+ "test": "assertTrue((function testcase() {\n\n try {\n Object.defineProperties(true, {});\n return false;\n } catch (e) {\n return (e instanceof TypeError);\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-1-4",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-1-4.js",
+ "description": "Object.defineProperties throws TypeError if 'O' is a string",
+ "test": "assertTrue((function testcase() {\n\n try {\n Object.defineProperties(\"abc\", {});\n return false;\n } catch (e) {\n return (e instanceof TypeError);\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-1",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-1.js",
+ "description": "Object.defineProperties throws TypeError if type of first param is not Object",
+ "test": "assertTrue((function testcase() {\n try {\n Object.defineProperties(0, {});\n }\n catch (e) {\n if (e instanceof TypeError) {\n return true;\n }\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-2-1",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-2-1.js",
+ "description": "Object.defineProperties throws TypeError if 'Properties' is null",
+ "test": "assertTrue((function testcase() {\n\n try {\n Object.defineProperties({}, null);\n return false;\n } catch (e) {\n return (e instanceof TypeError);\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-2-10",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-2-10.js",
+ "description": "Object.defineProperties - argument 'Properties' is an Array object",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n var props = [];\n var result = false;\n \n Object.defineProperty(props, \"prop\", {\n get: function () {\n result = this instanceof Array;\n return {};\n },\n enumerable: true\n });\n\n Object.defineProperties(obj, props);\n return result;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.7-2-11",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-2-11.js",
+ "description": "Object.defineProperties - argument 'Properties' is the Math object",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n var result = false;\n \n try {\n Object.defineProperty(Math, \"prop\", {\n get: function () {\n result = (this === Math);\n return {};\n },\n enumerable: true,\n configurable: true\n });\n\n Object.defineProperties(obj, Math);\n return result;\n } finally {\n delete Math.prop;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.7-2-12",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-2-12.js",
+ "description": "Object.defineProperties - argument 'Properties' is a Date object",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n var props = new Date();\n var result = false;\n \n Object.defineProperty(props, \"prop\", {\n get: function () {\n result = this instanceof Date;\n return {};\n },\n enumerable: true\n });\n\n Object.defineProperties(obj, props);\n return result;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.7-2-13",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-2-13.js",
+ "description": "Object.defineProperties - argument 'Properties' is a RegExp object",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n var props = new RegExp();\n var result = false;\n \n Object.defineProperty(props, \"prop\", {\n get: function () {\n result = this instanceof RegExp;\n return {};\n },\n enumerable: true\n });\n\n Object.defineProperties(obj, props);\n return result;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.7-2-14",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-2-14.js",
+ "description": "Object.defineProperties - argument 'Properties' is the JSON object",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n var result = false;\n\n try {\n Object.defineProperty(JSON, \"prop\", {\n get: function () {\n result = (this === JSON);\n return {};\n },\n enumerable: true,\n configurable: true\n });\n\n Object.defineProperties(obj, JSON);\n return result;\n } finally {\n delete JSON.prop;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.7-2-15",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-2-15.js",
+ "description": "Object.defineProperties - argument 'Properties' is an Error object",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n var props = new Error(\"test\");\n var obj1 = {\n value: 11\n };\n props.description = obj1;\n props.message = obj1;\n props.name = obj1;\n\n var result = false;\n \n Object.defineProperty(props, \"prop\", {\n get: function () {\n result = this instanceof Error;\n return {};\n },\n enumerable: true\n });\n\n Object.defineProperties(obj, props);\n return result;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.7-2-16",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-2-16.js",
+ "description": "Object.defineProperties - argument 'Properties' is the Arguments object",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n var result = false;\n\n var Fun = function () {\n return arguments;\n }; \n var props = new Fun();\n\n Object.defineProperty(props, \"prop\", {\n get: function () {\n result = ('[object Arguments]' === Object.prototype.toString.call(this));\n return {};\n },\n enumerable: true\n });\n\n Object.defineProperties(obj, props);\n return result;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.7-2-18",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-2-18.js",
+ "description": "Object.defineProperties - argument 'Properties' is the global object",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n var result = false;\n\n try {\n Object.defineProperty(fnGlobalObject(), \"prop\", {\n get: function () {\n result = (this === fnGlobalObject());\n return {};\n },\n enumerable: true,\n\t\t\t\tconfigurable:true\n });\n\n Object.defineProperties(obj, fnGlobalObject());\n return result;\n } catch (e) {\n return (e instanceof TypeError);\n } finally {\n delete fnGlobalObject().prop;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.7-2-2",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-2-2.js",
+ "description": "Object.defineProperties throws TypeError if 'Properties' is undefined",
+ "test": "assertTrue((function testcase() {\n\n try {\n Object.defineProperties({}, undefined);\n return false;\n } catch (e) {\n return (e instanceof TypeError);\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-2-3",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-2-3.js",
+ "description": "Object.defineProperties - argument 'Properties' is a boolean whose value is false",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n var obj1 = Object.defineProperties(obj, false);\n return obj === obj1;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-2-4",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-2-4.js",
+ "description": "Object.defineProperties - argument 'Properties' is a Boolean object whose primitive value is true",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n var props = new Boolean(true);\n var result = false;\n\n Object.defineProperty(props, \"prop\", {\n get: function () {\n result = this instanceof Boolean;\n return {};\n },\n enumerable: true\n });\n\n Object.defineProperties(obj, props);\n return result;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.7-2-5",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-2-5.js",
+ "description": "Object.defineProperties - argument 'Properties' is any interesting number",
+ "test": "assertTrue((function testcase() {\n\n var obj = { \"123\": 100 };\n var obj1 = Object.defineProperties(obj, -12);\n return obj === obj1;\n\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-2-6",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-2-6.js",
+ "description": "Object.defineProperties - argument 'Properties' is a Number object whose primitive value is any interesting number",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n var props = new Number(-12);\n var result = false;\n \n Object.defineProperty(props, \"prop\", {\n get: function () {\n result = this instanceof Number;\n return {};\n },\n enumerable: true\n });\n\n Object.defineProperties(obj, props);\n return result;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.7-2-7",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-2-7.js",
+ "description": "Object.defineProperties - argument 'Properties' is a string whose value is any interesting string",
+ "test": "assertTrue((function testcase() {\n\n var obj = { \"123\": 100 };\n var obj1 = Object.defineProperties(obj, \"\");\n return obj === obj1;\n\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-2-8",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-2-8.js",
+ "description": "Object.defineProperties - argument 'Properties' is a String object whose primitive value is any interesting string",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n var props = new String();\n var result = false;\n \n Object.defineProperty(props, \"prop\", {\n get: function () {\n result = this instanceof String;\n return {};\n },\n enumerable: true\n });\n\n Object.defineProperties(obj, props);\n return result;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.7-2-9",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-2-9.js",
+ "description": "Object.defineProperties - argument 'Properties' is a Function object",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n var props = function () { };\n var result = false;\n \n Object.defineProperty(props, \"prop\", {\n get: function () {\n result = this instanceof Function;\n return {};\n },\n enumerable: true\n });\n\n Object.defineProperties(obj, props);\n return result;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.7-3-1",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-3-1.js",
+ "description": "Object.defineProperties - enumerable own data property of 'Properties' is defined in 'O' ",
+ "test": "assertTrue((function testcase() {\n\n var obj = {}; \n var props = {};\n Object.defineProperty(props, \"prop\", {\n value: {},\n enumerable: true\n });\n\n Object.defineProperties(obj, props);\n\n return obj.hasOwnProperty(\"prop\");\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.7-3-2",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-3-2.js",
+ "description": "Object.defineProperties - own data property of 'Properties' which is not enumerable is not defined in 'O' ",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n var props = {};\n\n Object.defineProperty(props, \"prop\", {\n value: {},\n enumerable: false\n });\n\n Object.defineProperties(obj, props);\n\n return !obj.hasOwnProperty(\"prop\");\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.7-3-3",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-3-3.js",
+ "description": "Object.defineProperties - enumerable inherited data property of 'Properties' is not defined in 'O' ",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n\n var proto = {};\n\n Object.defineProperty(proto, \"prop\", {\n value: {},\n enumerable: true\n });\n\n var Con = function () { };\n Con.prototype = proto;\n var child = new Con();\n\n Object.defineProperties(obj, child);\n\n return !obj.hasOwnProperty(\"prop\");\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.7-3-4",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-3-4.js",
+ "description": "Object.defineProperties - enumerable own accessor property of 'Properties' is defined in 'O' ",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n\n var props = {};\n\n Object.defineProperty(props, \"prop\", {\n get: function () {\n return {};\n },\n enumerable: true\n });\n\n Object.defineProperties(obj, props);\n\n return obj.hasOwnProperty(\"prop\");\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.7-3-5",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-3-5.js",
+ "description": "Object.defineProperties - own accessor property of 'Properties' which is not enumerable is not defined in 'O' ",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n\n var props = {};\n\n Object.defineProperty(props, \"prop\", {\n get: function () {\n return {};\n },\n enumerable: false\n });\n\n Object.defineProperties(obj, props);\n\n return !obj.hasOwnProperty(\"prop\");\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.7-3-6",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-3-6.js",
+ "description": "Object.defineProperties - enumerable inherited accessor property of 'Properties' is not defined in 'O' ",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n var proto = {};\n\n Object.defineProperty(proto, \"prop\", {\n get: function () {\n return {};\n },\n enumerable: true\n });\n\n var Con = function () { };\n Con.prototype = proto;\n var child = new Con();\n\n Object.defineProperties(obj, child);\n\n return !obj.hasOwnProperty(\"prop\");\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.7-3-7",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-3-7.js",
+ "description": "Object.defineProperties - no additional property is defined in 'O' when 'Properties' doesn't contain enumerable own property ",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n\n var props = {};\n\n Object.defineProperty(props, \"prop1\", {\n value: {},\n enumerable: false\n });\n\n Object.defineProperty(props, \"prop2\", {\n get: function () {\n return {};\n },\n enumerable: false\n });\n\n Object.defineProperties(obj, props);\n\n return !obj.hasOwnProperty(\"prop1\") && !obj.hasOwnProperty(\"prop2\");\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.7-3-8",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-3-8.js",
+ "description": "Object.defineProperties - no additional property is defined in 'O' when 'Properties' doesn't contain enumerable own property ",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n\n var props = {};\n\n Object.defineProperty(props, \"prop1\", {\n value: {},\n enumerable: false\n });\n\n Object.defineProperty(props, \"prop2\", {\n get: function () {\n return {};\n },\n enumerable: true\n });\n\n Object.defineProperties(obj, props);\n\n return !obj.hasOwnProperty(\"prop1\") && obj.hasOwnProperty(\"prop2\");\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.7-5-a-1",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-a-1.js",
+ "description": "Object.defineProperties - 'P' is own data property that overrides enumerable inherited data property of 'Properties' is defined in 'O' ",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n\n var proto = {};\n\n Object.defineProperty(proto, \"prop\", {\n value: {\n value: 9\n },\n enumerable: true\n });\n\n var Con = function () { };\n Con.prototype = proto;\n\n var child = new Con();\n Object.defineProperty(child, \"prop\", {\n value: {\n value: 12\n },\n enumerable: true\n });\n\n Object.defineProperties(obj, child);\n\n return obj.hasOwnProperty(\"prop\") && obj.prop === 12;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.7-5-a-10",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-a-10.js",
+ "description": "Object.defineProperties - 'Properties' is a Boolean object which implements its own [[Get]] method to get enumerable own property",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n var props = new Boolean(false);\n\n Object.defineProperty(props, \"prop\", {\n value: {\n value: 10\n },\n enumerable: true\n });\n Object.defineProperties(obj, props);\n\n return obj.hasOwnProperty(\"prop\") && obj.prop === 10;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.7-5-a-11",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-a-11.js",
+ "description": "Object.defineProperties - 'Properties' is a Number object which implements its own [[Get]] method to get enumerable own property",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n var props = new Number(-9);\n\n Object.defineProperty(props, \"prop\", {\n value: {\n value: 12\n },\n enumerable: true\n });\n Object.defineProperties(obj, props);\n\n return obj.hasOwnProperty(\"prop\") && obj.prop === 12;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.7-5-a-12",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-a-12.js",
+ "description": "Object.defineProperties - 'Properties' is the Math object which implements its own [[Get]] method to get enumerable own property",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n\n try {\n Math.prop = {\n value: 12\n };\n Object.defineProperties(obj, Math);\n\n return obj.hasOwnProperty(\"prop\") && obj.prop === 12;\n } finally {\n delete Math.prop;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-5-a-13",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-a-13.js",
+ "description": "Object.defineProperties - 'Properties' is a Date object which implements its own [[Get]] method to get enumerable own property",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n var props = new Date();\n\n Object.defineProperty(props, \"prop\", {\n value: {\n value: 13\n },\n enumerable: true\n });\n Object.defineProperties(obj, props);\n\n return obj.hasOwnProperty(\"prop\") && obj.prop === 13;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.7-5-a-14",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-a-14.js",
+ "description": "Object.defineProperties - 'Properties' is a RegExp object which implements its own [[Get]] method to get enumerable own property",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n var props = new RegExp();\n\n Object.defineProperty(props, \"prop\", {\n value: {\n value: 14\n },\n enumerable: true\n });\n Object.defineProperties(obj, props);\n\n return obj.hasOwnProperty(\"prop\") && obj.prop === 14;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.7-5-a-15",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-a-15.js",
+ "description": "Object.defineProperties - 'Properties' is the JSON object which implements its own [[Get]] method to get enumerable own property",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n try {\n JSON.prop = {\n value: 15\n };\n Object.defineProperties(obj, JSON);\n\n return obj.hasOwnProperty(\"prop\") && obj.prop === 15;\n } finally {\n delete JSON.prop;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.7-5-a-16",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-a-16.js",
+ "description": "Object.defineProperties - 'Properties' is an Error object which implements its own [[Get]] method to get enumerable own property",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n var props = new Error(\"test\");\n var obj1 = {\n value: 11\n };\n props.message = obj1;\n props.name = obj1;\n props.description = obj1;\n\n props.prop = {\n value: 16\n };\n Object.defineProperties(obj, props);\n\n return obj.hasOwnProperty(\"prop\") && obj.prop === 16;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-5-a-17",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-a-17.js",
+ "description": "Object.defineProperties - 'Properties' is the Arguments object which implements its own [[Get]] method to get enumerable own property",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n var arg;\n\n (function fun() {\n arg = arguments;\n }());\n\n Object.defineProperty(arg, \"prop\", {\n value: {\n value: 17\n },\n enumerable: true\n });\n\n Object.defineProperties(obj, arg);\n\n return obj.hasOwnProperty(\"prop\") && obj.prop === 17;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.7-5-a-2",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-a-2.js",
+ "description": "Object.defineProperties - 'P' is own data property that overrides enumerable inherited accessor property of 'Properties' is defined in 'O' ",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n var proto = {};\n\n Object.defineProperty(proto, \"prop\", {\n get: function () {\n return {\n value: 9\n };\n },\n enumerable: true\n });\n\n var Con = function () { };\n Con.prototype = proto;\n\n var child = new Con();\n Object.defineProperty(child, \"prop\", {\n value: {\n value: 12\n },\n enumerable: true\n });\n Object.defineProperties(obj, child);\n\n return obj.hasOwnProperty(\"prop\") && obj.prop === 12;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.7-5-a-3",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-a-3.js",
+ "description": "Object.defineProperties - enumerable own accessor property of 'Properties' that overrides enumerable inherited data property of 'Properties' is defined in 'O' ",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n\n var proto = {};\n\n Object.defineProperty(proto, \"prop\", {\n value: {\n value: 9\n },\n enumerable: true\n });\n\n var Con = function () { };\n Con.prototype = proto;\n\n var child = new Con();\n Object.defineProperty(child, \"prop\", {\n get: function () {\n return {\n value: 12\n };\n },\n enumerable: true\n });\n Object.defineProperties(obj, child);\n\n return obj.hasOwnProperty(\"prop\") && obj.prop === 12;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.7-5-a-4",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-a-4.js",
+ "description": "Object.defineProperties - enumerable own accessor property of 'Properties' that overrides enumerable inherited accessor property of 'Properties' is defined in 'O' ",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n\n var proto = {};\n\n Object.defineProperty(proto, \"prop\", {\n get: function () {\n return {\n value: 9\n };\n },\n enumerable: false\n });\n\n var Con = function () { };\n Con.prototype = proto;\n\n var child = new Con();\n Object.defineProperty(child, \"prop\", {\n get: function () {\n return {\n value: 12\n };\n },\n enumerable: true\n });\n Object.defineProperties(obj, child);\n\n return obj.hasOwnProperty(\"prop\") && obj.prop === 12;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.7-5-a-5",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-a-5.js",
+ "description": "Object.defineProperties - enumerable own accessor property of 'Properties' without a get function is defined in 'O' ",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n\n var props = {};\n Object.defineProperty(props, \"prop\", {\n get: function () {\n return {\n set: function () { }\n };\n },\n enumerable: true\n });\n\n Object.defineProperties(obj, props);\n\n return obj.hasOwnProperty(\"prop\") && typeof obj.prop === \"undefined\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.7-5-a-6",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-a-6.js",
+ "description": "Object.defineProperties - enumerable own accessor property of 'Properties' without a get function that overrides enumerable inherited accessor property of 'Properties' is defined in 'O' ",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n\n var proto = {};\n\n Object.defineProperty(proto, \"prop\", {\n get: function () {\n return 12;\n },\n enumerable: true\n });\n\n var Con = function () { };\n Con.prototype = proto;\n\n var child = new Con();\n Object.defineProperty(child, \"prop\", {\n get: function () {\n return {\n set: function () { }\n };\n },\n enumerable: true\n });\n Object.defineProperties(obj, child);\n\n return obj.hasOwnProperty(\"prop\") && typeof obj.prop === \"undefined\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.7-5-a-7",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-a-7.js",
+ "description": "Object.defineProperties - 'Properties' is a Function object which implements its own [[Get]] method to get enumerable own property",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n var props = function () { };\n\n Object.defineProperty(props, \"prop\", {\n value: {\n value: 7\n },\n enumerable: true\n });\n\n Object.defineProperties(obj, props);\n\n return obj.hasOwnProperty(\"prop\") && obj.prop === 7;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.7-5-a-8",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-a-8.js",
+ "description": "Object.defineProperties - 'Properties' is an Array object which implements its own [[Get]] method to get enumerable own property",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n var props = [];\n var descObj = {\n value: 8\n };\n\n Object.defineProperty(props, \"prop\", {\n value: descObj,\n enumerable: true\n });\n Object.defineProperties(obj, props);\n\n return obj.hasOwnProperty(\"prop\") && obj.prop === 8;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.7-5-a-9",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-a-9.js",
+ "description": "Object.defineProperties - 'Properties' is a String object which implements its own [[Get]] method to get enumerable own property",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n var props = new String();\n\n Object.defineProperty(props, \"prop\", {\n value: {\n value: 9\n },\n enumerable: true\n });\n Object.defineProperties(obj, props);\n\n return obj.hasOwnProperty(\"prop\") && obj.prop === 9;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.7-5-b-1",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-1.js",
+ "description": "Object.defineProperties - 'descObj' is undefined (8.10.5 step 1)",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n\n try {\n Object.defineProperties(obj, {\n prop: undefined\n });\n return false;\n } catch (e) {\n return e instanceof TypeError && !obj.hasOwnProperty(\"prop\");\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-5-b-10",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-10.js",
+ "description": "Object.defineProperties - 'enumerable' property of 'descObj' is own data property that overrides an inherited data property (8.10.5 step 3.a)",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n var accessed = false;\n\n var proto = {\n enumerable: true\n };\n\n var Con = function () { };\n Con.prototype = proto;\n var descObj = new Con();\n\n Object.defineProperty(descObj, \"enumerable\", {\n value: false\n });\n\n Object.defineProperties(obj, {\n prop: descObj\n });\n for (var property in obj) {\n if (property === \"prop\") {\n accessed = true;\n }\n }\n return !accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.7-5-b-100",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-100.js",
+ "description": "Object.defineProperties - value of 'configurable' property of 'descObj' is Boolean object (8.10.5 step 4.b)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n Object.defineProperties(obj, {\n property: {\n configurable: new Boolean(true)\n }\n });\n\n var preCheck = obj.hasOwnProperty(\"property\");\n delete obj.property;\n\n return preCheck && !obj.hasOwnProperty(\"property\");\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-5-b-101",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-101.js",
+ "description": "Object.defineProperties - value of 'configurable' property of 'descObj' is Number object (8.10.5 step 4.b)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n Object.defineProperties(obj, {\n property: {\n configurable: new Number(-123)\n }\n });\n var preCheck = obj.hasOwnProperty(\"property\");\n delete obj.property;\n\n return preCheck && !obj.hasOwnProperty(\"property\");\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-5-b-102",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-102.js",
+ "description": "Object.defineProperties - value of 'configurable' property of 'descObj' is the Math object (8.10.5 step 4.b)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n Object.defineProperties(obj, {\n property: {\n configurable: Math\n }\n });\n var preCheck = obj.hasOwnProperty(\"property\");\n delete obj.property;\n\n return preCheck && !obj.hasOwnProperty(\"property\");\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-5-b-103",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-103.js",
+ "description": "Object.defineProperties - value of 'configurable' property of 'descObj' is Date object (8.10.5 step 4.b)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n Object.defineProperties(obj, {\n property: {\n configurable: new Date()\n }\n });\n var preCheck = obj.hasOwnProperty(\"property\");\n delete obj.property;\n\n return preCheck && !obj.hasOwnProperty(\"property\");\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-5-b-104",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-104.js",
+ "description": "Object.defineProperties - value of 'configurable' property of 'descObj' is RegExp object (8.10.5 step 4.b)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n Object.defineProperties(obj, {\n property: {\n configurable: new RegExp()\n }\n });\n var preCheck = obj.hasOwnProperty(\"property\");\n delete obj.property;\n\n return preCheck && !obj.hasOwnProperty(\"property\");\n\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-5-b-105",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-105.js",
+ "description": "Object.defineProperties - value of 'configurable' property of 'descObj' is the JSON object (8.10.5 step 4.b)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n Object.defineProperties(obj, {\n property: {\n configurable: JSON\n }\n });\n var preCheck = obj.hasOwnProperty(\"property\");\n delete obj.property;\n\n return preCheck && !obj.hasOwnProperty(\"property\");\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-5-b-106",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-106.js",
+ "description": "Object.defineProperties - value of 'configurable' property of 'descObj' is Error object (8.10.5 step 4.b)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n Object.defineProperties(obj, {\n property: {\n configurable: new SyntaxError()\n }\n });\n var preCheck = obj.hasOwnProperty(\"property\");\n delete obj.property;\n\n return preCheck && !obj.hasOwnProperty(\"property\");\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-5-b-107",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-107.js",
+ "description": "Object.defineProperties - value of 'configurable' property of 'descObj' is the Argument object (8.10.5 step 4.b)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n var func = function (a, b, c) {\n return arguments;\n };\n\n var args = func(1, true, \"a\");\n\n Object.defineProperties(obj, {\n property: {\n configurable: args\n }\n });\n var preCheck = obj.hasOwnProperty(\"property\");\n delete obj.property;\n\n return preCheck && !obj.hasOwnProperty(\"property\");\n\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-5-b-109",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-109.js",
+ "description": "Object.defineProperties - value of 'configurable' property of 'descObj' is the global object (8.10.5 step 4.b)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n Object.defineProperties(obj, {\n property: {\n configurable: fnGlobalObject()\n }\n });\n var preCheck = obj.hasOwnProperty(\"property\");\n delete obj.property;\n\n return preCheck && !obj.hasOwnProperty(\"property\");\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-5-b-11",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-11.js",
+ "description": "Object.defineProperties - 'enumerable' property of 'descObj' is own data property that overrides an inherited accessor property (8.10.5 step 3.a)",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n var proto = {};\n var accessed = false;\n\n Object.defineProperty(proto, \"enumerable\", {\n get: function () {\n return true;\n }\n });\n\n var Con = function () { };\n Con.prototype = proto;\n var descObj = new Con();\n\n Object.defineProperty(descObj, \"enumerable\", {\n value: false\n });\n\n Object.defineProperties(obj, {\n prop: descObj\n });\n\n for (var property in obj) {\n if (property === \"prop\") {\n accessed = true;\n }\n }\n return !accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.7-5-b-110",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-110.js",
+ "description": "Object.defineProperties - value of 'configurable' property of 'descObj' is a string (value is 'false') which is treated as true value (8.10.5 step 4.b)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n Object.defineProperties(obj, {\n property: {\n configurable: \"false\"\n }\n });\n var preCheck = obj.hasOwnProperty(\"property\");\n delete obj.property;\n\n return preCheck && !obj.hasOwnProperty(\"property\");\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-5-b-111",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-111.js",
+ "description": "Object.defineProperties - value of 'configurable' property of 'descObj' is new Boolean(false) which is treated as true value (8.10.5 step 4.b)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n Object.defineProperties(obj, {\n property: {\n configurable: new Boolean(false)\n }\n });\n var preCheck = obj.hasOwnProperty(\"property\");\n delete obj.property;\n\n return preCheck && !obj.hasOwnProperty(\"property\");\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-5-b-112",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-112.js",
+ "description": "Object.defineProperties - 'value' property of 'descObj' is present (8.10.5 step 5)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n Object.defineProperties(obj, {\n property: {\n value: 300\n }\n });\n\n return obj.property === 300;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-5-b-113",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-113.js",
+ "description": "Object.defineProperties - 'value' property of 'descObj' is not present (8.10.5 step 5)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n Object.defineProperties(obj, {\n property: {\n writable: true\n }\n });\n\n return obj.hasOwnProperty(\"property\") && typeof (obj.property) === \"undefined\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-5-b-114",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-114.js",
+ "description": "Object.defineProperties - 'value' property of 'descObj' is own data property (8.10.5 step 5.a)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n Object.defineProperties(obj, {\n property: {\n value: \"ownDataProperty\"\n }\n });\n\n return obj.property === \"ownDataProperty\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-5-b-115",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-115.js",
+ "description": "Object.defineProperties - 'value' property of 'descObj' is inherited data property (8.10.5 step 5.a)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n var proto = {\n value: \"inheritedDataProperty\"\n };\n\n var Con = function () { };\n Con.prototype = proto;\n\n var descObj = new Con();\n\n Object.defineProperties(obj, {\n property: descObj\n });\n\n return obj.property === \"inheritedDataProperty\";\n\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-5-b-116",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-116.js",
+ "description": "Object.defineProperties - 'value' property of 'descObj' is own data property that overrides an inherited data property (8.10.5 step 5.a)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n var proto = {\n value: \"inheritedDataProperty\"\n };\n\n var Con = function () { };\n Con.prototype = proto;\n\n var descObj = new Con();\n\n descObj.value = \"ownDataProperty\";\n\n Object.defineProperties(obj, {\n property: descObj\n });\n\n return obj.property === \"ownDataProperty\";\n\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-5-b-117",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-117.js",
+ "description": "Object.defineProperties - 'value' property of 'descObj' is own data property that overrides an inherited accessor property (8.10.5 step 5.a)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n var proto = {};\n\n Object.defineProperty(proto, \"value\", {\n get: function () {\n return \"inheritedAccessorProperty\";\n }\n });\n\n var Con = function () { };\n Con.prototype = proto;\n\n var descObj = new Con();\n\n Object.defineProperty(descObj, \"value\", {\n value: \"ownDataProperty\"\n });\n\n Object.defineProperties(obj, {\n property: descObj\n });\n\n return obj.property === \"ownDataProperty\";\n\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.7-5-b-118",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-118.js",
+ "description": "Object.defineProperties - 'value' property of 'descObj' is own accessor property (8.10.5 step 5.a)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n var descObj = {};\n\n Object.defineProperty(descObj, \"value\", {\n get: function () {\n return \"ownAccessorProperty\";\n }\n });\n\n Object.defineProperties(obj, {\n property: descObj\n });\n\n return obj.property === \"ownAccessorProperty\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.7-5-b-119",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-119.js",
+ "description": "Object.defineProperties - 'value' property of 'descObj' is inherited accessor property (8.10.5 step 5.a)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n var proto = {};\n\n Object.defineProperty(proto, \"value\", {\n get: function () {\n return \"inheritedAccessorProperty\";\n }\n });\n\n var Con = function () { };\n Con.prototype = proto;\n\n var descObj = new Con();\n\n Object.defineProperties(obj, {\n property: descObj\n });\n\n return obj.property === \"inheritedAccessorProperty\";\n\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.7-5-b-12",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-12.js",
+ "description": "Object.defineProperties - 'enumerable' property of 'descObj' is own accessor property (8.10.5 step 3.a)",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n var accessed = false;\n var descObj = {};\n\n Object.defineProperty(descObj, \"enumerable\", {\n get: function () {\n return true;\n }\n });\n\n Object.defineProperties(obj, {\n prop: descObj\n });\n for (var property in obj) {\n if (property === \"prop\") {\n accessed = true;\n }\n }\n return accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.7-5-b-120",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-120.js",
+ "description": "Object.defineProperties - 'value' property of 'descObj' is own accessor property that overrides an inherited data property (8.10.5 step 5.a)",
+ "test": "assertTrue((function testcase() {\n var obj = {}; \n\n var proto = {\n value: \"inheritedDataProperty\"\n };\n\n var Con = function () { };\n Con.prototype = proto;\n\n var descObj = new Con();\n\n Object.defineProperty(descObj, \"value\", {\n get: function () {\n return \"ownAccessorProperty\";\n }\n });\n\n\n Object.defineProperties(obj, {\n property: descObj\n });\n\n return obj.property === \"ownAccessorProperty\";\n\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.7-5-b-121",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-121.js",
+ "description": "Object.defineProperties - 'value' property of 'descObj' is own accessor property that overrides an inherited accessor property (8.10.5 step 5.a)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n var proto = {};\n\n Object.defineProperty(proto, \"value\", {\n get: function () {\n return \"inheritedAccessorProperty\";\n }\n });\n\n var Con = function () { };\n Con.prototype = proto;\n\n var descObj = new Con();\n\n Object.defineProperty(descObj, \"value\", {\n get: function () {\n return \"ownAccessorProperty\";\n }\n });\n\n Object.defineProperties(obj, {\n property: descObj\n });\n\n return obj.property === \"ownAccessorProperty\";\n\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.7-5-b-122",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-122.js",
+ "description": "Object.defineProperties - 'value' property of 'descObj' is own accessor property without a get function (8.10.5 step 5.a)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n var descObj = {};\n\n Object.defineProperty(descObj, \"value\", {\n set: function () { }\n });\n\n Object.defineProperties(obj, {\n property: descObj\n });\n\n return obj.hasOwnProperty(\"property\") && typeof (obj.property) === \"undefined\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.7-5-b-123",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-123.js",
+ "description": "Object.defineProperties - 'value' property of 'descObj' is own accessor property without a get function that overrides an inherited accessor property (8.10.5 step 5.a)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n var proto = {};\n\n Object.defineProperty(proto, \"value\", {\n get: function () {\n return \"inheritedAccessorProperty\";\n }\n });\n\n var Con = function () { };\n Con.prototype = proto;\n\n var descObj = new Con();\n\n Object.defineProperty(descObj, \"value\", {\n set: function () { }\n });\n\n Object.defineProperties(obj, {\n property: descObj\n });\n\n return obj.hasOwnProperty(\"property\") && typeof (obj.property) === \"undefined\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.7-5-b-124",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-124.js",
+ "description": "Object.defineProperties - 'value' property of 'descObj' is inherited accessor property without a get function (8.10.5 step 5.a)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n var proto = {};\n\n Object.defineProperty(proto, \"value\", {\n set: function () { }\n });\n\n var Con = function () { };\n Con.prototype = proto;\n\n var descObj = new Con();\n\n Object.defineProperties(obj, {\n property: descObj\n });\n\n return obj.hasOwnProperty(\"property\") && typeof (obj.property) === \"undefined\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.7-5-b-125",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-125.js",
+ "description": "Object.defineProperties - 'descObj' is a Function object which implements its own [[Get]] method to get 'value' property (8.10.5 step 5.a)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n var func = function (a, b) {\n return a + b;\n };\n\n func.value = \"Function\";\n\n Object.defineProperties(obj, {\n property: func\n });\n\n return obj.property === \"Function\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-5-b-126",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-126.js",
+ "description": "Object.defineProperties - 'descObj' is an Array object which implements its own [[Get]] method to get 'value' property (8.10.5 step 5.a)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n var arr = [1, 2, 3];\n\n arr.value = \"Array\";\n\n Object.defineProperties(obj, {\n property: arr\n });\n\n return obj.property === \"Array\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-5-b-127",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-127.js",
+ "description": "Object.defineProperties - 'descObj' is a String object which implements its own [[Get]] method to get 'value' property (8.10.5 step 5.a)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n var str = new String(\"abc\");\n\n str.value = \"String\";\n\n Object.defineProperties(obj, {\n property: str\n });\n\n return obj.property === \"String\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-5-b-128",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-128.js",
+ "description": "Object.defineProperties - 'descObj' is a Boolean object which implements its own [[Get]] method to get 'value' property (8.10.5 step 5.a)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n var descObj = new Boolean(false);\n\n descObj.value = \"Boolean\";\n\n Object.defineProperties(obj, {\n property: descObj\n });\n\n return obj.property === \"Boolean\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-5-b-129",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-129.js",
+ "description": "Object.defineProperties - 'descObj' is a Number object which implements its own [[Get]] method to get 'value' property (8.10.5 step 5.a)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n var descObj = new Number(-9);\n\n descObj.value = \"Number\";\n\n Object.defineProperties(obj, {\n property: descObj\n });\n\n return obj.property === \"Number\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-5-b-13",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-13.js",
+ "description": "Object.defineProperties - 'enumerable' property of 'descObj' is inherited accessor property (8.10.5 step 3.a)",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n var proto = {};\n var accessed = false;\n\n Object.defineProperty(proto, \"enumerable\", {\n get: function () {\n return true;\n }\n });\n\n var Con = function () { };\n Con.prototype = proto;\n var descObj = new Con();\n\n Object.defineProperties(obj, {\n prop: descObj\n });\n for (var property in obj) {\n if (property === \"prop\") {\n accessed = true;\n }\n }\n return accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.7-5-b-130",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-130.js",
+ "description": "Object.defineProperties - 'descObj' is the Math object which implements its own [[Get]] method to get 'value' property (8.10.5 step 5.a)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n try {\n Math.value = \"Math\";\n\n Object.defineProperties(obj, {\n property: Math\n });\n\n return obj.property === \"Math\";\n } finally {\n delete Math.value;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-5-b-131",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-131.js",
+ "description": "Object.defineProperties - 'descObj' is a Date object which implements its own [[Get]] method to get 'value' property (8.10.5 step 5.a)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n var descObj = new Date();\n\n descObj.value = \"Date\";\n\n Object.defineProperties(obj, {\n property: descObj\n });\n\n return obj.property === \"Date\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-5-b-132",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-132.js",
+ "description": "Object.defineProperties - 'descObj' is a RegExp object which implements its own [[Get]] method to get 'value' property (8.10.5 step 5.a)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n var descObj = new RegExp();\n\n descObj.value = \"RegExp\";\n\n Object.defineProperties(obj, {\n property: descObj\n });\n\n return obj.property === \"RegExp\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-5-b-133",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-133.js",
+ "description": "Object.defineProperties - 'descObj' is the JSON object which implements its own [[Get]] method to get 'value' property (8.10.5 step 5.a)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n try {\n JSON.value = \"JSON\";\n\n Object.defineProperties(obj, {\n property: JSON\n });\n\n return obj.property === \"JSON\";\n } finally {\n delete JSON.value;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-5-b-134",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-134.js",
+ "description": "Object.defineProperties - 'descObj' is an Error object which implements its own [[Get]] method to get 'value' property (8.10.5 step 5.a)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n var descObj = new Error();\n\n descObj.value = \"Error\";\n\n Object.defineProperties(obj, {\n property: descObj\n });\n\n return obj.property === \"Error\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-5-b-135",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-135.js",
+ "description": "Object.defineProperties - 'descObj' is the Arguments object which implements its own [[Get]] method to get 'value' property (8.10.5 step 5.a)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n var func = function (a, b) {\n arguments.value = \"arguments\";\n\n Object.defineProperties(obj, {\n property: arguments\n });\n\n return obj.property === \"arguments\";\n };\n\n return func();\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-5-b-137",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-137.js",
+ "description": "Object.defineProperties - 'descObj' is the global object which implements its own [[Get]] method to get 'value' property (8.10.5 step 5.a)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n try {\n fnGlobalObject().value = \"global\";\n\n Object.defineProperties(obj, {\n property: fnGlobalObject()\n });\n\n return obj.property === \"global\";\n } finally {\n delete fnGlobalObject().value;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-5-b-138",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-138.js",
+ "description": "Object.defineProperties - 'writable' property of 'descObj' is present (8.10.5 step 6)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n Object.defineProperties(obj, {\n property: {\n writable: false\n }\n });\n\n obj.property = \"isWritable\";\n\n return obj.hasOwnProperty(\"property\") && typeof (obj.property) === \"undefined\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-5-b-139",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-139.js",
+ "description": "Object.defineProperties - 'writable' property of 'descObj' is not present (8.10.5 step 6)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n Object.defineProperties(obj, {\n property: {\n value: \"abc\"\n }\n });\n\n obj.property = \"isWritable\";\n\n return obj.property === \"abc\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-5-b-14",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-14.js",
+ "description": "Object.defineProperties - 'enumerable' property of 'descObj' is own accessor property that overrides an inherited data property (8.10.5 step 3.a)",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n var accessed = false;\n var proto = {\n enumerable: true\n };\n\n var Con = function () { };\n Con.prototype = proto;\n var descObj = new Con();\n\n Object.defineProperty(descObj, \"enumerable\", {\n get: function () {\n return false;\n }\n });\n\n Object.defineProperties(obj, {\n prop: descObj\n });\n for (var property in obj) {\n if (property === \"prop\") {\n accessed = true;\n }\n }\n return !accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.7-5-b-140",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-140.js",
+ "description": "Object.defineProperties - 'writable' property of 'descObj' is own data property (8.10.5 step 6.a)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n Object.defineProperties(obj, {\n property: {\n writable: false\n }\n });\n\n obj.property = \"isWritable\";\n\n return obj.hasOwnProperty(\"property\") && typeof (obj.property) === \"undefined\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-5-b-141",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-141.js",
+ "description": "Object.defineProperties - 'writable' property of 'descObj' is inherited data property (8.10.5 step 6.a)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n var proto = {\n writable: false\n };\n\n var Con = function () { };\n Con.prototype = proto;\n\n var descObj = new Con();\n\n Object.defineProperties(obj, {\n property: descObj\n });\n\n obj.property = \"isWritable\";\n\n return obj.hasOwnProperty(\"property\") && typeof (obj.property) === \"undefined\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-5-b-142",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-142.js",
+ "description": "Object.defineProperties - 'writable' property of 'descObj' is own data property that overrides an inherited data property (8.10.5 step 6.a)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n var proto = {\n writable: true\n };\n\n var Con = function () { };\n Con.prototype = proto;\n\n var descObj = new Con();\n\n descObj.writable = false;\n\n Object.defineProperties(obj, {\n property: descObj\n });\n\n obj.property = \"isWritable\";\n\n return obj.hasOwnProperty(\"property\") && typeof (obj.property) === \"undefined\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-5-b-143",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-143.js",
+ "description": "Object.defineProperties - 'writable' property of 'descObj' is own data property that overrides an inherited accessor property (8.10.5 step 6.a)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n var proto = { value: 120 };\n\n Object.defineProperty(proto, \"writable\", {\n get: function () {\n return true;\n }\n });\n\n var Con = function () { };\n Con.prototype = proto;\n\n var descObj = new Con();\n\n Object.defineProperty(descObj, \"writable\", {\n value: false\n });\n\n Object.defineProperties(obj, {\n property: descObj\n });\n\n obj.property = \"isWritable\";\n\n return obj.hasOwnProperty(\"property\") && obj.property === 120;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.7-5-b-144",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-144.js",
+ "description": "Object.defineProperties - 'writable' property of 'descObj' is own accessor property (8.10.5 step 6.a)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n var descObj = {};\n\n Object.defineProperty(descObj, \"writable\", {\n get: function () {\n return false;\n }\n });\n\n Object.defineProperties(obj, {\n property: descObj\n });\n\n obj.property = \"isWritable\";\n\n return obj.hasOwnProperty(\"property\") && typeof (obj.property) === \"undefined\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.7-5-b-145",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-145.js",
+ "description": "Object.defineProperties - 'writable' property of 'descObj' is inherited accessor property (8.10.5 step 6.a)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n var proto = {};\n\n Object.defineProperty(proto, \"writable\", {\n get: function () {\n return true;\n }\n });\n\n var Con = function () { };\n Con.prototype = proto;\n\n var descObj = new Con();\n\n Object.defineProperties(obj, {\n property: descObj\n });\n\n obj.property = \"isWritable\";\n\n return obj.hasOwnProperty(\"property\") && obj.property === \"isWritable\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.7-5-b-146",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-146.js",
+ "description": "Object.defineProperties - 'writable' property of 'descObj' is own accessor property that overrides an inherited data property (8.10.5 step 6.a)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n var proto = {\n writable: true\n };\n\n var Con = function () { };\n Con.prototype = proto;\n\n var descObj = new Con();\n\n Object.defineProperty(descObj, \"writable\", {\n get: function () {\n return false;\n }\n });\n\n Object.defineProperties(obj, {\n property: descObj\n });\n\n obj.property = \"isWritable\";\n\n return obj.hasOwnProperty(\"property\") && typeof (obj.property) === \"undefined\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.7-5-b-147",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-147.js",
+ "description": "Object.defineProperties - 'writable' property of 'descObj' is own accessor property that overrides an inherited accessor property (8.10.5 step 6.a)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n var proto = {};\n\n Object.defineProperty(proto, \"writable\", {\n get: function () {\n return true;\n }\n });\n\n var Con = function () { };\n Con.prototype = proto;\n\n var descObj = new Con();\n\n Object.defineProperty(descObj, \"writable\", {\n get: function () {\n return false;\n }\n });\n\n Object.defineProperties(obj, {\n property: descObj\n });\n\n obj.property = \"isWritable\";\n\n return obj.hasOwnProperty(\"property\") && typeof (obj.property) === \"undefined\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.7-5-b-148",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-148.js",
+ "description": "Object.defineProperties - 'writable' property of 'descObj' is own accessor property without a get function (8.10.5 step 6.a)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n var descObj = {};\n\n Object.defineProperty(descObj, \"writable\", {\n set: function () { }\n });\n\n Object.defineProperties(obj, {\n property: descObj\n });\n\n obj.property = \"isWritable\";\n\n return obj.hasOwnProperty(\"property\") && typeof (obj.property) === \"undefined\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.7-5-b-149",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-149.js",
+ "description": "Object.defineProperties - 'writable' property of 'descObj' is own accessor property without a get function that overrides an inherited accessor property (8.10.5 step 6.a)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n var proto = {};\n\n Object.defineProperty(proto, \"writable\", {\n get: function () {\n return true;\n }\n });\n\n var Con = function () { };\n Con.prototype = proto;\n\n var descObj = new Con();\n\n Object.defineProperty(descObj, \"writable\", {\n set: function () { }\n });\n\n Object.defineProperties(obj, {\n property: descObj\n });\n\n obj.property = \"isWritable\";\n\n return obj.hasOwnProperty(\"property\") && typeof (obj.property) === \"undefined\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.7-5-b-15",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-15.js",
+ "description": "Object.defineProperties - 'enumerable' property of 'descObj' is own accessor property that overrides an inherited accessor property (8.10.5 step 3.a)",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n var proto = {};\n var accessed = false;\n Object.defineProperty(proto, \"enumerable\", {\n get: function () {\n return true;\n }\n });\n\n var Con = function () { };\n Con.prototype = proto;\n var descObj = new Con();\n\n Object.defineProperty(descObj, \"enumerable\", {\n get: function () {\n return false;\n }\n });\n\n Object.defineProperties(obj, {\n prop: descObj\n });\n for (var property in obj) {\n if (property === \"prop\") {\n accessed = true;\n }\n }\n return !accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.7-5-b-150",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-150.js",
+ "description": "Object.defineProperties - 'writable' property of 'descObj' is inherited accessor property without a get function (8.10.5 step 6.a)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n var proto = {};\n\n Object.defineProperty(proto, \"writable\", {\n set: function () { }\n });\n\n var Con = function () { };\n Con.prototype = proto;\n\n var descObj = new Con();\n\n Object.defineProperties(obj, {\n property: descObj\n });\n\n obj.property = \"isWritable\";\n\n return obj.hasOwnProperty(\"property\") && typeof (obj.property) === \"undefined\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.7-5-b-151",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-151.js",
+ "description": "Object.defineProperties - 'descObj' is a Function object which implements its own [[Get]] method to get 'writable' property (8.10.5 step 6.a)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n var func = function (a, b) {\n return a + b;\n };\n\n func.writable = false;\n\n Object.defineProperties(obj, {\n property: func\n });\n\n obj.property = \"isWritable\";\n\n return obj.hasOwnProperty(\"property\") && typeof (obj.property) === \"undefined\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-5-b-152",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-152.js",
+ "description": "Object.defineProperties - 'descObj' is an Array object which implements its own [[Get]] method to get 'writable' property (8.10.5 step 6.a)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n var arr = [1, 2, 3];\n\n arr.writable = false;\n\n Object.defineProperties(obj, {\n property: arr\n });\n\n obj.property = \"isWritable\";\n\n return obj.hasOwnProperty(\"property\") && typeof (obj.property) === \"undefined\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-5-b-153",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-153.js",
+ "description": "Object.defineProperties - 'descObj' is a String object which implements its own [[Get]] method to get 'writable' property (8.10.5 step 6.a)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n var str = new String(\"abc\");\n\n str.writable = false;\n\n Object.defineProperties(obj, {\n property: str\n });\n\n obj.property = \"isWritable\";\n\n return obj.hasOwnProperty(\"property\") && typeof (obj.property) === \"undefined\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-5-b-154",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-154.js",
+ "description": "Object.defineProperties - 'descObj' is a Boolean object which implements its own [[Get]] method to get 'writable' property (8.10.5 step 6.a)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n var descObj = new Boolean(false);\n\n descObj.writable = false;\n\n Object.defineProperties(obj, {\n property: descObj\n });\n\n obj.property = \"isWritable\";\n\n return obj.hasOwnProperty(\"property\") && typeof (obj.property) === \"undefined\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-5-b-155",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-155.js",
+ "description": "Object.defineProperties - 'descObj' is a Number object which implements its own [[Get]] method to get 'writable' property (8.10.5 step 6.a)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n var descObj = new Number(-9);\n\n descObj.writable = false;\n\n Object.defineProperties(obj, {\n property: descObj\n });\n\n obj.property = \"isWritable\";\n\n return obj.hasOwnProperty(\"property\") && typeof (obj.property) === \"undefined\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-5-b-156",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-156.js",
+ "description": "Object.defineProperties - 'descObj' is the Math object which implements its own [[Get]] method to get 'writable' property (8.10.5 step 6.a)",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n\n try {\n Math.writable = false;\n\n Object.defineProperties(obj, {\n property: Math\n });\n\n obj.property = \"isWritable\";\n\n return obj.hasOwnProperty(\"property\") && typeof (obj.property) === \"undefined\";\n } finally {\n delete Math.writable;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-5-b-157",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-157.js",
+ "description": "Object.defineProperties - 'descObj' is a Date object which implements its own [[Get]] method to get 'writable' property (8.10.5 step 6.a)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n var descObj = new Date();\n\n descObj.writable = false;\n\n Object.defineProperties(obj, {\n property: descObj\n });\n\n obj.property = \"isWritable\";\n\n return obj.hasOwnProperty(\"property\") && typeof (obj.property) === \"undefined\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-5-b-158",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-158.js",
+ "description": "Object.defineProperties - 'descObj' is a RegExp object which implements its own [[Get]] method to get 'writable' property (8.10.5 step 6.a)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n var descObj = new RegExp();\n\n descObj.writable = false;\n\n Object.defineProperties(obj, {\n property: descObj\n });\n\n obj.property = \"isWritable\";\n\n return obj.hasOwnProperty(\"property\") && typeof (obj.property) === \"undefined\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-5-b-159",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-159.js",
+ "description": "Object.defineProperties - 'descObj' is the JSON object which implements its own [[Get]] method to get 'writable' property (8.10.5 step 6.a)",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n\n try {\n JSON.writable = false;\n\n Object.defineProperties(obj, {\n property: JSON\n });\n\n obj.property = \"isWritable\";\n\n return obj.hasOwnProperty(\"property\") && typeof (obj.property) === \"undefined\";\n } finally {\n delete JSON.writable;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-5-b-16",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-16.js",
+ "description": "Object.defineProperties - 'enumerable' property of 'descObj' is own accessor property without a get function (8.10.5 step 3.a)",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n var accessed = false;\n var descObj = {};\n\n Object.defineProperty(descObj, \"enumerable\", {\n set: function () { }\n });\n\n Object.defineProperties(obj, {\n prop: descObj\n });\n for (var property in obj) {\n if (property === \"prop\") {\n accessed = true;\n }\n }\n return !accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.7-5-b-160",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-160.js",
+ "description": "Object.defineProperties - 'descObj' is an Error object which implements its own [[Get]] method to get 'writable' property (8.10.5 step 6.a)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n var descObj = new Error();\n\n descObj.writable = false;\n\n Object.defineProperties(obj, {\n property: descObj\n });\n\n obj.property = \"isWritable\";\n\n return obj.hasOwnProperty(\"property\") && typeof (obj.property) === \"undefined\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-5-b-161",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-161.js",
+ "description": "Object.defineProperties - 'descObj' is the Arguments object which implements its own [[Get]] method to get 'writable' property (8.10.5 step 6.a)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n var func = function (a, b) {\n arguments.writable = false;\n\n Object.defineProperties(obj, {\n property: arguments\n });\n\n obj.property = \"isWritable\";\n\n return obj.hasOwnProperty(\"property\") && typeof (obj.property) === \"undefined\";\n };\n\n return func();\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-5-b-163",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-163.js",
+ "description": "Object.defineProperties - 'descObj' is the global object which implements its own [[Get]] method to get 'writable' property (8.10.5 step 6.a)",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n\n try {\n fnGlobalObject().writable = false;\n\n Object.defineProperties(obj, {\n property: fnGlobalObject()\n });\n\n obj.property = \"isWritable\";\n\n return obj.hasOwnProperty(\"property\") && typeof (obj.property) === \"undefined\";\n } finally {\n delete fnGlobalObject().writable;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-5-b-164",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-164.js",
+ "description": "Object.defineProperties - value of 'writable' property of 'descObj' is undefined (8.10.5 step 6.b)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n Object.defineProperties(obj, {\n property: {\n writable: undefined\n }\n });\n\n obj.property = \"isWritable\";\n\n return obj.hasOwnProperty(\"property\") && typeof (obj.property) === \"undefined\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-5-b-165",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-165.js",
+ "description": "Object.defineProperties - value of 'writable' property of 'descObj' is null (8.10.5 step 6.b)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n Object.defineProperties(obj, {\n property: {\n writable: null\n }\n });\n\n obj.property = \"isWritable\";\n\n return obj.hasOwnProperty(\"property\") && typeof (obj.property) === \"undefined\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-5-b-166",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-166.js",
+ "description": "Object.defineProperties - value of 'writable' property of 'descObj' is true (8.10.5 step 6.b)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n Object.defineProperties(obj, {\n property: {\n writable: true\n }\n });\n\n obj.property = \"isWritable\";\n\n return obj.property === \"isWritable\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-5-b-167",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-167.js",
+ "description": "Object.defineProperties - value of 'writable' property of 'descObj' is false (8.10.5 step 6.b)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n Object.defineProperties(obj, {\n property: {\n writable: false\n }\n });\n\n obj.property = \"isWritable\";\n\n return obj.hasOwnProperty(\"property\") && typeof (obj.property) === \"undefined\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-5-b-168",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-168.js",
+ "description": "Object.defineProperties - value of 'writable' property of 'descObj' is 0 (8.10.5 step 6.b)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n Object.defineProperties(obj, {\n property: {\n writable: 0\n }\n });\n\n obj.property = \"isWritable\";\n\n return obj.hasOwnProperty(\"property\") && typeof (obj.property) === \"undefined\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-5-b-169",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-169.js",
+ "description": "Object.defineProperties - value of 'writable' property of 'descObj' is +0 (8.10.5 step 6.b)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n Object.defineProperties(obj, {\n property: {\n writable: +0\n }\n });\n\n obj.property = \"isWritable\";\n\n return obj.hasOwnProperty(\"property\") && typeof (obj.property) === \"undefined\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-5-b-17",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-17.js",
+ "description": "Object.defineProperties - 'enumerable' property of 'descObj' is own accessor property without a get function that overrides an inherited accessor property (8.10.5 step 3.a)",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n var proto = {};\n var accessed = false;\n Object.defineProperty(proto, \"enumerable\", {\n get: function () {\n return false;\n }\n });\n\n var Con = function () { };\n Con.prototype = proto;\n var descObj = new Con();\n\n Object.defineProperty(descObj, \"enumerable\", {\n set: function () { }\n });\n\n Object.defineProperties(obj, {\n prop: descObj\n });\n for (var property in obj) {\n if (property === \"prop\") {\n accessed = true;\n }\n }\n return !accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.7-5-b-170",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-170.js",
+ "description": "Object.defineProperties - value of 'writable' property of 'descObj' is -0 (8.10.5 step 6.b)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n Object.defineProperties(obj, {\n property: {\n writable: -0\n }\n });\n\n obj.property = \"isWritable\";\n\n return obj.hasOwnProperty(\"property\") && typeof (obj.property) === \"undefined\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-5-b-171",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-171.js",
+ "description": "Object.defineProperties - value of 'writable' property of 'descObj' is NaN (8.10.5 step 6.b)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n Object.defineProperties(obj, {\n property: {\n writable: NaN\n }\n });\n\n obj.property = \"isWritable\";\n\n return obj.hasOwnProperty(\"property\") && typeof (obj.property) === \"undefined\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-5-b-172",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-172.js",
+ "description": "Object.defineProperties - value of 'writable' property of 'descObj' is positive number (8.10.5 step 6.b)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n Object.defineProperties(obj, {\n property: {\n writable: 123\n }\n });\n\n obj.property = \"isWritable\";\n\n return obj.property === \"isWritable\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-5-b-173",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-173.js",
+ "description": "Object.defineProperties - value of 'writable' property of 'descObj' is negative number (8.10.5 step 6.b)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n Object.defineProperties(obj, {\n property: {\n writable: -123\n }\n });\n\n obj.property = \"isWritable\";\n\n return obj.property === \"isWritable\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-5-b-174",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-174.js",
+ "description": "Object.defineProperties - value of 'writable' property of 'descObj' is empty string (8.10.5 step 6.b)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n Object.defineProperties(obj, {\n property: {\n writable: \"\"\n }\n });\n\n obj.property = \"isWritable\";\n\n return obj.hasOwnProperty(\"property\") && typeof (obj.property) === \"undefined\";\n\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-5-b-175",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-175.js",
+ "description": "Object.defineProperties - value of 'writable' property of 'descObj' is non-empty string (8.10.5 step 6.b)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n Object.defineProperties(obj, {\n property: {\n writable: \"abc\"\n }\n });\n\n obj.property = \"isWritable\";\n\n return obj.property === \"isWritable\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-5-b-176",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-176.js",
+ "description": "Object.defineProperties - value of 'writable' property of 'descObj' is Function object (8.10.5 step 6.b)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n Object.defineProperties(obj, {\n property: {\n writable: function () { }\n }\n });\n\n obj.property = \"isWritable\";\n\n return obj.property === \"isWritable\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-5-b-177",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-177.js",
+ "description": "Object.defineProperties - value of 'writable' property of 'descObj' is Array object (8.10.5 step 6.b)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n Object.defineProperties(obj, {\n property: {\n writable: []\n }\n });\n\n obj.property = \"isWritable\";\n\n return obj.property === \"isWritable\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-5-b-178",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-178.js",
+ "description": "Object.defineProperties - value of 'writable' property of 'descObj' is String object (8.10.5 step 6.b)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n Object.defineProperties(obj, {\n property: {\n writable: new String(\"abc\")\n }\n });\n\n obj.property = \"isWritable\";\n\n return obj.property === \"isWritable\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-5-b-179",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-179.js",
+ "description": "Object.defineProperties - value of 'writable' property of 'descObj' is Boolean object (8.10.5 step 6.b)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n Object.defineProperties(obj, {\n property: {\n writable: new Boolean(true)\n }\n });\n\n obj.property = \"isWritable\";\n\n return obj.property === \"isWritable\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-5-b-18",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-18.js",
+ "description": "Object.defineProperties - 'enumerable' property of 'descObj' is inherited accessor property without a get function (8.10.5 step 3.a)",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n var proto = {};\n var accessed = false;\n\n Object.defineProperty(proto, \"enumerable\", {\n set: function () { }\n });\n\n var Con = function () { };\n Con.prototype = proto;\n var descObj = new Con();\n\n Object.defineProperties(obj, {\n prop: descObj\n });\n for (var property in obj) {\n if (property === \"prop\") {\n accessed = true;\n }\n }\n return !accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.7-5-b-180",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-180.js",
+ "description": "Object.defineProperties - value of 'writable' property of 'descObj' is Number object (8.10.5 step 6.b)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n Object.defineProperties(obj, {\n property: {\n writable: new Number(123)\n }\n });\n\n obj.property = \"isWritable\";\n\n return obj.property === \"isWritable\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-5-b-181",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-181.js",
+ "description": "Object.defineProperties - value of 'writable' property of 'descObj' is the Math object (8.10.5 step 6.b)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n Object.defineProperties(obj, {\n property: {\n writable: Math\n }\n });\n\n obj.property = \"isWritable\";\n\n return obj.property === \"isWritable\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-5-b-182",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-182.js",
+ "description": "Object.defineProperties - value of 'writable' property of 'descObj' is Date object (8.10.5 step 6.b)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n Object.defineProperties(obj, {\n property: {\n writable: new Date()\n }\n });\n\n obj.property = \"isWritable\";\n\n return obj.property === \"isWritable\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-5-b-183",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-183.js",
+ "description": "Object.defineProperties - value of 'writable' property of 'descObj' is RegExp object (8.10.5 step 6.b)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n Object.defineProperties(obj, {\n property: {\n writable: new RegExp()\n }\n });\n\n obj.property = \"isWritable\";\n\n return obj.property === \"isWritable\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-5-b-184",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-184.js",
+ "description": "Object.defineProperties - value of 'writable' property of 'descObj' is the JSON object (8.10.5 step 6.b)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n Object.defineProperties(obj, {\n property: {\n writable: JSON\n }\n });\n\n obj.property = \"isWritable\";\n\n return obj.property === \"isWritable\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-5-b-185",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-185.js",
+ "description": "Object.defineProperties - value of 'writable' property of 'descObj' is Error object (8.10.5 step 6.b)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n Object.defineProperties(obj, {\n property: {\n writable: new SyntaxError()\n }\n });\n\n obj.property = \"isWritable\";\n\n return obj.property === \"isWritable\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-5-b-186",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-186.js",
+ "description": "Object.defineProperties - value of 'writable' property of 'descObj' is the Argument object (8.10.5 step 6.b)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n var func = function (a, b, c) {\n return arguments;\n };\n\n Object.defineProperties(obj, {\n property: {\n writable: func(1, true, \"a\")\n }\n });\n\n obj.property = \"isWritable\";\n\n return obj.property === \"isWritable\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-5-b-188",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-188.js",
+ "description": "Object.defineProperties - value of 'writable' property of 'descObj' is the global object (8.10.5 step 6.b)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n Object.defineProperties(obj, {\n property: {\n writable: fnGlobalObject()\n }\n });\n\n obj.property = \"isWritable\";\n\n return obj.property === \"isWritable\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-5-b-189",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-189.js",
+ "description": "Object.defineProperties - value of 'writable' property of 'descObj' is a string (value is 'false') which is treated as true value (8.10.5 step 6.b)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n Object.defineProperties(obj, {\n property: {\n writable: \"false\"\n }\n });\n\n obj.property = \"isWritable\";\n\n return obj.property === \"isWritable\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-5-b-19",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-19.js",
+ "description": "Object.defineProperties - 'descObj' is a Function object which implements its own [[Get]] method to get 'enumerable' property (8.10.5 step 3.a)",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n var descObj = function () { };\n var accessed = false;\n\n descObj.enumerable = true;\n\n Object.defineProperties(obj, {\n prop: descObj\n });\n for (var property in obj) {\n if (property === \"prop\") {\n accessed = true;\n }\n }\n return accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-5-b-190",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-190.js",
+ "description": "Object.defineProperties - value of 'writable' property of 'descObj' is new Boolean(false) which is treated as true value (8.10.5 step 6.b)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n Object.defineProperties(obj, {\n property: {\n writable: new Boolean(false)\n }\n });\n\n obj.property = \"isWritable\";\n\n return obj.property === \"isWritable\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-5-b-191",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-191.js",
+ "description": "Object.defineProperties - 'get' property of 'descObj' is present (8.10.5 step 7)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n var getter = function () {\n return \"present\";\n };\n\n Object.defineProperties(obj, {\n property: {\n get: getter\n }\n });\n\n return obj.property === \"present\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-5-b-192",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-192.js",
+ "description": "Object.defineProperties - 'get' property of 'descObj' is not present (8.10.5 step 7)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n var setter = function () { };\n\n Object.defineProperties(obj, {\n property: {\n set: setter\n }\n });\n\n return obj.hasOwnProperty(\"property\") && typeof (obj.property) === \"undefined\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-5-b-193",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-193.js",
+ "description": "Object.defineProperties - 'get' property of 'descObj' is own data property (8.10.5 step 7.a)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n var getter = function () {\n return \"ownDataProperty\";\n };\n\n Object.defineProperties(obj, {\n property: {\n get: getter\n }\n });\n\n return obj.property === \"ownDataProperty\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-5-b-194",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-194.js",
+ "description": "Object.defineProperties - 'get' property of 'descObj' is inherited data property (8.10.5 step 7.a)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n var getter = function () {\n return \"inheritedDataProperty\";\n };\n\n var proto = {\n get: getter\n };\n\n var Con = function () { };\n Con.prototype = proto;\n\n var descObj = new Con();\n\n Object.defineProperties(obj, {\n property: descObj\n });\n\n return obj.property === \"inheritedDataProperty\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-5-b-195",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-195.js",
+ "description": "Object.defineProperties - 'get' property of 'descObj' is own data property that overrides an inherited data property (8.10.5 step 7.a)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n var getter = function () {\n return \"inheritedDataProperty\";\n };\n\n var proto = {\n get: getter\n };\n\n var Con = function () { };\n Con.prototype = proto;\n\n var descObj = new Con();\n\n descObj.get = function () {\n return \"ownDataProperty\";\n };\n\n Object.defineProperties(obj, {\n property: descObj\n });\n\n return obj.property === \"ownDataProperty\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-5-b-196",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-196.js",
+ "description": "Object.defineProperties - 'get' property of 'descObj' is own data property that overrides an inherited accessor property (8.10.5 step 7.a)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n var proto = {};\n\n Object.defineProperty(proto, \"get\", {\n get: function () {\n return function () {\n return \"inheritedAccessorProperty\";\n };\n }\n });\n\n var Con = function () { };\n Con.prototype = proto;\n\n var descObj = new Con();\n\n Object.defineProperty(descObj, \"get\", {\n value: function () {\n return \"ownDataProperty\";\n }\n });\n\n Object.defineProperties(obj, {\n property: descObj\n });\n\n return obj.property === \"ownDataProperty\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.7-5-b-197",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-197.js",
+ "description": "Object.defineProperties - 'get' property of 'descObj' is own accessor property (8.10.5 step 7.a)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n var descObj = {};\n\n Object.defineProperty(descObj, \"get\", {\n get: function () {\n return function () {\n return \"ownAccessorProperty\";\n };\n }\n });\n\n Object.defineProperties(obj, {\n property: descObj\n });\n\n return obj.property === \"ownAccessorProperty\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.7-5-b-198",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-198.js",
+ "description": "Object.defineProperties - 'get' property of 'descObj' is inherited accessor property (8.10.5 step 7.a)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n var proto = {};\n\n Object.defineProperty(proto, \"get\", {\n get: function () {\n return function () {\n return \"inheritedAccessorProperty\";\n };\n }\n });\n\n var Con = function () { };\n Con.prototype = proto;\n\n var descObj = new Con();\n\n Object.defineProperties(obj, {\n property: descObj\n });\n\n return obj.property === \"inheritedAccessorProperty\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.7-5-b-199",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-199.js",
+ "description": "Object.defineProperties - 'get' property of 'descObj' is own accessor property that overrides an inherited data property (8.10.5 step 7.a)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n var proto = {\n get: function () {\n return \"inheritedDataProperty\";\n }\n };\n\n var Con = function () { };\n Con.prototype = proto;\n\n var descObj = new Con();\n\n Object.defineProperty(descObj, \"get\", {\n get: function () {\n return function () {\n return \"ownAccessorProperty\";\n };\n }\n });\n\n Object.defineProperties(obj, {\n property: descObj\n });\n\n return obj.property === \"ownAccessorProperty\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.7-5-b-2",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-2.js",
+ "description": "Object.defineProperties - 'descObj' is null (8.10.5 step 1)",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n \n try {\n Object.defineProperties(obj, {\n prop: null\n });\n return false;\n } catch (e) {\n return e instanceof TypeError && !obj.hasOwnProperty(\"prop\"); ;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-5-b-20",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-20.js",
+ "description": "Object.defineProperties - 'descObj' is an Array object which implements its own [[Get]] method to get 'enumerable' property (8.10.5 step 3.a)",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n var accessed = false;\n var descObj = [];\n\n descObj.enumerable = true;\n\n Object.defineProperties(obj, {\n prop: descObj\n });\n for (var property in obj) {\n if (property === \"prop\") {\n accessed = true;\n }\n }\n return accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-5-b-200",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-200.js",
+ "description": "Object.defineProperties - 'get' property of 'descObj' is own accessor property that overrides an inherited accessor property (8.10.5 step 7.a)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n var proto = {};\n\n Object.defineProperty(proto, \"get\", {\n get: function () {\n return function () {\n return \"inheritedAccessorProperty\";\n };\n }\n });\n\n var Con = function () { };\n Con.prototype = proto;\n\n var descObj = new Con();\n\n Object.defineProperty(descObj, \"get\", {\n get: function () {\n return function () {\n return \"ownAccessorProperty\";\n };\n }\n });\n\n Object.defineProperties(obj, {\n property: descObj\n });\n\n return obj.property === \"ownAccessorProperty\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.7-5-b-201",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-201.js",
+ "description": "Object.defineProperties - 'get' property of 'descObj' is own accessor property without a get function (8.10.5 step 7.a)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n var descObj = {};\n\n Object.defineProperty(descObj, \"get\", {\n set: function () { }\n });\n\n Object.defineProperties(obj, {\n property: descObj\n });\n\n return typeof (obj.property) === \"undefined\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.7-5-b-202",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-202.js",
+ "description": "Object.defineProperties - 'get' property of 'descObj' is own accessor property without a get function that overrides an inherited accessor property (8.10.5 step 7.a)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n var proto = {};\n\n Object.defineProperty(proto, \"get\", {\n get: function () {\n return function () {\n return \"inheritedAccessorProperty\";\n };\n }\n });\n\n var Con = function () { };\n Con.prototype = proto;\n\n var descObj = new Con();\n\n Object.defineProperty(descObj, \"get\", {\n set: function () { }\n });\n\n Object.defineProperties(obj, {\n property: descObj\n });\n\n return typeof (obj.property) === \"undefined\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.7-5-b-203",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-203.js",
+ "description": "Object.defineProperties - 'get' property of 'descObj' is inherited accessor property without a get function (8.10.5 step 7.a)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n var proto = {};\n\n Object.defineProperty(proto, \"get\", {\n set: function () { }\n });\n\n var Con = function () { };\n Con.prototype = proto;\n\n var descObj = new Con();\n\n Object.defineProperties(obj, {\n property: descObj\n });\n\n return typeof (obj.property) === \"undefined\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.7-5-b-204",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-204.js",
+ "description": "Object.defineProperties - 'descObj' is a Function object which implements its own [[Get]] method to get 'get' property (8.10.5 step 7.a)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n var func = function (a, b) {\n return a + b;\n };\n\n func.get = function () {\n return \"Function\";\n };\n\n Object.defineProperties(obj, {\n property: func\n });\n\n return obj.property === \"Function\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-5-b-205",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-205.js",
+ "description": "Object.defineProperties - 'descObj' is an Array object which implements its own [[Get]] method to get 'get' property (8.10.5 step 7.a)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n var arr = [];\n\n arr.get = function () {\n return \"Array\";\n };\n\n Object.defineProperties(obj, {\n property: arr\n });\n\n return obj.property === \"Array\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-5-b-206",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-206.js",
+ "description": "Object.defineProperties - 'descObj' is a String object which implements its own [[Get]] method to get 'get' property (8.10.5 step 7.a)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n var str = new String(\"abc\");\n\n str.get = function () {\n return \"string Object\";\n };\n\n Object.defineProperties(obj, {\n property: str\n });\n\n return obj.property === \"string Object\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-5-b-207",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-207.js",
+ "description": "Object.defineProperties - 'descObj' is a Boolean object which implements its own [[Get]] method to get 'get' property (8.10.5 step 7.a)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n var descObj = new Boolean(false);\n\n descObj.get = function () {\n return \"Boolean\";\n };\n\n Object.defineProperties(obj, {\n property: descObj\n });\n\n return obj.property === \"Boolean\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-5-b-208",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-208.js",
+ "description": "Object.defineProperties - 'descObj' is a Number object which implements its own [[Get]] method to get 'get' property (8.10.5 step 7.a)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n var descObj = new Number(-9);\n\n descObj.get = function () {\n return \"Number\";\n };\n\n Object.defineProperties(obj, {\n property: descObj\n });\n\n return obj.property === \"Number\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-5-b-209",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-209.js",
+ "description": "Object.defineProperties - 'descObj' is the Math object which implements its own [[Get]] method to get 'get' property (8.10.5 step 7.a)",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n\n try {\n Math.get = function () {\n return \"Math\";\n };\n\n Object.defineProperties(obj, {\n property: Math\n });\n\n return obj.property === \"Math\";\n } finally {\n delete Math.get;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-5-b-21",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-21.js",
+ "description": "Object.defineProperties - 'descObj' is a String object which implements its own [[Get]] method to get 'enumerable' property (8.10.5 step 3.a)",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n var descObj = new String();\n var accessed = false;\n descObj.enumerable = true;\n\n Object.defineProperties(obj, {\n prop: descObj\n });\n for (var property in obj) {\n if (property === \"prop\") {\n accessed = true;\n }\n }\n return accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-5-b-210",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-210.js",
+ "description": "Object.defineProperties - 'descObj' is a Date object which implements its own [[Get]] method to get 'get' property (8.10.5 step 7.a)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n var descObj = new Date();\n\n descObj.get = function () {\n return \"Date\";\n };\n\n Object.defineProperties(obj, {\n property: descObj\n });\n\n return obj.property === \"Date\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-5-b-211",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-211.js",
+ "description": "Object.defineProperties - 'descObj' is a RegExp object which implements its own [[Get]] method to get 'get' property (8.10.5 step 7.a)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n var descObj = new RegExp();\n\n descObj.get = function () {\n return \"RegExp\";\n };\n\n Object.defineProperties(obj, {\n property: descObj\n });\n\n return obj.property === \"RegExp\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-5-b-212",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-212.js",
+ "description": "Object.defineProperties - 'descObj' is the JSON object which implements its own [[Get]] method to get 'get' property (8.10.5 step 7.a)",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n\n try {\n JSON.get = function () {\n return \"JSON\";\n };\n\n Object.defineProperties(obj, {\n property: JSON\n });\n\n return obj.property === \"JSON\";\n } finally {\n delete JSON.get;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-5-b-213",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-213.js",
+ "description": "Object.defineProperties - 'descObj' is an Error object which implements its own [[Get]] method to get 'get' property (8.10.5 step 7.a)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n var descObj = new Error();\n\n descObj.get = function () {\n return \"Error\";\n };\n\n Object.defineProperties(obj, {\n property: descObj\n });\n\n return obj.property === \"Error\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-5-b-214",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-214.js",
+ "description": "Object.defineProperties - 'descObj' is the Arguments object which implements its own [[Get]] method to get 'get' property (8.10.5 step 7.a)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n var func = function (a, b) {\n arguments.get = function () {\n return \"arguments\";\n };\n\n Object.defineProperties(obj, {\n property: arguments\n });\n\n return obj.property === \"arguments\";\n };\n\n return func();\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-5-b-216",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-216.js",
+ "description": "Object.defineProperties - 'descObj' is the global object which implements its own [[Get]] method to get 'get' property (8.10.5 step 7.a)",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n\n try {\n fnGlobalObject().get = function () {\n return \"global\";\n };\n\n Object.defineProperties(obj, {\n property: fnGlobalObject()\n });\n\n return obj.property === \"global\";\n } finally {\n delete fnGlobalObject().get;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-5-b-217",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-217.js",
+ "description": "Object.defineProperties - value of 'get' property of 'descObj' is undefined (8.10.5 step 7.b)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n Object.defineProperties(obj, {\n property: {\n get: undefined\n }\n });\n\n return obj.hasOwnProperty(\"property\") && typeof obj.property === \"undefined\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-5-b-218",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-218.js",
+ "description": "Object.defineProperties - value of 'get' property of 'descObj' is primitive values( value is null) (8.10.5 step 7.b)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n try {\n Object.defineProperties(obj, {\n property: {\n get: null\n }\n });\n\n return false;\n } catch (e) {\n return (e instanceof TypeError);\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-5-b-219",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-219.js",
+ "description": "Object.defineProperties - value of 'get' property of 'descObj' is primitive values( value is boolean) (8.10.5 step 7.b)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n try {\n Object.defineProperties(obj, {\n property: {\n get: false\n }\n });\n\n return false;\n } catch (e) {\n return (e instanceof TypeError);\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-5-b-22",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-22.js",
+ "description": "Object.defineProperties - 'descObj' is a Boolean object which implements its own [[Get]] method to get 'enumerable' property (8.10.5 step 3.a)",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n var descObj = new Boolean(false);\n var accessed = false;\n\n descObj.enumerable = true;\n\n Object.defineProperties(obj, {\n prop: descObj\n });\n for (var property in obj) {\n if (property === \"prop\") {\n accessed = true;\n }\n }\n return accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-5-b-220",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-220.js",
+ "description": "Object.defineProperties - value of 'get' property of 'descObj' is primitive values( value is number) (8.10.5 step 7.b)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n try {\n Object.defineProperties(obj, {\n property: {\n get: 123\n }\n });\n\n return false;\n } catch (e) {\n return (e instanceof TypeError);\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-5-b-221",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-221.js",
+ "description": "Object.defineProperties - value of 'get' property of 'descObj' is primitive values( value is string) (8.10.5 step 7.b)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n try {\n Object.defineProperties(obj, {\n property: {\n get: \"string\"\n }\n });\n\n return false;\n } catch (e) {\n return (e instanceof TypeError);\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-5-b-222",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-222.js",
+ "description": "Object.defineProperties - value of 'get' property of 'descObj' is applied to Array object (8.10.5 step 7.b)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n try {\n Object.defineProperties(obj, {\n property: {\n get: []\n }\n });\n\n return false;\n } catch (e) {\n return (e instanceof TypeError);\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-5-b-223",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-223.js",
+ "description": "Object.defineProperties - value of 'get' property of 'descObj' is a function (8.10.5 step 7.b)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n var getter = function () {\n return 100;\n };\n\n Object.defineProperties(obj, {\n property: {\n get: getter\n }\n });\n\n return obj.property === 100;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-5-b-226",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-226.js",
+ "description": "Object.defineProperties - 'set' property of 'descObj' is present (8.10.5 step 8)",
+ "test": "assertTrue((function testcase() {\n var data = \"data\";\n var obj = {};\n\n Object.defineProperties(obj, {\n \"prop\": {\n set: function (value) {\n data = value;\n }\n }\n });\n\n obj.prop = \"overrideData\";\n\n return obj.hasOwnProperty(\"prop\") && data === \"overrideData\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-5-b-227",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-227.js",
+ "description": "Object.defineProperties - 'set' property of 'descObj' is not present (8.10.5 step 8)",
+ "test": "assertTrue((function testcase() {\n var data = \"data\";\n var obj = {};\n\n try {\n Object.defineProperties(obj, {\n descObj: {\n get: function () {\n return data;\n }\n }\n });\n\n\n obj.descObj = \"overrideData\";\n\n var desc = Object.getOwnPropertyDescriptor(obj, \"descObj\");\n return obj.hasOwnProperty(\"descObj\") && typeof (desc.set) === \"undefined\" && data === \"data\";\n } catch (e) {\n return false;\n }\n\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.7-5-b-228",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-228.js",
+ "description": "Object.defineProperties - 'set' property of 'descObj' is own data property (8.10.5 step 8.a)",
+ "test": "assertTrue((function testcase() {\n var data = \"data\";\n var obj = {};\n\n Object.defineProperties(obj, {\n descObj: {\n set: function (value) {\n data = value;\n }\n }\n });\n\n obj.descObj = \"overrideData\";\n\n return obj.hasOwnProperty(\"descObj\") && data === \"overrideData\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-5-b-229",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-229.js",
+ "description": "Object.defineProperties - 'set' property of 'descObj' is inherited data property (8.10.5 step 8.a)",
+ "test": "assertTrue((function testcase() {\n var data = \"data\";\n var proto = {\n set: function (value) {\n data = value;\n }\n };\n\n var Con = function () { };\n Con.prototype = proto;\n\n var child = new Con();\n var obj = {};\n\n Object.defineProperties(obj, {\n prop: child\n });\n\n obj.prop = \"overrideData\";\n\n return obj.hasOwnProperty(\"prop\") && data === \"overrideData\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-5-b-23",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-23.js",
+ "description": "Object.defineProperties - 'descObj' is a Number object which implements its own [[Get]] method to get 'enumerable' property (8.10.5 step 3.a)",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n var descObj = new Number(-9);\n var accessed = false;\n\n descObj.enumerable = true;\n\n Object.defineProperties(obj, {\n prop: descObj\n });\n for (var property in obj) {\n if (property === \"prop\") {\n accessed = true;\n }\n }\n return accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-5-b-230",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-230.js",
+ "description": "Object.defineProperties - 'set' property of 'descObj' is own data property that overrides an inherited data property (8.10.5 step 8.a)",
+ "test": "assertTrue((function testcase() {\n var data1 = \"data\";\n var data2 = \"data\";\n var proto = {\n set: function (value) {\n data2 = value;\n }\n };\n\n var Con = function () { };\n Con.prototype = proto;\n\n var child = new Con();\n child.set = function (value) {\n data1 = value;\n };\n\n var obj = {};\n\n Object.defineProperties(obj, {\n prop: child\n });\n\n obj.prop = \"overrideData\";\n\n return obj.hasOwnProperty(\"prop\") && data1 === \"overrideData\" && data2 === \"data\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-5-b-231",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-231.js",
+ "description": "Object.defineProperties - 'set' property of 'descObj' is own data property that overrides an inherited accessor property (8.10.5 step 8.a)",
+ "test": "assertTrue((function testcase() {\n var data1 = \"data\";\n var data2 = \"data\";\n var fun = function (value) {\n data2 = value;\n };\n var proto = {};\n Object.defineProperty(proto, \"set\", {\n get: function () {\n return fun;\n },\n set: function (value) {\n fun = value;\n }\n });\n\n var Con = function () { };\n Con.prototype = proto;\n\n var child = new Con();\n child.set = function (value) {\n data1 = value;\n };\n\n var obj = {};\n\n Object.defineProperties(obj, {\n prop: child\n });\n\n obj.prop = \"overrideData\";\n\n return obj.hasOwnProperty(\"prop\") && data1 === \"overrideData\" && data2 === \"data\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.7-5-b-232",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-232.js",
+ "description": "Object.defineProperties - 'set' property of 'descObj' is own accessor property (8.10.5 step 8.a)",
+ "test": "assertTrue((function testcase() {\n var data = \"data\";\n var setFun = function (value) {\n data = value;\n };\n var descObj = {};\n Object.defineProperty(descObj, \"set\", {\n get: function () {\n return setFun;\n }\n });\n\n var obj = {};\n\n Object.defineProperties(obj, {\n prop: descObj\n });\n\n obj.prop = \"overrideData\";\n\n return obj.hasOwnProperty(\"prop\") && data === \"overrideData\";\n\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.7-5-b-233",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-233.js",
+ "description": "Object.defineProperties - 'set' property of 'descObj' is inherited accessor property (8.10.5 step 8.a)",
+ "test": "assertTrue((function testcase() {\n var data = \"data\";\n var setFun = function (value) {\n data = value;\n };\n var proto = {};\n Object.defineProperty(proto, \"set\", {\n get: function () {\n return setFun;\n }\n });\n\n var Con = function () { };\n Con.prototype = proto;\n\n var child = new Con();\n var obj = {};\n\n Object.defineProperties(obj, {\n prop: child\n });\n obj.prop = \"overrideData\";\n\n return obj.hasOwnProperty(\"prop\") && data === \"overrideData\";\n\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.7-5-b-234",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-234.js",
+ "description": "Object.defineProperties - 'set' property of 'descObj' is own accessor property that overrides an inherited data property (8.10.5 step 8.a)",
+ "test": "assertTrue((function testcase() {\n var data1 = \"data\";\n var data2 = \"data\";\n\n var proto = {};\n proto.set = function (value) {\n data1 = value;\n };\n\n var Con = function () { };\n Con.prototype = proto;\n\n var child = new Con();\n Object.defineProperty(child, \"set\", {\n get: function () {\n return function (value) {\n data2 = value;\n };\n }\n });\n\n var obj = {};\n\n Object.defineProperties(obj, {\n prop: child\n });\n obj.prop = \"overrideData\";\n\n return obj.hasOwnProperty(\"prop\") && data2 === \"overrideData\" && data1 === \"data\";\n\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.7-5-b-235",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-235.js",
+ "description": "Object.defineProperties - 'set' property of 'descObj' is own accessor property that overrides an inherited accessor property (8.10.5 step 8.a)",
+ "test": "assertTrue((function testcase() {\n var data1 = \"data\";\n var data2 = \"data\";\n\n var proto = {};\n Object.defineProperty(proto, \"set\", {\n get: function () {\n return function (value) {\n data1 = value;\n };\n }\n });\n\n var Con = function () { };\n Con.prototype = proto;\n\n var child = new Con();\n Object.defineProperty(child, \"set\", {\n get: function () {\n return function (value) {\n data2 = value;\n };\n }\n });\n\n var obj = {};\n\n Object.defineProperties(obj, {\n prop: child\n });\n\n obj.prop = \"overrideData\";\n\n return obj.hasOwnProperty(\"prop\") && data2 === \"overrideData\" && data1 === \"data\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.7-5-b-236",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-236.js",
+ "description": "Object.defineProperties - 'set' property of 'descObj' is own accessor property without a get function (8.10.5 step 8.a)",
+ "test": "assertTrue((function testcase() {\n var fun = function () {\n return 10;\n };\n var descObj = {\n get: fun\n };\n Object.defineProperty(descObj, \"set\", {\n set: function () { }\n });\n\n var obj = {};\n\n Object.defineProperties(obj, {\n prop: descObj\n });\n\n var desc = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n return obj.hasOwnProperty(\"prop\") && typeof desc.set === \"undefined\" && obj.prop === 10;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties) && fnExists(Object.getOwnPropertyDescriptor) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.7-5-b-237",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-237.js",
+ "description": "Object.defineProperties - 'set' property of 'descObj' is own accessor property without a get function that overrides an inherited accessor property (8.10.5 step 8.a)",
+ "test": "assertTrue((function testcase() {\n\n var fun = function () {\n return 10; \n };\n var proto = {};\n Object.defineProperty(proto, \"set\", {\n get: function () {\n return function () {\n return arguments;\n };\n }\n });\n\n var Con = function () { };\n Con.prototype = proto;\n\n var descObj = new Con();\n Object.defineProperty(descObj, \"set\", {\n set: function () { }\n });\n\n descObj.get = fun;\n\n var obj = {};\n\n Object.defineProperties(obj, {\n prop: descObj\n });\n\n var desc = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n return obj.hasOwnProperty(\"prop\") && typeof (desc.set) === \"undefined\" && obj.prop === 10;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties) && fnExists(Object.getOwnPropertyDescriptor) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.7-5-b-238",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-238.js",
+ "description": "Object.defineProperties - 'set' property of 'descObj' is inherited accessor property without a get function (8.10.5 step 8.a)",
+ "test": "assertTrue((function testcase() {\n\n var fun = function () {\n return 10; \n };\n var proto = {};\n Object.defineProperty(proto, \"set\", {\n set: function () { }\n });\n\n var Con = function () { };\n Con.prototype = proto;\n\n var descObj = new Con();\n descObj.get = fun;\n\n var obj = {};\n\n Object.defineProperties(obj, {\n prop: descObj\n });\n\n var desc = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n return obj.hasOwnProperty(\"prop\") && typeof (desc.set) === \"undefined\" && obj.prop === 10;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties) && fnExists(Object.getOwnPropertyDescriptor) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.7-5-b-239",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-239.js",
+ "description": "Object.defineProperties - 'descObj' is a Function object which implements its own [[Get]] method to get 'set' property (8.10.5 step 8.a)",
+ "test": "assertTrue((function testcase() {\n var data = \"data\";\n var descFun = function () { };\n var setFun = function (value) {\n data = value;\n };\n\n descFun.prop = {\n set: setFun\n };\n\n var obj = {};\n Object.defineProperties(obj, descFun);\n obj.prop = \"funData\";\n return obj.hasOwnProperty(\"prop\") && data === \"funData\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-5-b-24",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-24.js",
+ "description": "Object.defineProperties - 'descObj' is the Math object which implements its own [[Get]] method to get 'enumerable' property (8.10.5 step 3.a)",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n var accessed = false;\n\n try {\n Math.enumerable = true;\n\n Object.defineProperties(obj, {\n prop: Math\n });\n for (var property in obj) {\n if (property === \"prop\") {\n accessed = true;\n }\n }\n return accessed;\n } finally {\n delete Math.enumerable;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-5-b-240",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-240.js",
+ "description": "Object.defineProperties - 'descObj' is an Array object which implements its own [[Get]] method to get 'set' property (8.10.5 step 8.a)",
+ "test": "assertTrue((function testcase() {\n\n var data = \"data\";\n var arr = [];\n var setFun = function (value) {\n data = value;\n };\n arr.prop = {\n set: setFun\n };\n\n var obj = {};\n Object.defineProperties(obj, arr);\n obj.prop = \"arrData\";\n return obj.hasOwnProperty(\"prop\") && data === \"arrData\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-5-b-241",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-241.js",
+ "description": "Object.defineProperties - 'descObj' is a String object which implements its own [[Get]] method to get 'set' property (8.10.5 step 8.a)",
+ "test": "assertTrue((function testcase() {\n var data = \"data\";\n var descStr = new String();\n var setFun = function (value) {\n data = value;\n };\n\n descStr.prop = {\n set: setFun\n };\n\n var obj = {};\n Object.defineProperties(obj, descStr);\n obj.prop = \"strData\";\n return obj.hasOwnProperty(\"prop\") && data === \"strData\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-5-b-242",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-242.js",
+ "description": "Object.defineProperties - 'descObj' is a Boolean object which implements its own [[Get]] method to get 'set' property (8.10.5 step 8.a)",
+ "test": "assertTrue((function testcase() {\n\n var data = \"data\";\n var descObj = new Boolean(false);\n var setFun = function (value) {\n data = value;\n };\n descObj.prop = {\n set: setFun\n };\n\n var obj = {};\n Object.defineProperties(obj, descObj);\n obj.prop = \"booleanData\";\n return obj.hasOwnProperty(\"prop\") && data === \"booleanData\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-5-b-243",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-243.js",
+ "description": "Object.defineProperties - 'descObj' is a Number object which implements its own [[Get]] method to get 'set' property (8.10.5 step 8.a)",
+ "test": "assertTrue((function testcase() {\n\n var data = \"data\";\n var descObj = new Number(-9);\n var setFun = function (value) {\n data = value;\n };\n descObj.prop = {\n set: setFun\n };\n\n var obj = {};\n Object.defineProperties(obj, descObj);\n obj.prop = \"numberData\";\n return obj.hasOwnProperty(\"prop\") && data === \"numberData\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-5-b-244",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-244.js",
+ "description": "Object.defineProperties - 'descObj' is the Math object which implements its own [[Get]] method to get 'set' property (8.10.5 step 8.a)",
+ "test": "assertTrue((function testcase() {\n\n var data = \"data\";\n var setFun = function (value) {\n data = value;\n };\n try {\n Math.prop = {\n set: setFun\n };\n\n var obj = {};\n Object.defineProperties(obj, Math);\n obj.prop = \"mathData\";\n return obj.hasOwnProperty(\"prop\") && data === \"mathData\";\n } finally {\n delete Math.prop;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-5-b-245",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-245.js",
+ "description": "Object.defineProperties - 'descObj' is a Date object which implements its own [[Get]] method to get 'set' property (8.10.5 step 8.a)",
+ "test": "assertTrue((function testcase() {\n\n var data = \"data\";\n var descObj = new Date();\n var setFun = function (value) {\n data = value;\n };\n descObj.prop = {\n set: setFun\n };\n\n var obj = {};\n Object.defineProperties(obj, descObj);\n obj.prop = \"dateData\";\n return obj.hasOwnProperty(\"prop\") && data === \"dateData\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-5-b-246",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-246.js",
+ "description": "Object.defineProperties - 'descObj' is a RegExp object which implements its own [[Get]] method to get 'set' property (8.10.5 step 8.a)",
+ "test": "assertTrue((function testcase() {\n\n var data = \"data\";\n var descObj = new RegExp();\n var setFun = function (value) {\n data = value;\n };\n descObj.prop = {\n set: setFun\n };\n\n var obj = {};\n Object.defineProperties(obj, descObj);\n obj.prop = \"regExpData\";\n return obj.hasOwnProperty(\"prop\") && data === \"regExpData\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-5-b-247",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-247.js",
+ "description": "Object.defineProperties - 'descObj' is the JSON object which implements its own [[Get]] method to get 'set' property (8.10.5 step 8.a)",
+ "test": "assertTrue((function testcase() {\n\n var data = \"data\";\n var setFun = function (value) {\n data = value;\n };\n try {\n JSON.prop = {\n set: setFun\n };\n\n var obj = {};\n Object.defineProperties(obj, JSON);\n obj.prop = \"JSONData\";\n return obj.hasOwnProperty(\"prop\") && data === \"JSONData\";\n } finally {\n delete JSON.prop;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-5-b-248",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-248.js",
+ "description": "Object.defineProperties - 'descObj' is an Error object which implements its own [[Get]] method to get 'set' property (8.10.5 step 8.a)",
+ "test": "assertTrue((function testcase() {\n\n var data = \"data\";\n var descObj = new Error(\"test\");\n descObj.description = { value: 11 };\n descObj.message = { value: 11 };\n descObj.name = { value: 11 };\n\n var setFun = function (value) {\n data = value;\n };\n descObj.prop = {\n set: setFun\n };\n\n var obj = {};\n Object.defineProperties(obj, descObj);\n obj.prop = \"errorData\";\n return obj.hasOwnProperty(\"prop\") && data === \"errorData\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-5-b-249",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-249.js",
+ "description": "Object.defineProperties - 'descObj' is the Arguments object which implements its own [[Get]] method to get 'set' property (8.10.5 step 8.a)",
+ "test": "assertTrue((function testcase() {\n var data = \"data\";\n var fun = function () {\n return arguments;\n };\n var arg = fun();\n var setFun = function (value) {\n data = value;\n };\n\n arg.prop = {\n set: setFun\n };\n\n var obj = {};\n Object.defineProperties(obj, arg);\n obj.prop = \"argData\";\n return obj.hasOwnProperty(\"prop\") && data === \"argData\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-5-b-25",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-25.js",
+ "description": "Object.defineProperties - 'descObj' is a Date object which implements its own [[Get]] method to get 'enumerable' property (8.10.5 step 3.a)",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n var descObj = new Date();\n var accessed = false;\n\n descObj.enumerable = true;\n\n Object.defineProperties(obj, {\n prop: descObj\n });\n for (var property in obj) {\n if (property === \"prop\") {\n accessed = true;\n }\n }\n return accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-5-b-252",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-252.js",
+ "description": "Object.defineProperties - value of 'set' property of 'descObj' is undefined (8.10.5 step 8.b)",
+ "test": "assertTrue((function testcase() {\n\n var getFun = function () {\n return 11;\n };\n\n var obj = {};\n Object.defineProperties(obj, {\n prop: {\n get: getFun,\n set: undefined\n }\n });\n\n try {\n var desc = Object.getOwnPropertyDescriptor(obj, \"prop\");\n return obj.hasOwnProperty(\"prop\") && typeof (desc.set) === \"undefined\";\n } catch (e) {\n return false;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.7-5-b-253",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-253.js",
+ "description": "Object.defineProperties - value of 'set' property of 'descObj' is primitive values null (8.10.5 step 8.b)",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n\n try {\n Object.defineProperties(obj, {\n prop: {\n set: null\n }\n });\n return false;\n } catch (e) {\n return (e instanceof TypeError);\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-5-b-254",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-254.js",
+ "description": "Object.defineProperties - value of 'set' property of 'descObj' is primitive values boolean (8.10.5 step 8.b)",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n\n try {\n Object.defineProperties(obj, {\n prop: {\n set: true\n }\n });\n return false;\n } catch (e) {\n return (e instanceof TypeError);\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-5-b-255",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-255.js",
+ "description": "Object.defineProperties - value of 'set' property of 'descObj' is primitive values number (8.10.5 step 8.b)",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n\n try {\n Object.defineProperties(obj, {\n prop: {\n set: 100\n }\n });\n return false;\n } catch (e) {\n return (e instanceof TypeError);\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-5-b-256",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-256.js",
+ "description": "Object.defineProperties - value of 'set' property of 'descObj' is primitive values string (8.10.5 step 8.b)",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n\n try {\n Object.defineProperties(obj, {\n prop: {\n set: \"abcdef\"\n }\n });\n return false;\n } catch (e) {\n return (e instanceof TypeError);\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-5-b-257",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-257.js",
+ "description": "Object.defineProperties - value of 'set' property of 'descObj' is an interesting object other than a function (8.10.5 step 8.b)",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n\n try {\n Object.defineProperties(obj, {\n prop: {\n set: []\n }\n });\n return false;\n } catch (e) {\n return (e instanceof TypeError);\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-5-b-258",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-258.js",
+ "description": "Object.defineProperties - value of 'set' property of 'descObj' is a function (8.10.5 step 8.b)",
+ "test": "assertTrue((function testcase() {\n\n var data = \"data\";\n var setFun = function (value) {\n data = value;\n };\n var obj = {};\n\n\n Object.defineProperties(obj, {\n prop: {\n set: setFun\n }\n });\n obj.prop = \"funData\";\n return obj.hasOwnProperty(\"prop\") && data === \"funData\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-5-b-26",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-26.js",
+ "description": "Object.defineProperties - 'descObj' is a RegExp object which implements its own [[Get]] method to get 'enumerable' property (8.10.5 step 3.a)",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n var descObj = new RegExp();\n var accessed = false;\n\n descObj.enumerable = true;\n\n Object.defineProperties(obj, {\n prop: descObj\n });\n for (var property in obj) {\n if (property === \"prop\") {\n accessed = true;\n }\n }\n return accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-5-b-261",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-261.js",
+ "description": "Object.defineProperties - TypeError is thrown if both 'set' property and 'value' property of 'descObj' are present (8.10.5 step 9.a)",
+ "test": "assertTrue((function testcase() {\n\n var setFun = function () {};\n var obj = {};\n\n try {\n Object.defineProperties(obj, {\n prop: {\n value: 12,\n set: setFun\n }\n });\n return false;\n } catch (e) {\n return (e instanceof TypeError);\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-5-b-262",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-262.js",
+ "description": "Object.defineProperties - TypeError is thrown if both 'set' property and 'writable' property of 'descObj' are present (8.10.5 step 9.a)",
+ "test": "assertTrue((function testcase() {\n\n var setFun = function () { };\n var obj = {};\n\n try {\n Object.defineProperties(obj, {\n prop: {\n writable: true,\n set: setFun\n }\n });\n return false;\n } catch (e) {\n return (e instanceof TypeError);\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-5-b-263",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-263.js",
+ "description": "Object.defineProperties - TypeError is thrown if both 'get' property and 'value' property of 'descObj' are present (8.10.5 step 9.a)",
+ "test": "assertTrue((function testcase() {\n\n var getFun = function () {};\n var obj = {};\n\n try {\n Object.defineProperties(obj, {\n prop: {\n value: 12,\n get: getFun\n }\n });\n return false;\n } catch (e) {\n return (e instanceof TypeError);\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-5-b-264",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-264.js",
+ "description": "Object.defineProperties - TypeError is thrown if both 'get' property and 'writable' property of 'descObj' are present (8.10.5 step 9.a)",
+ "test": "assertTrue((function testcase() {\n\n var getFun = function () {};\n\n var obj = {};\n\n try {\n Object.defineProperties(obj, {\n \"prop\": {\n writable: true,\n get: getFun\n }\n });\n return false;\n } catch (e) {\n return (e instanceof TypeError);\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-5-b-27",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-27.js",
+ "description": "Object.defineProperties - 'descObj' is the JSON object which implements its own [[Get]] method to get 'enumerable' property (8.10.5 step 3.a)",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n var accessed = false;\n\n try {\n JSON.enumerable = true;\n\n Object.defineProperties(obj, {\n prop: JSON\n });\n for (var property in obj) {\n if (property === \"prop\") {\n accessed = true;\n }\n }\n return accessed;\n } finally {\n delete JSON.enumerable;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-5-b-28",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-28.js",
+ "description": "Object.defineProperties - 'descObj' is an Error object which implements its own [[Get]] method to get 'enumerable' property (8.10.5 step 3.a)",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n var descObj = new Error();\n var accessed = false;\n\n descObj.enumerable = true;\n\n Object.defineProperties(obj, {\n prop: descObj\n });\n for (var property in obj) {\n if (property === \"prop\") {\n accessed = true;\n }\n }\n return accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-5-b-29",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-29.js",
+ "description": "Object.defineProperties - 'descObj' is the Arguments object which implements its own [[Get]] method to get 'enumerable' property (8.10.5 step 3.a)",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n var arg;\n var accessed = false;\n\n (function fun() {\n arg = arguments;\n }());\n\n arg.enumerable = true;\n\n Object.defineProperties(obj, {\n prop: arg\n });\n for (var property in obj) {\n if (property === \"prop\") {\n accessed = true;\n }\n }\n return accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-5-b-3",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-3.js",
+ "description": "Object.defineProperties - 'descObj' is a boolean (8.10.5 step 1)",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n\n try {\n Object.defineProperties(obj, {\n prop: true\n });\n return false;\n } catch (e) {\n return e instanceof TypeError && !obj.hasOwnProperty(\"prop\");\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-5-b-31",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-31.js",
+ "description": "Object.defineProperties - 'descObj' is the global object which implements its own [[Get]] method to get 'enumerable' property (8.10.5 step 3.a)",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n var accessed = false;\n\n try {\n fnGlobalObject().enumerable = true;\n\n Object.defineProperties(obj, {\n prop: fnGlobalObject()\n });\n for (var property in obj) {\n if (property === \"prop\") {\n accessed = true;\n }\n }\n return accessed;\n } finally {\n delete fnGlobalObject().enumerable;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-5-b-32",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-32.js",
+ "description": "Object.defineProperties - value of 'enumerable' property of 'descObj' is undefined (8.10.5 step 3.b)",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n var accessed = false;\n\n Object.defineProperties(obj, {\n prop: {\n enumerable: undefined\n }\n });\n for (var property in obj) {\n if (property === \"prop\") {\n accessed = true;\n }\n }\n return !accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-5-b-33",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-33.js",
+ "description": "Object.defineProperties - value of 'enumerable' property of 'descObj' is null (8.10.5 step 3.b)",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n var accessed = false;\n\n Object.defineProperties(obj, {\n prop: {\n enumerable: null\n }\n });\n for (var property in obj) {\n if (property === \"prop\") {\n accessed = true;\n }\n }\n return !accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-5-b-34",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-34.js",
+ "description": "Object.defineProperties - value of 'enumerable' property of 'descObj' is true (8.10.5 step 3.b)",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n var accessed = false;\n\n Object.defineProperties(obj, {\n prop: {\n enumerable: true\n }\n });\n for (var property in obj) {\n if (property === \"prop\") {\n accessed = true;\n }\n }\n return accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-5-b-35",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-35.js",
+ "description": "Object.defineProperties - value of 'enumerable' property of 'descObj' is false (8.10.5 step 3.b)",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n var accessed = false;\n\n Object.defineProperties(obj, {\n prop: {\n enumerable: false\n }\n });\n for (var property in obj) {\n if (property === \"prop\") {\n accessed = true;\n }\n }\n return !accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-5-b-36",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-36.js",
+ "description": "Object.defineProperties - value of 'enumerable' property of 'descObj' is 0 (8.10.5 step 3.b)",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n var accessed = false;\n\n Object.defineProperties(obj, {\n prop: {\n enumerable: 0\n }\n });\n for (var property in obj) {\n if (property === \"prop\") {\n accessed = true;\n }\n }\n return !accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-5-b-37",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-37.js",
+ "description": "Object.defineProperties - value of 'enumerable' property of 'descObj' is +0 (8.10.5 step 3.b)",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n var accessed = false;\n\n Object.defineProperties(obj, {\n prop: {\n enumerable: +0\n }\n });\n for (var property in obj) {\n if (property === \"prop\") {\n accessed = true;\n }\n }\n return !accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-5-b-38",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-38.js",
+ "description": "Object.defineProperties - value of 'enumerable' property of 'descObj' is -0 (8.10.5 step 3.b)",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n var accessed = false;\n\n Object.defineProperties(obj, {\n prop: {\n enumerable: -0\n }\n });\n for (var property in obj) {\n if (property === \"prop\") {\n accessed = true;\n }\n }\n return !accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-5-b-39",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-39.js",
+ "description": "Object.defineProperties - value of 'enumerable' property of 'descObj' is NaN (8.10.5 step 3.b)",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n var accessed = false;\n\n Object.defineProperties(obj, {\n prop: {\n enumerable: NaN\n }\n });\n for (var property in obj) {\n if (property === \"prop\") {\n accessed = true;\n }\n }\n return !accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-5-b-4",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-4.js",
+ "description": "Object.defineProperties - 'descObj' is a number (8.10.5 step 1)",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n\n try {\n Object.defineProperties(obj, {\n prop: 12\n });\n return false;\n } catch (e) {\n return e instanceof TypeError && !obj.hasOwnProperty(\"prop\");\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-5-b-40",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-40.js",
+ "description": "Object.defineProperties - value of 'enumerable' property of 'descObj' is positive number (8.10.5 step 3.b)",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n var accessed = false;\n\n Object.defineProperties(obj, {\n prop: {\n enumerable: 12\n }\n });\n for (var property in obj) {\n if (property === \"prop\") {\n accessed = true;\n }\n }\n return accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-5-b-41",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-41.js",
+ "description": "Object.defineProperties - value of 'enumerable' property of 'descObj' is negative number (8.10.5 step 3.b)",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n var accessed = false;\n\n Object.defineProperties(obj, {\n prop: {\n enumerable: -9\n }\n });\n for (var property in obj) {\n if (property === \"prop\") {\n accessed = true;\n }\n }\n return accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-5-b-42",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-42.js",
+ "description": "Object.defineProperties - value of 'enumerable' property of 'descObj' is empty string (8.10.5 step 3.b)",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n var accessed = false;\n\n Object.defineProperties(obj, {\n prop: {\n enumerable: \"\"\n }\n });\n for (var property in obj) {\n if (property === \"prop\") {\n accessed = true;\n }\n }\n return !accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-5-b-43",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-43.js",
+ "description": "Object.defineProperties - value of 'enumerable' property of 'descObj' is non-empty string (8.10.5 step 3.b)",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n var accessed = false;\n\n Object.defineProperties(obj, {\n prop: {\n enumerable: \"AB\\n\\\\cd\"\n }\n });\n for (var property in obj) {\n if (property === \"prop\") {\n accessed = true;\n }\n }\n return accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-5-b-44",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-44.js",
+ "description": "Object.defineProperties - value of 'enumerable' property of 'descObj' is a Function object (8.10.5 step 3.b)",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n var accessed = false;\n\n Object.defineProperties(obj, {\n prop: {\n enumerable: function () { }\n }\n });\n for (var property in obj) {\n if (property === \"prop\") {\n accessed = true;\n }\n }\n return accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-5-b-45",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-45.js",
+ "description": "Object.defineProperties - value of 'enumerable' property of 'descObj' is an Array object (8.10.5 step 3.b)",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n var accessed = false;\n\n Object.defineProperties(obj, {\n prop: {\n enumerable: []\n }\n });\n for (var property in obj) {\n if (property === \"prop\") {\n accessed = true;\n }\n }\n return accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-5-b-46",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-46.js",
+ "description": "Object.defineProperties - value of 'enumerable' property of 'descObj' is a String object (8.10.5 step 3.b)",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n var accessed = false;\n\n Object.defineProperties(obj, {\n prop: {\n enumerable: new String()\n }\n });\n for (var property in obj) {\n if (property === \"prop\") {\n accessed = true;\n }\n }\n return accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-5-b-47",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-47.js",
+ "description": "Object.defineProperties - value of 'enumerable' property of 'descObj' is a Boolean object (8.10.5 step 3.b)",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n var accessed = false;\n\n Object.defineProperties(obj, {\n prop: {\n enumerable: new Boolean(true)\n }\n });\n for (var property in obj) {\n if (property === \"prop\") {\n accessed = true;\n }\n }\n return accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-5-b-48",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-48.js",
+ "description": "Object.defineProperties - value of 'enumerable' property of 'descObj' is a Number object (8.10.5 step 3.b)",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n var accessed = false;\n\n Object.defineProperties(obj, {\n prop: {\n enumerable: new Number(-9)\n }\n });\n for (var property in obj) {\n if (property === \"prop\") {\n accessed = true;\n }\n }\n return accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-5-b-49",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-49.js",
+ "description": "Object.defineProperties - value of 'enumerable' property of 'descObj' is the Math object (8.10.5 step 3.b)",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n var accessed = false;\n\n Object.defineProperties(obj, {\n prop: {\n enumerable: Math\n }\n });\n for (var property in obj) {\n if (property === \"prop\") {\n accessed = true;\n }\n }\n return accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-5-b-5",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-5.js",
+ "description": "Object.defineProperties - 'descObj' is a string (8.10.5 step 1)",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n\n try {\n Object.defineProperties(obj, {\n prop: \"abc\"\n });\n return false;\n } catch (e) {\n return e instanceof TypeError && !obj.hasOwnProperty(\"prop\");\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-5-b-50",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-50.js",
+ "description": "Object.defineProperties - value of 'enumerable' property of 'descObj' is a Date object (8.10.5 step 3.b)",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n var accessed = false;\n\n Object.defineProperties(obj, {\n prop: {\n enumerable: new Date()\n }\n });\n for (var property in obj) {\n if (property === \"prop\") {\n accessed = true;\n }\n }\n return accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-5-b-51",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-51.js",
+ "description": "Object.defineProperties - value of 'enumerable' property of 'descObj' is a RegExp object (8.10.5 step 3.b)",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n var accessed = false;\n\n Object.defineProperties(obj, {\n prop: {\n enumerable: new RegExp()\n }\n });\n for (var property in obj) {\n if (property === \"prop\") {\n accessed = true;\n }\n }\n return accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-5-b-52",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-52.js",
+ "description": "Object.defineProperties - value of 'enumerable' property of 'descObj' is the JSON object (8.10.5 step 3.b)",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n var accessed = false;\n\n Object.defineProperties(obj, {\n prop: {\n enumerable: JSON\n }\n });\n for (var property in obj) {\n if (property === \"prop\") {\n accessed = true;\n }\n }\n return accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-5-b-53",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-53.js",
+ "description": "Object.defineProperties - value of 'enumerable' property of 'descObj' is an Error object (8.10.5 step 3.b)",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n var accessed = false;\n\n Object.defineProperties(obj, {\n prop: {\n enumerable: new Error()\n }\n });\n for (var property in obj) {\n if (property === \"prop\") {\n accessed = true;\n }\n }\n return accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-5-b-54",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-54.js",
+ "description": "Object.defineProperties - value of 'enumerable' property of 'descObj' is the Arguments object (8.10.5 step 3.b)",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n var accessed = false;\n var arg; \n \n (function fun() {\n arg = arguments;\n }(1, 2, 3));\n\n Object.defineProperties(obj, {\n prop: {\n enumerable: arg\n }\n });\n for (var property in obj) {\n if (property === \"prop\") {\n accessed = true;\n }\n }\n return accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-5-b-56",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-56.js",
+ "description": "Object.defineProperties - value of 'enumerable' property of 'descObj' is the global object (8.10.5 step 3.b)",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n var accessed = false;\n\n Object.defineProperties(obj, {\n prop: {\n enumerable: fnGlobalObject()\n }\n });\n for (var property in obj) {\n if (property === \"prop\") {\n accessed = true;\n }\n }\n return accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-5-b-57",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-57.js",
+ "description": "Object.defineProperties - value of 'enumerable' property of 'descObj' is a string (value is 'false') which is treated as true value (8.10.5 step 3.b)",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n var accessed = false;\n\n Object.defineProperties(obj, {\n prop: {\n enumerable: \"false\"\n }\n });\n for (var property in obj) {\n if (property === \"prop\") {\n accessed = true;\n }\n }\n return accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-5-b-58",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-58.js",
+ "description": "Object.defineProperties - value of 'enumerable' property of 'descObj' is new Boolean(false) which is treated as true value (8.10.5 step 3.b)",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n var accessed = false;\n\n Object.defineProperties(obj, {\n prop: {\n enumerable: new Boolean(false)\n }\n });\n for (var property in obj) {\n if (property === \"prop\") {\n accessed = true;\n }\n }\n return accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-5-b-59",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-59.js",
+ "description": "Object.defineProperties - 'configurable' property of 'descObj' is present (8.10.5 step 4)",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n\n Object.defineProperties(obj, {\n prop: {\n configurable: true\n }\n });\n\n var result1 = obj.hasOwnProperty(\"prop\");\n delete obj.prop;\n var result2 = obj.hasOwnProperty(\"prop\");\n\n return result1 === true && result2 === false;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-5-b-6",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-6.js",
+ "description": "Object.defineProperties - 'enumerable' property of 'descObj' is present (8.10.5 step 3)",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n var accessed = false;\n\n Object.defineProperties(obj, {\n prop: {\n enumerable: true\n }\n });\n\n for (var property in obj) {\n if (property === \"prop\") {\n accessed = true;\n }\n }\n return accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-5-b-60",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-60.js",
+ "description": "Object.defineProperties - 'configurable' property of 'descObj' is not present (8.10.5 step 4)",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n\n Object.defineProperties(obj, {\n prop: {}\n });\n\n var result1 = obj.hasOwnProperty(\"prop\");\n delete obj.prop;\n var result2 = obj.hasOwnProperty(\"prop\");\n\n return result1 === true && result2 === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-5-b-61",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-61.js",
+ "description": "Object.defineProperties - 'configurable' property of 'descObj' is own data property (8.10.5 step 4.a)",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n\n Object.defineProperties(obj, {\n prop: {\n configurable: true\n }\n });\n\n var result1 = obj.hasOwnProperty(\"prop\");\n delete obj.prop;\n var result2 = obj.hasOwnProperty(\"prop\");\n\n return result1 === true && result2 === false;\n\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-5-b-62",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-62.js",
+ "description": "Object.defineProperties - 'configurable' property of 'descObj' is inherited data property (8.10.5 step 4.a)",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n var proto = {\n configurable: true\n };\n var Con = function () { };\n Con.prototype = proto;\n var descObj = new Con();\n\n Object.defineProperties(obj, {\n prop: descObj\n });\n\n var result1 = obj.hasOwnProperty(\"prop\");\n delete obj.prop;\n var result2 = obj.hasOwnProperty(\"prop\");\n\n return result1 === true && result2 === false;\n\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-5-b-63",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-63.js",
+ "description": "Object.defineProperties - 'configurable' property of 'descObj' is own data property that overrides an inherited data property (8.10.5 step 4.a)",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n var proto = {\n configurable: true\n };\n\n var Con = function () { };\n Con.prototype = proto;\n var descObj = new Con();\n\n Object.defineProperty(descObj, \"configurable\", {\n value: false\n });\n\n Object.defineProperties(obj, {\n prop: descObj\n });\n var result1 = obj.hasOwnProperty(\"prop\");\n delete obj.prop;\n var result2 = obj.hasOwnProperty(\"prop\");\n\n return result1 === true && result2 === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.7-5-b-64",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-64.js",
+ "description": "Object.defineProperties - 'configurable' property of 'descObj' is own data property that overrides an inherited accessor property (8.10.5 step 4.a)",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n var proto = {};\n Object.defineProperty(proto, \"configurable\", {\n get: function () {\n return true;\n }\n });\n\n var Con = function () { };\n Con.prototype = proto;\n var descObj = new Con();\n\n Object.defineProperty(descObj, \"configurable\", {\n value: false\n });\n\n Object.defineProperties(obj, {\n prop: descObj\n });\n var result1 = obj.hasOwnProperty(\"prop\");\n delete obj.prop;\n var result2 = obj.hasOwnProperty(\"prop\");\n\n return result1 === true && result2 === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.7-5-b-65",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-65.js",
+ "description": "Object.defineProperties - 'configurable' property of 'descObj' is own accessor property (8.10.5 step 4.a)",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n\n var descObj = {};\n Object.defineProperty(descObj, \"configurable\", {\n get: function () {\n return true;\n }\n });\n\n Object.defineProperties(obj, {\n prop: descObj\n });\n var result1 = obj.hasOwnProperty(\"prop\");\n delete obj.prop;\n var result2 = obj.hasOwnProperty(\"prop\");\n\n return result1 === true && result2 === false;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.7-5-b-66",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-66.js",
+ "description": "Object.defineProperties - 'configurable' property of 'descObj' is inherited accessor property (8.10.5 step 4.a)",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n var proto = {};\n\n Object.defineProperty(proto, \"configurable\", {\n get: function () {\n return true;\n }\n });\n\n var Con = function () { };\n Con.prototype = proto;\n var descObj = new Con();\n\n Object.defineProperties(obj, {\n prop: descObj\n });\n\n var result1 = obj.hasOwnProperty(\"prop\");\n delete obj.prop;\n var result2 = obj.hasOwnProperty(\"prop\");\n\n return result1 === true && result2 === false;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.7-5-b-67",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-67.js",
+ "description": "Object.defineProperties - 'configurable' property of 'descObj' is own accessor property that overrides an inherited data property (8.10.5 step 4.a)",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n var proto = {\n configurable: true\n };\n\n var Con = function () { };\n Con.prototype = proto;\n var descObj = new Con();\n\n Object.defineProperty(descObj, \"configurable\", {\n get: function () {\n return false;\n }\n });\n\n Object.defineProperties(obj, {\n prop: descObj\n });\n var result1 = obj.hasOwnProperty(\"prop\");\n delete obj.prop;\n var result2 = obj.hasOwnProperty(\"prop\");\n\n return result1 === true && result2 === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.7-5-b-68",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-68.js",
+ "description": "Object.defineProperties - 'configurable' property of 'descObj' is own accessor property that overrides an inherited accessor property (8.10.5 step 4.a)",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n var proto = {};\n Object.defineProperty(proto, \"configurable\", {\n get: function () {\n return true;\n }\n });\n\n var Con = function () { };\n Con.prototype = proto;\n var descObj = new Con();\n\n Object.defineProperty(descObj, \"configurable\", {\n get: function () {\n return false;\n }\n });\n\n Object.defineProperties(obj, {\n prop: descObj\n });\n var result1 = obj.hasOwnProperty(\"prop\");\n delete obj.prop;\n var result2 = obj.hasOwnProperty(\"prop\");\n\n return result1 === true && result2 === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.7-5-b-69",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-69.js",
+ "description": "Object.defineProperties - 'configurable' property of 'descObj' is own accessor property without a get function (8.10.5 step 4.a)",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n\n var descObj = {};\n Object.defineProperty(descObj, \"configurable\", {\n set: function () { }\n });\n\n Object.defineProperties(obj, {\n prop: descObj\n });\n var result1 = obj.hasOwnProperty(\"prop\");\n delete obj.prop;\n var result2 = obj.hasOwnProperty(\"prop\");\n\n return result1 === true && result2 === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.7-5-b-7",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-7.js",
+ "description": "Object.defineProperties - 'enumerable' property of 'descObj' is not present (8.10.5 step 3)",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n var accessed = false;\n\n Object.defineProperties(obj, {\n prop: {}\n });\n\n for (var property in obj) {\n if (property === \"prop\") {\n accessed = true;\n }\n }\n return !accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-5-b-70",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-70.js",
+ "description": "Object.defineProperties - 'configurable' property of 'descObj' is own accessor property without a get function that overrides an inherited accessor property (8.10.5 step 4.a)",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n var proto = {};\n Object.defineProperty(proto, \"configurable\", {\n get: function () {\n return true;\n }\n });\n\n var Con = function () { };\n Con.prototype = proto;\n var descObj = new Con();\n\n Object.defineProperty(descObj, \"configurable\", {\n set: function () { }\n });\n\n Object.defineProperties(obj, {\n prop: descObj\n });\n var result1 = obj.hasOwnProperty(\"prop\");\n delete obj.prop;\n var result2 = obj.hasOwnProperty(\"prop\");\n\n return result1 === true && result2 === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.7-5-b-71",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-71.js",
+ "description": "Object.defineProperties - 'configurable' property of 'descObj' is inherited accessor property without a get function (8.10.5 step 4.a)",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n var proto = {};\n\n Object.defineProperty(proto, \"configurable\", {\n set: function () { }\n });\n\n var Con = function () { };\n Con.prototype = proto;\n var descObj = new Con();\n\n Object.defineProperties(obj, {\n prop: descObj\n });\n\n var result1 = obj.hasOwnProperty(\"prop\");\n delete obj.prop;\n var result2 = obj.hasOwnProperty(\"prop\");\n\n return result1 === true && result2 === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.7-5-b-72",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-72.js",
+ "description": "Object.defineProperties - 'descObj' is a Function object which implements its own [[Get]] method to get 'configurable' property (8.10.5 step 4.a)",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n\n var descObj = function () { };\n descObj.configurable = true;\n\n Object.defineProperties(obj, {\n prop: descObj\n });\n\n var result1 = obj.hasOwnProperty(\"prop\");\n delete obj.prop;\n var result2 = obj.hasOwnProperty(\"prop\");\n\n return result1 === true && result2 === false;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-5-b-73",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-73.js",
+ "description": "Object.defineProperties - 'descObj' is an Array object which implements its own [[Get]] method to get 'configurable' property (8.10.5 step 4.a)",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n\n var descObj = [];\n descObj.configurable = true;\n\n Object.defineProperties(obj, {\n prop: descObj\n });\n\n var result1 = obj.hasOwnProperty(\"prop\");\n delete obj.prop;\n var result2 = obj.hasOwnProperty(\"prop\");\n\n return result1 === true && result2 === false;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-5-b-74",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-74.js",
+ "description": "Object.defineProperties - 'descObj' is a String object which implements its own [[Get]] method to get 'configurable' property (8.10.5 step 4.a)",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n\n var descObj = new String();\n descObj.configurable = true;\n\n Object.defineProperties(obj, {\n prop: descObj\n });\n var result1 = obj.hasOwnProperty(\"prop\");\n delete obj.prop;\n var result2 = obj.hasOwnProperty(\"prop\");\n\n return result1 === true && result2 === false;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-5-b-75",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-75.js",
+ "description": "Object.defineProperties - 'descObj' is a Boolean object which implements its own [[Get]] method to get 'configurable' property (8.10.5 step 4.a)",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n\n var descObj = new Boolean(false);\n descObj.configurable = true;\n\n Object.defineProperties(obj, {\n prop: descObj\n });\n\n var result1 = obj.hasOwnProperty(\"prop\");\n delete obj.prop;\n var result2 = obj.hasOwnProperty(\"prop\");\n\n return result1 === true && result2 === false;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-5-b-76",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-76.js",
+ "description": "Object.defineProperties - 'descObj' is a Number object which implements its own [[Get]] method to get 'configurable' property (8.10.5 step 4.a)",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n\n var descObj = new Number(-9);\n descObj.configurable = true;\n\n Object.defineProperties(obj, {\n prop: descObj\n });\n\n var result1 = obj.hasOwnProperty(\"prop\");\n delete obj.prop;\n var result2 = obj.hasOwnProperty(\"prop\");\n\n return result1 === true && result2 === false;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-5-b-77",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-77.js",
+ "description": "Object.defineProperties - 'descObj' is the Math object which implements its own [[Get]] method to get 'configurable' property (8.10.5 step 4.a)",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n\n try {\n Math.configurable = true;\n\n Object.defineProperties(obj, {\n prop: Math\n });\n\n var result1 = obj.hasOwnProperty(\"prop\");\n delete obj.prop;\n var result2 = obj.hasOwnProperty(\"prop\");\n\n return result1 === true && result2 === false;\n } finally {\n delete Math.configurable;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-5-b-78",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-78.js",
+ "description": "Object.defineProperties - 'descObj' is a Date object which implements its own [[Get]] method to get 'configurable' property (8.10.5 step 4.a)",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n\n var descObj = new Date();\n descObj.configurable = true;\n\n Object.defineProperties(obj, {\n prop: descObj\n });\n\n var result1 = obj.hasOwnProperty(\"prop\");\n delete obj.prop;\n var result2 = obj.hasOwnProperty(\"prop\");\n\n return result1 === true && result2 === false;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-5-b-79",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-79.js",
+ "description": "Object.defineProperties - 'descObj' is a RegExp object which implements its own [[Get]] method to get 'configurable' property (8.10.5 step 4.a)",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n\n var descObj = new RegExp();\n descObj.configurable = true;\n\n Object.defineProperties(obj, {\n prop: descObj\n });\n\n var result1 = obj.hasOwnProperty(\"prop\");\n delete obj.prop;\n var result2 = obj.hasOwnProperty(\"prop\");\n\n return result1 === true && result2 === false;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-5-b-8",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-8.js",
+ "description": "Object.defineProperties - 'enumerable' property of 'descObj' is own data property (8.10.5 step 3.a)",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n var accessed = false;\n\n var descObj = { enumerable: true };\n\n Object.defineProperties(obj, {\n prop: descObj\n });\n\n for (var property in obj) {\n if (property === \"prop\") {\n accessed = true;\n }\n }\n return accessed;\n\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-5-b-80",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-80.js",
+ "description": "Object.defineProperties - 'descObj' is the JSON object which implements its own [[Get]] method to get 'configurable' property (8.10.5 step 4.a)",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n\n try {\n JSON.configurable = true;\n\n Object.defineProperties(obj, {\n prop: JSON\n });\n\n var result1 = obj.hasOwnProperty(\"prop\");\n delete obj.prop;\n var result2 = obj.hasOwnProperty(\"prop\");\n\n return result1 === true && result2 === false;\n } finally {\n delete JSON.configurable;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-5-b-81",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-81.js",
+ "description": "Object.defineProperties - 'descObj' is an Error object which implements its own [[Get]] method to get 'configurable' property (8.10.5 step 4.a)",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n\n var descObj = new Error();\n descObj.configurable = true;\n\n Object.defineProperties(obj, {\n prop: descObj\n });\n\n var result1 = obj.hasOwnProperty(\"prop\");\n delete obj.prop;\n var result2 = obj.hasOwnProperty(\"prop\");\n\n return result1 === true && result2 === false;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-5-b-82",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-82.js",
+ "description": "Object.defineProperties - 'descObj' is the Arguments object which implements its own [[Get]] method to get 'configurable' property (8.10.5 step 4.a)",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n\n var arg;\n (function fun() {\n arg = arguments;\n }());\n\n arg.configurable = true;\n\n Object.defineProperties(obj, {\n prop: arg\n });\n\n var result1 = obj.hasOwnProperty(\"prop\");\n delete obj.prop;\n var result2 = obj.hasOwnProperty(\"prop\");\n\n return result1 === true && result2 === false;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-5-b-84",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-84.js",
+ "description": "Object.defineProperties - 'descObj' is the global object which implements its own [[Get]] method to get 'configurable' property (8.10.5 step 4.a)",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n\n try {\n fnGlobalObject().configurable = true;\n\n Object.defineProperties(obj, {\n prop: fnGlobalObject()\n });\n\n var result1 = obj.hasOwnProperty(\"prop\");\n delete obj.prop;\n var result2 = obj.hasOwnProperty(\"prop\");\n\n return result1 === true && result2 === false;\n } finally {\n delete fnGlobalObject().configurable;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-5-b-85",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-85.js",
+ "description": "Object.defineProperties - value of 'configurable' property of 'descObj' is undefined (8.10.5 step 4.b)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n Object.defineProperties(obj, {\n property: {\n configurable: undefined\n }\n });\n\n var hadOwnProperty = obj.hasOwnProperty(\"property\");\n\n delete obj.property;\n\n return obj.hasOwnProperty(\"property\") && hadOwnProperty;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-5-b-86",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-86.js",
+ "description": "Object.defineProperties - value of 'configurable' property of 'descObj' is null (8.10.5 step 4.b)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n Object.defineProperties(obj, {\n property: {\n configurable: null\n }\n });\n\n var hadOwnProperty = obj.hasOwnProperty(\"property\");\n\n delete obj.property;\n\n return obj.hasOwnProperty(\"property\") && hadOwnProperty;\n\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-5-b-87",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-87.js",
+ "description": "Object.defineProperties - value of 'configurable' property of 'descObj' is true (8.10.5 step 4.b)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n Object.defineProperties(obj, {\n property: {\n configurable: true\n }\n });\n\n var hadOwnProperty = obj.hasOwnProperty(\"property\");\n\n delete obj.property;\n\n return !obj.hasOwnProperty(\"property\") && hadOwnProperty;\n\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-5-b-88",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-88.js",
+ "description": "Object.defineProperties - value of 'configurable' property of 'descObj' is false (8.10.5 step 4.b)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n Object.defineProperties(obj, {\n property: {\n configurable: false\n }\n });\n\n var hadOwnProperty = obj.hasOwnProperty(\"property\");\n\n delete obj.property;\n\n return obj.hasOwnProperty(\"property\") && hadOwnProperty;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-5-b-89",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-89.js",
+ "description": "Object.defineProperties - value of 'configurable' property of 'descObj' is 0 (8.10.5 step 4.b)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n Object.defineProperties(obj, {\n property: {\n configurable: 0\n }\n });\n\n var hadOwnProperty = obj.hasOwnProperty(\"property\");\n\n delete obj.property;\n\n return obj.hasOwnProperty(\"property\") && hadOwnProperty;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-5-b-9",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-9.js",
+ "description": "Object.defineProperties - 'enumerable' property of 'descObj' is inherited data property (8.10.5 step 3.a)",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n var accessed = false;\n\n var proto = {\n enumerable: true\n };\n var Con = function () { };\n Con.prototype = proto;\n var descObj = new Con();\n\n Object.defineProperties(obj, {\n prop: descObj\n });\n\n for (var property in obj) {\n if (property === \"prop\") {\n accessed = true;\n }\n }\n return accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-5-b-90",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-90.js",
+ "description": "Object.defineProperties - value of 'configurable' property of 'descObj' is +0 (8.10.5 step 4.b)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n Object.defineProperties(obj, {\n property: {\n configurable: +0\n }\n });\n\n var hadOwnProperty = obj.hasOwnProperty(\"property\");\n\n delete obj.property;\n\n return obj.hasOwnProperty(\"property\") && hadOwnProperty;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-5-b-91",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-91.js",
+ "description": "Object.defineProperties - value of 'configurable' property of 'descObj' is -0 (8.10.5 step 4.b)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n Object.defineProperties(obj, {\n property: {\n configurable: -0\n }\n });\n\n var hadOwnProperty = obj.hasOwnProperty(\"property\");\n\n delete obj.property;\n\n return obj.hasOwnProperty(\"property\") && hadOwnProperty;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-5-b-92",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-92.js",
+ "description": "Object.defineProperties - value of 'configurable' property of 'descObj' is NaN (8.10.5 step 4.b)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n Object.defineProperties(obj, {\n property: {\n configurable: NaN\n }\n });\n\n var hadOwnProperty = obj.hasOwnProperty(\"property\");\n\n delete obj.property;\n\n return obj.hasOwnProperty(\"property\") && hadOwnProperty;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-5-b-93",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-93.js",
+ "description": "Object.defineProperties - value of 'configurable' property of 'descObj' is positive number (8.10.5 step 4.b)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n Object.defineProperties(obj, {\n property: {\n configurable: 123\n }\n });\n\n var hadOwnProperty = obj.hasOwnProperty(\"property\");\n\n delete obj.property;\n\n return !obj.hasOwnProperty(\"property\") && hadOwnProperty;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-5-b-94",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-94.js",
+ "description": "Object.defineProperties - value of 'configurable' property of 'descObj' is negative number (8.10.5 step 4.b)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n Object.defineProperties(obj, {\n property: {\n configurable: -123\n }\n });\n\n var hadOwnProperty = obj.hasOwnProperty(\"property\");\n\n delete obj.property;\n\n return !obj.hasOwnProperty(\"property\") && hadOwnProperty;\n\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-5-b-95",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-95.js",
+ "description": "Object.defineProperties - value of 'configurable' property of 'descObj' is empty string (8.10.5 step 4.b)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n Object.defineProperties(obj, {\n property: {\n configurable: \"\"\n }\n });\n\n var hadOwnProperty = obj.hasOwnProperty(\"property\");\n\n delete obj.property;\n\n return obj.hasOwnProperty(\"property\") && hadOwnProperty;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-5-b-96",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-96.js",
+ "description": "Object.defineProperties - value of 'configurable' property of 'descObj' is non-empty string (8.10.5 step 4.b)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n Object.defineProperties(obj, {\n property: {\n configurable: \"abc\"\n }\n });\n\n var hadOwnProperty = obj.hasOwnProperty(\"property\");\n\n delete obj.property;\n\n return !obj.hasOwnProperty(\"property\") && hadOwnProperty;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-5-b-97",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-97.js",
+ "description": "Object.defineProperties - value of 'configurable' property of 'descObj' is Function object (8.10.5 step 4.b)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n Object.defineProperties(obj, {\n property: {\n configurable: function () { }\n }\n });\n\n var hadOwnProperty = obj.hasOwnProperty(\"property\");\n\n delete obj.property;\n\n return !obj.hasOwnProperty(\"property\") && hadOwnProperty;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-5-b-98",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-98.js",
+ "description": "Object.defineProperties - value of 'configurable' property of 'descObj' is Array object (8.10.5 step 4.b)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n Object.defineProperties(obj, {\n property: {\n configurable: [1, 2, 3]\n }\n });\n\n var hadOwnProperty = obj.hasOwnProperty(\"property\");\n\n delete obj.property;\n\n return !obj.hasOwnProperty(\"property\") && hadOwnProperty;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-5-b-99",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-5-b-99.js",
+ "description": "Object.defineProperties - value of 'configurable' property of 'descObj' is String object (8.10.5 step 4.b)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n Object.defineProperties(obj, {\n property: {\n configurable: new String(\"abc\")\n }\n });\n\n var hadOwnProperty = obj.hasOwnProperty(\"property\");\n\n delete obj.property;\n\n return !obj.hasOwnProperty(\"property\") && hadOwnProperty;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-6-a-1",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-1.js",
+ "description": "Object.defineProperties - 'P' is own existing data property (8.12.9 step 1 )",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n Object.defineProperty(obj, \"prop\", {\n value: 11,\n configurable: false\n });\n\n try {\n Object.defineProperties(obj, { \n prop: {\n value: 12,\n configurable: true\n }\n });\n return false;\n } catch (e) {\n return (e instanceof TypeError);\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.7-6-a-10",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-10.js",
+ "description": "Object.defineProperties - 'P' is own accessor property without a get function that overrides an inherited accessor property (8.12.9 step 1 ) ",
+ "test": "assertTrue((function testcase() {\n var proto = {};\n Object.defineProperty(proto, \"prop\", {\n get: function () {\n return 11;\n },\n set: function () { },\n configurable: true\n });\n var Con = function () { };\n Con.prototype = proto;\n\n var obj = new Con();\n Object.defineProperty(obj, \"prop\", {\n set: function () { },\n configurable: false\n });\n\n try {\n Object.defineProperties(obj, {\n prop: {\n value: 12,\n configurable: true\n }\n });\n return false;\n } catch (e) {\n return (e instanceof TypeError);\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.7-6-a-100",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-100.js",
+ "description": "Object.defineProperties - 'P' is data property, several attributes values of P and properties are different (8.12.9 step 12)",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n\n Object.defineProperty(obj, \"foo\", { \n value: 100, \n writable: true, \n configurable: true \n });\n\n Object.defineProperties(obj, {\n foo: {\n value: 200,\n writable: false,\n configurable: false\n }\n });\n return dataPropertyAttributesAreCorrect(obj, \"foo\", 200, false, false, false);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.7-6-a-101",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-101.js",
+ "description": "Object.defineProperties - 'P' is accessor property, both properties.[[Get]] and P.[[Get]] are two different values (8.12.9 step 12)",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n\n function get_func() {\n return 10;\n }\n function set_func(value) {\n obj.setVerifyHelpProp = value;\n }\n\n Object.defineProperty(obj, \"foo\", {\n get: get_func,\n set: set_func,\n enumerable: true,\n configurable: true\n });\n\n function get_func2() {\n return 20;\n }\n\n Object.defineProperties(obj, {\n foo: {\n get: get_func2\n }\n });\n return accessorPropertyAttributesAreCorrect(obj, \"foo\", get_func2, set_func, \"setVerifyHelpProp\", true, true);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor) && fnExists(Object.defineProperties) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.7-6-a-102",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-102.js",
+ "description": "Object.defineProperties - 'P' is accessor property, P.[[Get]] is present and properties.[[Get]] is undefined (8.12.9 step 12)",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n\n function get_func() {\n return 10;\n }\n function set_func(value) {\n obj.setVerifyHelpProp = value;\n }\n\n Object.defineProperty(obj, \"foo\", {\n get: get_func,\n set: set_func,\n enumerable: true,\n configurable: true\n });\n\n Object.defineProperties(obj, {\n foo: {\n get: undefined\n }\n });\n return accessorPropertyAttributesAreCorrect(obj, \"foo\", undefined, set_func, \"setVerifyHelpProp\", true, true);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor) && fnExists(Object.defineProperties) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.7-6-a-103",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-103.js",
+ "description": "Object.defineProperties - 'P' is accessor property, P.[[Get]] is undefined and properties.[[Get]] is normal value (8.12.9 step 12)",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n\n function set_func(value) {\n obj.setVerifyHelpProp = value;\n }\n\n Object.defineProperty(obj, \"foo\", {\n get: undefined,\n set: set_func,\n enumerable: true,\n configurable: true\n });\n\n function get_func() {\n return 10;\n }\n\n Object.defineProperties(obj, {\n foo: {\n get: get_func\n }\n });\n return accessorPropertyAttributesAreCorrect(obj, \"foo\", get_func, set_func, \"setVerifyHelpProp\", true, true);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor) && fnExists(Object.defineProperties) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.7-6-a-104",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-104.js",
+ "description": "Object.defineProperties - 'P' is accessor property, both properties.[[Set]] and P.[[Set]] are two different values (8.12.9 step 12)",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n\n function get_func() {\n return 10;\n }\n\n function set_func() {\n return 10;\n }\n\n Object.defineProperty(obj, \"foo\", {\n get: get_func,\n set: set_func,\n enumerable: true,\n configurable: true\n });\n\n function set_func2(value) {\n obj.setVerifyHelpProp = value;\n }\n\n Object.defineProperties(obj, {\n foo: {\n set: set_func2\n }\n });\n return accessorPropertyAttributesAreCorrect(obj, \"foo\", get_func, set_func2, \"setVerifyHelpProp\", true, true);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor) && fnExists(Object.defineProperties) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.7-6-a-105",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-105.js",
+ "description": "Object.defineProperties - 'P' is accessor property, P.[[Set]] is present and properties.[[Set]] is undefined (8.12.9 step 12)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n function get_func() {\n return 10;\n }\n function set_func() {\n return 10;\n }\n\n Object.defineProperty(obj, \"property\", {\n get: get_func,\n set: set_func,\n enumerable: true,\n configurable: true\n });\n\n Object.defineProperties(obj, {\n property: {\n set: undefined\n }\n });\n\n var hasProperty = obj.hasOwnProperty(\"property\");\n var verifyGet = false;\n verifyGet = (obj.property === 10);\n\n var verifySet = false;\n var desc = Object.getOwnPropertyDescriptor(obj, \"property\");\n verifySet = (typeof desc.set === 'undefined');\n\n var verifyEnumerable = false;\n for (var p in obj) {\n if (p === \"property\") {\n verifyEnumerable = true;\n }\n }\n\n var verifyConfigurable = false;\n delete obj.property;\n verifyConfigurable = obj.hasOwnProperty(\"property\");\n\n return hasProperty && verifyGet && verifySet && verifyEnumerable && !verifyConfigurable;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.7-6-a-106",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-106.js",
+ "description": "Object.defineProperties - 'P' is accessor property, P.[[Set]] is undefined and properties.[[Set]] is normal value (8.12.9 step 12)",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n\n function get_func() {\n return 10;\n }\n\n Object.defineProperty(obj, \"foo\", {\n get: get_func,\n set: undefined,\n enumerable: true,\n configurable: true\n });\n\n function set_func(value) {\n obj.setVerifyHelpProp = value;\n }\n\n Object.defineProperties(obj, {\n foo: {\n set: set_func\n }\n });\n return accessorPropertyAttributesAreCorrect(obj, \"foo\", get_func, set_func, \"setVerifyHelpProp\", true, true);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor) && fnExists(Object.defineProperties) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.7-6-a-107",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-107.js",
+ "description": "Object.defineProperties - 'P' is accessor property, P.enumerable and properties.enumerable are different values (8.12.9 step 12)",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n\n function get_func() {\n return 10;\n }\n function set_func(value) {\n obj.setVerifyHelpProp = value;\n }\n\n Object.defineProperty(obj, \"foo\", {\n get: get_func,\n set: set_func,\n enumerable: true,\n configurable: true\n });\n\n Object.defineProperties(obj, {\n foo: {\n enumerable: false\n }\n });\n return accessorPropertyAttributesAreCorrect(obj, \"foo\", get_func, set_func, \"setVerifyHelpProp\", false, true);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor) && fnExists(Object.defineProperties) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.7-6-a-108",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-108.js",
+ "description": "Object.defineProperties - 'P' is accessor property, P.configurable is true and properties.configurable is false",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n\n function get_func() {\n return 10;\n }\n function set_func(value) {\n obj.setVerifyHelpProp = value;\n }\n\n Object.defineProperty(obj, \"foo\", {\n get: get_func,\n set: set_func,\n enumerable: true,\n configurable: true\n });\n\n Object.defineProperties(obj, {\n foo: {\n configurable: false\n }\n });\n return accessorPropertyAttributesAreCorrect(obj, \"foo\", get_func, set_func, \"setVerifyHelpProp\", true, false);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor) && fnExists(Object.defineProperties) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.7-6-a-109",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-109.js",
+ "description": "Object.defineProperties - 'P' is accessor property, several attributes values of P and properties are different (8.12.9 step 12)",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n\n function get_func1() {\n return 10;\n }\n function set_func1() { }\n\n Object.defineProperty(obj, \"foo\", {\n get: get_func1,\n set: set_func1,\n configurable: true\n });\n\n function get_func2() {\n return 20;\n }\n function set_func2(value) {\n obj.setVerifyHelpProp = value;\n }\n\n Object.defineProperties(obj, {\n foo: {\n get: get_func2,\n set: set_func2,\n configurable: false\n }\n });\n return accessorPropertyAttributesAreCorrect(obj, \"foo\", get_func2, set_func2, \"setVerifyHelpProp\", false, false);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor) && fnExists(Object.defineProperties) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.7-6-a-11",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-11.js",
+ "description": "Object.defineProperties - 'P' is inherited accessor property without a get function (8.12.9 step 1 ) ",
+ "test": "assertTrue((function testcase() {\n var proto = {};\n Object.defineProperty(proto, \"prop\", {\n set: function () { },\n configurable: false\n });\n var Con = function () { };\n Con.prototype = proto;\n\n var obj = new Con();\n\n Object.defineProperties(obj, {\n prop: {\n get: function () {\n return 12;\n },\n configurable: true\n }\n });\n return obj.hasOwnProperty(\"prop\") && obj.prop === 12;\n\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.7-6-a-110",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-110.js",
+ "description": "Object.defineProperties - all own properties (data property and accessor property)",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n\n function get_func() {\n return 10;\n }\n function set_func(value) {\n obj.setVerifyHelpProp = value;\n }\n\n var properties = {\n foo1: {\n value: 200,\n enumerable: true,\n writable: true,\n configurable: true\n },\n foo2: {\n get: get_func,\n set: set_func,\n enumerable: true,\n configurable: true\n }\n };\n\n Object.defineProperties(obj, properties);\n return dataPropertyAttributesAreCorrect(obj, \"foo1\", 200, true, true, true) && accessorPropertyAttributesAreCorrect(obj, \"foo2\", get_func, set_func, \"setVerifyHelpProp\", true, true);\n\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor) && fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-6-a-111",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-111.js",
+ "description": "Object.defineProperties - each properties are in list order",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n\n function get_func() {\n return 20;\n }\n\n function set_func() { }\n\n var properties = {\n a: {\n value: 100,\n enumerable: true,\n writable: true,\n configurable: true\n },\n b: {\n get: get_func,\n set: set_func,\n enumerable: true,\n configurable: true\n },\n c: {\n value: 200,\n enumerable: true,\n writable: true,\n configurable: true\n }\n };\n\n Object.defineProperties(obj, properties);\n return (obj[\"a\"] === 100 && obj[\"b\"] === 20 && obj[\"c\"] === 200);\n\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-6-a-112",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-112.js",
+ "description": "Object.defineProperties - 'O' is an Array, test the length property of 'O' is own data property (15.4.5.1 step 1)",
+ "test": "assertTrue((function testcase() {\n\n var arr = [0, 1];\n Object.defineProperty(arr, \"1\", {\n value: 1,\n configurable: false\n });\n try {\n\n Object.defineProperties(arr, {\n length: { value: 1 }\n });\n return false;\n } catch (ex) {\n var desc = Object.getOwnPropertyDescriptor(arr, \"length\");\n\n return ex instanceof TypeError && desc.value === 2 &&\n desc.writable && !desc.enumerable && !desc.configurable;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.7-6-a-113",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-113.js",
+ "description": "Object.defineProperties - 'O' is an Array, test the length property of 'O' is own data property that overrides an inherited data property (15.4.5.1 step 1)",
+ "test": "assertTrue((function testcase() {\n\n var arrProtoLen;\n var arr = [0, 1, 2];\n try {\n arrProtoLen = Array.prototype.length;\n Array.prototype.length = 0;\n\n Object.defineProperty(arr, \"2\", {\n configurable: false\n });\n\n Object.defineProperties(arr, {\n length: { value: 1 }\n });\n return false;\n } catch (e) {\n var desc = Object.getOwnPropertyDescriptor(arr, \"length\");\n\n return e instanceof TypeError && desc.value === 3 &&\n desc.writable && !desc.enumerable && !desc.configurable;\n } finally {\n Array.prototype.length = arrProtoLen;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.7-6-a-114",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-114.js",
+ "description": "Object.defineProperties - 'O' is an Array, 'P' is the length property of 'O', the [[Value]] field of 'desc' is absent, test every field in 'desc' is absent (15.4.5.1 step 3.a.i)",
+ "test": "assertTrue((function testcase() {\n var arr = [];\n\n Object.defineProperties(arr, { length: {} });\n\n var verifyValue = false;\n verifyValue = (arr.length === 0);\n\n var verifyWritable = false;\n arr.length = 2;\n verifyWritable = (arr.length === 2);\n\n var verifyEnumerable = false;\n for (var p in arr) {\n if (p === \"length\") {\n verifyEnumerable = true;\n }\n }\n\n var verifyConfigurable = false;\n delete arr.length;\n verifyConfigurable = arr.hasOwnProperty(\"length\");\n\n return verifyValue && verifyWritable && !verifyEnumerable && verifyConfigurable;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-6-a-115",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-115.js",
+ "description": "Object.defineProperties - 'O' is an Array, 'P' is the length property of 'O', the [[Value]] field of 'desc' is absent, test every field in 'desc' is same with corresponding attribute value of the length property in 'O' (15.4.5.1 step 3.a.i)",
+ "test": "assertTrue((function testcase() {\n var arr = [];\n\n Object.defineProperties(arr, {\n length: {\n writable: true,\n enumerable: false,\n configurable: false\n }\n });\n\n var verifyValue = false;\n verifyValue = (arr.length === 0);\n\n var verifyWritable = false;\n arr.length = 2;\n verifyWritable = (arr.length === 2);\n\n var verifyEnumerable = false;\n for (var p in arr) {\n if (p === \"length\") {\n verifyEnumerable = true;\n }\n }\n\n var verifyConfigurable = false;\n delete arr.length;\n verifyConfigurable = arr.hasOwnProperty(\"length\");\n\n return verifyValue && verifyWritable && !verifyEnumerable && verifyConfigurable;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-6-a-116",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-116.js",
+ "description": "Object.defineProperties - 'O' is an Array, 'P' is the length property of 'O', the [[Value]] field of 'desc' is absent, test TypeError is thrown when updating the [[Configurable]] attribute of the length property from false to true (15.4.5.1 step 3.a.i)",
+ "test": "assertTrue((function testcase() {\n\n var arr = [];\n\n try {\n Object.defineProperties(arr, {\n length: { configurable: true }\n });\n\n return false;\n } catch (e) {\n return (e instanceof TypeError);\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-6-a-117",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-117.js",
+ "description": "Object.defineProperties - 'O' is an Array, 'P' is the length property of 'O', the [[Value]] field of 'desc' is absent, test TypeError is thrown when updating the [[Enumerable]] attribute of the length property from false to true (15.4.5.1 step 3.a.i)",
+ "test": "assertTrue((function testcase() {\n\n var arr = [];\n\n try {\n Object.defineProperties(arr, {\n length: { enumerable: true }\n });\n\n return false;\n } catch (e) {\n return (e instanceof TypeError);\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-6-a-118",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-118.js",
+ "description": "Object.defineProperties - 'O' is an Array, 'P' is the length property of 'O', the [[Value]] field of 'desc' is absent, test TypeError is thrown when 'desc' is accessor descriptor (15.4.5.1 step 3.a.i)",
+ "test": "assertTrue((function testcase() {\n\n var arr = [];\n\n try {\n Object.defineProperties(arr, {\n length: {\n get: function () {\n return 2;\n }\n }\n });\n\n return false;\n } catch (e) {\n return e instanceof TypeError && arr.length === 0;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-6-a-119",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-119.js",
+ "description": "Object.defineProperties - 'O' is an Array, 'P' is the length property of 'O', the [[Value]] field of 'desc' is absent, test TypeError is thrown when updating the [[Writable]] attribute of the length property from false to true (15.4.5.1 step 3.a.i)",
+ "test": "assertTrue((function testcase() {\n\n var arr = [];\n\n Object.defineProperty(arr, \"length\", {\n writable: false\n });\n\n try {\n Object.defineProperties(arr, { \n length: { writable: true } \n });\n\n return false;\n } catch (e) {\n return (e instanceof TypeError);\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.7-6-a-12",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-12.js",
+ "description": "Object.defineProperties - 'O' is a Function object which implements its own [[GetOwnProperty]] method to get 'P' (8.12.9 step 1 ) ",
+ "test": "assertTrue((function testcase() {\n var fun = function () { };\n\n Object.defineProperty(fun, \"prop\", {\n value: 11,\n configurable: false\n });\n\n try {\n Object.defineProperties(fun, {\n prop: {\n value: 12,\n configurable: true\n }\n });\n return false;\n } catch (e) {\n return e instanceof TypeError && dataPropertyAttributesAreCorrect(fun, \"prop\", 11, false, false, false);\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.7-6-a-120",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-120.js",
+ "description": "Object.defineProperties - 'O' is an Array, 'P' is the length property of 'O', the [[Value]] field of 'desc' is absent, test updating the [[Writable]] attribute of the length property from true to false (15.4.5.1 step 3.a.i)",
+ "test": "assertTrue((function testcase() {\n\n var arr = [];\n\n try {\n Object.defineProperties(arr, {\n length: { writable: false }\n });\n\n return dataPropertyAttributesAreCorrect(arr, \"length\", 0, false, false, false);\n } catch (e) {\n return false;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-6-a-121",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-121.js",
+ "description": "Object.defineProperties - 'O' is an Array, 'P' is the length property of 'O', test RangeError is thrown when setting the [[Value]] field of 'desc' to undefined (15.4.5.1 step 3.c)",
+ "test": "assertTrue((function testcase() {\n\n var arr = [];\n\n try {\n Object.defineProperties(arr, {\n length: { value: undefined }\n });\n\n return false;\n } catch (e) {\n return e instanceof RangeError && arr.length === 0;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-6-a-122",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-122.js",
+ "description": "Object.defineProperties - 'O' is an Array, 'P' is the length property of 'O', test setting the [[Value]] field of 'desc' to null actuall is set to 0 (15.4.5.1 step 3.c)",
+ "test": "assertTrue((function testcase() {\n\n var arr = [0, 1];\n\n Object.defineProperties(arr, {\n length: { value: null }\n });\n return arr.length === 0;\n\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-6-a-123",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-123.js",
+ "description": "Object.defineProperties - 'O' is an Array, 'name' is the length property of 'O', test the [[Value]] field of 'desc' is a boolean with value false (15.4.5.1 step 3.c)",
+ "test": "assertTrue((function testcase() {\n\n var arr = [0, 1];\n\n Object.defineProperties(arr, {\n length: { value: false }\n });\n return arr.length === 0;\n\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-6-a-124",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-124.js",
+ "description": "Object.defineProperties - 'O' is an Array, 'name' is the length property of 'O', test the [[Value]] field of 'desc' is a boolean with value true (15.4.5.1 step 3.c)",
+ "test": "assertTrue((function testcase() {\n\n var arr = [];\n\n Object.defineProperties(arr, {\n length: { value: true }\n });\n return arr.length === 1;\n\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-6-a-125",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-125.js",
+ "description": "Object.defineProperties - 'O' is an Array, 'name' is the length property of 'O', test the [[Value]] field of 'desc' is 0 (15.4.5.1 step 3.c)",
+ "test": "assertTrue((function testcase() {\n\n var arr = [0, 1];\n\n Object.defineProperties(arr, {\n length: { value: 0 }\n });\n return arr.length === 0;\n\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-6-a-126",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-126.js",
+ "description": "Object.defineProperties - 'O' is an Array, 'name' is the length property of 'O', test the [[Value]] field of 'desc' is +0 (15.4.5.1 step 3.c)",
+ "test": "assertTrue((function testcase() {\n\n var arr = [0, 1];\n\n Object.defineProperties(arr, {\n length: { value: +0 }\n });\n return arr.length === 0;\n\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-6-a-127",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-127.js",
+ "description": "Object.defineProperties - 'O' is an Array, 'name' is the length property of 'O', test the [[Value]] field of 'desc' is -0 (15.4.5.1 step 3.c)",
+ "test": "assertTrue((function testcase() {\n\n var arr = [0, 1];\n\n Object.defineProperties(arr, {\n length: { value: -0 }\n });\n return arr.length === 0;\n\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-6-a-128",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-128.js",
+ "description": "Object.defineProperties - 'O' is an Array, 'name' is the length property of 'O', test the [[Value]] field of 'desc' is positive number (15.4.5.1 step 3.c)",
+ "test": "assertTrue((function testcase() {\n\n var arr = [];\n\n Object.defineProperties(arr, {\n length: { value: 12 }\n });\n return arr.length === 12;\n\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-6-a-129",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-129.js",
+ "description": "Object.defineProperties - 'O' is an Array, 'name' is the length property of 'O', test the [[Value]] field of 'desc' is negative number (15.4.5.1 step 3.c)",
+ "test": "assertTrue((function testcase() {\n\n var arr = [];\n\n try {\n Object.defineProperties(arr, {\n length: {\n value: -9\n }\n });\n return false;\n } catch (e) {\n return e instanceof RangeError && arr.length === 0;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-6-a-13",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-13.js",
+ "description": "Object.defineProperties - 'O' is an Array object which implements its own [[GetOwnProperty]] method to get 'P' (8.12.9 step 1 ) ",
+ "test": "assertTrue((function testcase() {\n var arr = [];\n\n Object.defineProperty(arr, \"prop\", {\n value: 11,\n configurable: false\n });\n\n try {\n Object.defineProperties(arr, {\n prop: {\n value: 12,\n configurable: true\n }\n });\n return false;\n } catch (e) {\n return e instanceof TypeError && dataPropertyAttributesAreCorrect(arr, \"prop\", 11, false, false, false);\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.7-6-a-130",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-130.js",
+ "description": "Object.defineProperties - 'O' is an Array, 'name' is the length property of 'O', test the [[Value]] field of 'desc' is +Infinity (15.4.5.1 step 3.c)",
+ "test": "assertTrue((function testcase() {\n\n var arr = [];\n\n try {\n Object.defineProperties(arr, {\n length: {\n value: +Infinity\n }\n });\n return false;\n } catch (e) {\n return e instanceof RangeError && arr.length === 0;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-6-a-131",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-131.js",
+ "description": "Object.defineProperties - 'O' is an Array, 'name' is the length property of 'O', test the [[Value]] field of 'desc' is -Infinity (15.4.5.1 step 3.c)",
+ "test": "assertTrue((function testcase() {\n\n var arr = [];\n\n try {\n Object.defineProperties(arr, {\n length: {\n value: -Infinity\n }\n });\n return false;\n } catch (e) {\n return e instanceof RangeError && arr.length === 0;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-6-a-132",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-132.js",
+ "description": "Object.defineProperties - 'O' is an Array, 'name' is the length property of 'O', test the [[Value]] field of 'desc' is NaN (15.4.5.1 step 3.c)",
+ "test": "assertTrue((function testcase() {\n\n var arr = [];\n\n try {\n Object.defineProperties(arr, {\n length: {\n value: NaN\n }\n });\n\n return false;\n } catch (e) {\n return e instanceof RangeError && arr.length === 0;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-6-a-133",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-133.js",
+ "description": "Object.defineProperties - 'O' is an Array, 'name' is the length property of 'O', test the [[Value]] field of 'desc' is a string containing a positive number (15.4.5.1 step 3.c)",
+ "test": "assertTrue((function testcase() {\n\n var arr = [];\n\n Object.defineProperties(arr, {\n length: {\n value: \"2\"\n }\n });\n return arr.length === 2;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-6-a-134",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-134.js",
+ "description": "Object.defineProperties - 'O' is an Array, 'name' is the length property of 'O', test the [[Value]] field of 'desc' is a string containing a negative number (15.4.5.1 step 3.c)",
+ "test": "assertTrue((function testcase() {\n\n var arr = [];\n\n try {\n Object.defineProperties(arr, {\n length: {\n value: \"-42\"\n }\n });\n return false;\n } catch (e) {\n return e instanceof RangeError && arr.length === 0;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-6-a-135",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-135.js",
+ "description": "Object.defineProperties - 'O' is an Array, 'name' is the length property of 'O', test the [[Value]] field of 'desc' is a string containing a decimal number (15.4.5.1 step 3.c)",
+ "test": "assertTrue((function testcase() {\n\n var arr = [];\n\n try {\n Object.defineProperties(arr, {\n length: {\n value: \"200.59\"\n }\n });\n return false;\n } catch (e) {\n return e instanceof RangeError && arr.length === 0;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-6-a-136",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-136.js",
+ "description": "Object.defineProperties - 'O' is an Array, 'name' is the length property of 'O', test the [[Value]] field of 'desc' is a string containing +Infinity (15.4.5.1 step 3.c)",
+ "test": "assertTrue((function testcase() {\n\n var arr = [];\n\n try {\n Object.defineProperties(arr, {\n length: {\n value: \"+Infinity\"\n }\n });\n return false;\n } catch (e) {\n return e instanceof RangeError && arr.length === 0;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-6-a-137",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-137.js",
+ "description": "Object.defineProperties - 'O' is an Array, 'name' is the length property of 'O', test the [[Value]] field of 'desc' is a string containing -Infinity (15.4.5.1 step 3.c)",
+ "test": "assertTrue((function testcase() {\n\n var arr = [];\n\n try {\n Object.defineProperties(arr, {\n length: {\n value: \"-Infinity\"\n }\n });\n return false;\n } catch (e) {\n return e instanceof RangeError && arr.length === 0;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-6-a-138",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-138.js",
+ "description": "Object.defineProperties - 'O' is an Array, 'name' is the length property of 'O', test the [[Value]] field of 'desc' is a string containing an exponential number (15.4.5.1 step 3.c)",
+ "test": "assertTrue((function testcase() {\n\n var arr = [];\n\n Object.defineProperties(arr, {\n length: {\n value: \"2E3\"\n }\n });\n return arr.length === 2E3;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-6-a-139",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-139.js",
+ "description": "Object.defineProperties - 'O' is an Array, 'name' is the length property of 'O', test the [[Value]] field of 'desc' is a string containing an hex number (15.4.5.1 step 3.c)",
+ "test": "assertTrue((function testcase() {\n\n var arr = [];\n\n Object.defineProperties(arr, {\n length: {\n value: \"0x00B\"\n }\n });\n return arr.length === 0x00B;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-6-a-14",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-14.js",
+ "description": "Object.defineProperties - 'O' is a String object which implements its own [[GetOwnProperty]] method to get 'P' (8.12.9 step 1 ) ",
+ "test": "assertTrue((function testcase() {\n var str = new String();\n\n Object.defineProperty(str, \"prop\", {\n value: 11,\n configurable: false\n });\n\n try {\n Object.defineProperties(str, {\n prop: {\n value: 12,\n configurable: true\n }\n });\n return false;\n } catch (e) {\n return e instanceof TypeError && dataPropertyAttributesAreCorrect(str, \"prop\", 11, false, false, false);\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.7-6-a-140",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-140.js",
+ "description": "Object.defineProperties - 'O' is an Array, 'name' is the length property of 'O', test the [[Value]] field of 'desc' is a string containing an leading zero number (15.4.5.1 step 3.c)",
+ "test": "assertTrue((function testcase() {\n\n var arr = [];\n\n Object.defineProperties(arr, {\n length: {\n value: \"0002.0\"\n }\n });\n return arr.length === 2;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-6-a-141",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-141.js",
+ "description": "Object.defineProperties - 'O' is an Array, 'P' is the length property of 'O', test the [[Value]] field of 'desc' is a string which doesn't convert to a number (15.4.5.1 step 3.c)",
+ "test": "assertTrue((function testcase() {\n\n var arr = [];\n\n try {\n Object.defineProperties(arr, {\n length: {\n value: \"two\"\n }\n });\n return false;\n } catch (e) {\n return e instanceof RangeError && arr.length === 0;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-6-a-142",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-142.js",
+ "description": "Object.defineProperties - 'O' is an Array, 'P' is the length property of 'O', test the [[Value]] field of 'desc' is an Object which has an own toString method (15.4.5.1 step 3.c)",
+ "test": "assertTrue((function testcase() {\n\n var arr = [];\n\n Object.defineProperties(arr, {\n length: {\n value: {\n toString: function () {\n return '2';\n }\n }\n }\n });\n\n return arr.length === 2;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-6-a-143",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-143.js",
+ "description": "Object.defineProperties - 'O' is an Array, 'name' is the length property of 'O', test the [[Value]] field of 'desc' is an Object which has an own valueOf method (15.4.5.1 step 3.c)",
+ "test": "assertTrue((function testcase() {\n\n var arr = [];\n\n Object.defineProperties(arr, {\n length: {\n value: {\n valueOf: function () {\n return 2;\n }\n }\n }\n });\n return arr.length === 2;\n\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-6-a-144",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-144.js",
+ "description": "Object.defineProperties - 'O' is an Array, 'name' is the length property of 'O', test the [[Value]] field of 'desc' is an Object which has an own valueOf method that returns an object and toString method that returns a string (15.4.5.1 step 3.c)",
+ "test": "assertTrue((function testcase() {\n\n var arr = [];\n var toStringAccessed = false;\n var valueOfAccessed = false;\n\n Object.defineProperties(arr, {\n length: {\n value: {\n toString: function () {\n toStringAccessed = true;\n return '2';\n },\n\n valueOf: function () {\n valueOfAccessed = true;\n return {};\n }\n }\n }\n });\n return arr.length === 2 && toStringAccessed && valueOfAccessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-6-a-145",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-145.js",
+ "description": "Object.defineProperties - 'O' is an Array, 'name' is the length property of 'O', test the [[Value]] field of 'desc' is an Object which has an own toString and valueOf method (15.4.5.1 step 3.c)",
+ "test": "assertTrue((function testcase() {\n\n var arr = [];\n var toStringAccessed = false;\n var valueOfAccessed = false;\n\n Object.defineProperties(arr, {\n length: {\n value: {\n toString: function () {\n toStringAccessed = true;\n return '2';\n },\n\n valueOf: function () {\n valueOfAccessed = true;\n return 3;\n }\n }\n }\n });\n return arr.length === 3 && !toStringAccessed && valueOfAccessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-6-a-146",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-146.js",
+ "description": "Object.defineProperties - 'O' is an Array, 'name' is the length property of 'O', test TypeError is thrown when the [[Value]] field of 'desc' is an Object that both toString and valueOf wouldn't return primitive value (15.4.5.1 step 3.c)",
+ "test": "assertTrue((function testcase() {\n\n var arr = [];\n var toStringAccessed = false;\n var valueOfAccessed = false;\n\n try {\n Object.defineProperties(arr, {\n length: {\n value: {\n toString: function () {\n toStringAccessed = true;\n return {};\n },\n\n valueOf: function () {\n valueOfAccessed = true;\n return {};\n }\n }\n }\n });\n\n return false;\n } catch (e) {\n return (e instanceof TypeError) && toStringAccessed && valueOfAccessed;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-6-a-147",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-147.js",
+ "description": "Object.defineProperties - 'O' is an Array, 'name' is the length property of 'O', test using inherited valueOf method when the [[Value]] field of 'desc' is an Objec with an own toString and inherited valueOf methods (15.4.5.1 step 3.c)",
+ "test": "assertTrue((function testcase() {\n\n var arr = [];\n var toStringAccessed = false;\n var valueOfAccessed = false;\n\n var proto = {\n value: {\n valueOf: function () {\n valueOfAccessed = true;\n return 2;\n }\n }\n };\n\n var Con = function () { };\n Con.prototype = proto;\n\n var child = new Con();\n Object.defineProperty(child, \"value\", {\n value: {\n toString: function () {\n toStringAccessed = true;\n return 3;\n }\n }\n });\n\n Object.defineProperties(arr, {\n length: child\n });\n return arr.length === 3 && toStringAccessed && !valueOfAccessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.7-6-a-148",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-148.js",
+ "description": "Object.defineProperties - 'O' is an Array, 'name' is the length property of 'O', test RangeError is thrown when the [[Value]] field of 'desc' is positive non-integer values (15.4.5.1 step 3.c)",
+ "test": "assertTrue((function testcase() {\n\n var arr = [];\n\n try {\n Object.defineProperties(arr, {\n length: {\n value: 123.5\n }\n });\n\n return false;\n } catch (e) {\n return e instanceof RangeError && arr.length === 0;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-6-a-149",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-149.js",
+ "description": "Object.defineProperties - 'O' is an Array, 'name' is the length property of 'O', test RangeError is thrown when the [[Value]] field of 'desc' is negative non-integer values (15.4.5.1 step 3.c)",
+ "test": "assertTrue((function testcase() {\n\n var arr = [];\n\n try {\n Object.defineProperties(arr, {\n length: {\n value: -4294967294.5\n }\n });\n return false;\n } catch (e) {\n return e instanceof RangeError && arr.length === 0;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-6-a-15",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-15.js",
+ "description": "Object.defineProperties - 'O' is a Boolean object which implements its own [[GetOwnProperty]] method to get 'P' (8.12.9 step 1 ) ",
+ "test": "assertTrue((function testcase() {\n \n var obj = new Boolean(false);\n\n Object.defineProperty(obj, \"prop\", {\n value: 11,\n configurable: false\n });\n\n try {\n Object.defineProperties(obj, {\n prop: {\n value: 12,\n configurable: true\n }\n });\n return false;\n } catch (e) {\n return e instanceof TypeError && dataPropertyAttributesAreCorrect(obj, \"prop\", 11, false, false, false);\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.7-6-a-150",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-150.js",
+ "description": "Object.defineProperties - 'O' is an Array, 'name' is the length property of 'O', test the [[Value]] field of 'desc' is boundary value 2^32 - 2 (15.4.5.1 step 3.c)",
+ "test": "assertTrue((function testcase() {\n\n var arr = [];\n\n Object.defineProperties(arr, {\n length: {\n value: 4294967294\n }\n });\n\n return arr.length === 4294967294;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-6-a-151",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-151.js",
+ "description": "Object.defineProperties - 'O' is an Array, 'name' is the length property of 'O', test the [[Value]] field of 'desc' is boundary value 2^32 - 1 (15.4.5.1 step 3.c)",
+ "test": "assertTrue((function testcase() {\n\n var arr = [];\n\n Object.defineProperties(arr, {\n length: {\n value: 4294967295\n }\n });\n\n return arr.length === 4294967295;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-6-a-152",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-152.js",
+ "description": "Object.defineProperties - 'O' is an Array, 'name' is the length property of 'O', test RangeError is thrown when the [[Value]] field of 'desc' is boundary value 2^32 (15.4.5.1 step 3.c)",
+ "test": "assertTrue((function testcase() {\n\n var arr = [];\n try {\n Object.defineProperties(arr, {\n length: {\n value: 4294967296\n }\n });\n return false;\n } catch (e) {\n return e instanceof RangeError && arr.length === 0;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-6-a-153",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-153.js",
+ "description": "Object.defineProperties - 'O' is an Array, 'name' is the length property of 'O', test RangeError is thrown when the [[Value]] field of 'desc' is boundary value 2^32 + 1 (15.4.5.1 step 3.c)",
+ "test": "assertTrue((function testcase() {\n\n var arr = [];\n try {\n Object.defineProperties(arr, {\n length: {\n value: 4294967297\n }\n });\n return false;\n } catch (e) {\n return e instanceof RangeError && arr.length === 0;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-6-a-155",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-155.js",
+ "description": "Object.defineProperties - 'O' is an Array, 'P' is the length property of 'O', test the [[Value]] field of 'desc' which is greater than value of the length property is defined into 'O' without deleting any property with large index named (15.4.5.1 step 3.f)",
+ "test": "assertTrue((function testcase() {\n\n var arr = [0, , 2];\n\n try {\n Object.defineProperties(arr, {\n length: {\n value: 5\n }\n });\n\n return arr.length === 5 && arr[0] === 0 && !arr.hasOwnProperty(\"1\") && arr[2] === 2;\n } catch (e) {\n return false;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-6-a-156",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-156.js",
+ "description": "Object.defineProperties - 'O' is an Array, 'P' is the length property of 'O', test the [[Value]] field of 'desc' which equals to value of the length property is defined into 'O' without deleting any property with large index named (15.4.5.1 step 3.f)",
+ "test": "assertTrue((function testcase() {\n\n var arr = [0, , 2];\n try {\n Object.defineProperties(arr, {\n length: {\n value: 3\n }\n });\n\n return arr.length === 3 && arr[0] === 0 && !arr.hasOwnProperty(\"1\") && arr[2] === 2;\n } catch (e) {\n return false;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-6-a-157",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-157.js",
+ "description": "Object.defineProperties - 'O' is an Array, 'P' is the length property of 'O', test the [[Value]] field of 'desc' which is less than value of the length property is defined into 'O' with deleting properties with large index named (15.4.5.1 step 3.f)",
+ "test": "assertTrue((function testcase() {\n\n var arr = [0, 1];\n\n Object.defineProperties(arr, {\n length: {\n value: 1\n }\n });\n return arr.length === 1 && !arr.hasOwnProperty(\"1\") && arr[0] === 0;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-6-a-158",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-158.js",
+ "description": "Object.defineProperties - 'O' is an Array, 'P' is the length property of 'O', the [[Value]] field of 'desc' is greater than value of the length property, test TypeError is thrown when the length property is not writable (15.4.5.1 step 3.f.i)",
+ "test": "assertTrue((function testcase() {\n\n var arr = [];\n\n Object.defineProperty(arr, \"length\", {\n writable: false\n });\n\n try {\n Object.defineProperties(arr, {\n length: {\n value: 12\n }\n });\n\n return false;\n } catch (e) {\n return e instanceof TypeError && arr.length === 0;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.7-6-a-159",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-159.js",
+ "description": "Object.defineProperties - 'O' is an Array, 'P' is the length property of 'O', the [[Value]] field of 'desc' equals to value of the length property, test TypeError wouldn't be thrown when the length property is not writable (15.4.5.1 step 3.f.i)",
+ "test": "assertTrue((function testcase() {\n\n var arr = [];\n\n Object.defineProperty(arr, \"length\", {\n writable: false\n });\n\n try {\n Object.defineProperties(arr, {\n length: {\n value: 0\n }\n });\n return true && arr.length === 0;\n } catch (e) {\n return false;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.7-6-a-16",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-16.js",
+ "description": "Object.defineProperties - 'O' is a Number object which implements its own [[GetOwnProperty]] method to get 'P' (8.12.9 step 1 ) ",
+ "test": "assertTrue((function testcase() {\n\n var obj = new Number(-9);\n\n Object.defineProperty(obj, \"prop\", {\n value: 11,\n configurable: false\n });\n\n try {\n Object.defineProperties(obj, {\n prop: {\n value: 12,\n configurable: true\n }\n });\n return false;\n } catch (e) {\n return e instanceof TypeError && dataPropertyAttributesAreCorrect(obj, \"prop\", 11, false, false, false);\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.7-6-a-160",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-160.js",
+ "description": "Object.defineProperties - 'O' is an Array, 'P' is the length property of 'O', the [[Value]] field of 'desc' is less than value of the length property, test TypeError is thrown when the [[Writable]] attribute of the length property is false (15.4.5.1 step 3.g)",
+ "test": "assertTrue((function testcase() {\n\n var arr = [0, 1];\n\n Object.defineProperty(arr, \"length\", {\n writable: false\n });\n\n try {\n Object.defineProperties(arr, {\n length: {\n value: 0\n }\n });\n return false;\n } catch (e) {\n return e instanceof TypeError && arr.length === 2 && arr[0] === 0 && arr[1] === 1;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.7-6-a-161",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-161.js",
+ "description": "Object.defineProperties - 'O' is an Array, 'P' is the length property of 'O', the [[Value]] field of 'desc' is less than value of the length property, test the [[Writable]] attribute of the length property is set to true at last after deleting properties with large index named if the [[Writable]] field of 'desc' is absent (15.4.5.1 step 3.h)",
+ "test": "assertTrue((function testcase() {\n\n var arr = [0, 1];\n\n Object.defineProperties(arr, {\n length: {\n value: 1\n }\n });\n\n arr.length = 10; //try to overwrite length value of arr\n return !arr.hasOwnProperty(\"1\") && arr.length === 10 && arr[0] === 0;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-6-a-162",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-162.js",
+ "description": "Object.defineProperties - 'O' is an Array, 'P' is the length property of 'O', the [[Value]] field of 'desc' is less than value of the length property, test the [[Writable]] attribute of the length property is set to true at last after deleting properties with large index named if the [[Writable]] field of 'desc' is true (15.4.5.1 step 3.h)",
+ "test": "assertTrue((function testcase() {\n \n var arr = [0, 1];\n\n Object.defineProperties(arr, {\n length: {\n value: 1,\n writable: true\n }\n });\n\n arr.length = 10; //try to overwrite length value of arr\n return !arr.hasOwnProperty(\"1\") && arr.length === 10 && arr[0] === 0;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-6-a-163",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-163.js",
+ "description": "Object.defineProperties - 'O' is an Array, 'P' is the length property of 'O', the [[Value]] field of 'desc' is less than value of the length property, test the [[Writable]] attribute of the length property is set to false at last after deleting properties with large index named if the [[Writable]] field of 'desc' is false (15.4.5.1 step 3.i.ii)",
+ "test": "assertTrue((function testcase() {\n \n var arr = [0, 1];\n\n Object.defineProperties(arr, {\n length: {\n value: 1,\n writable: false\n }\n });\n\n arr.length = 10; //try to overwrite length value of arr\n return !arr.hasOwnProperty(\"1\") && arr.length === 1 && arr[0] === 0;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-6-a-164",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-164.js",
+ "description": "Object.defineProperties - 'O' is an Array, 'P' is the length property of 'O', the [[Value]] field of 'desc' is less than value of the length property, test the [[Writable]] attribute of the length property in 'O' is set as true before deleting properties with large index named (15.4.5.1 step 3.i.iii)",
+ "test": "assertTrue((function testcase() {\n\n var arr = [0, 1, 2];\n var result = 0;\n\n try {\n Object.defineProperty(arr, \"1\", {\n configurable: false\n });\n\n Object.defineProperties(arr, {\n length: {\n value: 0,\n writable: false\n }\n });\n\n return false;\n } catch (e) {\n result = (arr.length === 2);\n arr.length = 10;\n return (e instanceof TypeError) && result && arr.length === 2;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.7-6-a-165",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-165.js",
+ "description": "Object.defineProperties - 'O' is an Array, 'P' is the length property of 'O', the [[Value]] field of 'desc' is less than value of the length property, test the length property is decreased by 1 (15.4.5.1 step 3.l.i)",
+ "test": "assertTrue((function testcase() {\n\n var arr = [0, 1, 2];\n\n Object.defineProperty(arr, \"1\", {\n configurable: false\n });\n\n Object.defineProperty(arr, \"2\", {\n configurable: true\n });\n\n try {\n Object.defineProperties(arr, {\n length: {\n value: 1\n }\n });\n return false;\n } catch (e) {\n return e instanceof TypeError && arr.length === 2 &&\n !arr.hasOwnProperty(\"2\") && arr[0] === 0 && arr[1] === 1;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.7-6-a-166",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-166.js",
+ "description": "Object.defineProperties - 'O' is an Array, 'P' is the length property of 'O', the [[Value]] field of 'desc' is less than value of the length property, test the [[Configurable]] attribute of own data property with large index named in 'O' can stop deleting index named properties (15.4.5.1 step 3.l.ii)",
+ "test": "assertTrue((function testcase() {\n\n var arr = [0, 1];\n\n try {\n Object.defineProperty(arr, \"1\", {\n configurable: false\n });\n\n Object.defineProperties(arr, {\n length: {\n value: 1\n }\n });\n\n return false;\n } catch (e) {\n return (e instanceof TypeError) && arr.length === 2 &&\n arr.hasOwnProperty(\"1\") && arr[0] === 0 && arr[1] === 1;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.7-6-a-167",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-167.js",
+ "description": "Object.defineProperties - 'O' is an Array, 'P' is the length property of 'O', the [[Value]] field of 'desc' is less than value of the length property, test the [[Configurable]] attribute of inherited data property with large index named in 'O' can't stop deleting index named properties (15.4.5.1 step 3.l.ii)",
+ "test": "assertTrue((function testcase() {\n\n var arr = [0, 1];\n try {\n Array.prototype[1] = 2; //we are not allowed to set the [[Configurable]] attribute of property \"1\" to false here, since Array.prototype is a global object, and non-configurbale property can't revert to configurable\n\n Object.defineProperties(arr, {\n length: {\n value: 1\n }\n });\n\n return arr.length === 1 && !arr.hasOwnProperty(\"1\") && arr[0] === 0 && Array.prototype[1] === 2;\n } finally {\n delete Array.prototype[1];\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-6-a-168",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-168.js",
+ "description": "Object.defineProperties - 'O' is an Array, 'P' is the length property of 'O', the [[Value]] field of 'desc' is less than value of the length property, test the [[Configurable]] attribute of own data property with large index named in 'O' that overrides inherited data property can stop deleting index named properties (15.4.5.1 step 3.l.ii)",
+ "test": "assertTrue((function testcase() {\n \n var arr = [0, 1];\n try {\n Object.defineProperty(arr, \"1\", {\n configurable: false\n });\n\n Array.prototype[1] = 2;\n\n Object.defineProperties(arr, {\n length: {\n value: 1\n }\n });\n return false;\n } catch (e) {\n return e instanceof TypeError && arr.length === 2 &&\n arr.hasOwnProperty(\"1\") && arr[0] === 0 && arr[1] === 1;\n } finally {\n delete Array.prototype[1];\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.7-6-a-169",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-169.js",
+ "description": "Object.defineProperties - 'O' is an Array, 'P' is the length property of 'O', the [[Value]] field of 'desc' is less than value of the length property, test the [[Configurable]] attribute of own data property with large index named in 'O' that overrides inherited accessor property can stop deleting index named properties (15.4.5.1 step 3.l.ii)",
+ "test": "assertTrue((function testcase() {\n \n var arr = [0, 1];\n try {\n Object.defineProperty(arr, \"1\", {\n configurable: false\n });\n\n Object.defineProperty(Array.prototype, \"1\", {\n get: function () {\n return 2;\n },\n configurable: true\n });\n\n Object.defineProperties(arr, {\n length: {\n value: 1\n }\n });\n\n return false;\n } catch (e) {\n return e instanceof TypeError && arr.length === 2 && arr.hasOwnProperty(\"1\") &&\n arr[0] === 0 && arr[1] === 1 && Array.prototype[1] === 2;\n } finally {\n delete Array.prototype[1];\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.2.3.7-6-a-17",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-17.js",
+ "description": "Object.defineProperties - 'O' is the Math object which implements its own [[GetOwnProperty]] method to get 'P' (8.12.9 step 1 ) ",
+ "test": "assertTrue((function testcase() {\n\n try {\n Object.defineProperty(Math, \"prop\", {\n value: 11,\n writable: true,\n configurable: true\n });\n var hasProperty = Math.hasOwnProperty(\"prop\") && Math.prop === 11;\n\n Object.defineProperties(Math, {\n prop: {\n value: 12\n }\n });\n return hasProperty && Math.prop === 12;\n } finally {\n delete Math.prop;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.7-6-a-170",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-170.js",
+ "description": "Object.defineProperties - 'O' is an Array, 'P' is the length property of 'O', the [[Value]] field of 'desc' is less than value of the length property, test the [[Configurable]] attribute of own accessor property with large index named in 'O' can stop deleting index named properties (15.4.5.1 step 3.l.ii)",
+ "test": "assertTrue((function testcase() {\n\n var arr = [0, 1];\n\n try {\n Object.defineProperty(arr, \"1\", {\n get: function () {\n return 1;\n },\n configurable: false\n });\n\n Object.defineProperties(arr, {\n length: {\n value: 1\n }\n });\n\n return false;\n } catch (e) {\n return (e instanceof TypeError) && arr.length === 2 &&\n arr.hasOwnProperty(\"1\") && arr[0] === 0 && arr[1] === 1;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.2.3.7-6-a-171",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-171.js",
+ "description": "Object.defineProperties - 'O' is an Array, 'P' is the length property of 'O', the [[Value]] field of 'desc' is less than value of the length property, test the [[Configurable]] attribute of inherited accessor property with large index named in 'O' can't stop deleting index named properties (15.4.5.1 step 3.l.ii)",
+ "test": "assertTrue((function testcase() {\n\n var arr = [0, 1];\n try {\n Object.defineProperty(Array.prototype, \"1\", {\n get: function () {\n return 1;\n },\n configurable: true //we are not allowed to set the [[Configurable]] attribute of property \"1\" to false here, since Array.prototype is a global object, and non-configurbale property can't revert to configurable\n });\n\n Object.defineProperties(arr, {\n length: {\n value: 1\n }\n });\n\n return arr.length === 1 && !arr.hasOwnProperty(\"1\") && arr[0] === 0 && Array.prototype[1] === 1;\n } finally {\n delete Array.prototype[1];\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.2.3.7-6-a-172",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-172.js",
+ "description": "Object.defineProperties - 'O' is an Array, 'P' is the length property of 'O', the [[Value]] field of 'desc' is less than value of the length property, test the [[Configurable]] attribute of own accessor property with large index named in 'O' that overrides inherited data property can stop deleting index named properties (15.4.5.1 step 3.l.ii)",
+ "test": "assertTrue((function testcase() {\n \n var arr = [0, 1];\n try {\n Object.defineProperty(arr, \"1\", {\n get: function () {\n return 2;\n },\n configurable: false\n });\n\n Array.prototype[1] = 3;\n\n Object.defineProperties(arr, {\n length: {\n value: 1\n }\n });\n return false;\n } catch (e) {\n return e instanceof TypeError && arr.length === 2 &&\n arr.hasOwnProperty(\"1\") && arr[0] === 0 && arr[1] === 2;\n } finally {\n delete Array.prototype[1];\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.2.3.7-6-a-173",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-173.js",
+ "description": "Object.defineProperties - 'O' is an Array, 'P' is the length property of 'O', the [[Value]] field of 'desc' is less than value of the length property, test the [[Configurable]] attribute of own accessor property with large index named in 'O' that overrides inherited accessor property can stop deleting index named properties (15.4.5.1 step 3.l.ii)",
+ "test": "assertTrue((function testcase() {\n\n var arr = [0, 1];\n try {\n Object.defineProperty(arr, \"1\", {\n get: function () {\n return 1;\n },\n configurable: false\n });\n\n Object.defineProperty(Array.prototype, \"1\", {\n get: function () {\n return 2;\n },\n configurable: true\n });\n\n Object.defineProperties(arr, {\n length: {\n value: 1\n }\n });\n return false;\n } catch (e) {\n return e instanceof TypeError && arr.length === 2 && arr.hasOwnProperty(\"1\") &&\n arr[0] === 0 && arr[1] === 1 && Array.prototype[1] === 2;\n } finally {\n delete Array.prototype[1];\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.2.3.7-6-a-174",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-174.js",
+ "description": "Object.defineProperties - 'O' is an Array, 'P' is the length property of 'O', the [[Value]] field of 'desc' is less than value of the length property, test the configurable large index named property of 'O' can be deleted (15.4.5.1 step 3.l.ii)",
+ "test": "assertTrue((function testcase() {\n\n var arr = [0, 1];\n\n Object.defineProperties(arr, {\n length: {\n value: 1\n }\n });\n\n return !arr.hasOwnProperty(\"1\");\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-6-a-175",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-175.js",
+ "description": "Object.defineProperties - 'O' is an Array, 'P' is the length property of 'O', the [[Value]] field of 'desc' is less than value of the length property, test value of the length property is set to the last non-configurable index named property of 'O' plus 1 (15.4.5.1 step 3.l.iii.1)",
+ "test": "assertTrue((function testcase() {\n\n var arr = [0, 1, 2, 3];\n\n Object.defineProperty(arr, \"1\", {\n configurable: false\n });\n\n try {\n Object.defineProperties(arr, {\n length: {\n value: 1\n }\n });\n return false;\n } catch (e) {\n return (e instanceof TypeError) && (arr.length === 2);\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.7-6-a-176",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-176.js",
+ "description": "Object.defineProperties - 'O' is an Array, 'P' is the length property of 'O', the [[Value]] field of 'desc' is less than value of the length property, test the [[Writable]] attribute of the length property is set to false at last when the [[Writable]] field of 'desc' is false and 'O' contains non-configurable large index named property (15.4.5.1 step 3.l.iii.2)",
+ "test": "assertTrue((function testcase() {\n\n var arr = [0, 1];\n\n try {\n Object.defineProperty(arr, \"1\", {\n configurable: false\n });\n\n Object.defineProperties(arr, {\n length: {\n value: 1,\n writable: false\n }\n });\n return false;\n } catch (e) {\n arr.length = 10; //try to overwrite length value of arr\n return e instanceof TypeError && arr.hasOwnProperty(\"1\") &&\n arr.length === 2 && arr[0] === 0 && arr[1] === 1;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.7-6-a-177",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-177.js",
+ "description": "Object.defineProperties - 'O' is an Array, 'P' is the length property of 'O', the [[Value]] field of 'desc' is less than value of the length property, test the [[Writable]] attribute of the length property is set to false at last when the [[Writable]] field of 'desc' is false and 'O' doesn't contain non-configurable large index named property (15.4.5.1 step 3.m)",
+ "test": "assertTrue((function testcase() {\n \n var arr = [0, 1];\n\n try {\n Object.defineProperties(arr, {\n length: {\n value: 0,\n writable: false\n }\n });\n\n arr.length = 10; //try to overwrite length value of arr\n return !arr.hasOwnProperty(\"1\") && arr.length === 0 && !arr.hasOwnProperty(\"0\");\n } catch (e) {\n return false;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-6-a-178",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-178.js",
+ "description": "Object.defineProperties - 'O' is an Array, 'P' is an array index named property, 'P' is available String values that convert to numbers (15.4.5.1 step 4.a)",
+ "test": "assertTrue((function testcase() {\n\n var arr = [0];\n\n Object.defineProperties(arr, {\n \"0\": {\n value: 12\n }\n });\n return arr[0] === 12;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-6-a-179",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-179.js",
+ "description": "Object.defineProperties - 'O' is an Array, 'P' is an array index named property, 'P' is boundary value 2^32 - 2 (15.4.5.1 step 4.a)",
+ "test": "assertTrue((function testcase() {\n var arr = [];\n\n Object.defineProperties(arr, {\n \"4294967294\": {\n value: 100\n }\n });\n\n return arr.hasOwnProperty(\"4294967294\") && arr.length === 4294967295 && arr[4294967294] === 100;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-6-a-18",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-18.js",
+ "description": "Object.defineProperties - 'O' is a Date object which implements its own [[GetOwnProperty]] method to get 'P' (8.12.9 step 1 ) ",
+ "test": "assertTrue((function testcase() {\n\n var obj = new Date();\n\n Object.defineProperty(obj, \"prop\", {\n value: 11,\n configurable: false\n });\n\n try {\n Object.defineProperties(obj, {\n prop: {\n value: 12,\n configurable: true\n }\n });\n return false;\n } catch (e) {\n return e instanceof TypeError && dataPropertyAttributesAreCorrect(obj, \"prop\", 11, false, false, false);\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.7-6-a-180",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-180.js",
+ "description": "Object.defineProperties - 'O' is an Array, 'P' is an array index named property, 'P' is boundary value 2^32 - 1 (15.4.5.1 step 4.a)",
+ "test": "assertTrue((function testcase() {\n var arr = [];\n\n Object.defineProperties(arr, {\n \"4294967295\": {\n value: 100\n }\n });\n\n return arr.hasOwnProperty(\"4294967295\") && arr.length === 0 && arr[4294967295] === 100;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-6-a-181",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-181.js",
+ "description": "Object.defineProperties - 'O' is an Array, 'P' is an array index named property, 'P' is boundary value 2^32 (15.4.5.1 step 4.a)",
+ "test": "assertTrue((function testcase() {\n var arr = [];\n\n Object.defineProperties(arr, {\n \"4294967296\": {\n value: 100\n }\n });\n\n return arr.hasOwnProperty(\"4294967296\") && arr.length === 0 && arr[4294967296] === 100;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-6-a-182",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-182.js",
+ "description": "Object.defineProperties - 'O' is an Array, 'P' is an array index named property, 'P' is boundary value 2^32 + 1 (15.4.5.1 step 4.a)",
+ "test": "assertTrue((function testcase() {\n var arr = [];\n\n Object.defineProperties(arr, {\n \"4294967297\": {\n value: 100\n }\n });\n\n return arr.hasOwnProperty(\"4294967297\") && arr.length === 0 && arr[4294967297] === 100;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-6-a-183",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-183.js",
+ "description": "Object.defineProperties - TypeError is not thrown if 'O' is an Array, 'P' is an array index named property, [[Writable]] attribute of the length property in 'O' is false, value of 'P' is less than value of the length property in'O' (15.4.5.1 step 4.b)",
+ "test": "assertTrue((function testcase() {\n var arr = [1, 2, 3];\n\n Object.defineProperty(arr, \"length\", {\n writable: false\n });\n\n Object.defineProperties(arr, {\n \"1\": {\n value: \"abc\"\n }\n });\n\n return arr[0] === 1 && arr[1] === \"abc\" && arr[2] === 3;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.7-6-a-184",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-184.js",
+ "description": "Object.defineProperties - TypeError is thrown if 'O' is an Array, 'P' is an array index named property,[[Writable]] attribute of the length property in 'O' is false, value of 'P' is equal to value of the length property in 'O' (15.4.5.1 step 4.b)",
+ "test": "assertTrue((function testcase() {\n var arr = [1, 2, 3];\n\n Object.defineProperty(arr, \"length\", {\n writable: false\n });\n\n try {\n Object.defineProperties(arr, {\n \"3\": {\n value: \"abc\"\n }\n });\n\n return false;\n } catch (e) {\n return e instanceof TypeError && arr[0] === 1 &&\n arr[1] === 2 && arr[2] === 3 && !arr.hasOwnProperty(\"3\");\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.7-6-a-185",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-185.js",
+ "description": "Object.defineProperties - TypeError is thrown if 'O' is an Array, 'P' is an array index named property,[[Writable]] attribute of the length property in 'O' is false, value of 'P' is bigger than value of the length property in 'O' (15.4.5.1 step 4.b)",
+ "test": "assertTrue((function testcase() {\n var arr = [1, 2, 3];\n\n Object.defineProperty(arr, \"length\", {\n writable: false\n });\n\n try {\n Object.defineProperties(arr, {\n \"4\": {\n value: \"abc\"\n }\n });\n\n return false;\n } catch (e) {\n return e instanceof TypeError && arr[0] === 1 && arr[1] === 2 &&\n arr[2] === 3 && !arr.hasOwnProperty(\"3\") && !arr.hasOwnProperty(\"4\");\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.7-6-a-186",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-186.js",
+ "description": "Object.defineProperties - 'O' is an Array, 'P' is an array index named property, 'P' is own data property (15.4.5.1 step 4.c)",
+ "test": "assertTrue((function testcase() {\n var arr = [];\n Object.defineProperty(arr, 0, {\n value: \"ownDataProperty\",\n configurable: false\n });\n\n try {\n Object.defineProperties(arr, {\n \"0\": {\n value: \"abc\",\n configurable: true\n }\n });\n return false;\n } catch (e) {\n return e instanceof TypeError && arr[0] === \"ownDataProperty\";\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.7-6-a-187",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-187.js",
+ "description": "Object.defineProperties - 'O' is an Array, 'P' is an array index named property, 'P' is inherited data property (15.4.5.1 step 4.c)",
+ "test": "assertTrue((function testcase() {\n try {\n Object.defineProperty(Array.prototype, \"0\", {\n value: 11,\n configurable: true\n });\n\n var arr = [];\n\n Object.defineProperties(arr, {\n \"0\": {\n configurable: false\n }\n });\n return arr.hasOwnProperty(\"0\") && typeof arr[0] === \"undefined\" && Array.prototype[0] === 11;\n } finally {\n delete Array.prototype[0];\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.7-6-a-188",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-188.js",
+ "description": "Object.defineProperties - 'O' is an Array, 'P' is an array index named property, 'P' is own data property that overrides an inherited data property (15.4.5.1 step 4.c)",
+ "test": "assertTrue((function testcase() {\n try {\n Object.defineProperty(Array.prototype, \"0\", {\n value: 11,\n configurable: true\n });\n\n var arr = [];\n Object.defineProperty(arr, \"0\", {\n value: 12,\n configurable: false\n });\n\n Object.defineProperties(arr, {\n \"0\": {\n configurable: true\n }\n });\n return false;\n } catch (e) {\n return e instanceof TypeError && arr[0] === 12 && Array.prototype[0] === 11;\n } finally {\n delete Array.prototype[0];\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.7-6-a-189",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-189.js",
+ "description": "Object.defineProperties - 'O' is an Array, 'P' is an array index named property, 'P' is own data property that overrides an inherited accessor property (15.4.5.1 step 4.c)",
+ "test": "assertTrue((function testcase() {\n try {\n Object.defineProperty(Array.prototype, \"0\", {\n get: function () {\n return 11;\n },\n configurable: true\n });\n\n var arr = [];\n Object.defineProperty(arr, \"0\", {\n value: 12,\n configurable: false\n });\n\n Object.defineProperties(arr, {\n \"0\": {\n configurable: true\n }\n });\n return false;\n } catch (e) {\n return e instanceof TypeError && arr[0] === 12 && Array.prototype[0] === 11;\n } finally {\n delete Array.prototype[0];\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.7-6-a-19",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-19.js",
+ "description": "Object.defineProperties - 'O' is a RegExp object which implements its own [[GetOwnProperty]] method to get 'P' (8.12.9 step 1 ) ",
+ "test": "assertTrue((function testcase() {\n\n var obj = new RegExp();\n\n Object.defineProperty(obj, \"prop\", {\n value: 11,\n configurable: false\n });\n\n try {\n Object.defineProperties(obj, {\n prop: {\n value: 12,\n configurable: true\n }\n });\n return false;\n } catch (e) {\n return e instanceof TypeError && dataPropertyAttributesAreCorrect(obj, \"prop\", 11, false, false, false);\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.7-6-a-190",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-190.js",
+ "description": "Object.defineProperties - 'O' is an Array, 'P' is an array index named property, 'P' is own accessor property (15.4.5.1 step 4.c)",
+ "test": "assertTrue((function testcase() {\n var arr = [];\n\n Object.defineProperty(arr, \"0\", {\n get: function () {\n return 11;\n },\n configurable: false\n });\n\n try {\n Object.defineProperties(arr, {\n \"0\": {\n get: function () {\n return 12;\n },\n configurable: true\n }\n });\n return false;\n } catch (e) {\n return e instanceof TypeError && arr[0] === 11;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.2.3.7-6-a-191",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-191.js",
+ "description": "Object.defineProperties - 'O' is an Array, 'P' is an array index property, 'P' is inherited accessor property (15.4.5.1 step 4.c)",
+ "test": "assertTrue((function testcase() {\n try {\n Object.defineProperty(Array.prototype, \"0\", {\n get: function () {\n return 11;\n },\n configurable: true\n });\n\n var arr = [];\n\n Object.defineProperties(arr, {\n \"0\": {\n get: function () {\n return 12;\n },\n configurable: false\n }\n });\n return arr.hasOwnProperty(\"0\") && arr[0] === 12 && Array.prototype[0] === 11;\n } finally {\n delete Array.prototype[0];\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.2.3.7-6-a-192",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-192.js",
+ "description": "Object.defineProperties - 'O' is an Array, 'P' is an array index named property, 'P' is own accessor property that overrides an inherited data property (15.4.5.1 step 4.c)",
+ "test": "assertTrue((function testcase() {\n try {\n Object.defineProperty(Array.prototype, \"0\", {\n value: 11,\n configurable: true\n });\n\n var arr = [];\n Object.defineProperty(arr, \"0\", {\n get: function () {\n return 12;\n },\n configurable: false\n });\n\n Object.defineProperties(arr, {\n \"0\": {\n configurable: true\n }\n });\n return false;\n } catch (e) {\n return e instanceof TypeError && arr[0] === 12 && Array.prototype[0] === 11;\n } finally {\n delete Array.prototype[0];\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.2.3.7-6-a-193",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-193.js",
+ "description": "Object.defineProperties - 'O' is an Array, 'P' is an array index named property, 'P' is own accessor property that overrides an inherited accessor property (15.4.5.1 step 4.c)",
+ "test": "assertTrue((function testcase() {\n try {\n Object.defineProperty(Array.prototype, \"0\", {\n get: function () {\n return 11;\n },\n configurable: true\n });\n\n var arr = [];\n Object.defineProperty(arr, \"0\", {\n get: function () {\n return 12;\n },\n configurable: false\n });\n\n Object.defineProperties(arr, {\n \"0\": {\n configurable: true\n }\n });\n return false;\n } catch (e) {\n return e instanceof TypeError && arr[0] === 12 && Array.prototype[0] === 11;\n } finally {\n delete Array.prototype[0];\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.2.3.7-6-a-194",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-194.js",
+ "description": "Object.defineProperties - 'O' is an Array, 'P' is an array index named property, 'P' property doesn't exist in 'O', test TypeError is thrown when 'O' is not extensible (15.4.5.1 step 4.c)",
+ "test": "assertTrue((function testcase() {\n var arr = [];\n Object.preventExtensions(arr);\n\n try {\n Object.defineProperties(arr, {\n \"0\": {\n value: 1\n }\n });\n return false;\n } catch (e) {\n return (e instanceof TypeError) && (arr.hasOwnProperty(\"0\") === false);\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties) && fnExists(Object.preventExtensions))"
+ },
+ {
+ "id": "15.2.3.7-6-a-195",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-195.js",
+ "description": "Object.defineProperties - 'O' is an Array, 'P' is an array index named property, 'P' property doesn't exist in 'O', test 'P' is defined as data property when 'desc' is generic descriptor (15.4.5.1 step 4.c)",
+ "test": "assertTrue((function testcase() {\n var arr = [];\n\n Object.defineProperties(arr, {\n \"0\": {\n enumerable: true\n }\n });\n\n return dataPropertyAttributesAreCorrect(arr, \"0\", undefined, false, true, false);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-6-a-196",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-196.js",
+ "description": "Object.defineProperties - 'O' is an Array, 'P' is an array index named property, 'P' property doesn't exist in 'O', test [[Value]] of 'P' property in 'Attributes' is set as undefined value if [[Value]] is absent in data descriptor 'desc' (15.4.5.1 step 4.c)",
+ "test": "assertTrue((function testcase() {\n var arr = [];\n\n Object.defineProperties(arr, {\n \"0\": {\n writable: true,\n enumerable: true,\n configurable: false\n }\n });\n\n return arr.hasOwnProperty(\"0\") && typeof (arr[0]) === \"undefined\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-6-a-197",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-197.js",
+ "description": "Object.defineProperties - 'O' is an Array, 'P' is an array index named property, 'P' property doesn't exist in 'O', test [[Writable]] of 'P' property in 'Attributes' is set as false value if [[Writable]] is absent in data descriptor 'desc' (15.4.5.1 step 4.c)",
+ "test": "assertTrue((function testcase() {\n var arr = [];\n var isOwnProperty = false;\n var canWritable = false;\n\n Object.defineProperties(arr, {\n \"0\": {\n value: 1001,\n enumerable: true,\n configurable: false\n }\n });\n\n isOwnProperty = arr.hasOwnProperty(\"0\");\n\n arr[0] = 12;\n\n canWritable = (arr[0] === 12);\n\n return isOwnProperty && !canWritable && arr[0] === 1001;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-6-a-198",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-198.js",
+ "description": "Object.defineProperties - 'O' is an Array, 'P' is an array index named property, 'P' property doesn't exist in 'O', test [[Enumerable]] of 'P' property in 'Attributes' is set as false value if [[Enumerable]] is absent in data descriptor 'desc' (15.4.5.1 step 4.c)",
+ "test": "assertTrue((function testcase() {\n var arr = [];\n var isOwnProperty = false;\n var canEnumerable = false;\n\n Object.defineProperties(arr, {\n \"0\": {\n value: 1001,\n writable: true,\n configurable: true\n }\n });\n\n isOwnProperty = arr.hasOwnProperty(\"0\");\n for (var i in arr) {\n if (i === \"0\") {\n canEnumerable = true;\n }\n }\n return isOwnProperty && !canEnumerable && arr[0] === 1001;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-6-a-199",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-199.js",
+ "description": "Object.defineProperties - 'O' is an Array, 'P' is an array index named property, 'P' property doesn't exist in 'O', test [[Configurable]] of 'P' property in 'Attributes' is set as false value if [[Configurable]] is absent in data descriptor 'desc' (15.4.5.1 step 4.c)",
+ "test": "assertTrue((function testcase() {\n var arr = [];\n var beforeDeleted = false;\n var afterDeleted = false;\n\n Object.defineProperties(arr, {\n \"0\": {\n value: 1001,\n writable: true,\n enumerable: true\n }\n });\n\n beforeDeleted = arr.hasOwnProperty(\"0\");\n delete arr[0];\n afterDeleted = arr.hasOwnProperty(\"0\");\n return beforeDeleted && afterDeleted && arr[0] === 1001;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-6-a-2",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-2.js",
+ "description": "Object.defineProperties - 'P' is inherited data property (8.12.9 step 1 ) ",
+ "test": "assertTrue((function testcase() {\n var proto = {};\n Object.defineProperty(proto, \"prop\", {\n value: 11,\n configurable: false\n });\n var Con = function () { };\n Con.prototype = proto;\n\n var obj = new Con();\n\n Object.defineProperties(obj, {\n prop: {\n value: 12,\n configurable: true\n }\n });\n\n return dataPropertyAttributesAreCorrect(obj, \"prop\", 12, false, false, true);\n\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.7-6-a-20",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-20.js",
+ "description": "Object.defineProperties - 'O' is a JSON object which implements its own [[GetOwnProperty]] method to get 'P' (8.12.9 step 1 ) ",
+ "test": "assertTrue((function testcase() {\n\n try {\n Object.defineProperty(JSON, \"prop\", {\n value: 11,\n writable: true,\n configurable: true\n });\n var hasProperty = JSON.hasOwnProperty(\"prop\") && JSON.prop === 11;\n Object.defineProperties(JSON, {\n prop: {\n value: 12\n }\n });\n return hasProperty && JSON.prop === 12;\n } finally {\n delete JSON.prop;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.7-6-a-200",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-200.js",
+ "description": "Object.defineProperties - 'O' is an Array, 'P' is an array index named property, 'desc' is data descriptor, test updating all attribute values of 'P' (15.4.5.1 step 4.c)",
+ "test": "assertTrue((function testcase() {\n var arr = [1]; // default value of attributes: writable: true, configurable: true, enumerable: true\n\n Object.defineProperties(arr, {\n \"0\": {\n value: 1001,\n writable: false,\n enumerable: false,\n configurable: false\n }\n });\n\n return dataPropertyAttributesAreCorrect(arr, \"0\", 1001, false, false, false);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-6-a-201",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-201.js",
+ "description": "Object.defineProperties - 'O' is an Array, 'P' is an array index named property, 'P' property doesn't exist in 'O', test [[Get]] of 'P' property in 'Attributes' is set as undefined value if [[Get]] is absent in accessor descriptor 'desc' (15.4.5.1 step 4.c)",
+ "test": "assertTrue((function testcase() {\n var arr = [];\n\n Object.defineProperties(arr, {\n \"0\": {\n set: function () { },\n enumerable: true,\n configurable: true\n }\n });\n\n return arr.hasOwnProperty(\"0\") && typeof (arr[0]) === \"undefined\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.2.3.7-6-a-202",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-202.js",
+ "description": "Object.defineProperties - 'O' is an Array, 'P' is an array index named property, 'P' property doesn't exist in 'O', test [[Set]] of 'P' property in 'Attributes' is set as undefined value if [[Set]] is absent in accessor descriptor 'desc' (15.4.5.1 step 4.c)",
+ "test": "assertTrue((function testcase() {\n var arr = [];\n var getFunc = function () {\n return 11;\n };\n\n Object.defineProperties(arr, {\n \"0\": {\n get: getFunc,\n enumerable: true,\n configurable: true\n }\n });\n\n var verifyEnumerable = false;\n for (var i in arr) {\n if (i === \"0\" && arr.hasOwnProperty(\"0\")) {\n verifyEnumerable = true;\n }\n }\n\n var desc = Object.getOwnPropertyDescriptor(arr, \"0\");\n var propertyDefineCorrect = arr.hasOwnProperty(\"0\");\n\n var verifyConfigurable = false;\n delete arr[0];\n verifyConfigurable = arr.hasOwnProperty(\"0\");\n return typeof desc.set === \"undefined\" && propertyDefineCorrect &&\n desc.get === getFunc && !verifyConfigurable && verifyEnumerable;\n\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.2.3.7-6-a-203",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-203.js",
+ "description": "Object.defineProperties - 'O' is an Array, 'P' is an array index named property, 'P' property doesn't exist in 'O', test [[Enumerable]] of 'P' property in 'Attributes' is set as false value if [[Enumerable]] is absent in accessor descriptor 'desc' (15.4.5.1 step 4.c)",
+ "test": "assertTrue((function testcase() {\n var arr = [];\n\n Object.defineProperties(arr, {\n \"0\": {\n set: function () { },\n get: function () { },\n configurable: true\n }\n });\n\n for (var i in arr) {\n if (i === \"0\" && arr.hasOwnProperty(\"0\")) {\n return false;\n }\n }\n return true;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.2.3.7-6-a-204",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-204.js",
+ "description": "Object.defineProperties - 'O' is an Array, 'P' is an array index named property, 'P' property doesn't exist in 'O', test [[Configurable]] of 'P' property in 'Attributes' is set as false value if [[Configurable]] is absent in accessor descriptor 'desc' (15.4.5.1 step 4.c)",
+ "test": "assertTrue((function testcase() {\n var arr = [];\n var beforeDeleted = false;\n var afterDeleted = false;\n arr.verifySetter = 100;\n\n Object.defineProperties(arr, {\n \"0\": {\n set: function (value) {\n arr.verifySetter = value;\n },\n get: function () {\n return arr.verifySetter;\n },\n enumerable: true\n }\n });\n\n beforeDeleted = arr.hasOwnProperty(\"0\");\n delete arr[0];\n afterDeleted = arr.hasOwnProperty(\"0\");\n\n arr[0] = 101;\n\n return beforeDeleted && afterDeleted && arr[0] === 101 && arr.verifySetter === 101;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.2.3.7-6-a-205",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-205.js",
+ "description": "Object.defineProperties - 'O' is an Array, 'P' is an array index named property, 'desc' is accessor descriptor, test updating all attribute values of 'P' (15.4.5.1 step 4.c)",
+ "test": "assertTrue((function testcase() {\n var arr = [];\n\n Object.defineProperties(arr, {\n \"0\": {\n get: function () {\n return 11;\n },\n set: function () { },\n configurable: true,\n enumerable: true\n }\n });\n\n var setFun = function (value) {\n arr.setVerifyHelpProp = value;\n };\n var getFun = function () {\n return 14;\n };\n Object.defineProperties(arr, {\n \"0\": {\n get: getFun,\n set: setFun,\n configurable: false,\n enumerable: false\n }\n });\n\n return accessorPropertyAttributesAreCorrect(arr, \"0\", getFun, setFun, \"setVerifyHelpProp\", false, false);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor) && fnExists(Object.defineProperties) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.2.3.7-6-a-206",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-206.js",
+ "description": "Object.defineProperties - 'O' is an Array, 'P' is an array index named property, 'P' makes no change if every field in 'desc' is absent (name is data property) (15.4.5.1 step 4.c)",
+ "test": "assertTrue((function testcase() {\n var arr = [];\n\n arr[0] = 101; // default value of attributes: writable: true, configurable: true, enumerable: true\n\n try {\n Object.defineProperties(arr, {\n \"0\": {}\n });\n return dataPropertyAttributesAreCorrect(arr, \"0\", 101, true, true, true);\n } catch (e) {\n return false;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-6-a-207",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-207.js",
+ "description": "Object.defineProperties - 'O' is an Array, 'P' is an array index named property, 'P' makes no change if every field in 'desc' is absent (name is accessor property) (15.4.5.1 step 4.c)",
+ "test": "assertTrue((function testcase() {\n var arr = [];\n\n function get_func() {\n return 11;\n }\n function set_func(value) {\n arr.setVerifyHelpProp = value;\n }\n\n Object.defineProperty(arr, \"0\", {\n get: get_func,\n set: set_func,\n enumerable: true,\n configurable: true\n });\n\n try {\n Object.defineProperties(arr, {\n \"0\": {}\n });\n return accessorPropertyAttributesAreCorrect(arr, \"0\", get_func, set_func, \"setVerifyHelpProp\", true, true);\n } catch (e) {\n return false;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor) && fnExists(Object.defineProperties) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.2.3.7-6-a-208",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-208.js",
+ "description": "Object.defineProperties - 'O' is an Array, 'P' is an array index named property, 'P' makes no change if the value of every field in 'desc' is the same value as the corresponding field in 'P'(desc is data property) (15.4.5.1 step 4.c)",
+ "test": "assertTrue((function testcase() {\n var arr = [];\n\n arr[0] = 100; // default value of attributes: writable: true, configurable: true, enumerable: true\n\n Object.defineProperties(arr, {\n \"0\": {\n value: 100,\n writable: true,\n enumerable: true,\n configurable: true\n }\n });\n\n return dataPropertyAttributesAreCorrect(arr, \"0\", 100, true, true, true);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-6-a-209",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-209.js",
+ "description": "Object.defineProperties - 'O' is an Array, 'P' is an array index named property, 'P' makes no change if the value of every field in 'desc' is the same value as the corresponding field in 'P'(desc is accessor property) (15.4.5.1 step 4.c)",
+ "test": "assertTrue((function testcase() {\n var arr = [];\n var get_func = function () {\n return \"100\";\n };\n var set_func = function (value) {\n arr.setVerifyHelpProp = value;\n };\n\n var descObj = {\n get: get_func,\n set: set_func,\n enumerable: true,\n configurable: true\n };\n \n var properties = {\n \"0\": descObj\n };\n\n Object.defineProperty(arr, \"0\", descObj);\n\n Object.defineProperties(arr, properties);\n\n return accessorPropertyAttributesAreCorrect(arr, \"0\", get_func, set_func, \"setVerifyHelpProp\", true, true);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor) && fnExists(Object.defineProperties) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.2.3.7-6-a-21",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-21.js",
+ "description": "Object.defineProperties - 'O' is an Error object which implements its own [[GetOwnProperty]] method to get 'P' (8.12.9 step 1 ) ",
+ "test": "assertTrue((function testcase() {\n\n var obj = new Error();\n\n Object.defineProperty(obj, \"prop\", {\n value: 11,\n configurable: false\n });\n\n try {\n Object.defineProperties(obj, {\n prop: {\n value: 12,\n configurable: true\n }\n });\n return false;\n } catch (e) {\n return e instanceof TypeError && dataPropertyAttributesAreCorrect(obj, \"prop\", 11, false, false, false);\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.7-6-a-210",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-210.js",
+ "description": "Object.defineProperties - 'O' is an Array, 'name' is an array index property, both the [[Value]] field of 'desc' and the [[Value]] attribute value of 'name' are undefined (15.4.5.1 step 4.c)",
+ "test": "assertTrue((function testcase() {\n var arr = [];\n\n Object.defineProperty(arr, \"0\", {\n value: undefined\n });\n\n Object.defineProperties(arr, {\n \"0\": {\n value: undefined\n }\n });\n return dataPropertyAttributesAreCorrect(arr, \"0\", undefined, false, false, false);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.7-6-a-211",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-211.js",
+ "description": "Object.defineProperties - 'O' is an Array, 'name' is an array index property, both the [[Value]] field of 'desc' and the [[Value]] attribute value of 'name' are null (15.4.5.1 step 4.c)",
+ "test": "assertTrue((function testcase() {\n var arr = [];\n\n Object.defineProperty(arr, \"0\", {\n value: null\n });\n\n Object.defineProperties(arr, {\n \"0\": {\n value: null\n }\n });\n return dataPropertyAttributesAreCorrect(arr, \"0\", null, false, false, false);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.7-6-a-212",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-212.js",
+ "description": "Object.defineProperties - 'O' is an Array, 'name' is an array index property, both the [[Value]] field of 'desc' and the [[Value]] attribute value of 'name' are NaN (15.4.5.1 step 4.c)",
+ "test": "assertTrue((function testcase() {\n var arr = [];\n\n Object.defineProperty(arr, \"0\", {\n value: NaN\n });\n\n Object.defineProperties(arr, {\n \"0\": {\n value: NaN\n }\n });\n\n return dataPropertyAttributesAreCorrect(arr, \"0\", NaN, false, false, false);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.7-6-a-213",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-213.js",
+ "description": "Object.defineProperties - 'O' is an Array, 'name' is an array index property, the [[Value]] field of 'desc' is +0, and the [[Value]] attribute value of 'name' is -0 (15.4.5.1 step 4.c)",
+ "test": "assertTrue((function testcase() {\n var arr = [];\n\n Object.defineProperty(arr, \"0\", {\n value: -0\n });\n\n try {\n Object.defineProperties(arr, {\n \"0\": {\n value: +0\n }\n });\n return false;\n } catch (e) {\n return (e instanceof TypeError) && dataPropertyAttributesAreCorrect(arr, \"0\", -0, false, false, false);\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.7-6-a-214",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-214.js",
+ "description": "Object.defineProperties - 'O' is an Array, 'name' is an array index property, the [[Value]] field of 'desc' is -0, and the [[Value]] attribute value of 'name' is +0 (15.4.5.1 step 4.c)",
+ "test": "assertTrue((function testcase() {\n var arr = [];\n\n Object.defineProperty(arr, \"0\", {\n value: +0\n });\n\n try {\n Object.defineProperties(arr, {\n \"0\": {\n value: -0\n }\n });\n return false;\n } catch (e) {\n return (e instanceof TypeError) && dataPropertyAttributesAreCorrect(arr, \"0\", +0, false, false, false);\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.7-6-a-215",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-215.js",
+ "description": "Object.defineProperties - 'O' is an Array, 'name' is an array index property, the [[Value]] field of 'desc' and the [[Value]] attribute value of 'name' are two numbers with same vaule (15.4.5.1 step 4.c)",
+ "test": "assertTrue((function testcase() {\n var arr = [];\n\n Object.defineProperty(arr, \"0\", {\n value: 101\n });\n\n try {\n Object.defineProperties(arr, {\n \"0\": {\n value: 101\n }\n });\n return dataPropertyAttributesAreCorrect(arr, \"0\", 101, false, false, false);\n } catch (e) {\n return false;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.7-6-a-216",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-216.js",
+ "description": "Object.defineProperties - 'O' is an Array, 'name' is an array index property, the [[Value]] field of 'desc' and the [[Value]] attribute value of 'name' are two strings which have same length and same characters in corresponding positions (15.4.5.1 step 4.c)",
+ "test": "assertTrue((function testcase() {\n var arr = [];\n\n Object.defineProperty(arr, \"0\", {\n value: \"abcd\"\n });\n\n try {\n Object.defineProperties(arr, {\n \"0\": {\n value: \"abcd\"\n }\n });\n return dataPropertyAttributesAreCorrect(arr, \"0\", \"abcd\", false, false, false);\n } catch (e) {\n return false;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.7-6-a-217",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-217.js",
+ "description": "Object.defineProperties - 'O' is an Array, 'name' is an array index property, the [[Value]] field of 'desc' and the [[Value]] attribute value of 'name' are two booleans with same value (15.4.5.1 step 4.c)",
+ "test": "assertTrue((function testcase() {\n var arr = [];\n\n Object.defineProperty(arr, \"0\", {\n value: true\n });\n\n try {\n Object.defineProperties(arr, {\n \"0\": {\n value: true\n }\n });\n return dataPropertyAttributesAreCorrect(arr, \"0\", true, false, false, false);\n } catch (e) {\n return false;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.7-6-a-218",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-218.js",
+ "description": "Object.defineProperties - 'O' is an Array, 'name' is an array index property, the [[Value]] field of 'desc' and the [[Value]] attribute value of 'name' are two objects which refer to the same object (15.4.5.1 step 4.c)",
+ "test": "assertTrue((function testcase() {\n var arr = [];\n\n var obj1 = { length: 10 };\n Object.defineProperty(arr, \"0\", {\n value: obj1\n });\n\n var properties = {\n \"0\": {\n value: obj1\n }\n };\n try {\n Object.defineProperties(arr, properties);\n return dataPropertyAttributesAreCorrect(arr, \"0\", obj1, false, false, false);\n } catch (e) {\n return false;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.7-6-a-219",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-219.js",
+ "description": "Object.defineProperties - 'O' is an Array, 'P' is an array index property that already exists on 'O' with [[Writable]] true, and the [[Writable]] field of 'desc' is true (15.4.5.1 step 4.c)",
+ "test": "assertTrue((function testcase() {\n var arr = [];\n\n Object.defineProperty(arr, \"0\", {\n writable: true\n });\n\n try {\n Object.defineProperties(arr, {\n \"0\": {\n writable: true\n }\n });\n return dataPropertyAttributesAreCorrect(arr, \"0\", undefined, true, false, false);\n } catch (e) {\n return false;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.7-6-a-22",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-22.js",
+ "description": "Object.defineProperties - 'O' is the Arguments object which implements its own [[GetOwnProperty]] method to get 'P' (8.12.9 step 1 ) ",
+ "test": "assertTrue((function testcase() {\n var arg = function () {\n return arguments;\n }();\n\n Object.defineProperty(arg, \"prop\", {\n value: 11,\n configurable: false\n });\n\n try {\n Object.defineProperties(arg, {\n prop: {\n value: 12,\n configurable: true\n }\n });\n return false;\n } catch (e) {\n return (e instanceof TypeError);\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.7-6-a-220",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-220.js",
+ "description": "Object.defineProperties - 'O' is an Array, 'P' is an array index property that already exists on 'O' with [[Writable]] true, and the [[Writable]] field of 'desc' is false (15.4.5.1 step 4.c)",
+ "test": "assertTrue((function testcase() {\n var arr = [];\n\n Object.defineProperty(arr, \"0\", {\n writable: true,\n configurable: true\n });\n\n try {\n Object.defineProperties(arr, {\n \"0\": {\n writable: false\n }\n });\n return dataPropertyAttributesAreCorrect(arr, \"0\", undefined, false, false, true);\n } catch (e) {\n return false;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.7-6-a-221",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-221.js",
+ "description": "Object.defineProperties - 'O' is an Array, 'P' is an array index property, the [[Get]] field of 'desc' and the [[Get]] attribute value of 'P' are two objects which refer to the same object (15.4.5.1 step 4.c)",
+ "test": "assertTrue((function testcase() {\n var arr = [];\n\n function get_func() {\n return 10;\n }\n\n Object.defineProperty(arr, \"0\", {\n get: get_func\n });\n\n Object.defineProperties(arr, {\n \"0\": {\n get: get_func\n }\n });\n return accessorPropertyAttributesAreCorrect(arr, \"0\", get_func, undefined, undefined, false, false);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor) && fnExists(Object.defineProperties) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.2.3.7-6-a-222",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-222.js",
+ "description": "Object.defineProperties - 'O' is an Array, 'P' is an array index property, the [[Set]] field of 'desc' and the [[Set]] attribute value of 'P' are two objects which refer to the same object (15.4.5.1 step 4.c)",
+ "test": "assertTrue((function testcase() {\n var arr = [];\n\n function set_func(value) {\n arr.setVerifyHelpProp = value;\n }\n\n Object.defineProperty(arr, \"0\", {\n set: set_func\n });\n\n try {\n Object.defineProperties(arr, {\n \"0\": {\n set: set_func\n }\n });\n return accessorPropertyAttributesAreCorrect(arr, \"0\", undefined, set_func, \"setVerifyHelpProp\", false, false);\n } catch (e) {\n return false;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor) && fnExists(Object.defineProperties) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.2.3.7-6-a-223",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-223.js",
+ "description": "Object.defineProperties - 'O' is an Array, 'P' is an array index property that already exists on 'O' with [[Enumerable]] true, the [[Enumerable]] field of 'desc' is true (15.4.5.1 step 4.c)",
+ "test": "assertTrue((function testcase() {\n var arr = [];\n\n Object.defineProperty(arr, \"0\", {\n enumerable: true\n });\n\n try {\n Object.defineProperties(arr, {\n \"0\": {\n enumerable: true\n }\n });\n return dataPropertyAttributesAreCorrect(arr, \"0\", undefined, false, true, false);\n } catch (e) {\n return false;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.7-6-a-224",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-224.js",
+ "description": "Object.defineProperties - 'O' is an Array, 'P' is an array index property that already exists on 'O' with [[Enumerable]] true, the [[Enumerable]] field of 'desc' is false (15.4.5.1 step 4.c)",
+ "test": "assertTrue((function testcase() {\n var arr = [];\n\n Object.defineProperty(arr, \"0\", {\n enumerable: true,\n configurable: true\n });\n\n try {\n Object.defineProperties(arr, {\n \"0\": {\n enumerable: false\n }\n });\n return dataPropertyAttributesAreCorrect(arr, \"0\", undefined, false, false, true);\n } catch (e) {\n return false;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.7-6-a-225",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-225.js",
+ "description": "Object.defineProperties - 'O' is an Array, 'P' is an array index property that already exists on 'O' with [[Configurable]] true, the [[Configurable]] field of 'desc' is true (15.4.5.1 step 4.c)",
+ "test": "assertTrue((function testcase() {\n var arr = [];\n\n Object.defineProperty(arr, \"0\", {\n configurable: true\n });\n\n try {\n Object.defineProperties(arr, {\n \"0\": {\n configurable: true\n }\n });\n return dataPropertyAttributesAreCorrect(arr, \"0\", undefined, false, false, true);\n } catch (e) {\n return false;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.7-6-a-226",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-226.js",
+ "description": "Object.defineProperties - 'O' is an Array, 'P' is an array index property that already exists on 'O' with [[Configurable]] true, the [[Configurable]] field of 'desc' is false (15.4.5.1 step 4.c)",
+ "test": "assertTrue((function testcase() {\n var arr = [];\n\n Object.defineProperty(arr, \"0\", {\n configurable: true\n });\n\n try {\n Object.defineProperties(arr, {\n \"0\": {\n configurable: false\n }\n });\n return dataPropertyAttributesAreCorrect(arr, \"0\", undefined, false, false, false);\n } catch (e) {\n return false;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.7-6-a-227",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-227.js",
+ "description": "Object.defineProperties - 'O' is an Array, 'P' is an array index property, TypeError is thrown if the [[Configurable]] attribute value of 'P' is false and the [[Configurable]] field of 'desc' is true (15.4.5.1 step 4.c)",
+ "test": "assertTrue((function testcase() {\n\n var arr = [];\n\n Object.defineProperty(arr, \"1\", {\n value: 3,\n configurable: false\n });\n\n try {\n Object.defineProperties(arr, {\n \"1\": {\n value: 13,\n configurable: true\n }\n });\n return false;\n } catch (ex) {\n return (ex instanceof TypeError) && dataPropertyAttributesAreCorrect(arr, \"1\", 3, false, false, false);\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.7-6-a-228",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-228.js",
+ "description": "Object.defineProperties - 'O' is an Array, 'P' is an array index property, TypeError is thrown if the [[Configurable]] attribute value of 'P' is false, and [[Enumerable]] of 'desc' is present and its value is different from the [[Enumerable]] attribute value of 'P' (15.4.5.1 step 4.c)",
+ "test": "assertTrue((function testcase() {\n\n var arr = [];\n\n Object.defineProperty(arr, \"1\", {\n value: 3,\n configurable: false,\n enumerable: false\n\n });\n\n try {\n Object.defineProperties(arr, {\n \"1\": {\n value: 13,\n enumerable: true\n }\n });\n return false;\n } catch (ex) {\n return (ex instanceof TypeError) && dataPropertyAttributesAreCorrect(arr, \"1\", 3, false, false, false);\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.7-6-a-229",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-229.js",
+ "description": "Object.defineProperties - 'O' is an Array, 'P' is an array index property, TypeError is thrown if 'P' is accessor property, and 'desc' is data descriptor, and the [[Configurable]] attribute value of 'P' is false (15.4.5.1 step 4.c)",
+ "test": "assertTrue((function testcase() {\n\n var arr = [];\n\n function set_fun(value) {\n arr.setVerifyHelpProp = value;\n }\n\n Object.defineProperty(arr, \"1\", {\n set: set_fun,\n configurable: false\n\n });\n\n try {\n Object.defineProperties(arr, {\n \"1\": {\n value: 13\n }\n });\n return false;\n\n } catch (ex) {\n return (ex instanceof TypeError) && accessorPropertyAttributesAreCorrect(arr, \"1\", undefined, set_fun, \"setVerifyHelpProp\", false, false);\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor) && fnExists(Object.defineProperties) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.2.3.7-6-a-230",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-230.js",
+ "description": "Object.defineProperties - 'O' is an Array, 'P' is an array index property, TypeError is thrown if 'P' is data property, and'desc' is accessor descriptor, and the [[Configurable]] attribute value of 'P' is false (15.4.5.1 step 4.c)",
+ "test": "assertTrue((function testcase() {\n\n var arr = [];\n\n Object.defineProperty(arr, \"1\", {\n value: 3,\n configurable: false\n });\n\n try {\n Object.defineProperties(arr, {\n \"1\": {\n set: function () { }\n }\n });\n return false;\n } catch (ex) {\n return (ex instanceof TypeError) && dataPropertyAttributesAreCorrect(arr, \"1\", 3, false, false, false);\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.2.3.7-6-a-231",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-231.js",
+ "description": "Object.defineProperties - 'O' is an Array, 'P' is an array index property, 'P' is data property and 'desc' is accessor descriptor, and the [[Configurable]] attribute value of 'P' is true, test 'P' is converted from data property to accessor property (15.4.5.1 step 4.c)",
+ "test": "assertTrue((function testcase() {\n var arr = [];\n arr[1] = 3; // default value of attributes: writable: true, configurable: true, enumerable: true\n\n function set_fun(value) {\n arr.setVerifyHelpProp = value;\n }\n\n Object.defineProperties(arr, {\n \"1\": {\n set: set_fun\n }\n });\n\n return accessorPropertyAttributesAreCorrect(arr, \"1\", undefined, set_fun, \"setVerifyHelpProp\", true, true);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor) && fnExists(Object.defineProperties) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.2.3.7-6-a-232",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-232.js",
+ "description": "Object.defineProperties - 'O' is an Array, 'P' is an array index property, 'P' is accessor property and 'desc' is data descriptor, and the [[Configurable]] attribute value of 'P' is true, test 'P' is converted from accessor property to data property (15.4.5.1 step 4.c)",
+ "test": "assertTrue((function testcase() {\n var arr = [];\n\n Object.defineProperty(arr, \"1\", {\n get: function () {\n return 3;\n },\n configurable: true\n\n });\n\n Object.defineProperties(arr, {\n \"1\": {\n value: 12\n }\n });\n\n return dataPropertyAttributesAreCorrect(arr, \"1\", 12, false, false, true);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.2.3.7-6-a-233",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-233.js",
+ "description": "Object.defineProperties - 'O' is an Array, 'P' is an array index property, 'P' is data property and 'desc' is data descriptor, and the [[Configurable]] attribute value of 'P' is false, test TypeError is thrown if the [[Writable]] attribute value of 'P' is false and the [[Writable]] field of 'desc' is true. (15.4.5.1 step 4.c)",
+ "test": "assertTrue((function testcase() {\n\n var arr = [];\n\n Object.defineProperty(arr, \"1\", {\n configurable: false,\n writable: false\n\n });\n\n try {\n Object.defineProperties(arr, {\n \"1\": {\n writable: true\n }\n });\n return false;\n } catch (ex) {\n return (ex instanceof TypeError) && dataPropertyAttributesAreCorrect(arr, \"1\", undefined, false, false, false);\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.7-6-a-234",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-234.js",
+ "description": "Object.defineProperties - 'O' is an Array, 'P' is an array index property, 'P' is data property and 'desc' is data descriptor, and the [[Configurable]] attribute value of 'P' is false, test TypeError is thrown if the [[Writable]] attribute value of 'P' is false, and the type of the [[Value]] field of 'desc' is different from the type of the [[Value]] attribute value of 'P' (15.4.5.1 step 4.c)",
+ "test": "assertTrue((function testcase() {\n\n var arr = [];\n\n Object.defineProperty(arr, \"1\", {\n value: 3,\n configurable: false,\n writable: false\n });\n\n try {\n\n Object.defineProperties(arr, {\n \"1\": {\n value: \"abc\"\n }\n });\n return false;\n } catch (ex) {\n return (ex instanceof TypeError) && dataPropertyAttributesAreCorrect(arr, \"1\", 3, false, false, false);\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.7-6-a-235",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-235.js",
+ "description": "Object.defineProperties - TypeError is thrown if 'O' is an Array, 'P' is an array index named property that already exists on 'O' is data property with [[Configurable]], [[Writable]] false, 'desc' is data descriptor, [[Value]] field of 'desc' is +0, and the [[Value]] attribute value of 'P' is -0 (15.4.5.1 step 4.c)",
+ "test": "assertTrue((function testcase() {\n var arr = [];\n\n Object.defineProperty(arr, \"1\", {\n value: +0\n });\n\n try {\n Object.defineProperties(arr, {\n \"1\": {\n value: -0\n }\n });\n return false;\n } catch (ex) {\n return (ex instanceof TypeError) && dataPropertyAttributesAreCorrect(arr, \"1\", +0, false, false, false);\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.7-6-a-236",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-236.js",
+ "description": "Object.defineProperties - TypeError is thrown if 'O' is an Array, 'P' is an array index named property that already exists on 'O' is data property with [[Configurable]], [[Writable]] false, 'desc' is data descriptor, [[Value]] field of 'desc' is -0, and the [[Value]] attribute value of 'P' is +0 (15.4.5.1 step 4.c)",
+ "test": "assertTrue((function testcase() {\n var arr = [];\n\n Object.defineProperty(arr, \"1\", {\n value: -0\n });\n\n try {\n Object.defineProperties(arr, {\n \"1\": {\n value: +0\n }\n });\n\n return false;\n } catch (ex) {\n return (ex instanceof TypeError) && dataPropertyAttributesAreCorrect(arr, \"1\", -0, false, false, false);\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.7-6-a-237",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-237.js",
+ "description": "Object.defineProperties - TypeError is thrown if 'O' is an Array, 'P' is an array index named property that already exists on 'O' is data property with [[Configurable]], [[Writable]] false, 'desc' is data descriptor, [[Value]] field of 'desc' and the [[Value]] attribute value of 'P' are two numbers with different vaule (15.4.5.1 step 4.c)",
+ "test": "assertTrue((function testcase() {\n var arr = [];\n\n Object.defineProperty(arr, \"1\", {\n value: 12\n });\n\n try {\n Object.defineProperties(arr, {\n \"1\": {\n value: 36\n }\n });\n return false;\n } catch (ex) {\n return (ex instanceof TypeError) && dataPropertyAttributesAreCorrect(arr, \"1\", 12, false, false, false);\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.7-6-a-238",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-238.js",
+ "description": "Object.defineProperties - TypeError is thrown if 'O' is an Array, 'P' is an array index named property that already exists on 'O' is data property with [[Configurable]], [[Writable]] false, 'desc' is data descriptor, [[Value]] field of 'desc' and the [[Value]] attribute value of 'P' are two strings with different values (15.4.5.1 step 4.c)",
+ "test": "assertTrue((function testcase() {\n var arr = [];\n\n Object.defineProperty(arr, \"1\", {\n value: \"abcd\"\n });\n\n try {\n Object.defineProperties(arr, {\n \"1\": {\n value: \"efgh\"\n }\n });\n return false;\n } catch (ex) {\n return (ex instanceof TypeError) && dataPropertyAttributesAreCorrect(arr, \"1\", \"abcd\", false, false, false);\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.7-6-a-239",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-239.js",
+ "description": "Object.defineProperties - TypeError is thrown if 'O' is an Array, 'P' is an array index named property that already exists on 'O' is data property with [[Configurable]], [[Writable]] false, 'desc' is data descriptor, [[Value]] field of 'desc' and the [[Value]] attribute value of 'P' are two booleans with different values (15.4.5.1 step 4.c)",
+ "test": "assertTrue((function testcase() {\n var arr = [];\n\n Object.defineProperty(arr, \"1\", {\n value: true\n });\n\n try {\n Object.defineProperties(arr, {\n \"1\": {\n value: false\n }\n });\n\n return false;\n } catch (ex) {\n return (ex instanceof TypeError) && dataPropertyAttributesAreCorrect(arr, \"1\", true, false, false, false);\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.7-6-a-24",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-24.js",
+ "description": "Object.defineProperties - 'O' is the global object which implements its own [[GetOwnProperty]] method to get 'P' (8.12.9 step 1 ) ",
+ "test": "assertTrue((function testcase() {\n\n try {\n Object.defineProperty(fnGlobalObject(), \"prop\", {\n value: 11,\n writable: true,\n enumerable: true,\n configurable: true\n });\n\n Object.defineProperties(fnGlobalObject(), {\n prop: {\n value: 12\n }\n });\n return dataPropertyAttributesAreCorrect(fnGlobalObject(), \"prop\", 12, true, true, true);\n } finally {\n delete fnGlobalObject().prop;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.7-6-a-240",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-240.js",
+ "description": "Object.defineProperties - TypeError is thrown if 'O' is an Array, 'P' is an array index named property that already exists on 'O' is data property with [[Configurable]], [[Writable]] false, 'desc' is data descriptor, [[Value]] field of 'desc' and the [[Value]] attribute value of 'P' are two objects which refer to the different objects (15.4.5.1 step 4.c)",
+ "test": "assertTrue((function testcase() {\n var arr = [];\n var obj1 = { value: 12 };\n var obj2 = { value: 36 };\n\n Object.defineProperty(arr, \"1\", {\n value: obj1\n });\n\n try {\n Object.defineProperties(arr, {\n \"1\": {\n value: obj2\n }\n });\n\n return false;\n } catch (ex) {\n return (ex instanceof TypeError) && dataPropertyAttributesAreCorrect(arr, \"1\", obj1, false, false, false);\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.7-6-a-241",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-241.js",
+ "description": "Object.defineProperties - TypeError is thrown if 'O' is an Array, 'P' is an array index named property that already exists on 'O' is accessor property with [[Configurable]] false, 'desc' is accessor descriptor, the [[Set]] field of 'desc' is present, and the [[Set]] field of 'desc' and the [[Set]] attribute value of 'P' are two objects which refer to the different objects (15.4.5.1 step 4.c)",
+ "test": "assertTrue((function testcase() {\n var arr = [];\n\n function set_fun(value) {\n arr.setVerifyHelpProp = value;\n }\n Object.defineProperty(arr, \"1\", {\n set: set_fun\n });\n\n try {\n Object.defineProperties(arr, {\n \"1\": {\n set: function () { }\n }\n });\n\n return false;\n } catch (ex) {\n return (ex instanceof TypeError) && accessorPropertyAttributesAreCorrect(arr, \"1\", undefined, set_fun, \"setVerifyHelpProp\", false, false);\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor) && fnExists(Object.defineProperties) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.2.3.7-6-a-242",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-242.js",
+ "description": "Object.defineProperties - TypeError is thrown if 'O' is an Array, 'P' is an array index named property that already exists on 'O' is accessor property with [[Configurable]] false, 'desc' is accessor descriptor, the [[Set]] field of 'desc' is present, and the [[Set]] field of 'desc' is an object and the [[Set]] attribute value of 'P' is undefined (15.4.5.1 step 4.c)",
+ "test": "assertTrue((function testcase() {\n var arr = [];\n\n function set_fun(value) {\n arr.setVerifyHelpProp = value;\n }\n Object.defineProperty(arr, \"1\", {\n set: set_fun\n });\n\n try {\n Object.defineProperties(arr, {\n \"1\": {\n set: undefined\n }\n });\n\n return false;\n } catch (ex) {\n return (ex instanceof TypeError) && accessorPropertyAttributesAreCorrect(arr, \"1\", undefined, set_fun, \"setVerifyHelpProp\", false, false);\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor) && fnExists(Object.defineProperties) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.2.3.7-6-a-243",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-243.js",
+ "description": "Object.defineProperties - TypeError is not thrown if 'O' is an Array, 'P' is an array index named property that already exists on 'O' is accessor property with [[Configurable]] false, 'desc' is accessor descriptor, the [[Set]] field of 'desc' is present, and the [[Set]] field of 'desc' and the [[Set]] attribute value of 'P' are undefined (15.4.5.1 step 4.c)",
+ "test": "assertTrue((function testcase() {\n var arr = [];\n\n Object.defineProperty(arr, \"1\", {\n set: undefined\n });\n\n Object.defineProperties(arr, {\n \"1\": {\n set: undefined\n }\n });\n\n return accessorPropertyAttributesAreCorrect(arr, \"1\", undefined, undefined, undefined, false, false);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor) && fnExists(Object.defineProperties) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.2.3.7-6-a-244",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-244.js",
+ "description": "Object.defineProperties - TypeError is thrown if 'O' is an Array, 'P' is an array index named property that already exists on 'O' is accessor property with [[Configurable]] false, 'desc' is accessor descriptor, the [[Get]] field of 'desc' is present, and the [[Get]] field of 'desc' and the [[Get]] attribute value of 'P' are two objects which refer to the different objects (15.4.5.1 step 4.c)",
+ "test": "assertTrue((function testcase() {\n var arr = [];\n\n function get_fun() {\n return 36;\n }\n Object.defineProperty(arr, \"1\", {\n get: get_fun\n });\n\n try {\n Object.defineProperties(arr, {\n \"1\": {\n get: function () {\n return 12;\n }\n }\n });\n\n return false;\n } catch (ex) {\n return (ex instanceof TypeError) && accessorPropertyAttributesAreCorrect(arr, \"1\", get_fun, undefined, undefined, false, false);\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor) && fnExists(Object.defineProperties) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.2.3.7-6-a-245",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-245.js",
+ "description": "Object.defineProperties - TypeError is thrown if 'O' is an Array, 'P' is an array index named property that already exists on 'O' is accessor property with [[Configurable]] false, 'desc' is accessor descriptor, the [[Get]] field of 'desc' is present, and the [[Get]] field of 'desc' is an object and the [[Get]] attribute value of 'P' is undefined (15.4.5.1 step 4.c)",
+ "test": "assertTrue((function testcase() {\n var arr = [];\n\n function get_fun() {\n return 36;\n }\n Object.defineProperty(arr, \"1\", {\n get: get_fun\n });\n\n try {\n Object.defineProperties(arr, {\n \"1\": {\n get: undefined\n }\n });\n return false;\n } catch (ex) {\n return (ex instanceof TypeError) && accessorPropertyAttributesAreCorrect(arr, \"1\", get_fun, undefined, undefined, false, false);\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor) && fnExists(Object.defineProperties) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.2.3.7-6-a-246",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-246.js",
+ "description": "Object.defineProperties - TypeError is not thrown if ''O' is an Array, 'P' is an array index named property that already exists on 'O' is accessor property with [[Configurable]] false, 'desc' is accessor descriptor, test TypeError is not thrown if the [[Get]] field of 'desc' is present, and the [[Get]] field of 'desc' and the [[Get]] attribute value of 'P' are undefined (15.4.5.1 step 4.c)",
+ "test": "assertTrue((function testcase() {\n var arr = [];\n\n Object.defineProperty(arr, \"1\", {\n get: undefined\n });\n\n try {\n Object.defineProperties(arr, {\n \"1\": {\n get: undefined\n }\n });\n\n return accessorPropertyAttributesAreCorrect(arr, \"1\", undefined, undefined, undefined, false, false);\n } catch (ex) {\n return false;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor) && fnExists(Object.defineProperties) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.2.3.7-6-a-247",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-247.js",
+ "description": "Object.defineProperties - 'O' is an Array, 'P' is an array index named property that already exists on 'O' is data property and 'desc' is data descriptor, test updating the [[Value]] attribute value of 'P' (15.4.5.1 step 4.c)",
+ "test": "assertTrue((function testcase() {\n\n var arr = [12];\n\n try {\n Object.defineProperties(arr, {\n \"0\": {\n value: 36\n }\n });\n return dataPropertyAttributesAreCorrect(arr, \"0\", 36, true, true, true);\n } catch (ex) {\n return false;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-6-a-248",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-248.js",
+ "description": "Object.defineProperties - 'O' is an Array, 'P' is an array index named property that already exists on 'O' is data property and 'desc' is data descriptor, test setting the [[Value]] attribute value of 'P' as undefined (15.4.5.1 step 4.c)",
+ "test": "assertTrue((function testcase() {\n\n var arr = [12];\n\n try {\n Object.defineProperties(arr, {\n \"0\": {\n value: undefined\n }\n });\n return dataPropertyAttributesAreCorrect(arr, \"0\", undefined, true, true, true);\n } catch (ex) {\n return false;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-6-a-249",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-249.js",
+ "description": "Object.defineProperties - 'O' is an Array, 'P' is an array index named property that already exists on 'O' is data property and 'desc' is data descriptor, test setting the [[Value]] attribute value of 'P' from undefined to normal value (15.4.5.1 step 4.c)",
+ "test": "assertTrue((function testcase() {\n\n var arr = [undefined];\n\n try {\n Object.defineProperties(arr, {\n \"0\": {\n value: 12\n }\n });\n return dataPropertyAttributesAreCorrect(arr, \"0\", 12, true, true, true);\n } catch (ex) {\n return false;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-6-a-25",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-25.js",
+ "description": "Object.defineProperties - 'P' doesn't exist in 'O', test TypeError is thrown when 'O' is not extensible (8.12.9 step 3)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n Object.preventExtensions(obj);\n\n try {\n Object.defineProperties(obj, {\n prop: {\n value: 12,\n configurable: true\n }\n });\n return false;\n } catch (e) {\n return e instanceof TypeError && !obj.hasOwnProperty(\"prop\");\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties) && fnExists(Object.preventExtensions))"
+ },
+ {
+ "id": "15.2.3.7-6-a-250",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-250.js",
+ "description": "Object.defineProperties - 'O' is an Array, 'P' is an array index named property that already exists on 'O' is data property and 'desc' is data descriptor, test updating the [[Writable]] attribute value of 'P' (15.4.5.1 step 4.c)",
+ "test": "assertTrue((function testcase() {\n\n var arr = [100];\n\n try {\n Object.defineProperties(arr, {\n \"0\": {\n writable: false\n }\n });\n return dataPropertyAttributesAreCorrect(arr, \"0\", 100, false, true, true);\n } catch (ex) {\n return false;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-6-a-251",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-251.js",
+ "description": "Object.defineProperties - 'O' is an Array, 'P' is an array index named property that already exists on 'O' is data property and 'desc' is data descriptor, test updating the [[Enumerable]] attribute value of 'P' (15.4.5.1 step 4.c)",
+ "test": "assertTrue((function testcase() {\n\n var arr = [12];\n\n try {\n Object.defineProperties(arr, {\n \"0\": {\n enumerable: false\n }\n });\n return dataPropertyAttributesAreCorrect(arr, \"0\", 12, true, false, true);\n } catch (ex) {\n return false;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-6-a-252",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-252.js",
+ "description": "Object.defineProperties - 'O' is an Array, 'P' is an array index named property that already exists on 'O' is data property and 'desc' is data descriptor, test updating the [[Configurable]] attribute value of 'P' (15.4.5.1 step 4.c)",
+ "test": "assertTrue((function testcase() {\n\n var arr = [12];\n\n try {\n Object.defineProperties(arr, {\n \"0\": {\n configurable: false\n }\n });\n return dataPropertyAttributesAreCorrect(arr, \"0\", 12, true, true, false);\n } catch (ex) {\n return false;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-6-a-253",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-253.js",
+ "description": "Object.defineProperties - 'O' is an Array, 'P' is an array index named property that already exists on 'O' is data property and 'desc' is data descriptor, test updating multiple attribute values of 'P' (15.4.5.1 step 4.c)",
+ "test": "assertTrue((function testcase() {\n\n var arr = [12];\n\n try {\n Object.defineProperties(arr, {\n \"0\": {\n value: 36,\n writable: false,\n configurable: false\n }\n });\n return dataPropertyAttributesAreCorrect(arr, \"0\", 36, false, true, false);\n } catch (ex) {\n return false;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-6-a-254",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-254.js",
+ "description": "Object.defineProperties - 'O' is an Array, 'P' is an array index named property that already exists on 'O' is accessor property and 'desc' is accessor descriptor, test updating the [[Get]] attribute value of 'P' with different getter function (15.4.5.1 step 4.c)",
+ "test": "assertTrue((function testcase() {\n\n var arr = [];\n\n function get_fun() {\n return 36;\n }\n\n Object.defineProperty(arr, \"0\", {\n get: function () {\n return 12;\n },\n configurable: true\n });\n\n Object.defineProperties(arr, {\n \"0\": {\n get: get_fun\n }\n });\n return accessorPropertyAttributesAreCorrect(arr, \"0\", get_fun, undefined, undefined, false, true);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor) && fnExists(Object.defineProperties) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.2.3.7-6-a-255",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-255.js",
+ "description": "Object.defineProperties - 'O' is an Array, 'P' is an array index named property that already exists on 'O' is accessor property and 'desc' is accessor descriptor, test setting the [[Get]] attribute value of 'P' as undefined (15.4.5.1 step 4.c)",
+ "test": "assertTrue((function testcase() {\n\n var arr = [];\n\n Object.defineProperty(arr, \"0\", {\n get: function () {\n return 12;\n },\n configurable: true\n });\n\n Object.defineProperties(arr, {\n \"0\": {\n get: undefined\n }\n });\n return accessorPropertyAttributesAreCorrect(arr, \"0\", undefined, undefined, undefined, false, true);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor) && fnExists(Object.defineProperties) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.2.3.7-6-a-256",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-256.js",
+ "description": "Object.defineProperties - 'O' is an Array, 'P' is an array index named property that already exists on 'O' is accessor property and 'desc' is accessor descriptor, test updating the [[Get]] attribute value of 'P' from undefined to function (15.4.5.1 step 4.c)",
+ "test": "assertTrue((function testcase() {\n\n var arr = [];\n\n function get_fun() {\n return 36;\n }\n\n Object.defineProperty(arr, \"0\", {\n get: undefined,\n configurable: true\n });\n\n Object.defineProperties(arr, {\n \"0\": {\n get: get_fun\n }\n });\n return accessorPropertyAttributesAreCorrect(arr, \"0\", get_fun, undefined, undefined, false, true);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor) && fnExists(Object.defineProperties) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.2.3.7-6-a-257",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-257.js",
+ "description": "Object.defineProperties - 'O' is an Array, 'P' is an array index named property that already exists on 'O' is accessor property and 'desc' is accessor descriptor, test updating the [[Set]] attribute value of 'P' with different getter function (15.4.5.1 step 4.c)",
+ "test": "assertTrue((function testcase() {\n\n var arr = [];\n\n function set_fun(value) {\n arr.setVerifyHelpProp = value;\n }\n\n Object.defineProperty(arr, \"0\", {\n set: function () { },\n configurable: true\n });\n\n try {\n Object.defineProperties(arr, {\n \"0\": {\n set: set_fun\n }\n });\n return accessorPropertyAttributesAreCorrect(arr, \"0\", undefined, set_fun, \"setVerifyHelpProp\", false, true);\n } catch (ex) {\n return false;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor) && fnExists(Object.defineProperties) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.2.3.7-6-a-258",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-258.js",
+ "description": "Object.defineProperties - 'O' is an Array, 'P' is an array index named property that already exists on 'O' is accessor property and 'desc' is accessor descriptor, test setting the [[Set]] attribute value of 'P' as undefined (15.4.5.1 step 4.c)",
+ "test": "assertTrue((function testcase() {\n\n var arr = [];\n\n Object.defineProperty(arr, \"0\", {\n set: function () { },\n configurable: true\n });\n\n Object.defineProperties(arr, {\n \"0\": {\n set: undefined\n }\n });\n return accessorPropertyAttributesAreCorrect(arr, \"0\", undefined, undefined, undefined, false, true);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor) && fnExists(Object.defineProperties) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.2.3.7-6-a-259",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-259.js",
+ "description": "Object.defineProperties - 'O' is an Array, 'P' is an array index named property that already exists on 'O' is accessor property and 'desc' is accessor descriptor, test updating the [[Set]] attribute value of 'P' from undefined to function (15.4.5.1 step 4.c)",
+ "test": "assertTrue((function testcase() {\n\n var arr = [];\n\n function set_fun(value) {\n arr.setVerifyHelpProp = value;\n }\n Object.defineProperty(arr, \"0\", {\n set: undefined,\n configurable: true\n });\n\n try {\n Object.defineProperties(arr, {\n \"0\": {\n set: set_fun\n }\n });\n return accessorPropertyAttributesAreCorrect(arr, \"0\", undefined, set_fun, \"setVerifyHelpProp\", false, true);\n } catch (ex) {\n return false;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor) && fnExists(Object.defineProperties) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.2.3.7-6-a-26",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-26.js",
+ "description": "Object.defineProperties - 'P' doesn't exist in 'O', test 'P' is defined as data property when 'desc' is generic descriptor (8.12.9 step 4.a)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n Object.defineProperties(obj, {\n prop: {\n configurable: true,\n enumerable: true\n }\n });\n var desc = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n return desc.hasOwnProperty(\"value\") && typeof desc.value === \"undefined\" &&\n desc.hasOwnProperty(\"writable\") && desc.writable === false &&\n desc.hasOwnProperty(\"configurable\") && desc.configurable === true &&\n desc.hasOwnProperty(\"enumerable\") && desc.enumerable === true &&\n !desc.hasOwnProperty(\"get\") && !desc.hasOwnProperty(\"set\");\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.7-6-a-260",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-260.js",
+ "description": "Object.defineProperties - 'O' is an Array, 'P' is an array index named property that already exists on 'O' is accessor property and 'desc' is accessor descriptor, test updating the [[Enumerable]] attribute value of 'P' (15.4.5.1 step 4.c)",
+ "test": "assertTrue((function testcase() {\n\n var arr = [];\n\n function set_fun(value) {\n arr.setVerifyHelpProp = value;\n }\n Object.defineProperty(arr, \"0\", {\n set: set_fun,\n enumerable: true,\n configurable: true\n });\n\n try {\n Object.defineProperties(arr, {\n \"0\": {\n enumerable: false\n }\n });\n return accessorPropertyAttributesAreCorrect(arr, \"0\", undefined, set_fun, \"setVerifyHelpProp\", false, true);\n } catch (ex) {\n return false;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor) && fnExists(Object.defineProperties) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.2.3.7-6-a-261",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-261.js",
+ "description": "Object.defineProperties - 'O' is an Array, 'P' is an array index named property that already exists on 'O' is accessor property and 'desc' is accessor descriptor, test updating the [[Configurable]] attribute value of 'P' (15.4.5.1 step 4.c)",
+ "test": "assertTrue((function testcase() {\n\n var arr = [];\n\n function set_fun(value) {\n arr.setVerifyHelpProp = value;\n }\n Object.defineProperty(arr, \"0\", {\n set: set_fun,\n configurable: true\n });\n\n try {\n Object.defineProperties(arr, {\n \"0\": {\n configurable: false\n }\n });\n return accessorPropertyAttributesAreCorrect(arr, \"0\", undefined, set_fun, \"setVerifyHelpProp\", false, false);\n } catch (ex) {\n return false;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor) && fnExists(Object.defineProperties) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.2.3.7-6-a-262",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-262.js",
+ "description": "Object.defineProperties - 'O' is an Array, 'P' is an array index named property that already exists on 'O' is accessor property and 'desc' is accessor descriptor, test updating multiple attribute values of 'P' (15.4.5.1 step 4.c)",
+ "test": "assertTrue((function testcase() {\n\n var arr = [];\n\n function get_fun() {\n return 36;\n }\n function set_fun(value) {\n arr.setVerifyHelpProp = value;\n }\n Object.defineProperty(arr, \"0\", {\n get: function () {\n return 12;\n },\n set: set_fun,\n enumerable: true,\n configurable: true\n });\n\n try {\n Object.defineProperties(arr, {\n \"0\": {\n get: get_fun,\n enumerable: false,\n configurable: false\n }\n });\n return accessorPropertyAttributesAreCorrect(arr, \"0\", get_fun, set_fun, \"setVerifyHelpProp\", false, false);\n } catch (ex) {\n return false;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor) && fnExists(Object.defineProperties) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.2.3.7-6-a-263",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-263.js",
+ "description": "Object.defineProperties - 'O' is an Array, 'P' is an array index named property, test the length property of 'O' is not changed if ToUint32('P') is less than value of the length property in 'O' (15.4.5.1 step 4.e)",
+ "test": "assertTrue((function testcase() {\n\n var arr = [];\n\n arr.length = 3; // default value of length: writable: true, configurable: false, enumerable: false\n\n Object.defineProperties(arr, {\n \"1\": {\n value: 26\n }\n });\n return arr.length === 3 && arr[1] === 26;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-6-a-264",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-264.js",
+ "description": "Object.defineProperties - 'O' is an Array, 'P' is an array index named property, test the length property of 'O' is set as ToUint32('P') + 1 if ToUint32('P') equals to value of the length property in 'O' (15.4.5.1 step 4.e.ii)",
+ "test": "assertTrue((function testcase() {\n\n var arr = [];\n\n arr.length = 3; // default value of length: writable: true, configurable: false, enumerable: false\n\n Object.defineProperties(arr, {\n \"3\": {\n value: 26\n }\n });\n return arr.length === 4 && arr[3] === 26;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-6-a-265",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-265.js",
+ "description": "Object.defineProperties - 'O' is an Array, 'P' is an array index named property, test the length property of 'O' is set as ToUint32('P') + 1 if ToUint32('P') is greater than value of the length property in 'O' (15.4.5.1 step 4.e.ii)",
+ "test": "assertTrue((function testcase() {\n\n var arr = [];\n\n Object.defineProperties(arr, {\n \"5\": {\n value: 26\n }\n });\n return arr.length === 6 && arr[5] === 26;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-6-a-266",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-266.js",
+ "description": "Object.defineProperties - 'O' is an Array, 'P' is generic property that won't exist on 'O', and 'desc' is data descriptor, test 'P' is defined in 'O' with all correct attribute values (15.4.5.1 step 5)",
+ "test": "assertTrue((function testcase() {\n\n var arr = [];\n\n Object.defineProperties(arr, {\n \"property\": {\n value: 12,\n writable: true,\n enumerable: true,\n configurable: true\n }\n });\n return dataPropertyAttributesAreCorrect(arr, \"property\", 12, true, true, true) && arr.length === 0;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-6-a-267",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-267.js",
+ "description": "Object.defineProperties - 'O' is an Array, 'P' is generic property, and 'desc' is accessor descriptor, test 'P' is defined in 'O' with all correct attribute values (15.4.5.1 step 5)",
+ "test": "assertTrue((function testcase() {\n\n var arr = [];\n\n function get_fun() {\n return 12;\n }\n function set_fun(value) {\n arr.setVerifyHelpProp = value;\n }\n\n Object.defineProperties(arr, {\n \"property\": {\n get: get_fun,\n set: set_fun,\n enumerable: true,\n configurable: true\n }\n });\n return accessorPropertyAttributesAreCorrect(arr, \"property\", get_fun, set_fun, \"setVerifyHelpProp\", true, true) &&\n arr.length === 0;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor) && fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-6-a-268",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-268.js",
+ "description": "Object.defineProperties - 'O' is an Array, 'P' is generic own accessor property of 'O', and 'desc' is accessor descriptor, test updating multiple attribute values of 'P' (15.4.5.1 step 5)",
+ "test": "assertTrue((function testcase() {\n var arr = [];\n function get_fun() {\n return 12;\n }\n function set_fun(value) {\n arr.verifySetFun = value;\n }\n Object.defineProperty(arr, \"property\", {\n get: function () {\n return 36;\n },\n enumerable: true,\n configurable: true\n });\n\n Object.defineProperties(arr, {\n \"property\": {\n get: get_fun,\n set: set_fun,\n enumerable: false\n }\n });\n return accessorPropertyAttributesAreCorrect(arr, \"property\", get_fun, set_fun, \"verifySetFun\", false, true);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor) && fnExists(Object.defineProperties) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.7-6-a-269",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-269.js",
+ "description": "Object.defineProperties - 'O' is an Array, 'P' is generic own data property of 'O', and 'desc' is data descriptor, test updating multiple attribute values of 'P' (15.4.5.1 step 5)",
+ "test": "assertTrue((function testcase() {\n\n var arr = [];\n arr.property = 12; // default value of attributes: writable: true, configurable: true, enumerable: true\n\n Object.defineProperties(arr, {\n \"property\": {\n writable: false,\n enumerable: false,\n configurable: false\n }\n });\n return dataPropertyAttributesAreCorrect(arr, \"property\", 12, false, false, false) && arr.length === 0;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-6-a-27",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-27.js",
+ "description": "Object.defineProperties - 'P' doesn't exist in 'O', test [[Value]] of 'P' is set as undefined value if absent in data descriptor 'desc' (8.12.9 step 4.a.i)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n Object.defineProperties(obj, {\n prop: {\n writable: true\n }\n });\n\n var desc = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n return desc.hasOwnProperty(\"value\") && typeof desc.value === \"undefined\" &&\n desc.hasOwnProperty(\"writable\") && desc.writable === true &&\n desc.hasOwnProperty(\"configurable\") && desc.configurable === false &&\n desc.hasOwnProperty(\"enumerable\") && desc.enumerable === false;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.7-6-a-270",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-270.js",
+ "description": "Object.defineProperties - 'O' is an Array, 'P' is generic own data property of 'O', test TypeError is thrown when updating the [[Value]] attribute value of 'P' which is defined as unwritable and non-configurable (15.4.5.1 step 5)",
+ "test": "assertTrue((function testcase() {\n\n var arr = [];\n\n Object.defineProperty(arr, \"property\", {\n value: 12\n });\n\n try {\n Object.defineProperties(arr, {\n \"property\": {\n value: 36\n }\n });\n return false;\n } catch (ex) {\n return (ex instanceof TypeError) && dataPropertyAttributesAreCorrect(arr, \"property\", 12, false, false, false);\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.7-6-a-271",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-271.js",
+ "description": "Object.defineProperties -'O' is an Array, 'P' is generic own data property of 'O', test TypeError is thrown when updating the [[Writable]] attribute value of 'P' which is defined as non-configurable (15.4.5.1 step 5)",
+ "test": "assertTrue((function testcase() {\n\n var arr = [];\n\n Object.defineProperty(arr, \"property\", {\n writable: false\n });\n\n try {\n Object.defineProperties(arr, {\n \"property\": {\n writable: true\n }\n });\n return false;\n } catch (ex) {\n return (ex instanceof TypeError) && dataPropertyAttributesAreCorrect(arr, \"property\", undefined, false, false, false);\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.7-6-a-272",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-272.js",
+ "description": "Object.defineProperties - 'O' is an Array, 'P' is generic own data property of 'O', test TypeError is thrown when updating the [[Enumerable]] attribute value of 'P' which is defined as non-configurable (15.4.5.1 step 5)",
+ "test": "assertTrue((function testcase() {\n\n var arr = [];\n\n Object.defineProperty(arr, \"property\", {\n value: 12,\n enumerable: false\n });\n\n try {\n Object.defineProperties(arr, {\n \"property\": {\n enumerable: true\n }\n });\n return false;\n } catch (ex) {\n return (ex instanceof TypeError) && dataPropertyAttributesAreCorrect(arr, \"property\", 12, false, false, false);\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.7-6-a-273",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-273.js",
+ "description": "Object.defineProperties - 'O' is an Array, 'P' is generic own data property of 'O', test TypeError is thrown when updating the [[Configurable]] attribute value of 'P' which is defined as non-configurable (15.4.5.1 step 5)",
+ "test": "assertTrue((function testcase() {\n\n var arr = [];\n\n Object.defineProperty(arr, \"property\", {\n value: 12\n });\n\n try {\n Object.defineProperties(arr, {\n \"property\": {\n configurable: true\n }\n });\n return false;\n } catch (ex) {\n return (ex instanceof TypeError) && dataPropertyAttributesAreCorrect(arr, \"property\", 12, false, false, false);\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.7-6-a-274",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-274.js",
+ "description": "Object.defineProperties - 'O' is an Array, 'P' is generic own accessor property of 'O', test TypeError is thrown when updating the [[Get]] attribute value of 'P' which is defined as non-configurable (15.4.5.1 step 5)",
+ "test": "assertTrue((function testcase() {\n var arr = [];\n\n function get_fun() {\n return 37;\n }\n function set_fun(value) {\n arr.verifySetFun = value;\n }\n Object.defineProperty(arr, \"property\", {\n get: get_fun,\n set: set_fun\n });\n\n try {\n Object.defineProperties(arr, {\n \"property\": {\n get: function () {\n return 36;\n }\n }\n });\n return false;\n } catch (ex) {\n return (ex instanceof TypeError) &&\n accessorPropertyAttributesAreCorrect(arr, \"property\", get_fun, set_fun, \"verifySetFun\", false, false);\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor) && fnExists(Object.defineProperties) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.7-6-a-275",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-275.js",
+ "description": "Object.defineProperties - 'O' is an Array, 'P' is generic own accessor property of 'O', test TypeError is thrown when updating the [[Set]] attribute value of 'P' which is defined as non-configurable (15.4.5.1 step 5)",
+ "test": "assertTrue((function testcase() {\n\n var arr = [];\n\n function set_fun(value) {\n arr.setVerifyHelpProp = value;\n }\n Object.defineProperty(arr, \"property\", {\n set: set_fun\n });\n\n try {\n Object.defineProperties(arr, {\n \"property\": {\n set: function () { }\n }\n });\n return false;\n } catch (ex) {\n return (ex instanceof TypeError) && accessorPropertyAttributesAreCorrect(arr, \"property\", undefined, set_fun, \"setVerifyHelpProp\", false, false);\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor) && fnExists(Object.defineProperties) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.7-6-a-276",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-276.js",
+ "description": "Object.defineProperties - 'O' is an Array, 'P' is generic own accessor property of 'O', test TypeError is thrown when updating the [[Enumerable]] attribute value of 'P' which is defined as non-configurable (15.4.5.1 step 5)",
+ "test": "assertTrue((function testcase() {\n\n var arr = [];\n\n function set_fun(value) {\n arr.setVerifyHelpProp = value;\n }\n Object.defineProperty(arr, \"property\", {\n set: set_fun,\n enumerable: false\n });\n\n try {\n Object.defineProperties(arr, {\n \"property\": {\n enumerable: true\n }\n });\n return false;\n } catch (ex) {\n return (ex instanceof TypeError) && accessorPropertyAttributesAreCorrect(arr, \"property\", undefined, set_fun, \"setVerifyHelpProp\", false, false);\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor) && fnExists(Object.defineProperties) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.7-6-a-277",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-277.js",
+ "description": "Object.defineProperties - 'O' is an Array, 'P' is generic own accessor property of 'O', test TypeError is thrown when updating the [[Configurable]] attribute value of 'P' which is defined as non-configurable (15.4.5.1 step 5)",
+ "test": "assertTrue((function testcase() {\n\n var arr = [];\n\n function set_fun(value) {\n arr.setVerifyHelpProp = value;\n }\n Object.defineProperty(arr, \"property\", {\n set: set_fun,\n configurable: false\n });\n\n try {\n Object.defineProperties(arr, {\n \"property\": {\n configurable: true\n }\n });\n return false;\n } catch (ex) {\n return (ex instanceof TypeError) && accessorPropertyAttributesAreCorrect(arr, \"property\", undefined, set_fun, \"setVerifyHelpProp\", false, false);\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor) && fnExists(Object.defineProperties) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.7-6-a-278",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-278.js",
+ "description": "Object.defineProperties - 'O' is an Arguments object, 'P' is own property which is ever defined in both [[ParameterMap]] of 'O' and 'O', and is deleted afterwards, and 'desc' is data descriptor, test 'P' is redefined in 'O' with all correct attribute values (10.6 [[DefineOwnProperty]] step 3)",
+ "test": "assertTrue((function testcase() {\n\n var arg;\n\n (function fun(a, b, c) {\n arg = arguments;\n }(0, 1, 2));\n\n delete arg[0];\n\n Object.defineProperties(arg, {\n \"0\": {\n value: 10,\n writable: true,\n enumerable: true,\n configurable: true\n }\n });\n\n return dataPropertyAttributesAreCorrect(arg, \"0\", 10, true, true, true);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-6-a-279",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-279.js",
+ "description": "Object.defineProperties - 'O' is an Arguments object, 'P' is own property which is ever defined in both [[ParameterMap]] of 'O' and 'O', and is deleted afterwards, and 'desc' is accessor descriptor, test 'P' is redefined in 'O' with all correct attribute values (10.6 [[DefineOwnProperty]] step 3)",
+ "test": "assertTrue((function testcase() {\n\n var arg;\n\n (function fun(a, b, c) {\n arg = arguments;\n }(0, 1, 2));\n\n delete arg[0];\n\n function get_func() {\n return 10;\n }\n function set_func(value) {\n arg.setVerifyHelpProp = value;\n }\n\n Object.defineProperties(arg, {\n \"0\": {\n get: get_func,\n set: set_func,\n enumerable: true,\n configurable: true\n }\n });\n\n return accessorPropertyAttributesAreCorrect(arg, \"0\", get_func, set_func, \"setVerifyHelpProp\", true, true);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor) && fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-6-a-28",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-28.js",
+ "description": "Object.defineProperties - 'P' doesn't exist in 'O', test [[Writable]] of 'P' is set as false value if absent in data descriptor 'desc' (8.12.9 step 4.a.i)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n Object.defineProperties(obj, {\n prop: {\n value: 1001\n }\n });\n obj.prop = 1002;\n return obj.hasOwnProperty(\"prop\") && obj.prop === 1001;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-6-a-280",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-280.js",
+ "description": "Object.defineProperties - 'O' is an Arguments object, 'P' is own accessor property of 'O' which is also defined in [[ParameterMap]] of 'O', and 'desc' is accessor descriptor, test updating multiple attribute values of 'P' (10.6 [[DefineOwnProperty]] step 3)",
+ "test": "assertTrue((function testcase() {\n\n var arg;\n\n (function fun(a, b, c) {\n arg = arguments;\n } (0, 1, 2));\n\n function get_func1() {\n return 10;\n }\n\n Object.defineProperty(arg, \"0\", {\n get: get_func1,\n enumerable: true,\n configurable: true\n });\n\n function get_func2() {\n return 20;\n }\n\n Object.defineProperties(arg, {\n \"0\": {\n get: get_func2,\n enumerable: false,\n configurable: false\n }\n });\n\n var desc = Object.getOwnPropertyDescriptor(arg, \"0\");\n return desc.get === get_func2 && typeof desc.set === \"undefined\" &&\n desc.configurable === false && desc.enumerable === false;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor) && fnExists(Object.defineProperties) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.7-6-a-281",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-281.js",
+ "description": "Object.defineProperties - 'O' is an Arguments object, 'P' is own data property of 'O' which is also defined in [[ParameterMap]] of 'O', and 'desc' is data descriptor, test updating multiple attribute values of 'P' (10.6 [[DefineOwnProperty]] step 3)",
+ "test": "assertTrue((function testcase() {\n\n var arg;\n\n (function fun(a, b, c) {\n arg = arguments;\n }(0, 1, 2));\n\n Object.defineProperties(arg, {\n \"0\": {\n value: 20,\n writable: false,\n enumerable: false,\n configurable: false\n }\n });\n\n return dataPropertyAttributesAreCorrect(arg, \"0\", 20, false, false, false);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-6-a-282",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-282.js",
+ "description": "Object.defineProperties - 'O' is an Arguments object, 'P' is own data property of 'O' which is also defined in [[ParameterMap]] of 'O', test TypeError is thrown when updating the [[Value]] attribute value of 'P' whose writable and configurable attributes are false (10.6 [[DefineOwnProperty]] step 4)",
+ "test": "assertTrue((function testcase() {\n\n var arg;\n\n (function fun(a, b, c) {\n arg = arguments;\n }(0, 1, 2));\n\n Object.defineProperty(arg, \"0\", {\n value: 0,\n writable: false,\n configurable: false\n });\n\n try {\n Object.defineProperties(arg, {\n \"0\": {\n value: 10\n }\n });\n\n return false;\n } catch (e) {\n return (e instanceof TypeError) && dataPropertyAttributesAreCorrect(arg, \"0\", 0, false, true, false);\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.7-6-a-283",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-283.js",
+ "description": "Object.defineProperties - 'O' is an Arguments object, 'P' is own data property of 'O' which is also defined in [[ParameterMap]] of 'O', test TypeError is thrown when updating the [[Writable]] attribute value of 'P' which is defined as non-configurable (10.6 [[DefineOwnProperty]] step 4)",
+ "test": "assertTrue((function testcase() {\n\n var arg;\n\n (function fun(a, b, c) {\n arg = arguments;\n }(0, 1, 2));\n\n Object.defineProperty(arg, \"0\", {\n value: 0,\n writable: false,\n enumerable: false,\n configurable: false\n });\n\n try {\n Object.defineProperties(arg, {\n \"0\": {\n writable: true\n }\n });\n\n return false;\n } catch (e) {\n return (e instanceof TypeError) && dataPropertyAttributesAreCorrect(arg, \"0\", 0, false, false, false);\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.7-6-a-284",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-284.js",
+ "description": "Object.defineProperties - 'O' is an Arguments object, 'P' is own data property of 'O' which is also defined in [[ParameterMap]] of 'O', test TypeError is thrown when updating the [[Enumerable]] attribute value of 'P' which is defined as non-configurable (10.6 [[DefineOwnProperty]] step 4)",
+ "test": "assertTrue((function testcase() {\n\n var arg;\n\n (function fun(a, b, c) {\n arg = arguments;\n }(0, 1, 2));\n\n Object.defineProperty(arg, \"0\", {\n value: 0,\n writable: false,\n enumerable: true,\n configurable: false\n });\n\n try {\n Object.defineProperties(arg, {\n \"0\": {\n enumerable: false\n }\n });\n\n return false; \n } catch (e) {\n return (e instanceof TypeError) && dataPropertyAttributesAreCorrect(arg, \"0\", 0, false, true, false);\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.7-6-a-285",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-285.js",
+ "description": "Object.defineProperties - 'O' is an Arguments object, 'P' is own data property of 'O' which is also defined in [[ParameterMap]] of 'O', test TypeError is thrown when updating the [[Configurable]] attribute value of 'P' which is defined as non-configurable (10.6 [[DefineOwnProperty]] step 4)",
+ "test": "assertTrue((function testcase() {\n\n var arg;\n\n (function fun(a, b, c) {\n arg = arguments;\n }(0, 1, 2));\n\n Object.defineProperty(arg, \"0\", {\n value: 0,\n writable: false,\n enumerable: false,\n configurable: false\n });\n\n try {\n Object.defineProperties(arg, {\n \"0\": {\n configurable: true\n }\n });\n\n return false; \n } catch (e) {\n return (e instanceof TypeError) && dataPropertyAttributesAreCorrect(arg, \"0\", 0, false, false, false);\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.7-6-a-286",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-286.js",
+ "description": "Object.defineProperties - 'O' is an Arguments object, 'P' is own accessor property of 'O' which is also defined in [[ParameterMap]] of 'O', test TypeError is thrown when updating the [[Get]] attribute value of 'P' which is defined as non-configurable (10.6 [[DefineOwnProperty]] step 4)",
+ "test": "assertTrue((function testcase() {\n\n var arg;\n\n (function fun(a, b, c) {\n arg = arguments;\n } (0, 1, 2));\n\n function get_func1() {\n return 0;\n }\n\n Object.defineProperty(arg, \"0\", {\n get: get_func1,\n enumerable: false,\n configurable: false\n });\n\n function get_func2() {\n return 10;\n }\n try {\n Object.defineProperties(arg, {\n \"0\": {\n get: get_func2\n }\n });\n\n return false;\n } catch (e) {\n var desc = Object.getOwnPropertyDescriptor(arg, \"0\");\n return e instanceof TypeError && desc.get === get_func1 && typeof desc.set === \"undefined\" &&\n desc.enumerable === false && desc.configurable === false;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor) && fnExists(Object.defineProperties) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.7-6-a-287",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-287.js",
+ "description": "Object.defineProperties - 'O' is an Arguments object, 'P' is own accessor property of 'O' which is also defined in [[ParameterMap]] of 'O', test TypeError is thrown when updating the [[Set]] attribute value of 'P' which is defined as non-configurable (10.6 [[DefineOwnProperty]] step 4)",
+ "test": "assertTrue((function testcase() {\n\n var arg;\n\n (function fun(a, b, c) {\n arg = arguments;\n }(0, 1, 2));\n\n function get_func() {\n return 0;\n }\n\n Object.defineProperty(arg, \"0\", {\n get: get_func,\n set: undefined,\n enumerable: false,\n configurable: false\n });\n\n function set_func(value) {\n arg.setVerifyHelpProp = value;\n }\n try {\n Object.defineProperties(arg, {\n \"0\": {\n set: set_func\n }\n });\n\n return false;\n } catch (e) {\n var desc = Object.getOwnPropertyDescriptor(arg, \"0\");\n return e instanceof TypeError && desc.get === get_func && typeof desc.set === \"undefined\" &&\n desc.enumerable === false && desc.configurable === false;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor) && fnExists(Object.defineProperties) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.7-6-a-288",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-288.js",
+ "description": "Object.defineProperties - 'O' is an Arguments object, 'P' is own accessor property of 'O' which is also defined in [[ParameterMap]] of 'O', test TypeError is thrown when updating the [[Enumerable]] attribute value of 'P' which is defined as non-configurable (10.6 [[DefineOwnProperty]] step 4)",
+ "test": "assertTrue((function testcase() {\n\n var arg;\n\n (function fun(a, b, c) {\n arg = arguments;\n }(0, 1, 2));\n\n function get_func() {\n return 0;\n }\n\n Object.defineProperty(arg, \"0\", {\n get: get_func,\n enumerable: true,\n configurable: false\n });\n\n try {\n Object.defineProperties(arg, {\n \"0\": {\n enumerable: false\n }\n });\n\n return false;\n } catch (e) {\n return (e instanceof TypeError) && accessorPropertyAttributesAreCorrect(arg, \"0\", get_func, undefined, undefined, true, false);\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.7-6-a-289",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-289.js",
+ "description": "Object.defineProperties - 'O' is an Arguments object, 'P' is own accessor property of 'O' which is also defined in [[ParameterMap]] of 'O', test TypeError is thrown when updating the [[Configurable]] attribute value of 'P' which is defined as non-configurable (10.6 [[DefineOwnProperty]] step 4)",
+ "test": "assertTrue((function testcase() {\n\n var arg;\n\n (function fun(a, b, c) {\n arg = arguments;\n }(0, 1, 2));\n\n function get_func() {\n return 0;\n }\n\n Object.defineProperty(arg, \"0\", {\n get: get_func,\n enumerable: true,\n configurable: false\n });\n\n try {\n Object.defineProperties(arg, {\n \"0\": {\n configurable: true\n }\n });\n\n return false;\n } catch (e) {\n return (e instanceof TypeError) && accessorPropertyAttributesAreCorrect(arg, \"0\", get_func, undefined, undefined, true, false);\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.7-6-a-29",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-29.js",
+ "description": "Object.defineProperties - 'P' doesn't exist in 'O', test [[Enumerable]] of 'P' is set as false value if absent in data descriptor 'desc' (8.12.9 step 4.a.i)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n Object.defineProperties(obj, {\n prop: { value: 1001}\n });\n\n for (var prop in obj) {\n if (obj.hasOwnProperty(prop)) {\n if (prop === \"prop\") {\n return false;\n }\n }\n }\n return true;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-6-a-290",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-290.js",
+ "description": "Object.defineProperties - 'O' is an Arguments object, 'P' is an array index named property of 'O' but not defined in [[ParameterMap]] of 'O', and 'desc' is data descriptor, test 'P' is defined in 'O' with all correct attribute values (10.6 [[DefineOwnProperty]] step 3)",
+ "test": "assertTrue((function testcase() {\n\n var arg;\n\n (function fun() {\n arg = arguments;\n }(0, 1, 2));\n\n delete arg[0];\n\n Object.defineProperties(arg, {\n \"0\": {\n value: 10,\n writable: false,\n enumerable: false,\n configurable: false\n }\n });\n\n return dataPropertyAttributesAreCorrect(arg, \"0\", 10, false, false, false);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-6-a-291",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-291.js",
+ "description": "Object.defineProperties - 'O' is an Arguments object, 'P' is an array index named property of 'O' but not defined in [[ParameterMap]] of 'O', and 'desc' is accessor descriptor, test 'P' is defined in 'O' with all correct attribute values (10.6 [[DefineOwnProperty]] step 3)",
+ "test": "assertTrue((function testcase() {\n\n var arg;\n\n (function fun() {\n arg = arguments;\n }(0, 1, 2));\n\n delete arg[0];\n\n function get_func() {\n return 10;\n }\n function set_func(value) {\n arg.setVerifyHelpProp = value;\n }\n\n Object.defineProperties(arg, {\n \"0\": {\n get: get_func,\n set: set_func,\n enumerable: false,\n configurable: false\n }\n });\n\n return accessorPropertyAttributesAreCorrect(arg, \"0\", get_func, set_func, \"setVerifyHelpProp\", false, false);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor) && fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-6-a-292",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-292.js",
+ "description": "Object.defineProperties - 'O' is an Arguments object, 'P' is an array index named accessor property of 'O' but not defined in [[ParameterMap]] of 'O', and 'desc' is accessor descriptor, test updating multiple attribute values of 'P' (10.6 [[DefineOwnProperty]] step 3)",
+ "test": "assertTrue((function testcase() {\n\n var arg;\n\n (function fun() {\n arg = arguments;\n }(0, 1, 2));\n\n function get_func1() {\n return 10;\n }\n\n Object.defineProperty(arg, \"0\", {\n get: get_func1,\n enumerable: true,\n configurable: true\n });\n\n function get_func2() {\n return 20;\n }\n\n Object.defineProperties(arg, {\n \"0\": {\n get: get_func2,\n enumerable: false,\n configurable: false\n }\n });\n\n return accessorPropertyAttributesAreCorrect(arg, \"0\", get_func2, undefined, undefined, false, false);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.7-6-a-293",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-293.js",
+ "description": "Object.defineProperties - 'O' is an Arguments object, 'P' is an array index named data property of 'O' but not defined in [[ParameterMap]] of 'O', and 'desc' is data descriptor, test updating multiple attribute values of 'P' (10.6 [[DefineOwnProperty]] step 3)",
+ "test": "assertTrue((function testcase() {\n\n var arg;\n\n (function fun() {\n arg = arguments;\n }(0, 1, 2));\n\n Object.defineProperties(arg, {\n \"0\": {\n value: 20,\n writable: false,\n enumerable: false,\n configurable: false\n }\n });\n\n return dataPropertyAttributesAreCorrect(arg, \"0\", 20, false, false, false);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-6-a-294",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-294.js",
+ "description": "Object.defineProperties - 'O' is an Arguments object, 'P' is an array index named data property of 'O' but not defined in [[ParameterMap]] of 'O', test TypeError is thrown when updating the [[Value]] attribute value of 'P' which is not writable and not configurable (10.6 [[DefineOwnProperty]] step 4)",
+ "test": "assertTrue((function testcase() {\n\n var arg;\n\n (function fun() {\n arg = arguments;\n }());\n\n Object.defineProperty(arg, \"0\", {\n value: 0,\n writable: false,\n configurable: false\n });\n\n try {\n Object.defineProperties(arg, {\n \"0\": {\n value: 10\n }\n });\n\n return false;\n } catch (e) {\n return (e instanceof TypeError) && dataPropertyAttributesAreCorrect(arg, \"0\", 0, false, false, false);\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.7-6-a-295",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-295.js",
+ "description": "Object.defineProperties - 'O' is an Arguments object, 'P' is an array index named data property of 'O' but not defined in [[ParameterMap]] of 'O', test TypeError is thrown when updating the [[Writable]] attribute value of 'P' which is not configurable (10.6 [[DefineOwnProperty]] step 4)",
+ "test": "assertTrue((function testcase() {\n\n var arg;\n\n (function fun() {\n arg = arguments;\n }());\n\n Object.defineProperty(arg, \"0\", {\n value: 0,\n writable: false,\n enumerable: false,\n configurable: false\n });\n\n try {\n Object.defineProperties(arg, {\n \"0\": {\n writable: true\n }\n });\n\n return false;\n } catch (e) {\n return (e instanceof TypeError) && dataPropertyAttributesAreCorrect(arg, \"0\", 0, false, false, false);\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.7-6-a-296",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-296.js",
+ "description": "Object.defineProperties - 'O' is an Arguments object, 'P' is an array index named data property of 'O' but not defined in [[ParameterMap]] of 'O', test TypeError is thrown when updating the [[Enumerable]] attribute value of 'P' which is not configurable (10.6 [[DefineOwnProperty]] step 4)",
+ "test": "assertTrue((function testcase() {\n\n var arg;\n\n (function fun() {\n arg = arguments;\n }());\n\n Object.defineProperty(arg, \"0\", {\n value: 0,\n writable: false,\n enumerable: true,\n configurable: false\n });\n\n try {\n Object.defineProperties(arg, {\n \"0\": {\n enumerable: false\n }\n });\n\n return false;\n } catch (e) {\n return (e instanceof TypeError) && dataPropertyAttributesAreCorrect(arg, \"0\", 0, false, true, false);\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.7-6-a-297",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-297.js",
+ "description": "Object.defineProperties - 'O' is an Arguments object, 'P' is an array index named data property of 'O' but not defined in [[ParameterMap]] of 'O', test TypeError is thrown when updating the [[Configurable]] attribute value of 'P' which is not configurable (10.6 [[DefineOwnProperty]] step 4)",
+ "test": "assertTrue((function testcase() {\n\n var arg;\n\n (function fun() {\n arg = arguments;\n }());\n\n Object.defineProperty(arg, \"0\", {\n value: 0,\n writable: false,\n enumerable: false,\n configurable: false\n });\n\n try {\n Object.defineProperties(arg, {\n \"0\": {\n configurable: true\n }\n });\n\n return false;\n } catch (e) {\n return (e instanceof TypeError) && dataPropertyAttributesAreCorrect(arg, \"0\", 0, false, false, false);\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.7-6-a-298",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-298.js",
+ "description": "Object.defineProperties - 'O' is an Arguments object, 'P' is an array index named accessor property of 'O' but not defined in [[ParameterMap]] of 'O', test TypeError is thrown when updating the [[Get]] attribute value of 'P' which is not configurable (10.6 [[DefineOwnProperty]] step 4)",
+ "test": "assertTrue((function testcase() {\n\n var arg;\n\n (function fun() {\n arg = arguments;\n }());\n\n function get_func1() {\n return 0;\n }\n\n Object.defineProperty(arg, \"0\", {\n get: get_func1,\n enumerable: false,\n configurable: false\n });\n\n function get_func2() {\n return 10;\n }\n try {\n Object.defineProperties(arg, {\n \"0\": {\n get: get_func2\n }\n });\n return false;\n } catch (e) {\n return (e instanceof TypeError) && accessorPropertyAttributesAreCorrect(arg, \"0\", get_func1, undefined, undefined, false, false);\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.7-6-a-299",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-299.js",
+ "description": "Object.defineProperties - 'O' is an Arguments object, 'P' is an array index named accessor property of 'O' but not defined in [[ParameterMap]] of 'O', test TypeError is thrown when updating the [[Set]] attribute value of 'P' which is not configurable (10.6 [[DefineOwnProperty]] step 4)",
+ "test": "assertTrue((function testcase() {\n\n var arg;\n\n (function fun() {\n arg = arguments;\n }());\n\n function get_func() {\n return 0;\n }\n\n Object.defineProperty(arg, \"0\", {\n get: get_func,\n set: undefined,\n enumerable: false,\n configurable: false\n });\n\n function set_func(value) {\n arg.setVerifyHelpProp = value;\n }\n try {\n Object.defineProperties(arg, {\n \"0\": {\n set: set_func\n }\n });\n return false;\n } catch (e) {\n return (e instanceof TypeError) && accessorPropertyAttributesAreCorrect(arg, \"0\", get_func, undefined, undefined, false, false);\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.7-6-a-3",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-3.js",
+ "description": "Object.defineProperties - 'P' is own data property that overrides an inherited data property (8.12.9 step 1 ) ",
+ "test": "assertTrue((function testcase() {\n var proto = {};\n Object.defineProperty(proto, \"prop\", {\n value: 11,\n configurable: true\n });\n var Con = function () { };\n Con.prototype = proto;\n\n var obj = new Con();\n Object.defineProperty(obj, \"prop\", {\n value: 12,\n configurable: false\n });\n\n try {\n Object.defineProperties(obj, {\n prop: {\n value: 13,\n configurable: true\n }\n });\n return false;\n } catch (e) {\n return (e instanceof TypeError);\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.7-6-a-30",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-30.js",
+ "description": "Object.defineProperties - 'P' doesn't exist in 'O', test [[Configurable]] of 'P' is set as false value if absent in data descriptor 'desc' (8.12.9 step 4.a.i)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n \n Object.defineProperties(obj, {\n prop: { value: 1001 }\n });\n delete obj.prop;\n return obj.hasOwnProperty(\"prop\") && obj.prop === 1001; \n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-6-a-300",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-300.js",
+ "description": "Object.defineProperties - 'O' is an Arguments object, 'P' is an array index named accessor property of 'O' but not defined in [[ParameterMap]] of 'O', test TypeError is thrown when updating the [[Enumerable]] attribute value of 'P' which is not configurable (10.6 [[DefineOwnProperty]] step 4)",
+ "test": "assertTrue((function testcase() {\n\n var arg;\n\n (function fun() {\n arg = arguments;\n }());\n\n function get_func() {\n return 0;\n }\n\n Object.defineProperty(arg, \"0\", {\n get: get_func,\n enumerable: true,\n configurable: false\n });\n\n try {\n Object.defineProperties(arg, {\n \"0\": {\n enumerable: false\n }\n });\n return false;\n } catch (e) {\n return (e instanceof TypeError) && accessorPropertyAttributesAreCorrect(arg, \"0\", get_func, undefined, undefined, true, false);\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.7-6-a-301",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-301.js",
+ "description": "Object.defineProperties - 'O' is an Arguments object, 'P' is an array index named accessor property of 'O' but not defined in [[ParameterMap]] of 'O', test TypeError is thrown when updating the [[Configurable]] attribute value of 'P' which is not configurable (10.6 [[DefineOwnProperty]] step 4)",
+ "test": "assertTrue((function testcase() {\n\n var arg;\n\n (function fun() {\n arg = arguments;\n }());\n\n function get_func() {\n return 0;\n }\n\n Object.defineProperty(arg, \"0\", {\n get: get_func,\n enumerable: true,\n configurable: false\n });\n\n try {\n Object.defineProperties(arg, {\n \"0\": {\n configurable: true\n }\n });\n return false;\n } catch (e) {\n return (e instanceof TypeError) && accessorPropertyAttributesAreCorrect(arg, \"0\", get_func, undefined, undefined, true, false);\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.7-6-a-302",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-302.js",
+ "description": "Object.defineProperties - 'O' is an Arguments object, 'P' is generic property, and 'desc' is data descriptor, test 'P' is defined in 'O' with all correct attribute values (10.6 [[DefineOwnProperty]] step 4)",
+ "test": "assertTrue((function testcase() {\n var arg = (function () {\n return arguments;\n }(1, 2, 3));\n\n Object.defineProperties(arg, {\n \"genericProperty\": {\n value: 1001,\n writable: true,\n enumerable: true,\n configurable: true\n }\n });\n\n return dataPropertyAttributesAreCorrect(arg, \"genericProperty\", 1001, true, true, true);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-6-a-303",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-303.js",
+ "description": "Object.defineProperties - 'O' is an Arguments object, 'P' is generic property, and 'desc' is accessor descriptor, test 'P' is defined in 'O' with all correct attribute values (10.6 [[DefineOwnProperty]] step 4)",
+ "test": "assertTrue((function testcase() {\n var arg = (function () {\n return arguments;\n }(1, 2, 3));\n\n function getFun() {\n return \"getFunctionString\";\n }\n function setFun(value) {\n arg.testGetFunction = value;\n }\n Object.defineProperties(arg, {\n \"genericProperty\": {\n get: getFun,\n set: setFun,\n enumerable: true,\n configurable: true\n }\n });\n\n return accessorPropertyAttributesAreCorrect(arg, \"genericProperty\", getFun, setFun, \"testGetFunction\", true, true);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor) && fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-6-a-304",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-304.js",
+ "description": "Object.defineProperties - 'O' is an Arguments object, 'P' is generic own accessor property of 'O', and 'desc' is accessor descriptor, test updating multiple attribute values of 'P' (10.6 [[DefineOwnProperty]] step 4)",
+ "test": "assertTrue((function testcase() {\n var arg = (function () {\n return arguments;\n }(1, 2, 3));\n\n Object.defineProperty(arg, \"genericProperty\", {\n get: function () {\n return 1001;\n },\n set: function (value) {\n arg.testGetFunction1 = value;\n },\n enumerable: true,\n configurable: true\n });\n\n function getFun() {\n return \"getFunctionString\";\n }\n function setFun(value) {\n arg.testGetFunction = value;\n }\n Object.defineProperties(arg, {\n \"genericProperty\": {\n get: getFun,\n set: setFun,\n enumerable: false,\n configurable: false\n }\n });\n\n return accessorPropertyAttributesAreCorrect(arg, \"genericProperty\", getFun, setFun, \"testGetFunction\", false, false);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor) && fnExists(Object.defineProperties) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.7-6-a-305",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-305.js",
+ "description": "Object.defineProperties - 'O' is an Arguments object, 'P' is generic own data property of 'O', and 'desc' is data descriptor, test updating multiple attribute values of 'P' (10.6 [[DefineOwnProperty]] step 4)",
+ "test": "assertTrue((function testcase() {\n var arg = (function () {\n return arguments;\n }(1, 2, 3));\n\n Object.defineProperty(arg, \"genericProperty\", {\n value: 1001,\n writable: true,\n enumerable: true,\n configurable: true\n });\n\n Object.defineProperties(arg, {\n \"genericProperty\": {\n value: 1002,\n enumerable: false,\n configurable: false\n }\n });\n\n return dataPropertyAttributesAreCorrect(arg, \"genericProperty\", 1002, true, false, false);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.7-6-a-306",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-306.js",
+ "description": "Object.defineProperties - 'O' is an Arguments object, 'P' is generic own data property of 'O', test TypeError is thrown when updating the [[Value]] attribute value of 'P' which is not writable and not configurable (10.6 [[DefineOwnProperty]] step 4)",
+ "test": "assertTrue((function testcase() {\n var arg = (function () {\n return arguments;\n }(1, 2, 3));\n\n Object.defineProperty(arg, \"genericProperty\", {\n value: 1001,\n writable: false,\n configurable: false\n });\n\n try {\n Object.defineProperties(arg, {\n \"genericProperty\": {\n value: 1002\n }\n });\n\n return false;\n } catch (ex) {\n return ex instanceof TypeError &&\n dataPropertyAttributesAreCorrect(arg, \"genericProperty\", 1001, false, false, false);\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.7-6-a-307",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-307.js",
+ "description": "Object.defineProperties - 'O' is an Arguments object, 'P' is generic own data property of 'O', test TypeError is thrown when updating the [[Writable]] attribute value of 'P' which is not configurable (10.6 [[DefineOwnProperty]] step 4)",
+ "test": "assertTrue((function testcase() {\n var arg = (function () {\n return arguments;\n }(1, 2, 3));\n\n Object.defineProperty(arg, \"genericProperty\", {\n writable: false,\n configurable: false\n });\n\n try {\n Object.defineProperties(arg, {\n \"genericProperty\": {\n writable: true\n }\n });\n\n return false;\n } catch (ex) {\n return ex instanceof TypeError &&\n dataPropertyAttributesAreCorrect(arg, \"genericProperty\", undefined, false, false, false);\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.7-6-a-308",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-308.js",
+ "description": "Object.defineProperties - 'O' is an Arguments object, 'P' is generic own data property of 'O', test TypeError is thrown when updating the [[Enumerable]] attribute value of 'P' which is not configurable (10.6 [[DefineOwnProperty]] step 4)",
+ "test": "assertTrue((function testcase() {\n var arg = (function () {\n return arguments;\n }(1, 2, 3));\n\n Object.defineProperty(arg, \"genericProperty\", {\n enumerable: true,\n configurable: false\n });\n\n try {\n Object.defineProperties(arg, {\n \"genericProperty\": {\n enumerable: false\n }\n });\n\n return false;\n } catch (ex) {\n return ex instanceof TypeError &&\n dataPropertyAttributesAreCorrect(arg, \"genericProperty\", undefined, false, true, false);\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.7-6-a-309",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-309.js",
+ "description": "Object.defineProperties - 'O' is an Arguments object, 'P' is generic own data property of 'O', test TypeError is thrown when updating the [[Configurable]] attribute value of 'P' which is not configurable (10.6 [[DefineOwnProperty]] step 4)",
+ "test": "assertTrue((function testcase() {\n var arg = (function () {\n return arguments;\n }(1, 2, 3));\n\n Object.defineProperty(arg, \"genericProperty\", {\n configurable: false\n });\n\n try {\n Object.defineProperties(arg, {\n \"genericProperty\": {\n configurable: true\n }\n });\n\n return false;\n } catch (ex) {\n return ex instanceof TypeError &&\n dataPropertyAttributesAreCorrect(arg, \"genericProperty\", undefined, false, false, false);\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.7-6-a-31",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-31.js",
+ "description": "Object.defineProperties - 'desc' is data descriptor, test setting all attribute values of 'P' (8.12.9 step 4.a.i)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n Object.defineProperties(obj, {\n prop: {\n value: 1002,\n writable: false,\n enumerable: false,\n configurable: false\n }\n });\n return dataPropertyAttributesAreCorrect(obj, \"prop\", 1002, false, false, false);\n\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-6-a-310",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-310.js",
+ "description": "Object.defineProperties - 'O' is an Arguments object, 'P' is generic own accessor property of 'O', test TypeError is thrown when updating the [[Get]] attribute value of 'P' which is not configurable (10.6 [[DefineOwnProperty]] step 4)",
+ "test": "assertTrue((function testcase() {\n var arg = (function () {\n return arguments;\n } (1, 2, 3));\n\n function getFun() {\n return \"genericPropertyString\";\n }\n function setFun(value) {\n arg.verifySetFun = value;\n }\n Object.defineProperty(arg, \"genericProperty\", {\n get: getFun,\n set: setFun,\n configurable: false\n });\n\n try {\n Object.defineProperties(arg, {\n \"genericProperty\": {\n get: function () {\n return \"overideGenericPropertyString\";\n }\n }\n });\n\n return false;\n } catch (ex) {\n return ex instanceof TypeError &&\n accessorPropertyAttributesAreCorrect(arg, \"genericProperty\", getFun, setFun, \"verifySetFun\", false, false, false);\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor) && fnExists(Object.defineProperties) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.7-6-a-311",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-311.js",
+ "description": "Object.defineProperties - 'O' is an Arguments object, 'P' is generic own accessor property of 'O', test TypeError is thrown when updating the [[Set]] attribute value of 'P' which is not configurable (10.6 [[DefineOwnProperty]] step 4)",
+ "test": "assertTrue((function testcase() {\n var arg = (function () {\n return arguments;\n }(1, 2, 3));\n\n function setFun(value) {\n arg.genericPropertyString = value;\n }\n Object.defineProperty(arg, \"genericProperty\", {\n set: setFun,\n configurable: false\n });\n\n try {\n Object.defineProperties(arg, {\n \"genericProperty\": {\n set: function (value) {\n arg.genericPropertyString1 = value;\n }\n }\n });\n\n return false;\n } catch (ex) {\n return ex instanceof TypeError &&\n accessorPropertyAttributesAreCorrect(arg, \"genericProperty\", undefined, setFun, \"genericPropertyString\", false, false, false);\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor) && fnExists(Object.defineProperties) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.7-6-a-312",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-312.js",
+ "description": "Object.defineProperties - 'O' is an Arguments object, 'P' is generic own accessor property of 'O', test TypeError is thrown when updating the [[Enumerable]] attribute value of 'P' which is not configurable (10.6 [[DefineOwnProperty]] step 4)",
+ "test": "assertTrue((function testcase() {\n var arg = (function () {\n return arguments;\n }(1, 2, 3));\n\n function setFun(value) {\n arg.genericPropertyString = value;\n }\n Object.defineProperty(arg, \"genericProperty\", {\n set: setFun,\n enumerable: true,\n configurable: false\n });\n\n try {\n Object.defineProperties(arg, {\n \"genericProperty\": {\n enumerable: false\n }\n });\n\n return false;\n } catch (ex) {\n return ex instanceof TypeError &&\n accessorPropertyAttributesAreCorrect(arg, \"genericProperty\", undefined, setFun, \"genericPropertyString\", true, false);\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor) && fnExists(Object.defineProperties) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.7-6-a-313",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-313.js",
+ "description": "Object.defineProperties - 'O' is an Arguments object, 'P' is generic own accessor property of 'O', test TypeError is thrown when updating the [[Configurable]] attribute value of 'P' which is not configurable (10.6 [[DefineOwnProperty]] step 4)",
+ "test": "assertTrue((function testcase() {\n var arg = (function () {\n return arguments;\n }(1, 2, 3));\n\n function setFun(value) {\n arg.genericPropertyString = value;\n }\n Object.defineProperty(arg, \"genericProperty\", {\n set: setFun,\n configurable: false\n });\n\n try {\n Object.defineProperties(arg, {\n \"genericProperty\": {\n configurable: true\n }\n });\n\n return false;\n } catch (ex) {\n return ex instanceof TypeError &&\n accessorPropertyAttributesAreCorrect(arg, \"genericProperty\", undefined, setFun, \"genericPropertyString\", false, false, false);\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor) && fnExists(Object.defineProperties) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.7-6-a-314",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-314.js",
+ "description": "Object.defineProperties - 'O' is an Arguments object, 'name' is own property of [[ParameterMap]] of 'O', test 'name' is deleted if 'name' is configurable and 'desc' is accessor descriptor (10.6 [[DefineOwnProperty]] step 5.a.i)",
+ "test": "assertTrue((function testcase() {\n var arg = (function () {\n return arguments;\n }(1, 2, 3));\n var accessed = false;\n\n Object.defineProperties(arg, {\n \"0\": {\n get: function () {\n accessed = true;\n return 12;\n }\n }\n });\n\n return arg[0] === 12 && accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-6-a-32",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-32.js",
+ "description": "Object.defineProperties - 'desc' is generic descriptor without any attribute, test 'P' is defined in 'obj' with all default attribute values (8.12.9 step 4.a.i)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n Object.defineProperties(obj, { prop: {} });\n\n var desc = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n return desc.hasOwnProperty(\"value\") && typeof desc.value === \"undefined\" &&\n desc.hasOwnProperty(\"writable\") && desc.writable === false &&\n desc.hasOwnProperty(\"configurable\") && desc.configurable === false &&\n desc.hasOwnProperty(\"enumerable\") && desc.enumerable === false &&\n !desc.hasOwnProperty(\"get\") && !desc.hasOwnProperty(\"set\");\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.7-6-a-33",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-33.js",
+ "description": "Object.defineProperties - 'P' doesn't exist in 'O', test [[Get]] of 'P' is set as undefined value if absent in accessor descriptor 'desc' (8.12.9 step 4.b)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n var setFun = function (value) {\n obj.setVerifyHelpProp = value;\n };\n\n Object.defineProperties(obj, {\n prop: {\n set: setFun,\n enumerable: true,\n configurable: true\n }\n });\n return accessorPropertyAttributesAreCorrect(obj, \"prop\", undefined, setFun, \"setVerifyHelpProp\", true, true);\n\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.7-6-a-34",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-34.js",
+ "description": "Object.defineProperties - 'P' doesn't exist in 'O', test [[Set]] of 'P' is set as undefined value if absent in accessor descriptor 'desc' (8.12.9 step 4.b.i)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n var getFunc = function () {\n return 10; \n };\n\n Object.defineProperties(obj, {\n prop: {\n get: getFunc,\n enumerable: true,\n configurable: true\n }\n });\n\n var desc = Object.getOwnPropertyDescriptor(obj, \"prop\");\n return obj.hasOwnProperty(\"prop\") && typeof (desc.set) === \"undefined\";\n\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.7-6-a-35",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-35.js",
+ "description": "Object.defineProperties - 'P' doesn't exist in 'O', test [[Enumerable]] of 'P' is set as false value if absent in accessor descriptor 'desc' (8.12.9 step 4.b.i)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n var getFun = function () {\n return 10;\n };\n var setFun = function (value) {\n obj.setVerifyHelpProp = value;\n };\n\n Object.defineProperties(obj, {\n prop: {\n set: setFun,\n get: getFun,\n configurable: true\n }\n });\n return accessorPropertyAttributesAreCorrect(obj, \"prop\", getFun, setFun, \"setVerifyHelpProp\", false, true);\n\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor) && fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-6-a-36",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-36.js",
+ "description": "Object.defineProperties - 'P' doesn't exist in 'O', test [[Configurable]] of 'P' is set as false value if absent in accessor descriptor 'desc' (8.12.9 step 4.b.i)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n var getFun = function () {\n return 10;\n };\n var setFun = function (value) {\n obj.setVerifyHelpProp = value;\n };\n\n Object.defineProperties(obj, {\n prop: {\n set: setFun,\n get: getFun,\n enumerable: true\n }\n });\n return accessorPropertyAttributesAreCorrect(obj, \"prop\", getFun, setFun, \"setVerifyHelpProp\", true, false);\n\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor) && fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-6-a-37",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-37.js",
+ "description": "Object.defineProperties - 'desc' is accessor descriptor, test setting all attribute values of 'P' (8.12.9 step 4.b.i)",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n var getFun = function () {\n return 10;\n };\n var setFun = function (value) {\n obj.setVerifyHelpProp = value;\n };\n\n Object.defineProperties(obj, {\n prop: {\n get: getFun,\n set: setFun,\n enumerable: false,\n configurable: false\n }\n });\n return accessorPropertyAttributesAreCorrect(obj, \"prop\", getFun, setFun, \"setVerifyHelpProp\", false, false);\n\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor) && fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-6-a-38-1",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-38-1.js",
+ "description": "Object.defineProperties - 'P' exists in 'O' is an accessor property, test 'P' makes no change if 'desc' is generic descriptor without any attribute (8.12.9 step 5)",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n var getFunc = function () {\n return 12;\n };\n Object.defineProperties(obj, {\n foo: {\n get: getFunc,\n enumerable: true,\n configurable: true\n }\n });\n\n Object.defineProperties(obj, { foo: {} });\n\n return accessorPropertyAttributesAreCorrect(obj, \"foo\", getFunc, undefined, undefined, true, true);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor) && fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-6-a-38",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-38.js",
+ "description": "Object.defineProperties - 'P' exists in 'O', test 'P' makes no change if 'desc' is generic descriptor without any attribute (8.12.9 step 5)",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n obj.foo = 100; // default value of attributes: writable: true, configurable: true, enumerable: true\n\n Object.defineProperties(obj, { foo: {} });\n return dataPropertyAttributesAreCorrect(obj, \"foo\", 100, true, true, true);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-6-a-39",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-39.js",
+ "description": "Object.defineProperties - 'P' is data descriptor and every fields in 'desc' is the same with 'P' (8.12.9 step 6)",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n\n obj.foo = 101; // default value of attributes: writable: true, configurable: true, enumerable: true\n\n Object.defineProperties(obj, {\n foo: {\n value: 101,\n enumerable: true,\n writable: true,\n configurable: true\n }\n });\n return dataPropertyAttributesAreCorrect(obj, \"foo\", 101, true, true, true);\n\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-6-a-4",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-4.js",
+ "description": "Object.defineProperties - 'P' is own data property that overrides an inherited accessor property (8.12.9 step 1 ) ",
+ "test": "assertTrue((function testcase() {\n var proto = {};\n Object.defineProperty(proto, \"prop\", {\n get: function () {\n return 11;\n },\n configurable: true\n });\n var Con = function () { };\n Con.prototype = proto;\n\n var obj = new Con();\n Object.defineProperty(obj, \"prop\", {\n value: 12,\n configurable: false\n });\n\n try {\n Object.defineProperties(obj, {\n prop: {\n value: 13,\n configurable: true\n }\n });\n return false;\n } catch (e) {\n return (e instanceof TypeError);\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.7-6-a-40",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-40.js",
+ "description": "Object.defineProperties - 'P' is accessor descriptor and every fields in 'desc' is the same with 'P' (8.12.9 step 6)",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n\n function get_func() {\n return 0;\n }\n function set_func(value) {\n obj.setVerifyHelpProp = value;\n }\n var desc = {\n get: get_func,\n set: set_func,\n enumerable: true,\n configurable: true\n };\n\n Object.defineProperty(obj, \"foo\", desc);\n\n Object.defineProperties(obj, {\n foo: {\n get: get_func,\n set: set_func,\n enumerable: true,\n configurable: true\n }\n });\n return accessorPropertyAttributesAreCorrect(obj, \"foo\", get_func, set_func, \"setVerifyHelpProp\", true, true);\n\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor) && fnExists(Object.defineProperties) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.7-6-a-41",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-41.js",
+ "description": "Object.defineProperties - type of desc.value is different from type of P.value (8.12.9 step 6)",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n\n obj.foo = 101; // default value of attributes: writable: true, configurable: true, enumerable: true\n\n Object.defineProperties(obj, {\n foo: {\n value: \"102\"\n }\n });\n return dataPropertyAttributesAreCorrect(obj, \"foo\", \"102\", true, true, true);\n\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-6-a-42",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-42.js",
+ "description": "Object.defineProperties - both desc.value and P.value are undefined (8.12.9 step 6)",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n\n var desc = { value: undefined };\n Object.defineProperty(obj, \"foo\", desc);\n\n Object.defineProperties(obj, {\n foo: {\n value: undefined\n }\n });\n return dataPropertyAttributesAreCorrect(obj, \"foo\", undefined, false, false, false);\n\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.7-6-a-43",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-43.js",
+ "description": "Object.defineProperties - both desc.value and P.value are null (8.12.9 step 6)",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n\n var desc = { value: null };\n Object.defineProperty(obj, \"foo\", desc);\n\n Object.defineProperties(obj, {\n foo: {\n value: null\n }\n });\n return dataPropertyAttributesAreCorrect(obj, \"foo\", null, false, false, false);\n\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.7-6-a-44",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-44.js",
+ "description": "Object.defineProperties - both desc.value and P.value are NaN (8.12.9 step 6)",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n\n var desc = { value: NaN };\n Object.defineProperty(obj, \"foo\", desc);\n\n Object.defineProperties(obj, {\n foo: {\n value: NaN\n }\n });\n\n var verifyEnumerable = false;\n for (var p in obj) {\n if (p === \"foo\") {\n verifyEnumerable = true;\n }\n }\n\n var verifyValue = false;\n obj.prop = \"overrideData\";\n verifyValue = obj.foo !== obj.foo && isNaN(obj.foo);\n\n var verifyConfigurable = false;\n delete obj.foo;\n verifyConfigurable = obj.hasOwnProperty(\"foo\");\n\n return verifyConfigurable && !verifyEnumerable && verifyValue;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.7-6-a-45",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-45.js",
+ "description": "Object.defineProperties - desc.value is +0 and P.value is -0 (8.12.9 step 6)",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n\n var desc = { value: -0 };\n Object.defineProperty(obj, \"foo\", desc);\n\n try {\n Object.defineProperties(obj, {\n foo: {\n value: +0\n }\n });\n return false;\n } catch (e) {\n return (e instanceof TypeError) && dataPropertyAttributesAreCorrect(obj, \"foo\", -0, false, false, false);\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.7-6-a-46",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-46.js",
+ "description": "Object.defineProperties - desc.value is -0 and P.value is +0 (8.12.9 step 6)",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n\n var desc = { value: +0 };\n Object.defineProperty(obj, \"foo\", desc);\n\n try {\n Object.defineProperties(obj, {\n foo: {\n value: -0\n }\n });\n return false;\n } catch (e) {\n return (e instanceof TypeError) && dataPropertyAttributesAreCorrect(obj, \"foo\", +0, false, false, false); \n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.7-6-a-47",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-47.js",
+ "description": "Object.defineProperties - desc.value and P.value are two numbers with the same value (8.12.9 step 6)",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n\n var desc = { value: 101 };\n Object.defineProperty(obj, \"foo\", desc);\n\n Object.defineProperties(obj, {\n foo: {\n value: 101\n }\n });\n return dataPropertyAttributesAreCorrect(obj, \"foo\", 101, false, false, false);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.7-6-a-48",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-48.js",
+ "description": "Object.defineProperties - desc.value and P.value are two numbers with different values (8.12.9 step 6)",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n\n obj.foo = 101; // default value of attributes: writable: true, configurable: true, enumerable: true\n\n Object.defineProperties(obj, {\n foo: {\n value: 102\n }\n });\n return dataPropertyAttributesAreCorrect(obj, \"foo\", 102, true, true, true);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-6-a-49",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-49.js",
+ "description": "Object.defineProperties - both desc.value and P.value are two strings which have same length and same characters in corresponding positions (8.12.9 step 6)",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n\n var desc = { value: \"abcd\" };\n Object.defineProperty(obj, \"foo\", desc);\n\n Object.defineProperties(obj, {\n foo: {\n value: \"abcd\"\n }\n });\n return dataPropertyAttributesAreCorrect(obj, \"foo\", \"abcd\", false, false, false);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.7-6-a-5",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-5.js",
+ "description": "Object.defineProperties - 'P' is own accessor property (8.12.9 step 1 ) ",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n function getFunc() {\n return 11;\n }\n\n Object.defineProperty(obj, \"prop\", {\n get: getFunc,\n configurable: false\n });\n\n try {\n Object.defineProperties(obj, {\n prop: {\n value: 12,\n configurable: true\n }\n });\n return false;\n } catch (e) {\n return e instanceof TypeError && accessorPropertyAttributesAreCorrect(obj, \"prop\", getFunc, undefined, undefined, false, false);\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor) && fnExists(Object.defineProperties) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.7-6-a-50",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-50.js",
+ "description": "Object.defineProperties - desc.value and P.value are two strings with different values (8.12.9 step 6)",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n\n obj.foo = \"abcd\"; // default value of attributes: writable: true, configurable: true, enumerable: true\n\n Object.defineProperties(obj, {\n foo: {\n value: \"fghj\"\n }\n });\n return dataPropertyAttributesAreCorrect(obj, \"foo\", \"fghj\", true, true, true);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-6-a-51",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-51.js",
+ "description": "Object.defineProperties - both desc.value and P.value are boolean values with the same value (8.12.9 step 6)",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n\n var desc = { value: true };\n Object.defineProperty(obj, \"foo\", desc);\n\n Object.defineProperties(obj, {\n foo: {\n value: true\n }\n });\n return dataPropertyAttributesAreCorrect(obj, \"foo\", true, false, false, false);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.7-6-a-52",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-52.js",
+ "description": "Object.defineProperties - desc.value and P.value are two boolean values with different values (8.12.9 step 6)",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n\n obj.foo = true; // default value of attributes: writable: true, configurable: true, enumerable: true\n\n Object.defineProperties(obj, {\n foo: {\n value: false\n }\n });\n return dataPropertyAttributesAreCorrect(obj, \"foo\", false, true, true, true);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-6-a-53",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-53.js",
+ "description": "Object.defineProperties - both desc.value and P.value are Ojbects which refer to the same Object (8.12.9 step 6)",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n\n var obj1 = { length: 10 };\n var desc = { value: obj1 };\n Object.defineProperty(obj, \"foo\", desc);\n\n Object.defineProperties(obj, {\n foo: {\n value: obj1\n }\n });\n return dataPropertyAttributesAreCorrect(obj, \"foo\", obj1, false, false, false);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.7-6-a-54",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-54.js",
+ "description": "Object.defineProperties - desc.value and P.value are two Ojbects which refer to the different objects (8.12.9 step 6)",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n\n var obj1 = { length: 10 };\n obj.foo = obj1; // default value of attributes: writable: true, configurable: true, enumerable: true\n\n var obj2 = { length: 20 };\n\n Object.defineProperties(obj, {\n foo: {\n value: obj2\n }\n });\n return dataPropertyAttributesAreCorrect(obj, \"foo\", obj2, true, true, true);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-6-a-55",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-55.js",
+ "description": "Object.defineProperties - both desc.writable and P.writable are boolean values with the same value (8.12.9 step 6)",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n\n var desc = { writable: false };\n Object.defineProperty(obj, \"foo\", desc);\n\n Object.defineProperties(obj, {\n foo: {\n writable: false\n }\n });\n return dataPropertyAttributesAreCorrect(obj, \"foo\", undefined, false, false, false);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.7-6-a-56",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-56.js",
+ "description": "Object.defineProperties - desc.writable and P.writable are two boolean values with different values (8.12.9 step 6)",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n\n var desc = { writable: false, configurable: true };\n Object.defineProperty(obj, \"foo\", desc);\n\n Object.defineProperties(obj, {\n foo: {\n writable: true,\n configurable: true\n }\n });\n return dataPropertyAttributesAreCorrect(obj, \"foo\", undefined, true, false, true);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.7-6-a-57",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-57.js",
+ "description": "Object.defineProperties - both desc.[[Get]] and P.[[Get]] are two objects which refer to the same object (8.12.9 step 6)",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n\n function get_Func() {\n return 10;\n }\n\n Object.defineProperty(obj, \"foo\", {\n get: get_Func\n });\n\n Object.defineProperties(obj, {\n foo: {\n get: get_Func\n }\n });\n\n var verifyEnumerable = false;\n for (var p in obj) {\n if (p === \"foo\") {\n verifyEnumerable = true;\n }\n }\n\n var verifyValue = false;\n verifyValue = (obj.foo === 10);\n\n var verifyConfigurable = false;\n delete obj.foo;\n verifyConfigurable = obj.hasOwnProperty(\"foo\");\n\n var desc = Object.getOwnPropertyDescriptor(obj, \"foo\");\n return verifyConfigurable && !verifyEnumerable && verifyValue && typeof (desc.set) === \"undefined\" && desc.get === get_Func;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties) && fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.7-6-a-58",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-58.js",
+ "description": "Object.defineProperties - desc.[[Get]] and P.[[Get]] are two objects which refer to the different objects (8.12.9 step 6)",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n\n function get_Func1() {\n return 10;\n }\n\n Object.defineProperty(obj, \"foo\", {\n get: get_Func1,\n configurable: true\n });\n\n function get_Func2() {\n return 20;\n }\n\n Object.defineProperties(obj, {\n foo: {\n get: get_Func2\n }\n });\n\n var verifyEnumerable = false;\n for (var p in obj) {\n if (p === \"foo\") {\n verifyEnumerable = true;\n }\n }\n\n var verifyValue = false;\n verifyValue = (obj.foo === 20);\n\n var desc = Object.getOwnPropertyDescriptor(obj, \"foo\");\n\n var verifyConfigurable = false;\n delete obj.foo;\n verifyConfigurable = obj.hasOwnProperty(\"foo\");\n\n return !verifyConfigurable && !verifyEnumerable && verifyValue && typeof (desc.set) === \"undefined\" && desc.get === get_Func2;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties) && fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.7-6-a-59",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-59.js",
+ "description": "Object.defineProperties - both desc.[[Set]] and P.[[Set]] are two objects which refer to the same object (8.12.9 step 6)",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n\n function set_func(value) {\n obj.setVerifyHelpProp = value;\n }\n\n Object.defineProperty(obj, \"foo\", {\n set: set_func\n });\n\n Object.defineProperties(obj, {\n foo: {\n set: set_func\n }\n });\n return accessorPropertyAttributesAreCorrect(obj, \"foo\", undefined, set_func, \"setVerifyHelpProp\", false, false);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor) && fnExists(Object.defineProperties) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.7-6-a-6",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-6.js",
+ "description": "Object.defineProperties - 'P' is inherited accessor property (8.12.9 step 1 ) ",
+ "test": "assertTrue((function testcase() {\n var proto = {};\n Object.defineProperty(proto, \"prop\", {\n get: function () {\n return 11;\n },\n configurable: false\n });\n var Con = function () { };\n Con.prototype = proto;\n\n var obj = new Con();\n\n Object.defineProperties(obj, {\n prop: {\n get: function () {\n return 12;\n },\n configurable: true\n }\n });\n return obj.hasOwnProperty(\"prop\") && obj.prop === 12;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.7-6-a-60",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-60.js",
+ "description": "Object.defineProperties - desc.[[Set]] and P.[[Set]] are two objects which refer to the different objects (8.12.9 step 6)",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n\n function set_func1() {}\n\n Object.defineProperty(obj, \"foo\", {\n set: set_func1,\n configurable: true\n });\n\n function set_func2(value) {\n obj.setVerifyHelpProp = value;\n }\n\n Object.defineProperties(obj, {\n foo: {\n set: set_func2\n }\n });\n return accessorPropertyAttributesAreCorrect(obj, \"foo\", undefined, set_func2, \"setVerifyHelpProp\", false, true);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor) && fnExists(Object.defineProperties) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.7-6-a-61",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-61.js",
+ "description": "Object.defineProperties - both desc.enumerable and P.enumerable are boolean values with the same value (8.12.9 step 6)",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n\n Object.defineProperty(obj, \"foo\", { \n value: 10, \n enumerable: false \n });\n\n Object.defineProperties(obj, {\n foo: {\n enumerable: false\n }\n });\n return dataPropertyAttributesAreCorrect(obj, \"foo\", 10, false, false, false);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.7-6-a-62",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-62.js",
+ "description": "Object.defineProperties - desc.enumerable and P.enumerable are two boolean values with different values (8.12.9 step 6)",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n\n Object.defineProperty(obj, \"foo\", { \n value: 10, \n enumerable: false, \n configurable: true \n });\n\n Object.defineProperties(obj, {\n foo: {\n enumerable: true\n }\n });\n return dataPropertyAttributesAreCorrect(obj, \"foo\", 10, false, true, true);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.7-6-a-63",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-63.js",
+ "description": "Object.defineProperties - both desc.configurable and P.configurable are boolean values with the same value (8.12.9 step 6)",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n\n Object.defineProperty(obj, \"foo\", { \n value: 10, \n configurable: false \n });\n\n Object.defineProperties(obj, {\n foo: {\n configurable: false\n }\n });\n return dataPropertyAttributesAreCorrect(obj, \"foo\", 10, false, false, false);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.7-6-a-64",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-64.js",
+ "description": "Object.defineProperties - desc.configurable and P.configurable are two boolean values with different values (8.12.9 step 6)",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n\n Object.defineProperty(obj, \"foo\", {\n value: 10,\n configurable: true \n });\n\n Object.defineProperties(obj, {\n foo: {\n configurable: false\n }\n });\n return dataPropertyAttributesAreCorrect(obj, \"foo\", 10, false, false, false);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.7-6-a-65",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-65.js",
+ "description": "Object.defineProperties throws TypeError when P.configurable is false and desc.configurable is true (8.12.9 step 7.a)",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n\n Object.defineProperty(obj, \"foo\", {\n value: 10,\n configurable: false \n });\n\n try {\n Object.defineProperties(obj, {\n foo: {\n configurable: true\n }\n });\n return false;\n } catch (e) {\n return (e instanceof TypeError) && dataPropertyAttributesAreCorrect(obj, \"foo\", 10, false, false, false);\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.7-6-a-66-1",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-66-1.js",
+ "description": "Object.defineProperties throws TypeError when P.configurable is false, P.enumerable and desc.enumerable has different values (8.12.9 step 7.b)",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n\n Object.defineProperty(obj, \"foo\", {\n value: 10, \n enumerable: false, \n configurable: false \n });\n\n try {\n Object.defineProperties(obj, {\n foo: {\n enumerable: true\n }\n });\n return false;\n } catch (e) {\n return (e instanceof TypeError) && dataPropertyAttributesAreCorrect(obj, \"foo\", 10, false, false, false);\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.7-6-a-66",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-66.js",
+ "description": "Object.defineProperties throws TypeError when P.configurable is false, P.enumerable and desc.enumerable has different values (8.12.9 step 7.b)",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n\n Object.defineProperty(obj, \"foo\", { \n value: 10, \n enumerable: true, \n configurable: false \n });\n\n try {\n Object.defineProperties(obj, {\n foo: {\n enumerable: false\n }\n });\n return false;\n } catch (e) {\n return (e instanceof TypeError) && dataPropertyAttributesAreCorrect(obj, \"foo\", 10, false, true, false);\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.7-6-a-67",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-67.js",
+ "description": "Object.defineProperties throws TypeError when P is accessor property and P.configurable is false, desc is data property (8.12.9 step 9.a)",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n\n function get_Func() {\n return 10;\n }\n\n Object.defineProperty(obj, \"foo\", {\n get: get_Func,\n configurable: false\n });\n\n try {\n Object.defineProperties(obj, {\n foo: {\n value: 11\n }\n });\n return false;\n } catch (e) {\n var verifyEnumerable = false;\n for (var p in obj) {\n if (p === \"foo\") {\n verifyEnumerable = true;\n }\n }\n\n var verifyValue = false;\n verifyValue = (obj.foo === 10);\n\n var desc = Object.getOwnPropertyDescriptor(obj, \"foo\");\n\n var verifyConfigurable = false;\n delete obj.foo;\n verifyConfigurable = obj.hasOwnProperty(\"foo\");\n\n return e instanceof TypeError && verifyConfigurable && !verifyEnumerable &&\n verifyValue && typeof (desc.set) === \"undefined\" && desc.get === get_Func;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties) && fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.7-6-a-68",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-68.js",
+ "description": "Object.defineProperties throws TypeError when P is data property and P.configurable is false, desc is accessor property (8.12.9 step 9.a)",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n\n Object.defineProperty(obj, \"foo\", {\n value: 10,\n configurable: false\n });\n\n function get_func() {\n return 11;\n }\n\n try {\n Object.defineProperties(obj, {\n foo: {\n get: get_func\n }\n });\n return false;\n } catch (e) {\n return (e instanceof TypeError) && dataPropertyAttributesAreCorrect(obj, \"foo\", 10, false, false, false);\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.7-6-a-69",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-69.js",
+ "description": "Object.defineProperties - 'P' is data property and P.configurable is true, desc is accessor property (8.12.9 step 9.b.i)",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n\n Object.defineProperty(obj, \"foo\", {\n value: 10,\n configurable: true\n });\n\n function get_Func() {\n return 20;\n }\n\n Object.defineProperties(obj, {\n foo: {\n get: get_Func\n }\n });\n\n var verifyEnumerable = false;\n for (var p in obj) {\n if (p === \"foo\") {\n verifyEnumerable = true;\n }\n }\n\n var verifyValue = false;\n verifyValue = (obj.foo === 20);\n\n var desc = Object.getOwnPropertyDescriptor(obj, \"foo\");\n\n var verifyConfigurable = true;\n delete obj.foo;\n verifyConfigurable = obj.hasOwnProperty(\"foo\");\n\n return !verifyConfigurable && !verifyEnumerable && verifyValue &&\n typeof desc.set === \"undefined\" && desc.get === get_Func;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties) && fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.7-6-a-7",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-7.js",
+ "description": "Object.defineProperties - 'P' is own accessor property that overrides an inherited data property (8.12.9 step 1 ) ",
+ "test": "assertTrue((function testcase() {\n var proto = {};\n Object.defineProperty(proto, \"prop\", {\n value: 11,\n configurable: true\n });\n var Con = function () { };\n Con.prototype = proto;\n\n var obj = new Con();\n Object.defineProperty(obj, \"prop\", {\n get: function () {\n return 12;\n },\n configurable: false\n });\n\n try {\n Object.defineProperties(obj, {\n prop: {\n value: 13,\n configurable: true\n }\n });\n return false;\n } catch (e) {\n return (e instanceof TypeError) && obj.prop === 12;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.7-6-a-70",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-70.js",
+ "description": "Object.defineProperties - 'P' is accessor property and P.configurable is true, 'desc' in 'Properties' is data property (8.12.9 step 9.c.i)",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n\n function get_func() {\n return 10;\n }\n\n Object.defineProperty(obj, \"foo\", {\n get: get_func,\n configurable: true\n });\n\n Object.defineProperties(obj, {\n foo: {\n value: 12\n }\n });\n return dataPropertyAttributesAreCorrect(obj, \"foo\", 12, false, false, true);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.7-6-a-71",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-71.js",
+ "description": "Object.defineProperties throws TypeError when 'P' is data property and P.configurable is false, P.writable is false, desc is data property and desc.writable is true (8.12.9 step 10.a.i)",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n\n Object.defineProperty(obj, \"foo\", { \n value: 10, \n writable: false, \n configurable: false \n });\n\n try {\n Object.defineProperties(obj, {\n foo: {\n writable: true\n }\n });\n return false;\n } catch (e) {\n return (e instanceof TypeError) && dataPropertyAttributesAreCorrect(obj, \"foo\", 10, false, false, false);\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.7-6-a-72",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-72.js",
+ "description": "Object.defineProperties throws TypeError when P is data property and P.configurable is false, P.writable is false, desc is data property and desc.value is not equal to P.value (8.12.9 step 10.a.ii.1)",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n\n Object.defineProperty(obj, \"foo\", { \n value: 10, \n writable: false, \n configurable: false \n });\n\n try {\n Object.defineProperties(obj, {\n foo: {\n value: 20\n }\n });\n return false;\n } catch (e) {\n return (e instanceof TypeError) && dataPropertyAttributesAreCorrect(obj, \"foo\", 10, false, false, false);\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.7-6-a-73",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-73.js",
+ "description": "Object.defineProperties will not throw TypeError if P.configurable is false, P.writalbe is false, P.value is undefined and properties.value is undefined (8.12.9 step 10.a.ii.1)",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n\n Object.defineProperty(obj, \"foo\", { \n value: undefined, \n writable: false, \n configurable: false \n });\n\n Object.defineProperties(obj, {\n foo: {\n value: undefined\n }\n });\n return dataPropertyAttributesAreCorrect(obj, \"foo\", undefined, false, false, false);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.7-6-a-74",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-74.js",
+ "description": "Object.defineProperties will not throw TypeError if P.configurable is false, P.writalbe is false, P.value is null and properties.value is null (8.12.9 step 10.a.ii.1)",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n\n Object.defineProperty(obj, \"foo\", { \n value: null, \n writable: false, \n configurable: false \n });\n\n Object.defineProperties(obj, {\n foo: {\n value: null\n }\n });\n return dataPropertyAttributesAreCorrect(obj, \"foo\", null, false, false, false);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.7-6-a-75",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-75.js",
+ "description": "Object.defineProperties will not throw TypeError if P.configurable is false, P.writalbe is false, P.value is NaN and properties.value is NaN (8.12.9 step 10.a.ii.1)",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n var accessed = false;\n\n Object.defineProperty(obj, \"foo\", {\n value: NaN,\n writable: false,\n configurable: false\n });\n\n Object.defineProperties(obj, {\n foo: {\n value: NaN\n }\n });\n\n var verifyEnumerable = false;\n for (var p in obj) {\n if (p === \"foo\") {\n verifyEnumerable = true;\n }\n }\n\n obj.prop = \"overrideData\";\n var verifyValue = false;\n verifyValue = obj.foo !== obj.foo && isNaN(obj.foo);\n\n var desc = Object.getOwnPropertyDescriptor(obj, \"foo\");\n\n var verifyConfigurable = false;\n delete obj.foo;\n verifyConfigurable = obj.hasOwnProperty(\"foo\");\n\n return verifyValue && !verifyEnumerable && verifyConfigurable;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties) && fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.7-6-a-76",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-76.js",
+ "description": "Object.defineProperties throws TypeError when P.configurable is false, P.writalbe is false, properties.value is +0 and P.value is -0 (8.12.9 step 10.a.ii.1)",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n\n Object.defineProperty(obj, \"foo\", { \n value: -0, \n writable: false, \n configurable: false \n });\n\n try {\n Object.defineProperties(obj, {\n foo: {\n value: +0\n }\n });\n return false;\n } catch (e) {\n return (e instanceof TypeError) && dataPropertyAttributesAreCorrect(obj, \"foo\", -0, false, false, false);\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.7-6-a-77",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-77.js",
+ "description": "Object.defineProperties throws TypeError when P.configurable is false, P.writalbe is false, properties.value is +0 and P.value is -0 (8.12.9 step 10.a.ii.1)",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n\n Object.defineProperty(obj, \"foo\", { \n value: +0, \n writable: false, \n configurable: false \n });\n\n try {\n Object.defineProperties(obj, {\n foo: {\n value: -0\n }\n });\n return false;\n } catch (e) {\n return (e instanceof TypeError) && dataPropertyAttributesAreCorrect(obj, \"foo\", +0, false, false, false);\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.7-6-a-78",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-78.js",
+ "description": "Object.defineProperties will not throw TypeError when P.configurable is false, P.writalbe is false, properties.value and P.value are two numbers with the same value (8.12.9 step 10.a.ii.1)",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n\n Object.defineProperty(obj, \"foo\", {\n value: 100,\n writable: false,\n configurable: false \n });\n\n Object.defineProperties(obj, {\n foo: {\n value: 100\n }\n });\n return dataPropertyAttributesAreCorrect(obj, \"foo\", 100, false, false, false);\n\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.7-6-a-79",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-79.js",
+ "description": "Object.defineProperties throws TypeError when P.configurable is false, P.writalbe is false, properties.value and P.value are two numbers with different values (8.12.9 step 10.a.ii.1)",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n\n Object.defineProperty(obj, \"foo\", { \n value: 10, \n writable: false, \n configurable: false \n });\n\n try {\n Object.defineProperties(obj, {\n foo: {\n value: 20\n }\n });\n return false;\n } catch (e) {\n return (e instanceof TypeError) && dataPropertyAttributesAreCorrect(obj, \"foo\", 10, false, false, false);\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.7-6-a-8",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-8.js",
+ "description": "Object.defineProperties - 'P' is own accessor property that overrides an inherited accessor property (8.12.9 step 1 ) ",
+ "test": "assertTrue((function testcase() {\n var proto = {};\n Object.defineProperty(proto, \"prop\", {\n get: function() {\n return 11;\n },\n configurable: true\n });\n var Con = function () { };\n Con.prototype = proto;\n\n var obj = new Con();\n Object.defineProperty(obj, \"prop\", {\n get: function () {\n return 12;\n },\n configurable: false\n });\n\n try {\n Object.defineProperties(obj, {\n prop: {\n value: 13,\n configurable: true\n }\n });\n return false;\n } catch (e) {\n return (e instanceof TypeError) && obj.prop === 12;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.7-6-a-80",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-80.js",
+ "description": "Object.defineProperties will not throw TypeError when P.configurable is false, P.writalbe is false, properties.value and P.value are two strings with the same value (8.12.9 step 10.a.ii.1)",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n\n Object.defineProperty(obj, \"foo\", {\n value: \"abcd\",\n writable: false,\n configurable: false \n });\n\n Object.defineProperties(obj, {\n foo: {\n value: \"abcd\"\n }\n });\n return dataPropertyAttributesAreCorrect(obj, \"foo\", \"abcd\", false, false, false);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.7-6-a-81",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-81.js",
+ "description": "Object.defineProperties throws TypeError when P.configurable is false, P.writalbe is false, properties.value and P.value are two strings with different values (8.12.9 step 10.a.ii.1)",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n\n Object.defineProperty(obj, \"foo\", { \n value: \"abcd\", \n writable: false, \n configurable: false \n });\n\n try {\n Object.defineProperties(obj, {\n foo: {\n value: \"defg\"\n }\n });\n return false;\n } catch (e) {\n return (e instanceof TypeError) && dataPropertyAttributesAreCorrect(obj, \"foo\", \"abcd\", false, false, false);\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.7-6-a-82",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-82.js",
+ "description": "Object.defineProperties will not throw TypeError when P.configurable is false, P.writalbe is false, properties.value and P.value are two booleans with the same value (8.12.9 step 10.a.ii.1)",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n\n Object.defineProperty(obj, \"foo\", {\n value: false,\n writable: false,\n configurable: false \n });\n\n Object.defineProperties(obj, {\n foo: {\n value: false\n }\n });\n return dataPropertyAttributesAreCorrect(obj, \"foo\", false, false, false, false);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.7-6-a-83",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-83.js",
+ "description": "Object.defineProperties throws TypeError when P.configurable is false, P.writalbe is false, properties.value and P.value are two booleans with different values (8.12.9 step 10.a.ii.1)",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n\n Object.defineProperty(obj, \"foo\", {\n value: false,\n writable: false,\n configurable: false \n });\n\n try {\n Object.defineProperties(obj, {\n foo: {\n value: true\n }\n });\n return false;\n } catch (e) {\n return (e instanceof TypeError) && dataPropertyAttributesAreCorrect(obj, \"foo\", false, false, false, false);\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.7-6-a-84-1",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-84-1.js",
+ "description": "Object.defineProperties will not throw TypeError when P.configurable is false, P.writalbe is false, properties.value and P.value are two Objects refer to the same object which has been updated before use it to update the object (8.12.9 step 10.a.ii.1)",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n\n var obj1 = { length: 10 };\n\n Object.defineProperty(obj, \"foo\", {\n value: obj1,\n writable: false,\n configurable: false\n });\n\n var obj2 = obj1;\n obj2.y = \"hello\";\n\n Object.defineProperties(obj, {\n foo: {\n value: obj2\n }\n });\n return dataPropertyAttributesAreCorrect(obj, \"foo\", obj1, false, false, false);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.7-6-a-84",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-84.js",
+ "description": "Object.defineProperties will not throw TypeError when P.configurable is false, P.writalbe is false, properties.value and P.value are two Objects refer to the same object (8.12.9 step 10.a.ii.1)",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n\n var obj1 = { length: 10 };\n\n Object.defineProperty(obj, \"foo\", { \n value: obj1, \n writable: false, \n configurable: false \n });\n\n Object.defineProperties(obj, {\n foo: {\n value: obj1\n }\n });\n return dataPropertyAttributesAreCorrect(obj, \"foo\", obj1, false, false, false);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.7-6-a-85",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-85.js",
+ "description": "Object.defineProperties throws TypeError when P.configurable is false, P.writalbe is false, properties.value and P.value are two objects with different values (8.12.9 step 10.a.ii.1)",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n\n var obj1 = { length: 10 };\n\n Object.defineProperty(obj, \"foo\", { \n value: obj1, \n writable: false, \n configurable: false \n });\n\n var obj2 = { length: 20 };\n\n try {\n Object.defineProperties(obj, {\n foo: {\n value: obj2\n }\n });\n return false;\n } catch (e) {\n return (e instanceof TypeError) && dataPropertyAttributesAreCorrect(obj, \"foo\", obj1, false, false, false);\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.7-6-a-86-1",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-86-1.js",
+ "description": "Object.defineProperties will not throw TypeError when P.configurable is false, both properties.[[Set]] and P.[[Set]] are two objects which refer to the same object and the object has been updated after defined(8.12.9 step 11.a.i)",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n\n var set_func = function (value) {\n obj.setVerifyHelpProp = value;\n }\n\n Object.defineProperty(obj, \"foo\", {\n set: set_func,\n configurable: false\n });\n\n set_func = function (value) {\n obj.setVerifyHelpProp1 = value;\n }\n\n try {\n Object.defineProperties(obj, {\n foo: {\n set: set_func\n }\n });\n } catch (e) {\n return accessorPropertyAttributesAreCorrect(obj, \"foo\", undefined, set_func, \"setVerifyHelpProp\", false, false);\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor) && fnExists(Object.defineProperties) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.7-6-a-86",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-86.js",
+ "description": "Object.defineProperties will not throw TypeError when P.configurable is false, both properties.[[Set]] and P.[[Set]] are two objects which refer to the same object (8.12.9 step 11.a.i)",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n\n function set_func(value) {\n obj.setVerifyHelpProp = value;\n }\n\n Object.defineProperty(obj, \"foo\", {\n set: set_func,\n configurable: false\n });\n\n Object.defineProperties(obj, {\n foo: {\n set: set_func\n }\n });\n return accessorPropertyAttributesAreCorrect(obj, \"foo\", undefined, set_func, \"setVerifyHelpProp\", false, false);\n\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor) && fnExists(Object.defineProperties) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.7-6-a-87",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-87.js",
+ "description": "Object.defineProperties throws TypeError when P.configurable is false, both properties.[[Set]] and P.[[Set]] are two objects which refer to different objects (8.12.9 step 11.a.i)",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n\n function set_func1(value) {\n obj.setVerifyHelpProp = value;\n }\n\n Object.defineProperty(obj, \"foo\", {\n set: set_func1,\n configurable: false\n });\n\n function set_func2() {}\n\n try {\n Object.defineProperties(obj, {\n foo: {\n set: set_func2\n }\n });\n return false;\n } catch (e) {\n return (e instanceof TypeError) && accessorPropertyAttributesAreCorrect(obj, \"foo\", undefined, set_func1, \"setVerifyHelpProp\", false, false);\n }\n\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor) && fnExists(Object.defineProperties) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.7-6-a-88",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-88.js",
+ "description": "Object.defineProperties throws TypeError when P.configurable is false, P.[[Set]] is undefined, properties.[[Set]] refers to an objcet (8.12.9 step 11.a.i)",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n\n function get_Func() {\n return 0;\n }\n\n Object.defineProperty(obj, \"foo\", {\n set: undefined,\n get: get_Func,\n enumerable: false,\n configurable: false\n });\n\n function set_Func() { }\n\n try {\n Object.defineProperties(obj, {\n foo: {\n set: set_Func\n }\n });\n return false;\n } catch (e) {\n var verifyEnumerable = false;\n for (var p in obj) {\n if (p === \"foo\") {\n verifyEnumerable = true;\n }\n }\n\n var desc = Object.getOwnPropertyDescriptor(obj, \"foo\");\n\n var verifyConfigurable = false;\n delete obj.foo;\n verifyConfigurable = obj.hasOwnProperty(\"foo\");\n\n return e instanceof TypeError && !verifyEnumerable && verifyConfigurable && typeof (desc.set) === \"undefined\";\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties) && fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.7-6-a-89",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-89.js",
+ "description": "Object.defineProperties will not throw TypeError when P.configurable is false, P.[[Set]] and properties.[[Set]] are undefined (8.12.9 step 11.a.i)",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n\n function get_Func() {\n return 0;\n }\n\n Object.defineProperty(obj, \"foo\", {\n get: get_Func,\n set: undefined,\n enumerable: false,\n configurable: false\n });\n\n Object.defineProperties(obj, {\n foo: {\n set: undefined\n }\n });\n\n var verifyEnumerable = false;\n for (var p in obj) {\n if (p === \"foo\") {\n verifyEnumerable = true;\n }\n }\n\n var desc = Object.getOwnPropertyDescriptor(obj, \"foo\");\n\n var verifyConfigurable = false;\n delete obj.foo;\n verifyConfigurable = obj.hasOwnProperty(\"foo\");\n\n return verifyConfigurable && !verifyEnumerable && typeof (desc.set) === \"undefined\";\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.7-6-a-9",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-9.js",
+ "description": "Object.defineProperties - 'P' is own accessor property without a get function (8.12.9 step 1 ) ",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n Object.defineProperty(obj, \"prop\", {\n set: function () { },\n configurable: false\n });\n\n try {\n Object.defineProperties(obj, {\n prop: {\n get: function () { },\n configurable: true\n }\n });\n return false;\n } catch (e) {\n return (e instanceof TypeError);\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.7-6-a-90",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-90.js",
+ "description": "Object.defineProperties will not throw TypeError when P.configurable is false, both properties.[[Get]] and P.[[Get]] are two objects which refer to the same object (8.12.9 step 11.a.ii)",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n\n function set_func(value) {\n obj.setVerifyHelpProp = value;\n }\n function get_func() {\n return 10;\n }\n\n Object.defineProperty(obj, \"foo\", {\n get: get_func,\n set: set_func,\n enumerable: false,\n configurable: false\n });\n\n Object.defineProperties(obj, {\n foo: {\n get: get_func\n }\n });\n return accessorPropertyAttributesAreCorrect(obj, \"foo\", get_func, set_func, \"setVerifyHelpProp\", false, false);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor) && fnExists(Object.defineProperties) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.7-6-a-91",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-91.js",
+ "description": "Object.defineProperties throws TypeError when P.configurable is false, both properties.[[Get]] and P.[[Get]] are two objects which refer to different objects (8.12.9 step 11.a.ii)",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n\n function set_func(value) {\n obj.setVerifyHelpProp = value;\n }\n function get_func1() {\n return 10;\n }\n\n Object.defineProperty(obj, \"foo\", {\n get: get_func1,\n set: set_func,\n enumerable: false,\n configurable: false\n });\n\n function get_func2() {\n return 20;\n }\n\n try {\n Object.defineProperties(obj, {\n foo: {\n get: get_func2\n }\n });\n return false;\n } catch (e) {\n return (e instanceof TypeError) && accessorPropertyAttributesAreCorrect(obj, \"foo\", get_func1, set_func, \"setVerifyHelpProp\", false, false);\n }\n\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor) && fnExists(Object.defineProperties) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.7-6-a-92",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-92.js",
+ "description": "Object.defineProperties throws TypeError when P.configurable is false, P.[[Get]] is undefined, properties.[[Get]] refers to an objcet (8.12.9 step 11.a.ii)",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n\n function set_func(value) {\n obj.setVerifyHelpProp = value;\n }\n\n Object.defineProperty(obj, \"foo\", {\n get: undefined,\n set: set_func,\n enumerable: false,\n configurable: false\n });\n\n function get_func() {\n return 0;\n }\n\n try {\n Object.defineProperties(obj, {\n foo: {\n get: get_func\n }\n });\n return false;\n } catch (e) {\n return (e instanceof TypeError) && accessorPropertyAttributesAreCorrect(obj, \"foo\", undefined, set_func, \"setVerifyHelpProp\", false, false);\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor) && fnExists(Object.defineProperties) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.7-6-a-93-1",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-93-1.js",
+ "description": "Object.defineProperties will update [[Value]] attribute of named data property 'P' successfully when [[Configurable]] attribute is true and [[Writable]] attribute is false but not when both are false (8.12.9 - step Note & 10.a.ii.1)",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n\n Object.defineProperty(obj, \"property\", {\n value: 1001,\n writable: false,\n configurable: true\n });\n \n Object.defineProperty(obj, \"property1\", {\n value: 1003,\n writable: false,\n configurable: false\n });\n\n try {\n Object.defineProperties(obj, {\n property: {\n value: 1002\n },\n property1: {\n value: 1004\n }\n });\n\n return false;\n } catch (e) {\n return e instanceof TypeError &&\n dataPropertyAttributesAreCorrect(obj, \"property\", 1002, false, false, true) &&\n dataPropertyAttributesAreCorrect(obj, \"property1\", 1003, false, false, false);\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.7-6-a-93-2",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-93-2.js",
+ "description": "Object.defineProperties will update [[Value]] attribute of indexed data property 'P' successfully when [[Configurable]] attribute is true and [[Writable]] attribute is false but not when both are false (8.12.9 - step Note & 10.a.ii.1)",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n\n Object.defineProperty(obj, \"0\", {\n value: 1001,\n writable: false,\n configurable: true\n });\n \n Object.defineProperty(obj, \"1\", {\n value: 1003,\n writable: false,\n configurable: false\n });\n\n try {\n Object.defineProperties(obj, {\n 0: {\n value: 1002\n },\n 1: {\n value: 1004\n }\n });\n\n return false;\n } catch (e) {\n return e instanceof TypeError &&\n dataPropertyAttributesAreCorrect(obj, \"0\", 1002, false, false, true) &&\n dataPropertyAttributesAreCorrect(obj, \"1\", 1003, false, false, false);\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.7-6-a-93-3",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-93-3.js",
+ "description": "Object.defineProperties will fail to update [[Value]] attribute of named data property 'P' when [[Configurable]] attribute of first updating property is false (8.12.9 - step Note & 10.a.ii.1)",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n\n Object.defineProperty(obj, \"property\", {\n value: 1001,\n writable: false,\n configurable: false\n });\n \n Object.defineProperty(obj, \"property1\", {\n value: 1003,\n writable: false,\n configurable: true\n });\n\n try {\n Object.defineProperties(obj, {\n property: {\n value: 1002\n },\n property1: {\n value: 1004\n }\n });\n\n return false;\n } catch (e) {\n return e instanceof TypeError &&\n dataPropertyAttributesAreCorrect(obj, \"property\", 1001, false, false, false) &&\n dataPropertyAttributesAreCorrect(obj, \"property1\", 1003, false, false, true);\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.7-6-a-93-4",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-93-4.js",
+ "description": "Object.defineProperties will fail to update [[Value]] attribute of indexed data property 'P' when [[Configurable]] attribute of first updating property are false (8.12.9 - step Note & 10.a.ii.1)",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n\n Object.defineProperty(obj, \"0\", {\n value: 1001,\n writable: false,\n configurable: false\n });\n \n Object.defineProperty(obj, \"1\", {\n value: 1003,\n writable: false,\n configurable: true\n });\n\n try {\n Object.defineProperties(obj, {\n 0: {\n value: 1002\n },\n 1: {\n value: 1004\n }\n });\n\n return false;\n } catch (e) {\n return e instanceof TypeError &&\n dataPropertyAttributesAreCorrect(obj, \"0\", 1001, false, false, false) &&\n dataPropertyAttributesAreCorrect(obj, \"1\", 1003, false, false, true);\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.7-6-a-93",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-93.js",
+ "description": "Object.defineProperties will not throw TypeError when P.configurable is false, P.[[Get]] and properties.[[Get]] are undefined (8.12.9 step 11.a.ii)",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n\n function set_func(value) {\n obj.setVerifyHelpProp = value;\n }\n\n Object.defineProperty(obj, \"foo\", {\n get: undefined,\n set: set_func,\n enumerable: false,\n configurable: false\n });\n\n Object.defineProperties(obj, {\n foo: {\n get: undefined\n }\n });\n return accessorPropertyAttributesAreCorrect(obj, \"foo\", undefined, set_func, \"setVerifyHelpProp\", false, false);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor) && fnExists(Object.defineProperties) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.7-6-a-94",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-94.js",
+ "description": "Object.defineProperties - 'P' is data property, properties.value and P.value are two different values (8.12.9 step 12)",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n\n obj.foo = 100; // default value of attributes: writable: true, configurable: true, enumerable: true\n\n Object.defineProperties(obj, {\n foo: {\n value: 200\n }\n });\n return dataPropertyAttributesAreCorrect(obj, \"foo\", 200, true, true, true);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties))"
+ },
+ {
+ "id": "15.2.3.7-6-a-95",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-95.js",
+ "description": "Object.defineProperties - 'P' is data property, P.value is present and properties.value is undefined (8.12.9 step 12)",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n\n Object.defineProperty(obj, \"foo\", {\n value: 200,\n enumerable: true,\n writable: true,\n configurable: true \n });\n\n Object.defineProperties(obj, {\n foo: {\n value: undefined\n }\n });\n return dataPropertyAttributesAreCorrect(obj, \"foo\", undefined, true, true, true);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.7-6-a-96",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-96.js",
+ "description": "Object.defineProperties - 'P' is data property, properties.value is present and P.value is undefined (8.12.9 step 12)",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n\n Object.defineProperty(obj, \"foo\", {\n value: undefined,\n enumerable: true,\n writable: true,\n configurable: true \n });\n\n Object.defineProperties(obj, {\n foo: {\n value: 200\n }\n });\n return dataPropertyAttributesAreCorrect(obj, \"foo\", 200, true, true, true);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.7-6-a-97",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-97.js",
+ "description": "Object.defineProperties - 'P' is data property, P.writable and properties.writable are different values (8.12.9 step 12)",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n\n Object.defineProperty(obj, \"foo\", { \n value: 100, \n enumerable: true, \n writable: false, \n configurable: true \n });\n\n Object.defineProperties(obj, {\n foo: {\n writable: true\n }\n });\n return dataPropertyAttributesAreCorrect(obj, \"foo\", 100, true, true, true);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.7-6-a-98",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-98.js",
+ "description": "Object.defineProperties - 'P' is data property, P.enumerable and properties.enumerable are different values (8.12.9 step 12)",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n\n Object.defineProperty(obj, \"foo\", { \n value: 200, \n enumerable: false, \n writable: true, \n configurable: true \n });\n\n Object.defineProperties(obj, {\n foo: {\n enumerable: true\n }\n });\n return dataPropertyAttributesAreCorrect(obj, \"foo\", 200, true, true, true);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.7-6-a-99",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.7/15.2.3.7-6-a-99.js",
+ "description": "Object.defineProperties - 'P' is data property, P.configurable is true and properties.configurable is false",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n\n Object.defineProperty(obj, \"foo\", { \n value: 200, \n enumerable: true, \n writable: true, \n configurable: true \n });\n\n Object.defineProperties(obj, {\n foo: {\n configurable: false\n }\n });\n return dataPropertyAttributesAreCorrect(obj, \"foo\", 200, true, true, false);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperties) && fnExists(Object.defineProperty))"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.2.3.8.json b/website/resources/scripts/testcases2/15.2.3.8.json
new file mode 100644
index 000000000..460c14a1d
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.2.3.8.json
@@ -0,0 +1,308 @@
+{
+ "testCollection": {
+ "name": "15.2.3.8",
+ "numTests": 43,
+ "tests": [
+ {
+ "id": "15.2.3.8-0-1",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.8/15.2.3.8-0-1.js",
+ "description": "Object.seal must exist as a function",
+ "test": "assertTrue((function testcase() {\n var f = Object.seal;\n if (typeof(f) === \"function\") {\n return true;\n }\n }).call(this));\n"
+ },
+ {
+ "id": "15.2.3.8-0-2",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.8/15.2.3.8-0-2.js",
+ "description": "Object.seal must exist as a function taking 1 parameter",
+ "test": "assertTrue((Object.seal.length === 1));\n",
+ "precondition": "(fnExists(Object.seal))"
+ },
+ {
+ "id": "15.2.3.8-1-1",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.8/15.2.3.8-1-1.js",
+ "description": "Object.seal throws TypeError if type of first param is undefined",
+ "test": "assertTrue((function testcase() {\n try {\n Object.seal(undefined);\n return false;\n } catch (e) {\n return e instanceof TypeError;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.seal))"
+ },
+ {
+ "id": "15.2.3.8-1-2",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.8/15.2.3.8-1-2.js",
+ "description": "Object.seal throws TypeError if type of first param is null",
+ "test": "assertTrue((function testcase() {\n try {\n Object.seal(null);\n return false;\n } catch (e) {\n return e instanceof TypeError;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.seal))"
+ },
+ {
+ "id": "15.2.3.8-1-3",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.8/15.2.3.8-1-3.js",
+ "description": "Object.seal throws TypeError if type of first param is a boolean primitive",
+ "test": "assertTrue((function testcase() {\n try {\n Object.seal(false);\n return false;\n } catch (e) {\n return e instanceof TypeError;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.seal))"
+ },
+ {
+ "id": "15.2.3.8-1-4",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.8/15.2.3.8-1-4.js",
+ "description": "Object.seal throws TypeError if type of first param is a string primitive",
+ "test": "assertTrue((function testcase() {\n try {\n Object.seal(\"abc\");\n return false;\n } catch (e) {\n return e instanceof TypeError;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.seal))"
+ },
+ {
+ "id": "15.2.3.8-1",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.8/15.2.3.8-1.js",
+ "description": "Object.seal throws TypeError if type of first param is not Object",
+ "test": "assertTrue((function testcase() {\n try {\n Object.seal(0);\n }\n catch (e) {\n if (e instanceof TypeError) {\n return true;\n }\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.seal))"
+ },
+ {
+ "id": "15.2.3.8-2-1",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.8/15.2.3.8-2-1.js",
+ "description": "Object.seal - extensible of 'O' is set as false even if 'O' has no own property",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n var preCheck = Object.isExtensible(obj);\n\n Object.seal(obj);\n\n return preCheck && !Object.isExtensible(obj);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.seal) && fnExists(Object.isExtensible))"
+ },
+ {
+ "id": "15.2.3.8-2-2",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.8/15.2.3.8-2-2.js",
+ "description": "Object.seal - inherited data properties are ignored",
+ "test": "assertTrue((function testcase() {\n var proto = {};\n\n Object.defineProperty(proto, \"Father\", {\n value: 10,\n configurable: true\n });\n\n var ConstructFun = function () { };\n ConstructFun.prototype = proto;\n\n var child = new ConstructFun();\n var preCheck = Object.isExtensible(child);\n Object.seal(child);\n\n var beforeDeleted = proto.hasOwnProperty(\"Father\");\n delete proto.Father;\n var afterDeleted = proto.hasOwnProperty(\"Father\");\n\n return preCheck && beforeDeleted && !afterDeleted;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.seal) && fnExists(Object.defineProperty) && fnExists(Object.isExtensible))"
+ },
+ {
+ "id": "15.2.3.8-2-3",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.8/15.2.3.8-2-3.js",
+ "description": "Object.seal - inherited accessor properties are ignored",
+ "test": "assertTrue((function testcase() {\n var proto = {};\n\n Object.defineProperty(proto, \"Father\", {\n get: function () {\n return 10;\n },\n configurable: true\n });\n\n var ConstructFun = function () { };\n ConstructFun.prototype = proto;\n\n var child = new ConstructFun();\n var preCheck = Object.isExtensible(child);\n Object.seal(child);\n\n var beforeDeleted = proto.hasOwnProperty(\"Father\");\n delete proto.Father;\n var afterDeleted = proto.hasOwnProperty(\"Father\");\n\n return preCheck && beforeDeleted && !afterDeleted;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.seal) && fnExists(Object.defineProperty) && fnExists(Object.isExtensible))"
+ },
+ {
+ "id": "15.2.3.8-2-4",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.8/15.2.3.8-2-4.js",
+ "description": "Object.seal - non-enumerable own property of 'O' is sealed",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n Object.defineProperty(obj, \"foo\", {\n value: 10,\n enumerable: false,\n configurable: true\n });\n var preCheck = Object.isExtensible(obj);\n Object.seal(obj);\n\n var beforeDeleted = obj.hasOwnProperty(\"foo\");\n delete obj.foo;\n var afterDeleted = obj.hasOwnProperty(\"foo\");\n\n return preCheck && beforeDeleted && afterDeleted;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.seal) && fnExists(Object.defineProperty) && fnExists(Object.isExtensible))"
+ },
+ {
+ "id": "15.2.3.8-2-a-1",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.8/15.2.3.8-2-a-1.js",
+ "description": "Object.seal - 'P' is own data property",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n obj.foo = 10; // default [[Configurable]] attribute value of foo: true\n var preCheck = Object.isExtensible(obj);\n Object.seal(obj);\n\n delete obj.foo;\n return preCheck && obj.foo === 10;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.seal) && fnExists(Object.isExtensible))"
+ },
+ {
+ "id": "15.2.3.8-2-a-10",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.8/15.2.3.8-2-a-10.js",
+ "description": "Object.seal - 'P' is own property of a Boolean object that uses Object's [[GetOwnProperty]]",
+ "test": "assertTrue((function testcase() {\n var boolObj = new Boolean(false);\n\n boolObj.foo = 10;\n var preCheck = Object.isExtensible(boolObj);\n Object.seal(boolObj);\n\n delete boolObj.foo;\n return preCheck && boolObj.foo === 10;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.seal) && fnExists(Object.isExtensible))"
+ },
+ {
+ "id": "15.2.3.8-2-a-11",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.8/15.2.3.8-2-a-11.js",
+ "description": "Object.seal - 'P' is own property of a Number object that uses Object's [[GetOwnProperty]]",
+ "test": "assertTrue((function testcase() {\n var numObj = new Number(-1);\n\n numObj.foo = 10;\n var preCheck = Object.isExtensible(numObj);\n Object.seal(numObj);\n\n delete numObj.foo;\n return preCheck && numObj.foo === 10;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.seal) && fnExists(Object.isExtensible))"
+ },
+ {
+ "id": "15.2.3.8-2-a-12",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.8/15.2.3.8-2-a-12.js",
+ "description": "Object.seal - 'P' is own property of a Date object that uses Object's [[GetOwnProperty]]",
+ "test": "assertTrue((function testcase() {\n var dateObj = new Date();\n\n dateObj.foo = 10;\n var preCheck = Object.isExtensible(dateObj);\n Object.seal(dateObj);\n\n delete dateObj.foo;\n return preCheck && dateObj.foo === 10;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.seal) && fnExists(Object.isExtensible))"
+ },
+ {
+ "id": "15.2.3.8-2-a-13",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.8/15.2.3.8-2-a-13.js",
+ "description": "Object.seal - 'P' is own property of a RegExp object that uses Object's [[GetOwnProperty]]",
+ "test": "assertTrue((function testcase() {\n var regObj = new RegExp();\n\n regObj.foo = 10;\n var preCheck = Object.isExtensible(regObj);\n Object.seal(regObj);\n\n delete regObj.foo;\n return preCheck && regObj.foo === 10;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.seal) && fnExists(Object.isExtensible))"
+ },
+ {
+ "id": "15.2.3.8-2-a-14",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.8/15.2.3.8-2-a-14.js",
+ "description": "Object.seal - 'P' is own property of an Error object that uses Object's [[GetOwnProperty]]",
+ "test": "assertTrue((function testcase() {\n var errObj = new Error();\n\n errObj.foo = 10;\n var preCheck = Object.isExtensible(errObj);\n Object.seal(errObj);\n\n delete errObj.foo;\n return preCheck && errObj.foo === 10;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.seal) && fnExists(Object.isExtensible))"
+ },
+ {
+ "id": "15.2.3.8-2-a-15",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.8/15.2.3.8-2-a-15.js",
+ "description": "Object.seal - 'P' is own property of an Arguments object which implements its own [[GetOwnProperty]]",
+ "test": "assertTrue((function testcase() {\n var argObj = (function () { return arguments; })();\n\n argObj.foo = 10; // default [[Configurable]] attribute value of foo: true\n var preCheck = Object.isExtensible(argObj);\n Object.seal(argObj);\n\n delete argObj.foo;\n return preCheck && argObj.foo === 10;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.seal) && fnExists(Object.isExtensible))"
+ },
+ {
+ "id": "15.2.3.8-2-a-2",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.8/15.2.3.8-2-a-2.js",
+ "description": "Object.seal - 'P' is own data property that overrides an inherited data property",
+ "test": "assertTrue((function testcase() {\n var proto = { foo: 0 };\n\n var ConstructFun = function () { };\n ConstructFun.prototype = proto;\n\n var child = new ConstructFun();\n Object.defineProperty(child, \"foo\", {\n value: 10,\n configurable: true\n });\n var preCheck = Object.isExtensible(child);\n Object.seal(child);\n\n delete child.foo;\n return preCheck && child.foo === 10;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.seal) && fnExists(Object.defineProperty) && fnExists(Object.isExtensible))"
+ },
+ {
+ "id": "15.2.3.8-2-a-3",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.8/15.2.3.8-2-a-3.js",
+ "description": "Object.seal - 'P' is own data property that overrides an inherited accessor property",
+ "test": "assertTrue((function testcase() {\n var proto = {};\n\n Object.defineProperty(proto, \"foo\", {\n get: function () {\n return 0;\n },\n configurable: true\n });\n\n var ConstructFun = function () { };\n ConstructFun.prototype = proto;\n\n var child = new ConstructFun();\n Object.defineProperty(child, \"foo\", {\n value: 10,\n configurable: true\n });\n var preCheck = Object.isExtensible(child);\n Object.seal(child);\n\n delete child.foo;\n return preCheck && child.foo === 10;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.seal) && fnExists(Object.defineProperty) && fnExists(Object.isExtensible))"
+ },
+ {
+ "id": "15.2.3.8-2-a-4",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.8/15.2.3.8-2-a-4.js",
+ "description": "Object.seal - 'P' is own accessor property",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n Object.defineProperty(obj, \"foo\", {\n get: function () {\n return 10;\n },\n configurable: true\n });\n var preCheck = Object.isExtensible(obj);\n Object.seal(obj);\n\n delete obj.foo;\n return preCheck && obj.foo === 10;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.seal) && fnExists(Object.defineProperty) && fnExists(Object.isExtensible))"
+ },
+ {
+ "id": "15.2.3.8-2-a-5",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.8/15.2.3.8-2-a-5.js",
+ "description": "Object.seal - 'P' is own accessor property that overrides an inherited data property",
+ "test": "assertTrue((function testcase() {\n var proto = {};\n\n Object.defineProperty(proto, \"foo\", {\n value: 0,\n configurable: true\n });\n\n var ConstructFun = function () { };\n ConstructFun.prototype = proto;\n\n var child = new ConstructFun();\n \n Object.defineProperty(child, \"foo\", {\n get: function () {\n return 10;\n },\n configurable: true\n });\n var preCheck = Object.isExtensible(child);\n Object.seal(child);\n\n delete child.foo;\n return preCheck && child.foo === 10;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.seal) && fnExists(Object.defineProperty) && fnExists(Object.isExtensible))"
+ },
+ {
+ "id": "15.2.3.8-2-a-6",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.8/15.2.3.8-2-a-6.js",
+ "description": "Object.seal - 'P' is own accessor property that overrides an inherited accessor property",
+ "test": "assertTrue((function testcase() {\n var proto = {};\n\n Object.defineProperty(proto, \"foo\", {\n get: function () {\n return 0;\n },\n configurable: true\n });\n\n var ConstructFun = function () { };\n ConstructFun.prototype = proto;\n\n var child = new ConstructFun();\n\n Object.defineProperty(child, \"foo\", {\n get: function () {\n return 10;\n },\n configurable: true\n });\n var preCheck = Object.isExtensible(child);\n Object.seal(child);\n\n delete child.foo;\n return preCheck && child.foo === 10;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.seal) && fnExists(Object.defineProperty) && fnExists(Object.isExtensible))"
+ },
+ {
+ "id": "15.2.3.8-2-a-7",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.8/15.2.3.8-2-a-7.js",
+ "description": "Object.seal - 'P' is own property of a Function object that uses Object's [[GetOwnProperty]]",
+ "test": "assertTrue((function testcase() {\n var funObj = function () { };\n\n funObj.foo = 10; // default [[Configurable]] attribute value of foo: true\n var preCheck = Object.isExtensible(funObj);\n Object.seal(funObj);\n\n delete funObj.foo;\n return preCheck && funObj.foo === 10;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.seal) && fnExists(Object.isExtensible))"
+ },
+ {
+ "id": "15.2.3.8-2-a-8",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.8/15.2.3.8-2-a-8.js",
+ "description": "Object.seal - 'P' is own property of an Array object that uses Object's [[GetOwnProperty]]",
+ "test": "assertTrue((function testcase() {\n var arrObj = [];\n\n arrObj.foo = 10;\n var preCheck = Object.isExtensible(arrObj);\n Object.seal(arrObj);\n\n delete arrObj.foo;\n return preCheck && arrObj.foo === 10;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.seal) && fnExists(Object.isExtensible))"
+ },
+ {
+ "id": "15.2.3.8-2-a-9",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.8/15.2.3.8-2-a-9.js",
+ "description": "Object.seal - 'P' is own property of a String object which implements its own [[GetOwnProperty]]",
+ "test": "assertTrue((function testcase() {\n var strObj = new String(\"abc\");\n\n strObj.foo = 10; // default [[Configurable]] attribute value of foo: true\n var preCheck = Object.isExtensible(strObj);\n Object.seal(strObj);\n\n delete strObj.foo;\n return preCheck && strObj.foo === 10;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.seal) && fnExists(Object.isExtensible))"
+ },
+ {
+ "id": "15.2.3.8-2-b-1",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.8/15.2.3.8-2-b-1.js",
+ "description": "Object.seal - the [[Configurable]] attribute of own data property of 'O' is set from true to false and other attributes of the property are unaltered",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n Object.defineProperty(obj, \"foo\", {\n value: 10,\n writable: true,\n enumerable: true,\n configurable: true\n });\n var preCheck = Object.isExtensible(obj);\n Object.seal(obj);\n\n return preCheck && dataPropertyAttributesAreCorrect(obj, \"foo\", 10, true, true, false);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.seal) && fnExists(Object.defineProperty) && fnExists(Object.isExtensible))"
+ },
+ {
+ "id": "15.2.3.8-2-b-2",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.8/15.2.3.8-2-b-2.js",
+ "description": "Object.seal - the [[Configurable]] attribute of own accessor property of 'O' is set from true to false and other attributes of the property are unaltered",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n obj.variableForHelpVerify = \"data\";\n\n function setFunc(value) {\n obj.variableForHelpVerify = value;\n }\n function getFunc() {\n return 10;\n }\n Object.defineProperty(obj, \"foo\", {\n get: getFunc,\n set: setFunc,\n enumerable: true,\n configurable: true\n });\n var preCheck = Object.isExtensible(obj);\n Object.seal(obj);\n\n return preCheck && accessorPropertyAttributesAreCorrect(obj, \"foo\", getFunc, setFunc, \"variableForHelpVerify\", true, false);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.seal) && fnExists(Object.defineProperty) && fnExists(Object.isExtensible))"
+ },
+ {
+ "id": "15.2.3.8-2-b-3",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.8/15.2.3.8-2-b-3.js",
+ "description": "Object.seal - the [[Configurable]] attribute of all own properties of 'O' are set from true to false and other attributes of the property are unaltered",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n obj.variableForHelpVerify = \"data\";\n\n Object.defineProperty(obj, \"foo1\", {\n value: 10,\n writable: true,\n enumerable: true,\n configurable: true\n });\n\n function set_func(value) {\n obj.variableForHelpVerify = value;\n }\n function get_func() {\n return 10;\n }\n Object.defineProperty(obj, \"foo2\", {\n get: get_func,\n set: set_func,\n enumerable: true,\n configurable: true\n });\n var preCheck = Object.isExtensible(obj);\n Object.seal(obj);\n\n return preCheck && dataPropertyAttributesAreCorrect(obj, \"foo1\", 10, true, true, false) &&\n accessorPropertyAttributesAreCorrect(obj, \"foo2\", get_func, set_func, \"variableForHelpVerify\", true, false);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.seal) && fnExists(Object.defineProperty) && fnExists(Object.isExtensible))"
+ },
+ {
+ "id": "15.2.3.8-2-b-4",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.8/15.2.3.8-2-b-4.js",
+ "description": "Object.seal - all own properties of 'O' are already non-configurable",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n obj.variableForHelpVerify = \"data\";\n\n Object.defineProperty(obj, \"foo1\", {\n value: 10,\n writable: true,\n enumerable: true,\n configurable: false\n });\n\n function set_func(value) {\n obj.variableForHelpVerify = value;\n }\n function get_func() {\n return 10;\n }\n Object.defineProperty(obj, \"foo2\", {\n get: get_func,\n set: set_func,\n enumerable: true,\n configurable: false\n });\n var preCheck = Object.isExtensible(obj);\n Object.seal(obj);\n\n return preCheck && dataPropertyAttributesAreCorrect(obj, \"foo1\", 10, true, true, false) &&\n accessorPropertyAttributesAreCorrect(obj, \"foo2\", get_func, set_func, \"variableForHelpVerify\", true, false);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.seal) && fnExists(Object.defineProperty) && fnExists(Object.isExtensible))"
+ },
+ {
+ "id": "15.2.3.8-2-c-1",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.8/15.2.3.8-2-c-1.js",
+ "description": "Object.seal - 'O' is a Function object",
+ "test": "assertTrue((function testcase() {\n\n var fun = function () { };\n var preCheck = Object.isExtensible(fun);\n Object.seal(fun);\n\n return preCheck && Object.isSealed(fun);\n\n }).call(this));\n",
+ "precondition": "(fnExists(Object.seal) && fnExists(Object.isSealed) && fnExists(Object.isExtensible))"
+ },
+ {
+ "id": "15.2.3.8-2-c-2",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.8/15.2.3.8-2-c-2.js",
+ "description": "Object.seal - 'O' is an Array object",
+ "test": "assertTrue((function testcase() {\n\n var arr = [0, 1];\n var preCheck = Object.isExtensible(arr);\n Object.seal(arr);\n\n return preCheck && Object.isSealed(arr);\n\n }).call(this));\n",
+ "precondition": "(fnExists(Object.seal) && fnExists(Object.isSealed) && fnExists(Object.isExtensible))"
+ },
+ {
+ "id": "15.2.3.8-2-c-3",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.8/15.2.3.8-2-c-3.js",
+ "description": "Object.seal - 'O' is a String object",
+ "test": "assertTrue((function testcase() {\n\n var strObj = new String(\"a\");\n var preCheck = Object.isExtensible(strObj);\n Object.seal(strObj);\n\n return preCheck && Object.isSealed(strObj);\n\n }).call(this));\n",
+ "precondition": "(fnExists(Object.seal) && fnExists(Object.isSealed) && fnExists(Object.isExtensible))"
+ },
+ {
+ "id": "15.2.3.8-2-c-4",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.8/15.2.3.8-2-c-4.js",
+ "description": "Object.seal - 'O' is a Boolean object",
+ "test": "assertTrue((function testcase() {\n\n var boolObj = new Boolean(false);\n var preCheck = Object.isExtensible(boolObj);\n Object.seal(boolObj);\n\n return preCheck && Object.isSealed(boolObj);\n\n }).call(this));\n",
+ "precondition": "(fnExists(Object.seal) && fnExists(Object.isSealed) && fnExists(Object.isExtensible))"
+ },
+ {
+ "id": "15.2.3.8-2-c-5",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.8/15.2.3.8-2-c-5.js",
+ "description": "Object.seal - 'O' is a Number object",
+ "test": "assertTrue((function testcase() {\n\n var numObj = new Number(3);\n var preCheck = Object.isExtensible(numObj);\n Object.seal(numObj);\n\n return preCheck && Object.isSealed(numObj);\n\n }).call(this));\n",
+ "precondition": "(fnExists(Object.seal) && fnExists(Object.isSealed) && fnExists(Object.isExtensible))"
+ },
+ {
+ "id": "15.2.3.8-2-c-6",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.8/15.2.3.8-2-c-6.js",
+ "description": "Object.seal - 'O' is a Date object",
+ "test": "assertTrue((function testcase() {\n\n var dateObj = new Date();\n var preCheck = Object.isExtensible(dateObj);\n Object.seal(dateObj);\n\n return preCheck && Object.isSealed(dateObj);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.seal) && fnExists(Object.isSealed) && fnExists(Object.isExtensible))"
+ },
+ {
+ "id": "15.2.3.8-2-c-7",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.8/15.2.3.8-2-c-7.js",
+ "description": "Object.seal - 'O' is a RegExp object",
+ "test": "assertTrue((function testcase() {\n var regObj = new RegExp();\n var preCheck = Object.isExtensible(regObj);\n Object.seal(regObj);\n\n return preCheck && Object.isSealed(regObj);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.seal) && fnExists(Object.isSealed) && fnExists(Object.isExtensible))"
+ },
+ {
+ "id": "15.2.3.8-2-c-8",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.8/15.2.3.8-2-c-8.js",
+ "description": "Object.seal - 'O' is an Error object",
+ "test": "assertTrue((function testcase() {\n\n var errObj = new Error();\n var preCheck = Object.isExtensible(errObj);\n Object.seal(errObj);\n\n return preCheck && Object.isSealed(errObj);\n\n }).call(this));\n",
+ "precondition": "(fnExists(Object.seal) && fnExists(Object.isSealed) && fnExists(Object.isExtensible))"
+ },
+ {
+ "id": "15.2.3.8-2-c-9",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.8/15.2.3.8-2-c-9.js",
+ "description": "Object.seal - 'O' is an Arguments object",
+ "test": "assertTrue((function testcase() {\n\n var argObj = (function () { return arguments; })();\n\n var preCheck = Object.isExtensible(argObj);\n Object.seal(argObj);\n\n return preCheck && Object.isSealed(argObj);\n\n }).call(this));\n",
+ "precondition": "(fnExists(Object.seal) && fnExists(Object.isSealed) && fnExists(Object.isExtensible))"
+ },
+ {
+ "id": "15.2.3.8-3-1",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.8/15.2.3.8-3-1.js",
+ "description": "Object.seal - returned object is not extensible",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n var preCheck = Object.isExtensible(obj);\n Object.seal(obj);\n return preCheck && !Object.isExtensible(obj);\n\n }).call(this));\n",
+ "precondition": "(fnExists(Object.seal) && fnExists(Object.isExtensible))"
+ },
+ {
+ "id": "15.2.3.8-4-1",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.8/15.2.3.8-4-1.js",
+ "description": "Object.seal - 'O' is sealed already",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n\n obj.foo = 10; // default value of attributes: writable: true, configurable: true, enumerable: true\n var preCheck = Object.isExtensible(obj);\n Object.seal(obj);\n\n Object.seal(obj);\n return preCheck && Object.isSealed(obj);\n\n }).call(this));\n",
+ "precondition": "(fnExists(Object.seal) && fnExists(Object.isSealed) && fnExists(Object.isExtensible))"
+ },
+ {
+ "id": "15.2.3.8-4-2",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.8/15.2.3.8-4-2.js",
+ "description": "Object.seal - 'O' is frozen already",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n\n obj.foo = 10; // default value of attributes: writable: true, configurable: true, enumerable: true\n var preCheck = Object.isExtensible(obj);\n Object.freeze(obj);\n\n Object.seal(obj);\n return preCheck && Object.isSealed(obj);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.seal) && fnExists(Object.isSealed) && fnExists(Object.freeze) && fnExists(Object.isExtensible))"
+ },
+ {
+ "id": "15.2.3.8-4-3",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.8/15.2.3.8-4-3.js",
+ "description": "Object.seal - the extension of 'O' is prevented already",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n\n obj.foo = 10; // default value of attributes: writable: true, configurable: true, enumerable: true\n var preCheck = Object.isExtensible(obj);\n Object.preventExtensions(obj);\n Object.seal(obj);\n return preCheck && Object.isSealed(obj);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.seal) && fnExists(Object.isSealed) && fnExists(Object.preventExtensions) && fnExists(Object.isExtensible))"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.2.3.9.json b/website/resources/scripts/testcases2/15.2.3.9.json
new file mode 100644
index 000000000..c9d539ece
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.2.3.9.json
@@ -0,0 +1,315 @@
+{
+ "testCollection": {
+ "name": "15.2.3.9",
+ "numTests": 44,
+ "tests": [
+ {
+ "id": "15.2.3.9-0-1",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.9/15.2.3.9-0-1.js",
+ "description": "Object.freeze must exist as a function",
+ "test": "assertTrue((function testcase() {\n var f = Object.freeze;\n if (typeof(f) === \"function\") {\n return true;\n }\n }).call(this));\n"
+ },
+ {
+ "id": "15.2.3.9-0-2",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.9/15.2.3.9-0-2.js",
+ "description": "Object.freeze must exist as a function taking 1 parameter",
+ "test": "assertTrue((Object.freeze.length === 1));\n",
+ "precondition": "(fnExists(Object.freeze))"
+ },
+ {
+ "id": "15.2.3.9-1-1",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.9/15.2.3.9-1-1.js",
+ "description": "Object.freeze throws TypeError if type of first param is undefined",
+ "test": "assertTrue((function testcase() {\n try {\n Object.freeze(undefined);\n return false;\n } catch (e) {\n return e instanceof TypeError;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.freeze))"
+ },
+ {
+ "id": "15.2.3.9-1-2",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.9/15.2.3.9-1-2.js",
+ "description": "Object.freeze throws TypeError if type of first param is null",
+ "test": "assertTrue((function testcase() {\n try {\n Object.freeze(null);\n return false;\n } catch (e) {\n return e instanceof TypeError;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.freeze))"
+ },
+ {
+ "id": "15.2.3.9-1-3",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.9/15.2.3.9-1-3.js",
+ "description": "Object.freeze throws TypeError if type of first param is boolean primitive",
+ "test": "assertTrue((function testcase() {\n var result = false;\n try {\n Object.freeze(false);\n\n return false;\n } catch (e) {\n result = e instanceof TypeError;\n }\n try {\n Object.freeze(true);\n\n return false;\n } catch (e) {\n return result && e instanceof TypeError;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.freeze))"
+ },
+ {
+ "id": "15.2.3.9-1-4",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.9/15.2.3.9-1-4.js",
+ "description": "Object.freeze throws TypeError if type of first param is string primitive",
+ "test": "assertTrue((function testcase() {\n try {\n Object.freeze(\"abc\");\n return false;\n } catch (e) {\n return e instanceof TypeError;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.freeze))"
+ },
+ {
+ "id": "15.2.3.9-1",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.9/15.2.3.9-1.js",
+ "description": "Object.freeze throws TypeError if type of first param is not Object",
+ "test": "assertTrue((function testcase() {\n try {\n Object.freeze(0);\n return false;\n } catch (e) {\n return e instanceof TypeError;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.freeze))"
+ },
+ {
+ "id": "15.2.3.9-2-1",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.9/15.2.3.9-2-1.js",
+ "description": "Object.freeze - extensible of 'O' is set as false even if 'O' has no own property",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n Object.freeze(obj);\n\n return !Object.isExtensible(obj);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.freeze) && fnExists(Object.isExtensible))"
+ },
+ {
+ "id": "15.2.3.9-2-2",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.9/15.2.3.9-2-2.js",
+ "description": "Object.freeze - inherited data properties are not frozen",
+ "test": "assertTrue((function testcase() {\n var proto = {};\n\n Object.defineProperty(proto, \"Father\", {\n value: 10,\n configurable: true\n });\n\n var Con = function () { };\n Con.prototype = proto;\n\n var child = new Con();\n Object.freeze(child);\n\n var beforeDeleted = proto.hasOwnProperty(\"Father\");\n delete proto.Father;\n var afterDeleted = proto.hasOwnProperty(\"Father\");\n\n return beforeDeleted && !afterDeleted;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.freeze) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.9-2-3",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.9/15.2.3.9-2-3.js",
+ "description": "Object.freeze - inherited accessor properties are not frozen",
+ "test": "assertTrue((function testcase() {\n var proto = {};\n\n Object.defineProperty(proto, \"Father\", {\n get: function () {\n return 10;\n },\n configurable: true\n });\n\n var Con = function () { };\n Con.prototype = proto;\n\n var child = new Con();\n Object.freeze(child);\n\n var beforeDeleted = proto.hasOwnProperty(\"Father\");\n delete proto.Father;\n var afterDeleted = proto.hasOwnProperty(\"Father\");\n\n return beforeDeleted && !afterDeleted;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.freeze) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.2.3.9-2-4",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.9/15.2.3.9-2-4.js",
+ "description": "Object.freeze - Non-enumerable own properties of 'O' are frozen",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n Object.defineProperty(obj, \"foo\", {\n value: 10,\n enumerable: false,\n configurable: true\n });\n\n Object.freeze(obj);\n\n var desc = Object.getOwnPropertyDescriptor(obj, \"foo\");\n\n var beforeDeleted = obj.hasOwnProperty(\"foo\");\n delete obj.foo;\n var afterDeleted = obj.hasOwnProperty(\"foo\");\n\n return beforeDeleted && afterDeleted && desc.configurable === false && desc.writable === false;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.freeze) && fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.9-2-a-1",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.9/15.2.3.9-2-a-1.js",
+ "description": "Object.freeze - 'P' is own data property",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n obj.foo = 10; // default [[Configurable]] attribute value of foo: true\n\n Object.freeze(obj);\n\n var desc = Object.getOwnPropertyDescriptor(obj, \"foo\");\n\n delete obj.foo;\n return obj.foo === 10 && desc.configurable === false && desc.writable === false;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.freeze) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.9-2-a-10",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.9/15.2.3.9-2-a-10.js",
+ "description": "Object.freeze - 'P' is own named property of an Array object that uses Object's [[GetOwnProperty]]",
+ "test": "assertTrue((function testcase() {\n var arrObj = [];\n\n arrObj.foo = 10; // default [[Configurable]] attribute value of foo: true\n\n Object.freeze(arrObj);\n\n var desc = Object.getOwnPropertyDescriptor(arrObj, \"foo\");\n\n delete arrObj.foo;\n return arrObj.foo === 10 && desc.configurable === false && desc.writable === false;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.freeze) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.9-2-a-11",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.9/15.2.3.9-2-a-11.js",
+ "description": "Object.freeze - 'P' is own index property of the Arguments object that implements its own [[GetOwnProperty]]",
+ "test": "assertTrue((function testcase() {\n\n // default [[Configurable]] attribute value of \"0\": true\n var argObj = (function () { return arguments; }(1, 2, 3));\n\n Object.freeze(argObj);\n\n var desc = Object.getOwnPropertyDescriptor(argObj, \"0\");\n\n delete argObj[0];\n return argObj[0] === 1 && desc.configurable === false && desc.writable === false;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.freeze) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.9-2-a-12",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.9/15.2.3.9-2-a-12.js",
+ "description": "Object.freeze - 'P' is own index property of a String object that implements its own [[GetOwnProperty]]",
+ "test": "assertTrue((function testcase() {\n\n // default [[Configurable]] attribute value of \"0\": true\n var strObj = new String(\"abc\");\n\n Object.freeze(strObj);\n\n var desc = Object.getOwnPropertyDescriptor(strObj, \"0\");\n\n delete strObj[0];\n return strObj[0] === \"a\" && desc.configurable === false && desc.writable === false;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.freeze) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.9-2-a-13",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.9/15.2.3.9-2-a-13.js",
+ "description": "Object.freeze - 'P' is own index property of the Object",
+ "test": "assertTrue((function testcase() {\n\n // default [[Configurable]] attribute value of \"0\": true\n var obj = { 0: 0, 1: 1, length: 2};\n\n Object.freeze(obj);\n\n var desc = Object.getOwnPropertyDescriptor(obj, \"0\");\n\n delete obj[0];\n return obj[0] === 0 && desc.configurable === false && desc.writable === false;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.freeze) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.9-2-a-14",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.9/15.2.3.9-2-a-14.js",
+ "description": "Object.freeze - 'P' is own index property of an Array object that uses Object's [[GetOwnProperty]]",
+ "test": "assertTrue((function testcase() {\n\n // default [[Configurable]] attribute value of \"0\": true\n var arrObj = [0, 1, 2];\n\n Object.freeze(arrObj);\n\n var desc = Object.getOwnPropertyDescriptor(arrObj, \"0\");\n\n delete arrObj[0];\n return arrObj[0] === 0 && desc.configurable === false && desc.writable === false;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.freeze) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.9-2-a-2",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.9/15.2.3.9-2-a-2.js",
+ "description": "Object.freeze - 'P' is own data property that overrides an inherited data property",
+ "test": "assertTrue((function testcase() {\n\n var proto = { foo: 0 }; // default [[Configurable]] attribute value of foo: true\n\n var Con = function () { };\n Con.prototype = proto;\n\n var child = new Con();\n\n child.foo = 10; // default [[Configurable]] attribute value of foo: true\n \n Object.freeze(child);\n\n var desc = Object.getOwnPropertyDescriptor(child, \"foo\");\n\n delete child.foo;\n return child.foo === 10 && desc.configurable === false && desc.writable === false;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.freeze) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.9-2-a-3",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.9/15.2.3.9-2-a-3.js",
+ "description": "Object.freeze - 'P' is own data property that overrides an inherited accessor property",
+ "test": "assertTrue((function testcase() {\n var proto = {};\n\n Object.defineProperty(proto, \"foo\", {\n get: function () {\n return 0;\n },\n configurable: true\n });\n\n var Con = function () { };\n Con.prototype = proto;\n\n var child = new Con();\n Object.defineProperty(child, \"foo\", {\n value: 10,\n configurable: true\n });\n\n Object.freeze(child);\n\n var desc = Object.getOwnPropertyDescriptor(child, \"foo\");\n\n delete child.foo;\n return child.foo === 10 && desc.configurable === false && desc.writable === false;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.freeze) && fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.9-2-a-4",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.9/15.2.3.9-2-a-4.js",
+ "description": "Object.freeze - 'P' is own accessor property",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n Object.defineProperty(obj, \"foo\", {\n get: function () {\n return 10;\n },\n configurable: true\n });\n\n Object.freeze(obj);\n\n var desc = Object.getOwnPropertyDescriptor(obj, \"foo\");\n\n delete obj.foo;\n return obj.foo === 10 && desc.configurable === false;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.freeze) && fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.9-2-a-5",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.9/15.2.3.9-2-a-5.js",
+ "description": "Object.freeze - 'P' is own accessor property that overrides an inherited data property",
+ "test": "assertTrue((function testcase() {\n\n var proto = {};\n\n proto.foo = 0; // default [[Configurable]] attribute value of foo: true\n\n var Con = function () { };\n Con.prototype = proto;\n\n var child = new Con();\n\n Object.defineProperty(child, \"foo\", {\n get: function () {\n return 10;\n },\n configurable: true\n });\n\n Object.freeze(child);\n\n var desc = Object.getOwnPropertyDescriptor(child, \"foo\");\n\n delete child.foo;\n return child.foo === 10 && desc.configurable === false;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.freeze) && fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.9-2-a-6",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.9/15.2.3.9-2-a-6.js",
+ "description": "Object.freeze - 'P' is own accessor property that overrides an inherited accessor property",
+ "test": "assertTrue((function testcase() {\n var proto = {};\n\n Object.defineProperty(proto, \"foo\", {\n get: function () {\n return 0;\n },\n configurable: true\n });\n\n var Con = function () { };\n Con.prototype = proto;\n\n var child = new Con();\n\n Object.defineProperty(child, \"foo\", {\n get: function () {\n return 10;\n },\n configurable: true\n });\n\n Object.freeze(child);\n\n var desc = Object.getOwnPropertyDescriptor(child, \"foo\");\n\n delete child.foo;\n return child.foo === 10 && desc.configurable === false;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.freeze) && fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.9-2-a-7",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.9/15.2.3.9-2-a-7.js",
+ "description": "Object.freeze - 'P' is own named property of an Arguments object that implements its own [[GetOwnProperty]]",
+ "test": "assertTrue((function testcase() {\n var argObj = (function () { return arguments; }());\n\n argObj.foo = 10; // default [[Configurable]] attribute value of foo: true\n\n Object.freeze(argObj);\n\n var desc = Object.getOwnPropertyDescriptor(argObj, \"foo\");\n\n delete argObj.foo;\n return argObj.foo === 10 && desc.configurable === false && desc.writable === false;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.freeze) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.9-2-a-8",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.9/15.2.3.9-2-a-8.js",
+ "description": "Object.freeze - 'P' is own named property of the String object that implements its own [[GetOwnProperty]]",
+ "test": "assertTrue((function testcase() {\n var strObj = new String(\"abc\");\n\n strObj.foo = 10; // default [[Configurable]] attribute value of foo: true\n\n Object.freeze(strObj);\n\n var desc = Object.getOwnPropertyDescriptor(strObj, \"foo\");\n\n delete strObj.foo;\n return strObj.foo === 10 && desc.configurable === false && desc.writable === false;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.freeze) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.9-2-a-9",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.9/15.2.3.9-2-a-9.js",
+ "description": "Object.freeze - 'P' is own property of the Function object that uses Object's [[GetOwnProperty]]",
+ "test": "assertTrue((function testcase() {\n var funObj = function () { };\n\n funObj.foo = 10; // default [[Configurable]] attribute value of foo: true\n\n Object.freeze(funObj);\n\n var desc = Object.getOwnPropertyDescriptor(funObj, \"foo\");\n\n delete funObj.foo;\n return funObj.foo === 10 && desc.configurable === false && desc.writable === false;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.freeze) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.9-2-b-i-1",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.9/15.2.3.9-2-b-i-1.js",
+ "description": "Object.freeze - The [[Wrtiable]] attribute of own data property of 'O' is set to false while other attributes are unchanged",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n Object.defineProperty(obj, \"foo\", {\n value: 10,\n writable: true,\n enumerable: true,\n configurable: false\n });\n\n Object.freeze(obj);\n var desc = Object.getOwnPropertyDescriptor(obj, \"foo\");\n\n return dataPropertyAttributesAreCorrect(obj, \"foo\", 10, false, true, false) &&\n desc.writable === false && desc.configurable === false;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.freeze) && fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.9-2-b-i-2",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.9/15.2.3.9-2-b-i-2.js",
+ "description": "Object.freeze - The [[Wrtiable]] attribute of all own data property of 'O' is set to false while other attributes are unchanged",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n Object.defineProperty(obj, \"foo1\", {\n value: 10,\n writable: false,\n enumerable: true,\n configurable: false\n });\n\n Object.defineProperty(obj, \"foo2\", {\n value: 20,\n writable: true,\n enumerable: false,\n configurable: false\n });\n\n Object.freeze(obj);\n\n var desc1 = Object.getOwnPropertyDescriptor(obj, \"foo1\");\n var desc2 = Object.getOwnPropertyDescriptor(obj, \"foo2\");\n\n return dataPropertyAttributesAreCorrect(obj, \"foo1\", 10, false, true, false) &&\n dataPropertyAttributesAreCorrect(obj, \"foo2\", 20, false, false, false) &&\n desc1.configurable === false && desc1.writable === false &&\n desc2.configurable === false && desc2.writable === false;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.freeze) && fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.9-2-c-1",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.9/15.2.3.9-2-c-1.js",
+ "description": "Object.freeze - The [[Configurable]] attribute of own data property of 'O' is set to false while other attributes are unchanged",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n Object.defineProperty(obj, \"foo\", {\n value: 10,\n writable: false,\n enumerable: true,\n configurable: true\n });\n\n Object.freeze(obj);\n var desc = Object.getOwnPropertyDescriptor(obj, \"foo\");\n\n return dataPropertyAttributesAreCorrect(obj, \"foo\", 10, false, true, false) &&\n desc.configurable === false && desc.writable === false;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.freeze) && fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.9-2-c-2",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.9/15.2.3.9-2-c-2.js",
+ "description": "Object.freeze - The [[Configurable]] attribute of own accessor property of 'O' is set to false while other attributes are unchanged",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n\n function get_func() {\n return 10;\n }\n\n var resultSetFun = false;\n function set_func() {\n resultSetFun = true;\n }\n\n Object.defineProperty(obj, \"foo\", {\n get: get_func,\n set: set_func,\n enumerable: true,\n configurable: true\n });\n\n Object.freeze(obj);\n var res1 = obj.hasOwnProperty(\"foo\");\n delete obj.foo;\n var res2 = obj.hasOwnProperty(\"foo\");\n var resultConfigurable = (res1 && res2);\n\n var resultGetFun = (obj.foo === 10);\n obj.foo = 12;\n\n var resultEnumerable = false;\n for (var prop in obj) {\n if (prop === \"foo\") {\n resultEnumerable = true;\n }\n }\n\n var desc = Object.getOwnPropertyDescriptor(obj, \"foo\");\n var result = resultConfigurable && resultEnumerable && resultGetFun && resultSetFun;\n\n return desc.configurable === false && result;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.freeze) && fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.9-2-c-3",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.9/15.2.3.9-2-c-3.js",
+ "description": "Object.freeze - The [[Configurable]] attribute of all own data property of 'O' is set to false while other attributes are unchanged",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n var resultSetFun = false;\n\n Object.defineProperty(obj, \"foo1\", {\n value: 10,\n writable: false,\n enumerable: true,\n configurable: true\n });\n\n function get_func() {\n return 10;\n }\n\n function set_func() {\n resultSetFun = true;\n }\n\n Object.defineProperty(obj, \"foo2\", {\n get: get_func,\n set: set_func,\n enumerable: true,\n configurable: true\n });\n\n Object.freeze(obj);\n\n var res1 = obj.hasOwnProperty(\"foo2\");\n delete obj.foo2;\n var res2 = obj.hasOwnProperty(\"foo2\");\n var resultConfigurable = (res1 && res2);\n\n var resultGetFun = (obj.foo2 === 10);\n obj.foo2 = 12;\n\n var resultEnumerable = false;\n for (var prop in obj) {\n if (prop === \"foo2\") {\n resultEnumerable = true;\n }\n }\n\n var desc1 = Object.getOwnPropertyDescriptor(obj, \"foo1\");\n var desc2 = Object.getOwnPropertyDescriptor(obj, \"foo2\");\n\n var result = resultConfigurable && resultEnumerable && resultGetFun && resultSetFun;\n\n return dataPropertyAttributesAreCorrect(obj, \"foo1\", 10, false, true, false) && result &&\n desc1.configurable === false && desc1.writable === false && desc2.configurable === false;\n\n }).call(this));\n",
+ "precondition": "(fnExists(Object.freeze) && fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.9-2-c-4",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.9/15.2.3.9-2-c-4.js",
+ "description": "Object.freeze - all own properties of 'O' are not writable and not configurable",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n var resultSetFun = false;\n\n Object.defineProperty(obj, \"foo1\", {\n value: 10,\n writable: false,\n enumerable: true,\n configurable: false\n });\n\n function get_func() {\n return 10;\n }\n\n function set_func() {\n resultSetFun = true;\n }\n\n Object.defineProperty(obj, \"foo2\", {\n get: get_func,\n set: set_func,\n enumerable: true,\n configurable: true\n });\n\n Object.freeze(obj);\n\n var res1 = obj.hasOwnProperty(\"foo2\");\n delete obj.foo2;\n var res2 = obj.hasOwnProperty(\"foo2\");\n var resultConfigurable = (res1 && res2);\n\n var resultGetFun = (obj.foo2 === 10);\n obj.foo2 = 12;\n\n var resultEnumerable = false;\n for (var prop in obj) {\n if (prop === \"foo2\") {\n resultEnumerable = true;\n }\n }\n\n var desc1 = Object.getOwnPropertyDescriptor(obj, \"foo1\");\n var desc2 = Object.getOwnPropertyDescriptor(obj, \"foo2\");\n\n var result = resultConfigurable && resultEnumerable && resultGetFun && resultSetFun;\n\n return dataPropertyAttributesAreCorrect(obj, \"foo1\", 10, false, true, false) &&\n result && desc1.configurable === false && desc1.writable === false && desc2.configurable === false;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.freeze) && fnExists(Object.defineProperty) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.2.3.9-2-d-1",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.9/15.2.3.9-2-d-1.js",
+ "description": "Object.freeze - 'O' is a Function object",
+ "test": "assertTrue((function testcase() {\n var funObj = function () { };\n\n Object.freeze(funObj);\n\n return Object.isFrozen(funObj);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.freeze) && fnExists(Object.isFrozen))"
+ },
+ {
+ "id": "15.2.3.9-2-d-2",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.9/15.2.3.9-2-d-2.js",
+ "description": "Object.freeze - 'O' is an Array object",
+ "test": "assertTrue((function testcase() {\n var arrObj = [0, 1];\n\n Object.freeze(arrObj);\n\n return Object.isFrozen(arrObj);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.freeze) && fnExists(Object.isFrozen))"
+ },
+ {
+ "id": "15.2.3.9-2-d-3",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.9/15.2.3.9-2-d-3.js",
+ "description": "Object.freeze - 'O' is a String object",
+ "test": "assertTrue((function testcase() {\n var strObj = new String(\"a\");\n\n Object.freeze(strObj);\n\n return Object.isFrozen(strObj);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.freeze) && fnExists(Object.isFrozen))"
+ },
+ {
+ "id": "15.2.3.9-2-d-4",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.9/15.2.3.9-2-d-4.js",
+ "description": "Object.freeze - 'O' is a Boolean object",
+ "test": "assertTrue((function testcase() {\n var boolObj = new Boolean(false);\n\n Object.freeze(boolObj);\n\n return Object.isFrozen(boolObj);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.freeze) && fnExists(Object.isFrozen))"
+ },
+ {
+ "id": "15.2.3.9-2-d-5",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.9/15.2.3.9-2-d-5.js",
+ "description": "Object.freeze - 'O' is a Number object",
+ "test": "assertTrue((function testcase() {\n var numObj = new Number(3);\n\n Object.freeze(numObj);\n\n return Object.isFrozen(numObj);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.freeze) && fnExists(Object.isFrozen))"
+ },
+ {
+ "id": "15.2.3.9-2-d-6",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.9/15.2.3.9-2-d-6.js",
+ "description": "Object.freeze - 'O' is a Date object",
+ "test": "assertTrue((function testcase() {\n var dateObj = new Date();\n\n Object.freeze(dateObj);\n\n return Object.isFrozen(dateObj);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.freeze) && fnExists(Object.isFrozen))"
+ },
+ {
+ "id": "15.2.3.9-2-d-7",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.9/15.2.3.9-2-d-7.js",
+ "description": "Object.freeze - 'O' is a RegExp object",
+ "test": "assertTrue((function testcase() {\n var regObj = new RegExp();\n\n Object.freeze(regObj);\n\n return Object.isFrozen(regObj);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.freeze) && fnExists(Object.isFrozen))"
+ },
+ {
+ "id": "15.2.3.9-2-d-8",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.9/15.2.3.9-2-d-8.js",
+ "description": "Object.freeze - 'O' is an Error object",
+ "test": "assertTrue((function testcase() {\n var errObj = new SyntaxError();\n\n Object.freeze(errObj);\n\n return Object.isFrozen(errObj);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.freeze) && fnExists(Object.isFrozen))"
+ },
+ {
+ "id": "15.2.3.9-2-d-9",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.9/15.2.3.9-2-d-9.js",
+ "description": "Object.freeze - 'O' is the Arguments object",
+ "test": "assertTrue((function testcase() {\n var argObj = (function () { return arguments; } ());\n\n Object.freeze(argObj);\n\n return Object.isFrozen(argObj);\n\n }).call(this));\n",
+ "precondition": "(fnExists(Object.freeze) && fnExists(Object.isFrozen))"
+ },
+ {
+ "id": "15.2.3.9-3-1",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.9/15.2.3.9-3-1.js",
+ "description": "Object.freeze - returned object is not extensible",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n Object.freeze(obj);\n return !Object.isExtensible(obj);\n\n }).call(this));\n",
+ "precondition": "(fnExists(Object.freeze) && fnExists(Object.isExtensible))"
+ },
+ {
+ "id": "15.2.3.9-4-1",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.9/15.2.3.9-4-1.js",
+ "description": "Object.freeze - 'O' is sealed already",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n\n obj.foo = 10; // default value of attributes: writable: true, enumerable: true\n\n Object.seal(obj);\n\n Object.freeze(obj);\n return Object.isFrozen(obj);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.freeze) && fnExists(Object.seal) && fnExists(Object.isFrozen))"
+ },
+ {
+ "id": "15.2.3.9-4-2",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.9/15.2.3.9-4-2.js",
+ "description": "Object.freeze - 'O' is frozen already",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n\n obj.foo = 10; // default value of attributes: writable: true, enumerable: true\n\n Object.freeze(obj);\n\n Object.freeze(obj);\n return Object.isFrozen(obj);\n\n }).call(this));\n",
+ "precondition": "(fnExists(Object.freeze) && fnExists(Object.isFrozen))"
+ },
+ {
+ "id": "15.2.3.9-4-3",
+ "path": "TestCases/chapter15/15.2/15.2.3/15.2.3.9/15.2.3.9-4-3.js",
+ "description": "Object.freeze - the extensions of 'O' is prevented already",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n\n obj.foo = 10; // default value of attributes: writable: true, enumerable: true\n\n Object.preventExtensions(obj);\n\n Object.freeze(obj);\n return Object.isFrozen(obj);\n }).call(this));\n",
+ "precondition": "(fnExists(Object.freeze) && fnExists(Object.isFrozen) && fnExists(Object.preventExtensions))"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.2.3_Properties_of_the_Object_Constructor.json b/website/resources/scripts/testcases2/15.2.3_Properties_of_the_Object_Constructor.json
new file mode 100644
index 000000000..2d6519f07
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.2.3_Properties_of_the_Object_Constructor.json
@@ -0,0 +1,26 @@
+{
+ "testCollection": {
+ "name": "15.2.3_Properties_of_the_Object_Constructor",
+ "numTests": 3,
+ "tests": [
+ {
+ "section": "15.2.3",
+ "description": "Checking existence of the property \"prototype\"",
+ "test": "if(!Object.hasOwnProperty(\"prototype\")){\n $ERROR('#1: The Object constructor has the property \"prototype\"');\n}\n",
+ "id": "S15.2.3_A1"
+ },
+ {
+ "section": "15.2.3, 15.2.4",
+ "description": "Checking Function.prototype.isPrototypeOf(Object)",
+ "test": "// CHECK#\nif (!(Function.prototype.isPrototypeOf(Object))) {\n $ERROR('#1: the value of the internal [[Prototype]] property of the Object constructor is the Function prototype object.');\n}\n",
+ "id": "S15.2.3_A2"
+ },
+ {
+ "section": "15.2.3, 15.2.4",
+ "description": "Checking Object.length",
+ "test": "//CHECK#1\nif(!Object.hasOwnProperty(\"length\")){\n $ERROR('#1: The Object constructor has the property \"length\"');\n}\n\n//CHECK#2\nif (Object.length !== 1) {\n $ERROR('#2: Object.length property value should be 1');\n}\n",
+ "id": "S15.2.3_A3"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.2.4.2.json b/website/resources/scripts/testcases2/15.2.4.2.json
new file mode 100644
index 000000000..389df9604
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.2.4.2.json
@@ -0,0 +1,32 @@
+{
+ "testCollection": {
+ "name": "15.2.4.2",
+ "numTests": 4,
+ "tests": [
+ {
+ "id": "15.2.4.2-1-1",
+ "path": "TestCases/chapter15/15.2/15.2.4/15.2.4.2/15.2.4.2-1-1.js",
+ "description": "Object.prototype.toString - '[object Undefined]' will be returned when 'this' value is undefined",
+ "test": "assertTrue((Object.prototype.toString.call(undefined) === \"[object Undefined]\"));\n"
+ },
+ {
+ "id": "15.2.4.2-1-2",
+ "path": "TestCases/chapter15/15.2/15.2.4/15.2.4.2/15.2.4.2-1-2.js",
+ "description": "Object.prototype.toString - '[object Undefined]' will be returned when 'this' value is undefined",
+ "test": "assertTrue((Object.prototype.toString.apply(undefined, []) === \"[object Undefined]\"));\n"
+ },
+ {
+ "id": "15.2.4.2-2-1",
+ "path": "TestCases/chapter15/15.2/15.2.4/15.2.4.2/15.2.4.2-2-1.js",
+ "description": "Object.prototype.toString - '[object Null]' will be returned when 'this' value is null",
+ "test": "assertTrue((Object.prototype.toString.call(null) === \"[object Null]\"));\n"
+ },
+ {
+ "id": "15.2.4.2-2-2",
+ "path": "TestCases/chapter15/15.2/15.2.4/15.2.4.2/15.2.4.2-2-2.js",
+ "description": "Object.prototype.toString - '[object Null]' will be returned when 'this' value is null",
+ "test": "assertTrue((Object.prototype.toString.apply(null, []) === \"[object Null]\"));\n"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.2.4.2_Object.prototype.toString.json b/website/resources/scripts/testcases2/15.2.4.2_Object.prototype.toString.json
new file mode 100644
index 000000000..0cec67688
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.2.4.2_Object.prototype.toString.json
@@ -0,0 +1,84 @@
+{
+ "testCollection": {
+ "name": "15.2.4.2_Object.prototype.toString",
+ "numTests": 12,
+ "tests": [
+ {
+ "section": "15.2.4.2",
+ "description": "Checking the type of Object.prototype.toString and the returned result",
+ "test": "//CHECK#1\nif (typeof Object.prototype.toString !== \"function\") {\n $ERROR('#1: toString method defined');\n}\n\n//CHECK#2\nif (Object.prototype.toString() !==\"[object \"+\"Object\"+\"]\") {\n $ERROR('#2: return a string value by concatenating the three strings \"[object \", the [[Class]] property of this object, and \"]\"');\n}\n\n//CHECK#3\nif ({}.toString()!==\"[object \"+\"Object\"+\"]\") {\n $ERROR('#3: return a string value by concatenating the three strings \"[object \", the [[Class]] property of this object, and \"]\"');\n}\n",
+ "id": "S15.2.4.2_A1"
+ },
+ {
+ "section": "15.2.4.2",
+ "description": "Checking if varying the Object.prototype.toString.length property fails",
+ "strict_mode_negative": "",
+ "test": "//CHECK#1\nif (!(Object.prototype.toString.hasOwnProperty('length'))) {\n $FAIL('#1: the Object.prototype.toString has length property.');\n}\n\nvar obj = Object.prototype.toString.length;\n\nObject.prototype.toString.length = function(){return \"shifted\";};\n\n//CHECK#2\nif (Object.prototype.toString.length !== obj) {\n $ERROR('#2: the Object.prototype.toString length property has the attributes ReadOnly.');\n}\n",
+ "id": "S15.2.4.2_A10",
+ "strict_only": ""
+ },
+ {
+ "section": "15.2.4.2",
+ "description": "Checking the Object.prototype.toString.length property",
+ "test": "//CHECK#1\nif (!(Object.prototype.toString.hasOwnProperty(\"length\"))) {\n $ERROR('#1: The length property of the toString method is 0');\n}\n\n//CHECK#2\nif (Object.prototype.toString.length !== 0) {\n $ERROR('#2: The length property of the toString method is 0');\n}\n",
+ "id": "S15.2.4.2_A11"
+ },
+ {
+ "section": "15.2.4.2",
+ "test": "if (Object.prototype.toString.call(undefined) !== \"[object Undefined]\") {\n $ERROR('If the this value is undefined, return \"[object Undefined]\".');\n}\n",
+ "id": "S15.2.4.2_A12",
+ "description": "If the this value is undefined, return \"[object Undefined]\"."
+ },
+ {
+ "section": "15.2.4.2",
+ "test": "if (Object.prototype.toString.call(null) !== \"[object Null]\") {\n $ERROR('If the this value is null, return \"[object Null]\".');\n}\n",
+ "id": "S15.2.4.2_A13",
+ "description": "If the this value is null, return \"[object Null]\"."
+ },
+ {
+ "section": "15.2.4.2",
+ "test": "if (Object.prototype.toString.call(33) !== \"[object Number]\") {\n $ERROR('Let O be the result of calling ToObject passing the this ' +\n 'value as the argument.');\n}\n",
+ "id": "S15.2.4.2_A14",
+ "description": "Let O be the result of calling ToObject passing the this value as the argument."
+ },
+ {
+ "section": "15.2.4.2",
+ "test": "if (Object.prototype.toString.call(true) !== \"[object Boolean]\") {\n $ERROR('Let O be the result of calling ToObject passing the this ' +\n 'value as the argument.');\n}\n",
+ "id": "S15.2.4.2_A15",
+ "description": "Let O be the result of calling ToObject passing the this value as the argument."
+ },
+ {
+ "section": "15.2.4.2",
+ "test": "if (Object.prototype.toString.call('foo') !== \"[object String]\") {\n $ERROR('Let O be the result of calling ToObject passing the this ' +\n 'value as the argument.');\n}\n",
+ "id": "S15.2.4.2_A16",
+ "description": "Let O be the result of calling ToObject passing the this value as the argument."
+ },
+ {
+ "section": "15.2.4.2, 13.2",
+ "description": "Checking if obtaining the prototype property of Object.prototype.toString fails",
+ "test": "//CHECK#1\nif (Object.prototype.toString.prototype !== undefined) {\n $ERROR('#1: Object.prototype.toString has not prototype property'+Object.prototype.toString.prototype);\n}\n//\n",
+ "id": "S15.2.4.2_A6"
+ },
+ {
+ "section": "15.2.4.2, 13.2",
+ "description": "Checking if creating \"new Object.prototype.toString\" fails",
+ "test": "var FACTORY = Object.prototype.toString;\n\ntry {\n instance = new FACTORY;\n $FAIL('#1: Object.prototype.toString can\\'t be used as a constructor');\n} catch (e) {\n $PRINT(e);\n}\n",
+ "id": "S15.2.4.2_A7"
+ },
+ {
+ "section": "15.2.4.2",
+ "description": "Checking if enumerating the Object.prototype.toString.length property fails",
+ "test": "//CHECK#0\nif (!(Object.prototype.toString.hasOwnProperty('length'))) {\n $FAIL('#0: the Object.prototype.toString has length property.');\n}\n\n\n// CHECK#1\nif (Object.prototype.toString.propertyIsEnumerable('length')) {\n $ERROR('#1: the Object.prototype.toString.length property has the attributes DontEnum');\n}\n\n// CHECK#2\nfor (var p in Object.prototype.toString){\n if (p===\"length\")\n $ERROR('#2: the Object.prototype.toString.length property has the attributes DontEnum');\n}\n//\n",
+ "id": "S15.2.4.2_A8"
+ },
+ {
+ "section": "15.2.4.2",
+ "description": "Checknig if deleting of the Object.prototype.toString.length property fails",
+ "strict_mode_negative": "",
+ "test": "//CHECK#0\nif (!(Object.prototype.toString.hasOwnProperty('length'))) {\n $FAIL('#0: the Object.prototype.toString has length property');\n}\n\n//CHECK#1\nif (delete Object.prototype.toString.length) {\n $ERROR('#1: The Object.prototype.toString.length property has the attributes DontDelete');\n}\n\n//CHECK#2\nif (!(Object.prototype.toString.hasOwnProperty('length'))) {\n $FAIL('#2: The Object.prototype.toString.length property has the attributes DontDelete');\n}\n",
+ "id": "S15.2.4.2_A9",
+ "strict_only": ""
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.2.4.3_Object.prototype.toLocaleString.json b/website/resources/scripts/testcases2/15.2.4.3_Object.prototype.toLocaleString.json
new file mode 100644
index 000000000..fc705f68e
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.2.4.3_Object.prototype.toLocaleString.json
@@ -0,0 +1,66 @@
+{
+ "testCollection": {
+ "name": "15.2.4.3_Object.prototype.toLocaleString",
+ "numTests": 9,
+ "tests": [
+ {
+ "section": "15.2.4.3",
+ "description": "Checking the type of Object.prototype.toLocaleString and the returned result",
+ "test": "//CHECK#1\nif (typeof Object.prototype.toLocaleString !== \"function\") {\n $ERROR('#1: toLocaleString method defined');\n}\n\n//CHECK#2\nif (Object.prototype.toLocaleString() !== Object.prototype.toString()) {\n $ERROR('#1: toLocaleString function returns the result of calling toString()');\n}\n\n//CHECK#2\nif ({}.toLocaleString()!=={}.toString()) {\n $ERROR('#2: toLocaleString function returns the result of calling toString()');\n}\n",
+ "id": "S15.2.4.3_A1"
+ },
+ {
+ "section": "15.2.4.3",
+ "description": "Checking if varying the Object.prototype.toLocaleString.length property fails",
+ "test": "//CHECK#1\nif (!(Object.prototype.toLocaleString.hasOwnProperty('length'))) {\n $FAIL('#1: the Object.prototype.toLocaleString has length property.');\n}\n\nvar obj = Object.prototype.toLocaleString.length;\n\nObject.prototype.toLocaleString.length = function(){return \"shifted\";};\n\n//CHECK#2\nif (Object.prototype.toLocaleString.length !== obj) {\n $ERROR('#2: the Object.prototype.toLocaleString length property has the attributes ReadOnly.');\n}\n",
+ "id": "S15.2.4.3_A10"
+ },
+ {
+ "section": "15.2.4.3",
+ "description": "Checking the Object.prototype.toLocaleString.length",
+ "test": "//CHECK#1\nif (!(Object.prototype.toLocaleString.hasOwnProperty(\"length\"))) {\n $ERROR('#1: The length property of the toLocaleString method is 0');\n}\n\n//CHECK#2\nif (Object.prototype.toLocaleString.length !== 0) {\n $ERROR('#2: The length property of the toLocaleString method is 0');\n}\n",
+ "id": "S15.2.4.3_A11"
+ },
+ {
+ "section": "15.2.4.3",
+ "negative": "",
+ "test": "Object.prototype.toLocaleString.call(undefined);\n",
+ "id": "S15.2.4.3_A12",
+ "description": "Let O be the result of calling ToObject passing the this value as the argument."
+ },
+ {
+ "section": "15.2.4.3",
+ "negative": "",
+ "test": "Object.prototype.toLocaleString.call(null);\n",
+ "id": "S15.2.4.3_A13",
+ "description": "Let O be the result of calling ToObject passing the this value as the argument."
+ },
+ {
+ "section": "15.2.4.3, 13.2",
+ "description": "Checking if obtaining the prototype property of Object.prototype.toLocaleString fails",
+ "test": "//CHECK#1\nif (Object.prototype.toLocaleString.prototype !== undefined) {\n $ERROR('#1: Object.prototype.toLocaleString has not prototype property'+Object.prototype.toLocaleString.prototype);\n}\n//\n",
+ "id": "S15.2.4.3_A6"
+ },
+ {
+ "section": "15.2.4.3, 13.2",
+ "description": "Checking if creating \"new Object.prototype.toLocaleString\" fails",
+ "test": "var FACTORY = Object.prototype.toLocaleString;\n\ntry {\n instance = new FACTORY;\n $FAIL('#1: Object.prototype.toLocaleString can\\'t be used as a constructor');\n} catch (e) {\n $PRINT(e);\n\n}\n",
+ "id": "S15.2.4.3_A7"
+ },
+ {
+ "section": "15.2.4.3",
+ "description": "Checking if enumerating the Object.prototype.toLocaleString.length property fails",
+ "test": "//CHECK#0\nif (!(Object.prototype.toLocaleString.hasOwnProperty('length'))) {\n $FAIL('#0: the Object.prototype.toLocaleString has length property.');\n}\n\n\n// CHECK#1\nif (Object.prototype.toLocaleString.propertyIsEnumerable('length')) {\n $ERROR('#1: the Object.prototype.toLocaleString.length property has the attributes DontEnum');\n}\n\n// CHECK#2\nfor (p in Object.prototype.toLocaleString){\n if (p===\"length\")\n $ERROR('#2: the Object.prototype.toLocaleString.length property has the attributes DontEnum');\n}\n//\n",
+ "id": "S15.2.4.3_A8"
+ },
+ {
+ "section": "15.2.4.3",
+ "description": "Checknig if deleting of the Object.prototype.toLocaleString.length property fails",
+ "strict_mode_negative": "",
+ "test": "//CHECK#0\nif (!(Object.prototype.toLocaleString.hasOwnProperty('length'))) {\n $FAIL('#0: the Object.prototype.toLocaleString has length property');\n}\n\n//CHECK#1\nif (delete Object.prototype.toLocaleString.length) {\n $ERROR('#1: The Object.prototype.toLocaleString.length property has the attributes DontDelete');\n}\n\n//CHECK#2\nif (!(Object.prototype.toLocaleString.hasOwnProperty('length'))) {\n $FAIL('#2: The Object.prototype.toLocaleString.length property has the attributes DontDelete');\n}\n",
+ "id": "S15.2.4.3_A9",
+ "strict_only": ""
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.2.4.4_Object.prototype.valueOf.json b/website/resources/scripts/testcases2/15.2.4.4_Object.prototype.valueOf.json
new file mode 100644
index 000000000..649d3ae55
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.2.4.4_Object.prototype.valueOf.json
@@ -0,0 +1,109 @@
+{
+ "testCollection": {
+ "name": "15.2.4.4_Object.prototype.valueOf",
+ "numTests": 16,
+ "tests": [
+ {
+ "section": "15.2.4.4",
+ "description": "Checking if varying the Object.prototype.valueOf.length property fails",
+ "test": "//CHECK#1\nif (!(Object.prototype.valueOf.hasOwnProperty('length'))) {\n $FAIL('#1: the Object.prototype.valueOf has length property.');\n}\n\nvar obj = Object.prototype.valueOf.length;\n\nObject.prototype.valueOf.length = function(){return \"shifted\";};\n\n//CHECK#2\nif (Object.prototype.valueOf.length !== obj) {\n $ERROR('#2: the Object.prototype.valueOf length property has the attributes ReadOnly.');\n}\n",
+ "id": "S15.2.4.4_A10"
+ },
+ {
+ "section": "15.2.4.4",
+ "description": "Checking the Object.prototype.valueOf.length",
+ "test": "//CHECK#1\nif (!(Object.prototype.valueOf.hasOwnProperty(\"length\"))) {\n $ERROR('#1: The length property of the toObject method is 0');\n}\n\n//CHECK#2\nif (Object.prototype.valueOf.length !== 0) {\n $ERROR('#2: The length property of the toObject method is 0');\n}\n",
+ "id": "S15.2.4.4_A11"
+ },
+ {
+ "section": "15.2.4.4",
+ "description": "Checking Object.prototype.valueOf invoked by the 'call' property.",
+ "negative": "",
+ "test": "Object.prototype.valueOf.call(undefined);\n",
+ "id": "S15.2.4.4_A12"
+ },
+ {
+ "section": "15.2.4.4",
+ "description": "Checking Object.prototype.valueOf invoked by the 'call' property.",
+ "negative": "",
+ "test": "Object.prototype.valueOf.call(null);\n",
+ "id": "S15.2.4.4_A13"
+ },
+ {
+ "section": "15.2.4.4",
+ "description": "Checking Object.prototype.valueOf invoked by the 'call' property.",
+ "negative": "",
+ "test": "(1,Object.prototype.valueOf)();\n",
+ "id": "S15.2.4.4_A14"
+ },
+ {
+ "section": "15.2.4.4",
+ "description": "\"this\" value is a number",
+ "test": "//CHECK#1\nif (typeof Object.prototype.valueOf !== \"function\") {\n $ERROR('#1: valueOf method defined');\n}\n\nvar obj=new Object(1.1);\n\n//CHECK#2\nif (typeof obj.valueOf !== \"function\") {\n $ERROR('#2: valueOf method accessed');\n}\n\n//CHECK#3\nif (obj.valueOf()!==1.1) {\n $ERROR('#3: The valueOf method returns its this value');\n}\n\n",
+ "id": "S15.2.4.4_A1_T1"
+ },
+ {
+ "section": "15.2.4.4",
+ "description": "\"this\" value is a boolean",
+ "test": "//CHECK#1\nif (typeof Object.prototype.valueOf !== \"function\") {\n $ERROR('#1: valueOf method defined');\n}\n\nvar obj=new Object(true);\n\n//CHECK#2\nif (typeof obj.valueOf !== \"function\") {\n $ERROR('#2: valueOf method accessed');\n}\n\n//CHECK#3\nif (obj.valueOf()!==true) {\n $ERROR('#3: The valueOf method returns its this value');\n}\n\n",
+ "id": "S15.2.4.4_A1_T2"
+ },
+ {
+ "section": "15.2.4.4",
+ "description": "\"this\" value is a string",
+ "test": "//CHECK#1\nif (typeof Object.prototype.valueOf !== \"function\") {\n $ERROR('#1: valueOf method defined');\n}\n\nvar obj=new Object(\"greenfield\");\n\n//CHECK#2\nif (typeof obj.valueOf !== \"function\") {\n $ERROR('#2: valueOf method accessed');\n}\n\n//CHECK#3\nif (obj.valueOf()!==\"greenfield\") {\n $ERROR('#3: The valueOf method returns its this value');\n}\n\n",
+ "id": "S15.2.4.4_A1_T3"
+ },
+ {
+ "section": "15.2.4.4",
+ "description": "\"this\" value is an object",
+ "test": "//CHECK#1\nif (typeof Object.prototype.valueOf !== \"function\") {\n $ERROR('#1: valueOf method defined');\n}\n\nvar obj=new Object;\n\n//CHECK#2\nif (typeof obj.valueOf !== \"function\") {\n $ERROR('#2: valueOf method accessed');\n}\n\n//CHECK#3\nif (obj.valueOf()!==obj) {\n $ERROR('#3: The valueOf method returns its this value');\n}\n\n",
+ "id": "S15.2.4.4_A1_T4"
+ },
+ {
+ "section": "15.2.4.4",
+ "description": "\"this\" value is \"null\"",
+ "test": "//CHECK#1\nif (typeof Object.prototype.valueOf !== \"function\") {\n $ERROR('#1: valueOf method defined');\n}\n\nvar obj=new Object(null);\n\n//CHECK#2\nif (typeof obj.valueOf !== \"function\") {\n $ERROR('#2: valueOf method accessed');\n}\n\n//CHECK#3\nif (obj.valueOf()!==obj) {\n $ERROR('#3: The valueOf method returns its this value');\n}\n\n",
+ "id": "S15.2.4.4_A1_T5"
+ },
+ {
+ "section": "15.2.4.4",
+ "description": "\"this\" value is \"undefined\"",
+ "test": "//CHECK#1\nif (typeof Object.prototype.valueOf !== \"function\") {\n $ERROR('#1: valueOf method defined');\n}\n\nvar obj=new Object(undefined);\n\n//CHECK#2\nif (typeof obj.valueOf !== \"function\") {\n $ERROR('#2: valueOf method accessed');\n}\n\n//CHECK#3\nif (obj.valueOf()!==obj) {\n $ERROR('#3: The valueOf method returns its this value');\n}\n\n",
+ "id": "S15.2.4.4_A1_T6"
+ },
+ {
+ "section": "15.2.4.4",
+ "description": "\"this\" value is \"void 0\"",
+ "test": "//CHECK#1\nif (typeof Object.prototype.valueOf !== \"function\") {\n $ERROR('#1: valueOf method defined');\n}\n\nvar obj=new Object(void 0);\n\n//CHECK#2\nif (typeof obj.valueOf !== \"function\") {\n $ERROR('#2: valueOf method accessed');\n}\n\n//CHECK#3\nif (obj.valueOf()!==obj) {\n $ERROR('#3: The valueOf method returns its this value');\n}\n\n",
+ "id": "S15.2.4.4_A1_T7"
+ },
+ {
+ "section": "15.2.4.4, 13.2",
+ "description": "Checking if obtaining the prototype property of Object.prototype.valueOf fails",
+ "test": "//CHECK#1\nif (Object.prototype.valueOf.prototype !== undefined) {\n $ERROR('#1: Object.prototype.valueOf has not prototype property'+Object.prototype.valueOf.prototype);\n}\n//\n",
+ "id": "S15.2.4.4_A6"
+ },
+ {
+ "section": "15.2.4.4, 13.2",
+ "description": "Checking if creating \"new Object.prototype.valueOf\" fails",
+ "test": "var FACTORY = Object.prototype.valueOf;\n\ntry {\n instance = new FACTORY;\n $FAIL('#1: Object.prototype.valueOf can\\'t be used as a constructor');\n} catch (e) {\n $PRINT(e);\n\n}\n",
+ "id": "S15.2.4.4_A7"
+ },
+ {
+ "section": "15.2.4.4",
+ "description": "Checking if enumerating the Object.prototype.valueOf.length property fails",
+ "test": "//CHECK#0\nif (!(Object.prototype.valueOf.hasOwnProperty('length'))) {\n $FAIL('#0: the Object.prototype.valueOf has length property.');\n}\n\n\n// CHECK#1\nif (Object.prototype.valueOf.propertyIsEnumerable('length')) {\n $ERROR('#1: the Object.prototype.valueOf.length property has the attributes DontEnum');\n}\n\n// CHECK#2\nfor (p in Object.prototype.valueOf){\n if (p===\"length\")\n $ERROR('#2: the Object.prototype.valueOf.length property has the attributes DontEnum');\n}\n//\n",
+ "id": "S15.2.4.4_A8"
+ },
+ {
+ "section": "15.2.4.4",
+ "description": "Checknig if deleting of the Object.prototype.valueOf.length property fails",
+ "strict_mode_negative": "",
+ "test": "//CHECK#0\nif (!(Object.prototype.valueOf.hasOwnProperty('length'))) {\n $FAIL('#0: the Object.prototype.valueOf has length property');\n}\n\n//CHECK#1\nif (delete Object.prototype.valueOf.length) {\n $ERROR('#1: The Object.prototype.valueOf.length property has the attributes DontDelete');\n}\n\n//CHECK#2\nif (!(Object.prototype.valueOf.hasOwnProperty('length'))) {\n $FAIL('#2: The Object.prototype.valueOf.length property has the attributes DontDelete');\n}\n",
+ "id": "S15.2.4.4_A9",
+ "strict_only": ""
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.2.4.5_Object.prototype.hasOwnProperty.json b/website/resources/scripts/testcases2/15.2.4.5_Object.prototype.hasOwnProperty.json
new file mode 100644
index 000000000..236e158f7
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.2.4.5_Object.prototype.hasOwnProperty.json
@@ -0,0 +1,76 @@
+{
+ "testCollection": {
+ "name": "15.2.4.5_Object.prototype.hasOwnProperty",
+ "numTests": 11,
+ "tests": [
+ {
+ "section": "15.2.4.5",
+ "description": "Checking if varying the Object.prototype.hasOwnProperty.length property fails",
+ "test": "//CHECK#1\nif (!(Object.prototype.hasOwnProperty.hasOwnProperty('length'))) {\n $FAIL('#1: the Object.prototype.hasOwnProperty has length property.');\n}\n\nvar obj = Object.prototype.hasOwnProperty.length;\n\nObject.prototype.hasOwnProperty.length = function(){return \"shifted\";};\n\n//CHECK#2\nif (Object.prototype.hasOwnProperty.length !== obj) {\n $ERROR('#2: the Object.prototype.hasOwnProperty length property has the attributes ReadOnly.');\n}\n",
+ "id": "S15.2.4.5_A10"
+ },
+ {
+ "section": "15.2.4.5",
+ "description": "Checking the Object.prototype.hasOwnProperty.length",
+ "test": "//CHECK#1\nif (!(Object.prototype.hasOwnProperty.hasOwnProperty(\"length\"))) {\n $ERROR('#1: The length property of the toObject method is 1');\n}\n\n//CHECK#2\nif (Object.prototype.hasOwnProperty.length !== 1) {\n $ERROR('#2: The length property of the toObject method is 1');\n}\n",
+ "id": "S15.2.4.5_A11"
+ },
+ {
+ "section": "15.2.4.5",
+ "negative": "",
+ "test": "Object.prototype.hasOwnProperty.call(undefined, 'foo');\n",
+ "id": "S15.2.4.5_A12",
+ "description": "Let O be the result of calling ToObject passing the this value as the argument."
+ },
+ {
+ "section": "15.2.4.5",
+ "negative": "",
+ "test": "Object.prototype.hasOwnProperty.call(null, 'foo');\n",
+ "id": "S15.2.4.5_A13",
+ "description": "Let O be the result of calling ToObject passing the this value as the argument."
+ },
+ {
+ "section": "15.2.4.5",
+ "description": "Checking type of the Object.prototype.hasOwnProperty and the returned result",
+ "test": "//CHECK#1\nif (typeof Object.prototype.hasOwnProperty !== \"function\") {\n $ERROR('#1: hasOwnProperty method is defined');\n}\n\n//CHECK#2\nif (!(Object.prototype.hasOwnProperty(\"hasOwnProperty\"))) {\n $ERROR('#2: hasOwnProperty method works properly');\n}\n//\n",
+ "id": "S15.2.4.5_A1_T1"
+ },
+ {
+ "section": "15.2.4.5",
+ "description": "Argument of the hasOwnProperty method is a custom boolean property",
+ "test": "//CHECK#1\nif (typeof Object.prototype.hasOwnProperty !== \"function\") {\n $ERROR('#1: hasOwnProperty method is defined');\n}\n\nvar obj = {the_property:true};\n\n//CHECK#2\nif (typeof obj.hasOwnProperty !== \"function\") {\n $ERROR('#2: hasOwnProperty method is accessed');\n}\n\n//CHECK#3\nif (obj.hasOwnProperty(\"hasOwnProperty\")) {\n $ERROR('#3: hasOwnProperty method works properly');\n}\n\n//CHECK#4\nif (!(obj.hasOwnProperty(\"the_property\"))) {\n $ERROR('#4: hasOwnProperty method works properly');\n}\n//\n",
+ "id": "S15.2.4.5_A1_T2"
+ },
+ {
+ "section": "15.2.4.5",
+ "description": "Argument of the hasOwnProperty method is a custom property of a function object",
+ "test": "var FACTORY = function(){\n this.aproperty = 1;\n};\n\nvar instance = new FACTORY;\n\n//CHECK#1\nif (typeof Object.prototype.hasOwnProperty !== \"function\") {\n $ERROR('#1: hasOwnProperty method is defined');\n}\n\n//CHECK#2\nif (typeof instance.hasOwnProperty !== \"function\") {\n $ERROR('#2: hasOwnProperty method is accessed');\n}\n\n//CHECK#3\nif (instance.hasOwnProperty(\"toString\")) {\n $ERROR('#3: hasOwnProperty method works properly');\n}\n\n//CHECK#4\nif (!(instance.hasOwnProperty(\"aproperty\"))) {\n $ERROR('#4: hasOwnProperty method works properly');\n}\n\n",
+ "id": "S15.2.4.5_A1_T3"
+ },
+ {
+ "section": "15.2.4.5, 13.2",
+ "description": "Checking if obtaining the prototype property of Object.prototype.hasOwnProperty fails",
+ "test": "//CHECK#1\nif (Object.prototype.hasOwnProperty.prototype !== undefined) {\n $ERROR('#1: Object.prototype.hasOwnProperty has not prototype property'+Object.prototype.hasOwnProperty.prototype);\n}\n//\n",
+ "id": "S15.2.4.5_A6"
+ },
+ {
+ "section": "15.2.4.5, 13.2",
+ "description": "Checking if creating \"new Object.prototype.hasOwnProperty\" fails",
+ "test": "var FACTORY = Object.prototype.hasOwnProperty;\n\ntry {\n instance = new FACTORY;\n $FAIL('#1: Object.prototype.hasOwnProperty can\\'t be used as a constructor');\n} catch (e) {\n $PRINT(e);\n\n}\n",
+ "id": "S15.2.4.5_A7"
+ },
+ {
+ "section": "15.2.4.5",
+ "description": "Checking if enumerating the Object.prototype.hasOwnProperty.length property fails",
+ "test": "//CHECK#0\nif (!(Object.prototype.hasOwnProperty.hasOwnProperty('length'))) {\n $FAIL('#0: the Object.prototype.hasOwnProperty has length property.');\n}\n\n\n// CHECK#1\nif (Object.prototype.hasOwnProperty.propertyIsEnumerable('length')) {\n $ERROR('#1: the Object.prototype.hasOwnProperty.length property has the attributes DontEnum');\n}\n\n// CHECK#2\nfor (p in Object.prototype.hasOwnProperty){\n if (p===\"length\")\n $ERROR('#2: the Object.prototype.hasOwnProperty.length property has the attributes DontEnum');\n}\n//\n",
+ "id": "S15.2.4.5_A8"
+ },
+ {
+ "section": "15.2.4.5",
+ "description": "Checking if deleting the Object.prototype.hasOwnProperty.length property fails",
+ "test": "//CHECK#0\nif (!(Object.prototype.hasOwnProperty.hasOwnProperty('length'))) {\n $FAIL('#0: the Object.prototype.hasOwnProperty has length property');\n}\n\n//CHECK#1\nif (delete Object.prototype.hasOwnProperty.length) {\n $ERROR('#1: The Object.prototype.hasOwnProperty.length property has the attributes DontDelete');\n}\n\n//CHECK#2\nif (!(Object.prototype.hasOwnProperty.hasOwnProperty('length'))) {\n $FAIL('#2: The Object.prototype.hasOwnProperty.length property has the attributes DontDelete');\n}\n",
+ "id": "S15.2.4.5_A9"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.2.4.6_Object.prototype.isPrototypeOf.json b/website/resources/scripts/testcases2/15.2.4.6_Object.prototype.isPrototypeOf.json
new file mode 100644
index 000000000..f5f10a29c
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.2.4.6_Object.prototype.isPrototypeOf.json
@@ -0,0 +1,66 @@
+{
+ "testCollection": {
+ "name": "15.2.4.6_Object.prototype.isPrototypeOf",
+ "numTests": 9,
+ "tests": [
+ {
+ "section": "15.2.4.6",
+ "description": "Creating two objects with the same prototype",
+ "test": "function USER_FACTORY( name ) {\n this.name = name;\n this.getName=function(){return name;};\n}\n\n\nfunction FORCEDUSER_FACTORY( name, grade ) {\n this.name = name;\n this.grade = grade;\n this.getGrade=function(){return grade;};\n}\n\nvar proto = new USER_FACTORY(\"noname\");\n\nFORCEDUSER_FACTORY.prototype = proto;\n\nvar luke = new FORCEDUSER_FACTORY(\"Luke Skywalker\", 12);\n//////\n// CHECK#1\nif(proto.isPrototypeOf(luke)){\n $PRINT('#1: Native ECMAScript objects have an internal property called [[Prototype]].');\n} else {\n $ERROR('#1: native ECMAScript objects have an internal property called [[Prototype]].');\n}\n//\n/////////\n//////\n// CHECK#2\nif(USER_FACTORY.prototype.isPrototypeOf(luke)){\n $PRINT('#2: Native ECMAScript objects have an internal property called [[Prototype]].');\n} else {\n $ERROR('#2: native ECMAScript objects have an internal property called [[Prototype]].');\n}\n//\n/////////\n//////\n// CHECK#3\nif(Number.isPrototypeOf(luke)){\n $ERROR('#2: Native ECMAScript objects have an internal property called [[Prototype]].');\n}\n//\n/////////\n",
+ "id": "S15.2.4.6_A1"
+ },
+ {
+ "section": "15.2.4.6",
+ "description": "Checking if varying the Object.prototype.isPrototypeOf.length property fails",
+ "strict_mode_negative": "",
+ "test": "//CHECK#1\nif (!(Object.prototype.isPrototypeOf.hasOwnProperty('length'))) {\n $FAIL('#1: the Object.prototype.isPrototypeOf has length property');\n}\n\nvar obj = Object.prototype.isPrototypeOf.length;\n\nObject.prototype.isPrototypeOf.length = function(){return \"shifted\";};\n\n//CHECK#2\nif (Object.prototype.isPrototypeOf.length !== obj) {\n $ERROR('#2: the Object.prototype.isPrototypeOf length property has the attributes ReadOnly');\n}\n",
+ "id": "S15.2.4.6_A10",
+ "strict_only": ""
+ },
+ {
+ "section": "15.2.4.6",
+ "description": "Checking the Object.prototype.hasOwnProperty.length",
+ "test": "//CHECK#1\nif (!(Object.prototype.isPrototypeOf.hasOwnProperty(\"length\"))) {\n $ERROR('#1: the Object.prototype.isPrototypeOf has length property');\n}\n\n//CHECK#2\nif (Object.prototype.isPrototypeOf.length !== 1) {\n $ERROR('#2: The length property of the toObject method is 1');\n}\n",
+ "id": "S15.2.4.6_A11"
+ },
+ {
+ "section": "15.2.4.6",
+ "negative": "",
+ "test": "Object.prototype.isPrototypeOf.call(undefined, {});\n",
+ "id": "S15.2.4.6_A12",
+ "description": "Let O be the result of calling ToObject passing the this value as the argument."
+ },
+ {
+ "section": "15.2.4.6",
+ "negative": "",
+ "test": "Object.prototype.isPrototypeOf.call(null, {});\n",
+ "id": "S15.2.4.6_A13",
+ "description": "Let O be the result of calling ToObject passing the this value as the argument."
+ },
+ {
+ "section": "15.2.4.6, 13.2",
+ "description": "Checking if obtaining the prototype property of Object.prototype.isPrototypeOf fails",
+ "test": "//CHECK#1\nif (Object.prototype.isPrototypeOf.prototype !== undefined) {\n $ERROR('#1: Object.prototype.isPrototypeOf has not prototype property'+Object.prototype.isPrototypeOf.prototype);\n}\n//\n",
+ "id": "S15.2.4.6_A6"
+ },
+ {
+ "section": "15.2.4.6, 13.2",
+ "description": "Checking if creating new \"Object.prototype.isPrototypeOf\" fails",
+ "test": "var FACTORY = Object.prototype.isPrototypeOf;\n\ntry {\n instance = new FACTORY;\n $FAIL('#1: Object.prototype.isPrototypeOf can\\'t be used as a constructor');\n} catch (e) {\n $PRINT(e);\n\n}\n",
+ "id": "S15.2.4.6_A7"
+ },
+ {
+ "section": "15.2.4.6",
+ "description": "Checknig if enumerating the Object.prototype.isPrototypeOf.length property fails",
+ "test": "//CHECK#0\nif (!(Object.prototype.isPrototypeOf.hasOwnProperty('length'))) {\n $FAIL('#0: the Object.prototype.isPrototypeOf has length property');\n}\n\n\n// CHECK#1\nif (Object.prototype.isPrototypeOf.propertyIsEnumerable('length')) {\n $ERROR('#1: the Object.prototype.isPrototypeOf.length property has the attributes DontEnum');\n}\n\n// CHECK#2\nfor (p in Object.prototype.isPrototypeOf){\n if (p===\"length\")\n $ERROR('#2: the Object.prototype.isPrototypeOf.length property has the attributes DontEnum');\n}\n//\n",
+ "id": "S15.2.4.6_A8"
+ },
+ {
+ "section": "15.2.4.6",
+ "description": "Checking deleting the Object.prototype.isPrototypeOf.length property fails",
+ "test": "//CHECK#0\nif (!(Object.prototype.isPrototypeOf.hasOwnProperty('length'))) {\n $FAIL('#0: the Object.prototype.isPrototypeOf has length property');\n}\n\n//CHECK#1\nif (delete Object.prototype.isPrototypeOf.length) {\n $ERROR('#1: The Object.prototype.isPrototypeOf.length property has the attributes DontDelete');\n}\n//\n",
+ "id": "S15.2.4.6_A9"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.2.4.7_Object.prototype.propertyIsEnumerable.json b/website/resources/scripts/testcases2/15.2.4.7_Object.prototype.propertyIsEnumerable.json
new file mode 100644
index 000000000..767b84232
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.2.4.7_Object.prototype.propertyIsEnumerable.json
@@ -0,0 +1,78 @@
+{
+ "testCollection": {
+ "name": "15.2.4.7_Object.prototype.propertyIsEnumerable",
+ "numTests": 11,
+ "tests": [
+ {
+ "section": "15.2.4.7",
+ "description": "Checking if varying the Object.prototype.propertyIsEnumerable.length property fails",
+ "strict_mode_negative": "",
+ "test": "//CHECK#1\nif (!(Object.prototype.propertyIsEnumerable.hasOwnProperty('length'))) {\n $FAIL('#1: the Object.prototype.propertyIsEnumerable has length property');\n}\n\nvar obj = Object.prototype.propertyIsEnumerable.length;\n\nObject.prototype.propertyIsEnumerable.length = function(){return \"shifted\";};\n\n//CHECK#2\nif (Object.prototype.propertyIsEnumerable.length !== obj) {\n $ERROR('#2: the Object.prototype.propertyIsEnumerable length property has the attributes ReadOnly');\n}\n",
+ "id": "S15.2.4.7_A10",
+ "strict_only": ""
+ },
+ {
+ "section": "15.2.4.7",
+ "description": "Checking the value of Object.prototype.hasOwnProperty.length",
+ "test": "//CHECK#1\nif (!(Object.prototype.propertyIsEnumerable.hasOwnProperty(\"length\"))) {\n $ERROR('#1: the Object.prototype.propertyIsEnumerable has length property');\n}\n\n//CHECK#2\nif (Object.prototype.propertyIsEnumerable.length !== 1) {\n $ERROR('#2: The length property of the toObject method is 1');\n}\n",
+ "id": "S15.2.4.7_A11"
+ },
+ {
+ "section": "15.2.4.7",
+ "negative": "",
+ "test": "Object.prototype.propertyIsEnumerable.call(undefined, 'foo');\n",
+ "id": "S15.2.4.7_A12",
+ "description": "Let O be the result of calling ToObject passing the this value as the argument."
+ },
+ {
+ "section": "15.2.4.7",
+ "negative": "",
+ "test": "Object.prototype.propertyIsEnumerable.call(null, 'foo');\n",
+ "id": "S15.2.4.7_A13",
+ "description": "Let O be the result of calling ToObject passing the this value as the argument."
+ },
+ {
+ "section": "15.2.4.7",
+ "description": "Calling the propertyIsEnumerable method for object in the prototype chain",
+ "test": "//CHECK#1\nif (typeof Object.prototype.propertyIsEnumerable !== \"function\") {\n $ERROR('#1: propertyIsEnumerable method is defined');\n}\n\nvar proto={rootprop:\"avis\"};\n\nfunction AVISFACTORY(name){this.name=name};\n\nAVISFACTORY.prototype = proto;\n\nvar seagull= new AVISFACTORY(\"seagull\");\n\n//CHECK#2\nif (typeof seagull.propertyIsEnumerable !== \"function\") {\n $ERROR('#2: propertyIsEnumerable method is accessed');\n}\n\n//CHECK#3\nif (!(seagull.propertyIsEnumerable(\"name\"))) {\n $ERROR('#3: propertyIsEnumerable method works properly');\n}\n\n//CHECK#4\nif (seagull.propertyIsEnumerable(\"rootprop\")) {\n $ERROR('#4: propertyIsEnumerable method does not consider objects in the prototype chain');\n}\n//\n",
+ "id": "S15.2.4.7_A1_T1"
+ },
+ {
+ "section": "15.2.4.7",
+ "description": "Checking the type of Object.prototype.propertyIsEnumerable and the returned result",
+ "test": "//CHECK#1\nif (typeof Object.prototype.propertyIsEnumerable !== \"function\") {\n $ERROR('#1: hasOwnProperty method is defined');\n}\n\n//CHECK#2\nif (Object.prototype.propertyIsEnumerable(\"propertyIsEnumerable\")) {\n $ERROR('#2: hasOwnProperty method works properly');\n}\n//\n",
+ "id": "S15.2.4.7_A2_T1"
+ },
+ {
+ "section": "15.2.4.7",
+ "description": "Argument of the propertyIsEnumerable method is a custom boolean property",
+ "test": "//CHECK#1\nif (typeof Object.prototype.propertyIsEnumerable !== \"function\") {\n $ERROR('#1: propertyIsEnumerable method is defined');\n}\n\nvar obj = {the_property:true};\n\n//CHECK#2\nif (typeof obj.propertyIsEnumerable !== \"function\") {\n $ERROR('#2: propertyIsEnumerable method is accessed');\n}\n\n//CHECK#3\nif (!(obj.propertyIsEnumerable(\"the_property\"))) {\n $ERROR('#3: propertyIsEnumerable method works properly');\n}\n\n//CHECK#4\nvar accum=\"\";\nfor(var prop in obj) {\n accum+=prop;\n}\nif (accum.indexOf(\"the_property\")!==0) {\n $ERROR('#4: enumerating works properly');\n}\n//\n",
+ "id": "S15.2.4.7_A2_T2"
+ },
+ {
+ "section": "15.2.4.7, 13.2",
+ "description": "Checking if obtaining the prototype property of Object.prototype.propertyIsEnumerable fails",
+ "test": "//CHECK#1\nif (Object.prototype.propertyIsEnumerable.prototype !== undefined) {\n $ERROR('#1: Object.prototype.propertyIsEnumerable has not prototype property'+Object.prototype.propertyIsEnumerable.prototype);\n}\n//\n",
+ "id": "S15.2.4.7_A6"
+ },
+ {
+ "section": "15.2.4.7, 13.2",
+ "description": "Checking if creating \"new Object.prototype.propertyIsEnumerable\" fails",
+ "test": "var FACTORY = Object.prototype.propertyIsEnumerable;\n\ntry {\n instance = new FACTORY;\n $FAIL('#1: Object.prototype.propertyIsEnumerable can\\'t be used as a constructor');\n} catch (e) {\n $PRINT(e);\n\n}\n",
+ "id": "S15.2.4.7_A7"
+ },
+ {
+ "section": "15.2.4.7",
+ "description": "Checking if enumerating the Object.prototype.propertyIsEnumerable.length property fails",
+ "test": "//CHECK#0\nif (!(Object.prototype.propertyIsEnumerable.hasOwnProperty('length'))) {\n $FAIL('#0: the Object.prototype.propertyIsEnumerable has length property');\n}\n\n\n// CHECK#1\nif (Object.prototype.propertyIsEnumerable.propertyIsEnumerable('length')) {\n $ERROR('#1: the Object.prototype.propertyIsEnumerable.length property has the attributes DontEnum');\n}\n\n// CHECK#2\nfor (p in Object.prototype.propertyIsEnumerable){\n if (p===\"length\")\n $ERROR('#2: the Object.prototype.propertyIsEnumerable.length property has the attributes DontEnum');\n}\n//\n",
+ "id": "S15.2.4.7_A8"
+ },
+ {
+ "section": "15.2.4.7",
+ "description": "Checking if deleting the Object.prototype.propertyIsEnumerable.length property fails",
+ "test": "//CHECK#0\nif (!(Object.prototype.propertyIsEnumerable.hasOwnProperty('length'))) {\n $FAIL('#0: the Object.prototype.propertyIsEnumerable has length property');\n}\n\n//CHECK#1\nif (delete Object.prototype.propertyIsEnumerable.length) {\n $ERROR('#1: The Object.prototype.propertyIsEnumerable.length property has the attributes DontDelete');\n}\n//\n",
+ "id": "S15.2.4.7_A9"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.2.4_Properties_of_the_Object_Prototype_Object.json b/website/resources/scripts/testcases2/15.2.4_Properties_of_the_Object_Prototype_Object.json
new file mode 100644
index 000000000..3abc4b4c6
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.2.4_Properties_of_the_Object_Prototype_Object.json
@@ -0,0 +1,50 @@
+{
+ "testCollection": {
+ "name": "15.2.4_Properties_of_the_Object_Prototype_Object",
+ "numTests": 7,
+ "tests": [
+ {
+ "section": "15.2.4.1",
+ "description": "Checking the Object.prototype.constructor",
+ "test": "//CHECK#1\nif (Object.prototype.constructor !== Object) {\n $ERROR('#1: The initial value of Object.prototype.constructor is the built-in Object constructor');\n}\n",
+ "id": "S15.2.4.1_A1_T1"
+ },
+ {
+ "section": "15.2.4.1",
+ "description": "Creating \"new Object.prototype.constructor\" and checking its properties",
+ "test": "var constr = Object.prototype.constructor;\n\nvar obj = new constr;\n\n// CHECK#0\nif (obj === undefined) {\n $ERROR('#0: new Object() return the newly created native object.');\n}\n\n// CHECK#1\nif (obj.constructor !== Object) {\n $ERROR('#1: new Object() create a new native ECMAScript object');\n}\n\n// CHECK#2\nif (!(Object.prototype.isPrototypeOf(obj))) {\n $ERROR('#2: when new Object() calls the [[Prototype]] property of the newly constructed object is set to the Object prototype object.');\n}\n\n// CHECK#3\nvar to_string_result = '[object '+ 'Object' +']';\nif (obj.toString() !== to_string_result) {\n $ERROR('#3: when new Object() calls the [[Class]] property of the newly constructed object is set to \"Object\".');\n}\n\n// CHECK#4\nif (obj.valueOf().toString() !== to_string_result) {\n $ERROR('#4: when new Object() calls the newly constructed object has no [[Value]] property.');\n}\n",
+ "id": "S15.2.4.1_A1_T2"
+ },
+ {
+ "section": "15.2.4, 8.6.2",
+ "description": "Checking if obtaining Object.prototype.prototype fails",
+ "test": "// CHECK#1\nif (Object.prototype.prototype !== undefined) {\n $ERROR('#1: Object prototype has not prototype');\n}\n",
+ "id": "S15.2.4_A1_T1"
+ },
+ {
+ "section": "15.2.4, 8.6.2",
+ "description": "Since the Object prototype object has not prototype, deleted toString method can not be found in prototype chain",
+ "test": "//CHECK#1\nif (Object.prototype.toString() == false) {\n $ERROR('#1: Object prototype object has not prototype');\n}\n\ndelete Object.prototype.toString;\n\n// CHECK#2\ntry {\n Object.prototype.toString();\n $ERROR('#2: Object prototype object has not prototype');\n} catch (e) {\n if ((e instanceof TypeError) !== true) {\n $ERROR('#1.1: delete Object.prototype.toString; Object.prototype.toString() throw a TypeError. Actual: ' + (e)); \n }\n}\n//\n",
+ "id": "S15.2.4_A1_T2"
+ },
+ {
+ "section": "15.2.4",
+ "description": "Getting the value of the internal [[Class]] property with Object.prototype.toString() function",
+ "test": "var tostr = Object.prototype.toString();\n\n//CHECK#1\nif (tostr !== \"[object Object]\") {\n $ERROR('#1: the value of the internal [[Class]] property of Object prototype object is \"Object\"');\n}\n",
+ "id": "S15.2.4_A2"
+ },
+ {
+ "section": "15.2.4",
+ "description": "Checking if calling Object prototype as a function fails",
+ "test": "//CHECK#1\ntry {\n Object.prototype();\n $FAIL('#1: Since Object prototype object is not function it has not [[call]] method');\n} catch (e) {\n $PRINT(e);\n}\n",
+ "id": "S15.2.4_A3"
+ },
+ {
+ "section": "15.2.4",
+ "description": "Checking if creating \"new Object.prototype\" fails",
+ "test": "//CHECK#1\ntry {\n instance = new Object.prototype;\n $FAIL('#1: Since Object prototype object is not function it has not [[create]] method');\n} catch (e) {\n $PRINT(e);\n}\n",
+ "id": "S15.2.4_A4"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.2_Object_Objects.json b/website/resources/scripts/testcases2/15.2_Object_Objects.json
new file mode 100644
index 000000000..f2c74d6fe
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.2_Object_Objects.json
@@ -0,0 +1,14 @@
+{
+ "testCollection": {
+ "name": "15.2_Object_Objects",
+ "numTests": 1,
+ "tests": [
+ {
+ "section": "15.2",
+ "description": "Checking if Object equals to this.Object",
+ "test": "var obj=Object;\n\nvar thisobj=this.Object;\n\nif(obj!==thisobj){\n $ERROR('Object is the property of global');\n}\n",
+ "id": "S15.2_A1"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.3.2.1.json b/website/resources/scripts/testcases2/15.3.2.1.json
new file mode 100644
index 000000000..d3853e2df
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.3.2.1.json
@@ -0,0 +1,92 @@
+{
+ "testCollection": {
+ "name": "15.3.2.1",
+ "numTests": 12,
+ "tests": [
+ {
+ "id": "15.3.2.1-11-1-s",
+ "path": "TestCases/chapter15/15.3/15.3.2/15.3.2.1/15.3.2.1-11-1-s.js",
+ "description": "Duplicate seperate parameter name in Function constructor throws SyntaxError in strict mode",
+ "test": "assertTrue((function testcase() { \n try {\n Function('a','a','\"use strict\";');\n return false;\n }\n catch (e) {\n return (e instanceof SyntaxError);\n }\n \n }).call(this));\n",
+ "precondition": "(fnSupportsStrict())",
+ "strict_only": ""
+ },
+ {
+ "id": "15.3.2.1-11-1",
+ "path": "TestCases/chapter15/15.3/15.3.2/15.3.2.1/15.3.2.1-11-1.js",
+ "description": "Duplicate separate parameter name in Function constructor allowed if body not strict",
+ "test": "assertTrue((function testcase()\n{ \n Function('a','a','return;');\n return true;\n }).call(this));\n"
+ },
+ {
+ "id": "15.3.2.1-11-2-s",
+ "path": "TestCases/chapter15/15.3/15.3.2/15.3.2.1/15.3.2.1-11-2-s.js",
+ "description": "Duplicate seperate parameter name in Function constructor called from strict mode allowed if body not strict",
+ "test": "assertTrue((function testcase()\n{ \n \"use strict\"; \n try {\n Function('a','a','return;');\n return true;\n } catch (e) {\n return false;\n }\n }).call(this));\n",
+ "strict_only": ""
+ },
+ {
+ "id": "15.3.2.1-11-3-s",
+ "path": "TestCases/chapter15/15.3/15.3.2/15.3.2.1/15.3.2.1-11-3-s.js",
+ "description": "Function constructor having a formal parameter named 'eval' throws SyntaxError if function body is strict mode",
+ "test": "assertTrue((function testcase() {\n \n\n try {\n Function('eval', '\"use strict\";');\n\treturn false;\n }\n catch (e) {\n return (e instanceof SyntaxError);\n }\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict())",
+ "strict_only": ""
+ },
+ {
+ "id": "15.3.2.1-11-3",
+ "path": "TestCases/chapter15/15.3/15.3.2/15.3.2.1/15.3.2.1-11-3.js",
+ "description": "Function constructor may have a formal parameter named 'eval' if body is not strict mode",
+ "test": "assertTrue((function testcase() {\n Function('eval', 'return;');\n return true;\n }).call(this));\n"
+ },
+ {
+ "id": "15.3.2.1-11-4-s",
+ "path": "TestCases/chapter15/15.3/15.3.2/15.3.2.1/15.3.2.1-11-4-s.js",
+ "description": "Function constructor call from strict code with formal parameter named 'eval' does not throws SyntaxError if function body is not strict mode",
+ "test": "assertTrue((function testcase() {\n \"use strict\";\n try { \n Function('eval', 'return;');\n\t return true;\n } catch (e) {\n return false;\n }\n \n }).call(this));\n",
+ "strict_only": ""
+ },
+ {
+ "id": "15.3.2.1-11-5-s",
+ "path": "TestCases/chapter15/15.3/15.3.2/15.3.2.1/15.3.2.1-11-5-s.js",
+ "description": "Duplicate combined parameter name in Function constructor throws SyntaxError in strict mode",
+ "test": "assertTrue((function testcase()\n{ \n try \n {\n Function('a,a','\"use strict\";');\n\treturn false;\n }\n catch (e) {\n return(e instanceof SyntaxError);\n }\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict())",
+ "strict_only": ""
+ },
+ {
+ "id": "15.3.2.1-11-5",
+ "path": "TestCases/chapter15/15.3/15.3.2/15.3.2.1/15.3.2.1-11-5.js",
+ "description": "Duplicate combined parameter name in Function constructor allowed if body is not strict",
+ "test": "assertTrue((function testcase()\n{ \n Function('a,a','return;');\n return true;\n }).call(this));\n"
+ },
+ {
+ "id": "15.3.2.1-11-6-s",
+ "path": "TestCases/chapter15/15.3/15.3.2/15.3.2.1/15.3.2.1-11-6-s.js",
+ "description": "Duplicate combined parameter name allowed in Function constructor called in strict mode if body not strict",
+ "test": "assertTrue((function testcase()\n{ \n \"use strict\"; \n try {\n Function('a,a','return a;');\n\t return true;\n } catch (e) {\n return false;\n }\n \n }).call(this));\n",
+ "strict_only": ""
+ },
+ {
+ "id": "15.3.2.1-11-7-s",
+ "path": "TestCases/chapter15/15.3/15.3.2/15.3.2.1/15.3.2.1-11-7-s.js",
+ "description": "Function constructor call from strict code with formal parameter named arguments does not throws SyntaxError if function body is not strict mode",
+ "test": "assertTrue((function testcase() {\n \"use strict\";\n try {\n Function('arguments', 'return;');\n return true;\n\t \n } catch (e) {\n return false;\n }\n }).call(this));\n",
+ "strict_only": ""
+ },
+ {
+ "id": "15.3.2.1-11-8-s",
+ "path": "TestCases/chapter15/15.3/15.3.2/15.3.2.1/15.3.2.1-11-8-s.js",
+ "description": "Strict Mode - SyntaxError is not thrown if a function is created using a Function constructor that has two identical parameters, which are separated by a unique parameter name and there is no explicit 'use strict' in the function constructor's body",
+ "test": "assertTrue((function testcase() {\n \"use strict\";\n\n var foo = new Function(\"baz\", \"qux\", \"baz\", \"return 0;\");\n return true;\n\n }).call(this));\n",
+ "strict_only": ""
+ },
+ {
+ "id": "15.3.2.1-11-9-s",
+ "path": "TestCases/chapter15/15.3/15.3.2/15.3.2.1/15.3.2.1-11-9-s.js",
+ "description": "Strict Mode - SyntaxError is thrown if a function is created using the Function constructor that has three identical parameters and there is no explicit 'use strict' in the function constructor's body",
+ "test": "assertTrue((function testcase() {\n \"use strict\";\n\n var foo = new Function(\"baz\", \"baz\", \"baz\", \"return 0;\");\n return true;\n }).call(this));\n",
+ "strict_only": ""
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.3.2_The_Function_Constructor.json b/website/resources/scripts/testcases2/15.3.2_The_Function_Constructor.json
new file mode 100644
index 000000000..17bc9f685
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.3.2_The_Function_Constructor.json
@@ -0,0 +1,218 @@
+{
+ "testCollection": {
+ "name": "15.3.2_The_Function_Constructor",
+ "numTests": 35,
+ "tests": [
+ {
+ "section": "15.3.2.1, 13.2",
+ "description": ": The body of the function is \"{toString:function(){throw 7;}}\";",
+ "test": "var body = {toString:function(){throw 7;}}\n\n//CHECK#1\ntry {\n var f = new Function(body);\n $FAIL('#1: When the Function constructor is called with one argument then body be that argument the following step are taken: call ToString(body)');\n} catch (e) {\n if (e !== 7) {\n \t$ERROR('#1.1: When the Function constructor is called with one argument then body be that argument the following step are taken: call ToString(body)');\n }\n}\n",
+ "id": "S15.3.2.1_A1_T1"
+ },
+ {
+ "section": "15.3.2.1, 13.2",
+ "description": "Value of the function constructor argument is \"null\"",
+ "test": "//CHECK#1\ntry {\n var f = new Function(null);\n} catch (e) {\n $FAIL('#1: test fails with error '+e);\n}\n\n//CHECK#2\nif (f.constructor !== Function) {\n $ERROR('#2: When the Function constructor is called with one argument then body be that argument and creates a new Function object as specified in 13.2');\n}\n\n//CHECK#3\nif (f() !== undefined) {\n $ERROR('#3: When the Function constructor is called with one argument then body be that argument the following steps are taken...');\n}\n",
+ "id": "S15.3.2.1_A1_T10"
+ },
+ {
+ "section": "15.3.2.1, 13.2",
+ "description": "Value of the function constructor argument is \"undefined\"",
+ "test": "//CHECK#1\ntry {\n var f = new Function(undefined);\n} catch (e) {\n $FAIL('#1: test failed with error '+e);\n}\n\n//CHECK#2\nif (f.constructor !== Function) {\n $ERROR('#2: When the Function constructor is called with one argument then body be that argument and creates a new Function object as specified in 13.2');\n}\n\n//CHECK#3\nif (f() !== undefined) {\n $ERROR('#3: When the Function constructor is called with one argument then body be that argument the following steps are taken...');\n}\n",
+ "id": "S15.3.2.1_A1_T11"
+ },
+ {
+ "section": "15.3.2.1, 13.2",
+ "description": "Value of the function constructor argument is \"void 0\"",
+ "test": "//CHECK#1\ntry {\n var f = new Function(void 0);\n} catch (e) {\n $FAIL('#1: test failed with error '+e);\n}\n\n//CHECK#2\nif (f.constructor !== Function) {\n $ERROR('#2: When the Function constructor is called with one argument then body be that argument and creates a new Function object as specified in 13.2');\n}\n\n//CHECK#3\nif (f()!==undefined) {\n $ERROR('#3: When the Function constructor is called with one argument then body be that argument the following steps are taken...');\n}\n",
+ "id": "S15.3.2.1_A1_T12"
+ },
+ {
+ "section": "15.3.2.1, 13.2",
+ "description": "Value of the function constructor argument is \"{}\"",
+ "test": "//CHECK#1\ntry {\n var f = new Function({});\n $FAIL('#1: test failed with error '+e);\n} catch (e) {\n if (!(e instanceof SyntaxError)) {\n \t$ERROR('#1.1: If body is not parsable as FunctionBody then throw a SyntaxError exception');\n }\n}\n",
+ "id": "S15.3.2.1_A1_T13"
+ },
+ {
+ "section": "15.3.2.1, 13.2",
+ "description": ": The body of the function is \"{toString:function(){return \"return 1;\";}}\";",
+ "test": "var body={toString:function(){return \"return 1;\";}};\n\n//CHECK#1\ntry {\n var f = new Function(body);\t\n} catch (e) {\n $FAIL('#1: test failed with error '+e);\n}\n\n//CHECK#2\nif (f.constructor !== Function) {\n $ERROR('#2: When the Function constructor is called with one argument then body be that argument and creates a new Function object as specified in 13.2');\n}\n\n//CHECK#3\nif (f()!==1) {\n $ERROR('#3: hen the Function constructor is called with one argument then body be that argument the following steps are taken...');\n}\n",
+ "id": "S15.3.2.1_A1_T2"
+ },
+ {
+ "section": "15.3.2.1, 13.2",
+ "description": "Value of the function constructor argument is 1",
+ "test": "//CHECK#1\ntry {\n var f = new Function(1);\n} catch (e) {\n $FAIL('#1: test failed with error '+e);\n}\n\n//CHECK#2\nif (f.constructor !== Function) {\n $ERROR('#2: When the Function constructor is called with one argument then body be that argument and creates a new Function object as specified in 13.2');\n}\n\n//CHECK#3\nif (f()!==undefined) {\n $ERROR('#3: When the Function constructor is called with one argument then body be that argument the following steps are taken...');\n}\n",
+ "id": "S15.3.2.1_A1_T3"
+ },
+ {
+ "section": "15.3.2.1, 13.2",
+ "description": "Value of the function constructor argument is x, where x is specified with \"undefined\"",
+ "test": "//CHECK#1\ntry {\n var f = new Function(x);\n} catch (e) {\n $FAIL('#1: test failed with error '+e);\n}\n\n//CHECK#2\nif (f.constructor !== Function) {\n $ERROR('#2: When the Function constructor is called with one argument then body be that argument and creates a new Function object as specified in 13.2');\n}\n\n//CHECK#3\nif (f()!==undefined) {\n $ERROR('#3: When the Function constructor is called with one argument then body be that argument the following steps are taken...');\n}\n\nvar x;\n",
+ "id": "S15.3.2.1_A1_T4"
+ },
+ {
+ "section": "15.3.2.1, 13.2",
+ "description": "Value of the function constructor argument is \"Object(\"return \\'A\\'\")\"",
+ "test": "var body = Object(\"return \\'A\\'\");\n\n//CHECK#1\ntry {\n var f = new Function(body);\n} catch (e) {\n $FAIL('#1: test failed with error '+e);\n}\n\n//CHECK#2\nif (f.constructor !== Function) {\n $ERROR('#2: When the Function constructor is called with one argument then body be that argument and creates a new Function object as specified in 13.2');\n}\n\n//CHECK#3\nif (f()!==\"\\u0041\") {\n $ERROR('#3: When the Function constructor is called with one argument then body be that argument the following steps are taken...');\n}\n",
+ "id": "S15.3.2.1_A1_T5"
+ },
+ {
+ "section": "15.3.2.1, 13.2",
+ "description": ": Value of the function constructor argument is the string \"return true;\";",
+ "test": "//CHECK#1\ntry {\n var f = new Function(\"return true;\");\n} catch (e) {\n $FAIL('#1: test failed with error '+e);\n}\n\n//CHECK#2\nif (f.constructor !== Function) {\n $ERROR('#2: When the Function constructor is called with one argument then body be that argument and creates a new Function object as specified in 13.2');\n}\n\n//CHECK#3\nif (!(f())) {\n $ERROR('#3: When the Function constructor is called with one argument then body be that argument the following steps are taken...');\n}\n",
+ "id": "S15.3.2.1_A1_T6"
+ },
+ {
+ "section": "15.3.2.1, 13.2",
+ "description": "Value of the function constructor argument is \"Object(1)\"",
+ "test": "var body = new Object(1);\n\n//CHECK#1\ntry {\n var f = new Function(body);\n} catch (e) {\n $FAIL('#1: test failed with error '+e);\n}\n\n//CHECK#2\nif (f.constructor !== Function) {\n $ERROR('#2: When the Function constructor is called with one argument then body be that argument and creates a new Function object as specified in 13.2');\n}\n\n//CHECK#3\nif (f()!==undefined) {\n $ERROR('#3: When the Function constructor is called with one argument then body be that argument the following steps are taken...');\n}\n",
+ "id": "S15.3.2.1_A1_T7"
+ },
+ {
+ "section": "15.3.2.1, 13.2",
+ "description": ": Value of the function constructor argument is \"var 1=1;\";",
+ "test": "var body = \"var 1=1;\";\n\n//CHECK#1\ntry {\n var f = new Function(body);\n $FAIL('#1: If body is not parsable as FunctionBody then throw a SyntaxError exception');\n} catch (e) {\n if (!(e instanceof SyntaxError)) {\n \t$ERROR('#1.1: If body is not parsable as FunctionBody then throw a SyntaxError exception');\n }\n}\n",
+ "id": "S15.3.2.1_A1_T8"
+ },
+ {
+ "section": "15.3.2.1",
+ "description": ": Value of the function constructor argument is \"return arguments[0];\";",
+ "test": "var f = new Function(\"return arguments[0];\");\n\n//CHECK#1\nif (!(f instanceof Function)) {\n $ERROR('#3: When the Function constructor is called with one argument then body be that argument and the following steps are taken...');\n}\n\n//CHECK#2\nif (f(\"A\") !== \"A\") {\n $ERROR('#2: When the Function constructor is called with one argument then body be that argument and the following steps are taken...');\n}\n",
+ "id": "S15.3.2.1_A1_T9"
+ },
+ {
+ "section": "15.3.2.1",
+ "description": ": Values of the function constructor arguments are \"arg1\", \"arg2\", \"arg3\", \"return arg1+arg2+arg3;\";",
+ "test": "//CHECK#1\ntry {\n var f = Function(\"arg1\", \"arg2\", \"arg3\", \"return arg1+arg2+arg3;\");\n} catch (e) {\n $FAIL('#1: test failed');\n}\n\n//CHECK#2\nif (!(f instanceof Function)){\n $ERROR('#2: It is permissible but not necessary to have one argument for each formal parameter to be specified');\n}\n\n//CHECK#3\nif (f(1,2,3) !== 6) {\n $ERROR('#3: It is permissible but not necessary to have one argument for each formal parameter to be specified');\n}\n",
+ "id": "S15.3.2.1_A2_T1"
+ },
+ {
+ "section": "15.3.2.1",
+ "description": ": Values of the function constructor arguments are \"arg1, arg2\", \"arg3\", \"return arg1+arg2+arg3;\";",
+ "test": "//CHECK#1\ntry {\n var f = Function(\"arg1, arg2\", \"arg3\", \"return arg1+arg2+arg3;\");\n} catch (e) {\n $FAIL('#1: test failed');\n}\n\n//CHECK#2\nif (!(f instanceof Function)){\n $ERROR('#2: It is permissible but not necessary to have one argument for each formal parameter to be specified');\n}\n\n//CHECK#3\nif (f(\"AB\",\"BA\",1) !== \"ABBA1\") {\n $ERROR('#3: It is permissible but not necessary to have one argument for each formal parameter to be specified');\n}\n",
+ "id": "S15.3.2.1_A2_T2"
+ },
+ {
+ "section": "15.3.2.1",
+ "description": ": Values of the function constructor arguments are \"arg1, arg2, arg3\", \"return arg1+arg2+arg3;\";",
+ "test": "//CHECK#1\ntry {\n var f = Function(\"arg1, arg2, arg3\", \"return arg1+arg2+arg3;\");\n} catch (e) {\n $FAIL('#1: test failed');\n}\n\n//CHECK#2\nif (!(f instanceof Function)){\n $ERROR('#2: It is permissible but not necessary to have one argument for each formal parameter to be specified');\n}\n\n//CHECK#3\nif (f(1,1,\"ABBA\") !== \"2ABBA\") {\n $ERROR('#3: It is permissible but not necessary to have one argument for each formal parameter to be specified');\n}\n",
+ "id": "S15.3.2.1_A2_T3"
+ },
+ {
+ "section": "15.3.2.1",
+ "description": "Values of the function constructor arguments are \"return\"-s of various results",
+ "test": "var i=0;\n\nvar p={toString:function(){return \"arg\"+(++i);}};\n\n//CHECK#1\ntry {\n var f = Function(p, p, p, \"return arg1+arg2+arg3;\");\n} catch (e) {\n $FAIL('#1: test failed');\n}\n\n//CHECK#2\nif (!(f instanceof Function)){\n $ERROR('#2: It is permissible but not necessary to have one argument for each formal parameter to be specified');\n}\n\n//CHECK#3\nif (f(4,\"2\",\"QUESTION\") !== \"42QUESTION\") {\n $ERROR('#3: It is permissible but not necessary to have one argument for each formal parameter to be specified');\n}\n ",
+ "id": "S15.3.2.1_A2_T4"
+ },
+ {
+ "section": "15.3.2.1",
+ "description": "Values of the function constructor arguments are \"return\"-s of various results and a concotenation of strings",
+ "test": "var i=0;\n\nvar p={toString:function(){return \"arg\"+(++i)}};\n\n//CHECK#1\ntry {\n var f = Function(p+\",\"+p,p, \"return arg1+arg2+arg3;\");\n} catch (e) {\n $FAIL('#1: test failed');\n}\n\n//CHECK#2\nif (!(f instanceof Function)){\n $ERROR('#2: It is permissible but not necessary to have one argument for each formal parameter to be specified');\n}\n\n//CHECK#3\nif (f(\"\",1,2) !== \"12\") {\n $ERROR('#3: It is permissible but not necessary to have one argument for each formal parameter to be specified');\n}\n",
+ "id": "S15.3.2.1_A2_T5"
+ },
+ {
+ "section": "15.3.2.1",
+ "description": "Values of the function constructor arguments are \"return\"-s of various results and a concotenation of strings",
+ "test": "var i=0;\n\nvar p={toString:function(){return \"arg\"+(++i)}};\n\n//CHECK#1\ntry {\n var f = Function(p+\",\"+p+\",\"+p, \"return arg1+arg2+arg3;\");\n} catch (e) {\n $FAIL('#1: test failed');\n}\n\n//CHECK#2\nif (!(f instanceof Function)){\n $ERROR('#2: It is permissible but not necessary to have one argument for each formal parameter to be specified');\n}\n\n//CHECK#3\nif (f(\"\",1,p) !== \"1arg4\") {\n $ERROR('#3: It is permissible but not necessary to have one argument for each formal parameter to be specified');\n}\n",
+ "id": "S15.3.2.1_A2_T6"
+ },
+ {
+ "section": "15.3.2.1, 13.2",
+ "description": ": Values of the function constructor arguments are \"{toString:function(){throw 1;}}\" and \"{toString:function(){throw 'body';}}\";",
+ "test": "var p = {toString:function(){throw 1;}};\nvar body = {toString:function(){throw \"body\";}};\n\n//CHECK#1\ntry {\n var f = new Function(p,body);\n $FAIL('#1: test failed');\n} catch (e) {\n if (e !== 1) {\n \t$ERROR('#1.1: i) Let Result(i) be the first argument; ii) Let P be ToString(Result(i))');\n }\n}\n\n\n",
+ "id": "S15.3.2.1_A3_T1"
+ },
+ {
+ "section": "15.3.2.1, 13.2",
+ "description": ": Values of the function constructor arguments are \"{toString:function(){return \"z;x\"}}\" and \"return this;\";",
+ "test": "var body = \"return this;\";\nvar p={toString:function(){return \"z;x\"}};\n\n//CHECK#1\ntry {\n var f = new Function(p,body);\n $FAIL('#1: If P is not parsable as a FormalParameterList_opt then throw a SyntaxError exception');\n} catch (e) {\n if (!(e instanceof SyntaxError)) {\n \t$ERROR('#1.1: If P is not parsable as a FormalParameterList_opt then throw a SyntaxError exception');\n }\n}\n",
+ "id": "S15.3.2.1_A3_T10"
+ },
+ {
+ "section": "15.3.2.1, 13.2",
+ "description": "Values of the function constructor arguments are \"a,b,c\" and \"void 0\"",
+ "test": "var p = \"a,b,c\";\n\n//CHECK#1\ntry {\n var f = new Function(p, void 0);\n} catch (e) {\n $FAIL('#1: test failed with error '+e);\n}\n\n//CHECK#2\nif (f.constructor !== Function) {\n $ERROR('#2: When the Function constructor is called with arguments p, body creates a new Function object as specified in 13.2');\n}\n\n//CHECK#3\nif (f()!==undefined) {\n $ERROR('#3: When the Function constructor is called with arguments p, body the following steps are taken...');\n}\n",
+ "id": "S15.3.2.1_A3_T11"
+ },
+ {
+ "section": "15.3.2.1, 13.2",
+ "description": "Values of the function constructor arguments are \"a,b,c\" and \"undefined\"",
+ "test": "var p = \"a,b,c\";\n\n//CHECK#1\ntry {\n var f = new Function(p, undefined);\n} catch (e) {\n $FAIL('#1: test failed with error '+e);\n}\n\n//CHECK#2\nif (f.constructor !== Function) {\n $ERROR('#2: When the Function constructor is called with arguments p, body creates a new Function object as specified in 13.2');\n}\n\n//CHECK#3\nif (f()!==undefined) {\n $ERROR('#3: When the Function constructor is called with arguments p, body the following steps are taken...');\n}\n",
+ "id": "S15.3.2.1_A3_T12"
+ },
+ {
+ "section": "15.3.2.1, 13.2",
+ "description": "Values of the function constructor arguments are \"a,b,c\" and \"null\"",
+ "test": "var p = \"a,b,c\";\n\n//CHECK#1\ntry {\n var f = new Function(p, null);\n} catch (e) {\n $FAIL('#1: test failed with error '+e);\n}\n\n//CHECK#2\nif (f.constructor !== Function) {\n $ERROR('#2: When the Function constructor is called with arguments p, body creates a new Function object as specified in 13.2');\n}\n\n//CHECK#3\nif (f()!==undefined) {\n $ERROR('#3: When the Function constructor is called with arguments p, body the following steps are taken...');\n}\n",
+ "id": "S15.3.2.1_A3_T13"
+ },
+ {
+ "section": "15.3.2.1, 13.2",
+ "description": "Values of the function constructor arguments are \"a,b,c\" and an undefined variable",
+ "test": "var p = \"a,b,c\";\n\n//CHECK#1\ntry {\n var f = new Function(p, body);\n} catch (e) {\n $FAIL('#1: test failed with error '+e);\n}\n\n//CHECK#2\nif (f.constructor !== Function) {\n $ERROR('#2: When the Function constructor is called with arguments p, body creates a new Function object as specified in 13.2');\n}\n\n//CHECK#3\nif (f()!==undefined) {\n $ERROR('#3: When the Function constructor is called with arguments p, body the following steps are taken...');\n}\n\nvar body;\n",
+ "id": "S15.3.2.1_A3_T14"
+ },
+ {
+ "section": "15.3.2.1, 13.2",
+ "description": "Values of the function constructor arguments are are two empty strings",
+ "test": "//CHECK#1\ntry {\n var f = new Function(\"\", \"\");\n} catch (e) {\n $FAIL('#1: test failed with error '+e);\n}\n\n//CHECK#2\nif (f.constructor !== Function) {\n $ERROR('#2: When the Function constructor is called with arguments p, body creates a new Function object as specified in 13.2');\n}\n\n//CHECK#3\nif (f()!==undefined) {\n $ERROR('#3: When the Function constructor is called with arguments p, body the following steps are taken...');\n}\n",
+ "id": "S15.3.2.1_A3_T15"
+ },
+ {
+ "section": "15.3.2.1, 13.2",
+ "description": ": Values of the function constructor arguments are \"{toString:function(){return 'a';}}\" and \"return a;\";",
+ "test": "var p = {toString:function(){return \"a\";}};\nvar body = \"return a;\";\n\n//CHECK#1\ntry {\n var f = new Function(p,body);\n} catch (e) {\n $FAIL('#1: test failed with error '+e);\n}\n\n//CHECK#2\nif (f.constructor !== Function) {\n $ERROR('#2: When the Function constructor is called with arguments p, body creates a new Function object as specified in 13.2');\n}\n\n//CHECK#3\nif (f(42)!==42) {\n $ERROR('#3: When the Function constructor is called with arguments p, body creates a new Function object as specified in 13.2');\n}\n\n\n",
+ "id": "S15.3.2.1_A3_T2"
+ },
+ {
+ "section": "15.3.2.1, 13.2",
+ "description": ": Values of the function constructor arguments are \"{toString:function(){p=1;return \"a\";}}\" and \"{toString:function(){throw \"body\";}}\";",
+ "test": "var p = {toString:function(){p=1;return \"a\";}};\nvar body = {toString:function(){throw \"body\";}};\n\n//CHECK#1\ntry {\n var f = new Function(p,body);\n $FAIL('#1: test failed');\n} catch (e) {\n if (e !== \"body\") {\n \t$ERROR('#1.1: i) Let Result(i) be the first argument; ii) Let P be ToString(Result(i))');\n }\n}\n\n//CHECK#2\nif (p !== 1) {\n $ERROR('#2: i) Let Result(i) be the first argument; ii) Let P be ToString(Result(i))');\n}\n\n\n\n",
+ "id": "S15.3.2.1_A3_T3"
+ },
+ {
+ "section": "15.3.2.1, 13.2",
+ "description": ": Values of the function constructor arguments are an undefined variable and \"return 1.1;\";",
+ "test": "var body = \"return 1.1;\";\n\n//CHECK#1\ntry {\n var f = new Function(p,body);\n} catch (e) {\n $FAIL('#1: test failed with error '+e);\n}\n\n//CHECK#2\nif (f.constructor !== Function) {\n $ERROR('#2: When the Function constructor is called with one argument then body be that argument and creates a new Function object as specified in 13.2');\n}\n\n//CHECK#3\nif (f()!==1.1) {\n $ERROR('#3: When the Function constructor is called with one argument then body be that argument the following steps are taken...');\n}\n\nvar p;",
+ "id": "S15.3.2.1_A3_T4"
+ },
+ {
+ "section": "15.3.2.1, 13.2",
+ "description": ": Values of the function constructor arguments are \"void 0\" and \"return \\\"A\\\";\";",
+ "test": "var body = \"return \\\"A\\\";\";\n\n//CHECK#1\ntry {\n var f = new Function(void 0,body);\n} catch (e) {\n $FAIL('#1: test failed with error '+e);\n}\n\n//CHECK#2\nif (f.constructor !== Function) {\n $ERROR('#2: When the Function constructor is called with one argument then body be that argument and creates a new Function object as specified in 13.2');\n}\n\n//CHECK#3\nif (f()!=='\\u0041') {\n $ERROR('#3: When the Function constructor is called with one argument then body be that argument the following steps are taken...');\n}\n\n\n",
+ "id": "S15.3.2.1_A3_T5"
+ },
+ {
+ "section": "15.3.2.1, 13.2",
+ "description": ": Values of the function constructor arguments are \"null\" and \"return true;\";",
+ "test": "var body = \"return true;\";\n\n//CHECK#1\ntry {\n var f = new Function(null,body);\n $FAIL('#1: If P is not parsable as a FormalParameterList_opt then throw a SyntaxError exception');\n} catch (e) {\n if (!(e instanceof SyntaxError)) {\n \t$ERROR('#1.1: If P is not parsable as a FormalParameterList_opt then throw a SyntaxError exception');\n }\n}",
+ "id": "S15.3.2.1_A3_T6"
+ },
+ {
+ "section": "15.3.2.1, 13.2",
+ "description": ": Values of the function constructor arguments are \"Object(\"a\")\" and \"return a;\";",
+ "test": "var body = \"return a;\";\n\nvar p=Object(\"a\");\n\n//CHECK#1\ntry {\n var f = new Function(p, body);\n} catch (e) {\n $FAIL('#1: test failed with error '+e);\n}\n\n//CHECK#2\nif (f.constructor !== Function) {\n $ERROR('#2: When the Function constructor is called with one argument then body be that argument and creates a new Function object as specified in 13.2');\n}\n\n//CHECK#3\nif (f(1)!==1) {\n $ERROR('#3: When the Function constructor is called with one argument then body be that argument the following steps are taken...');\n}",
+ "id": "S15.3.2.1_A3_T7"
+ },
+ {
+ "section": "15.3.2.1, 13.2",
+ "description": ": Values of the function constructor arguments are \"undefined\" and \"return this;\";",
+ "test": "var body = \"return this;\";\n\n//CHECK#1\ntry {\n var f = new Function(undefined,body);\n} catch (e) {\n $FAIL('#1: test failed with error '+e);\n}\n\n//CHECK#2\nif (f.constructor !== Function) {\n $ERROR('#2: When the Function constructor is called with one argument then body be that argument and creates a new Function object as specified in 13.2');\n}\n\n//CHECK#3\nif (f()!==this) {\n $ERROR('#3: When the Function constructor is called with one argument then body be that argument the following steps are taken...');\n}\n\n\n",
+ "id": "S15.3.2.1_A3_T8"
+ },
+ {
+ "section": "15.3.2.1, 13.2",
+ "description": ": Values of the function constructor arguments are \"1,1\" and \"return this;\";",
+ "test": "var body = \"return this;\";\nvar p=\"1,1\";\n\n//CHECK#1\ntry {\n var f = new Function(p,body);\n $FAIL('#1: If P is not parsable as a FormalParameterList_opt then throw a SyntaxError exception');\n} catch (e) {\n if (!(e instanceof SyntaxError)) {\n \t$ERROR('#1.1: If P is not parsable as a FormalParameterList_opt then throw a SyntaxError exception');\n }\n}\n",
+ "id": "S15.3.2.1_A3_T9"
+ },
+ {
+ "section": "15.3.2",
+ "description": "Checking the constuctor of the object that is created as a new Function",
+ "test": "var f = new Function;\n\n//CHECK#1\nif (f.constructor !== Function) {\n $ERROR('#1: When Function is called as part of a new expression, it is a constructor: it initialises the newly created object');\n}\n\n//CHECK#2\nif (f === undefined) {\n $ERROR('#2: When Function is called as part of a new expression, it is a constructor: it initialises the newly created object');\n}\n",
+ "id": "S15.3.2_A1"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.3.3.1_Function.prototype.json b/website/resources/scripts/testcases2/15.3.3.1_Function.prototype.json
new file mode 100644
index 000000000..ef3e26dc0
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.3.3.1_Function.prototype.json
@@ -0,0 +1,26 @@
+{
+ "testCollection": {
+ "name": "15.3.3.1_Function.prototype",
+ "numTests": 3,
+ "tests": [
+ {
+ "section": "15.3.3.1, 15.3.4",
+ "description": "Checking if varying the Function.prototype property fails",
+ "test": "var obj = Function.prototype;\nFunction.prototype = function(){return \"shifted\";};\n\n//CHECK#1\nif (Function.prototype !== obj) {\n $ERROR('#1: the Function.prototype property has the attributes ReadOnly.');\n}\n\n//CHECK#2\ntry {\n if(Function.prototype()!==undefined){\n $ERROR('#2: the Function.prototype property has the attributes ReadOnly');\n }\n} catch (e) {\n $ERROR('#2.1: the Function.prototype property has the attributes ReadOnly: '+e);\n}\n",
+ "id": "S15.3.3.1_A1"
+ },
+ {
+ "section": "15.3.3.1, 15.3.4",
+ "description": "Checking if enumerating the Function.prototype property fails",
+ "test": "// CHECK#1\nif (Function.propertyIsEnumerable('prototype')) {\n $ERROR('#1: the Function.prototype property has the attributes DontEnum');\n}\n\n// CHECK#2\nvar count=0;\n\nfor (p in Function){\n if (p===\"prototype\") count++;\n}\n\nif (count !== 0) {\n $ERROR('#2: the Function.prototype property has the attributes DontEnum');\n}\n",
+ "id": "S15.3.3.1_A2"
+ },
+ {
+ "section": "15.3.3.1, 15.3.4",
+ "description": "Checking if deleting the Function.prototype property fails",
+ "test": "delete Function.prototype;\n\n//CHECK#1\nif (!(Function.hasOwnProperty('prototype'))) {\n $ERROR('#1: the Function.prototype property has the attributes DontDelete.');\n}\n",
+ "id": "S15.3.3.1_A3"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.3.3.2.json b/website/resources/scripts/testcases2/15.3.3.2.json
new file mode 100644
index 000000000..69661a358
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.3.3.2.json
@@ -0,0 +1,15 @@
+{
+ "testCollection": {
+ "name": "15.3.3.2",
+ "numTests": 1,
+ "tests": [
+ {
+ "id": "15.3.3.2-1",
+ "path": "TestCases/chapter15/15.3/15.3.3/15.3.3.2/15.3.3.2-1.js",
+ "description": "Function.length - data property with value 1",
+ "test": "assertTrue((function testcase() {\n\n var desc = Object.getOwnPropertyDescriptor(Function,\"length\");\n if(desc.value === 1 &&\n desc.writable === false &&\n desc.enumerable === false &&\n desc.configurable === false)\n return true; \n\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.3.3_Properties_of_the_Function_Constructor.json b/website/resources/scripts/testcases2/15.3.3_Properties_of_the_Function_Constructor.json
new file mode 100644
index 000000000..06844ed62
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.3.3_Properties_of_the_Function_Constructor.json
@@ -0,0 +1,32 @@
+{
+ "testCollection": {
+ "name": "15.3.3_Properties_of_the_Function_Constructor",
+ "numTests": 4,
+ "tests": [
+ {
+ "section": "15.3.3",
+ "description": "Checking existence of the property \"prototype\"",
+ "test": "if(!Function.hasOwnProperty(\"prototype\")){\n $ERROR('#1: The Function constructor has the property \"prototype\"');\n}\n\n",
+ "id": "S15.3.3_A1"
+ },
+ {
+ "section": "15.3.3, 15.3.4",
+ "description": "Checking prototype of Function",
+ "test": "// CHECK#\nif (!(Function.prototype.isPrototypeOf(Function))) {\n $ERROR('#1: the value of the internal [[Prototype]] property of the Function constructor is the Function prototype object.');\n}\n",
+ "id": "S15.3.3_A2_T1"
+ },
+ {
+ "section": "15.3.3, 15.3.4",
+ "description": "Add new property to Function.prototype and check it",
+ "test": "Function.prototype.indicator = 1;\n\n//CHECK#\nif (Function.indicator != 1) {\n $ERROR('#1: the value of the internal [[Prototype]] property of the Function constructor is the Function prototype object.');\n}\n",
+ "id": "S15.3.3_A2_T2"
+ },
+ {
+ "section": "15.3.3, 15.3.4",
+ "description": "Checking Function.length property",
+ "test": "//CHECK#1\nif (!Function.hasOwnProperty(\"length\")){\n $ERROR('#1: Function constructor has length property');\n}\n\n//CHECK#2\nif (Function.length !== 1) {\n $ERROR('#2: Function constructor length property value is 1');\n}\n",
+ "id": "S15.3.3_A3"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.3.4.2_Function.prototype.toString.json b/website/resources/scripts/testcases2/15.3.4.2_Function.prototype.toString.json
new file mode 100644
index 000000000..27500b314
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.3.4.2_Function.prototype.toString.json
@@ -0,0 +1,85 @@
+{
+ "testCollection": {
+ "name": "15.3.4.2_Function.prototype.toString",
+ "numTests": 12,
+ "tests": [
+ {
+ "section": "15.3.4.2",
+ "description": "Checking if varying the Function.prototype.toString.length property fails",
+ "test": "//CHECK#1\nif (!(Function.prototype.toString.hasOwnProperty('length'))) {\n $FAIL('#1: the Function.prototype.toString has length property.');\n}\n\nvar obj = Function.prototype.toString.length;\n\nFunction.prototype.toString.length = function(){return \"shifted\";};\n\n//CHECK#2\nif (Function.prototype.toString.length !== obj) {\n $ERROR('#2: the Function.prototype.toString length property has the attributes ReadOnly.');\n}\n",
+ "id": "S15.3.4.2_A10"
+ },
+ {
+ "section": "15.3.4.2",
+ "description": "Checking Function.prototype.toString.length",
+ "test": "//CHECK#1\nif (!(Function.prototype.toString.hasOwnProperty(\"length\"))) {\n $ERROR('#1: The Function.prototype.toString has the length property');\n}\n\n//CHECK#2\nif (Function.prototype.toString.length !== 0) {\n $ERROR('#2: The length property of the toString method is 0');\n}\n",
+ "id": "S15.3.4.2_A11"
+ },
+ {
+ "section": "15.3.4.2",
+ "negative": "TypeError",
+ "test": "Function.prototype.toString.call(undefined);\n",
+ "id": "S15.3.4.2_A12",
+ "description": ": The Function.prototype.toString function is not generic; it throws a TypeError exception if its this value is not a Function object."
+ },
+ {
+ "section": "15.3.4.2",
+ "negative": "TypeError",
+ "test": "Function.prototype.toString.call(null);\n",
+ "id": "S15.3.4.2_A13",
+ "description": ": The toString function is not generic; it throws a TypeError exception if its this value is not a Function object."
+ },
+ {
+ "section": "15.3.4.2",
+ "negative": "TypeError",
+ "test": "Function.prototype.toString.call({});\n",
+ "id": "S15.3.4.2_A14",
+ "description": ": The toString function is not generic; it throws a TypeError exception if its this value is not a Function object."
+ },
+ {
+ "section": "15.3.4.2",
+ "description": "Whether or not they are callable, RegExp objects are not Function objects, so toString should throw a TypeError.",
+ "negative": "TypeError",
+ "test": "Function.prototype.toString.call(/x/);\n",
+ "id": "S15.3.4.2_A15"
+ },
+ {
+ "section": "15.3.4.2",
+ "description": "The String constructor, given an object, should invoke that object's toString method as a method, i.e., with its this value bound to that object.",
+ "negative": "TypeError",
+ "test": "var obj = {toString: Function.prototype.toString};\n\nString(obj);\n",
+ "id": "S15.3.4.2_A16"
+ },
+ {
+ "section": "15.3.4.2",
+ "description": "For testing use Function.prototype.toString() function",
+ "test": "var f = function(x) {\n return x*x;\n};\n\n//CHECK#1\nif (eval(f.toString())(10) !== f(10)) {\n $ERROR('#1: An implementation-dependent representation of the function is returned. This representation has the syntax of a FunctionDeclaration');\n}\n",
+ "id": "S15.3.4.2_A1_T1"
+ },
+ {
+ "section": "15.3.4.2, 13.2",
+ "description": "Checking if obtaining the prototype property of Function.prototype.toString fails",
+ "test": "//CHECK#1\nif (Function.prototype.toString.prototype !== undefined) {\n $ERROR('#1: Function.prototype.toString has not prototype property'+Function.prototype.toString.prototype);\n}\n",
+ "id": "S15.3.4.2_A6"
+ },
+ {
+ "section": "15.3.4.2, 13.2",
+ "description": "Checking if creating \"new Function.prototype.toString\" fails",
+ "test": "var FACTORY = Function.prototype.toString;\n\ntry {\n var instance = new FACTORY;\n $FAIL('#1: Function.prototype.toString can\\'t be used as constructor');\n} catch (e) {\n $PRINT(e);\n}\n",
+ "id": "S15.3.4.2_A7"
+ },
+ {
+ "section": "15.3.4.2",
+ "description": "Checking if enumerating the Function.prototype.toString.length property fails",
+ "test": "//CHECK#0\nif (!(Function.prototype.toString.hasOwnProperty('length'))) {\n $FAIL('#0: the Function.prototype.toString has length property.');\n}\n\n\n// CHECK#1\nif (Function.prototype.toString.propertyIsEnumerable('length')) {\n $ERROR('#1: the Function.prototype.toString.length property has the attributes DontEnum');\n}\n\n// CHECK#2\nfor (p in Function.prototype.toString){\n if (p===\"length\")\n $ERROR('#2: the Function.prototype.toString.length property has the attributes DontEnum');\n}\n",
+ "id": "S15.3.4.2_A8"
+ },
+ {
+ "section": "15.3.4.2",
+ "description": "Checking if deleting the Function.prototype.toString.length property fails",
+ "test": "//CHECK#0\nif (!(Function.prototype.toString.hasOwnProperty('length'))) {\n $FAIL('#0: the Function.prototype.toString has length property');\n}\n\n//CHECK#1\nif (delete Function.prototype.toString.length) {\n $ERROR('#1: The Function.prototype.toString.length property has the attributes DontDelete');\n}\n\n//CHECK#2\nif (!(Function.prototype.toString.hasOwnProperty('length'))) {\n $FAIL('#2: The Function.prototype.toString.length property has the attributes DontDelete');\n}\n",
+ "id": "S15.3.4.2_A9"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.3.4.3.json b/website/resources/scripts/testcases2/15.3.4.3.json
new file mode 100644
index 000000000..718aa0a6e
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.3.4.3.json
@@ -0,0 +1,32 @@
+{
+ "testCollection": {
+ "name": "15.3.4.3",
+ "numTests": 3,
+ "tests": [
+ {
+ "id": "15.3.4.3-1-s",
+ "path": "TestCases/chapter15/15.3/15.3.4/15.3.4.3/15.3.4.3-1-s.js",
+ "description": "Strict Mode - 'this' value is a string which cannot be converted to wrapper objects when the function is called with an array of arguments",
+ "test": "assertTrue((function testcase() {\n \"use strict\";\n\n function fun() {\n return (this instanceof String);\n }\n return !fun.apply(\"\", Array);\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict())",
+ "strict_only": ""
+ },
+ {
+ "id": "15.3.4.3-2-s",
+ "path": "TestCases/chapter15/15.3/15.3.4/15.3.4.3/15.3.4.3-2-s.js",
+ "description": "Strict Mode - 'this' value is a number which cannot be converted to wrapper objects when the function is called with an array of arguments",
+ "test": "assertTrue((function testcase() {\n \"use strict\";\n function fun() {\n return (this instanceof Number);\n }\n return !fun.apply(-12, Array);\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict())",
+ "strict_only": ""
+ },
+ {
+ "id": "15.3.4.3-3-s",
+ "path": "TestCases/chapter15/15.3/15.3.4/15.3.4.3/15.3.4.3-3-s.js",
+ "description": "Strict Mode - 'this' value is a boolean which cannot be converted to wrapper objects when the function is called with an array of arguments",
+ "test": "assertTrue((function testcase() {\n \"use strict\";\n\n function fun() {\n return (this instanceof Boolean);\n }\n return !fun.apply(false, Array);\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict())",
+ "strict_only": ""
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.3.4.3_Function.prototype.apply.json b/website/resources/scripts/testcases2/15.3.4.3_Function.prototype.apply.json
new file mode 100644
index 000000000..ea2684804
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.3.4.3_Function.prototype.apply.json
@@ -0,0 +1,311 @@
+{
+ "testCollection": {
+ "name": "15.3.4.3_Function.prototype.apply",
+ "numTests": 50,
+ "tests": [
+ {
+ "section": "15.3.4.3",
+ "description": "Checking if varying the Function.prototype.apply.length property fails",
+ "test": "//CHECK#1\nif (!(Function.prototype.apply.hasOwnProperty('length'))) {\n $FAIL('#1: the Function.prototype.apply has length property.');\n}\n\nvar obj = Function.prototype.apply.length;\n\nFunction.prototype.apply.length = function(){return \"shifted\";};\n\n//CHECK#2\nif (Function.prototype.apply.length !== obj) {\n $ERROR('#2: the Function.prototype.apply length property has the attributes ReadOnly.');\n}\n",
+ "id": "S15.3.4.3_A10"
+ },
+ {
+ "section": "15.3.4.3",
+ "description": "TChecking if enumerating the Function.prototype.apply.length property fails",
+ "test": "//CHECK#0\nif (!(Function.prototype.apply.hasOwnProperty('length'))) {\n $FAIL('#0: the Function.prototype.apply has length property.');\n}\n\n\n// CHECK#1\nif (Function.prototype.apply.propertyIsEnumerable('length')) {\n $ERROR('#1: the Function.prototype.apply.length property has the attributes DontEnum');\n}\n\n// CHECK#2\nfor (var p in Function.prototype.apply){\n if (p===\"length\")\n $ERROR('#2: the Function.prototype.apply.length property has the attributes DontEnum');\n}\n",
+ "id": "S15.3.4.3_A11"
+ },
+ {
+ "section": "15.3.4.3, 13.2",
+ "description": "Checking if obtaining the prototype property of Function.prototype.apply fails",
+ "test": "//CHECK#1\nif (Function.prototype.apply.prototype !== undefined) {\n $ERROR('#1: Function.prototype.apply has not prototype property'+Function.prototype.apply.prototype);\n}\n",
+ "id": "S15.3.4.3_A12"
+ },
+ {
+ "section": "15.3.4.3",
+ "negative": "TypeError",
+ "test": "Function.prototype.apply.call(undefined, {}, []);\n",
+ "id": "S15.3.4.3_A13",
+ "description": "If IsCallable(func) is false, then throw a TypeError exception."
+ },
+ {
+ "section": "15.3.4.3",
+ "negative": "TypeError",
+ "test": "Function.prototype.apply.call(null, {}, []);\n",
+ "id": "S15.3.4.3_A14",
+ "description": "If IsCallable(func) is false, then throw a TypeError exception."
+ },
+ {
+ "section": "15.3.4.3",
+ "negative": "TypeError",
+ "test": "Function.prototype.apply.call({}, {}, []);\n",
+ "id": "S15.3.4.3_A15",
+ "description": "If IsCallable(func) is false, then throw a TypeError exception."
+ },
+ {
+ "section": "15.3.4.3",
+ "description": "A RegExp is not a function, but it may be callable. Iff it is, it's typeof should be 'function', in which case apply should accept it as a valid this value.",
+ "test": "var re = (/x/);\nif (typeof re === 'function') {\n Function.prototype.apply.call(re, undefined, ['x']);\n} else {\n try {\n Function.prototype.bind.call(re, undefined);\n $FAIL('#1: If IsCallable(func) is false, ' +\n 'then (bind should) throw a TypeError exception');\n } catch (e) {\n if (!(e instanceof TypeError)) {\n $ERROR('#1: TypeError expected. Actual: ' + e);\n }\n }\n}\n",
+ "id": "S15.3.4.3_A16"
+ },
+ {
+ "section": "15.3.4.3",
+ "description": "Calling \"apply\" method of the object that does not have a [[Call]] property.\nPrototype of the object is Function()",
+ "test": "var proto=Function();\n\nfunction FACTORY(){};\n\nFACTORY.prototype=proto;\n\nvar obj = new FACTORY;\n\n//CHECK#1\nif (typeof obj.apply !== \"function\") {\n $ERROR('#1: apply method accessed');\n}\n\n//CHECK#2\ntry {\n obj.apply();\n $FAIL('#2: If the object does not have a [[Call]] property, a TypeError exception is thrown');\n} catch (e) {\n if (!(e instanceof TypeError)) {\n \t$ERROR('#2.1: If the object does not have a [[Call]] property, a TypeError exception is thrown');\n }\n}\n",
+ "id": "S15.3.4.3_A1_T1"
+ },
+ {
+ "section": "15.3.4.3",
+ "description": "Calling \"apply\" method of the object that does not have a [[Call]] property.\nPrototype of the object is Function.prototype",
+ "test": "function FACTORY(){};\n\nFACTORY.prototype=Function.prototype;\n\nvar obj = new FACTORY;\n\n//CHECK#1\nif (typeof obj.apply !== \"function\") {\n $ERROR('#1: apply method accessed');\n}\n\n//CHECK#2\ntry {\n obj.apply();\n $FAIL('#2: If the object does not have a [[Call]] property, a TypeError exception is thrown');\n} catch (e) {\n if (!(e instanceof TypeError)) {\n \t$ERROR('#2.1: If the object does not have a [[Call]] property, a TypeError exception is thrown');\n }\n}\n",
+ "id": "S15.3.4.3_A1_T2"
+ },
+ {
+ "section": "15.3.4.3",
+ "description": "Checking Function.prototype.apply.length",
+ "test": "//CHECK#1\nif (typeof Function.prototype.apply !== \"function\") {\n $ERROR('#1: apply method defined');\n}\n\n//CHECK#2\nif (typeof Function.prototype.apply.length === \"undefined\") {\n $ERROR('#2: length property of apply method defined');\n}\n\n//CHECK#3\nif (Function.prototype.apply.length !== 2) {\n $ERROR('#3: The length property of the apply method is 2');\n}\n",
+ "id": "S15.3.4.3_A2_T1"
+ },
+ {
+ "section": "15.3.4.3",
+ "description": "Checking f.apply.length, where f is new Function",
+ "test": "var f=new Function;\n\n//CHECK#1\nif (typeof f.apply !== \"function\") {\n $ERROR('#1: apply method accessed');\n}\n\n//CHECK#2\nif (typeof f.apply.length === \"undefined\") {\n $ERROR('#2: length property of apply method defined');\n}\n\n//CHECK#3\nif (f.apply.length !== 2) {\n $ERROR('#3: The length property of the apply method is 2');\n}\n",
+ "id": "S15.3.4.3_A2_T2"
+ },
+ {
+ "section": "15.3.4.3",
+ "description": "Not any arguments at apply function",
+ "test": "Function(\"this.field=\\\"strawberry\\\"\").apply();\n\n//CHECK#1\nif (this[\"field\"] !== \"strawberry\") {\n $ERROR('#1: If thisArg is null or undefined, the called function is passed the global object as the this value');\n}\n",
+ "id": "S15.3.4.3_A3_T1"
+ },
+ {
+ "section": "15.3.4.3",
+ "description": "Checking by using eval, no any arguments at apply function",
+ "test": "eval(\" (function(){this.feat=1}).apply()\");\n\n//CHECK#1\nif (this[\"feat\"] !== 1) {\n $ERROR('#1: If thisArg is null or undefined, the called function is passed the global object as the this value');\n}\n",
+ "id": "S15.3.4.3_A3_T10"
+ },
+ {
+ "section": "15.3.4.3",
+ "description": "Argument at apply function is null",
+ "test": "Function(\"this.field=\\\"green\\\"\").apply(null);\n\n//CHECK#1\nif (this[\"field\"] !== \"green\") {\n $ERROR('#1: If thisArg is null or undefined, the called function is passed the global object as the this value');\n}\n",
+ "id": "S15.3.4.3_A3_T2"
+ },
+ {
+ "section": "15.3.4.3",
+ "description": "Argument at apply function is void 0",
+ "test": "Function(\"this.field=\\\"battle\\\"\").apply(void 0);\n\n//CHECK#1\nif (this[\"field\"] !== \"battle\") {\n $ERROR('#1: If thisArg is null or undefined, the called function is passed the global object as the this value');\n}\n",
+ "id": "S15.3.4.3_A3_T3"
+ },
+ {
+ "section": "15.3.4.3",
+ "description": "Argument at apply function is undefined",
+ "test": "Function(\"this.field=\\\"oil\\\"\").apply(undefined);\n\n//CHECK#1\nif (this[\"field\"] !== \"oil\") {\n $ERROR('#1: If thisArg is null or undefined, the called function is passed the global object as the this value');\n}\n",
+ "id": "S15.3.4.3_A3_T4"
+ },
+ {
+ "section": "15.3.4.3",
+ "description": "No any arguments at apply function and it called inside function declaration",
+ "test": "function FACTORY(){\n Function(\"this.feat=\\\"in da haus\\\"\").apply();\n};\n\nvar obj = new FACTORY;\n\n//CHECK#1\nif (this[\"feat\"] !== \"in da haus\") {\n $ERROR('#1: If thisArg is null or undefined, the called function is passed the global object as the this value');\n}\n\n//CHECK#2\nif (typeof obj.feat !== \"undefined\") {\n $ERROR('#1: If thisArg is null or undefined, the called function is passed the global object as the this value');\n}\n",
+ "id": "S15.3.4.3_A3_T5"
+ },
+ {
+ "section": "15.3.4.3",
+ "description": "Argument at apply function is null and it called inside function declaration",
+ "test": "function FACTORY(){\n (function(){this.feat=\"kamon beyba\"}).apply(null);\n};\n\nvar obj = new FACTORY;\n\n//CHECK#1\nif (this[\"feat\"] !== \"kamon beyba\") {\n $ERROR('#1: If thisArg is null or undefined, the called function is passed the global object as the this value');\n}\n\n//CHECK#2\nif (typeof obj.feat !== \"undefined\") {\n $ERROR('#1: If thisArg is null or undefined, the called function is passed the global object as the this value');\n}\n",
+ "id": "S15.3.4.3_A3_T6"
+ },
+ {
+ "section": "15.3.4.3",
+ "description": "Argument at apply function is void 0 and it called inside function declaration",
+ "test": "(function FACTORY(){\n Function(\"this.feat=\\\"in da haus\\\"\").apply(void 0);\n})();\n\n\n//CHECK#1\nif (this[\"feat\"] !== \"in da haus\") {\n $ERROR('#1: If thisArg is null or undefined, the called function is passed the global object as the this value');\n}\n",
+ "id": "S15.3.4.3_A3_T7"
+ },
+ {
+ "section": "15.3.4.3",
+ "description": "Argument at apply function is undefined and it called inside function declaration",
+ "test": "(function FACTORY(){\n (function(){this.feat=\"kamon beyba\"}).apply(undefined);\n})();\n\n//CHECK#1\nif (this[\"feat\"] !== \"kamon beyba\") {\n $ERROR('#1: If thisArg is null or undefined, the called function is passed the global object as the this value');\n}\n",
+ "id": "S15.3.4.3_A3_T8"
+ },
+ {
+ "section": "15.3.4.3",
+ "description": "Checking by using eval, argument at apply function is void 0",
+ "test": "eval( \" Function(\\\"this.feat=1\\\").apply(void 0) \" );\n\n//CHECK#1\nif (this[\"feat\"] !== 1) {\n $ERROR('#1: If thisArg is null or undefined, the called function is passed the global object as the this value');\n}\n",
+ "id": "S15.3.4.3_A3_T9"
+ },
+ {
+ "section": "15.3.4.3",
+ "description": "thisArg is number",
+ "test": "var obj=1;\n\nvar retobj = Function(\"this.touched= true; return this;\").apply(obj);\n\n//CHECK#1\nif (typeof obj.touched !== \"undefined\") {\n $ERROR('#1: If thisArg is not null(defined) the called function is passed ToObject(thisArg) as the this value');\n}\n\n//CHECK#2\nif (!(retobj[\"touched\"])) {\n $ERROR('#2: If thisArg is not null(defined) the called function is passed ToObject(thisArg) as the this value');\n}",
+ "id": "S15.3.4.3_A5_T1"
+ },
+ {
+ "section": "15.3.4.3",
+ "description": "thisArg is boolean true",
+ "test": "var obj=true;\n\nvar retobj = new Function(\"this.touched= true; return this;\").apply(obj);\n\n//CHECK#1\nif (typeof obj.touched !== \"undefined\") {\n $ERROR('#1: If thisArg is not null(defined) the called function is passed ToObject(thisArg) as the this value');\n}\n\n//CHECK#2\nif (!(retobj[\"touched\"])) {\n $ERROR('#2: If thisArg is not null(defined) the called function is passed ToObject(thisArg) as the this value');\n}\n\n",
+ "id": "S15.3.4.3_A5_T2"
+ },
+ {
+ "section": "15.3.4.3",
+ "description": "thisArg is string",
+ "test": "var obj=\"soap\";\n\nvar retobj = ( function(){this.touched= true; return this;} ).apply(obj);\n\n//CHECK#1\nif (typeof obj.touched !== \"undefined\") {\n $ERROR('#1: If thisArg is not null(defined) the called function is passed ToObject(thisArg) as the this value');\n}\n\n//CHECK#2\nif (!(retobj[\"touched\"])) {\n $ERROR('#2: If thisArg is not null(defined) the called function is passed ToObject(thisArg) as the this value');\n}\n\n",
+ "id": "S15.3.4.3_A5_T3"
+ },
+ {
+ "section": "15.3.4.3",
+ "description": "thisArg is function variable that return this",
+ "test": "f = function(){this.touched= true; return this;};\n\nretobj = f.apply(obj);\n\n//CHECK#1\nif (typeof obj !== \"undefined\") {\n $ERROR('#1: If thisArg is not null(defined) the called function is passed ToObject(thisArg) as the this value');\n}\n\n//CHECK#2\nif (!(retobj[\"touched\"])) {\n $ERROR('#2: If thisArg is not null(defined) the called function is passed ToObject(thisArg) as the this value');\n}\n\nvar obj;\n",
+ "id": "S15.3.4.3_A5_T4"
+ },
+ {
+ "section": "15.3.4.3",
+ "description": "thisArg is function variable",
+ "test": "var f = function(){this.touched= true;};\n\nvar obj={};\n\nf.apply(obj);\n\n//CHECK#1\nif (!(obj.touched)) {\n $ERROR('#1: If thisArg is not null(defined) the called function is passed ToObject(thisArg) as the this value');\n}\n",
+ "id": "S15.3.4.3_A5_T5"
+ },
+ {
+ "section": "15.3.4.3",
+ "description": "thisArg is new String()",
+ "test": "var obj=new String(\"soap\");\n\n( function(){this.touched= true;}).apply(obj);\n\n//CHECK#1\nif (!(obj.touched)) {\n $ERROR('#1: If thisArg is not null(defined) the called function is passed ToObject(thisArg) as the this value');\n}\n",
+ "id": "S15.3.4.3_A5_T6"
+ },
+ {
+ "section": "15.3.4.3",
+ "description": "thisArg is new Number()",
+ "test": "var obj=new Number(1);\n\nFunction(\"this.touched= true;\").apply(obj);\n\n//CHECK#1\nif (!(obj.touched)) {\n $ERROR('#1: If thisArg is not null(defined) the called function is passed ToObject(thisArg) as the this value');\n}\n\n",
+ "id": "S15.3.4.3_A5_T7"
+ },
+ {
+ "section": "15.3.4.3",
+ "description": "thisArg is Function()",
+ "test": "var obj=Function();\n\nnew Function(\"this.touched= true; return this;\").apply(obj);\n\n//CHECK#1\nif (!(obj.touched)) {\n $ERROR('#1: If thisArg is not null(defined) the called function is passed ToObject(thisArg) as the this value');\n}\n",
+ "id": "S15.3.4.3_A5_T8"
+ },
+ {
+ "section": "15.3.4.3",
+ "description": "argArray is (1,{})",
+ "test": "//CHECK#1\ntry {\n Function().apply(1,{});\n $FAIL('#1: if argArray is neither an array nor an arguments object (see 10.1.8), a TypeError exception is thrown');\n} catch (e) {\n if (!(e instanceof TypeError)) {\n \t$ERROR('#1.1: if argArray is neither an array nor an arguments object (see 10.1.8), a TypeError exception is thrown');\n }\n}\n",
+ "id": "S15.3.4.3_A6_T1"
+ },
+ {
+ "section": "15.3.4.3",
+ "description": "argArray is (null,1)",
+ "test": "//CHECK#1\ntry {\n Function().apply(null,1);\n $FAIL('#1: if argArray is neither an array nor an arguments object (see 10.1.8), a TypeError exception is thrown');\n} catch (e) {\n if (!(e instanceof TypeError)) {\n \t$ERROR('#1.1: if argArray is neither an array nor an arguments object (see 10.1.8), a TypeError exception is thrown');\n }\n}\n",
+ "id": "S15.3.4.3_A6_T2"
+ },
+ {
+ "section": "15.3.4.3",
+ "description": "argArray is (object,\"1,3,4\")",
+ "test": "obj={};\n\n//CHECK#1\ntry {\n Function().apply(obj,\"1,3,4\");\n $FAIL('#1: if argArray is neither an array nor an arguments object (see 10.1.8), a TypeError exception is thrown');\n} catch (e) {\n if (!(e instanceof TypeError)) {\n \t$ERROR('#1.1: if argArray is neither an array nor an arguments object (see 10.1.8), a TypeError exception is thrown');\n }\n}\n",
+ "id": "S15.3.4.3_A6_T3"
+ },
+ {
+ "section": "15.3.4.3",
+ "description": ": argArray is (this,function(){return arguments;});",
+ "test": "//CHECK#1\ntry {\n Function().apply(this,function(){return arguments;});\n $FAIL('#1: if argArray is neither an array nor an arguments object (see 10.1.8), a TypeError exception is thrown');\n} catch (e) {\n if (!(e instanceof TypeError)) {\n \t$ERROR('#1.1: if argArray is neither an array nor an arguments object (see 10.1.8), a TypeError exception is thrown');\n }\n}\n",
+ "id": "S15.3.4.3_A6_T4"
+ },
+ {
+ "section": "15.3.4.3",
+ "description": "argArray is (null,[1])",
+ "test": "Function(\"a1,a2,a3\",\"this.shifted=a1;\").apply(null,[1]);\n\n//CHECK#1\nif (this[\"shifted\"] !== 1) {\n $ERROR('#1: If argArray is either an array or an arguments object, the function is passed the...');\n}\n\n",
+ "id": "S15.3.4.3_A7_T1"
+ },
+ {
+ "section": "15.3.4.3",
+ "description": "argArray is (empty object, arguments), inside function call without declaration used",
+ "test": "var obj={};\n\n(function (){\n Function(\"a1,a2,a3\",\"this.shifted=a1+a2+a3;\").apply(obj,arguments);\n})(\"\",4,2);\n\n//CHECK#1\nif (obj[\"shifted\"] !== \"42\") {\n $ERROR('#1: If argArray is either an array or an arguments object, the function is passed the...');\n}\n\n//CHECK#2\nif (typeof this[\"shifted\"] !== \"undefined\") {\n $ERROR('#2: If argArray is either an array or an arguments object, the function is passed the...');\n}\n\n",
+ "id": "S15.3.4.3_A7_T10"
+ },
+ {
+ "section": "15.3.4.3",
+ "description": "argArray is (null,[1,2,3])",
+ "test": "new Function(\"a1,a2\",\"a3\",\"this.shifted=a2;\").apply(null,[1,2,3]);\n\n//CHECK#1\nif (this[\"shifted\"] !== 2) {\n $ERROR('#1: If argArray is either an array or an arguments object, the function is passed the...');\n}\n\n",
+ "id": "S15.3.4.3_A7_T2"
+ },
+ {
+ "section": "15.3.4.3",
+ "description": "argArray is (empty object, new Array(\"nine\",\"inch\",\"nails\"))",
+ "test": "i=0;\n\np={toString:function(){return \"a\"+(++i);}};\n\nobj={};\n\nFunction(p,\"a2,a3\",\"this.shifted=a1;\").apply(obj, new Array(\"nine\",\"inch\",\"nails\"));\n\n//CHECK#1\nif (obj[\"shifted\"] !== \"nine\") {\n $ERROR('#1: If argArray is either an array or an arguments object, the function is passed the...');\n}\n\n//CHECK#2\nif (typeof this[\"shifted\"] !== \"undefined\") {\n $ERROR('#2: If argArray is either an array or an arguments object, the function is passed the...');\n}\n\n",
+ "id": "S15.3.4.3_A7_T3"
+ },
+ {
+ "section": "15.3.4.3",
+ "description": ": argArray is (empty object, ( function(){return arguments;}) (\"a\",\"b\",\"c\"));",
+ "test": "i=0;\n\np={toString:function(){return \"a\"+(++i);}};\n\nobj={};\n\nnew Function(p,p,p, \"this.shifted=a3;\").apply( obj,( function(){return arguments;}) (\"a\",\"b\",\"c\") );\n\n//CHECK#1\nif (obj[\"shifted\"] !== \"c\") {\n $ERROR('#1: If argArray is either an array or an arguments object, the function is passed the...');\n}\n\n//CHECK#2\nif (typeof this[\"shifted\"] !== \"undefined\") {\n $ERROR('#2: If argArray is either an array or an arguments object, the function is passed the...');\n}\n\n",
+ "id": "S15.3.4.3_A7_T4"
+ },
+ {
+ "section": "15.3.4.3",
+ "description": "argArray is (null, arguments), inside function declaration used",
+ "test": "function FACTORY(){\n Function(\"a1,a2,a3\",\"this.shifted=a1+a2+a3;\").apply(null,arguments);\n}\n\nobj=new FACTORY(\"\",1,2);\n\n//CHECK#1\nif (this[\"shifted\"] !== \"12\") {\n $ERROR('#1: If argArray is either an array or an arguments object, the function is passed the...');\n}\n\n//CHECK#2\nif (typeof obj.shifted !== \"undefined\") {\n $ERROR('#2: If argArray is either an array or an arguments object, the function is passed the...');\n}\n\n",
+ "id": "S15.3.4.3_A7_T5"
+ },
+ {
+ "section": "15.3.4.3",
+ "description": "argArray is (this, arguments), inside function declaration used",
+ "test": "function FACTORY(){\n Function(\"a1,a2,a3\",\"this.shifted=a1+a2+a3;\").apply(this,arguments);\n}\n\nobj=new FACTORY(\"\",4,2);\n\n//CHECK#1\nif (obj[\"shifted\"] !== \"42\") {\n $ERROR('#1: If argArray is either an array or an arguments object, the function is passed the...');\n}\n\n//CHECK#2\nif (typeof this[\"shifted\"] !== \"undefined\") {\n $ERROR('#2: If argArray is either an array or an arguments object, the function is passed the...');\n}\n\n",
+ "id": "S15.3.4.3_A7_T6"
+ },
+ {
+ "section": "15.3.4.3",
+ "description": "argArray is (null, arguments), inside function call without declaration used",
+ "test": "(function (){\n Function(\"a1,a2,a3\",\"this.shifted=a1+a2+a3;\").apply(null,arguments);\n})(\"\",1,2);\n\n//CHECK#1\nif (this[\"shifted\"] !== \"12\") {\n $ERROR('#1: If argArray is either an array or an arguments object, the function is passed the...');\n}\n",
+ "id": "S15.3.4.3_A7_T7"
+ },
+ {
+ "section": "15.3.4.3",
+ "description": "argArray is (this, arguments), inside function call without declaration used",
+ "test": "(function (){\n Function(\"a1,a2,a3\",\"this.shifted=a1+a2+a3;\").apply(this,arguments);\n})(\"\",4,2);\n\n//CHECK#2\nif (this[\"shifted\"] !== \"42\") {\n $ERROR('#2: If argArray is either an array or an arguments object, the function is passed the...');\n}\n\n",
+ "id": "S15.3.4.3_A7_T8"
+ },
+ {
+ "section": "15.3.4.3",
+ "description": "argArray is (empty object, arguments), inside function declaration used",
+ "test": "function FACTORY(){\n var obj = {};\n Function(\"a1,a2,a3\",\"this.shifted=a1+a2+a3;\").apply(obj,arguments);\n return obj;\n}\n\nobj=new FACTORY(\"\",1,2);\n\n//CHECK#1\nif (typeof this[\"shifted\"] !== \"undefined\") {\n $ERROR('#1: If argArray is either an array or an arguments object, the function is passed the...');\n}\n\n//CHECK#2\nif (obj.shifted !== \"12\") {\n $ERROR('#2: If argArray is either an array or an arguments object, the function is passed the...');\n}\n\n",
+ "id": "S15.3.4.3_A7_T9"
+ },
+ {
+ "section": "15.3.4.3",
+ "description": "Checking if creating \"new Function.prototype.apply\" fails",
+ "test": "try {\n obj = new Function.prototype.apply;\n $ERROR('#1: Function.prototype.apply can\\'t be used as [[create]] caller');\n} catch (e) {\n if (!(e instanceof TypeError)) {\n \t$ERROR('#1.1: Function.prototype.apply can\\'t be used as [[create]] caller');\n }\n}\n",
+ "id": "S15.3.4.3_A8_T1"
+ },
+ {
+ "section": "15.3.4.3",
+ "description": "Checking if creating \"new Function.prototype.apply()\" fails",
+ "test": "try {\n obj = new Function.prototype.apply();\n $ERROR('#1: Function.prototype.apply can\\'t be used as [[create]] caller');\n} catch (e) {\n if (!(e instanceof TypeError)) {\n \t$ERROR('#1.1: Function.prototype.apply can\\'t be used as [[create]] caller');\n }\n}\n",
+ "id": "S15.3.4.3_A8_T2"
+ },
+ {
+ "section": "15.3.4.3",
+ "description": "Checking if creating \"new Function.apply\" fails",
+ "test": "try {\n obj = new Function.apply;\n $ERROR('#1: Function.prototype.apply can\\'t be used as [[create]] caller');\n} catch (e) {\n if (!(e instanceof TypeError)) {\n \t$ERROR('#1.1: Function.prototype.apply can\\'t be used as [[create]] caller');\n }\n}\n",
+ "id": "S15.3.4.3_A8_T3"
+ },
+ {
+ "section": "15.3.4.3",
+ "description": "Checking if creating \"new (Function(\"this.p1=1\").apply)\" fails",
+ "test": "try {\n obj = new (Function(\"this.p1=1\").apply);\n $ERROR('#1: Function.prototype.apply can\\'t be used as [[create]] caller');\n} catch (e) {\n if (!(e instanceof TypeError)) {\n \t$ERROR('#1.1: Function.prototype.apply can\\'t be used as [[create]] caller');\n }\n}\n",
+ "id": "S15.3.4.3_A8_T4"
+ },
+ {
+ "section": "15.3.4.3",
+ "description": "Checking if creating \"new Function(\"this.p1=1\").apply\" fails",
+ "test": "try {\n FACTORY = Function(\"this.p1=1\").apply;\n obj = new FACTORY();\n $ERROR('#1: Function.prototype.apply can\\'t be used as [[create]] caller');\n} catch (e) {\n if (!(e instanceof TypeError)) {\n \t$ERROR('#1.1: Function.prototype.apply can\\'t be used as [[create]] caller');\n }\n}\n",
+ "id": "S15.3.4.3_A8_T5"
+ },
+ {
+ "section": "15.3.4.3",
+ "description": ": Checking if creating \"new (Function(\"function f(){this.p1=1;};return f\").apply())\" fails;",
+ "test": "//CHECK#1\ntry {\n obj = new (Function(\"function f(){this.p1=1;};return f\").apply());\n} catch (e) {\n $ERROR('#1: Function.prototype.apply can\\'t be used as [[create]] caller');\n}\n\n//CHECK#2\nif (obj.p1!== 1) {\n $ERROR('#2: Function.prototype.apply can\\'t be used as [[create]] caller');\n}\n",
+ "id": "S15.3.4.3_A8_T6"
+ },
+ {
+ "section": "15.3.4.3",
+ "description": "Checking if deleting the Function.prototype.apply.length property fails",
+ "test": "//CHECK#0\nif (!(Function.prototype.apply.hasOwnProperty('length'))) {\n $FAIL('#0: the Function.prototype.apply has length property');\n}\n\n//CHECK#1\nif (delete Function.prototype.apply.length) {\n $ERROR('#1: The Function.prototype.apply.length property has the attributes DontDelete');\n}\n\n//CHECK#2\nif (!(Function.prototype.apply.hasOwnProperty('length'))) {\n $FAIL('#2: The Function.prototype.apply.length property has the attributes DontDelete');\n}\n",
+ "id": "S15.3.4.3_A9"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.3.4.4.json b/website/resources/scripts/testcases2/15.3.4.4.json
new file mode 100644
index 000000000..c47f3c401
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.3.4.4.json
@@ -0,0 +1,32 @@
+{
+ "testCollection": {
+ "name": "15.3.4.4",
+ "numTests": 3,
+ "tests": [
+ {
+ "id": "15.3.4.4-1-s",
+ "path": "TestCases/chapter15/15.3/15.3.4/15.3.4.4/15.3.4.4-1-s.js",
+ "description": "Strict Mode - 'this' value is a string which cannot be converted to wrapper objects when the function is called without an array of arguments",
+ "test": "assertTrue((function testcase() {\n \"use strict\";\n function fun() {\n return (this instanceof String);\n }\n return !fun.call(\"\");\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict())",
+ "strict_only": ""
+ },
+ {
+ "id": "15.3.4.4-2-s",
+ "path": "TestCases/chapter15/15.3/15.3.4/15.3.4.4/15.3.4.4-2-s.js",
+ "description": "Strict Mode - 'this' value is a number which cannot be converted to wrapper objects when the function is called without an array argument",
+ "test": "assertTrue((function testcase() {\n \"use strict\";\n function fun() {\n return (this instanceof Number);\n }\n return !fun.call(-12);\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict())",
+ "strict_only": ""
+ },
+ {
+ "id": "15.3.4.4-3-s",
+ "path": "TestCases/chapter15/15.3/15.3.4/15.3.4.4/15.3.4.4-3-s.js",
+ "description": "Strict Mode - 'this' value is a boolean which cannot be converted to wrapper objects when the function is called without an array of arguments",
+ "test": "assertTrue((function testcase() {\n \"use strict\";\n function fun() {\n return (this instanceof Boolean);\n }\n return !fun.call(false);\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict())",
+ "strict_only": ""
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.3.4.4_Function.prototype.call.json b/website/resources/scripts/testcases2/15.3.4.4_Function.prototype.call.json
new file mode 100644
index 000000000..4dfa1cc56
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.3.4.4_Function.prototype.call.json
@@ -0,0 +1,287 @@
+{
+ "testCollection": {
+ "name": "15.3.4.4_Function.prototype.call",
+ "numTests": 46,
+ "tests": [
+ {
+ "section": "15.3.4.4",
+ "description": "Checking if varying the Function.prototype.call.length property fails",
+ "test": "//CHECK#1\nif (!(Function.prototype.call.hasOwnProperty('length'))) {\n $FAIL('#1: the Function.prototype.call has length property.');\n}\n\nvar obj = Function.prototype.call.length;\n\nFunction.prototype.call.length = function(){return \"shifted\";};\n\n//CHECK#2\nif (Function.prototype.call.length !== obj) {\n $ERROR('#2: the Function.prototype.call length property has the attributes ReadOnly.');\n}\n",
+ "id": "S15.3.4.4_A10"
+ },
+ {
+ "section": "15.3.4.4",
+ "description": "Checking if enumerating the Function.prototype.call.length property fails",
+ "test": "//CHECK#0\nif (!(Function.prototype.call.hasOwnProperty('length'))) {\n $FAIL('#0: the Function.prototype.call has length property.');\n}\n\n\n// CHECK#1\nif (Function.prototype.call.propertyIsEnumerable('length')) {\n $ERROR('#1: the Function.prototype.call.length property has the attributes DontEnum');\n}\n\n// CHECK#2\nfor (p in Function.prototype.call){\n if (p===\"length\")\n $ERROR('#2: the Function.prototype.call.length property has the attributes DontEnum');\n}\n",
+ "id": "S15.3.4.4_A11"
+ },
+ {
+ "section": "15.3.4.4, 13.2",
+ "description": "Checking if obtaining the prototype property of Function.prototype.call fails",
+ "test": "//CHECK#1\nif (Function.prototype.call.prototype !== undefined) {\n $ERROR('#1: Function.prototype.call has not prototype property'+Function.prototype.call.prototype);\n}\n",
+ "id": "S15.3.4.4_A12"
+ },
+ {
+ "section": "15.3.4.4",
+ "negative": "TypeError",
+ "test": "Function.prototype.call.call(undefined, {});\n",
+ "id": "S15.3.4.4_A13",
+ "description": "If IsCallable(func) is false, then throw a TypeError exception."
+ },
+ {
+ "section": "15.3.4.4",
+ "negative": "TypeError",
+ "test": "Function.prototype.call.call(null, {});\n",
+ "id": "S15.3.4.4_A14",
+ "description": "If IsCallable(func) is false, then throw a TypeError exception."
+ },
+ {
+ "section": "15.3.4.4",
+ "negative": "TypeError",
+ "test": "Function.prototype.call.call({}, {});\n",
+ "id": "S15.3.4.4_A15",
+ "description": "If IsCallable(func) is false, then throw a TypeError exception."
+ },
+ {
+ "section": "15.3.4.4",
+ "description": "A RegExp is not a function, but it may be callable. Iff it is, it's typeof should be 'function', in which case call should accept it as a valid this value.",
+ "test": "var re = (/x/);\nif (typeof re === 'function') {\n Function.prototype.call.call(re, undefined, 'x');\n} else {\n try {\n Function.prototype.bind.call(re, undefined);\n $FAIL('#1: If IsCallable(func) is false, ' +\n 'then (bind should) throw a TypeError exception');\n } catch (e) {\n if (!(e instanceof TypeError)) {\n $ERROR('#1: TypeError expected. Actual: ' + e);\n }\n }\n}\n",
+ "id": "S15.3.4.4_A16"
+ },
+ {
+ "section": "15.3.4.4",
+ "description": "Call \"call\" method of the object that does not have a [[Call]] property.\nPrototype of the object is Function()",
+ "test": "var proto=Function();\n\nfunction FACTORY(){};\n\nFACTORY.prototype=proto;\n\nvar obj = new FACTORY;\n\n//CHECK#1\nif (typeof obj.call !== \"function\") {\n $ERROR('#1: call method accessed');\n}\n\n//CHECK#2\ntry {\n obj.call();\n $FAIL('#2: If the object does not have a [[Call]] property, a TypeError exception is thrown');\n} catch (e) {\n if (!(e instanceof TypeError)) {\n \t$ERROR('#2.1: If the object does not have a [[Call]] property, a TypeError exception is thrown');\n }\n}\n ",
+ "id": "S15.3.4.4_A1_T1"
+ },
+ {
+ "section": "15.3.4.4",
+ "description": "Calling \"call\" method of the object that does not have a [[Call]] property.\nPrototype of the object is Function.prototype",
+ "test": "function FACTORY(){};\n\nFACTORY.prototype=Function.prototype;\n\nvar obj = new FACTORY;\n\n//CHECK#1\nif (typeof obj.call !== \"function\") {\n $ERROR('#1: call method accessed');\n}\n\n//CHECK#2\ntry {\n obj.call();\n $FAIL('#2: If the object does not have a [[Call]] property, a TypeError exception is thrown');\n} catch (e) {\n if (!(e instanceof TypeError)) {\n \t$ERROR('#2.1: If the object does not have a [[Call]] property, a TypeError exception is thrown');\n }\n}\n",
+ "id": "S15.3.4.4_A1_T2"
+ },
+ {
+ "section": "15.3.4.4",
+ "description": "Checking Function.prototype.call.length",
+ "test": "//CHECK#1\nif (typeof Function.prototype.call !== \"function\") {\n $ERROR('#1: call method defined');\n}\n\n//CHECK#2\nif (typeof Function.prototype.call.length === \"undefined\") {\n $ERROR('#2: length property of call method defined');\n}\n\n//CHECK#3\nif (Function.prototype.call.length !== 1) {\n $ERROR('#3: The length property of the call method is 1');\n}\n",
+ "id": "S15.3.4.4_A2_T1"
+ },
+ {
+ "section": "15.3.4.4",
+ "description": "Checking f.call.length, where f is new Function",
+ "test": "var f=new Function;\n\n//CHECK#1\nif (typeof f.call !== \"function\") {\n $ERROR('#1: call method accessed');\n}\n\n//CHECK#2\nif (typeof f.call.length === \"undefined\") {\n $ERROR('#2: length property of call method defined');\n}\n\n//CHECK#3\nif (f.call.length !== 1) {\n $ERROR('#3: The length property of the call method is 1');\n}\n",
+ "id": "S15.3.4.4_A2_T2"
+ },
+ {
+ "section": "15.3.4.4",
+ "description": "Not any arguments at call function",
+ "test": "Function(\"this.field=\\\"strawberry\\\"\").call();\n\n//CHECK#1\nif (this[\"field\"] !== \"strawberry\") {\n $ERROR('#1: If thisArg is null or undefined, the called function is passed the global object as the this value');\n}\n",
+ "id": "S15.3.4.4_A3_T1"
+ },
+ {
+ "section": "15.3.4.4",
+ "description": "Checking by using eval, no any arguments at call function",
+ "test": "eval(\" (function(){this.feat=1}).call()\");\n\n//CHECK#1\nif (this[\"feat\"] !== 1) {\n $ERROR('#1: If thisArg is null or undefined, the called function is passed the global object as the this value');\n}\n",
+ "id": "S15.3.4.4_A3_T10"
+ },
+ {
+ "section": "15.3.4.4",
+ "description": "Argument at call function is null",
+ "test": "Function(\"this.field=\\\"green\\\"\").call(null);\n\n//CHECK#1\nif (this[\"field\"] !== \"green\") {\n $ERROR('#1: If thisArg is null or undefined, the called function is passed the global object as the this value');\n}\n",
+ "id": "S15.3.4.4_A3_T2"
+ },
+ {
+ "section": "15.3.4.4",
+ "description": "Argument at call function is void 0",
+ "test": "Function(\"this.field=\\\"battle\\\"\").call(void 0);\n\n//CHECK#1\nif (this[\"field\"] !== \"battle\") {\n $ERROR('#1: If thisArg is null or undefined, the called function is passed the global object as the this value');\n}\n",
+ "id": "S15.3.4.4_A3_T3"
+ },
+ {
+ "section": "15.3.4.4",
+ "description": "Argument at call function is undefined",
+ "test": "Function(\"this.field=\\\"oil\\\"\").call(undefined);\n\n//CHECK#1\nif (this[\"field\"] !== \"oil\") {\n $ERROR('#1: If thisArg is null or undefined, the called function is passed the global object as the this value');\n}\n",
+ "id": "S15.3.4.4_A3_T4"
+ },
+ {
+ "section": "15.3.4.4",
+ "description": "No any arguments at call function and it called inside function declaration",
+ "test": "function FACTORY(){\n Function(\"this.feat=\\\"in da haus\\\"\").call();\n};\n\nvar obj = new FACTORY;\n\n//CHECK#1\nif (this[\"feat\"] !== \"in da haus\") {\n $ERROR('#1: If thisArg is null or undefined, the called function is passed the global object as the this value');\n}\n\n//CHECK#2\nif (typeof obj.feat !== \"undefined\") {\n $ERROR('#1: If thisArg is null or undefined, the called function is passed the global object as the this value');\n}\n",
+ "id": "S15.3.4.4_A3_T5"
+ },
+ {
+ "section": "15.3.4.4",
+ "description": "Argument at call function is null and it called inside function declaration",
+ "test": "function FACTORY(){\n (function(){this.feat=\"kamon beyba\"}).call(null);\n};\n\nvar obj = new FACTORY;\n\n//CHECK#1\nif (this[\"feat\"] !== \"kamon beyba\") {\n $ERROR('#1: If thisArg is null or undefined, the called function is passed the global object as the this value');\n}\n\n//CHECK#2\nif (typeof obj.feat !== \"undefined\") {\n $ERROR('#1: If thisArg is null or undefined, the called function is passed the global object as the this value');\n}\n",
+ "id": "S15.3.4.4_A3_T6"
+ },
+ {
+ "section": "15.3.4.4",
+ "description": "Argument at call function is void 0 and it called inside function declaration",
+ "test": "(function FACTORY(){\n Function(\"this.feat=\\\"in da haus\\\"\").call(void 0);\n})();\n\n\n//CHECK#1\nif (this[\"feat\"] !== \"in da haus\") {\n $ERROR('#1: If thisArg is null or undefined, the called function is passed the global object as the this value');\n}\n",
+ "id": "S15.3.4.4_A3_T7"
+ },
+ {
+ "section": "15.3.4.4",
+ "description": "Argument at call function is undefined and it called inside function declaration",
+ "test": "(function FACTORY(){\n (function(){this.feat=\"kamon beyba\"}).call(undefined);\n})();\n\n\n//CHECK#1\nif (this[\"feat\"] !== \"kamon beyba\") {\n $ERROR('#1: If thisArg is null or undefined, the called function is passed the global object as the this value');\n}\n",
+ "id": "S15.3.4.4_A3_T8"
+ },
+ {
+ "section": "15.3.4.4",
+ "description": "Checking by using eval, argument at call function is void 0",
+ "test": "eval( \" Function(\\\"this.feat=1\\\").call(void 0) \" );\n\n\n//CHECK#1\nif (this[\"feat\"] !== 1) {\n $ERROR('#1: If thisArg is null or undefined, the called function is passed the global object as the this value');\n}\n",
+ "id": "S15.3.4.4_A3_T9"
+ },
+ {
+ "section": "15.3.4.4",
+ "description": "thisArg is number",
+ "test": "var obj=1;\n\nvar retobj = Function(\"this.touched= true; return this;\").call(obj);\n\n//CHECK#1\nif (typeof obj.touched !== \"undefined\") {\n $ERROR('#1: If thisArg is not null(defined) the called function is passed ToObject(thisArg) as the this value');\n}\n\n//CHECK#2\nif (!(retobj[\"touched\"])) {\n $ERROR('#2: If thisArg is not null(defined) the called function is passed ToObject(thisArg) as the this value');\n}\n\n",
+ "id": "S15.3.4.4_A5_T1"
+ },
+ {
+ "section": "15.3.4.4",
+ "description": "thisArg is boolean true",
+ "test": "var obj=true;\n\nvar retobj = new Function(\"this.touched= true; return this;\").call(obj);\n\n//CHECK#1\nif (typeof obj.touched !== \"undefined\") {\n $ERROR('#1: If thisArg is not null(defined) the called function is passed ToObject(thisArg) as the this value');\n}\n\n//CHECK#2\nif (!(retobj[\"touched\"])) {\n $ERROR('#2: If thisArg is not null(defined) the called function is passed ToObject(thisArg) as the this value');\n}\n\n",
+ "id": "S15.3.4.4_A5_T2"
+ },
+ {
+ "section": "15.3.4.4",
+ "description": "thisArg is string",
+ "test": "var obj=\"soap\";\n\nvar retobj = ( function(){this.touched= true; return this;} ).call(obj);\n\n//CHECK#1\nif (typeof obj.touched !== \"undefined\") {\n $ERROR('#1: If thisArg is not null(defined) the called function is passed ToObject(thisArg) as the this value');\n}\n\n//CHECK#2\nif (!(retobj[\"touched\"])) {\n $ERROR('#2: If thisArg is not null(defined) the called function is passed ToObject(thisArg) as the this value');\n}\n\n",
+ "id": "S15.3.4.4_A5_T3"
+ },
+ {
+ "section": "15.3.4.4",
+ "description": "thisArg is function variable that return this",
+ "test": "var f = function(){this.touched= true; return this;};\n\nvar retobj = f.call(obj);\n\n//CHECK#1\nif (typeof obj !== \"undefined\") {\n $ERROR('#1: If thisArg is not null(defined) the called function is passed ToObject(thisArg) as the this value');\n}\n\n//CHECK#2\nif (!(retobj[\"touched\"])) {\n $ERROR('#2: If thisArg is not null(defined) the called function is passed ToObject(thisArg) as the this value');\n}\n\nvar obj;\n",
+ "id": "S15.3.4.4_A5_T4"
+ },
+ {
+ "section": "15.3.4.4",
+ "description": "thisArg is function variable",
+ "test": "var f = function(){this.touched= true;};\n\nvar obj={};\n\nf.call(obj);\n\n//CHECK#1\nif (!(obj.touched)) {\n $ERROR('#1: If thisArg is not null(defined) the called function is passed ToObject(thisArg) as the this value');\n}\n",
+ "id": "S15.3.4.4_A5_T5"
+ },
+ {
+ "section": "15.3.4.4",
+ "description": "thisArg is new String()",
+ "test": "var obj=new String(\"soap\");\n\n( function(){this.touched= true;}).call(obj);\n\n//CHECK#1\nif (!(obj.touched)) {\n $ERROR('#1: If thisArg is not null(defined) the called function is passed ToObject(thisArg) as the this value');\n}\n",
+ "id": "S15.3.4.4_A5_T6"
+ },
+ {
+ "section": "15.3.4.4",
+ "description": "thisArg is new Number()",
+ "test": "var obj=new Number(1);\n\nFunction(\"this.touched= true;\").call(obj);\n\n//CHECK#1\nif (!(obj.touched)) {\n $ERROR('#1: If thisArg is not null(defined) the called function is passed ToObject(thisArg) as the this value');\n}\n\n",
+ "id": "S15.3.4.4_A5_T7"
+ },
+ {
+ "section": "15.3.4.4",
+ "description": "thisArg is Function()",
+ "test": "var obj=Function();\n\nnew Function(\"this.touched= true; return this;\").call(obj);\n\n//CHECK#1\nif (!(obj.touched)) {\n $ERROR('#1: If thisArg is not null(defined) the called function is passed ToObject(thisArg) as the this value');\n}\n",
+ "id": "S15.3.4.4_A5_T8"
+ },
+ {
+ "section": "15.3.4.4",
+ "description": "Argunemts of call function is (null,[1])",
+ "test": "Function(\"a1,a2,a3\",\"this.shifted=a1;\").call(null,[1]);\n\n//CHECK#1\nif (this[\"shifted\"].constructor !== Array) {\n $ERROR('#1: The call method takes one or more arguments, thisArg and (optionally) arg1, arg2 etc, and performs a function call using the [[Call]] property of the object');\n}\n\n//CHECK#2\nif (this[\"shifted\"].length !== 1) {\n $ERROR('#2: The call method takes one or more arguments, thisArg and (optionally) arg1, arg2 etc, and performs a function call using the [[Call]] property of the object');\n}\n\n//CHECK#3\nif (this[\"shifted\"][0] !== 1) {\n $ERROR('#3: The call method takes one or more arguments, thisArg and (optionally) arg1, arg2 etc, and performs a function call using the [[Call]] property of the object');\n}\n\n",
+ "id": "S15.3.4.4_A6_T1"
+ },
+ {
+ "section": "15.3.4.4",
+ "description": "Argunemts of call function is (empty object, \"\", arguments,2), inside function call without declaration used",
+ "test": "var obj={};\n\n(function (){\n Function(\"a1,a2,a3\",\"this.shifted=a1.length+a2+a3;\").call(obj,arguments,\"\",\"2\");\n})(\"\",4,2,\"a\");\n\n//CHECK#1\nif (obj[\"shifted\"] !== \"42\") {\n $ERROR('#1: The call method takes one or more arguments, thisArg and (optionally) arg1, arg2 etc, and performs a function call using the [[Call]] property of the object');\n}\n\n//CHECK#2\nif (typeof this[\"shifted\"] !== \"undefined\") {\n $ERROR('#2: The call method takes one or more arguments, thisArg and (optionally) arg1, arg2 etc, and performs a function call using the [[Call]] property of the object');\n}\n\n",
+ "id": "S15.3.4.4_A6_T10"
+ },
+ {
+ "section": "15.3.4.4",
+ "description": "Argunemts of call function is (null,[3,2,1])",
+ "test": "new Function(\"a1,a2\",\"a3\",\"this.shifted=a1;\").call(null,[3,2,1]);\n\n//CHECK#1\nif (this[\"shifted\"].length !== 3) {\n $ERROR('#1: The call method takes one or more arguments, thisArg and (optionally) arg1, arg2 etc, and performs a function call using the [[Call]] property of the object');\n}\n\n//CHECK#2\nif ((this[\"shifted\"][0] !== 3)||(this[\"shifted\"][1] !== 2)||(this[\"shifted\"][2] !== 1)) {\n $ERROR('#2: The call method takes one or more arguments, thisArg and (optionally) arg1, arg2 etc, and performs a function call using the [[Call]] property of the object');\n}\n\n",
+ "id": "S15.3.4.4_A6_T2"
+ },
+ {
+ "section": "15.3.4.4",
+ "description": "Argunemts of call function is (empty object, new Array(\"nine\",\"inch\",\"nails\"))",
+ "test": "var i=0;\n\nvar p={toString:function(){return \"a\"+(++i);}};\n\nvar obj={};\n\nFunction(p,\"a2,a3\",\"this.shifted=a1;\").call(obj, new Array(\"nine\",\"inch\",\"nails\"));\n\n//CHECK#1\nif (obj[\"shifted\"].length !== 3) {\n $ERROR('#1: The call method takes one or more arguments, thisArg and (optionally) arg1, arg2 etc, and performs a function call using the [[Call]] property of the object');\n}\n\n//CHECK#2\nif ((obj[\"shifted\"][0] !== \"nine\")||(obj[\"shifted\"][1] !== \"inch\")||(obj[\"shifted\"][2] !== \"nails\")) {\n $ERROR('#2: The call method takes one or more arguments, thisArg and (optionally) arg1, arg2 etc, and performs a function call using the [[Call]] property of the object');\n}\n\n//CHECK#3\nif (typeof this[\"shifted\"] !== \"undefined\") {\n $ERROR('#3: The call method takes one or more arguments, thisArg and (optionally) arg1, arg2 etc, and performs a function call using the [[Call]] property of the object');\n}\n\n",
+ "id": "S15.3.4.4_A6_T3"
+ },
+ {
+ "section": "15.3.4.4",
+ "description": ": Argunemts of call function is (empty object, ( function(){return arguments;})(\"a\",\"b\",\"c\",\"d\"),\"\",2);",
+ "test": "var i=0;\n\nvar p={toString:function(){return \"a\"+(++i);}};\n\nvar obj={};\n\nnew Function(p,p,p, \"this.shifted=a3+a2+a1.length;\").call( obj,( function(){return arguments;})(\"a\",\"b\",\"c\",\"d\"),\"\",2 );\n\n//CHECK#1\nif (obj[\"shifted\"] !== \"24\") {\n $ERROR('#1: The call method takes one or more arguments, thisArg and (optionally) arg1, arg2 etc, and performs a function call using the [[Call]] property of the object');\n}\n\n//CHECK#2\nif (typeof this[\"shifted\"] !== \"undefined\") {\n $ERROR('#2: The call method takes one or more arguments, thisArg and (optionally) arg1, arg2 etc, and performs a function call using the [[Call]] property of the object');\n}\n\n",
+ "id": "S15.3.4.4_A6_T4"
+ },
+ {
+ "section": "15.3.4.4",
+ "description": "Argunemts of call function is (null, arguments,\"\",2), inside function declaration used",
+ "test": "function FACTORY(){\n Function(\"a1,a2,a3\",\"this.shifted=a1.length+a2+a3;\").call(null,arguments,\"\",2);\n}\n\nvar obj=new FACTORY(\"\",1,2,\"A\");\n\n//CHECK#1\nif (this[\"shifted\"] !== \"42\") {\n $ERROR('#1: The call method takes one or more arguments, thisArg and (optionally) arg1, arg2 etc, and performs a function call using the [[Call]] property of the object');\n}\n\n//CHECK#2\nif (typeof obj.shifted !== \"undefined\") {\n $ERROR('#2: The call method takes one or more arguments, thisArg and (optionally) arg1, arg2 etc, and performs a function call using the [[Call]] property of the object');\n}\n\n",
+ "id": "S15.3.4.4_A6_T5"
+ },
+ {
+ "section": "15.3.4.4",
+ "description": "Argunemts of call function is (this, arguments,\"\",2), inside function declaration used",
+ "test": "function FACTORY(){\n Function(\"a1,a2,a3\",\"this.shifted=a1.length+a2+a3;\").call(this,arguments,\"\",2);\n}\n\nvar obj=new FACTORY(\"\",4,2,\"A\");\n\n//CHECK#1\nif (obj[\"shifted\"] !== \"42\") {\n $ERROR('#1: The call method takes one or more arguments, thisArg and (optionally) arg1, arg2 etc, and performs a function call using the [[Call]] property of the object');\n}\n\n//CHECK#2\nif (typeof this[\"shifted\"] !== \"undefined\") {\n $ERROR('#2: The call method takes one or more arguments, thisArg and (optionally) arg1, arg2 etc, and performs a function call using the [[Call]] property of the object');\n}\n\n",
+ "id": "S15.3.4.4_A6_T6"
+ },
+ {
+ "section": "15.3.4.4",
+ "description": "Argunemts of call function is (null, arguments,\"\",2), inside function call without declaration used",
+ "test": "(function (){\n Function(\"a1,a2,a3\",\"this.shifted=a1.length+a2+a3;\").call(null,arguments,\"\",2);\n})(\"\",1,2,true);\n\n//CHECK#1\nif (this[\"shifted\"] !== \"42\") {\n $ERROR('#1: The call method takes one or more arguments, thisArg and (optionally) arg1, arg2 etc, and performs a function call using the [[Call]] property of the object');\n}\n",
+ "id": "S15.3.4.4_A6_T7"
+ },
+ {
+ "section": "15.3.4.4",
+ "description": "Argunemts of call function is (this, arguments,\"\",2), inside function call without declaration used",
+ "test": "(function (){\n Function(\"a1,a2,a3\",\"this.shifted=a1.length+a2+a3;\").call(this,arguments,\"\",2);\n})(\"\",4,2,null);\n\n//CHECK#2\nif (this[\"shifted\"] !== \"42\") {\n $ERROR('#2: The call method takes one or more arguments, thisArg and (optionally) arg1, arg2 etc, and performs a function call using the [[Call]] property of the object');\n}\n\n",
+ "id": "S15.3.4.4_A6_T8"
+ },
+ {
+ "section": "15.3.4.4",
+ "description": "Argunemts of call function is (empty object, \"\", arguments,2), inside function declaration used",
+ "test": "function FACTORY(){\n var obj = {};\n Function(\"a1,a2,a3\",\"this.shifted=a1+a2.length+a3;\").call(obj,\"\",arguments,2);\n return obj;\n}\n\nvar obj=new FACTORY(\"\",1,2,void 0);\n\n//CHECK#1\nif (typeof this[\"shifted\"] !== \"undefined\") {\n $ERROR('#1: If argArray is either an array or an arguments object, the function is passed the...');\n}\n\n//CHECK#2\nif (obj.shifted !== \"42\") {\n $ERROR('#2: If argArray is either an array or an arguments object, the function is passed the...');\n}\n\n",
+ "id": "S15.3.4.4_A6_T9"
+ },
+ {
+ "section": "15.3.4.4",
+ "description": "Checking if creating \"new Function.prototype.call\" fails",
+ "test": "try {\n var obj = new Function.prototype.call;\n $ERROR('#1: Function.prototype.call can\\'t be used as [[create]] caller');\n} catch (e) {\n if (!(e instanceof TypeError)) {\n \t$ERROR('#1.1: Function.prototype.call can\\'t be used as [[create]] caller');\n }\n}\n",
+ "id": "S15.3.4.4_A7_T1"
+ },
+ {
+ "section": "15.3.4.4",
+ "description": "Checking if creating \"new Function.prototype.call()\" fails",
+ "test": "try {\n var FACTORY = Function.prototype.call;\n var obj = new FACTORY();\n $ERROR('#1: Function.prototype.call can\\'t be used as [[create]] caller');\n} catch (e) {\n if (!(e instanceof TypeError)) {\n \t$ERROR('#1.1: Function.prototype.call can\\'t be used as [[create]] caller');\n }\n}\n",
+ "id": "S15.3.4.4_A7_T2"
+ },
+ {
+ "section": "15.3.4.4",
+ "description": "Checking if creating \"new Function.call\" fails",
+ "test": "try {\n var obj = new Function.call;\n $ERROR('#1: Function.prototype.call can\\'t be used as [[create]] caller');\n} catch (e) {\n if (!(e instanceof TypeError)) {\n \t$ERROR('#1.1: Function.prototype.call can\\'t be used as [[create]] caller');\n }\n}\n",
+ "id": "S15.3.4.4_A7_T3"
+ },
+ {
+ "section": "15.3.4.4",
+ "description": "Checking if creating \"new (Function(\"this.p1=1\").call)\" fails",
+ "test": "try {\n var obj = new (Function(\"this.p1=1\").call);\n $ERROR('#1: Function.prototype.call can\\'t be used as [[create]] caller');\n} catch (e) {\n if (!(e instanceof TypeError)) {\n \t$ERROR('#1.1: Function.prototype.call can\\'t be used as [[create]] caller');\n }\n}\n",
+ "id": "S15.3.4.4_A7_T4"
+ },
+ {
+ "section": "15.3.4.4",
+ "description": "Checking if creating \"new Function(\"this.p1=1\").call\" fails",
+ "test": "try {\n var FACTORY = Function(\"this.p1=1\").call;\n var obj = new FACTORY();\n $ERROR('#1: Function.prototype.call can\\'t be used as [[create]] caller');\n} catch (e) {\n if (!(e instanceof TypeError)) {\n \t$ERROR('#1.1: Function.prototype.call can\\'t be used as [[create]] caller');\n }\n}\n",
+ "id": "S15.3.4.4_A7_T5"
+ },
+ {
+ "section": "15.3.4.4",
+ "description": ": Checking if creating \"new (Function(\"function f(){this.p1=1;};return f\").call())\" fails;",
+ "test": "//CHECK#1\ntry {\n var obj = new (Function(\"function f(){this.p1=1;};return f\").call());\n} catch (e) {\n $ERROR('#1: Function.prototype.call can\\'t be used as [[create]] caller');\n}\n\n//CHECK#2\nif (obj.p1!== 1) {\n $ERROR('#2: Function.prototype.call can\\'t be used as [[create]] caller');\n}\n",
+ "id": "S15.3.4.4_A7_T6"
+ },
+ {
+ "section": "15.3.4.4",
+ "description": "Checking if deleting the Function.prototype.call.length property fails",
+ "test": "//CHECK#0\nif (!(Function.prototype.call.hasOwnProperty('length'))) {\n $FAIL('#0: the Function.prototype.call has length property');\n}\n\n//CHECK#1\nif (delete Function.prototype.call.length) {\n $ERROR('#1: The Function.prototype.call.length property has the attributes DontDelete');\n}\n\n//CHECK#2\nif (!(Function.prototype.call.hasOwnProperty('length'))) {\n $FAIL('#2: The Function.prototype.call.length property has the attributes DontDelete');\n}\n",
+ "id": "S15.3.4.4_A9"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.3.4.5.1.json b/website/resources/scripts/testcases2/15.3.4.5.1.json
new file mode 100644
index 000000000..e3ed6946e
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.3.4.5.1.json
@@ -0,0 +1,113 @@
+{
+ "testCollection": {
+ "name": "15.3.4.5.1",
+ "numTests": 15,
+ "tests": [
+ {
+ "id": "15.3.4.5.1-4-1",
+ "path": "TestCases/chapter15/15.3/15.3.4/15.3.4.5.1/15.3.4.5.1-4-1.js",
+ "description": "[[Call]] - 'F''s [[BoundArgs]] is used as the former part of arguments of calling the [[Call]] internal method of 'F''s [[TargetFunction]] when 'F' is called",
+ "test": "assertTrue((function testcase() {\n var func = function (x, y, z) {\n return x + y + z;\n };\n\n var newFunc = Function.prototype.bind.call(func, {}, \"a\", \"b\", \"c\");\n\n return newFunc() === \"abc\";\n }).call(this));\n",
+ "precondition": "(fnExists(Function.prototype.bind))"
+ },
+ {
+ "id": "15.3.4.5.1-4-10",
+ "path": "TestCases/chapter15/15.3/15.3.4/15.3.4.5.1/15.3.4.5.1-4-10.js",
+ "description": "[[Call]] - length of parameters of 'target' is 1, length of 'boundArgs' is 0, length of 'ExtraArgs' is 0, and with 'boundThis'",
+ "test": "assertTrue((function testcase() {\n var obj = { prop: \"abc\" };\n\n var func = function (x) {\n return this === obj && typeof x === \"undefined\";\n };\n\n var newFunc = Function.prototype.bind.call(func, obj);\n\n return newFunc();\n }).call(this));\n",
+ "precondition": "(fnExists(Function.prototype.bind))"
+ },
+ {
+ "id": "15.3.4.5.1-4-11",
+ "path": "TestCases/chapter15/15.3/15.3.4/15.3.4.5.1/15.3.4.5.1-4-11.js",
+ "description": "[[Call]] - length of parameters of 'target' is 1, length of 'boundArgs' is 0, length of 'ExtraArgs' is 1, and with 'boundThis'",
+ "test": "assertTrue((function testcase() {\n var obj = { prop: \"abc\" };\n\n var func = function (x) {\n return this === obj && x === 1 && arguments[0] === 1 && arguments.length === 1 && this.prop === \"abc\";\n };\n\n var newFunc = Function.prototype.bind.call(func, obj);\n\n return newFunc(1);\n }).call(this));\n",
+ "precondition": "(fnExists(Function.prototype.bind))"
+ },
+ {
+ "id": "15.3.4.5.1-4-12",
+ "path": "TestCases/chapter15/15.3/15.3.4/15.3.4.5.1/15.3.4.5.1-4-12.js",
+ "description": "[[Call]] - length of parameters of 'target' is 1, length of 'boundArgs' is 0, length of 'ExtraArgs' is 2, and with 'boundThis'",
+ "test": "assertTrue((function testcase() {\n var obj = { prop: \"abc\" };\n\n var func = function (x) {\n return this === obj && x === 1 && arguments[1] === 2 &&\n arguments[0] === 1 && arguments.length === 2 && this.prop === \"abc\";\n };\n\n var newFunc = Function.prototype.bind.call(func, obj);\n\n return newFunc(1, 2);\n }).call(this));\n",
+ "precondition": "(fnExists(Function.prototype.bind))"
+ },
+ {
+ "id": "15.3.4.5.1-4-13",
+ "path": "TestCases/chapter15/15.3/15.3.4/15.3.4.5.1/15.3.4.5.1-4-13.js",
+ "description": "[[Call]] - length of parameters of 'target' is 1, length of 'boundArgs' is 1, length of 'ExtraArgs' is 0, and with 'boundThis'",
+ "test": "assertTrue((function testcase() {\n var obj = { prop: \"abc\" };\n\n var func = function (x) {\n return this === obj && x === 1 &&\n arguments[0] === 1 && arguments.length === 1 && this.prop === \"abc\";\n };\n\n var newFunc = Function.prototype.bind.call(func, obj, 1);\n\n return newFunc();\n }).call(this));\n",
+ "precondition": "(fnExists(Function.prototype.bind))"
+ },
+ {
+ "id": "15.3.4.5.1-4-14",
+ "path": "TestCases/chapter15/15.3/15.3.4/15.3.4.5.1/15.3.4.5.1-4-14.js",
+ "description": "[[Call]] - length of parameters of 'target' is 1, length of 'boundArgs' is 1, length of 'ExtraArgs' is 1, and with 'boundThis'",
+ "test": "assertTrue((function testcase() {\n var obj = { prop: \"abc\" };\n\n var func = function (x) {\n return this === obj && x === 1 && arguments[1] === 2\n arguments[0] === 1 && arguments.length === 2 && this.prop === \"abc\";\n };\n\n var newFunc = Function.prototype.bind.call(func, obj, 1);\n\n return newFunc(2);\n }).call(this));\n",
+ "precondition": "(fnExists(Function.prototype.bind))"
+ },
+ {
+ "id": "15.3.4.5.1-4-15",
+ "path": "TestCases/chapter15/15.3/15.3.4/15.3.4.5.1/15.3.4.5.1-4-15.js",
+ "description": "[[Call]] - length of parameters of 'target' is 1, length of 'boundArgs' is 2, length of 'ExtraArgs' is 0, and with 'boundThis'",
+ "test": "assertTrue((function testcase() {\n var obj = { prop: \"abc\" };\n\n var func = function (x) {\n return this === obj && x === 1 && arguments[1] === 2 &&\n arguments[0] === 1 && arguments.length === 2 && this.prop === \"abc\";\n };\n\n var newFunc = Function.prototype.bind.call(func, obj, 1, 2);\n\n return newFunc();\n }).call(this));\n",
+ "precondition": "(fnExists(Function.prototype.bind))"
+ },
+ {
+ "id": "15.3.4.5.1-4-2",
+ "path": "TestCases/chapter15/15.3/15.3.4/15.3.4.5.1/15.3.4.5.1-4-2.js",
+ "description": "[[Call]] - 'F''s [[BoundThis]] is used as the 'this' value of calling the [[Call]] internal method of 'F''s [[TargetFunction]] when 'F' is called",
+ "test": "assertTrue((function testcase() {\n var obj = { \"prop\": \"a\" };\n\n var func = function () {\n return this;\n };\n\n var newFunc = Function.prototype.bind.call(func, obj);\n\n return newFunc() === obj;\n }).call(this));\n",
+ "precondition": "(fnExists(Function.prototype.bind))"
+ },
+ {
+ "id": "15.3.4.5.1-4-3",
+ "path": "TestCases/chapter15/15.3/15.3.4/15.3.4.5.1/15.3.4.5.1-4-3.js",
+ "description": "[[Call]] - the provided arguments is used as the latter part of arguments of calling the [[Call]] internal method of 'F''s [[TargetFunction]] when 'F' is called",
+ "test": "assertTrue((function testcase() {\n var func = function (x, y, z) {\n return z;\n };\n\n var newFunc = Function.prototype.bind.call(func, {}, \"a\", \"b\");\n\n return newFunc(\"c\") === \"c\";\n }).call(this));\n",
+ "precondition": "(fnExists(Function.prototype.bind))"
+ },
+ {
+ "id": "15.3.4.5.1-4-4",
+ "path": "TestCases/chapter15/15.3/15.3.4/15.3.4.5.1/15.3.4.5.1-4-4.js",
+ "description": "[[Call]] - length of parameters of 'target' is 0, length of 'boundArgs' is 0, length of 'ExtraArgs' is 0, and without 'boundThis'",
+ "test": "assertTrue((function testcase() {\n var func = function () {\n return arguments.length === 0;\n };\n\n var newFunc = Function.prototype.bind.call(func);\n\n return newFunc();\n }).call(this));\n",
+ "precondition": "(fnExists(Function.prototype.bind))"
+ },
+ {
+ "id": "15.3.4.5.1-4-5",
+ "path": "TestCases/chapter15/15.3/15.3.4/15.3.4.5.1/15.3.4.5.1-4-5.js",
+ "description": "[[Call]] - length of parameters of 'target' is 0, length of 'boundArgs' is 0, length of 'ExtraArgs' is 1, and without 'boundThis'",
+ "test": "assertTrue((function testcase() {\n var func = function () {\n return arguments[0] === 1;\n };\n\n var newFunc = Function.prototype.bind.call(func);\n\n return newFunc(1);\n }).call(this));\n",
+ "precondition": "(fnExists(Function.prototype.bind))"
+ },
+ {
+ "id": "15.3.4.5.1-4-6",
+ "path": "TestCases/chapter15/15.3/15.3.4/15.3.4.5.1/15.3.4.5.1-4-6.js",
+ "description": "[[Call]] - length of parameters of 'target' is 0, length of 'boundArgs' is 0, length of 'ExtraArgs' is 0, and with 'boundThis'",
+ "test": "assertTrue((function testcase() {\n var obj = { prop: \"abc\" };\n\n var func = function () {\n return this === obj && arguments.length === 0;\n };\n\n var newFunc = Function.prototype.bind.call(func, obj);\n\n return newFunc();\n }).call(this));\n",
+ "precondition": "(fnExists(Function.prototype.bind))"
+ },
+ {
+ "id": "15.3.4.5.1-4-7",
+ "path": "TestCases/chapter15/15.3/15.3.4/15.3.4.5.1/15.3.4.5.1-4-7.js",
+ "description": "[[Call]] - length of parameters of 'target' is 0, length of 'boundArgs' is 1, length of 'ExtraArgs' is 0, and with 'boundThis'",
+ "test": "assertTrue((function testcase() {\n var obj = { prop: \"abc\" };\n\n var func = function () {\n return this === obj && arguments[0] === 1;\n };\n\n var newFunc = Function.prototype.bind.call(func, obj, 1);\n\n return newFunc();\n }).call(this));\n",
+ "precondition": "(fnExists(Function.prototype.bind))"
+ },
+ {
+ "id": "15.3.4.5.1-4-8",
+ "path": "TestCases/chapter15/15.3/15.3.4/15.3.4.5.1/15.3.4.5.1-4-8.js",
+ "description": "[[Call]] - length of parameters of 'target' is 0, length of 'boundArgs' is 0, length of 'ExtraArgs' is 1, and with 'boundThis'",
+ "test": "assertTrue((function testcase() {\n var obj = { prop: \"abc\" };\n\n var func = function () {\n return this === obj && arguments[0] === 1;\n };\n\n var newFunc = Function.prototype.bind.call(func, obj);\n\n return newFunc(1);\n }).call(this));\n",
+ "precondition": "(fnExists(Function.prototype.bind))"
+ },
+ {
+ "id": "15.3.4.5.1-4-9",
+ "path": "TestCases/chapter15/15.3/15.3.4/15.3.4.5.1/15.3.4.5.1-4-9.js",
+ "description": "[[Call]] - length of parameters of 'target' is 0, length of 'boundArgs' is 1, length of 'ExtraArgs' is 1, and with 'boundThis'",
+ "test": "assertTrue((function testcase() {\n var obj = { prop: \"abc\" };\n\n var func = function () {\n return this === obj && arguments[0] === 1 && arguments[1] === 2;\n };\n\n var newFunc = Function.prototype.bind.call(func, obj, 1);\n\n return newFunc(2);\n }).call(this));\n",
+ "precondition": "(fnExists(Function.prototype.bind))"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.3.4.5.2.json b/website/resources/scripts/testcases2/15.3.4.5.2.json
new file mode 100644
index 000000000..3f8a1ca57
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.3.4.5.2.json
@@ -0,0 +1,106 @@
+{
+ "testCollection": {
+ "name": "15.3.4.5.2",
+ "numTests": 14,
+ "tests": [
+ {
+ "id": "15.3.4.5.2-4-1",
+ "path": "TestCases/chapter15/15.3/15.3.4/15.3.4.5.2/15.3.4.5.2-4-1.js",
+ "description": "[[Construct]] - 'F''s [[BoundArgs]] is used as the former part of arguments of calling the [[Construct]] internal method of 'F''s [[TargetFunction]] when 'F' is called as constructor",
+ "test": "assertTrue((function testcase() {\n var func = function (x, y, z) {\n var objResult = {};\n objResult.returnValue = x + y + z;\n objResult.returnVerifyResult = arguments[0] === \"a\" && arguments.length === 3;\n return objResult;\n };\n\n var NewFunc = Function.prototype.bind.call(func, {}, \"a\", \"b\", \"c\");\n\n var newInstance = new NewFunc();\n\n return newInstance.hasOwnProperty(\"returnValue\") && newInstance.returnValue === \"abc\" &&\n newInstance.hasOwnProperty(\"returnVerifyResult\") && newInstance.returnVerifyResult === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Function.prototype.bind))"
+ },
+ {
+ "id": "15.3.4.5.2-4-10",
+ "path": "TestCases/chapter15/15.3/15.3.4/15.3.4.5.2/15.3.4.5.2-4-10.js",
+ "description": "[[Construct]] - length of parameters of 'target' is 1, length of 'boundArgs' is 0, length of 'ExtraArgs' is 1",
+ "test": "assertTrue((function testcase() {\n var func = function (x) {\n return new Boolean(arguments.length === 1 && x === 1 && arguments[0] === 1);\n };\n\n var NewFunc = Function.prototype.bind.call(func, {});\n\n var newInstance = new NewFunc(1);\n\n return newInstance.valueOf() === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Function.prototype.bind))"
+ },
+ {
+ "id": "15.3.4.5.2-4-11",
+ "path": "TestCases/chapter15/15.3/15.3.4/15.3.4.5.2/15.3.4.5.2-4-11.js",
+ "description": "[[Construct]] - length of parameters of 'target' is 1, length of 'boundArgs' is 0, length of 'ExtraArgs' is 2",
+ "test": "assertTrue((function testcase() {\n var func = function (x) {\n return new Boolean(arguments.length === 2 && x === 1 && arguments[1] === 2 && arguments[0] === 1);\n };\n\n var NewFunc = Function.prototype.bind.call(func, {});\n\n var newInstance = new NewFunc(1, 2);\n\n return newInstance.valueOf() === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Function.prototype.bind))"
+ },
+ {
+ "id": "15.3.4.5.2-4-12",
+ "path": "TestCases/chapter15/15.3/15.3.4/15.3.4.5.2/15.3.4.5.2-4-12.js",
+ "description": "[[Construct]] - length of parameters of 'target' is 1, length of 'boundArgs' is 1, length of 'ExtraArgs' is 0",
+ "test": "assertTrue((function testcase() {\n var func = function (x) {\n return new Boolean(arguments.length === 1 && x === 1 && arguments[0] === 1);\n };\n\n var NewFunc = Function.prototype.bind.call(func, {}, 1);\n\n var newInstance = new NewFunc();\n\n return newInstance.valueOf() === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Function.prototype.bind))"
+ },
+ {
+ "id": "15.3.4.5.2-4-13",
+ "path": "TestCases/chapter15/15.3/15.3.4/15.3.4.5.2/15.3.4.5.2-4-13.js",
+ "description": "[[Construct]] - length of parameters of 'target' is 1, length of 'boundArgs' is 1, length of 'ExtraArgs' is 1",
+ "test": "assertTrue((function testcase() {\n var func = function (x) {\n return new Boolean(arguments.length === 2 && x === 1 && arguments[1] === 2 && arguments[0] === 1);\n };\n\n var NewFunc = Function.prototype.bind.call(func, {}, 1);\n\n var newInstance = new NewFunc(2);\n\n return newInstance.valueOf() === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Function.prototype.bind))"
+ },
+ {
+ "id": "15.3.4.5.2-4-14",
+ "path": "TestCases/chapter15/15.3/15.3.4/15.3.4.5.2/15.3.4.5.2-4-14.js",
+ "description": "[[Construct]] - length of parameters of 'target' is 1, length of 'boundArgs' is 2, length of 'ExtraArgs' is 0",
+ "test": "assertTrue((function testcase() {\n var func = function (x) {\n return new Boolean(arguments.length === 2 && x === 1 && arguments[1] === 2 && arguments[0] === 1);\n };\n\n var NewFunc = Function.prototype.bind.call(func, {}, 1, 2);\n\n var newInstance = new NewFunc();\n\n return newInstance.valueOf() === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Function.prototype.bind))"
+ },
+ {
+ "id": "15.3.4.5.2-4-2",
+ "path": "TestCases/chapter15/15.3/15.3.4/15.3.4.5.2/15.3.4.5.2-4-2.js",
+ "description": "[[Construct]] - the provided arguments is used as the latter part of arguments of calling the [[Construct]] internal method of 'F''s [[TargetFunction]] when 'F' is called as constructor",
+ "test": "assertTrue((function testcase() {\n var func = function (x, y, z) {\n var objResult = {};\n objResult.returnValue = x + y + z;\n objResult.returnVerifyResult = arguments[0] === \"a\" && arguments.length === 3;\n return objResult;\n };\n\n var NewFunc = Function.prototype.bind.call(func, {});\n\n var newInstance = new NewFunc(\"a\", \"b\", \"c\");\n\n return newInstance.hasOwnProperty(\"returnValue\") && newInstance.returnValue === \"abc\" &&\n newInstance.hasOwnProperty(\"returnVerifyResult\") && newInstance.returnVerifyResult === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Function.prototype.bind))"
+ },
+ {
+ "id": "15.3.4.5.2-4-3",
+ "path": "TestCases/chapter15/15.3/15.3.4/15.3.4.5.2/15.3.4.5.2-4-3.js",
+ "description": "[[Construct]] - length of parameters of 'target' is 0, length of 'boundArgs' is 0, length of 'ExtraArgs' is 0, and without 'boundThis'",
+ "test": "assertTrue((function testcase() {\n var func = function () {\n return new Boolean(arguments.length === 0);\n };\n\n var NewFunc = Function.prototype.bind.call(func);\n\n var newInstance = new NewFunc();\n\n return newInstance.valueOf() === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Function.prototype.bind))"
+ },
+ {
+ "id": "15.3.4.5.2-4-4",
+ "path": "TestCases/chapter15/15.3/15.3.4/15.3.4.5.2/15.3.4.5.2-4-4.js",
+ "description": "[[Construct]] - length of parameters of 'target' is 0, length of 'boundArgs' is 0, length of 'ExtraArgs' is 1, and without 'boundThis'",
+ "test": "assertTrue((function testcase() {\n var func = function () {\n return new Boolean(arguments[0] === 1 && arguments.length === 1);\n };\n\n var NewFunc = Function.prototype.bind.call(func);\n\n var newInstance = new NewFunc(1);\n\n return newInstance.valueOf() === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Function.prototype.bind))"
+ },
+ {
+ "id": "15.3.4.5.2-4-5",
+ "path": "TestCases/chapter15/15.3/15.3.4/15.3.4.5.2/15.3.4.5.2-4-5.js",
+ "description": "[[Construct]] - length of parameters of 'target' is 0, length of 'boundArgs' is 0, length of 'ExtraArgs' is 0, and with 'boundThis'",
+ "test": "assertTrue((function testcase() {\n var obj = { prop: \"abc\" };\n\n try {\n Object.prototype.verifyThis = \"verifyThis\";\n var func = function () {\n return new Boolean(arguments.length === 0 && Object.prototype.toString.call(this) === \"[object Object]\" &&\n this.verifyThis === \"verifyThis\");\n };\n\n var NewFunc = Function.prototype.bind.call(func, obj);\n\n var newInstance = new NewFunc();\n\n return newInstance.valueOf();\n } finally {\n delete Object.prototype.verifyThis;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Function.prototype.bind))"
+ },
+ {
+ "id": "15.3.4.5.2-4-6",
+ "path": "TestCases/chapter15/15.3/15.3.4/15.3.4.5.2/15.3.4.5.2-4-6.js",
+ "description": "[[Construct]] - length of parameters of 'target' is 0, length of 'boundArgs' is 1, length of 'ExtraArgs' is 0",
+ "test": "assertTrue((function testcase() {\n var func = function () {\n return new Boolean(arguments.length === 1 && arguments[0] === 1);\n };\n\n var NewFunc = Function.prototype.bind.call(func, {}, 1);\n\n var newInstance = new NewFunc();\n\n return newInstance.valueOf() === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Function.prototype.bind))"
+ },
+ {
+ "id": "15.3.4.5.2-4-7",
+ "path": "TestCases/chapter15/15.3/15.3.4/15.3.4.5.2/15.3.4.5.2-4-7.js",
+ "description": "[[Construct]] - length of parameters of 'target' is 0, length of 'boundArgs' is 0, length of 'ExtraArgs' is 1",
+ "test": "assertTrue((function testcase() {\n var func = function () {\n return new Boolean(arguments.length === 1 && arguments[0] === 1);\n };\n\n var NewFunc = Function.prototype.bind.call(func, {});\n\n var newInstance = new NewFunc(1);\n\n return newInstance.valueOf() === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Function.prototype.bind))"
+ },
+ {
+ "id": "15.3.4.5.2-4-8",
+ "path": "TestCases/chapter15/15.3/15.3.4/15.3.4.5.2/15.3.4.5.2-4-8.js",
+ "description": "[[Construct]] - length of parameters of 'target' is 0, length of 'boundArgs' is 1, length of 'ExtraArgs' is 1",
+ "test": "assertTrue((function testcase() {\n var func = function () {\n return new Boolean(arguments.length === 2 && arguments[0] === 1 && arguments[1] === 2);\n };\n\n var NewFunc = Function.prototype.bind.call(func, {}, 1);\n\n var newInstance = new NewFunc(2);\n\n return newInstance.valueOf() === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Function.prototype.bind))"
+ },
+ {
+ "id": "15.3.4.5.2-4-9",
+ "path": "TestCases/chapter15/15.3/15.3.4/15.3.4.5.2/15.3.4.5.2-4-9.js",
+ "description": "[[Construct]] - length of parameters of 'target' is 1, length of 'boundArgs' is 0, length of 'ExtraArgs' is 0",
+ "test": "assertTrue((function testcase() {\n var func = function (x) {\n return new Boolean(arguments.length === 0 && typeof x === \"undefined\");\n };\n\n var NewFunc = Function.prototype.bind.call(func, {});\n\n var newInstance = new NewFunc();\n\n return newInstance.valueOf() === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Function.prototype.bind))"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.3.4.5.json b/website/resources/scripts/testcases2/15.3.4.5.json
new file mode 100644
index 000000000..91fee9b61
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.3.4.5.json
@@ -0,0 +1,427 @@
+{
+ "testCollection": {
+ "name": "15.3.4.5",
+ "numTests": 60,
+ "tests": [
+ {
+ "id": "15.3.4.5-0-1",
+ "path": "TestCases/chapter15/15.3/15.3.4/15.3.4.5/15.3.4.5-0-1.js",
+ "description": "Function.prototype.bind must exist as a function",
+ "test": "assertTrue((function testcase() {\n var f = Function.prototype.bind;\n\n if (typeof(f) === \"function\") {\n return true;\n }\n }).call(this));\n"
+ },
+ {
+ "id": "15.3.4.5-0-2",
+ "path": "TestCases/chapter15/15.3/15.3.4/15.3.4.5/15.3.4.5-0-2.js",
+ "description": "Function.prototype.bind must exist as a function taking 1 parameter",
+ "test": "assertTrue((Function.prototype.bind.length === 1));\n",
+ "precondition": "(fnExists(Function.prototype.bind))"
+ },
+ {
+ "id": "15.3.4.5-10-1",
+ "path": "TestCases/chapter15/15.3/15.3.4/15.3.4.5/15.3.4.5-10-1.js",
+ "description": "Function.prototype.bind - internal property [[Class]] of 'F' is set as Function",
+ "test": "assertTrue((function testcase() {\n\n var foo = function () { };\n\n var obj = foo.bind({});\n return Object.prototype.toString.call(obj) === \"[object Function]\";\n }).call(this));\n",
+ "precondition": "(fnExists(Function.prototype.bind))"
+ },
+ {
+ "id": "15.3.4.5-11-1",
+ "path": "TestCases/chapter15/15.3/15.3.4/15.3.4.5/15.3.4.5-11-1.js",
+ "description": "Function.prototype.bind - internal property [[Prototype]] of 'F' is set as Function.prototype",
+ "test": "assertTrue((function testcase() {\n\n var foo = function () { };\n try {\n Function.prototype.property = 12;\n var obj = foo.bind({});\n\n return obj.property === 12;\n } finally {\n delete Function.prototype.property;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Function.prototype.bind))"
+ },
+ {
+ "id": "15.3.4.5-13.b-1",
+ "path": "TestCases/chapter15/15.3/15.3.4/15.3.4.5/15.3.4.5-13.b-1.js",
+ "description": "Function.prototype.bind, bound fn has a 'length' own property",
+ "test": "assertTrue((function testcase() {\n function foo() { }\n var o = {};\n \n var bf = foo.bind(o);\n if (bf.hasOwnProperty('length')) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Function.prototype.bind))"
+ },
+ {
+ "id": "15.3.4.5-13.b-2",
+ "path": "TestCases/chapter15/15.3/15.3.4/15.3.4.5/15.3.4.5-13.b-2.js",
+ "description": "Function.prototype.bind, 'length' set to remaining number of expected args",
+ "test": "assertTrue((function testcase() {\n function foo(x, y) { }\n var o = {};\n \n var bf = foo.bind(o);\n if (bf.length === 2) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Function.prototype.bind))"
+ },
+ {
+ "id": "15.3.4.5-13.b-3",
+ "path": "TestCases/chapter15/15.3/15.3.4/15.3.4.5/15.3.4.5-13.b-3.js",
+ "description": "Function.prototype.bind, 'length' set to remaining number of expected args (all args prefilled)",
+ "test": "assertTrue((function testcase() {\n function foo(x, y) { }\n var o = {};\n \n var bf = foo.bind(o, 42, 101);\n if (bf.length === 0) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Function.prototype.bind))"
+ },
+ {
+ "id": "15.3.4.5-13.b-4",
+ "path": "TestCases/chapter15/15.3/15.3.4/15.3.4.5/15.3.4.5-13.b-4.js",
+ "description": "Function.prototype.bind, 'length' set to remaining number of expected args (target takes 0 args)",
+ "test": "assertTrue((function testcase() {\n function foo() { }\n var o = {};\n \n var bf = foo.bind(o);\n if (bf.length === 0) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Function.prototype.bind))"
+ },
+ {
+ "id": "15.3.4.5-13.b-5",
+ "path": "TestCases/chapter15/15.3/15.3.4/15.3.4.5/15.3.4.5-13.b-5.js",
+ "description": "Function.prototype.bind, 'length' set to remaining number of expected args (target provided extra args)",
+ "test": "assertTrue((function testcase() {\n function foo() { }\n var o = {};\n \n var bf = foo.bind(o, 42);\n if (bf.length === 0) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Function.prototype.bind))"
+ },
+ {
+ "id": "15.3.4.5-13.b-6",
+ "path": "TestCases/chapter15/15.3/15.3.4/15.3.4.5/15.3.4.5-13.b-6.js",
+ "description": "Function.prototype.bind, 'length' set to remaining number of expected args",
+ "test": "assertTrue((function testcase() {\n function foo(x, y) { }\n var o = {};\n\n var bf = foo.bind(o, 42);\n if (bf.length === 1) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Function.prototype.bind))"
+ },
+ {
+ "id": "15.3.4.5-15-1",
+ "path": "TestCases/chapter15/15.3/15.3.4/15.3.4.5/15.3.4.5-15-1.js",
+ "description": "Function.prototype.bind, 'length' is a data valued own property",
+ "test": "assertTrue((function testcase() {\n function foo() { }\n var o = {};\n \n var bf = foo.bind(o);\n var desc = Object.getOwnPropertyDescriptor(bf, 'length');\n if (desc.hasOwnProperty('value') === true &&\n desc.hasOwnProperty('get') === false &&\n desc.hasOwnProperty('set') === false) {\n return true;\n } \n }).call(this));\n",
+ "precondition": "(fnExists(Function.prototype.bind) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.3.4.5-15-2",
+ "path": "TestCases/chapter15/15.3/15.3.4/15.3.4.5/15.3.4.5-15-2.js",
+ "description": "Function.prototype.bind, 'length' is a data valued own property with default attributes (false)",
+ "test": "assertTrue((function testcase() {\n function foo() { }\n var o = {};\n \n var bf = foo.bind(o);\n var desc = Object.getOwnPropertyDescriptor(bf, 'length');\n if (desc.value === 0 &&\n desc.enumerable === false &&\n desc.writable === false &&\n desc.configurable == false) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Function.prototype.bind) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.3.4.5-15-3",
+ "path": "TestCases/chapter15/15.3/15.3.4/15.3.4.5/15.3.4.5-15-3.js",
+ "description": "Function.prototype.bind - The [[Writable]] attribute of length property in F set as false",
+ "test": "assertTrue((function testcase() {\n\n var canWritable = false;\n var hasProperty = false;\n function foo() { }\n var obj = foo.bind({});\n hasProperty = obj.hasOwnProperty(\"length\");\n obj.length = 100;\n canWritable = (obj.length === 100);\n return hasProperty && !canWritable;\n }).call(this));\n",
+ "precondition": "(fnExists(Function.prototype.bind))"
+ },
+ {
+ "id": "15.3.4.5-15-4",
+ "path": "TestCases/chapter15/15.3/15.3.4/15.3.4.5/15.3.4.5-15-4.js",
+ "description": "Function.prototype.bind - The [[Enumerable]] attribute of length property in F set as false",
+ "test": "assertTrue((function testcase() {\n\n var canEnumerable = false;\n var hasProperty = false;\n function foo() { }\n var obj = foo.bind({});\n hasProperty = obj.hasOwnProperty(\"length\");\n for (var prop in obj) {\n if (prop === \"length\") {\n canEnumerable = true;\n }\n }\n return hasProperty && !canEnumerable;\n }).call(this));\n",
+ "precondition": "(fnExists(Function.prototype.bind))"
+ },
+ {
+ "id": "15.3.4.5-15-5",
+ "path": "TestCases/chapter15/15.3/15.3.4/15.3.4.5/15.3.4.5-15-5.js",
+ "description": "Function.prototype.bind - The [[Configurable]] attribute of length property in F set as false",
+ "test": "assertTrue((function testcase() {\n\n var canConfigurable = false;\n var hasProperty = false;\n function foo() { }\n var obj = foo.bind({});\n hasProperty = obj.hasOwnProperty(\"length\");\n delete obj.caller;\n canConfigurable = !obj.hasOwnProperty(\"length\");\n return hasProperty && !canConfigurable;\n }).call(this));\n",
+ "precondition": "(fnExists(Function.prototype.bind))"
+ },
+ {
+ "id": "15.3.4.5-16-1",
+ "path": "TestCases/chapter15/15.3/15.3.4/15.3.4.5/15.3.4.5-16-1.js",
+ "description": "Function.prototype.bind, [[Extensible]] of the bound fn is true",
+ "test": "assertTrue((function testcase() {\n function foo() { }\n var o = {};\n \n var bf = foo.bind(o);\n var ex = Object.isExtensible(bf);\n if (ex === true) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Function.prototype.bind) && fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.3.4.5-16-2",
+ "path": "TestCases/chapter15/15.3/15.3.4/15.3.4.5/15.3.4.5-16-2.js",
+ "description": "Function.prototype.bind - The [[Extensible]] attribute of internal property in F set as true",
+ "test": "assertTrue((function testcase() {\n\n function foo() { }\n var obj = foo.bind({});\n obj.property = 12;\n return obj.hasOwnProperty(\"property\");\n }).call(this));\n",
+ "precondition": "(fnExists(Function.prototype.bind))"
+ },
+ {
+ "id": "15.3.4.5-2-1",
+ "path": "TestCases/chapter15/15.3/15.3.4/15.3.4.5/15.3.4.5-2-1.js",
+ "description": "Function.prototype.bind throws TypeError if the Target is not callable (but an instance of Function)",
+ "test": "assertTrue((function testcase() {\n foo.prototype = Function.prototype;\n // dummy function\n function foo() {}\n var f = new foo();\n\n try {\n f.bind();\n }\n catch (e) {\n if (e instanceof TypeError) {\n return true;\n }\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Function.prototype.bind))"
+ },
+ {
+ "id": "15.3.4.5-2-10",
+ "path": "TestCases/chapter15/15.3/15.3.4/15.3.4.5/15.3.4.5-2-10.js",
+ "description": "Function.prototype.bind throws TypeError if 'Target' is undefined",
+ "test": "assertTrue((function testcase() {\n try {\n Function.prototype.bind.call(undefined);\n return false;\n } catch (e) {\n return (e instanceof TypeError);\n } \n }).call(this));\n",
+ "precondition": "(fnExists(Function.prototype.bind))"
+ },
+ {
+ "id": "15.3.4.5-2-11",
+ "path": "TestCases/chapter15/15.3/15.3.4/15.3.4.5/15.3.4.5-2-11.js",
+ "description": "Function.prototype.bind throws TypeError if 'Target' is NULL",
+ "test": "assertTrue((function testcase() {\n try {\n Function.prototype.bind.call(null);\n return false;\n } catch (e) {\n return (e instanceof TypeError);\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Function.prototype.bind))"
+ },
+ {
+ "id": "15.3.4.5-2-12",
+ "path": "TestCases/chapter15/15.3/15.3.4/15.3.4.5/15.3.4.5-2-12.js",
+ "description": "Function.prototype.bind throws TypeError if 'Target' is a boolean",
+ "test": "assertTrue((function testcase() {\n try {\n Function.prototype.bind.call(true);\n return false;\n } catch (e) {\n return (e instanceof TypeError);\n } \n }).call(this));\n",
+ "precondition": "(fnExists(Function.prototype.bind))"
+ },
+ {
+ "id": "15.3.4.5-2-13",
+ "path": "TestCases/chapter15/15.3/15.3.4/15.3.4.5/15.3.4.5-2-13.js",
+ "description": "Function.prototype.bind throws TypeError if 'Target' is a number",
+ "test": "assertTrue((function testcase() {\n try {\n Function.prototype.bind.call(5);\n return false;\n } catch (e) {\n return (e instanceof TypeError);\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Function.prototype.bind))"
+ },
+ {
+ "id": "15.3.4.5-2-14",
+ "path": "TestCases/chapter15/15.3/15.3.4/15.3.4.5/15.3.4.5-2-14.js",
+ "description": "Function.prototype.bind throws TypeError if 'Target' is a string",
+ "test": "assertTrue((function testcase() {\n try {\n Function.prototype.bind.call(\"abc\");\n return false;\n } catch (e) {\n return (e instanceof TypeError);\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Function.prototype.bind))"
+ },
+ {
+ "id": "15.3.4.5-2-15",
+ "path": "TestCases/chapter15/15.3/15.3.4/15.3.4.5/15.3.4.5-2-15.js",
+ "description": "Function.prototype.bind throws TypeError if 'Target' is Object without Call internal method",
+ "test": "assertTrue((function testcase() {\n try {\n Function.prototype.bind.call({});\n return false;\n } catch (e) {\n return (e instanceof TypeError);\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Function.prototype.bind))"
+ },
+ {
+ "id": "15.3.4.5-2-16",
+ "path": "TestCases/chapter15/15.3/15.3.4/15.3.4.5/15.3.4.5-2-16.js",
+ "description": "Function.prototype.bind - 'Target' is a function",
+ "test": "assertTrue((function testcase() {\n function testFunc() {}\n try {\n testFunc.bind();\n return true;\n } catch (e) {\n return false;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Function.prototype.bind))"
+ },
+ {
+ "id": "15.3.4.5-2-2",
+ "path": "TestCases/chapter15/15.3/15.3.4/15.3.4.5/15.3.4.5-2-2.js",
+ "description": "Function.prototype.bind throws TypeError if the Target is not callable (bind attached to object)",
+ "test": "assertTrue((function testcase() {\n // dummy function \n function foo() {}\n var f = new foo();\n f.bind = Function.prototype.bind;\n\n try {\n f.bind();\n }\n catch (e) {\n if (e instanceof TypeError) {\n return true;\n }\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Function.prototype.bind))"
+ },
+ {
+ "id": "15.3.4.5-2-3",
+ "path": "TestCases/chapter15/15.3/15.3.4/15.3.4.5/15.3.4.5-2-3.js",
+ "description": "Function.prototype.bind allows Target to be a constructor (Number)",
+ "test": "assertTrue((function testcase() {\n var bnc = Number.bind(null);\n var n = bnc(42);\n if (n === 42) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Function.prototype.bind))"
+ },
+ {
+ "id": "15.3.4.5-2-4",
+ "path": "TestCases/chapter15/15.3/15.3.4/15.3.4.5/15.3.4.5-2-4.js",
+ "description": "Function.prototype.bind allows Target to be a constructor (String)",
+ "test": "assertTrue((function testcase() {\n var bsc = String.bind(null);\n var s = bsc(\"hello world\");\n if (s === \"hello world\") {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Function.prototype.bind))"
+ },
+ {
+ "id": "15.3.4.5-2-5",
+ "path": "TestCases/chapter15/15.3/15.3.4/15.3.4.5/15.3.4.5-2-5.js",
+ "description": "Function.prototype.bind allows Target to be a constructor (Boolean)",
+ "test": "assertTrue((function testcase() {\n var bbc = Boolean.bind(null);\n var b = bbc(true);\n if (b === true) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Function.prototype.bind))"
+ },
+ {
+ "id": "15.3.4.5-2-6",
+ "path": "TestCases/chapter15/15.3/15.3.4/15.3.4.5/15.3.4.5-2-6.js",
+ "description": "Function.prototype.bind allows Target to be a constructor (Object)",
+ "test": "assertTrue((function testcase() {\n var boc = Object.bind(null);\n var o = boc(42);\n if (o == 42) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Function.prototype.bind))"
+ },
+ {
+ "id": "15.3.4.5-2-7",
+ "path": "TestCases/chapter15/15.3/15.3.4/15.3.4.5/15.3.4.5-2-7.js",
+ "description": "Function.prototype.bind throws TypeError if the Target is not callable (JSON)",
+ "test": "assertTrue((function testcase() {\n try {\n JSON.bind();\n }\n catch (e) {\n if (e instanceof TypeError) {\n return true;\n }\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Function.prototype.bind))"
+ },
+ {
+ "id": "15.3.4.5-2-8",
+ "path": "TestCases/chapter15/15.3/15.3.4/15.3.4.5/15.3.4.5-2-8.js",
+ "description": "Function.prototype.bind allows Target to be a constructor (Array)",
+ "test": "assertTrue((function testcase() {\n var bac = Array.bind(null);\n var a = bac(42);\n a.prop = \"verifyPropertyExist\";\n a[41] = 41;\n\n return a.prop === \"verifyPropertyExist\" && a[41] === 41 && a.length === 42;\n }).call(this));\n",
+ "precondition": "(fnExists(Function.prototype.bind))"
+ },
+ {
+ "id": "15.3.4.5-2-9",
+ "path": "TestCases/chapter15/15.3/15.3.4/15.3.4.5/15.3.4.5-2-9.js",
+ "description": "Function.prototype.bind allows Target to be a constructor (Date)",
+ "test": "assertTrue((function testcase() {\n var bdc = Date.bind(null);\n var s = bdc(0, 0, 0);\n if (typeof(s) === 'string') {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Function.prototype.bind))"
+ },
+ {
+ "id": "15.3.4.5-20-1",
+ "path": "TestCases/chapter15/15.3/15.3.4/15.3.4.5/15.3.4.5-20-1.js",
+ "description": "Function.prototype.bind - 'caller' is defined as one property of 'F'",
+ "test": "assertTrue((function testcase() {\n\n function foo() { }\n var obj = foo.bind({});\n return obj.hasOwnProperty(\"caller\");\n }).call(this));\n",
+ "precondition": "(fnExists(Function.prototype.bind))"
+ },
+ {
+ "id": "15.3.4.5-20-2",
+ "path": "TestCases/chapter15/15.3/15.3.4/15.3.4.5/15.3.4.5-20-2.js",
+ "description": "Function.prototype.bind - [[Get]] attribute of 'caller' property in 'F' is thrower",
+ "test": "assertTrue((function testcase() {\n\n function foo() { }\n var obj = foo.bind({});\n try {\n return obj.caller && false;\n } catch (ex) {\n return (ex instanceof TypeError);\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Function.prototype.bind))"
+ },
+ {
+ "id": "15.3.4.5-20-3",
+ "path": "TestCases/chapter15/15.3/15.3.4/15.3.4.5/15.3.4.5-20-3.js",
+ "description": "Function.prototype.bind - [[Set]] attribute of 'caller' property in 'F' is thrower",
+ "test": "assertTrue((function testcase() {\n\n function foo() { }\n var obj = foo.bind({});\n try {\n obj.caller = 12;\n return false;\n } catch (ex) {\n return (ex instanceof TypeError);\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Function.prototype.bind))"
+ },
+ {
+ "id": "15.3.4.5-20-4",
+ "path": "TestCases/chapter15/15.3/15.3.4/15.3.4.5/15.3.4.5-20-4.js",
+ "description": "Function.prototype.bind - The [[Enumerable]] attribute of 'caller' property in 'F' is false",
+ "test": "assertTrue((function testcase() {\n\n var canEnumerable = false;\n var hasProperty = false;\n function foo() { }\n var obj = foo.bind({});\n hasProperty = obj.hasOwnProperty(\"caller\");\n for (var prop in obj) {\n if (prop === \"caller\") {\n canEnumerable = true;\n }\n }\n return hasProperty && !canEnumerable;\n }).call(this));\n",
+ "precondition": "(fnExists(Function.prototype.bind))"
+ },
+ {
+ "id": "15.3.4.5-20-5",
+ "path": "TestCases/chapter15/15.3/15.3.4/15.3.4.5/15.3.4.5-20-5.js",
+ "description": "Function.prototype.bind - The [[Configurable]] attribute of 'caller' property in 'F' is false",
+ "test": "assertTrue((function testcase() {\n\n var canConfigurable = false;\n var hasProperty = false;\n function foo() { }\n var obj = foo.bind({});\n hasProperty = obj.hasOwnProperty(\"caller\");\n delete obj.caller;\n canConfigurable = obj.hasOwnProperty(\"caller\");\n return hasProperty && canConfigurable;\n }).call(this));\n",
+ "precondition": "(fnExists(Function.prototype.bind))"
+ },
+ {
+ "id": "15.3.4.5-21-1",
+ "path": "TestCases/chapter15/15.3/15.3.4/15.3.4.5/15.3.4.5-21-1.js",
+ "description": "Function.prototype.bind - 'arguments' is defined as one property of 'F'",
+ "test": "assertTrue((function testcase() {\n\n function foo() { }\n var obj = foo.bind({});\n return obj.hasOwnProperty(\"arguments\");\n }).call(this));\n",
+ "precondition": "(fnExists(Function.prototype.bind))"
+ },
+ {
+ "id": "15.3.4.5-21-2",
+ "path": "TestCases/chapter15/15.3/15.3.4/15.3.4.5/15.3.4.5-21-2.js",
+ "description": "Function.prototype.bind - [[Get]] attribute of 'arguments' property in 'F' is thrower",
+ "test": "assertTrue((function testcase() {\n\n function foo() { }\n var obj = foo.bind({});\n try {\n return obj.arguments && false;\n } catch (ex) {\n return (ex instanceof TypeError);\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Function.prototype.bind))"
+ },
+ {
+ "id": "15.3.4.5-21-3",
+ "path": "TestCases/chapter15/15.3/15.3.4/15.3.4.5/15.3.4.5-21-3.js",
+ "description": "Function.prototype.bind - [[Set]] attribute of 'arguments' property in 'F' is thrower",
+ "test": "assertTrue((function testcase() {\n\n function foo() { }\n var obj = foo.bind({});\n try {\n obj.arguments = 12;\n return false;\n } catch (ex) {\n return (ex instanceof TypeError);\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Function.prototype.bind))"
+ },
+ {
+ "id": "15.3.4.5-21-4",
+ "path": "TestCases/chapter15/15.3/15.3.4/15.3.4.5/15.3.4.5-21-4.js",
+ "description": "Function.prototype.bind - The [[Enumerable]] attribute of 'arguments' property in 'F' is false",
+ "test": "assertTrue((function testcase() {\n\n var canEnumerable = false;\n var hasProperty = false;\n function foo() { }\n var obj = foo.bind({});\n hasProperty = obj.hasOwnProperty(\"arguments\");\n for (var prop in obj) {\n if (prop === \"arguments\") {\n canEnumerable = true;\n }\n }\n return hasProperty && !canEnumerable;\n }).call(this));\n",
+ "precondition": "(fnExists(Function.prototype.bind))"
+ },
+ {
+ "id": "15.3.4.5-21-5",
+ "path": "TestCases/chapter15/15.3/15.3.4/15.3.4.5/15.3.4.5-21-5.js",
+ "description": "Function.prototype.bind - The [[Configurable]] attribute of 'arguments' property in 'F' is false",
+ "test": "assertTrue((function testcase() {\n\n var canConfigurable = false;\n var hasProperty = false;\n function foo() { }\n var obj = foo.bind({});\n hasProperty = obj.hasOwnProperty(\"arguments\");\n delete obj.caller;\n canConfigurable = !obj.hasOwnProperty(\"arguments\");\n return hasProperty && !canConfigurable;\n }).call(this));\n",
+ "precondition": "(fnExists(Function.prototype.bind))"
+ },
+ {
+ "id": "15.3.4.5-3-1",
+ "path": "TestCases/chapter15/15.3/15.3.4/15.3.4.5/15.3.4.5-3-1.js",
+ "description": "Function.prototype.bind - each arg is defined in A in list order",
+ "test": "assertTrue((function testcase() {\n\n var foo = function (x, y) {\n return new Boolean((x + y) === \"ab\" && arguments[0] === \"a\" &&\n arguments[1] === \"b\" && arguments.length === 2);\n };\n\n var obj = foo.bind({}, \"a\", \"b\");\n return obj()==true;\n }).call(this));\n",
+ "precondition": "(fnExists(Function.prototype.bind))"
+ },
+ {
+ "id": "15.3.4.5-6-1",
+ "path": "TestCases/chapter15/15.3/15.3.4/15.3.4.5/15.3.4.5-6-1.js",
+ "description": "Function.prototype.bind - F can get own data property",
+ "test": "assertTrue((function testcase() {\n\n var foo = function () { };\n\n var obj = foo.bind({});\n obj.property = 12;\n return obj.property === 12;\n }).call(this));\n",
+ "precondition": "(fnExists(Function.prototype.bind))"
+ },
+ {
+ "id": "15.3.4.5-6-10",
+ "path": "TestCases/chapter15/15.3/15.3.4/15.3.4.5/15.3.4.5-6-10.js",
+ "description": "Function.prototype.bind - F can get own accessor property without a get function that overrides an inherited accessor property",
+ "test": "assertTrue((function testcase() {\n\n var foo = function () { };\n\n var obj = foo.bind({});\n try {\n Object.defineProperty(Function.prototype, \"property\", {\n get: function () {\n return 3;\n },\n configurable: true\n });\n\n Object.defineProperty(obj, \"property\", {\n set: function () { }\n });\n return typeof (obj.property) === \"undefined\";\n } finally {\n delete Function.prototype.property;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Function.prototype.bind) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.3.4.5-6-11",
+ "path": "TestCases/chapter15/15.3/15.3.4/15.3.4.5/15.3.4.5-6-11.js",
+ "description": "Function.prototype.bind - F can get inherited accessor property without a get function",
+ "test": "assertTrue((function testcase() {\n\n var foo = function () { };\n\n var obj = foo.bind({});\n try {\n Object.defineProperty(Function.prototype, \"property\", {\n set: function () { },\n configurable: true\n });\n return typeof (obj.property) === \"undefined\";\n } finally {\n delete Function.prototype.property;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Function.prototype.bind) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.3.4.5-6-12",
+ "path": "TestCases/chapter15/15.3/15.3.4/15.3.4.5/15.3.4.5-6-12.js",
+ "description": "Function.prototype.bind - F cannot get property which doesn't exist",
+ "test": "assertTrue((function testcase() {\n\n var foo = function () { };\n\n var obj = foo.bind({});\n return typeof (obj.property) === \"undefined\";\n }).call(this));\n",
+ "precondition": "(fnExists(Function.prototype.bind))"
+ },
+ {
+ "id": "15.3.4.5-6-2",
+ "path": "TestCases/chapter15/15.3/15.3.4/15.3.4.5/15.3.4.5-6-2.js",
+ "description": "Function.prototype.bind - F can get inherited data property",
+ "test": "assertTrue((function testcase() {\n\n var foo = function () { };\n\n var obj = foo.bind({});\n try {\n Function.prototype.property = 12;\n return obj.property === 12;\n } finally {\n delete Function.prototype.property;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Function.prototype.bind))"
+ },
+ {
+ "id": "15.3.4.5-6-3",
+ "path": "TestCases/chapter15/15.3/15.3.4/15.3.4.5/15.3.4.5-6-3.js",
+ "description": "Function.prototype.bind - F can get own data property that overrides an inherited data property",
+ "test": "assertTrue((function testcase() {\n\n var foo = function () { };\n\n var obj = foo.bind({});\n\n try {\n Function.prototype.property = 3;\n obj.property = 12;\n return obj.property === 12;\n } finally {\n delete Function.prototype.property;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Function.prototype.bind))"
+ },
+ {
+ "id": "15.3.4.5-6-4",
+ "path": "TestCases/chapter15/15.3/15.3.4/15.3.4.5/15.3.4.5-6-4.js",
+ "description": "Function.prototype.bind - F can get own data property that overrides an inherited accessor property",
+ "test": "assertTrue((function testcase() {\n\n var foo = function () { };\n\n var obj = foo.bind({});\n try {\n Object.defineProperty(Function.prototype, \"property\", {\n get: function () {\n return 3;\n },\n configurable: true\n });\n \n Object.defineProperty(obj, \"property\", {\n value: 12\n });\n\n return obj.property === 12;\n } finally {\n delete Function.prototype.property;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Function.prototype.bind) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.3.4.5-6-5",
+ "path": "TestCases/chapter15/15.3/15.3.4/15.3.4.5/15.3.4.5-6-5.js",
+ "description": "Function.prototype.bind - F can get own accessor property",
+ "test": "assertTrue((function testcase() {\n\n var foo = function () { };\n\n var obj = foo.bind({});\n Object.defineProperty(obj, \"property\", {\n get: function () {\n return 12;\n }\n });\n return obj.property === 12;\n }).call(this));\n",
+ "precondition": "(fnExists(Function.prototype.bind) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.3.4.5-6-6",
+ "path": "TestCases/chapter15/15.3/15.3.4/15.3.4.5/15.3.4.5-6-6.js",
+ "description": "Function.prototype.bind - F can get inherited accessor property",
+ "test": "assertTrue((function testcase() {\n\n var foo = function () { };\n\n var obj = foo.bind({});\n try {\n Object.defineProperty(Function.prototype, \"property\", {\n get: function () {\n return 12;\n },\n configurable: true\n });\n return obj.property === 12;\n } finally {\n delete Function.prototype.property;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Function.prototype.bind) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.3.4.5-6-7",
+ "path": "TestCases/chapter15/15.3/15.3.4/15.3.4.5/15.3.4.5-6-7.js",
+ "description": "Function.prototype.bind - F can get own accessor property that overrides an inherited data property",
+ "test": "assertTrue((function testcase() {\n\n var foo = function () { };\n\n var obj = foo.bind({});\n try {\n Function.prototype.property = 3;\n Object.defineProperty(obj, \"property\", {\n get: function () {\n return 12;\n }\n });\n return obj.property === 12;\n } finally {\n delete Function.prototype.property;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Function.prototype.bind) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.3.4.5-6-8",
+ "path": "TestCases/chapter15/15.3/15.3.4/15.3.4.5/15.3.4.5-6-8.js",
+ "description": "Function.prototype.bind - F can get own accessor property that overrides an inherited accessor property",
+ "test": "assertTrue((function testcase() {\n\n var foo = function () { };\n\n var obj = foo.bind({});\n try {\n Object.defineProperty(Function.prototype, \"property\", {\n get: function () {\n return 3;\n },\n configurable: true\n });\n\n Object.defineProperty(obj, \"property\", {\n get: function () {\n return 12;\n }\n });\n return obj.property === 12;\n } finally {\n delete Function.prototype.property;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Function.prototype.bind) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.3.4.5-6-9",
+ "path": "TestCases/chapter15/15.3/15.3.4/15.3.4.5/15.3.4.5-6-9.js",
+ "description": "Function.prototype.bind - F can get own accessor property without a get function",
+ "test": "assertTrue((function testcase() {\n\n var foo = function () { };\n\n var obj = foo.bind({});\n Object.defineProperty(obj, \"property\", {\n set: function () {}\n });\n return obj.hasOwnProperty(\"property\") && typeof (obj.property) === \"undefined\";\n }).call(this));\n",
+ "precondition": "(fnExists(Function.prototype.bind) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.3.4.5-8-1",
+ "path": "TestCases/chapter15/15.3/15.3.4/15.3.4.5/15.3.4.5-8-1.js",
+ "description": "Function.prototype.bind, type of bound function must be 'function'",
+ "test": "assertTrue((function testcase() {\n function foo() { }\n var o = {};\n \n var bf = foo.bind(o);\n if (typeof(bf) === 'function') {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Function.prototype.bind))"
+ },
+ {
+ "id": "15.3.4.5-8-2",
+ "path": "TestCases/chapter15/15.3/15.3.4/15.3.4.5/15.3.4.5-8-2.js",
+ "description": "Function.prototype.bind, [[Class]] of bound function must be 'Function'",
+ "test": "assertTrue((function testcase() {\n function foo() { }\n var o = {};\n \n var bf = foo.bind(o);\n var s = Object.prototype.toString.call(bf);\n if (s === '[object Function]') {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Function.prototype.bind))"
+ },
+ {
+ "id": "15.3.4.5-9-1",
+ "path": "TestCases/chapter15/15.3/15.3.4/15.3.4.5/15.3.4.5-9-1.js",
+ "description": "Function.prototype.bind, [[Prototype]] is Function.prototype",
+ "test": "assertTrue((function testcase() {\n function foo() { }\n var o = {};\n \n var bf = foo.bind(o);\n if (Function.prototype.isPrototypeOf(bf)) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Function.prototype.bind))"
+ },
+ {
+ "id": "15.3.4.5-9-2",
+ "path": "TestCases/chapter15/15.3/15.3.4/15.3.4.5/15.3.4.5-9-2.js",
+ "description": "Function.prototype.bind, [[Prototype]] is Function.prototype (using getPrototypeOf)",
+ "test": "assertTrue((function testcase() {\n function foo() { }\n var o = {};\n \n var bf = foo.bind(o);\n if (Object.getPrototypeOf(bf) === Function.prototype) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Function.prototype.bind) && fnExists(Object.getPrototypeOf))"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.3.4.5_Function.prototype.bind.json b/website/resources/scripts/testcases2/15.3.4.5_Function.prototype.bind.json
new file mode 100644
index 000000000..cf31a9df8
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.3.4.5_Function.prototype.bind.json
@@ -0,0 +1,49 @@
+{
+ "testCollection": {
+ "name": "15.3.4.5_Function.prototype.bind",
+ "numTests": 6,
+ "tests": [
+ {
+ "section": "15.3.4.5",
+ "description": "A bound function should fail to find its \"caller\"",
+ "negative": "TypeError",
+ "test": "function foo() { return bar.caller; }\nvar bar = foo.bind({});\nfunction baz() { return bar(); }\nbaz();\n",
+ "id": "S15.3.4.5_A1"
+ },
+ {
+ "section": "15.3.4.5",
+ "negative": "TypeError",
+ "test": "Function.prototype.bind.call(undefined, {});\n\n",
+ "id": "S15.3.4.5_A13",
+ "description": "If IsCallable(func) is false, then throw a TypeError exception."
+ },
+ {
+ "section": "15.3.4.5",
+ "negative": "TypeError",
+ "test": "Function.prototype.bind.call(null, {});\n\n",
+ "id": "S15.3.4.5_A14",
+ "description": "If IsCallable(func) is false, then throw a TypeError exception."
+ },
+ {
+ "section": "15.3.4.5",
+ "negative": "TypeError",
+ "test": "Function.prototype.bind.call({}, {});\n\n",
+ "id": "S15.3.4.5_A15",
+ "description": "If IsCallable(func) is false, then throw a TypeError exception."
+ },
+ {
+ "section": "15.3.4.5",
+ "description": "A RegExp is not a function, but it may be callable. Iff it is, it's typeof should be 'function', in which case bind should accept it as a valid this value.",
+ "test": "var re = (/x/);\nif (typeof re === 'function') {\n Function.prototype.bind.call(re, undefined);\n} else {\n try {\n Function.prototype.bind.call(re, undefined);\n $FAIL('#1: If IsCallable(func) is false, ' +\n 'then (bind should) throw a TypeError exception');\n } catch (e) {\n if (!(e instanceof TypeError)) {\n $ERROR('#1: TypeError expected. Actual: ' + e);\n }\n }\n}\n",
+ "id": "S15.3.4.5_A16"
+ },
+ {
+ "section": "15.3.4.5",
+ "description": "a bound function should fail to find the bound function \"arguments\"",
+ "negative": "TypeError",
+ "test": "function foo() { return bar.arguments; }\nvar bar = foo.bind({});\nfunction baz() { return bar(); }\nbaz();\n",
+ "id": "S15.3.4.5_A1"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.3.4_Properties_of_the_Function_Prototype_Object.json b/website/resources/scripts/testcases2/15.3.4_Properties_of_the_Function_Prototype_Object.json
new file mode 100644
index 000000000..84ac41c21
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.3.4_Properties_of_the_Function_Prototype_Object.json
@@ -0,0 +1,68 @@
+{
+ "testCollection": {
+ "name": "15.3.4_Properties_of_the_Function_Prototype_Object",
+ "numTests": 10,
+ "tests": [
+ {
+ "section": "15.3.4.1",
+ "description": "Checking Function.prototype.constructor",
+ "test": "//CHECK#1\nif (Function.prototype.constructor !== Function) {\n $ERROR('#1: The initial value of Function.prototype.constructor is the built-in Function constructor');\n}\n",
+ "id": "S15.3.4.1_A1_T1"
+ },
+ {
+ "section": "15.3.4.1",
+ "description": "Create new Function.prototype.constructor object",
+ "test": "var constr = Function.prototype.constructor;\n\nvar f = new constr;\n\n// CHECK#0\nif (f === undefined) {\n $ERROR('#0: new Function() return the newly created function object.');\n}\n\n// CHECK#1\nif (f.constructor !== Function) {\n $ERROR('#1: new Function() create a new function object');\n}\n\n// CHECK#2\nif (!(Function.prototype.isPrototypeOf(f))) {\n $ERROR('#2: when new Function() calls the [[Prototype]] property of the newly constructed object is set to the Function prototype object.');\n}\n\n// CHECK#3\nvar to_string_result = '[object '+ 'Function' +']';\n\ndelete Function.prototype.toString;\n\nif (f.toString() !== to_string_result) {\n $ERROR('#3: when new Function() calls the [[Class]] property of the newly constructed object is set to \"Function\"');\n}\n",
+ "id": "S15.3.4.1_A1_T2"
+ },
+ {
+ "section": "15.3.4",
+ "description": "Object.prototype.toString returns [object+[[Class]]+]",
+ "test": "if (Object.prototype.toString.call(Function.prototype) !== \"[object Function]\") {\n $ERROR('#2: The Function prototype object is itself a Function ' +\n 'object (its [[Class]] is \"Function\") (15.3.4)');\n}\n",
+ "id": "S15.3.4_A1"
+ },
+ {
+ "section": "15.3.4",
+ "description": "Call Function.prototype()",
+ "test": "//CHECK#1\ntry {\n if (Function.prototype() !== undefined) {\n $ERROR('#1: The Function prototype object is itself a Function object that, when invoked, accepts any arguments and returns undefined');\n }\n} catch (e) {\n $ERROR('#1.1: The Function prototype object is itself a Function object that, when invoked, accepts any arguments and returns undefined: '+e);\n}\n",
+ "id": "S15.3.4_A2_T1"
+ },
+ {
+ "section": "15.3.4",
+ "description": "Call Function.prototype(null,void 0)",
+ "test": "//CHECK#1\ntry {\n if (Function.prototype(null,void 0) !== undefined) {\n $ERROR('#1: The Function prototype object is itself a Function object that, when invoked, accepts any arguments and returns undefined');\n }\n} catch (e) {\n $ERROR('#1.1: The Function prototype object is itself a Function object that, when invoked, accepts any arguments and returns undefined: '+e);\n}\n",
+ "id": "S15.3.4_A2_T2"
+ },
+ {
+ "section": "15.3.4",
+ "description": "Call Function.prototype(x), where x is undefined variable",
+ "test": "//CHECK#1\ntry {\n if (Function.prototype(x) !== undefined) {\n var x;\n $ERROR('#1: The Function prototype object is itself a Function object that, when invoked, accepts any arguments and returns undefined');\n }\n} catch (e) {\n $ERROR('#1.1: The Function prototype object is itself a Function object that, when invoked, accepts any arguments and returns undefined: '+e);\n}\n\n",
+ "id": "S15.3.4_A2_T3"
+ },
+ {
+ "section": "15.3.4",
+ "description": "Checking prototype of Function.prototype",
+ "test": "if (Object.getPrototypeOf(Function.prototype) !== Object.prototype) {\n $ERROR('#1: The value of the internal [[Prototype]] property of ' +\n 'the Function prototype object is the Object prototype ' +\n 'object (15.3.4)');\n}\n",
+ "id": "S15.3.4_A3_T1"
+ },
+ {
+ "section": "15.3.4, 15.3.2.1",
+ "description": "Add new property to Object.prototype and check it at Function.prototype",
+ "test": "Object.prototype.indicator = 1;\n\n//CHECK#1\nif (Function.prototype.indicator!==1) {\n $ERROR('#1: The value of the internal [[Prototype]] property of the Function prototype object is the Object prototype object (15.3.2.1)');\n}\n",
+ "id": "S15.3.4_A3_T2"
+ },
+ {
+ "section": "15.3.4",
+ "description": "Checking valueOf property at Function.prototype",
+ "test": "//CHECK#1\nif (Function.prototype.hasOwnProperty(\"valueOf\") !== false) {\n $ERROR('#1: The Function prototype object does not have a valueOf property of its own');\n}\n\n//CHECK#2\nif (typeof Function.prototype.valueOf === \"undefined\") {\n $ERROR('#2: however, it inherits the valueOf property from the Object prototype Object');\n}\n\n//CHECK#3\nif (Function.prototype.valueOf !== Object.prototype.valueOf) {\n $ERROR('#3: however, it inherits the valueOf property from the Object prototype Object');\n}\n",
+ "id": "S15.3.4_A4"
+ },
+ {
+ "section": "15.3.4",
+ "description": "Checking if creating \"new Function.prototype object\" fails",
+ "test": "//CHECK#\ntry {\n var obj = new Function.prototype;\n $FAIL('#1: The Function prototype object is itself a Function object without [[create]] property: '+e);\n} catch (e) {\n $PRINT(\"#1.1: The Function prototype object is itself a Function object without [[create]] property \"+e);\n\n}\n",
+ "id": "S15.3.4_A5"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.3.5_Properties_of_Function_Instances.json b/website/resources/scripts/testcases2/15.3.5_Properties_of_Function_Instances.json
new file mode 100644
index 000000000..a2278ed18
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.3.5_Properties_of_Function_Instances.json
@@ -0,0 +1,206 @@
+{
+ "testCollection": {
+ "name": "15.3.5_Properties_of_Function_Instances",
+ "numTests": 33,
+ "tests": [
+ {
+ "section": "15.3.5.1",
+ "description": "Checking length property of Function(\"arg1,arg2,arg3\", null)",
+ "test": "f = new Function(\"arg1,arg2,arg3\", null);\n\n//CHECK#1\nif (!(f.hasOwnProperty('length'))) {\n $FAIL('#1: the function has length property.');\n}\n\n//CHECK#2\nif (f.length !== 3) {\n $ERROR('#2: The value of the length property is usually an integer that indicates the \"typical\" number of arguments expected by the function');\n}\n",
+ "id": "S15.3.5.1_A1_T1"
+ },
+ {
+ "section": "15.3.5.1",
+ "description": "Checking length property of Function(\"arg1,arg2,arg3\",\"arg4,arg5\", null)",
+ "test": "f = Function(\"arg1,arg2,arg3\",\"arg4,arg5\", null);\n\n//CHECK#1\nif (!(f.hasOwnProperty('length'))) {\n $FAIL('#1: the function has length property.');\n}\n\n//CHECK#2\nif (f.length !== 5) {\n $ERROR('#2: The value of the length property is usually an integer that indicates the \"typical\" number of arguments expected by the function');\n}\n",
+ "id": "S15.3.5.1_A1_T2"
+ },
+ {
+ "section": "15.3.5.1",
+ "description": "Checking length property of Function(\"arg1,arg2,arg3\",\"arg1,arg2\",\"arg3\", null)",
+ "test": "f = new Function(\"arg1,arg2,arg3\",\"arg1,arg2\",\"arg3\", null);\n\n//CHECK#1\nif (!(f.hasOwnProperty('length'))) {\n $FAIL('#1: the function has length property.');\n}\n\n//CHECK#2\nif (f.length !== 6) {\n $ERROR('#2: The value of the length property is usually an integer that indicates the \"typical\" number of arguments expected by the function');\n}\n",
+ "id": "S15.3.5.1_A1_T3"
+ },
+ {
+ "section": "15.3.5.1",
+ "description": "Checking if deleting the length property of Function(\"arg1,arg2,arg3\", null) fails",
+ "test": "f = new Function(\"arg1,arg2,arg3\", null);\n\n//CHECK#1\nif (!(f.hasOwnProperty('length'))) {\n $FAIL('#1: the function has length property.');\n}\n\n//CHECK#2\nif(delete f.length){\n $ERROR('#2: the function.length property has the attributes DontDelete.');\n}\n\n//CHECK#3\nif (!(f.hasOwnProperty('length'))) {\n $ERROR('#3: the function.length property has the attributes DontDelete.');\n}\n\n//CHECK#4\nif (f.length !== 3) {\n $ERROR('#4: the length property has the attributes { DontDelete }');\n}\n",
+ "id": "S15.3.5.1_A2_T1"
+ },
+ {
+ "section": "15.3.5.1",
+ "description": "Checking if deleting the length property of Function(\"arg1,arg2,arg3\",\"arg4,arg5\", null) fails",
+ "test": "f = Function(\"arg1,arg2,arg3\",\"arg4,arg5\", null);\n\n//CHECK#1\nif (!(f.hasOwnProperty('length'))) {\n $FAIL('#1: the function has length property.');\n}\n\ndelete f.length;\n\n//CHECK#2\nif (!(f.hasOwnProperty('length'))) {\n $ERROR('#2: the function.length property has the attributes DontDelete.');\n}\n\n//CHECK#3\nif (f.length !== 5) {\n $ERROR('#3: the length property has the attributes { DontDelete }');\n}\n",
+ "id": "S15.3.5.1_A2_T2"
+ },
+ {
+ "section": "15.3.5.1",
+ "description": "Checking if deleting the length property of Function(\"arg1,arg2,arg3\",\"arg1,arg2\",\"arg3\", null) fails",
+ "test": "f = new Function(\"arg1,arg2,arg3\",\"arg1,arg2\",\"arg3\", null);\n\n//CHECK#1\nif (!(f.hasOwnProperty('length'))) {\n $FAIL('#1: the function has length property.');\n}\n\ndelete f.length;\n\n//CHECK#2\nif (!(f.hasOwnProperty('length'))) {\n $ERROR('#2: the function.length property has the attributes DontDelete.');\n}\n\n//CHECK#3\nif (f.length !== 6) {\n $ERROR('#3: the length property has the attributes { DontDelete }');\n}\n",
+ "id": "S15.3.5.1_A2_T3"
+ },
+ {
+ "section": "15.3.5.1",
+ "description": "Checking if varying the length property of Function(\"arg1,arg2,arg3\",\"arg4,arg5\", null) fails",
+ "test": "f = new Function(\"arg1,arg2,arg3\",\"arg4,arg5\", null);\n\n//CHECK#1\nif (!(f.hasOwnProperty('length'))) {\n $FAIL('#1: the function has length property.');\n}\n\nlength = f.length;\n\nf.length = function(){};\n\n//CHECK#2\nif (f.length !== length) {\n $ERROR('#2: the function.length property has the attributes ReadOnly');\n}\n\n//CHECK#3\ntry {\n f.length();\n $ERROR('#3: the function.length property has the attributes ReadOnly');\n} catch (e) {\n ;\n}\n\n//CHECK#4\nif (f.length !== 5) {\n $ERROR('#4: the length property has the attributes { ReadOnly }');\n}\n",
+ "id": "S15.3.5.1_A3_T1"
+ },
+ {
+ "section": "15.3.5.1",
+ "description": "Checking if varying the length property of Function(\"arg1,arg2,arg3\", null) fails",
+ "test": "f = Function(\"arg1,arg2,arg3\", null);\n\n//CHECK#1\nif (!(f.hasOwnProperty('length'))) {\n $FAIL('#1: the function has length property.');\n}\n\nlength = f.length;\n\nf.length = function(){};\n\n//CHECK#2\nif (f.length !== length) {\n $ERROR('#2: the function.length property has the attributes ReadOnly');\n}\n\n//CHECK#3\ntry {\n f.length();\n $ERROR('#3: the function.length property has the attributes ReadOnly');\n} catch (e) {\n ;\n}\n\n//CHECK#4\nif (f.length !== 3) {\n $ERROR('#4: the length property has the attributes { ReadOnly }');\n}\n",
+ "id": "S15.3.5.1_A3_T2"
+ },
+ {
+ "section": "15.3.5.1",
+ "description": "Checking if varying the length property of Function(\"arg1,arg2,arg3\",\"arg1,arg2\",\"arg3\", null) fails",
+ "test": "f = new Function(\"arg1,arg2,arg3\",\"arg1,arg2\",\"arg3\", null);\n\n//CHECK#1\nif (!(f.hasOwnProperty('length'))) {\n $FAIL('#1: the function has length property.');\n}\n\nlength = f.length;\n\nf.length = function(){};\n\n//CHECK#2\nif (f.length !== length) {\n $ERROR('#2: the function.length property has the attributes ReadOnly');\n}\n\n//CHECK#3\ntry {\n f.length();\n $ERROR('#3: the function.length property has the attributes ReadOnly');\n} catch (e) {\n ;\n}\n\n//CHECK#4\nif (f.length !== 6) {\n $ERROR('#4: the length property has the attributes { ReadOnly }');\n}\n",
+ "id": "S15.3.5.1_A3_T3"
+ },
+ {
+ "section": "15.3.5.1",
+ "description": "Checking if enumerating the length property of Function(\"arg1,arg2,arg3\", null) fails",
+ "test": "f = new Function(\"arg1,arg2,arg3\", null);\n\n//CHECK#1\nif (!(f.hasOwnProperty('length'))) {\n $FAIL('#1: the function has length property.');\n}\n\nfor(key in f) \n if(key==\"length\")\n var lengthenumed=true;\n \n//CHECK#2\nif (lengthenumed) {\n $ERROR('#2: the length property has the attributes { DontEnum }');\n}\n",
+ "id": "S15.3.5.1_A4_T1"
+ },
+ {
+ "section": "15.3.5.1",
+ "description": "Checking if enumerating the length property of Function(\"arg1,arg2,arg3\",\"arg4,arg5\", null) fails",
+ "test": "f = Function(\"arg1,arg2,arg3\",\"arg5,arg4\", null);\n\n//CHECK#1\nif (!(f.hasOwnProperty('length'))) {\n $FAIL('#1: the function has length property.');\n}\n\nfor(key in f) \n if(key==\"length\")\n var lengthenumed=true;\n \n//CHECK#2\nif (lengthenumed) {\n $ERROR('#2: the length property has the attributes { DontEnum }');\n}\n",
+ "id": "S15.3.5.1_A4_T2"
+ },
+ {
+ "section": "15.3.5.1",
+ "description": "Checking if enumerating the length property of Function(\"arg1,arg2,arg3\",\"arg1,arg2\",\"arg3\", null) fails",
+ "test": "f = new Function(\"arg1,arg2,arg3\",\"arg1,arg2\",\"arg3\", null);\n\n//CHECK#1\nif (!(f.hasOwnProperty('length'))) {\n $FAIL('#1: the function has length property.');\n}\n\nfor(key in f) \n if(key==\"length\")\n var lengthenumed=true;\n \n//CHECK#2\nif (lengthenumed) {\n $ERROR('#2: the length property has the attributes { DontEnum }');\n}\n",
+ "id": "S15.3.5.1_A4_T3"
+ },
+ {
+ "section": "15.3.5.2",
+ "description": "Checking if deleting the prototype property of Function(\"\", null) fails",
+ "test": "f = new Function(\"\", null);\n\n//CHECK#1\nif (!(f.hasOwnProperty('prototype'))) {\n $FAIL('#1: the function has length property.');\n}\n\nfproto = f.prototype;\n\n//CHECK#2\nif (delete f.prototype) {\n $ERROR('#2: the prototype property has the attributes { DontDelete }');\n}\n\n//CHECK#3\nif (f.prototype !== fproto) {\n $ERROR('#3: the prototype property has the attributes { DontDelete }');\n}\n",
+ "id": "S15.3.5.2_A1_T1"
+ },
+ {
+ "section": "15.3.5.2",
+ "description": "Checking if deleting the prototype property of Function(void 0, \"\") fails",
+ "test": "f = Function(void 0, \"\");\n\n//CHECK#1\nif (!(f.hasOwnProperty('prototype'))) {\n $FAIL('#1: the function has length property.');\n}\n\nfproto = f.prototype;\n\n//CHECK#2\nif (delete f.prototype) {\n $ERROR('#2: the prototype property has the attributes { DontDelete }');\n}\n\n//CHECK#3\nif (f.prototype !== fproto) {\n $ERROR('#3: the prototype property has the attributes { DontDelete }');\n}\n",
+ "id": "S15.3.5.2_A1_T2"
+ },
+ {
+ "section": "15.3.5.3, 11.8.6",
+ "description": "V is number",
+ "test": "FACTORY = Function(\"name\",\"this.name=name;\");\n\n//CHECK#1\nif ((1 instanceof FACTORY)!==false) {\n $ERROR('#1: Assume F is a Function object. When the [[HasInstance]] method of F is called with value V, the following steps are taken: i) If V is not an object, return false');\n}\n",
+ "id": "S15.3.5.3_A1_T1"
+ },
+ {
+ "section": "15.3.5.3, 11.8.6",
+ "description": "V is string",
+ "test": "FACTORY = Function(\"name\",\"this.name=name;\");\n\n//CHECK#1\nif ((\"1\" instanceof FACTORY)!==false) {\n $ERROR('#1: Assume F is a Function object. When the [[HasInstance]] method of F is called with value V, the following steps are taken: i) If V is not an object, return false');\n}\n",
+ "id": "S15.3.5.3_A1_T2"
+ },
+ {
+ "section": "15.3.5.3, 11.8.6",
+ "description": "V is boolean true",
+ "test": "FACTORY = Function(\"name\",\"this.name=name;\");\n\n//CHECK#1\nif ((true instanceof FACTORY)!==false) {\n $ERROR('#1: Assume F is a Function object. When the [[HasInstance]] method of F is called with value V, the following steps are taken: i) If V is not an object, return false');\n}\n",
+ "id": "S15.3.5.3_A1_T3"
+ },
+ {
+ "section": "15.3.5.3, 11.8.6",
+ "description": "V is boolean false",
+ "test": "FACTORY = Function(\"name\",\"this.name=name;\");\n\n//CHECK#1\nif ((false instanceof FACTORY)!==false) {\n $ERROR('#1: Assume F is a Function object. When the [[HasInstance]] method of F is called with value V, the following steps are taken: i) If V is not an object, return false');\n}\n",
+ "id": "S15.3.5.3_A1_T4"
+ },
+ {
+ "section": "15.3.5.3, 11.8.6",
+ "description": "V is void 0",
+ "test": "FACTORY = Function(\"name\",\"this.name=name;\");\n\n//CHECK#1\nif ((void 0 instanceof FACTORY)!==false) {\n $ERROR('#1: Assume F is a Function object. When the [[HasInstance]] method of F is called with value V, the following steps are taken: i) If V is not an object, return false');\n}\n",
+ "id": "S15.3.5.3_A1_T5"
+ },
+ {
+ "section": "15.3.5.3, 11.8.6",
+ "description": "V is null",
+ "test": "FACTORY = Function(\"name\",\"this.name=name;\");\n\n//CHECK#1\nif ((null instanceof FACTORY)!==false) {\n $ERROR('#1: Assume F is a Function object. When the [[HasInstance]] method of F is called with value V, the following steps are taken: i) If V is not an object, return false');\n}\n",
+ "id": "S15.3.5.3_A1_T6"
+ },
+ {
+ "section": "15.3.5.3, 11.8.6",
+ "description": "V is undefined",
+ "test": "FACTORY = Function(\"name\",\"this.name=name;\");\n\n//CHECK#1\nif ((undefined instanceof FACTORY)!==false) {\n $ERROR('#1: Assume F is a Function object. When the [[HasInstance]] method of F is called with value V, the following steps are taken: i) If V is not an object, return false');\n}\n",
+ "id": "S15.3.5.3_A1_T7"
+ },
+ {
+ "section": "15.3.5.3, 11.8.6",
+ "description": "V is undefined variable",
+ "test": "FACTORY = Function(\"name\",\"this.name=name;\");\n\n//CHECK#1\nif ((x instanceof FACTORY)!==false) {\n $ERROR('#1: Assume F is a Function object. When the [[HasInstance]] method of F is called with value V, the following steps are taken: i) If V is not an object, return false');\n}\n\nvar x;\n",
+ "id": "S15.3.5.3_A1_T8"
+ },
+ {
+ "section": "15.3.5.3, 11.8.6",
+ "description": "F.prototype is undefined, and V is empty object",
+ "test": "FACTORY = new Function;\n\nFACTORY.prototype = undefined;\n\nobj={};\n\n//CHECK#1\ntry {\n obj instanceof FACTORY;\n $FAIL('#1: O is not an object, throw a TypeError exception');\n} catch (e) {\n if (!(e instanceof TypeError)) {\n \t$ERROR('#1.1: O is not an object, throw a TypeError exception');\n }\n}\n\n\n",
+ "id": "S15.3.5.3_A2_T2"
+ },
+ {
+ "section": "15.3.5.3, 11.8.6",
+ "description": "F.prototype is void 0, and V is new F",
+ "test": "FACTORY = Function(\"this.prop=1;\");\n\nFACTORY.prototype.name = \"fairy\";\n\ninstance = new FACTORY;\n\nFACTORY.prototype = void 0;\n\n// CHECK#1\ntry {\n instance instanceof FACTORY;\n $FAIL('#1: O is not an object, throw a TypeError exception');\n} catch (e) {\n if (!(e instanceof TypeError)) {\n $ERROR('#1.1: O is not an object, throw a TypeError exception');\n }\n}\n\n// CHECK#2\nif ((instance.constructor !== FACTORY) || (instance.name !== \"fairy\")) {\n $ERROR('#2: instance.constructor === FACTORY');\n}\n",
+ "id": "S15.3.5.3_A2_T5"
+ },
+ {
+ "section": "15.3.5.3, 11.8.6",
+ "description": "F.prototype is string, and V is function",
+ "test": "FACTORY = new Function;\n\nFACTORY.prototype = \"error\";\n\n// CHECK#1\ntry {\n ( function() {\n }) instanceof FACTORY;\n $FAIL('#1: O is not an object, throw a TypeError exception');\n} catch (e) {\n if (!(e instanceof TypeError)) {\n $ERROR('#1.1: O is not an object, throw a TypeError exception');\n }\n}\n",
+ "id": "S15.3.5.3_A2_T6"
+ },
+ {
+ "section": "15.3.5.3, 11.8.6",
+ "description": "F.prototype.type is 1, and V is new F",
+ "test": "FACTORY = Function(\"this.name=\\\"root\\\"\");\n\nFACTORY.prototype.type=1;\n\ninstance = new FACTORY;\n\n//CHECK#1\nif (!(instance instanceof FACTORY)) {\n $ERROR('#1: If O and V refer to the same object or if they refer to objects joined to each other (13.1.2), return true');\n}\n",
+ "id": "S15.3.5.3_A3_T1"
+ },
+ {
+ "section": "15.3.5.3, 11.8.6",
+ "description": "F.prototype is Object.prototype, and V is empty object",
+ "test": "FAKEFACTORY = Function();\n\nfakeinstance = {};\n\n//CHECK#1\nif (fakeinstance instanceof FAKEFACTORY) {\n $ERROR('#1: If O and V refer to the same object or if they refer to objects joined to each other (13.1.2), return true');\n}\n\nFAKEFACTORY.prototype=Object.prototype;\n\n//CHECK#2\nif (!(fakeinstance instanceof FAKEFACTORY)) {\n $ERROR('#2: If O and V refer to the same object or if they refer to objects joined to each other (13.1.2), return true');\n}\n",
+ "id": "S15.3.5.3_A3_T2"
+ },
+ {
+ "section": "15.3.5",
+ "description": "For testing use variable f = new Function",
+ "test": "var f = new Function;\n\nif (Object.prototype.toString.call(f) !== \"[object Function]\") {\n $ERROR('#1: The value of the [[Class]] property is \"Function\"');\n}\n",
+ "id": "S15.3.5_A1_T1"
+ },
+ {
+ "section": "15.3.5",
+ "description": "For testing use variable f = Function()",
+ "test": "var f = Function();\n\nif (Object.prototype.toString.call(f) !== \"[object Function]\") {\n $ERROR('#1: The value of the [[Class]] property is \"Function\"');\n}\n\n",
+ "id": "S15.3.5_A1_T2"
+ },
+ {
+ "section": "15.3.5",
+ "description": ": For testing call Function(\"var x =1; this.y=2;return \\\"OK\\\";\")();",
+ "test": "//CHECK#1\nif (Function(\"var x =1; this.y=2;return \\\"OK\\\";\")() !== \"OK\") {\n $ERROR('#1: Every function instance has a [[Call]] property');\n}\n\n//CHECK#2\nif (typeof x !== \"undefined\") {\n $ERROR('#2: Every function instance has a [[Call]] property');\n}\n\n//CHECK#3\nif (y !== 2) {\n $ERROR('#3: Every function instance has a [[Call]] property');\n}\n",
+ "id": "S15.3.5_A2_T1"
+ },
+ {
+ "section": "15.3.5",
+ "description": ": For testing call (new Function(\"arg1,arg2\",\"var x =arg1; this.y=arg2;return arg1+arg2;\"))(\"1\",2);",
+ "test": "//CHECK#1\nif ((new Function(\"arg1,arg2\",\"var x =arg1; this.y=arg2;return arg1+arg2;\"))(\"1\",2) !== \"12\") {\n $ERROR('#1: Every function instance has a [[Call]] property');\n}\n\n//CHECK#2\nif (typeof x !== \"undefined\") {\n $ERROR('#2: Every function instance has a [[Call]] property');\n}\n\n//CHECK#3\nif (y !== 2) {\n $ERROR('#3: Every function instance has a [[Call]] property');\n}\n",
+ "id": "S15.3.5_A2_T2"
+ },
+ {
+ "section": "15.3.5",
+ "description": ": As constructor use Function(\"var x =1; this.y=2;return \\\"OK\\\";\");",
+ "test": "FACTORY = Function(\"var x =1; this.y=2;return \\\"OK\\\";\");\nobj = new FACTORY;\n\n//CHECK#1\nif (typeof obj !== \"object\") {\n $ERROR('#1: every function instance has a [[Construct]] property');\n}\n\n//CHECK#2\nif (obj.constructor !== FACTORY) {\n $ERROR('#2: every function instance has a [[Construct]] property');\n}\n\n//CHECK#3\nif (obj.y !== 2) {\n $ERROR('#3: every function instance has a [[Construct]] property');\n}\n",
+ "id": "S15.3.5_A3_T1"
+ },
+ {
+ "section": "15.3.5",
+ "description": ": As constructor use new Function(\"arg1,arg2\",\"var x =1; this.y=arg1+arg2;return \\\"OK\\\";\");",
+ "test": "FACTORY = new Function(\"arg1,arg2\",\"var x =1; this.y=arg1+arg2;return \\\"OK\\\";\");\nobj = new FACTORY(\"1\",2);\n\n//CHECK#1\nif (typeof obj !== \"object\") {\n $ERROR('#1: every function instance has a [[Construct]] property');\n}\n\n//CHECK#2\nif (obj.constructor !== FACTORY) {\n $ERROR('#2: every function instance has a [[Construct]] property');\n}\n\n//CHECK#3\nif (obj.y !== \"12\") {\n $ERROR('#3: every function instance has a [[Construct]] property');\n}\n",
+ "id": "S15.3.5_A3_T2"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.3_Function_Objects.json b/website/resources/scripts/testcases2/15.3_Function_Objects.json
new file mode 100644
index 000000000..50bc5462a
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.3_Function_Objects.json
@@ -0,0 +1,68 @@
+{
+ "testCollection": {
+ "name": "15.3_Function_Objects",
+ "numTests": 10,
+ "tests": [
+ {
+ "section": "15.3.1",
+ "description": "Create simple functions and check returned values",
+ "test": "var f = Function(\"return arguments[0];\");\n\n//CHECK#1\nif (!(f instanceof Function)){\n $ERROR('#1: f instanceof Function');\n}\n\n//CHECK#2\nif (f(1) !== 1) {\n $ERROR('#2: f(1) !== 1');\n}\n\nvar g = new Function(\"return arguments[0];\");\n\n\n//CHECK#3\nif (!(g instanceof Function)) {\n $ERROR('#3: g instanceof Function');\n}\n\n//CHECK#4\nif (g(\"A\") !== \"A\") {\n $ERROR('#4: g(\"A\") !== \"A\"');\n}\n\n//CHECK#5\nif (g(\"A\") !== f(\"A\")) {\n $ERROR('#5: g(\"A\") !== f(\"A\")');\n}\n",
+ "id": "S15.3.1_A1_T1"
+ },
+ {
+ "section": "15.3",
+ "description": "Compare Function with this.Function",
+ "test": "var obj = Function;\n\nvar thisobj = this.Function;\n\nif (obj !== thisobj) {\n $ERROR('Function is the property of global');\n}\n",
+ "id": "S15.3_A1"
+ },
+ {
+ "section": "15.3, 10.2.3, 15.3.2.1",
+ "description": ": Checking if executing \"Function.call(this, \"var x / = 1;\")\" fails;",
+ "test": "//CHECK#\ntry{\n Function.call(this, \"var x / = 1;\");\n} catch(e){\n if (!(e instanceof SyntaxError)) {\n \t$ERROR('#1: function body must be valid');\n }\n} \n\n",
+ "id": "S15.3_A2_T1"
+ },
+ {
+ "section": "15.3, 10.2.3, 15.3.2.1",
+ "description": ": Checking if executing \"Function.call(this, \"var #x = 1;\")\" fails;",
+ "test": "//CHECK#\ntry{\n Function.call(this, \"var #x = 1;\");\n} catch(e){\n if (!(e instanceof SyntaxError)) {\n \t$ERROR('#1: function body must be valid');\n }\n} \n\n",
+ "id": "S15.3_A2_T2"
+ },
+ {
+ "section": "15.3",
+ "description": "First argument is object",
+ "test": "//CHECK#1\ntry{\n var f = Function.call(mars, \"return name;\");\n $ERROR('#1: When applied to the Function object itself, thisArg should be ignored');\n} catch(e){\n if (!(e instanceof ReferenceError)) {\n \t$ERROR('#1.1: When applied to the Function object itself, thisArg should be ignored');\n }\n} \n\nvar mars={name:\"mars\", color:\"red\", number:4};\n\nvar f = Function.call(mars, \"this.godname=\\\"ares\\\"; return this.color;\");\n\nvar about_mars = f();\n\n//CHECK#2\nif (about_mars !== undefined) {\n $ERROR('#2: When applied to the Function object itself, thisArg should be ignored');\n}\n\n//CHECK#3\nif (this.godname !== \"ares\") {\n $ERROR('#3: When applied to the Function object itself, thisArg should be ignored');\n}\n",
+ "id": "S15.3_A3_T1"
+ },
+ {
+ "section": "15.3",
+ "description": "First argument is string and null",
+ "test": "this.color=\"red\";\nvar name=\"mars\";\n\nvar f = Function.call(\"blablastring\", \"return this.color;\");\n\n//CHECK#1\nif (f() !== \"red\") {\n $ERROR('#1: ');\n}\n\nvar g = Function.call(null, \"return this.name;\");\n\n//CHECK#2\nif (g() !== \"mars\") {\n $ERROR('#2: ');\n}\n\n",
+ "id": "S15.3_A3_T2"
+ },
+ {
+ "section": "15.3, 10.2.3",
+ "description": "First argument is this, and this don`t have needed variable",
+ "test": "var f=Function.call(this, \"return planet;\");\nvar g=Function.call(this, \"return color;\");\n\n//CHECK#1\ntry{\n f();\n $ERROR('#1: ');\n} catch(e){\n if (!(e instanceof ReferenceError))\n \t$ERROR('#1.1: ');\n} \n\nvar planet=\"mars\";\n\n//CHECK#2\nif (f() !== \"mars\") {\n $ERROR('#2: ');\n}\n\n//CHECK#3\ntry{\n g();\n $ERROR('#3: ');\n} catch(e){\n if (!(e instanceof ReferenceError))\n \t$ERROR('#3.1: ');\n} \n\nthis.color=\"red\";\n\n//CHECK#4\nif (g() !== \"red\") {\n $ERROR('#4: ');\n}\n",
+ "id": "S15.3_A3_T3"
+ },
+ {
+ "section": "15.3, 10.2.3",
+ "description": "First argument is this, and this have needed variable",
+ "test": "var f=Function.call(this, \"return planet;\");\n\n//CHECK#1\nif (f() !== undefined) {\n $ERROR('#1: ');\n} \n\nvar planet=\"mars\";\n\n//CHECK#2\nif (f() !== \"mars\") {\n $ERROR('#2: ');\n}\n",
+ "id": "S15.3_A3_T4"
+ },
+ {
+ "section": "15.3, 10.2.3",
+ "description": "First argument is this, and this don`t have needed variable. Function return this.var_name",
+ "test": "var f=Function.call(this, \"return this.planet;\");\nvar g=Function.call(this, \"return this.color;\");\n\n//CHECK#1\nif (f() !== undefined) {\n $ERROR('#2: ');\n}\n\nvar planet=\"mars\";\n\n//CHECK#2\nif (f() !== \"mars\") {\n $ERROR('#2: ');\n}\n\n//CHECK#3\nif (g() !== undefined) {\n $ERROR('#3: ');\n} \n\nthis.color=\"red\";\n\n//CHECK#4\nif (g() !== \"red\") {\n $ERROR('#4: ');\n}\n",
+ "id": "S15.3_A3_T5"
+ },
+ {
+ "section": "15.3, 10.2.3",
+ "description": "First argument is this, and this have needed variable. Function return this.var_name",
+ "test": "var f=Function.call(this, \"return this.planet;\");\n\n//CHECK#1\nif (f() !== undefined) {\n $ERROR('#1: ');\n} \n\nvar planet=\"mars\";\n\n//CHECK#2\nif (f() !== \"mars\") {\n $ERROR('#2: ');\n}\n",
+ "id": "S15.3_A3_T6"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.4.1_The_Array_Constructor_Called_as_a_Function.json b/website/resources/scripts/testcases2/15.4.1_The_Array_Constructor_Called_as_a_Function.json
new file mode 100644
index 000000000..9c72ec09e
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.4.1_The_Array_Constructor_Called_as_a_Function.json
@@ -0,0 +1,56 @@
+{
+ "testCollection": {
+ "name": "15.4.1_The_Array_Constructor_Called_as_a_Function",
+ "numTests": 8,
+ "tests": [
+ {
+ "section": "15.4.1, 15.2.4.5",
+ "description": "Create new property of Array.prototype. When new Array object has this property",
+ "test": "//CHECK#1\nArray.prototype.myproperty = 1;\nvar x = Array(); \nif (x.myproperty !== 1) {\n $ERROR('#1: Array.prototype.myproperty = 1; var x = Array(); x.myproperty === 1. Actual: ' + (x.myproperty));\n}\n\n//CHECK#2\nif (x.hasOwnProperty('myproperty') !== false) {\n $ERROR('#2: Array.prototype.myproperty = 1; var x = Array(); x.hasOwnProperty(\\'myproperty\\') === false. Actual: ' + (x.hasOwnProperty('myproperty')));\n}\n",
+ "id": "S15.4.1_A1.1_T1"
+ },
+ {
+ "section": "15.4.1, 15.2.4.2",
+ "description": "Array.prototype.toString = Object.prototype.toString",
+ "test": "//CHECK#1\nArray.prototype.toString = Object.prototype.toString;\nvar x = Array(); \nif (x.toString() !== \"[object \" + \"Array\" + \"]\") {\n $ERROR('#1: Array.prototype.toString = Object.prototype.toString; var x = Array(); x.toString() === \"[object \" + \"Array\" + \"]\". Actual: ' + (x.toString()));\n}\n\n//CHECK#2\nArray.prototype.toString = Object.prototype.toString;\nvar x = Array(0,1,2); \nif (x.toString() !== \"[object \" + \"Array\" + \"]\") {\n $ERROR('#2: Array.prototype.toString = Object.prototype.toString; var x = Array(0,1,2); x.toString() === \"[object \" + \"Array\" + \"]\". Actual: ' + (x.toString()));\n}\n\n",
+ "id": "S15.4.1_A1.1_T2"
+ },
+ {
+ "section": "15.4.1, 15.2.4.6",
+ "description": "Checking use isPrototypeOf",
+ "test": "//CHECK#1\nif (Array.prototype.isPrototypeOf(Array()) !== true) {\n $ERROR('#1: Array.prototype.isPrototypeOf(Array()) === true. Actual: ' + (Array.prototype.isPrototypeOf(Array())));\n}\n\n",
+ "id": "S15.4.1_A1.1_T3"
+ },
+ {
+ "section": "15.4.1, 15.2.4.2",
+ "description": "Checking use Object.prototype.toString",
+ "test": "//CHECK#1\nvar x = Array(); \nx.getClass = Object.prototype.toString;\nif (x.getClass() !== \"[object \" + \"Array\" + \"]\") {\n $ERROR('#1: var x = Array(); x.getClass = Object.prototype.toString; x is Array object. Actual: ' + (x.getClass()));\n}\n\n//CHECK#2\nvar x = Array(0,1,2); \nx.getClass = Object.prototype.toString;\nif (x.getClass() !== \"[object \" + \"Array\" + \"]\") {\n $ERROR('#2: var x = Array(0,1,2); x.getClass = Object.prototype.toString; x is Array object. Actual: ' + (x.getClass()));\n}\n",
+ "id": "S15.4.1_A1.2_T1"
+ },
+ {
+ "section": "15.4.1",
+ "description": "Checking case when Array constructor is given one argument",
+ "test": "var x = Array(2);\n\n//CHECK#1\nif (x.length === 1) {\n $ERROR('#1: var x = Array(2); x.length !== 1');\n}\n\n//CHECK#2\nif (x[0] === 2) {\n $ERROR('#2: var x = Array(2); x[0] !== 2');\n}\n",
+ "id": "S15.4.1_A1.3_T1"
+ },
+ {
+ "section": "15.4.1",
+ "description": "Array constructor is given no arguments or at least two arguments",
+ "test": "//CHECK#1\nif (Array().length !== 0) {\n $ERROR('#1: (Array().length === 0. Actual: ' + (Array().length));\n}\n\n//CHECK#2\nif (Array(0,1,0,1).length !== 4) {\n $ERROR('#2: (Array(0,1,0,1).length === 4. Actual: ' + (Array(0,1,0,1).length));\n}\n\n//CHECK#3\nif (Array(undefined, undefined).length !== 2) {\n $ERROR('#3: (Array(undefined, undefined).length === 2. Actual: ' + (Array(undefined, undefined).length));\n}\n",
+ "id": "S15.4.1_A2.1_T1"
+ },
+ {
+ "section": "15.4.1",
+ "description": "Checking correct work this algorithm",
+ "test": "//CHECK#\nvar x = Array(\n0,1,2,3,4,5,6,7,8,9,\n10,11,12,13,14,15,16,17,18,19,\n20,21,22,23,24,25,26,27,28,29,\n30,31,32,33,34,35,36,37,38,39,\n40,41,42,43,44,45,46,47,48,49,\n50,51,52,53,54,55,56,57,58,59,\n60,61,62,63,64,65,66,67,68,69,\n70,71,72,73,74,75,76,77,78,79,\n80,81,82,83,84,85,86,87,88,89,\n90,91,92,93,94,95,96,97,98,99\n);\n\nfor (var i = 0; i < 100; i++) {\n var result = true;\n if (x[i] !== i) {\n result = false;\n }\n}\n\nif (result !== true) {\n $ERROR('#1: x[i] === i. Actual: ' + (x[i]));\n} \n",
+ "id": "S15.4.1_A2.2_T1"
+ },
+ {
+ "section": "15.4.1, 11.4.3, 11.8.6",
+ "description": "Checking use typeof, instanceof",
+ "test": "//CHECK#1\nif (typeof Array() !== \"object\") {\n $ERROR('#1: typeof Array() === \"object\". Actual: ' + (typeof Array()));\n} \n\n//CHECK#2\nif ((Array() instanceof Array) !== true) {\n $ERROR('#2: (Array() instanceof Array) === true. Actual: ' + (Array() instanceof Array));\n} \n",
+ "id": "S15.4.1_A3.1_T1"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.4.2.1_new_Array.json b/website/resources/scripts/testcases2/15.4.2.1_new_Array.json
new file mode 100644
index 000000000..4586a2dd5
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.4.2.1_new_Array.json
@@ -0,0 +1,50 @@
+{
+ "testCollection": {
+ "name": "15.4.2.1_new_Array",
+ "numTests": 7,
+ "tests": [
+ {
+ "section": "15.4.2.1, 15.2.4.5",
+ "description": "Create new property of Array.prototype. When new Array object has this property",
+ "test": "//CHECK#1\nArray.prototype.myproperty = 1;\nvar x = new Array(); \nif (x.myproperty !== 1) {\n $ERROR('#1: Array.prototype.myproperty = 1; var x = new Array(); x.myproperty === 1. Actual: ' + (x.myproperty));\n}\n\n//CHECK#2\nif (x.hasOwnProperty('myproperty') !== false) {\n $ERROR('#2: Array.prototype.myproperty = 1; var x = new Array(); x.hasOwnProperty(\\'myproperty\\') === false. Actual: ' + (x.hasOwnProperty('myproperty')));\n}\n",
+ "id": "S15.4.2.1_A1.1_T1"
+ },
+ {
+ "section": "15.4.2.1, 15.2.4.2",
+ "description": "Array.prototype.toString = Object.prototype.toString",
+ "test": "//CHECK#1\nArray.prototype.toString = Object.prototype.toString;\nvar x = new Array(); \nif (x.toString() !== \"[object \" + \"Array\" + \"]\") {\n $ERROR('#1: Array.prototype.toString = Object.prototype.toString; var x = new Array(); x.toString() === \"[object \" + \"Array\" + \"]\". Actual: ' + (x.toString()));\n}\n\n//CHECK#2\nArray.prototype.toString = Object.prototype.toString;\nvar x = new Array(0,1,2); \nif (x.toString() !== \"[object \" + \"Array\" + \"]\") {\n $ERROR('#2: Array.prototype.toString = Object.prototype.toString; var x = new Array(0,1,2); x.toString() === \"[object \" + \"Array\" + \"]\". Actual: ' + (x.toString()));\n}\n\n",
+ "id": "S15.4.2.1_A1.1_T2"
+ },
+ {
+ "section": "15.4.2.1, 15.2.4.6",
+ "description": "Checking use isPrototypeOf",
+ "test": "//CHECK#1\nif (Array.prototype.isPrototypeOf(new Array()) !== true) {\n $ERROR('#1: Array.prototype.isPrototypeOf(new Array()) === true. Actual: ' + (Array.prototype.isPrototypeOf(new Array())));\n}\n\n",
+ "id": "S15.4.2.1_A1.1_T3"
+ },
+ {
+ "section": "15.4.2.1, 15.2.4.2",
+ "description": "Checking use Object.prototype.toString",
+ "test": "//CHECK#1\nvar x = new Array(); \nx.getClass = Object.prototype.toString;\nif (x.getClass() !== \"[object \" + \"Array\" + \"]\") {\n $ERROR('#1: var x = new Array(); x.getClass = Object.prototype.toString; x is Array object. Actual: ' + (x.getClass()));\n}\n\n//CHECK#2\nvar x = new Array(0,1,2); \nx.getClass = Object.prototype.toString;\nif (x.getClass() !== \"[object \" + \"Array\" + \"]\") {\n $ERROR('#2: var x = new Array(0,1,2); x.getClass = Object.prototype.toString; x is Array object. Actual: ' + (x.getClass()));\n}\n",
+ "id": "S15.4.2.1_A1.2_T1"
+ },
+ {
+ "section": "15.4.2.1",
+ "description": "Checking case when Array constructor is given one argument",
+ "test": "var x = new Array(2);\n\n//CHECK#1\nif (x.length === 1) {\n $ERROR('#1: var x = new Array(2); x.length !== 1');\n}\n\n//CHECK#2\nif (x[0] === 2) {\n $ERROR('#2: var x = new Array(2); x[0] !== 2');\n}\n",
+ "id": "S15.4.2.1_A1.3_T1"
+ },
+ {
+ "section": "15.4.2.1",
+ "description": "Array constructor is given no arguments or at least two arguments",
+ "test": "//CHECK#1\nif (new Array().length !== 0) {\n $ERROR('#1: new Array().length === 0. Actual: ' + (new Array().length));\n}\n\n//CHECK#2\nif (new Array(0,1,0,1).length !== 4) {\n $ERROR('#2: new Array(0,1,0,1).length === 4. Actual: ' + (new Array(0,1,0,1).length));\n}\n\n//CHECK#3\nif (new Array(undefined, undefined).length !== 2) {\n $ERROR('#3: new Array(undefined, undefined).length === 2. Actual: ' + (new Array(undefined, undefined).length));\n}\n",
+ "id": "S15.4.2.1_A2.1_T1"
+ },
+ {
+ "section": "15.4.2.1",
+ "description": "Checking correct work this algorithm",
+ "test": "//CHECK#\nvar x = new Array(\n0,1,2,3,4,5,6,7,8,9,\n10,11,12,13,14,15,16,17,18,19,\n20,21,22,23,24,25,26,27,28,29,\n30,31,32,33,34,35,36,37,38,39,\n40,41,42,43,44,45,46,47,48,49,\n50,51,52,53,54,55,56,57,58,59,\n60,61,62,63,64,65,66,67,68,69,\n70,71,72,73,74,75,76,77,78,79,\n80,81,82,83,84,85,86,87,88,89,\n90,91,92,93,94,95,96,97,98,99\n);\n\nfor (var i = 0; i < 100; i++) {\n var result = true;\n if (x[i] !== i) {\n result = false;\n }\n}\n\nif (result !== true) {\n $ERROR('#1: x[i] === i. Actual: ' + (x[i]));\n} \n",
+ "id": "S15.4.2.1_A2.2_T1"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.4.2.2_new_Array_len.json b/website/resources/scripts/testcases2/15.4.2.2_new_Array_len.json
new file mode 100644
index 000000000..1bde526da
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.4.2.2_new_Array_len.json
@@ -0,0 +1,86 @@
+{
+ "testCollection": {
+ "name": "15.4.2.2_new_Array_len",
+ "numTests": 13,
+ "tests": [
+ {
+ "section": "15.4.2.2",
+ "description": "Create new property of Array.prototype. When new Array object has this property",
+ "test": "//CHECK#1\nArray.prototype.myproperty = 1;\nvar x = new Array(0); \nif (x.myproperty !== 1) {\n $ERROR('#1: Array.prototype.myproperty = 1; var x = new Array(0); x.myproperty === 1. Actual: ' + (x.myproperty));\n}\n",
+ "id": "S15.4.2.2_A1.1_T1"
+ },
+ {
+ "section": "15.4.2.2, 15.2.4.2",
+ "description": "Array.prototype.toString = Object.prototype.toString",
+ "test": "//CHECK#1\nArray.prototype.toString = Object.prototype.toString;\nvar x = new Array(0); \nif (x.toString() !== \"[object \" + \"Array\" + \"]\") {\n $ERROR('#1: Array.prototype.toString = Object.prototype.toString; var x = new Array(0); x.toString() === \"[object \" + \"Array\" + \"]\". Actual: ' + (x.toString()));\n}\n",
+ "id": "S15.4.2.2_A1.1_T2"
+ },
+ {
+ "section": "15.4.2.2, 15.2.4.6",
+ "description": "Checking use isPrototypeOf",
+ "test": "//CHECK#1\nif (Array.prototype.isPrototypeOf(new Array(0)) !== true) {\n $ERROR('#1: Array.prototype.isPrototypeOf(new Array(0)) === true. Actual: ' + (Array.prototype.isPrototypeOf(new Array(0))));\n}\n\n",
+ "id": "S15.4.2.2_A1.1_T3"
+ },
+ {
+ "section": "15.4.2.2, 15.2.4.2",
+ "description": "Checking use Object.prototype.toString",
+ "test": "//CHECK#1\nvar x = new Array(0); \nx.getClass = Object.prototype.toString;\nif (x.getClass() !== \"[object \" + \"Array\" + \"]\") {\n $ERROR('#1: var x = new Array(0); x.getClass = Object.prototype.toString; x is Array object. Actual: ' + (x.getClass()));\n}\n",
+ "id": "S15.4.2.2_A1.2_T1"
+ },
+ {
+ "section": "15.4.2.2",
+ "description": "Array constructor is given one argument",
+ "test": "//CHECK#1\nvar x = new Array(0); \nif (x.length !== 0) {\n $ERROR('#1: var x = new Array(0); x.length === 0. Actual: ' + (x.length));\n}\n\n//CHECK#2\nvar x = new Array(1); \nif (x.length !== 1) {\n $ERROR('#2: var x = new Array(1); x.length === 1. Actual: ' + (x.length));\n} \n\n//CHECK#3\nvar x = new Array(4294967295); \nif (x.length !== 4294967295) {\n $ERROR('#3: var x = new Array(4294967295); x.length === 4294967295. Actual: ' + (x.length));\n} \n",
+ "id": "S15.4.2.2_A2.1_T1"
+ },
+ {
+ "section": "15.4.2.2, 12.14",
+ "description": "Use try statement. len = -1, 4294967296, 4294967297",
+ "test": "//CHECK#1\ntry { \n new Array(-1); \n $ERROR('#1.1: new Array(-1) throw RangeError. Actual: ' + (new Array(-1)));\n} catch(e) {\n if ((e instanceof RangeError) !== true) {\n $ERROR('#1.2: new Array(-1) throw RangeError. Actual: ' + (e));\n }\n}\n\n//CHECK#2\ntry { \n new Array(4294967296); \n $ERROR('#2.1: new Array(4294967296) throw RangeError. Actual: ' + (new Array(4294967296)));\n} catch(e) {\n if ((e instanceof RangeError) !== true) {\n $ERROR('#2.2: new Array(4294967296) throw RangeError. Actual: ' + (e));\n }\n}\n\n//CHECK#3\ntry { \n new Array(4294967297); \n $ERROR('#3.1: new Array(4294967297) throw RangeError. Actual: ' + (new Array(4294967297)));\n} catch(e) {\n if ((e instanceof RangeError) !== true) {\n $ERROR('#3.2: new Array(4294967297) throw RangeError. Actual: ' + (e));\n }\n}\n",
+ "id": "S15.4.2.2_A2.2_T1"
+ },
+ {
+ "section": "15.4.2.2",
+ "description": "Use try statement. len = NaN, +/-Infinity",
+ "test": "//CHECK#1\ntry { \n new Array(NaN); \n $ERROR('#1.1: new Array(NaN) throw RangeError. Actual: ' + (new Array(NaN)));\n} catch(e) {\n if ((e instanceof RangeError) !== true) {\n $ERROR('#1.2: new Array(NaN) throw RangeError. Actual: ' + (e));\n }\n}\n\n//CHECK#2\ntry { \n new Array(Number.POSITIVE_INFINITY); \n $ERROR('#2.1: new Array(Number.POSITIVE_INFINITY) throw RangeError. Actual: ' + (new Array(Number.POSITIVE_INFINITY)));\n} catch(e) {\n if ((e instanceof RangeError) !== true) {\n $ERROR('#2.2: new Array(Number.POSITIVE_INFINITY) throw RangeError. Actual: ' + (e));\n }\n}\n\n//CHECK#3\ntry { \n new Array(Number.NEGATIVE_INFINITY); \n $ERROR('#3.1: new Array(Number.NEGATIVE_INFINITY) throw RangeError. Actual: ' + (new Array(Number.NEGATIVE_INFINITY)));\n} catch(e) {\n if ((e instanceof RangeError) !== true) {\n $ERROR('#3.2: new Array(Number.NEGATIVE_INFINITY) throw RangeError. Actual: ' + (e));\n }\n}\n",
+ "id": "S15.4.2.2_A2.2_T2"
+ },
+ {
+ "section": "15.4.2.2",
+ "description": "Use try statement. len = 1.5, Number.MAX_VALUE, Number.MIN_VALUE",
+ "test": "//CHECK#1\ntry { \n new Array(1.5); \n $ERROR('#1.1: new Array(1.5) throw RangeError. Actual: ' + (new Array(1.5)));\n} catch(e) {\n if ((e instanceof RangeError) !== true) {\n $ERROR('#1.2: new Array(1.5) throw RangeError. Actual: ' + (e));\n }\n}\n\n//CHECK#2\ntry { \n new Array(Number.MAX_VALUE); \n $ERROR('#2.1: new Array(Number.MAX_VALUE) throw RangeError. Actual: ' + (new Array(Number.MAX_VALUE)));\n} catch(e) {\n if ((e instanceof RangeError) !== true) {\n $ERROR('#2.2: new Array(Number.MAX_VALUE) throw RangeError. Actual: ' + (e));\n }\n}\n\n//CHECK#3\ntry { \n new Array(Number.MIN_VALUE); \n $ERROR('#3.1: new Array(Number.MIN_VALUE) throw RangeError. Actual: ' + (new Array(Number.MIN_VALUE)));\n} catch(e) {\n if ((e instanceof RangeError) !== true) {\n $ERROR('#3.2: new Array(Number.MIN_VALUE) throw RangeError. Actual: ' + (e));\n }\n}\n",
+ "id": "S15.4.2.2_A2.2_T3"
+ },
+ {
+ "section": "15.4.2.2",
+ "description": "Checking for null and undefined",
+ "test": "var x = new Array(null);\n\n//CHECK#1 \nif (x.length !== 1) {\n $ERROR('#1: var x = new Array(null); x.length === 1. Actual: ' + (x.length));\n}\n\n//CHECK#2\nif (x[0] !== null) {\n $ERROR('#2: var x = new Array(null); x[0] === null. Actual: ' + (x[0]));\n}\n\nvar x = new Array(undefined);\n\n//CHECK#3 \nif (x.length !== 1) {\n $ERROR('#3: var x = new Array(undefined); x.length === 1. Actual: ' + (x.length));\n}\n\n//CHECK#4\nif (x[0] !== undefined) {\n $ERROR('#4: var x = new Array(undefined); x[0] === undefined. Actual: ' + (x[0]));\n}\n",
+ "id": "S15.4.2.2_A2.3_T1"
+ },
+ {
+ "section": "15.4.2.2",
+ "description": "Checking for boolean primitive and Boolean object",
+ "test": "var x = new Array(true);\n\n//CHECK#1 \nif (x.length !== 1) {\n $ERROR('#1: var x = new Array(true); x.length === 1. Actual: ' + (x.length));\n}\n\n//CHECK#2\nif (x[0] !== true) {\n $ERROR('#2: var x = new Array(true); x[0] === true. Actual: ' + (x[0]));\n}\n\nvar obj = new Boolean(false);\nvar x = new Array(obj);\n\n//CHECK#3 \nif (x.length !== 1) {\n $ERROR('#3: var obj = new Boolean(false); var x = new Array(obj); x.length === 1. Actual: ' + (x.length));\n}\n\n//CHECK#4\nif (x[0] !== obj) {\n $ERROR('#4: var obj = new Boolean(false); var x = new Array(obj); x[0] === obj. Actual: ' + (x[0]));\n}\n",
+ "id": "S15.4.2.2_A2.3_T2"
+ },
+ {
+ "section": "15.4.2.2",
+ "description": "Checking for boolean primitive and Boolean object",
+ "test": "var x = new Array(\"1\");\n\n//CHECK#1 \nif (x.length !== 1) {\n $ERROR('#1: var x = new Array(\"1\"); x.length === 1. Actual: ' + (x.length));\n}\n\n//CHECK#2\nif (x[0] !== \"1\") {\n $ERROR('#2: var x = new Array(\"1\"); x[0] === \"1\". Actual: ' + (x[0]));\n}\n\nvar obj = new String(\"0\");\nvar x = new Array(obj);\n\n//CHECK#3 \nif (x.length !== 1) {\n $ERROR('#3: var obj = new String(\"0\"); var x = new Array(obj); x.length === 1. Actual: ' + (x.length));\n}\n\n//CHECK#4\nif (x[0] !== obj) {\n $ERROR('#4: var obj = new String(\"0\"); var x = new Array(obj); x[0] === obj. Actual: ' + (x[0]));\n}\n",
+ "id": "S15.4.2.2_A2.3_T3"
+ },
+ {
+ "section": "15.4.2.2",
+ "description": "Checking for Number object",
+ "test": "var obj = new Number(0);\nvar x = new Array(obj);\n\n//CHECK#1 \nif (x.length !== 1) {\n $ERROR('#1: var obj = new Number(0); var x = new Array(obj); x.length === 1. Actual: ' + (x.length));\n}\n\n//CHECK#2\nif (x[0] !== obj) {\n $ERROR('#2: var obj = new Number(0); var x = new Array(obj); x[0] === obj. Actual: ' + (x[0]));\n}\n\nvar obj = new Number(1);\nvar x = new Array(obj);\n\n//CHECK#3 \nif (x.length !== 1) {\n $ERROR('#3: var obj = new Number(1); var x = new Array(obj); x.length === 1. Actual: ' + (x.length));\n}\n\n//CHECK#4\nif (x[0] !== obj) {\n $ERROR('#4: var obj = new Number(1); var x = new Array(obj); x[0] === obj. Actual: ' + (x[0]));\n}\n\nvar obj = new Number(4294967295);\nvar x = new Array(obj);\n\n//CHECK#5 \nif (x.length !== 1) {\n $ERROR('#5: var obj = new Number(4294967295); var x = new Array(obj); x.length === 1. Actual: ' + (x.length));\n}\n\n//CHECK#6\nif (x[0] !== obj) {\n $ERROR('#6: var obj = new Number(4294967295); var x = new Array(obj); x[0] === obj. Actual: ' + (x[0]));\n}\n\n",
+ "id": "S15.4.2.2_A2.3_T4"
+ },
+ {
+ "section": "15.4.2.2",
+ "description": "Checking for Number object",
+ "test": "var obj = new Number(-1);\nvar x = new Array(obj);\n\n//CHECK#1 \nif (x.length !== 1) {\n $ERROR('#1: var obj = new Number(-1); var x = new Array(obj); x.length === 1. Actual: ' + (x.length));\n}\n\n//CHECK#2\nif (x[0] !== obj) {\n $ERROR('#2: var obj = new Number(-1); var x = new Array(obj); x[0] === obj. Actual: ' + (x[0]));\n}\n\nvar obj = new Number(4294967296);\nvar x = new Array(obj);\n\n//CHECK#3 \nif (x.length !== 1) {\n $ERROR('#3: var obj = new Number(4294967296); var x = new Array(obj); x.length === 1. Actual: ' + (x.length));\n}\n\n//CHECK#4\nif (x[0] !== obj) {\n $ERROR('#4: var obj = new Number(4294967296); var x = new Array(obj); x[0] === obj. Actual: ' + (x[0]));\n}\n\nvar obj = new Number(4294967297);\nvar x = new Array(obj);\n\n//CHECK#5 \nif (x.length !== 1) {\n $ERROR('#5: var obj = new Number(4294967297); var x = new Array(obj); x.length === 1. Actual: ' + (x.length));\n}\n\n//CHECK#6\nif (x[0] !== obj) {\n $ERROR('#6: var obj = new Number(4294967297); var x = new Array(obj); x[0] === obj. Actual: ' + (x[0]));\n}\n\n",
+ "id": "S15.4.2.2_A2.3_T5"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.4.3.1_Array_prototype.json b/website/resources/scripts/testcases2/15.4.3.1_Array_prototype.json
new file mode 100644
index 000000000..8505e5275
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.4.3.1_Array_prototype.json
@@ -0,0 +1,42 @@
+{
+ "testCollection": {
+ "name": "15.4.3.1_Array_prototype",
+ "numTests": 5,
+ "tests": [
+ {
+ "section": "15.4.3.1, 15.2.4.5",
+ "description": "Checking use hasOwnProperty",
+ "test": "//CHECK#1\nif (Array.hasOwnProperty('prototype') !== true) {\n\t$FAIL('#1: Array.hasOwnProperty(\\'prototype\\') === true. Actual: ' + (Array.hasOwnProperty('prototype')));\n}\n\n",
+ "id": "S15.4.3.1_A1"
+ },
+ {
+ "section": "15.4.3.1",
+ "description": "Checking if enumerating the Array.prototype property fails",
+ "test": "//CHECK#1\nif (Array.propertyIsEnumerable('prototype') !== false) {\n\t$ERROR('#1: Array.propertyIsEnumerable(\\'prototype\\') === false. Actual: ' + (Array.propertyIsEnumerable('prototype')));\n}\n\n//CHECK#2\nvar result = true;\nfor (var p in Array){\n\tif (p === \"prototype\") {\n\t result = false;\n\t} \n}\n\nif (result !== true) {\n\t$ERROR('#2: result = true; for (p in Array) { if (p === \"prototype\") result = false; } result === true;');\n}\n\n",
+ "id": "S15.4.3.1_A2"
+ },
+ {
+ "section": "15.4.3.1, 15.2.4.5",
+ "description": "Checking if deleting the Array.prototype property fails",
+ "strict_mode_negative": "",
+ "test": "//CHECK#1\nif (Array.hasOwnProperty('prototype') !== true) {\n\t$FAIL('#1: Array.hasOwnProperty(\\'prototype\\') === true. Actual: ' + (Array.hasOwnProperty('prototype')));\n}\n\ndelete Array.prototype;\n\n//CHECK#2\nif (Array.hasOwnProperty('prototype') !== true) {\n\t$ERROR('#2: delete Array.prototype; Array.hasOwnProperty(\\'prototype\\') === true. Actual: ' + (Array.hasOwnProperty('prototype')));\n}\n\n//CHECK#3\nif (Array.prototype === undefined) {\n $ERROR('#3: delete Array.prototype; Array.prototype !== undefined');\n}\n\n\n",
+ "id": "S15.4.3.1_A3",
+ "strict_only": ""
+ },
+ {
+ "section": "15.4.3.1",
+ "description": "Checking if varying the Array.prototype property fails",
+ "strict_mode_negative": "",
+ "test": "//CHECK#1\nvar x = Array.prototype;\nArray.prototype = 1;\nif (Array.prototype !== x) {\n\t$ERROR('#1: x = Array.prototype; Array.prototype = 1; Array.prototype === x. Actual: ' + (Array.prototype));\n}\n\n",
+ "id": "S15.4.3.1_A4",
+ "strict_only": ""
+ },
+ {
+ "section": "15.4.3.1",
+ "description": "Array.prototype.length === 0",
+ "test": "//CHECK#1\nif (Array.prototype.length !== 0) {\n $ERROR('#1.1: Array.prototype.length === 0. Actual: ' + (Array.prototype.length));\n} else {\n if (1 / Array.prototype.length !== Number.POSITIVE_INFINITY) {\n $ERROR('#1.2: Array.prototype.length === +0. Actual: -' + (Array.prototype.length));\n }\n} \n\n",
+ "id": "S15.4.3.1_A5"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.4.3.2.json b/website/resources/scripts/testcases2/15.4.3.2.json
new file mode 100644
index 000000000..f6c49d575
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.4.3.2.json
@@ -0,0 +1,175 @@
+{
+ "testCollection": {
+ "name": "15.4.3.2",
+ "numTests": 24,
+ "tests": [
+ {
+ "id": "15.4.3.2-0-1",
+ "path": "TestCases/chapter15/15.4/15.4.3/15.4.3.2/15.4.3.2-0-1.js",
+ "description": "Array.isArray must exist as a function",
+ "test": "assertTrue((function testcase() {\n var f = Array.isArray;\n if (typeof(f) === \"function\") {\n return true;\n }\n }).call(this));\n"
+ },
+ {
+ "id": "15.4.3.2-0-2",
+ "path": "TestCases/chapter15/15.4/15.4.3/15.4.3.2/15.4.3.2-0-2.js",
+ "description": "Array.isArray must exist as a function taking 1 parameter",
+ "test": "assertTrue((Array.isArray.length === 1));\n",
+ "precondition": "(fnExists(Array.isArray))"
+ },
+ {
+ "id": "15.4.3.2-0-3",
+ "path": "TestCases/chapter15/15.4/15.4.3/15.4.3.2/15.4.3.2-0-3.js",
+ "description": "Array.isArray return true if its argument is an Array",
+ "test": "assertTrue((function testcase() {\n var a = [];\n var b = Array.isArray(a);\n if (b === true) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.isArray))"
+ },
+ {
+ "id": "15.4.3.2-0-4",
+ "path": "TestCases/chapter15/15.4/15.4.3/15.4.3.2/15.4.3.2-0-4.js",
+ "description": "Array.isArray return false if its argument is not an Array",
+ "test": "assertTrue((function testcase() {\n var b_num = Array.isArray(42);\n var b_undef = Array.isArray(undefined);\n var b_bool = Array.isArray(true);\n var b_str = Array.isArray(\"abc\");\n var b_obj = Array.isArray({});\n var b_null = Array.isArray(null);\n \n if (b_num === false &&\n b_undef === false &&\n b_bool === false &&\n b_str === false &&\n b_obj === false &&\n b_null === false) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.isArray))"
+ },
+ {
+ "id": "15.4.3.2-0-5",
+ "path": "TestCases/chapter15/15.4/15.4.3/15.4.3.2/15.4.3.2-0-5.js",
+ "description": "Array.isArray return true if its argument is an Array (Array.prototype)",
+ "test": "assertTrue((function testcase() {\n var b = Array.isArray(Array.prototype);\n if (b === true) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.isArray))"
+ },
+ {
+ "id": "15.4.3.2-0-6",
+ "path": "TestCases/chapter15/15.4/15.4.3/15.4.3.2/15.4.3.2-0-6.js",
+ "description": "Array.isArray return true if its argument is an Array (new Array())",
+ "test": "assertTrue((function testcase() {\n var a = new Array(10);\n var b = Array.isArray(a);\n if (b === true) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.isArray))"
+ },
+ {
+ "id": "15.4.3.2-0-7",
+ "path": "TestCases/chapter15/15.4/15.4.3/15.4.3.2/15.4.3.2-0-7.js",
+ "description": "Array.isArray returns false if its argument is not an Array",
+ "test": "assertTrue((function testcase() {\n var o = new Object();\n o[12] = 13;\n var b = Array.isArray(o);\n if (b === false) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.isArray))"
+ },
+ {
+ "id": "15.4.3.2-1-1",
+ "path": "TestCases/chapter15/15.4/15.4.3/15.4.3.2/15.4.3.2-1-1.js",
+ "description": "Array.isArray applied to boolean primitive",
+ "test": "assertTrue((!Array.isArray(true)));\n",
+ "precondition": "(fnExists(Array.isArray))"
+ },
+ {
+ "id": "15.4.3.2-1-10",
+ "path": "TestCases/chapter15/15.4/15.4.3/15.4.3.2/15.4.3.2-1-10.js",
+ "description": "Array.isArray applied to RegExp object",
+ "test": "assertTrue((!Array.isArray(new RegExp())));\n",
+ "precondition": "(fnExists(Array.isArray))"
+ },
+ {
+ "id": "15.4.3.2-1-11",
+ "path": "TestCases/chapter15/15.4/15.4.3/15.4.3.2/15.4.3.2-1-11.js",
+ "description": "Array.isArray applied to the JSON object",
+ "test": "assertTrue((!Array.isArray(JSON)));\n",
+ "precondition": "(fnExists(Array.isArray))"
+ },
+ {
+ "id": "15.4.3.2-1-12",
+ "path": "TestCases/chapter15/15.4/15.4.3/15.4.3.2/15.4.3.2-1-12.js",
+ "description": "Array.isArray applied to Error object",
+ "test": "assertTrue((!Array.isArray(new SyntaxError())));\n",
+ "precondition": "(fnExists(Array.isArray))"
+ },
+ {
+ "id": "15.4.3.2-1-13",
+ "path": "TestCases/chapter15/15.4/15.4.3/15.4.3.2/15.4.3.2-1-13.js",
+ "description": "Array.isArray applied to Arguments object",
+ "test": "assertTrue((function testcase() {\n\n var arg;\n\n (function fun() {\n arg = arguments;\n }(1, 2, 3));\n\n return !Array.isArray(arg);\n }).call(this));\n",
+ "precondition": "(fnExists(Array.isArray))"
+ },
+ {
+ "id": "15.4.3.2-1-15",
+ "path": "TestCases/chapter15/15.4/15.4.3/15.4.3.2/15.4.3.2-1-15.js",
+ "description": "Array.isArray applied to the global object",
+ "test": "assertTrue((!Array.isArray(fnGlobalObject())));\n",
+ "precondition": "(fnExists(Array.isArray))"
+ },
+ {
+ "id": "15.4.3.2-1-2",
+ "path": "TestCases/chapter15/15.4/15.4.3/15.4.3.2/15.4.3.2-1-2.js",
+ "description": "Array.isArray applied to Boolean Object",
+ "test": "assertTrue((!Array.isArray(new Boolean(false))));\n",
+ "precondition": "(fnExists(Array.isArray))"
+ },
+ {
+ "id": "15.4.3.2-1-3",
+ "path": "TestCases/chapter15/15.4/15.4.3/15.4.3.2/15.4.3.2-1-3.js",
+ "description": "Array.isArray applied to number primitive",
+ "test": "assertTrue((!Array.isArray(5)));\n",
+ "precondition": "(fnExists(Array.isArray))"
+ },
+ {
+ "id": "15.4.3.2-1-4",
+ "path": "TestCases/chapter15/15.4/15.4.3/15.4.3.2/15.4.3.2-1-4.js",
+ "description": "Array.isArray applied to Number object",
+ "test": "assertTrue((!Array.isArray(new Number(-3))));\n",
+ "precondition": "(fnExists(Array.isArray))"
+ },
+ {
+ "id": "15.4.3.2-1-5",
+ "path": "TestCases/chapter15/15.4/15.4.3/15.4.3.2/15.4.3.2-1-5.js",
+ "description": "Array.isArray applied to string primitive",
+ "test": "assertTrue((!Array.isArray(\"abc\")));\n",
+ "precondition": "(fnExists(Array.isArray))"
+ },
+ {
+ "id": "15.4.3.2-1-6",
+ "path": "TestCases/chapter15/15.4/15.4.3/15.4.3.2/15.4.3.2-1-6.js",
+ "description": "Array.isArray applied to String object",
+ "test": "assertTrue((!Array.isArray(new String(\"hello\\nworld\\\\!\"))));\n",
+ "precondition": "(fnExists(Array.isArray))"
+ },
+ {
+ "id": "15.4.3.2-1-7",
+ "path": "TestCases/chapter15/15.4/15.4.3/15.4.3.2/15.4.3.2-1-7.js",
+ "description": "Array.isArray applied to Function object",
+ "test": "assertTrue((!Array.isArray(function () { })));\n",
+ "precondition": "(fnExists(Array.isArray))"
+ },
+ {
+ "id": "15.4.3.2-1-8",
+ "path": "TestCases/chapter15/15.4/15.4.3/15.4.3.2/15.4.3.2-1-8.js",
+ "description": "Array.isArray applied to the Math object",
+ "test": "assertTrue((!Array.isArray(Math)));\n",
+ "precondition": "(fnExists(Array.isArray))"
+ },
+ {
+ "id": "15.4.3.2-1-9",
+ "path": "TestCases/chapter15/15.4/15.4.3/15.4.3.2/15.4.3.2-1-9.js",
+ "description": "Array.isArray applied to Date object",
+ "test": "assertTrue((!Array.isArray(new Date())));\n",
+ "precondition": "(fnExists(Array.isArray))"
+ },
+ {
+ "id": "15.4.3.2-2-1",
+ "path": "TestCases/chapter15/15.4/15.4.3/15.4.3.2/15.4.3.2-2-1.js",
+ "description": "Array.isArray applied to an object with an array as the prototype",
+ "test": "assertTrue((function testcase() {\n\n var proto = [];\n var Con = function () { };\n Con.prototype = proto;\n\n var child = new Con();\n return !Array.isArray(child);\n }).call(this));\n",
+ "precondition": "(fnExists(Array.isArray))"
+ },
+ {
+ "id": "15.4.3.2-2-2",
+ "path": "TestCases/chapter15/15.4/15.4.3/15.4.3.2/15.4.3.2-2-2.js",
+ "description": "Array.isArray applied to an object with Array.prototype as the prototype",
+ "test": "assertTrue((function testcase() {\n\n var proto = Array.prototype;\n var Con = function () { };\n Con.prototype = proto;\n\n var child = new Con();\n\n return !Array.isArray(child);\n }).call(this));\n",
+ "precondition": "(fnExists(Array.isArray))"
+ },
+ {
+ "id": "15.4.3.2-2-3",
+ "path": "TestCases/chapter15/15.4/15.4.3/15.4.3.2/15.4.3.2-2-3.js",
+ "description": "Array.isArray applied to an Array-like object with length and some indexed properties",
+ "test": "assertTrue((!Array.isArray({ 0: 12, 1: 9, length: 2 })));\n",
+ "precondition": "(fnExists(Array.isArray))"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.4.3_Properties_of_the_Array_Constructor.json b/website/resources/scripts/testcases2/15.4.3_Properties_of_the_Array_Constructor.json
new file mode 100644
index 000000000..900090b46
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.4.3_Properties_of_the_Array_Constructor.json
@@ -0,0 +1,50 @@
+{
+ "testCollection": {
+ "name": "15.4.3_Properties_of_the_Array_Constructor",
+ "numTests": 7,
+ "tests": [
+ {
+ "section": "15.4.3, 15.2.4.5",
+ "description": "Create new property of Function.prototype. When Array constructor has this property",
+ "test": "Function.prototype.myproperty = 1;\n\n//CHECK#1\nif (Array.myproperty !== 1) {\n $ERROR('#1: Function.prototype.myproperty = 1; Array.myproperty === 1. Actual: ' + (Array.myproperty));\n}\n\n//CHECK#2\nif (Array.hasOwnProperty('myproperty') !== false) {\n $ERROR('#2: Function.prototype.myproperty = 1; Array.hasOwnProperty(\\'myproperty\\') === false. Actual: ' + (Array.hasOwnProperty('myproperty')));\n}\n",
+ "id": "S15.4.3_A1.1_T1"
+ },
+ {
+ "section": "15.4.3, 15.2.4.2",
+ "description": "Function.prototype.toString = Object.prototype.toString",
+ "test": "//CHECK#1\nFunction.prototype.toString = Object.prototype.toString;\nif (Array.toString() !== \"[object \" + \"Function\" + \"]\") {\n $ERROR('#1: Function.prototype.toString = Object.prototype.toString; Array.toString() === \"[object \" + \"Function\" + \"]\". Actual: ' + (Array.toString()));\n}\n",
+ "id": "S15.4.3_A1.1_T2"
+ },
+ {
+ "section": "15.4.3, 15.2.4.6",
+ "description": "Checking use isPrototypeOf",
+ "test": "//CHECK#1\nif (Function.prototype.isPrototypeOf(Array) !== true) {\n $ERROR('#1: Function.prototype.isPrototypeOf(Array) === true. Actual: ' + (Function.prototype.isPrototypeOf(Array)));\n}\n",
+ "id": "S15.4.3_A1.1_T3"
+ },
+ {
+ "section": "15.4.3, 15.2.4.7, 12.6.4",
+ "description": "Checking use propertyIsEnumerable, for-in",
+ "test": "//CHECK#1\nif (Array.propertyIsEnumerable('length') !== false) {\n $ERROR('#1: Array.propertyIsEnumerable(\\'length\\') === false. Actual: ' + (Array.propertyIsEnumerable('length')));\n}\n\n//CHECK#2\nresult = true;\nfor (p in Array){\n if (p === \"length\") {\n result = false;\n } \n}\n\nif (result !== true) {\n $ERROR('#2: result = true; for (p in Array.slice) { if (p === \"length\") result = false; } result === true;');\n}\n\n",
+ "id": "S15.4.3_A2.1"
+ },
+ {
+ "section": "15.4.3, 15.2.4.5, 11.4.1",
+ "description": "Checking use hasOwnProperty, delete",
+ "test": "//CHECK#1\nif (Array.hasOwnProperty('length') !== true) {\n $FAIL('#1: Array.hasOwnProperty(\\'length\\') === true. Actual: ' + (Array.hasOwnProperty('length')));\n}\n\ndelete Array.length;\n\n//CHECK#2\nif (Array.hasOwnProperty('length') !== true) {\n $ERROR('#2: delete Array.length; Array.hasOwnProperty(\\'length\\') === true. Actual: ' + (Array.hasOwnProperty('length')));\n}\n\n//CHECK#3\nif (Array.length === undefined) {\n $ERROR('#3: delete Array.length; Array.length !== undefined');\n}\n\n\n",
+ "id": "S15.4.3_A2.2"
+ },
+ {
+ "section": "15.4.3",
+ "description": "Checking if varying the length property fails",
+ "test": "//CHECK#1\nx = Array.length;\nArray.length = Infinity;\nif (Array.length !== x) {\n $ERROR('#1: x = Array.length; Array.length = Infinity; Array.length === x. Actual: ' + (Array.length));\n}\n\n",
+ "id": "S15.4.3_A2.3"
+ },
+ {
+ "section": "15.4.3",
+ "description": "Array.length === 1",
+ "test": "//CHECK#1\nif (Array.length !== 1) {\n $ERROR('#1: Array.length === 1. Actual: ' + (Array.length));\n}\n\n",
+ "id": "S15.4.3_A2.4"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.4.4.10.json b/website/resources/scripts/testcases2/15.4.4.10.json
new file mode 100644
index 000000000..0f1a68419
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.4.4.10.json
@@ -0,0 +1,15 @@
+{
+ "testCollection": {
+ "name": "15.4.4.10",
+ "numTests": 1,
+ "tests": [
+ {
+ "id": "15.4.4.10-10-c-ii-1",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.10/15.4.4.10-10-c-ii-1.js",
+ "description": "Array.prototype.slice will slice a string from start to end when index property (read-only) exists in Array.prototype (Step 10.c.ii)",
+ "test": "assertTrue((function testcase() {\n var arrObj = [1, 2, 3];\n try {\n Object.defineProperty(Array.prototype, \"0\", {\n value: \"test\",\n writable: false,\n configurable: true\n });\n\n var newArr = arrObj.slice(0, 1);\n return newArr.hasOwnProperty(\"0\") && newArr[0] === 1 && typeof newArr[1] === \"undefined\";\n } finally {\n delete Array.prototype[0];\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.4.4.10_Array_prototype_slice.json b/website/resources/scripts/testcases2/15.4.4.10_Array_prototype_slice.json
new file mode 100644
index 000000000..2c4131def
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.4.4.10_Array_prototype_slice.json
@@ -0,0 +1,298 @@
+{
+ "testCollection": {
+ "name": "15.4.4.10_Array_prototype_slice",
+ "numTests": 48,
+ "tests": [
+ {
+ "section": "15.4.4.10",
+ "description": "length > end > start = 0",
+ "test": "var x = [0,1,2,3,4];\nvar arr = x.slice(0,3);\n\n//CHECK#1\narr.getClass = Object.prototype.toString;\nif (arr.getClass() !== \"[object \" + \"Array\" + \"]\") {\n $ERROR('#1: var x = [0,1,2,3,4]; var arr = x.slice(0,3); arr is Array object. Actual: ' + (arr.getClass()));\n}\n\n//CHECK#2\nif (arr.length !== 3) {\n $ERROR('#2: var x = [0,1,2,3,4]; var arr = x.slice(0,3); arr.length === 3. Actual: ' + (arr.length));\n} \n\n//CHECK#3\nif (arr[0] !== 0) {\n $ERROR('#3: var x = [0,1,2,3,4]; var arr = x.slice(0,3); arr[0] === 0. Actual: ' + (arr[0]));\n}\n\n//CHECK#4\nif (arr[1] !== 1) {\n $ERROR('#4: var x = [0,1,2,3,4]; var arr = x.slice(0,3); arr[1] === 1. Actual: ' + (arr[1]));\n} \n\n//CHECK#5\nif (arr[2] !== 2) {\n $ERROR('#5: var x = [0,1,2,3,4]; var arr = x.slice(0,3); arr[2] === 2. Actual: ' + (arr[2]));\n} \n\n//CHECK#6\nif (arr[3] !== undefined) {\n $ERROR('#6: var x = [0,1,2,3,4]; var arr = x.slice(0,3); arr[3] === undefined. Actual: ' + (arr[3]));\n} \n",
+ "id": "S15.4.4.10_A1.1_T1"
+ },
+ {
+ "section": "15.4.4.10",
+ "description": "length > end = start > 0",
+ "test": "var x = [0,1,2,3,4];\nvar arr = x.slice(3,3);\n\n//CHECK#1\narr.getClass = Object.prototype.toString;\nif (arr.getClass() !== \"[object \" + \"Array\" + \"]\") {\n $ERROR('#1: var x = [0,1,2,3,4]; var arr = x.slice(3,3); arr is Array object. Actual: ' + (arr.getClass()));\n}\n\n//CHECK#2\nif (arr.length !== 0) {\n $ERROR('#2: var x = [0,1,2,3,4]; var arr = x.slice(3,3); arr.length === 0. Actual: ' + (arr.length));\n} \n\n//CHECK#3\nif (arr[0] !== undefined) {\n $ERROR('#3: var x = [0,1,2,3,4]; var arr = x.slice(3,3); arr[0] === undefined. Actual: ' + (arr[0]));\n}\n",
+ "id": "S15.4.4.10_A1.1_T2"
+ },
+ {
+ "section": "15.4.4.10",
+ "description": "length > start > end > 0",
+ "test": "var x = [0,1,2,3,4];\nvar arr = x.slice(4,3);\n\n//CHECK#1\narr.getClass = Object.prototype.toString;\nif (arr.getClass() !== \"[object \" + \"Array\" + \"]\") {\n $ERROR('#1: var x = [0,1,2,3,4]; var arr = x.slice(4,3); arr is Array object. Actual: ' + (arr.getClass()));\n}\n\n//CHECK#2\nif (arr.length !== 0) {\n $ERROR('#2: var x = [0,1,2,3,4]; var arr = x.slice(4,3); arr.length === 0. Actual: ' + (arr.length));\n} \n\n//CHECK#3\nif (arr[0] !== undefined) {\n $ERROR('#3: var x = [0,1,2,3,4]; var arr = x.slice(4,3); arr[0] === undefined. Actual: ' + (arr[0]));\n}\n",
+ "id": "S15.4.4.10_A1.1_T3"
+ },
+ {
+ "section": "15.4.4.10",
+ "description": "length = end = start > 0",
+ "test": "var x = [0,1,2,3,4];\nvar arr = x.slice(5,5);\n\n//CHECK#1\narr.getClass = Object.prototype.toString;\nif (arr.getClass() !== \"[object \" + \"Array\" + \"]\") {\n $ERROR('#1: var x = [0,1,2,3,4]; var arr = x.slice(5,5); arr is Array object. Actual: ' + (arr.getClass()));\n}\n\n//CHECK#2\nif (arr.length !== 0) {\n $ERROR('#2: var x = [0,1,2,3,4]; var arr = x.slice(5,5); arr.length === 0. Actual: ' + (arr.length));\n} \n\n//CHECK#3\nif (arr[0] !== undefined) {\n $ERROR('#3: var x = [0,1,2,3,4]; var arr = x.slice(5,5); arr[0] === undefined. Actual: ' + (arr[0]));\n}\n",
+ "id": "S15.4.4.10_A1.1_T4"
+ },
+ {
+ "section": "15.4.4.10",
+ "description": "length = end > start > 0",
+ "test": "var x = [0,1,2,3,4];\nvar arr = x.slice(3,5);\n\n//CHECK#1\narr.getClass = Object.prototype.toString;\nif (arr.getClass() !== \"[object \" + \"Array\" + \"]\") {\n $ERROR('#1: var x = [0,1,2,3,4]; var arr = x.slice(3,5); arr is Array object. Actual: ' + (arr.getClass()));\n}\n\n//CHECK#2\nif (arr.length !== 2) {\n $ERROR('#2: var x = [0,1,2,3,4]; var arr = x.slice(3,5); arr.length === 2. Actual: ' + (arr.length));\n} \n\n//CHECK#3\nif (arr[0] !== 3) {\n $ERROR('#3: var x = [0,1,2,3,4]; var arr = x.slice(3,5); arr[0] === 3. Actual: ' + (arr[0]));\n}\n\n//CHECK#4\nif (arr[1] !== 4) {\n $ERROR('#4: var x = [0,1,2,3,4]; var arr = x.slice(3,5); arr[1] === 4. Actual: ' + (arr[1]));\n} \n\n//CHECK#5\nif (arr[3] !== undefined) {\n $ERROR('#5: var x = [0,1,2,3,4]; var arr = x.slice(3,5); arr[3] === undefined. Actual: ' + (arr[3]));\n} \n",
+ "id": "S15.4.4.10_A1.1_T5"
+ },
+ {
+ "section": "15.4.4.10",
+ "description": ": length > end > start > 0;",
+ "test": "var x = [0,1,2,3,4];\nvar arr = x.slice(2,4);\n\n//CHECK#1\narr.getClass = Object.prototype.toString;\nif (arr.getClass() !== \"[object \" + \"Array\" + \"]\") {\n $ERROR('#1: var x = [0,1,2,3,4]; var arr = x.slice(2,4); arr is Array object. Actual: ' + (arr.getClass()));\n}\n\n//CHECK#2\nif (arr.length !== 2) {\n $ERROR('#2: var x = [0,1,2,3,4]; var arr = x.slice(2,4); arr.length === 2. Actual: ' + (arr.length));\n} \n\n//CHECK#3\nif (arr[0] !== 2) {\n $ERROR('#3: var x = [0,1,2,3,4]; var arr = x.slice(2,4); arr[0] === 2. Actual: ' + (arr[0]));\n}\n\n//CHECK#4\nif (arr[1] !== 3) {\n $ERROR('#4: var x = [0,1,2,3,4]; var arr = x.slice(2,4); arr[1] === 3. Actual: ' + (arr[1]));\n} \n\n//CHECK#5\nif (arr[3] !== undefined) {\n $ERROR('#5: var x = [0,1,2,3,4]; var arr = x.slice(2,4); arr[3] === undefined. Actual: ' + (arr[3]));\n} \n",
+ "id": "S15.4.4.10_A1.1_T6"
+ },
+ {
+ "section": "15.4.4.10",
+ "description": "end > length > start > 0",
+ "test": "var x = [0,1,2,3,4];\nvar arr = x.slice(3,6);\n\n//CHECK#1\narr.getClass = Object.prototype.toString;\nif (arr.getClass() !== \"[object \" + \"Array\" + \"]\") {\n $ERROR('#1: var x = [0,1,2,3,4]; var arr = x.slice(3,6); arr is Array object. Actual: ' + (arr.getClass()));\n}\n\n//CHECK#2\nif (arr.length !== 2) {\n $ERROR('#2: var x = [0,1,2,3,4]; var arr = x.slice(3,6); arr.length === 2. Actual: ' + (arr.length));\n} \n\n//CHECK#3\nif (arr[0] !== 3) {\n $ERROR('#3: var x = [0,1,2,3,4]; var arr = x.slice(3,6); arr[0] === 3. Actual: ' + (arr[0]));\n}\n\n//CHECK#4\nif (arr[1] !== 4) {\n $ERROR('#4: var x = [0,1,2,3,4]; var arr = x.slice(3,6); arr[1] === 4. Actual: ' + (arr[1]));\n} \n\n//CHECK#5\nif (arr[3] !== undefined) {\n $ERROR('#5: var x = [0,1,2,3,4]; var arr = x.slice(3,6); arr[3] === undefined. Actual: ' + (arr[3]));\n} \n",
+ "id": "S15.4.4.10_A1.1_T7"
+ },
+ {
+ "section": "15.4.4.10",
+ "description": "length > end = abs(start), start < 0",
+ "test": "var x = [0,1,2,3,4];\nvar arr = x.slice(-3,3);\n\n//CHECK#1\narr.getClass = Object.prototype.toString;\nif (arr.getClass() !== \"[object \" + \"Array\" + \"]\") {\n $ERROR('#1: var x = [0,1,2,3,4]; var arr = x.slice(-3,3); arr is Array object. Actual: ' + (arr.getClass()));\n}\n\n//CHECK#2\nif (arr.length !== 1) {\n $ERROR('#2: var x = [0,1,2,3,4]; var arr = x.slice(-3,3); arr.length === 1. Actual: ' + (arr.length));\n} \n\n//CHECK#3\nif (arr[0] !== 2) {\n $ERROR('#3: var x = [0,1,2,3,4]; var arr = x.slice(-3,3); arr[0] === 2. Actual: ' + (arr[0]));\n}\n\n//CHECK#4\nif (arr[1] !== undefined) {\n $ERROR('#4: var x = [0,1,2,3,4]; var arr = x.slice(-3,3); arr[1] === undefined. Actual: ' + (arr[1]));\n} \n",
+ "id": "S15.4.4.10_A1.2_T1"
+ },
+ {
+ "section": "15.4.4.10",
+ "description": "length = end > abs(start), start < 0",
+ "test": "var x = [0,1,2,3,4];\nvar arr = x.slice(-1,5);\n\n//CHECK#1\narr.getClass = Object.prototype.toString;\nif (arr.getClass() !== \"[object \" + \"Array\" + \"]\") {\n $ERROR('#1: var x = [0,1,2,3,4]; var arr = x.slice(-1,5); arr is Array object. Actual: ' + (arr.getClass()));\n}\n\n//CHECK#2\nif (arr.length !== 1) {\n $ERROR('#2: var x = [0,1,2,3,4]; var arr = x.slice(-1,5); arr.length === 1. Actual: ' + (arr.length));\n} \n\n//CHECK#3\nif (arr[0] !== 4) {\n $ERROR('#3: var x = [0,1,2,3,4]; var arr = x.slice(-1,5); arr[0] === 4. Actual: ' + (arr[0]));\n}\n\n//CHECK#4\nif (arr[1] !== undefined) {\n $ERROR('#4: var x = [0,1,2,3,4]; var arr = x.slice(-1,5); arr[1] === undefined. Actual: ' + (arr[1]));\n} \n",
+ "id": "S15.4.4.10_A1.2_T2"
+ },
+ {
+ "section": "15.4.4.10",
+ "description": "abs(start) = length > end > 0, start < 0",
+ "test": "var x = [0,1,2,3,4];\nvar arr = x.slice(-5,1);\n\n//CHECK#1\narr.getClass = Object.prototype.toString;\nif (arr.getClass() !== \"[object \" + \"Array\" + \"]\") {\n $ERROR('#1: var x = [0,1,2,3,4]; var arr = x.slice(-5,1); arr is Array object. Actual: ' + (arr.getClass()));\n}\n\n//CHECK#2\nif (arr.length !== 1) {\n $ERROR('#2: var x = [0,1,2,3,4]; var arr = x.slice(-5,1); arr.length === 1. Actual: ' + (arr.length));\n} \n\n//CHECK#3\nif (arr[0] !== 0) {\n $ERROR('#3: var x = [0,1,2,3,4]; var arr = x.slice(-5,1); arr[0] === 0. Actual: ' + (arr[0]));\n}\n\n//CHECK#4\nif (arr[1] !== undefined) {\n $ERROR('#4: var x = [0,1,2,3,4]; var arr = x.slice(-5,1); arr[1] === undefined. Actual: ' + (arr[1]));\n} \n",
+ "id": "S15.4.4.10_A1.2_T3"
+ },
+ {
+ "section": "15.4.4.10",
+ "description": "abs(start) > length = end > 0, start < 0",
+ "test": "var x = [0,1,2,3,4];\nvar arr = x.slice(-9,5);\n\n//CHECK#1\narr.getClass = Object.prototype.toString;\nif (arr.getClass() !== \"[object \" + \"Array\" + \"]\") {\n $ERROR('#1: var x = [0,1,2,3,4]; var arr = x.slice(-9,5); arr is Array object. Actual: ' + (arr.getClass()));\n}\n\n//CHECK#2\nif (arr.length !== 5) {\n $ERROR('#2: var x = [0,1,2,3,4]; var arr = x.slice(-9,5); arr.length === 5. Actual: ' + (arr.length));\n} \n\n//CHECK#3\nif (arr[0] !== 0) {\n $ERROR('#3: var x = [0,1,2,3,4]; var arr = x.slice(-9,5); arr[0] === 0. Actual: ' + (arr[0]));\n}\n\n//CHECK#4\nif (arr[1] !== 1) {\n $ERROR('#4: var x = [0,1,2,3,4]; var arr = x.slice(-9,5); arr[1] === 1. Actual: ' + (arr[1]));\n}\n\n//CHECK#5\nif (arr[2] !== 2) {\n $ERROR('#5: var x = [0,1,2,3,4]; var arr = x.slice(-9,5); arr[2] === 2. Actual: ' + (arr[2]));\n}\n\n//CHECK#6\nif (arr[3] !== 3) {\n $ERROR('#6: var x = [0,1,2,3,4]; var arr = x.slice(-9,5); arr[3] === 3. Actual: ' + (arr[3]));\n}\n\n//CHECK#7\nif (arr[4] !== 4) {\n $ERROR('#7: var x = [0,1,2,3,4]; var arr = x.slice(-9,5); arr[4] === 4. Actual: ' + (arr[4]));\n}\n\n//CHECK#8\nif (arr[5] !== undefined) {\n $ERROR('#8: var x = [0,1,2,3,4]; var arr = x.slice(-9,5); arr[5] === undefined. Actual: ' + (arr[5]));\n} \n",
+ "id": "S15.4.4.10_A1.2_T4"
+ },
+ {
+ "section": "15.4.4.10",
+ "description": "length > abs(end) > start = 0, end < 0",
+ "test": "var x = [0,1,2,3,4];\nvar arr = x.slice(0,-2);\n\n//CHECK#1\narr.getClass = Object.prototype.toString;\nif (arr.getClass() !== \"[object \" + \"Array\" + \"]\") {\n $ERROR('#1: var x = [0,1,2,3,4]; var arr = x.slice(0,-2); arr is Array object. Actual: ' + (arr.getClass()));\n}\n\n//CHECK#2\nif (arr.length !== 3) {\n $ERROR('#2: var x = [0,1,2,3,4]; var arr = x.slice(0,-2); arr.length === 3. Actual: ' + (arr.length));\n} \n\n//CHECK#3\nif (arr[0] !== 0) {\n $ERROR('#3: var x = [0,1,2,3,4]; var arr = x.slice(0,-2); arr[0] === 0. Actual: ' + (arr[0]));\n}\n\n//CHECK#4\nif (arr[1] !== 1) {\n $ERROR('#4: var x = [0,1,2,3,4]; var arr = x.slice(0,-2); arr[1] === 1. Actual: ' + (arr[1]));\n} \n\n//CHECK#5\nif (arr[2] !== 2) {\n $ERROR('#5: var x = [0,1,2,3,4]; var arr = x.slice(0,-2); arr[2] === 2. Actual: ' + (arr[2]));\n} \n\n//CHECK#6\nif (arr[3] !== undefined) {\n $ERROR('#6: var x = [0,1,2,3,4]; var arr = x.slice(0,-2); arr[3] === undefined. Actual: ' + (arr[3]));\n} \n",
+ "id": "S15.4.4.10_A1.3_T1"
+ },
+ {
+ "section": "15.4.4.10",
+ "description": "length > abs(end) > start > 0, end < 0",
+ "test": "var x = [0,1,2,3,4];\nvar arr = x.slice(1,-4);\n\n//CHECK#1\narr.getClass = Object.prototype.toString;\nif (arr.getClass() !== \"[object \" + \"Array\" + \"]\") {\n $ERROR('#1: var x = [0,1,2,3,4]; var arr = x.slice(1,-4); arr is Array object. Actual: ' + (arr.getClass()));\n}\n\n//CHECK#2\nif (arr.length !== 0) {\n $ERROR('#2: var x = [0,1,2,3,4]; var arr = x.slice(1,-4); arr.length === 0. Actual: ' + (arr.length));\n} \n\n//CHECK#3\nif (arr[0] !== undefined) {\n $ERROR('#3: var x = [0,1,2,3,4]; var arr = x.slice(1,-4); arr[0] === undefined. Actual: ' + (arr[0]));\n}\n",
+ "id": "S15.4.4.10_A1.3_T2"
+ },
+ {
+ "section": "15.4.4.10",
+ "description": "length = abs(end) > start = 0, end < 0",
+ "test": "var x = [0,1,2,3,4];\nvar arr = x.slice(0,-5);\n\n//CHECK#1\narr.getClass = Object.prototype.toString;\nif (arr.getClass() !== \"[object \" + \"Array\" + \"]\") {\n $ERROR('#1: var x = [0,1,2,3,4]; var arr = x.slice(0,-5); arr is Array object. Actual: ' + (arr.getClass()));\n}\n\n//CHECK#2\nif (arr.length !== 0) {\n $ERROR('#2: var x = [0,1,2,3,4]; var arr = x.slice(0,-5); arr.length === 0. Actual: ' + (arr.length));\n} \n\n//CHECK#3\nif (arr[0] !== undefined) {\n $ERROR('#3: var x = [0,1,2,3,4]; var arr = x.slice(0,-5); arr[0] === undefined. Actual: ' + (arr[0]));\n}\n",
+ "id": "S15.4.4.10_A1.3_T3"
+ },
+ {
+ "section": "15.4.4.10",
+ "description": "abs(end) > length > start > 0, end < 0",
+ "test": "var x = [0,1,2,3,4];\nvar arr = x.slice(4,-9);\n\n//CHECK#1\narr.getClass = Object.prototype.toString;\nif (arr.getClass() !== \"[object \" + \"Array\" + \"]\") {\n $ERROR('#1: var x = [0,1,2,3,4]; var arr = x.slice(4,-9); arr is Array object. Actual: ' + (arr.getClass()));\n}\n\n//CHECK#2\nif (arr.length !== 0) {\n $ERROR('#2: var x = [0,1,2,3,4]; var arr = x.slice(4,-9); arr.length === 0. Actual: ' + (arr.length));\n} \n\n//CHECK#3\nif (arr[0] !== undefined) {\n $ERROR('#3: var x = [0,1,2,3,4]; var arr = x.slice(4,-9); arr[0] === undefined. Actual: ' + (arr[0]));\n}\n",
+ "id": "S15.4.4.10_A1.3_T4"
+ },
+ {
+ "section": "15.4.4.10",
+ "description": "-length = start < end < 0",
+ "test": "var x = [0,1,2,3,4];\nvar arr = x.slice(-5,-2);\n\n//CHECK#1\narr.getClass = Object.prototype.toString;\nif (arr.getClass() !== \"[object \" + \"Array\" + \"]\") {\n $ERROR('#1: var x = [0,1,2,3,4]; var arr = x.slice(-5,-2); arr is Array object. Actual: ' + (arr.getClass()));\n}\n\n//CHECK#2\nif (arr.length !== 3) {\n $ERROR('#2: var x = [0,1,2,3,4]; var arr = x.slice(-5,-2); arr.length === 3. Actual: ' + (arr.length));\n} \n\n//CHECK#3\nif (arr[0] !== 0) {\n $ERROR('#3: var x = [0,1,2,3,4]; var arr = x.slice(-5,-2); arr[0] === 0. Actual: ' + (arr[0]));\n}\n\n//CHECK#4\nif (arr[1] !== 1) {\n $ERROR('#4: var x = [0,1,2,3,4]; var arr = x.slice(-5,-2); arr[1] === 1. Actual: ' + (arr[1]));\n} \n\n//CHECK#5\nif (arr[2] !== 2) {\n $ERROR('#5: var x = [0,1,2,3,4]; var arr = x.slice(-5,-2); arr[2] === 2. Actual: ' + (arr[2]));\n} \n\n//CHECK#6\nif (arr[3] !== undefined) {\n $ERROR('#6: var x = [0,1,2,3,4]; var arr = x.slice(-5,-2); arr[3] === undefined. Actual: ' + (arr[3]));\n} \n",
+ "id": "S15.4.4.10_A1.4_T1"
+ },
+ {
+ "section": "15.4.4.10",
+ "description": "-length < start < end < 0",
+ "test": "var x = [0,1,2,3,4];\nvar arr = x.slice(-3,-1);\n\n//CHECK#1\narr.getClass = Object.prototype.toString;\nif (arr.getClass() !== \"[object \" + \"Array\" + \"]\") {\n $ERROR('#1: var x = [0,1,2,3,4]; var arr = x.slice(-3,-1); arr is Array object. Actual: ' + (arr.getClass()));\n}\n\n//CHECK#2\nif (arr.length !== 2) {\n $ERROR('#2: var x = [0,1,2,3,4]; var arr = x.slice(-3,-1); arr.length === 2. Actual: ' + (arr.length));\n} \n\n//CHECK#3\nif (arr[0] !== 2) {\n $ERROR('#3: var x = [0,1,2,3,4]; var arr = x.slice(-3,-1); arr[0] === 2. Actual: ' + (arr[0]));\n}\n\n//CHECK#4\nif (arr[1] !== 3) {\n $ERROR('#4: var x = [0,1,2,3,4]; var arr = x.slice(-3,-1); arr[1] === 3. Actual: ' + (arr[1]));\n} \n\n//CHECK#5\nif (arr[2] !== undefined) {\n $ERROR('#5: var x = [0,1,2,3,4]; var arr = x.slice(-3,-1); arr[2] === undefined. Actual: ' + (arr[2]));\n} \n",
+ "id": "S15.4.4.10_A1.4_T2"
+ },
+ {
+ "section": "15.4.4.10",
+ "description": "start < -length < end < 0",
+ "test": "var x = [0,1,2,3,4];\nvar arr = x.slice(-9,-1);\n\n//CHECK#1\narr.getClass = Object.prototype.toString;\nif (arr.getClass() !== \"[object \" + \"Array\" + \"]\") {\n $ERROR('#1: var x = [0,1,2,3,4]; var arr = x.slice(-9,-1); arr is Array object. Actual: ' + (arr.getClass()));\n}\n\n//CHECK#2\nif (arr.length !== 4) {\n $ERROR('#2: var x = [0,1,2,3,4]; var arr = x.slice(-9,-1); arr.length === 4. Actual: ' + (arr.length));\n} \n\n//CHECK#3\nif (arr[0] !== 0) {\n $ERROR('#3: var x = [0,1,2,3,4]; var arr = x.slice(-9,-1); arr[0] === 0. Actual: ' + (arr[0]));\n}\n\n//CHECK#4\nif (arr[1] !== 1) {\n $ERROR('#4: var x = [0,1,2,3,4]; var arr = x.slice(-9,-1); arr[1] === 1. Actual: ' + (arr[1]));\n}\n\n//CHECK#5\nif (arr[2] !== 2) {\n $ERROR('#5: var x = [0,1,2,3,4]; var arr = x.slice(-9,-1); arr[2] === 2. Actual: ' + (arr[2]));\n} \n\n//CHECK#6\nif (arr[3] !== 3) {\n $ERROR('#6: var x = [0,1,2,3,4]; var arr = x.slice(-9,-1); arr[3] === 3. Actual: ' + (arr[3]));\n} \n \n//CHECK#7\nif (arr[4] !== undefined) {\n $ERROR('#7: var x = [0,1,2,3,4]; var arr = x.slice(-9,-1); arr[4] === undefined. Actual: ' + (arr[4]));\n} \n",
+ "id": "S15.4.4.10_A1.4_T3"
+ },
+ {
+ "section": "15.4.4.10",
+ "description": "start = end < -length",
+ "test": "var x = [0,1,2,3,4];\nvar arr = x.slice(-6,-6);\n\n//CHECK#1\narr.getClass = Object.prototype.toString;\nif (arr.getClass() !== \"[object \" + \"Array\" + \"]\") {\n $ERROR('#1: var x = [0,1,2,3,4]; var arr = x.slice(-6,-6); arr is Array object. Actual: ' + (arr.getClass()));\n}\n\n//CHECK#2\nif (arr.length !== 0) {\n $ERROR('#2: var x = [0,1,2,3,4]; var arr = x.slice(-6,-6); arr.length === 0. Actual: ' + (arr.length));\n} \n\n//CHECK#3\nif (arr[0] !== undefined) {\n $ERROR('#3: var x = [0,1,2,3,4]; var arr = x.slice(-6,-6); arr[0] === undefined. Actual: ' + (arr[0]));\n}\n",
+ "id": "S15.4.4.10_A1.4_T4"
+ },
+ {
+ "section": "15.4.4.10",
+ "description": "end === undefined",
+ "test": "var x = [0,1,2,3,4];\nvar arr = x.slice(3, undefined);\n\n//CHECK#1\narr.getClass = Object.prototype.toString;\nif (arr.getClass() !== \"[object \" + \"Array\" + \"]\") {\n $ERROR('#1: var x = [0,1,2,3,4]; var arr = x.slice(3, undefined); arr is Array object. Actual: ' + (arr.getClass()));\n}\n\n//CHECK#2\nif (arr.length !== 2) {\n $ERROR('#2: var x = [0,1,2,3,4]; var arr = x.slice(3, undefined); arr.length === 2. Actual: ' + (arr.length));\n} \n\n//CHECK#3\nif (arr[0] !== 3) {\n $ERROR('#3: var x = [0,1,2,3,4]; var arr = x.slice(3, undefined); arr[0] === 3. Actual: ' + (arr[0]));\n}\n\n//CHECK#4\nif (arr[1] !== 4) {\n $ERROR('#4: var x = [0,1,2,3,4]; var arr = x.slice(3, undefined); arr[1] === 4. Actual: ' + (arr[1]));\n}\n\n//CHECK#5\nif (arr[2] !== undefined) {\n $ERROR('#5: var x = [0,1,2,3,4]; var arr = x.slice(3, undefined); arr[2] === undefined. Actual: ' + (arr[2]));\n} \n",
+ "id": "S15.4.4.10_A1.5_T1"
+ },
+ {
+ "section": "15.4.4.10",
+ "description": "end is absent",
+ "test": "var x = [0,1,2,3,4];\nvar arr = x.slice(-2);\n\n//CHECK#1\narr.getClass = Object.prototype.toString;\nif (arr.getClass() !== \"[object \" + \"Array\" + \"]\") {\n $ERROR('#1: var x = [0,1,2,3,4]; var arr = x.slice(-2); arr is Array object. Actual: ' + (arr.getClass()));\n}\n\n//CHECK#2\nif (arr.length !== 2) {\n $ERROR('#2: var x = [0,1,2,3,4]; var arr = x.slice(-2); arr.length === 2. Actual: ' + (arr.length));\n} \n\n//CHECK#3\nif (arr[0] !== 3) {\n $ERROR('#3: var x = [0,1,2,3,4]; var arr = x.slice(-2); arr[0] === 3. Actual: ' + (arr[0]));\n}\n\n//CHECK#4\nif (arr[1] !== 4) {\n $ERROR('#4: var x = [0,1,2,3,4]; var arr = x.slice(-2); arr[1] === 4. Actual: ' + (arr[1]));\n}\n\n//CHECK#5\nif (arr[2] !== undefined) {\n $ERROR('#5: var x = [0,1,2,3,4]; var arr = x.slice(-2); arr[2] === undefined. Actual: ' + (arr[2]));\n} \n",
+ "id": "S15.4.4.10_A1.5_T2"
+ },
+ {
+ "section": "15.4.4.10",
+ "description": "start is not integer",
+ "test": "var x = [0,1,2,3,4];\nvar arr = x.slice(2.5,4);\n\n//CHECK#1\narr.getClass = Object.prototype.toString;\nif (arr.getClass() !== \"[object \" + \"Array\" + \"]\") {\n $ERROR('#1: var x = [0,1,2,3,4]; var arr = x.slice(2.5,4); arr is Array object. Actual: ' + (arr.getClass()));\n}\n\n//CHECK#2\nif (arr.length !== 2) {\n $ERROR('#2: var x = [0,1,2,3,4]; var arr = x.slice(2.5,4); arr.length === 2. Actual: ' + (arr.length));\n} \n\n//CHECK#3\nif (arr[0] !== 2) {\n $ERROR('#3: var x = [0,1,2,3,4]; var arr = x.slice(2.5,4); arr[0] === 2. Actual: ' + (arr[0]));\n}\n\n//CHECK#4\nif (arr[1] !== 3) {\n $ERROR('#4: var x = [0,1,2,3,4]; var arr = x.slice(2.5,4); arr[1] === 3. Actual: ' + (arr[1]));\n} \n\n//CHECK#5\nif (arr[3] !== undefined) {\n $ERROR('#5: var x = [0,1,2,3,4]; var arr = x.slice(2.5,4); arr[3] === undefined. Actual: ' + (arr[3]));\n} \n",
+ "id": "S15.4.4.10_A2.1_T1"
+ },
+ {
+ "section": "15.4.4.10",
+ "description": "start = NaN",
+ "test": "var x = [0,1,2,3,4];\nvar arr = x.slice(NaN,3);\n\n//CHECK#1\narr.getClass = Object.prototype.toString;\nif (arr.getClass() !== \"[object \" + \"Array\" + \"]\") {\n $ERROR('#1: var x = [0,1,2,3,4]; var arr = x.slice(NaN,3); arr is Array object. Actual: ' + (arr.getClass()));\n}\n\n//CHECK#2\nif (arr.length !== 3) {\n $ERROR('#2: var x = [0,1,2,3,4]; var arr = x.slice(NaN,3); arr.length === 3. Actual: ' + (arr.length));\n} \n\n//CHECK#3\nif (arr[0] !== 0) {\n $ERROR('#3: var x = [0,1,2,3,4]; var arr = x.slice(NaN,3); arr[0] === 0. Actual: ' + (arr[0]));\n}\n\n//CHECK#4\nif (arr[1] !== 1) {\n $ERROR('#4: var x = [0,1,2,3,4]; var arr = x.slice(NaN,3); arr[1] === 1. Actual: ' + (arr[1]));\n} \n\n//CHECK#5\nif (arr[2] !== 2) {\n $ERROR('#5: var x = [0,1,2,3,4]; var arr = x.slice(NaN,3); arr[2] === 2. Actual: ' + (arr[2]));\n} \n\n//CHECK#6\nif (arr[3] !== undefined) {\n $ERROR('#6: var x = [0,1,2,3,4]; var arr = x.slice(NaN,3); arr[3] === undefined. Actual: ' + (arr[3]));\n} \n",
+ "id": "S15.4.4.10_A2.1_T2"
+ },
+ {
+ "section": "15.4.4.10",
+ "description": "start = Infinity",
+ "test": "var x = [0,1,2,3,4];\nvar arr = x.slice(Number.POSITIVE_INFINITY,3);\n\n//CHECK#1\narr.getClass = Object.prototype.toString;\nif (arr.getClass() !== \"[object \" + \"Array\" + \"]\") {\n $ERROR('#1: var x = [0,1,2,3,4]; var arr = x.slice(Number.POSITIVE_INFINITY,3); arr is Array object. Actual: ' + (arr.getClass()));\n}\n\n//CHECK#2\nif (arr.length !== 0) {\n $ERROR('#2: var x = [0,1,2,3,4]; var arr = x.slice(Number.POSITIVE_INFINITY,3); arr.length === 0. Actual: ' + (arr.length));\n} \n\n//CHECK#3\nif (arr[0] !== undefined) {\n $ERROR('#3: var x = [0,1,2,3,4]; var arr = x.slice(Number.POSITIVE_INFINITY,3); arr[0] === undefined. Actual: ' + (arr[0]));\n}\n",
+ "id": "S15.4.4.10_A2.1_T3"
+ },
+ {
+ "section": "15.4.4.10",
+ "description": "start = -Infinity",
+ "test": "var x = [0,1,2,3,4];\nvar arr = x.slice(Number.NEGATIVE_INFINITY,3);\n\n//CHECK#1\narr.getClass = Object.prototype.toString;\nif (arr.getClass() !== \"[object \" + \"Array\" + \"]\") {\n $ERROR('#1: var x = [0,1,2,3,4]; var arr = x.slice(Number.NEGATIVE_INFINITY,3); arr is Array object. Actual: ' + (arr.getClass()));\n}\n\n//CHECK#2\nif (arr.length !== 3) {\n $ERROR('#2: var x = [0,1,2,3,4]; var arr = x.slice(Number.NEGATIVE_INFINITY,3); arr.length === 3. Actual: ' + (arr.length));\n} \n\n//CHECK#3\nif (arr[0] !== 0) {\n $ERROR('#3: var x = [0,1,2,3,4]; var arr = x.slice(Number.NEGATIVE_INFINITY,3); arr[0] === 0. Actual: ' + (arr[0]));\n}\n\n//CHECK#4\nif (arr[1] !== 1) {\n $ERROR('#4: var x = [0,1,2,3,4]; var arr = x.slice(Number.NEGATIVE_INFINITY,3); arr[1] === 1. Actual: ' + (arr[1]));\n} \n\n//CHECK#5\nif (arr[2] !== 2) {\n $ERROR('#5: var x = [0,1,2,3,4]; var arr = x.slice(Number.NEGATIVE_INFINITY,3); arr[2] === 2. Actual: ' + (arr[2]));\n} \n\n//CHECK#6\nif (arr[3] !== undefined) {\n $ERROR('#6: var x = [0,1,2,3,4]; var arr = x.slice(Number.NEGATIVE_INFINITY,3); arr[3] === undefined. Actual: ' + (arr[3]));\n} \n",
+ "id": "S15.4.4.10_A2.1_T4"
+ },
+ {
+ "section": "15.4.4.10",
+ "description": "ToInteger use ToNumber",
+ "test": "var x = [0,1,2,3,4];\nvar arr = x.slice({valueOf: function() {return 0}, toString: function() {return 3}},3);\n\n//CHECK#1\narr.getClass = Object.prototype.toString;\nif (arr.getClass() !== \"[object \" + \"Array\" + \"]\") {\n $ERROR('#1: var x = [0,1,2,3,4]; var arr = x.slice({valueOf: function() {return 0}, toString: function() {return 3}},3); arr is Array object. Actual: ' + (arr.getClass()));\n}\n\n//CHECK#2\nif (arr.length !== 3) {\n $ERROR('#2: var x = [0,1,2,3,4]; var arr = x.slice({valueOf: function() {return 0}, toString: function() {return 3}},3); arr.length === 3. Actual: ' + (arr.length));\n} \n\n//CHECK#3\nif (arr[0] !== 0) {\n $ERROR('#3: var x = [0,1,2,3,4]; var arr = x.slice({valueOf: function() {return 0}, toString: function() {return 3}},3); arr[0] === 0. Actual: ' + (arr[0]));\n}\n\n//CHECK#4\nif (arr[1] !== 1) {\n $ERROR('#4: var x = [0,1,2,3,4]; var arr = x.slice({valueOf: function() {return 0}, toString: function() {return 3}},3); arr[1] === 1. Actual: ' + (arr[1]));\n} \n\n//CHECK#5\nif (arr[2] !== 2) {\n $ERROR('#5: var x = [0,1,2,3,4]; var arr = x.slice({valueOf: function() {return 0}, toString: function() {return 3}},3); arr[2] === 2. Actual: ' + (arr[2]));\n} \n\n//CHECK#6\nif (arr[3] !== undefined) {\n $ERROR('#6: var x = [0,1,2,3,4]; var arr = x.slice({valueOf: function() {return 0}, toString: function() {return 3}},3); arr[3] === undefined. Actual: ' + (arr[3]));\n} \n",
+ "id": "S15.4.4.10_A2.1_T5"
+ },
+ {
+ "section": "15.4.4.10",
+ "description": "end is not integer",
+ "test": "var x = [0,1,2,3,4];\nvar arr = x.slice(2,4.5);\n\n//CHECK#1\narr.getClass = Object.prototype.toString;\nif (arr.getClass() !== \"[object \" + \"Array\" + \"]\") {\n $ERROR('#1: var x = [0,1,2,3,4]; var arr = x.slice(2,4.5); arr is Array object. Actual: ' + (arr.getClass()));\n}\n\n//CHECK#2\nif (arr.length !== 2) {\n $ERROR('#2: var x = [0,1,2,3,4]; var arr = x.slice(2,4.5); arr.length === 2. Actual: ' + (arr.length));\n} \n\n//CHECK#3\nif (arr[0] !== 2) {\n $ERROR('#3: var x = [0,1,2,3,4]; var arr = x.slice(2,4.5); arr[0] === 2. Actual: ' + (arr[0]));\n}\n\n//CHECK#4\nif (arr[1] !== 3) {\n $ERROR('#4: var x = [0,1,2,3,4]; var arr = x.slice(2,4.5); arr[1] === 3. Actual: ' + (arr[1]));\n} \n\n//CHECK#5\nif (arr[3] !== undefined) {\n $ERROR('#5: var x = [0,1,2,3,4]; var arr = x.slice(2,4.5); arr[3] === undefined. Actual: ' + (arr[3]));\n} \n",
+ "id": "S15.4.4.10_A2.2_T1"
+ },
+ {
+ "section": "15.4.4.10",
+ "description": "end = NaN",
+ "test": "var x = [0,1,2,3,4];\nvar arr = x.slice(0,NaN);\n\n//CHECK#1\narr.getClass = Object.prototype.toString;\nif (arr.getClass() !== \"[object \" + \"Array\" + \"]\") {\n $ERROR('#1: var x = [0,1,2,3,4]; var arr = x.slice(0,NaN); arr is Array object. Actual: ' + (arr.getClass()));\n}\n\n//CHECK#2\nif (arr.length !== 0) {\n $ERROR('#2: var x = [0,1,2,3,4]; var arr = x.slice(0,NaN); arr.length === 0. Actual: ' + (arr.length));\n} \n\n//CHECK#3\nif (arr[0] !== undefined) {\n $ERROR('#3: var x = [0,1,2,3,4]; var arr = x.slice(0,NaN); arr[0] === undefined. Actual: ' + (arr[0]));\n}\n",
+ "id": "S15.4.4.10_A2.2_T2"
+ },
+ {
+ "section": "15.4.4.10",
+ "description": "end = Infinity",
+ "test": "var x = [0,1,2,3,4];\nvar arr = x.slice(0,Number.POSITIVE_INFINITY);\n\n//CHECK#1\narr.getClass = Object.prototype.toString;\nif (arr.getClass() !== \"[object \" + \"Array\" + \"]\") {\n $ERROR('#1: var x = [0,1,2,3,4]; var arr = x.slice(0,Number.POSITIVE_INFINITY); arr is Array object. Actual: ' + (arr.getClass()));\n}\n\n//CHECK#2\nif (arr.length !== 5) {\n $ERROR('#2: var x = [0,1,2,3,4]; var arr = x.slice(0,Number.POSITIVE_INFINITY); arr.length === 5. Actual: ' + (arr.length));\n} \n\n//CHECK#3\nif (arr[0] !== 0) {\n $ERROR('#3: var x = [0,1,2,3,4]; var arr = x.slice(0,Number.POSITIVE_INFINITY); arr[0] === 0. Actual: ' + (arr[0]));\n}\n\n//CHECK#4\nif (arr[1] !== 1) {\n $ERROR('#4: var x = [0,1,2,3,4]; var arr = x.slice(0,Number.POSITIVE_INFINITY); arr[1] === 1. Actual: ' + (arr[1]));\n}\n\n//CHECK#5\nif (arr[2] !== 2) {\n $ERROR('#5: var x = [0,1,2,3,4]; var arr = x.slice(0,Number.POSITIVE_INFINITY); arr[2] === 2. Actual: ' + (arr[2]));\n}\n\n//CHECK#6\nif (arr[3] !== 3) {\n $ERROR('#6: var x = [0,1,2,3,4]; var arr = x.slice(0,Number.POSITIVE_INFINITY); arr[3] === 3. Actual: ' + (arr[3]));\n}\n\n//CHECK#7\nif (arr[4] !== 4) {\n $ERROR('#7: var x = [0,1,2,3,4]; var arr = x.slice(0,Number.POSITIVE_INFINITY); arr[4] === 4. Actual: ' + (arr[4]));\n}\n\n//CHECK#8\nif (arr[5] !== undefined) {\n $ERROR('#8: var x = [0,1,2,3,4]; var arr = x.slice(0,Number.POSITIVE_INFINITY); arr[5] === undefined. Actual: ' + (arr[5]));\n} \n",
+ "id": "S15.4.4.10_A2.2_T3"
+ },
+ {
+ "section": "15.4.4.10",
+ "description": "end = -Infinity",
+ "test": "var x = [0,1,2,3,4];\nvar arr = x.slice(0,Number.NEGATIVE_INFINITY);\n\n//CHECK#1\narr.getClass = Object.prototype.toString;\nif (arr.getClass() !== \"[object \" + \"Array\" + \"]\") {\n $ERROR('#1: var x = [0,1,2,3,4]; var arr = x.slice(0,Number.NEGATIVE_INFINITY); arr is Array object. Actual: ' + (arr.getClass()));\n}\n\n//CHECK#2\nif (arr.length !== 0) {\n $ERROR('#2: var x = [0,1,2,3,4]; var arr = x.slice(0,Number.NEGATIVE_INFINITY); arr.length === 0. Actual: ' + (arr.length));\n} \n\n//CHECK#3\nif (arr[0] !== undefined) {\n $ERROR('#3: var x = [0,1,2,3,4]; var arr = x.slice(0,Number.NEGATIVE_INFINITY); arr[0] === undefined. Actual: ' + (arr[0]));\n}\n",
+ "id": "S15.4.4.10_A2.2_T4"
+ },
+ {
+ "section": "15.4.4.10",
+ "description": "ToInteger use ToNumber",
+ "test": "var x = [0,1,2,3,4];\nvar arr = x.slice(0,{valueOf: function() {return 3}, toString: function() {return 0}});\n\n//CHECK#1\narr.getClass = Object.prototype.toString;\nif (arr.getClass() !== \"[object \" + \"Array\" + \"]\") {\n $ERROR('#1: var x = [0,1,2,3,4]; var arr = x.slice(0,{valueOf: function() {return 3}, toString: function() {return 0}}); arr is Array object. Actual: ' + (arr.getClass()));\n}\n\n//CHECK#2\nif (arr.length !== 3) {\n $ERROR('#2: var x = [0,1,2,3,4]; var arr = x.slice(0,{valueOf: function() {return 3}, toString: function() {return 0}}); arr.length === 3. Actual: ' + (arr.length));\n} \n\n//CHECK#3\nif (arr[0] !== 0) {\n $ERROR('#3: var x = [0,1,2,3,4]; var arr = x.slice(0,{valueOf: function() {return 3}, toString: function() {return 0}}); arr[0] === 0. Actual: ' + (arr[0]));\n}\n\n//CHECK#4\nif (arr[1] !== 1) {\n $ERROR('#4: var x = [0,1,2,3,4]; var arr = x.slice(0,{valueOf: function() {return 3}, toString: function() {return 0}}); arr[1] === 1. Actual: ' + (arr[1]));\n} \n\n//CHECK#5\nif (arr[2] !== 2) {\n $ERROR('#5: var x = [0,1,2,3,4]; var arr = x.slice(0,{valueOf: function() {return 3}, toString: function() {return 0}}); arr[2] === 2. Actual: ' + (arr[2]));\n} \n\n//CHECK#6\nif (arr[3] !== undefined) {\n $ERROR('#6: var x = [0,1,2,3,4]; var arr = x.slice(0,{valueOf: function() {return 3}, toString: function() {return 0}}); arr[3] === undefined. Actual: ' + (arr[3]));\n} \n",
+ "id": "S15.4.4.10_A2.2_T5"
+ },
+ {
+ "section": "15.4.4.10",
+ "description": "If start is positive, use min(start, length).\nIf end is positive, use min(end, length)",
+ "test": "var obj = {};\nobj.slice = Array.prototype.slice;\nobj[0] = 0;\nobj[1] = 1;\nobj[2] = 2;\nobj[3] = 3;\nobj[4] = 4;\nobj.length = 5;\nvar arr = obj.slice(0,3);\n\n//CHECK#1\narr.getClass = Object.prototype.toString;\nif (arr.getClass() !== \"[object \" + \"Array\" + \"]\") {\n $ERROR('#1: var obj = {}; obj.slice = Array.prototype.slice; obj[0] = 0; obj[1] = 1; obj[2] = 2; obj[3] = 3; obj[4] = 4; obj.length = 5; var arr = obj.slice(0,3); arr is Array object. Actual: ' + (arr.getClass()));\n}\n\n//CHECK#2\nif (arr.length !== 3) {\n $ERROR('#2: var obj = {}; obj.slice = Array.prototype.slice; obj[0] = 0; obj[1] = 1; obj[2] = 2; obj[3] = 3; obj[4] = 4; obj.length = 5; var arr = obj.slice(0,3); arr.length === 3. Actual: ' + (arr.length));\n} \n\n//CHECK#3\nif (arr[0] !== 0) {\n $ERROR('#3: var obj = {}; obj.slice = Array.prototype.slice; obj[0] = 0; obj[1] = 1; obj[2] = 2; obj[3] = 3; obj[4] = 4; obj.length = 5; var arr = obj.slice(0,3); arr[0] === 0. Actual: ' + (arr[0]));\n}\n\n//CHECK#4\nif (arr[1] !== 1) {\n $ERROR('#4: var obj = {}; obj.slice = Array.prototype.slice; obj[0] = 0; obj[1] = 1; obj[2] = 2; obj[3] = 3; obj[4] = 4; obj.length = 5; var arr = obj.slice(0,3); arr[1] === 1. Actual: ' + (arr[1]));\n} \n\n//CHECK#5\nif (arr[2] !== 2) {\n $ERROR('#5: var obj = {}; obj.slice = Array.prototype.slice; obj[0] = 0; obj[1] = 1; obj[2] = 2; obj[3] = 3; obj[4] = 4; obj.length = 5; var arr = obj.slice(0,3); arr[2] === 2. Actual: ' + (arr[2]));\n} \n\n//CHECK#6\nif (arr[3] !== undefined) {\n $ERROR('#6: var obj = {}; obj.slice = Array.prototype.slice; obj[0] = 0; obj[1] = 1; obj[2] = 2; obj[3] = 3; obj[4] = 4; obj.length = 5; var arr = obj.slice(0,3); arr[3] === undefined. Actual: ' + (arr[3]));\n} \n",
+ "id": "S15.4.4.10_A2_T1"
+ },
+ {
+ "section": "15.4.4.10",
+ "description": "If start is negative, use max(start + length, 0).\nIf end is positive, use min(end, length)",
+ "test": "var obj = {};\nobj.slice = Array.prototype.slice;\nobj[0] = 0;\nobj[1] = 1;\nobj[2] = 2;\nobj[3] = 3;\nobj[4] = 4;\nobj.length = 5;\nvar arr = obj.slice(-5,3);\n\n//CHECK#1\narr.getClass = Object.prototype.toString;\nif (arr.getClass() !== \"[object \" + \"Array\" + \"]\") {\n $ERROR('#1: var obj = {}; obj.slice = Array.prototype.slice; obj[0] = 0; obj[1] = 1; obj[2] = 2; obj[3] = 3; obj[4] = 4; obj.length = 5; var arr = obj.slice(-5,3); arr is Array object. Actual: ' + (arr.getClass()));\n}\n\n//CHECK#2\nif (arr.length !== 3) {\n $ERROR('#2: var obj = {}; obj.slice = Array.prototype.slice; obj[0] = 0; obj[1] = 1; obj[2] = 2; obj[3] = 3; obj[4] = 4; obj.length = 5; var arr = obj.slice(-5,3); arr.length === 3. Actual: ' + (arr.length));\n} \n\n//CHECK#3\nif (arr[0] !== 0) {\n $ERROR('#3: var obj = {}; obj.slice = Array.prototype.slice; obj[0] = 0; obj[1] = 1; obj[2] = 2; obj[3] = 3; obj[4] = 4; obj.length = 5; var arr = obj.slice(-5,3); arr[0] === 0. Actual: ' + (arr[0]));\n}\n\n//CHECK#4\nif (arr[1] !== 1) {\n $ERROR('#4: var obj = {}; obj.slice = Array.prototype.slice; obj[0] = 0; obj[1] = 1; obj[2] = 2; obj[3] = 3; obj[4] = 4; obj.length = 5; var arr = obj.slice(-5,3); arr[1] === 1. Actual: ' + (arr[1]));\n} \n\n//CHECK#5\nif (arr[2] !== 2) {\n $ERROR('#5: var obj = {}; obj.slice = Array.prototype.slice; obj[0] = 0; obj[1] = 1; obj[2] = 2; obj[3] = 3; obj[4] = 4; obj.length = 5; var arr = obj.slice(-5,3); arr[2] === 2. Actual: ' + (arr[2]));\n} \n\n//CHECK#6\nif (arr[3] !== undefined) {\n $ERROR('#6: var obj = {}; obj.slice = Array.prototype.slice; obj[0] = 0; obj[1] = 1; obj[2] = 2; obj[3] = 3; obj[4] = 4; obj.length = 5; var arr = obj.slice(-5,3); arr[3] === undefined. Actual: ' + (arr[3]));\n} \n",
+ "id": "S15.4.4.10_A2_T2"
+ },
+ {
+ "section": "15.4.4.10",
+ "description": "If start is positive, use min(start, length).\nIf end is negative, use max(end + length, 0)",
+ "test": "var obj = {};\nobj.slice = Array.prototype.slice;\nobj[0] = 0;\nobj[1] = 1;\nobj[2] = 2;\nobj[3] = 3;\nobj[4] = 4;\nobj.length = 5;\nvar arr = obj.slice(0,-2);\n\n//CHECK#1\narr.getClass = Object.prototype.toString;\nif (arr.getClass() !== \"[object \" + \"Array\" + \"]\") {\n $ERROR('#1: var obj = {}; obj.slice = Array.prototype.slice; obj[0] = 0; obj[1] = 1; obj[2] = 2; obj[3] = 3; obj[4] = 4; obj.length = 5; var arr = obj.slice(0,-2); arr is Array object. Actual: ' + (arr.getClass()));\n}\n\n//CHECK#2\nif (arr.length !== 3) {\n $ERROR('#2: var obj = {}; obj.slice = Array.prototype.slice; obj[0] = 0; obj[1] = 1; obj[2] = 2; obj[3] = 3; obj[4] = 4; obj.length = 5; var arr = obj.slice(0,-2); arr.length === 3. Actual: ' + (arr.length));\n} \n\n//CHECK#3\nif (arr[0] !== 0) {\n $ERROR('#3: var obj = {}; obj.slice = Array.prototype.slice; obj[0] = 0; obj[1] = 1; obj[2] = 2; obj[3] = 3; obj[4] = 4; obj.length = 5; var arr = obj.slice(0,-2); arr[0] === 0. Actual: ' + (arr[0]));\n}\n\n//CHECK#4\nif (arr[1] !== 1) {\n $ERROR('#4: var obj = {}; obj.slice = Array.prototype.slice; obj[0] = 0; obj[1] = 1; obj[2] = 2; obj[3] = 3; obj[4] = 4; obj.length = 5; var arr = obj.slice(0,-2); arr[1] === 1. Actual: ' + (arr[1]));\n} \n\n//CHECK#5\nif (arr[2] !== 2) {\n $ERROR('#5: var obj = {}; obj.slice = Array.prototype.slice; obj[0] = 0; obj[1] = 1; obj[2] = 2; obj[3] = 3; obj[4] = 4; obj.length = 5; var arr = obj.slice(0,-2); arr[2] === 2. Actual: ' + (arr[2]));\n} \n\n//CHECK#6\nif (arr[3] !== undefined) {\n $ERROR('#6: var obj = {}; obj.slice = Array.prototype.slice; obj[0] = 0; obj[1] = 1; obj[2] = 2; obj[3] = 3; obj[4] = 4; obj.length = 5; var arr = obj.slice(0,-2); arr[3] === undefined. Actual: ' + (arr[3]));\n} \n",
+ "id": "S15.4.4.10_A2_T3"
+ },
+ {
+ "section": "15.4.4.10",
+ "description": "If start is negative, use max(start + length, 0).\nIf end is negative, use max(end + length, 0)",
+ "test": "var obj = {};\nobj.slice = Array.prototype.slice;\nobj[0] = 0;\nobj[1] = 1;\nobj[2] = 2;\nobj[3] = 3;\nobj[4] = 4;\nobj.length = 5;\nvar arr = obj.slice(-5,-2);\n\n//CHECK#1\narr.getClass = Object.prototype.toString;\nif (arr.getClass() !== \"[object \" + \"Array\" + \"]\") {\n $ERROR('#1: var obj = {}; obj.slice = Array.prototype.slice; obj[0] = 0; obj[1] = 1; obj[2] = 2; obj[3] = 3; obj[4] = 4; obj.length = 5; var arr = obj.slice(-5,-2); arr is Array object. Actual: ' + (arr.getClass()));\n}\n\n//CHECK#2\nif (arr.length !== 3) {\n $ERROR('#2: var obj = {}; obj.slice = Array.prototype.slice; obj[0] = 0; obj[1] = 1; obj[2] = 2; obj[3] = 3; obj[4] = 4; obj.length = 5; var arr = obj.slice(-5,-2); arr.length === 3. Actual: ' + (arr.length));\n} \n\n//CHECK#3\nif (arr[0] !== 0) {\n $ERROR('#3: var obj = {}; obj.slice = Array.prototype.slice; obj[0] = 0; obj[1] = 1; obj[2] = 2; obj[3] = 3; obj[4] = 4; obj.length = 5; var arr = obj.slice(-5,-2); arr[0] === 0. Actual: ' + (arr[0]));\n}\n\n//CHECK#4\nif (arr[1] !== 1) {\n $ERROR('#4: var obj = {}; obj.slice = Array.prototype.slice; obj[0] = 0; obj[1] = 1; obj[2] = 2; obj[3] = 3; obj[4] = 4; obj.length = 5; var arr = obj.slice(-5,-2); arr[1] === 1. Actual: ' + (arr[1]));\n} \n\n//CHECK#5\nif (arr[2] !== 2) {\n $ERROR('#5: var obj = {}; obj.slice = Array.prototype.slice; obj[0] = 0; obj[1] = 1; obj[2] = 2; obj[3] = 3; obj[4] = 4; obj.length = 5; var arr = obj.slice(-5,-2); arr[2] === 2. Actual: ' + (arr[2]));\n} \n\n//CHECK#6\nif (arr[3] !== undefined) {\n $ERROR('#6: var obj = {}; obj.slice = Array.prototype.slice; obj[0] = 0; obj[1] = 1; obj[2] = 2; obj[3] = 3; obj[4] = 4; obj.length = 5; var arr = obj.slice(-5,-2); arr[3] === undefined. Actual: ' + (arr[3]));\n} \n",
+ "id": "S15.4.4.10_A2_T4"
+ },
+ {
+ "section": "15.4.4.10",
+ "description": "If end is undefined use length",
+ "test": "var obj = {};\nobj.slice = Array.prototype.slice;\nobj[0] = 0;\nobj[1] = 1;\nobj[2] = 2;\nobj[3] = 3;\nobj[4] = 4;\nobj.length = 5;\nvar arr = obj.slice(2);\n\n//CHECK#1\narr.getClass = Object.prototype.toString;\nif (arr.getClass() !== \"[object \" + \"Array\" + \"]\") {\n $ERROR('#1: var obj = {}; obj.slice = Array.prototype.slice; obj[0] = 0; obj[1] = 1; obj[2] = 2; obj[3] = 3; obj[4] = 4; obj.length = 5; var arr = obj.slice(2); arr is Array object. Actual: ' + (arr.getClass()));\n}\n\n//CHECK#2\nif (arr.length !== 3) {\n $ERROR('#2: var obj = {}; obj.slice = Array.prototype.slice; obj[0] = 0; obj[1] = 1; obj[2] = 2; obj[3] = 3; obj[4] = 4; obj.length = 5; var arr = obj.slice(2); arr.length === 3. Actual: ' + (arr.length));\n} \n\n//CHECK#3\nif (arr[0] !== 2) {\n $ERROR('#3: var obj = {}; obj.slice = Array.prototype.slice; obj[0] = 0; obj[1] = 1; obj[2] = 2; obj[3] = 3; obj[4] = 4; obj.length = 5; var arr = obj.slice(2); arr[0] === 2. Actual: ' + (arr[0]));\n}\n\n//CHECK#4\nif (arr[1] !== 3) {\n $ERROR('#4: var obj = {}; obj.slice = Array.prototype.slice; obj[0] = 0; obj[1] = 1; obj[2] = 2; obj[3] = 3; obj[4] = 4; obj.length = 5; var arr = obj.slice(2); arr[1] === 3. Actual: ' + (arr[1]));\n} \n\n//CHECK#5\nif (arr[2] !== 4) {\n $ERROR('#5: var obj = {}; obj.slice = Array.prototype.slice; obj[0] = 0; obj[1] = 1; obj[2] = 2; obj[3] = 3; obj[4] = 4; obj.length = 5; var arr = obj.slice(2); arr[2] === 4. Actual: ' + (arr[2]));\n} \n\n//CHECK#6\nif (arr[3] !== undefined) {\n $ERROR('#6: var obj = {}; obj.slice = Array.prototype.slice; obj[0] = 0; obj[1] = 1; obj[2] = 2; obj[3] = 3; obj[4] = 4; obj.length = 5; var arr = obj.slice(2); arr[3] === undefined. Actual: ' + (arr[3]));\n} \n",
+ "id": "S15.4.4.10_A2_T5"
+ },
+ {
+ "section": "15.4.4.10",
+ "description": "If end is undefined use length",
+ "test": "var obj = {};\nobj.slice = Array.prototype.slice;\nobj[0] = 0;\nobj[1] = 1;\nobj[2] = 2;\nobj[3] = 3;\nobj[4] = 4;\nobj.length = 5;\nvar arr = obj.slice(2, undefined);\n\n//CHECK#1\narr.getClass = Object.prototype.toString;\nif (arr.getClass() !== \"[object \" + \"Array\" + \"]\") {\n $ERROR('#1: var obj = {}; obj.slice = Array.prototype.slice; obj[0] = 0; obj[1] = 1; obj[2] = 2; obj[3] = 3; obj[4] = 4; obj.length = 5; var arr = obj.slice(2, undefined); arr is Array object. Actual: ' + (arr.getClass()));\n}\n\n//CHECK#2\nif (arr.length !== 3) {\n $ERROR('#2: var obj = {}; obj.slice = Array.prototype.slice; obj[0] = 0; obj[1] = 1; obj[2] = 2; obj[3] = 3; obj[4] = 4; obj.length = 5; var arr = obj.slice(2, undefined); arr.length === 3. Actual: ' + (arr.length));\n} \n\n//CHECK#3\nif (arr[0] !== 2) {\n $ERROR('#3: var obj = {}; obj.slice = Array.prototype.slice; obj[0] = 0; obj[1] = 1; obj[2] = 2; obj[3] = 3; obj[4] = 4; obj.length = 5; var arr = obj.slice(2, undefined); arr[0] === 2. Actual: ' + (arr[0]));\n}\n\n//CHECK#4\nif (arr[1] !== 3) {\n $ERROR('#4: var obj = {}; obj.slice = Array.prototype.slice; obj[0] = 0; obj[1] = 1; obj[2] = 2; obj[3] = 3; obj[4] = 4; obj.length = 5; var arr = obj.slice(2, undefined); arr[1] === 3. Actual: ' + (arr[1]));\n} \n\n//CHECK#5\nif (arr[2] !== 4) {\n $ERROR('#5: var obj = {}; obj.slice = Array.prototype.slice; obj[0] = 0; obj[1] = 1; obj[2] = 2; obj[3] = 3; obj[4] = 4; obj.length = 5; var arr = obj.slice(2, undefined); arr[2] === 4. Actual: ' + (arr[2]));\n} \n\n//CHECK#6\nif (arr[3] !== undefined) {\n $ERROR('#6: var obj = {}; obj.slice = Array.prototype.slice; obj[0] = 0; obj[1] = 1; obj[2] = 2; obj[3] = 3; obj[4] = 4; obj.length = 5; var arr = obj.slice(2, undefined); arr[3] === undefined. Actual: ' + (arr[3]));\n} \n",
+ "id": "S15.4.4.10_A2_T6"
+ },
+ {
+ "section": "15.4.4.10",
+ "description": "length = 4294967296",
+ "test": "var obj = {};\nobj.slice = Array.prototype.slice;\nobj[0] = \"x\";\nobj[4294967295] = \"y\";\nobj.length = 4294967296;\nvar arr = obj.slice(0,4294967296);\n\n//CHECK#1\nif (arr.length !== 0) {\n $ERROR('#1: var obj = {}; obj.slice = Array.prototype.slice; obj[0] = \"x\"; obj[4294967295] = \"y\"; obj.length = 4294967296; var arr = obj.slice(0,4294967296); arr.length === 0. Actual: ' + (arr.length));\n}\n\n//CHECK#2\nif (arr[0] !== undefined) {\n $ERROR('#2: var obj = {}; obj.slice = Array.prototype.slice; obj[0] = \"x\"; obj[4294967295] = \"y\"; obj.length = 4294967296; var arr = obj.slice(0,4294967296); arr[0] === undefined. Actual: ' + (arr[0]));\n} \n\n//CHECK#3\nif (arr[4294967295] !== undefined) {\n $ERROR('#3: var obj = {}; obj.slice = Array.prototype.slice; obj[0] = \"x\"; obj[4294967295] = \"y\"; obj.length = 4294967296; var arr = obj.slice(0,4294967296); arr[4294967295] === undefined. Actual: ' + (arr[4294967295]));\n} \n",
+ "id": "S15.4.4.10_A3_T1"
+ },
+ {
+ "section": "15.4.4.10",
+ "description": "length = 4294967297",
+ "test": "var obj = {};\nobj.slice = Array.prototype.slice;\nobj[0] = \"x\";\nobj[4294967296] = \"y\";\nobj.length = 4294967297;\nvar arr = obj.slice(0,4294967297);\n\n//CHECK#1\nif (arr.length !== 1) {\n $ERROR('#1: var obj = {}; obj.slice = Array.prototype.slice; obj[0] = \"x\"; obj[4294967296] = \"y\"; obj.length = 4294967297; var arr = obj.slice(0,4294967297); arr.length === 1. Actual: ' + (arr.length));\n}\n\n//CHECK#2\nif (arr[0] !== \"x\") {\n $ERROR('#2: var obj = {}; obj.slice = Array.prototype.slice; obj[0] = \"x\"; obj[4294967296] = \"y\"; obj.length = 4294967297; var arr = obj.slice(0,4294967297); arr[0] === \"x\". Actual: ' + (arr[0]));\n}\n\n//CHECK#3\nif (arr[4294967296] !== undefined) {\n $ERROR('#3: var obj = {}; obj.slice = Array.prototype.slice; obj[0] = \"x\"; obj[4294967296] = \"y\"; obj.length = 4294967297; var arr = obj.slice(0,4294967297); arr[4294967296] === undefined. Actual: ' + (arr[4294967296]));\n} \n",
+ "id": "S15.4.4.10_A3_T2"
+ },
+ {
+ "section": "15.4.4.10",
+ "description": "length = -1",
+ "test": "var obj = {};\nobj.slice = Array.prototype.slice;\nobj[4294967294] = \"x\";\nobj.length = -1;\nvar arr = obj.slice(4294967294,4294967295);\n\n//CHECK#1\nif (arr.length !== 1) {\n $ERROR('#1: var obj = {}; obj.slice = Array.prototype.slice; obj[4294967294] = \"x\"; obj.length = 4294967295; var arr = obj.slice(4294967294,4294967295); arr.length === 1. Actual: ' + (arr.length));\n}\n\n//CHECK#3\nif (arr[0] !== \"x\") {\n $ERROR('#3: var obj = {}; obj.slice = Array.prototype.slice; obj[4294967294] = \"x\"; obj.length = 4294967295; var arr = obj.slice(4294967294,4294967295); arr[0] === \"x\". Actual: ' + (arr[0]));\n} \n",
+ "id": "S15.4.4.10_A3_T3"
+ },
+ {
+ "section": "15.4.4.10, 8.6.2.1, 15.2.4.5",
+ "description": "[[Prototype]] of Array instance is Array.prototype",
+ "test": "Array.prototype[1] = 1;\nvar x = [0];\nx.length = 2;\nvar arr = x.slice();\n\n//CHECK#1\nif (arr[0] !== 0) { \n $ERROR('#1: Array.prototype[1] = 1; x = [0]; x.length = 2; var arr = x.slice(); arr[0] === 0. Actual: ' + (arr[0])); \n}\n\n//CHECK#2\nif (arr[1] !== 1) { \n $ERROR('#2: Array.prototype[1] = 1; x = [0]; x.length = 2; var arr = x.slice(); arr[1] === 1. Actual: ' + (arr[1])); \n}\n\n//CHECK#3\nif (arr.hasOwnProperty('1') !== true) { \n $ERROR('#3: Array.prototype[1] = 1; x = [0]; x.length = 2; var arr = x.slice(); arr.hasOwnProperty(\\'1\\') === true. Actual: ' + (arr.hasOwnProperty('1'))); \n}\n",
+ "id": "S15.4.4.10_A4_T1"
+ },
+ {
+ "section": "15.4.4.10, 15.2.4.7, 12.6.4",
+ "description": "Checking use propertyIsEnumerable, for-in",
+ "test": "//CHECK#1\nif (Array.prototype.slice.propertyIsEnumerable('length') !== false) {\n $ERROR('#1: Array.prototype.slice.propertyIsEnumerable(\\'length\\') === false. Actual: ' + (Array.prototype.slice.propertyIsEnumerable('length')));\n}\n\n//CHECK#2\nvar result = true;\nfor (var p in Array.slice){\n if (p === \"length\") {\n result = false;\n } \n}\n\nif (result !== true) {\n $ERROR('#2: result = true; for (p in Array.slice) { if (p === \"length\") result = false; } result === true;');\n}\n\n",
+ "id": "S15.4.4.10_A5.1"
+ },
+ {
+ "section": "15.4.4.10, 15.2.4.5, 11.4.1",
+ "description": "Checking use hasOwnProperty, delete",
+ "test": "//CHECK#1\nif (Array.prototype.slice.hasOwnProperty('length') !== true) {\n $FAIL('#1: Array.prototype.slice.hasOwnProperty(\\'length\\') === true. Actual: ' + (Array.prototype.slice.hasOwnProperty('length')));\n}\n\ndelete Array.prototype.slice.length;\n\n//CHECK#2\nif (Array.prototype.slice.hasOwnProperty('length') !== true) {\n $ERROR('#2: delete Array.prototype.slice.length; Array.prototype.slice.hasOwnProperty(\\'length\\') === true. Actual: ' + (Array.prototype.slice.hasOwnProperty('length')));\n}\n\n//CHECK#3\nif (Array.prototype.slice.length === undefined) {\n $ERROR('#3: delete Array.prototype.slice.length; Array.prototype.slice.length !== undefined');\n}\n\n\n",
+ "id": "S15.4.4.10_A5.2"
+ },
+ {
+ "section": "15.4.4.10",
+ "description": "Checking if varying the length property fails",
+ "strict_mode_negative": "",
+ "test": "//CHECK#1\nvar x = Array.prototype.slice.length;\nArray.prototype.slice.length = Infinity;\nif (Array.prototype.slice.length !== x) {\n $ERROR('#1: x = Array.prototype.slice.length; Array.prototype.slice.length = Infinity; Array.prototypeslice.length === x. Actual: ' + (Array.prototypeslice.length));\n}\n\n",
+ "id": "S15.4.4.10_A5.3",
+ "strict_only": ""
+ },
+ {
+ "section": "15.4.4.10",
+ "description": "slice.length === 2",
+ "test": "//CHECK#1\nif (Array.prototype.slice.length !== 2) {\n $ERROR('#1: Array.prototype.slice.length === 2. Actual: ' + (Array.prototype.slice.length));\n}\n\n",
+ "id": "S15.4.4.10_A5.4"
+ },
+ {
+ "section": "15.4.4.10, 15.2.4.7, 12.6.4",
+ "description": "Checking use propertyIsEnumerable, for-in",
+ "test": "//CHECK#1\nif (Array.propertyIsEnumerable('slice') !== false) {\n $ERROR('#1: Array.propertyIsEnumerable(\\'slice\\') === false. Actual: ' + (Array.propertyIsEnumerable('slice')));\n}\n\n//CHECK#2\nvar result = true;\nfor (var p in Array){\n if (p === \"slice\") {\n result = false;\n } \n}\n\nif (result !== true) {\n $ERROR('#2: result = true; for (p in Array) { if (p === \"slice\") result = false; } result === true;');\n}\n\n",
+ "id": "S15.4.4.10_A5.5"
+ },
+ {
+ "section": "15.4.4.10",
+ "description": "Checking Array.prototype.slice.prototype",
+ "test": "//CHECK#1\nif (Array.prototype.slice.prototype !== undefined) {\n $ERROR('#1: Array.prototype.slice.prototype === undefined. Actual: ' + (Array.prototype.slice.prototype));\n}\n",
+ "id": "S15.4.4.10_A5.6"
+ },
+ {
+ "section": "15.4.4.10, 11.2.2",
+ "description": "If property does not implement the internal [[Construct]] method, throw a TypeError exception",
+ "test": "//CHECK#1\n\ntry {\n new Array.prototype.slice();\n $ERROR('#1.1: new Array.prototype.slice() throw TypeError. Actual: ' + (new Array.prototype.slice()));\n} catch (e) {\n if ((e instanceof TypeError) !== true) {\n $ERROR('#1.2: new Array.prototype.slice() throw TypeError. Actual: ' + (e));\n }\n}\n",
+ "id": "S15.4.4.10_A5.7"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.4.4.11_Array_prototype_sort.json b/website/resources/scripts/testcases2/15.4.4.11_Array_prototype_sort.json
new file mode 100644
index 000000000..1162e0646
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.4.4.11_Array_prototype_sort.json
@@ -0,0 +1,180 @@
+{
+ "testCollection": {
+ "name": "15.4.4.11_Array_prototype_sort",
+ "numTests": 28,
+ "tests": [
+ {
+ "section": "15.4.4.11",
+ "description": "If comparefn is undefined, use SortCompare operator",
+ "test": "var x = new Array(2); \nx.sort();\n\n//CHECK#1\nif (x.length !== 2) {\n $ERROR('#1: var x = new Array(2); x.sort(); x.length === 2. Actual: ' + (x.length));\n}\n\n//CHECK#2\nif (x[0] !== undefined) {\n $ERROR('#2: var x = new Array(2); x.sort(); x[0] === undefined. Actual: ' + (x[0]));\n} \n\n//CHECK#3\nif (x[1] !== undefined) {\n $ERROR('#3: var x = new Array(2); x.sort(); x[1] === undefined. Actual: ' + (x[1]));\n} \n",
+ "id": "S15.4.4.11_A1.1_T1"
+ },
+ {
+ "section": "15.4.4.11",
+ "description": "If comparefn is undefined, use SortCompare operator",
+ "test": "var x = new Array(2);\nx[1] = 1; \nx.sort();\n\n//CHECK#1\nif (x.length !== 2) {\n $ERROR('#1: var x = new Array(2); x[1] = 1; x.sort(); x.length === 2. Actual: ' + (x.length));\n}\n\n//CHECK#2\nif (x[0] !== 1) {\n $ERROR('#2: var x = new Array(2); x[1] = 1; x.sort(); x[0] === 1. Actual: ' + (x[0]));\n} \n\n//CHECK#3\nif (x[1] !== undefined) {\n $ERROR('#3: var x = new Array(2); x[1] = 1; x.sort(); x[1] === undefined. Actual: ' + (x[1]));\n}\n\nvar x = new Array(2);\nx[0] = 1; \nx.sort();\n\n//CHECK#4\nif (x.length !== 2) {\n $ERROR('#4: var x = new Array(2); x[0] = 1; x.sort(); x.length === 2. Actual: ' + (x.length));\n}\n\n//CHECK#5\nif (x[0] !== 1) {\n $ERROR('#5: var x = new Array(2); x[0] = 1; x.sort(); x[0] === 1. Actual: ' + (x[0]));\n} \n\n//CHECK#6\nif (x[1] !== undefined) {\n $ERROR('#6: var x = new Array(2); x[0] = 1; x.sort(); x[1] === undefined. Actual: ' + (x[1]));\n} \n",
+ "id": "S15.4.4.11_A1.2_T1"
+ },
+ {
+ "section": "15.4.4.11",
+ "description": "If comparefn is not undefined",
+ "test": "var myComparefn = function(x,y) {\n if (x === undefined) return -1; \n if (y === undefined) return 1;\n return 0;\n}\n\nvar x = new Array(2);\nx[1] = 1; \nx.sort(myComparefn);\n\n//CHECK#1\nif (x.length !== 2) {\n $ERROR('#1: var x = new Array(2); x[1] = 1; x.sort(myComparefn); x.length === 2. Actual: ' + (x.length));\n}\n\n//CHECK#2\nif (x[0] !== 1) {\n $ERROR('#2: var x = new Array(2); x[1] = 1; x.sort(myComparefn); x[0] === 1. Actual: ' + (x[0]));\n} \n\n//CHECK#3\nif (x[1] !== undefined) {\n $ERROR('#3: var x = new Array(2); x[1] = 1; x.sort(myComparefn); x[1] === undefined. Actual: ' + (x[1]));\n}\n\nvar x = new Array(2);\nx[0] = 1; \nx.sort(myComparefn);\n\n//CHECK#4\nif (x.length !== 2) {\n $ERROR('#4: var x = new Array(2); x[0] = 1; x.sort(myComparefn); x.length === 2. Actual: ' + (x.length));\n}\n\n//CHECK#5\nif (x[0] !== 1) {\n $ERROR('#5: var x = new Array(2); x[0] = 1; x.sort(myComparefn); x[0] === 1. Actual: ' + (x[0]));\n} \n\n//CHECK#6\nif (x[1] !== undefined) {\n $ERROR('#6: var x = new Array(2); x[0] = 1; x.sort(myComparefn); x[1] === undefined. Actual: ' + (x[1]));\n} \n",
+ "id": "S15.4.4.11_A1.2_T2"
+ },
+ {
+ "section": "15.4.4.11",
+ "description": "If comparefn is undefined, use SortCompare operator",
+ "test": "var x = new Array(undefined, undefined); \nx.sort();\n\n//CHECK#1\nif (x.length !== 2) {\n $ERROR('#1: var x = new Array(undefined, undefined); x.sort(); x.length === 2. Actual: ' + (x.length));\n}\n\n//CHECK#2\nif (x[0] !== undefined) {\n $ERROR('#2: var x = new Array(undefined, undefined); x.sort(); x[0] === undefined. Actual: ' + (x[0]));\n} \n\n//CHECK#3\nif (x[1] !== undefined) {\n $ERROR('#3: var x = new Array(undefined, undefined); x.sort(); x[1] === undefined. Actual: ' + (x[1]));\n} \n",
+ "id": "S15.4.4.11_A1.3_T1"
+ },
+ {
+ "section": "15.4.4.11",
+ "description": "If comparefn is undefined, use SortCompare operator",
+ "test": "var x = new Array(undefined, 1);\nx.sort();\n\n//CHECK#1\nif (x.length !== 2) {\n $ERROR('#1: var x = new Array(undefined, 1); x.sort(); x.length === 2. Actual: ' + (x.length));\n}\n\n//CHECK#2\nif (x[0] !== 1) {\n $ERROR('#2: var x = new Array(undefined, 1); x.sort(); x[0] === 1. Actual: ' + (x[0]));\n} \n\n//CHECK#3\nif (x[1] !== undefined) {\n $ERROR('#3: var x = new Array(undefined, 1); x.sort(); x[1] === undefined. Actual: ' + (x[1]));\n}\n\nvar x = new Array(1, undefined);\nx.sort();\n\n//CHECK#4\nif (x.length !== 2) {\n $ERROR('#4: var x = new Array(1, undefined); x.sort(); x.length === 2. Actual: ' + (x.length));\n}\n\n//CHECK#5\nif (x[0] !== 1) {\n $ERROR('#5: var x = new Array(1, undefined); x.sort(); x[0] === 1. Actual: ' + (x[0]));\n} \n\n//CHECK#6\nif (x[1] !== undefined) {\n $ERROR('#6: var x = new Array(1, undefined); x.sort(); x[1] === undefined. Actual: ' + (x[1]));\n} \n",
+ "id": "S15.4.4.11_A1.4_T1"
+ },
+ {
+ "section": "15.4.4.11",
+ "description": "If comparefn is not undefined",
+ "test": "var myComparefn = function(x,y) {\n if (x === undefined) return -1; \n if (y === undefined) return 1;\n return 0;\n}\n\nvar x = new Array(undefined, 1);\nx.sort(myComparefn);\n\n//CHECK#1\nif (x.length !== 2) {\n $ERROR('#1: var x = new Array(undefined, 1); x.sort(myComparefn); x.length === 2. Actual: ' + (x.length));\n}\n\n//CHECK#2\nif (x[0] !== 1) {\n $ERROR('#2: var x = new Array(undefined, 1); x.sort(myComparefn); x[0] === 1. Actual: ' + (x[0]));\n} \n\n//CHECK#3\nif (x[1] !== undefined) {\n $ERROR('#3: var x = new Array(undefined, 1); x.sort(myComparefn); x[1] === undefined. Actual: ' + (x[1]));\n}\n\nvar x = new Array(1, undefined);\nx.sort(myComparefn);\n\n//CHECK#4\nif (x.length !== 2) {\n $ERROR('#4: var x = new Array(1, undefined); x.sort(myComparefn); x.length === 2. Actual: ' + (x.length));\n}\n\n//CHECK#5\nif (x[0] !== 1) {\n $ERROR('#5: var x = new Array(1, undefined); x.sort(myComparefn); x[0] === 1. Actual: ' + (x[0]));\n} \n\n//CHECK#6\nif (x[1] !== undefined) {\n $ERROR('#6: var x = new Array(1, undefined); x.sort(myComparefn); x[1] === undefined. Actual: ' + (x[1]));\n} \n",
+ "id": "S15.4.4.11_A1.4_T2"
+ },
+ {
+ "section": "15.4.4.11",
+ "description": "Checking sort() and sort(undefined)",
+ "test": "var x = new Array(1,0);\nx.sort();\n\n//CHECK#1\nif (x.length !== 2) {\n $ERROR('#1: var x = new Array(1,0); x.sort(); x.length === 2. Actual: ' + (x.length));\n}\n\n//CHECK#2\nif (x[0] !== 0) {\n $ERROR('#2: var x = new Array(1,0); x.sort(); x[0] === 0. Actual: ' + (x[0]));\n} \n\n//CHECK#3\nif (x[1] !== 1) {\n $ERROR('#3: var x = new Array(1,0); x.sort(); x[1] === 1. Actual: ' + (x[1]));\n}\n\nvar x = new Array(1,0);\nx.sort(undefined);\n\n//CHECK#4\nif (x.length !== 2) {\n $ERROR('#4: var x = new Array(1,0); x.sort(undefined); x.length === 2. Actual: ' + (x.length));\n}\n\n//CHECK#5\nif (x[0] !== 0) {\n $ERROR('#5: var x = new Array(1,0); x.sort(undefined); x[0] === 0. Actual: ' + (x[0]));\n} \n\n//CHECK#6\nif (x[1] !== 1) {\n $ERROR('#6: var x = new Array(1,0); x.sort(undefined); x[1] === 1. Actual: ' + (x[1]));\n}\n",
+ "id": "S15.4.4.11_A1.5_T1"
+ },
+ {
+ "section": "15.4.4.11",
+ "description": "Checking ENGLISH ALPHABET",
+ "test": "var alphabetR = [\"z\", \"y\", \"x\", \"w\", \"v\", \"u\", \"t\", \"s\", \"r\", \"q\", \"p\", \"o\", \"n\", \"M\", \"L\", \"K\", \"J\", \"I\", \"H\", \"G\", \"F\", \"E\", \"D\", \"C\", \"B\", \"A\"];\nvar alphabet = [\"A\", \"B\", \"C\", \"D\", \"E\", \"F\", \"G\", \"H\", \"I\", \"J\", \"K\", \"L\", \"M\", \"n\", \"o\", \"p\", \"q\", \"r\", \"s\", \"t\", \"u\", \"v\", \"w\", \"x\", \"y\", \"z\"];\n\n//CHECK#1\nalphabetR.sort();\nvar result = true;\nfor (var i = 0; i < 26; i++) {\n if (alphabetR[i] !== alphabet[i]) result = false;\n}\n\nif (result !== true) {\n $ERROR('#1: CHECK ENGLISH ALPHABET');\n}\n",
+ "id": "S15.4.4.11_A2.1_T1"
+ },
+ {
+ "section": "15.4.4.11",
+ "description": "Checking RUSSIAN ALPHABET",
+ "test": "var alphabetR = [\"ё\", \"я\", \"ю\", \"э\", \"ь\", \"ы\", \"ъ\", \"щ\", \"ш\", \"ч\", \"ц\", \"х\", \"ф\", \"у\", \"т\", \"с\", \"р\", \"П\", \"О\", \"Н\", \"М\", \"Л\", \"К\", \"Й\", \"И\", \"З\", \"Ж\", \"Е\", \"Д\", \"Г\", \"В\", \"Б\", \"А\"];\nvar alphabet = [\"А\", \"Б\", \"В\", \"Г\", \"Д\", \"Е\", \"Ж\", \"З\", \"И\", \"Й\", \"К\", \"Л\", \"М\", \"Н\", \"О\", \"П\", \"р\", \"с\", \"т\", \"у\", \"ф\", \"х\", \"ц\", \"ч\", \"ш\", \"щ\", \"ъ\", \"ы\", \"ь\", \"э\", \"ю\", \"я\", \"ё\"];\n\n//CHECK#1\nalphabetR.sort();\nvar result = true;\nfor (var i = 0; i < 26; i++) {\n if (alphabetR[i] !== alphabet[i]) result = false;\n}\n\nif (result !== true) {\n $ERROR('#1: CHECK RUSSIAN ALPHABET');\n}\n",
+ "id": "S15.4.4.11_A2.1_T2"
+ },
+ {
+ "section": "15.4.4.11",
+ "description": "Checking ToString operator",
+ "test": "var obj = {valueOf: function() {return 1}, toString: function() {return -2}};\nvar alphabetR = [undefined, 2, 1, \"X\", -1, \"a\", true, obj, NaN, Infinity]; \nvar alphabet = [-1, obj, 1, 2, Infinity, NaN, \"X\", \"a\", true, undefined];\n \n//CHECK#1\nalphabetR.sort();\nvar result = true;\nfor (var i = 0; i < 10; i++) {\n if (!(isNaN(alphabetR[i]) && isNaN(alphabet[i]))) { \n if (alphabetR[i] !== alphabet[i]) result = false;\n } \n}\n\nif (result !== true) {\n $ERROR('#1: Check ToString operator');\n}\n",
+ "id": "S15.4.4.11_A2.1_T3"
+ },
+ {
+ "section": "15.4.4.11",
+ "description": "Checking ENGLISH ALPHABET",
+ "test": "var alphabetR = [\"z\", \"y\", \"x\", \"w\", \"v\", \"u\", \"t\", \"s\", \"r\", \"q\", \"p\", \"o\", \"n\", \"M\", \"L\", \"K\", \"J\", \"I\", \"H\", \"G\", \"F\", \"E\", \"D\", \"C\", \"B\", \"A\"];\nvar alphabet = [\"A\", \"B\", \"C\", \"D\", \"E\", \"F\", \"G\", \"H\", \"I\", \"J\", \"K\", \"L\", \"M\", \"n\", \"o\", \"p\", \"q\", \"r\", \"s\", \"t\", \"u\", \"v\", \"w\", \"x\", \"y\", \"z\"];\n\nvar myComparefn = function(x,y) {\n var xS = String(x);\n var yS = String(y);\n if (xS < yS) return 1\n if (xS > yS) return -1; \n return 0;\n}\n\n//CHECK#1\nalphabet.sort(myComparefn);\nvar result = true;\nfor (var i = 0; i < 26; i++) {\n if (alphabetR[i] !== alphabet[i]) result = false;\n}\n\nif (result !== true) {\n $ERROR('#1: CHECK ENGLISH ALPHABET');\n} \n",
+ "id": "S15.4.4.11_A2.2_T1"
+ },
+ {
+ "section": "15.4.4.11",
+ "description": "Checking RUSSIAN ALPHABET",
+ "test": "var alphabetR = [\"ё\", \"я\", \"ю\", \"э\", \"ь\", \"ы\", \"ъ\", \"щ\", \"ш\", \"ч\", \"ц\", \"х\", \"ф\", \"у\", \"т\", \"с\", \"р\", \"П\", \"О\", \"Н\", \"М\", \"Л\", \"К\", \"Й\", \"И\", \"З\", \"Ж\", \"Е\", \"Д\", \"Г\", \"В\", \"Б\", \"А\"];\nvar alphabet = [\"А\", \"Б\", \"В\", \"Г\", \"Д\", \"Е\", \"Ж\", \"З\", \"И\", \"Й\", \"К\", \"Л\", \"М\", \"Н\", \"О\", \"П\", \"р\", \"с\", \"т\", \"у\", \"ф\", \"х\", \"ц\", \"ч\", \"ш\", \"щ\", \"ъ\", \"ы\", \"ь\", \"э\", \"ю\", \"я\", \"ё\"];\n\nvar myComparefn = function(x,y) {\n var xS = String(x);\n var yS = String(y);\n if (xS < yS) return 1\n if (xS > yS) return -1; \n return 0;\n}\n\n//CHECK#1\nalphabet.sort(myComparefn);\nvar result = true;\nfor (var i = 0; i < 26; i++) {\n if (alphabetR[i] !== alphabet[i]) result = false;\n}\n\nif (result !== true) {\n $ERROR('#1: CHECK RUSSIAN ALPHABET');\n}\n",
+ "id": "S15.4.4.11_A2.2_T2"
+ },
+ {
+ "section": "15.4.4.11",
+ "description": "Checking ToString operator",
+ "test": "var obj = {valueOf: function() {return 1}, toString: function() {return -2}}; \nvar alphabetR = [undefined, 2, 1, \"X\", -1, \"a\", true, obj, NaN, Infinity]; \nvar alphabet = [true, \"a\", \"X\", NaN, Infinity, 2, 1, obj, -1, undefined];\n\nvar myComparefn = function(x,y) {\n var xS = String(x);\n var yS = String(y);\n if (xS < yS) return 1\n if (xS > yS) return -1; \n return 0;\n}\n \n//CHECK#1\nalphabetR.sort(myComparefn);\nvar result = true;\nfor (var i = 0; i < 10; i++) {\n if (!(isNaN(alphabetR[i]) && isNaN(alphabet[i]))) { \n if (alphabetR[i] !== alphabet[i]) result = false;\n } \n}\n\nif (result !== true) {\n $ERROR('#1: Check ToString operator');\n}\n",
+ "id": "S15.4.4.11_A2.2_T3"
+ },
+ {
+ "section": "15.4.4.11",
+ "description": "If comparefn is undefined, use SortCompare operator",
+ "test": "var obj = {valueOf: function() {return 1}, toString: function() {return -2}};\nvar alphabetR = {0:undefined, 1:2, 2:1, 3:\"X\", 4:-1, 5:\"a\", 6:true, 7:obj, 8:NaN, 9:Infinity};\nalphabetR.sort = Array.prototype.sort; \nalphabetR.length = 10;\nvar alphabet = [-1, obj, 1, 2, Infinity, NaN, \"X\", \"a\", true, undefined];\n \nalphabetR.sort();\n\n //CHECK#0\nalphabetR.getClass = Object.prototype.toString;\nif (alphabetR.getClass() !== \"[object \" + \"Object\" + \"]\") {\n $ERROR('#0: alphabetR.sort() is Object object, not Array object');\n}\n \n//CHECK#1\nvar result = true;\nfor (var i = 0; i < 10; i++) {\n if (!(isNaN(alphabetR[i]) && isNaN(alphabet[i]))) { \n if (alphabetR[i] !== alphabet[i]) result = false;\n } \n}\n\nif (result !== true) {\n $ERROR('#1: Check ToString operator');\n} \n",
+ "id": "S15.4.4.11_A3_T1"
+ },
+ {
+ "section": "15.4.4.11",
+ "description": "If comparefn is not undefined",
+ "test": "var obj = {valueOf: function() {return 1}, toString: function() {return -2}};\nvar alphabetR = {0:undefined, 1:2, 2:1, 3:\"X\", 4:-1, 5:\"a\", 6:true, 7:obj, 8:NaN, 9:Infinity};\nalphabetR.sort = Array.prototype.sort; \nalphabetR.length = 10; \nvar alphabet = [true, \"a\", \"X\", NaN, Infinity, 2, 1, obj, -1, undefined];\n \n var myComparefn = function(x,y) {\n var xS = String(x);\n var yS = String(y);\n if (xS < yS) return 1\n if (xS > yS) return -1; \n return 0;\n}\n \nalphabetR.sort(myComparefn);\n\n //CHECK#0\nalphabetR.getClass = Object.prototype.toString;\nif (alphabetR.getClass() !== \"[object \" + \"Object\" + \"]\") {\n $ERROR('#0: alphabetR.sort() is Object object, not Array object');\n}\n \n//CHECK#1\nvar result = true;\nfor (var i = 0; i < 10; i++) {\n if (!(isNaN(alphabetR[i]) && isNaN(alphabet[i]))) { \n if (alphabetR[i] !== alphabet[i]) result = false;\n } \n}\n\nif (result !== true) {\n $ERROR('#1: Check ToString operator');\n} \n",
+ "id": "S15.4.4.11_A3_T2"
+ },
+ {
+ "section": "15.4.4.11",
+ "description": "length = 4294967296",
+ "test": "var obj = {};\nobj.sort = Array.prototype.sort;\nobj[0] = \"x\";\nobj[4294967295] = \"y\";\nobj.length = 4294967296;\n\n//CHECK#1\nif (obj.sort() !== obj) {\n $ERROR('#1: var obj = {}; obj.sort = Array.prototype.sort; obj[0] = \"x\"; obj[4294967295] = \"y\"; obj.length = 4294967296; obj.sort() === obj. Actual: ' + (obj.sort()));\n}\n\n//CHECK#2\nif (obj.length !== 4294967296) {\n $ERROR('#2: var obj = {}; obj.sort = Array.prototype.sort; obj[0] = \"x\"; obj[4294967295] = \"y\"; obj.length = 4294967296; obj.sort(); obj.length === 4294967296. Actual: ' + (obj.length));\n}\n\n//CHECK#3\nif (obj[0] !== \"x\") {\n $ERROR('#3: var obj = {}; obj.sort = Array.prototype.sort; obj[0] = \"x\"; obj[4294967295] = \"y\"; obj.length = 4294967296; obj.sort(); obj[0] == \"x\"');\n}\n\n//CHECK#4\nif (obj[4294967295] !== \"y\") {\n $ERROR('#4: var obj = {}; obj.sort = Array.prototype.sort; obj[] = \"x\"; obj[4294967295] = \"y\"; obj.length = 4294967296; obj.sort(); obj[4294967295] == \"y\"');\n}\n",
+ "id": "S15.4.4.11_A4_T1"
+ },
+ {
+ "section": "15.4.4.11",
+ "description": "length = 4294967298",
+ "test": "var obj = {};\nobj.sort = Array.prototype.sort;\nobj[0] = \"z\";\nobj[1] = \"y\";\nobj[4294967297] = \"x\";\nobj.length = 4294967298;\n\n//CHECK#1\nif (obj.sort() !== obj) {\n $ERROR('#1: var obj = {}; obj.sort = Array.prototype.sort; obj[0] = \"z\"; obj[1] = \"y\"; obj[4294967297] = \"x\"; obj.length = 4294967298; obj.sort() === obj. Actual: ' + (obj.sort()));\n}\n\n//CHECK#2\nif (obj.length !== 4294967298) {\n $ERROR('#2: var obj = {}; obj.sort = Array.prototype.sort; obj[0] = \"z\"; obj[1] = \"y\"; obj[4294967297] = \"x\"; obj.length = 4294967298; obj.sort(); obj.length === 4294967298. Actual: ' + (obj.length));\n}\n\n//CHECK#3\nif (obj[0] !== \"y\") {\n $ERROR('#3: var obj = {}; obj.sort = Array.prototype.sort; obj[0] = \"z\"; obj[1] = \"y\"; obj[4294967297] = \"x\"; obj.length = 4294967298; obj.sort(); obj[0] === \"y\". Actual: ' + (obj[0]));\n} \n\n//CHECK#4\nif (obj[1] !== \"z\") {\n $ERROR('#4: var obj = {}; obj.sort = Array.prototype.sort; obj[0] = \"z\"; obj[1] = \"y\"; obj[4294967297] = \"x\"; obj.length = 4294967298; obj.sort(); obj[1] === \"z\". Actual: ' + (obj[1]));\n} \n\n//CHECK#5\nif (obj[4294967297] !== \"x\") {\n $ERROR('#5: var obj = {}; obj.sort = Array.prototype.sort; obj[0] = \"z\"; obj[1] = \"y\"; obj[4294967297] = \"x\"; obj.length = 4294967298; obj.sort(); obj[4294967297] === \"x\". Actual: ' + (obj[4294967297]));\n} \n",
+ "id": "S15.4.4.11_A4_T2"
+ },
+ {
+ "section": "15.4.4.11",
+ "description": "length = -4294967294",
+ "test": "var obj = {};\nobj.sort = Array.prototype.sort;\nobj[0] = \"z\";\nobj[1] = \"y\";\nobj[2] = \"x\";\nobj.length = -4294967294;\n\n//CHECK#1\nif (obj.sort() !== obj) {\n $ERROR('#1: var obj = {}; obj.sort = Array.prototype.sort; obj[0] = \"z\"; obj[1] = \"y\"; obj[2] = \"x\"; obj.length = -4294967294; obj.sort() === obj. Actual: ' + (obj.sort()));\n}\n\n//CHECK#2\nif (obj.length !== -4294967294) {\n $ERROR('#2: var obj = {}; obj.sort = Array.prototype.sort; obj[0] = \"z\"; obj[1] = \"y\"; obj[2] = \"x\"; obj.length = -4294967294; obj.sort(); obj.length === -4294967294. Actual: ' + (obj.length));\n}\n\n//CHECK#3\nif (obj[0] !== \"y\") {\n $ERROR('#3: var obj = {}; obj.sort = Array.prototype.sort; obj[0] = \"z\"; obj[1] = \"y\"; obj[2] = \"x\"; obj.length = -4294967294; obj.sort(); obj[0] === \"y\". Actual: ' + (obj[0]));\n} \n\n//CHECK#4\nif (obj[1] !== \"z\") {\n $ERROR('#4: var obj = {}; obj.sort = Array.prototype.sort; obj[0] = \"z\"; obj[1] = \"y\"; obj[2] = \"x\"; obj.length = -4294967294; obj.sort(); obj[1] === \"z\". Actual: ' + (obj[1]));\n} \n\n//CHECK#5\nif (obj[2] !== \"x\") {\n $ERROR('#5: var obj = {}; obj.sort = Array.prototype.sort; obj[0] = \"z\"; obj[1] = \"y\"; obj[2] = \"x\"; obj.length = -4294967294; obj.sort(); obj[2] === \"x\". Actual: ' + (obj[2]));\n} \n",
+ "id": "S15.4.4.11_A4_T3"
+ },
+ {
+ "section": "15.4.4.11",
+ "description": "comparefn function throw \"error\"",
+ "test": "//CHECK#1\nvar myComparefn = function(x,y) {\n throw \"error\";\n}\nvar x = [1,0];\ntry {\n x.sort(myComparefn)\n $ERROR('#1.1: Array.sort should not eat exceptions');\n} catch(e) {\n if (e !== \"error\") {\n $ERROR('#1.2: Array.sort should not eat exceptions');\n }\n} \n",
+ "id": "S15.4.4.11_A5_T1"
+ },
+ {
+ "section": "15.4.4.11, 8.6.2.1, 8.6.2.5",
+ "description": "[[Prototype]] of Array instance is Array.prototype, [[Prototype] of Array.prototype is Object.prototype",
+ "test": "Array.prototype[1] = -1;\nvar x = [1,0];\nx.length = 2;\nx.sort();\n\n//CHECK#1\nif (x[0] !== 0) { \n $ERROR('#1: Array.prototype[1] = -1; x = [1,0]; x.length = 2; x.sort(); x[0] === 0. Actual: ' + (x[0])); \n}\n\n//CHECK#2\nif (x[1] !== 1) { \n $ERROR('#2: Array.prototype[1] = -1; x = [1,0]; x.length = 2; x.sort(); x[1] === 1. Actual: ' + (x[1])); \n}\n\nx.length = 0;\n\n//CHECK#3\nif (x[0] !== undefined) { \n $ERROR('#3: Array.prototype[1] = -1; x = [1,0]; x.length = 2; x.sort(); x.length = 0; x[0] === undefined. Actual: ' + (x[0])); \n}\n\n//CHECK#4\nif (x[1] !== -1) { \n $ERROR('#4: Array.prototype[1] = -1; x = [1,0]; x.length = 2; x.sort(); x.length = 0; x[1] === -1. Actual: ' + (x[1])); \n}\n\nObject.prototype[1] = -1;\nObject.prototype.length = 2;\nObject.prototype.sort = Array.prototype.sort;\nx = {0:1,1:0};\nx.sort();\n\n//CHECK#5\nif (x[0] !== 0) { \n $ERROR('#5: Object.prototype[1] = -1; Object.prototype.length = 2; Object.prototype.sort = Array.prototype.sort; x = {0:1,1:0}; x.sort(); x[0] === 0. Actual: ' + (x[0])); \n}\n\n//CHECK#6\nif (x[1] !== 1) { \n $ERROR('#6: Object.prototype[1] = -1; Object.prototype.length = 2; Object.prototype.sort = Array.prototype.sort; x = {0:1,1:0}; x.sort(); x[1] === 1. Actual: ' + (x[1])); \n}\n\ndelete x[0];\ndelete x[1];\n\n//CHECK#7\nif (x[0] !== undefined) { \n $ERROR('#7: Object.prototype[1] = -1; Object.prototype.length = 2; Object.prototype.sort = Array.prototype.sort; x = {0:1,1:0}; x.sort(); delete x[0]; delete x[1]; x[0] === undefined. Actual: ' + (x[0])); \n}\n\n//CHECK#8\nif (x[1] !== -1) { \n $ERROR('#8: Object.prototype[1] = -1; Object.prototype.length = 2; Object.prototype.sort = Array.prototype.sort; x = {0:1,1:0}; x.sort(); delete x[0]; delete x[1]; x[1] === -1. Actual: ' + (x[1])); \n}\n",
+ "id": "S15.4.4.11_A6_T2"
+ },
+ {
+ "section": "15.4.4.11, 15.2.4.7, 12.6.4",
+ "description": "Checking use propertyIsEnumerable, for-in",
+ "test": "//CHECK#1\nif (Array.prototype.sort.propertyIsEnumerable('length') !== false) {\n $ERROR('#1: Array.prototype.sort.propertyIsEnumerable(\\'length\\') === false. Actual: ' + (Array.prototype.sort.propertyIsEnumerable('length')));\n}\n\n//CHECK#2\nvar result = true;\nfor (var p in Array.sort){\n if (p === \"length\") {\n result = false;\n } \n}\n\nif (result !== true) {\n $ERROR('#2: result = true; for (p in Array.sort) { if (p === \"length\") result = false; } result === true;');\n}\n\n",
+ "id": "S15.4.4.11_A7.1"
+ },
+ {
+ "section": "15.4.4.11, 15.2.4.5, 11.4.1",
+ "description": "Checking use hasOwnProperty, delete",
+ "strict_mode_negative": "",
+ "test": "//CHECK#1\nif (Array.prototype.sort.hasOwnProperty('length') !== true) {\n $FAIL('#1: Array.sort.prototype.hasOwnProperty(\\'length\\') === true. Actual: ' + (Array.sort.prototype.hasOwnProperty('length')));\n}\n\ndelete Array.prototype.sort.length;\n\n//CHECK#2\nif (Array.prototype.sort.hasOwnProperty('length') !== true) {\n $ERROR('#2: delete Array.prototype.sort.length; Array.prototype.sort.hasOwnProperty(\\'length\\') === true. Actual: ' + (Array.prototype.sort.hasOwnProperty('length')));\n}\n\n//CHECK#3\nif (Array.prototype.sort.length === undefined) {\n $ERROR('#3: delete Array.prototype.sort.length; Array.prototype.sort.length !== undefined');\n}\n\n\n",
+ "id": "S15.4.4.11_A7.2",
+ "strict_only": ""
+ },
+ {
+ "section": "15.4.4.11",
+ "description": "Checking if varying the length fails",
+ "strict_mode_negative": "",
+ "test": "//CHECK#1\nvar x = Array.prototype.sort.length;\nArray.prototype.sort.length = Infinity;\nif (Array.prototype.sort.length !== x) {\n $ERROR('#1: x = Array.prototype.sort.length; Array.prototype.sort.length = Infinity; Array.prototype.sort.length === x. Actual: ' + (Array.prototype.sort.length));\n}\n\n",
+ "id": "S15.4.4.11_A7.3",
+ "strict_only": ""
+ },
+ {
+ "section": "15.4.4.11",
+ "description": "sort.length === 1",
+ "test": "//CHECK#1\nif (Array.prototype.sort.length !== 1) {\n $ERROR('#1: Array.prototype.sort.length === 1. Actual: ' + (Array.prototype.sort.length));\n}\n\n",
+ "id": "S15.4.4.11_A7.4"
+ },
+ {
+ "section": "15.4.4.11, 15.2.4.7, 12.6.4",
+ "description": "Checking use propertyIsEnumerable, for-in",
+ "test": "//CHECK#1\nif (Array.propertyIsEnumerable('sort') !== false) {\n $ERROR('#1: Array.propertyIsEnumerable(\\'sort\\') === false. Actual: ' + (Array.propertyIsEnumerable('sort')));\n}\n\n//CHECK#2\nvar result = true;\nfor (var p in Array){\n if (p === \"sort\") {\n result = false;\n } \n}\n\nif (result !== true) {\n $ERROR('#2: result = true; for (p in Array) { if (p === \"sort\") result = false; } result === true;');\n}\n\n",
+ "id": "S15.4.4.11_A7.5"
+ },
+ {
+ "section": "15.4.4.11",
+ "description": "Checking Array.prototype.sort.prototype",
+ "test": "//CHECK#1\nif (Array.prototype.sort.prototype !== undefined) {\n $ERROR('#1: Array.prototype.sort.prototype === undefined. Actual: ' + (Array.prototype.sort.prototype));\n}\n",
+ "id": "S15.4.4.11_A7.6"
+ },
+ {
+ "section": "15.4.4.11, 11.2.2",
+ "description": "If property does not implement the internal [[Construct]] method, throw a TypeError exception",
+ "test": "//CHECK#1\n\ntry {\n new Array.prototype.sort();\n $ERROR('#1.1: new Array.prototype.sort() throw TypeError. Actual: ' + (new Array.prototype.sort()));\n} catch (e) {\n if ((e instanceof TypeError) !== true) {\n $ERROR('#1.2: new Array.prototype.sort() throw TypeError. Actual: ' + (e));\n }\n}\n",
+ "id": "S15.4.4.11_A7.7"
+ },
+ {
+ "section": "15.4.4.11",
+ "description": "comparefn tests that its this value is undefined",
+ "test": "var global = this;\n[2,3].sort(function(x,y) {\n \"use strict\";\n\n if (this === global) {\n $FAIL('#1: Sort leaks global');\n }\n if (this !== undefined) {\n $FAIL('#2: Sort comparefn should be called with this===undefined. ' +\n 'Actual: ' + this);\n }\n return x - y;\n});\n",
+ "id": "S15.4.4.11_A8"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.4.4.12.json b/website/resources/scripts/testcases2/15.4.4.12.json
new file mode 100644
index 000000000..5a84b7269
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.4.4.12.json
@@ -0,0 +1,21 @@
+{
+ "testCollection": {
+ "name": "15.4.4.12",
+ "numTests": 2,
+ "tests": [
+ {
+ "id": "15.4.4.12-9-a-1",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.12/15.4.4.12-9-a-1.js",
+ "description": "Array.prototype.splice - 'from' is the result of ToString(actualStart+k) in an Array",
+ "test": "assertTrue((function testcase() {\n var arrObj = [1, 2, 3];\n var newArrObj = arrObj.splice(-2, 1);\n return newArrObj.length === 1 && newArrObj[0] === 2;\n }).call(this));\n"
+ },
+ {
+ "id": "15.4.4.12-9-c-ii-1",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.12/15.4.4.12-9-c-ii-1.js",
+ "description": "Array.prototype.splice will splice an array even when Array.prototype has index '0' set to read-only and 'fromPresent' less than 'actualDeleteCount (Step 9.c.ii)",
+ "test": "assertTrue((function testcase() {\n try {\n var arr = [\"a\", \"b\", \"c\"];\n Array.prototype[0] = \"test\";\n var newArr = arr.splice(2, 1, \"d\");\n\n var verifyValue = false;\n verifyValue = arr.length === 3 && arr[0] === \"a\" && arr[1] === \"b\" && arr[2] === \"d\"\n && newArr[0] === \"c\" && newArr.length === 1;\n\n var verifyEnumerable = false;\n for (var p in newArr) {\n if (newArr.hasOwnProperty(\"0\") && p === \"0\") {\n verifyEnumerable = true;\n }\n }\n\n var verifyWritable = false;\n newArr[0] = 12;\n verifyWritable = newArr[0] === 12;\n\n var verifyConfigurable = false;\n delete newArr[0];\n verifyConfigurable = newArr.hasOwnProperty(\"0\");\n\n return verifyValue && !verifyConfigurable && verifyEnumerable && verifyWritable;\n } finally {\n delete Array.prototype[0];\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.4.4.12_Array_prototype_splice.json b/website/resources/scripts/testcases2/15.4.4.12_Array_prototype_splice.json
new file mode 100644
index 000000000..b410b879f
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.4.4.12_Array_prototype_splice.json
@@ -0,0 +1,318 @@
+{
+ "testCollection": {
+ "name": "15.4.4.12_Array_prototype_splice",
+ "numTests": 51,
+ "tests": [
+ {
+ "section": "15.4.4.12",
+ "description": "length > deleteCount > start = 0, itemCount = 0",
+ "test": "var x = [0,1,2,3];\nvar arr = x.splice(0,3);\n\n//CHECK#1\narr.getClass = Object.prototype.toString;\nif (arr.getClass() !== \"[object \" + \"Array\" + \"]\") {\n $ERROR('#1: var x = [0,1,2,3]; var arr = x.splice(0,3); arr is Array object. Actual: ' + (arr.getClass()));\n}\n\n//CHECK#2\nif (arr.length !== 3) {\n $ERROR('#2: var x = [0,1,2,3]; var arr = x.splice(0,3); arr.length === 3. Actual: ' + (arr.length));\n} \n\n//CHECK#3\nif (arr[0] !== 0) {\n $ERROR('#3: var x = [0,1,2,3]; var arr = x.splice(0,3); arr[0] === 0. Actual: ' + (arr[0]));\n}\n\n//CHECK#4\nif (arr[1] !== 1) {\n $ERROR('#4: var x = [0,1,2,3]; var arr = x.splice(0,3); arr[1] === 1. Actual: ' + (arr[1]));\n} \n\n//CHECK#5\nif (arr[2] !== 2) {\n $ERROR('#5: var x = [0,1,2,3]; var arr = x.splice(0,3); arr[2] === 2. Actual: ' + (arr[2]));\n} \n\n//CHECK#6\nif (x.length !== 1) {\n $ERROR('#6: var x = [0,1,2,3]; var arr = x.splice(0,3); x.length === 1. Actual: ' + (x.length));\n} \n\n//CHECK#7\nif (x[0] !== 3) {\n $ERROR('#7: var x = [0,1,2,3]; var arr = x.splice(0,3); x[0] === 3. Actual: ' + (x[0]));\n} \n",
+ "id": "S15.4.4.12_A1.1_T1"
+ },
+ {
+ "section": "15.4.4.12",
+ "description": "length > deleteCount > start = 0, itemCount > 0",
+ "test": "var x = [0,1,2,3];\nvar arr = x.splice(0,3,4,5);\n\n//CHECK#1\narr.getClass = Object.prototype.toString;\nif (arr.getClass() !== \"[object \" + \"Array\" + \"]\") {\n $ERROR('#1: var x = [0,1,2,3]; var arr = x.splice(0,3,4,5); arr is Array object. Actual: ' + (arr.getClass()));\n}\n\n//CHECK#2\nif (arr.length !== 3) {\n $ERROR('#2: var x = [0,1,2,3]; var arr = x.splice(0,3,4,5); arr.length === 3. Actual: ' + (arr.length));\n} \n\n//CHECK#3\nif (arr[0] !== 0) {\n $ERROR('#3: var x = [0,1,2,3]; var arr = x.splice(0,3,4,5); arr[0] === 0. Actual: ' + (arr[0]));\n}\n\n//CHECK#4\nif (arr[1] !== 1) {\n $ERROR('#4: var x = [0,1,2,3]; var arr = x.splice(0,3,4,5); arr[1] === 1. Actual: ' + (arr[1]));\n} \n\n//CHECK#5\nif (arr[2] !== 2) {\n $ERROR('#5: var x = [0,1,2,3]; var arr = x.splice(0,3,4,5); arr[2] === 2. Actual: ' + (arr[2]));\n} \n\n//CHECK#6\nif (x.length !== 3) {\n $ERROR('#6: var x = [0,1,2,3]; var arr = x.splice(0,3,4,5); x.length === 3. Actual: ' + (x.length));\n} \n\n//CHECK#7\nif (x[0] !== 4) {\n $ERROR('#7: var x = [0,1,2,3]; var arr = x.splice(0,3,4,5); x[0] === 4. Actual: ' + (x[0]));\n}\n\n//CHECK#8\nif (x[1] !== 5) {\n $ERROR('#8: var x = [0,1,2,3]; var arr = x.splice(0,3,4,5); x[1] === 5. Actual: ' + (x[1]));\n} \n\n//CHECK#9\nif (x[2] !== 3) {\n $ERROR('#9: var x = [0,1,2,3]; var arr = x.splice(0,3,4,5); x[2] === 3. Actual: ' + (x[2]));\n} \n",
+ "id": "S15.4.4.12_A1.1_T2"
+ },
+ {
+ "section": "15.4.4.12",
+ "description": "length = deleteCount > start = 0",
+ "test": "var x = [0,1,2,3];\nvar arr = x.splice(0,4);\n\n//CHECK#1\narr.getClass = Object.prototype.toString;\nif (arr.getClass() !== \"[object \" + \"Array\" + \"]\") {\n $ERROR('#1: var x = [0,1,2,3]; var arr = x.splice(0,4); arr is Array object. Actual: ' + (arr.getClass()));\n}\n\n//CHECK#2\nif (arr.length !== 4) {\n $ERROR('#2: var x = [0,1,2,3]; var arr = x.splice(0,4); arr.length === 4. Actual: ' + (arr.length));\n} \n\n//CHECK#3\nif (arr[0] !== 0) {\n $ERROR('#3: var x = [0,1,2,3]; var arr = x.splice(0,4); arr[0] === 0. Actual: ' + (arr[0]));\n}\n\n//CHECK#4\nif (arr[1] !== 1) {\n $ERROR('#4: var x = [0,1,2,3]; var arr = x.splice(0,4); arr[1] === 1. Actual: ' + (arr[1]));\n} \n\n//CHECK#5\nif (arr[2] !== 2) {\n $ERROR('#5: var x = [0,1,2,3]; var arr = x.splice(0,4); arr[2] === 2. Actual: ' + (arr[2]));\n} \n\n//CHECK#6\nif (arr[3] !== 3) {\n $ERROR('#6: var x = [0,1,2,3]; var arr = x.splice(0,4); arr[3] === 3. Actual: ' + (arr[3]));\n} \n\n//CHECK#7\nif (x.length !== 0) {\n $ERROR('#7: var x = [0,1,2,3]; var arr = x.splice(0,4); x.length === 0. Actual: ' + (x.length));\n} \n",
+ "id": "S15.4.4.12_A1.1_T3"
+ },
+ {
+ "section": "15.4.4.12",
+ "description": "length > deleteCount > start > 0, itemCount > 0",
+ "test": "var x = [0,1,2,3];\nvar arr = x.splice(1,3,4,5);\n\n//CHECK#1\narr.getClass = Object.prototype.toString;\nif (arr.getClass() !== \"[object \" + \"Array\" + \"]\") {\n $ERROR('#1: var x = [0,1,2,3]; var arr = x.splice(1,3,4,5); arr is Array object. Actual: ' + (arr.getClass()));\n}\n\n//CHECK#2\nif (arr.length !== 3) {\n $ERROR('#2: var x = [0,1,2,3]; var arr = x.splice(1,3,4,5); arr.length === 3. Actual: ' + (arr.length));\n} \n\n//CHECK#3\nif (arr[0] !== 1) {\n $ERROR('#3: var x = [0,1,2,3]; var arr = x.splice(1,3,4,5); arr[0] === 1. Actual: ' + (arr[0]));\n}\n\n//CHECK#4\nif (arr[1] !== 2) {\n $ERROR('#4: var x = [0,1,2,3]; var arr = x.splice(1,3,4,5); arr[1] === 2. Actual: ' + (arr[1]));\n} \n\n//CHECK#5\nif (arr[2] !== 3) {\n $ERROR('#5: var x = [0,1,2,3]; var arr = x.splice(1,3,4,5); arr[2] === 3. Actual: ' + (arr[2]));\n} \n\n//CHECK#6\nif (x.length !== 3) {\n $ERROR('#6: var x = [0,1,2,3]; var arr = x.splice(1,3,4,5); x.length === 3. Actual: ' + (x.length));\n} \n\n//CHECK#7\nif (x[0] !== 0) {\n $ERROR('#7: var x = [0,1,2,3]; var arr = x.splice(1,3,4,5); x[0] === 0. Actual: ' + (x[0]));\n}\n\n//CHECK#8\nif (x[1] !== 4) {\n $ERROR('#8: var x = [0,1,2,3]; var arr = x.splice(1,3,4,5); x[1] === 4. Actual: ' + (x[1]));\n} \n\n//CHECK#9\nif (x[2] !== 5) {\n $ERROR('#9: var x = [0,1,2,3]; var arr = x.splice(1,3,4,5); x[2] === 5. Actual: ' + (x[2]));\n} \n",
+ "id": "S15.4.4.12_A1.1_T4"
+ },
+ {
+ "section": "15.4.4.12",
+ "description": "deleteCount > length > start = 0, itemCount = 0",
+ "test": "var x = [0,1,2,3];\nvar arr = x.splice(0,5);\n\n//CHECK#1\narr.getClass = Object.prototype.toString;\nif (arr.getClass() !== \"[object \" + \"Array\" + \"]\") {\n $ERROR('#1: var x = [0,1,2,3]; var arr = x.splice(0,5); arr is Array object. Actual: ' + (arr.getClass()));\n}\n\n//CHECK#2\nif (arr.length !== 4) {\n $ERROR('#2: var x = [0,1,2,3]; var arr = x.splice(0,5); arr.length === 4. Actual: ' + (arr.length));\n} \n\n//CHECK#3\nif (arr[0] !== 0) {\n $ERROR('#3: var x = [0,1,2,3]; var arr = x.splice(0,5); arr[0] === 0. Actual: ' + (arr[0]));\n}\n\n//CHECK#4\nif (arr[1] !== 1) {\n $ERROR('#4: var x = [0,1,2,3]; var arr = x.splice(0,5); arr[1] === 1. Actual: ' + (arr[1]));\n} \n\n//CHECK#5\nif (arr[2] !== 2) {\n $ERROR('#5: var x = [0,1,2,3]; var arr = x.splice(0,5); arr[2] === 2. Actual: ' + (arr[2]));\n} \n\n//CHECK#6\nif (arr[3] !== 3) {\n $ERROR('#6: var x = [0,1,2,3]; var arr = x.splice(0,5); arr[3] === 3. Actual: ' + (arr[3]));\n} \n\n//CHECK#7\nif (x.length !== 0) {\n $ERROR('#7: var x = [0,1,2,3]; var arr = x.splice(0,5); x.length === 0. Actual: ' + (x.length));\n} \n",
+ "id": "S15.4.4.12_A1.1_T5"
+ },
+ {
+ "section": "15.4.4.12",
+ "description": "length = deleteCount > start > 0, itemCount > 0",
+ "test": "var x = [0,1,2,3];\nvar arr = x.splice(1,4,4,5);\n\n//CHECK#1\narr.getClass = Object.prototype.toString;\nif (arr.getClass() !== \"[object \" + \"Array\" + \"]\") {\n $ERROR('#1: var x = [0,1,2,3]; var arr = x.splice(1,4,4,5); arr is Array object. Actual: ' + (arr.getClass()));\n}\n\n//CHECK#2\nif (arr.length !== 3) {\n $ERROR('#2: var x = [0,1,2,3]; var arr = x.splice(1,4,4,5); arr.length === 3. Actual: ' + (arr.length));\n} \n\n//CHECK#3\nif (arr[0] !== 1) {\n $ERROR('#3: var x = [0,1,2,3]; var arr = x.splice(1,4,4,5); arr[0] === 1. Actual: ' + (arr[0]));\n}\n\n//CHECK#4\nif (arr[1] !== 2) {\n $ERROR('#4: var x = [0,1,2,3]; var arr = x.splice(1,4,4,5); arr[1] === 2. Actual: ' + (arr[1]));\n} \n\n//CHECK#5\nif (arr[2] !== 3) {\n $ERROR('#5: var x = [0,1,2,3]; var arr = x.splice(1,4,4,5); arr[2] === 3. Actual: ' + (arr[2]));\n} \n\n//CHECK#6\nif (x.length !== 3) {\n $ERROR('#6: var x = [0,1,2,3]; var arr = x.splice(1,4,4,5); x.length === 3. Actual: ' + (x.length));\n} \n\n//CHECK#7\nif (x[0] !== 0) {\n $ERROR('#7: var x = [0,1,2,3]; var arr = x.splice(1,4,4,5); x[0] === 0. Actual: ' + (x[0]));\n}\n\n//CHECK#8\nif (x[1] !== 4) {\n $ERROR('#8: var x = [0,1,2,3]; var arr = x.splice(1,4,4,5); x[1] === 4. Actual: ' + (x[1]));\n} \n\n//CHECK#9\nif (x[2] !== 5) {\n $ERROR('#9: var x = [0,1,2,3]; var arr = x.splice(1,4,4,5); x[2] === 5. Actual: ' + (x[2]));\n} \n",
+ "id": "S15.4.4.12_A1.1_T6"
+ },
+ {
+ "section": "15.4.4.12",
+ "description": "-length = start < deleteCount < 0, itemCount = 0",
+ "test": "var x = [0,1];\nvar arr = x.splice(-2,-1);\n\n//CHECK#0\narr.getClass = Object.prototype.toString;\nif (arr.getClass() !== \"[object \" + \"Array\" + \"]\") {\n $ERROR('#0: var x = [0,1]; var arr = x.splice(-2,-1); arr is Array object. Actual: ' + (arr.getClass()));\n}\n\n//CHECK#1\nif (arr.length !== 0) {\n $ERROR('#1: var x = [0,1]; var arr = x.splice(-2,-1); arr.length === 0. Actual: ' + (arr.length));\n} \n\n//CHECK#2\nif (x.length !== 2) {\n $ERROR('#2: var x = [0,1]; var arr = x.splice(-2,-1); x.length === 2. Actual: ' + (x.length));\n} \n\n//CHECK#3\nif (x[0] !== 0) {\n $ERROR('#3: var x = [0,1]; var arr = x.splice(-2,-1); x[0] === 0. Actual: ' + (x[0]));\n}\n\n//CHECK#4\nif (x[1] !== 1) {\n $ERROR('#4: var x = [0,1]; var arr = x.splice(-2,-1); x[1] === 1. Actual: ' + (x[1]));\n} \n",
+ "id": "S15.4.4.12_A1.2_T1"
+ },
+ {
+ "section": "15.4.4.12",
+ "description": "-length < start = deleteCount < 0, itemCount = 0",
+ "test": "var x = [0,1];\nvar arr = x.splice(-1,-1);\n\n//CHECK#0\narr.getClass = Object.prototype.toString;\nif (arr.getClass() !== \"[object \" + \"Array\" + \"]\") {\n $ERROR('#0: var x = [0,1]; var arr = x.splice(-1,-1); arr is Array object. Actual: ' + (arr.getClass()));\n}\n\n//CHECK#1\nif (arr.length !== 0) {\n $ERROR('#1: var x = [0,1]; var arr = x.splice(-1,-1); arr.length === 0. Actual: ' + (arr.length));\n} \n\n//CHECK#2\nif (x.length !== 2) {\n $ERROR('#2: var x = [0,1]; var arr = x.splice(-1,-1); x.length === 2. Actual: ' + (x.length));\n} \n\n//CHECK#3\nif (x[0] !== 0) {\n $ERROR('#3: var x = [0,1]; var arr = x.splice(-1,-1); x[0] === 0. Actual: ' + (x[0]));\n}\n\n//CHECK#4\nif (x[1] !== 1) {\n $ERROR('#4: var x = [0,1]; var arr = x.splice(-1,-1); x[1] === 1. Actual: ' + (x[1]));\n} \n",
+ "id": "S15.4.4.12_A1.2_T2"
+ },
+ {
+ "section": "15.4.4.12",
+ "description": "-length = start < deleteCount < 0, itemCount > 0",
+ "test": "var x = [0,1];\nvar arr = x.splice(-2,-1,2,3);\n\n//CHECK#0\narr.getClass = Object.prototype.toString;\nif (arr.getClass() !== \"[object \" + \"Array\" + \"]\") {\n $ERROR('#0: var x = [0,1]; var arr = x.splice(-2,-1,2,3); arr is Array object. Actual: ' + (arr.getClass()));\n}\n\n//CHECK#1\nif (arr.length !== 0) {\n $ERROR('#1: var x = [0,1]; var arr = x.splice(-2,-1,2,3); arr.length === 0. Actual: ' + (arr.length));\n} \n\n//CHECK#2\nif (x.length !== 4) {\n $ERROR('#2: var x = [0,1]; var arr = x.splice(-2,-1,2,3); x.length === 4. Actual: ' + (x.length));\n} \n\n//CHECK#3\nif (x[0] !== 2) {\n $ERROR('#3: var x = [0,1]; var arr = x.splice(-2,-1,2,3); x[0] === 2. Actual: ' + (x[0]));\n}\n\n//CHECK#4\nif (x[1] !== 3) {\n $ERROR('#4: var x = [0,1]; var arr = x.splice(-2,-1,2,3); x[1] === 3. Actual: ' + (x[1]));\n}\n\n//CHECK#5\nif (x[2] !== 0) {\n $ERROR('#5: var x = [0,1]; var arr = x.splice(-2,-1,2,3); x[2] === 0. Actual: ' + (x[2]));\n}\n\n//CHECK#6\nif (x[3] !== 1) {\n $ERROR('#6: var x = [0,1]; var arr = x.splice(-2,-1,2,3); x[3] === 1. Actual: ' + (x[3]));\n} \n",
+ "id": "S15.4.4.12_A1.2_T3"
+ },
+ {
+ "section": "15.4.4.12",
+ "description": "-length < start = deleteCount < 0, itemCount > 0",
+ "test": "var x = [0,1];\nvar arr = x.splice(-1,-1,2,3);\n\n//CHECK#0\narr.getClass = Object.prototype.toString;\nif (arr.getClass() !== \"[object \" + \"Array\" + \"]\") {\n $ERROR('#0: var x = [0,1]; var arr = x.splice(-1,-1,2,3); arr is Array object. Actual: ' + (arr.getClass()));\n}\n\n//CHECK#1\nif (arr.length !== 0) {\n $ERROR('#1: var x = [0,1]; var arr = x.splice(-1,-1,2,3); arr.length === 0. Actual: ' + (arr.length));\n} \n\n//CHECK#2\nif (x.length !== 4) {\n $ERROR('#2: var x = [0,1]; var arr = x.splice(-1,-1,2,3); x.length === 4. Actual: ' + (x.length));\n} \n\n//CHECK#3\nif (x[0] !== 0) {\n $ERROR('#3: var x = [0,1]; var arr = x.splice(-1,-1,2,3); x[0] === 0. Actual: ' + (x[0]));\n}\n\n//CHECK#4\nif (x[1] !== 2) {\n $ERROR('#4: var x = [0,1]; var arr = x.splice(-1,-1,2,3); x[1] === 2. Actual: ' + (x[1]));\n}\n\n//CHECK#5\nif (x[2] !== 3) {\n $ERROR('#5: var x = [0,1]; var arr = x.splice(-1,-1,2,3); x[2] === 3. Actual: ' + (x[2]));\n}\n\n//CHECK#6\nif (x[3] !== 1) {\n $ERROR('#6: var x = [0,1]; var arr = x.splice(-1,-1,2,3); x[3] === 1. Actual: ' + (x[3]));\n} \n",
+ "id": "S15.4.4.12_A1.2_T4"
+ },
+ {
+ "section": "15.4.4.12",
+ "description": "start < -length < deleteCount < 0, itemCount > 0",
+ "test": "var x = [0,1];\nvar arr = x.splice(-3,-1,2,3);\n\n//CHECK#0\narr.getClass = Object.prototype.toString;\nif (arr.getClass() !== \"[object \" + \"Array\" + \"]\") {\n $ERROR('#0: var x = [0,1]; var arr = x.splice(-3,-1,2,3); arr is Array object. Actual: ' + (arr.getClass()));\n}\n\n//CHECK#1\nif (arr.length !== 0) {\n $ERROR('#1: var x = [0,1]; var arr = x.splice(-3,-1,2,3); arr.length === 0. Actual: ' + (arr.length));\n} \n\n//CHECK#2\nif (x.length !== 4) {\n $ERROR('#2: var x = [0,1]; var arr = x.splice(-3,-1,2,3); x.length === 4. Actual: ' + (x.length));\n} \n\n//CHECK#3\nif (x[0] !== 2) {\n $ERROR('#3: var x = [0,1]; var arr = x.splice(-3,-1,2,3); x[0] === 2. Actual: ' + (x[0]));\n}\n\n//CHECK#4\nif (x[1] !== 3) {\n $ERROR('#4: var x = [0,1]; var arr = x.splice(-3,-1,2,3); x[1] === 3. Actual: ' + (x[1]));\n}\n\n//CHECK#5\nif (x[2] !== 0) {\n $ERROR('#5: var x = [0,1]; var arr = x.splice(-3,-1,2,3); x[2] === 0. Actual: ' + (x[2]));\n}\n\n//CHECK#6\nif (x[3] !== 1) {\n $ERROR('#6: var x = [0,1]; var arr = x.splice(-3,-1,2,3); x[3] === 1. Actual: ' + (x[3]));\n} \n",
+ "id": "S15.4.4.12_A1.2_T5"
+ },
+ {
+ "section": "15.4.4.12",
+ "description": "-length < deleteCount < start = 0, itemCount = 0",
+ "test": "var x = [0,1];\nvar arr = x.splice(0,-1);\n\n//CHECK#0\narr.getClass = Object.prototype.toString;\nif (arr.getClass() !== \"[object \" + \"Array\" + \"]\") {\n $ERROR('#0: var x = [0,1]; var arr = x.splice(0,-1); arr is Array object. Actual: ' + (arr.getClass()));\n}\n\n//CHECK#1\nif (arr.length !== 0) {\n $ERROR('#1: var x = [0,1]; var arr = x.splice(0,-1); arr.length === 0. Actual: ' + (arr.length));\n} \n\n//CHECK#2\nif (x.length !== 2) {\n $ERROR('#2: var x = [0,1]; var arr = x.splice(0,-1); x.length === 2. Actual: ' + (x.length));\n} \n\n//CHECK#3\nif (x[0] !== 0) {\n $ERROR('#3: var x = [0,1]; var arr = x.splice(0,-1); x[0] === 0. Actual: ' + (x[0]));\n}\n\n//CHECK#4\nif (x[1] !== 1) {\n $ERROR('#4: var x = [0,1]; var arr = x.splice(0,-1); x[1] === 1. Actual: ' + (x[1]));\n}\n",
+ "id": "S15.4.4.12_A1.3_T1"
+ },
+ {
+ "section": "15.4.4.12",
+ "description": "-length = -start < deleteCount < 0, itemCount = 0",
+ "test": "var x = [0,1];\nvar arr = x.splice(2,-1);\n\n//CHECK#0\narr.getClass = Object.prototype.toString;\nif (arr.getClass() !== \"[object \" + \"Array\" + \"]\") {\n $ERROR('#0: var x = [0,1]; var arr = x.splice(2,-1); arr is Array object. Actual: ' + (arr.getClass()));\n}\n\n//CHECK#1\nif (arr.length !== 0) {\n $ERROR('#1: var x = [0,1]; var arr = x.splice(2,-1); arr.length === 0. Actual: ' + (arr.length));\n} \n\n//CHECK#2\nif (x.length !== 2) {\n $ERROR('#2: var x = [0,1]; var arr = x.splice(2,-1); x.length === 2. Actual: ' + (x.length));\n} \n\n//CHECK#3\nif (x[0] !== 0) {\n $ERROR('#3: var x = [0,1]; var arr = x.splice(2,-1); x[0] === 0. Actual: ' + (x[0]));\n}\n\n//CHECK#4\nif (x[1] !== 1) {\n $ERROR('#4: var x = [0,1]; var arr = x.splice(2,-1); x[1] === 1. Actual: ' + (x[1]));\n}\n",
+ "id": "S15.4.4.12_A1.3_T2"
+ },
+ {
+ "section": "15.4.4.12",
+ "description": "-length < deleteCount < start = 0, itemCount > 0",
+ "test": "var x = [0,1];\nvar arr = x.splice(0,-1,2,3);\n\n//CHECK#0\narr.getClass = Object.prototype.toString;\nif (arr.getClass() !== \"[object \" + \"Array\" + \"]\") {\n $ERROR('#0: var x = [0,1]; var arr = x.splice(0,-1,2,3); arr is Array object. Actual: ' + (arr.getClass()));\n}\n\n//CHECK#1\nif (arr.length !== 0) {\n $ERROR('#1: var x = [0,1]; var arr = x.splice(0,-1,2,3); arr.length === 0. Actual: ' + (arr.length));\n} \n\n//CHECK#2\nif (x.length !== 4) {\n $ERROR('#2: var x = [0,1]; var arr = x.splice(0,-1,2,3); x.length === 4. Actual: ' + (x.length));\n} \n\n//CHECK#3\nif (x[0] !== 2) {\n $ERROR('#3: var x = [0,1]; var arr = x.splice(0,-1,2,3); x[0] === 2. Actual: ' + (x[0]));\n}\n\n//CHECK#4\nif (x[1] !== 3) {\n $ERROR('#4: var x = [0,1]; var arr = x.splice(0,-1,2,3); x[1] === 3. Actual: ' + (x[1]));\n}\n\n//CHECK#5\nif (x[2] !== 0) {\n $ERROR('#5: var x = [0,1]; var arr = x.splice(0,-1,2,3); x[2] === 0. Actual: ' + (x[2]));\n}\n\n//CHECK#6\nif (x[3] !== 1) {\n $ERROR('#6: var x = [0,1]; var arr = x.splice(0,-1,2,3); x[3] === 1. Actual: ' + (x[3]));\n}\n",
+ "id": "S15.4.4.12_A1.3_T3"
+ },
+ {
+ "section": "15.4.4.12",
+ "description": "-length = -start < deleteCount < 0, itemCount > 0",
+ "test": "var x = [0,1];\nvar arr = x.splice(2,-1,2,3);\n\n//CHECK#0\narr.getClass = Object.prototype.toString;\nif (arr.getClass() !== \"[object \" + \"Array\" + \"]\") {\n $ERROR('#0: var x = [0,1]; var arr = x.splice(2,-1,2,3); arr is Array object. Actual: ' + (arr.getClass()));\n}\n\n//CHECK#1\nif (arr.length !== 0) {\n $ERROR('#1: var x = [0,1]; var arr = x.splice(2,-1,2,3); arr.length === 0. Actual: ' + (arr.length));\n} \n\n//CHECK#2\nif (x.length !== 4) {\n $ERROR('#2: var x = [0,1]; var arr = x.splice(2,-1,2,3); x.length === 4. Actual: ' + (x.length));\n} \n\n//CHECK#3\nif (x[0] !== 0) {\n $ERROR('#3: var x = [0,1]; var arr = x.splice(2,-1,2,3); x[0] === 0. Actual: ' + (x[0]));\n}\n\n//CHECK#4\nif (x[1] !== 1) {\n $ERROR('#4: var x = [0,1]; var arr = x.splice(2,-1,2,3); x[1] === 1. Actual: ' + (x[1]));\n}\n\n//CHECK#5\nif (x[2] !== 2) {\n $ERROR('#5: var x = [0,1]; var arr = x.splice(2,-1,2,3); x[2] === 2. Actual: ' + (x[2]));\n}\n\n//CHECK#6\nif (x[3] !== 3) {\n $ERROR('#6: var x = [0,1]; var arr = x.splice(2,-1,2,3); x[3] === 3. Actual: ' + (x[3]));\n}\n",
+ "id": "S15.4.4.12_A1.3_T4"
+ },
+ {
+ "section": "15.4.4.12",
+ "description": "-start < -length < deleteCount < 0, itemCount > 0",
+ "test": "var x = [0,1];\nvar arr = x.splice(3,-1,2,3);\n\n//CHECK#0\narr.getClass = Object.prototype.toString;\nif (arr.getClass() !== \"[object \" + \"Array\" + \"]\") {\n $ERROR('#0: var x = [0,1]; var arr = x.splice(3,-1,2,3); arr is Array object. Actual: ' + (arr.getClass()));\n}\n\n//CHECK#1\nif (arr.length !== 0) {\n $ERROR('#1: var x = [0,1]; var arr = x.splice(3,-1,2,3); arr.length === 0. Actual: ' + (arr.length));\n} \n\n//CHECK#2\nif (x.length !== 4) {\n $ERROR('#2: var x = [0,1]; var arr = x.splice(3,-1,2,3); x.length === 4. Actual: ' + (x.length));\n} \n\n//CHECK#3\nif (x[0] !== 0) {\n $ERROR('#3: var x = [0,1]; var arr = x.splice(3,-1,2,3); x[0] === 0. Actual: ' + (x[0]));\n}\n\n//CHECK#4\nif (x[1] !== 1) {\n $ERROR('#4: var x = [0,1]; var arr = x.splice(3,-1,2,3); x[1] === 1. Actual: ' + (x[1]));\n}\n\n//CHECK#5\nif (x[2] !== 2) {\n $ERROR('#5: var x = [0,1]; var arr = x.splice(3,-1,2,3); x[2] === 2. Actual: ' + (x[2]));\n}\n\n//CHECK#6\nif (x[3] !== 3) {\n $ERROR('#6: var x = [0,1]; var arr = x.splice(3,-1,2,3); x[3] === 3. Actual: ' + (x[3]));\n}\n",
+ "id": "S15.4.4.12_A1.3_T5"
+ },
+ {
+ "section": "15.4.4.12",
+ "description": "length = -start > deleteCount > 0, itemCount = 0",
+ "test": "var x = [0,1,2,3];\nvar arr = x.splice(-4,3);\n\n//CHECK#1\narr.getClass = Object.prototype.toString;\nif (arr.getClass() !== \"[object \" + \"Array\" + \"]\") {\n $ERROR('#1: var x = [0,1,2,3]; var arr = x.splice(-4,3); arr is Array object. Actual: ' + (arr.getClass()));\n}\n\n//CHECK#2\nif (arr.length !== 3) {\n $ERROR('#2: var x = [0,1,2,3]; var arr = x.splice(-4,3); arr.length === 3. Actual: ' + (arr.length));\n} \n\n//CHECK#3\nif (arr[0] !== 0) {\n $ERROR('#3: var x = [0,1,2,3]; var arr = x.splice(-4,3); arr[0] === 0. Actual: ' + (arr[0]));\n}\n\n//CHECK#4\nif (arr[1] !== 1) {\n $ERROR('#4: var x = [0,1,2,3]; var arr = x.splice(-4,3); arr[1] === 1. Actual: ' + (arr[1]));\n} \n\n//CHECK#5\nif (arr[2] !== 2) {\n $ERROR('#5: var x = [0,1,2,3]; var arr = x.splice(-4,3); arr[2] === 2. Actual: ' + (arr[2]));\n} \n\n//CHECK#6\nif (x.length !== 1) {\n $ERROR('#6: var x = [0,1,2,3]; var arr = x.splice(-4,3); x.length === 1. Actual: ' + (x.length));\n} \n\n//CHECK#7\nif (x[0] !== 3) {\n $ERROR('#7: var x = [0,1,2,3]; var arr = x.splice(-4,3); x[0] === 3. Actual: ' + (x[0]));\n} \n",
+ "id": "S15.4.4.12_A1.4_T1"
+ },
+ {
+ "section": "15.4.4.12",
+ "description": "length = -start > deleteCount > 0, itemCount > 0",
+ "test": "var x = [0,1,2,3];\nvar arr = x.splice(-4,3,4,5);\n\n//CHECK#1\narr.getClass = Object.prototype.toString;\nif (arr.getClass() !== \"[object \" + \"Array\" + \"]\") {\n $ERROR('#1: var x = [0,1,2,3]; var arr = x.splice(-4,3,4,5); arr is Array object. Actual: ' + (arr.getClass()));\n}\n\n//CHECK#2\nif (arr.length !== 3) {\n $ERROR('#2: var x = [0,1,2,3]; var arr = x.splice(-4,3,4,5); arr.length === 3. Actual: ' + (arr.length));\n} \n\n//CHECK#3\nif (arr[0] !== 0) {\n $ERROR('#3: var x = [0,1,2,3]; var arr = x.splice(-4,3,4,5); arr[0] === 0. Actual: ' + (arr[0]));\n}\n\n//CHECK#4\nif (arr[1] !== 1) {\n $ERROR('#4: var x = [0,1,2,3]; var arr = x.splice(-4,3,4,5); arr[1] === 1. Actual: ' + (arr[1]));\n} \n\n//CHECK#5\nif (arr[2] !== 2) {\n $ERROR('#5: var x = [0,1,2,3]; var arr = x.splice(-4,3,4,5); arr[2] === 2. Actual: ' + (arr[2]));\n} \n\n//CHECK#6\nif (x.length !== 3) {\n $ERROR('#6: var x = [0,1,2,3]; var arr = x.splice(-4,3,4,5); x.length === 3. Actual: ' + (x.length));\n} \n\n//CHECK#7\nif (x[0] !== 4) {\n $ERROR('#7: var x = [0,1,2,3]; var arr = x.splice(-4,3,4,5); x[0] === 4. Actual: ' + (x[0]));\n}\n\n//CHECK#8\nif (x[1] !== 5) {\n $ERROR('#8: var x = [0,1,2,3]; var arr = x.splice(-4,3,4,5); x[1] === 5. Actual: ' + (x[1]));\n} \n\n//CHECK#9\nif (x[2] !== 3) {\n $ERROR('#9: var x = [0,1,2,3]; var arr = x.splice(-4,3,4,5); x[2] === 3. Actual: ' + (x[2]));\n} \n",
+ "id": "S15.4.4.12_A1.4_T2"
+ },
+ {
+ "section": "15.4.4.12",
+ "description": "-start > length = deleteCount > 0, itemCount = 0",
+ "test": "var x = [0,1,2,3];\nvar arr = x.splice(-5,4);\n\n//CHECK#1\narr.getClass = Object.prototype.toString;\nif (arr.getClass() !== \"[object \" + \"Array\" + \"]\") {\n $ERROR('#1: var x = [0,1,2,3]; var arr = x.splice(-5,4); arr is Array object. Actual: ' + (arr.getClass()));\n}\n\n//CHECK#2\nif (arr.length !== 4) {\n $ERROR('#2: var x = [0,1,2,3]; var arr = x.splice(-5,4); arr.length === 4. Actual: ' + (arr.length));\n} \n\n//CHECK#3\nif (arr[0] !== 0) {\n $ERROR('#3: var x = [0,1,2,3]; var arr = x.splice(-5,4); arr[0] === 0. Actual: ' + (arr[0]));\n}\n\n//CHECK#4\nif (arr[1] !== 1) {\n $ERROR('#4: var x = [0,1,2,3]; var arr = x.splice(-5,4); arr[1] === 1. Actual: ' + (arr[1]));\n} \n\n//CHECK#5\nif (arr[2] !== 2) {\n $ERROR('#5: var x = [0,1,2,3]; var arr = x.splice(-5,4); arr[2] === 2. Actual: ' + (arr[2]));\n} \n\n//CHECK#6\nif (arr[3] !== 3) {\n $ERROR('#6: var x = [0,1,2,3]; var arr = x.splice(-5,4); arr[3] === 3. Actual: ' + (arr[3]));\n} \n\n//CHECK#7\nif (x.length !== 0) {\n $ERROR('#7: var x = [0,1,2,3]; var arr = x.splice(-5,4); x.length === 0. Actual: ' + (x.length));\n} \n",
+ "id": "S15.4.4.12_A1.4_T3"
+ },
+ {
+ "section": "15.4.4.12",
+ "description": "length > -start = deleteCount > 0, itemCount > 0",
+ "test": "var x = [0,1,2,3];\nvar arr = x.splice(-3,3,4,5);\n\n//CHECK#1\narr.getClass = Object.prototype.toString;\nif (arr.getClass() !== \"[object \" + \"Array\" + \"]\") {\n $ERROR('#1: var x = [0,1,2,3]; var arr = x.splice(-3,3,4,5); arr is Array object. Actual: ' + (arr.getClass()));\n}\n\n//CHECK#2\nif (arr.length !== 3) {\n $ERROR('#2: var x = [0,1,2,3]; var arr = x.splice(-3,3,4,5); arr.length === 3. Actual: ' + (arr.length));\n} \n\n//CHECK#3\nif (arr[0] !== 1) {\n $ERROR('#3: var x = [0,1,2,3]; var arr = x.splice(-3,3,4,5); arr[0] === 1. Actual: ' + (arr[0]));\n}\n\n//CHECK#4\nif (arr[1] !== 2) {\n $ERROR('#4: var x = [0,1,2,3]; var arr = x.splice(-3,3,4,5); arr[1] === 2. Actual: ' + (arr[1]));\n} \n\n//CHECK#5\nif (arr[2] !== 3) {\n $ERROR('#5: var x = [0,1,2,3]; var arr = x.splice(-3,3,4,5); arr[2] === 3. Actual: ' + (arr[2]));\n} \n\n//CHECK#6\nif (x.length !== 3) {\n $ERROR('#6: var x = [0,1,2,3]; var arr = x.splice(-3,3,4,5); x.length === 3. Actual: ' + (x.length));\n} \n\n//CHECK#7\nif (x[0] !== 0) {\n $ERROR('#7: var x = [0,1,2,3]; var arr = x.splice(-3,3,4,5); x[0] === 0. Actual: ' + (x[0]));\n}\n\n//CHECK#8\nif (x[1] !== 4) {\n $ERROR('#8: var x = [0,1,2,3]; var arr = x.splice(-3,3,4,5); x[1] === 4. Actual: ' + (x[1]));\n} \n\n//CHECK#9\nif (x[2] !== 5) {\n $ERROR('#9: var x = [0,1,2,3]; var arr = x.splice(-3,3,4,5); x[2] === 5. Actual: ' + (x[2]));\n} \n",
+ "id": "S15.4.4.12_A1.4_T4"
+ },
+ {
+ "section": "15.4.4.12",
+ "description": "-start > deleteCount > length > 0, itemCount = 0",
+ "test": "var x = [0,1,2,3];\nvar arr = x.splice(-9,5);\n\n//CHECK#1\narr.getClass = Object.prototype.toString;\nif (arr.getClass() !== \"[object \" + \"Array\" + \"]\") {\n $ERROR('#1: var x = [0,1,2,3]; var arr = x.splice(-9,5); arr is Array object. Actual: ' + (arr.getClass()));\n}\n\n//CHECK#2\nif (arr.length !== 4) {\n $ERROR('#2: var x = [0,1,2,3]; var arr = x.splice(-9,5); arr.length === 4. Actual: ' + (arr.length));\n} \n\n//CHECK#3\nif (arr[0] !== 0) {\n $ERROR('#3: var x = [0,1,2,3]; var arr = x.splice(-9,5); arr[0] === 0. Actual: ' + (arr[0]));\n}\n\n//CHECK#4\nif (arr[1] !== 1) {\n $ERROR('#4: var x = [0,1,2,3]; var arr = x.splice(-9,5); arr[1] === 1. Actual: ' + (arr[1]));\n} \n\n//CHECK#5\nif (arr[2] !== 2) {\n $ERROR('#5: var x = [0,1,2,3]; var arr = x.splice(-9,5); arr[2] === 2. Actual: ' + (arr[2]));\n} \n\n//CHECK#6\nif (arr[3] !== 3) {\n $ERROR('#6: var x = [0,1,2,3]; var arr = x.splice(-9,5); arr[3] === 3. Actual: ' + (arr[3]));\n} \n\n//CHECK#7\nif (x.length !== 0) {\n $ERROR('#7: var x = [0,1,2,3]; var arr = x.splice(-9,5); x.length === 0. Actual: ' + (x.length));\n} \n",
+ "id": "S15.4.4.12_A1.4_T5"
+ },
+ {
+ "section": "15.4.4.12",
+ "description": "length = deleteCount > -start > 0, itemCount > 0",
+ "test": "var x = [0,1,2,3];\nvar arr = x.splice(-3,4,4,5);\n\n//CHECK#1\narr.getClass = Object.prototype.toString;\nif (arr.getClass() !== \"[object \" + \"Array\" + \"]\") {\n $ERROR('#1: var x = [0,1,2,3]; var arr = x.splice(-3,4,4,5); arr is Array object. Actual: ' + (arr.getClass()));\n}\n\n//CHECK#2\nif (arr.length !== 3) {\n $ERROR('#2: var x = [0,1,2,3]; var arr = x.splice(-3,4,4,5); arr.length === 3. Actual: ' + (arr.length));\n} \n\n//CHECK#3\nif (arr[0] !== 1) {\n $ERROR('#3: var x = [0,1,2,3]; var arr = x.splice(-3,4,4,5); arr[0] === 1. Actual: ' + (arr[0]));\n}\n\n//CHECK#4\nif (arr[1] !== 2) {\n $ERROR('#4: var x = [0,1,2,3]; var arr = x.splice(-3,4,4,5); arr[1] === 2. Actual: ' + (arr[1]));\n} \n\n//CHECK#5\nif (arr[2] !== 3) {\n $ERROR('#5: var x = [0,1,2,3]; var arr = x.splice(-3,4,4,5); arr[2] === 3. Actual: ' + (arr[2]));\n} \n\n//CHECK#6\nif (x.length !== 3) {\n $ERROR('#6: var x = [0,1,2,3]; var arr = x.splice(-3,4,4,5); x.length === 3. Actual: ' + (x.length));\n} \n\n//CHECK#7\nif (x[0] !== 0) {\n $ERROR('#7: var x = [0,1,2,3]; var arr = x.splice(-3,4,4,5); x[0] === 0. Actual: ' + (x[0]));\n}\n\n//CHECK#8\nif (x[1] !== 4) {\n $ERROR('#8: var x = [0,1,2,3]; var arr = x.splice(-3,4,4,5); x[1] === 4. Actual: ' + (x[1]));\n} \n\n//CHECK#9\nif (x[2] !== 5) {\n $ERROR('#9: var x = [0,1,2,3]; var arr = x.splice(-3,4,4,5); x[2] === 5. Actual: ' + (x[2]));\n} \n",
+ "id": "S15.4.4.12_A1.4_T6"
+ },
+ {
+ "section": "15.4.4.12",
+ "description": "start === undefined, end === undefined",
+ "test": "var x = [0,1,2,3];\nvar arr = x.splice(undefined, undefined);\n\n//CHECK#1\narr.getClass = Object.prototype.toString;\nif (arr.getClass() !== \"[object \" + \"Array\" + \"]\") {\n $ERROR('#1: var x = [0,1,2,3]; var arr = x.splice(undefined, undefined); arr is Array object. Actual: ' + (arr.getClass()));\n}\n\n//CHECK#2\nif (arr.length !== 0) {\n $ERROR('#2: var x = [0,1,2,3]; var arr = x.splice(undefined, undefined); arr.length === 0. Actual: ' + (arr.length));\n} \n\n//CHECK#3\nif (x.length !== 4) {\n $ERROR('#3: var x = [0,1,2,3]; var arr = x.splice(undefined, undefined); x.length === 4. Actual: ' + (x.length));\n} \n\n//CHECK#4\nif (x[0] !== 0) {\n $ERROR('#4: var x = [0,1,2,3]; var arr = x.splice(undefined, undefined); x[0] === 0. Actual: ' + (x[0]));\n}\n\n//CHECK#5\nif (x[1] !== 1) {\n $ERROR('#5: var x = [0,1,2,3]; var arr = x.splice(undefined, undefined); x[1] === 1. Actual: ' + (x[1]));\n} \n\n//CHECK#6\nif (x[2] !== 2) {\n $ERROR('#6: var x = [0,1,2,3]; var arr = x.splice(undefined, undefined); x[2] === 2. Actual: ' + (x[2]));\n}\n\n//CHECK#7\nif (x[3] !== 3) {\n $ERROR('#7: var x = [0,1,2,3]; var arr = x.splice(undefined, undefined); x[3] === 3. Actual: ' + (x[3]));\n}\n",
+ "id": "S15.4.4.12_A1.5_T1"
+ },
+ {
+ "section": "15.4.4.12",
+ "description": "end === undefined",
+ "test": "var x = [0,1,2,3];\nvar arr = x.splice(1,undefined);\n\n//CHECK#1\narr.getClass = Object.prototype.toString;\nif (arr.getClass() !== \"[object \" + \"Array\" + \"]\") {\n $ERROR('#1: var x = [0,1,2,3]; var arr = x.splice(1,undefined); arr is Array object. Actual: ' + (arr.getClass()));\n}\n\n//CHECK#2\nif (arr.length !== 0) {\n $ERROR('#2: var x = [0,1,2,3]; var arr = x.splice(1,undefined); arr.length === 0. Actual: ' + (arr.length));\n} \n\n//CHECK#3\nif (x.length !== 4) {\n $ERROR('#3: var x = [0,1,2,3]; var arr = x.splice(1,undefined); x.length === 4. Actual: ' + (x.length));\n} \n\n//CHECK#4\nif (x[0] !== 0) {\n $ERROR('#4: var x = [0,1,2,3]; var arr = x.splice(1,undefined); x[0] === 0. Actual: ' + (x[0]));\n}\n\n//CHECK#5\nif (x[1] !== 1) {\n $ERROR('#5: var x = [0,1,2,3]; var arr = x.splice(1,undefined); x[1] === 1. Actual: ' + (x[1]));\n} \n\n//CHECK#6\nif (x[2] !== 2) {\n $ERROR('#6: var x = [0,1,2,3]; var arr = x.splice(1,undefined); x[2] === 2. Actual: ' + (x[2]));\n}\n\n//CHECK#7\nif (x[3] !== 3) {\n $ERROR('#7: var x = [0,1,2,3]; var arr = x.splice(1,undefined); x[3] === 3. Actual: ' + (x[3]));\n} \n",
+ "id": "S15.4.4.12_A1.5_T2"
+ },
+ {
+ "section": "15.4.4.12",
+ "description": "start is not integer",
+ "test": "var x = [0,1,2,3];\nvar arr = x.splice(1.5,3);\n\n//CHECK#1\narr.getClass = Object.prototype.toString;\nif (arr.getClass() !== \"[object \" + \"Array\" + \"]\") {\n $ERROR('#1: var x = [0,1,2,3]; var arr = x.splice(1.5,3); arr is Array object. Actual: ' + (arr.getClass()));\n}\n\n//CHECK#2\nif (arr.length !== 3) {\n $ERROR('#2: var x = [0,1,2,3]; var arr = x.splice(1.5,3); arr.length === 3. Actual: ' + (arr.length));\n} \n\n//CHECK#3\nif (arr[0] !== 1) {\n $ERROR('#3: var x = [0,1,2,3]; var arr = x.splice(1.5,3); arr[0] === 1. Actual: ' + (arr[0]));\n}\n\n//CHECK#4\nif (arr[1] !== 2) {\n $ERROR('#4: var x = [0,1,2,3]; var arr = x.splice(1.5,3); arr[1] === 2. Actual: ' + (arr[1]));\n} \n\n//CHECK#5\nif (arr[2] !== 3) {\n $ERROR('#5: var x = [0,1,2,3]; var arr = x.splice(1.5,3); arr[2] === 3. Actual: ' + (arr[2]));\n} \n\n//CHECK#6\nif (x.length !== 1) {\n $ERROR('#6: var x = [0,1,2,3]; var arr = x.splice(1.5,3); x.length === 1. Actual: ' + (x.length));\n} \n\n//CHECK#7\nif (x[0] !== 0) {\n $ERROR('#7: var x = [0,1,2,3]; var arr = x.splice(1.5,3); x[0] === 0. Actual: ' + (x[0]));\n} \n",
+ "id": "S15.4.4.12_A2.1_T1"
+ },
+ {
+ "section": "15.4.4.12",
+ "description": "start = NaN",
+ "test": "var x = [0,1,2,3];\nvar arr = x.splice(NaN,3);\n\n//CHECK#1\narr.getClass = Object.prototype.toString;\nif (arr.getClass() !== \"[object \" + \"Array\" + \"]\") {\n $ERROR('#1: var x = [0,1,2,3]; var arr = x.splice(NaN,3); arr is Array object. Actual: ' + (arr.getClass()));\n}\n\n//CHECK#2\nif (arr.length !== 3) {\n $ERROR('#2: var x = [0,1,2,3]; var arr = x.splice(NaN,3); arr.length === 3. Actual: ' + (arr.length));\n} \n\n//CHECK#3\nif (arr[0] !== 0) {\n $ERROR('#3: var x = [0,1,2,3]; var arr = x.splice(NaN,3); arr[0] === 0. Actual: ' + (arr[0]));\n}\n\n//CHECK#4\nif (arr[1] !== 1) {\n $ERROR('#4: var x = [0,1,2,3]; var arr = x.splice(NaN,3); arr[1] === 1. Actual: ' + (arr[1]));\n} \n\n//CHECK#5\nif (arr[2] !== 2) {\n $ERROR('#5: var x = [0,1,2,3]; var arr = x.splice(NaN,3); arr[2] === 2. Actual: ' + (arr[2]));\n} \n\n//CHECK#6\nif (x.length !== 1) {\n $ERROR('#6: var x = [0,1,2,3]; var arr = x.splice(NaN,3); x.length === 1. Actual: ' + (x.length));\n} \n\n//CHECK#7\nif (x[0] !== 3) {\n $ERROR('#7: var x = [0,1,2,3]; var arr = x.splice(NaN,3); x[0] === 3. Actual: ' + (x[0]));\n} \n",
+ "id": "S15.4.4.12_A2.1_T2"
+ },
+ {
+ "section": "15.4.4.12",
+ "description": "start = Infinity",
+ "test": "var x = [0,1,2,3];\nvar arr = x.splice(Number.POSITIVE_INFINITY,3);\n\n//CHECK#1\narr.getClass = Object.prototype.toString;\nif (arr.getClass() !== \"[object \" + \"Array\" + \"]\") {\n $ERROR('#1: var x = [0,1,2,3]; var arr = x.splice(Number.POSITIVE_INFINITY,3); arr is Array object. Actual: ' + (arr.getClass()));\n}\n\n//CHECK#2\nif (arr.length !== 0) {\n $ERROR('#2: var x = [0,1,2,3]; var arr = x.splice(Number.POSITIVE_INFINITY,3); arr.length === 0. Actual: ' + (arr.length));\n} \n\n//CHECK#3\nif (x[0] !== 0) {\n $ERROR('#3: var x = [0,1,2,3]; var x = x.splice(Number.POSITIVE_INFINITY,3); x[0] === 0. Actual: ' + (x[0]));\n}\n\n//CHECK#4\nif (x[1] !== 1) {\n $ERROR('#4: var x = [0,1,2,3]; var x = x.splice(Number.POSITIVE_INFINITY,3); x[1] === 1. Actual: ' + (x[1]));\n} \n\n//CHECK#5\nif (x[2] !== 2) {\n $ERROR('#5: var x = [0,1,2,3]; var x = x.splice(Number.POSITIVE_INFINITY,3); x[2] === 2. Actual: ' + (x[2]));\n} \n\n//CHECK#6\nif (x[3] !== 3) {\n $ERROR('#6: var x = [0,1,2,3]; var x = x.splice(Number.POSITIVE_INFINITY,3); x[3] === 3. Actual: ' + (x[3]));\n} \n",
+ "id": "S15.4.4.12_A2.1_T3"
+ },
+ {
+ "section": "15.4.4.12",
+ "description": "start = -Infinity",
+ "test": "var x = [0,1,2,3];\nvar arr = x.splice(Number.NEGATIVE_INFINITY,3);\n\n//CHECK#1\narr.getClass = Object.prototype.toString;\nif (arr.getClass() !== \"[object \" + \"Array\" + \"]\") {\n $ERROR('#1: var x = [0,1,2,3]; var arr = x.splice(Number.NEGATIVE_INFINITY,3); arr is Array object. Actual: ' + (arr.getClass()));\n}\n\n//CHECK#2\nif (arr.length !== 3) {\n $ERROR('#2: var x = [0,1,2,3]; var arr = x.splice(Number.NEGATIVE_INFINITY,3); arr.length === 3. Actual: ' + (arr.length));\n} \n\n//CHECK#3\nif (arr[0] !== 0) {\n $ERROR('#3: var x = [0,1,2,3]; var arr = x.splice(Number.NEGATIVE_INFINITY,3); arr[0] === 0. Actual: ' + (arr[0]));\n}\n\n//CHECK#4\nif (arr[1] !== 1) {\n $ERROR('#4: var x = [0,1,2,3]; var arr = x.splice(Number.NEGATIVE_INFINITY,3); arr[1] === 1. Actual: ' + (arr[1]));\n} \n\n//CHECK#5\nif (arr[2] !== 2) {\n $ERROR('#5: var x = [0,1,2,3]; var arr = x.splice(Number.NEGATIVE_INFINITY,3); arr[2] === 2. Actual: ' + (arr[2]));\n} \n\n//CHECK#6\nif (x.length !== 1) {\n $ERROR('#6: var x = [0,1,2,3]; var arr = x.splice(Number.NEGATIVE_INFINITY,3); x.length === 1. Actual: ' + (x.length));\n} \n\n//CHECK#7\nif (x[0] !== 3) {\n $ERROR('#7: var x = [0,1,2,3]; var arr = x.splice(Number.NEGATIVE_INFINITY,3); x[0] === 3. Actual: ' + (x[0]));\n} \n",
+ "id": "S15.4.4.12_A2.1_T4"
+ },
+ {
+ "section": "15.4.4.12",
+ "description": "ToInteger use ToNumber",
+ "test": "var x = [0,1,2,3];\nvar arr = x.splice({valueOf: function() {return 0}, toString: function() {return 3}},3);\n\n//CHECK#1\narr.getClass = Object.prototype.toString;\nif (arr.getClass() !== \"[object \" + \"Array\" + \"]\") {\n $ERROR('#1: var x = [0,1,2,3]; var arr = x.splice({valueOf: function() {return 0}, toString: function() {return 3}},3); arr is Array object. Actual: ' + (arr.getClass()));\n}\n\n//CHECK#2\nif (arr.length !== 3) {\n $ERROR('#2: var x = [0,1,2,3]; var arr = x.splice({valueOf: function() {return 0}, toString: function() {return 3}},3); arr.length === 3. Actual: ' + (arr.length));\n}\n\n//CHECK#3\nif (arr[0] !== 0) {\n $ERROR('#3: var x = [0,1,2,3]; var arr = x.splice({valueOf: function() {return 0}, toString: function() {return 3}},3); arr[0] === 0. Actual: ' + (arr[0]));\n}\n\n//CHECK#4\nif (arr[1] !== 1) {\n $ERROR('#4: var x = [0,1,2,3]; var arr = x.splice({valueOf: function() {return 0}, toString: function() {return 3}},3); arr[1] === 1. Actual: ' + (arr[1]));\n}\n\n//CHECK#5\nif (arr[2] !== 2) {\n $ERROR('#5: var x = [0,1,2,3]; var arr = x.splice({valueOf: function() {return 0}, toString: function() {return 3}},3); arr[2] === 2. Actual: ' + (arr[2]));\n}\n\n//CHECK#6\nif (x.length !== 1) {\n $ERROR('#6: var x = [0,1,2,3]; var arr = x.splice({valueOf: function() {return 0}, toString: function() {return 3}},3); x.length === 1. Actual: ' + (x.length));\n}\n\n//CHECK#7\nif (x[0] !== 3) {\n $ERROR('#7: var x = [0,1,2,3]; var arr = x.splice({valueOf: function() {return 0}, toString: function() {return 3}},3); x[0] === 3. Actual: ' + (x[0]));\n}\n",
+ "id": "S15.4.4.12_A2.1_T5"
+ },
+ {
+ "section": "15.4.4.12",
+ "description": "deleteCount is not integer",
+ "test": "var x = [0,1,2,3];\nvar arr = x.splice(1,3.5);\n\n//CHECK#1\narr.getClass = Object.prototype.toString;\nif (arr.getClass() !== \"[object \" + \"Array\" + \"]\") {\n $ERROR('#1: var x = [0,1,2,3]; var arr = x.splice(1,3.5); arr is Array object. Actual: ' + (arr.getClass()));\n}\n\n//CHECK#2\nif (arr.length !== 3) {\n $ERROR('#2: var x = [0,1,2,3]; var arr = x.splice(1,3.5); arr.length === 3. Actual: ' + (arr.length));\n} \n\n//CHECK#3\nif (arr[0] !== 1) {\n $ERROR('#3: var x = [0,1,2,3]; var arr = x.splice(1,3.5); arr[0] === 1. Actual: ' + (arr[0]));\n}\n\n//CHECK#4\nif (arr[1] !== 2) {\n $ERROR('#4: var x = [0,1,2,3]; var arr = x.splice(1,3.5); arr[1] === 2. Actual: ' + (arr[1]));\n} \n\n//CHECK#5\nif (arr[2] !== 3) {\n $ERROR('#5: var x = [0,1,2,3]; var arr = x.splice(1,3.5); arr[2] === 3. Actual: ' + (arr[2]));\n} \n\n//CHECK#6\nif (x.length !== 1) {\n $ERROR('#6: var x = [0,1,2,3]; var arr = x.splice(1,3.5); x.length === 1. Actual: ' + (x.length));\n} \n\n//CHECK#7\nif (x[0] !== 0) {\n $ERROR('#7: var x = [0,1,2,3]; var arr = x.splice(1,3.5); x[0] === 0. Actual: ' + (x[0]));\n} \n",
+ "id": "S15.4.4.12_A2.2_T1"
+ },
+ {
+ "section": "15.4.4.12",
+ "description": "deleteCount = NaN",
+ "test": "var x = [0,1];\nvar arr = x.splice(0,NaN);\n\n//CHECK#0\narr.getClass = Object.prototype.toString;\nif (arr.getClass() !== \"[object \" + \"Array\" + \"]\") {\n $ERROR('#0: var x = [0,1]; var arr = x.splice(0,NaN); arr is Array object. Actual: ' + (arr.getClass()));\n}\n\n//CHECK#1\nif (arr.length !== 0) {\n $ERROR('#1: var x = [0,1]; var arr = x.splice(0,NaN); arr.length === 0. Actual: ' + (arr.length));\n} \n\n//CHECK#2\nif (x.length !== 2) {\n $ERROR('#2: var x = [0,1]; var arr = x.splice(0,NaN); x.length === 2. Actual: ' + (x.length));\n} \n\n//CHECK#3\nif (x[0] !== 0) {\n $ERROR('#3: var x = [0,1]; var arr = x.splice(0,NaN); x[0] === 0. Actual: ' + (x[0]));\n}\n\n//CHECK#4\nif (x[1] !== 1) {\n $ERROR('#4: var x = [0,1]; var arr = x.splice(0,NaN); x[1] === 1. Actual: ' + (x[1]));\n}\n",
+ "id": "S15.4.4.12_A2.2_T2"
+ },
+ {
+ "section": "15.4.4.12",
+ "description": "deleteCount = Infinity",
+ "test": "var x = [0,1,2,3];\nvar arr = x.splice(0,Number.POSITIVE_INFINITY);\n\n//CHECK#1\narr.getClass = Object.prototype.toString;\nif (arr.getClass() !== \"[object \" + \"Array\" + \"]\") {\n $ERROR('#1: var x = [0,1,2,3]; var arr = x.splice(0,Number.POSITIVE_INFINITY); arr is Array object. Actual: ' + (arr.getClass()));\n}\n\n//CHECK#2\nif (arr.length !== 4) {\n $ERROR('#2: var x = [0,1,2,3]; var arr = x.splice(0,Number.POSITIVE_INFINITY); arr.length === 4. Actual: ' + (arr.length));\n} \n\n//CHECK#3\nif (arr[0] !== 0) {\n $ERROR('#3: var x = [0,1,2,3]; var arr = x.splice(0,Number.POSITIVE_INFINITY); arr[0] === 0. Actual: ' + (arr[0]));\n}\n\n//CHECK#4\nif (arr[1] !== 1) {\n $ERROR('#4: var x = [0,1,2,3]; var arr = x.splice(0,Number.POSITIVE_INFINITY); arr[1] === 1. Actual: ' + (arr[1]));\n} \n\n//CHECK#5\nif (arr[2] !== 2) {\n $ERROR('#5: var x = [0,1,2,3]; var arr = x.splice(0,Number.POSITIVE_INFINITY); arr[2] === 2. Actual: ' + (arr[2]));\n} \n\n//CHECK#6\nif (arr[3] !== 3) {\n $ERROR('#6: var x = [0,1,2,3]; var arr = x.splice(0,Number.POSITIVE_INFINITY); arr[3] === 3. Actual: ' + (arr[3]));\n} \n\n//CHECK#7\nif (x.length !== 0) {\n $ERROR('#7: var x = [0,1,2,3]; var arr = x.splice(0,Number.POSITIVE_INFINITY); x.length === 0. Actual: ' + (x.length));\n} \n",
+ "id": "S15.4.4.12_A2.2_T3"
+ },
+ {
+ "section": "15.4.4.12",
+ "description": "deleteCount = -Infinity",
+ "test": "var x = [0,1];\nvar arr = x.splice(0,Number.NEGATIVE_INFINITY);\n\n//CHECK#0\narr.getClass = Object.prototype.toString;\nif (arr.getClass() !== \"[object \" + \"Array\" + \"]\") {\n $ERROR('#0: var x = [0,1]; var arr = x.splice(0,Number.NEGATIVE_INFINITY); arr is Array object. Actual: ' + (arr.getClass()));\n}\n\n//CHECK#1\nif (arr.length !== 0) {\n $ERROR('#1: var x = [0,1]; var arr = x.splice(0,Number.NEGATIVE_INFINITY); arr.length === 0. Actual: ' + (arr.length));\n} \n\n//CHECK#2\nif (x.length !== 2) {\n $ERROR('#2: var x = [0,1]; var arr = x.splice(0,Number.NEGATIVE_INFINITY); x.length === 2. Actual: ' + (x.length));\n} \n\n//CHECK#3\nif (x[0] !== 0) {\n $ERROR('#3: var x = [0,1]; var arr = x.splice(0,Number.NEGATIVE_INFINITY); x[0] === 0. Actual: ' + (x[0]));\n}\n\n//CHECK#4\nif (x[1] !== 1) {\n $ERROR('#4: var x = [0,1]; var arr = x.splice(0,Number.NEGATIVE_INFINITY); x[1] === 1. Actual: ' + (x[1]));\n}\n",
+ "id": "S15.4.4.12_A2.2_T4"
+ },
+ {
+ "section": "15.4.4.12",
+ "description": "ToInteger use ToNumber",
+ "test": "var x = [0,1,2,3];\nvar arr = x.splice(0,{valueOf: function() {return 3}, toString: function() {return 0}});\n\n//CHECK#1\narr.getClass = Object.prototype.toString;\nif (arr.getClass() !== \"[object \" + \"Array\" + \"]\") {\n $ERROR('#1: var x = [0,1,2,3]; var arr = x.splice(0,{valueOf: function() {return 3}, toString: function() {return 0}}); arr is Array object. Actual: ' + (arr.getClass()));\n}\n\n//CHECK#2\nif (arr.length !== 3) {\n $ERROR('#2: var x = [0,1,2,3]; var arr = x.splice(0,{valueOf: function() {return 3}, toString: function() {return 0}}); arr.length === 3. Actual: ' + (arr.length));\n} \n\n//CHECK#3\nif (arr[0] !== 0) {\n $ERROR('#3: var x = [0,1,2,3]; var arr = x.splice(0,{valueOf: function() {return 3}, toString: function() {return 0}}); arr[0] === 0. Actual: ' + (arr[0]));\n}\n\n//CHECK#4\nif (arr[1] !== 1) {\n $ERROR('#4: var x = [0,1,2,3]; var arr = x.splice(0,{valueOf: function() {return 3}, toString: function() {return 0}}); arr[1] === 1. Actual: ' + (arr[1]));\n} \n\n//CHECK#5\nif (arr[2] !== 2) {\n $ERROR('#5: var x = [0,1,2,3]; var arr = x.splice(0,{valueOf: function() {return 3}, toString: function() {return 0}}); arr[2] === 2. Actual: ' + (arr[2]));\n} \n\n//CHECK#6\nif (x.length !== 1) {\n $ERROR('#6: var x = [0,1,2,3]; var arr = x.splice(0,{valueOf: function() {return 3}, toString: function() {return 0}}); x.length === 1. Actual: ' + (x.length));\n} \n\n//CHECK#7\nif (x[0] !== 3) {\n $ERROR('#7: var x = [0,1,2,3]; var arr = x.splice(0,{valueOf: function() {return 3}, toString: function() {return 0}}); x[0] === 3. Actual: ' + (x[0]));\n} \n",
+ "id": "S15.4.4.12_A2.2_T5"
+ },
+ {
+ "section": "15.4.4.12",
+ "description": "If start is positive, use min(start, length).\nIf deleteCount is positive, use min(deleteCount, length - start)",
+ "test": "var obj = {0:0,1:1,2:2,3:3};\nobj.length = 4;\nobj.splice = Array.prototype.splice;\nvar arr = obj.splice(0,3,4,5);\n\n//CHECK#1\narr.getClass = Object.prototype.toString;\nif (arr.getClass() !== \"[object \" + \"Array\" + \"]\") {\n $ERROR('#1: var obj = {0:0,1:1,2:2,3:3}; obj.length = 4; obj.splice = Array.prototype.splice; var arr = obj.splice(0,3,4,5); arr is Array object. Actual: ' + (arr.getClass()));\n}\n\n//CHECK#2\nif (arr.length !== 3) {\n $ERROR('#2: var obj = {0:0,1:1,2:2,3:3}; obj.length = 4; obj.splice = Array.prototype.splice; var arr = obj.splice(0,3,4,5); arr.length === 3. Actual: ' + (arr.length));\n} \n\n//CHECK#3\nif (arr[0] !== 0) {\n $ERROR('#3: var obj = {0:0,1:1,2:2,3:3}; obj.length = 4; obj.splice = Array.prototype.splice; var arr = obj.splice(0,3,4,5); arr[0] === 0. Actual: ' + (arr[0]));\n}\n\n//CHECK#4\nif (arr[1] !== 1) {\n $ERROR('#4: var obj = {0:0,1:1,2:2,3:3}; obj.length = 4; obj.splice = Array.prototype.splice; var arr = obj.splice(0,3,4,5); arr[1] === 1. Actual: ' + (arr[1]));\n} \n\n//CHECK#5\nif (arr[2] !== 2) {\n $ERROR('#5: var obj = {0:0,1:1,2:2,3:3}; obj.length = 4; obj.splice = Array.prototype.splice; var arr = obj.splice(0,3,4,5); arr[2] === 2. Actual: ' + (arr[2]));\n} \n\n//CHECK#6\nif (obj.length !== 3) {\n $ERROR('#6: var obj = {0:0,1:1,2:2,3:3}; obj.length = 4; obj.splice = Array.prototype.splice; var arr = obj.splice(0,3,4,5); obj.length === 3. Actual: ' + (obj.length));\n} \n\n//CHECK#7\nif (obj[0] !== 4) {\n $ERROR('#7: var obj = {0:0,1:1,2:2,3:3}; obj.length = 4; obj.splice = Array.prototype.splice; var arr = obj.splice(0,3,4,5); obj[0] === 4. Actual: ' + (obj[0]));\n}\n\n//CHECK#8\nif (obj[1] !== 5) {\n $ERROR('#8: var obj = {0:0,1:1,2:2,3:3}; obj.length = 4; obj.splice = Array.prototype.splice; var arr = obj.splice(0,3,4,5); obj[1] === 5. Actual: ' + (obj[1]));\n} \n\n//CHECK#9\nif (obj[2] !== 3) {\n $ERROR('#9: var obj = {0:0,1:1,2:2,3:3}; obj.length = 4; obj.splice = Array.prototype.splice; var arr = obj.splice(0,3,4,5); obj[2] === 3. Actual: ' + (obj[2]));\n}\n\n//CHECK#10\nif (obj[3] !== undefined) {\n $ERROR('#10: var obj = {0:0,1:1,2:2,3:3}; obj.length = 4; obj.splice = Array.prototype.splice; var arr = obj.splice(0,3,4,5); obj[3] === undefined. Actual: ' + (obj[3]));\n}\n",
+ "id": "S15.4.4.12_A2_T1"
+ },
+ {
+ "section": "15.4.4.12",
+ "description": "If start is negative, use max(start + length, 0).\nIf deleteCount is negative, use 0",
+ "test": "var obj = {0:0,1:1};\nobj.length = 2;\nobj.splice = Array.prototype.splice;\nvar arr = obj.splice(-2,-1,2,3);\n\n//CHECK#0\narr.getClass = Object.prototype.toString;\nif (arr.getClass() !== \"[object \" + \"Array\" + \"]\") {\n $ERROR('#0: var obj = {0:0,1:1}; obj.length = 2; obj.splice = Array.prototype.splice; var arr = obj.splice(-2,-1,2,3); arr is Array object. Actual: ' + (arr.getClass()));\n}\n\n//CHECK#1\nif (arr.length !== 0) {\n $ERROR('#1: var obj = {0:0,1:1}; obj.length = 2; obj.splice = Array.prototype.splice; var arr = obj.splice(-2,-1,2,3); arr.length === 0. Actual: ' + (arr.length));\n} \n\n//CHECK#2\nif (obj.length !== 4) {\n $ERROR('#2: var obj = {0:0,1:1}; obj.length = 2; obj.splice = Array.prototype.splice; var arr = obj.splice(-2,-1,2,3); obj.length === 4. Actual: ' + (obj.length));\n} \n\n//CHECK#3\nif (obj[0] !== 2) {\n $ERROR('#3: var obj = {0:0,1:1}; obj.length = 2; obj.splice = Array.prototype.splice; var arr = obj.splice(-2,-1,2,3); obj[0] === 2. Actual: ' + (obj[0]));\n}\n\n//CHECK#4\nif (obj[1] !== 3) {\n $ERROR('#4: var obj = {0:0,1:1}; obj.length = 2; obj.splice = Array.prototype.splice; var arr = obj.splice(-2,-1,2,3); obj[1] === 3. Actual: ' + (obj[1]));\n}\n\n//CHECK#5\nif (obj[2] !== 0) {\n $ERROR('#5: var obj = {0:0,1:1}; obj.length = 2; obj.splice = Array.prototype.splice; var arr = obj.splice(-2,-1,2,3); obj[2] === 0. Actual: ' + (obj[2]));\n}\n\n//CHECK#6\nif (obj[3] !== 1) {\n $ERROR('#6: var obj = {0:0,1:1}; obj.length = 2; obj.splice = Array.prototype.splice; var arr = obj.splice(-2,-1,2,3); obj[3] === 1. Actual: ' + (obj[3]));\n}\n\n//CHECK#7\nif (obj[4] !== undefined) {\n $ERROR('#7: var obj = {0:0,1:1}; obj.length = 2; obj.splice = Array.prototype.splice; var arr = obj.splice(-2,-1,2,3); obj[4] === undefined. Actual: ' + (obj[4]));\n} \n",
+ "id": "S15.4.4.12_A2_T2"
+ },
+ {
+ "section": "15.4.4.12",
+ "description": "If start is positive, use min(start, length).\nIf deleteCount is negative, use 0",
+ "test": "var obj = {0:0,1:1};\nobj.length = 2;\nobj.splice = Array.prototype.splice;\nvar arr = obj.splice(0,-1,2,3);\n\n//CHECK#0\narr.getClass = Object.prototype.toString;\nif (arr.getClass() !== \"[object \" + \"Array\" + \"]\") {\n $ERROR('#0: var obj = {0:0,1:1}; obj.length = 2; obj.splice = Array.prototype.splice; var arr = obj.splice(0,-1,2,3); arr is Array object. Actual: ' + (arr.getClass()));\n}\n\n//CHECK#1\nif (arr.length !== 0) {\n $ERROR('#1: var obj = {0:0,1:1}; obj.length = 2; obj.splice = Array.prototype.splice; var arr = obj.splice(0,-1,2,3); arr.length === 0. Actual: ' + (arr.length));\n} \n\n//CHECK#2\nif (obj.length !== 4) {\n $ERROR('#2: var obj = {0:0,1:1}; obj.length = 2; obj.splice = Array.prototype.splice; var arr = obj.splice(0,-1,2,3); obj.length === 4. Actual: ' + (obj.length));\n} \n\n//CHECK#3\nif (obj[0] !== 2) {\n $ERROR('#3: var obj = {0:0,1:1}; obj.length = 2; obj.splice = Array.prototype.splice; var arr = obj.splice(0,-1,2,3); obj[0] === 2. Actual: ' + (obj[0]));\n}\n\n//CHECK#4\nif (obj[1] !== 3) {\n $ERROR('#4: var obj = {0:0,1:1}; obj.length = 2; obj.splice = Array.prototype.splice; var arr = obj.splice(0,-1,2,3); obj[1] === 3. Actual: ' + (obj[1]));\n}\n\n//CHECK#5\nif (obj[2] !== 0) {\n $ERROR('#5: var obj = {0:0,1:1}; obj.length = 2; obj.splice = Array.prototype.splice; var arr = obj.splice(0,-1,2,3); obj[2] === 0. Actual: ' + (obj[2]));\n}\n\n//CHECK#6\nif (obj[3] !== 1) {\n $ERROR('#6: var obj = {0:0,1:1}; obj.length = 2; obj.splice = Array.prototype.splice; var arr = obj.splice(0,-1,2,3); obj[3] === 1. Actual: ' + (obj[3]));\n}\n\n//CHECK#7\nif (obj[4] !== undefined) {\n $ERROR('#7: var obj = {0:0,1:1}; obj.length = 2; obj.splice = Array.prototype.splice; var arr = obj.splice(0,-1,2,3); obj[4] === undefined. Actual: ' + (obj[4]));\n} \n",
+ "id": "S15.4.4.12_A2_T3"
+ },
+ {
+ "section": "15.4.4.12",
+ "description": "If start is negative, use max(start + length, 0).\nIf deleteCount is positive, use min(deleteCount, length - start)",
+ "test": "var obj = {0:0,1:1,2:2,3:3};\nobj.length = 4;\nobj.splice = Array.prototype.splice;\nvar arr = obj.splice(-4,3,4,5);\n\n//CHECK#1\narr.getClass = Object.prototype.toString;\nif (arr.getClass() !== \"[object \" + \"Array\" + \"]\") {\n $ERROR('#1: var obj = {0:0,1:1,2:2,3:3}; obj.length = 4; obj.splice = Array.prototype.splice; var arr = obj.splice(-4,3,4,5); arr is Array object. Actual: ' + (arr.getClass()));\n}\n\n//CHECK#2\nif (arr.length !== 3) {\n $ERROR('#2: var obj = {0:0,1:1,2:2,3:3}; obj.length = 4; obj.splice = Array.prototype.splice; var arr = obj.splice(-4,3,4,5); arr.length === 3. Actual: ' + (arr.length));\n} \n\n//CHECK#3\nif (arr[0] !== 0) {\n $ERROR('#3: var obj = {0:0,1:1,2:2,3:3}; obj.length = 4; obj.splice = Array.prototype.splice; var arr = obj.splice(-4,3,4,5); arr[0] === 0. Actual: ' + (arr[0]));\n}\n\n//CHECK#4\nif (arr[1] !== 1) {\n $ERROR('#4: var obj = {0:0,1:1,2:2,3:3}; obj.length = 4; obj.splice = Array.prototype.splice; var arr = obj.splice(-4,3,4,5); arr[1] === 1. Actual: ' + (arr[1]));\n} \n\n//CHECK#5\nif (arr[2] !== 2) {\n $ERROR('#5: var obj = {0:0,1:1,2:2,3:3}; obj.length = 4; obj.splice = Array.prototype.splice; var arr = obj.splice(-4,3,4,5); arr[2] === 2. Actual: ' + (arr[2]));\n} \n\n//CHECK#6\nif (obj.length !== 3) {\n $ERROR('#6: var obj = {0:0,1:1,2:2,3:3}; obj.length = 4; obj.splice = Array.prototype.splice; var arr = obj.splice(-4,3,4,5); obj.length === 3. Actual: ' + (obj.length));\n} \n\n//CHECK#7\nif (obj[0] !== 4) {\n $ERROR('#7: var obj = {0:0,1:1,2:2,3:3}; obj.length = 4; obj.splice = Array.prototype.splice; var arr = obj.splice(-4,3,4,5); obj[0] === 4. Actual: ' + (obj[0]));\n}\n\n//CHECK#8\nif (obj[1] !== 5) {\n $ERROR('#8: var obj = {0:0,1:1,2:2,3:3}; obj.length = 4; obj.splice = Array.prototype.splice; var arr = obj.splice(-4,3,4,5); obj[1] === 5. Actual: ' + (obj[1]));\n} \n\n//CHECK#9\nif (obj[2] !== 3) {\n $ERROR('#9: var obj = {0:0,1:1,2:2,3:3}; obj.length = 4; obj.splice = Array.prototype.splice; var arr = obj.splice(-4,3,4,5); obj[2] === 3. Actual: ' + (obj[2]));\n}\n\n//CHECK#10\nif (obj[3] !== undefined) {\n $ERROR('#10: var obj = {0:0,1:1,2:2,3:3}; obj.length = 4; obj.splice = Array.prototype.splice; var arr = obj.splice(-4,3,4,5); obj[3] === undefined. Actual: ' + (obj[3]));\n}\n",
+ "id": "S15.4.4.12_A2_T4"
+ },
+ {
+ "section": "15.4.4.12",
+ "description": "length is arbitrarily",
+ "test": "var obj = {};\nobj.splice = Array.prototype.splice;\nobj[0] = \"x\";\nobj[4294967295] = \"y\";\nobj.length = 4294967296;\nvar arr = obj.splice(4294967295, 1);\n\n//CHECK#1\nif (arr.length !== 0) {\n $ERROR('#1: var obj = {}; obj.splice = Array.prototype.splice; obj[0] = \"x\"; obj[4294967295] = \"y\"; obj.length = 4294967296; var arr = obj.splice(4294967295,1); arr.length === 0. Actual: ' + (arr.length));\n}\n\n//CHECK#2\nif (obj.length !== 0) {\n $ERROR('#2: var obj = {}; obj.splice = Array.prototype.splice; obj[0] = \"x\"; obj[4294967295] = \"y\"; obj.length = 4294967296; var arr = obj.splice(4294967295,1); obj.length === 0. Actual: ' + (obj.length));\n}\n\n//CHECK#3\nif (obj[0] !== \"x\") {\n $ERROR('#3: var obj = {}; obj.splice = Array.prototype.splice; obj[0] = \"x\"; obj[4294967295] = \"y\"; obj.length = 4294967296; var arr = obj.splice(4294967295,1); obj[0] === \"x\". Actual: ' + (obj[0]));\n} \n\n//CHECK#4\nif (obj[4294967295] !== \"y\") {\n $ERROR('#4: var obj = {}; obj.splice = Array.prototype.splice; obj[0] = \"x\"; obj[4294967295] = \"y\"; obj.length = 4294967296; var arr = obj.splice(4294967295,1); obj[4294967295] === \"y\". Actual: ' + (obj[4294967295]));\n} \n",
+ "id": "S15.4.4.12_A3_T1"
+ },
+ {
+ "section": "15.4.4.12",
+ "description": "length is arbitrarily",
+ "test": "var obj = {};\nobj.splice = Array.prototype.splice;\nobj[0] = \"x\";\nobj.length = 4294967297;\nvar arr = obj.splice(0,1);\n\n//CHECK#1\nif (arr.length !== 1) {\n $ERROR('#1: var obj = {}; obj.splice = Array.prototype.splice; obj[0] = \"x\"; obj[0] = \"y\"; obj.length = 4294967297; var arr = obj.splice(0,1); arr.length === 1. Actual: ' + (arr.length));\n}\n\n//CHECK#2\nif (arr[0] !== \"x\") {\n $ERROR('#2: var obj = {}; obj.splice = Array.prototype.splice; obj[0] = \"x\"; obj[0] = \"y\"; obj.length = 1; var arr = obj.splice(0,1); arr[0] === \"x\". Actual: ' + (arr[0]));\n} \n\n//CHECK#3\nif (obj.length !== 0) {\n $ERROR('#3: var obj = {}; obj.splice = Array.prototype.splice; obj[0] = \"x\"; obj[0] = \"y\"; obj.length = 1; var arr = obj.splice(0,1); obj.length === 0. Actual: ' + (obj.length));\n}\n\n//CHECK#4\nif (obj[0] !== undefined) {\n $ERROR('#4: var obj = {}; obj.splice = Array.prototype.splice; obj[0] = \"x\"; obj[0] = \"y\"; obj.length = 1; var arr = obj.splice(0,1); obj[0] === undefined. Actual: ' + (obj[0]));\n} \n",
+ "id": "S15.4.4.12_A3_T2"
+ },
+ {
+ "section": "15.4.4.12",
+ "description": "length is arbitrarily",
+ "test": "var obj = {};\nobj.splice = Array.prototype.splice;\nobj[4294967294] = \"x\";\nobj.length = -1;\nvar arr = obj.splice(4294967294,1);\n\n//CHECK#1\nif (arr.length !== 1) {\n $ERROR('#1: var obj = {}; obj.splice = Array.prototype.splice; obj[4294967294] = \"x\"; obj.length = -1; var arr = obj.splice(4294967294,1); arr.length === 1. Actual: ' + (arr.length));\n}\n\n//CHECK#2\nif (arr[0] !== \"x\") {\n $ERROR('#2: var obj = {}; obj.splice = Array.prototype.splice; obj[4294967294] = \"x\"; obj.length = 1; var arr = obj.splice(4294967294,1); arr[0] === \"x\". Actual: ' + (arr[0]));\n} \n\n//CHECK#3\nif (obj.length !== 4294967294) {\n $ERROR('#3: var obj = {}; obj.splice = Array.prototype.splice; obj[4294967294] = \"x\"; obj.length = 1; var arr = obj.splice(4294967294,1); obj.length === 4294967294. Actual: ' + (obj.length));\n}\n\n//CHECK#4\nif (obj[4294967294] !== undefined) {\n $ERROR('#4: var obj = {}; obj.splice = Array.prototype.splice; obj[4294967294] = \"x\"; obj.length = 1; var arr = obj.splice(4294967294,1); obj[4294967294] === undefined. Actual: ' + (obj[4294967294]));\n} \n",
+ "id": "S15.4.4.12_A3_T3"
+ },
+ {
+ "section": "15.4.4.12, 8.6.2.1",
+ "description": "[[Prototype]] of Array instance is Array.prototype, [[Prototype] of Array.prototype is Object.prototype",
+ "test": "Array.prototype[1] = -1;\nvar x = [0,1];\nvar arr = x.splice(1,1);\n\n//CHECK#1\nif (arr.length !== 1) { \n $ERROR('#1: Array.prototype[1] = -1; x = [0,1]; var arr = x.splice(1,1); arr.length === 1. Actual: ' + (arr.length)); \n}\n\n//CHECK#2\nif (arr[0] !== 1) { \n $ERROR('#2: Array.prototype[1] = -1; x = [0,1]; var arr = x.splice(1,1); arr[0] === 1. Actual: ' + (arr[0])); \n}\n\n//CHECK#3\nif (arr[1] !== -1) { \n $ERROR('#3: Array.prototype[1] = -1; x = [0,1]; var arr = x.splice(1,1); arr[1] === -1. Actual: ' + (arr[1])); \n}\n\n//CHECK#4\nif (x.length !== 1) { \n $ERROR('#4: Array.prototype[1] = -1; x = [0,1]; var arr = x.splice(1,1); x.length === 1. Actual: ' + (x.length)); \n}\n\n//CHECK#5\nif (x[0] !== 0) { \n $ERROR('#5: Array.prototype[1] = -1; x = [0,1]; var arr = x.splice(1,1); x[0] === 0. Actual: ' + (x[0])); \n}\n\n//CHECK#6\nif (x[1] !== -1) { \n $ERROR('#6: Array.prototype[1] = -1; x = [0,1]; var arr = x.splice(1,1); x[1] === -1. Actual: ' + (x[1])); \n}\n\n\nObject.prototype[1] = -1;\nObject.prototype.length = 2;\nObject.prototype.splice = Array.prototype.splice;\nx = {0:0, 1:1};\nvar arr = x.splice(1,1);\n\n//CHECK#7\nif (arr.length !== 1) { \n $ERROR('#7: Object.prototype[1] = -1; Object.prototype.length = 2; Object.prototype.splice = Array.prototype.splice; x = {0:0, 1:1}; var arr = x.splice(1,1); arr.length === 1. Actual: ' + (arr.length)); \n}\n\n//CHECK#8\nif (arr[0] !== 1) { \n $ERROR('#8: Object.prototype[1] = -1; Object.prototype.length = 2; Object.prototype.splice = Array.prototype.splice; x = {0:0, 1:1}; var arr = x.splice(1,1); arr[0] === 1. Actual: ' + (arr[0])); \n}\n\n//CHECK#9\nif (arr[1] !== -1) { \n $ERROR('#9: Object.prototype[1] = -1; Object.prototype.length = 2; Object.prototype.splice = Array.prototype.splice; x = {0:0, 1:1}; var arr = x.splice(1,1); arr[1] === -1. Actual: ' + (arr[1])); \n}\n\n//CHECK#10\nif (x.length !== 1) { \n $ERROR('#10: Object.prototype[1] = -1; Object.prototype.length = 2; Object.prototype.splice = Array.prototype.splice; x = {0:0, 1:1}; var arr = x.splice(1,1); x.length === 1. Actual: ' + (x.length)); \n}\n\n//CHECK#11\nif (x[0] !== 0) { \n $ERROR('#11: Object.prototype[1] = -1; Object.prototype.length = 2; Object.prototype.splice = Array.prototype.splice; x = {0:0, 1:1}; var arr = x.splice(1,1); x[0] === 0. Actual: ' + (x[0])); \n}\n\n//CHECK#12\nif (x[1] !== -1) { \n $ERROR('#12: Object.prototype[1] = -1; Object.prototype.length = 2; Object.prototype.splice = Array.prototype.splice; x = {0:0, 1:1}; var arr = x.splice(1,1); x[1] === -1. Actual: ' + (x[1])); \n}\n",
+ "id": "S15.4.4.12_A4_T1"
+ },
+ {
+ "section": "15.4.4.12, 8.6.2.1",
+ "description": "[[Prototype]] of Array instance is Array.prototype, [[Prototype] of Array.prototype is Object.prototype",
+ "test": "Array.prototype[1] = -1;\nvar x = [0,1];\nvar arr = x.splice(1,1,2);\n\n//CHECK#1\nif (arr.length !== 1) { \n $ERROR('#1: Array.prototype[1] = -1; x = [0,1]; var arr = x.splice(1,1,2); arr.length === 1. Actual: ' + (arr.length)); \n}\n\n//CHECK#2\nif (arr[0] !== 1) { \n $ERROR('#2: Array.prototype[1] = -1; x = [0,1]; var arr = x.splice(1,1,2); arr[0] === 1. Actual: ' + (arr[0])); \n}\n\n//CHECK#3\nif (arr[1] !== -1) { \n $ERROR('#3: Array.prototype[1] = -1; x = [0,1]; var arr = x.splice(1,1,2); arr[1] === -1. Actual: ' + (arr[1])); \n}\n\n//CHECK#4\nif (x.length !== 2) { \n $ERROR('#4: Array.prototype[1] = -1; x = [0,1]; var arr = x.splice(1,1,2); x.length === 2. Actual: ' + (x.length)); \n}\n\n//CHECK#5\nif (x[0] !== 0) { \n $ERROR('#5: Array.prototype[1] = -1; x = [0,1]; var arr = x.splice(1,1,2); x[0] === 0. Actual: ' + (x[0])); \n}\n\n//CHECK#6\nif (x[1] !== 2) { \n $ERROR('#6: Array.prototype[1] = -1; x = [0,1]; var arr = x.splice(1,1,2); x[1] === 2. Actual: ' + (x[1])); \n}\n\n\nObject.prototype[1] = -1;\nObject.prototype.length = 2;\nObject.prototype.splice = Array.prototype.splice;\nx = {0:0, 1:1};\nvar arr = x.splice(1,1,2);\n\n//CHECK#7\nif (arr.length !== 1) { \n $ERROR('#7: Object.prototype[1] = -1; Object.prototype.length = 2; Object.prototype.splice = Array.prototype.splice; x = {0:0, 1:1}; var arr = x.splice(1,1,2); arr.length === 1. Actual: ' + (arr.length)); \n}\n\n//CHECK#8\nif (arr[0] !== 1) { \n $ERROR('#8: Object.prototype[1] = -1; Object.prototype.length = 2; Object.prototype.splice = Array.prototype.splice; x = {0:0, 1:1}; var arr = x.splice(1,1,2); arr[0] === 1. Actual: ' + (arr[0])); \n}\n\n//CHECK#9\nif (arr[1] !== -1) { \n $ERROR('#9: Object.prototype[1] = -1; Object.prototype.length = 2; Object.prototype.splice = Array.prototype.splice; x = {0:0, 1:1}; var arr = x.splice(1,1,2); arr[1] === -1. Actual: ' + (arr[1])); \n}\n\n//CHECK#10\nif (x.length !== 2) { \n $ERROR('#10: Object.prototype[1] = -1; Object.prototype.length = 2; Object.prototype.splice = Array.prototype.splice; x = {0:0, 1:1}; var arr = x.splice(1,1,2); x.length === 2. Actual: ' + (x.length)); \n}\n\n//CHECK#11\nif (x[0] !== 0) { \n $ERROR('#11: Object.prototype[1] = -1; Object.prototype.length = 2; Object.prototype.splice = Array.prototype.splice; x = {0:0, 1:1}; var arr = x.splice(1,1,2); x[0] === 0. Actual: ' + (x[0])); \n}\n\n//CHECK#12\nif (x[1] !== 2) { \n $ERROR('#12: Object.prototype[1] = -1; Object.prototype.length = 2; Object.prototype.splice = Array.prototype.splice; x = {0:0, 1:1}; var arr = x.splice(1,1,2); x[1] === 2. Actual: ' + (x[1])); \n}\n",
+ "id": "S15.4.4.12_A4_T2"
+ },
+ {
+ "section": "15.4.4.12, 8.6.2.1",
+ "description": "[[Prototype]] of Array instance is Array.prototype, [[Prototype] of Array.prototype is Object.prototype",
+ "test": "Array.prototype[0] = -1;\nvar x = [];\nx.length = 1;\nvar arr = x.splice(0,1);\n\n//CHECK#1\nif (arr.length !== 1) { \n $ERROR('#1: Array.prototype[0] = -1; x = []; x.length = 1; var arr = x.splice(0,1); arr.length === 1. Actual: ' + (arr.length)); \n}\n\n//CHECK#2\nif (arr[0] !== -1) { \n $ERROR('#2: Array.prototype[0] = -1; x = []; x.length = 1; var arr = x.splice(0,1); arr[0] === -1. Actual: ' + (arr[0])); \n}\n\ndelete arr[0];\n\n//CHECK#3\nif (arr[0] !== -1) { \n $ERROR('#3: Array.prototype[0] = -1; x = []; x.length = 1; var arr = x.splice(0,1); delete arr[0]; arr[0] === -1. Actual: ' + (arr[0])); \n}\n\n//CHECK#4\nif (x.length !== 0) { \n $ERROR('#4: Array.prototype[0] = -1; x = []; x.length = 1; var arr = x.splice(0,1); x.length === 0. Actual: ' + (x.length)); \n}\n\n//CHECK#5\nif (x[0] !== -1) { \n $ERROR('#5: Array.prototype[0] = -1; x = []; x.length = 1; var arr = x.splice(0,1); x[0] === -1. Actual: ' + (x[0])); \n}\n\nObject.prototype[0] = -1;\nObject.prototype.length = 1;\nObject.prototype.splice = Array.prototype.splice;\nx = {};\nvar arr = x.splice(0,1);\n\n//CHECK#6\nif (arr.length !== 1) { \n $ERROR('#6: Object.prototype[0] = -1; Object.prototype.length = 1; Object.prototype.splice = Array.prototype.splice; x = {}; var arr = x.splice(0,1); arr.length === 1. Actual: ' + (arr.length)); \n}\n\n//CHECK#7\nif (arr[0] !== -1) { \n $ERROR('#7: Object.prototype[0] = -1; Object.prototype.length = 1; Object.prototype.splice = Array.prototype.splice; x = {}; var arr = x.splice(0,1); arr[0] === -1. Actual: ' + (arr[0])); \n}\n\ndelete arr[0];\n\n//CHECK#8\nif (arr[0] !== -1) { \n $ERROR('#8: Object.prototype[0] = -1; Object.prototype.length = 1; Object.prototype.splice = Array.prototype.splice; x = {}; var arr = x.splice(0,1); delete arr[0]; arr[0] === -1. Actual: ' + (arr[0])); \n}\n\n//CHECK#9\nif (x.length !== 0) { \n $ERROR('#9: Object.prototype[0] = -1; Object.prototype.length = 1; Object.prototype.splice = Array.prototype.splice; x = {}; var arr = x.splice(0,1); x.length === 0. Actual: ' + (x.length)); \n}\n\n//CHECK#10\nif (x[0] !== -1) { \n $ERROR('#10: Object.prototype[0] = -1; Object.prototype.length = 1; Object.prototype.splice = Array.prototype.splice; x = {}; var arr = x.splice(0,1); x[0] === -1. Actual: ' + (x[0])); \n}\n",
+ "id": "S15.4.4.12_A4_T3"
+ },
+ {
+ "section": "15.4.4.12, 15.2.4.7, 12.6.4",
+ "description": "Checking use propertyIsEnumerable, for-in",
+ "test": "//CHECK#1\nif (Array.prototype.splice.propertyIsEnumerable('length') !== false) {\n $ERROR('#1: Array.prototype.splice.propertyIsEnumerable(\\'length\\') === false. Actual: ' + (Array.prototype.splice.propertyIsEnumerable('length')));\n}\n\n//CHECK#2\nvar result = true;\nfor (var p in Array.splice){\n if (p === \"length\") {\n result = false;\n } \n}\n\nif (result !== true) {\n $ERROR('#2: result = true; for (p in Array.splice) { if (p === \"length\") result = false; } result === true;');\n}\n\n",
+ "id": "S15.4.4.12_A5.1"
+ },
+ {
+ "section": "15.4.4.12, 15.2.4.5, 11.4.1",
+ "description": "Checking use hasOwnProperty, delete",
+ "strict_mode_negative": "",
+ "test": "//CHECK#1\nif (Array.prototype.splice.hasOwnProperty('length') !== true) {\n $FAIL('#1: Array.prototype.splice.hasOwnProperty(\\'length\\') === true. Actual: ' + (Array.prototype.splice.hasOwnProperty('length')));\n}\n\ndelete Array.prototype.splice.length;\n\n//CHECK#2\nif (Array.prototype.splice.hasOwnProperty('length') !== true) {\n $ERROR('#2: delete Array.prototype.splice.length; Array.prototype.splice.hasOwnProperty(\\'length\\') === true. Actual: ' + (Array.prototype.splice.hasOwnProperty('length')));\n}\n\n//CHECK#3\nif (Array.prototype.splice.length === undefined) {\n $ERROR('#3: delete Array.prototype.splice.length; Array.prototype.splice.length !== undefined');\n}\n\n\n",
+ "id": "S15.4.4.12_A5.2",
+ "strict_only": ""
+ },
+ {
+ "section": "15.4.4.12",
+ "description": "Checking if varying the length property fails",
+ "strict_mode_negative": "",
+ "test": "//CHECK#1\nvar x = Array.prototype.splice.length;\nArray.prototype.splice.length = Infinity;\nif (Array.prototype.splice.length !== x) {\n $ERROR('#1: x = Array.prototype.splice.length; Array.prototype.splice.length = Infinity; Array.prototype.splice.length === x. Actual: ' + (Array.prototype.splice.length));\n}\n\n",
+ "id": "S15.4.4.12_A5.3",
+ "strict_only": ""
+ },
+ {
+ "section": "15.4.4.12",
+ "description": "splice.length === 1",
+ "test": "//CHECK#1\nif (Array.prototype.splice.length !== 2) {\n $ERROR('#1: Array.prototype.splice.length === 2. Actual: ' + (Array.prototype.splice.length));\n}\n\n",
+ "id": "S15.4.4.12_A5.4"
+ },
+ {
+ "section": "15.4.4.12, 15.2.4.7, 12.6.4",
+ "description": "Checking use propertyIsEnumerable, for-in",
+ "test": "//CHECK#1\nif (Array.propertyIsEnumerable('splice') !== false) {\n $ERROR('#1: Array.propertyIsEnumerable(\\'splice\\') === false. Actual: ' + (Array.propertyIsEnumerable('splice')));\n}\n\n//CHECK#2\nvar result = true;\nfor (var p in Array){\n if (p === \"splice\") {\n result = false;\n } \n}\n\nif (result !== true) {\n $ERROR('#2: result = true; for (p in Array) { if (p === \"splice\") result = false; } result === true;');\n}\n\n",
+ "id": "S15.4.4.12_A5.5"
+ },
+ {
+ "section": "15.4.4.12",
+ "description": "Checking Array.prototype.splice.prototype",
+ "test": "//CHECK#1\nif (Array.prototype.splice.prototype !== undefined) {\n $ERROR('#1: Array.prototype.splice.prototype === undefined. Actual: ' + (Array.prototype.splice.prototype));\n}\n",
+ "id": "S15.4.4.12_A5.6"
+ },
+ {
+ "section": "15.4.4.12, 11.2.2",
+ "description": "If property does not implement the internal [[Construct]] method, throw a TypeError exception",
+ "test": "//CHECK#1\n\ntry {\n new Array.prototype.splice();\n $ERROR('#1.1: new Array.prototype.splice() throw TypeError. Actual: ' + (new Array.prototype.splice()));\n} catch (e) {\n if ((e instanceof TypeError) !== true) {\n $ERROR('#1.2: new Array.prototype.splice() throw TypeError. Actual: ' + (e));\n }\n}\n",
+ "id": "S15.4.4.12_A5.7"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.4.4.13_Array_prototype_unshift.json b/website/resources/scripts/testcases2/15.4.4.13_Array_prototype_unshift.json
new file mode 100644
index 000000000..e0be233d6
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.4.4.13_Array_prototype_unshift.json
@@ -0,0 +1,114 @@
+{
+ "testCollection": {
+ "name": "15.4.4.13_Array_prototype_unshift",
+ "numTests": 17,
+ "tests": [
+ {
+ "section": "15.4.4.13",
+ "description": "Checking case when unsift is given no arguments or one argument",
+ "test": "//CHECK#1\nvar x = new Array();\nvar unshift = x.unshift(1);\nif (unshift !== 1) {\n $ERROR('#1: x = new Array(); x.unshift(1) === 1. Actual: ' + (unshift));\n} \n\n//CHECK#2\nif (x[0] !== 1) {\n $ERROR('#2: x = new Array(); x.unshift(1); x[0] === 1. Actual: ' + (x[0]));\n}\n\n//CHECK#3\nvar unshift = x.unshift();\nif (unshift !== 1) {\n $ERROR('#3: x = new Array(); x.unshift(1); x.unshift() === 1. Actual: ' + (unshift));\n}\n\n//CHECK#4\nif (x[1] !== undefined) {\n $ERROR('#4: x = new Array(); x.unshift(1); x.unshift(); x[1] === unedfined. Actual: ' + (x[1]));\n}\n\n//CHECK#5\nvar unshift = x.unshift(-1);\nif (unshift !== 2) {\n $ERROR('#5: x = new Array(); x.unshift(1); x.unshift(); x.unshift(-1) === 2. Actual: ' + (unshift));\n}\n\n//CHECK#6\nif (x[0] !== -1) {\n $ERROR('#6: x = new Array(); x.unshift(1); x.unshift(-1); x[0] === -1. Actual: ' + (x[0]));\n}\n\n//CHECK#7\nif (x[1] !== 1) {\n $ERROR('#7: x = new Array(); x.unshift(1); x.unshift(-1); x[1] === 1. Actual: ' + (x[1]));\n}\n\n//CHECK#8\nif (x.length !== 2) {\n $ERROR('#8: x = new Array(); x.unshift(1); x.unshift(); x.unshift(-1); x.length === 2. Actual: ' + (x.length));\n} \n",
+ "id": "S15.4.4.13_A1_T1"
+ },
+ {
+ "section": "15.4.4.13",
+ "description": "Checking case when unsift is given many arguments",
+ "test": "//CHECK#1\nvar x = [];\nif (x.length !== 0) {\n $ERROR('#1: x = []; x.length === 0. Actual: ' + (x.length));\n}\n\n//CHECK#2\nx[0] = 0;\nvar unshift = x.unshift(true, Number.POSITIVE_INFINITY, \"NaN\", \"1\", -1);\nif (unshift !== 6) {\n $ERROR('#2: x = []; x[0] = 0; x.unshift(true, Number.POSITIVE_INFINITY, \"NaN\", \"1\", -1) === 6. Actual: ' + (unshift));\n} \n\n//CHECK#3\nif (x[5] !== 0) {\n $ERROR('#3: x = []; x[0] = 0; x.unshift(true, Number.POSITIVE_INFINITY, \"NaN\", \"1\", -1); x[5] === 0. Actual: ' + (x[5]));\n}\n\n//CHECK#4\nif (x[0] !== true) {\n $ERROR('#4: x = []; x[0] = 0; x.unshift(true, Number.POSITIVE_INFINITY, \"NaN\", \"1\", -1); x[0] === true. Actual: ' + (x[0]));\n}\n\n//CHECK#5\nif (x[1] !== Number.POSITIVE_INFINITY) {\n $ERROR('#5: x = []; x[0] = 0; x.unshift(true, Number.POSITIVE_INFINITY, \"NaN\", \"1\", -1); x[1] === Number.POSITIVE_INFINITY. Actual: ' + (x[1]));\n} \n\n//CHECK#6\nif (x[2] !== \"NaN\") {\n $ERROR('#6: x = []; x[0] = 0; x.unshift(true, Number.POSITIVE_INFINITY, \"NaN\", \"1\", -1); x[2] === \"NaN\". Actual: ' + (x[2]));\n} \n\n//CHECK#7\nif (x[3] !== \"1\") {\n $ERROR('#7: x = []; x[0] = 0; x.unshift(true, Number.POSITIVE_INFINITY, \"NaN\", \"1\", -1); x[3] === \"1\". Actual: ' + (x[3]));\n}\n\n//CHECK#8\nif (x[4] !== -1) {\n $ERROR('#8: x = []; x[0] = 0; x.unshift(true, Number.POSITIVE_INFINITY, \"NaN\", \"1\", -1); x[4] === -1. Actual: ' + (x[4]));\n}\n\n//CHECK#9\nif (x.length !== 6) {\n $ERROR('#9: x = []; x[0] = 0; x.unshift(true, Number.POSITIVE_INFINITY, \"NaN\", \"1\", -1); x.length === 6. Actual: ' + (x.length));\n}\n",
+ "id": "S15.4.4.13_A1_T2"
+ },
+ {
+ "section": "15.4.4.13",
+ "description": "The arguments are prepended to the start of the array, such that\ntheir order within the array is the same as the order in which they appear in\nthe argument list",
+ "test": "var obj = {};\nobj.unshift = Array.prototype.unshift;\n\nif (obj.length !== undefined) {\n $ERROR('#0: var obj = {}; obj.length === undefined. Actual: ' + (obj.length));\n} else {\n //CHECK#1\n var unshift = obj.unshift(-1); \n if (unshift !== 1) {\n $ERROR('#1: var obj = {}; obj.unshift = Array.prototype.unshift; obj.unshift(-1) === 1. Actual: ' + (unshift));\n }\n //CHECK#2\n if (obj.length !== 1) {\n $ERROR('#2: var obj = {}; obj.unshift = Array.prototype.unshift; obj.unshift(-1); obj.length === 1. Actual: ' + (obj.length));\n }\n //CHECK#3\n if (obj[\"0\"] !== -1) {\n $ERROR('#3: var obj = {}; obj.unshift = Array.prototype.unshift; obj.unshift(-1); obj[\"0\"] === -1. Actual: ' + (obj[\"0\"]));\n }\n} \n\n//CHECK#4\nobj.length = undefined;\nvar unshift = obj.unshift(-4);\nif (unshift !== 1) {\n $ERROR('#4: var obj = {}; obj.length = undefined; obj.unshift = Array.prototype.unshift; obj.unshift(-4) === 1. Actual: ' + (unshift));\n} \n\n//CHECK#5\nif (obj.length !== 1) {\n $ERROR('#5: var obj = {}; obj.length = undefined; obj.unshift = Array.prototype.unshift; obj.unshift(-4); obj.length === 1. Actual: ' + (obj.length));\n}\n\n//CHECK#6\nif (obj[\"0\"] !== -4) {\n $ERROR('#6: var obj = {}; obj.length = undefined; obj.unshift = Array.prototype.unshift; obj.unshift(-4); obj[\"0\"] === -4. Actual: ' + (obj[\"0\"]));\n}\n\n//CHECK#7\nobj.length = null\nvar unshift = obj.unshift(-7);\nif (unshift !== 1) {\n $ERROR('#7: var obj = {}; obj.length = null; obj.unshift = Array.prototype.unshift; obj.unshift(-7) === 1. Actual: ' + (unshift));\n} \n\n//CHECK#8\nif (obj.length !== 1) {\n $ERROR('#8: var obj = {}; obj.length = null; obj.unshift = Array.prototype.unshift; obj.unshift(-7); obj.length === 1. Actual: ' + (obj.length));\n}\n\n//CHECK#9\nif (obj[\"0\"] !== -7) {\n $ERROR('#9: var obj = {}; obj.length = null; obj.unshift = Array.prototype.unshift; obj.unshift(-7); obj[\"0\"] === -7. Actual: ' + (obj[\"0\"]));\n}\n",
+ "id": "S15.4.4.13_A2_T1"
+ },
+ {
+ "section": "15.4.4.13",
+ "description": "The arguments are prepended to the start of the array, such that\ntheir order within the array is the same as the order in which they appear in\nthe argument list",
+ "test": "var obj = {};\nobj.unshift = Array.prototype.unshift;\n\n//CHECK#1\nobj.length = NaN;\nvar unshift = obj.unshift(-1);\nif (unshift !== 1) {\n $ERROR('#1: var obj = {}; obj.length = NaN; obj.unshift = Array.prototype.unshift; obj.unshift(-1) === 1. Actual: ' + (unshift));\n}\n\n//CHECK#2\nif (obj.length !== 1) {\n $ERROR('#2: var obj = {}; obj.length = NaN; obj.unshift = Array.prototype.unshift; obj.unshift(-1); obj.length === 1. Actual: ' + (obj.length));\n}\n\n//CHECK#3\nif (obj[\"0\"] !== -1) {\n $ERROR('#3: var obj = {}; obj.length = NaN; obj.unshift = Array.prototype.unshift; obj.unshift(-1); obj[\"0\"] === -1. Actual: ' + (obj[\"0\"]));\n}\n\n//CHECK#4\nobj.length = Number.POSITIVE_INFINITY;\nvar unshift = obj.unshift(-4);\nif (unshift !== 1) {\n $ERROR('#4: var obj = {}; obj.length = Number.POSITIVE_INFINITY; obj.unshift = Array.prototype.unshift; obj.unshift(-4) === 1. Actual: ' + (unshift));\n}\n\n//CHECK#5\nif (obj.length !== 1) {\n $ERROR('#6: var obj = {}; obj.length = Number.POSITIVE_INFINITY; obj.unshift = Array.prototype.unshift; obj.unshift(-4); obj.length === 1. Actual: ' + (obj.length));\n}\n\n//CHECK#6\nif (obj[\"0\"] !== -4) {\n $ERROR('#6: var obj = {}; obj.length = Number.POSITIVE_INFINITY; obj.unshift = Array.prototype.unshift; obj.unshift(-4); obj[\"0\"] === -4. Actual: ' + (obj[\"0\"]));\n}\n\n//CHECK#7\nobj.length = Number.NEGATIVE_INFINITY;\nvar unshift = obj.unshift(-7);\nif (unshift !== 1) {\n $ERROR('#7: var obj = {}; obj.length = Number.NEGATIVE_INFINITY; obj.unshift = Array.prototype.unshift; obj.unshift(-7) === 1. Actual: ' + (unshift));\n}\n\n//CHECK#8\nif (obj.length !== 1) {\n $ERROR('#8: var obj = {}; obj.length = Number.NEGATIVE_INFINITY; obj.unshift = Array.prototype.unshift; obj.unshift(-7); obj.length === 1. Actual: ' + (obj.length));\n}\n\n//CHECK#9\nif (obj[\"0\"] !== -7) {\n $ERROR('#9: var obj = {}; obj.length = Number.NEGATIVE_INFINITY; obj.unshift = Array.prototype.unshift; obj.unshift(-7); obj[\"0\"] === -7. Actual: ' + (obj[\"0\"]));\n}\n\n//CHECK#10\nobj.length = 0.5;\nvar unshift = obj.unshift(-10);\nif (unshift !== 1) {\n $ERROR('#10: var obj = {}; obj.length = 0.5; obj.unshift = Array.prototype.unshift; obj.unshift(-10) === 1. Actual: ' + (unshift));\n}\n\n//CHECK#11\nif (obj.length !== 1) {\n $ERROR('#11: var obj = {}; obj.length = 0.5; obj.unshift = Array.prototype.unshift; obj.unshift(-10); obj.length === 1. Actual: ' + (obj.length));\n} \n\n//CHECK#12\nif (obj[\"0\"] !== -10) {\n $ERROR('#12: var obj = {}; obj.length = 0.5; obj.unshift = Array.prototype.unshift; obj.unshift(-10); obj[\"0\"] === -10. Actual: ' + (obj[\"0\"]));\n}\n\n//CHECK#13\nobj.length = 1.5;\nvar unshift = obj.unshift(-13);\nif (unshift !== 2) {\n $ERROR('#13: var obj = {}; obj.length = 1.5; obj.unshift = Array.prototype.unshift; obj.unshift(-13) === 2. Actual: ' + (unshift));\n}\n\n//CHECK#14\nif (obj.length !== 2) {\n $ERROR('#14: var obj = {}; obj.length = 1.5; obj.unshift = Array.prototype.unshift; obj.unshift(-13); obj.length === 2. Actual: ' + (obj.length));\n} \n\n//CHECK#15\nif (obj[\"0\"] !== -13) {\n $ERROR('#15: var obj = {}; obj.length = 1.5; obj.unshift = Array.prototype.unshift; obj.unshift(-13); obj[\"0\"] === -13. Actual: ' + (obj[\"0\"]));\n}\n\n//CHECK#16\nobj.length = new Number(0);\nvar unshift = obj.unshift(-16);\nif (unshift !== 1) {\n $ERROR('#16: var obj = {}; obj.length = new Number(0); obj.unshift = Array.prototype.unshift; obj.unshift(-16) === 1. Actual: ' + (unshift));\n}\n\n//CHECK#17\nif (obj.length !== 1) {\n $ERROR('#17: var obj = {}; obj.length = new Number(0); obj.unshift = Array.prototype.unshift; obj.unshift(-16); obj.length === 1. Actual: ' + (obj.length));\n}\n\n//CHECK#18\nif (obj[\"0\"] !== -16) {\n $ERROR('#18: var obj = {}; obj.length = new Number(0); obj.unshift = Array.prototype.unshift; obj.unshift(-16); obj[\"0\"] === -16. Actual: ' + (obj[\"0\"]));\n} \n",
+ "id": "S15.4.4.13_A2_T2"
+ },
+ {
+ "section": "15.4.4.13",
+ "description": "Operator use ToNumber from length.\nIf Type(value) is Object, evaluate ToPrimitive(value, Number)",
+ "test": "var obj = {};\nobj.unshift = Array.prototype.unshift;\n\n//CHECK#1\nobj.length = {valueOf: function() {return 3}};\nvar unshift = obj.unshift();\nif (unshift !== 3) {\n $ERROR('#1: obj.length = {valueOf: function() {return 3}} obj.unshift() === 3. Actual: ' + (unshift));\n}\n\n//CHECK#2\nobj.length = {valueOf: function() {return 3}, toString: function() {return 1}};\nvar unshift = obj.unshift();\nif (unshift !== 3) {\n $ERROR('#0: obj.length = {valueOf: function() {return 3}, toString: function() {return 1}} obj.unshift() === 3. Actual: ' + (unshift));\n} \n\n//CHECK#3\nobj.length = {valueOf: function() {return 3}, toString: function() {return {}}};\nvar unshift = obj.unshift();\nif (unshift !== 3) {\n $ERROR('#1: obj.length = {valueOf: function() {return 3}, toString: function() {return {}}} obj.unshift() === 3. Actual: ' + (unshift));\n}\n\n//CHECK#4\ntry { \n obj.length = {valueOf: function() {return 3}, toString: function() {throw \"error\"}};\n var unshift = obj.unshift(); \n if (unshift !== 3) {\n $ERROR('#4.1: obj.length = {valueOf: function() {return 3}, toString: function() {throw \"error\"}}; obj.unshift() === \",\". Actual: ' + (unshift));\n }\n}\ncatch (e) {\n if (e === \"error\") {\n $ERROR('#4.2: obj.length = {valueOf: function() {return 3}, toString: function() {throw \"error\"}}; obj.unshift() not throw \"error\"');\n } else {\n $ERROR('#4.3: obj.length = {valueOf: function() {return 3}, toString: function() {throw \"error\"}}; obj.unshift() not throw Error. Actual: ' + (e));\n }\n}\n\n//CHECK#5\nobj.length = {toString: function() {return 1}};\nvar unshift = obj.unshift(); \nif (unshift !== 1) {\n $ERROR('#5: obj.length = {toString: function() {return 1}} obj.unshift() === 1. Actual: ' + (unshift));\n}\n\n//CHECK#6\nobj.length = {valueOf: function() {return {}}, toString: function() {return 1}}\nvar unshift = obj.unshift(); \nif (unshift !== 1) {\n $ERROR('#6: obj.length = {valueOf: function() {return {}}, toString: function() {return 1}} obj.unshift() === 1. Actual: ' + (unshift));\n}\n\n//CHECK#7\ntry {\n \n obj.length = {valueOf: function() {throw \"error\"}, toString: function() {return 1}}; \n var unshift = obj.unshift();\n $ERROR('#7.1: obj.length = {valueOf: function() {throw \"error\"}, toString: function() {return 1}}; obj.unshift() throw \"error\". Actual: ' + (unshift));\n} \ncatch (e) {\n if (e !== \"error\") {\n $ERROR('#7.2: obj.length = {valueOf: function() {throw \"error\"}, toString: function() {return 1}}; obj.unshift() throw \"error\". Actual: ' + (e));\n } \n}\n\n//CHECK#8\ntry {\n \n obj.length = {valueOf: function() {return {}}, toString: function() {return {}}};\n var unshift = obj.unshift();\n $ERROR('#8.1: obj.length = {valueOf: function() {return {}}, toString: function() {return {}}} obj.unshift() throw TypeError. Actual: ' + (unshift));\n} \ncatch (e) {\n if ((e instanceof TypeError) !== true) {\n $ERROR('#8.2: obj.length = {valueOf: function() {return {}}, toString: function() {return {}}} obj.unshift() throw TypeError. Actual: ' + (e));\n } \n}\n",
+ "id": "S15.4.4.13_A2_T3"
+ },
+ {
+ "section": "15.4.4.13",
+ "description": "length = 4294967296",
+ "test": "var obj = {};\nobj.unshift = Array.prototype.unshift;\nobj.length = 4294967296;\n\n//CHECK#1\nvar unshift = obj.unshift(\"x\", \"y\", \"z\");\nif (unshift !== 3) {\n $ERROR('#1: var obj = {}; obj.unshift = Array.prototype.unshift; obj.length = 4294967296; obj.unshift(\"x\", \"y\", \"z\") === 3. Actual: ' + (unshift));\n}\n\n//CHECK#2\nif (obj.length !== 3) {\n $ERROR('#2: var obj = {}; obj.unshift = Array.prototype.unshift; obj.length = 4294967296; obj.unshift(\"x\", \"y\", \"z\"); obj.length === 3. Actual: ' + (obj.length));\n}\n\n//CHECK#3\nif (obj[0] !== \"x\") {\n $ERROR('#3: var obj = {}; obj.unshift = Array.prototype.unshift; obj.length = 4294967296; obj.unshift(\"x\", \"y\", \"z\"); obj[0] === \"x\". Actual: ' + (obj[0]));\n}\n\n//CHECK#4\nif (obj[1] !== \"y\") {\n $ERROR('#4: var obj = {}; obj.unshift = Array.prototype.unshift; obj.length = 4294967296; obj.unshift(\"x\", \"y\", \"z\"); obj[1] === \"y\". Actual: ' + (obj[1]));\n} \n\n//CHECK#5\nif (obj[2] !== \"z\") {\n $ERROR('#5: var obj = {}; obj.unshift = Array.prototype.unshift; obj.length = 4294967296; obj.unshift(\"x\", \"y\", \"z\"); obj[2] === \"z\". Actual: ' + (obj[2]));\n} \n\nvar obj = {};\nobj.unshift = Array.prototype.unshift;\nobj.length = 4294967296;\n\n//CHECK#6\nvar unshift = obj.unshift();\nif (unshift !== 0) {\n $ERROR('#6: var obj = {}; obj.unshift = Array.prototype.unshift; obj.length = 4294967296; obj.unshift() === 0. Actual: ' + (unshift));\n}\n\n//CHECK#7\nif (obj.length !== 0) {\n $ERROR('#7: var obj = {}; obj.unshift = Array.prototype.unshift; obj.length = 4294967296; obj.unshift(); obj.length === 0. Actual: ' + (obj.length));\n} \n",
+ "id": "S15.4.4.13_A3_T1"
+ },
+ {
+ "section": "15.4.4.13",
+ "description": "length = -4294967295",
+ "test": "var obj = {};\nobj.unshift = Array.prototype.unshift;\nobj[0] = \"\";\nobj.length = -4294967295;\n\n//CHECK#1\nvar unshift = obj.unshift(\"x\", \"y\", \"z\");\nif (unshift !== 4) {\n $ERROR('#1: var obj = {}; obj.unshift = Array.prototype.unshift; obj[0] = \"\"; obj.length = -4294967295; obj.unshift(\"x\", \"y\", \"z\") === 4. Actual: ' + (unshift));\n}\n\n//CHECK#2\nif (obj.length !== 4) {\n $ERROR('#2: var obj = {}; obj.unshift = Array.prototype.unshift; obj[0] = \"\"; obj.length = -4294967295; obj.unshift(\"x\", \"y\", \"z\"); obj.length === 4. Actual: ' + (obj.length));\n}\n\n//CHECK#3\nif (obj[0] !== \"x\") {\n $ERROR('#3: var obj = {}; obj.unshift = Array.prototype.unshift; obj[0] = \"\"; obj.length = -4294967295; obj.unshift(\"x\", \"y\", \"z\"); obj[0] === \"x\". Actual: ' + (obj[0]));\n}\n\n//CHECK#4\nif (obj[1] !== \"y\") {\n $ERROR('#4: var obj = {}; obj.unshift = Array.prototype.unshift; obj[0] = \"\"; obj.length = -4294967295; obj.unshift(\"x\", \"y\", \"z\"); obj[1] === \"y\". Actual: ' + (obj[1]));\n} \n\n//CHECK#5\nif (obj[2] !== \"z\") {\n $ERROR('#5: var obj = {}; obj.unshift = Array.prototype.unshift; obj[0] = \"\"; obj.length = -4294967295; obj.unshift(\"x\", \"y\", \"z\"); obj[2] === \"z\". Actual: ' + (obj[2]));\n}\n\n//CHECK#6\nif (obj[3] !== \"\") {\n $ERROR('#6: var obj = {}; obj.unshift = Array.prototype.unshift; obj[0] = \"\"; obj.length = -4294967295; obj.unshift(\"x\", \"y\", \"z\"); obj[3] === \"\". Actual: ' + (obj[3]));\n} \n",
+ "id": "S15.4.4.13_A3_T2"
+ },
+ {
+ "section": "15.4.4.13",
+ "description": "length = 4294967297",
+ "test": "var obj = {};\nobj.unshift = Array.prototype.unshift;\nobj[0] = \"\";\nobj.length = 4294967297;\n\n//CHECK#1\nvar unshift = obj.unshift(\"x\", \"y\", \"z\");\nif (unshift !== 4) {\n $ERROR('#1: var obj = {}; obj.unshift = Array.prototype.unshift; obj[0] = \"\"; obj.length = 4294967297; obj.unshift(\"x\", \"y\", \"z\") === 4. Actual: ' + (unshift));\n}\n\n//CHECK#2\nif (obj.length !== 4) {\n $ERROR('#2: var obj = {}; obj.unshift = Array.prototype.unshift; obj[0] = \"\"; obj.length = 4294967297; obj.unshift(\"x\", \"y\", \"z\"); obj.length === 4. Actual: ' + (obj.length));\n}\n\n//CHECK#3\nif (obj[0] !== \"x\") {\n $ERROR('#3: var obj = {}; obj.unshift = Array.prototype.unshift; obj[0] = \"\"; obj.length = 4294967297; obj.unshift(\"x\", \"y\", \"z\"); obj[0] === \"x\". Actual: ' + (obj[0]));\n}\n\n//CHECK#4\nif (obj[1] !== \"y\") {\n $ERROR('#4: var obj = {}; obj.unshift = Array.prototype.unshift; obj[0] = \"\"; obj.length = 4294967297; obj.unshift(\"x\", \"y\", \"z\"); obj[1] === \"y\". Actual: ' + (obj[1]));\n} \n\n//CHECK#5\nif (obj[2] !== \"z\") {\n $ERROR('#5: var obj = {}; obj.unshift = Array.prototype.unshift; obj[0] = \"\"; obj.length = 4294967297; obj.unshift(\"x\", \"y\", \"z\"); obj[2] === \"z\". Actual: ' + (obj[2]));\n}\n\n//CHECK#6\nif (obj[3] !== \"\") {\n $ERROR('#6: var obj = {}; obj.unshift = Array.prototype.unshift; obj[0] = \"\"; obj.length = 4294967297; obj.unshift(\"x\", \"y\", \"z\"); obj[3] === \"\". Actual: ' + (obj[3]));\n} \n",
+ "id": "S15.4.4.13_A3_T3"
+ },
+ {
+ "section": "15.4.4.13, 8.6.2.1, 8.6.2.5",
+ "description": "[[Prototype]] of Array instance is Array.prototype, [[Prototype] of Array.prototype is Object.prototype",
+ "test": "Array.prototype[0] = -1;\nx = [1];\nx.length = 1;\n\n//CHECK#1\nvar unshift = x.unshift(0);\nif (unshift !== 2) { \n $ERROR('#1: Array.prototype[0] = -1; x = [1]; x.length = 1; x.unshift(0) === 2. Actual: ' + (unshift)); \n}\n\n//CHECK#2\nif (x[0] !== 0) { \n $ERROR('#2: Array.prototype[0] = -1; x = [1]; x.length = 1; x.unshift(0); x[0] === 0. Actual: ' + (x[0])); \n}\n\n//CHECK#3\nif (x[1] !== 1) { \n $ERROR('#3: Array.prototype[0] = -1; x = [1]; x.length = 1; x.unshift(0); x[1] === 1. Actual: ' + (x[1])); \n}\n\ndelete x[0];\n\n//CHECK#4\nif (x[0] !== -1) { \n $ERROR('#4: Array.prototype[0] = -1; x = [1]; x.length = 1; x.unshift(0); delete x[0]; x[0] === -1. Actual: ' + (x[0])); \n}\n\nObject.prototype[0] = -1;\nObject.prototype.length = 1;\nObject.prototype.unshift = Array.prototype.unshift;\nx = {0:1};\n\n//CHECK#5\nvar unshift = x.unshift(0);\nif (unshift !== 2) { \n $ERROR('#5: Object.prototype[0] = -1; Object.prototype.length = 1; Object.prototype.unshift = Array.prototype.unshift; x = {0:0}; x.unshift(0) === 2. Actual: ' + (unshift)); \n}\n\n//CHECK#6\nif (x[0] !== 0) { \n $ERROR('#6: Object.prototype[0] = -1; Object.prototype.length = 1; Object.prototype.unshift = Array.prototype.unshift; x = {0:0}; x.unshift(0); x[0] === 0. Actual: ' + (x[0])); \n}\n\n//CHECK#7\nif (x[1] !== 1) { \n $ERROR('#7: Object.prototype[0] = -1; Object.prototype.length = 1; Object.prototype.unshift = Array.prototype.unshift; x = {0:0}; x.unshift(0); x[1] === 1. Actual: ' + (x[1])); \n}\n\ndelete x[0];\n\n//CHECK#8\nif (x[0] !== -1) { \n $ERROR('#8: Object.prototype[0] = -1; Object.prototype.length = 1; Object.prototype.unshift = Array.prototype.unshift; x = {0:0}; x.unshift(0); delete x[0]; x[0] === -1. Actual: ' + (x[0])); \n}\n\n//CHECK#9\nif (x.length !== 2) { \n $ERROR('#9: Object.prototype[0] = -1; Object.prototype.length = 1; Object.prototype.unshift = Array.prototype.unshift; x = {0:0}; x.unshift(0); x.length === 1. Actual: ' + (x.length)); \n}\n\n//CHECK#10\ndelete x.length;\nif (x.length !== 1) { \n $ERROR('#10: Object.prototype[1] = -1; Object.prototype.length = 1; Object.prototype.unshift = Array.prototype.unshift; x = {0:0}; x.unshift(0); delete x; x.length === 1. Actual: ' + (x.length)); \n}\n",
+ "id": "S15.4.4.13_A4_T1"
+ },
+ {
+ "section": "15.4.4.13, 8.6.2.1, 8.6.2.5",
+ "description": "[[Prototype]] of Array instance is Array.prototype, [[Prototype] of Array.prototype is Object.prototype",
+ "test": "Array.prototype[0] = 1;\nvar x = [];\nx.length = 1;\n\n//CHECK#1\nvar unshift = x.unshift(0);\nif (unshift !== 2) { \n $ERROR('#1: Array.prototype[0] = 1; x = []; x.length = 1; x.unshift(0) === 2. Actual: ' + (unshift)); \n}\n\n//CHECK#2\nif (x[0] !== 0) { \n $ERROR('#2: Array.prototype[0] = 1; x = []; x.length = 1; x.unshift(0); x[0] === 0. Actual: ' + (x[0])); \n}\n\n//CHECK#3\nif (x[1] !== 1) { \n $ERROR('#3: Array.prototype[0] = 1; x = []; x.length = 1; x.unshift(0); x[1] === 1. Actual: ' + (x[1])); \n}\n\ndelete x[0];\n\n//CHECK#4\nif (x[0] !== 1) { \n $ERROR('#4: Array.prototype[0] = 1; x = [1]; x.length = 1; x.unshift(0); delete x[0]; x[0] === 1. Actual: ' + (x[0])); \n}\n\nObject.prototype[0] = 1;\nObject.prototype.length = 1;\nObject.prototype.unshift = Array.prototype.unshift;\nx = {};\n\n//CHECK#5\nvar unshift = x.unshift(0);\nif (unshift !== 2) { \n $ERROR('#5: Object.prototype[0] = 1; Object.prototype.length = 1; Object.prototype.unshift = Array.prototype.unshift; x = {}; x.unshift(0) === 2. Actual: ' + (unshift)); \n}\n\n//CHECK#6\nif (x[0] !== 0) { \n $ERROR('#6: Object.prototype[0] = 1; Object.prototype.length = 1; Object.prototype.unshift = Array.prototype.unshift; x = {}; x.unshift(0); x[0] === 0. Actual: ' + (x[0])); \n}\n\n//CHECK#7\nif (x[1] !== 1) { \n $ERROR('#7: Object.prototype[0] = 1; Object.prototype.length = 1; Object.prototype.unshift = Array.prototype.unshift; x = {}; x.unshift(0); x[1] === 1. Actual: ' + (x[1])); \n}\n\ndelete x[0];\n\n//CHECK#8\nif (x[0] !== 1) { \n $ERROR('#8: Object.prototype[0] = 1; Object.prototype.length = 1; Object.prototype.unshift = Array.prototype.unshift; x = {}; x.unshift(0); delete x[0]; x[0] === 1. Actual: ' + (x[0])); \n}\n\n//CHECK#9\nif (x.length !== 2) { \n $ERROR('#9: Object.prototype[0] = 1; Object.prototype.length = 1; Object.prototype.unshift = Array.prototype.unshift; x = {}; x.unshift(0); x.length === 1. Actual: ' + (x.length)); \n}\n\n//CHECK#10\ndelete x.length;\nif (x.length !== 1) { \n $ERROR('#10: Object.prototype[1] = 1; Object.prototype.length = 1; Object.prototype.unshift = Array.prototype.unshift; x = {}; x.unshift(0); delete x; x.length === 1. Actual: ' + (x.length)); \n}\n",
+ "id": "S15.4.4.13_A4_T2"
+ },
+ {
+ "section": "15.4.4.13, 15.2.4.7, 12.6.4",
+ "description": "Checking use propertyIsEnumerable, for-in",
+ "test": "//CHECK#1\nif (Array.prototype.unshift.propertyIsEnumerable('length') !== false) {\n $ERROR('#1: Array.prototype.unshift.propertyIsEnumerable(\\'length\\') === false. Actual: ' + (Array.prototype.unshift.propertyIsEnumerable('length')));\n}\n\n//CHECK#2\nvar result = true;\nfor (var p in Array.unshift){\n if (p === \"length\") {\n result = false;\n } \n}\n\nif (result !== true) {\n $ERROR('#2: result = true; for (p in Array.unshift) { if (p === \"length\") result = false; } result === true;');\n}\n\n",
+ "id": "S15.4.4.13_A5.1"
+ },
+ {
+ "section": "15.4.4.13, 15.2.4.5, 11.4.1",
+ "description": "Checking use hasOwnProperty, delete",
+ "strict_mode_negative": "",
+ "test": "//CHECK#1\nif (Array.prototype.unshift.hasOwnProperty('length') !== true) {\n $FAIL('#1: Array.prototype.unshift.hasOwnProperty(\\'length\\') === true. Actual: ' + (Array.prototype.unshift.hasOwnProperty('length')));\n}\n\ndelete Array.prototype.unshift.length;\n\n//CHECK#2\nif (Array.prototype.unshift.hasOwnProperty('length') !== true) {\n $ERROR('#2: delete Array.prototype.unshift.length; Array.prototype.unshift.hasOwnProperty(\\'length\\') === true. Actual: ' + (Array.prototype.unshift.hasOwnProperty('length')));\n}\n\n//CHECK#3\nif (Array.prototype.unshift.length === undefined) {\n $ERROR('#3: delete Array.prototype.unshift.length; Array.prototype.unshift.length !== undefined');\n}\n\n\n",
+ "id": "S15.4.4.13_A5.2",
+ "strict_only": ""
+ },
+ {
+ "section": "15.4.4.13",
+ "description": "Checking if varying the length property fails",
+ "strict_mode_negative": "",
+ "test": "//CHECK#1\nvar x = Array.prototype.unshift.length;\nArray.prototype.unshift.length = Infinity;\nif (Array.prototype.unshift.length !== x) {\n $ERROR('#1: x = Array.prototype.unshift.length; Array.prototype.unshift.length = Infinity; Array.prototype.unshift.length === x. Actual: ' + (Array.prototype.unshift.length));\n}\n\n",
+ "id": "S15.4.4.13_A5.3",
+ "strict_only": ""
+ },
+ {
+ "section": "15.4.4.13",
+ "description": "unshift.length === 1",
+ "test": "//CHECK#1\nif (Array.prototype.unshift.length !== 1) {\n $ERROR('#1: Array.prototype.unshift.length === 1. Actual: ' + (Array.prototype.unshift.length));\n}\n\n",
+ "id": "S15.4.4.13_A5.4"
+ },
+ {
+ "section": "15.4.4.13, 15.2.4.7, 12.6.4",
+ "description": "Checking use propertyIsEnumerable, for-in",
+ "test": "//CHECK#1\nif (Array.propertyIsEnumerable('unshift') !== false) {\n $ERROR('#1: Array.propertyIsEnumerable(\\'unshift\\') === false. Actual: ' + (Array.propertyIsEnumerable('unshift')));\n}\n\n//CHECK#2\nvar result = true;\nfor (var p in Array){\n if (p === \"unshift\") {\n result = false;\n } \n}\n\nif (result !== true) {\n $ERROR('#2: result = true; for (p in Array) { if (p === \"unshift\") result = false; } result === true;');\n}\n",
+ "id": "S15.4.4.13_A5.5"
+ },
+ {
+ "section": "15.4.4.13",
+ "description": "Checking Array.prototype.unshift.prototype",
+ "test": "//CHECK#1\nif (Array.prototype.unshift.prototype !== undefined) {\n $ERROR('#1: Array.prototype.unshift.prototype === undefined. Actual: ' + (Array.prototype.unshift.prototype));\n}\n",
+ "id": "S15.4.4.13_A5.6"
+ },
+ {
+ "section": "15.4.4.13, 11.2.2",
+ "description": "If property does not implement the internal [[Construct]] method, throw a TypeError exception",
+ "test": "//CHECK#1\n\ntry {\n new Array.prototype.unshift();\n $ERROR('#1.1: new Array.prototype.unshift() throw TypeError. Actual: ' + (new Array.prototype.unshift()));\n} catch (e) {\n if ((e instanceof TypeError) !== true) {\n $ERROR('#1.2: new Array.prototype.unshift() throw TypeError. Actual: ' + (e));\n }\n}\n",
+ "id": "S15.4.4.13_A5.7"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.4.4.14.json b/website/resources/scripts/testcases2/15.4.4.14.json
new file mode 100644
index 000000000..f84a8278c
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.4.4.14.json
@@ -0,0 +1,1358 @@
+{
+ "testCollection": {
+ "name": "15.4.4.14",
+ "numTests": 193,
+ "tests": [
+ {
+ "id": "15.4.4.14-0-1",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-0-1.js",
+ "description": "Array.prototype.indexOf must exist as a function",
+ "test": "assertTrue((function testcase() {\n var f = Array.prototype.indexOf;\n if (typeof(f) === \"function\") {\n return true;\n }\n }).call(this));\n"
+ },
+ {
+ "id": "15.4.4.14-0-2",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-0-2.js",
+ "description": "Array.prototype.indexOf has a length property whose value is 1.",
+ "test": "assertTrue((Array.prototype.indexOf.length === 1));\n",
+ "precondition": "(fnExists(Array.prototype.indexOf))"
+ },
+ {
+ "id": "15.4.4.14-1-1",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-1-1.js",
+ "description": "Array.prototype.indexOf applied to undefined throws a TypeError",
+ "test": "assertTrue((function testcase() {\n try {\n Array.prototype.indexOf.call(undefined);\n return false;\n }\n catch (e) {\n return e instanceof TypeError;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.indexOf))"
+ },
+ {
+ "id": "15.4.4.14-1-10",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-1-10.js",
+ "description": "Array.prototype.indexOf applied to the Math object",
+ "test": "assertTrue((function testcase() {\n try {\n Math[1] = true;\n Math.length = 2;\n return Array.prototype.indexOf.call(Math, true) === 1;\n } finally {\n delete Math[1];\n delete Math.length;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.indexOf))"
+ },
+ {
+ "id": "15.4.4.14-1-11",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-1-11.js",
+ "description": "Array.prototype.indexOf applied to Date object",
+ "test": "assertTrue((function testcase() {\n\n var obj = new Date();\n obj.length = 2;\n obj[1] = true;\n\n return Array.prototype.indexOf.call(obj, true) === 1;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.indexOf))"
+ },
+ {
+ "id": "15.4.4.14-1-12",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-1-12.js",
+ "description": "Array.prototype.indexOf applied to RegExp object",
+ "test": "assertTrue((function testcase() {\n\n var obj = new RegExp();\n obj.length = 2;\n obj[1] = true;\n\n return Array.prototype.indexOf.call(obj, true) === 1;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.indexOf))"
+ },
+ {
+ "id": "15.4.4.14-1-13",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-1-13.js",
+ "description": "Array.prototype.indexOf applied to the JSON object",
+ "test": "assertTrue((function testcase() {\n var targetObj = {};\n try {\n JSON[3] = targetObj;\n JSON.length = 5;\n return Array.prototype.indexOf.call(JSON, targetObj) === 3;\n } finally {\n delete JSON[3];\n delete JSON.length;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.indexOf))"
+ },
+ {
+ "id": "15.4.4.14-1-14",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-1-14.js",
+ "description": "Array.prototype.indexOf applied to Error object",
+ "test": "assertTrue((function testcase() {\n\n var obj = new SyntaxError();\n obj[1] = true;\n obj.length = 2;\n\n return Array.prototype.indexOf.call(obj, true) === 1;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.indexOf))"
+ },
+ {
+ "id": "15.4.4.14-1-15",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-1-15.js",
+ "description": "Array.prototype.indexOf applied to Arguments object",
+ "test": "assertTrue((function testcase() {\n\n function fun() {\n return arguments;\n }\n var obj = fun(1, true, 3);\n\n return Array.prototype.indexOf.call(obj, true) === 1;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.indexOf))"
+ },
+ {
+ "id": "15.4.4.14-1-17",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-1-17.js",
+ "description": "Array.prototype.indexOf applied to the global object",
+ "test": "assertTrue((function testcase() {\n try {\n var oldLen = fnGlobalObject().length;\n fnGlobalObject()[1] = true;\n fnGlobalObject().length = 2;\n return Array.prototype.indexOf.call(fnGlobalObject(), true) === 1;\n } finally {\n delete fnGlobalObject()[1];\n fnGlobalObject().length = oldLen;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.indexOf))"
+ },
+ {
+ "id": "15.4.4.14-1-2",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-1-2.js",
+ "description": "Array.prototype.indexOf applied to null throws a TypeError",
+ "test": "assertTrue((function testcase() {\n try {\n Array.prototype.indexOf.call(null);\n return false;\n }\n catch (e) {\n return e instanceof TypeError;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.indexOf))"
+ },
+ {
+ "id": "15.4.4.14-1-3",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-1-3.js",
+ "description": "Array.prototype.indexOf applied to boolean primitive",
+ "test": "assertTrue((function testcase() {\n var targetObj = {};\n try {\n Boolean.prototype[1] = targetObj;\n Boolean.prototype.length = 2;\n\n return Array.prototype.indexOf.call(true, targetObj) === 1;\n } finally {\n delete Boolean.prototype[1];\n delete Boolean.prototype.length;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.indexOf))"
+ },
+ {
+ "id": "15.4.4.14-1-4",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-1-4.js",
+ "description": "Array.prototype.indexOf applied to Boolean Object",
+ "test": "assertTrue((function testcase() {\n\n var obj = new Boolean(false);\n obj.length = 2;\n obj[1] = true;\n\n return Array.prototype.indexOf.call(obj, true) === 1;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.indexOf))"
+ },
+ {
+ "id": "15.4.4.14-1-5",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-1-5.js",
+ "description": "Array.prototype.indexOf applied to number primitive",
+ "test": "assertTrue((function testcase() {\n var targetObj = {};\n try {\n Number.prototype[1] = targetObj;\n Number.prototype.length = 2;\n\n return Array.prototype.indexOf.call(5, targetObj) === 1;\n } finally {\n delete Number.prototype[1];\n delete Number.prototype.length;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.indexOf))"
+ },
+ {
+ "id": "15.4.4.14-1-6",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-1-6.js",
+ "description": "Array.prototype.indexOf applied to Number object",
+ "test": "assertTrue((function testcase() {\n\n var obj = new Number(-3);\n obj.length = 2;\n obj[1] = true;\n\n return Array.prototype.indexOf.call(obj, true) === 1;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.indexOf))"
+ },
+ {
+ "id": "15.4.4.14-1-7",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-1-7.js",
+ "description": "Array.prototype.indexOf applied to string primitive",
+ "test": "assertTrue((Array.prototype.indexOf.call(\"abc\", \"b\") === 1));\n",
+ "precondition": "(fnExists(Array.prototype.indexOf))"
+ },
+ {
+ "id": "15.4.4.14-1-8",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-1-8.js",
+ "description": "Array.prototype.indexOf applied to String object",
+ "test": "assertTrue((function testcase() {\n\n var obj = new String(\"null\");\n\n return Array.prototype.indexOf.call(obj, 'l') === 2;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.indexOf))"
+ },
+ {
+ "id": "15.4.4.14-1-9",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-1-9.js",
+ "description": "Array.prototype.indexOf applied to Function object",
+ "test": "assertTrue((function testcase() {\n\n var obj = function (a, b) {\n return a + b;\n };\n obj[1] = true;\n\n return Array.prototype.indexOf.call(obj, true) === 1;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.indexOf))"
+ },
+ {
+ "id": "15.4.4.14-10-1",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-10-1.js",
+ "description": "Array.prototype.indexOf returns -1 for elements not present in array",
+ "test": "assertTrue((function testcase() {\n var a = new Array();\n a[100] = 1;\n a[99999] = \"\"; \n a[10] = new Object();\n a[5555] = 5.5;\n a[123456] = \"str\";\n a[5] = 1E+309;\n if (a.indexOf(1) !== 100 || \n a.indexOf(\"\") !== 99999 ||\n a.indexOf(\"str\") !== 123456 ||\n a.indexOf(1E+309) !== 5 || //Infinity\n a.indexOf(5.5) !== 5555 )\n {\n return false;\n }\n if (a.indexOf(true) === -1 && \n a.indexOf(5) === -1 &&\n a.indexOf(\"str1\") === -1 &&\n a.indexOf(null) === -1 &&\n a.indexOf(new Object()) === -1) \n {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.indexOf))"
+ },
+ {
+ "id": "15.4.4.14-10-2",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-10-2.js",
+ "description": "Array.prototype.indexOf returns -1 if 'length' is 0 and does not access any other properties",
+ "test": "assertTrue((function testcase() {\n var accessed = false;\n var f = {length: 0};\n Object.defineProperty(f,\"0\",{get: function () {accessed = true; return 1;}});\n\n \n var i = Array.prototype.indexOf.call(f,1);\n \n if (i === -1 && accessed==false) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.indexOf) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects())"
+ },
+ {
+ "id": "15.4.4.14-2-1",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-2-1.js",
+ "description": "Array.prototype.indexOf - 'length' is own data property on an Array-like object",
+ "test": "assertTrue((function testcase() {\n var objOne = { 1: true, length: 2 };\n var objTwo = { 2: true, length: 2 };\n return Array.prototype.indexOf.call(objOne, true) === 1 &&\n Array.prototype.indexOf.call(objTwo, true) === -1;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.indexOf))"
+ },
+ {
+ "id": "15.4.4.14-2-10",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-2-10.js",
+ "description": "Array.prototype.indexOf - 'length' is inherited accessor property",
+ "test": "assertTrue((function testcase() {\n\n var proto = {};\n Object.defineProperty(proto, \"length\", {\n get: function () {\n return 2;\n },\n configurable: true\n });\n\n var Con = function () {};\n Con.prototype = proto;\n\n var childOne = new Con();\n childOne[1] = true;\n var childTwo = new Con();\n childTwo[2] = true;\n\n return Array.prototype.indexOf.call(childOne, true) === 1 &&\n Array.prototype.indexOf.call(childTwo, true) === -1;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.indexOf) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.4.4.14-2-11",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-2-11.js",
+ "description": "Array.prototype.indexOf - 'length' is own accessor property without a get function",
+ "test": "assertTrue((function testcase() {\n\n var obj = { 1: true };\n Object.defineProperty(obj, \"length\", {\n set: function () { },\n configurable: true\n });\n\n return Array.prototype.indexOf.call(obj, true) === -1;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.indexOf) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.4.4.14-2-12",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-2-12.js",
+ "description": "Array.prototype.indexOf - 'length' is own accessor property without a get function that overrides an inherited accessor property",
+ "test": "assertTrue((function testcase() {\n try {\n Object.defineProperty(Object.prototype, \"length\", {\n get: function () {\n return 20;\n },\n configurable: true\n });\n\n var obj = { 1: 1 };\n Object.defineProperty(obj, \"length\", {\n set: function () { },\n configurable: true\n });\n\n return Array.prototype.indexOf.call(obj, 1) === -1;\n } finally {\n delete Object.prototype.length;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.indexOf) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.4.4.14-2-13",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-2-13.js",
+ "description": "Array.prototype.indexOf - 'length' is inherited accessor property without a get function",
+ "test": "assertTrue((function testcase() {\n\n var proto = {};\n Object.defineProperty(proto, \"length\", {\n set: function () { },\n configurable: true\n });\n\n var Con = function () {};\n Con.prototype = proto;\n\n var child = new Con();\n child[1] = true;\n\n return Array.prototype.indexOf.call(child, true) === -1;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.indexOf) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.4.4.14-2-14",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-2-14.js",
+ "description": "Array.prototype.indexOf - 'length' is undefined property",
+ "test": "assertTrue((function testcase() {\n\n var obj = { 0: true, 1: true };\n\n return Array.prototype.indexOf.call(obj, true) === -1;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.indexOf))"
+ },
+ {
+ "id": "15.4.4.14-2-15",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-2-15.js",
+ "description": "Array.prototype.indexOf - 'length' is property of the global object",
+ "test": "assertTrue((function testcase() {\n var targetObj = {};\n try {\n var oldLen = fnGlobalObject().length;\n fnGlobalObject().length = 2;\n\n fnGlobalObject()[1] = targetObj;\n if (Array.prototype.indexOf.call(fnGlobalObject(), targetObj) !== 1) {\n return false;\n }\n\n fnGlobalObject()[1] = {};\n fnGlobalObject()[2] = targetObj;\n\n return Array.prototype.indexOf.call(fnGlobalObject(), targetObj) === -1;\n } finally {\n delete fnGlobalObject()[1];\n delete fnGlobalObject()[2];\n fnGlobalObject().length = oldLen;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.indexOf))"
+ },
+ {
+ "id": "15.4.4.14-2-17",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-2-17.js",
+ "description": "Array.prototype.indexOf applied to Arguments object which implements its own property get method",
+ "test": "assertTrue((function testcase() {\n\n var func = function (a, b) {\n arguments[2] = false;\n return Array.prototype.indexOf.call(arguments, true) === 1 &&\n Array.prototype.indexOf.call(arguments, false) === -1;\n };\n\n return func(0, true);\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.indexOf))"
+ },
+ {
+ "id": "15.4.4.14-2-18",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-2-18.js",
+ "description": "Array.prototype.indexOf applied to String object, which implements its own property get method",
+ "test": "assertTrue((function testcase() {\n var str = new String(\"012\");\n try {\n String.prototype[3] = \"3\";\n return Array.prototype.indexOf.call(str, \"2\") === 2 &&\n Array.prototype.indexOf.call(str, \"3\") === -1;\n } finally {\n delete String.prototype[3];\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.indexOf))"
+ },
+ {
+ "id": "15.4.4.14-2-19",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-2-19.js",
+ "description": "Array.prototype.indexOf applied to Function object which implements its own property get method",
+ "test": "assertTrue((function testcase() {\n\n var obj = function (a, b) {\n return a + b;\n };\n obj[1] = \"b\";\n obj[2] = \"c\";\n\n return Array.prototype.indexOf.call(obj, obj[1]) === 1 &&\n Array.prototype.indexOf.call(obj, obj[2]) === -1;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.indexOf))"
+ },
+ {
+ "id": "15.4.4.14-2-2",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-2-2.js",
+ "description": "Array.prototype.indexOf - 'length' is own data property on an Array",
+ "test": "assertTrue((function testcase() {\n var targetObj = {};\n try {\n Array.prototype[2] = targetObj;\n \n return [0, targetObj].indexOf(targetObj) === 1 &&\n [0, 1].indexOf(targetObj) === -1;\n\n } finally {\n delete Array.prototype[2];\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.indexOf))"
+ },
+ {
+ "id": "15.4.4.14-2-3",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-2-3.js",
+ "description": "Array.prototype.indexOf - 'length' is own data property that overrides an inherited data property on an Array-like object",
+ "test": "assertTrue((function testcase() {\n\n var proto = { length: 0 };\n\n var Con = function () {};\n Con.prototype = proto;\n\n var child = new Con();\n child.length = 2;\n child[1] = true;\n\n return Array.prototype.indexOf.call(child, true) === 1;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.indexOf))"
+ },
+ {
+ "id": "15.4.4.14-2-4",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-2-4.js",
+ "description": "Array.prototype.indexOf - 'length' is own data property that overrides an inherited data property on an Array",
+ "test": "assertTrue((function testcase() {\n\n var targetObj = {};\n var arrProtoLen;\n\n try {\n arrProtoLen = Array.prototype.length;\n Array.prototype.length = 0;\n\n return [0, targetObj].indexOf(targetObj) === 1;\n\n } finally {\n\n Array.prototype.length = arrProtoLen;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.indexOf))"
+ },
+ {
+ "id": "15.4.4.14-2-5",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-2-5.js",
+ "description": "Array.prototype.indexOf - 'length' is own data property that overrides an inherited accessor property on an Array-like object",
+ "test": "assertTrue((function testcase() {\n var proto = {};\n Object.defineProperty(proto, \"length\", {\n get: function () {\n return 0;\n },\n configurable: true\n });\n\n var Con = function () {};\n Con.prototype = proto;\n\n var child = new Con();\n \n Object.defineProperty(child, \"length\", {\n value: 2,\n configurable: true\n });\n child[1] = true;\n\n return Array.prototype.indexOf.call(child, true) === 1;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.indexOf) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.4.4.14-2-6",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-2-6.js",
+ "description": "Array.prototype.indexOf - 'length' is an inherited data property",
+ "test": "assertTrue((function testcase() {\n var proto = { length: 2 };\n\n var Con = function () {};\n Con.prototype = proto;\n\n var childOne = new Con();\n childOne[1] = true;\n var childTwo = new Con();\n childTwo[2] = true;\n\n return Array.prototype.indexOf.call(childOne, true) === 1 &&\n Array.prototype.indexOf.call(childTwo, true) === -1;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.indexOf))"
+ },
+ {
+ "id": "15.4.4.14-2-7",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-2-7.js",
+ "description": "Array.prototype.indexOf - 'length' is own accessor property",
+ "test": "assertTrue((function testcase() {\n var objOne = { 1: true };\n var objTwo = { 2: true };\n Object.defineProperty(objOne, \"length\", {\n get: function () {\n return 2;\n },\n configurable: true\n });\n Object.defineProperty(objTwo, \"length\", {\n get: function () {\n return 2;\n },\n configurable: true\n });\n\n return Array.prototype.indexOf.call(objOne, true) === 1 &&\n Array.prototype.indexOf.call(objTwo, true) === -1;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.indexOf) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.4.4.14-2-8",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-2-8.js",
+ "description": "Array.prototype.indexOf - 'length' is own accessor property that overrides an inherited data property",
+ "test": "assertTrue((function testcase() {\n\n var proto = { length: 0 };\n\n var Con = function () {};\n Con.prototype = proto;\n\n var child = new Con();\n child[1] = true;\n\n Object.defineProperty(child, \"length\", {\n get: function () {\n return 2;\n },\n configurable: true\n });\n\n return Array.prototype.indexOf.call(child, true) === 1;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.indexOf) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.4.4.14-2-9",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-2-9.js",
+ "description": "Array.prototype.indexOf - 'length' is own accessor property that overrides an inherited accessor property",
+ "test": "assertTrue((function testcase() {\n var proto = {};\n Object.defineProperty(proto, \"length\", {\n get: function () {\n return 0;\n },\n configurable: true\n });\n\n var Con = function () {};\n Con.prototype = proto;\n\n var child = new Con();\n child[1] = true;\n\n Object.defineProperty(child, \"length\", {\n get: function () {\n return 2;\n },\n configurable: true\n });\n\n return Array.prototype.indexOf.call(child, true) === 1;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.indexOf) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.4.4.14-3-1",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-1.js",
+ "description": "Array.prototype.indexOf - value of 'length' is undefined",
+ "test": "assertTrue((function testcase() {\n\n var obj = { 0: 1, 1: 1, length: undefined };\n\n return Array.prototype.indexOf.call(obj, 1) === -1;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.indexOf))"
+ },
+ {
+ "id": "15.4.4.14-3-10",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-10.js",
+ "description": "Array.prototype.indexOf - value of 'length' is number primitive (value is NaN)",
+ "test": "assertTrue((function testcase() {\n\n var obj = { 0: 0, length: NaN };\n\n return Array.prototype.indexOf.call(obj, 0) === -1;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.indexOf))"
+ },
+ {
+ "id": "15.4.4.14-3-11",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-11.js",
+ "description": "Array.prototype.indexOf - 'length' is a string containing a positive number",
+ "test": "assertTrue((function testcase() {\n\n var obj = { 1: 1, 2: 2, length: \"2\" };\n\n return Array.prototype.indexOf.call(obj, 1) === 1 &&\n Array.prototype.indexOf.call(obj, 2) === -1;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.indexOf))"
+ },
+ {
+ "id": "15.4.4.14-3-12",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-12.js",
+ "description": "Array.prototype.indexOf - 'length' is a string containing a negative number",
+ "test": "assertTrue((function testcase() {\n\n var obj = { 1: \"true\", 2: \"2\", length: \"-4294967294\" };\n\n return Array.prototype.indexOf.call(obj, \"true\") === 1 &&\n Array.prototype.indexOf.call(obj, \"2\") === -1;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.indexOf))"
+ },
+ {
+ "id": "15.4.4.14-3-13",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-13.js",
+ "description": "Array.prototype.indexOf - 'length' is a string containing a decimal number",
+ "test": "assertTrue((function testcase() {\n\n var obj = { 199: true, 200: \"200.59\", length: \"200.59\" };\n\n return Array.prototype.indexOf.call(obj, true) === 199 &&\n Array.prototype.indexOf.call(obj, \"200.59\") === -1;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.indexOf))"
+ },
+ {
+ "id": "15.4.4.14-3-14",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-14.js",
+ "description": "Array.prototype.indexOf - 'length' is a string containing +/-Infinity",
+ "test": "assertTrue((function testcase() {\n\n var objOne = { 0: true, 1: true, length: \"Infinity\" };\n var objTwo = { 0: true, 1: true, length: \"+Infinity\" };\n var objThree = { 0: true, 1: true, length: \"-Infinity\" };\n\n return Array.prototype.indexOf.call(objOne, true) === -1 &&\n Array.prototype.indexOf.call(objTwo, true) === -1 &&\n Array.prototype.indexOf.call(objThree, true) === -1;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.indexOf))"
+ },
+ {
+ "id": "15.4.4.14-3-15",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-15.js",
+ "description": "Array.prototype.indexOf - 'length' is a string containing an exponential number",
+ "test": "assertTrue((function testcase() {\n\n var obj = { 1: true, 2: \"2E0\", length: \"2E0\" };\n\n return Array.prototype.indexOf.call(obj, true) === 1 &&\n Array.prototype.indexOf.call(obj, \"2E0\") === -1;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.indexOf))"
+ },
+ {
+ "id": "15.4.4.14-3-16",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-16.js",
+ "description": "Array.prototype.indexOf - 'length' is a string containing a hex number",
+ "test": "assertTrue((function testcase() {\n\n var obj = { 10: true, 11: \"0x00B\", length: \"0x00B\" };\n\n return Array.prototype.indexOf.call(obj, true) === 10 &&\n Array.prototype.indexOf.call(obj, \"0x00B\") === -1;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.indexOf))"
+ },
+ {
+ "id": "15.4.4.14-3-17",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-17.js",
+ "description": "Array.prototype.indexOf - 'length' is a string containing a number with leading zeros",
+ "test": "assertTrue((function testcase() {\n\n var obj = { 1: true, 2: \"0002.0\", length: \"0002.0\" };\n\n return Array.prototype.indexOf.call(obj, true) === 1 &&\n Array.prototype.indexOf.call(obj, \"0002.0\") === -1;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.indexOf))"
+ },
+ {
+ "id": "15.4.4.14-3-18",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-18.js",
+ "description": "Array.prototype.indexOf - value of 'length' is a string that can't convert to a number",
+ "test": "assertTrue((function testcase() {\n\n var obj = { 0: true, 100: true, length: \"one\" };\n\n return Array.prototype.indexOf.call(obj, true) === -1;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.indexOf))"
+ },
+ {
+ "id": "15.4.4.14-3-19",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-19.js",
+ "description": "Array.prototype.indexOf - value of 'length' is an Object which has an own toString method.",
+ "test": "assertTrue((function testcase() {\n\n // objects inherit the default valueOf() method from Object\n // that simply returns itself. Since the default valueOf() method\n // does not return a primitive value, ES next tries to convert the object\n // to a number by calling its toString() method and converting the\n // resulting string to a number.\n\n var obj = {\n 1: true,\n 2: 2,\n\n length: {\n toString: function () {\n return '2';\n }\n }\n };\n\n return Array.prototype.indexOf.call(obj, true) === 1 &&\n Array.prototype.indexOf.call(obj, 2) === -1;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.indexOf))"
+ },
+ {
+ "id": "15.4.4.14-3-2",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-2.js",
+ "description": "Array.prototype.indexOf return -1 when 'length' is a boolean (value is true)",
+ "test": "assertTrue((function testcase() {\n var obj = { 0: 0, 1: 1, length: true };\n return Array.prototype.indexOf.call(obj, 0) === 0 &&\n Array.prototype.indexOf.call(obj, 1) === -1;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.indexOf))"
+ },
+ {
+ "id": "15.4.4.14-3-20",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-20.js",
+ "description": "Array.prototype.indexOf - value of 'length' is an Object which has an own valueOf method.",
+ "test": "assertTrue((function testcase() {\n\n //valueOf method will be invoked first, since hint is Number\n var obj = {\n 1: true,\n 2: 2,\n length: {\n valueOf: function () {\n return 2;\n }\n }\n };\n\n return Array.prototype.indexOf.call(obj, true) === 1 &&\n Array.prototype.indexOf.call(obj, 2) === -1;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.indexOf))"
+ },
+ {
+ "id": "15.4.4.14-3-21",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-21.js",
+ "description": "Array.prototype.indexOf - 'length' is an object that has an own valueOf method that returns an object and toString method that returns a string",
+ "test": "assertTrue((function testcase() {\n\n var toStringAccessed = false;\n var valueOfAccessed = false;\n\n var obj = {\n 1: true,\n length: {\n toString: function () {\n toStringAccessed = true;\n return '2';\n },\n\n valueOf: function () {\n valueOfAccessed = true;\n return {};\n }\n }\n };\n\n return Array.prototype.indexOf.call(obj, true) === 1 && toStringAccessed && valueOfAccessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.indexOf))"
+ },
+ {
+ "id": "15.4.4.14-3-22",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-22.js",
+ "description": "Array.prototype.indexOf throws TypeError exception when 'length' is an object with toString and valueOf methods that don�t return primitive values",
+ "test": "assertTrue((function testcase() {\n\n var toStringAccessed = false;\n var valueOfAccessed = false;\n\n var obj = {\n length: {\n toString: function () {\n toStringAccessed = true;\n return {};\n },\n\n valueOf: function () {\n valueOfAccessed = true;\n return {};\n }\n }\n };\n\n try {\n Array.prototype.indexOf.call(obj);\n return false;\n } catch (e) {\n return toStringAccessed && valueOfAccessed;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.indexOf))"
+ },
+ {
+ "id": "15.4.4.14-3-23",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-23.js",
+ "description": "Array.prototype.indexOf uses inherited valueOf method when 'length' is an object with an own toString and inherited valueOf methods",
+ "test": "assertTrue((function testcase() {\n\n var toStringAccessed = false;\n var valueOfAccessed = false;\n\n var proto = {\n valueOf: function () {\n valueOfAccessed = true;\n return 2;\n }\n };\n\n var Con = function () {};\n Con.prototype = proto;\n\n var child = new Con();\n child.toString = function () {\n toStringAccessed = true;\n return 2;\n };\n\n var obj = {\n 1: true,\n length: child\n };\n\n return Array.prototype.indexOf.call(obj, true) === 1 && valueOfAccessed && !toStringAccessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.indexOf))"
+ },
+ {
+ "id": "15.4.4.14-3-24",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-24.js",
+ "description": "Array.prototype.indexOf - value of 'length' is a positive non-integer, ensure truncation occurs in the proper direction",
+ "test": "assertTrue((function testcase() {\n\n var obj = { 122: true, 123: false, length: 123.321 }; //length will be 123 finally\n\n return Array.prototype.indexOf.call(obj, true) === 122 &&\n Array.prototype.indexOf.call(obj, false) === -1;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.indexOf))"
+ },
+ {
+ "id": "15.4.4.14-3-25",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-25.js",
+ "description": "Array.prototype.indexOf - value of 'length' is a negative non-integer, ensure truncation occurs in the proper direction",
+ "test": "assertTrue((function testcase() {\n\n var obj = { 1: true, 2: false, length: -4294967294.5 }; //length will be 2 finally\n\n return Array.prototype.indexOf.call(obj, true) === 1 &&\n Array.prototype.indexOf.call(obj, false) === -1;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.indexOf))"
+ },
+ {
+ "id": "15.4.4.14-3-28",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-28.js",
+ "description": "Array.prototype.indexOf - value of 'length' is boundary value (2^32)",
+ "test": "assertTrue((function testcase() {\n var targetObj = {};\n var obj = {\n 0: targetObj,\n 4294967294: targetObj,\n 4294967295: targetObj,\n length: 4294967296\n };\n\n return Array.prototype.indexOf.call(obj, targetObj) === -1;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.indexOf))"
+ },
+ {
+ "id": "15.4.4.14-3-29",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-29.js",
+ "description": "Array.prototype.indexOf - value of 'length' is boundary value (2^32 + 1)",
+ "test": "assertTrue((function testcase() {\n var targetObj = {};\n var obj = {\n 0: targetObj,\n 1: 4294967297,\n length: 4294967297\n };\n\n return Array.prototype.indexOf.call(obj, targetObj) === 0 &&\n Array.prototype.indexOf.call(obj, 4294967297) === -1;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.indexOf))"
+ },
+ {
+ "id": "15.4.4.14-3-3",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-3.js",
+ "description": "Array.prototype.indexOf - value of 'length' is a number (value is 0)",
+ "test": "assertTrue((function testcase() {\n\n var obj = { 0: true, length: 0 };\n\n return Array.prototype.indexOf.call(obj, true) === -1;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.indexOf))"
+ },
+ {
+ "id": "15.4.4.14-3-4",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-4.js",
+ "description": "Array.prototype.indexOf - value of 'length' is a number (value is +0)",
+ "test": "assertTrue((function testcase() {\n\n var obj = { 0: true, length: +0 };\n\n return Array.prototype.indexOf.call(obj, true) === -1;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.indexOf))"
+ },
+ {
+ "id": "15.4.4.14-3-5",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-5.js",
+ "description": "Array.prototype.indexOf - value of 'length' is a number (value is -0)",
+ "test": "assertTrue((function testcase() {\n\n var obj = { 0: true, length: -0 };\n\n return Array.prototype.indexOf.call(obj, true) === -1;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.indexOf))"
+ },
+ {
+ "id": "15.4.4.14-3-6",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-6.js",
+ "description": "Array.prototype.indexOf - value of 'length' is a number (value is positive)",
+ "test": "assertTrue((function testcase() {\n\n var obj = { 3: true, 4: false, length: 4 };\n\n return Array.prototype.indexOf.call(obj, true) === 3 &&\n Array.prototype.indexOf.call(obj, false) === -1;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.indexOf))"
+ },
+ {
+ "id": "15.4.4.14-3-7",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-7.js",
+ "description": "Array.prototype.indexOf - value of 'length' is a number (value is negative)",
+ "test": "assertTrue((function testcase() {\n\n var obj = { 4: true, 5: false, length: 5 - Math.pow(2, 32) };\n\n return Array.prototype.indexOf.call(obj, true) === 4 &&\n Array.prototype.indexOf.call(obj, false) === -1;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.indexOf))"
+ },
+ {
+ "id": "15.4.4.14-3-8",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-8.js",
+ "description": "Array.prototype.indexOf - value of 'length' is a number (value is Infinity)",
+ "test": "assertTrue((function testcase() {\n\n var obj = { 0: 0, length: Infinity };\n\n return Array.prototype.indexOf.call(obj, 0) === -1;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.indexOf))"
+ },
+ {
+ "id": "15.4.4.14-3-9",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-3-9.js",
+ "description": "Array.prototype.indexOf - value of 'length' is a number (value is -Infinity)",
+ "test": "assertTrue((function testcase() {\n\n var obj = { 0: 0, length: -Infinity };\n\n return Array.prototype.indexOf.call(obj, 0) === -1;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.indexOf))"
+ },
+ {
+ "id": "15.4.4.14-4-1",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-4-1.js",
+ "description": "Array.prototype.indexOf returns -1 if 'length' is 0 (empty array)",
+ "test": "assertTrue((function testcase() {\n var i = [].indexOf(42);\n if (i === -1) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.indexOf))"
+ },
+ {
+ "id": "15.4.4.14-4-10",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-4-10.js",
+ "description": "Array.prototype.indexOf - 'length' is a number of value -6e-1",
+ "test": "assertTrue((function testcase() {\n var targetObj = [];\n var obj = { 0: targetObj, 100: targetObj, length: -6e-1 };\n return Array.prototype.indexOf.call(obj, targetObj) === -1;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.indexOf))"
+ },
+ {
+ "id": "15.4.4.14-4-11",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-4-11.js",
+ "description": "Array.prototype.indexOf - 'length' is an empty string",
+ "test": "assertTrue((function testcase() {\n var targetObj = [];\n var obj = { 0: targetObj, 100: targetObj, length: \"\" };\n return Array.prototype.indexOf.call(obj, targetObj) === -1;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.indexOf))"
+ },
+ {
+ "id": "15.4.4.14-4-2",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-4-2.js",
+ "description": "Array.prototype.indexOf returns -1 if 'length' is 0 ( length overridden to null (type conversion))",
+ "test": "assertTrue((function testcase() {\n \n var i = Array.prototype.indexOf.call({length: null}, 1);\n \n if (i === -1) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.lastIndexOf))"
+ },
+ {
+ "id": "15.4.4.14-4-3",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-4-3.js",
+ "description": "Array.prototype.indexOf returns -1 if 'length' is 0 (length overridden to false (type conversion))",
+ "test": "assertTrue((function testcase() {\n \n var i = Array.prototype.indexOf.call({length: false}, 1);\n \n if (i === -1) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.lastIndexOf))"
+ },
+ {
+ "id": "15.4.4.14-4-4",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-4-4.js",
+ "description": "Array.prototype.indexOf returns -1 if 'length' is 0 (generic 'array' with length 0 )",
+ "test": "assertTrue((function testcase() {\n \n var i = Array.prototype.lastIndexOf.call({length: 0}, 1);\n \n if (i === -1) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.lastIndexOf))"
+ },
+ {
+ "id": "15.4.4.14-4-5",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-4-5.js",
+ "description": "Array.prototype.indexOf returns -1 if 'length' is 0 ( length overridden to '0' (type conversion))",
+ "test": "assertTrue((function testcase() {\n \n var i = Array.prototype.indexOf.call({length: '0'}, 1);\n \n if (i === -1) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.lastIndexOf))"
+ },
+ {
+ "id": "15.4.4.14-4-6",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-4-6.js",
+ "description": "Array.prototype.indexOf returns -1 if 'length' is 0 (subclassed Array, length overridden with obj with valueOf)",
+ "test": "assertTrue((function testcase() {\n \n var i = Array.prototype.indexOf.call({length: { valueOf: function () { return 0;}}}, 1);\n \n if (i === -1) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.lastIndexOf))"
+ },
+ {
+ "id": "15.4.4.14-4-7",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-4-7.js",
+ "description": "Array.prototype.indexOf returns -1 if 'length' is 0 ( length is object overridden with obj w/o valueOf (toString))",
+ "test": "assertTrue((function testcase() {\n\n \n // objects inherit the default valueOf method of the Object object;\n // that simply returns the itself. Since the default valueOf() method\n // does not return a primitive value, ES next tries to convert the object\n // to a number by calling its toString() method and converting the\n // resulting string to a number.\n var i = Array.prototype.indexOf.call({length: { toString: function () { return '0';}}}, 1);\n \n if (i === -1) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.lastIndexOf))"
+ },
+ {
+ "id": "15.4.4.14-4-8",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-4-8.js",
+ "description": "Array.prototype.indexOf returns -1 if 'length' is 0 (length is an empty array)",
+ "test": "assertTrue((function testcase() {\n\n \n // objects inherit the default valueOf method of the Object object;\n // that simply returns the itself. Since the default valueOf() method\n // does not return a primitive value, ES next tries to convert the object\n // to a number by calling its toString() method and converting the\n // resulting string to a number.\n //\n // The toString( ) method on Array converts the array elements to strings,\n // then returns the result of concatenating these strings, with commas in\n // between. An array with no elements converts to the empty string, which\n // converts to the number 0. If an array has a single element that is a\n // number n, the array converts to a string representation of n, which is\n // then converted back to n itself. If an array contains more than one element,\n // or if its one element is not a number, the array converts to NaN.\n var i = Array.prototype.indexOf.call({length: [ ]}, 1);\n \n if (i === -1) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.lastIndexOf))"
+ },
+ {
+ "id": "15.4.4.14-4-9",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-4-9.js",
+ "description": "Array.prototype.indexOf - 'length' is a number of value 0.1",
+ "test": "assertTrue((function testcase() {\n var targetObj = [];\n var obj = { 0: targetObj, 100: targetObj, length: 0.1 };\n return Array.prototype.indexOf.call(obj, targetObj) === -1;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.indexOf))"
+ },
+ {
+ "id": "15.4.4.14-5-1",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-1.js",
+ "description": "Array.prototype.indexOf when fromIndex is string",
+ "test": "assertTrue((function testcase() {\n var a = [1,2,1,2,1,2];\n if (a.indexOf(2,\"2\") === 3 && // \"2\" resolves to 2 \n a.indexOf(2,\"one\") === 1) { // \"one\" resolves to 0\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.indexOf))"
+ },
+ {
+ "id": "15.4.4.14-5-10",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-10.js",
+ "description": "Array.prototype.indexOf - value of 'fromIndex' is a number (value is positive number)",
+ "test": "assertTrue((function testcase() {\n var targetObj = {};\n return [0, targetObj, 2].indexOf(targetObj, 2) === -1 &&\n [0, 1, targetObj].indexOf(targetObj, 2) === 2;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.indexOf))"
+ },
+ {
+ "id": "15.4.4.14-5-11",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-11.js",
+ "description": "Array.prototype.indexOf - value of 'fromIndex' is a number (value is negative number)",
+ "test": "assertTrue((function testcase() {\n var targetObj = {};\n return [0, targetObj, 2].indexOf(targetObj, -1) === -1 &&\n [0, 1, targetObj].indexOf(targetObj, -1) === 2;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.indexOf))"
+ },
+ {
+ "id": "15.4.4.14-5-12",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-12.js",
+ "description": "Array.prototype.indexOf - value of 'fromIndex' is a number (value is Infinity)",
+ "test": "assertTrue((function testcase() {\n var arr = [];\n arr[Math.pow(2, 32) - 2] = true; //length is the max value of Uint type\n return arr.indexOf(true, Infinity) === -1;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.indexOf))"
+ },
+ {
+ "id": "15.4.4.14-5-13",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-13.js",
+ "description": "Array.prototype.indexOf - value of 'fromIndex' is a number (value is -Infinity)",
+ "test": "assertTrue(([true].indexOf(true, -Infinity) === 0));\n",
+ "precondition": "(fnExists(Array.prototype.indexOf))"
+ },
+ {
+ "id": "15.4.4.14-5-14",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-14.js",
+ "description": "Array.prototype.indexOf - value of 'fromIndex' is a number (value is NaN)",
+ "test": "assertTrue(([true].indexOf(true, NaN) === 0 && [true].indexOf(true, -NaN) === 0));\n",
+ "precondition": "(fnExists(Array.prototype.indexOf))"
+ },
+ {
+ "id": "15.4.4.14-5-15",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-15.js",
+ "description": "Array.prototype.indexOf - value of 'fromIndex' is a string containing a negative number",
+ "test": "assertTrue(([0, true, 2].indexOf(true, \"-1\") === -1 &&\n [0, 1, true].indexOf(true, \"-1\") === 2));\n",
+ "precondition": "(fnExists(Array.prototype.indexOf))"
+ },
+ {
+ "id": "15.4.4.14-5-16",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-16.js",
+ "description": "Array.prototype.indexOf - value of 'fromIndex' is a string containing Infinity",
+ "test": "assertTrue((function testcase() {\n var arr = [];\n arr[Math.pow(2, 32) - 2] = true; //length is the max value of Uint type\n return arr.indexOf(true, \"Infinity\") === -1;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.indexOf))"
+ },
+ {
+ "id": "15.4.4.14-5-17",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-17.js",
+ "description": "Array.prototype.indexOf - value of 'fromIndex' is a string containing -Infinity",
+ "test": "assertTrue(([true].indexOf(true, \"-Infinity\") === 0));\n",
+ "precondition": "(fnExists(Array.prototype.indexOf))"
+ },
+ {
+ "id": "15.4.4.14-5-18",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-18.js",
+ "description": "Array.prototype.indexOf - value of 'fromIndex' is a string containing an exponential number",
+ "test": "assertTrue((function testcase() {\n var targetObj = {};\n return [0, 1, targetObj, 3, 4].indexOf(targetObj, \"3E0\") === -1 &&\n [0, 1, 2, targetObj, 4].indexOf(targetObj, \"3E0\") === 3;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.indexOf))"
+ },
+ {
+ "id": "15.4.4.14-5-19",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-19.js",
+ "description": "Array.prototype.indexOf - value of 'fromIndex' is a string containing a hex number",
+ "test": "assertTrue((function testcase() {\n var targetObj = {};\n return [0, 1, targetObj, 3, 4].indexOf(targetObj, \"0x0003\") === -1 &&\n [0, 1, 2, targetObj, 4].indexOf(targetObj, \"0x0003\") === 3;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.indexOf))"
+ },
+ {
+ "id": "15.4.4.14-5-2",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-2.js",
+ "description": "Array.prototype.indexOf when fromIndex is floating point number",
+ "test": "assertTrue((function testcase() {\n var a = new Array(1,2,3);\n if (a.indexOf(3,0.49) === 2 && // 0.49 resolves to 0\n a.indexOf(1,0.51) === 0 && // 0.51 resolves to 0\n a.indexOf(1,1.51) === -1) { // 1.01 resolves to 1\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.indexOf))"
+ },
+ {
+ "id": "15.4.4.14-5-20",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-20.js",
+ "description": "Array.prototype.indexOf - value of 'fromIndex' which is a string containing a number with leading zeros",
+ "test": "assertTrue((function testcase() {\n var targetObj = {};\n return [0, 1, targetObj, 3, 4].indexOf(targetObj, \"0003.10\") === -1 &&\n [0, 1, 2, targetObj, 4].indexOf(targetObj, \"0003.10\") === 3;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.indexOf))"
+ },
+ {
+ "id": "15.4.4.14-5-21",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-21.js",
+ "description": "Array.prototype.indexOf - value of 'fromIndex' is an Object, which has an own toString method",
+ "test": "assertTrue((function testcase() {\n\n // objects inherit the default valueOf() method from Object\n // that simply returns itself. Since the default valueOf() method\n // does not return a primitive value, ES next tries to convert the object\n // to a number by calling its toString() method and converting the\n // resulting string to a number.\n var fromIndex = {\n toString: function () {\n return '1';\n }\n };\n\n return [0, true].indexOf(true, fromIndex) === 1;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.indexOf))"
+ },
+ {
+ "id": "15.4.4.14-5-22",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-22.js",
+ "description": "Array.prototype.indexOf - value of 'fromIndex' is an Object, which has an own valueOf method",
+ "test": "assertTrue((function testcase() {\n\n var fromIndex = {\n valueOf: function () {\n return 1;\n }\n };\n\n\n return [0, true].indexOf(true, fromIndex) === 1;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.indexOf))"
+ },
+ {
+ "id": "15.4.4.14-5-23",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-23.js",
+ "description": "Array.prototype.indexOf - value of 'fromIndex' is an object that has an own valueOf method that returns an object and toString method that returns a string",
+ "test": "assertTrue((function testcase() {\n\n var toStringAccessed = false;\n var valueOfAccessed = false;\n\n var fromIndex = {\n toString: function () {\n toStringAccessed = true;\n return '1';\n },\n\n valueOf: function () {\n valueOfAccessed = true;\n return {};\n }\n };\n\n return [0, true].indexOf(true, fromIndex) === 1 && toStringAccessed && valueOfAccessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.indexOf))"
+ },
+ {
+ "id": "15.4.4.14-5-24",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-24.js",
+ "description": "Array.prototype.indexOf throws TypeError exception when value of 'fromIndex' is an object with toString and valueOf methods that don�t return primitive values",
+ "test": "assertTrue((function testcase() {\n\n var toStringAccessed = false;\n var valueOfAccessed = false;\n var fromIndex = {\n toString: function () {\n toStringAccessed = true;\n return {};\n },\n\n valueOf: function () {\n valueOfAccessed = true;\n return {};\n }\n };\n\n try {\n [0, true].indexOf(true, fromIndex);\n return false;\n } catch (e) {\n return toStringAccessed && valueOfAccessed;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.indexOf))"
+ },
+ {
+ "id": "15.4.4.14-5-25",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-25.js",
+ "description": "Array.prototype.indexOf uses inherited valueOf method when value of 'fromIndex' is an object with an own toString and inherited valueOf methods",
+ "test": "assertTrue((function testcase() {\n\n var toStringAccessed = false;\n var valueOfAccessed = false;\n\n var proto = {\n valueOf: function () {\n valueOfAccessed = true;\n return 1;\n }\n };\n\n var Con = function () {};\n Con.prototype = proto;\n\n var child = new Con();\n child.toString = function () {\n toStringAccessed = true;\n return 2;\n };\n\n return [0, true].indexOf(true, child) === 1 && valueOfAccessed && !toStringAccessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.indexOf))"
+ },
+ {
+ "id": "15.4.4.14-5-26",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-26.js",
+ "description": "Array.prototype.indexOf - side effects produced by step 2 are visible when an exception occurs",
+ "test": "assertTrue((function testcase() {\n var stepTwoOccurs = false;\n var stepFiveOccurs = false;\n\n var obj = {};\n\n Object.defineProperty(obj, \"length\", {\n get: function () {\n stepTwoOccurs = true;\n if (stepFiveOccurs) {\n throw new Error(\"Step 5 occurred out of order\");\n }\n return 20;\n },\n configurable: true\n });\n\n var fromIndex = {\n valueOf: function () {\n stepFiveOccurs = true;\n return 0;\n }\n };\n\n try {\n Array.prototype.indexOf.call(obj, undefined, fromIndex);\n return stepTwoOccurs && stepFiveOccurs;\n } catch (ex) {\n return false;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.indexOf) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.4.4.14-5-27",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-27.js",
+ "description": "Array.prototype.indexOf - side effects produced by step 3 are visible when an exception occurs",
+ "test": "assertTrue((function testcase() {\n var stepThreeOccurs = false;\n var stepFiveOccurs = false;\n\n var obj = {};\n\n Object.defineProperty(obj, \"length\", {\n get: function () {\n return {\n valueOf: function () {\n stepThreeOccurs = true;\n if (stepFiveOccurs) {\n throw new Error(\"Step 5 occurred out of order\");\n }\n return 20;\n }\n };\n },\n configurable: true\n });\n\n var fromIndex = {\n valueOf: function () {\n stepFiveOccurs = true;\n return 0;\n }\n };\n\n try {\n Array.prototype.indexOf.call(obj, undefined, fromIndex);\n return stepThreeOccurs && stepFiveOccurs;\n } catch (ex) {\n return false;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.indexOf) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.4.4.14-5-28",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-28.js",
+ "description": "Array.prototype.indexOf - side effects produced by step 1 are visible when an exception occurs",
+ "test": "assertTrue((function testcase() {\n\n var stepFiveOccurs = false;\n var fromIndex = {\n valueOf: function () {\n stepFiveOccurs = true;\n return 0;\n }\n };\n\n try {\n Array.prototype.indexOf.call(undefined, undefined, fromIndex);\n return false;\n } catch (e) {\n return (e instanceof TypeError) && !stepFiveOccurs;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.indexOf))"
+ },
+ {
+ "id": "15.4.4.14-5-29",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-29.js",
+ "description": "Array.prototype.indexOf - side effects produced by step 2 are visible when an exception occurs",
+ "test": "assertTrue((function testcase() {\n\n var stepFiveOccurs = false;\n \n var obj = {};\n Object.defineProperty(obj, \"length\", {\n get: function () {\n throw new RangeError();\n },\n configurable: true\n });\n\n var fromIndex = {\n valueOf: function () {\n stepFiveOccurs = true;\n return 0;\n }\n };\n\n try {\n Array.prototype.indexOf.call(obj, undefined, fromIndex);\n return false;\n } catch (e) {\n return (e instanceof RangeError) && !stepFiveOccurs;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.indexOf) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.4.4.14-5-3",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-3.js",
+ "description": "Array.prototype.indexOf when fromIndex is boolean",
+ "test": "assertTrue((function testcase() {\n var a = [1,2,3];\n if (a.indexOf(1,true) === -1 && // true resolves to 1\n a.indexOf(1,false) === 0 ) { // false resolves to 0\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.indexOf))"
+ },
+ {
+ "id": "15.4.4.14-5-30",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-30.js",
+ "description": "Array.prototype.indexOf - side effects produced by step 3 are visible when an exception occurs",
+ "test": "assertTrue((function testcase() {\n\n var stepFiveOccurs = false;\n\n var obj = {};\n Object.defineProperty(obj, \"length\", {\n get: function () {\n return {\n valueOf: function () {\n throw new TypeError();\n }\n };\n },\n configurable: true\n });\n\n var fromIndex = {\n valueOf: function () {\n stepFiveOccurs = true;\n return 0;\n }\n };\n\n try {\n Array.prototype.indexOf.call(obj, undefined, fromIndex);\n return false;\n } catch (e) {\n return (e instanceof TypeError) && !stepFiveOccurs;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.indexOf) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.4.4.14-5-31",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-31.js",
+ "description": "Array.prototype.indexOf - 'fromIndex' is a positive non-integer, verify truncation occurs in the proper direction",
+ "test": "assertTrue((function testcase() {\n var targetObj = {};\n return [0, targetObj, 2].indexOf(targetObj, 2.5) === -1 &&\n [0, 1, targetObj].indexOf(targetObj, 2.5) === 2;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.indexOf))"
+ },
+ {
+ "id": "15.4.4.14-5-32",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-32.js",
+ "description": "Array.prototype.indexOf - 'fromIndex' is a negative non-integer, verify truncation occurs in the proper direction",
+ "test": "assertTrue((function testcase() {\n var targetObj = {};\n return [0, targetObj, 2].indexOf(targetObj, -1.5) === -1 &&\n [0, 1, targetObj].indexOf(targetObj, -1.5) === 2;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.indexOf))"
+ },
+ {
+ "id": "15.4.4.14-5-33",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-33.js",
+ "description": "Array.prototype.indexOf match on the first element, a middle element and the last element when 'fromIndex' is passed",
+ "test": "assertTrue(([0, 1, 2, 3, 4].indexOf(0, 0) === 0 &&\n [0, 1, 2, 3, 4].indexOf(2, 1) === 2 &&\n [0, 1, 2, 3, 4].indexOf(2, 2) === 2 &&\n [0, 1, 2, 3, 4].indexOf(4, 2) === 4 &&\n [0, 1, 2, 3, 4].indexOf(4, 4) === 4));\n",
+ "precondition": "(fnExists(Array.prototype.indexOf))"
+ },
+ {
+ "id": "15.4.4.14-5-4",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-4.js",
+ "description": "Array.prototype.indexOf returns 0 if fromIndex is 'undefined'",
+ "test": "assertTrue((function testcase() {\n var a = [1,2,3];\n if (a.indexOf(1,undefined) === 0) { // undefined resolves to 0\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.indexOf))"
+ },
+ {
+ "id": "15.4.4.14-5-5",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-5.js",
+ "description": "Array.prototype.indexOf returns 0 if fromIndex is null",
+ "test": "assertTrue((function testcase() {\n var a = [1,2,3];\n if (a.indexOf(1,null) === 0 ) { // null resolves to 0\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.indexOf))"
+ },
+ {
+ "id": "15.4.4.14-5-6",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-6.js",
+ "description": "Array.prototype.indexOf - 'fromIndex' isn't passed",
+ "test": "assertTrue((function testcase() {\n var arr = [0, 1, 2, 3, 4];\n //'fromIndex' will be set as 0 if not passed by default\n return arr.indexOf(0) === arr.indexOf(0, 0) &&\n arr.indexOf(2) === arr.indexOf(2, 0) &&\n arr.indexOf(4) === arr.indexOf(4, 0); \n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.indexOf))"
+ },
+ {
+ "id": "15.4.4.14-5-7",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-7.js",
+ "description": "Array.prototype.indexOf - value of 'fromIndex' is a number (value is 0)",
+ "test": "assertTrue(([true].indexOf(true, 0) === 0));\n",
+ "precondition": "(fnExists(Array.prototype.indexOf))"
+ },
+ {
+ "id": "15.4.4.14-5-8",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-8.js",
+ "description": "Array.prototype.indexOf - value of 'fromIndex' is a number (value is +0)",
+ "test": "assertTrue(([true].indexOf(true, +0) === 0));\n",
+ "precondition": "(fnExists(Array.prototype.indexOf))"
+ },
+ {
+ "id": "15.4.4.14-5-9",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-5-9.js",
+ "description": "Array.prototype.indexOf - value of 'fromIndex' is a number (value is -0)",
+ "test": "assertTrue(([true].indexOf(true, -0) === 0));\n",
+ "precondition": "(fnExists(Array.prototype.indexOf))"
+ },
+ {
+ "id": "15.4.4.14-6-1",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-6-1.js",
+ "description": "Array.prototype.indexOf returns -1 if fromIndex is greater than Array length",
+ "test": "assertTrue((function testcase() {\n var a = [1,2,3];\n if (a.indexOf(1,5) === -1 && \n a.indexOf(1,3) === -1 &&\n [ ].indexOf(1,0) === -1 ){\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.indexOf))"
+ },
+ {
+ "id": "15.4.4.14-7-1",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-7-1.js",
+ "description": "Array.prototype.indexOf returns -1 when 'fromIndex' is length of array - 1",
+ "test": "assertTrue(([1, 2, 3].indexOf(1, 2) === -1));\n",
+ "precondition": "(fnExists(Array.prototype.indexOf))"
+ },
+ {
+ "id": "15.4.4.14-7-2",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-7-2.js",
+ "description": "Array.prototype.indexOf returns correct index when 'fromIndex' is length of array - 1",
+ "test": "assertTrue(([1, 2, 3].indexOf(3, 2) === 2));\n",
+ "precondition": "(fnExists(Array.prototype.indexOf))"
+ },
+ {
+ "id": "15.4.4.14-7-3",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-7-3.js",
+ "description": "Array.prototype.indexOf returns -1 when 'fromIndex' and 'length' are both 0",
+ "test": "assertTrue(([].indexOf(1, 0) === -1));\n",
+ "precondition": "(fnExists(Array.prototype.indexOf))"
+ },
+ {
+ "id": "15.4.4.14-7-4",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-7-4.js",
+ "description": "Array.prototype.indexOf returns -1 when 'fromIndex' is 1",
+ "test": "assertTrue(([1, 2, 3].indexOf(1, 1) === -1));\n",
+ "precondition": "(fnExists(Array.prototype.indexOf))"
+ },
+ {
+ "id": "15.4.4.14-7-5",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-7-5.js",
+ "description": "Array.prototype.indexOf returns correct index when 'fromIndex' is 1",
+ "test": "assertTrue(([1, 2, 3].indexOf(2, 1) === 1));\n",
+ "precondition": "(fnExists(Array.prototype.indexOf))"
+ },
+ {
+ "id": "15.4.4.14-8-1",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-8-1.js",
+ "description": "Array.prototype.indexOf with negative fromIndex",
+ "test": "assertTrue((function testcase() {\n var a = new Array(1,2,3);\n \n if (a.indexOf(2,-1) === -1 && \n a.indexOf(2,-2) === 1 && \n a.indexOf(1,-3) === 0 && \n a.indexOf(1,-5.3) === 0 ) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.indexOf))"
+ },
+ {
+ "id": "15.4.4.14-8-2",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-8-2.js",
+ "description": "Array.prototype.indexOf returns correct index when 'fromIndex' is -1",
+ "test": "assertTrue(([1, 2, 3, 4].indexOf(4, -1) === 3));\n",
+ "precondition": "(fnExists(Array.prototype.indexOf))"
+ },
+ {
+ "id": "15.4.4.14-8-3",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-8-3.js",
+ "description": "Array.prototype.indexOf returns -1 when abs('fromIndex') is length of array - 1",
+ "test": "assertTrue(([1, 2, 3, 4].indexOf(1, -3) === -1));\n",
+ "precondition": "(fnExists(Array.prototype.indexOf))"
+ },
+ {
+ "id": "15.4.4.14-8-4",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-8-4.js",
+ "description": "Array.prototype.indexOf returns -1 when abs('fromIndex') is length of array",
+ "test": "assertTrue(([1, 2, 3, 4].indexOf(0, -4) === -1));\n",
+ "precondition": "(fnExists(Array.prototype.indexOf))"
+ },
+ {
+ "id": "15.4.4.14-9-1",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-1.js",
+ "description": "Array.prototype.indexOf must return correct index (boolean)",
+ "test": "assertTrue((function testcase() {\n var obj = {toString:function (){return true}};\n var _false = false;\n var a = [obj,\"true\", undefined,0,_false,null,1,\"str\",0,1,true,false,true,false];\n if (a.indexOf(true) === 10 && //a[10]=true\n a.indexOf(false) === 4) //a[4] =_false\n {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.indexOf))"
+ },
+ {
+ "id": "15.4.4.14-9-10",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-10.js",
+ "description": "Array.prototype.indexOf must return correct index (NaN)",
+ "test": "assertTrue((function testcase() {\n var _NaN = NaN;\n var a = new Array(\"NaN\",undefined,0,false,null,{toString:function (){return NaN}},\"false\",_NaN,NaN);\n if (a.indexOf(NaN) === -1) // NaN is equal to nothing, including itself.\n {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.indexOf))"
+ },
+ {
+ "id": "15.4.4.14-9-11",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-11.js",
+ "description": "Array.prototype.indexOf - the length of iteration isn't changed by adding elements to the array during iteration",
+ "test": "assertTrue((function testcase() {\n\n var arr = [20];\n\n Object.defineProperty(arr, \"0\", {\n get: function () {\n arr[1] = 1;\n return 0;\n },\n configurable: true\n });\n\n return arr.indexOf(1) === -1;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.indexOf) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.4.4.14-9-2",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-2.js",
+ "description": "Array.prototype.indexOf must return correct index (Number)",
+ "test": "assertTrue((function testcase() {\n var obj = {toString:function (){return 0}};\n var one = 1;\n var _float = -(4/3);\n var a = new Array(false,undefined,null,\"0\",obj,-1.3333333333333, \"str\",-0,true,+0, one, 1,0, false, _float, -(4/3));\n if (a.indexOf(-(4/3)) === 14 && // a[14]=_float===-(4/3)\n a.indexOf(0) === 7 && // a[7] = +0, 0===+0\n a.indexOf(-0) === 7 && // a[7] = +0, -0===+0\n a.indexOf(1) === 10 ) // a[10] =one=== 1\n {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.indexOf))"
+ },
+ {
+ "id": "15.4.4.14-9-3",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-3.js",
+ "description": "Array.prototype.indexOf must return correct index(string)",
+ "test": "assertTrue((function testcase() {\n var obj = {toString:function (){return \"false\"}};\n var szFalse = \"false\";\n var a = new Array(\"false1\",undefined,0,false,null,1,obj,0,szFalse, \"false\");\n if (a.indexOf(\"false\") === 8) //a[8]=szFalse\n {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.indexOf))"
+ },
+ {
+ "id": "15.4.4.14-9-4",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-4.js",
+ "description": "Array.prototype.indexOf must return correct index(undefined)",
+ "test": "assertTrue((function testcase() {\n var obj = {toString:function (){return undefined;}};\n var _undefined1 = undefined;\n var _undefined2;\n var a = new Array(true,0,false,null,1,\"undefined\",obj,1,_undefined2,_undefined1,undefined);\n if (a.indexOf(undefined) === 8) //a[8]=_undefined2\n {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.indexOf))"
+ },
+ {
+ "id": "15.4.4.14-9-5",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-5.js",
+ "description": "Array.prototype.indexOf must return correct index (Object)",
+ "test": "assertTrue((function testcase() {\n var obj1 = {toString:function (){return \"false\"}};\n var obj2 = {toString:function (){return \"false\"}};\n var obj3 = obj1;\n var a = new Array(false,undefined,0,false,null,{toString:function (){return \"false\"}},\"false\",obj2,obj1,obj3);\n if (a.indexOf(obj3) === 8) //a[8] = obj1;\n {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.indexOf))"
+ },
+ {
+ "id": "15.4.4.14-9-6",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-6.js",
+ "description": "Array.prototype.indexOf must return correct index(null)",
+ "test": "assertTrue((function testcase() {\n var obj = {toString:function (){return null}};\n var _null = null;\n var a = new Array(true,undefined,0,false,_null,1,\"str\",0,1,obj,true,false,null);\n if (a.indexOf(null) === 4 ) //a[4]=_null\n {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.indexOf))"
+ },
+ {
+ "id": "15.4.4.14-9-7",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-7.js",
+ "description": "Array.prototype.indexOf must return correct index (self reference)",
+ "test": "assertTrue((function testcase() {\n var a = new Array(0,1,2,3); \n a[2] = a;\n if (a.indexOf(a) === 2 && \n a.indexOf(3) === 3 ) \n {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.indexOf))"
+ },
+ {
+ "id": "15.4.4.14-9-8",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-8.js",
+ "description": "Array.prototype.indexOf must return correct index (Array)",
+ "test": "assertTrue((function testcase() {\n var b = new Array(\"0,1\"); \n var a = new Array(0,b,\"0,1\",3); \n if (a.indexOf(b.toString()) === 2 && \n a.indexOf(\"0,1\") === 2 ) \n {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.indexOf))"
+ },
+ {
+ "id": "15.4.4.14-9-9",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-9.js",
+ "description": "Array.prototype.indexOf must return correct index (Sparse Array)",
+ "test": "assertTrue((function testcase() {\n var a = new Array(0,1); \n a[4294967294] = 2; // 2^32-2 - is max array element\n a[4294967295] = 3; // 2^32-1 added as non-array element property\n a[4294967296] = 4; // 2^32 added as non-array element property\n a[4294967297] = 5; // 2^32+1 added as non-array element property\n\n // start searching near the end so in case implementation actually tries to test all missing elements!!\n return (a.indexOf(2,4294967290 ) === 4294967294 && \n a.indexOf(3,4294967290) === -1 && \n a.indexOf(4,4294967290) === -1 && \n a.indexOf(5,4294967290) === -1 ) ;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.indexOf))"
+ },
+ {
+ "id": "15.4.4.14-9-a-1",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-a-1.js",
+ "description": "Array.prototype.indexOf - added properties in step 2 are visible here",
+ "test": "assertTrue((function testcase() {\n\n var arr = { };\n\n Object.defineProperty(arr, \"length\", {\n get: function () {\n arr[2] = \"length\";\n return 3;\n },\n configurable: true\n });\n\n return 2 === Array.prototype.indexOf.call(arr, \"length\");\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.indexOf) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.4.4.14-9-a-10",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-a-10.js",
+ "description": "Array.prototype.indexOf - properties can be added to prototype after current position are visited on an Array",
+ "test": "assertTrue((function testcase() {\n\n var arr = [0, , 2];\n\n Object.defineProperty(arr, \"0\", {\n get: function () {\n Object.defineProperty(Array.prototype, \"1\", {\n get: function () {\n return 6.99;\n },\n configurable: true\n });\n return 0;\n },\n configurable: true\n });\n\n try {\n return arr.indexOf(6.99) === 1;\n } finally {\n delete Array.prototype[1];\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.indexOf) && fnExists(Object.defineProperty) && ![, 1].hasOwnProperty(0) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.4.4.14-9-a-11",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-a-11.js",
+ "description": "Array.prototype.indexOf - deleting own property causes index property not to be visited on an Array-like object",
+ "test": "assertTrue((function testcase() {\n\n var arr = { length: 2 };\n\n Object.defineProperty(arr, \"1\", {\n get: function () {\n return 6.99;\n },\n configurable: true\n });\n\n Object.defineProperty(arr, \"0\", {\n get: function () {\n delete arr[1];\n return 0;\n },\n configurable: true\n });\n\n return -1 === Array.prototype.indexOf.call(arr, 6.99);\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.indexOf) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects())"
+ },
+ {
+ "id": "15.4.4.14-9-a-12",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-a-12.js",
+ "description": "Array.prototype.indexOf - deleting own property causes index property not to be visited on an Array",
+ "test": "assertTrue((function testcase() {\n\n var arr = [1, 2];\n\n Object.defineProperty(arr, \"1\", {\n get: function () {\n return \"6.99\";\n },\n configurable: true\n });\n\n Object.defineProperty(arr, \"0\", {\n get: function () {\n delete arr[1];\n return 0;\n },\n configurable: true\n });\n\n return -1 === arr.indexOf(\"6.99\");\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.indexOf) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.4.4.14-9-a-13",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-a-13.js",
+ "description": "Array.prototype.indexOf - deleting property of prototype causes prototype index property not to be visited on an Array-like Object",
+ "test": "assertTrue((function testcase() {\n\n var arr = { 2: 2, length: 20 };\n\n Object.defineProperty(arr, \"0\", {\n get: function () {\n delete Object.prototype[1];\n return 0;\n },\n configurable: true\n });\n\n try {\n Object.prototype[1] = 1;\n return -1 === Array.prototype.indexOf.call(arr, 1);\n } finally {\n delete Object.prototype[1];\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.indexOf) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects())"
+ },
+ {
+ "id": "15.4.4.14-9-a-14",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-a-14.js",
+ "description": "Array.prototype.indexOf - deleting property of prototype causes prototype index property not to be visited on an Array",
+ "test": "assertTrue((function testcase() {\n\n var arr = [0, , 2];\n\n Object.defineProperty(arr, \"0\", {\n get: function () {\n delete Array.prototype[1];\n return 0;\n },\n configurable: true\n });\n\n try {\n Array.prototype[1] = 1;\n return -1 === arr.indexOf(1);\n } finally {\n delete Array.prototype[1];\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.indexOf) && fnExists(Object.defineProperty) && ![, 1].hasOwnProperty(0) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.4.4.14-9-a-15",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-a-15.js",
+ "description": "Array.prototype.indexOf - deleting own property with prototype property causes prototype index property to be visited on an Array-like object",
+ "test": "assertTrue((function testcase() {\n\n var arr = { 0: 0, 1: 111, 2: 2, length: 10 };\n \n Object.defineProperty(arr, \"0\", {\n get: function () {\n delete arr[1];\n return 0;\n },\n configurable: true\n });\n\n try {\n Object.prototype[1] = 1;\n return 1 === Array.prototype.indexOf.call(arr, 1);\n } finally {\n delete Object.prototype[1];\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.indexOf) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects())"
+ },
+ {
+ "id": "15.4.4.14-9-a-16",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-a-16.js",
+ "description": "Array.prototype.indexOf - deleting own property with prototype property causes prototype index property to be visited on an Array",
+ "test": "assertTrue((function testcase() {\n\n var arr = [0, 111, 2]; \n \n Object.defineProperty(arr, \"0\", {\n get: function () {\n delete arr[1];\n return 0;\n },\n configurable: true\n });\n\n try {\n Array.prototype[1] = 1;\n return 1 === arr.indexOf(1);\n } finally {\n delete Array.prototype[1];\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.indexOf) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.4.4.14-9-a-17",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-a-17.js",
+ "description": "Array.prototype.indexOf - decreasing length of array causes index property not to be visited",
+ "test": "assertTrue((function testcase() {\n\n var arr = [0, 1, 2, \"last\"];\n\n Object.defineProperty(arr, \"0\", {\n get: function () {\n arr.length = 3;\n return 0;\n },\n configurable: true\n });\n\n return -1 === arr.indexOf(\"last\");\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.indexOf) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.4.4.14-9-a-18",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-a-18.js",
+ "description": "Array.prototype.indexOf - decreasing length of array with prototype property causes prototype index property to be visited",
+ "test": "assertTrue((function testcase() {\n\n var arr = [0, 1, 2];\n\n try {\n Object.defineProperty(Array.prototype, \"2\", {\n get: function () {\n return \"prototype\";\n },\n configurable: true\n });\n\n Object.defineProperty(arr, \"1\", {\n get: function () {\n arr.length = 2;\n return 1;\n },\n configurable: true\n });\n\n return 2 === arr.indexOf(\"prototype\");\n } finally {\n delete Array.prototype[2];\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.indexOf) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.4.4.14-9-a-19",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-a-19.js",
+ "description": "Array.prototype.indexOf - decreasing length of array does not delete non-configurable properties",
+ "test": "assertTrue((function testcase() {\n\n var arr = [0, 1, 2];\n\n Object.defineProperty(arr, \"2\", {\n get: function () {\n return \"unconfigurable\";\n },\n configurable: false\n });\n\n Object.defineProperty(arr, \"1\", {\n get: function () {\n arr.length = 2;\n return 1;\n },\n configurable: true\n });\n \n return 2 === arr.indexOf(\"unconfigurable\");\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.indexOf) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.4.4.14-9-a-2",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-a-2.js",
+ "description": "Array.prototype.indexOf - added properties in step 5 are visible here on an Array-like object",
+ "test": "assertTrue((function testcase() {\n\n var arr = { length: 30 };\n var targetObj = function () { };\n\n var fromIndex = {\n valueOf: function () {\n arr[4] = targetObj;\n return 3;\n }\n };\n \n return 4 === Array.prototype.indexOf.call(arr, targetObj, fromIndex);\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.indexOf))"
+ },
+ {
+ "id": "15.4.4.14-9-a-3",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-a-3.js",
+ "description": "Array.prototype.indexOf - added properties in step 5 are visible here on an Array",
+ "test": "assertTrue((function testcase() {\n\n var arr = [];\n arr.length = 30;\n var targetObj = function () { };\n\n var fromIndex = {\n valueOf: function () {\n arr[4] = targetObj;\n return 3;\n }\n };\n\n return 4 === arr.indexOf(targetObj, fromIndex);\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.indexOf))"
+ },
+ {
+ "id": "15.4.4.14-9-a-4",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-a-4.js",
+ "description": "Array.prototype.indexOf - deleted properties in step 2 are visible here",
+ "test": "assertTrue((function testcase() {\n\n var arr = { 2: 6.99 };\n\n Object.defineProperty(arr, \"length\", {\n get: function () {\n delete arr[2];\n return 3;\n },\n configurable: true\n });\n\n return -1 === Array.prototype.indexOf.call(arr, 6.99);\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.indexOf) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.4.4.14-9-a-5",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-a-5.js",
+ "description": "Array.prototype.indexOf - deleted properties in step 5 are visible here on an Array-like object",
+ "test": "assertTrue((function testcase() {\n\n var arr = { 10: false, length: 30 };\n\n var fromIndex = {\n valueOf: function () {\n delete arr[10];\n return 3;\n }\n };\n\n return -1 === Array.prototype.indexOf.call(arr, false, fromIndex);\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.indexOf))"
+ },
+ {
+ "id": "15.4.4.14-9-a-6",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-a-6.js",
+ "description": "Array.prototype.indexOf - deleted properties in step 5 are visible here on an Array",
+ "test": "assertTrue((function testcase() {\n\n var arr = [];\n arr[10] = \"10\";\n arr.length = 20;\n\n var fromIndex = {\n valueOf: function () {\n delete arr[10];\n return 3;\n }\n };\n\n return -1 === arr.indexOf(\"10\", fromIndex);\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.indexOf))"
+ },
+ {
+ "id": "15.4.4.14-9-a-7",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-a-7.js",
+ "description": "Array.prototype.indexOf - properties added into own object after current position are visited on an Array-like object",
+ "test": "assertTrue((function testcase() {\n \n var arr = { length: 2 };\n\n Object.defineProperty(arr, \"0\", {\n get: function () {\n Object.defineProperty(arr, \"1\", {\n get: function () {\n return 1;\n },\n configurable: true\n });\n return 0;\n },\n configurable: true\n });\n\n return Array.prototype.indexOf.call(arr, 1) === 1;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.indexOf) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects())"
+ },
+ {
+ "id": "15.4.4.14-9-a-8",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-a-8.js",
+ "description": "Array.prototype.indexOf - properties added into own object after current position are visited on an Array",
+ "test": "assertTrue((function testcase() {\n\n var arr = [0, , 2];\n\n Object.defineProperty(arr, \"0\", {\n get: function () {\n Object.defineProperty(arr, \"1\", {\n get: function () {\n return 1;\n },\n configurable: true\n });\n return 0;\n },\n configurable: true\n });\n\n return arr.indexOf(1) === 1;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.indexOf) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.4.4.14-9-a-9",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-a-9.js",
+ "description": "Array.prototype.indexOf - properties can be added to prototype after current position are visited on an Array-like object",
+ "test": "assertTrue((function testcase() {\n\n var arr = { length: 2 };\n\n Object.defineProperty(arr, \"0\", {\n get: function () {\n Object.defineProperty(Object.prototype, \"1\", {\n get: function () {\n return 6.99;\n },\n configurable: true\n });\n return 0;\n },\n configurable: true\n });\n\n try {\n return Array.prototype.indexOf.call(arr, 6.99) === 1;\n } finally {\n delete Object.prototype[1];\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.indexOf) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects())"
+ },
+ {
+ "id": "15.4.4.14-9-b-1",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-1.js",
+ "description": "Array.prototype.indexOf - non-existent property wouldn't be called",
+ "test": "assertTrue(([0, , 2].indexOf(undefined) === -1));\n",
+ "precondition": "(fnExists(Array.prototype.indexOf))"
+ },
+ {
+ "id": "15.4.4.14-9-b-i-1",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-i-1.js",
+ "description": "Array.prototype.indexOf - element to be retrieved is own data property on an Array-like object",
+ "test": "assertTrue((function testcase() {\n var obj = { 0: 0, 1: 1, 2: 2, length: 3 };\n return Array.prototype.indexOf.call(obj, 0) === 0 &&\n Array.prototype.indexOf.call(obj, 1) === 1 &&\n Array.prototype.indexOf.call(obj, 2) === 2;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.indexOf))"
+ },
+ {
+ "id": "15.4.4.14-9-b-i-10",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-i-10.js",
+ "description": "Array.prototype.indexOf - element to be retrieved is own accessor property on an Array-like object",
+ "test": "assertTrue((function testcase() {\n\n var obj = { length: 3 };\n Object.defineProperty(obj, \"0\", {\n get: function () {\n return 0;\n },\n configurable: true\n });\n\n Object.defineProperty(obj, \"1\", {\n get: function () {\n return 1;\n },\n configurable: true\n });\n\n Object.defineProperty(obj, \"2\", {\n get: function () {\n return 2;\n },\n configurable: true\n });\n\n return 0 === Array.prototype.indexOf.call(obj, 0) &&\n 1 === Array.prototype.indexOf.call(obj, 1) &&\n 2 === Array.prototype.indexOf.call(obj, 2);\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.indexOf) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects())"
+ },
+ {
+ "id": "15.4.4.14-9-b-i-11",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-i-11.js",
+ "description": "Array.prototype.indexOf - element to be retrieved is own accessor property that overrides an inherited data property on an Array",
+ "test": "assertTrue((function testcase() {\n\n var arr = [];\n try {\n Array.prototype[0] = false;\n Object.defineProperty(arr, \"0\", {\n get: function () {\n return true;\n },\n configurable: true\n });\n\n return 0 === arr.indexOf(true);\n } finally {\n delete Array.prototype[0];\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.indexOf) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.4.4.14-9-b-i-12",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-i-12.js",
+ "description": "Array.prototype.indexOf - element to be retrieved is own accessor property that overrides an inherited data property on an Array-like object",
+ "test": "assertTrue((function testcase() {\n var obj = { length: 1 };\n\n try {\n Object.prototype[0] = false;\n Object.defineProperty(obj, \"0\", {\n get: function () {\n return true;\n },\n configurable: true\n });\n\n return 0 === Array.prototype.indexOf.call(obj, true);\n } finally {\n delete Object.prototype[0];\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.indexOf) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects())"
+ },
+ {
+ "id": "15.4.4.14-9-b-i-13",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-i-13.js",
+ "description": "Array.prototype.indexOf - element to be retrieved is own accessor property that overrides an inherited accessor property on an Array",
+ "test": "assertTrue((function testcase() {\n\n var arr = [];\n try {\n Object.defineProperty(Array.prototype, \"0\", {\n get: function () {\n return false;\n },\n configurable: true\n });\n\n Object.defineProperty(arr, \"0\", {\n get: function () {\n return true;\n },\n configurable: true\n });\n\n return 0 === arr.indexOf(true);\n } finally {\n delete Array.prototype[0];\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.indexOf) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.4.4.14-9-b-i-14",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-i-14.js",
+ "description": "Array.prototype.indexOf - element to be retrieved is own accessor property that overrides an inherited accessor property on an Array-like object",
+ "test": "assertTrue((function testcase() {\n\n var obj = { length: 1 };\n\n try {\n Object.defineProperty(Object.prototype, \"0\", {\n get: function () {\n return false;\n },\n configurable: true\n });\n\n Object.defineProperty(obj, \"0\", {\n get: function () {\n return true;\n },\n configurable: true\n });\n\n return 0 === Array.prototype.indexOf.call(obj, true);\n } finally {\n delete Object.prototype[0];\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.indexOf) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects())"
+ },
+ {
+ "id": "15.4.4.14-9-b-i-15",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-i-15.js",
+ "description": "Array.prototype.indexOf - element to be retrieved is inherited accessor property on an Array",
+ "test": "assertTrue((function testcase() {\n try {\n Object.defineProperty(Array.prototype, \"0\", {\n get: function () {\n return 10;\n },\n configurable: true\n });\n\n Object.defineProperty(Array.prototype, \"1\", {\n get: function () {\n return 20;\n },\n configurable: true\n });\n\n Object.defineProperty(Array.prototype, \"2\", {\n get: function () {\n return 30;\n },\n configurable: true\n });\n\n return 0 === [, , , ].indexOf(10) &&\n 1 === [, , , ].indexOf(20) && \n 2 === [, , , ].indexOf(30);\n } finally {\n delete Array.prototype[0];\n delete Array.prototype[1]; \n delete Array.prototype[2];\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.indexOf) && fnExists(Object.defineProperty) && ![, 1].hasOwnProperty(0) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.4.4.14-9-b-i-16",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-i-16.js",
+ "description": "Array.prototype.indexOf - element to be retrieved is inherited accessor property on an Array-like object",
+ "test": "assertTrue((function testcase() {\n\n try {\n Object.defineProperty(Object.prototype, \"0\", {\n get: function () {\n return 10;\n },\n configurable: true\n });\n\n Object.defineProperty(Object.prototype, \"1\", {\n get: function () {\n return 20;\n },\n configurable: true\n });\n\n Object.defineProperty(Object.prototype, \"2\", {\n get: function () {\n return 30;\n },\n configurable: true\n });\n\n return 0 === Array.prototype.indexOf.call({ length: 3 }, 10) &&\n 1 === Array.prototype.indexOf.call({ length: 3 }, 20) &&\n 2 === Array.prototype.indexOf.call({ length: 3 }, 30);\n } finally {\n delete Object.prototype[0];\n delete Object.prototype[1];\n delete Object.prototype[2];\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.indexOf) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects())"
+ },
+ {
+ "id": "15.4.4.14-9-b-i-17",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-i-17.js",
+ "description": "Array.prototype.indexOf - element to be retrieved is own accessor property without a get function on an Array",
+ "test": "assertTrue((function testcase() {\n\n var arr = [];\n Object.defineProperty(arr, \"0\", {\n set: function () { },\n configurable: true\n });\n\n return arr.indexOf(undefined) === 0;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.indexOf) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.4.4.14-9-b-i-18",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-i-18.js",
+ "description": "Array.prototype.indexOf - element to be retrieved is own accessor property without a get function on an Array-like object",
+ "test": "assertTrue((function testcase() {\n\n var obj = { length: 1 };\n Object.defineProperty(obj, \"0\", {\n set: function () { },\n configurable: true\n });\n\n return 0 === Array.prototype.indexOf.call(obj, undefined);\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.indexOf) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects())"
+ },
+ {
+ "id": "15.4.4.14-9-b-i-19",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-i-19.js",
+ "description": "Array.prototype.indexOf - element to be retrieved is own accessor property without a get function that overrides an inherited accessor property on an Array",
+ "test": "assertTrue((function testcase() {\n\n var arr = [];\n\n Object.defineProperty(arr, \"0\", {\n set: function () { },\n configurable: true\n });\n\n try {\n Object.defineProperty(Array.prototype, \"0\", {\n get: function () {\n return 2;\n },\n configurable: true\n });\n\n return arr.indexOf(undefined) === 0;\n } finally {\n delete Array.prototype[0];\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.indexOf) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.4.4.14-9-b-i-2",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-i-2.js",
+ "description": "Array.prototype.indexOf - element to be retrieved is own data property on an Array",
+ "test": "assertTrue(([true, true, true].indexOf(true) === 0 &&\n [false, true, true].indexOf(true) === 1 &&\n [false, false, true].indexOf(true) === 2));\n",
+ "precondition": "(fnExists(Array.prototype.indexOf))"
+ },
+ {
+ "id": "15.4.4.14-9-b-i-20",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-i-20.js",
+ "description": "Array.prototype.indexOf - element to be retrieved is own accessor property without a get function that overrides an inherited accessor property on an Array-like object",
+ "test": "assertTrue((function testcase() {\n\n var proto = {};\n Object.defineProperty(proto, \"0\", {\n get: function () {\n return 2;\n },\n configurable: true\n });\n\n var Con = function () { };\n Con.prototype = proto;\n\n var child = new Con();\n child.length = 1;\n\n Object.defineProperty(child, \"0\", {\n set: function () { },\n configurable: true\n });\n\n return Array.prototype.indexOf.call(child, undefined) === 0;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.indexOf) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects())"
+ },
+ {
+ "id": "15.4.4.14-9-b-i-21",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-i-21.js",
+ "description": "Array.prototype.indexOf - element to be retrieved is inherited accessor property without a get function on an Array",
+ "test": "assertTrue((function testcase() {\n try {\n Object.defineProperty(Array.prototype, \"0\", {\n set: function () { },\n configurable: true\n });\n return 0 === [, ].indexOf(undefined);\n } finally {\n delete Array.prototype[0];\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.indexOf) && fnExists(Object.defineProperty) && ![, 1].hasOwnProperty(0) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.4.4.14-9-b-i-22",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-i-22.js",
+ "description": "Array.prototype.indexOf - element to be retrieved is inherited accessor property without a get function on an Array-like object",
+ "test": "assertTrue((function testcase() {\n\n try {\n Object.defineProperty(Object.prototype, \"0\", {\n set: function () { },\n configurable: true\n });\n return 0 === Array.prototype.indexOf.call({ length: 1 }, undefined);\n } finally {\n delete Object.prototype[0];\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.indexOf) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects())"
+ },
+ {
+ "id": "15.4.4.14-9-b-i-23",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-i-23.js",
+ "description": "Array.prototype.indexOf - This object is the global object",
+ "test": "assertTrue((function testcase() {\n\n var targetObj = {};\n try {\n var oldLen = fnGlobalObject().length;\n fnGlobalObject()[0] = targetObj;\n fnGlobalObject()[100] = \"100\";\n fnGlobalObject()[200] = \"200\";\n fnGlobalObject().length = 200;\n return 0 === Array.prototype.indexOf.call(fnGlobalObject(), targetObj) &&\n 100 === Array.prototype.indexOf.call(fnGlobalObject(), \"100\") &&\n -1 === Array.prototype.indexOf.call(fnGlobalObject(), \"200\");\n } finally {\n delete fnGlobalObject()[0];\n delete fnGlobalObject()[100];\n delete fnGlobalObject()[200];\n fnGlobalObject().length = oldLen;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.indexOf))"
+ },
+ {
+ "id": "15.4.4.14-9-b-i-25",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-i-25.js",
+ "description": "Array.prototype.indexOf applied to Arguments object which implements its own property get method (number of arguments is less than number of parameters)",
+ "test": "assertTrue((function testcase() {\n\n var func = function (a, b) {\n return 0 === Array.prototype.indexOf.call(arguments, arguments[0]) &&\n -1 === Array.prototype.indexOf.call(arguments, arguments[1]);\n };\n\n return func(true);\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.indexOf))"
+ },
+ {
+ "id": "15.4.4.14-9-b-i-26",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-i-26.js",
+ "description": "Array.prototype.indexOf applied to Arguments object which implements its own property get method (number of arguments equals to number of parameters)",
+ "test": "assertTrue((function testcase() {\n\n var func = function (a, b) {\n return 0 === Array.prototype.indexOf.call(arguments, arguments[0]) &&\n 1 === Array.prototype.indexOf.call(arguments, arguments[1]) &&\n -1 === Array.prototype.indexOf.call(arguments, arguments[2]);\n };\n\n return func(0, true);\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.indexOf))"
+ },
+ {
+ "id": "15.4.4.14-9-b-i-27",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-i-27.js",
+ "description": "Array.prototype.indexOf applied to Arguments object which implements its own property get method (number of arguments is greater than number of parameters)",
+ "test": "assertTrue((function testcase() {\n\n var func = function (a, b) {\n return 0 === Array.prototype.indexOf.call(arguments, arguments[0]) &&\n 3 === Array.prototype.indexOf.call(arguments, arguments[3]) &&\n -1 === Array.prototype.indexOf.call(arguments, arguments[4]);\n };\n\n return func(0, false, 0, true);\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.indexOf))"
+ },
+ {
+ "id": "15.4.4.14-9-b-i-28",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-i-28.js",
+ "description": "Array.prototype.indexOf - side-effects are visible in subsequent iterations on an Array",
+ "test": "assertTrue((function testcase() {\n\n var preIterVisible = false;\n var arr = [];\n\n Object.defineProperty(arr, \"0\", {\n get: function () {\n preIterVisible = true;\n return false;\n },\n configurable: true\n });\n\n Object.defineProperty(arr, \"1\", {\n get: function () {\n if (preIterVisible) {\n return true;\n } else {\n return false;\n }\n },\n configurable: true\n });\n\n return arr.indexOf(true) === 1;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.indexOf) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.4.4.14-9-b-i-29",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-i-29.js",
+ "description": "Array.prototype.indexOf - side-effects are visible in subsequent iterations on an Array-like object",
+ "test": "assertTrue((function testcase() {\n\n var preIterVisible = false;\n var obj = { length: 2 };\n\n Object.defineProperty(obj, \"0\", {\n get: function () {\n preIterVisible = true;\n return false;\n },\n configurable: true\n });\n\n Object.defineProperty(obj, \"1\", {\n get: function () {\n if (preIterVisible) {\n return true;\n } else {\n return false;\n }\n },\n configurable: true\n });\n\n return Array.prototype.indexOf.call(obj, true) === 1;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.indexOf) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects())"
+ },
+ {
+ "id": "15.4.4.14-9-b-i-3",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-i-3.js",
+ "description": "Array.prototype.indexOf - element to be retrieved is own data property that overrides an inherited data property on an Array",
+ "test": "assertTrue((function testcase() {\n try {\n Array.prototype[0] = false;\n return [true].indexOf(true) === 0;\n } finally {\n delete Array.prototype[0];\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.indexOf))"
+ },
+ {
+ "id": "15.4.4.14-9-b-i-30",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-i-30.js",
+ "description": "Array.prototype.indexOf - terminates iteration on unhandled exception on an Array",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n var arr = [];\n\n Object.defineProperty(arr, \"0\", {\n get: function () {\n throw new TypeError();\n },\n configurable: true\n });\n\n Object.defineProperty(arr, \"1\", {\n get: function () {\n accessed = true;\n return true;\n },\n configurable: true\n });\n\n try {\n arr.indexOf(true);\n return false;\n } catch (e) {\n return (e instanceof TypeError) && !accessed;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.indexOf) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.4.4.14-9-b-i-31",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-i-31.js",
+ "description": "Array.prototype.indexOf - terminates iteration on unhandled exception on an Array-like object",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n var obj = { length: 2 };\n\n Object.defineProperty(obj, \"0\", {\n get: function () {\n throw new TypeError();\n },\n configurable: true\n });\n\n Object.defineProperty(obj, \"1\", {\n get: function () {\n accessed = true;\n return true;\n },\n configurable: true\n });\n\n try {\n Array.prototype.indexOf.call(obj, true);\n return false;\n } catch (e) {\n return (e instanceof TypeError) && !accessed;\n }\n\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.indexOf) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects())"
+ },
+ {
+ "id": "15.4.4.14-9-b-i-4",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-i-4.js",
+ "description": "Array.prototype.indexOf - element to be retrieved is own data property that overrides an inherited data property on an Array-like object",
+ "test": "assertTrue((function testcase() {\n\n try {\n Object.prototype[0] = false;\n return 0 === Array.prototype.indexOf.call({ 0: true, 1: 1, length: 2 }, true);\n } finally {\n delete Object.prototype[0];\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.indexOf))"
+ },
+ {
+ "id": "15.4.4.14-9-b-i-5",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-i-5.js",
+ "description": "Array.prototype.indexOf - element to be retrieved is own data property that overrides an inherited accessor property on an Array",
+ "test": "assertTrue((function testcase() {\n try {\n Object.defineProperty(Array.prototype, \"0\", {\n get: function () {\n return false;\n },\n configurable: true\n });\n return 0 === [true].indexOf(true);\n } finally {\n delete Array.prototype[0];\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.indexOf) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.4.4.14-9-b-i-6",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-i-6.js",
+ "description": "Array.prototype.indexOf - element to be retrieved is own data property that overrides an inherited accessor property on an Array-like object",
+ "test": "assertTrue((function testcase() {\n\n try {\n Object.defineProperty(Object.prototype, \"0\", {\n get: function () {\n return false;\n },\n configurable: true\n });\n return 0 === Array.prototype.indexOf.call({ 0: true, 1: 1, length: 2 }, true);\n } finally {\n delete Object.prototype[0];\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.indexOf) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects())"
+ },
+ {
+ "id": "15.4.4.14-9-b-i-7",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-i-7.js",
+ "description": "Array.prototype.indexOf - element to be retrieved is inherited data property on an Array",
+ "test": "assertTrue((function testcase() {\n try {\n Array.prototype[0] = true;\n Array.prototype[1] = false;\n Array.prototype[2] = \"true\";\n return 0 === [, , , ].indexOf(true) &&\n 1 === [, , , ].indexOf(false) &&\n 2 === [, , , ].indexOf(\"true\");\n } finally {\n delete Array.prototype[0];\n delete Array.prototype[1];\n delete Array.prototype[2];\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.indexOf) && ![, 1].hasOwnProperty(0))"
+ },
+ {
+ "id": "15.4.4.14-9-b-i-8",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-i-8.js",
+ "description": "Array.prototype.indexOf - element to be retrieved is inherited data property on an Array-like object",
+ "test": "assertTrue((function testcase() {\n\n try {\n Object.prototype[0] = true;\n Object.prototype[1] = false;\n Object.prototype[2] = \"true\";\n return 0 === Array.prototype.indexOf.call({ length: 3 }, true) &&\n 1 === Array.prototype.indexOf.call({ length: 3 }, false) &&\n 2 === Array.prototype.indexOf.call({ length: 3 }, \"true\");\n } finally {\n delete Object.prototype[0];\n delete Object.prototype[1];\n delete Object.prototype[2];\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.indexOf))"
+ },
+ {
+ "id": "15.4.4.14-9-b-i-9",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-i-9.js",
+ "description": "Array.prototype.indexOf - element to be retrieved is own accessor property on an Array",
+ "test": "assertTrue((function testcase() {\n\n var arr = [, , , ];\n Object.defineProperty(arr, \"0\", {\n get: function () {\n return 0;\n },\n configurable: true\n });\n\n Object.defineProperty(arr, \"1\", {\n get: function () {\n return 1;\n },\n configurable: true\n });\n \n Object.defineProperty(arr, \"2\", {\n get: function () {\n return 2;\n },\n configurable: true\n });\n\n return arr.indexOf(0) === 0 && arr.indexOf(1) === 1 && arr.indexOf(2) === 2;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.indexOf) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.4.4.14-9-b-ii-1",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-ii-1.js",
+ "description": "Array.prototype.indexOf - type of array element is different from type of search element",
+ "test": "assertTrue(([\"true\"].indexOf(true) === -1 &&\n [\"0\"].indexOf(0) === -1 &&\n [false].indexOf(0) === -1 &&\n [undefined].indexOf(0) === -1 &&\n [null].indexOf(0) === -1 &&\n [[]].indexOf(0) === -1));\n",
+ "precondition": "(fnExists(Array.prototype.indexOf))"
+ },
+ {
+ "id": "15.4.4.14-9-b-ii-10",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-ii-10.js",
+ "description": "Array.prototype.indexOf - both array element and search element are Boolean type, and they have same value",
+ "test": "assertTrue(([false, true].indexOf(true) === 1));\n",
+ "precondition": "(fnExists(Array.prototype.indexOf))"
+ },
+ {
+ "id": "15.4.4.14-9-b-ii-11",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-ii-11.js",
+ "description": "Array.prototype.indexOf - both array element and search element are Object type, and they refer to the same object",
+ "test": "assertTrue((function testcase() {\n\n var obj1 = {};\n var obj2 = {};\n var obj3 = obj2;\n return [{}, obj1, obj2].indexOf(obj3) === 2;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.indexOf))"
+ },
+ {
+ "id": "15.4.4.14-9-b-ii-2",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-ii-2.js",
+ "description": "Array.prototype.indexOf - both type of array element and type of search element are Undefined",
+ "test": "assertTrue(([undefined].indexOf() === 0 && [undefined].indexOf(undefined) === 0));\n",
+ "precondition": "(fnExists(Array.prototype.indexOf))"
+ },
+ {
+ "id": "15.4.4.14-9-b-ii-3",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-ii-3.js",
+ "description": "Array.prototype.indexOf - both type of array element and type of search element are null",
+ "test": "assertTrue(([null].indexOf(null) === 0));\n",
+ "precondition": "(fnExists(Array.prototype.indexOf))"
+ },
+ {
+ "id": "15.4.4.14-9-b-ii-4",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-ii-4.js",
+ "description": "Array.prototype.indexOf - search element is NaN",
+ "test": "assertTrue(([+NaN, NaN, -NaN].indexOf(NaN) === -1));\n",
+ "precondition": "(fnExists(Array.prototype.indexOf))"
+ },
+ {
+ "id": "15.4.4.14-9-b-ii-5",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-ii-5.js",
+ "description": "Array.prototype.indexOf - search element is -NaN",
+ "test": "assertTrue(([+NaN, NaN, -NaN].indexOf(-NaN) === -1));\n",
+ "precondition": "(fnExists(Array.prototype.indexOf))"
+ },
+ {
+ "id": "15.4.4.14-9-b-ii-6",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-ii-6.js",
+ "description": "Array.prototype.indexOf - array element is +0 and search element is -0",
+ "test": "assertTrue(([+0].indexOf(-0) === 0));\n",
+ "precondition": "(fnExists(Array.prototype.indexOf))"
+ },
+ {
+ "id": "15.4.4.14-9-b-ii-7",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-ii-7.js",
+ "description": "Array.prototype.indexOf - array element is -0 and search element is +0",
+ "test": "assertTrue(([-0].indexOf(+0) === 0));\n",
+ "precondition": "(fnExists(Array.prototype.indexOf))"
+ },
+ {
+ "id": "15.4.4.14-9-b-ii-8",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-ii-8.js",
+ "description": "Array.prototype.indexOf - both array element and search element are Number, and they have same value",
+ "test": "assertTrue(([-1, 0, 1].indexOf(1) === 2));\n",
+ "precondition": "(fnExists(Array.prototype.indexOf))"
+ },
+ {
+ "id": "15.4.4.14-9-b-ii-9",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-ii-9.js",
+ "description": "Array.prototype.indexOf - both array element and search element are String, and they have exactly the same sequence of characters",
+ "test": "assertTrue(([\"\", \"ab\", \"bca\", \"abc\"].indexOf(\"abc\") === 3));\n",
+ "precondition": "(fnExists(Array.prototype.indexOf))"
+ },
+ {
+ "id": "15.4.4.14-9-b-iii-1",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-iii-1.js",
+ "description": "Array.prototype.indexOf - returns index of last one when more than two elements in array are eligible",
+ "test": "assertTrue(([1, 2, 2, 1, 2].indexOf(2) === 1));\n",
+ "precondition": "(fnExists(Array.prototype.indexOf))"
+ },
+ {
+ "id": "15.4.4.14-9-b-iii-2",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.14/15.4.4.14-9-b-iii-2.js",
+ "description": "Array.prototype.indexOf - returns without visiting subsequent element once search value is found",
+ "test": "assertTrue((function testcase() {\n var arr = [1, 2, , 1, 2];\n var elementThirdAccessed = false;\n var elementFifthAccessed = false;\n\n Object.defineProperty(arr, \"2\", {\n get: function () {\n elementThirdAccessed = true;\n return 2;\n },\n configurable: true\n });\n Object.defineProperty(arr, \"4\", {\n get: function () {\n elementFifthAccessed = true;\n return 2;\n },\n configurable: true\n });\n\n arr.indexOf(2);\n return !elementThirdAccessed && !elementFifthAccessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.indexOf) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays())"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.4.4.15.json b/website/resources/scripts/testcases2/15.4.4.15.json
new file mode 100644
index 000000000..15b9fcb3f
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.4.4.15.json
@@ -0,0 +1,1358 @@
+{
+ "testCollection": {
+ "name": "15.4.4.15",
+ "numTests": 193,
+ "tests": [
+ {
+ "id": "15.4.4.15-0-1",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-0-1.js",
+ "description": "Array.prototype.lastIndexOf must exist as a function",
+ "test": "assertTrue((function testcase() {\n var f = Array.prototype.lastIndexOf;\n if (typeof(f) === \"function\") {\n return true;\n }\n }).call(this));\n"
+ },
+ {
+ "id": "15.4.4.15-0-2",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-0-2.js",
+ "description": "Array.prototype.lastIndexOf has a length property whose value is 1.",
+ "test": "assertTrue((Array.prototype.lastIndexOf.length === 1));\n",
+ "precondition": "(fnExists(Array.prototype.lastIndexOf))"
+ },
+ {
+ "id": "15.4.4.15-1-1",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-1-1.js",
+ "description": "Array.prototype.lastIndexOf applied to undefined throws a TypeError",
+ "test": "assertTrue((function testcase() {\n\n try {\n Array.prototype.lastIndexOf.call(undefined);\n return false;\n } catch (e) {\n if (e instanceof TypeError) {\n return true;\n }\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.lastIndexOf))"
+ },
+ {
+ "id": "15.4.4.15-1-10",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-1-10.js",
+ "description": "Array.prototype.lastIndexOf applied to the Math object",
+ "test": "assertTrue((function testcase() {\n \n try {\n Math.length = 2;\n Math[1] = 100;\n return 1 === Array.prototype.lastIndexOf.call(Math, 100);\n } finally {\n delete Math.length;\n delete Math[1];\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.lastIndexOf))"
+ },
+ {
+ "id": "15.4.4.15-1-11",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-1-11.js",
+ "description": "Array.prototype.lastIndexOf applied to Date object",
+ "test": "assertTrue((function testcase() {\n\n var obj = new Date();\n obj.length = 2;\n obj[1] = true;\n\n return Array.prototype.lastIndexOf.call(obj, true) === 1;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.lastIndexOf))"
+ },
+ {
+ "id": "15.4.4.15-1-12",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-1-12.js",
+ "description": "Array.prototype.lastIndexOf applied to RegExp object",
+ "test": "assertTrue((function testcase() {\n\n var obj = new RegExp(\"afdasf\");\n obj.length = 100;\n obj[1] = \"afdasf\";\n\n return Array.prototype.lastIndexOf.call(obj, \"afdasf\") === 1;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.lastIndexOf))"
+ },
+ {
+ "id": "15.4.4.15-1-13",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-1-13.js",
+ "description": "Array.prototype.lastIndexOf applied to the JSON object",
+ "test": "assertTrue((function testcase() {\n\n var targetObj = {};\n try {\n JSON[3] = targetObj;\n JSON.length = 5;\n return 3 === Array.prototype.lastIndexOf.call(JSON, targetObj);\n } finally {\n delete JSON[3];\n delete JSON.length;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.lastIndexOf))"
+ },
+ {
+ "id": "15.4.4.15-1-14",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-1-14.js",
+ "description": "Array.prototype.lastIndexOf applied to Error object",
+ "test": "assertTrue((function testcase() {\n\n var obj = new SyntaxError();\n obj.length = 2;\n obj[1] = Infinity;\n\n return Array.prototype.lastIndexOf.call(obj, Infinity) === 1;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.lastIndexOf))"
+ },
+ {
+ "id": "15.4.4.15-1-15",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-1-15.js",
+ "description": "Array.prototype.lastIndexOf applied to the Arguments object",
+ "test": "assertTrue((function testcase() {\n\n var obj = (function fun() {\n return arguments;\n }(1, 2, 3));\n\n return Array.prototype.lastIndexOf.call(obj, 2) === 1;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.lastIndexOf))"
+ },
+ {
+ "id": "15.4.4.15-1-17",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-1-17.js",
+ "description": "Array.prototype.lastIndexOf applied to the global object",
+ "test": "assertTrue((function testcase() {\n var targetObj = [\"global\"];\n try {\n var oldLen = fnGlobalObject().length;\n fnGlobalObject()[1] = targetObj;\n fnGlobalObject().length = 3;\n return 1 === Array.prototype.lastIndexOf.call(fnGlobalObject(), targetObj);\n } finally {\n delete fnGlobalObject()[1];\n fnGlobalObject().length = oldLen;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.lastIndexOf))"
+ },
+ {
+ "id": "15.4.4.15-1-2",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-1-2.js",
+ "description": "Array.prototype.lastIndexOf applied to null throws a TypeError",
+ "test": "assertTrue((function testcase() {\n\n try {\n Array.prototype.lastIndexOf.call(null);\n return false;\n } catch (e) {\n if (e instanceof TypeError) {\n return true;\n }\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.lastIndexOf))"
+ },
+ {
+ "id": "15.4.4.15-1-3",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-1-3.js",
+ "description": "Array.prototype.lastIndexOf applied to boolean primitive",
+ "test": "assertTrue((function testcase() {\n\n try {\n Boolean.prototype[1] = true;\n Boolean.prototype.length = 2;\n\n return 1 === Array.prototype.lastIndexOf.call(true, true);\n } finally {\n delete Boolean.prototype[1];\n delete Boolean.prototype.length;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.lastIndexOf))"
+ },
+ {
+ "id": "15.4.4.15-1-4",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-1-4.js",
+ "description": "Array.prototype.lastIndexOf applied to Boolean object",
+ "test": "assertTrue((function testcase() {\n\n var obj = new Boolean(false);\n obj.length = 2;\n obj[1] = true;\n\n return Array.prototype.lastIndexOf.call(obj, true) === 1;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.lastIndexOf))"
+ },
+ {
+ "id": "15.4.4.15-1-5",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-1-5.js",
+ "description": "Array.prototype.lastIndexOf applied to number primitive",
+ "test": "assertTrue((function testcase() {\n\n try {\n Number.prototype[1] = isNaN;\n Number.prototype.length = 2;\n return 1 === Array.prototype.lastIndexOf.call(5, isNaN);\n } finally {\n delete Number.prototype[1];\n delete Number.prototype.length;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.lastIndexOf))"
+ },
+ {
+ "id": "15.4.4.15-1-6",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-1-6.js",
+ "description": "Array.prototype.lastIndexOf applied to Number object",
+ "test": "assertTrue((function testcase() {\n\n var obj = new Number(-3);\n obj.length = 2;\n obj[1] = true;\n\n return Array.prototype.lastIndexOf.call(obj, true) === 1;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.lastIndexOf))"
+ },
+ {
+ "id": "15.4.4.15-1-7",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-1-7.js",
+ "description": "Array.prototype.lastIndexOf applied to string primitive",
+ "test": "assertTrue((Array.prototype.lastIndexOf.call(\"abc\", \"c\") === 2));\n",
+ "precondition": "(fnExists(Array.prototype.lastIndexOf))"
+ },
+ {
+ "id": "15.4.4.15-1-8",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-1-8.js",
+ "description": "Array.prototype.lastIndexOf applied to String object",
+ "test": "assertTrue((function testcase() {\n\n var obj = new String(\"undefined\");\n\n return Array.prototype.lastIndexOf.call(obj, \"f\") === 4;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.lastIndexOf))"
+ },
+ {
+ "id": "15.4.4.15-1-9",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-1-9.js",
+ "description": "Array.prototype.lastIndexOf applied to Function object",
+ "test": "assertTrue((function testcase() {\n\n var obj = function (a, b) {\n return a + b;\n };\n obj[1] = true;\n\n return Array.prototype.lastIndexOf.call(obj, true) === 1;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.lastIndexOf))"
+ },
+ {
+ "id": "15.4.4.15-2-1",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-2-1.js",
+ "description": "Array.prototype.lastIndexOf - 'length' is own data property on an Array-like object",
+ "test": "assertTrue((function testcase() {\n var obj = { 1: null, 2: undefined, length: 2 };\n\n return Array.prototype.lastIndexOf.call(obj, null) === 1 &&\n Array.prototype.lastIndexOf.call(obj, undefined) === -1;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.lastIndexOf))"
+ },
+ {
+ "id": "15.4.4.15-2-10",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-2-10.js",
+ "description": "Array.prototype.lastIndexOf - 'length' is inherited accessor property on an Array-like object",
+ "test": "assertTrue((function testcase() {\n\n var proto = {};\n Object.defineProperty(proto, \"length\", {\n get: function () {\n return 2;\n },\n configurable: true\n });\n\n var Con = function () {};\n Con.prototype = proto;\n\n var child = new Con();\n child[1] = 1;\n child[2] = 2;\n\n return Array.prototype.lastIndexOf.call(child, 1) === 1 &&\n Array.prototype.lastIndexOf.call(child, 2) === -1;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.lastIndexOf) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.4.4.15-2-11",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-2-11.js",
+ "description": "Array.prototype.lastIndexOf - 'length' is own accessor property without a get function on an Array-like object",
+ "test": "assertTrue((function testcase() {\n\n var obj = { 0: 1 };\n Object.defineProperty(obj, \"length\", {\n set: function () { },\n configurable: true\n });\n\n return Array.prototype.lastIndexOf.call(obj, 1) === -1;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.lastIndexOf) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.4.4.15-2-12",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-2-12.js",
+ "description": "Array.prototype.lastIndexOf - 'length' is own accessor property without a get function that overrides an inherited accessor property on an Array-like object",
+ "test": "assertTrue((function testcase() {\n try {\n Object.defineProperty(Object.prototype, \"length\", {\n get: function () {\n return 20;\n },\n configurable: true\n });\n\n var obj = { 1: 1 };\n Object.defineProperty(obj, \"length\", {\n set: function () { },\n configurable: true\n });\n\n return Array.prototype.lastIndexOf.call(obj, 1) === -1;\n } finally {\n delete Object.prototype.length;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.lastIndexOf) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.4.4.15-2-13",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-2-13.js",
+ "description": "Array.prototype.lastIndexOf - 'length' is inherited accessor property without a get function on an Array-like object",
+ "test": "assertTrue((function testcase() {\n\n var proto = {};\n Object.defineProperty(proto, \"length\", {\n set: function () { },\n configurable: true\n });\n\n var Con = function () {};\n Con.prototype = proto;\n\n var child = new Con();\n child[0] = true;\n\n return Array.prototype.lastIndexOf.call(child, true) === -1;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.lastIndexOf) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.4.4.15-2-14",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-2-14.js",
+ "description": "Array.prototype.lastIndexOf - 'length' is undefined property on an Array-like object",
+ "test": "assertTrue((function testcase() {\n\n var obj = { 0: null, 1: undefined };\n\n return Array.prototype.lastIndexOf.call(obj, null) === -1;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.lastIndexOf))"
+ },
+ {
+ "id": "15.4.4.15-2-15",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-2-15.js",
+ "description": "Array.prototype.lastIndexOf - 'length' is property of the global object",
+ "test": "assertTrue((function testcase() {\n var targetObj = {};\n try {\n var oldLen = fnGlobalObject().length;\n fnGlobalObject().length = 2;\n\n fnGlobalObject()[1] = targetObj;\n if (Array.prototype.lastIndexOf.call(fnGlobalObject(), targetObj) !== 1) {\n return false;\n }\n\n fnGlobalObject()[1] = {};\n fnGlobalObject()[2] = targetObj;\n\n return Array.prototype.lastIndexOf.call(fnGlobalObject(), targetObj) === -1;\n } finally {\n delete fnGlobalObject()[1];\n delete fnGlobalObject()[2];\n fnGlobalObject().length = oldLen;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.lastIndexOf))"
+ },
+ {
+ "id": "15.4.4.15-2-17",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-2-17.js",
+ "description": "Array.prototype.lastIndexOf applied to Arguments object which implements its own property get method",
+ "test": "assertTrue((function testcase() {\n\n var targetObj = function () { };\n var func = function (a, b) {\n arguments[2] = function () { };\n return Array.prototype.lastIndexOf.call(arguments, targetObj) === 1 &&\n Array.prototype.lastIndexOf.call(arguments, arguments[2]) === -1;\n };\n\n return func(0, targetObj);\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.lastIndexOf))"
+ },
+ {
+ "id": "15.4.4.15-2-18",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-2-18.js",
+ "description": "Array.prototype.lastIndexOf applied to String object which implements its own property get method",
+ "test": "assertTrue((function testcase() {\n\n var str = new String(\"012\");\n try {\n String.prototype[3] = \"3\";\n return Array.prototype.lastIndexOf.call(str, \"2\") === 2 &&\n Array.prototype.lastIndexOf.call(str, \"3\") === -1;\n } finally {\n delete String.prototype[3];\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.lastIndexOf))"
+ },
+ {
+ "id": "15.4.4.15-2-19",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-2-19.js",
+ "description": "Array.prototype.lastIndexOf applied to String object which implements its own property get method",
+ "test": "assertTrue((function testcase() {\n\n var obj = function (a, b) {\n return a + b;\n };\n obj[1] = \"b\";\n obj[2] = \"c\";\n\n return Array.prototype.lastIndexOf.call(obj, obj[1]) === 1 &&\n Array.prototype.lastIndexOf.call(obj, obj[2]) === -1;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.lastIndexOf))"
+ },
+ {
+ "id": "15.4.4.15-2-2",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-2-2.js",
+ "description": "Array.prototype.lastIndexOf - 'length' is own data property on an Array",
+ "test": "assertTrue((function testcase() {\n var targetObj = {};\n try {\n Array.prototype[2] = targetObj;\n\n return [0, targetObj].lastIndexOf(targetObj) === 1 &&\n [0, 1].lastIndexOf(targetObj) === -1;\n } finally {\n delete Array.prototype[2];\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.lastIndexOf))"
+ },
+ {
+ "id": "15.4.4.15-2-3",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-2-3.js",
+ "description": "Array.prototype.lastIndexOf - 'length' is own data property that overrides an inherited data property on an Array-like object",
+ "test": "assertTrue((function testcase() {\n\n var proto = {length: 0};\n\n var Con = function () {};\n Con.prototype = proto;\n\n var child = new Con();\n child.length = 2;\n child[1] = child;\n\n return Array.prototype.lastIndexOf.call(child, child) === 1;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.lastIndexOf))"
+ },
+ {
+ "id": "15.4.4.15-2-4",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-2-4.js",
+ "description": "Array.prototype.lastIndexOf when 'length' is own data property that overrides an inherited data property on an Array",
+ "test": "assertTrue((function testcase() {\n\n var targetObj = {};\n var arrProtoLen;\n try {\n arrProtoLen = Array.prototype.length;\n Array.prototype.length = 0;\n return [0, targetObj, 2].lastIndexOf(targetObj) === 1;\n } finally {\n Array.prototype.length = arrProtoLen;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.lastIndexOf))"
+ },
+ {
+ "id": "15.4.4.15-2-5",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-2-5.js",
+ "description": "Array.prototype.lastIndexOf - 'length' is own data property that overrides an inherited accessor property on an Array-like object",
+ "test": "assertTrue((function testcase() {\n var proto = {};\n Object.defineProperty(proto, \"length\", {\n get: function () {\n return 0;\n },\n configurable: true\n });\n\n var Con = function () {};\n Con.prototype = proto;\n\n var child = new Con();\n\n Object.defineProperty(child, \"length\", {\n value: 2,\n configurable: true\n });\n child[1] = null;\n\n return Array.prototype.lastIndexOf.call(child, null) === 1;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.lastIndexOf) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.4.4.15-2-6",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-2-6.js",
+ "description": "Array.prototype.lastIndexOf - 'length' is an inherited data property on an Array-like object",
+ "test": "assertTrue((function testcase() {\n\n var proto = { length: 2 };\n\n var Con = function () {};\n Con.prototype = proto;\n\n var child = new Con();\n child[1] = \"x\";\n child[2] = \"y\";\n\n return Array.prototype.lastIndexOf.call(child, \"x\") === 1 &&\n Array.prototype.lastIndexOf.call(child, \"y\") === -1;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.lastIndexOf))"
+ },
+ {
+ "id": "15.4.4.15-2-7",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-2-7.js",
+ "description": "Array.prototype.lastIndexOf - 'length' is own accessor property on an Array-like object",
+ "test": "assertTrue((function testcase() {\n\n var obj = { 1: true, 2: false };\n\n Object.defineProperty(obj, \"length\", {\n get: function () {\n return 2;\n },\n configurable: true\n });\n\n return Array.prototype.lastIndexOf.call(obj, true) === 1 &&\n Array.prototype.lastIndexOf.call(obj, false) === -1;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.lastIndexOf) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.4.4.15-2-8",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-2-8.js",
+ "description": "Array.prototype.lastIndexOf - 'length' is own accessor property that overrides an inherited data property on an Array-like object",
+ "test": "assertTrue((function testcase() {\n\n var proto = { length: 0 };\n\n var Con = function () {};\n Con.prototype = proto;\n\n var child = new Con();\n child[1] = eval;\n\n Object.defineProperty(child, \"length\", {\n get: function () {\n return 2;\n },\n configurable: true\n });\n\n return Array.prototype.lastIndexOf.call(child, eval) === 1;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.lastIndexOf) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.4.4.15-2-9",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-2-9.js",
+ "description": "Array.prototype.lastIndexOf - 'length' is own accessor property that overrides an inherited accessor property on an Array-like object",
+ "test": "assertTrue((function testcase() {\n var proto = {};\n Object.defineProperty(proto, \"length\", {\n get: function () {\n return 0;\n },\n configurable: true\n });\n\n var Con = function () {};\n Con.prototype = proto;\n\n var child = new Con();\n child[1] = true;\n\n Object.defineProperty(child, \"length\", {\n get: function () {\n return 2;\n },\n configurable: true\n });\n\n return Array.prototype.lastIndexOf.call(child, true) === 1;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.lastIndexOf) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.4.4.15-3-1",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-1.js",
+ "description": "Array.prototype.lastIndexOf - value of 'length' is undefined",
+ "test": "assertTrue((function testcase() {\n\n var obj = { 0: 1, 1: 1, length: undefined };\n\n return Array.prototype.lastIndexOf.call(obj, 1) === -1;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.lastIndexOf))"
+ },
+ {
+ "id": "15.4.4.15-3-10",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-10.js",
+ "description": "Array.prototype.lastIndexOf - value of 'length' is a number (value is NaN)",
+ "test": "assertTrue((function testcase() {\n\n var obj = { 0: 0, length: NaN };\n\n return Array.prototype.lastIndexOf.call(obj, 0) === -1;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.lastIndexOf))"
+ },
+ {
+ "id": "15.4.4.15-3-11",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-11.js",
+ "description": "Array.prototype.lastIndexOf - value of 'length' is a string containing positive number",
+ "test": "assertTrue((function testcase() {\n\n var obj = {1: true, 2: false, length: \"2\"};\n\n return Array.prototype.lastIndexOf.call(obj, true) === 1 &&\n Array.prototype.lastIndexOf.call(obj, false) === -1;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.lastIndexOf))"
+ },
+ {
+ "id": "15.4.4.15-3-12",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-12.js",
+ "description": "Array.prototype.lastIndexOf - value of 'length' is a string containing negative number",
+ "test": "assertTrue((function testcase() {\n\n var obj = {1: null, 2: undefined, length: \"-4294967294\"};\n\n return Array.prototype.lastIndexOf.call(obj, null) === 1 &&\n Array.prototype.lastIndexOf.call(obj, undefined) === -1;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.lastIndexOf))"
+ },
+ {
+ "id": "15.4.4.15-3-13",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-13.js",
+ "description": "Array.prototype.lastIndexOf - value of 'length' is a string containing a decimal number",
+ "test": "assertTrue((function testcase() {\n\n var obj = { 4: 4, 5: 5, length: \"5.512345\" };\n\n return Array.prototype.lastIndexOf.call(obj, 4) === 4 &&\n Array.prototype.lastIndexOf.call(obj, 5) === -1;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.lastIndexOf))"
+ },
+ {
+ "id": "15.4.4.15-3-14",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-14.js",
+ "description": "Array.prototype.lastIndexOf - value of 'length' is a string containing +/-Infinity",
+ "test": "assertTrue((function testcase() {\n\n var objOne = { 0: true, 1: true, length: \"Infinity\" };\n var objTwo = { 0: true, 1: true, length: \"+Infinity\" };\n var objThree = { 0: true, 1: true, length: \"-Infinity\" };\n\n return Array.prototype.lastIndexOf.call(objOne, true) === -1 &&\n Array.prototype.lastIndexOf.call(objTwo, true) === -1 &&\n Array.prototype.lastIndexOf.call(objThree, true) === -1;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.lastIndexOf))"
+ },
+ {
+ "id": "15.4.4.15-3-15",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-15.js",
+ "description": "Array.prototype.lastIndexOf - value of 'length' is a string containing an exponential number",
+ "test": "assertTrue((function testcase() {\n\n var obj = {229: 229, 230: 2.3E2, length: \"2.3E2\"};\n\n return Array.prototype.lastIndexOf.call(obj, 229) === 229 &&\n Array.prototype.lastIndexOf.call(obj, 2.3E2) === -1;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.lastIndexOf))"
+ },
+ {
+ "id": "15.4.4.15-3-16",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-16.js",
+ "description": "Array.prototype.lastIndexOf - value of 'length' is a string which is able to be converted into hex number",
+ "test": "assertTrue((function testcase() {\n\n var obj = { 2573: 2573, 2574: 0x000A0E, length: \"0x000A0E\" };\n\n return Array.prototype.lastIndexOf.call(obj, 2573) === 2573 &&\n Array.prototype.lastIndexOf.call(obj, 0x000A0E) === -1;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.lastIndexOf))"
+ },
+ {
+ "id": "15.4.4.15-3-17",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-17.js",
+ "description": "Array.prototype.lastIndexOf - value of 'length' is a string containing a number with leading zeros",
+ "test": "assertTrue((function testcase() {\n\n var obj = { 1: 1, 2: 2, length: \"0002.0\" };\n\n return Array.prototype.lastIndexOf.call(obj, 1) === 1 &&\n Array.prototype.lastIndexOf.call(obj, 2) === -1;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.lastIndexOf))"
+ },
+ {
+ "id": "15.4.4.15-3-18",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-18.js",
+ "description": "Array.prototype.lastIndexOf - value of 'length' is a string that can't convert to a number",
+ "test": "assertTrue((function testcase() {\n var targetObj = new String(\"123abc123\");\n var obj = { 0: targetObj, length: \"123abc123\" };\n\n return Array.prototype.lastIndexOf.call(obj, targetObj) === -1;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.lastIndexOf))"
+ },
+ {
+ "id": "15.4.4.15-3-19",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-19.js",
+ "description": "Array.prototype.lastIndexOf - value of 'length' is an Object which has an own toString method",
+ "test": "assertTrue((function testcase() {\n\n // objects inherit the default valueOf() method from Object\n // that simply returns itself. Since the default valueOf() method\n // does not return a primitive value, ES next tries to convert the object\n // to a number by calling its toString() method and converting the\n // resulting string to a number.\n\n var targetObj = fnGlobalObject();\n var obj = {\n 1: targetObj,\n 2: 2,\n\n length: {\n toString: function () {\n return '2';\n }\n }\n };\n\n return Array.prototype.lastIndexOf.call(obj, targetObj) === 1 &&\n Array.prototype.lastIndexOf.call(obj, 2) === -1;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.lastIndexOf))"
+ },
+ {
+ "id": "15.4.4.15-3-2",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-2.js",
+ "description": "Array.prototype.lastIndexOf return -1 when value of 'length' is a boolean (value is true)",
+ "test": "assertTrue((function testcase() {\n var obj = { 0: 0, 1: 1, length: true };\n return Array.prototype.lastIndexOf.call(obj, 0) === 0 &&\n Array.prototype.lastIndexOf.call(obj, 1) === -1;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.lastIndexOf))"
+ },
+ {
+ "id": "15.4.4.15-3-20",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-20.js",
+ "description": "Array.prototype.lastIndexOf - value of 'length' is an Object which has an own valueOf method",
+ "test": "assertTrue((function testcase() {\n\n //valueOf method will be invoked first, since hint is Number\n var obj = {\n 1: true,\n 2: 2,\n\n length: {\n valueOf: function () {\n return 2;\n }\n }\n };\n\n return Array.prototype.lastIndexOf.call(obj, true) === 1 &&\n Array.prototype.lastIndexOf.call(obj, 2) === -1;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.lastIndexOf))"
+ },
+ {
+ "id": "15.4.4.15-3-21",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-21.js",
+ "description": "Array.prototype.lastIndexOf - 'length' is an object that has an own valueOf method that returns an object and toString method that returns a string",
+ "test": "assertTrue((function testcase() {\n\n var toStringAccessed = false;\n var valueOfAccessed = false;\n\n var targetObj = this;\n var obj = {\n 1: targetObj,\n length: {\n toString: function () {\n toStringAccessed = true;\n return '3';\n },\n\n valueOf: function () {\n valueOfAccessed = true;\n return {};\n }\n }\n };\n\n return Array.prototype.lastIndexOf.call(obj, targetObj) === 1 && toStringAccessed && valueOfAccessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.lastIndexOf))"
+ },
+ {
+ "id": "15.4.4.15-3-22",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-22.js",
+ "description": "Array.prototype.lastIndexOf throws TypeError exception when 'length' is an object with toString and valueOf methods that don�t return primitive values",
+ "test": "assertTrue((function testcase() {\n\n var toStringAccessed = false;\n var valueOfAccessed = false;\n\n var obj = {\n 1: true,\n length: {\n toString: function () {\n toStringAccessed = true;\n return {};\n },\n\n valueOf: function () {\n valueOfAccessed = true;\n return {};\n }\n }\n };\n\n try {\n Array.prototype.lastIndexOf.call(obj, true);\n return false;\n } catch (e) {\n return toStringAccessed && valueOfAccessed;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.lastIndexOf))"
+ },
+ {
+ "id": "15.4.4.15-3-23",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-23.js",
+ "description": "Array.prototype.lastIndexOf uses inherited valueOf method when 'length' is an object with an own toString and an inherited valueOf methods",
+ "test": "assertTrue((function testcase() {\n\n var toStringAccessed = false;\n var valueOfAccessed = false;\n\n var proto = {\n valueOf: function () {\n valueOfAccessed = true;\n return 2;\n }\n };\n\n var Con = function () {};\n Con.prototype = proto;\n\n var child = new Con();\n child.toString = function () {\n toStringAccessed = true;\n return 2;\n };\n\n var obj = {\n 1: child,\n length: child\n };\n\n return Array.prototype.lastIndexOf.call(obj, child) === 1 && valueOfAccessed && !toStringAccessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.lastIndexOf))"
+ },
+ {
+ "id": "15.4.4.15-3-24",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-24.js",
+ "description": "Array.prototype.lastIndexOf - value of 'length' is a positive non-integer, ensure truncation occurs in the proper direction",
+ "test": "assertTrue((function testcase() {\n\n var obj = { 122: true, 123: false, length: 123.5 };\n\n return Array.prototype.lastIndexOf.call(obj, true) === 122 &&\n Array.prototype.lastIndexOf.call(obj, false) === -1;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.lastIndexOf))"
+ },
+ {
+ "id": "15.4.4.15-3-25",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-25.js",
+ "description": "Array.prototype.lastIndexOf - value of 'length' is a negative non-integer, ensure truncation occurs in the proper direction",
+ "test": "assertTrue((function testcase() {\n\n var obj = { 1: true, 2: false, length: -4294967294.5 };\n\n return Array.prototype.lastIndexOf.call(obj, true) === 1 &&\n Array.prototype.lastIndexOf.call(obj, false) === -1;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.lastIndexOf))"
+ },
+ {
+ "id": "15.4.4.15-3-28",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-28.js",
+ "description": "Array.prototype.lastIndexOf - value of 'length' is boundary value (2^32)",
+ "test": "assertTrue((function testcase() {\n\n var targetObj = {};\n var obj = {\n 0: targetObj,\n 4294967294: targetObj,\n 4294967295: targetObj,\n length: 4294967296\n };\n\n return Array.prototype.lastIndexOf.call(obj, targetObj) === -1; //verify length is 0 finally\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.lastIndexOf))"
+ },
+ {
+ "id": "15.4.4.15-3-29",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-29.js",
+ "description": "Array.prototype.lastIndexOf - value of 'length' is boundary value (2^32 + 1)",
+ "test": "assertTrue((function testcase() {\n\n var targetObj = {};\n var obj = {\n 0: targetObj,\n 1: 4294967297,\n length: 4294967297\n };\n\n return Array.prototype.lastIndexOf.call(obj, targetObj) === 0 &&\n Array.prototype.lastIndexOf.call(obj, 4294967297) === -1;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.lastIndexOf))"
+ },
+ {
+ "id": "15.4.4.15-3-3",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-3.js",
+ "description": "Array.prototype.lastIndexOf - value of 'length' is a number (value is 0)",
+ "test": "assertTrue((function testcase() {\n\n var obj = { 0: \"undefined\", length: 0 };\n\n return Array.prototype.lastIndexOf.call(obj, \"undefined\") === -1;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.lastIndexOf))"
+ },
+ {
+ "id": "15.4.4.15-3-4",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-4.js",
+ "description": "Array.prototype.lastIndexOf - value of 'length' is a number (value is -0)",
+ "test": "assertTrue((function testcase() {\n\n var obj = { 0: true, length: -0 };\n\n return Array.prototype.lastIndexOf.call(obj, true) === -1;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.lastIndexOf))"
+ },
+ {
+ "id": "15.4.4.15-3-5",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-5.js",
+ "description": "Array.prototype.lastIndexOf - value of 'length' is a number (value is +0)",
+ "test": "assertTrue((function testcase() {\n\n var obj = { 0: +0, length: +0 };\n\n return Array.prototype.lastIndexOf.call(obj, +0) === -1;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.lastIndexOf))"
+ },
+ {
+ "id": "15.4.4.15-3-6",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-6.js",
+ "description": "Array.prototype.lastIndexOf - value of 'length' is a number (value is a positive number)",
+ "test": "assertTrue((function testcase() {\n\n var obj = { 99: true, 100: 100, length: 100 };\n\n return Array.prototype.lastIndexOf.call(obj, true) === 99 &&\n Array.prototype.lastIndexOf.call(obj, 100) === -1;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.lastIndexOf))"
+ },
+ {
+ "id": "15.4.4.15-3-7",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-7.js",
+ "description": "Array.prototype.lastIndexOf - value of 'length' is a number (value is a negative number)",
+ "test": "assertTrue((function testcase() {\n\n var obj = { 4: -Infinity, 5: Infinity, length: 5 - Math.pow(2, 32) };\n\n return Array.prototype.lastIndexOf.call(obj, -Infinity) === 4 &&\n Array.prototype.lastIndexOf.call(obj, Infinity) === -1;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.lastIndexOf))"
+ },
+ {
+ "id": "15.4.4.15-3-8",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-8.js",
+ "description": "Array.prototype.lastIndexOf - value of 'length' is a number (value is Infinity)",
+ "test": "assertTrue((function testcase() {\n\n var obj = { 0: 0, length: Infinity };\n\n return Array.prototype.lastIndexOf.call(obj, 0) === -1;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.lastIndexOf))"
+ },
+ {
+ "id": "15.4.4.15-3-9",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-3-9.js",
+ "description": "Array.prototype.lastIndexOf - value of 'length' is a number (value is -Infinity)",
+ "test": "assertTrue((function testcase() {\n\n var obj = { 0: 0, length: -Infinity };\n\n return Array.prototype.lastIndexOf.call(obj, 0) === -1;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.lastIndexOf))"
+ },
+ {
+ "id": "15.4.4.15-4-1",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-4-1.js",
+ "description": "Array.prototype.lastIndexOf returns -1 if 'length' is 0 (empty array)",
+ "test": "assertTrue((function testcase() {\n var i = [].lastIndexOf(42);\n if (i === -1) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.lastIndexOf))"
+ },
+ {
+ "id": "15.4.4.15-4-10",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-4-10.js",
+ "description": "Array.prototype.lastIndexOf - 'length' is a number of value -6e-1",
+ "test": "assertTrue((function testcase() {\n var targetObj = [];\n var obj = { 0: targetObj, 100: targetObj, length: -6e-1 };\n return Array.prototype.lastIndexOf.call(obj, targetObj) === -1;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.lastIndexOf))"
+ },
+ {
+ "id": "15.4.4.15-4-11",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-4-11.js",
+ "description": "Array.prototype.lastIndexOf - 'length' is an empty string",
+ "test": "assertTrue((function testcase() {\n var targetObj = [];\n var obj = { 0: targetObj, 100: targetObj, length: \"\" };\n return Array.prototype.lastIndexOf.call(obj, targetObj) === -1;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.lastIndexOf))"
+ },
+ {
+ "id": "15.4.4.15-4-2",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-4-2.js",
+ "description": "Array.prototype.lastIndexOf returns -1 if 'length' is 0 ( length overridden to null (type conversion))",
+ "test": "assertTrue((function testcase() {\n \n var i = Array.prototype.lastIndexOf.call({length: null}, 1);\n \n if (i === -1) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.lastIndexOf))"
+ },
+ {
+ "id": "15.4.4.15-4-3",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-4-3.js",
+ "description": "Array.prototype.lastIndexOf returns -1 if 'length' is 0 (length overridden to false (type conversion))",
+ "test": "assertTrue((function testcase() {\n \n var i = Array.prototype.lastIndexOf.call({length: false}, 1);\n \n if (i === -1) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.lastIndexOf))"
+ },
+ {
+ "id": "15.4.4.15-4-4",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-4-4.js",
+ "description": "Array.prototype.lastIndexOf returns -1 if 'length' is 0 (generic 'array' with length 0 )",
+ "test": "assertTrue((function testcase() {\n foo.prototype = new Array(1, 2, 3);\n function foo() {}\n var f = new foo();\n f.length = 0;\n \n var i = Array.prototype.lastIndexOf.call({length: 0}, 1);\n \n if (i === -1) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.lastIndexOf))"
+ },
+ {
+ "id": "15.4.4.15-4-5",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-4-5.js",
+ "description": "Array.prototype.lastIndexOf returns -1 if 'length' is 0 ( length overridden to '0' (type conversion))",
+ "test": "assertTrue((function testcase() {\n \n var i = Array.prototype.lastIndexOf.call({length: '0'}, 1);\n \n if (i === -1) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.lastIndexOf))"
+ },
+ {
+ "id": "15.4.4.15-4-6",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-4-6.js",
+ "description": "Array.prototype.lastIndexOf returns -1 if 'length' is 0 (subclassed Array, length overridden with obj with valueOf)",
+ "test": "assertTrue((function testcase() {\n \n var i = Array.prototype.lastIndexOf.call({length: { valueOf: function () { return 0;}}}, 1);\n \n if (i === -1) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.lastIndexOf))"
+ },
+ {
+ "id": "15.4.4.15-4-7",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-4-7.js",
+ "description": "Array.prototype.lastIndexOf returns -1 if 'length' is 0 ( length is object overridden with obj w/o valueOf (toString))",
+ "test": "assertTrue((function testcase() {\n foo.prototype = new Array(1, 2, 3);\n function foo() {}\n var f = new foo();\n \n var o = { toString: function () { return '0';}};\n f.length = o;\n \n // objects inherit the default valueOf method of the Object object;\n // that simply returns the itself. Since the default valueOf() method\n // does not return a primitive value, ES next tries to convert the object\n // to a number by calling its toString() method and converting the\n // resulting string to a number.\n var i = Array.prototype.lastIndexOf.call({length: { toString: function () { return '0';}}}, 1);\n \n if (i === -1) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.lastIndexOf))"
+ },
+ {
+ "id": "15.4.4.15-4-8",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-4-8.js",
+ "description": "Array.prototype.lastIndexOf returns -1 if 'length' is 0 (length is an empty array)",
+ "test": "assertTrue((function testcase() {\n\n \n // objects inherit the default valueOf method of the Object object;\n // that simply returns the itself. Since the default valueOf() method\n // does not return a primitive value, ES next tries to convert the object\n // to a number by calling its toString() method and converting the\n // resulting string to a number.\n //\n // The toString( ) method on Array converts the array elements to strings,\n // then returns the result of concatenating these strings, with commas in\n // between. An array with no elements converts to the empty string, which\n // converts to the number 0. If an array has a single element that is a\n // number n, the array converts to a string representation of n, which is\n // then converted back to n itself. If an array contains more than one element,\n // or if its one element is not a number, the array converts to NaN.\n var i = Array.prototype.lastIndexOf.call({length: [ ]}, 1);\n \n if (i === -1) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.lastIndexOf))"
+ },
+ {
+ "id": "15.4.4.15-4-9",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-4-9.js",
+ "description": "Array.prototype.lastIndexOf - 'length' is a number of value 0.1",
+ "test": "assertTrue((function testcase() {\n var targetObj = [];\n var obj = { 0: targetObj, 100: targetObj, length: 0.1 };\n return Array.prototype.lastIndexOf.call(obj, targetObj) === -1;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.lastIndexOf))"
+ },
+ {
+ "id": "15.4.4.15-5-1",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-1.js",
+ "description": "Array.prototype.lastIndexOf when fromIndex is string",
+ "test": "assertTrue((function testcase() {\n var a = new Array(0,1,1);\n if (a.lastIndexOf(1,\"1\") === 1 && // \"1\" resolves to 1\n a.lastIndexOf(1,\"one\") === -1) { // NaN string resolves to 0\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.lastIndexOf))"
+ },
+ {
+ "id": "15.4.4.15-5-10",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-10.js",
+ "description": "Array.prototype.lastIndexOf - value of 'fromIndex' is a number (value is positive number)",
+ "test": "assertTrue((function testcase() {\n var targetObj = {};\n return [0, targetObj, true].lastIndexOf(targetObj, 1.5) === 1 &&\n [0, true, targetObj].lastIndexOf(targetObj, 1.5) === -1;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.lastIndexOf))"
+ },
+ {
+ "id": "15.4.4.15-5-11",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-11.js",
+ "description": "Array.prototype.lastIndexOf - value of 'fromIndex' is a number (value is negative number)",
+ "test": "assertTrue((function testcase() {\n var targetObj = {};\n return [0, targetObj, true].lastIndexOf(targetObj, -2.5) === 1 &&\n [0, true, targetObj].lastIndexOf(targetObj, -2.5) === -1;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.lastIndexOf))"
+ },
+ {
+ "id": "15.4.4.15-5-12",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-12.js",
+ "description": "Array.prototype.lastIndexOf - value of 'fromIndex' is a number (value is Infinity)",
+ "test": "assertTrue((function testcase() {\n var arr = [];\n arr[Math.pow(2, 32) - 2] = null; // length is the max value of Uint type\n return arr.lastIndexOf(null, Infinity) === (Math.pow(2, 32) - 2);\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.lastIndexOf))"
+ },
+ {
+ "id": "15.4.4.15-5-13",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-13.js",
+ "description": "Array.prototype.lastIndexOf - value of 'fromIndex' is a number (value is -Infinity)",
+ "test": "assertTrue(([true].lastIndexOf(true, -Infinity) === -1));\n",
+ "precondition": "(fnExists(Array.prototype.lastIndexOf))"
+ },
+ {
+ "id": "15.4.4.15-5-14",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-14.js",
+ "description": "Array.prototype.lastIndexOf - value of 'fromIndex' is a number (value is NaN)",
+ "test": "assertTrue(([0, true].lastIndexOf(true, NaN) === -1 && // from Index will be convert to +0\n [true, 0].lastIndexOf(true, NaN) === 0 &&\n [0, true].lastIndexOf(true, -NaN) === -1 &&\n [true, 0].lastIndexOf(true, -NaN) === 0));\n",
+ "precondition": "(fnExists(Array.prototype.lastIndexOf))"
+ },
+ {
+ "id": "15.4.4.15-5-15",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-15.js",
+ "description": "Array.prototype.lastIndexOf - value of 'fromIndex' is a string containing a negative number",
+ "test": "assertTrue(([0, \"-2\", 2].lastIndexOf(\"-2\", \"-2\") === 1 &&\n [0, 2, \"-2\"].lastIndexOf(\"-2\", \"-2\") === -1));\n",
+ "precondition": "(fnExists(Array.prototype.lastIndexOf))"
+ },
+ {
+ "id": "15.4.4.15-5-16",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-16.js",
+ "description": "Array.prototype.lastIndexOf - value of 'fromIndex' is a string containing Infinity",
+ "test": "assertTrue((function testcase() {\n var arr = [];\n arr[Math.pow(2, 32) - 2] = true; // length is the max value of Uint type\n return arr.lastIndexOf(true, \"Infinity\") === (Math.pow(2, 32) - 2);\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.lastIndexOf))"
+ },
+ {
+ "id": "15.4.4.15-5-17",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-17.js",
+ "description": "Array.prototype.lastIndexOf - value of 'fromIndex' is a string containing -Infinity",
+ "test": "assertTrue(([true].lastIndexOf(true, \"-Infinity\") === -1));\n",
+ "precondition": "(fnExists(Array.prototype.lastIndexOf))"
+ },
+ {
+ "id": "15.4.4.15-5-18",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-18.js",
+ "description": "Array.prototype.lastIndexOf - value of 'fromIndex' is a string containing an exponential number",
+ "test": "assertTrue((function testcase() {\n var targetObj = {};\n return [0, NaN, targetObj, 3, false].lastIndexOf(targetObj, \"2E0\") === 2 &&\n [0, NaN, 3, targetObj, false].lastIndexOf(targetObj, \"2E0\") === -1;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.lastIndexOf))"
+ },
+ {
+ "id": "15.4.4.15-5-19",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-19.js",
+ "description": "Array.prototype.lastIndexOf - value of 'fromIndex' is a string containing a hex number",
+ "test": "assertTrue((function testcase() {\n var targetObj = {};\n return [0, true, targetObj, 3, false].lastIndexOf(targetObj, \"0x0002\") === 2 &&\n [0, true, 3, targetObj, false].lastIndexOf(targetObj, \"0x0002\") === -1;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.lastIndexOf))"
+ },
+ {
+ "id": "15.4.4.15-5-2",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-2.js",
+ "description": "Array.prototype.lastIndexOf when fromIndex is floating point number",
+ "test": "assertTrue((function testcase() {\n var a = new Array(1,2,1);\n if (a.lastIndexOf(2,1.49) === 1 && // 1.49 resolves to 1\n a.lastIndexOf(2,0.51) === -1 && // 0.51 resolves to 0\n a.lastIndexOf(1,0.51) === 0){ // 0.51 resolves to 0\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.lastIndexOf))"
+ },
+ {
+ "id": "15.4.4.15-5-20",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-20.js",
+ "description": "Array.prototype.lastIndexOf - value of 'fromIndex' which is a string containing a number with leading zeros",
+ "test": "assertTrue((function testcase() {\n var targetObj = {};\n return [0, true, targetObj, 3, false].lastIndexOf(targetObj, \"0002.10\") === 2 &&\n [0, true, 3, targetObj, false].lastIndexOf(targetObj, \"0002.10\") === -1;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.lastIndexOf))"
+ },
+ {
+ "id": "15.4.4.15-5-21",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-21.js",
+ "description": "Array.prototype.lastIndexOf - value of 'fromIndex' which is an Object, and has an own toString method",
+ "test": "assertTrue((function testcase() {\n\n // objects inherit the default valueOf() method from Object\n // that simply returns itself. Since the default valueOf() method\n // does not return a primitive value, ES next tries to convert the object\n // to a number by calling its toString() method and converting the\n // resulting string to a number.\n var fromIndex = {\n toString: function () {\n return '2';\n }\n };\n var targetObj = new RegExp();\n\n return [0, true, targetObj, 3, false].lastIndexOf(targetObj, fromIndex) === 2 &&\n [0, true, 3, targetObj, false].lastIndexOf(targetObj, fromIndex) === -1;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.lastIndexOf))"
+ },
+ {
+ "id": "15.4.4.15-5-22",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-22.js",
+ "description": "Array.prototype.lastIndexOf - value of 'fromIndex' which is an object, and has an own valueOf method",
+ "test": "assertTrue((function testcase() {\n\n var fromIndex = {\n valueOf: function () {\n return 2;\n }\n };\n\n var targetObj = function () {};\n return [0, true, targetObj, 3, false].lastIndexOf(targetObj, fromIndex) === 2 &&\n [0, true, 3, targetObj, false].lastIndexOf(targetObj, fromIndex) === -1;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.lastIndexOf))"
+ },
+ {
+ "id": "15.4.4.15-5-23",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-23.js",
+ "description": "Array.prototype.lastIndexOf - value of 'fromIndex' is an object that has an own valueOf method that returns an object and toString method that returns a string",
+ "test": "assertTrue((function testcase() {\n\n var toStringAccessed = false;\n var valueOfAccessed = false;\n\n var fromIndex = {\n toString: function () {\n toStringAccessed = true;\n return '1';\n },\n\n valueOf: function () {\n valueOfAccessed = true;\n return {};\n }\n };\n\n return [0, true].lastIndexOf(true, fromIndex) === 1 && toStringAccessed && valueOfAccessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.lastIndexOf))"
+ },
+ {
+ "id": "15.4.4.15-5-24",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-24.js",
+ "description": "Array.prototype.lastIndexOf throws TypeError exception when value of 'fromIndex' is an object that both toString and valueOf methods than don't return primitive value",
+ "test": "assertTrue((function testcase() {\n\n var toStringAccessed = false;\n var valueOfAccessed = false;\n\n var fromIndex = {\n toString: function () {\n toStringAccessed = true;\n return {};\n },\n\n valueOf: function () {\n valueOfAccessed = true;\n return {};\n }\n };\n\n try {\n [0, null].lastIndexOf(null, fromIndex);\n return false;\n } catch (e) {\n return toStringAccessed && valueOfAccessed;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.lastIndexOf))"
+ },
+ {
+ "id": "15.4.4.15-5-25",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-25.js",
+ "description": "Array.prototype.lastIndexOf use inherited valueOf method when value of 'fromIndex' is an object with an own toString and inherited valueOf methods",
+ "test": "assertTrue((function testcase() {\n\n var toStringAccessed = false;\n var valueOfAccessed = false;\n\n var proto = {\n valueOf: function () {\n valueOfAccessed = true;\n return 1;\n }\n };\n\n var Con = function () {};\n Con.prototype = proto;\n\n var child = new Con();\n child.toString = function () {\n toStringAccessed = true;\n return 1;\n };\n\n return [0, true].lastIndexOf(true, child) === 1 && valueOfAccessed && !toStringAccessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.lastIndexOf))"
+ },
+ {
+ "id": "15.4.4.15-5-26",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-26.js",
+ "description": "Array.prototype.lastIndexOf - side effects produced by step 2 are visible when an exception occurs",
+ "test": "assertTrue((function testcase() {\n\n var stepTwoOccurs = false;\n var stepFiveOccurs = false;\n var obj = {};\n\n Object.defineProperty(obj, \"length\", {\n get: function () {\n stepTwoOccurs = true;\n if (stepFiveOccurs) {\n throw new Error(\"Step 5 occurred out of order\");\n }\n return 20;\n },\n configurable: true\n });\n\n var fromIndex = {\n valueOf: function () {\n stepFiveOccurs = true;\n return 0;\n }\n };\n\n try {\n Array.prototype.lastIndexOf.call(obj, undefined, fromIndex);\n return stepTwoOccurs && stepFiveOccurs;\n } catch (ex) {\n return false;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.lastIndexOf) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.4.4.15-5-27",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-27.js",
+ "description": "Array.prototype.lastIndexOf - side effects produced by step 3 are visible when an exception occurs",
+ "test": "assertTrue((function testcase() {\n\n var stepThreeOccurs = false;\n var stepFiveOccurs = false;\n\n var obj = {};\n\n Object.defineProperty(obj, \"length\", {\n get: function () {\n return {\n valueOf: function () {\n stepThreeOccurs = true;\n if (stepFiveOccurs) {\n throw new Error(\"Step 5 occurred out of order\");\n }\n return 20;\n }\n };\n },\n configurable: true\n });\n\n var fromIndex = {\n valueOf: function () {\n stepFiveOccurs = true;\n return 0;\n }\n };\n\n try {\n Array.prototype.lastIndexOf.call(obj, undefined, fromIndex);\n return stepThreeOccurs && stepFiveOccurs;\n } catch (ex) {\n return false;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.lastIndexOf) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.4.4.15-5-28",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-28.js",
+ "description": "Array.prototype.lastIndexOf - side effects produced by step 1 are visible when an exception occurs",
+ "test": "assertTrue((function testcase() {\n\n var stepFiveOccurs = false;\n var fromIndex = {\n valueOf: function () {\n stepFiveOccurs = true;\n return 0;\n }\n };\n\n try {\n Array.prototype.lastIndexOf.call(undefined, undefined, fromIndex);\n return false;\n } catch (e) {\n return (e instanceof TypeError) && !stepFiveOccurs;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.lastIndexOf))"
+ },
+ {
+ "id": "15.4.4.15-5-29",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-29.js",
+ "description": "Array.prototype.lastIndexOf - side effects produced by step 2 are visible when an exception occurs",
+ "test": "assertTrue((function testcase() {\n\n var stepFiveOccurs = false;\n\n var obj = {};\n Object.defineProperty(obj, \"length\", {\n get: function () {\n throw new RangeError();\n },\n configurable: true\n });\n\n var fromIndex = {\n valueOf: function () {\n stepFiveOccurs = true;\n return 0;\n }\n };\n\n try {\n Array.prototype.lastIndexOf.call(obj, undefined, fromIndex);\n return false;\n } catch (e) {\n return (e instanceof RangeError) && !stepFiveOccurs;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.lastIndexOf) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.4.4.15-5-3",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-3.js",
+ "description": "Array.prototype.lastIndexOf when fromIndex is boolean",
+ "test": "assertTrue((function testcase() {\n var a = new Array(1,2,1);\n if (a.lastIndexOf(2,true) === 1 && // true resolves to 1\n a.lastIndexOf(2,false) === -1 ) { // false resolves to 0\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.lastIndexOf))"
+ },
+ {
+ "id": "15.4.4.15-5-30",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-30.js",
+ "description": "Array.prototype.lastIndexOf - side effects produced by step 3 are visible when an exception occurs",
+ "test": "assertTrue((function testcase() {\n\n var stepFiveOccurs = false;\n\n var obj = {};\n Object.defineProperty(obj, \"length\", {\n get: function () {\n return {\n valueOf: function () {\n throw new TypeError();\n }\n };\n },\n configurable: true\n });\n\n var fromIndex = {\n valueOf: function () {\n stepFiveOccurs = true;\n return 0;\n }\n };\n\n try {\n Array.prototype.lastIndexOf.call(obj, undefined, fromIndex);\n return false;\n } catch (e) {\n return (e instanceof TypeError) && !stepFiveOccurs;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.lastIndexOf) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.4.4.15-5-31",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-31.js",
+ "description": "Array.prototype.lastIndexOf - 'fromIndex' is a positive non-integer, verify truncation occurs in the proper direction",
+ "test": "assertTrue((function testcase() {\n var targetObj = {};\n return [0, targetObj, true].lastIndexOf(targetObj, 1.5) === 1 &&\n [0, true, targetObj].lastIndexOf(targetObj, 1.5) === -1;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.lastIndexOf))"
+ },
+ {
+ "id": "15.4.4.15-5-32",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-32.js",
+ "description": "Array.prototype.lastIndexOf - 'fromIndex' is a negative non-integer, verify truncation occurs in the proper direction",
+ "test": "assertTrue((function testcase() {\n var targetObj = {};\n return [0, targetObj, true].lastIndexOf(targetObj, -2.5) === 1 &&\n [0, true, targetObj].lastIndexOf(targetObj, -2.5) === -1;\n\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.lastIndexOf))"
+ },
+ {
+ "id": "15.4.4.15-5-33",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-33.js",
+ "description": "Array.prototype.lastIndexOf - match on the first element, a middle element and the last element when 'fromIndex' is passed",
+ "test": "assertTrue(([0, 1, 2, 3, 4].lastIndexOf(0, 0) === 0 &&\n [0, 1, 2, 3, 4].lastIndexOf(0, 2) === 0 &&\n [0, 1, 2, 3, 4].lastIndexOf(2, 2) === 2 &&\n [0, 1, 2, 3, 4].lastIndexOf(2, 4) === 2 &&\n [0, 1, 2, 3, 4].lastIndexOf(4, 4) === 4));\n",
+ "precondition": "(fnExists(Array.prototype.lastIndexOf))"
+ },
+ {
+ "id": "15.4.4.15-5-4",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-4.js",
+ "description": "Array.prototype.lastIndexOf when fromIndex is undefined",
+ "test": "assertTrue((function testcase() {\n var a = new Array(1,2,1);\n if (a.lastIndexOf(2,undefined) === -1 &&\n a.lastIndexOf(1,undefined) === 0 &&\n a.lastIndexOf(1) === 2) { // undefined resolves to 0, no second argument resolves to len\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.lastIndexOf))"
+ },
+ {
+ "id": "15.4.4.15-5-5",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-5.js",
+ "description": "Array.prototype.lastIndexOf when fromIndex is null",
+ "test": "assertTrue((function testcase() {\n var a = new Array(1,2,1);\n if (a.lastIndexOf(2,null) === -1 && a.lastIndexOf(1,null) === 0) { // null resolves to 0\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.lastIndexOf))"
+ },
+ {
+ "id": "15.4.4.15-5-6",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-6.js",
+ "description": "Array.prototype.lastIndexOf when 'fromIndex' isn't passed",
+ "test": "assertTrue((function testcase() {\n var arr = [0, 1, 2, 3, 4];\n //'fromIndex' will be set as 4 if not passed by default\n return arr.lastIndexOf(0) === arr.lastIndexOf(0, 4) &&\n arr.lastIndexOf(2) === arr.lastIndexOf(2, 4) &&\n arr.lastIndexOf(4) === arr.lastIndexOf(4, 4);\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.lastIndexOf))"
+ },
+ {
+ "id": "15.4.4.15-5-7",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-7.js",
+ "description": "Array.prototype.lastIndexOf - value of 'fromIndex' is a number (value is 0)",
+ "test": "assertTrue((function testcase() {\n\n return [0, 100].lastIndexOf(100, 0) === -1 && // verify fromIndex is not more than 0\n [200, 0].lastIndexOf(200, 0) === 0; // verify fromIndex is not less than 0\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.lastIndexOf))"
+ },
+ {
+ "id": "15.4.4.15-5-8",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-8.js",
+ "description": "Array.prototype.lastIndexOf - value of 'fromIndex' is a number (value is +0)",
+ "test": "assertTrue(([0, true].lastIndexOf(true, +0) === -1 &&\n [true, 0].lastIndexOf(true, +0) === 0));\n",
+ "precondition": "(fnExists(Array.prototype.lastIndexOf))"
+ },
+ {
+ "id": "15.4.4.15-5-9",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-5-9.js",
+ "description": "Array.prototype.lastIndexOf - value of 'fromIndex' is a number (value is -0)",
+ "test": "assertTrue(([0, true].lastIndexOf(true, -0) === -1 &&\n [true, 0].lastIndexOf(true, -0) === 0));\n",
+ "precondition": "(fnExists(Array.prototype.lastIndexOf))"
+ },
+ {
+ "id": "15.4.4.15-6-1",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-6-1.js",
+ "description": "Array.prototype.lastIndexOf when fromIndex greater than Array.length",
+ "test": "assertTrue((function testcase() {\n var a = new Array(1,2,3);\n if (a.lastIndexOf(3,5.4) === 2 && \n a.lastIndexOf(3,3.1) === 2 ) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.lastIndexOf))"
+ },
+ {
+ "id": "15.4.4.15-6-2",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-6-2.js",
+ "description": "Array.prototype.lastIndexOf returns correct index when 'fromIndex' is length of array - 1",
+ "test": "assertTrue(([1, 2, 3].lastIndexOf(3, 2) === 2));\n",
+ "precondition": "(fnExists(Array.prototype.lastIndexOf))"
+ },
+ {
+ "id": "15.4.4.15-6-3",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-6-3.js",
+ "description": "Array.prototype.lastIndexOf returns -1 when 'fromIndex' is length of array - 1",
+ "test": "assertTrue(([1, 2, 3].lastIndexOf(3, 1) === -1));\n",
+ "precondition": "(fnExists(Array.prototype.lastIndexOf))"
+ },
+ {
+ "id": "15.4.4.15-6-4",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-6-4.js",
+ "description": "Array.prototype.lastIndexOf returns -1 when 'fromIndex' and 'length' are both 0",
+ "test": "assertTrue(([].lastIndexOf(1, 0) === -1));\n",
+ "precondition": "(fnExists(Array.prototype.lastIndexOf))"
+ },
+ {
+ "id": "15.4.4.15-6-5",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-6-5.js",
+ "description": "Array.prototype.lastIndexOf returns -1 when 'fromIndex' is 1",
+ "test": "assertTrue(([1, 2, 3].lastIndexOf(3, 1) === -1));\n",
+ "precondition": "(fnExists(Array.prototype.lastIndexOf))"
+ },
+ {
+ "id": "15.4.4.15-6-6",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-6-6.js",
+ "description": "Array.prototype.lastIndexOf returns correct index when 'fromIndex' is 1",
+ "test": "assertTrue(([1, 2, 3].lastIndexOf(2, 1) === 1));\n",
+ "precondition": "(fnExists(Array.prototype.lastIndexOf))"
+ },
+ {
+ "id": "15.4.4.15-7-1",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-7-1.js",
+ "description": "Array.prototype.lastIndexOf with negative fromIndex ",
+ "test": "assertTrue((function testcase() {\n var a = new Array(1,2,3);\n \n if (a.lastIndexOf(2,-2) === 1 && \n a.lastIndexOf(2,-3) === -1 && \n a.lastIndexOf(1,-5.3) === -1 ) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.lastIndexOf))"
+ },
+ {
+ "id": "15.4.4.15-7-2",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-7-2.js",
+ "description": "Array.prototype.lastIndexOf returns correct index when 'fromIndex' is -1",
+ "test": "assertTrue(([1, 2, 3, 4].lastIndexOf(4, -1) === 3));\n",
+ "precondition": "(fnExists(Array.prototype.lastIndexOf))"
+ },
+ {
+ "id": "15.4.4.15-7-3",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-7-3.js",
+ "description": "Array.prototype.lastIndexOf returns -1 when abs('fromIndex') is length of array - 1",
+ "test": "assertTrue(([1, 2, 3, 4].lastIndexOf(3, -3) === -1));\n",
+ "precondition": "(fnExists(Array.prototype.lastIndexOf))"
+ },
+ {
+ "id": "15.4.4.15-7-4",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-7-4.js",
+ "description": "Array.prototype.lastIndexOf returns -1 when abs('fromIndex') is length of array",
+ "test": "assertTrue(([1, 2, 3, 4].lastIndexOf(2, -4) === -1));\n",
+ "precondition": "(fnExists(Array.prototype.lastIndexOf))"
+ },
+ {
+ "id": "15.4.4.15-8-1",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-1.js",
+ "description": "Array.prototype.lastIndexOf must return correct index(boolean)",
+ "test": "assertTrue((function testcase() {\n var obj = {toString:function (){return true}};\n var _false = false;\n var a = new Array(false,true,false,obj,_false,true,\"true\", undefined,0,null,1,\"str\",0,1);\n if (a.lastIndexOf(true) === 5 && //a[5]=true\n a.lastIndexOf(false) === 4) //a[4] =_false\n {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.lastIndexOf))"
+ },
+ {
+ "id": "15.4.4.15-8-10",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-10.js",
+ "description": "Array.prototype.lastIndexOf must return correct index (NaN)",
+ "test": "assertTrue((function testcase() {\n var _NaN = NaN;\n var a = new Array(\"NaN\",_NaN,NaN, undefined,0,false,null,{toString:function (){return NaN}},\"false\");\n if (a.lastIndexOf(NaN) === -1) // NaN matches nothing, not even itself\n {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.lastIndexOf))"
+ },
+ {
+ "id": "15.4.4.15-8-11",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-11.js",
+ "description": "Array.prototype.lastIndexOf - the length of iteration isn't changed by adding elements to the array during iteration",
+ "test": "assertTrue((function testcase() {\n\n var arr = [20];\n\n Object.defineProperty(arr, \"0\", {\n get: function () {\n arr[1] = 1;\n return 0;\n },\n configurable: true\n });\n\n return arr.lastIndexOf(1) === -1;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.lastIndexOf) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.4.4.15-8-2",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-2.js",
+ "description": "Array.prototype.lastIndexOf must return correct index(Number)",
+ "test": "assertTrue((function testcase() {\n var obj = {toString:function (){return 0}};\n var one = 1;\n var _float = -(4/3);\n var a = new Array(+0,true,0,-0, false,undefined,null,\"0\",obj, _float,-(4/3),-1.3333333333333,\"str\",one, 1, false);\n if (a.lastIndexOf(-(4/3)) === 10 && // a[10]=-(4/3)\n a.lastIndexOf(0) === 3 && // a[3] = -0, but using === -0 and 0 are equal\n a.lastIndexOf(-0) ===3 && // a[3] = -0\n a.lastIndexOf(1) === 14 ) // a[14] = 1\n {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.lastIndexOf))"
+ },
+ {
+ "id": "15.4.4.15-8-3",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-3.js",
+ "description": "Array.prototype.lastIndexOf must return correct index(string)",
+ "test": "assertTrue((function testcase() {\n var obj = {toString:function (){return \"false\"}};\n var szFalse = \"false\";\n var a = new Array(szFalse, \"false\",\"false1\",undefined,0,false,null,1,obj,0);\n if (a.lastIndexOf(\"false\") === 1) \n {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.lastIndexOf))"
+ },
+ {
+ "id": "15.4.4.15-8-4",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-4.js",
+ "description": "Array.prototype.lastIndexOf must return correct index(undefined)",
+ "test": "assertTrue((function testcase() {\n var obj = {toString:function (){return undefined;}};\n var _undefined1 = undefined;\n var _undefined2;\n var a = new Array(_undefined1,_undefined2,undefined,true,0,false,null,1,\"undefined\",obj,1);\n if (a.lastIndexOf(undefined) === 2) \n {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.lastIndexOf))"
+ },
+ {
+ "id": "15.4.4.15-8-5",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-5.js",
+ "description": "Array.prototype.lastIndexOf must return correct index(Object)",
+ "test": "assertTrue((function testcase() {\n var obj1 = {toString:function (){return \"false\"}};\n var obj2 = {toString:function (){return \"false\"}};\n var obj3 = obj1;\n var a = new Array(obj2,obj1,obj3,false,undefined,0,false,null,{toString:function (){return \"false\"}},\"false\");\n if (a.lastIndexOf(obj3) === 2) \n {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.lastIndexOf))"
+ },
+ {
+ "id": "15.4.4.15-8-6",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-6.js",
+ "description": "Array.prototype.lastIndexOf must return correct index(null)",
+ "test": "assertTrue((function testcase() {\n var obj = {toString:function (){return null}};\n var _null = null;\n var a = new Array(true,undefined,0,false,null,1,\"str\",0,1,null,true,false,undefined,_null,\"null\",undefined,\"str\",obj);\n if (a.lastIndexOf(null) === 13 ) \n {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.lastIndexOf))"
+ },
+ {
+ "id": "15.4.4.15-8-7",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-7.js",
+ "description": "Array.prototype.lastIndexOf must return correct index (self reference)",
+ "test": "assertTrue((function testcase() {\n var a = new Array(0,1,2,3); \n a[2] = a;\n if (a.lastIndexOf(a) === 2 && \n a.lastIndexOf(3) === 3 ) \n {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.lastIndexOf))"
+ },
+ {
+ "id": "15.4.4.15-8-8",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-8.js",
+ "description": "Array.prototype.lastIndexOf must return correct index (Array)",
+ "test": "assertTrue((function testcase() {\n var b = new Array(\"0,1\"); \n var a = new Array(0,b,\"0,1\",3); \n if (a.lastIndexOf(b.toString()) === 2 && \n a.lastIndexOf(\"0,1\") === 2 ) \n {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.lastIndexOf))"
+ },
+ {
+ "id": "15.4.4.15-8-9",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-9.js",
+ "description": "Array.prototype.lastIndexOf must return correct index (Sparse Array)",
+ "test": "assertTrue((function testcase() {\n var a = new Array(0,1); \n a[4294967294] = 2; // 2^32-2 - is max array element index\n a[4294967295] = 3; // 2^32-1 added as non-array element property\n a[4294967296] = 4; // 2^32 added as non-array element property\n a[4294967297] = 5; // 2^32+1 added as non-array element property\n // stop searching near the end in case implementation actually tries to test all missing elements!!\n a[4294967200] = 3; \n a[4294967201] = 4; \n a[4294967202] = 5; \n\n\n return (a.lastIndexOf(2) === 4294967294 && \n a.lastIndexOf(3) === 4294967200 &&\n a.lastIndexOf(4) === 4294967201 &&\n a.lastIndexOf(5) === 4294967202) ;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.lastIndexOf))"
+ },
+ {
+ "id": "15.4.4.15-8-a-1",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-a-1.js",
+ "description": "Array.prototype.lastIndexOf - added properties in step 2 are visible here",
+ "test": "assertTrue((function testcase() {\n\n var arr = { };\n\n Object.defineProperty(arr, \"length\", {\n get: function () {\n arr[2] = \"length\";\n return 3;\n },\n configurable: true\n });\n\n return 2 === Array.prototype.lastIndexOf.call(arr, \"length\");\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.lastIndexOf) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.4.4.15-8-a-10",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-a-10.js",
+ "description": "Array.prototype.lastIndexOf - properties can be added to prototype after current position are visited on an Array",
+ "test": "assertTrue((function testcase() {\n\n var arr = [0, , 2];\n\n Object.defineProperty(arr, \"2\", {\n get: function () {\n Object.defineProperty(Array.prototype, \"1\", {\n get: function () {\n return 6.99;\n },\n configurable: true\n });\n return 0;\n },\n configurable: true\n });\n\n try {\n return arr.lastIndexOf(6.99) === 1;\n } finally {\n delete Array.prototype[1];\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.lastIndexOf) && fnExists(Object.defineProperty) && ![, 1].hasOwnProperty(0) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.4.4.15-8-a-11",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-a-11.js",
+ "description": "Array.prototype.lastIndexOf - deleting own property causes index property not to be visited on an Array-like object",
+ "test": "assertTrue((function testcase() {\n\n var arr = { length: 200 };\n\n Object.defineProperty(arr, \"1\", {\n get: function () {\n return 6.99;\n },\n configurable: true\n });\n\n Object.defineProperty(arr, \"100\", {\n get: function () {\n delete arr[1];\n return 0;\n },\n configurable: true\n });\n\n return -1 === Array.prototype.lastIndexOf.call(arr, 6.99);\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.lastIndexOf) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects())"
+ },
+ {
+ "id": "15.4.4.15-8-a-12",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-a-12.js",
+ "description": "Array.prototype.lastIndexOf - deleting own property causes index property not to be visited on an Array",
+ "test": "assertTrue((function testcase() {\n\n var arr = [1, 2, 3, 4];\n\n Object.defineProperty(arr, \"1\", {\n get: function () {\n return \"6.99\";\n },\n configurable: true\n });\n\n Object.defineProperty(arr, \"3\", {\n get: function () {\n delete arr[1];\n return 0;\n },\n configurable: true\n });\n\n return -1 === arr.lastIndexOf(\"6.99\");\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.lastIndexOf) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.4.4.15-8-a-13",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-a-13.js",
+ "description": "Array.prototype.lastIndexOf - deleting property of prototype causes prototype index property not to be visited on an Array-like Object",
+ "test": "assertTrue((function testcase() {\n\n var arr = { 2: 2, length: 20 };\n\n Object.defineProperty(arr, \"3\", {\n get: function () {\n delete Object.prototype[1];\n return 0;\n },\n configurable: true\n });\n\n try {\n Object.prototype[1] = 1;\n return -1 === Array.prototype.lastIndexOf.call(arr, 1);\n } finally {\n delete Object.prototype[1];\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.lastIndexOf) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects())"
+ },
+ {
+ "id": "15.4.4.15-8-a-14",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-a-14.js",
+ "description": "Array.prototype.lastIndexOf - deleting property of prototype causes prototype index property not to be visited on an Array",
+ "test": "assertTrue((function testcase() {\n\n var arr = [0, , 2];\n\n Object.defineProperty(arr, \"20\", {\n get: function () {\n delete Array.prototype[1];\n return 0;\n },\n configurable: true\n });\n\n try {\n Array.prototype[1] = 1;\n return -1 === arr.lastIndexOf(1);\n } finally {\n delete Array.prototype[1];\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.lastIndexOf) && fnExists(Object.defineProperty) && ![, 1].hasOwnProperty(0) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.4.4.15-8-a-15",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-a-15.js",
+ "description": "Array.prototype.lastIndexOf - deleting own property with prototype property causes prototype index property to be visited on an Array-like object",
+ "test": "assertTrue((function testcase() {\n\n var arr = { 0: 0, 1: 111, 2: 2, length: 10 };\n \n Object.defineProperty(arr, \"6\", {\n get: function () {\n delete arr[1];\n return 0;\n },\n configurable: true\n });\n\n try {\n Object.prototype[1] = 1;\n return 1 === Array.prototype.lastIndexOf.call(arr, 1);\n } finally {\n delete Object.prototype[1];\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.lastIndexOf) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects())"
+ },
+ {
+ "id": "15.4.4.15-8-a-16",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-a-16.js",
+ "description": "Array.prototype.lastIndexOf - deleting own property with prototype property causes prototype index property to be visited on an Array",
+ "test": "assertTrue((function testcase() {\n\n var arr = [0, 111, 2]; \n \n Object.defineProperty(arr, \"2\", {\n get: function () {\n delete arr[1];\n return 0;\n },\n configurable: true\n });\n\n try {\n Array.prototype[1] = 1;\n return 1 === arr.lastIndexOf(1);\n } finally {\n delete Array.prototype[1];\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.lastIndexOf) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.4.4.15-8-a-17",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-a-17.js",
+ "description": "Array.prototype.lastIndexOf - decreasing length of array causes index property not to be visited",
+ "test": "assertTrue((function testcase() {\n\n var arr = [0, 1, 2, \"last\", 4];\n\n Object.defineProperty(arr, \"4\", {\n get: function () {\n arr.length = 3;\n return 0;\n },\n configurable: true\n });\n\n return -1 === arr.lastIndexOf(\"last\");\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.lastIndexOf) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.4.4.15-8-a-18",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-a-18.js",
+ "description": "Array.prototype.lastIndexOf - decreasing length of array with prototype property causes prototype index property to be visited",
+ "test": "assertTrue((function testcase() {\n\n var arr = [0, 1, 2, 3, 4];\n\n try {\n Object.defineProperty(Array.prototype, \"2\", {\n get: function () {\n return \"prototype\";\n },\n configurable: true\n });\n\n Object.defineProperty(arr, \"3\", {\n get: function () {\n arr.length = 2;\n return 1;\n },\n configurable: true\n });\n\n return 2 === arr.lastIndexOf(\"prototype\");\n } finally {\n delete Array.prototype[2];\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.lastIndexOf) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.4.4.15-8-a-19",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-a-19.js",
+ "description": "Array.prototype.lastIndexOf - decreasing length of array does not delete non-configurable properties",
+ "test": "assertTrue((function testcase() {\n\n var arr = [0, 1, 2, 3];\n\n Object.defineProperty(arr, \"2\", {\n get: function () {\n return \"unconfigurable\";\n },\n configurable: false\n });\n\n Object.defineProperty(arr, \"3\", {\n get: function () {\n arr.length = 2;\n return 1;\n },\n configurable: true\n });\n\n return 2 === arr.lastIndexOf(\"unconfigurable\");\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.lastIndexOf) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.4.4.15-8-a-2",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-a-2.js",
+ "description": "Array.prototype.lastIndexOf - added properties in step 5 are visible here on an Array-like object",
+ "test": "assertTrue((function testcase() {\n\n var arr = { length: 30 };\n var targetObj = function () { };\n\n var fromIndex = {\n valueOf: function () {\n arr[4] = targetObj;\n return 10;\n }\n };\n \n return 4 === Array.prototype.lastIndexOf.call(arr, targetObj, fromIndex);\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.lastIndexOf))"
+ },
+ {
+ "id": "15.4.4.15-8-a-3",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-a-3.js",
+ "description": "Array.prototype.lastIndexOf - added properties in step 5 are visible here on an Array",
+ "test": "assertTrue((function testcase() {\n\n var arr = [];\n arr.length = 30;\n var targetObj = function () { };\n\n var fromIndex = {\n valueOf: function () {\n arr[4] = targetObj;\n return 11;\n }\n };\n\n return 4 === arr.lastIndexOf(targetObj, fromIndex);\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.lastIndexOf))"
+ },
+ {
+ "id": "15.4.4.15-8-a-4",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-a-4.js",
+ "description": "Array.prototype.lastIndexOf - deleted properties in step 2 are visible here",
+ "test": "assertTrue((function testcase() {\n\n var arr = { 2: 6.99 };\n\n Object.defineProperty(arr, \"length\", {\n get: function () {\n delete arr[2];\n return 3;\n },\n configurable: true\n });\n\n return -1 === Array.prototype.lastIndexOf.call(arr, 6.99);\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.lastIndexOf) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.4.4.15-8-a-5",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-a-5.js",
+ "description": "Array.prototype.lastIndexOf - deleted properties of step 5 are visible here on an Array-like object",
+ "test": "assertTrue((function testcase() {\n\n var arr = { 10: false, length: 30 };\n\n var fromIndex = {\n valueOf: function () {\n delete arr[10];\n return 15;\n }\n };\n\n return -1 === Array.prototype.lastIndexOf.call(arr, false, fromIndex);\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.lastIndexOf))"
+ },
+ {
+ "id": "15.4.4.15-8-a-6",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-a-6.js",
+ "description": "Array.prototype.lastIndexOf - deleted properties of step 5 are visible here on an Array",
+ "test": "assertTrue((function testcase() {\n\n var arr = [];\n arr[10] = \"10\";\n arr.length = 20;\n\n var fromIndex = {\n valueOf: function () {\n delete arr[10];\n return 11;\n }\n };\n\n return -1 === arr.lastIndexOf(\"10\", fromIndex);\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.lastIndexOf))"
+ },
+ {
+ "id": "15.4.4.15-8-a-7",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-a-7.js",
+ "description": "Array.prototype.lastIndexOf - properties added into own object after current position are visited on an Array-like object",
+ "test": "assertTrue((function testcase() {\n \n var arr = { length: 8 };\n\n Object.defineProperty(arr, \"4\", {\n get: function () {\n Object.defineProperty(arr, \"1\", {\n get: function () {\n return 1;\n },\n configurable: true\n });\n return 0;\n },\n configurable: true\n });\n\n return Array.prototype.lastIndexOf.call(arr, 1) === 1;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.lastIndexOf) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects())"
+ },
+ {
+ "id": "15.4.4.15-8-a-8",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-a-8.js",
+ "description": "Array.prototype.lastIndexOf - properties added into own object after current position are visited on an Array",
+ "test": "assertTrue((function testcase() {\n\n var arr = [0, , 2];\n\n Object.defineProperty(arr, \"2\", {\n get: function () {\n Object.defineProperty(arr, \"1\", {\n get: function () {\n return 1;\n },\n configurable: true\n });\n return 0;\n },\n configurable: true\n });\n\n return arr.lastIndexOf(1) === 1;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.lastIndexOf) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.4.4.15-8-a-9",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-a-9.js",
+ "description": "Array.prototype.lastIndexOf - properties can be added to prototype after current position are visited on an Array-like object",
+ "test": "assertTrue((function testcase() {\n\n var arr = { length: 9 };\n\n Object.defineProperty(arr, \"4\", {\n get: function () {\n Object.defineProperty(Object.prototype, \"1\", {\n get: function () {\n return Infinity;\n },\n configurable: true\n });\n return 0;\n },\n configurable: true\n });\n\n try {\n return Array.prototype.lastIndexOf.call(arr, Infinity) === 1;\n } finally {\n delete Object.prototype[1];\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.lastIndexOf) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects())"
+ },
+ {
+ "id": "15.4.4.15-8-b-1",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-1.js",
+ "description": "Array.prototype.lastIndexOf - undefined property wouldn't be called",
+ "test": "assertTrue(([0, , 2].lastIndexOf(undefined) === -1));\n",
+ "precondition": "(fnExists(Array.prototype.lastIndexOf))"
+ },
+ {
+ "id": "15.4.4.15-8-b-i-1",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-i-1.js",
+ "description": "Array.prototype.lastIndexOf - element to be retrieved is own data property on an Array-like object",
+ "test": "assertTrue((function testcase() {\n\n var obj = { 0: 0, 1: 1, 2: 2, length: 3 };\n\n return Array.prototype.lastIndexOf.call(obj, 0) === 0 &&\n Array.prototype.lastIndexOf.call(obj, 1) === 1 &&\n Array.prototype.lastIndexOf.call(obj, 2) === 2;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.lastIndexOf))"
+ },
+ {
+ "id": "15.4.4.15-8-b-i-10",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-i-10.js",
+ "description": "Array.prototype.lastIndexOf - element to be retrieved is own accessor property on an Array-like object",
+ "test": "assertTrue((function testcase() {\n\n var obj = { length: 3 };\n Object.defineProperty(obj, \"0\", {\n get: function () {\n return 0;\n },\n configurable: true\n });\n\n Object.defineProperty(obj, \"1\", {\n get: function () {\n return 1;\n },\n configurable: true\n });\n\n Object.defineProperty(obj, \"2\", {\n get: function () {\n return 2;\n },\n configurable: true\n });\n\n return 0 === Array.prototype.lastIndexOf.call(obj, 0) &&\n 1 === Array.prototype.lastIndexOf.call(obj, 1) &&\n 2 === Array.prototype.lastIndexOf.call(obj, 2);\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.lastIndexOf) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects())"
+ },
+ {
+ "id": "15.4.4.15-8-b-i-11",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-i-11.js",
+ "description": "Array.prototype.lastIndexOf - element to be retrieved is own accessor property that overrides an inherited data property on an Array",
+ "test": "assertTrue((function testcase() {\n\n var arr = [];\n try {\n Array.prototype[0] = false;\n Object.defineProperty(arr, \"0\", {\n get: function () {\n return true;\n },\n configurable: true\n });\n\n return 0 === arr.lastIndexOf(true);\n } finally {\n delete Array.prototype[0]; \n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.lastIndexOf) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.4.4.15-8-b-i-12",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-i-12.js",
+ "description": "Array.prototype.lastIndexOf - element to be retrieved is own accessor property that overrides an inherited data property on an Array-like object",
+ "test": "assertTrue((function testcase() {\n var obj = { length: 1 };\n\n try {\n Object.prototype[0] = false;\n Object.defineProperty(obj, \"0\", {\n get: function () {\n return true;\n },\n configurable: true\n });\n\n return 0 === Array.prototype.lastIndexOf.call(obj, true);\n } finally {\n delete Object.prototype[0];\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.lastIndexOf) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects())"
+ },
+ {
+ "id": "15.4.4.15-8-b-i-13",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-i-13.js",
+ "description": "Array.prototype.lastIndexOf - element to be retrieved is own accessor property that overrides an inherited accessor property on an Array",
+ "test": "assertTrue((function testcase() {\n\n var arr = [];\n try {\n Object.defineProperty(Array.prototype, \"0\", {\n get: function () {\n return false;\n },\n configurable: true\n });\n\n Object.defineProperty(arr, \"0\", {\n get: function () {\n return true;\n },\n configurable: true\n });\n\n return 0 === arr.lastIndexOf(true);\n } finally {\n delete Array.prototype[0];\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.lastIndexOf) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.4.4.15-8-b-i-14",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-i-14.js",
+ "description": "Array.prototype.lastIndexOf - element to be retrieved is own accessor property that overrides an inherited accessor property on an Array-like object",
+ "test": "assertTrue((function testcase() {\n\n var obj = { length: 1 };\n\n try {\n Object.defineProperty(Object.prototype, \"0\", {\n get: function () {\n return false;\n },\n configurable: true\n });\n\n Object.defineProperty(obj, \"0\", {\n get: function () {\n return true;\n },\n configurable: true\n });\n\n return 0 === Array.prototype.lastIndexOf.call(obj, true);\n } finally {\n delete Object.prototype[0];\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.lastIndexOf) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects())"
+ },
+ {
+ "id": "15.4.4.15-8-b-i-15",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-i-15.js",
+ "description": "Array.prototype.lastIndexOf - element to be retrieved is inherited accessor property on an Array",
+ "test": "assertTrue((function testcase() {\n try {\n Object.defineProperty(Array.prototype, \"0\", {\n get: function () {\n return 10;\n },\n configurable: true\n });\n\n Object.defineProperty(Array.prototype, \"1\", {\n get: function () {\n return 20;\n },\n configurable: true\n });\n\n Object.defineProperty(Array.prototype, \"2\", {\n get: function () {\n return 30;\n },\n configurable: true\n });\n\n return 0 === [, , , ].lastIndexOf(10) &&\n 1 === [, , , ].lastIndexOf(20) &&\n 2 === [, , , ].lastIndexOf(30);\n } finally {\n delete Array.prototype[0];\n delete Array.prototype[1];\n delete Array.prototype[2];\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.lastIndexOf) && fnExists(Object.defineProperty) && ![, 1].hasOwnProperty(0) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.4.4.15-8-b-i-16",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-i-16.js",
+ "description": "Array.prototype.lastIndexOf - element to be retrieved is inherited accessor property on an Array-like object",
+ "test": "assertTrue((function testcase() {\n\n try {\n Object.defineProperty(Object.prototype, \"0\", {\n get: function () {\n return 10;\n },\n configurable: true\n });\n\n Object.defineProperty(Object.prototype, \"1\", {\n get: function () {\n return 20;\n },\n configurable: true\n });\n\n Object.defineProperty(Object.prototype, \"2\", {\n get: function () {\n return 30;\n },\n configurable: true\n });\n\n return 0 === Array.prototype.lastIndexOf.call({ length: 3 }, 10) &&\n 1 === Array.prototype.lastIndexOf.call({ length: 3 }, 20) &&\n 2 === Array.prototype.lastIndexOf.call({ length: 3 }, 30);\n } finally {\n delete Object.prototype[0];\n delete Object.prototype[1];\n delete Object.prototype[2];\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.lastIndexOf) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects())"
+ },
+ {
+ "id": "15.4.4.15-8-b-i-17",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-i-17.js",
+ "description": "Array.prototype.lastIndexOf - element to be retrieved is own accessor property without a get function on an Array",
+ "test": "assertTrue((function testcase() {\n\n var arr = [];\n Object.defineProperty(arr, \"0\", {\n set: function () { },\n configurable: true\n });\n\n return arr.lastIndexOf(undefined) === 0;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.lastIndexOf) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.4.4.15-8-b-i-18",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-i-18.js",
+ "description": "Array.prototype.lastIndexOf - element to be retrieved is own accessor property without a get function on an Array-like object",
+ "test": "assertTrue((function testcase() {\n\n var obj = { length: 1 };\n Object.defineProperty(obj, \"0\", {\n set: function () { },\n configurable: true\n });\n\n return 0 === Array.prototype.lastIndexOf.call(obj, undefined);\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.lastIndexOf) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects())"
+ },
+ {
+ "id": "15.4.4.15-8-b-i-19",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-i-19.js",
+ "description": "Array.prototype.lastIndexOf - element to be retrieved is own accessor property without a get function that overrides an inherited accessor property on an Array-like object",
+ "test": "assertTrue((function testcase() {\n\n var obj = { length: 1 };\n try {\n Object.defineProperty(Object.prototype, \"0\", {\n get: function () {\n return 20;\n },\n configurable: true\n });\n Object.defineProperty(obj, \"0\", {\n set: function () { },\n configurable: true\n });\n\n return obj.hasOwnProperty(0) && 0 === Array.prototype.lastIndexOf.call(obj, undefined);\n } finally {\n delete Object.prototype[0];\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.lastIndexOf) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects())"
+ },
+ {
+ "id": "15.4.4.15-8-b-i-2",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-i-2.js",
+ "description": "Array.prototype.lastIndexOf - element to be retrieved is own data property on an Array",
+ "test": "assertTrue(([true, true, true].lastIndexOf(true) === 2 &&\n [true, true, false].lastIndexOf(true) === 1 &&\n [true, false, false].lastIndexOf(true) === 0));\n",
+ "precondition": "(fnExists(Array.prototype.lastIndexOf))"
+ },
+ {
+ "id": "15.4.4.15-8-b-i-20",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-i-20.js",
+ "description": "Array.prototype.lastIndexOf - element to be retrieved is an own accessor property without a get function that overrides an inherited accessor property on an Array",
+ "test": "assertTrue((function testcase() {\n\n var arr = [, 1];\n try {\n Object.defineProperty(Array.prototype, \"0\", {\n get: function () {\n return 100;\n },\n configurable: true\n });\n Object.defineProperty(arr, \"0\", {\n set: function () { },\n configurable: true\n });\n\n return arr.hasOwnProperty(0) && arr.lastIndexOf(undefined) === 0;\n } finally {\n delete Array.prototype[0];\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.lastIndexOf) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.4.4.15-8-b-i-21",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-i-21.js",
+ "description": "Array.prototype.lastIndexOf - element to be retrieved is inherited accessor property without a get function on an Array",
+ "test": "assertTrue((function testcase() {\n try {\n Object.defineProperty(Array.prototype, \"0\", {\n set: function () { },\n configurable: true\n });\n return [, ].lastIndexOf(undefined) === 0;\n } finally {\n delete Array.prototype[0];\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.lastIndexOf) && fnExists(Object.defineProperty) && ![, 1].hasOwnProperty(0) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.4.4.15-8-b-i-22",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-i-22.js",
+ "description": "Array.prototype.lastIndexOf - element to be retrieved is inherited accessor property without a get function on an Array-like object",
+ "test": "assertTrue((function testcase() {\n\n try {\n Object.defineProperty(Object.prototype, \"0\", {\n set: function () { },\n configurable: true\n });\n return 0 === Array.prototype.lastIndexOf.call({ length: 1 }, undefined);\n } finally {\n delete Object.prototype[0];\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.lastIndexOf) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects())"
+ },
+ {
+ "id": "15.4.4.15-8-b-i-23",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-i-23.js",
+ "description": "Array.prototype.lastIndexOf - This object is the global object",
+ "test": "assertTrue((function testcase() {\n\n var targetObj = {};\n try {\n var oldLen = fnGlobalObject().length;\n fnGlobalObject()[0] = targetObj;\n fnGlobalObject()[100] = \"100\";\n fnGlobalObject()[200] = \"200\";\n fnGlobalObject().length = 200;\n return 0 === Array.prototype.lastIndexOf.call(fnGlobalObject(), targetObj) &&\n 100 === Array.prototype.lastIndexOf.call(fnGlobalObject(), \"100\") &&\n -1 === Array.prototype.lastIndexOf.call(fnGlobalObject(), \"200\");\n } finally {\n delete fnGlobalObject()[0];\n delete fnGlobalObject()[100];\n delete fnGlobalObject()[200];\n fnGlobalObject().length = oldLen;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.lastIndexOf))"
+ },
+ {
+ "id": "15.4.4.15-8-b-i-25",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-i-25.js",
+ "description": "Array.prototype.lastIndexOf applied to Arguments object which implements its own property get method (number of arguments is less than number of parameters)",
+ "test": "assertTrue((function testcase() {\n\n var func = function (a, b) {\n return 0 === Array.prototype.lastIndexOf.call(arguments, arguments[0]) &&\n -1 === Array.prototype.lastIndexOf.call(arguments, arguments[1]);\n };\n\n return func(true);\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.lastIndexOf))"
+ },
+ {
+ "id": "15.4.4.15-8-b-i-26",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-i-26.js",
+ "description": "Array.prototype.lastIndexOf applied to Arguments object which implements its own property get method (number of arguments equals to number of parameters)",
+ "test": "assertTrue((function testcase() {\n\n var func = function (a, b) {\n return 0 === Array.prototype.lastIndexOf.call(arguments, arguments[0]) &&\n 1 === Array.prototype.lastIndexOf.call(arguments, arguments[1]) &&\n -1 === Array.prototype.lastIndexOf.call(arguments, arguments[2]);\n };\n\n return func(0, true);\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.lastIndexOf))"
+ },
+ {
+ "id": "15.4.4.15-8-b-i-27",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-i-27.js",
+ "description": "Array.prototype.lastIndexOf applied to Arguments object which implements its own property get method (number of arguments is greater than number of parameters)",
+ "test": "assertTrue((function testcase() {\n\n var func = function (a, b) {\n return 2 === Array.prototype.lastIndexOf.call(arguments, arguments[0]) &&\n 3 === Array.prototype.lastIndexOf.call(arguments, arguments[3]) &&\n -1 === Array.prototype.lastIndexOf.call(arguments, arguments[4]);\n };\n\n return func(0, arguments, 0, Object.prototype);\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.lastIndexOf))"
+ },
+ {
+ "id": "15.4.4.15-8-b-i-28",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-i-28.js",
+ "description": "Array.prototype.lastIndexOf - side-effects are visible in subsequent iterations on an Array",
+ "test": "assertTrue((function testcase() {\n\n var preIterVisible = false;\n var arr = [];\n\n Object.defineProperty(arr, \"2\", {\n get: function () {\n preIterVisible = true;\n return false;\n },\n configurable: true\n });\n\n Object.defineProperty(arr, \"1\", {\n get: function () {\n if (preIterVisible) {\n return true;\n } else {\n return false;\n }\n },\n configurable: true\n });\n\n return arr.lastIndexOf(true) === 1;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.lastIndexOf) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.4.4.15-8-b-i-29",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-i-29.js",
+ "description": "Array.prototype.lastIndexOf - side-effects are visible in subsequent iterations on an Array-like object",
+ "test": "assertTrue((function testcase() {\n\n var preIterVisible = false;\n var obj = { length: 3 };\n\n Object.defineProperty(obj, \"2\", {\n get: function () {\n preIterVisible = true;\n return false;\n },\n configurable: true\n });\n\n Object.defineProperty(obj, \"1\", {\n get: function () {\n if (preIterVisible) {\n return true;\n } else {\n return false;\n }\n },\n configurable: true\n });\n\n return Array.prototype.lastIndexOf.call(obj, true) === 1;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.lastIndexOf) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects())"
+ },
+ {
+ "id": "15.4.4.15-8-b-i-3",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-i-3.js",
+ "description": "Array.prototype.lastIndexOf - element to be retrieved is own data property that overrides an inherited data property on an Array",
+ "test": "assertTrue((function testcase() {\n try {\n Array.prototype[0] = Object;\n return [Object.prototype].lastIndexOf(Object.prototype) === 0;\n } finally {\n delete Array.prototype[0];\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.lastIndexOf))"
+ },
+ {
+ "id": "15.4.4.15-8-b-i-30",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-i-30.js",
+ "description": "Array.prototype.lastIndexOf terminates iteration on unhandled exception on an Array",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n var arr = [];\n\n Object.defineProperty(arr, \"2\", {\n get: function () {\n throw new TypeError();\n },\n configurable: true\n });\n\n Object.defineProperty(arr, \"1\", {\n get: function () {\n accessed = true;\n return true;\n },\n configurable: true\n });\n\n try {\n arr.lastIndexOf(true);\n return false;\n } catch (e) {\n return (e instanceof TypeError) && !accessed;\n }\n\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.lastIndexOf) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.4.4.15-8-b-i-31",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-i-31.js",
+ "description": "Array.prototype.lastIndexOf terminates iteration on unhandled exception on an Array-like object",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n var obj = { length: 3 };\n\n Object.defineProperty(obj, \"2\", {\n get: function () {\n throw new TypeError();\n },\n configurable: true\n });\n\n Object.defineProperty(obj, \"1\", {\n get: function () {\n accessed = true;\n return true;\n },\n configurable: true\n });\n\n try {\n Array.prototype.lastIndexOf.call(obj, true);\n return false;\n } catch (e) {\n return (e instanceof TypeError) && !accessed;\n }\n\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.lastIndexOf) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects())"
+ },
+ {
+ "id": "15.4.4.15-8-b-i-4",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-i-4.js",
+ "description": "Array.prototype.lastIndexOf - element to be retrieved is own data property that overrides an inherited data property on an Array-like object",
+ "test": "assertTrue((function testcase() {\n\n try {\n Object.prototype[0] = false;\n return 0 === Array.prototype.lastIndexOf.call({ 0: true, 1: 1, length: 2 }, true);\n } finally {\n delete Object.prototype[0];\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.lastIndexOf))"
+ },
+ {
+ "id": "15.4.4.15-8-b-i-5",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-i-5.js",
+ "description": "Array.prototype.lastIndexOf - element to be retrieved is own data property that overrides an inherited accessor property on an Array",
+ "test": "assertTrue((function testcase() {\n try {\n Object.defineProperty(Array.prototype, \"0\", {\n get: function () {\n return false;\n },\n configurable: true\n });\n return 0 === [Number].lastIndexOf(Number);\n } finally {\n delete Array.prototype[0];\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.lastIndexOf) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.4.4.15-8-b-i-6",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-i-6.js",
+ "description": "Array.prototype.lastIndexOf - element to be retrieved is own data property that overrides an inherited accessor property on an Array-like object",
+ "test": "assertTrue((function testcase() {\n\n try {\n Object.defineProperty(Object.prototype, \"0\", {\n get: function () {\n return false;\n },\n configurable: true\n });\n return 0 === Array.prototype.lastIndexOf.call({ 0: true, 1: 1, length: 2 }, true);\n } finally {\n delete Object.prototype[0];\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.lastIndexOf) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects())"
+ },
+ {
+ "id": "15.4.4.15-8-b-i-7",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-i-7.js",
+ "description": "Array.prototype.lastIndexOf - element to be retrieved is inherited data property on an Array",
+ "test": "assertTrue((function testcase() {\n\n try {\n Array.prototype[0] = true;\n Array.prototype[1] = false;\n Array.prototype[2] = \"true\";\n return 0 === [, , , ].lastIndexOf(true) &&\n 1 === [, , , ].lastIndexOf(false) &&\n 2 === [, , , ].lastIndexOf(\"true\");\n } finally {\n delete Array.prototype[0];\n delete Array.prototype[1];\n delete Array.prototype[2];\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.lastIndexOf) && ![, 1].hasOwnProperty(0))"
+ },
+ {
+ "id": "15.4.4.15-8-b-i-8",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-i-8.js",
+ "description": "Array.prototype.lastIndexOf - element to be retrieved is inherited data property on an Array-like object",
+ "test": "assertTrue((function testcase() {\n\n try {\n Object.prototype[0] = true;\n Object.prototype[1] = false;\n Object.prototype[2] = \"true\";\n return 0 === Array.prototype.lastIndexOf.call({ length: 3 }, true) &&\n 1 === Array.prototype.lastIndexOf.call({ length: 3 }, false) &&\n 2 === Array.prototype.lastIndexOf.call({ length: 3 }, \"true\");\n } finally {\n delete Object.prototype[0];\n delete Object.prototype[1];\n delete Object.prototype[2];\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.lastIndexOf))"
+ },
+ {
+ "id": "15.4.4.15-8-b-i-9",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-i-9.js",
+ "description": "Array.prototype.lastIndexOf - element to be retrieved is own accessor property on an Array",
+ "test": "assertTrue((function testcase() {\n\n var arr = [, , , ];\n Object.defineProperty(arr, \"0\", {\n get: function () {\n return 0;\n },\n configurable: true\n });\n\n Object.defineProperty(arr, \"1\", {\n get: function () {\n return 1;\n },\n configurable: true\n });\n\n Object.defineProperty(arr, \"2\", {\n get: function () {\n return 2;\n },\n configurable: true\n });\n\n return arr.lastIndexOf(0) === 0 && arr.lastIndexOf(1) === 1 && arr.lastIndexOf(2) === 2;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.lastIndexOf) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.4.4.15-8-b-ii-1",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-ii-1.js",
+ "description": "Array.prototype.lastIndexOf - type of array element is different from type of search element",
+ "test": "assertTrue(([\"true\"].lastIndexOf(true) === -1 &&\n [\"0\"].lastIndexOf(0) === -1 &&\n [false].lastIndexOf(0) === -1 &&\n [undefined].lastIndexOf(0) === -1 &&\n [null].lastIndexOf(0) === -1 &&\n [[]].lastIndexOf(0) === -1));\n",
+ "precondition": "(fnExists(Array.prototype.lastIndexOf))"
+ },
+ {
+ "id": "15.4.4.15-8-b-ii-10",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-ii-10.js",
+ "description": "Array.prototype.lastIndexOf - both array element and search element are booleans, and they have same value",
+ "test": "assertTrue(([false, true].lastIndexOf(true) === 1));\n",
+ "precondition": "(fnExists(Array.prototype.lastIndexOf))"
+ },
+ {
+ "id": "15.4.4.15-8-b-ii-11",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-ii-11.js",
+ "description": "Array.prototype.lastIndexOf - both array element and search element are Objects, and they refer to the same object",
+ "test": "assertTrue((function testcase() {\n\n var obj1 = {};\n var obj2 = {};\n var obj3 = obj2;\n return [obj2, obj1].lastIndexOf(obj3) === 0;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.lastIndexOf))"
+ },
+ {
+ "id": "15.4.4.15-8-b-ii-2",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-ii-2.js",
+ "description": "Array.prototype.lastIndexOf - both type of array element and type of search element are Undefined",
+ "test": "assertTrue(([undefined].lastIndexOf() === 0 && [undefined].lastIndexOf(undefined) === 0));\n",
+ "precondition": "(fnExists(Array.prototype.lastIndexOf))"
+ },
+ {
+ "id": "15.4.4.15-8-b-ii-3",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-ii-3.js",
+ "description": "Array.prototype.lastIndexOf - both type of array element and type of search element are Null",
+ "test": "assertTrue(([null].lastIndexOf(null) === 0));\n",
+ "precondition": "(fnExists(Array.prototype.lastIndexOf))"
+ },
+ {
+ "id": "15.4.4.15-8-b-ii-4",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-ii-4.js",
+ "description": "Array.prototype.lastIndexOf - search element is NaN",
+ "test": "assertTrue(([+NaN, NaN, -NaN].lastIndexOf(NaN) === -1));\n",
+ "precondition": "(fnExists(Array.prototype.lastIndexOf))"
+ },
+ {
+ "id": "15.4.4.15-8-b-ii-5",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-ii-5.js",
+ "description": "Array.prototype.lastIndexOf - search element is -NaN",
+ "test": "assertTrue(([+NaN, NaN, -NaN].lastIndexOf(-NaN) === -1));\n",
+ "precondition": "(fnExists(Array.prototype.lastIndexOf))"
+ },
+ {
+ "id": "15.4.4.15-8-b-ii-6",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-ii-6.js",
+ "description": "Array.prototype.lastIndexOf - array element is +0 and search element is -0",
+ "test": "assertTrue(([+0].lastIndexOf(-0) === 0));\n",
+ "precondition": "(fnExists(Array.prototype.lastIndexOf))"
+ },
+ {
+ "id": "15.4.4.15-8-b-ii-7",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-ii-7.js",
+ "description": "Array.prototype.lastIndexOf - array element is -0 and search element is +0",
+ "test": "assertTrue(([-0].lastIndexOf(+0) === 0));\n",
+ "precondition": "(fnExists(Array.prototype.lastIndexOf))"
+ },
+ {
+ "id": "15.4.4.15-8-b-ii-8",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-ii-8.js",
+ "description": "Array.prototype.lastIndexOf - both array element and search element are numbers, and they have same value",
+ "test": "assertTrue(([-1, 0, 1].lastIndexOf(-1) === 0));\n",
+ "precondition": "(fnExists(Array.prototype.lastIndexOf))"
+ },
+ {
+ "id": "15.4.4.15-8-b-ii-9",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-ii-9.js",
+ "description": "Array.prototype.lastIndexOf - both array element and search element are strings, and they have exactly the same sequence of characters",
+ "test": "assertTrue(([\"abc\", \"ab\", \"bca\", \"\"].lastIndexOf(\"abc\") === 0));\n",
+ "precondition": "(fnExists(Array.prototype.lastIndexOf))"
+ },
+ {
+ "id": "15.4.4.15-8-b-iii-1",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-iii-1.js",
+ "description": "Array.prototype.lastIndexOf returns index of last one when more than two elements in array are eligible",
+ "test": "assertTrue(([2, 1, 2, 2, 1].lastIndexOf(2) === 3));\n",
+ "precondition": "(fnExists(Array.prototype.lastIndexOf))"
+ },
+ {
+ "id": "15.4.4.15-8-b-iii-2",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-b-iii-2.js",
+ "description": "Array.prototype.lastIndexOf returns without visiting subsequent element once search value is found",
+ "test": "assertTrue((function testcase() {\n var arr = [2, 1, , 1, 2];\n var elementFirstAccessed = false;\n var elementThirdAccessed = false;\n\n Object.defineProperty(arr, \"2\", {\n get: function () {\n elementThirdAccessed = true;\n return 2;\n },\n configurable: true\n });\n Object.defineProperty(arr, \"0\", {\n get: function () {\n elementFirstAccessed = true;\n return 2;\n },\n configurable: true\n });\n\n arr.lastIndexOf(2);\n return !elementThirdAccessed && !elementFirstAccessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.lastIndexOf) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.4.4.15-9-1",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-9-1.js",
+ "description": "Array.prototype.lastIndexOf returns -1 for elements not present",
+ "test": "assertTrue((function testcase() {\n var a = new Array();\n a[100] = 1;\n a[99999] = \"\"; \n a[10] = new Object();\n a[5555] = 5.5;\n a[123456] = \"str\";\n a[5] = 1E+309;\n if (a.lastIndexOf(1) !== 100 ||\n a.lastIndexOf(\"\") !== 99999 ||\n a.lastIndexOf(\"str\") !== 123456 ||\n a.lastIndexOf(5.5) !== 5555 ||\n a.lastIndexOf(1E+309) !== 5 ) \n {\n return false;\n } \n if (a.lastIndexOf(true) === -1 && \n a.lastIndexOf(5) === -1 &&\n a.lastIndexOf(\"str1\") === -1 &&\n a.lastIndexOf(null) === -1 &&\n a.lastIndexOf(new Object()) === -1 ) \n {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.lastIndexOf))"
+ },
+ {
+ "id": "15.4.4.15-9-2",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.15/15.4.4.15-9-2.js",
+ "description": "Array.prototype.lastIndexOf returns -1 if 'length' is 0 and does not access any other properties",
+ "test": "assertTrue((function testcase() {\n var accessed = false;\n var f = {length: 0};\n Object.defineProperty(f,\"0\",{get: function () {accessed = true; return 1;}});\n \n var i = Array.prototype.lastIndexOf.call(f,1);\n \n if (i === -1 && accessed==false) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.indexOf) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects())"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.4.4.16.json b/website/resources/scripts/testcases2/15.4.4.16.json
new file mode 100644
index 000000000..5a7e8ccd9
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.4.4.16.json
@@ -0,0 +1,1499 @@
+{
+ "testCollection": {
+ "name": "15.4.4.16",
+ "numTests": 213,
+ "tests": [
+ {
+ "id": "15.4.4.16-0-1",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-0-1.js",
+ "description": "Array.prototype.every must exist as a function",
+ "test": "assertTrue((function testcase() {\n var f = Array.prototype.every;\n if (typeof(f) === \"function\") {\n return true;\n }\n }).call(this));\n"
+ },
+ {
+ "id": "15.4.4.16-0-2",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-0-2.js",
+ "description": "Array.prototype.every.length must be 1",
+ "test": "assertTrue((Array.prototype.every.length === 1));\n",
+ "precondition": "(fnExists(Array.prototype.every))"
+ },
+ {
+ "id": "15.4.4.16-1-1",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-1-1.js",
+ "description": "Array.prototype.every applied to undefined throws a TypeError",
+ "test": "assertTrue((function testcase() {\n try {\n Array.prototype.every.call(undefined); // TypeError is thrown if value is undefined\n return false;\n } catch (e) {\n return (e instanceof TypeError);\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.every))"
+ },
+ {
+ "id": "15.4.4.16-1-10",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-1-10.js",
+ "description": "Array.prototype.every applied to the Math object",
+ "test": "assertTrue((function testcase() {\n function callbackfn(val, idx, obj) {\n return ('[object Math]' !== Object.prototype.toString.call(obj));\n }\n\n try {\n Math.length = 1;\n Math[0] = 1;\n return !Array.prototype.every.call(Math, callbackfn);\n } finally {\n delete Math[0];\n delete Math.length;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.every))"
+ },
+ {
+ "id": "15.4.4.16-1-11",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-1-11.js",
+ "description": "Array.prototype.every applied to Date object",
+ "test": "assertTrue((function testcase() {\n function callbackfn(val, idx, obj) {\n return !(obj instanceof Date);\n }\n\n var obj = new Date();\n obj.length = 1;\n obj[0] = 1;\n\n return !Array.prototype.every.call(obj, callbackfn);\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.every))"
+ },
+ {
+ "id": "15.4.4.16-1-12",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-1-12.js",
+ "description": "Array.prototype.every applied to RegExp object",
+ "test": "assertTrue((function testcase() {\n function callbackfn(val, idx, obj) {\n return !(obj instanceof RegExp);\n }\n\n var obj = new RegExp();\n obj.length = 1;\n obj[0] = 1;\n\n return !Array.prototype.every.call(obj, callbackfn);\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.every))"
+ },
+ {
+ "id": "15.4.4.16-1-13",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-1-13.js",
+ "description": "Array.prototype.every applied to the JSON object",
+ "test": "assertTrue((function testcase() {\n function callbackfn(val, idx, obj) {\n return ('[object JSON]' !== Object.prototype.toString.call(obj));\n }\n\n try {\n JSON.length = 1;\n JSON[0] = 1;\n return !Array.prototype.every.call(JSON, callbackfn);\n } finally {\n delete JSON.length;\n delete JSON[0];\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.every))"
+ },
+ {
+ "id": "15.4.4.16-1-14",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-1-14.js",
+ "description": "Array.prototype.every applied to Error object",
+ "test": "assertTrue((function testcase() {\n function callbackfn(val, idx, obj) {\n return !(obj instanceof Error);\n }\n\n var obj = new Error();\n obj.length = 1;\n obj[0] = 1;\n\n return !Array.prototype.every.call(obj, callbackfn);\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.every))"
+ },
+ {
+ "id": "15.4.4.16-1-15",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-1-15.js",
+ "description": "Array.prototype.every applied to the Arguments object",
+ "test": "assertTrue((function testcase() {\n function callbackfn(val, idx, obj) {\n return ('[object Arguments]' !== Object.prototype.toString.call(obj));\n }\n\n var obj = (function fun() {\n return arguments;\n }(\"a\", \"b\"));\n\n return !Array.prototype.every.call(obj, callbackfn);\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.every))"
+ },
+ {
+ "id": "15.4.4.16-1-2",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-1-2.js",
+ "description": "Array.prototype.every applied to null throws a TypeError",
+ "test": "assertTrue((function testcase() {\n try {\n Array.prototype.every.call(null); // TypeError is thrown if value is null\n return false;\n } catch (e) {\n return (e instanceof TypeError);\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.every))"
+ },
+ {
+ "id": "15.4.4.16-1-3",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-1-3.js",
+ "description": "Array.prototype.every applied to boolean primitive",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n\n function callbackfn(val, idx, obj) {\n accessed = true;\n return obj instanceof Boolean;\n }\n\n try {\n Boolean.prototype[0] = 1;\n Boolean.prototype.length = 1;\n return Array.prototype.every.call(false, callbackfn) && accessed;\n } finally {\n delete Boolean.prototype[0];\n delete Boolean.prototype.length;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.every))"
+ },
+ {
+ "id": "15.4.4.16-1-4",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-1-4.js",
+ "description": "Array.prototype.every applied to Boolean object",
+ "test": "assertTrue((function testcase() {\n var accessed = false;\n function callbackfn(val, idx, obj) {\n accessed = true;\n return obj instanceof Boolean;\n }\n\n var obj = new Boolean(true);\n obj.length = 2;\n obj[0] = 11;\n obj[1] = 12;\n return Array.prototype.every.call(obj, callbackfn) && accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.every))"
+ },
+ {
+ "id": "15.4.4.16-1-5",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-1-5.js",
+ "description": "Array.prototype.every applied to number primitive",
+ "test": "assertTrue((function testcase() {\n var accessed = false;\n function callbackfn(val, idx, obj) {\n accessed = true;\n return obj instanceof Number;\n }\n\n try {\n Number.prototype[0] = 1;\n Number.prototype.length = 1;\n return Array.prototype.every.call(2.5, callbackfn) && accessed;\n } finally {\n delete Number.prototype[0];\n delete Number.prototype.length;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.every))"
+ },
+ {
+ "id": "15.4.4.16-1-6",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-1-6.js",
+ "description": "Array.prototype.every applied to Number object",
+ "test": "assertTrue((function testcase() {\n var accessed = false;\n function callbackfn(val, idx, obj) {\n accessed = true;\n return obj instanceof Number;\n }\n\n var obj = new Number(-128);\n obj.length = 2;\n obj[0] = 11;\n obj[1] = 12;\n return Array.prototype.every.call(obj, callbackfn) && accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.every))"
+ },
+ {
+ "id": "15.4.4.16-1-7",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-1-7.js",
+ "description": "Array.prototype.every applied to string primitive",
+ "test": "assertTrue((function testcase() {\n function callbackfn(val, idx, obj) {\n return !(obj instanceof String);\n }\n\n return !Array.prototype.every.call(\"hello\\nworld\\\\!\", callbackfn);\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.every))"
+ },
+ {
+ "id": "15.4.4.16-1-8",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-1-8.js",
+ "description": "Array.prototype.every applied to String object",
+ "test": "assertTrue((function testcase() {\n function callbackfn(val, idx, obj) {\n return !(obj instanceof String);\n }\n\n var obj = new String(\"hello\\nworld\\\\!\");\n\n return !Array.prototype.every.call(obj, callbackfn);\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.every))"
+ },
+ {
+ "id": "15.4.4.16-1-9",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-1-9.js",
+ "description": "Array.prototype.every applied to Function object",
+ "test": "assertTrue((function testcase() {\n function callbackfn(val, idx, obj) {\n return !(obj instanceof Function);\n }\n\n var obj = function (a, b) {\n return a + b;\n };\n obj[0] = 11;\n obj[1] = 9;\n\n return !Array.prototype.every.call(obj, callbackfn);\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.every))"
+ },
+ {
+ "id": "15.4.4.16-2-1",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-2-1.js",
+ "description": "Array.prototype.every applied to Array-like object, 'length' is an own data property",
+ "test": "assertTrue((function testcase() {\n function callbackfn1(val, idx, obj) {\n return val > 10;\n }\n\n function callbackfn2(val, idx, obj) {\n return val > 11;\n }\n\n var obj = {\n 0: 12,\n 1: 11,\n 2: 9,\n length: 2\n };\n\n return Array.prototype.every.call(obj, callbackfn1) &&\n !Array.prototype.every.call(obj, callbackfn2);\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.every))"
+ },
+ {
+ "id": "15.4.4.16-2-10",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-2-10.js",
+ "description": "Array.prototype.every applied to Array-like object, 'length' is an inherited accessor property",
+ "test": "assertTrue((function testcase() {\n function callbackfn1(val, idx, obj) {\n return val > 10;\n }\n\n function callbackfn2(val, idx, obj) {\n return val > 11;\n }\n\n var proto = { };\n\n Object.defineProperty(proto, \"length\", {\n get: function () {\n return 2;\n },\n configurable: true\n });\n\n var Con = function () { };\n Con.prototype = proto;\n\n var child = new Con();\n child[0] = 12;\n child[1] = 11;\n child[2] = 9;\n\n return Array.prototype.every.call(child, callbackfn1) &&\n !Array.prototype.every.call(child, callbackfn2);\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.every) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.4.4.16-2-11",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-2-11.js",
+ "description": "Array.prototype.every applied to Array-like object, 'length' is an own accessor property without a get function",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n\n function callbackfn(val, idx, obj) {\n accessed = true;\n return val > 10;\n }\n\n var obj = {\n 0: 9,\n 1: 8\n };\n Object.defineProperty(obj, \"length\", {\n set: function () { },\n configurable: true\n });\n\n return Array.prototype.every.call(obj, callbackfn) && !accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.every) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.4.4.16-2-12",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-2-12.js",
+ "description": "Array.prototype.every - 'length' is own accessor property without a get function that overrides an inherited accessor property",
+ "test": "assertTrue((function testcase() {\n var accessed = false;\n\n function callbackfn(val, idx, obj) {\n accessed = true;\n return val > 10;\n }\n\n try {\n Object.defineProperty(Object.prototype, \"length\", {\n get: function () {\n return 2;\n },\n configurable: true\n });\n\n var obj = { 0: 9, 1: 8 };\n Object.defineProperty(obj, \"length\", {\n set: function () { },\n configurable: true\n });\n\n return Array.prototype.every.call(obj, callbackfn) && !accessed;\n } finally {\n delete Object.prototype.length;\n }\n\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.every) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.4.4.16-2-13",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-2-13.js",
+ "description": "Array.prototype.every applied to the Array-like object that 'length' is inherited accessor property without a get function",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n\n function callbackfn(val, idx, obj) {\n accessed = true;\n return val > 10;\n }\n\n var proto = {};\n Object.defineProperty(proto, \"length\", {\n set: function () { },\n configurable: true\n });\n\n var Con = function () { };\n Con.prototype = proto;\n\n var child = new Con();\n child[0] = 9;\n child[1] = 8;\n\n return Array.prototype.every.call(child, callbackfn) && !accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.every) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.4.4.16-2-14",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-2-14.js",
+ "description": "Array.prototype.every applied to the Array-like object that 'length' property doesn't exist",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n\n function callbackfn(val, idx, obj) {\n accessed = true;\n return val > 10;\n }\n\n var obj = { 0: 11, 1: 12 };\n\n return Array.prototype.every.call(obj, callbackfn) && !accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.every))"
+ },
+ {
+ "id": "15.4.4.16-2-15",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-2-15.js",
+ "description": "Array.prototype.every - 'length' is property of the global object",
+ "test": "assertTrue((function testcase() {\n function callbackfn1(val, idx, obj) {\n return val > 10;\n }\n\n function callbackfn2(val, idx, obj) {\n return val > 11;\n }\n\n try {\n var oldLen = fnGlobalObject().length;\n fnGlobalObject()[0] = 12;\n fnGlobalObject()[1] = 11;\n fnGlobalObject()[2] = 9;\n fnGlobalObject().length = 2;\n return Array.prototype.every.call(fnGlobalObject(), callbackfn1) &&\n !Array.prototype.every.call(fnGlobalObject(), callbackfn2);\n } finally {\n delete fnGlobalObject()[0];\n delete fnGlobalObject()[1];\n delete fnGlobalObject()[2];\n fnGlobalObject().length = oldLen;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.every))"
+ },
+ {
+ "id": "15.4.4.16-2-17",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-2-17.js",
+ "description": "Array.prototype.every applied to the Arguments object, which implements its own property get method",
+ "test": "assertTrue((function testcase() {\n function callbackfn1(val, idx, obj) {\n return val > 10;\n }\n\n function callbackfn2(val, idx, obj) {\n return val > 11;\n }\n\n var func = function (a, b) {\n arguments[2] = 9;\n return Array.prototype.every.call(arguments, callbackfn1) &&\n !Array.prototype.every.call(arguments, callbackfn2);\n };\n\n return func(12, 11);\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.every))"
+ },
+ {
+ "id": "15.4.4.16-2-18",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-2-18.js",
+ "description": "Array.prototype.every applied to String object, which implements its own property get method",
+ "test": "assertTrue((function testcase() {\n function callbackfn1(val, idx, obj) {\n return parseInt(val, 10) > 1;\n }\n\n function callbackfn2(val, idx, obj) {\n return parseInt(val, 10) > 2;\n }\n\n var str = new String(\"432\");\n try {\n String.prototype[3] = \"1\";\n return Array.prototype.every.call(str, callbackfn1) &&\n !Array.prototype.every.call(str, callbackfn2);\n } finally {\n delete String.prototype[3];\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.every))"
+ },
+ {
+ "id": "15.4.4.16-2-19",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-2-19.js",
+ "description": "Array.prototype.every applied to Function object, which implements its own property get method",
+ "test": "assertTrue((function testcase() {\n function callbackfn1(val, idx, obj) {\n return val > 10;\n }\n\n function callbackfn2(val, idx, obj) {\n return val > 11;\n }\n\n var fun = function (a, b) {\n return a + b;\n };\n fun[0] = 12;\n fun[1] = 11;\n fun[2] = 9;\n\n return Array.prototype.every.call(fun, callbackfn1) &&\n !Array.prototype.every.call(fun, callbackfn2);\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.every))"
+ },
+ {
+ "id": "15.4.4.16-2-2",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-2-2.js",
+ "description": "Array.prototype.every - 'length' is own data property on an Array",
+ "test": "assertTrue((function testcase() {\n function callbackfn1(val, idx, obj) {\n return val > 10;\n }\n\n function callbackfn2(val, idx, obj) {\n return val > 11;\n }\n\n try {\n Array.prototype[2] = 9;\n\n return [12, 11].every(callbackfn1) &&\n ![12, 11].every(callbackfn2);\n } finally {\n delete Array.prototype[2];\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.every))"
+ },
+ {
+ "id": "15.4.4.16-2-3",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-2-3.js",
+ "description": "Array.prototype.every applied to Array-like object, 'length' is an own data property that overrides an inherited data property",
+ "test": "assertTrue((function testcase() {\n function callbackfn1(val, idx, obj) {\n return val > 10;\n }\n\n function callbackfn2(val, idx, obj) {\n return val > 11;\n }\n\n var proto = { length: 3 };\n\n var Con = function () { };\n Con.prototype = proto;\n\n var child = new Con();\n child.length = 2;\n child[0] = 12;\n child[1] = 11;\n child[2] = 9;\n\n return Array.prototype.every.call(child, callbackfn1) &&\n !Array.prototype.every.call(child, callbackfn2);\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.every))"
+ },
+ {
+ "id": "15.4.4.16-2-4",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-2-4.js",
+ "description": "Array.prototype.every - 'length' is own data property that overrides an inherited data property on an Array",
+ "test": "assertTrue((function testcase() {\n var arrProtoLen = 0;\n function callbackfn1(val, idx, obj) {\n return val > 10;\n }\n\n function callbackfn2(val, idx, obj) {\n return val > 11;\n }\n\n try {\n arrProtoLen = Array.prototype.length;\n Array.prototype.length = 0;\n Array.prototype[2] = 9;\n\n return [12, 11].every(callbackfn1) &&\n ![12, 11].every(callbackfn2);\n } finally {\n Array.prototype.length = arrProtoLen;\n delete Array.prototype[2];\n }\n\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.every))"
+ },
+ {
+ "id": "15.4.4.16-2-5",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-2-5.js",
+ "description": "Array.prototype.every applied to Array-like object, 'length' is an own data property that overrides an inherited accessor property",
+ "test": "assertTrue((function testcase() {\n function callbackfn1(val, idx, obj) {\n return val > 10;\n }\n\n function callbackfn2(val, idx, obj) {\n return val > 11;\n }\n\n var proto = { };\n\n Object.defineProperty(proto, \"length\", {\n get: function () {\n return 3;\n },\n configurable: true\n });\n\n var Con = function () { };\n Con.prototype = proto;\n\n var child = new Con();\n child[0] = 12;\n child[1] = 11;\n child[2] = 9;\n\n Object.defineProperty(child, \"length\", {\n value: 2,\n configurable: true\n });\n\n return Array.prototype.every.call(child, callbackfn1) &&\n !Array.prototype.every.call(child, callbackfn2);\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.every) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.4.4.16-2-6",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-2-6.js",
+ "description": "Array.prototype.every applied to Array-like object, 'length' is an inherited data property",
+ "test": "assertTrue((function testcase() {\n function callbackfn1(val, idx, obj) {\n return val > 10;\n }\n\n function callbackfn2(val, idx, obj) {\n return val > 11;\n }\n\n var proto = { length: 2 };\n\n var Con = function () { };\n Con.prototype = proto;\n\n var child = new Con();\n child[0] = 12;\n child[1] = 11;\n child[2] = 9;\n\n return Array.prototype.every.call(child, callbackfn1) &&\n !Array.prototype.every.call(child, callbackfn2);\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.every))"
+ },
+ {
+ "id": "15.4.4.16-2-7",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-2-7.js",
+ "description": "Array.prototype.every applied to Array-like object, 'length' is an own accessor property",
+ "test": "assertTrue((function testcase() {\n function callbackfn1(val, idx, obj) {\n return val > 10;\n }\n\n function callbackfn2(val, idx, obj) {\n return val > 11;\n }\n\n var obj = { };\n\n Object.defineProperty(obj, \"length\", {\n get: function () {\n return 2;\n },\n configurable: true\n });\n\n obj[0] = 12;\n obj[1] = 11;\n obj[2] = 9;\n\n return Array.prototype.every.call(obj, callbackfn1) &&\n !Array.prototype.every.call(obj, callbackfn2);\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.every) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.4.4.16-2-8",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-2-8.js",
+ "description": "Array.prototype.every applied to Array-like object, 'length' is an own accessor property that overrides an inherited data property",
+ "test": "assertTrue((function testcase() {\n function callbackfn1(val, idx, obj) {\n return val > 10;\n }\n\n function callbackfn2(val, idx, obj) {\n return val > 11;\n }\n\n var proto = { length: 3 };\n\n var Con = function () { };\n Con.prototype = proto;\n\n var child = new Con();\n\n Object.defineProperty(child, \"length\", {\n get: function () {\n return 2;\n },\n configurable: true\n });\n\n child[0] = 12;\n child[1] = 11;\n child[2] = 9;\n\n return Array.prototype.every.call(child, callbackfn1) &&\n !Array.prototype.every.call(child, callbackfn2);\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.every) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.4.4.16-2-9",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-2-9.js",
+ "description": "Array.prototype.every applied to Array-like object, 'length' is an own accessor property that overrides an inherited accessor property",
+ "test": "assertTrue((function testcase() {\n function callbackfn1(val, idx, obj) {\n return val > 10;\n }\n\n function callbackfn2(val, idx, obj) {\n return val > 11;\n }\n\n var proto = {};\n\n Object.defineProperty(proto, \"length\", {\n get: function () {\n return 3;\n },\n configurable: true\n });\n\n var Con = function () { };\n Con.prototype = proto;\n\n var child = new Con();\n\n Object.defineProperty(child, \"length\", {\n get: function () {\n return 2;\n },\n configurable: true\n });\n\n child[0] = 12;\n child[1] = 11;\n child[2] = 9;\n\n return Array.prototype.every.call(child, callbackfn1) &&\n !Array.prototype.every.call(child, callbackfn2);\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.every) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.4.4.16-3-1",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-1.js",
+ "description": "Array.prototype.every - value of 'length' is undefined",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n\n function callbackfn(val, idx, obj) {\n accessed = true;\n return val > 10;\n }\n\n var obj = { 0: 9, length: undefined };\n\n return Array.prototype.every.call(obj, callbackfn) && !accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.every))"
+ },
+ {
+ "id": "15.4.4.16-3-10",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-10.js",
+ "description": "Array.prototype.every - value of 'length' is a number (value is NaN)",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n\n function callbackfn(val, idx, obj) {\n accessed = true;\n return val > 10;\n }\n\n var obj = { 0: 9, length: NaN };\n\n return Array.prototype.every.call(obj, callbackfn) && !accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.every))"
+ },
+ {
+ "id": "15.4.4.16-3-11",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-11.js",
+ "description": "Array.prototype.every - 'length' is a string containing a positive number",
+ "test": "assertTrue((function testcase() {\n function callbackfn1(val, idx, obj) {\n return val > 10;\n }\n\n function callbackfn2(val, idx, obj) {\n return val > 11;\n }\n\n var obj = { 0: 12, 1: 11, 2: 9, length: \"2\" };\n\n return Array.prototype.every.call(obj, callbackfn1) &&\n !Array.prototype.every.call(obj, callbackfn2);\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.every))"
+ },
+ {
+ "id": "15.4.4.16-3-12",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-12.js",
+ "description": "Array.prototype.every - 'length' is a string containing a negative number",
+ "test": "assertTrue((function testcase() {\n function callbackfn1(val, idx, obj) {\n return val > 10;\n }\n\n function callbackfn2(val, idx, obj) {\n return val > 11;\n }\n\n var obj = { 0: 11, 1: 12, 2: 9, length: \"-4294967294\" };\n\n return Array.prototype.every.call(obj, callbackfn1) &&\n !Array.prototype.every.call(obj, callbackfn2);\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.every))"
+ },
+ {
+ "id": "15.4.4.16-3-13",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-13.js",
+ "description": "Array.prototype.every - 'length' is a string containing a decimal number",
+ "test": "assertTrue((function testcase() {\n function callbackfn1(val, idx, obj) {\n return val > 10;\n }\n\n function callbackfn2(val, idx, obj) {\n return val > 11;\n }\n\n var obj = { 0: 12, 1: 11, 2: 9, length: \"2.5\" };\n\n return Array.prototype.every.call(obj, callbackfn1) &&\n !Array.prototype.every.call(obj, callbackfn2);\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.every))"
+ },
+ {
+ "id": "15.4.4.16-3-14",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-14.js",
+ "description": "Array.prototype.every - 'length' is a string containing +/-Infinity",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n\n function callbackfn(val, idx, obj) {\n accessed = true;\n return val > 10;\n }\n\n var objOne = { 0: 9, length: \"Infinity\" };\n var objTwo = { 0: 9, length: \"+Infinity\" };\n var objThree = { 0: 9, length: \"-Infinity\" };\n\n return Array.prototype.every.call(objOne, callbackfn) &&\n Array.prototype.every.call(objTwo, callbackfn) &&\n Array.prototype.every.call(objThree, callbackfn) && !accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.every))"
+ },
+ {
+ "id": "15.4.4.16-3-15",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-15.js",
+ "description": "Array.prototype.every - 'length' is a string containing an exponential number",
+ "test": "assertTrue((function testcase() {\n function callbackfn1(val, idx, obj) {\n return val > 10;\n }\n\n function callbackfn2(val, idx, obj) {\n return val > 11;\n }\n\n var obj = { 0: 12, 1: 11, 2: 9, length: \"2E0\" };\n\n return Array.prototype.every.call(obj, callbackfn1) &&\n !Array.prototype.every.call(obj, callbackfn2);\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.every))"
+ },
+ {
+ "id": "15.4.4.16-3-16",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-16.js",
+ "description": "Array.prototype.every - 'length' is a string containing a hex number",
+ "test": "assertTrue((function testcase() {\n function callbackfn1(val, idx, obj) {\n return val > 10;\n }\n\n function callbackfn2(val, idx, obj) {\n return val > 11;\n }\n\n var obj = { 0: 12, 1: 11, 2: 9, length: \"0x0002\" };\n\n return Array.prototype.every.call(obj, callbackfn1) &&\n !Array.prototype.every.call(obj, callbackfn2);\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.every))"
+ },
+ {
+ "id": "15.4.4.16-3-17",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-17.js",
+ "description": "Array.prototype.every - 'length' is a string containing a number with leading zeros",
+ "test": "assertTrue((function testcase() {\n function callbackfn1(val, idx, obj) {\n return val > 10;\n }\n\n function callbackfn2(val, idx, obj) {\n return val > 11;\n }\n\n var obj = { 0: 12, 1: 11, 2: 9, length: \"0002.00\" };\n\n return Array.prototype.every.call(obj, callbackfn1) &&\n !Array.prototype.every.call(obj, callbackfn2);\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.every))"
+ },
+ {
+ "id": "15.4.4.16-3-18",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-18.js",
+ "description": "Array.prototype.every - value of 'length' is a string that can't convert to a number",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n\n function callbackfn(val, idx, obj) {\n accessed = true;\n return val > 10;\n }\n\n var obj = { 0: 9, 1: 8, length: \"two\" };\n\n return Array.prototype.every.call(obj, callbackfn) && !accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.every))"
+ },
+ {
+ "id": "15.4.4.16-3-19",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-19.js",
+ "description": "Array.prototype.every - value of 'length' is an Object which has an own toString method",
+ "test": "assertTrue((function testcase() {\n function callbackfn1(val, idx, obj) {\n return val > 10;\n }\n\n function callbackfn2(val, idx, obj) {\n return val > 11;\n }\n\n var toStringAccessed = false;\n var obj = {\n 0: 12,\n 1: 11,\n 2: 9,\n\n length: {\n toString: function () {\n toStringAccessed = true;\n return '2';\n }\n }\n };\n\n // objects inherit the default valueOf() method from Object\n // that simply returns itself. Since the default valueOf() method\n // does not return a primitive value, ES next tries to convert the object\n // to a number by calling its toString() method and converting the\n // resulting string to a number.\n return Array.prototype.every.call(obj, callbackfn1) &&\n !Array.prototype.every.call(obj, callbackfn2) && toStringAccessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.every))"
+ },
+ {
+ "id": "15.4.4.16-3-2",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-2.js",
+ "description": "Array.prototype.every on an Array-like object if 'length' is 1 (length overridden to true(type conversion))",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn1(val, idx, obj) {\n return val > 10;\n }\n\n function callbackfn2(val, idx, obj) {\n return val > 11;\n }\n\n var obj = { 0: 11, 1: 9, length: true };\n\n return Array.prototype.every.call(obj, callbackfn1) &&\n !Array.prototype.every.call(obj, callbackfn2);\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.every))"
+ },
+ {
+ "id": "15.4.4.16-3-20",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-20.js",
+ "description": "Array.prototype.every - value of 'length' is an Object which has an own valueOf method",
+ "test": "assertTrue((function testcase() {\n function callbackfn1(val, idx, obj) {\n return val > 10;\n }\n\n function callbackfn2(val, idx, obj) {\n return val > 11;\n }\n\n var valueOfAccessed = false;\n\n var obj = {\n 0: 12,\n 1: 11,\n 2: 9,\n length: {\n valueOf: function () {\n valueOfAccessed = true;\n return 2;\n }\n }\n };\n\n return Array.prototype.every.call(obj, callbackfn1) &&\n !Array.prototype.every.call(obj, callbackfn2) && valueOfAccessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.every))"
+ },
+ {
+ "id": "15.4.4.16-3-21",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-21.js",
+ "description": "Array.prototype.every - 'length' is an object that has an own valueOf method that returns an object and toString method that returns a string",
+ "test": "assertTrue((function testcase() {\n function callbackfn1(val, idx, obj) {\n return val > 10;\n }\n\n function callbackfn2(val, idx, obj) {\n return val > 11;\n }\n\n var toStringAccessed = false;\n var valueOfAccessed = false;\n\n var obj = {\n 0: 12,\n 1: 11,\n 2: 9,\n length: {\n valueOf: function () {\n valueOfAccessed = true;\n return {};\n },\n toString: function () {\n toStringAccessed = true;\n return '2';\n }\n }\n };\n\n return Array.prototype.every.call(obj, callbackfn1) &&\n !Array.prototype.every.call(obj, callbackfn2) &&\n valueOfAccessed && \n toStringAccessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.every))"
+ },
+ {
+ "id": "15.4.4.16-3-22",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-22.js",
+ "description": "Array.prototype.every throws TypeError exception when 'length' is an object with toString and valueOf methods that don�t return primitive values",
+ "test": "assertTrue((function testcase() {\n\n var callbackfnAccessed = false;\n var toStringAccessed = false;\n var valueOfAccessed = false;\n\n function callbackfn(val, idx, obj) {\n callbackfnAccessed = true;\n return val > 10;\n }\n\n var obj = {\n 0: 11,\n 1: 12,\n\n length: {\n valueOf: function () {\n valueOfAccessed = true;\n return {};\n },\n toString: function () {\n toStringAccessed = true;\n return {};\n }\n }\n };\n\n try {\n Array.prototype.every.call(obj, callbackfn);\n return false;\n } catch (ex) {\n return (ex instanceof TypeError) && toStringAccessed && valueOfAccessed && !callbackfnAccessed;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.every))"
+ },
+ {
+ "id": "15.4.4.16-3-23",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-23.js",
+ "description": "Array.prototype.every uses inherited valueOf method when 'length' is an object with an own toString and inherited valueOf methods",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn1(val, idx, obj) {\n return val > 10;\n }\n\n function callbackfn2(val, idx, obj) {\n return val > 11;\n }\n\n var valueOfAccessed = false;\n var toStringAccessed = false;\n\n var proto = {\n valueOf: function () {\n valueOfAccessed = true;\n return 2;\n }\n };\n\n var Con = function () { };\n Con.prototype = proto;\n\n var child = new Con();\n\n child.toString = function () {\n toStringAccessed = true;\n return '1';\n };\n\n var obj = {\n 0: 12,\n 1: 11,\n 2: 9,\n length: child\n };\n\n return Array.prototype.every.call(obj, callbackfn1) &&\n !Array.prototype.every.call(obj, callbackfn2) &&\n valueOfAccessed && !toStringAccessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.every))"
+ },
+ {
+ "id": "15.4.4.16-3-24",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-24.js",
+ "description": "Array.prototype.every - value of 'length' is a positive non-integer, ensure truncation occurs in the proper direction",
+ "test": "assertTrue((function testcase() {\n function callbackfn1(val, idx, obj) {\n return val > 10;\n }\n\n function callbackfn2(val, idx, obj) {\n return val > 11;\n }\n\n var obj = { 0: 12, 1: 11, 2: 9, length: 2.685 };\n\n return Array.prototype.every.call(obj, callbackfn1) &&\n !Array.prototype.every.call(obj, callbackfn2);\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.every))"
+ },
+ {
+ "id": "15.4.4.16-3-25",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-25.js",
+ "description": "Array.prototype.every - value of 'length' is a negative non-integer, ensure truncation occurs in the proper direction",
+ "test": "assertTrue((function testcase() {\n function callbackfn1(val, idx, obj) {\n return val > 10;\n }\n\n function callbackfn2(val, idx, obj) {\n return val > 11;\n }\n\n var obj = {\n 0: 12,\n 1: 11,\n 2: 9,\n length: -4294967294.5\n };\n\n return Array.prototype.every.call(obj, callbackfn1) &&\n !Array.prototype.every.call(obj, callbackfn2);\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.every))"
+ },
+ {
+ "id": "15.4.4.16-3-28",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-28.js",
+ "description": "Array.prototype.every - value of 'length' is boundary value (2^32)",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n\n function callbackfn(val, idx, obj) {\n accessed = true;\n return val > 10;\n }\n\n var obj = {\n 0: 12,\n length: 4294967296\n };\n\n return Array.prototype.every.call(obj, callbackfn) && !accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.every))"
+ },
+ {
+ "id": "15.4.4.16-3-29",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-29.js",
+ "description": "Array.prototype.every - value of 'length' is boundary value (2^32 + 1)",
+ "test": "assertTrue((function testcase() {\n function callbackfn1(val, idx, obj) {\n return val > 10;\n }\n\n function callbackfn2(val, idx, obj) {\n return val > 11;\n }\n\n var obj = {\n 0: 11,\n 1: 9,\n length: 4294967297\n };\n\n return Array.prototype.every.call(obj, callbackfn1) &&\n !Array.prototype.every.call(obj, callbackfn2);\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.every))"
+ },
+ {
+ "id": "15.4.4.16-3-3",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-3.js",
+ "description": "Array.prototype.every - value of 'length' is a number (value is 0)",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n\n function callbackfn(val, idx, obj) {\n accessed = true;\n return val > 10;\n }\n\n var obj = { 0: 9, length: 0 };\n\n return Array.prototype.every.call(obj, callbackfn) && !accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.every))"
+ },
+ {
+ "id": "15.4.4.16-3-4",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-4.js",
+ "description": "Array.prototype.every - value of 'length' is a number (value is +0)",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n\n function callbackfn(val, idx, obj) {\n accessed = true;\n return val > 10;\n }\n\n var obj = { 0: 9, length: +0 };\n\n return Array.prototype.every.call(obj, callbackfn) && !accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.every))"
+ },
+ {
+ "id": "15.4.4.16-3-5",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-5.js",
+ "description": "Array.prototype.every - value of 'length' is a number (value is -0)",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n\n function callbackfn(val, idx, obj) {\n accessed = true;\n return val > 10;\n }\n\n var obj = { 0: 9, length: -0 };\n\n return Array.prototype.every.call(obj, callbackfn) && !accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.every))"
+ },
+ {
+ "id": "15.4.4.16-3-6",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-6.js",
+ "description": "Array.prototype.every - value of 'length' is a number (value is positive)",
+ "test": "assertTrue((function testcase() {\n function callbackfn1(val, idx, obj) {\n return val > 10;\n }\n\n function callbackfn2(val, idx, obj) {\n return val > 11;\n }\n\n var obj = { 0: 12, 1: 11, 2: 9, length: 2 };\n\n return Array.prototype.every.call(obj, callbackfn1) &&\n !Array.prototype.every.call(obj, callbackfn2);\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.every))"
+ },
+ {
+ "id": "15.4.4.16-3-7",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-7.js",
+ "description": "Array.prototype.every - value of 'length' is a number (value is negative)",
+ "test": "assertTrue((function testcase() {\n function callbackfn1(val, idx, obj) {\n return val > 10;\n }\n\n function callbackfn2(val, idx, obj) {\n return val > 11;\n }\n\n var obj = { 0: 12, 1: 11, 2: 9, length: -4294967294 }; //length used to exec while loop is 2\n\n return Array.prototype.every.call(obj, callbackfn1) &&\n !Array.prototype.every.call(obj, callbackfn2);\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.every))"
+ },
+ {
+ "id": "15.4.4.16-3-8",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-8.js",
+ "description": "Array.prototype.every - value of 'length' is a number (value is Infinity)",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n\n function callbackfn(val, idx, obj) {\n accessed = true;\n return val > 10;\n }\n\n var obj = { 0: 9, length: Infinity };\n\n return Array.prototype.every.call(obj, callbackfn) && !accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.every))"
+ },
+ {
+ "id": "15.4.4.16-3-9",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-3-9.js",
+ "description": "Array.prototype.every - value of 'length' is a number (value is -Infinity)",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n\n function callbackfn(val, idx, obj) {\n accessed = true;\n return val > 10;\n }\n\n var obj = { 0: 9, length: -Infinity };\n\n return Array.prototype.every.call(obj, callbackfn) && !accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.every))"
+ },
+ {
+ "id": "15.4.4.16-4-1",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-4-1.js",
+ "description": "Array.prototype.every throws TypeError if callbackfn is undefined",
+ "test": "assertTrue((function testcase() {\n\n var arr = new Array(10);\n try {\n arr.every(); \n }\n catch(e) {\n if(e instanceof TypeError)\n return true; \n }\n\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.every))"
+ },
+ {
+ "id": "15.4.4.16-4-10",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-4-10.js",
+ "description": "Array.prototype.every - the exception is not thrown if exception was thrown by step 2",
+ "test": "assertTrue((function testcase() {\n\n var obj = { 0: 11, 1: 12 };\n\n Object.defineProperty(obj, \"length\", {\n get: function () {\n throw new SyntaxError();\n },\n configurable: true\n });\n\n try {\n Array.prototype.every.call(obj, undefined);\n return false;\n } catch (ex) {\n return !(ex instanceof TypeError);\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.every) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.4.4.16-4-11",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-4-11.js",
+ "description": "Array.prototype.every - the exception is not thrown if exception was thrown by step 3",
+ "test": "assertTrue((function testcase() {\n\n var obj = { 0: 11, 1: 12 };\n\n Object.defineProperty(obj, \"length\", {\n get: function () {\n return {\n toString: function () {\n throw new SyntaxError();\n }\n };\n },\n configurable: true\n });\n\n try {\n Array.prototype.every.call(obj, undefined);\n return false;\n } catch (ex) {\n return !(ex instanceof TypeError);\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.every) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.4.4.16-4-12",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-4-12.js",
+ "description": "Array.prototype.every - 'callbackfn' is a function",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(val, idx, obj) {\n return val > 10;\n }\n\n return ![11, 9].every(callbackfn);\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.every))"
+ },
+ {
+ "id": "15.4.4.16-4-15",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-4-15.js",
+ "description": "Array.prototype.every - calling with no callbackfn is the same as passing undefined for callbackfn",
+ "test": "assertTrue((function testcase() {\n var obj = { 10: 10 };\n var lengthAccessed = false;\n var loopAccessed = false;\n\n Object.defineProperty(obj, \"length\", {\n get: function () {\n lengthAccessed = true;\n return 20;\n },\n configurable: true\n });\n\n Object.defineProperty(obj, \"0\", {\n get: function () {\n loopAccessed = true;\n return 10;\n },\n configurable: true\n });\n\n try {\n Array.prototype.every.call(obj);\n return false;\n } catch (ex) {\n return (ex instanceof TypeError) && lengthAccessed && !loopAccessed;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.every) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects())"
+ },
+ {
+ "id": "15.4.4.16-4-3",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-4-3.js",
+ "description": "Array.prototype.every throws TypeError if callbackfn is null",
+ "test": "assertTrue((function testcase() {\n\n var arr = new Array(10);\n try {\n arr.every(null); \n }\n catch(e) {\n if(e instanceof TypeError)\n return true; \n }\n\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.every))"
+ },
+ {
+ "id": "15.4.4.16-4-4",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-4-4.js",
+ "description": "Array.prototype.every throws TypeError if callbackfn is boolean",
+ "test": "assertTrue((function testcase() {\n\n var arr = new Array(10);\n try {\n arr.every(true); \n }\n catch(e) {\n if(e instanceof TypeError)\n return true; \n }\n\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.every))"
+ },
+ {
+ "id": "15.4.4.16-4-5",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-4-5.js",
+ "description": "Array.prototype.every throws TypeError if callbackfn is number",
+ "test": "assertTrue((function testcase() {\n\n var arr = new Array(10);\n try {\n arr.every(5); \n }\n catch(e) {\n if(e instanceof TypeError)\n return true; \n }\n\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.every))"
+ },
+ {
+ "id": "15.4.4.16-4-6",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-4-6.js",
+ "description": "Array.prototype.every throws TypeError if callbackfn is string",
+ "test": "assertTrue((function testcase() {\n\n var arr = new Array(10);\n try {\n arr.every(\"abc\"); \n }\n catch(e) {\n if(e instanceof TypeError)\n return true; \n }\n\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.every))"
+ },
+ {
+ "id": "15.4.4.16-4-7",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-4-7.js",
+ "description": "Array.prototype.every throws TypeError if callbackfn is Object without a Call internal method",
+ "test": "assertTrue((function testcase() {\n\n var arr = new Array(10);\n try {\n arr.every( {} ); \n }\n catch(e) {\n if(e instanceof TypeError)\n return true; \n }\n\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.every))"
+ },
+ {
+ "id": "15.4.4.16-4-8",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-4-8.js",
+ "description": "Array.prototype.every - side effects produced by step 2 are visible when an exception occurs",
+ "test": "assertTrue((function testcase() {\n\n var obj = { 0: 11, 1: 12 };\n\n var accessed = false;\n\n Object.defineProperty(obj, \"length\", {\n get: function () {\n accessed = true;\n return 2;\n },\n configurable: true\n });\n\n try {\n Array.prototype.every.call(obj, null);\n return false;\n } catch (ex) {\n return ex instanceof TypeError && accessed;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.every) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.4.4.16-4-9",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-4-9.js",
+ "description": "Array.prototype.every - side effects produced by step 3 are visible when an exception occurs",
+ "test": "assertTrue((function testcase() {\n\n var obj = { 0: 11, 1: 12 };\n\n var accessed = false;\n\n Object.defineProperty(obj, \"length\", {\n get: function () {\n return {\n toString: function () {\n accessed = true;\n return \"2\";\n }\n };\n },\n configurable: true\n });\n\n try {\n Array.prototype.every.call(obj, null);\n return false;\n } catch (ex) {\n return ex instanceof TypeError && accessed;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.every) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.4.4.16-5-1-s",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.16-5-1-s.js",
+ "description": "Array.prototype.every - thisArg not passed to strict callbackfn",
+ "test": "assertTrue((function testcase() {\n var innerThisCorrect = false;\n \n function callbackfn(val, idx, obj) {\n \"use strict\";\n innerThisCorrect = this===undefined;\n return true;\n }\n\n [1].every(callbackfn);\n return innerThisCorrect; \n }).call(this));\n",
+ "precondition": "(fnSupportsStrict() && fnExists(Array.prototype.every))",
+ "strict_only": ""
+ },
+ {
+ "id": "15.4.4.16-5-1",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-5-1.js",
+ "description": "Array.prototype.every - thisArg not passed",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(val, idx, obj)\n {\n return this === fnGlobalObject();\n }\n\n var arr = [1];\n if(arr.every(callbackfn) === true)\n return true; \n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.every))"
+ },
+ {
+ "id": "15.4.4.16-5-10",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-5-10.js",
+ "description": "Array.prototype.every - Array Object can be used as thisArg",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n var objArray = [];\n\n function callbackfn(val, idx, obj) {\n accessed = true;\n return this === objArray;\n }\n\n\n\n return [11].every(callbackfn, objArray) && accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.every))"
+ },
+ {
+ "id": "15.4.4.16-5-11",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-5-11.js",
+ "description": "Array.prototype.every - String Object can be used as thisArg",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n var objString = new String();\n\n function callbackfn(val, idx, obj) {\n accessed = true;\n return this === objString;\n }\n\n \n\n return [11].every(callbackfn, objString) && accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.every))"
+ },
+ {
+ "id": "15.4.4.16-5-12",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-5-12.js",
+ "description": "Array.prototype.every - Boolean Object can be used as thisArg",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n var objBoolean = new Boolean();\n\n function callbackfn(val, idx, obj) {\n accessed = true;\n return this === objBoolean;\n }\n\n \n\n return [11].every(callbackfn, objBoolean) && accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.every))"
+ },
+ {
+ "id": "15.4.4.16-5-13",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-5-13.js",
+ "description": "Array.prototype.every - Number Object can be used as thisArg",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n var objNumber = new Number();\n\n function callbackfn(val, idx, obj) {\n accessed = true;\n return this === objNumber;\n }\n\n return [11].every(callbackfn, objNumber) && accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.every))"
+ },
+ {
+ "id": "15.4.4.16-5-14",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-5-14.js",
+ "description": "Array.prototype.every - the Math object can be used as thisArg",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n\n function callbackfn(val, idx, obj) {\n accessed = true;\n return this === Math;\n }\n\n return [11].every(callbackfn, Math) && accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.every))"
+ },
+ {
+ "id": "15.4.4.16-5-15",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-5-15.js",
+ "description": "Array.prototype.every - Date Object can be used as thisArg",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n var objDate = new Date();\n\n function callbackfn(val, idx, obj) {\n accessed = true;\n return this === objDate;\n }\n\n return [11].every(callbackfn, objDate) && accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.every))"
+ },
+ {
+ "id": "15.4.4.16-5-16",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-5-16.js",
+ "description": "Array.prototype.every - RegExp Object can be used as thisArg",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n var objRegExp = new RegExp();\n\n function callbackfn(val, idx, obj) {\n accessed = true;\n return this === objRegExp;\n }\n\n return [11].every(callbackfn, objRegExp) && accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.every))"
+ },
+ {
+ "id": "15.4.4.16-5-17",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-5-17.js",
+ "description": "Array.prototype.every - the JSON object can be used as thisArg",
+ "test": "assertTrue((function testcase() {\n var accessed = false;\n\n function callbackfn(val, idx, obj) {\n accessed = true;\n return this === JSON;\n }\n\n return [11].every(callbackfn, JSON) && accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.every))"
+ },
+ {
+ "id": "15.4.4.16-5-18",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-5-18.js",
+ "description": "Array.prototype.every - Error Object can be used as thisArg",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n var objError = new RangeError();\n\n function callbackfn(val, idx, obj) {\n accessed = true;\n return this === objError;\n }\n\n return [11].every(callbackfn, objError) && accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.every))"
+ },
+ {
+ "id": "15.4.4.16-5-19",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-5-19.js",
+ "description": "Array.prototype.every - the Arguments object can be used as thisArg",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n var arg;\n\n function callbackfn(val, idx, obj) {\n accessed = true;\n return this === arg;\n }\n\n (function fun() {\n arg = arguments;\n }(1, 2, 3));\n\n return [11].every(callbackfn, arg) && accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.every))"
+ },
+ {
+ "id": "15.4.4.16-5-2",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-5-2.js",
+ "description": "Array.prototype.every - thisArg is Object",
+ "test": "assertTrue((function testcase() {\n var res = false;\n var o = new Object();\n o.res = true;\n function callbackfn(val, idx, obj)\n {\n return this.res;\n }\n\n var arr = [1];\n if(arr.every(callbackfn, o) === true)\n return true; \n\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.every))"
+ },
+ {
+ "id": "15.4.4.16-5-21",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-5-21.js",
+ "description": "Array.prototype.every - the global object can be used as thisArg",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n\n function callbackfn(val, idx, obj) {\n accessed = true;\n return this === fnGlobalObject();\n }\n\n return [11].every(callbackfn, fnGlobalObject()) && accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.every))"
+ },
+ {
+ "id": "15.4.4.16-5-22",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-5-22.js",
+ "description": "Array.prototype.every - boolean primitive can be used as thisArg",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n\n function callbackfn(val, idx, obj) {\n accessed = true;\n return this.valueOf() === false;\n }\n\n return [11].every(callbackfn, false) && accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.every))"
+ },
+ {
+ "id": "15.4.4.16-5-23",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-5-23.js",
+ "description": "Array.prototype.every - number primitive can be used as thisArg",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n\n function callbackfn(val, idx, obj) {\n accessed = true;\n return this.valueOf() === 101;\n }\n\n return [11].every(callbackfn, 101) && accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.every))"
+ },
+ {
+ "id": "15.4.4.16-5-24",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-5-24.js",
+ "description": "Array.prototype.every - string primitive can be used as thisArg",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n\n function callbackfn(val, idx, obj) {\n accessed = true;\n return this.valueOf() === \"abc\";\n }\n\n return [11].every(callbackfn, \"abc\") && accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.every))"
+ },
+ {
+ "id": "15.4.4.16-5-3",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-5-3.js",
+ "description": "Array.prototype.every - thisArg is Array",
+ "test": "assertTrue((function testcase() {\n var res = false;\n var a = new Array();\n a.res = true;\n function callbackfn(val, idx, obj)\n {\n return this.res;\n }\n\n var arr = [1];\n\n if(arr.every(callbackfn, a) === true)\n return true; \n\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.every))"
+ },
+ {
+ "id": "15.4.4.16-5-4",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-5-4.js",
+ "description": "Array.prototype.every - thisArg is object from object template(prototype)",
+ "test": "assertTrue((function testcase() {\n var res = false;\n function callbackfn(val, idx, obj)\n {\n return this.res;\n }\n \n function foo(){}\n foo.prototype.res = true;\n var f = new foo();\n var arr = [1];\n\n if(arr.every(callbackfn,f) === true)\n return true; \n\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.every))"
+ },
+ {
+ "id": "15.4.4.16-5-5",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-5-5.js",
+ "description": "Array.prototype.every - thisArg is object from object template",
+ "test": "assertTrue((function testcase() {\n var res = false;\n function callbackfn(val, idx, obj)\n {\n return this.res;\n }\n\n function foo(){}\n var f = new foo();\n f.res = true;\n var arr = [1];\n\n if(arr.every(callbackfn,f) === true)\n return true; \n\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.every))"
+ },
+ {
+ "id": "15.4.4.16-5-6",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-5-6.js",
+ "description": "Array.prototype.every - thisArg is function",
+ "test": "assertTrue((function testcase() {\n var res = false;\n function callbackfn(val, idx, obj)\n {\n return this.res;\n }\n\n function foo(){}\n foo.res = true;\n var arr = [1];\n\n if(arr.every(callbackfn,foo) === true)\n return true; \n\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.every))"
+ },
+ {
+ "id": "15.4.4.16-5-7",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-5-7.js",
+ "description": "Array.prototype.every - built-in functions can be used as thisArg",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n\n function callbackfn(val, idx, obj) {\n accessed = true;\n return this === eval;\n }\n\n return [11].every(callbackfn, eval) && accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.every))"
+ },
+ {
+ "id": "15.4.4.16-5-9",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-5-9.js",
+ "description": "Array.prototype.every - Function Object can be used as thisArg",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n var objFunction = function () { };\n\n function callbackfn(val, idx, obj) {\n accessed = true;\n return this === objFunction;\n }\n\n return [11].every(callbackfn, objFunction) && accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.every))"
+ },
+ {
+ "id": "15.4.4.16-7-1",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-1.js",
+ "description": "Array.prototype.every considers new elements added to array after the call",
+ "test": "assertTrue((function testcase() { \n \n var calledForThree = false;\n\n function callbackfn(val, Idx, obj)\n {\n arr[2] = 3;\n if(val == 3)\n calledForThree = true;\n return true;\n }\n\n var arr = [1,2,,4,5];\n \n var res = arr.every(callbackfn);\n\n return calledForThree; \n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.every))"
+ },
+ {
+ "id": "15.4.4.16-7-2",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-2.js",
+ "description": "Array.prototype.every considers new value of elements in array after the call",
+ "test": "assertTrue((function testcase() { \n \n function callbackfn(val, Idx, obj)\n {\n arr[4] = 6;\n if(val < 6)\n return true;\n else \n return false;\n }\n\n var arr = [1,2,3,4,5];\n \n if(arr.every(callbackfn) === false) \n return true; \n \n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.every))"
+ },
+ {
+ "id": "15.4.4.16-7-3",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-3.js",
+ "description": "Array.prototype.every doesn't visit deleted elements in array after the call",
+ "test": "assertTrue((function testcase() { \n \n function callbackfn(val, Idx, obj)\n {\n delete arr[2];\n if(val == 3)\n return false;\n else \n return true;\n }\n\n var arr = [1,2,3,4,5];\n \n if(arr.every(callbackfn) === true) \n return true; \n \n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.every))"
+ },
+ {
+ "id": "15.4.4.16-7-4",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-4.js",
+ "description": "Array.prototype.every doesn't visit deleted elements when Array.length is decreased",
+ "test": "assertTrue((function testcase() { \n \n function callbackfn(val, Idx, obj)\n {\n arr.length = 3;\n if(val < 4)\n return true;\n else \n return false;\n }\n\n var arr = [1,2,3,4,6];\n \n if(arr.every(callbackfn) === true) \n return true; \n \n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.every))"
+ },
+ {
+ "id": "15.4.4.16-7-5",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-5.js",
+ "description": "Array.prototype.every doesn't consider newly added elements in sparse array",
+ "test": "assertTrue((function testcase() { \n \n function callbackfn(val, Idx, obj)\n {\n arr[1000] = 3;\n if(val < 3)\n return true;\n else \n return false;\n }\n\n var arr = new Array(10);\n arr[1] = 1;\n arr[2] = 2;\n \n if(arr.every(callbackfn) === true) \n return true; \n \n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.every))"
+ },
+ {
+ "id": "15.4.4.16-7-6",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-6.js",
+ "description": "Array.prototype.every visits deleted element in array after the call when same index is also present in prototype",
+ "test": "assertTrue((function testcase() { \n \n function callbackfn(val, Idx, obj)\n {\n delete arr[2];\n if(val == 3)\n return false;\n else \n return true;\n }\n\n Array.prototype[2] = 3;\n var arr = [1,2,3,4,5];\n \n var res = arr.every(callbackfn);\n delete Array.prototype[2];\n\n if(res === false) \n return true; \n \n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.every))"
+ },
+ {
+ "id": "15.4.4.16-7-7",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-7.js",
+ "description": "Array.prototype.every - Deleting the array itself within the callbackfn of Array.prototype.every is successful once Array.prototype.every is called for all elements",
+ "test": "assertTrue((function testcase() {\n var o = new Object();\n o.arr = [1, 2, 3, 4, 5];\n\n function callbackfn(val, Idx, obj) {\n delete o.arr;\n if (val === Idx + 1)\n return true;\n else\n return false;\n }\n\n return o.arr.every(callbackfn) && !o.hasOwnProperty(\"arr\");\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.every))"
+ },
+ {
+ "id": "15.4.4.16-7-8",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-8.js",
+ "description": "Array.prototype.every - no observable effects occur if len is 0",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n\n function callbackfn(val, idx, obj) {\n accessed = true;\n return val > 10;\n }\n\n var obj = { 0: 11, 1: 12, length: 0 };\n\n return Array.prototype.every.call(obj, callbackfn) && !accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.every))"
+ },
+ {
+ "id": "15.4.4.16-7-9",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-9.js",
+ "description": "Array.prototype.every - modifications to length don't change number of iterations",
+ "test": "assertTrue((function testcase() {\n\n var called = 0;\n\n function callbackfn(val, idx, obj) {\n called++;\n return val > 10;\n }\n\n var obj = { 1: 12, 2: 9, length: 2 };\n\n Object.defineProperty(obj, \"0\", {\n get: function () {\n obj.length = 3;\n return 11;\n },\n configurable: true\n });\n\n return Array.prototype.every.call(obj, callbackfn) && 2 === called;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.every) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects())"
+ },
+ {
+ "id": "15.4.4.16-7-b-1",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-b-1.js",
+ "description": "Array.prototype.every - callbackfn not called for indexes never been assigned values",
+ "test": "assertTrue((function testcase() { \n \n var callCnt = 0.;\n function callbackfn(val, Idx, obj)\n {\n callCnt++;\n return true;\n }\n\n var arr = new Array(10);\n arr[1] = undefined; \n arr.every(callbackfn);\n if( callCnt === 1) \n return true; \n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.every))"
+ },
+ {
+ "id": "15.4.4.16-7-b-10",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-b-10.js",
+ "description": "Array.prototype.every - deleting property of prototype causes prototype index property not to be visited on an Array-like Object",
+ "test": "assertTrue((function testcase() {\n var accessed = false;\n function callbackfn(val, idx, obj) {\n accessed = true;\n return idx !== 1;\n }\n var arr = { 2: 2, length: 20 };\n\n Object.defineProperty(arr, \"0\", {\n get: function () {\n delete Object.prototype[1];\n return 0;\n },\n configurable: true\n });\n\n try {\n Object.prototype[1] = 1;\n return Array.prototype.every.call(arr, callbackfn) && accessed;\n } finally {\n delete Object.prototype[1];\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.every) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects())"
+ },
+ {
+ "id": "15.4.4.16-7-b-11",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-b-11.js",
+ "description": "Array.prototype.every - deleting property of prototype causes prototype index property not to be visited on an Array",
+ "test": "assertTrue((function testcase() {\n var accessed = false;\n function callbackfn(val, idx, obj) {\n accessed = true;\n return idx !== 1;\n }\n var arr = [0, , 2];\n\n Object.defineProperty(arr, \"0\", {\n get: function () {\n delete Array.prototype[1];\n return 0;\n },\n configurable: true\n });\n\n try {\n Array.prototype[1] = 1;\n return arr.every(callbackfn) && accessed;\n } finally {\n delete Array.prototype[1];\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.every) && fnExists(Object.defineProperty) && ![, 1].hasOwnProperty(0) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.4.4.16-7-b-12",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-b-12.js",
+ "description": "Array.prototype.every - deleting own property with prototype property causes prototype index property to be visited on an Array-like object",
+ "test": "assertTrue((function testcase() {\n function callbackfn(val, idx, obj) {\n if (idx === 1 && val === 1) {\n return false;\n } else {\n return true;\n }\n }\n var arr = { 0: 0, 1: 111, 2: 2, length: 10 };\n\n Object.defineProperty(arr, \"0\", {\n get: function () {\n delete arr[1];\n return 0;\n },\n configurable: true\n });\n\n try {\n Object.prototype[1] = 1;\n return !Array.prototype.every.call(arr, callbackfn);\n } finally {\n delete Object.prototype[1];\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.every) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects())"
+ },
+ {
+ "id": "15.4.4.16-7-b-13",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-b-13.js",
+ "description": "Array.prototype.every - deleting own property with prototype property causes prototype index property to be visited on an Array",
+ "test": "assertTrue((function testcase() {\n function callbackfn(val, idx, obj) {\n if (idx === 1 && val === 1) {\n return false;\n } else {\n return true;\n }\n }\n var arr = [0, 111, 2]; \n \n Object.defineProperty(arr, \"0\", {\n get: function () {\n delete arr[1];\n return 0;\n },\n configurable: true\n });\n\n try {\n Array.prototype[1] = 1;\n return !arr.every(callbackfn);\n } finally {\n delete Array.prototype[1];\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.every) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.4.4.16-7-b-14",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-b-14.js",
+ "description": "Array.prototype.every - decreasing length of array causes index property not to be visited",
+ "test": "assertTrue((function testcase() {\n var accessed = false;\n function callbackfn(val, idx, obj) {\n accessed = true;\n return idx !== 3;\n }\n var arr = [0, 1, 2, \"last\"];\n\n Object.defineProperty(arr, \"0\", {\n get: function () {\n arr.length = 3;\n return 0;\n },\n configurable: true\n });\n\n return arr.every(callbackfn) && accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.every) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.4.4.16-7-b-15",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-b-15.js",
+ "description": "Array.prototype.every - decreasing length of array with prototype property causes prototype index property to be visited",
+ "test": "assertTrue((function testcase() {\n function callbackfn(val, idx, obj) {\n if (idx === 2 && val === \"prototype\") {\n return false;\n } else {\n return true;\n }\n }\n var arr = [0, 1, 2];\n\n try {\n Object.defineProperty(Array.prototype, \"2\", {\n get: function () {\n return \"prototype\";\n },\n configurable: true\n });\n\n Object.defineProperty(arr, \"1\", {\n get: function () {\n arr.length = 2;\n return 1;\n },\n configurable: true\n });\n\n return !arr.every(callbackfn);\n } finally {\n delete Array.prototype[2];\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.every) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.4.4.16-7-b-16",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-b-16.js",
+ "description": "Array.prototype.every - decreasing length of array does not delete non-configurable properties",
+ "test": "assertTrue((function testcase() {\n function callbackfn(val, idx, obj) {\n if (idx === 2 && val === \"unconfigurable\") {\n return false;\n } else {\n return true;\n }\n }\n \n var arr = [0, 1, 2];\n\n Object.defineProperty(arr, \"2\", {\n get: function () {\n return \"unconfigurable\";\n },\n configurable: false\n });\n\n Object.defineProperty(arr, \"1\", {\n get: function () {\n arr.length = 2;\n return 1;\n },\n configurable: true\n });\n\n return !arr.every(callbackfn);\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.every) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.4.4.16-7-b-2",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-b-2.js",
+ "description": "Array.prototype.every - added properties in step 2 are visible here",
+ "test": "assertTrue((function testcase() {\n function callbackfn(val, idx, obj) {\n if (idx === 2 && val === \"length\") {\n return false;\n } else {\n return true;\n }\n }\n \n var arr = { };\n\n Object.defineProperty(arr, \"length\", {\n get: function () {\n arr[2] = \"length\";\n return 3;\n },\n configurable: true\n });\n\n return !Array.prototype.every.call(arr, callbackfn);\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.every) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.4.4.16-7-b-3",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-b-3.js",
+ "description": "Array.prototype.every - deleted properties in step 2 are visible here",
+ "test": "assertTrue((function testcase() {\n var accessed = false;\n function callbackfn(val, idx, obj) {\n accessed = true;\n return idx !== 2;\n }\n var arr = { 2: 6.99, 8: 19};\n\n Object.defineProperty(arr, \"length\", {\n get: function () {\n delete arr[2];\n return 10;\n },\n configurable: true\n });\n\n return Array.prototype.every.call(arr, callbackfn) && accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.every) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.4.4.16-7-b-4",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-b-4.js",
+ "description": "Array.prototype.every - properties added into own object after current position are visited on an Array-like object",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(val, idx, obj) {\n if (idx === 1 && val === 1) {\n return false;\n } else {\n return true;\n }\n }\n \n var arr = { length: 2 };\n\n Object.defineProperty(arr, \"0\", {\n get: function () {\n Object.defineProperty(arr, \"1\", {\n get: function () {\n return 1;\n },\n configurable: true\n });\n return 0;\n },\n configurable: true\n });\n\n return !Array.prototype.every.call(arr, callbackfn);\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.every) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects())"
+ },
+ {
+ "id": "15.4.4.16-7-b-5",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-b-5.js",
+ "description": "Array.prototype.every - properties added into own object after current position are visited on an Array",
+ "test": "assertTrue((function testcase() {\n function callbackfn(val, idx, obj) {\n if (idx === 1 && val === 1) {\n return false;\n } else {\n return true;\n }\n }\n\n var arr = [0, , 2];\n\n Object.defineProperty(arr, \"0\", {\n get: function () {\n Object.defineProperty(arr, \"1\", {\n get: function () {\n return 1;\n },\n configurable: true\n });\n return 0;\n },\n configurable: true\n });\n\n return !arr.every(callbackfn);\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.every) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.4.4.16-7-b-6",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-b-6.js",
+ "description": "Array.prototype.every - properties can be added to prototype after current position are visited on an Array-like object",
+ "test": "assertTrue((function testcase() {\n function callbackfn(val, idx, obj) {\n if (idx === 1 && val === 6.99) {\n return false;\n } else {\n return true;\n }\n }\n var arr = { length: 2 };\n\n Object.defineProperty(arr, \"0\", {\n get: function () {\n Object.defineProperty(Object.prototype, \"1\", {\n get: function () {\n return 6.99;\n },\n configurable: true\n });\n return 0;\n },\n configurable: true\n });\n\n try {\n return !Array.prototype.every.call(arr, callbackfn);\n } finally {\n delete Object.prototype[1];\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.every) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects())"
+ },
+ {
+ "id": "15.4.4.16-7-b-7",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-b-7.js",
+ "description": "Array.prototype.every - properties can be added to prototype after current position are visited on an Array",
+ "test": "assertTrue((function testcase() {\n function callbackfn(val, idx, obj) {\n if (idx === 1 && val === 6.99) {\n return false;\n } else {\n return true;\n }\n }\n var arr = [0, , 2];\n\n Object.defineProperty(arr, \"0\", {\n get: function () {\n Object.defineProperty(Array.prototype, \"1\", {\n get: function () {\n return 6.99;\n },\n configurable: true\n });\n return 0;\n },\n configurable: true\n });\n\n try {\n return !arr.every(callbackfn);\n } finally {\n delete Array.prototype[1];\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.every) && fnExists(Object.defineProperty) && ![, 1].hasOwnProperty(0) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.4.4.16-7-b-8",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-b-8.js",
+ "description": "Array.prototype.every - deleting own property causes index property not to be visited on an Array-like object",
+ "test": "assertTrue((function testcase() {\n var accessed = false;\n function callbackfn(val, idx, obj) {\n accessed = true;\n return idx !== 1;\n }\n var obj = { length: 2 };\n\n Object.defineProperty(obj, \"1\", {\n get: function () {\n return 6.99;\n },\n configurable: true\n });\n\n Object.defineProperty(obj, \"0\", {\n get: function () {\n delete obj[1];\n return 0;\n },\n configurable: true\n });\n\n return Array.prototype.every.call(obj, callbackfn) && accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.every) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects())"
+ },
+ {
+ "id": "15.4.4.16-7-b-9",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-b-9.js",
+ "description": "Array.prototype.every - deleting own property causes index property not to be visited on an Array",
+ "test": "assertTrue((function testcase() {\n var accessed = false;\n function callbackfn(val, idx, obj) {\n accessed = true;\n return idx !== 1;\n }\n var arr = [1, 2];\n\n Object.defineProperty(arr, \"1\", {\n get: function () {\n return \"6.99\";\n },\n configurable: true\n });\n\n Object.defineProperty(arr, \"0\", {\n get: function () {\n delete arr[1];\n return 0;\n },\n configurable: true\n });\n\n return arr.every(callbackfn) && accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.every) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.4.4.16-7-c-i-1",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-i-1.js",
+ "description": "Array.prototype.every - element to be retrieved is own data property on an Array-like object",
+ "test": "assertTrue((function testcase() {\n\n var kValue = { };\n function callbackfn(val, idx, obj) {\n if (idx === 5) {\n return val !== kValue;\n } else {\n return true;\n }\n }\n\n var obj = { 5: kValue, length: 100 };\n\n return !Array.prototype.every.call(obj, callbackfn);\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.every))"
+ },
+ {
+ "id": "15.4.4.16-7-c-i-10",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-i-10.js",
+ "description": "Array.prototype.every - element to be retrieved is own accessor property on an Array",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(val, idx, obj) {\n if (idx === 2) {\n return val !== 12;\n } else {\n return true;\n }\n }\n\n var arr = [];\n\n Object.defineProperty(arr, \"2\", {\n get: function () {\n return 12;\n },\n configurable: true\n });\n\n return !arr.every(callbackfn);\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.every) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.4.4.16-7-c-i-11",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-i-11.js",
+ "description": "Array.prototype.every - element to be retrieved is own accessor property that overrides an inherited data property on an Array-like object",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(val, idx, obj) {\n if (idx === 0) {\n return val === 5;\n } else {\n return true;\n }\n }\n\n var proto = { 0: 5, 1: 6 };\n\n var Con = function () { };\n Con.prototype = proto;\n\n var child = new Con();\n child.length = 10;\n\n Object.defineProperty(child, \"0\", {\n get: function () {\n return 11;\n },\n configurable: true\n });\n\n return !Array.prototype.every.call(child, callbackfn);\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.every) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects())"
+ },
+ {
+ "id": "15.4.4.16-7-c-i-12",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-i-12.js",
+ "description": " Array.prototype.every - element to be retrieved is own accessor property that overrides an inherited data property on an Array",
+ "test": "assertTrue((function testcase() {\n function callbackfn(val, idx, obj) {\n if (idx === 0) {\n return val === 10;\n } else {\n return true;\n }\n }\n\n var arr = [];\n try {\n Array.prototype[0] = 10;\n\n Object.defineProperty(arr, \"0\", {\n get: function () {\n return 111;\n },\n configurable: true\n });\n\n return !arr.every(callbackfn);\n } finally {\n delete Array.prototype[0];\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.every) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.4.4.16-7-c-i-13",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-i-13.js",
+ "description": "Array.prototype.every - element to be retrieved is own accessor property that overrides an inherited accessor property on an Array-like object",
+ "test": "assertTrue((function testcase() {\n function callbackfn(val, idx, obj) {\n if (idx === 1) {\n return val === 6;\n } else {\n return true;\n }\n }\n\n var proto = {};\n\n Object.defineProperty(proto, \"1\", {\n get: function () {\n return 6;\n },\n configurable: true\n });\n\n var Con = function () { };\n Con.prototype = proto;\n\n var child = new Con();\n child.length = 10;\n\n Object.defineProperty(child, \"1\", {\n get: function () {\n return 12;\n },\n configurable: true\n });\n\n\n return !Array.prototype.every.call(child, callbackfn);\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.every) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects())"
+ },
+ {
+ "id": "15.4.4.16-7-c-i-14",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-i-14.js",
+ "description": " Array.prototype.every - element to be retrieved is own accessor property that overrides an inherited accessor property on an Array",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(val, idx, obj) {\n if (idx === 0) {\n return val === 5;\n } else {\n return true;\n }\n }\n\n var arr = [];\n try {\n Object.defineProperty(Array.prototype, \"0\", {\n get: function () {\n return 5;\n },\n configurable: true\n });\n\n Object.defineProperty(arr, \"0\", {\n get: function () {\n return 11;\n },\n configurable: true\n });\n\n return !arr.every(callbackfn);\n } finally {\n delete Array.prototype[0];\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.every) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.4.4.16-7-c-i-15",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-i-15.js",
+ "description": "Array.prototype.every - element to be retrieved is inherited accessor property on an Array-like object",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(val, idx, obj) {\n if (idx === 1) {\n return val !== 11;\n } else {\n return true;\n }\n }\n\n var proto = {};\n\n Object.defineProperty(proto, \"1\", {\n get: function () {\n return 11;\n },\n configurable: true\n });\n\n var Con = function () { };\n Con.prototype = proto;\n\n var child = new Con();\n child.length = 20;\n\n return !Array.prototype.every.call(child, callbackfn);\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.every) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects())"
+ },
+ {
+ "id": "15.4.4.16-7-c-i-16",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-i-16.js",
+ "description": "Array.prototype.every - element to be retrieved is inherited accessor property on an Array",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(val, idx, obj) {\n if (idx === 0) {\n return val !== 11;\n } else {\n return true;\n }\n }\n\n try {\n Object.defineProperty(Array.prototype, \"0\", {\n get: function () {\n return 11;\n },\n configurable: true\n });\n\n return ![, , , ].every(callbackfn);\n } finally {\n delete Array.prototype[0];\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.every) && fnExists(Object.defineProperty) && ![, 1].hasOwnProperty(0) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.4.4.16-7-c-i-17",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-i-17.js",
+ "description": "Array.prototype.every - element to be retrieved is own accessor property without a get function on an Array-like object",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n\n function callbackfn(val, idx, obj) {\n accessed = true;\n return typeof val === \"undefined\";\n }\n\n var obj = { length: 2 };\n Object.defineProperty(obj, \"1\", {\n set: function () { },\n configurable: true\n });\n\n return Array.prototype.every.call(obj, callbackfn) && accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.every) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects())"
+ },
+ {
+ "id": "15.4.4.16-7-c-i-18",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-i-18.js",
+ "description": "Array.prototype.every - element to be retrieved is own accessor property without a get function on an Array",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n\n function callbackfn(val, idx, obj) {\n accessed = true;\n return typeof val === \"undefined\";\n }\n\n var arr = [];\n\n Object.defineProperty(arr, \"0\", {\n set: function () { },\n configurable: true\n });\n\n return arr.every(callbackfn) && accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.every) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.4.4.16-7-c-i-19",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-i-19.js",
+ "description": "Array.prototype.every - element to be retrieved is own accessor property without a get function that overrides an inherited accessor property on an Array-like object",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n\n function callbackfn(val, idx, obj) {\n accessed = true;\n return typeof val === \"undefined\";\n }\n\n var obj = { length: 2 };\n Object.defineProperty(obj, \"1\", {\n set: function () { },\n configurable: true\n });\n try {\n Object.prototype[1] = 10;\n return Array.prototype.every.call(obj, callbackfn) && accessed;\n } finally {\n delete Object.prototype[1];\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.every) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects())"
+ },
+ {
+ "id": "15.4.4.16-7-c-i-2",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-i-2.js",
+ "description": "Array.prototype.every - element to be retrieved is own data property on an Array",
+ "test": "assertTrue((function testcase() {\n\n var called = 0;\n\n function callbackfn(val, idx, obj) {\n called++;\n return val === 11;\n }\n\n return [11].every(callbackfn) && 1 === called;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.every))"
+ },
+ {
+ "id": "15.4.4.16-7-c-i-20",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-i-20.js",
+ "description": "Array.prototype.every - element to be retrieved is own accessor property without a get function that overrides an inherited accessor property on an Array",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n\n function callbackfn(val, idx, obj) {\n accessed = true;\n return typeof val === \"undefined\";\n }\n\n var arr = [];\n\n Object.defineProperty(arr, \"0\", {\n set: function () { },\n configurable: true\n });\n\n try {\n Array.prototype[0] = 100;\n return arr.every(callbackfn) && accessed;\n } finally {\n delete Array.prototype[0];\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.every) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.4.4.16-7-c-i-21",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-i-21.js",
+ "description": "Array.prototype.every - element to be retrieved is inherited accessor property without a get function on an Array-like object",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n\n function callbackfn(val, idx, obj) {\n accessed = true;\n return typeof val === \"undefined\";\n }\n\n var proto = {};\n Object.defineProperty(proto, \"1\", {\n set: function () { },\n configurable: true\n });\n\n var Con = function () { };\n Con.prototype = proto;\n\n var child = new Con();\n child.length = 2;\n\n return Array.prototype.every.call(child, callbackfn) && accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.every) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects())"
+ },
+ {
+ "id": "15.4.4.16-7-c-i-22",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-i-22.js",
+ "description": "Array.prototype.every - element to be retrieved is inherited accessor property without a get function on an Array",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n\n function callbackfn(val, idx, obj) {\n accessed = true;\n return typeof val === \"undefined\";\n }\n\n try {\n Object.defineProperty(Array.prototype, \"0\", {\n set: function () { },\n configurable: true\n });\n\n return [, ].every(callbackfn) && accessed;\n } finally {\n delete Array.prototype[0];\n }\n\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.every) && fnExists(Object.defineProperty) && ![, 1].hasOwnProperty(0) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.4.4.16-7-c-i-23",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-i-23.js",
+ "description": "Array.prototype.every - This object is an global object which contains index property",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(val, idx, obj) {\n if (idx === 0) {\n return val !== 11;\n } else {\n return true;\n }\n }\n\n try {\n var oldLen = fnGlobalObject().length;\n fnGlobalObject()[0] = 11;\n fnGlobalObject().length = 1;\n return !Array.prototype.every.call(fnGlobalObject(), callbackfn);\n } finally {\n delete fnGlobalObject()[0];\n fnGlobalObject().length = oldLen;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.every))"
+ },
+ {
+ "id": "15.4.4.16-7-c-i-25",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-i-25.js",
+ "description": "Array.prototype.every - This object is the Arguments object which implements its own property get method (number of arguments is less than number of parameters)",
+ "test": "assertTrue((function testcase() {\n\n var called = 0;\n\n function callbackfn(val, idx, obj) {\n called++;\n return val === 11;\n }\n\n var func = function (a, b) {\n return Array.prototype.every.call(arguments, callbackfn);\n };\n\n return func(11) && called === 1;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.every))"
+ },
+ {
+ "id": "15.4.4.16-7-c-i-26",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-i-26.js",
+ "description": "Array.prototype.every - This object is the Arguments object which implements its own property get method (number of arguments equals number of parameters)",
+ "test": "assertTrue((function testcase() {\n\n var called = 0;\n\n function callbackfn(val, idx, obj) {\n called++;\n if (idx === 0) {\n return val === 11;\n } else if (idx === 1) {\n return val === 9;\n } else {\n return false;\n }\n }\n\n var func = function (a, b) {\n return Array.prototype.every.call(arguments, callbackfn);\n };\n\n return func(11, 9) && called === 2;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.every))"
+ },
+ {
+ "id": "15.4.4.16-7-c-i-27",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-i-27.js",
+ "description": "Array.prototype.every - This object is the Arguments object which implements its own property get method (number of arguments is greater than number of parameters)",
+ "test": "assertTrue((function testcase() {\n\n var called = 0;\n\n function callbackfn(val, idx, obj) {\n called++;\n if (idx < 2) {\n return val > 10;\n } else if (idx === 2) {\n return val < 10;\n } else {\n return false;\n }\n }\n\n var func = function (a, b) {\n return Array.prototype.every.call(arguments, callbackfn);\n };\n\n return func(11, 12, 9) && called === 3;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.every))"
+ },
+ {
+ "id": "15.4.4.16-7-c-i-28",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-i-28.js",
+ "description": "Array.prototype.every - element changed by getter on previous iterations is observed on an Array",
+ "test": "assertTrue((function testcase() {\n\n var preIterVisible = false;\n var arr = [];\n\n function callbackfn(val, idx, obj) {\n return val > 10;\n }\n\n Object.defineProperty(arr, \"0\", {\n get: function () {\n preIterVisible = true;\n return 11;\n },\n configurable: true\n });\n\n Object.defineProperty(arr, \"1\", {\n get: function () {\n if (preIterVisible) {\n return 9;\n } else {\n return 11;\n }\n },\n configurable: true\n });\n\n return !arr.every(callbackfn);\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.every) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.4.4.16-7-c-i-29",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-i-29.js",
+ "description": "Array.prototype.every - element changed by getter on previous iterations is observed on an Array-like object",
+ "test": "assertTrue((function testcase() {\n function callbackfn(val, idx, obj) {\n return val > 10;\n }\n\n var preIterVisible = false;\n var obj = { length: 2 };\n\n Object.defineProperty(obj, \"0\", {\n get: function () {\n preIterVisible = true;\n return 11;\n },\n configurable: true\n });\n\n Object.defineProperty(obj, \"1\", {\n get: function () {\n if (preIterVisible) {\n return 9;\n } else {\n return 13;\n }\n },\n configurable: true\n });\n\n return !Array.prototype.every.call(obj, callbackfn);\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.every) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects())"
+ },
+ {
+ "id": "15.4.4.16-7-c-i-3",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-i-3.js",
+ "description": "Array.prototype.every - element to be retrieved is own data property that overrides an inherited data property on an Array",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(val, idx, obj) {\n if (idx === 5) {\n return val === 100;\n } else {\n return true;\n }\n }\n\n var proto = { 0: 11, 5: 100 };\n\n var Con = function () { };\n Con.prototype = proto;\n\n var child = new Con();\n child[5] = \"abc\";\n child.length = 10;\n\n return !Array.prototype.every.call(child, callbackfn);\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.every))"
+ },
+ {
+ "id": "15.4.4.16-7-c-i-30",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-i-30.js",
+ "description": "Array.prototype.every - unnhandled exceptions happened in getter terminate iteration on an Array-like object",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n function callbackfn(val, idx, obj) {\n if (idx > 1) {\n accessed = true;\n }\n return true;\n }\n\n var obj = { 0: 11, 5: 10, 10: 8, length: 20 };\n Object.defineProperty(obj, \"1\", {\n get: function () {\n throw new RangeError(\"unhandle exception happened in getter\");\n },\n configurable: true\n });\n\n try {\n Array.prototype.every.call(obj, callbackfn);\n return false;\n } catch (ex) {\n return (ex instanceof RangeError) && !accessed;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.every) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects())"
+ },
+ {
+ "id": "15.4.4.16-7-c-i-31",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-i-31.js",
+ "description": "Array.prototype.every - unhandled exceptions happened in getter terminate iteration on an Array",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n function callbackfn(val, idx, obj) {\n if (idx > 1) {\n accessed = true;\n }\n return true;\n }\n\n var arr = [];\n arr[5] = 10;\n arr[10] = 100;\n\n Object.defineProperty(arr, \"1\", {\n get: function () {\n throw new RangeError(\"unhandle exception happened in getter\");\n },\n configurable: true\n });\n\n try {\n arr.every(callbackfn);\n return false;\n } catch (ex) {\n return (ex instanceof RangeError) && !accessed;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.every) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.4.4.16-7-c-i-4",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-i-4.js",
+ "description": "Array.prototype.every - element to be retrieved is own data property that overrides an inherited data property on an Array",
+ "test": "assertTrue((function testcase() {\n var called = 0;\n function callbackfn(val, idx, obj) {\n called++;\n return val === 12;\n }\n\n try {\n Array.prototype[0] = 11;\n Array.prototype[1] = 11;\n\n return [12, 12].every(callbackfn) && called === 2;\n } finally {\n delete Array.prototype[0];\n delete Array.prototype[1];\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.every))"
+ },
+ {
+ "id": "15.4.4.16-7-c-i-5",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-i-5.js",
+ "description": "Array.prototype.every - element to be retrieved is own data property that overrides an inherited accessor property on an Array-like object",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(val, idx, obj) {\n if (idx === 0) {\n return val === 5;\n } else {\n return true;\n }\n }\n\n var proto = {};\n\n Object.defineProperty(proto, \"0\", {\n get: function () {\n return 5;\n },\n configurable: true\n });\n\n var Con = function () { };\n Con.prototype = proto;\n\n var child = new Con();\n child.length = 2;\n Object.defineProperty(child, \"0\", {\n value: 11,\n configurable: true\n });\n child[1] = 12;\n\n return !Array.prototype.every.call(child, callbackfn);\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.every) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects())"
+ },
+ {
+ "id": "15.4.4.16-7-c-i-6",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-i-6.js",
+ "description": "Array.prototype.every - element to be retrieved is own data property that overrides an inherited accessor property on an Array",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n\n function callbackfn(val, idx, obj) {\n accessed = true;\n return val === 11;\n }\n\n try {\n Object.defineProperty(Array.prototype, \"0\", {\n get: function () {\n return 9;\n },\n configurable: true\n });\n return [11].every(callbackfn) && accessed;\n } finally {\n delete Array.prototype[0];\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.every) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.4.4.16-7-c-i-7",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-i-7.js",
+ "description": "Array.prototype.every - element to be retrieved is inherited data property on an Array-like object",
+ "test": "assertTrue((function testcase() {\n\n var kValue = 'abc';\n\n function callbackfn(val, idx, obj) {\n if (idx === 5) {\n return val !== kValue;\n } else {\n return true;\n }\n }\n\n var proto = { 5: kValue };\n\n var Con = function () { };\n Con.prototype = proto;\n\n var child = new Con();\n child.length = 10;\n\n return !Array.prototype.every.call(child, callbackfn);\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.every))"
+ },
+ {
+ "id": "15.4.4.16-7-c-i-8",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-i-8.js",
+ "description": "Array.prototype.every - element to be retrieved is inherited data property on an Array",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(val, idx, obj) {\n if (idx === 1) {\n return val !== 13;\n } else {\n return true;\n }\n }\n\n try {\n Array.prototype[1] = 13;\n return ![, , , ].every(callbackfn);\n } finally {\n delete Array.prototype[1];\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.every) && ![, 1].hasOwnProperty(0))"
+ },
+ {
+ "id": "15.4.4.16-7-c-i-9",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-i-9.js",
+ "description": "Array.prototype.every - element to be retrieved is own accessor property on an Array-like object",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(val, idx, obj) {\n if (idx === 0) {\n return val !== 11;\n } else {\n return true;\n }\n }\n\n var obj = { 10: 10, length: 20 };\n\n Object.defineProperty(obj, \"0\", {\n get: function () {\n return 11;\n },\n configurable: true\n });\n \n return !Array.prototype.every.call(obj, callbackfn);\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.every) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects())"
+ },
+ {
+ "id": "15.4.4.16-7-c-ii-1",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-ii-1.js",
+ "description": "Array.prototype.every - callbackfn called with correct parameters",
+ "test": "assertTrue((function testcase() { \n \n function callbackfn(val, Idx, obj)\n {\n if(obj[Idx] === val)\n return true;\n }\n\n var arr = [0,1,2,3,4,5,6,7,8,9];\n \n if(arr.every(callbackfn) === true)\n return true;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.every))"
+ },
+ {
+ "id": "15.4.4.16-7-c-ii-10",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-ii-10.js",
+ "description": "Array.prototype.every - callbackfn is called with 1 formal parameter",
+ "test": "assertTrue((function testcase() {\n\n var called = 0;\n\n function callbackfn(val) {\n called++;\n return val > 10;\n }\n\n return [11, 12].every(callbackfn) && 2 === called;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.every))"
+ },
+ {
+ "id": "15.4.4.16-7-c-ii-11",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-ii-11.js",
+ "description": "Array.prototype.every - callbackfn is called with 2 formal parameter",
+ "test": "assertTrue((function testcase() {\n\n var called = 0;\n\n function callbackfn(val, idx) {\n called++;\n return val > 10 && arguments[2][idx] === val;\n }\n\n return [11, 12].every(callbackfn) && 2 === called;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.every))"
+ },
+ {
+ "id": "15.4.4.16-7-c-ii-12",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-ii-12.js",
+ "description": "Array.prototype.every - callbackfn is called with 3 formal parameter",
+ "test": "assertTrue((function testcase() {\n\n var called = 0;\n\n function callbackfn(val, idx, obj) {\n called++;\n return val > 10 && obj[idx] === val;\n }\n\n return [11, 12, 13].every(callbackfn) && 3 === called;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.every))"
+ },
+ {
+ "id": "15.4.4.16-7-c-ii-13",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-ii-13.js",
+ "description": "Array.prototype.every - callbackfn that uses arguments object to get parameter value",
+ "test": "assertTrue((function testcase() {\n\n var called = 0;\n\n function callbackfn() {\n called++;\n return arguments[2][arguments[1]] === arguments[0];\n }\n\n return [11, 12].every(callbackfn) && 2 === called;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.every))"
+ },
+ {
+ "id": "15.4.4.16-7-c-ii-16",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-ii-16.js",
+ "description": "Array.prototype.every - 'this' of 'callbackfn' is a Boolean object when T is not an object (T is a boolean primitive)",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n\n function callbackfn(val, idx, obj) {\n accessed = true;\n return this.valueOf() !== false;\n }\n\n var obj = { 0: 11, length: 2 };\n\n return !Array.prototype.every.call(obj, callbackfn, false) && accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.every))"
+ },
+ {
+ "id": "15.4.4.16-7-c-ii-17",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-ii-17.js",
+ "description": "Array.prototype.every -'this' of 'callbackfn' is a Number object when T is not an object (T is a number primitive)",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n\n function callbackfn(val, idx, o) {\n accessed = true;\n return 5 === this.valueOf();\n }\n\n var obj = { 0: 11, length: 2 };\n\n return Array.prototype.every.call(obj, callbackfn, 5) && accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.every))"
+ },
+ {
+ "id": "15.4.4.16-7-c-ii-18",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-ii-18.js",
+ "description": "Array.prototype.every - 'this' of 'callbackfn' is an String object when T is not an object (T is a string primitive)",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n\n function callbackfn(val, idx, obj) {\n accessed = true;\n return 'hello' === this.valueOf();\n }\n\n var obj = { 0: 11, length: 2 };\n\n return Array.prototype.every.call(obj, callbackfn, \"hello\") && accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.every))"
+ },
+ {
+ "id": "15.4.4.16-7-c-ii-19",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-ii-19.js",
+ "description": "Array.prototype.every - non-indexed properties are not called",
+ "test": "assertTrue((function testcase() {\n\n var called = 0;\n\n function callbackfn(val, idx, obj) {\n called++;\n return val !== 8;\n }\n\n var obj = { 0: 11, 10: 12, non_index_property: 8, length: 20 };\n\n return Array.prototype.every.call(obj, callbackfn) && 2 === called;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.every))"
+ },
+ {
+ "id": "15.4.4.16-7-c-ii-2",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-ii-2.js",
+ "description": "Array.prototype.every - callbackfn takes 3 arguments",
+ "test": "assertTrue((function testcase() { \n \n function callbackfn(val, Idx, obj)\n {\n if(arguments.length === 3) //verify if callbackfn was called with 3 parameters\n return true;\n }\n\n var arr = [0,1,true,null,new Object(),\"five\"];\n arr[999999] = -6.6;\n \n if(arr.every(callbackfn) === true)\n return true;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.every))"
+ },
+ {
+ "id": "15.4.4.16-7-c-ii-20",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-ii-20.js",
+ "description": "Array.prototype.every - callbackfn called with correct parameters (thisArg is correct)",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n\n function callbackfn(val, idx, obj) {\n accessed = true;\n return 10 === this.threshold;\n }\n\n var thisArg = { threshold: 10 };\n\n var obj = { 0: 11, length: 1 };\n\n return Array.prototype.every.call(obj, callbackfn, thisArg);\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.every))"
+ },
+ {
+ "id": "15.4.4.16-7-c-ii-21",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-ii-21.js",
+ "description": "Array.prototype.every - callbackfn called with correct parameters (kValue is correct)",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n\n function callbackfn(val, idx, obj) {\n accessed = true;\n if (idx === 0) {\n return val === 11;\n }\n\n if (idx === 1) {\n return val === 12;\n }\n\n }\n\n var obj = { 0: 11, 1: 12, length: 2 };\n\n return Array.prototype.every.call(obj, callbackfn) && accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.every))"
+ },
+ {
+ "id": "15.4.4.16-7-c-ii-22",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-ii-22.js",
+ "description": "Array.prototype.every - callbackfn called with correct parameters (the index k is correct)",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n\n function callbackfn(val, idx, obj) {\n accessed = true;\n if (val === 11) {\n return idx === 0;\n }\n\n if (val === 12) {\n return idx === 1;\n }\n\n }\n\n var obj = { 0: 11, 1: 12, length: 2 };\n\n return Array.prototype.every.call(obj, callbackfn) && accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.every))"
+ },
+ {
+ "id": "15.4.4.16-7-c-ii-23",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-ii-23.js",
+ "description": "Array.prototype.every - callbackfn called with correct parameters (this object O is correct)",
+ "test": "assertTrue((function testcase() {\n\n var called = 0;\n var obj = { 0: 11, 1: 12, length: 2 };\n\n function callbackfn(val, idx, o) {\n called++;\n return obj === o;\n }\n\n return Array.prototype.every.call(obj, callbackfn) && 2 === called;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.every))"
+ },
+ {
+ "id": "15.4.4.16-7-c-ii-3",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-ii-3.js",
+ "description": "Array.prototype.every immediately returns false if callbackfn returns false",
+ "test": "assertTrue((function testcase() { \n \n var callCnt = 0;\n function callbackfn(val, idx, obj)\n {\n callCnt++;\n if(idx > 5) \n return false;\n else\n return true;\n }\n\n var arr = [0,1,2,3,4,5,6,7,8,9];\n \n if(arr.every(callbackfn) === false && callCnt === 7) \n return true;\n\n\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.every))"
+ },
+ {
+ "id": "15.4.4.16-7-c-ii-4",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-ii-4.js",
+ "description": "Array.prototype.every - k values are passed in ascending numeric order",
+ "test": "assertTrue((function testcase() {\n\n var arr = [0, 1, 2, 3, 4, 5];\n var lastIdx = 0;\n var called = 0;\n function callbackfn(val, idx, o) {\n called++;\n if (lastIdx !== idx) {\n return false;\n } else {\n lastIdx++;\n return true;\n }\n }\n\n return arr.every(callbackfn) && arr.length === called;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.every))"
+ },
+ {
+ "id": "15.4.4.16-7-c-ii-5",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-ii-5.js",
+ "description": "Array.prototype.every - k values are accessed during each iteration and not prior to starting the loop on an Array",
+ "test": "assertTrue((function testcase() {\n var called = 0;\n var kIndex = [];\n\n //By below way, we could verify that k would be setted as 0, 1, ..., length - 1 in order, and each value will be setted one time.\n function callbackfn(val, idx, obj) {\n called++;\n //Each position should be visited one time, which means k is accessed one time during iterations.\n if (typeof kIndex[idx] === \"undefined\") {\n //when current position is visited, its previous index should has been visited.\n if (idx !== 0 && typeof kIndex[idx - 1] === \"undefined\") {\n return false;\n }\n kIndex[idx] = 1;\n return true;\n } else {\n return false;\n }\n }\n\n return [11, 12, 13, 14].every(callbackfn, undefined) && 4 === called;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.every))"
+ },
+ {
+ "id": "15.4.4.16-7-c-ii-6",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-ii-6.js",
+ "description": "Array.prototype.every - arguments to callbackfn are self consistent",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n var thisArg = {};\n var obj = { 0: 11, length: 1 };\n\n function callbackfn() {\n accessed = true;\n return this === thisArg &&\n arguments[0] === 11 &&\n arguments[1] === 0 &&\n arguments[2] === obj;\n }\n\n return Array.prototype.every.call(obj, callbackfn, thisArg) && accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.every))"
+ },
+ {
+ "id": "15.4.4.16-7-c-ii-7",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-ii-7.js",
+ "description": "Array.prototype.every - unhandled exceptions happened in callbackfn terminate iteration",
+ "test": "assertTrue((function testcase() {\n\n var called = 0;\n\n function callbackfn(val, idx, obj) {\n called++;\n if (called === 1) {\n throw new Error(\"Exception occurred in callbackfn\");\n }\n return true;\n }\n\n var obj = { 0: 11, 4: 10, 10: 8, length: 20 };\n\n try {\n Array.prototype.every.call(obj, callbackfn);\n return false;\n } catch (ex) {\n return 1 === called;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.every))"
+ },
+ {
+ "id": "15.4.4.16-7-c-ii-8",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-ii-8.js",
+ "description": "Array.prototype.every - element changed by callbackfn on previous iterations is observed",
+ "test": "assertTrue((function testcase() {\n\n var obj = { 0: 11, 1: 12, length: 2 };\n\n function callbackfn(val, idx, o) {\n if (idx === 0) {\n obj[idx + 1] = 8;\n }\n return val > 10;\n }\n\n \n\n return !Array.prototype.every.call(obj, callbackfn);\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.every))"
+ },
+ {
+ "id": "15.4.4.16-7-c-ii-9",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-ii-9.js",
+ "description": "Array.prototype.every - callbackfn is called with 0 formal parameter",
+ "test": "assertTrue((function testcase() {\n\n var called = 0;\n\n function callbackfn() {\n called++;\n return true;\n }\n\n return [11, 12].every(callbackfn) && 2 === called;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.every))"
+ },
+ {
+ "id": "15.4.4.16-7-c-iii-1",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-1.js",
+ "description": "Array.prototype.every - return value of callbackfn is undefined",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n var obj = { 0: 11, length: 1 };\n\n function callbackfn(val, idx, o) {\n accessed = true;\n return undefined;\n }\n\n \n\n return !Array.prototype.every.call(obj, callbackfn) && accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.every))"
+ },
+ {
+ "id": "15.4.4.16-7-c-iii-10",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-10.js",
+ "description": "Array.prototype.every - return value of callbackfn is a number (value is Infinity)",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n\n function callbackfn(val, idx, obj) {\n accessed = true;\n return Infinity;\n }\n\n return [11].every(callbackfn) && accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.every))"
+ },
+ {
+ "id": "15.4.4.16-7-c-iii-11",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-11.js",
+ "description": "Array.prototype.every - return value of callbackfn is a number (value is -Infinity)",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n\n function callbackfn(val, idx, obj) {\n accessed = true;\n return -Infinity;\n }\n\n return [11].every(callbackfn) && accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.every))"
+ },
+ {
+ "id": "15.4.4.16-7-c-iii-12",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-12.js",
+ "description": "Array.prototype.every - return value of callbackfn is a number (value is NaN)",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n\n function callbackfn(val, idx, obj) {\n accessed = true;\n return NaN;\n }\n\n return ![11].every(callbackfn) && accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.every))"
+ },
+ {
+ "id": "15.4.4.16-7-c-iii-13",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-13.js",
+ "description": "Array.prototype.every - return value of callbackfn is an empty string",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n\n function callbackfn(val, idx, obj) {\n accessed = true;\n return \"\";\n }\n\n return ![11].every(callbackfn) && accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.every))"
+ },
+ {
+ "id": "15.4.4.16-7-c-iii-14",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-14.js",
+ "description": "Array.prototype.every - return value of callbackfn is a non-empty string",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n\n function callbackfn(val, idx, obj) {\n accessed = true;\n return \"non-empty string\";\n }\n\n return [11].every(callbackfn) && accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.every))"
+ },
+ {
+ "id": "15.4.4.16-7-c-iii-15",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-15.js",
+ "description": "Array.prototype.every - return value of callbackfn is a Function object",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n\n function callbackfn(val, idx, obj) {\n accessed = true;\n return function () { };\n }\n\n return [11].every(callbackfn) && accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.every))"
+ },
+ {
+ "id": "15.4.4.16-7-c-iii-16",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-16.js",
+ "description": "Array.prototype.every - return value of callbackfn is an Array object",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n\n function callbackfn(val, idx, obj) {\n accessed = true;\n return [];\n }\n\n return [11].every(callbackfn) && accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.every))"
+ },
+ {
+ "id": "15.4.4.16-7-c-iii-17",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-17.js",
+ "description": "Array.prototype.every - return value of callbackfn is a String object",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n\n function callbackfn(val, idx, obj) {\n accessed = true;\n return new String();\n }\n\n return [11].every(callbackfn) && accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.every))"
+ },
+ {
+ "id": "15.4.4.16-7-c-iii-18",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-18.js",
+ "description": "Array.prototype.every - return value of callbackfn is a Boolean object",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n\n function callbackfn(val, idx, obj) {\n accessed = true;\n return new Boolean();\n }\n\n return [11].every(callbackfn) && accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.every))"
+ },
+ {
+ "id": "15.4.4.16-7-c-iii-19",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-19.js",
+ "description": "Array.prototype.every - return value of callbackfn is a Number object",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n\n function callbackfn(val, idx, obj) {\n accessed = true;\n return new Number();\n }\n\n return [11].every(callbackfn) && accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.every))"
+ },
+ {
+ "id": "15.4.4.16-7-c-iii-2",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-2.js",
+ "description": "Array.prototype.every - return value of callbackfn is null",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n var obj = { 0: 11, length: 1 };\n\n function callbackfn(val, idx, obj) {\n accessed = true;\n return null;\n }\n\n \n\n return !Array.prototype.every.call(obj, callbackfn) && accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.every))"
+ },
+ {
+ "id": "15.4.4.16-7-c-iii-20",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-20.js",
+ "description": "Array.prototype.every - return value of callbackfn is the Math object",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n\n function callbackfn(val, idx, obj) {\n accessed = true;\n return Math;\n }\n\n return [11].every(callbackfn) && accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.every))"
+ },
+ {
+ "id": "15.4.4.16-7-c-iii-21",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-21.js",
+ "description": "Array.prototype.every - return value of callbackfn is a Date object",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n\n function callbackfn(val, idx, obj) {\n accessed = true;\n return new Date();\n }\n\n return [11].every(callbackfn) && accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.every))"
+ },
+ {
+ "id": "15.4.4.16-7-c-iii-22",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-22.js",
+ "description": "Array.prototype.every - return value of callbackfn is a RegExp object",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n\n function callbackfn(val, idx, obj) {\n accessed = true;\n return new RegExp();\n }\n\n return [11].every(callbackfn) && accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.every))"
+ },
+ {
+ "id": "15.4.4.16-7-c-iii-23",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-23.js",
+ "description": "Array.prototype.every - return value of callbackfn is the JSON object",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n\n function callbackfn(val, idx, obj) {\n accessed = true;\n return JSON;\n }\n\n return [11].every(callbackfn) && accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.every))"
+ },
+ {
+ "id": "15.4.4.16-7-c-iii-24",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-24.js",
+ "description": "Array.prototype.every - return value of callbackfn is an Error object",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n\n function callbackfn(val, idx, obj) {\n accessed = true;\n return new EvalError();\n }\n\n return [11].every(callbackfn) && accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.every))"
+ },
+ {
+ "id": "15.4.4.16-7-c-iii-25",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-25.js",
+ "description": "Array.prototype.every - return value of callbackfn is the Arguments object",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n\n function callbackfn(val, idx, obj) {\n accessed = true;\n return arguments;\n }\n\n return [11].every(callbackfn) && accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.every))"
+ },
+ {
+ "id": "15.4.4.16-7-c-iii-27",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-27.js",
+ "description": "Array.prototype.every - return value of callbackfn is the global object",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n\n function callbackfn(val, idx, obj) {\n accessed = true;\n return fnGlobalObject();\n }\n\n return [11].every(callbackfn) && accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.every))"
+ },
+ {
+ "id": "15.4.4.16-7-c-iii-28",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-28.js",
+ "description": "Array.prototype.every - false prevents further side effects",
+ "test": "assertTrue((function testcase() {\n\n var result = false;\n var obj = { length: 20 };\n\n function callbackfn(val, idx, obj) {\n if (idx > 1) {\n result = true;\n }\n return val > 10;\n }\n\n Object.defineProperty(obj, \"0\", {\n get: function () {\n return 11;\n },\n configurable: true\n });\n\n Object.defineProperty(obj, \"1\", {\n get: function () {\n return 8;\n },\n configurable: true\n });\n\n Object.defineProperty(obj, \"2\", {\n get: function () {\n result = true;\n return 8;\n },\n configurable: true\n });\n\n return !Array.prototype.every.call(obj, callbackfn) && !result;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.every) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects())"
+ },
+ {
+ "id": "15.4.4.16-7-c-iii-29",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-29.js",
+ "description": "Array.prototype.every - return value (new Boolean(false)) of callbackfn is treated as true value",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n\n function callbackfn(val, idx, obj) {\n accessed = true;\n return new Boolean(false);\n }\n\n return [11].every(callbackfn) && accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.every))"
+ },
+ {
+ "id": "15.4.4.16-7-c-iii-3",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-3.js",
+ "description": "Array.prototype.every - return value of callbackfn is a boolean (value is false)",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n var obj = { 0: 11, length: 1 };\n\n function callbackfn(val, idx, obj) {\n accessed = true;\n return false;\n }\n\n return !Array.prototype.every.call(obj, callbackfn) && accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.every))"
+ },
+ {
+ "id": "15.4.4.16-7-c-iii-4",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-4.js",
+ "description": "Array.prototype.every - return value of callbackfn is a boolean (value is true)",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n var obj = { 0: 11, length: 1 };\n\n function callbackfn(val, idx, obj) {\n accessed = true;\n return true;\n }\n\n \n\n return Array.prototype.every.call(obj, callbackfn) && accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.every))"
+ },
+ {
+ "id": "15.4.4.16-7-c-iii-5",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-5.js",
+ "description": "Array.prototype.every - return value of callbackfn is a number (value is 0)",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n\n function callbackfn(val, idx, obj) {\n accessed = true;\n return 0;\n }\n\n return ![11].every(callbackfn) && accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.every))"
+ },
+ {
+ "id": "15.4.4.16-7-c-iii-6",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-6.js",
+ "description": "Array.prototype.every - return value of callbackfn is a number (value is +0)",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n\n function callbackfn(val, idx, obj) {\n accessed = true;\n return +0;\n }\n\n return ![11].every(callbackfn) && accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.every))"
+ },
+ {
+ "id": "15.4.4.16-7-c-iii-7",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-7.js",
+ "description": "Array.prototype.every - return value of callbackfn is a nunmber (value is -0)",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n\n function callbackfn(val, idx, obj) {\n accessed = true;\n return -0;\n }\n\n return ![11].every(callbackfn) && accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.every))"
+ },
+ {
+ "id": "15.4.4.16-7-c-iii-8",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-8.js",
+ "description": "Array.prototype.every - return value of callbackfn is a number (value is positive number)",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n\n function callbackfn(val, idx, obj) {\n accessed = true;\n return 5;\n }\n\n return [11].every(callbackfn) && accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.every))"
+ },
+ {
+ "id": "15.4.4.16-7-c-iii-9",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-7-c-iii-9.js",
+ "description": "Array.prototype.every - return value of callbackfn is a number (value is negative number)",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n\n function callbackfn(val, idx, obj) {\n accessed = true;\n return -5;\n }\n\n return [11].every(callbackfn) && accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.every))"
+ },
+ {
+ "id": "15.4.4.16-8-1",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-8-1.js",
+ "description": "Array.prototype.every returns true if 'length' is 0 (empty array)",
+ "test": "assertTrue((function testcase() {\n function cb() {}\n var i = [].every(cb);\n if (i === true) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.every))"
+ },
+ {
+ "id": "15.4.4.16-8-10",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-8-10.js",
+ "description": "Array.prototype.every - subclassed array when length is reduced",
+ "test": "assertTrue((function testcase() {\n foo.prototype = new Array(1, 2, 3);\n function foo() {}\n var f = new foo();\n f.length = 2;\n \n function cb(val)\n {\n if(val>2)\n return false;\n else\n return true; \n }\n var i = f.every(cb);\n \n if (i === true) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.every))"
+ },
+ {
+ "id": "15.4.4.16-8-11",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-8-11.js",
+ "description": "Array.prototype.every returns true when all calls to callbackfn return true",
+ "test": "assertTrue((function testcase() { \n \n var callCnt = 0;\n function callbackfn(val, idx, obj)\n {\n callCnt++;\n return true;\n }\n\n var arr = [0,1,2,3,4,5,6,7,8,9];\n \n if(arr.every(callbackfn) === true && callCnt === 10) \n return true;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.every))"
+ },
+ {
+ "id": "15.4.4.16-8-12",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-8-12.js",
+ "description": "Array.prototype.every doesn't mutate the array on which it is called on",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(val, idx, obj)\n {\n return true;\n }\n var arr = [1,2,3,4,5];\n arr.every(callbackfn);\n if(arr[0] === 1 &&\n arr[1] === 2 &&\n arr[2] === 3 &&\n arr[3] === 4 &&\n arr[4] === 5)\n {\n return true;\n }\n\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.every))"
+ },
+ {
+ "id": "15.4.4.16-8-13",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-8-13.js",
+ "description": "Array.prototype.every doesn't visit expandos",
+ "test": "assertTrue((function testcase() { \n \n var callCnt = 0;\n function callbackfn(val, idx, obj)\n {\n callCnt++;\n return true;\n }\n\n var arr = [0,1,2,3,4,5,6,7,8,9];\n arr[\"i\"] = 10;\n arr[true] = 11;\n \n if(arr.every(callbackfn) === true && callCnt === 10) \n return true;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.every))"
+ },
+ {
+ "id": "15.4.4.16-8-2",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-8-2.js",
+ "description": "Array.prototype.every returns true if 'length' is 0 (subclassed Array, length overridden to null (type conversion))",
+ "test": "assertTrue((function testcase() {\n foo.prototype = new Array(1, 2, 3);\n function foo() {}\n var f = new foo();\n f.length = null;\n \n function cb(){}\n var i = f.every(cb);\n \n if (i === true) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.every))"
+ },
+ {
+ "id": "15.4.4.16-8-3",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-8-3.js",
+ "description": "Array.prototype.every returns true if 'length' is 0 (subclassed Array, length overridden to false (type conversion))",
+ "test": "assertTrue((function testcase() {\n foo.prototype = new Array(1, 2, 3);\n function foo() {}\n var f = new foo();\n f.length = false;\n\n function cb(){}\n var i = f.every(cb);\n \n if (i === true) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.every))"
+ },
+ {
+ "id": "15.4.4.16-8-4",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-8-4.js",
+ "description": "Array.prototype.every returns true if 'length' is 0 (subclassed Array, length overridden to 0 (type conversion))",
+ "test": "assertTrue((function testcase() {\n foo.prototype = new Array(1, 2, 3);\n function foo() {}\n var f = new foo();\n f.length = 0;\n\n function cb(){}\n var i = f.every(cb);\n \n if (i === true) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.every))"
+ },
+ {
+ "id": "15.4.4.16-8-5",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-8-5.js",
+ "description": "Array.prototype.every returns true if 'length' is 0 (subclassed Array, length overridden to '0' (type conversion))",
+ "test": "assertTrue((function testcase() {\n foo.prototype = new Array(1, 2, 3);\n function foo() {}\n var f = new foo();\n f.length = '0';\n \n function cb(){}\n var i = f.every(cb);\n \n if (i === true) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.every))"
+ },
+ {
+ "id": "15.4.4.16-8-6",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-8-6.js",
+ "description": "Array.prototype.every returns true if 'length' is 0 (subclassed Array, length overridden with obj with valueOf)",
+ "test": "assertTrue((function testcase() {\n foo.prototype = new Array(1, 2, 3);\n function foo() {}\n var f = new foo();\n \n var o = { valueOf: function () { return 0;}};\n f.length = o;\n \n function cb(){}\n var i = f.every(cb);\n \n if (i === true) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.every))"
+ },
+ {
+ "id": "15.4.4.16-8-7",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-8-7.js",
+ "description": "Array.prototype.every returns true if 'length' is 0 (subclassed Array, length overridden with obj w/o valueOf (toString))",
+ "test": "assertTrue((function testcase() {\n foo.prototype = new Array(1, 2, 3);\n function foo() {}\n var f = new foo();\n \n var o = { toString: function () { return '0';}};\n f.length = o;\n \n // objects inherit the default valueOf method of the Object object;\n // that simply returns the itself. Since the default valueOf() method\n // does not return a primitive value, ES next tries to convert the object\n // to a number by calling its toString() method and converting the\n // resulting string to a number.\n function cb(){}\n var i = f.every(cb);\n \n if (i === true) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.every))"
+ },
+ {
+ "id": "15.4.4.16-8-8",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.16/15.4.4.16-8-8.js",
+ "description": "Array.prototype.every returns true if 'length' is 0 (subclassed Array, length overridden with []",
+ "test": "assertTrue((function testcase() {\n foo.prototype = new Array(1, 2, 3);\n function foo() {}\n var f = new foo();\n \n f.length = [];\n \n // objects inherit the default valueOf method of the Object object;\n // that simply returns the itself. Since the default valueOf() method\n // does not return a primitive value, ES next tries to convert the object\n // to a number by calling its toString() method and converting the\n // resulting string to a number.\n //\n // The toString( ) method on Array converts the array elements to strings,\n // then returns the result of concatenating these strings, with commas in\n // between. An array with no elements converts to the empty string, which\n // converts to the number 0. If an array has a single element that is a\n // number n, the array converts to a string representation of n, which is\n // then converted back to n itself. If an array contains more than one element,\n // or if its one element is not a number, the array converts to NaN.\n\n function cb(){}\n var i = f.every(cb);\n \n if (i === true) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.every))"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.4.4.17.json b/website/resources/scripts/testcases2/15.4.4.17.json
new file mode 100644
index 000000000..0d8bfd0e2
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.4.4.17.json
@@ -0,0 +1,1506 @@
+{
+ "testCollection": {
+ "name": "15.4.4.17",
+ "numTests": 214,
+ "tests": [
+ {
+ "id": "15.4.4.17-0-1",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-0-1.js",
+ "description": "Array.prototype.some must exist as a function",
+ "test": "assertTrue((function testcase() {\n var f = Array.prototype.some;\n if (typeof(f) === \"function\") {\n return true;\n }\n }).call(this));\n"
+ },
+ {
+ "id": "15.4.4.17-0-2",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-0-2.js",
+ "description": "Array.prototype.some.length must be 1",
+ "test": "assertTrue((Array.prototype.some.length === 1));\n",
+ "precondition": "(fnExists(Array.prototype.some))"
+ },
+ {
+ "id": "15.4.4.17-1-1",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-1-1.js",
+ "description": "Array.prototype.some applied to undefined throws a TypeError",
+ "test": "assertTrue((function testcase() {\n try {\n Array.prototype.some.call(undefined);\n return false;\n } catch (e) {\n return (e instanceof TypeError);\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.some))"
+ },
+ {
+ "id": "15.4.4.17-1-10",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-1-10.js",
+ "description": "Array.prototype.some applied to the Math object",
+ "test": "assertTrue((function testcase() {\n function callbackfn(val, idx, obj) {\n return '[object Math]' === Object.prototype.toString.call(obj);\n }\n\n try {\n Math.length = 1;\n Math[0] = 1;\n return Array.prototype.some.call(Math, callbackfn);\n } finally {\n delete Math[0];\n delete Math.length;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.some))"
+ },
+ {
+ "id": "15.4.4.17-1-11",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-1-11.js",
+ "description": "Array.prototype.some applied to Date object",
+ "test": "assertTrue((function testcase() {\n function callbackfn(val, idx, obj) {\n return obj instanceof Date;\n }\n\n var obj = new Date();\n obj.length = 2;\n obj[0] = 11;\n obj[1] = 9;\n\n return Array.prototype.some.call(obj, callbackfn);\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.some))"
+ },
+ {
+ "id": "15.4.4.17-1-12",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-1-12.js",
+ "description": "Array.prototype.some applied to RegExp object",
+ "test": "assertTrue((function testcase() {\n function callbackfn(val, idx, obj) {\n return obj instanceof RegExp;\n }\n\n var obj = new RegExp();\n obj.length = 2;\n obj[0] = 11;\n obj[1] = 9;\n\n return Array.prototype.some.call(obj, callbackfn);\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.some))"
+ },
+ {
+ "id": "15.4.4.17-1-13",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-1-13.js",
+ "description": "Array.prototype.some applied to the JSON object",
+ "test": "assertTrue((function testcase() {\n function callbackfn(val, idx, obj) {\n return '[object JSON]' === Object.prototype.toString.call(obj);\n }\n\n try {\n JSON.length = 1;\n JSON[0] = 1;\n return Array.prototype.some.call(JSON, callbackfn);\n } finally {\n delete JSON.length;\n delete JSON[0];\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.some))"
+ },
+ {
+ "id": "15.4.4.17-1-14",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-1-14.js",
+ "description": "Array.prototype.some applied to Error object",
+ "test": "assertTrue((function testcase() {\n function callbackfn(val, idx, obj) {\n return obj instanceof Error;\n }\n\n var obj = new Error();\n obj.length = 1;\n obj[0] = 1;\n\n return Array.prototype.some.call(obj, callbackfn);\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.some))"
+ },
+ {
+ "id": "15.4.4.17-1-15",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-1-15.js",
+ "description": "Array.prototype.some applied to the Arguments object",
+ "test": "assertTrue((function testcase() {\n function callbackfn(val, idx, obj) {\n return '[object Arguments]' === Object.prototype.toString.call(obj);\n }\n\n var obj = (function () {\n return arguments;\n }(\"a\", \"b\"));\n\n return Array.prototype.some.call(obj, callbackfn);\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.some))"
+ },
+ {
+ "id": "15.4.4.17-1-2",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-1-2.js",
+ "description": "Array.prototype.some applied to null throws a TypeError",
+ "test": "assertTrue((function testcase() {\n try {\n Array.prototype.some.call(null);\n return false;\n } catch (e) {\n return (e instanceof TypeError);\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.some))"
+ },
+ {
+ "id": "15.4.4.17-1-3",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-1-3.js",
+ "description": "Array.prototype.some applied to boolean primitive",
+ "test": "assertTrue((function testcase() {\n function callbackfn(val, idx, obj) {\n return obj instanceof Boolean;\n }\n\n try {\n Boolean.prototype[0] = 1;\n Boolean.prototype.length = 1;\n return Array.prototype.some.call(false, callbackfn);\n } finally {\n delete Boolean.prototype[0];\n delete Boolean.prototype.length;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.some))"
+ },
+ {
+ "id": "15.4.4.17-1-4",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-1-4.js",
+ "description": "Array.prototype.some applied to Boolean object",
+ "test": "assertTrue((function testcase() {\n function callbackfn(val, idx, obj) {\n return obj instanceof Boolean;\n }\n\n var obj = new Boolean(true);\n obj.length = 2;\n obj[0] = 11;\n obj[1] = 9;\n\n return Array.prototype.some.call(obj, callbackfn);\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.some))"
+ },
+ {
+ "id": "15.4.4.17-1-5",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-1-5.js",
+ "description": "Array.prototype.some applied to number primitive",
+ "test": "assertTrue((function testcase() {\n function callbackfn(val, idx, obj) {\n return obj instanceof Number;\n }\n\n try {\n Number.prototype[1] = true;\n Number.prototype.length = 2;\n\n return Array.prototype.some.call(5, callbackfn);\n } finally {\n delete Number.prototype[1];\n delete Number.prototype.length;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.some))"
+ },
+ {
+ "id": "15.4.4.17-1-6",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-1-6.js",
+ "description": "Array.prototype.some applied to Number object",
+ "test": "assertTrue((function testcase() {\n function callbackfn(val, idx, obj) {\n return obj instanceof Number;\n }\n\n var obj = new Number(-128);\n obj.length = 2;\n obj[0] = 11;\n obj[1] = 9;\n\n return Array.prototype.some.call(obj, callbackfn);\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.some))"
+ },
+ {
+ "id": "15.4.4.17-1-7",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-1-7.js",
+ "description": "Array.prototype.some applied to applied to string primitive",
+ "test": "assertTrue((function testcase() {\n function callbackfn(val, idx, obj) {\n return obj instanceof String;\n }\n\n return Array.prototype.some.call(\"hello\\nw_orld\\\\!\", callbackfn);\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.some))"
+ },
+ {
+ "id": "15.4.4.17-1-8",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-1-8.js",
+ "description": "Array.prototype.some applied to String object",
+ "test": "assertTrue((function testcase() {\n function callbackfn(val, idx, obj) {\n return obj instanceof String;\n }\n\n var obj = new String(\"hello\\nw_orld\\\\!\");\n return Array.prototype.some.call(obj, callbackfn);\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.some))"
+ },
+ {
+ "id": "15.4.4.17-1-9",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-1-9.js",
+ "description": "Array.prototype.some applied to Function object",
+ "test": "assertTrue((function testcase() {\n function callbackfn(val, idx, obj) {\n return obj instanceof Function;\n }\n\n var obj = function (a, b) {\n return a + b;\n };\n obj[0] = 11;\n obj[1] = 9;\n return Array.prototype.some.call(obj, callbackfn);\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.some))"
+ },
+ {
+ "id": "15.4.4.17-2-1",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-2-1.js",
+ "description": "Array.prototype.some - 'length' is own data property on an Array-like object",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn1(val, idx, obj) {\n return val > 10;\n }\n\n function callbackfn2(val, idx, obj) {\n return val > 11;\n }\n\n var obj = {\n 0: 9,\n 1: 11,\n 2: 12,\n length: 2\n };\n\n return Array.prototype.some.call(obj, callbackfn1) &&\n !Array.prototype.some.call(obj, callbackfn2);\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.some))"
+ },
+ {
+ "id": "15.4.4.17-2-10",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-2-10.js",
+ "description": "Array.prototype.some - 'length' is an inherited accessor property on an Array-like object",
+ "test": "assertTrue((function testcase() {\n function callbackfn1(val, idx, obj) {\n return val > 10;\n }\n\n function callbackfn2(val, idx, obj) {\n return val > 11;\n }\n\n var proto = {};\n\n Object.defineProperty(proto, \"length\", {\n get: function () {\n return 2;\n },\n configurable: true\n });\n\n var Con = function () { };\n Con.prototype = proto;\n\n var child = new Con();\n child[0] = 9;\n child[1] = 11;\n child[2] = 12;\n\n return Array.prototype.some.call(child, callbackfn1) &&\n !Array.prototype.some.call(child, callbackfn2);\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.some) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.4.4.17-2-11",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-2-11.js",
+ "description": "Array.prototype.some - 'length' is an own accessor property without a get function on an Array-like object",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n\n function callbackfn(val, idx, obj) {\n accessed = true;\n return val > 10;\n }\n\n var obj = {\n 0: 11,\n 1: 12\n };\n Object.defineProperty(obj, \"length\", {\n set: function () { },\n configurable: true\n });\n\n return !Array.prototype.some.call(obj, callbackfn) && !accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.some) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.4.4.17-2-12",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-2-12.js",
+ "description": "Array.prototype.some - 'length' is own accessor property without a get function that overrides an inherited accessor property on an Array-like object",
+ "test": "assertTrue((function testcase() {\n var accessed = false;\n\n function callbackfn(val, idx, obj) {\n accessed = true;\n return val > 10;\n }\n\n try {\n Object.defineProperty(Object.prototype, \"length\", {\n get: function () {\n return 2;\n },\n configurable: true\n });\n\n var obj = { 0: 11, 1: 12 };\n Object.defineProperty(obj, \"length\", {\n set: function () { },\n configurable: true\n });\n\n return !Array.prototype.some.call(obj, callbackfn) && !accessed;\n } finally {\n delete Object.prototype.length;\n }\n\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.some) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.4.4.17-2-13",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-2-13.js",
+ "description": "Array.prototype.some - 'length' is inherited accessor property without a get function on an Array-like object",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n\n function callbackfn(val, idx, obj) {\n accessed = true;\n return val > 10;\n }\n\n var proto = {};\n Object.defineProperty(proto, \"length\", {\n set: function () { },\n configurable: true\n });\n\n var Con = function () { };\n Con.prototype = proto;\n\n var child = new Con();\n child[0] = 11;\n child[1] = 12;\n\n return !Array.prototype.some.call(child, callbackfn) && !accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.some) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.4.4.17-2-14",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-2-14.js",
+ "description": "Array.prototype.some - 'length' property doesn't exist on an Array-like object",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n\n function callbackfn(val, idx, obj) {\n accessed = true;\n return val > 10;\n }\n\n var obj = { 0: 11, 1: 12 };\n\n return !Array.prototype.some.call(obj, callbackfn) && !accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.some))"
+ },
+ {
+ "id": "15.4.4.17-2-15",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-2-15.js",
+ "description": "Array.prototype.some - 'length' is property of the global object",
+ "test": "assertTrue((function testcase() {\n function callbackfn1(val, idx, obj) {\n return val > 10;\n }\n\n function callbackfn2(val, idx, obj) {\n return val > 11;\n }\n\n try {\n var oldLen = fnGlobalObject().length;\n fnGlobalObject()[0] = 9;\n fnGlobalObject()[1] = 11;\n fnGlobalObject()[2] = 12;\n fnGlobalObject().length = 2;\n return Array.prototype.some.call(fnGlobalObject(), callbackfn1) &&\n !Array.prototype.some.call(fnGlobalObject(), callbackfn2);\n } finally {\n delete fnGlobalObject()[0];\n delete fnGlobalObject()[1];\n delete fnGlobalObject()[2];\n fnGlobalObject().length = oldLen;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.some))"
+ },
+ {
+ "id": "15.4.4.17-2-17",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-2-17.js",
+ "description": "Array.prototype.some applied to the Arguments object which implements its own property get method",
+ "test": "assertTrue((function testcase() {\n function callbackfn1(val, idx, obj) {\n return val > 10;\n }\n\n function callbackfn2(val, idx, obj) {\n return val > 11;\n }\n\n var func = function (a, b) {\n arguments[2] = 12;\n return Array.prototype.some.call(arguments, callbackfn1) &&\n !Array.prototype.some.call(arguments, callbackfn2);\n };\n\n return func(9, 11);\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.some))"
+ },
+ {
+ "id": "15.4.4.17-2-18",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-2-18.js",
+ "description": "Array.prototype.some applied to String object which implements its own property get method",
+ "test": "assertTrue((function testcase() {\n function callbackfn1(val, idx, obj) {\n return parseInt(val, 10) > 1;\n }\n\n function callbackfn2(val, idx, obj) {\n return parseInt(val, 10) > 2;\n }\n\n var str = new String(\"12\");\n try {\n String.prototype[2] = \"3\";\n return Array.prototype.some.call(str, callbackfn1) &&\n !Array.prototype.some.call(str, callbackfn2);\n } finally {\n delete String.prototype[2];\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.some))"
+ },
+ {
+ "id": "15.4.4.17-2-19",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-2-19.js",
+ "description": "Array.prototype.some applied to Function object which implements its own property get method",
+ "test": "assertTrue((function testcase() {\n function callbackfn1(val, idx, obj) {\n return val > 10;\n }\n\n function callbackfn2(val, idx, obj) {\n return val > 11;\n }\n\n var fun = function (a, b) {\n return a + b;\n };\n fun[0] = 9;\n fun[1] = 11;\n fun[2] = 12;\n\n return Array.prototype.some.call(fun, callbackfn1) &&\n !Array.prototype.some.call(fun, callbackfn2);\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.some))"
+ },
+ {
+ "id": "15.4.4.17-2-2",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-2-2.js",
+ "description": "Array.prototype.some - 'length' is own data property on an Array",
+ "test": "assertTrue((function testcase() {\n function callbackfn1(val, idx, obj) {\n return val > 10;\n }\n\n function callbackfn2(val, idx, obj) {\n return val > 11;\n }\n\n try {\n Array.prototype[2] = 12;\n\n return [9, 11].some(callbackfn1) &&\n ![9, 11].some(callbackfn2);\n } finally {\n delete Array.prototype[2];\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.some))"
+ },
+ {
+ "id": "15.4.4.17-2-3",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-2-3.js",
+ "description": "Array.prototype.some - 'length' is an own data property that overrides an inherited data property on an Array-like object",
+ "test": "assertTrue((function testcase() {\n function callbackfn1(val, idx, obj) {\n return val > 10;\n }\n\n function callbackfn2(val, idx, obj) {\n return val > 11;\n }\n\n var proto = { length: 3 };\n\n var Con = function () { };\n Con.prototype = proto;\n\n var child = new Con();\n child.length = 2;\n child[0] = 9;\n child[1] = 11;\n child[2] = 12;\n\n return Array.prototype.some.call(child, callbackfn1) &&\n !Array.prototype.some.call(child, callbackfn2);\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.some))"
+ },
+ {
+ "id": "15.4.4.17-2-4",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-2-4.js",
+ "description": "Array.prototype.some - 'length' is an own data property that overrides an inherited data property on an array",
+ "test": "assertTrue((function testcase() {\n var arrProtoLen = 0;\n function callbackfn1(val, idx, obj) {\n return val > 10;\n }\n\n function callbackfn2(val, idx, obj) {\n return val > 11;\n }\n\n try {\n arrProtoLen = Array.prototype.length;\n Array.prototype.length = 0;\n Array.prototype[2] = 12;\n\n return [9, 11].some(callbackfn1) &&\n ![9, 11].some(callbackfn2);\n } finally {\n Array.prototype.length = arrProtoLen;\n delete Array.prototype[2];\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.some))"
+ },
+ {
+ "id": "15.4.4.17-2-5",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-2-5.js",
+ "description": "Array.prototype.some - 'length' is an own data property that overrides an inherited accessor property on an Array-like object",
+ "test": "assertTrue((function testcase() {\n function callbackfn1(val, idx, obj) {\n return val > 10;\n }\n\n function callbackfn2(val, idx, obj) {\n return val > 11;\n }\n\n var proto = {};\n\n Object.defineProperty(proto, \"length\", {\n get: function () {\n return 3;\n },\n configurable: true\n });\n\n var Con = function () { };\n Con.prototype = proto;\n\n var child = new Con();\n Object.defineProperty(child, \"length\", {\n value: 2,\n configurable: true\n });\n\n child[0] = 9;\n child[1] = 11;\n child[2] = 12;\n\n return Array.prototype.some.call(child, callbackfn1) &&\n !Array.prototype.some.call(child, callbackfn2);\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.some) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.4.4.17-2-6",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-2-6.js",
+ "description": "Array.prototype.some - 'length' is an inherited data property on an Array-like object",
+ "test": "assertTrue((function testcase() {\n function callbackfn1(val, idx, obj) {\n return val > 10;\n }\n\n function callbackfn2(val, idx, obj) {\n return val > 11;\n }\n\n var proto = { length: 2 };\n\n var Con = function () { };\n Con.prototype = proto;\n\n var child = new Con();\n child[0] = 9;\n child[1] = 11;\n child[2] = 12;\n\n return Array.prototype.some.call(child, callbackfn1) &&\n !Array.prototype.some.call(child, callbackfn2);\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.some))"
+ },
+ {
+ "id": "15.4.4.17-2-7",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-2-7.js",
+ "description": "Array.prototype.some - 'length' is an own accessor property on an Array-like object",
+ "test": "assertTrue((function testcase() {\n function callbackfn1(val, idx, obj) {\n return val > 10;\n }\n\n function callbackfn2(val, idx, obj) {\n return val > 11;\n }\n\n var obj = { };\n\n Object.defineProperty(obj, \"length\", {\n get: function () {\n return 2;\n },\n configurable: true\n });\n\n obj[0] = 9;\n obj[1] = 11;\n obj[2] = 12;\n\n return Array.prototype.some.call(obj, callbackfn1) &&\n !Array.prototype.some.call(obj, callbackfn2);\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.some) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.4.4.17-2-8",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-2-8.js",
+ "description": "Array.prototype.some - 'length' is an own accessor property that overrides an inherited data property on an Array-like object",
+ "test": "assertTrue((function testcase() {\n function callbackfn1(val, idx, obj) {\n return val > 10;\n }\n\n function callbackfn2(val, idx, obj) {\n return val > 11;\n }\n\n var proto = { length: 3 };\n\n var Con = function () { };\n Con.prototype = proto;\n\n var child = new Con();\n\n Object.defineProperty(child, \"length\", {\n get: function () {\n return 2;\n },\n configurable: true\n });\n\n child[0] = 9;\n child[1] = 11;\n child[2] = 12;\n\n return Array.prototype.some.call(child, callbackfn1) &&\n !Array.prototype.some.call(child, callbackfn2);\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.some) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.4.4.17-2-9",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-2-9.js",
+ "description": "Array.prototype.some - 'length' is an own accessor property that overrides an inherited accessor property on an Array-like object",
+ "test": "assertTrue((function testcase() {\n function callbackfn1(val, idx, obj) {\n return val > 10;\n }\n\n function callbackfn2(val, idx, obj) {\n return val > 11;\n }\n\n var proto = {};\n\n Object.defineProperty(proto, \"length\", {\n get: function () {\n return 3;\n },\n configurable: true\n });\n\n var Con = function () { };\n Con.prototype = proto;\n\n var child = new Con();\n\n Object.defineProperty(child, \"length\", {\n get: function () {\n return 2;\n },\n configurable: true\n });\n\n child[0] = 9;\n child[1] = 11;\n child[2] = 12;\n\n return Array.prototype.some.call(child, callbackfn1) &&\n !Array.prototype.some.call(child, callbackfn2);\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.some) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.4.4.17-3-1",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-1.js",
+ "description": "Array.prototype.some - value of 'length' is undefined",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n\n function callbackfn(val, idx, obj) {\n accessed = true;\n return val > 10;\n }\n\n var obj = { 0: 11, length: undefined };\n\n return !Array.prototype.some.call(obj, callbackfn) && !accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.some))"
+ },
+ {
+ "id": "15.4.4.17-3-10",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-10.js",
+ "description": "Array.prototype.some - value of 'length' is a number (value is NaN)",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n\n function callbackfn(val, idx, obj) {\n accessed = true;\n return val > 10;\n }\n\n var obj = { 0: 11, length: NaN };\n\n return !Array.prototype.some.call(obj, callbackfn) && !accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.some))"
+ },
+ {
+ "id": "15.4.4.17-3-11",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-11.js",
+ "description": "Array.prototype.some - 'length' is a string containing a positive number",
+ "test": "assertTrue((function testcase() {\n function callbackfn1(val, idx, obj) {\n return val > 10;\n }\n\n function callbackfn2(val, idx, obj) {\n return val > 11;\n }\n\n var obj = { 0: 9, 1: 11, 2: 12, length: \"2\" };\n\n return Array.prototype.some.call(obj, callbackfn1) &&\n !Array.prototype.some.call(obj, callbackfn2);\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.some))"
+ },
+ {
+ "id": "15.4.4.17-3-12",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-12.js",
+ "description": "Array.prototype.some - 'length' is a string containing a negative number",
+ "test": "assertTrue((function testcase() {\n function callbackfn1(val, idx, obj) {\n return val > 10;\n }\n\n function callbackfn2(val, idx, obj) {\n return val > 11;\n }\n\n var obj = { 0: 9, 1: 11, 2: 12, length: \"-4294967294\" };\n\n return Array.prototype.some.call(obj, callbackfn1) &&\n !Array.prototype.some.call(obj, callbackfn2);\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.some))"
+ },
+ {
+ "id": "15.4.4.17-3-13",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-13.js",
+ "description": "Array.prototype.some - 'length' is a string containing a decimal number",
+ "test": "assertTrue((function testcase() {\n function callbackfn1(val, idx, obj) {\n return val > 10;\n }\n\n function callbackfn2(val, idx, obj) {\n return val > 11;\n }\n\n var obj = { 0: 9, 1: 11, 2: 12, length: \"2.5\" };\n\n return Array.prototype.some.call(obj, callbackfn1) &&\n !Array.prototype.some.call(obj, callbackfn2);\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.some))"
+ },
+ {
+ "id": "15.4.4.17-3-14",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-14.js",
+ "description": "Array.prototype.some - 'length' is a string containing +/-Infinity",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n\n function callbackfn(val, idx, obj) {\n accessed = true;\n return val > 10;\n }\n\n var objOne = { 0: 11, length: \"Infinity\" };\n var objTwo = { 0: 11, length: \"+Infinity\" };\n var objThree = { 0: 11, length: \"-Infinity\" };\n\n return !Array.prototype.some.call(objOne, callbackfn) &&\n !Array.prototype.some.call(objTwo, callbackfn) &&\n !Array.prototype.some.call(objThree, callbackfn) && !accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.some))"
+ },
+ {
+ "id": "15.4.4.17-3-15",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-15.js",
+ "description": "Array.prototype.some - 'length' is a string containing an exponential number",
+ "test": "assertTrue((function testcase() {\n function callbackfn1(val, idx, obj) {\n return val > 10;\n }\n\n function callbackfn2(val, idx, obj) {\n return val > 11;\n }\n\n var obj = { 0: 9, 1: 11, 2: 12, length: \"2E0\" };\n\n return Array.prototype.some.call(obj, callbackfn1) &&\n !Array.prototype.some.call(obj, callbackfn2);\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.some))"
+ },
+ {
+ "id": "15.4.4.17-3-16",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-16.js",
+ "description": "Array.prototype.some - 'length' is a string containing a hex number",
+ "test": "assertTrue((function testcase() {\n function callbackfn1(val, idx, obj) {\n return val > 10;\n }\n\n function callbackfn2(val, idx, obj) {\n return val > 11;\n }\n\n var obj = { 0: 9, 1: 11, 2: 12, length: \"0x0002\" };\n\n return Array.prototype.some.call(obj, callbackfn1) &&\n !Array.prototype.some.call(obj, callbackfn2);\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.some))"
+ },
+ {
+ "id": "15.4.4.17-3-17",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-17.js",
+ "description": "Array.prototype.some - 'length' is a string containing a number with leading zeros",
+ "test": "assertTrue((function testcase() {\n function callbackfn1(val, idx, obj) {\n return val > 10;\n }\n\n function callbackfn2(val, idx, obj) {\n return val > 11;\n }\n\n var obj = { 0: 9, 1: 11, 2: 12, length: \"0002.00\" };\n\n return Array.prototype.some.call(obj, callbackfn1) &&\n !Array.prototype.some.call(obj, callbackfn2);\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.some))"
+ },
+ {
+ "id": "15.4.4.17-3-18",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-18.js",
+ "description": "Array.prototype.some - value of 'length' is a string that can't convert to a number",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n\n function callbackfn(val, idx, obj) {\n accessed = true;\n return val > 10;\n }\n\n var obj = { 0: 11, 1: 21, length: \"two\" };\n\n return !Array.prototype.some.call(obj, callbackfn) && !accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.some))"
+ },
+ {
+ "id": "15.4.4.17-3-19",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-19.js",
+ "description": "Array.prototype.some - value of 'length' is an Object which has an own toString method",
+ "test": "assertTrue((function testcase() {\n function callbackfn1(val, idx, obj) {\n return val > 10;\n }\n\n function callbackfn2(val, idx, obj) {\n return val > 11;\n }\n\n var toStringAccessed = false;\n var obj = {\n 0: 9,\n 1: 11,\n 2: 12,\n\n length: {\n toString: function () {\n toStringAccessed = true;\n return '2';\n }\n }\n };\n\n return Array.prototype.some.call(obj, callbackfn1) &&\n !Array.prototype.some.call(obj, callbackfn2) && toStringAccessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.some))"
+ },
+ {
+ "id": "15.4.4.17-3-2",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-2.js",
+ "description": "Array.prototype.some on an Array-like object if 'length' is 1 (length overridden to true(type conversion))",
+ "test": "assertTrue((function testcase() {\n function callbackfn1(val, idx, obj) {\n return val > 10;\n }\n\n function callbackfn2(val, idx, obj) {\n return val > 11;\n }\n \n var obj = { 0: 11, 1: 12, length: true };\n\n return Array.prototype.some.call(obj, callbackfn1) &&\n !Array.prototype.some.call(obj, callbackfn2);\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.some))"
+ },
+ {
+ "id": "15.4.4.17-3-20",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-20.js",
+ "description": "Array.prototype.some - value of 'length' is an Object which has an own valueOf method",
+ "test": "assertTrue((function testcase() {\n function callbackfn1(val, idx, obj) {\n return val > 10;\n }\n\n function callbackfn2(val, idx, obj) {\n return val > 11;\n }\n\n var valueOfAccessed = false;\n\n var obj = {\n 0: 9,\n 1: 11,\n 2: 12,\n length: {\n valueOf: function () {\n valueOfAccessed = true;\n return 2;\n }\n }\n };\n\n return Array.prototype.some.call(obj, callbackfn1) &&\n !Array.prototype.some.call(obj, callbackfn2) && valueOfAccessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.some))"
+ },
+ {
+ "id": "15.4.4.17-3-21",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-21.js",
+ "description": "Array.prototype.some - 'length' is an object that has an own valueOf method that returns an object and toString method that returns a string",
+ "test": "assertTrue((function testcase() {\n function callbackfn1(val, idx, obj) {\n return val > 10;\n }\n\n function callbackfn2(val, idx, obj) {\n return val > 11;\n }\n\n var toStringAccessed = false;\n var valueOfAccessed = false;\n\n var obj = {\n 0: 9,\n 1: 11,\n 2: 12,\n length: {\n valueOf: function () {\n valueOfAccessed = true;\n return {};\n },\n toString: function () {\n toStringAccessed = true;\n return '2';\n }\n }\n };\n\n return Array.prototype.some.call(obj, callbackfn1) &&\n !Array.prototype.some.call(obj, callbackfn2) &&\n valueOfAccessed && toStringAccessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.some))"
+ },
+ {
+ "id": "15.4.4.17-3-22",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-22.js",
+ "description": "Array.prototype.some throws TypeError exception when 'length' is an object with toString and valueOf methods that don�t return primitive values",
+ "test": "assertTrue((function testcase() {\n\n var callbackfnAccessed = false;\n var toStringAccessed = false;\n var valueOfAccessed = false;\n\n function callbackfn(val, idx, obj) {\n callbackfnAccessed = true;\n return val > 10;\n }\n\n var obj = {\n 0: 11,\n 1: 12,\n\n length: {\n valueOf: function () {\n valueOfAccessed = true;\n return {};\n },\n toString: function () {\n toStringAccessed = true;\n return {};\n }\n }\n };\n\n try {\n Array.prototype.some.call(obj, callbackfn);\n return false;\n } catch (ex) {\n return (ex instanceof TypeError) && toStringAccessed && valueOfAccessed && !callbackfnAccessed;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.some))"
+ },
+ {
+ "id": "15.4.4.17-3-23",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-23.js",
+ "description": "Array.prototype.some uses inherited valueOf method when 'length' is an object with an own toString and inherited valueOf methods",
+ "test": "assertTrue((function testcase() {\n function callbackfn1(val, idx, obj) {\n return val > 10;\n }\n\n function callbackfn2(val, idx, obj) {\n return val > 11;\n }\n\n var valueOfAccessed = false;\n var toStringAccessed = false;\n\n var proto = {\n valueOf: function () {\n valueOfAccessed = true;\n return 2;\n }\n };\n\n var Con = function () { };\n Con.prototype = proto;\n\n var child = new Con();\n\n child.toString = function () {\n toStringAccessed = true;\n return '1';\n };\n\n var obj = {\n 0: 9,\n 1: 11,\n 2: 12,\n length: child\n };\n\n return Array.prototype.some.call(obj, callbackfn1) &&\n !Array.prototype.some.call(obj, callbackfn2) &&\n valueOfAccessed && !toStringAccessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.some))"
+ },
+ {
+ "id": "15.4.4.17-3-24",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-24.js",
+ "description": "Array.prototype.some - value of 'length' is a positive non-integer, ensure truncation occurs in the proper direction",
+ "test": "assertTrue((function testcase() {\n function callbackfn1(val, idx, obj) {\n return val > 10;\n }\n\n function callbackfn2(val, idx, obj) {\n return val > 11;\n }\n\n var obj = {\n 0: 9,\n 10: 11,\n 11: 12,\n length: 11.5\n };\n\n return Array.prototype.some.call(obj, callbackfn1) &&\n !Array.prototype.some.call(obj, callbackfn2);\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.some))"
+ },
+ {
+ "id": "15.4.4.17-3-25",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-25.js",
+ "description": "Array.prototype.some - value of 'length' is a negative non-integer, ensure truncation occurs in the proper direction",
+ "test": "assertTrue((function testcase() {\n function callbackfn1(val, idx, obj) {\n return val > 10;\n }\n\n function callbackfn2(val, idx, obj) {\n return val > 11;\n }\n\n var obj = {\n 0: 9,\n 1: 11,\n 2: 12,\n length: -4294967294.5\n };\n\n return Array.prototype.some.call(obj, callbackfn1) &&\n !Array.prototype.some.call(obj, callbackfn2);\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.some))"
+ },
+ {
+ "id": "15.4.4.17-3-28",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-28.js",
+ "description": "Array.prototype.some - value of 'length' is boundary value (2^32)",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n\n function callbackfn(val, idx, obj) {\n accessed = true;\n return val > 10;\n }\n\n var obj = {\n 0: 12,\n length: 4294967296\n };\n\n return !Array.prototype.some.call(obj, callbackfn) && !accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.some))"
+ },
+ {
+ "id": "15.4.4.17-3-29",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-29.js",
+ "description": "Array.prototype.some - value of 'length' is boundary value (2^32 + 1)",
+ "test": "assertTrue((function testcase() {\n function callbackfn1(val, idx, obj) {\n return val > 10;\n }\n\n function callbackfn2(val, idx, obj) {\n return val > 11;\n }\n\n var obj = {\n 0: 11,\n 1: 12,\n length: 4294967297\n };\n\n return Array.prototype.some.call(obj, callbackfn1) &&\n !Array.prototype.some.call(obj, callbackfn2);\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.some))"
+ },
+ {
+ "id": "15.4.4.17-3-3",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-3.js",
+ "description": "Array.prototype.some - value of 'length' is a number (value is 0)",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n\n function callbackfn(val, idx, obj) {\n accessed = true;\n return val > 10;\n }\n\n var obj = { 0: 11, length: 0 };\n\n return !Array.prototype.some.call(obj, callbackfn) && !accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.some))"
+ },
+ {
+ "id": "15.4.4.17-3-4",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-4.js",
+ "description": "Array.prototype.some - value of 'length' is a number (value is +0)",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n\n function callbackfn(val, idx, obj) {\n accessed = true;\n return val > 10;\n }\n\n var obj = { 0: 11, length: +0 };\n\n return !Array.prototype.some.call(obj, callbackfn) && !accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.some))"
+ },
+ {
+ "id": "15.4.4.17-3-5",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-5.js",
+ "description": "Array.prototype.some - value of 'length' is a number (value is -0)",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n\n function callbackfn(val, idx, obj) {\n accessed = true;\n return val > 10;\n }\n\n var obj = { 0: 11, length: -0 };\n\n return !Array.prototype.some.call(obj, callbackfn) && !accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.some))"
+ },
+ {
+ "id": "15.4.4.17-3-6",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-6.js",
+ "description": "Array.prototype.some - value of 'length' is a number (value is positive)",
+ "test": "assertTrue((function testcase() {\n function callbackfn1(val, idx, obj) {\n return val > 10;\n }\n\n function callbackfn2(val, idx, obj) {\n return val > 11;\n }\n\n var obj = { 0: 9, 1: 11, 2: 12, length: 2 };\n\n return Array.prototype.some.call(obj, callbackfn1) &&\n !Array.prototype.some.call(obj, callbackfn2);\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.some))"
+ },
+ {
+ "id": "15.4.4.17-3-7",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-7.js",
+ "description": "Array.prototype.some - value of 'length' is a number (value is negative)",
+ "test": "assertTrue((function testcase() {\n function callbackfn1(val, idx, obj) {\n return val > 10;\n }\n\n function callbackfn2(val, idx, obj) {\n return val > 11;\n }\n\n var obj = { 0: 9, 1: 11, 2: 12, length: -4294967294 };\n\n return Array.prototype.some.call(obj, callbackfn1) &&\n !Array.prototype.some.call(obj, callbackfn2);\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.some))"
+ },
+ {
+ "id": "15.4.4.17-3-8",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-8.js",
+ "description": "Array.prototype.some - value of 'length' is a number (value is Infinity)",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n\n function callbackfn(val, idx, obj) {\n accessed = true;\n return val > 10;\n }\n\n var obj = { 0: 11, length: Infinity };\n\n return !Array.prototype.some.call(obj, callbackfn) && !accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.some))"
+ },
+ {
+ "id": "15.4.4.17-3-9",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-3-9.js",
+ "description": "Array.prototype.some - value of 'length' is a number (value is -Infinity)",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n\n function callbackfn(val, idx, obj) {\n accessed = true;\n return val > 10;\n }\n\n var obj = { 0: 11, length: -Infinity };\n\n return !Array.prototype.some.call(obj, callbackfn) && !accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.some))"
+ },
+ {
+ "id": "15.4.4.17-4-1",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-4-1.js",
+ "description": "Array.prototype.some throws TypeError if callbackfn is undefined",
+ "test": "assertTrue((function testcase() {\n\n var arr = new Array(10);\n try {\n arr.some(); \n }\n catch(e) {\n if(e instanceof TypeError)\n return true; \n }\n\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.some))"
+ },
+ {
+ "id": "15.4.4.17-4-10",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-4-10.js",
+ "description": "Array.prototype.some - the exception is not thrown if exception was thrown by step 2",
+ "test": "assertTrue((function testcase() {\n\n var obj = { 0: 11, 1: 12 };\n\n Object.defineProperty(obj, \"length\", {\n get: function () {\n throw new SyntaxError();\n },\n configurable: true\n });\n\n try {\n Array.prototype.some.call(obj, undefined);\n return false;\n } catch (ex) {\n return !(ex instanceof TypeError);\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.some) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.4.4.17-4-11",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-4-11.js",
+ "description": "Array.prototype.some - the exception is not thrown if exception was thrown by step 3",
+ "test": "assertTrue((function testcase() {\n\n var obj = { 0: 11, 1: 12 };\n\n Object.defineProperty(obj, \"length\", {\n get: function () {\n return {\n toString: function () {\n throw new SyntaxError();\n }\n };\n },\n configurable: true\n });\n\n try {\n Array.prototype.some.call(obj, undefined);\n return false;\n } catch (ex) {\n return !(ex instanceof TypeError);\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.some) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.4.4.17-4-12",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-4-12.js",
+ "description": "Array.prototype.some - 'callbackfn' is a function",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(val, idx, obj) {\n return val > 10;\n }\n\n return [9, 11].some(callbackfn);\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.some))"
+ },
+ {
+ "id": "15.4.4.17-4-15",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-4-15.js",
+ "description": "Array.prototype.some - calling with no callbackfn is the same as passing undefined for callbackfn",
+ "test": "assertTrue((function testcase() {\n var obj = { };\n var lengthAccessed = false;\n var loopAccessed = false;\n\n Object.defineProperty(obj, \"length\", {\n get: function () {\n lengthAccessed = true;\n return 20;\n },\n configurable: true\n });\n Object.defineProperty(obj, \"0\", {\n get: function () {\n loopAccessed = true;\n return 10;\n },\n configurable: true\n });\n\n try {\n Array.prototype.some.call(obj);\n return false;\n } catch (ex) {\n return (ex instanceof TypeError) && lengthAccessed && !loopAccessed;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.some) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects())"
+ },
+ {
+ "id": "15.4.4.17-4-2",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-4-2.js",
+ "description": "Array.prototype.some throws ReferenceError if callbackfn is unreferenced",
+ "test": "assertTrue((function testcase() {\n\n var arr = new Array(10);\n try {\n arr.some(foo); \n }\n catch(e) {\n if(e instanceof ReferenceError)\n return true; \n }\n\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.some))"
+ },
+ {
+ "id": "15.4.4.17-4-3",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-4-3.js",
+ "description": "Array.prototype.some throws TypeError if callbackfn is null",
+ "test": "assertTrue((function testcase() {\n\n var arr = new Array(10);\n try {\n arr.some(null); \n }\n catch(e) {\n if(e instanceof TypeError)\n return true; \n }\n\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.some))"
+ },
+ {
+ "id": "15.4.4.17-4-4",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-4-4.js",
+ "description": "Array.prototype.some throws TypeError if callbackfn is boolean",
+ "test": "assertTrue((function testcase() {\n\n var arr = new Array(10);\n try {\n arr.some(true); \n }\n catch(e) {\n if(e instanceof TypeError)\n return true; \n }\n\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.some))"
+ },
+ {
+ "id": "15.4.4.17-4-5",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-4-5.js",
+ "description": "Array.prototype.some throws TypeError if callbackfn is number",
+ "test": "assertTrue((function testcase() {\n\n var arr = new Array(10);\n try {\n arr.some(5); \n }\n catch(e) {\n if(e instanceof TypeError)\n return true; \n }\n\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.some))"
+ },
+ {
+ "id": "15.4.4.17-4-6",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-4-6.js",
+ "description": "Array.prototype.some throws TypeError if callbackfn is string",
+ "test": "assertTrue((function testcase() {\n\n var arr = new Array(10);\n try {\n arr.some(\"abc\"); \n }\n catch(e) {\n if(e instanceof TypeError)\n return true; \n }\n\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.some))"
+ },
+ {
+ "id": "15.4.4.17-4-7",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-4-7.js",
+ "description": "Array.prototype.some throws TypeError if callbackfn is Object without a Call internal method",
+ "test": "assertTrue((function testcase() {\n\n var arr = new Array(10);\n try {\n arr.some(new Object()); \n }\n catch(e) {\n if(e instanceof TypeError)\n return true; \n }\n\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.some))"
+ },
+ {
+ "id": "15.4.4.17-4-8",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-4-8.js",
+ "description": "Array.prototype.some - side effects produced by step 2 are visible when an exception occurs",
+ "test": "assertTrue((function testcase() {\n\n var obj = { 0: 11, 1: 12 };\n\n var accessed = false;\n\n Object.defineProperty(obj, \"length\", {\n get: function () {\n accessed = true;\n return 2;\n },\n configurable: true\n });\n\n try {\n Array.prototype.some.call(obj, null);\n return false;\n } catch (ex) {\n return ex instanceof TypeError && accessed;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.some) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.4.4.17-4-9",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-4-9.js",
+ "description": "Array.prototype.some - side effects produced by step 3 are visible when an exception occurs",
+ "test": "assertTrue((function testcase() {\n\n var obj = { 0: 11, 1: 12 };\n\n var accessed = false;\n\n Object.defineProperty(obj, \"length\", {\n get: function () {\n return {\n toString: function () {\n accessed = true;\n return \"2\";\n }\n };\n },\n configurable: true\n });\n\n try {\n Array.prototype.some.call(obj, null);\n return false;\n } catch (ex) {\n return ex instanceof TypeError && accessed;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.some) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.4.4.17-5-1-s",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.17-5-1-s.js",
+ "description": "Array.prototype.some - thisArg not passed to strict callbackfn",
+ "test": "assertTrue((function testcase() {\n var innerThisCorrect = false;\n \n function callbackfn(val, idx, obj) {\n \"use strict\";\n innerThisCorrect = this===undefined;\n return true;\n }\n\n [1].some(callbackfn);\n return innerThisCorrect; \n }).call(this));\n",
+ "precondition": "(fnSupportsStrict() && fnExists(Array.prototype.some))",
+ "strict_only": ""
+ },
+ {
+ "id": "15.4.4.17-5-1",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-5-1.js",
+ "description": "Array.prototype.some - thisArg is passed",
+ "test": "assertTrue((function testcase() {\n this._15_4_4_17_5_1 = false;\n var _15_4_4_17_5_1 = true;\n\n function callbackfn(val, idx, obj) {\n return this._15_4_4_17_5_1;\n }\n var arr = [1];\n return !arr.some(callbackfn);\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.some))"
+ },
+ {
+ "id": "15.4.4.17-5-10",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-5-10.js",
+ "description": "Array.prototype.some - Array Object can be used as thisArg",
+ "test": "assertTrue((function testcase() {\n\n var objArray = [];\n\n function callbackfn(val, idx, obj) {\n return this === objArray;\n }\n\n return [11].some(callbackfn, objArray);\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.some))"
+ },
+ {
+ "id": "15.4.4.17-5-11",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-5-11.js",
+ "description": "Array.prototype.some - String object can be used as thisArg",
+ "test": "assertTrue((function testcase() {\n\n var objString = new String();\n\n function callbackfn(val, idx, obj) {\n return this === objString;\n }\n\n return [11].some(callbackfn, objString);\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.some))"
+ },
+ {
+ "id": "15.4.4.17-5-12",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-5-12.js",
+ "description": "Array.prototype.some - Boolean object can be used as thisArg",
+ "test": "assertTrue((function testcase() {\n\n var objBoolean = new Boolean();\n\n function callbackfn(val, idx, obj) {\n return this === objBoolean;\n }\n\n return [11].some(callbackfn, objBoolean);\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.some))"
+ },
+ {
+ "id": "15.4.4.17-5-13",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-5-13.js",
+ "description": "Array.prototype.some - Number object can be used as thisArg",
+ "test": "assertTrue((function testcase() {\n\n var objNumber = new Number();\n\n function callbackfn(val, idx, obj) {\n return this === objNumber;\n }\n\n return [11].some(callbackfn, objNumber);\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.some))"
+ },
+ {
+ "id": "15.4.4.17-5-14",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-5-14.js",
+ "description": "Array.prototype.some - the Math object can be used as thisArg",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(val, idx, obj) {\n return this === Math;\n }\n\n return [11].some(callbackfn, Math);\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.some))"
+ },
+ {
+ "id": "15.4.4.17-5-15",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-5-15.js",
+ "description": "Array.prototype.some - Date object can be used as thisArg",
+ "test": "assertTrue((function testcase() {\n\n var objDate = new Date();\n\n function callbackfn(val, idx, obj) {\n return this === objDate;\n }\n\n return [11].some(callbackfn, objDate);\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.some))"
+ },
+ {
+ "id": "15.4.4.17-5-16",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-5-16.js",
+ "description": "Array.prototype.some - RegExp object can be used as thisArg",
+ "test": "assertTrue((function testcase() {\n\n var objRegExp = new RegExp();\n\n function callbackfn(val, idx, obj) {\n return this === objRegExp;\n }\n\n return [11].some(callbackfn, objRegExp);\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.some))"
+ },
+ {
+ "id": "15.4.4.17-5-17",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-5-17.js",
+ "description": "Array.prototype.some - the JSON object can be used as thisArg",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(val, idx, obj) {\n return this === JSON;\n }\n\n return [11].some(callbackfn, JSON);\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.some))"
+ },
+ {
+ "id": "15.4.4.17-5-18",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-5-18.js",
+ "description": "Array.prototype.some - Error object can be used as thisArg",
+ "test": "assertTrue((function testcase() {\n\n var objError = new RangeError();\n\n function callbackfn(val, idx, obj) {\n return this === objError;\n }\n\n return [11].some(callbackfn, objError);\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.some))"
+ },
+ {
+ "id": "15.4.4.17-5-19",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-5-19.js",
+ "description": "Array.prototype.some - the Arguments object can be used as thisArg",
+ "test": "assertTrue((function testcase() {\n\n var arg;\n\n function callbackfn(val, idx, obj) {\n return this === arg;\n }\n\n (function fun() {\n arg = arguments;\n }(1, 2, 3));\n\n return [11].some(callbackfn, arg);\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.some))"
+ },
+ {
+ "id": "15.4.4.17-5-2",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-5-2.js",
+ "description": "Array.prototype.some - thisArg is Object",
+ "test": "assertTrue((function testcase() {\n var res = false;\n var o = new Object();\n o.res = true;\n function callbackfn(val, idx, obj)\n {\n return this.res;\n }\n\n var arr = [1];\n if(arr.some(callbackfn, o) === true)\n return true; \n\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.some))"
+ },
+ {
+ "id": "15.4.4.17-5-21",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-5-21.js",
+ "description": "Array.prototype.some - the global object can be used as thisArg",
+ "test": "assertTrue((function testcase() {\n\n\n function callbackfn(val, idx, obj) {\n return this === fnGlobalObject();\n }\n\n return [11].some(callbackfn, fnGlobalObject());\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.some))"
+ },
+ {
+ "id": "15.4.4.17-5-22",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-5-22.js",
+ "description": "Array.prototype.some - boolean primitive can be used as thisArg",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(val, idx, obj) {\n return this.valueOf() === false;\n }\n\n return [11].some(callbackfn, false);\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.some))"
+ },
+ {
+ "id": "15.4.4.17-5-23",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-5-23.js",
+ "description": "Array.prototype.some - number primitive can be used as thisArg",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(val, idx, obj) {\n return this.valueOf() === 101;\n }\n\n return [11].some(callbackfn, 101);\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.some))"
+ },
+ {
+ "id": "15.4.4.17-5-24",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-5-24.js",
+ "description": "Array.prototype.some - string primitive can be used as thisArg",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(val, idx, obj) {\n return this.valueOf() === \"abc\";\n }\n\n return [11].some(callbackfn, \"abc\");\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.some))"
+ },
+ {
+ "id": "15.4.4.17-5-25",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-5-25.js",
+ "description": "Array.prototype.some - thisArg not passed",
+ "test": "assertTrue((function testcase() {\n function innerObj() {\n this._15_4_4_17_5_25 = true;\n var _15_4_4_17_5_25 = false;\n \n function callbackfn(val, idx, obj) {\n return this._15_4_4_17_5_25;\n }\n var arr = [1];\n this.retVal = !arr.some(callbackfn);\n }\n return new innerObj().retVal;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.some))"
+ },
+ {
+ "id": "15.4.4.17-5-3",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-5-3.js",
+ "description": "Array.prototype.some - thisArg is Array",
+ "test": "assertTrue((function testcase() {\n var res = false;\n var a = new Array();\n a.res = true;\n function callbackfn(val, idx, obj)\n {\n return this.res;\n }\n\n var arr = [1];\n\n if(arr.some(callbackfn, a) === true)\n return true; \n\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.some))"
+ },
+ {
+ "id": "15.4.4.17-5-4",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-5-4.js",
+ "description": "Array.prototype.some - thisArg is object from object template(prototype)",
+ "test": "assertTrue((function testcase() {\n var res = false;\n function callbackfn(val, idx, obj)\n {\n return this.res;\n }\n \n function foo(){}\n foo.prototype.res = true;\n var f = new foo();\n var arr = [1];\n\n if(arr.some(callbackfn,f) === true)\n return true; \n\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.some))"
+ },
+ {
+ "id": "15.4.4.17-5-5",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-5-5.js",
+ "description": "Array.prototype.some - thisArg is object from object template",
+ "test": "assertTrue((function testcase() {\n var res = false;\n function callbackfn(val, idx, obj)\n {\n return this.res;\n }\n\n function foo(){}\n var f = new foo();\n f.res = true;\n var arr = [1];\n\n if(arr.some(callbackfn,f) === true)\n return true; \n\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.some))"
+ },
+ {
+ "id": "15.4.4.17-5-6",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-5-6.js",
+ "description": "Array.prototype.some - thisArg is function",
+ "test": "assertTrue((function testcase() {\n var res = false;\n function callbackfn(val, idx, obj)\n {\n return this.res;\n }\n\n function foo(){}\n foo.res = true;\n var arr = [1];\n\n if(arr.some(callbackfn,foo) === true)\n return true; \n\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.some))"
+ },
+ {
+ "id": "15.4.4.17-5-7",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-5-7.js",
+ "description": "Array.prototype.some - built-in functions can be used as thisArg",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(val, idx, obj) {\n return this === eval;\n }\n\n return [11].some(callbackfn, eval);\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.some))"
+ },
+ {
+ "id": "15.4.4.17-5-9",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-5-9.js",
+ "description": "Array.prototype.some - Function Object can be used as thisArg",
+ "test": "assertTrue((function testcase() {\n\n var objFunction = function () { };\n\n function callbackfn(val, idx, obj) {\n return this === objFunction;\n }\n\n return [11].some(callbackfn, objFunction);\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.some))"
+ },
+ {
+ "id": "15.4.4.17-7-1",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-1.js",
+ "description": "Array.prototype.some considers new elements added to array after it is called",
+ "test": "assertTrue((function testcase() { \n var calledForThree = false;\n \n function callbackfn(val, idx, obj)\n {\n arr[2] = 3;\n if(val !== 3)\n calledForThree = true;\n\n return false;\n }\n\n var arr = [1,2,,4,5];\n \n var val = arr.some(callbackfn);\n return calledForThree;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.some))"
+ },
+ {
+ "id": "15.4.4.17-7-2",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-2.js",
+ "description": "Array.prototype.some considers new value of elements in array after it is called",
+ "test": "assertTrue((function testcase() { \n \n function callbackfn(val, idx, obj)\n {\n arr[4] = 6;\n if(val < 6)\n return false;\n else \n return true;\n }\n\n var arr = [1,2,3,4,5];\n \n if(arr.some(callbackfn) === true) \n return true; \n \n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.some))"
+ },
+ {
+ "id": "15.4.4.17-7-3",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-3.js",
+ "description": "Array.prototype.some doesn't visit deleted elements in array after it is called",
+ "test": "assertTrue((function testcase() { \n \n function callbackfn(val, idx, obj)\n {\n delete arr[2];\n if(val !== 3)\n return false;\n else \n return true;\n }\n\n var arr = [1,2,3,4,5];\n \n if(arr.some(callbackfn) === false) \n return true; \n \n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.some))"
+ },
+ {
+ "id": "15.4.4.17-7-4",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-4.js",
+ "description": "Array.prototype.some doesn't visit deleted elements when Array.length is decreased",
+ "test": "assertTrue((function testcase() { \n \n function callbackfn(val, idx, obj)\n {\n arr.length = 3;\n if(val < 4)\n return false;\n else \n return true;\n }\n \n var arr = [1,2,3,4,6];\n \n if(arr.some(callbackfn) === false) \n return true; \n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.some))"
+ },
+ {
+ "id": "15.4.4.17-7-5",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-5.js",
+ "description": "Array.prototype.some doesn't consider newly added elements in sparse array",
+ "test": "assertTrue((function testcase() { \n \n function callbackfn(val, idx, obj)\n {\n arr[1000] = 5;\n if(val < 5)\n return false;\n else \n return true;\n }\n\n var arr = new Array(10);\n arr[1] = 1;\n arr[2] = 2;\n \n if(arr.some(callbackfn) === false) \n return true; \n \n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.some))"
+ },
+ {
+ "id": "15.4.4.17-7-6",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-6.js",
+ "description": "Array.prototype.some visits deleted element in array after the call when same index is also present in prototype",
+ "test": "assertTrue((function testcase() { \n \n function callbackfn(val, idx, obj)\n {\n delete arr[4];\n if(val < 5)\n return false;\n else \n return true;\n }\n\n\n Array.prototype[4] = 5;\n var arr = [1,2,3,4,5];\n \n var res = arr.some(callbackfn) ;\n delete Array.prototype[4];\n if(res === true) \n return true; \n \n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.some))"
+ },
+ {
+ "id": "15.4.4.17-7-8",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-8.js",
+ "description": "Array.prototype.some - no observable effects occur if length is 0",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n\n function callbackfn(val, idx, obj) {\n accessed = true;\n return val > 10;\n }\n\n var obj = { 0: 11, 1: 12, length: 0 };\n\n return !Array.prototype.some.call(obj, callbackfn) && !accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.some))"
+ },
+ {
+ "id": "15.4.4.17-7-9",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-9.js",
+ "description": "Array.prototype.some - modifications to length don't change number of iterations",
+ "test": "assertTrue((function testcase() {\n\n var called = 0;\n\n function callbackfn(val, idx, obj) {\n called++;\n return val > 10;\n }\n\n var obj = { 0: 9, 2: 12, length: 3 };\n\n Object.defineProperty(obj, \"1\", {\n get: function () {\n obj.length = 2;\n return 8;\n },\n configurable: true\n });\n\n return Array.prototype.some.call(obj, callbackfn) && called === 3;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.some) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects())"
+ },
+ {
+ "id": "15.4.4.17-7-b-1",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-b-1.js",
+ "description": "Array.prototype.some - callbackfn not called for indexes never been assigned values",
+ "test": "assertTrue((function testcase() { \n\n var callCnt = 0; \n function callbackfn(val, idx, obj)\n {\n callCnt++;\n return false;\n }\n\n var arr = new Array(10);\n arr[1] = undefined;\n arr.some(callbackfn);\n if(callCnt === 1) \n return true; \n \n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.some))"
+ },
+ {
+ "id": "15.4.4.17-7-b-10",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-b-10.js",
+ "description": "Array.prototype.some - deleting property of prototype causes prototype index property not to be visited on an Array-like Object",
+ "test": "assertTrue((function testcase() {\n var accessed = false;\n function callbackfn(val, idx, obj) {\n accessed = true;\n return idx === 1;\n }\n var arr = { 2: 2, length: 20 };\n\n Object.defineProperty(arr, \"0\", {\n get: function () {\n delete Object.prototype[1];\n return 0;\n },\n configurable: true\n });\n\n try {\n Object.prototype[1] = 1;\n return !Array.prototype.some.call(arr, callbackfn) && accessed;\n } finally {\n delete Object.prototype[1];\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.some) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects())"
+ },
+ {
+ "id": "15.4.4.17-7-b-11",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-b-11.js",
+ "description": "Array.prototype.some - deleting property of prototype causes prototype index property not to be visited on an Array",
+ "test": "assertTrue((function testcase() {\n var accessed = false;\n function callbackfn(val, idx, obj) {\n accessed = true;\n return idx === 1;\n }\n var arr = [0, , 2];\n\n Object.defineProperty(arr, \"0\", {\n get: function () {\n delete Array.prototype[1];\n return 0;\n },\n configurable: true\n });\n\n try {\n Array.prototype[1] = 1;\n return !arr.some(callbackfn) && accessed;\n } finally {\n delete Array.prototype[1];\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.some) && fnExists(Object.defineProperty) && ![, 1].hasOwnProperty(0) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.4.4.17-7-b-12",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-b-12.js",
+ "description": "Array.prototype.some - deleting own property with prototype property causes prototype index property to be visited on an Array-like object",
+ "test": "assertTrue((function testcase() {\n function callbackfn(val, idx, obj) {\n if (idx === 1 && val === 1) {\n return true;\n } else {\n return false;\n }\n }\n var arr = { 0: 0, 1: 111, 2: 2, length: 10 };\n \n Object.defineProperty(arr, \"0\", {\n get: function () {\n delete arr[1];\n return 0;\n },\n configurable: true\n });\n\n try {\n Object.prototype[1] = 1;\n return Array.prototype.some.call(arr, callbackfn);\n } finally {\n delete Object.prototype[1];\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.some) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects())"
+ },
+ {
+ "id": "15.4.4.17-7-b-13",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-b-13.js",
+ "description": "Array.prototype.some - deleting own property with prototype property causes prototype index property to be visited on an Array",
+ "test": "assertTrue((function testcase() {\n function callbackfn(val, idx, obj) {\n if (idx === 1 && val === 1) {\n return true;\n } else {\n return false;\n }\n }\n var arr = [0, 111, 2]; \n \n Object.defineProperty(arr, \"0\", {\n get: function () {\n delete arr[1];\n return 0;\n },\n configurable: true\n });\n\n try {\n Array.prototype[1] = 1;\n return arr.some(callbackfn);\n } finally {\n delete Array.prototype[1];\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.some) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.4.4.17-7-b-14",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-b-14.js",
+ "description": "Array.prototype.some - decreasing length of array causes index property not to be visited",
+ "test": "assertTrue((function testcase() {\n var accessed = false;\n function callbackfn(val, idx, obj) {\n accessed = true;\n return idx === 3;\n }\n var arr = [0, 1, 2, \"last\"];\n\n Object.defineProperty(arr, \"0\", {\n get: function () {\n arr.length = 3;\n return 0;\n },\n configurable: true\n });\n\n return !arr.some(callbackfn) && accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.some) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.4.4.17-7-b-15",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-b-15.js",
+ "description": "Array.prototype.some - decreasing length of array with prototype property causes prototype index property to be visited",
+ "test": "assertTrue((function testcase() {\n function callbackfn(val, idx, obj) {\n if (idx === 2 && val === \"prototype\") {\n return true;\n } else {\n return false;\n }\n }\n var arr = [0, 1, 2];\n\n try {\n Object.defineProperty(Array.prototype, \"2\", {\n get: function () {\n return \"prototype\";\n },\n configurable: true\n });\n\n Object.defineProperty(arr, \"1\", {\n get: function () {\n arr.length = 2;\n return 1;\n },\n configurable: true\n });\n\n return arr.some(callbackfn);\n } finally {\n delete Array.prototype[2];\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.some) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.4.4.17-7-b-16",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-b-16.js",
+ "description": "Array.prototype.some - decreasing length of array does not delete non-configurable properties",
+ "test": "assertTrue((function testcase() {\n function callbackfn(val, idx, obj) {\n if (idx === 2 && val === \"unconfigurable\") {\n return true;\n } else {\n return false;\n }\n }\n \n var arr = [0, 1, 2];\n\n Object.defineProperty(arr, \"2\", {\n get: function () {\n return \"unconfigurable\";\n },\n configurable: false\n });\n\n Object.defineProperty(arr, \"1\", {\n get: function () {\n arr.length = 2;\n return 1;\n },\n configurable: true\n });\n\n return arr.some(callbackfn);\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.some) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.4.4.17-7-b-2",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-b-2.js",
+ "description": "Array.prototype.some - added properties in step 2 are visible here",
+ "test": "assertTrue((function testcase() {\n function callbackfn(val, idx, obj) {\n if (idx === 2 && val === \"length\") {\n return true;\n } else {\n return false;\n }\n }\n \n var arr = { };\n\n Object.defineProperty(arr, \"length\", {\n get: function () {\n arr[2] = \"length\";\n return 3;\n },\n configurable: true\n });\n\n return Array.prototype.some.call(arr, callbackfn);\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.some) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.4.4.17-7-b-3",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-b-3.js",
+ "description": "Array.prototype.some - deleted properties in step 2 are visible here",
+ "test": "assertTrue((function testcase() {\n var accessed = false;\n function callbackfn(val, idx, obj) {\n accessed = true;\n return idx === 2;\n }\n var arr = { 2: 6.99, 8: 19};\n\n Object.defineProperty(arr, \"length\", {\n get: function () {\n delete arr[2];\n return 10;\n },\n configurable: true\n });\n\n return !Array.prototype.some.call(arr, callbackfn) && accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.some) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.4.4.17-7-b-4",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-b-4.js",
+ "description": "Array.prototype.some - properties added into own object after current position are visited on an Array-like object",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(val, idx, obj) {\n if (idx === 1 && val === 1) {\n return true;\n } else {\n return false;\n }\n }\n \n var arr = { length: 2 };\n\n Object.defineProperty(arr, \"0\", {\n get: function () {\n Object.defineProperty(arr, \"1\", {\n get: function () {\n return 1;\n },\n configurable: true\n });\n return 0;\n },\n configurable: true\n });\n\n return Array.prototype.some.call(arr, callbackfn);\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.some) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects())"
+ },
+ {
+ "id": "15.4.4.17-7-b-5",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-b-5.js",
+ "description": "Array.prototype.some - properties added into own object after current position are visited on an Array",
+ "test": "assertTrue((function testcase() {\n function callbackfn(val, idx, obj) {\n if (idx === 1 && val === 1) {\n return true;\n } else {\n return false;\n }\n }\n\n var arr = [0, , 2];\n\n Object.defineProperty(arr, \"0\", {\n get: function () {\n Object.defineProperty(arr, \"1\", {\n get: function () {\n return 1;\n },\n configurable: true\n });\n return 0;\n },\n configurable: true\n });\n\n return arr.some(callbackfn);\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.some) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.4.4.17-7-b-6",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-b-6.js",
+ "description": "Array.prototype.some - properties can be added to prototype after current position are visited on an Array-like object",
+ "test": "assertTrue((function testcase() {\n function callbackfn(val, idx, obj) {\n if (idx === 1 && val === 6.99) {\n return true;\n } else {\n return false;\n }\n }\n var arr = { length: 2 };\n\n Object.defineProperty(arr, \"0\", {\n get: function () {\n Object.defineProperty(Object.prototype, \"1\", {\n get: function () {\n return 6.99;\n },\n configurable: true\n });\n return 0;\n },\n configurable: true\n });\n\n try {\n return Array.prototype.some.call(arr, callbackfn);\n } finally {\n delete Object.prototype[1];\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.some) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects())"
+ },
+ {
+ "id": "15.4.4.17-7-b-7",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-b-7.js",
+ "description": "Array.prototype.some - properties can be added to prototype after current position are visited on an Array",
+ "test": "assertTrue((function testcase() {\n function callbackfn(val, idx, obj) {\n if (idx === 1 && val === 6.99) {\n return true;\n } else {\n return false;\n }\n }\n var arr = [0, , 2];\n\n Object.defineProperty(arr, \"0\", {\n get: function () {\n Object.defineProperty(Array.prototype, \"1\", {\n get: function () {\n return 6.99;\n },\n configurable: true\n });\n return 0;\n },\n configurable: true\n });\n\n try {\n return arr.some(callbackfn);\n } finally {\n delete Array.prototype[1];\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.some) && fnExists(Object.defineProperty) && ![, 1].hasOwnProperty(0) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.4.4.17-7-b-8",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-b-8.js",
+ "description": "Array.prototype.some - deleting own property causes index property not to be visited on an Array-like object",
+ "test": "assertTrue((function testcase() {\n var accessed = false;\n function callbackfn(val, idx, obj) {\n accessed = true;\n return idx === 1;\n }\n var arr = { length: 2 };\n\n Object.defineProperty(arr, \"1\", {\n get: function () {\n return 6.99;\n },\n configurable: true\n });\n\n Object.defineProperty(arr, \"0\", {\n get: function () {\n delete arr[1];\n return 0;\n },\n configurable: true\n });\n\n return !Array.prototype.some.call(arr, callbackfn) && accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.some) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects())"
+ },
+ {
+ "id": "15.4.4.17-7-b-9",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-b-9.js",
+ "description": "Array.prototype.some - deleting own property causes index property not to be visited on an Array",
+ "test": "assertTrue((function testcase() {\n var accessed = false;\n function callbackfn(val, idx, obj) {\n accessed = true;\n return idx === 1;\n }\n var arr = [1, 2];\n\n Object.defineProperty(arr, \"1\", {\n get: function () {\n return \"6.99\";\n },\n configurable: true\n });\n\n Object.defineProperty(arr, \"0\", {\n get: function () {\n delete arr[1];\n return 0;\n },\n configurable: true\n });\n\n return !arr.some(callbackfn) && accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.some) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.4.4.17-7-c-i-1",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-i-1.js",
+ "description": "Array.prototype.some - element to be retrieved is own data property on an Array-like object",
+ "test": "assertTrue((function testcase() {\n\n var kValue = {};\n\n function callbackfn(val, idx, obj) {\n if (idx === 5) {\n return val === kValue;\n }\n return false;\n }\n\n var obj = { 5: kValue, length: 100 };\n\n return Array.prototype.some.call(obj, callbackfn);\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.some))"
+ },
+ {
+ "id": "15.4.4.17-7-c-i-10",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-i-10.js",
+ "description": "Array.prototype.some - element to be retrieved is own accessor property on an Array",
+ "test": "assertTrue((function testcase() {\n\n var kValue = \"abc\";\n\n function callbackfn(val, idx, obj) {\n if (idx === 10) {\n return val === kValue;\n }\n return false;\n }\n\n var arr = [];\n\n Object.defineProperty(arr, \"10\", {\n get: function () {\n return kValue;\n },\n configurable: true\n });\n\n return arr.some(callbackfn);\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.some) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.4.4.17-7-c-i-11",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-i-11.js",
+ "description": "Array.prototype.some - element to be retrieved is own accessor property that overrides an inherited data property on an Array-like object",
+ "test": "assertTrue((function testcase() {\n\n var kValue = \"abc\";\n\n function callbackfn(val, idx, obj) {\n if (idx === 1) {\n return val === kValue;\n }\n return false;\n }\n\n var proto = { 1: 6 };\n\n var Con = function () { };\n Con.prototype = proto;\n\n var child = new Con();\n child.length = 10;\n\n Object.defineProperty(child, \"1\", {\n get: function () {\n return kValue;\n },\n configurable: true\n });\n\n return Array.prototype.some.call(child, callbackfn);\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.some) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects())"
+ },
+ {
+ "id": "15.4.4.17-7-c-i-12",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-i-12.js",
+ "description": " Array.prototype.some - element to be retrieved is own accessor property that overrides an inherited data property on an Array",
+ "test": "assertTrue((function testcase() {\n\n var kValue = \"abc\";\n\n function callbackfn(val, idx, obj) {\n if (idx === 1) {\n return val === kValue;\n }\n return false;\n }\n \n var arr = [];\n try {\n Array.prototype[1] = 100;\n Object.defineProperty(arr, \"1\", {\n get: function () {\n return kValue;\n },\n configurable: true\n });\n\n return arr.some(callbackfn);\n } finally {\n delete Array.prototype[1];\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.some) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.4.4.17-7-c-i-13",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-i-13.js",
+ "description": "Array.prototype.some - element to be retrieved is own accessor property that overrides an inherited accessor property on an Array-like object",
+ "test": "assertTrue((function testcase() {\n\n var kValue = \"abc\";\n\n function callbackfn(val, idx, obj) {\n if (idx === 1) {\n return val === kValue;\n }\n return false;\n }\n\n var proto = {};\n\n Object.defineProperty(proto, \"1\", {\n get: function () {\n return 5;\n },\n configurable: true\n });\n\n var Con = function () { };\n Con.prototype = proto;\n\n var child = new Con();\n child.length = 10;\n\n Object.defineProperty(child, \"1\", {\n get: function () {\n return kValue;\n },\n configurable: true\n });\n\n\n return Array.prototype.some.call(child, callbackfn);\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.some) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects())"
+ },
+ {
+ "id": "15.4.4.17-7-c-i-14",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-i-14.js",
+ "description": " Array.prototype.some - element to be retrieved is own accessor property that overrides an inherited accessor property on an Array",
+ "test": "assertTrue((function testcase() {\n\n var kValue = \"abc\";\n\n function callbackfn(val, idx, obj) {\n if (idx === 1) {\n return val === kValue;\n }\n return false;\n }\n\n var arr = [];\n Object.defineProperty(arr, \"1\", {\n get: function () {\n return kValue;\n },\n configurable: true\n });\n\n try {\n Object.defineProperty(Array.prototype, \"1\", {\n get: function () {\n return 10;\n },\n configurable: true\n });\n\n return arr.some(callbackfn);\n } finally {\n delete Array.prototype[1];\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.some) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.4.4.17-7-c-i-15",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-i-15.js",
+ "description": "Array.prototype.some - element to be retrieved is inherited accessor property on an Array-like object",
+ "test": "assertTrue((function testcase() {\n\n var kValue = \"abc\";\n\n function callbackfn(val, idx, obj) {\n if (idx === 1) {\n return val === kValue;\n }\n return false;\n }\n\n var proto = {};\n\n Object.defineProperty(proto, \"1\", {\n get: function () {\n return kValue;\n },\n configurable: true\n });\n\n var Con = function () { };\n Con.prototype = proto;\n\n var child = new Con();\n child.length = 20;\n\n return Array.prototype.some.call(child, callbackfn);\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.some) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects())"
+ },
+ {
+ "id": "15.4.4.17-7-c-i-16",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-i-16.js",
+ "description": "Array.prototype.some - element to be retrieved is inherited accessor property on an Array",
+ "test": "assertTrue((function testcase() {\n\n var kValue = \"abc\";\n\n function callbackfn(val, idx, obj) {\n if (idx === 1) {\n return val === kValue;\n }\n return false;\n }\n\n try {\n Object.defineProperty(Array.prototype, \"1\", {\n get: function () {\n return kValue;\n },\n configurable: true\n });\n\n return [, , ].some(callbackfn);\n } finally {\n delete Array.prototype[1];\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.some) && fnExists(Object.defineProperty) && ![, 1].hasOwnProperty(0) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.4.4.17-7-c-i-17",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-i-17.js",
+ "description": "Array.prototype.some - element to be retrieved is own accessor property without a get function on an Array-like object",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(val, idx, obj) {\n if (idx === 1) {\n return typeof val === \"undefined\";\n }\n return false;\n }\n\n var obj = { length: 2 };\n Object.defineProperty(obj, \"1\", {\n set: function () { },\n configurable: true\n });\n\n return Array.prototype.some.call(obj, callbackfn);\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.some) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects())"
+ },
+ {
+ "id": "15.4.4.17-7-c-i-18",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-i-18.js",
+ "description": "Array.prototype.some - element to be retrieved is own accessor property without a get function on an Array",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(val, idx, obj) {\n if (idx === 0) {\n return typeof val === \"undefined\";\n }\n return false;\n }\n\n var arr = [];\n\n Object.defineProperty(arr, \"0\", {\n set: function () { },\n configurable: true\n });\n\n return arr.some(callbackfn);\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.some) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.4.4.17-7-c-i-19",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-i-19.js",
+ "description": "Array.prototype.some - element to be retrieved is own accessor property without a get function that overrides an inherited accessor property on an Array-like object",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(val, idx, obj) {\n if (idx === 1) {\n return typeof val === \"undefined\";\n }\n return false;\n }\n\n var obj = { length: 2 };\n Object.defineProperty(obj, \"1\", {\n set: function () { },\n configurable: true\n });\n try {\n Object.prototype[1] = 10;\n return Array.prototype.some.call(obj, callbackfn);\n } finally {\n delete Object.prototype[1];\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.some) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects())"
+ },
+ {
+ "id": "15.4.4.17-7-c-i-2",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-i-2.js",
+ "description": "Array.prototype.some - element to be retrieved is own data property on an Array",
+ "test": "assertTrue((function testcase() {\n\n var kValue = {};\n\n function callbackfn(val, idx, obj) {\n if (idx === 0) {\n return kValue === val;\n }\n return false;\n }\n\n return [kValue].some(callbackfn);\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.some))"
+ },
+ {
+ "id": "15.4.4.17-7-c-i-20",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-i-20.js",
+ "description": "Array.prototype.some - element to be retrieved is own accessor property without a get function that overrides an inherited accessor property on an Array",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(val, idx, obj) {\n if (idx === 0) {\n return typeof val === \"undefined\";\n }\n return false;\n }\n\n var arr = [];\n\n Object.defineProperty(arr, \"0\", {\n set: function () { },\n configurable: true\n });\n\n try {\n Array.prototype[0] = 100;\n return arr.some(callbackfn);\n } finally {\n delete Array.prototype[0];\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.some) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.4.4.17-7-c-i-21",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-i-21.js",
+ "description": "Array.prototype.some - element to be retrieved is inherited accessor property without a get function on an Array-like object",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(val, idx, obj) {\n if (idx === 1) {\n return typeof val === \"undefined\";\n }\n return false;\n }\n\n var proto = {};\n Object.defineProperty(proto, \"1\", {\n set: function () { },\n configurable: true\n });\n\n var Con = function () { };\n Con.prototype = proto;\n\n var child = new Con();\n child.length = 2;\n\n return Array.prototype.some.call(child, callbackfn);\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.some) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects())"
+ },
+ {
+ "id": "15.4.4.17-7-c-i-22",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-i-22.js",
+ "description": "Array.prototype.some - element to be retrieved is inherited accessor property without a get function on an Array",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(val, idx, obj) {\n if (idx === 0) {\n return typeof val === \"undefined\";\n }\n return false;\n }\n\n try {\n Object.defineProperty(Array.prototype, \"0\", {\n set: function () { },\n configurable: true\n });\n\n return [, ].some(callbackfn);\n } finally {\n delete Array.prototype[0];\n }\n\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.some) && fnExists(Object.defineProperty) && ![, 1].hasOwnProperty(0) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.4.4.17-7-c-i-23",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-i-23.js",
+ "description": "Array.prototype.some - This object is an global object which contains index property",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(val, idx, obj) {\n if (idx === 0) {\n return val === 11;\n }\n return false;\n }\n\n try {\n var oldLen = fnGlobalObject().length;\n fnGlobalObject()[0] = 11;\n fnGlobalObject().length = 1;\n return Array.prototype.some.call(fnGlobalObject(), callbackfn);\n } finally {\n delete fnGlobalObject()[0];\n fnGlobalObject().length = oldLen;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.some))"
+ },
+ {
+ "id": "15.4.4.17-7-c-i-25",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-i-25.js",
+ "description": "Array.prototype.some - This object is the Arguments object which implements its own property get method (number of arguments is less than number of parameters)",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(val, idx, obj) {\n if (idx === 0) {\n return val === 11;\n }\n return false;\n }\n\n var func = function (a, b) {\n return Array.prototype.some.call(arguments, callbackfn);\n };\n\n return func(11);\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.some))"
+ },
+ {
+ "id": "15.4.4.17-7-c-i-26",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-i-26.js",
+ "description": "Array.prototype.some - This object is the Arguments object which implements its own property get method (number of arguments equals number of parameters)",
+ "test": "assertTrue((function testcase() {\n\n var firstResult = false;\n var secondResult = false;\n\n function callbackfn(val, idx, obj) {\n if (idx === 0) {\n firstResult = (val === 11);\n return false;\n } else if (idx === 1) {\n secondResult = (val === 9);\n return false;\n } else {\n return true;\n }\n }\n\n var func = function (a, b) {\n return Array.prototype.some.call(arguments, callbackfn);\n };\n\n return !func(11, 9) && firstResult && secondResult;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.some))"
+ },
+ {
+ "id": "15.4.4.17-7-c-i-27",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-i-27.js",
+ "description": "Array.prototype.some - This object is the Arguments object which implements its own property get method (number of arguments is greater than number of parameters)",
+ "test": "assertTrue((function testcase() {\n\n var firstResult = false;\n var secondResult = false;\n var thirdResult = false;\n\n function callbackfn(val, idx, obj) {\n if (idx === 0) {\n firstResult = (val === 11);\n return false;\n } else if (idx === 1) {\n secondResult = (val === 12);\n return false;\n } else if (idx === 2) {\n thirdResult = (val === 9);\n return false;\n } else {\n return true;\n }\n }\n\n var func = function (a, b) {\n return Array.prototype.some.call(arguments, callbackfn);\n };\n\n return !func(11, 12, 9) && firstResult && secondResult && thirdResult;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.some))"
+ },
+ {
+ "id": "15.4.4.17-7-c-i-28",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-i-28.js",
+ "description": "Array.prototype.some - element changed by getter on previous iterations is observed on an Array",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(val, idx, obj) {\n if (idx === 1) {\n return val === 12;\n }\n return false;\n }\n\n var arr = [];\n var helpVerifyVar = 11;\n\n Object.defineProperty(arr, \"1\", {\n get: function () {\n return helpVerifyVar;\n },\n set: function (args) {\n helpVerifyVar = args;\n },\n configurable: true\n });\n\n Object.defineProperty(arr, \"0\", {\n get: function () {\n arr[1] = 12;\n return 9;\n },\n configurable: true\n });\n\n return arr.some(callbackfn);\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.some) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.4.4.17-7-c-i-29",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-i-29.js",
+ "description": "Array.prototype.some - element changed by getter on previous iterations on an Array-like object",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(val, idx, obj) {\n if (idx === 1) {\n return val === 12;\n }\n return false;\n }\n\n var obj = { length: 2 };\n var helpVerifyVar = 11;\n\n Object.defineProperty(obj, \"1\", {\n get: function () {\n return helpVerifyVar;\n },\n set: function (args) {\n helpVerifyVar = args;\n },\n configurable: true\n });\n\n Object.defineProperty(obj, \"0\", {\n get: function () {\n obj[1] = 12;\n return 11;\n },\n configurable: true\n });\n\n return Array.prototype.some.call(obj, callbackfn);\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.some) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects())"
+ },
+ {
+ "id": "15.4.4.17-7-c-i-3",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-i-3.js",
+ "description": "Array.prototype.some - element to be retrieved is own data property that overrides an inherited data property on an Array-like object",
+ "test": "assertTrue((function testcase() {\n\n var kValue = \"abc\";\n\n function callbackfn(val, idx, obj) {\n if (idx === 5) {\n return val === kValue;\n }\n return false;\n }\n\n var proto = { 5: 100 };\n\n var Con = function () { };\n Con.prototype = proto;\n\n var child = new Con();\n child[5] = kValue;\n child.length = 10;\n\n return Array.prototype.some.call(child, callbackfn);\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.some))"
+ },
+ {
+ "id": "15.4.4.17-7-c-i-30",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-i-30.js",
+ "description": "Array.prototype.some - unhandled exceptions happened in getter terminate iteration on an Array-like object",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n function callbackfn(val, idx, obj) {\n if (idx > 1) {\n accessed = true;\n }\n return true;\n }\n\n var obj = { length: 20 };\n Object.defineProperty(obj, \"1\", {\n get: function () {\n throw new RangeError(\"unhandle exception happened in getter\");\n },\n configurable: true\n });\n\n try {\n Array.prototype.some.call(obj, callbackfn);\n return false;\n } catch (ex) {\n return ex instanceof RangeError && !accessed;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.some) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects())"
+ },
+ {
+ "id": "15.4.4.17-7-c-i-31",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-i-31.js",
+ "description": "Array.prototype.some - unhandled exceptions happened in getter terminate iteration on an Array",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n function callbackfn(val, idx, obj) {\n if (idx > 0) {\n accessed = true;\n }\n return true;\n }\n\n var arr = [];\n arr[10] = 100;\n Object.defineProperty(arr, \"0\", {\n get: function () {\n throw new RangeError(\"unhandle exception happened in getter\");\n },\n configurable: true\n });\n\n try {\n arr.some(callbackfn);\n return false;\n } catch (ex) {\n return ex instanceof RangeError && !accessed;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.some) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.4.4.17-7-c-i-4",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-i-4.js",
+ "description": "Array.prototype.some - element to be retrieved is own data property that overrides an inherited data property on an Array",
+ "test": "assertTrue((function testcase() {\n\n var kValue = \"abc\";\n\n function callbackfn(val, idx, obj) {\n if (idx === 0) {\n return val === kValue;\n }\n return false;\n }\n\n try {\n Array.prototype[0] = 11;\n\n return [kValue].some(callbackfn);\n } finally {\n delete Array.prototype[0];\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.some))"
+ },
+ {
+ "id": "15.4.4.17-7-c-i-5",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-i-5.js",
+ "description": "Array.prototype.some - element to be retrieved is own data property that overrides an inherited accessor property on an Array-like object",
+ "test": "assertTrue((function testcase() {\n\n var kValue = 1000;\n\n function callbackfn(val, idx, obj) {\n if (idx === 0) {\n return val === kValue;\n }\n return false;\n }\n\n var proto = {};\n\n Object.defineProperty(proto, \"0\", {\n get: function () {\n return 5;\n },\n configurable: true\n });\n\n var Con = function () { };\n Con.prototype = proto;\n\n var child = new Con();\n child.length = 2;\n Object.defineProperty(child, \"0\", {\n value: kValue,\n configurable: true\n });\n\n return Array.prototype.some.call(child, callbackfn);\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.some) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects())"
+ },
+ {
+ "id": "15.4.4.17-7-c-i-6",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-i-6.js",
+ "description": "Array.prototype.some - element to be retrieved is own data property that overrides an inherited accessor property on an Array",
+ "test": "assertTrue((function testcase() {\n\n var kValue = 1000;\n\n function callbackfn(val, idx, obj) {\n if (idx === 0) {\n return val === kValue;\n }\n return false;\n }\n\n try {\n Object.defineProperty(Array.prototype, \"0\", {\n get: function () {\n return 9;\n },\n configurable: true\n });\n return [kValue].some(callbackfn);\n } finally {\n delete Array.prototype[0];\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.some) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.4.4.17-7-c-i-7",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-i-7.js",
+ "description": "Array.prototype.some - element to be retrieved is inherited data property on an Array-like object",
+ "test": "assertTrue((function testcase() {\n\n var kValue = 'abc';\n\n function callbackfn(val, idx, obj) {\n if (5 === idx) {\n return kValue === val;\n }\n return false;\n }\n\n var proto = { 5: kValue };\n\n var Con = function () { };\n Con.prototype = proto;\n\n var child = new Con();\n child.length = 10;\n\n return Array.prototype.some.call(child, callbackfn);\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.some))"
+ },
+ {
+ "id": "15.4.4.17-7-c-i-8",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-i-8.js",
+ "description": "Array.prototype.some - element to be retrieved is inherited data property on an Array",
+ "test": "assertTrue((function testcase() {\n\n var kValue = {};\n\n function callbackfn(val, idx, obj) {\n if (0 === idx) {\n return kValue === val;\n }\n return false;\n }\n\n try {\n Array.prototype[0] = kValue;\n\n return [, ].some(callbackfn);\n } finally {\n delete Array.prototype[0];\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.some) && ![, 1].hasOwnProperty(0))"
+ },
+ {
+ "id": "15.4.4.17-7-c-i-9",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-i-9.js",
+ "description": "Array.prototype.some - element to be retrieved is own accessor property on an Array-like object",
+ "test": "assertTrue((function testcase() {\n\n var kValue = \"abc\";\n\n function callbackfn(val, idx, obj) {\n if (idx === 10) {\n return val === kValue;\n }\n return false;\n }\n\n var obj = { length: 20 };\n\n Object.defineProperty(obj, \"10\", {\n get: function () {\n return kValue;\n },\n configurable: true\n });\n\n return Array.prototype.some.call(obj, callbackfn);\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.some) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects())"
+ },
+ {
+ "id": "15.4.4.17-7-c-ii-1",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-ii-1.js",
+ "description": "Array.prototype.some - callbackfn called with correct parameters",
+ "test": "assertTrue((function testcase() { \n \n function callbackfn(val, idx, obj)\n {\n if(obj[idx] === val)\n return false;\n else\n return true;\n }\n\n var arr = [0,1,2,3,4,5,6,7,8,9];\n \n if(arr.some(callbackfn) === false)\n return true;\n\n\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.some))"
+ },
+ {
+ "id": "15.4.4.17-7-c-ii-10",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-ii-10.js",
+ "description": "Array.prototype.some - callbackfn is called with 1 formal parameter",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(val) {\n return val > 10;\n }\n\n return [11, 12].some(callbackfn);\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.some))"
+ },
+ {
+ "id": "15.4.4.17-7-c-ii-11",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-ii-11.js",
+ "description": "Array.prototype.some - callbackfn is called with 2 formal parameter",
+ "test": "assertTrue((function testcase() {\n function callbackfn(val, idx) {\n return val > 10 && arguments[2][idx] === val;\n }\n\n return [9, 12].some(callbackfn);\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.some))"
+ },
+ {
+ "id": "15.4.4.17-7-c-ii-12",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-ii-12.js",
+ "description": "Array.prototype.some - callbackfn is called with 3 formal parameter",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(val, idx, obj) {\n return val > 10 && obj[idx] === val;\n }\n\n return [9, 12].some(callbackfn);\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.some))"
+ },
+ {
+ "id": "15.4.4.17-7-c-ii-13",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-ii-13.js",
+ "description": "Array.prototype.some - callbackfn that uses arguments object to get parameter value",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn() {\n return arguments[2][arguments[1]] === arguments[0];\n }\n\n return [9, 12].some(callbackfn);\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.some))"
+ },
+ {
+ "id": "15.4.4.17-7-c-ii-16",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-ii-16.js",
+ "description": "Array.prototype.some - 'this' of 'callback' is a Boolean object when 'T' is not an object ('T' is a boolean primitive)",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(val, idx, obj) {\n return this.valueOf() === false;\n }\n\n var obj = { 0: 11, length: 1 };\n\n return Array.prototype.some.call(obj, callbackfn, false);\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.some))"
+ },
+ {
+ "id": "15.4.4.17-7-c-ii-17",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-ii-17.js",
+ "description": "Array.prototype.some - 'this' of 'callbackfn' is a Number object when T is not an object (T is a number primitive)",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(val, idx, obj) {\n return this.valueOf() === 5;\n }\n\n var obj = { 0: 11, length: 1 };\n\n return Array.prototype.some.call(obj, callbackfn, 5);\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.some))"
+ },
+ {
+ "id": "15.4.4.17-7-c-ii-18",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-ii-18.js",
+ "description": "Array.prototype.some - 'this' of 'callbackfn' is an String object when T is not an object (T is a string primitive)",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(val, idx, obj) {\n return this.valueOf() === \"hello!\";\n }\n\n var obj = { 0: 11, 1: 9, length: 2 };\n\n return Array.prototype.some.call(obj, callbackfn, \"hello!\");\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.some))"
+ },
+ {
+ "id": "15.4.4.17-7-c-ii-19",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-ii-19.js",
+ "description": "Array.prototype.some - non-indexed properties are not called",
+ "test": "assertTrue((function testcase() {\n\n var called = 0;\n\n function callbackfn(val, idx, obj) {\n called++;\n return val === 11;\n }\n\n var obj = { 0: 9, 10: 8, non_index_property: 11, length: 20 };\n\n return !Array.prototype.some.call(obj, callbackfn) && (2 === called);\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.some))"
+ },
+ {
+ "id": "15.4.4.17-7-c-ii-2",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-ii-2.js",
+ "description": "Array.prototype.some - callbackfn takes 3 arguments",
+ "test": "assertTrue((function testcase() { \n \n function callbackfn(val, idx, obj)\n {\n if(arguments.length === 3) //verify if callbackfn was called with 3 parameters\n return false;\n else\n return true;\n }\n\n var arr = [0,1,true,null,new Object(),\"five\"];\n arr[999999] = -6.6;\n \n if(arr.some(callbackfn) === false)\n return true;\n\n\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.some))"
+ },
+ {
+ "id": "15.4.4.17-7-c-ii-20",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-ii-20.js",
+ "description": "Array.prototype.some - callbackfn called with correct parameters (thisArg is correct)",
+ "test": "assertTrue((function testcase() {\n\n var thisArg = { threshold: 10 };\n\n function callbackfn(val, idx, obj) {\n return this === thisArg;\n }\n\n var obj = { 0: 11, length: 2 };\n\n return Array.prototype.some.call(obj, callbackfn, thisArg);\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.some))"
+ },
+ {
+ "id": "15.4.4.17-7-c-ii-21",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-ii-21.js",
+ "description": "Array.prototype.some - callbackfn called with correct parameters (kValue is correct)",
+ "test": "assertTrue((function testcase() {\n\n var firstIndex = false;\n var secondIndex = false;\n\n function callbackfn(val, idx, obj) {\n if (idx === 0) {\n firstIndex = (val === 11);\n return false;\n }\n if (idx === 1) {\n secondIndex = (val === 12);\n return false;\n }\n }\n\n var obj = { 0: 11, 1: 12, length: 2 };\n\n return !Array.prototype.some.call(obj, callbackfn) && firstIndex && secondIndex;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.some))"
+ },
+ {
+ "id": "15.4.4.17-7-c-ii-22",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-ii-22.js",
+ "description": "Array.prototype.some - callbackfn called with correct parameters (the index k is correct)",
+ "test": "assertTrue((function testcase() {\n\n var firstIndex = false;\n var secondIndex = false;\n\n function callbackfn(val, idx, obj) {\n if (val === 11) {\n firstIndex = (idx === 0);\n return false;\n }\n if (val === 12) {\n secondIndex = (idx === 1);\n return false;\n }\n }\n\n var obj = { 0: 11, 1: 12, length: 2 };\n\n return !Array.prototype.some.call(obj, callbackfn) && firstIndex && secondIndex;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.some))"
+ },
+ {
+ "id": "15.4.4.17-7-c-ii-23",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-ii-23.js",
+ "description": "Array.prototype.some - callbackfn called with correct parameters (this object O is correct)",
+ "test": "assertTrue((function testcase() {\n\n var obj = { 0: 11, 1: 12, length: 2 };\n\n function callbackfn(val, idx, o) {\n return obj === o;\n }\n\n return Array.prototype.some.call(obj, callbackfn);\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.some))"
+ },
+ {
+ "id": "15.4.4.17-7-c-ii-3",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-ii-3.js",
+ "description": "Array.prototype.some immediately returns true if callbackfn returns true",
+ "test": "assertTrue((function testcase() { \n \n var callCnt = 0;\n function callbackfn(val, idx, obj)\n {\n callCnt++;\n if(idx > 5) \n return true;\n else\n return false;\n }\n\n var arr = [0,1,2,3,4,5,6,7,8,9];\n \n if(arr.some(callbackfn) === true && callCnt === 7) \n return true;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.some))"
+ },
+ {
+ "id": "15.4.4.17-7-c-ii-4",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-ii-4.js",
+ "description": "Array.prototype.some - k values are passed in ascending numeric order",
+ "test": "assertTrue((function testcase() {\n\n var arr = [0, 1, 2, 3, 4, 5];\n var lastIdx = 0;\n var called = 0;\n\n function callbackfn(val, idx, o) {\n called++;\n if (lastIdx !== idx) {\n return true;\n } else {\n lastIdx++;\n return false;\n }\n }\n\n return !arr.some(callbackfn) && arr.length === called;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.some))"
+ },
+ {
+ "id": "15.4.4.17-7-c-ii-5",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-ii-5.js",
+ "description": "Array.prototype.some - k values are accessed during each iteration and not prior to starting the loop",
+ "test": "assertTrue((function testcase() {\n\n var kIndex = [];\n\n //By below way, we could verify that k would be setted as 0, 1, ..., length - 1 in order, and each value will be setted one time.\n function callbackfn(val, idx, obj) {\n //Each position should be visited one time, which means k is accessed one time during iterations.\n if (typeof kIndex[idx] === \"undefined\") {\n //when current position is visited, its previous index should has been visited.\n if (idx !== 0 && typeof kIndex[idx - 1] === \"undefined\") {\n return true;\n }\n kIndex[idx] = 1;\n return false;\n } else {\n return true;\n }\n }\n\n return ![11, 12, 13, 14].some(callbackfn, undefined);\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.some))"
+ },
+ {
+ "id": "15.4.4.17-7-c-ii-6",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-ii-6.js",
+ "description": "Array.prototype.some - arguments to callbackfn are self consistent",
+ "test": "assertTrue((function testcase() {\n\n var obj = { 0: 11, length: 1 };\n var thisArg = {};\n\n function callbackfn() {\n return this === thisArg && arguments[0] === 11 && arguments[1] === 0 && arguments[2] === obj;\n }\n\n return Array.prototype.some.call(obj, callbackfn, thisArg);\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.some))"
+ },
+ {
+ "id": "15.4.4.17-7-c-ii-7",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-ii-7.js",
+ "description": "Array.prototype.some - unhandled exceptions happened in callbackfn terminate iteration",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n\n function callbackfn(val, idx, obj) {\n if (idx > 0) {\n accessed = true;\n }\n if (idx === 0) {\n throw new Error(\"Exception occurred in callbackfn\");\n }\n return false;\n }\n\n var obj = { 0: 9, 1: 100, 10: 11, length: 20 };\n\n try {\n Array.prototype.some.call(obj, callbackfn);\n return false;\n } catch (ex) {\n return ex instanceof Error && !accessed;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.some))"
+ },
+ {
+ "id": "15.4.4.17-7-c-ii-8",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-ii-8.js",
+ "description": "Array.prototype.some - element changed by callbackfn on previous iterations is observed",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(val, idx, obj) {\n if (idx === 0) {\n obj[idx + 1] = 11;\n }\n return val > 10;\n }\n\n var obj = { 0: 9, 1: 8, length: 2 };\n\n return Array.prototype.some.call(obj, callbackfn);\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.some))"
+ },
+ {
+ "id": "15.4.4.17-7-c-ii-9",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-ii-9.js",
+ "description": "Array.prototype.some - callbackfn is called with 0 formal parameter",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn() {\n return true;\n }\n\n return [11, 12].some(callbackfn);\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.some))"
+ },
+ {
+ "id": "15.4.4.17-7-c-iii-1",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-1.js",
+ "description": "Array.prototype.some - return value of callbackfn is undefined",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n\n function callbackfn(val, idx, obj) {\n accessed = true;\n return undefined;\n }\n\n var obj = { 0: 11, length: 2 };\n\n return !Array.prototype.some.call(obj, callbackfn) && accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.some))"
+ },
+ {
+ "id": "15.4.4.17-7-c-iii-10",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-10.js",
+ "description": "Array.prototype.some - return value of callbackfn is a number (value is Infinity)",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(val, idx, obj) {\n return Infinity;\n }\n\n return [11].some(callbackfn);\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.some))"
+ },
+ {
+ "id": "15.4.4.17-7-c-iii-11",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-11.js",
+ "description": "Array.prototype.some - return value of callbackfn is a number (value is -Infinity)",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(val, idx, obj) {\n return -Infinity;\n }\n\n return [11].some(callbackfn);\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.some))"
+ },
+ {
+ "id": "15.4.4.17-7-c-iii-12",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-12.js",
+ "description": "Array.prototype.some - return value of callbackfn is a number (value is NaN)",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n\n function callbackfn(val, idx, obj) {\n accessed = true;\n return NaN;\n }\n\n return ![11].some(callbackfn);\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.some))"
+ },
+ {
+ "id": "15.4.4.17-7-c-iii-13",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-13.js",
+ "description": "Array.prototype.some - return value of callbackfn is an empty string",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n\n function callbackfn(val, idx, obj) {\n accessed = true;\n return \"\";\n }\n\n return ![11].some(callbackfn) && accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.some))"
+ },
+ {
+ "id": "15.4.4.17-7-c-iii-14",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-14.js",
+ "description": "Array.prototype.some - return value of callbackfn is a non-empty string",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(val, idx, obj) {\n return \"non-empty string\";\n }\n\n return [11].some(callbackfn);\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.some))"
+ },
+ {
+ "id": "15.4.4.17-7-c-iii-15",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-15.js",
+ "description": "Array.prototype.some - return value of callbackfn is Function object",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(val, idx, obj) {\n return function () { };\n }\n\n return [11].some(callbackfn);\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.some))"
+ },
+ {
+ "id": "15.4.4.17-7-c-iii-16",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-16.js",
+ "description": "Array.prototype.some - return value of callbackfn is an Array object",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(val, idx, obj) {\n return new Array(10);\n }\n\n return [11].some(callbackfn);\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.some))"
+ },
+ {
+ "id": "15.4.4.17-7-c-iii-17",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-17.js",
+ "description": "Array.prototype.some - return value of callbackfn is a String object",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(val, idx, obj) {\n return new String();\n }\n\n return [11].some(callbackfn);\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.some))"
+ },
+ {
+ "id": "15.4.4.17-7-c-iii-18",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-18.js",
+ "description": "Array.prototype.some - return value of callbackfn is a Boolean object",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(val, idx, obj) {\n return new Boolean();\n }\n\n return [11].some(callbackfn);\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.some))"
+ },
+ {
+ "id": "15.4.4.17-7-c-iii-19",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-19.js",
+ "description": "Array.prototype.some - return value of callbackfn is a Number object",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(val, idx, obj) {\n return new Number();\n }\n\n return [11].some(callbackfn);\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.some))"
+ },
+ {
+ "id": "15.4.4.17-7-c-iii-2",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-2.js",
+ "description": "Array.prototype.some - return value of callbackfn is null",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n\n function callbackfn(val, idx, obj) {\n accessed = true;\n return null;\n }\n\n var obj = { 0: 11, length: 2 };\n\n return !Array.prototype.some.call(obj, callbackfn) && accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.some))"
+ },
+ {
+ "id": "15.4.4.17-7-c-iii-20",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-20.js",
+ "description": "Array.prototype.some - return value of callbackfn is the Math object",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(val, idx, obj) {\n return Math;\n }\n\n return [11].some(callbackfn);\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.some))"
+ },
+ {
+ "id": "15.4.4.17-7-c-iii-21",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-21.js",
+ "description": "Array.prototype.some - return value of callbackfn is a Date object",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(val, idx, obj) {\n return new Date();\n }\n\n return [11].some(callbackfn);\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.some))"
+ },
+ {
+ "id": "15.4.4.17-7-c-iii-22",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-22.js",
+ "description": "Array.prototype.some - return value of callbackfn is a RegExp object",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(val, idx, obj) {\n return new RegExp();\n }\n\n return [11].some(callbackfn);\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.some))"
+ },
+ {
+ "id": "15.4.4.17-7-c-iii-23",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-23.js",
+ "description": "Array.prototype.some - return value of callbackfn is the JSON object",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(val, idx, obj) {\n return JSON;\n }\n\n return [11].some(callbackfn);\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.some))"
+ },
+ {
+ "id": "15.4.4.17-7-c-iii-24",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-24.js",
+ "description": "Array.prototype.some - return value of callbackfn is an Error object",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(val, idx, obj) {\n return new EvalError();\n }\n\n return [11].some(callbackfn);\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.some))"
+ },
+ {
+ "id": "15.4.4.17-7-c-iii-25",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-25.js",
+ "description": "Array.prototype.some - return value of callbackfn is the Arguments object",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(val, idx, obj) {\n return arguments;\n }\n\n return [11].some(callbackfn);\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.some))"
+ },
+ {
+ "id": "15.4.4.17-7-c-iii-26",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-26.js",
+ "description": "Array.prototype.some - return value of callbackfn is the global object",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(val, idx, obj) {\n return fnGlobalObject();\n }\n\n return [11].some(callbackfn);\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.some))"
+ },
+ {
+ "id": "15.4.4.17-7-c-iii-28",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-28.js",
+ "description": "Array.prototype.some - true prevents further side effects",
+ "test": "assertTrue((function testcase() {\n var result = false;\n function callbackfn(val, idx, obj) {\n if (idx > 1) {\n result = true;\n }\n return val > 10;\n }\n\n var obj = { length: 20 };\n\n Object.defineProperty(obj, \"0\", {\n get: function () {\n return 8;\n },\n configurable: true\n });\n\n Object.defineProperty(obj, \"1\", {\n get: function () {\n return 11;\n },\n configurable: true\n });\n\n Object.defineProperty(obj, \"2\", {\n get: function () {\n result = true;\n return 11;\n },\n configurable: true\n });\n\n return Array.prototype.some.call(obj, callbackfn) && !result;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.some) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects())"
+ },
+ {
+ "id": "15.4.4.17-7-c-iii-29",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-29.js",
+ "description": "Array.prototype.some - return value (new Boolean(false)) of callbackfn is treated as true value",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn() {\n return new Boolean(false);\n }\n\n return [11].some(callbackfn);\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.some))"
+ },
+ {
+ "id": "15.4.4.17-7-c-iii-3",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-3.js",
+ "description": "Array.prototype.some - return value of callbackfn is a boolean (value is false)",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n\n function callbackfn(val, idx, obj) {\n accessed = true;\n return false;\n }\n\n var obj = { 0: 11, length: 2 };\n\n return !Array.prototype.some.call(obj, callbackfn) && accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.some))"
+ },
+ {
+ "id": "15.4.4.17-7-c-iii-4",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-4.js",
+ "description": "Array.prototype.some - return value of callbackfn is a boolean (value is true)",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(val, idx, obj) {\n return true;\n }\n\n var obj = { 0: 11, length: 2 };\n\n return Array.prototype.some.call(obj, callbackfn);\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.some))"
+ },
+ {
+ "id": "15.4.4.17-7-c-iii-5",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-5.js",
+ "description": "Array.prototype.some - return value of callbackfn is a number (value is 0)",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n\n function callbackfn(val, idx, obj) {\n accessed = true;\n return 0;\n }\n\n return ![11].some(callbackfn) && accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.some))"
+ },
+ {
+ "id": "15.4.4.17-7-c-iii-6",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-6.js",
+ "description": "Array.prototype.some - return value of callbackfn is a number (value is +0)",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n\n function callbackfn(val, idx, obj) {\n accessed = true;\n return +0;\n }\n\n return ![11].some(callbackfn) && accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.some))"
+ },
+ {
+ "id": "15.4.4.17-7-c-iii-7",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-7.js",
+ "description": "Array.prototype.some - return value of callbackfn is a number (value is -0)",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n\n function callbackfn(val, idx, obj) {\n accessed = true;\n return -0;\n }\n\n return ![11].some(callbackfn) && accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.some))"
+ },
+ {
+ "id": "15.4.4.17-7-c-iii-8",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-8.js",
+ "description": "Array.prototype.some - return value of callbackfn is a number (value is positive number)",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(val, idx, obj) {\n return 5;\n }\n\n return [11].some(callbackfn);\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.some))"
+ },
+ {
+ "id": "15.4.4.17-7-c-iii-9",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-7-c-iii-9.js",
+ "description": "Array.prototype.some - return value of callbackfn is a number (value is negative number)",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(val, idx, obj) {\n return -5;\n }\n\n return [11].some(callbackfn);\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.some))"
+ },
+ {
+ "id": "15.4.4.17-8-1",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-8-1.js",
+ "description": "Array.prototype.some returns false if 'length' is 0 (empty array)",
+ "test": "assertTrue((function testcase() {\n function cb(){}\n var i = [].some(cb);\n if (i === false) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.some))"
+ },
+ {
+ "id": "15.4.4.17-8-10",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-8-10.js",
+ "description": "Array.prototype.some - subclassed array when length is reduced",
+ "test": "assertTrue((function testcase() {\n foo.prototype = new Array(1, 2, 3);\n function foo() {}\n var f = new foo();\n f.length = 2;\n \n function cb(val)\n {\n if(val > 2)\n return true;\n else\n return false;\n }\n var i = f.some(cb);\n \n if (i === false) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.some))"
+ },
+ {
+ "id": "15.4.4.17-8-11",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-8-11.js",
+ "description": "Array.prototype.some returns false when all calls to callbackfn return false",
+ "test": "assertTrue((function testcase() { \n \n var callCnt = 0;\n function callbackfn(val, idx, obj)\n {\n callCnt++;\n return false;\n }\n\n var arr = [0,1,2,3,4,5,6,7,8,9];\n \n if(arr.some(callbackfn) === false && callCnt === 10) \n return true;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.some))"
+ },
+ {
+ "id": "15.4.4.17-8-12",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-8-12.js",
+ "description": "Array.prototype.some doesn't mutate the array on which it is called on",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(val, idx, obj)\n {\n return true;\n }\n var arr = [1,2,3,4,5];\n arr.some(callbackfn);\n if(arr[0] === 1 &&\n arr[1] === 2 &&\n arr[2] === 3 &&\n arr[3] === 4 &&\n arr[4] === 5)\n {\n return true;\n }\n\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.some))"
+ },
+ {
+ "id": "15.4.4.17-8-13",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-8-13.js",
+ "description": "Array.prototype.some doesn't visit expandos",
+ "test": "assertTrue((function testcase() { \n \n var callCnt = 0;\n function callbackfn(val, idx, obj)\n {\n callCnt++;\n return false;\n }\n\n var arr = [0,1,2,3,4,5,6,7,8,9];\n arr[\"i\"] = 10;\n arr[true] = 11;\n \n if(arr.some(callbackfn) === false && callCnt === 10) \n return true;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.some))"
+ },
+ {
+ "id": "15.4.4.17-8-2",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-8-2.js",
+ "description": "Array.prototype.some returns false if 'length' is 0 (subclassed Array, length overridden to null (type conversion))",
+ "test": "assertTrue((function testcase() {\n foo.prototype = new Array(1, 2, 3);\n function foo() {}\n var f = new foo();\n f.length = null;\n \n function cb(){}\n var i = f.some(cb);\n \n if (i === false) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.some))"
+ },
+ {
+ "id": "15.4.4.17-8-3",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-8-3.js",
+ "description": "Array.prototype.some returns false if 'length' is 0 (subclassed Array, length overridden to false (type conversion))",
+ "test": "assertTrue((function testcase() {\n foo.prototype = new Array(1, 2, 3);\n function foo() {}\n var f = new foo();\n f.length = false;\n \n function cb(){}\n var i = f.some(cb);\n \n if (i === false) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.some))"
+ },
+ {
+ "id": "15.4.4.17-8-4",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-8-4.js",
+ "description": "Array.prototype.some returns false if 'length' is 0 (subclassed Array, length overridden to 0 (type conversion))",
+ "test": "assertTrue((function testcase() {\n foo.prototype = new Array(1, 2, 3);\n function foo() {}\n var f = new foo();\n f.length = 0;\n \n function cb(){}\n var i = f.some(cb);\n \n if (i === false) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.some))"
+ },
+ {
+ "id": "15.4.4.17-8-5",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-8-5.js",
+ "description": "Array.prototype.some returns false if 'length' is 0 (subclassed Array, length overridden to '0' (type conversion))",
+ "test": "assertTrue((function testcase() {\n foo.prototype = new Array(1, 2, 3);\n function foo() {}\n var f = new foo();\n f.length = '0';\n \n function cb(){}\n var i = f.some(cb);\n \n if (i === false) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.some))"
+ },
+ {
+ "id": "15.4.4.17-8-6",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-8-6.js",
+ "description": "Array.prototype.some returns false if 'length' is 0 (subclassed Array, length overridden with obj with valueOf)",
+ "test": "assertTrue((function testcase() {\n foo.prototype = new Array(1, 2, 3);\n function foo() {}\n var f = new foo();\n \n var o = { valueOf: function () { return 0;}};\n f.length = o;\n \n function cb(){}\n var i = f.some(cb);\n \n if (i === false) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.some))"
+ },
+ {
+ "id": "15.4.4.17-8-7",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-8-7.js",
+ "description": "Array.prototype.some returns false if 'length' is 0 (subclassed Array, length overridden with obj w/o valueOf (toString))",
+ "test": "assertTrue((function testcase() {\n foo.prototype = new Array(1, 2, 3);\n function foo() {}\n var f = new foo();\n \n var o = { toString: function () { return '0';}};\n f.length = o;\n \n // objects inherit the default valueOf method of the Object object;\n // that simply returns the itself. Since the default valueOf() method\n // does not return a primitive value, ES next tries to convert the object\n // to a number by calling its toString() method and converting the\n // resulting string to a number.\n\n function cb(){}\n var i = f.some(cb);\n \n if (i === false) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.some))"
+ },
+ {
+ "id": "15.4.4.17-8-8",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-8-8.js",
+ "description": "Array.prototype.some returns false if 'length' is 0 (subclassed Array, length overridden with []",
+ "test": "assertTrue((function testcase() {\n foo.prototype = new Array(1, 2, 3);\n function foo() {}\n var f = new foo();\n \n f.length = [];\n \n // objects inherit the default valueOf method of the Object object;\n // that simply returns the itself. Since the default valueOf() method\n // does not return a primitive value, ES next tries to convert the object\n // to a number by calling its toString() method and converting the\n // resulting string to a number.\n //\n // The toString( ) method on Array converts the array elements to strings,\n // then returns the result of concatenating these strings, with commas in\n // between. An array with no elements converts to the empty string, which\n // converts to the number 0. If an array has a single element that is a\n // number n, the array converts to a string representation of n, which is\n // then converted back to n itself. If an array contains more than one element,\n // or if its one element is not a number, the array converts to NaN.\n\n function cb(){}\n var i = f.some(cb);\n \n if (i === false) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.some))"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.4.4.18.json b/website/resources/scripts/testcases2/15.4.4.18.json
new file mode 100644
index 000000000..d7a1c878b
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.4.4.18.json
@@ -0,0 +1,1310 @@
+{
+ "testCollection": {
+ "name": "15.4.4.18",
+ "numTests": 186,
+ "tests": [
+ {
+ "id": "15.4.4.18-0-1",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-0-1.js",
+ "description": "Array.prototype.forEach must exist as a function",
+ "test": "assertTrue((function testcase() {\n var f = Array.prototype.forEach;\n if (typeof(f) === \"function\") {\n return true;\n }\n }).call(this));\n"
+ },
+ {
+ "id": "15.4.4.18-0-2",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-0-2.js",
+ "description": "Array.prototype.forEach.length must be 1",
+ "test": "assertTrue((Array.prototype.forEach.length === 1));\n",
+ "precondition": "(fnExists(Array.prototype.forEach))"
+ },
+ {
+ "id": "15.4.4.18-1-1",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-1-1.js",
+ "description": "Array.prototype.forEach applied to undefined",
+ "test": "assertTrue((function testcase() {\n try {\n Array.prototype.forEach.call(undefined); // TypeError is thrown if value is undefined\n return false;\n } catch (e) {\n return (e instanceof TypeError);\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.forEach))"
+ },
+ {
+ "id": "15.4.4.18-1-10",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-1-10.js",
+ "description": "Array.prototype.forEach applied to the Math object",
+ "test": "assertTrue((function testcase() {\n var result = false;\n\n function callbackfn(val, idx, obj) {\n result = ('[object Math]' === Object.prototype.toString.call(obj));\n }\n\n try {\n Math.length = 1;\n Math[0] = 1;\n Array.prototype.forEach.call(Math, callbackfn);\n return result;\n } finally {\n delete Math[0];\n delete Math.length;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.forEach))"
+ },
+ {
+ "id": "15.4.4.18-1-11",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-1-11.js",
+ "description": "Array.prototype.forEach applied to Date object",
+ "test": "assertTrue((function testcase() {\n var result = false;\n function callbackfn(val, idx, obj) {\n result = obj instanceof Date;\n }\n\n var obj = new Date();\n obj.length = 1;\n obj[0] = 1;\n\n Array.prototype.forEach.call(obj, callbackfn);\n return result;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.forEach))"
+ },
+ {
+ "id": "15.4.4.18-1-12",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-1-12.js",
+ "description": "Array.prototype.forEach applied to RegExp object",
+ "test": "assertTrue((function testcase() {\n var result = false;\n function callbackfn(val, idx, obj) {\n result = obj instanceof RegExp;\n }\n\n var obj = new RegExp();\n obj.length = 1;\n obj[0] = 1;\n\n Array.prototype.forEach.call(obj, callbackfn);\n return result;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.forEach))"
+ },
+ {
+ "id": "15.4.4.18-1-13",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-1-13.js",
+ "description": "Array.prototype.forEach applied to the JSON object",
+ "test": "assertTrue((function testcase() {\n var result = false;\n function callbackfn(val, idx, obj) {\n result = ('[object JSON]' === Object.prototype.toString.call(obj));\n }\n\n try {\n JSON.length = 1;\n JSON[0] = 1;\n Array.prototype.forEach.call(JSON, callbackfn);\n return result;\n } finally {\n delete JSON.length;\n delete JSON[0];\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.forEach))"
+ },
+ {
+ "id": "15.4.4.18-1-14",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-1-14.js",
+ "description": "Array.prototype.forEach applied to Error object",
+ "test": "assertTrue((function testcase() {\n var result = false;\n function callbackfn(val, idx, obj) {\n result = obj instanceof Error;\n }\n\n var obj = new Error();\n obj.length = 1;\n obj[0] = 1;\n\n Array.prototype.forEach.call(obj, callbackfn);\n return result;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.forEach))"
+ },
+ {
+ "id": "15.4.4.18-1-15",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-1-15.js",
+ "description": "Array.prototype.forEach applied to the Arguments object",
+ "test": "assertTrue((function testcase() {\n var result = false;\n function callbackfn(val, idx, obj) {\n result = ('[object Arguments]' === Object.prototype.toString.call(obj));\n }\n\n var obj = (function () {\n return arguments;\n }(\"a\", \"b\"));\n\n Array.prototype.forEach.call(obj, callbackfn);\n return result;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.forEach))"
+ },
+ {
+ "id": "15.4.4.18-1-2",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-1-2.js",
+ "description": "Array.prototype.forEach applied to null",
+ "test": "assertTrue((function testcase() {\n try {\n Array.prototype.forEach.call(null); // TypeError is thrown if value is null\n return false;\n } catch (e) {\n return (e instanceof TypeError);\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.forEach))"
+ },
+ {
+ "id": "15.4.4.18-1-3",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-1-3.js",
+ "description": "Array.prototype.forEach applied to boolean primitive",
+ "test": "assertTrue((function testcase() {\n var result = false;\n\n function callbackfn(val, idx, obj) {\n result = obj instanceof Boolean;\n }\n\n try {\n Boolean.prototype[0] = true;\n Boolean.prototype.length = 1;\n\n Array.prototype.forEach.call(false, callbackfn);\n return result;\n\n } finally {\n delete Boolean.prototype[0];\n delete Boolean.prototype.length;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.forEach))"
+ },
+ {
+ "id": "15.4.4.18-1-4",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-1-4.js",
+ "description": "Array.prototype.forEach applied to Boolean object",
+ "test": "assertTrue((function testcase() {\n var result = false;\n function callbackfn(val, idx, obj) {\n result = obj instanceof Boolean;\n }\n\n var obj = new Boolean(true);\n obj.length = 2;\n obj[0] = 11;\n obj[1] = 12;\n\n Array.prototype.forEach.call(obj, callbackfn);\n return result;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.forEach))"
+ },
+ {
+ "id": "15.4.4.18-1-5",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-1-5.js",
+ "description": "Array.prototype.forEach applied to number primitive",
+ "test": "assertTrue((function testcase() {\n var result = false;\n function callbackfn(val, idx, obj) {\n result = obj instanceof Number;\n }\n\n try {\n Number.prototype[0] = 1;\n Number.prototype.length = 1;\n\n Array.prototype.forEach.call(2.5, callbackfn);\n return result;\n } finally {\n delete Number.prototype[0];\n delete Number.prototype.length;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.forEach))"
+ },
+ {
+ "id": "15.4.4.18-1-6",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-1-6.js",
+ "description": "Array.prototype.forEach applied to Number object",
+ "test": "assertTrue((function testcase() {\n var result = false;\n function callbackfn(val, idx, obj) {\n result = obj instanceof Number;\n }\n\n var obj = new Number(-128);\n obj.length = 2;\n obj[0] = 11;\n obj[1] = 12;\n\n Array.prototype.forEach.call(obj, callbackfn);\n\n return result;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.forEach))"
+ },
+ {
+ "id": "15.4.4.18-1-7",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-1-7.js",
+ "description": "Array.prototype.forEach applied to string primitive",
+ "test": "assertTrue((function testcase() {\n var result = false;\n function callbackfn(val, idx, obj) {\n result = obj instanceof String;\n }\n\n Array.prototype.forEach.call(\"abc\", callbackfn);\n return result;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.forEach))"
+ },
+ {
+ "id": "15.4.4.18-1-8",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-1-8.js",
+ "description": "Array.prototype.forEach applied to String object",
+ "test": "assertTrue((function testcase() {\n var result = false;\n function callbackfn(val, idx, obj) {\n result = obj instanceof String;\n }\n\n var obj = new String(\"abc\");\n Array.prototype.forEach.call(obj, callbackfn);\n\n return result;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.forEach))"
+ },
+ {
+ "id": "15.4.4.18-1-9",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-1-9.js",
+ "description": "Array.prototype.forEach applied to Function object",
+ "test": "assertTrue((function testcase() {\n var result = false;\n function callbackfn(val, idx, obj) {\n result = obj instanceof Function;\n }\n\n var obj = function (a, b) {\n return a + b;\n };\n obj[0] = 11;\n obj[1] = 9;\n\n Array.prototype.forEach.call(obj, callbackfn);\n return result;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.forEach))"
+ },
+ {
+ "id": "15.4.4.18-2-1",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-2-1.js",
+ "description": "Array.prototype.forEach - 'length' is own data property on an Array-like object",
+ "test": "assertTrue((function testcase() {\n var result = false;\n function callbackfn(val, idx, obj) {\n result = (obj.length === 2);\n }\n\n var obj = {\n 0: 12,\n 1: 11,\n 2: 9,\n length: 2\n };\n\n Array.prototype.forEach.call(obj, callbackfn);\n return result;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.forEach))"
+ },
+ {
+ "id": "15.4.4.18-2-10",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-2-10.js",
+ "description": "Array.prototype.forEach applied to Array-like object, 'length' is an inherited accessor property",
+ "test": "assertTrue((function testcase() {\n var result = false;\n function callbackfn(val, idx, obj) {\n result = (obj.length === 2);\n }\n\n var proto = {};\n\n Object.defineProperty(proto, \"length\", {\n get: function () {\n return 2;\n },\n configurable: true\n });\n\n var Con = function () { };\n Con.prototype = proto;\n\n var child = new Con();\n child[0] = 12;\n child[1] = 11;\n child[2] = 9;\n\n Array.prototype.forEach.call(child, callbackfn);\n return result;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.forEach) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.4.4.18-2-11",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-2-11.js",
+ "description": "Array.prototype.forEach applied to Array-like object, 'length' is an own accessor property without a get function",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n function callbackfn(val, idx, obj) {\n accessed = true;\n }\n\n var obj = {\n 0: 11,\n 1: 12\n };\n Object.defineProperty(obj, \"length\", {\n set: function () { },\n configurable: true\n });\n\n Array.prototype.forEach.call(obj, callbackfn);\n return !accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.forEach) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.4.4.18-2-12",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-2-12.js",
+ "description": "Array.prototype.forEach - 'length' is own accessor property without a get function that overrides an inherited accessor property on an Array",
+ "test": "assertTrue((function testcase() {\n var accessed = false;\n function callbackfn(val, idx, obj) {\n accessed = true;\n }\n\n try {\n Object.defineProperty(Object.prototype, \"length\", {\n get: function () {\n return 2;\n },\n configurable: true\n });\n\n var obj = { 0: 12, 1: 11 };\n Object.defineProperty(obj, \"length\", {\n set: function () { },\n configurable: true\n });\n\n Array.prototype.forEach.call(obj, callbackfn);\n return !accessed;\n } finally {\n delete Object.prototype.length;\n }\n\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.forEach) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.4.4.18-2-13",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-2-13.js",
+ "description": "Array.prototype.forEach applied to the Array-like object that 'length' is inherited accessor property without a get function",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n\n function callbackfn(val, idx, obj) {\n accessed = true;\n }\n\n var proto = {};\n Object.defineProperty(proto, \"length\", {\n set: function () { },\n configurable: true\n });\n\n var Con = function () { };\n Con.prototype = proto;\n\n var child = new Con();\n child[0] = 11;\n child[1] = 12;\n\n Array.prototype.forEach.call(child, callbackfn);\n return !accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.forEach) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.4.4.18-2-14",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-2-14.js",
+ "description": "Array.prototype.forEach applied to the Array-like object that 'length' property doesn't exist",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n\n function callbackfn(val, idx, obj) {\n accessed = true;\n }\n\n var obj = { 0: 11, 1: 12 };\n\n Array.prototype.forEach.call(obj, callbackfn);\n return !accessed;\n\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.forEach))"
+ },
+ {
+ "id": "15.4.4.18-2-15",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-2-15.js",
+ "description": "Array.prototype.forEach - 'length' is property of the global object",
+ "test": "assertTrue((function testcase() {\n var result = false;\n function callbackfn(val, idx, obj) {\n result = (obj.length === 2);\n }\n\n try {\n var oldLen = fnGlobalObject().length;\n fnGlobalObject()[0] = 12;\n fnGlobalObject()[1] = 11;\n fnGlobalObject()[2] = 9;\n fnGlobalObject().length = 2;\n Array.prototype.forEach.call(fnGlobalObject(), callbackfn);\n return result;\n } finally {\n delete fnGlobalObject()[0];\n delete fnGlobalObject()[1];\n delete fnGlobalObject()[2];\n fnGlobalObject().length = oldLen;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.forEach))"
+ },
+ {
+ "id": "15.4.4.18-2-17",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-2-17.js",
+ "description": "Array.prototype.forEach applied to the Arguments object, which implements its own property get method",
+ "test": "assertTrue((function testcase() {\n var result = false;\n function callbackfn(val, idx, obj) {\n result = (obj.length === 2);\n }\n\n var func = function (a, b) {\n arguments[2] = 9;\n Array.prototype.forEach.call(arguments, callbackfn);\n return result;\n };\n\n return func(12, 11);\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.forEach))"
+ },
+ {
+ "id": "15.4.4.18-2-18",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-2-18.js",
+ "description": "Array.prototype.forEach applied to String object, which implements its own property get method",
+ "test": "assertTrue((function testcase() {\n var result = false;\n function callbackfn(val, idx, obj) {\n result = (obj.length === 3);\n }\n\n var str = new String(\"012\");\n\n Array.prototype.forEach.call(str, callbackfn);\n return result;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.forEach))"
+ },
+ {
+ "id": "15.4.4.18-2-19",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-2-19.js",
+ "description": "Array.prototype.forEach applied to Function object, which implements its own property get method",
+ "test": "assertTrue((function testcase() {\n var result = false;\n function callbackfn(val, idx, obj) {\n result = (obj.length === 2);\n }\n\n var fun = function (a, b) {\n return a + b;\n };\n fun[0] = 12;\n fun[1] = 11;\n fun[2] = 9;\n\n Array.prototype.forEach.call(fun, callbackfn);\n return result;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.forEach))"
+ },
+ {
+ "id": "15.4.4.18-2-2",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-2-2.js",
+ "description": "Array.prototype.forEach - 'length' is own data property on an Array",
+ "test": "assertTrue((function testcase() {\n var result = false;\n function callbackfn(val, idx, obj) {\n result = (obj.length === 2);\n }\n\n [12, 11].forEach(callbackfn);\n return result;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.forEach))"
+ },
+ {
+ "id": "15.4.4.18-2-3",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-2-3.js",
+ "description": "Array.prototype.forEach - 'length' is an own data property that overrides an inherited data property on an Array-like object",
+ "test": "assertTrue((function testcase() {\n var result = false;\n function callbackfn(val, idx, obj) {\n result = (obj.length === 2);\n }\n\n var proto = { length: 3 };\n\n var Con = function () { };\n Con.prototype = proto;\n\n var child = new Con();\n child.length = 2;\n child[0] = 12;\n child[1] = 11;\n child[2] = 9;\n\n Array.prototype.forEach.call(child, callbackfn);\n return result;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.forEach))"
+ },
+ {
+ "id": "15.4.4.18-2-4",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-2-4.js",
+ "description": "Array.prototype.forEach - 'length' is own data property that overrides an inherited data property on an Array",
+ "test": "assertTrue((function testcase() {\n var result = false;\n var arrProtoLen;\n function callbackfn(val, idx, obj) {\n result = (obj.length === 2);\n }\n\n try {\n arrProtoLen = Array.prototype.length;\n Array.prototype.length = 0;\n [12, 11].forEach(callbackfn);\n return result;\n } finally {\n Array.prototype.length = arrProtoLen;\n }\n\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.forEach))"
+ },
+ {
+ "id": "15.4.4.18-2-5",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-2-5.js",
+ "description": "Array.prototype.forEach applied to Array-like object, 'length' is an own data property that overrides an inherited accessor property",
+ "test": "assertTrue((function testcase() {\n var result = false;\n function callbackfn(val, idx, obj) {\n result = (obj.length === 2);\n }\n\n var proto = {};\n\n Object.defineProperty(proto, \"length\", {\n get: function () {\n return 3;\n },\n configurable: true\n });\n\n var Con = function () { };\n Con.prototype = proto;\n\n var child = new Con();\n Object.defineProperty(child, \"length\", {\n value: 2,\n configurable: true\n });\n child[0] = 12;\n child[1] = 11;\n child[2] = 9;\n\n Array.prototype.forEach.call(child, callbackfn);\n return result;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.forEach) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.4.4.18-2-6",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-2-6.js",
+ "description": "Array.prototype.forEach applied to Array-like object, 'length' is an inherited data property",
+ "test": "assertTrue((function testcase() {\n var result = false;\n function callbackfn(val, idx, obj) {\n result = (obj.length === 2);\n }\n\n var proto = { length: 2 };\n\n var Con = function () { };\n Con.prototype = proto;\n\n var child = new Con();\n child[0] = 12;\n child[1] = 11;\n child[2] = 9;\n\n Array.prototype.forEach.call(child, callbackfn);\n return result;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.forEach))"
+ },
+ {
+ "id": "15.4.4.18-2-7",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-2-7.js",
+ "description": "Array.prototype.forEach applied to Array-like object, 'length' is an own accessor property",
+ "test": "assertTrue((function testcase() {\n var result = false;\n function callbackfn(val, idx, obj) {\n result = (obj.length === 2);\n }\n\n var obj = {};\n\n Object.defineProperty(obj, \"length\", {\n get: function () {\n return 2;\n },\n configurable: true\n });\n\n obj[0] = 12;\n obj[1] = 11;\n obj[2] = 9;\n\n Array.prototype.forEach.call(obj, callbackfn);\n return result;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.forEach) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.4.4.18-2-8",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-2-8.js",
+ "description": "Array.prototype.forEach applied to Array-like object, 'length' is an own accessor property that overrides an inherited data property",
+ "test": "assertTrue((function testcase() {\n var result = false;\n function callbackfn(val, idx, obj) {\n result = (obj.length === 2);\n }\n\n var proto = { length: 3 };\n\n var Con = function () { };\n Con.prototype = proto;\n\n var child = new Con();\n\n Object.defineProperty(child, \"length\", {\n get: function () {\n return 2;\n },\n configurable: true\n });\n\n child[0] = 12;\n child[1] = 11;\n child[2] = 9;\n\n Array.prototype.forEach.call(child, callbackfn);\n return result;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.forEach) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.4.4.18-2-9",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-2-9.js",
+ "description": "Array.prototype.forEach applied to Array-like object, 'length' is an own accessor property that overrides an inherited accessor property",
+ "test": "assertTrue((function testcase() {\n var result = false;\n function callbackfn(val, idx, obj) {\n result = (obj.length === 2);\n }\n\n var proto = {};\n\n Object.defineProperty(proto, \"length\", {\n get: function () {\n return 3;\n },\n configurable: true\n });\n\n var Con = function () { };\n Con.prototype = proto;\n\n var child = new Con();\n\n Object.defineProperty(child, \"length\", {\n get: function () {\n return 2;\n },\n configurable: true\n });\n\n child[0] = 12;\n child[1] = 11;\n child[2] = 9;\n\n Array.prototype.forEach.call(child, callbackfn);\n return result;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.forEach) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.4.4.18-3-1",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-1.js",
+ "description": "Array.prototype.forEach - value of 'length' is undefined",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n\n function callbackfn(val, idx, obj) {\n accessed = true;\n }\n\n var obj = { 0: 0, 1: 1, length: undefined };\n\n Array.prototype.forEach.call(obj, callbackfn);\n\n return !accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.forEach))"
+ },
+ {
+ "id": "15.4.4.18-3-10",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-10.js",
+ "description": "Array.prototype.forEach - value of 'length' is a number (value is NaN)",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n\n function callbackfn(val, idx, obj) {\n accessed = true;\n }\n\n var obj = { 0: 9, length: NaN };\n\n Array.prototype.forEach.call(obj, callbackfn);\n\n return !accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.forEach))"
+ },
+ {
+ "id": "15.4.4.18-3-11",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-11.js",
+ "description": "Array.prototype.forEach - 'length' is a string containing a positive number",
+ "test": "assertTrue((function testcase() {\n\n var testResult = false;\n\n function callbackfn(val, idx, obj) {\n testResult = (val > 10);\n }\n\n var obj = { 1: 11, 2: 9, length: \"2\" };\n\n Array.prototype.forEach.call(obj, callbackfn);\n\n return testResult;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.forEach))"
+ },
+ {
+ "id": "15.4.4.18-3-12",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-12.js",
+ "description": "Array.prototype.forEach - 'length' is a string containing a negative number",
+ "test": "assertTrue((function testcase() {\n\n var testResult = false;\n\n function callbackfn(val, idx, obj) {\n testResult = (val > 10);\n }\n\n var obj = { 1: 11, 2: 9, length: \"-4294967294\" };\n\n Array.prototype.forEach.call(obj, callbackfn);\n\n return testResult;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.forEach))"
+ },
+ {
+ "id": "15.4.4.18-3-13",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-13.js",
+ "description": "Array.prototype.forEach - 'length' is a string containing a decimal number",
+ "test": "assertTrue((function testcase() {\n\n var testResult = false;\n\n function callbackfn(val, idx, obj) {\n testResult = (val > 10);\n }\n var obj = { 1: 11, 2: 9, length: \"2.5\" };\n\n Array.prototype.forEach.call(obj, callbackfn);\n\n return testResult;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.forEach))"
+ },
+ {
+ "id": "15.4.4.18-3-14",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-14.js",
+ "description": "Array.prototype.forEach - 'length' is a string containing +/-Infinity",
+ "test": "assertTrue((function testcase() {\n\n var accessed1 = false;\n var accessed2 = false;\n var accessed3 = false;\n\n function callbackfn1(val, idx, obj) {\n accessed1 = true;\n }\n\n function callbackfn2(val, idx, obj) {\n accessed2 = true;\n }\n\n function callbackfn3(val, idx, obj) {\n accessed3 = true;\n }\n\n var obj1 = { 0: 9, length: \"Infinity\" };\n var obj2 = { 0: 9, length: \"-Infinity\" };\n var obj3 = { 0: 9, length: \"+Infinity\" };\n\n Array.prototype.forEach.call(obj1, callbackfn1);\n Array.prototype.forEach.call(obj2, callbackfn2);\n Array.prototype.forEach.call(obj3, callbackfn3);\n\n return !accessed1 && !accessed2 && !accessed3;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.forEach))"
+ },
+ {
+ "id": "15.4.4.18-3-15",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-15.js",
+ "description": "Array.prototype.forEach - 'length' is a string containing an exponential number",
+ "test": "assertTrue((function testcase() {\n\n var testResult = false;\n\n function callbackfn(val, idx, obj) {\n testResult = (val > 10);\n }\n\n var obj = { 1: 11, 2: 9, length: \"2E0\" };\n\n Array.prototype.forEach.call(obj, callbackfn);\n return testResult;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.forEach))"
+ },
+ {
+ "id": "15.4.4.18-3-16",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-16.js",
+ "description": "Array.prototype.forEach - 'length' is a string containing a hex number",
+ "test": "assertTrue((function testcase() {\n\n var testResult = false;\n\n function callbackfn(val, idx, obj) {\n testResult = (val > 10);\n }\n\n var obj = { 1: 11, 2: 9, length: \"0x0002\" };\n\n Array.prototype.forEach.call(obj, callbackfn);\n\n return testResult;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.forEach))"
+ },
+ {
+ "id": "15.4.4.18-3-17",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-17.js",
+ "description": "Array.prototype.forEach - 'length' is a string containing a number with leading zeros",
+ "test": "assertTrue((function testcase() {\n\n var testResult = false;\n\n function callbackfn(val, idx, obj) {\n testResult = (val > 10);\n }\n\n var obj = { 1: 11, 2: 9, length: \"0002.00\" };\n\n Array.prototype.forEach.call(obj, callbackfn);\n\n return testResult;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.forEach))"
+ },
+ {
+ "id": "15.4.4.18-3-18",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-18.js",
+ "description": "Array.prototype.forEach - value of 'length' is a string that can't convert to a number",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n\n function callbackfn(val, idx, obj) {\n accessed = true;\n }\n\n var obj = { 0: 9, length: \"asdf!_\" };\n\n Array.prototype.forEach.call(obj, callbackfn);\n\n return !accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.forEach))"
+ },
+ {
+ "id": "15.4.4.18-3-19",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-19.js",
+ "description": "Array.prototype.forEach - value of 'length' is an Object which has an own toString method.",
+ "test": "assertTrue((function testcase() {\n\n var testResult = false;\n\n function callbackfn(val, idx, obj) {\n testResult = (val > 10);\n }\n\n var obj = {\n 1: 11,\n 2: 9,\n length: {\n toString: function () {\n return '2';\n }\n }\n };\n\n Array.prototype.forEach.call(obj, callbackfn);\n\n return testResult;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.forEach))"
+ },
+ {
+ "id": "15.4.4.18-3-2",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-2.js",
+ "description": "Array.prototype.forEach - value of 'length' is a boolean (value is true)",
+ "test": "assertTrue((function testcase() {\n\n var testResult = false;\n function callbackfn(val, idx, obj) {\n testResult = (val > 10);\n }\n\n var obj = { 0: 11, 1: 9, length: true };\n\n Array.prototype.forEach.call(obj, callbackfn);\n\n return testResult;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.forEach))"
+ },
+ {
+ "id": "15.4.4.18-3-20",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-20.js",
+ "description": "Array.prototype.forEach - value of 'length' is an Object which has an own valueOf method.",
+ "test": "assertTrue((function testcase() {\n\n var testResult = false;\n\n function callbackfn(val, idx, obj) {\n testResult = (val > 10);\n }\n\n var obj = {\n 1: 11,\n 2: 9,\n length: {\n valueOf: function () {\n return 2;\n }\n }\n };\n\n Array.prototype.forEach.call(obj, callbackfn);\n\n return testResult;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.forEach))"
+ },
+ {
+ "id": "15.4.4.18-3-21",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-21.js",
+ "description": "Array.prototype.forEach - 'length' is an object that has an own valueOf method that returns an object and toString method that returns a string",
+ "test": "assertTrue((function testcase() {\n\n var testResult = false;\n var firstStepOccured = false;\n var secondStepOccured = false;\n\n function callbackfn(val, idx, obj) {\n testResult = (val > 10);\n }\n\n var obj = {\n 1: 11,\n 2: 9,\n length: {\n valueOf: function () {\n firstStepOccured = true;\n return {};\n },\n toString: function () {\n secondStepOccured = true;\n return '2';\n }\n }\n };\n\n Array.prototype.forEach.call(obj, callbackfn);\n\n return testResult && firstStepOccured && secondStepOccured;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.forEach))"
+ },
+ {
+ "id": "15.4.4.18-3-22",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-22.js",
+ "description": "Array.prototype.forEach throws TypeError exception when 'length' is an object with toString and valueOf methods that don�t return primitive values",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n var firstStepOccured = false;\n var secondStepOccured = false;\n\n function callbackfn(val, idx, obj) {\n accessed = true;\n }\n\n var obj = {\n 1: 11,\n 2: 12,\n\n length: {\n valueOf: function () {\n firstStepOccured = true;\n return {};\n },\n toString: function () {\n secondStepOccured = true;\n return {};\n }\n }\n };\n\n try {\n Array.prototype.forEach.call(obj, callbackfn);\n return false;\n } catch (ex) {\n return ex instanceof TypeError && !accessed;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.forEach))"
+ },
+ {
+ "id": "15.4.4.18-3-23",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-23.js",
+ "description": "Array.prototype.forEach uses inherited valueOf method when 'length' is an object with an own toString and inherited valueOf methods",
+ "test": "assertTrue((function testcase() {\n\n var testResult = false;\n var valueOfAccessed = false;\n var toStringAccessed = false;\n\n function callbackfn(val, idx, obj) {\n testResult = (val > 10);\n }\n\n var proto = {\n valueOf: function () {\n valueOfAccessed = true;\n return 2;\n }\n };\n\n var Con = function () { };\n Con.prototype = proto;\n\n var child = new Con();\n\n child.toString = function () {\n toStringAccessed = true;\n return '1';\n };\n\n var obj = {\n 1: 11,\n 2: 9,\n length: child\n };\n\n Array.prototype.forEach.call(obj, callbackfn);\n\n return testResult && valueOfAccessed && !toStringAccessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.forEach))"
+ },
+ {
+ "id": "15.4.4.18-3-24",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-24.js",
+ "description": "Array.prototype.forEach - value of 'length' is a positive non-integer, ensure truncation occurs in the proper direction",
+ "test": "assertTrue((function testcase() {\n\n var testResult = false;\n\n function callbackfn(val, idx, obj) {\n testResult = (val > 10);\n }\n\n var obj = {\n 1: 11,\n 2: 9,\n length: 2.685\n };\n\n Array.prototype.forEach.call(obj, callbackfn);\n\n return testResult;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.forEach))"
+ },
+ {
+ "id": "15.4.4.18-3-25",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-25.js",
+ "description": "Array.prototype.forEach - value of 'length' is a negative non-integer, ensure truncation occurs in the proper direction",
+ "test": "assertTrue((function testcase() {\n\n var testResult = false;\n\n function callbackfn(val, idx, obj) {\n testResult = (val > 10);\n }\n\n var obj = {\n 1: 11,\n 2: 9,\n length: -4294967294.5\n };\n\n Array.prototype.forEach.call(obj, callbackfn);\n\n return testResult;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.forEach))"
+ },
+ {
+ "id": "15.4.4.18-3-28",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-28.js",
+ "description": "Array.prototype.forEach - value of 'length' is boundary value (2^32)",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n\n function callbackfn(val, idx, obj) {\n accessed = true;\n }\n\n var obj = {\n 0: 12,\n length: 4294967296\n };\n\n Array.prototype.forEach.call(obj, callbackfn);\n\n return !accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.forEach))"
+ },
+ {
+ "id": "15.4.4.18-3-29",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-29.js",
+ "description": "Array.prototype.forEach - value of 'length' is boundary value (2^32 + 1)",
+ "test": "assertTrue((function testcase() {\n\n var testResult = false;\n\n function callbackfn(val, idx, obj) {\n testResult = (val > 10);\n }\n\n var obj = {\n 0: 11,\n 1: 9,\n length: 4294967297\n };\n\n Array.prototype.forEach.call(obj, callbackfn);\n\n return testResult;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.forEach))"
+ },
+ {
+ "id": "15.4.4.18-3-3",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-3.js",
+ "description": "Array.prototype.forEach - value of 'length' is a number (value is 0)",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n\n function callbackfn(val, idx, obj) {\n accessed = true;\n }\n\n var obj = { 0: 1, 1: 1, length: 0 };\n\n Array.prototype.forEach.call(obj, callbackfn);\n\n return !accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.forEach))"
+ },
+ {
+ "id": "15.4.4.18-3-4",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-4.js",
+ "description": "Array.prototype.forEach - value of 'length' is a number (value is +0)",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n\n function callbackfn(val, idx, obj) {\n accessed = true;\n }\n\n var obj = { 0: 11, length: +0 };\n\n Array.prototype.forEach.call(obj, callbackfn);\n\n return !accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.forEach))"
+ },
+ {
+ "id": "15.4.4.18-3-5",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-5.js",
+ "description": "Array.prototype.forEach - value of 'length' is a number (value is -0)",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n\n function callbackfn(val, idx, obj) {\n accessed = true;\n }\n\n var obj = { 0: 11, length: -0 };\n\n Array.prototype.forEach.call(obj, callbackfn);\n\n return !accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.forEach))"
+ },
+ {
+ "id": "15.4.4.18-3-6",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-6.js",
+ "description": "Array.prototype.forEach - value of 'length' is a number (value is positive)",
+ "test": "assertTrue((function testcase() {\n\n var testResult1 = false;\n\n function callbackfn(val, idx, obj) {\n testResult1 = (val > 10);\n }\n\n var obj = { 1: 11, 2: 9, length: 2 };\n\n Array.prototype.forEach.call(obj, callbackfn);\n\n return testResult1;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.forEach))"
+ },
+ {
+ "id": "15.4.4.18-3-7",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-7.js",
+ "description": "Array.prototype.forEach - value of 'length' is a number (value is negative)",
+ "test": "assertTrue((function testcase() {\n\n var testResult1 = false;\n\n function callbackfn(val, idx, obj) {\n testResult1 = (val > 10);\n }\n\n var obj = { 1: 11, 2: 9, length: -4294967294 };\n\n Array.prototype.forEach.call(obj, callbackfn);\n\n return testResult1;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.forEach))"
+ },
+ {
+ "id": "15.4.4.18-3-8",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-8.js",
+ "description": "Array.prototype.forEach - value of 'length' is a number (value is Infinity)",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n\n function callbackfn(val, idx, obj) {\n accessed = true;\n }\n\n var obj = { 0: 9, length: Infinity };\n\n Array.prototype.forEach.call(obj, callbackfn);\n\n return !accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.forEach))"
+ },
+ {
+ "id": "15.4.4.18-3-9",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-3-9.js",
+ "description": "Array.prototype.forEach - value of 'length' is a number (value is -Infinity)",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n\n function callbackfn(val, idx, obj) {\n accessed = true;\n }\n\n var obj = { 0: 9, length: -Infinity };\n\n Array.prototype.forEach.call(obj, callbackfn);\n\n return !accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.forEach))"
+ },
+ {
+ "id": "15.4.4.18-4-1",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-4-1.js",
+ "description": "Array.prototype.forEach throws TypeError if callbackfn is undefined",
+ "test": "assertTrue((function testcase() {\n\n var arr = new Array(10);\n try {\n arr.forEach(); \n }\n catch(e) {\n if(e instanceof TypeError)\n return true; \n }\n\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.forEach))"
+ },
+ {
+ "id": "15.4.4.18-4-10",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-4-10.js",
+ "description": "Array.prototype.forEach - the exception is not thrown if exception was thrown by step 2",
+ "test": "assertTrue((function testcase() {\n\n var obj = { 0: 11, 1: 12 };\n\n Object.defineProperty(obj, \"length\", {\n get: function () {\n throw new SyntaxError();\n },\n configurable: true\n });\n\n try {\n Array.prototype.forEach.call(obj, undefined);\n return false;\n } catch (ex) {\n return !(ex instanceof TypeError);\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.forEach) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.4.4.18-4-11",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-4-11.js",
+ "description": "Array.prototype.forEach - the exception is not thrown if exception was thrown by step 3",
+ "test": "assertTrue((function testcase() {\n\n var obj = { 0: 11, 1: 12 };\n\n Object.defineProperty(obj, \"length\", {\n get: function () {\n return {\n toString: function () {\n throw new SyntaxError();\n }\n };\n },\n configurable: true\n });\n\n try {\n Array.prototype.forEach.call(obj, undefined);\n return false;\n } catch (ex) {\n return !(ex instanceof TypeError);\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.forEach) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.4.4.18-4-12",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-4-12.js",
+ "description": "Array.prototype.forEach - 'callbackfn' is a function",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n function callbackfn(val, idx, obj) {\n accessed = true;\n }\n\n [11, 9].forEach(callbackfn);\n return accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.forEach))"
+ },
+ {
+ "id": "15.4.4.18-4-15",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-4-15.js",
+ "description": "Array.prototype.forEach - calling with no callbackfn is the same as passing undefined for callbackfn",
+ "test": "assertTrue((function testcase() {\n\n var obj = { 10: 10 };\n var lengthAccessed = false;\n var loopAccessed = false;\n\n Object.defineProperty(obj, \"length\", {\n get: function () {\n lengthAccessed = true;\n return 20;\n },\n configurable: true\n });\n\n Object.defineProperty(obj, \"0\", {\n get: function () {\n loopAccessed = true;\n return 10;\n },\n configurable: true\n });\n\n try {\n Array.prototype.forEach.call(obj);\n return false;\n } catch (ex) {\n return (ex instanceof TypeError) && lengthAccessed && !loopAccessed;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.forEach) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects())"
+ },
+ {
+ "id": "15.4.4.18-4-2",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-4-2.js",
+ "description": "Array.prototype.forEach throws ReferenceError if callbackfn is unreferenced",
+ "test": "assertTrue((function testcase() {\n\n var arr = new Array(10);\n try {\n arr.forEach(foo); \n }\n catch(e) {\n if(e instanceof ReferenceError)\n return true; \n }\n\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.forEach))"
+ },
+ {
+ "id": "15.4.4.18-4-3",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-4-3.js",
+ "description": "Array.prototype.forEach throws TypeError if callbackfn is null",
+ "test": "assertTrue((function testcase() {\n\n var arr = new Array(10);\n try {\n arr.forEach(null); \n }\n catch(e) {\n if(e instanceof TypeError)\n return true; \n }\n\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.forEach))"
+ },
+ {
+ "id": "15.4.4.18-4-4",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-4-4.js",
+ "description": "Array.prototype.forEach throws TypeError if callbackfn is boolean",
+ "test": "assertTrue((function testcase() {\n\n var arr = new Array(10);\n try {\n arr.forEach(true); \n }\n catch(e) {\n if(e instanceof TypeError)\n return true; \n }\n\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.forEach))"
+ },
+ {
+ "id": "15.4.4.18-4-5",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-4-5.js",
+ "description": "Array.prototype.forEach throws TypeError if callbackfn is number",
+ "test": "assertTrue((function testcase() {\n\n var arr = new Array(10);\n try {\n arr.forEach(5); \n }\n catch(e) {\n if(e instanceof TypeError)\n return true; \n }\n\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.forEach))"
+ },
+ {
+ "id": "15.4.4.18-4-6",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-4-6.js",
+ "description": "Array.prototype.forEach throws TypeError if callbackfn is string",
+ "test": "assertTrue((function testcase() {\n\n var arr = new Array(10);\n try {\n arr.forEach(\"abc\"); \n }\n catch(e) {\n if(e instanceof TypeError)\n return true; \n }\n\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.forEach))"
+ },
+ {
+ "id": "15.4.4.18-4-7",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-4-7.js",
+ "description": "Array.prototype.forEach throws TypeError if callbackfn is Object without Call internal method",
+ "test": "assertTrue((function testcase() {\n\n var arr = new Array(10);\n try {\n arr.forEach(new Object()); \n }\n catch(e) {\n if(e instanceof TypeError)\n return true; \n }\n\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.forEach))"
+ },
+ {
+ "id": "15.4.4.18-4-8",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-4-8.js",
+ "description": "Array.prototype.forEach - side effects produced by step 2 are visible when an exception occurs",
+ "test": "assertTrue((function testcase() {\n\n var obj = { 0: 11, 1: 12 };\n\n var accessed = false;\n\n Object.defineProperty(obj, \"length\", {\n get: function () {\n accessed = true;\n return 2;\n },\n configurable: true\n });\n\n try {\n Array.prototype.forEach.call(obj, null);\n return false;\n } catch (ex) {\n return ex instanceof TypeError && accessed;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.forEach) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.4.4.18-4-9",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-4-9.js",
+ "description": "Array.prototype.forEach - side effects produced by step 3 are visible when an exception occurs",
+ "test": "assertTrue((function testcase() {\n\n var obj = { 0: 11, 1: 12 };\n\n var accessed = false;\n\n Object.defineProperty(obj, \"length\", {\n get: function () {\n return {\n toString: function () {\n accessed = true;\n return \"2\";\n }\n };\n },\n configurable: true\n });\n\n try {\n Array.prototype.forEach.call(obj, null);\n return false;\n } catch (ex) {\n return ex instanceof TypeError && accessed;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.forEach) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.4.4.18-5-1-s",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.18-5-1-s.js",
+ "description": "Array.prototype.forEach - thisArg not passed to strict callbackfn",
+ "test": "assertTrue((function testcase() {\n var innerThisCorrect = false;\n \n function callbackfn(val, idx, obj) {\n \"use strict\";\n innerThisCorrect = this===undefined;\n return true;\n }\n\n [1].forEach(callbackfn);\n return innerThisCorrect; \n }).call(this));\n",
+ "precondition": "(fnSupportsStrict() && fnExists(Array.prototype.forEach))",
+ "strict_only": ""
+ },
+ {
+ "id": "15.4.4.18-5-1",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-5-1.js",
+ "description": "Array.prototype.forEach - thisArg is passed",
+ "test": "assertTrue((function testcase() {\n this._15_4_4_18_5_1 = false;\n var _15_4_4_18_5_1 = true;\n var result;\n function callbackfn(val, idx, obj) {\n result = this._15_4_4_18_5_1;\n }\n var arr = [1];\n arr.forEach(callbackfn)\n return !result;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.forEach))"
+ },
+ {
+ "id": "15.4.4.18-5-10",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-5-10.js",
+ "description": "Array.prototype.forEach - Array Object can be used as thisArg",
+ "test": "assertTrue((function testcase() {\n\n var result = false;\n var objArray = [];\n\n function callbackfn(val, idx, obj) {\n result = (this === objArray);\n }\n\n [11].forEach(callbackfn, objArray);\n return result;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.forEach))"
+ },
+ {
+ "id": "15.4.4.18-5-11",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-5-11.js",
+ "description": "Array.prototype.forEach - String Object can be used as thisArg",
+ "test": "assertTrue((function testcase() {\n\n var result = false;\n var objString = new String();\n\n function callbackfn(val, idx, obj) {\n result = (this === objString);\n }\n\n [11].forEach(callbackfn, objString);\n return result;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.forEach))"
+ },
+ {
+ "id": "15.4.4.18-5-12",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-5-12.js",
+ "description": "Array.prototype.forEach - Boolean Object can be used as thisArg",
+ "test": "assertTrue((function testcase() {\n\n var result = false;\n var objBoolean = new Boolean();\n\n function callbackfn(val, idx, obj) {\n result = (this === objBoolean);\n }\n\n [11].forEach(callbackfn, objBoolean);\n return result;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.forEach))"
+ },
+ {
+ "id": "15.4.4.18-5-13",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-5-13.js",
+ "description": "Array.prototype.forEach - Number Object can be used as thisArg",
+ "test": "assertTrue((function testcase() {\n\n var result = false;\n var objNumber = new Number();\n\n function callbackfn(val, idx, obj) {\n result = (this === objNumber);\n }\n\n [11].forEach(callbackfn, objNumber);\n return result;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.forEach))"
+ },
+ {
+ "id": "15.4.4.18-5-14",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-5-14.js",
+ "description": "Array.prototype.forEach - the Math object can be used as thisArg",
+ "test": "assertTrue((function testcase() {\n\n var result = false;\n function callbackfn(val, idx, obj) {\n result = (this === Math);\n }\n\n [11].forEach(callbackfn, Math);\n return result;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.forEach))"
+ },
+ {
+ "id": "15.4.4.18-5-15",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-5-15.js",
+ "description": "Array.prototype.forEach - Date Object can be used as thisArg",
+ "test": "assertTrue((function testcase() {\n\n var result = false;\n var objDate = new Date();\n\n function callbackfn(val, idx, obj) {\n result = (this === objDate);\n }\n\n [11].forEach(callbackfn, objDate);\n return result;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.forEach))"
+ },
+ {
+ "id": "15.4.4.18-5-16",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-5-16.js",
+ "description": "Array.prototype.forEach - RegExp Object can be used as thisArg",
+ "test": "assertTrue((function testcase() {\n\n var result = false;\n var objRegExp = new RegExp();\n\n function callbackfn(val, idx, obj) {\n result = (this === objRegExp);\n }\n\n [11].forEach(callbackfn, objRegExp);\n return result;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.forEach))"
+ },
+ {
+ "id": "15.4.4.18-5-17",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-5-17.js",
+ "description": "Array.prototype.forEach - the JSON object can be used as thisArg",
+ "test": "assertTrue((function testcase() {\n\n var result = false;\n function callbackfn(val, idx, obj) {\n result = (this === JSON);\n }\n\n [11].forEach(callbackfn, JSON);\n return result;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.forEach))"
+ },
+ {
+ "id": "15.4.4.18-5-18",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-5-18.js",
+ "description": "Array.prototype.forEach - Error Object can be used as thisArg",
+ "test": "assertTrue((function testcase() {\n\n var result = false;\n var objError = new RangeError();\n\n function callbackfn(val, idx, obj) {\n result = (this === objError);\n }\n\n [11].forEach(callbackfn, objError);\n return result;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.forEach))"
+ },
+ {
+ "id": "15.4.4.18-5-19",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-5-19.js",
+ "description": "Array.prototype.forEach - the Arguments object can be used as thisArg",
+ "test": "assertTrue((function testcase() {\n\n var result = false;\n var arg;\n\n function callbackfn(val, idx, obj) {\n result = (this === arg);\n }\n\n (function fun() {\n arg = arguments;\n }(1, 2, 3));\n\n [11].forEach(callbackfn, arg);\n return result;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.forEach))"
+ },
+ {
+ "id": "15.4.4.18-5-2",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-5-2.js",
+ "description": "Array.prototype.forEach - thisArg is Object",
+ "test": "assertTrue((function testcase() {\n var res = false;\n var o = new Object();\n o.res = true;\n var result;\n function callbackfn(val, idx, obj)\n {\n result = this.res;\n }\n\n var arr = [1];\n arr.forEach(callbackfn,o)\n if( result === true)\n return true; \n\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.forEach))"
+ },
+ {
+ "id": "15.4.4.18-5-21",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-5-21.js",
+ "description": "Array.prototype.forEach - the global object can be used as thisArg",
+ "test": "assertTrue((function testcase() {\n\n var result = false;\n function callbackfn(val, idx, obj) {\n result = (this === fnGlobalObject());\n }\n\n [11].forEach(callbackfn, fnGlobalObject());\n return result;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.forEach))"
+ },
+ {
+ "id": "15.4.4.18-5-22",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-5-22.js",
+ "description": "Array.prototype.forEach - boolean primitive can be used as thisArg",
+ "test": "assertTrue((function testcase() {\n\n var result = false;\n\n function callbackfn(val, idx, obj) {\n result = (this.valueOf() === false);\n }\n\n [11].forEach(callbackfn, false);\n return result;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.forEach))"
+ },
+ {
+ "id": "15.4.4.18-5-23",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-5-23.js",
+ "description": "Array.prototype.forEach - number primitive can be used as thisArg",
+ "test": "assertTrue((function testcase() {\n\n var result = false;\n function callbackfn(val, idx, obj) {\n result = (this.valueOf() === 101);\n }\n\n [11].forEach(callbackfn, 101);\n return result;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.forEach))"
+ },
+ {
+ "id": "15.4.4.18-5-24",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-5-24.js",
+ "description": "Array.prototype.forEach - string primitive can be used as thisArg",
+ "test": "assertTrue((function testcase() {\n\n var result = false;\n function callbackfn(val, idx, obj) {\n result = (this.valueOf() === \"abc\");\n }\n\n [11].forEach(callbackfn, \"abc\");\n return result;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.forEach))"
+ },
+ {
+ "id": "15.4.4.18-5-25",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-5-25.js",
+ "description": "Array.prototype.forEach - thisArg not passed",
+ "test": "assertTrue((function testcase() {\n function innerObj() {\n this._15_4_4_18_5_25 = true;\n var _15_4_4_18_5_25 = false;\n var result;\n function callbackfn(val, idx, obj) {\n result = this._15_4_4_18_5_25;\n }\n var arr = [1];\n arr.forEach(callbackfn)\n this.retVal = !result;\n }\n return new innerObj().retVal;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.forEach))"
+ },
+ {
+ "id": "15.4.4.18-5-3",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-5-3.js",
+ "description": "Array.prototype.forEach - thisArg is Array",
+ "test": "assertTrue((function testcase() {\n var res = false;\n var a = new Array();\n a.res = true;\n var result;\n function callbackfn(val, idx, obj)\n {\n result = this.res;\n }\n\n var arr = [1];\n arr.forEach(callbackfn,a)\n if( result === true)\n return true; \n\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.forEach))"
+ },
+ {
+ "id": "15.4.4.18-5-4",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-5-4.js",
+ "description": "Array.prototype.forEach - thisArg is object from object template(prototype)",
+ "test": "assertTrue((function testcase() {\n var res = false;\n var result;\n function callbackfn(val, idx, obj)\n {\n result = this.res;\n }\n \n function foo(){}\n foo.prototype.res = true;\n var f = new foo();\n var arr = [1];\n arr.forEach(callbackfn,f)\n if( result === true)\n return true; \n\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.forEach))"
+ },
+ {
+ "id": "15.4.4.18-5-5",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-5-5.js",
+ "description": "Array.prototype.forEach - thisArg is object from object template",
+ "test": "assertTrue((function testcase() {\n var res = false;\n var result;\n function callbackfn(val, idx, obj)\n {\n result = this.res;\n }\n\n function foo(){}\n var f = new foo();\n f.res = true;\n \n var arr = [1];\n arr.forEach(callbackfn,f)\n if( result === true)\n return true; \n\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.forEach))"
+ },
+ {
+ "id": "15.4.4.18-5-6",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-5-6.js",
+ "description": "Array.prototype.forEach - thisArg is function",
+ "test": "assertTrue((function testcase() {\n var res = false;\n var result;\n function callbackfn(val, idx, obj)\n {\n result = this.res;\n }\n\n function foo(){}\n foo.res = true;\n \n var arr = [1];\n arr.forEach(callbackfn,foo)\n if( result === true)\n return true; \n\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.forEach))"
+ },
+ {
+ "id": "15.4.4.18-5-7",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-5-7.js",
+ "description": "Array.prototype.forEach - built-in functions can be used as thisArg",
+ "test": "assertTrue((function testcase() {\n\n var result = false;\n\n function callbackfn(val, idx, obj) {\n result = (this === eval);\n }\n\n [11].forEach(callbackfn, eval);\n return result;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.forEach))"
+ },
+ {
+ "id": "15.4.4.18-5-9",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-5-9.js",
+ "description": "Array.prototype.forEach - Function Object can be used as thisArg",
+ "test": "assertTrue((function testcase() {\n\n var result = false;\n var objString = function () { };\n\n function callbackfn(val, idx, obj) {\n result = (this === objString);\n }\n\n [11].forEach(callbackfn, objString);\n return result;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.forEach))"
+ },
+ {
+ "id": "15.4.4.18-7-1",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-1.js",
+ "description": "Array.prototype.forEach doesn't consider new elements added to array after the call",
+ "test": "assertTrue((function testcase() { \n \n var callCnt = 0;\n function callbackfn(val, idx, obj)\n {\n callCnt++; \n arr[2] = 3;\n arr[5] = 6;\n }\n\n var arr = [1,2,,4,5];\n arr.forEach(callbackfn);\n if( callCnt === 5) \n return true;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.forEach))"
+ },
+ {
+ "id": "15.4.4.18-7-2",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-2.js",
+ "description": "Array.prototype.forEach doesn't visit deleted elements in array after the call",
+ "test": "assertTrue((function testcase() { \n \n var callCnt = 0;\n function callbackfn(val, idx, obj)\n {\n if(callCnt == 0)\n delete arr[3];\n callCnt++;\n }\n\n var arr = [1,2,3,4,5];\n arr.forEach(callbackfn)\n if( callCnt === 4) \n return true; \n \n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.forEach))"
+ },
+ {
+ "id": "15.4.4.18-7-3",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-3.js",
+ "description": "Array.prototype.forEach doesn't visit deleted elements when Array.length is decreased",
+ "test": "assertTrue((function testcase() { \n \n var callCnt = 0;\n function callbackfn(val, idx, obj)\n {\n arr.length=3;\n callCnt++;\n }\n\n var arr = [1,2,3,4,5];\n arr.forEach(callbackfn);\n if( callCnt === 3) \n return true; \n \n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.forEach))"
+ },
+ {
+ "id": "15.4.4.18-7-4",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-4.js",
+ "description": "Array.prototype.forEach doesn't consider newly added elements in sparse array",
+ "test": "assertTrue((function testcase() { \n \n var callCnt = 0;\n function callbackfn(val, idx, obj)\n {\n arr[1000] = 3;\n callCnt++;\n }\n\n var arr = new Array(10);\n arr[1] = 1;\n arr[2] = 2;\n arr.forEach(callbackfn);\n if( callCnt === 2) \n return true; \n \n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.forEach))"
+ },
+ {
+ "id": "15.4.4.18-7-5",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-5.js",
+ "description": "Array.prototype.forEach visits deleted element in array after the call when same index is also present in prototype",
+ "test": "assertTrue((function testcase() { \n \n var callCnt = 0;\n function callbackfn(val, idx, obj)\n {\n delete arr[4];\n callCnt++;\n }\n\n Array.prototype[4] = 5;\n\n var arr = [1,2,3,4,5];\n arr.forEach(callbackfn)\n delete Array.prototype[4];\n if( callCnt === 5) \n return true; \n \n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.forEach))"
+ },
+ {
+ "id": "15.4.4.18-7-7",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-7.js",
+ "description": "Array.prototype.forEach - considers new value of elements in array after the call",
+ "test": "assertTrue((function testcase() {\n\n var result = false;\n var arr = [1, 2, 3, 4, 5];\n\n function callbackfn(val, Idx, obj) {\n arr[4] = 6;\n if (val >= 6) {\n result = true;\n }\n }\n\n arr.forEach(callbackfn);\n return result;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.forEach))"
+ },
+ {
+ "id": "15.4.4.18-7-8",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-8.js",
+ "description": "Array.prototype.forEach - no observable effects occur if len is 0",
+ "test": "assertTrue((function testcase() {\n var accessed = false;\n\n function callbackfn(val, idx, obj) {\n accessed = true;\n }\n\n var obj = { 0: 11, 1: 12, length: 0 };\n\n Array.prototype.forEach.call(obj, callbackfn);\n return !accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.forEach))"
+ },
+ {
+ "id": "15.4.4.18-7-9",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-9.js",
+ "description": "Array.prototype.forEach - modifications to length don't change number of iterations",
+ "test": "assertTrue((function testcase() {\n\n var called = 0;\n function callbackfn(val, idx, obj) {\n called++;\n }\n\n var obj = { 1: 12, 2: 9, length: 2 };\n\n Object.defineProperty(obj, \"0\", {\n get: function () {\n obj.length = 3;\n return 11;\n },\n configurable: true\n });\n\n Array.prototype.forEach.call(obj, callbackfn);\n return 2 === called;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.forEach) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects())"
+ },
+ {
+ "id": "15.4.4.18-7-b-1",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-b-1.js",
+ "description": "Array.prototype.forEach - callbackfn not called for indexes never been assigned values",
+ "test": "assertTrue((function testcase() { \n \n var callCnt = 0;\n function callbackfn(val, idx, obj)\n {\n callCnt++;\n }\n\n var arr = new Array(10);\n arr[1] = undefined;\n arr.forEach(callbackfn);\n if( callCnt === 1) \n return true; \n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.forEach))"
+ },
+ {
+ "id": "15.4.4.18-7-b-10",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-b-10.js",
+ "description": "Array.prototype.forEach - deleting property of prototype causes prototype index property not to be visited on an Array-like Object",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n var testResult = true;\n\n function callbackfn(val, idx, obj) {\n accessed = true;\n if (idx === 3) {\n testResult = false;\n }\n }\n\n var obj = { 2: 2, length: 20 };\n\n Object.defineProperty(obj, \"0\", {\n get: function () {\n delete Object.prototype[1];\n return 0;\n },\n configurable: true\n });\n\n try {\n Object.prototype[1] = 1;\n Array.prototype.forEach.call(obj, callbackfn);\n return testResult && accessed;\n } finally {\n delete Object.prototype[1];\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.forEach) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects())"
+ },
+ {
+ "id": "15.4.4.18-7-b-11",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-b-11.js",
+ "description": "Array.prototype.forEach - deleting property of prototype causes prototype index property not to be visited on an Array",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n var testResult = true;\n\n function callbackfn(val, idx, obj) {\n accessed = true;\n if (idx === 1) {\n testResult = false;\n }\n }\n\n var arr = [0, , ];\n\n Object.defineProperty(arr, \"0\", {\n get: function () {\n delete Array.prototype[1];\n return 0;\n },\n configurable: true\n });\n\n try {\n Array.prototype[1] = 1;\n arr.forEach(callbackfn);\n return testResult && accessed;\n } finally {\n delete Array.prototype[1];\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.forEach) && fnExists(Object.defineProperty) && ![, 1].hasOwnProperty(0) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.4.4.18-7-b-12",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-b-12.js",
+ "description": "Array.prototype.forEach - deleting own property with prototype property causes prototype index property to be visited on an Array-like object",
+ "test": "assertTrue((function testcase() {\n\n var testResult = false;\n\n function callbackfn(val, idx, obj) {\n if (idx === 1 && val === 1) {\n testResult = true;\n }\n }\n\n var obj = { 0: 0, 1: 111, length: 10 };\n\n Object.defineProperty(obj, \"0\", {\n get: function () {\n delete obj[1];\n return 0;\n },\n configurable: true\n });\n\n try {\n Object.prototype[1] = 1;\n Array.prototype.forEach.call(obj, callbackfn);\n return testResult;\n } finally {\n delete Object.prototype[1];\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.forEach) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects())"
+ },
+ {
+ "id": "15.4.4.18-7-b-13",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-b-13.js",
+ "description": "Array.prototype.forEach - deleting own property with prototype property causes prototype index property to be visited on an Array",
+ "test": "assertTrue((function testcase() {\n\n var testResult = false;\n\n function callbackfn(val, idx, obj) {\n if (idx === 1 && val === 1) {\n testResult = true;\n }\n }\n var arr = [0, 111];\n\n Object.defineProperty(arr, \"0\", {\n get: function () {\n delete arr[1];\n return 0;\n },\n configurable: true\n });\n\n try {\n Array.prototype[1] = 1;\n arr.forEach(callbackfn);\n return testResult;\n } finally {\n delete Array.prototype[1];\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.forEach) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.4.4.18-7-b-14",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-b-14.js",
+ "description": "Array.prototype.forEach - decreasing length of array causes index property not to be visited",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n var testResult = true;\n\n function callbackfn(val, idx, obj) {\n accessed = true;\n if (idx === 3) {\n testResult = false;\n }\n }\n\n var arr = [0, 1, 2, \"last\"];\n\n Object.defineProperty(arr, \"0\", {\n get: function () {\n arr.length = 3;\n return 0;\n },\n configurable: true\n });\n\n arr.forEach(callbackfn);\n\n return testResult && accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.forEach) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.4.4.18-7-b-15",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-b-15.js",
+ "description": "Array.prototype.forEach - decreasing length of array with prototype property causes prototype index property to be visited",
+ "test": "assertTrue((function testcase() {\n\n var testResult = false;\n\n function callbackfn(val, idx, obj) {\n if (idx === 2 && val === \"prototype\") {\n testResult = true;\n }\n }\n var arr = [0, 1, 2];\n\n try {\n Object.defineProperty(Array.prototype, \"2\", {\n get: function () {\n return \"prototype\";\n },\n configurable: true\n });\n\n Object.defineProperty(arr, \"1\", {\n get: function () {\n arr.length = 2;\n return 1;\n },\n configurable: true\n });\n\n arr.forEach(callbackfn);\n\n return testResult;\n } finally {\n delete Array.prototype[2];\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.forEach) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.4.4.18-7-b-16",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-b-16.js",
+ "description": "Array.prototype.forEach - decreasing length of array does not delete non-configurable properties",
+ "test": "assertTrue((function testcase() {\n\n var testResult = false;\n\n function callbackfn(val, idx, obj) {\n if (idx === 2 && val === \"unconfigurable\") {\n testResult = true;\n }\n }\n\n var arr = [0, 1, 2];\n\n Object.defineProperty(arr, \"2\", {\n get: function () {\n return \"unconfigurable\";\n },\n configurable: false\n });\n\n Object.defineProperty(arr, \"1\", {\n get: function () {\n arr.length = 2;\n return 1;\n },\n configurable: true\n });\n\n arr.forEach(callbackfn);\n\n return testResult;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.forEach) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.4.4.18-7-b-2",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-b-2.js",
+ "description": "Array.prototype.forEach - added properties in step 2 are visible here",
+ "test": "assertTrue((function testcase() {\n\n var testResult = false;\n\n function callbackfn(val, idx, obj) {\n if (idx === 2 && val === \"length\") {\n testResult = true;\n }\n }\n\n var obj = {};\n\n Object.defineProperty(obj, \"length\", {\n get: function () {\n obj[2] = \"length\";\n return 3;\n },\n configurable: true\n });\n\n Array.prototype.forEach.call(obj, callbackfn);\n\n return testResult;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.forEach) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.4.4.18-7-b-3",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-b-3.js",
+ "description": "Array.prototype.forEach - deleted properties in step 2 are visible here",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n var testResult = true;\n\n function callbackfn(val, idx, obj) {\n accessed = true;\n if (idx === 8) {\n testResult = false;\n }\n }\n var obj = { 2: 6.99, 8: 19 };\n\n Object.defineProperty(obj, \"length\", {\n get: function () {\n delete obj[8];\n return 10;\n },\n configurable: true\n });\n\n Array.prototype.forEach.call(obj, callbackfn);\n return testResult && accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.forEach) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.4.4.18-7-b-4",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-b-4.js",
+ "description": "Array.prototype.forEach - properties added into own object after current position are visited on an Array-like object",
+ "test": "assertTrue((function testcase() {\n\n var testResult = false;\n\n function callbackfn(val, idx, obj) {\n if (idx === 1 && val === 1) {\n testResult = true;\n }\n }\n\n var obj = { length: 2 };\n\n Object.defineProperty(obj, \"0\", {\n get: function () {\n Object.defineProperty(obj, \"1\", {\n get: function () {\n return 1;\n },\n configurable: true\n });\n return 0;\n },\n configurable: true\n });\n\n Array.prototype.forEach.call(obj, callbackfn);\n return testResult;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.forEach) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects())"
+ },
+ {
+ "id": "15.4.4.18-7-b-5",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-b-5.js",
+ "description": "Array.prototype.forEach - properties added into own object after current position are visited on an Array",
+ "test": "assertTrue((function testcase() {\n\n var testResult = false;\n\n function callbackfn(val, idx, obj) {\n if (idx === 1 && val === 1) {\n testResult = true;\n }\n }\n\n var arr = [0, , 2];\n\n Object.defineProperty(arr, \"0\", {\n get: function () {\n Object.defineProperty(arr, \"1\", {\n get: function () {\n return 1;\n },\n configurable: true\n });\n return 0;\n },\n configurable: true\n });\n\n arr.forEach(callbackfn);\n return testResult;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.forEach) && fnExists(Object.defineProperty) && ![, 1].hasOwnProperty(0) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.4.4.18-7-b-6",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-b-6.js",
+ "description": "Array.prototype.forEach - properties can be added to prototype after current position are visited on an Array-like object",
+ "test": "assertTrue((function testcase() {\n\n var testResult = false;\n\n function callbackfn(val, idx, obj) {\n if (idx === 1 && val === 6.99) {\n testResult = true;\n }\n }\n\n var obj = { length: 2 };\n\n Object.defineProperty(obj, \"0\", {\n get: function () {\n Object.defineProperty(Object.prototype, \"1\", {\n get: function () {\n return 6.99;\n },\n configurable: true\n });\n return 0;\n },\n configurable: true\n });\n\n try {\n Array.prototype.forEach.call(obj, callbackfn);\n return testResult;\n } finally {\n delete Object.prototype[1];\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.forEach) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects())"
+ },
+ {
+ "id": "15.4.4.18-7-b-7",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-b-7.js",
+ "description": "Array.prototype.forEach - properties can be added to prototype after current position are visited on an Array",
+ "test": "assertTrue((function testcase() {\n\n var testResult = false;\n\n function callbackfn(val, idx, obj) {\n if (idx === 1 && val === 6.99) {\n testResult = true;\n }\n }\n\n var arr = [0, , 2];\n\n Object.defineProperty(arr, \"0\", {\n get: function () {\n Object.defineProperty(Array.prototype, \"1\", {\n get: function () {\n return 6.99;\n },\n configurable: true\n });\n return 0;\n },\n configurable: true\n });\n\n try {\n arr.forEach(callbackfn);\n return testResult;\n } finally {\n delete Array.prototype[1];\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.forEach) && fnExists(Object.defineProperty) && ![, 1].hasOwnProperty(0) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.4.4.18-7-b-8",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-b-8.js",
+ "description": "Array.prototype.forEach - deleting own property causes index property not to be visited on an Array-like object",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n var testResult = true;\n\n function callbackfn(val, idx, obj) {\n accessed = true;\n if (idx === 1) {\n testResult = false;\n }\n }\n\n var obj = { length: 2 };\n\n Object.defineProperty(obj, \"1\", {\n get: function () {\n return 6.99;\n },\n configurable: true\n });\n\n Object.defineProperty(obj, \"0\", {\n get: function () {\n delete obj[1];\n return 0;\n },\n configurable: true\n });\n\n Array.prototype.forEach.call(obj, callbackfn);\n return testResult && accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.forEach) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects())"
+ },
+ {
+ "id": "15.4.4.18-7-b-9",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-b-9.js",
+ "description": "Array.prototype.forEach - deleting own property causes index property not to be visited on an Array",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n var testResult = true;\n\n function callbackfn(val, idx, obj) {\n accessed = true;\n if (idx === 1) {\n testResult = false;\n }\n }\n\n var arr = [1, 2];\n\n Object.defineProperty(arr, \"1\", {\n get: function () {\n return \"6.99\";\n },\n configurable: true\n });\n\n Object.defineProperty(arr, \"0\", {\n get: function () {\n delete arr[1];\n return 0;\n },\n configurable: true\n });\n\n arr.forEach(callbackfn);\n return testResult && accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.forEach) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.4.4.18-7-c-i-1",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-i-1.js",
+ "description": "Array.prototype.forEach - element to be retrieved is own data property on an Array-like object",
+ "test": "assertTrue((function testcase() {\n\n var kValue = { };\n var testResult = false;\n\n function callbackfn(val, idx, obj) {\n if (idx === 5) {\n testResult = (val === kValue);\n }\n }\n\n var obj = { 5: kValue, length: 100 };\n\n Array.prototype.forEach.call(obj, callbackfn);\n\n return testResult;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.forEach))"
+ },
+ {
+ "id": "15.4.4.18-7-c-i-10",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-i-10.js",
+ "description": "Array.prototype.forEach - element to be retrieved is own accessor property on an Array",
+ "test": "assertTrue((function testcase() {\n\n var testResult = false;\n\n function callbackfn(val, idx, obj) {\n if (idx === 2) {\n testResult = (val === 12);\n }\n }\n\n var arr = [];\n\n Object.defineProperty(arr, \"2\", {\n get: function () {\n return 12;\n },\n configurable: true\n });\n\n arr.forEach(callbackfn);\n\n return testResult;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.forEach) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.4.4.18-7-c-i-11",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-i-11.js",
+ "description": "Array.prototype.forEach - element to be retrieved is own accessor property that overrides an inherited data property on an Array-like object",
+ "test": "assertTrue((function testcase() {\n\n var testResult = false;\n\n function callbackfn(val, idx, obj) {\n if (idx === 0) {\n testResult = (val === 11);\n }\n }\n\n var proto = { 0: 5 };\n\n var Con = function () { };\n Con.prototype = proto;\n\n var child = new Con();\n child.length = 10;\n\n Object.defineProperty(child, \"0\", {\n get: function () {\n return 11;\n },\n configurable: true\n });\n\n Array.prototype.forEach.call(child, callbackfn);\n\n return testResult;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.forEach) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects())"
+ },
+ {
+ "id": "15.4.4.18-7-c-i-12",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-i-12.js",
+ "description": " Array.prototype.forEach - element to be retrieved is own accessor property that overrides an inherited data property on an Array",
+ "test": "assertTrue((function testcase() {\n\n var testResult = false;\n\n function callbackfn(val, idx, obj) {\n if (idx === 0) {\n testResult = (val === 111);\n }\n }\n\n var arr = [];\n try {\n Array.prototype[0] = 10;\n\n Object.defineProperty(arr, \"0\", {\n get: function () {\n return 111;\n },\n configurable: true\n });\n\n arr.forEach(callbackfn);\n\n return testResult;\n } finally {\n delete Array.prototype[0];\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.forEach) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.4.4.18-7-c-i-13",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-i-13.js",
+ "description": "Array.prototype.forEach - element to be retrieved is own accessor property that overrides an inherited accessor property on an Array-like object",
+ "test": "assertTrue((function testcase() {\n\n var testResult = false;\n\n function callbackfn(val, idx, obj) {\n if (idx === 1) {\n testResult = (val === 12);\n }\n }\n\n var proto = {};\n\n Object.defineProperty(proto, \"1\", {\n get: function () {\n return 6;\n },\n configurable: true\n });\n\n var Con = function () { };\n Con.prototype = proto;\n\n var child = new Con();\n child.length = 10;\n\n Object.defineProperty(child, \"1\", {\n get: function () {\n return 12;\n },\n configurable: true\n });\n\n\n Array.prototype.forEach.call(child, callbackfn);\n\n return testResult;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.forEach) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects())"
+ },
+ {
+ "id": "15.4.4.18-7-c-i-14",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-i-14.js",
+ "description": " Array.prototype.forEach - element to be retrieved is own accessor property that overrides an inherited accessor property on an Array",
+ "test": "assertTrue((function testcase() {\n\n var testResult = false;\n\n function callbackfn(val, idx, obj) {\n if (idx === 0) {\n testResult = (val === 11);\n }\n }\n\n var arr = [];\n try {\n Object.defineProperty(Array.prototype, \"0\", {\n get: function () {\n return 5;\n },\n configurable: true\n });\n\n Object.defineProperty(arr, \"0\", {\n get: function () {\n return 11;\n },\n configurable: true\n });\n\n arr.forEach(callbackfn);\n\n return testResult;\n } finally {\n delete Array.prototype[0];\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.forEach) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.4.4.18-7-c-i-15",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-i-15.js",
+ "description": "Array.prototype.forEach - element to be retrieved is inherited accessor property on an Array-like object",
+ "test": "assertTrue((function testcase() {\n\n var testResult = false;\n\n function callbackfn(val, idx, obj) {\n if (idx === 1) {\n testResult = (val === 11);\n }\n }\n\n var proto = {};\n\n Object.defineProperty(proto, \"1\", {\n get: function () {\n return 11;\n },\n configurable: true\n });\n\n var Con = function () { };\n Con.prototype = proto;\n\n var child = new Con();\n child.length = 20;\n\n Array.prototype.forEach.call(child, callbackfn);\n\n return testResult;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.forEach) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects())"
+ },
+ {
+ "id": "15.4.4.18-7-c-i-16",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-i-16.js",
+ "description": "Array.prototype.forEach - element to be retrieved is inherited accessor property on an Array",
+ "test": "assertTrue((function testcase() {\n\n var testResult = false;\n\n function callbackfn(val, idx, obj) {\n if (idx === 0) {\n testResult = (val === 11);\n }\n }\n\n try {\n Object.defineProperty(Array.prototype, \"0\", {\n get: function () {\n return 11;\n },\n configurable: true\n });\n\n [, , , ].forEach(callbackfn);\n\n return testResult;\n } finally {\n delete Array.prototype[0];\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.forEach) && fnExists(Object.defineProperty) && ![, 1].hasOwnProperty(0) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.4.4.18-7-c-i-17",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-i-17.js",
+ "description": "Array.prototype.forEach - element to be retrieved is own accessor property without a get function on an Array-like object",
+ "test": "assertTrue((function testcase() {\n\n var testResult = false;\n\n function callbackfn(val, idx, obj) {\n if (idx === 1) {\n testResult = (typeof val === \"undefined\");\n }\n }\n\n var obj = { length: 2 };\n Object.defineProperty(obj, \"1\", {\n set: function () { },\n configurable: true\n });\n\n Array.prototype.forEach.call(obj, callbackfn);\n\n return testResult;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.forEach) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects())"
+ },
+ {
+ "id": "15.4.4.18-7-c-i-18",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-i-18.js",
+ "description": "Array.prototype.forEach - element to be retrieved is own accessor property without a get function on an Array",
+ "test": "assertTrue((function testcase() {\n\n var testResult = false;\n\n function callbackfn(val, idx, obj) {\n if (idx === 0) {\n testResult = (typeof val === \"undefined\");\n }\n }\n\n var arr = [];\n\n Object.defineProperty(arr, \"0\", {\n set: function () { },\n configurable: true\n });\n\n arr.forEach(callbackfn);\n\n return testResult;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.forEach) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.4.4.18-7-c-i-19",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-i-19.js",
+ "description": "Array.prototype.forEach - element to be retrieved is own accessor property without a get function that overrides an inherited accessor property on an Array-like object",
+ "test": "assertTrue((function testcase() {\n\n var testResult = false;\n\n function callbackfn(val, idx, obj) {\n if (idx === 1) {\n testResult = (typeof val === \"undefined\");\n }\n }\n\n var obj = { length: 2 };\n\n Object.defineProperty(obj, \"1\", {\n set: function () { },\n configurable: true\n });\n\n try {\n Object.defineProperty(Object.prototype, \"1\", {\n get: function () {\n return 10;\n },\n configurable: true\n });\n\n Array.prototype.forEach.call(obj, callbackfn);\n\n return testResult;\n } finally {\n delete Object.prototype[1];\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.forEach) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects())"
+ },
+ {
+ "id": "15.4.4.18-7-c-i-2",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-i-2.js",
+ "description": "Array.prototype.forEach - element to be retrieved is own data property on an Array",
+ "test": "assertTrue((function testcase() {\n\n var testResult = false;\n\n function callbackfn(val, idx, obj) {\n if (idx === 0) {\n testResult = (val === 11);\n }\n }\n\n [11].forEach(callbackfn);\n\n return testResult;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.forEach))"
+ },
+ {
+ "id": "15.4.4.18-7-c-i-20",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-i-20.js",
+ "description": "Array.prototype.forEach - element to be retrieved is own accessor property without a get function that overrides an inherited accessor property on an Array",
+ "test": "assertTrue((function testcase() {\n\n var testResult = false;\n\n function callbackfn(val, idx, obj) {\n if (idx === 0) {\n testResult = (typeof val === \"undefined\");\n }\n }\n\n var arr = [];\n\n Object.defineProperty(arr, \"0\", {\n set: function () { },\n configurable: true\n });\n\n try {\n Object.defineProperty(Array.prototype, \"0\", {\n get: function () {\n return 100;\n },\n configurable: true\n });\n\n arr.forEach(callbackfn);\n\n return testResult;\n } finally {\n delete Array.prototype[0];\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.forEach) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.4.4.18-7-c-i-21",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-i-21.js",
+ "description": "Array.prototype.forEach - element to be retrieved is inherited accessor property without a get function on an Array-like object",
+ "test": "assertTrue((function testcase() {\n\n var testResult = false;\n\n function callbackfn(val, idx, obj) {\n if (idx === 1) {\n testResult = (typeof val === \"undefined\");\n }\n }\n\n var proto = {};\n Object.defineProperty(proto, \"1\", {\n set: function () { },\n configurable: true\n });\n\n var Con = function () { };\n Con.prototype = proto;\n\n var child = new Con();\n child.length = 2;\n\n Array.prototype.forEach.call(child, callbackfn);\n\n return testResult;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.forEach) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects())"
+ },
+ {
+ "id": "15.4.4.18-7-c-i-22",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-i-22.js",
+ "description": "Array.prototype.forEach - element to be retrieved is inherited accessor property without a get function on an Array",
+ "test": "assertTrue((function testcase() {\n\n var testResult = false;\n\n function callbackfn(val, idx, obj) {\n if (idx === 0) {\n testResult = (typeof val === \"undefined\");\n }\n }\n\n try {\n Object.defineProperty(Array.prototype, \"0\", {\n set: function () { },\n configurable: true\n });\n\n [, 1].forEach(callbackfn);\n\n return testResult;\n } finally {\n delete Array.prototype[0];\n }\n\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.forEach) && fnExists(Object.defineProperty) && ![, 1].hasOwnProperty(0) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.4.4.18-7-c-i-23",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-i-23.js",
+ "description": "Array.prototype.forEach - This object is an global object which contains index property",
+ "test": "assertTrue((function testcase() {\n\n var testResult = false;\n\n function callbackfn(val, idx, obj) {\n if (idx === 0) {\n testResult = (val === 11);\n }\n }\n\n try {\n var oldLen = fnGlobalObject().length;\n fnGlobalObject()[0] = 11;\n fnGlobalObject().length = 1;\n\n Array.prototype.forEach.call(fnGlobalObject(), callbackfn);\n\n return testResult;\n } finally {\n delete fnGlobalObject()[0];\n fnGlobalObject().length = oldLen;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.forEach))"
+ },
+ {
+ "id": "15.4.4.18-7-c-i-25",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-i-25.js",
+ "description": "Array.prototype.forEach - This object is the Arguments object which implements its own property get method (number of arguments is less than number of parameters)",
+ "test": "assertTrue((function testcase() {\n\n var testResult = false;\n\n function callbackfn(val, idx, obj) {\n if (idx === 0) {\n testResult = (val === 11);\n }\n }\n\n var func = function (a, b) {\n return Array.prototype.forEach.call(arguments, callbackfn);\n };\n\n func(11);\n\n return testResult;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.forEach))"
+ },
+ {
+ "id": "15.4.4.18-7-c-i-26",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-i-26.js",
+ "description": "Array.prototype.forEach - This object is the Arguments object which implements its own property get method (number of arguments equals number of parameters)",
+ "test": "assertTrue((function testcase() {\n\n var called = 0;\n var testResult = false;\n\n function callbackfn(val, idx, obj) {\n called++;\n if (called !== 1 && !testResult) {\n return;\n }\n if (idx === 0) {\n testResult = (val === 11);\n } else if (idx === 1) {\n testResult = (val === 9);\n } else {\n testResult = false;\n }\n }\n\n var func = function (a, b) {\n Array.prototype.forEach.call(arguments, callbackfn);\n };\n\n func(11, 9);\n\n return testResult;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.forEach))"
+ },
+ {
+ "id": "15.4.4.18-7-c-i-27",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-i-27.js",
+ "description": "Array.prototype.forEach - This object is the Arguments object which implements its own property get method (number of arguments is greater than number of parameters)",
+ "test": "assertTrue((function testcase() {\n\n var called = 0;\n var testResult = false;\n\n function callbackfn(val, idx, obj) {\n called++;\n if (called !== 1 && !testResult) {\n return;\n }\n if (idx === 0) {\n testResult = (val === 11);\n } else if (idx === 1) {\n testResult = (val === 12);\n } else if (idx === 2) {\n testResult = (val === 9);\n } else {\n testResult = false;\n }\n }\n\n var func = function (a, b) {\n return Array.prototype.forEach.call(arguments, callbackfn);\n };\n\n func(11, 12, 9);\n\n return testResult;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.forEach))"
+ },
+ {
+ "id": "15.4.4.18-7-c-i-28",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-i-28.js",
+ "description": "Array.prototype.forEach - element changed by getter on previous iterations is observed on an Array",
+ "test": "assertTrue((function testcase() {\n\n var preIterVisible = false;\n var arr = [];\n var testResult = false;\n\n function callbackfn(val, idx, obj) {\n if (idx === 1) {\n testResult = (val === 9);\n }\n }\n\n Object.defineProperty(arr, \"0\", {\n get: function () {\n preIterVisible = true;\n return 11;\n },\n configurable: true\n });\n\n Object.defineProperty(arr, \"1\", {\n get: function () {\n if (preIterVisible) {\n return 9;\n } else {\n return 13;\n }\n },\n configurable: true\n });\n\n arr.forEach(callbackfn);\n\n return testResult;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.forEach) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.4.4.18-7-c-i-29",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-i-29.js",
+ "description": "Array.prototype.forEach - element changed by getter on previous iterations is observed on an Array-like object",
+ "test": "assertTrue((function testcase() {\n\n var preIterVisible = false;\n var obj = { length: 2 };\n var testResult = false;\n\n function callbackfn(val, idx, obj) {\n if (idx === 1) {\n testResult = (val === 9);\n }\n }\n\n Object.defineProperty(obj, \"0\", {\n get: function () {\n preIterVisible = true;\n return 11;\n },\n configurable: true\n });\n\n Object.defineProperty(obj, \"1\", {\n get: function () {\n if (preIterVisible) {\n return 9;\n } else {\n return 13;\n }\n },\n configurable: true\n });\n\n Array.prototype.forEach.call(obj, callbackfn);\n\n return testResult;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.forEach) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects())"
+ },
+ {
+ "id": "15.4.4.18-7-c-i-3",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-i-3.js",
+ "description": "Array.prototype.forEach - element to be retrieved is own data property that overrides an inherited data property on an Array",
+ "test": "assertTrue((function testcase() {\n\n var kValue = \"abc\";\n var testResult = false;\n\n function callbackfn(val, idx, obj) {\n if (idx === 5) {\n testResult = (val === kValue);\n }\n }\n\n var proto = { 5: 100 };\n\n var Con = function () { };\n Con.prototype = proto;\n\n var child = new Con();\n child[5] = kValue;\n child.length = 10;\n\n Array.prototype.forEach.call(child, callbackfn);\n\n return testResult;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.forEach))"
+ },
+ {
+ "id": "15.4.4.18-7-c-i-30",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-i-30.js",
+ "description": "Array.prototype.forEach - unnhandled exceptions happened in getter terminate iteration on an Array-like object",
+ "test": "assertTrue((function testcase() {\n\n var obj = { 0: 11, 5: 10, 10: 8, length: 20 };\n var accessed = false;\n\n function callbackfn(val, idx, obj) {\n if (idx > 1) {\n accessed = true;\n }\n }\n\n Object.defineProperty(obj, \"1\", {\n get: function () {\n throw new RangeError(\"unhandle exception happened in getter\");\n },\n configurable: true\n });\n\n Object.defineProperty(obj, \"2\", {\n get: function () {\n accessed = true;\n return 100;\n },\n configurable: true\n });\n\n try {\n Array.prototype.forEach.call(obj, callbackfn);\n return false;\n } catch (ex) {\n return (ex instanceof RangeError) && !accessed;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.forEach) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects())"
+ },
+ {
+ "id": "15.4.4.18-7-c-i-31",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-i-31.js",
+ "description": "Array.prototype.forEach - unnhandled exceptions happened in getter terminate iteration on an Array-like object",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n\n function callbackfn(val, idx, obj) {\n if (idx > 1) {\n accessed = true;\n }\n }\n\n var arr = [];\n arr[5] = 10;\n arr[10] = 100;\n\n Object.defineProperty(arr, \"1\", {\n get: function () {\n throw new RangeError(\"unhandle exception happened in getter\");\n },\n configurable: true\n });\n\n Object.defineProperty(arr, \"2\", {\n get: function () {\n accessed = true;\n return 100;\n },\n configurable: true\n });\n\n try {\n arr.forEach(callbackfn);\n return false;\n } catch (ex) {\n return (ex instanceof RangeError) && !accessed;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.forEach) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.4.4.18-7-c-i-4",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-i-4.js",
+ "description": "Array.prototype.forEach - element to be retrieved is own data property that overrides an inherited data property on an Array",
+ "test": "assertTrue((function testcase() {\n\n var testResult = false;\n\n function callbackfn(val, idx, obj) {\n if (idx === 0) {\n testResult = (val === 12);\n }\n }\n\n try {\n Array.prototype[0] = 11;\n\n [12].forEach(callbackfn);\n\n return testResult;\n } finally {\n delete Array.prototype[0];\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.forEach))"
+ },
+ {
+ "id": "15.4.4.18-7-c-i-5",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-i-5.js",
+ "description": "Array.prototype.forEach - element to be retrieved is own data property that overrides an inherited accessor property on an Array-like object",
+ "test": "assertTrue((function testcase() {\n\n var testResult = false;\n\n function callbackfn(val, idx, obj) {\n if (idx === 0) {\n testResult = (val === 11);\n }\n }\n\n var proto = {};\n\n Object.defineProperty(proto, \"0\", {\n get: function () {\n return 5;\n },\n configurable: true\n });\n\n var Con = function () { };\n Con.prototype = proto;\n\n var child = new Con();\n child.length = 2;\n Object.defineProperty(child, \"0\", {\n value: 11,\n configurable: true\n });\n\n Array.prototype.forEach.call(child, callbackfn);\n\n return testResult;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.forEach) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects())"
+ },
+ {
+ "id": "15.4.4.18-7-c-i-6",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-i-6.js",
+ "description": "Array.prototype.forEach - element to be retrieved is own data property that overrides an inherited accessor property on an Array",
+ "test": "assertTrue((function testcase() {\n\n var testResult = false;\n\n function callbackfn(val, idx, obj) {\n if (idx === 0) {\n testResult = (val === 11);\n }\n }\n\n try {\n Object.defineProperty(Array.prototype, \"0\", {\n get: function () {\n return 9;\n },\n configurable: true\n });\n\n [11].forEach(callbackfn);\n\n return testResult;\n } finally {\n delete Array.prototype[0];\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.forEach) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.4.4.18-7-c-i-7",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-i-7.js",
+ "description": "Array.prototype.forEach - element to be retrieved is inherited data property on an Array-like object",
+ "test": "assertTrue((function testcase() {\n\n var kValue = 'abc';\n var testResult = false;\n\n function callbackfn(val, idx, obj) {\n if (idx === 5) {\n testResult = (val === kValue);\n }\n }\n\n var proto = { 5: kValue };\n\n var Con = function () { };\n Con.prototype = proto;\n\n var child = new Con();\n child.length = 10;\n\n Array.prototype.forEach.call(child, callbackfn);\n\n return testResult;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.forEach))"
+ },
+ {
+ "id": "15.4.4.18-7-c-i-8",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-i-8.js",
+ "description": "Array.prototype.forEach - element to be retrieved is inherited data property on an Array",
+ "test": "assertTrue((function testcase() {\n\n var testResult = false;\n\n function callbackfn(val, idx, obj) {\n if (idx === 1) {\n testResult = (val === 13);\n }\n }\n\n try {\n Array.prototype[1] = 13;\n\n [, , , ].forEach(callbackfn);\n\n return testResult;\n } finally {\n delete Array.prototype[1];\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.forEach) && ![, 1].hasOwnProperty(0))"
+ },
+ {
+ "id": "15.4.4.18-7-c-i-9",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-i-9.js",
+ "description": "Array.prototype.forEach - element to be retrieved is own accessor property on an Array-like object",
+ "test": "assertTrue((function testcase() {\n\n var testResult = false;\n\n function callbackfn(val, idx, obj) {\n if (idx === 0) {\n testResult = (val === 11);\n }\n }\n\n var obj = { 10: 10, length: 20 };\n\n Object.defineProperty(obj, \"0\", {\n get: function () {\n return 11;\n },\n configurable: true\n });\n\n Array.prototype.forEach.call(obj, callbackfn);\n\n return testResult;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.forEach) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects())"
+ },
+ {
+ "id": "15.4.4.18-7-c-ii-1",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-ii-1.js",
+ "description": "Array.prototype.forEach - callbackfn called with correct parameters",
+ "test": "assertTrue((function testcase() { \n \n var bPar = true;\n var bCalled = false;\n function callbackfn(val, idx, obj)\n {\n bCalled = true;\n if(obj[idx] !== val)\n bPar = false;\n }\n\n var arr = [0,1,true,null,new Object(),\"five\"];\n arr[999999] = -6.6;\n arr.forEach(callbackfn);\n if(bCalled === true && bPar === true)\n return true;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.forEach))"
+ },
+ {
+ "id": "15.4.4.18-7-c-ii-10",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-ii-10.js",
+ "description": "Array.prototype.forEach - callbackfn is called with 1 formal parameter",
+ "test": "assertTrue((function testcase() {\n\n var result = false;\n function callbackfn(val) {\n result = (val > 10);\n }\n\n [11].forEach(callbackfn); \n return result;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.forEach))"
+ },
+ {
+ "id": "15.4.4.18-7-c-ii-11",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-ii-11.js",
+ "description": "Array.prototype.forEach - callbackfn is called with 2 formal parameter",
+ "test": "assertTrue((function testcase() {\n\n var result = false;\n function callbackfn(val, idx) {\n result = (val > 10 && arguments[2][idx] === val);\n }\n\n [11].forEach(callbackfn); \n return result;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.forEach))"
+ },
+ {
+ "id": "15.4.4.18-7-c-ii-12",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-ii-12.js",
+ "description": "Array.prototype.forEach - callbackfn is called with 3 formal parameter",
+ "test": "assertTrue((function testcase() {\n\n var result = false;\n function callbackfn(val, idx, obj) {\n result = (val > 10 && obj[idx] === val);\n }\n\n [11].forEach(callbackfn);\n return result;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.forEach))"
+ },
+ {
+ "id": "15.4.4.18-7-c-ii-13",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-ii-13.js",
+ "description": "Array.prototype.forEach - callbackfn that uses arguments",
+ "test": "assertTrue((function testcase() {\n\n var result = false;\n function callbackfn() {\n result = (arguments[2][arguments[1]] === arguments[0]);\n }\n\n [11].forEach(callbackfn);\n return result;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.forEach))"
+ },
+ {
+ "id": "15.4.4.18-7-c-ii-16",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-ii-16.js",
+ "description": "Array.prototype.forEach - 'this' of 'callbackfn' is a Boolean object when T is not an object (T is a boolean)",
+ "test": "assertTrue((function testcase() {\n\n var result = false;\n function callbackfn(val, idx, obj) {\n result = (this.valueOf() !== false);\n }\n\n var obj = { 0: 11, length: 2 };\n\n Array.prototype.forEach.call(obj, callbackfn, false);\n return !result;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.forEach))"
+ },
+ {
+ "id": "15.4.4.18-7-c-ii-17",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-ii-17.js",
+ "description": "Array.prototype.forEach - 'this' of 'callbackfn' is a Number object when T is not an object (T is a number)",
+ "test": "assertTrue((function testcase() {\n\n var result = false;\n function callbackfn(val, idx, o) {\n result = (5 === this.valueOf());\n }\n\n var obj = { 0: 11, length: 2 };\n\n Array.prototype.forEach.call(obj, callbackfn, 5);\n return result;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.forEach))"
+ },
+ {
+ "id": "15.4.4.18-7-c-ii-18",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-ii-18.js",
+ "description": "Array.prototype.forEach - 'this' of 'callbackfn' is an String object when T is not an object (T is a string)",
+ "test": "assertTrue((function testcase() {\n\n var result = false;\n function callbackfn(val, idx, obj) {\n result = ('hello' === this.valueOf());\n }\n\n var obj = { 0: 11, length: 2 };\n\n Array.prototype.forEach.call(obj, callbackfn, \"hello\");\n return result;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.forEach))"
+ },
+ {
+ "id": "15.4.4.18-7-c-ii-19",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-ii-19.js",
+ "description": "Array.prototype.forEach - non-indexed properties are not called",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n var result = true;\n function callbackfn(val, idx, obj) {\n accessed = true;\n if (val === 8) {\n result = false;\n }\n }\n\n var obj = { 0: 11, 10: 12, non_index_property: 8, length: 20 };\n\n Array.prototype.forEach.call(obj, callbackfn);\n return result && accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.forEach))"
+ },
+ {
+ "id": "15.4.4.18-7-c-ii-2",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-ii-2.js",
+ "description": "Array.prototype.forEach - callbackfn takes 3 arguments",
+ "test": "assertTrue((function testcase() { \n \n var parCnt = 3;\n var bCalled = false\n function callbackfn(val, idx, obj)\n { \n bCalled = true;\n if(arguments.length !== 3)\n parCnt = arguments.length; //verify if callbackfn was called with 3 parameters\n }\n\n var arr = [0,1,2,3,4,5,6,7,8,9];\n arr.forEach(callbackfn);\n if(bCalled === true && parCnt === 3)\n return true;\n\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.forEach))"
+ },
+ {
+ "id": "15.4.4.18-7-c-ii-20",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-ii-20.js",
+ "description": "Array.prototype.forEach - callbackfn called with correct parameters (thisArg is correct)",
+ "test": "assertTrue((function testcase() {\n\n var result = false;\n function callbackfn(val, idx, obj) {\n result = (10 === this.threshold);\n }\n\n var thisArg = { threshold: 10 };\n\n var obj = { 0: 11, length: 1 };\n\n Array.prototype.forEach.call(obj, callbackfn, thisArg);\n return result;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.forEach))"
+ },
+ {
+ "id": "15.4.4.18-7-c-ii-21",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-ii-21.js",
+ "description": "Array.prototype.forEach - callbackfn called with correct parameters (kValue is correct)",
+ "test": "assertTrue((function testcase() {\n\n var resultOne = false;\n var resultTwo = false;\n\n function callbackfn(val, idx, obj) {\n if (idx === 0) {\n resultOne = (val === 11);\n }\n\n if (idx === 1) {\n resultTwo = (val === 12);\n }\n\n }\n\n var obj = { 0: 11, 1: 12, length: 2 };\n\n Array.prototype.forEach.call(obj, callbackfn);\n return resultOne && resultTwo;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.forEach))"
+ },
+ {
+ "id": "15.4.4.18-7-c-ii-22",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-ii-22.js",
+ "description": "Array.prototype.forEach - callbackfn called with correct parameters (the index k is correct)",
+ "test": "assertTrue((function testcase() {\n\n var resultOne = false;\n var resultTwo = false;\n\n function callbackfn(val, idx, obj) {\n if (val === 11) {\n resultOne = (idx === 0);\n }\n\n if (val === 12) {\n resultTwo = (idx === 1);\n }\n\n }\n\n var obj = { 0: 11, 1: 12, length: 2 };\n\n Array.prototype.forEach.call(obj, callbackfn);\n return resultOne && resultTwo;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.forEach))"
+ },
+ {
+ "id": "15.4.4.18-7-c-ii-23",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-ii-23.js",
+ "description": "Array.prototype.forEach - callbackfn called with correct parameters (this object O is correct)",
+ "test": "assertTrue((function testcase() {\n\n var result = false;\n var obj = { 0: 11, length: 2 };\n\n function callbackfn(val, idx, o) {\n result = (obj === o);\n }\n\n Array.prototype.forEach.call(obj, callbackfn);\n return result;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.forEach))"
+ },
+ {
+ "id": "15.4.4.18-7-c-ii-4",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-ii-4.js",
+ "description": "Array.prototype.forEach - k values are passed in ascending numeric order",
+ "test": "assertTrue((function testcase() {\n\n var arr = [0, 1, 2, 3, 4, 5];\n var lastIdx = 0;\n var called = 0;\n var result = true;\n function callbackfn(val, idx, o) {\n called++;\n if (lastIdx !== idx) {\n result = false;\n } else {\n lastIdx++;\n }\n }\n\n arr.forEach(callbackfn);\n return result && arr.length === called;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.forEach))"
+ },
+ {
+ "id": "15.4.4.18-7-c-ii-5",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-ii-5.js",
+ "description": "Array.prototype.forEach - k values are accessed during each iteration and not prior to starting the loop on an Array",
+ "test": "assertTrue((function testcase() {\n\n var result = true;\n var kIndex = [];\n\n //By below way, we could verify that k would be setted as 0, 1, ..., length - 1 in order, and each value will be setted one time.\n function callbackfn(val, idx, obj) {\n //Each position should be visited one time, which means k is accessed one time during iterations.\n if (typeof kIndex[idx] === \"undefined\") {\n //when current position is visited, its previous index should has been visited.\n if (idx !== 0 && typeof kIndex[idx - 1] === \"undefined\") {\n result = false;\n }\n kIndex[idx] = 1;\n } else {\n result = false;\n }\n }\n\n [11, 12, 13, 14].forEach(callbackfn, undefined);\n\n return result;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.forEach))"
+ },
+ {
+ "id": "15.4.4.18-7-c-ii-6",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-ii-6.js",
+ "description": "Array.prototype.forEach - arguments to callbackfn are self consistent",
+ "test": "assertTrue((function testcase() {\n\n var result = false;\n var obj = { 0: 11, length: 1 };\n var thisArg = {};\n\n function callbackfn() {\n result = (this === thisArg &&\n arguments[0] === 11 &&\n arguments[1] === 0 &&\n arguments[2] === obj);\n }\n\n Array.prototype.forEach.call(obj, callbackfn, thisArg);\n return result;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.forEach))"
+ },
+ {
+ "id": "15.4.4.18-7-c-ii-7",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-ii-7.js",
+ "description": "Array.prototype.forEach - unhandled exceptions happened in callbackfn terminate iteration",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n\n function callbackfn(val, idx, obj) {\n if (idx > 0) {\n accessed = true;\n }\n if (idx === 0) {\n throw new Error(\"Exception occurred in callbackfn\");\n }\n }\n\n var obj = { 0: 11, 4: 10, 10: 8, length: 20 };\n\n try {\n Array.prototype.forEach.call(obj, callbackfn);\n return false;\n } catch (ex) {\n return ex instanceof Error && !accessed;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.forEach))"
+ },
+ {
+ "id": "15.4.4.18-7-c-ii-8",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-ii-8.js",
+ "description": "Array.prototype.forEach - element changed by callbackfn on previous iterations is observed",
+ "test": "assertTrue((function testcase() {\n\n var result = false;\n var obj = { 0: 11, 1: 12, length: 2 };\n\n function callbackfn(val, idx, o) {\n if (idx === 0) {\n obj[idx + 1] = 8;\n }\n \n if (idx === 1) {\n result = (val === 8);\n }\n }\n\n Array.prototype.forEach.call(obj, callbackfn);\n return result;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.forEach))"
+ },
+ {
+ "id": "15.4.4.18-7-c-ii-9",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-7-c-ii-9.js",
+ "description": "Array.prototype.forEach - callbackfn is called with 0 formal parameter",
+ "test": "assertTrue((function testcase() {\n\n var called = 0;\n function callbackfn() {\n called++;\n }\n\n [11, 12].forEach(callbackfn);\n return 2 === called;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.forEach))"
+ },
+ {
+ "id": "15.4.4.18-8-1",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-8-1.js",
+ "description": "Array.prototype.forEach doesn't call callbackfn if 'length' is 0 (empty array)",
+ "test": "assertTrue((function testcase() {\n var callCnt = 0;\n function cb(){callCnt++}\n var i = [].forEach(cb);\n if (callCnt === 0) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.forEach))"
+ },
+ {
+ "id": "15.4.4.18-8-10",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-8-10.js",
+ "description": "Array.prototype.forEach - subclassed array when length is reduced",
+ "test": "assertTrue((function testcase() {\n foo.prototype = new Array(1, 2, 3);\n function foo() {}\n var f = new foo();\n f.length = 1;\n \n var callCnt = 0;\n function cb(){callCnt++}\n var i = f.forEach(cb); \n if (callCnt === 1) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.forEach))"
+ },
+ {
+ "id": "15.4.4.18-8-11",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-8-11.js",
+ "description": "Array.prototype.forEach doesn't mutate the array on which it is called on",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(val, idx, obj)\n {\n return true;\n }\n var arr = [1,2,3,4,5];\n arr.forEach(callbackfn);\n if(arr[0] === 1 &&\n arr[1] === 2 &&\n arr[2] === 3 &&\n arr[3] === 4 &&\n arr[4] === 5)\n {\n return true;\n }\n\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.forEach))"
+ },
+ {
+ "id": "15.4.4.18-8-12",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-8-12.js",
+ "description": "Array.prototype.forEach doesn't visit expandos",
+ "test": "assertTrue((function testcase() {\n\n var callCnt = 0;\n function callbackfn(val, idx, obj)\n {\n callCnt++;\n }\n var arr = [1,2,3,4,5];\n arr[\"i\"] = 10;\n arr[true] = 11;\n\n arr.forEach(callbackfn);\n if(callCnt == 5)\n {\n return true;\n }\n\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.forEach))"
+ },
+ {
+ "id": "15.4.4.18-8-13",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-8-13.js",
+ "description": "Array.prototype.forEach - undefined will be returned when 'len' is 0",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n function callbackfn(val, idx, obj) {\n accessed = true;\n }\n\n var result = [].forEach(callbackfn);\n return typeof result === \"undefined\" && !accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.forEach))"
+ },
+ {
+ "id": "15.4.4.18-8-2",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-8-2.js",
+ "description": "Array.prototype.forEach doesn't call callbackfn if 'length' is 0 (subclassed Array, length overridden to null (type conversion))",
+ "test": "assertTrue((function testcase() {\n foo.prototype = new Array(1, 2, 3);\n function foo() {}\n var f = new foo();\n f.length = null;\n \n var callCnt = 0;\n function cb(){callCnt++}\n var i = f.forEach(cb); \n if (callCnt === 0) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.forEach))"
+ },
+ {
+ "id": "15.4.4.18-8-3",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-8-3.js",
+ "description": "Array.prototype.forEach doesn't call callbackfn if 'length' is 0 (subclassed Array, length overridden to false (type conversion))",
+ "test": "assertTrue((function testcase() {\n foo.prototype = new Array(1, 2, 3);\n function foo() {}\n var f = new foo();\n f.length = false;\n\n var callCnt = 0;\n function cb(){callCnt++}\n var i = f.forEach(cb); \n if (callCnt === 0) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.forEach))"
+ },
+ {
+ "id": "15.4.4.18-8-4",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-8-4.js",
+ "description": "Array.prototype.forEach doesn't call callbackfn if 'length' is 0 (subclassed Array, length overridden to 0 (type conversion))",
+ "test": "assertTrue((function testcase() {\n foo.prototype = new Array(1, 2, 3);\n function foo() {}\n var f = new foo();\n f.length = 0;\n\n var callCnt = 0;\n function cb(){callCnt++}\n var i = f.forEach(cb); \n if (callCnt === 0) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.forEach))"
+ },
+ {
+ "id": "15.4.4.18-8-5",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-8-5.js",
+ "description": "Array.prototype.forEach doesn't call callbackfn if 'length' is 0 (subclassed Array, length overridden to '0' (type conversion))",
+ "test": "assertTrue((function testcase() {\n foo.prototype = new Array(1, 2, 3);\n function foo() {}\n var f = new foo();\n f.length = '0';\n \n var callCnt = 0;\n function cb(){callCnt++}\n var i = f.forEach(cb); \n if (callCnt === 0) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.forEach))"
+ },
+ {
+ "id": "15.4.4.18-8-6",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-8-6.js",
+ "description": "Array.prototype.forEach doesn't call callbackfn if 'length' is 0 (subclassed Array, length overridden with obj with valueOf)",
+ "test": "assertTrue((function testcase() {\n foo.prototype = new Array(1, 2, 3);\n function foo() {}\n var f = new foo();\n \n var o = { valueOf: function () { return 0;}};\n f.length = o;\n \n var callCnt = 0;\n function cb(){callCnt++}\n var i = f.forEach(cb); \n if (callCnt === 0) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.forEach))"
+ },
+ {
+ "id": "15.4.4.18-8-7",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-8-7.js",
+ "description": "Array.prototype.forEach doesn't call callbackfn if 'length' is 0 (subclassed Array, length overridden with obj w/o valueOf (toString))",
+ "test": "assertTrue((function testcase() {\n foo.prototype = new Array(1, 2, 3);\n function foo() {}\n var f = new foo();\n \n var o = { toString: function () { return '0';}};\n f.length = o;\n \n // objects inherit the default valueOf method of the Object object;\n // that simply returns the itself. Since the default valueOf() method\n // does not return a primitive value, ES next tries to convert the object\n // to a number by calling its toString() method and converting the\n // resulting string to a number.\n var callCnt = 0;\n function cb(){callCnt++}\n var i = f.forEach(cb); \n if (callCnt === 0) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.forEach))"
+ },
+ {
+ "id": "15.4.4.18-8-8",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-8-8.js",
+ "description": "Array.prototype.forEach doesn't call callbackfn if 'length' is 0 (subclassed Array, length overridden with []",
+ "test": "assertTrue((function testcase() {\n foo.prototype = new Array(1, 2, 3);\n function foo() {}\n var f = new foo();\n \n f.length = [];\n \n // objects inherit the default valueOf method of the Object object;\n // that simply returns the itself. Since the default valueOf() method\n // does not return a primitive value, ES next tries to convert the object\n // to a number by calling its toString() method and converting the\n // resulting string to a number.\n //\n // The toString( ) method on Array converts the array elements to strings,\n // then returns the result of concatenating these strings, with commas in\n // between. An array with no elements converts to the empty string, which\n // converts to the number 0. If an array has a single element that is a\n // number n, the array converts to a string representation of n, which is\n // then converted back to n itself. If an array contains more than one element,\n // or if its one element is not a number, the array converts to NaN.\n var callCnt = 0;\n function cb(){callCnt++}\n var i = f.forEach(cb); \n if (callCnt === 0) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.forEach))"
+ },
+ {
+ "id": "15.4.4.18-8-9",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.18/15.4.4.18-8-9.js",
+ "description": "Array.prototype.forEach doesn't call callbackfn if 'length' is 0 (subclassed Array, length overridden with [0]",
+ "test": "assertTrue((function testcase() {\n foo.prototype = new Array(1, 2, 3);\n function foo() {}\n var f = new foo();\n \n f.length = [0];\n \n // objects inherit the default valueOf method of the Object object;\n // that simply returns the itself. Since the default valueOf() method\n // does not return a primitive value, ES next tries to convert the object\n // to a number by calling its toString() method and converting the\n // resulting string to a number.\n //\n // The toString( ) method on Array converts the array elements to strings,\n // then returns the result of concatenating these strings, with commas in\n // between. An array with no elements converts to the empty string, which\n // converts to the number 0. If an array has a single element that is a\n // number n, the array converts to a string representation of n, which is\n // then converted back to n itself. If an array contains more than one element,\n // or if its one element is not a number, the array converts to NaN.\n\n var callCnt = 0;\n function cb(){callCnt++}\n var i = f.forEach(cb); \n if (callCnt === 0) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.forEach))"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.4.4.18_Array_prototype_forEach.json b/website/resources/scripts/testcases2/15.4.4.18_Array_prototype_forEach.json
new file mode 100644
index 000000000..a0452465e
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.4.4.18_Array_prototype_forEach.json
@@ -0,0 +1,20 @@
+{
+ "testCollection": {
+ "name": "15.4.4.18_Array_prototype_forEach",
+ "numTests": 2,
+ "tests": [
+ {
+ "section": "15.4.4.18",
+ "description": "Freezes array.forEach during a forEach to see if it works",
+ "test": "['z'].forEach(function(){ Object.freeze(Array.prototype.forEach); });\n",
+ "id": "S15.4.4.18_A1"
+ },
+ {
+ "section": "15.4.4.18",
+ "description": "Freezes array.forEach during a forEach to see if it works",
+ "test": "function foo() {\n ['z'].forEach(function(){ Object.freeze(Array.prototype.forEach); });\n}\nfoo();\n",
+ "id": "S15.4.4.18_A2"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.4.4.19.json b/website/resources/scripts/testcases2/15.4.4.19.json
new file mode 100644
index 000000000..cea3726a5
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.4.4.19.json
@@ -0,0 +1,1359 @@
+{
+ "testCollection": {
+ "name": "15.4.4.19",
+ "numTests": 193,
+ "tests": [
+ {
+ "id": "15.4.4.19-0-1",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-0-1.js",
+ "description": "Array.prototype.map must exist as a function",
+ "test": "assertTrue((function testcase() {\n var f = Array.prototype.map;\n if (typeof(f) === \"function\") {\n return true;\n }\n }).call(this));\n"
+ },
+ {
+ "id": "15.4.4.19-0-2",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-0-2.js",
+ "description": "Array.prototype.map.length must be 1",
+ "test": "assertTrue((Array.prototype.map.length === 1));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-1-1",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-1-1.js",
+ "description": "Array.prototype.map - applied to undefined",
+ "test": "assertTrue((function testcase() {\n try {\n Array.prototype.map.call(undefined); // TypeError is thrown if value is undefined\n return false;\n } catch (e) {\n return (e instanceof TypeError);\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-1-10",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-1-10.js",
+ "description": "Array.prototype.map - applied to the Math object",
+ "test": "assertTrue((function testcase() {\n function callbackfn(val, idx, obj) {\n return ('[object Math]' === Object.prototype.toString.call(obj));\n }\n \n try {\n Math.length = 1;\n Math[0] = 1;\n var testResult = Array.prototype.map.call(Math, callbackfn);\n return testResult[0] === true;\n } finally {\n delete Math[0];\n delete Math.length;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-1-11",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-1-11.js",
+ "description": "Array.prototype.map - applied to Date object",
+ "test": "assertTrue((function testcase() {\n function callbackfn(val, idx, obj) {\n return obj instanceof Date;\n }\n\n var obj = new Date();\n obj.length = 1;\n obj[0] = 1;\n\n var testResult = Array.prototype.map.call(obj, callbackfn);\n\n return testResult[0] === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-1-12",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-1-12.js",
+ "description": "Array.prototype.map - applied to RegExp object",
+ "test": "assertTrue((function testcase() {\n function callbackfn(val, idx, obj) {\n return obj instanceof RegExp;\n }\n\n var obj = new RegExp();\n obj.length = 1;\n obj[0] = 1;\n\n var testResult = Array.prototype.map.call(obj, callbackfn);\n\n return testResult[0] === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-1-13",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-1-13.js",
+ "description": "Array.prototype.map - applied to the JSON object",
+ "test": "assertTrue((function testcase() {\n function callbackfn(val, idx, obj) {\n return ('[object JSON]' === Object.prototype.toString.call(obj));\n }\n\n try {\n JSON.length = 1;\n JSON[0] = 1;\n var testResult = Array.prototype.map.call(JSON, callbackfn);\n return testResult[0] === true;\n } finally {\n delete JSON.length;\n delete JSON[0];\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-1-14",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-1-14.js",
+ "description": "Array.prototype.map - applied to Error object",
+ "test": "assertTrue((function testcase() {\n function callbackfn(val, idx, obj) {\n return obj instanceof Error;\n }\n\n var obj = new Error();\n obj.length = 1;\n obj[0] = 1;\n\n var testResult = Array.prototype.map.call(obj, callbackfn);\n\n return testResult[0] === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-1-15",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-1-15.js",
+ "description": "Array.prototype.map - applied to the Arguments object",
+ "test": "assertTrue((function testcase() {\n function callbackfn(val, idx, obj) {\n return ('[object Arguments]' === Object.prototype.toString.call(obj));\n }\n\n var obj = (function () {\n return arguments;\n }(\"a\", \"b\"));\n\n var testResult = Array.prototype.map.call(obj, callbackfn);\n\n return testResult[1] === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-1-2",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-1-2.js",
+ "description": "Array.prototype.map - applied to null",
+ "test": "assertTrue((function testcase() {\n try {\n Array.prototype.map.call(null); // TypeError is thrown if value is null\n return false;\n } catch (e) {\n return (e instanceof TypeError);\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-1-3",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-1-3.js",
+ "description": "Array.prototype.map - applied to boolean primitive",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(val, idx, obj) {\n return obj instanceof Boolean;\n }\n\n try {\n Boolean.prototype[0] = true;\n Boolean.prototype.length = 1;\n\n var testResult = Array.prototype.map.call(false, callbackfn);\n return testResult[0] === true;\n } finally {\n delete Boolean.prototype[0];\n delete Boolean.prototype.length;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-1-4",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-1-4.js",
+ "description": "Array.prototype.map - applied to Boolean object",
+ "test": "assertTrue((function testcase() {\n function callbackfn(val, idx, obj) {\n return obj instanceof Boolean;\n }\n\n var obj = new Boolean(true);\n obj.length = 2;\n obj[0] = 11;\n obj[1] = 12;\n\n var testResult = Array.prototype.map.call(obj, callbackfn);\n\n return testResult[0] === true && testResult[1] === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-1-5",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-1-5.js",
+ "description": "Array.prototype.map - applied to number primitive",
+ "test": "assertTrue((function testcase() {\n function callbackfn(val, idx, obj) {\n return obj instanceof Number;\n }\n\n try {\n Number.prototype[0] = 1;\n Number.prototype.length = 1;\n\n var testResult = Array.prototype.map.call(2.5, callbackfn);\n return testResult[0] === true;\n } finally {\n delete Number.prototype[0];\n delete Number.prototype.length;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-1-6",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-1-6.js",
+ "description": "Array.prototype.map - applied to Number object",
+ "test": "assertTrue((function testcase() {\n function callbackfn(val, idx, obj) {\n return obj instanceof Number;\n }\n\n var obj = new Number(-128);\n obj.length = 2;\n obj[0] = 11;\n obj[1] = 12;\n\n var testResult = Array.prototype.map.call(obj, callbackfn);\n\n return testResult[0] === true && testResult[1] === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-1-7",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-1-7.js",
+ "description": "Array.prototype.map - applied to string primitive",
+ "test": "assertTrue((function testcase() {\n function callbackfn(val, idx, obj) {\n return obj instanceof String;\n }\n\n var testResult = Array.prototype.map.call(\"abc\", callbackfn);\n\n return testResult[0] === true && testResult[1] === true && testResult[2] === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-1-8",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-1-8.js",
+ "description": "Array.prototype.map - applied to String object",
+ "test": "assertTrue((function testcase() {\n function callbackfn(val, idx, obj) {\n return obj instanceof String;\n }\n\n var obj = new String(\"abc\");\n var testResult = Array.prototype.map.call(obj, callbackfn);\n\n return testResult[0] === true && testResult[1] === true && testResult[2] === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-1-9",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-1-9.js",
+ "description": "Array.prototype.map - applied to Function object",
+ "test": "assertTrue((function testcase() {\n function callbackfn(val, idx, obj) {\n return obj instanceof Function;\n }\n\n var obj = function (a, b) {\n return a + b;\n };\n obj[0] = 11;\n obj[1] = 9;\n\n var testResult = Array.prototype.map.call(obj, callbackfn);\n\n return testResult[0] === true && testResult[1] === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-2-1",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-2-1.js",
+ "description": "Array.prototype.map - applied to Array-like object when 'length' is an own data property",
+ "test": "assertTrue((function testcase() {\n function callbackfn(val, idx, obj) {\n return val > 10;\n }\n\n var obj = {\n 0: 12,\n 1: 11,\n 2: 9,\n length: 2\n };\n\n var testResult = Array.prototype.map.call(obj, callbackfn);\n\n return testResult.length === 2;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-2-10",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-2-10.js",
+ "description": "Array.prototype.map - applied to Array-like object, 'length' is an inherited accessor property",
+ "test": "assertTrue((function testcase() {\n function callbackfn(val, idx, obj) {\n return val > 10;\n }\n\n var proto = {};\n\n Object.defineProperty(proto, \"length\", {\n get: function () {\n return 2;\n },\n configurable: true\n });\n\n var Con = function () { };\n Con.prototype = proto;\n\n var child = new Con();\n child[0] = 12;\n child[1] = 11;\n child[2] = 9;\n\n var testResult = Array.prototype.map.call(child, callbackfn);\n\n return testResult.length === 2;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.4.4.19-2-11",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-2-11.js",
+ "description": "Array.prototype.map - applied to Array-like object when 'length' is an own accessor property without a get function",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(val, idx, obj) {\n return val > 10;\n }\n\n var obj = {\n 0: 11,\n 1: 12\n };\n Object.defineProperty(obj, \"length\", {\n set: function () { },\n configurable: true\n });\n\n var testResult = Array.prototype.map.call(obj, callbackfn);\n\n return 0 === testResult.length;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.4.4.19-2-12",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-2-12.js",
+ "description": "Array.prototype.map - applied to the Array-like object when 'length' is own accessor property without a get function that overrides an inherited accessor property",
+ "test": "assertTrue((function testcase() {\n function callbackfn(val, idx, obj) {\n return val > 10;\n }\n\n try {\n Object.defineProperty(Object.prototype, \"length\", {\n get: function () {\n return 2;\n },\n configurable: true\n });\n\n var obj = { 0: 12, 1: 11 };\n Object.defineProperty(obj, \"length\", {\n set: function () { },\n configurable: true\n });\n\n var testResult = Array.prototype.map.call(obj, callbackfn);\n return testResult.length === 0;\n } finally {\n delete Object.prototype.length;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.4.4.19-2-13",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-2-13.js",
+ "description": "Array.prototype.map - applied to the Array-like object when 'length' is inherited accessor property without a get function",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(val, idx, obj) {\n return val > 10;\n }\n\n var proto = {};\n Object.defineProperty(proto, \"length\", {\n set: function () { },\n configurable: true\n });\n\n var Con = function () { };\n Con.prototype = proto;\n\n var child = new Con();\n child[0] = 11;\n child[1] = 12;\n\n var testResult = Array.prototype.map.call(child, callbackfn);\n\n return 0 === testResult.length;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.4.4.19-2-14",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-2-14.js",
+ "description": "Array.prototype.map - applied to the Array-like object that 'length' property doesn't exist",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(val, idx, obj) {\n return val > 10;\n }\n\n var obj = { 0: 11, 1: 12 };\n\n var testResult = Array.prototype.map.call(obj, callbackfn);\n\n return 0 === testResult.length;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-2-15",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-2-15.js",
+ "description": "Array.prototype.map - when 'length' is property of the global object",
+ "test": "assertTrue((function testcase() {\n function callbackfn(val, idx, obj) {\n return val > 10;\n }\n\n try {\n var oldLen = fnGlobalObject().length;\n fnGlobalObject()[0] = 12;\n fnGlobalObject()[1] = 11;\n fnGlobalObject()[2] = 9;\n fnGlobalObject().length = 2;\n var testResult = Array.prototype.map.call(fnGlobalObject(), callbackfn);\n return testResult.length === 2;\n } finally {\n delete fnGlobalObject()[0];\n delete fnGlobalObject()[1];\n delete fnGlobalObject()[2];\n fnGlobalObject().length = oldLen;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-2-17",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-2-17.js",
+ "description": "Array.prototype.map - applied to Arguments object, which implements its own property get method",
+ "test": "assertTrue((function testcase() {\n function callbackfn(val, idx, obj) {\n return val > 10;\n }\n\n var func = function (a, b) {\n return Array.prototype.map.call(arguments, callbackfn);\n };\n\n var testResult = func(12, 11);\n\n return testResult.length === 2;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-2-18",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-2-18.js",
+ "description": "Array.prototype.map - applied to String object, which implements its own property get method",
+ "test": "assertTrue((function testcase() {\n function callbackfn(val, idx, obj) {\n return parseInt(val, 10) > 1;\n }\n\n var str = new String(\"432\");\n try {\n String.prototype[3] = \"1\";\n var testResult = Array.prototype.map.call(str, callbackfn);\n\n return 3 === testResult.length;\n } finally {\n delete String.prototype[3];\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-2-19",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-2-19.js",
+ "description": "Array.prototype.map - applied to Function object, which implements its own property get method",
+ "test": "assertTrue((function testcase() {\n function callbackfn(val, idx, obj) {\n return val > 10;\n }\n\n var fun = function (a, b) {\n return a + b;\n };\n fun[0] = 12;\n fun[1] = 11;\n fun[2] = 9;\n\n var testResult = Array.prototype.map.call(fun, callbackfn);\n\n return 2 === testResult.length;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-2-2",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-2-2.js",
+ "description": "Array.prototype.map - when 'length' is own data property on an Array",
+ "test": "assertTrue((function testcase() {\n function callbackfn(val, idx, obj) {\n return val > 10;\n }\n\n var testResult = [12, 11].map(callbackfn);\n return testResult.length === 2;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-2-3",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-2-3.js",
+ "description": "Array.prototype.map - applied to Array-like object, 'length' is an own data property that overrides an inherited data property",
+ "test": "assertTrue((function testcase() {\n function callbackfn(val, idx, obj) {\n return val > 10;\n }\n\n var proto = { length: 3 };\n\n var Con = function () { };\n Con.prototype = proto;\n\n var child = new Con();\n child.length = 2;\n child[0] = 12;\n child[1] = 11;\n child[2] = 9;\n\n var testResult = Array.prototype.map.call(child, callbackfn);\n\n return testResult.length === 2;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-2-4",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-2-4.js",
+ "description": "Array.prototype.map - when 'length' is own data property that overrides an inherited data property on an Array",
+ "test": "assertTrue((function testcase() {\n function callbackfn(val, idx, obj) {\n return val > 10;\n }\n var arrProtoLen;\n try {\n arrProtoLen = Array.prototype.length;\n Array.prototype.length = 0;\n var testResult = [12, 11].map(callbackfn);\n return testResult.length === 2;\n } finally {\n Array.prototype.length = arrProtoLen;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-2-5",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-2-5.js",
+ "description": "Array.prototype.map - applied to Array-like object, 'length' is an own data property that overrides an inherited accessor property",
+ "test": "assertTrue((function testcase() {\n function callbackfn(val, idx, obj) {\n return val > 10;\n }\n\n var proto = {};\n\n Object.defineProperty(proto, \"length\", {\n get: function () {\n return 3;\n },\n configurable: true\n });\n\n var Con = function () { };\n Con.prototype = proto;\n\n var child = new Con();\n child.length = 2;\n Object.defineProperty(child, \"length\", {\n value: 2,\n configurable: true\n });\n child[0] = 12;\n child[1] = 11;\n child[2] = 9;\n\n var testResult = Array.prototype.map.call(child, callbackfn);\n\n return testResult.length === 2;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.4.4.19-2-6",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-2-6.js",
+ "description": "Array.prototype.map - applied to Array-like object, 'length' is an inherited data property",
+ "test": "assertTrue((function testcase() {\n function callbackfn(val, idx, obj) {\n return val > 10;\n }\n\n var proto = { length: 2 };\n\n var Con = function () { };\n Con.prototype = proto;\n\n var child = new Con();\n child[0] = 12;\n child[1] = 11;\n child[2] = 9;\n\n var testResult = Array.prototype.map.call(child, callbackfn);\n\n return testResult.length === 2;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-2-7",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-2-7.js",
+ "description": "Array.prototype.map - applied to Array-like object, 'length' is an own accessor property",
+ "test": "assertTrue((function testcase() {\n function callbackfn(val, idx, obj) {\n return val > 10;\n }\n\n var obj = {};\n\n Object.defineProperty(obj, \"length\", {\n get: function () {\n return 2;\n },\n configurable: true\n });\n\n obj[0] = 12;\n obj[1] = 11;\n obj[2] = 9;\n\n var testResult = Array.prototype.map.call(obj, callbackfn);\n\n return testResult.length === 2;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.4.4.19-2-8",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-2-8.js",
+ "description": "Array.prototype.map - applied to Array-like object, 'length' is an own accessor property that overrides an inherited data property",
+ "test": "assertTrue((function testcase() {\n function callbackfn(val, idx, obj) {\n return val > 10;\n }\n\n var proto = { length: 3 };\n\n var Con = function () { };\n Con.prototype = proto;\n\n var child = new Con();\n\n Object.defineProperty(child, \"length\", {\n get: function () {\n return 2;\n },\n configurable: true\n });\n\n child[0] = 12;\n child[1] = 11;\n child[2] = 9;\n\n var testResult = Array.prototype.map.call(child, callbackfn);\n\n return testResult.length === 2;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.4.4.19-2-9",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-2-9.js",
+ "description": "Array.prototype.map - applied to Array-like object when 'length' is an own accessor property that overrides an inherited accessor property",
+ "test": "assertTrue((function testcase() {\n function callbackfn(val, idx, obj) {\n return val > 10;\n }\n\n var proto = {};\n\n Object.defineProperty(proto, \"length\", {\n get: function () {\n return 3;\n },\n configurable: true\n });\n\n var Con = function () { };\n Con.prototype = proto;\n\n var child = new Con();\n\n Object.defineProperty(child, \"length\", {\n get: function () {\n return 2;\n },\n configurable: true\n });\n\n child[0] = 12;\n child[1] = 11;\n child[2] = 9;\n\n var testResult = Array.prototype.map.call(child, callbackfn);\n\n return testResult.length === 2;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.4.4.19-3-1",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-1.js",
+ "description": "Array.prototype.map - value of 'length' is undefined",
+ "test": "assertTrue((function testcase() {\n function callbackfn(val, idx, obj) {\n return val > 10;\n }\n\n var obj = { length: undefined };\n\n var newArr = Array.prototype.map.call(obj, callbackfn);\n\n return newArr.length === 0;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-3-10",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-10.js",
+ "description": "Array.prototype.map - value of 'length' is a number (value is NaN)",
+ "test": "assertTrue((function testcase() {\n function callbackfn(val, idx, obj) {\n return val < 10;\n }\n\n var obj = { 0: 9, length: NaN };\n\n var newArr = Array.prototype.map.call(obj, callbackfn);\n\n return newArr.length === 0;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-3-11",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-11.js",
+ "description": "Array.prototype.map - 'length' is a string containing a positive number",
+ "test": "assertTrue((function testcase() {\n function callbackfn(val, idx, obj) {\n return val < 10;\n }\n\n var obj = { 0: 11, 1: 9, 2: 12, length: \"2\" };\n\n var newArr = Array.prototype.map.call(obj, callbackfn);\n\n return newArr.length === 2;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-3-12",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-12.js",
+ "description": "Array.prototype.map - 'length' is a string containing a negative number",
+ "test": "assertTrue((function testcase() {\n function callbackfn(val, idx, obj) {\n return val < 10;\n }\n\n var obj = { 0: 11, 1: 9, 2: 12, length: \"-4294967294\" };\n\n var newArr = Array.prototype.map.call(obj, callbackfn);\n\n return newArr.length === 2;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-3-13",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-13.js",
+ "description": "Array.prototype.map - value of 'length' is string that is able to convert to number primitive (value is a decimal number)",
+ "test": "assertTrue((function testcase() {\n function callbackfn(val, idx, obj) {\n return val < 10;\n }\n\n var obj = { 0: 11, 1: 9, 2: 12, length: \"2.5\" };\n\n var newArr = Array.prototype.map.call(obj, callbackfn);\n\n return newArr.length === 2;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-3-14",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-14.js",
+ "description": "Array.prototype.map - 'length' is a string containing Infinity",
+ "test": "assertTrue((function testcase() {\n function callbackfn(val, idx, obj) {\n return val < 10;\n }\n\n var obj = { 0: 9, length: \"Infinity\" };\n\n var newArr = Array.prototype.map.call(obj, callbackfn);\n\n return newArr.length === 0;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-3-15",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-15.js",
+ "description": "Array.prototype.map - 'length' is a string containing an exponential number",
+ "test": "assertTrue((function testcase() {\n function callbackfn(val, idx, obj) {\n return val < 10;\n }\n\n var obj = { 0: 11, 1: 9, 2: 12, length: \"2E0\" };\n\n var newArr = Array.prototype.map.call(obj, callbackfn);\n\n return newArr.length === 2;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-3-16",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-16.js",
+ "description": "Array.prototype.map - 'length' is a string containing a hex number",
+ "test": "assertTrue((function testcase() {\n function callbackfn(val, idx, obj) {\n return val < 10;\n }\n\n var obj = { 0: 11, 1: 9, 2: 12, length: \"0x0002\" };\n\n var newArr = Array.prototype.map.call(obj, callbackfn);\n\n return newArr.length === 2;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-3-17",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-17.js",
+ "description": "Array.prototype.map - when 'length' is a string containing a number with leading zeros",
+ "test": "assertTrue((function testcase() {\n function callbackfn(val, idx, obj) {\n return val < 10;\n }\n\n var obj = { 0: 11, 1: 9, 2: 12, length: \"0002.00\" };\n\n var newArr = Array.prototype.map.call(obj, callbackfn);\n\n return newArr.length === 2;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-3-18",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-18.js",
+ "description": "Array.prototype.map - value of 'length' is a string that can't convert to a number",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(val, idx, obj) {\n return val > 10;\n }\n\n var obj = { length: \"asdf!_\" };\n\n var newArr = Array.prototype.map.call(obj, callbackfn);\n\n return newArr.length === 0;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-3-19",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-19.js",
+ "description": "Array.prototype.map - value of 'length' is an Object which has an own toString method",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(val, idx, obj) {\n return val < 10;\n }\n\n var obj = {\n 0: 11,\n 1: 9,\n\n length: {\n toString: function () {\n return '2';\n }\n }\n };\n\n var newArr = Array.prototype.map.call(obj, callbackfn);\n\n return newArr.length === 2;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-3-2",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-2.js",
+ "description": "Array.prototype.map on an Array-like object if 'length' is 1 (length overridden to true(type conversion))",
+ "test": "assertTrue((function testcase() {\n function callbackfn(val, idx, obj) {\n return val > 10;\n }\n\n var obj = { 0: 11, length: true };\n\n var newArr = Array.prototype.map.call(obj, callbackfn);\n\n return newArr.length === 1;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-3-20",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-20.js",
+ "description": "Array.prototype.map - value of 'length' is an Object which has an own valueOf method",
+ "test": "assertTrue((function testcase() {\n function callbackfn(val, idx, obj) {\n return val < 10;\n }\n\n var obj = {\n 0: 11,\n 1: 9,\n\n length: {\n valueOf: function () {\n return 2;\n }\n }\n };\n\n var newArr = Array.prototype.map.call(obj, callbackfn);\n\n return newArr.length === 2;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-3-21",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-21.js",
+ "description": "Array.prototype.map - 'length' is an object that has an own valueOf method that returns an object and toString method that returns a string",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(val, idx, obj) {\n return val < 10;\n }\n\n var firstStepOccured = false;\n var secondStepOccured = false;\n var obj = {\n 0: 11,\n 1: 9,\n\n length: {\n valueOf: function () {\n firstStepOccured = true;\n return {};\n },\n toString: function () {\n secondStepOccured = true;\n return '2';\n }\n }\n };\n\n var newArr = Array.prototype.map.call(obj, callbackfn);\n\n return newArr.length === 2 && firstStepOccured && secondStepOccured;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-3-22",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-22.js",
+ "description": "Array.prototype.map throws TypeError exception when 'length' is an object with toString and valueOf methods that don�t return primitive values",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(val, idx, obj) {\n return val > 10;\n }\n\n var obj = {\n 1: 11,\n 2: 12,\n\n length: {\n valueOf: function () {\n return {};\n },\n toString: function () {\n return {};\n }\n }\n };\n\n try {\n Array.prototype.map.call(obj, callbackfn);\n return false;\n } catch (ex) {\n return ex instanceof TypeError;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-3-23",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-23.js",
+ "description": "Array.prototype.map uses inherited valueOf method when 'length' is an object with an own toString and inherited valueOf methods",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(val, idx, obj) {\n return val < 10;\n }\n\n var valueOfAccessed = false;\n var toStringAccessed = false;\n\n var proto = {\n valueOf: function () {\n valueOfAccessed = true;\n return 2;\n }\n };\n\n var Con = function () { };\n Con.prototype = proto;\n\n var child = new Con();\n\n child.toString = function () {\n toStringAccessed = true;\n return '1';\n };\n\n var obj = {\n 0: 11,\n 1: 9,\n length: child\n };\n\n var newArr = Array.prototype.map.call(obj, callbackfn);\n\n return newArr.length === 2 && valueOfAccessed && !toStringAccessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-3-24",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-24.js",
+ "description": "Array.prototype.map - value of 'length' is a positive non-integer, ensure truncation occurs in the proper direction",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(val, idx, obj) {\n return val < 10;\n }\n\n var obj = {\n 0: 11,\n 1: 9,\n length: 2.685\n };\n\n var newArr = Array.prototype.map.call(obj, callbackfn);\n\n return newArr.length === 2;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-3-25",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-25.js",
+ "description": "Array.prototype.map - value of 'length' is a negative non-integer, ensure truncation occurs in the proper direction",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(val, idx, obj) {\n return val < 10;\n }\n\n var obj = {\n 0: 11,\n 1: 9,\n length: -4294967294.5\n };\n\n var newArr = Array.prototype.map.call(obj, callbackfn);\n\n return newArr.length === 2;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-3-28",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-28.js",
+ "description": "Array.prototype.map - value of 'length' is boundary value (2^32)",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(val, idx, obj) {\n return val > 10;\n }\n\n var obj = {\n 0: 12,\n length: 4294967296\n };\n\n var newArr = Array.prototype.map.call(obj, callbackfn);\n\n return newArr.length === 0;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-3-29",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-29.js",
+ "description": "Array.prototype.map - value of 'length' is boundary value (2^32 + 1)",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(val, idx, obj) {\n return val > 10;\n }\n\n var obj = {\n 0: 11,\n 1: 9,\n length: 4294967297\n };\n\n var newArr = Array.prototype.map.call(obj, callbackfn);\n return newArr.length === 1;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-3-3",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-3.js",
+ "description": "Array.prototype.map - value of 'length' is a number (value is 0)",
+ "test": "assertTrue((function testcase() {\n function callbackfn(val, idx, obj) {\n return val > 10;\n }\n\n var obj = { 0: 11, length: 0 };\n\n var newArr = Array.prototype.map.call(obj, callbackfn);\n\n return newArr.length === 0;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-3-4",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-4.js",
+ "description": "Array.prototype.map - value of 'length' is a number (value is +0)",
+ "test": "assertTrue((function testcase() {\n function callbackfn(val, idx, obj) {\n return val > 10;\n }\n\n var obj = { 0: 11, length: +0 };\n\n var newArr = Array.prototype.map.call(obj, callbackfn);\n\n return newArr.length === 0;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-3-5",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-5.js",
+ "description": "Array.prototype.map - value of 'length' is a number (value is -0)",
+ "test": "assertTrue((function testcase() {\n function callbackfn(val, idx, obj) {\n return val > 10;\n }\n\n var obj = { 0: 11, length: -0 };\n\n var newArr = Array.prototype.map.call(obj, callbackfn);\n\n return newArr.length === 0;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-3-6",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-6.js",
+ "description": "Array.prototype.map - 'length' is a string containing a positive number",
+ "test": "assertTrue((function testcase() {\n function callbackfn(val, idx, obj) {\n return val > 10;\n }\n\n var obj = { 0: 10, 1: 12, 2: 9, length: 2 };\n\n var newArr = Array.prototype.map.call(obj, callbackfn);\n\n return newArr.length === 2;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-3-7",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-7.js",
+ "description": "Array.prototype.map - 'length' is a string containing a negative number",
+ "test": "assertTrue((function testcase() {\n function callbackfn(val, idx, obj) {\n return val > 10;\n }\n\n var obj = { 0: 10, 1: 12, 2: 9, length: -4294967294 };\n\n var newArr = Array.prototype.map.call(obj, callbackfn);\n\n return newArr.length === 2;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-3-8",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-8.js",
+ "description": "Array.prototype.map - value of 'length' is a number (value is Infinity)",
+ "test": "assertTrue((function testcase() {\n function callbackfn(val, idx, obj) {\n return val < 10;\n }\n\n var obj = { 0: 9, length: Infinity };\n\n var newArr = Array.prototype.map.call(obj, callbackfn);\n\n return newArr.length === 0;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-3-9",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-3-9.js",
+ "description": "Array.prototype.map - value of 'length' is a number (value is -Infinity)",
+ "test": "assertTrue((function testcase() {\n function callbackfn(val, idx, obj) {\n return val < 10;\n }\n\n var obj = { 0: 9, length: -Infinity };\n\n var newArr = Array.prototype.map.call(obj, callbackfn);\n\n return newArr.length === 0;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-4-1",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-4-1.js",
+ "description": "Array.prototype.map throws TypeError if callbackfn is undefined",
+ "test": "assertTrue((function testcase() {\n\n var arr = new Array(10);\n try {\n arr.map(); \n }\n catch(e) {\n if(e instanceof TypeError)\n return true; \n }\n\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-4-10",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-4-10.js",
+ "description": "Array.prototype.map - the exception is not thrown if exception was thrown by step 2",
+ "test": "assertTrue((function testcase() {\n\n var obj = { 0: 11, 1: 12 };\n\n Object.defineProperty(obj, \"length\", {\n get: function () {\n throw new SyntaxError();\n },\n configurable: true\n });\n\n try {\n Array.prototype.map.call(obj, undefined);\n return false;\n } catch (ex) {\n return !(ex instanceof TypeError);\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.4.4.19-4-11",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-4-11.js",
+ "description": "Array.prototype.map - the exception is not thrown if exception was thrown by step 3",
+ "test": "assertTrue((function testcase() {\n\n var obj = { 0: 11, 1: 12 };\n\n Object.defineProperty(obj, \"length\", {\n get: function () {\n return {\n toString: function () {\n throw new SyntaxError();\n }\n };\n },\n configurable: true\n });\n\n try {\n Array.prototype.map.call(obj, undefined);\n return false;\n } catch (ex) {\n return !(ex instanceof TypeError);\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.4.4.19-4-12",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-4-12.js",
+ "description": "Array.prototype.map - 'callbackfn' is a function",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(val, idx, obj) {\n return val > 10;\n }\n\n var testResult = [11, 9].map(callbackfn);\n return testResult.length === 2 && testResult[0] === true && testResult[1] === false;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-4-15",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-4-15.js",
+ "description": "Array.prototype.map - calling with no callbackfn is the same as passing undefined for callbackfn",
+ "test": "assertTrue((function testcase() {\n\n var obj = { 10: 10 };\n var lengthAccessed = false;\n var loopAccessed = false;\n\n Object.defineProperty(obj, \"length\", {\n get: function () {\n lengthAccessed = true;\n return 20;\n },\n configurable: true\n });\n Object.defineProperty(obj, \"0\", {\n get: function () {\n loopAccessed = true;\n return 10;\n },\n configurable: true\n });\n\n try {\n Array.prototype.map.call(obj);\n return false;\n } catch (e) {\n return e instanceof TypeError && lengthAccessed && !loopAccessed;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects())"
+ },
+ {
+ "id": "15.4.4.19-4-2",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-4-2.js",
+ "description": "Array.prototype.map throws ReferenceError if callbackfn is unreferenced",
+ "test": "assertTrue((function testcase() {\n\n var arr = new Array(10);\n try {\n arr.map(foo); \n }\n catch(e) {\n if(e instanceof ReferenceError)\n return true; \n }\n\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-4-3",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-4-3.js",
+ "description": "Array.prototype.map throws TypeError if callbackfn is null",
+ "test": "assertTrue((function testcase() {\n\n var arr = new Array(10);\n try {\n arr.map(null); \n }\n catch(e) {\n if(e instanceof TypeError)\n return true; \n }\n\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-4-4",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-4-4.js",
+ "description": "Array.prototype.map throws TypeError if callbackfn is boolean",
+ "test": "assertTrue((function testcase() {\n\n var arr = new Array(10);\n try {\n arr.map(true); \n }\n catch(e) {\n if(e instanceof TypeError)\n return true; \n }\n\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-4-5",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-4-5.js",
+ "description": "Array.prototype.map throws TypeError if callbackfn is number",
+ "test": "assertTrue((function testcase() {\n\n var arr = new Array(10);\n try {\n arr.map(5); \n }\n catch(e) {\n if(e instanceof TypeError)\n return true; \n }\n\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-4-6",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-4-6.js",
+ "description": "Array.prototype.map throws TypeError if callbackfn is string",
+ "test": "assertTrue((function testcase() {\n\n var arr = new Array(10);\n try {\n arr.map(\"abc\"); \n }\n catch(e) {\n if(e instanceof TypeError)\n return true; \n }\n\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-4-7",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-4-7.js",
+ "description": "Array.prototype.map throws TypeError if callbackfn is Object without Call internal method",
+ "test": "assertTrue((function testcase() {\n\n var arr = new Array(10);\n try {\n arr.map(new Object()); \n }\n catch(e) {\n if(e instanceof TypeError)\n return true; \n }\n\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-4-8",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-4-8.js",
+ "description": "Array.prototype.map - Side effects produced by step 2 are visible when an exception occurs",
+ "test": "assertTrue((function testcase() {\n\n var obj = { 0: 11, 1: 12 };\n\n var accessed = false;\n\n Object.defineProperty(obj, \"length\", {\n get: function () {\n accessed = true;\n return 2;\n },\n configurable: true\n });\n\n try {\n Array.prototype.map.call(obj, null);\n return false;\n } catch (ex) {\n return ex instanceof TypeError && accessed;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.4.4.19-4-9",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-4-9.js",
+ "description": "Array.prototype.map - Side effects produced by step 3 are visible when an exception occurs",
+ "test": "assertTrue((function testcase() {\n\n var obj = { 0: 11, 1: 12 };\n\n var accessed = false;\n\n Object.defineProperty(obj, \"length\", {\n get: function () {\n return {\n toString: function () {\n accessed = true;\n return \"2\";\n }\n };\n },\n configurable: true\n });\n\n try {\n Array.prototype.map.call(obj, null);\n return false;\n } catch (ex) {\n return ex instanceof TypeError && accessed;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.4.4.19-5-1-s",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19-5-1-s.js",
+ "description": "Array.prototype.map - thisArg not passed to strict callbackfn",
+ "test": "assertTrue((function testcase() {\n var innerThisCorrect = false;\n \n function callbackfn(val, idx, obj) {\n \"use strict\";\n innerThisCorrect = this===undefined;\n return true;\n }\n\n [1].map(callbackfn);\n return innerThisCorrect; \n }).call(this));\n",
+ "precondition": "(fnSupportsStrict() && fnExists(Array.prototype.map))",
+ "strict_only": ""
+ },
+ {
+ "id": "15.4.4.19-5-1",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-1.js",
+ "description": "Array.prototype.map - thisArg not passed",
+ "test": "assertTrue((function testcase() {\n try {\n fnGlobalObject()._15_4_4_19_5_1 = true;\n var _15_4_4_19_5_1 = false;\n \n function callbackfn(val, idx, obj) {\n return this._15_4_4_19_5_1;\n }\n var srcArr = [1];\n var resArr = srcArr.map(callbackfn);\n if( resArr[0] === true)\n return true; \n\t\n\treturn false;\n }\n finally {\n\tdelete fnGlobalObject()._15_4_4_19_5_1;\n } \n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-5-10",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-10.js",
+ "description": "Array.prototype.map - Array object can be used as thisArg",
+ "test": "assertTrue((function testcase() {\n\n var objArray = new Array(2);\n\n function callbackfn(val, idx, obj) {\n return this === objArray;\n }\n\n var testResult = [11].map(callbackfn, objArray);\n return testResult[0] === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-5-11",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-11.js",
+ "description": "Array.prototype.map - String object can be used as thisArg",
+ "test": "assertTrue((function testcase() {\n\n var objString = new String();\n\n function callbackfn(val, idx, obj) {\n return this === objString;\n }\n\n var testResult = [11].map(callbackfn, objString);\n return testResult[0] === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-5-12",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-12.js",
+ "description": "Array.prototype.map - Boolean object can be used as thisArg",
+ "test": "assertTrue((function testcase() {\n\n var objBoolean = new Boolean();\n\n function callbackfn(val, idx, obj) {\n return this === objBoolean;\n }\n\n var testResult = [11].map(callbackfn, objBoolean);\n return testResult[0] === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-5-13",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-13.js",
+ "description": "Array.prototype.map - Number object can be used as thisArg",
+ "test": "assertTrue((function testcase() {\n\n var objNumber = new Number();\n\n function callbackfn(val, idx, obj) {\n return this === objNumber;\n }\n\n var testResult = [11].map(callbackfn, objNumber);\n return testResult[0] === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-5-14",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-14.js",
+ "description": "Array.prototype.map - the Math object can be used as thisArg",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(val, idx, obj) {\n return this === Math;\n }\n\n var testResult = [11].map(callbackfn, Math);\n return testResult[0] === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-5-15",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-15.js",
+ "description": "Array.prototype.map - Date object can be used as thisArg",
+ "test": "assertTrue((function testcase() {\n\n var objDate = new Date();\n\n function callbackfn(val, idx, obj) {\n return this === objDate;\n }\n\n var testResult = [11].map(callbackfn, objDate);\n return testResult[0] === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-5-16",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-16.js",
+ "description": "Array.prototype.map - RegExp object can be used as thisArg",
+ "test": "assertTrue((function testcase() {\n\n var objRegExp = new RegExp();\n\n function callbackfn(val, idx, obj) {\n return this === objRegExp;\n }\n\n var testResult = [11].map(callbackfn, objRegExp);\n return testResult[0] === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-5-17",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-17.js",
+ "description": "Array.prototype.map - the JSON object can be used as thisArg",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(val, idx, obj) {\n return this === JSON;\n }\n\n var testResult = [11].map(callbackfn, JSON);\n return testResult[0] === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-5-18",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-18.js",
+ "description": "Array.prototype.map - Error object can be used as thisArg",
+ "test": "assertTrue((function testcase() {\n\n var objError = new RangeError();\n\n function callbackfn(val, idx, obj) {\n return this === objError;\n }\n\n var testResult = [11].map(callbackfn, objError);\n return testResult[0] === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-5-19",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-19.js",
+ "description": "Array.prototype.map - the Arguments object can be used as thisArg",
+ "test": "assertTrue((function testcase() {\n\n var arg;\n\n function callbackfn(val, idx, obj) {\n return this === arg;\n }\n\n arg = (function () {\n return arguments;\n }(1, 2, 3));\n\n var testResult = [11].map(callbackfn, arg);\n return testResult[0] === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-5-2",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-2.js",
+ "description": "Array.prototype.map - thisArg is Object",
+ "test": "assertTrue((function testcase() {\n var res = false;\n var o = new Object();\n o.res = true;\n function callbackfn(val, idx, obj)\n {\n return this.res;\n }\n\n var srcArr = [1];\n var resArr = srcArr.map(callbackfn,o);\n if( resArr[0] === true)\n return true; \n\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-5-21",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-21.js",
+ "description": "Array.prototype.map - the global object can be used as thisArg",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(val, idx, obj) {\n return this === fnGlobalObject();\n }\n\n var testResult = [11].map(callbackfn, fnGlobalObject());\n return testResult[0] === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-5-22",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-22.js",
+ "description": "Array.prototype.map - boolean primitive can be used as thisArg",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(val, idx, obj) {\n return this.valueOf() === false;\n }\n\n var testResult = [11].map(callbackfn, false);\n return testResult[0] === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-5-23",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-23.js",
+ "description": "Array.prototype.map - number primitive can be used as thisArg",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(val, idx, obj) {\n return this.valueOf() === 101;\n }\n\n var testResult = [11].map(callbackfn, 101);\n return testResult[0] === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-5-24",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-24.js",
+ "description": "Array.prototype.map - string primitive can be used as thisArg",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(val, idx, obj) {\n return this.valueOf() === \"abc\";\n }\n\n var testResult = [11].map(callbackfn, \"abc\");\n return testResult[0] === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-5-3",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-3.js",
+ "description": "Array.prototype.map - thisArg is Array",
+ "test": "assertTrue((function testcase() {\n var res = false;\n var a = new Array();\n a.res = true;\n function callbackfn(val, idx, obj)\n {\n return this.res;\n }\n\n var srcArr = [1];\n var resArr = srcArr.map(callbackfn,a);\n if( resArr[0] === true)\n return true; \n\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-5-4",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-4.js",
+ "description": "Array.prototype.map - thisArg is object from object template(prototype)",
+ "test": "assertTrue((function testcase() {\n var res = false;\n function callbackfn(val, idx, obj)\n {\n return this.res;\n }\n \n function foo(){}\n foo.prototype.res = true;\n var f = new foo();\n \n var srcArr = [1];\n var resArr = srcArr.map(callbackfn,f);\n if( resArr[0] === true)\n return true; \n\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-5-5",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-5.js",
+ "description": "Array.prototype.map - thisArg is object from object template",
+ "test": "assertTrue((function testcase() {\n var res = false;\n function callbackfn(val, idx, obj)\n {\n return this.res;\n }\n\n function foo(){}\n var f = new foo();\n f.res = true;\n \n var srcArr = [1];\n var resArr = srcArr.map(callbackfn,f);\n if( resArr[0] === true)\n return true; \n\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-5-6",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-6.js",
+ "description": "Array.prototype.map - thisArg is function",
+ "test": "assertTrue((function testcase() {\n var res = false;\n function callbackfn(val, idx, obj)\n {\n return this.res;\n }\n\n function foo(){}\n foo.res = true;\n \n var srcArr = [1];\n var resArr = srcArr.map(callbackfn,foo);\n if( resArr[0] === true)\n return true; \n\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-5-7",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-7.js",
+ "description": "Array.prototype.map - built-in functions can be used as thisArg",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(val, idx, obj) {\n return this === eval;\n }\n\n var testResult = [11].map(callbackfn, eval);\n return testResult[0] === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-5-9",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-5-9.js",
+ "description": "Array.prototype.map - Function object can be used as thisArg",
+ "test": "assertTrue((function testcase() {\n\n var objFunction = function () { };\n\n function callbackfn(val, idx, obj) {\n return this === objFunction;\n }\n\n var testResult = [11].map(callbackfn, objFunction);\n return testResult[0] === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-6-1",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-6-1.js",
+ "description": "Array.prototype.map - Array.isArray returns true when input argument is the ourput array",
+ "test": "assertTrue((function testcase() {\n\n var newArr = [11].map(function () { });\n\n return Array.isArray(newArr);\n\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map) && fnExists(Array.isArray))"
+ },
+ {
+ "id": "15.4.4.19-6-2",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-6-2.js",
+ "description": "Array.prototype.map - the returned array is instanceof Array",
+ "test": "assertTrue((function testcase() {\n\n var newArr = [11].map(function () { });\n\n return newArr instanceof Array;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-8-1",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-1.js",
+ "description": "Array.prototype.map doesn't consider new elements added to array after it is called",
+ "test": "assertTrue((function testcase() { \n \n function callbackfn(val, idx, obj)\n {\n srcArr[2] = 3;\n srcArr[5] = 6;\n return 1;\n }\n\n var srcArr = [1,2,,4,5];\n var resArr = srcArr.map(callbackfn);\n if(resArr.length === 5)\n return true; \n \n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-8-2",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-2.js",
+ "description": "Array.prototype.map considers new value of elements in array after it is called",
+ "test": "assertTrue((function testcase() { \n \n function callbackfn(val, idx, obj)\n { \n srcArr[4] = -1;\n if(val > 0)\n return 1;\n else\n return 0;\n }\n\n var srcArr = [1,2,3,4,5];\n var resArr = srcArr.map(callbackfn);\n if(resArr.length === 5 && resArr[4] === 0)\n return true; \n \n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-8-3",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-3.js",
+ "description": "Array.prototype.map doesn't visit deleted elements in array after the call",
+ "test": "assertTrue((function testcase() { \n \n function callbackfn(val, idx, obj)\n {\n delete srcArr[4];\n if(val > 0)\n return 1;\n else\n return 0;\n\n }\n\n var srcArr = [1,2,3,4,5];\n var resArr = srcArr.map(callbackfn);\n if(resArr.length === 5 && resArr[4] === undefined)\n return true; \n \n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-8-4",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-4.js",
+ "description": "Array.prototype.map doesn't visit deleted elements when Array.length is decreased",
+ "test": "assertTrue((function testcase() { \n \n var callCnt = 0;\n function callbackfn(val, idx, obj)\n {\n srcArr.length = 2;\n callCnt++;\n return 1;\n }\n\n var srcArr = [1,2,3,4,5];\n var resArr = srcArr.map(callbackfn);\n if(resArr.length === 5 && callCnt === 2 && resArr[2] === undefined)\n return true; \n \n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-8-5",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-5.js",
+ "description": "Array.prototype.map doesn't consider newly added elements in sparse array",
+ "test": "assertTrue((function testcase() { \n \n var callCnt = 0;\n function callbackfn(val, idx, obj)\n {\n srcArr[1000] = 3;\n callCnt++;\n return val;\n }\n\n var srcArr = new Array(10);\n srcArr[1] = 1;\n srcArr[2] = 2;\n var resArr = srcArr.map(callbackfn);\n if( resArr.length === 10 && callCnt === 2) \n return true; \n \n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-8-6",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-6.js",
+ "description": "Array.prototype.map visits deleted element in array after the call when same index is also present in prototype",
+ "test": "assertTrue((function testcase() { \n \n function callbackfn(val, idx, obj)\n {\n delete srcArr[4];\n if(val > 0)\n return 1;\n else\n return 0;\n\n }\n\n Array.prototype[4] = 5;\n var srcArr = [1,2,3,4,5];\n var resArr = srcArr.map(callbackfn);\n delete Array.prototype[4];\n if(resArr.length === 5 && resArr[4] === 1)\n return true; \n \n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-8-7",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-7.js",
+ "description": "Array.prototype.map successful to delete the object in callbackfn",
+ "test": "assertTrue((function testcase() {\n var obj = {};\n obj.srcArr = [1, 2, 3, 4, 5];\n\n function callbackfn(val, idx, obj) {\n delete obj.srcArr;\n if (val > 0)\n return 1;\n else\n return 0;\n }\n\n var resArr = obj.srcArr.map(callbackfn);\n return resArr.toString() === \"1,1,1,1,1\" && !obj.hasOwnProperty(\"arr\");\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-8-8",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-8.js",
+ "description": "Array.prototype.map - no observable effects occur if length is 0 on an Array-like object",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n function callbackfn(val, idx, obj) {\n accessed = true;\n return val > 10;\n }\n\n var obj = { 0: 11, 1: 12, length: 0 };\n\n var testResult = Array.prototype.map.call(obj, callbackfn);\n\n return testResult.length === 0 && !accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-8-9",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-9.js",
+ "description": "Array.prototype.map - modifications to length don't change number of iterations on an Array",
+ "test": "assertTrue((function testcase() {\n var called = 0;\n function callbackfn(val, idx, obj) {\n called += 1;\n return val > 10;\n }\n\n var arr = [9, , 12];\n\n Object.defineProperty(arr, \"1\", {\n get: function () {\n arr.length = 2;\n return 8;\n },\n configurable: true\n });\n\n var testResult = arr.map(callbackfn);\n\n return testResult.length === 3 && called === 2 && typeof testResult[2] === \"undefined\";\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map) && fnExists(Object.defineProperty) && ![, 1].hasOwnProperty(0) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.4.4.19-8-b-1",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-b-1.js",
+ "description": "Array.prototype.map - callbackfn not called for indexes never been assigned values",
+ "test": "assertTrue((function testcase() { \n \n var callCnt = 0;\n function callbackfn(val, idx, obj)\n {\n callCnt++;\n return 1;\n }\n\n var srcArr = new Array(10);\n srcArr[1] = undefined; //explicitly assigning a value\n var resArr = srcArr.map(callbackfn);\n if( resArr.length === 10 && callCnt === 1)\n return true; \n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-8-b-10",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-b-10.js",
+ "description": "Array.prototype.map - deleting property of prototype causes prototype index property not to be visited on an Array-like Object",
+ "test": "assertTrue((function testcase() {\n function callbackfn(val, idx, obj) {\n return idx === 1 && typeof val === \"undefined\";\n }\n var obj = { 2: 2, length: 20 };\n\n Object.defineProperty(obj, \"0\", {\n get: function () {\n delete Object.prototype[1];\n return 0;\n },\n configurable: true\n });\n\n try {\n Object.prototype[1] = 1;\n var testResult = Array.prototype.map.call(obj, callbackfn);\n return testResult.length === 20 && typeof testResult[1] === \"undefined\";\n } finally {\n delete Object.prototype[1];\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects())"
+ },
+ {
+ "id": "15.4.4.19-8-b-11",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-b-11.js",
+ "description": "Array.prototype.map - deleting property of prototype causes prototype index property not to be visited on an Array",
+ "test": "assertTrue((function testcase() {\n function callbackfn(val, idx, obj) {\n return idx === 1 && typeof val === \"undefined\";\n }\n var arr = [0, , 2];\n\n Object.defineProperty(arr, \"0\", {\n get: function () {\n delete Array.prototype[1];\n return 0;\n },\n configurable: true\n });\n\n try {\n Array.prototype[1] = 1;\n var testResult = arr.map(callbackfn);\n return testResult.length === 3 && typeof testResult[1] === \"undefined\";\n } finally {\n delete Array.prototype[1];\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map) && fnExists(Object.defineProperty) && ![, 1].hasOwnProperty(0) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.4.4.19-8-b-12",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-b-12.js",
+ "description": "Array.prototype.map - deleting own property with prototype property causes prototype index property to be visited on an Array-like object",
+ "test": "assertTrue((function testcase() {\n function callbackfn(val, idx, obj) {\n if (idx === 1 && val === 3) {\n return false;\n } else {\n return true;\n }\n }\n var obj = { 0: 0, 1: 1, 2: 2, length: 10 };\n\n Object.defineProperty(obj, \"0\", {\n get: function () {\n delete obj[1];\n return 0;\n },\n configurable: true\n });\n\n try {\n Object.prototype[1] = 3;\n var testResult = Array.prototype.map.call(obj, callbackfn);\n return testResult[1] === false; \n } finally {\n delete Object.prototype[1];\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects())"
+ },
+ {
+ "id": "15.4.4.19-8-b-13",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-b-13.js",
+ "description": "Array.prototype.map - deleting own property with prototype property causes prototype index property to be visited on an Array",
+ "test": "assertTrue((function testcase() {\n function callbackfn(val, idx, obj) {\n if (idx === 1 && val === 3) {\n return false;\n } else {\n return true;\n }\n }\n var arr = [0, 1, 2];\n\n Object.defineProperty(arr, \"0\", {\n get: function () {\n delete arr[1];\n return 0;\n },\n configurable: true\n });\n\n try {\n Array.prototype[1] = 3;\n var testResult = arr.map(callbackfn);\n return testResult[1] === false;\n } finally {\n delete Array.prototype[1];\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.4.4.19-8-b-14",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-b-14.js",
+ "description": "Array.prototype.map - decreasing length of array causes index property not to be visited",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(val, idx, obj) {\n return idx === 3 && typeof val === \"undefined\";\n }\n\n var arr = [0, 1, 2, \"last\"];\n\n Object.defineProperty(arr, \"0\", {\n get: function () {\n arr.length = 3;\n return 0;\n },\n configurable: true\n });\n\n var testResult = arr.map(callbackfn);\n return typeof testResult[3] === \"undefined\";\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.4.4.19-8-b-15",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-b-15.js",
+ "description": "Array.prototype.map - decreasing length of array with prototype property causes prototype index property to be visited",
+ "test": "assertTrue((function testcase() {\n function callbackfn(val, idx, obj) {\n if (idx === 2 && val === \"prototype\") {\n return false;\n } else {\n return true;\n }\n }\n var arr = [0, 1, 2];\n\n try {\n Object.defineProperty(Array.prototype, \"2\", {\n get: function () {\n return \"prototype\";\n },\n configurable: true\n });\n\n Object.defineProperty(arr, \"1\", {\n get: function () {\n arr.length = 2;\n return 1;\n },\n configurable: true\n });\n\n var testResult = arr.map(callbackfn);\n return testResult.length === 3 && testResult[2] === false;\n } finally {\n delete Array.prototype[2];\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.4.4.19-8-b-16",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-b-16.js",
+ "description": "Array.prototype.map - decreasing length of array does not delete non-configurable properties",
+ "test": "assertTrue((function testcase() {\n function callbackfn(val, idx, obj) {\n if (idx === 2 && val === \"unconfigurable\") {\n return false;\n } else {\n return true;\n }\n }\n\n var arr = [0, 1, 2];\n\n Object.defineProperty(arr, \"2\", {\n get: function () {\n return \"unconfigurable\";\n },\n configurable: false\n });\n\n Object.defineProperty(arr, \"1\", {\n get: function () {\n arr.length = 2;\n return 1;\n },\n configurable: true\n });\n\n var testResult = arr.map(callbackfn);\n return testResult.length === 3 && testResult[2] === false;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.4.4.19-8-b-2",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-b-2.js",
+ "description": "Array.prototype.map - added properties in step 2 are visible here",
+ "test": "assertTrue((function testcase() {\n function callbackfn(val, idx, obj) {\n if (idx === 2 && val === \"length\") {\n return false;\n } else {\n return true;\n }\n }\n\n var obj = {};\n\n Object.defineProperty(obj, \"length\", {\n get: function () {\n obj[2] = \"length\";\n return 3;\n },\n configurable: true\n });\n\n var testResult = Array.prototype.map.call(obj, callbackfn);\n return testResult[2] === false;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.4.4.19-8-b-3",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-b-3.js",
+ "description": "Array.prototype.map - deleted properties in step 2 are visible here",
+ "test": "assertTrue((function testcase() {\n function callbackfn(val, idx, obj) {\n if (idx === 2) {\n return false;\n } else {\n return true;\n }\n }\n var obj = { 2: 6.99, 8: 19 };\n\n Object.defineProperty(obj, \"length\", {\n get: function () {\n delete obj[2];\n return 10;\n },\n configurable: true\n });\n\n var testResult = Array.prototype.map.call(obj, callbackfn);\n return typeof testResult[2] === \"undefined\";\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.4.4.19-8-b-4",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-b-4.js",
+ "description": "Array.prototype.map - properties added into own object after current position are visited on an Array-like object",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(val, idx, obj) {\n if (idx === 1 && val === 1) {\n return false;\n } else {\n return true;\n }\n }\n\n var obj = { length: 2 };\n\n Object.defineProperty(obj, \"0\", {\n get: function () {\n Object.defineProperty(obj, \"1\", {\n get: function () {\n return 1;\n },\n configurable: true\n });\n return 0;\n },\n configurable: true\n });\n\n var testResult = Array.prototype.map.call(obj, callbackfn);\n return testResult[0] === true && testResult[1] === false;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects())"
+ },
+ {
+ "id": "15.4.4.19-8-b-5",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-b-5.js",
+ "description": "Array.prototype.map - properties added into own object after current position are visited on an Array",
+ "test": "assertTrue((function testcase() {\n function callbackfn(val, idx, obj) {\n if (idx === 1 && val === 1) {\n return false;\n } else {\n return true;\n }\n }\n\n var arr = [0, , 2];\n\n Object.defineProperty(arr, \"0\", {\n get: function () {\n Object.defineProperty(arr, \"1\", {\n get: function () {\n return 1;\n },\n configurable: true\n });\n return 0;\n },\n configurable: true\n });\n\n var testResult = arr.map(callbackfn);\n return testResult[0] === true && testResult[1] === false;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map) && fnExists(Object.defineProperty) && ![, 1].hasOwnProperty(0) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.4.4.19-8-b-6",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-b-6.js",
+ "description": "Array.prototype.map - properties can be added to prototype after current position are visited on an Array-like object",
+ "test": "assertTrue((function testcase() {\n function callbackfn(val, idx, obj) {\n if (idx === 1 && val === 6.99) {\n return false;\n } else {\n return true;\n }\n }\n var obj = { length: 2 };\n\n Object.defineProperty(obj, \"0\", {\n get: function () {\n Object.defineProperty(Object.prototype, \"1\", {\n get: function () {\n return 6.99;\n },\n configurable: true\n });\n return 0;\n },\n configurable: true\n });\n\n try {\n var testResult = Array.prototype.map.call(obj, callbackfn);\n return testResult[0] === true && testResult[1] === false;\n } finally {\n delete Object.prototype[1];\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects())"
+ },
+ {
+ "id": "15.4.4.19-8-b-7",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-b-7.js",
+ "description": "Array.prototype.map - properties can be added to prototype after current position are visited on an Array",
+ "test": "assertTrue((function testcase() {\n function callbackfn(val, idx, obj) {\n if (idx === 1 && val === 6.99) {\n return false;\n } else {\n return true;\n }\n }\n var arr = [0, , 2];\n\n try {\n Object.defineProperty(arr, \"0\", {\n get: function () {\n Object.defineProperty(Array.prototype, \"1\", {\n get: function () {\n return 6.99;\n },\n configurable: true\n });\n return 0;\n },\n configurable: true\n });\n\n var testResult = arr.map(callbackfn);\n return testResult[0] === true && testResult[1] === false;\n } finally {\n delete Array.prototype[1];\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map) && fnExists(Object.defineProperty) && ![, 1].hasOwnProperty(0) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.4.4.19-8-b-8",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-b-8.js",
+ "description": "Array.prototype.map - deleting own property causes index property not to be visited on an Array-like object",
+ "test": "assertTrue((function testcase() {\n function callbackfn(val, idx, obj) {\n if (idx === 1) {\n return false;\n } else {\n return true;\n }\n }\n var obj = { length: 2 };\n\n Object.defineProperty(obj, \"1\", {\n get: function () {\n return 6.99;\n },\n configurable: true\n });\n\n Object.defineProperty(obj, \"0\", {\n get: function () {\n delete obj[1];\n return 0;\n },\n configurable: true\n });\n\n var testResult = Array.prototype.map.call(obj, callbackfn);\n return testResult[0] === true && typeof testResult[1] === \"undefined\";\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects())"
+ },
+ {
+ "id": "15.4.4.19-8-b-9",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-b-9.js",
+ "description": "Array.prototype.map - deleting own property causes index property not to be visited on an Array",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(val, idx, obj) {\n if (idx === 1) {\n return false;\n } else {\n return true;\n }\n }\n var arr = [1, 2];\n\n Object.defineProperty(arr, \"1\", {\n get: function () {\n return \"6.99\";\n },\n configurable: true\n });\n\n Object.defineProperty(arr, \"0\", {\n get: function () {\n delete arr[1];\n return 0;\n },\n configurable: true\n });\n\n var testResult = arr.map(callbackfn);\n return testResult[0] === true && typeof testResult[1] === \"undefined\";\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.4.4.19-8-c-i-1",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-1.js",
+ "description": "Array.prototype.map - element to be retrieved is own data property on an Array-like object",
+ "test": "assertTrue((function testcase() {\n\n var kValue = {};\n\n function callbackfn(val, idx, obj) {\n if (idx === 5) {\n return val === kValue;\n }\n return false;\n }\n\n var obj = { 5: kValue, length: 100 };\n\n var newArr = Array.prototype.map.call(obj, callbackfn);\n\n return newArr[5] === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-8-c-i-10",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-10.js",
+ "description": "Array.prototype.map - element to be retrieved is own accessor property on an Array",
+ "test": "assertTrue((function testcase() {\n\n var kValue = \"abc\";\n\n function callbackfn(val, idx, obj) {\n if (idx === 0) {\n return val === kValue;\n }\n return false;\n }\n\n var arr = [];\n\n Object.defineProperty(arr, \"0\", {\n get: function () {\n return kValue;\n },\n configurable: true\n });\n\n var testResult = arr.map(callbackfn);\n\n return testResult[0] === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.4.4.19-8-c-i-11",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-11.js",
+ "description": "Array.prototype.map - element to be retrieved is own accessor property that overrides an inherited data property on an Array-like object",
+ "test": "assertTrue((function testcase() {\n\n var kValue = \"abc\";\n\n function callbackfn(val, idx, obj) {\n if (idx === 0) {\n return val === kValue;\n }\n return false;\n }\n\n var proto = { 0: 5, length: 2 };\n\n var Con = function () { };\n Con.prototype = proto;\n\n var child = new Con();\n\n Object.defineProperty(child, \"0\", {\n get: function () {\n return kValue;\n },\n configurable: true\n });\n\n var testResult = Array.prototype.map.call(child, callbackfn);\n\n return testResult[0] === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects())"
+ },
+ {
+ "id": "15.4.4.19-8-c-i-12",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-12.js",
+ "description": "Array.prototype.map - element to be retrieved is own accessor property that overrides an inherited data property on an Array",
+ "test": "assertTrue((function testcase() {\n\n var kValue = \"abc\";\n\n function callbackfn(val, idx, obj) {\n if (idx === 0) {\n return val === kValue;\n }\n return false;\n }\n\n var arr = [];\n\n try {\n Array.prototype[0] = 11;\n\n Object.defineProperty(arr, \"0\", {\n get: function () {\n return kValue;\n },\n configurable: true\n });\n\n var testResult = arr.map(callbackfn);\n\n return testResult[0] === true;\n } finally {\n delete Array.prototype[0];\n }\n\n\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.4.4.19-8-c-i-13",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-13.js",
+ "description": "Array.prototype.map - element to be retrieved is own accessor property that overrides an inherited accessor property on an Array-like object",
+ "test": "assertTrue((function testcase() {\n\n var kValue = \"abc\";\n\n function callbackfn(val, idx, obj) {\n if (idx === 0) {\n return val === kValue;\n }\n return false;\n }\n\n var proto = { length: 2 };\n\n Object.defineProperty(proto, \"0\", {\n get: function () {\n return 5;\n },\n configurable: true\n });\n\n var Con = function () { };\n Con.prototype = proto;\n\n var child = new Con();\n\n Object.defineProperty(child, \"0\", {\n get: function () {\n return kValue;\n },\n configurable: true\n });\n\n var testResult = Array.prototype.map.call(child, callbackfn);\n\n return testResult[0] === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects())"
+ },
+ {
+ "id": "15.4.4.19-8-c-i-14",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-14.js",
+ "description": "Array.prototype.map - element to be retrieved is own accessor property that overrides an inherited accessor property on an Array",
+ "test": "assertTrue((function testcase() {\n\n var kValue = \"abc\";\n\n function callbackfn(val, idx, obj) {\n if (idx === 0) {\n return val === kValue;\n }\n return false;\n }\n\n var arr = [];\n\n try {\n Object.defineProperty(Array.prototype, \"0\", {\n get: function () {\n return 11;\n },\n configurable: true\n });\n\n Object.defineProperty(arr, \"0\", {\n get: function () {\n return kValue;\n },\n configurable: true\n });\n\n var testResult = arr.map(callbackfn);\n\n return testResult[0] === true;\n } finally {\n delete Array.prototype[0];\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.4.4.19-8-c-i-15",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-15.js",
+ "description": "Array.prototype.map - element to be retrieved is inherited accessor property on an Array-like object",
+ "test": "assertTrue((function testcase() {\n\n var kValue = \"abc\";\n\n function callbackfn(val, idx, obj) {\n if (idx === 0) {\n return val === kValue;\n }\n return false;\n }\n\n var proto = { length: 2 };\n\n Object.defineProperty(proto, \"0\", {\n get: function () {\n return kValue;\n },\n configurable: true\n });\n\n var Con = function () { };\n Con.prototype = proto;\n\n var child = new Con();\n\n var testResult = Array.prototype.map.call(child, callbackfn);\n\n return testResult[0] === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects())"
+ },
+ {
+ "id": "15.4.4.19-8-c-i-16",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-16.js",
+ "description": "Array.prototype.map - element to be retrieved is inherited accessor property on an Array",
+ "test": "assertTrue((function testcase() {\n\n var kValue = \"abc\";\n\n function callbackfn(val, idx, obj) {\n if (idx === 0) {\n return val === kValue;\n }\n return false;\n }\n\n try {\n Object.defineProperty(Array.prototype, \"0\", {\n get: function () {\n return kValue;\n },\n configurable: true\n });\n\n var testResult = [, ].map(callbackfn);\n\n return testResult[0] === true;\n } finally {\n delete Array.prototype[0];\n }\n\n\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map) && fnExists(Object.defineProperty) && ![, 1].hasOwnProperty(0) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.4.4.19-8-c-i-17",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-17.js",
+ "description": "Array.prototype.map - element to be retrieved is own accessor property without a get function on an Array-like object",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(val, idx, obj) {\n if (idx === 1) {\n return typeof val === \"undefined\";\n }\n return false;\n }\n\n var obj = { length: 2 };\n\n Object.defineProperty(obj, \"1\", {\n set: function () { },\n configurable: true\n });\n\n var testResult = Array.prototype.map.call(obj, callbackfn);\n\n return testResult[1] === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects())"
+ },
+ {
+ "id": "15.4.4.19-8-c-i-18",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-18.js",
+ "description": "Array.prototype.map - element to be retrieved is own accessor property without a get function on an Array",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(val, idx, obj) {\n if (idx === 1) {\n return typeof val === \"undefined\";\n }\n return false;\n }\n\n var arr = [];\n\n Object.defineProperty(arr, \"1\", {\n set: function () { },\n configurable: true\n });\n\n var testResult = arr.map(callbackfn);\n\n return testResult[1] === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.4.4.19-8-c-i-19",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-19.js",
+ "description": "Array.prototype.map - element to be retrieved is own accessor property without a get function that overrides an inherited accessor property on an Array",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(val, idx, obj) {\n if (idx === 0) {\n return typeof val === \"undefined\";\n }\n return false;\n }\n\n var arr = [];\n\n try {\n Object.defineProperty(arr, \"0\", {\n set: function () { },\n configurable: true\n });\n\n Object.defineProperty(Array.prototype, \"0\", {\n get: function () {\n return 100;\n },\n configurable: true\n });\n\n var testResult = arr.map(callbackfn);\n\n return testResult[0] === true;\n } finally {\n delete Array.prototype[0];\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.4.4.19-8-c-i-2",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-2.js",
+ "description": "Array.prototype.map - element to be retrieved is own data property on an Array",
+ "test": "assertTrue((function testcase() {\n\n var kValue = {};\n\n function callbackfn(val, idx, obj) {\n if (idx === 0) {\n return val === kValue;\n }\n return false;\n }\n\n var arr = [kValue];\n\n var newArr = arr.map(callbackfn);\n\n return newArr[0] === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-8-c-i-20",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-20.js",
+ "description": "Array.prototype.map - element to be retrieved is own accessor property without a get function that overrides an inherited accessor property on an Array-like object",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(val, idx, obj) {\n if (idx === 0) {\n return typeof val === \"undefined\";\n }\n return false;\n }\n\n var proto = {};\n\n var Con = function () { };\n Con.prototype = proto;\n\n var child = new Con();\n child.length = 2;\n\n Object.defineProperty(child, \"0\", {\n set: function () { },\n configurable: true\n });\n\n Object.defineProperty(proto, \"0\", {\n get: function () {\n return 100;\n },\n configurable: true\n });\n\n var testResult = Array.prototype.map.call(child, callbackfn);\n\n return testResult[0] === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects())"
+ },
+ {
+ "id": "15.4.4.19-8-c-i-21",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-21.js",
+ "description": "Array.prototype.map - element to be retrieved is inherited accessor property without a get function on an Array-like object",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(val, idx, obj) {\n if (idx === 0) {\n return typeof val === \"undefined\";\n }\n return false;\n }\n\n var proto = { length: 2 };\n Object.defineProperty(proto, \"0\", {\n set: function () { },\n configurable: true\n });\n\n var Con = function () { };\n Con.prototype = proto;\n\n var child = new Con();\n\n var testResult = Array.prototype.map.call(child, callbackfn);\n\n return testResult[0] === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects())"
+ },
+ {
+ "id": "15.4.4.19-8-c-i-22",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-22.js",
+ "description": "Array.prototype.map - element to be retrieved is inherited accessor property without a get function on an Array",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(val, idx, obj) {\n if (idx === 0) {\n return typeof val === \"undefined\";\n }\n return false;\n }\n\n try {\n Object.defineProperty(Array.prototype, \"0\", {\n set: function () { },\n configurable: true\n });\n\n var testResult = [,].map(callbackfn);\n\n return testResult[0] === true;\n } finally {\n delete Array.prototype[0];\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map) && fnExists(Object.defineProperty) && ![, 1].hasOwnProperty(0) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.4.4.19-8-c-i-23",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-23.js",
+ "description": "Array.prototype.map - This object is the global object which contains index property",
+ "test": "assertTrue((function testcase() {\n\n var kValue = \"abc\";\n\n function callbackfn(val, idx, obj) {\n if (idx === 0) {\n return val === kValue;\n }\n return false;\n }\n\n try {\n var oldLen = fnGlobalObject().length;\n fnGlobalObject()[0] = kValue;\n fnGlobalObject().length = 2;\n\n var testResult = Array.prototype.map.call(fnGlobalObject(), callbackfn);\n\n return testResult[0] === true;\n } finally {\n delete fnGlobalObject()[0];\n fnGlobalObject().length = oldLen;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-8-c-i-25",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-25.js",
+ "description": "Array.prototype.map - This object is the Arguments object which implements its own property get method (number of arguments is less than number of parameters)",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(val, idx, obj) {\n if (idx === 0) {\n return val === 9;\n } else {\n return false;\n }\n }\n\n var func = function (a, b) {\n return Array.prototype.map.call(arguments, callbackfn);\n };\n\n var testResult = func(9);\n\n return testResult[0] === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-8-c-i-26",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-26.js",
+ "description": "Array.prototype.map - This object is the Arguments object which implements its own property get method (number of arguments equals number of parameters)",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(val, idx, obj) {\n if (idx === 0) {\n return val === 9;\n } else if (idx === 1) {\n return val === 11;\n } else {\n return false;\n }\n }\n\n var func = function (a, b) {\n return Array.prototype.map.call(arguments, callbackfn);\n };\n\n var testResult = func(9, 11);\n\n return testResult[0] === true && testResult[1] === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-8-c-i-27",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-27.js",
+ "description": "Array.prototype.map - This object is the Arguments object which implements its own property get method (number of arguments is greater than number of parameters)",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(val, idx, obj) {\n if (idx === 0) {\n return val === 9;\n } else if (idx === 1) {\n return val === 11;\n } else if (idx === 2) {\n return val === 12;\n } else {\n return false;\n }\n\n }\n\n var func = function (a, b) {\n return Array.prototype.map.call(arguments, callbackfn);\n };\n\n var testResult = func(9, 11, 12);\n\n return testResult[0] === true && testResult[1] === true && testResult[2] === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-8-c-i-28",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-28.js",
+ "description": "Array.prototype.map - element changed by getter on previous iterations is observed on an Array",
+ "test": "assertTrue((function testcase() {\n\n var preIterVisible = false;\n var arr = [];\n\n function callbackfn(val, idx, obj) {\n if (idx === 0) {\n return val === 11;\n } else if (idx === 1) {\n return val === 9;\n } else {\n return false;\n }\n }\n\n Object.defineProperty(arr, \"0\", {\n get: function () {\n preIterVisible = true;\n return 11;\n },\n configurable: true\n });\n\n Object.defineProperty(arr, \"1\", {\n get: function () {\n if (preIterVisible) {\n return 9;\n } else {\n return 11;\n }\n },\n configurable: true\n });\n\n var testResult = arr.map(callbackfn);\n\n return testResult[0] === true && testResult[1] === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.4.4.19-8-c-i-29",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-29.js",
+ "description": "Array.prototype.map - element changed by getter on previous iterations is observed on an Array-like object",
+ "test": "assertTrue((function testcase() {\n\n var preIterVisible = false;\n var obj = { length: 2 };\n\n function callbackfn(val, idx, obj) {\n if (idx === 0) {\n return val === 11;\n } else if (idx === 1) {\n return val === 9;\n } else {\n return false;\n }\n }\n\n Object.defineProperty(obj, \"0\", {\n get: function () {\n preIterVisible = true;\n return 11;\n },\n configurable: true\n });\n\n Object.defineProperty(obj, \"1\", {\n get: function () {\n if (preIterVisible) {\n return 9;\n } else {\n return 11;\n }\n },\n configurable: true\n });\n\n var testResult = Array.prototype.map.call(obj, callbackfn);\n\n return testResult[0] === true && testResult[1] === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects())"
+ },
+ {
+ "id": "15.4.4.19-8-c-i-3",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-3.js",
+ "description": "Array.prototype.map - element to be retrieved is own data property that overrides an inherited data property on an Array-like object",
+ "test": "assertTrue((function testcase() {\n\n var kValue = \"abc\";\n\n function callbackfn(val, idx, obj) {\n if (idx === 5) {\n return val === kValue;\n }\n return false;\n }\n\n var proto = { 5: 12, length: 10 };\n\n var Con = function () { };\n Con.prototype = proto;\n\n var child = new Con();\n child[5] = kValue;\n\n var testResult = Array.prototype.map.call(child, callbackfn);\n\n return testResult[5] === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-8-c-i-30",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-30.js",
+ "description": "Array.prototype.map - unhandled exceptions happened in getter terminate iteration on an Array-like object",
+ "test": "assertTrue((function testcase() {\n\n var obj = { 0: 11, 5: 10, 10: 8, length: 20 };\n var accessed = false;\n\n function callbackfn(val, idx, obj) {\n if (idx > 1) {\n accessed = true;\n }\n }\n\n Object.defineProperty(obj, \"1\", {\n get: function () {\n throw new RangeError(\"unhandle exception happened in getter\");\n },\n configurable: true\n });\n\n Object.defineProperty(obj, \"2\", {\n get: function () {\n accessed = true;\n return 100;\n },\n configurable: true\n });\n\n try {\n Array.prototype.map.call(obj, callbackfn);\n return false;\n } catch (ex) {\n return (ex instanceof RangeError) && !accessed;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects())"
+ },
+ {
+ "id": "15.4.4.19-8-c-i-31",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-31.js",
+ "description": "Array.prototype.map - unhandled exceptions happened in getter terminate iteration on an Array",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n\n function callbackfn(val, idx, obj) {\n if (idx > 1) {\n accessed = true;\n }\n }\n\n var arr = [];\n arr[5] = 10;\n arr[10] = 100;\n\n Object.defineProperty(arr, \"1\", {\n get: function () {\n throw new RangeError(\"unhandle exception happened in getter\");\n },\n configurable: true\n });\n\n Object.defineProperty(arr, \"2\", {\n get: function () {\n accessed = true;\n return 100;\n },\n configurable: true\n });\n\n try {\n arr.map(callbackfn);\n return false;\n } catch (ex) {\n return (ex instanceof RangeError) && !accessed;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.4.4.19-8-c-i-4",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-4.js",
+ "description": "Array.prototype.map - element to be retrieved is own data property that overrides an inherited data property on an Array",
+ "test": "assertTrue((function testcase() {\n\n var kValue = \"abc\";\n\n function callbackfn(val, idx, obj) {\n if (idx === 0) {\n return val === kValue;\n }\n return false;\n }\n\n try {\n Array.prototype[0] = 11;\n\n var testResult = [kValue].map(callbackfn);\n\n return testResult[0] === true;\n } finally {\n delete Array.prototype[0];\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-8-c-i-5",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-5.js",
+ "description": "Array.prototype.map - element to be retrieved is own data property that overrides an inherited accessor property on an Array-like object",
+ "test": "assertTrue((function testcase() {\n\n var kValue = \"abc\";\n\n function callbackfn(val, idx, obj) {\n if (idx === 5) {\n return val === kValue;\n }\n return false;\n }\n\n var proto = {};\n\n Object.defineProperty(proto, \"5\", {\n get: function () {\n return 11;\n },\n configurable: true\n });\n\n var Con = function () { };\n Con.prototype = proto;\n\n var child = new Con();\n child.length = 10;\n Object.defineProperty(child, \"5\", {\n value: kValue,\n configurable: true\n });\n\n var testResult = Array.prototype.map.call(child, callbackfn);\n\n return testResult[5] === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects())"
+ },
+ {
+ "id": "15.4.4.19-8-c-i-6",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-6.js",
+ "description": "Array.prototype.map - element to be retrieved is own data property that overrides an inherited accessor property on an Array",
+ "test": "assertTrue((function testcase() {\n\n var kValue = \"abc\";\n\n function callbackfn(val, idx, obj) {\n if (idx === 0) {\n return val === kValue;\n }\n return false;\n }\n\n try {\n Object.defineProperty(Array.prototype, \"0\", {\n get: function () {\n return 9;\n },\n configurable: true\n });\n\n var testResult = [kValue].map(callbackfn);\n return testResult[0] === true;\n } finally {\n delete Array.prototype[0];\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.4.4.19-8-c-i-7",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-7.js",
+ "description": "Array.prototype.map - element to be retrieved is inherited data property on an Array-like object",
+ "test": "assertTrue((function testcase() {\n\n var kValue = \"abc\";\n\n function callbackfn(val, idx, obj) {\n if (idx === 5) {\n return val === kValue;\n }\n return false;\n }\n\n var proto = { 5: kValue, length: 10 };\n\n var Con = function () { };\n Con.prototype = proto;\n\n var child = new Con();\n\n var newArr = Array.prototype.map.call(child, callbackfn);\n\n return newArr[5] === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-8-c-i-8",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-8.js",
+ "description": "Array.prototype.map - element to be retrieved is inherited data property on an Array",
+ "test": "assertTrue((function testcase() {\n function callbackfn(val, idx, obj) {\n if (idx === 1) {\n return val === 13;\n }\n return false;\n }\n\n try {\n Array.prototype[1] = 13;\n\n var newArr = [, , , ].map(callbackfn);\n\n return newArr[1] === true;\n } finally {\n delete Array.prototype[1];\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map) && ![, 1].hasOwnProperty(0))"
+ },
+ {
+ "id": "15.4.4.19-8-c-i-9",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-i-9.js",
+ "description": "Array.prototype.map - element to be retrieved is own accessor property on an Array-like object",
+ "test": "assertTrue((function testcase() {\n\n var kValue = \"abc\";\n\n function callbackfn(val, idx, obj) {\n if (idx === 0) {\n return val === kValue;\n }\n return false;\n }\n\n var obj = { length: 2 };\n\n Object.defineProperty(obj, \"0\", {\n get: function () {\n return kValue;\n },\n configurable: true\n });\n\n var testResult = Array.prototype.map.call(obj, callbackfn);\n\n return testResult[0] === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects())"
+ },
+ {
+ "id": "15.4.4.19-8-c-ii-1",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-ii-1.js",
+ "description": "Array.prototype.map - callbackfn called with correct parameters",
+ "test": "assertTrue((function testcase() { \n \n var bPar = true;\n var bCalled = false;\n function callbackfn(val, idx, obj)\n {\n bCalled = true;\n if(obj[idx] !== val)\n bPar = false;\n }\n\n var srcArr = [0,1,true,null,new Object(),\"five\"];\n srcArr[999999] = -6.6;\n resArr = srcArr.map(callbackfn);\n \n if(bCalled === true && bPar === true)\n return true;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-8-c-ii-10",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-ii-10.js",
+ "description": "Array.prototype.map - callbackfn is called with 1 formal parameter",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(val) {\n return val > 10;\n }\n\n var testResult = [11].map(callbackfn);\n\n return testResult[0] === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-8-c-ii-11",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-ii-11.js",
+ "description": "Array.prototype.map - callbackfn is called with 2 formal parameters",
+ "test": "assertTrue((function testcase() {\n function callbackfn(val, idx) {\n return (val > 10 && arguments[2][idx] === val);\n }\n\n var testResult = [11].map(callbackfn);\n\n return testResult[0] === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-8-c-ii-12",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-ii-12.js",
+ "description": "Array.prototype.map - callbackfn is called with 3 formal parameters",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(val, idx, obj) {\n return (val > 10 && obj[idx] === val);\n }\n\n var testResult = [11].map(callbackfn);\n\n return testResult[0] === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-8-c-ii-13",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-ii-13.js",
+ "description": "Array.prototype.map - callbackfn that uses arguments object to get parameter value",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn() {\n return arguments[2][arguments[1]] === arguments[0];\n }\n\n var testResult = [11].map(callbackfn);\n\n return testResult[0] === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-8-c-ii-16",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-ii-16.js",
+ "description": "Array.prototype.map - 'this' object when T is not an object (T is a boolean primitive)",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(val, idx, obj) {\n return this.valueOf() === false;\n }\n\n var obj = { 0: 11, length: 2 };\n\n var testResult = Array.prototype.map.call(obj, callbackfn, false);\n\n return testResult[0] === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-8-c-ii-17",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-ii-17.js",
+ "description": "Array.prototype.map - 'this' object when T is not an object (T is a number)",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(val, idx, obj) {\n return this.valueOf() === 5;\n }\n\n var obj = { 0: 11, length: 2 };\n\n var testResult = Array.prototype.map.call(obj, callbackfn, 5);\n\n return testResult[0] === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-8-c-ii-18",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-ii-18.js",
+ "description": "Array.prototype.map - 'this' object when T is not an object (T is a string primitive)",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(val, idx, obj) {\n return this.valueOf() === \"hello!\";\n }\n\n var obj = { 0: 11, length: 2 };\n\n var testResult = Array.prototype.map.call(obj, callbackfn, \"hello!\");\n\n return testResult[0] === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-8-c-ii-19",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-ii-19.js",
+ "description": "Array.prototype.map - non-indexed properties are not called.",
+ "test": "assertTrue((function testcase() {\n\n var called = 0;\n var result = false;\n\n function callbackfn(val, idx, obj) {\n called++;\n if (val === 11) {\n result = true;\n }\n return true;\n }\n\n var obj = { 0: 9, non_index_property: 11, length: 20 };\n\n var testResult = Array.prototype.map.call(obj, callbackfn);\n\n return !result && testResult[0] === true && called === 1;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-8-c-ii-2",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-ii-2.js",
+ "description": "Array.prototype.map - callbackfn takes 3 arguments",
+ "test": "assertTrue((function testcase() { \n \n var parCnt = 3;\n var bCalled = false\n function callbackfn(val, idx, obj)\n { \n bCalled = true;\n if(arguments.length !== 3)\n parCnt = arguments.length; //verify if callbackfn was called with 3 parameters\n }\n\n var srcArr = [0,1,2,3,4,5,6,7,8,9];\n var resArr = srcArr.map(callbackfn);\n if(bCalled === true && parCnt === 3)\n return true;\n\n\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-8-c-ii-20",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-ii-20.js",
+ "description": "Array.prototype.map - callbackfn called with correct parameters (thisArg is correct)",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(val, idx, obj) {\n return this.threshold === 10;\n }\n\n var thisArg = { threshold: 10 };\n\n var obj = { 0: 11, 1: 9, length: 2 };\n\n var testResult = Array.prototype.map.call(obj, callbackfn, thisArg);\n\n return testResult[0] === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-8-c-ii-21",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-ii-21.js",
+ "description": "Array.prototype.map - callbackfn called with correct parameters (kValue is correct)",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(val, idx, obj) {\n if (idx === 0) {\n return val === 11;\n }\n\n if (idx === 1) {\n return val === 12;\n }\n\n return false;\n }\n\n var obj = { 0: 11, 1: 12, length: 2 };\n\n var testResult = Array.prototype.map.call(obj, callbackfn);\n\n return testResult[0] === true && testResult[1] === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-8-c-ii-22",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-ii-22.js",
+ "description": "Array.prototype.map - callbackfn called with correct parameters (the index k is correct)",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(val, idx, obj) {\n if (val === 11) {\n return idx === 0;\n }\n\n if (val === 12) {\n return idx === 1;\n }\n\n return false;\n }\n\n var obj = { 0: 11, 1: 12, length: 2 };\n\n var testResult = Array.prototype.map.call(obj, callbackfn);\n\n return testResult[0] === true && testResult[1] === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-8-c-ii-23",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-ii-23.js",
+ "description": "Array.prototype.map - callbackfn called with correct parameters (this object O is correct)",
+ "test": "assertTrue((function testcase() {\n\n var obj = { 0: 11, length: 2 };\n\n function callbackfn(val, idx, o) {\n return obj === o;\n }\n\n var testResult = Array.prototype.map.call(obj, callbackfn);\n\n return testResult[0] === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-8-c-ii-4",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-ii-4.js",
+ "description": "Array.prototype.map - k values are passed in acending numeric order",
+ "test": "assertTrue((function testcase() {\n\n var arr = [0, 1, 2, 3, 4, 5];\n var lastIdx = 0;\n var called = 0;\n var result = true;\n function callbackfn(val, idx, o) {\n called++;\n if (lastIdx !== idx) {\n result = false;\n } else {\n lastIdx++;\n }\n }\n\n arr.map(callbackfn);\n return result && arr.length === called;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-8-c-ii-5",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-ii-5.js",
+ "description": "Array.prototype.map - k values are accessed during each iteration and not prior to starting the loop.",
+ "test": "assertTrue((function testcase() {\n\n var kIndex = [];\n\n //By below way, we could verify that k would be setted as 0, 1, ..., length - 1 in order, and each value will be setted one time.\n function callbackfn(val, idx, obj) {\n //Each position should be visited one time, which means k is accessed one time during iterations.\n if (typeof kIndex[idx] === \"undefined\") {\n //when current position is visited, its previous index should has been visited.\n if (idx !== 0 && typeof kIndex[idx - 1] === \"undefined\") {\n return true;\n }\n kIndex[idx] = 1;\n return false;\n } else {\n return true;\n }\n }\n\n var testResult = [11, 12, 13, 14].map(callbackfn);\n\n return testResult.length === 4 && testResult[0] === false &&\n testResult[1] === false && testResult[2] === false &&\n testResult[3] === false;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-8-c-ii-6",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-ii-6.js",
+ "description": "Array.prototype.map - arguments to callbackfn are self consistent.",
+ "test": "assertTrue((function testcase() {\n\n var obj = { 0: 11, length: 1 };\n var thisArg = {};\n\n function callbackfn() {\n return this === thisArg &&\n arguments[0] === 11 &&\n arguments[1] === 0 &&\n arguments[2] === obj;\n }\n\n var testResult = Array.prototype.map.call(obj, callbackfn, thisArg);\n\n return testResult[0] === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-8-c-ii-7",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-ii-7.js",
+ "description": "Array.prototype.map - unhandled exceptions happened in callbackfn terminate iteration",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n\n function callbackfn(val, idx, obj) {\n if (idx > 0) {\n accessed = true;\n }\n if (idx === 0) {\n throw new Error(\"Exception occurred in callbackfn\");\n }\n }\n\n var obj = { 0: 11, 4: 10, 10: 8, length: 20 };\n\n try {\n Array.prototype.map.call(obj, callbackfn);\n return false;\n } catch (ex) {\n return ex instanceof Error && !accessed;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-8-c-ii-8",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-ii-8.js",
+ "description": "Array.prototype.map - element changed by callbackfn on previous iterations is observed",
+ "test": "assertTrue((function testcase() {\n\n var obj = { 0: 9, 1: 12, length: 2 };\n\n function callbackfn(val, idx, o) {\n if (idx === 0) {\n obj[idx + 1] = 8;\n }\n return val > 10;\n }\n\n var testResult = Array.prototype.map.call(obj, callbackfn);\n\n return testResult[1] === false;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-8-c-ii-9",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-ii-9.js",
+ "description": "Array.prototype.map - callbackfn with 0 formal parameter",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn() {\n return true;\n }\n\n var testResult = [11].map(callbackfn);\n\n return testResult[0] === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-8-c-iii-1",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-iii-1.js",
+ "description": "Array.prototype.map - getOwnPropertyDescriptor(all true) of returned array element",
+ "test": "assertTrue((function testcase() {\n \n function callbackfn(val, idx, obj){\n\t if(val % 2)\n\t return (2 * val + 1); \n\t else\n\t return (val / 2);\n }\n var srcArr = [0,1,2,3,4];\n var resArr = srcArr.map(callbackfn);\n if (resArr.length > 0){\n var desc = Object.getOwnPropertyDescriptor(resArr, 1) \n if(desc.value === 3 && //srcArr[1] = 2*1+1 = 3\n desc.writable === true &&\n desc.enumerable === true &&\n desc.configurable === true){\n return true;\n }\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-8-c-iii-2",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-iii-2.js",
+ "description": "Array.prototype.map - value of returned array element equals to 'mappedValue'",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(val, idx, obj) {\n return val;\n }\n\n var obj = { 0: 11, 1: 9, length: 2 };\n var newArr = Array.prototype.map.call(obj, callbackfn);\n\n return newArr[0] === obj[0] && newArr[1] === obj[1];\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-8-c-iii-3",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-iii-3.js",
+ "description": "Array.prototype.map - value of returned array element can be overwritten",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(val, idx, obj) {\n return 11;\n }\n\n var obj = { 0: 11, 1: 9, length: 2 };\n var newArr = Array.prototype.map.call(obj, callbackfn);\n\n try {\n var tempVal = newArr[1];\n newArr[1] += 1;\n return newArr[1] !== tempVal;\n } catch (ex) {\n return false;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-8-c-iii-4",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-iii-4.js",
+ "description": "Array.prototype.map - value of returned array element can be enumerated",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(val, idx, obj) {\n return true;\n }\n\n var obj = { 0: 11, length: 2 };\n var newArr = Array.prototype.map.call(obj, callbackfn);\n\n var prop;\n var enumerable = false;\n for (prop in newArr) {\n if (newArr.hasOwnProperty(prop)) {\n if (prop === \"0\") {\n enumerable = true;\n }\n }\n }\n\n return enumerable;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-8-c-iii-5",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-8-c-iii-5.js",
+ "description": "Array.prototype.map - value of returned array element can be changed or deleted",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(val, idx, obj) {\n return true;\n }\n\n var obj = { 0: 11, 1: 9, length: 2 };\n var newArr = Array.prototype.map.call(obj, callbackfn);\n\n try {\n var tempVal = newArr[1];\n delete newArr[1];\n return tempVal !== undefined && newArr[1] === undefined;\n } catch (ex) {\n return false;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-9-1",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-9-1.js",
+ "description": "Array.prototype.map doesn't mutate the Array on which it is called on",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(val, idx, obj)\n {\n return true;\n }\n var srcArr = [1,2,3,4,5];\n srcArr.map(callbackfn);\n if(srcArr[0] === 1 &&\n srcArr[1] === 2 &&\n srcArr[2] === 3 &&\n srcArr[3] === 4 &&\n srcArr[4] === 5)\n {\n return true;\n }\n\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-9-10",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-9-10.js",
+ "description": "Array.prototype.map - empty array to be returned if 'length' is 0 (subclassed Array, length overridden with obj with valueOf)",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n\n function callbackfn(val, idx, obj) {\n accessed = true;\n return val > 10;\n }\n\n var Foo = function () { };\n Foo.prototype = [1, 2, 3];\n var obj = new Foo();\n obj.length = {\n valueOf: function () {\n return 0;\n }\n };\n\n var testResult = Array.prototype.map.call(obj, callbackfn);\n return testResult.length === 0;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-9-11",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-9-11.js",
+ "description": "Array.prototype.map - returns an empty array if 'length' is 0 (subclassed Array, length overridden with obj w/o valueOf (toString))",
+ "test": "assertTrue((function testcase() {\n function Foo() { }\n Foo.prototype = [1, 2, 3];\n\n var f = new Foo();\n\n var o = {\n toString: function () {\n return '0';\n }\n };\n f.length = o;\n\n // objects inherit the default valueOf method of the Object object;\n // that simply returns the itself. Since the default valueOf() method\n // does not return a primitive value, ES next tries to convert the object\n // to a number by calling its toString() method and converting the\n // resulting string to a number.\n\n function cb() { }\n var a = Array.prototype.map.call(f, cb);\n\n if (Array.isArray(a) && a.length === 0) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map) && fnExists(Array.isArray))"
+ },
+ {
+ "id": "15.4.4.19-9-12",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-9-12.js",
+ "description": "Array.prototype.map - returns an empty array if 'length' is 0 (subclassed Array, length overridden with [])",
+ "test": "assertTrue((function testcase() {\n function Foo() { }\n Foo.prototype = [1, 2, 3];\n var f = new Foo();\n\n f.length = [];\n\n // objects inherit the default valueOf method of the Object object;\n // that simply returns the itself. Since the default valueOf() method\n // does not return a primitive value, ES next tries to convert the object\n // to a number by calling its toString() method and converting the\n // resulting string to a number.\n //\n // The toString( ) method on Array converts the array elements to strings,\n // then returns the result of concatenating these strings, with commas in\n // between. An array with no elements converts to the empty string, which\n // converts to the number 0. If an array has a single element that is a\n // number n, the array converts to a string representation of n, which is\n // then converted back to n itself. If an array contains more than one element,\n // or if its one element is not a number, the array converts to NaN.\n\n function cb() { }\n var a = Array.prototype.map.call(f, cb);\n\n if (Array.isArray(a) && a.length === 0) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map) && fnExists(Array.isArray))"
+ },
+ {
+ "id": "15.4.4.19-9-13",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-9-13.js",
+ "description": "Array.prototype.map - if there are no side effects of the functions, O is unmodified",
+ "test": "assertTrue((function testcase() {\n\n var called = 0;\n\n function callbackfn(val, idx, obj) {\n called++;\n return val > 2;\n }\n\n var arr = [1, 2, 3, 4];\n\n arr.map(callbackfn);\n\n return 1 === arr[0] && 2 === arr[1] && 3 === arr[2] && 4 === arr[3] && 4 === called;\n\n\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-9-2",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-9-2.js",
+ "description": "Array.prototype.map returns new Array with same number of elements and values the result of callbackfn",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(val, idx, obj)\n {\n return val + 10;\n }\n var srcArr = [1,2,3,4,5];\n var resArr = srcArr.map(callbackfn);\n if(resArr[0] === 11 &&\n resArr[1] === 12 &&\n resArr[2] === 13 &&\n resArr[3] === 14 &&\n resArr[4] === 15)\n {\n return true;\n }\n\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-9-3",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-9-3.js",
+ "description": "Array.prototype.map - subclassed array when length is reduced",
+ "test": "assertTrue((function testcase() {\n foo.prototype = new Array(1, 2, 3);\n function foo() {}\n var f = new foo();\n f.length = 1;\n \n function cb(){}\n var a = f.map(cb);\n \n if (Array.isArray(a) &&\n a.length === 1) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-9-4",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-9-4.js",
+ "description": "Array.prototype.map doesn't visit expandos",
+ "test": "assertTrue((function testcase() {\n\n var callCnt = 0;\n function callbackfn(val, idx, obj)\n {\n callCnt++;\n }\n var srcArr = [1,2,3,4,5];\n srcArr[\"i\"] = 10;\n srcArr[true] = 11;\n\n var resArr = srcArr.map(callbackfn);\n if(callCnt == 5)\n {\n return true;\n }\n\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-9-5",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-9-5.js",
+ "description": "Array.prototype.map - empty array to be returned if 'length' is 0 (empty array)",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(val, idx, obj) {\n return val > 10;\n }\n\n var obj = { 0: 9, 1: 8, length: 0 };\n\n var testResult = Array.prototype.map.call(obj, callbackfn);\n\n return testResult.length === 0;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-9-6",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-9-6.js",
+ "description": "Array.prototype.map - empty array to be returned if 'length' is 0 (subclassed Array, length overridden to null (type conversion))",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(val, idx, obj) {\n return val > 10;\n }\n\n var Foo = function () { };\n Foo.prototype = [1, 2, 3];\n var obj = new Foo();\n obj.length = null;\n\n var testResult = Array.prototype.map.call(obj, callbackfn);\n return testResult.length === 0;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-9-7",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-9-7.js",
+ "description": "Array.prototype.map - empty array to be returned if 'length' is 0 (subclassed Array, length overridden to false (type conversion))",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n\n function callbackfn(val, idx, obj) {\n accessed = true;\n return val > 10;\n }\n\n var Foo = function () { };\n Foo.prototype = [1, 2, 3];\n var obj = new Foo();\n obj.length = false;\n\n var testResult = Array.prototype.map.call(obj, callbackfn);\n return testResult.length === 0;\n\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-9-8",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-9-8.js",
+ "description": "Array.prototype.map - empty array to be returned if 'length' is 0 (subclassed Array, length overridden to 0 (type conversion))",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n\n function callbackfn(val, idx, obj) {\n accessed = true;\n return val > 10;\n }\n\n var Foo = function () { };\n Foo.prototype = [1, 2, 3];\n var obj = new Foo();\n obj.length = 0;\n\n var testResult = Array.prototype.map.call(obj, callbackfn);\n return testResult.length === 0;\n\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ },
+ {
+ "id": "15.4.4.19-9-9",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-9-9.js",
+ "description": "Array.prototype.map - empty array to be returned if 'length' is 0 (subclassed Array, length overridden to '0' (type conversion))",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n\n function callbackfn(val, idx, obj) {\n accessed = true;\n return val > 10;\n }\n\n var Foo = function () { };\n Foo.prototype = [1, 2, 3];\n var obj = new Foo();\n obj.length = '0';\n\n var testResult = Array.prototype.map.call(obj, callbackfn);\n return testResult.length === 0;\n\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.map))"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.4.4.1_Array_prototype_constructor.json b/website/resources/scripts/testcases2/15.4.4.1_Array_prototype_constructor.json
new file mode 100644
index 000000000..a8a04e506
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.4.4.1_Array_prototype_constructor.json
@@ -0,0 +1,20 @@
+{
+ "testCollection": {
+ "name": "15.4.4.1_Array_prototype_constructor",
+ "numTests": 2,
+ "tests": [
+ {
+ "section": "15.4.4.1",
+ "description": "Array.prototype.constructor === Array",
+ "test": "//CHECK#1\nif (Array.prototype.constructor !== Array) {\n $ERROR('#1: Array.prototype.constructor === Array. Actual: ' + (Array.prototype.constructor));\n} \n",
+ "id": "S15.4.4.1_A1_T1"
+ },
+ {
+ "section": "15.4.4.1, 15.2.4.7, 12.6.4",
+ "description": "Checking use propertyIsEnumerable, for-in",
+ "test": "//CHECK#1\nif (Array.propertyIsEnumerable('constructor') !== false) {\n $ERROR('#1: Array.propertyIsEnumerable(\\'constructor\\') === false. Actual: ' + (Array.propertyIsEnumerable('constructor')));\n}\n\n//CHECK#2\nvar result = true;\nfor (var p in Array){\n if (p === \"constructor\") {\n result = false;\n } \n}\n\nif (result !== true) {\n $ERROR('#2: result = true; for (p in Array) { if (p === \"constructor\") result = false; } result === true;');\n}\n\n",
+ "id": "S15.4.4.1_A2"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.4.4.20.json b/website/resources/scripts/testcases2/15.4.4.20.json
new file mode 100644
index 000000000..b6b3178ec
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.4.4.20.json
@@ -0,0 +1,1576 @@
+{
+ "testCollection": {
+ "name": "15.4.4.20",
+ "numTests": 224,
+ "tests": [
+ {
+ "id": "15.4.4.20-0-1",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-0-1.js",
+ "description": "Array.prototype.filter must exist as a function",
+ "test": "assertTrue((function testcase() {\n var f = Array.prototype.filter;\n if (typeof(f) === \"function\") {\n return true;\n }\n }).call(this));\n"
+ },
+ {
+ "id": "15.4.4.20-0-2",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-0-2.js",
+ "description": "Array.prototype.filter.length must be 1",
+ "test": "assertTrue((Array.prototype.filter.length === 1));\n",
+ "precondition": "(fnExists(Array.prototype.filter))"
+ },
+ {
+ "id": "15.4.4.20-1-1",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-1-1.js",
+ "description": "Array.prototype.filter applied to undefined throws a TypeError",
+ "test": "assertTrue((function testcase() {\n try {\n Array.prototype.filter.call(undefined); // TypeError is thrown if value is undefined\n return false;\n } catch (ex) {\n return ex instanceof TypeError;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.filter))"
+ },
+ {
+ "id": "15.4.4.20-1-10",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-1-10.js",
+ "description": "Array.prototype.filter applied to the Math object",
+ "test": "assertTrue((function testcase() {\n function callbackfn(val, idx, obj) {\n return '[object Math]' === Object.prototype.toString.call(obj);\n }\n\n try {\n Math.length = 1;\n Math[0] = 1;\n var newArr = Array.prototype.filter.call(Math, callbackfn);\n return newArr[0] === 1;\n } finally {\n delete Math[0];\n delete Math.length;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.filter))"
+ },
+ {
+ "id": "15.4.4.20-1-11",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-1-11.js",
+ "description": "Array.prototype.filter applied to Date object",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(val, idx, obj) {\n return obj instanceof Date;\n }\n\n var obj = new Date();\n obj.length = 1;\n obj[0] = 1;\n\n var newArr = Array.prototype.filter.call(obj, callbackfn);\n\n return newArr[0] === 1;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.filter))"
+ },
+ {
+ "id": "15.4.4.20-1-12",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-1-12.js",
+ "description": "Array.prototype.filter applied to RegExp object",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(val, idx, obj) {\n return obj instanceof RegExp;\n }\n\n var obj = new RegExp();\n obj.length = 2;\n obj[1] = true;\n\n var newArr = Array.prototype.filter.call(obj, callbackfn);\n return newArr[0] === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.filter))"
+ },
+ {
+ "id": "15.4.4.20-1-13",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-1-13.js",
+ "description": "Array.prototype.filter applied to the JSON object",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(val, idx, obj) {\n return '[object JSON]' === Object.prototype.toString.call(JSON);\n }\n\n try {\n JSON.length = 1;\n JSON[0] = 1;\n var newArr = Array.prototype.filter.call(JSON, callbackfn);\n return newArr[0] === 1;\n } finally {\n delete JSON.length;\n delete JSON[0];\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.filter))"
+ },
+ {
+ "id": "15.4.4.20-1-14",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-1-14.js",
+ "description": "Array.prototype.filter applied to Error object",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(val, idx, obj) {\n return obj instanceof Error;\n }\n\n var obj = new Error();\n obj.length = 1;\n obj[0] = 1;\n\n var newArr = Array.prototype.filter.call(obj, callbackfn);\n\n return newArr[0] === 1;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.filter))"
+ },
+ {
+ "id": "15.4.4.20-1-15",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-1-15.js",
+ "description": "Array.prototype.filter applied to the Arguments object",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(val, idx, obj) {\n return '[object Arguments]' === Object.prototype.toString.call(obj);\n }\n\n var obj = (function () {\n return arguments;\n }(\"a\", \"b\"));\n\n var newArr = Array.prototype.filter.call(obj, callbackfn);\n\n return newArr[0] === \"a\" && newArr[1] === \"b\";\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.filter))"
+ },
+ {
+ "id": "15.4.4.20-1-2",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-1-2.js",
+ "description": "Array.prototype.filter applied to null throws a TypeError",
+ "test": "assertTrue((function testcase() {\n try {\n Array.prototype.filter.call(null);\n return false;\n } catch (ex) {\n return ex instanceof TypeError;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.filter))"
+ },
+ {
+ "id": "15.4.4.20-1-3",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-1-3.js",
+ "description": "Array.prototype.filter applied to boolean primitive",
+ "test": "assertTrue((function testcase() {\n function callbackfn(val, idx, obj) {\n return obj instanceof Boolean;\n }\n\n try {\n Boolean.prototype[0] = true;\n Boolean.prototype.length = 1;\n\n var newArr = Array.prototype.filter.call(false, callbackfn);\n return newArr[0] === true;\n\n } finally {\n delete Boolean.prototype[0];\n delete Boolean.prototype.length;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.filter))"
+ },
+ {
+ "id": "15.4.4.20-1-4",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-1-4.js",
+ "description": "Array.prototype.filter applied to Boolean Object",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(val, idx, obj) {\n return obj instanceof Boolean;\n }\n\n var obj = new Boolean(true);\n obj.length = 2;\n obj[0] = 11;\n obj[1] = 12;\n\n var newArr = Array.prototype.filter.call(obj, callbackfn);\n\n return newArr[0] === 11 && newArr[1] === 12;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.filter))"
+ },
+ {
+ "id": "15.4.4.20-1-5",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-1-5.js",
+ "description": "Array.prototype.filter applied to number primitive",
+ "test": "assertTrue((function testcase() {\n function callbackfn(val, idx, obj) {\n return obj instanceof Number;\n }\n\n try {\n Number.prototype[0] = 1;\n Number.prototype.length = 1;\n\n var newArr = Array.prototype.filter.call(2.5, callbackfn);\n return newArr[0] === 1;\n } finally {\n delete Number.prototype[0];\n delete Number.prototype.length;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.filter))"
+ },
+ {
+ "id": "15.4.4.20-1-6",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-1-6.js",
+ "description": "Array.prototype.filter applied to Number object",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(val, idx, obj) {\n return obj instanceof Number;\n }\n\n var obj = new Number(-128);\n obj.length = 2;\n obj[0] = 11;\n obj[1] = 12;\n\n var newArr = Array.prototype.filter.call(obj, callbackfn);\n return newArr[0] === 11 && newArr[1] === 12;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.filter))"
+ },
+ {
+ "id": "15.4.4.20-1-7",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-1-7.js",
+ "description": "Array.prototype.filter applied to string primitive",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(val, idx, obj) {\n return obj instanceof String;\n }\n\n var newArr = Array.prototype.filter.call(\"abc\", callbackfn);\n\n return newArr[0] === \"a\";\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.filter))"
+ },
+ {
+ "id": "15.4.4.20-1-8",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-1-8.js",
+ "description": "Array.prototype.filter applied to String object",
+ "test": "assertTrue((function testcase() {\n function callbackfn(val, idx, obj) {\n return obj instanceof String;\n }\n\n var obj = new String(\"abc\");\n var newArr = Array.prototype.filter.call(obj, callbackfn);\n\n return newArr[0] === \"a\";\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.filter))"
+ },
+ {
+ "id": "15.4.4.20-1-9",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-1-9.js",
+ "description": "Array.prototype.filter applied to Function object",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(val, idx, obj) {\n return obj instanceof Function;\n }\n\n var obj = function (a, b) {\n return a + b;\n };\n obj[0] = 11;\n obj[1] = 9;\n\n var newArr = Array.prototype.filter.call(obj, callbackfn);\n\n return newArr[0] === 11 && newArr[1] === 9;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.filter))"
+ },
+ {
+ "id": "15.4.4.20-10-1",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-10-1.js",
+ "description": "Array.prototype.filter doesn't mutate the Array on which it is called on",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(val, idx, obj)\n {\n return true;\n }\n var srcArr = [1,2,3,4,5];\n srcArr.filter(callbackfn);\n if(srcArr[0] === 1 &&\n srcArr[1] === 2 &&\n srcArr[2] === 3 &&\n srcArr[3] === 4 &&\n srcArr[4] === 5)\n {\n return true;\n }\n\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.filter))"
+ },
+ {
+ "id": "15.4.4.20-10-2",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-10-2.js",
+ "description": "Array.prototype.filter returns new Array with length equal to number of true returned by callbackfn",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(val, idx, obj)\n {\n if(val % 2)\n return true;\n else\n return false;\n }\n var srcArr = [1,2,3,4,5];\n var resArr = srcArr.filter(callbackfn);\n if(resArr.length === 3 &&\n resArr[0] === 1 &&\n resArr[1] === 3 &&\n resArr[2] === 5)\n {\n return true;\n }\n\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.filter))"
+ },
+ {
+ "id": "15.4.4.20-10-3",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-10-3.js",
+ "description": "Array.prototype.filter - subclassed array when length is reduced",
+ "test": "assertTrue((function testcase() {\n foo.prototype = new Array(1, 2, 3);\n function foo() {}\n var f = new foo();\n f.length = 1;\n \n function cb(){return true;}\n var a = f.filter(cb);\n \n if (Array.isArray(a) &&\n a.length === 1) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.filter))"
+ },
+ {
+ "id": "15.4.4.20-10-4",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-10-4.js",
+ "description": "Array.prototype.filter doesn't visit expandos",
+ "test": "assertTrue((function testcase() {\n\n var callCnt = 0;\n function callbackfn(val, idx, obj)\n {\n callCnt++;\n }\n var srcArr = [1,2,3,4,5];\n srcArr[\"i\"] = 10;\n srcArr[true] = 11;\n\n var resArr = srcArr.filter(callbackfn);\n if(callCnt == 5)\n {\n return true;\n }\n\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.filter))"
+ },
+ {
+ "id": "15.4.4.20-2-1",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-2-1.js",
+ "description": "Array.prototype.filter applied to Array-like object, 'length' is own data property",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(val, idx, obj) {\n return obj.length === 2;\n }\n\n var obj = {\n 0: 12,\n 1: 11,\n 2: 9,\n length: 2\n };\n\n var newArr = Array.prototype.filter.call(obj, callbackfn);\n\n return newArr.length === 2;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.filter))"
+ },
+ {
+ "id": "15.4.4.20-2-10",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-2-10.js",
+ "description": "Array.prototype.filter applied to Array-like object, 'length' is inherited accessor property",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(val, idx, obj) {\n return obj.length === 2;\n }\n\n var proto = {};\n\n Object.defineProperty(proto, \"length\", {\n get: function () {\n return 2;\n },\n configurable: true\n });\n\n var Con = function () { };\n Con.prototype = proto;\n\n var child = new Con();\n child[0] = 12;\n child[1] = 11;\n child[2] = 9;\n\n var newArr = Array.prototype.filter.call(child, callbackfn);\n return newArr.length === 2;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.filter) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.4.4.20-2-11",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-2-11.js",
+ "description": "Array.prototype.filter applied to Array-like object, 'length' is own accessor property without a get function",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n function callbackfn(val, idx, obj) {\n accessed = true;\n return true;\n }\n\n var obj = {\n 0: 11,\n 1: 12\n };\n Object.defineProperty(obj, \"length\", {\n set: function () { },\n configurable: true\n });\n\n var newArr = Array.prototype.filter.call(obj, callbackfn);\n return newArr.length === 0 && !accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.filter) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.4.4.20-2-12",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-2-12.js",
+ "description": "Array.prototype.filter - 'length' is own accessor property without a get function that overrides an inherited accessor property",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n function callbackfn(val, idx, obj) {\n accessed = true;\n return true;\n }\n\n try {\n Object.defineProperty(Object.prototype, \"length\", {\n get: function () {\n return 2;\n },\n configurable: true\n });\n\n var obj = { 0: 12, 1: 11 };\n Object.defineProperty(obj, \"length\", {\n set: function () { },\n configurable: true\n });\n\n var newArr = Array.prototype.filter.call(obj, callbackfn);\n return newArr.length === 0 && !accessed;\n } finally {\n delete Object.prototype.length;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.filter) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.4.4.20-2-13",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-2-13.js",
+ "description": "Array.prototype.filter applied to the Array-like object that 'length' is inherited accessor property without a get function",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n function callbackfn(val, idx, obj) {\n accessed = true;\n return true;\n }\n\n var proto = {};\n Object.defineProperty(proto, \"length\", {\n set: function () { },\n configurable: true\n });\n\n var Con = function () { };\n Con.prototype = proto;\n\n var child = new Con();\n child[0] = 11;\n child[1] = 12;\n\n var newArr = Array.prototype.filter.call(child, callbackfn);\n return newArr.length === 0 && !accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.filter) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.4.4.20-2-14",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-2-14.js",
+ "description": "Array.prototype.filter applied to the Array-like object that 'length property doesn't exist",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n function callbackfn(val, idx, obj) {\n accessed = true;\n return true;\n }\n\n var obj = { 0: 11, 1: 12 };\n\n var newArr = Array.prototype.filter.call(obj, callbackfn);\n return newArr.length === 0 && !accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.filter))"
+ },
+ {
+ "id": "15.4.4.20-2-15",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-2-15.js",
+ "description": "Array.prototype.filter - 'length' is property of the global object",
+ "test": "assertTrue((function testcase() {\n \n function callbackfn(val, idx, obj) {\n return obj.length === 2;\n }\n\n try {\n var oldLen = fnGlobalObject().length;\n fnGlobalObject()[0] = 12;\n fnGlobalObject()[1] = 11;\n fnGlobalObject()[2] = 9;\n fnGlobalObject().length = 2;\n var newArr = Array.prototype.filter.call(fnGlobalObject(), callbackfn);\n return newArr.length === 2;\n } finally {\n delete fnGlobalObject()[0];\n delete fnGlobalObject()[1];\n delete fnGlobalObject()[2];\n fnGlobalObject().length = oldLen;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.filter))"
+ },
+ {
+ "id": "15.4.4.20-2-17",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-2-17.js",
+ "description": "Array.prototype.filter applied to the Arguments object, which implements its own property get method",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(val, idx, obj) {\n return obj.length === 2;\n }\n\n var func = function (a, b) {\n var newArr = Array.prototype.filter.call(arguments, callbackfn);\n return newArr.length === 2;\n };\n\n return func(12, 11);\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.filter))"
+ },
+ {
+ "id": "15.4.4.20-2-18",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-2-18.js",
+ "description": "Array.prototype.filter applied to String object, which implements its own property get method",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(val, idx, obj) {\n return obj.length === 3;\n }\n\n var str = new String(\"012\");\n\n var newArr = Array.prototype.filter.call(str, callbackfn);\n return newArr.length === 3;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.filter))"
+ },
+ {
+ "id": "15.4.4.20-2-19",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-2-19.js",
+ "description": "Array.prototype.filter applied to Function object, which implements its own property get method",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(val, idx, obj) {\n return obj.length === 2;\n }\n\n var fun = function (a, b) {\n return a + b;\n };\n fun[0] = 12;\n fun[1] = 11;\n fun[2] = 9;\n\n var newArr = Array.prototype.filter.call(fun, callbackfn);\n return newArr.length === 2;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.filter))"
+ },
+ {
+ "id": "15.4.4.20-2-2",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-2-2.js",
+ "description": "Array.prototype.filter - 'length' is own data property on an Array",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(val, idx, obj) {\n return obj.length === 2;\n }\n\n var newArr = [12, 11].filter(callbackfn);\n return newArr.length === 2;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.filter))"
+ },
+ {
+ "id": "15.4.4.20-2-3",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-2-3.js",
+ "description": "Array.prototype.filter applied to Array-like object, 'length' is an own data property that overrides an inherited data property",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(val, idx, obj) {\n return obj.length === 2;\n }\n\n var proto = { length: 3 };\n\n var Con = function () { };\n Con.prototype = proto;\n\n var child = new Con();\n child.length = 2;\n child[0] = 12;\n child[1] = 11;\n child[2] = 9;\n\n var newArr = Array.prototype.filter.call(child, callbackfn);\n return newArr.length === 2;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.filter))"
+ },
+ {
+ "id": "15.4.4.20-2-4",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-2-4.js",
+ "description": "Array.prototype.filter - 'length' is own data property that overrides an inherited data property on an Array",
+ "test": "assertTrue((function testcase() {\n\n var arrProtoLen;\n\n function callbackfn(val, idx, obj) {\n return obj.length === 2;\n }\n\n try {\n arrProtoLen = Array.prototype.length;\n Array.prototype.length = 0;\n var newArr = [12, 11].filter(callbackfn);\n return newArr.length === 2;\n } finally {\n Array.prototype.length = arrProtoLen;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.filter))"
+ },
+ {
+ "id": "15.4.4.20-2-5",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-2-5.js",
+ "description": "Array.prototype.filter to Array-like object, 'length' is an own data property that overrides an inherited accessor property",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(val, idx, obj) {\n return obj.length === 2;\n }\n\n var proto = {};\n\n Object.defineProperty(proto, \"length\", {\n get: function () {\n return 3;\n },\n configurable: true\n });\n\n var Con = function () { };\n Con.prototype = proto;\n\n var child = new Con();\n Object.defineProperty(child, \"length\", {\n value: 2,\n configurable: true\n });\n child[0] = 12;\n child[1] = 11;\n child[2] = 9;\n\n var newArr = Array.prototype.filter.call(child, callbackfn);\n return newArr.length === 2;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.filter) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.4.4.20-2-6",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-2-6.js",
+ "description": "Array.prototype.filter applied to Array-like object, 'length' is an inherited data property",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(val, idx, obj) {\n return obj.length === 2;\n }\n\n var proto = { length: 2 };\n\n var Con = function () { };\n Con.prototype = proto;\n\n var child = new Con();\n child[0] = 12;\n child[1] = 11;\n child[2] = 9;\n\n var newArr = Array.prototype.filter.call(child, callbackfn);\n return newArr.length === 2;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.filter))"
+ },
+ {
+ "id": "15.4.4.20-2-7",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-2-7.js",
+ "description": "Array.prototype.filter applied to Array-like object, 'length' is an own accessor property",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(val, idx, obj) {\n return obj.length === 2;\n }\n\n var obj = {};\n\n Object.defineProperty(obj, \"length\", {\n get: function () {\n return 2;\n },\n configurable: true\n });\n\n obj[0] = 12;\n obj[1] = 11;\n obj[2] = 9;\n\n var newArr = Array.prototype.filter.call(obj, callbackfn);\n return newArr.length === 2;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.filter) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.4.4.20-2-8",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-2-8.js",
+ "description": "Array.prototype.filter applied to Array-like object, 'length' is own accessor property that overrides an inherited data property",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(val, idx, obj) {\n return obj.length === 2;\n }\n\n var proto = { length: 3 };\n\n var Con = function () { };\n Con.prototype = proto;\n\n var child = new Con();\n\n Object.defineProperty(child, \"length\", {\n get: function () {\n return 2;\n },\n configurable: true\n });\n\n child[0] = 12;\n child[1] = 11;\n child[2] = 9;\n\n var newArr = Array.prototype.filter.call(child, callbackfn);\n return newArr.length === 2;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.filter) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.4.4.20-2-9",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-2-9.js",
+ "description": "Array.prototype.filter applied to Array-like object, 'length' is an own accessor property that overrides an inherited accessor property",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(val, idx, obj) {\n return obj.length === 2;\n }\n\n var proto = {};\n\n Object.defineProperty(proto, \"length\", {\n get: function () {\n return 3;\n },\n configurable: true\n });\n\n var Con = function () { };\n Con.prototype = proto;\n\n var child = new Con();\n\n Object.defineProperty(child, \"length\", {\n get: function () {\n return 2;\n },\n configurable: true\n });\n\n child[0] = 12;\n child[1] = 11;\n child[2] = 9;\n\n var newArr = Array.prototype.filter.call(child, callbackfn);\n return newArr.length === 2;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.filter) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.4.4.20-3-1",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-1.js",
+ "description": "Array.prototype.filter - value of 'length' is undefined",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n function callbackfn(val, idx, obj) {\n accessed = true;\n return true;\n }\n\n var obj = { 0: 0, 1: 1, length: undefined };\n var newArr = Array.prototype.filter.call(obj, callbackfn);\n\n return newArr.length === 0 && !accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.filter))"
+ },
+ {
+ "id": "15.4.4.20-3-10",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-10.js",
+ "description": "Array.prototype.filter - value of 'length' is a number (value is NaN)",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n function callbackfn(val, idx, obj) {\n accessed = true;\n return true;\n }\n\n var obj = { 0: 9, length: NaN };\n\n var newArr = Array.prototype.filter.call(obj, callbackfn);\n\n return newArr.length === 0 && !accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.filter))"
+ },
+ {
+ "id": "15.4.4.20-3-11",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-11.js",
+ "description": "Array.prototype.filter - 'length' is a string containing a positive number",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(val, idx, obj) {\n return true;\n }\n\n var obj = { 1: 11, 2: 9, length: \"2\" };\n\n var newArr = Array.prototype.filter.call(obj, callbackfn);\n\n return newArr.length === 1 && newArr[0] === 11;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.filter))"
+ },
+ {
+ "id": "15.4.4.20-3-12",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-12.js",
+ "description": "Array.prototype.filter - 'length' is a string containing a negative number",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(val, idx, obj) {\n return true;\n }\n\n var obj = { 1: 11, 2: 9, length: \"-4294967294\" };\n\n var newArr = Array.prototype.filter.call(obj, callbackfn);\n\n return newArr.length === 1 && newArr[0] === 11;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.filter))"
+ },
+ {
+ "id": "15.4.4.20-3-13",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-13.js",
+ "description": "Array.prototype.filter - 'length' is a string containing a decimal number",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(val, idx, obj) {\n return true;\n }\n\n var obj = { 1: 11, 2: 9, length: \"2.5\" };\n\n var newArr = Array.prototype.filter.call(obj, callbackfn);\n\n return newArr.length === 1 && newArr[0] === 11;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.filter))"
+ },
+ {
+ "id": "15.4.4.20-3-14",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-14.js",
+ "description": "Array.prototype.filter - 'length' is a string containing +/-Infinity",
+ "test": "assertTrue((function testcase() {\n\n var accessed1 = false;\n var accessed2 = false;\n var accessed3 = false;\n\n function callbackfn1(val, idx, obj) {\n accessed1 = true;\n return true;\n }\n\n function callbackfn2(val, idx, obj) {\n accessed2 = true;\n return true;\n }\n\n function callbackfn3(val, idx, obj) {\n accessed3 = true;\n return true;\n }\n\n var obj1 = { 0: 9, length: \"Infinity\" };\n var obj2 = { 0: 9, length: \"-Infinity\" };\n var obj3 = { 0: 9, length: \"+Infinity\" };\n\n var newArr1 = Array.prototype.filter.call(obj1, callbackfn1);\n var newArr2 = Array.prototype.filter.call(obj2, callbackfn2);\n var newArr3 = Array.prototype.filter.call(obj3, callbackfn3);\n\n return !accessed1 && newArr1.length === 0 &&\n !accessed2 && newArr2.length === 0 && \n !accessed3 && newArr3.length === 0;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.filter))"
+ },
+ {
+ "id": "15.4.4.20-3-15",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-15.js",
+ "description": "Array.prototype.filter - 'length' is a string containing an exponential number",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(val, idx, obj) {\n return true;\n }\n\n var obj = { 1: 11, 2: 9, length: \"2E0\" };\n\n var newArr = Array.prototype.filter.call(obj, callbackfn);\n\n return newArr.length === 1 && newArr[0] === 11;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.filter))"
+ },
+ {
+ "id": "15.4.4.20-3-16",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-16.js",
+ "description": "Array.prototype.filter - 'length' is a string containing a hex number",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(val, idx, obj) {\n return true;\n }\n\n var obj = { 1: 11, 2: 9, length: \"0x0002\" };\n\n var newArr = Array.prototype.filter.call(obj, callbackfn);\n\n return newArr.length === 1 && newArr[0] === 11;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.filter))"
+ },
+ {
+ "id": "15.4.4.20-3-17",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-17.js",
+ "description": "Array.prototype.filter - 'length' is a string containing a number with leading zeros",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(val, idx, obj) {\n return true;\n }\n\n var obj = { 1: 11, 2: 9, length: \"0002.00\" };\n\n var newArr = Array.prototype.filter.call(obj, callbackfn);\n\n return newArr.length === 1 && newArr[0] === 11;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.filter))"
+ },
+ {
+ "id": "15.4.4.20-3-18",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-18.js",
+ "description": "Array.prototype.filter - value of 'length' is a string that can't convert to a number",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n function callbackfn(val, idx, obj) {\n accessed = true;\n return true;\n }\n\n var obj = { 0: 9, length: \"asdf!_\" };\n\n var newArr = Array.prototype.filter.call(obj, callbackfn);\n\n return !accessed && newArr.length === 0;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.filter))"
+ },
+ {
+ "id": "15.4.4.20-3-19",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-19.js",
+ "description": "Array.prototype.filter - value of 'length' is an Object which has an own toString method.",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(val, idx, obj) {\n return true;\n }\n\n var obj = {\n 1: 11,\n 2: 9,\n length: {\n toString: function () {\n return '2';\n }\n }\n };\n\n var newArr = Array.prototype.filter.call(obj, callbackfn);\n\n return newArr.length === 1 && newArr[0] === 11;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.filter))"
+ },
+ {
+ "id": "15.4.4.20-3-2",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-2.js",
+ "description": "Array.prototype.filter applied on an Array-like object if 'length' is 1 (length overridden to true(type conversion))",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(val, idx, obj) {\n return true;\n }\n\n var obj = { 0: 11, 1: 9, length: true };\n var newArr = Array.prototype.filter.call(obj, callbackfn);\n\n return newArr.length === 1 && newArr[0] === 11;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.filter))"
+ },
+ {
+ "id": "15.4.4.20-3-20",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-20.js",
+ "description": "Array.prototype.filter - value of 'length' is an Object which has an own valueOf method.",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(val, idx, obj) {\n return true;\n }\n\n var obj = {\n 1: 11,\n 2: 9,\n length: {\n valueOf: function () {\n return 2;\n }\n }\n };\n\n var newArr = Array.prototype.filter.call(obj, callbackfn);\n\n return newArr.length === 1 && newArr[0] === 11;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.filter))"
+ },
+ {
+ "id": "15.4.4.20-3-21",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-21.js",
+ "description": "Array.prototype.filter - 'length' is an object that has an own valueOf method that returns an object and toString method that returns a string",
+ "test": "assertTrue((function testcase() {\n\n var firstStepOccured = false;\n var secondStepOccured = false;\n\n function callbackfn(val, idx, obj) {\n return true;\n }\n\n var obj = {\n 1: 11,\n 2: 9,\n length: {\n valueOf: function () {\n firstStepOccured = true;\n return {};\n },\n toString: function () {\n secondStepOccured = true;\n return '2';\n }\n }\n };\n\n var newArr = Array.prototype.filter.call(obj, callbackfn);\n\n return newArr.length === 1 && newArr[0] === 11 && firstStepOccured && secondStepOccured;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.filter))"
+ },
+ {
+ "id": "15.4.4.20-3-22",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-22.js",
+ "description": "Array.prototype.filter throws TypeError exception when 'length' is an object with toString and valueOf methods that don�t return primitive values",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n var firstStepOccured = false;\n var secondStepOccured = false;\n\n function callbackfn(val, idx, obj) {\n accessed = true;\n return true;\n }\n\n var obj = {\n 1: 11,\n 2: 12,\n\n length: {\n valueOf: function () {\n firstStepOccured = true;\n return {};\n },\n toString: function () {\n secondStepOccured = true;\n return {};\n }\n }\n };\n\n try {\n Array.prototype.filter.call(obj, callbackfn);\n return false;\n } catch (ex) {\n return (ex instanceof TypeError) && !accessed && firstStepOccured && secondStepOccured;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.filter))"
+ },
+ {
+ "id": "15.4.4.20-3-23",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-23.js",
+ "description": "Array.prototype.filter uses inherited valueOf method when 'length' is an object with an own toString and inherited valueOf methods",
+ "test": "assertTrue((function testcase() {\n\n var valueOfAccessed = false;\n var toStringAccessed = false;\n\n function callbackfn(val, idx, obj) {\n return true;\n }\n\n var proto = {\n valueOf: function () {\n valueOfAccessed = true;\n return 2;\n }\n };\n\n var Con = function () { };\n Con.prototype = proto;\n\n var child = new Con();\n\n child.toString = function () {\n toStringAccessed = true;\n return '1';\n };\n\n var obj = {\n 1: 11,\n 2: 9,\n length: child\n };\n\n var newArr = Array.prototype.filter.call(obj, callbackfn);\n\n return newArr.length === 1 && newArr[0] === 11 && valueOfAccessed && !toStringAccessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.filter))"
+ },
+ {
+ "id": "15.4.4.20-3-24",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-24.js",
+ "description": "Array.prototype.filter - value of 'length' is a positive non-integer, ensure truncation occurs in the proper direction",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(val, idx, obj) {\n return true;\n }\n\n var obj = {\n 1: 11,\n 2: 9,\n length: 2.685\n };\n\n var newArr = Array.prototype.filter.call(obj, callbackfn);\n\n return newArr.length === 1 && newArr[0] === 11;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.filter))"
+ },
+ {
+ "id": "15.4.4.20-3-25",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-25.js",
+ "description": "Array.prototype.filter - value of 'length' is a negative non-integer, ensure truncation occurs in the proper direction",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(val, idx, obj) {\n return true;\n }\n\n var obj = {\n 1: 11,\n 2: 9,\n length: -4294967294.5\n };\n\n var newArr = Array.prototype.filter.call(obj, callbackfn);\n\n return newArr.length === 1 && newArr[0] === 11;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.filter))"
+ },
+ {
+ "id": "15.4.4.20-3-28",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-28.js",
+ "description": "Array.prototype.filter - value of 'length' is boundary value (2^32)",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n function callbackfn(val, idx, obj) {\n accessed = true;\n return true;\n }\n\n var obj = {\n 0: 12,\n length: 4294967296\n };\n\n var newArr = Array.prototype.filter.call(obj, callbackfn);\n\n return !accessed && newArr.length === 0;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.filter))"
+ },
+ {
+ "id": "15.4.4.20-3-29",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-29.js",
+ "description": "Array.prototype.filter - value of 'length' is boundary value (2^32 + 1)",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(val, idx, obj) {\n return true;\n }\n\n var obj = {\n 0: 11,\n 1: 9,\n length: 4294967297\n };\n\n var newArr = Array.prototype.filter.call(obj, callbackfn);\n\n return newArr.length === 1 && newArr[0] === 11;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.filter))"
+ },
+ {
+ "id": "15.4.4.20-3-3",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-3.js",
+ "description": "Array.prototype.filter - value of 'length' is a number (value is 0)",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n function callbackfn(val, idx, obj) {\n accessed = true;\n return true;\n }\n\n var obj = { 0: 11, length: 0 };\n var newArr = Array.prototype.filter.call(obj, callbackfn);\n\n return newArr.length === 0 && !accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.filter))"
+ },
+ {
+ "id": "15.4.4.20-3-4",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-4.js",
+ "description": "Array.prototype.filter - value of 'length' is a number (value is +0)",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n function callbackfn(val, idx, obj) {\n accessed = true;\n return true;\n }\n\n var obj = { 0: 11, length: +0 };\n var newArr = Array.prototype.filter.call(obj, callbackfn);\n\n return newArr.length === 0 && !accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.filter))"
+ },
+ {
+ "id": "15.4.4.20-3-5",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-5.js",
+ "description": "Array.prototype.filter - value of 'length' is a number (value is -0)",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n function callbackfn(val, idx, obj) {\n accessed = true;\n return true;\n }\n\n var obj = { 0: 11, length: -0 };\n var newArr = Array.prototype.filter.call(obj, callbackfn);\n\n return newArr.length === 0 && !accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.filter))"
+ },
+ {
+ "id": "15.4.4.20-3-6",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-6.js",
+ "description": "Array.prototype.filter - value of 'length' is a number (value is positive)",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(val, idx, obj) {\n return true;\n }\n\n var obj = { 1: 11, 2: 9, length: 2 };\n\n var newArr = Array.prototype.filter.call(obj, callbackfn);\n\n return newArr.length === 1 && newArr[0] === 11;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.filter))"
+ },
+ {
+ "id": "15.4.4.20-3-7",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-7.js",
+ "description": "Array.prototype.filter - value of 'length' is a number (value is negative)",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(val, idx, obj) {\n return true;\n }\n\n var obj = { 1: 11, 2: 9, length: -4294967294 };\n var newArr = Array.prototype.filter.call(obj, callbackfn);\n\n return newArr.length === 1 && newArr[0] === 11;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.filter))"
+ },
+ {
+ "id": "15.4.4.20-3-8",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-8.js",
+ "description": "Array.prototype.filter - value of 'length' is a number (value is Infinity)",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n function callbackfn(val, idx, obj) {\n accessed = true;\n return true;\n }\n\n var obj = { 0: 9, length: Infinity };\n var newArr = Array.prototype.filter.call(obj, callbackfn);\n\n return newArr.length === 0 && !accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.filter))"
+ },
+ {
+ "id": "15.4.4.20-3-9",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-3-9.js",
+ "description": "Array.prototype.filter - value of 'length' is a number (value is -Infinity)",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n function callbackfn(val, idx, obj) {\n accessed = true;\n return true;\n }\n\n var obj = { 0: 9, length: -Infinity };\n\n var newArr = Array.prototype.filter.call(obj, callbackfn);\n\n return newArr.length === 0 && !accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.filter))"
+ },
+ {
+ "id": "15.4.4.20-4-1",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-4-1.js",
+ "description": "Array.prototype.filter throws TypeError if callbackfn is undefined",
+ "test": "assertTrue((function testcase() {\n\n var arr = new Array(10);\n try {\n arr.filter(); \n }\n catch(e) {\n if(e instanceof TypeError)\n return true; \n }\n\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.filter))"
+ },
+ {
+ "id": "15.4.4.20-4-10",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-4-10.js",
+ "description": "Array.prototype.filter - the exception is not thrown if exception was thrown by step 2",
+ "test": "assertTrue((function testcase() {\n\n var obj = { 0: 11, 1: 12 };\n\n Object.defineProperty(obj, \"length\", {\n get: function () {\n throw new SyntaxError();\n },\n configurable: true\n });\n\n try {\n Array.prototype.filter.call(obj, undefined);\n return false;\n } catch (ex) {\n return !(ex instanceof TypeError);\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.filter) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.4.4.20-4-11",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-4-11.js",
+ "description": "Array.prototype.filter - the exception is not thrown if exception was thrown by step 3",
+ "test": "assertTrue((function testcase() {\n\n var obj = { 0: 11, 1: 12 };\n\n Object.defineProperty(obj, \"length\", {\n get: function () {\n return {\n toString: function () {\n throw new SyntaxError();\n }\n };\n },\n configurable: true\n });\n\n try {\n Array.prototype.filter.call(obj, undefined);\n return false;\n } catch (ex) {\n return !(ex instanceof TypeError);\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.filter) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.4.4.20-4-12",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-4-12.js",
+ "description": "Array.prototype.filter - 'callbackfn' is a function",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(val, idx, obj) {\n if (idx === 1) {\n return val === 9;\n }\n return false;\n }\n\n var newArr = [11, 9].filter(callbackfn);\n return newArr.length === 1 && newArr[0] === 9;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.filter))"
+ },
+ {
+ "id": "15.4.4.20-4-15",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-4-15.js",
+ "description": "Array.prototype.filter - calling with no callbackfn is the same as passing undefined for callbackfn",
+ "test": "assertTrue((function testcase() {\n var obj = { 10: 10 };\n var lengthAccessed = false;\n var loopAccessed = false;\n Object.defineProperty(obj, \"length\", {\n get: function () {\n lengthAccessed = true;\n return 20;\n },\n configurable: true\n });\n Object.defineProperty(obj, \"0\", {\n get: function () {\n loopAccessed = true;\n return 10;\n },\n configurable: true\n });\n\n try {\n Array.prototype.filter.call(obj);\n return false;\n } catch (ex) {\n return (ex instanceof TypeError) && lengthAccessed && !loopAccessed;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.filter) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects())"
+ },
+ {
+ "id": "15.4.4.20-4-2",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-4-2.js",
+ "description": "Array.prototype.filter throws ReferenceError if callbackfn is unreferenced",
+ "test": "assertTrue((function testcase() {\n\n var arr = new Array(10);\n try {\n arr.filter(foo); \n }\n catch(e) {\n if(e instanceof ReferenceError)\n return true; \n }\n\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.filter))"
+ },
+ {
+ "id": "15.4.4.20-4-3",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-4-3.js",
+ "description": "Array.prototype.filter throws TypeError if callbackfn is null",
+ "test": "assertTrue((function testcase() {\n\n var arr = new Array(10);\n try {\n arr.filter(null); \n }\n catch(e) {\n if(e instanceof TypeError)\n return true; \n }\n\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.filter))"
+ },
+ {
+ "id": "15.4.4.20-4-4",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-4-4.js",
+ "description": "Array.prototype.filter throws TypeError if callbackfn is boolean",
+ "test": "assertTrue((function testcase() {\n\n var arr = new Array(10);\n try {\n arr.filter(true); \n }\n catch(e) {\n if(e instanceof TypeError)\n return true; \n }\n\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.filter))"
+ },
+ {
+ "id": "15.4.4.20-4-5",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-4-5.js",
+ "description": "Array.prototype.filter throws TypeError if callbackfn is number",
+ "test": "assertTrue((function testcase() {\n\n var arr = new Array(10);\n try {\n arr.filter(5); \n }\n catch(e) {\n if(e instanceof TypeError)\n return true; \n }\n\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.filter))"
+ },
+ {
+ "id": "15.4.4.20-4-6",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-4-6.js",
+ "description": "Array.prototype.filter throws TypeError if callbackfn is string",
+ "test": "assertTrue((function testcase() {\n\n var arr = new Array(10);\n try {\n arr.filter(\"abc\"); \n }\n catch(e) {\n if(e instanceof TypeError)\n return true; \n }\n\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.filter))"
+ },
+ {
+ "id": "15.4.4.20-4-7",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-4-7.js",
+ "description": "Array.prototype.filter throws TypeError if callbackfn is Object without [[Call]] internal method",
+ "test": "assertTrue((function testcase() {\n\n var arr = new Array(10);\n try {\n arr.filter(new Object()); \n }\n catch(e) {\n if(e instanceof TypeError)\n return true; \n }\n\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.filter))"
+ },
+ {
+ "id": "15.4.4.20-4-8",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-4-8.js",
+ "description": "Array.prototype.filter - side effects produced by step 2 are visible when an exception occurs",
+ "test": "assertTrue((function testcase() {\n\n var obj = { 0: 11, 1: 12 };\n\n var accessed = false;\n\n Object.defineProperty(obj, \"length\", {\n get: function () {\n accessed = true;\n return 2;\n },\n configurable: true\n });\n\n try {\n Array.prototype.filter.call(obj, null);\n return false;\n } catch (ex) {\n return ex instanceof TypeError && accessed;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.filter) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.4.4.20-4-9",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-4-9.js",
+ "description": "Array.prototype.filter - side effects produced by step 3 are visible when an exception occurs",
+ "test": "assertTrue((function testcase() {\n\n var obj = { 0: 11, 1: 12 };\n\n var accessed = false;\n\n Object.defineProperty(obj, \"length\", {\n get: function () {\n return {\n toString: function () {\n accessed = true;\n return \"2\";\n }\n };\n },\n configurable: true\n });\n\n try {\n Array.prototype.filter.call(obj, null);\n return false;\n } catch (ex) {\n return ex instanceof TypeError && accessed;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.filter) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.4.4.20-5-1-s",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20-5-1-s.js",
+ "description": "Array.prototype.filter - thisArg not passed to strict callbackfn",
+ "test": "assertTrue((function testcase() {\n var innerThisCorrect = false;\n \n function callbackfn(val, idx, obj) {\n \"use strict\";\n innerThisCorrect = this===undefined;\n return true;\n }\n\n [1].filter(callbackfn);\n return innerThisCorrect; \n }).call(this));\n",
+ "precondition": "(fnSupportsStrict() && fnExists(Array.prototype.filter))",
+ "strict_only": ""
+ },
+ {
+ "id": "15.4.4.20-5-1",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-1.js",
+ "description": "Array.prototype.filter - thisArg is passed",
+ "test": "assertTrue((function testcase() {\n this._15_4_4_20_5_1 = false;\n var _15_4_4_20_5_1 = true;\n\n function callbackfn(val, idx, obj) {\n return this._15_4_4_20_5_1;\n }\n var srcArr = [1];\n var resArr = srcArr.filter(callbackfn);\n return resArr.length === 0;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.filter))"
+ },
+ {
+ "id": "15.4.4.20-5-10",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-10.js",
+ "description": "Array.prototype.filter - Array Object can be used as thisArg",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n var objArray = new Array(10);\n\n function callbackfn(val, idx, obj) {\n accessed = true;\n return this === objArray;\n }\n\n\n var newArr = [11].filter(callbackfn, objArray);\n\n return newArr[0] === 11 && accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.filter))"
+ },
+ {
+ "id": "15.4.4.20-5-11",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-11.js",
+ "description": "Array.prototype.filter - String Object can be used as thisArg",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n var objString = new String();\n\n function callbackfn(val, idx, obj) {\n accessed = true;\n return this === objString;\n }\n\n var newArr = [11].filter(callbackfn, objString);\n\n return newArr[0] === 11 && accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.filter))"
+ },
+ {
+ "id": "15.4.4.20-5-12",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-12.js",
+ "description": "Array.prototype.filter - Boolean Object can be used as thisArg",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n var objBoolean = new Boolean();\n\n function callbackfn(val, idx, obj) {\n accessed = true;\n return this === objBoolean;\n }\n\n var newArr = [11].filter(callbackfn, objBoolean);\n\n return newArr[0] === 11 && accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.filter))"
+ },
+ {
+ "id": "15.4.4.20-5-13",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-13.js",
+ "description": "Array.prototype.filter - Number Object can be used as thisArg",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n var objNumber = new Number();\n\n function callbackfn(val, idx, obj) {\n accessed = true;\n return this === objNumber;\n }\n\n var newArr = [11].filter(callbackfn, objNumber);\n\n return newArr[0] === 11 && accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.filter))"
+ },
+ {
+ "id": "15.4.4.20-5-14",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-14.js",
+ "description": "Array.prototype.filter - the Math object can be used as thisArg",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n\n function callbackfn(val, idx, obj) {\n accessed = true;\n return this === Math;\n }\n\n var newArr = [11].filter(callbackfn, Math);\n\n return newArr[0] === 11 && accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.filter))"
+ },
+ {
+ "id": "15.4.4.20-5-15",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-15.js",
+ "description": "Array.prototype.filter - Date Object can be used as thisArg",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n\n var objDate = new Date();\n\n function callbackfn(val, idx, obj) {\n accessed = true;\n return this === objDate;\n }\n\n var newArr = [11].filter(callbackfn, objDate);\n\n return newArr[0] === 11 && accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.filter))"
+ },
+ {
+ "id": "15.4.4.20-5-16",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-16.js",
+ "description": "Array.prototype.filter - RegExp Object can be used as thisArg",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n\n var objRegExp = new RegExp();\n\n function callbackfn(val, idx, obj) {\n accessed = true;\n return this === objRegExp;\n }\n\n var newArr = [11].filter(callbackfn, objRegExp);\n\n return newArr[0] === 11 && accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.filter))"
+ },
+ {
+ "id": "15.4.4.20-5-17",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-17.js",
+ "description": "Array.prototype.filter - the JSON object can be used as thisArg",
+ "test": "assertTrue((function testcase() {\n var accessed = false;\n\n function callbackfn(val, idx, obj) {\n accessed = true;\n return this === JSON;\n }\n\n var newArr = [11].filter(callbackfn, JSON);\n\n return newArr[0] === 11 && accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.filter))"
+ },
+ {
+ "id": "15.4.4.20-5-18",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-18.js",
+ "description": "Array.prototype.filter - Error Object can be used as thisArg",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n var objError = new RangeError();\n\n function callbackfn(val, idx, obj) {\n accessed = true;\n return this === objError;\n }\n\n var newArr = [11].filter(callbackfn, objError);\n\n return newArr[0] === 11 && accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.filter))"
+ },
+ {
+ "id": "15.4.4.20-5-19",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-19.js",
+ "description": "Array.prototype.filter - the Arguments object can be used as thisArg",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n var arg;\n\n function callbackfn(val, idx, obj) {\n accessed = true;\n return this === arg;\n }\n\n (function fun() {\n arg = arguments;\n }(1, 2, 3));\n\n var newArr = [11].filter(callbackfn, arg);\n return newArr[0] === 11 && accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.filter))"
+ },
+ {
+ "id": "15.4.4.20-5-2",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-2.js",
+ "description": "Array.prototype.filter - thisArg is Object",
+ "test": "assertTrue((function testcase() {\n var res = false;\n var o = new Object();\n o.res = true;\n function callbackfn(val, idx, obj)\n {\n return this.res;\n }\n\n var srcArr = [1];\n var resArr = srcArr.filter(callbackfn,o);\n if( resArr.length === 1)\n return true;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.filter))"
+ },
+ {
+ "id": "15.4.4.20-5-21",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-21.js",
+ "description": "Array.prototype.filter - the global object can be used as thisArg",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n\n function callbackfn(val, idx, obj) {\n accessed = true;\n return this === fnGlobalObject();\n }\n\n var newArr = [11].filter(callbackfn, fnGlobalObject());\n\n return newArr[0] === 11 && accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.filter))"
+ },
+ {
+ "id": "15.4.4.20-5-22",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-22.js",
+ "description": "Array.prototype.filter - boolean primitive can be used as thisArg",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n\n function callbackfn(val, idx, obj) {\n accessed = true;\n return this.valueOf() === false;\n }\n\n var newArr = [11].filter(callbackfn, false);\n\n return newArr[0] === 11 && accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.filter))"
+ },
+ {
+ "id": "15.4.4.20-5-23",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-23.js",
+ "description": "Array.prototype.filter - number primitive can be used as thisArg",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n\n function callbackfn(val, idx, obj) {\n accessed = true;\n return this.valueOf() === 101;\n }\n\n var newArr = [11].filter(callbackfn, 101);\n\n return newArr[0] === 11 && accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.filter))"
+ },
+ {
+ "id": "15.4.4.20-5-24",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-24.js",
+ "description": "Array.prototype.filter - string primitive can be used as thisArg",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n\n function callbackfn(val, idx, obj) {\n accessed = true;\n return this.valueOf() === \"abc\";\n }\n\n var newArr = [11].filter(callbackfn, \"abc\");\n\n return newArr[0] === 11 && accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.filter))"
+ },
+ {
+ "id": "15.4.4.20-5-27",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-27.js",
+ "description": "Array.prototype.filter - Array.isArray(arg) returns true when arg is the returned array",
+ "test": "assertTrue((function testcase() {\n\n var newArr = [11].filter(function () { });\n\n return Array.isArray(newArr);\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.filter) && fnExists(Array.isArray))"
+ },
+ {
+ "id": "15.4.4.20-5-28",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-28.js",
+ "description": "Array.prototype.filter - the returned array is instanceof Array",
+ "test": "assertTrue((function testcase() {\n\n var newArr = [11].filter(function () { });\n\n return newArr instanceof Array;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.filter))"
+ },
+ {
+ "id": "15.4.4.20-5-29",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-29.js",
+ "description": "Array.prototype.filter - returns an array whose length is 0",
+ "test": "assertTrue((function testcase() {\n\n var newArr = [11].filter(function () { });\n\n return newArr.length === 0;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.filter))"
+ },
+ {
+ "id": "15.4.4.20-5-3",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-3.js",
+ "description": "Array.prototype.filter - thisArg is Array",
+ "test": "assertTrue((function testcase() {\n var res = false;\n var a = new Array();\n a.res = true;\n function callbackfn(val, idx, obj)\n {\n return this.res;\n }\n\n var srcArr = [1];\n var resArr = srcArr.filter(callbackfn,a);\n if( resArr.length === 1)\n return true;\n\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.filter))"
+ },
+ {
+ "id": "15.4.4.20-5-30",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-30.js",
+ "description": "Array.prototype.filter - thisArg not passed",
+ "test": "assertTrue((function testcase() {\n function innerObj() {\n this._15_4_4_20_5_30 = true;\n var _15_4_4_20_5_30 = false;\n \n function callbackfn(val, idx, obj) {\n return this._15_4_4_20_5_30;\n }\n var srcArr = [1];\n var resArr = srcArr.filter(callbackfn);\n this.retVal = resArr.length === 0;\n }\n return new innerObj().retVal;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.filter))"
+ },
+ {
+ "id": "15.4.4.20-5-4",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-4.js",
+ "description": "Array.prototype.filter - thisArg is object from object template(prototype)",
+ "test": "assertTrue((function testcase() {\n var res = false;\n function callbackfn(val, idx, obj)\n {\n return this.res;\n }\n \n function foo(){}\n foo.prototype.res = true;\n var f = new foo();\n\n var srcArr = [1];\n var resArr = srcArr.filter(callbackfn,f);\n if( resArr.length === 1)\n return true; \n\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.filter))"
+ },
+ {
+ "id": "15.4.4.20-5-5",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-5.js",
+ "description": "Array.prototype.filter - thisArg is object from object template",
+ "test": "assertTrue((function testcase() {\n var res = false;\n function callbackfn(val, idx, obj)\n {\n return this.res;\n }\n\n function foo(){}\n var f = new foo();\n f.res = true;\n \n var srcArr = [1];\n var resArr = srcArr.filter(callbackfn,f);\n if( resArr.length === 1)\n return true; \n\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.filter))"
+ },
+ {
+ "id": "15.4.4.20-5-6",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-6.js",
+ "description": "Array.prototype.filter - thisArg is function",
+ "test": "assertTrue((function testcase() {\n var res = false;\n function callbackfn(val, idx, obj)\n {\n return this.res;\n }\n\n function foo(){}\n foo.res = true;\n \n var srcArr = [1];\n var resArr = srcArr.filter(callbackfn,foo);\n if( resArr.length === 1)\n return true; \n\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.filter))"
+ },
+ {
+ "id": "15.4.4.20-5-7",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-7.js",
+ "description": "Array.prototype.filter - built-in functions can be used as thisArg",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n\n function callbackfn(val, idx, obj) {\n accessed = true;\n return this === eval;\n }\n\n var newArr = [11].filter(callbackfn, eval);\n\n return newArr[0] === 11 && accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.filter))"
+ },
+ {
+ "id": "15.4.4.20-5-9",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-5-9.js",
+ "description": "Array.prototype.filter - Function Object can be used as thisArg",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n var objFunction = function () { };\n\n function callbackfn(val, idx, obj) {\n accessed = true;\n return this === objFunction;\n }\n\n var newArr = [11].filter(callbackfn, objFunction);\n\n return newArr[0] === 11 && accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.filter))"
+ },
+ {
+ "id": "15.4.4.20-6-1",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-6-1.js",
+ "description": "Array.prototype.filter returns an empty array if 'length' is 0 (empty array)",
+ "test": "assertTrue((function testcase() {\n function cb(){}\n var a = [].filter(cb);\n if (Array.isArray(a) &&\n a.length === 0) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.filter))"
+ },
+ {
+ "id": "15.4.4.20-6-2",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-6-2.js",
+ "description": "Array.prototype.filter returns an empty array if 'length' is 0 (subclassed Array, length overridden to null (type conversion))",
+ "test": "assertTrue((function testcase() {\n foo.prototype = new Array(1, 2, 3);\n function foo() {}\n var f = new foo();\n f.length = null;\n \n function cb(){}\n var a = f.filter(cb);\n \n if (Array.isArray(a) &&\n a.length === 0) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.filter))"
+ },
+ {
+ "id": "15.4.4.20-6-3",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-6-3.js",
+ "description": "Array.prototype.filter returns an empty array if 'length' is 0 (subclassed Array, length overridden to false (type conversion))",
+ "test": "assertTrue((function testcase() {\n foo.prototype = new Array(1, 2, 3);\n function foo() {}\n var f = new foo();\n f.length = false;\n \n function cb(){}\n var a = f.filter(cb);\n \n if (Array.isArray(a) &&\n a.length === 0) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.filter))"
+ },
+ {
+ "id": "15.4.4.20-6-4",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-6-4.js",
+ "description": "Array.prototype.filter returns an empty array if 'length' is 0 (subclassed Array, length overridden to 0 (type conversion))",
+ "test": "assertTrue((function testcase() {\n foo.prototype = new Array(1, 2, 3);\n function foo() {}\n var f = new foo();\n f.length = 0;\n \n function cb(){}\n var a = f.filter(cb);\n \n if (Array.isArray(a) &&\n a.length === 0) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.filter))"
+ },
+ {
+ "id": "15.4.4.20-6-5",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-6-5.js",
+ "description": "Array.prototype.filter returns an empty array if 'length' is 0 (subclassed Array, length overridden to '0' (type conversion))",
+ "test": "assertTrue((function testcase() {\n foo.prototype = new Array(1, 2, 3);\n function foo() {}\n var f = new foo();\n f.length = '0';\n \n function cb(){}\n var a = f.filter(cb);\n \n if (Array.isArray(a) &&\n a.length === 0) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.filter))"
+ },
+ {
+ "id": "15.4.4.20-6-6",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-6-6.js",
+ "description": "Array.prototype.filter returns an empty array if 'length' is 0 (subclassed Array, length overridden with obj with valueOf)",
+ "test": "assertTrue((function testcase() {\n foo.prototype = new Array(1, 2, 3);\n function foo() {}\n var f = new foo();\n \n var o = { valueOf: function () { return 0;}};\n f.length = o;\n \n function cb(){}\n var a = f.filter(cb);\n \n if (Array.isArray(a) &&\n a.length === 0) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.filter))"
+ },
+ {
+ "id": "15.4.4.20-6-7",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-6-7.js",
+ "description": "Array.prototype.filter returns an empty array if 'length' is 0 (subclassed Array, length overridden with obj w/o valueOf (toString))",
+ "test": "assertTrue((function testcase() {\n foo.prototype = new Array(1, 2, 3);\n function foo() {}\n var f = new foo();\n \n var o = { toString: function () { return '0';}};\n f.length = o;\n \n // objects inherit the default valueOf method of the Object object;\n // that simply returns the itself. Since the default valueOf() method\n // does not return a primitive value, ES next tries to convert the object\n // to a number by calling its toString() method and converting the\n // resulting string to a number.\n\n function cb(){}\n var a = f.filter(cb);\n \n if (Array.isArray(a) &&\n a.length === 0) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.filter))"
+ },
+ {
+ "id": "15.4.4.20-6-8",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-6-8.js",
+ "description": "Array.prototype.filter returns an empty array if 'length' is 0 (subclassed Array, length overridden with []",
+ "test": "assertTrue((function testcase() {\n foo.prototype = new Array(1, 2, 3);\n function foo() {}\n var f = new foo();\n \n f.length = [];\n \n // objects inherit the default valueOf method of the Object object;\n // that simply returns the itself. Since the default valueOf() method\n // does not return a primitive value, ES next tries to convert the object\n // to a number by calling its toString() method and converting the\n // resulting string to a number.\n //\n // The toString( ) method on Array converts the array elements to strings,\n // then returns the result of concatenating these strings, with commas in\n // between. An array with no elements converts to the empty string, which\n // converts to the number 0. If an array has a single element that is a\n // number n, the array converts to a string representation of n, which is\n // then converted back to n itself. If an array contains more than one element,\n // or if its one element is not a number, the array converts to NaN.\n\n function cb(){}\n var a = f.filter(cb);\n \n if (Array.isArray(a) &&\n a.length === 0) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.filter))"
+ },
+ {
+ "id": "15.4.4.20-9-1",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-1.js",
+ "description": "Array.prototype.filter doesn't consider new elements added to array after it is called",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(val, idx, obj) {\n srcArr[2] = 3;\n srcArr[5] = 6;\n return true;\n }\n\n var srcArr = [1, 2, , 4, 5];\n var resArr = srcArr.filter(callbackfn);\n return resArr.length === 5;\n\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.filter))"
+ },
+ {
+ "id": "15.4.4.20-9-2",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-2.js",
+ "description": "Array.prototype.filter considers new value of elements in array after it is called",
+ "test": "assertTrue((function testcase() { \n \n function callbackfn(val, idx, obj)\n { \n srcArr[2] = -1;\n srcArr[4] = -1;\n if(val > 0)\n return true;\n else\n return false;\n }\n\n var srcArr = [1,2,3,4,5];\n var resArr = srcArr.filter(callbackfn);\n if(resArr.length === 3 && resArr[0] === 1 && resArr[2] === 4)\n return true; \n \n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.filter))"
+ },
+ {
+ "id": "15.4.4.20-9-3",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-3.js",
+ "description": "Array.prototype.filter doesn't visit deleted elements in array after the call",
+ "test": "assertTrue((function testcase() { \n \n function callbackfn(val, idx, obj)\n {\n delete srcArr[2];\n delete srcArr[4];\n if(val > 0)\n return true;\n else\n return false;\n }\n\n var srcArr = [1,2,3,4,5];\n var resArr = srcArr.filter(callbackfn);\n if(resArr.length === 3 && resArr[0] === 1 && resArr[2] === 4 ) // two elements deleted\n return true; \n \n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.filter))"
+ },
+ {
+ "id": "15.4.4.20-9-4",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-4.js",
+ "description": "Array.prototype.filter doesn't visit deleted elements when Array.length is decreased",
+ "test": "assertTrue((function testcase() { \n \n function callbackfn(val, idx, obj)\n {\n srcArr.length = 2;\n return true;\n }\n\n var srcArr = [1,2,3,4,6];\n var resArr = srcArr.filter(callbackfn);\n if(resArr.length === 2 )\n return true; \n \n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.filter))"
+ },
+ {
+ "id": "15.4.4.20-9-5",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-5.js",
+ "description": "Array.prototype.filter doesn't consider newly added elements in sparse array",
+ "test": "assertTrue((function testcase() { \n \n function callbackfn(val, idx, obj)\n {\n srcArr[1000] = 3;\n return true;\n }\n\n var srcArr = new Array(10);\n srcArr[1] = 1;\n srcArr[2] = 2;\n var resArr = srcArr.filter(callbackfn);\n if( resArr.length === 2) \n return true; \n \n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.filter))"
+ },
+ {
+ "id": "15.4.4.20-9-6",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-6.js",
+ "description": "Array.prototype.filter visits deleted element in array after the call when same index is also present in prototype",
+ "test": "assertTrue((function testcase() { \n \n function callbackfn(val, idx, obj)\n {\n delete srcArr[2];\n delete srcArr[4];\n if(val > 0)\n return true;\n else\n return false;\n }\n\n Array.prototype[4] = 5;\n var srcArr = [1,2,3,4,5];\n var resArr = srcArr.filter(callbackfn);\n delete Array.prototype[4];\n if(resArr.length === 4 && resArr[0] === 1 && resArr[3] == 5) // only one element deleted\n return true; \n \n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.filter))"
+ },
+ {
+ "id": "15.4.4.20-9-7",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-7.js",
+ "description": "Array.prototype.filter stops calling callbackfn once the array is deleted during the call",
+ "test": "assertTrue((function testcase() {\n var o = new Object();\n o.srcArr = [1, 2, 3, 4, 5];\n\n function callbackfn(val, idx, obj) {\n delete o.srcArr;\n if (val > 0)\n return true;\n else\n return false;\n }\n\n var resArr = o.srcArr.filter(callbackfn);\n return resArr.length === 5 && typeof o.srcArr === \"undefined\";\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.filter))"
+ },
+ {
+ "id": "15.4.4.20-9-8",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-8.js",
+ "description": "Array.prototype.filter - no observable effects occur if len is 0",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n\n function callbackfn(val, idx, obj) {\n accessed = true;\n return val > 10;\n }\n\n var obj = { 0: 11, 1: 12, length: 0 };\n\n var newArr = Array.prototype.filter.call(obj, callbackfn);\n\n return accessed === false && obj.length === 0 && newArr.length === 0;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.filter))"
+ },
+ {
+ "id": "15.4.4.20-9-9",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-9.js",
+ "description": "Array.prototype.filter - modifications to length don't change number of iterations",
+ "test": "assertTrue((function testcase() {\n\n var called = 0;\n\n function callbackfn(val, idx, obj) {\n called++;\n return true;\n }\n\n var obj = { 1: 12, 2: 9, length: 2 };\n\n Object.defineProperty(obj, \"0\", {\n get: function () {\n obj.length = 3;\n return 11;\n },\n configurable: true\n });\n\n var newArr = Array.prototype.filter.call(obj, callbackfn);\n\n return newArr.length === 2 && 2 === called;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.filter) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects())"
+ },
+ {
+ "id": "15.4.4.20-9-b-1",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-b-1.js",
+ "description": "Array.prototype.filter - callbackfn not called for indexes never been assigned values",
+ "test": "assertTrue((function testcase() { \n \n var callCnt = 0;\n function callbackfn(val, idx, obj)\n {\n callCnt++;\n return false;\n }\n\n var srcArr = new Array(10);\n srcArr[1] = undefined; //explicitly assigning a value\n var resArr = srcArr.filter(callbackfn);\n if( resArr.length === 0 && callCnt === 1)\n return true; \n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.filter))"
+ },
+ {
+ "id": "15.4.4.20-9-b-10",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-b-10.js",
+ "description": "Array.prototype.filter - deleting property of prototype causes prototype index property not to be visited on an Array-like Object",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(val, idx, obj) {\n return true;\n }\n var obj = { 2: 2, length: 20 };\n\n Object.defineProperty(obj, \"0\", {\n get: function () {\n delete Object.prototype[1];\n return 0;\n },\n configurable: true\n });\n\n try {\n Object.prototype[1] = 1;\n var newArr = Array.prototype.filter.call(obj, callbackfn);\n\n return newArr.length === 2 && newArr[1] !== 1;\n } finally {\n delete Object.prototype[1];\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.filter) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects())"
+ },
+ {
+ "id": "15.4.4.20-9-b-11",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-b-11.js",
+ "description": "Array.prototype.filter - deleting property of prototype causes prototype index property not to be visited on an Array",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(val, idx, obj) {\n return true;\n }\n var arr = [0, , 2];\n\n Object.defineProperty(arr, \"0\", {\n get: function () {\n delete Array.prototype[1];\n return 0;\n },\n configurable: true\n });\n\n try {\n Array.prototype[1] = 1;\n var newArr = arr.filter(callbackfn);\n return newArr.length === 2 && newArr[1] !== 1;\n } finally {\n delete Array.prototype[1];\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.filter) && fnExists(Object.defineProperty) && ![, 1].hasOwnProperty(0) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.4.4.20-9-b-12",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-b-12.js",
+ "description": "Array.prototype.filter - deleting own property with prototype property causes prototype index property to be visited on an Array-like object",
+ "test": "assertTrue((function testcase() {\n function callbackfn(val, idx, obj) {\n return true;\n }\n var obj = { 0: 0, 1: 111, 2: 2, length: 10 };\n\n Object.defineProperty(obj, \"0\", {\n get: function () {\n delete obj[1];\n return 0;\n },\n configurable: true\n });\n\n try {\n Object.prototype[1] = 1;\n var newArr = Array.prototype.filter.call(obj, callbackfn);\n\n return newArr.length === 3 && newArr[1] === 1;\n } finally {\n delete Object.prototype[1];\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.filter) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects())"
+ },
+ {
+ "id": "15.4.4.20-9-b-13",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-b-13.js",
+ "description": "Array.prototype.filter - deleting own property with prototype property causes prototype index property to be visited on an Array",
+ "test": "assertTrue((function testcase() {\n function callbackfn(val, idx, obj) {\n return val < 3 ? true : false;\n }\n var arr = [0, 111, 2];\n\n Object.defineProperty(arr, \"0\", {\n get: function () {\n delete arr[1];\n return 0;\n },\n configurable: true\n });\n\n try {\n Array.prototype[1] = 1;\n var newArr = arr.filter(callbackfn);\n\n return newArr.length === 3 && newArr[1] === 1;\n } finally {\n delete Array.prototype[1];\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.filter) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.4.4.20-9-b-14",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-b-14.js",
+ "description": "Array.prototype.filter - decreasing length of array causes index property not to be visited",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(val, idx, obj) {\n return true;\n }\n var arr = [0, 1, 2, \"last\"];\n\n Object.defineProperty(arr, \"0\", {\n get: function () {\n arr.length = 3;\n return 0;\n },\n configurable: true\n });\n\n var newArr = arr.filter(callbackfn);\n\n\n return newArr.length === 3 && newArr[2] === 2;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.filter) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.4.4.20-9-b-15",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-b-15.js",
+ "description": "Array.prototype.filter - decreasing length of array with prototype property causes prototype index property to be visited",
+ "test": "assertTrue((function testcase() {\n function callbackfn(val, idx, obj) {\n return true;\n }\n var arr = [0, 1, 2];\n\n try {\n Object.defineProperty(Array.prototype, \"2\", {\n get: function () {\n return \"prototype\";\n },\n configurable: true\n });\n\n Object.defineProperty(arr, \"1\", {\n get: function () {\n arr.length = 2;\n return 1;\n },\n configurable: true\n });\n\n var newArr = arr.filter(callbackfn);\n\n return newArr.length === 3 && newArr[2] === \"prototype\";\n } finally {\n delete Array.prototype[2];\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.filter) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.4.4.20-9-b-16",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-b-16.js",
+ "description": "Array.prototype.filter - decreasing length of array does not delete non-configurable properties",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(val, idx, obj) {\n return true;\n }\n\n var arr = [0, 1, 2];\n\n Object.defineProperty(arr, \"2\", {\n get: function () {\n return \"unconfigurable\";\n },\n configurable: false\n });\n\n Object.defineProperty(arr, \"1\", {\n get: function () {\n arr.length = 2;\n return 1;\n },\n configurable: true\n });\n\n var newArr = arr.filter(callbackfn);\n\n return newArr.length === 3 && newArr[2] === \"unconfigurable\";\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.filter) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.4.4.20-9-b-2",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-b-2.js",
+ "description": "Array.prototype.filter - added properties in step 2 are visible here",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(val, idx, obj) {\n return true;\n }\n\n var obj = {};\n\n Object.defineProperty(obj, \"length\", {\n get: function () {\n obj[2] = \"length\";\n return 3;\n },\n configurable: true\n });\n\n var newArr = Array.prototype.filter.call(obj, callbackfn);\n\n return newArr.length === 1 && newArr[0] === \"length\";\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.filter) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.4.4.20-9-b-3",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-b-3.js",
+ "description": "Array.prototype.filter - deleted properties in step 2 are visible here",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(val, idx, obj) {\n return true;\n }\n var obj = { 2: 6.99, 8: 19 };\n\n Object.defineProperty(obj, \"length\", {\n get: function () {\n delete obj[2];\n return 10;\n },\n configurable: true\n });\n\n var newArr = Array.prototype.filter.call(obj, callbackfn);\n\n return newArr.length === 1 && newArr[0] !== 6.99;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.filter) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.4.4.20-9-b-4",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-b-4.js",
+ "description": "Array.prototype.filter - properties added into own object after current position are visited on an Array-like object",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(val, idx, obj) {\n return true;\n }\n\n var obj = { length: 2 };\n\n Object.defineProperty(obj, \"0\", {\n get: function () {\n Object.defineProperty(obj, \"1\", {\n get: function () {\n return 6.99;\n },\n configurable: true\n });\n return 0;\n },\n configurable: true\n });\n\n var newArr = Array.prototype.filter.call(obj, callbackfn);\n\n return newArr.length === 2 && newArr[1] === 6.99;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.filter) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects())"
+ },
+ {
+ "id": "15.4.4.20-9-b-5",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-b-5.js",
+ "description": "Array.prototype.filter - properties added into own object after current position are visited on an Array",
+ "test": "assertTrue((function testcase() {\n function callbackfn(val, idx, obj) {\n return true;\n }\n\n var arr = [0, , 2];\n\n Object.defineProperty(arr, \"0\", {\n get: function () {\n Object.defineProperty(arr, \"1\", {\n get: function () {\n return 6.99;\n },\n configurable: true\n });\n return 0;\n },\n configurable: true\n });\n\n var newArr = arr.filter(callbackfn);\n\n return newArr.length === 3 && newArr[1] === 6.99;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.filter) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.4.4.20-9-b-6",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-b-6.js",
+ "description": "Array.prototype.filter - properties can be added to prototype after current position are visited on an Array-like object",
+ "test": "assertTrue((function testcase() {\n function callbackfn(val, idx, obj) {\n return true;\n }\n var obj = { length: 2 };\n\n try {\n Object.defineProperty(obj, \"0\", {\n get: function () {\n Object.defineProperty(Object.prototype, \"1\", {\n get: function () {\n return 6.99;\n },\n configurable: true\n });\n return 0;\n },\n configurable: true\n });\n\n var newArr = Array.prototype.filter.call(obj, callbackfn);\n\n return newArr.length === 2 && Array[1] === 6.99;\n } finally {\n delete Object.prototype[1];\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.filter) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects())"
+ },
+ {
+ "id": "15.4.4.20-9-b-7",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-b-7.js",
+ "description": "Array.prototype.filter - properties can be added to prototype after current position are visited on an Array",
+ "test": "assertTrue((function testcase() {\n function callbackfn(val, idx, obj) {\n return true;\n }\n var arr = [0, , 2];\n\n try {\n Object.defineProperty(arr, \"0\", {\n get: function () {\n Object.defineProperty(Array.prototype, \"1\", {\n get: function () {\n return 6.99;\n },\n configurable: true\n });\n return 0;\n },\n configurable: true\n });\n\n var newArr = arr.filter(callbackfn);\n\n return newArr.length === 3 && newArr[1] === 6.99;\n } finally {\n delete Array.prototype[1];\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.filter) && fnExists(Object.defineProperty) && ![, 1].hasOwnProperty(0) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.4.4.20-9-b-8",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-b-8.js",
+ "description": "Array.prototype.filter - deleting own property causes index property not to be visited on an Array-like object",
+ "test": "assertTrue((function testcase() {\n var accessed = false;\n var obj = { length: 2 };\n\n function callbackfn(val, idx, o) {\n accessed = true;\n return true;\n }\n\n Object.defineProperty(obj, \"1\", {\n get: function () {\n return 6.99;\n },\n configurable: true\n });\n\n Object.defineProperty(obj, \"0\", {\n get: function () {\n delete obj[1];\n return 0;\n },\n configurable: true\n });\n\n var newArr = Array.prototype.filter.call(obj, callbackfn);\n\n return newArr.length === 1 && newArr[0] === 0;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.filter) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects())"
+ },
+ {
+ "id": "15.4.4.20-9-b-9",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-b-9.js",
+ "description": "Array.prototype.filter - deleting own property causes index property not to be visited on an Array",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(val, idx, obj) {\n return true;\n }\n var arr = [1, 2];\n\n Object.defineProperty(arr, \"1\", {\n get: function () {\n return \"6.99\";\n },\n configurable: true\n });\n\n Object.defineProperty(arr, \"0\", {\n get: function () {\n delete arr[1];\n return 0;\n },\n configurable: true\n });\n\n var newArr = arr.filter(callbackfn);\n\n return newArr.length === 1 && newArr[0] === 0;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.filter) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.4.4.20-9-c-i-1",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-1.js",
+ "description": "Array.prototype.filter - element to be retrieved is own data property on an Array-like object",
+ "test": "assertTrue((function testcase() {\n\n var kValue = {};\n function callbackfn(val, idx, obj) {\n return (idx === 5) && (val === kValue);\n }\n\n var obj = { 5: kValue, length: 100 };\n\n var newArr = Array.prototype.filter.call(obj, callbackfn);\n\n return newArr.length === 1 && newArr[0] === kValue;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.filter))"
+ },
+ {
+ "id": "15.4.4.20-9-c-i-10",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-10.js",
+ "description": "Array.prototype.filter - element to be retrieved is own accessor property on an Array",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(val, idx, obj) {\n return idx === 2 && val === 12;\n }\n\n var arr = [];\n\n Object.defineProperty(arr, \"2\", {\n get: function () {\n return 12;\n },\n configurable: true\n });\n var newArr = arr.filter(callbackfn);\n\n return newArr.length === 1 && newArr[0] === 12;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.filter) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.4.4.20-9-c-i-11",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-11.js",
+ "description": "Array.prototype.filter - element to be retrieved is own accessor property that overrides an inherited data property on an Array-like object",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(val, idx, obj) {\n return idx === 0 && val === 11;\n }\n\n var proto = { 0: 5, 1: 6 };\n\n var Con = function () { };\n Con.prototype = proto;\n\n var child = new Con();\n child.length = 10;\n\n Object.defineProperty(child, \"0\", {\n get: function () {\n return 11;\n },\n configurable: true\n });\n var newArr = Array.prototype.filter.call(child, callbackfn);\n\n return newArr.length === 1 && newArr[0] === 11;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.filter) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects())"
+ },
+ {
+ "id": "15.4.4.20-9-c-i-12",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-12.js",
+ "description": " Array.prototype.filter - element to be retrieved is own accessor property that overrides an inherited data property on an Array",
+ "test": "assertTrue((function testcase() {\n function callbackfn(val, idx, obj) {\n return val === 111 && idx === 0;\n }\n\n var arr = [];\n try {\n Array.prototype[0] = 10;\n\n Object.defineProperty(arr, \"0\", {\n get: function () {\n return 111;\n },\n configurable: true\n });\n var newArr = arr.filter(callbackfn);\n\n return newArr.length === 1 && newArr[0] === 111;\n } finally {\n delete Array.prototype[0];\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.filter) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.4.4.20-9-c-i-13",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-13.js",
+ "description": "Array.prototype.filter - element to be retrieved is own accessor property that overrides an inherited accessor property on an Array-like object",
+ "test": "assertTrue((function testcase() {\n function callbackfn(val, idx, obj) {\n return idx === 1 && val === 12;\n }\n\n var proto = {};\n\n Object.defineProperty(proto, \"1\", {\n get: function () {\n return 6;\n },\n configurable: true\n });\n\n var Con = function () { };\n Con.prototype = proto;\n\n var child = new Con();\n child.length = 10;\n\n Object.defineProperty(child, \"1\", {\n get: function () {\n return 12;\n },\n configurable: true\n });\n var newArr = Array.prototype.filter.call(child, callbackfn);\n\n return newArr.length === 1 && newArr[0] === 12;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.filter) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects())"
+ },
+ {
+ "id": "15.4.4.20-9-c-i-14",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-14.js",
+ "description": " Array.prototype.filter - element to be retrieved is own accessor property that overrides an inherited accessor property on an Array",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(val, idx, obj) {\n return idx === 0 && val === 11;\n }\n\n var arr = [];\n try {\n Object.defineProperty(Array.prototype, \"0\", {\n get: function () {\n return 5;\n },\n configurable: true\n });\n\n Object.defineProperty(arr, \"0\", {\n get: function () {\n return 11;\n },\n configurable: true\n });\n var newArr = arr.filter(callbackfn);\n\n return newArr.length === 1 && newArr[0] === 11;\n } finally {\n delete Array.prototype[0];\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.filter) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.4.4.20-9-c-i-15",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-15.js",
+ "description": "Array.prototype.filter - element to be retrieved is inherited accessor property on an Array-like object",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(val, idx, obj) {\n return val === 11 && idx === 1;\n }\n\n var proto = {};\n\n Object.defineProperty(proto, \"1\", {\n get: function () {\n return 11;\n },\n configurable: true\n });\n\n var Con = function () { };\n Con.prototype = proto;\n\n var child = new Con();\n child.length = 20;\n var newArr = Array.prototype.filter.call(child, callbackfn);\n\n return newArr.length === 1 && newArr[0] === 11;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.filter) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects())"
+ },
+ {
+ "id": "15.4.4.20-9-c-i-16",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-16.js",
+ "description": "Array.prototype.filter - element to be retrieved is inherited accessor property on an Array",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(val, idx, obj) {\n return idx === 0 && val === 11;\n }\n\n try {\n Object.defineProperty(Array.prototype, \"0\", {\n get: function () {\n return 11;\n },\n configurable: true\n });\n var newArr = [, , , ].filter(callbackfn);\n\n return newArr.length === 1 && newArr[0] === 11;\n } finally {\n delete Array.prototype[0];\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.filter) && fnExists(Object.defineProperty) && ![, 1].hasOwnProperty(0) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.4.4.20-9-c-i-17",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-17.js",
+ "description": "Array.prototype.filter - element to be retrieved is own accessor property without a get function on an Array-like object",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(val, idx, obj) {\n return undefined === val && idx === 1;\n }\n\n var obj = { length: 2 };\n Object.defineProperty(obj, \"1\", {\n set: function () { },\n configurable: true\n });\n\n var newArr = Array.prototype.filter.call(obj, callbackfn);\n\n return newArr.length === 1 && newArr[0] === undefined;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.filter) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects())"
+ },
+ {
+ "id": "15.4.4.20-9-c-i-18",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-18.js",
+ "description": "Array.prototype.filter - element to be retrieved is own accessor property without a get function on an Array",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(val, idx, obj) {\n return undefined === val && idx === 0;\n }\n\n var arr = [];\n\n Object.defineProperty(arr, \"0\", {\n set: function () { },\n configurable: true\n });\n\n var newArr = arr.filter(callbackfn);\n\n return newArr.length === 1 && newArr[0] === undefined;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.filter) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.4.4.20-9-c-i-19",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-19.js",
+ "description": "Array.prototype.filter - element to be retrieved is own accessor property without a get function that overrides an inherited accessor property on an Array-like object",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(val, idx, obj) {\n return undefined === val && idx === 1;\n }\n\n var obj = { length: 2 };\n Object.defineProperty(obj, \"1\", {\n set: function () { },\n configurable: true\n });\n try {\n Object.prototype[1] = 10;\n var newArr = Array.prototype.filter.call(obj, callbackfn);\n\n return newArr.length === 1 && newArr[0] === undefined;\n } finally {\n delete Object.prototype[1];\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.filter) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects())"
+ },
+ {
+ "id": "15.4.4.20-9-c-i-2",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-2.js",
+ "description": "Array.prototype.filter - element to be retrieved is own data property on an Array",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(val, idx, obj) {\n if (idx === 0) {\n return val === 11;\n }\n }\n\n var newArr = [11].filter(callbackfn);\n\n return newArr.length === 1 && newArr[0] === 11;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.filter))"
+ },
+ {
+ "id": "15.4.4.20-9-c-i-20",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-20.js",
+ "description": "Array.prototype.filter - element to be retrieved is own accessor property without a get function that overrides an inherited accessor property on an Array",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(val, idx, obj) {\n return undefined === val && idx === 0;\n }\n\n var arr = [];\n\n Object.defineProperty(arr, \"0\", {\n set: function () { },\n configurable: true\n });\n\n try {\n Array.prototype[0] = 100;\n var newArr = arr.filter(callbackfn);\n\n return newArr.length === 1 && newArr[0] === undefined;\n } finally {\n delete Array.prototype[0];\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.filter) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.4.4.20-9-c-i-21",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-21.js",
+ "description": "Array.prototype.filter - element to be retrieved is inherited accessor property without a get function on an Array-like object",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(val, idx, obj) {\n return val === undefined && idx === 1;\n }\n\n var proto = {};\n Object.defineProperty(proto, \"1\", {\n set: function () { },\n configurable: true\n });\n\n var Con = function () { };\n Con.prototype = proto;\n\n var child = new Con();\n child.length = 2;\n var newArr = Array.prototype.filter.call(child, callbackfn);\n\n return newArr.length === 1 && newArr[0] === undefined;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.filter) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects())"
+ },
+ {
+ "id": "15.4.4.20-9-c-i-22",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-22.js",
+ "description": "Array.prototype.filter - element to be retrieved is inherited accessor property without a get function on an Array",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(val, idx, obj) {\n return undefined === val && idx === 0;\n }\n\n try {\n Object.defineProperty(Array.prototype, \"0\", {\n set: function () { },\n configurable: true\n });\n var newArr = [, ].filter(callbackfn);\n\n return newArr.length === 1 && newArr[0] === undefined;\n } finally {\n delete Array.prototype[0];\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.filter) && fnExists(Object.defineProperty) && ![, 1].hasOwnProperty(0) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.4.4.20-9-c-i-23",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-23.js",
+ "description": "Array.prototype.filter - This object is the global object which contains index property",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(val, idx, obj) {\n return idx === 0 && val === 11;\n }\n\n try {\n var oldLen = fnGlobalObject().length;\n fnGlobalObject()[0] = 11;\n fnGlobalObject().length = 1;\n var newArr = Array.prototype.filter.call(fnGlobalObject(), callbackfn);\n return newArr.length === 1 && newArr[0] === 11;\n } finally {\n delete fnGlobalObject()[0];\n fnGlobalObject().length = oldLen;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.filter))"
+ },
+ {
+ "id": "15.4.4.20-9-c-i-25",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-25.js",
+ "description": "Array.prototype.filter - This object is the Arguments object which implements its own property get method (number of arguments is less than number of parameters)",
+ "test": "assertTrue((function testcase() {\n function callbackfn(val, idx, obj) {\n return val === 11 && idx === 0;\n }\n\n var func = function (a, b) {\n return Array.prototype.filter.call(arguments, callbackfn);\n };\n\n var newArr = func(11);\n\n return newArr.length === 1 && newArr[0] === 11;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.filter))"
+ },
+ {
+ "id": "15.4.4.20-9-c-i-26",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-26.js",
+ "description": "Array.prototype.filter - This object is the Arguments object which implements its own property get method (number of arguments equals number of parameters)",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(val, idx, obj) {\n if (idx === 0) {\n return val === 11;\n } else if (idx === 1) {\n return val === 9;\n } else {\n return false;\n }\n }\n\n var func = function (a, b) {\n return Array.prototype.filter.call(arguments, callbackfn);\n };\n var newArr = func(11, 9);\n\n return newArr.length === 2 && newArr[0] === 11 &&\n newArr[1] === 9;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.filter))"
+ },
+ {
+ "id": "15.4.4.20-9-c-i-27",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-27.js",
+ "description": "Array.prototype.filter - This object is the Arguments object which implements its own property get method (number of arguments is greater than number of parameters)",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(val, idx, obj) {\n if (idx === 0) {\n return val === 11;\n } else if (idx === 1) {\n return val === 12;\n } else if (idx === 2) {\n return val === 9;\n } else {\n return false;\n }\n }\n\n var func = function (a, b) {\n return Array.prototype.filter.call(arguments, callbackfn);\n };\n var newArr = func(11, 12, 9);\n\n return newArr.length === 3 && newArr[0] === 11 &&\n newArr[1] === 12 && newArr[2] === 9;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.filter))"
+ },
+ {
+ "id": "15.4.4.20-9-c-i-28",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-28.js",
+ "description": "Array.prototype.filter - element changed by getter on previous iterations is observed on an Array",
+ "test": "assertTrue((function testcase() {\n\n var preIterVisible = false;\n var arr = [];\n\n function callbackfn(val, idx, obj) {\n return idx === 1 && val === 9;\n }\n\n Object.defineProperty(arr, \"0\", {\n get: function () {\n preIterVisible = true;\n return 11;\n },\n configurable: true\n });\n\n Object.defineProperty(arr, \"1\", {\n get: function () {\n if (preIterVisible) {\n return 9;\n } else {\n return 11;\n }\n },\n configurable: true\n });\n var newArr = arr.filter(callbackfn);\n\n return newArr.length === 1 && newArr[0] === 9;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.filter) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.4.4.20-9-c-i-29",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-29.js",
+ "description": "Array.prototype.filter - element changed by getter on previous iterations is observed on an Array-like object",
+ "test": "assertTrue((function testcase() {\n function callbackfn(val, idx, obj) {\n return val === 9 && idx === 1;\n }\n\n var preIterVisible = false;\n var obj = { length: 2 };\n\n Object.defineProperty(obj, \"0\", {\n get: function () {\n preIterVisible = true;\n return 11;\n },\n configurable: true\n });\n\n Object.defineProperty(obj, \"1\", {\n get: function () {\n if (preIterVisible) {\n return 9;\n } else {\n return 13;\n }\n },\n configurable: true\n });\n var newArr = Array.prototype.filter.call(obj, callbackfn);\n\n return newArr.length === 1 && newArr[0] === 9;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.filter) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects())"
+ },
+ {
+ "id": "15.4.4.20-9-c-i-3",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-3.js",
+ "description": "Array.prototype.filter - element to be retrieved is own data property that overrides an inherited data property on an Array-like object",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(val, idx, obj) {\n return (idx === 5) && (val === \"abc\");\n }\n\n var proto = { 0: 11, 5: 100 };\n\n var Con = function () { };\n Con.prototype = proto;\n\n var child = new Con();\n child[5] = \"abc\";\n child.length = 10;\n\n var newArr = Array.prototype.filter.call(child, callbackfn);\n\n return newArr.length === 1 && newArr[0] === \"abc\";\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.filter))"
+ },
+ {
+ "id": "15.4.4.20-9-c-i-30",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-30.js",
+ "description": "Array.prototype.filter - unnhandled exceptions happened in getter terminate iteration on an Array-like object",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n function callbackfn(val, idx, obj) {\n if (idx > 1) {\n accessed = true;\n }\n return true;\n }\n\n var obj = { 0: 11, 5: 10, 10: 8, length: 20 };\n Object.defineProperty(obj, \"1\", {\n get: function () {\n throw new RangeError(\"unhandle exception happened in getter\");\n },\n configurable: true\n });\n\n try {\n Array.prototype.filter.call(obj, callbackfn);\n return false;\n } catch (ex) {\n return (ex instanceof RangeError) && !accessed;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.filter) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects())"
+ },
+ {
+ "id": "15.4.4.20-9-c-i-31",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-31.js",
+ "description": "Array.prototype.filter - unnhandled exceptions happened in getter terminate iteration on an Array",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n function callbackfn(val, idx, obj) {\n if (idx > 1) {\n accessed = true;\n }\n return true;\n }\n\n var arr = [];\n arr[5] = 10;\n arr[10] = 100;\n\n Object.defineProperty(arr, \"1\", {\n get: function () {\n throw new RangeError(\"unhandle exception happened in getter\");\n },\n configurable: true\n });\n\n try {\n arr.filter(callbackfn);\n return false;\n } catch (ex) {\n return (ex instanceof RangeError) && !accessed;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.filter) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.4.4.20-9-c-i-4",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-4.js",
+ "description": "Array.prototype.filter - element to be retrieved is own data property that overrides an inherited data property on an Array",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(val, idx, obj) {\n return (idx === 0) && (val === 12);\n }\n\n try {\n Array.prototype[0] = 11;\n var newArr = [12].filter(callbackfn);\n\n return newArr.length === 1 && newArr[0] === 12;\n } finally {\n delete Array.prototype[0];\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.filter))"
+ },
+ {
+ "id": "15.4.4.20-9-c-i-5",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-5.js",
+ "description": "Array.prototype.filter - element to be retrieved is own data property that overrides an inherited accessor property on an Array-like object",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(val, idx, obj) {\n return idx === 0 && val === 11;\n }\n\n var proto = {};\n\n Object.defineProperty(proto, \"0\", {\n get: function () {\n return 5;\n },\n configurable: true\n });\n\n var Con = function () { };\n Con.prototype = proto;\n\n var child = new Con();\n child.length = 2;\n Object.defineProperty(child, \"0\", {\n value: 11,\n configurable: true\n });\n child[1] = 12;\n\n var newArr = Array.prototype.filter.call(child, callbackfn);\n\n return newArr.length === 1 && newArr[0] === 11;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.filter) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects())"
+ },
+ {
+ "id": "15.4.4.20-9-c-i-6",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-6.js",
+ "description": "Array.prototype.filter - element to be retrieved is own data property that overrides an inherited accessor property on an Array",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(val, idx, obj) {\n return val === 11;\n }\n\n try {\n Object.defineProperty(Array.prototype, \"0\", {\n get: function () {\n return 9;\n },\n configurable: true\n });\n var newArr = [11].filter(callbackfn);\n\n return newArr.length === 1 && newArr[0] === 11;\n } finally {\n delete Array.prototype[0];\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.filter) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.4.4.20-9-c-i-7",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-7.js",
+ "description": "Array.prototype.filter - element to be retrieved is inherited data property on an Array-like object",
+ "test": "assertTrue((function testcase() {\n\n var kValue = 'abc';\n\n function callbackfn(val, idx, obj) {\n return (idx === 5) && (val === kValue);\n }\n\n var proto = { 5: kValue };\n\n var Con = function () { };\n Con.prototype = proto;\n\n var child = new Con();\n child.length = 10;\n\n var newArr = Array.prototype.filter.call(child, callbackfn);\n\n return newArr.length === 1 && newArr[0] === kValue;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.filter))"
+ },
+ {
+ "id": "15.4.4.20-9-c-i-8",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-8.js",
+ "description": "Array.prototype.filter - element to be retrieved is inherited data property on an Array",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(val, idx, obj) {\n return (idx === 1) && (val === 13);\n }\n\n try {\n Array.prototype[1] = 13;\n var newArr = [, , , ].filter(callbackfn);\n\n return newArr.length === 1 && newArr[0] === 13;\n } finally {\n delete Array.prototype[1];\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.filter) && ![, 1].hasOwnProperty(0))"
+ },
+ {
+ "id": "15.4.4.20-9-c-i-9",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-i-9.js",
+ "description": "Array.prototype.filter - element to be retrieved is own accessor property on an Array-like object",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(val, idx, obj) {\n return (idx === 0) && (val === 11);\n }\n\n var obj = { 10: 10, length: 20 };\n\n Object.defineProperty(obj, \"0\", {\n get: function () {\n return 11;\n },\n configurable: true\n });\n\n var newArr = Array.prototype.filter.call(obj, callbackfn);\n return newArr.length === 1 && newArr[0] === 11;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.filter) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects())"
+ },
+ {
+ "id": "15.4.4.20-9-c-ii-1",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-ii-1.js",
+ "description": "Array.prototype.filter - callbackfn called with correct parameters",
+ "test": "assertTrue((function testcase() { \n \n var bPar = true;\n var bCalled = false;\n function callbackfn(val, idx, obj)\n {\n bCalled = true;\n if(obj[idx] !== val)\n bPar = false;\n }\n\n var srcArr = [0,1,true,null,new Object(),\"five\"];\n srcArr[999999] = -6.6;\n var resArr = srcArr.filter(callbackfn);\n \n if(bCalled === true && bPar === true)\n return true;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.filter))"
+ },
+ {
+ "id": "15.4.4.20-9-c-ii-10",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-ii-10.js",
+ "description": "Array.prototype.filter - callbackfn is called with 1 formal parameter",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(val) {\n return val > 10;\n }\n var newArr = [12].filter(callbackfn);\n\n return newArr.length === 1 && newArr[0] === 12;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.filter))"
+ },
+ {
+ "id": "15.4.4.20-9-c-ii-11",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-ii-11.js",
+ "description": "Array.prototype.filter - callbackfn is called with 2 formal parameter",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(val, idx) {\n return val > 10 && arguments[2][idx] === val;\n }\n var newArr = [11].filter(callbackfn);\n\n return newArr.length === 1 && newArr[0] === 11;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.filter))"
+ },
+ {
+ "id": "15.4.4.20-9-c-ii-12",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-ii-12.js",
+ "description": "Array.prototype.filter - callbackfn is called with 3 formal parameter",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(val, idx, obj) {\n return val > 10 && obj[idx] === val;\n }\n var newArr = [11].filter(callbackfn);\n\n return newArr.length === 1 && newArr[0] === 11;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.filter))"
+ },
+ {
+ "id": "15.4.4.20-9-c-ii-13",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-ii-13.js",
+ "description": "Array.prototype.filter - callbackfn that uses arguments object to get parameter value",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn() {\n return arguments[2][arguments[1]] === arguments[0];\n }\n var newArr = [11].filter(callbackfn);\n\n return newArr.length === 1 && newArr[0] === 11;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.filter))"
+ },
+ {
+ "id": "15.4.4.20-9-c-ii-16",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-ii-16.js",
+ "description": "Array.prototype.filter - 'this' of 'callbackfn' is a Boolean object when T is not an object (T is a boolean)",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(val, idx, obj) {\n return this.valueOf() === false;\n }\n\n var obj = { 0: 11, length: 2 };\n var newArr = Array.prototype.filter.call(obj, callbackfn, false);\n\n return newArr.length === 1 && newArr[0] === 11;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.filter))"
+ },
+ {
+ "id": "15.4.4.20-9-c-ii-17",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-ii-17.js",
+ "description": "Array.prototype.filter -'this' of 'callbackfn' is a Number object when T is not an object (T is a number)",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(val, idx, o) {\n return 5 === this.valueOf();\n }\n\n var obj = { 0: 11, length: 2 };\n var newArr = Array.prototype.filter.call(obj, callbackfn, 5);\n\n return newArr.length === 1 && newArr[0] === 11;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.filter))"
+ },
+ {
+ "id": "15.4.4.20-9-c-ii-18",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-ii-18.js",
+ "description": "Array.prototype.filter - 'this' of 'callbackfn' is an String object when T is not an object (T is a string)",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(val, idx, obj) {\n return 'hello' === this.valueOf();\n }\n\n var obj = { 0: 11, length: 2 };\n var newArr = Array.prototype.filter.call(obj, callbackfn, \"hello\");\n\n return newArr.length === 1 && newArr[0] === 11;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.filter))"
+ },
+ {
+ "id": "15.4.4.20-9-c-ii-19",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-ii-19.js",
+ "description": "Array.prototype.filter - non-indexed properties are not called",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n\n function callbackfn(val, idx, obj) {\n accessed = true;\n return val === 8;\n }\n\n var obj = { 0: 11, non_index_property: 8, 2: 5, length: 20 };\n var newArr = Array.prototype.filter.call(obj, callbackfn);\n\n return newArr.length === 0 && accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.filter))"
+ },
+ {
+ "id": "15.4.4.20-9-c-ii-2",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-ii-2.js",
+ "description": "Array.prototype.filter - callbackfn takes 3 arguments",
+ "test": "assertTrue((function testcase() { \n \n var parCnt = 3;\n var bCalled = false\n function callbackfn(val, idx, obj)\n { \n bCalled = true;\n if(arguments.length !== 3)\n parCnt = arguments.length; //verify if callbackfn was called with 3 parameters\n }\n\n var srcArr = [0,1,2,3,4,5,6,7,8,9];\n var resArr = srcArr.filter(callbackfn);\n if(bCalled === true && parCnt === 3)\n return true;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.filter))"
+ },
+ {
+ "id": "15.4.4.20-9-c-ii-20",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-ii-20.js",
+ "description": "Array.prototype.filter - callbackfn called with correct parameters (thisArg is correct)",
+ "test": "assertTrue((function testcase() {\n\n var thisArg = { threshold: 10 };\n\n function callbackfn(val, idx, obj) {\n return this === thisArg;\n }\n\n var obj = { 0: 11, length: 1 };\n var newArr = Array.prototype.filter.call(obj, callbackfn, thisArg);\n\n return newArr.length === 1 && newArr[0] === 11;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.filter))"
+ },
+ {
+ "id": "15.4.4.20-9-c-ii-21",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-ii-21.js",
+ "description": "Array.prototype.filter - callbackfn called with correct parameters (kValue is correct)",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(val, idx, obj) {\n if (idx === 0) {\n return val === 11;\n }\n\n if (idx === 1) {\n return val === 12;\n }\n\n return false;\n }\n\n var obj = { 0: 11, 1: 12, length: 2 };\n var newArr = Array.prototype.filter.call(obj, callbackfn);\n\n return newArr.length === 2 && newArr[0] === 11 && newArr[1] === 12;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.filter))"
+ },
+ {
+ "id": "15.4.4.20-9-c-ii-22",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-ii-22.js",
+ "description": "Array.prototype.filter - callbackfn called with correct parameters (the index k is correct)",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(val, idx, obj) {\n if (val === 11) {\n return idx === 0;\n }\n\n if (val === 12) {\n return idx === 1;\n }\n\n return false;\n }\n\n var obj = { 0: 11, 1: 12, length: 2 };\n var newArr = Array.prototype.filter.call(obj, callbackfn);\n\n return newArr.length === 2 && newArr[0] === 11 && newArr[1] === 12;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.filter))"
+ },
+ {
+ "id": "15.4.4.20-9-c-ii-23",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-ii-23.js",
+ "description": "Array.prototype.filter - callbackfn called with correct parameters (this object O is correct)",
+ "test": "assertTrue((function testcase() {\n\n var obj = { 0: 11, length: 2 };\n\n function callbackfn(val, idx, o) {\n return obj === o;\n }\n\n var newArr = Array.prototype.filter.call(obj, callbackfn);\n\n return newArr.length === 1 && newArr[0] === 11;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.filter))"
+ },
+ {
+ "id": "15.4.4.20-9-c-ii-4",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-ii-4.js",
+ "description": "Array.prototype.filter - k values are passed in ascending numeric order",
+ "test": "assertTrue((function testcase() {\n\n var arr = [0, 1, 2, 3, 4, 5];\n var lastIdx = 0;\n var called = 0;\n function callbackfn(val, idx, o) {\n called++;\n if (lastIdx !== idx) {\n return false;\n } else {\n lastIdx++;\n return true;\n }\n }\n var newArr = arr.filter(callbackfn);\n\n return newArr.length === called;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.filter))"
+ },
+ {
+ "id": "15.4.4.20-9-c-ii-5",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-ii-5.js",
+ "description": "Array.prototype.filter - k values are accessed during each iteration and not prior to starting the loop on an Array",
+ "test": "assertTrue((function testcase() {\n\n var kIndex = [];\n var called = 0;\n\n //By below way, we could verify that k would be setted as 0, 1, ..., length - 1 in order, and each value will be setted one time.\n function callbackfn(val, idx, obj) {\n called++;\n //Each position should be visited one time, which means k is accessed one time during iterations.\n if (kIndex[idx] === undefined) {\n //when current position is visited, its previous index should has been visited.\n if (idx !== 0 && kIndex[idx - 1] === undefined) {\n return true;\n }\n kIndex[idx] = 1;\n return false;\n } else {\n return true;\n }\n }\n var newArr = [11, 12, 13, 14].filter(callbackfn, undefined);\n\n return newArr.length === 0 && called === 4;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.filter))"
+ },
+ {
+ "id": "15.4.4.20-9-c-ii-6",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-ii-6.js",
+ "description": "Array.prototype.filter - arguments to callbackfn are self consistent",
+ "test": "assertTrue((function testcase() {\n\n var obj = { 0: 11, length: 1 };\n var thisArg = {};\n\n function callbackfn() {\n return this === thisArg &&\n arguments[0] === 11 &&\n arguments[1] === 0 &&\n arguments[2] === obj;\n }\n\n var newArr = Array.prototype.filter.call(obj, callbackfn, thisArg);\n\n return newArr.length === 1 && newArr[0] === 11;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.filter))"
+ },
+ {
+ "id": "15.4.4.20-9-c-ii-7",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-ii-7.js",
+ "description": "Array.prototype.filter - unhandled exceptions happened in callbackfn terminate iteration",
+ "test": "assertTrue((function testcase() {\n\n var called = 0;\n\n function callbackfn(val, idx, obj) {\n called++;\n if (called === 1) {\n throw new Error(\"Exception occurred in callbackfn\");\n }\n return true;\n }\n\n var obj = { 0: 11, 4: 10, 10: 8, length: 20 };\n\n try {\n Array.prototype.filter.call(obj, callbackfn);\n return false;\n } catch (ex) {\n return 1 === called && ex instanceof Error;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.filter))"
+ },
+ {
+ "id": "15.4.4.20-9-c-ii-8",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-ii-8.js",
+ "description": "Array.prototype.filter - element changed by callbackfn on previous iterations is observed",
+ "test": "assertTrue((function testcase() {\n\n var obj = { 0: 11, 1: 12, length: 2 };\n\n function callbackfn(val, idx, o) {\n if (idx === 0) {\n obj[idx + 1] = 8;\n }\n return val > 10;\n }\n\n var newArr = Array.prototype.filter.call(obj, callbackfn);\n\n return newArr.length === 1 && newArr[0] === 11;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.filter))"
+ },
+ {
+ "id": "15.4.4.20-9-c-ii-9",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-ii-9.js",
+ "description": "Array.prototype.filter - callbackfn is called with 0 formal parameter",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn() {\n return true;\n }\n var newArr = [11].filter(callbackfn);\n\n return newArr.length === 1 && newArr[0] === 11;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.filter))"
+ },
+ {
+ "id": "15.4.4.20-9-c-iii-1-1",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-1-1.js",
+ "description": "Array.prototype.filter - value of returned array element equals to 'kValue'",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(val, idx, obj) {\n return true;\n }\n\n var obj = { 0: 11, 1: 9, length: 2 };\n var newArr = Array.prototype.filter.call(obj, callbackfn);\n\n return newArr[0] === obj[0] && newArr[1] === obj[1];\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.filter))"
+ },
+ {
+ "id": "15.4.4.20-9-c-iii-1-2",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-1-2.js",
+ "description": "Array.prototype.filter - value of returned array element can be overwritten",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(val, idx, obj) {\n return true;\n }\n\n var obj = { 0: 11, 1: 9, length: 2 };\n var newArr = Array.prototype.filter.call(obj, callbackfn);\n\n try {\n var tempVal = newArr[1];\n newArr[1] += 1;\n return newArr[1] !== tempVal;\n } catch (ex) {\n return false;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.filter))"
+ },
+ {
+ "id": "15.4.4.20-9-c-iii-1-3",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-1-3.js",
+ "description": "Array.prototype.filter - value of returned array element can be enumerated",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(val, idx, obj) {\n return true;\n }\n\n var obj = { 0: 11, length: 2 };\n var newArr = Array.prototype.filter.call(obj, callbackfn);\n\n var prop;\n var enumerable = false;\n for (prop in newArr) {\n if (newArr.hasOwnProperty(prop)) {\n if (prop === \"0\") {\n enumerable = true;\n }\n }\n }\n\n return enumerable;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.filter))"
+ },
+ {
+ "id": "15.4.4.20-9-c-iii-1-4",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-1-4.js",
+ "description": "Array.prototype.filter - value of returned array element can be changed or deleted",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(val, idx, obj) {\n return true;\n }\n\n var obj = { 0: 11, 1: 9, length: 2 };\n var newArr = Array.prototype.filter.call(obj, callbackfn);\n\n try {\n var tempVal = newArr[1];\n delete newArr[1];\n return tempVal !== undefined && newArr[1] === undefined;\n } catch (ex) {\n return false;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.filter))"
+ },
+ {
+ "id": "15.4.4.20-9-c-iii-1-5",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-1-5.js",
+ "description": "Array.prototype.filter - values of 'to' are passed in acending numeric order",
+ "test": "assertTrue((function testcase() {\n\n var arr = [0, 1, 2, 3, 4];\n var lastToIdx = 0;\n var called = 0;\n function callbackfn(val, idx, obj) {\n called++;\n if (lastToIdx !== idx) {\n return false;\n } else {\n lastToIdx++;\n return true;\n }\n }\n var newArr = arr.filter(callbackfn);\n\n return newArr.length === 5 && called === 5;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.filter))"
+ },
+ {
+ "id": "15.4.4.20-9-c-iii-1-6",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-1-6.js",
+ "description": "Array.prototype.filter - values of 'to' are accessed during each iteration when 'selected' is converted to true and not prior to starting the loop",
+ "test": "assertTrue((function testcase() {\n\n var toIndex = [];\n var called = 0;\n\n //By below way, we could verify that 'to' would be setted as 0, 1, ..., length - 1 in order, and each value will be setted one time.\n function callbackfn(val, idx, obj) {\n called++;\n //Each position should be visited one time, which means 'to' is accessed one time during iterations.\n if (toIndex[idx] === undefined) {\n //when current position is visited, its previous index should has been visited.\n if (idx !== 0 && toIndex[idx - 1] === undefined) {\n return false;\n }\n toIndex[idx] = 1;\n return true;\n } else {\n return false;\n }\n }\n var newArr = [11, 12, 13, 14].filter(callbackfn, undefined);\n\n return newArr.length === 4 && called === 4;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.filter))"
+ },
+ {
+ "id": "15.4.4.20-9-c-iii-1",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-1.js",
+ "description": "Array.prototype.filter - getOwnPropertyDescriptor(all true) of returned array element",
+ "test": "assertTrue((function testcase() {\n \n function callbackfn(val, idx, obj){\n if(val % 2)\n return true; \n else\n return false;\n }\n var srcArr = [0,1,2,3,4];\n var resArr = srcArr.filter(callbackfn);\n if (resArr.length > 0){\n var desc = Object.getOwnPropertyDescriptor(resArr, 1) \n if(desc.value === 3 && //srcArr[1] = true\n desc.writable === true &&\n desc.enumerable === true &&\n desc.configurable === true){\n return true;\n }\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.filter))"
+ },
+ {
+ "id": "15.4.4.20-9-c-iii-10",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-10.js",
+ "description": "Array.prototype.filter return value of callbackfn is a number (value is negative number)",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(val, idx, obj) {\n return -5;\n }\n\n var newArr = [11].filter(callbackfn);\n return newArr.length === 1 && newArr[0] === 11;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.filter))"
+ },
+ {
+ "id": "15.4.4.20-9-c-iii-11",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-11.js",
+ "description": "Array.prototype.filter return value of callbackfn is a number (value is Infinity)",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(val, idx, obj) {\n return Infinity;\n }\n\n var newArr = [11].filter(callbackfn);\n return newArr.length === 1 && newArr[0] === 11;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.filter))"
+ },
+ {
+ "id": "15.4.4.20-9-c-iii-12",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-12.js",
+ "description": "Array.prototype.filter return value of callbackfn is a number (value is -Infinity)",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(val, idx, obj) {\n return -Infinity;\n }\n\n var newArr = [11].filter(callbackfn);\n return newArr.length === 1 && newArr[0] === 11;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.filter))"
+ },
+ {
+ "id": "15.4.4.20-9-c-iii-13",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-13.js",
+ "description": "Array.prototype.filter return value of callbackfn is a number (value is NaN)",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n\n function callbackfn(val, idx, obj) {\n accessed = true;\n return NaN;\n }\n\n var newArr = [11].filter(callbackfn);\n return newArr.length === 0 && accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.filter))"
+ },
+ {
+ "id": "15.4.4.20-9-c-iii-14",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-14.js",
+ "description": "Array.prototype.filter return value of callbackfn is an empty string",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n\n function callbackfn(val, idx, obj) {\n accessed = true;\n return \"\";\n }\n\n var newArr = [11].filter(callbackfn);\n return newArr.length === 0 && accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.filter))"
+ },
+ {
+ "id": "15.4.4.20-9-c-iii-15",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-15.js",
+ "description": "Array.prototype.filter return value of callbackfn is a non-empty string",
+ "test": "assertTrue((function testcase() {\n \n function callbackfn(val, idx, obj) {\n return \"non-empty string\";\n }\n\n var newArr = [11].filter(callbackfn);\n return newArr.length === 1 && newArr[0] === 11;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.filter))"
+ },
+ {
+ "id": "15.4.4.20-9-c-iii-16",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-16.js",
+ "description": "Array.prototype.filter return value of callbackfn is a Function object",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(val, idx, obj) {\n return function () { };\n }\n\n var newArr = [11].filter(callbackfn);\n return newArr.length === 1 && newArr[0] === 11;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.filter))"
+ },
+ {
+ "id": "15.4.4.20-9-c-iii-17",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-17.js",
+ "description": "Array.prototype.filter return value of callbackfn is an Array object",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(val, idx, obj) {\n return new Array(10);\n }\n\n var newArr = [11].filter(callbackfn);\n return newArr.length === 1 && newArr[0] === 11;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.filter))"
+ },
+ {
+ "id": "15.4.4.20-9-c-iii-18",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-18.js",
+ "description": "Array.prototype.filter return value of callbackfn is a String object",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(val, idx, obj) {\n return new String();\n }\n\n var newArr = [11].filter(callbackfn);\n return newArr.length === 1 && newArr[0] === 11;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.filter))"
+ },
+ {
+ "id": "15.4.4.20-9-c-iii-19",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-19.js",
+ "description": "Array.prototype.filter return value of callbackfn is a Boolean object",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(val, idx, obj) {\n return new Boolean();\n }\n\n var newArr = [11].filter(callbackfn);\n return newArr.length === 1 && newArr[0] === 11;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.filter))"
+ },
+ {
+ "id": "15.4.4.20-9-c-iii-2",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-2.js",
+ "description": "Array.prototype.filter - return value of callbackfn is undefined",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n\n function callbackfn(val, idx, o) {\n accessed = true;\n return undefined;\n }\n\n var obj = { 0: 11, length: 1 };\n\n var newArr = Array.prototype.filter.call(obj, callbackfn);\n return newArr.length === 0 && accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.filter))"
+ },
+ {
+ "id": "15.4.4.20-9-c-iii-20",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-20.js",
+ "description": "Array.prototype.filter - return value of callbackfn is a Number object",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(val, idx, obj) {\n return new Number();\n }\n\n var newArr = [11].filter(callbackfn);\n return newArr.length === 1 && newArr[0] === 11;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.filter))"
+ },
+ {
+ "id": "15.4.4.20-9-c-iii-21",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-21.js",
+ "description": "Array.prototype.filter - return value of callbackfn is the Math object",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(val, idx, obj) {\n return Math;\n }\n\n var newArr = [11].filter(callbackfn);\n return newArr.length === 1 && newArr[0] === 11;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.filter))"
+ },
+ {
+ "id": "15.4.4.20-9-c-iii-22",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-22.js",
+ "description": "Array.prototype.filter - return value of callbackfn is a Date object",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(val, idx, obj) {\n return new Date();\n }\n\n var newArr = [11].filter(callbackfn);\n return newArr.length === 1 && newArr[0] === 11;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.filter))"
+ },
+ {
+ "id": "15.4.4.20-9-c-iii-23",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-23.js",
+ "description": "Array.prototype.filter - return value of callbackfn is a RegExp object",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(val, idx, obj) {\n return new RegExp();\n }\n\n var newArr = [11].filter(callbackfn);\n return newArr.length === 1 && newArr[0] === 11;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.filter))"
+ },
+ {
+ "id": "15.4.4.20-9-c-iii-24",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-24.js",
+ "description": "Array.prototype.filter - return value of callbackfn is the JSON object",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(val, idx, obj) {\n return JSON;\n }\n\n var newArr = [11].filter(callbackfn);\n return newArr.length === 1 && newArr[0] === 11;\n\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.filter))"
+ },
+ {
+ "id": "15.4.4.20-9-c-iii-25",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-25.js",
+ "description": "Array.prototype.filter - return value of callbackfn is an Error object",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(val, idx, obj) {\n return new EvalError();\n }\n\n var newArr = [11].filter(callbackfn);\n return newArr.length === 1 && newArr[0] === 11;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.filter))"
+ },
+ {
+ "id": "15.4.4.20-9-c-iii-26",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-26.js",
+ "description": "Array.prototype.filter - return value of callbackfn is the Arguments object",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(val, idx, obj) {\n return arguments;\n }\n\n var newArr = [11].filter(callbackfn);\n return newArr.length === 1 && newArr[0] === 11;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.filter))"
+ },
+ {
+ "id": "15.4.4.20-9-c-iii-28",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-28.js",
+ "description": "Array.prototype.filter - return value of callbackfn is the global object",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(val, idx, obj) {\n return fnGlobalObject();\n }\n\n var newArr = [11].filter(callbackfn);\n return newArr.length === 1 && newArr[0] === 11;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.filter))"
+ },
+ {
+ "id": "15.4.4.20-9-c-iii-29",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-29.js",
+ "description": "Array.prototype.filter - false prevents element added to output Array",
+ "test": "assertTrue((function testcase() {\n\n var called = 0;\n\n function callbackfn(val, idx, obj) {\n called++;\n return val > 10;\n }\n\n var obj = { 0: 11, 1: 8, length: 20 };\n\n var newArr = Array.prototype.filter.call(obj, callbackfn);\n return newArr.length === 1 && newArr[0] !== 8 && called === 2;\n\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.filter))"
+ },
+ {
+ "id": "15.4.4.20-9-c-iii-3",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-3.js",
+ "description": "Array.prototype.filter - return value of callbackfn is null",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n\n function callbackfn(val, idx, obj) {\n accessed = true;\n return null;\n }\n\n var obj = { 0: 11, length: 1 };\n\n var newArr = Array.prototype.filter.call(obj, callbackfn);\n return newArr.length === 0 && accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.filter))"
+ },
+ {
+ "id": "15.4.4.20-9-c-iii-30",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-30.js",
+ "description": "Array.prototype.filter - return value (new Boolean(false)) of callbackfn is treated as true value",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(val, idx, obj) {\n return new Boolean(false);\n }\n\n var newArr = [11].filter(callbackfn);\n return newArr.length === 1 && newArr[0] === 11;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.filter))"
+ },
+ {
+ "id": "15.4.4.20-9-c-iii-4",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-4.js",
+ "description": "Array.prototype.filter - return value of callbackfn is a boolean (value is false)",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n\n function callbackfn(val, idx, obj) {\n accessed = true;\n return false;\n }\n\n var obj = { 0: 11, length: 1 };\n\n var newArr = Array.prototype.filter.call(obj, callbackfn);\n return newArr.length === 0 && accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.filter))"
+ },
+ {
+ "id": "15.4.4.20-9-c-iii-5",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-5.js",
+ "description": "Array.prototype.filter - return value of callbackfn is a boolean (value is true)",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(val, idx, obj) {\n return true;\n }\n\n var obj = { 0: 11, length: 1 };\n\n var newArr = Array.prototype.filter.call(obj, callbackfn);\n return newArr.length === 1 && newArr[0] === 11;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.filter))"
+ },
+ {
+ "id": "15.4.4.20-9-c-iii-6",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-6.js",
+ "description": "Array.prototype.filter - return value of callbackfn is a number (value is 0)",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n\n function callbackfn(val, idx, obj) {\n accessed = true;\n return 0;\n }\n\n var newArr = [11].filter(callbackfn);\n return newArr.length === 0 && accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.filter))"
+ },
+ {
+ "id": "15.4.4.20-9-c-iii-7",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-7.js",
+ "description": "Array.prototype.filter - return value of callbackfn is a number (value is +0)",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n\n function callbackfn(val, idx, obj) {\n accessed = true;\n return +0;\n }\n\n var newArr = [11].filter(callbackfn);\n return newArr.length === 0 && accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.filter))"
+ },
+ {
+ "id": "15.4.4.20-9-c-iii-8",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-8.js",
+ "description": "Array.prototype.filter - return value of callbackfn is a nunmber (value is -0)",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n\n function callbackfn(val, idx, obj) {\n accessed = true;\n return -0;\n }\n\n var newArr = [11].filter(callbackfn);\n return newArr.length === 0 && accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.filter))"
+ },
+ {
+ "id": "15.4.4.20-9-c-iii-9",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.20/15.4.4.20-9-c-iii-9.js",
+ "description": "Array.prototype.filter - return value of callbackfn is a number (value is positive number)",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(val, idx, obj) {\n return 5;\n }\n\n var newArr = [11].filter(callbackfn);\n return newArr.length === 1 && newArr[0] === 11;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.filter))"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.4.4.21.json b/website/resources/scripts/testcases2/15.4.4.21.json
new file mode 100644
index 000000000..952f09270
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.4.4.21.json
@@ -0,0 +1,1821 @@
+{
+ "testCollection": {
+ "name": "15.4.4.21",
+ "numTests": 259,
+ "tests": [
+ {
+ "id": "15.4.4.21-0-1",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-0-1.js",
+ "description": "Array.prototype.reduce must exist as a function",
+ "test": "assertTrue((function testcase() {\n var f = Array.prototype.reduce;\n if (typeof(f) === \"function\") {\n return true;\n }\n }).call(this));\n"
+ },
+ {
+ "id": "15.4.4.21-0-2",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-0-2.js",
+ "description": "Array.prototype.reduce.length must be 1",
+ "test": "assertTrue((Array.prototype.reduce.length === 1));\n",
+ "precondition": "(fnExists(Array.prototype.reduce))"
+ },
+ {
+ "id": "15.4.4.21-1-1",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-1-1.js",
+ "description": "Array.prototype.reduce applied to undefined",
+ "test": "assertTrue((function testcase() {\n try {\n Array.prototype.reduce.call(undefined); \n return false;\n } catch (e) {\n return (e instanceof TypeError);\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce))"
+ },
+ {
+ "id": "15.4.4.21-1-10",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-1-10.js",
+ "description": "Array.prototype.reduce applied to the Math object",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(prevVal, curVal, idx, obj) {\n return ('[object Math]' === Object.prototype.toString.call(obj));\n }\n\n try {\n Math.length = 1;\n Math[0] = 1;\n return Array.prototype.reduce.call(Math, callbackfn, 1);\n } finally {\n delete Math[0];\n delete Math.length;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce))"
+ },
+ {
+ "id": "15.4.4.21-1-11",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-1-11.js",
+ "description": "Array.prototype.reduce applied to Date object",
+ "test": "assertTrue((function testcase() {\n function callbackfn(prevVal, curVal, idx, obj) {\n return obj instanceof Date;\n }\n\n var obj = new Date();\n obj.length = 1;\n obj[0] = 1;\n\n return Array.prototype.reduce.call(obj, callbackfn, 1);\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce))"
+ },
+ {
+ "id": "15.4.4.21-1-12",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-1-12.js",
+ "description": "Array.prototype.reduce applied to RegExp object",
+ "test": "assertTrue((function testcase() {\n function callbackfn(prevVal, curVal, idx, obj) {\n return obj instanceof RegExp;\n }\n\n var obj = new RegExp();\n obj.length = 1;\n obj[0] = 1;\n\n return Array.prototype.reduce.call(obj, callbackfn, 1);\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce))"
+ },
+ {
+ "id": "15.4.4.21-1-13",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-1-13.js",
+ "description": "Array.prototype.reduce applied to the JSON object",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(prevVal, curVal, idx, obj) {\n return ('[object JSON]' === Object.prototype.toString.call(obj));\n }\n\n try {\n JSON.length = 1;\n JSON[0] = 1;\n return Array.prototype.reduce.call(JSON, callbackfn, 1);\n } finally {\n delete JSON.length;\n delete JSON[0];\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce))"
+ },
+ {
+ "id": "15.4.4.21-1-14",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-1-14.js",
+ "description": "Array.prototype.reduce applied to Error object",
+ "test": "assertTrue((function testcase() {\n function callbackfn(prevVal, curVal, idx, obj) {\n return obj instanceof Error;\n }\n\n var obj = new Error();\n obj.length = 1;\n obj[0] = 1;\n\n return Array.prototype.reduce.call(obj, callbackfn, 1);\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce))"
+ },
+ {
+ "id": "15.4.4.21-1-15",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-1-15.js",
+ "description": "Array.prototype.reduce applied to the Arguments object",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(prevVal, curVal, idx, obj) {\n return ('[object Arguments]' === Object.prototype.toString.call(obj));\n }\n\n var obj = (function () {\n return arguments;\n }(\"a\", \"b\"));\n\n return Array.prototype.reduce.call(obj, callbackfn, 1);\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce))"
+ },
+ {
+ "id": "15.4.4.21-1-2",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-1-2.js",
+ "description": "Array.prototype.reduce applied to null",
+ "test": "assertTrue((function testcase() {\n try {\n Array.prototype.reduce.call(null);\n return false;\n } catch (e) {\n return (e instanceof TypeError);\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce))"
+ },
+ {
+ "id": "15.4.4.21-1-3",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-1-3.js",
+ "description": "Array.prototype.reduce applied to boolean primitive",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(prevVal, curVal, idx, obj) {\n return obj instanceof Boolean;\n }\n\n try {\n Boolean.prototype[0] = true;\n Boolean.prototype.length = 1;\n\n return Array.prototype.reduce.call(false, callbackfn, 1);\n\n } finally {\n delete Boolean.prototype[0];\n delete Boolean.prototype.length;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce))"
+ },
+ {
+ "id": "15.4.4.21-1-4",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-1-4.js",
+ "description": "Array.prototype.reduce applied to Boolean object",
+ "test": "assertTrue((function testcase() {\n function callbackfn(prevVal, curVal, idx, obj) {\n return obj instanceof Boolean;\n }\n\n var obj = new Boolean(true);\n obj.length = 2;\n obj[0] = 11;\n obj[1] = 12;\n\n return Array.prototype.reduce.call(obj, callbackfn, 1);\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce))"
+ },
+ {
+ "id": "15.4.4.21-1-5",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-1-5.js",
+ "description": "Array.prototype.reduce applied to number primitive",
+ "test": "assertTrue((function testcase() {\n function callbackfn(prevVal, curVal, idx, obj) {\n return obj instanceof Number;\n }\n\n try {\n Number.prototype[0] = 1;\n Number.prototype.length = 1;\n\n return Array.prototype.reduce.call(2.5, callbackfn, 1);\n } finally {\n delete Number.prototype[0];\n delete Number.prototype.length;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce))"
+ },
+ {
+ "id": "15.4.4.21-1-6",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-1-6.js",
+ "description": "Array.prototype.reduce applied to Number object",
+ "test": "assertTrue((function testcase() {\n function callbackfn(prevVal, curVal, idx, obj) {\n return obj instanceof Number;\n }\n\n var obj = new Number(-128);\n obj.length = 2;\n obj[0] = 11;\n obj[1] = 12;\n return Array.prototype.reduce.call(obj, callbackfn, 1);\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce))"
+ },
+ {
+ "id": "15.4.4.21-1-7",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-1-7.js",
+ "description": "Array.prototype.reduce applied to string primitive",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(prevVal, curVal, idx, obj) {\n return obj instanceof String;\n }\n\n return Array.prototype.reduce.call(\"abc\", callbackfn, 1);\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce))"
+ },
+ {
+ "id": "15.4.4.21-1-8",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-1-8.js",
+ "description": "Array.prototype.reduce applied to String object",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(prevVal, curVal, idx, obj) {\n return obj instanceof String;\n }\n\n var obj = new String(\"abc\");\n\n return Array.prototype.reduce.call(obj, callbackfn, 1);\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce))"
+ },
+ {
+ "id": "15.4.4.21-1-9",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-1-9.js",
+ "description": "Array.prototype.reduce applied to Function object",
+ "test": "assertTrue((function testcase() {\n function callbackfn(prevVal, curVal, idx, obj) {\n return obj instanceof Function;\n }\n\n var obj = function (a, b) {\n return a + b;\n };\n obj[0] = 11;\n obj[1] = 9;\n\n return Array.prototype.reduce.call(obj, callbackfn, 1);\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce))"
+ },
+ {
+ "id": "15.4.4.21-10-1",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-10-1.js",
+ "description": "Array.prototype.reduce doesn't mutate the Array on which it is called on",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(prevVal, curVal, idx, obj)\n {\n return 1;\n }\n var srcArr = [1,2,3,4,5];\n srcArr.reduce(callbackfn);\n if(srcArr[0] === 1 &&\n srcArr[1] === 2 &&\n srcArr[2] === 3 &&\n srcArr[3] === 4 &&\n srcArr[4] === 5)\n {\n return true;\n }\n\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce))"
+ },
+ {
+ "id": "15.4.4.21-10-2",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-10-2.js",
+ "description": "Array.prototype.reduce reduces the array in ascending order of indices",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(prevVal, curVal, idx, obj)\n {\n return prevVal + curVal;\n }\n var srcArr = ['1','2','3','4','5'];\n if(srcArr.reduce(callbackfn) === '12345')\n {\n return true;\n }\n\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce))"
+ },
+ {
+ "id": "15.4.4.21-10-3",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-10-3.js",
+ "description": "Array.prototype.reduce - subclassed array of length 1",
+ "test": "assertTrue((function testcase() {\n foo.prototype = [1];\n function foo() {}\n var f = new foo();\n \n function cb(){}\n if(f.reduce(cb) === 1)\n return true;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce))"
+ },
+ {
+ "id": "15.4.4.21-10-4",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-10-4.js",
+ "description": "Array.prototype.reduce - subclassed array with length more than 1",
+ "test": "assertTrue((function testcase() {\n foo.prototype = new Array(1, 2, 3, 4);\n function foo() {}\n var f = new foo();\n \n function cb(prevVal, curVal, idx, obj){return prevVal + curVal;}\n if(f.reduce(cb) === 10)\n return true;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce))"
+ },
+ {
+ "id": "15.4.4.21-10-5",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-10-5.js",
+ "description": "Array.prototype.reduce reduces the array in ascending order of indices(initialvalue present)",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(prevVal, curVal, idx, obj)\n {\n return prevVal + curVal;\n }\n var srcArr = ['1','2','3','4','5'];\n if(srcArr.reduce(callbackfn,'0') === '012345')\n {\n return true;\n }\n\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce))"
+ },
+ {
+ "id": "15.4.4.21-10-6",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-10-6.js",
+ "description": "Array.prototype.reduce - subclassed array when initialvalue provided",
+ "test": "assertTrue((function testcase() {\n foo.prototype = [1,2,3,4];\n function foo() {}\n var f = new foo();\n \n function cb(prevVal, curVal, idx, obj){return prevVal + curVal;}\n if(f.reduce(cb,-1) === 9)\n return true;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce))"
+ },
+ {
+ "id": "15.4.4.21-10-7",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-10-7.js",
+ "description": "Array.prototype.reduce - subclassed array with length 1 and initialvalue provided",
+ "test": "assertTrue((function testcase() {\n foo.prototype = [1];\n function foo() {}\n var f = new foo();\n \n function cb(prevVal, curVal, idx, obj){return prevVal + curVal;}\n if(f.reduce(cb,-1) === 0)\n return true;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce))"
+ },
+ {
+ "id": "15.4.4.21-10-8",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-10-8.js",
+ "description": "Array.prototype.reduce doesn't visit expandos",
+ "test": "assertTrue((function testcase() {\n\n var callCnt = 0;\n function callbackfn(prevVal, curVal, idx, obj)\n {\n callCnt++;\n return curVal;\n }\n var srcArr = ['1','2','3','4','5'];\n srcArr[\"i\"] = 10;\n srcArr[true] = 11;\n srcArr.reduce(callbackfn);\n\n if(callCnt == 4)\n {\n return true;\n }\n\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce))"
+ },
+ {
+ "id": "15.4.4.21-2-1",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-2-1.js",
+ "description": "Array.prototype.reduce - 'length' is own data property on an Array-like object",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(prevVal, curVal, idx, obj) {\n return (obj.length === 2);\n }\n\n var obj = {\n 0: 12,\n 1: 11,\n 2: 9,\n length: 2\n };\n\n return Array.prototype.reduce.call(obj, callbackfn, 1) === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce))"
+ },
+ {
+ "id": "15.4.4.21-2-10",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-2-10.js",
+ "description": "Array.prototype.reduce applied to Array-like object, 'length' is an inherited accessor property",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(prevVal, curVal, idx, obj) {\n return (obj.length === 2);\n }\n\n var proto = {};\n\n Object.defineProperty(proto, \"length\", {\n get: function () {\n return 2;\n },\n configurable: true\n });\n\n var Con = function () { };\n Con.prototype = proto;\n\n var child = new Con();\n child[0] = 12;\n child[1] = 11;\n child[2] = 9;\n\n return Array.prototype.reduce.call(child, callbackfn, 1) === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.4.4.21-2-11",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-2-11.js",
+ "description": "Array.prototype.reduce applied to Array-like object, 'length' is an own accessor property without a get function",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n function callbackfn(prevVal, curVal, idx, obj) {\n accessed = true;\n }\n\n var obj = {\n 0: 11,\n 1: 12\n };\n Object.defineProperty(obj, \"length\", {\n set: function () { },\n configurable: true\n });\n\n return Array.prototype.reduce.call(obj, callbackfn, 1) === 1 && !accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.4.4.21-2-12",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-2-12.js",
+ "description": "Array.prototype.reduce - 'length' is own accessor property without a get function that overrides an inherited accessor property on an Array",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n function callbackfn(prevVal, curVal, idx, obj) {\n accessed = true;\n }\n\n try {\n Object.defineProperty(Object.prototype, \"length\", {\n get: function () {\n return 2;\n },\n configurable: true\n });\n\n var obj = { 0: 12, 1: 11 };\n Object.defineProperty(obj, \"length\", {\n set: function () { },\n configurable: true\n });\n\n return Array.prototype.reduce.call(obj, callbackfn, 1) === 1 && !accessed;\n } finally {\n delete Object.prototype.length;\n }\n\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.4.4.21-2-13",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-2-13.js",
+ "description": "Array.prototype.reduce applied to Array-like object that 'length' is inherited accessor property without a get function",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n\n function callbackfn(prevVal, curVal, idx, obj) {\n accessed = true;\n }\n\n var proto = {};\n Object.defineProperty(proto, \"length\", {\n set: function () { },\n configurable: true\n });\n\n var Con = function () { };\n Con.prototype = proto;\n\n var child = new Con();\n child[0] = 11;\n child[1] = 12;\n\n return Array.prototype.reduce.call(child, callbackfn, 1) === 1 && !accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.4.4.21-2-14",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-2-14.js",
+ "description": "Array.prototype.reduce applied to the Array-like object that 'length' property doesn't exist",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n\n function callbackfn(prevVal, curVal, idx, obj) {\n accessed = true;\n }\n\n var obj = { 0: 11, 1: 12 };\n\n return Array.prototype.reduce.call(obj, callbackfn, 1) === 1 && !accessed;\n\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce))"
+ },
+ {
+ "id": "15.4.4.21-2-15",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-2-15.js",
+ "description": "Array.prototype.reduce - 'length' is property of the global object",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(prevVal, curVal, idx, obj) {\n return (obj.length === 2);\n }\n\n try {\n var oldLen = fnGlobalObject().length;\n fnGlobalObject()[0] = 12;\n fnGlobalObject()[1] = 11;\n fnGlobalObject()[2] = 9;\n fnGlobalObject().length = 2;\n return Array.prototype.reduce.call(fnGlobalObject(), callbackfn, 1) === true;\n } finally {\n delete fnGlobalObject()[0];\n delete fnGlobalObject()[1];\n delete fnGlobalObject()[2];\n fnGlobalObject().length = oldLen;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce))"
+ },
+ {
+ "id": "15.4.4.21-2-17",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-2-17.js",
+ "description": "Array.prototype.reduce applied to the Arguments object, which implements its own property get method",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(prevVal, curVal, idx, obj) {\n return (obj.length === 2);\n }\n\n var func = function (a, b) {\n arguments[2] = 9;\n return Array.prototype.reduce.call(arguments, callbackfn, 1);\n };\n\n return func(12, 11) === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce))"
+ },
+ {
+ "id": "15.4.4.21-2-18",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-2-18.js",
+ "description": "Array.prototype.reduce applied to String object, which implements its own property get method",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(prevVal, curVal, idx, obj) {\n return (obj.length === 3);\n }\n\n var str = new String(\"012\");\n\n return Array.prototype.reduce.call(str, callbackfn, 1) === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce))"
+ },
+ {
+ "id": "15.4.4.21-2-19",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-2-19.js",
+ "description": "Array.prototype.reduce applied to Function object, which implements its own property get method",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(prevVal, curVal, idx, obj) {\n return (obj.length === 2);\n }\n\n var fun = function (a, b) {\n return a + b;\n };\n fun[0] = 12;\n fun[1] = 11;\n fun[2] = 9;\n\n return Array.prototype.reduce.call(fun, callbackfn, 1) === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce))"
+ },
+ {
+ "id": "15.4.4.21-2-2",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-2-2.js",
+ "description": "Array.prototype.reduce - 'length' is own data property on an Array",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(prevVal, curVal, idx, obj) {\n return (obj.length === 2);\n }\n\n return [12, 11].reduce(callbackfn, 1) === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce))"
+ },
+ {
+ "id": "15.4.4.21-2-3",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-2-3.js",
+ "description": "Array.prototype.reduce - 'length' is an own data property that overrides an inherited data property on an Array-like object",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(prevVal, curVal, idx, obj) {\n return (obj.length === 2);\n }\n\n var proto = { length: 3 };\n\n var Con = function () { };\n Con.prototype = proto;\n\n var child = new Con();\n child.length = 2;\n child[0] = 12;\n child[1] = 11;\n child[2] = 9;\n\n return Array.prototype.reduce.call(child, callbackfn, 1) === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce))"
+ },
+ {
+ "id": "15.4.4.21-2-4",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-2-4.js",
+ "description": "Array.prototype.reduce - 'length' is own data property that overrides an inherited data property on an Array",
+ "test": "assertTrue((function testcase() {\n var storeProtoLength;\n\n function callbackfn(prevVal, curVal, idx, obj) {\n return (obj.length === 2);\n }\n\n try {\n storeProtoLength = Array.prototype.length;\n Array.prototype.length = 0;\n\n return [12, 11].reduce(callbackfn, 1) === true;\n } finally {\n Array.prototype.length = storeProtoLength;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce))"
+ },
+ {
+ "id": "15.4.4.21-2-5",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-2-5.js",
+ "description": "Array.prototype.reduce applied to Array-like object, 'length' is an own data property that overrides an inherited accessor property",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(prevVal, curVal, idx, obj) {\n return (obj.length === 2);\n }\n\n var proto = {};\n\n Object.defineProperty(proto, \"length\", {\n get: function () {\n return 3;\n },\n configurable: true\n });\n\n var Con = function () { };\n Con.prototype = proto;\n\n var child = new Con();\n Object.defineProperty(child, \"length\", {\n value: 2,\n configurable: true\n });\n child[0] = 12;\n child[1] = 11;\n child[2] = 9;\n\n return Array.prototype.reduce.call(child, callbackfn, 1) === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.4.4.21-2-6",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-2-6.js",
+ "description": "Array.prototype.reduce applied to Array-like object, 'length' is an inherited data property",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(prevVal, curVal, idx, obj) {\n return (obj.length === 2);\n }\n\n var proto = { length: 2 };\n\n var Con = function () { };\n Con.prototype = proto;\n\n var child = new Con();\n child[0] = 12;\n child[1] = 11;\n child[2] = 9;\n\n return Array.prototype.reduce.call(child, callbackfn, 1) === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce))"
+ },
+ {
+ "id": "15.4.4.21-2-7",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-2-7.js",
+ "description": "Array.prototype.reduce applied to Array-like object, 'length' is an own accessor property",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(prevVal, curVal, idx, obj) {\n return (obj.length === 2);\n }\n\n var obj = {};\n\n Object.defineProperty(obj, \"length\", {\n get: function () {\n return 2;\n },\n configurable: true\n });\n\n obj[0] = 12;\n obj[1] = 11;\n obj[2] = 9;\n\n return Array.prototype.reduce.call(obj, callbackfn, 1) === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.4.4.21-2-8",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-2-8.js",
+ "description": "Array.prototype.reduce applied to Array-like object, 'length' is an own accessor property that overrides an inherited data property",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(prevVal, curVal, idx, obj) {\n return (obj.length === 2);\n }\n\n var proto = { length: 3 };\n\n var Con = function () { };\n Con.prototype = proto;\n\n var child = new Con();\n\n Object.defineProperty(child, \"length\", {\n get: function () {\n return 2;\n },\n configurable: true\n });\n\n child[0] = 12;\n child[1] = 11;\n child[2] = 9;\n\n return Array.prototype.reduce.call(child, callbackfn, 1) === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.4.4.21-2-9",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-2-9.js",
+ "description": "Array.prototype.reduce applied to Array-like object, 'length' is an own accessor property that overrides an inherited accessor property",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(prevVal, curVal, idx, obj) {\n return (obj.length === 2);\n }\n\n var proto = {};\n\n Object.defineProperty(proto, \"length\", {\n get: function () {\n return 3;\n },\n configurable: true\n });\n\n var Con = function () { };\n Con.prototype = proto;\n\n var child = new Con();\n\n Object.defineProperty(child, \"length\", {\n get: function () {\n return 2;\n },\n configurable: true\n });\n\n child[0] = 12;\n child[1] = 11;\n child[2] = 9;\n\n return Array.prototype.reduce.call(child, callbackfn, 1) === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.4.4.21-3-1",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-1.js",
+ "description": "Array.prototype.reduce - value of 'length' is undefined",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n\n function callbackfn(prevVal, curVal, idx, obj) {\n accessed = true;\n return 2;\n }\n\n var obj = { 0: 0, 1: 1, length: undefined };\n\n return Array.prototype.reduce.call(obj, callbackfn, 1) === 1 && !accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce))"
+ },
+ {
+ "id": "15.4.4.21-3-10",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-10.js",
+ "description": "Array.prototype.reduce - value of 'length' is number primitive (value is NaN)",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n\n function callbackfn(prevVal, curVal, idx, obj) {\n accessed = true;\n return 2;\n }\n\n var obj = { 0: 9, length: NaN };\n\n return Array.prototype.reduce.call(obj, callbackfn, 1) === 1 && !accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce))"
+ },
+ {
+ "id": "15.4.4.21-3-11",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-11.js",
+ "description": "Array.prototype.reduce - 'length' is a string containing a positive number",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(prevVal, curVal, idx, obj) {\n return (curVal === 11 && idx === 1);\n }\n\n var obj = { 1: 11, 2: 9, length: \"2\" };\n\n return Array.prototype.reduce.call(obj, callbackfn, 1) === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce))"
+ },
+ {
+ "id": "15.4.4.21-3-12",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-12.js",
+ "description": "Array.prototype.reduce - 'length' is a string containing a negative number",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(prevVal, curVal, idx, obj) {\n return (curVal === 11 && idx === 1);\n }\n\n var obj = { 1: 11, 2: 9, length: \"-4294967294\" };\n\n return Array.prototype.reduce.call(obj, callbackfn, 1) === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce))"
+ },
+ {
+ "id": "15.4.4.21-3-13",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-13.js",
+ "description": "Array.prototype.reduce - 'length' is a string containing a decimal number",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(prevVal, curVal, idx, obj) {\n return (curVal === 11 && idx === 1);\n }\n\n var obj = { 1: 11, 2: 9, length: \"2.5\" };\n\n return Array.prototype.reduce.call(obj, callbackfn, 1) === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce))"
+ },
+ {
+ "id": "15.4.4.21-3-14",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-14.js",
+ "description": "Array.prototype.reduce - 'length' is a string containing +/-Infinity",
+ "test": "assertTrue((function testcase() {\n\n var accessed1 = false;\n var accessed2 = false;\n var accessed3 = false;\n\n function callbackfn1(prevVal, curVal, idx, obj) {\n accessed1 = true;\n return 2;\n }\n\n function callbackfn2(prevVal, curVal, idx, obj) {\n accessed2 = true;\n return 2;\n }\n\n function callbackfn3(prevVal, curVal, idx, obj) {\n accessed3 = true;\n return 2;\n }\n\n var obj1 = { 0: 9, length: \"Infinity\" };\n var obj2 = { 0: 9, length: \"-Infinity\" };\n var obj3 = { 0: 9, length: \"+Infinity\" };\n\n return Array.prototype.reduce.call(obj1, callbackfn1, 1) === 1 &&\n Array.prototype.reduce.call(obj2, callbackfn2, 1) === 1 &&\n Array.prototype.reduce.call(obj3, callbackfn3, 1) === 1 &&\n !accessed1 && !accessed2 && !accessed3;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce))"
+ },
+ {
+ "id": "15.4.4.21-3-15",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-15.js",
+ "description": "Array.prototype.reduce - 'length' is a string containing an exponential number",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(prevVal, curVal, idx, obj) {\n return (curVal === 11 && idx === 1);\n }\n\n var obj = { 1: 11, 2: 9, length: \"2E0\" };\n\n return Array.prototype.reduce.call(obj, callbackfn, 1) === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce))"
+ },
+ {
+ "id": "15.4.4.21-3-16",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-16.js",
+ "description": "Array.prototype.reduce - 'length' is a string containing a hex number",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(prevVal, curVal, idx, obj) {\n return (curVal === 11 && idx === 1);\n }\n\n var obj = { 1: 11, 2: 9, length: \"0x0002\" };\n\n return Array.prototype.reduce.call(obj, callbackfn, 1) === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce))"
+ },
+ {
+ "id": "15.4.4.21-3-17",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-17.js",
+ "description": "Array.prototype.reduce - 'length' is a string containing a number with leading zeros",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(prevVal, curVal, idx, obj) {\n return (curVal === 11 && idx === 1);\n }\n\n var obj = { 1: 11, 2: 9, length: \"0002.00\" };\n\n return Array.prototype.reduce.call(obj, callbackfn, 1) === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce))"
+ },
+ {
+ "id": "15.4.4.21-3-18",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-18.js",
+ "description": "Array.prototype.reduce - value of 'length' is a string that can't convert to a number",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n function callbackfn(prevVal, curVal, idx, obj) {\n accessed = true;\n return 2;\n }\n\n var obj = { 0: 9, length: \"asdf!_\" };\n\n return Array.prototype.reduce.call(obj, callbackfn, 1) === 1 && !accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce))"
+ },
+ {
+ "id": "15.4.4.21-3-19",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-19.js",
+ "description": "Array.prototype.reduce - value of 'length' is an Object which has an own toString method",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(prevVal, curVal, idx, obj) {\n return (curVal === 11 && idx === 1);\n }\n\n var obj = {\n 1: 11,\n 2: 9,\n length: {\n toString: function () {\n return '2';\n }\n }\n };\n\n return Array.prototype.reduce.call(obj, callbackfn, 1) === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce))"
+ },
+ {
+ "id": "15.4.4.21-3-2",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-2.js",
+ "description": "Array.prototype.reduce - value of 'length' is a boolean (value is true)",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(prevVal, curVal, idx, obj) {\n return (curVal === 11 && idx === 0);\n }\n\n var obj = { 0: 11, 1: 9, length: true };\n\n return Array.prototype.reduce.call(obj, callbackfn, 1) === true;\n\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce))"
+ },
+ {
+ "id": "15.4.4.21-3-20",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-20.js",
+ "description": "Array.prototype.reduce - value of 'length' is an object which has an own valueOf method",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(prevVal, curVal, idx, obj) {\n return (curVal === 11 && idx === 1);\n }\n\n var obj = {\n 1: 11,\n 2: 9,\n length: {\n valueOf: function () {\n return 2;\n }\n }\n };\n\n return Array.prototype.reduce.call(obj, callbackfn, 1) === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce))"
+ },
+ {
+ "id": "15.4.4.21-3-21",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-21.js",
+ "description": "Array.prototype.reduce - 'length' is an object that has an own valueOf method that returns an object and toString method that returns a string",
+ "test": "assertTrue((function testcase() {\n\n var valueOfOccured = false;\n var toStringOccured = false;\n\n function callbackfn(prevVal, curVal, idx, obj) {\n return (curVal === 11 && idx === 1);\n }\n\n var obj = {\n 1: 11,\n 2: 9,\n length: {\n valueOf: function () {\n valueOfOccured = true;\n return {};\n },\n toString: function () {\n toStringOccured = true;\n return '2';\n }\n }\n };\n\n return Array.prototype.reduce.call(obj, callbackfn, 1) === true && valueOfOccured && toStringOccured;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce))"
+ },
+ {
+ "id": "15.4.4.21-3-22",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-22.js",
+ "description": "Array.prototype.reduce throws TypeError exception - 'length' is an object with toString and valueOf methods that don�t return primitive values",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n var valueOfAccessed = false;\n var toStringAccessed = false;\n\n function callbackfn(prevVal, curVal, idx, obj) {\n accessed = true;\n return true;\n }\n\n var obj = {\n 1: 11,\n 2: 12,\n\n length: {\n valueOf: function () {\n valueOfAccessed = true;\n return {};\n },\n toString: function () {\n toStringAccessed = true;\n return {};\n }\n }\n };\n\n try {\n Array.prototype.reduce.call(obj, callbackfn, 1);\n return false;\n } catch (ex) {\n return (ex instanceof TypeError) && !accessed && toStringAccessed && valueOfAccessed;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce))"
+ },
+ {
+ "id": "15.4.4.21-3-23",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-23.js",
+ "description": "Array.prototype.reduce uses inherited valueOf method - 'length' is an object with an own toString and inherited valueOf methods",
+ "test": "assertTrue((function testcase() {\n\n var valueOfAccessed = false;\n var toStringAccessed = false;\n\n function callbackfn(prevVal, curVal, idx, obj) {\n return (curVal === 11 && idx === 1);\n }\n\n var proto = {\n valueOf: function () {\n valueOfAccessed = true;\n return 2;\n }\n };\n\n var Con = function () { };\n Con.prototype = proto;\n\n var child = new Con();\n\n child.toString = function () {\n toStringAccessed = true;\n return '1';\n };\n\n var obj = {\n 1: 11,\n 2: 9,\n length: child\n };\n\n return Array.prototype.reduce.call(obj, callbackfn, 1) === true && valueOfAccessed && !toStringAccessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce))"
+ },
+ {
+ "id": "15.4.4.21-3-24",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-24.js",
+ "description": "Array.prototype.reduce - value of 'length' is a positive non-integer, ensure truncation occurs in the proper direction",
+ "test": "assertTrue((function testcase() {\n function callbackfn(prevVal, curVal, idx, obj) {\n return (curVal === 11 && idx === 1);\n }\n\n var obj = {\n 1: 11,\n 2: 9,\n length: 2.685\n };\n\n return Array.prototype.reduce.call(obj, callbackfn, 1) === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce))"
+ },
+ {
+ "id": "15.4.4.21-3-25",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-25.js",
+ "description": "Array.prototype.reduce - value of 'length' is a negative non-integer, ensure truncation occurs in the proper direction",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(prevVal, curVal, idx, obj) {\n return (curVal === 11 && idx === 1);\n }\n\n var obj = {\n 1: 11,\n 2: 9,\n length: -4294967294.5\n };\n\n return Array.prototype.reduce.call(obj, callbackfn, 1) === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce))"
+ },
+ {
+ "id": "15.4.4.21-3-28",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-28.js",
+ "description": "Array.prototype.reduce - value of 'length' is boundary value (2^32)",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n\n function callbackfn(prevVal, curVal, idx, obj) {\n accessed = true;\n return 2;\n }\n\n var obj = {\n 0: 12,\n length: 4294967296\n };\n\n return Array.prototype.reduce.call(obj, callbackfn, 1) === 1 && !accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce))"
+ },
+ {
+ "id": "15.4.4.21-3-29",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-29.js",
+ "description": "Array.prototype.reduce - value of 'length' is boundary value (2^32 + 1)",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(prevVal, curVal, idx, obj) {\n return (curVal === 11 && idx === 0);\n }\n\n var obj = {\n 0: 11,\n 1: 9,\n length: 4294967297\n };\n\n return Array.prototype.reduce.call(obj, callbackfn, 1);\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce))"
+ },
+ {
+ "id": "15.4.4.21-3-3",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-3.js",
+ "description": "Array.prototype.reduce - value of 'length' is a number (value is 0)",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n\n function callbackfn(prevVal, curVal, idx, obj) {\n accessed = true;\n return 2;\n }\n\n var obj = { 0: 1, 1: 1, length: 0 };\n\n return Array.prototype.reduce.call(obj, callbackfn, 1) === 1 && !accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce))"
+ },
+ {
+ "id": "15.4.4.21-3-4",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-4.js",
+ "description": "Array.prototype.reduce - value of 'length' is a number (value is +0)",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n\n function callbackfn(prevVal, curVal, idx, obj) {\n accessed = true;\n return 2;\n }\n\n var obj = { 0: 11, length: +0 };\n\n return Array.prototype.reduce.call(obj, callbackfn, 1) === 1 && !accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce))"
+ },
+ {
+ "id": "15.4.4.21-3-5",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-5.js",
+ "description": "Array.prototype.reduce - value of 'length' is a number (value is -0)",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n\n function callbackfn(prevVal, curVal, idx, obj) {\n accessed = true;\n return 2;\n }\n\n var obj = { 0: 11, length: -0 };\n\n return Array.prototype.reduce.call(obj, callbackfn, 1) === 1 && !accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce))"
+ },
+ {
+ "id": "15.4.4.21-3-6",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-6.js",
+ "description": "Array.prototype.reduce - value of 'length' is a number (value is positive)",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(prevVal, curVal, idx, obj) {\n return (curVal === 11 && idx === 1);\n }\n\n var obj = { 1: 11, 2: 9, length: 2 };\n\n return Array.prototype.reduce.call(obj, callbackfn, 1) === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce))"
+ },
+ {
+ "id": "15.4.4.21-3-7",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-7.js",
+ "description": "Array.prototype.reduce - value of 'length' is a number (value is negative)",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(prevVal, curVal, idx, obj) {\n return (curVal === 11 && idx === 1);\n }\n\n var obj = { 1: 11, 2: 9, length: -4294967294 };\n\n return Array.prototype.reduce.call(obj, callbackfn, 1) === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce))"
+ },
+ {
+ "id": "15.4.4.21-3-8",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-8.js",
+ "description": "Array.prototype.reduce - value of 'length' is a number (value is Infinity)",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n\n function callbackfn(prevVal, curVal, idx, obj) {\n accessed = true;\n return 2;\n }\n\n var obj = { 0: 9, length: Infinity };\n\n return Array.prototype.reduce.call(obj, callbackfn, 1) === 1 && !accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce))"
+ },
+ {
+ "id": "15.4.4.21-3-9",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-3-9.js",
+ "description": "Array.prototype.reduce - value of 'length' is a number (value is -Infinity)",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n\n function callbackfn(prevVal, curVal, idx, obj) {\n accessed = true;\n }\n\n var obj = { 0: 9, length: -Infinity };\n\n return Array.prototype.reduce.call(obj, callbackfn, 1) === 1 && !accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce))"
+ },
+ {
+ "id": "15.4.4.21-4-1",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-4-1.js",
+ "description": "Array.prototype.reduce throws TypeError if callbackfn is undefined",
+ "test": "assertTrue((function testcase() {\n\n var arr = new Array(10);\n try {\n arr.reduce(); \n }\n catch(e) {\n if(e instanceof TypeError)\n return true; \n }\n\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce))"
+ },
+ {
+ "id": "15.4.4.21-4-10",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-4-10.js",
+ "description": "Array.prototype.reduce - the exception is not thrown if exception was thrown by step 2",
+ "test": "assertTrue((function testcase() {\n\n var obj = { 0: 11, 1: 12 };\n\n Object.defineProperty(obj, \"length\", {\n get: function () {\n throw new SyntaxError();\n },\n configurable: true\n });\n\n try {\n Array.prototype.reduce.call(obj, undefined);\n return false;\n } catch (ex) {\n return !(ex instanceof TypeError);\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.4.4.21-4-11",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-4-11.js",
+ "description": "Array.prototype.reduce - the exception is not thrown if exception was thrown by step 3",
+ "test": "assertTrue((function testcase() {\n\n var obj = { 0: 11, 1: 12 };\n\n Object.defineProperty(obj, \"length\", {\n get: function () {\n return {\n toString: function () {\n throw new SyntaxError();\n }\n };\n },\n configurable: true\n });\n\n try {\n Array.prototype.reduce.call(obj, undefined);\n return false;\n } catch (ex) {\n return !(ex instanceof TypeError);\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.4.4.21-4-12",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-4-12.js",
+ "description": "Array.prototype.reduce - 'callbackfn' is a function",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n function callbackfn(prevVal, curVal, idx, obj) {\n accessed = true;\n return curVal > 10;\n }\n\n return [11, 9].reduce(callbackfn, 1) === false && accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce))"
+ },
+ {
+ "id": "15.4.4.21-4-15",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-4-15.js",
+ "description": "Array.prototype.reduce - calling with no callbackfn is the same as passing undefined for callbackfn",
+ "test": "assertTrue((function testcase() {\n var obj = { 10: 10 };\n var lengthAccessed = false;\n var loopAccessed = false;\n\n Object.defineProperty(obj, \"length\", {\n get: function () {\n lengthAccessed = true;\n return 20;\n },\n configurable: true\n });\n\n Object.defineProperty(obj, \"0\", {\n get: function () {\n loopAccessed = true;\n return 10;\n },\n configurable: true\n });\n\n try {\n Array.prototype.reduce.call(obj);\n return false;\n } catch (ex) {\n return (ex instanceof TypeError) && lengthAccessed && !loopAccessed;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects())"
+ },
+ {
+ "id": "15.4.4.21-4-2",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-4-2.js",
+ "description": "Array.prototype.reduce throws ReferenceError if callbackfn is unreferenced",
+ "test": "assertTrue((function testcase() {\n\n var arr = new Array(10);\n try {\n arr.reduce(foo); \n }\n catch(e) {\n if(e instanceof ReferenceError)\n return true; \n }\n\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce))"
+ },
+ {
+ "id": "15.4.4.21-4-3",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-4-3.js",
+ "description": "Array.prototype.reduce throws TypeError if callbackfn is null",
+ "test": "assertTrue((function testcase() {\n\n var arr = new Array(10);\n try {\n arr.reduce(null); \n }\n catch(e) {\n if(e instanceof TypeError)\n return true; \n }\n\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce))"
+ },
+ {
+ "id": "15.4.4.21-4-4",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-4-4.js",
+ "description": "Array.prototype.reduce throws TypeError if callbackfn is boolean",
+ "test": "assertTrue((function testcase() {\n\n var arr = new Array(10);\n try {\n arr.reduce(true); \n }\n catch(e) {\n if(e instanceof TypeError)\n return true; \n }\n\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce))"
+ },
+ {
+ "id": "15.4.4.21-4-5",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-4-5.js",
+ "description": "Array.prototype.reduce throws TypeError if callbackfn is number",
+ "test": "assertTrue((function testcase() {\n\n var arr = new Array(10);\n try {\n arr.reduce(5); \n }\n catch(e) {\n if(e instanceof TypeError)\n return true; \n }\n\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce))"
+ },
+ {
+ "id": "15.4.4.21-4-6",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-4-6.js",
+ "description": "Array.prototype.reduce throws TypeError if callbackfn is string",
+ "test": "assertTrue((function testcase() {\n\n var arr = new Array(10);\n try {\n arr.reduce(\"abc\"); \n }\n catch(e) {\n if(e instanceof TypeError)\n return true; \n }\n\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce))"
+ },
+ {
+ "id": "15.4.4.21-4-7",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-4-7.js",
+ "description": "Array.prototype.reduce throws TypeError if callbackfn is Object without [[Call]] internal method",
+ "test": "assertTrue((function testcase() {\n\n var arr = new Array(10);\n try {\n arr.reduce(new Object()); \n }\n catch(e) {\n if(e instanceof TypeError)\n return true; \n }\n\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce))"
+ },
+ {
+ "id": "15.4.4.21-4-8",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-4-8.js",
+ "description": "Array.prototype.reduce - side effects produced by step 2 are visible when an exception occurs",
+ "test": "assertTrue((function testcase() {\n\n var obj = { 0: 11, 1: 12 };\n\n var accessed = false;\n\n Object.defineProperty(obj, \"length\", {\n get: function () {\n accessed = true;\n return 2;\n },\n configurable: true\n });\n\n try {\n Array.prototype.reduce.call(obj, null);\n return false;\n } catch (ex) {\n return ex instanceof TypeError && accessed;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.4.4.21-4-9",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-4-9.js",
+ "description": "Array.prototype.reduce - side effects produced by step 3 are visible when an exception occurs",
+ "test": "assertTrue((function testcase() {\n\n var obj = { 0: 11, 1: 12 };\n\n var accessed = false;\n\n Object.defineProperty(obj, \"length\", {\n get: function () {\n return {\n toString: function () {\n accessed = true;\n return \"2\";\n }\n };\n },\n configurable: true\n });\n\n try {\n Array.prototype.reduce.call(obj, null);\n return false;\n } catch (ex) {\n return ex instanceof TypeError && accessed;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.4.4.21-5-1",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-5-1.js",
+ "description": "Array.prototype.reduce throws TypeError if 'length' is 0 (empty array), no initVal",
+ "test": "assertTrue((function testcase() {\n function cb(){}\n \n try {\n [].reduce(cb);\n }\n catch (e) {\n if (e instanceof TypeError) {\n return true;\n }\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce))"
+ },
+ {
+ "id": "15.4.4.21-5-10",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-5-10.js",
+ "description": "Array.prototype.reduce - if exception occurs, it occurs after any side-effects that might be produced by step 2",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(prevVal, curVal, idx, obj) {\n return (curVal > 10);\n }\n\n var obj = { 0: 11, 1: 12 };\n\n var accessed = false;\n\n Object.defineProperty(obj, \"length\", {\n get: function () {\n accessed = true;\n return 0;\n },\n configurable: true\n });\n\n try {\n Array.prototype.reduce.call(obj, callbackfn);\n return false;\n } catch (ex) {\n return (ex instanceof TypeError) && accessed;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.4.4.21-5-11",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-5-11.js",
+ "description": "Array.prototype.reduce - if the exception occurs, it occurs after any side-effects that might be produced by step 3",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(prevVal, curVal, idx, obj) {\n return (curVal > 10);\n }\n\n var obj = { 0: 11, 1: 12 };\n\n var accessed = false;\n\n Object.defineProperty(obj, \"length\", {\n get: function () {\n return {\n toString: function () {\n accessed = true;\n return \"0\";\n }\n };\n },\n configurable: true\n });\n\n try {\n Array.prototype.reduce.call(obj, callbackfn);\n return false;\n } catch (ex) {\n return (ex instanceof TypeError) && accessed;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.4.4.21-5-12",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-5-12.js",
+ "description": "Array.prototype.reduce - the exception is not thrown if exception was thrown by step 2",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(prevVal, curVal, idx, obj) {\n return (curVal > 10);\n }\n\n var obj = { 0: 11, 1: 12 };\n\n Object.defineProperty(obj, \"length\", {\n get: function () {\n throw new SyntaxError();\n },\n configurable: true\n });\n\n try {\n Array.prototype.reduce.call(obj, callbackfn);\n return false;\n } catch (ex) {\n return !(ex instanceof TypeError);\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.4.4.21-5-13",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-5-13.js",
+ "description": "Array.prototype.reduce - the exception is not thrown if exception was thrown by step 3",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(prevVal, curVal, idx, obj) {\n return (curVal > 10);\n }\n\n var obj = { 0: 11, 1: 12 };\n\n Object.defineProperty(obj, \"length\", {\n get: function () {\n return {\n toString: function () {\n throw new SyntaxError();\n }\n };\n },\n configurable: true\n });\n\n\n try {\n Array.prototype.reduce.call(obj, callbackfn);\n return false;\n } catch (ex) {\n return !(ex instanceof TypeError);\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.4.4.21-5-2",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-5-2.js",
+ "description": "Array.prototype.reduce throws TypeError if 'length' is 0 (subclassed Array, length overridden to null (type conversion)), no initVal",
+ "test": "assertTrue((function testcase() {\n foo.prototype = new Array(1, 2, 3);\n function foo() {}\n var f = new foo();\n f.length = null;\n \n function cb(){}\n try {\n f.reduce(cb);\n }\n catch (e) {\n if (e instanceof TypeError) {\n return true;\n }\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce))"
+ },
+ {
+ "id": "15.4.4.21-5-3",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-5-3.js",
+ "description": "Array.prototype.reduce throws TypeError if 'length' is 0 (subclassed Array, length overridden to false (type conversion)), no initVal",
+ "test": "assertTrue((function testcase() {\n foo.prototype = new Array(1, 2, 3);\n function foo() {}\n var f = new foo();\n f.length = false;\n \n function cb(){}\n try {\n f.reduce(cb);\n }\n catch (e) {\n if (e instanceof TypeError) {\n return true;\n }\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce))"
+ },
+ {
+ "id": "15.4.4.21-5-4",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-5-4.js",
+ "description": "Array.prototype.reduce throws TypeError if 'length' is 0 (subclassed Array, length overridden to 0 (type conversion)), no initVal",
+ "test": "assertTrue((function testcase() {\n foo.prototype = new Array(1, 2, 3);\n function foo() {}\n var f = new foo();\n f.length = 0;\n \n function cb(){}\n try {\n f.reduce(cb);\n }\n catch (e) {\n if (e instanceof TypeError) {\n return true;\n }\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce))"
+ },
+ {
+ "id": "15.4.4.21-5-5",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-5-5.js",
+ "description": "Array.prototype.reduce throws TypeError if 'length' is 0 (subclassed Array, length overridden to '0' (type conversion)), no initVal",
+ "test": "assertTrue((function testcase() {\n foo.prototype = new Array(1, 2, 3);\n function foo() {}\n var f = new foo();\n f.length = '0';\n \n function cb(){}\n try {\n f.reduce(cb);\n }\n catch (e) {\n if (e instanceof TypeError) {\n return true;\n }\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce))"
+ },
+ {
+ "id": "15.4.4.21-5-6",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-5-6.js",
+ "description": "Array.prototype.reduce throws TypeError if 'length' is 0 (subclassed Array, length overridden with obj with valueOf), no initVal",
+ "test": "assertTrue((function testcase() {\n foo.prototype = new Array(1, 2, 3);\n function foo() {}\n var f = new foo();\n \n var o = { valueOf: function () { return 0;}};\n f.length = o;\n \n function cb(){}\n try {\n f.reduce(cb);\n }\n catch (e) {\n if (e instanceof TypeError) {\n return true;\n }\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce))"
+ },
+ {
+ "id": "15.4.4.21-5-7",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-5-7.js",
+ "description": "Array.prototype.reduce throws TypeError if 'length' is 0 (subclassed Array, length overridden with obj w/o valueOf (toString)), no initVal",
+ "test": "assertTrue((function testcase() {\n foo.prototype = new Array(1, 2, 3);\n function foo() {}\n var f = new foo();\n \n var o = { toString: function () { return '0';}};\n f.length = o;\n \n // objects inherit the default valueOf method of the Object object;\n // that simply returns the itself. Since the default valueOf() method\n // does not return a primitive value, ES next tries to convert the object\n // to a number by calling its toString() method and converting the\n // resulting string to a number.\n\n function cb(){}\n try {\n f.reduce(cb);\n }\n catch (e) {\n if (e instanceof TypeError) {\n return true;\n }\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce))"
+ },
+ {
+ "id": "15.4.4.21-5-8",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-5-8.js",
+ "description": "Array.prototype.reduce throws TypeError if 'length' is 0 (subclassed Array, length overridden with []), no initVal",
+ "test": "assertTrue((function testcase() {\n foo.prototype = new Array(1, 2, 3);\n function foo() {}\n var f = new foo();\n \n f.length = [];\n \n // objects inherit the default valueOf method of the Object object;\n // that simply returns the itself. Since the default valueOf() method\n // does not return a primitive value, ES next tries to convert the object\n // to a number by calling its toString() method and converting the\n // resulting string to a number.\n //\n // The toString( ) method on Array converts the array elements to strings,\n // then returns the result of concatenating these strings, with commas in\n // between. An array with no elements converts to the empty string, which\n // converts to the number 0. If an array has a single element that is a\n // number n, the array converts to a string representation of n, which is\n // then converted back to n itself. If an array contains more than one element,\n // or if its one element is not a number, the array converts to NaN.\n\n function cb(){}\n try {\n f.reduce(cb);\n }\n catch (e) {\n if (e instanceof TypeError) {\n return true;\n }\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce))"
+ },
+ {
+ "id": "15.4.4.21-5-9",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-5-9.js",
+ "description": "Array.prototype.reduce - 'initialValue' is returned if 'len' is 0 and 'initialValue' is present",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n function callbackfn(prevVal, curVal, idx, obj) {\n accessed = true;\n }\n\n return [].reduce(callbackfn, 3) === 3 && !accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce))"
+ },
+ {
+ "id": "15.4.4.21-7-1",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-7-1.js",
+ "description": "Array.prototype.reduce returns initialValue if 'length' is 0 and initialValue is present (empty array)",
+ "test": "assertTrue((function testcase() {\n function cb(){}\n \n try {\n if([].reduce(cb,1) === 1)\n return true;\n }\n catch (e) { } \n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce))"
+ },
+ {
+ "id": "15.4.4.21-7-10",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-7-10.js",
+ "description": "Array.prototype.reduce - 'initialValue' is present",
+ "test": "assertTrue((function testcase() {\n\n var str = \"initialValue is present\";\n return str === [].reduce(function () { }, str);\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce))"
+ },
+ {
+ "id": "15.4.4.21-7-11",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-7-11.js",
+ "description": "Array.prototype.reduce - 'initialValue' is not present",
+ "test": "assertTrue((function testcase() {\n\n var str = \"initialValue is not present\";\n return str === [str].reduce(function () { });\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce))"
+ },
+ {
+ "id": "15.4.4.21-7-2",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-7-2.js",
+ "description": "Array.prototype.reduce returns initialValue if 'length' is 0 and initialValue is present (subclassed Array, length overridden to null (type conversion))",
+ "test": "assertTrue((function testcase() {\n foo.prototype = new Array(1, 2, 3);\n function foo() {}\n var f = new foo();\n f.length = null;\n \n function cb(){}\n try {\n if(f.reduce(cb,1) === 1)\n return true;\n }\n catch (e) { } \n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce))"
+ },
+ {
+ "id": "15.4.4.21-7-3",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-7-3.js",
+ "description": "Array.prototype.reduce returns initialValue if 'length' is 0 and initialValue is present (subclassed Array, length overridden to false (type conversion))",
+ "test": "assertTrue((function testcase() {\n foo.prototype = new Array(1, 2, 3);\n function foo() {}\n var f = new foo();\n f.length = false;\n \n function cb(){}\n try {\n if(f.reduce(cb,1) === 1)\n return true;\n }\n catch (e) { } \n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce))"
+ },
+ {
+ "id": "15.4.4.21-7-4",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-7-4.js",
+ "description": "Array.prototype.reduce returns initialValue if 'length' is 0 and initialValue is present (subclassed Array, length overridden to 0 (type conversion))",
+ "test": "assertTrue((function testcase() {\n foo.prototype = new Array(1, 2, 3);\n function foo() {}\n var f = new foo();\n f.length = 0;\n \n function cb(){}\n try {\n if(f.reduce(cb,1) === 1)\n return true;\n }\n catch (e) { } \n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce))"
+ },
+ {
+ "id": "15.4.4.21-7-5",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-7-5.js",
+ "description": "Array.prototype.reduce returns initialValue if 'length' is 0 and initialValue is present (subclassed Array, length overridden to '0' (type conversion))",
+ "test": "assertTrue((function testcase() {\n foo.prototype = new Array(1, 2, 3);\n function foo() {}\n var f = new foo();\n f.length = '0';\n \n function cb(){}\n try {\n if(f.reduce(cb,1) === 1)\n return true;\n }\n catch (e) { } \n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce))"
+ },
+ {
+ "id": "15.4.4.21-7-6",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-7-6.js",
+ "description": "Array.prototype.reduce returns initialValue if 'length' is 0 and initialValue is present (subclassed Array, length overridden with obj with valueOf)",
+ "test": "assertTrue((function testcase() {\n foo.prototype = new Array(1, 2, 3);\n function foo() {}\n var f = new foo();\n \n var o = { valueOf: function () { return 0;}};\n f.length = o;\n \n function cb(){}\n try {\n if(f.reduce(cb,1) === 1)\n return true;\n }\n catch (e) { } \n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce))"
+ },
+ {
+ "id": "15.4.4.21-7-7",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-7-7.js",
+ "description": "Array.prototype.reduce returns initialValue if 'length' is 0 and initialValue is present (subclassed Array, length overridden with obj w/o valueOf (toString))",
+ "test": "assertTrue((function testcase() {\n foo.prototype = new Array(1, 2, 3);\n function foo() {}\n var f = new foo();\n \n var o = { toString: function () { return '0';}};\n f.length = o;\n \n // objects inherit the default valueOf method of the Object object;\n // that simply returns the itself. Since the default valueOf() method\n // does not return a primitive value, ES next tries to convert the object\n // to a number by calling its toString() method and converting the\n // resulting string to a number.\n\n function cb(){}\n try {\n if(f.reduce(cb,1) === 1)\n return true;\n }\n catch (e) { } \n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce))"
+ },
+ {
+ "id": "15.4.4.21-7-8",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-7-8.js",
+ "description": "Array.prototype.reduce returns initialValue if 'length' is 0 and initialValue is present (subclassed Array, length overridden with [])",
+ "test": "assertTrue((function testcase() {\n foo.prototype = new Array(1, 2, 3);\n function foo() {}\n var f = new foo();\n \n f.length = [];\n \n // objects inherit the default valueOf method of the Object object;\n // that simply returns the itself. Since the default valueOf() method\n // does not return a primitive value, ES next tries to convert the object\n // to a number by calling its toString() method and converting the\n // resulting string to a number.\n //\n // The toString( ) method on Array converts the array elements to strings,\n // then returns the result of concatenating these strings, with commas in\n // between. An array with no elements converts to the empty string, which\n // converts to the number 0. If an array has a single element that is a\n // number n, the array converts to a string representation of n, which is\n // then converted back to n itself. If an array contains more than one element,\n // or if its one element is not a number, the array converts to NaN.\n\n function cb(){}\n try {\n if(f.reduce(cb,1) === 1)\n return true;\n }\n catch (e) { } \n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce))"
+ },
+ {
+ "id": "15.4.4.21-7-9",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-7-9.js",
+ "description": "Array.prototype.reduce returns initialValue if 'length' is 0 and initialValue is present (subclassed Array, length overridden with [0])",
+ "test": "assertTrue((function testcase() {\n foo.prototype = new Array(1, 2, 3);\n function foo() {}\n var f = new foo();\n \n f.length = [0];\n \n // objects inherit the default valueOf method of the Object object;\n // that simply returns the itself. Since the default valueOf() method\n // does not return a primitive value, ES next tries to convert the object\n // to a number by calling its toString() method and converting the\n // resulting string to a number.\n //\n // The toString( ) method on Array converts the array elements to strings,\n // then returns the result of concatenating these strings, with commas in\n // between. An array with no elements converts to the empty string, which\n // converts to the number 0. If an array has a single element that is a\n // number n, the array converts to a string representation of n, which is\n // then converted back to n itself. If an array contains more than one element,\n // or if its one element is not a number, the array converts to NaN.\n\n function cb(){}\n try {\n if(f.reduce(cb,1) === 1)\n return true;\n }\n catch (e) { } \n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce))"
+ },
+ {
+ "id": "15.4.4.21-8-b-1",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-1.js",
+ "description": "Array.prototype.reduce - no observable effects occur if 'len' is 0",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n\n var obj = { length: 0 };\n\n Object.defineProperty(obj, \"0\", {\n get: function () {\n accessed = true;\n return 10;\n },\n configurable: true\n });\n\n try {\n Array.prototype.reduce.call(obj, function () { });\n return false;\n } catch (ex) {\n return !accessed;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects())"
+ },
+ {
+ "id": "15.4.4.21-8-b-2",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-2.js",
+ "description": "Array.prototype.reduce - modifications to length don't change number of iterations in step 9",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(prevVal, curVal, idx, obj) {\n return idx;\n }\n\n var obj = { 3: 12, 4: 9, length: 4 };\n\n Object.defineProperty(obj, \"2\", {\n get: function () {\n obj.length = 10;\n return 11;\n },\n configurable: true\n });\n\n return Array.prototype.reduce.call(obj, callbackfn) === 3;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects())"
+ },
+ {
+ "id": "15.4.4.21-8-b-3",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-3.js",
+ "description": "Array.prototype.reduce - loop is broken once 'kPresent' is true",
+ "test": "assertTrue((function testcase() {\n\n var called = 0;\n var testResult = false;\n var firstCalled = 0;\n var secondCalled = 0;\n\n function callbackfn(prevVal, val, idx, obj) {\n if (called === 0) {\n testResult = (idx === 1);\n }\n called++;\n }\n\n var arr = [, , ];\n\n Object.defineProperty(arr, \"0\", {\n get: function () {\n firstCalled++;\n return 11;\n },\n configurable: true\n });\n\n Object.defineProperty(arr, \"1\", {\n get: function () {\n secondCalled++;\n return 9;\n },\n configurable: true\n });\n\n arr.reduce(callbackfn);\n return testResult && firstCalled === 1 && secondCalled === 1;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.4.4.21-8-b-ii-1",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-ii-1.js",
+ "description": "Array.prototype.reduce - added properties in step 2 are visible here",
+ "test": "assertTrue((function testcase() {\n\n var obj = { };\n\n Object.defineProperty(obj, \"length\", {\n get: function () {\n obj[1] = \"accumulator\";\n return 3;\n },\n configurable: true\n });\n\n return Array.prototype.reduce.call(obj, function () { }) === \"accumulator\";\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.4.4.21-8-b-ii-2",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-ii-2.js",
+ "description": "Array.prototype.reduce - deleted properties in step 2 are visible here",
+ "test": "assertTrue((function testcase() {\n\n var obj = { 1: \"accumulator\", 2: \"another\" };\n\n Object.defineProperty(obj, \"length\", {\n get: function () {\n delete obj[1];\n return 3;\n },\n configurable: true\n });\n\n return \"accumulator\" !== Array.prototype.reduce.call(obj, function () { });\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.4.4.21-8-b-iii-1-1",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-iii-1-1.js",
+ "description": "Array.prototype.reduce - element to be retrieved is own data property on an Array-like object",
+ "test": "assertTrue((function testcase() {\n\n var testResult = false;\n function callbackfn(prevVal, curVal, idx, obj) {\n if (idx === 1) {\n testResult = (prevVal === 0);\n }\n }\n\n var obj = { 0: 0, 1: 1, 2: 2, length: 2 };\n Array.prototype.reduce.call(obj, callbackfn);\n return testResult;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce))"
+ },
+ {
+ "id": "15.4.4.21-8-b-iii-1-10",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-iii-1-10.js",
+ "description": "Array.prototype.reduce - when element to be retrieved is own accessor property on an Array",
+ "test": "assertTrue((function testcase() {\n var testResult = false;\n\n function callbackfn(prevVal, curVal, idx, obj) {\n if (idx === 1) {\n testResult = (prevVal === 0);\n }\n }\n\n var arr = [, 1, 2];\n\n Object.defineProperty(arr, \"0\", {\n get: function () {\n return 0;\n },\n configurable: true\n });\n\n arr.reduce(callbackfn);\n return testResult;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.4.4.21-8-b-iii-1-11",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-iii-1-11.js",
+ "description": "Array.prototype.reduce - element to be retrieved is own accessor property that overrides an inherited data property on an Array-like object",
+ "test": "assertTrue((function testcase() {\n\n var testResult = false;\n function callbackfn(prevVal, curVal, idx, obj) {\n if (idx === 1) {\n testResult = (prevVal === \"9\");\n }\n }\n\n var proto = { 0: 0, 1: 1, 2: 2 };\n\n var Con = function () { };\n Con.prototype = proto;\n\n var child = new Con();\n child.length = 3;\n\n Object.defineProperty(child, \"0\", {\n get: function () {\n return \"9\";\n },\n configurable: true\n });\n\n Array.prototype.reduce.call(child, callbackfn);\n return testResult;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects())"
+ },
+ {
+ "id": "15.4.4.21-8-b-iii-1-12",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-iii-1-12.js",
+ "description": "Array.prototype.reduce - element to be retrieved is own accessor property that overrides an inherited data property on an Array",
+ "test": "assertTrue((function testcase() {\n var testResult = false;\n\n function callbackfn(prevVal, curVal, idx, obj) {\n if (idx === 1) {\n testResult = (prevVal === \"9\");\n }\n }\n\n try {\n Array.prototype[0] = 0;\n var arr = [, 1, 2];\n\n Object.defineProperty(arr, \"0\", {\n get: function () {\n return \"9\";\n },\n configurable: true\n });\n\n arr.reduce(callbackfn);\n return testResult;\n } finally {\n delete Array.prototype[0];\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.4.4.21-8-b-iii-1-13",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-iii-1-13.js",
+ "description": "Array.prototype.reduce - element to be retrieved is own accessor property that overrides an inherited accessor property on an Array-like object",
+ "test": "assertTrue((function testcase() {\n var testResult = false;\n\n function callbackfn(prevVal, curVal, idx, obj) {\n if (idx === 1) {\n testResult = (prevVal === \"9\");\n }\n }\n\n var proto = { 1: 1, 2: 2};\n\n Object.defineProperty(proto, \"0\", {\n get: function () {\n return 0;\n },\n configurable: true\n });\n\n var Con = function () { };\n Con.prototype = proto;\n\n var child = new Con();\n child.length = 3;\n\n Object.defineProperty(child, \"0\", {\n get: function () {\n return \"9\";\n },\n configurable: true\n });\n\n Array.prototype.reduce.call(child, callbackfn);\n return testResult;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects())"
+ },
+ {
+ "id": "15.4.4.21-8-b-iii-1-14",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-iii-1-14.js",
+ "description": "Array.prototype.reduce - element to be retrieved is own accessor property that overrides an inherited accessor property on an Array",
+ "test": "assertTrue((function testcase() {\n\n var testResult = false;\n function callbackfn(prevVal, curVal, idx, obj) {\n if (idx === 1) {\n testResult = (prevVal === \"9\");\n }\n }\n\n try {\n Object.defineProperty(Array.prototype, \"0\", {\n get: function () {\n return 0;\n },\n configurable: true\n });\n\n var arr = [, 1, 2];\n Object.defineProperty(arr, \"0\", {\n get: function () {\n return \"9\";\n },\n configurable: true\n });\n\n arr.reduce(callbackfn);\n return testResult;\n } finally {\n delete Array.prototype[0];\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.4.4.21-8-b-iii-1-15",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-iii-1-15.js",
+ "description": "Array.prototype.reduce - element to be retrieved is inherited accessor property on an Array-like object",
+ "test": "assertTrue((function testcase() {\n\n var testResult = false;\n function callbackfn(prevVal, curVal, idx, obj) {\n if (idx === 1) {\n testResult = (prevVal === 0);\n }\n }\n\n var proto = { 1: 1, 2: 2 };\n\n Object.defineProperty(proto, \"0\", {\n get: function () {\n return 0;\n },\n configurable: true\n });\n\n var Con = function () { };\n Con.prototype = proto;\n\n var child = new Con();\n child.length = 3;\n\n Array.prototype.reduce.call(child, callbackfn);\n return testResult;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects())"
+ },
+ {
+ "id": "15.4.4.21-8-b-iii-1-16",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-iii-1-16.js",
+ "description": "Array.prototype.reduce - element to be retrieved is inherited accessor property on an Array",
+ "test": "assertTrue((function testcase() {\n\n var testResult = false;\n function callbackfn(prevVal, curVal, idx, obj) {\n if (idx === 1) {\n testResult = (prevVal === 0);\n }\n }\n\n try {\n Object.defineProperty(Array.prototype, \"0\", {\n get: function () {\n return 0;\n },\n configurable: true\n });\n\n var arr = [, 1, 2];\n\n arr.reduce(callbackfn);\n return testResult;\n } finally {\n delete Array.prototype[0];\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce) && fnExists(Object.defineProperty) && ![, 1].hasOwnProperty(0) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.4.4.21-8-b-iii-1-17",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-iii-1-17.js",
+ "description": "Array.prototype.reduce - element to be retrieved is own accessor property without a get function on an Array-like object",
+ "test": "assertTrue((function testcase() {\n\n var testResult = false;\n function callbackfn(prevVal, curVal, idx, obj) {\n if (idx === 1) {\n testResult = (prevVal === undefined);\n }\n }\n\n var obj = { 1: 1, 2: 2, length: 3 };\n\n Object.defineProperty(obj, \"0\", {\n set: function () { },\n configurable: true\n });\n\n Array.prototype.reduce.call(obj, callbackfn);\n return testResult;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects())"
+ },
+ {
+ "id": "15.4.4.21-8-b-iii-1-18",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-iii-1-18.js",
+ "description": "Array.prototype.reduce - element to be retrieved is own accessor property without a get function on an Array",
+ "test": "assertTrue((function testcase() {\n\n var testResult = false;\n function callbackfn(prevVal, curVal, idx, obj) {\n if (idx === 1) {\n testResult = (prevVal === undefined);\n }\n }\n\n var arr = [, 1, 2];\n\n Object.defineProperty(arr, \"0\", {\n set: function () { },\n configurable: true\n });\n\n arr.reduce(callbackfn);\n return testResult;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.4.4.21-8-b-iii-1-19",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-iii-1-19.js",
+ "description": "Array.prototype.reduce - element to be retrieved is own accessor property without a get function that overrides an inherited accessor property on an Array-like object",
+ "test": "assertTrue((function testcase() {\n\n var testResult = false;\n function callbackfn(prevVal, curVal, idx, obj) {\n if (idx === 1) {\n testResult = (prevVal === undefined);\n }\n }\n\n try {\n Object.prototype[0] = 0;\n\n var obj = { 1: 1, 2: 2, length: 3 };\n\n Object.defineProperty(obj, \"0\", {\n set: function () { },\n configurable: true\n });\n\n Array.prototype.reduce.call(obj, callbackfn);\n return testResult;\n } finally {\n delete Object.prototype[0];\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects())"
+ },
+ {
+ "id": "15.4.4.21-8-b-iii-1-2",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-iii-1-2.js",
+ "description": "Array.prototype.reduce - element to be retrieved is own data property on an Array",
+ "test": "assertTrue((function testcase() {\n\n var testResult = false;\n function callbackfn(prevVal, curVal, idx, obj) {\n if (idx === 1) {\n testResult = (prevVal === 0);\n }\n }\n\n var arr = [0, 1, 2];\n arr.reduce(callbackfn);\n return testResult;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce))"
+ },
+ {
+ "id": "15.4.4.21-8-b-iii-1-20",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-iii-1-20.js",
+ "description": "Array.prototype.reduce - element to be retrieved is own accessor property without a get function that overrides an inherited accessor property on an Array",
+ "test": "assertTrue((function testcase() {\n\n var testResult = false;\n function callbackfn(prevVal, curVal, idx, obj) {\n if (idx === 1) {\n testResult = (prevVal === undefined);\n }\n }\n\n try {\n Array.prototype[0] = 0;\n var arr = [, 1, 2];\n Object.defineProperty(arr, \"0\", {\n set: function () { },\n configurable: true\n });\n\n arr.reduce(callbackfn);\n return testResult;\n\n } finally {\n delete Array.prototype[0];\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.4.4.21-8-b-iii-1-21",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-iii-1-21.js",
+ "description": "Array.prototype.reduce - element to be retrieved is inherited accessor property without a get function on an Array-like object",
+ "test": "assertTrue((function testcase() {\n\n var testResult = false;\n function callbackfn(prevVal, curVal, idx, obj) {\n if (idx === 1) {\n testResult = (prevVal === undefined);\n }\n }\n\n var proto = { 1: 1, 2: 2 };\n\n Object.defineProperty(proto, \"0\", {\n set: function () { },\n configurable: true\n });\n\n var Con = function () { };\n Con.prototype = proto;\n\n var child = new Con();\n child.length = 3;\n\n Array.prototype.reduce.call(child, callbackfn);\n return testResult;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects())"
+ },
+ {
+ "id": "15.4.4.21-8-b-iii-1-22",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-iii-1-22.js",
+ "description": "Array.prototype.reduce - element to be retrieved is inherited accessor property without a get function on an Array",
+ "test": "assertTrue((function testcase() {\n \n var testResult = false;\n function callbackfn(prevVal, curVal, idx, obj) {\n if (idx === 1) {\n testResult = (prevVal === undefined);\n }\n }\n\n try {\n Object.defineProperty(Array.prototype, \"0\", {\n set: function () { },\n configurable: true\n });\n\n var arr = [, 1, 2];\n\n arr.reduce(callbackfn);\n return testResult;\n\n } finally {\n delete Array.prototype[0];\n }\n\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce) && fnExists(Object.defineProperty) && ![, 1].hasOwnProperty(0) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.4.4.21-8-b-iii-1-23",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-iii-1-23.js",
+ "description": "Array.prototype.reduce - This object is the global object which contains index property",
+ "test": "assertTrue((function testcase() {\n\n var testResult = false;\n function callbackfn(prevVal, curVal, idx, obj) {\n if (idx === 1) {\n testResult = (prevVal === 0);\n }\n }\n\n try {\n var oldLen = fnGlobalObject().length;\n fnGlobalObject()[0] = 0;\n fnGlobalObject()[1] = 1;\n fnGlobalObject()[2] = 2;\n fnGlobalObject().length = 3;\n\n Array.prototype.reduce.call(fnGlobalObject(), callbackfn);\n return testResult;\n\n } finally {\n delete fnGlobalObject()[0];\n delete fnGlobalObject()[1];\n delete fnGlobalObject()[2];\n fnGlobalObject().length = oldLen;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce))"
+ },
+ {
+ "id": "15.4.4.21-8-b-iii-1-25",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-iii-1-25.js",
+ "description": "Array.prototype.reduce - This object is the Arguments object which implements its own property get method (number of arguments is less than number of parameters)",
+ "test": "assertTrue((function testcase() {\n\n var testResult = false;\n function callbackfn(prevVal, curVal, idx, obj) {\n if (idx === 1) {\n testResult = (prevVal === 0);\n }\n }\n\n var func = function (a, b, c) {\n Array.prototype.reduce.call(arguments, callbackfn);\n };\n\n func(0, 1);\n return testResult;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce))"
+ },
+ {
+ "id": "15.4.4.21-8-b-iii-1-26",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-iii-1-26.js",
+ "description": "Array.prototype.reduce - This object is the Arguments object which implements its own property get method (number of arguments equals number of parameters)",
+ "test": "assertTrue((function testcase() {\n\n var testResult = false;\n function callbackfn(prevVal, curVal, idx, obj) {\n if (idx === 2) {\n testResult = (prevVal === 1);\n }\n }\n\n var func = function (a, b, c) {\n delete arguments[0];\n Array.prototype.reduce.call(arguments, callbackfn);\n };\n\n func(0, 1, 2);\n return testResult;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce))"
+ },
+ {
+ "id": "15.4.4.21-8-b-iii-1-27",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-iii-1-27.js",
+ "description": "Array.prototype.reduce - This object is the Arguments object which implements its own property get method (number of arguments is greater than number of parameters)",
+ "test": "assertTrue((function testcase() {\n\n var testResult = false;\n function callbackfn(prevVal, curVal, idx, obj) {\n if (idx === 3) {\n testResult = (prevVal === 2);\n }\n }\n\n var func = function (a, b, c) {\n delete arguments[0];\n delete arguments[1];\n Array.prototype.reduce.call(arguments, callbackfn);\n };\n\n func(0, 1, 2, 3);\n return testResult;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce))"
+ },
+ {
+ "id": "15.4.4.21-8-b-iii-1-28",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-iii-1-28.js",
+ "description": "Array.prototype.reduce - applied to String object, which implements its own property get method",
+ "test": "assertTrue((function testcase() {\n\n var testResult = false;\n function callbackfn(prevVal, curVal, idx, obj) {\n if (idx === 1) {\n testResult = (prevVal === \"0\");\n }\n }\n\n var str = new String(\"012\");\n Array.prototype.reduce.call(str, callbackfn);\n return testResult;\n\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce))"
+ },
+ {
+ "id": "15.4.4.21-8-b-iii-1-29",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-iii-1-29.js",
+ "description": "Array.prototype.reduce - applied to Function object which implements its own property get method",
+ "test": "assertTrue((function testcase() {\n\n var testResult = false;\n function callbackfn(prevVal, curVal, idx, obj) {\n if (idx === 1) {\n testResult = (prevVal === 0);\n }\n }\n\n var obj = function (a, b, c) {\n return a + b + c;\n };\n obj[0] = 0;\n obj[1] = 1;\n obj[2] = 2;\n obj[3] = 3;\n\n Array.prototype.reduce.call(obj, callbackfn);\n return testResult;\n\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce))"
+ },
+ {
+ "id": "15.4.4.21-8-b-iii-1-3",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-iii-1-3.js",
+ "description": "Array.prototype.reduce - element to be retrieved is own data property that overrides an inherited data property on an Array-like object",
+ "test": "assertTrue((function testcase() {\n\n var testResult = false;\n function callbackfn(prevVal, curVal, idx, obj) {\n if (idx === 1) {\n testResult = (prevVal === \"9\");\n }\n }\n\n var proto = { 0: 0, 1: 1, 2: 2, length: 3 };\n var Con = function () { };\n Con.prototype = proto;\n\n var child = new Con();\n child[0] = \"9\";\n child[1] = \"1\";\n child.length = 3;\n\n Array.prototype.reduce.call(child, callbackfn);\n return testResult;\n\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce))"
+ },
+ {
+ "id": "15.4.4.21-8-b-iii-1-30",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-iii-1-30.js",
+ "description": "Array.prototype.reduce - element changed by getter on current iterations is observed in subsequent iterations on an Array",
+ "test": "assertTrue((function testcase() {\n\n var testResult = false;\n function callbackfn(prevVal, curVal, idx, obj) {\n if (idx === 1) {\n testResult = (curVal === 1);\n }\n }\n\n var arr = [, , 2];\n var preIterVisible = false;\n\n Object.defineProperty(arr, \"0\", {\n get: function () {\n preIterVisible = true;\n return 0;\n },\n configurable: true\n });\n\n Object.defineProperty(arr, \"1\", {\n get: function () {\n if (preIterVisible) {\n return 1;\n } else {\n return 100;\n }\n },\n configurable: true\n });\n\n arr.reduce(callbackfn);\n return testResult;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.4.4.21-8-b-iii-1-31",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-iii-1-31.js",
+ "description": "Array.prototype.reduce - element changed by getter on current iterations is observed in subsequent iterations on an Array-like object",
+ "test": "assertTrue((function testcase() {\n\n var testResult = false;\n function callbackfn(prevVal, curVal, idx, obj) {\n if (idx === 1) {\n testResult = (curVal === 1);\n }\n }\n\n var obj = { length: 2 };\n var preIterVisible = false;\n\n Object.defineProperty(obj, \"0\", {\n get: function () {\n preIterVisible = true;\n return 0;\n },\n configurable: true\n });\n\n Object.defineProperty(obj, \"1\", {\n get: function () {\n if (preIterVisible) {\n return 1;\n } else {\n return 100;\n }\n },\n configurable: true\n });\n\n Array.prototype.reduce.call(obj, callbackfn);\n return testResult;\n\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects())"
+ },
+ {
+ "id": "15.4.4.21-8-b-iii-1-32",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-iii-1-32.js",
+ "description": "Array.prototype.reduce - exception in getter terminates iteration on an Array-like object",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n var testResult = false;\n function callbackfn(prevVal, curVal, idx, obj) {\n if (idx >= 1) {\n accessed = true;\n testResult = (prevVal === 0);\n }\n }\n\n var obj = { 2: 2, 1: 1, length: 3 };\n Object.defineProperty(obj, \"0\", {\n get: function () {\n throw new RangeError(\"unhandle exception happened in getter\");\n },\n configurable: true\n });\n\n try {\n Array.prototype.reduce.call(obj, callbackfn);\n return false;\n } catch (ex) {\n return (ex instanceof RangeError) && !accessed && !testResult;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects())"
+ },
+ {
+ "id": "15.4.4.21-8-b-iii-1-33",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-iii-1-33.js",
+ "description": "Array.prototype.reduce - exception in getter terminates iteration on an Array",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n var testResult = false;\n function callbackfn(prevVal, curVal, idx, obj) {\n if (idx >= 1) {\n accessed = true;\n testResult = (prevVal === 0);\n }\n }\n\n var arr = [, 1, 2];\n\n Object.defineProperty(arr, \"0\", {\n get: function () {\n throw new RangeError(\"unhandle exception happened in getter\");\n },\n configurable: true\n });\n\n try {\n arr.reduce(callbackfn);\n return false;\n } catch (ex) {\n return (ex instanceof RangeError) && !accessed && !testResult;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.4.4.21-8-b-iii-1-4",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-iii-1-4.js",
+ "description": "Array.prototype.reduce - element to be retrieved is own data property that overrides an inherited data property on an Array",
+ "test": "assertTrue((function testcase() {\n\n var testResult = false;\n function callbackfn(prevVal, curVal, idx, obj) {\n if (idx === 1) {\n testResult = (prevVal === 0);\n }\n }\n\n try {\n Array.prototype[0] = \"9\";\n [0, 1, 2].reduce(callbackfn);\n return testResult;\n\n } finally {\n delete Array.prototype[0];\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce))"
+ },
+ {
+ "id": "15.4.4.21-8-b-iii-1-5",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-iii-1-5.js",
+ "description": "Array.prototype.reduce - element to be retrieved is own data property that overrides an inherited accessor property on an Array-like object",
+ "test": "assertTrue((function testcase() {\n\n var testResult = false;\n function callbackfn(prevVal, curVal, idx, obj) {\n if (idx === 1) {\n testResult = (prevVal === \"9\");\n }\n }\n\n var proto = {};\n\n Object.defineProperty(proto, \"0\", {\n get: function () {\n return 0;\n },\n configurable: true\n });\n\n var Con = function () { };\n Con.prototype = proto;\n\n var child = new Con();\n child.length = 2;\n Object.defineProperty(child, \"0\", {\n value: \"9\",\n configurable: true\n });\n child[1] = \"1\";\n\n Array.prototype.reduce.call(child, callbackfn);\n return testResult;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects())"
+ },
+ {
+ "id": "15.4.4.21-8-b-iii-1-6",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-iii-1-6.js",
+ "description": "Array.prototype.reduce - element to be retrieved is own data property that overrides an inherited accessor property on an Array",
+ "test": "assertTrue((function testcase() {\n\n var testResult = false;\n function callbackfn(prevVal, curVal, idx, obj) {\n if (idx === 1) {\n testResult = (prevVal === 0);\n }\n }\n\n try {\n Object.defineProperty(Array.prototype, \"0\", {\n get: function () {\n return \"5\";\n },\n configurable: true\n });\n\n [0, 1, 2].reduce(callbackfn);\n return testResult;\n } finally {\n delete Array.prototype[0];\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.4.4.21-8-b-iii-1-7",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-iii-1-7.js",
+ "description": "Array.prototype.reduce - element to be retrieved is inherited data property on an Array-like object",
+ "test": "assertTrue((function testcase() {\n\n var testResult = false;\n function callbackfn(prevVal, curVal, idx, obj) {\n if (idx === 1) {\n testResult = (prevVal === 0);\n }\n }\n\n var proto = { 0: 0, 1: 1, 2: 2, length: 3 };\n var Con = function () { };\n Con.prototype = proto;\n\n var child = new Con();\n child.length = 3;\n\n Array.prototype.reduce.call(child, callbackfn);\n return testResult;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce))"
+ },
+ {
+ "id": "15.4.4.21-8-b-iii-1-8",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-iii-1-8.js",
+ "description": "Array.prototype.reduce - element to be retrieved is inherited data property on an Array",
+ "test": "assertTrue((function testcase() {\n\n var testResult = false;\n function callbackfn(prevVal, curVal, idx, obj) {\n if (idx === 1) {\n testResult = (prevVal === 0);\n }\n }\n\n try {\n Array.prototype[0] = 0;\n Array.prototype[1] = 1;\n Array.prototype[2] = 2;\n [, , ,].reduce(callbackfn);\n return testResult;\n } finally {\n delete Array.prototype[0];\n delete Array.prototype[1];\n delete Array.prototype[2];\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce) && ![, 1].hasOwnProperty(0))"
+ },
+ {
+ "id": "15.4.4.21-8-b-iii-1-9",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-b-iii-1-9.js",
+ "description": "Array.prototype.reduce - element to be retrieved is own accessor property on an Array-like object",
+ "test": "assertTrue((function testcase() {\n\n var testResult = false;\n function callbackfn(prevVal, curVal, idx, obj) {\n if (idx === 1) {\n testResult = (prevVal === 0);\n }\n }\n\n var obj = { 1: 1, 2: 2, length: 3 };\n Object.defineProperty(obj, \"0\", {\n get: function () {\n return 0;\n },\n configurable: true\n });\n\n Array.prototype.reduce.call(obj, callbackfn);\n return testResult;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects())"
+ },
+ {
+ "id": "15.4.4.21-8-c-1",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-c-1.js",
+ "description": "Array.prototype.reduce throws TypeError when Array is empty and initialValue is not present",
+ "test": "assertTrue((function testcase() { \n \n function callbackfn(prevVal, curVal, idx, obj)\n {\n }\n\n var arr = new Array(10);\n try {\n arr.reduce(callbackfn);\n } \n catch(e) {\n if(e instanceof TypeError)\n return true; \n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce))"
+ },
+ {
+ "id": "15.4.4.21-8-c-2",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-c-2.js",
+ "description": "Array.prototype.reduce throws TypeError when elements assigned values are deleted by reducing array length and initialValue is not present",
+ "test": "assertTrue((function testcase() { \n \n function callbackfn(prevVal, curVal, idx, obj)\n {\n }\n\n var arr = new Array(10);\n arr[9] = 1;\n arr.length = 5;\n try {\n arr.reduce(callbackfn);\n } \n catch(e) {\n if(e instanceof TypeError)\n return true; \n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce))"
+ },
+ {
+ "id": "15.4.4.21-8-c-3",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-c-3.js",
+ "description": "Array.prototype.reduce throws TypeError when elements assigned values are deleted and initialValue is not present",
+ "test": "assertTrue((function testcase() { \n \n function callbackfn(prevVal, curVal, idx, obj)\n {\n }\n\n var arr = [1,2,3,4,5];\n delete arr[0];\n delete arr[1];\n delete arr[2];\n delete arr[3];\n delete arr[4];\n try {\n arr.reduce(callbackfn);\n } \n catch(e) {\n if(e instanceof TypeError)\n return true; \n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce))"
+ },
+ {
+ "id": "15.4.4.21-8-c-4",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-c-4.js",
+ "description": "Array.prototype.reduce doesn't throw error when array has no own properties but prototype contains a single property",
+ "test": "assertTrue((function testcase() {\n\n var arr = [, , , ];\n\n try {\n Array.prototype[1] = \"prototype\";\n arr.reduce(function () { });\n return true;\n } catch (ex) {\n return false;\n } finally {\n delete Array.prototype[1];\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce) && ![, 1].hasOwnProperty(0))"
+ },
+ {
+ "id": "15.4.4.21-8-c-5",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-c-5.js",
+ "description": "Array.prototype.reduce - if exception occurs, it occurs after any side-effects that might be produced by step 2",
+ "test": "assertTrue((function testcase() {\n\n var obj = { };\n\n var accessed = false;\n\n Object.defineProperty(obj, \"length\", {\n get: function () {\n accessed = true;\n return 2;\n },\n configurable: true\n });\n\n try {\n Array.prototype.reduce.call(obj, function () { });\n return false;\n } catch (ex) {\n return (ex instanceof TypeError) && accessed;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.4.4.21-8-c-6",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-c-6.js",
+ "description": "Array.prototype.reduce - if exception occurs, it occurs after any side-effects that might be produced by step 3",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n\n var accessed = false;\n\n Object.defineProperty(obj, \"length\", {\n get: function () {\n return {\n toString: function () {\n accessed = true;\n return \"2\";\n }\n };\n },\n configurable: true\n });\n\n try {\n Array.prototype.reduce.call(obj, function () { });\n return false;\n } catch (ex) {\n return (ex instanceof TypeError) && accessed;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.4.4.21-8-c-7",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-c-7.js",
+ "description": "Array.prototype.reduce - the exception is not thrown if exception was thrown by step 2",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n\n Object.defineProperty(obj, \"length\", {\n get: function () {\n throw new SyntaxError();\n },\n configurable: true\n });\n\n try {\n Array.prototype.reduce.call(obj, function () { });\n return false;\n } catch (ex) {\n return !(ex instanceof TypeError);\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.4.4.21-8-c-8",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-8-c-8.js",
+ "description": "Array.prototype.reduce - the exception is not thrown if exception was thrown by step 3",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n\n Object.defineProperty(obj, \"length\", {\n get: function () {\n return {\n toString: function () {\n throw new SyntaxError();\n }\n };\n },\n configurable: true\n });\n\n try {\n Array.prototype.reduce.call(obj, function () { });\n return false;\n } catch (ex) {\n return !(ex instanceof TypeError);\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.4.4.21-9-1",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-1.js",
+ "description": "Array.prototype.reduce doesn't consider new elements added to array after it is called",
+ "test": "assertTrue((function testcase() {\n function callbackfn(prevVal, curVal, idx, obj) {\n arr[5] = 6;\n arr[2] = 3;\n return prevVal + curVal;\n }\n\n var arr = [1, 2, , 4, '5'];\n return arr.reduce(callbackfn) === \"105\";\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce))"
+ },
+ {
+ "id": "15.4.4.21-9-10",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-10.js",
+ "description": "Array.prototype.reduce called with an initial value doesn't consider new elements added to array after it is called",
+ "test": "assertTrue((function testcase() { \n \n function callbackfn(prevVal, curVal, idx, obj) {\n arr[5] = 6;\n arr[2] = 3; \n return prevVal + curVal;\n }\n\n var arr = [1,2,,4,'5'];\n return arr.reduce(callbackfn, \"\") === \"12345\";\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce))"
+ },
+ {
+ "id": "15.4.4.21-9-2",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-2.js",
+ "description": "Array.prototype.reduce considers new value of elements in array after it is called",
+ "test": "assertTrue((function testcase() { \n \n function callbackfn(prevVal, curVal, idx, obj)\n {\n arr[3] = -2;\n arr[4] = -1;\n return prevVal + curVal;\n }\n\n var arr = [1,2,3,4,5];\n if(arr.reduce(callbackfn) === 3)\n return true; \n \n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce))"
+ },
+ {
+ "id": "15.4.4.21-9-3",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-3.js",
+ "description": "Array.prototype.reduce doesn't visit deleted elements in array after the call",
+ "test": "assertTrue((function testcase() { \n \n function callbackfn(prevVal, curVal, idx, obj) \n {\n delete arr[3];\n delete arr[4];\n return prevVal + curVal; \n }\n\n var arr = ['1',2,3,4,5];\n if(arr.reduce(callbackfn) === \"123\" ) // two elements deleted\n return true; \n \n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce))"
+ },
+ {
+ "id": "15.4.4.21-9-4",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-4.js",
+ "description": "Array.prototype.reduce doesn't visit deleted elements when Array.length is decreased",
+ "test": "assertTrue((function testcase() { \n \n function callbackfn(prevVal, curVal, idx, obj)\n {\n arr.length = 2;\n return prevVal + curVal;\n }\n\n var arr = [1,2,3,4,5];\n if(arr.reduce(callbackfn) === 3 )\n return true; \n \n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce))"
+ },
+ {
+ "id": "15.4.4.21-9-5",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-5.js",
+ "description": "Array.prototype.reduce - callbackfn not called for array with one element",
+ "test": "assertTrue((function testcase() { \n \n var callCnt = 0;\n function callbackfn(prevVal, curVal, idx, obj)\n {\n callCnt++;\n return 2;\n }\n\n var arr = [1];\n if(arr.reduce(callbackfn) === 1 && callCnt === 0 )\n return true; \n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce))"
+ },
+ {
+ "id": "15.4.4.21-9-6",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-6.js",
+ "description": "Array.prototype.reduce visits deleted element in array after the call when same index is also present in prototype",
+ "test": "assertTrue((function testcase() { \n \n function callbackfn(prevVal, curVal, idx, obj) \n {\n delete arr[3];\n delete arr[4];\n return prevVal + curVal; \n }\n\n Array.prototype[4] = 5;\n var arr = ['1',2,3,4,5];\n var res = arr.reduce(callbackfn);\n delete Array.prototype[4];\n\n if(res === \"1235\" ) //one element acually deleted\n return true; \n \n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce))"
+ },
+ {
+ "id": "15.4.4.21-9-7",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-7.js",
+ "description": "Array.prototype.reduce stops calling callbackfn once the array is deleted during the call",
+ "test": "assertTrue((function testcase() {\n function callbackfn(prevVal, curVal, idx, obj) {\n delete o.arr;\n return prevVal + curVal;\n }\n\n var o = new Object();\n o.arr = ['1', 2, 3, 4, 5];\n return o.arr.reduce(callbackfn) === \"12345\" && !o.hasOwnProperty(\"arr\");\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce))"
+ },
+ {
+ "id": "15.4.4.21-9-8",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-8.js",
+ "description": "Array.prototype.reduce - no observable effects occur if 'len' is 0",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n var callbackAccessed = false;\n function callbackfn() {\n callbackAccessed = true;\n }\n\n var obj = { length: 0 };\n\n Object.defineProperty(obj, \"0\", {\n get: function () {\n accessed = true;\n return 10;\n },\n configurable: true\n });\n\n Array.prototype.reduce.call(obj, function () { }, \"initialValue\");\n return !accessed && !callbackAccessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects())"
+ },
+ {
+ "id": "15.4.4.21-9-9",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-9.js",
+ "description": "Array.prototype.reduce - modifications to length don't change number of iterations in step 9",
+ "test": "assertTrue((function testcase() {\n var called = 0;\n function callbackfn(accum, val, idx, obj) {\n called++;\n return accum + val;\n }\n\n var arr = [0, 1, 2, 3];\n Object.defineProperty(arr, \"0\", {\n get: function () {\n arr.length = 2;\n return 0;\n },\n configurable: true\n });\n\n var newAccum = arr.reduce(callbackfn, \"initialValue\");\n\n return newAccum === \"initialValue01\" && called === 2;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.4.4.21-9-b-1",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-b-1.js",
+ "description": "Array.prototype.reduce returns initialvalue when Array is empty and initialValue is present",
+ "test": "assertTrue((function testcase() { \n \n function callbackfn(prevVal, curVal, idx, obj)\n {\n }\n\n var arr = new Array(10);\n\n if(arr.reduce(callbackfn,5) === 5)\n return true; \n\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce))"
+ },
+ {
+ "id": "15.4.4.21-9-b-10",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-b-10.js",
+ "description": "Array.prototype.reduce - deleting property of prototype in step 8 causes deleted index property not to be visited on an Array-like Object",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n var testResult = true;\n\n function callbackfn(accum, val, idx, obj) {\n accessed = true;\n if (idx === 3) {\n testResult = false;\n }\n }\n\n var obj = { 2: 2, length: 20 };\n\n Object.defineProperty(obj, \"0\", {\n get: function () {\n delete Object.prototype[3];\n return 0;\n },\n configurable: true\n });\n\n try {\n Object.prototype[3] = 1;\n Array.prototype.reduce.call(obj, callbackfn);\n return testResult && accessed;\n } finally {\n delete Object.prototype[3];\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects())"
+ },
+ {
+ "id": "15.4.4.21-9-b-11",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-b-11.js",
+ "description": "Array.prototype.reduce - deleting property of prototype in step 8 causes deleted index property not to be visited on an Array",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n var testResult = true;\n\n function callbackfn(accum, val, idx, obj) {\n accessed = true;\n if (idx === 1) {\n testResult = false;\n }\n }\n\n var arr = [, , , 3];\n Object.defineProperty(arr, \"0\", {\n get: function () {\n delete Array.prototype[1];\n return 0;\n },\n configurable: true\n });\n\n try {\n Array.prototype[1] = 1;\n arr.reduce(callbackfn);\n return testResult && accessed;\n } finally {\n delete Array.prototype[1];\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce) && fnExists(Object.defineProperty) && ![, 1].hasOwnProperty(0) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.4.4.21-9-b-12",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-b-12.js",
+ "description": "Array.prototype.reduce - deleting own property with prototype property in step 8 causes prototype index property to be visited on an Array-like object",
+ "test": "assertTrue((function testcase() {\n\n var testResult = false;\n\n function callbackfn(accum, val, idx, obj) {\n if (idx === 1 && val === 1) {\n testResult = true;\n }\n }\n\n var obj = { 0: 0, 1: 111, 4: 10, length: 10 };\n\n Object.defineProperty(obj, \"0\", {\n get: function () {\n delete obj[1];\n return 0;\n },\n configurable: true\n });\n\n try {\n Object.prototype[1] = 1;\n Array.prototype.reduce.call(obj, callbackfn);\n return testResult;\n } finally {\n delete Object.prototype[1];\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects())"
+ },
+ {
+ "id": "15.4.4.21-9-b-13",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-b-13.js",
+ "description": "Array.prototype.reduce - deleting own property with prototype property in step 8 causes prototype index property to be visited on an Array",
+ "test": "assertTrue((function testcase() {\n\n var testResult = false;\n\n function callbackfn(accum, val, idx, obj) {\n if (idx === 1 && val === 1) {\n testResult = true;\n }\n }\n var arr = [0, 111];\n\n Object.defineProperty(arr, \"0\", {\n get: function () {\n delete arr[1];\n return 0;\n },\n configurable: true\n });\n\n try {\n Array.prototype[1] = 1;\n arr.reduce(callbackfn);\n return testResult;\n } finally {\n delete Array.prototype[1];\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.4.4.21-9-b-14",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-b-14.js",
+ "description": "Array.prototype.reduce - decreasing length of array in step 8 causes deleted index property not to be visited",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n var testResult = true;\n\n function callbackfn(accum, val, idx, obj) {\n accessed = true;\n if (idx === 2) {\n testResult = false;\n }\n }\n\n var arr = [0, 1, 2, 3];\n\n Object.defineProperty(arr, \"0\", {\n get: function () {\n arr.length = 2;\n return 0;\n },\n configurable: true\n });\n\n arr.reduce(callbackfn);\n\n return testResult && accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.4.4.21-9-b-15",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-b-15.js",
+ "description": "Array.prototype.reduce - decreasing length of array with prototype property in step 8 causes prototype index property to be visited",
+ "test": "assertTrue((function testcase() {\n\n var testResult = false;\n\n function callbackfn(accum, val, idx, obj) {\n if (idx === 2 && val === \"prototype\") {\n testResult = true;\n }\n }\n var arr = [0, 1, 2, 3];\n\n try {\n Object.defineProperty(Array.prototype, \"2\", {\n get: function () {\n return \"prototype\";\n },\n configurable: true\n });\n\n Object.defineProperty(arr, \"0\", {\n get: function () {\n arr.length = 2;\n return 1;\n },\n configurable: true\n });\n\n arr.reduce(callbackfn);\n\n return testResult;\n } finally {\n delete Array.prototype[2];\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.4.4.21-9-b-16",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-b-16.js",
+ "description": "Array.prototype.reduce - decreasing length of array in step 8 does not delete non-configurable properties",
+ "test": "assertTrue((function testcase() {\n\n var testResult = false;\n\n function callbackfn(accum, val, idx, obj) {\n if (idx === 2 && val === \"unconfigurable\") {\n testResult = true;\n }\n }\n\n var arr = [0, 1, 2, 3];\n\n Object.defineProperty(arr, \"2\", {\n get: function () {\n return \"unconfigurable\";\n },\n configurable: false\n });\n\n Object.defineProperty(arr, \"0\", {\n get: function () {\n arr.length = 2;\n return 1;\n },\n configurable: true\n });\n\n arr.reduce(callbackfn);\n\n return testResult;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.4.4.21-9-b-17",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-b-17.js",
+ "description": "Array.prototype.reduce - properties added into own object are visited on an Array-like object",
+ "test": "assertTrue((function testcase() {\n\n var testResult = false;\n\n function callbackfn(accum, val, idx, obj) {\n if (idx === 3 && val === 3) {\n testResult = true;\n }\n }\n\n var obj = { length: 5 };\n\n Object.defineProperty(obj, \"1\", {\n get: function () {\n Object.defineProperty(obj, \"3\", {\n get: function () {\n return 3;\n },\n configurable: true\n });\n return 1;\n },\n configurable: true\n });\n\n Array.prototype.reduce.call(obj, callbackfn, \"initialValue\");\n return testResult;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects())"
+ },
+ {
+ "id": "15.4.4.21-9-b-18",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-b-18.js",
+ "description": "Array.prototype.reduce - properties added into own object are visited on an Array",
+ "test": "assertTrue((function testcase() {\n\n var testResult = false;\n\n function callbackfn(accum, val, idx, obj) {\n if (idx === 1 && val === 1) {\n testResult = true;\n }\n }\n\n var arr = [0, , 2];\n\n Object.defineProperty(arr, \"0\", {\n get: function () {\n Object.defineProperty(arr, \"1\", {\n get: function () {\n return 1;\n },\n configurable: true\n });\n return 0;\n },\n configurable: true\n });\n\n arr.reduce(callbackfn, \"initialValue\");\n return testResult;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.4.4.21-9-b-19",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-b-19.js",
+ "description": "Array.prototype.reduce - properties added to prototype are visited on an Array-like object",
+ "test": "assertTrue((function testcase() {\n\n var testResult = false;\n\n function callbackfn(accum, val, idx, obj) {\n if (idx === 1 && val === 6.99) {\n testResult = true;\n }\n }\n\n var obj = { length: 6 };\n\n Object.defineProperty(obj, \"0\", {\n get: function () {\n Object.defineProperty(Object.prototype, \"1\", {\n get: function () {\n return 6.99;\n },\n configurable: true\n });\n return 0;\n },\n configurable: true\n });\n\n try {\n Array.prototype.reduce.call(obj, callbackfn, \"initialValue\");\n return testResult;\n } finally {\n delete Object.prototype[1];\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects())"
+ },
+ {
+ "id": "15.4.4.21-9-b-2",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-b-2.js",
+ "description": "Array.prototype.reduce - added properties in step 2 are visible here",
+ "test": "assertTrue((function testcase() {\n\n var testResult = false;\n\n function callbackfn(accum, val, idx, obj) {\n if (idx === 2 && val === \"2\") {\n testResult = true;\n }\n }\n\n var obj = {};\n\n Object.defineProperty(obj, \"length\", {\n get: function () {\n obj[2] = \"2\";\n return 3;\n },\n configurable: true\n });\n\n Array.prototype.reduce.call(obj, callbackfn, \"initialValue\");\n\n return testResult;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.4.4.21-9-b-20",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-b-20.js",
+ "description": "Array.prototype.reduce - properties can be added to prototype are visited on an Array",
+ "test": "assertTrue((function testcase() {\n\n var testResult = false;\n\n function callbackfn(accum, val, idx, obj) {\n if (idx === 1 && val === 6.99) {\n testResult = true;\n }\n }\n\n var arr = [0, , 2];\n\n Object.defineProperty(arr, \"0\", {\n get: function () {\n Object.defineProperty(Array.prototype, \"1\", {\n get: function () {\n return 6.99;\n },\n configurable: true\n });\n return 0;\n },\n configurable: true\n });\n\n try {\n arr.reduce(callbackfn, \"initialValue\");\n return testResult;\n } finally {\n delete Array.prototype[1];\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce) && fnExists(Object.defineProperty) && ![, 1].hasOwnProperty(0) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.4.4.21-9-b-21",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-b-21.js",
+ "description": "Array.prototype.reduce - deleting own property causes deleted index property not to be visited on an Array-like object",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n var testResult = true;\n\n function callbackfn(accum, val, idx, obj) {\n accessed = true;\n if (idx === 1) {\n testResult = false;\n }\n }\n\n var obj = { 5: 10, length: 10 };\n\n Object.defineProperty(obj, \"1\", {\n get: function () {\n return 6.99;\n },\n configurable: true\n });\n\n Object.defineProperty(obj, \"0\", {\n get: function () {\n delete obj[1];\n return 0;\n },\n configurable: true\n });\n\n Array.prototype.reduce.call(obj, callbackfn, \"initialValue\");\n return testResult && accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects())"
+ },
+ {
+ "id": "15.4.4.21-9-b-22",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-b-22.js",
+ "description": "Array.prototype.reduce - deleting own property causes deleted index property not to be visited on an Array",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n var testResult = true;\n\n function callbackfn(accum, val, idx, obj) {\n accessed = true;\n if (idx === 1) {\n testResult = false;\n }\n }\n\n var arr = [1, 2, 4];\n\n Object.defineProperty(arr, \"1\", {\n get: function () {\n return \"6.99\";\n },\n configurable: true\n });\n\n Object.defineProperty(arr, \"0\", {\n get: function () {\n delete arr[1];\n return 0;\n },\n configurable: true\n });\n\n arr.reduce(callbackfn, \"initialValue\");\n return testResult && accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.4.4.21-9-b-23",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-b-23.js",
+ "description": "Array.prototype.reduce - deleting property of prototype causes deleted index property not to be visited on an Array-like Object",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n var testResult = true;\n\n function callbackfn(accum, val, idx, obj) {\n accessed = true;\n if (idx === 3) {\n testResult = false;\n }\n }\n\n var obj = { 2: 2, length: 20 };\n\n Object.defineProperty(obj, \"0\", {\n get: function () {\n delete Object.prototype[3];\n return 0;\n },\n configurable: true\n });\n\n try {\n Object.prototype[3] = 1;\n Array.prototype.reduce.call(obj, callbackfn, \"initialValue\");\n return testResult && accessed;\n } finally {\n delete Object.prototype[3];\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects())"
+ },
+ {
+ "id": "15.4.4.21-9-b-24",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-b-24.js",
+ "description": "Array.prototype.reduce - deleting property of prototype causes deleted index property not to be visited on an Array",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n var testResult = true;\n\n function callbackfn(accum, val, idx, obj) {\n accessed = true;\n if (idx === 1) {\n testResult = false;\n }\n }\n\n var arr = [0, , , 3];\n Object.defineProperty(arr, \"0\", {\n get: function () {\n delete Array.prototype[1];\n return 0;\n },\n configurable: true\n });\n\n try {\n Array.prototype[1] = 1;\n arr.reduce(callbackfn, \"initialValue\");\n return testResult && accessed;\n } finally {\n delete Array.prototype[1];\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce) && fnExists(Object.defineProperty) && ![, 1].hasOwnProperty(0) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.4.4.21-9-b-25",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-b-25.js",
+ "description": "Array.prototype.reduce - deleting own property with prototype property causes prototype index property to be visited on an Array-like object",
+ "test": "assertTrue((function testcase() {\n\n var testResult = false;\n\n function callbackfn(accum, val, idx, obj) {\n if (idx === 1 && val === 1) {\n testResult = true;\n }\n }\n\n var obj = { 0: 0, 1: 111, 4: 10, length: 10 };\n\n Object.defineProperty(obj, \"0\", {\n get: function () {\n delete obj[1];\n return 0;\n },\n configurable: true\n });\n\n try {\n Object.prototype[1] = 1;\n Array.prototype.reduce.call(obj, callbackfn, \"initialValue\");\n return testResult;\n } finally {\n delete Object.prototype[1];\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects())"
+ },
+ {
+ "id": "15.4.4.21-9-b-26",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-b-26.js",
+ "description": "Array.prototype.reduce - deleting own property with prototype property causes prototype index property to be visited on an Array",
+ "test": "assertTrue((function testcase() {\n\n var testResult = false;\n\n function callbackfn(accum, val, idx, obj) {\n if (idx === 1 && val === 1) {\n testResult = true;\n }\n }\n var arr = [0, 111];\n\n Object.defineProperty(arr, \"0\", {\n get: function () {\n delete arr[1];\n return 0;\n },\n configurable: true\n });\n\n try {\n Array.prototype[1] = 1;\n arr.reduce(callbackfn, \"initialValue\");\n return testResult;\n } finally {\n delete Array.prototype[1];\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.4.4.21-9-b-27",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-b-27.js",
+ "description": "Array.prototype.reduce - decreasing length of array causes deleted index property not to be visited",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n var testResult = true;\n\n function callbackfn(accum, val, idx, obj) {\n accessed = true;\n if (idx === 2) {\n testResult = false;\n }\n }\n\n var arr = [0, 1, 2, 3];\n\n Object.defineProperty(arr, \"0\", {\n get: function () {\n arr.length = 2;\n return 0;\n },\n configurable: true\n });\n\n arr.reduce(callbackfn, \"initialValue\");\n\n return testResult && accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.4.4.21-9-b-28",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-b-28.js",
+ "description": "Array.prototype.reduce - decreasing length of array with prototype property causes prototype index property to be visited",
+ "test": "assertTrue((function testcase() {\n\n var testResult = false;\n\n function callbackfn(accum, val, idx, obj) {\n if (idx === 2 && val === \"prototype\") {\n testResult = true;\n }\n }\n var arr = [0, 1, 2, 3];\n\n try {\n Object.defineProperty(Array.prototype, \"2\", {\n get: function () {\n return \"prototype\";\n },\n configurable: true\n });\n\n Object.defineProperty(arr, \"0\", {\n get: function () {\n arr.length = 2;\n return 1;\n },\n configurable: true\n });\n\n arr.reduce(callbackfn, \"initialValue\");\n\n return testResult;\n } finally {\n delete Array.prototype[2];\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.4.4.21-9-b-29",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-b-29.js",
+ "description": "Array.prototype.reduce - decreasing length of array does not delete non-configurable properties",
+ "test": "assertTrue((function testcase() {\n\n var testResult = false;\n\n function callbackfn(accum, val, idx, obj) {\n if (idx === 2 && val === \"unconfigurable\") {\n testResult = true;\n }\n }\n\n var arr = [0, 1, 2, 3];\n\n Object.defineProperty(arr, \"2\", {\n get: function () {\n return \"unconfigurable\";\n },\n configurable: false\n });\n\n Object.defineProperty(arr, \"0\", {\n get: function () {\n arr.length = 2;\n return 1;\n },\n configurable: true\n });\n\n arr.reduce(callbackfn, \"initialValue\");\n\n return testResult;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.4.4.21-9-b-3",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-b-3.js",
+ "description": "Array.prototype.reduce - deleted properties in step 2 are visible here",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n var testResult = true;\n\n function callbackfn(accum, val, idx, obj) {\n accessed = true;\n if (idx === 2) {\n testResult = false;\n }\n }\n\n var obj = { 2: \"2\", 3: 10 };\n\n Object.defineProperty(obj, \"length\", {\n get: function () {\n delete obj[2];\n return 5;\n },\n configurable: true\n });\n\n Array.prototype.reduce.call(obj, callbackfn, \"initialValue\");\n\n return accessed && testResult;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.4.4.21-9-b-4",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-b-4.js",
+ "description": "Array.prototype.reduce - properties added into own object in step 8 are visited on an Array-like object",
+ "test": "assertTrue((function testcase() {\n\n var testResult = false;\n\n function callbackfn(accum, val, idx, obj) {\n if (idx === 3 && val === 3) {\n testResult = true;\n }\n }\n\n var obj = { length: 5 };\n\n Object.defineProperty(obj, \"1\", {\n get: function () {\n Object.defineProperty(obj, \"3\", {\n get: function () {\n return 3;\n },\n configurable: true\n });\n return 1;\n },\n configurable: true\n });\n\n Array.prototype.reduce.call(obj, callbackfn);\n return testResult;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects())"
+ },
+ {
+ "id": "15.4.4.21-9-b-5",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-b-5.js",
+ "description": "Array.prototype.reduce - properties added into own object in step 8 are visited on an Array",
+ "test": "assertTrue((function testcase() {\n\n var testResult = false;\n\n function callbackfn(accum, val, idx, obj) {\n if (idx === 1 && val === 1) {\n testResult = true;\n }\n }\n\n var arr = [0, , 2];\n\n Object.defineProperty(arr, \"0\", {\n get: function () {\n Object.defineProperty(arr, \"1\", {\n get: function () {\n return 1;\n },\n configurable: true\n });\n return 0;\n },\n configurable: true\n });\n\n arr.reduce(callbackfn);\n return testResult;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.4.4.21-9-b-6",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-b-6.js",
+ "description": "Array.prototype.reduce - properties added to prototype in step 8 are visited on an Array-like object",
+ "test": "assertTrue((function testcase() {\n\n var testResult = false;\n\n function callbackfn(accum, val, idx, obj) {\n if (idx === 1 && val === 6.99) {\n testResult = true;\n }\n }\n\n var obj = { length: 6 };\n\n Object.defineProperty(obj, \"0\", {\n get: function () {\n Object.defineProperty(Object.prototype, \"1\", {\n get: function () {\n return 6.99;\n },\n configurable: true\n });\n return 0;\n },\n configurable: true\n });\n\n try {\n Array.prototype.reduce.call(obj, callbackfn);\n return testResult;\n } finally {\n delete Object.prototype[1];\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects())"
+ },
+ {
+ "id": "15.4.4.21-9-b-7",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-b-7.js",
+ "description": "Array.prototype.reduce - properties added to prototype in step 8 are visited on an Array",
+ "test": "assertTrue((function testcase() {\n\n var testResult = false;\n\n function callbackfn(accum, val, idx, obj) {\n if (idx === 1 && val === 6.99) {\n testResult = true;\n }\n }\n\n var arr = [0, , 2];\n\n Object.defineProperty(arr, \"0\", {\n get: function () {\n Object.defineProperty(Array.prototype, \"1\", {\n get: function () {\n return 6.99;\n },\n configurable: true\n });\n return 0;\n },\n configurable: true\n });\n\n try {\n arr.reduce(callbackfn);\n return testResult;\n } finally {\n delete Array.prototype[1];\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce) && fnExists(Object.defineProperty) && ![, 1].hasOwnProperty(0) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.4.4.21-9-b-8",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-b-8.js",
+ "description": "Array.prototype.reduce - deleting own property in step 8 causes deleted index property not to be visited on an Array-like object",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n var testResult = true;\n\n function callbackfn(accum, val, idx, obj) {\n accessed = true;\n if (idx === 1) {\n testResult = false;\n }\n }\n\n var obj = { 5: 10, length: 10 };\n\n Object.defineProperty(obj, \"1\", {\n get: function () {\n return 6.99;\n },\n configurable: true\n });\n\n Object.defineProperty(obj, \"0\", {\n get: function () {\n delete obj[1];\n return 0;\n },\n configurable: true\n });\n\n Array.prototype.reduce.call(obj, callbackfn);\n return testResult && accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects())"
+ },
+ {
+ "id": "15.4.4.21-9-b-9",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-b-9.js",
+ "description": "Array.prototype.reduce - deleting own property in step 8 causes deleted index property not to be visited on an Array",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n var testResult = true;\n\n function callbackfn(accum, val, idx, obj) {\n accessed = true;\n if (idx === 1) {\n testResult = false;\n }\n }\n\n var arr = [1, 2, 4];\n\n Object.defineProperty(arr, \"0\", {\n get: function () {\n delete arr[1];\n return 0;\n },\n configurable: true\n });\n\n arr.reduce(callbackfn);\n return testResult && accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.4.4.21-9-c-1",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-1.js",
+ "description": "Array.prototype.reduce - callbackfn not called for indexes never been assigned values",
+ "test": "assertTrue((function testcase() { \n \n var callCnt = 0;\n function callbackfn(prevVal, curVal, idx, obj)\n {\n callCnt++;\n return curVal;\n }\n\n var arr = new Array(10);\n arr[0] = arr[1] = undefined; //explicitly assigning a value\n if( arr.reduce(callbackfn) === undefined && callCnt === 1)\n return true; \n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce))"
+ },
+ {
+ "id": "15.4.4.21-9-c-i-1",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-i-1.js",
+ "description": "Array.prototype.reduce - element to be retrieved is own data property on an Array-like object",
+ "test": "assertTrue((function testcase() {\n\n var testResult = false;\n var initialValue = 0;\n function callbackfn(prevVal, curVal, idx, obj) {\n if (idx === 1) {\n testResult = (curVal === 1);\n }\n }\n\n var obj = { 0: 0, 1: 1, 2: 2, length: 2 };\n Array.prototype.reduce.call(obj, callbackfn, initialValue);\n return testResult;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce))"
+ },
+ {
+ "id": "15.4.4.21-9-c-i-10",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-i-10.js",
+ "description": "Array.prototype.reduce - element to be retrieved is own accessor property on an Array",
+ "test": "assertTrue((function testcase() {\n\n var testResult = false;\n var initialValue = 0;\n function callbackfn(prevVal, curVal, idx, obj) {\n if (idx === 1) {\n testResult = (curVal === 1);\n }\n }\n\n var arr = [0, , 2];\n\n Object.defineProperty(arr, \"1\", {\n get: function () {\n return 1;\n },\n configurable: true\n });\n\n arr.reduce(callbackfn, initialValue);\n return testResult;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.4.4.21-9-c-i-11",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-i-11.js",
+ "description": "Array.prototype.reduce - element to be retrieved is own accessor property that overrides an inherited data property on an Array-like object",
+ "test": "assertTrue((function testcase() {\n\n var testResult = false;\n var initialValue = 0;\n function callbackfn(prevVal, curVal, idx, obj) {\n if (idx === 1) {\n testResult = (curVal === \"11\");\n }\n }\n\n var proto = { 0: 0, 1: 1, 2: 2 };\n\n var Con = function () { };\n Con.prototype = proto;\n\n var child = new Con();\n child.length = 3;\n\n Object.defineProperty(child, \"1\", {\n get: function () {\n return \"11\";\n },\n configurable: true\n });\n\n Array.prototype.reduce.call(child, callbackfn, initialValue);\n return testResult;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects())"
+ },
+ {
+ "id": "15.4.4.21-9-c-i-12",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-i-12.js",
+ "description": "Array.prototype.reduce - element to be retrieved is own accessor property that overrides an inherited data property on an Array",
+ "test": "assertTrue((function testcase() {\n\n var testResult = false;\n var initialValue = 0;\n function callbackfn(prevVal, curVal, idx, obj) {\n if (idx === 1) {\n testResult = (curVal === \"11\");\n }\n }\n\n try {\n Array.prototype[1] = 1;\n var arr = [0, ,2];\n\n Object.defineProperty(arr, \"1\", {\n get: function () {\n return \"11\";\n },\n configurable: true\n });\n\n arr.reduce(callbackfn, initialValue);\n return testResult;\n\n } finally {\n delete Array.prototype[1];\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.4.4.21-9-c-i-13",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-i-13.js",
+ "description": "Array.prototype.reduce - element to be retrieved is own accessor property that overrides an inherited accessor property on an Array-like object",
+ "test": "assertTrue((function testcase() {\n\n var testResult = false;\n var initialValue = 0;\n function callbackfn(prevVal, curVal, idx, obj) {\n if (idx === 1) {\n testResult = (curVal === \"11\");\n }\n }\n\n var proto = { 0: 0, 2: 2};\n\n Object.defineProperty(proto, \"1\", {\n get: function () {\n return 1;\n },\n configurable: true\n });\n\n var Con = function () { };\n Con.prototype = proto;\n\n var child = new Con();\n child.length = 3;\n\n Object.defineProperty(child, \"1\", {\n get: function () {\n return \"11\";\n },\n configurable: true\n });\n\n Array.prototype.reduce.call(child, callbackfn, initialValue);\n return testResult;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects())"
+ },
+ {
+ "id": "15.4.4.21-9-c-i-14",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-i-14.js",
+ "description": "Array.prototype.reduce - element to be retrieved is own accessor property that overrides an inherited accessor property on an Array",
+ "test": "assertTrue((function testcase() {\n\n var testResult = false;\n var initialValue = 0;\n function callbackfn(prevVal, curVal, idx, obj) {\n if (idx === 1) {\n testResult = (curVal === \"11\");\n }\n }\n\n try {\n Object.defineProperty(Array.prototype, \"1\", {\n get: function () {\n return 1;\n },\n configurable: true\n });\n\n var arr = [0, ,2];\n\n Object.defineProperty(arr, \"1\", {\n get: function () {\n return \"11\";\n },\n configurable: true\n });\n arr.reduce(callbackfn, initialValue);\n return testResult;\n\n } finally {\n delete Array.prototype[1];\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.4.4.21-9-c-i-15",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-i-15.js",
+ "description": "Array.prototype.reduce - element to be retrieved is inherited accessor property on an Array-like object",
+ "test": "assertTrue((function testcase() {\n\n var testResult = false;\n var initialValue = 0;\n function callbackfn(prevVal, curVal, idx, obj) {\n if (idx === 1) {\n testResult = (curVal === 1);\n }\n }\n\n var proto = { 0: 0, 2: 2 };\n\n Object.defineProperty(proto, \"1\", {\n get: function () {\n return 1;\n },\n configurable: true\n });\n\n var Con = function () { };\n Con.prototype = proto;\n\n var child = new Con();\n child.length = 3;\n\n Array.prototype.reduce.call(child, callbackfn, initialValue);\n return testResult;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects())"
+ },
+ {
+ "id": "15.4.4.21-9-c-i-16",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-i-16.js",
+ "description": "Array.prototype.reduce - element to be retrieved is inherited accessor property on an Array",
+ "test": "assertTrue((function testcase() {\n\n var testResult = false;\n var initialValue = 0;\n function callbackfn(prevVal, curVal, idx, obj) {\n if (idx === 1) {\n testResult = (curVal === 1);\n }\n }\n\n try {\n Object.defineProperty(Array.prototype, \"1\", {\n get: function () {\n return 1;\n },\n configurable: true\n });\n\n var arr = [0, , 2, ];\n\n arr.reduce(callbackfn, initialValue);\n return testResult;\n\n } finally {\n delete Array.prototype[1];\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce) && fnExists(Object.defineProperty) && ![, 1].hasOwnProperty(0) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.4.4.21-9-c-i-17",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-i-17.js",
+ "description": "Array.prototype.reduce - element to be retrieved is own accessor property without a get function on an Array-like object",
+ "test": "assertTrue((function testcase() {\n\n var testResult = false;\n var initialValue = 0;\n function callbackfn(prevVal, curVal, idx, obj) {\n if (idx === 1) {\n testResult = (curVal === undefined);\n }\n }\n\n var obj = { 0: 0, 2: 2, length: 3 };\n\n Object.defineProperty(obj, \"1\", {\n set: function () { },\n configurable: true\n });\n\n Array.prototype.reduce.call(obj, callbackfn, initialValue);\n return testResult;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects())"
+ },
+ {
+ "id": "15.4.4.21-9-c-i-18",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-i-18.js",
+ "description": "Array.prototype.reduce - element to be retrieved is own accessor property without a get function on an Array",
+ "test": "assertTrue((function testcase() {\n\n var testResult = false;\n var initialValue = 0;\n function callbackfn(prevVal, curVal, idx, obj) {\n if (idx === 1) {\n testResult = (curVal === undefined);\n }\n }\n\n var arr = [0, , 2];\n\n Object.defineProperty(arr, \"1\", {\n set: function () { },\n configurable: true\n });\n\n arr.reduce(callbackfn, initialValue);\n return testResult;\n \n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.4.4.21-9-c-i-19",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-i-19.js",
+ "description": "Array.prototype.reduce - element to be retrieved is own accessor property without a get function that overrides an inherited accessor property on an Array-like object",
+ "test": "assertTrue((function testcase() {\n\n var testResult = false;\n var initialValue = 0;\n function callbackfn(prevVal, curVal, idx, obj) {\n if (idx === 1) {\n testResult = (curVal === undefined);\n }\n }\n\n try {\n Object.defineProperty(Object.prototype, \"1\", {\n get: function () {\n return 1;\n },\n configurable: true\n });\n\n var obj = { 0: 0, 2: 2, length: 3 };\n\n Object.defineProperty(obj, \"1\", {\n set: function () { },\n configurable: true\n });\n\n Array.prototype.reduce.call(obj, callbackfn, initialValue);\n return testResult;\n } finally {\n delete Object.prototype[1];\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects())"
+ },
+ {
+ "id": "15.4.4.21-9-c-i-2",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-i-2.js",
+ "description": "Array.prototype.reduce - element to be retrieved is own data property on an Array",
+ "test": "assertTrue((function testcase() {\n\n var testResult = false;\n var initialValue = 0;\n function callbackfn(prevVal, curVal, idx, obj) {\n if (idx === 1) {\n testResult = (curVal === 1);\n }\n }\n\n var arr = [0, 1];\n arr.reduce(callbackfn, initialValue);\n return testResult;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce))"
+ },
+ {
+ "id": "15.4.4.21-9-c-i-20",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-i-20.js",
+ "description": "Array.prototype.reduce - element to be retrieved is own accessor property without a get function that overrides an inherited accessor property on an Array",
+ "test": "assertTrue((function testcase() {\n\n var testResult = false;\n var initialValue = 0;\n function callbackfn(prevVal, curVal, idx, obj) {\n if (idx === 1) {\n testResult = (curVal === undefined);\n }\n }\n\n try {\n Object.defineProperty(Array.prototype, \"1\", {\n get: function () {\n return 11;\n },\n configurable: true\n });\n\n var arr = [0, , 2];\n Object.defineProperty(arr, \"1\", {\n set: function () { },\n configurable: true\n });\n\n arr.reduce(callbackfn, initialValue);\n return testResult;\n\n } finally {\n delete Array.prototype[1];\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.4.4.21-9-c-i-21",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-i-21.js",
+ "description": "Array.prototype.reduce - element to be retrieved is inherited accessor property without a get function on an Array-like object",
+ "test": "assertTrue((function testcase() {\n\n var testResult = false;\n var initialValue = 0;\n function callbackfn(prevVal, curVal, idx, obj) {\n if (idx === 1) {\n testResult = (curVal === undefined);\n }\n }\n\n var proto = { 0: 0, 2: 2 };\n\n Object.defineProperty(proto, \"1\", {\n set: function () { },\n configurable: true\n });\n\n var Con = function () { };\n Con.prototype = proto;\n\n var child = new Con();\n child.length = 3;\n\n Array.prototype.reduce.call(child, callbackfn, initialValue);\n return testResult;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects())"
+ },
+ {
+ "id": "15.4.4.21-9-c-i-22",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-i-22.js",
+ "description": "Array.prototype.reduce - element to be retrieved is inherited accessor property without a get function on an Array",
+ "test": "assertTrue((function testcase() {\n\n var testResult = false;\n var initialValue = 0;\n function callbackfn(prevVal, curVal, idx, obj) {\n if (idx === 1) {\n testResult = (curVal === undefined);\n }\n }\n\n try {\n Object.defineProperty(Array.prototype, \"1\", {\n set: function () { },\n configurable: true\n });\n\n var arr = [0, , 2];\n\n arr.reduce(callbackfn, initialValue);\n return testResult;\n\n } finally {\n delete Array.prototype[1];\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce) && fnExists(Object.defineProperty) && ![, 1].hasOwnProperty(0) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.4.4.21-9-c-i-23",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-i-23.js",
+ "description": "Array.prototype.reduce - This object is the global object which contains index property",
+ "test": "assertTrue((function testcase() {\n\n var testResult = false;\n var initialValue = 0;\n function callbackfn(prevVal, curVal, idx, obj) {\n if (idx === 1) {\n testResult = (curVal === 1);\n }\n }\n\n try {\n var oldLen = fnGlobalObject().length;\n fnGlobalObject()[0] = 0;\n fnGlobalObject()[1] = 1;\n fnGlobalObject().length = 2;\n\n Array.prototype.reduce.call(fnGlobalObject(), callbackfn, initialValue);\n return testResult;\n\n } finally {\n delete fnGlobalObject()[0];\n delete fnGlobalObject()[1];\n fnGlobalObject().length = oldLen;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce))"
+ },
+ {
+ "id": "15.4.4.21-9-c-i-25",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-i-25.js",
+ "description": "Array.prototype.reduce - This object is the Arguments object which implements its own property get method (number of arguments is less than number of parameters)",
+ "test": "assertTrue((function testcase() {\n\n var testResult = false;\n var initialValue = 0;\n function callbackfn(prevVal, curVal, idx, obj) {\n if (idx === 1) {\n testResult = (curVal === 1);\n }\n }\n\n var func = function (a, b, c) {\n Array.prototype.reduce.call(arguments, callbackfn, initialValue);\n };\n\n func(0, 1);\n return testResult;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce))"
+ },
+ {
+ "id": "15.4.4.21-9-c-i-26",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-i-26.js",
+ "description": "Array.prototype.reduce - This object is the Arguments object which implements its own property get method (number of arguments equals number of parameters)",
+ "test": "assertTrue((function testcase() {\n\n var testResult = false;\n var initialValue = 0;\n function callbackfn(prevVal, curVal, idx, obj) {\n if (idx === 2) {\n testResult = (curVal === 2);\n }\n }\n\n var func = function (a, b, c) {\n Array.prototype.reduce.call(arguments, callbackfn, initialValue);\n };\n\n func(0, 1, 2);\n return testResult;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce))"
+ },
+ {
+ "id": "15.4.4.21-9-c-i-27",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-i-27.js",
+ "description": "Array.prototype.reduce - This object is the Arguments object which implements its own property get method (number of arguments is greater than number of parameters)",
+ "test": "assertTrue((function testcase() {\n\n var testResult = false;\n var initialValue = 0;\n function callbackfn(prevVal, curVal, idx, obj) {\n if (idx === 3) {\n testResult = (curVal === 3);\n }\n }\n\n var func = function (a, b, c) {\n Array.prototype.reduce.call(arguments, callbackfn, initialValue);\n };\n\n func(0, 1, 2, 3);\n return testResult;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce))"
+ },
+ {
+ "id": "15.4.4.21-9-c-i-28",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-i-28.js",
+ "description": "Array.prototype.reduce - applied to String object, which implements its own property get method",
+ "test": "assertTrue((function testcase() {\n\n var testResult = false;\n var initialValue = 0;\n function callbackfn(prevVal, curVal, idx, obj) {\n if (idx === 1) {\n testResult = (curVal === \"1\");\n }\n }\n\n var str = new String(\"012\");\n \n Array.prototype.reduce.call(str, callbackfn, initialValue);\n return testResult;\n \n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce))"
+ },
+ {
+ "id": "15.4.4.21-9-c-i-29",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-i-29.js",
+ "description": "Array.prototype.reduce - applied to Function object which implements its own property get method",
+ "test": "assertTrue((function testcase() {\n\n var testResult = false;\n var initialValue = 0;\n function callbackfn(prevVal, curVal, idx, obj) {\n if (idx === 1) {\n testResult = (curVal === 1);\n }\n }\n\n var obj = function (a, b, c) {\n return a + b + c;\n };\n obj[0] = 0;\n obj[1] = 1;\n obj[2] = 2;\n obj[3] = 3;\n\n Array.prototype.reduce.call(obj, callbackfn, initialValue);\n return testResult;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce))"
+ },
+ {
+ "id": "15.4.4.21-9-c-i-3",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-i-3.js",
+ "description": "Array.prototype.reduce - element to be retrieved is own data property that overrides an inherited data property on an Array-like object",
+ "test": "assertTrue((function testcase() {\n\n var testResult = false;\n var initialValue = 0;\n function callbackfn(prevVal, curVal, idx, obj) {\n if (idx === 1) {\n testResult = (curVal === \"11\");\n }\n }\n\n var proto = { 0: 0, 1: 1, 2: 2, length: 2 };\n var Con = function () { };\n Con.prototype = proto;\n\n var child = new Con();\n child[1] = \"11\";\n child[2] = \"22\";\n child.length = 3;\n\n Array.prototype.reduce.call(child, callbackfn, initialValue);\n return testResult;\n\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce))"
+ },
+ {
+ "id": "15.4.4.21-9-c-i-30",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-i-30.js",
+ "description": "Array.prototype.reduce - element changed by getter on previous iterations is observed on an Array",
+ "test": "assertTrue((function testcase() {\n\n var testResult = false;\n var initialValue = 0;\n function callbackfn(prevVal, curVal, idx, obj) {\n if (idx === 1) {\n testResult = (curVal === 1);\n }\n }\n\n var arr = [, , 2];\n var preIterVisible = false;\n\n Object.defineProperty(arr, \"0\", {\n get: function () {\n preIterVisible = true;\n return 0;\n },\n configurable: true\n });\n\n Object.defineProperty(arr, \"1\", {\n get: function () {\n if (preIterVisible) {\n return 1;\n } else {\n return 100;\n }\n },\n configurable: true\n });\n\n arr.reduce(callbackfn, initialValue);\n return testResult;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.4.4.21-9-c-i-31",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-i-31.js",
+ "description": "Array.prototype.reduce - element changed by getter on previous iterations is observed on an Array-like object",
+ "test": "assertTrue((function testcase() {\n\n var testResult = false;\n var initialValue = 0;\n function callbackfn(prevVal, curVal, idx, obj) {\n if (idx === 1) {\n testResult = (curVal === 1);\n }\n }\n\n var obj = { 2: 2, length: 3 };\n var preIterVisible = false;\n\n Object.defineProperty(obj, \"0\", {\n get: function () {\n preIterVisible = true;\n return 0;\n },\n configurable: true\n });\n\n Object.defineProperty(obj, \"1\", {\n get: function () {\n if (preIterVisible) {\n return 1;\n } else {\n return \"11\";\n }\n },\n configurable: true\n });\n\n Array.prototype.reduce.call(obj, callbackfn, initialValue);\n return testResult;\n\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects())"
+ },
+ {
+ "id": "15.4.4.21-9-c-i-32",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-i-32.js",
+ "description": "Array.prototype.reduce - unnhandled exceptions happened in getter terminate iteration on an Array-like object",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n var testResult = false;\n var initialValue = 0;\n function callbackfn(prevVal, curVal, idx, obj) {\n if (idx >= 1) {\n accessed = true;\n testResult = (curVal >= 1);\n }\n }\n\n var obj = { 0: 0, 2: 2, length: 3 };\n Object.defineProperty(obj, \"1\", {\n get: function () {\n throw new RangeError(\"unhandle exception happened in getter\");\n },\n configurable: true\n });\n\n try {\n Array.prototype.reduce.call(obj, callbackfn, initialValue);\n return false;\n } catch (ex) {\n return (ex instanceof RangeError) && !accessed && !testResult;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects())"
+ },
+ {
+ "id": "15.4.4.21-9-c-i-33",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-i-33.js",
+ "description": "Array.prototype.reduce - unnhandled exceptions happened in getter terminate iteration on an Array",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n var testResult = false;\n var initialValue = 0;\n function callbackfn(prevVal, curVal, idx, obj) {\n if (idx >= 1) {\n accessed = true;\n testResult = (curVal >= 1);\n }\n }\n\n var arr = [0, , 2];\n\n Object.defineProperty(arr, \"1\", {\n get: function () {\n throw new RangeError(\"unhandle exception happened in getter\");\n },\n configurable: true\n });\n\n try {\n arr.reduce(callbackfn, initialValue);\n return false;\n } catch (ex) {\n return (ex instanceof RangeError) && !accessed && !testResult;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.4.4.21-9-c-i-4",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-i-4.js",
+ "description": "Array.prototype.reduce - element to be retrieved is own data property that overrides an inherited data property on an Array",
+ "test": "assertTrue((function testcase() {\n\n var testResult = false;\n var initialValue = 0;\n function callbackfn(prevVal, curVal, idx, obj) {\n if (idx === 1) {\n testResult = (curVal === 1);\n }\n }\n\n try {\n Array.prototype[1] = \"3\";\n [0, 1, 2].reduce(callbackfn, initialValue);\n return testResult;\n } finally {\n delete Array.prototype[1];\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce))"
+ },
+ {
+ "id": "15.4.4.21-9-c-i-5",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-i-5.js",
+ "description": "Array.prototype.reduce - element to be retrieved is own data property that overrides an inherited accessor property on an Array-like object",
+ "test": "assertTrue((function testcase() {\n\n var testResult = false;\n var initialValue = 0;\n function callbackfn(prevVal, curVal, idx, obj) {\n if (idx === 0) {\n testResult = (curVal === \"9\");\n }\n }\n\n var proto = {};\n\n Object.defineProperty(proto, \"0\", {\n get: function () {\n return 0;\n },\n configurable: true\n });\n\n var Con = function () { };\n Con.prototype = proto;\n\n var child = new Con();\n child.length = 2;\n \n Object.defineProperty(child, \"0\", {\n value: \"9\",\n configurable: true\n });\n\n child[1] = \"1\";\n\n Array.prototype.reduce.call(child, callbackfn, initialValue);\n return testResult;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects())"
+ },
+ {
+ "id": "15.4.4.21-9-c-i-6",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-i-6.js",
+ "description": "Array.prototype.reduce - element to be retrieved is own data property that overrides an inherited accessor property on an Array",
+ "test": "assertTrue((function testcase() {\n\n var testResult = false;\n var initialValue = 0;\n function callbackfn(prevVal, curVal, idx, obj) {\n if (idx === 1) {\n testResult = (curVal === 1);\n }\n }\n\n try {\n Object.defineProperty(Array.prototype, \"1\", {\n get: function () {\n return \"9\";\n },\n configurable: true\n });\n [0, 1, 2].reduce(callbackfn, initialValue);\n return testResult;\n\n } finally {\n delete Array.prototype[1];\n }\n\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.4.4.21-9-c-i-7",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-i-7.js",
+ "description": "Array.prototype.reduce - element to be retrieved is inherited data property on an Array-like object",
+ "test": "assertTrue((function testcase() {\n\n var testResult = false;\n var initialValue = 0;\n function callbackfn(prevVal, curVal, idx, obj) {\n if (idx === 1) {\n testResult = (curVal === 1);\n }\n }\n\n var proto = { 0: 0, 1: 1, 2: 2, length: 3 };\n var Con = function () { };\n Con.prototype = proto;\n\n var child = new Con();\n child.length = 3;\n\n Array.prototype.reduce.call(child, callbackfn, initialValue);\n return testResult;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce))"
+ },
+ {
+ "id": "15.4.4.21-9-c-i-8",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-i-8.js",
+ "description": "Array.prototype.reduce - element to be retrieved is inherited data property on an Array",
+ "test": "assertTrue((function testcase() {\n\n var testResult = false;\n var initialValue = 0;\n function callbackfn(prevVal, curVal, idx, obj) {\n if (idx === 1) {\n testResult = (curVal === 1);\n }\n }\n\n try {\n Array.prototype[0] = 0;\n Array.prototype[1] = 1;\n Array.prototype[2] = 2;\n [, , , ].reduce(callbackfn, initialValue);\n\n return testResult;\n } finally {\n delete Array.prototype[0];\n delete Array.prototype[1];\n delete Array.prototype[2];\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce) && ![, 1].hasOwnProperty(0))"
+ },
+ {
+ "id": "15.4.4.21-9-c-i-9",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-i-9.js",
+ "description": "Array.prototype.reduce - element to be retrieved is own accessor property on an Array-like object",
+ "test": "assertTrue((function testcase() {\n\n var testResult = false;\n var initialValue = 0;\n function callbackfn(prevVal, curVal, idx, obj) {\n if (idx === 1) {\n testResult = (curVal === 1);\n }\n }\n\n var obj = { 0: 0, 2: 2, length: 3 };\n Object.defineProperty(obj, \"1\", {\n get: function () {\n return 1;\n },\n configurable: true\n });\n\n Array.prototype.reduce.call(obj, callbackfn, initialValue);\n return testResult;\n\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects())"
+ },
+ {
+ "id": "15.4.4.21-9-c-ii-1",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-1.js",
+ "description": "Array.prototype.reduce - callbackfn called with correct parameters (initialvalue not passed)",
+ "test": "assertTrue((function testcase() { \n \n function callbackfn(prevVal, curVal, idx, obj)\n {\n if(idx > 0 && obj[idx] === curVal && obj[idx-1] === prevVal)\n return curVal;\n else \n return false;\n }\n\n var arr = [0,1,true,null,new Object(),\"five\"];\n if( arr.reduce(callbackfn) === \"five\") \n return true;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce))"
+ },
+ {
+ "id": "15.4.4.21-9-c-ii-10",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-10.js",
+ "description": "Array.prototype.reduce - callbackfn is called with 1 formal parameter",
+ "test": "assertTrue((function testcase() {\n\n var result = false;\n function callbackfn(prevVal) {\n result = (prevVal === 1);\n }\n\n [11].reduce(callbackfn, 1);\n return result;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce))"
+ },
+ {
+ "id": "15.4.4.21-9-c-ii-11",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-11.js",
+ "description": "Array.prototype.reduce - callbackfn is called with 2 formal parameter",
+ "test": "assertTrue((function testcase() {\n\n var result = false;\n function callbackfn(prevVal, curVal) {\n result = (curVal > 10 && 1 === prevVal);\n }\n\n [11].reduce(callbackfn, 1);\n return result;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce))"
+ },
+ {
+ "id": "15.4.4.21-9-c-ii-12",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-12.js",
+ "description": "Array.prototype.reduce - callbackfn is called with 3 formal parameter",
+ "test": "assertTrue((function testcase() {\n\n var result = false;\n function callbackfn(prevVal, curVal, idx) {\n result = (prevVal === 1 && arguments[3][idx] === curVal);\n }\n\n [11].reduce(callbackfn, 1);\n return result;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce))"
+ },
+ {
+ "id": "15.4.4.21-9-c-ii-13",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-13.js",
+ "description": "Array.prototype.reduce - callbackfn is called with 4 formal parameter",
+ "test": "assertTrue((function testcase() {\n\n var result = false;\n function callbackfn(prevVal, curVal, idx, obj) {\n result = (prevVal === 1 && obj[idx] === curVal);\n }\n\n [11].reduce(callbackfn, 1);\n return result;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce))"
+ },
+ {
+ "id": "15.4.4.21-9-c-ii-14",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-14.js",
+ "description": "Array.prototype.reduce - callbackfn that uses arguments",
+ "test": "assertTrue((function testcase() {\n\n var result = false;\n function callbackfn() {\n result = (arguments[0] === 1 && arguments[3][arguments[2]] === arguments[1]);\n }\n\n [11].reduce(callbackfn, 1);\n return result;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce))"
+ },
+ {
+ "id": "15.4.4.21-9-c-ii-16",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-16.js",
+ "description": "Array.prototype.reduce - non-indexed properties are not called",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n var result1 = true;\n var result2 = true;\n\n function callbackfn(prevVal, curVal, idx, obj) {\n accessed = true;\n if (curVal === 8) {\n result1 = false;\n }\n\n if (prevVal === 8) {\n result2 = false;\n }\n }\n\n var obj = { 0: 11, 10: 12, non_index_property: 8, length: 20 };\n\n Array.prototype.reduce.call(obj, callbackfn, 1);\n return result1 && result2 && accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce))"
+ },
+ {
+ "id": "15.4.4.21-9-c-ii-17",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-17.js",
+ "description": "Array.prototype.reduce - 'accumulator' used for current iteration is the result of previous iteration on an Array",
+ "test": "assertTrue((function testcase() {\n\n var result = true;\n var accessed = false;\n var preIteration = 1;\n function callbackfn(prevVal, curVal, idx, obj) {\n accessed = true;\n if (preIteration !== prevVal) {\n result = false;\n }\n preIteration = curVal;\n return curVal;\n }\n\n [11, 12, 13].reduce(callbackfn, 1);\n return result && accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce))"
+ },
+ {
+ "id": "15.4.4.21-9-c-ii-18",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-18.js",
+ "description": "Array.prototype.reduce - value of 'accumulator' used for first iteration is the value of 'initialValue' when it is present on an Array-like object",
+ "test": "assertTrue((function testcase() {\n\n var result = false;\n function callbackfn(prevVal, curVal, idx, obj) {\n if (idx === 0) {\n result = (arguments[0] === 1);\n }\n }\n\n var obj = { 0: 11, 1: 9, length: 2 };\n\n Array.prototype.reduce.call(obj, callbackfn, 1);\n return result;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce))"
+ },
+ {
+ "id": "15.4.4.21-9-c-ii-19",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-19.js",
+ "description": "Array.prototype.reduce - value of 'accumulator' used for first iteration is the value of least index property which is not undefined when 'initialValue' is not present on an Array",
+ "test": "assertTrue((function testcase() {\n\n var called = 0;\n var result = false;\n function callbackfn(prevVal, curVal, idx, obj) {\n called++;\n if (idx === 1) {\n result = (prevVal === 11) && curVal === 9;\n }\n }\n\n [11, 9].reduce(callbackfn);\n return result && called === 1;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce))"
+ },
+ {
+ "id": "15.4.4.21-9-c-ii-2",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-2.js",
+ "description": "Array.prototype.reduce - callbackfn called with correct parameters (initialvalue passed)",
+ "test": "assertTrue((function testcase() { \n \n var bParCorrect = false;\n function callbackfn(prevVal, curVal, idx, obj)\n {\n if(idx === 0 && obj[idx] === curVal && prevVal === initialValue)\n return curVal;\n else if(idx > 0 && obj[idx] === curVal && obj[idx-1] === prevVal)\n return curVal;\n else\n return false;\n }\n\n var arr = [0,1,true,null,new Object(),\"five\"];\n var initialValue = 5.5;\n if( arr.reduce(callbackfn,initialValue) === \"five\") \n return true;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce))"
+ },
+ {
+ "id": "15.4.4.21-9-c-ii-20",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-20.js",
+ "description": "Array.prototype.reduce - undefined can be used as accumulator",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n function callbackfn(prevVal, curVal, idx, obj) {\n accessed = true;\n return typeof prevVal === \"undefined\";\n }\n\n var obj = { 0: 11, length: 1 };\n\n return Array.prototype.reduce.call(obj, callbackfn, undefined) === true && accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce))"
+ },
+ {
+ "id": "15.4.4.21-9-c-ii-21",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-21.js",
+ "description": "Array.prototype.reduce - null can be used as accumulator",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n function callbackfn(prevVal, curVal, idx, obj) {\n accessed = true;\n return prevVal === null;\n }\n\n var obj = { 0: 11, length: 1 };\n\n return Array.prototype.reduce.call(obj, callbackfn, null) === true && accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce))"
+ },
+ {
+ "id": "15.4.4.21-9-c-ii-22",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-22.js",
+ "description": "Array.prototype.reduce - boolean primitive can be used as accumulator",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n function callbackfn(prevVal, curVal, idx, obj) {\n accessed = true;\n return prevVal === false;\n }\n\n var obj = { 0: 11, length: 1 };\n\n return Array.prototype.reduce.call(obj, callbackfn, false) === true && accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce))"
+ },
+ {
+ "id": "15.4.4.21-9-c-ii-23",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-23.js",
+ "description": "Array.prototype.reduce - number primitive can be used as accumulator",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n function callbackfn(prevVal, curVal, idx, obj) {\n accessed = true;\n return prevVal === 12;\n }\n\n var obj = { 0: 11, length: 1 };\n\n return Array.prototype.reduce.call(obj, callbackfn, 12) === true && accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce))"
+ },
+ {
+ "id": "15.4.4.21-9-c-ii-24",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-24.js",
+ "description": "Array.prototype.reduce - string primitive can be used as accumulator",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n function callbackfn(prevVal, curVal, idx, obj) {\n accessed = true;\n return prevVal === \"hello_\";\n }\n\n var obj = { 0: 11, length: 1 };\n\n return Array.prototype.reduce.call(obj, callbackfn, \"hello_\") === true && accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce))"
+ },
+ {
+ "id": "15.4.4.21-9-c-ii-25",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-25.js",
+ "description": "Array.prototype.reduce - Function object can be used as accumulator",
+ "test": "assertTrue((function testcase() {\n\n var objFunction = function () { };\n\n var accessed = false;\n function callbackfn(prevVal, curVal, idx, obj) {\n accessed = true;\n return prevVal === objFunction;\n }\n\n var obj = { 0: 11, length: 1 };\n\n return Array.prototype.reduce.call(obj, callbackfn, objFunction) === true && accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce))"
+ },
+ {
+ "id": "15.4.4.21-9-c-ii-26",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-26.js",
+ "description": "Array.prototype.reduce - Array object can be used as accumulator",
+ "test": "assertTrue((function testcase() {\n\n var objArray = new Array(10);\n\n var accessed = false;\n function callbackfn(prevVal, curVal, idx, obj) {\n accessed = true;\n return prevVal === objArray;\n }\n\n var obj = { 0: 11, length: 1 };\n\n return Array.prototype.reduce.call(obj, callbackfn, objArray) === true && accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce))"
+ },
+ {
+ "id": "15.4.4.21-9-c-ii-27",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-27.js",
+ "description": "Array.prototype.reduce - String object can be used as accumulator",
+ "test": "assertTrue((function testcase() {\n\n var objString = new String();\n\n var accessed = false;\n function callbackfn(prevVal, curVal, idx, obj) {\n accessed = true;\n return prevVal === objString;\n }\n\n var obj = { 0: 11, length: 1 };\n\n return Array.prototype.reduce.call(obj, callbackfn, objString) === true && accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce))"
+ },
+ {
+ "id": "15.4.4.21-9-c-ii-28",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-28.js",
+ "description": "Array.prototype.reduce - Boolean object can be used as accumulator",
+ "test": "assertTrue((function testcase() {\n\n var objBoolean = new Boolean();\n\n var accessed = false;\n function callbackfn(prevVal, curVal, idx, obj) {\n accessed = true;\n return prevVal === objBoolean;\n }\n\n var obj = { 0: 11, length: 1 };\n\n return Array.prototype.reduce.call(obj, callbackfn, objBoolean) === true && accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce))"
+ },
+ {
+ "id": "15.4.4.21-9-c-ii-29",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-29.js",
+ "description": "Array.prototype.reduce - Number object can be used as accumulator",
+ "test": "assertTrue((function testcase() {\n\n var objNumber = new Number();\n\n var accessed = false;\n function callbackfn(prevVal, curVal, idx, obj) {\n accessed = true;\n return prevVal === objNumber;\n }\n\n var obj = { 0: 11, length: 1 };\n\n return Array.prototype.reduce.call(obj, callbackfn, objNumber) === true && accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce))"
+ },
+ {
+ "id": "15.4.4.21-9-c-ii-3",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-3.js",
+ "description": "Array.prototype.reduce - callbackfn takes 4 arguments",
+ "test": "assertTrue((function testcase() { \n \n var bCalled = false;\n function callbackfn(prevVal, curVal, idx, obj)\n { \n bCalled = true;\n if(prevVal === true && arguments.length === 4) \n return true;\n else\n return false;\n }\n var arr = [0,1,2,3,4,5,6,7,8,9];\n if(arr.reduce(callbackfn,true) === true && bCalled === true)\n return true;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce))"
+ },
+ {
+ "id": "15.4.4.21-9-c-ii-30",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-30.js",
+ "description": "Array.prototype.reduce - the Math object can be used as accumulator",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n function callbackfn(prevVal, curVal, idx, obj) {\n accessed = true;\n return prevVal === Math;\n }\n\n var obj = { 0: 11, length: 1 };\n\n return Array.prototype.reduce.call(obj, callbackfn, Math) === true && accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce))"
+ },
+ {
+ "id": "15.4.4.21-9-c-ii-31",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-31.js",
+ "description": "Array.prototype.reduce - Date object can be used as accumulator",
+ "test": "assertTrue((function testcase() {\n\n var objDate = new Date();\n\n var accessed = false;\n function callbackfn(prevVal, curVal, idx, obj) {\n accessed = true;\n return prevVal === objDate;\n }\n\n var obj = { 0: 11, length: 1 };\n\n return Array.prototype.reduce.call(obj, callbackfn, objDate) === true && accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce))"
+ },
+ {
+ "id": "15.4.4.21-9-c-ii-32",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-32.js",
+ "description": "Array.prototype.reduce - RegExp object can be used as accumulator",
+ "test": "assertTrue((function testcase() {\n\n var objRegExp = new RegExp();\n\n var accessed = false;\n function callbackfn(prevVal, curVal, idx, obj) {\n accessed = true;\n return prevVal === objRegExp;\n }\n\n var obj = { 0: 11, length: 1 };\n\n return Array.prototype.reduce.call(obj, callbackfn, objRegExp) === true && accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce))"
+ },
+ {
+ "id": "15.4.4.21-9-c-ii-33",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-33.js",
+ "description": "Array.prototype.reduce - the JSON can be used as accumulator",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n function callbackfn(prevVal, curVal, idx, obj) {\n accessed = true;\n return prevVal === JSON;\n }\n\n var obj = { 0: 11, length: 1 };\n\n return Array.prototype.reduce.call(obj, callbackfn, JSON) === true && accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce))"
+ },
+ {
+ "id": "15.4.4.21-9-c-ii-34",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-34.js",
+ "description": "Array.prototype.reduce - Error object can be used as accumulator",
+ "test": "assertTrue((function testcase() {\n\n var objError = new RangeError();\n\n var accessed = false;\n function callbackfn(prevVal, curVal, idx, obj) {\n accessed = true;\n return prevVal === objError;\n }\n\n var obj = { 0: 11, length: 1 };\n\n return Array.prototype.reduce.call(obj, callbackfn, objError) === true && accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce))"
+ },
+ {
+ "id": "15.4.4.21-9-c-ii-35",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-35.js",
+ "description": "Array.prototype.reduce - the Arguments object can be used as accumulator",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n var arg;\n\n function callbackfn(prevVal, curVal, idx, obj) {\n accessed = true;\n return prevVal === arg;\n }\n\n var obj = { 0: 11, length: 1 };\n\n (function fun() {\n arg = arguments;\n }(10, 11, 12, 13));\n\n return Array.prototype.reduce.call(obj, callbackfn, arg) === true && accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce))"
+ },
+ {
+ "id": "15.4.4.21-9-c-ii-37",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-37.js",
+ "description": "Array.prototype.reduce - the global object can be used as accumulator",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n function callbackfn(prevVal, curVal, idx, obj) {\n accessed = true;\n return prevVal === fnGlobalObject();\n }\n\n var obj = { 0: 11, length: 1 };\n\n return Array.prototype.reduce.call(obj, callbackfn, fnGlobalObject()) === true && accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce))"
+ },
+ {
+ "id": "15.4.4.21-9-c-ii-4-s",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21-9-c-ii-4-s.js",
+ "description": "Array.prototype.reduce - undefined passed as thisValue to strict callbackfn",
+ "test": "assertTrue((function testcase() { \n var innerThisCorrect = false;\n function callbackfn(prevVal, curVal, idx, obj)\n { \n \"use strict\";\n innerThisCorrect = this===undefined;\n return true;\n }\n [0].reduce(callbackfn,true);\n return innerThisCorrect; \n }).call(this));\n",
+ "precondition": "(fnSupportsStrict() && fnExists(Array.prototype.reduce))",
+ "strict_only": ""
+ },
+ {
+ "id": "15.4.4.21-9-c-ii-4",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-4.js",
+ "description": "Array.prototype.reduce - k values are passed in acending numeric order on an Array",
+ "test": "assertTrue((function testcase() {\n\n var arr = [0, 1, 2];\n var lastIdx = 0;\n var result = true;\n var accessed = false;\n\n function callbackfn(prevVal, curVal, idx, obj) {\n accessed = true;\n if (lastIdx !== idx) {\n result = false;\n } else {\n lastIdx++;\n }\n }\n\n arr.reduce(callbackfn, 11);\n return result && accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce))"
+ },
+ {
+ "id": "15.4.4.21-9-c-ii-5",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-5.js",
+ "description": "Array.prototype.reduce - k values are accessed during each iteration and not prior to starting the loop on an Array",
+ "test": "assertTrue((function testcase() {\n\n var result = true;\n var kIndex = [];\n var called = 0;\n\n //By below way, we could verify that k would be setted as 0, 1, ..., length - 1 in order, and each value will be setted one time.\n function callbackfn(prevVal, curVal, idx, obj) {\n //Each position should be visited one time, which means k is accessed one time during iterations.\n called++;\n if (typeof kIndex[idx] === \"undefined\") {\n //when current position is visited, its previous index should has been visited.\n if (idx !== 0 && typeof kIndex[idx - 1] === \"undefined\") {\n result = false;\n }\n kIndex[idx] = 1;\n } else {\n result = false;\n }\n }\n\n [11, 12, 13, 14].reduce(callbackfn, 1);\n\n return result && called === 4;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce))"
+ },
+ {
+ "id": "15.4.4.21-9-c-ii-7",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-7.js",
+ "description": "Array.prototype.reduce - unhandled exceptions happened in callbackfn terminate iteration",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n\n function callbackfn(prevVal, curVal, idx, obj) {\n if (idx > 0) {\n accessed = true;\n }\n if (idx === 0) {\n throw new Error(\"Exception occurred in callbackfn\");\n }\n }\n\n var obj = { 0: 11, 4: 10, 10: 8, length: 20 };\n\n try {\n Array.prototype.reduce.call(obj, callbackfn, 1);\n return false;\n } catch (ex) {\n return (ex instanceof Error) && !accessed;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce))"
+ },
+ {
+ "id": "15.4.4.21-9-c-ii-8",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-8.js",
+ "description": "Array.prototype.reduce - element changed by callbackfn on previous iterations is observed",
+ "test": "assertTrue((function testcase() {\n\n var result = false;\n function callbackfn(prevVal, curVal, idx, obj) {\n if (idx === 0) {\n obj[idx + 1] = 8;\n }\n \n if (idx === 1) {\n result = (curVal === 8);\n }\n }\n\n var obj = { 0: 11, 1: 12, length: 2 };\n\n Array.prototype.reduce.call(obj, callbackfn, 1);\n return result;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce))"
+ },
+ {
+ "id": "15.4.4.21-9-c-ii-9",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-9.js",
+ "description": "Array.prototype.reduce - callbackfn is called with 0 formal parameter",
+ "test": "assertTrue((function testcase() {\n\n var called = 0;\n function callbackfn() {\n called++;\n }\n\n [11, 12].reduce(callbackfn, 1);\n return 2 === called;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduce))"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.4.4.22.json b/website/resources/scripts/testcases2/15.4.4.22.json
new file mode 100644
index 000000000..d59e74e30
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.4.4.22.json
@@ -0,0 +1,1814 @@
+{
+ "testCollection": {
+ "name": "15.4.4.22",
+ "numTests": 258,
+ "tests": [
+ {
+ "id": "15.4.4.22-0-1",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-0-1.js",
+ "description": "Array.prototype.reduceRight must exist as a function",
+ "test": "assertTrue((function testcase() {\n var f = Array.prototype.reduceRight;\n if (typeof(f) === \"function\") {\n return true;\n }\n }).call(this));\n"
+ },
+ {
+ "id": "15.4.4.22-0-2",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-0-2.js",
+ "description": "Array.prototype.reduceRight.length must be 1",
+ "test": "assertTrue((Array.prototype.reduceRight.length === 1));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight))"
+ },
+ {
+ "id": "15.4.4.22-1-1",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-1-1.js",
+ "description": "Array.prototype.reduceRight applied to undefined throws a TypeError",
+ "test": "assertTrue((function testcase() {\n try {\n Array.prototype.reduceRight.call(undefined); \n return false;\n } catch (e) {\n return (e instanceof TypeError);\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight))"
+ },
+ {
+ "id": "15.4.4.22-1-10",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-1-10.js",
+ "description": "Array.prototype.reduceRight applied to the Math object",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n\n function callbackfn(prevVal, curVal, idx, obj) {\n accessed = true;\n return '[object Math]' === Object.prototype.toString.call(obj);\n }\n\n try {\n Math.length = 1;\n Math[0] = 1;\n return Array.prototype.reduceRight.call(Math, callbackfn, 1) && accessed;\n } finally {\n delete Math[0];\n delete Math.length;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight))"
+ },
+ {
+ "id": "15.4.4.22-1-11",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-1-11.js",
+ "description": "Array.prototype.reduceRight applied to Date object",
+ "test": "assertTrue((function testcase() {\n\n var obj = new Date();\n obj.length = 1;\n obj[0] = 1;\n var accessed = false;\n\n function callbackfn(prevVal, curVal, idx, obj) {\n accessed = true;\n return obj instanceof Date;\n }\n\n return Array.prototype.reduceRight.call(obj, callbackfn, 1) && accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight))"
+ },
+ {
+ "id": "15.4.4.22-1-12",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-1-12.js",
+ "description": "Array.prototype.reduceRight applied to RegExp object",
+ "test": "assertTrue((function testcase() {\n\n var obj = new RegExp();\n obj.length = 1;\n obj[0] = 1;\n var accessed = false;\n\n function callbackfn(prevVal, curVal, idx, o) {\n accessed = true;\n return o instanceof RegExp;\n }\n\n return Array.prototype.reduceRight.call(obj, callbackfn, 1) && accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight))"
+ },
+ {
+ "id": "15.4.4.22-1-13",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-1-13.js",
+ "description": "Array.prototype.reduceRight applied to the JSON object",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n\n function callbackfn(prevVal, curVal, idx, obj) {\n accessed = true;\n return ('[object JSON]' === Object.prototype.toString.call(obj));\n }\n\n try {\n JSON.length = 1;\n JSON[0] = 1;\n return Array.prototype.reduceRight.call(JSON, callbackfn, 1) && accessed;\n } finally {\n delete JSON.length;\n delete JSON[0];\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight))"
+ },
+ {
+ "id": "15.4.4.22-1-14",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-1-14.js",
+ "description": "Array.prototype.reduceRight applied to Error object",
+ "test": "assertTrue((function testcase() {\n\n var obj = new Error();\n obj.length = 1;\n obj[0] = 1;\n var accessed = false;\n\n function callbackfn(prevVal, curVal, idx, o) {\n accessed = true;\n return o instanceof Error;\n }\n\n return Array.prototype.reduceRight.call(obj, callbackfn, 1) && accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight))"
+ },
+ {
+ "id": "15.4.4.22-1-15",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-1-15.js",
+ "description": "Array.prototype.reduceRight applied to the Arguments object",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n\n function callbackfn(prevVal, curVal, idx, obj) {\n accessed = true;\n return '[object Arguments]' === Object.prototype.toString.call(obj);\n }\n\n var obj = (function () {\n return arguments;\n }(\"a\", \"b\"));\n\n return Array.prototype.reduceRight.call(obj, callbackfn, \"a\") && accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight))"
+ },
+ {
+ "id": "15.4.4.22-1-2",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-1-2.js",
+ "description": "Array.prototype.reduceRight applied to null throws a TypeError",
+ "test": "assertTrue((function testcase() {\n try {\n Array.prototype.reduceRight.call(null);\n return false;\n } catch (e) {\n return (e instanceof TypeError);\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight))"
+ },
+ {
+ "id": "15.4.4.22-1-3",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-1-3.js",
+ "description": "Array.prototype.reduceRight applied to boolean primitive",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n\n function callbackfn(prevVal, curVal, idx, obj) {\n accessed = true;\n return obj instanceof Boolean;\n }\n\n try {\n Boolean.prototype[0] = 1;\n Boolean.prototype.length = 1;\n return Array.prototype.reduceRight.call(false, callbackfn, 1) && accessed;\n } finally {\n delete Boolean.prototype[0];\n delete Boolean.prototype.length;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight))"
+ },
+ {
+ "id": "15.4.4.22-1-4",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-1-4.js",
+ "description": "Array.prototype.reduceRight applied to Boolean object",
+ "test": "assertTrue((function testcase() {\n\n var obj = new Boolean(true);\n obj.length = 2;\n obj[0] = 11;\n obj[1] = 12;\n var accessed = false;\n\n function callbackfn(prevVal, curVal, idx, obj) {\n accessed = true;\n return obj instanceof Boolean;\n }\n\n return Array.prototype.reduceRight.call(obj, callbackfn, 11) && accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight))"
+ },
+ {
+ "id": "15.4.4.22-1-5",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-1-5.js",
+ "description": "Array.prototype.reduceRight applied to number primitive",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n\n function callbackfn(prevVal, curVal, idx, obj) {\n accessed = true;\n return obj instanceof Number;\n }\n\n try {\n Number.prototype[0] = 1;\n Number.prototype.length = 1;\n return Array.prototype.reduceRight.call(2.5, callbackfn, 1) && accessed;\n } finally {\n delete Number.prototype[0];\n delete Number.prototype.length;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight))"
+ },
+ {
+ "id": "15.4.4.22-1-6",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-1-6.js",
+ "description": "Array.prototype.reduceRight applied to Number object",
+ "test": "assertTrue((function testcase() {\n\n var obj = new Number(-128);\n obj.length = 2;\n obj[0] = 11;\n obj[1] = 12;\n var accessed = false;\n\n function callbackfn(prevVal, curVal, idx, o) {\n accessed = true;\n return o instanceof Number;\n }\n\n return Array.prototype.reduceRight.call(obj, callbackfn, 11) && accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight))"
+ },
+ {
+ "id": "15.4.4.22-1-7",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-1-7.js",
+ "description": "Array.prototype.reduceRight applied to string primitive",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n\n function callbackfn(prevVal, curVal, idx, obj) {\n accessed = true;\n return obj instanceof String;\n }\n\n return Array.prototype.reduceRight.call(\"hello\\nworld\\\\!\", callbackfn, \"h\") && accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight))"
+ },
+ {
+ "id": "15.4.4.22-1-8",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-1-8.js",
+ "description": "Array.prototype.reduceRight applied to String object",
+ "test": "assertTrue((function testcase() {\n\n var obj = new String(\"hello\\nworld\\\\!\");\n var accessed = false;\n\n function callbackfn(prevVal, curVal, idx, o) {\n accessed = true;\n return o instanceof String;\n }\n\n return Array.prototype.reduceRight.call(obj, callbackfn, \"h\") && accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight))"
+ },
+ {
+ "id": "15.4.4.22-1-9",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-1-9.js",
+ "description": "Array.prototype.reduceRight applied to Function object",
+ "test": "assertTrue((function testcase() {\n\n var obj = function (a, b) {\n return a + b;\n };\n obj[0] = 11;\n obj[1] = 9;\n var accessed = false;\n\n function callbackfn(prevVal, curVal, idx, o) {\n accessed = true;\n return o instanceof Function;\n }\n\n return Array.prototype.reduceRight.call(obj, callbackfn, 11) && accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight))"
+ },
+ {
+ "id": "15.4.4.22-10-1",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-10-1.js",
+ "description": "Array.prototype.reduceRight doesn't mutate the Array on which it is called on",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(prevVal, curVal, idx, obj)\n {\n return 1;\n }\n var srcArr = [1,2,3,4,5];\n srcArr.reduceRight(callbackfn);\n if(srcArr[0] === 1 &&\n srcArr[1] === 2 &&\n srcArr[2] === 3 &&\n srcArr[3] === 4 &&\n srcArr[4] === 5)\n {\n return true;\n }\n\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight))"
+ },
+ {
+ "id": "15.4.4.22-10-2",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-10-2.js",
+ "description": "Array.prototype.reduceRight reduces array in descending order of indices",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(prevVal, curVal, idx, obj)\n {\n return prevVal + curVal;\n }\n var srcArr = ['1','2','3','4','5'];\n if(srcArr.reduceRight(callbackfn) === '54321')\n {\n return true;\n }\n\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight))"
+ },
+ {
+ "id": "15.4.4.22-10-3",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-10-3.js",
+ "description": "Array.prototype.reduceRight - subclassed array with length 1",
+ "test": "assertTrue((function testcase() {\n foo.prototype = [1];\n function foo() {}\n var f = new foo();\n \n function cb(){}\n if(f.reduceRight(cb) === 1)\n return true;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight))"
+ },
+ {
+ "id": "15.4.4.22-10-4",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-10-4.js",
+ "description": "Array.prototype.reduceRight - subclassed array with length more than 1",
+ "test": "assertTrue((function testcase() {\n foo.prototype = new Array(0, 1, 2, 3);\n function foo() {}\n var f = new foo();\n \n function cb(prevVal, curVal, idx, obj){return prevVal + curVal;}\n if(f.reduceRight(cb) === 6)\n return true;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight))"
+ },
+ {
+ "id": "15.4.4.22-10-5",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-10-5.js",
+ "description": "Array.prototype.reduceRight reduces array in descending order of indices(initialvalue present)",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn(prevVal, curVal, idx, obj)\n {\n return prevVal + curVal;\n }\n var srcArr = ['1','2','3','4','5'];\n if(srcArr.reduceRight(callbackfn,'6') === '654321')\n {\n return true;\n }\n\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight))"
+ },
+ {
+ "id": "15.4.4.22-10-6",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-10-6.js",
+ "description": "Array.prototype.reduceRight - subclassed array when initialvalue provided",
+ "test": "assertTrue((function testcase() {\n foo.prototype = new Array(0, 1, 2, 3);\n function foo() {}\n var f = new foo();\n \n function cb(prevVal, curVal, idx, obj){return prevVal + curVal;}\n if(f.reduceRight(cb,\"4\") === \"43210\")\n return true;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight))"
+ },
+ {
+ "id": "15.4.4.22-10-7",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-10-7.js",
+ "description": "Array.prototype.reduceRight - subclassed array when length to 1 and initialvalue provided",
+ "test": "assertTrue((function testcase() {\n foo.prototype = [1];\n function foo() {}\n var f = new foo();\n \n function cb(prevVal, curVal, idx, obj){return prevVal + curVal;}\n if(f.reduceRight(cb,\"4\") === \"41\")\n return true;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight))"
+ },
+ {
+ "id": "15.4.4.22-10-8",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-10-8.js",
+ "description": "Array.prototype.reduceRight doesn't visit expandos",
+ "test": "assertTrue((function testcase() {\n\n var callCnt = 0;\n function callbackfn(prevVal, curVal, idx, obj)\n {\n callCnt++;\n }\n var srcArr = ['1','2','3','4','5'];\n srcArr[\"i\"] = 10;\n srcArr[true] = 11;\n\n srcArr.reduceRight(callbackfn);\n\n if(callCnt == 4)\n {\n return true;\n }\n\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight))"
+ },
+ {
+ "id": "15.4.4.22-2-1",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-2-1.js",
+ "description": "Array.prototype.reduceRight applied to Array-like object, 'length' is an own data property",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n var obj = {\n 0: 12,\n 1: 11,\n 2: 9,\n length: 2\n };\n\n function callbackfn(prevVal, curVal, idx, obj) {\n accessed = true;\n return obj.length === 2;\n }\n\n return Array.prototype.reduceRight.call(obj, callbackfn, 11) && accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight))"
+ },
+ {
+ "id": "15.4.4.22-2-10",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-2-10.js",
+ "description": "Array.prototype.reduceRight applied to Array-like object, 'length' is an inherited accessor property",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n var Con = function () { };\n\n\n function callbackfn(prevVal, curVal, idx, obj) {\n accessed = true;\n return obj.length === 2;\n }\n\n var proto = {};\n\n Object.defineProperty(proto, \"length\", {\n get: function () {\n return 2;\n },\n configurable: true\n });\n\n Con.prototype = proto;\n\n var child = new Con();\n child[0] = 12;\n child[1] = 11;\n child[2] = 9;\n\n\n return Array.prototype.reduceRight.call(child, callbackfn, 11) && accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.4.4.22-2-11",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-2-11.js",
+ "description": "Array.prototype.reduceRight applied to Array-like object, 'length' is an own accessor property without a get function",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n\n function callbackfn(prevVal, curVal, idx, obj) {\n accessed = true;\n return typeof obj.length === \"undefined\";\n }\n\n var obj = {\n 0: 11,\n 1: 12\n };\n Object.defineProperty(obj, \"length\", {\n set: function () { },\n configurable: true\n });\n\n return Array.prototype.reduceRight.call(obj, callbackfn, 111) === 111 && !accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.4.4.22-2-12",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-2-12.js",
+ "description": "Array.prototype.reduceRight - 'length' is own accessor property without a get function that overrides an inherited accessor property",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n\n function callbackfn(prevVal, curVal, idx, obj) {\n accessed = true;\n return typeof obj.length === \"undefined\";\n }\n\n try {\n Object.defineProperty(Object.prototype, \"length\", {\n get: function () {\n return 2;\n },\n configurable: true\n });\n\n var obj = { 0: 12, 1: 13 };\n Object.defineProperty(obj, \"length\", {\n set: function () { },\n configurable: true\n });\n\n return Array.prototype.reduceRight.call(obj, callbackfn, 11) === 11 && !accessed;\n } finally {\n delete Object.prototype.length;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.4.4.22-2-13",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-2-13.js",
+ "description": "Array.prototype.reduceRight applied to the Array-like object that 'length' is inherited accessor property without a get function",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n\n function callbackfn(prevVal, curVal, idx, obj) {\n accessed = true;\n return curVal > 10;\n }\n\n var proto = {};\n Object.defineProperty(proto, \"length\", {\n set: function () { },\n configurable: true\n });\n\n var Con = function () { };\n Con.prototype = proto;\n\n var child = new Con();\n child[0] = 11;\n child[1] = 12;\n\n return Array.prototype.reduceRight.call(child, callbackfn, 111) === 111 && !accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.4.4.22-2-14",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-2-14.js",
+ "description": "Array.prototype.reduceRight applied to the Array-like object that 'length' property doesn't exist",
+ "test": "assertTrue((function testcase() {\n\n var obj = { 0: 11, 1: 12 };\n var accessed = false;\n\n function callbackfn(prevVal, curVal, idx, obj) {\n accessed = true;\n return curVal > 10;\n }\n\n return Array.prototype.reduceRight.call(obj, callbackfn, 111) === 111 && !accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight))"
+ },
+ {
+ "id": "15.4.4.22-2-15",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-2-15.js",
+ "description": "Array.prototype.reduceRight - 'length' is property of the global object",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n\n function callbackfn(prevVal, curVal, idx, obj) {\n accessed = true;\n return obj.length === fnGlobalObject().length;\n }\n\n try {\n var oldLen = fnGlobalObject().length;\n fnGlobalObject()[0] = 12;\n fnGlobalObject()[1] = 11;\n fnGlobalObject()[2] = 9;\n fnGlobalObject().length = 2;\n return Array.prototype.reduceRight.call(fnGlobalObject(), callbackfn, 111) && accessed;\n } finally {\n delete fnGlobalObject()[0];\n delete fnGlobalObject()[1];\n delete fnGlobalObject()[2];\n fnGlobalObject().length = oldLen;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight))"
+ },
+ {
+ "id": "15.4.4.22-2-17",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-2-17.js",
+ "description": "Array.prototype.reduceRight applied to the Arguments object, which implements its own property get method",
+ "test": "assertTrue((function testcase() {\n\n var arg;\n var accessed = false;\n\n function callbackfn(prevVal, curVal, idx, obj) {\n accessed = true;\n return obj.length === 2;\n }\n\n var func = function (a, b) {\n arg = arguments;\n return Array.prototype.reduceRight.call(arguments, callbackfn, 11);\n };\n\n return func(12, 11) && accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight))"
+ },
+ {
+ "id": "15.4.4.22-2-18",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-2-18.js",
+ "description": "Array.prototype.reduceRight applied to String object, which implements its own property get method",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n var str = new String(\"432\");\n\n function callbackfn(preVal, curVal, idx, obj) {\n accessed = true;\n return obj.length === 3;\n }\n\n try {\n String.prototype[3] = \"1\";\n return Array.prototype.reduceRight.call(str, callbackfn, 111) && accessed;\n } finally {\n delete String.prototype[3];\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight))"
+ },
+ {
+ "id": "15.4.4.22-2-19",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-2-19.js",
+ "description": "Array.prototype.reduceRight applied to Function object, which implements its own property get method",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n var fun = function (a, b) {\n return a + b;\n };\n fun[0] = 12;\n fun[1] = 11;\n fun[2] = 9;\n\n function callbackfn(prevVal, curVal, idx, obj) {\n accessed = true;\n return obj.length === 2;\n }\n\n return Array.prototype.reduceRight.call(fun, callbackfn, 11) && accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight))"
+ },
+ {
+ "id": "15.4.4.22-2-2",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-2-2.js",
+ "description": "Array.prototype.reduceRight - 'length' is own data property on an Array",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n\n function callbackfn(prevVal, curVal, idx, obj) {\n accessed = true;\n return obj.length === 2;\n }\n\n return [12, 11].reduceRight(callbackfn, 11) && accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight))"
+ },
+ {
+ "id": "15.4.4.22-2-3",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-2-3.js",
+ "description": "Array.prototype.reduceRight applied to Array-like object, 'length' is an own data property that overrides an inherited data property",
+ "test": "assertTrue((function testcase() {\n\n var accessed = true;\n\n function callbackfn(prevVal, curVal, idx, obj) {\n accessed = true;\n return obj.length === 2;\n }\n\n var proto = { length: 3 };\n\n var Con = function () { };\n Con.prototype = proto;\n\n var child = new Con();\n child.length = 2;\n child[0] = 12;\n child[1] = 11;\n child[2] = 9;\n\n return Array.prototype.reduceRight.call(child, callbackfn) && accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight))"
+ },
+ {
+ "id": "15.4.4.22-2-4",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-2-4.js",
+ "description": "Array.prototype.reduceRight - 'length' is own data property that overrides an inherited data property on an Array",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n var arrProtoLen;\n function callbackfn(prevVal, curVal, idx, obj) {\n accessed = true;\n return obj.length === 2;\n }\n\n try {\n arrProtoLen = Array.prototype.length;\n Array.prototype.length = 0;\n\n return [12, 11].reduceRight(callbackfn, 11) && accessed;\n } finally {\n Array.prototype.length = arrProtoLen;\n }\n\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight))"
+ },
+ {
+ "id": "15.4.4.22-2-5",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-2-5.js",
+ "description": "Array.prototype.reduceRight applied to Array-like object, 'length' is an own data property that overrides an inherited accessor property",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n\n function callbackfn(prevVal, curVal, idx, obj) {\n accessed = true;\n return obj.length === 2;\n }\n\n var proto = {};\n Object.defineProperty(proto, \"length\", {\n get: function () {\n return 3;\n },\n configurable: true\n });\n\n var Con = function () { };\n Con.prototype = proto;\n\n var child = new Con();\n Object.defineProperty(child, \"length\", {\n value: 2,\n configurable: true\n });\n child[0] = 12;\n child[1] = 11;\n child[2] = 9;\n\n return Array.prototype.reduceRight.call(child, callbackfn) && accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.4.4.22-2-6",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-2-6.js",
+ "description": "Array.prototype.reduceRight applied to Array-like object, 'length' is an inherited data property",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n var proto = { length: 2 };\n var Con = function () { };\n Con.prototype = proto;\n\n var child = new Con();\n child[0] = 12;\n child[1] = 11;\n child[2] = 9;\n\n function callbackfn1(prevVal, curVal, idx, obj) {\n accessed = true;\n return obj.length === 2;\n }\n\n return Array.prototype.reduceRight.call(child, callbackfn1, 11) && accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight))"
+ },
+ {
+ "id": "15.4.4.22-2-7",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-2-7.js",
+ "description": "Array.prototype.reduceRight applied to Array-like object, 'length' is an own accessor property",
+ "test": "assertTrue((function testcase() {\n\n var accessed = true;\n var obj = {};\n obj[0] = 12;\n obj[1] = 11;\n obj[2] = 9;\n\n function callbackfn(prevVal, curVal, idx, obj) {\n accessed = true;\n return obj.length === 2;\n }\n\n Object.defineProperty(obj, \"length\", {\n get: function () {\n return 2;\n },\n configurable: true\n });\n\n return Array.prototype.reduceRight.call(obj, callbackfn, 11) && accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.4.4.22-2-8",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-2-8.js",
+ "description": "Array.prototype.reduceRight applied to Array-like object, 'length' is an own accessor property that overrides an inherited data property",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n\n function callbackfn(prevVal, curVal, idx, obj) {\n accessed = true;\n return obj.length === 2;\n }\n\n var proto = { length: 3 };\n\n var Con = function () { };\n Con.prototype = proto;\n\n var child = new Con();\n\n Object.defineProperty(child, \"length\", {\n get: function () {\n return 2;\n },\n configurable: true\n });\n\n child[0] = 12;\n child[1] = 11;\n child[2] = 9;\n\n return Array.prototype.reduceRight.call(child, callbackfn, 11) && accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.4.4.22-2-9",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-2-9.js",
+ "description": "Array.prototype.reduceRight applied to Array-like object, 'length' is an own accessor property that overrides an inherited accessor property",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n\n function callbackfn1(prevVal, curVal, idx, obj) {\n accessed = true;\n return obj.length === 2;\n }\n\n var proto = {};\n Object.defineProperty(proto, \"length\", {\n get: function () {\n return 3;\n },\n configurable: true\n });\n\n var Con = function () { };\n Con.prototype = proto;\n\n var child = new Con();\n Object.defineProperty(child, \"length\", {\n get: function () {\n return 2;\n },\n configurable: true\n });\n child[0] = 12;\n child[1] = 11;\n child[2] = 9;\n\n return Array.prototype.reduceRight.call(child, callbackfn1, 111) && accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.4.4.22-3-1",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-1.js",
+ "description": "Array.prototype.reduceRight - value of 'length' is undefined",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n\n function callbackfn(prevVal, curVal, idx, obj) {\n accessed = true;\n }\n\n var obj = { 0: 9, length: undefined };\n\n return Array.prototype.reduceRight.call(obj, callbackfn, 1) === 1 && !accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight))"
+ },
+ {
+ "id": "15.4.4.22-3-10",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-10.js",
+ "description": "Array.prototype.reduceRight - value of 'length' is a number (value is NaN)",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n\n function callbackfn(prevVal, curVal, idx, obj) {\n accessed = true;\n }\n\n var obj = { 0: 9, length: NaN };\n\n return Array.prototype.reduceRight.call(obj, callbackfn, 1) === 1 && !accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight))"
+ },
+ {
+ "id": "15.4.4.22-3-11",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-11.js",
+ "description": "Array.prototype.reduceRight - value of 'length' is a string containing a positive number",
+ "test": "assertTrue((function testcase() {\n\n var testResult1 = true;\n var testResult2 = false;\n function callbackfn(prevVal, curVal, idx, obj) {\n if (idx > 1) {\n testResult1 = false;\n }\n\n if (idx === 1) {\n testResult2 = true;\n }\n return false;\n }\n\n var obj = { 0: 12, 1: 11, 2: 9, length: \"2\" };\n\n Array.prototype.reduceRight.call(obj, callbackfn, 1);\n return testResult1 && testResult2;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight))"
+ },
+ {
+ "id": "15.4.4.22-3-12",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-12.js",
+ "description": "Array.prototype.reduceRight - value of 'length' is a string containing a negative number",
+ "test": "assertTrue((function testcase() {\n\n var testResult1 = true;\n var testResult2 = false;\n function callbackfn(prevVal, curVal, idx, obj) {\n if (idx > 1) {\n testResult1 = false;\n }\n\n if (idx === 1) {\n testResult2 = true;\n }\n return false;\n }\n\n var obj = { 0: 11, 1: 12, 2: 9, length: \"-4294967294\" };\n\n Array.prototype.reduceRight.call(obj, callbackfn, 1);\n return testResult1 && testResult2;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight))"
+ },
+ {
+ "id": "15.4.4.22-3-13",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-13.js",
+ "description": "Array.prototype.reduceRight - value of 'length' is a string containing a decimal number",
+ "test": "assertTrue((function testcase() {\n\n var testResult1 = true;\n var testResult2 = false;\n function callbackfn(prevVal, curVal, idx, obj) {\n if (idx > 1) {\n testResult1 = false;\n }\n\n if (idx === 1) {\n testResult2 = true;\n }\n return false;\n }\n\n var obj = { 0: 12, 1: 11, 2: 9, length: \"2.5\" };\n\n Array.prototype.reduceRight.call(obj, callbackfn, 1);\n return testResult1 && testResult2;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight))"
+ },
+ {
+ "id": "15.4.4.22-3-14",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-14.js",
+ "description": "Array.prototype.reduceRight - value of 'length' is a string containing +/-Infinity",
+ "test": "assertTrue((function testcase() {\n\n var accessed1 = false;\n var accessed2 = false;\n var accessed3 = false;\n\n function callbackfn1(prevVal, curVal, idx, obj) {\n accessed1 = true;\n }\n\n function callbackfn2(prevVal, curVal, idx, obj) {\n accessed2 = true;\n }\n\n function callbackfn3(prevVal, curVal, idx, obj) {\n accessed3 = true;\n }\n\n var obj1 = { 0: 9, length: \"Infinity\" };\n var obj2 = { 0: 9, length: \"-Infinity\" };\n var obj3 = { 0: 9, length: \"+Infinity\" };\n\n return Array.prototype.reduceRight.call(obj1, callbackfn1, 1) === 1 &&\n Array.prototype.reduceRight.call(obj2, callbackfn2, 2) === 2 &&\n Array.prototype.reduceRight.call(obj3, callbackfn3, 3) === 3 &&\n !accessed1 && !accessed2 && !accessed3;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight))"
+ },
+ {
+ "id": "15.4.4.22-3-15",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-15.js",
+ "description": "Array.prototype.reduceRight - value of 'length' is a string containing an exponential number",
+ "test": "assertTrue((function testcase() {\n\n var testResult1 = true;\n var testResult2 = false;\n function callbackfn(prevVal, curVal, idx, obj) {\n if (idx > 1) {\n testResult1 = false;\n }\n\n if (idx === 1) {\n testResult2 = true;\n }\n return false;\n }\n\n var obj = { 0: 12, 1: 11, 2: 9, length: \"2E0\" };\n\n Array.prototype.reduceRight.call(obj, callbackfn, 1);\n return testResult1 && testResult2;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight))"
+ },
+ {
+ "id": "15.4.4.22-3-16",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-16.js",
+ "description": "Array.prototype.reduceRight - value of 'length' is a string containing a hex number",
+ "test": "assertTrue((function testcase() {\n\n var testResult1 = true;\n var testResult2 = false;\n function callbackfn(prevVal, curVal, idx, obj) {\n if (idx > 1) {\n testResult1 = false;\n }\n\n if (idx === 1) {\n testResult2 = true;\n }\n return false;\n }\n\n var obj = { 0: 12, 1: 11, 2: 9, length: \"0x0002\" };\n\n Array.prototype.reduceRight.call(obj, callbackfn, 1);\n return testResult1 && testResult2;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight))"
+ },
+ {
+ "id": "15.4.4.22-3-17",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-17.js",
+ "description": "Array.prototype.reduceRight - value of 'length' is a string containing a number with leading zeros",
+ "test": "assertTrue((function testcase() {\n\n var testResult1 = true;\n var testResult2 = false;\n function callbackfn(prevVal, curVal, idx, obj) {\n if (idx > 1) {\n testResult1 = false;\n }\n\n if (idx === 1) {\n testResult2 = true;\n }\n return false;\n }\n\n var obj = { 0: 12, 1: 11, 2: 9, length: \"0002.00\" };\n\n Array.prototype.reduceRight.call(obj, callbackfn, 1);\n return testResult1 && testResult2;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight))"
+ },
+ {
+ "id": "15.4.4.22-3-18",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-18.js",
+ "description": "Array.prototype.reduceRight - value of 'length' is a string that can't convert to a number",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n\n function callbackfn(prevVal, curVal, idx, obj) {\n accessed = true;\n }\n\n var obj = { 0: 9, 1: 8, length: \"two\" };\n\n return Array.prototype.reduceRight.call(obj, callbackfn, 11) === 11 && !accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight))"
+ },
+ {
+ "id": "15.4.4.22-3-19",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-19.js",
+ "description": "Array.prototype.reduceRight - value of 'length' is an object which has an own toString method",
+ "test": "assertTrue((function testcase() {\n\n var testResult1 = true;\n var testResult2 = false;\n function callbackfn(prevVal, curVal, idx, obj) {\n if (idx > 1) {\n testResult1 = false;\n }\n\n if (idx === 1) {\n testResult2 = true;\n }\n return false;\n }\n\n var toStringAccessed = false;\n var obj = {\n 0: 12,\n 1: 11,\n 2: 9,\n length: {\n toString: function () {\n toStringAccessed = true;\n return '2';\n }\n }\n };\n\n // objects inherit the default valueOf() method from Object\n // that simply returns itself. Since the default valueOf() method\n // does not return a primitive value, ES next tries to convert the object\n // to a number by calling its toString() method and converting the\n // resulting string to a number.\n\n Array.prototype.reduceRight.call(obj, callbackfn, 1);\n return testResult1 && testResult2 && toStringAccessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight))"
+ },
+ {
+ "id": "15.4.4.22-3-2",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-2.js",
+ "description": "Array.prototype.reduceRight applied to an Array-like object, 'length' is 0 (length overridden to false(type conversion))",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n\n function callbackfn(preVal, curVal, idx, obj) {\n accessed = true;\n }\n\n var obj = { 0: 9, length: false };\n\n return Array.prototype.reduceRight.call(obj, callbackfn, 1) === 1 && !accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight))"
+ },
+ {
+ "id": "15.4.4.22-3-20",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-20.js",
+ "description": "Array.prototype.reduceRight - value of 'length' is an Object which has an own valueOf method",
+ "test": "assertTrue((function testcase() {\n\n var testResult1 = true;\n var testResult2 = false;\n function callbackfn(prevVal, curVal, idx, obj) {\n if (idx > 1) {\n testResult1 = false;\n }\n\n if (idx === 1) {\n testResult2 = true;\n }\n return false;\n }\n\n var valueOfAccessed = false;\n\n var obj = {\n 0: 12,\n 1: 11,\n 2: 9,\n length: {\n valueOf: function () {\n valueOfAccessed = true;\n return 2;\n }\n }\n };\n\n Array.prototype.reduceRight.call(obj, callbackfn, 1);\n return testResult1 && testResult2 && valueOfAccessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight))"
+ },
+ {
+ "id": "15.4.4.22-3-21",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-21.js",
+ "description": "Array.prototype.reduceRight - 'length' is an object that has an own valueOf method that returns an object and toString method that returns a string",
+ "test": "assertTrue((function testcase() {\n\n var testResult1 = true;\n var testResult2 = false;\n function callbackfn(prevVal, curVal, idx, obj) {\n if (idx > 1) {\n testResult1 = false;\n }\n\n if (idx === 1) {\n testResult2 = true;\n }\n return false;\n }\n\n var toStringAccessed = false;\n var valueOfAccessed = false;\n\n var obj = {\n 0: 12,\n 1: 11,\n 2: 9,\n length: {\n valueOf: function () {\n valueOfAccessed = true;\n return {};\n },\n toString: function () {\n toStringAccessed = true;\n return '2';\n }\n }\n };\n\n Array.prototype.reduceRight.call(obj, callbackfn, 1);\n return testResult1 && testResult2 && valueOfAccessed && toStringAccessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight))"
+ },
+ {
+ "id": "15.4.4.22-3-22",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-22.js",
+ "description": "Array.prototype.reduceRight throws TypeError exception when 'length' is an object with toString and valueOf methods that don�t return primitive values",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n var toStringAccessed = false;\n var valueOfAccessed = false;\n\n function callbackfn(prevVal, curVal, idx, obj) {\n accessed = true;\n }\n\n var obj = {\n 0: 11,\n 1: 12,\n\n length: {\n valueOf: function () {\n valueOfAccessed = true;\n return {};\n },\n toString: function () {\n toStringAccessed = true;\n return {};\n }\n }\n };\n\n try {\n Array.prototype.reduceRight.call(obj, callbackfn, 1);\n return false;\n } catch (ex) {\n return (ex instanceof TypeError) && toStringAccessed && valueOfAccessed && !accessed;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight))"
+ },
+ {
+ "id": "15.4.4.22-3-23",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-23.js",
+ "description": "Array.prototype.reduceRight uses inherited valueOf method when 'length' is an object with an own toString and inherited valueOf methods",
+ "test": "assertTrue((function testcase() {\n\n var testResult1 = true;\n var testResult2 = false;\n var valueOfAccessed = false;\n var toStringAccessed = false;\n\n var proto = {\n valueOf: function () {\n valueOfAccessed = true;\n return 2;\n }\n };\n var Con = function () { };\n Con.prototype = proto;\n var child = new Con();\n\n function callbackfn(prevVal, curVal, idx, obj) {\n if (idx > 1) {\n testResult1 = false;\n }\n\n if (idx === 1) {\n testResult2 = true;\n }\n return false;\n }\n\n child.toString = function () {\n toStringAccessed = true;\n return '1';\n };\n\n var obj = {\n 0: 12,\n 1: 11,\n 2: 9,\n length: child\n };\n\n Array.prototype.reduceRight.call(obj, callbackfn, 1);\n return testResult1 && testResult2 && valueOfAccessed && !toStringAccessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight))"
+ },
+ {
+ "id": "15.4.4.22-3-24",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-24.js",
+ "description": "Array.prototype.reduceRight - value of 'length' is a positive non-integer, ensure truncation occurs in the proper direction",
+ "test": "assertTrue((function testcase() {\n\n var testResult1 = true;\n var testResult2 = false;\n function callbackfn(prevVal, curVal, idx, obj) {\n if (idx > 1) {\n testResult1 = false;\n }\n\n if (idx === 1) {\n testResult2 = true;\n }\n return false;\n }\n\n var obj = { 0: 12, 1: 11, 2: 9, length: 2.685 };\n\n Array.prototype.reduceRight.call(obj, callbackfn, 1);\n return testResult1 && testResult2;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight))"
+ },
+ {
+ "id": "15.4.4.22-3-25",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-25.js",
+ "description": "Array.prototype.reduceRight - value of 'length' is a negative non-integer, ensure truncation occurs in the proper direction",
+ "test": "assertTrue((function testcase() {\n\n var testResult1 = true;\n var testResult2 = false;\n function callbackfn(prevVal, curVal, idx, obj) {\n if (idx > 1) {\n testResult1 = false;\n }\n\n if (idx === 1) {\n testResult2 = true;\n }\n return false;\n }\n\n var obj = {\n 0: 12,\n 1: 11,\n 2: 9,\n length: -4294967294.5\n };\n\n Array.prototype.reduceRight.call(obj, callbackfn, 1);\n return testResult1 && testResult2;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight))"
+ },
+ {
+ "id": "15.4.4.22-3-28",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-28.js",
+ "description": "Array.prototype.reduceRight - value of 'length' is boundary value (2^32)",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n\n function callbackfn(prevVal, curVal, idx, obj) {\n accessed = true;\n }\n\n var obj = {\n 0: 12,\n length: 4294967296\n };\n\n return Array.prototype.reduceRight.call(obj, callbackfn, 1) === 1 && !accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight))"
+ },
+ {
+ "id": "15.4.4.22-3-29",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-29.js",
+ "description": "Array.prototype.reduceRight - value of 'length' is boundary value (2^32 + 1)",
+ "test": "assertTrue((function testcase() {\n\n var testResult1 = true;\n var testResult2 = false;\n function callbackfn(prevVal, curVal, idx, obj) {\n if (idx > 0) {\n testResult1 = false;\n }\n\n if (idx === 0) {\n testResult2 = true;\n }\n return false;\n }\n\n var obj = {\n 0: 11,\n 1: 9,\n length: 4294967297\n };\n\n Array.prototype.reduceRight.call(obj, callbackfn, 1);\n return testResult1 && testResult2;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight))"
+ },
+ {
+ "id": "15.4.4.22-3-3",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-3.js",
+ "description": "Array.prototype.reduceRight - value of 'length' is a number (value is 0)",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n\n function callbackfn(prevVal, curVal, idx, obj) {\n accessed = true;\n }\n\n var obj = { 0: 9, length: 0 };\n\n return Array.prototype.reduceRight.call(obj, callbackfn, 1) === 1 && !accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight))"
+ },
+ {
+ "id": "15.4.4.22-3-4",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-4.js",
+ "description": "Array.prototype.reduceRight - value of 'length' is a number (value is +0)",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n\n function callbackfn(prevVal, curVal, idx, obj) {\n accessed = true;\n }\n\n var obj = { 0: 9, length: +0 };\n\n return Array.prototype.reduceRight.call(obj, callbackfn, 1) === 1 && !accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight))"
+ },
+ {
+ "id": "15.4.4.22-3-5",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-5.js",
+ "description": "Array.prototype.reduceRight - value of 'length' is a number (value is -0)",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n\n function callbackfn(preVal, curVal, idx, obj) {\n accessed = true;\n }\n\n var obj = { 0: 9, length: -0 };\n\n return Array.prototype.reduceRight.call(obj, callbackfn, 1) === 1 && !accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight))"
+ },
+ {
+ "id": "15.4.4.22-3-6",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-6.js",
+ "description": "Array.prototype.reduceRight - value of 'length' is a number (value is positive)",
+ "test": "assertTrue((function testcase() {\n\n var testResult1 = true;\n var testResult2 = false;\n function callbackfn(prevVal, curVal, idx, obj) {\n if (idx > 1) {\n testResult1 = false;\n }\n\n if (idx === 1) {\n testResult2 = true;\n }\n return false;\n }\n\n var obj = { 1: 11, 2: 9, length: 2 };\n\n Array.prototype.reduceRight.call(obj, callbackfn, 1);\n return testResult1 && testResult2;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight))"
+ },
+ {
+ "id": "15.4.4.22-3-7",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-7.js",
+ "description": "Array.prototype.reduceRight - value of 'length' is a number (value is negative)",
+ "test": "assertTrue((function testcase() {\n\n var testResult1 = true;\n var testResult2 = false;\n function callbackfn(prevVal, curVal, idx, obj) {\n if (idx > 1) {\n testResult1 = false;\n }\n\n if (idx === 1) {\n testResult2 = true;\n }\n return false;\n }\n\n var obj = { 1: 11, 2: 9, length: -4294967294 };\n\n Array.prototype.reduceRight.call(obj, callbackfn, 1);\n return testResult1 && testResult2;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight))"
+ },
+ {
+ "id": "15.4.4.22-3-8",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-8.js",
+ "description": "Array.prototype.reduceRight - value of 'length' is a number (value is Infinity)",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n\n function callbackfn(prevVal, curVal, idx, obj) {\n accessed = true;\n }\n\n var obj = { 0: 9, length: Infinity };\n\n return Array.prototype.reduceRight.call(obj, callbackfn, 1) === 1 && !accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight))"
+ },
+ {
+ "id": "15.4.4.22-3-9",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-3-9.js",
+ "description": "Array.prototype.reduceRight - value of 'length' is a number (value is -Infinity)",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n\n function callbackfn(prevVal, curVal, idx, obj) {\n accessed = true;\n }\n\n var obj = { 0: 9, length: -Infinity };\n\n return Array.prototype.reduceRight.call(obj, callbackfn, 1) === 1 && !accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight))"
+ },
+ {
+ "id": "15.4.4.22-4-1",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-4-1.js",
+ "description": "Array.prototype.reduceRight throws TypeError if callbackfn is undefined",
+ "test": "assertTrue((function testcase() {\n\n var arr = new Array(10);\n try {\n arr.reduceRight(); \n }\n catch(e) {\n if(e instanceof TypeError)\n return true; \n }\n\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight))"
+ },
+ {
+ "id": "15.4.4.22-4-10",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-4-10.js",
+ "description": "Array.prototype.reduceRight - the exception is not thrown if exception was thrown by step 2",
+ "test": "assertTrue((function testcase() {\n\n var obj = { 0: 11, 1: 12 };\n\n Object.defineProperty(obj, \"length\", {\n get: function () {\n throw new SyntaxError();\n },\n configurable: true\n });\n\n try {\n Array.prototype.reduceRight.call(obj, undefined);\n return false;\n } catch (ex) {\n return !(ex instanceof TypeError);\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.4.4.22-4-11",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-4-11.js",
+ "description": "Array.prototype.reduceRight - the exception is not thrown if exception was thrown by step 3",
+ "test": "assertTrue((function testcase() {\n\n var obj = { 0: 11, 1: 12 };\n\n Object.defineProperty(obj, \"length\", {\n get: function () {\n return {\n toString: function () {\n throw new SyntaxError();\n }\n };\n },\n configurable: true\n });\n\n try {\n Array.prototype.reduceRight.call(obj, undefined);\n return false;\n } catch (ex) {\n return !(ex instanceof TypeError);\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.4.4.22-4-12",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-4-12.js",
+ "description": "Array.prototype.reduceRight - 'callbackfn' is a function",
+ "test": "assertTrue((function testcase() {\n\n var initialValue = 0;\n function callbackfn(accum, val, idx, obj) {\n accum += val;\n return accum;\n }\n\n return 20 === [11, 9].reduceRight(callbackfn, initialValue);\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight))"
+ },
+ {
+ "id": "15.4.4.22-4-15",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-4-15.js",
+ "description": "Array.prototype.reduceRight - calling with no callbackfn is the same as passing undefined for callbackfn",
+ "test": "assertTrue((function testcase() {\n var obj = { 10: 10 };\n var lengthAccessed = false;\n var loopAccessed = false;\n\n Object.defineProperty(obj, \"length\", {\n get: function () {\n lengthAccessed = true;\n return 20;\n },\n configurable: true\n });\n Object.defineProperty(obj, \"0\", {\n get: function () {\n loopAccessed = true;\n return 10;\n },\n configurable: true\n });\n\n try {\n Array.prototype.reduceRight.call(obj, undefined);\n return false;\n } catch (ex) {\n return (ex instanceof TypeError) && lengthAccessed && !loopAccessed;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects())"
+ },
+ {
+ "id": "15.4.4.22-4-2",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-4-2.js",
+ "description": "Array.prototype.reduceRight throws ReferenceError if callbackfn is unreferenced",
+ "test": "assertTrue((function testcase() {\n\n var arr = new Array(10);\n try {\n arr.reduceRight(foo); \n }\n catch(e) {\n if(e instanceof ReferenceError)\n return true; \n }\n\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight))"
+ },
+ {
+ "id": "15.4.4.22-4-3",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-4-3.js",
+ "description": "Array.prototype.reduceRight throws TypeError if callbackfn is null",
+ "test": "assertTrue((function testcase() {\n\n var arr = new Array(10);\n try {\n arr.reduceRight(null); \n }\n catch(e) {\n if(e instanceof TypeError)\n return true; \n }\n\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight))"
+ },
+ {
+ "id": "15.4.4.22-4-4",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-4-4.js",
+ "description": "Array.prototype.reduceRight throws TypeError if callbackfn is boolean",
+ "test": "assertTrue((function testcase() {\n\n var arr = new Array(10);\n try {\n arr.reduceRight(true); \n }\n catch(e) {\n if(e instanceof TypeError)\n return true; \n }\n\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight))"
+ },
+ {
+ "id": "15.4.4.22-4-5",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-4-5.js",
+ "description": "Array.prototype.reduceRight throws TypeError if callbackfn is number",
+ "test": "assertTrue((function testcase() {\n\n var arr = new Array(10);\n try {\n arr.reduceRight(5); \n }\n catch(e) {\n if(e instanceof TypeError)\n return true; \n }\n\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight))"
+ },
+ {
+ "id": "15.4.4.22-4-6",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-4-6.js",
+ "description": "Array.prototype.reduceRight throws TypeError if callbackfn is string",
+ "test": "assertTrue((function testcase() {\n\n var arr = new Array(10);\n try {\n arr.reduceRight(\"abc\"); \n }\n catch(e) {\n if(e instanceof TypeError)\n return true; \n }\n\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight))"
+ },
+ {
+ "id": "15.4.4.22-4-7",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-4-7.js",
+ "description": "Array.prototype.reduceRight throws TypeError if callbackfn is Object without [[Call]] internal method",
+ "test": "assertTrue((function testcase() {\n\n var arr = new Array(10);\n try {\n arr.reduceRight(new Object()); \n }\n catch(e) {\n if(e instanceof TypeError)\n return true; \n }\n\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight))"
+ },
+ {
+ "id": "15.4.4.22-4-8",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-4-8.js",
+ "description": "Array.prototype.reduceRight - side effects produced by step 2 are visible when an exception occurs",
+ "test": "assertTrue((function testcase() {\n\n var obj = { 0: 11, 1: 12 };\n\n var accessed = false;\n\n Object.defineProperty(obj, \"length\", {\n get: function () {\n accessed = true;\n return 2;\n },\n configurable: true\n });\n\n try {\n Array.prototype.reduceRight.call(obj, null);\n return false;\n } catch (ex) {\n return ex instanceof TypeError && accessed;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.4.4.22-4-9",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-4-9.js",
+ "description": "Array.prototype.reduceRight - side effects produced by step 3 are visible when an exception occurs",
+ "test": "assertTrue((function testcase() {\n\n var obj = { 0: 11, 1: 12 };\n\n var accessed = false;\n\n Object.defineProperty(obj, \"length\", {\n get: function () {\n return {\n toString: function () {\n accessed = true;\n return \"2\";\n }\n };\n },\n configurable: true\n });\n\n try {\n Array.prototype.reduceRight.call(obj, null);\n return false;\n } catch (ex) {\n return ex instanceof TypeError && accessed;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.4.4.22-5-1",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-5-1.js",
+ "description": "Array.prototype.reduceRight throws TypeError if 'length' is 0 (empty array), no initVal",
+ "test": "assertTrue((function testcase() {\n function cb(){}\n \n try {\n [].reduceRight(cb);\n }\n catch (e) {\n if (e instanceof TypeError) {\n return true;\n }\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight))"
+ },
+ {
+ "id": "15.4.4.22-5-10",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-5-10.js",
+ "description": "Array.prototype.reduceRight - side-effects produced by step 2 when an exception occurs",
+ "test": "assertTrue((function testcase() {\n\n var obj = { 0: 11, 1: 12 };\n\n var accessed = false;\n\n Object.defineProperty(obj, \"length\", {\n get: function () {\n accessed = true;\n return 0;\n },\n configurable: true\n });\n\n try {\n Array.prototype.reduceRight.call(obj, function () { });\n return false;\n } catch (ex) {\n return (ex instanceof TypeError) && accessed;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.4.4.22-5-11",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-5-11.js",
+ "description": "Array.prototype.reduceRight - side-effects produced by step 3 when an exception occurs",
+ "test": "assertTrue((function testcase() {\n\n var obj = { 0: 11, 1: 12 };\n\n var accessed = false;\n\n Object.defineProperty(obj, \"length\", {\n get: function () {\n return {\n toString: function () {\n accessed = true;\n return \"0\";\n }\n };\n },\n configurable: true\n });\n\n try {\n Array.prototype.reduceRight.call(obj, function () { });\n return false;\n } catch (ex) {\n return (ex instanceof TypeError) && accessed;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.4.4.22-5-12",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-5-12.js",
+ "description": "Array.prototype.reduceRight - the exception is not thrown if exception was thrown by step 2",
+ "test": "assertTrue((function testcase() {\n\n var obj = { 0: 11, 1: 12 };\n\n Object.defineProperty(obj, \"length\", {\n get: function () {\n throw new SyntaxError();\n },\n configurable: true\n });\n\n try {\n Array.prototype.reduceRight.call(obj, function () { });\n return false;\n } catch (ex) {\n return !(ex instanceof TypeError);\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.4.4.22-5-13",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-5-13.js",
+ "description": "Array.prototype.reduceRight - the exception is not thrown if exception was thrown by step 3",
+ "test": "assertTrue((function testcase() {\n\n var obj = { 0: 11, 1: 12 };\n\n Object.defineProperty(obj, \"length\", {\n get: function () {\n return {\n toString: function () {\n throw new SyntaxError();\n }\n };\n },\n configurable: true\n });\n\n try {\n Array.prototype.reduceRight.call(obj, function () { });\n return false;\n } catch (ex) {\n return !(ex instanceof TypeError);\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.4.4.22-5-2",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-5-2.js",
+ "description": "Array.prototype.reduceRight throws TypeError if 'length' is 0 (subclassed Array, length overridden to null (type conversion)), no initVal",
+ "test": "assertTrue((function testcase() {\n foo.prototype = new Array(1, 2, 3);\n function foo() {}\n var f = new foo();\n f.length = null;\n \n function cb(){}\n try {\n f.reduceRight(cb);\n }\n catch (e) {\n if (e instanceof TypeError) {\n return true;\n }\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight))"
+ },
+ {
+ "id": "15.4.4.22-5-3",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-5-3.js",
+ "description": "Array.prototype.reduceRight throws TypeError if 'length' is 0 (subclassed Array, length overridden to false (type conversion)), no initVal",
+ "test": "assertTrue((function testcase() {\n foo.prototype = new Array(1, 2, 3);\n function foo() {}\n var f = new foo();\n f.length = false;\n \n function cb(){}\n try {\n f.reduceRight(cb);\n }\n catch (e) {\n if (e instanceof TypeError) {\n return true;\n }\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight))"
+ },
+ {
+ "id": "15.4.4.22-5-4",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-5-4.js",
+ "description": "Array.prototype.reduceRight throws TypeError if 'length' is 0 (subclassed Array, length overridden to 0 (type conversion)), no initVal",
+ "test": "assertTrue((function testcase() {\n foo.prototype = new Array(1, 2, 3);\n function foo() {}\n var f = new foo();\n f.length = 0;\n \n function cb(){}\n try {\n f.reduceRight(cb);\n }\n catch (e) {\n if (e instanceof TypeError) {\n return true;\n }\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight))"
+ },
+ {
+ "id": "15.4.4.22-5-5",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-5-5.js",
+ "description": "Array.prototype.reduceRight throws TypeError if 'length' is 0 (subclassed Array, length overridden to '0' (type conversion)), no initVal",
+ "test": "assertTrue((function testcase() {\n foo.prototype = new Array(1, 2, 3);\n function foo() {}\n var f = new foo();\n f.length = '0';\n \n function cb(){}\n try {\n f.reduceRight(cb);\n }\n catch (e) {\n if (e instanceof TypeError) {\n return true;\n }\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight))"
+ },
+ {
+ "id": "15.4.4.22-5-6",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-5-6.js",
+ "description": "Array.prototype.reduceRight throws TypeError if 'length' is 0 (subclassed Array, length overridden with obj with valueOf), no initVal",
+ "test": "assertTrue((function testcase() {\n foo.prototype = new Array(1, 2, 3);\n function foo() {}\n var f = new foo();\n \n var o = { valueOf: function () { return 0;}};\n f.length = o;\n \n function cb(){}\n try {\n f.reduceRight(cb);\n }\n catch (e) {\n if (e instanceof TypeError) {\n return true;\n }\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight))"
+ },
+ {
+ "id": "15.4.4.22-5-7",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-5-7.js",
+ "description": "Array.prototype.reduceRight throws TypeError if 'length' is 0 (subclassed Array, length overridden with obj w/o valueOf (toString)), no initVal",
+ "test": "assertTrue((function testcase() {\n foo.prototype = new Array(1, 2, 3);\n function foo() {}\n var f = new foo();\n \n var o = { toString: function () { return '0';}};\n f.length = o;\n \n // objects inherit the default valueOf method of the Object object;\n // that simply returns the itself. Since the default valueOf() method\n // does not return a primitive value, ES next tries to convert the object\n // to a number by calling its toString() method and converting the\n // resulting string to a number.\n\n function cb(){}\n try {\n f.reduceRight(cb);\n }\n catch (e) {\n if (e instanceof TypeError) {\n return true;\n }\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight))"
+ },
+ {
+ "id": "15.4.4.22-5-8",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-5-8.js",
+ "description": "Array.prototype.reduceRight throws TypeError if 'length' is 0 (subclassed Array, length overridden with []), no initVal",
+ "test": "assertTrue((function testcase() {\n foo.prototype = new Array(1, 2, 3);\n function foo() {}\n var f = new foo();\n \n f.length = [];\n \n // objects inherit the default valueOf method of the Object object;\n // that simply returns the itself. Since the default valueOf() method\n // does not return a primitive value, ES next tries to convert the object\n // to a number by calling its toString() method and converting the\n // resulting string to a number.\n //\n // The toString( ) method on Array converts the array elements to strings,\n // then returns the result of concatenating these strings, with commas in\n // between. An array with no elements converts to the empty string, which\n // converts to the number 0. If an array has a single element that is a\n // number n, the array converts to a string representation of n, which is\n // then converted back to n itself. If an array contains more than one element,\n // or if its one element is not a number, the array converts to NaN.\n\n function cb(){}\n try {\n f.reduceRight(cb);\n }\n catch (e) {\n if (e instanceof TypeError) {\n return true;\n }\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight))"
+ },
+ {
+ "id": "15.4.4.22-5-9",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-5-9.js",
+ "description": "Array.prototype.reduceRight - 'initialValue' is returned if 'len' is 0 and 'initialValue' is present",
+ "test": "assertTrue((function testcase() {\n\n var initialValue = 10;\n return initialValue === [].reduceRight(function () { }, initialValue);\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight))"
+ },
+ {
+ "id": "15.4.4.22-7-1",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-7-1.js",
+ "description": "Array.prototype.reduceRight returns initialValue if 'length' is 0 and initialValue is present (empty array)",
+ "test": "assertTrue((function testcase() {\n function cb(){}\n \n try {\n if([].reduceRight(cb,1) === 1)\n return true;\n }\n catch (e) { } \n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight))"
+ },
+ {
+ "id": "15.4.4.22-7-10",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-7-10.js",
+ "description": "Array.prototype.reduceRight - 'initialValue' is present",
+ "test": "assertTrue((function testcase() {\n\n var str = \"initialValue is present\";\n return str === [].reduceRight(function () { }, str);\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight))"
+ },
+ {
+ "id": "15.4.4.22-7-11",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-7-11.js",
+ "description": "Array.prototype.reduceRight - 'initialValue' is not present",
+ "test": "assertTrue((function testcase() {\n\n var str = \"initialValue is not present\";\n return str === [str].reduceRight(function () { });\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight))"
+ },
+ {
+ "id": "15.4.4.22-7-2",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-7-2.js",
+ "description": "Array.prototype.reduceRight returns initialValue if 'length' is 0 and initialValue is present (subclassed Array, length overridden to null (type conversion))",
+ "test": "assertTrue((function testcase() {\n foo.prototype = new Array(1, 2, 3);\n function foo() {}\n var f = new foo();\n f.length = null;\n \n function cb(){}\n try {\n if(f.reduceRight(cb,1) === 1)\n return true;\n }\n catch (e) { } \n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight))"
+ },
+ {
+ "id": "15.4.4.22-7-3",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-7-3.js",
+ "description": "Array.prototype.reduceRight returns initialValue if 'length' is 0 and initialValue is present (subclassed Array, length overridden to false (type conversion))",
+ "test": "assertTrue((function testcase() {\n foo.prototype = new Array(1, 2, 3);\n function foo() {}\n var f = new foo();\n f.length = false;\n \n function cb(){}\n try {\n if(f.reduceRight(cb,1) === 1)\n return true;\n }\n catch (e) { } \n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight))"
+ },
+ {
+ "id": "15.4.4.22-7-4",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-7-4.js",
+ "description": "Array.prototype.reduceRight returns initialValue if 'length' is 0 and initialValue is present (subclassed Array, length overridden to 0 (type conversion))",
+ "test": "assertTrue((function testcase() {\n foo.prototype = new Array(1, 2, 3);\n function foo() {}\n var f = new foo();\n f.length = 0;\n \n function cb(){}\n try {\n if(f.reduceRight(cb,1) === 1)\n return true;\n }\n catch (e) { } \n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight))"
+ },
+ {
+ "id": "15.4.4.22-7-5",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-7-5.js",
+ "description": "Array.prototype.reduceRight returns initialValue if 'length' is 0 and initialValue is present (subclassed Array, length overridden to '0' (type conversion))",
+ "test": "assertTrue((function testcase() {\n foo.prototype = new Array(1, 2, 3);\n function foo() {}\n var f = new foo();\n f.length = '0';\n \n function cb(){}\n try {\n if(f.reduceRight(cb,1) === 1)\n return true;\n }\n catch (e) { } \n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight))"
+ },
+ {
+ "id": "15.4.4.22-7-6",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-7-6.js",
+ "description": "Array.prototype.reduceRight returns initialValue if 'length' is 0 and initialValue is present (subclassed Array, length overridden with obj with valueOf)",
+ "test": "assertTrue((function testcase() {\n foo.prototype = new Array(1, 2, 3);\n function foo() {}\n var f = new foo();\n \n var o = { valueOf: function () { return 0;}};\n f.length = o;\n \n function cb(){}\n try {\n if(f.reduceRight(cb,1) === 1)\n return true;\n }\n catch (e) { } \n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight))"
+ },
+ {
+ "id": "15.4.4.22-7-7",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-7-7.js",
+ "description": "Array.prototype.reduceRight returns initialValue if 'length' is 0 and initialValue is present (subclassed Array, length overridden with obj w/o valueOf (toString))",
+ "test": "assertTrue((function testcase() {\n foo.prototype = new Array(1, 2, 3);\n function foo() {}\n var f = new foo();\n \n var o = { toString: function () { return '0';}};\n f.length = o;\n \n // objects inherit the default valueOf method of the Object object;\n // that simply returns the itself. Since the default valueOf() method\n // does not return a primitive value, ES next tries to convert the object\n // to a number by calling its toString() method and converting the\n // resulting string to a number.\n\n function cb(){}\n try {\n if(f.reduceRight(cb,1) === 1)\n return true;\n }\n catch (e) { } \n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight))"
+ },
+ {
+ "id": "15.4.4.22-7-8",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-7-8.js",
+ "description": "Array.prototype.reduceRight returns initialValue if 'length' is 0 and initialValue is present (subclassed Array, length overridden with [])",
+ "test": "assertTrue((function testcase() {\n foo.prototype = new Array(1, 2, 3);\n function foo() {}\n var f = new foo();\n \n f.length = [];\n \n // objects inherit the default valueOf method of the Object object;\n // that simply returns the itself. Since the default valueOf() method\n // does not return a primitive value, ES next tries to convert the object\n // to a number by calling its toString() method and converting the\n // resulting string to a number.\n //\n // The toString( ) method on Array converts the array elements to strings,\n // then returns the result of concatenating these strings, with commas in\n // between. An array with no elements converts to the empty string, which\n // converts to the number 0. If an array has a single element that is a\n // number n, the array converts to a string representation of n, which is\n // then converted back to n itself. If an array contains more than one element,\n // or if its one element is not a number, the array converts to NaN.\n\n function cb(){}\n try {\n if(f.reduceRight(cb,1) === 1)\n return true;\n }\n catch (e) { } \n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight))"
+ },
+ {
+ "id": "15.4.4.22-7-9",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-7-9.js",
+ "description": "Array.prototype.reduceRight returns initialValue if 'length' is 0 and initialValue is present (subclassed Array, length overridden with [0])",
+ "test": "assertTrue((function testcase() {\n foo.prototype = new Array(1, 2, 3);\n function foo() {}\n var f = new foo();\n \n f.length = [0];\n \n // objects inherit the default valueOf method of the Object object;\n // that simply returns the itself. Since the default valueOf() method\n // does not return a primitive value, ES next tries to convert the object\n // to a number by calling its toString() method and converting the\n // resulting string to a number.\n //\n // The toString( ) method on Array converts the array elements to strings,\n // then returns the result of concatenating these strings, with commas in\n // between. An array with no elements converts to the empty string, which\n // converts to the number 0. If an array has a single element that is a\n // number n, the array converts to a string representation of n, which is\n // then converted back to n itself. If an array contains more than one element,\n // or if its one element is not a number, the array converts to NaN.\n\n function cb(){}\n try {\n if(f.reduceRight(cb,1) === 1)\n return true;\n }\n catch (e) { } \n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight))"
+ },
+ {
+ "id": "15.4.4.22-8-b-1",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-1.js",
+ "description": "Array.prototype.reduceRight - no observable effects occur if 'len' is 0",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n\n var obj = { length: 0 };\n\n Object.defineProperty(obj, \"0\", {\n get: function () {\n accessed = true;\n return 10;\n },\n configurable: true\n });\n\n try {\n Array.prototype.reduceRight.call(obj, function () { });\n return false;\n } catch (ex) {\n return !accessed;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects())"
+ },
+ {
+ "id": "15.4.4.22-8-b-2",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-2.js",
+ "description": "Array.prototype.reduceRight - modifications to length don't change number of iterations in step 9",
+ "test": "assertTrue((function testcase() {\n var called = 0;\n function callbackfn(prevVal, curVal, idx, obj) {\n called++;\n return prevVal + curVal;\n }\n\n var arr = [0, 1, 2, 3];\n Object.defineProperty(arr, \"4\", {\n get: function () {\n arr.length = 2;\n return 10;\n },\n configurable: true\n });\n\n var preVal = arr.reduceRight(callbackfn);\n\n return preVal === 11 && called === 2;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.4.4.22-8-b-3",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-3.js",
+ "description": "Array.prototype.reduceRight - while loop is breaken once 'kPresent' is true",
+ "test": "assertTrue((function testcase() {\n\n var called = 0;\n var testResult = false;\n var firstCalled = 0;\n var secondCalled = 0;\n\n function callbackfn(prevVal, val, idx, obj) {\n if (called === 0) {\n testResult = (idx === 1);\n }\n called++;\n }\n\n var arr = [, , , ];\n\n Object.defineProperty(arr, \"1\", {\n get: function () {\n firstCalled++;\n return 9;\n },\n configurable: true\n });\n\n Object.defineProperty(arr, \"2\", {\n get: function () {\n secondCalled++;\n return 11;\n },\n configurable: true\n });\n\n arr.reduceRight(callbackfn);\n\n return testResult && firstCalled === 1 && secondCalled === 1;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.4.4.22-8-b-ii-1",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-ii-1.js",
+ "description": "Array.prototype.reduceRight - added properties in step 2 are visible here",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n\n function callbackfn(prevVal, curVal, idx, obj) { }\n\n Object.defineProperty(obj, \"length\", {\n get: function () {\n obj[2] = \"accumulator\";\n return 3;\n },\n configurable: true\n });\n\n return Array.prototype.reduceRight.call(obj, callbackfn) === \"accumulator\";\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.4.4.22-8-b-ii-2",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-ii-2.js",
+ "description": "Array.prototype.reduceRight - deleted properties in step 2 are visible here",
+ "test": "assertTrue((function testcase() {\n\n var obj = { 2: \"accumulator\", 3: \"another\" };\n\n Object.defineProperty(obj, \"length\", {\n get: function () {\n delete obj[2];\n return 5;\n },\n configurable: true\n });\n\n return \"accumulator\" !== Array.prototype.reduceRight.call(obj, function () { });\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.4.4.22-8-b-iii-1-1",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-iii-1-1.js",
+ "description": "Array.prototype.reduceRight - element to be retrieved is own data property on an Array-like object",
+ "test": "assertTrue((function testcase() {\n\n var testResult = false;\n function callbackfn(prevVal, curVal, idx, obj) {\n if (idx === 0) {\n testResult = (prevVal === 1);\n }\n }\n\n var obj = { 0: 0, 1: 1, length: 2 };\n\n Array.prototype.reduceRight.call(obj, callbackfn);\n return testResult;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight))"
+ },
+ {
+ "id": "15.4.4.22-8-b-iii-1-10",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-iii-1-10.js",
+ "description": "Array.prototype.reduceRight - element to be retrieved is own accessor property on an Array",
+ "test": "assertTrue((function testcase() {\n var testResult = false;\n function callbackfn(prevVal, curVal, idx, obj) {\n if (idx === 2) {\n testResult = (curVal === 2);\n }\n }\n\n var arr = [0, 1, , 3];\n\n Object.defineProperty(arr, \"2\", {\n get: function () {\n return 2;\n },\n configurable: true\n });\n\n arr.reduceRight(callbackfn);\n return testResult;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.4.4.22-8-b-iii-1-11",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-iii-1-11.js",
+ "description": "Array.prototype.reduceRight - element to be retrieved is own accessor property that overrides an inherited data property on an Array-like object",
+ "test": "assertTrue((function testcase() {\n\n var testResult = false;\n function callbackfn(prevVal, curVal, idx, obj) {\n if (idx === 1) {\n testResult = (prevVal === \"20\");\n }\n }\n\n var proto = { 0: 0, 1: 1, 2: 2 };\n\n var Con = function () { };\n Con.prototype = proto;\n\n var child = new Con();\n child.length = 3;\n\n Object.defineProperty(child, \"2\", {\n get: function () {\n return \"20\";\n },\n configurable: true\n });\n\n Array.prototype.reduceRight.call(child, callbackfn);\n return testResult;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects())"
+ },
+ {
+ "id": "15.4.4.22-8-b-iii-1-12",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-iii-1-12.js",
+ "description": " Array.prototype.reduceRight - element to be retrieved is own accessor property that overrides an inherited data property on an Array",
+ "test": "assertTrue((function testcase() {\n\n var testResult = false;\n function callbackfn(prevVal, curVal, idx, obj) {\n if (idx === 1) {\n testResult = (prevVal === \"20\");\n }\n }\n\n try {\n Array.prototype[2] = 2;\n var arr = [0, 1];\n\n Object.defineProperty(arr, \"2\", {\n get: function () {\n return \"20\";\n },\n configurable: true\n });\n\n arr.reduceRight(callbackfn);\n return testResult;\n\n } finally {\n delete Array.prototype[2];\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.4.4.22-8-b-iii-1-13",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-iii-1-13.js",
+ "description": "Array.prototype.reduceRight - element to be retrieved is own accessor property that overrides an inherited accessor property on an Array-like object",
+ "test": "assertTrue((function testcase() {\n \n var testResult = false;\n function callbackfn(prevVal, curVal, idx, obj) {\n if (idx === 1) {\n testResult = (prevVal === \"20\");\n }\n }\n\n var proto = { 0: 0, 1: 1 };\n\n Object.defineProperty(proto, \"2\", {\n get: function () {\n return 2;\n },\n configurable: true\n });\n\n var Con = function () { };\n Con.prototype = proto;\n\n var child = new Con();\n child.length = 3;\n\n Object.defineProperty(child, \"2\", {\n get: function () {\n return \"20\";\n },\n configurable: true\n });\n\n Array.prototype.reduceRight.call(child, callbackfn);\n return testResult;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects())"
+ },
+ {
+ "id": "15.4.4.22-8-b-iii-1-14",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-iii-1-14.js",
+ "description": " Array.prototype.reduceRight - element to be retrieved is own accessor property that overrides an inherited accessor property on an Array",
+ "test": "assertTrue((function testcase() {\n\n var testResult = false;\n function callbackfn(prevVal, curVal, idx, obj) {\n if (idx === 1) {\n testResult = (prevVal === \"20\");\n }\n }\n\n try {\n Object.defineProperty(Array.prototype, \"2\", {\n get: function () {\n return 2;\n },\n configurable: true\n });\n\n var arr = [0, 1, , ];\n\n Object.defineProperty(arr, \"2\", {\n get: function () {\n return \"20\";\n },\n configurable: true\n });\n\n arr.reduceRight(callbackfn);\n return testResult;\n\n } finally {\n delete Array.prototype[2];\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.4.4.22-8-b-iii-1-15",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-iii-1-15.js",
+ "description": "Array.prototype.reduceRight - element to be retrieved is inherited accessor property on an Array-like object",
+ "test": "assertTrue((function testcase() {\n\n var testResult = false;\n function callbackfn(prevVal, curVal, idx, obj) {\n if (idx === 1) {\n testResult = (prevVal === 2);\n }\n }\n\n var proto = { 0: 0, 1: 1 };\n\n Object.defineProperty(proto, \"2\", {\n get: function () {\n return 2;\n },\n configurable: true\n });\n\n var Con = function () { };\n Con.prototype = proto;\n\n var child = new Con();\n child.length = 3;\n\n Array.prototype.reduceRight.call(child, callbackfn);\n return testResult;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects())"
+ },
+ {
+ "id": "15.4.4.22-8-b-iii-1-16",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-iii-1-16.js",
+ "description": "Array.prototype.reduceRight - element to be retrieved is inherited accessor property on an Array",
+ "test": "assertTrue((function testcase() {\n\n var testResult = false;\n function callbackfn(prevVal, curVal, idx, obj) {\n if (idx === 1) {\n testResult = (prevVal === 2);\n }\n }\n\n try {\n Object.defineProperty(Array.prototype, \"2\", {\n get: function () {\n return 2;\n },\n configurable: true\n });\n\n var arr = [0, 1, , ];\n\n arr.reduceRight(callbackfn);\n return testResult;\n\n } finally {\n delete Array.prototype[2];\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight) && fnExists(Object.defineProperty) && ![, 1].hasOwnProperty(0) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.4.4.22-8-b-iii-1-17",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-iii-1-17.js",
+ "description": "Array.prototype.reduceRight - element to be retrieved is own accessor property without a get function on an Array-like object",
+ "test": "assertTrue((function testcase() {\n\n var testResult = false;\n function callbackfn(prevVal, curVal, idx, obj) {\n if (idx === 1) {\n testResult = (typeof prevVal === \"undefined\");\n }\n }\n\n var obj = { 0: 0, 1: 1, length: 3 };\n\n Object.defineProperty(obj, \"2\", {\n set: function () { },\n configurable: true\n });\n\n Array.prototype.reduceRight.call(obj, callbackfn);\n return testResult;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects())"
+ },
+ {
+ "id": "15.4.4.22-8-b-iii-1-18",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-iii-1-18.js",
+ "description": "Array.prototype.reduceRight - element to be retrieved is own accessor property without a get function on an Array",
+ "test": "assertTrue((function testcase() {\n\n var testResult = false;\n function callbackfn(prevVal, curVal, idx, obj) {\n if (idx === 1) {\n testResult = (typeof prevVal === \"undefined\");\n }\n }\n\n var arr = [0, 1];\n\n Object.defineProperty(arr, \"2\", {\n set: function () { },\n configurable: true\n });\n\n arr.reduceRight(callbackfn);\n return testResult;\n\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.4.4.22-8-b-iii-1-19",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-iii-1-19.js",
+ "description": "Array.prototype.reduceRight - element to be retrieved is own accessor property without a get function that overrides an inherited accessor property on an Array-like object",
+ "test": "assertTrue((function testcase() {\n\n var testResult = false;\n function callbackfn(prevVal, curVal, idx, obj) {\n if (idx === 1) {\n testResult = (typeof prevVal === \"undefined\");\n }\n }\n\n try {\n Object.prototype[2] = 2;\n\n var obj = { 0: 0, 1: 1, length: 3 };\n Object.defineProperty(obj, \"2\", {\n set: function () { },\n configurable: true\n });\n\n Array.prototype.reduceRight.call(obj, callbackfn);\n return testResult;\n } finally {\n delete Object.prototype[2];\n }\n\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects())"
+ },
+ {
+ "id": "15.4.4.22-8-b-iii-1-2",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-iii-1-2.js",
+ "description": "Array.prototype.reduceRight - element to be retrieved is own data property on an Array",
+ "test": "assertTrue((function testcase() {\n\n var testResult = false;\n function callbackfn(prevVal, curVal, idx, obj) {\n if (idx === 1) {\n testResult = (prevVal === 2);\n }\n }\n\n var arr = [0, 1, 2];\n\n arr.reduceRight(callbackfn);\n return testResult;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight))"
+ },
+ {
+ "id": "15.4.4.22-8-b-iii-1-20",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-iii-1-20.js",
+ "description": "Array.prototype.reduceRight - element to be retrieved is own accessor property without a get function that overrides an inherited accessor property on an Array",
+ "test": "assertTrue((function testcase() {\n\n var testResult = false;\n function callbackfn(prevVal, curVal, idx, obj) {\n if (idx === 1) {\n testResult = (typeof prevVal === \"undefined\");\n }\n }\n\n try {\n Array.prototype[2] = 2;\n var arr = [0, 1];\n Object.defineProperty(arr, \"2\", {\n set: function () { },\n configurable: true\n });\n\n arr.reduceRight(callbackfn);\n return testResult;\n\n } finally {\n delete Array.prototype[2];\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.4.4.22-8-b-iii-1-21",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-iii-1-21.js",
+ "description": "Array.prototype.reduceRight - element to be retrieved is inherited accessor property without a get function on an Array-like object",
+ "test": "assertTrue((function testcase() {\n\n var testResult = false;\n function callbackfn(prevVal, curVal, idx, obj) {\n if (idx === 1) {\n testResult = (typeof prevVal === \"undefined\");\n }\n }\n\n var proto = { 0: 0, 1: 1 };\n\n Object.defineProperty(proto, \"2\", {\n set: function () { },\n configurable: true\n });\n\n var Con = function () { };\n Con.prototype = proto;\n\n var child = new Con();\n child.length = 3;\n\n Array.prototype.reduceRight.call(child, callbackfn);\n return testResult;\n\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects())"
+ },
+ {
+ "id": "15.4.4.22-8-b-iii-1-22",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-iii-1-22.js",
+ "description": "Array.prototype.reduceRight - element to be retrieved is inherited accessor property without a get function on an Array",
+ "test": "assertTrue((function testcase() {\n\n var testResult = false;\n function callbackfn(prevVal, curVal, idx, obj) {\n if (idx === 1) {\n testResult = (typeof prevVal === \"undefined\");\n }\n }\n\n try {\n Object.defineProperty(Array.prototype, \"2\", {\n set: function () { },\n configurable: true\n });\n\n var arr = [0, 1, , ];\n\n arr.reduceRight(callbackfn);\n return testResult;\n\n } finally {\n delete Array.prototype[2];\n }\n\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight) && fnExists(Object.defineProperty) && ![, 1].hasOwnProperty(0) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.4.4.22-8-b-iii-1-23",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-iii-1-23.js",
+ "description": "Array.prototype.reduceRight - This object is the global object which contains index property",
+ "test": "assertTrue((function testcase() {\n\n var testResult = false;\n function callbackfn(prevVal, curVal, idx, obj) {\n if (idx === 1) {\n testResult = (prevVal === 2);\n }\n }\n\n try {\n var oldLen = fnGlobalObject().length;\n fnGlobalObject()[0] = 0;\n fnGlobalObject()[1] = 1;\n fnGlobalObject()[2] = 2;\n fnGlobalObject().length = 3;\n\n Array.prototype.reduceRight.call(fnGlobalObject(), callbackfn);\n return testResult;\n\n } finally {\n delete fnGlobalObject()[0];\n delete fnGlobalObject()[1];\n delete fnGlobalObject()[2];\n fnGlobalObject().length = oldLen;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight))"
+ },
+ {
+ "id": "15.4.4.22-8-b-iii-1-25",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-iii-1-25.js",
+ "description": "Array.prototype.reduceRight - This object is the Arguments object which implements its own property get method (number of arguments is less than number of parameters)",
+ "test": "assertTrue((function testcase() {\n\n var testResult = false;\n function callbackfn(prevVal, curVal, idx, obj) {\n if (idx === 0) {\n testResult = (prevVal === 1);\n }\n }\n\n var func = function (a, b, c) {\n Array.prototype.reduceRight.call(arguments, callbackfn);\n };\n\n func(0, 1);\n return testResult;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight))"
+ },
+ {
+ "id": "15.4.4.22-8-b-iii-1-26",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-iii-1-26.js",
+ "description": "Array.prototype.reduceRight - This object is the Arguments object which implements its own property get method (number of arguments equals number of parameters)",
+ "test": "assertTrue((function testcase() {\n\n var testResult = false;\n function callbackfn(prevVal, curVal, idx, obj) {\n if (idx === 1) {\n testResult = (prevVal === 2);\n }\n }\n\n var func = function (a, b, c) {\n Array.prototype.reduceRight.call(arguments, callbackfn);\n };\n\n func(0, 1, 2);\n return testResult;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight))"
+ },
+ {
+ "id": "15.4.4.22-8-b-iii-1-27",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-iii-1-27.js",
+ "description": "Array.prototype.reduceRight - This object is the Arguments object which implements its own property get method (number of arguments is greater than number of parameters)",
+ "test": "assertTrue((function testcase() {\n\n var testResult = false;\n function callbackfn(prevVal, curVal, idx, obj) {\n if (idx === 2) {\n testResult = (prevVal === 3);\n }\n }\n\n var func = function (a, b, c) {\n Array.prototype.reduceRight.call(arguments, callbackfn);\n };\n\n func(0, 1, 2, 3);\n return testResult;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight))"
+ },
+ {
+ "id": "15.4.4.22-8-b-iii-1-28",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-iii-1-28.js",
+ "description": "Array.prototype.reduceRight applied to String object, which implements its own property get method",
+ "test": "assertTrue((function testcase() {\n\n var testResult = false;\n function callbackfn(prevVal, curVal, idx, obj) {\n if (idx === 1) {\n testResult = (prevVal === \"2\");\n }\n }\n\n var str = new String(\"012\");\n\n Array.prototype.reduceRight.call(str, callbackfn);\n return testResult;\n\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight))"
+ },
+ {
+ "id": "15.4.4.22-8-b-iii-1-29",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-iii-1-29.js",
+ "description": "Array.prototype.reduceRight applied to Function object which implements its own property get method",
+ "test": "assertTrue((function testcase() {\n\n var testResult = false;\n function callbackfn(prevVal, curVal, idx, obj) {\n if (idx === 1) {\n testResult = (prevVal === 2);\n }\n }\n\n var obj = function (a, b, c) {\n return a + b + c;\n };\n\n obj[0] = 0;\n obj[1] = 1;\n obj[2] = 2;\n\n Array.prototype.reduceRight.call(obj, callbackfn);\n return testResult;\n\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight))"
+ },
+ {
+ "id": "15.4.4.22-8-b-iii-1-3",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-iii-1-3.js",
+ "description": "Array.prototype.reduceRight - element to be retrieved is own data property that overrides an inherited data property on an Array-like object",
+ "test": "assertTrue((function testcase() {\n\n var testResult = false;\n function callbackfn(prevVal, curVal, idx, obj) {\n if (idx === 1) {\n testResult = (prevVal === \"20\");\n }\n }\n\n var proto = { 0: 0, 1: 1, 2: 2, length: 2 };\n var Con = function () { };\n Con.prototype = proto;\n\n var child = new Con();\n child[1] = \"10\";\n child[2] = \"20\";\n child.length = 3;\n\n Array.prototype.reduceRight.call(child, callbackfn);\n return testResult;\n\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight))"
+ },
+ {
+ "id": "15.4.4.22-8-b-iii-1-30",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-iii-1-30.js",
+ "description": "Array.prototype.reduceRight - element changed by getter on current iteration is observed in subsequent iterations on an Array",
+ "test": "assertTrue((function testcase() {\n var testResult = false;\n function callbackfn(prevVal, curVal, idx, obj) {\n if (idx === 1) {\n testResult = (curVal === 1 && prevVal === 2);\n }\n }\n\n var arr = [0];\n var preIterVisible = false;\n\n Object.defineProperty(arr, \"1\", {\n get: function () {\n if (preIterVisible) {\n return 1;\n } else {\n return \"20\";\n }\n },\n configurable: true\n });\n\n Object.defineProperty(arr, \"2\", {\n get: function () {\n preIterVisible = true;\n return 2;\n },\n configurable: true\n });\n\n arr.reduceRight(callbackfn);\n return testResult;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.4.4.22-8-b-iii-1-31",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-iii-1-31.js",
+ "description": "Array.prototype.reduceRight - element changed by getter on current iteration is observed subsequetly on an Array-like object",
+ "test": "assertTrue((function testcase() {\n var testResult = false;\n function callbackfn(prevVal, curVal, idx, obj) {\n if (idx === 1) {\n testResult = (prevVal === 2 && curVal === 1);\n }\n }\n\n var obj = { 0: 0, length: 3 };\n var preIterVisible = false;\n\n Object.defineProperty(obj, \"1\", {\n get: function () {\n if (preIterVisible) {\n return 1;\n } else {\n return \"20\";\n }\n },\n configurable: true\n });\n\n Object.defineProperty(obj, \"2\", {\n get: function () {\n preIterVisible = true;\n return 2;\n },\n configurable: true\n });\n\n Array.prototype.reduceRight.call(obj, callbackfn);\n return testResult;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects())"
+ },
+ {
+ "id": "15.4.4.22-8-b-iii-1-32",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-iii-1-32.js",
+ "description": "Array.prototype.reduceRight - Exception in getter terminate iteration on an Array-like object",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n function callbackfn(prevVal, curVal, idx, obj) {\n if (idx <= 1) {\n accessed = true;\n }\n }\n\n var obj = { 0: 0, 1: 1, length: 3 };\n Object.defineProperty(obj, \"2\", {\n get: function () {\n throw new RangeError(\"unhandle exception happened in getter\");\n },\n configurable: true\n });\n\n try {\n Array.prototype.reduceRight.call(obj, callbackfn);\n return false;\n } catch (ex) {\n return (ex instanceof RangeError) && !accessed;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects())"
+ },
+ {
+ "id": "15.4.4.22-8-b-iii-1-33",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-iii-1-33.js",
+ "description": "Array.prototype.reduceRight - Exception in getter terminate iteration on an Array",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n function callbackfn(prevVal, curVal, idx, obj) {\n if (idx <= 1) {\n accessed = true;\n }\n }\n\n var arr = [0, 1];\n\n Object.defineProperty(arr, \"2\", {\n get: function () {\n throw new RangeError(\"unhandle exception happened in getter\");\n },\n configurable: true\n });\n\n try {\n arr.reduceRight(callbackfn);\n return false;\n } catch (ex) {\n return (ex instanceof RangeError) && !accessed;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.4.4.22-8-b-iii-1-4",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-iii-1-4.js",
+ "description": "Array.prototype.reduceRight - element to be retrieved is own data property that overrides an inherited data property on an Array",
+ "test": "assertTrue((function testcase() {\n\n var testResult = false;\n function callbackfn(prevVal, curVal, idx, obj) {\n if (idx === 1) {\n testResult = (prevVal === 2);\n }\n }\n\n try {\n Array.prototype[2] = \"11\";\n [0, 1, 2].reduceRight(callbackfn);\n return testResult;\n\n } finally {\n delete Array.prototype[2];\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight))"
+ },
+ {
+ "id": "15.4.4.22-8-b-iii-1-5",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-iii-1-5.js",
+ "description": "Array.prototype.reduceRight - element to be retrieved is own data property that overrides an inherited accessor property on an Array-like object",
+ "test": "assertTrue((function testcase() {\n\n var testResult = false;\n function callbackfn(prevVal, curVal, idx, obj) {\n if (idx === 1) {\n testResult = (prevVal === \"20\");\n }\n }\n\n var proto = {};\n\n Object.defineProperty(proto, \"2\", {\n get: function () {\n return 11;\n },\n configurable: true\n });\n\n var Con = function () { };\n Con.prototype = proto;\n\n var child = new Con();\n child.length = 3;\n child[0] = \"0\";\n child[1] = \"1\";\n Object.defineProperty(proto, \"2\", {\n value: \"20\",\n configurable: true\n });\n\n Array.prototype.reduceRight.call(child, callbackfn);\n return testResult;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects())"
+ },
+ {
+ "id": "15.4.4.22-8-b-iii-1-6",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-iii-1-6.js",
+ "description": "Array.prototype.reduceRight - element to be retrieved is own data property that overrides an inherited accessor property on an Array",
+ "test": "assertTrue((function testcase() {\n\n var testResult = false;\n function callbackfn(prevVal, curVal, idx, obj) {\n if (idx === 1) {\n testResult = (prevVal === 2);\n }\n }\n\n try {\n Object.defineProperty(Array.prototype, \"2\", {\n get: function () {\n return \"2\";\n },\n configurable: true\n });\n [0, 1, 2].reduceRight(callbackfn);\n return testResult;\n\n } finally {\n delete Array.prototype[2];\n }\n\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.4.4.22-8-b-iii-1-7",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-iii-1-7.js",
+ "description": "Array.prototype.reduceRight - element to be retrieved is inherited data property on an Array-like object",
+ "test": "assertTrue((function testcase() {\n\n var testResult = false;\n function callbackfn(prevVal, curVal, idx, obj) {\n if (idx === 1) {\n testResult = (prevVal === 2);\n }\n }\n\n var proto = { 0: 0, 1: 1, 2: 2, length: 3 };\n var Con = function () { };\n Con.prototype = proto;\n\n var child = new Con();\n\n Array.prototype.reduceRight.call(child, callbackfn);\n return testResult;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight))"
+ },
+ {
+ "id": "15.4.4.22-8-b-iii-1-8",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-iii-1-8.js",
+ "description": "Array.prototype.reduceRight - element to be retrieved is inherited data property on an Array",
+ "test": "assertTrue((function testcase() {\n\n var testResult = false;\n function callbackfn(prevVal, curVal, idx, obj) {\n if (idx === 1) {\n testResult = (prevVal === 2);\n }\n }\n\n try {\n Array.prototype[0] = 0;\n Array.prototype[1] = 1;\n Array.prototype[2] = 2;\n [, , ,].reduceRight(callbackfn);\n return testResult;\n\n } finally {\n delete Array.prototype[0];\n delete Array.prototype[1];\n delete Array.prototype[2];\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight) && ![, 1].hasOwnProperty(0))"
+ },
+ {
+ "id": "15.4.4.22-8-b-iii-1-9",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-b-iii-1-9.js",
+ "description": "Array.prototype.reduceRight - element to be retrieved is own accessor property on an Array-like object",
+ "test": "assertTrue((function testcase() {\n\n var testResult = false;\n function callbackfn(prevVal, curVal, idx, obj) {\n if (idx === 1) {\n testResult = (prevVal === 2);\n }\n }\n\n var obj = { 0: 0, 1: 1, length: 3 };\n Object.defineProperty(obj, \"2\", {\n get: function () {\n return 2;\n },\n configurable: true\n });\n\n Array.prototype.reduceRight.call(obj, callbackfn);\n return testResult;\n\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects())"
+ },
+ {
+ "id": "15.4.4.22-8-c-1",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-c-1.js",
+ "description": "Array.prototype.reduceRight throws TypeError when Array is empty and initialValue is not present",
+ "test": "assertTrue((function testcase() { \n \n function callbackfn(prevVal, curVal, idx, obj)\n {\n }\n\n var arr = new Array(10);\n try {\n arr.reduceRight(callbackfn);\n } \n catch(e) {\n if(e instanceof TypeError)\n return true; \n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight))"
+ },
+ {
+ "id": "15.4.4.22-8-c-2",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-c-2.js",
+ "description": "Array.prototype.reduceRight throws TypeError when elements assigned values are deleted by reducign array length and initialValue is not present",
+ "test": "assertTrue((function testcase() { \n \n function callbackfn(prevVal, curVal, idx, obj)\n {\n }\n\n var arr = new Array(10);\n arr[9] = 1;\n arr.length = 5;\n try {\n arr.reduceRight(callbackfn);\n } \n catch(e) {\n if(e instanceof TypeError)\n return true; \n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight))"
+ },
+ {
+ "id": "15.4.4.22-8-c-3",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-c-3.js",
+ "description": "Array.prototype.reduceRight throws TypeError when elements assigned values are deleted and initialValue is not present",
+ "test": "assertTrue((function testcase() { \n \n function callbackfn(prevVal, curVal, idx, obj)\n {\n }\n\n var arr = [1,2,3,4,5];\n delete arr[0];\n delete arr[1];\n delete arr[2];\n delete arr[3];\n delete arr[4];\n try {\n arr.reduceRight(callbackfn);\n } \n catch(e) {\n if(e instanceof TypeError)\n return true; \n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight))"
+ },
+ {
+ "id": "15.4.4.22-8-c-4",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-c-4.js",
+ "description": "Array.prototype.reduceRight doesn't throw error when array has no own properties but prototype contains a single property",
+ "test": "assertTrue((function testcase() {\n\n var arr = [, , , ];\n\n try {\n Array.prototype[1] = \"prototype\";\n arr.reduceRight(function () { });\n return true;\n } catch (ex) {\n return false;\n } finally {\n delete Array.prototype[1];\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight) && ![, 1].hasOwnProperty(0))"
+ },
+ {
+ "id": "15.4.4.22-8-c-5",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-c-5.js",
+ "description": "Array.prototype.reduceRight - side effects produced by step 2 are visible when an exception occurs",
+ "test": "assertTrue((function testcase() {\n\n var obj = { };\n\n var accessed = false;\n\n Object.defineProperty(obj, \"length\", {\n get: function () {\n accessed = true;\n return 2;\n },\n configurable: true\n });\n\n try {\n Array.prototype.reduceRight.call(obj, function () { });\n return false;\n } catch (ex) {\n return (ex instanceof TypeError) && accessed;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.4.4.22-8-c-6",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-c-6.js",
+ "description": "Array.prototype.reduceRight - side effects produced by step 3 are visible when an exception occurs",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n\n var accessed = false;\n\n Object.defineProperty(obj, \"length\", {\n get: function () {\n return {\n toString: function () {\n accessed = true;\n return \"2\";\n }\n };\n },\n configurable: true\n });\n\n try {\n Array.prototype.reduceRight.call(obj, function () { });\n return false;\n } catch (ex) {\n return (ex instanceof TypeError) && accessed;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.4.4.22-8-c-7",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-c-7.js",
+ "description": "Array.prototype.reduceRight - the exception is not thrown if exception was thrown by step 2",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n\n Object.defineProperty(obj, \"length\", {\n get: function () {\n throw new SyntaxError();\n },\n configurable: true\n });\n\n try {\n Array.prototype.reduceRight.call(obj, function () { });\n return false;\n } catch (ex) {\n return !(ex instanceof TypeError);\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.4.4.22-8-c-8",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-8-c-8.js",
+ "description": "Array.prototype.reduceRight - the exception is not thrown if exception was thrown by step 3",
+ "test": "assertTrue((function testcase() {\n\n var obj = {};\n\n Object.defineProperty(obj, \"length\", {\n get: function () {\n return {\n toString: function () {\n throw new SyntaxError();\n }\n };\n },\n configurable: true\n });\n\n try {\n Array.prototype.reduceRight.call(obj, function () { });\n return false;\n } catch (ex) {\n return !(ex instanceof TypeError);\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.4.4.22-9-1",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-1.js",
+ "description": "Array.prototype.reduceRight doesn't consider new elements which index is larger than array original length added to array after it is called, consider new elements which index is smaller than array length",
+ "test": "assertTrue((function testcase() {\n function callbackfn(prevVal, curVal, idx, obj) {\n arr[5] = 6;\n arr[2] = 3;\n return prevVal + curVal;\n }\n\n var arr = ['1', 2, , 4, '5'];\n return arr.reduceRight(callbackfn) === \"54321\";\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight))"
+ },
+ {
+ "id": "15.4.4.22-9-2",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-2.js",
+ "description": "Array.prototype.reduceRight considers new value of elements in array after it is called",
+ "test": "assertTrue((function testcase() { \n \n function callbackfn(prevVal, curVal, idx, obj)\n {\n arr[3] = -2;\n arr[0] = -1;\n return prevVal + curVal;\n }\n\n var arr = [1,2,3,4,5];\n if(arr.reduceRight(callbackfn) === 13)\n return true; \n \n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight))"
+ },
+ {
+ "id": "15.4.4.22-9-3",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-3.js",
+ "description": "Array.prototype.reduceRight doesn't consider unvisited deleted elements in array after the call",
+ "test": "assertTrue((function testcase() { \n \n function callbackfn(prevVal, curVal, idx, obj) \n {\n delete arr[1];\n delete arr[4];\n return prevVal + curVal; \n }\n\n var arr = ['1',2,3,4,5];\n if(arr.reduceRight(callbackfn) === \"121\" ) // two elements deleted\n return true; \n \n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight))"
+ },
+ {
+ "id": "15.4.4.22-9-4",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-4.js",
+ "description": "Array.prototype.reduceRight doesn't consider unvisited deleted elements when Array.length is decreased",
+ "test": "assertTrue((function testcase() { \n \n function callbackfn(prevVal, curVal, idx, obj)\n {\n arr.length = 2;\n return prevVal + curVal;\n }\n\n var arr = [1,2,3,4,5];\n if(arr.reduceRight(callbackfn) === 12 )\n return true; \n \n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight))"
+ },
+ {
+ "id": "15.4.4.22-9-5",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-5.js",
+ "description": "Array.prototype.reduceRight - callbackfn not called for array with one element",
+ "test": "assertTrue((function testcase() { \n \n var callCnt = 0;\n function callbackfn(prevVal, curVal, idx, obj)\n {\n callCnt++;\n return 2;\n }\n\n var arr = [1];\n if(arr.reduceRight(callbackfn) === 1 && callCnt === 0 )\n return true; \n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight))"
+ },
+ {
+ "id": "15.4.4.22-9-6",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-6.js",
+ "description": "Array.prototype.reduceRight visits deleted element in array after the call when same index is also present in prototype",
+ "test": "assertTrue((function testcase() { \n \n function callbackfn(prevVal, curVal, idx, obj) \n {\n delete arr[1];\n delete arr[2];\n return prevVal + curVal; \n }\n Array.prototype[2] = 6;\n var arr = ['1',2,3,4,5];\n var res = arr.reduceRight(callbackfn);\n delete Array.prototype[2];\n\n if(res === \"151\" ) //one element deleted\n return true; \n \n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight))"
+ },
+ {
+ "id": "15.4.4.22-9-7",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-7.js",
+ "description": "Array.prototype.reduceRight not affect call when the array is deleted during the call",
+ "test": "assertTrue((function testcase() {\n function callbackfn(prevVal, curVal, idx, obj) {\n delete o.arr;\n return prevVal + curVal;\n }\n\n var o = new Object();\n o.arr = ['1', 2, 3, 4, 5];\n return o.arr.reduceRight(callbackfn) === \"141\" && !o.hasOwnProperty(\"arr\");\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight))"
+ },
+ {
+ "id": "15.4.4.22-9-8",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-8.js",
+ "description": "Array.prototype.reduceRight - no observable effects occur if 'len' is 0",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n function callbackfn() {\n accessed = true;\n }\n\n var obj = { length: 0 };\n\n Object.defineProperty(obj, \"5\", {\n get: function () {\n accessed = true;\n return 10;\n },\n configurable: true\n });\n\n Array.prototype.reduceRight.call(obj, function () { }, \"initialValue\");\n return !accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects())"
+ },
+ {
+ "id": "15.4.4.22-9-9",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-9.js",
+ "description": "Array.prototype.reduceRight - modifications to length will change number of iterations",
+ "test": "assertTrue((function testcase() {\n var called = 0;\n function callbackfn(preVal, val, idx, obj) {\n called++;\n }\n\n var arr = [0, 1, 2, 3];\n Object.defineProperty(arr, \"4\", {\n get: function () {\n arr.length = 2;\n },\n configurable: true\n });\n\n arr.reduceRight(callbackfn, \"initialValue\");\n\n return called === 3;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.4.4.22-9-b-1",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-b-1.js",
+ "description": "Array.prototype.reduceRight returns initialvalue when Array is empty and initialValue is not present",
+ "test": "assertTrue((function testcase() { \n \n function callbackfn(prevVal, curVal, idx, obj)\n {\n }\n\n var arr = new Array(10);\n \n if(arr.reduceRight(callbackfn,5) === 5)\n return true; \n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight))"
+ },
+ {
+ "id": "15.4.4.22-9-b-10",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-b-10.js",
+ "description": "Array.prototype.reduceRight - deleting property of prototype in step 8 causes deleted index property not to be visited on an Array-like Object",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n var testResult = true;\n\n function callbackfn(preVal, val, idx, obj) {\n accessed = true;\n if (idx === 3) {\n testResult = false;\n }\n }\n\n var obj = { 2: 2, length: 20 };\n\n Object.defineProperty(obj, \"5\", {\n get: function () {\n delete Object.prototype[3];\n return 0;\n },\n configurable: true\n });\n\n try {\n Object.prototype[3] = 1;\n Array.prototype.reduceRight.call(obj, callbackfn);\n return testResult && accessed;\n } finally {\n delete Object.prototype[3];\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects())"
+ },
+ {
+ "id": "15.4.4.22-9-b-11",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-b-11.js",
+ "description": "Array.prototype.reduceRight - deleting property of prototype in step 8 causes deleted index property not to be visited on an Array",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n var testResult = true;\n\n function callbackfn(prevVal, curVal, idx, obj) {\n accessed = true;\n if (idx === 1) {\n testResult = false;\n }\n }\n\n var arr = [0, , , ];\n Object.defineProperty(arr, \"3\", {\n get: function () {\n delete Array.prototype[1];\n return 0;\n },\n configurable: true\n });\n\n try {\n Array.prototype[1] = 1;\n arr.reduceRight(callbackfn);\n return testResult && accessed;\n } finally {\n delete Array.prototype[1];\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight) && fnExists(Object.defineProperty) && ![, 1].hasOwnProperty(0) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.4.4.22-9-b-12",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-b-12.js",
+ "description": "Array.prototype.reduceRight - deleting own property with prototype property in step 8 causes prototype index property to be visited on an Array-like object",
+ "test": "assertTrue((function testcase() {\n\n var testResult = false;\n\n function callbackfn(prevVal, curVal, idx, obj) {\n if (idx === 1 && curVal === 1) {\n testResult = true;\n }\n }\n\n var obj = { 0: 0, 1: 111, length: 10 };\n\n Object.defineProperty(obj, \"4\", {\n get: function () {\n delete obj[1];\n return 0;\n },\n configurable: true\n });\n\n try {\n Object.prototype[1] = 1;\n Array.prototype.reduceRight.call(obj, callbackfn);\n return testResult;\n } finally {\n delete Object.prototype[1];\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects())"
+ },
+ {
+ "id": "15.4.4.22-9-b-13",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-b-13.js",
+ "description": "Array.prototype.reduceRight - deleting own property with prototype property in step 8 causes prototype index property to be visited on an Array",
+ "test": "assertTrue((function testcase() {\n\n var testResult = false;\n\n function callbackfn(prevVal, curVal, idx, obj) {\n if (idx === 1 && curVal === 1) {\n testResult = true;\n }\n }\n var arr = [0, 111];\n\n Object.defineProperty(arr, \"2\", {\n get: function () {\n delete arr[1];\n return 0;\n },\n configurable: true\n });\n\n try {\n Array.prototype[1] = 1;\n arr.reduceRight(callbackfn);\n return testResult;\n } finally {\n delete Array.prototype[1];\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.4.4.22-9-b-14",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-b-14.js",
+ "description": "Array.prototype.reduceRight - decreasing length of array in step 8 causes deleted index property not to be visited",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n var testResult = true;\n\n function callbackfn(prevVal, curVal, idx, obj) {\n accessed = true;\n if (idx === 2) {\n testResult = false;\n }\n }\n\n var arr = [0, 1, 2, 3];\n\n Object.defineProperty(arr, \"3\", {\n get: function () {\n arr.length = 2;\n return 0;\n },\n configurable: true\n });\n\n arr.reduceRight(callbackfn);\n\n return testResult && accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.4.4.22-9-b-15",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-b-15.js",
+ "description": "Array.prototype.reduceRight - decreasing length of array with prototype property in step 8 causes prototype index property to be visited",
+ "test": "assertTrue((function testcase() {\n\n var testResult = false;\n\n function callbackfn(prevVal, curVal, idx, obj) {\n if (idx === 2 && curVal === \"prototype\") {\n testResult = true;\n }\n }\n var arr = [0, 1, 2, 3];\n\n try {\n Object.defineProperty(Array.prototype, \"2\", {\n get: function () {\n return \"prototype\";\n },\n configurable: true\n });\n\n Object.defineProperty(arr, \"3\", {\n get: function () {\n arr.length = 2;\n return 1;\n },\n configurable: true\n });\n\n arr.reduceRight(callbackfn);\n\n return testResult;\n } finally {\n delete Array.prototype[2];\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.4.4.22-9-b-16",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-b-16.js",
+ "description": "Array.prototype.reduceRight - decreasing length of array in step 8 does not delete non-configurable properties",
+ "test": "assertTrue((function testcase() {\n\n var testResult = false;\n\n function callbackfn(prevVal, curVal, idx, obj) {\n if (idx === 2 && curVal === \"unconfigurable\") {\n testResult = true;\n }\n }\n\n var arr = [0, 1, 2, 3];\n\n Object.defineProperty(arr, \"2\", {\n get: function () {\n return \"unconfigurable\";\n },\n configurable: false\n });\n\n Object.defineProperty(arr, \"3\", {\n get: function () {\n arr.length = 2;\n return 1;\n },\n configurable: true\n });\n\n arr.reduceRight(callbackfn);\n\n return testResult;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.4.4.22-9-b-17",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-b-17.js",
+ "description": "Array.prototype.reduceRight - properties added into own object are visited on an Array-like object",
+ "test": "assertTrue((function testcase() {\n\n var testResult = false;\n\n function callbackfn(prevVal, curVal, idx, obj) {\n if (idx === 0 && curVal === 0) {\n testResult = true;\n }\n }\n\n var obj = { length: 2 };\n\n Object.defineProperty(obj, \"1\", {\n get: function () {\n Object.defineProperty(obj, \"0\", {\n get: function () {\n return 0;\n },\n configurable: true\n });\n return 1;\n },\n configurable: true\n });\n\n Array.prototype.reduceRight.call(obj, callbackfn, \"initialValue\");\n return testResult;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects())"
+ },
+ {
+ "id": "15.4.4.22-9-b-18",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-b-18.js",
+ "description": "Array.prototype.reduceRight - properties added into own object are visited on an Array",
+ "test": "assertTrue((function testcase() {\n\n var testResult = false;\n\n function callbackfn(prevVal, curVal, idx, obj) {\n if (idx === 1 && curVal === 1) {\n testResult = true;\n }\n }\n\n var arr = [0, , 2];\n\n Object.defineProperty(arr, \"2\", {\n get: function () {\n Object.defineProperty(arr, \"1\", {\n get: function () {\n return 1;\n },\n configurable: true\n });\n return 0;\n },\n configurable: true\n });\n\n arr.reduceRight(callbackfn, \"initialValue\");\n return testResult;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.4.4.22-9-b-19",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-b-19.js",
+ "description": "Array.prototype.reduceRight - properties added to prototype are visited on an Array-like object",
+ "test": "assertTrue((function testcase() {\n\n var testResult = false;\n\n function callbackfn(prevVal, curVal, idx, obj) {\n if (idx === 1 && curVal === 6.99) {\n testResult = true;\n }\n }\n\n var obj = { length: 6 };\n\n Object.defineProperty(obj, \"2\", {\n get: function () {\n Object.defineProperty(Object.prototype, \"1\", {\n get: function () {\n return 6.99;\n },\n configurable: true\n });\n return 0;\n },\n configurable: true\n });\n\n try {\n Array.prototype.reduceRight.call(obj, callbackfn, \"initialValue\");\n return testResult;\n } finally {\n delete Object.prototype[1];\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects())"
+ },
+ {
+ "id": "15.4.4.22-9-b-2",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-b-2.js",
+ "description": "Array.prototype.reduceRight - added properties in step 2 are visible here",
+ "test": "assertTrue((function testcase() {\n\n var testResult = false;\n\n function callbackfn(prevVal, curVal, idx, obj) {\n if (idx === 2 && curVal === \"2\") {\n testResult = true;\n }\n }\n\n var obj = {};\n\n Object.defineProperty(obj, \"length\", {\n get: function () {\n obj[2] = \"2\";\n return 3;\n },\n configurable: true\n });\n\n Array.prototype.reduceRight.call(obj, callbackfn, \"initialValue\");\n\n return testResult;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.4.4.22-9-b-20",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-b-20.js",
+ "description": "Array.prototype.reduceRight - properties added to prototype can be visited on an Array",
+ "test": "assertTrue((function testcase() {\n\n var testResult = false;\n\n function callbackfn(prevVal, curVal, idx, obj) {\n if (idx === 1 && curVal === 6.99) {\n testResult = true;\n }\n }\n\n var arr = [0, , 2];\n\n Object.defineProperty(arr, \"2\", {\n get: function () {\n Object.defineProperty(Array.prototype, \"1\", {\n get: function () {\n return 6.99;\n },\n configurable: true\n });\n return 0;\n },\n configurable: true\n });\n\n try {\n arr.reduceRight(callbackfn, \"initialValue\");\n return testResult;\n } finally {\n delete Array.prototype[1];\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight) && fnExists(Object.defineProperty) && ![, 1].hasOwnProperty(0) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.4.4.22-9-b-21",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-b-21.js",
+ "description": "Array.prototype.reduceRight - deleting own property causes deleted index property not to be visited on an Array-like object",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n var testResult = true;\n\n function callbackfn(prevVal, curVal, idx, obj) {\n accessed = true;\n if (idx === 1) {\n testResult = false;\n }\n }\n\n var obj = { 0: 10, length: 10 };\n\n Object.defineProperty(obj, \"1\", {\n get: function () {\n return 6.99;\n },\n configurable: true\n });\n\n Object.defineProperty(obj, \"5\", {\n get: function () {\n delete obj[1];\n return 0;\n },\n configurable: true\n });\n\n Array.prototype.reduceRight.call(obj, callbackfn, \"initialValue\");\n return testResult && accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects())"
+ },
+ {
+ "id": "15.4.4.22-9-b-22",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-b-22.js",
+ "description": "Array.prototype.reduceRight - deleting own property causes deleted index property not to be visited on an Array",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n var testResult = true;\n\n function callbackfn(prevVal, curVal, idx, obj) {\n accessed = true;\n if (idx === 1) {\n testResult = false;\n }\n }\n\n var arr = [1, 2, 4];\n\n Object.defineProperty(arr, \"1\", {\n get: function () {\n return \"6.99\";\n },\n configurable: true\n });\n\n Object.defineProperty(arr, \"2\", {\n get: function () {\n delete arr[1];\n return 0;\n },\n configurable: true\n });\n\n arr.reduceRight(callbackfn, \"initialValue\");\n return testResult && accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.4.4.22-9-b-23",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-b-23.js",
+ "description": "Array.prototype.reduceRight - deleting property of prototype causes deleted index property not to be visited on an Array-like Object",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n var testResult = true;\n\n function callbackfn(prevVal, curVal, idx, obj) {\n accessed = true;\n if (idx === 3) {\n testResult = false;\n }\n }\n\n var obj = { 2: 2, length: 20 };\n\n Object.defineProperty(obj, \"5\", {\n get: function () {\n delete Object.prototype[3];\n return 0;\n },\n configurable: true\n });\n\n try {\n Object.prototype[3] = 1;\n Array.prototype.reduceRight.call(obj, callbackfn, \"initialValue\");\n return testResult && accessed;\n } finally {\n delete Object.prototype[3];\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects())"
+ },
+ {
+ "id": "15.4.4.22-9-b-24",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-b-24.js",
+ "description": "Array.prototype.reduceRight - deleting property of prototype causes deleted index property not to be visited on an Array",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n var testResult = true;\n\n function callbackfn(prevVal, curVal, idx, obj) {\n accessed = true;\n if (idx === 1) {\n testResult = false;\n }\n }\n\n var arr = [0, , , ];\n Object.defineProperty(arr, \"3\", {\n get: function () {\n delete Array.prototype[1];\n return 0;\n },\n configurable: true\n });\n\n try {\n Array.prototype[1] = 1;\n arr.reduceRight(callbackfn, \"initialValue\");\n return testResult && accessed;\n } finally {\n delete Array.prototype[1];\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight) && fnExists(Object.defineProperty) && ![, 1].hasOwnProperty(0) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.4.4.22-9-b-25",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-b-25.js",
+ "description": "Array.prototype.reduceRight - deleting own property with prototype property causes prototype index property to be visited on an Array-like object",
+ "test": "assertTrue((function testcase() {\n\n var testResult = false;\n\n function callbackfn(prevVal, curVal, idx, obj) {\n if (idx === 1 && curVal === 1) {\n testResult = true;\n }\n }\n\n var obj = { 0: 0, 1: 111, 4: 10, length: 10 };\n\n Object.defineProperty(obj, \"4\", {\n get: function () {\n delete obj[1];\n return 0;\n },\n configurable: true\n });\n\n try {\n Object.prototype[1] = 1;\n Array.prototype.reduceRight.call(obj, callbackfn, \"initialValue\");\n return testResult;\n } finally {\n delete Object.prototype[1];\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects())"
+ },
+ {
+ "id": "15.4.4.22-9-b-26",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-b-26.js",
+ "description": "Array.prototype.reduceRight - deleting own property with prototype property causes prototype index property to be visited on an Array",
+ "test": "assertTrue((function testcase() {\n\n var testResult = false;\n\n function callbackfn(prevVal, curVal, idx, obj) {\n if (idx === 1 && curVal === 1) {\n testResult = true;\n }\n }\n var arr = [0, 111];\n\n Object.defineProperty(arr, \"2\", {\n get: function () {\n delete arr[1];\n return 0;\n },\n configurable: true\n });\n\n try {\n Array.prototype[1] = 1;\n arr.reduceRight(callbackfn, \"initialValue\");\n return testResult;\n } finally {\n delete Array.prototype[1];\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.4.4.22-9-b-27",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-b-27.js",
+ "description": "Array.prototype.reduceRight - decreasing length of array causes deleted index property not to be visited",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n var testResult = true;\n\n function callbackfn(prevVal, curVal, idx, obj) {\n accessed = true;\n if (idx === 2) {\n testResult = false;\n }\n }\n\n var arr = [0, 1, 2, 3];\n\n Object.defineProperty(arr, \"3\", {\n get: function () {\n arr.length = 2;\n return 0;\n },\n configurable: true\n });\n\n arr.reduceRight(callbackfn, \"initialValue\");\n\n return testResult && accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.4.4.22-9-b-28",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-b-28.js",
+ "description": "Array.prototype.reduceRight - decreasing length of array with prototype property causes prototype index property to be visited",
+ "test": "assertTrue((function testcase() {\n\n var testResult = false;\n\n function callbackfn(prevVal, curVal, idx, obj) {\n if (idx === 2 && curVal === \"prototype\") {\n testResult = true;\n }\n }\n var arr = [0, 1, 2, 3];\n\n try {\n Object.defineProperty(Array.prototype, \"2\", {\n get: function () {\n return \"prototype\";\n },\n configurable: true\n });\n\n Object.defineProperty(arr, \"3\", {\n get: function () {\n arr.length = 2;\n return 1;\n },\n configurable: true\n });\n\n arr.reduceRight(callbackfn, \"initialValue\");\n\n return testResult;\n } finally {\n delete Array.prototype[2];\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.4.4.22-9-b-29",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-b-29.js",
+ "description": "Array.prototype.reduceRight - decreasing length of array does not delete non-configurable properties",
+ "test": "assertTrue((function testcase() {\n\n var testResult = false;\n\n function callbackfn(prevVal, curVal, idx, obj) {\n if (idx === 2 && curVal === \"unconfigurable\") {\n testResult = true;\n }\n }\n\n var arr = [0, 1, 2, 3];\n\n Object.defineProperty(arr, \"2\", {\n get: function () {\n return \"unconfigurable\";\n },\n configurable: false\n });\n\n Object.defineProperty(arr, \"3\", {\n get: function () {\n arr.length = 2;\n return 1;\n },\n configurable: true\n });\n\n arr.reduceRight(callbackfn, \"initialValue\");\n\n return testResult;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.4.4.22-9-b-3",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-b-3.js",
+ "description": "Array.prototype.reduceRight - deleted properties in step 2 are visible here",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n var testResult = true;\n\n function callbackfn(preVal, curVal, idx, obj) {\n accessed = true;\n if (idx === 2) {\n testResult = false;\n }\n }\n\n var obj = { 2: \"2\", 3: 10 };\n\n Object.defineProperty(obj, \"length\", {\n get: function () {\n delete obj[2];\n return 5;\n },\n configurable: true\n });\n\n Array.prototype.reduceRight.call(obj, callbackfn, \"initialValue\");\n\n return accessed && testResult;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight) && fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.4.4.22-9-b-4",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-b-4.js",
+ "description": "Array.prototype.reduceRight - properties added into own object in step 8 can be visited on an Array-like object",
+ "test": "assertTrue((function testcase() {\n\n var testResult = false;\n\n function callbackfn(preVal, curVal, idx, obj) {\n if (idx === 0 && curVal === 0) {\n testResult = true;\n }\n }\n\n var obj = { length: 2 };\n\n Object.defineProperty(obj, \"1\", {\n get: function () {\n Object.defineProperty(obj, \"0\", {\n get: function () {\n return 0;\n },\n configurable: true\n });\n return 1;\n },\n configurable: true\n });\n\n Array.prototype.reduceRight.call(obj, callbackfn);\n return testResult;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects())"
+ },
+ {
+ "id": "15.4.4.22-9-b-5",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-b-5.js",
+ "description": "Array.prototype.reduceRight - properties added into own object in step 8 can be visited on an Array",
+ "test": "assertTrue((function testcase() {\n\n var testResult = false;\n\n function callbackfn(preVal, curVal, idx, obj) {\n if (idx === 1 && curVal === 1) {\n testResult = true;\n }\n }\n\n var arr = [0, , 2];\n\n Object.defineProperty(arr, \"2\", {\n get: function () {\n Object.defineProperty(arr, \"1\", {\n get: function () {\n return 1;\n },\n configurable: true\n });\n return 0;\n },\n configurable: true\n });\n\n arr.reduceRight(callbackfn);\n return testResult;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.4.4.22-9-b-6",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-b-6.js",
+ "description": "Array.prototype.reduceRight - properties added to prototype in step 8 visited on an Array-like object",
+ "test": "assertTrue((function testcase() {\n\n var testResult = false;\n\n function callbackfn(preVal, curVal, idx, obj) {\n if (idx === 1 && curVal === 6.99) {\n testResult = true;\n }\n }\n\n var obj = { length: 6 };\n\n Object.defineProperty(obj, \"2\", {\n get: function () {\n Object.defineProperty(Object.prototype, \"1\", {\n get: function () {\n return 6.99;\n },\n configurable: true\n });\n return 0;\n },\n configurable: true\n });\n\n try {\n Array.prototype.reduceRight.call(obj, callbackfn);\n return testResult;\n } finally {\n delete Object.prototype[1];\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects())"
+ },
+ {
+ "id": "15.4.4.22-9-b-7",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-b-7.js",
+ "description": "Array.prototype.reduceRight - properties added to prototype in step 8 visited on an Array",
+ "test": "assertTrue((function testcase() {\n\n var testResult = false;\n\n function callbackfn(preVal, curVal, idx, obj) {\n if (idx === 1 && curVal === 6.99) {\n testResult = true;\n }\n }\n\n var arr = [0, , 2];\n\n Object.defineProperty(arr, \"2\", {\n get: function () {\n Object.defineProperty(Array.prototype, \"1\", {\n get: function () {\n return 6.99;\n },\n configurable: true\n });\n return 0;\n },\n configurable: true\n });\n\n try {\n arr.reduceRight(callbackfn);\n return testResult;\n } finally {\n delete Array.prototype[1];\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight) && fnExists(Object.defineProperty) && ![, 1].hasOwnProperty(0) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.4.4.22-9-b-8",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-b-8.js",
+ "description": "Array.prototype.reduceRight - deleting own property in step 8 causes deleted index property not to be visited on an Array-like object",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n var testResult = true;\n\n function callbackfn(preVal, val, idx, obj) {\n accessed = true;\n if (idx === 1) {\n testResult = false;\n }\n }\n\n var obj = { 0: 10, length: 10 };\n\n Object.defineProperty(obj, \"1\", {\n get: function () {\n return 6.99;\n },\n configurable: true\n });\n\n Object.defineProperty(obj, \"5\", {\n get: function () {\n delete obj[1];\n return 0;\n },\n configurable: true\n });\n\n Array.prototype.reduceRight.call(obj, callbackfn);\n return testResult && accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects())"
+ },
+ {
+ "id": "15.4.4.22-9-b-9",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-b-9.js",
+ "description": "Array.prototype.reduceRight - deleting own property in step 8 causes deleted index property not to be visited on an Array",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n var testResult = true;\n\n function callbackfn(preVal, curVal, idx, obj) {\n accessed = true;\n if (idx === 1) {\n testResult = false;\n }\n }\n\n var arr = [0];\n\n Object.defineProperty(arr, \"1\", {\n get: function () {\n return \"6.99\";\n },\n configurable: true\n });\n\n Object.defineProperty(arr, \"2\", {\n get: function () {\n delete arr[1];\n return 0;\n },\n configurable: true\n });\n\n arr.reduceRight(callbackfn);\n return testResult && accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.4.4.22-9-c-1",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-1.js",
+ "description": "Array.prototype.reduceRight - callbackfn not called for indexes never been assigned values",
+ "test": "assertTrue((function testcase() { \n \n var callCnt = 0;\n function callbackfn(prevVal, curVal, idx, obj)\n {\n callCnt++;\n return curVal;\n }\n\n var arr = new Array(10);\n arr[0] = arr[1] = undefined; //explicitly assigning a value\n if( arr.reduceRight(callbackfn) === undefined && callCnt === 1)\n return true; \n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight))"
+ },
+ {
+ "id": "15.4.4.22-9-c-i-1",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-i-1.js",
+ "description": "Array.prototype.reduceRight - element to be retrieved is own data property on an Array-like object",
+ "test": "assertTrue((function testcase() {\n\n var testResult = false;\n function callbackfn(prevVal, curVal, idx, obj) {\n if (idx === 0) {\n testResult = (curVal === 0);\n }\n }\n\n var obj = { 0: 0, 1: 1, 2: 2, length: 2 };\n Array.prototype.reduceRight.call(obj, callbackfn, \"initialValue\");\n return testResult;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight))"
+ },
+ {
+ "id": "15.4.4.22-9-c-i-10",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-i-10.js",
+ "description": "Array.prototype.reduceRight - element to be retrieved is own accessor property on an Array",
+ "test": "assertTrue((function testcase() {\n \n var testResult = false;\n function callbackfn(prevVal, curVal, idx, obj) {\n if (idx === 1) {\n testResult = (curVal === 1);\n }\n }\n\n var arr = [0, , 2];\n\n Object.defineProperty(arr, \"1\", {\n get: function () {\n return 1;\n },\n configurable: true\n });\n\n arr.reduceRight(callbackfn, \"initialValue\");\n return testResult;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.4.4.22-9-c-i-11",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-i-11.js",
+ "description": "Array.prototype.reduceRight - element to be retrieved is own accessor property that overrides an inherited data property on an Array-like object",
+ "test": "assertTrue((function testcase() {\n\n var testResult = false;\n function callbackfn(prevVal, curVal, idx, obj) {\n if (idx === 1) {\n testResult = (curVal === \"1\");\n }\n }\n\n var proto = { 0: 0, 1: 11, 2: 2 };\n\n var Con = function () { };\n Con.prototype = proto;\n\n var child = new Con();\n child.length = 3;\n\n Object.defineProperty(child, \"1\", {\n get: function () {\n return \"1\";\n },\n configurable: true\n });\n\n Array.prototype.reduceRight.call(child, callbackfn, \"initialValue\");\n return testResult;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects())"
+ },
+ {
+ "id": "15.4.4.22-9-c-i-12",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-i-12.js",
+ "description": " Array.prototype.reduceRight - element to be retrieved is own accessor property that overrides an inherited data property on an Array",
+ "test": "assertTrue((function testcase() {\n \n var testResult = false;\n function callbackfn(prevVal, curVal, idx, obj) {\n if (idx === 1) {\n testResult = (curVal === \"1\");\n }\n }\n\n try {\n Array.prototype[1] = 11;\n var arr = [0, ,2];\n\n Object.defineProperty(arr, \"1\", {\n get: function () {\n return \"1\";\n },\n configurable: true\n });\n\n arr.reduceRight(callbackfn, \"initialValue\");\n return testResult;\n\n } finally {\n delete Array.prototype[1];\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.4.4.22-9-c-i-13",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-i-13.js",
+ "description": "Array.prototype.reduceRight - element to be retrieved is own accessor property that overrides an inherited accessor property on an Array-like object",
+ "test": "assertTrue((function testcase() {\n \n var testResult = false;\n function callbackfn(prevVal, curVal, idx, obj) {\n if (idx === 1) {\n testResult = (curVal === \"1\");\n }\n }\n\n var proto = { 0: 0, 2: 2};\n\n Object.defineProperty(proto, \"1\", {\n get: function () {\n return 11;\n },\n configurable: true\n });\n\n var Con = function () { };\n Con.prototype = proto;\n\n var child = new Con();\n child.length = 3;\n\n Object.defineProperty(child, \"1\", {\n get: function () {\n return \"1\";\n },\n configurable: true\n });\n\n Array.prototype.reduceRight.call(child, callbackfn, \"initialValue\");\n return testResult;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects())"
+ },
+ {
+ "id": "15.4.4.22-9-c-i-14",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-i-14.js",
+ "description": " Array.prototype.reduceRight - element to be retrieved is own accessor property that overrides an inherited accessor property on an Array",
+ "test": "assertTrue((function testcase() {\n\n var testResult = false;\n function callbackfn(prevVal, curVal, idx, obj) {\n if (idx === 1) {\n testResult = (curVal === \"1\");\n }\n }\n\n try {\n Object.defineProperty(Array.prototype, \"1\", {\n get: function () {\n return 11;\n },\n configurable: true\n });\n\n var arr = [0, ,2];\n\n Object.defineProperty(arr, \"1\", {\n get: function () {\n return \"1\";\n },\n configurable: true\n });\n arr.reduceRight(callbackfn, \"initialValue\");\n return testResult;\n\n } finally {\n delete Array.prototype[1];\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.4.4.22-9-c-i-15",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-i-15.js",
+ "description": "Array.prototype.reduceRight - element to be retrieved is inherited accessor property on an Array-like object",
+ "test": "assertTrue((function testcase() {\n\n var testResult = false;\n function callbackfn(prevVal, curVal, idx, obj) {\n if (idx === 1) {\n testResult = (curVal === 1);\n }\n }\n\n var proto = { 0: 0, 2: 2 };\n\n Object.defineProperty(proto, \"1\", {\n get: function () {\n return 1;\n },\n configurable: true\n });\n\n var Con = function () { };\n Con.prototype = proto;\n\n var child = new Con();\n child.length = 3;\n\n Array.prototype.reduceRight.call(child, callbackfn, \"initialValue\");\n return testResult;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects())"
+ },
+ {
+ "id": "15.4.4.22-9-c-i-16",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-i-16.js",
+ "description": "Array.prototype.reduceRight - element to be retrieved is inherited accessor property on an Array",
+ "test": "assertTrue((function testcase() {\n\n var testResult = false;\n function callbackfn(prevVal, curVal, idx, obj) {\n if (idx === 1) {\n testResult = (curVal === 1);\n }\n }\n\n try {\n Object.defineProperty(Array.prototype, \"1\", {\n get: function () {\n return 1;\n },\n configurable: true\n });\n\n var arr = [0, , 2];\n\n arr.reduceRight(callbackfn, \"initialValue\");\n return testResult;\n\n } finally {\n delete Array.prototype[1];\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight) && fnExists(Object.defineProperty) && ![, 1].hasOwnProperty(0) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.4.4.22-9-c-i-17",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-i-17.js",
+ "description": "Array.prototype.reduceRight - element to be retrieved is own accessor property without a get function on an Array-like object",
+ "test": "assertTrue((function testcase() {\n\n var testResult = false;\n function callbackfn(prevVal, curVal, idx, obj) {\n if (idx === 1) {\n testResult = (typeof curVal === \"undefined\");\n }\n }\n\n var obj = { 0: 0, 2: 2, length: 3 };\n\n Object.defineProperty(obj, \"1\", {\n set: function () { },\n configurable: true\n });\n\n Array.prototype.reduceRight.call(obj, callbackfn, \"initialValue\");\n return testResult;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects())"
+ },
+ {
+ "id": "15.4.4.22-9-c-i-18",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-i-18.js",
+ "description": "Array.prototype.reduceRight - element to be retrieved is own accessor property without a get function on an Array",
+ "test": "assertTrue((function testcase() {\n\n var testResult = false;\n function callbackfn(prevVal, curVal, idx, obj) {\n if (idx === 1) {\n testResult = (typeof curVal === \"undefined\");\n }\n }\n\n var arr = [0, , 2];\n\n Object.defineProperty(arr, \"1\", {\n set: function () { },\n configurable: true\n });\n\n arr.reduceRight(callbackfn, \"initialValue\");\n return testResult;\n \n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.4.4.22-9-c-i-19",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-i-19.js",
+ "description": "Array.prototype.reduceRight - element to be retrieved is own accessor property without a get function that overrides an inherited accessor property on an Array-like object",
+ "test": "assertTrue((function testcase() {\n\n var testResult = false;\n function callbackfn(prevVal, curVal, idx, obj) {\n if (idx === 1) {\n testResult = (typeof curVal === \"undefined\");\n }\n }\n\n try {\n Object.prototype[1] = 1;\n\n var obj = { 0: 0, 2: 2, length: 3 };\n Object.defineProperty(obj, \"1\", {\n set: function () { },\n configurable: true\n });\n\n Array.prototype.reduceRight.call(obj, callbackfn, \"initialValue\");\n return testResult;\n } finally {\n delete Object.prototype[1];\n }\n\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects())"
+ },
+ {
+ "id": "15.4.4.22-9-c-i-2",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-i-2.js",
+ "description": "Array.prototype.reduceRight - element to be retrieved is own data property on an Array",
+ "test": "assertTrue((function testcase() {\n\n var testResult = false;\n function callbackfn(prevVal, curVal, idx, obj) {\n if (idx === 1) {\n testResult = (curVal === 1);\n }\n }\n\n var arr = [0, 1, 2];\n arr.reduceRight(callbackfn, \"initialValue\");\n return testResult;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight))"
+ },
+ {
+ "id": "15.4.4.22-9-c-i-20",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-i-20.js",
+ "description": "Array.prototype.reduceRight - element to be retrieved is own accessor property without a get function that overrides an inherited accessor property on an Array",
+ "test": "assertTrue((function testcase() {\n\n var testResult = false;\n function callbackfn(prevVal, curVal, idx, obj) {\n if (idx === 1) {\n testResult = (typeof curVal === \"undefined\");\n }\n }\n\n try {\n Array.prototype[1] = 1;\n var arr = [0, ,2];\n Object.defineProperty(arr, \"1\", {\n set: function () { },\n configurable: true\n });\n\n arr.reduceRight(callbackfn, \"initialValue\");\n return testResult;\n\n } finally {\n delete Array.prototype[1];\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.4.4.22-9-c-i-21",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-i-21.js",
+ "description": "Array.prototype.reduceRight - element to be retrieved is inherited accessor property without a get function on an Array-like object",
+ "test": "assertTrue((function testcase() {\n \n var testResult = false;\n function callbackfn(prevVal, curVal, idx, obj) {\n if (idx === 1) {\n testResult = (typeof curVal === \"undefined\");\n }\n }\n\n var proto = { 0: 0, 2: 2 };\n\n Object.defineProperty(proto, \"1\", {\n set: function () { },\n configurable: true\n });\n\n var Con = function () { };\n Con.prototype = proto;\n\n var child = new Con();\n child.length = 3;\n\n Array.prototype.reduceRight.call(child, callbackfn, \"initialValue\");\n return testResult;\n\n\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects())"
+ },
+ {
+ "id": "15.4.4.22-9-c-i-22",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-i-22.js",
+ "description": "Array.prototype.reduceRight - element to be retrieved is inherited accessor property without a get function on an Array",
+ "test": "assertTrue((function testcase() {\n \n var testResult = false;\n function callbackfn(prevVal, curVal, idx, obj) {\n if (idx === 1) {\n testResult = (typeof curVal === \"undefined\");\n }\n }\n\n try {\n Object.defineProperty(Array.prototype, \"1\", {\n set: function () { },\n configurable: true\n });\n\n var arr = [0, , 2];\n\n arr.reduceRight(callbackfn, \"initialValue\");\n return testResult;\n\n } finally {\n delete Array.prototype[1];\n }\n\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight) && fnExists(Object.defineProperty) && ![, 1].hasOwnProperty(0) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.4.4.22-9-c-i-23",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-i-23.js",
+ "description": "Array.prototype.reduceRight - This object is an global object which contains index property",
+ "test": "assertTrue((function testcase() {\n\n var testResult = false;\n function callbackfn(prevVal, curVal, idx, obj) {\n if (idx === 1) {\n testResult = (curVal === 1);\n }\n }\n\n try {\n var oldLen = fnGlobalObject().length;\n fnGlobalObject()[0] = 0;\n fnGlobalObject()[1] = 1;\n fnGlobalObject()[2] = 2;\n fnGlobalObject().length = 3;\n\n Array.prototype.reduceRight.call(fnGlobalObject(), callbackfn, \"initialValue\");\n return testResult;\n\n } finally {\n delete fnGlobalObject()[0];\n delete fnGlobalObject()[1];\n delete fnGlobalObject()[2];\n fnGlobalObject().length = oldLen;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight))"
+ },
+ {
+ "id": "15.4.4.22-9-c-i-25",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-i-25.js",
+ "description": "Array.prototype.reduceRight - This object is the Arguments object which implements its own property get method (number of arguments is less than number of parameters)",
+ "test": "assertTrue((function testcase() {\n\n var testResult = false;\n function callbackfn(prevVal, curVal, idx, obj) {\n if (idx === 1) {\n testResult = (curVal === 1);\n }\n }\n\n var func = function (a, b, c) {\n Array.prototype.reduceRight.call(arguments, callbackfn, \"initialValue\");\n };\n\n func(0, 1);\n return testResult;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight))"
+ },
+ {
+ "id": "15.4.4.22-9-c-i-26",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-i-26.js",
+ "description": "Array.prototype.reduceRight - This object is the Arguments object which implements its own property get method (number of arguments equals number of parameters)",
+ "test": "assertTrue((function testcase() {\n\n var testResult = false;\n function callbackfn(prevVal, curVal, idx, obj) {\n if (idx === 2) {\n testResult = (curVal === 2);\n }\n }\n\n var func = function (a, b, c) {\n Array.prototype.reduceRight.call(arguments, callbackfn, \"initialValue\");\n };\n\n func(0, 1, 2);\n return testResult;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight))"
+ },
+ {
+ "id": "15.4.4.22-9-c-i-27",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-i-27.js",
+ "description": "Array.prototype.reduceRight - This object is the Arguments object which implements its own property get method (number of arguments is greater than number of parameters)",
+ "test": "assertTrue((function testcase() {\n\n var testResult = false;\n function callbackfn(prevVal, curVal, idx, obj) {\n if (idx === 3) {\n testResult = (curVal === 3);\n }\n }\n\n var func = function (a, b, c) {\n Array.prototype.reduceRight.call(arguments, callbackfn, \"initialValue\");\n };\n\n func(0, 1, 2, 3);\n return testResult;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight))"
+ },
+ {
+ "id": "15.4.4.22-9-c-i-28",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-i-28.js",
+ "description": "Array.prototype.reduceRight applied to String object, which implements its own property get method",
+ "test": "assertTrue((function testcase() {\n\n var testResult = false;\n function callbackfn(prevVal, curVal, idx, obj) {\n if (idx === 1) {\n testResult = (curVal === \"1\");\n }\n }\n\n var str = new String(\"012\");\n Array.prototype.reduceRight.call(str, callbackfn, \"initialValue\");\n return testResult;\n\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight))"
+ },
+ {
+ "id": "15.4.4.22-9-c-i-29",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-i-29.js",
+ "description": "Array.prototype.reduceRight applied to Function object which implements its own property get method",
+ "test": "assertTrue((function testcase() {\n\n var testResult = false;\n var initialValue = 0;\n function callbackfn(prevVal, curVal, idx, obj) {\n if (idx === 1) {\n testResult = (curVal === 1);\n }\n }\n\n var obj = function (a, b, c) {\n return a + b + c;\n };\n obj[0] = 0;\n obj[1] = 1;\n obj[2] = 2;\n obj[3] = 3;\n\n Array.prototype.reduceRight.call(obj, callbackfn, initialValue);\n return testResult;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight))"
+ },
+ {
+ "id": "15.4.4.22-9-c-i-3",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-i-3.js",
+ "description": "Array.prototype.reduceRight - element to be retrieved is own data property that overrides an inherited data property on an Array-like object",
+ "test": "assertTrue((function testcase() {\n\n var testResult = false;\n function callbackfn(prevVal, curVal, idx, obj) {\n if (idx === 1) {\n testResult = (curVal === \"1\");\n }\n }\n\n var proto = { 0: 10, 1: 11, 2: 12, length: 2 };\n var Con = function () { };\n Con.prototype = proto;\n\n var child = new Con();\n child[1] = \"1\";\n child[2] = \"2\";\n child.length = 3;\n\n Array.prototype.reduceRight.call(child, callbackfn, \"initialValue\");\n return testResult;\n\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight))"
+ },
+ {
+ "id": "15.4.4.22-9-c-i-30",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-i-30.js",
+ "description": "Array.prototype.reduceRight - element changed by getter on previous iterations is observed on an Array",
+ "test": "assertTrue((function testcase() {\n\n var testResult = false;\n function callbackfn(prevVal, curVal, idx, obj) {\n if (idx === 1) {\n testResult = (curVal === 1);\n }\n }\n\n var arr = [, ,];\n var preIterVisible = false;\n\n Object.defineProperty(arr, \"2\", {\n get: function () {\n preIterVisible = true;\n return 0;\n },\n configurable: true\n });\n\n Object.defineProperty(arr, \"1\", {\n get: function () {\n if (preIterVisible) {\n return 1;\n } else {\n return \"11\";\n }\n },\n configurable: true\n });\n\n arr.reduceRight(callbackfn, \"initialValue\");\n return testResult;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.4.4.22-9-c-i-31",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-i-31.js",
+ "description": "Array.prototype.reduceRight - element changed by getter on previous iterations is observed on an Array-like object",
+ "test": "assertTrue((function testcase() {\n\n var testResult = false;\n function callbackfn(prevVal, curVal, idx, obj) {\n if (idx === 1) {\n testResult = (curVal === 1);\n }\n }\n\n var obj = { length: 3 };\n var preIterVisible = false;\n\n Object.defineProperty(obj, \"2\", {\n get: function () {\n preIterVisible = true;\n return 0;\n },\n configurable: true\n });\n\n Object.defineProperty(obj, \"1\", {\n get: function () {\n if (preIterVisible) {\n return 1;\n } else {\n return \"11\";\n }\n },\n configurable: true\n });\n\n Array.prototype.reduceRight.call(obj, callbackfn, \"initialValue\");\n return testResult;\n\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects())"
+ },
+ {
+ "id": "15.4.4.22-9-c-i-32",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-i-32.js",
+ "description": "Array.prototype.reduceRight - unnhandled exceptions happened in getter terminate iteration on an Array-like object",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n function callbackfn(prevVal, curVal, idx, obj) {\n if (idx <= 1) {\n accessed = true;\n }\n }\n\n\n var obj = { 0: 0, 2: 2, length: 3 };\n Object.defineProperty(obj, \"1\", {\n get: function () {\n throw new RangeError(\"unhandle exception happened in getter\");\n },\n configurable: true\n });\n\n try {\n Array.prototype.reduceRight.call(obj, callbackfn, \"initialValue\");\n return false;\n } catch (ex) {\n return (ex instanceof RangeError) && !accessed;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects())"
+ },
+ {
+ "id": "15.4.4.22-9-c-i-33",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-i-33.js",
+ "description": "Array.prototype.reduceRight - unnhandled exceptions happened in getter terminate iteration on an Array",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n function callbackfn(prevVal, curVal, idx, obj) {\n if (idx <= 1) {\n accessed = true;\n }\n }\n\n var arr = [0, , 2];\n\n Object.defineProperty(arr, \"1\", {\n get: function () {\n throw new RangeError(\"unhandle exception happened in getter\");\n },\n configurable: true\n });\n\n try {\n arr.reduceRight(callbackfn, \"initialValue\");\n return true;\n } catch (ex) {\n return (ex instanceof RangeError) && !accessed;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.4.4.22-9-c-i-4",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-i-4.js",
+ "description": "Array.prototype.reduceRight - element to be retrieved is own data property that overrides an inherited data property on an Array",
+ "test": "assertTrue((function testcase() {\n\n var testResult = false;\n function callbackfn(prevVal, curVal, idx, obj) {\n if (idx === 1) {\n testResult = (curVal === 1);\n }\n }\n\n try {\n Array.prototype[1] = \"11\";\n [0, 1, 2].reduceRight(callbackfn, \"initialValue\");\n return testResult;\n\n } finally {\n delete Array.prototype[1];\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight))"
+ },
+ {
+ "id": "15.4.4.22-9-c-i-5",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-i-5.js",
+ "description": "Array.prototype.reduceRight - element to be retrieved is own data property that overrides an inherited accessor property on an Array-like object",
+ "test": "assertTrue((function testcase() {\n\n var testResult = false;\n function callbackfn(prevVal, curVal, idx, obj) {\n if (idx === 0) {\n testResult = (curVal === \"0\");\n }\n }\n\n var proto = {};\n\n Object.defineProperty(proto, \"0\", {\n get: function () {\n return 10;\n },\n configurable: true\n });\n\n var Con = function () { };\n Con.prototype = proto;\n\n var child = new Con();\n child.length = 2;\n Object.defineProperty(child, \"0\", {\n value: \"0\",\n configurable: true\n });\n child[1] = \"1\";\n\n Array.prototype.reduceRight.call(child, callbackfn, \"initialValue\");\n return testResult;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects())"
+ },
+ {
+ "id": "15.4.4.22-9-c-i-6",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-i-6.js",
+ "description": "Array.prototype.reduceRight - element to be retrieved is own data property that overrides an inherited accessor property on an Array",
+ "test": "assertTrue((function testcase() {\n\n var testResult = false;\n function callbackfn(prevVal, curVal, idx, obj) {\n if (idx === 1) {\n testResult = (curVal === 1);\n }\n }\n\n try {\n Object.defineProperty(Array.prototype, \"1\", {\n get: function () {\n return \"11\";\n },\n configurable: true\n });\n [0, 1, 2].reduceRight(callbackfn, \"initialValue\");\n return testResult;\n\n } finally {\n delete Array.prototype[1];\n }\n\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnArrays())"
+ },
+ {
+ "id": "15.4.4.22-9-c-i-7",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-i-7.js",
+ "description": "Array.prototype.reduceRight - element to be retrieved is inherited data property on an Array-like object",
+ "test": "assertTrue((function testcase() {\n\n var testResult = false;\n function callbackfn(prevVal, curVal, idx, obj) {\n if (idx === 1) {\n testResult = (curVal === 1);\n }\n }\n\n var proto = { 0: 0, 1: 1, 2: 2 };\n var Con = function () { };\n Con.prototype = proto;\n\n var child = new Con();\n child.length = 3;\n\n Array.prototype.reduceRight.call(child, callbackfn, \"initialValue\");\n return testResult;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight))"
+ },
+ {
+ "id": "15.4.4.22-9-c-i-8",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-i-8.js",
+ "description": "Array.prototype.reduceRight - element to be retrieved is inherited data property on an Array",
+ "test": "assertTrue((function testcase() {\n\n var testResult = false;\n function callbackfn(prevVal, curVal, idx, obj) {\n if (idx === 1) {\n testResult = (curVal === 1);\n }\n }\n\n try {\n Array.prototype[0] = 0;\n Array.prototype[1] = 1;\n Array.prototype[2] = 2;\n [, , , ].reduceRight(callbackfn, \"initialValue\");\n return testResult;\n\n } finally {\n delete Array.prototype[0];\n delete Array.prototype[1];\n delete Array.prototype[2];\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight) && ![, 1].hasOwnProperty(0))"
+ },
+ {
+ "id": "15.4.4.22-9-c-i-9",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-i-9.js",
+ "description": "Array.prototype.reduceRight - element to be retrieved is own accessor property on an Array-like object",
+ "test": "assertTrue((function testcase() {\n\n var testResult = false;\n function callbackfn(prevVal, curVal, idx, obj) {\n if (idx === 1) {\n testResult = (curVal === 1);\n }\n }\n\n var obj = { 0: 0, 2: 2, length: 3 };\n Object.defineProperty(obj, \"1\", {\n get: function () {\n return 1;\n },\n configurable: true\n });\n\n Array.prototype.reduceRight.call(obj, callbackfn, \"initialValue\");\n return testResult;\n\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight) && fnExists(Object.defineProperty) && fnSupportsArrayIndexGettersOnObjects())"
+ },
+ {
+ "id": "15.4.4.22-9-c-ii-1",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-1.js",
+ "description": "Array.prototype.reduceRight - callbackfn called with correct parameters (initialvalue not passed)",
+ "test": "assertTrue((function testcase() { \n \n function callbackfn(prevVal, curVal, idx, obj)\n {\n if(idx+1 < obj.length && obj[idx] === curVal && obj[idx+1] === prevVal)\n return curVal;\n else \n return false;\n }\n\n var arr = [0,1,true,null,new Object(),\"five\"];\n if( arr.reduceRight(callbackfn) === 0) \n return true;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight))"
+ },
+ {
+ "id": "15.4.4.22-9-c-ii-10",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-10.js",
+ "description": "Array.prototype.reduceRight - callbackfn is called with 1 formal parameter",
+ "test": "assertTrue((function testcase() {\n\n var called = 0;\n\n function callbackfn(prevVal) {\n called++;\n return prevVal;\n }\n\n return [11, 12].reduceRight(callbackfn, 100) === 100 && 2 === called;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight))"
+ },
+ {
+ "id": "15.4.4.22-9-c-ii-11",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-11.js",
+ "description": "Array.prototype.reduceRight - callbackfn is called with 2 formal parameter",
+ "test": "assertTrue((function testcase() {\n\n var testResult = false;\n\n function callbackfn(prevVal, curVal) {\n if (prevVal === 100) {\n testResult = true;\n }\n return curVal > 10;\n }\n\n return [11].reduceRight(callbackfn, 100) === true && testResult;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight))"
+ },
+ {
+ "id": "15.4.4.22-9-c-ii-12",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-12.js",
+ "description": "Array.prototype.reduceRight - callbackfn is called with 3 formal parameter",
+ "test": "assertTrue((function testcase() {\n\n var testResult = false;\n var arr = [11, 12, 13];\n var initVal = 6.99;\n\n function callbackfn(prevVal, curVal, idx) {\n if (idx === 2) {\n testResult = (prevVal === initVal);\n }\n return curVal > 10 && arguments[3][idx] === curVal;\n }\n\n return arr.reduceRight(callbackfn, initVal) === true && testResult;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight))"
+ },
+ {
+ "id": "15.4.4.22-9-c-ii-13",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-13.js",
+ "description": "Array.prototype.reduceRight - callbackfn is called with 4 formal parameter",
+ "test": "assertTrue((function testcase() {\n\n var arr = [11, 12, 13];\n var initVal = 6.99;\n var testResult = false;\n\n function callbackfn(prevVal, curVal, idx, obj) {\n if (idx === 2) {\n testResult = (prevVal === initVal);\n }\n return curVal > 10 && obj[idx] === curVal;\n }\n\n return arr.reduceRight(callbackfn, initVal) === true && testResult;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight))"
+ },
+ {
+ "id": "15.4.4.22-9-c-ii-14",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-14.js",
+ "description": "Array.prototype.reduceRight - callbackfn uses arguments",
+ "test": "assertTrue((function testcase() {\n\n function callbackfn() {\n return arguments[0] === 100 && arguments[3][arguments[2]] === arguments[1];\n }\n\n return [11].reduceRight(callbackfn, 100) === true;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight))"
+ },
+ {
+ "id": "15.4.4.22-9-c-ii-16",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-16.js",
+ "description": "Array.prototype.reduceRight - non-indexed properties are not called on an Array-like object",
+ "test": "assertTrue((function testcase() {\n\n var testResult = false;\n\n function callbackfn(prevVal, curVal, idx, obj) {\n if (prevVal === 8 || curVal === 8) {\n testResult = true;\n }\n }\n\n var obj = { 0: 11, 10: 12, non_index_property: 8, length: 20 };\n Array.prototype.reduceRight.call(obj, callbackfn, \"initialValue\");\n return !testResult;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight))"
+ },
+ {
+ "id": "15.4.4.22-9-c-ii-17",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-17.js",
+ "description": "Array.prototype.reduceRight - 'accumulator' used for current iteration is the result of previous iteration on an Array",
+ "test": "assertTrue((function testcase() {\n\n var arr = [11, 12, 13];\n var testResult = true;\n var initVal = 6.99;\n var preResult = initVal;\n\n function callbackfn(prevVal, curVal, idx, obj) {\n if (prevVal !== preResult) {\n testResult = false;\n }\n preResult = curVal;\n return curVal;\n }\n\n arr.reduceRight(callbackfn, initVal);\n\n return testResult;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight))"
+ },
+ {
+ "id": "15.4.4.22-9-c-ii-18",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-18.js",
+ "description": "Array.prototype.reduceRight - 'accumulator' used for first iteration is the value of 'initialValue' when it is present on an Array",
+ "test": "assertTrue((function testcase() {\n\n var arr = [11, 12];\n var testResult = false;\n var initVal = 6.99;\n\n function callbackfn(prevVal, curVal, idx, obj) {\n if (idx === 1) {\n testResult = (prevVal === initVal);\n }\n return curVal;\n }\n\n arr.reduceRight(callbackfn, initVal);\n\n return testResult;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight))"
+ },
+ {
+ "id": "15.4.4.22-9-c-ii-19",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-19.js",
+ "description": "Array.prototype.reduceRight - value of 'accumulator' used for first iteration is the value of max index property which is not undefined when 'initialValue' is not present on an Array",
+ "test": "assertTrue((function testcase() {\n\n var arr = [11, 12, 13];\n var testResult = false;\n\n function callbackfn(prevVal, curVal, idx, obj) {\n if (idx === 1) {\n testResult = (prevVal === 13);\n }\n return curVal;\n }\n arr.reduceRight(callbackfn);\n\n return testResult;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight))"
+ },
+ {
+ "id": "15.4.4.22-9-c-ii-2",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-2.js",
+ "description": "Array.prototype.reduceRight - callbackfn called with correct parameters (initialvalue passed)",
+ "test": "assertTrue((function testcase() {\n var bParCorrect = false;\n var arr = [0, 1, true, null, new Object(), \"five\"];\n var initialValue = 5.5;\n\n function callbackfn(prevVal, curVal, idx, obj) {\n if (idx === obj.length - 1 && obj[idx] === curVal && prevVal === initialValue)\n return curVal;\n else if (idx + 1 < obj.length && obj[idx] === curVal && obj[idx + 1] === prevVal)\n return curVal;\n else\n return false;\n }\n return arr.reduceRight(callbackfn, initialValue) === 0;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight))"
+ },
+ {
+ "id": "15.4.4.22-9-c-ii-20",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-20.js",
+ "description": "Array.prototype.reduceRight - undefined can be used as accumulator",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n function callbackfn(prevVal, curVal, idx, obj) {\n accessed = true;\n return typeof prevVal === \"undefined\";\n }\n\n var obj = { 0: 11, length: 1 };\n\n return Array.prototype.reduceRight.call(obj, callbackfn, undefined) === true && accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight))"
+ },
+ {
+ "id": "15.4.4.22-9-c-ii-21",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-21.js",
+ "description": "Array.prototype.reduceRight - null can be used as accumulator",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n function callbackfn(prevVal, curVal, idx, obj) {\n accessed = true;\n return prevVal === null;\n }\n\n var obj = { 0: 11, length: 1 };\n\n return Array.prototype.reduceRight.call(obj, callbackfn, null) === true && accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight))"
+ },
+ {
+ "id": "15.4.4.22-9-c-ii-22",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-22.js",
+ "description": "Array.prototype.reduceRight - boolean primitive can be used as accumulator",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n function callbackfn(prevVal, curVal, idx, obj) {\n accessed = true;\n return prevVal === false;\n }\n\n var obj = { 0: 11, length: 1 };\n\n return Array.prototype.reduceRight.call(obj, callbackfn, false) === true && accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight))"
+ },
+ {
+ "id": "15.4.4.22-9-c-ii-23",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-23.js",
+ "description": "Array.prototype.reduceRight - number primitive can be used as accumulator",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n function callbackfn(prevVal, curVal, idx, obj) {\n accessed = true;\n return prevVal === 12;\n }\n\n var obj = { 0: 11, length: 1 };\n\n return Array.prototype.reduceRight.call(obj, callbackfn, 12) === true && accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight))"
+ },
+ {
+ "id": "15.4.4.22-9-c-ii-24",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-24.js",
+ "description": "Array.prototype.reduceRight - string primitive can be used as accumulator",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n function callbackfn(prevVal, curVal, idx, obj) {\n accessed = true;\n return prevVal === \"hello_\";\n }\n\n var obj = { 0: 11, length: 1 };\n\n return Array.prototype.reduceRight.call(obj, callbackfn, \"hello_\") === true && accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight))"
+ },
+ {
+ "id": "15.4.4.22-9-c-ii-25",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-25.js",
+ "description": "Array.prototype.reduceRight - Function Object can be used as accumulator",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n var objFunction = function () { };\n function callbackfn(prevVal, curVal, idx, obj) {\n accessed = true;\n return prevVal === objFunction;\n }\n\n var obj = { 0: 11, length: 1 };\n\n return Array.prototype.reduceRight.call(obj, callbackfn, objFunction) === true && accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight))"
+ },
+ {
+ "id": "15.4.4.22-9-c-ii-26",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-26.js",
+ "description": "Array.prototype.reduceRight - Array Object can be used as accumulator",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n var objArray = [];\n function callbackfn(prevVal, curVal, idx, obj) {\n accessed = true;\n return prevVal === objArray;\n }\n\n var obj = { 0: 11, length: 1 };\n\n return Array.prototype.reduceRight.call(obj, callbackfn, objArray) === true && accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight))"
+ },
+ {
+ "id": "15.4.4.22-9-c-ii-27",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-27.js",
+ "description": "Array.prototype.reduceRight - String Object can be used as accumulator",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n var objString = new String();\n function callbackfn(prevVal, curVal, idx, obj) {\n accessed = true;\n return prevVal === objString;\n }\n\n var obj = { 0: 11, length: 1 };\n\n return Array.prototype.reduceRight.call(obj, callbackfn, objString) === true && accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight))"
+ },
+ {
+ "id": "15.4.4.22-9-c-ii-28",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-28.js",
+ "description": "Array.prototype.reduceRight - Boolean Object can be used as accumulator",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n var objBoolean = new Boolean();\n function callbackfn(prevVal, curVal, idx, obj) {\n accessed = true;\n return prevVal === objBoolean;\n }\n\n var obj = { 0: 11, length: 1 };\n\n return Array.prototype.reduceRight.call(obj, callbackfn, objBoolean) === true && accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight))"
+ },
+ {
+ "id": "15.4.4.22-9-c-ii-29",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-29.js",
+ "description": "Array.prototype.reduceRight - Number Object can be used as accumulator",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n var objNumber = new Number();\n function callbackfn(prevVal, curVal, idx, obj) {\n accessed = true;\n return prevVal === objNumber;\n }\n\n var obj = { 0: 11, length: 1 };\n\n return Array.prototype.reduceRight.call(obj, callbackfn, objNumber) === true && accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight))"
+ },
+ {
+ "id": "15.4.4.22-9-c-ii-3",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-3.js",
+ "description": "Array.prototype.reduceRight - callbackfn takes 4 arguments",
+ "test": "assertTrue((function testcase() { \n \n var bCalled = false;\n function callbackfn(prevVal, curVal, idx, obj)\n { \n bCalled = true;\n if(prevVal === true && arguments.length === 4) \n return true;\n else\n return false;\n }\n var arr = [0,1,2,3,4,5,6,7,8,9];\n if(arr.reduceRight(callbackfn,true) === true && bCalled === true)\n return true;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight))"
+ },
+ {
+ "id": "15.4.4.22-9-c-ii-30",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-30.js",
+ "description": "Array.prototype.reduceRight - the Math Object can be used as accumulator",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n function callbackfn(prevVal, curVal, idx, obj) {\n accessed = true;\n return prevVal === Math;\n }\n\n var obj = { 0: 11, length: 1 };\n\n return Array.prototype.reduceRight.call(obj, callbackfn, Math) === true && accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight))"
+ },
+ {
+ "id": "15.4.4.22-9-c-ii-31",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-31.js",
+ "description": "Array.prototype.reduceRight - Date Object can be used as accumulator",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n var objDate = new Date();\n function callbackfn(prevVal, curVal, idx, obj) {\n accessed = true;\n return prevVal === objDate;\n }\n\n var obj = { 0: 11, length: 1 };\n\n return Array.prototype.reduceRight.call(obj, callbackfn, objDate) === true && accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight))"
+ },
+ {
+ "id": "15.4.4.22-9-c-ii-32",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-32.js",
+ "description": "Array.prototype.reduceRight - RegExp Object can be used as accumulator",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n var objRegExp = new RegExp();\n function callbackfn(prevVal, curVal, idx, obj) {\n accessed = true;\n return prevVal === objRegExp;\n }\n\n var obj = { 0: 11, length: 1 };\n\n return Array.prototype.reduceRight.call(obj, callbackfn, objRegExp) === true && accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight))"
+ },
+ {
+ "id": "15.4.4.22-9-c-ii-33",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-33.js",
+ "description": "Array.prototype.reduceRight - the JSON can be used as accumulator",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n function callbackfn(prevVal, curVal, idx, obj) {\n accessed = true;\n return prevVal === JSON;\n }\n\n var obj = { 0: 11, length: 1 };\n\n return Array.prototype.reduceRight.call(obj, callbackfn, JSON) === true && accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight))"
+ },
+ {
+ "id": "15.4.4.22-9-c-ii-34",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-34.js",
+ "description": "Array.prototype.reduceRight - Error Object can be used as accumulator",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n var objError = new RangeError();\n function callbackfn(prevVal, curVal, idx, obj) {\n accessed = true;\n return prevVal === objError;\n }\n\n var obj = { 0: 11, length: 1 };\n \n\n return Array.prototype.reduceRight.call(obj, callbackfn, objError) === true && accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight))"
+ },
+ {
+ "id": "15.4.4.22-9-c-ii-35",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-35.js",
+ "description": "Array.prototype.reduceRight - the Arguments object can be used as accumulator",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n var arg;\n\n function callbackfn(prevVal, curVal, idx, obj) {\n accessed = true;\n return prevVal === arg;\n }\n\n var obj = { 0: 11, length: 1 };\n\n (function fun() {\n arg = arguments;\n }(10, 11, 12, 13));\n\n return Array.prototype.reduceRight.call(obj, callbackfn, arg) === true && accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight))"
+ },
+ {
+ "id": "15.4.4.22-9-c-ii-37",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-37.js",
+ "description": "Array.prototype.reduceRight - the global object can be used as accumulator",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n function callbackfn(prevVal, curVal, idx, obj) {\n accessed = true;\n return prevVal === fnGlobalObject();\n }\n\n var obj = { 0: 11, length: 1 };\n\n return Array.prototype.reduceRight.call(obj, callbackfn, fnGlobalObject()) === true && accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight))"
+ },
+ {
+ "id": "15.4.4.22-9-c-ii-4-s",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22-9-c-ii-4-s.js",
+ "description": "Array.prototype.reduceRight - undefined passed as thisValue to strict callbackfn",
+ "test": "assertTrue((function testcase() { \n var innerThisCorrect = false;\n function callbackfn(prevVal, curVal, idx, obj)\n { \n \"use strict\";\n innerThisCorrect = this===undefined;\n return true;\n }\n [0].reduceRight(callbackfn,true);\n return innerThisCorrect; \n }).call(this));\n",
+ "precondition": "(fnSupportsStrict() && fnExists(Array.prototype.reduceRight))",
+ "strict_only": ""
+ },
+ {
+ "id": "15.4.4.22-9-c-ii-4",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-4.js",
+ "description": "Array.prototype.reduceRight - k values are passed in acending numeric order",
+ "test": "assertTrue((function testcase() {\n\n var arr = [0, 1, 2, 3, 4, 5];\n var lastIdx = arr.length - 1;\n var accessed = false;\n var result = true;\n\n function callbackfn(prevVal, curVal, idx, obj) {\n accessed = true;\n if (lastIdx !== idx) {\n result = false;\n } else {\n lastIdx--;\n }\n }\n arr.reduceRight(callbackfn, 1);\n return result && accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight))"
+ },
+ {
+ "id": "15.4.4.22-9-c-ii-5",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-5.js",
+ "description": "Array.prototype.reduceRight - k values are accessed during each iteration and not prior to starting the loop on an Array",
+ "test": "assertTrue((function testcase() {\n var arr = [11, 12, 13, 14];\n var kIndex = [];\n var result = true;\n var called = 0;\n\n //By below way, we could verify that k would be setted as 0, 1, ..., length - 1 in order, and each value will be setted one time.\n function callbackfn(preVal, curVal, idx, o) {\n //Each position should be visited one time, which means k is accessed one time during iterations.\n called++;\n if (typeof kIndex[idx] === \"undefined\") {\n //when current position is visited, its next index should has been visited.\n if (idx !== arr.length - 1 && typeof kIndex[idx + 1] === \"undefined\") {\n result = false;\n }\n kIndex[idx] = 1;\n } else {\n result = false;\n }\n }\n\n arr.reduceRight(callbackfn, 1);\n return result && called === 4;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight))"
+ },
+ {
+ "id": "15.4.4.22-9-c-ii-7",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-7.js",
+ "description": "Array.prototype.reduceRight - unhandled exceptions happened in callbackfn terminate iteration",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n\n function callbackfn(prevVal, curVal, idx, obj) {\n if (idx < 10) {\n accessed = true;\n }\n if (idx === 10) {\n throw new Error(\"Exception occurred in callbackfn\");\n }\n }\n\n var obj = { 0: 11, 4: 10, 10: 8, length: 20 };\n\n try {\n Array.prototype.reduceRight.call(obj, callbackfn, 1);\n return false;\n } catch (ex) {\n return !accessed;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight))"
+ },
+ {
+ "id": "15.4.4.22-9-c-ii-8",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-8.js",
+ "description": "Array.prototype.reduceRight - element changed by callbackfn on previous iterations is observed",
+ "test": "assertTrue((function testcase() {\n\n var accessed = false;\n var obj = { 0: 11, 1: 12, length: 2 };\n function callbackfn(prevVal, curVal, idx, obj) {\n accessed = true;\n if (idx === 1) {\n obj[idx - 1] = 8;\n }\n return curVal > 10;\n }\n\n return Array.prototype.reduceRight.call(obj, callbackfn, 1) === false && accessed;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight))"
+ },
+ {
+ "id": "15.4.4.22-9-c-ii-9",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-9.js",
+ "description": "Array.prototype.reduceRight - callbackfn is called with 0 formal parameter",
+ "test": "assertTrue((function testcase() {\n\n var called = 0;\n\n function callbackfn() {\n called++;\n return true;\n }\n\n return [11, 12].reduceRight(callbackfn, 11) === true && 2 === called;\n }).call(this));\n",
+ "precondition": "(fnExists(Array.prototype.reduceRight))"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.4.4.2_Array_prototype_toString.json b/website/resources/scripts/testcases2/15.4.4.2_Array_prototype_toString.json
new file mode 100644
index 000000000..c4f4331a9
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.4.4.2_Array_prototype_toString.json
@@ -0,0 +1,90 @@
+{
+ "testCollection": {
+ "name": "15.4.4.2_Array_prototype_toString",
+ "numTests": 13,
+ "tests": [
+ {
+ "section": "15.4.4.2",
+ "description": "If Result(2) is zero, return the empty string",
+ "test": "//CHECK#1\nvar x = new Array();\nif (x.toString() !== x.join()) {\n $ERROR('#1.1: x = new Array(); x.toString() === x.join(). Actual: ' + (x.toString()));\n} else {\n if (x.toString() !== \"\") {\n $ERROR('#1.2: x = new Array(); x.toString() === \"\". Actual: ' + (x.toString()));\n } \n} \n\n//CHECK#2\nx = [];\nx[0] = 1;\nx.length = 0;\nif (x.toString() !== x.join()) {\n $ERROR('#2.1: x = []; x[0] = 1; x.length = 0; x.toString() === x.join(). Actual: ' + (x.toString()));\n} else {\n if (x.toString() !== \"\") {\n $ERROR('#2.2: x = []; x[0] = 1; x.length = 0; x.toString() === \"\". Actual: ' + (x.toString()));\n } \n} \n",
+ "id": "S15.4.4.2_A1_T1"
+ },
+ {
+ "section": "15.4.4.2",
+ "description": "The elements of the array are converted to strings, and these strings are\nthen concatenated, separated by occurrences of the separator. If no separator is provided,\na single comma is used as the separator",
+ "test": "//CHECK#1\nvar x = new Array(0,1,2,3);\nif (x.toString() !== x.join()) {\n $ERROR('#1.1: x = new Array(0,1,2,3); x.toString() === x.join(). Actual: ' + (x.toString()));\n} else {\n if (x.toString() !== \"0,1,2,3\") {\n $ERROR('#1.2: x = new Array(0,1,2,3); x.toString() === \"0,1,2,3\". Actual: ' + (x.toString()));\n }\n}\n\n//CHECK#2\nx = [];\nx[0] = 0;\nx[3] = 3;\nif (x.toString() !== x.join()) {\n $ERROR('#2.1: x = []; x[0] = 0; x[3] = 3; x.toString() === x.join(). Actual: ' + (x.toString()));\n} else {\n if (x.toString() !== \"0,,,3\") {\n $ERROR('#2.2: x = []; x[0] = 0; x[3] = 3; x.toString() === \"0,,,3\". Actual: ' + (x.toString()));\n }\n}\n\n//CHECK#3\nx = Array(undefined,1,null,3);\nif (x.toString() !== x.join()) {\n $ERROR('#3.1: x = Array(undefined,1,null,3); x.toString() === x.join(). Actual: ' + (x.toString()));\n} else {\n if (x.toString() !== \",1,,3\") {\n $ERROR('#3.2: x = Array(undefined,1,null,3); x.toString() === \",1,,3\". Actual: ' + (x.toString()));\n }\n}\n\n//CHECK#4\nx = [];\nx[0] = 0;\nif (x.toString() !== x.join()) {\n $ERROR('#4.1: x = []; x[0] = 0; x.toString() === x.join(). Actual: ' + (x.toString()));\n} else {\n if (x.toString() !== \"0\") {\n $ERROR('#4.2: x = []; x[0] = 0; x.toString() === \"0\". Actual: ' + (x.toString()));\n }\n}\n",
+ "id": "S15.4.4.2_A1_T2"
+ },
+ {
+ "section": "15.4.4.2",
+ "description": "Operator use ToString from array arguments",
+ "test": "//CHECK#0\nvar x = new Array(\"\",\"\",\"\");\nif (x.toString() !== x.join()) {\n $ERROR('#0.1: var x = new Array(\"\",\"\",\"\"); x.toString() === x.join(). Actual: ' + (x.toString()));\n} else {\n if (x.toString() !== \",,\") {\n $ERROR('#0.2: var x = new Array(\"\",\"\",\"\"); x.toString() === \",,\". Actual: ' + (x.toString()));\n }\n}\n\n//CHECK#1\nvar x = new Array(\"\\\\\",\"\\\\\",\"\\\\\");\nif (x.toString() !== x.join()) {\n $ERROR('#1.1: var x = new Array(\"\\\\\",\"\\\\\",\"\\\\\"); x.toString() === x.join(). Actual: ' + (x.toString()));\n} else {\n if (x.toString() !== \"\\\\,\\\\,\\\\\") {\n $ERROR('#1.2: var x = new Array(\"\\\\\",\"\\\\\",\"\\\\\"); x.toString() === \"\\\\,\\\\,\\\\\". Actual: ' + (x.toString()));\n } \n}\n\n//CHECK#2\nvar x = new Array(\"&\", \"&\", \"&\");\nif (x.toString() !== x.join()) {\n $ERROR('#2.1: var x = new Array(\"&\", \"&\", \"&\"); x.toString() === x.join(). Actual: ' + (x.toString()));\n} else {\n if (x.toString() !== \"&,&,&\") {\n $ERROR('#2.2: var x = new Array(\"&\", \"&\", \"&\"); x.toString() === \"&,&,&\". Actual: ' + (x.toString()));\n }\n}\n\n//CHECK#3\nvar x = new Array(true,true,true);\nif (x.toString() !== x.join()) {\n $ERROR('#3.1: var x = new Array(true,true,true); x.toString(true,true,true) === x.join(). Actual: ' + (x.toString(true,true,true)));\n} else {\n if (x.toString() !== \"true,true,true\") {\n $ERROR('#3.2: var x = new Array(true,true,true); x.toString(true,true,true) === \"true,true,true\". Actual: ' + (x.toString(true,true,true)));\n }\n}\n\n//CHECK#4\nvar x = new Array(null,null,null);\nif (x.toString() !== x.join()) {\n $ERROR('#4.1: var x = new Array(null,null,null); x.toString(null,null,null) === x.join(). Actual: ' + (x.toString(null,null,null)));\n} else {\n if (x.toString() !== \",,\") {\n $ERROR('#4.2: var x = new Array(null,null,null); x.toString(null,null,null) === \",,\". Actual: ' + (x.toString(null,null,null)));\n }\n}\n\n//CHECK#5\nvar x = new Array(undefined,undefined,undefined);\nif (x.toString() !== x.join()) {\n $ERROR('#5.1: var x = new Array(undefined,undefined,undefined); x.toString(undefined,undefined,undefined) === x.join(). Actual: ' + (x.toString(undefined,undefined,undefined)));\n} else {\n if (x.toString() !== \",,\") {\n $ERROR('#5.2: var x = new Array(undefined,undefined,undefined); x.toString(undefined,undefined,undefined) === \",,\". Actual: ' + (x.toString(undefined,undefined,undefined)));\n }\n}\n\n//CHECK#6\nvar x = new Array(Infinity,Infinity,Infinity);\nif (x.toString() !== x.join()) {\n $ERROR('#6.1: var x = new Array(Infinity,Infinity,Infinity); x.toString(Infinity,Infinity,Infinity) === x.join(). Actual: ' + (x.toString(Infinity,Infinity,Infinity)));\n} else {\n if (x.toString() !== \"Infinity,Infinity,Infinity\") {\n $ERROR('#6.2: var x = new Array(Infinity,Infinity,Infinity); x.toString(Infinity,Infinity,Infinity) === \"Infinity,Infinity,Infinity\". Actual: ' + (x.toString(Infinity,Infinity,Infinity)));\n }\n}\n\n//CHECK#7\nvar x = new Array(NaN,NaN,NaN);\nif (x.toString() !== x.join()) {\n $ERROR('#7.1: var x = new Array(NaN,NaN,NaN); x.toString(NaN,NaN,NaN) === x.join(). Actual: ' + (x.toString(NaN,NaN,NaN)));\n} else {\n if (x.toString() !== \"NaN,NaN,NaN\") {\n $ERROR('#7.2: var x = new Array(NaN,NaN,NaN); x.toString(NaN,NaN,NaN) === \"NaN,NaN,NaN\". Actual: ' + (x.toString(NaN,NaN,NaN)));\n }\n} \n",
+ "id": "S15.4.4.2_A1_T3"
+ },
+ {
+ "section": "15.4.4.2",
+ "description": "If Type(value) is Object, evaluate ToPrimitive(value, String)",
+ "test": "//CHECK#1\nvar object = {valueOf: function() {return \"+\"}};\nvar x = new Array(object);\nif (x.toString() !== x.join()) {\n $ERROR('#1.1: var object = {valueOf: function() {return \"+\"}} var x = new Array(object); x.toString() === x.join(). Actual: ' + (x.toString()));\n} else {\n if (x.toString() !== \"[object Object]\") {\n $ERROR('#1.2: var object = {valueOf: function() {return \"+\"}} var x = new Array(object); x.toString() === \"[object Object]\". Actual: ' + (x.toString()));\n }\n}\n\n//CHECK#2\nvar object = {valueOf: function() {return \"+\"}, toString: function() {return \"*\"}};\nvar x = new Array(object);\nif (x.toString() !== x.join()) {\n $ERROR('#2.1: var object = {valueOf: function() {return \"+\"}, toString: function() {return x.join()}} var x = new Array(object); x.toString() === \"*\". Actual: ' + (x.toString()));\n} else {\n if (x.toString() !== \"*\") {\n $ERROR('#2.2: var object = {valueOf: function() {return \"+\"}, toString: function() {return \"*\"}} var x = new Array(object); x.toString() === \"*\". Actual: ' + (x.toString()));\n } \n} \n\n//CHECK#3\nvar object = {valueOf: function() {return \"+\"}, toString: function() {return {}}};\nvar x = new Array(object);\nif (x.toString() !== x.join()) {\n $ERROR('#3.1: var object = {valueOf: function() {return x.join()}, toString: function() {return {}}} var x = new Array(object); x.toString() === \"+\". Actual: ' + (x.toString()));\n} else {\n if (x.toString() !== \"+\") {\n $ERROR('#3.2: var object = {valueOf: function() {return \"+\"}, toString: function() {return {}}} var x = new Array(object); x.toString() === \"+\". Actual: ' + (x.toString()));\n }\n}\n\n//CHECK#4\ntry {\n var object = {valueOf: function() {throw \"error\"}, toString: function() {return \"*\"}};\n var x = new Array(object);\n if (x.toString() !== x.join()) {\n $ERROR('#4.1: var object = {valueOf: function() {throw \"error\"}, toString: function() {return x.join()}} var x = new Array(object); x.toString() === \"*\". Actual: ' + (x.toString()));\n } else {\n if (x.toString() !== \"*\") {\n $ERROR('#4.2: var object = {valueOf: function() {throw \"error\"}, toString: function() {return \"*\"}} var x = new Array(object); x.toString() === \"*\". Actual: ' + (x.toString()));\n }\n }\n}\ncatch (e) {\n if (e === \"error\") {\n $ERROR('#4.3: var object = {valueOf: function() {throw \"error\"}, toString: function() {return \"*\"}} var x = new Array(object); x.toString() not throw \"error\"');\n } else {\n $ERROR('#4.4: var object = {valueOf: function() {throw \"error\"}, toString: function() {return \"*\"}} var x = new Array(object); x.toString() not throw Error. Actual: ' + (e));\n }\n}\n\n//CHECK#5\nvar object = {toString: function() {return \"*\"}};\nvar x = new Array(object);\nif (x.toString() !== x.join()) {\n $ERROR('#5.1: var object = {toString: function() {return x.join()}} var x = new Array(object); x.toString() === \"*\". Actual: ' + (x.toString()));\n} else {\n if (x.toString() !== \"*\") {\n $ERROR('#5.2: var object = {toString: function() {return \"*\"}} var x = new Array(object); x.toString() === \"*\". Actual: ' + (x.toString()));\n }\n}\n\n//CHECK#6\nvar object = {valueOf: function() {return {}}, toString: function() {return \"*\"}}\nvar x = new Array(object);\nif (x.toString() !== x.join()) {\n $ERROR('#6.1: var object = {valueOf: function() {return {}}, toString: function() {return x.join()}} var x = new Array(object); x.toString() === \"*\". Actual: ' + (x.toString()));\n} else {\n if (x.toString() !== \"*\") {\n $ERROR('#6.2: var object = {valueOf: function() {return {}}, toString: function() {return \"*\"}} var x = new Array(object); x.toString() === \"*\". Actual: ' + (x.toString()));\n }\n}\n\n//CHECK#7\ntry {\n var object = {valueOf: function() {return \"+\"}, toString: function() {throw \"error\"}};\n var x = new Array(object);\n x.toString();\n $ERROR('#7.1: var object = {valueOf: function() {return \"+\"}, toString: function() {throw \"error\"}} var x = new Array(object); x.toString() throw \"error\". Actual: ' + (x.toString()));\n} \ncatch (e) {\n if (e !== \"error\") {\n $ERROR('#7.2: var object = {valueOf: function() {return \"+\"}, toString: function() {throw \"error\"}} var x = new Array(object); x.toString() throw \"error\". Actual: ' + (e));\n } \n}\n\n//CHECK#8\ntry {\n var object = {valueOf: function() {return {}}, toString: function() {return {}}};\n var x = new Array(object);\n x.toString();\n $ERROR('#8.1: var object = {valueOf: function() {return {}}, toString: function() {return {}}} var x = new Array(object); x.toString() throw TypeError. Actual: ' + (x.toString()));\n} \ncatch (e) {\n if ((e instanceof TypeError) !== true) {\n $ERROR('#8.2: var object = {valueOf: function() {return {}}, toString: function() {return {}}} var x = new Array(object); x.toString() throw TypeError. Actual: ' + (e));\n } \n}\n",
+ "id": "S15.4.4.2_A1_T4"
+ },
+ {
+ "section": "15.4.4.2",
+ "description": "{}.toString = Array.prototype.toString",
+ "test": "var obj = {};\nobj.toString = Array.prototype.toString;\n\n//CHECK#1\ntry {\n obj.toString();\n $ERROR('#1.1: var obj = {}; obj.toString = Array.prototype.toString; obj.toString() throw TypeError. Actual: ' + (obj.toString()));\n} catch(e) {\n if ((e instanceof TypeError) !== true) {\n $ERROR('#1.2: var obj = {}; obj.toString = Array.prototype.toString; obj.toString() throw TypeError. Actual: ' + (e));\n }\n}\n\nobj[0] = 1;\nobj.length = 1;\n\n//CHECK#2\ntry {\n obj.toString();\n $ERROR('#2.1: var obj = {}; obj.toString = Array.prototype.toString; obj[0] = 1; obj.length = 1; obj.toString() throw TypeError. Actual: ' + (obj.toString()));\n} catch(e) {\n if ((e instanceof TypeError) !== true) {\n $ERROR('#2.2: var obj = {}; obj.toString = Array.prototype.toString; obj[0] = 1; obj.length = 1; obj.toString() throw TypeError. Actual: ' + (e));\n }\n}\n",
+ "id": "S15.4.4.2_A2_T1"
+ },
+ {
+ "section": "15.4.4.2, 8.6.2.1",
+ "description": "[[Prototype]] of Array instance is Array.prototype",
+ "test": "//CHECK#1\nArray.prototype[1] = 1;\nvar x = [0];\nx.length = 2;\nif (x.toString() !== \"0,1\") { \n $ERROR('#1: Array.prototype[1] = 1; x = [0]; x.length = 2; x.toString() === \"0,1\". Actual: ' + (x.toString())); \n}\n",
+ "id": "S15.4.4.2_A3_T1"
+ },
+ {
+ "section": "15.4.4.2, 15.2.4.7, 12.6.4",
+ "description": "Checking use propertyIsEnumerable, for-in",
+ "test": "//CHECK#1\nif (Array.prototype.toString.propertyIsEnumerable('length') !== false) {\n $ERROR('#1: Array.prototype.toString.propertyIsEnumerable(\\'length\\') === false. Actual: ' + (Array.prototype.toString.propertyIsEnumerable('length')));\n}\n\n//CHECK#2\nvar result = true;\nfor (var p in Array.toString){\n if (p === \"length\") {\n result = false;\n } \n}\n\nif (result !== true) {\n $ERROR('#2: result = true; for (p in Array.toString) { if (p === \"length\") result = false; } result === true;');\n}\n\n",
+ "id": "S15.4.4.2_A4.1"
+ },
+ {
+ "section": "15.4.4.2, 15.2.4.5, 11.4.1",
+ "description": "Checking use hasOwnProperty, delete",
+ "strict_mode_negative": "",
+ "test": "//CHECK#1\nif (Array.prototype.toString.hasOwnProperty('length') !== true) {\n $FAIL('#1: Array.prototype.toString.hasOwnProperty(\\'length\\') === true. Actual: ' + (Array.prototype.toString.hasOwnProperty('length')));\n}\n\ndelete Array.prototype.toString.length;\n\n//CHECK#2\nif (Array.prototype.toString.hasOwnProperty('length') !== true) {\n $ERROR('#2: delete Array.prototype.toString.length; Array.prototype.toString.hasOwnProperty(\\'length\\') === true. Actual: ' + (Array.prototype.toString.hasOwnProperty('length')));\n}\n\n//CHECK#3\nif (Array.prototype.toString.length === undefined) {\n $ERROR('#3: delete Array.prototype.toString.length; Array.prototype.toString.length !== undefined');\n}\n\n\n",
+ "id": "S15.4.4.2_A4.2",
+ "strict_only": ""
+ },
+ {
+ "section": "15.4.4.2",
+ "description": "Checking if varying the length property fails",
+ "strict_mode_negative": "",
+ "test": "//CHECK#1\nvar x = Array.prototype.toString.length;\nArray.prototype.toString.length = Infinity;\nif (Array.prototype.toString.length !== x) {\n $ERROR('#1: x = Array.prototype.toString.length; Array.prototype.toString.length = Infinity; Array.prototype.toString.length === x. Actual: ' + (Array.prototype.toString.length));\n}\n\n",
+ "id": "S15.4.4.2_A4.3",
+ "strict_only": ""
+ },
+ {
+ "section": "15.4.4.2",
+ "description": "toString.length === 1",
+ "test": "//CHECK#1\nif (Array.prototype.toString.length !== 0) {\n $ERROR('#1: Array.prototype.toString.length === 0. Actual: ' + (Array.prototype.toString.length));\n}\n\n",
+ "id": "S15.4.4.2_A4.4"
+ },
+ {
+ "section": "15.4.4.2, 15.2.4.7, 12.6.4",
+ "description": "Checking use propertyIsEnumerable, for-in",
+ "test": "//CHECK#1\nif (Array.propertyIsEnumerable('toString') !== false) {\n $ERROR('#1: Array.propertyIsEnumerable(\\'toString\\') === false. Actual: ' + (Array.propertyIsEnumerable('toString')));\n}\n\n//CHECK#2\nvar result = true;\nfor (var p in Array){\n if (p === \"toString\") {\n result = false;\n } \n}\n\nif (result !== true) {\n $ERROR('#2: result = true; for (p in Array) { if (p === \"toString\") result = false; } result === true;');\n}\n\n",
+ "id": "S15.4.4.2_A4.5"
+ },
+ {
+ "section": "15.4.4.2",
+ "description": "Checking Array.prototype.toString.prototype",
+ "test": "//CHECK#1\nif (Array.prototype.toString.prototype !== undefined) {\n $ERROR('#1: Array.prototype.toString.prototype === undefined. Actual: ' + (Array.prototype.toString.prototype));\n}\n",
+ "id": "S15.4.4.2_A4.6"
+ },
+ {
+ "section": "15.4.4.2, 11.2.2",
+ "description": "If property does not implement the internal [[Construct]] method, throw a TypeError exception",
+ "test": "//CHECK#1\n\ntry {\n new Array.prototype.toString();\n $ERROR('#1.1: new Array.prototype.toString() throw TypeError. Actual: ' + (new Array.prototype.toString()));\n} catch (e) {\n if ((e instanceof TypeError) !== true) {\n $ERROR('#1.2: new Array.prototype.toString() throw TypeError. Actual: ' + (e));\n }\n}\n",
+ "id": "S15.4.4.2_A4.7"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.4.4.3_Array_prototype_toLocaleString.json b/website/resources/scripts/testcases2/15.4.4.3_Array_prototype_toLocaleString.json
new file mode 100644
index 000000000..51cdf09e1
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.4.4.3_Array_prototype_toLocaleString.json
@@ -0,0 +1,70 @@
+{
+ "testCollection": {
+ "name": "15.4.4.3_Array_prototype_toLocaleString",
+ "numTests": 10,
+ "tests": [
+ {
+ "section": "15.4.4.3",
+ "description": "it is the function that should be invoked",
+ "test": "var n = 0;\nvar obj = {toLocaleString: function() {n++}};\nvar arr = [undefined, obj, null, obj, obj];\narr.toLocaleString();\n\n//CHECK#1\nif (n !== 3) {\n $ERROR('#1: var n = 0; var obj = {toLocaleString: function() {n++}}; var arr = [undefined, obj, null, obj, obj]; arr.toLocaleString(); n === 3. Actual: ' + (n));\n} \n",
+ "id": "S15.4.4.3_A1_T1"
+ },
+ {
+ "section": "15.4.4.3",
+ "description": "{}.toLocaleString = Array.prototype.toLocaleString",
+ "test": "var obj = {};\nobj.toLocaleString = Array.prototype.toLocaleString;\n\n//CHECK#1\ntry {\n obj.toLocaleString();\n $ERROR('#1.1: var obj = {}; obj.toLocaleString = Array.prototype.toLocaleString; obj.toLocaleString() throw TypeError. Actual: ' + (obj.toLocaleString()));\n} catch(e) {\n if ((e instanceof TypeError) !== true) {\n $ERROR('#1.2: var obj = {}; obj.toLocaleString = Array.prototype.toLocaleString; obj.toLocaleString() throw TypeError. Actual: ' + (e));\n }\n}\n\nobj[0] = 1;\nobj.length = 1;\n\n//CHECK#2\ntry {\n obj.toLocaleString();\n $ERROR('#2.1: var obj = {}; obj.toLocaleString = Array.prototype.toLocaleString; obj[0] = 1; obj.length = 1; obj.toLocaleString() throw TypeError. Actual: ' + (obj.toLocaleString()));\n} catch(e) {\n if ((e instanceof TypeError) !== true) {\n $ERROR('#2.2: var obj = {}; obj.toLocaleString = Array.prototype.toLocaleString; obj[0] = 1; obj.length = 1; obj.toLocaleString() throw TypeError. Actual: ' + (e));\n }\n}\n",
+ "id": "S15.4.4.3_A2_T1"
+ },
+ {
+ "section": "15.4.4.3, 8.6.2.1",
+ "description": "[[Prototype]] of Array instance is Array.prototype",
+ "test": "//CHECK#1\nvar n = 0;\nvar obj = {toLocaleString: function() {n++}};\nArray.prototype[1] = obj;\nvar x = [obj];\nx.length = 2;\nx.toLocaleString();\nif (n !== 2) { \n $ERROR('#1: var n = 0; var obj = {toLocaleString: function() {n++}}; Array.prototype[1] = obj; x = [obj]; x.length = 2; x.toLocaleString(); n === 2. Actual: ' + (n)); \n}\n",
+ "id": "S15.4.4.3_A3_T1"
+ },
+ {
+ "section": "15.4.4.3, 15.2.4.7, 12.6.4",
+ "description": "Checking use propertyIsEnumerable, for-in",
+ "test": "//CHECK#1\nif (Array.prototype.toLocaleString.propertyIsEnumerable('length') !== false) {\n $ERROR('#1: Array.prototype.toLocaleString.propertyIsEnumerable(\\'length\\') === false. Actual: ' + (Array.prototype.toLocaleString.propertyIsEnumerable('length')));\n}\n\n//CHECK#2\nvar result = true;\nfor (var p in Array.toLocaleString){\n if (p === \"length\") {\n result = false;\n } \n}\n\nif (result !== true) {\n $ERROR('#2: result = true; for (p in Array.toLocaleString) { if (p === \"length\") result = false; } result === true;');\n}\n\n",
+ "id": "S15.4.4.3_A4.1"
+ },
+ {
+ "section": "15.4.4.3, 15.2.4.5, 11.4.1",
+ "description": "Checking use hasOwnProperty, delete",
+ "test": "//CHECK#1\nif (Array.prototype.toLocaleString.hasOwnProperty('length') !== true) {\n $FAIL('#1: Array.prototype.toLocaleString.hasOwnProperty(\\'length\\') === true. Actual: ' + (Array.prototype.toLocaleString.hasOwnProperty('length')));\n}\n\ndelete Array.prototype.toLocaleString.length;\n\n//CHECK#2\nif (Array.prototype.toLocaleString.hasOwnProperty('length') !== true) {\n $ERROR('#2: delete Array.prototype.toLocaleString.length; Array.prototype.toLocaleString.hasOwnProperty(\\'length\\') === true. Actual: ' + (Array.prototype.toLocaleString.hasOwnProperty('length')));\n}\n\n//CHECK#3\nif (Array.prototype.toLocaleString.length === undefined) {\n $ERROR('#3: delete Array.prototype.toLocaleString.length; Array.prototype.toLocaleString.length !== undefined');\n}\n\n\n",
+ "id": "S15.4.4.3_A4.2"
+ },
+ {
+ "section": "15.4.4.3",
+ "description": "Checking if varying the length property fails",
+ "strict_mode_negative": "",
+ "test": "//CHECK#1\nvar x = Array.prototype.toLocaleString.length;\nArray.prototype.toLocaleString.length = Infinity;\nif (Array.prototype.toLocaleString.length !== x) {\n $ERROR('#1: x = Array.prototype.toLocaleString.length; Array.prototype.toLocaleString.length = Infinity; Array.prototype.toLocaleString.length === x. Actual: ' + (Array.prototype.toLocaleString.length));\n}\n\n",
+ "id": "S15.4.4.3_A4.3",
+ "strict_only": ""
+ },
+ {
+ "section": "15.4.4.3",
+ "description": "toLocaleString.length === 1",
+ "test": "//CHECK#1\nif (Array.prototype.toLocaleString.length !== 0) {\n $ERROR('#1: Array.prototype.toLocaleString.length === 0. Actual: ' + (Array.prototype.toLocaleString.length));\n}\n\n",
+ "id": "S15.4.4.3_A4.4"
+ },
+ {
+ "section": "15.4.4.3, 15.2.4.7, 12.6.4",
+ "description": "Checking use propertyIsEnumerable, for-in",
+ "test": "//CHECK#1\nif (Array.propertyIsEnumerable('toLocaleString') !== false) {\n $ERROR('#1: Array.propertyIsEnumerable(\\'toLocaleString\\') === false. Actual: ' + (Array.propertyIsEnumerable('toLocaleString')));\n}\n\n//CHECK#2\nvar result = true;\nfor (var p in Array){\n if (p === \"toLocaleString\") {\n result = false;\n } \n}\n\nif (result !== true) {\n $ERROR('#2: result = true; for (p in Array) { if (p === \"toLocaleString\") result = false; } result === true;');\n}\n\n",
+ "id": "S15.4.4.3_A4.5"
+ },
+ {
+ "section": "15.4.4.3",
+ "description": "Checking Array.prototype.toLocaleString.prototype",
+ "test": "//CHECK#1\nif (Array.prototype.toLocaleString.prototype !== undefined) {\n $ERROR('#1: Array.prototype.toLocaleString.prototype === undefined. Actual: ' + (Array.prototype.toLocaleString.prototype));\n}\n",
+ "id": "S15.4.4.3_A4.6"
+ },
+ {
+ "section": "15.4.4.3, 11.2.2",
+ "description": "If property does not implement the internal [[Construct]] method, throw a TypeError exception",
+ "test": "//CHECK#1\n\ntry {\n new Array.prototype.toLocaleString();\n $ERROR('#1.1: new Array.prototype.toLocaleString() throw TypeError. Actual: ' + (new Array.prototype.toLocaleString()));\n} catch (e) {\n if ((e instanceof TypeError) !== true) {\n $ERROR('#1.2: new Array.prototype.toLocaleString() throw TypeError. Actual: ' + (e));\n }\n}\n",
+ "id": "S15.4.4.3_A4.7"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.4.4.4.json b/website/resources/scripts/testcases2/15.4.4.4.json
new file mode 100644
index 000000000..3e9069912
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.4.4.4.json
@@ -0,0 +1,22 @@
+{
+ "testCollection": {
+ "name": "15.4.4.4",
+ "numTests": 2,
+ "tests": [
+ {
+ "id": "15.4.4.4-5-b-iii-3-b-1",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.4/15.4.4.4-5-b-iii-3-b-1.js",
+ "description": "Array.prototype.concat will concat an Array when index property (read-only) exists in Array.prototype (Step 5.b.iii.3.b)",
+ "test": "assertTrue((function testcase() {\n try {\n Object.defineProperty(Array.prototype, \"0\", {\n value: 100,\n writable: false,\n configurable: true\n });\n\n var oldArr = [101];\n\n var newArr = Array.prototype.concat.call(oldArr);\n\n var verifyValue = false;\n verifyValue = newArr[0] === 101;\n\n var verifyEnumerable = false;\n for (var p in newArr) {\n if (p === \"0\" && newArr.hasOwnProperty(\"0\")) {\n verifyEnumerable = true;\n }\n }\n\n var verifyWritable = false;\n newArr[0] = 12;\n verifyWritable = newArr[0] === 12;\n\n var verifyConfigurable = false;\n delete newArr[0];\n verifyConfigurable = newArr.hasOwnProperty(\"0\");\n\n return verifyValue && !verifyConfigurable && verifyEnumerable && verifyWritable;\n } finally {\n delete Array.prototype[0];\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ },
+ {
+ "id": "15.4.4.4-5-c-i-1",
+ "path": "TestCases/chapter15/15.4/15.4.4/15.4.4.4/15.4.4.4-5-c-i-1.js",
+ "description": "Array.prototype.concat will concat an Array when index property (read-only) exists in Array.prototype (Step 5.c.i)",
+ "test": "assertTrue((function testcase() {\n try {\n Object.defineProperty(Array.prototype, \"0\", {\n value: 100,\n writable: false,\n configurable: true\n });\n\n var newArr = Array.prototype.concat.call(101);\n\n var hasProperty = newArr.hasOwnProperty(\"0\");\n\n\t var instanceOfVerify = typeof newArr[0]===\"number\";\n \n var verifyValue = false;\n verifyValue = newArr[0] === 101;\n\n var verifyEnumerable = false;\n for (var p in newArr) {\n if (p === \"0\" && newArr.hasOwnProperty(\"0\")) {\n verifyEnumerable = true;\n }\n }\n\n var verifyWritable = false;\n newArr[0] = 12;\n verifyWritable = newArr[0] === 12;\n\n var verifyConfigurable = false;\n delete newArr[0];\n verifyConfigurable = newArr.hasOwnProperty(\"0\");\n\n return hasProperty && instanceOfVerify && verifyValue && !verifyConfigurable && verifyEnumerable && verifyWritable;\n\t\n\n } finally {\n delete Array.prototype[0];\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.4.4.4_Array_prototype_concat.json b/website/resources/scripts/testcases2/15.4.4.4_Array_prototype_concat.json
new file mode 100644
index 000000000..bdac09e43
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.4.4.4_Array_prototype_concat.json
@@ -0,0 +1,96 @@
+{
+ "testCollection": {
+ "name": "15.4.4.4_Array_prototype_concat",
+ "numTests": 14,
+ "tests": [
+ {
+ "section": "15.4.4.4",
+ "description": "Checking this algorithm, items are Array object",
+ "test": "var x = new Array();\nvar y = new Array(0,1);\nvar z = new Array(2,3,4);\nvar arr = x.concat(y,z);\n\n//CHECK#0\narr.getClass = Object.prototype.toString;\nif (arr.getClass() !== \"[object \" + \"Array\" + \"]\") {\n $ERROR('#0: var x = new Array(); var y = new Array(0,1); var z = new Array(2,3,4); var arr = x.concat(y,z); arr is Array object. Actual: ' + (arr.getClass()));\n}\n\n//CHECK#1\nif (arr[0] !== 0) {\n $ERROR('#1: var x = new Array(); var y = new Array(0,1); var z = new Array(2,3,4); var arr = x.concat(y,z); arr[0] === 0. Actual: ' + (arr[0]));\n}\n\n//CHECK#2\nif (arr[1] !== 1) {\n $ERROR('#2: var x = new Array(); var y = new Array(0,1); var z = new Array(2,3,4); var arr = x.concat(y,z); arr[1] === 1. Actual: ' + (arr[1]));\n}\n\n//CHECK#3\nif (arr[2] !== 2) {\n $ERROR('#3: var x = new Array(); var y = new Array(0,1); var z = new Array(2,3,4); var arr = x.concat(y,z); arr[2] === 2. Actual: ' + (arr[2]));\n}\n\n//CHECK#4\nif (arr[3] !== 3) {\n $ERROR('#4: var x = new Array(); var y = new Array(0,1); var z = new Array(2,3,4); var arr = x.concat(y,z); arr[3] === 3. Actual: ' + (arr[3]));\n}\n\n//CHECK#5\nif (arr[4] !== 4) {\n $ERROR('#5: var x = new Array(); var y = new Array(0,1); var z = new Array(2,3,4); var arr = x.concat(y,z); arr[4] === 4. Actual: ' + (arr[4]));\n}\n\n//CHECK#6\nif (arr.length !== 5) {\n $ERROR('#6: var x = new Array(); var y = new Array(0,1); var z = new Array(2,3,4); var arr = x.concat(y,z); arr.length === 5. Actual: ' + (arr.length));\n} \n",
+ "id": "S15.4.4.4_A1_T1"
+ },
+ {
+ "section": "15.4.4.4",
+ "description": "Checking this algorithm, items are objects and primitives",
+ "test": "var x = [0];\nvar y = new Object();\nvar z = new Array(1,2);\nvar arr = x.concat(y,z, -1, true, \"NaN\");\n\n//CHECK#0\narr.getClass = Object.prototype.toString;\nif (arr.getClass() !== \"[object \" + \"Array\" + \"]\") {\n $ERROR('#0: var x = [0]; var y = new Object(); var z = new Array(1,2); var arr = x.concat(y,z, -1, true, \"NaN\"); arr is Array object. Actual: ' + (arr.getClass()));\n}\n\n//CHECK#1\nif (arr[0] !== 0) {\n $ERROR('#1: var x = [0]; var y = new Object(); var z = new Array(1,2); var arr = x.concat(y,z, -1, true, \"NaN\"); arr[0] === 0. Actual: ' + (arr[0]));\n}\n\n//CHECK#2\nif (arr[1] !== y) {\n $ERROR('#2: var x = [0]; var y = new Object(); var z = new Array(1,2); var arr = x.concat(y,z, -1, true, \"NaN\"); arr[1] === y. Actual: ' + (arr[1]));\n}\n\n//CHECK#3\nif (arr[2] !== 1) {\n $ERROR('#3: var x = [0]; var y = new Object(); var z = new Array(1,2); var arr = x.concat(y,z, -1, true, \"NaN\"); arr[2] === 1. Actual: ' + (arr[2]));\n}\n\n//CHECK#4\nif (arr[3] !== 2) {\n $ERROR('#4: var x = [0]; var y = new Object(); var z = new Array(1,2); var arr = x.concat(y,z, -1, true, \"NaN\"); arr[3] === 2. Actual: ' + (arr[3]));\n}\n\n//CHECK#5\nif (arr[4] !== -1) {\n $ERROR('#5: var x = [0]; var y = new Object(); var z = new Array(1,2); var arr = x.concat(y,z, -1, true, \"NaN\"); arr[4] === -1. Actual: ' + (arr[4]));\n}\n\n//CHECK#6\nif (arr[5] !== true) {\n $ERROR('#6: var x = [0]; var y = new Object(); var z = new Array(1,2); var arr = x.concat(y,z, -1, true, \"NaN\"); arr[5] === true. Actual: ' + (arr[5]));\n}\n\n//CHECK#7\nif (arr[6] !== \"NaN\") {\n $ERROR('#7: var x = [0]; var y = new Object(); var z = new Array(1,2); var arr = x.concat(y,z, -1, true, \"NaN\"); arr[6] === \"NaN\". Actual: ' + (arr[6]));\n}\n\n//CHECK#8\nif (arr.length !== 7) {\n $ERROR('#8: var x = [0]; var y = new Object(); var z = new Array(1,2); var arr = x.concat(y,z, -1, true, \"NaN\"); arr.length === 7. Actual: ' + (arr.length));\n} \n",
+ "id": "S15.4.4.4_A1_T2"
+ },
+ {
+ "section": "15.4.4.4",
+ "description": "Checking this algorithm with no items",
+ "test": "var x = [0,1];\nvar arr = x.concat();\n\n//CHECK#0\narr.getClass = Object.prototype.toString;\nif (arr.getClass() !== \"[object \" + \"Array\" + \"]\") {\n $ERROR('#0: var x = [0,1]; var arr = x.concat(); arr is Array object. Actual: ' + (arr.getClass()));\n}\n\n//CHECK#1\nif (arr[0] !== 0) {\n $ERROR('#1: var x = [0,1]; var arr = x.concat(); arr[0] === 0. Actual: ' + (arr[0]));\n}\n\n//CHECK#2\nif (arr[1] !== 1) {\n $ERROR('#2: var x = [0,1]; var arr = x.concat(); arr[1] === 1. Actual: ' + (arr[1]));\n}\n\n//CHECK#3\nif (arr.length !== 2) {\n $ERROR('#3: var x = [0,1]; var arr = x.concat(); arr.length === 2. Actual: ' + (arr.length));\n} \n\n//CHECK#4\nif (arr === x) {\n $ERROR('#4: var x = [0,1]; var arr = x.concat(); arr !== x');\n} \n",
+ "id": "S15.4.4.4_A1_T3"
+ },
+ {
+ "section": "15.4.4.4",
+ "description": "Checking this algorithm, items are [], [,]",
+ "test": "var x = [,1];\nvar arr = x.concat([], [,]);\n\n//CHECK#0\narr.getClass = Object.prototype.toString;\nif (arr.getClass() !== \"[object \" + \"Array\" + \"]\") {\n $ERROR('#0: var x = [,1]; var arr = x.concat([], [,]); arr is Array object. Actual: ' + (arr.getClass()));\n}\n\n//CHECK#1\nif (arr[0] !== undefined) {\n $ERROR('#1: var x = [,1]; var arr = x.concat([], [,]); arr[0] === undefined. Actual: ' + (arr[0]));\n}\n\n//CHECK#2\nif (arr[1] !== 1) {\n $ERROR('#2: var x = [,1]; var arr = x.concat([], [,]); arr[1] === 1. Actual: ' + (arr[1]));\n}\n\n//CHECK#2\nif (arr[2] !== undefined) {\n $ERROR('#2: var x = [,1]; var arr = x.concat([], [,]); arr[2] === undefined. Actual: ' + (arr[2]));\n}\n\n//CHECK#4\nif (arr.length !== 3) {\n $ERROR('#4: var x = [,1]; var arr = x.concat([], [,]); arr.length === 3. Actual: ' + (arr.length));\n} \n",
+ "id": "S15.4.4.4_A1_T4"
+ },
+ {
+ "section": "15.4.4.4",
+ "description": "Checking this for Object object, items are objects and primitives",
+ "test": "var x = {};\nx.concat = Array.prototype.concat;\nvar y = new Object();\nvar z = new Array(1,2);\nvar arr = x.concat(y,z, -1, true, \"NaN\");\n\n//CHECK#0\narr.getClass = Object.prototype.toString;\nif (arr.getClass() !== \"[object \" + \"Array\" + \"]\") {\n $ERROR('#0: var x = {}; x.concat = Array.prototype.concat; var y = new Object(); var z = new Array(1,2); var arr = x.concat(y,z, -1, true, \"NaN\"); arr is Array object. Actual: ' + (arr.getClass()));\n}\n\n//CHECK#1\nif (arr[0] !== x) {\n $ERROR('#1: var x = {}; x.concat = Array.prototype.concat; var y = new Object(); var z = new Array(1,2); var arr = x.concat(y,z, -1, true, \"NaN\"); arr[0] === x. Actual: ' + (arr[0]));\n}\n\n//CHECK#2\nif (arr[1] !== y) {\n $ERROR('#2: var x = {}; x.concat = Array.prototype.concat; var y = new Object(); var z = new Array(1,2); var arr = x.concat(y,z, -1, true, \"NaN\"); arr[1] === y. Actual: ' + (arr[1]));\n}\n\n//CHECK#3\nif (arr[2] !== 1) {\n $ERROR('#3: var x = {}; x.concat = Array.prototype.concat; var y = new Object(); var z = new Array(1,2); var arr = x.concat(y,z, -1, true, \"NaN\"); arr[2] === 1. Actual: ' + (arr[2]));\n}\n\n//CHECK#4\nif (arr[3] !== 2) {\n $ERROR('#4: var x = {}; x.concat = Array.prototype.concat; var y = new Object(); var z = new Array(1,2); var arr = x.concat(y,z, -1, true, \"NaN\"); arr[3] === 2. Actual: ' + (arr[3]));\n}\n\n//CHECK#5\nif (arr[4] !== -1) {\n $ERROR('#5: var x = {}; x.concat = Array.prototype.concat; var y = new Object(); var z = new Array(1,2); var arr = x.concat(y,z, -1, true, \"NaN\"); arr[4] === -1. Actual: ' + (arr[4]));\n}\n\n//CHECK#6\nif (arr[5] !== true) {\n $ERROR('#6: var x = {}; x.concat = Array.prototype.concat; var y = new Object(); var z = new Array(1,2); var arr = x.concat(y,z, -1, true, \"NaN\"); arr[5] === true. Actual: ' + (arr[5]));\n}\n\n//CHECK#7\nif (arr[6] !== \"NaN\") {\n $ERROR('#7: var x = {}; x.concat = Array.prototype.concat; var y = new Object(); var z = new Array(1,2); var arr = x.concat(y,z, -1, true, \"NaN\"); arr[6] === \"NaN\". Actual: ' + (arr[6]));\n}\n\n//CHECK#8\nif (arr.length !== 7) {\n $ERROR('#8: var x = {}; x.concat = Array.prototype.concat; var y = new Object(); var z = new Array(1,2); var arr = x.concat(y,z, -1, true, \"NaN\"); arr.length === 7. Actual: ' + (arr.length));\n} \n",
+ "id": "S15.4.4.4_A2_T1"
+ },
+ {
+ "section": "15.4.4.4",
+ "description": "Checking this for Object object with no items",
+ "test": "var x = {};\nx.concat = Array.prototype.concat;\nvar arr = x.concat();\n\n//CHECK#0\narr.getClass = Object.prototype.toString;\nif (arr.getClass() !== \"[object \" + \"Array\" + \"]\") {\n $ERROR('#0: var x = {}; x.concat = Array.prototype.concat; var arr = x.concat() arr is Array object. Actual: ' + (arr.getClass()));\n}\n\n//CHECK#1\nif (arr[0] !== x) {\n $ERROR('#1: var x = {}; x.concat = Array.prototype.concat; var arr = x.concat(); arr[0] === x. Actual: ' + (arr[0]));\n}\n\n//CHECK#2\nif (arr.length !== 1) {\n $ERROR('#2: var x = {}; x.concat = Array.prototype.concat; var arr = x.concat(); arr.length === 1. Actual: ' + (arr.length));\n} \n",
+ "id": "S15.4.4.4_A2_T2"
+ },
+ {
+ "section": "15.4.4.4, 8.6.2.1, 15.2.4.5",
+ "description": "[[Prototype]] of Array instance is Array.prototype, [[Prototype] of Array.prototype is Object.prototype",
+ "test": "Array.prototype[1] = 1;\nvar x = [0];\nx.length = 2;\nvar arr = x.concat();\n\n//CHECK#1\nif (arr[0] !== 0) { \n $ERROR('#1: Array.prototype[1] = 1; x = [0]; x.length = 2; var arr = x.concat(); arr[0] === 0. Actual: ' + (arr[0])); \n}\n\n//CHECK#2\nif (arr[1] !== 1) { \n $ERROR('#2: Array.prototype[1] = 1; x = [0]; x.length = 2; var arr = x.concat(); arr[1] === 1. Actual: ' + (arr[1])); \n}\n\n//CHECK#3\nif (arr.hasOwnProperty('1') !== true) { \n $ERROR('#3: Array.prototype[1] = 1; x = [0]; x.length = 2; var arr = x.concat(); arr.hasOwnProperty(\\'1\\') === true. Actual: ' + (arr.hasOwnProperty('1'))); \n}\n\nObject.prototype[1] = 1;\nObject.prototype.length = 2;\nObject.prototype.concat = Array.prototype.concat;\nx = {0:0};\nvar arr = x.concat();\n\n//CHECK#4\nif (arr[0] !== x) { \n $ERROR('#4: Object.prototype[1] = 1; Object.prototype.length = 2; Object.prototype.concat = Array.prototype.concat; x = {0:0}; var arr = x.concat(); arr[0] === x. Actual: ' + (arr[0])); \n}\n\n//CHECK#5\nif (arr[1] !== 1) { \n $ERROR('#5: Object.prototype[1] = 1; Object.prototype.length = 2; Object.prototype.concat = Array.prototype.concat; x = {0:0}; var arr = x.concat(); arr[1] === 1. Actual: ' + (arr[1])); \n}\n\n//CHECK#6\nif (arr.hasOwnProperty('1') !== false) { \n $ERROR('#6: Object.prototype[1] = 1; Object.prototype.length = 2; Object.prototype.concat = Array.prototype.concat; x = {0:0}; var arr = x.concat(); arr.hasOwnProperty(\\'1\\') === false. Actual: ' + (arr.hasOwnProperty('1'))); \n}\n",
+ "id": "S15.4.4.4_A3_T1"
+ },
+ {
+ "section": "15.4.4.4, 15.2.4.7, 12.6.4",
+ "description": "Checking use propertyIsEnumerable, for-in",
+ "test": "//CHECK#1\nif (Array.prototype.concat.propertyIsEnumerable('length') !== false) {\n $ERROR('#1: Array.prototype.concat.propertyIsEnumerable(\\'length\\') === false. Actual: ' + (Array.prototype.concat.propertyIsEnumerable('length')));\n}\n\n//CHECK#2\nvar result = true;\nfor (var p in Array.concat){\n if (p === \"length\") {\n result = false;\n } \n}\n\nif (result !== true) {\n $ERROR('#2: result = true; for (p in Array.concat) { if (p === \"length\") result = false; } result === true;');\n}\n\n",
+ "id": "S15.4.4.4_A4.1"
+ },
+ {
+ "section": "15.4.4.4, 15.2.4.5, 11.4.1",
+ "description": "Checking use hasOwnProperty, delete",
+ "strict_mode_negative": "",
+ "test": "//CHECK#1\nif (Array.prototype.concat.hasOwnProperty('length') !== true) {\n $FAIL('#1: Array.prototype.concat.hasOwnProperty(\\'length\\') === true. Actual: ' + (Array.prototype.concat.hasOwnProperty('length')));\n}\n\ndelete Array.prototype.concat.length;\n\n//CHECK#2\nif (Array.prototype.concat.hasOwnProperty('length') !== true) {\n $ERROR('#2: delete Array.prototype.concat.length; Array.prototype.concat.hasOwnProperty(\\'length\\') === true. Actual: ' + (Array.prototype.concat.hasOwnProperty('length')));\n}\n\n//CHECK#3\nif (Array.prototype.concat.length === undefined) {\n $ERROR('#3: delete Array.prototype.concat.length; Array.prototype.concat.length !== undefined');\n}\n\n\n",
+ "id": "S15.4.4.4_A4.2",
+ "strict_only": ""
+ },
+ {
+ "section": "15.4.4.4",
+ "description": "Checking if varying the length property fails",
+ "strict_mode_negative": "",
+ "test": "//CHECK#1\nvar x = Array.prototype.concat.length;\nArray.prototype.concat.length = Infinity;\nif (Array.prototype.concat.length !== x) {\n $ERROR('#1: x = Array.prototype.concat.length; Array.prototype.concat.length = Infinity; Array.prototype.concat.length === x. Actual: ' + (Array.prototype.concat.length));\n}\n\n",
+ "id": "S15.4.4.4_A4.3",
+ "strict_only": ""
+ },
+ {
+ "section": "15.4.4.4",
+ "description": "concat.length === 1",
+ "test": "//CHECK#1\nif (Array.prototype.concat.length !== 1) {\n $ERROR('#1: Array.prototype.concat.length === 1. Actual: ' + (Array.prototype.concat.length));\n}\n\n",
+ "id": "S15.4.4.4_A4.4"
+ },
+ {
+ "section": "15.4.4.4, 15.2.4.7, 12.6.4",
+ "description": "Checking use propertyIsEnumerable, for-in",
+ "test": "//CHECK#1\nif (Array.propertyIsEnumerable('concat') !== false) {\n $ERROR('#1: Array.propertyIsEnumerable(\\'concat\\') === false. Actual: ' + (Array.propertyIsEnumerable('concat')));\n}\n\n//CHECK#2\nvar result = true;\nfor (var p in Array){\n if (p === \"concat\") {\n result = false;\n } \n}\n\nif (result !== true) {\n $ERROR('#2: result = true; for (p in Array) { if (p === \"concat\") result = false; } result === true;');\n}\n\n",
+ "id": "S15.4.4.4_A4.5"
+ },
+ {
+ "section": "15.4.4.4",
+ "description": "Checking Array.prototype.concat.prototype",
+ "test": "//CHECK#1\nif (Array.prototype.concat.prototype !== undefined) {\n $ERROR('#1: Array.prototype.concat.prototype === undefined. Actual: ' + (Array.prototype.concat.prototype));\n}\n",
+ "id": "S15.4.4.4_A4.6"
+ },
+ {
+ "section": "15.4.4.4, 11.2.2",
+ "description": "If property does not implement the internal [[Construct]] method, throw a TypeError exception",
+ "test": "//CHECK#1\n\ntry {\n new Array.prototype.concat();\n $ERROR('#1.1: new Array.prototype.concat() throw TypeError. Actual: ' + (new Array.prototype.concat()));\n} catch (e) {\n if ((e instanceof TypeError) !== true) {\n $ERROR('#1.2: new Array.prototype.concat() throw TypeError. Actual: ' + (e));\n }\n}\n",
+ "id": "S15.4.4.4_A4.7"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.4.4.5_Array_prototype_join.json b/website/resources/scripts/testcases2/15.4.4.5_Array_prototype_join.json
new file mode 100644
index 000000000..2cb4bd0fa
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.4.4.5_Array_prototype_join.json
@@ -0,0 +1,150 @@
+{
+ "testCollection": {
+ "name": "15.4.4.5_Array_prototype_join",
+ "numTests": 23,
+ "tests": [
+ {
+ "section": "15.4.4.5",
+ "description": "Checking this use new Array() and []",
+ "test": "//CHECK#1\nvar x = new Array();\nif (x.join() !== \"\") {\n $ERROR('#1: x = new Array(); x.join() === \"\". Actual: ' + (x.join()));\n} \n\n//CHECK#2\nx = [];\nx[0] = 1;\nx.length = 0;\nif (x.join() !== \"\") {\n $ERROR('#2: x = []; x[0] = 1; x.length = 0; x.join() === \"\". Actual: ' + (x.join()));\n} \n",
+ "id": "S15.4.4.5_A1.1_T1"
+ },
+ {
+ "section": "15.4.4.5",
+ "description": "Checking this use new Array() and []",
+ "test": "//CHECK#1\nvar x = new Array(0,1,2,3);\nif (x.join() !== \"0,1,2,3\") {\n $ERROR('#1: x = new Array(0,1,2,3); x.join() === \"0,1,2,3\". Actual: ' + (x.join()));\n}\n\n//CHECK#2\nx = [];\nx[0] = 0;\nx[3] = 3;\nif (x.join() !== \"0,,,3\") {\n $ERROR('#2: x = []; x[0] = 0; x[3] = 3; x.join() === \"0,,,3\". Actual: ' + (x.join()));\n}\n\n//CHECK#3\nx = [];\nx[0] = 0;\nif (x.join() !== \"0\") {\n $ERROR('#3: x = []; x[0] = 0; x.join() === \"0\". Actual: ' + (x.join()));\n}\n",
+ "id": "S15.4.4.5_A1.2_T1"
+ },
+ {
+ "section": "15.4.4.5",
+ "description": "Checking this use new Array() and []",
+ "test": "//CHECK#1\nvar x = new Array(0,1,2,3);\nif (x.join(undefined) !== \"0,1,2,3\") {\n $ERROR('#1: x = new Array(0,1,2,3); x.join(undefined) === \"0,1,2,3\". Actual: ' + (x.join(undefined)));\n}\n\n//CHECK#2\nx = [];\nx[0] = 0;\nx[3] = 3;\nif (x.join(undefined) !== \"0,,,3\") {\n $ERROR('#2: x = []; x[0] = 0; x[3] = 3; x.join(undefined) === \"0,,,3\". Actual: ' + (x.join(undefined)));\n}\n\n//CHECK#3\nx = [];\nx[0] = 0;\nif (x.join(undefined) !== \"0\") {\n $ERROR('#3: x = []; x[0] = 0; x.join(undefined) === \"0\". Actual: ' + (x.join(undefined)));\n}\n",
+ "id": "S15.4.4.5_A1.2_T2"
+ },
+ {
+ "section": "15.4.4.5",
+ "description": "Checking this use new Array() and []",
+ "test": "//CHECK#1\nvar x = [];\nx[0] = undefined;\nif (x.join() !== \"\") {\n $ERROR('#1: x = []; x[0] = undefined; x.join() === \"\". Actual: ' + (x.join()));\n}\n\n//CHECK#2\nx = [];\nx[0] = null;\nif (x.join() !== \"\") {\n $ERROR('#2: x = []; x[0] = null; x.join() === \"\". Actual: ' + (x.join()));\n}\n\n//CHECK#3\nx = Array(undefined,1,null,3);\nif (x.join() !== \",1,,3\") {\n $ERROR('#3: x = Array(undefined,1,null,3); x.join() === \",1,,3\". Actual: ' + (x.join()));\n}\n",
+ "id": "S15.4.4.5_A1.3_T1"
+ },
+ {
+ "section": "15.4.4.5",
+ "description": "If ToUint32(length) is zero, return the empty string",
+ "test": "var obj = {};\nobj.join = Array.prototype.join;\n\nif (obj.length !== undefined) {\n $ERROR('#0: var obj = {}; obj.length === undefined. Actual: ' + (obj.length));\n} else {\n //CHECK#1 \n if (obj.join() !== \"\") {\n $ERROR('#1: var obj = {}; obj.join = Array.prototype.join; obj.join() === \"\". Actual: ' + (obj.join()));\n }\n //CHECK#2\n if (obj.length !== undefined) {\n $ERROR('#2: var obj = {}; obj.join = Array.prototype.join; obj.join(); obj.length === undefined. Actual: ' + (obj.length));\n }\n} \n\n//CHECK#3\nobj.length = undefined;\nif (obj.join() !== \"\") {\n $ERROR('#3: var obj = {}; obj.length = undefined; obj.join = Array.prototype.join; obj.join() === \". Actual: ' + (obj.join()));\n} \n\n//CHECK#4\nif (obj.length !== undefined) {\n $ERROR('#4: var obj = {}; obj.length = undefined; obj.join = Array.prototype.join; obj.join(); obj.length === undefined. Actual: ' + (obj.length));\n}\n\n//CHECK#5\nobj.length = null\nif (obj.join() !== \"\") {\n $ERROR('#5: var obj = {}; obj.length = null; obj.join = Array.prototype.join; obj.join() === \"\". Actual: ' + (obj.join()));\n} \n\n//CHECK#6\nif (obj.length !== null) {\n $ERROR('#6: var obj = {}; obj.length = null; obj.join = Array.prototype.join; obj.join(); obj.length === null. Actual: ' + (obj.length));\n}\n",
+ "id": "S15.4.4.5_A2_T1"
+ },
+ {
+ "section": "15.4.4.5",
+ "description": "If ToUint32(length) is zero, return the empty string",
+ "test": "var obj = {};\nobj.join = Array.prototype.join;\n\n//CHECK#1\nobj.length = NaN;\nif (obj.join() !== \"\") {\n $ERROR('#1: var obj = {}; obj.length = NaN; obj.join = Array.prototype.join; obj.join() === \"\". Actual: ' + (obj.join()));\n}\n\n//CHECK#2\nif (isNaN(obj.length) !== true) {\n $ERROR('#2: var obj = {}; obj.length = NaN; obj.join = Array.prototype.join; obj.join(); obj.length === Not-a-Number. Actual: ' + (obj.length));\n}\n\n//CHECK#3\nobj.length = Number.POSITIVE_INFINITY;\nif (obj.join() !== \"\") {\n $ERROR('#3: var obj = {}; obj.length = Number.POSITIVE_INFINITY; obj.join = Array.prototype.join; obj.join() === \"\". Actual: ' + (obj.join()));\n}\n\n//CHECK#4\nif (obj.length !== Number.POSITIVE_INFINITY) {\n $ERROR('#4: var obj = {}; obj.length = Number.POSITIVE_INFINITY; obj.join = Array.prototype.join; obj.join(); obj.length === Number.POSITIVE_INFINITY. Actual: ' + (obj.length));\n}\n\n//CHECK#5\nobj.length = Number.NEGATIVE_INFINITY;\nif (obj.join() !== \"\") {\n $ERROR('#5: var obj = {}; obj.length = Number.NEGATIVE_INFINITY; obj.join = Array.prototype.join; obj.join() === \"\". Actual: ' + (obj.join()));\n}\n\n//CHECK#6\nif (obj.length !== Number.NEGATIVE_INFINITY) {\n $ERROR('#6: var obj = {}; obj.length = Number.NEGATIVE_INFINITY; obj.join = Array.prototype.join; obj.join(); obj.length === Number.NEGATIVE_INFINITY. Actual: ' + (obj.length));\n}\n\n//CHECK#7\nobj.length = -0;\nif (obj.join() !== \"\") {\n $ERROR('#7: var obj = {}; obj.length = -0; obj.join = Array.prototype.join; obj.join() === \"\". Actual: ' + (obj.join()));\n} \n\n//CHECK#8\nif (obj.length !== -0) {\n $ERROR('#8: var obj = {}; obj.length = -0; obj.join = Array.prototype.join; obj.join(); obj.length === 0. Actual: ' + (obj.length));\n} else {\n if (1/obj.length !== Number.NEGATIVE_INFINITY) {\n $ERROR('#8: var obj = {}; obj.length = -0; obj.join = Array.prototype.join; obj.join(); obj.length === -0. Actual: ' + (obj.length));\n } \n} \n\n//CHECK#9\nobj.length = 0.5;\nif (obj.join() !== \"\") {\n $ERROR('#9: var obj = {}; obj.length = 0.5; obj.join = Array.prototype.join; obj.join() === \"\". Actual: ' + (obj.join()));\n}\n\n//CHECK#10\nif (obj.length !== 0.5) {\n $ERROR('#10: var obj = {}; obj.length = 0.5; obj.join = Array.prototype.join; obj.join(); obj.length === 0.5. Actual: ' + (obj.length));\n} \n\n//CHECK#11\nvar x = new Number(0);\nobj.length = x;\nif (obj.join() !== \"\") {\n $ERROR('#11: var x = new Number(0); var obj = {}; obj.length = x; obj.join = Array.prototype.join; obj.join() === \"\". Actual: ' + (obj.join()));\n}\n\n//CHECK#12\nif (obj.length !== x) {\n $ERROR('#12: var x = new Number(0); var obj = {}; obj.length = x; obj.join = Array.prototype.join; obj.join(); obj.length === x. Actual: ' + (obj.length));\n}\n",
+ "id": "S15.4.4.5_A2_T2"
+ },
+ {
+ "section": "15.4.4.5",
+ "description": "If ToUint32(length) is zero, return the empty string",
+ "test": "var obj = {};\nobj.join = Array.prototype.join;\n\n//CHECK#1\nobj.length = 4.5;\nif (obj.join() !== \",,,\") {\n $ERROR('#1: var obj = {}; obj.length = 4.5; obj.join = Array.prototype.join; obj.join() === \",,,\". Actual: ' + (obj.join()));\n}\n\n//CHECK#2\nobj[0] = undefined;\nobj[1] = 1;\nobj[2] = null;\nif (obj.join() !== \",1,,\") {\n $ERROR('#1: var obj = {}; obj.length = 4.5; obj[0] = undefined; obj[1] = 1; obj[2] = null; obj.join = Array.prototype.join; obj.join() === \",1,,\". Actual: ' + (obj.join()));\n}\n\n//CHECK#3\nif (obj.length !== 4.5) {\n $ERROR('#1: var obj = {}; obj.length = 4.5; obj[0] = undefined; obj[1] = 1; obj[2] = null; obj.join = Array.prototype.join; obj.join(); obj.length === 4.5. Actual: ' + (obj.length));\n} \n\nvar obj = {};\nobj.join = Array.prototype.join;\n\n//CHECK#4\nvar x = new Number(4.5);\nobj.length = x;\nif (obj.join() !== \",,,\") {\n $ERROR('#4: var obj = {}; var x = new Number(4.5); obj.length = x; obj.join = Array.prototype.join; obj.join() === \",,,\". Actual: ' + (obj.join()));\n}\n\n//CHECK#5\nobj[0] = undefined;\nobj[1] = 1;\nobj[2] = null;\nif (obj.join() !== \",1,,\") {\n $ERROR('#5: var obj = {}; var x = new Number(4.5); obj.length = x; obj[0] = undefined; obj[1] = 1; obj[2] = null; obj.join = Array.prototype.join; obj.join() === \",1,,\". Actual: ' + (obj.join()));\n}\n\n//CHECK#6\nif (obj.length !== x) {\n $ERROR('#6: var obj = {}; var x = new Number(4.5); obj.length = x; obj[0] = undefined; obj[1] = 1; obj[2] = null; obj.join = Array.prototype.join; obj.join(); obj.length === x. Actual: ' + (obj.length));\n} \n",
+ "id": "S15.4.4.5_A2_T3"
+ },
+ {
+ "section": "15.4.4.5",
+ "description": "Operator use ToNumber from length.\nIf Type(value) is Object, evaluate ToPrimitive(value, Number)",
+ "test": "var obj = {};\nobj.join = Array.prototype.join;\n\n//CHECK#1\nobj.length = {valueOf: function() {return 3}};\nif (obj.join() !== \",,\") {\n $ERROR('#1: obj.length = {valueOf: function() {return 3}} obj.join() === \",,\". Actual: ' + (obj.join()));\n}\n\n//CHECK#2\nobj.length = {valueOf: function() {return 3}, toString: function() {return 2}};\nif (obj.join() !== \",,\") {\n $ERROR('#2: obj.length = {valueOf: function() {return 3}, toString: function() {return 2}} obj.join() === \",,\". Actual: ' + (obj.join()));\n} \n\n//CHECK#3\nobj.length = {valueOf: function() {return 3}, toString: function() {return {}}};\nif (obj.join() !== \",,\") {\n $ERROR('#3: obj.length = {valueOf: function() {return 3}, toString: function() {return {}}} obj.join() === \",,\". Actual: ' + (obj.join()));\n}\n\n//CHECK#4\ntry { \n obj.length = {valueOf: function() {return 3}, toString: function() {throw \"error\"}}; \n if (obj.join() !== \",,\") {\n $ERROR('#4.1: obj.length = {valueOf: function() {return 3}, toString: function() {throw \"error\"}}; obj.join() === \",\". Actual: ' + (obj.join()));\n }\n}\ncatch (e) {\n if (e === \"error\") {\n $ERROR('#4.2: obj.length = {valueOf: function() {return 3}, toString: function() {throw \"error\"}}; obj.join() not throw \"error\"');\n } else {\n $ERROR('#4.3: obj.length = {valueOf: function() {return 3}, toString: function() {throw \"error\"}}; obj.join() not throw Error. Actual: ' + (e));\n }\n}\n\n//CHECK#5\nobj.length = {toString: function() {return 2}};\nif (obj.join() !== \",\") {\n $ERROR('#5: obj.length = {toString: function() {return 2}} obj.join() === \",\". Actual: ' + (obj.join()));\n}\n\n//CHECK#6\nobj.length = {valueOf: function() {return {}}, toString: function() {return 2}}\nif (obj.join() !== \",\") {\n $ERROR('#6: obj.length = {valueOf: function() {return {}}, toString: function() {return 2}} obj.join() === \",\". Actual: ' + (obj.join()));\n}\n\n//CHECK#7\ntry {\n obj.length = {valueOf: function() {throw \"error\"}, toString: function() {return 2}}; \n obj.join();\n $ERROR('#7.1: obj.length = {valueOf: function() {throw \"error\"}, toString: function() {return 2}}; obj.join() throw \"error\". Actual: ' + (obj.join()));\n} \ncatch (e) {\n if (e !== \"error\") {\n $ERROR('#7.2: obj.length = {valueOf: function() {throw \"error\"}, toString: function() {return 2}}; obj.join() throw \"error\". Actual: ' + (e));\n } \n}\n\n//CHECK#8\ntry {\n obj.length = {valueOf: function() {return {}}, toString: function() {return {}}};\n obj.join();\n $ERROR('#8.1: obj.length = {valueOf: function() {return {}}, toString: function() {return {}}} obj.join() throw TypeError. Actual: ' + (obj.join()));\n} \ncatch (e) {\n if ((e instanceof TypeError) !== true) {\n $ERROR('#8,2: obj.length = {valueOf: function() {return {}}, toString: function() {return {}}} obj.join() throw TypeError. Actual: ' + (e));\n } \n}\n",
+ "id": "S15.4.4.5_A2_T4"
+ },
+ {
+ "section": "15.4.4.5",
+ "description": "Checking separator in [\"\", \"\\\\\", \"&\", true, Infinity, null, undefind, NaN]",
+ "test": "//CHECK#0\nvar x = new Array(0,1,2,3);\nif (x.join(\"\") !== \"0123\") {\n $ERROR('#0: x = new Array(0,1,2,3); x.join(\"\") === \"0123\". Actual: ' + (x.join(\"\")));\n}\n\n//CHECK#1\nx = new Array(0,1,2,3);\nif (x.join(\"\\\\\") !== \"0\\\\1\\\\2\\\\3\") {\n $ERROR('#1: x = new Array(0,1,2,3); x.join(\"\\\\\") === \"0\\\\1\\\\2\\\\3\". Actual: ' + (x.join(\"\\\\\")));\n}\n\n//CHECK#2\nif (x.join(\"&\") !== \"0&1&2&3\") {\n $ERROR('#2: x = new Array(0,1,2,3); x.join(\"&\") === \"0&1&2&3\". Actual: ' + (x.join(\"&\")));\n}\n\n//CHECK#3\nif (x.join(true) !== \"0true1true2true3\") {\n $ERROR('#3: x = new Array(0,1,2,3); x.join(true) === \"0true1true2true3\". Actual: ' + (x.join(true)));\n}\n\n//CHECK#4\nif (x.join(Infinity) !== \"0Infinity1Infinity2Infinity3\") {\n $ERROR('#4: x = new Array(0,1,2,3); x.join(Infinity) === \"0Infinity1Infinity2Infinity3\". Actual: ' + (x.join(Infinity)));\n}\n\n//CHECK#5\nif (x.join(null) !== \"0null1null2null3\") {\n $ERROR('#3: 5 = new Array(0,1,2,3); x.join(null) === \"0null1null2null3\". Actual: ' + (x.join(null)));\n}\n\n//CHECK#6\nif (x.join(undefined) !== \"0,1,2,3\") {\n $ERROR('#6: x = new Array(0,1,2,3); x.join(undefined) === \"0,1,2,3\". Actual: ' + (x.join(undefined)));\n}\n\n//CHECK#7\nif (x.join(NaN) !== \"0NaN1NaN2NaN3\") {\n $ERROR('#7: x = new Array(0,1,2,3); x.join(\"NaN\") === \"0NaN1NaN2NaN3\". Actual: ' + (x.join(\"NaN\")));\n}\n",
+ "id": "S15.4.4.5_A3.1_T1"
+ },
+ {
+ "section": "15.4.4.5",
+ "description": "If Type(separator) is Object, evaluate ToPrimitive(separator, String)",
+ "test": "var x = new Array(0,1,2,3);\n//CHECK#1\nvar object = {valueOf: function() {return \"+\"}};\nif (x.join(object) !== \"0[object Object]1[object Object]2[object Object]3\") {\n $ERROR('#1: var object = {valueOf: function() {return \"+\"}}; x.join(object) === \"0[object Object]1[object Object]2[object Object]3\". Actual: ' + (x.join(object)));\n}\n\n//CHECK#2\nvar object = {valueOf: function() {return \"+\"}, toString: function() {return \"*\"}};\nif (x.join(object) !== \"0*1*2*3\") {\n $ERROR('#2: var object = {valueOf: function() {return \"+\"}, toString: function() {return \"*\"}}; x.join(object) === \"0*1*2*3\". Actual: ' + (x.join(object)));\n} \n\n//CHECK#3\nvar object = {valueOf: function() {return \"+\"}, toString: function() {return {}}};\nif (x.join(object) !== \"0+1+2+3\") {\n $ERROR('#3: var object = {valueOf: function() {return \"+\"}, toString: function() {return {}}}; x.join(object) === \"0+1+2+3\". Actual: ' + (x.join(object)));\n}\n\n//CHECK#4\ntry {\n var object = {valueOf: function() {throw \"error\"}, toString: function() {return \"*\"}};\n if (x.join(object) !== \"0*1*2*3\") {\n $ERROR('#4.1: var object = {valueOf: function() {throw \"error\"}, toString: function() {return \"*\"}}; x.join(object) === \"0*1*2*3\". Actual: ' + (x.join(object)));\n }\n}\ncatch (e) {\n if (e === \"error\") {\n $ERROR('#4.2: var object = {valueOf: function() {throw \"error\"}, toString: function() {return \"*\"}}; x.join(object) not throw \"error\"');\n } else {\n $ERROR('#4.3: var object = {valueOf: function() {throw \"error\"}, toString: function() {return \"*\"}}; x.join(object) not throw Error. Actual: ' + (e));\n }\n}\n\n//CHECK#5\nvar object = {toString: function() {return \"*\"}};\nif (x.join(object) !== \"0*1*2*3\") {\n $ERROR('#5: var object = {toString: function() {return \"*\"}}; x.join(object) === \"0*1*2*3\". Actual: ' + (x.join(object)));\n}\n\n//CHECK#6\nvar object = {valueOf: function() {return {}}, toString: function() {return \"*\"}}\nif (x.join(object) !== \"0*1*2*3\") {\n $ERROR('#6: var object = {valueOf: function() {return {}}, toString: function() {return \"*\"}}; x.join(object) === \"0*1*2*3\". Actual: ' + (x.join(object)));\n}\n\n//CHECK#7\ntry {\n var object = {valueOf: function() {return \"+\"}, toString: function() {throw \"error\"}};\n x.join(object);\n $ERROR('#7.1: var object = {valueOf: function() {return \"+\"}, toString: function() {throw \"error\"}}; x.join(object) throw \"error\". Actual: ' + (x.join(object)));\n} \ncatch (e) {\n if (e !== \"error\") {\n $ERROR('#7.2: var object = {valueOf: function() {return \"+\"}, toString: function() {throw \"error\"}}; x.join(object) throw \"error\". Actual: ' + (e));\n } \n}\n\n//CHECK#8\ntry {\n var object = {valueOf: function() {return {}}, toString: function() {return {}}};\n x.join(object);\n $ERROR('#8.1: var object = {valueOf: function() {return {}}, toString: function() {return {}}}; x.join(object) throw TypeError. Actual: ' + (x.join(object)));\n} \ncatch (e) {\n if ((e instanceof TypeError) !== true) {\n $ERROR('#8.2: var object = {valueOf: function() {return {}}, toString: function() {return {}}}; x.join(object) throw TypeError. Actual: ' + (e));\n } \n}\n",
+ "id": "S15.4.4.5_A3.1_T2"
+ },
+ {
+ "section": "15.4.4.5",
+ "description": "Checking arguments and separator in [\"\", \"\\\\\", \"&\", true, Infinity, null, undefind, NaN]",
+ "test": "//CHECK#0\nvar x = new Array(\"\",\"\",\"\");\nif (x.join(\"\") !== \"\") {\n $ERROR('#0: var x = new Array(\"\",\"\",\"\"); x.join(\"\") === \"\". Actual: ' + (x.join(\"\")));\n}\n\n//CHECK#1\nvar x = new Array(\"\\\\\",\"\\\\\",\"\\\\\");\nif (x.join(\"\\\\\") !== \"\\\\\\\\\\\\\\\\\\\\\") {\n $ERROR('#1: var x = new Array(\"\\\\\",\"\\\\\",\"\\\\\"); x.join(\"\\\\\") === \"\\\\\\\\\\\\\\\\\\\\\". Actual: ' + (x.join(\"\\\\\")));\n}\n\n//CHECK#2\nvar x = new Array(\"&\", \"&\", \"&\");\nif (x.join(\"&\") !== \"&&&&&\") {\n $ERROR('#2: var x = new Array(\"&\", \"&\", \"&\"); x.join(\"&\") === \"&&&&&\". Actual: ' + (x.join(\"&\")));\n}\n\n//CHECK#3\nvar x = new Array(true,true,true);\nif (x.join() !== \"true,true,true\") {\n $ERROR('#3: var x = new Array(true,true,true); x.join(true,true,true) === \"true,true,true\". Actual: ' + (x.join(true,true,true)));\n}\n\n//CHECK#4\nvar x = new Array(null,null,null);\nif (x.join() !== \",,\") {\n $ERROR('#4: var x = new Array(null,null,null); x.join(null,null,null) === \",,\". Actual: ' + (x.join(null,null,null)));\n}\n\n//CHECK#5\nvar x = new Array(undefined,undefined,undefined);\nif (x.join() !== \",,\") {\n $ERROR('#5: var x = new Array(undefined,undefined,undefined); x.join(undefined,undefined,undefined) === \",,\". Actual: ' + (x.join(undefined,undefined,undefined)));\n}\n\n//CHECK#6\nvar x = new Array(Infinity,Infinity,Infinity);\nif (x.join() !== \"Infinity,Infinity,Infinity\") {\n $ERROR('#6: var x = new Array(Infinity,Infinity,Infinity); x.join(Infinity,Infinity,Infinity) === \"Infinity,Infinity,Infinity\". Actual: ' + (x.join(Infinity,Infinity,Infinity)));\n}\n\n//CHECK#7\nvar x = new Array(NaN,NaN,NaN);\nif (x.join() !== \"NaN,NaN,NaN\") {\n $ERROR('#7: var x = new Array(NaN,NaN,NaN); x.join(NaN,NaN,NaN) === \"NaN,NaN,NaN\". Actual: ' + (x.join(NaN,NaN,NaN)));\n}\n",
+ "id": "S15.4.4.5_A3.2_T1"
+ },
+ {
+ "section": "15.4.4.5",
+ "description": "If Type(argument) is Object, evaluate ToPrimitive(argument, String)",
+ "test": "//CHECK#1\nvar object = {valueOf: function() {return \"+\"}};\nvar x = new Array(object);\nif (x.join() !== \"[object Object]\") {\n $ERROR('#1: var object = {valueOf: function() {return \"+\"}} var x = new Array(object); x.join() === \"[object Object]\". Actual: ' + (x.join()));\n}\n\n//CHECK#2\nvar object = {valueOf: function() {return \"+\"}, toString: function() {return \"*\"}};\nvar x = new Array(object);\nif (x.join() !== \"*\") {\n $ERROR('#2: var object = {valueOf: function() {return \"+\"}, toString: function() {return \"*\"}} var x = new Array(object); x.join() === \"*\". Actual: ' + (x.join()));\n} \n\n//CHECK#3\nvar object = {valueOf: function() {return \"+\"}, toString: function() {return {}}};\nvar x = new Array(object);\nif (x.join() !== \"+\") {\n $ERROR('#3: var object = {valueOf: function() {return \"+\"}, toString: function() {return {}}} var x = new Array(object); x.join() === \"+\". Actual: ' + (x.join()));\n}\n\n//CHECK#4\ntry {\n var object = {valueOf: function() {throw \"error\"}, toString: function() {return \"*\"}};\n var x = new Array(object);\n if (x.join() !== \"*\") {\n $ERROR('#4.1: var object = {valueOf: function() {throw \"error\"}, toString: function() {return \"*\"}} var x = new Array(object); x.join() === \"*\". Actual: ' + (x.join()));\n }\n}\ncatch (e) {\n if (e === \"error\") {\n $ERROR('#4.2: var object = {valueOf: function() {throw \"error\"}, toString: function() {return \"*\"}} var x = new Array(object); x.join() not throw \"error\"');\n } else {\n $ERROR('#4.3: var object = {valueOf: function() {throw \"error\"}, toString: function() {return \"*\"}} var x = new Array(object); x.join() not throw Error. Actual: ' + (e));\n }\n}\n\n//CHECK#5\nvar object = {toString: function() {return \"*\"}};\nvar x = new Array(object);\nif (x.join() !== \"*\") {\n $ERROR('#5: var object = {toString: function() {return \"*\"}} var x = new Array(object); x.join() === \"*\". Actual: ' + (x.join()));\n}\n\n//CHECK#6\nvar object = {valueOf: function() {return {}}, toString: function() {return \"*\"}}\nvar x = new Array(object);\nif (x.join() !== \"*\") {\n $ERROR('#6: var object = {valueOf: function() {return {}}, toString: function() {return \"*\"}} var x = new Array(object); x.join() === \"*\". Actual: ' + (x.join()));\n}\n\n//CHECK#7\ntry {\n var object = {valueOf: function() {return \"+\"}, toString: function() {throw \"error\"}};\n var x = new Array(object);\n x.join();\n $ERROR('#7.1: var object = {valueOf: function() {return \"+\"}, toString: function() {throw \"error\"}} var x = new Array(object); x.join() throw \"error\". Actual: ' + (x.join()));\n} \ncatch (e) {\n if (e !== \"error\") {\n $ERROR('#7.2: var object = {valueOf: function() {return \"+\"}, toString: function() {throw \"error\"}} var x = new Array(object); x.join() throw \"error\". Actual: ' + (e));\n } \n}\n\n//CHECK#8\ntry {\n var object = {valueOf: function() {return {}}, toString: function() {return {}}};\n var x = new Array(object);\n x.join();\n $ERROR('#8.1: var object = {valueOf: function() {return {}}, toString: function() {return {}}} var x = new Array(object); x.join() throw TypeError. Actual: ' + (x.join()));\n} \ncatch (e) {\n if ((e instanceof TypeError) !== true) {\n $ERROR('#8.2: var object = {valueOf: function() {return {}}, toString: function() {return {}}} var x = new Array(object); x.join() throw TypeError. Actual: ' + (e));\n } \n}\n",
+ "id": "S15.4.4.5_A3.2_T2"
+ },
+ {
+ "section": "15.4.4.5",
+ "description": "length = 4294967296",
+ "test": "var obj = {};\nobj.join = Array.prototype.join;\nobj[0] = \"x\";\nobj[4294967295] = \"y\";\nobj.length = 4294967296;\n\n//CHECK#1\nif (obj.join(\"\") !== \"\") {\n $ERROR('#1: var obj = {}; obj.join = Array.prototype.join; obj[0] = \"x\"; obj[4294967295] = \"y\"; obj.length = 4294967296; obj.join(\"\") === \"\". Actual: ' + (obj.join(\"\")));\n}\n\n//CHECK#2\nif (obj.length !== 4294967296) {\n $ERROR('#2: var obj = {}; obj.join = Array.prototype.join; obj[0] = \"x\"; obj[4294967295] = \"y\"; obj.length = 4294967296; obj.join(\"\"); obj.length === 4294967296. Actual: ' + (obj.length));\n}\n",
+ "id": "S15.4.4.5_A4_T1"
+ },
+ {
+ "section": "15.4.4.5",
+ "description": "length = 4294967297",
+ "test": "var obj = {};\nobj.join = Array.prototype.join;\nobj[0] = \"x\";\nobj[1] = \"y\";\nobj[4294967296] = \"z\";\nobj.length = 4294967297;\n\n//CHECK#1\nif (obj.join(\"\") !== \"x\") {\n $ERROR('#1: var obj = {}; obj.join = Array.prototype.join; obj[0] = \"x\"; obj[1] = \"y\"; obj[4294967296] = \"z\"; obj.length = 4294967297; obj.join(\"\") === \"x\". Actual: ' + (obj.join(\"\")));\n}\n\n//CHECK#2\nif (obj.length !== 4294967297) {\n $ERROR('#2: var obj = {}; obj.join = Array.prototype.join; obj[0] = \"x\"; obj[1] = \"y\"; obj[4294967296] = \"z\"; obj.length = 4294967297; obj.join(\"\"); obj.length === 4294967297. Actual: ' + (obj.length));\n}\n",
+ "id": "S15.4.4.5_A4_T2"
+ },
+ {
+ "section": "15.4.4.5",
+ "description": "length = -4294967294",
+ "test": "var obj = {};\nobj.join = Array.prototype.join;\nobj[0] = \"x\";\nobj[1] = \"y\";\nobj[2] = \"z\";\nobj.length = -4294967294;\n\n//CHECK#1\nif (obj.join(\"\") !== \"xy\") {\n $ERROR('#1: var obj = {}; obj.join = Array.prototype.join; obj[0] = \"x\"; obj[1] = \"y\"; obj[2] = \"z\"; obj.length = -4294967294; obj.join(\"\") === \"xy\". Actual: ' + (obj.join(\"\")));\n}\n\n//CHECK#2\nif (obj.length !== -4294967294) {\n $ERROR('#2: var obj = {}; obj.join = Array.prototype.join; obj[0] = \"x\"; obj[1] = \"y\"; obj[2] = \"z\"; obj.length = -4294967294; obj.join(\"\"); obj.length === -4294967294. Actual: ' + (obj.length));\n}\n",
+ "id": "S15.4.4.5_A4_T3"
+ },
+ {
+ "section": "15.4.4.5, 8.6.2.1",
+ "description": "[[Prototype]] of Array instance is Array.prototype, [[Prototype] of Array.prototype is Object.prototype",
+ "test": "//CHECK#1\nArray.prototype[1] = 1;\nvar x = [0];\nx.length = 2;\nif (x.join() !== \"0,1\") { \n $ERROR('#1: Array.prototype[1] = 1; x = [0]; x.length = 2; x.join() === \"0,1\". Actual: ' + (x.join())); \n}\n\n//CHECK#2\nObject.prototype[1] = 1;\nObject.prototype.length = 2;\nObject.prototype.join = Array.prototype.join;\nx = {0:0};\nif (x.join() !== \"0,1\") { \n $ERROR('#2: Object.prototype[1] = 1; Object.prototype.length = 2; Object.prototype.join = Array.prototype.join; x = {0:0}; x.join() === \"0,1\". Actual: ' + (x.join())); \n}\n",
+ "id": "S15.4.4.5_A5_T1"
+ },
+ {
+ "section": "15.4.4.5, 15.2.4.7, 12.6.4",
+ "description": "Checking use propertyIsEnumerable, for-in",
+ "test": "//CHECK#1\nif (Array.prototype.join.propertyIsEnumerable('length') !== false) {\n $ERROR('#1: Array.prototype.join.propertyIsEnumerable(\\'length\\') === false. Actual: ' + (Array.prototype.join.propertyIsEnumerable('length')));\n}\n\n//CHECK#2\nvar result = true;\nfor (var p in Array.join){\n if (p === \"length\") {\n result = false;\n } \n}\n\nif (result !== true) {\n $ERROR('#2: result = true; for (p in Array.join) { if (p === \"length\") result = false; } result === true;');\n}\n\n",
+ "id": "S15.4.4.5_A6.1"
+ },
+ {
+ "section": "15.4.4.5, 15.2.4.5, 11.4.1",
+ "description": "Checking use hasOwnProperty, delete",
+ "strict_mode_negative": "",
+ "test": "//CHECK#1\nif (Array.prototype.join.hasOwnProperty('length') !== true) {\n $FAIL('#1: Array.prototype.join.hasOwnProperty(\\'length\\') === true. Actual: ' + (Array.prototype.join.hasOwnProperty('length')));\n}\n\ndelete Array.prototype.join.length;\n \n//CHECK#2\nif (Array.prototype.join.hasOwnProperty('length') !== true) {\n $ERROR('#2: delete Array.prototype.join.length; Array.prototype.join.hasOwnProperty(\\'length\\') === true. Actual: ' + (Array.prototype.join.hasOwnProperty('length')));\n}\n\n//CHECK#3\nif (Array.prototype.join.length === undefined) {\n $ERROR('#3: delete Array.prototype.join.length; Array.prototype.join.length !== undefined');\n}\n\n\n",
+ "id": "S15.4.4.5_A6.2",
+ "strict_only": ""
+ },
+ {
+ "section": "15.4.4.5",
+ "description": "Checking if varying the length property fails",
+ "strict_mode_negative": "",
+ "test": "//CHECK#1\nvar x = Array.prototype.join.length;\nArray.prototype.join.length = Infinity;\nif (Array.prototype.join.length !== x) {\n $ERROR('#1: x = Array.prototype.join.length; Array.prototype.join.length = Infinity; Array.prototype.join.length === x. Actual: ' + (Array.prototype.join.length));\n}\n\n",
+ "id": "S15.4.4.5_A6.3",
+ "strict_only": ""
+ },
+ {
+ "section": "15.4.4.5",
+ "description": "join.length === 1",
+ "test": "//CHECK#1\nif (Array.prototype.join.length !== 1) {\n $ERROR('#1: Array.prototype.join.length === 1. Actual: ' + (Array.prototype.join.length));\n}\n\n",
+ "id": "S15.4.4.5_A6.4"
+ },
+ {
+ "section": "15.4.4.5, 15.2.4.7, 12.6.4",
+ "description": "Checking use propertyIsEnumerable, for-in",
+ "test": "//CHECK#1\nif (Array.propertyIsEnumerable('join') !== false) {\n $ERROR('#1: Array.propertyIsEnumerable(\\'join\\') === false. Actual: ' + (Array.propertyIsEnumerable('join')));\n}\n\n//CHECK#2\nvar result = true;\nfor (var p in Array){\n if (p === \"join\") {\n result = false;\n } \n}\n\nif (result !== true) {\n $ERROR('#2: result = true; for (p in Array) { if (p === \"join\") result = false; } result === true;');\n}\n\n",
+ "id": "S15.4.4.5_A6.5"
+ },
+ {
+ "section": "15.4.4.5",
+ "description": "Checking Array.prototype.join.prototype",
+ "test": "//CHECK#1\nif (Array.prototype.join.prototype !== undefined) {\n $ERROR('#1: Array.prototype.join.prototype === undefined. Actual: ' + (Array.prototype.join.prototype));\n}\n",
+ "id": "S15.4.4.5_A6.6"
+ },
+ {
+ "section": "15.4.4.5, 11.2.2",
+ "description": "If property does not implement the internal [[Construct]] method, throw a TypeError exception",
+ "test": "//CHECK#1\n\ntry {\n new Array.prototype.join();\n $ERROR('#1.1: new Array.prototype.join() throw TypeError. Actual: ' + (new Array.prototype.join()));\n} catch (e) {\n if ((e instanceof TypeError) !== true) {\n $ERROR('#1.2: new Array.prototype.join() throw TypeError. Actual: ' + (e));\n }\n}\n",
+ "id": "S15.4.4.5_A6.7"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.4.4.6_Array_prototype_pop.json b/website/resources/scripts/testcases2/15.4.4.6_Array_prototype_pop.json
new file mode 100644
index 000000000..2c5d5603f
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.4.4.6_Array_prototype_pop.json
@@ -0,0 +1,120 @@
+{
+ "testCollection": {
+ "name": "15.4.4.6_Array_prototype_pop",
+ "numTests": 18,
+ "tests": [
+ {
+ "section": "15.4.4.6",
+ "description": "Checking this algorithm",
+ "test": "//CHECK#1\nvar x = new Array();\nvar pop = x.pop();\nif (pop !== undefined) {\n $ERROR('#1: var x = new Array(); x.pop() === undefined. Actual: ' + (pop));\n} \n\n//CHECK#2\nif (x.length !== 0) {\n $ERROR('#2: var x = new Array(); x.pop(); x.length === 0. Actual: ' + (x.length));\n} \n\n//CHECK#3\nvar x = Array(1,2,3);\nx.length = 0;\nvar pop = x.pop();\nif (pop !== undefined) {\n $ERROR('#2: var x = Array(1,2,3); x.length = 0; x.pop() === undefined. Actual: ' + (pop));\n} \n\n//CHECK#4\nif (x.length !== 0) {\n $ERROR('#4: var x = new Array(1,2,3); x.length = 0; x.pop(); x.length === 0. Actual: ' + (x.length));\n} \n",
+ "id": "S15.4.4.6_A1.1_T1"
+ },
+ {
+ "section": "15.4.4.6",
+ "description": "Checking this use new Array() and []",
+ "test": "//CHECK#1\nvar x = new Array(0,1,2,3);\nvar pop = x.pop();\nif (pop !== 3) {\n $ERROR('#1: x = new Array(0,1,2,3); x.pop() === 3. Actual: ' + (pop));\n}\n\n//CHECK#2\nif (x.length !== 3) {\n $ERROR('#2: x = new Array(0,1,2,3); x.pop(); x.length == 3');\n}\n\n//CHECK#3\nif (x[3] !== undefined) {\n $ERROR('#3: x = new Array(0,1,2,3); x.pop(); x[3] == undefined');\n}\n\n//CHECK#4\nif (x[2] !== 2) {\n $ERROR('#4: x = new Array(0,1,2,3); x.pop(); x[2] == 2');\n}\n\n//CHECK#5\nx = [];\nx[0] = 0;\nx[3] = 3;\nvar pop = x.pop();\nif (pop !== 3) {\n $ERROR('#5: x = []; x[0] = 0; x[3] = 3; x.pop() === 3. Actual: ' + (pop));\n}\n\n//CHECK#6\nif (x.length !== 3) {\n $ERROR('#6: x = []; x[0] = 0; x[3] = 3; x.pop(); x.length == 3');\n}\n\n//CHECK#7\nif (x[3] !== undefined) {\n $ERROR('#7: x = []; x[0] = 0; x[3] = 3; x.pop(); x[3] == undefined');\n}\n\n//CHECK#8\nif (x[2] !== undefined) {\n $ERROR('#8: x = []; x[0] = 0; x[3] = 3; x.pop(); x[2] == undefined');\n}\n\n//CHECK#9\nx.length = 1;\nvar pop = x.pop();\nif (pop !== 0) {\n $ERROR('#9: x = []; x[0] = 0; x[3] = 3; x.pop(); x.length = 1; x.pop() === 0. Actual: ' + (pop));\n}\n\n//CHECK#10\nif (x.length !== 0) {\n $ERROR('#10: x = []; x[0] = 0; x[3] = 3; x.pop(); x.length = 1; x.pop(); x.length === 0. Actual: ' + (x.length));\n}\n",
+ "id": "S15.4.4.6_A1.2_T1"
+ },
+ {
+ "section": "15.4.4.6",
+ "description": "If ToUint32(length) equal zero, call the [[Put]] method\nof this object with arguments \"length\" and 0 and return undefined",
+ "test": "var obj = {};\nobj.pop = Array.prototype.pop;\n\nif (obj.length !== undefined) {\n $ERROR('#0: var obj = {}; obj.length === undefined. Actual: ' + (obj.length));\n} else {\n //CHECK#1 \n var pop = obj.pop();\nif (pop !== undefined) {\n $ERROR('#1: var obj = {}; obj.pop = Array.prototype.pop; obj.pop() === undefined. Actual: ' + (pop));\n }\n //CHECK#2\n if (obj.length !== 0) {\n $ERROR('#2: var obj = {}; obj.pop = Array.prototype.pop; obj.pop(); obj.length === 0. Actual: ' + (obj.length));\n }\n} \n\n//CHECK#3\nobj.length = undefined;\nvar pop = obj.pop();\nif (pop !== undefined) {\n $ERROR('#3: var obj = {}; obj.length = undefined; obj.pop = Array.prototype.pop; obj.pop() === undefined. Actual: ' + (pop));\n} \n\n//CHECK#4\nif (obj.length !== 0) {\n $ERROR('#4: var obj = {}; obj.length = undefined; obj.pop = Array.prototype.pop; obj.pop(); obj.length === 0. Actual: ' + (obj.length));\n}\n\n//CHECK#5\nobj.length = null\nvar pop = obj.pop();\nif (pop !== undefined) {\n $ERROR('#5: var obj = {}; obj.length = null; obj.pop = Array.prototype.pop; obj.pop() === undefined. Actual: ' + (pop));\n} \n\n//CHECK#6\nif (obj.length !== 0) {\n $ERROR('#6: var obj = {}; obj.length = null; obj.pop = Array.prototype.pop; obj.pop(); obj.length === 0. Actual: ' + (obj.length));\n}\n",
+ "id": "S15.4.4.6_A2_T1"
+ },
+ {
+ "section": "15.4.4.6",
+ "description": "If ToUint32(length) equal zero, call the [[Put]] method\nof this object with arguments \"length\" and 0 and return undefined",
+ "test": "var obj = {};\nobj.pop = Array.prototype.pop;\n\n//CHECK#1\nobj.length = NaN;\nvar pop = obj.pop();\nif (pop !== undefined) {\n $ERROR('#1: var obj = {}; obj.length = NaN; obj.pop = Array.prototype.pop; obj.pop() === undefined. Actual: ' + (pop));\n}\n\n//CHECK#2\nif (obj.length !== 0) {\n $ERROR('#2: var obj = {}; obj.length = NaN; obj.pop = Array.prototype.pop; obj.pop(); obj.length === 0. Actual: ' + (obj.length));\n}\n\n//CHECK#3\nobj.length = Number.POSITIVE_INFINITY;\nvar pop = obj.pop();\nif (pop !== undefined) {\n $ERROR('#3: var obj = {}; obj.length = Number.POSITIVE_INFINITY; obj.pop = Array.prototype.pop; obj.pop() === undefined. Actual: ' + (pop));\n}\n\n//CHECK#4\nif (obj.length !== 0) {\n $ERROR('#4: var obj = {}; obj.length = Number.POSITIVE_INFINITY; obj.pop = Array.prototype.pop; obj.pop(); obj.length === 0. Actual: ' + (obj.length));\n}\n\n//CHECK#5\nobj.length = Number.NEGATIVE_INFINITY;\nvar pop = obj.pop();\nif (pop !== undefined) {\n $ERROR('#5: var obj = {}; obj.length = Number.NEGATIVE_INFINITY; obj.pop = Array.prototype.pop; obj.pop() === undefined. Actual: ' + (pop));\n}\n\n//CHECK#6\nif (obj.length !== 0) {\n $ERROR('#6: var obj = {}; obj.length = Number.NEGATIVE_INFINITY; obj.pop = Array.prototype.pop; obj.pop(); obj.length === 0. Actual: ' + (obj.length));\n}\n\n//CHECK#7\nobj.length = -0;\nvar pop = obj.pop();\nif (pop !== undefined) {\n $ERROR('#7: var obj = {}; obj.length = -0; obj.pop = Array.prototype.pop; obj.pop() === undefined. Actual: ' + (pop));\n} \n\n//CHECK#8\nif (obj.length !== 0) {\n $ERROR('#8: var obj = {}; obj.length = -0; obj.pop = Array.prototype.pop; obj.pop(); obj.length === 0. Actual: ' + (obj.length));\n} else {\n if (1/obj.length !== Number.POSITIVE_INFINITY) {\n $ERROR('#8: var obj = {}; obj.length = -0; obj.pop = Array.prototype.pop; obj.pop(); obj.length === +0. Actual: ' + (obj.length));\n } \n} \n\n//CHECK#9\nobj.length = 0.5;\nvar pop = obj.pop();\nif (pop !== undefined) {\n $ERROR('#9: var obj = {}; obj.length = 0.5; obj.pop = Array.prototype.pop; obj.pop() === undefined. Actual: ' + (pop));\n}\n\n//CHECK#10\nif (obj.length !== 0) {\n $ERROR('#10: var obj = {}; obj.length = 0.5; obj.pop = Array.prototype.pop; obj.pop(); obj.length === 0. Actual: ' + (obj.length));\n} \n\n//CHECK#11\nobj.length = new Number(0);\nvar pop = obj.pop();\nif (pop !== undefined) {\n $ERROR('#11: var obj = {}; obj.length = new Number(0); obj.pop = Array.prototype.pop; obj.pop() === undefined. Actual: ' + (pop));\n}\n\n//CHECK#12\nif (obj.length !== 0) {\n $ERROR('#12: var obj = {}; obj.length = new Number(0); obj.pop = Array.prototype.pop; obj.pop(); obj.length === 0. Actual: ' + (obj.length));\n}\n",
+ "id": "S15.4.4.6_A2_T2"
+ },
+ {
+ "section": "15.4.4.6",
+ "description": "The last element ToUint32(length) - 1 of the array is removed from the array\nand returned",
+ "test": "var obj = {};\nobj.pop = Array.prototype.pop;\n\n//CHECK#1\nobj.length = 2.5;\nvar pop = obj.pop();\nif (pop !== undefined) {\n $ERROR('#1: var obj = {}; obj.length = 2.5; obj.pop = Array.prototype.pop; obj.pop() === undefined. Actual: ' + (pop));\n}\n\n//CHECK#2\nif (obj.length !== 1) {\n $ERROR('#2: var obj = {}; obj.length = 2.5; obj.pop = Array.prototype.pop; obj.pop(); obj.length === 1. Actual: ' + (obj.length));\n} \n\n//CHECK#3\nobj.length = new Number(2);\nvar pop = obj.pop();\nif (pop !== undefined) {\n $ERROR('#11: var obj = {}; obj.length = new Number(2); obj.pop = Array.prototype.pop; obj.pop() === undefined. Actual: ' + (pop));\n}\n\n//CHECK#3\nif (obj.length !== 1) {\n $ERROR('#12: var obj = {}; obj.length = new Number(2); obj.pop = Array.prototype.pop; obj.pop(); obj.length === 1. Actual: ' + (obj.length));\n} \n",
+ "id": "S15.4.4.6_A2_T3"
+ },
+ {
+ "section": "15.4.4.6",
+ "description": "Operator use ToNumber from length.\nIf Type(value) is Object, evaluate ToPrimitive(value, Number)",
+ "test": "var obj = {};\nobj.pop = Array.prototype.pop;\n\n//CHECK#1\nobj[0] = -1;\nobj.length = {valueOf: function() {return 1}};\nvar pop = obj.pop();\nif (pop !== -1) {\n $ERROR('#1: obj[0] = -1; obj.length = {valueOf: function() {return 1}} obj.pop() === -1. Actual: ' + (pop));\n}\n\n//CHECK#2\nobj[0] = -1;\nobj.length = {valueOf: function() {return 1}, toString: function() {return 0}};\nvar pop = obj.pop();\nif (pop !== -1) {\n $ERROR('#0: obj[0] = -1; obj.length = {valueOf: function() {return 1}, toString: function() {return 0}} obj.pop() === -1. Actual: ' + (pop));\n} \n\n//CHECK#3\nobj[0] = -1;\nobj.length = {valueOf: function() {return 1}, toString: function() {return {}}};\nvar pop = obj.pop();\nif (pop !== -1) {\n $ERROR('#3: obj[0] = -1; obj.length = {valueOf: function() {return 1}, toString: function() {return {}}} obj.pop() === -1. Actual: ' + (pop));\n}\n\n//CHECK#4\ntry { \n obj[0] = -1;\n obj.length = {valueOf: function() {return 1}, toString: function() {throw \"error\"}}; \n var pop = obj.pop();\nif (pop !== -1) {\n $ERROR('#4.1: obj[0] = -1; obj.length = {valueOf: function() {return 1}, toString: function() {throw \"error\"}}; obj.pop() === \",\". Actual: ' + (pop));\n }\n}\ncatch (e) {\n if (e === \"error\") {\n $ERROR('#4.2: obj[0] = -1; obj.length = {valueOf: function() {return 1}, toString: function() {throw \"error\"}}; obj.pop() not throw \"error\"');\n } else {\n $ERROR('#4.3: obj[0] = -1; obj.length = {valueOf: function() {return 1}, toString: function() {throw \"error\"}}; obj.pop() not throw Error. Actual: ' + (e));\n }\n}\n\n//CHECK#5\nobj[0] = -1;\nobj.length = {toString: function() {return 0}};\nvar pop = obj.pop();\nif (pop !== undefined) {\n $ERROR('#5: obj[0] = -1; obj.length = {toString: function() {return 0}} obj.pop() === undefined. Actual: ' + (pop));\n}\n\n//CHECK#6\nobj[0] = -1;\nobj.length = {valueOf: function() {return {}}, toString: function() {return 0}}\nvar pop = obj.pop();\nif (pop !== undefined) {\n $ERROR('#6: obj[0] = -1; obj.length = {valueOf: function() {return {}}, toString: function() {return 0}} obj.pop() === undefined. Actual: ' + (pop));\n}\n\n//CHECK#7\ntry {\n obj[0] = -1;\n obj.length = {valueOf: function() {throw \"error\"}, toString: function() {return 0}}; \n var pop = obj.pop();\n $ERROR('#7.1: obj[0] = -1; obj.length = {valueOf: function() {throw \"error\"}, toString: function() {return 0}}; obj.pop() throw \"error\". Actual: ' + (pop));\n} \ncatch (e) {\n if (e !== \"error\") {\n $ERROR('#7.2: obj[0] = -1; obj.length = {valueOf: function() {throw \"error\"}, toString: function() {return 0}}; obj.pop() throw \"error\". Actual: ' + (e));\n } \n}\n\n//CHECK#8\ntry {\n obj[0] = -1;\n obj.length = {valueOf: function() {return {}}, toString: function() {return {}}};\n var pop = obj.pop();\n $ERROR('#8.1: obj[0] = -1; obj.length = {valueOf: function() {return {}}, toString: function() {return {}}} obj.pop() throw TypeError. Actual: ' + (pop));\n} \ncatch (e) {\n if ((e instanceof TypeError) !== true) {\n $ERROR('#8.2: obj[0] = -1; obj.length = {valueOf: function() {return {}}, toString: function() {return {}}} obj.pop() throw TypeError. Actual: ' + (e));\n } \n}\n",
+ "id": "S15.4.4.6_A2_T4"
+ },
+ {
+ "section": "15.4.4.6",
+ "description": "length = 4294967296",
+ "test": "var obj = {};\nobj.pop = Array.prototype.pop;\nobj[0] = \"x\";\nobj[4294967295] = \"y\";\nobj.length = 4294967296;\n\n//CHECK#1\nvar pop = obj.pop();\nif (pop !== undefined) {\n $ERROR('#1: var obj = {}; obj.pop = Array.prototype.pop; obj[0] = \"x\"; obj[4294967295] = \"y\"; obj.length = 4294967296; obj.pop() === unedfined. Actual: ' + (pop));\n}\n\n//CHECK#2\nif (obj.length !== 0) {\n $ERROR('#2: var obj = {}; obj.pop = Array.prototype.pop; obj[0] = \"x\"; obj[4294967295] = \"y\"; obj.length = 4294967296; obj.pop(); obj.length === 0. Actual: ' + (obj.length));\n}\n\n//CHECK#3\nif (obj[0] !== \"x\") {\n $ERROR('#3: var obj = {}; obj.pop = Array.prototype.pop; obj[0] = \"x\"; obj[4294967295] = \"y\"; obj.length = 4294967296; obj.pop(); obj[0] === \"x\". Actual: ' + (obj[0]));\n} \n\n//CHECK#4\nif (obj[4294967295] !== \"y\") {\n $ERROR('#4: var obj = {}; obj.pop = Array.prototype.pop; obj[0] = \"x\"; obj[4294967295] = \"y\"; obj.length = 4294967296; obj.pop(); obj[4294967295] === \"y\". Actual: ' + (obj[4294967295]));\n} \n",
+ "id": "S15.4.4.6_A3_T1"
+ },
+ {
+ "section": "15.4.4.6",
+ "description": "length = 4294967297",
+ "test": "var obj = {};\nobj.pop = Array.prototype.pop;\nobj[0] = \"x\";\nobj[4294967296] = \"y\";\nobj.length = 4294967297;\n\n//CHECK#1\nvar pop = obj.pop();\nif (pop !== \"x\") {\n $ERROR('#1: var obj = {}; obj.pop = Array.prototype.pop; obj[0] = \"x\"; obj[4294967296] = \"y\"; obj.length = 4294967297; obj.pop() === \"x\". Actual: ' + (pop));\n}\n\n//CHECK#2\nif (obj.length !== 0) {\n $ERROR('#2: var obj = {}; obj.pop = Array.prototype.pop; obj[0] = \"x\"; obj[4294967296] = \"y\"; obj.length = 4294967297; obj.pop(); obj.length === 0. Actual: ' + (obj.length));\n}\n\n//CHECK#3\nif (obj[0] !== undefined) {\n $ERROR('#3: var obj = {}; obj.pop = Array.prototype.pop; obj[0] = \"x\"; obj[4294967296] = \"y\"; obj.length = 4294967297; obj.pop(); obj[0] === undefined. Actual: ' + (obj[0]));\n}\n\n//CHECK#4\nif (obj[4294967296] !== \"y\") {\n $ERROR('#4: var obj = {}; obj.pop = Array.prototype.pop; obj[0] = \"x\"; obj[4294967296] = \"y\"; obj.length = 4294967297; obj.pop(); obj[4294967296] === \"y\". Actual: ' + (obj[4294967296]));\n} \n",
+ "id": "S15.4.4.6_A3_T2"
+ },
+ {
+ "section": "15.4.4.6",
+ "description": "length = -1",
+ "test": "var obj = {};\nobj.pop = Array.prototype.pop;\nobj[4294967294] = \"x\";\nobj.length = -1;\n\n//CHECK#1\nvar pop = obj.pop();\nif (pop !== \"x\") {\n $ERROR('#1: var obj = {}; obj.pop = Array.prototype.pop; obj[4294967294] = \"x\"; obj.length = -1; obj.pop() === \"x\". Actual: ' + (pop));\n}\n\n//CHECK#2\nif (obj.length !== 4294967294) {\n $ERROR('#2: var obj = {}; obj.pop = Array.prototype.pop; obj[4294967294] = \"x\"; obj.length = -1; obj.pop(); obj.length === 4294967294. Actual: ' + (obj.length));\n}\n\n//CHECK#3\nif (obj[4294967294] !== undefined) {\n $ERROR('#3: var obj = {}; obj.pop = Array.prototype.pop; obj[4294967294] = \"x\"; obj.length = -1; obj.pop(); obj[4294967294] === undefined. Actual: ' + (obj[4294967294]));\n} \n",
+ "id": "S15.4.4.6_A3_T3"
+ },
+ {
+ "section": "15.4.4.6, 8.6.2.1, 8.6.2.5",
+ "description": "[[Prototype]] of Array instance is Array.prototype, [[Prototype] of Array.prototype is Object.prototype",
+ "test": "Array.prototype[1] = 1;\nvar x = [0];\nx.length = 2;\n\n//CHECK#1\nvar pop = x.pop();\nif (pop !== 1) { \n $ERROR('#1: Array.prototype[1] = 1; x = [0]; x.length = 2; x.pop() === 1. Actual: ' + (pop)); \n}\n\n//CHECK#2\nif (x[1] !== 1) { \n $ERROR('#2: Array.prototype[1] = 1; x = [0]; x.length = 2; x.pop(); x[1] === 1. Actual: ' + (x[1])); \n}\n\nObject.prototype[1] = 1;\nObject.prototype.length = 2;\nObject.prototype.pop = Array.prototype.pop;\nx = {0:0};\n\n//CHECK#3\nvar pop = x.pop();\nif (pop !== 1) { \n $ERROR('#3: Object.prototype[1] = 1; Object.prototype.length = 2; Object.prototype.pop = Array.prototype.pop; x = {0:0}; x.pop() === 1. Actual: ' + (pop)); \n}\n\n//CHECK#4\nif (x[1] !== 1) { \n $ERROR('#4: Object.prototype[1] = 1; Object.prototype.length = 2; Object.prototype.pop = Array.prototype.pop; x = {0:0}; x.pop(); x[1] === 1. Actual: ' + (x[1])); \n}\n\n//CHECK#6\nif (x.length !== 1) { \n $ERROR('#6: Object.prototype[1] = 1; Object.prototype.length = 2; Object.prototype.pop = Array.prototype.pop; x = {0:0}; x.pop(); x.length === 1. Actual: ' + (x.length)); \n}\n\n//CHECK#7\ndelete x.length;\nif (x.length !== 2) { \n $ERROR('#7: Object.prototype[1] = 1; Object.prototype.length = 2; Object.prototype.pop = Array.prototype.pop; x = {0:0}; x.pop(); delete x; x.length === 2. Actual: ' + (x.length)); \n}\n",
+ "id": "S15.4.4.6_A4_T1"
+ },
+ {
+ "section": "15.4.4.6, 8.6.2.1",
+ "description": "[[Prototype]] of Array instance is Array.prototype, [[Prototype] of Array.prototype is Object.prototype",
+ "test": "Array.prototype[1] = -1;\nvar x = [0,1];\nx.length = 2;\n\n//CHECK#1\nvar pop = x.pop();\nif (pop !== 1) { \n $ERROR('#1: Array.prototype[1] = -1; x = [0,1]; x.length = 2; x.pop() === 1. Actual: ' + (pop)); \n}\n\n//CHECK#2\nif (x[1] !== -1) { \n $ERROR('#2: Array.prototype[1] = -1; x = [0,1]; x.length = 2; x.pop(); x[1] === -1. Actual: ' + (x[1])); \n}\n\nObject.prototype[1] = -1;\nObject.prototype.length = 2;\nObject.prototype.pop = Array.prototype.pop;\nx = {0:0,1:1};\n\n//CHECK#3\nvar pop = x.pop();\nif (pop !== 1) { \n $ERROR('#3: Object.prototype[1] = -1; Object.prototype.length = 2; Object.prototype.pop = Array.prototype.pop; x = {0:0,1:1}; x.pop() === 1. Actual: ' + (pop)); \n}\n\n//CHECK#4\nif (x[1] !== -1) { \n $ERROR('#4: Object.prototype[1] = -1; Object.prototype.length = 2; Object.prototype.pop = Array.prototype.pop; x = {0:0,1:1}; x.pop(); x[1] === -1. Actual: ' + (x[1])); \n}\n\n//CHECK#6\nif (x.length !== 1) { \n $ERROR('#6: Object.prototype[1] = -1; Object.prototype.length = 2; Object.prototype.pop = Array.prototype.pop; x = {0:0,1:1}; x.pop(); x.length === 1. Actual: ' + (x.length)); \n}\n\n//CHECK#7\ndelete x.length;\nif (x.length !== 2) { \n $ERROR('#7: Object.prototype[1] = -1; Object.prototype.length = 2; Object.prototype.pop = Array.prototype.pop; x = {0:0,1:1}; x.pop(); delete x; x.length === 2. Actual: ' + (x.length)); \n}\n",
+ "id": "S15.4.4.6_A4_T2"
+ },
+ {
+ "section": "15.4.4.6, 15.2.4.7, 12.6.4",
+ "description": "Checking use propertyIsEnumerable, for-in",
+ "test": "//CHECK#1\nif (Array.prototype.pop.propertyIsEnumerable('length') !== false) {\n $ERROR('#1: Array.prototype.pop.propertyIsEnumerable(\\'length\\') === false. Actual: ' + (Array.prototype.pop.propertyIsEnumerable('length')));\n}\n\n//CHECK#2\nvar result = true;\nfor (var p in Array.pop){\n if (p === \"length\") {\n result = false;\n } \n}\n\nif (result !== true) {\n $ERROR('#2: result = true; for (p in Array.pop) { if (p === \"length\") result = false; } result === true;');\n}\n\n",
+ "id": "S15.4.4.6_A5.1"
+ },
+ {
+ "section": "15.4.4.6, 15.2.4.5, 11.4.1",
+ "description": "Checking use hasOwnProperty, delete",
+ "strict_mode_negative": "",
+ "test": "//CHECK#1\nif (Array.prototype.pop.hasOwnProperty('length') !== true) {\n $FAIL('#1: Array.prototype.pop.hasOwnProperty(\\'length\\') === true. Actual: ' + (Array.prototype.pop.hasOwnProperty('length')));\n}\n\ndelete Array.prototype.pop.length;\n\n//CHECK#2\nif (Array.prototype.pop.hasOwnProperty('length') !== true) {\n $ERROR('#2: delete Array.prototype.pop.length; Array.prototype.pop.hasOwnProperty(\\'length\\') === true. Actual: ' + (Array.prototype.pop.hasOwnProperty('length')));\n}\n\n//CHECK#3\nif (Array.prototype.pop.length === undefined) {\n $ERROR('#3: delete Array.prototype.pop.length; Array.prototype.pop.length !== undefined');\n}\n\n\n",
+ "id": "S15.4.4.6_A5.2",
+ "strict_only": ""
+ },
+ {
+ "section": "15.4.4.6",
+ "description": "Checking if varying the length property fails",
+ "strict_mode_negative": "",
+ "test": "//CHECK#1\nvar x = Array.prototype.pop.length;\nArray.prototype.pop.length = Infinity;\nif (Array.prototype.pop.length !== x) {\n $ERROR('#1: x = Array.prototype.pop.length; Array.prototype.pop.length = Infinity; Array.prototype.pop.length === x. Actual: ' + (Array.prototype.pop.length));\n}\n\n",
+ "id": "S15.4.4.6_A5.3",
+ "strict_only": ""
+ },
+ {
+ "section": "15.4.4.6",
+ "description": "pop.length === 1",
+ "test": "//CHECK#1\nif (Array.prototype.pop.length !== 0) {\n $ERROR('#1: Array.prototype.pop.length === 0. Actual: ' + (Array.prototype.pop.length));\n}\n\n",
+ "id": "S15.4.4.6_A5.4"
+ },
+ {
+ "section": "15.4.4.6, 15.2.4.7, 12.6.4",
+ "description": "Checking use propertyIsEnumerable, for-in",
+ "test": "//CHECK#1\nif (Array.propertyIsEnumerable('pop') !== false) {\n $ERROR('#1: Array.propertyIsEnumerable(\\'pop\\') === false. Actual: ' + (Array.propertyIsEnumerable('pop')));\n}\n\n//CHECK#2\nvar result = true;\nfor (var p in Array){\n if (p === \"pop\") {\n result = false;\n } \n}\n\nif (result !== true) {\n $ERROR('#2: result = true; for (p in Array) { if (p === \"pop\") result = false; } result === true;');\n}\n\n",
+ "id": "S15.4.4.6_A5.5"
+ },
+ {
+ "section": "15.4.4.6",
+ "description": "Checking Array.prototype.pop.prototype",
+ "test": "//CHECK#1\nif (Array.prototype.pop.prototype !== undefined) {\n $ERROR('#1: Array.prototype.pop.prototype === undefined. Actual: ' + (Array.prototype.pop.prototype));\n}\n",
+ "id": "S15.4.4.6_A5.6"
+ },
+ {
+ "section": "15.4.4.6, 11.2.2",
+ "description": "If property does not implement the internal [[Construct]] method, throw a TypeError exception",
+ "test": "//CHECK#1\n\ntry {\n new Array.prototype.pop();\n $ERROR('#1.1: new Array.prototype.pop() throw TypeError. Actual: ' + (new Array.prototype.pop()));\n} catch (e) {\n if ((e instanceof TypeError) !== true) {\n $ERROR('#1.2: new Array.prototype.pop() throw TypeError. Actual: ' + (e));\n }\n}\n",
+ "id": "S15.4.4.6_A5.7"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.4.4.7_Array_prototype_push.json b/website/resources/scripts/testcases2/15.4.4.7_Array_prototype_push.json
new file mode 100644
index 000000000..9f8df13c4
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.4.4.7_Array_prototype_push.json
@@ -0,0 +1,114 @@
+{
+ "testCollection": {
+ "name": "15.4.4.7_Array_prototype_push",
+ "numTests": 17,
+ "tests": [
+ {
+ "section": "15.4.4.7",
+ "description": "Checking case when push is given no arguments or one argument",
+ "test": "//CHECK#1\nvar x = new Array();\nvar push = x.push(1);\nif (push !== 1) {\n $ERROR('#1: x = new Array(); x.push(1) === 1. Actual: ' + (push));\n} \n\n//CHECK#2\nif (x[0] !== 1) {\n $ERROR('#2: x = new Array(); x.push(1); x[0] === 1. Actual: ' + (x[0]));\n}\n\n//CHECK#3\nvar push = x.push();\nif (push !== 1) {\n $ERROR('#3: x = new Array(); x.push(1); x.push() === 1. Actual: ' + (push));\n}\n\n//CHECK#4\nif (x[1] !== undefined) {\n $ERROR('#4: x = new Array(); x.push(1); x.push(); x[1] === unedfined. Actual: ' + (x[1]));\n}\n\n//CHECK#5\nvar push = x.push(-1);\nif (push !== 2) {\n $ERROR('#5: x = new Array(); x.push(1); x.push(); x.push(-1) === 2. Actual: ' + (push));\n}\n\n//CHECK#6\nif (x[1] !== -1) {\n $ERROR('#6: x = new Array(); x.push(1); x.push(-1); x[1] === -1. Actual: ' + (x[1]));\n}\n\n//CHECK#7\nif (x.length !== 2) {\n $ERROR('#7: x = new Array(); x.push(1); x.push(); x.push(-1); x.length === 2. Actual: ' + (x.length));\n} \n",
+ "id": "S15.4.4.7_A1_T1"
+ },
+ {
+ "section": "15.4.4.7",
+ "description": "Checking case when push is given many arguments",
+ "test": "//CHECK#1\nvar x = [];\nif (x.length !== 0) {\n $ERROR('#1: x = []; x.length === 0. Actual: ' + (x.length));\n}\n\n//CHECK#2\nx[0] = 0;\nvar push = x.push(true, Number.POSITIVE_INFINITY, \"NaN\", \"1\", -1);\nif (push !== 6) {\n $ERROR('#2: x = []; x[0] = 0; x.push(true, Number.POSITIVE_INFINITY, \"NaN\", \"1\", -1) === 6. Actual: ' + (push));\n} \n\n//CHECK#3\nif (x[0] !== 0) {\n $ERROR('#3: x = []; x[0] = 0; x.push(true, Number.POSITIVE_INFINITY, \"NaN\", \"1\", -1); x[0] === 0. Actual: ' + (x[0]));\n}\n\n//CHECK#4\nif (x[1] !== true) {\n $ERROR('#4: x = []; x[0] = 0; x.push(true, Number.POSITIVE_INFINITY, \"NaN\", \"1\", -1); x[1] === true. Actual: ' + (x[1]));\n}\n\n//CHECK#5\nif (x[2] !== Number.POSITIVE_INFINITY) {\n $ERROR('#5: x = []; x[0] = 0; x.push(true, Number.POSITIVE_INFINITY, \"NaN\", \"1\", -1); x[2] === Number.POSITIVE_INFINITY. Actual: ' + (x[2]));\n} \n\n//CHECK#6\nif (x[3] !== \"NaN\") {\n $ERROR('#6: x = []; x[0] = 0; x.push(true, Number.POSITIVE_INFINITY, \"NaN\", \"1\", -1); x[3] === \"NaN\". Actual: ' + (x[3]));\n} \n\n//CHECK#7\nif (x[4] !== \"1\") {\n $ERROR('#7: x = []; x[0] = 0; x.push(true, Number.POSITIVE_INFINITY, \"NaN\", \"1\", -1); x[4] === \"1\". Actual: ' + (x[4]));\n}\n\n//CHECK#8\nif (x[5] !== -1) {\n $ERROR('#8: x = []; x[0] = 0; x.push(true, Number.POSITIVE_INFINITY, \"NaN\", \"1\", -1); x[5] === -1. Actual: ' + (x[5]));\n}\n\n//CHECK#9\nif (x.length !== 6) {\n $ERROR('#9: x = []; x[0] = 0; x.push(true, Number.POSITIVE_INFINITY, \"NaN\", \"1\", -1); x.length === 6. Actual: ' + (x.length));\n}\n",
+ "id": "S15.4.4.7_A1_T2"
+ },
+ {
+ "section": "15.4.4.7",
+ "description": "The arguments are appended to the end of the array, in\nthe order in which they appear. The new length of the array is returned\nas the result of the call",
+ "test": "var obj = {};\nobj.push = Array.prototype.push;\n\nif (obj.length !== undefined) {\n $ERROR('#0: var obj = {}; obj.length === undefined. Actual: ' + (obj.length));\n} else {\n //CHECK#1 \n var push = obj.push(-1);\nif (push !== 1) {\n $ERROR('#1: var obj = {}; obj.push = Array.prototype.push; obj.push(-1) === 1. Actual: ' + (push));\n }\n //CHECK#2\n if (obj.length !== 1) {\n $ERROR('#2: var obj = {}; obj.push = Array.prototype.push; obj.push(-1); obj.length === 1. Actual: ' + (obj.length));\n }\n //CHECK#3\n if (obj[\"0\"] !== -1) {\n $ERROR('#3: var obj = {}; obj.push = Array.prototype.push; obj.push(-1); obj[\"0\"] === -1. Actual: ' + (obj[\"0\"]));\n }\n} \n\n//CHECK#4\nobj.length = undefined;\nvar push = obj.push(-4);\nif (push !== 1) {\n $ERROR('#4: var obj = {}; obj.length = undefined; obj.push = Array.prototype.push; obj.push(-4) === 1. Actual: ' + (push));\n} \n\n//CHECK#5\nif (obj.length !== 1) {\n $ERROR('#5: var obj = {}; obj.length = undefined; obj.push = Array.prototype.push; obj.push(-4); obj.length === 1. Actual: ' + (obj.length));\n}\n\n//CHECK#6\nif (obj[\"0\"] !== -4) {\n $ERROR('#6: var obj = {}; obj.length = undefined; obj.push = Array.prototype.push; obj.push(-4); obj[\"0\"] === -4. Actual: ' + (obj[\"0\"]));\n}\n\n//CHECK#7\nobj.length = null\nvar push = obj.push(-7);\nif (push !== 1) {\n $ERROR('#7: var obj = {}; obj.length = null; obj.push = Array.prototype.push; obj.push(-7) === 1. Actual: ' + (push));\n} \n\n//CHECK#8\nif (obj.length !== 1) {\n $ERROR('#8: var obj = {}; obj.length = null; obj.push = Array.prototype.push; obj.push(-7); obj.length === 1. Actual: ' + (obj.length));\n}\n\n//CHECK#9\nif (obj[\"0\"] !== -7) {\n $ERROR('#9: var obj = {}; obj.length = null; obj.push = Array.prototype.push; obj.push(-7); obj[\"0\"] === -7. Actual: ' + (obj[\"0\"]));\n}\n",
+ "id": "S15.4.4.7_A2_T1"
+ },
+ {
+ "section": "15.4.4.7",
+ "description": "The arguments are appended to the end of the array, in\nthe order in which they appear. The new length of the array is returned\nas the result of the call",
+ "test": "var obj = {};\nobj.push = Array.prototype.push;\n\n//CHECK#1\nobj.length = NaN;\nvar push = obj.push(-1);\nif (push !== 1) {\n $ERROR('#1: var obj = {}; obj.length = NaN; obj.push = Array.prototype.push; obj.push(-1) === 1. Actual: ' + (push));\n}\n\n//CHECK#2\nif (obj.length !== 1) {\n $ERROR('#2: var obj = {}; obj.length = NaN; obj.push = Array.prototype.push; obj.push(-1); obj.length === 1. Actual: ' + (obj.length));\n}\n\n//CHECK#3\nif (obj[\"0\"] !== -1) {\n $ERROR('#3: var obj = {}; obj.length = NaN; obj.push = Array.prototype.push; obj.push(-1); obj[\"0\"] === -1. Actual: ' + (obj[\"0\"]));\n}\n\n//CHECK#4\nobj.length = Number.POSITIVE_INFINITY;\nvar push = obj.push(-4);\nif (push !== 1) {\n $ERROR('#4: var obj = {}; obj.length = Number.POSITIVE_INFINITY; obj.push = Array.prototype.push; obj.push(-4) === 1. Actual: ' + (push));\n}\n\n//CHECK#5\nif (obj.length !== 1) {\n $ERROR('#6: var obj = {}; obj.length = Number.POSITIVE_INFINITY; obj.push = Array.prototype.push; obj.push(-4); obj.length === 1. Actual: ' + (obj.length));\n}\n\n//CHECK#6\nif (obj[\"0\"] !== -4) {\n $ERROR('#6: var obj = {}; obj.length = Number.POSITIVE_INFINITY; obj.push = Array.prototype.push; obj.push(-4); obj[\"0\"] === -4. Actual: ' + (obj[\"0\"]));\n}\n\n//CHECK#7\nobj.length = Number.NEGATIVE_INFINITY;\nvar push = obj.push(-7);\nif (push !== 1) {\n $ERROR('#7: var obj = {}; obj.length = Number.NEGATIVE_INFINITY; obj.push = Array.prototype.push; obj.push(-7) === 1. Actual: ' + (push));\n}\n\n//CHECK#8\nif (obj.length !== 1) {\n $ERROR('#8: var obj = {}; obj.length = Number.NEGATIVE_INFINITY; obj.push = Array.prototype.push; obj.push(-7); obj.length === 1. Actual: ' + (obj.length));\n}\n\n//CHECK#9\nif (obj[\"0\"] !== -7) {\n $ERROR('#9: var obj = {}; obj.length = Number.NEGATIVE_INFINITY; obj.push = Array.prototype.push; obj.push(-7); obj[\"0\"] === -7. Actual: ' + (obj[\"0\"]));\n}\n\n//CHECK#10\nobj.length = 0.5;\nvar push = obj.push(-10);\nif (push !== 1) {\n $ERROR('#10: var obj = {}; obj.length = 0.5; obj.push = Array.prototype.push; obj.push(-10) === 1. Actual: ' + (push));\n}\n\n//CHECK#11\nif (obj.length !== 1) {\n $ERROR('#11: var obj = {}; obj.length = 0.5; obj.push = Array.prototype.push; obj.push(-10); obj.length === 1. Actual: ' + (obj.length));\n} \n\n//CHECK#12\nif (obj[\"0\"] !== -10) {\n $ERROR('#12: var obj = {}; obj.length = 0.5; obj.push = Array.prototype.push; obj.push(-10); obj[\"0\"] === -10. Actual: ' + (obj[\"0\"]));\n}\n\n//CHECK#13\nobj.length = 1.5;\nvar push = obj.push(-13);\nif (push !== 2) {\n $ERROR('#13: var obj = {}; obj.length = 1.5; obj.push = Array.prototype.push; obj.push(-13) === 2. Actual: ' + (push));\n}\n\n//CHECK#14\nif (obj.length !== 2) {\n $ERROR('#14: var obj = {}; obj.length = 1.5; obj.push = Array.prototype.push; obj.push(-13); obj.length === 2. Actual: ' + (obj.length));\n} \n\n//CHECK#15\nif (obj[\"1\"] !== -13) {\n $ERROR('#15: var obj = {}; obj.length = 1.5; obj.push = Array.prototype.push; obj.push(-13); obj[\"1\"] === -13. Actual: ' + (obj[\"1\"]));\n}\n\n//CHECK#16\nobj.length = new Number(0);\nvar push = obj.push(-16);\nif (push !== 1) {\n $ERROR('#16: var obj = {}; obj.length = new Number(0); obj.push = Array.prototype.push; obj.push(-16) === 1. Actual: ' + (push));\n}\n\n//CHECK#17\nif (obj.length !== 1) {\n $ERROR('#17: var obj = {}; obj.length = new Number(0); obj.push = Array.prototype.push; obj.push(-16); obj.length === 1. Actual: ' + (obj.length));\n}\n\n//CHECK#18\nif (obj[\"0\"] !== -16) {\n $ERROR('#18: var obj = {}; obj.length = new Number(0); obj.push = Array.prototype.push; obj.push(-16); obj[\"0\"] === -16. Actual: ' + (obj[\"0\"]));\n} \n",
+ "id": "S15.4.4.7_A2_T2"
+ },
+ {
+ "section": "15.4.4.7",
+ "description": "Operator use ToNumber from length.\nIf Type(value) is Object, evaluate ToPrimitive(value, Number)",
+ "test": "var obj = {};\nobj.push = Array.prototype.push;\n\n//CHECK#1\nobj.length = {valueOf: function() {return 3}};\nvar push = obj.push();\nif (push !== 3) {\n $ERROR('#1: obj.length = {valueOf: function() {return 3}} obj.push() === 3. Actual: ' + (push));\n}\n\n//CHECK#2\nobj.length = {valueOf: function() {return 3}, toString: function() {return 1}};\nvar push = obj.push();\nif (push !== 3) {\n $ERROR('#0: obj.length = {valueOf: function() {return 3}, toString: function() {return 1}} obj.push() === 3. Actual: ' + (push));\n} \n\n//CHECK#3\nobj.length = {valueOf: function() {return 3}, toString: function() {return {}}};\nvar push = obj.push();\nif (push !== 3) {\n $ERROR('#1: obj.length = {valueOf: function() {return 3}, toString: function() {return {}}} obj.push() === 3. Actual: ' + (push));\n}\n\n//CHECK#4\ntry { \n \n obj.length = {valueOf: function() {return 3}, toString: function() {throw \"error\"}}; \n var push = obj.push();\nif (push !== 3) {\n $ERROR('#4.1: obj.length = {valueOf: function() {return 3}, toString: function() {throw \"error\"}}; obj.push() === \",\". Actual: ' + (push));\n }\n}\ncatch (e) {\n if (e === \"error\") {\n $ERROR('#4.2: obj.length = {valueOf: function() {return 3}, toString: function() {throw \"error\"}}; obj.push() not throw \"error\"');\n } else {\n $ERROR('#4.3: obj.length = {valueOf: function() {return 3}, toString: function() {throw \"error\"}}; obj.push() not throw Error. Actual: ' + (e));\n }\n}\n\n//CHECK#5\nobj.length = {toString: function() {return 1}};\nvar push = obj.push();\nif (push !== 1) {\n $ERROR('#5: obj.length = {toString: function() {return 1}} obj.push() === 1. Actual: ' + (push));\n}\n\n//CHECK#6\nobj.length = {valueOf: function() {return {}}, toString: function() {return 1}}\nvar push = obj.push();\nif (push !== 1) {\n $ERROR('#6: obj.length = {valueOf: function() {return {}}, toString: function() {return 1}} obj.push() === 1. Actual: ' + (push));\n}\n\n//CHECK#7\ntry {\n \n obj.length = {valueOf: function() {throw \"error\"}, toString: function() {return 1}}; \n var push = obj.push();\n $ERROR('#7.1: obj.length = {valueOf: function() {throw \"error\"}, toString: function() {return 1}}; obj.push() throw \"error\". Actual: ' + (push));\n} \ncatch (e) {\n if (e !== \"error\") {\n $ERROR('#7.2: obj.length = {valueOf: function() {throw \"error\"}, toString: function() {return 1}}; obj.push() throw \"error\". Actual: ' + (e));\n } \n}\n\n//CHECK#8\ntry {\n \n obj.length = {valueOf: function() {return {}}, toString: function() {return {}}};\n var push = obj.push();\n $ERROR('#8.1: obj.length = {valueOf: function() {return {}}, toString: function() {return {}}} obj.push() throw TypeError. Actual: ' + (push));\n} \ncatch (e) {\n if ((e instanceof TypeError) !== true) {\n $ERROR('#8.2: obj.length = {valueOf: function() {return {}}, toString: function() {return {}}} obj.push() throw TypeError. Actual: ' + (e));\n } \n}\n",
+ "id": "S15.4.4.7_A2_T3"
+ },
+ {
+ "section": "15.4.4.7",
+ "description": "If ToUint32(length) !== length, throw RangeError",
+ "test": "var x = [];\nx.length = 4294967295;\n\n//CHECK#1\nvar push = x.push();\nif (push !== 4294967295) {\n $ERROR('#1: x = []; x.length = 4294967295; x.push() === 4294967295. Actual: ' + (push));\n}\n\n//CHECK#2\ntry {\n x.push(\"x\");\n $ERROR('#2.1: x = []; x.length = 4294967295; x.push(\"x\") throw RangeError. Actual: ' + (push));\n} catch(e) {\n if ((e instanceof RangeError) !== true) {\n $ERROR('#2.2: x = []; x.length = 4294967295; x.push(\"x\") throw RangeError. Actual: ' + (e));\n }\n}\n\n//CHECK#3\nif (x[4294967295] !== \"x\") {\n $ERROR('#3: x = []; x.length = 4294967295; try {x.push(\"x\")}catch(e){}; x[4294967295] === \"x\". Actual: ' + (x[4294967295]));\n}\n\n//CHECK#4\nif (x.length !== 4294967295) {\n $ERROR('#4: x = []; x.length = 4294967295; try {x.push(\"x\")}catch(e){}; x.length === 4294967295. Actual: ' + (x.length));\n}\n",
+ "id": "S15.4.4.7_A3"
+ },
+ {
+ "section": "15.4.4.7",
+ "description": "length = 4294967296",
+ "test": "var obj = {};\nobj.push = Array.prototype.push;\nobj.length = 4294967296;\n\n//CHECK#1\nvar push = obj.push(\"x\", \"y\", \"z\");\nif (push !== 3) {\n $ERROR('#1: var obj = {}; obj.push = Array.prototype.push; obj.length = 4294967296; obj.push(\"x\", \"y\", \"z\") === 3. Actual: ' + (push));\n}\n\n//CHECK#2\nif (obj.length !== 3) {\n $ERROR('#2: var obj = {}; obj.push = Array.prototype.push; obj.length = 4294967296; obj.push(\"x\", \"y\", \"z\"); obj.length === 3. Actual: ' + (obj.length));\n}\n\n//CHECK#3\nif (obj[0] !== \"x\") {\n $ERROR('#3: var obj = {}; obj.push = Array.prototype.push; obj.length = 4294967296; obj.push(\"x\", \"y\", \"z\"); obj[0] === \"x\". Actual: ' + (obj[0]));\n}\n\n//CHECK#4\nif (obj[1] !== \"y\") {\n $ERROR('#4: var obj = {}; obj.push = Array.prototype.push; obj.length = 4294967296; obj.push(\"x\", \"y\", \"z\"); obj[1] === \"y\". Actual: ' + (obj[1]));\n} \n\n//CHECK#5\nif (obj[2] !== \"z\") {\n $ERROR('#5: var obj = {}; obj.push = Array.prototype.push; obj.length = 4294967296; obj.push(\"x\", \"y\", \"z\"); obj[2] === \"z\". Actual: ' + (obj[2]));\n} \n\nvar obj = {};\nobj.push = Array.prototype.push;\nobj.length = 4294967296;\n\n//CHECK#6\nvar push = obj.push();\nif (push !== 0) {\n $ERROR('#6: var obj = {}; obj.push = Array.prototype.push; obj.length = 4294967296; obj.push() === 0. Actual: ' + (push));\n}\n\n//CHECK#7\nif (obj.length !== 0) {\n $ERROR('#7: var obj = {}; obj.push = Array.prototype.push; obj.length = 4294967296; obj.push(); obj.length === 0. Actual: ' + (obj.length));\n} \n",
+ "id": "S15.4.4.7_A4_T1"
+ },
+ {
+ "section": "15.4.4.7",
+ "description": "length = 4294967295",
+ "test": "var obj = {};\nobj.push = Array.prototype.push;\nobj.length = 4294967295;\n\n//CHECK#1\nvar push = obj.push(\"x\", \"y\", \"z\");\nif (push !== 4294967298) {\n $ERROR('#1: var obj = {}; obj.push = Array.prototype.push; obj.length = 4294967295; obj.push(\"x\", \"y\", \"z\") === 4294967298. Actual: ' + (push));\n}\n\n//CHECK#2\nif (obj.length !== 4294967298) {\n $ERROR('#2: var obj = {}; obj.push = Array.prototype.push; obj.length = 4294967295; obj.push(\"x\", \"y\", \"z\"); obj.length === 4294967298. Actual: ' + (obj.length));\n}\n\n//CHECK#3\nif (obj[4294967295] !== \"x\") {\n $ERROR('#3: var obj = {}; obj.push = Array.prototype.push; obj.length = 4294967295; obj.push(\"x\", \"y\", \"z\"); obj[4294967295] === \"x\". Actual: ' + (obj[4294967295]));\n}\n\n//CHECK#4\nif (obj[4294967296] !== \"y\") {\n $ERROR('#4: var obj = {}; obj.push = Array.prototype.push; obj.length = 4294967295; obj.push(\"x\", \"y\", \"z\"); obj[4294967296] === \"y\". Actual: ' + (obj[4294967296]));\n} \n\n//CHECK#5\nif (obj[4294967297] !== \"z\") {\n $ERROR('#5: var obj = {}; obj.push = Array.prototype.push; obj.length = 4294967295; obj.push(\"x\", \"y\", \"z\"); obj[4294967297] === \"z\". Actual: ' + (obj[4294967297]));\n} \n",
+ "id": "S15.4.4.7_A4_T2"
+ },
+ {
+ "section": "15.4.4.7",
+ "description": "length = -1",
+ "test": "var obj = {};\nobj.push = Array.prototype.push;\nobj.length = -1;\n\n//CHECK#1\nvar push = obj.push(\"x\", \"y\", \"z\");\nif (push !== 4294967298) {\n $ERROR('#1: var obj = {}; obj.push = Array.prototype.push; obj.length = -1; obj.push(\"x\", \"y\", \"z\") === 4294967298. Actual: ' + (push));\n}\n\n//CHECK#2\nif (obj.length !== 4294967298) {\n $ERROR('#2: var obj = {}; obj.push = Array.prototype.push; obj.length = -1; obj.push(\"x\", \"y\", \"z\"); obj.length === 4294967298. Actual: ' + (obj.length));\n}\n\n//CHECK#3\nif (obj[4294967295] !== \"x\") {\n $ERROR('#3: var obj = {}; obj.push = Array.prototype.push; obj.length = -1; obj.push(\"x\", \"y\", \"z\"); obj[4294967295] === \"x\". Actual: ' + (obj[4294967295]));\n}\n\n//CHECK#4\nif (obj[4294967296] !== \"y\") {\n $ERROR('#4: var obj = {}; obj.push = Array.prototype.push; obj.length = -1; obj.push(\"x\", \"y\", \"z\"); obj[4294967296] === \"y\". Actual: ' + (obj[4294967296]));\n} \n\n//CHECK#5\nif (obj[4294967297] !== \"z\") {\n $ERROR('#5: var obj = {}; obj.push = Array.prototype.push; obj.length = -1; obj.push(\"x\", \"y\", \"z\"); obj[4294967297] === \"z\". Actual: ' + (obj[4294967297]));\n} \n",
+ "id": "S15.4.4.7_A4_T3"
+ },
+ {
+ "section": "15.4.4.7, 8.6.2.1",
+ "description": "[[Prototype]] of Array instance is Array.prototype, [[Prototype] of Array.prototype is Object.prototype",
+ "test": "Object.prototype[1] = -1;\nObject.prototype.length = 1;\nObject.prototype.push = Array.prototype.push;\nvar x = {0:0};\n\n//CHECK#1\nvar push = x.push(1);\nif (push !== 2) { \n $ERROR('#1: Object.prototype[1] = 1; Object.prototype.length = -1; Object.prototype.push = Array.prototype.push; x = {0:0}; x.push(1) === 2. Actual: ' + (push)); \n}\n\n//CHECK#2\nif (x.length !== 2) { \n $ERROR('#2: Object.prototype[1] = 1; Object.prototype.length = -1; Object.prototype.push = Array.prototype.push; x = {0:0}; x.push(1); x.length === 2. Actual: ' + (x.length)); \n}\n\n//CHECK#3\nif (x[1] !== 1) { \n $ERROR('#3: Object.prototype[1] = 1; Object.prototype.length = -1; Object.prototype.push = Array.prototype.push; x = {0:0}; x.push(1); x[1] === 1. Actual: ' + (x[1])); \n}\n\n//CHECK#4\ndelete x[1];\nif (x[1] !== -1) { \n $ERROR('#4: Object.prototype[1] = 1; Object.prototype.length = -1; Object.prototype.push = Array.prototype.push; x = {0:0}; x.push(1); delete x[1]; x[1] === -1. Actual: ' + (x[1])); \n}\n\n//CHECK#5\ndelete x.length;\nif (x.length !== 1) { \n $ERROR('#5: Object.prototype[1] = 1; Object.prototype.length = -1; Object.prototype.push = Array.prototype.push; x = {0:0}; delete x; x.push(1); x.length === 1. Actual: ' + (x.length)); \n}\n\n",
+ "id": "S15.4.4.7_A5_T1"
+ },
+ {
+ "section": "15.4.4.7, 15.2.4.7, 12.6.4",
+ "description": "Checking use propertyIsEnumerable, for-in",
+ "test": "//CHECK#1\nif (Array.prototype.push.propertyIsEnumerable('length') !== false) {\n $ERROR('#1: Array.prototype.push.propertyIsEnumerable(\\'length\\') === false. Actual: ' + (Array.prototype.push.propertyIsEnumerable('length')));\n}\n\n//CHECK#2\nvar result = true;\nfor (var p in Array.push){\n if (p === \"length\") {\n result = false;\n } \n}\n\nif (result !== true) {\n $ERROR('#2: result = true; for (p in Array.push) { if (p === \"length\") result = false; } result === true;');\n}\n\n",
+ "id": "S15.4.4.7_A6.1"
+ },
+ {
+ "section": "15.4.4.7, 15.2.4.5, 11.4.1",
+ "description": "Checking use hasOwnProperty, delete",
+ "strict_mode_negative": "",
+ "test": "//CHECK#1\nif (Array.prototype.push.hasOwnProperty('length') !== true) {\n $FAIL('#1: Array.prototype.push.hasOwnProperty(\\'length\\') === true. Actual: ' + (Array.prototype.push.hasOwnProperty('length')));\n}\n\ndelete Array.prototype.push.length;\n\n//CHECK#2\nif (Array.prototype.push.hasOwnProperty('length') !== true) {\n $ERROR('#2: delete Array.prototype.push.length; Array.prototype.push.hasOwnProperty(\\'length\\') === true. Actual: ' + (Array.prototype.push.hasOwnProperty('length')));\n}\n\n//CHECK#3\nif (Array.prototype.push.length === undefined) {\n $ERROR('#3: delete Array.prototype.push.length; Array.prototype.push.length !== undefined');\n}\n\n\n",
+ "id": "S15.4.4.7_A6.2",
+ "strict_only": ""
+ },
+ {
+ "section": "15.4.4.7",
+ "description": "Checking if varying the length property fails",
+ "strict_mode_negative": "",
+ "test": "//CHECK#1\nvar x = Array.prototype.push.length;\nArray.prototype.push.length = Infinity;\nif (Array.prototype.push.length !== x) {\n $ERROR('#1: x = Array.prototype.push.length; Array.prototype.push.length = Infinity; Array.prototype.push.length === x. Actual: ' + (Array.prototype.push.length));\n}\n\n",
+ "id": "S15.4.4.7_A6.3",
+ "strict_only": ""
+ },
+ {
+ "section": "15.4.4.7",
+ "description": "push.length === 1",
+ "test": "//CHECK#1\nif (Array.prototype.push.length !== 1) {\n $ERROR('#1: Array.prototype.push.length === 1. Actual: ' + (Array.prototype.push.length));\n}\n\n",
+ "id": "S15.4.4.7_A6.4"
+ },
+ {
+ "section": "15.4.4.7, 15.2.4.7, 12.6.4",
+ "description": "Checking use propertyIsEnumerable, for-in",
+ "test": "//CHECK#1\nif (Array.propertyIsEnumerable('push') !== false) {\n $ERROR('#1: Array.propertyIsEnumerable(\\'push\\') === false. Actual: ' + (Array.propertyIsEnumerable('push')));\n}\n\n//CHECK#2\nvar result = true;\nfor (var p in Array){\n if (p === \"push\") {\n result = false;\n } \n}\n\nif (result !== true) {\n $ERROR('#2: result = true; for (p in Array) { if (p === \"push\") result = false; } result === true;');\n}\n\n",
+ "id": "S15.4.4.7_A6.5"
+ },
+ {
+ "section": "15.4.4.7",
+ "description": "Checking Array.prototype.push.prototype",
+ "test": "//CHECK#1\nif (Array.prototype.push.prototype !== undefined) {\n $ERROR('#1: Array.prototype.push.prototype === undefined. Actual: ' + (Array.prototype.push.prototype));\n}\n",
+ "id": "S15.4.4.7_A6.6"
+ },
+ {
+ "section": "15.4.4.7, 11.2.2",
+ "description": "If property does not implement the internal [[Construct]] method, throw a TypeError exception",
+ "test": "//CHECK#1\n\ntry {\n new Array.prototype.push();\n $ERROR('#1.1: new Array.prototype.push() throw TypeError. Actual: ' + (new Array.prototype.push()));\n} catch (e) {\n if ((e instanceof TypeError) !== true) {\n $ERROR('#1.2: new Array.prototype.push() throw TypeError. Actual: ' + (e));\n }\n}\n",
+ "id": "S15.4.4.7_A6.7"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.4.4.8_Array_prototype_reverse.json b/website/resources/scripts/testcases2/15.4.4.8_Array_prototype_reverse.json
new file mode 100644
index 000000000..ac4492418
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.4.4.8_Array_prototype_reverse.json
@@ -0,0 +1,114 @@
+{
+ "testCollection": {
+ "name": "15.4.4.8_Array_prototype_reverse",
+ "numTests": 17,
+ "tests": [
+ {
+ "section": "15.4.4.8",
+ "description": "Checking case when reverse is given no arguments or one argument",
+ "test": "//CHECK#1\nvar x = [];\nvar reverse = x.reverse();\nif (reverse !== x) {\n $ERROR('#1: x = []; x.reverse() === x. Actual: ' + (reverse));\n} \n\n//CHECK#2\nx = [];\nx[0] = 1;\nvar reverse = x.reverse();\nif (reverse !== x) {\n $ERROR('#2: x = []; x[0] = 1; x.reverse() === x. Actual: ' + (reverse));\n}\n\n//CHECK#3\nx = new Array(1,2);\nvar reverse = x.reverse();\nif (reverse !== x) {\n $ERROR('#3: x = new Array(1,2); x.reverse() === x. Actual: ' + (reverse));\n}\n\n//CHECK#4\nif (x[0] !== 2) {\n $ERROR('#4: x = new Array(1,2); x.reverse(); x[0] === 2. Actual: ' + (x[0]));\n}\n\n//CHECK#5\nif (x[1] !== 1) {\n $ERROR('#5: x = new Array(1,2); x.reverse(); x[1] === 1. Actual: ' + (x[1]));\n} \n\n//CHECK#6\nif (x.length !== 2) {\n $ERROR('#6: x = new Array(1,2); x.reverse(); x.length === 2. Actual: ' + (x.length));\n} \n",
+ "id": "S15.4.4.8_A1_T1"
+ },
+ {
+ "section": "15.4.4.8",
+ "description": "Checking this algorithm, elements are objects and primitives",
+ "test": "//CHECK#1\nvar x = [];\nx[0] = true;\nx[2] = Infinity;\nx[4] = undefined;\nx[5] = undefined;\nx[8] = \"NaN\";\nx[9] = \"-1\";\n\nvar reverse = x.reverse();\nif (reverse !== x) {\n $ERROR('#1: x = []; x[0] = true; x[2] = Infinity; x[4] = undefined; x[5] = undefined; x[8] = \"NaN\"; x[9] = \"-1\"; x.reverse() === x. Actual: ' + (reverse));\n}\n\n//CHECK#2\nif (x[0] !== \"-1\") {\n $ERROR('#2: x = []; x[0] = true; x[2] = Infinity; x[4] = undefined; x[5] = undefined; x[8] = \"NaN\"; x[9] = \"-1\"; x.reverse(); x[0] === \"-1\". Actual: ' + (x[0]));\n}\n\n//CHECK#3\nif (x[1] !== \"NaN\") {\n $ERROR('#3: x = []; x[0] = true; x[2] = Infinity; x[4] = undefined; x[5] = undefined; x[8] = \"NaN\"; x[9] = \"-1\"; x.reverse(); x[1] === \"NaN\". Actual: ' + (x[1]));\n} \n\n//CHECK#4\nif (x[2] !== undefined) {\n $ERROR('#4: x = []; x[0] = true; x[2] = Infinity; x[4] = undefined; x[5] = undefined; x[8] = \"NaN\"; x[9] = \"-1\"; x.reverse(); x[2] === undefined. Actual: ' + (x[2]));\n}\n\n//CHECK#5\nif (x[3] !== undefined) {\n $ERROR('#5: x = []; x[0] = true; x[2] = Infinity; x[4] = undefined; x[5] = undefined; x[8] = \"NaN\"; x[9] = \"-1\"; x.reverse(); x[3] === undefined. Actual: ' + (x[3]));\n} \n\n//CHECK#6\nif (x[4] !== undefined) {\n $ERROR('#6: x = []; x[0] = true; x[2] = Infinity; x[4] = undefined; x[5] = undefined; x[8] = \"NaN\"; x[9] = \"-1\"; x.reverse(); x[4] === undefined. Actual: ' + (x[4]));\n}\n\n//CHECK#7\nif (x[5] !== undefined) {\n $ERROR('#7: x = []; x[0] = true; x[2] = Infinity; x[4] = undefined; x[5] = undefined; x[8] = \"NaN\"; x[9] = \"-1\"; x.reverse(); x[5] === undefined. Actual: ' + (x[5]));\n}\n\n//CHECK#8\nif (x[6] !== undefined) {\n $ERROR('#8: x = []; x[0] = true; x[2] = Infinity; x[4] = undefined; x[5] = undefined; x[8] = \"NaN\"; x[9] = \"-1\"; x.reverse(); x[6] === undefined. Actual: ' + (x[6]));\n} \n\n//CHECK#9\nif (x[7] !== Infinity) {\n $ERROR('#9: x = []; x[0] = true; x[2] = Infinity; x[4] = undefined; x[5] = undefined; x[8] = \"NaN\"; x[9] = \"-1\"; x.reverse(); x[7] === Infinity. Actual: ' + (x[7]));\n}\n\n//CHECK#10\nif (x[8] !== undefined) {\n $ERROR('#10: x = []; x[0] = true; x[2] = Infinity; x[4] = undefined; x[5] = undefined; x[8] = \"NaN\"; x[9] = \"-1\"; x.reverse(); x[8] === undefined. Actual: ' + (x[8]));\n}\n\n//CHECK#11\nif (x[9] !== true) {\n $ERROR('#11: x = []; x[0] = true; x[2] = Infinity; x[4] = undefined; x[5] = undefined; x[8] = \"NaN\"; x[9] = \"-1\"; x.reverse(); x[9] === true. Actual: ' + (x[9]));\n} \n\nx.length = 9;\n\nvar reverse = x.reverse();\nif (reverse !== x) {\n $ERROR('#1: x = []; x[0] = true; x[2] = Infinity; x[4] = undefined; x[5] = undefined; x[8] = \"NaN\"; x[9] = \"-1\"; x.reverse(); x.length = 9; x.reverse() === x. Actual: ' + (reverse));\n}\n\n//CHECK#12\nif (x[0] !== undefined) {\n $ERROR('#12: x = []; x[0] = true; x[2] = Infinity; x[4] = undefined; x[5] = undefined; x[8] = \"NaN\"; x[9] = \"-1\"; x.reverse(); x.length = 9; x.reverse(); x[0] === undefined. Actual: ' + (x[0]));\n}\n\n//CHECK#13\nif (x[1] !== Infinity) {\n $ERROR('#13: x = []; x[0] = true; x[2] = Infinity; x[4] = undefined; x[5] = undefined; x[8] = \"NaN\"; x[9] = \"-1\"; x.reverse(); x.length = 9; x.reverse(); x[1] === Infinity. Actual: ' + (x[1]));\n} \n\n//CHECK#14\nif (x[2] !== undefined) {\n $ERROR('#14: x = []; x[0] = true; x[2] = Infinity; x[4] = undefined; x[5] = undefined; x[8] = \"NaN\"; x[9] = \"-1\"; x.reverse(); x.length = 9; x.reverse(); x[2] === undefined. Actual: ' + (x[2]));\n}\n\n//CHECK#15\nif (x[3] !== undefined) {\n $ERROR('#15: x = []; x[0] = true; x[2] = Infinity; x[4] = undefined; x[5] = undefined; x[8] = \"NaN\"; x[9] = \"-1\"; x.reverse(); x.length = 9; x.reverse(); x[3] === undefined. Actual: ' + (x[3]));\n} \n\n//CHECK#16\nif (x[4] !== undefined) {\n $ERROR('#16: x = []; x[0] = true; x[2] = Infinity; x[4] = undefined; x[5] = undefined; x[8] = \"NaN\"; x[9] = \"-1\"; x.reverse(); x.length = 9; x.reverse(); x[4] === undefined. Actual: ' + (x[4]));\n}\n\n//CHECK#17\nif (x[5] !== undefined) {\n $ERROR('#17: x = []; x[0] = true; x[2] = Infinity; x[4] = undefined; x[5] = undefined; x[8] = \"NaN\"; x[9] = \"-1\"; x.reverse(); x.length = 9; x.reverse(); x[5] === undefined. Actual: ' + (x[5]));\n}\n\n//CHECK#18\nif (x[6] !== undefined) {\n $ERROR('#18: x = []; x[0] = true; x[2] = Infinity; x[4] = undefined; x[5] = undefined; x[8] = \"NaN\"; x[9] = \"-1\"; x.reverse(); x.length = 9; x.reverse(); x[6] === undefined. Actual: ' + (x[6]));\n} \n\n//CHECK#19\nif (x[7] !== \"NaN\") {\n $ERROR('#19: x = []; x[0] = true; x[2] = Infinity; x[4] = undefined; x[5] = undefined; x[8] = \"NaN\"; x[9] = \"-1\"; x.reverse(); x.length = 9; x.reverse(); x[7] === \"NaN\". Actual: ' + (x[7]));\n}\n\n//CHECK#20\nif (x[8] !== \"-1\") {\n $ERROR('#20: x = []; x[0] = true; x[2] = Infinity; x[4] = undefined; x[5] = undefined; x[8] = \"NaN\"; x[9] = \"-1\"; x.reverse(); x.length = 9; x.reverse(); x[8] === \"-1\". Actual: ' + (x[8]));\n}\n \n",
+ "id": "S15.4.4.8_A1_T2"
+ },
+ {
+ "section": "15.4.4.8",
+ "description": "Checking this for Object object, elements are objects and primitives, length is integer",
+ "test": "//CHECK#1\nvar obj = {};\nobj.length = 10;\nobj.reverse = Array.prototype.reverse;\n\nobj[0] = true;\nobj[2] = Infinity;\nobj[4] = undefined;\nobj[5] = undefined;\nobj[8] = \"NaN\";\nobj[9] = \"-1\";\n\nvar reverse = obj.reverse();\nif (reverse !== obj) {\n $ERROR('#1: var obj = {}; obj.reverse = Array.prototype.reverse; obj.length = 10; obj[0] = true; obj[2] = Infinity; obj[4] = undefined; obj[5] = undefined; obj[8] = \"NaN\"; obj[9] = \"-1\"; obj.reverse() === obj. Actual: ' + (reverse));\n}\n\n//CHECK#2\nif (obj[0] !== \"-1\") {\n $ERROR('#2: var obj = {}; obj.reverse = Array.prototype.reverse; obj.length = 10; obj[0] = true; obj[2] = Infinity; obj[4] = undefined; obj[5] = undefined; obj[8] = \"NaN\"; obj[9] = \"-1\"; obj.reverse(); obj[0] === \"-1\". Actual: ' + (obj[0]));\n}\n\n//CHECK#3\nif (obj[1] !== \"NaN\") {\n $ERROR('#3: var obj = {}; obj.reverse = Array.prototype.reverse; obj.length = 10; obj[0] = true; obj[2] = Infinity; obj[4] = undefined; obj[5] = undefined; obj[8] = \"NaN\"; obj[9] = \"-1\"; obj.reverse(); obj[1] === \"NaN\". Actual: ' + (obj[1]));\n} \n\n//CHECK#4\nif (obj[2] !== undefined) {\n $ERROR('#4: var obj = {}; obj.reverse = Array.prototype.reverse; obj.length = 10; obj[0] = true; obj[2] = Infinity; obj[4] = undefined; obj[5] = undefined; obj[8] = \"NaN\"; obj[9] = \"-1\"; obj.reverse(); obj[2] === undefined. Actual: ' + (obj[2]));\n}\n\n//CHECK#5\nif (obj[3] !== undefined) {\n $ERROR('#5: var obj = {}; obj.reverse = Array.prototype.reverse; obj.length = 10; obj[0] = true; obj[2] = Infinity; obj[4] = undefined; obj[5] = undefined; obj[8] = \"NaN\"; obj[9] = \"-1\"; obj.reverse(); obj[3] === undefined. Actual: ' + (obj[3]));\n} \n\n//CHECK#6\nif (obj[4] !== undefined) {\n $ERROR('#6: var obj = {}; obj.reverse = Array.prototype.reverse; obj.length = 10; obj[0] = true; obj[2] = Infinity; obj[4] = undefined; obj[5] = undefined; obj[8] = \"NaN\"; obj[9] = \"-1\"; obj.reverse(); obj[4] === undefined. Actual: ' + (obj[4]));\n}\n\n//CHECK#7\nif (obj[5] !== undefined) {\n $ERROR('#7: var obj = {}; obj.reverse = Array.prototype.reverse; obj.length = 10; obj[0] = true; obj[2] = Infinity; obj[4] = undefined; obj[5] = undefined; obj[8] = \"NaN\"; obj[9] = \"-1\"; obj.reverse(); obj[5] === undefined. Actual: ' + (obj[5]));\n}\n\n//CHECK#8\nif (obj[6] !== undefined) {\n $ERROR('#8: var obj = {}; obj.reverse = Array.prototype.reverse; obj.length = 10; obj[0] = true; obj[2] = Infinity; obj[4] = undefined; obj[5] = undefined; obj[8] = \"NaN\"; obj[9] = \"-1\"; obj.reverse(); obj[6] === undefined. Actual: ' + (obj[6]));\n} \n\n//CHECK#9\nif (obj[7] !== Infinity) {\n $ERROR('#9: var obj = {}; obj.reverse = Array.prototype.reverse; obj.length = 10; obj[0] = true; obj[2] = Infinity; obj[4] = undefined; obj[5] = undefined; obj[8] = \"NaN\"; obj[9] = \"-1\"; obj.reverse(); obj[7] === Infinity. Actual: ' + (obj[7]));\n}\n\n//CHECK#10\nif (obj[8] !== undefined) {\n $ERROR('#10: var obj = {}; obj.reverse = Array.prototype.reverse; obj.length = 10; obj[0] = true; obj[2] = Infinity; obj[4] = undefined; obj[5] = undefined; obj[8] = \"NaN\"; obj[9] = \"-1\"; obj.reverse(); obj[8] === undefined. Actual: ' + (obj[8]));\n}\n\n//CHECK#11\nif (obj[9] !== true) {\n $ERROR('#11: var obj = {}; obj.reverse = Array.prototype.reverse; obj.length = 10; obj[0] = true; obj[2] = Infinity; obj[4] = undefined; obj[5] = undefined; obj[8] = \"NaN\"; obj[9] = \"-1\"; obj.reverse(); obj[9] === true. Actual: ' + (obj[9]));\n} \n\nobj.length = 9;\n\nvar reverse = obj.reverse();\nif (reverse !== obj) {\n $ERROR('#1: var obj = {}; obj.reverse = Array.prototype.reverse; obj.length = 10; obj[0] = true; obj[2] = Infinity; obj[4] = undefined; obj[5] = undefined; obj[8] = \"NaN\"; obj[9] = \"-1\"; obj.reverse(); obj.length = 9; obj.reverse() === obj. Actual: ' + (reverse));\n}\n\n//CHECK#12\nif (obj[0] !== undefined) {\n $ERROR('#12: var obj = {}; obj.reverse = Array.prototype.reverse; obj.length = 10; obj[0] = true; obj[2] = Infinity; obj[4] = undefined; obj[5] = undefined; obj[8] = \"NaN\"; obj[9] = \"-1\"; obj.reverse(); obj.length = 9; obj.reverse(); obj[0] === undefined. Actual: ' + (obj[0]));\n}\n\n//CHECK#13\nif (obj[1] !== Infinity) {\n $ERROR('#13: var obj = {}; obj.reverse = Array.prototype.reverse; obj.length = 10; obj[0] = true; obj[2] = Infinity; obj[4] = undefined; obj[5] = undefined; obj[8] = \"NaN\"; obj[9] = \"-1\"; obj.reverse(); obj.length = 9; obj.reverse(); obj[1] === Infinity. Actual: ' + (obj[1]));\n} \n\n//CHECK#14\nif (obj[2] !== undefined) {\n $ERROR('#14: var obj = {}; obj.reverse = Array.prototype.reverse; obj.length = 10; obj[0] = true; obj[2] = Infinity; obj[4] = undefined; obj[5] = undefined; obj[8] = \"NaN\"; obj[9] = \"-1\"; obj.reverse(); obj.length = 9; obj.reverse(); obj[2] === undefined. Actual: ' + (obj[2]));\n}\n\n//CHECK#15\nif (obj[3] !== undefined) {\n $ERROR('#15: var obj = {}; obj.reverse = Array.prototype.reverse; obj.length = 10; obj[0] = true; obj[2] = Infinity; obj[4] = undefined; obj[5] = undefined; obj[8] = \"NaN\"; obj[9] = \"-1\"; obj.reverse(); obj.length = 9; obj.reverse(); obj[3] === undefined. Actual: ' + (obj[3]));\n} \n\n//CHECK#16\nif (obj[4] !== undefined) {\n $ERROR('#16: var obj = {}; obj.reverse = Array.prototype.reverse; obj.length = 10; obj[0] = true; obj[2] = Infinity; obj[4] = undefined; obj[5] = undefined; obj[8] = \"NaN\"; obj[9] = \"-1\"; obj.reverse(); obj.length = 9; obj.reverse(); obj[4] === undefined. Actual: ' + (obj[4]));\n}\n\n//CHECK#17\nif (obj[5] !== undefined) {\n $ERROR('#17: var obj = {}; obj.reverse = Array.prototype.reverse; obj.length = 10; obj[0] = true; obj[2] = Infinity; obj[4] = undefined; obj[5] = undefined; obj[8] = \"NaN\"; obj[9] = \"-1\"; obj.reverse(); obj.length = 9; obj.reverse(); obj[5] === undefined. Actual: ' + (obj[5]));\n}\n\n//CHECK#18\nif (obj[6] !== undefined) {\n $ERROR('#18: var obj = {}; obj.reverse = Array.prototype.reverse; obj.length = 10; obj[0] = true; obj[2] = Infinity; obj[4] = undefined; obj[5] = undefined; obj[8] = \"NaN\"; obj[9] = \"-1\"; obj.reverse(); obj.length = 9; obj.reverse(); obj[6] === undefined. Actual: ' + (obj[6]));\n} \n\n//CHECK#19\nif (obj[7] !== \"NaN\") {\n $ERROR('#19: var obj = {}; obj.reverse = Array.prototype.reverse; obj.length = 10; obj[0] = true; obj[2] = Infinity; obj[4] = undefined; obj[5] = undefined; obj[8] = \"NaN\"; obj[9] = \"-1\"; obj.reverse(); obj.length = 9; obj.reverse(); obj[7] === \"NaN\". Actual: ' + (obj[7]));\n}\n\n//CHECK#20\nif (obj[8] !== \"-1\") {\n $ERROR('#20: var obj = {}; obj.reverse = Array.prototype.reverse; obj.length = 10; obj[0] = true; obj[2] = Infinity; obj[4] = undefined; obj[5] = undefined; obj[8] = \"NaN\"; obj[9] = \"-1\"; obj.reverse(); obj.length = 9; obj.reverse(); obj[8] === \"-1\". Actual: ' + (obj[8]));\n}\n",
+ "id": "S15.4.4.8_A2_T1"
+ },
+ {
+ "section": "15.4.4.8",
+ "description": "Checking this for Object object, elements are objects and primitives, length is not integer",
+ "test": "//CHECK#1\nvar obj = {};\nobj.length = 10.5;\nobj.reverse = Array.prototype.reverse;\n\nobj[0] = true;\nobj[2] = Infinity;\nobj[4] = undefined;\nobj[5] = undefined;\nobj[8] = \"NaN\";\nobj[9] = \"-1\";\n\nvar reverse = obj.reverse();\nif (reverse !== obj) {\n $ERROR('#1: var obj = {}; obj.reverse = Array.prototype.reverse; obj.length = 10.5; obj[0] = true; obj[2] = Infinity; obj[4] = undefined; obj[5] = undefined; obj[8] = \"NaN\"; obj[9] = \"-1\"; obj.reverse() === obj. Actual: ' + (reverse));\n}\n\n//CHECK#2\nif (obj[0] !== \"-1\") {\n $ERROR('#2: var obj = {}; obj.reverse = Array.prototype.reverse; obj.length = 10.5; obj[0] = true; obj[2] = Infinity; obj[4] = undefined; obj[5] = undefined; obj[8] = \"NaN\"; obj[9] = \"-1\"; obj.reverse(); obj[0] === \"-1\". Actual: ' + (obj[0]));\n}\n\n//CHECK#3\nif (obj[1] !== \"NaN\") {\n $ERROR('#3: var obj = {}; obj.reverse = Array.prototype.reverse; obj.length = 10.5; obj[0] = true; obj[2] = Infinity; obj[4] = undefined; obj[5] = undefined; obj[8] = \"NaN\"; obj[9] = \"-1\"; obj.reverse(); obj[1] === \"NaN\". Actual: ' + (obj[1]));\n} \n\n//CHECK#4\nif (obj[2] !== undefined) {\n $ERROR('#4: var obj = {}; obj.reverse = Array.prototype.reverse; obj.length = 10.5; obj[0] = true; obj[2] = Infinity; obj[4] = undefined; obj[5] = undefined; obj[8] = \"NaN\"; obj[9] = \"-1\"; obj.reverse(); obj[2] === undefined. Actual: ' + (obj[2]));\n}\n\n//CHECK#5\nif (obj[3] !== undefined) {\n $ERROR('#5: var obj = {}; obj.reverse = Array.prototype.reverse; obj.length = 10.5; obj[0] = true; obj[2] = Infinity; obj[4] = undefined; obj[5] = undefined; obj[8] = \"NaN\"; obj[9] = \"-1\"; obj.reverse(); obj[3] === undefined. Actual: ' + (obj[3]));\n} \n\n//CHECK#6\nif (obj[4] !== undefined) {\n $ERROR('#6: var obj = {}; obj.reverse = Array.prototype.reverse; obj.length = 10.5; obj[0] = true; obj[2] = Infinity; obj[4] = undefined; obj[5] = undefined; obj[8] = \"NaN\"; obj[9] = \"-1\"; obj.reverse(); obj[4] === undefined. Actual: ' + (obj[4]));\n}\n\n//CHECK#7\nif (obj[5] !== undefined) {\n $ERROR('#7: var obj = {}; obj.reverse = Array.prototype.reverse; obj.length = 10.5; obj[0] = true; obj[2] = Infinity; obj[4] = undefined; obj[5] = undefined; obj[8] = \"NaN\"; obj[9] = \"-1\"; obj.reverse(); obj[5] === undefined. Actual: ' + (obj[5]));\n}\n\n//CHECK#8\nif (obj[6] !== undefined) {\n $ERROR('#8: var obj = {}; obj.reverse = Array.prototype.reverse; obj.length = 10.5; obj[0] = true; obj[2] = Infinity; obj[4] = undefined; obj[5] = undefined; obj[8] = \"NaN\"; obj[9] = \"-1\"; obj.reverse(); obj[6] === undefined. Actual: ' + (obj[6]));\n} \n\n//CHECK#9\nif (obj[7] !== Infinity) {\n $ERROR('#9: var obj = {}; obj.reverse = Array.prototype.reverse; obj.length = 10.5; obj[0] = true; obj[2] = Infinity; obj[4] = undefined; obj[5] = undefined; obj[8] = \"NaN\"; obj[9] = \"-1\"; obj.reverse(); obj[7] === Infinity. Actual: ' + (obj[7]));\n}\n\n//CHECK#10\nif (obj[8] !== undefined) {\n $ERROR('#10: var obj = {}; obj.reverse = Array.prototype.reverse; obj.length = 10.5; obj[0] = true; obj[2] = Infinity; obj[4] = undefined; obj[5] = undefined; obj[8] = \"NaN\"; obj[9] = \"-1\"; obj.reverse(); obj[8] === undefined. Actual: ' + (obj[8]));\n}\n\n//CHECK#11\nif (obj[9] !== true) {\n $ERROR('#11: var obj = {}; obj.reverse = Array.prototype.reverse; obj.length = 10.5; obj[0] = true; obj[2] = Infinity; obj[4] = undefined; obj[5] = undefined; obj[8] = \"NaN\"; obj[9] = \"-1\"; obj.reverse(); obj[9] === true. Actual: ' + (obj[9]));\n} \n\nobj.length = new Number(9.5);\n\nvar reverse = obj.reverse();\nif (reverse !== obj) {\n $ERROR('#1: var obj = {}; obj.reverse = Array.prototype.reverse; obj.length = 10.5; obj[0] = true; obj[2] = Infinity; obj[4] = undefined; obj[5] = undefined; obj[8] = \"NaN\"; obj[9] = \"-1\"; obj.reverse(); obj.length = new Number(9.5); obj.reverse() === obj. Actual: ' + (reverse));\n}\n\n//CHECK#12\nif (obj[0] !== undefined) {\n $ERROR('#12: var obj = {}; obj.reverse = Array.prototype.reverse; obj.length = 10.5; obj[0] = true; obj[2] = Infinity; obj[4] = undefined; obj[5] = undefined; obj[8] = \"NaN\"; obj[9] = \"-1\"; obj.reverse(); obj.length = new Number(9.5); obj.reverse(); obj[0] === undefined. Actual: ' + (obj[0]));\n}\n\n//CHECK#13\nif (obj[1] !== Infinity) {\n $ERROR('#13: var obj = {}; obj.reverse = Array.prototype.reverse; obj.length = 10.5; obj[0] = true; obj[2] = Infinity; obj[4] = undefined; obj[5] = undefined; obj[8] = \"NaN\"; obj[9] = \"-1\"; obj.reverse(); obj.length = new Number(9.5); obj.reverse(); obj[1] === Infinity. Actual: ' + (obj[1]));\n} \n\n//CHECK#14\nif (obj[2] !== undefined) {\n $ERROR('#14: var obj = {}; obj.reverse = Array.prototype.reverse; obj.length = 10.5; obj[0] = true; obj[2] = Infinity; obj[4] = undefined; obj[5] = undefined; obj[8] = \"NaN\"; obj[9] = \"-1\"; obj.reverse(); obj.length = new Number(9.5); obj.reverse(); obj[2] === undefined. Actual: ' + (obj[2]));\n}\n\n//CHECK#15\nif (obj[3] !== undefined) {\n $ERROR('#15: var obj = {}; obj.reverse = Array.prototype.reverse; obj.length = 10.5; obj[0] = true; obj[2] = Infinity; obj[4] = undefined; obj[5] = undefined; obj[8] = \"NaN\"; obj[9] = \"-1\"; obj.reverse(); obj.length = new Number(9.5); obj.reverse(); obj[3] === undefined. Actual: ' + (obj[3]));\n} \n\n//CHECK#16\nif (obj[4] !== undefined) {\n $ERROR('#16: var obj = {}; obj.reverse = Array.prototype.reverse; obj.length = 10.5; obj[0] = true; obj[2] = Infinity; obj[4] = undefined; obj[5] = undefined; obj[8] = \"NaN\"; obj[9] = \"-1\"; obj.reverse(); obj.length = new Number(9.5); obj.reverse(); obj[4] === undefined. Actual: ' + (obj[4]));\n}\n\n//CHECK#17\nif (obj[5] !== undefined) {\n $ERROR('#17: var obj = {}; obj.reverse = Array.prototype.reverse; obj.length = 10.5; obj[0] = true; obj[2] = Infinity; obj[4] = undefined; obj[5] = undefined; obj[8] = \"NaN\"; obj[9] = \"-1\"; obj.reverse(); obj.length = new Number(9.5); obj.reverse(); obj[5] === undefined. Actual: ' + (obj[5]));\n}\n\n//CHECK#18\nif (obj[6] !== undefined) {\n $ERROR('#18: var obj = {}; obj.reverse = Array.prototype.reverse; obj.length = 10.5; obj[0] = true; obj[2] = Infinity; obj[4] = undefined; obj[5] = undefined; obj[8] = \"NaN\"; obj[9] = \"-1\"; obj.reverse(); obj.length = new Number(9.5); obj.reverse(); obj[6] === undefined. Actual: ' + (obj[6]));\n} \n\n//CHECK#19\nif (obj[7] !== \"NaN\") {\n $ERROR('#19: var obj = {}; obj.reverse = Array.prototype.reverse; obj.length = 10.5; obj[0] = true; obj[2] = Infinity; obj[4] = undefined; obj[5] = undefined; obj[8] = \"NaN\"; obj[9] = \"-1\"; obj.reverse(); obj.length = new Number(9.5); obj.reverse(); obj[7] === \"NaN\". Actual: ' + (obj[7]));\n}\n\n//CHECK#20\nif (obj[8] !== \"-1\") {\n $ERROR('#20: var obj = {}; obj.reverse = Array.prototype.reverse; obj.length = 10.5; obj[0] = true; obj[2] = Infinity; obj[4] = undefined; obj[5] = undefined; obj[8] = \"NaN\"; obj[9] = \"-1\"; obj.reverse(); obj.length = new Number(9.5); obj.reverse(); obj[8] === \"-1\". Actual: ' + (obj[8]));\n}\n",
+ "id": "S15.4.4.8_A2_T2"
+ },
+ {
+ "section": "15.4.4.8",
+ "description": "Checking this for Object object, elements are objects and primitives, length is string",
+ "test": "//CHECK#1\nvar obj = {};\nobj.length = \"10\";\nobj.reverse = Array.prototype.reverse;\n\nobj[0] = true;\nobj[2] = Infinity;\nobj[4] = undefined;\nobj[5] = undefined;\nobj[8] = \"NaN\";\nobj[9] = \"-1\";\n\nvar reverse = obj.reverse();\nif (reverse !== obj) {\n $ERROR('#1: var obj = {}; obj.reverse = Array.prototype.reverse; obj.length = \"10\"; obj[0] = true; obj[2] = Infinity; obj[4] = undefined; obj[5] = undefined; obj[8] = \"NaN\"; obj[9] = \"-1\"; obj.reverse() === obj. Actual: ' + (reverse));\n}\n\n//CHECK#2\nif (obj[0] !== \"-1\") {\n $ERROR('#2: var obj = {}; obj.reverse = Array.prototype.reverse; obj.length = \"10\"; obj[0] = true; obj[2] = Infinity; obj[4] = undefined; obj[5] = undefined; obj[8] = \"NaN\"; obj[9] = \"-1\"; obj.reverse(); obj[0] === \"-1\". Actual: ' + (obj[0]));\n}\n\n//CHECK#3\nif (obj[1] !== \"NaN\") {\n $ERROR('#3: var obj = {}; obj.reverse = Array.prototype.reverse; obj.length = \"10\"; obj[0] = true; obj[2] = Infinity; obj[4] = undefined; obj[5] = undefined; obj[8] = \"NaN\"; obj[9] = \"-1\"; obj.reverse(); obj[1] === \"NaN\". Actual: ' + (obj[1]));\n} \n\n//CHECK#4\nif (obj[2] !== undefined) {\n $ERROR('#4: var obj = {}; obj.reverse = Array.prototype.reverse; obj.length = \"10\"; obj[0] = true; obj[2] = Infinity; obj[4] = undefined; obj[5] = undefined; obj[8] = \"NaN\"; obj[9] = \"-1\"; obj.reverse(); obj[2] === undefined. Actual: ' + (obj[2]));\n}\n\n//CHECK#5\nif (obj[3] !== undefined) {\n $ERROR('#5: var obj = {}; obj.reverse = Array.prototype.reverse; obj.length = \"10\"; obj[0] = true; obj[2] = Infinity; obj[4] = undefined; obj[5] = undefined; obj[8] = \"NaN\"; obj[9] = \"-1\"; obj.reverse(); obj[3] === undefined. Actual: ' + (obj[3]));\n} \n\n//CHECK#6\nif (obj[4] !== undefined) {\n $ERROR('#6: var obj = {}; obj.reverse = Array.prototype.reverse; obj.length = \"10\"; obj[0] = true; obj[2] = Infinity; obj[4] = undefined; obj[5] = undefined; obj[8] = \"NaN\"; obj[9] = \"-1\"; obj.reverse(); obj[4] === undefined. Actual: ' + (obj[4]));\n}\n\n//CHECK#7\nif (obj[5] !== undefined) {\n $ERROR('#7: var obj = {}; obj.reverse = Array.prototype.reverse; obj.length = \"10\"; obj[0] = true; obj[2] = Infinity; obj[4] = undefined; obj[5] = undefined; obj[8] = \"NaN\"; obj[9] = \"-1\"; obj.reverse(); obj[5] === undefined. Actual: ' + (obj[5]));\n}\n\n//CHECK#8\nif (obj[6] !== undefined) {\n $ERROR('#8: var obj = {}; obj.reverse = Array.prototype.reverse; obj.length = \"10\"; obj[0] = true; obj[2] = Infinity; obj[4] = undefined; obj[5] = undefined; obj[8] = \"NaN\"; obj[9] = \"-1\"; obj.reverse(); obj[6] === undefined. Actual: ' + (obj[6]));\n} \n\n//CHECK#9\nif (obj[7] !== Infinity) {\n $ERROR('#9: var obj = {}; obj.reverse = Array.prototype.reverse; obj.length = \"10\"; obj[0] = true; obj[2] = Infinity; obj[4] = undefined; obj[5] = undefined; obj[8] = \"NaN\"; obj[9] = \"-1\"; obj.reverse(); obj[7] === Infinity. Actual: ' + (obj[7]));\n}\n\n//CHECK#10\nif (obj[8] !== undefined) {\n $ERROR('#10: var obj = {}; obj.reverse = Array.prototype.reverse; obj.length = \"10\"; obj[0] = true; obj[2] = Infinity; obj[4] = undefined; obj[5] = undefined; obj[8] = \"NaN\"; obj[9] = \"-1\"; obj.reverse(); obj[8] === undefined. Actual: ' + (obj[8]));\n}\n\n//CHECK#11\nif (obj[9] !== true) {\n $ERROR('#11: var obj = {}; obj.reverse = Array.prototype.reverse; obj.length = \"10\"; obj[0] = true; obj[2] = Infinity; obj[4] = undefined; obj[5] = undefined; obj[8] = \"NaN\"; obj[9] = \"-1\"; obj.reverse(); obj[9] === true. Actual: ' + (obj[9]));\n} \n\nobj.length = new String(\"9\");\n\nvar reverse = obj.reverse();\nif (reverse !== obj) {\n $ERROR('#1: var obj = {}; obj.reverse = Array.prototype.reverse; obj.length = \"10\"; obj[0] = true; obj[2] = Infinity; obj[4] = undefined; obj[5] = undefined; obj[8] = \"NaN\"; obj[9] = \"-1\"; obj.reverse(); obj.length = new String(\"9\"); obj.reverse() === obj. Actual: ' + (reverse));\n}\n\n//CHECK#12\nif (obj[0] !== undefined) {\n $ERROR('#12: var obj = {}; obj.reverse = Array.prototype.reverse; obj.length = \"10\"; obj[0] = true; obj[2] = Infinity; obj[4] = undefined; obj[5] = undefined; obj[8] = \"NaN\"; obj[9] = \"-1\"; obj.reverse(); obj.length = new String(\"9\"); obj.reverse(); obj[0] === undefined. Actual: ' + (obj[0]));\n}\n\n//CHECK#13\nif (obj[1] !== Infinity) {\n $ERROR('#13: var obj = {}; obj.reverse = Array.prototype.reverse; obj.length = \"10\"; obj[0] = true; obj[2] = Infinity; obj[4] = undefined; obj[5] = undefined; obj[8] = \"NaN\"; obj[9] = \"-1\"; obj.reverse(); obj.length = new String(\"9\"); obj.reverse(); obj[1] === Infinity. Actual: ' + (obj[1]));\n} \n\n//CHECK#14\nif (obj[2] !== undefined) {\n $ERROR('#14: var obj = {}; obj.reverse = Array.prototype.reverse; obj.length = \"10\"; obj[0] = true; obj[2] = Infinity; obj[4] = undefined; obj[5] = undefined; obj[8] = \"NaN\"; obj[9] = \"-1\"; obj.reverse(); obj.length = new String(\"9\"); obj.reverse(); obj[2] === undefined. Actual: ' + (obj[2]));\n}\n\n//CHECK#15\nif (obj[3] !== undefined) {\n $ERROR('#15: var obj = {}; obj.reverse = Array.prototype.reverse; obj.length = \"10\"; obj[0] = true; obj[2] = Infinity; obj[4] = undefined; obj[5] = undefined; obj[8] = \"NaN\"; obj[9] = \"-1\"; obj.reverse(); obj.length = new String(\"9\"); obj.reverse(); obj[3] === undefined. Actual: ' + (obj[3]));\n} \n\n//CHECK#16\nif (obj[4] !== undefined) {\n $ERROR('#16: var obj = {}; obj.reverse = Array.prototype.reverse; obj.length = \"10\"; obj[0] = true; obj[2] = Infinity; obj[4] = undefined; obj[5] = undefined; obj[8] = \"NaN\"; obj[9] = \"-1\"; obj.reverse(); obj.length = new String(\"9\"); obj.reverse(); obj[4] === undefined. Actual: ' + (obj[4]));\n}\n\n//CHECK#17\nif (obj[5] !== undefined) {\n $ERROR('#17: var obj = {}; obj.reverse = Array.prototype.reverse; obj.length = \"10\"; obj[0] = true; obj[2] = Infinity; obj[4] = undefined; obj[5] = undefined; obj[8] = \"NaN\"; obj[9] = \"-1\"; obj.reverse(); obj.length = new String(\"9\"); obj.reverse(); obj[5] === undefined. Actual: ' + (obj[5]));\n}\n\n//CHECK#18\nif (obj[6] !== undefined) {\n $ERROR('#18: var obj = {}; obj.reverse = Array.prototype.reverse; obj.length = \"10\"; obj[0] = true; obj[2] = Infinity; obj[4] = undefined; obj[5] = undefined; obj[8] = \"NaN\"; obj[9] = \"-1\"; obj.reverse(); obj.length = new String(\"9\"); obj.reverse(); obj[6] === undefined. Actual: ' + (obj[6]));\n} \n\n//CHECK#19\nif (obj[7] !== \"NaN\") {\n $ERROR('#19: var obj = {}; obj.reverse = Array.prototype.reverse; obj.length = \"10\"; obj[0] = true; obj[2] = Infinity; obj[4] = undefined; obj[5] = undefined; obj[8] = \"NaN\"; obj[9] = \"-1\"; obj.reverse(); obj.length = new String(\"9\"); obj.reverse(); obj[7] === \"NaN\". Actual: ' + (obj[7]));\n}\n\n//CHECK#20\nif (obj[8] !== \"-1\") {\n $ERROR('#20: var obj = {}; obj.reverse = Array.prototype.reverse; obj.length = \"10\"; obj[0] = true; obj[2] = Infinity; obj[4] = undefined; obj[5] = undefined; obj[8] = \"NaN\"; obj[9] = \"-1\"; obj.reverse(); obj.length = new String(\"9\"); obj.reverse(); obj[8] === \"-1\". Actual: ' + (obj[8]));\n}\n",
+ "id": "S15.4.4.8_A2_T3"
+ },
+ {
+ "section": "15.4.4.8",
+ "description": "length = 4294967296",
+ "test": "var obj = {};\nobj.reverse = Array.prototype.reverse;\nobj[0] = \"x\";\nobj[4294967295] = \"y\";\nobj.length = 4294967296;\n\n//CHECK#1\nvar reverse = obj.reverse();\nif (reverse !== obj) {\n $ERROR('#1: var obj = {}; obj.reverse = Array.prototype.reverse; obj[0] = \"x\"; obj[4294967295] = \"y\"; obj.length = 4294967296; obj.reverse() === obj. Actual: ' + (reverse));\n}\n\n//CHECK#2\nif (obj.length !== 4294967296) {\n $ERROR('#2: var obj = {}; obj.reverse = Array.prototype.reverse; obj[0] = \"x\"; obj[4294967295] = \"y\"; obj.length = 4294967296; obj.reverse(); obj.length === 4294967296. Actual: ' + (obj.length));\n}\n\n//CHECK#3\nif (obj[0] !== \"x\") {\n $ERROR('#3: var obj = {}; obj.reverse = Array.prototype.reverse; obj[0] = \"x\"; obj[4294967295] = \"y\"; obj.length = 4294967296; obj.reverse(); obj[0] == \"x\"');\n}\n\n//CHECK#4\nif (obj[4294967295] !== \"y\") {\n $ERROR('#4: var obj = {}; obj.reverse = Array.prototype.reverse; obj[] = \"x\"; obj[4294967295] = \"y\"; obj.length = 4294967296; obj.reverse(); obj[4294967295] == \"y\"');\n}\n",
+ "id": "S15.4.4.8_A3_T1"
+ },
+ {
+ "section": "15.4.4.8",
+ "description": "length = 4294967298",
+ "test": "var obj = {};\nobj.reverse = Array.prototype.reverse;\nobj[0] = \"x\";\nobj[1] = \"y\";\nobj[4294967297] = \"z\";\nobj.length = 4294967298;\n\n//CHECK#1\nvar reverse = obj.reverse();\nif (reverse !== obj) {\n $ERROR('#1: var obj = {}; obj.reverse = Array.prototype.reverse; obj[0] = \"x\"; obj[1] = \"y\"; obj[4294967297] = \"z\"; obj.length = 4294967298; obj.reverse() === obj. Actual: ' + (reverse));\n}\n\n//CHECK#2\nif (obj.length !== 4294967298) {\n $ERROR('#2: var obj = {}; obj.reverse = Array.prototype.reverse; obj[0] = \"x\"; obj[1] = \"y\"; obj[4294967297] = \"z\"; obj.length = 4294967298; obj.reverse(); obj.length === 4294967298. Actual: ' + (obj.length));\n}\n\n//CHECK#3\nif (obj[0] !== \"y\") {\n $ERROR('#3: var obj = {}; obj.reverse = Array.prototype.reverse; obj[0] = \"x\"; obj[1] = \"y\"; obj[4294967297] = \"z\"; obj.length = 4294967298; obj.reverse(); obj[0] === \"y\". Actual: ' + (obj[0]));\n} \n\n//CHECK#4\nif (obj[1] !== \"x\") {\n $ERROR('#4: var obj = {}; obj.reverse = Array.prototype.reverse; obj[0] = \"x\"; obj[1] = \"y\"; obj[4294967297] = \"z\"; obj.length = 4294967298; obj.reverse(); obj[1] === \"x\". Actual: ' + (obj[1]));\n} \n\n//CHECK#5\nif (obj[4294967297] !== \"z\") {\n $ERROR('#5: var obj = {}; obj.reverse = Array.prototype.reverse; obj[0] = \"x\"; obj[1] = \"y\"; obj[4294967297] = \"z\"; obj.length = 4294967298; obj.reverse(); obj[4294967297] === \"z\". Actual: ' + (obj[4294967297]));\n} \n",
+ "id": "S15.4.4.8_A3_T2"
+ },
+ {
+ "section": "15.4.4.8",
+ "description": "length = -4294967294",
+ "test": "var obj = {};\nobj.reverse = Array.prototype.reverse;\nobj[0] = \"x\";\nobj[1] = \"y\";\nobj[2] = \"z\";\nobj.length = -4294967294;\n\n//CHECK#1\nvar reverse = obj.reverse();\nif (reverse !== obj) {\n $ERROR('#1: var obj = {}; obj.reverse = Array.prototype.reverse; obj[0] = \"x\"; obj[1] = \"y\"; obj[2] = \"z\"; obj.length = -4294967294; obj.reverse() === obj. Actual: ' + (reverse));\n}\n\n//CHECK#2\nif (obj.length !== -4294967294) {\n $ERROR('#2: var obj = {}; obj.reverse = Array.prototype.reverse; obj[0] = \"x\"; obj[1] = \"y\"; obj[2] = \"z\"; obj.length = -4294967294; obj.reverse(); obj.length === -4294967294. Actual: ' + (obj.length));\n}\n\n//CHECK#3\nif (obj[0] !== \"y\") {\n $ERROR('#3: var obj = {}; obj.reverse = Array.prototype.reverse; obj[0] = \"x\"; obj[1] = \"y\"; obj[2] = \"z\"; obj.length = -4294967294; obj.reverse(); obj[0] === \"y\". Actual: ' + (obj[0]));\n} \n\n//CHECK#4\nif (obj[1] !== \"x\") {\n $ERROR('#4: var obj = {}; obj.reverse = Array.prototype.reverse; obj[0] = \"x\"; obj[1] = \"y\"; obj[2] = \"z\"; obj.length = -4294967294; obj.reverse(); obj[1] === \"x\". Actual: ' + (obj[1]));\n} \n\n//CHECK#5\nif (obj[2] !== \"z\") {\n $ERROR('#5: var obj = {}; obj.reverse = Array.prototype.reverse; obj[0] = \"x\"; obj[1] = \"y\"; obj[2] = \"z\"; obj.length = -4294967294; obj.reverse(); obj[2] === \"z\". Actual: ' + (obj[2]));\n} \n",
+ "id": "S15.4.4.8_A3_T3"
+ },
+ {
+ "section": "15.4.4.8, 8.6.2.1, 8.6.2.5",
+ "description": "[[Prototype]] of Array instance is Array.prototype, [[Prototype] of Array.prototype is Object.prototype",
+ "test": "Array.prototype[1] = 1;\nvar x = [0];\nx.length = 2;\nx.reverse();\n\n//CHECK#1\nif (x[0] !== 1) { \n $ERROR('#1: Array.prototype[1] = 1; x = [0]; x.length = 2; x.reverse(); x[0] === 1. Actual: ' + (x[0])); \n}\n\n//CHECK#2\nif (x[1] !== 0) { \n $ERROR('#2: Array.prototype[1] = 1; x = [0]; x.length = 2; x.reverse(); x[1] === 0. Actual: ' + (x[1])); \n}\n\nx.length = 0;\n\n//CHECK#3\nif (x[0] !== undefined) { \n $ERROR('#3: Array.prototype[1] = 1; x = [0]; x.length = 2; x.reverse(); x.length = 0; x[0] === undefined. Actual: ' + (x[0])); \n}\n\n//CHECK#4\nif (x[1] !== 1) { \n $ERROR('#4: Array.prototype[1] = 1; x = [0]; x.length = 2; x.reverse(); x.length = 0; x[1] === 1. Actual: ' + (x[1])); \n}\n\nObject.prototype[1] = 1;\nObject.prototype.length = 2;\nObject.prototype.reverse = Array.prototype.reverse;\nx = {0:0};\nx.reverse();\n\n//CHECK#5\nif (x[0] !== 1) { \n $ERROR('#5: Object.prototype[1] = 1; Object.prototype.length = 2; Object.prototype.reverse = Array.prototype.reverse; x = {0:0}; x.reverse(); x[0] === 0. Actual: ' + (x[0])); \n}\n\n//CHECK#6\nif (x[1] !== 0) { \n $ERROR('#6: Object.prototype[1] = 1; Object.prototype.length = 2; Object.prototype.reverse = Array.prototype.reverse; x = {0:0}; x.reverse(); x[1] === 0. Actual: ' + (x[1])); \n}\n\ndelete x[0];\ndelete x[1];\n\n//CHECK#7\nif (x[0] !== undefined) { \n $ERROR('#7: Object.prototype[1] = 1; Object.prototype.length = 2; Object.prototype.reverse = Array.prototype.reverse; x = {0:0}; x.reverse(); delete x[0]; delete x[1]; x[0] === undefined. Actual: ' + (x[0])); \n}\n\n//CHECK#8\nif (x[1] !== 1) { \n $ERROR('#8: Object.prototype[1] = 1; Object.prototype.length = 2; Object.prototype.reverse = Array.prototype.reverse; x = {0:0}; x.reverse(); delete x[0]; delete x[1]; x[1] === 1. Actual: ' + (x[1])); \n}\n",
+ "id": "S15.4.4.8_A4_T1"
+ },
+ {
+ "section": "15.4.4.8, 8.6.2.1, 8.6.2.5",
+ "description": "[[Prototype]] of Array instance is Array.prototype, [[Prototype] of Array.prototype is Object.prototype",
+ "test": "Array.prototype[1] = -1;\nvar x = [0,1];\nx.length = 2;\nx.reverse();\n\n//CHECK#1\nif (x[0] !== 1) { \n $ERROR('#1: Array.prototype[1] = -1; x = [0,1]; x.length = 2; x.reverse(); x[0] === 1. Actual: ' + (x[0])); \n}\n\n//CHECK#2\nif (x[1] !== 0) { \n $ERROR('#2: Array.prototype[1] = -1; x = [0,1]; x.length = 2; x.reverse(); x[1] === 0. Actual: ' + (x[1])); \n}\n\nx.length = 0;\n\n//CHECK#3\nif (x[0] !== undefined) { \n $ERROR('#3: Array.prototype[1] = -1; x = [0,1]; x.length = 2; x.reverse(); x.length = 0; x[0] === undefined. Actual: ' + (x[0])); \n}\n\n//CHECK#4\nif (x[1] !== -1) { \n $ERROR('#4: Array.prototype[1] = -1; x = [0,1]; x.length = 2; x.reverse(); x.length = 0; x[1] === -1. Actual: ' + (x[1])); \n}\n\nObject.prototype[1] = -1;\nObject.prototype.length = 2;\nObject.prototype.reverse = Array.prototype.reverse;\nx = {0:0,1:1};\nx.reverse();\n\n//CHECK#5\nif (x[0] !== 1) { \n $ERROR('#5: Object.prototype[1] = -1; Object.prototype.length = 2; Object.prototype.reverse = Array.prototype.reverse; x = {0:0,1:1}; x.reverse(); x[0] === 0. Actual: ' + (x[0])); \n}\n\n//CHECK#6\nif (x[1] !== 0) { \n $ERROR('#6: Object.prototype[1] = -1; Object.prototype.length = 2; Object.prototype.reverse = Array.prototype.reverse; x = {0:0,1:1}; x.reverse(); x[1] === 0. Actual: ' + (x[1])); \n}\n\ndelete x[0];\ndelete x[1];\n\n//CHECK#7\nif (x[0] !== undefined) { \n $ERROR('#7: Object.prototype[1] = -1; Object.prototype.length = 2; Object.prototype.reverse = Array.prototype.reverse; x = {0:0,1:1}; x.reverse(); delete x[0]; delete x[1]; x[0] === undefined. Actual: ' + (x[0])); \n}\n\n//CHECK#8\nif (x[1] !== -1) { \n $ERROR('#8: Object.prototype[1] = -1; Object.prototype.length = 2; Object.prototype.reverse = Array.prototype.reverse; x = {0:0,1:1}; x.reverse(); delete x[0]; delete x[1]; x[1] === -1. Actual: ' + (x[1])); \n}\n",
+ "id": "S15.4.4.8_A4_T2"
+ },
+ {
+ "section": "15.4.4.8, 15.2.4.7, 12.6.4",
+ "description": "Checking use propertyIsEnumerable, for-in",
+ "test": "//CHECK#1\nif (Array.prototype.reverse.propertyIsEnumerable('length') !== false) {\n $ERROR('#1: Array.prototype.reverse.propertyIsEnumerable(\\'length\\') === false. Actual: ' + (Array.prototype.reverse.propertyIsEnumerable('length')));\n}\n\n//CHECK#2\nvar result = true;\nfor (p in Array.reverse){\n if (p === \"length\") {\n var result = false;\n } \n}\n\nif (result !== true) {\n $ERROR('#2: result = true; for (p in Array.reverse) { if (p === \"length\") result = false; } result === true;');\n}\n\n",
+ "id": "S15.4.4.8_A5.1"
+ },
+ {
+ "section": "15.4.4.8, 15.2.4.5, 11.4.1",
+ "description": "Checking use hasOwnProperty, delete",
+ "strict_mode_negative": "",
+ "test": "//CHECK#1\nif (Array.prototype.reverse.hasOwnProperty('length') !== true) {\n $FAIL('#1: Array.prototype.reverse.hasOwnProperty(\\'length\\') === true. Actual: ' + (Array.prototype.reverse.hasOwnProperty('length')));\n}\n\ndelete Array.prototype.reverse.length;\n\n//CHECK#2\nif (Array.prototype.reverse.hasOwnProperty('length') !== true) {\n $ERROR('#2: delete Array.prototype.reverse.length; Array.prototype.reverse.hasOwnProperty(\\'length\\') === true. Actual: ' + (Array.prototype.reverse.hasOwnProperty('length')));\n}\n\n//CHECK#3\nif (Array.prototype.reverse.length === undefined) {\n $ERROR('#3: delete Array.prototype.reverse.length; Array.prototype.reverse.length !== undefined');\n}\n\n\n",
+ "id": "S15.4.4.8_A5.2",
+ "strict_only": ""
+ },
+ {
+ "section": "15.4.4.8",
+ "description": "Checking if varying the length property fails",
+ "strict_mode_negative": "",
+ "test": "//CHECK#1\nvar x = Array.prototype.reverse.length;\nArray.prototype.reverse.length = Infinity;\nif (Array.prototype.reverse.length !== x) {\n $ERROR('#1: x = Array.prototype.reverse.length; Array.prototype.reverse.length = Infinity; Array.prototype.reverse.length === x. Actual: ' + (Array.prototype.reverse.length));\n}\n\n",
+ "id": "S15.4.4.8_A5.3",
+ "strict_only": ""
+ },
+ {
+ "section": "15.4.4.8",
+ "description": "reverse.length === 1",
+ "test": "//CHECK#1\nif (Array.prototype.reverse.length !== 0) {\n $ERROR('#1: Array.prototype.reverse.length === 0. Actual: ' + (Array.prototype.reverse.length));\n}\n\n",
+ "id": "S15.4.4.8_A5.4"
+ },
+ {
+ "section": "15.4.4.8, 15.2.4.7, 12.6.4",
+ "description": "Checking use propertyIsEnumerable, for-in",
+ "test": "//CHECK#1\nif (Array.propertyIsEnumerable('reverse') !== false) {\n $ERROR('#1: Array.propertyIsEnumerable(\\'reverse\\') === false. Actual: ' + (Array.propertyIsEnumerable('reverse')));\n}\n\n//CHECK#2\nvar result = true;\nfor (var p in Array){\n if (p === \"reverse\") {\n result = false;\n } \n}\n\nif (result !== true) {\n $ERROR('#2: result = true; for (p in Array) { if (p === \"reverse\") result = false; } result === true;');\n}\n\n",
+ "id": "S15.4.4.8_A5.5"
+ },
+ {
+ "section": "15.4.4.8",
+ "description": "Checking Array.prototype.reverse.prototype",
+ "test": "//CHECK#1\nif (Array.prototype.reverse.prototype !== undefined) {\n $ERROR('#1: Array.prototype.reverse.prototype === undefined. Actual: ' + (Array.prototype.reverse.prototype));\n}\n",
+ "id": "S15.4.4.8_A5.6"
+ },
+ {
+ "section": "15.4.4.8, 11.2.2",
+ "description": "If property does not implement the internal [[Construct]] method, throw a TypeError exception",
+ "test": "//CHECK#1\n\ntry {\n new Array.prototype.reverse();\n $ERROR('#1.1: new Array.prototype.reverse() throw TypeError. Actual: ' + (new Array.prototype.reverse()));\n} catch (e) {\n if ((e instanceof TypeError) !== true) {\n $ERROR('#1.2: new Array.prototype.reverse() throw TypeError. Actual: ' + (e));\n }\n}\n",
+ "id": "S15.4.4.8_A5.7"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.4.4.9_Array_prototype_shift.json b/website/resources/scripts/testcases2/15.4.4.9_Array_prototype_shift.json
new file mode 100644
index 000000000..d6bef0145
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.4.4.9_Array_prototype_shift.json
@@ -0,0 +1,124 @@
+{
+ "testCollection": {
+ "name": "15.4.4.9_Array_prototype_shift",
+ "numTests": 19,
+ "tests": [
+ {
+ "section": "15.4.4.9",
+ "description": "Checking this algorithm",
+ "test": "//CHECK#1\nvar x = new Array();\nvar shift = x.shift();\nif (shift !== undefined) {\n $ERROR('#1: var x = new Array(); x.shift() === undefined. Actual: ' + (shift));\n} \n\n//CHECK#2\nif (x.length !== 0) {\n $ERROR('#2: var x = new Array(); x.shift(); x.length === 0. Actual: ' + (x.length));\n} \n\n//CHECK#3\nvar x = Array(1,2,3);\nx.length = 0;\nvar shift = x.shift();\nif (shift !== undefined) {\n $ERROR('#2: var x = Array(1,2,3); x.length = 0; x.shift() === undefined. Actual: ' + (shift));\n} \n\n//CHECK#4\nif (x.length !== 0) {\n $ERROR('#4: var x = new Array(1,2,3); x.length = 0; x.shift(); x.length === 0. Actual: ' + (x.length));\n} \n",
+ "id": "S15.4.4.9_A1.1_T1"
+ },
+ {
+ "section": "15.4.4.9",
+ "description": "Checking this use new Array() and []",
+ "test": "//CHECK#1\nvar x = new Array(0,1,2,3);\nvar shift = x.shift();\nif (shift !== 0) {\n $ERROR('#1: x = new Array(0,1,2,3); x.shift() === 0. Actual: ' + (shift));\n}\n\n//CHECK#2\nif (x.length !== 3) {\n $ERROR('#2: x = new Array(0,1,2,3); x.shift(); x.length == 3');\n}\n\n//CHECK#3\nif (x[0] !== 1) {\n $ERROR('#3: x = new Array(0,1,2,3); x.shift(); x[0] == 1');\n}\n\n//CHECK#4\nif (x[1] !== 2) {\n $ERROR('#4: x = new Array(0,1,2,3); x.shift(); x[1] == 2');\n}\n\n//CHECK#5\nx = [];\nx[0] = 0;\nx[3] = 3;\nvar shift = x.shift();\nif (shift !== 0) {\n $ERROR('#5: x = []; x[0] = 0; x[3] = 3; x.shift() === 0. Actual: ' + (shift));\n}\n\n//CHECK#6\nif (x.length !== 3) {\n $ERROR('#6: x = []; x[0] = 0; x[3] = 3; x.shift(); x.length == 3');\n}\n\n//CHECK#7\nif (x[0] !== undefined) {\n $ERROR('#7: x = []; x[0] = 0; x[3] = 3; x.shift(); x[0] == undefined');\n}\n\n//CHECK#8\nif (x[12] !== undefined) {\n $ERROR('#8: x = []; x[0] = 0; x[3] = 3; x.shift(); x[1] == undefined');\n}\n\n//CHECK#9\nx.length = 1;\nvar shift = x.shift();\nif (shift !== undefined) {\n $ERROR('#9: x = []; x[0] = 0; x[3] = 3; x.shift(); x.length = 1; x.shift() === undefined. Actual: ' + (shift));\n}\n\n//CHECK#10\nif (x.length !== 0) {\n $ERROR('#10: x = []; x[0] = 0; x[3] = 3; x.shift(); x.length = 1; x.shift(); x.length === 0. Actual: ' + (x.length));\n}\n",
+ "id": "S15.4.4.9_A1.2_T1"
+ },
+ {
+ "section": "15.4.4.9",
+ "description": "If ToUint32(length) equal zero, call the [[Put]] method\nof this object with arguments \"length\" and 0 and return undefined",
+ "test": "var obj = {};\nobj.shift = Array.prototype.shift;\n\nif (obj.length !== undefined) {\n $ERROR('#0: var obj = {}; obj.length === undefined. Actual: ' + (obj.length));\n} else {\n //CHECK#1 \n var shift = obj.shift();\nif (shift !== undefined) {\n $ERROR('#1: var obj = {}; obj.shift = Array.prototype.shift; obj.shift() === undefined. Actual: ' + (shift));\n }\n //CHECK#2\n if (obj.length !== 0) {\n $ERROR('#2: var obj = {}; obj.shift = Array.prototype.shift; obj.shift(); obj.length === 0. Actual: ' + (obj.length));\n }\n} \n\n//CHECK#3\nobj.length = undefined;\nvar shift = obj.shift();\nif (shift !== undefined) {\n $ERROR('#3: var obj = {}; obj.length = undefined; obj.shift = Array.prototype.shift; obj.shift() === undefined. Actual: ' + (shift));\n} \n\n//CHECK#4\nif (obj.length !== 0) {\n $ERROR('#4: var obj = {}; obj.length = undefined; obj.shift = Array.prototype.shift; obj.shift(); obj.length === 0. Actual: ' + (obj.length));\n}\n\n//CHECK#5\nobj.length = null\nvar shift = obj.shift();\nif (shift !== undefined) {\n $ERROR('#5: var obj = {}; obj.length = null; obj.shift = Array.prototype.shift; obj.shift() === undefined. Actual: ' + (shift));\n} \n\n//CHECK#6\nif (obj.length !== 0) {\n $ERROR('#6: var obj = {}; obj.length = null; obj.shift = Array.prototype.shift; obj.shift(); obj.length === 0. Actual: ' + (obj.length));\n}\n",
+ "id": "S15.4.4.9_A2_T1"
+ },
+ {
+ "section": "15.4.4.9",
+ "description": "If ToUint32(length) equal zero, call the [[Put]] method\nof this object with arguments \"length\" and 0 and return undefined",
+ "test": "var obj = {};\nobj.shift = Array.prototype.shift;\n\n//CHECK#1\nobj.length = NaN;\nvar shift = obj.shift();\nif (shift !== undefined) {\n $ERROR('#1: var obj = {}; obj.length = NaN; obj.shift = Array.prototype.shift; obj.shift() === undefined. Actual: ' + (shift));\n}\n\n//CHECK#2\nif (obj.length !== 0) {\n $ERROR('#2: var obj = {}; obj.length = NaN; obj.shift = Array.prototype.shift; obj.shift(); obj.length === 0. Actual: ' + (obj.length));\n}\n\n//CHECK#3\nobj.length = Number.POSITIVE_INFINITY;\nvar shift = obj.shift();\nif (shift !== undefined) {\n $ERROR('#3: var obj = {}; obj.length = Number.POSITIVE_INFINITY; obj.shift = Array.prototype.shift; obj.shift() === undefined. Actual: ' + (shift));\n}\n\n//CHECK#4\nif (obj.length !== 0) {\n $ERROR('#4: var obj = {}; obj.length = Number.POSITIVE_INFINITY; obj.shift = Array.prototype.shift; obj.shift(); obj.length === 0. Actual: ' + (obj.length));\n}\n\n//CHECK#5\nobj.length = Number.NEGATIVE_INFINITY;\nvar shift = obj.shift();\nif (shift !== undefined) {\n $ERROR('#5: var obj = {}; obj.length = Number.NEGATIVE_INFINITY; obj.shift = Array.prototype.shift; obj.shift() === undefined. Actual: ' + (shift));\n}\n\n//CHECK#6\nif (obj.length !== 0) {\n $ERROR('#6: var obj = {}; obj.length = Number.NEGATIVE_INFINITY; obj.shift = Array.prototype.shift; obj.shift(); obj.length === 0. Actual: ' + (obj.length));\n}\n\n//CHECK#7\nobj.length = -0;\nvar shift = obj.shift();\nif (shift !== undefined) {\n $ERROR('#7: var obj = {}; obj.length = -0; obj.shift = Array.prototype.shift; obj.shift() === undefined. Actual: ' + (shift));\n} \n\n//CHECK#8\nif (obj.length !== 0) {\n $ERROR('#8: var obj = {}; obj.length = -0; obj.shift = Array.prototype.shift; obj.shift(); obj.length === 0. Actual: ' + (obj.length));\n} else {\n if (1/obj.length !== Number.POSITIVE_INFINITY) {\n $ERROR('#8: var obj = {}; obj.length = -0; obj.shift = Array.prototype.shift; obj.shift(); obj.length === +0. Actual: ' + (obj.length));\n } \n} \n\n//CHECK#9\nobj.length = 0.5;\nvar shift = obj.shift();\nif (shift !== undefined) {\n $ERROR('#9: var obj = {}; obj.length = 0.5; obj.shift = Array.prototype.shift; obj.shift() === undefined. Actual: ' + (shift));\n}\n\n//CHECK#10\nif (obj.length !== 0) {\n $ERROR('#10: var obj = {}; obj.length = 0.5; obj.shift = Array.prototype.shift; obj.shift(); obj.length === 0. Actual: ' + (obj.length));\n} \n\n//CHECK#11\nobj.length = new Number(0);\nvar shift = obj.shift();\nif (shift !== undefined) {\n $ERROR('#11: var obj = {}; obj.length = new Number(0); obj.shift = Array.prototype.shift; obj.shift() === undefined. Actual: ' + (shift));\n}\n\n//CHECK#12\nif (obj.length !== 0) {\n $ERROR('#12: var obj = {}; obj.length = new Number(0); obj.shift = Array.prototype.shift; obj.shift(); obj.length === 0. Actual: ' + (obj.length));\n}\n",
+ "id": "S15.4.4.9_A2_T2"
+ },
+ {
+ "section": "15.4.4.9",
+ "description": "The first element of the array is removed from the array and\nreturned",
+ "test": "var obj = {};\nobj.shift = Array.prototype.shift;\n\n//CHECK#1\nobj.length = 2.5;\nvar shift = obj.shift();\nif (shift !== undefined) {\n $ERROR('#1: var obj = {}; obj.length = 2.5; obj.shift = Array.prototype.shift; obj.shift() === undefined. Actual: ' + (shift));\n}\n\n//CHECK#2\nif (obj.length !== 1) {\n $ERROR('#2: var obj = {}; obj.length = 2.5; obj.shift = Array.prototype.shift; obj.shift(); obj.length === 1. Actual: ' + (obj.length));\n} \n\n//CHECK#3\nobj.length = new Number(2);\nvar shift = obj.shift();\nif (shift !== undefined) {\n $ERROR('#11: var obj = {}; obj.length = new Number(2); obj.shift = Array.prototype.shift; obj.shift() === undefined. Actual: ' + (shift));\n}\n\n//CHECK#3\nif (obj.length !== 1) {\n $ERROR('#12: var obj = {}; obj.length = new Number(2); obj.shift = Array.prototype.shift; obj.shift(); obj.length === 1. Actual: ' + (obj.length));\n} \n",
+ "id": "S15.4.4.9_A2_T3"
+ },
+ {
+ "section": "15.4.4.9",
+ "description": "The first element of the array is removed from the array and\nreturned",
+ "test": "var obj = {};\nobj[\"0\"] = 0;\nobj[\"3\"] = 3;\nobj.shift = Array.prototype.shift;\n\n//CHECK#1\nobj.length = 4;\nvar shift = obj.shift();\nif (shift !== 0) {\n $ERROR('#1: var obj = {}; obj[\"0\"] = 0; obj[\"3\"] = 3; obj.length = 4; obj.shift = Array.prototype.shift; obj.shift() === 0. Actual: ' + (shift));\n} \n\n//CHECK#2\nif (obj.length !== 3) {\n $ERROR('#2: var obj = {}; obj[\"0\"] = 0; obj[\"3\"] = 3; obj.length = 4; obj.shift = Array.prototype.shift; obj.shift(); obj.length === 3. Actual: ' + (obj.length));\n}\n\n//CHECK#3\nvar shift = obj.shift();\nif (shift !== undefined) {\n $ERROR('#3: var obj = {}; obj[\"0\"] = 0; obj[\"3\"] = 3; obj.length = 4; obj.shift = Array.prototype.shift; obj.shift(); obj.shift() === undefined. Actual: ' + (shift));\n} \n\n//CHECK#4\nif (obj.length !== 2) {\n $ERROR('#4: var obj = {}; obj[\"0\"] = 0; obj[\"3\"] = 3; obj.length = 4; obj.shift = Array.prototype.shift; obj.shift(); obj.shift(); obj.length === 2. Actual: ' + (obj.length));\n}\n\n//CHECK#5\nobj.length = 1;\nvar shift = obj.shift();\nif (shift !== undefined) {\n $ERROR('#5: var obj = {}; obj[\"0\"] = 0; obj[\"3\"] = 3; obj.length = 4; obj.shift = Array.prototype.shift; obj.shift(); obj.shift(); obj.length = 1; obj.shift() === undefined. Actual: ' + (shift));\n} \n\n//CHECK#6\nif (obj.length !== 0) {\n $ERROR('#6: var obj = {}; obj[\"0\"] = 0; obj[\"3\"] = 3; obj.length = 4; obj.shift = Array.prototype.shift; obj.shift(); obj.shift(); obj.length = 1; obj.shift(); obj.length === 0. Actual: ' + (obj.length));\n}\n",
+ "id": "S15.4.4.9_A2_T4"
+ },
+ {
+ "section": "15.4.4.9",
+ "description": "Operator use ToNumber from length.\nIf Type(value) is Object, evaluate ToPrimitive(value, Number)",
+ "test": "var obj = {};\nobj.shift = Array.prototype.shift;\n\n//CHECK#1\nobj[0] = -1;\nobj.length = {valueOf: function() {return 1}};\nvar shift = obj.shift();\nif (shift !== -1) {\n $ERROR('#1: obj[0] = -1; obj.length = {valueOf: function() {return 1}} obj.shift() === -1. Actual: ' + (shift));\n}\n\n//CHECK#2\nobj[0] = -1;\nobj.length = {valueOf: function() {return 1}, toString: function() {return 0}};\nvar shift = obj.shift();\nif (shift !== -1) {\n $ERROR('#0: obj[0] = -1; obj.length = {valueOf: function() {return 1}, toString: function() {return 0}} obj.shift() === -1. Actual: ' + (shift));\n} \n\n//CHECK#3\nobj[0] = -1;\nobj.length = {valueOf: function() {return 1}, toString: function() {return {}}};\nvar shift = obj.shift();\nif (shift !== -1) {\n $ERROR('#3: obj[0] = -1; obj.length = {valueOf: function() {return 1}, toString: function() {return {}}} obj.shift() === -1. Actual: ' + (shift));\n}\n\n//CHECK#4\ntry { \n obj[0] = -1;\n obj.length = {valueOf: function() {return 1}, toString: function() {throw \"error\"}}; \n var shift = obj.shift();\nif (shift !== -1) {\n $ERROR('#4.1: obj[0] = -1; obj.length = {valueOf: function() {return 1}, toString: function() {throw \"error\"}}; obj.shift() === \",\". Actual: ' + (shift));\n }\n}\ncatch (e) {\n if (e === \"error\") {\n $ERROR('#4.2: obj[0] = -1; obj.length = {valueOf: function() {return 1}, toString: function() {throw \"error\"}}; obj.shift() not throw \"error\"');\n } else {\n $ERROR('#4.3: obj[0] = -1; obj.length = {valueOf: function() {return 1}, toString: function() {throw \"error\"}}; obj.shift() not throw Error. Actual: ' + (e));\n }\n}\n\n//CHECK#5\nobj[0] = -1;\nobj.length = {toString: function() {return 0}};\nvar shift = obj.shift();\nif (shift !== undefined) {\n $ERROR('#5: obj[0] = -1; obj.length = {toString: function() {return 0}} obj.shift() === undefined. Actual: ' + (shift));\n}\n\n//CHECK#6\nobj[0] = -1;\nobj.length = {valueOf: function() {return {}}, toString: function() {return 0}}\nvar shift = obj.shift();\nif (shift !== undefined) {\n $ERROR('#6: obj[0] = -1; obj.length = {valueOf: function() {return {}}, toString: function() {return 0}} obj.shift() === undefined. Actual: ' + (shift));\n}\n\n//CHECK#7\ntry {\n obj[0] = -1;\n obj.length = {valueOf: function() {throw \"error\"}, toString: function() {return 0}}; \n var shift = obj.shift();\n $ERROR('#7.1: obj[0] = -1; obj.length = {valueOf: function() {throw \"error\"}, toString: function() {return 0}}; obj.shift() throw \"error\". Actual: ' + (shift));\n} \ncatch (e) {\n if (e !== \"error\") {\n $ERROR('#7.2: obj[0] = -1; obj.length = {valueOf: function() {throw \"error\"}, toString: function() {return 0}}; obj.shift() throw \"error\". Actual: ' + (e));\n } \n}\n\n//CHECK#8\ntry {\n obj[0] = -1;\n obj.length = {valueOf: function() {return {}}, toString: function() {return {}}};\n var shift = obj.shift();\n $ERROR('#8.1: obj[0] = -1; obj.length = {valueOf: function() {return {}}, toString: function() {return {}}} obj.shift() throw TypeError. Actual: ' + (shift));\n} \ncatch (e) {\n if ((e instanceof TypeError) !== true) {\n $ERROR('#8.2: obj[0] = -1; obj.length = {valueOf: function() {return {}}, toString: function() {return {}}} obj.shift() throw TypeError. Actual: ' + (e));\n } \n}\n",
+ "id": "S15.4.4.9_A2_T5"
+ },
+ {
+ "section": "15.4.4.9",
+ "description": "length is arbitrarily",
+ "test": "var obj = {};\nobj.shift = Array.prototype.shift;\nobj[0] = \"x\";\nobj[4294967295] = \"y\";\nobj.length = 4294967296;\n\n//CHECK#1\nvar shift = obj.shift();\nif (shift !== undefined) {\n $ERROR('#1: var obj = {}; obj.shift = Array.prototype.shift; obj[0] = \"x\"; obj[4294967295] = \"y\"; obj.length = 4294967296; obj.shift() === unedfined. Actual: ' + (shift));\n}\n\n//CHECK#2\nif (obj.length !== 0) {\n $ERROR('#2: var obj = {}; obj.shift = Array.prototype.shift; obj[0] = \"x\"; obj[4294967295] = \"y\"; obj.length = 4294967296; obj.shift(); obj.length === 0. Actual: ' + (obj.length));\n}\n\n//CHECK#3\nif (obj[0] !== \"x\") {\n $ERROR('#3: var obj = {}; obj.shift = Array.prototype.shift; obj[0] = \"x\"; obj[4294967295] = \"y\"; obj.length = 4294967296; obj.shift(); obj[0] === \"x\". Actual: ' + (obj[0]));\n} \n\n//CHECK#4\nif (obj[4294967295] !== \"y\") {\n $ERROR('#4: var obj = {}; obj.shift = Array.prototype.shift; obj[0] = \"x\"; obj[4294967295] = \"y\"; obj.length = 4294967296; obj.shift(); obj[4294967295] === \"y\". Actual: ' + (obj[4294967295]));\n} \n",
+ "id": "S15.4.4.9_A3_T1"
+ },
+ {
+ "section": "15.4.4.9",
+ "description": "length is arbitrarily",
+ "test": "var obj = {};\nobj.shift = Array.prototype.shift;\nobj[0] = \"x\";\nobj[1] = \"y\";\nobj[4294967296] = \"z\";\nobj.length = 4294967297;\n\n//CHECK#1\nvar shift = obj.shift();\nif (shift !== \"x\") {\n $ERROR('#1: var obj = {}; obj.shift = Array.prototype.shift; obj[0] = \"x\"; obj[1] = \"y\"; obj[4294967296] = \"z\"; obj.length = 4294967297; obj.shift() === \"x\". Actual: ' + (shift));\n}\n\n//CHECK#2\nif (obj.length !== 0) {\n $ERROR('#2: var obj = {}; obj.shift = Array.prototype.shift; obj[0] = \"x\"; obj[1] = \"y\"; obj[4294967296] = \"z\"; obj.length = 4294967297; obj.shift(); obj.length === 0. Actual: ' + (obj.length));\n}\n\n//CHECK#3\nif (obj[0] !== undefined) {\n $ERROR('#3: var obj = {}; obj.shift = Array.prototype.shift; obj[0] = \"x\"; obj[1] = \"y\"; obj[4294967296] = \"z\"; obj.length = 4294967297; obj.shift(); obj[0] === undefined. Actual: ' + (obj[0]));\n}\n\n//CHECK#4\nif (obj[1] !== \"y\") {\n $ERROR('#4: var obj = {}; obj.shift = Array.prototype.shift; obj[0] = \"x\"; obj[1] = \"y\"; obj[4294967296] = \"z\"; obj.length = 4294967297; obj.shift(); obj[1] === \"y\". Actual: ' + (obj[1]));\n}\n\n//CHECK#4\nif (obj[4294967296] !== \"z\") {\n $ERROR('#4: var obj = {}; obj.shift = Array.prototype.shift; obj[0] = \"x\"; obj[1] = \"y\"; obj[4294967296] = \"z\"; obj.length = 4294967297; obj.shift(); obj[4294967296] === \"z\". Actual: ' + (obj[4294967296]));\n} \n",
+ "id": "S15.4.4.9_A3_T2"
+ },
+ {
+ "section": "15.4.4.9",
+ "description": "length is arbitrarily",
+ "test": "var obj = {};\nobj.shift = Array.prototype.shift;\nobj[0] = \"x\";\nobj[1] = \"y\";\nobj.length = -4294967294;\n\n//CHECK#1\nvar shift = obj.shift();\nif (shift !== \"x\") {\n $ERROR('#1: var obj = {}; obj.shift = Array.prototype.shift; obj[0] = \"x\"; obj[1] = \"y\"; obj.length = -4294967294; obj.shift() === \"x\". Actual: ' + (shift));\n}\n\n//CHECK#2\nif (obj.length !== 1) {\n $ERROR('#2: var obj = {}; obj.shift = Array.prototype.shift; obj[0] = \"x\"; obj[1] = \"y\"; obj.length = -4294967294; obj.shift(); obj.length === 1. Actual: ' + (obj.length));\n}\n\n//CHECK#3\nif (obj[0] !== \"y\") {\n $ERROR('#3: var obj = {}; obj.shift = Array.prototype.shift; obj[0] = \"x\"; obj[1] = \"y\"; obj.length = -4294967294; obj.shift(); obj[0] === \"y\". Actual: ' + (obj[0]));\n}\n\n//CHECK#4\nif (obj[1] !== undefined) {\n $ERROR('#4: var obj = {}; obj.shift = Array.prototype.shift; obj[0] = \"x\" obj[1] = \"y\"; obj.length = -4294967294; obj.shift(); obj[1] === undefined. Actual: ' + (obj[1]));\n} \n",
+ "id": "S15.4.4.9_A3_T3"
+ },
+ {
+ "section": "15.4.4.9, 8.6.2.1, 8.6.2.5",
+ "description": "[[Prototype]] of Array instance is Array.prototype, [[Prototype] of Array.prototype is Object.prototype",
+ "test": "Array.prototype[1] = 1;\nvar x = [0];\nx.length = 2;\n\n//CHECK#1\nvar shift = x.shift();\nif (shift !== 0) { \n $ERROR('#1: Array.prototype[1] = 1; x = [0]; x.length = 2; x.shift() === 0. Actual: ' + (shift)); \n}\n\n//CHECK#2\nif (x[0] !== 1) { \n $ERROR('#2: Array.prototype[1] = 1; x = [0]; x.length = 2; x.shift(); x[0] === 1. Actual: ' + (x[0])); \n}\n\n//CHECK#3\nif (x[1] !== 1) { \n $ERROR('#3: Array.prototype[1] = 1; x = [0]; x.length = 2; x.shift(); x[1] === 1. Actual: ' + (x[1])); \n}\n\nObject.prototype[1] = 1;\nObject.prototype.length = 2;\nObject.prototype.shift = Array.prototype.shift;\nx = {0:0};\n\n//CHECK#4\nvar shift = x.shift();\nif (shift !== 0) { \n $ERROR('#4: Object.prototype[1] = 1; Object.prototype.length = 2; Object.prototype.shift = Array.prototype.shift; x = {0:0}; x.shift() === 0. Actual: ' + (shift)); \n}\n\n//CHECK#5\nif (x[0] !== 1) { \n $ERROR('#5: Object.prototype[1] = 1; Object.prototype.length = 2; Object.prototype.shift = Array.prototype.shift; x = {0:0}; x.shift(); x[0] === 1. Actual: ' + (x[0])); \n}\n\n//CHECK#6\nif (x[1] !== 1) { \n $ERROR('#6: Object.prototype[1] = 1; Object.prototype.length = 2; Object.prototype.shift = Array.prototype.shift; x = {0:0}; x.shift(); x[1] === 1. Actual: ' + (x[1])); \n}\n\n//CHECK#7\nif (x.length !== 1) { \n $ERROR('#7: Object.prototype[1] = 1; Object.prototype.length = 2; Object.prototype.shift = Array.prototype.shift; x = {0:0}; x.shift(); x.length === 1. Actual: ' + (x.length)); \n}\n\n//CHECK#8\ndelete x.length;\nif (x.length !== 2) { \n $ERROR('#8: Object.prototype[1] = 1; Object.prototype.length = 2; Object.prototype.shift = Array.prototype.shift; x = {0:0}; x.shift(); delete x; x.length === 2. Actual: ' + (x.length)); \n}\n",
+ "id": "S15.4.4.9_A4_T1"
+ },
+ {
+ "section": "15.4.4.9, 8.6.2.1",
+ "description": "[[Prototype]] of Array instance is Array.prototype, [[Prototype] of Array.prototype is Object.prototype",
+ "test": "Array.prototype[1] = -1;\nvar x = [0,1];\nx.length = 2;\n\n//CHECK#1\nvar shift = x.shift();\nif (shift !== 0) { \n $ERROR('#1: Array.prototype[1] = -1; x = [0,1]; x.length = 2; x.shift() === 0. Actual: ' + (shift)); \n}\n\n//CHECK#2\nif (x[0] !== 1) { \n $ERROR('#2: Array.prototype[1] = -1; x = [0,1]; x.length = 2; x.shift(); x[0] === 1. Actual: ' + (x[0])); \n}\n\n//CHECK#3\nif (x[1] !== -1) { \n $ERROR('#3: Array.prototype[1] = -1; x = [0,1]; x.length = 2; x.shift(); x[1] === -1. Actual: ' + (x[1])); \n}\n\nObject.prototype[1] = -1;\nObject.prototype.length = 2;\nObject.prototype.shift = Array.prototype.shift;\nx = {0:0,1:1};\n\n//CHECK#4\nvar shift = x.shift();\nif (shift !== 0) { \n $ERROR('#4: Object.prototype[1] = -1; Object.prototype.length = 2; Object.prototype.shift = Array.prototype.shift; x = {0:0,1:1}; x.shift() === 0. Actual: ' + (shift)); \n}\n\n//CHECK#5\nif (x[0] !== 1) { \n $ERROR('#5: Object.prototype[1] = -1; Object.prototype.length = 2; Object.prototype.shift = Array.prototype.shift; x = {0:0,1:1}; x.shift(); x[0] === 1. Actual: ' + (x[0])); \n}\n\n//CHECK#6\nif (x[1] !== -1) { \n $ERROR('#6: Object.prototype[1] = -1; Object.prototype.length = 2; Object.prototype.shift = Array.prototype.shift; x = {0:0,1:1}; x.shift(); x[1] === -1. Actual: ' + (x[1])); \n}\n\n//CHECK#7\nif (x.length !== 1) { \n $ERROR('#7: Object.prototype[1] = -1; Object.prototype.length = 2; Object.prototype.shift = Array.prototype.shift; x = {0:0,1:1}; x.shift(); x.length === 1. Actual: ' + (x.length)); \n}\n\n//CHECK#8\ndelete x.length;\nif (x.length !== 2) { \n $ERROR('#8: Object.prototype[1] = -1; Object.prototype.length = 2; Object.prototype.shift = Array.prototype.shift; x = {0:0,1:1}; x.shift(); delete x; x.length === 2. Actual: ' + (x.length)); \n}\n",
+ "id": "S15.4.4.9_A4_T2"
+ },
+ {
+ "section": "15.4.4.9, 15.2.4.7, 12.6.4",
+ "description": "Checking use propertyIsEnumerable, for-in",
+ "test": "//CHECK#1\nif (Array.prototype.shift.propertyIsEnumerable('length') !== false) {\n $ERROR('#1: Array.prototype.shift.propertyIsEnumerable(\\'length\\') === false. Actual: ' + (Array.prototype.shift.propertyIsEnumerable('length')));\n}\n\n//CHECK#2\nvar result = true;\nfor (var p in Array.shift){\n if (p === \"length\") {\n result = false;\n} \n}\n\nif (result !== true) {\n $ERROR('#2: result = true; for (p in Array.shift) { if (p === \"length\") result = false; } result === true;');\n}\n\n",
+ "id": "S15.4.4.9_A5.1"
+ },
+ {
+ "section": "15.4.4.9, 15.2.4.5, 11.4.1",
+ "description": "Checking use hasOwnProperty, delete",
+ "test": "//CHECK#1\nif (Array.prototype.shift.hasOwnProperty('length') !== true) {\n $FAIL('#1: Array.prototype.shift.hasOwnProperty(\\'length\\') === true. Actual: ' + (Array.prototype.shift.hasOwnProperty('length')));\n}\n\ndelete Array.prototype.shift.length;\n\n//CHECK#2\nif (Array.prototype.shift.hasOwnProperty('length') !== true) {\n $ERROR('#2: delete Array.prototype.shift.length; Array.prototype.shift.hasOwnProperty(\\'length\\') === true. Actual: ' + (Array.prototype.shift.hasOwnProperty('length')));\n}\n\n//CHECK#3\nif (Array.prototype.shift.length === undefined) {\n $ERROR('#3: delete Array.prototype.shift.length; Array.prototype.shift.length !== undefined');\n}\n\n\n",
+ "id": "S15.4.4.9_A5.2"
+ },
+ {
+ "section": "15.4.4.9",
+ "description": "Checking if varying the length property fails",
+ "strict_mode_negative": "",
+ "test": "//CHECK#1\nvar x = Array.prototype.shift.length;\nArray.prototype.shift.length = Infinity;\nif (Array.prototype.shift.length !== x) {\n $ERROR('#1: x = Array.prototype.shift.length; Array.prototype.shift.length = Infinity; Array.prototype.shift.length === x. Actual: ' + (Array.prototype.shift.length));\n}\n\n",
+ "id": "S15.4.4.9_A5.3",
+ "strict_only": ""
+ },
+ {
+ "section": "15.4.4.9",
+ "description": "shift.length === 1",
+ "test": "//CHECK#1\nif (Array.prototype.shift.length !== 0) {\n $ERROR('#1: Array.prototype.shift.length === 0. Actual: ' + (Array.prototype.shift.length));\n}\n\n",
+ "id": "S15.4.4.9_A5.4"
+ },
+ {
+ "section": "15.4.4.9, 15.2.4.7, 12.6.4",
+ "description": "Checking use propertyIsEnumerable, for-in",
+ "test": "//CHECK#1\nif (Array.propertyIsEnumerable('shift') !== false) {\n $ERROR('#1: Array.propertyIsEnumerable(\\'shift\\') === false. Actual: ' + (Array.propertyIsEnumerable('shift')));\n}\n\n//CHECK#2\nvar result = true;\nfor (var p in Array){\n if (p === \"shift\") {\n result = false;\n} \n}\n\nif (result !== true) {\n $ERROR('#2: result = true; for (p in Array) { if (p === \"shift\") result = false; } result === true;');\n}\n\n",
+ "id": "S15.4.4.9_A5.5"
+ },
+ {
+ "section": "15.4.4.9",
+ "description": "Checking Array.prototype.shift.prototype",
+ "test": "//CHECK#1\nif (Array.prototype.shift.prototype !== undefined) {\n $ERROR('#1: Array.prototype.shift.prototype === undefined. Actual: ' + (Array.prototype.shift.prototype));\n}\n",
+ "id": "S15.4.4.9_A5.6"
+ },
+ {
+ "section": "15.4.4.9, 11.2.2",
+ "description": "If property does not implement the internal [[Construct]] method, throw a TypeError exception",
+ "test": "//CHECK#1\n\ntry {\n new Array.prototype.shift();\n $ERROR('#1.1: new Array.prototype.shift() throw TypeError. Actual: ' + (new Array.prototype.shift()));\n} catch (e) {\n if ((e instanceof TypeError) !== true) {\n $ERROR('#1.2: new Array.prototype.shift() throw TypeError. Actual: ' + (e));\n }\n}\n",
+ "id": "S15.4.4.9_A5.7"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.4.4_Properties_of_the_Array_Prototype_Object.json b/website/resources/scripts/testcases2/15.4.4_Properties_of_the_Array_Prototype_Object.json
new file mode 100644
index 000000000..ab1d815ce
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.4.4_Properties_of_the_Array_Prototype_Object.json
@@ -0,0 +1,50 @@
+{
+ "testCollection": {
+ "name": "15.4.4_Properties_of_the_Array_Prototype_Object",
+ "numTests": 7,
+ "tests": [
+ {
+ "section": "15.4.4, 15.2.4.5",
+ "description": "Create new property of Function.prototype. When Array.prototype object has this property",
+ "test": "Object.prototype.myproperty = 1;\n\n//CHECK#1\nif (Array.prototype.myproperty !== 1) {\n $ERROR('#1: Object.prototype.myproperty = 1; Array.prototype.myproperty === 1. Actual: ' + (Array.prototype.myproperty));\n}\n\n//CHECK#2\nif (Array.prototype.hasOwnProperty('myproperty') !== false) {\n $ERROR('#2: Object.prototype.myproperty = 1; Array.prototype.hasOwnProperty(\\'myproperty\\') === false. Actual: ' + (Array.prototype.hasOwnProperty('myproperty')));\n}\n",
+ "id": "S15.4.4_A1.1_T1"
+ },
+ {
+ "section": "15.4.4",
+ "test": "//CHECK#1\nif (Object.prototype.toString.call(Array.prototype) !== \"[object Array]\") {\n $ERROR('The Array prototype object is itself an array; its' +\n '[[Class]] is \"Array\".');\n}\n",
+ "id": "S15.4.4_A1.1_T2",
+ "description": ":The Array prototype object is itself an array; its [[Class]] is \"Array\","
+ },
+ {
+ "section": "15.4.4, 15.2.4.6",
+ "description": "Checking use isPrototypeOf",
+ "test": "//CHECK#1\nif (Object.prototype.isPrototypeOf(Array.prototype) !== true) {\n $ERROR('#1: Object.prototype.isPrototypeOf(Array.prototype) === true. Actual: ' + (Object.prototype.isPrototypeOf(Array.prototype)));\n}\n",
+ "id": "S15.4.4_A1.1_T3"
+ },
+ {
+ "section": "15.4.4, 15.2.4.2",
+ "description": "Checking use Object.prototype.toString",
+ "test": "//CHECK#1\nArray.prototype.getClass = Object.prototype.toString;\nif (Array.prototype.getClass() !== \"[object \" + \"Array\" + \"]\") {\n $ERROR('#1: Array.prototype.getClass = Object.prototype.toString; Array.prototype is Array object. Actual: ' + (Array.prototype.getClass()));\n}\n",
+ "id": "S15.4.4_A1.2_T1"
+ },
+ {
+ "section": "15.4.4",
+ "description": "Array.prototype.length === 0",
+ "test": "//CHECK#1\nif (Array.prototype.length !== 0) {\n $ERROR('#1.1: Array.prototype.length === 0. Actual: ' + (Array.prototype.length));\n} else {\n if (1 / Array.prototype.length !== Number.POSITIVE_INFINITY) {\n $ERROR('#1.2: Array.prototype.length === +0. Actual: ' + (Array.prototype.length));\n }\n} \n \n",
+ "id": "S15.4.4_A1.3_T1"
+ },
+ {
+ "section": "15.4.4, 15.2.4.5",
+ "description": "Checking use hasOwnProperty",
+ "test": "//CHECK#1\nif (Array.prototype.hasOwnProperty('valueOf') !== false) {\n $ERROR('#1: Array.prototype.hasOwnProperty(\\'valueOf\\') === false. Actual: ' + (Array.prototype.hasOwnProperty('valueOf')));\n}\n",
+ "id": "S15.4.4_A2.1_T1"
+ },
+ {
+ "section": "15.4.4",
+ "description": "Change valueOf property of Object.prototype. When Array.prototype.valueOf also change",
+ "test": "Object.prototype.valueOf = 1;\n\n//CHECK#1\nif (Array.prototype.valueOf !== 1) {\n $ERROR('#1: Object.prototype.valueOf = 1; Array.prototype.valueOf === 1. Actual: ' + (Array.prototype.valueOf));\n}\n\n//CHECK#2\nvar x = new Array();\nif (x.valueOf !== 1) {\n $ERROR('#1: Object.prototype.valueOf = 1; x = new Array(); x.valueOf === 1. Actual: ' + (x.valueOf));\n}\n",
+ "id": "S15.4.4_A2.1_T2"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.4.5.1.json b/website/resources/scripts/testcases2/15.4.5.1.json
new file mode 100644
index 000000000..55d490a34
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.4.5.1.json
@@ -0,0 +1,38 @@
+{
+ "testCollection": {
+ "name": "15.4.5.1",
+ "numTests": 5,
+ "tests": [
+ {
+ "id": "15.4.5.1-3.d-1",
+ "path": "TestCases/chapter15/15.4/15.4.5/15.4.5.1/15.4.5.1-3.d-1.js",
+ "description": "Throw RangeError if attempt to set array length property to 4294967296 (2**32)",
+ "test": "assertTrue((function testcase() {\n try {\n [].length = 4294967296 ;\n } catch (e) {\n\tif (e instanceof RangeError) return true;\n }\n }).call(this));\n"
+ },
+ {
+ "id": "15.4.5.1-3.d-2",
+ "path": "TestCases/chapter15/15.4/15.4.5/15.4.5.1/15.4.5.1-3.d-2.js",
+ "description": "Throw RangeError if attempt to set array length property to 4294967297 (1+2**32)",
+ "test": "assertTrue((function testcase() {\n try {\n [].length = 4294967297 ;\n } catch (e) {\n\tif (e instanceof RangeError) return true;\n }\n }).call(this));\n"
+ },
+ {
+ "id": "15.4.5.1-3.d-3",
+ "path": "TestCases/chapter15/15.4/15.4.5/15.4.5.1/15.4.5.1-3.d-3.js",
+ "description": "Set array length property to max value 4294967295 (2**32-1,)",
+ "test": "assertTrue((function testcase() { \n var a =[];\n a.length = 4294967295 ;\n return a.length===4294967295 ;\n }).call(this));\n"
+ },
+ {
+ "id": "15.4.5.1-5-1",
+ "path": "TestCases/chapter15/15.4/15.4.5/15.4.5.1/15.4.5.1-5-1.js",
+ "description": "Defining a property named 4294967295 (2**32-1)(not an array element)",
+ "test": "assertTrue((function testcase() { \n var a =[];\n a[4294967295] = \"not an array element\" ;\n return a[4294967295] === \"not an array element\";\n }).call(this));\n"
+ },
+ {
+ "id": "15.4.5.1-5-2",
+ "path": "TestCases/chapter15/15.4/15.4.5/15.4.5.1/15.4.5.1-5-2.js",
+ "description": "Defining a property named 4294967295 (2**32-1) doesn't change length of the array",
+ "test": "assertTrue((function testcase() { \n var a =[0,1,2];\n a[4294967295] = \"not an array element\" ;\n return a.length===3;\n }).call(this));\n"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.4.5.1_Put.json b/website/resources/scripts/testcases2/15.4.5.1_Put.json
new file mode 100644
index 000000000..6e0fb16bf
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.4.5.1_Put.json
@@ -0,0 +1,68 @@
+{
+ "testCollection": {
+ "name": "15.4.5.1_Put",
+ "numTests": 10,
+ "tests": [
+ {
+ "section": "15.4.5.1, 15.4",
+ "description": "length in [4294967296, -1, 1.5]",
+ "test": "//CHECK#1\ntry {\n var x = [];\n x.length = 4294967296;\n $ERROR('#1.1: x = []; x.length = 4294967296 throw RangeError. Actual: x.length === ' + (x.length));\n} catch(e) { \n if ((e instanceof RangeError) !== true) {\n $ERROR('#1.2: x = []; x.length = 4294967296 throw RangeError. Actual: ' + (e));\n } \n}\n\n//CHECK#2\ntry {\n x = [];\n x.length = -1;\n $ERROR('#2.1: x = []; x.length = -1 throw RangeError. Actual: x.length === ' + (x.length));\n} catch(e) { \n if ((e instanceof RangeError) !== true) {\n $ERROR('#2.2: x = []; x.length = -1 throw RangeError. Actual: ' + (e));\n } \n}\n\n//CHECK#3\ntry {\n x = [];\n x.length = 1.5;\n $ERROR('#3.1: x = []; x.length = 1.5 throw RangeError. Actual: x.length === ' + (x.length));\n} catch(e) { \n if ((e instanceof RangeError) !== true) {\n $ERROR('#3.2: x = []; x.length = 1.5 throw RangeError. Actual: ' + (e));\n } \n}\n",
+ "id": "S15.4.5.1_A1.1_T1"
+ },
+ {
+ "section": "15.4.5.1, 15.4",
+ "description": "length in [NaN, Infinity, -Infinity, undefined]",
+ "test": "//CHECK#1\ntry {\n var x = [];\n x.length = NaN;\n $ERROR('#1.1: x = []; x.length = NaN throw RangeError. Actual: x.length === ' + (x.length));\n} catch(e) { \n if ((e instanceof RangeError) !== true) {\n $ERROR('#1.2: x = []; x.length = NaN throw RangeError. Actual: ' + (e));\n } \n}\n\n//CHECK#2\ntry {\n x = [];\n x.length = Number.POSITIVE_INFINITY;\n $ERROR('#2.1: x = []; x.length = Number.POSITIVE_INFINITY throw RangeError. Actual: x.length === ' + (x.length));\n} catch(e) { \n if ((e instanceof RangeError) !== true) {\n $ERROR('#2.2: x = []; x.length = Number.POSITIVE_INFINITY throw RangeError. Actual: ' + (e));\n } \n}\n\n//CHECK#3\ntry {\n x = [];\n x.length = Number.NEGATIVE_INFINITY;\n $ERROR('#3.1: x = []; x.length = Number.NEGATIVE_INFINITY throw RangeError. Actual: x.length === ' + (x.length));\n} catch(e) { \n if ((e instanceof RangeError) !== true) {\n $ERROR('#3.2: x = []; x.length = Number.NEGATIVE_INFINITY throw RangeError. Actual: ' + (e));\n } \n}\n\n//CHECK#4\ntry {\n x = [];\n x.length = undefined;\n $ERROR('#4.1: x = []; x.length = undefined throw RangeError. Actual: x.length === ' + (x.length));\n} catch(e) { \n if ((e instanceof RangeError) !== true) {\n $ERROR('#4.2: x = []; x.length = undefined throw RangeError. Actual: ' + (e));\n } \n}\n",
+ "id": "S15.4.5.1_A1.1_T2"
+ },
+ {
+ "section": "15.4.5.1, 15.4",
+ "description": "Change length of array",
+ "test": "//CHECK#1\nvar x = [0,,2,,4];\nx.length = 4;\nif (x[4] !== undefined) { \n $ERROR('#1: x = [0,,2,,4]; x.length = 4; x[4] === undefined. Actual: ' + (x[4])); \n}\n\n//CHECK#2\nx.length = 3;\nif (x[3] !== undefined) { \n $ERROR('#2: x = [0,,2,,4]; x.length = 4; x.length = 3; x[3] === undefined. Actual: ' + (x[3])); \n}\n\n//CHECK#3\nif (x[2] !== 2) { \n $ERROR('#3: x = [0,,2,,4]; x.length = 4; x.length = 3; x[2] === 2. Actual: ' + (x[2])); \n}\n",
+ "id": "S15.4.5.1_A1.2_T1"
+ },
+ {
+ "section": "15.4.5.1, 15.4",
+ "description": "Checking an inherited property",
+ "test": "//CHECK#1\nArray.prototype[2] = -1;\nvar x = [0,1,2];\nif (x[2] !== 2) { \n $ERROR('#1: Array.prototype[2] = -1; x = [0,1,3]; x[2] === 2. Actual: ' + (x[2])); \n}\n\n//CHECK#2\nx.length = 2;\nif (x[2] !== -1) { \n $ERROR('#2: Array.prototype[2] = -1; x = [0,1,3]; x.length = 2; x[2] === -1. Actual: ' + (x[2])); \n}\n",
+ "id": "S15.4.5.1_A1.2_T2"
+ },
+ {
+ "section": "15.4.5.1, 15.4, 15.2.4.5",
+ "description": "Checking an inherited property",
+ "test": "//CHECK#1\nArray.prototype[2] = 2;\nvar x = [0,1];\nx.length = 3;\nif (x.hasOwnProperty('2') !== false) { \n $ERROR('#1: Array.prototype[2] = 2; x = [0,1]; x.length = 3; x.hasOwnProperty(\\'2\\') === false. Actual: ' + (x.hasOwnProperty('2'))); \n}\n\n//CHECK#2\nx.length = 2;\nif (x[2] !== 2) { \n $ERROR('#2: Array.prototype[2] = 2; x = [0,1]; x.length = 3; x.length = 2; x[2] === 2. Actual: ' + (x[2])); \n}\n",
+ "id": "S15.4.5.1_A1.2_T3"
+ },
+ {
+ "section": "15.4.5.1, 15.4",
+ "description": "length is object or primitve",
+ "test": "//CHECK#1\nvar x = [];\nx.length = true;\nif (x.length !== 1) { \n $ERROR('#1: x = []; x.length = true; x.length === 1. Actual: ' + (x.length)); \n}\n\n//CHECK#2\nx = [0];\nx.length = null;\nif (x.length !== 0) { \n $ERROR('#2: x = [0]; x.length = null; x.length === 0. Actual: ' + (x.length)); \n}\n\n//CHECK#3\nx = [0];\nx.length = new Boolean(false);\nif (x.length !== 0) { \n $ERROR('#3: x = [0]; x.length = new Boolean(false); x.length === 0. Actual: ' + (x.length)); \n}\n\n//CHECK#4\nx = [];\nx.length = new Number(1);\nif (x.length !== 1) { \n $ERROR('#4: x = []; x.length = new Number(1); x.length === 1. Actual: ' + (x.length)); \n}\n\n//CHECK#5\nx = [];\nx.length = \"1\";\nif (x.length !== 1) { \n $ERROR('#5: x = []; x.length = \"1\"; x.length === 1. Actual: ' + (x.length)); \n}\n\n//CHECK#6\nx = [];\nx.length = new String(\"1\");\nif (x.length !== 1) { \n $ERROR('#6: x = []; x.length = new String(\"1\"); x.length === 1. Actual: ' + (x.length)); \n}\n",
+ "id": "S15.4.5.1_A1.3_T1"
+ },
+ {
+ "section": "15.4.5.1, 15.4",
+ "description": "Uint32 use ToNumber and ToPrimitve",
+ "test": "//CHECK#1\nvar x = [];\nx.length = {valueOf: function() {return 2}};\nif (x.length !== 2) {\n $ERROR('#1: x = []; x.length = {valueOf: function() {return 2}}; x.length === 2. Actual: ' + (x.length));\n}\n\n//CHECK#2\nx = [];\nx.length = {valueOf: function() {return 2}, toString: function() {return 1}};\nif (x.length !== 2) {\n $ERROR('#0: x = []; x.length = {valueOf: function() {return 2}, toString: function() {return 1}}; x.length === 2. Actual: ' + (x.length));\n} \n\n//CHECK#3\nx = [];\nx.length = {valueOf: function() {return 2}, toString: function() {return {}}};\nif (x.length !== 2) {\n $ERROR('#3: x = []; x.length = {valueOf: function() {return 2}, toString: function() {return {}}}; x.length === 2. Actual: ' + (x.length));\n}\n\n//CHECK#4\ntry { \n x = [];\n x.length = {valueOf: function() {return 2}, toString: function() {throw \"error\"}}; \n if (x.length !== 2) {\n $ERROR('#4.1: x = []; x.length = {valueOf: function() {return 2}, toString: function() {throw \"error\"}}; x.length === \",\". Actual: ' + (x.length));\n }\n}\ncatch (e) {\n if (e === \"error\") {\n $ERROR('#4.2: x = []; x.length = {valueOf: function() {return 2}, toString: function() {throw \"error\"}}; x.length not throw \"error\"');\n } else {\n $ERROR('#4.3: x = []; x.length = {valueOf: function() {return 2}, toString: function() {throw \"error\"}}; x.length not throw Error. Actual: ' + (e));\n }\n}\n\n//CHECK#5\nx = [];\nx.length = {toString: function() {return 1}};\nif (x.length !== 1) {\n $ERROR('#5: x = []; x.length = {toString: function() {return 1}}; x.length === 1. Actual: ' + (x.length));\n}\n\n//CHECK#6\nx = [];\nx.length = {valueOf: function() {return {}}, toString: function() {return 1}}\nif (x.length !== 1) {\n $ERROR('#6: x = []; x.length = {valueOf: function() {return {}}, toString: function() {return 1}}; x.length === 1. Actual: ' + (x.length));\n}\n\n//CHECK#7\ntry {\n x = [];\n x.length = {valueOf: function() {throw \"error\"}, toString: function() {return 1}}; \n x.length;\n $ERROR('#7.1: x = []; x.length = {valueOf: function() {throw \"error\"}, toString: function() {return 1}}; x.length throw \"error\". Actual: ' + (x.length));\n} \ncatch (e) {\n if (e !== \"error\") {\n $ERROR('#7.2: x = []; x.length = {valueOf: function() {throw \"error\"}, toString: function() {return 1}}; x.length throw \"error\". Actual: ' + (e));\n } \n}\n\n//CHECK#8\ntry {\n x = [];\n x.length = {valueOf: function() {return {}}, toString: function() {return {}}};\n x.length;\n $ERROR('#8.1: x = []; x.length = {valueOf: function() {return {}}, toString: function() {return {}}} x.length throw TypeError. Actual: ' + (x.length));\n} \ncatch (e) {\n if ((e instanceof TypeError) !== true) {\n $ERROR('#8.2: x = []; x.length = {valueOf: function() {return {}}, toString: function() {return {}}} x.length throw TypeError. Actual: ' + (e));\n } \n}\n",
+ "id": "S15.4.5.1_A1.3_T2"
+ },
+ {
+ "section": "15.4.5.1, 15.4",
+ "description": "P in [4294967295, -1, true]",
+ "test": "//CHECK#1\nvar x = [];\nx[4294967295] = 1;\nif (x.length !== 0) { \n $ERROR('#1.1: x = []; x[4294967295] = 1; x.length === 0. Actual: ' + (x.length)); \n}\n\nif (x[4294967295] !== 1) { \n $ERROR('#1.2: x = []; x[4294967295] = 1; x[4294967295] === 1. Actual: ' + (x[4294967295])); \n}\n\n//CHECK#2\nx = [];\nx[-1] = 1;\nif (x.length !== 0) { \n $ERROR('#2.1: x = []; x[-1] = 1; x.length === 0. Actual: ' + (x.length)); \n}\n\nif (x[-1] !== 1) { \n $ERROR('#2.2: x = []; x[-1] = 1; x[-1] === 1. Actual: ' + (x[-1])); \n}\n\n//CHECK#3\nx = [];\nx[true] = 1;\nif (x.length !== 0) { \n $ERROR('#3.1: x = []; x[true] = 1; x.length === 0. Actual: ' + (x.length)); \n}\n\nif (x[true] !== 1) { \n $ERROR('#3.2: x = []; x[true] = 1; x[true] === 1. Actual: ' + (x[true])); \n}\n",
+ "id": "S15.4.5.1_A2.1_T1"
+ },
+ {
+ "section": "15.4.5.1, 15.4",
+ "description": "length === 100, P in [0, 98, 99]",
+ "test": "//CHECK#1\nvar x = Array(100);\nx[0] = 1;\nif (x.length !== 100) { \n $ERROR('#1: x = Array(100); x[0] = 1; x.length === 100. Actual: ' + (x.length)); \n}\n\n//CHECK#2\nx[98] = 1;\nif (x.length !== 100) { \n $ERROR('#2: x = Array(100); x[0] = 1; x[98] = 1; x.length === 100. Actual: ' + (x.length)); \n}\n\n//CHECK#3\nx[99] = 1;\nif (x.length !== 100) { \n $ERROR('#3: x = Array(100); x[0] = 1; x[98] = 1; x[99] = 1; x.length === 100. Actual: ' + (x.length)); \n}\n",
+ "id": "S15.4.5.1_A2.2_T1"
+ },
+ {
+ "section": "15.4.5.1, 15.4",
+ "description": "length = 100, P in [100, 199]",
+ "test": "//CHECK#1\nvar x = Array(100);\nx[100] = 1;\nif (x.length !== 101) { \n $ERROR('#1: x = Array(100); x[100] = 1; x.length === 101. Actual: ' + (x.length)); \n}\n\n//CHECK#2\nx[199] = 1;\nif (x.length !== 200) { \n $ERROR('#2: x = Array(100); x[100] = 1; x[199] = 1; x.length === 100. Actual: ' + (x.length)); \n}\n",
+ "id": "S15.4.5.1_A2.3_T1"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.4.5.2_length.json b/website/resources/scripts/testcases2/15.4.5.2_length.json
new file mode 100644
index 000000000..434f2f048
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.4.5.2_length.json
@@ -0,0 +1,50 @@
+{
+ "testCollection": {
+ "name": "15.4.5.2_length",
+ "numTests": 7,
+ "tests": [
+ {
+ "section": "15.4.5.2, 15.4",
+ "description": "Checking boundary points",
+ "test": "//CHECK#1\nvar x = [];\nif (x.length !== 0) { \n $ERROR('#1: x = []; x.length === 0. Actual: ' + (x.length)); \n}\n\n//CHECK#2\nx[0] = 1;\nif (x.length !== 1) { \n $ERROR('#2: x = []; x[1] = 1; x.length === 1. Actual: ' + (x.length));\n}\n\n//CHECK#3\nx[1] = 1;\nif (x.length !== 2) { \n $ERROR('#3: x = []; x[0] = 1; x[1] = 1; x.length === 2. Actual: ' + (x.length));\n}\n\n//CHECK#4\nx[2147483648] = 1;\nif (x.length !== 2147483649) { \n $ERROR('#4: x = []; x[0] = 1; x[1] = 1; x[2147483648] = 1; x.length === 2147483649. Actual: ' + (x.length));\n}\n\n//CHECK#5\nx[4294967294] = 1;\nif (x.length !== 4294967295) { \n $ERROR('#5: x = []; x[0] = 1; x[1] = 1; x[2147483648] = 1; x[42949672954] = 1; x.length === 4294967295. Actual: ' + (x.length));\n}\n",
+ "id": "S15.4.5.2_A1_T1"
+ },
+ {
+ "section": "15.4.5.2, 15.4",
+ "description": "P = \"2^32 - 1\" is not index array",
+ "test": "//CHECK#1\nvar x = [];\nx[4294967295] = 1;\nif (x.length !== 0) { \n $ERROR('#1: x = []; x[4294967295] = 1; x.length === 0. Actual: ' + (x.length)); \n}\n\n//CHECK#2\nvar y =[];\ny[1] = 1;\ny[4294967295] = 1;\nif (y.length !== 2) { \n $ERROR('#2: y = []; y[1] = 1; y[4294967295] = 1; y.length === 2. Actual: ' + (y.length));\n}\n",
+ "id": "S15.4.5.2_A1_T2"
+ },
+ {
+ "section": "15.4.5.2, 15.4",
+ "description": "Checking length property",
+ "test": "//CHECK#1\nvar x = [];\nif (x.length !== 0) { \n $ERROR('#1: x = []; x.length === 0. Actual: ' + (x.length)); \n}\n\n//CHECK#2\nx[0] = 1;\nif (x.length !== 1) { \n $ERROR('#2: x = []; x[1] = 1; x.length === 1. Actual: ' + (x.length));\n}\n\n//CHECK#3\nx[1] = 1;\nif (x.length !== 2) { \n $ERROR('#3: x = []; x[0] = 1; x[1] = 1; x.length === 2. Actual: ' + (x.length));\n}\n\n//CHECK#4\nx[9] = 1;\nif (x.length !== 10) { \n $ERROR('#4: x = []; x[0] = 1; x[1] = 1; x[9] = 1; x.length === 10. Actual: ' + (x.length));\n}\n",
+ "id": "S15.4.5.2_A2_T1"
+ },
+ {
+ "section": "15.4.5.2, 15.4",
+ "description": "If new length greater than the name of every property whose name\nis an array index",
+ "test": "//CHECK#1\nvar x = [];\nx.length = 1;\nif (x.length !== 1) { \n $ERROR('#1: x = []; x.length = 1; x.length === 1. Actual: ' + (x.length)); \n}\n\n//CHECK#2\nx[5] = 1;\nx.length = 10;\nif (x.length !== 10) { \n $ERROR('#2: x = []; x.length = 1; x[5] = 1; x.length = 10; x.length === 10. Actual: ' + (x.length));\n}\n\n//CHECK#3\nif (x[5] !== 1) { \n $ERROR('#3: x = []; x.length = 1; x[5] = 1; x.length = 10; x[5] = 1');\n}\n",
+ "id": "S15.4.5.2_A3_T1"
+ },
+ {
+ "section": "15.4.5.2, 15.4",
+ "description": "If new length greater than the name of every property whose name\nis an array index",
+ "test": "//CHECK#1\nvar x = [];\nx[1] = 1;\nx[3] = 3;\nx[5] = 5;\nx.length = 4;\nif (x.length !== 4) { \n $ERROR('#1: x = []; x[1] = 1; x[3] = 3; x[5] = 5; x.length = 4; x.length === 4. Actual: ' + (x.length)); \n}\n\n//CHECK#2\nif (x[5] !== undefined) { \n $ERROR('#2: x = []; x[1] = 1; x[3] = 3; x[5] = 5; x.length = 4; x[5] === undefined. Actual: ' + (x[5]));\n}\n\n//CHECK#3\nif (x[3] !== 3) { \n $ERROR('#3: x = []; x[1] = 1; x[3] = 3; x[5] = 5; x.length = 4; x[3] === 3. Actual: ' + (x[3]));\n}\n\n//CHECK#4\nx.length = new Number(6);\nif (x[5] !== undefined) { \n $ERROR('#4: x = []; x[1] = 1; x[3] = 3; x[5] = 5; x.length = 4; x.length = new Number(6); x[5] === undefined. Actual: ' + (x[5]));\n}\n\n//CHECK#5\nx.length = 0;\nif (x[0] !== undefined) { \n $ERROR('#5: x = []; x[1] = 1; x[3] = 3; x[5] = 5; x.length = 4; x.length = new Number(6); x.length = 0; x[0] === undefined. Actual: ' + (x[0]));\n}\n\n//CHECK#6\nx.length = 1;\nif (x[1] !== undefined) { \n $ERROR('#6: x = []; x[1] = 1; x[3] = 3; x[5] = 5; x.length = 4; x.length = new Number(6); x.length = 0; x.length = 1; x[1] === undefined. Actual: ' + (x[1]));\n}\n",
+ "id": "S15.4.5.2_A3_T2"
+ },
+ {
+ "section": "15.4.5.2, 15.4.2.2",
+ "description": "[[Put]] (length, 4294967296)",
+ "test": "//CHECK#1\nvar x = [];\nx.length = 4294967295;\nif (x.length !== 4294967295) { \n $ERROR('#1: x = []; x.length = 4294967295; x.length === 4294967295'); \n}\n\n//CHECK#2\ntry {\n x = [];\n x.length = 4294967296;\n $ERROR('#2.1: x = []; x.length = 4294967296 throw RangeError. Actual: x.length === ' + (x.length));\n} catch(e) { \n if ((e instanceof RangeError) !== true) {\n $ERROR('#2.2: x = []; x.length = 4294967296 throw RangeError. Actual: ' + (e));\n } \n}\n",
+ "id": "S15.4.5.2_A3_T3"
+ },
+ {
+ "section": "15.4.5.2, 15.4.2.2",
+ "description": "If new length greater than the name of every property whose name\nis an array index",
+ "test": "//CHECK#1\nvar x = [0,1,2]; \nx[4294967294] = 4294967294; \nx.length = 2;\n\n//CHECK#1\nif (x[0] !== 0) { \n $ERROR('#1: x = [0,1,2]; x[4294967294] = 4294967294; x.length = 2; x[0] === 0. Actual: ' + (x[0])); \n}\n\n//CHECK#2\nif (x[1] !== 1) { \n $ERROR('#2: x = [0,1,2]; x[4294967294] = 4294967294; x.length = 2; x[1] === 1. Actual: ' + (x[1])); \n}\n\n//CHECK#3\nif (x[2] !== undefined) { \n $ERROR('#3: x = [0,1,2]; x[4294967294] = 4294967294; x.length = 2; x[2] === undefined. Actual: ' + (x[2])); \n}\n\n//CHECK#4\nif (x[4294967294] !== undefined) { \n $ERROR('#4: x = [0,1,2]; x[4294967294] = 4294967294; x.length = 2; x[4294967294] === undefined. Actual: ' + (x[4294967294])); \n}\n\n",
+ "id": "S15.4.5.2_A3_T4"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.4.5.json b/website/resources/scripts/testcases2/15.4.5.json
new file mode 100644
index 000000000..a566da3b6
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.4.5.json
@@ -0,0 +1,14 @@
+{
+ "testCollection": {
+ "name": "15.4.5",
+ "numTests": 1,
+ "tests": [
+ {
+ "id": "15.4.5-1",
+ "path": "TestCases/chapter15/15.4/15.4.5/15.4.5-1.js",
+ "description": "Array instances have [[Class]] set to 'Array'",
+ "test": "assertTrue((function testcase() {\n var a = [];\n var s = Object.prototype.toString.call(a);\n if (s === '[object Array]') {\n return true;\n }\n }).call(this));\n"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.4_Array_Objects.json b/website/resources/scripts/testcases2/15.4_Array_Objects.json
new file mode 100644
index 000000000..36ce5b437
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.4_Array_Objects.json
@@ -0,0 +1,68 @@
+{
+ "testCollection": {
+ "name": "15.4_Array_Objects",
+ "numTests": 10,
+ "tests": [
+ {
+ "section": "15.4, 11.2.1",
+ "description": "Checking for boolean primitive",
+ "test": "//CHECK#1\nx = [];\nx[true] = 1;\nif (x[1] !== undefined) {\n $ERROR('#1: x = []; x[true] = 1; x[1] === undefined. Actual: ' + (x[1])); \n}\n\n//CHECK#2\nif (x[\"true\"] !== 1) {\n $ERROR('#2: x = []; x[true] = 1; x[\"true\"] === 1. Actual: ' + (x[\"true\"])); \n}\n\n//CHECK#3\nx[false] = 0;\nif (x[0] !== undefined) {\n $ERROR('#3: x = []; x[true] = 1; x[false] = 0; x[0] === undefined. Actual: ' + (x[0])); \n}\n\n//CHECK#4\nif (x[\"false\"] !== 0) {\n $ERROR('#4: x = []; x[false] = 1; x[\"false\"] === 0. Actual: ' + (x[\"false\"])); \n}\n",
+ "id": "S15.4_A1.1_T1"
+ },
+ {
+ "section": "15.4, 11.2.1",
+ "description": "Array index is power of two",
+ "test": "//CHECK#\nx = [];\nk = 1;\nfor (i = 0; i < 32; i++) {\n k = k * 2;\n x[k - 2] = k; \n}\n\nk = 1;\nfor (i = 0; i < 32; i++) {\n k = k * 2;\n if (x[k - 2] !== k) {\n $ERROR('#' + (k - 2) + ': ');\n } \n}\n",
+ "id": "S15.4_A1.1_T10"
+ },
+ {
+ "section": "15.4, 11.2.1",
+ "description": "Checking for number primitive",
+ "test": "//CHECK#1\nx = [];\nx[NaN] = 1;\nif (x[0] !== undefined) {\n $ERROR('#1: x = []; x[NaN] = 1; x[0] === undefined. Actual: ' + (x[0])); \n} \n\n//CHECK#2\nif (x[\"NaN\"] !== 1) {\n $ERROR('#2: x = []; x[NaN] = 1; x[\"NaN\"] === 1. Actual: ' + (x[\"NaN\"])); \n} \n\n//CHECK#3\ny = [];\ny[Number.POSITIVE_INFINITY] = 1;\nif (y[0] !== undefined) {\n $ERROR('#3: y = []; y[Number.POSITIVE_INFINITY] = 1; y[0] === undefined. Actual: ' + (y[0])); \n}\n\n//CHECK#4\nif (y[\"Infinity\"] !== 1) {\n $ERROR('#4: y = []; y[Number.POSITIVE_INFINITY] = 1; y[\"Infinity\"] === 1. Actual: ' + (y[\"Infinity\"])); \n} \n\n//CHECK#5\nz = [];\nz[Number.NEGATIVE_INFINITY] = 1;\nif (z[0] !== undefined) {\n $ERROR('#5: z = []; z[Number.NEGATIVE_INFINITY] = 1; z[0] === undefined. Actual: ' + (z[0])); \n}\n\n//CHECK#6\nif (z[\"-Infinity\"] !== 1) {\n $ERROR('#6: z = []; z[Number.NEGATIVE_INFINITY] = 1; z[\"-Infinity\"] === 1. Actual: ' + (z[\"-Infinity\"])); \n} \n\n",
+ "id": "S15.4_A1.1_T2"
+ },
+ {
+ "section": "15.4, 11.2.1",
+ "description": "Checking for number primitive",
+ "test": "//CHECK#1\nx = [];\nx[4294967296] = 1;\nif (x[0] !== undefined) {\n $ERROR('#1: x = []; x[4294967296] = 1; x[0] === undefined. Actual: ' + (x[0])); \n}\n\n//CHECK#2\nif (x[\"4294967296\"] !== 1) {\n $ERROR('#2: x = []; x[4294967296] = 1; x[\"4294967296\"] === 1. Actual: ' + (x[\"4294967296\"])); \n}\n\n//CHECK#3\ny = [];\ny[4294967297] = 1;\nif (y[1] !== undefined) {\n $ERROR('#3: y = []; y[4294967297] = 1; y[1] === undefined. Actual: ' + (y[1])); \n} \n\n//CHECK#4\nif (y[\"4294967297\"] !== 1) {\n $ERROR('#4: y = []; y[4294967297] = 1; y[\"4294967297\"] === 1. Actual: ' + (y[\"4294967297\"])); \n}\n\n//CHECK#5\nz = [];\nz[1.1] = 1;\nif (z[1] !== undefined) {\n $ERROR('#5: z = []; z[1.1] = 1; z[1] === undefined. Actual: ' + (z[1])); \n}\n\n//CHECK#6\nif (z[\"1.1\"] !== 1) {\n $ERROR('#6: z = []; z[1.1] = 1; z[\"1.1\"] === 1. Actual: ' + (z[\"1.1\"])); \n} \n",
+ "id": "S15.4_A1.1_T3"
+ },
+ {
+ "section": "15.4, 11.2.1",
+ "description": "Checking for string primitive",
+ "test": "//CHECK#1\nx = [];\nx[\"0\"] = 0;\nif (x[0] !== 0) {\n $ERROR('#1: x = []; x[\"0\"] = 0; x[0] === 0. Actual: ' + (x[0])); \n} \n\n//CHECK#2\ny = [];\ny[\"1\"] = 1;\nif (y[1] !== 1) {\n $ERROR('#2: y = []; y[\"1\"] = 1; y[1] === 1. Actual: ' + (y[1])); \n}\n\n",
+ "id": "S15.4_A1.1_T4"
+ },
+ {
+ "section": "15.4, 11.2.1",
+ "description": "Checking for null and undefined",
+ "test": "//CHECK#1\nx = [];\nx[null] = 0;\nif (x[0] !== undefined) {\n $ERROR('#1: x = []; x[null] = 1; x[0] === undefined. Actual: ' + (x[0])); \n}\n\n//CHECK#2\nif (x[\"null\"] !== 0) {\n $ERROR('#2: x = []; x[null] = 1; x[\"null\"] === 0. Actual: ' + (x[\"null\"])); \n}\n\n//CHECK#3\ny = [];\ny[undefined] = 0;\nif (y[0] !== undefined) {\n $ERROR('#3: y = []; y[undefined] = 0; y[0] === undefined. Actual: ' + (y[0])); \n}\n\n//CHECK#4\nif (y[\"undefined\"] !== 0) {\n $ERROR('#4: y = []; y[undefined] = 1; y[\"undefined\"] === 0. Actual: ' + (y[\"undefined\"])); \n}\n",
+ "id": "S15.4_A1.1_T5"
+ },
+ {
+ "section": "15.4, 11.2.1",
+ "description": "Checking for Boolean object",
+ "test": "//CHECK#1\nx = [];\nx[new Boolean(true)] = 1;\nif (x[1] !== undefined) {\n $ERROR('#1: x = []; x[new Boolean(true)] = 1; x[1] === undefined. Actual: ' + (x[1])); \n}\n\n//CHECK#2\nif (x[\"true\"] !== 1) {\n $ERROR('#2: x = []; x[true] = 1; x[\"true\"] === 1. Actual: ' + (x[\"true\"])); \n}\n\n//CHECK#3\nx[new Boolean(false)] = 0;\nif (x[0] !== undefined) {\n $ERROR('#3: x = []; x[true] = 1; x[new Boolean(false)] = 0; x[0] === undefined. Actual: ' + (x[0])); \n}\n\n//CHECK#4\nif (x[\"false\"] !== 0) {\n $ERROR('#4: x = []; x[false] = 1; x[\"false\"] === 0. Actual: ' + (x[\"false\"])); \n}\n\n",
+ "id": "S15.4_A1.1_T6"
+ },
+ {
+ "section": "15.4, 11.2.1",
+ "description": "Checking for Number object",
+ "test": "//CHECK#1\nx = [];\nx[new Number(0)] = 0;\nif (x[0] !== 0) {\n $ERROR('#1: x = []; x[new Number(0)] = 0; x[0] === 0. Actual: ' + (x[0])); \n} \n\n//CHECK#2\ny = [];\ny[new Number(1)] = 1;\nif (y[1] !== 1) {\n $ERROR('#2: y = []; y[new Number(1)] = 1; y[1] === 1. Actual: ' + (y[1])); \n}\n\n//CHECK#3\nz = [];\nz[new Number(1.1)] = 1;\nif (z[\"1.1\"] !== 1) {\n $ERROR('#3: z = []; z[new Number(1.1)] = 1; z[\"1.1\"] === 1. Actual: ' + (z[\"1.1\"])); \n} \n",
+ "id": "S15.4_A1.1_T7"
+ },
+ {
+ "section": "15.4, 11.2.1",
+ "description": "Checking for Number object",
+ "test": "//CHECK#1\nx = [];\nx[new String(\"0\")] = 0;\nif (x[0] !== 0) {\n $ERROR('#1: x = []; x[new String(\"0\")] = 0; x[0] === 0. Actual: ' + (x[0])); \n} \n\n//CHECK#2\ny = [];\ny[new String(\"1\")] = 1;\nif (y[1] !== 1) {\n $ERROR('#2: y = []; y[new String(\"1\")] = 1; y[1] === 1. Actual: ' + (y[1])); \n}\n\n//CHECK#3\nz = [];\nz[new String(\"1.1\")] = 1;\nif (z[\"1.1\"] !== 1) {\n $ERROR('#3: z = []; z[new String(\"1.1\")] = 1; z[\"1.1\"] === 1. Actual: ' + (z[\"1.1\"])); \n} \n",
+ "id": "S15.4_A1.1_T8"
+ },
+ {
+ "section": "15.4, 11.2.1",
+ "description": "If Type(value) is Object, evaluate ToPrimitive(value, String)",
+ "test": "//CHECK#1\nx = [];\nvar object = {valueOf: function() {return 1}};\nx[object] = 0;\nif (x[\"[object Object]\"] !== 0) {\n $ERROR('#1: x = []; var object = {valueOf: function() {return 1}}; x[object] = 0; x[\"[object Object]\"] === 0. Actual: ' + (x[\"[object Object]\"]));\n}\n\n//CHECK#2\nx = [];\nvar object = {valueOf: function() {return 1}, toString: function() {return 0}};\nx[object] = 0;\nif (x[0] !== 0) {\n $ERROR('#2: x = []; var object = {valueOf: function() {return 1}, toString: function() {return 0}}; x[object] = 0; x[0] === 0. Actual: ' + (x[0]));\n} \n\n//CHECK#3\nx = [];\nvar object = {valueOf: function() {return 1}, toString: function() {return {}}};\nx[object] = 0;\nif (x[1] !== 0) {\n $ERROR('#3: x = []; var object = {valueOf: function() {return 1}, toString: function() {return {}}}; x[object] = 0; x[1] === 0. Actual: ' + (x[1]));\n}\n\n//CHECK#4\ntry {\n x = []; \n var object = {valueOf: function() {throw \"error\"}, toString: function() {return 1}};\n x[object] = 0;\n if (x[1] !== 0) {\n $ERROR('#4.1: x = []; var object = {valueOf: function() {throw \"error\"}, toString: function() {return 1}}; x[object] = 0; x[1] === 1. Actual: ' + (x[1]));\n }\n}\ncatch (e) {\n if (e === \"error\") {\n $ERROR('#4.2: x = []; var object = {valueOf: function() {throw \"error\"}, toString: function() {return 1}}; x[object] = 0; x[1] === 1. Actual: ' + (\"error\"));\n } else {\n $ERROR('#4.3: x = []; var object = {valueOf: function() {throw \"error\"}, toString: function() {return 1}}; x[object] = 0; x[1] === 1. Actual: ' + (e));\n }\n}\n\n//CHECK#5\nx = [];\nvar object = {toString: function() {return 1}};\nx[object] = 0;\nif (x[1] !== 0) {\n $ERROR('#5: x = []; var object = {toString: function() {return 1}}; x[object] = 0; x[1] === 0. Actual: ' + (x[1]));\n}\n\n//CHECK#6\nx = [];\nvar object = {valueOf: function() {return {}}, toString: function() {return 1}}\nx[object] = 0;\nif (x[1] !== 0) {\n $ERROR('#6: x = []; var object = {valueOf: function() {return {}}, toString: function() {return 1}}; x[object] = 0; x[1] === 0. Actual: ' + (x[1]));\n}\n\n//CHECK#7\ntry {\n x = [];\n var object = {valueOf: function() {return 1}, toString: function() {throw \"error\"}};\n x[object]; \n $ERROR('#7.1: x = []; var object = {valueOf: function() {return 1}, toString: function() {throw \"error\"}}; x[object] throw \"error\". Actual: ' + (x[object]));\n} \ncatch (e) {\n if (e !== \"error\") {\n $ERROR('#7.2: x = []; var object = {valueOf: function() {return 1}, toString: function() {throw \"error\"}}; x[object] throw \"error\". Actual: ' + (e));\n } \n}\n\n//CHECK#8\ntry {\n x = [];\n var object = {valueOf: function() {return {}}, toString: function() {return {}}};\n x[object];\n $ERROR('#8.1: x = []; var object = {valueOf: function() {return {}}, toString: function() {return {}}}; x[object] throw TypeError. Actual: ' + (x[object]));\n} \ncatch (e) {\n if ((e instanceof TypeError) !== true) {\n $ERROR('#8.2: x = []; var object = {valueOf: function() {return {}}, toString: function() {return {}}}; x[object] throw TypeError. Actual: ' + (e));\n } \n} \n",
+ "id": "S15.4_A1.1_T9"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.5.1_The_String_Constructor_Called_as_a_Function.json b/website/resources/scripts/testcases2/15.5.1_The_String_Constructor_Called_as_a_Function.json
new file mode 100644
index 000000000..41d76ccf4
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.5.1_The_String_Constructor_Called_as_a_Function.json
@@ -0,0 +1,128 @@
+{
+ "testCollection": {
+ "name": "15.5.1_The_String_Constructor_Called_as_a_Function",
+ "numTests": 20,
+ "tests": [
+ {
+ "section": "15.5.1.1",
+ "description": "Call String(function(){}())",
+ "test": "var __str = String(function(){}());\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (typeof __str !== \"string\") {\n $ERROR('#1: __str = String(function(){}()); typeof __str === \"string\". Actual: typeof __str ==='+typeof __str ); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (__str !== \"undefined\") {\n $ERROR('#2: __str = String(function(){}()); __str === \"undefined\". Actual: __str ==='+__str ); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.1.1_A1_T1"
+ },
+ {
+ "section": "15.5.1.1",
+ "description": "Call String(1) and String(-1)",
+ "test": "var __str = String(1);\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (typeof __str !== \"string\") {\n $ERROR('#1: __str = String(1); typeof __str === \"string\". Actual: typeof __str ==='+typeof __str ); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (__str !== \"1\") {\n $ERROR('#2: __str = String(1); __str === \"1\". Actual: __str ==='+__str ); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n__str = String(-1);\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (typeof __str !== \"string\") {\n $ERROR('#3: __str = String(-1); typeof __str === \"string\". Actual: typeof __str ==='+typeof __str ); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (__str !== \"-1\") {\n $ERROR('#4: __str = String(-1); __str === \"-1\". Actual: __str ==='+__str ); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.1.1_A1_T10"
+ },
+ {
+ "section": "15.5.1.1",
+ "description": "Call String(1/0) and String(-1/0), and call with +/-Infinity",
+ "test": "var __str = String(1/0);\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (typeof __str !== \"string\") {\n $ERROR('#1: __str = String(1/0); typeof __str === \"string\". Actual: typeof __str ==='+typeof __str ); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (__str !== \"Infinity\") {\n $ERROR('#2: __str = String(1/0); __str === \"Infinity\". Actual: __str ==='+__str ); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n__str = String(-1/0);\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#3\nif (typeof __str !== \"string\") {\n $ERROR('#3: __str = String(-1/0); typeof __str === \"string\". Actual: typeof __str ==='+typeof __str ); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#4\nif (__str !== \"-Infinity\") {\n $ERROR('#4: __str = String(-1/0); __str === \"-Infinity\". Actual: __str ==='+__str ); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n__str = String(Infinity);\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#5\nif (typeof __str !== \"string\") {\n $ERROR('#5: __str = String(Infinity); typeof __str === \"string\". Actual: typeof __str ==='+typeof __str ); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#6\nif (__str !== \"Infinity\") {\n $ERROR('#6: __str = String(Infinity); __str === \"Infinity\". Actual: __str ==='+__str ); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n__str = String(-Infinity);\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#7\nif (typeof __str !== \"string\") {\n $ERROR('#7: __str = String(-Infinity); typeof __str === \"string\". Actual: typeof __str ==='+typeof __str ); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#8\nif (__str !== \"-Infinity\") {\n $ERROR('#8: __str = String(-Infinity); __str === \"-Infinity\". Actual: __str ==='+__str ); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n__str = String(Number.POSITIVE_INFINITY);\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#9\nif (typeof __str !== \"string\") {\n $ERROR('#9: __str = String(Number.POSITIVE_INFINITY); typeof __str === \"string\". Actual: typeof __str ==='+typeof __str ); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#10\nif (__str !== \"Infinity\") {\n $ERROR('#10: __str = String(Number.POSITIVE_INFINITY); __str === \"Infinity\". Actual: __str ==='+__str ); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n__str = String(Number.NEGATIVE_INFINITY);\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#11\nif (typeof __str !== \"string\") {\n $ERROR('#11: __str = String(Number.NEGATIVE_INFINITY); typeof __str === \"string\". Actual: typeof __str ==='+typeof __str ); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#12\nif (__str !== \"-Infinity\") {\n $ERROR('#12: __str = String(Number.NEGATIVE_INFINITY); __str === \"-Infinity\". Actual: __str ==='+__str ); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.1.1_A1_T11"
+ },
+ {
+ "section": "15.5.1.1",
+ "description": "Call String(1/\"a\"), String(\"b\"* null) and String(Number.NaN)",
+ "test": "var __str = String(1/\"a\");\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (typeof __str !== \"string\") {\n $ERROR('#1: __str = String(1/\"a\"); typeof __str === \"string\". Actual: typeof __str ==='+typeof __str ); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (__str !== \"NaN\") {\n $ERROR('#2: __str = String(1/\"a\"); __str === \"NaN\". Actual: __str ==='+__str ); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n__str = String(\"b\"*null);\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#3\nif (typeof __str !== \"string\") {\n $ERROR('#3: __str = String(\"b\"*null); typeof __str === \"string\". Actual: typeof __str ==='+typeof __str ); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#4\nif (__str !== \"NaN\") {\n $ERROR('#4: __str = String(\"b\"*null); __str === \"NaN\". Actual: __str ==='+__str ); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n__str = String(Number.NaN);\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#5\nif (typeof __str !== \"string\") {\n $ERROR('#5: __str = String(Number.NaN); typeof __str === \"string\". Actual: typeof __str ==='+typeof __str ); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#6\nif (__str !== \"NaN\") {\n $ERROR('#6: __str = String(Number.NaN); __str === \"NaN\". Actual: __str ==='+__str ); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.1.1_A1_T12"
+ },
+ {
+ "section": "15.5.1.1",
+ "description": "Call String(true) and String(false)",
+ "test": "var __str = String(true);\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (typeof __str !== \"string\") {\n $ERROR('#1: __str = String(true); typeof __str === \"string\". Actual: typeof __str ==='+typeof __str ); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (__str !== \"true\") {\n $ERROR('#2: __str = String(true); __str === \"true\". Actual: __str ==='+__str ); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n__str = String(false);\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#3\nif (typeof __str !== \"string\") {\n $ERROR('#3: __str = String(false); typeof __str === \"string\". Actual: typeof __str ==='+typeof __str ); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#4\nif (__str !== \"false\") {\n $ERROR('#4: __str = String(false); __str === \"false\". Actual: __str ==='+__str ); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n__str = String(Boolean(true));\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#5\nif (typeof __str !== \"string\") {\n $ERROR('#5: __str = String(Boolean(true)); typeof __str === \"string\". Actual: typeof __str ==='+typeof __str ); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#6\nif (__str !== \"true\") {\n $ERROR('#6: __str = String(Boolean(true)); __str === \"true\". Actual: __str ==='+__str ); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n__str = String(Boolean(false));\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#7\nif (typeof __str !== \"string\") {\n $ERROR('#7: __str = String(Boolean(false)); typeof __str === \"string\". Actual: typeof __str ==='+typeof __str ); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#8\nif (__str !== \"false\") {\n $ERROR('#8: __str = String(Boolean(false)); __str === \"false\". Actual: __str ==='+__str ); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.1.1_A1_T13"
+ },
+ {
+ "section": "15.5.1.1",
+ "description": "Call String(0) and String(-0)",
+ "test": "var __str = String(0);\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (typeof __str !== \"string\") {\n $ERROR('#1: __str = String(0); typeof __str === \"string\". Actual: typeof __str ==='+typeof __str ); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (__str !== \"0\") {\n $ERROR('#2: __str = String(0); __str === \"0\". Actual: __str ==='+__str ); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n__str = String(-0);\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (typeof __str !== \"string\") {\n $ERROR('#3: __str = String(-0); typeof __str === \"string\". Actual: typeof __str ==='+typeof __str ); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (__str !== \"0\") {\n $ERROR('#4: __str = String(-0); __str === \"0\". Actual: __str ==='+__str ); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.1.1_A1_T14"
+ },
+ {
+ "section": "15.5.1.1",
+ "description": "Call String(string_object)",
+ "test": "var __obj__str = \"caps\";\n\n//__obj__str.prop=1;\n\nvar __str = String(__obj__str);\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__str !== __obj__str) {\n $ERROR('#1: __obj__str = \"caps\"; __str = String(__obj__str); __str === __obj__str. Actual: __str ==='+__str ); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.1.1_A1_T15"
+ },
+ {
+ "section": "15.5.1.1",
+ "description": "Call String() with .12345 and analogous numbers",
+ "test": "var __str = String(.12345);\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (typeof __str !== \"string\") {\n $ERROR('#1: __str = String(.12345); typeof __str === \"string\". Actual: typeof __str ==='+typeof __str ); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (__str !== \"0.12345\") {\n $ERROR('#2: __str = String(.12345); __str === \"0.12345\". Actual: __str ==='+__str ); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n__str = String(.012345);\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#3\nif (typeof __str !== \"string\") {\n $ERROR('#3: __str = String(.012345); typeof __str === \"string\". Actual: typeof __str ==='+typeof __str ); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#4\nif (__str !== \"0.012345\") {\n $ERROR('#4: __str = String(.012345); __str === \"0.012345\". Actual: __str ==='+__str ); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n__str = String(.0012345);\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#5\nif (typeof __str !== \"string\") {\n $ERROR('#5: __str = String(.0012345); typeof __str === \"string\". Actual: typeof __str ==='+typeof __str ); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#6\nif (__str !== \"0.0012345\") {\n $ERROR('#6: __str = String(.0012345); __str === \"0.0012345\". Actual: __str ==='+__str ); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n__str = String(.00000012345);\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#7\nif (typeof __str !== \"string\") {\n $ERROR('#7: __str = String(.00000012345); typeof __str === \"string\". Actual: typeof __str ==='+typeof __str ); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#8\nif (__str !== \"1.2345e-7\") {\n $ERROR('#8: __str = String(.00000012345); __str === \"1.2345e-7\". Actual: __str ==='+__str ); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.1.1_A1_T16"
+ },
+ {
+ "section": "15.5.1.1",
+ "description": "Call String() with numbers that have more than 1 significant digit after point",
+ "test": "var __str = String(1.2345);\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (typeof __str !== \"string\") {\n $ERROR('#1: __str = String(1.2345); typeof __str === \"string\". Actual: typeof __str ==='+typeof __str ); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (__str !== \"1.2345\") {\n $ERROR('#2: __str = String(1.2345); __str === \"1.2345\". Actual: __str ==='+__str ); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n__str = String(1.234567890);\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#3\nif (typeof __str !== \"string\") {\n $ERROR('#3: __str = String(1.234567890); typeof __str === \"string\". Actual: typeof __str ==='+typeof __str ); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#4\nif (__str !== \"1.23456789\") {\n $ERROR('#4: __str = String(1.234567890); __str === \"1.23456789\". Actual: __str ==='+__str ); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n__str = String(1.234500000000000000000000000);\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#5\nif (typeof __str !== \"string\") {\n $ERROR('#5: __str = String(1.234500000000000000000000000); typeof __str === \"string\". Actual: typeof __str ==='+typeof __str ); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#6\nif (__str !== \"1.2345\") {\n $ERROR('#6: __str = String(1.234500000000000000000000000); __str === \"1.2345\". Actual: __str ==='+__str ); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.1.1_A1_T17"
+ },
+ {
+ "section": "15.5.1.1",
+ "description": "Call String() with numbers that have more than 1 significant digit",
+ "test": "__str = String(1000000000000000000000); \n \n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (typeof __str !== \"string\") {\n $ERROR('#1: __str = String(1000000000000000000000); typeof __str === \"string\". Actual: typeof __str ==='+typeof __str ); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (__str !== \"1e+21\") {\n $ERROR('#2: __str = String(1000000000000000000000); __str === \"1e+21\". Actual: __str ==='+__str ); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n__str = String(10000000000000000000000);\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#3\nif (typeof __str !== \"string\") {\n $ERROR('#3: __str = String(10000000000000000000000); typeof __str === \"string\". Actual: typeof __str ==='+typeof __str ); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#4\nif (__str !== \"1e+22\") {\n $ERROR('#4: __str = String(10000000000000000000000); __str === \"1e+22\". Actual: __str ==='+__str ); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.1.1_A1_T18"
+ },
+ {
+ "section": "15.5.1.1",
+ "description": "Call String() with Array of numbers",
+ "test": "var __str = String(new Array(1,2,3));\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (typeof __str !== \"string\") {\n $ERROR('#1: __str = String(new Array(1,2,3)); typeof __str === \"string\". Actual: typeof __str ==='+typeof __str ); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (__str !== \"1,2,3\") {\n $ERROR('#2: __str = String(new Array(1,2,3)); __str === \"1,2,3\". Actual: __str ==='+__str ); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.1.1_A1_T19"
+ },
+ {
+ "section": "15.5.1.1",
+ "description": "Call String(null)",
+ "test": "var __str = String(null);\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (typeof __str !== \"string\") {\n $ERROR('#1: __str = String(null); typeof __str === \"string\". Actual: typeof __str ==='+typeof __str ); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (__str !== \"null\") {\n $ERROR('#2: __str = String(null); __str === \"null\". Actual: __str ==='+__str ); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.1.1_A1_T2"
+ },
+ {
+ "section": "15.5.1.1",
+ "description": "Call String(void 0)",
+ "test": "var __str = String(void 0);\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (typeof __str !== \"string\") {\n $ERROR('#1: __str = String(void 0); typeof __str === \"string\". Actual: typeof __str ==='+typeof __str ); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (__str !== \"undefined\") {\n $ERROR('#2: __str = String(void 0); __str === \"undefined\". Actual: __str ==='+__str ); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.1.1_A1_T3"
+ },
+ {
+ "section": "15.5.1.1",
+ "description": "Call String(undefined)",
+ "test": "var __str = String(undefined);\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (typeof __str !== \"string\") {\n $ERROR('#1: __str = String(undefined); typeof __str === \"string\". Actual: typeof __str ==='+typeof __str ); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (__str !== \"undefined\") {\n $ERROR('#2: __str = String(undefined); __str === \"undefined\". Actual: __str ==='+__str ); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.1.1_A1_T4"
+ },
+ {
+ "section": "15.5.1.1",
+ "description": "Call String(x), where x is undefined variable",
+ "test": "var __str = String(x);\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (typeof __str !== \"string\") {\n $ERROR('#1: var x; __str = String(x); typeof __str === \"string\". Actual: typeof __str ==='+typeof __str ); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (__str !== \"undefined\") {\n $ERROR('#2: var x; __str = String(x); __str === \"undefined\". Actual: __str ==='+__str ); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\nvar x;\n",
+ "id": "S15.5.1.1_A1_T5"
+ },
+ {
+ "section": "15.5.1.1",
+ "description": ": Checking by using eval, Call String(eval());;",
+ "test": "var __str = String(eval());\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (typeof __str !== \"string\") {\n $ERROR('#1: __str = String(eval()); typeof __str === \"string\". Actual: typeof __str ==='+typeof __str ); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (__str !== \"undefined\") {\n $ERROR('#2: __str = String(eval()); __str === \"undefined\". Actual: __str ==='+__str ); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.1.1_A1_T6"
+ },
+ {
+ "section": "15.5.1.1",
+ "description": "Call String({})",
+ "test": "var __str = String({});\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (typeof __str !== \"string\") {\n $ERROR('#1: __str = String({}); typeof __str === \"string\". Actual: typeof __str ==='+typeof __str ); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (__str !== \"[object \"+\"Object\"+\"]\") {\n $ERROR('#2: __str = String({}); __str === \"[object Object]\". Actual: __str ==='+__str ); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.1.1_A1_T7"
+ },
+ {
+ "section": "15.5.1.1",
+ "description": "Call String(new Array)",
+ "test": "var __old__Array__prototype__toString = Array.prototype.toString;\n\nArray.prototype.toString=function(){return \"__ARRAY__\";};\n\nvar __str = String(new Array);\n\n// restore old toString method just in case\nArray.prototype.toString=__old__Array__prototype__toString;\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (typeof __str !== \"string\") {\n $ERROR('#1: __str = String(new Array); typeof __str === \"string\". Actual: typeof __str ==='+typeof __str ); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (__str !== \"__ARRAY__\") {\n $ERROR('#2: Array.prototype.toString=function(){return \"__ARRAY__\";}; __str = String(new Array); __str === \"__ARRAY__\". Actual: __str ==='+__str ); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.1.1_A1_T8"
+ },
+ {
+ "section": "15.5.1.1",
+ "description": "Call String(this)",
+ "test": "var toString=function(){return \"__THIS__\";};\n\nvar __str = String(this);\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (typeof __str !== \"string\") {\n $ERROR('#1: __str = String(this); typeof __str === \"string\". Actual: typeof __str ==='+typeof __str ); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (__str !== \"__THIS__\") {\n $ERROR('#2: toString=function(){return \"__THIS__\";}; __str = String(this); __str === \"__THIS__\". Actual: __str ==='+__str ); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.1.1_A1_T9"
+ },
+ {
+ "section": "15.5.1.1",
+ "description": "Call String()",
+ "test": "var __str = String();\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (typeof __str !== \"string\") {\n $ERROR('#1: __str = String(); typeof __str === \"string\". Actual: typeof __str ==='+typeof __str ); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (__str !== \"\") {\n $ERROR('#2: __str = String(); __str === \"\". Actual: __str ==='+__str ); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.1.1_A2_T1"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.5.2_The_String_Constructor.json b/website/resources/scripts/testcases2/15.5.2_The_String_Constructor.json
new file mode 100644
index 000000000..5cf5aab8a
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.5.2_The_String_Constructor.json
@@ -0,0 +1,128 @@
+{
+ "testCollection": {
+ "name": "15.5.2_The_String_Constructor",
+ "numTests": 20,
+ "tests": [
+ {
+ "section": "15.5.2.1",
+ "description": "Creating string object with expression \"new String\"",
+ "test": "var __str = new String;\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (typeof __str !== \"object\") {\n $ERROR('#1: __str = new String; typeof __str === \"object\". Actual: typeof __str ==='+typeof __str ); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1.5\nif (__str.constructor !== String) {\n $ERROR('#1.5: __str = new String; __str.constructor === String. Actual: __str.constructor ==='+__str.constructor ); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (__str != \"\") {\n $ERROR('#2: __str = new String; __str == \"\". Actual: __str =='+__str);\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#3\nif ( __str === \"\") {\n $ERROR('#3: __str = new String; __str !== \"\"');\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.2.1_A1_T1"
+ },
+ {
+ "section": "15.5.2.1",
+ "description": "Creating string object with \"new String(function object)\" as the function object's prototype.toString property was changed",
+ "test": "function __FACTORY(){};\n\n__FACTORY.prototype.toString=function(){return \"tostr\"};\n\nvar __obj = new __FACTORY;\n\nvar __str = new String(__obj);\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (typeof __str !== \"object\") {\n $ERROR('#1: __str = new String(__obj); typeof __str === \"object\". Actual: typeof __str ==='+typeof __str ); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1.5\nif (__str.constructor !== String) {\n $ERROR('#1.5: __str = new String(__obj); __str.constructor === String. Actual: __str.constructor ==='+__str.constructor ); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (__str != \"tostr\") {\n $ERROR('#2: __str = new String(__obj); __str ==\"tostr\". Actual: __str =='+__str ); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.2.1_A1_T10"
+ },
+ {
+ "section": "15.5.2.1",
+ "description": "Creating string object with \"new String(function object)\" after changing function object's valueOf and toString properties",
+ "test": "function __obj(){};\n\n__obj.valueOf=function(){return true;};\n\n__obj.toString=function(){return {};};\n\nvar __str = new String(__obj);\n\n\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (typeof __str !== \"object\") {\n $ERROR('#1: function __obj(){}; __str = new String(__obj); typeof __str === \"object\". Actual: typeof __str ==='+typeof __str ); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1.5\nif (__str.constructor !== String) {\n $ERROR('#1.5: __str = new String(__obj); __str.constructor === String. Actual: __str.constructor ==='+__str.constructor ); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (__str !=\"true\") {\n $ERROR('#2: function __obj(){}; __str = new String(__obj); __str ==\"true\". Actual: __str =='+__str ); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.2.1_A1_T11"
+ },
+ {
+ "section": "15.5.2.1",
+ "description": "Creating string object with \"new String(function object)\", after changing the function object toString property, which causes exception throw",
+ "test": "var __obj = {toString:function(){throw \"intostr\"}};\n\n__obj.valueOf=function(){return true};\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\ntry {\n var __str = new String(__obj);\n $ERROR('#1: var __obj = {toString:function(){throw \"intostr\"}}; __str = new String(__obj) lead throwing exception');\n} catch (e) {\n if (e!==\"intostr\") {\n $ERROR('#1.1: e===\"intostr\". Actual: e==='+e); \n }\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n\n",
+ "id": "S15.5.2.1_A1_T12"
+ },
+ {
+ "section": "15.5.2.1",
+ "description": "Creating string object with \"new String(function object)\" after changing function object's valueOf property, which causes exception throw",
+ "test": "var __obj = {toString:function(){return f; function f(){}}};\n\n__obj.valueOf=function(){throw \"invalueof\"};\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\ntry {\n var __str = new String(__obj);\n $ERROR('#1: __obj.valueOf=function(){throw \"invalueof\"}; __str = new String(__obj) lead throwing exception');\n} catch (e) {\n if (e!==\"invalueof\") {\n $ERROR('#1.1: e===\"invalueof\". Actual: e==='+e); \n }\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n\n",
+ "id": "S15.5.2.1_A1_T13"
+ },
+ {
+ "section": "15.5.2.1",
+ "description": "Creating string object with \"new String()\" initialized with .12345 and other numbers",
+ "test": "__str =new String(.12345);\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (typeof __str !== \"object\") {\n $ERROR('#1: __str =new String(.12345); typeof __str === \"object\". Actual: typeof __str ==='+typeof __str ); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1.5\nif (__str.constructor !== String) {\n $ERROR('#1.5: __str =new String(.12345); __str.constructor === String. Actual: __str.constructor ==='+__str.constructor ); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (__str !=\"0.12345\") {\n $ERROR('#2: __str =new String(.12345); __str ==\"0.12345\". Actual: __str =='+__str ); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n__str =new String(.012345);\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#3\nif (typeof __str !== \"object\") {\n $ERROR('#3: __str =new String(.012345); typeof __str === \"object\". Actual: typeof __str ==='+typeof __str ); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2.5\nif (__str.constructor !== String) {\n $ERROR('#3.5: __str =new String(.012345); __str.constructor === String. Actual: __str.constructor ==='+__str.constructor ); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#4\nif (__str !=\"0.012345\") {\n $ERROR('#4: __str =new String(.012345); __str ==\"0.012345\". Actual: __str =='+__str ); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n__str =new String(.0012345);\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#5\nif (typeof __str !== \"object\") {\n $ERROR('#5: __str =new String(.0012345); typeof __str === \"object\". Actual: typeof __str ==='+typeof __str ); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#5.5\nif (__str.constructor !== String) {\n $ERROR('#5.5: __str =new String(.0012345); __str.constructor === String. Actual: __str.constructor ==='+__str.constructor ); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#6\nif (__str !=\"0.0012345\") {\n $ERROR('#6: __str =new String(.0012345); __str ==\"0.0012345\". Actual: __str =='+__str ); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n__str =new String(.00000012345);\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#7\nif (typeof __str !== \"object\") {\n $ERROR('#7: __str =new String(.00000012345); typeof __str === \"object\". Actual: typeof __str ==='+typeof __str ); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#7.5\nif (__str.constructor !== String) {\n $ERROR('#7.5: __str =new String(.00000012345); __str.constructor === String. Actual: __str.constructor ==='+__str.constructor ); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#8\nif (__str !=\"1.2345e-7\") {\n $ERROR('#8: __str =new String(.00000012345); __str ==\"1.2345e-7\". Actual: __str =='+__str ); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.2.1_A1_T16"
+ },
+ {
+ "section": "15.5.2.1",
+ "description": "Creating string object with \"new String()\" initialized with numbers that have more than 1 significant digit following the point",
+ "test": "var __str = new String(1.2345);\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (typeof __str !== \"object\") {\n $ERROR('#1: __str = new String(1.2345); typeof __str === \"object\". Actual: typeof __str ==='+typeof __str ); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1.5\nif (__str.constructor !== String) {\n $ERROR('#1.5: __str = new String(1.2345); __str.constructor === String. Actual: __str.constructor ==='+__str.constructor ); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (__str !=\"1.2345\") {\n $ERROR('#2: __str = new String(1.2345); __str ==\"1.2345\". Actual: __str =='+__str ); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n__str = new String(1.234567890);\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#3\nif (typeof __str !== \"object\") {\n $ERROR('#3: __str = new String(1.234567890); typeof __str === \"object\". Actual: typeof __str ==='+typeof __str ); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#3.5\nif (__str.constructor !== String) {\n $ERROR('#3.5: __str = new String(1.234567890); __str.constructor === String. Actual: __str.constructor ==='+__str.constructor ); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#4\nif (__str !=\"1.23456789\") {\n $ERROR('#4: __str = new String(1.234567890); __str ==\"1.23456789\". Actual: __str =='+__str ); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n__str = new String(1.234500000000000000000000000);\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#5\nif (typeof __str !== \"object\") {\n $ERROR('#5: __str = new String(1.234500000000000000000000000); typeof __str === \"object\". Actual: typeof __str ==='+typeof __str ); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#5.5\nif (__str.constructor !== String) {\n $ERROR('#5.5: __str = new String(1.234500000000000000000000000); __str.constructor === String. Actual: __str.constructor ==='+__str.constructor ); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#6\nif (__str !=\"1.2345\") {\n $ERROR('#6: __str = new String(1.234500000000000000000000000); __str ==\"1.2345\". Actual: __str =='+__str ); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.2.1_A1_T17"
+ },
+ {
+ "section": "15.5.2.1",
+ "description": "Create string object with \"new String()\" initialized with numbers that have more than 1 significant digit",
+ "test": "var __str = new String(1000000000000000000000);\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (typeof __str !== \"object\") {\n $ERROR('#1: __str = new String(1000000000000000000000); typeof __str === \"object\". Actual: typeof __str ==='+typeof __str ); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1.5\nif (__str.constructor !== String) {\n $ERROR('#1.5: __str = new String(1000000000000000000000); __str.constructor === String. Actual: __str.constructor ==='+__str.constructor ); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (__str !=\"1e+21\") {\n $ERROR('#2: __str = new String(1000000000000000000000); __str ==\"1e+21\". Actual: __str =='+__str ); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n__str = new String(10000000000000000000000);\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#3\nif (typeof __str !== \"object\") {\n $ERROR('#3: __str = new String(10000000000000000000000); typeof __str === \"object\". Actual: typeof __str ==='+typeof __str ); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#3.5\nif (__str.constructor !== String) {\n $ERROR('#3.5: __str = new String(10000000000000000000000); __str.constructor === String. Actual: __str.constructor ==='+__str.constructor ); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#4\nif (__str !=\"1e+22\") {\n $ERROR('#4: __str = new String(10000000000000000000000); __str ==\"1e+22\". Actual: __str =='+__str ); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.2.1_A1_T18"
+ },
+ {
+ "section": "15.5.2.1",
+ "description": "Creating string object with \"new String()\" initialized with Array of numbers",
+ "test": "var __str = new String(new Array(1,2,3));\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (typeof __str !== \"object\") {\n $ERROR('#1: __str = new String(new Array(1,2,3)); typeof __str === \"object\". Actual: typeof __str ==='+typeof __str ); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1.5\nif (__str.constructor !== String) {\n $ERROR('#1.5: __str = new String(new Array(1,2,3)); __str.constructor === String. Actual: __str.constructor ==='+__str.constructor ); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (__str !=\"1,2,3\") {\n $ERROR('#2: __str = new String(new Array(1,2,3)); __str ==\"1,2,3\". Actual: __str =='+__str ); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.2.1_A1_T19"
+ },
+ {
+ "section": "15.5.2.1",
+ "description": "Creating string object with \"new String()\"",
+ "test": "var __str = new String();\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (typeof __str !== \"object\") {\n $ERROR('#1: __str = new String(); typeof __str === \"object\". Actual: typeof __str ==='+typeof __str ); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1.5\nif (__str.constructor !== String) {\n $ERROR('#1.5: __str = new String(); __str.constructor === String. Actual: __str.constructor ==='+__str.constructor ); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (__str !=\"\") {\n $ERROR('#2: __str = new String(); __str ==\"\". Actual: __str =='+__str ); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#3\nif ( __str === \"\") {\n $ERROR('#3: __str = new String(); __str !== \"\"'); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.2.1_A1_T2"
+ },
+ {
+ "section": "15.5.2.1",
+ "description": "Creating string object with \"new String(\"\")\"",
+ "test": "var __str = new String(\"\");\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (typeof __str !== \"object\") {\n $ERROR('#1: __str = new String(\"\"); typeof __str === \"object\". Actual: typeof __str ==='+typeof __str ); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1.5\nif (__str.constructor !== String) {\n $ERROR('#1.5: __str = new String(\"\"); __str.constructor === String. Actual: __str.constructor ==='+__str.constructor ); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (__str !=\"\") {\n $ERROR('#2: __str = new String(\"\"); __str ==\"\". Actual: __str =='+__str ); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#3\nif ( __str === \"\") {\n $ERROR('#3: __str = new String(\"\"); __str !== \"\"'); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.2.1_A1_T3"
+ },
+ {
+ "section": "15.5.2.1",
+ "description": "Create string object with \"new String(1.0)\"",
+ "test": "var __str = new String(1.0);\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (typeof __str !== \"object\") {\n $ERROR('#1: __str = new String(1.0); typeof __str === \"object\". Actual: typeof __str ==='+typeof __str ); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1.5\nif (__str.constructor !== String) {\n $ERROR('#1.5: __str = new String(1.0); __str.constructor === String. Actual: __str.constructor ==='+__str.constructor ); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (__str !=1.0+\"\") {\n $ERROR('#2: __str = new String(1.0); __str ==1.0+\"\". Actual: __str =='+__str ); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.2.1_A1_T4"
+ },
+ {
+ "section": "15.5.2.1",
+ "description": "Creating string object with \"new String(NaN)\"",
+ "test": "var __str = new String(NaN);\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (typeof __str !== \"object\") {\n $ERROR('#1: __str = new String(NaN); typeof __str === \"object\". Actual: typeof __str ==='+typeof __str ); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1.5\nif (__str.constructor !== String) {\n $ERROR('#1.5: __str = new String(NaN); __str.constructor === String. Actual: __str.constructor ==='+__str.constructor ); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (__str !=(1/\"s\")+\"\") {\n $ERROR('#2: __str = new String(NaN); __str ==(1/\"s\")+\"\". Actual: __str =='+__str ); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.2.1_A1_T5"
+ },
+ {
+ "section": "15.5.2.1",
+ "description": "Creating string object with \"new String(false)\"",
+ "test": "var __str = new String(false);\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (typeof __str !== \"object\") {\n $ERROR('#1: __str = new String(false); typeof __str === \"object\". Actual: typeof __str ==='+typeof __str ); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1.5\nif (__str.constructor !== String) {\n $ERROR('#1.5: __str = new String(false); __str.constructor === String. Actual: __str.constructor ==='+__str.constructor ); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (__str !=false+\"\") {\n $ERROR('#2: __str = new String(false); __str ==false+\"\". Actual: __str =='+__str ); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.2.1_A1_T6"
+ },
+ {
+ "section": "15.5.2.1",
+ "description": "Creating string object with \"new String({})\"",
+ "test": "var __stored__Object__prototype__toString = Object.prototype.toString;\n\nObject.prototype.toString=function(){return \"SHIFTED\"};\n\nvar __str = new String({});\n\nObject.prototype.toString = __stored__Object__prototype__toString;\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (typeof __str !== \"object\") {\n $ERROR('#1: __str = new String({}); typeof __str === \"object\". Actual: typeof __str ==='+typeof __str ); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1.5\nif (__str.constructor !== String) {\n $ERROR('#1.5: __str = new String({}); __str.constructor === String. Actual: __str.constructor ==='+__str.constructor ); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (__str !=\"SHIFTED\") {\n $ERROR('#2: Object.prototype.toString=function(){return \"SHIFTED\"}; __str = new String({}); __str ==\"SHIFTED\". Actual: __str =='+__str ); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.2.1_A1_T7"
+ },
+ {
+ "section": "15.5.2.1",
+ "description": "Creating string object with \"new String(function(){})\"",
+ "test": "var __stored__Function__prototype__toString = Function.prototype.toString;\n\nFunction.prototype.toString=function(){return \"SHIFTED\"};\n\nvar __str = new String(function(){});\n\nFunction.prototype.toString = __stored__Function__prototype__toString;\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (typeof __str !== \"object\") {\n $ERROR('#1: __str = new String(function(){}); typeof __str === \"object\". Actual: typeof __str ==='+typeof __str ); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1.5\nif (__str.constructor !== String) {\n $ERROR('#1.5: __str = new String(function(){}); __str.constructor === String. Actual: __str.constructor ==='+__str.constructor ); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (__str !=\"SHIFTED\") {\n $ERROR('#2: Function.prototype.toString=function(){return \"SHIFTED\"}; __str = new String(function(){}); __str ==\"SHIFTED\". Actual: __str =='+__str ); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.2.1_A1_T8"
+ },
+ {
+ "section": "15.5.2.1",
+ "description": "Creating string object with \"new String(function(){return [1,2,3]}())\"",
+ "test": "var __str = new String(function(){return [1,2,3]}());\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (typeof __str !== \"object\") {\n $ERROR('#1: __str = new String(function(){return [1,2,3]}()); typeof __str === \"object\". Actual: typeof __str ==='+typeof __str ); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1.5\nif (__str.constructor !== String) {\n $ERROR('#1.5: __str = new String(function(){return [1,2,3]}()); __str.constructor === String. Actual: __str.constructor ==='+__str.constructor ); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (__str !=\"1,2,3\") {\n $ERROR('#2: __str = new String(function(){return [1,2,3]}()); __str ==\"1,2,3\". Actual: __str =='+__str ); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.2.1_A1_T9"
+ },
+ {
+ "section": "15.5.2.1, 15.5.3.1",
+ "description": "Creating string object with \"new String(string)\" to check prototype",
+ "test": "var __str__obj = new String(\"abba\");\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (!(String.prototype.isPrototypeOf(__str__obj))) {\n $ERROR('#1: var __str__obj = new String(\"abba\"); String.prototype.isPrototypeOf(__str__obj)===true');\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n\n",
+ "id": "S15.5.2.1_A2_T1"
+ },
+ {
+ "section": "15.5.2.1, 15.5.3.1",
+ "description": "Creating string object with \"new String(string)\" adding custom property",
+ "test": "var __str__obj = new String(\"shocking blue\");\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__str__obj[\"__custom__prop\"]!==undefined) {\n $ERROR('#1: var __str__obj = new String(\"shocking blue\"); __str__obj[\"__custom__prop\"]===undefined. Actual: __str__obj[\"__custom__prop\"]==='+__str__obj[\"__custom__prop\"]); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\nString.prototype.__custom__prop = \"bor\";\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (__str__obj[\"__custom__prop\"]!==\"bor\") {\n $ERROR('#2: var __str__obj = new String(\"shocking blue\"); String.prototype.__custom__prop = \"bor\"; __str__obj[\"__custom__prop\"]===\"bor\". Actual: __str__obj[\"__custom__prop\"]==='+__str__obj[\"__custom__prop\"]); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n\n",
+ "id": "S15.5.2.1_A2_T2"
+ },
+ {
+ "section": "15.5.2.1",
+ "description": "Creating string object with \"new String(string)\" and changing toString property to Object.prototype.toString",
+ "test": "var __str__obj = new String(\"seamaid\");\n\n__str__obj.toString = Object.prototype.toString;\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__str__obj.toString() !== \"[object \"+\"String\"+\"]\") {\n $ERROR('#1: var __str__obj = new String(\"seamaid\"); __str__obj.toString = Object.prototype.toString; __str__obj.toString() === \"[object String]\". Actual: __str__obj.toString() ==='+__str__obj.toString() ); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n",
+ "id": "S15.5.2.1_A3"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.5.3_Properties_of_the_String_Constructor.json b/website/resources/scripts/testcases2/15.5.3_Properties_of_the_String_Constructor.json
new file mode 100644
index 000000000..f09bfe8e0
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.5.3_Properties_of_the_String_Constructor.json
@@ -0,0 +1,80 @@
+{
+ "testCollection": {
+ "name": "15.5.3_Properties_of_the_String_Constructor",
+ "numTests": 12,
+ "tests": [
+ {
+ "section": "15.5.3.1, 15.5.4",
+ "description": "Checking String.hasOwnProperty('prototype')",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (!(String.hasOwnProperty('prototype'))) {\n $ERROR('#1: String.hasOwnProperty(\\'prototype\\') return true. Actual: '+String.hasOwnProperty('prototype'));\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n",
+ "id": "S15.5.3.1_A1"
+ },
+ {
+ "section": "15.5.3.1, 15.5.4",
+ "description": "Checking if enumerating the String.prototype property fails",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#0\nif (!(String.hasOwnProperty('prototype'))) {\n $FAIL('#0: String.hasOwnProperty(\\'prototype\\') return true. Actual: '+String.hasOwnProperty('prototype'));\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n\n//////////////////////////////////////////////////////////////////////////////\n// CHECK#1\nif (String.propertyIsEnumerable('prototype')) {\n $ERROR('#1: String.propertyIsEnumerable(\\'prototype\\') return false. Actual: '+String.propertyIsEnumerable('prototype'));\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n\n//////////////////////////////////////////////////////////////////////////////\n// CHECK#2\nvar count=0;\n\nfor (p in String){\n if (p===\"prototype\") count++;\n}\n\nif (count !== 0) {\n $ERROR('#2: count=0; for (p in String){ if (p===\"prototype\") count++;}; count === 0. Actual: count ==='+count ); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.3.1_A2"
+ },
+ {
+ "section": "15.5.3.1, 15.5.4",
+ "description": "Checking if deleting the String.prototype property fails",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (!(String.hasOwnProperty('prototype'))) {\n $FAIL('#1: String.hasOwnProperty(\\'prototype\\') return true. Actual: '+String.hasOwnProperty('prototype'));\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\ndelete String.prototype;\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (!(String.hasOwnProperty('prototype'))) {\n $ERROR('#2: delete String.prototype; String.hasOwnProperty(\\'prototype\\') return true. Actual: '+String.hasOwnProperty('prototype'));\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.3.1_A3"
+ },
+ {
+ "section": "15.5.3.1, 15.5.4",
+ "description": "Checking if varying the String.prototype property fails",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (!(String.hasOwnProperty('prototype'))) {\n $FAIL('#1: String.hasOwnProperty(\\'prototype\\') return true. Actual: '+String.hasOwnProperty('prototype'));\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\nvar __obj = String.prototype;\n\nString.prototype = function(){return \"shifted\";};\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (String.prototype !== __obj) {\n $ERROR('#2: __obj = String.prototype; String.prototype = function(){return \"shifted\";}; String.prototype === __obj. Actual: String.prototype ==='+String.prototype ); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.3.1_A4"
+ },
+ {
+ "section": "15.5.3.2",
+ "description": "Checking String.fromCharCode.length",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (typeof String.fromCharCode !== \"function\") {\n $ERROR('#1: typeof String.fromCharCode === \"function\". Actual: typeof String.fromCharCode ==='+typeof String.fromCharCode ); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (!(String.hasOwnProperty(\"fromCharCode\"))) {\n $ERROR('#2: String.hasOwnProperty(\"fromCharCode\") return true. Actual: '+String.hasOwnProperty(\"fromCharCode\"));\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#3\nif (String.fromCharCode.length !== 1) {\n $ERROR('#3: String.fromCharCode.length === 1. Actual: String.fromCharCode.length ==='+String.fromCharCode.length ); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n",
+ "id": "S15.5.3.2_A1"
+ },
+ {
+ "section": "15.5.3.2",
+ "description": "Call String.fromCharCode()",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (String.fromCharCode() !== \"\") {\n $ERROR('#1: String.fromCharCode () returns empty string. Actual: '+String.fromCharCode());\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n",
+ "id": "S15.5.3.2_A2"
+ },
+ {
+ "section": "15.5.3.2",
+ "description": "Call String.fromCharCode(65,66,66,65)",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (String.fromCharCode(65,66,66,65) !== \"ABBA\") {\n $ERROR('#1: String.fromCharCode(65,66,66,65) === \"ABBA\". Actual: String.fromCharCode(65,66,66,65) ==='+String.fromCharCode(65,66,66,65) ); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n",
+ "id": "S15.5.3.2_A3_T1"
+ },
+ {
+ "section": "15.5.3.2",
+ "description": "Create function variable, that equal String.fromCharCode, delete original String.fromCharCode and use created variable",
+ "test": "var __fcc__func = String.fromCharCode;\n\ndelete String.fromCharCode;\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__fcc__func(65,66,66,65) !== \"ABBA\") {\n $ERROR('#1: __fcc__func = String.fromCharCode; delete String.fromCharCode; __fcc__func(65,66,66,65) === \"ABBA\". Actual: __fcc__func(65,66,66,65) ==='+__fcc__func(65,66,66,65) ); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n",
+ "id": "S15.5.3.2_A3_T2"
+ },
+ {
+ "section": "15.5.3.2",
+ "description": "Checking if creating \"new String.fromCharCode\" fails",
+ "test": "var __fcc__func = String.fromCharCode;\n\ndelete String.fromCharCode;\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\ntry {\n var __obj = new __fcc__func(65,66,66,65);\n $FAIL('#1: __fcc__func = String.fromCharCode; var __obj = new __fcc__func(65,66,66,65) lead to throwing exception');\n} catch (e) {}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.3.2_A4"
+ },
+ {
+ "section": "15.5.3, 15.5.4",
+ "description": "Checking String.length",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n// CHECK#\nif (String.length !== 1) {\n $ERROR('String has length property whose value is 1. Actual: String.length==='+String.length);\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.3_A1"
+ },
+ {
+ "section": "15.5.3, 15.5.4",
+ "description": "Checking Function.prototype.isPrototypeOf(String)",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n// CHECK#\nif (!(Function.prototype.isPrototypeOf(String))) {\n $ERROR('#1: Function.prototype.isPrototypeOf(String) return true. Actual: '+Function.prototype.isPrototypeOf(String));\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.3_A2_T1"
+ },
+ {
+ "section": "15.5.3, 15.5.4",
+ "description": "Add custom property to Function.prototype and check it at String",
+ "test": "Function.prototype.indicator = 1;\n\n//////////////////////////////////////////////////////////////////////////////\n// CHECK#\nif (String.indicator !== 1) {\n $ERROR('#1: Function.prototype.indicator = 1; String.indicator === 1. Actual: String.indicator ==='+String.indicator ); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.3_A2_T2"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.5.4.10_String.prototype.match.json b/website/resources/scripts/testcases2/15.5.4.10_String.prototype.match.json
new file mode 100644
index 000000000..46b72607b
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.5.4.10_String.prototype.match.json
@@ -0,0 +1,236 @@
+{
+ "testCollection": {
+ "name": "15.5.4.10_String.prototype.match",
+ "numTests": 38,
+ "tests": [
+ {
+ "section": "15.5.4.10",
+ "description": "Checking if varying the String.prototype.match.length property fails",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (!(String.prototype.match.hasOwnProperty('length'))) {\n $FAIL('#1: String.prototype.match.hasOwnProperty(\\'length\\') return true. Actual: '+String.prototype.match.hasOwnProperty('length'));\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\nvar __obj = String.prototype.match.length;\n\nString.prototype.match.length = function(){return \"shifted\";};\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (String.prototype.match.length !== __obj) {\n $ERROR('#2: __obj = String.prototype.match.length; String.prototype.match.length = function(){return \"shifted\";}; String.prototype.match.length === __obj. Actual: '+String.prototype.match.length );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.10_A10"
+ },
+ {
+ "section": "15.5.4.10",
+ "description": "Checking String.prototype.match.length",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (!(String.prototype.match.hasOwnProperty(\"length\"))) {\n $ERROR('#1: String.prototype.match.hasOwnProperty(\"length\") return true. Actual: '+String.prototype.match.hasOwnProperty(\"length\"));\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (String.prototype.match.length !== 1) {\n $ERROR('#2: String.prototype.match.length === 1. Actual: '+String.prototype.match.length );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.10_A11"
+ },
+ {
+ "section": "15.5.4.10",
+ "description": "Arguments is true, and instance is object",
+ "test": "var __instance = new Object(true);\n\n__instance.match = String.prototype.match;\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__instance.match(true)[0] !== \"true\") {\n $ERROR('#1: __instance = new Object(true); __instance.match = String.prototype.match; __instance.match(true)[0] === \"true\". Actual: '+__instance.match(true)[0] );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.10_A1_T1"
+ },
+ {
+ "section": "15.5.4.10",
+ "description": "Call match (regexp) function with object argument",
+ "test": "var __obj = {toString:function(){return \"\\u0041B\";}}\nvar __str = \"ABB\\u0041BABAB\";\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nwith(__str){\n if (match(__obj)[0] !==\"AB\") {\n $ERROR('#1: var x; var __obj = {toString:function(){return \"\\u0041B\";}}; var __str = \"ABB\\u0041BABAB\"; match(__obj)[0] ===\"AB\". Actual: '+match(__obj)[0] );\n }\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\nvar x;\n",
+ "id": "S15.5.4.10_A1_T10"
+ },
+ {
+ "section": "15.5.4.10",
+ "description": "Override toString function, toString throw exception, then call match (regexp) function with this object as argument",
+ "test": "var __obj = {toString:function(){throw \"intostr\";}}\nvar __str = {str__:\"ABB\\u0041BABAB\"};\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nwith(__str){\n with(str__){\n try {\n var x = match(__obj);\n $FAIL('#1: \"var x = match(__obj)\" lead to throwing exception');\n } catch (e) {\n if (e!==\"intostr\") {\n $ERROR('#1.1: Exception === \"intostr\". Actual: '+e);\n }\n }\n }\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.10_A1_T11"
+ },
+ {
+ "section": "15.5.4.10",
+ "description": "Override toString and valueOf functions, valueOf throw exception, then call match (regexp) function with this object as argument",
+ "test": "var __obj = {toString:function(){return {};},valueOf:function(){throw \"intostr\";}}\nvar __str = new String(\"ABB\\u0041BABAB\");\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nwith(__str){\n try {\n var x = match(__obj);\n $FAIL('#1: \"var x = match(__obj)\" lead to throwing exception');\n } catch (e) {\n if (e!==\"intostr\") {\n $ERROR('#1.1: Exception === \"intostr\". Actual: '+e);\n }\n }\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.10_A1_T12"
+ },
+ {
+ "section": "15.5.4.10",
+ "description": "Override toString and valueOf functions, then call match (regexp) function with this object as argument",
+ "test": "var __obj = {toString:function(){return {};},valueOf:function(){return 1;}}\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (\"ABB\\u0041B\\u0031ABAB\\u0031BBAA\".match(__obj)[0] !==\"1\") {\n $ERROR('#1: var __obj = {toString:function(){return {};},valueOf:function(){return 1;}}; \"ABB\\\\u0041B\\\\u0031ABAB\\\\u0031BBAA\".match(__obj)[0] ===\"1\". Actual: '+(\"ABB\\u0041B\\u0031ABAB\\u0031BBAA\".match(__obj)[0]) );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#3\nif (\"ABB\\u0041B\\u0031ABAB\\u0031BBAA\".match(__obj).length !== 1) {\n $ERROR('#3: var __obj = {toString:function(){return {};},valueOf:function(){return 1;}}; \"ABB\\\\u0041B\\\\u0031ABAB\\\\u0031BBAA\".match(__obj).length === 1. Actual: '+(\"ABB\\u0041B\\u0031ABAB\\u0031BBAA\".match(__obj).length) );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.10_A1_T13"
+ },
+ {
+ "section": "15.5.4.10",
+ "description": "Call match (regexp) function with RegExp object as argument from string",
+ "test": "var __reg = new RegExp(\"77\");\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (\"ABB\\u0041BABAB\\u0037\\u0037BBAA\".match(__reg)[0] !== \"77\") {\n $ERROR('#1: var __reg = new RegExp(\"77\"); \"ABB\\\\u0041BABAB\\\\u0037\\\\u0037BBAA\".match(__reg)[0] === \"77\". Actual: '+(\"ABB\\u0041BABAB\\u0037\\u0037BBAA\".match(__reg)[0]) );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.10_A1_T14"
+ },
+ {
+ "section": "15.5.4.10",
+ "description": "Argument is function that return boolean, and instance is Boolean object",
+ "test": "var __instance = new Boolean;\n\n__instance.match = String.prototype.match;\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__instance.match(function(){return false;}())[0] !== \"false\") {\n $ERROR('#1: __instance = new Boolean; __instance.match = String.prototype.match; __instance.match(function(){return false;}())[0] === \"false\". Actual: '+__instance.match(function(){return false;}())[0] );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.10_A1_T2"
+ },
+ {
+ "section": "15.5.4.10",
+ "description": "Checking by using eval",
+ "test": "var match = String.prototype.match;\n\nif (typeof toString === \"undefined\"){\n toString = Object.prototype.toString;\n}\n\nvar __class__ = toString();\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (match(eval(\"\\\"bj\\\"\"))[0] !== \"bj\") {\n $ERROR('#1: match = String.prototype.match; match(eval(\"\\\\\"bj\\\\\"\"))[0] === \"bj\". Actual: '+match(eval(\"\\\"bj\\\"\"))[0] );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.10_A1_T3"
+ },
+ {
+ "section": "15.5.4.10",
+ "description": "Call match (regexp) function without arguments of string",
+ "test": "var __matched = \"\".match();\n\nvar __expected = RegExp().exec(\"\"); \n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__matched.length !== __expected.length) {\n $ERROR('#1: __matched = \"\".match(); __expected = RegExp().exec(\"\"); __matched.length === __expected.length. Actual: '+__matched.length );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (__matched.index !== __expected.index) {\n $ERROR('#2: __matched = \"\".match(); __expected = RegExp().exec(\"\"); __matched.index === __expected.index. Actual: '+__matched.index );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#3\nif (__matched.input !== __expected.input) {\n $ERROR('#3: __matched = \"\".match(); __expected = RegExp().exec(\"\"); __matched.input === __expected.input. Actual: '+__matched.input );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#4\nfor(var index=0; index<__expected.length; index++) {\n if (__matched[index]!==__expected[index]) {\n $ERROR('#4.'+index+': __matched = \"\".match(); __expected = RegExp().exec(\"\"); __matched['+index+']===__expected['+index+']. Actual: '+__matched[index]);\n }\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.10_A1_T4"
+ },
+ {
+ "section": "15.5.4.10",
+ "description": "Call match (regexp) function with null argument of function object",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\n//since ToString(null) evaluates to \"null\" match(null) evaluates to match(\"null\")\nif (function(){return \"gnulluna\"}().match(null)[0] !== \"null\") {\n $ERROR('#1: function(){return \"gnulluna\"}().match(null)[0] === \"null\". Actual: '+function(){return \"gnulluna\"}().match(null)[0] );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.10_A1_T5"
+ },
+ {
+ "section": "15.5.4.10",
+ "description": "Call match (regexp) function with x argument of new String object, where x is undefined variable",
+ "test": "var __matched = new String(\"undefined\").match(x);\n\nvar __expected = RegExp(x).exec(\"undefined\"); \n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__matched.length !== __expected.length) {\n $ERROR('#1: __matched = new String(\"undefined\").match(x); __expected = RegExp(x).exec(\"undefined\"); __matched.length === __expected.length. Actual: '+__matched.length );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (__matched.index !== __expected.index) {\n $ERROR('#2: __matched = new String(\"undefined\").match(x); __expected = RegExp(x).exec(\"undefined\"); __matched.index === __expected.index. Actual: '+__matched.index );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#3\nif (__matched.input !== __expected.input) {\n $ERROR('#3: __matched = new String(\"undefined\").match(x); __expected = RegExp(x).exec(\"undefined\"); __matched.input === __expected.input. Actual: '+__matched.input );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#4\nfor(var index=0; index<__expected.length; index++) {\n if (__matched[index]!==__expected[index]) {\n $ERROR('#4.'+index+': __matched = new String(\"undefined\").match(x); __expected = RegExp(x).exec(\"undefined\"); __matched['+index+']===__expected['+index+']. Actual: '+__matched[index]);\n }\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\nvar x;\n\n",
+ "id": "S15.5.4.10_A1_T6"
+ },
+ {
+ "section": "15.5.4.10",
+ "description": "Call match (regexp) function with undefined argument of string object",
+ "test": "var __matched = String(\"undefined\").match(undefined);\n\nvar __expected = RegExp(undefined).exec(\"undefined\"); \n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__matched.length !== __expected.length) {\n $ERROR('#1: __matched = String(\"undefined\").match(undefined); __expected = RegExp(undefined).exec(\"undefined\"); __matched.length === __expected.length. Actual: '+__matched.length );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (__matched.index !== __expected.index) {\n $ERROR('#2: __matched = String(\"undefined\").match(undefined); __expected = RegExp(undefined).exec(\"undefined\"); __matched.index === __expected.index. Actual: '+__matched.index );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#3\nif (__matched.input !== __expected.input) {\n $ERROR('#3: __matched = String(\"undefined\").match(undefined); __expected = RegExp(undefined).exec(\"undefined\"); __matched.input === __expected.input. Actual: '+__matched.input );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#4\nfor(var index=0; index<__expected.length; index++) {\n if (__matched[index]!==__expected[index]) {\n $ERROR('#4.'+index+': __matched = String(\"undefined\").match(undefined); __expected = RegExp(undefined).exec(\"undefined\"); __matched['+index+']===__expected['+index+']. Actual: '+__matched[index]);\n }\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.10_A1_T7"
+ },
+ {
+ "section": "15.5.4.10",
+ "description": ": Call match (regexp) function with void 0 argument of string object;",
+ "test": "var __obj = {toString:function(){}};\n\nvar __matched = String(__obj).match(void 0);\n\nvar __expected = RegExp(void 0).exec(\"undefined\"); \n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__matched.length !== __expected.length) {\n $ERROR('#1: __obj = {toString:function(){}}; __matched = String(__obj).match(void 0); __expected = RegExp(void 0).exec(\"undefined\"); __matched.length === __expected.length. Actual: '+__matched.length );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (__matched.index !== __expected.index) {\n $ERROR('#2: __obj = {toString:function(){}}; __matched = String(__obj).match(void 0); __expected = RegExp(void 0).exec(\"undefined\"); __matched.index === __expected.index. Actual: '+__matched.index );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#3\nif (__matched.input !== __expected.input) {\n $ERROR('#3: __obj = {toString:function(){}}; __matched = String(__obj).match(void 0); __expected = RegExp(void 0).exec(\"undefined\"); __matched.input === __expected.input. Actual: '+__matched.input );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#4\nfor(var index=0; index<__expected.length; index++) {\n if (__matched[index]!==__expected[index]) {\n $ERROR('#4.'+index+': __obj = {toString:function(){}}; __matched = String(__obj).match(void 0); __expected = RegExp(void 0).exec(\"undefined\"); __matched['+index+']===__expected['+index+']. Actual: '+__matched[index]);\n }\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.10_A1_T8"
+ },
+ {
+ "section": "15.5.4.10",
+ "description": "Call match (regexp) function with function(){}() argument of string object",
+ "test": "var __obj = {\n valueOf:function(){},\n toString:void 0\n};\n\nvar __matched = new String(__obj).match(function(){}());\n\nvar __expected = RegExp(undefined).exec(\"undefined\"); \n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__matched.length !== __expected.length) {\n $ERROR('#1: __obj = {valueOf:function(){}, toString:void 0}; __matched = new String(__obj).match(function(){}()); __expected = RegExp(undefined).exec(\"undefined\"); __matched.length === __expected.length. Actual: '+__matched.length );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (__matched.index !== __expected.index) {\n $ERROR('#2: __obj = {valueOf:function(){}, toString:void 0}; __matched = new String(__obj).match(function(){}()); __expected = RegExp(undefined).exec(\"undefined\"); __matched.index === __expected.index. Actual: '+__matched.index );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#3\nif (__matched.input !== __expected.input) {\n $ERROR('#3: __obj = {valueOf:function(){}, toString:void 0}; __matched = new String(__obj).match(function(){}()); __expected = RegExp(undefined).exec(\"undefined\"); __matched.input === __expected.input. Actual: '+__matched.input );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#4\nfor(var index=0; index<__expected.length; index++) {\n if (__matched[index]!==__expected[index]) {\n $ERROR('#4.'+index+': __obj = {valueOf:function(){}, toString:void 0}; __matched = new String(__obj).match(function(){}()); __expected = RegExp(undefined).exec(\"undefined\"); __matched['+index+']===__expected['+index+']. Actual: '+__matched[index]);\n }\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.10_A1_T9"
+ },
+ {
+ "section": "15.5.4.10, 15.10.6.2",
+ "description": "Regular expression is 3",
+ "test": "var __string = \"1234567890\";\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__string.match(3)[0]!== \"3\") {\n $ERROR('#1: __string = \"1234567890\"; __string.match(3)[0]=== \"3\". Actual: '+__string.match(3)[0]);\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (__string.match(3).length !==1) {\n $ERROR('#2: __string = \"1234567890\"; __string.match(3).length ===1. Actual: '+__string.match(3).length );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#3\nif (__string.match(3).index !==2) {\n $ERROR('#3: __string = \"1234567890\"; __string.match(3).index ===2. Actual: '+__string.match(3).index );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#4\nif (__string.match(3).input !==__string) {\n $ERROR('#4: __string = \"1234567890\"; __string.match(3).input ===__string. Actual: '+__string.match(3).input );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.10_A2_T1"
+ },
+ {
+ "section": "15.5.4.10, 15.10.6.2",
+ "description": "Regular expression is /([\\d]{5})([-\\ ]?[\\d]{4})?$/. Last match is undefined.\nAnd regular expression object have property lastIndex = tested_string.lastIndexOf(\"0\")",
+ "test": "var __string = \"Boston, MA 02134\";\n\nvar __matches=[\"02134\", \"02134\", undefined];\n\nvar __re = /([\\d]{5})([-\\ ]?[\\d]{4})?$/;\n\n__re.lastIndex = __string.lastIndexOf(\"0\");\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__string.match(__re).length!== 3) {\n $ERROR('#1: __string.match(__re).length=== 3. Actual: '+__string.match(__re).length);\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (__string.match(__re).index !==__string.lastIndexOf(\"0\")) {\n $ERROR('#2: __string.match(__re).index ===__string.lastIndexOf(\"0\"). Actual: '+__string.match(__re).index );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#3\nfor(var mi=0; mi<__matches.length; mi++) {\n if (__string.match(__re)[mi]!==__matches[mi]) {\n $ERROR('#3.'+mi+': __string.match(__re)['+mi+']===__matches['+mi+']. Actual: '+__string.match(__re)[mi]);\n }\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.10_A2_T10"
+ },
+ {
+ "section": "15.5.4.10, 15.10.6.2",
+ "description": "Regular expression is /([\\d]{5})([-\\ ]?[\\d]{4})?$/. Last match is undefined.\nAnd regular expression object have property lastIndex = tested_string.lastIndexOf(\"0\")+1",
+ "test": "var __string = \"Boston, MA 02134\";\n\nvar __matches=[\"02134\", \"02134\", undefined];\n\nvar __re = /([\\d]{5})([-\\ ]?[\\d]{4})?$/;\n\n__re.lastIndex = __string.lastIndexOf(\"0\")+1;\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__string.match(__re).length!== 3) {\n $ERROR('#1: __string.match(__re).length=== 3. Actual: '+__string.match(__re).length);\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (__string.match(__re).index !==__string.lastIndexOf(\"0\")) {\n $ERROR('#2: __string.match(__re).index ===__string.lastIndexOf(\"0\"). Actual: '+__string.match(__re).index );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#3\nfor(var mi=0; mi<__matches.length; mi++) {\n if (__string.match(__re)[mi]!==__matches[mi]) {\n $ERROR('#3.'+mi+': __string.match(__re)['+mi+']===__matches['+mi+']. Actual: '+__string.match(__re)[mi]);\n }\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.10_A2_T11"
+ },
+ {
+ "section": "15.5.4.10, 15.10.6.2",
+ "description": "Regular expression is variable that have value /([\\d]{5})([-\\ ]?[\\d]{4})?$/g",
+ "test": "var __matches=[\"02134\"];\n\nvar __string = \"Boston, MA 02134\";\n\nvar __re = /([\\d]{5})([-\\ ]?[\\d]{4})?$/g;\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__string.match(__re).length!== __matches.length) {\n $ERROR('#1: __string.match(__re).length=== __matches.length. Actual: '+__string.match(__re).length);\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (__string.match(__re)[0]!==__matches[0]) {\n $ERROR('#2: __string.match(__re)[0]===__matches[0]. Actual: '+__string.match(__re)[0]);\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.10_A2_T12"
+ },
+ {
+ "section": "15.5.4.10, 15.10.6.2",
+ "description": "Regular expression is /([\\d]{5})([-\\ ]?[\\d]{4})?$/g.\nAnd regular expression object have property lastIndex = 0",
+ "test": "var __matches=[\"02134\"];\n\nvar __re = /([\\d]{5})([-\\ ]?[\\d]{4})?$/g;\n__re.lastIndex = 0;\n\nvar __string = \"Boston, MA 02134\";\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__string.match(__re).length!== __matches.length) {\n $ERROR('#1: __string.match(__re).length=== __matches.length. Actual: '+__string.match(__re).length);\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#3\nif (__string.match(__re)[0]!==__matches[0]) {\n $ERROR('#3: __string.match(__re)[0]===__matches[0]. Actual: '+__string.match(__re)[0]);\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.10_A2_T13"
+ },
+ {
+ "section": "15.5.4.10, 15.10.6.2",
+ "description": "Regular expression is /([\\d]{5})([-\\ ]?[\\d]{4})?$/g.\nAnd regular expression object have property lastIndex = tested_string.length",
+ "test": "var __string = \"Boston, MA 02134\";\n\nvar __matches=[\"02134\"];\n\nvar __re = /([\\d]{5})([-\\ ]?[\\d]{4})?$/g;\n\n__re.lastIndex = __string.length;\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__string.match(__re).length!== __matches.length) {\n $ERROR('#1: __string.match(__re).length=== __matches.length. Actual: '+__string.match(__re).length);\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#3\nif (__string.match(__re)[0]!==__matches[0]) {\n $ERROR('#3: __string.match(__re)[0]===__matches[0]. Actual: '+__string.match(__re)[0]);\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.10_A2_T14"
+ },
+ {
+ "section": "15.5.4.10, 15.10.6.2",
+ "description": "Regular expression is /([\\d]{5})([-\\ ]?[\\d]{4})?$/.\nAnd regular expression object have property lastIndex = tested_string.lastIndexOf(\"0\")",
+ "test": "var __string = \"Boston, MA 02134\";\n\nvar __matches=[\"02134\"];\n\nvar __re = /([\\d]{5})([-\\ ]?[\\d]{4})?$/g;\n\n__re.lastIndex = __string.lastIndexOf(\"0\");\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__string.match(__re).length!== __matches.length) {\n $ERROR('#1: __string.match(__re).length=== __matches.length. Actual: '+__string.match(__re).length);\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#3\nif (__string.match(__re)[0]!==__matches[0]) {\n $ERROR('#3: __string.match(__re)[0]===__matches[0]. Actual: '+__string.match(__re)[0]);\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.10_A2_T15"
+ },
+ {
+ "section": "15.5.4.10, 15.10.6.2",
+ "description": "Regular expression is /([\\d]{5})([-\\ ]?[\\d]{4})?$/.\nAnd regular expression object have property lastIndex = tested_string.lastIndexOf(\"0\")+1",
+ "test": "var __string = \"Boston, MA 02134\";\n\nvar __matches=[\"02134\"];\n\nvar __re = /([\\d]{5})([-\\ ]?[\\d]{4})?$/g;\n\n__re.lastIndex = __string.lastIndexOf(\"0\")+1;\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__string.match(__re).length!== __matches.length) {\n $ERROR('#1: __string.match(__re).length=== __matches.length. Actual: '+__string.match(__re).length);\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#3\nif (__string.match(__re)[0]!==__matches[0]) {\n $ERROR('#3: __string.match(__re)[0]===__matches[0]. Actual: '+__string.match(__re)[0]);\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.10_A2_T16"
+ },
+ {
+ "section": "15.5.4.10, 15.10.6.2",
+ "description": "Regular expression is /0./",
+ "test": "var __re = /0./;\n\nvar __num = 10203040506070809000;\n\nNumber.prototype.match = String.prototype.match;\n\n//__matches = [\"02\"];\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__num.match(__re)[0]!== \"02\") {\n $ERROR('#1: __num.match(__re)[0]=== \"02\". Actual: '+__num.match(__re)[0]);\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (__num.match(__re).length !==1) {\n $ERROR('#2: __num.match(__re).length ===1. Actual: '+__num.match(__re).length );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#3\nif (__num.match(__re).index !==1) {\n $ERROR('#3: __num.match(__re).index ===1. Actual: '+__num.match(__re).index );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#4\nif (__num.match(__re).input !==String(__num)) {\n $ERROR('#4: __num.match(__re).input ===String(__num). Actual: '+__num.match(__re).input );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.10_A2_T17"
+ },
+ {
+ "section": "15.5.4.10, 15.10.6.2",
+ "description": "Regular expression is /0./.\nAnd regular expression object have property lastIndex = 0",
+ "test": "var __re = /0./;\n\n__re.lastIndex = 0;\n\nvar __num = 10203040506070809000;\n\nNumber.prototype.match = String.prototype.match;\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__num.match(__re)[0]!== \"02\") {\n $ERROR('#1: __num.match(__re)[0]=== \"02\". Actual: '+__num.match(__re)[0]);\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (__num.match(__re).length !==1) {\n $ERROR('#2: __num.match(__re).length ===1. Actual: '+__num.match(__re).length );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#3\nif (__num.match(__re).index !==1) {\n $ERROR('#3: __num.match(__re).index ===1. Actual: '+__num.match(__re).index );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#4\nif (__num.match(__re).input !==String(__num)) {\n $ERROR('#4: __num.match(__re).input ===String(__num). Actual: '+__num.match(__re).input );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.10_A2_T18"
+ },
+ {
+ "section": "15.5.4.10, 15.10.6.2",
+ "description": "Regular expression is /34/g",
+ "test": "var __matches=[\"34\",\"34\",\"34\"];\n\nvar __string = \"343443444\";\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__string.match(/34/g).length!== 3) {\n $ERROR('#1: __string = \"343443444\"; __string.match(/34/g).length=== 3. Actual: '+__string.match(/34/g).length);\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nfor(var mi=0; mi<__matches.length; mi++) {\n if (__string.match(/34/g)[mi]!==__matches[mi]) {\n $ERROR('#2.'+mi+': __matches=[\"34\",\"34\",\"34\"]; __string = \"343443444\"; __string.match(/34/g)['+mi+']===__matches['+mi+']. Actual: '+__string.match(/34/g)[mi]);\n }\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.10_A2_T2"
+ },
+ {
+ "section": "15.5.4.10, 15.10.6.2",
+ "description": "Regular expression is /\\d{1}/g",
+ "test": "var __matches=[\"1\", \"2\", \"3\", \"4\", \"5\", \"6\", \"7\", \"8\", \"9\", \"0\"];\n\nvar __string = \"123456abcde7890\";\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__string.match(/\\d{1}/g).length!== 10) {\n $ERROR('#1: __string = \"123456abcde7890\"; __string.match(/\\\\d{1}/g).length=== 10. Actual: '+__string.match(/\\d{1}/g).length);\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nfor(var mi=0; mi<__matches.length; mi++) {\n if (__string.match(/\\d{1}/g)[mi]!==__matches[mi]) {\n $ERROR('#2.'+mi+': __matches=[\"1\", \"2\", \"3\", \"4\", \"5\", \"6\", \"7\", \"8\", \"9\", \"0\"]; __string = \"123456abcde7890\"; __string.match(/\\\\d{1}/g)['+mi+']===__matches['+mi+']. Actual: '+__string.match(/\\d{1}/g)[mi]);\n }\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.10_A2_T3"
+ },
+ {
+ "section": "15.5.4.10, 15.10.6.2",
+ "description": "Regular expression is /\\d{2}/g",
+ "test": "var __matches=[\"12\", \"34\", \"56\", \"78\", \"90\"];\n\nvar __string = \"123456abcde7890\";\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__string.match(/\\d{2}/g).length!== 5) {\n $ERROR('#1: __string = \"123456abcde7890\"; __string.match(/\\\\d{2}/g).length=== 5. Actual: '+__string.match(/\\d{2}/g).length);\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nfor(var mi=0; mi<__matches.length; mi++) {\n if (__string.match(/\\d{2}/g)[mi]!==__matches[mi]) {\n $ERROR('#2.'+mi+': __matches=[\"12\", \"34\", \"56\", \"78\", \"90\"]; __string = \"123456abcde7890\"; __string.match(/\\\\d{2}/g)['+mi+']===__matches['+mi+']. Actual: '+__string.match(/\\d{2}/g)[mi]);\n }\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.10_A2_T4"
+ },
+ {
+ "section": "15.5.4.10, 15.10.6.2",
+ "description": "Regular expression is /\\D{2}/g",
+ "test": "var __matches=[\"ab\", \"cd\"];\n\nvar __string = \"123456abcde7890\";\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__string.match(/\\D{2}/g).length!== 2) {\n $ERROR('#1: __string = \"123456abcde7890\"; __string.match(/\\\\D{2}/g).length=== 2. Actual: '+__string.match(/\\D{2}/g).length);\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nfor(var mi=0; mi<__matches.length; mi++) {\n if (__string.match(/\\D{2}/g)[mi]!==__matches[mi]) {\n $ERROR('#2.'+mi+': __matches=[\"ab\", \"cd\"]; __string = \"123456abcde7890\"; __string.match(/\\\\D{2}/g)['+mi+']===__matches['+mi+']. Actual: '+__string.match(/\\D{2}/g)[mi]);\n }\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.10_A2_T5"
+ },
+ {
+ "section": "15.5.4.10, 15.10.6.2",
+ "description": "Regular expression is /([\\d]{5})([-\\ ]?[\\d]{4})?$/. Last match is void 0",
+ "test": "var __string = \"Boston, Mass. 02134\";\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__string.match(/([\\d]{5})([-\\ ]?[\\d]{4})?$/)[0]!== \"02134\") {\n $ERROR('#1: __string = \"Boston, Mass. 02134\"; __string.match(/([\\\\d]{5})([-\\\\ ]?[\\\\d]{4})?$/)[0]=== \"02134\". Actual: '+__string.match(/([\\d]{5})([-\\ ]?[\\d]{4})?$/)[0]);\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (__string.match(/([\\d]{5})([-\\ ]?[\\d]{4})?$/)[1]!== \"02134\") {\n $ERROR('#2: __string = \"Boston, Mass. 02134\"; __string.match(/([\\\\d]{5})([-\\\\ ]?[\\\\d]{4})?$/)[1]=== \"02134\". Actual: '+__string.match(/([\\d]{5})([-\\ ]?[\\d]{4})?$/)[1]);\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#3\nif (__string.match(/([\\d]{5})([-\\ ]?[\\d]{4})?$/)[2]!== void 0) {\n $ERROR('#3: __string = \"Boston, Mass. 02134\"; __string.match(/([\\\\d]{5})([-\\\\ ]?[\\\\d]{4})?$/)[2]=== void 0. Actual: '+__string.match(/([\\d]{5})([-\\ ]?[\\d]{4})?$/)[2]);\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#4\nif (__string.match(/([\\d]{5})([-\\ ]?[\\d]{4})?$/).length !==3) {\n $ERROR('#4: __string = \"Boston, Mass. 02134\"; __string.match(/([\\\\d]{5})([-\\\\ ]?[\\\\d]{4})?$/).length ===3. Actual: '+__string.match(/([\\d]{5})([-\\ ]?[\\d]{4})?$/).length );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#5\nif (__string.match(/([\\d]{5})([-\\ ]?[\\d]{4})?$/).index !==14) {\n $ERROR('#5: __string = \"Boston, Mass. 02134\"; __string.match(/([\\\\d]{5})([-\\\\ ]?[\\\\d]{4})?$/).index ===14. Actual: '+__string.match(/([\\d]{5})([-\\ ]?[\\d]{4})?$/).index );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#6\nif (__string.match(/([\\d]{5})([-\\ ]?[\\d]{4})?$/).input !==__string) {\n $ERROR('#6: __string = \"Boston, Mass. 02134\"; __string.match(/([\\\\d]{5})([-\\\\ ]?[\\\\d]{4})?$/).input ===__string. Actual: '+__string.match(/([\\d]{5})([-\\ ]?[\\d]{4})?$/).input );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.10_A2_T6"
+ },
+ {
+ "section": "15.5.4.10, 15.10.6.2",
+ "description": "Regular expression is /([\\d]{5})([-\\ ]?[\\d]{4})?$/g",
+ "test": "var __matches=[\"02134\"];\n\nvar __string = \"Boston, Mass. 02134\";\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__string.match(/([\\d]{5})([-\\ ]?[\\d]{4})?$/g).length!== 1) {\n $ERROR('#1: __string = \"Boston, Mass. 02134\"; __string.match(/([\\\\d]{5})([-\\\\ ]?[\\\\d]{4})?$/g).length=== 1. Actual: '+__string.match(/([\\d]{5})([-\\ ]?[\\d]{4})?$/g).length);\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (__string.match(/([\\d]{5})([-\\ ]?[\\d]{4})?$/g)[0]!==__matches[0]) {\n $ERROR('#2: __matches=[\"02134\"]; __string = \"Boston, Mass. 02134\"; __string.match(/([\\\\d]{5})([-\\\\ ]?[\\\\d]{4})?$/g)[0]===__matches[0]. Actual: '+__string.match(/([\\d]{5})([-\\ ]?[\\d]{4})?$/g)[0]);\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.10_A2_T7"
+ },
+ {
+ "section": "15.5.4.10, 15.10.6.2",
+ "description": "Regular expression is /([\\d]{5})([-\\ ]?[\\d]{4})?$/. Last match is undefined.\nAnd regular expression object have property lastIndex = 0",
+ "test": "var __matches=[\"02134\", \"02134\", undefined];\n\nvar __re = /([\\d]{5})([-\\ ]?[\\d]{4})?$/;\n__re.lastIndex = 0;\n\nvar __string = \"Boston, MA 02134\";\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__string.match(__re).length!== 3) {\n $ERROR('#1: __string = \"Boston, MA 02134\"; __re = /([\\d]{5})([-\\ ]?[\\d]{4})?$/; __string.match(__re).length=== 3. Actual: '+__string.match(__re).length);\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (__string.match(__re).index !==__string.lastIndexOf(\"0\")) {\n $ERROR('#2: __string = \"Boston, MA 02134\"; __re = /([\\d]{5})([-\\ ]?[\\d]{4})?$/; __re.lastIndex = 0; __string.match(__re).index ===__string.lastIndexOf(\"0\"). Actual: '+__string.match(__re).index );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#3\nfor(var mi=0; mi<__matches.length; mi++) {\n if (__string.match(__re)[mi]!==__matches[mi]) {\n $ERROR('#3.'+mi+': __string = \"Boston, MA 02134\"; __re = /([\\d]{5})([-\\ ]?[\\d]{4})?$/; __matches=[\"02134\", \"02134\", undefined]; __string.match(__re)['+mi+']===__matches['+mi+']. Actual: '+__string.match(__re)[mi]);\n }\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.10_A2_T8"
+ },
+ {
+ "section": "15.5.4.10, 15.10.6.2",
+ "description": "Regular expression is /([\\d]{5})([-\\ ]?[\\d]{4})?$/. Last match is undefined.\nAnd regular expression object have property lastIndex = tested_string.length",
+ "test": "var __string = \"Boston, MA 02134\";\n\nvar __matches=[\"02134\", \"02134\", undefined];\n\nvar __re = /([\\d]{5})([-\\ ]?[\\d]{4})?$/;\n\n__re.lastIndex = __string.length;\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__string.match(__re).length!== 3) {\n $ERROR('#1: __string = \"Boston, MA 02134\"; __re = /([\\d]{5})([-\\ ]?[\\d]{4})?$/; __string.match(__re).length=== 3. Actual: '+__string.match(__re).length);\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (__string.match(__re).index !==__string.lastIndexOf(\"0\")) {\n $ERROR('#2: __string = \"Boston, MA 02134\"; __re = /([\\d]{5})([-\\ ]?[\\d]{4})?$/; __re.lastIndex = __string.length; __string.match(__re).index ===__string.lastIndexOf(\"0\"). Actual: '+__string.match(__re).index );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#3\nfor(var mi=0; mi<__matches.length; mi++) {\n if (__string.match(__re)[mi]!==__matches[mi]) {\n $ERROR('#3.'+mi+': __string = \"Boston, MA 02134\"; __re = /([\\d]{5})([-\\ ]?[\\d]{4})?$/; __matches=[\"02134\", \"02134\", undefined]; __string.match(__re)['+mi+']===__matches['+mi+']. Actual: '+__string.match(__re)[mi]);\n }\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.10_A2_T9"
+ },
+ {
+ "section": "15.5.4.10, 13.2",
+ "description": "Checking String.prototype.match.prototype",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (String.prototype.match.prototype !== undefined) {\n $ERROR('#1: String.prototype.match.prototype === undefined. Actual: '+String.prototype.match.prototype );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.10_A6"
+ },
+ {
+ "section": "15.5.4.10, 13.2",
+ "description": "Checking if creating \"String.prototype.match object\" fails",
+ "test": "var __FACTORY = String.prototype.match;\n\ntry {\n var __instance = new __FACTORY;\n $FAIL('#1: __FACTORY = String.prototype.match; __FACTORY = String.prototype.match; __instance = new __FACTORY lead to throwing exception');\n} catch (e) {}\n",
+ "id": "S15.5.4.10_A7"
+ },
+ {
+ "section": "15.5.4.10",
+ "description": "Checking if enumerating the String.prototype.match.length property fails",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#0\nif (!(String.prototype.match.hasOwnProperty('length'))) {\n $FAIL('#0: String.prototype.match.hasOwnProperty(\\'length\\') return true. Actual: '+String.prototype.match.hasOwnProperty('length'));\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n\n//////////////////////////////////////////////////////////////////////////////\n// CHECK#1\nif (String.prototype.match.propertyIsEnumerable('length')) {\n $ERROR('#1: String.prototype.match.propertyIsEnumerable(\\'length\\') return false');\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n// CHECK#2\nvar count=0;\n\nfor (p in String.prototype.match){\n if (p===\"length\") count++;\n}\n\nif (count !== 0) {\n $ERROR('#2: count=0; for (p in String.prototype.match){if (p===\"length\") count++;}; count === 0. Actual: '+count );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.10_A8"
+ },
+ {
+ "section": "15.5.4.10",
+ "description": "Checking if deleting the String.prototype.match.length property fails",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#0\nif (!(String.prototype.match.hasOwnProperty('length'))) {\n $FAIL('#0: String.prototype.match.hasOwnProperty(\\'length\\') return true. Actual: '+String.prototype.match.hasOwnProperty('length'));\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (delete String.prototype.match.length) {\n $ERROR('#1: delete String.prototype.match.length return false');\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (!(String.prototype.match.hasOwnProperty('length'))) {\n $FAIL('#2: delete String.prototype.match.length; String.prototype.match.hasOwnProperty(\\'length\\') return true. Actual: '+String.prototype.match.hasOwnProperty('length'));\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.10_A9"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.5.4.11_String.prototype.replace.json b/website/resources/scripts/testcases2/15.5.4.11_String.prototype.replace.json
new file mode 100644
index 000000000..d6b0e451a
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.5.4.11_String.prototype.replace.json
@@ -0,0 +1,260 @@
+{
+ "testCollection": {
+ "name": "15.5.4.11_String.prototype.replace",
+ "numTests": 42,
+ "tests": [
+ {
+ "section": "15.5.4.11",
+ "description": "Checking if varying the String.prototype.replace.length property fails",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (!(String.prototype.replace.hasOwnProperty('length'))) {\n $FAIL('#1: String.prototype.replace.hasOwnProperty(\\'length\\') return true. Actual: '+String.prototype.replace.hasOwnProperty('length'));\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\nvar __obj = String.prototype.replace.length;\n\nString.prototype.replace.length = function(){return \"shifted\";};\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (String.prototype.replace.length !== __obj) {\n $ERROR('#2: __obj = String.prototype.replace.length; String.prototype.replace.length = function(){return \"shifted\";}; String.prototype.replace.length === __obj. Actual: '+String.prototype.replace.length );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.11_A10"
+ },
+ {
+ "section": "15.5.4.11",
+ "description": "Checking String.prototype.replace.length",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (!(String.prototype.replace.hasOwnProperty(\"length\"))) {\n $ERROR('#1: String.prototype.replace.hasOwnProperty(\"length\") return true. Actual: '+String.prototype.replace.hasOwnProperty(\"length\"));\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (String.prototype.replace.length !== 2) {\n $ERROR('#2: String.prototype.replace.length === 2. Actual: '+String.prototype.replace.length );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.11_A11"
+ },
+ {
+ "section": "15.5.4.11",
+ "description": "replaceValue tests that its this value is undefined",
+ "test": "var global = this;\n'x'.replace(/x/, function() {\n \"use strict\";\n\n if (this === global) {\n $FAIL('#1: String replace leaks global');\n }\n if (this !== undefined) {\n $FAIL('#2: replaceValue should be called with this===undefined. ' +\n 'Actual: ' + this);\n }\n return 'y';\n});\n",
+ "id": "S15.5.4.11_A12"
+ },
+ {
+ "section": "15.5.4.11",
+ "description": "Arguments are true and 1, and instance is object",
+ "test": "var __instance = new Object(true);\n\n__instance.replace = String.prototype.replace;\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__instance.replace(true, 1) !== \"1\") {\n $ERROR('#1: __instance = new Object(true); __instance.replace = String.prototype.replace; __instance.replace(true, 1) === \"1\". Actual: '+__instance.replace(true, 1) );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.11_A1_T1"
+ },
+ {
+ "section": "15.5.4.11",
+ "description": "Call replace (searchValue, replaceValue) function with object and function arguments of string. Object have overrided toString function",
+ "test": "var __obj = {toString:function(){return \"\\u0041B\";}};\n\nvar __str = \"ABB\\u0041BABAB\";\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nwith(__str){\n if (replace(__obj, function(){return x;}) !== \"undefinedBABABAB\") {\n $ERROR('#1: var x; var __obj = {toString:function(){return \"\\u0041B\";}}; var __str = \"ABB\\u0041BABAB\"; replace(__obj, function(){return x;}) === \"undefinedBABABAB\". Actual: '+replace(__obj, function(){return x;}) );\n }\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\nvar x;\n",
+ "id": "S15.5.4.11_A1_T10"
+ },
+ {
+ "section": "15.5.4.11",
+ "description": "Call replace (searchValue, replaceValue) function with objects arguments of string object. Objects have overrided toString function, that throw exception",
+ "test": "var __obj = {toString:function(){throw \"insearchValue\";}};\nvar __obj2 = {toString:function(){throw \"inreplaceValue\";}};\nvar __str = {str__:\"ABB\\u0041BABAB\"};\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nwith(__str){\n with(str__){\n try {\n var x = replace(__obj,__obj2);\n $FAIL('#1: \"var x = replace(__obj,__obj2)\" lead to throwing exception');\n } catch (e) {\n if (e!==\"insearchValue\") {\n $ERROR('#1.1: Exception === \"insearchValue\". Actual: '+e);\n }\n }\n }\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.11_A1_T11"
+ },
+ {
+ "section": "15.5.4.11",
+ "description": "Call replace (searchValue, replaceValue) function with objects arguments of String object.\nFirst objects have overrided toString and valueOf functions, valueOf throw exception.\nSecond objects have overrided toString function, that throw exception",
+ "test": "var __obj = {toString:function(){return {};}, valueOf:function(){throw \"insearchValue\";}};\nvar __obj2 = {toString:function(){throw \"inreplaceValue\";}};\nvar __str = new String(\"ABB\\u0041BABAB\");\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nwith(__str){\n try {\n var x = replace(__obj, __obj2);\n $FAIL('#1: \"var x = replace(__obj,__obj2)\" lead to throwing exception');\n } catch (e) {\n if (e!==\"insearchValue\") {\n $ERROR('#1.1: Exception === \"insearchValue\". Actual: '+e);\n }\n }\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.11_A1_T12"
+ },
+ {
+ "section": "15.5.4.11",
+ "description": "Call replace (searchValue, replaceValue) function with objects arguments of string.\nFirst objects have overrided toString and valueOf functions.\nSecond objects have overrided toString function, that throw exception",
+ "test": "var __obj = {toString:function(){return {};}, valueOf:function(){return 1;}};\nvar __obj2 = {toString:function(){throw \"inreplaceValue\";}};\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\ntry {\n var x = \"ABB\\u0041BABAB\\u0031BBAA\".replace(__obj, __obj2);\n $FAIL('#1: var x = \"ABB\\\\u0041BABAB\\\\u0031BBAA\".replace(__obj,__obj2) lead to throwing exception');\n} catch (e) {\n if (e!==\"inreplaceValue\") {\n $ERROR('#1.1: Exception === \"inreplaceValue\". Actual: '+e);\n }\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n",
+ "id": "S15.5.4.11_A1_T13"
+ },
+ {
+ "section": "15.5.4.11",
+ "description": "Instance is string, searchValue is regular expression",
+ "test": "var __reg = new RegExp(\"77\");\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (\"ABB\\u0041BABAB\\u0037\\u0037BBAA\".replace(__reg, 1) !== \"ABBABABAB\\u0031BBAA\") {\n $ERROR('#1: var __reg = new RegExp(\"77\"); \"ABB\\\\u0041BABAB\\\\u0037\\\\u0037BBAA\".replace(__reg, 1) === \"ABBABABAB\\\\u0031BBAA\". Actual: '+(\"ABB\\u0041BABAB\\u0037\\u0037BBAA\".replace(__reg, 1)) );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.11_A1_T14"
+ },
+ {
+ "section": "15.5.4.11",
+ "description": "Instance is Object, searchValue is regular expression",
+ "test": "var __obj = {toString:function(){return /77/}};\n\nvar __instance = new Object(1100.00777001);\n\nObject.prototype.replace = String.prototype.replace;\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\ntry {\n var x = __instance.replace(__obj, 1) === \"1100.0017001\";\n $FAIL('#1.0: x = __instance.replace(__obj, 1) === \"1100.0017001\" lead to throwing exception');\n} catch (e) {\n if (!(e instanceof TypeError)) {\n $ERROR('#1.1: Exception is instance of TypeError. Actual: '+e);\n }\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.11_A1_T15"
+ },
+ {
+ "section": "15.5.4.11",
+ "description": "Instance is Number, searchValue is regular expression",
+ "test": "var __re = /77/;\n\nvar __instance = new Number(1100.00777001);\n\nNumber.prototype.replace = String.prototype.replace;\n\nvar __obj = {toString:function(){return function(a1,a2,a3){return a2+\"z\"};}}\n//__obj = function(a1,a2,a3){return a2+\"z\"};\n\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\ntry {\n var x = __instance.replace(__re, __obj) === \"1100.007z7001\";\n $FAIL('#1.0: x = __instance.replace(__obj, 1) === \"1100.007z7001\" lead to throwing exception');\n} catch (e) {\n if (!(e instanceof TypeError)) {\n $ERROR('#1.1: Exception is instance of TypeError. Actual: '+e);\n }\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.11_A1_T16"
+ },
+ {
+ "section": "15.5.4.11",
+ "description": "Instance is String object, searchValue is regular expression",
+ "test": "var __re = new RegExp(x,\"g\");\n\nvar __instance = String(\"asdf\");\n\nvar __str = \"1\";\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__instance.replace(__re, __str) !== \"1a1s1d1f1\") {\n $ERROR('#1: var x; var __re = new RegExp(x,\"g\"); __instance = String(\"asdf\"); __str = \"1\"; __instance.replace(__re, __str) === \"1a1s1d1f1\". Actual: '+__instance.replace(__re, __str) );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\nvar x;\n",
+ "id": "S15.5.4.11_A1_T17"
+ },
+ {
+ "section": "15.5.4.11",
+ "description": "Argument is function that return boolean, and instance is Boolean object",
+ "test": "var __instance = new Boolean;\n\n__instance.replace = String.prototype.replace;\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__instance.replace(function(){return false;}(),x) !== \"undefined\") {\n $ERROR('#1: var x; __instance = new Boolean; __instance.replace = String.prototype.replace; __instance.replace(function(){return false;}(),x) === \"undefined\". Actual: '+__instance.replace(function(){return false;}(),x) );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\nvar x;\n",
+ "id": "S15.5.4.11_A1_T2"
+ },
+ {
+ "section": "15.5.4.11",
+ "description": "Checking by using eval",
+ "test": "replace = String.prototype.replace;\n\nif (typeof toString === \"undefined\"){\n toString = Object.prototype.toString;\n}\n\n__class__ = toString();\n__toggle = 1;\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\n__replaced = replace(eval(\"\\\"b\\\"\"),\"^\");\n\n__golden = \"\";\nfor(var i=0; i<__class__.length; i++) {\n if ((__class__.charAt(i)===\"b\")&&(__toggle)) {\n __golden+=\"^\";\n __toggle = 0;\n } else {\n __golden+=__class__.charAt(i);\n }\n\n}\nif (__replaced !==__golden) {\n $ERROR('#1: __replaced ===__golden. Actual: '+__replaced );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.11_A1_T3"
+ },
+ {
+ "section": "15.5.4.11",
+ "description": ": Call replace (searchValue, replaceValue) function with null and function(a1,a2,a3){return a2+\"\";} arguments of function object;",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (function(){return \"gnulluna\"}().replace(null,function(a1,a2,a3){return a2+\"\";}) !== \"g1una\") {\n $ERROR('#1: function(){return \"gnulluna\"}().replace(null,function(a1,a2,a3){return a2+\"\";}) === \"g1una\". Actual: '+function(){return \"gnulluna\"}().replace(null,function(a1,a2,a3){return a2+\"\";}) );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.11_A1_T4"
+ },
+ {
+ "section": "15.5.4.11",
+ "description": "Call replace (searchValue, replaceValue) function with null and Function() arguments of function object",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (function(){return \"gnulluna\"}().replace(null, Function()) !== \"gundefineduna\") {\n $ERROR('#1: function(){return \"gnulluna\"}().replace(null, Function()) === \"gundefineduna\". Actual: '+function(){return \"gnulluna\"}().replace(null, Function()) );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.11_A1_T5"
+ },
+ {
+ "section": "15.5.4.11",
+ "description": ": Call replace (searchValue, replaceValue) function with x and Function(\"return arguments[1]+42;\") arguments of new String object. x is undefined variable;",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (new String(\"undefined\").replace(x,Function(\"return arguments[1]+42;\")) !== \"42\") {\n $ERROR('#1: var x; new String(\"undefined\").replace(x,Function(\"return arguments[1]+42;\")) === \"42\". Actual: '+new String(\"undefined\").replace(x,Function(\"return arguments[1]+42;\")) );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\nvar x;\n",
+ "id": "S15.5.4.11_A1_T6"
+ },
+ {
+ "section": "15.5.4.11",
+ "description": "Call replace (searchValue, replaceValue) function with string and undefined arguments of String object",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (String(void 0).replace(\"e\",undefined) !== \"undundefinedfined\") {\n $ERROR('#1: String(void 0).replace(\"e\",undefined) === \"undundefinedfined\". Actual: '+String(void 0).replace(\"e\",undefined) );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.11_A1_T7"
+ },
+ {
+ "section": "15.5.4.11",
+ "description": "Call replace (searchValue, replaceValue) function with regular expression and void 0 arguments of String object",
+ "test": "var __obj = {toString:function(){}};\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (String(__obj).replace(/e/g,void 0) !== \"undundefinedfinundefinedd\") {\n $ERROR('#1: __obj = {toString:function(){}}; String(__obj).replace(/e/g,void 0) === \"undundefinedfinundefinedd\". Actual: '+String(__obj).replace(/e/g,void 0) );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.11_A1_T8"
+ },
+ {
+ "section": "15.5.4.11",
+ "description": "Call replace (searchValue, replaceValue) function with functions arguments of new String object",
+ "test": "var __obj = {\n valueOf:function(){},\n toString:void 0\n};\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (new String(__obj).replace(function(){}(),__func) !== \"undefined0undefined\") {\n $ERROR('#1: __obj = {valueOf:function(){}, toString:void 0}; function __func(a1,a2,a3){return a1+a2+a3;}; new String(__obj).replace(function(){}(),__func) === \"undefined0undefined\". Actual: '+new String(__obj).replace(function(){}(),__func) );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\nfunction __func(a1,a2,a3){return a1+a2+a3;};\n",
+ "id": "S15.5.4.11_A1_T9"
+ },
+ {
+ "section": "15.5.4.11",
+ "description": "Don`t use $ in replaceValue, searchValue is regular expression /sh/g",
+ "test": "var __str = 'She sells seashells by the seashore.';\nvar __re = /sh/g;\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__str.replace(__re,'sch')!=='She sells seaschells by the seaschore.') {\n $ERROR('#1: var __str = \\'She sells seashells by the seashore.\\'; var __re = /sh/g; __str.replace(__re,\\'sch\\')===\\'She sells seaschells by the seaschore.\\'. Actual: '+__str.replace(__re,'sch'));\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.11_A2_T1"
+ },
+ {
+ "section": "15.5.4.11",
+ "description": "Use $' in replaceValue, searchValue is regular expression /sh/",
+ "test": "var __str = 'She sells seashells by the seashore.';\nvar __re = /sh/;\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__str.replace(__re, \"$'\" + 'sch')!=='She sells seaells by the seashore.schells by the seashore.') {\n $ERROR('#1: var __str = \\'She sells seashells by the seashore.\\'; var __re = /sh/; __str.replace(__re, \"$\\'\" + \\'sch\\')===\\'She sells seaells by the seashore.schells by the seashore.\\'. Actual: '+__str.replace(__re, \"$'\" + 'sch'));\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.11_A2_T10"
+ },
+ {
+ "section": "15.5.4.11",
+ "description": "Use $$ in replaceValue, searchValue is regular expression /sh/g",
+ "test": "var __str = 'She sells seashells by the seashore.';\nvar __re = /sh/g;\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__str.replace(__re,\"$$\" + 'sch')!=='She sells sea$schells by the sea$schore.') {\n $ERROR('#1: var __str = \\'She sells seashells by the seashore.\\'; var __re = /sh/g; __str.replace(__re,\"$$\" + \\'sch\\')===\\'She sells sea$schells by the sea$schore.\\'. Actual: '+__str.replace(__re,\"$$\" + 'sch'));\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.11_A2_T2"
+ },
+ {
+ "section": "15.5.4.11",
+ "description": "Use $& in replaceValue, searchValue is regular expression /sh/g",
+ "test": "var __str = 'She sells seashells by the seashore.';\nvar __re = /sh/g;\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__str.replace(__re,\"$&\" + 'sch')!=='She sells seashschells by the seashschore.') {\n $ERROR('#1: var __str = \\'She sells seashells by the seashore.\\'; var __re = /sh/g; __str.replace(__re,\"$&\" + \\'sch\\')===\\'She sells seashschells by the seashschore.\\'. Actual: '+__str.replace(__re,\"$&\" + 'sch'));\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.11_A2_T3"
+ },
+ {
+ "section": "15.5.4.11",
+ "description": "Use $` in replaceValue, searchValue is regular expression /sh/g",
+ "test": "var __str = 'She sells seashells by the seashore.';\nvar __re = /sh/g;\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__str.replace(__re, \"$`\" + 'sch')!=='She sells seaShe sells seaschells by the seaShe sells seashells by the seaschore.') {\n $ERROR('#1: var __str = \\'She sells seashells by the seashore.\\'; var __re = /sh/g; __str.replace(__re, \"$`\" + \\'sch\\')===\\'She sells seaShe sells seaschells by the seaShe sells seashells by the seaschore.\\'. Actual: '+__str.replace(__re, \"$`\" + 'sch'));\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.11_A2_T4"
+ },
+ {
+ "section": "15.5.4.11",
+ "description": "Use $' in replaceValue, searchValue is regular expression /sh/g",
+ "test": "var __str = 'She sells seashells by the seashore.';\nvar __re = /sh/g;\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__str.replace(__re, \"$'\" + 'sch')!=='She sells seaells by the seashore.schells by the seaore.schore.') {\n $ERROR('#1: var __str = \\'She sells seashells by the seashore.\\'; var __re = /sh/g; __str.replace(__re, \"$\\'\" + \\'sch\\')===\\'She sells seaells by the seashore.schells by the seaore.schore.\\'. Actual: '+__str.replace(__re, \"$'\" + 'sch'));\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.11_A2_T5"
+ },
+ {
+ "section": "15.5.4.11",
+ "description": "Don`t use $ in replaceValue, searchValue is regular expression /sh/",
+ "test": "var __str = 'She sells seashells by the seashore.';\nvar __re = /sh/;\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__str.replace(__re, 'sch')!=='She sells seaschells by the seashore.') {\n $ERROR('#1: var __str = \\'She sells seashells by the seashore.\\'; var __re = /sh/; __str.replace(__re, \\'sch\\')===\\'She sells seaschells by the seashore.\\'. Actual: '+__str.replace(__re, 'sch'));\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.11_A2_T6"
+ },
+ {
+ "section": "15.5.4.11",
+ "description": "Use $$ in replaceValue, searchValue is regular expression /sh/",
+ "test": "var __str = 'She sells seashells by the seashore.';\nvar __re = /sh/;\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__str.replace(__re, \"$$\" + 'sch')!=='She sells sea$schells by the seashore.') {\n $ERROR('#1: var __str = \\'She sells seashells by the seashore.\\'; var __re = /sh/; __str.replace(__re, \"$$\" + \\'sch\\')===\\'She sells sea$schells by the seashore.\\'. Actual: '+__str.replace(__re, \"$$\" + 'sch'));\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.11_A2_T7"
+ },
+ {
+ "section": "15.5.4.11",
+ "description": "Use $& in replaceValue, searchValue is regular expression /sh/",
+ "test": "var __str = 'She sells seashells by the seashore.';\nvar __re = /sh/;\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__str.replace(__re, \"$&\" + 'sch')!=='She sells seashschells by the seashore.') {\n $ERROR('#1: var __str = \\'She sells seashells by the seashore.\\'; var __re = /sh/; __str.replace(__re, \"$&\" + \\'sch\\')===\\'She sells seashschells by the seashore.\\'. Actual: '+__str.replace(__re, \"$&\" + 'sch'));\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.11_A2_T8"
+ },
+ {
+ "section": "15.5.4.11",
+ "description": "Use $` in replaceValue, searchValue is regular expression /sh/",
+ "test": "var __str = 'She sells seashells by the seashore.';\nvar __re = /sh/;\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__str.replace(__re, \"$`\" + 'sch')!=='She sells seaShe sells seaschells by the seashore.') {\n $ERROR('#1: var __str = \\'She sells seashells by the seashore.\\'; var __re = /sh/; __str.replace(__re, \"$`\" + \\'sch\\')===\\'She sells seaShe sells seaschells by the seashore.\\'. Actual: '+__str.replace(__re, \"$`\" + 'sch'));\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.11_A2_T9"
+ },
+ {
+ "section": "15.5.4.11",
+ "description": "replaceValue is \"$11\" + 15",
+ "test": "var __str = 'uid=31';\nvar __re = /(uid=)(\\d+)/;\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__str.replace(__re, \"$11\" + 15)!=='uid=115') {\n $ERROR('#1: var __str = \\'uid=31\\'; var __re = /(uid=)(\\d+)/; __str.replace(__re, \"$11\" + 15)===\\'uid=115\\'. Actual: '+__str.replace(__re, \"$11\" + 15));\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.11_A3_T1"
+ },
+ {
+ "section": "15.5.4.11",
+ "description": "replaceValue is \"$11\" + '15'",
+ "test": "var __str = 'uid=31';\nvar __re = /(uid=)(\\d+)/;\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__str.replace(__re, \"$11\" + '15')!=='uid=115') {\n $ERROR('#1: var __str = \\'uid=31\\'; var __re = /(uid=)(\\d+)/; __str.replace(__re, \"$11\" + \\'15\\')===\\'uid=115\\'. Actual: '+__str.replace(__re, \"$11\" + '15'));\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.11_A3_T2"
+ },
+ {
+ "section": "15.5.4.11",
+ "description": "replaceValue is \"$11\" + 'A15'",
+ "test": "var __str = 'uid=31';\nvar __re = /(uid=)(\\d+)/;\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__str.replace(__re, \"$11\" + 'A15')!=='uid=1A15' ) {\n $ERROR('#1: var __str = \\'uid=31\\'; var __re = /(uid=)(\\d+)/; __str.replace(__re, \"$11\" + \\'A15\\')===\\'uid=1A15\\' . Actual: '+__str.replace(__re, \"$11\" + 'A15'));\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.11_A3_T3"
+ },
+ {
+ "section": "15.5.4.11",
+ "description": "searchValue is /([a-z]+)([0-9]+)/",
+ "test": "var __str = \"abc12 def34\";\nvar __pattern = /([a-z]+)([0-9]+)/;\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__str.replace(__pattern, __replFN)!=='12abc def34') {\n $ERROR('#1: var __str = \"abc12 def34\"; var __pattern = /([a-z]+)([0-9]+)/; function __replFN() {return arguments[2] + arguments[1];}; __str.replace(__pattern, __replFN)===\\'12abc def34\\'. Actual: '+__str.replace(__pattern, __replFN));\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n \nfunction __replFN() {\n return arguments[2] + arguments[1];\n}\n",
+ "id": "S15.5.4.11_A4_T1"
+ },
+ {
+ "section": "15.5.4.11",
+ "description": "searchValue is /([a-z]+)([0-9]+)/g",
+ "test": "var __str = \"abc12 def34\";\nvar __pattern = /([a-z]+)([0-9]+)/g;\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__str.replace(__pattern, __replFN)!=='12abc 34def') {\n $ERROR('#1: var __str = \"abc12 def34\"; var __pattern = /([a-z]+)([0-9]+)/g; function __replFN() {return arguments[2] + arguments[1];}; __str.replace(__pattern, __replFN)===\\'12abc 34def\\'. Actual: '+__str.replace(__pattern, __replFN));\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n \nfunction __replFN() {\n return arguments[2] + arguments[1];\n}\n",
+ "id": "S15.5.4.11_A4_T2"
+ },
+ {
+ "section": "15.5.4.11",
+ "description": "searchValue is /([a-z]+)([0-9]+)/i",
+ "test": "var __str = \"aBc12 def34\";\nvar __pattern = /([a-z]+)([0-9]+)/i;\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__str.replace(__pattern, __replFN)!=='12aBc def34') {\n $ERROR('#1: var __str = \"aBc12 def34\"; var __pattern = /([a-z]+)([0-9]+)/i; function __replFN() {return arguments[2] + arguments[1];}; __str.replace(__pattern, __replFN)===\\'12aBc def34\\'. Actual: '+__str.replace(__pattern, __replFN));\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n \nfunction __replFN() {\n return arguments[2] + arguments[1];\n}\n",
+ "id": "S15.5.4.11_A4_T3"
+ },
+ {
+ "section": "15.5.4.11",
+ "description": "searchValue is /([a-z]+)([0-9]+)/ig",
+ "test": "var __str = \"aBc12 dEf34\";\nvar __pattern = /([a-z]+)([0-9]+)/ig;\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__str.replace(__pattern, __replFN)!=='12aBc 34dEf') {\n $ERROR('#1: var __str = \"aBc12 dEf34\"; var __pattern = /([a-z]+)([0-9]+)/ig; function __replFN() {return arguments[2] + arguments[1];}; __str.replace(__pattern, __replFN)===\\'12aBc 34dEf\\'. Actual: '+__str.replace(__pattern, __replFN));\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n \nfunction __replFN() {\n return arguments[2] + arguments[1];\n}\n",
+ "id": "S15.5.4.11_A4_T4"
+ },
+ {
+ "section": "15.5.4.11",
+ "description": "searchValue is regexp /^(a+)\\1*,\\1+$/ and replaceValue is \"$1\"",
+ "test": "var __str = \"aaaaaaaaaa,aaaaaaaaaaaaaaa\";\nvar __pattern = /^(a+)\\1*,\\1+$/;\nvar __repl = \"$1\";\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__str.replace(__pattern, __repl)!=='aaaaa') {\n $ERROR('#1: var __str = \"aaaaaaaaaa,aaaaaaaaaaaaaaa\"; var __pattern = /^(a+)\\1*,\\1+$/; var __repl = \"$1\"; __str.replace(__pattern, __repl)===\\'aaaaa\\'. Actual: '+__str.replace(__pattern, __repl));\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.11_A5_T1"
+ },
+ {
+ "section": "15.5.4.11, 13.2",
+ "description": ": Checking String.prototype.replace.prototype;",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (String.prototype.replace.prototype !== undefined) {\n $ERROR('#1: String.prototype.replace.prototype === undefined. Actual: '+String.prototype.replace.prototype );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.11_A6"
+ },
+ {
+ "section": "15.5.4.11, 13.2",
+ "description": "Checking if creating the String.prototype.replace object fails",
+ "test": "var __FACTORY = String.prototype.replace;\n\ntry {\n var __instance = new __FACTORY;\n $FAIL('#1: __FACTORY = String.prototype.replace; \"__instance = new __FACTORY\" lead to throwing exception');\n} catch (e) {}\n",
+ "id": "S15.5.4.11_A7"
+ },
+ {
+ "section": "15.5.4.11",
+ "description": "Checking if enumerating the String.prototype.replace.length property fails",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#0\nif (!(String.prototype.replace.hasOwnProperty('length'))) {\n $FAIL('#0: String.prototype.replace.hasOwnProperty(\\'length\\') return true. Actual: '+String.prototype.replace.hasOwnProperty('length'));\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n\n//////////////////////////////////////////////////////////////////////////////\n// CHECK#1\nif (String.prototype.replace.propertyIsEnumerable('length')) {\n $ERROR('#1: String.prototype.replace.propertyIsEnumerable(\\'length\\') return false');\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n// CHECK#2\ncount=0;\n\nfor (p in String.prototype.replace){\n if (p===\"length\") count++;\n}\n\nif (count !== 0) {\n $ERROR('#2: count=0; for (p in String.prototype.replace){if (p===\"length\") count++;} count === 0. Actual: '+count );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.11_A8"
+ },
+ {
+ "section": "15.5.4.11",
+ "description": "Checking if deleting the String.prototype.replace.length property fails",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#0\nif (!(String.prototype.replace.hasOwnProperty('length'))) {\n $FAIL('#0: String.prototype.replace.hasOwnProperty(\\'length\\') return true. Actual: '+String.prototype.replace.hasOwnProperty('length'));\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (delete String.prototype.replace.length) {\n $ERROR('#1: delete String.prototype.replace.length return false');\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (!(String.prototype.replace.hasOwnProperty('length'))) {\n $FAIL('#2: delete String.prototype.replace.length; String.prototype.replace.hasOwnProperty(\\'length\\') return true. Actual: '+String.prototype.replace.hasOwnProperty('length'));\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.11_A9"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.5.4.12_String.prototype.search.json b/website/resources/scripts/testcases2/15.5.4.12_String.prototype.search.json
new file mode 100644
index 000000000..307c23814
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.5.4.12_String.prototype.search.json
@@ -0,0 +1,188 @@
+{
+ "testCollection": {
+ "name": "15.5.4.12_String.prototype.search",
+ "numTests": 30,
+ "tests": [
+ {
+ "section": "15.5.4.12",
+ "description": "Call search() is the same search(undefined)",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nvar x = \"\".search();\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.12_A1.1_T1"
+ },
+ {
+ "section": "15.5.4.12",
+ "description": "Checking if varying the String.prototype.search.length property fails",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (!(String.prototype.search.hasOwnProperty('length'))) {\n $FAIL('#1: String.prototype.search.hasOwnProperty(\\'length\\') return true. Actual: '+String.prototype.search.hasOwnProperty('length'));\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\nvar __obj = String.prototype.search.length;\n\nString.prototype.search.length = function(){return \"shifted\";};\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (String.prototype.search.length !== __obj) {\n $ERROR('#2: __obj = String.prototype.search.length; String.prototype.search.length = function(){return \"shifted\";}; String.prototype.search.length === __obj. Actual: '+String.prototype.search.length );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.12_A10"
+ },
+ {
+ "section": "15.5.4.12",
+ "description": "Checking String.prototype.search.length",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (!(String.prototype.search.hasOwnProperty(\"length\"))) {\n $ERROR('#1: String.prototype.search.hasOwnProperty(\"length\") return true. Actual: '+String.prototype.search.hasOwnProperty(\"length\"));\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (String.prototype.search.length !== 1) {\n $ERROR('#2: String.prototype.search.length === 1. Actual: '+String.prototype.search.length );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.12_A11"
+ },
+ {
+ "section": "15.5.4.12",
+ "description": "Argument is true, and instance is object",
+ "test": "var __instance = new Object(true);\n\n__instance.search = String.prototype.search;\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__instance.search(true) !== 0) {\n $ERROR('#1: __instance = new Object(true); __instance.search = String.prototype.search; __instance.search(true) === 0. Actual: '+__instance.search(true) );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.12_A1_T1"
+ },
+ {
+ "section": "15.5.4.12",
+ "description": "Argument is object, and instance is string.\nObject with overrided toString function",
+ "test": "var __obj = {toString:function(){return \"\\u0041B\";}};\nvar __str = \"ssABB\\u0041BABAB\";\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nwith(__str){\n if (search(__obj) !==2) {\n $ERROR('#1: var __obj = {toString:function(){return \"\\u0041B\";}}; var __str = \"ssABB\\u0041BABAB\"; search(__obj) ===2. Actual: '+search(__obj) );\n }\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\nvar x;\n",
+ "id": "S15.5.4.12_A1_T10"
+ },
+ {
+ "section": "15.5.4.12",
+ "description": "Argument is object, and instance is string.\nObject with overrided toString function, that throw exception",
+ "test": "var __obj = {toString:function(){throw \"intostr\";}}\nvar __str = {str__:\"ABB\\u0041BABAB\"};\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nwith(__str){\n with(str__){\n try {\n var x = search(__obj);\n $FAIL('#1: var x = search(__obj) lead to throwing exception');\n } catch (e) {\n if (e!==\"intostr\") {\n $ERROR('#1.1: Exception === \"intostr\". Actual: '+e);\n }\n }\n }\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.12_A1_T11"
+ },
+ {
+ "section": "15.5.4.12",
+ "description": "Argument is object, and instance is string.\nObject with overrided toString and valueOf functions, valueOf throw exception",
+ "test": "var __obj = {toString:function(){return {};},valueOf:function(){throw \"intostr\";}}\nvar __str = new String(\"ABB\\u0041BABAB\");\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nwith(__str){\n try {\n var x = search(__obj);\n $FAIL('#1: var x = search(__obj) lead to throwing exception');\n } catch (e) {\n if (e!==\"intostr\") {\n $ERROR('#1.1: Exception === \"intostr\". Actual: '+e);\n }\n }\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.12_A1_T12"
+ },
+ {
+ "section": "15.5.4.12",
+ "description": "Argument is object, and instance is string.\nObject with overrided toString and valueOf functions",
+ "test": "var __obj = {toString:function(){return {};},valueOf:function(){return 1;}}\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (\"ABB\\u0041B\\u0031ABAB\\u0031BBAA\".search(__obj) !==5) {\n $ERROR('#1: var __obj = {toString:function(){return {};},valueOf:function(){return 1;}}; \"ABB\\\\u0041B\\\\u0031ABAB\\\\u0031BBAA\".search(__obj) ===5. Actual: '+(\"ABB\\u0041B\\u0031ABAB\\u0031BBAA\".search(__obj)) );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.12_A1_T13"
+ },
+ {
+ "section": "15.5.4.12",
+ "description": "Instance is string, argument is regular expression",
+ "test": "var __reg = new RegExp(\"77\");\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (\"ABB\\u0041BABAB\\u0037\\u0037BBAA\".search(__reg) !== 9) {\n $ERROR('#1: var __reg = new RegExp(\"77\"); \"ABB\\\\u0041BABAB\\\\u0037\\\\u0037BBAA\".search(__reg) === 9. Actual: '+(\"ABB\\u0041BABAB\\u0037\\u0037BBAA\".search(__reg)) );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.12_A1_T14"
+ },
+ {
+ "section": "15.5.4.12",
+ "description": "Argument is function call, and instance is Boolean",
+ "test": "var __instance = new Boolean;\n\n__instance.search = String.prototype.search;\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__instance.search(function(){return false;}()) !== 0) {\n $ERROR('#1: __instance = new Boolean; __instance.search = String.prototype.search; __instance.search(function(){return false;}()) === 0. Actual: '+__instance.search(function(){return false;}()) );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.12_A1_T2"
+ },
+ {
+ "section": "15.5.4.12",
+ "description": "Checking by using eval",
+ "test": "var search = String.prototype.search;\n\nif (typeof toString === \"undefined\"){\n var toString = Object.prototype.toString;\n}\n\nvar __class__ = toString();\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (search(eval(\"\\\"bj\\\"\")) !== 2) {\n $ERROR('#1: search = String.prototype.search; search(eval(\"\\\\\"bj\\\\\"\")) === 2. Actual: '+search(eval(\"\\\"bj\\\"\")) );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.12_A1_T3"
+ },
+ {
+ "section": "15.5.4.12",
+ "description": "Call search (regexp) without arguments",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\n//since ToString() evaluates to \"\" search() evaluates to search(\"\")\nif (\"\".search() !== 0) {\n $ERROR('#1: \"\".search() === 0. Actual: '+(\"\".search()) );\n}\n\nif (\"--undefined--\".search() != 0) {\n $ERROR('#1: \"--undefined--\".search() === 0. Actual: '+(\"--undefined--\".search()) );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.12_A1_T4"
+ },
+ {
+ "section": "15.5.4.12",
+ "description": "Argument is null, and instance is function call, that return string",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\n//since ToString(null) evaluates to \"null\" search(null) evaluates to search(\"null\")\nif (function(){return \"gnulluna\"}().search(null) !== 1) {\n $ERROR('#1: function(){return \"gnulluna\"}().search(null) === 1. Actual: '+function(){return \"gnulluna\"}().search(null) );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.12_A1_T5"
+ },
+ {
+ "section": "15.5.4.12",
+ "description": "Argument is x, and instance is new String, x is undefined variable",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\n//since ToString(undefined) evaluates to \"undefined\" search(undefined) evaluates to search(\"undefined\")\nif (new String(\"undefined\").search(x) !== 0) {\n $ERROR('#1: var x; new String(\"undefined\").search(x) === 0. Actual: '+new String(\"undefined\").search(x) );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\nvar x;\n",
+ "id": "S15.5.4.12_A1_T6"
+ },
+ {
+ "section": "15.5.4.12",
+ "description": "Argument is undefined, and instance is new String",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\n//since ToString(undefined) evaluates to \"undefined\" search(undefined) evaluates to search(\"undefined\")\nif (String(\"undefined\").search(undefined) !== 0) {\n $ERROR('#1: String(\"undefined\").search(undefined) === 0. Actual: '+String(\"undefined\").search(undefined) );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.12_A1_T7"
+ },
+ {
+ "section": "15.5.4.12",
+ "description": "Argument is void 0, and instance is String object with overrided toString function",
+ "test": "var __obj = {toString:function(){}};\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\n//since ToString(void 0) evaluates to \"undefined\" search(void 0) evaluates to search(\"undefined\")\nif (String(__obj).search(void 0) !== 0) {\n $ERROR('#1: __obj = {toString:function(){}}; String(__obj).search(void 0) === 0. Actual: '+String(__obj).search(void 0) );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.12_A1_T8"
+ },
+ {
+ "section": "15.5.4.12",
+ "description": "Argument is function call, and instance is String object with overrided toString and valueOf functions",
+ "test": "var __obj = {\n valueOf:function(){},\n toString:void 0\n};\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\n//since ToString(undefined) evaluates to \"undefined\" search(undefined) evaluates to search(\"undefined\")\nif (new String(__obj).search(function(){}()) !== 0) {\n $ERROR('#1: __obj = {valueOf:function(){}, toString:void 0}; new String(__obj).search(function(){}()) === 0. Actual: '+new String(__obj).search(function(){}()) );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.12_A1_T9"
+ },
+ {
+ "section": "15.5.4.12",
+ "description": "Simple search substring inside string",
+ "test": "var aString = new String(\"test string\");\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (aString.search(\"string\")!== 5) {\n $ERROR('#1: var aString = new String(\"test string\"); aString.search(\"string\")=== 5. Actual: '+aString.search(\"string\"));\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.12_A2_T1"
+ },
+ {
+ "section": "15.5.4.12",
+ "description": "Checking case sensitive of search, argument is string",
+ "test": "var aString = new String(\"test string\");\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (aString.search(\"String\")!== -1) {\n $ERROR('#1: var aString = new String(\"test string\"); aString.search(\"String\")=== -1. Actual: '+aString.search(\"String\"));\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.12_A2_T2"
+ },
+ {
+ "section": "15.5.4.12",
+ "description": "Checking disabling of case sensitive of search, argument is RegExp",
+ "test": "var aString = new String(\"test string\");\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (aString.search(/String/i)!== 5) {\n $ERROR('#1: var aString = new String(\"test string\"); aString.search(/String/i)=== 5. Actual: '+aString.search(/String/i));\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.12_A2_T3"
+ },
+ {
+ "section": "15.5.4.12",
+ "description": "Checking case sensitive of search, argument is RegExp with uppercase symbols",
+ "test": "var bString = new String(\"one two three four five\");\nvar regExp = /Four/;\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (bString.search(regExp)!== -1) {\n $ERROR('#1: var bString = new String(\"one two three four five\"); var regExp = /Four/; bString.search(regExp)=== -1. Actual: '+bString.search(regExp));\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.12_A2_T4"
+ },
+ {
+ "section": "15.5.4.12",
+ "description": "Checking case sensitive of search, argument is RegExp without uppercase symbols",
+ "test": "var bString = new String(\"one two three four five\");\nvar regExp = /four/;\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (bString.search(regExp)!== 14) {\n $ERROR('#1: var bString = new String(\"one two three four five\"); var regExp = /four/; bString.search(regExp)=== 14. Actual: '+bString.search(regExp));\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.12_A2_T5"
+ },
+ {
+ "section": "15.5.4.12",
+ "description": "Searching the non-existent \"notexist\" substring",
+ "test": "var aString = new String(\"test string\");\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (aString.search(\"notexist\")!== -1) {\n $ERROR('#1: var aString = new String(\"test string\"); aString.search(\"notexist\")=== -1. Actual: '+aString.search(\"notexist\"));\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.12_A2_T6"
+ },
+ {
+ "section": "15.5.4.12",
+ "description": "Simple search sentence inside string",
+ "test": "var aString = new String(\"test string probe\");\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (aString.search(\"string pro\")!== 5) {\n $ERROR('#1: var aString = new String(\"test string probe\"); aString.search(\"string pro\")=== 5. Actual: '+aString.search(\"string pro\"));\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.12_A2_T7"
+ },
+ {
+ "section": "15.5.4.12",
+ "description": "Checking results of search regexp with and without global properties",
+ "test": "var aString = new String(\"power of the power of the power of the power of the power of the power of the great sword\");\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (aString.search(/the/)!== aString.search(/the/g)) {\n $ERROR('#1: var aString = new String(\"power of the power of the power of the power of the power of the power of the great sword\"); aString.search(/the/)=== aString.search(/the/g). Actual: '+aString.search(/the/));\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.12_A3_T1"
+ },
+ {
+ "section": "15.5.4.12",
+ "description": "Checking results of search regexp with and without global properties. Unicode symbols used",
+ "test": "var aString = new String(\"power \\u006F\\u0066 the power of the power \\u006F\\u0066 the power of the power \\u006F\\u0066 the power of the great sword\");\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (aString.search(/of/)!== aString.search(/of/g)) {\n $ERROR('#1: var aString = new String(\"power \\\\u006F\\\\u0066 the power of the power \\\\u006F\\\\u0066 the power of the power \\\\u006F\\\\u0066 the power of the great sword\"); aString.search(/of/)=== aString.search(/of/g). Actual: '+aString.search(/of/));\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.12_A3_T2"
+ },
+ {
+ "section": "15.5.4.12, 13.2",
+ "description": "Checking String.prototype.search.prototype",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (String.prototype.search.prototype !== undefined) {\n $ERROR('#1: String.prototype.search.prototype === undefined. Actual: '+String.prototype.search.prototype );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.12_A6"
+ },
+ {
+ "section": "15.5.4.12, 13.2",
+ "description": "Checking if creating the String.prototype.search object fails",
+ "test": "var __FACTORY = String.prototype.search;\n\ntry {\n var __instance = new __FACTORY;\n $FAIL('#1: __FACTORY = String.prototype.search; \"__instance = new __FACTORY\" lead to throwing exception');\n} catch (e) {\n if ((e instanceof TypeError) !== true) {\n $ERROR('#1.1: __FACTORY = String.prototype.search; \"__instance = new __FACTORY\" throw a TypeError. Actual: ' + (e)); \n }\n $PRINT(e);\n}\n",
+ "id": "S15.5.4.12_A7"
+ },
+ {
+ "section": "15.5.4.12",
+ "description": "Checking if enumerating the String.prototype.search.length property fails",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#0\nif (!(String.prototype.search.hasOwnProperty('length'))) {\n $FAIL('#0: String.prototype.search.hasOwnProperty(\\'length\\') return true. Actual: '+String.prototype.search.hasOwnProperty('length'));\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n\n//////////////////////////////////////////////////////////////////////////////\n// CHECK#1\nif (String.prototype.search.propertyIsEnumerable('length')) {\n $ERROR('#1: String.prototype.search.propertyIsEnumerable(\\'length\\') return false');\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n// CHECK#2\nvar count=0;\n\nfor (p in String.prototype.search){\n if (p===\"length\") count++;\n}\n\nif (count !== 0) {\n $ERROR('#2: count=0; for (p in String.prototype.search){if (p===\"length\") count++;}; count === 0. Actual: '+count );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.12_A8"
+ },
+ {
+ "section": "15.5.4.12",
+ "description": "Checking if deleting the String.prototype.search.length property fails",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#0\nif (!(String.prototype.search.hasOwnProperty('length'))) {\n $FAIL('#0: String.prototype.search.hasOwnProperty(\\'length\\') return true. Actual: '+String.prototype.search.hasOwnProperty('length'));\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (delete String.prototype.search.length) {\n $ERROR('#1: delete String.prototype.search.length return false');\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (!(String.prototype.search.hasOwnProperty('length'))) {\n $FAIL('#2: delete String.prototype.search.length; String.prototype.search.hasOwnProperty(\\'length\\') return true. Actual: '+String.prototype.search.hasOwnProperty('length'));\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.12_A9"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.5.4.13_String.prototype.slice.json b/website/resources/scripts/testcases2/15.5.4.13_String.prototype.slice.json
new file mode 100644
index 000000000..08fa5f700
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.5.4.13_String.prototype.slice.json
@@ -0,0 +1,212 @@
+{
+ "testCollection": {
+ "name": "15.5.4.13_String.prototype.slice",
+ "numTests": 34,
+ "tests": [
+ {
+ "section": "15.5.4.13",
+ "description": "Checking if varying the String.prototype.slice.length property fails",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (!(String.prototype.slice.hasOwnProperty('length'))) {\n $FAIL('#1: String.prototype.slice.hasOwnProperty(\\'length\\') return true. Actual: '+String.prototype.slice.hasOwnProperty('length'));\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\nvar __obj = String.prototype.slice.length;\n\nString.prototype.slice.length = function(){return \"shifted\";};\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (String.prototype.slice.length !== __obj) {\n $ERROR('#2: __obj = String.prototype.slice.length; String.prototype.slice.length = function(){return \"shifted\";}; String.prototype.slice.length === __obj. Actual: '+String.prototype.slice.length );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.13_A10"
+ },
+ {
+ "section": "15.5.4.13",
+ "description": "Checking String.prototype.slice.length",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (!(String.prototype.slice.hasOwnProperty(\"length\"))) {\n $ERROR('#1: String.prototype.slice.hasOwnProperty(\"length\") return true. Actual: '+String.prototype.slice.hasOwnProperty(\"length\"));\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (String.prototype.slice.length !== 2) {\n $ERROR('#2: String.prototype.slice.length === 2. Actual: '+String.prototype.slice.length );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.13_A11"
+ },
+ {
+ "section": "15.5.4.13",
+ "description": "Arguments are false and true, and instance is object",
+ "test": "var __instance = new Object(true);\n\n__instance.slice = String.prototype.slice;\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__instance.slice(false, true) !== \"t\") {\n $ERROR('#1: __instance = new Object(true); __instance.slice = String.prototype.slice; __instance.slice(false, true) === \"t\". Actual: '+__instance.slice(false, true) );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.13_A1_T1"
+ },
+ {
+ "section": "15.5.4.13",
+ "description": "Arguments are object and function call, and instance is String, object have overrided valueOf function",
+ "test": "var __obj = {valueOf:function(){return 2;}};\n\nvar __str = \"\\u0035ABBBABAB\";\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nwith(__str){\n if (slice(__obj, function(){return slice(0,1);}()) !== \"BBB\") {\n $ERROR('#1: var x; var __obj = {valueOf:function(){return 2;}}; var __str = \"\\u0035ABBBABAB\"; slice(__obj, function(){return slice(0,1);}()) === \"BBB\". Actual: '+slice(__obj, function(){return slice(0,1);}()) );\n }\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\nvar x;\n",
+ "id": "S15.5.4.13_A1_T10"
+ },
+ {
+ "section": "15.5.4.13",
+ "description": "Arguments are objects, and instance is string, objects have overrided valueOf function, that return exception",
+ "test": "var __obj = {valueOf:function(){throw \"instart\";}};\nvar __obj2 = {valueOf:function(){throw \"inend\";}};\nvar __str = {str__:\"ABB\\u0041BABAB\"};\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nwith(__str){\n with(str__){\n try {\n var x = slice(__obj,__obj2);\n $FAIL('#1: \"var x = slice(__obj,__obj2)\" lead to throwing exception');\n } catch (e) {\n if (e!==\"instart\") {\n $ERROR('#1.1: Exception === \"instart\". Actual: '+e);\n }\n }\n }\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.13_A1_T11"
+ },
+ {
+ "section": "15.5.4.13",
+ "description": "Arguments are objects, and instance is string.\nFirst object have overrided valueOf function and toString function, that return exception.\nSecond object have overrided valueOf function, that return exception",
+ "test": "var __obj = {valueOf:function(){return {};}, toString:function(){throw \"instart\";}};\nvar __obj2 = {valueOf:function(){throw \"inend\";}};\nvar __str = new String(\"ABB\\u0041BABAB\");\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nwith(__str){\n try {\n var x = slice(__obj, __obj2);\n $FAIL('#1: \"var x = slice(__obj,__obj2)\" lead to throwing exception');\n } catch (e) {\n if (e!==\"instart\") {\n $ERROR('#1.1: Exception === \"instart\". Actual: '+e);\n }\n }\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.13_A1_T12"
+ },
+ {
+ "section": "15.5.4.13",
+ "description": "Arguments are objects, and instance is string.\nFirst object have overrided valueOf and toString functions.\nSecond object have overrided toString function, that return exception",
+ "test": "var __obj = {valueOf:function(){return {};}, toString:function(){return 1;}};\nvar __obj2 = {toString:function(){throw \"inend\";}};\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\ntry {\n var x = \"ABB\\u0041BABAB\\u0031BBAA\".slice(__obj, __obj2);\n $FAIL('#1: \"var x = slice(__obj,__obj2)\" lead to throwing exception');\n} catch (e) {\n if (e!==\"inend\") {\n $ERROR('#1.1: Exception === \"inend\". Actual: '+e);\n }\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n",
+ "id": "S15.5.4.13_A1_T13"
+ },
+ {
+ "section": "15.5.4.13",
+ "description": "Used one argument, that is function(){}(). Instance is string",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (\"report\".slice(function(){}()) !== \"report\") {\n $ERROR('#1: \"report\".slice(function(){}()) === \"report\". Actual: '+\"report\".slice(function(){}()) );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.13_A1_T14"
+ },
+ {
+ "section": "15.5.4.13",
+ "description": "Call slice without arguments. Instance is Number with prototype.slice = String.prototype.slice",
+ "test": "var __num = 11.001002;\n\nNumber.prototype.slice = String.prototype.slice;\n\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__num.slice()!==\"11.001002\") {\n $ERROR('#1: var __num = 11.001002; Number.prototype.slice = String.prototype.slice; __num.slice()===\"11.001002\". Actual: '+__num.slice());\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.13_A1_T15"
+ },
+ {
+ "section": "15.5.4.13",
+ "description": "Arguments are function call and x, and instance is Boolean. x is undefined variable",
+ "test": "var __instance = new Boolean;\n\n__instance.slice = String.prototype.slice;\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__instance.slice(function(){return true;}(),x) !== \"alse\") {\n $ERROR('#1: var x; __instance = new Boolean; __instance.slice = String.prototype.slice; __instance.slice(function(){return true;}(),x) === \"alse\". Actual: '+__instance.slice(function(){return true;}(),x) );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\nvar x;\n",
+ "id": "S15.5.4.13_A1_T2"
+ },
+ {
+ "section": "15.5.4.13",
+ "description": "Checking by using eval",
+ "test": "var slice = String.prototype.slice;\n\nif (typeof toString === \"undefined\"){\n toString = Object.prototype.toString;\n}\n\nvar __class__ = toString();\nvar __toggle = 1;\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (slice(eval(\"\\\"1\\\"\"),{valueOf:function(){return \"0x0007\"}})!==\"object\") {\n $ERROR('#1: slice = String.prototype.slice; slice(eval(\"\\\\\"1\\\\\"\"),{valueOf:function(){return \"0x0007\"}})===\"object\". Actual: '+slice(eval(\"\\\"1\\\"\"),{valueOf:function(){return \"0x0007\"}}));\n};\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.13_A1_T3"
+ },
+ {
+ "section": "15.5.4.13",
+ "description": "Arguments are null and number, and instance is function call, that returned string",
+ "test": "//since ToInteger(null) yelds 0\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (function(){return \"gnulluna\"}().slice(null, -3) !== \"gnull\") {\n $ERROR('#1: function(){return \"gnulluna\"}().slice(null, -3) === \"gnull\". Actual: '+function(){return \"gnulluna\"}().slice(null, -3) );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.13_A1_T4"
+ },
+ {
+ "section": "15.5.4.13",
+ "description": "Arguments are null and call other slice(start, end), and instance is function object, that have overrided valueOf and toString functions",
+ "test": "__func.valueOf=function(){return \"gnulluna\"};\n__func.toString=function(){return __func;};\n\nFunction.prototype.slice=String.prototype.slice;\n\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__func.slice(null, Function().slice(__func,5).length) !== \"gnull\") {\n $ERROR('#1: __func.slice(null, Function().slice(__func,5).length) === \"gnull\". Actual: '+__func.slice(null, Function().slice(__func,5).length) );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\nfunction __func(){};\n",
+ "id": "S15.5.4.13_A1_T5"
+ },
+ {
+ "section": "15.5.4.13",
+ "description": "Arguments are x and number, and instance is new String, x is undefined variable",
+ "test": "//since ToInteger(undefined yelds 0)\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (new String(\"undefined\").slice(x,3) !== \"und\") {\n $ERROR('#1: var x; new String(\"undefined\").slice(x,3) === \"und\". Actual: '+new String(\"undefined\").slice(x,3) );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\nvar x;\n",
+ "id": "S15.5.4.13_A1_T6"
+ },
+ {
+ "section": "15.5.4.13",
+ "description": "Arguments are symbol and undefined, and instance is String",
+ "test": "//since ToInteger(\"e\") yelds 0\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (String(void 0).slice(\"e\",undefined) !== \"undefined\") {\n $ERROR('#1: String(void 0).slice(\"e\",undefined) === \"undefined\". Actual: '+String(void 0).slice(\"e\",undefined) );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.13_A1_T7"
+ },
+ {
+ "section": "15.5.4.13",
+ "description": "Arguments are negative number and void 0, and instance is String(object), object have overrided toString function",
+ "test": "__obj = {toString:function(){}};\n\n//since void 0 yelds 0\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (String(__obj).slice(-4,void 0) !== \"ined\") {\n $ERROR('#1: __obj = {toString:function(){}}; String(__obj).slice(-4,void 0) === \"ined\". Actual: '+String(__obj).slice(-4,void 0) );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.13_A1_T8"
+ },
+ {
+ "section": "15.5.4.13",
+ "description": "Arguments are undefined and object, and instance is String(object), object have overrided valueOf and toString functions",
+ "test": "var __obj = {\n valueOf:function(){},\n toString:void 0\n};\n\n//since ToInteger(undefined) yelds 0\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (new String(__obj).slice(/*(function(){})()*/undefined,__obj) !== \"\") {\n $ERROR('#1: __obj = {valueOf:function(){}, toString:void 0}; new String(__obj).slice(//*(function(){})()*//undefined,__obj) === \"\". Actual: '+new String(__obj).slice(/*(function(){})()*/undefined,__obj) );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.13_A1_T9"
+ },
+ {
+ "section": "15.5.4.13",
+ "description": "Checking type of slice()",
+ "test": "var __string = new String(\"this is a string object\");\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (typeof __string.slice() !== \"string\") {\n $ERROR('#1: __string = new String(\"this is a string object\"); typeof __string.slice() === \"string\". Actual: '+typeof __string.slice() );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.13_A2_T1"
+ },
+ {
+ "section": "15.5.4.13",
+ "description": "start is NaN, end is Infinity",
+ "test": "var __string = new String('this is a string object');\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__string.slice(NaN, Infinity) !== \"this is a string object\") {\n $ERROR('#1: __string = new String(\\'this is a string object\\'); __string.slice(NaN, Infinity) === \"this is a string object\". Actual: '+__string.slice(NaN, Infinity) );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.13_A2_T2"
+ },
+ {
+ "section": "15.5.4.13",
+ "description": "Call slice from empty String object",
+ "test": "var __string = new String(\"\");\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__string.slice(1,0) !== \"\") {\n $ERROR('#1: __string = new String(\"\"); __string.slice(1,0) === \"\". Actual: '+__string.slice(1,0) );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.13_A2_T3"
+ },
+ {
+ "section": "15.5.4.13",
+ "description": "start is Infinity, end is NaN",
+ "test": "var __string = new String(\"this is a string object\");\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__string.slice(Infinity, NaN) !== \"\") {\n $ERROR('#1: __string = new String(\"this is a string object\"); __string.slice(Infinity, NaN) === \"\". Actual: '+__string.slice(Infinity, NaN) );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.13_A2_T4"
+ },
+ {
+ "section": "15.5.4.13",
+ "description": "start is Infinity, end is Infinity",
+ "test": "var __string = new String(\"this is a string object\");\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__string.slice(Infinity, Infinity) !== \"\") {\n $ERROR('#1: __string = new String(\"this is a string object\"); __string.slice(Infinity, Infinity) === \"\". Actual: '+__string.slice(Infinity, Infinity) );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.13_A2_T5"
+ },
+ {
+ "section": "15.5.4.13",
+ "description": "start is negative float number, end is 0",
+ "test": "var __string = new String(\"this is a string object\");\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__string.slice(-0.01,0) !== \"\") {\n $ERROR('#1: __string = new String(\"this is a string object\"); __string.slice(-0.01,0) === \"\". Actual: '+__string.slice(-0.01,0) );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.13_A2_T6"
+ },
+ {
+ "section": "15.5.4.13",
+ "description": "start is tested_string.length, end is tested_string.length",
+ "test": "var __string = new String(\"this is a string object\");\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__string.slice(__string.length, __string.length) !== \"\") {\n $ERROR('#1: __string = new String(\"this is a string object\"); __string.slice(__string.length, __string.length) === \"\". Actual: '+__string.slice(__string.length, __string.length) );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.13_A2_T7"
+ },
+ {
+ "section": "15.5.4.13",
+ "description": "start is tested_string.length+1, end is 0",
+ "test": "var __string = new String(\"this is a string object\");\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__string.slice(__string.length+1, 0) !== \"\") {\n $ERROR('#1: __string = new String(\"this is a string object\"); __string.slice(__string.length+1, 0) === \"\". Actual: '+__string.slice(__string.length+1, 0) );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.13_A2_T8"
+ },
+ {
+ "section": "15.5.4.13",
+ "description": "start is -Infinity, end is -Infinity",
+ "test": "var __string = new String(\"this is a string object\");\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__string.slice(-Infinity, -Infinity) !== \"\") {\n $ERROR('#1: __string = new String(\"this is a string object\"); __string.slice(-Infinity, -Infinity) === \"\". Actual: '+__string.slice(-Infinity, -Infinity) );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.13_A2_T9"
+ },
+ {
+ "section": "15.5.4.13",
+ "description": "Apply String.prototype.slice to Object instance",
+ "test": "var __instance = new Object();\n\n__instance.slice = String.prototype.slice;\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__instance.slice(0,8) !== \"[object \") {\n $ERROR('#1: __instance = new Object(); __instance.slice = String.prototype.slice; __instance.slice(0,8) === \"[object \". Actual: '+__instance.slice(0,8) );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.13_A3_T1"
+ },
+ {
+ "section": "15.5.4.13",
+ "description": "Apply String.prototype.slice to Object instance, use other value for start and end values",
+ "test": "var __instance = new Object();\n\n__instance.slice = String.prototype.slice;\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__instance.slice(8,__instance.toString().length) !== \"Object]\") {\n $ERROR('#1: __instance = new Object(); __instance.slice = String.prototype.slice; __instance.slice(8,__instance.toString().length) === \"Object]\". Actual: '+__instance.slice(8,__instance.toString().length) );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.13_A3_T2"
+ },
+ {
+ "section": "15.5.4.13",
+ "description": "Apply String.prototype.slice to Object instance, and call instance.slice(...).slice(...)",
+ "test": "var __instance = function(){};\n\n__instance.slice = String.prototype.slice;\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__instance.slice(-Infinity,8).slice(1,Infinity) !== \"unction\") {\n $ERROR('#1: __instance = function(){}; __instance.slice = String.prototype.slice; __instance.slice(-Infinity,8).slice(1,Infinity) === \"unction\". Actual: '+__instance.slice(-Infinity,8).slice(1,Infinity) );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.13_A3_T3"
+ },
+ {
+ "section": "15.5.4.13",
+ "description": "Checknig if applying String.prototype.slice to Function object instance passes",
+ "test": "__FACTORY.prototype.toString = function() { return this.value+''; };\n\nvar __instance = new __FACTORY(void 0);\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__instance.slice(0,100) !== \"undefined\") {\n $ERROR('#1: __instance.slice(0,100) === \"undefined\". Actual: '+__instance.slice(0,100) );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\nfunction __FACTORY( value ) {\n this.value = value,\n this.slice= String.prototype.slice;\n //this.substring = String.prototype.substring;\n}\n",
+ "id": "S15.5.4.13_A3_T4"
+ },
+ {
+ "section": "15.5.4.13, 13.2",
+ "description": "Checking String.prototype.slice.prototype",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (String.prototype.slice.prototype !== undefined) {\n $ERROR('#1: String.prototype.slice.prototype === undefined. Actual: '+String.prototype.slice.prototype );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.13_A6"
+ },
+ {
+ "section": "15.5.4.13, 13.2",
+ "description": "Checking if creating the String.prototype.slice object fails",
+ "test": "var __FACTORY = String.prototype.slice;\n\ntry {\n var __instance = new __FACTORY;\n $FAIL('#1: __FACTORY = String.prototype.slice; \"__instance = new __FACTORY\" lead to throwing exception');\n} catch (e) {\n $PRINT(e);\n}\n",
+ "id": "S15.5.4.13_A7"
+ },
+ {
+ "section": "15.5.4.13",
+ "description": "Checking if enumerating the String.prototype.slice.length property fails",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#0\nif (!(String.prototype.slice.hasOwnProperty('length'))) {\n $FAIL('#0: String.prototype.slice.hasOwnProperty(\\'length\\') return true. Actual: '+String.prototype.slice.hasOwnProperty('length'));\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n\n//////////////////////////////////////////////////////////////////////////////\n// CHECK#1\nif (String.prototype.slice.propertyIsEnumerable('length')) {\n $ERROR('#1: String.prototype.slice.propertyIsEnumerable(\\'length\\') return false');\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n// CHECK#2\nvar count=0;\n\nfor (p in String.prototype.slice){\n if (p===\"length\") count++;\n}\n\nif (count !== 0) {\n $ERROR('#2: count=0; for (p in String.prototype.slice){if (p===\"length\") count++;}; count === 0. Actual: '+count );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.13_A8"
+ },
+ {
+ "section": "15.5.4.13",
+ "description": "Checking if deleting the String.prototype.slice.length property fails",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#0\nif (!(String.prototype.slice.hasOwnProperty('length'))) {\n $FAIL('#0: String.prototype.slice.hasOwnProperty(\\'length\\') return true. Actual: '+String.prototype.slice.hasOwnProperty('length'));\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (delete String.prototype.slice.length) {\n $ERROR('#1: delete String.prototype.slice.length return false');\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (!(String.prototype.slice.hasOwnProperty('length'))) {\n $FAIL('#2: delete String.prototype.slice.length; String.prototype.slice.hasOwnProperty(\\'length\\') return true. Actual: '+String.prototype.slice.hasOwnProperty('length'));\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.13_A9"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.5.4.14_String.prototype.split.json b/website/resources/scripts/testcases2/15.5.4.14_String.prototype.split.json
new file mode 100644
index 000000000..2ca1dff43
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.5.4.14_String.prototype.split.json
@@ -0,0 +1,626 @@
+{
+ "testCollection": {
+ "name": "15.5.4.14_String.prototype.split",
+ "numTests": 103,
+ "tests": [
+ {
+ "section": "15.5.4.14",
+ "description": "Checking if varying the String.prototype.split.length property fails",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (!(String.prototype.split.hasOwnProperty('length'))) {\n $FAIL('#1: String.prototype.split.hasOwnProperty(\\'length\\') return true. Actual: '+String.prototype.split.hasOwnProperty('length'));\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\nvar __obj = String.prototype.split.length;\n\nString.prototype.split.length = function(){return \"shifted\";};\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (String.prototype.split.length !== __obj) {\n $ERROR('#2: __obj = String.prototype.split.length; String.prototype.split.length = function(){return \"shifted\";}; String.prototype.split.length === __obj. Actual: '+String.prototype.split.length );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.14_A10"
+ },
+ {
+ "section": "15.5.4.14",
+ "description": "Checking String.prototype.split.length",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (!(String.prototype.split.hasOwnProperty(\"length\"))) {\n $ERROR('#1: String.prototype.split.hasOwnProperty(\"length\") return true. Actual: '+String.prototype.split.hasOwnProperty(\"length\"));\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (String.prototype.split.length !== 2) {\n $ERROR('#2: String.prototype.split.length === 2. Actual: '+String.prototype.split.length );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.14_A11"
+ },
+ {
+ "section": "15.5.4.14",
+ "description": "Arguments are false and true, and instance is object",
+ "test": "var __instance = new Object(true);\n\n__instance.split = String.prototype.split;\n\nvar __split = __instance.split(true, false);\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (typeof __split !== \"object\") {\n $ERROR('#1: __instance = new Object(true); __instance.split = String.prototype.split; __split = __instance.split(true, false); typeof __split === \"object\". Actual: '+typeof __split );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (__split.constructor !== Array) {\n $ERROR('#2: __instance = new Object(true); __instance.split = String.prototype.split; __split = __instance.split(true, false); __split.constructor === Array. Actual: '+__split.constructor );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#3\nif (__split.length !== 0) {\n $ERROR('#3: __instance = new Object(true); __instance.split = String.prototype.split; __split = __instance.split(true, false); __split.length === 0. Actual: '+__split.length );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.14_A1_T1"
+ },
+ {
+ "section": "15.5.4.14",
+ "description": "Arguments are objects, and instance is string.\nFirst object have overrided toString function.\nSecond object have overrided valueOf function",
+ "test": "var __obj = {toString:function(){return \"\\u0042B\";}}\nvar __obj2 = {valueOf:function(){return true;}}\nvar __str = \"ABB\\u0041BABAB\";\n\nwith(__str){\n __split = split(__obj, __obj2);\n}\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (typeof __split !== \"object\") {\n $ERROR('#1: var __obj = {toString:function(){return \"u0042B\";}}; var __obj2 = {valueOf:function(){return true;}}; var __str = \"ABBu0041BABAB\"; with(__str){__split = split(__obj, __obj2);}; typeof __split === \"object\". Actual: '+typeof __split );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (__split.constructor !== Array) {\n $ERROR('#2: var __obj = {toString:function(){return \"u0042B\";}}; var __obj2 = {valueOf:function(){return true;}}; var __str = \"ABBu0041BABAB\"; with(__str){__split = split(__obj, __obj2);}; __split.constructor === Array. Actual: '+__split.constructor );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#3\nif (__split.length !== 1) {\n $ERROR('#3: var __obj = {toString:function(){return \"u0042B\";}}; var __obj2 = {valueOf:function(){return true;}}; var __str = \"ABBu0041BABAB\"; with(__str){__split = split(__obj, __obj2);}; __split.length === 1. Actual: '+__split.length );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#4\nif (__split[0] !== \"A\") {\n $ERROR('#4: var __obj = {toString:function(){return \"u0042B\";}}; var __obj2 = {valueOf:function(){return true;}}; var __str = \"ABBu0041BABAB\"; with(__str){__split = split(__obj, __obj2);}; __split[0] === \"A\". Actual: '+__split[0] );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.14_A1_T10"
+ },
+ {
+ "section": "15.5.4.14",
+ "description": "Arguments are objects, and instance is string.\nFirst object have overrided toString function.\nSecond object have overrided valueOf function, that throw exception",
+ "test": "var __obj = {toString:function(){return \"\\u0041B\";}}\nvar __obj2 = {valueOf:function(){throw \"intointeger\";}}\nvar __str = {str__:\"ABB\\u0041BABAB\"};\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nwith(__str){\n with(str__){\n try {\n var x = split(__obj, __obj2);\n $FAIL('#1: \"var x = split(__obj, __obj2)\" lead to throwing exception');\n } catch (e) {\n if (e!==\"intointeger\") {\n $ERROR('#1.1: Exception === \"intointeger\". Actual: '+e);\n }\n }\n }\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.14_A1_T11"
+ },
+ {
+ "section": "15.5.4.14",
+ "description": "Arguments are objects, and instance is string.\nFirst object have overrided toString function.\nSecond object have overrided valueOf function and toString function, that throw exception",
+ "test": "var __obj = {toString:function(){return \"\\u0041B\";}}\nvar __obj2 = {valueOf:function(){return {};},toString:function(){throw \"intointeger\";}}\nvar __str = new String(\"ABB\\u0041BABAB\");\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nwith(__str){\n try {\n var x = split(__obj, __obj2);\n $FAIL('#1: \"var x = split(__obj, __obj2)\" lead to throwing exception');\n } catch (e) {\n if (e!==\"intointeger\") {\n $ERROR('#1.1: Exception === \"intointeger\". Actual: '+e);\n }\n }\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.14_A1_T12"
+ },
+ {
+ "section": "15.5.4.14",
+ "description": "Arguments are objects, and instance is string.\nFirst object have overrided toString function.\nSecond object have overrided valueOf and toString functions",
+ "test": "var __obj = {toString:function(){return \"\\u0042\\u0042\";}}\nvar __obj2 = {valueOf:function(){return {};},toString:function(){return \"2\";}}\n\nvar __split = \"ABB\\u0041BABAB\\u0042cc^^\\u0042Bvv%%B\\u0042xxx\".split(__obj, __obj2);\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (typeof __split !== \"object\") {\n $ERROR('#1: var __obj = {toString:function(){return \"u0042u0042\";}}; var __obj2 = {valueOf:function(){return {};},toString:function(){return \"2\";}}; __split = \"ABBu0041BABABu0042cc^^u0042Bvv%%Bu0042xxx\".split(__obj, __obj2); typeof __split === \"object\". Actual: '+typeof __split );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (__split.constructor !== Array) {\n $ERROR('#2: var __obj = {toString:function(){return \"u0042u0042\";}}; var __obj2 = {valueOf:function(){return {};},toString:function(){return \"2\";}}; __split = \"ABBu0041BABABu0042cc^^u0042Bvv%%Bu0042xxx\".split(__obj, __obj2); __split.constructor === Array. Actual: '+__split.constructor );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#3\nif (__split.length !== 2) {\n $ERROR('#3: var __obj = {toString:function(){return \"u0042u0042\";}}; var __obj2 = {valueOf:function(){return {};},toString:function(){return \"2\";}}; __split = \"ABBu0041BABABu0042cc^^u0042Bvv%%Bu0042xxx\".split(__obj, __obj2); __split.length === 2. Actual: '+__split.length );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#4\nif (__split[0] !== \"A\") {\n $ERROR('#4: var __obj = {toString:function(){return \"u0042u0042\";}}; var __obj2 = {valueOf:function(){return {};},toString:function(){return \"2\";}}; __split = \"ABBu0041BABABu0042cc^^u0042Bvv%%Bu0042xxx\".split(__obj, __obj2); __split[0] === \"A\". Actual: '+__split[0] );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#5\nif (__split[1] !== \"ABABA\") {\n $ERROR('#5: var __obj = {toString:function(){return \"u0042u0042\";}}; var __obj2 = {valueOf:function(){return {};},toString:function(){return \"2\";}}; __split = \"ABBu0041BABABu0042cc^^u0042Bvv%%Bu0042xxx\".split(__obj, __obj2); __split[1] === \"ABABA\". Actual: '+__split[1] );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.14_A1_T13"
+ },
+ {
+ "section": "15.5.4.14",
+ "description": "Arguments are objects, and instance is string.\nFirst object have overrided toString function, that throw exception.\nSecond object have overrided valueOf function, that throw exception",
+ "test": "var __obj = {toString:function(){throw \"intostr\";}};\nvar __obj2 = {valueOf:function(){throw \"intoint\";}};\nvar __instance = new Number(10001.10001);\nNumber.prototype.split=String.prototype.split;\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nwith(__instance){\n try {\n var x = split(__obj, __obj2);\n $FAIL('#1: \"var x = split(__obj, __obj2)\" lead to throwing exception');\n } catch (e) {\n if (e!==\"intoint\") {\n $ERROR('#1.1: Exception === \"intoint\". Actual: '+e);\n }\n }\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.14_A1_T14"
+ },
+ {
+ "section": "15.5.4.14",
+ "description": "Arguments are objects, and instance is string.\nFirst object have overrided toString function and valueOf function, that throw exception.\nSecond object have overrided valueOf function, that throw exception",
+ "test": "var __obj = {toString:function(){return {};},valueOf:function(){throw \"intostr\";}};\n\nvar __obj2 = {valueOf:function(){throw \"intointeger\";}};\n\n__FACTORY.prototype.split = String.prototype.split;\n\nvar __instance = new __FACTORY(void 0);\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\ntry {\n var x = __instance.split(__obj, __obj2);\n $FAIL('#1: \"var x = __instance.split(__obj, __obj2)\" lead to throwing exception');\n} catch (e) {\n if (e!==\"intointeger\") {\n $ERROR('#1.1: Exception === \"intointeger\". Actual: '+e);\n }\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\nfunction __FACTORY( value ) {\n this.value = value;\n this.toString = function() { return new Number; };\n this.valueOf=function(){return this.value+\"\"};\n}\n",
+ "id": "S15.5.4.14_A1_T15"
+ },
+ {
+ "section": "15.5.4.14",
+ "description": "Argument is object, and instance is Number.\nObject have overrided toString function, that return regexp",
+ "test": "var __obj = {toString:function(){return /\\u0037\\u0037/g;}};\n\nNumber.prototype.split=String.prototype.split;\n\ntry {\n var __split = 6776767677.006771122677555.split(__obj);\n $FAIL('#1: \"__split = 6776767677.006771122677555.split(__obj)\" lead to throwing exception');\n} catch (e) {\n if (!(e instanceof TypeError)) {\n $ERROR('#1.1: Exception is instance of TypeError. Actual: '+e);\n }\n}\n",
+ "id": "S15.5.4.14_A1_T16"
+ },
+ {
+ "section": "15.5.4.14",
+ "description": "Argument is regexp, and instance is Number",
+ "test": "var __re = /\\u0037\\u0037/g;\n\nNumber.prototype.split=String.prototype.split;\n\n__split = 6776767677.006771122677555.split(__re);\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (typeof __split !== \"object\") {\n $ERROR('#1: var __re = /u0037u0037/g; Number.prototype.split=String.prototype.split; __split = 6776767677.006771122677555.split(__re); typeof __split === \"object\". Actual: '+typeof __split );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (__split.constructor !== Array) {\n $ERROR('#2: var __re = /u0037u0037/g; Number.prototype.split=String.prototype.split; __split = 6776767677.006771122677555.split(__re); __split.constructor === Array. Actual: '+__split.constructor );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#3\nif (__split.length !== 4) {\n $ERROR('#3: var __re = /u0037u0037/g; Number.prototype.split=String.prototype.split; __split = 6776767677.006771122677555.split(__re); __split.length === 4. Actual: '+__split.length );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#4\nif (__split[0] !== \"6\") {\n $ERROR('#4: var __re = /u0037u0037/g; Number.prototype.split=String.prototype.split; __split = 6776767677.006771122677555.split(__re); __split[0] === \"6\". Actual: '+__split[0] );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#5\nif (__split[1] !== \"67676\") {\n $ERROR('#5: var __re = /u0037u0037/g; Number.prototype.split=String.prototype.split; __split = 6776767677.006771122677555.split(__re); __split[1] === \"67676\". Actual: '+__split[1] );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#6\nif (__split[2] !== \".006\") {\n $ERROR('#6: var __re = /u0037u0037/g; Number.prototype.split=String.prototype.split; __split = 6776767677.006771122677555.split(__re); __split[2] === \".006\". Actual: '+__split[2] );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#7\nif (__split[3] !== \"1\") {\n $ERROR('#7: var __re = /u0037u0037/g; Number.prototype.split=String.prototype.split; __split = 6776767677.006771122677555.split(__re); __split[3] === \"1\". Actual: '+__split[3] );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.14_A1_T17"
+ },
+ {
+ "section": "15.5.4.14",
+ "description": "Checking by using eval",
+ "test": "var __re = new RegExp(\"00\");\n\nNumber.prototype.split=String.prototype.split;\n\nvar __split = 6776767677.006771122677555.split(__re, eval(\"\\\"1\\\"\"));\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (typeof __split !== \"object\") {\n $ERROR('#1: var __re = new RegExp(\"00\"); Number.prototype.split=String.prototype.split; __split = 6776767677.006771122677555.split(__re, eval(\"\"1\"\")); typeof __split === \"object\". Actual: '+typeof __split );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (__split.constructor !== Array) {\n $ERROR('#2: var __re = new RegExp(\"00\"); Number.prototype.split=String.prototype.split; __split = 6776767677.006771122677555.split(__re, eval(\"\"1\"\")); __split.constructor === Array. Actual: '+__split.constructor );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#3\nif (__split.length !== 1) {\n $ERROR('#3: var __re = new RegExp(\"00\"); Number.prototype.split=String.prototype.split; __split = 6776767677.006771122677555.split(__re, eval(\"\"1\"\")); __split.length === 1. Actual: '+__split.length );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#3\nif (__split[0] !== \"6776767677.\") {\n $ERROR('#3: var __re = new RegExp(\"00\"); Number.prototype.split=String.prototype.split; __split = 6776767677.006771122677555.split(__re, eval(\"\"1\"\")); __split[0] === \"6776767677.\". Actual: '+__split[0] );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.14_A1_T18"
+ },
+ {
+ "section": "15.5.4.14",
+ "description": "Arguments are boolean expression, function call and null, and instance is Boolean",
+ "test": "var __instance = new Boolean;\n\n__instance.split = String.prototype.split;\n\nvar __split = __instance.split(\"A\"!==\"\\u0041\", function(){return 0;}(),null);\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (typeof __split !== \"object\") {\n $ERROR('#1: __instance = new Boolean; __instance.split = String.prototype.split; __split = __instance.split(\"A\"!==\"u0041\", function(){return 0;}(),null); typeof __split === \"object\". Actual: '+typeof __split );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (__split.constructor !== Array) {\n $ERROR('#2: __instance = new Boolean; __instance.split = String.prototype.split; __split = __instance.split(\"A\"!==\"u0041\", function(){return 0;}(),null); __split.constructor === Array. Actual: '+__split.constructor );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#3\nif (__split.length !== 0) {\n $ERROR('#3: __instance = new Boolean; __instance.split = String.prototype.split; __split = __instance.split(\"A\"!==\"u0041\", function(){return 0;}(),null); __split.length === 0. Actual: '+__split.length );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.14_A1_T2"
+ },
+ {
+ "section": "15.5.4.14",
+ "description": "Checking by using eval",
+ "test": "var split = String.prototype.split;\n\nvar __obj__lim = {valueOf:function(){return 5;}};\n\nif (typeof toString === \"undefined\"){\n toString = Object.prototype.toString;\n}\n\nvar __class__ = toString();\n\nvar __split = split(eval(\"\\\"[\\\"\"),__obj__lim);\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (typeof __split !== \"object\") {\n $ERROR('#1: typeof __split === \"object\". Actual: '+typeof __split );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (__split.constructor !== Array) {\n $ERROR('#2: __split.constructor === Array. Actual: '+__split.constructor );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#3\nif (__split.length !== 2) {\n $ERROR('#3: __split.length === 2. Actual: '+__split.length );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#3\nif (__split[1].substring(0,6) !== \"object\") {\n $ERROR('#4: __split[1].substring(0,6) === \"object\". Actual: '+__split[1].substring(0,6) );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.14_A1_T3"
+ },
+ {
+ "section": "15.5.4.14",
+ "description": "Call split without arguments, and instance is empty string",
+ "test": "//since ToString() evaluates to \"\" split() evaluates to split(\"\",0)\nvar __split = \"\".split();\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (typeof __split !== \"object\") {\n $ERROR('#1: __split = \"\".split(); typeof __split === \"object\". Actual: '+typeof __split );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (__split.constructor !== Array) {\n $ERROR('#2: __split = \"\".split(); __split.constructor === Array. Actual: '+__split.constructor );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#3\nif (__split.length !== 1) {\n $ERROR('#3: __split = \"\".split(); __split.length === 1. Actual: '+__split.length );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#4\nif (__split[0] !== \"\") {\n $ERROR('#4: __split = \"\".split(); __split[0] === \"\". Actual: '+__split[0] );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.14_A1_T4"
+ },
+ {
+ "section": "15.5.4.14",
+ "description": "Argument is null, and instance is function call that returned string",
+ "test": "//since ToString(null) evaluates to \"null\" split(null) evaluates to split(\"null\",0)\nvar __split = function(){return \"gnulluna\"}().split(null);\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (typeof __split !== \"object\") {\n $ERROR('#1: __split = function(){return \"gnulluna\"}().split(null); typeof __split === \"object\". Actual: '+typeof __split );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (__split.constructor !== Array) {\n $ERROR('#2: __split = function(){return \"gnulluna\"}().split(null); __split.constructor === Array. Actual: '+__split.constructor );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#3\nif (__split.length !== 2) {\n $ERROR('#3: __split = function(){return \"gnulluna\"}().split(null); __split.length === 2. Actual: '+__split.length );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#4\nif (__split[0] !== \"g\") {\n $ERROR('#4: __split = function(){return \"gnulluna\"}().split(null); __split[0] === \"g\". Actual: '+__split[0] );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#5\nif (__split[1] !== \"una\") {\n $ERROR('#5: __split = function(){return \"gnulluna\"}().split(null); __split[1] === \"una\". Actual: '+__split[1] );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.14_A1_T5"
+ },
+ {
+ "section": "15.5.4.14",
+ "description": "Argument is x, and instance is new String. x is undefined variable",
+ "test": "//since ToString(undefined) evaluates to \"\" split(undefined) evaluates to split(\"\",0)\nvar __split = new String(\"1undefined\").split(x);\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (typeof __split !== \"object\") {\n $ERROR('#1: var x; __split = new String(\"1undefined\").split(x); typeof __split === \"object\". Actual: '+typeof __split );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (__split.constructor !== Array) {\n $ERROR('#2: var x; __split = new String(\"1undefined\").split(x); __split.constructor === Array. Actual: '+__split.constructor );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#3\nif (__split.length !== 2) {\n $ERROR('#3: var x; __split = new String(\"1undefined\").split(x); __split.length === 2. Actual: '+__split.length );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#4\nif (__split[0] !== \"1\") {\n $ERROR('#4: var x; __split = new String(\"1undefined\").split(x); __split[0] === \"1\". Actual: '+__split[0] );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#5\nif (__split[1] !== \"\") {\n $ERROR('#5: var x; __split = new String(\"1undefined\").split(x); __split[1] === \"\". Actual: '+__split[1] );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\nvar x;\n",
+ "id": "S15.5.4.14_A1_T6"
+ },
+ {
+ "section": "15.5.4.14",
+ "description": "Argument is undefined, and instance is String",
+ "test": "//since ToString(undefined) evaluates to \"undefined\" split(undefined) evaluates to split(\"undefined\",0)\nvar __split = String(\"undefinedd\").split(undefined);\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (typeof __split !== \"object\") {\n $ERROR('#1: __split = String(\"undefinedd\").split(undefined); typeof __split === \"object\". Actual: '+typeof __split );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (__split.constructor !== Array) {\n $ERROR('#2: __split = String(\"undefinedd\").split(undefined); __split.constructor === Array. Actual: '+__split.constructor );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#3\nif (__split.length !== 2) {\n $ERROR('#3: __split = String(\"undefinedd\").split(undefined); __split.length === 2. Actual: '+__split.length );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#4\nif (__split[0] !== \"\") {\n $ERROR('#4: __split = String(\"undefinedd\").split(undefined); __split[0] === \"\". Actual: '+__split[0] );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#5\nif (__split[1] !== \"d\") {\n $ERROR('#5: __split = String(\"undefinedd\").split(undefined); __split[1] === \"d\". Actual: '+__split[1] );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.14_A1_T7"
+ },
+ {
+ "section": "15.5.4.14",
+ "description": "Argument is void 0, and instance is String(object), object have overrided toString function",
+ "test": "var __obj = {toString:function(){}};\n\n//since ToString(void 0) evaluates to \"undefined\" split(void 0) evaluates to split(\"undefined\")\nvar __split = String(__obj).split(void 0);\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (typeof __split !== \"object\") {\n $ERROR('#1: __obj = {toString:function(){}}; __split = String(__obj).split(void 0); typeof __split === \"object\". Actual: '+typeof __split );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (__split.constructor !== Array) {\n $ERROR('#2: __obj = {toString:function(){}}; __split = String(__obj).split(void 0); __split.constructor === Array. Actual: '+__split.constructor );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#3\nif (__split.length !== 2) {\n $ERROR('#3: __obj = {toString:function(){}}; __split = String(__obj).split(void 0); __split.length === 2. Actual: '+__split.length );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#4\nif (__split[0] !== \"\") {\n $ERROR('#4: __obj = {toString:function(){}}; __split = String(__obj).split(void 0); __split[0] !== \"\". Actual: '+__split[0]);\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#5\nif (__split[1] !== \"\") {\n $ERROR('#5: __obj = {toString:function(){}}; __split = String(__obj).split(void 0); __split[1] === \"\". Actual: '+__split[1] );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.14_A1_T8"
+ },
+ {
+ "section": "15.5.4.14",
+ "description": "Argument is function(){}(), and instance is String(object), object have overrided toString and valueOf functions",
+ "test": "var __obj = {\n valueOf:function(){},\n toString:void 0\n};\n\n//since ToString(undefined) evaluates to \"undefined\" split(undefined) evaluates to split(\"undefined\")\nvar __split = new String(__obj).split(function(){}());\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (typeof __split !== \"object\") {\n $ERROR('#1: __obj = {valueOf:function(){}, toString:void 0}; __split = new String(__obj).split(function(){}()); typeof __split === \"object\". Actual: '+typeof __split );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (__split.constructor !== Array) {\n $ERROR('#2: __obj = {valueOf:function(){}, toString:void 0}; __split = new String(__obj).split(function(){}()); __split.constructor === Array. Actual: '+__split.constructor );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#3\nif (__split.length !== 2) {\n $ERROR('#3: __obj = {valueOf:function(){}, toString:void 0}; __split = new String(__obj).split(function(){}()); __split.length === 2. Actual: '+__split.length );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#4\nif (__split[0] !== \"\") {\n $ERROR('#4: __obj = {valueOf:function(){}, toString:void 0}; __split = new String(__obj).split(function(){}()); __split[0] !== \"\". Actual: '+__split[0]);\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#5\nif (__split[1] !== \"\") {\n $ERROR('#5: __obj = {valueOf:function(){}, toString:void 0}; __split = new String(__obj).split(function(){}()); __split[1] === \"\". Actual: '+__split[1] );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.14_A1_T9"
+ },
+ {
+ "section": "15.5.4.14",
+ "description": "Call split(\",\"), instance is String(\"one,two,three,four,five\")",
+ "test": "var __string = new String(\"one,two,three,four,five\");\n\nvar __split = __string.split(\",\");\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__split.constructor !== Array) {\n $ERROR('#1: var __string = new String(\"one,two,three,four,five\"); __split = __string.split(\",\"); __split.constructor === Array. Actual: '+__split.constructor );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (__split.length !== 5) {\n $ERROR('#2: var __string = new String(\"one,two,three,four,five\"); __split = __string.split(\",\"); __split.length === 5. Actual: '+__split.length );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#3\nif (__split[0] !== \"one\") {\n $ERROR('#3: var __string = new String(\"one,two,three,four,five\"); __split = __string.split(\",\"); __split[0] === \"one\". Actual: '+__split[0] );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#4\nif (__split[1] !== \"two\") {\n $ERROR('#4: var __string = new String(\"one,two,three,four,five\"); __split = __string.split(\",\"); __split[1] === \"two\". Actual: '+__split[1] );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#5\nif (__split[2] !== \"three\") {\n $ERROR('#5: var __string = new String(\"one,two,three,four,five\"); __split = __string.split(\",\"); __split[2] === \"three\". Actual: '+__split[2] );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#6\nif (__split[3] !== \"four\") {\n $ERROR('#6: var __string = new String(\"one,two,three,four,five\"); __split = __string.split(\",\"); __split[3] === \"four\". Actual: '+__split[3] );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#7\nif (__split[4] !== \"five\") {\n $ERROR('#7: var __string = new String(\"one,two,three,four,five\"); __split = __string.split(\",\"); __split[4] === \"five\". Actual: '+__split[4] );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.14_A2_T1"
+ },
+ {
+ "section": "15.5.4.14",
+ "description": "Call split(123), instance is \"this123is123a123string123object\"",
+ "test": "var __string = \"this123is123a123string123object\";\nvar __expected = [\"this\", \"is\", \"a\", \"string\", \"object\"];\n\nvar __split = __string.split(123);\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__split.constructor !== Array) {\n $ERROR('#1: var __string = \"this123is123a123string123object\"; var __expected = [\"this\", \"is\", \"a\", \"string\", \"object\"]; __split = __string.split(123); __split.constructor === Array. Actual: '+__split.constructor );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (__split.length !== __expected.length) {\n $ERROR('#2: var __string = \"this123is123a123string123object\"; var __expected = [\"this\", \"is\", \"a\", \"string\", \"object\"]; __split = __string.split(123); __split.length === __expected.length. Actual: '+__split.length );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#3\nfor ( var i = 0; i < __expected.length; i++ ) {\n if (__expected[i]!==__split[i]) {\n $ERROR('#3.'+i+': var __string = \"this123is123a123string123object\"; var __expected = [\"this\", \"is\", \"a\", \"string\", \"object\"]; __split = __string.split(123); __expected['+i+']===__split['+i+']. Actual: '+__expected[i]);\n }\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n",
+ "id": "S15.5.4.14_A2_T10"
+ },
+ {
+ "section": "15.5.4.14",
+ "description": "Call split(\":\"), instance is String(\"one-1,two-2,four-4\")",
+ "test": "var __string = new String(\"one-1,two-2,four-4\");\n\nvar __split = __string.split(\":\");\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__split.constructor !== Array) {\n $ERROR('#1: var __string = new String(\"one-1,two-2,four-4\"); __split = __string.split(\":\"); __split.constructor === Array. Actual: '+__split.constructor );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (__split.length !== 1) {\n $ERROR('#2: var __string = new String(\"one-1,two-2,four-4\"); __split = __string.split(\":\"); __split.length === 1. Actual: '+__split.length );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#3\nif (__split[0] !== \"one-1,two-2,four-4\") {\n $ERROR('#3: var __string = new String(\"one-1,two-2,four-4\"); __split = __string.split(\":\"); __split[0] === \"one-1,two-2,four-4\". Actual: '+__split[0] );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.14_A2_T11"
+ },
+ {
+ "section": "15.5.4.14",
+ "description": "Call split(\"r-42\"), instance is String(\"one-1 two-2 four-4\")",
+ "test": "var __string = new String(\"one-1 two-2 four-4\");\n\nvar __split = __string.split(\"r-42\");\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__split.constructor !== Array) {\n $ERROR('#1: var __string = new String(\"one-1 two-2 four-4\"); __split = __string.split(\"r-42\"); __split.constructor === Array. Actual: '+__split.constructor );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (__split.length !== 1) {\n $ERROR('#2: var __string = new String(\"one-1 two-2 four-4\"); __split = __string.split(\"r-42\"); __split.length === 1. Actual: '+__split.length );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#3\nif (__split[0] !== \"one-1 two-2 four-4\") {\n $ERROR('#3: var __string = new String(\"one-1 two-2 four-4\"); __split = __string.split(\"r-42\"); __split[0] === \"one-1 two-2 four-4\". Actual: '+__split[0] );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.14_A2_T12"
+ },
+ {
+ "section": "15.5.4.14",
+ "description": "Call split(\"-4\"), instance is String(\"one-1 two-2 four-4\")",
+ "test": "var __string = new String(\"one-1 two-2 four-4\");\n\nvar __split = __string.split(\"-4\");\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__split.constructor !== Array) {\n $ERROR('#1: var __string = new String(\"one-1 two-2 four-4\"); __split = __string.split(\"-4\"); __split.constructor === Array. Actual: '+__split.constructor );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (__split.length !== 2) {\n $ERROR('#2: var __string = new String(\"one-1 two-2 four-4\"); __split = __string.split(\"-4\"); __split.length === 2. Actual: '+__split.length );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#3\nif (__split[0] !== \"one-1 two-2 four\") {\n $ERROR('#3: var __string = new String(\"one-1 two-2 four-4\"); __split = __string.split(\"-4\"); __split[0] === \"one-1 two-2 four\". Actual: '+__split[0]);\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#4\nif (__split[1] !== \"\") {\n $ERROR('#3: var __string = new String(\"one-1 two-2 four-4\"); __split = __string.split(\"-4\"); __split[1] === \"\". Actual: '+__split[1] );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.14_A2_T13"
+ },
+ {
+ "section": "15.5.4.14",
+ "description": "Call split(\"on\"), instance is String(\"one-1 two-2 four-4\")",
+ "test": "var __string = new String(\"one-1 two-2 four-4\");\n\nvar __split = __string.split(\"on\");\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__split.constructor !== Array) {\n $ERROR('#1: var __string = new String(\"one-1 two-2 four-4\"); __split = __string.split(\"on\"); __split.constructor === Array. Actual: '+__split.constructor );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (__split.length !== 2) {\n $ERROR('#2: var __string = new String(\"one-1 two-2 four-4\"); __split = __string.split(\"on\"); __split.length === 2. Actual: '+__split.length );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#3\nif (__split[0] !== \"\") {\n $ERROR('#3: var __string = new String(\"one-1 two-2 four-4\"); __split = __string.split(\"on\"); __split[0] === \"\". Actual: '+__split[0]);\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#4\nif (__split[1] !== \"e-1 two-2 four-4\") {\n $ERROR('#4: var __string = new String(\"one-1 two-2 four-4\"); __split = __string.split(\"on\"); __split[1] === \"e-1 two-2 four-4\". Actual: '+__split[1] );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.14_A2_T14"
+ },
+ {
+ "section": "15.5.4.14",
+ "description": "Call split(\"\"), instance is empty String object",
+ "test": "var __string = new String();\n\nvar __split = __string.split(\"\");\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__split.constructor !== Array) {\n $ERROR('#1: var __string = new String(); __split = __string.split(\"\"); __split.constructor === Array. Actual: '+__split.constructor );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (__split.length !== 0) {\n $ERROR('#2: var __string = new String(); __split = __string.split(\"\"); __split.length === 0. Actual: '+__split.length );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#3\nif (__split[0] !== undefined) {\n $ERROR('#3: var __string = new String(); __split = __string.split(\"\"); __split[0] === undefined. Actual: '+__split[0] );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.14_A2_T15"
+ },
+ {
+ "section": "15.5.4.14",
+ "description": "Call split(\" \"), instance is empty String object",
+ "test": "var __string = new String();\n\nvar __split = __string.split(\" \");\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__split.constructor !== Array) {\n $ERROR('#1: var __string = new String(); __split = __string.split(\" \"); __split.constructor === Array. Actual: '+__split.constructor );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (__split.length !== 1) {\n $ERROR('#2: var __string = new String(); __split = __string.split(\" \"); __split.length === 1. Actual: '+__split.length );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#3\nif (__split[0] !== \"\") {\n $ERROR('#3: var __string = new String(); __split = __string.split(\" \"); __split[0] === \"\". Actual: '+__split[0] );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.14_A2_T16"
+ },
+ {
+ "section": "15.5.4.14",
+ "description": "Call split(\"\"), instance is String(\" \")",
+ "test": "var __string = new String(\" \");\n\nvar __split = __string.split(\"\");\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__split.constructor !== Array) {\n $ERROR('#1: var __string = new String(\" \"); __split = __string.split(\"\"); __split.constructor === Array. Actual: '+__split.constructor );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (__split.length !== 1) {\n $ERROR('#2: var __string = new String(\" \"); __split = __string.split(\"\"); __split.length === 1. Actual: '+__split.length );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#3\nif (__split[0] !== \" \") {\n $ERROR('#3: var __string = new String(\" \"); __split = __string.split(\"\"); __split[0] === \" \". Actual: '+__split[0] );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.14_A2_T17"
+ },
+ {
+ "section": "15.5.4.14",
+ "description": "Call split(\" \"), instance is String(\" \")",
+ "test": "var __string = new String(\" \");\n\nvar __split = __string.split(\" \");\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__split.constructor !== Array) {\n $ERROR('#1: var __string = new String(\" \"); __split = __string.split(\" \"); __split.constructor === Array. Actual: '+__split.constructor );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (__split.length !== 2) {\n $ERROR('#2: var __string = new String(\" \"); __split = __string.split(\" \"); __split.length === 2. Actual: '+__split.length );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#3\nif (__split[0] !== \"\") {\n $ERROR('#3: var __string = new String(\" \"); __split = __string.split(\" \"); __split[0] === \"\". Actual: '+__split[0]);\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#4\nif (__split[1] !== \"\") {\n $ERROR('#4: var __string = new String(\" \"); __split = __string.split(\" \"); __split[1] === \"\". Actual: '+__split[1] );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.14_A2_T18"
+ },
+ {
+ "section": "15.5.4.14",
+ "description": "Call split(\"x\"), instance is empty string",
+ "test": "var __string = \"\";\n\nvar __split = __string.split(\"x\");\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__split.constructor !== Array) {\n $ERROR('#1: var __string = \"\"; __split = __string.split(\"x\"); __split.constructor === Array. Actual: '+__split.constructor );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (__split.length !== 1) {\n $ERROR('#2: var __string = \"\"; __split = __string.split(\"x\"); __split.length === 1. Actual: '+__split.length );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#3\nif (__split[0] !== \"\") {\n $ERROR('#3: var __string = \"\"; __split = __string.split(\"x\"); __split[0] === \"\". Actual: '+__split[0] );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.14_A2_T19"
+ },
+ {
+ "section": "15.5.4.14",
+ "description": "Call split(\" \"), instance is String(\"one two three four five\")",
+ "test": "var __string = new String(\"one two three four five\");\n\nvar __split = __string.split(\" \");\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__split.constructor !== Array) {\n $ERROR('#1: var __string = new String(\"one two three four five\"); __split = __string.split(\" \"); __split.constructor === Array. Actual: '+__split.constructor );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (__split.length !== 5) {\n $ERROR('#2: var __string = new String(\"one two three four five\"); __split = __string.split(\" \"); __split.length === 5. Actual: '+__split.length );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#3\nif (__split[0] !== \"one\") {\n $ERROR('#3: var __string = new String(\"one two three four five\"); __split = __string.split(\" \"); __split[0] === \"one\". Actual: '+__split[0] );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#4\nif (__split[1] !== \"two\") {\n $ERROR('#4: var __string = new String(\"one two three four five\"); __split = __string.split(\" \"); __split[1] === \"two\". Actual: '+__split[1] );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#5\nif (__split[2] !== \"three\") {\n $ERROR('#5: var __string = new String(\"one two three four five\"); __split = __string.split(\" \"); __split[2] === \"three\". Actual: '+__split[2] );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#6\nif (__split[3] !== \"four\") {\n $ERROR('#6: var __string = new String(\"one two three four five\"); __split = __string.split(\" \"); __split[3] === \"four\". Actual: '+__split[3] );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#7\nif (__split[4] !== \"five\") {\n $ERROR('#7: var __string = new String(\"one two three four five\"); __split = __string.split(\" \"); __split[4] === \"five\". Actual: '+__split[4] );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.14_A2_T2"
+ },
+ {
+ "section": "15.5.4.14",
+ "description": "Call split(new RegExp)",
+ "test": "var __string = new String(\"one-1 two-2 three-3\");\n\nvar __split = __string.split(new RegExp);\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__split.constructor !== Array) {\n $ERROR('#1: var __string = new String(\"one-1 two-2 three-3\"); __split = __string.split(new RegExp); __split.constructor === Array. Actual: '+__split.constructor );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (__split.length !== __string.length) {\n $ERROR('#2: var __string = new String(\"one-1 two-2 three-3\"); __split = __string.split(new RegExp); __split.length === __string.length. Actual: '+__split.length );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#3\nfor ( var i = 0; i < __string.length; i++ ) {\n if (__string.charAt(i)!==__split[i]) {\n $ERROR('#3.'+i+': var __string = new String(\"one-1 two-2 three-3\"); __split = __string.split(new RegExp); __string.charAt('+i+')===__split['+i+']. Actual: '+__string.charAt(i));\n }\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n",
+ "id": "S15.5.4.14_A2_T20"
+ },
+ {
+ "section": "15.5.4.14",
+ "description": "Call split(\"ll\"), instance is String(\"hello\")",
+ "test": "var __string = new String(\"hello\");\n\nvar __split = __string.split(\"ll\");\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__split.constructor !== Array) {\n $ERROR('#1: var __string = new String(\"hello\"); __split = __string.split(\"ll\"); __split.constructor === Array. Actual: '+__split.constructor );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (__split.length !== 2) {\n $ERROR('#2: var __string = new String(\"hello\"); __split = __string.split(\"ll\"); __split.length === 2. Actual: '+__split.length );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#3\nif (__split[0] !== \"he\") {\n $ERROR('#3: var __string = new String(\"hello\"); __split = __string.split(\"ll\"); __split[0] === \"he\". Actual: '+__split[0]);\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#4\nif (__split[1] !== \"o\") {\n $ERROR('#4: var __string = new String(\"hello\"); __split = __string.split(\"ll\"); __split[1] === \"o\". Actual: '+__split[1] );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n",
+ "id": "S15.5.4.14_A2_T21"
+ },
+ {
+ "section": "15.5.4.14",
+ "description": "Call split(\"l\"), instance is String(\"hello\")",
+ "test": "var __string = new String(\"hello\");\n\nvar __split = __string.split(\"l\");\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__split.constructor !== Array) {\n $ERROR('#1: var __string = new String(\"hello\"); __split = __string.split(\"l\"); __split.constructor === Array. Actual: '+__split.constructor );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (__split.length !== 3) {\n $ERROR('#2: var __string = new String(\"hello\"); __split = __string.split(\"l\"); __split.length === 3. Actual: '+__split.length );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#3\nif (__split[0] !== \"he\") {\n $ERROR('#3: var __string = new String(\"hello\"); __split = __string.split(\"l\"); __split[0] === \"he\". Actual: '+__split[0]);\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#4\nif (__split[1] !== \"\") {\n $ERROR('#4: var __string = new String(\"hello\"); __split = __string.split(\"l\"); __split[1] === \"\". Actual: '+__split[1]);\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#5\nif (__split[2] !== \"o\") {\n $ERROR('#5: var __string = new String(\"hello\"); __split = __string.split(\"l\"); __split[2] === \"o\". Actual: '+__split[2] );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n",
+ "id": "S15.5.4.14_A2_T22"
+ },
+ {
+ "section": "15.5.4.14",
+ "description": "Call split(\"x\"), instance is String(\"hello\")",
+ "test": "var __string = new String(\"hello\");\n\nvar __split = __string.split(\"x\");\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__split.constructor !== Array) {\n $ERROR('#1: var __string = new String(\"hello\"); __split = __string.split(\"x\"); __split.constructor === Array. Actual: '+__split.constructor );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (__split.length !== 1) {\n $ERROR('#2: var __string = new String(\"hello\"); __split = __string.split(\"x\"); __split.length === 1. Actual: '+__split.length );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#3\nif (__split[0] !== \"hello\") {\n $ERROR('#3: var __string = new String(\"hello\"); __split = __string.split(\"x\"); __split[0] === \"hello\". Actual: '+__split[0] );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n",
+ "id": "S15.5.4.14_A2_T23"
+ },
+ {
+ "section": "15.5.4.14",
+ "description": "Call split(\"h\"), instance is String(\"hello\")",
+ "test": "var __string = new String(\"hello\");\n\nvar __split = __string.split(\"h\");\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__split.constructor !== Array) {\n $ERROR('#1: var __string = new String(\"hello\"); __split = __string.split(\"h\"); __split.constructor === Array. Actual: '+__split.constructor );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (__split.length !== 2) {\n $ERROR('#2: var __string = new String(\"hello\"); __split = __string.split(\"h\"); __split.length === 2. Actual: '+__split.length );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#3\nif (__split[0] !== \"\") {\n $ERROR('#3: var __string = new String(\"hello\"); __split = __string.split(\"h\"); __split[0] === \"\". Actual: '+__split[0]);\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#4\nif (__split[1] !== \"ello\") {\n $ERROR('#4: var __string = new String(\"hello\"); __split = __string.split(\"h\"); __split[1] === \"ello\". Actual: '+__split[1] );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n",
+ "id": "S15.5.4.14_A2_T24"
+ },
+ {
+ "section": "15.5.4.14",
+ "description": "Call split(\"o\"), instance is String(\"hello\")",
+ "test": "var __string = new String(\"hello\");\n\nvar __split = __string.split(\"o\");\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__split.constructor !== Array) {\n $ERROR('#1: var __string = new String(\"hello\"); __split = __string.split(\"o\"); __split.constructor === Array. Actual: '+__split.constructor );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (__split.length !== 2) {\n $ERROR('#2: var __string = new String(\"hello\"); __split = __string.split(\"o\"); __split.length === 2. Actual: '+__split.length );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#3\nif (__split[0] !== \"hell\") {\n $ERROR('#3: var __string = new String(\"hello\"); __split = __string.split(\"o\"); __split[0] === \"hell\". Actual: '+__split[0]);\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#4\nif (__split[1] !== \"\") {\n $ERROR('#4: var __string = new String(\"hello\"); __split = __string.split(\"o\"); __split[1] === \"\". Actual: '+__split[1]);\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.14_A2_T25"
+ },
+ {
+ "section": "15.5.4.14",
+ "description": "Call split(\"hello\"), instance is String(\"hello\")",
+ "test": "var __string = new String(\"hello\");\n\nvar __split = __string.split(\"hello\");\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__split.constructor !== Array) {\n $ERROR('#1: var __string = new String(\"hello\"); __split = __string.split(\"hello\"); __split.constructor === Array. Actual: '+__split.constructor );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (__split.length !== 2) {\n $ERROR('#2: var __string = new String(\"hello\"); __split = __string.split(\"hello\"); __split.length === 2. Actual: '+__split.length );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#3\nif (__split[0] !== \"\") {\n $ERROR('#3: var __string = new String(\"hello\"); __split = __string.split(\"hello\"); __split[0] === \"\". Actual: '+__split[0]);\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#4\nif (__split[1] !== \"\") {\n $ERROR('#4: var __string = new String(\"hello\"); __split = __string.split(\"hello\"); __split[1] === \"\". Actual: '+__split[1] );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.14_A2_T26"
+ },
+ {
+ "section": "15.5.4.14",
+ "description": "Call split(undefined), instance is String(\"hello\")",
+ "test": "var __string = new String(\"hello\");\n\nvar __split = __string.split(undefined);\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__split.constructor !== Array) {\n $ERROR('#1: var __string = new String(\"hello\"); __split = __string.split(undefined); __split.constructor === Array. Actual: '+__split.constructor );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (__split.length !== 1) {\n $ERROR('#2: var __string = new String(\"hello\"); __split = __string.split(undefined); __split.length === 1. Actual: '+__split.length );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#3\nif (__split[0] !== \"hello\") {\n $ERROR('#3: var __string = new String(\"hello\"); __split = __string.split(undefined); __split[0] === \"hello\". Actual: '+__split[0] );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n",
+ "id": "S15.5.4.14_A2_T27"
+ },
+ {
+ "section": "15.5.4.14",
+ "description": "Call split(\"hellothere\"), instance is String(\"hello\")",
+ "test": "var __string = new String(\"hello\");\n\nvar __split = __string.split(\"hellothere\");\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__split.constructor !== Array) {\n $ERROR('#1: var __string = new String(\"hello\"); __split = __string.split(\"hellothere\"); __split.constructor === Array. Actual: '+__split.constructor );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (__split.length !== 1) {\n $ERROR('#2: var __string = new String(\"hello\"); __split = __string.split(\"hellothere\"); __split.length === 1. Actual: '+__split.length );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#3\nif (__split[0] !== \"hello\") {\n $ERROR('#3: var __string = new String(\"hello\"); __split = __string.split(\"hellothere\"); __split[0] === \"hello\". Actual: '+__split[0] );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n",
+ "id": "S15.5.4.14_A2_T28"
+ },
+ {
+ "section": "15.5.4.14",
+ "description": "Call split(1), instance is Number",
+ "test": "var __instance = new Number(100111122133144155);\n\nNumber.prototype.split = String.prototype.split;\n\nvar __split = __instance.split(1);\n\nvar __expected = [\"\",\"00\",\"\",\"\",\"\",\"22\",\"33\",\"44\",\"60\"];\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__split.constructor !== Array) {\n $ERROR('#1: __split.constructor === Array. Actual: '+__split.constructor );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (__split.length !== __expected.length) {\n $ERROR('#2: __split.length === __expected.length. Actual: '+__split.length );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#3\nfor(var index=0; index<__expected.length; index++) {\n if (__split[index] !== __expected[index]) {\n $ERROR('#3.'+index+': __split['+index+'] === '+__expected[index]+'. Actual: '+__split[index] );\n }\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n",
+ "id": "S15.5.4.14_A2_T29"
+ },
+ {
+ "section": "15.5.4.14",
+ "description": "Call split(/ /,2), instance is String(\"one two three four five\")",
+ "test": "var __string = new String(\"one two three four five\");\n\nvar __split = __string.split(/ /,2);\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__split.constructor !== Array) {\n $ERROR('#1: var __string = new String(\"one two three four five\"); __split = __string.split(/ /,2); __split.constructor === Array. Actual: '+__split.constructor );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (__split.length !== 2) {\n $ERROR('#2: var __string = new String(\"one two three four five\"); __split = __string.split(/ /,2); __split.length === 2. Actual: '+__split.length );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#3\nif (__split[0] !== \"one\") {\n $ERROR('#3: var __string = new String(\"one two three four five\"); __split = __string.split(/ /,2); __split[0] === \"one\". Actual: '+__split[0] );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#4\nif (__split[1] !== \"two\") {\n $ERROR('#4: var __string = new String(\"one two three four five\"); __split = __string.split(/ /,2); __split[1] === \"two\". Actual: '+__split[1] );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.14_A2_T3"
+ },
+ {
+ "section": "15.5.4.14",
+ "description": "Call split(1,1), instance is Number",
+ "test": "var __instance = new Number(100111122133144155);\n\nNumber.prototype.split = String.prototype.split;\n\nvar __split = __instance.split(1,1);\n\nvar __expected = [\"\"];\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__split.constructor !== Array) {\n $ERROR('#1: __split.constructor === Array. Actual: '+__split.constructor );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (__split.length !== __expected.length) {\n $ERROR('#2: __split.length === __expected.length. Actual: '+__split.length );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#3\nif (__split[0] !== __expected[0]) {\n $ERROR('#3: __split[0] === '+__expected[0]+'. Actual: '+__split[index] );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n",
+ "id": "S15.5.4.14_A2_T30"
+ },
+ {
+ "section": "15.5.4.14",
+ "description": "Call split(1,2), instance is Number",
+ "test": "var __instance = new Number(100111122133144155);\n\nNumber.prototype.split = String.prototype.split;\n\nvar __split = __instance.split(1,2);\n\nvar __expected = [\"\",\"00\"];\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__split.constructor !== Array) {\n $ERROR('#1: __split.constructor === Array. Actual: '+__split.constructor );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (__split.length !== __expected.length) {\n $ERROR('#2: __split.length === __expected.length. Actual: '+__split.length );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#3\nfor(var index=0; index<__expected.length; index++) {\n if (__split[index] !== __expected[index]) {\n $ERROR('#3.'+index+': __split[index] === '+__expected[index]+'. Actual: '+__split[index] );\n }\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n",
+ "id": "S15.5.4.14_A2_T31"
+ },
+ {
+ "section": "15.5.4.14",
+ "description": "Call split(1,0), instance is Number",
+ "test": "var __instance = new Number(100111122133144155);\n\nNumber.prototype.split = String.prototype.split;\n\nvar __split = __instance.split(1,0);\n\nvar __expected = [];\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__split.constructor !== Array) {\n $ERROR('#1: __split.constructor === Array. Actual: '+__split.constructor );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (__split.length !== __expected.length) {\n $ERROR('#2: __split.length === __expected.length. Actual: '+__split.length );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#3\nif (__split[0] !== __expected[0]) {\n $ERROR('#3: __split[0] === '+__expected[0]+'. Actual: '+__split[index] );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n",
+ "id": "S15.5.4.14_A2_T32"
+ },
+ {
+ "section": "15.5.4.14",
+ "description": "Call split(1,100), instance is Number",
+ "test": "var __instance = new Number(100111122133144155);\n\nNumber.prototype.split = String.prototype.split;\n\nvar __split = __instance.split(1,100);\n\nvar __expected = [\"\",\"00\",\"\",\"\",\"\",\"22\",\"33\",\"44\",\"60\"];\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__split.constructor !== Array) {\n $ERROR('#1: __split.constructor === Array. Actual: '+__split.constructor );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (__split.length !== __expected.length) {\n $ERROR('#2: __split.length === __expected.length. Actual: '+__split.length );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#3\nfor(var index=0; index<__expected.length; index++) {\n if (__split[index] !== __expected[index]) {\n $ERROR('#3.'+index+': __split[index] === '+__expected[index]+'. Actual: '+__split[index] );\n }\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n",
+ "id": "S15.5.4.14_A2_T33"
+ },
+ {
+ "section": "15.5.4.14",
+ "description": "Call split(1,void 0), instance is Number",
+ "test": "var __instance = new Number(100111122133144155);\n\nNumber.prototype.split = String.prototype.split;\n\nvar __split = __instance.split(1,void 0);\n\nvar __expected = [\"\",\"00\",\"\",\"\",\"\",\"22\",\"33\",\"44\",\"60\"];\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__split.constructor !== Array) {\n $ERROR('#1: __split.constructor === Array. Actual: '+__split.constructor );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (__split.length !== __expected.length) {\n $ERROR('#2: __split.length === __expected.length. Actual: '+__split.length );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#3\nfor(var index=0; index<__expected.length; index++) {\n if (__split[index] !== __expected[index]) {\n $ERROR('#3: __split[index] === __expected[index]. Actual: '+__split[index] );\n }\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n",
+ "id": "S15.5.4.14_A2_T34"
+ },
+ {
+ "section": "15.5.4.14",
+ "description": "Call split(1, Math.pow(2,32)-1), instance is Number",
+ "test": "var __instance = new Number(100111122133144155);\n\nNumber.prototype.split = String.prototype.split;\n\nvar __split = __instance.split(1, Math.pow(2,32)-1);\n\nvar __expected = [\"\",\"00\",\"\",\"\",\"\",\"22\",\"33\",\"44\",\"60\"];\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__split.constructor !== Array) {\n $ERROR('#1: __split.constructor === Array. Actual: '+__split.constructor );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (__split.length !== __expected.length) {\n $ERROR('#2: __split.length === __expected.length. Actual: '+__split.length );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#3\nfor(var index=0; index<__expected.length; index++) {\n if (__split[index] !== __expected[index]) {\n $ERROR('#3.'+index+': __split[index] === '+__expected[index]+'. Actual: '+__split[index] );\n }\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n",
+ "id": "S15.5.4.14_A2_T35"
+ },
+ {
+ "section": "15.5.4.14",
+ "description": "Call split(1,\"boo\"), instance is Number",
+ "test": "var __instance = new Number(100111122133144155);\n\nNumber.prototype.split = String.prototype.split;\n\nvar __split = __instance.split(1, \"boo\");\n\nvar __expected = [];\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__split.constructor !== Array) {\n $ERROR('#1: __split.constructor === Array. Actual: '+__split.constructor );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (__split.length !== __expected.length) {\n $ERROR('#2: __split.length === __expected.length. Actual: '+__split.length );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#3\nif (__split[0] !== __expected[0]) {\n $ERROR('#3: __split[0] === '+__expected[0]+'. Actual: '+__split[index] );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n",
+ "id": "S15.5.4.14_A2_T36"
+ },
+ {
+ "section": "15.5.4.14",
+ "description": "Call split(1,-Math.pow(2,32)+1), instance is Number",
+ "test": "var __instance = new Number(100111122133144155);\n\nNumber.prototype.split = String.prototype.split;\n\nvar __split = __instance.split(1, -Math.pow(2,32)+1);\n\nvar __expected = [\"\"];\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__split.constructor !== Array) {\n $ERROR('#1: __split.constructor === Array. Actual: '+__split.constructor );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (__split.length !== __expected.length) {\n $ERROR('#2: __split.length === __expected.length. Actual: '+__split.length );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#3\nif (__split[0] !== __expected[0]) {\n $ERROR('#3: __split[0] === '+__expected[0]+'. Actual: '+__split[index] );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n",
+ "id": "S15.5.4.14_A2_T37"
+ },
+ {
+ "section": "15.5.4.14",
+ "description": "Call split(\"l\",NaN), instance is String(\"hello\")",
+ "test": "var __instance = new String(\"hello\");\n\nvar __split = __instance.split(\"l\", NaN);\n\nvar __expected = [];\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__split.constructor !== Array) {\n $ERROR('#1: var __instance = new String(\"hello\"); __split = __instance.split(\"l\", NaN); __expected = []; __split.constructor === Array. Actual: '+__split.constructor );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (__split.length !== __expected.length) {\n $ERROR('#2: var __instance = new String(\"hello\"); __split = __instance.split(\"l\", NaN); __expected = []; __split.length === __expected.length. Actual: '+__split.length );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#3\nif (__split[0] !== __expected[0]) {\n $ERROR('#3: var __instance = new String(\"hello\"); __split = __instance.split(\"l\", NaN); __expected = []; __split[0] === '+__expected[0]+'. Actual: '+__split[index] );\n}\n//\n",
+ "id": "S15.5.4.14_A2_T38"
+ },
+ {
+ "section": "15.5.4.14",
+ "description": "Call split(\"l\",0), instance is String(\"hello\")",
+ "test": "var __instance = new String(\"hello\");\n\nvar __split = __instance.split(\"l\", 0);\n\nvar __expected = [];\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__split.constructor !== Array) {\n $ERROR('#1: var __instance = new String(\"hello\"); __split = __instance.split(\"l\", 0); __expected = []; __split.constructor === Array. Actual: '+__split.constructor );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (__split.length !== __expected.length) {\n $ERROR('#2: var __instance = new String(\"hello\"); __split = __instance.split(\"l\", 0); __expected = []; __split.length === __expected.length. Actual: '+__split.length );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#3\nif (__split[0] !== __expected[0]) {\n $ERROR('#3: var __instance = new String(\"hello\"); __split = __instance.split(\"l\", 0); __expected = []; __split[0] === '+__expected[0]+'. Actual: '+__split[index] );\n}\n//\n",
+ "id": "S15.5.4.14_A2_T39"
+ },
+ {
+ "section": "15.5.4.14",
+ "description": "Call split(\"\"), instance is String(\"one two three\")",
+ "test": "var __string = new String(\"one two three\");\n\nvar __split = __string.split(\"\");\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__split.constructor !== Array) {\n $ERROR('#1: var __string = new String(\"one two three\"); __split = __string.split(\"\"); __split.constructor === Array. Actual: '+__split.constructor );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (__split.length !== __string.length) {\n $ERROR('#2: var __string = new String(\"one two three\"); __split = __string.split(\"\"); __split.length === __string.length. Actual: '+__split.length );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#3\nif (__split[0] !== \"o\") {\n $ERROR('#3: var __string = new String(\"one two three\"); __split = __string.split(\"\"); __split[0] === \"o\". Actual: '+__split[0] );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#4\nif (__split[1] !== \"n\") {\n $ERROR('#4: var __string = new String(\"one two three\"); __split = __string.split(\"\"); __split[1] === \"n\". Actual: '+__split[1] );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#5\nif (__split[11] !== \"e\") {\n $ERROR('#5: var __string = new String(\"one two three\"); __split = __string.split(\"\"); __split[11] === \"e\". Actual: '+__split[11] );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#6\nif (__split[12] !== \"e\") {\n $ERROR('#6: var __string = new String(\"one two three\"); __split = __string.split(\"\"); __split[12] === \"e\". Actual: '+__split[12] );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.14_A2_T4"
+ },
+ {
+ "section": "15.5.4.14",
+ "description": "Call split(\"l\",1), instance is String(\"hello\")",
+ "test": "var __instance = new String(\"hello\");\n\nvar __split = __instance.split(\"l\", 1);\n\nvar __expected = [\"he\"];\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__split.constructor !== Array) {\n $ERROR('#1: var __instance = new String(\"hello\"); __split = __instance.split(\"l\", 1); __expected = [\"he\"]; __split.constructor === Array. Actual: '+__split.constructor );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (__split.length !== __expected.length) {\n $ERROR('#2: var __instance = new String(\"hello\"); __split = __instance.split(\"l\", 1); __expected = [\"he\"]; __split.length === __expected.length. Actual: '+__split.length );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#3\nif (__split[0] !== __expected[0]) {\n $ERROR('#3: var __instance = new String(\"hello\"); __split = __instance.split(\"l\", 1); __expected = [\"he\"]; __split[0] === '+__expected[0]+'. Actual: '+__split[index] );\n}\n//\n",
+ "id": "S15.5.4.14_A2_T40"
+ },
+ {
+ "section": "15.5.4.14",
+ "description": "Call split(\"l\",2), instance is String(\"hello\")",
+ "test": "var __instance = new String(\"hello\");\n\nvar __split = __instance.split(\"l\", 2);\n\nvar __expected = [\"he\",\"\"];\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__split.constructor !== Array) {\n $ERROR('#1: var __instance = new String(\"hello\"); __split = __instance.split(\"l\", 2); __expected = [\"he\",\"\"]; __split.constructor === Array. Actual: '+__split.constructor );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (__split.length !== __expected.length) {\n $ERROR('#2: var __instance = new String(\"hello\"); __split = __instance.split(\"l\", 2); __expected = [\"he\",\"\"]; __split.length === __expected.length. Actual: '+__split.length );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#3\nfor(var index=0; index<__expected.length; index++) {\n if (__split[index] !== __expected[index]) {\n $ERROR('#3.'+index+': var __instance = new String(\"hello\"); __split = __instance.split(\"l\", 2); __expected = [\"he\",\"\"]; __split[index] === '+__expected[index]+'. Actual: '+__split[index] );\n }\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n",
+ "id": "S15.5.4.14_A2_T41"
+ },
+ {
+ "section": "15.5.4.14",
+ "description": "Call split(\"l\",3), instance is String(\"hello\")",
+ "test": "var __instance = new String(\"hello\");\n\nvar __split = __instance.split(\"l\", 3);\n\nvar __expected = [\"he\",\"\",\"o\"];\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__split.constructor !== Array) {\n $ERROR('#1: var __instance = new String(\"hello\"); __split = __instance.split(\"l\", 3); __expected = [\"he\",\"\",\"o\"]; __split.constructor === Array. Actual: '+__split.constructor );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (__split.length !== __expected.length) {\n $ERROR('#2: var __instance = new String(\"hello\"); __split = __instance.split(\"l\", 3); __expected = [\"he\",\"\",\"o\"]; __split.length === __expected.length. Actual: '+__split.length );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#3\nfor(var index=0; index<__expected.length; index++) {\n if (__split[index] !== __expected[index]) {\n $ERROR('#3.'+index+': var __instance = new String(\"hello\"); __split = __instance.split(\"l\", 3); __expected = [\"he\",\"\",\"o\"]; __split[index] === '+__expected[index]+'. Actual: '+__split[index] );\n }\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n",
+ "id": "S15.5.4.14_A2_T42"
+ },
+ {
+ "section": "15.5.4.14",
+ "description": "Call split(\"l\",4), instance is String(\"hello\")",
+ "test": "var __instance = new String(\"hello\");\n\nvar __split = __instance.split(\"l\", 4);\n\nvar __expected = [\"he\",\"\",\"o\"];\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__split.constructor !== Array) {\n $ERROR('#1: var __instance = new String(\"hello\"); __split = __instance.split(\"l\", 4); __expected = [\"he\",\"\",\"o\"]; __split.constructor === Array. Actual: '+__split.constructor );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (__split.length !== __expected.length) {\n $ERROR('#2: var __instance = new String(\"hello\"); __split = __instance.split(\"l\", 4); __expected = [\"he\",\"\",\"o\"]; __split.length === __expected.length. Actual: '+__split.length );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#3\nfor(var index=0; index<__expected.length; index++) {\n if (__split[index] !== __expected[index]) {\n $ERROR('#3.'+index+': var __instance = new String(\"hello\"); __split = __instance.split(\"l\", 4); __expected = [\"he\",\"\",\"o\"]; __split[index] === '+__expected[index]+'. Actual: '+__split[index] );\n }\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n",
+ "id": "S15.5.4.14_A2_T43"
+ },
+ {
+ "section": "15.5.4.14",
+ "description": "Call split(/,/), instance is String(\"one-1,two-2,four-4\")",
+ "test": "var __string = new String(\"one-1,two-2,four-4\");\n\nvar __split = __string.split(/,/);\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__split.constructor !== Array) {\n $ERROR('#1: var __string = new String(\"one-1,two-2,four-4\"); __split = __string.split(/,/); __split.constructor === Array. Actual: '+__split.constructor );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (__split.length !== 3) {\n $ERROR('#2: var __string = new String(\"one-1,two-2,four-4\"); __split = __string.split(/,/); __split.length === 3. Actual: '+__split.length );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#3\nif (__split[0] !== \"one-1\") {\n $ERROR('#3: var __string = new String(\"one-1,two-2,four-4\"); __split = __string.split(/,/); __split[0] === \"one-1\". Actual: '+__split[0] );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#4\nif (__split[1] !== \"two-2\") {\n $ERROR('#4: var __string = new String(\"one-1,two-2,four-4\"); __split = __string.split(/,/); __split[1] === \"two-2\". Actual: '+__split[1] );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#5\nif (__split[2] !== \"four-4\") {\n $ERROR('#5: var __string = new String(\"one-1,two-2,four-4\"); __split = __string.split(/,/); __split[2] === \"four-4\". Actual: '+__split[2] );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.14_A2_T5"
+ },
+ {
+ "section": "15.5.4.14",
+ "description": "Call split(''), instance is String(\"one-1 two-2 four-4\")",
+ "test": "var __string = new String(\"one-1 two-2 three-3\");\n\nvar __split = __string.split('');\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__split.constructor !== Array) {\n $ERROR('#1: var __string = new String(\"one-1 two-2 three-3\"); __split = __string.split(\\'\\'); __split.constructor === Array. Actual: '+__split.constructor );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (__split.length !== __string.length) {\n $ERROR('#2: var __string = new String(\"one-1 two-2 three-3\"); __split = __string.split(\\'\\'); __split.length === __string.length. Actual: '+__split.length );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#3\nfor ( var i = 0; i < __string.length; i++ ) {\n if (__split[i]!==__string.charAt(i)) {\n $ERROR('#3.'+i+': var __string = new String(\"one-1 two-2 three-3\"); __split = __string.split(\\'\\'); __split['+i+']===__string.charAt('+i+'). Actual: '+__split[i]);\n }\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n",
+ "id": "S15.5.4.14_A2_T6"
+ },
+ {
+ "section": "15.5.4.14",
+ "description": "Call split(void 0), instance is \"thisundefinedisundefinedaundefinedstringundefinedobject\"",
+ "test": "var __string = \"thisundefinedisundefinedaundefinedstringundefinedobject\";\nvar __expected = [\"this\", \"is\", \"a\", \"string\", \"object\"];\n\nvar __split = __string.split(void 0);\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__split.constructor !== Array) {\n $ERROR('#1: var __string = \"thisundefinedisundefinedaundefinedstringundefinedobject\"; var __expected = [\"this\", \"is\", \"a\", \"string\", \"object\"]; __split = __string.split(void 0); __split.constructor === Array. Actual: '+__split.constructor );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (__split.length !== __expected.length) {\n $ERROR('#2: var __string = \"thisundefinedisundefinedaundefinedstringundefinedobject\"; var __expected = [\"this\", \"is\", \"a\", \"string\", \"object\"]; __split = __string.split(void 0); __split.length === __expected.length. Actual: '+__split.length );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#3\nfor ( var i = 0; i < __expected.length; i++ ) {\n if (__expected[i]!==__split[i]) {\n $ERROR('#3.'+i+': var __string = \"thisundefinedisundefinedaundefinedstringundefinedobject\"; var __expected = [\"this\", \"is\", \"a\", \"string\", \"object\"]; __split = __string.split(void 0); __expected['+i+']==='+__split[i]+'. Actual: '+__expected[i]);\n }\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n",
+ "id": "S15.5.4.14_A2_T7"
+ },
+ {
+ "section": "15.5.4.14",
+ "description": "Call split(null), instance is \"thisnullisnullanullstringnullobject\"",
+ "test": "var __string = \"thisnullisnullanullstringnullobject\";\nvar __expected = [\"this\", \"is\", \"a\", \"string\", \"object\"];\n\nvar __split = __string.split(null);\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__split.constructor !== Array) {\n $ERROR('#1: var __string = \"thisnullisnullanullstringnullobject\"; var __expected = [\"this\", \"is\", \"a\", \"string\", \"object\"]; __split = __string.split(null); __split.constructor === Array. Actual: '+__split.constructor );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (__split.length !== __expected.length) {\n $ERROR('#2: var __string = \"thisnullisnullanullstringnullobject\"; var __expected = [\"this\", \"is\", \"a\", \"string\", \"object\"]; __split = __string.split(null); __split.length === __expected.length. Actual: '+__split.length );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#3\nfor ( var i = 0; i < __expected.length; i++ ) {\n if (__expected[i]!==__split[i]) {\n $ERROR('#3.'+i+': var __string = \"thisnullisnullanullstringnullobject\"; var __expected = [\"this\", \"is\", \"a\", \"string\", \"object\"]; __split = __string.split(null); __expected['+i+']==='+__split[i]+'. Actual: '+__expected[i]);\n }\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n",
+ "id": "S15.5.4.14_A2_T8"
+ },
+ {
+ "section": "15.5.4.14",
+ "description": "Call split(true), instance is \"thistrueistrueatruestringtrueobject\"",
+ "test": "var __string = \"thistrueistrueatruestringtrueobject\";\nvar __expected = [\"this\", \"is\", \"a\", \"string\", \"object\"];\n\nvar __split = __string.split(true);\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__split.constructor !== Array) {\n $ERROR('#1: var __string = \"thistrueistrueatruestringtrueobject\"; var __expected = [\"this\", \"is\", \"a\", \"string\", \"object\"]; __split = __string.split(true); __split.constructor === Array. Actual: '+__split.constructor );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (__split.length !== __expected.length) {\n $ERROR('#2: var __string = \"thistrueistrueatruestringtrueobject\"; var __expected = [\"this\", \"is\", \"a\", \"string\", \"object\"]; __split = __string.split(true); __split.length === __expected.length. Actual: '+__split.length );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#3\nfor ( var i = 0; i < __expected.length; i++ ) {\n if (__expected[i]!==__split[i]) {\n $ERROR('#3.'+i+': var __string = \"thistrueistrueatruestringtrueobject\"; var __expected = [\"this\", \"is\", \"a\", \"string\", \"object\"]; __split = __string.split(true); __expected['+i+']==='+__split[i]+'. Actual: '+__expected[i]);\n }\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n",
+ "id": "S15.5.4.14_A2_T9"
+ },
+ {
+ "section": "15.5.4.14",
+ "description": "Instance is String(\"one,two,three,four,five\")",
+ "test": "var __string = new String(\"one,two,three,four,five\");\n\nvar __split = __string.split();\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__split.constructor !== Array) {\n $ERROR('#1: var __string = new String(\"one,two,three,four,five\"); __split = __string.split(); __split.constructor === Array. Actual: '+__split.constructor );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (__split.length !== 1) {\n $ERROR('#2: var __string = new String(\"one,two,three,four,five\"); __split = __string.split(); __split.length === 1. Actual: '+__split.length );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#3\nif (__split[0] !== \"one,two,three,four,five\") {\n $ERROR('#3: var __string = new String(\"one,two,three,four,five\"); __split = __string.split(); __split[0] === \"one,two,three,four,five\". Actual: '+__split[0] );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.14_A3_T1"
+ },
+ {
+ "section": "15.5.4.14",
+ "description": "Instance is new String",
+ "test": "var __string = new String;\n\nvar __split = __string.split();\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__split.constructor !== Array) {\n $ERROR('#1: var __string = new String; __split = __string.split(); __split.constructor === Array. Actual: '+__split.constructor );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (__split.length !== 1) {\n $ERROR('#2: var __string = new String; __split = __string.split(); __split.length === 1. Actual: '+__split.length );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#3\nif (__split[0] !== \"\") {\n $ERROR('#3: var __string = new String; __split = __string.split(); __split[0] === \"\". Actual: '+__split[0] );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.14_A3_T10"
+ },
+ {
+ "section": "15.5.4.14",
+ "description": "Instance is String(\" \")",
+ "test": "var __string = new String(\" \");\n\nvar __split = __string.split();\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__split.constructor !== Array) {\n $ERROR('#1: var __string = new String(\" \"); __split = __string.split(); __split.constructor === Array. Actual: '+__split.constructor );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (__split.length !== 1) {\n $ERROR('#2: var __string = new String(\" \"); __split = __string.split(); __split.length === 1. Actual: '+__split.length );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#3\nif (__split[0] !== \" \") {\n $ERROR('#3: var __string = new String(\" \"); __split = __string.split(); __split[0] === \" \". Actual: '+__split[0] );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.14_A3_T11"
+ },
+ {
+ "section": "15.5.4.14",
+ "description": "Instance is Object()",
+ "test": "var __instance = new Object();\n\n__instance.split = String.prototype.split;\n\nvar __split = __instance.split();\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__split.constructor !== Array) {\n $ERROR('#1: var __instance = new Object(); __instance.split = String.prototype.split; __split = __instance.split(); __split.constructor === Array. Actual: '+__split.constructor );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (__split.length !== 1) {\n $ERROR('#2: var __instance = new Object(); __instance.split = String.prototype.split; __split = __instance.split(); __split.length === 1. Actual: '+__split.length );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#3\nif (__split[0] !== \"[object Object]\") {\n $ERROR('#3: var __instance = new Object(); __instance.split = String.prototype.split; __split = __instance.split(); __split[0] === \"[object Object]\". Actual: '+__split[0] );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.14_A3_T2"
+ },
+ {
+ "section": "15.5.4.14",
+ "description": "Instance is function(){}",
+ "test": "var __instance = function(){};\n\n__instance.split = String.prototype.split;\n\nvar __split = __instance.split();\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__split.constructor !== Array) {\n $ERROR('#1: var __instance = function(){}; __instance.split = String.prototype.split; __split = __instance.split(); __split.constructor === Array. Actual: '+__split.constructor );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (__split.length !== 1) {\n $ERROR('#2: var __instance = function(){}; __instance.split = String.prototype.split; __split = __instance.split(); __split.length === 1. Actual: '+__split.length );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#3\nif (__split[0].substring(0,8) !== \"function\") {\n $ERROR('#3: var __instance = function(){}; __instance.split = String.prototype.split; __split = __instance.split(); __split[0].substring(0,8) === \"function\". Actual: '+__split[0].substring(0,8) );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.14_A3_T3"
+ },
+ {
+ "section": "15.5.4.14",
+ "description": "Instance is Number(NaN)",
+ "test": "var __instance = new Number(NaN);\n\n__instance.split = String.prototype.split;\n\nvar __split = __instance.split();\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__split.constructor !== Array) {\n $ERROR('#1: var __instance = new Number(NaN); __instance.split = String.prototype.split; __split = __instance.split(); __split.constructor === Array. Actual: '+__split.constructor );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (__split.length !== 1) {\n $ERROR('#2: var __instance = new Number(NaN); __instance.split = String.prototype.split; __split = __instance.split(); __split.length === 1. Actual: '+__split.length );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#3\nif (__split[0] !== \"NaN\") {\n $ERROR('#3: var __instance = new Number(NaN); __instance.split = String.prototype.split; __split = __instance.split(); __split[0] === \"NaN\". Actual: '+__split[0] );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.14_A3_T4"
+ },
+ {
+ "section": "15.5.4.14",
+ "description": "Instance is Number(-1234567890)",
+ "test": "var __instance = new Number(-1234567890);\n\n__instance.split = String.prototype.split;\n\nvar __split = __instance.split();\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__split.constructor !== Array) {\n $ERROR('#1: var __instance = new Number(-1234567890); __instance.split = String.prototype.split; __split = __instance.split(); __split.constructor === Array. Actual: '+__split.constructor );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (__split.length !== 1) {\n $ERROR('#2: var __instance = new Number(-1234567890); __instance.split = String.prototype.split; __split = __instance.split(); __split.length === 1. Actual: '+__split.length );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#3\nif (__split[0] !== \"-1234567890\") {\n $ERROR('#3: var __instance = new Number(-1234567890); __instance.split = String.prototype.split; __split = __instance.split(); __split[0] === \"-1234567890\". Actual: '+__split[0] );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.14_A3_T5"
+ },
+ {
+ "section": "15.5.4.14",
+ "description": "Instance is Number(-1e21)",
+ "test": "var __instance = new Number(-1e21);\n\n__instance.split = String.prototype.split;\n\nvar __split = __instance.split();\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__split.constructor !== Array) {\n $ERROR('#1: var __instance = new Number(-1e21); __instance.split = String.prototype.split; __split = __instance.split(); __split.constructor === Array. Actual: '+__split.constructor );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (__split.length !== 1) {\n $ERROR('#2: var __instance = new Number(-1e21); __instance.split = String.prototype.split; __split = __instance.split(); __split.length === 1. Actual: '+__split.length );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#3\nif (__split[0] !== __instance.toString()) {\n $ERROR('#3: var __instance = new Number(-1e21); __instance.split = String.prototype.split; __split = __instance.split(); __split[0] === __instance.toString(). Actual: '+__split[0] );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.14_A3_T6"
+ },
+ {
+ "section": "15.5.4.14",
+ "description": "Instance is Math",
+ "test": "var __instance = Math;\n\n__instance.split = String.prototype.split;\n\nvar __split = __instance.split();\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__split.constructor !== Array) {\n $ERROR('#1: var __instance = Math; __instance.split = String.prototype.split; __split = __instance.split(); __split.constructor === Array. Actual: '+__split.constructor );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (__split.length !== 1) {\n $ERROR('#2: var __instance = Math; __instance.split = String.prototype.split; __split = __instance.split(); __split.length === 1. Actual: '+__split.length );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#3\nif (__split[0] !== \"[object Math]\") {\n $ERROR('#3: var __instance = Math; __instance.split = String.prototype.split; __split = __instance.split(); __split[0] === \"[object Math]\". Actual: '+__split[0] );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.14_A3_T7"
+ },
+ {
+ "section": "15.5.4.14",
+ "description": "Instance is Array(1,2,3,4,5)",
+ "test": "var __instance = new Array(1,2,3,4,5);\n\n__instance.split = String.prototype.split;\n\nvar __split = __instance.split();\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__split.constructor !== Array) {\n $ERROR('#1: var __instance = new Array(1,2,3,4,5); __instance.split = String.prototype.split; __split = __instance.split(); __split.constructor === Array. Actual: '+__split.constructor );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (__split.length !== 1) {\n $ERROR('#2: var __instance = new Array(1,2,3,4,5); __instance.split = String.prototype.split; __split = __instance.split(); __split.length === 1. Actual: '+__split.length );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#3\nif (__split[0] !== \"1,2,3,4,5\") {\n $ERROR('#3: var __instance = new Array(1,2,3,4,5); __instance.split = String.prototype.split; __split = __instance.split(); __split[0] === \"1,2,3,4,5\". Actual: '+__split[0] );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.14_A3_T8"
+ },
+ {
+ "section": "15.5.4.14",
+ "description": "Instance is Boolean",
+ "test": "var __instance = new Boolean;\n\n__instance.split = String.prototype.split;\n\nvar __split = __instance.split();\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__split.constructor !== Array) {\n $ERROR('#1: var __instance = new Boolean; __instance.split = String.prototype.split; __split = __instance.split(); __split.constructor === Array. Actual: '+__split.constructor );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (__split.length !== 1) {\n $ERROR('#2: var __instance = new Boolean; __instance.split = String.prototype.split; __split = __instance.split(); __split.length === 1. Actual: '+__split.length );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#3\nif (__split[0] !== \"false\") {\n $ERROR('#3: var __instance = new Boolean; __instance.split = String.prototype.split; __split = __instance.split(); __split[0] === \"false\". Actual: '+__split[0] );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.14_A3_T9"
+ },
+ {
+ "section": "15.5.4.14",
+ "description": "Argument is regexp /l/, and instance is String(\"hello\")",
+ "test": "var __string = new String(\"hello\");\n\nvar __re = /l/;\n\nvar __split = __string.split(__re);\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__split.constructor !== Array) {\n $ERROR('#1: var __string = new String(\"hello\"); var __re = /l/; __split = __string.split(__re); __split.constructor === Array. Actual: '+__split.constructor );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (__split.length !== 3) {\n $ERROR('#2: var __string = new String(\"hello\"); var __re = /l/; __split = __string.split(__re); __split.length === 3. Actual: '+__split.length );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#3\nif (__split[0] !== \"he\") {\n $ERROR('#3: var __string = new String(\"hello\"); var __re = /l/; __split = __string.split(__re); __split[0] === \"he\". Actual: '+__split[0]);\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#4\nif (__split[1] !== \"\") {\n $ERROR('#4: var __string = new String(\"hello\"); var __re = /l/; __split = __string.split(__re); __split[1] === \"\". Actual: '+__split[1]);\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#5\nif (__split[2] !== \"o\") {\n $ERROR('#5: var __string = new String(\"hello\"); var __re = /l/; __split = __string.split(__re); __split[2] === \"o\". Actual: '+__split[2] );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.14_A4_T1"
+ },
+ {
+ "section": "15.5.4.14",
+ "description": "Argument is new RegExp, and instance is String(\"hello\")",
+ "test": "var __string = new String(\"hello\");\n\nvar __re = new RegExp;\n\nvar __split = __string.split(__re);\n\nvar __expected = [\"h\",\"e\",\"l\",\"l\",\"o\"];\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__split.constructor !== Array) {\n $ERROR('#1: __split.constructor === Array. Actual: '+__split.constructor );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (__split.length !== __expected.length) {\n $ERROR('#2: __split.length === __expected.length. Actual: '+__split.length );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#3\nfor(var index=0; index<__expected.length; index++) {\n if (__split[index] !== __expected[index]) {\n $ERROR('#3.'+index+': __split['+index+'] === '+__expected[index]+'. Actual: '+__split[index] );\n }\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.14_A4_T10"
+ },
+ {
+ "section": "15.5.4.14",
+ "description": "Arguments are new RegExp and 0, and instance is String(\"hello\")",
+ "test": "var __string = new String(\"hello\");\n\nvar __re = new RegExp;\n\nvar __split = __string.split(__re, 0);\n\nvar __expected = [];\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__split.constructor !== Array) {\n $ERROR('#1: __split.constructor === Array. Actual: '+__split.constructor );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (__split.length !== __expected.length) {\n $ERROR('#2: __split.length === __expected.length. Actual: '+__split.length );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#3\nif (__split[0] !== __expected[0]) {\n $ERROR('#3: __split[0] === '+__expected[0]+'. Actual: '+__split[index] );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.14_A4_T11"
+ },
+ {
+ "section": "15.5.4.14",
+ "description": "Arguments are new RegExp and 1, and instance is String(\"hello\")",
+ "test": "var __string = new String(\"hello\");\n\nvar __re = new RegExp;\n\nvar __split = __string.split(__re, 1);\n\nvar __expected = [\"h\"];\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__split.constructor !== Array) {\n $ERROR('#1: __split.constructor === Array. Actual: '+__split.constructor );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (__split.length !== __expected.length) {\n $ERROR('#2: __split.length === __expected.length. Actual: '+__split.length );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#3\nif (__split[0] !== __expected[0]) {\n $ERROR('#3: __split[0] === '+__expected[0]+'. Actual: '+__split[0] );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.14_A4_T12"
+ },
+ {
+ "section": "15.5.4.14",
+ "description": "Arguments are new RegExp and 2, and instance is String(\"hello\")",
+ "test": "var __string = new String(\"hello\");\n\nvar __re = new RegExp;\n\nvar __split = __string.split(__re, 2);\n\nvar __expected = [\"h\", \"e\"];\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__split.constructor !== Array) {\n $ERROR('#1: __split.constructor === Array. Actual: '+__split.constructor );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (__split.length !== __expected.length) {\n $ERROR('#2: __split.length === __expected.length. Actual: '+__split.length );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#3\nfor(var index=0; index<__expected.length; index++) {\n if (__split[index] !== __expected[index]) {\n $ERROR('#3.'+index+': __split['+index+'] === '+__expected[index]+'. Actual: '+__split[index] );\n }\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.14_A4_T13"
+ },
+ {
+ "section": "15.5.4.14",
+ "description": "Arguments are new RegExp and 3, and instance is String(\"hello\")",
+ "test": "var __string = new String(\"hello\");\n\nvar __re = new RegExp;\n\nvar __split = __string.split(__re, 3);\n\nvar __expected = [\"h\", \"e\", \"l\"];\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__split.constructor !== Array) {\n $ERROR('#1: __split.constructor === Array. Actual: '+__split.constructor );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (__split.length !== __expected.length) {\n $ERROR('#2: __split.length === __expected.length. Actual: '+__split.length );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#3\nfor(var index=0; index<__expected.length; index++) {\n if (__split[index] !== __expected[index]) {\n $ERROR('#3.'+index+': __split['+index+'] === '+__expected[index]+'. Actual: '+__split[index] );\n }\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.14_A4_T14"
+ },
+ {
+ "section": "15.5.4.14",
+ "description": "Arguments are new RegExp and 4, and instance is String(\"hello\")",
+ "test": "var __string = new String(\"hello\");\n\nvar __re = new RegExp;\n\nvar __split = __string.split(__re, 4);\n\nvar __expected = [\"h\", \"e\", \"l\" ,\"l\"];\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__split.constructor !== Array) {\n $ERROR('#1: __split.constructor === Array. Actual: '+__split.constructor );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (__split.length !== __expected.length) {\n $ERROR('#2: __split.length === __expected.length. Actual: '+__split.length );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#3\nfor(var index=0; index<__expected.length; index++) {\n if (__split[index] !== __expected[index]) {\n $ERROR('#3.'+index+': __split['+index+'] === '+__expected[index]+'. Actual: '+__split[index] );\n }\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.14_A4_T15"
+ },
+ {
+ "section": "15.5.4.14",
+ "description": "Arguments are new RegExp and void 0, and instance is String(\"hello\")",
+ "test": "var __string = new String(\"hello\");\n\nvar __re = new RegExp;\n\nvar __split = __string.split(__re, void 0);\n\nvar __expected = [\"h\", \"e\", \"l\", \"l\", \"o\"];\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__split.constructor !== Array) {\n $ERROR('#1: __split.constructor === Array. Actual: '+__split.constructor );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (__split.length !== __expected.length) {\n $ERROR('#2: __split.length === __expected.length. Actual: '+__split.length );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#3\nfor(var index=0; index<__expected.length; index++) {\n if (__split[index] !== __expected[index]) {\n $ERROR('#3.'+index+': __split['+index+'] === '+__expected[index]+'. Actual: '+__split[index] );\n }\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.14_A4_T16"
+ },
+ {
+ "section": "15.5.4.14",
+ "description": "Arguments are new RegExp and undefined, and instance is String(\"hello\")",
+ "test": "var __string = new String(\"hello\");\n\nvar __re = new RegExp;\n\nvar __split = __string.split(__re, undefined);\n\nvar __expected = [\"h\", \"e\", \"l\", \"l\", \"o\"];\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__split.constructor !== Array) {\n $ERROR('#1: __split.constructor === Array. Actual: '+__split.constructor );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (__split.length !== __expected.length) {\n $ERROR('#2: __split.length === __expected.length. Actual: '+__split.length );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#3\nfor(var index=0; index<__expected.length; index++) {\n if (__split[index] !== __expected[index]) {\n $ERROR('#3.'+index+': __split['+index+'] === '+__expected[index]+'. Actual: '+__split[index] );\n }\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.14_A4_T17"
+ },
+ {
+ "section": "15.5.4.14",
+ "description": "Arguments are new RegExp and \"hi\", and instance is String(\"hello\")",
+ "test": "var __string = new String(\"hello\");\n\nvar __re = new RegExp;\n\nvar __split = __string.split(__re, \"hi\");\n\nvar __expected = [];\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__split.constructor !== Array) {\n $ERROR('#1: __split.constructor === Array. Actual: '+__split.constructor );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (__split.length !== __expected.length) {\n $ERROR('#2: __split.length === __expected.length. Actual: '+__split.length );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#3\nfor(var index=0; index<__expected.length; index++) {\n if (__split[index] !== __expected[index]) {\n $ERROR('#3.'+index+': __split['+index+'] === '+__expected[index]+'. Actual: '+__split[index] );\n }\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.14_A4_T18"
+ },
+ {
+ "section": "15.5.4.14",
+ "description": "Argument is regexp /\\s/, and instance is String(\"a b c de f\")",
+ "test": "var __string = new String(\"a b c de f\");\n\nvar __re = /\\s/;\n\nvar __split = __string.split(__re);\n\nvar __expected = [\"a\",\"b\",\"c\",\"de\",\"f\"];\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__split.constructor !== Array) {\n $ERROR('#1: __split.constructor === Array. Actual: '+__split.constructor );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (__split.length !== __expected.length) {\n $ERROR('#2: __split.length === __expected.length. Actual: '+__split.length );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#3\nfor(var index=0; index<__expected.length; index++) {\n if (__split[index] !== __expected[index]) {\n $ERROR('#3.'+index+': __split['+index+'] === '+__expected[index]+'. Actual: '+__split[index] );\n }\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.14_A4_T19"
+ },
+ {
+ "section": "15.5.4.14",
+ "description": "Arguments are regexp /l/ and 0, and instance is String(\"hello\")",
+ "test": "var __string = new String(\"hello\");\n\nvar __re = /l/;\n\nvar __split = __string.split(__re,0);\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__split.constructor !== Array) {\n $ERROR('#1: var __string = new String(\"hello\"); var __re = /l/; __split = __string.split(__re,0); __split.constructor === Array. Actual: '+__split.constructor );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (__split.length !== 0) {\n $ERROR('#2: var __string = new String(\"hello\"); var __re = /l/; __split = __string.split(__re,0); __split.length === 0. Actual: '+__split.length );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.14_A4_T2"
+ },
+ {
+ "section": "15.5.4.14",
+ "description": "Arguments are regexp /\\s/ and 3, and instance is String(\"a b c de f\")",
+ "test": "var __string = new String(\"a b c de f\");\n\nvar __re = /\\s/;\n\nvar __split = __string.split(__re,3);\n\nvar __expected = [\"a\",\"b\",\"c\"];\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__split.constructor !== Array) {\n $ERROR('#1: __split.constructor === Array. Actual: '+__split.constructor );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (__split.length !== __expected.length) {\n $ERROR('#2: __split.length === __expected.length. Actual: '+__split.length );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#3\nfor(var index=0; index<__expected.length; index++) {\n if (__split[index] !== __expected[index]) {\n $ERROR('#3.'+index+': __split['+index+'] === '+__expected[index]+'. Actual: '+__split[index] );\n }\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.14_A4_T20"
+ },
+ {
+ "section": "15.5.4.14",
+ "description": "Argument is regexp /\\X/, and instance is String(\"a b c de f\")",
+ "test": "var __string = new String(\"a b c de f\");\n\nvar __re = /X/;\n\nvar __split = __string.split(__re);\n\nvar __expected = [\"a b c de f\"];\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__split.constructor !== Array) {\n $ERROR('#1: __split.constructor === Array. Actual: '+__split.constructor );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (__split.length !== __expected.length) {\n $ERROR('#2: __split.length === __expected.length. Actual: '+__split.length );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#3\nif (__split[0] !== __expected[0]) {\n $ERROR('#3: __split[0] === '+__expected[0]+'. Actual: '+__split[index] );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.14_A4_T21"
+ },
+ {
+ "section": "15.5.4.14",
+ "description": "Argument is regexp /\\d+/, and instance is String(\"dfe23iu 34 =+65--\")",
+ "test": "var __string = new String(\"dfe23iu 34 =+65--\");\n\nvar __re = /\\d+/;\n\nvar __split = __string.split(__re);\n\nvar __expected = [\"dfe\",\"iu \",\" =+\",\"--\"];\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__split.constructor !== Array) {\n $ERROR('#1: __split.constructor === Array. Actual: '+__split.constructor );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (__split.length !== __expected.length) {\n $ERROR('#2: __split.length === __expected.length. Actual: '+__split.length );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#3\nfor(var index=0; index<__expected.length; index++) {\n if (__split[index] !== __expected[index]) {\n $ERROR('#3.'+index+': __split['+index+'] === '+__expected[index]+'. Actual: '+__split[index] );\n }\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.14_A4_T22"
+ },
+ {
+ "section": "15.5.4.14",
+ "description": "Argument is regexp RegExp('\\\\d+'), and instance is String(\"dfe23iu 34 =+65--\")",
+ "test": "var __string = new String(\"dfe23iu 34 =+65--\");\n\nvar __re = new RegExp('\\\\d+');\n\nvar __split = __string.split(__re);\n\nvar __expected = [\"dfe\",\"iu \",\" =+\",\"--\"];\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__split.constructor !== Array) {\n $ERROR('#1: __split.constructor === Array. Actual: '+__split.constructor );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (__split.length !== __expected.length) {\n $ERROR('#2: __split.length === __expected.length. Actual: '+__split.length );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#3\nfor(var index=0; index<__expected.length; index++) {\n if (__split[index] !== __expected[index]) {\n $ERROR('#3.'+index+': __split['+index+'] === '+__expected[index]+'. Actual: '+__split[index] );\n }\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.14_A4_T23"
+ },
+ {
+ "section": "15.5.4.14",
+ "description": "Argument is regexp /[a-z]/, and instance is String(\"abc\")",
+ "test": "var __string = new String(\"abc\");\n\nvar __re = /[a-z]/;\n\nvar __split = __string.split(__re);\n\nvar __expected = [\"\",\"\",\"\",\"\"];\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__split.constructor !== Array) {\n $ERROR('#1: __split.constructor === Array. Actual: '+__split.constructor );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (__split.length !== __expected.length) {\n $ERROR('#2: __split.length === __expected.length. Actual: '+__split.length );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#3\nfor(var index=0; index<__expected.length; index++) {\n if (__split[index] !== __expected[index]) {\n $ERROR('#3.'+index+': __split['+index+'] === '+__expected[index]+'. Actual: '+__split[index] );\n }\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.14_A4_T24"
+ },
+ {
+ "section": "15.5.4.14",
+ "description": "Argument is RegExp('[a-z]'), and instance is String(\"abc\")",
+ "test": "var __string = new String(\"abc\");\n\nvar __re = new RegExp('[a-z]');\n\nvar __split = __string.split(__re);\n\nvar __expected = [\"\",\"\",\"\",\"\"];\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__split.constructor !== Array) {\n $ERROR('#1: __split.constructor === Array. Actual: '+__split.constructor );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (__split.length !== __expected.length) {\n $ERROR('#2: __split.length === __expected.length. Actual: '+__split.length );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#3\nfor(var index=0; index<__expected.length; index++) {\n if (__split[index] !== __expected[index]) {\n $ERROR('#3.'+index+': __split['+index+'] === '+__expected[index]+'. Actual: '+__split[index] );\n }\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.14_A4_T25"
+ },
+ {
+ "section": "15.5.4.14",
+ "description": "Arguments are regexp /l/ and 1, and instance is String(\"hello\")",
+ "test": "var __string = new String(\"hello\");\n\nvar __re = /l/;\n\nvar __split = __string.split(__re,1);\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__split.constructor !== Array) {\n $ERROR('#1: var __string = new String(\"hello\"); var __re = /l/; __split = __string.split(__re,1); __split.constructor === Array. Actual: '+__split.constructor );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (__split.length !== 1) {\n $ERROR('#2: var __string = new String(\"hello\"); var __re = /l/; __split = __string.split(__re,1); __split.length === 1. Actual: '+__split.length );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#3\nif (__split[0] !== \"he\") {\n $ERROR('#3: var __string = new String(\"hello\"); var __re = /l/; __split = __string.split(__re,1); __split[0] === \"he\". Actual: '+__split[0] );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.14_A4_T3"
+ },
+ {
+ "section": "15.5.4.14",
+ "description": "Arguments are regexp /l/ and 2, and instance is String(\"hello\")",
+ "test": "var __string = new String(\"hello\");\n\nvar __re = /l/;\n\nvar __split = __string.split(__re,2);\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__split.constructor !== Array) {\n $ERROR('#1: var __string = new String(\"hello\"); var __re = /l/; __split = __string.split(__re,2); __split.constructor === Array. Actual: '+__split.constructor );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (__split.length !== 2) {\n $ERROR('#2: var __string = new String(\"hello\"); var __re = /l/; __split = __string.split(__re,2); __split.length === 2. Actual: '+__split.length );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#3\nif (__split[0] !== \"he\") {\n $ERROR('#3: var __string = new String(\"hello\"); var __re = /l/; __split = __string.split(__re,2); __split[0] === \"he\". Actual: '+__split[0]);\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#4\nif (__split[1] !== \"\") {\n $ERROR('#4: var __string = new String(\"hello\"); var __re = /l/; __split = __string.split(__re,2); __split[1] === \"\". Actual: '+__split[1] );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.14_A4_T4"
+ },
+ {
+ "section": "15.5.4.14",
+ "description": "Arguments are regexp /l/ and 3, and instance is String(\"hello\")",
+ "test": "var __string = new String(\"hello\");\n\nvar __re = /l/;\n\nvar __split = __string.split(__re,3);\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__split.constructor !== Array) {\n $ERROR('#1: var __string = new String(\"hello\"); var __re = /l/; __split = __string.split(__re,3); __split.constructor === Array. Actual: '+__split.constructor );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (__split.length !== 3) {\n $ERROR('#2: var __string = new String(\"hello\"); var __re = /l/; __split = __string.split(__re,3); __split.length === 3. Actual: '+__split.length );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#3\nif (__split[0] !== \"he\") {\n $ERROR('#3: var __string = new String(\"hello\"); var __re = /l/; __split = __string.split(__re,3); __split[0] === \"he\". Actual: '+__split[0]);\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#4\nif (__split[1] !== \"\") {\n $ERROR('#4: var __string = new String(\"hello\"); var __re = /l/; __split = __string.split(__re,3); __split[1] === \"\". Actual: '+__split[1]);\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#5\nif (__split[2] !== \"o\") {\n $ERROR('#5: var __string = new String(\"hello\"); var __re = /l/; __split = __string.split(__re,3); __split[2] === \"o\". Actual: '+__split[2] );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.14_A4_T5"
+ },
+ {
+ "section": "15.5.4.14",
+ "description": "Arguments are regexp /l/ and 4, and instance is String(\"hello\")",
+ "test": "var __string = new String(\"hello\");\n\nvar __re = /l/;\n\nvar __split = __string.split(__re,4);\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__split.constructor !== Array) {\n $ERROR('#1: var __string = new String(\"hello\"); var __re = /l/; __split = __string.split(__re,4); __split.constructor === Array. Actual: '+__split.constructor );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (__split.length !== 3) {\n $ERROR('#2: var __string = new String(\"hello\"); var __re = /l/; __split = __string.split(__re,4); __split.length === 3. Actual: '+__split.length );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#3\nif (__split[0] !== \"he\") {\n $ERROR('#3: var __string = new String(\"hello\"); var __re = /l/; __split = __string.split(__re,4); __split[0] === \"he\". Actual: '+__split[0]);\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#4\nif (__split[1] !== \"\") {\n $ERROR('#4: var __string = new String(\"hello\"); var __re = /l/; __split = __string.split(__re,4); __split[1] === \"\". Actual: '+__split[1]);\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#5\nif (__split[2] !== \"o\") {\n $ERROR('#5: var __string = new String(\"hello\"); var __re = /l/; __split = __string.split(__re,4); __split[2] === \"o\". Actual: '+__split[2] );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.14_A4_T6"
+ },
+ {
+ "section": "15.5.4.14",
+ "description": "Arguments are regexp /l/ and void 0, and instance is String(\"hello\")",
+ "test": "var __string = new String(\"hello\");\n\nvar __re = /l/;\n\nvar __split = __string.split(__re, void 0);\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__split.constructor !== Array) {\n $ERROR('#1: var __string = new String(\"hello\"); var __re = /l/; __split = __string.split(__re, void 0); __split.constructor === Array. Actual: '+__split.constructor );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (__split.length !== 3) {\n $ERROR('#2: var __string = new String(\"hello\"); var __re = /l/; __split = __string.split(__re, void 0); __split.length === 3. Actual: '+__split.length );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#3\nif (__split[0] !== \"he\") {\n $ERROR('#3: var __string = new String(\"hello\"); var __re = /l/; __split = __string.split(__re, void 0); __split[0] === \"he\". Actual: '+__split[0]);\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#4\nif (__split[1] !== \"\") {\n $ERROR('#4: var __string = new String(\"hello\"); var __re = /l/; __split = __string.split(__re, void 0); __split[1] === \"\". Actual: '+__split[1]);\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#5\nif (__split[2] !== \"o\") {\n $ERROR('#5: var __string = new String(\"hello\"); var __re = /l/; __split = __string.split(__re, void 0); __split[2] === \"o\". Actual: '+__split[2] );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.14_A4_T7"
+ },
+ {
+ "section": "15.5.4.14",
+ "description": "Arguments are regexp /l/ and \"hi\", and instance is String(\"hello\")",
+ "test": "var __string = new String(\"hello\");\n\nvar __re = /l/;\n\nvar __split = __string.split(__re, \"hi\");\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__split.constructor !== Array) {\n $ERROR('#1: var __string = new String(\"hello\"); var __re = /l/; __split = __string.split(__re, \"hi\"); __split.constructor === Array. Actual: '+__split.constructor );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (__split.length !== 0) {\n $ERROR('#2: var __string = new String(\"hello\"); var __re = /l/; __split = __string.split(__re, \"hi\"); __split.length === 0. Actual: '+__split.length );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.14_A4_T8"
+ },
+ {
+ "section": "15.5.4.14",
+ "description": "Arguments are regexp /l/ and undefined, and instance is String(\"hello\")",
+ "test": "var __string = new String(\"hello\");\n\nvar __re = /l/;\n\nvar __split = __string.split(__re, undefined);\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__split.constructor !== Array) {\n $ERROR('#1: var __string = new String(\"hello\"); var __re = /l/; __split = __string.split(__re, undefined); __split.constructor === Array. Actual: '+__split.constructor );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (__split.length !== 3) {\n $ERROR('#2: var __string = new String(\"hello\"); var __re = /l/; __split = __string.split(__re, undefined); __split.length === 3. Actual: '+__split.length );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#3\nif (__split[0] !== \"he\") {\n $ERROR('#3: var __string = new String(\"hello\"); var __re = /l/; __split = __string.split(__re, undefined); __split[0] === \"he\". Actual: '+__split[0]);\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#4\nif (__split[1] !== \"\") {\n $ERROR('#4: var __string = new String(\"hello\"); var __re = /l/; __split = __string.split(__re, undefined); __split[1] === \"\". Actual: '+__split[1]);\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#5\nif (__split[2] !== \"o\") {\n $ERROR('#5: var __string = new String(\"hello\"); var __re = /l/; __split = __string.split(__re, undefined); __split[2] === \"o\". Actual: '+__split[2] );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.14_A4_T9"
+ },
+ {
+ "section": "15.5.4.14, 13.2",
+ "description": "Checking String.prototype.split.prototype",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (String.prototype.split.prototype !== undefined) {\n $ERROR('#1: String.prototype.split.prototype === undefined. Actual: '+String.prototype.split.prototype );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.14_A6"
+ },
+ {
+ "section": "15.5.4.14, 13.2",
+ "description": "Checking if creating the String.prototype.split object fails",
+ "test": "var __FACTORY = String.prototype.split;\n\ntry {\n var __instance = new __FACTORY;\n $FAIL('#1: __FACTORY = String.prototype.split; \"__instance = new __FACTORY\" lead to throwing exception');\n} catch (e) {}\n",
+ "id": "S15.5.4.14_A7"
+ },
+ {
+ "section": "15.5.4.14",
+ "description": "Checking if enumerating the String.prototype.split.length property fails",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#0\nif (!(String.prototype.split.hasOwnProperty('length'))) {\n $FAIL('#0: String.prototype.split.hasOwnProperty(\\'length\\') return true. Actual: '+String.prototype.split.hasOwnProperty('length'));\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n\n//////////////////////////////////////////////////////////////////////////////\n// CHECK#1\nif (String.prototype.split.propertyIsEnumerable('length')) {\n $ERROR('#1: String.prototype.split.propertyIsEnumerable(\\'length\\') return false');\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n// CHECK#2\nvar count=0;\n\nfor (p in String.prototype.split){\n if (p===\"length\") count++;\n}\n\nif (count !== 0) {\n $ERROR('#2: count=0; for (p in String.prototype.split){if (p===\"length\") count++;}; count === 0. Actual: '+count );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.14_A8"
+ },
+ {
+ "section": "15.5.4.14",
+ "description": "Checking if deleting the String.prototype.split.length property fails",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#0\nif (!(String.prototype.split.hasOwnProperty('length'))) {\n $FAIL('#0: String.prototype.split.hasOwnProperty(\\'length\\') return true. Actual: '+String.prototype.split.hasOwnProperty('length'));\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (delete String.prototype.split.length) {\n $ERROR('#1: delete String.prototype.split.length return false');\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (!(String.prototype.split.hasOwnProperty('length'))) {\n $FAIL('#2: delete String.prototype.split.length; String.prototype.split.hasOwnProperty(\\'length\\') return true. Actual: '+String.prototype.split.hasOwnProperty('length'));\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.14_A9"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.5.4.15_String.prototype.substring.json b/website/resources/scripts/testcases2/15.5.4.15_String.prototype.substring.json
new file mode 100644
index 000000000..960ef020f
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.5.4.15_String.prototype.substring.json
@@ -0,0 +1,260 @@
+{
+ "testCollection": {
+ "name": "15.5.4.15_String.prototype.substring",
+ "numTests": 42,
+ "tests": [
+ {
+ "section": "15.5.4.15",
+ "description": "Checking if varying the String.prototype.substring.length property fails",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (!(String.prototype.substring.hasOwnProperty('length'))) {\n $FAIL('#1: String.prototype.substring.hasOwnProperty(\\'length\\') return true. Actual: '+String.prototype.substring.hasOwnProperty('length'));\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\nvar __obj = String.prototype.substring.length;\n\nString.prototype.substring.length = function(){return \"shifted\";};\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (String.prototype.substring.length !== __obj) {\n $ERROR('#2: __obj = String.prototype.substring.length; String.prototype.substring.length = function(){return \"shifted\";}; String.prototype.substring.length === __obj. Actual: '+String.prototype.substring.length );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.15_A10"
+ },
+ {
+ "section": "15.5.4.15",
+ "description": "Checking String.prototype.substring.length",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (!(String.prototype.substring.hasOwnProperty(\"length\"))) {\n $ERROR('#1: String.prototype.substring.hasOwnProperty(\"length\") return true. Actual: '+String.prototype.substring.hasOwnProperty(\"length\"));\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (String.prototype.substring.length !== 2) {\n $ERROR('#2: String.prototype.substring.length === 2. Actual: '+String.prototype.substring.length );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.15_A11"
+ },
+ {
+ "section": "15.5.4.15",
+ "description": "Arguments are false and true, and instance is object",
+ "test": "var __instance = new Object(true);\n\n__instance.substring = String.prototype.substring;\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__instance.substring(false, true) !== \"t\") {\n $ERROR('#1: __instance = new Object(true); __instance.substring = String.prototype.substring; __instance.substring(false, true) === \"t\". Actual: '+__instance.substring(false, true) );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.15_A1_T1"
+ },
+ {
+ "section": "15.5.4.15",
+ "description": "Arguments are object and function call, and instance is String, object have overrided valueOf function",
+ "test": "var __obj = {valueOf:function(){return 2;}};\n\nvar __str = \"\\u0035ABBBABAB\";\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nwith(__str){\n if (substring(__obj, function(){return substring(0,1);}()) !== \"BBB\") {\n $ERROR('#1: var __obj = {valueOf:function(){return 2;}}; var __str = \"\\u0035ABBBABAB\"; substring(__obj, function(){return substring(0,1);}()) === \"BBB\". Actual: '+substring(__obj, function(){return substring(0,1);}()) );\n }\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\nvar x;\n",
+ "id": "S15.5.4.15_A1_T10"
+ },
+ {
+ "section": "15.5.4.15",
+ "description": "Arguments are objects, and instance is string, objects have overrided valueOf function, that return exception",
+ "test": "var __obj = {valueOf:function(){throw \"instart\";}};\nvar __obj2 = {valueOf:function(){throw \"inend\";}};\nvar __str = {str__:\"ABB\\u0041BABAB\"};\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nwith(__str){\n with(str__){\n try {\n var x = substring(__obj,__obj2);\n $FAIL('#1: \"var x = substring(__obj,__obj2)\" lead to throw exception');\n } catch (e) {\n if (e!==\"instart\") {\n $ERROR('#1.1: Exception === \"instart\". Actual: '+e);\n }\n }\n }\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.15_A1_T11"
+ },
+ {
+ "section": "15.5.4.15",
+ "description": "Arguments are objects, and instance is string.\nFirst object have overrided valueOf function and toString function, that return exception.\nSecond object have overrided valueOf function, that return exception",
+ "test": "var __obj = {valueOf:function(){return {};}, toString:function(){throw \"instart\";}};\nvar __obj2 = {valueOf:function(){throw \"inend\";}};\nvar __str = new String(\"ABB\\u0041BABAB\");\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nwith(__str){\n try {\n var x = substring(__obj, __obj2);\n $FAIL('#1: \"var x = substring(__obj,__obj2)\" lead to throw exception');\n } catch (e) {\n if (e!==\"instart\") {\n $ERROR('#1.1: Exception ===\"instart\". Actual: '+e);\n }\n }\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.15_A1_T12"
+ },
+ {
+ "section": "15.5.4.15",
+ "description": "Arguments are objects, and instance is string.\nFirst object have overrided valueOf and toString functions.\nSecond object have overrided toString function, that return exception",
+ "test": "var __obj = {valueOf:function(){return {};}, toString:function(){return 1;}};\nvar __obj2 = {toString:function(){throw \"inend\";}};\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\ntry {\n var x = \"ABB\\u0041BABAB\\u0031BBAA\".substring(__obj, __obj2);\n $FAIL('#1: var x = \"ABB\\\\u0041BABAB\\\\u0031BBAA\".substring(__obj,__obj2) lead to throw exception');\n} catch (e) {\n if (e!==\"inend\") {\n $ERROR('#1.1: Exception === \"inend\". Actual: '+e);\n }\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n",
+ "id": "S15.5.4.15_A1_T13"
+ },
+ {
+ "section": "15.5.4.15",
+ "description": "Used one argument, that is function(){}(). Instance is string",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (\"report\".substring(function(){}()) !== \"report\") {\n $ERROR('#1: \"report\".substring(function(){}()) === \"report\". Actual: '+\"report\".substring(function(){}()) );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.15_A1_T14"
+ },
+ {
+ "section": "15.5.4.15",
+ "description": "Call substring without arguments. Instance is Number with prototype.substring = String.prototype.substring",
+ "test": "var __num = 11.001002;\n\nNumber.prototype.substring = String.prototype.substring;\n\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__num.substring()!==\"11.001002\") {\n $ERROR('#1: var __num = 11.001002; Number.prototype.substring = String.prototype.substring; __num.substring()===\"11.001002\". Actual: '+__num.substring());\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.15_A1_T15"
+ },
+ {
+ "section": "15.5.4.15",
+ "description": "Arguments are function call and x, and instance is Boolean. x is undefined variable",
+ "test": "var __instance = new Boolean;\n\n__instance.substring = String.prototype.substring;\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__instance.substring(function(){return true;}(),x) !== \"alse\") {\n $ERROR('#1: var x; __instance = new Boolean; __instance.substring = String.prototype.substring; __instance.substring(function(){return true;}(),x) === \"alse\". Actual: '+__instance.substring(function(){return true;}(),x) );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\nvar x;\n",
+ "id": "S15.5.4.15_A1_T2"
+ },
+ {
+ "section": "15.5.4.15",
+ "description": "Checking by using eval",
+ "test": "var substring = String.prototype.substring;\n\nif (typeof toString === \"undefined\"){\n toString = Object.prototype.toString;\n}\n\nvar __class__ = toString();\nvar __toggle = 1;\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (substring(eval(\"\\\"1\\\"\"),{valueOf:function(){return \"0x0007\"}})!==\"object\") {\n $ERROR('#1: substring(eval(\"\\\\\"1\\\\\"\"),{valueOf:function(){return \"0x0007\"}})===\"object\". Actual: '+substring(eval(\"\\\"1\\\"\"),{valueOf:function(){return \"0x0007\"}}));\n};\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.15_A1_T3"
+ },
+ {
+ "section": "15.5.4.15",
+ "description": "Arguments are null and number, and instance is function call, that returned string",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (function(){return \"gnulluna\"}().substring(null, -3) !== \"\") {\n $ERROR('#1: function(){return \"gnulluna\"}().substring(null, -3) === \"\". Actual: '+function(){return \"gnulluna\"}().substring(null, -3) );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.15_A1_T4"
+ },
+ {
+ "section": "15.5.4.15",
+ "description": "Arguments are null and Function(), and instance is function object, that have overrided valueOf function",
+ "test": "__func.valueOf=function(){return \"gnulluna\"};\n\nFunction.prototype.substring=String.prototype.substring;\n\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__func.substring(null, Function()) !== \"\") {\n $ERROR('#1: __func.valueOf=function(){return \"gnulluna\"}; Function.prototype.substring=String.prototype.substring; function __func(){}; __func.substring(null, Function()) === \"\". Actual: '+__func.substring(null, Function()) );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\nfunction __func(){};\n",
+ "id": "S15.5.4.15_A1_T5"
+ },
+ {
+ "section": "15.5.4.15",
+ "description": "Arguments are x and number, and instance is new String, x is undefined variable",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (new String(\"undefined\").substring(x,3) !== \"und\") {\n $ERROR('#1: var x; new String(\"undefined\").substring(x,3) === \"und\". Actual: '+new String(\"undefined\").substring(x,3) );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\nvar x;\n",
+ "id": "S15.5.4.15_A1_T6"
+ },
+ {
+ "section": "15.5.4.15",
+ "description": "Arguments are symbol and undefined, and instance is String",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (String(void 0).substring(\"e\",undefined) !== \"undefined\") {\n $ERROR('#1: String(void 0).substring(\"e\",undefined) === \"undefined\". Actual: '+String(void 0).substring(\"e\",undefined) );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.15_A1_T7"
+ },
+ {
+ "section": "15.5.4.15",
+ "description": "Arguments are negative number and void 0, and instance is String(object), object have overrided toString function",
+ "test": "var __obj = {toString:function(){}};\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (String(__obj).substring(-4,void 0) !== \"undefined\") {\n $ERROR('#1: __obj = {toString:function(){}}; String(__obj).substring(-4,void 0) === \"undefined\". Actual: '+String(__obj).substring(-4,void 0) );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.15_A1_T8"
+ },
+ {
+ "section": "15.5.4.15",
+ "description": "Arguments are undefined and object, and instance is new String(object), object have overrided valueOf and toString functions",
+ "test": "var __obj = {\n valueOf:function(){},\n toString:void 0\n};\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (new String(__obj).substring(/*(function(){})()*/undefined,undefined) !== \"undefined\") {\n $ERROR('#1: __obj = {valueOf:function(){}, toString:void 0}; new String(__obj).substring(/*(function(){})()*/undefined,undefined) === \"undefined\". Actual: '+new String(__obj).substring(/*(function(){})()*/undefined,undefined) );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.15_A1_T9"
+ },
+ {
+ "section": "15.5.4.15",
+ "description": "Checking type of substring()",
+ "test": "var __string = new String(\"this is a string object\");\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (typeof __string.substring() !== \"string\") {\n $ERROR('#1: __string = new String(\"this is a string object\"); typeof __string.substring() === \"string\". Actual: '+typeof __string.substring() );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.15_A2_T1"
+ },
+ {
+ "section": "15.5.4.15",
+ "description": "start is 0, end is 8",
+ "test": "var __string = new String(\"this_is_a_string object\");\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__string.substring(0,8) !== \"this_is_\") {\n $ERROR('#1: __string = new String(\"this_is_a_string object\"); __string.substring(0,8) === \"this_is_\". Actual: '+__string.substring(0,8) );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.15_A2_T10"
+ },
+ {
+ "section": "15.5.4.15",
+ "description": "start is NaN, end is Infinity",
+ "test": "var __string = new String('this is a string object');\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__string.substring(NaN, Infinity) !== \"this is a string object\") {\n $ERROR('#1: __string = new String(\\'this is a string object\\'); __string.substring(NaN, Infinity) === \"this is a string object\". Actual: '+__string.substring(NaN, Infinity) );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.15_A2_T2"
+ },
+ {
+ "section": "15.5.4.15",
+ "description": "Call substring from empty String object",
+ "test": "var __string = new String(\"\");\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__string.substring(1,0) !== \"\") {\n $ERROR('#1: __string = new String(\"\"); __string.substring(1,0) === \"\". Actual: '+__string.substring(1,0) );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.15_A2_T3"
+ },
+ {
+ "section": "15.5.4.15",
+ "description": "start is Infinity, end is NaN",
+ "test": "var __string = new String(\"this is a string object\");\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__string.substring(Infinity, NaN) !== \"this is a string object\") {\n $ERROR('#1: __string = new String(\"this is a string object\"); __string.substring(Infinity, NaN) === \"this is a string object\". Actual: '+__string.substring(Infinity, NaN) );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.15_A2_T4"
+ },
+ {
+ "section": "15.5.4.15",
+ "description": "start is Infinity, end is Infinity",
+ "test": "var __string = new String(\"this is a string object\");\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__string.substring(Infinity, Infinity) !== \"\") {\n $ERROR('#1: __string = new String(\"this is a string object\"); __string.substring(Infinity, Infinity) === \"\". Actual: '+__string.substring(Infinity, Infinity) );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.15_A2_T5"
+ },
+ {
+ "section": "15.5.4.15",
+ "description": "start is negative float number, end is 0",
+ "test": "var __string = new String(\"this is a string object\");\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__string.substring(-0.01,0) !== \"\") {\n $ERROR('#1: __string = new String(\"this is a string object\"); __string.substring(-0.01,0) === \"\". Actual: '+__string.substring(-0.01,0) );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.15_A2_T6"
+ },
+ {
+ "section": "15.5.4.15",
+ "description": "start is tested_string.length, end is tested_string.length",
+ "test": "var __string = new String(\"this is a string object\");\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__string.substring(__string.length, __string.length) !== \"\") {\n $ERROR('#1: __string = new String(\"this is a string object\"); __string.substring(__string.length, __string.length) === \"\". Actual: '+__string.substring(__string.length, __string.length) );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.15_A2_T7"
+ },
+ {
+ "section": "15.5.4.15",
+ "description": "start is tested_string.length+1, end is 0",
+ "test": "var __string = new String(\"this is a string object\");\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__string.substring(__string.length+1, 0) !== \"this is a string object\") {\n $ERROR('#1: __string = new String(\"this is a string object\"); __string.substring(__string.length+1, 0) === \"this is a string object\". Actual: '+__string.substring(__string.length+1, 0) );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.15_A2_T8"
+ },
+ {
+ "section": "15.5.4.15",
+ "description": "start is -Infinity, end is -Infinity",
+ "test": "var __string = new String(\"this is a string object\");\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__string.substring(-Infinity, -Infinity) !== \"\") {\n $ERROR('#1: __string = new String(\"this is a string object\"); __string.substring(-Infinity, -Infinity) === \"\". Actual: '+__string.substring(-Infinity, -Infinity) );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.15_A2_T9"
+ },
+ {
+ "section": "15.5.4.15",
+ "description": "Apply String.prototype.substring to Array instance. Start is Infinity, end is -Infinity",
+ "test": "var __instance = new Array(1,2,3,4,5); \n__instance.substring = String.prototype.substring;\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__instance.substring(Infinity,-Infinity) !== \"1,2,3,4,5\") {\n $ERROR('#1: __instance = new Array(1,2,3,4,5); __instance.substring = String.prototype.substring; __instance.substring(Infinity,-Infinity) === \"1,2,3,4,5\". Actual: '+__instance.substring(Infinity,-Infinity) );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.15_A3_T1"
+ },
+ {
+ "section": "15.5.4.15",
+ "description": "Checknig if applying String.prototype.substring to Function object instance passes",
+ "test": "__FACTORY.prototype.substring = String.prototype.substring;\n\nvar __instance = new __FACTORY(void 0);\n \n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__instance.substring(0, 100) !== \"undefined\") {\n $ERROR('#1: __instance.substring(0, 100) === \"undefined\". Actual: '+__instance.substring(0, 100) );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\nfunction __FACTORY( value ) {\n this.value = value;\n this.toString = function() { return this.value+''; }\n}\n",
+ "id": "S15.5.4.15_A3_T10"
+ },
+ {
+ "section": "15.5.4.15",
+ "description": "Apply String.prototype.substring to Boolean instance. Start is new Array(), end is new Boolean(1)",
+ "test": "var __instance = new Boolean();\n \n__instance.substring = String.prototype.substring;\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__instance.substring(new Array(), new Boolean(1)) !== \"f\") {\n $ERROR('#1: __instance = new Boolean(); __instance.substring = String.prototype.substring; __instance.substring(new Array(), new Boolean(1)) === \"f\". Actual: '+__instance.substring(new Array(), new Boolean(1)) );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.15_A3_T11"
+ },
+ {
+ "section": "15.5.4.15",
+ "description": "Apply String.prototype.substring to Array instance. Start is 9, end is -Infinity",
+ "test": "var __instance = new Array(1,2,3,4,5); \n__instance.substring = String.prototype.substring;\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__instance.substring(9,-Infinity) !== \"1,2,3,4,5\") {\n $ERROR('#1: __instance = new Array(1,2,3,4,5); __instance.substring = String.prototype.substring; __instance.substring(9,-Infinity) === \"1,2,3,4,5\". Actual: '+__instance.substring(9,-Infinity) );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.15_A3_T2"
+ },
+ {
+ "section": "15.5.4.15",
+ "description": "Apply String.prototype.substring to Array instance. Start is true, end is false",
+ "test": "var __instance = new Array(1,2,3,4,5); \n__instance.substring = String.prototype.substring;\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__instance.substring(true, false) !== \"1\") {\n $ERROR('#1: __instance = new Array(1,2,3,4,5); __instance.substring = String.prototype.substring; __instance.substring(true, false) === \"1\". Actual: '+__instance.substring(true, false) );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.15_A3_T3"
+ },
+ {
+ "section": "15.5.4.15",
+ "description": "Apply String.prototype.substring to Array instance. Start is '4', end is '5'",
+ "test": "var __instance = new Array(1,2,3,4,5); \n__instance.substring = String.prototype.substring;\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__instance.substring('4', '5') !== \"3\") {\n $ERROR('#1: __instance = new Array(1,2,3,4,5); __instance.substring = String.prototype.substring; __instance.substring(\\'4\\', \\'5\\') === \"3\". Actual: '+__instance.substring('4', '5') );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.15_A3_T4"
+ },
+ {
+ "section": "15.5.4.15",
+ "description": "Apply String.prototype.substring to Object instance. Start is 8, end is 0",
+ "test": "var __instance = new Object(); \n__instance.substring = String.prototype.substring;\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__instance.substring(8,0) !== \"[object \") {\n $ERROR('#1: __instance = new Object(); __instance.substring = String.prototype.substring; __instance.substring(8,0) === \"[object \". Actual: '+__instance.substring(8,0) );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.15_A3_T5"
+ },
+ {
+ "section": "15.5.4.15",
+ "description": "Apply String.prototype.substring to Object instance. Start is 8, end is length of object.toString",
+ "test": "var __instance = new Object(); \n__instance.substring = String.prototype.substring;\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__instance.substring(8, __instance.toString().length) !== \"Object]\") {\n $ERROR('#1: __instance = new Object(); __instance.substring = String.prototype.substring; __instance.substring(8, __instance.toString().length) === \"Object]\". Actual: '+__instance.substring(8, __instance.toString().length) );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.15_A3_T6"
+ },
+ {
+ "section": "15.5.4.15",
+ "description": "Apply String.prototype.substring to Object instance. Call instance.substring(...).substring(...)",
+ "test": "var __instance = function(){};\n \n__instance.substring = String.prototype.substring;\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__instance.substring(-Infinity,8) !== \"function\") {\n $ERROR('#1: __instance = function(){}; __instance.substring = String.prototype.substring; __instance.substring(-Infinity,8) === \"function\". Actual: '+__instance.substring(8,Infinity).substring(-Infinity,1) );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.15_A3_T7"
+ },
+ {
+ "section": "15.5.4.15",
+ "description": "Apply String.prototype.substring to Number instance. Start is Infinity, end is NaN",
+ "test": "var __instance = new Number(NaN);\n \n__instance.substring = String.prototype.substring;\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__instance.substring(Infinity, NaN) !== \"NaN\") {\n $ERROR('#1: __instance = new Number(NaN); __instance.substring = String.prototype.substring; __instance.substring(Infinity, NaN) === \"NaN\". Actual: '+__instance.substring(Infinity, NaN) );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.15_A3_T8"
+ },
+ {
+ "section": "15.5.4.15",
+ "description": "Apply String.prototype.substring to Math instance. Start is Math.PI, end is -10",
+ "test": "var __instance = Math;\n \n__instance.substring = String.prototype.substring;\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__instance.substring(Math.PI, -10) !== \"[ob\") {\n $ERROR('#1: __instance = Math; __instance.substring = String.prototype.substring; __instance.substring(Math.PI, -10) === \"[ob\". Actual: '+__instance.substring(Math.PI, -10) );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.15_A3_T9"
+ },
+ {
+ "section": "15.5.4.15, 13.2",
+ "description": "Checking String.prototype.substring.prototype",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (String.prototype.substring.prototype !== undefined) {\n $ERROR('#1: String.prototype.substring.prototype === undefined. Actual: '+String.prototype.substring.prototype );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.15_A6"
+ },
+ {
+ "section": "15.5.4.15, 13.2",
+ "description": "Checking if creating the String.prototype.substring object fails",
+ "test": "var __FACTORY = String.prototype.substring;\n\ntry {\n var __instance = new __FACTORY;\n $FAIL('#1: __FACTORY = String.prototype.substring; \"__instance = new __FACTORY\" lead to throwing exception');\n} catch (e) {\n if ((e instanceof TypeError) !== true) {\n $ERROR('#1.2: undefined = 1 throw a TypeError. Actual: ' + (e)); \n }\n $PRINT(e);\n}\n",
+ "id": "S15.5.4.15_A7"
+ },
+ {
+ "section": "15.5.4.15",
+ "description": "Checking if enumerating the String.prototype.substring.length property fails",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#0\nif (!(String.prototype.substring.hasOwnProperty('length'))) {\n $FAIL('#0: String.prototype.substring.hasOwnProperty(\\'length\\') return true. Actual: '+String.prototype.substring.hasOwnProperty('length'));\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n\n//////////////////////////////////////////////////////////////////////////////\n// CHECK#1\nif (String.prototype.substring.propertyIsEnumerable('length')) {\n $ERROR('#1: String.prototype.substring.propertyIsEnumerable(\\'length\\') return false');\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n// CHECK#2\nvar count=0;\n\nfor (var p in String.prototype.substring){\n if (p===\"length\") count++;\n}\n\nif (count !== 0) {\n $ERROR('#2: count=0; for (p in String.prototype.substring){if (p===\"length\") count++;} count === 0. Actual: '+count );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.15_A8"
+ },
+ {
+ "section": "15.5.4.15",
+ "description": "Checking if deleting the String.prototype.substring.length property fails",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#0\nif (!(String.prototype.substring.hasOwnProperty('length'))) {\n $FAIL('#0: String.prototype.substring.hasOwnProperty(\\'length\\') return true. Actual: '+String.prototype.substring.hasOwnProperty('length'));\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (delete String.prototype.substring.length) {\n $ERROR('#1: delete String.prototype.substring.length return false');\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (!(String.prototype.substring.hasOwnProperty('length'))) {\n $FAIL('#2: delete String.prototype.substring.length; String.prototype.substring.hasOwnProperty(\\'length\\') return true. Actual: '+String.prototype.substring.hasOwnProperty('length'));\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.15_A9"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.5.4.16_String.prototype.toLowerCase.json b/website/resources/scripts/testcases2/15.5.4.16_String.prototype.toLowerCase.json
new file mode 100644
index 000000000..f7e70e472
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.5.4.16_String.prototype.toLowerCase.json
@@ -0,0 +1,134 @@
+{
+ "testCollection": {
+ "name": "15.5.4.16_String.prototype.toLowerCase",
+ "numTests": 21,
+ "tests": [
+ {
+ "section": "15.5.4.16",
+ "description": "Checking if varying the String.prototype.toLowerCase.length property fails",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (!(String.prototype.toLowerCase.hasOwnProperty('length'))) {\n $FAIL('#1: String.prototype.toLowerCase.hasOwnProperty(\\'length\\') return true. Actual: '+String.prototype.toLowerCase.hasOwnProperty('length'));\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\nvar __obj = String.prototype.toLowerCase.length;\n\nString.prototype.toLowerCase.length = function(){return \"shifted\";};\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (String.prototype.toLowerCase.length !== __obj) {\n $ERROR('#2: __obj = String.prototype.toLowerCase.length; String.prototype.toLowerCase.length = function(){return \"shifted\";}; String.prototype.toLowerCase.length === __obj. Actual: '+String.prototype.toLowerCase.length );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.16_A10"
+ },
+ {
+ "section": "15.5.4.16",
+ "description": "Checking String.prototype.toLowerCase.length",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (!(String.prototype.toLowerCase.hasOwnProperty(\"length\"))) {\n $ERROR('#1: String.prototype.toLowerCase.hasOwnProperty(\"length\") return true. Actual: '+String.prototype.toLowerCase.hasOwnProperty(\"length\"));\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (String.prototype.toLowerCase.length !== 0) {\n $ERROR('#2: String.prototype.toLowerCase.length === 0. Actual: '+String.prototype.toLowerCase.length );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.16_A11"
+ },
+ {
+ "section": "15.5.4.16",
+ "description": "Arguments is true, and instance is object",
+ "test": "var __instance = new Object(true);\n\n__instance.toLowerCase = String.prototype.toLowerCase;\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__instance.toLowerCase() !== \"true\") {\n $ERROR('#1: __instance = new Object(true); __instance.toLowerCase = String.prototype.toLowerCase; __instance.toLowerCase() === \"true\". Actual: '+__instance.toLowerCase() );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.16_A1_T1"
+ },
+ {
+ "section": "15.5.4.16",
+ "description": "Call toLowerCase() function of object with overrode toString function",
+ "test": "var __obj = {toString:function(){return \"\\u0041B\";}}\n__obj.toLowerCase = String.prototype.toLowerCase;\n\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__obj.toLowerCase() !==\"ab\") {\n $ERROR('#1: var __obj = {toString:function(){return \"\\u0041B\";}}; __obj.toLowerCase = String.prototype.toLowerCase; __obj.toLowerCase() ===\"ab\". Actual: '+__obj.toLowerCase() );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.16_A1_T10"
+ },
+ {
+ "section": "15.5.4.16",
+ "description": "Override toString function, toString throw exception, then call toLowerCase() function for this object",
+ "test": "var __obj = {toString:function(){throw \"intostr\";}}\n__obj.toLowerCase = String.prototype.toLowerCase;\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\ntry {\n var x = __obj.toLowerCase();\n \t$FAIL('#1: \"var x = __obj.toLowerCase()\" lead to throwing exception');\n} catch (e) {\n if (e!==\"intostr\") {\n $ERROR('#1.1: Exception === \"intostr\". Actual: '+e);\n }\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.16_A1_T11"
+ },
+ {
+ "section": "15.5.4.16",
+ "description": "Override toString and valueOf functions, valueOf throw exception, then call toLowerCase() function for this object",
+ "test": "var __obj = {toString:function(){return {};},valueOf:function(){throw \"intostr\";}}\n__obj.toLowerCase = String.prototype.toLowerCase;\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\ntry {\n var x = __obj.toLowerCase();\n \t$FAIL('#1: \"var x = __obj.toLowerCase()\" lead to throwing exception');\n} catch (e) {\n if (e!==\"intostr\") {\n $ERROR('#1.1: Exception === \"intostr\". Actual: '+e);\n }\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.16_A1_T12"
+ },
+ {
+ "section": "15.5.4.16",
+ "description": "Override toString and valueOf functions, then call toLowerCase() function for this object",
+ "test": "var __obj = {toString:function(){return {};},valueOf:function(){return 1;}}\n__obj.toLowerCase = String.prototype.toLowerCase;\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__obj.toLowerCase() !==\"1\") {\n $ERROR('#1: var __obj = {toString:function(){return {};},valueOf:function(){return 1;}}; __obj.toLowerCase = String.prototype.toLowerCase; __obj.toLowerCase() ===\"1\". Actual: '+__obj.toLowerCase() );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (__obj.toLowerCase().length !== 1) {\n $ERROR('#2: var __obj = {toString:function(){return {};},valueOf:function(){return 1;}}; __obj.toLowerCase = String.prototype.toLowerCase; __obj.toLowerCase().length === 1. Actual: '+__obj.toLowerCase().length );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.16_A1_T13"
+ },
+ {
+ "section": "15.5.4.16",
+ "description": "Call toLowerCase() function for RegExp object",
+ "test": "var __reg = new RegExp(\"ABC\");\n__reg.toLowerCase = String.prototype.toLowerCase;\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__reg.toLowerCase() !== \"/abc/\") {\n $ERROR('#1: var __reg = new RegExp(\"ABC\"); __reg.toLowerCase = String.prototype.toLowerCase; __reg.toLowerCase() === \"/abc/\". Actual: '+__reg.toLowerCase() );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.16_A1_T14"
+ },
+ {
+ "section": "15.5.4.16",
+ "description": "Instance is Boolean object",
+ "test": "__instance = new Boolean;\n\n__instance.toLowerCase = String.prototype.toLowerCase;\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__instance.toLowerCase() !== \"false\") {\n $ERROR('#1: __instance = new Boolean; __instance.toLowerCase = String.prototype.toLowerCase; __instance.toLowerCase() === \"false\". Actual: '+__instance.toLowerCase() );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.16_A1_T2"
+ },
+ {
+ "section": "15.5.4.16",
+ "description": "Checking by using eval",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (eval(\"\\\"BJ\\\"\").toLowerCase() !== \"bj\") {\n $ERROR('#1: eval(\"\\\\\"BJ\\\\\"\").toLowerCase() === \"bj\". Actual: '+eval(\"\\\"BJ\\\"\").toLowerCase() );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.16_A1_T3"
+ },
+ {
+ "section": "15.5.4.16",
+ "description": "Call toLowerCase() function without arguments of string and from empty string",
+ "test": "var __lowerCase = \"\".toLowerCase();\n\nvar __expected = \"\"; \n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__lowerCase.length !== __expected.length) {\n $ERROR('#1: __lowerCase = \"\".toLowerCase(); __expected = \"\"; __lowerCase.length === __expected.length. Actual: '+__lowerCase.length );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (__lowerCase.index !== __expected.index) {\n $ERROR('#2: __lowerCase = \"\".toLowerCase(); __expected = \"\"; __lowerCase.index === __expected.index. Actual: '+__lowerCase.index );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#3\nif (__lowerCase.input !== __expected.input) {\n $ERROR('#3: __lowerCase = \"\".toLowerCase(); __expected = \"\"; __lowerCase.input === __expected.input. Actual: '+__lowerCase.input );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#4\nif (__lowerCase[0]!==__expected[0]) {\n $ERROR('#4: __lowerCase = \"\".toLowerCase(); __expected = \"\"; __lowerCase[0]==='+__expected[0]+'. Actual: '+__lowerCase[0]);\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.16_A1_T4"
+ },
+ {
+ "section": "15.5.4.16",
+ "description": "Call toLowerCase() function for function call",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\n//since ToString(null) evaluates to \"null\" match(null) evaluates to match(\"null\")\nif (function(){return \"GnulLuNa\"}().toLowerCase() !== \"gnulluna\") {\n $ERROR('#1: function(){return \"GnulLuNa\"}().toLowerCase() === \"gnulluna\". Actual: '+function(){return \"GnulLuNa\"}().toLowerCase() );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.16_A1_T5"
+ },
+ {
+ "section": "15.5.4.16",
+ "description": "Call toLowerCase() function of Number.NEGATIVE_INFINITY",
+ "test": "Number.prototype.toLowerCase = String.prototype.toLowerCase;\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif ((Number.NEGATIVE_INFINITY).toLowerCase() !== \"-infinity\") {\n $ERROR('#1: Number.prototype.toLowerCase = String.prototype.toLowerCase; (Number.NEGATIVE_INFINITY).toLowerCase() === \"-infinity\". Actual: '+(Number.NEGATIVE_INFINITY).toLowerCase() );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n\n",
+ "id": "S15.5.4.16_A1_T6"
+ },
+ {
+ "section": "15.5.4.16",
+ "description": "Call toLowerCase() function of NaN",
+ "test": "Number.prototype.toLowerCase = String.prototype.toLowerCase;\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (NaN.toLowerCase()!== \"nan\") {\n $ERROR('#1: Number.prototype.toLowerCase = String.prototype.toLowerCase; NaN.toLowerCase()=== \"nan\". Actual: '+NaN.toLowerCase());\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.16_A1_T7"
+ },
+ {
+ "section": "15.5.4.16",
+ "description": "Call toLowerCase() function of Infinity",
+ "test": "Number.prototype.toLowerCase = String.prototype.toLowerCase;\n\nif (Infinity.toLowerCase()!== \"infinity\") {\n $ERROR('#1: Number.prototype.toLowerCase = String.prototype.toLowerCase; Infinity.toLowerCase()=== \"infinity\". Actual: '+Infinity.toLowerCase());\n}\n",
+ "id": "S15.5.4.16_A1_T8"
+ },
+ {
+ "section": "15.5.4.16",
+ "description": "Call toLowerCase() function of string object",
+ "test": "var __obj = {\n valueOf:function(){},\n toString:void 0\n};\n\nvar __lowerCase = new String(__obj).toLowerCase();\n\nvar __expected =\"undefined\"; \n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__lowerCase.length !== __expected.length) {\n $ERROR('#1: __obj = {valueOf:function(){}, toString:void 0}; __lowerCase = new String(__obj).toLowerCase(); __expected =\"undefined\"; __lowerCase.length === __expected.length. Actual: '+__lowerCase.length );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (__lowerCase.index !== __expected.index) {\n $ERROR('#2: __obj = {valueOf:function(){}, toString:void 0}; __lowerCase = new String(__obj).toLowerCase(); __expected =\"undefined\"; __lowerCase.index === __expected.index. Actual: '+__lowerCase.index );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#3\nif (__lowerCase.input !== __expected.input) {\n $ERROR('#3: __obj = {valueOf:function(){}, toString:void 0}; __lowerCase = new String(__obj).toLowerCase(); __expected =\"undefined\"; __lowerCase.input === __expected.input. Actual: '+__lowerCase.input );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#4\nfor(var index=0; index<__expected.length; index++) {\n if (__lowerCase[index]!==__expected[index]) {\n $ERROR('#4.'+index+': __obj = {valueOf:function(){}, toString:void 0}; __lowerCase = new String(__obj).toLowerCase(); __expected =\"undefined\"; __lowerCase['+index+']==='+__expected[index]+'. Actual: '+__lowerCase[index]);\n }\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.16_A1_T9"
+ },
+ {
+ "section": "15.5.4.16",
+ "description": "Checking returned result",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (\"Hello, WoRlD!\".toLowerCase() !== \"hello, world!\") {\n $ERROR('#1: \"Hello, WoRlD!\".toLowerCase() === \"hello, world!\". Actual: '+(\"Hello, WoRlD!\".toLowerCase()) );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (\"Hello, WoRlD!\".toLowerCase() !== String(\"hello, world!\")) {\n $ERROR('#2: \"Hello, WoRlD!\".toLowerCase() === String(\"hello, world!\"). Actual: '+(\"Hello, WoRlD!\".toLowerCase()) );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#3\nif (\"Hello, WoRlD!\".toLowerCase() ===new String(\"hello, world!\")) {\n $ERROR('#3: \"Hello, WoRlD!\".toLowerCase() !== new String(\"hello, world!\")');\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.16_A2_T1"
+ },
+ {
+ "section": "15.5.4.16, 13.2",
+ "description": "Checking String.prototype.toLowerCase.prototype",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (String.prototype.toLowerCase.prototype !== undefined) {\n $ERROR('#1: String.prototype.toLowerCase.prototype === undefined. Actual: '+String.prototype.toLowerCase.prototype );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.16_A6"
+ },
+ {
+ "section": "15.5.4.16, 13.2",
+ "description": "Checking if creating the String.prototype.toLowerCase object fails",
+ "test": "var __FACTORY = String.prototype.toLowerCase;\n\ntry {\n var __instance = new __FACTORY;\n $FAIL('#1: var __FACTORY = String.prototype.toLowerCase; \"__instance = new __FACTORY\" lead to throwing exception');\n} catch (e) {\n if ((e instanceof TypeError) !== true) {\n $ERROR('#1.1: var __FACTORY = String.prototype.toLowerCase; \"__instance = new __FACTORY\" throws a TypeError. Actual: ' + (e)); \n }\n};\n\n",
+ "id": "S15.5.4.16_A7"
+ },
+ {
+ "section": "15.5.4.16",
+ "description": "Checking if enumerating the String.prototype.toLowerCase.length property fails",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#0\nif (!(String.prototype.toLowerCase.hasOwnProperty('length'))) {\n $FAIL('#0: String.prototype.toLowerCase.hasOwnProperty(\\'length\\') return true. Actual: '+String.prototype.toLowerCase.hasOwnProperty('length'));\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n\n//////////////////////////////////////////////////////////////////////////////\n// CHECK#1\nif (String.prototype.toLowerCase.propertyIsEnumerable('length')) {\n $ERROR('#1: String.prototype.toLowerCase.propertyIsEnumerable(\\'length\\') return false');\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n// CHECK#2\nvar count=0;\n\nfor (p in String.prototype.toLowerCase){\n if (p===\"length\") count++;\n}\n\nif (count !== 0) {\n $ERROR('#2: count=0; for (p in String.prototype.toLowerCase){if (p===\"length\") count++;}; count === 0. Actual: '+count );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.16_A8"
+ },
+ {
+ "section": "15.5.4.16",
+ "description": "Checking if deleting the String.prototype.toLowerCase.length property fails",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#0\nif (!(String.prototype.toLowerCase.hasOwnProperty('length'))) {\n $FAIL('#0: String.prototype.toLowerCase.hasOwnProperty(\\'length\\') return true. Actual: '+String.prototype.toLowerCase.hasOwnProperty('length'));\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (delete String.prototype.toLowerCase.length) {\n $ERROR('#1: delete String.prototype.toLowerCase.length return false');\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (!(String.prototype.toLowerCase.hasOwnProperty('length'))) {\n $FAIL('#2: delete String.prototype.toLowerCase.length; String.prototype.toLowerCase.hasOwnProperty(\\'length\\') return true. Actual: '+String.prototype.toLowerCase.hasOwnProperty('length'));\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.16_A9"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.5.4.17_String.prototype.toLocaleLowerCase.json b/website/resources/scripts/testcases2/15.5.4.17_String.prototype.toLocaleLowerCase.json
new file mode 100644
index 000000000..398459e55
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.5.4.17_String.prototype.toLocaleLowerCase.json
@@ -0,0 +1,134 @@
+{
+ "testCollection": {
+ "name": "15.5.4.17_String.prototype.toLocaleLowerCase",
+ "numTests": 21,
+ "tests": [
+ {
+ "section": "15.5.4.17",
+ "description": "Checking if varying the String.prototype.toLocaleLowerCase.length property fails",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (!(String.prototype.toLocaleLowerCase.hasOwnProperty('length'))) {\n $FAIL('#1: String.prototype.toLocaleLowerCase.hasOwnProperty(\\'length\\') return true. Actual: '+String.prototype.toLocaleLowerCase.hasOwnProperty('length'));\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n__obj = String.prototype.toLocaleLowerCase.length;\n\nString.prototype.toLocaleLowerCase.length = function(){return \"shifted\";};\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (String.prototype.toLocaleLowerCase.length !== __obj) {\n $ERROR('#2: __obj = String.prototype.toLocaleLowerCase.length; String.prototype.toLocaleLowerCase.length = function(){return \"shifted\";}; String.prototype.toLocaleLowerCase.length === __obj. Actual: '+String.prototype.toLocaleLowerCase.length );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.17_A10"
+ },
+ {
+ "section": "15.5.4.17",
+ "description": "Checking String.prototype.toLocaleLowerCase.length",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (!(String.prototype.toLocaleLowerCase.hasOwnProperty(\"length\"))) {\n $ERROR('#1: String.prototype.toLocaleLowerCase.hasOwnProperty(\"length\") return true. Actual: '+String.prototype.toLocaleLowerCase.hasOwnProperty(\"length\"));\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (String.prototype.toLocaleLowerCase.length !== 0) {\n $ERROR('#2: String.prototype.toLocaleLowerCase.length === 0. Actual: '+String.prototype.toLocaleLowerCase.length );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.17_A11"
+ },
+ {
+ "section": "15.5.4.17",
+ "description": "Arguments is true, and instance is object",
+ "test": "var __instance = new Object(true);\n\n__instance.toLocaleLowerCase = String.prototype.toLocaleLowerCase;\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__instance.toLocaleLowerCase() !== \"true\") {\n $ERROR('#1: __instance = new Object(true); __instance.toLocaleLowerCase = String.prototype.toLocaleLowerCase; __instance.toLocaleLowerCase() === \"true\". Actual: '+__instance.toLocaleLowerCase() );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.17_A1_T1"
+ },
+ {
+ "section": "15.5.4.17",
+ "description": "Call toLocaleLowerCase() function of object with overrode toString function",
+ "test": "var __obj = {toString:function(){return \"\\u0041B\";}}\n__obj.toLocaleLowerCase = String.prototype.toLocaleLowerCase;\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__obj.toLocaleLowerCase() !==\"ab\") {\n $ERROR('#1: var __obj = {toString:function(){return \"\\u0041B\";}}; __obj.toLocaleLowerCase = String.prototype.toLocaleLowerCase; __obj.toLocaleLowerCase() ===\"ab\". Actual: '+__obj.toLocaleLowerCase() );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.17_A1_T10"
+ },
+ {
+ "section": "15.5.4.17",
+ "description": "Override toString function, toString throw exception, then call toLocaleLowerCase() function for this object",
+ "test": "var __obj = {toString:function(){throw \"intostr\";}}\n__obj.toLocaleLowerCase = String.prototype.toLocaleLowerCase;\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\ntry {\n var x = __obj.toLocaleLowerCase();\n \t$FAIL('#1: \"var x = __obj.toLocaleLowerCase()\" lead to throwing exception');\n} catch (e) {\n if (e!==\"intostr\") {\n $ERROR('#1.1: Exception === \"intostr\". Actual: '+e);\n }\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.17_A1_T11"
+ },
+ {
+ "section": "15.5.4.17",
+ "description": "Override toString and valueOf functions, valueOf throw exception, then call toLocaleLowerCase() function for this object",
+ "test": "var __obj = {toString:function(){return {};},valueOf:function(){throw \"intostr\";}}\n__obj.toLocaleLowerCase = String.prototype.toLocaleLowerCase;\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\ntry {\n var x = __obj.toLocaleLowerCase();\n \t$FAIL('#1: \"var x = __obj.toLocaleLowerCase()\" lead to throwing exception');\n} catch (e) {\n if (e!==\"intostr\") {\n $ERROR('#1.1: Exception === \"intostr\". Actual: '+e);\n }\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.17_A1_T12"
+ },
+ {
+ "section": "15.5.4.17",
+ "description": "Override toString and valueOf functions, then call toLocaleLowerCase() function for this object",
+ "test": "var __obj = {toString:function(){return {};},valueOf:function(){return 1;}}\n__obj.toLocaleLowerCase = String.prototype.toLocaleLowerCase;\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__obj.toLocaleLowerCase() !==\"1\") {\n $ERROR('#1: var __obj = {toString:function(){return {};},valueOf:function(){return 1;}}; __obj.toLocaleLowerCase = String.prototype.toLocaleLowerCase; __obj.toLocaleLowerCase() ===\"1\". Actual: '+__obj.toLocaleLowerCase() );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (__obj.toLocaleLowerCase().length !== 1) {\n $ERROR('#2: var __obj = {toString:function(){return {};},valueOf:function(){return 1;}}; __obj.toLocaleLowerCase = String.prototype.toLocaleLowerCase; __obj.toLocaleLowerCase().length === 1. Actual: '+__obj.toLocaleLowerCase().length );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.17_A1_T13"
+ },
+ {
+ "section": "15.5.4.17",
+ "description": "Call toLocaleLowerCase() function for RegExp object",
+ "test": "var __reg = new RegExp(\"ABC\");\n__reg.toLocaleLowerCase = String.prototype.toLocaleLowerCase;\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__reg.toLocaleLowerCase() !== \"/abc/\") {\n $ERROR('#1: var __reg = new RegExp(\"ABC\"); __reg.toLocaleLowerCase = String.prototype.toLocaleLowerCase; __reg.toLocaleLowerCase() === \"/abc/\". Actual: '+__reg.toLocaleLowerCase() );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.17_A1_T14"
+ },
+ {
+ "section": "15.5.4.17",
+ "description": "Instance is Boolean object",
+ "test": "var __instance = new Boolean;\n\n__instance.toLocaleLowerCase = String.prototype.toLocaleLowerCase;\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__instance.toLocaleLowerCase() !== \"false\") {\n $ERROR('#1: __instance = new Boolean; __instance.toLocaleLowerCase = String.prototype.toLocaleLowerCase; __instance.toLocaleLowerCase() === \"false\". Actual: '+__instance.toLocaleLowerCase() );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.17_A1_T2"
+ },
+ {
+ "section": "15.5.4.17",
+ "description": "Checking by using eval",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (eval(\"\\\"BJ\\\"\").toLocaleLowerCase() !== \"bj\") {\n $ERROR('#1: eval(\"\\\\\"BJ\\\\\"\").toLocaleLowerCase() === \"bj\". Actual: '+eval(\"\\\"BJ\\\"\").toLocaleLowerCase() );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.17_A1_T3"
+ },
+ {
+ "section": "15.5.4.17",
+ "description": "Call toLocaleLowerCase() function without arguments of string and from empty string",
+ "test": "var __lowerCase = \"\".toLocaleLowerCase();\n\nvar __expected = \"\"; \n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__lowerCase.length !== __expected.length) {\n $ERROR('#1: __lowerCase = \"\".toLocaleLowerCase(); __expected = \"\"; __lowerCase.length === __expected.length. Actual: '+__lowerCase.length );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (__lowerCase.index !== __expected.index) {\n $ERROR('#2: __lowerCase = \"\".toLocaleLowerCase(); __expected = \"\"; __lowerCase.index === __expected.index. Actual: '+__lowerCase.index );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#3\nif (__lowerCase.input !== __expected.input) {\n $ERROR('#3: __lowerCase = \"\".toLocaleLowerCase(); __expected = \"\"; __lowerCase.input === __expected.input. Actual: '+__lowerCase.input );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#4\nif (__lowerCase[0]!==__expected[0]) {\n $ERROR('#4: __lowerCase = \"\".toLocaleLowerCase(); __expected = \"\"; __lowerCase[0]===__expected[0]. Actual: '+__lowerCase[0]);\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.17_A1_T4"
+ },
+ {
+ "section": "15.5.4.17",
+ "description": "Call toLocaleLowerCase() function for function call",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\n//since ToString(null) evaluates to \"null\" match(null) evaluates to match(\"null\")\nif (function(){return \"GnulLuNa\"}().toLocaleLowerCase() !== \"gnulluna\") {\n $ERROR('#1: function(){return \"GnulLuNa\"}().toLocaleLowerCase() === \"gnulluna\". Actual: '+function(){return \"GnulLuNa\"}().toLocaleLowerCase() );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.17_A1_T5"
+ },
+ {
+ "section": "15.5.4.17",
+ "description": "Call toLocaleLowerCase() function of Number.NEGATIVE_INFINITY",
+ "test": "Number.prototype.toLocaleLowerCase = String.prototype.toLocaleLowerCase;\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif ((Number.NEGATIVE_INFINITY).toLocaleLowerCase() !== \"-infinity\") {\n $ERROR('#1: Number.prototype.toLocaleLowerCase = String.prototype.toLocaleLowerCase; (Number.NEGATIVE_INFINITY).toLocaleLowerCase() === \"-infinity\". Actual: '+(Number.NEGATIVE_INFINITY).toLocaleLowerCase() );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.17_A1_T6"
+ },
+ {
+ "section": "15.5.4.17",
+ "description": "Call toLocaleLowerCase() function of NaN",
+ "test": "Number.prototype.toLocaleLowerCase = String.prototype.toLocaleLowerCase;\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (NaN.toLocaleLowerCase()!== \"nan\") {\n $ERROR('#1: Number.prototype.toLocaleLowerCase = String.prototype.toLocaleLowerCase; NaN.toLocaleLowerCase()=== \"nan\". Actual: '+NaN.toLocaleLowerCase());\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.17_A1_T7"
+ },
+ {
+ "section": "15.5.4.17",
+ "description": "Call toLocaleLowerCase() function of Infinity",
+ "test": "Number.prototype.toLocaleLowerCase = String.prototype.toLocaleLowerCase;\n\nif (Infinity.toLocaleLowerCase()!== \"infinity\") {\n $ERROR('#1: Number.prototype.toLocaleLowerCase = String.prototype.toLocaleLowerCase; Infinity.toLocaleLowerCase()=== \"infinity\". Actual: '+Infinity.toLocaleLowerCase());\n}\n",
+ "id": "S15.5.4.17_A1_T8"
+ },
+ {
+ "section": "15.5.4.17",
+ "description": "Call toLocaleLowerCase() function of string object",
+ "test": "var __obj = {\n valueOf:function(){},\n toString:void 0\n};\n\nvar __lowerCase = new String(__obj).toLocaleLowerCase();\n\n\nvar __expected =\"undefined\"; \n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__lowerCase.length !== __expected.length) {\n $ERROR('#1: __obj = {valueOf:function(){}, toString:void 0}; __lowerCase = new String(__obj).toLocaleLowerCase(); __expected =\"undefined\"; __lowerCase.length === __expected.length. Actual: '+__lowerCase.length );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (__lowerCase.index !== __expected.index) {\n $ERROR('#2: __obj = {valueOf:function(){}, toString:void 0}; __lowerCase = new String(__obj).toLocaleLowerCase(); __expected =\"undefined\"; __lowerCase.index === __expected.index. Actual: '+__lowerCase.index );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#3\nif (__lowerCase.input !== __expected.input) {\n $ERROR('#3: __obj = {valueOf:function(){}, toString:void 0}; __lowerCase = new String(__obj).toLocaleLowerCase(); __expected =\"undefined\"; __lowerCase.input === __expected.input. Actual: '+__lowerCase.input );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#4\nfor(var index=0; index<__expected.length; index++) {\n if (__lowerCase[index]!==__expected[index]) {\n $ERROR('#4.'+index+': __obj = {valueOf:function(){}, toString:void 0}; __lowerCase = new String(__obj).toLocaleLowerCase(); __expected =\"undefined\"; __lowerCase['+index+']=== '+__expected[index]+'. Actual: '+__lowerCase[index]);\n }\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.17_A1_T9"
+ },
+ {
+ "section": "15.5.4.17",
+ "description": "Checking returned result",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (\"Hello, WoRlD!\".toLocaleLowerCase() !== \"hello, world!\") {\n $ERROR('#1: \"Hello, WoRlD!\".toLocaleLowerCase() === \"hello, world!\". Actual: '+(\"Hello, WoRlD!\".toLocaleLowerCase()) );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (\"Hello, WoRlD!\".toLocaleLowerCase() !== String(\"hello, world!\")) {\n $ERROR('#2: \"Hello, WoRlD!\".toLocaleLowerCase() === String(\"hello, world!\"). Actual: '+(\"Hello, WoRlD!\".toLocaleLowerCase()) );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#3\nif (\"Hello, WoRlD!\".toLocaleLowerCase() === new String(\"hello, world!\")) {\n $ERROR('#3: \"Hello, WoRlD!\".toLocaleLowerCase() !== new String(\"hello, world!\")');\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.17_A2_T1"
+ },
+ {
+ "section": "15.5.4.17, 13.2",
+ "description": "Checking String.prototype.toLocaleLowerCase.prototype",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (String.prototype.toLocaleLowerCase.prototype !== undefined) {\n $ERROR('#1: String.prototype.toLocaleLowerCase.prototype === undefined. Actual: '+String.prototype.toLocaleLowerCase.prototype );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.17_A6"
+ },
+ {
+ "section": "15.5.4.17, 13.2",
+ "description": "Checking if creating the String.prototype.toLocaleLowerCase object fails",
+ "test": "var __FACTORY = String.prototype.toLocaleLowerCase;\n\ntry {\n var __instance = new __FACTORY;\n $FAIL('#1: var __FACTORY = String.prototype.toLocaleLowerCase; \"__instance = new __FACTORY\" lead to throwing exception');\n} catch (e) {\n if ((e instanceof TypeError) !== true) {\n $ERROR('#1.1: var __FACTORY = String.prototype.toLocaleLowerCase; \"var __instance = new __FACTORY\" throw a TypeError. Actual: ' + (e)); \n }\n $PRINT(e);\n}\n",
+ "id": "S15.5.4.17_A7"
+ },
+ {
+ "section": "15.5.4.17",
+ "description": "Checking if enumerating the String.prototype.toLocaleLowerCase.length property fails",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#0\nif (!(String.prototype.toLocaleLowerCase.hasOwnProperty('length'))) {\n $FAIL('#0: String.prototype.toLocaleLowerCase.hasOwnProperty(\\'length\\') return true. Actual: '+String.prototype.toLocaleLowerCase.hasOwnProperty('length'));\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n\n//////////////////////////////////////////////////////////////////////////////\n// CHECK#1\nif (String.prototype.toLocaleLowerCase.propertyIsEnumerable('length')) {\n $ERROR('#1: String.prototype.toLocaleLowerCase.propertyIsEnumerable(\\'length\\') return false');\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n// CHECK#2\nvar count=0;\n\nfor (var p in String.prototype.toLocaleLowerCase){\n if (p===\"length\") count++;\n}\n\nif (count !== 0) {\n $ERROR('#2: count=0; for (p in String.prototype.toLocaleLowerCase){if (p===\"length\") count++;}; count === 0. Actual: '+count );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.17_A8"
+ },
+ {
+ "section": "15.5.4.17",
+ "description": "Checking if deleting the String.prototype.toLocaleLowerCase.length property fails",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#0\nif (!(String.prototype.toLocaleLowerCase.hasOwnProperty('length'))) {\n $FAIL('#0: String.prototype.toLocaleLowerCase.hasOwnProperty(\\'length\\') return true. Actual: '+String.prototype.toLocaleLowerCase.hasOwnProperty('length'));\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (delete String.prototype.toLocaleLowerCase.length) {\n $ERROR('#1: delete String.prototype.toLocaleLowerCase.length return false');\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (!(String.prototype.toLocaleLowerCase.hasOwnProperty('length'))) {\n $FAIL('#2: delete String.prototype.toLocaleLowerCase.length; String.prototype.toLocaleLowerCase.hasOwnProperty(\\'length\\') return true. Actual: '+String.prototype.toLocaleLowerCase.hasOwnProperty('length'));\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.17_A9"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.5.4.18_String.prototype.toUpperCase.json b/website/resources/scripts/testcases2/15.5.4.18_String.prototype.toUpperCase.json
new file mode 100644
index 000000000..934e4089a
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.5.4.18_String.prototype.toUpperCase.json
@@ -0,0 +1,134 @@
+{
+ "testCollection": {
+ "name": "15.5.4.18_String.prototype.toUpperCase",
+ "numTests": 21,
+ "tests": [
+ {
+ "section": "15.5.4.18",
+ "description": "Checking if varying the String.prototype.toUpperCase.length property fails",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (!(String.prototype.toUpperCase.hasOwnProperty('length'))) {\n $FAIL('#1: String.prototype.toUpperCase.hasOwnProperty(\\'length\\') return true. Actual: '+String.prototype.toUpperCase.hasOwnProperty('length'));\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\nvar __obj = String.prototype.toUpperCase.length;\n\nString.prototype.toUpperCase.length = function(){return \"shifted\";};\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (String.prototype.toUpperCase.length !== __obj) {\n $ERROR('#2: __obj = String.prototype.toUpperCase.length; String.prototype.toUpperCase.length = function(){return \"shifted\";}; String.prototype.toUpperCase.length === __obj. Actual: '+String.prototype.toUpperCase.length );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.18_A10"
+ },
+ {
+ "section": "15.5.4.18",
+ "description": "Checking String.prototype.toUpperCase.length",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (!(String.prototype.toUpperCase.hasOwnProperty(\"length\"))) {\n $ERROR('#1: String.prototype.toUpperCase.hasOwnProperty(\"length\") return true. Actual: '+String.prototype.toUpperCase.hasOwnProperty(\"length\"));\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (String.prototype.toUpperCase.length !== 0) {\n $ERROR('#2: String.prototype.toUpperCase.length === 0. Actual: '+String.prototype.toUpperCase.length );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.18_A11"
+ },
+ {
+ "section": "15.5.4.18",
+ "description": "Arguments is true, and instance is object",
+ "test": "var __instance = new Object(true);\n\n__instance.toUpperCase = String.prototype.toUpperCase;\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__instance.toUpperCase() !== \"TRUE\") {\n $ERROR('#1: __instance = new Object(true); __instance.toUpperCase = String.prototype.toUpperCase; __instance.toUpperCase() === \"TRUE\". Actual: '+__instance.toUpperCase() );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.18_A1_T1"
+ },
+ {
+ "section": "15.5.4.18",
+ "description": "Call toUpperCase() function of object with overrode toString function",
+ "test": "var __obj = {toString:function(){return \"\\u0041b\";}}\n__obj.toUpperCase = String.prototype.toUpperCase;\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__obj.toUpperCase() !==\"AB\") {\n $ERROR('#1: var __obj = {toString:function(){return \"\\u0041b\";}}; __obj.toUpperCase = String.prototype.toUpperCase; __obj.toUpperCase() ===\"AB\". Actual: '+__obj.toUpperCase() );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.18_A1_T10"
+ },
+ {
+ "section": "15.5.4.18",
+ "description": "Override toString function, toString throw exception, then call toUpperCase() function for this object",
+ "test": "var __obj = {toString:function(){throw \"intostr\";}}\n__obj.toUpperCase = String.prototype.toUpperCase;\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\ntry {\n var x = __obj.toUpperCase();\n \t$FAIL('#1: \"var x = __obj.toUpperCase()\" lead to throwing exception');\n} catch (e) {\n if (e!==\"intostr\") {\n $ERROR('#1.1: Exception === \"intostr\". Actual: '+e);\n }\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.18_A1_T11"
+ },
+ {
+ "section": "15.5.4.18",
+ "description": "Override toString and valueOf functions, valueOf throw exception, then call toUpperCase() function for this object",
+ "test": "var __obj = {toString:function(){return {};},valueOf:function(){throw \"intostr\";}}\n__obj.toUpperCase = String.prototype.toUpperCase;\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\ntry {\n var x = __obj.toUpperCase();\n \t$FAIL('#1: \"var x = __obj.toUpperCase()\" lead to throwing exception');\n} catch (e) {\n if (e!==\"intostr\") {\n $ERROR('#1.1: Exception === \"intostr\". Actual: '+e);\n }\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.18_A1_T12"
+ },
+ {
+ "section": "15.5.4.18",
+ "description": "Override toString and valueOf functions, then call toUpperCase() function for this object",
+ "test": "var __obj = {toString:function(){return {};},valueOf:function(){return 1;}}\n__obj.toUpperCase = String.prototype.toUpperCase;\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__obj.toUpperCase() !==\"1\") {\n $ERROR('#1: var __obj = {toString:function(){return {};},valueOf:function(){return 1;}}; __obj.toUpperCase = String.prototype.toUpperCase; __obj.toUpperCase() ===\"1\". Actual: '+__obj.toUpperCase() );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (__obj.toUpperCase().length !== 1) {\n $ERROR('#2: var __obj = {toString:function(){return {};},valueOf:function(){return 1;}}; __obj.toUpperCase = String.prototype.toUpperCase; __obj.toUpperCase().length === 1. Actual: '+__obj.toUpperCase().length );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.18_A1_T13"
+ },
+ {
+ "section": "15.5.4.18",
+ "description": "Call toUpperCase() function of RegExp object",
+ "test": "var __reg = new RegExp(\"abc\");\n__reg.toUpperCase = String.prototype.toUpperCase;\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__reg.toUpperCase() !== \"/ABC/\") {\n $ERROR('#1: var __reg = new RegExp(\"abc\"); __reg.toUpperCase = String.prototype.toUpperCase; __reg.toUpperCase() === \"/ABC/\". Actual: '+__reg.toUpperCase() );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.18_A1_T14"
+ },
+ {
+ "section": "15.5.4.18",
+ "description": "Instance is Boolean object",
+ "test": "var __instance = new Boolean;\n\n__instance.toUpperCase = String.prototype.toUpperCase;\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__instance.toUpperCase() !== \"FALSE\") {\n $ERROR('#1: __instance = new Boolean; __instance.toUpperCase = String.prototype.toUpperCase; __instance.toUpperCase() === \"FALSE\". Actual: '+__instance.toUpperCase() );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.18_A1_T2"
+ },
+ {
+ "section": "15.5.4.18",
+ "description": "Checking by using eval",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (eval(\"\\\"bj\\\"\").toUpperCase() !== \"BJ\") {\n $ERROR('#1: eval(\"\\\\\"bj\\\\\"\").toUpperCase() === \"BJ\". Actual: '+eval(\"\\\"bj\\\"\").toUpperCase() );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.18_A1_T3"
+ },
+ {
+ "section": "15.5.4.18",
+ "description": "Call toUpperCase() function without arguments of string and from empty string",
+ "test": "var __lowerCase = \"\".toUpperCase();\n\nvar __expected = \"\"; \n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__lowerCase.length !== __expected.length) {\n $ERROR('#1: __lowerCase = \"\".toUpperCase(); __expected = \"\"; __lowerCase.length === __expected.length. Actual: '+__lowerCase.length );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (__lowerCase.index !== __expected.index) {\n $ERROR('#2: __lowerCase = \"\".toUpperCase(); __expected = \"\"; __lowerCase.index === __expected.index. Actual: '+__lowerCase.index );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#3\nif (__lowerCase.input !== __expected.input) {\n $ERROR('#3: __lowerCase = \"\".toUpperCase(); __expected = \"\"; __lowerCase.input === __expected.input. Actual: '+__lowerCase.input );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#4\nif (__lowerCase[0]!==__expected[0]) {\n $ERROR('#4: __lowerCase = \"\".toUpperCase(); __expected = \"\"; __lowerCase[0]==='+__expected[0]+'. Actual: '+__lowerCase[0]);\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.18_A1_T4"
+ },
+ {
+ "section": "15.5.4.18",
+ "description": "Call toUpperCase() function of function call",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\n//since ToString(null) evaluates to \"null\" match(null) evaluates to match(\"null\")\nif (function(){return \"GnulLuNa\"}().toUpperCase() !== \"GNULLUNA\") {\n $ERROR('#1: function(){return \"GnulLuNa\"}().toUpperCase() === \"GNULLUNA\". Actual: '+function(){return \"GnulLuNa\"}().toUpperCase() );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.18_A1_T5"
+ },
+ {
+ "section": "15.5.4.18",
+ "description": "Call toUpperCase() function of Number.NEGATIVE_INFINITY",
+ "test": "Number.prototype.toUpperCase = String.prototype.toUpperCase;\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif ((Number.NEGATIVE_INFINITY).toUpperCase() !== \"-INFINITY\") {\n $ERROR('#1: Number.prototype.toUpperCase = String.prototype.toUpperCase; (Number.NEGATIVE_INFINITY).toUpperCase() === \"-INFINITY\". Actual: '+(Number.NEGATIVE_INFINITY).toUpperCase() );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.18_A1_T6"
+ },
+ {
+ "section": "15.5.4.18",
+ "description": "Call toUpperCase() function of NaN",
+ "test": "Number.prototype.toUpperCase = String.prototype.toUpperCase;\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (NaN.toUpperCase()!== \"NAN\") {\n $ERROR('#1: Number.prototype.toUpperCase = String.prototype.toUpperCase; NaN.toUpperCase()=== \"NAN\". Actual: '+NaN.toUpperCase());\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.18_A1_T7"
+ },
+ {
+ "section": "15.5.4.18",
+ "description": ": Call toUpperCase() function of Infinity;",
+ "test": "Number.prototype.toUpperCase = String.prototype.toUpperCase;\n\nif (Infinity.toUpperCase()!== \"INFINITY\") {\n $ERROR('#1: Number.prototype.toUpperCase = String.prototype.toUpperCase; Infinity.toUpperCase()=== \"INFINITY\". Actual: '+Infinity.toUpperCase());\n}\n",
+ "id": "S15.5.4.18_A1_T8"
+ },
+ {
+ "section": "15.5.4.18",
+ "description": "Call toUpperCase() function of string object",
+ "test": "var __obj = {\n valueOf:function(){},\n toString:void 0\n};\n\nvar __upperCase = new String(__obj).toUpperCase();\n\nvar __expected =\"UNDEFINED\"; \n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__upperCase.length !== __expected.length) {\n $ERROR('#1: __obj = {valueOf:function(){}, toString:void 0}; __upperCase = new String(__obj).toUpperCase(); __expected =\"UNDEFINED\"; __upperCase.length === __expected.length. Actual: '+__upperCase.length );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (__upperCase.index !== __expected.index) {\n $ERROR('#2: __obj = {valueOf:function(){}, toString:void 0}; __upperCase = new String(__obj).toUpperCase(); __expected =\"UNDEFINED\"; __upperCase.index === __expected.index. Actual: '+__upperCase.index );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#3\nif (__upperCase.input !== __expected.input) {\n $ERROR('#3: __obj = {valueOf:function(){}, toString:void 0}; __upperCase = new String(__obj).toUpperCase(); __expected =\"UNDEFINED\"; __upperCase.input === __expected.input. Actual: '+__upperCase.input );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#4\nfor(var index=0; index<__expected.length; index++) {\n if (__upperCase[index]!==__expected[index]) {\n $ERROR('#4.'+index+': __obj = {valueOf:function(){}, toString:void 0}; __upperCase = new String(__obj).toUpperCase(); __expected =\"UNDEFINED\"; __upperCase['+index+']==='+__expected[index]+'. Actual: '+__upperCase[index]);\n }\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.18_A1_T9"
+ },
+ {
+ "section": "15.5.4.18",
+ "description": "Checking returned result",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (\"Hello, WoRlD!\".toUpperCase() !== \"HELLO, WORLD!\") {\n $ERROR('#1: \"Hello, WoRlD!\".toUpperCase() === \"HELLO, WORLD!\". Actual: '+(\"Hello, WoRlD!\".toUpperCase()) );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (\"Hello, WoRlD!\".toUpperCase() !== String(\"HELLO, WORLD!\")) {\n $ERROR('#2: \"Hello, WoRlD!\".toUpperCase() === String(\"HELLO, WORLD!\"). Actual: '+(\"Hello, WoRlD!\".toUpperCase()) );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#3\nif (\"Hello, WoRlD!\".toUpperCase() ===new String(\"HELLO, WORLD!\")) {\n $ERROR('#3: \"Hello, WoRlD!\".toUpperCase() !== new String(\"HELLO, WORLD!\")');\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.18_A2_T1"
+ },
+ {
+ "section": "15.5.4.18, 13.2",
+ "description": "Checking String.prototype.toUpperCase.prototype",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (String.prototype.toUpperCase.prototype !== undefined) {\n $ERROR('#1: String.prototype.toUpperCase.prototype === undefined. Actual: '+String.prototype.toUpperCase.prototype );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.18_A6"
+ },
+ {
+ "section": "15.5.4.18, 13.2",
+ "description": "Checking if creating the String.prototype.toUpperCase object fails",
+ "test": "var __FACTORY = String.prototype.toUpperCase;\n\ntry {\n var __instance = new __FACTORY;\n $FAIL('#1: var __FACTORY = String.prototype.toUpperCase; \"__instance = new __FACTORY\" lead to throwing exception');\n} catch (e) {\n if ((e instanceof TypeError) !== true) {\n $ERROR('#1.1: var __FACTORY = String.prototype.toUpperCase; \"__instance = new __FACTORY\" throw a TypeError. Actual: ' + (e)); \n }\n}\n",
+ "id": "S15.5.4.18_A7"
+ },
+ {
+ "section": "15.5.4.18",
+ "description": "Checking if enumerating the String.prototype.toUpperCase.length property fails",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#0\nif (!(String.prototype.toUpperCase.hasOwnProperty('length'))) {\n $FAIL('#0: String.prototype.toUpperCase.hasOwnProperty(\\'length\\') return true. Actual: '+String.prototype.toUpperCase.hasOwnProperty('length'));\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n\n//////////////////////////////////////////////////////////////////////////////\n// CHECK#1\nif (String.prototype.toUpperCase.propertyIsEnumerable('length')) {\n $ERROR('#1: String.prototype.toUpperCase.propertyIsEnumerable(\\'length\\') return false');\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n// CHECK#2\nvar count=0;\n\nfor (p in String.prototype.toUpperCase){\n if (p===\"length\") count++;\n}\n\nif (count !== 0) {\n $ERROR('#2: count=0; for (p in String.prototype.toUpperCase){if (p===\"length\") count++;}; count === 0. Actual: '+count );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.18_A8"
+ },
+ {
+ "section": "15.5.4.18",
+ "description": "Checking if deleting the String.prototype.toUpperCase.length property fails",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#0\nif (!(String.prototype.toUpperCase.hasOwnProperty('length'))) {\n $FAIL('#0: String.prototype.toUpperCase.hasOwnProperty(\\'length\\') return true. Actual: '+String.prototype.toUpperCase.hasOwnProperty('length'));\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (delete String.prototype.toUpperCase.length) {\n $ERROR('#1: delete String.prototype.toUpperCase.length return false');\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (!(String.prototype.toUpperCase.hasOwnProperty('length'))) {\n $FAIL('#2: delete String.prototype.toUpperCase.length; String.prototype.toUpperCase.hasOwnProperty(\\'length\\') return true. Actual: '+String.prototype.toUpperCase.hasOwnProperty('length'));\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.18_A9"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.5.4.19_String.prototype.toLocaleUpperCase.json b/website/resources/scripts/testcases2/15.5.4.19_String.prototype.toLocaleUpperCase.json
new file mode 100644
index 000000000..f1e92d800
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.5.4.19_String.prototype.toLocaleUpperCase.json
@@ -0,0 +1,134 @@
+{
+ "testCollection": {
+ "name": "15.5.4.19_String.prototype.toLocaleUpperCase",
+ "numTests": 21,
+ "tests": [
+ {
+ "section": "15.5.4.19",
+ "description": "Checking if varying the String.prototype.toLocaleUpperCase.length property fails",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (!(String.prototype.toLocaleUpperCase.hasOwnProperty('length'))) {\n $FAIL('#1: String.prototype.toLocaleUpperCase.hasOwnProperty(\\'length\\') return true. Actual: '+String.prototype.toLocaleUpperCase.hasOwnProperty('length'));\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\nvar __obj = String.prototype.toLocaleUpperCase.length;\n\nString.prototype.toLocaleUpperCase.length = function(){return \"shifted\";};\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (String.prototype.toLocaleUpperCase.length !== __obj) {\n $ERROR('#2: __obj = String.prototype.toLocaleUpperCase.length; String.prototype.toLocaleUpperCase.length = function(){return \"shifted\";}; String.prototype.toLocaleUpperCase.length === __obj. Actual: '+String.prototype.toLocaleUpperCase.length );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.19_A10"
+ },
+ {
+ "section": "15.5.4.19",
+ "description": "Checking String.prototype.toLocaleUpperCase.length",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (!(String.prototype.toLocaleUpperCase.hasOwnProperty(\"length\"))) {\n $ERROR('#1: String.prototype.toLocaleUpperCase.hasOwnProperty(\"length\") return true. Actual: '+String.prototype.toLocaleUpperCase.hasOwnProperty(\"length\"));\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (String.prototype.toLocaleUpperCase.length !== 0) {\n $ERROR('#2: String.prototype.toLocaleUpperCase.length === 0. Actual: '+String.prototype.toLocaleUpperCase.length );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.19_A11"
+ },
+ {
+ "section": "15.5.4.19",
+ "description": "Arguments is true, and instance is object",
+ "test": "var __instance = new Object(true);\n\n__instance.toLocaleUpperCase = String.prototype.toLocaleUpperCase;\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__instance.toLocaleUpperCase() !== \"TRUE\") {\n $ERROR('#1: __instance = new Object(true); __instance.toLocaleUpperCase = String.prototype.toLocaleUpperCase; __instance.toLocaleUpperCase() === \"TRUE\". Actual: '+__instance.toLocaleUpperCase() );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.19_A1_T1"
+ },
+ {
+ "section": "15.5.4.19",
+ "description": "Call toLocaleUpperCase() function of object with overrode toString function",
+ "test": "var __obj = {toString:function(){return \"\\u0041b\";}}\n__obj.toLocaleUpperCase = String.prototype.toLocaleUpperCase;\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__obj.toLocaleUpperCase() !==\"AB\") {\n $ERROR('#1: var __obj = {toString:function(){return \"\\u0041b\";}}; __obj.toLocaleUpperCase = String.prototype.toLocaleUpperCase; __obj.toLocaleUpperCase() ===\"AB\". Actual: '+__obj.toLocaleUpperCase() );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.19_A1_T10"
+ },
+ {
+ "section": "15.5.4.19",
+ "description": "Override toString function, toString throw exception, then call toLocaleUpperCase() function for this object",
+ "test": "var __obj = {toString:function(){throw \"intostr\";}}\n__obj.toLocaleUpperCase = String.prototype.toLocaleUpperCase;\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\ntry {\n var x = __obj.toLocaleUpperCase();\n $FAIL('#1: \"var x = __obj.toLocaleUpperCase()\" lead to throwing exception');\n} catch (e) {\n if (e!==\"intostr\") {\n $ERROR('#1.1: Exception === \"intostr\". Actual: '+e);\n }\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.19_A1_T11"
+ },
+ {
+ "section": "15.5.4.19",
+ "description": "Override toString and valueOf functions, valueOf throw exception, then call toLocaleUpperCase() function for this object",
+ "test": "var __obj = {toString:function(){return {};},valueOf:function(){throw \"intostr\";}}\n__obj.toLocaleUpperCase = String.prototype.toLocaleUpperCase;\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\ntry {\n var x = __obj.toLocaleUpperCase();\n \t$FAIL('#1: \"var x = __obj.toLocaleUpperCase()\" lead to throwing exception');\n} catch (e) {\n if (e!==\"intostr\") {\n $ERROR('#1.1: Exception === \"intostr\". Actual: '+e);\n }\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.19_A1_T12"
+ },
+ {
+ "section": "15.5.4.19",
+ "description": "Override toString and valueOf functions, then call toLocaleUpperCase() function for this object",
+ "test": "var __obj = {toString:function(){return {};},valueOf:function(){return 1;}}\n__obj.toLocaleUpperCase = String.prototype.toLocaleUpperCase;\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__obj.toLocaleUpperCase() !==\"1\") {\n $ERROR('#1: var __obj = {toString:function(){return {};},valueOf:function(){return 1;}}; __obj.toLocaleUpperCase = String.prototype.toLocaleUpperCase; __obj.toLocaleUpperCase() ===\"1\". Actual: '+__obj.toLocaleUpperCase() );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (__obj.toLocaleUpperCase().length !== 1) {\n $ERROR('#2: var __obj = {toString:function(){return {};},valueOf:function(){return 1;}}; __obj.toLocaleUpperCase = String.prototype.toLocaleUpperCase; __obj.toLocaleUpperCase().length === 1. Actual: '+__obj.toLocaleUpperCase().length );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.19_A1_T13"
+ },
+ {
+ "section": "15.5.4.19",
+ "description": "Call toLocaleUpperCase() function for RegExp object",
+ "test": "var __reg = new RegExp(\"abc\");\n__reg.toLocaleUpperCase = String.prototype.toLocaleUpperCase;\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__reg.toLocaleUpperCase() !== \"/ABC/\") {\n $ERROR('#1: var __reg = new RegExp(\"abc\"); __reg.toLocaleUpperCase = String.prototype.toLocaleUpperCase; __reg.toLocaleUpperCase() === \"/ABC/\". Actual: '+__reg.toLocaleUpperCase() );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.19_A1_T14"
+ },
+ {
+ "section": "15.5.4.19",
+ "description": "Instance is Boolean object",
+ "test": "var __instance = new Boolean;\n\n__instance.toLocaleUpperCase = String.prototype.toLocaleUpperCase;\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__instance.toLocaleUpperCase() !== \"FALSE\") {\n $ERROR('#1: __instance = new Boolean; __instance.toLocaleUpperCase = String.prototype.toLocaleUpperCase; __instance.toLocaleUpperCase() === \"FALSE\". Actual: '+__instance.toLocaleUpperCase() );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.19_A1_T2"
+ },
+ {
+ "section": "15.5.4.19",
+ "description": "Checking by using eval",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (eval(\"\\\"bj\\\"\").toLocaleUpperCase() !== \"BJ\") {\n $ERROR('#1: eval(\"\\\\\"bj\\\\\"\").toLocaleUpperCase() === \"BJ\". Actual: '+eval(\"\\\"bj\\\"\").toLocaleUpperCase() );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.19_A1_T3"
+ },
+ {
+ "section": "15.5.4.19",
+ "description": "Call toLocaleUpperCase() function without arguments of string and from empty string",
+ "test": "var __lowerCase = \"\".toLocaleUpperCase();\nvar __expected = \"\"; \n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__lowerCase.length !== __expected.length) {\n $ERROR('#1: __lowerCase = \"\".toLocaleUpperCase(); __expected = \"\"; __lowerCase.length === __expected.length. Actual: '+__lowerCase.length );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (__lowerCase.index !== __expected.index) {\n $ERROR('#2: __lowerCase = \"\".toLocaleUpperCase(); __expected = \"\"; __lowerCase.index === __expected.index. Actual: '+__lowerCase.index );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#3\nif (__lowerCase.input !== __expected.input) {\n $ERROR('#3: __lowerCase = \"\".toLocaleUpperCase(); __expected = \"\"; __lowerCase.input === __expected.input. Actual: '+__lowerCase.input );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#4\nif (__lowerCase[0]!==__expected[0]) {\n $ERROR('#4: __lowerCase = \"\".toLocaleUpperCase(); __lowerCase[0]==='+__expected[0]+'. Actual: '+__lowerCase[0]);\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.19_A1_T4"
+ },
+ {
+ "section": "15.5.4.19",
+ "description": "Call toLocaleUpperCase() function of function call",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\n//since ToString(null) evaluates to \"null\" match(null) evaluates to match(\"null\")\nif (function(){return \"GnulLuNa\"}().toLocaleUpperCase() !== \"GNULLUNA\") {\n $ERROR('#1: function(){return \"GnulLuNa\"}().toLocaleUpperCase() === \"GNULLUNA\". Actual: '+function(){return \"GnulLuNa\"}().toLocaleUpperCase() );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.19_A1_T5"
+ },
+ {
+ "section": "15.5.4.19",
+ "description": "Call toLocaleUpperCase() function of Number.NEGATIVE_INFINITY",
+ "test": "Number.prototype.toLocaleUpperCase = String.prototype.toLocaleUpperCase;\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif ((Number.NEGATIVE_INFINITY).toLocaleUpperCase() !== \"-INFINITY\") {\n $ERROR('#1: Number.prototype.toLocaleUpperCase = String.prototype.toLocaleUpperCase; (Number.NEGATIVE_INFINITY).toLocaleUpperCase() === \"-INFINITY\". Actual: '+(Number.NEGATIVE_INFINITY).toLocaleUpperCase() );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n",
+ "id": "S15.5.4.19_A1_T6"
+ },
+ {
+ "section": "15.5.4.19",
+ "description": "Call toLocaleUpperCase() function of NaN",
+ "test": "Number.prototype.toLocaleUpperCase = String.prototype.toLocaleUpperCase;\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (NaN.toLocaleUpperCase()!== \"NAN\") {\n $ERROR('#1: Number.prototype.toLocaleUpperCase = String.prototype.toLocaleUpperCase; NaN.toLocaleUpperCase()=== \"NAN\". Actual: '+NaN.toLocaleUpperCase());\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.19_A1_T7"
+ },
+ {
+ "section": "15.5.4.19",
+ "description": "Call toLocaleUpperCase() function of Infinity",
+ "test": "Number.prototype.toLocaleUpperCase = String.prototype.toLocaleUpperCase;\n\nif (Infinity.toLocaleUpperCase()!== \"INFINITY\") {\n $ERROR('#1: Number.prototype.toLocaleUpperCase = String.prototype.toLocaleUpperCase; Infinity.toLocaleUpperCase()=== \"INFINITY\". Actual: '+Infinity.toLocaleUpperCase());\n}\n",
+ "id": "S15.5.4.19_A1_T8"
+ },
+ {
+ "section": "15.5.4.19",
+ "description": "Call toLocaleUpperCase() function of string object",
+ "test": "var __obj = {\n valueOf:function(){},\n toString:void 0\n};\n\nvar __lowerCase = new String(__obj).toLocaleUpperCase();\n\nvar __expected =\"UNDEFINED\"; \n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__lowerCase.length !== __expected.length) {\n $ERROR('#1: __obj = {valueOf:function(){}, toString:void 0}; __lowerCase = new String(__obj).toLocaleUpperCase(); __expected =\"UNDEFINED\"; __lowerCase.length === __expected.length. Actual: '+__lowerCase.length );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (__lowerCase.index !== __expected.index) {\n $ERROR('#2: __obj = {valueOf:function(){}, toString:void 0}; __lowerCase = new String(__obj).toLocaleUpperCase(); __expected =\"UNDEFINED\"; __lowerCase.index === __expected.index. Actual: '+__lowerCase.index );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#3\nif (__lowerCase.input !== __expected.input) {\n $ERROR('#3: __obj = {valueOf:function(){}, toString:void 0}; __lowerCase = new String(__obj).toLocaleUpperCase(); __expected =\"UNDEFINED\"; __lowerCase.input === __expected.input. Actual: '+__lowerCase.input );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#4\nfor(var index=0; index<__expected.length; index++) {\n if (__lowerCase[index]!==__expected[index]) {\n $ERROR('#4.'+index+': __obj = {valueOf:function(){}, toString:void 0}; __lowerCase = new String(__obj).toLocaleUpperCase(); __expected =\"UNDEFINED\"; __lowerCase['+index+']==='+__expected[index]+'. Actual: '+__lowerCase[index]);\n }\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.19_A1_T9"
+ },
+ {
+ "section": "15.5.4.19",
+ "description": "Checking returned result",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (\"Hello, WoRlD!\".toLocaleUpperCase() !== \"HELLO, WORLD!\") {\n $ERROR('#1: \"Hello, WoRlD!\".toLocaleUpperCase() === \"HELLO, WORLD!\". Actual: '+(\"Hello, WoRlD!\".toLocaleUpperCase()) );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (\"Hello, WoRlD!\".toLocaleUpperCase() !== String(\"HELLO, WORLD!\")) {\n $ERROR('#2: \"Hello, WoRlD!\".toLocaleUpperCase() === String(\"HELLO, WORLD!\"). Actual: '+(\"Hello, WoRlD!\".toLocaleUpperCase()) );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#3\nif (\"Hello, WoRlD!\".toLocaleUpperCase() ===new String(\"HELLO, WORLD!\")) {\n $ERROR('#3: \"Hello, WoRlD!\".toLocaleUpperCase() !== new String(\"HELLO, WORLD!\"');\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.19_A2_T1"
+ },
+ {
+ "section": "15.5.4.19, 13.2",
+ "description": "Checking String.prototype.toLocaleUpperCase.prototype",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (String.prototype.toLocaleUpperCase.prototype !== undefined) {\n $ERROR('#1: String.prototype.toLocaleUpperCase.prototype === undefined. Actual: '+String.prototype.toLocaleUpperCase.prototype );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.19_A6"
+ },
+ {
+ "section": "15.5.4.19, 13.2",
+ "description": "Checking if creating the String.prototype.toLocaleUpperCase object fails",
+ "test": "var __FACTORY = String.prototype.toLocaleUpperCase;\n\ntry {\n var __instance = new __FACTORY;\n $FAIL('#1: __FACTORY = String.prototype.toLocaleUpperCase; \"__instance = new __FACTORY\" lead to throwing exception');\n} catch (e) {\n if ((e instanceof TypeError) !== true) {\n $ERROR('#1.1: var __instance = new __FACTORY; Object has no construct lead a TypeError. Actual: ' + (e)); \n }\n}\n",
+ "id": "S15.5.4.19_A7"
+ },
+ {
+ "section": "15.5.4.19",
+ "description": "Checking if enumerating the String.prototype.toLocaleUpperCase.length property fails",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#0\nif (!(String.prototype.toLocaleUpperCase.hasOwnProperty('length'))) {\n $FAIL('#0: String.prototype.toLocaleUpperCase.hasOwnProperty(\\'length\\') return true. Actual: '+String.prototype.toLocaleUpperCase.hasOwnProperty('length'));\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n\n//////////////////////////////////////////////////////////////////////////////\n// CHECK#1\nif (String.prototype.toLocaleUpperCase.propertyIsEnumerable('length')) {\n $ERROR('#1: String.prototype.toLocaleUpperCase.propertyIsEnumerable(\\'length\\') return false');\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n// CHECK#2\nvar count=0;\n\nfor (var p in String.prototype.toLocaleUpperCase){\n if (p===\"length\") count++;\n}\n\nif (count !== 0) {\n $ERROR('#2: count=0; for (p in String.prototype.toLocaleUpperCase){if (p===\"length\") count++;}; count === 0. Actual: '+count );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.19_A8"
+ },
+ {
+ "section": "15.5.4.19",
+ "description": "Checking if deleting the String.prototype.toLocaleUpperCase.length property fails",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#0\nif (!(String.prototype.toLocaleUpperCase.hasOwnProperty('length'))) {\n $FAIL('#0: String.prototype.toLocaleUpperCase.hasOwnProperty(\\'length\\') return true. Actual: '+String.prototype.toLocaleUpperCase.hasOwnProperty('length'));\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (delete String.prototype.toLocaleUpperCase.length) {\n $ERROR('#1: delete String.prototype.toLocaleUpperCase.length return false');\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (!(String.prototype.toLocaleUpperCase.hasOwnProperty('length'))) {\n $FAIL('#2: delete String.prototype.toLocaleUpperCase.length; String.prototype.toLocaleUpperCase.hasOwnProperty(\\'length\\') return true. Actual: '+String.prototype.toLocaleUpperCase.hasOwnProperty('length'));\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.19_A9"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.5.4.20.json b/website/resources/scripts/testcases2/15.5.4.20.json
new file mode 100644
index 000000000..12546e03b
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.5.4.20.json
@@ -0,0 +1,889 @@
+{
+ "testCollection": {
+ "name": "15.5.4.20",
+ "numTests": 126,
+ "tests": [
+ {
+ "id": "15.5.4.20-0-1",
+ "path": "TestCases/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-0-1.js",
+ "description": "String.prototype.trim must exist as a function",
+ "test": "assertTrue((function testcase() {\n var f = String.prototype.trim;\n if (typeof(f) === \"function\") {\n return true;\n }\n }).call(this));\n"
+ },
+ {
+ "id": "15.5.4.20-0-2",
+ "path": "TestCases/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-0-2.js",
+ "description": "String.prototype.trim must exist as a function taking 0 parameters",
+ "test": "assertTrue((String.prototype.trim.length === 0));\n",
+ "precondition": "(fnExists(String.prototype.trim))"
+ },
+ {
+ "id": "15.5.4.20-1-1",
+ "path": "TestCases/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-1-1.js",
+ "description": "String.prototype.trim throws TypeError when string is undefined",
+ "test": "assertTrue((function testcase() {\n try\n {\n String.prototype.trim.call(undefined); \n return false; \n }\n catch(e)\n {\n return e instanceof TypeError;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(String.prototype.trim))"
+ },
+ {
+ "id": "15.5.4.20-1-2",
+ "path": "TestCases/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-1-2.js",
+ "description": "String.prototype.trim throws TypeError when string is null",
+ "test": "assertTrue((function testcase() {\n try\n {\n String.prototype.trim.call(null); \n return false;\n }\n catch(e)\n {\n return e instanceof TypeError;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(String.prototype.trim))"
+ },
+ {
+ "id": "15.5.4.20-1-3",
+ "path": "TestCases/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-1-3.js",
+ "description": "String.prototype.trim works for primitive type boolean",
+ "test": "assertTrue((function testcase() {\n try\n {\n if(String.prototype.trim.call(true) == \"true\")\n return true;\n }\n catch(e)\n {\n }\n }).call(this));\n",
+ "precondition": "(fnExists(String.prototype.trim))"
+ },
+ {
+ "id": "15.5.4.20-1-4",
+ "path": "TestCases/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-1-4.js",
+ "description": "String.prototype.trim works for primitive type number",
+ "test": "assertTrue((function testcase() {\n try\n {\n if(String.prototype.trim.call(0) == \"0\") \n return true;\n }\n catch(e)\n {\n }\n }).call(this));\n",
+ "precondition": "(fnExists(String.prototype.trim))"
+ },
+ {
+ "id": "15.5.4.20-1-5",
+ "path": "TestCases/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-1-5.js",
+ "description": "String.prototype.trim works for an Object",
+ "test": "assertTrue((function testcase() {\n try\n {\n if(String.prototype.trim.call({})==\"[object Object]\")\n return true;\n }\n catch(e)\n {\n }\n }).call(this));\n",
+ "precondition": "(fnExists(String.prototype.trim))"
+ },
+ {
+ "id": "15.5.4.20-1-6",
+ "path": "TestCases/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-1-6.js",
+ "description": "String.prototype.trim works for an String",
+ "test": "assertTrue((function testcase() {\n try\n {\n if(String.prototype.trim.call(new String()) == \"\")\n return true;\n }\n catch(e)\n {\n }\n }).call(this));\n",
+ "precondition": "(fnExists(String.prototype.trim))"
+ },
+ {
+ "id": "15.5.4.20-1-7",
+ "path": "TestCases/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-1-7.js",
+ "description": "String.prototype.trim works for a primitive string",
+ "test": "assertTrue((function testcase() {\n try\n {\n if(String.prototype.trim.call(\"abc\") === \"abc\") \n return true;\n }\n catch(e)\n {\n }\n }).call(this));\n",
+ "precondition": "(fnExists(String.prototype.trim))"
+ },
+ {
+ "id": "15.5.4.20-1-8",
+ "path": "TestCases/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-1-8.js",
+ "description": "String.prototype.trim works for a primitive string (value is ' abc') ",
+ "test": "assertTrue((function testcase() {\n var strObj = String(\" abc\");\n return \"abc\" === strObj.trim() && strObj.toString() === \" abc\";\n }).call(this));\n",
+ "precondition": "(fnExists(String.prototype.trim))"
+ },
+ {
+ "id": "15.5.4.20-1-9",
+ "path": "TestCases/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-1-9.js",
+ "description": "String.prototype.trim works for a String object which value is undefined",
+ "test": "assertTrue((function testcase() {\n var strObj = new String(undefined);\n return strObj.trim() === \"undefined\";\n }).call(this));\n",
+ "precondition": "(fnExists(String.prototype.trim))"
+ },
+ {
+ "id": "15.5.4.20-2-1",
+ "path": "TestCases/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-1.js",
+ "description": "String.prototype.trim - argument 'this' is a boolean whose value is false",
+ "test": "assertTrue((String.prototype.trim.call(false) === \"false\"));\n",
+ "precondition": "(fnExists(String.prototype.trim))"
+ },
+ {
+ "id": "15.5.4.20-2-10",
+ "path": "TestCases/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-10.js",
+ "description": "String.prototype.trim - argument 'this' is a number that converts to a string (value is +Infinity)",
+ "test": "assertTrue((String.prototype.trim.call(+Infinity) === \"Infinity\"));\n",
+ "precondition": "(fnExists(String.prototype.trim))"
+ },
+ {
+ "id": "15.5.4.20-2-11",
+ "path": "TestCases/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-11.js",
+ "description": "String.prototype.trim - argument 'this' is a number that converts to a string (value is -Infinity)",
+ "test": "assertTrue((String.prototype.trim.call(-Infinity) === \"-Infinity\"));\n",
+ "precondition": "(fnExists(String.prototype.trim))"
+ },
+ {
+ "id": "15.5.4.20-2-12",
+ "path": "TestCases/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-12.js",
+ "description": "String.prototype.trim - argument 'this' is a number that converts to a string (value is 1(following 20 zeros))",
+ "test": "assertTrue((String.prototype.trim.call(100000000000000000000) === \"100000000000000000000\"));\n",
+ "precondition": "(fnExists(String.prototype.trim))"
+ },
+ {
+ "id": "15.5.4.20-2-13",
+ "path": "TestCases/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-13.js",
+ "description": "String.prototype.trim - argument 'this' is a number that converts to a string (value is 1(following 21 zeros))",
+ "test": "assertTrue((String.prototype.trim.call(1000000000000000000000) === \"1e+21\"));\n",
+ "precondition": "(fnExists(String.prototype.trim))"
+ },
+ {
+ "id": "15.5.4.20-2-14",
+ "path": "TestCases/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-14.js",
+ "description": "String.prototype.trim - argument 'this' is a number that converts to a string (value is 1(following 22 zeros))",
+ "test": "assertTrue((String.prototype.trim.call(10000000000000000000000) === \"1e+22\"));\n",
+ "precondition": "(fnExists(String.prototype.trim))"
+ },
+ {
+ "id": "15.5.4.20-2-15",
+ "path": "TestCases/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-15.js",
+ "description": "String.prototype.trim - argument 'this' is a number that converts to a string (value is 1e+20)",
+ "test": "assertTrue((String.prototype.trim.call(1e+20) === \"100000000000000000000\"));\n",
+ "precondition": "(fnExists(String.prototype.trim))"
+ },
+ {
+ "id": "15.5.4.20-2-16",
+ "path": "TestCases/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-16.js",
+ "description": "String.prototype.trim - argument 'this' is a number that converts to string (value is 1e+21)",
+ "test": "assertTrue((String.prototype.trim.call(1e+21) === \"1e+21\"));\n",
+ "precondition": "(fnExists(String.prototype.trim))"
+ },
+ {
+ "id": "15.5.4.20-2-17",
+ "path": "TestCases/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-17.js",
+ "description": "String.prototype.trim - argument 'this' is a number that converts to string (value is 1e+22)",
+ "test": "assertTrue((String.prototype.trim.call(1e+22) === \"1e+22\"));\n",
+ "precondition": "(fnExists(String.prototype.trim))"
+ },
+ {
+ "id": "15.5.4.20-2-18",
+ "path": "TestCases/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-18.js",
+ "description": "String.prototype.trim - argument 'this' is a number that converts to a string (value is 0.000001)",
+ "test": "assertTrue((String.prototype.trim.call(0.000001) === \"0.000001\"));\n",
+ "precondition": "(fnExists(String.prototype.trim))"
+ },
+ {
+ "id": "15.5.4.20-2-19",
+ "path": "TestCases/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-19.js",
+ "description": "String.prototype.trim - argument argument 'this' is a number that converts to a string (value is 0.0000001)",
+ "test": "assertTrue((String.prototype.trim.call(0.0000001) === \"1e-7\"));\n",
+ "precondition": "(fnExists(String.prototype.trim))"
+ },
+ {
+ "id": "15.5.4.20-2-2",
+ "path": "TestCases/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-2.js",
+ "description": "String.prototype.trim - argument 'this' is a boolean whose value is true",
+ "test": "assertTrue((String.prototype.trim.call(true) === \"true\"));\n",
+ "precondition": "(fnExists(String.prototype.trim))"
+ },
+ {
+ "id": "15.5.4.20-2-20",
+ "path": "TestCases/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-20.js",
+ "description": "String.prototype.trim - argument 'this' is a number that converts to a string (value is 0.00000001)",
+ "test": "assertTrue((String.prototype.trim.call(0.00000001) === \"1e-8\"));\n",
+ "precondition": "(fnExists(String.prototype.trim))"
+ },
+ {
+ "id": "15.5.4.20-2-21",
+ "path": "TestCases/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-21.js",
+ "description": "String.prototype.trim - argument 'this' is a number that converts to a string (value is 1e-7)",
+ "test": "assertTrue((String.prototype.trim.call(1e-7) === \"1e-7\"));\n",
+ "precondition": "(fnExists(String.prototype.trim))"
+ },
+ {
+ "id": "15.5.4.20-2-22",
+ "path": "TestCases/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-22.js",
+ "description": "String.prototype.trim - argument 'this' is a number that converts to a string (value is 1e-6)",
+ "test": "assertTrue((String.prototype.trim.call(1e-6) === \"0.000001\"));\n",
+ "precondition": "(fnExists(String.prototype.trim))"
+ },
+ {
+ "id": "15.5.4.20-2-23",
+ "path": "TestCases/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-23.js",
+ "description": "String.prototype.trim - argument 'this' is a number that converts to a string (value is 1e-5)",
+ "test": "assertTrue((String.prototype.trim.call(1e-5) === \"0.00001\"));\n",
+ "precondition": "(fnExists(String.prototype.trim))"
+ },
+ {
+ "id": "15.5.4.20-2-24",
+ "path": "TestCases/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-24.js",
+ "description": "String.prototype.trim - argument 'this' is an integer that converts to a string (value is 123)",
+ "test": "assertTrue((String.prototype.trim.call(123) === \"123\"));\n",
+ "precondition": "(fnExists(String.prototype.trim))"
+ },
+ {
+ "id": "15.5.4.20-2-25",
+ "path": "TestCases/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-25.js",
+ "description": "String.prototype.trim - argument 'this' is a decimal that converts to a string (value is 123.456)",
+ "test": "assertTrue((String.prototype.trim.call(123.456) === \"123.456\"));\n",
+ "precondition": "(fnExists(String.prototype.trim))"
+ },
+ {
+ "id": "15.5.4.20-2-26",
+ "path": "TestCases/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-26.js",
+ "description": "String.prototype.trim - argument 'this' is a number that converts to a string (value is 1(following 20 zeros).123)",
+ "test": "assertTrue((String.prototype.trim.call(100000000000000000000.123) === \"100000000000000000000\"));\n",
+ "precondition": "(fnExists(String.prototype.trim))"
+ },
+ {
+ "id": "15.5.4.20-2-27",
+ "path": "TestCases/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-27.js",
+ "description": "String.prototype.trim - argument 'this' is a number that converts to a string (value is 123.1234567)",
+ "test": "assertTrue((String.prototype.trim.call(123.1234567) === \"123.1234567\"));\n",
+ "precondition": "(fnExists(String.prototype.trim))"
+ },
+ {
+ "id": "15.5.4.20-2-28",
+ "path": "TestCases/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-28.js",
+ "description": "String.prototype.trim - argument 'this' is an empty string ",
+ "test": "assertTrue((String.prototype.trim.call(\"\") === \"\"));\n",
+ "precondition": "(fnExists(String.prototype.trim))"
+ },
+ {
+ "id": "15.5.4.20-2-29",
+ "path": "TestCases/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-29.js",
+ "description": "String.prototype.trim - argument 'this' is a string(value is 'AB\n\\cd')",
+ "test": "assertTrue((String.prototype.trim.call(\"AB\\n\\\\cd\") === \"AB\\n\\\\cd\"));\n",
+ "precondition": "(fnExists(String.prototype.trim))"
+ },
+ {
+ "id": "15.5.4.20-2-3",
+ "path": "TestCases/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-3.js",
+ "description": "String.prototype.trim - argument 'this' is a number that converts to a string (value is NaN)",
+ "test": "/// Copyright (c) 2009 Microsoft Corporation \n/// \n/// Redistribution and use in source and binary forms, with or without modification, are permitted provided\n/// that the following conditions are met: \n/// * Redistributions of source code must retain the above copyright notice, this list of conditions and\n/// the following disclaimer. \n/// * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and \n/// the following disclaimer in the documentation and/or other materials provided with the distribution. \n/// * Neither the name of Microsoft nor the names of its contributors may be used to\n/// endorse or promote products derived from this software without specific prior written permission.\n/// \n/// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR\n/// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS\n/// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE\n/// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n/// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n/// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,\n/// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF\n/// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.assertTrue((String.prototype.trim.call(NaN) === \"NaN\"));\n",
+ "precondition": "(fnExists(String.prototype.trim))"
+ },
+ {
+ "id": "15.5.4.20-2-30",
+ "path": "TestCases/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-30.js",
+ "description": "String.prototype.trim - argument 'this' is a string(value is 'undefined') ",
+ "test": "assertTrue((String.prototype.trim.call(\"undefined\") === \"undefined\"));\n",
+ "precondition": "(fnExists(String.prototype.trim))"
+ },
+ {
+ "id": "15.5.4.20-2-31",
+ "path": "TestCases/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-31.js",
+ "description": "String.prototype.trim - argument 'this' is a string(value is 'null') ",
+ "test": "assertTrue((String.prototype.trim.call(\"null\") === \"null\"));\n",
+ "precondition": "(fnExists(String.prototype.trim))"
+ },
+ {
+ "id": "15.5.4.20-2-32",
+ "path": "TestCases/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-32.js",
+ "description": "String.prototype.trim - argument 'this' is a string(value is '123#$%abc')",
+ "test": "assertTrue((String.prototype.trim.call(\"123#$%abc\") === \"123#$%abc\"));\n",
+ "precondition": "(fnExists(String.prototype.trim))"
+ },
+ {
+ "id": "15.5.4.20-2-33",
+ "path": "TestCases/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-33.js",
+ "description": "String.prototype.trim - argument 'this' is a string(value is '1')",
+ "test": "assertTrue((String.prototype.trim.call(\"1\") === \"1\"));\n",
+ "precondition": "(fnExists(String.prototype.trim))"
+ },
+ {
+ "id": "15.5.4.20-2-34",
+ "path": "TestCases/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-34.js",
+ "description": "String.prototype.trim - 'this' is an array that converts to a string",
+ "test": "assertTrue(((String.prototype.trim.call([1]) === '1')));\n",
+ "precondition": "(fnExists(String.prototype.trim))"
+ },
+ {
+ "id": "15.5.4.20-2-35",
+ "path": "TestCases/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-35.js",
+ "description": "String.prototype.trim - 'this' is a String Object that converts to a string",
+ "test": "assertTrue(((String.prototype.trim.call(new String(\"abc\")) === \"abc\")));\n",
+ "precondition": "(fnExists(String.prototype.trim))"
+ },
+ {
+ "id": "15.5.4.20-2-36",
+ "path": "TestCases/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-36.js",
+ "description": "String.prototype.trim - 'this' is a Boolean Object that converts to a string",
+ "test": "assertTrue(((String.prototype.trim.call(new Boolean(false)) === \"false\")));\n",
+ "precondition": "(fnExists(String.prototype.trim))"
+ },
+ {
+ "id": "15.5.4.20-2-37",
+ "path": "TestCases/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-37.js",
+ "description": "String.prototype.trim - 'this' is a Number Object that converts to a string",
+ "test": "assertTrue(((String.prototype.trim.call(new Number(123)) === \"123\")));\n",
+ "precondition": "(fnExists(String.prototype.trim))"
+ },
+ {
+ "id": "15.5.4.20-2-38",
+ "path": "TestCases/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-38.js",
+ "description": "String.prototype.trim - 'this' is an object which has an own toString method",
+ "test": "assertTrue((function testcase() {\n var obj = {\n toString: function () {\n return \"abc\";\n }\n };\n\n return (String.prototype.trim.call(obj) === \"abc\");\n }).call(this));\n",
+ "precondition": "(fnExists(String.prototype.trim))"
+ },
+ {
+ "id": "15.5.4.20-2-39",
+ "path": "TestCases/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-39.js",
+ "description": "String.prototype.trim - 'this' is an object which has an own valueOf method",
+ "test": "assertTrue((function testcase() {\n var obj = {\n valueOf: function () {\n return \"abc\";\n }\n };\n\n return (String.prototype.trim.call(obj) === \"[object Object]\");\n }).call(this));\n",
+ "precondition": "(fnExists(String.prototype.trim))"
+ },
+ {
+ "id": "15.5.4.20-2-4",
+ "path": "TestCases/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-4.js",
+ "description": "String.prototype.trim - argument 'this' is a number that converts to a string (value is 0)",
+ "test": "assertTrue((String.prototype.trim.call(0) === \"0\"));\n",
+ "precondition": "(fnExists(String.prototype.trim))"
+ },
+ {
+ "id": "15.5.4.20-2-40",
+ "path": "TestCases/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-40.js",
+ "description": "String.prototype.trim - 'this' is an object that has an own toString method that returns an object and valueOf method that returns a primitive value",
+ "test": "assertTrue((function testcase() {\n var toStringAccessed = false;\n var valueOfAccessed = false;\n var obj = {\n toString: function () {\n toStringAccessed = true;\n return {};\n },\n valueOf: function () {\n valueOfAccessed = true;\n return \"abc\";\n }\n };\n return (String.prototype.trim.call(obj) === \"abc\") && valueOfAccessed && toStringAccessed;\n }).call(this));\n",
+ "precondition": "(fnExists(String.prototype.trim))"
+ },
+ {
+ "id": "15.5.4.20-2-41",
+ "path": "TestCases/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-41.js",
+ "description": "String.prototype.trim - 'this' is an object which has an own toString and valueOf method.",
+ "test": "assertTrue((function testcase() {\n var toStringAccessed = false;\n var valueOfAccessed = false;\n var obj = {\n toString: function () {\n toStringAccessed = true;\n return \"abc\";\n },\n valueOf: function () {\n valueOfAccessed = true;\n return \"cef\";\n }\n };\n return (String.prototype.trim.call(obj) === \"abc\") && !valueOfAccessed && toStringAccessed;\n }).call(this));\n",
+ "precondition": "(fnExists(String.prototype.trim))"
+ },
+ {
+ "id": "15.5.4.20-2-42",
+ "path": "TestCases/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-42.js",
+ "description": "String.prototype.trim - TypeError exception was thrown when 'this' is an object that both toString and valueOf wouldn't return primitive value.",
+ "test": "assertTrue((function testcase() {\n var toStringAccessed = false;\n var valueOfAccessed = false;\n var obj = {\n toString: function () {\n toStringAccessed = true;\n return {};\n },\n valueOf: function () {\n valueOfAccessed = true;\n return {};\n }\n };\n try {\n String.prototype.trim.call(obj);\n return false;\n } catch (e) {\n return valueOfAccessed && toStringAccessed && (e instanceof TypeError);\n }\n }).call(this));\n",
+ "precondition": "(fnExists(String.prototype.trim))"
+ },
+ {
+ "id": "15.5.4.20-2-43",
+ "path": "TestCases/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-43.js",
+ "description": "String.prototype.trim - 'this' is an object with an own valueOf and inherited toString methods with hint string, verify inherited toString method will be called first",
+ "test": "assertTrue((function testcase() {\n\n var toStringAccessed = false;\n var valueOfAccessed = false;\n\n var proto = {\n toString: function () {\n toStringAccessed = true;\n return \"abc\";\n }\n };\n\n var Con = function () { };\n Con.prototype = proto;\n\n var child = new Con();\n child.valueOf = function () {\n valueOfAccessed = true;\n return \"efg\";\n };\n return (String.prototype.trim.call(child) === \"abc\") && toStringAccessed && !valueOfAccessed;\n }).call(this));\n",
+ "precondition": "(fnExists(String.prototype.trim))"
+ },
+ {
+ "id": "15.5.4.20-2-44",
+ "path": "TestCases/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-44.js",
+ "description": "String.prototype.trim - 'this' is a string that contains east Asian characters (value is 'SD咕噜')",
+ "test": "assertTrue((function testcase() {\n var str = \"SD咕噜\";\n return str.trim() === str;\n }).call(this));\n",
+ "precondition": "(fnExists(String.prototype.trim))"
+ },
+ {
+ "id": "15.5.4.20-2-45",
+ "path": "TestCases/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-45.js",
+ "description": "String.prototype.trim - 'this' is a string that contains white space, character, number, object and null characters",
+ "test": "assertTrue((function testcase() {\n var str = \"abc\" + \" \" + 123 + \" \" + {} + \" \" + \"\\u0000\";\n var str1 = \" \" + str + \" \";\n return str1.trim() === str;\n }).call(this));\n",
+ "precondition": "(fnExists(String.prototype.trim))"
+ },
+ {
+ "id": "15.5.4.20-2-46",
+ "path": "TestCases/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-46.js",
+ "description": "String.prototype.trim - 'this' is a Function Object that converts to a string",
+ "test": "assertTrue((function testcase() {\n var funObj = function () { return arguments; };\n return typeof(String.prototype.trim.call(funObj)) === \"string\";\n }).call(this));\n",
+ "precondition": "(fnExists(String.prototype.trim))"
+ },
+ {
+ "id": "15.5.4.20-2-47",
+ "path": "TestCases/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-47.js",
+ "description": "String.prototype.trim - 'this' is a object Object that converts to a string",
+ "test": "assertTrue((String.prototype.trim.call({}) === \"[object Object]\"));\n",
+ "precondition": "(fnExists(String.prototype.trim))"
+ },
+ {
+ "id": "15.5.4.20-2-49",
+ "path": "TestCases/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-49.js",
+ "description": "String.prototype.trim - 'this' is a RegExp Object that converts to a string",
+ "test": "assertTrue((function testcase() {\n var regObj = new RegExp(/test/);\n return String.prototype.trim.call(regObj) === \"/test/\";\n }).call(this));\n",
+ "precondition": "(fnExists(String.prototype.trim))"
+ },
+ {
+ "id": "15.5.4.20-2-5",
+ "path": "TestCases/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-5.js",
+ "description": "String.prototype.trim - argument 'this' is a number that converts to a string (value is +0)",
+ "test": "assertTrue((String.prototype.trim.call(+0) === \"0\"));\n",
+ "precondition": "(fnExists(String.prototype.trim))"
+ },
+ {
+ "id": "15.5.4.20-2-50",
+ "path": "TestCases/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-50.js",
+ "description": "String.prototype.trim - 'this' is a Error Object that converts to a string",
+ "test": "assertTrue((function testcase() {\n var errObj = new Error(\"test\");\n return String.prototype.trim.call(errObj) === \"Error: test\";\n }).call(this));\n",
+ "precondition": "(fnExists(String.prototype.trim))"
+ },
+ {
+ "id": "15.5.4.20-2-51",
+ "path": "TestCases/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-51.js",
+ "description": "String.prototype.trim - 'this' is a Arguments Object that converts to a string",
+ "test": "assertTrue((function testcase() {\n var argObj = function () { return arguments; } (1, 2, true);\n return String.prototype.trim.call(argObj) === \"[object Arguments]\";\n }).call(this));\n",
+ "precondition": "(fnExists(String.prototype.trim))"
+ },
+ {
+ "id": "15.5.4.20-2-6",
+ "path": "TestCases/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-6.js",
+ "description": "String.prototype.trim - argument 'this' is a number that converts to a string (value is -0)",
+ "test": "assertTrue((String.prototype.trim.call(-0) === \"0\"));\n",
+ "precondition": "(fnExists(String.prototype.trim))"
+ },
+ {
+ "id": "15.5.4.20-2-7",
+ "path": "TestCases/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-7.js",
+ "description": "String.prototype.trim - argument 'this' is a number that converts to a string (value is positive number)",
+ "test": "assertTrue((String.prototype.trim.call(30) === \"30\"));\n",
+ "precondition": "(fnExists(String.prototype.trim))"
+ },
+ {
+ "id": "15.5.4.20-2-8",
+ "path": "TestCases/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-8.js",
+ "description": "String.prototype.trim - argument 'this' is a number that converts to a string (value is negative number)",
+ "test": "assertTrue((String.prototype.trim.call(-20) === \"-20\"));\n",
+ "precondition": "(fnExists(String.prototype.trim))"
+ },
+ {
+ "id": "15.5.4.20-2-9",
+ "path": "TestCases/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-2-9.js",
+ "description": "String.prototype.trim - argument 'this' is a number that converts to a string (value is Infinity)",
+ "test": "assertTrue((String.prototype.trim.call(Infinity) === \"Infinity\"));\n",
+ "precondition": "(fnExists(String.prototype.trim))"
+ },
+ {
+ "id": "15.5.4.20-3-1",
+ "path": "TestCases/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-3-1.js",
+ "description": "String.prototype.trim - 'S' is a string with all LineTerminator",
+ "test": "assertTrue((function testcase() {\n\n var lineTerminatorsStr = \"\\u000A\\u000D\\u2028\\u2029\";\n return (lineTerminatorsStr.trim() === \"\");\n }).call(this));\n",
+ "precondition": "(fnExists(String.prototype.trim))"
+ },
+ {
+ "id": "15.5.4.20-3-10",
+ "path": "TestCases/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-3-10.js",
+ "description": "String.prototype.trim - 'S' is a string with null character ('\\u0000')",
+ "test": "assertTrue((\"\\u0000\".trim() === \"\\u0000\"));\n",
+ "precondition": "(fnExists(String.prototype.trim))"
+ },
+ {
+ "id": "15.5.4.20-3-11",
+ "path": "TestCases/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-3-11.js",
+ "description": "String.prototype.trim - 'S' is a string that starts with null character",
+ "test": "assertTrue((\"\\0\\u0000abc\".trim() === \"\\0\\u0000abc\"));\n",
+ "precondition": "(fnExists(String.prototype.trim))"
+ },
+ {
+ "id": "15.5.4.20-3-12",
+ "path": "TestCases/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-3-12.js",
+ "description": "String.prototype.trim - 'S' is a string that ends with null character",
+ "test": "assertTrue((\"abc\\0\\u0000\".trim() === \"abc\\0\\u0000\"));\n",
+ "precondition": "(fnExists(String.prototype.trim))"
+ },
+ {
+ "id": "15.5.4.20-3-13",
+ "path": "TestCases/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-3-13.js",
+ "description": "String.prototype.trim - 'S' is a string that starts with null character and ends with null character",
+ "test": "assertTrue((\"\\0\\u0000abc\\0\\u0000\".trim() === \"\\0\\u0000abc\\0\\u0000\"));\n",
+ "precondition": "(fnExists(String.prototype.trim))"
+ },
+ {
+ "id": "15.5.4.20-3-14",
+ "path": "TestCases/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-3-14.js",
+ "description": "String.prototype.trim - 'S' is a string that has null character in the middle",
+ "test": "assertTrue((\"a\\0\\u0000bc\".trim() === \"a\\0\\u0000bc\"));\n",
+ "precondition": "(fnExists(String.prototype.trim))"
+ },
+ {
+ "id": "15.5.4.20-3-2",
+ "path": "TestCases/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-3-2.js",
+ "description": "String.prototype.trim - 'S' is a string with all WhiteSpace",
+ "test": "assertTrue((function testcase() {\n\n var whiteSpacesStr = \"\\u0009\\u000A\\u000B\\u000C\\u000D\\u0020\\u00A0\\u1680\\u180E\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u2028\\u2029\\u202F\\u205F\\u3000\\uFEFF\";\n return (whiteSpacesStr.trim() === \"\");\n }).call(this));\n",
+ "precondition": "(fnExists(String.prototype.trim))"
+ },
+ {
+ "id": "15.5.4.20-3-3",
+ "path": "TestCases/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-3-3.js",
+ "description": "String.prototype.trim - 'S' is a string with all union of WhiteSpace and LineTerminator",
+ "test": "assertTrue((function testcase() {\n var lineTerminatorsStr = \"\\u000A\\u000D\\u2028\\u2029\";\n var whiteSpacesStr = \"\\u0009\\u000A\\u000B\\u000C\\u000D\\u0020\\u00A0\\u1680\\u180E\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u2028\\u2029\\u202F\\u205F\\u3000\\uFEFF\";\n var str = whiteSpacesStr + lineTerminatorsStr;\n\n return (str.trim() === \"\");\n }).call(this));\n",
+ "precondition": "(fnExists(String.prototype.trim))"
+ },
+ {
+ "id": "15.5.4.20-3-4",
+ "path": "TestCases/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-3-4.js",
+ "description": "String.prototype.trim - 'S' is a string start with union of all LineTerminator and all WhiteSpace",
+ "test": "assertTrue((function testcase() {\n var lineTerminatorsStr = \"\\u000A\\u000D\\u2028\\u2029\";\n var whiteSpacesStr = \"\\u0009\\u000A\\u000B\\u000C\\u000D\\u0020\\u00A0\\u1680\\u180E\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u2028\\u2029\\u202F\\u205F\\u3000\\uFEFF\";\n var str = whiteSpacesStr + lineTerminatorsStr + \"abc\";\n\n return (str.trim() === \"abc\");\n }).call(this));\n",
+ "precondition": "(fnExists(String.prototype.trim))"
+ },
+ {
+ "id": "15.5.4.20-3-5",
+ "path": "TestCases/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-3-5.js",
+ "description": "String.prototype.trim - 'S' is a string end with union of all LineTerminator and all WhiteSpace",
+ "test": "assertTrue((function testcase() {\n var lineTerminatorsStr = \"\\u000A\\u000D\\u2028\\u2029\";\n var whiteSpacesStr = \"\\u0009\\u000A\\u000B\\u000C\\u000D\\u0020\\u00A0\\u1680\\u180E\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u2028\\u2029\\u202F\\u205F\\u3000\\uFEFF\";\n var str = \"abc\" + whiteSpacesStr + lineTerminatorsStr ;\n\n return (str.trim() === \"abc\");\n }).call(this));\n",
+ "precondition": "(fnExists(String.prototype.trim))"
+ },
+ {
+ "id": "15.5.4.20-3-6",
+ "path": "TestCases/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-3-6.js",
+ "description": "String.prototype.trim - 'S' is a string start with union of all LineTerminator and all WhiteSpace and end with union of all LineTerminator and all WhiteSpace",
+ "test": "assertTrue((function testcase() {\n var lineTerminatorsStr = \"\\u000A\\u000D\\u2028\\u2029\";\n var whiteSpacesStr = \"\\u0009\\u000A\\u000B\\u000C\\u000D\\u0020\\u00A0\\u1680\\u180E\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u2028\\u2029\\u202F\\u205F\\u3000\\uFEFF\";\n var str = whiteSpacesStr + lineTerminatorsStr + \"abc\" + whiteSpacesStr + lineTerminatorsStr;\n\n return (str.trim() === \"abc\");\n }).call(this));\n",
+ "precondition": "(fnExists(String.prototype.trim))"
+ },
+ {
+ "id": "15.5.4.20-3-7",
+ "path": "TestCases/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-3-7.js",
+ "description": "String.prototype.trim - 'S' is a string that union of LineTerminator and WhiteSpace in the middle",
+ "test": "assertTrue((function testcase() {\n var lineTerminatorsStr = \"\\u000A\\u000D\\u2028\\u2029\";\n var whiteSpacesStr = \"\\u0009\\u000A\\u000B\\u000C\\u000D\\u0020\\u00A0\\u1680\\u180E\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u2028\\u2029\\u202F\\u205F\\u3000\\uFEFF\";\n var str = \"ab\" + whiteSpacesStr + lineTerminatorsStr + \"cd\";\n\n return (str.trim() === str);\n }).call(this));\n",
+ "precondition": "(fnExists(String.prototype.trim))"
+ },
+ {
+ "id": "15.5.4.20-3-8",
+ "path": "TestCases/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-3-8.js",
+ "description": "String.prototype.trim - 'S' is a string with all null character",
+ "test": "assertTrue((\"\\0\\u0000\".trim() === \"\\0\\u0000\"));\n",
+ "precondition": "(fnExists(String.prototype.trim))"
+ },
+ {
+ "id": "15.5.4.20-3-9",
+ "path": "TestCases/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-3-9.js",
+ "description": "String.prototype.trim - 'S' is a string with null character ('\\0')",
+ "test": "assertTrue((\"\\0\".trim() === \"\\0\"));\n",
+ "precondition": "(fnExists(String.prototype.trim))"
+ },
+ {
+ "id": "15.5.4.20-4-1",
+ "path": "TestCases/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-1.js",
+ "description": "String.prototype.trim handles multiline string with whitepace and lineterminators",
+ "test": "assertTrue((function testcase() {\nvar s = \"\\u0009a b\\\nc \\u0009\"\n\n \n if (s.trim() === \"a bc\") {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(String.prototype.trim))"
+ },
+ {
+ "id": "15.5.4.20-4-10",
+ "path": "TestCases/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-10.js",
+ "description": "String.prototype.trim handles whitepace and lineterminators (\\uFEFFabc)",
+ "test": "assertTrue((\"\\uFEFFabc\".trim() === \"abc\"));\n",
+ "precondition": "(fnExists(String.prototype.trim))"
+ },
+ {
+ "id": "15.5.4.20-4-11",
+ "path": "TestCases/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-11.js",
+ "description": "String.prototype.trim handles whitepace and lineterminators (abc\\u0009)",
+ "test": "assertTrue((\"abc\\u0009\".trim() === \"abc\"));\n",
+ "precondition": "(fnExists(String.prototype.trim))"
+ },
+ {
+ "id": "15.5.4.20-4-12",
+ "path": "TestCases/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-12.js",
+ "description": "String.prototype.trim handles whitepace and lineterminators (abc\\u000B)",
+ "test": "assertTrue((\"abc\\u000B\".trim() === \"abc\"));\n",
+ "precondition": "(fnExists(String.prototype.trim))"
+ },
+ {
+ "id": "15.5.4.20-4-13",
+ "path": "TestCases/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-13.js",
+ "description": "String.prototype.trim handles whitepace and lineterminators (abc\\u000C)",
+ "test": "assertTrue((\"abc\\u000C\".trim() === \"abc\"));\n",
+ "precondition": "(fnExists(String.prototype.trim))"
+ },
+ {
+ "id": "15.5.4.20-4-14",
+ "path": "TestCases/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-14.js",
+ "description": "String.prototype.trim handles whitepace and lineterminators (abc\\u0020)",
+ "test": "assertTrue((\"abc\\u0020\".trim() === \"abc\"));\n",
+ "precondition": "(fnExists(String.prototype.trim))"
+ },
+ {
+ "id": "15.5.4.20-4-16",
+ "path": "TestCases/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-16.js",
+ "description": "String.prototype.trim handles whitepace and lineterminators (abc\\u00A0)",
+ "test": "assertTrue((\"abc\\u00A0\".trim() === \"abc\"));\n",
+ "precondition": "(fnExists(String.prototype.trim))"
+ },
+ {
+ "id": "15.5.4.20-4-18",
+ "path": "TestCases/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-18.js",
+ "description": "String.prototype.trim handles whitepace and lineterminators (abc\\uFEFF)",
+ "test": "assertTrue((\"abc\\uFEFF\".trim() === \"abc\"));\n",
+ "precondition": "(fnExists(String.prototype.trim))"
+ },
+ {
+ "id": "15.5.4.20-4-19",
+ "path": "TestCases/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-19.js",
+ "description": "String.prototype.trim handles whitepace and lineterminators (\\u0009abc\\u0009)",
+ "test": "assertTrue((\"\\u0009abc\\u0009\".trim() === \"abc\"));\n",
+ "precondition": "(fnExists(String.prototype.trim))"
+ },
+ {
+ "id": "15.5.4.20-4-2",
+ "path": "TestCases/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-2.js",
+ "description": "String.prototype.trim handles whitepace and lineterminators ( \\u0009abc \\u0009)",
+ "test": "assertTrue((\" \\u0009abc \\u0009\".trim() === \"abc\"));\n",
+ "precondition": "(fnExists(String.prototype.trim))"
+ },
+ {
+ "id": "15.5.4.20-4-20",
+ "path": "TestCases/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-20.js",
+ "description": "String.prototype.trim handles whitepace and lineterminators (\\u000Babc\\u000B)",
+ "test": "assertTrue((\"\\u000Babc\\u000B\".trim() === \"abc\"));\n",
+ "precondition": "(fnExists(String.prototype.trim))"
+ },
+ {
+ "id": "15.5.4.20-4-21",
+ "path": "TestCases/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-21.js",
+ "description": "String.prototype.trim handles whitepace and lineterminators (\\u000Cabc\\u000C)",
+ "test": "assertTrue((\"\\u000Cabc\\u000C\".trim() === \"abc\"));\n",
+ "precondition": "(fnExists(String.prototype.trim))"
+ },
+ {
+ "id": "15.5.4.20-4-22",
+ "path": "TestCases/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-22.js",
+ "description": "String.prototype.trim handles whitepace and lineterminators (\\u0020abc\\u0020)",
+ "test": "assertTrue((\"\\u0020abc\\u0020\".trim() === \"abc\"));\n",
+ "precondition": "(fnExists(String.prototype.trim))"
+ },
+ {
+ "id": "15.5.4.20-4-24",
+ "path": "TestCases/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-24.js",
+ "description": "String.prototype.trim handles whitepace and lineterminators (\\u00A0abc\\u00A0)",
+ "test": "assertTrue((\"\\u00A0abc\\u00A0\".trim() === \"abc\"));\n",
+ "precondition": "(fnExists(String.prototype.trim))"
+ },
+ {
+ "id": "15.5.4.20-4-27",
+ "path": "TestCases/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-27.js",
+ "description": "String.prototype.trim handles whitepace and lineterminators (\\u0009\\u0009)",
+ "test": "assertTrue((\"\\u0009\\u0009\".trim() === \"\"));\n",
+ "precondition": "(fnExists(String.prototype.trim))"
+ },
+ {
+ "id": "15.5.4.20-4-28",
+ "path": "TestCases/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-28.js",
+ "description": "String.prototype.trim handles whitepace and lineterminators (\\u000B\\u000B)",
+ "test": "assertTrue((\"\\u000B\\u000B\".trim() === \"\"));\n",
+ "precondition": "(fnExists(String.prototype.trim))"
+ },
+ {
+ "id": "15.5.4.20-4-29",
+ "path": "TestCases/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-29.js",
+ "description": "String.prototype.trim handles whitepace and lineterminators (\\u000C\\u000C)",
+ "test": "assertTrue((\"\\u000C\\u000C\".trim() === \"\"));\n",
+ "precondition": "(fnExists(String.prototype.trim))"
+ },
+ {
+ "id": "15.5.4.20-4-3",
+ "path": "TestCases/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-3.js",
+ "description": "String.prototype.trim handles whitepace and lineterminators (\\u0009abc)",
+ "test": "assertTrue((\"\\u0009abc\".trim() === \"abc\"));\n",
+ "precondition": "(fnExists(String.prototype.trim))"
+ },
+ {
+ "id": "15.5.4.20-4-30",
+ "path": "TestCases/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-30.js",
+ "description": "String.prototype.trim handles whitepace and lineterminators (\\u0020\\u0020)",
+ "test": "assertTrue((\"\\u0020\\u0020\".trim() === \"\"));\n",
+ "precondition": "(fnExists(String.prototype.trim))"
+ },
+ {
+ "id": "15.5.4.20-4-32",
+ "path": "TestCases/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-32.js",
+ "description": "String.prototype.trim handles whitepace and lineterminators (\\u00A0\\u00A0)",
+ "test": "assertTrue((\"\\u00A0\\u00A0\".trim() === \"\"));\n",
+ "precondition": "(fnExists(String.prototype.trim))"
+ },
+ {
+ "id": "15.5.4.20-4-34",
+ "path": "TestCases/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-34.js",
+ "description": "String.prototype.trim handles whitepace and lineterminators (\\uFEFF\\uFEFF)",
+ "test": "assertTrue((\"\\uFEFF\\uFEFF\".trim() === \"\"));\n",
+ "precondition": "(fnExists(String.prototype.trim))"
+ },
+ {
+ "id": "15.5.4.20-4-35",
+ "path": "TestCases/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-35.js",
+ "description": "String.prototype.trim handles whitepace and lineterminators (ab\\u0009c)",
+ "test": "assertTrue((\"ab\\u0009c\".trim() === \"ab\\u0009c\"));\n",
+ "precondition": "(fnExists(String.prototype.trim))"
+ },
+ {
+ "id": "15.5.4.20-4-36",
+ "path": "TestCases/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-36.js",
+ "description": "String.prototype.trim handles whitepace and lineterminators (ab\\u000Bc)",
+ "test": "assertTrue((\"ab\\u000Bc\".trim() === \"ab\\u000Bc\"));\n",
+ "precondition": "(fnExists(String.prototype.trim))"
+ },
+ {
+ "id": "15.5.4.20-4-37",
+ "path": "TestCases/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-37.js",
+ "description": "String.prototype.trim handles whitepace and lineterminators (ab\\u000Cc)",
+ "test": "assertTrue((\"ab\\u000Cc\".trim() === \"ab\\u000Cc\"));\n",
+ "precondition": "(fnExists(String.prototype.trim))"
+ },
+ {
+ "id": "15.5.4.20-4-38",
+ "path": "TestCases/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-38.js",
+ "description": "String.prototype.trim handles whitepace and lineterminators (ab\\u0020c)",
+ "test": "assertTrue((\"ab\\u0020c\".trim() === \"ab\\u0020c\"));\n",
+ "precondition": "(fnExists(String.prototype.trim))"
+ },
+ {
+ "id": "15.5.4.20-4-39",
+ "path": "TestCases/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-39.js",
+ "description": "String.prototype.trim handles whitepace and lineterminators (ab\\u0085c)",
+ "test": "assertTrue((\"ab\\u0085c\".trim() === \"ab\\u0085c\"));\n",
+ "precondition": "(fnExists(String.prototype.trim))"
+ },
+ {
+ "id": "15.5.4.20-4-4",
+ "path": "TestCases/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-4.js",
+ "description": "String.prototype.trim handles whitepace and lineterminators (\\u000Babc)",
+ "test": "assertTrue((\"\\u000Babc\".trim() === \"abc\"));\n",
+ "precondition": "(fnExists(String.prototype.trim))"
+ },
+ {
+ "id": "15.5.4.20-4-40",
+ "path": "TestCases/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-40.js",
+ "description": "String.prototype.trim handles whitepace and lineterminators (ab\\u00A0c)",
+ "test": "assertTrue((\"ab\\u00A0c\".trim() === \"ab\\u00A0c\"));\n",
+ "precondition": "(fnExists(String.prototype.trim))"
+ },
+ {
+ "id": "15.5.4.20-4-41",
+ "path": "TestCases/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-41.js",
+ "description": "String.prototype.trim handles whitepace and lineterminators (ab\\u200Bc)",
+ "test": "assertTrue((\"ab\\u200Bc\".trim() === \"ab\\u200Bc\"));\n",
+ "precondition": "(fnExists(String.prototype.trim))"
+ },
+ {
+ "id": "15.5.4.20-4-42",
+ "path": "TestCases/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-42.js",
+ "description": "String.prototype.trim handles whitepace and lineterminators (ab\\uFEFFc)",
+ "test": "assertTrue((\"ab\\uFEFFc\".trim() === \"ab\\uFEFFc\"));\n",
+ "precondition": "(fnExists(String.prototype.trim))"
+ },
+ {
+ "id": "15.5.4.20-4-43",
+ "path": "TestCases/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-43.js",
+ "description": "String.prototype.trim handles whitepace and lineterminators (\\u000Aabc)",
+ "test": "assertTrue((\"\\u000Aabc\".trim() === \"abc\"));\n",
+ "precondition": "(fnExists(String.prototype.trim))"
+ },
+ {
+ "id": "15.5.4.20-4-44",
+ "path": "TestCases/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-44.js",
+ "description": "String.prototype.trim handles whitepace and lineterminators (\\u000Dabc)",
+ "test": "assertTrue((\"\\u000Dabc\".trim() === \"abc\"));\n",
+ "precondition": "(fnExists(String.prototype.trim))"
+ },
+ {
+ "id": "15.5.4.20-4-45",
+ "path": "TestCases/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-45.js",
+ "description": "String.prototype.trim handles whitepace and lineterminators (\\u2028abc)",
+ "test": "assertTrue((\"\\u2028abc\".trim() === \"abc\"));\n",
+ "precondition": "(fnExists(String.prototype.trim))"
+ },
+ {
+ "id": "15.5.4.20-4-46",
+ "path": "TestCases/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-46.js",
+ "description": "String.prototype.trim handles whitepace and lineterminators (\\u2029abc)",
+ "test": "assertTrue((\"\\u2029abc\".trim() === \"abc\"));\n",
+ "precondition": "(fnExists(String.prototype.trim))"
+ },
+ {
+ "id": "15.5.4.20-4-47",
+ "path": "TestCases/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-47.js",
+ "description": "String.prototype.trim handles whitepace and lineterminators (abc\\u000A)",
+ "test": "assertTrue((\"abc\\u000A\".trim() === \"abc\"));\n",
+ "precondition": "(fnExists(String.prototype.trim))"
+ },
+ {
+ "id": "15.5.4.20-4-48",
+ "path": "TestCases/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-48.js",
+ "description": "String.prototype.trim handles whitepace and lineterminators (abc\\u000D)",
+ "test": "assertTrue((\"abc\\u000D\".trim() === \"abc\"));\n",
+ "precondition": "(fnExists(String.prototype.trim))"
+ },
+ {
+ "id": "15.5.4.20-4-49",
+ "path": "TestCases/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-49.js",
+ "description": "String.prototype.trim handles whitepace and lineterminators (abc\\u2028)",
+ "test": "assertTrue((\"abc\\u2028\".trim() === \"abc\"));\n",
+ "precondition": "(fnExists(String.prototype.trim))"
+ },
+ {
+ "id": "15.5.4.20-4-5",
+ "path": "TestCases/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-5.js",
+ "description": "String.prototype.trim handles whitepace and lineterminators (\\u000Cabc)",
+ "test": "assertTrue((\"\\u000Cabc\".trim() === \"abc\"));\n",
+ "precondition": "(fnExists(String.prototype.trim))"
+ },
+ {
+ "id": "15.5.4.20-4-50",
+ "path": "TestCases/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-50.js",
+ "description": "String.prototype.trim handles whitepace and lineterminators (abc\\u2029)",
+ "test": "assertTrue((\"abc\\u2029\".trim() === \"abc\"));\n",
+ "precondition": "(fnExists(String.prototype.trim))"
+ },
+ {
+ "id": "15.5.4.20-4-51",
+ "path": "TestCases/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-51.js",
+ "description": "String.prototype.trim handles whitepace and lineterminators (\\u000Aabc\\u000A)",
+ "test": "assertTrue((\"\\u000Aabc\\u000A\".trim() === \"abc\"));\n",
+ "precondition": "(fnExists(String.prototype.trim))"
+ },
+ {
+ "id": "15.5.4.20-4-52",
+ "path": "TestCases/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-52.js",
+ "description": "String.prototype.trim handles whitepace and lineterminators (\\u000Dabc\\u000D)",
+ "test": "assertTrue((\"\\u000Dabc\\u000D\".trim() === \"abc\"));\n",
+ "precondition": "(fnExists(String.prototype.trim))"
+ },
+ {
+ "id": "15.5.4.20-4-53",
+ "path": "TestCases/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-53.js",
+ "description": "String.prototype.trim handles whitepace and lineterminators (\\u2028abc\\u2028)",
+ "test": "assertTrue((\"\\u2028abc\\u2028\".trim() === \"abc\"));\n",
+ "precondition": "(fnExists(String.prototype.trim))"
+ },
+ {
+ "id": "15.5.4.20-4-54",
+ "path": "TestCases/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-54.js",
+ "description": "String.prototype.trim handles whitepace and lineterminators (\\u2029abc\\u2029)",
+ "test": "assertTrue((\"\\u2029abc\\u2029\".trim() === \"abc\"));\n",
+ "precondition": "(fnExists(String.prototype.trim))"
+ },
+ {
+ "id": "15.5.4.20-4-55",
+ "path": "TestCases/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-55.js",
+ "description": "String.prototype.trim handles whitepace and lineterminators (\\u000A\\u000A)",
+ "test": "assertTrue((\"\\u000A\\u000A\".trim() === \"\"));\n",
+ "precondition": "(fnExists(String.prototype.trim))"
+ },
+ {
+ "id": "15.5.4.20-4-56",
+ "path": "TestCases/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-56.js",
+ "description": "String.prototype.trim handles whitepace and lineterminators (\\u000D\\u000D)",
+ "test": "assertTrue((\"\\u000D\\u000D\".trim() === \"\"));\n",
+ "precondition": "(fnExists(String.prototype.trim))"
+ },
+ {
+ "id": "15.5.4.20-4-57",
+ "path": "TestCases/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-57.js",
+ "description": "String.prototype.trim handles whitepace and lineterminators (\\u2028\\u2028)",
+ "test": "assertTrue((\"\\u2028\\u2028\".trim() === \"\"));\n",
+ "precondition": "(fnExists(String.prototype.trim))"
+ },
+ {
+ "id": "15.5.4.20-4-58",
+ "path": "TestCases/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-58.js",
+ "description": "String.prototype.trim handles whitepace and lineterminators (\\u2029\\u2029)",
+ "test": "assertTrue((\"\\u2029\\u2029\".trim() === \"\"));\n",
+ "precondition": "(fnExists(String.prototype.trim))"
+ },
+ {
+ "id": "15.5.4.20-4-59",
+ "path": "TestCases/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-59.js",
+ "description": "String.prototype.trim handles whitepace and lineterminators (\\u2029abc as a multiline string)",
+ "test": "assertTrue((function testcase() {\n var s = \"\\u2029\\\n abc\";\n if (s.trim() === \"abc\") {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(String.prototype.trim))"
+ },
+ {
+ "id": "15.5.4.20-4-6",
+ "path": "TestCases/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-6.js",
+ "description": "String.prototype.trim handles whitepace and lineterminators (\\u0020abc)",
+ "test": "assertTrue((\"\\u0020abc\".trim() === \"abc\"));\n",
+ "precondition": "(fnExists(String.prototype.trim))"
+ },
+ {
+ "id": "15.5.4.20-4-60",
+ "path": "TestCases/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-60.js",
+ "description": "String.prototype.trim handles whitepace and lineterminators (string with just blanks)",
+ "test": "assertTrue((\" \".trim() === \"\"));\n",
+ "precondition": "(fnExists(String.prototype.trim))"
+ },
+ {
+ "id": "15.5.4.20-4-8",
+ "path": "TestCases/chapter15/15.5/15.5.4/15.5.4.20/15.5.4.20-4-8.js",
+ "description": "String.prototype.trim handles whitepace and lineterminators (\\u00A0abc)",
+ "test": "assertTrue((\"\\u00A0abc\".trim() === \"abc\"));\n",
+ "precondition": "(fnExists(String.prototype.trim))"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.5.4.4_String.prototype.charAt.json b/website/resources/scripts/testcases2/15.5.4.4_String.prototype.charAt.json
new file mode 100644
index 000000000..153dd6bce
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.5.4.4_String.prototype.charAt.json
@@ -0,0 +1,146 @@
+{
+ "testCollection": {
+ "name": "15.5.4.4_String.prototype.charAt",
+ "numTests": 23,
+ "tests": [
+ {
+ "section": "15.5.4.4, 13.2",
+ "description": "Checking by using eval",
+ "test": "function __FACTORY(){this.toString = function(){ return \"wizard\";};};\n\n__FACTORY.prototype.charAt = String.prototype.charAt;\n\n__instance = new __FACTORY;\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nwith(__instance){\n if (__instance.charAt(eval(\"1\"),true,null,{})!== \"i\") {\n $ERROR('#1: __instance.charAt(eval(\"1\"),true,null,{})=== \"i\". Actual: '+__instance.charAt(eval(\"1\"),true,null,{})); \n }\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n",
+ "id": "S15.5.4.4_A1.1"
+ },
+ {
+ "section": "15.5.4.4",
+ "description": "Checking if varying the String.prototype.charAt.length property fails",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (!(String.prototype.charAt.hasOwnProperty('length'))) {\n $ERROR('#1: String.prototype.charAt.hasOwnProperty(\\'length\\') return true. Actual: '+String.prototype.charAt.hasOwnProperty('length')); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\nvar __obj = String.prototype.charAt.length;\n\nString.prototype.charAt.length = function(){return \"shifted\";};\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (String.prototype.charAt.length !== __obj) {\n $ERROR('#2: __obj = String.prototype.charAt.length; String.prototype.charAt.length = function(){return \"shifted\";}; String.prototype.charAt.length === __obj. Actual: '+String.prototype.charAt.length ); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.4_A10"
+ },
+ {
+ "section": "15.5.4.4",
+ "description": "Checking String.prototype.charAt.length",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (!(String.prototype.charAt.hasOwnProperty(\"length\"))) {\n $ERROR('#1: String.prototype.charAt.hasOwnProperty(\"length\") return true. Actual: '+String.prototype.charAt.hasOwnProperty(\"length\")); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (String.prototype.charAt.length !== 1) {\n $ERROR('#2: String.prototype.charAt.length === 1. Actual: '+String.prototype.charAt.length ); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.4_A11"
+ },
+ {
+ "section": "15.5.4.4",
+ "description": "pos is false and true, and instance is object",
+ "test": "var __instance = new Object(42);\n\n__instance.charAt = String.prototype.charAt;\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__instance.charAt(false)+__instance.charAt(true) !== \"42\") {\n $ERROR('#1: __instance = new Object(42); __instance.charAt = String.prototype.charAt; __instance = new Object(42); __instance.charAt = String.prototype.charAt; __instance.charAt(false)+__instance.charAt(true) === \"42\". Actual: '+__instance.charAt(false)+__instance.charAt(true) ); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.4_A1_T1"
+ },
+ {
+ "section": "15.5.4.4",
+ "description": "Call charAt() function with object argument",
+ "test": "var __obj = {toString:function(){return 1;}}\nvar __str = \"lego\";\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nwith(__str){\n if (charAt(__obj) !== \"e\") {\n $ERROR('#1: var __obj = {toString:function(){return 1;}}; var __str = \"lego\"; charAt(__obj) === \"e\". Actual: charAt(__obj) ==='+charAt(__obj) ); \n }\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.4_A1_T10"
+ },
+ {
+ "section": "15.5.4.4",
+ "description": "pos is equation with false and true, and instance is Boolean object",
+ "test": "var __instance = new Boolean;\n\n__instance.charAt = String.prototype.charAt;\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__instance.charAt(false)+__instance.charAt(true)+__instance.charAt(true+1) !== \"fal\") {\n $ERROR('#1: __instance = new Boolean; __instance.charAt = String.prototype.charAt; __instance = new Boolean; __instance.charAt = String.prototype.charAt; __instance.charAt(false)+__instance.charAt(true)+__instance.charAt(true+1) === \"fal\". Actual: '+__instance.charAt(false)+__instance.charAt(true)+__instance.charAt(true+1) ); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.4_A1_T2"
+ },
+ {
+ "section": "15.5.4.4",
+ "description": "Use numbers and strings as pos",
+ "test": "var charAt = String.prototype.charAt;\n\nif (typeof toString === \"undefined\"){\n var toString = Object.prototype.toString;\n}\n\nvar __class__ = toString();\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (charAt(\"1\") + charAt(2) + charAt(\"3\") + charAt(4) + charAt(\"5\") + charAt(6) !== \"object\") {\n $ERROR('#1: charAt = String.prototype.charAt; charAt(\"1\") + charAt(2) + charAt(\"3\") + charAt(4) + charAt(\"5\") + charAt(6) === \"object\". Actual: '+charAt(\"1\") + charAt(2) + charAt(\"3\") + charAt(4) + charAt(\"5\") + charAt(6) ); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.4_A1_T3"
+ },
+ {
+ "section": "15.5.4.4",
+ "description": "Call charAt() function without argument of string object",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\n//since ToInteger() evaluates to 0 charAt() evaluates to charAt(0)\nif (\"lego\".charAt() !== \"l\") {\n $ERROR('#1: \"lego\".charAt() === \"l\". Actual: \"lego\".charAt() ==='+(\"lego\".charAt()) ); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.4_A1_T4"
+ },
+ {
+ "section": "15.5.4.4",
+ "description": "Call charAt() function with null argument of function object",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\n//since ToInteger(null) evaluates to 0 charAt() evaluates to charAt(0)\nif (function(){return \"lego\"}().charAt(null) !== \"l\") {\n $ERROR('#1: function(){return \"lego\"}().charAt(null) === \"l\". Actual: function(){return \"lego\"}().charAt(null) ==='+function(){return \"lego\"}().charAt(null) ); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.4_A1_T5"
+ },
+ {
+ "section": "15.5.4.4",
+ "description": "Call charAt() function with x argument of new String object, where x is undefined variable",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\n//since ToInteger(undefined) evaluates to 0 charAt() evaluates to charAt(0)\nif (new String(\"lego\").charAt(x) !== \"l\") {\n $ERROR('#1: var x; new String(\"lego\").charAt(x) === \"l\". Actual: new String(\"lego\").charAt(x) ==='+new String(\"lego\").charAt(x) ); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\nvar x;\n",
+ "id": "S15.5.4.4_A1_T6"
+ },
+ {
+ "section": "15.5.4.4",
+ "description": "Call charAt() function with undefined argument of string object",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\n//since ToInteger(undefined) evaluates to 0 charAt() evaluates to charAt(0)\nif (String(\"lego\").charAt(undefined) !== \"l\") {\n $ERROR('#1: String(\"lego\").charAt(undefined) === \"l\". Actual: String(\"lego\").charAt(undefined) ==='+String(\"lego\").charAt(undefined) ); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.4_A1_T7"
+ },
+ {
+ "section": "15.5.4.4",
+ "description": "Call charAt() function with void 0 argument of string object",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\n//since ToInteger(void 0) evaluates to 0 charAt() evaluates to charAt(0)\nif (String(42).charAt(void 0) !== \"4\") {\n $ERROR('#1: String(42).charAt(void 0) === \"4\". Actual: String(42).charAt(void 0) ==='+String(42).charAt(void 0) ); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.4_A1_T8"
+ },
+ {
+ "section": "15.5.4.4",
+ "description": "Call charAt() function with function(){}() argument of string object",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\n//since ToInteger(undefined) evaluates to 0 charAt() evaluates to charAt(0)\nif (new String(42).charAt(function(){}()) !== \"4\") {\n $ERROR('#1: new String(42).charAt(function(){}()) === \"4\". Actual: new String(42).charAt(function(){}()) ==='+new String(42).charAt(function(){}()) ); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.4_A1_T9"
+ },
+ {
+ "section": "15.5.4.4",
+ "description": "Call charAt(pos) with negative pos",
+ "test": "function __FACTORY(){};\n\n__FACTORY.prototype.charAt = String.prototype.charAt;\n\nvar __instance = new __FACTORY;\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__instance.charAt(-1) !== \"\") {\n $ERROR('#1: __instance.charAt(-1) === \"\". Actual: __instance.charAt(-1) ==='+__instance.charAt(-1) ); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.4_A2"
+ },
+ {
+ "section": "15.5.4.4",
+ "description": "pos is bigger of string length",
+ "test": "var __instance = new String(\"ABC\");\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__instance.charAt(3) !== \"\") {\n $ERROR('#1: __instance = new String(\"ABC\"); __instance.charAt(3) === \"\". Actual: __instance.charAt(3) ==='+__instance.charAt(3) ); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.4_A3"
+ },
+ {
+ "section": "15.5.4.4",
+ "description": "Compare results of x.charAt(pos) and x.substring(pos, pos+1)",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nfor(var i=0; i<6; i++) {\n if (\"ABC\\u0041\\u0042\\u0043\".charAt(i) !== \"\\u0041\\u0042\\u0043ABC\".substring(i, i+1)) {\n $ERROR('#'+i+': \"ABC\\\\u0041\\\\u0042\\\\u0043\".charAt('+i+') === \"\\\\u0041\\\\u0042\\\\u0043ABC\".substring('+i+', '+(i+1)+'). Actual: \"ABC\\\\u0041\\\\u0042\\\\u0043\".charAt('+i+') ==='+(\"ABC\\u0041\\u0042\\u0043\".charAt(i)) ); \n }\n}\n \n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.4_A4_T1"
+ },
+ {
+ "section": "15.5.4.4",
+ "description": "Compare results of x.charAt(pos) and x.substring(pos, pos+1), wheb pos is smaller of zero",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nfor(var i=-2; i<0; i++) {\n if (\"ABC\\u0041\\u0042\\u0043\".charAt(i) !== \"\\u0041\\u0042\\u0043ABC\".substring(i, i+1)) {\n $ERROR('#'+(i+2)+': \"ABC\\\\u0041\\\\u0042\\\\u0043\".charAt('+i+') === \"\\\\u0041\\\\u0042\\\\u0043ABC\".substring('+i+', '+(i+1)+'). Actual: \"ABC\\\\u0041\\\\u0042\\\\u0043\".charAt('+i+') ==='+(\"ABC\\u0041\\u0042\\u0043\".charAt(i)) ); \n }\n}\n \n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.4_A4_T2"
+ },
+ {
+ "section": "15.5.4.4",
+ "description": "Compare results of x.charAt(pos) and x.substring(pos, pos+1), wheb pos is bigger string length",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nfor(var i=6; i<8; i++) {\n if (\"ABC\\u0041\\u0042\\u0043\".charAt(i) !== \"\\u0041\\u0042\\u0043ABC\".substring(i, i+1)) {\n $ERROR('#'+(i-5)+': \"ABC\\\\u0041\\\\u0042\\\\u0043\".charAt('+i+') === \"\\\\u0041\\\\u0042\\\\u0043ABC\".substring('+i+', '+(i+1)+'). Actual: \"ABC\\\\u0041\\\\u0042\\\\u0043\".charAt('+i+') ==='+(\"ABC\\u0041\\u0042\\u0043\".charAt(i))); \n }\n}\n \n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.4_A4_T3"
+ },
+ {
+ "section": "15.5.4.4",
+ "description": "Change toString function, it trow exception, and call charAt()",
+ "test": "var __obj={\n valueOf:1,\n toString:function(){throw 'intostring'},\n charAt:String.prototype.charAt\n}\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\ntry {\n var x = __obj.charAt();\n $FAIL('#1: __obj={valueOf:1,toString:function(){throw \\'intostring\\'},charAt:String.prototype.charAt}; \"var x = __obj.charAt()\" lead to throwing exception');\n} catch (e) {\n if (e !== 'intostring') {\n $ERROR('#1.1: Exception === \\'intostring\\'. Actual: exception ==='+e ); \n }\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.4_A5"
+ },
+ {
+ "section": "15.5.4.4, 13.2",
+ "description": "Checking String.prototype.charAt.prototype",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (String.prototype.charAt.prototype !== undefined) {\n $ERROR('#1: String.prototype.charAt.prototype === undefined. Actual: '+String.prototype.charAt.prototype ); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.4_A6"
+ },
+ {
+ "section": "15.5.4.4, 13.2",
+ "description": "Checking if creating the String.prototype.charAt object fails",
+ "test": "var __FACTORY = String.prototype.charAt;\n\ntry {\n var __instance = new __FACTORY;\n $FAIL('#1: __FACTORY = String.prototype.charAt; \"__instance = new __FACTORY\" lead to throwing exception');\n} catch (e) {\n if ((e instanceof TypeError) !== true) {\n $ERROR('#1.2: undefined = 1 throw a TypeError. Actual: ' + (e)); \n }\n}\n",
+ "id": "S15.5.4.4_A7"
+ },
+ {
+ "section": "15.5.4.4",
+ "description": "Checking if enumerating the String.prototype.charAt.length property fails",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#0\nif (!(String.prototype.charAt.hasOwnProperty('length'))) {\n $ERROR('#0: String.prototype.charAt.hasOwnProperty(\\'length\\') return true. Actual: '+String.prototype.charAt.hasOwnProperty('length')); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n\n//////////////////////////////////////////////////////////////////////////////\n// CHECK#1\nif (String.prototype.charAt.propertyIsEnumerable('length')) {\n $ERROR('#1: String.prototype.charAt.propertyIsEnumerable(\\'length\\') return false. Actual: '+String.prototype.charAt.propertyIsEnumerable('length'));\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n// CHECK#2\nvar count=0;\n\nfor (p in String.prototype.charAt){\n if (p===\"length\") count++;\n}\n\nif (count !== 0) {\n $ERROR('#2: count=0; for (p in String.prototype.charAt){if (p===\"length\") count++;}; count === 0. Actual: count ==='+count ); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.4_A8"
+ },
+ {
+ "section": "15.5.4.4",
+ "description": "Checking if deleting the String.prototype.charAt.length property fails",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#0\nif (!(String.prototype.charAt.hasOwnProperty('length'))) {\n $ERROR('#0: String.prototype.charAt.hasOwnProperty(\\'length\\') return true. Actual: '+String.prototype.charAt.hasOwnProperty('length')); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (delete String.prototype.charAt.length) {\n $ERROR('#1: delete String.prototype.charAt.length return false');\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (!(String.prototype.charAt.hasOwnProperty('length'))) {\n $ERROR('#2: delete String.prototype.charAt.length; String.prototype.charAt.hasOwnProperty(\\'length\\') return true. Actual: '+String.prototype.charAt.hasOwnProperty('length')); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.4_A9"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.5.4.5_String.prototype.charCodeAt.json b/website/resources/scripts/testcases2/15.5.4.5_String.prototype.charCodeAt.json
new file mode 100644
index 000000000..9163ec8d6
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.5.4.5_String.prototype.charCodeAt.json
@@ -0,0 +1,128 @@
+{
+ "testCollection": {
+ "name": "15.5.4.5_String.prototype.charCodeAt",
+ "numTests": 20,
+ "tests": [
+ {
+ "section": "15.5.4.5, 13.2",
+ "description": "Checking by using eval",
+ "test": "function __FACTORY(){this.toString = function(){ return \"wizard\";};};\n\n__FACTORY.prototype.charCodeAt = String.prototype.charCodeAt;\n\nvar __instance = new __FACTORY;\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nwith(__instance){\n \n if (__instance.charCodeAt(eval(\"1\"),true,null,{})!== 0x69) {\n $ERROR('#1: __instance.charCodeAt(eval(\"1\"),true,null,{})=== 0x69. Actual: __instance.charCodeAt(eval(\"1\"),true,null,{})==='+__instance.charCodeAt(eval(\"1\"),true,null,{})); \n }\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n",
+ "id": "S15.5.4.5_A1.1"
+ },
+ {
+ "section": "15.5.4.5",
+ "description": "Checking if varying the String.prototype.charCodeAt.length property fails",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (!(String.prototype.charCodeAt.hasOwnProperty('length'))) {\n $ERROR('#1: String.prototype.charCodeAt.hasOwnProperty(\\'length\\') return true. Actual: '+String.prototype.charCodeAt.hasOwnProperty('length')); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\nvar __obj = String.prototype.charCodeAt.length;\n\nString.prototype.charCodeAt.length = function(){return \"shifted\";};\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (String.prototype.charCodeAt.length !== __obj) {\n $ERROR('#2: __obj = String.prototype.charCodeAt.length; String.prototype.charCodeAt.length = function(){return \"shifted\";}; String.prototype.charCodeAt.length === __obj. Actual: '+String.prototype.charCodeAt.length ); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.5_A10"
+ },
+ {
+ "section": "15.5.4.5",
+ "description": "Checking String.prototype.charCodeAt.length",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (!(String.prototype.charCodeAt.hasOwnProperty(\"length\"))) {\n $ERROR('#1: String.prototype.charCodeAt.hasOwnProperty(\"length\") return true. Actual: '+String.prototype.charCodeAt.hasOwnProperty(\"length\")); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (String.prototype.charCodeAt.length !== 1) {\n $ERROR('#2: String.prototype.charCodeAt.length === 1. Actual: '+String.prototype.charCodeAt.length ); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.5_A11"
+ },
+ {
+ "section": "15.5.4.5",
+ "description": "pos is false and true, and instance is object",
+ "test": "var __instance = new Object(42);\n\n__instance.charCodeAt = String.prototype.charCodeAt;\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif ((__instance.charCodeAt(false) !== 52)||(__instance.charCodeAt(true) !== 50)) {\n $ERROR('#1: __instance = new Object(42); __instance.charCodeAt = String.prototype.charCodeAt; __instance.charCodeAt(false) === 52 and __instance.charCodeAt(true) === 50. Actual: __instance.charCodeAt(false) ==='+__instance.charCodeAt(false)+' and __instance.charCodeAt(true) ==='+__instance.charCodeAt(true) ); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.5_A1_T1"
+ },
+ {
+ "section": "15.5.4.5",
+ "description": "Call charCodeAt() function with object argument",
+ "test": "var __obj = {toString:function(){return 1;}}\nvar __str = \"lego\";\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nwith(__str){\n if (charCodeAt(__obj) !== 0x65) {\n $ERROR('#1: var __obj = {toString:function(){return 1;}}; var __str = \"lego\"; charCodeAt(__obj) === 0x65. Actual: charCodeAt(__obj) ==='+charCodeAt(__obj) ); \n }\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.5_A1_T10"
+ },
+ {
+ "section": "15.5.4.5",
+ "description": "pos is equation with false and true, and instance is Boolean object",
+ "test": "var __instance = new Boolean;\n\n__instance.charCodeAt = String.prototype.charCodeAt;\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__instance.charCodeAt(false)!==0x66) {\n $ERROR('#1: __instance = new Boolean; __instance.charCodeAt = String.prototype.charCodeAt; __instance.charCodeAt(false)===0x66. Actual: '+__instance.charCodeAt(false)); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (__instance.charCodeAt(true)!==0x61) {\n $ERROR('#2: __instance = new Boolean; __instance.charCodeAt = String.prototype.charCodeAt; __instance.charCodeAt(true)===0x61. Actual: '+__instance.charCodeAt(true)); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#3\nif (__instance.charCodeAt(true+1) !== 0x6C) {\n $ERROR('#3: __instance = new Boolean; __instance.charCodeAt = String.prototype.charCodeAt; __instance.charCodeAt(true+1) === 0x6C. Actual: '+__instance.charCodeAt(true+1) ); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.5_A1_T2"
+ },
+ {
+ "section": "15.5.4.5",
+ "description": "Use numbers and strings as pos",
+ "test": "var charCodeAt = String.prototype.charCodeAt;\n\nif (typeof toString === \"undefined\"){\n var toString = Object.prototype.toString;\n}\n\nvar __class__ = toString();\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (charCodeAt(\"2\") !== 0x62) {\n $ERROR('#1: charCodeAt = String.prototype.charCodeAt; charCodeAt(\"2\") === 0x62. Actual: '+charCodeAt(\"2\") ); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (charCodeAt(3) !== 0x6A) {\n $ERROR('#2: charCodeAt = String.prototype.charCodeAt; charCodeAt(3) === 0x6A. Actual: '+charCodeAt(3) ); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#3\nif (charCodeAt(\"4\") !== 0x65) {\n $ERROR('#3: charCodeAt = String.prototype.charCodeAt; charCodeAt(\"4\") === 0x65. Actual: '+charCodeAt(\"4\") ); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#4\nif (charCodeAt(5) !== 0x63) {\n $ERROR('#4: charCodeAt = String.prototype.charCodeAt; charCodeAt(5) === 0x63. Actual: '+charCodeAt(5) ); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#5\nif (charCodeAt(\"6\") !== 0x74) {\n $ERROR('#5: charCodeAt = String.prototype.charCodeAt; charCodeAt(\"6\") === 0x74. Actual: '+charCodeAt(\"6\") ); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n",
+ "id": "S15.5.4.5_A1_T3"
+ },
+ {
+ "section": "15.5.4.5",
+ "description": "Call charCodeAt() function without argument of string object",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\n//since Number() evaluates to 0 charCodeAt() evaluates to charCodeAt(0)\nif (\"smart\".charCodeAt() !== 0x73) {\n $ERROR('#1: \"smart\".charCodeAt() === 0x73. Actual: \"smart\".charCodeAt() ==='+(\"smart\".charCodeAt()) ); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.5_A1_T4"
+ },
+ {
+ "section": "15.5.4.5",
+ "description": "Call charCodeAt() function with null argument of function object",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\n//since ToInteger(null) evaluates to 0 charCodeAt() evaluates to charCodeAt(0)\nif (function(){return \"lego\"}().charCodeAt(null) !== 0x6C) {\n $ERROR('#1: function(){return \"lego\"}().charCodeAt(null) === 0x6C. Actual: '+function(){return \"lego\"}().charCodeAt(null) ); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.5_A1_T5"
+ },
+ {
+ "section": "15.5.4.5",
+ "description": "Call charCodeAt() function with x argument of new String object, where x is undefined variable",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\n//since ToInteger(undefined) evaluates to 0 charCodeAt() evaluates to charCodeAt(0)\nif (new String(\"lego\").charCodeAt(x) !== 0x6C) {\n $ERROR('#1: var x; new String(\"lego\").charCodeAt(x) === 0x6C. Actual: new String(\"lego\").charCodeAt(x) ==='+new String(\"lego\").charCodeAt(x) ); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\nvar x;\n",
+ "id": "S15.5.4.5_A1_T6"
+ },
+ {
+ "section": "15.5.4.5",
+ "description": "Call charCodeAt() function with undefined argument of string object",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\n//since ToInteger(undefined) evaluates to 0 charCodeAt() evaluates to charCodeAt(0)\nif (String(\"lego\").charCodeAt(undefined) !== 0x6C) {\n $ERROR('#1: String(\"lego\").charCodeAt(undefined) === 0x6C. Actual: String(\"lego\").charCodeAt(undefined) ==='+String(\"lego\").charCodeAt(undefined) ); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.5_A1_T7"
+ },
+ {
+ "section": "15.5.4.5",
+ "description": "Call charCodeAt() function with void 0 argument of string object",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\n//since ToInteger(void 0) evaluates to 0 charCodeAt() evaluates to charCodeAt(0)\nif (String(42).charCodeAt(void 0) !== 0x34) {\n $ERROR('#1: String(42).charCodeAt(void 0) === 0x34. Actual: String(42).charCodeAt(void 0) ==='+String(42).charCodeAt(void 0) ); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.5_A1_T8"
+ },
+ {
+ "section": "15.5.4.5",
+ "description": "Call charCodeAt() function with function(){}() argument of string object",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\n//since ToInteger(undefined) evaluates to 0 charCodeAt() evaluates to charCodeAt(0)\nif (new String(42).charCodeAt(function(){}()) !== 0x34) {\n $ERROR('#1: new String(42).charCodeAt(function(){}()) === 0x34. Actual: new String(42).charCodeAt(function(){}()) ==='+new String(42).charCodeAt(function(){}()) ); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.5_A1_T9"
+ },
+ {
+ "section": "15.5.4.5",
+ "description": "Call charCodeAt(pos) with negative pos",
+ "test": "function __FACTORY(){};\n\n__FACTORY.prototype.charCodeAt = String.prototype.charCodeAt;\n\nvar __instance = new __FACTORY;\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (!isNaN(__instance.charCodeAt(-1))) {\n $ERROR('#1: function __FACTORY(){}; __FACTORY.prototype.charCodeAt = String.prototype.charCodeAt; __instance = new __FACTORY; isNaN(__instance.charCodeAt(-1)) return true. Actual: '+isNaN(__instance.charCodeAt(-1)));\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.5_A2"
+ },
+ {
+ "section": "15.5.4.5",
+ "description": "pos is bigger of string length",
+ "test": "var __instance = new String(\"ABC\");\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (!isNaN(__instance.charCodeAt(3))) {\n $ERROR('#1: __instance = new String(\"ABC\"); isNaN(__instance.charCodeAt(3)) return true. Actual: '+isNaN(__instance.charCodeAt(3)));\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.5_A3"
+ },
+ {
+ "section": "15.5.4.5",
+ "description": "Change toString function, it trow exception, and call charCodeAt()",
+ "test": "var __obj={\n valueOf:1,\n toString:function(){throw 'intostring'},\n charCodeAt:String.prototype.charCodeAt\n}\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\ntry {\n var x = __obj.charCodeAt();\n $FAIL('#1: \"var x = __obj.charCodeAt()\" lead to throwing exception');\n} catch (e) {\n if (e !== 'intostring') {\n $ERROR('#1.1: Exception === \\'intostring\\'. Actual: exception ==='+e ); \n }\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.5_A4"
+ },
+ {
+ "section": "15.5.4.5, 13.2",
+ "description": "Checking String.prototype.charCodeAt.prototype",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (String.prototype.charCodeAt.prototype !== undefined) {\n $ERROR('#1: String.prototype.charCodeAt.prototype === undefined. Actual: '+String.prototype.charCodeAt.prototype ); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.5_A6"
+ },
+ {
+ "section": "15.5.4.5, 13.2",
+ "description": "Checking if creating the String.prototype.charCodeAt object fails",
+ "test": "var __FACTORY = String.prototype.charCodeAt;\n\ntry {\n var __instance = new __FACTORY;\n $FAIL('#1: __FACTORY = String.prototype.charCodeAt; \"__instance = new __FACTORY\" lead to throwing exception');\n} catch (e) {}\n",
+ "id": "S15.5.4.5_A7"
+ },
+ {
+ "section": "15.5.4.5",
+ "description": "Checking if enumerating the String.prototype.charCodeAt.length property fails",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#0\nif (!(String.prototype.charCodeAt.hasOwnProperty('length'))) {\n $FAIL('#0: String.prototype.charCodeAt.hasOwnProperty(\\'length\\') return true. Actual: '+String.prototype.charCodeAt.hasOwnProperty('length')); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n\n//////////////////////////////////////////////////////////////////////////////\n// CHECK#1\nif (String.prototype.charCodeAt.propertyIsEnumerable('length')) {\n $ERROR('#1: String.prototype.charCodeAt.propertyIsEnumerable(\\'length\\') return false. Actual: '+String.prototype.charCodeAt.propertyIsEnumerable('length'));\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n// CHECK#2\nvar count=0;\n\nfor (p in String.prototype.charCodeAt){\n if (p===\"length\") count++;\n}\n\nif (count !== 0) {\n $ERROR('#2: count=0; for (p in String.prototype.charCodeAt){if (p===\"length\") count++;} count === 0. Actual: count ==='+count ); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.5_A8"
+ },
+ {
+ "section": "15.5.4.5",
+ "description": "Checking if deleting the String.prototype.charCodeAt.length property fails",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#0\nif (!(String.prototype.charCodeAt.hasOwnProperty('length'))) {\n $FAIL('#0: String.prototype.charCodeAt.hasOwnProperty(\\'length\\') return true. Actual: '+String.prototype.charCodeAt.hasOwnProperty('length')); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (delete String.prototype.charCodeAt.length) {\n $ERROR('#1: delete String.prototype.charCodeAt.length return false');\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (!(String.prototype.charCodeAt.hasOwnProperty('length'))) {\n $FAIL('#2: delete String.prototype.charCodeAt.length; String.prototype.charCodeAt.hasOwnProperty(\\'length\\') return true. Actual: '+String.prototype.charCodeAt.hasOwnProperty('length')); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.5_A9"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.5.4.6_String.prototype.concat.json b/website/resources/scripts/testcases2/15.5.4.6_String.prototype.concat.json
new file mode 100644
index 000000000..e64f0f23f
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.5.4.6_String.prototype.concat.json
@@ -0,0 +1,128 @@
+{
+ "testCollection": {
+ "name": "15.5.4.6_String.prototype.concat",
+ "numTests": 20,
+ "tests": [
+ {
+ "section": "15.5.4.6",
+ "description": "Checking if varying the String.prototype.concat.length property fails",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (!(String.prototype.concat.hasOwnProperty('length'))) {\n $ERROR('#1: String.prototype.concat.hasOwnProperty(\\'length\\') return true. Actual: '+String.prototype.concat.hasOwnProperty('length')); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\nvar __obj = String.prototype.concat.length;\n\nString.prototype.concat.length = function(){return \"shifted\";};\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (String.prototype.concat.length !== __obj) {\n $ERROR('#2: __obj = String.prototype.concat.length; String.prototype.concat.length = function(){return \"shifted\";}; String.prototype.concat.length === __obj. Actual: '+String.prototype.concat.length ); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.6_A10"
+ },
+ {
+ "section": "15.5.4.6",
+ "description": "Checking String.prototype.concat.length",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (!(String.prototype.concat.hasOwnProperty(\"length\"))) {\n $ERROR('#1: String.prototype.concat.hasOwnProperty(\"length\") return true. Actual: '+String.prototype.concat.hasOwnProperty(\"length\")); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (String.prototype.concat.length !== 1) {\n $ERROR('#2: String.prototype.concat.length === 1. Actual: '+String.prototype.concat.length ); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.6_A11"
+ },
+ {
+ "section": "15.5.4.6",
+ "description": "Arguments are false and true, and instance is object",
+ "test": "var __instance = new Object(42);\n\n__instance.concat = String.prototype.concat;\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__instance.concat(false,true) !== \"42falsetrue\") {\n $ERROR('#1: __instance = new Object(42); __instance.concat = String.prototype.concat; __instance.concat(false,true) === \"42falsetrue\". Actual: '+__instance.concat(false,true) ); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.6_A1_T1"
+ },
+ {
+ "section": "15.5.4.6",
+ "description": "Call concat([,[...]]) function with object arguments",
+ "test": "var __obj = {toString:function(){return \"\\u0041\";}}\nvar __obj2 = {toString:function(){return true;}}\nvar __obj3 = {toString:function(){return 42;}}\nvar __str = \"lego\";\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nwith(__str){\n if (concat(__obj, __obj2, __obj3, x) !== \"legoAtrue42undefined\") {\n $ERROR('#1: var x; var __obj = {toString:function(){return \"\\u0041\";}}; var __obj2 = {toString:function(){return true;}}; var __obj3 = {toString:function(){return 42;}}; var __str = \"lego\"; concat(__obj, __obj2, __obj3, x) === \"legoAtrue42undefined\". Actual: '+concat(__obj, __obj2, __obj3, x) ); \n }\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\nvar x;\n",
+ "id": "S15.5.4.6_A1_T10"
+ },
+ {
+ "section": "15.5.4.6",
+ "description": "Arguments are equation with false and true, and instance is Boolean object",
+ "test": "var __instance = new Boolean;\n\n__instance.concat = String.prototype.concat;\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__instance.concat(\"\\u0041\",true,true+1) !== \"falseAtrue2\") {\n $ERROR('#1: __instance = new Boolean; __instance.concat = String.prototype.concat; __instance.concat(\"\\\\u0041\",true,true+1) === \"falseAtrue2\". Actual: '+__instance.concat(\"\\u0041\",true,true+1) ); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.6_A1_T2"
+ },
+ {
+ "section": "15.5.4.6",
+ "description": "Use numbers and function object as arguments",
+ "test": "var concat = String.prototype.concat;\n\nvar __obj5 = {toString:function(){return 5;}};\n\nif (typeof toString === \"undefined\"){\n var toString = Object.prototype.toString;\n}\n\nvar __class__ = toString();\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (concat(1,2,3,4,__obj5)!=__class__+\"12345\") {\n $ERROR('#1: concat = String.prototype.concat; concat(1,2,3,4,__obj5)==__class__+\"12345\". Actual: concat(1,2,3,4,__obj5)=='+concat(1,2,3,4,__obj5)); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.6_A1_T3"
+ },
+ {
+ "section": "15.5.4.6",
+ "description": "Call concat([,[...]]) function without argument of string object",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\n//since ToString() evaluates to \"\" concat() evaluates to concat(\"\")\nif (\"lego\".concat() !== \"lego\") {\n $ERROR('#1: \"lego\".concat() === \"lego\". Actual: '+(\"lego\".concat()) ); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.6_A1_T4"
+ },
+ {
+ "section": "15.5.4.6",
+ "description": "Call concat([,[...]]) function with null argument of function object",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\n//since ToString(null) evaluates to \"null\" concat(null) evaluates to concat(\"null\")\nif (function(){return \"lego\"}().concat(null) !== \"legonull\") {\n $ERROR('#1: function(){return \"lego\"}().concat(null) === \"legonull\". Actual: '+function(){return \"lego\"}().concat(null) ); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.6_A1_T5"
+ },
+ {
+ "section": "15.5.4.6",
+ "description": "Call concat([,[...]]) function with x argument of new String object, where x is undefined variable",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\n//since ToString(undefined) evaluates to \"undefined\" concat(undefined) evaluates to concat(\"undefined\")\nif (new String(\"lego\").concat(x) !== \"legoundefined\") {\n $ERROR('#1: var x; new String(\"lego\").concat(x) === \"legoundefined\". Actual: '+new String(\"lego\").concat(x) ); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\nvar x;\n",
+ "id": "S15.5.4.6_A1_T6"
+ },
+ {
+ "section": "15.5.4.6",
+ "description": "Call concat([,[...]]) function with undefined argument of string object",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\n//since ToString(undefined) evaluates to \"undefined\" concat(undefined) evaluates to concat(\"undefined\")\nif (String(\"lego\").concat(undefined) !== \"legoundefined\") {\n $ERROR('#1: String(\"lego\").concat(undefined) === \"legoundefined\". Actual: '+String(\"lego\").concat(undefined) ); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.6_A1_T7"
+ },
+ {
+ "section": "15.5.4.6",
+ "description": "Call concat([,[...]]) function with void 0 argument of string object",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\n//since ToString(void 0) evaluates to \"undefined\" concat(void 0) evaluates to concat(\"undefined\")\nif (String(42).concat(void 0) !== \"42undefined\") {\n $ERROR('#1: String(42).concat(void 0) === \"42undefined\". Actual: '+String(42).concat(void 0) ); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.6_A1_T8"
+ },
+ {
+ "section": "15.5.4.6",
+ "description": "Call concat([,[...]]) function with function(){}() argument of string object",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\n//since ToString(undefined) evaluates to \"undefined\" concat(undefined) evaluates to concat(\"undefined\")\nif (new String(42).concat(function(){}()) !== \"42undefined\") {\n $ERROR('#1: new String(42).concat(function(){}()) === \"42undefined\". Actual: '+new String(42).concat(function(){}()) ); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.6_A1_T9"
+ },
+ {
+ "section": "15.5.4.6",
+ "description": "Call concat([,[...]]) function with 128 arguments",
+ "test": "var __instance = new Number();\n\n__instance.concat = String.prototype.concat;\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__instance.concat(\n0,1,2,3,4,5,6,7,8,9,0xA,0xB,0xC,0xD,0xE,0xF,\n0,1,2,3,4,5,6,7,8,9,0xA,0xB,0xC,0xD,0xE,0xF,\n0,1,2,3,4,5,6,7,8,9,0xA,0xB,0xC,0xD,0xE,0xF,\n0,1,2,3,4,5,6,7,8,9,0xA,0xB,0xC,0xD,0xE,0xF,\n0,1,2,3,4,5,6,7,8,9,0xA,0xB,0xC,0xD,0xE,0xF,\n0,1,2,3,4,5,6,7,8,9,0xA,0xB,0xC,0xD,0xE,0xF,\n0,1,2,3,4,5,6,7,8,9,0xA,0xB,0xC,0xD,0xE,0xF,\n0,1,2,3,4,5,6,7,8,9,0xA,0xB,0xC,0xD,0xE,0xF\n) !== \"001234567891011121314150123456789101112131415012345678910111213141501234567891011121314150123456789101112131415012345678910111213141501234567891011121314150123456789101112131415\") {\n $ERROR('#1: Call concat([,[...]]) function with 128 arguments does not lead to throwing any errors');\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n\n",
+ "id": "S15.5.4.6_A2"
+ },
+ {
+ "section": "15.5.4.6",
+ "description": "Checking if varying the instance that is applied fails",
+ "test": "var __instance = new String(\"one\");\n\n__instance.concat(\"two\");\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__instance != \"one\") {\n $ERROR('#1: __instance = new String(\"one\"); __instance.concat(\"two\"); __instance = new String(\"one\"); __instance.concat(\"two\"); __instance == \"one\". Actual: '+__instance);\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.6_A3"
+ },
+ {
+ "section": "15.5.4.6",
+ "description": "Override toString function",
+ "test": "var __instance = {toString:function(){return \"one\"}};\n\n__instance.concat = String.prototype.concat;\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__instance.concat(\"two\",x) !== \"onetwoundefined\") {\n $ERROR('#1: var x; __instance = {toString:function(){return \"one\"}}; __instance.concat = String.prototype.concat; __instance.concat(\"two\",x) === \"onetwoundefined\". Actual: '+__instance.concat(\"two\",x) ); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\nvar x;\n\n\n",
+ "id": "S15.5.4.6_A4_T1"
+ },
+ {
+ "section": "15.5.4.6",
+ "description": "Override toString function onto function, that throw exception",
+ "test": "var __instance = {toString:function(){throw \"intostring\";}};\nvar __obj = {toString:function(){throw \"infirstarg\";}};\n\n__instance.concat = String.prototype.concat;\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\ntry {\n String.prototype.concat.call(__instance,__obj, notexist);\n $FAIL('#1: \"String.prototype.concat.call(__instance,__obj, notexist)\" lead to throwing exception');\n} catch (e) {\n if (e !== \"intostring\") {\n $ERROR('#1: e === \"intostring\". Actual: '+e ); \n }\n} \n//\n//////////////////////////////////////////////////////////////////////////////\n\nvar notexist;\n\n\n\n",
+ "id": "S15.5.4.6_A4_T2"
+ },
+ {
+ "section": "15.5.4.6, 13.2",
+ "description": "Checking String.prototype.concat.prototype",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (String.prototype.concat.prototype !== undefined) {\n $ERROR('#1: String.prototype.concat.prototype === undefined. Actual: '+String.prototype.concat.prototype ); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.6_A6"
+ },
+ {
+ "section": "15.5.4.6, 13.2",
+ "description": "Checking if creating the String.prototype.concat object fails",
+ "test": "var __FACTORY = String.prototype.concat;\n\ntry {\n var __instance = new __FACTORY;\n $FAIL('#1: __FACTORY = String.prototype.concat; \"__instance = new __FACTORY\" lead throwing exception');\n} catch (e) {}\n",
+ "id": "S15.5.4.6_A7"
+ },
+ {
+ "section": "15.5.4.6",
+ "description": "Checking if enumerating the String.prototype.concat.length property fails",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#0\nif (!(String.prototype.concat.hasOwnProperty('length'))) {\n $FAIL('#0: String.prototype.concat.hasOwnProperty(\\'length\\') return true. Actual: '+String.prototype.concat.hasOwnProperty('length')); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n\n//////////////////////////////////////////////////////////////////////////////\n// CHECK#1\nif (String.prototype.concat.propertyIsEnumerable('length')) {\n $ERROR('#1: String.prototype.concat.propertyIsEnumerable(\\'length\\') return false. Actual: '+String.prototype.concat.propertyIsEnumerable('length'));\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n// CHECK#2\ncount = 0;\n\nfor (p in String.prototype.concat){\n if (p===\"length\") count++;\n}\n\nif (count !== 0) {\n $ERROR('#2: count = 0; for (p in String.prototype.concat){ if (p===\"length\") count++;}; count === 0. Actual: '+count); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.6_A8"
+ },
+ {
+ "section": "15.5.4.6",
+ "description": "Checking if deleting the String.prototype.concat.length property fails",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#0\nif (!(String.prototype.concat.hasOwnProperty('length'))) {\n $FAIL('#0: String.prototype.concat.hasOwnProperty(\\'length\\') return true. Actual: '+String.prototype.concat.hasOwnProperty('length')); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (delete String.prototype.concat.length) {\n $ERROR('#1: delete String.prototype.concat.length return false');\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (!(String.prototype.concat.hasOwnProperty('length'))) {\n $FAIL('#2: delete String.prototype.concat.length; String.prototype.concat.hasOwnProperty(\\'length\\') return true. Actual: '+String.prototype.concat.hasOwnProperty('length')); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.6_A9"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.5.4.7_String.prototype.indexOf.json b/website/resources/scripts/testcases2/15.5.4.7_String.prototype.indexOf.json
new file mode 100644
index 000000000..98bb77a8d
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.5.4.7_String.prototype.indexOf.json
@@ -0,0 +1,224 @@
+{
+ "testCollection": {
+ "name": "15.5.4.7_String.prototype.indexOf",
+ "numTests": 36,
+ "tests": [
+ {
+ "section": "15.5.4.7",
+ "description": "Checking if varying the String.prototype.indexOf.length property fails",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (!(String.prototype.indexOf.hasOwnProperty('length'))) {\n $FAIL('#1: String.prototype.indexOf.hasOwnProperty(\\'length\\') return true. Actual: '+String.prototype.indexOf.hasOwnProperty('length')); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\nvar __obj = String.prototype.indexOf.length;\n\nString.prototype.indexOf.length = function(){return \"shifted\";};\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (String.prototype.indexOf.length !== __obj) {\n $ERROR('#2: __obj = String.prototype.indexOf.length; String.prototype.indexOf.length = function(){return \"shifted\";}; String.prototype.indexOf.length === __obj. Actual: '+String.prototype.indexOf.length ); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.7_A10"
+ },
+ {
+ "section": "15.5.4.7",
+ "description": "Checking String.prototype.indexOf.length",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (!(String.prototype.indexOf.hasOwnProperty(\"length\"))) {\n $ERROR('#1: String.prototype.indexOf.hasOwnProperty(\"length\") return true. Actual: '+String.prototype.indexOf.hasOwnProperty(\"length\")); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (String.prototype.indexOf.length !== 1) {\n $ERROR('#2: String.prototype.indexOf.length === 1. Actual: '+String.prototype.indexOf.length ); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.7_A11"
+ },
+ {
+ "section": "15.5.4.7",
+ "description": "Arguments are false and true, and instance is object",
+ "test": "var __instance = new Object(true);\n\n__instance.indexOf = String.prototype.indexOf;\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__instance.indexOf(true, false) !== 0) {\n $ERROR('#1: __instance = new Object(true); __instance.indexOf = String.prototype.indexOf; __instance.indexOf(true, false) === 0. Actual: '+__instance.indexOf(true, false) ); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.7_A1_T1"
+ },
+ {
+ "section": "15.5.4.7",
+ "description": "Call indexOf(searchString, position) function with object arguments",
+ "test": "var __obj = {toString:function(){return \"\\u0041B\";}}\nvar __obj2 = {valueOf:function(){return true;}}\nvar __str = \"ABB\\u0041BABAB\";\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nwith(__str){\n if (indexOf(__obj, __obj2) !== 3) {\n $ERROR('#1: var x; var __obj = {toString:function(){return \"\\u0041B\";}}; var __obj2 = {valueOf:function(){return true;}}; var __str = \"ABB\\u0041BABAB\"; indexOf(__obj, __obj2) === 3. Actual: '+indexOf(__obj, __obj2) ); \n }\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\nvar x;\n",
+ "id": "S15.5.4.7_A1_T10"
+ },
+ {
+ "section": "15.5.4.7",
+ "description": "Instance is Date(0) object",
+ "test": "var __instance = new Date(0);\n\n__instance.indexOf = String.prototype.indexOf;\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif ((__instance.getTimezoneOffset()>0 ? __instance.indexOf('31') : __instance.indexOf('01')) !== 8) {\n $ERROR('#1: __instance = new Date(0); __instance.indexOf = String.prototype.indexOf; (__instance.getTimezoneOffset()>0 ? __instance.indexOf(\\'31\\') : __instance.indexOf(\\'01\\')) === 8. Actual: '+(__instance.getTimezoneOffset()>0 ? __instance.indexOf('31') : __instance.indexOf('01')) ); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.7_A1_T11"
+ },
+ {
+ "section": "15.5.4.7",
+ "description": "Argument is string, and instance is array of strings",
+ "test": "var __instance = new Array('new','zoo','revue');\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__instance.indexOf('new') !== 0) {\n $ERROR('#1: __instance = new Array(\\'new\\',\\'zoo\\',\\'revue\\'); __instance.indexOf(\\'new\\') === 0. Actual: '+__instance.indexOf('new') ); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (__instance.indexOf('zoo') !== 1) {\n $ERROR('#2: __instance = new Array(\\'new\\',\\'zoo\\',\\'revue\\'); __instance.indexOf(\\'zoo\\') === 1. Actual: '+__instance.indexOf('zoo') ); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.7_A1_T12"
+ },
+ {
+ "section": "15.5.4.7",
+ "description": "Arguments are boolean equation, function and null, and instance is Boolean object",
+ "test": "var __instance = new Boolean;\n\n__instance.indexOf = String.prototype.indexOf;\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__instance.indexOf(\"A\"!==\"\\u0041\", function(){return 0;}(),null) !== 0) {\n $ERROR('#1: __instance = new Boolean; __instance.indexOf = String.prototype.indexOf; __instance.indexOf(\"A\"!==\"\\\\u0041\", function(){return 0;}(),null) === 0. Actual: '+__instance.indexOf(\"A\"!==\"\\u0041\", function(){return 0;}(),null) ); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.7_A1_T2"
+ },
+ {
+ "section": "15.5.4.7",
+ "description": "Checking by using eval",
+ "test": "var indexOf = String.prototype.indexOf;\n\nvar __obj__pos = {valueOf:function(){return 5;}};\n\nif (typeof toString === \"undefined\"){\n toString = Object.prototype.toString;\n}\n\nvar __class__ = toString();\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (indexOf(eval(\"\\\"[\\\"\"),__obj__pos)!=-1) {\n $ERROR('#1: indexOf = String.prototype.indexOf; indexOf(eval(\"\\\\\"[\\\\\"\"),__obj__pos)==-1. Actual: indexOf(eval(\"\\\\\"[\\\\\"\"),__obj__pos)=='+indexOf(eval(\"\\\"[\\\"\"),__obj__pos)); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.7_A1_T3"
+ },
+ {
+ "section": "15.5.4.7",
+ "description": "Call indexOf(searchString, position) function without arguments of string",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\n//since ToString() evaluates to \"\" indexOf() evaluates to indexOf(\"\",0)\nif (\"\".indexOf() !== -1) {\n $ERROR('#1: \"\".indexOf() === -1. Actual: '+(\"\".indexOf()) ); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.7_A1_T4"
+ },
+ {
+ "section": "15.5.4.7",
+ "description": "Call indexOf(searchString, position) function with null argument of function object",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\n//since ToString(null) evaluates to \"null\" indexOf(null) evaluates to indexOf(\"\",0)\nif (function(){return \"gnulluna\"}().indexOf(null) !== 1) {\n $ERROR('#1: function(){return \"gnulluna\"}().indexOf(null) === 1. Actual: '+function(){return \"gnulluna\"}().indexOf(null) ); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.7_A1_T5"
+ },
+ {
+ "section": "15.5.4.7",
+ "description": "Call indexOf(searchString, position) function with x argument of new String object, where x is undefined variable",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\n//since ToString(undefined) evaluates to \"\" indexOf(undefined) evaluates to indexOf(\"\",0)\nif (new String(\"undefined\").indexOf(x) !== 0) {\n $ERROR('#1: var x; new String(\"undefined\").indexOf(x) === 0. Actual: '+new String(\"undefined\").indexOf(x) ); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\nvar x;\n",
+ "id": "S15.5.4.7_A1_T6"
+ },
+ {
+ "section": "15.5.4.7",
+ "description": "Call indexOf(searchString, position) function with undefined argument of string object",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\n//since ToString(undefined) evaluates to \"undefined\" indexOf(undefined) evaluates to indexOf(\"undefined\",0)\nif (String(\"undefined\").indexOf(undefined) !== 0) {\n $ERROR('#1: String(\"undefined\").indexOf(undefined) === 0. Actual: '+String(\"undefined\").indexOf(undefined) ); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.7_A1_T7"
+ },
+ {
+ "section": "15.5.4.7",
+ "description": "Call indexOf(searchString, position) function with void 0 argument of string object",
+ "test": "var __obj = {toString:function(){}};\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\n//since ToString(void 0) evaluates to \"undefined\" indexOf(void 0) evaluates to indexOf(\"undefined\")\nif (String(__obj).indexOf(void 0) !== 0) {\n $ERROR('#1: __obj = {toString:function(){}}; String(__obj).indexOf(void 0) === 0. Actual: '+String(__obj).indexOf(void 0) ); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.7_A1_T8"
+ },
+ {
+ "section": "15.5.4.7",
+ "description": "Call indexOf(searchString, position) function with function(){}() argument of string object",
+ "test": "var __obj = {\n valueOf:function(){},\n toString:void 0\n};\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\n//since ToString(undefined) evaluates to \"undefined\" indexOf(undefined) evaluates to indexOf(\"undefined\")\nif (new String(__obj).indexOf(function(){}()) !== 0) {\n $ERROR('#1: __obj = {valueOf:function(){}, toString:void 0}; new String(__obj).indexOf(function(){}()) === 0. Actual: '+new String(__obj).indexOf(function(){}()) ); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.7_A1_T9"
+ },
+ {
+ "section": "15.5.4.7",
+ "description": "Call \"abcd\".indexOf(\"abcdab\") and check result",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (\"abcd\".indexOf(\"abcdab\")!==-1) {\n $ERROR('#1: \"abcd\".indexOf(\"abcdab\")===-1. Actual: '+(\"abcd\".indexOf(\"abcdab\"))); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.7_A2_T1"
+ },
+ {
+ "section": "15.5.4.7",
+ "description": "Call \"abcd\".indexOf(\"abcdab\",0) and check result",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (\"abcd\".indexOf(\"abcdab\",0)!==-1) {\n $ERROR('#1: \"abcd\".indexOf(\"abcdab\",0)===-1. Actual: '+(\"abcd\".indexOf(\"abcdab\",0))); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.7_A2_T2"
+ },
+ {
+ "section": "15.5.4.7",
+ "description": "Call \"abcd\".indexOf(\"abcdab\",99) and check result",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (\"abcd\".indexOf(\"abcdab\",99)!==-1) {\n $ERROR('#1: \"abcd\".indexOf(\"abcdab\",99)===-1. Actual: '+(\"abcd\".indexOf(\"abcdab\",99))); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.7_A2_T3"
+ },
+ {
+ "section": "15.5.4.7",
+ "description": "Call \"abcd\".indexOf(\"abcdab\",NaN) and check result",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (\"abcd\".indexOf(\"abcdab\",NaN)!==-1) {\n $ERROR('#1: \"abcd\".indexOf(\"abcdab\",NaN)===-1. Actual: '+(\"abcd\".indexOf(\"abcdab\",NaN))); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.7_A2_T4"
+ },
+ {
+ "section": "15.5.4.7",
+ "description": "Call \"$$abcdabcd\".indexOf(\"ab\",NaN) and check result",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (\"$$abcdabcd\".indexOf(\"ab\",NaN)!==2) {\n $ERROR('#1: \"$$abcdabcd\".indexOf(\"ab\",NaN)===2. Actual: '+(\"$$abcdabcd\".indexOf(\"ab\",NaN))); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.7_A3_T1"
+ },
+ {
+ "section": "15.5.4.7",
+ "description": "Call \"$$abcdabcd\".indexOf(\"ab\",eval(\"\\\"-99\\\"\")) and check result",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (\"$$abcdabcd\".indexOf(\"ab\",eval(\"\\\"-99\\\"\"))!==2) {\n $ERROR('#1: \"$$abcdabcd\".indexOf(\"ab\",eval(\"\\\\\"-99\\\\\"\"))===2. Actual: '+(\"$$abcdabcd\".indexOf(\"ab\",eval(\"\\\"-99\\\"\")))); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.7_A3_T2"
+ },
+ {
+ "section": "15.5.4.7",
+ "description": ": Call \"$$abcdabcd\".indexOf(\"ab\",function(){return -Infinity;}()) and check result;",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (\"$$abcdabcd\".indexOf(\"ab\", function(){return -Infinity;}())!==2) {\n $ERROR('#1: \"$$abcdabcd\".indexOf(\"ab\", function(){return -Infinity;}())===2. Actual: '+(\"$$abcdabcd\".indexOf(\"ab\", function(){return -Infinity;}()))); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.7_A3_T3"
+ },
+ {
+ "section": "15.5.4.7",
+ "description": "Override toString and valueOf functions, valueOf throw exception",
+ "test": "var __obj = {toString:function(){return \"\\u0041B\";}}\nvar __obj2 = {valueOf:function(){throw \"intointeger\";}}\nvar __str = {str__:\"ABB\\u0041BABAB\"};\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nwith(__str){\n with(str__){\n try {\n var x = indexOf(__obj, __obj2);\n $FAIL('#1: \"var x = indexOf(__obj, __obj2)\" lead to throwing exception');\n } catch (e) {\n if (e!==\"intointeger\") {\n $ERROR('#1.1: Exception === \"intointeger\". Actual: '+e); \n }\n }\n }\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.7_A4_T1"
+ },
+ {
+ "section": "15.5.4.7",
+ "description": "Override toString and valueOf functions, second toString throw exception",
+ "test": "var __obj = {toString:function(){return \"\\u0041B\";}}\nvar __obj2 = {valueOf:function(){return {};},toString:function(){throw \"intointeger\";}}\nvar __str = new String(\"ABB\\u0041BABAB\");\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nwith(__str){\n try {\n var x = indexOf(__obj, __obj2);\n $FAIL('#1: \"var x = indexOf(__obj, __obj2)\" lead to throwing exception');\n } catch (e) {\n if (e!==\"intointeger\") {\n $ERROR('#1.1: Exception === \"intointeger\". Actual: '+e); \n }\n }\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.7_A4_T2"
+ },
+ {
+ "section": "15.5.4.7",
+ "description": "Override toString and valueOf functions",
+ "test": "var __obj = {toString:function(){return \"\\u0041B\";}}\nvar __obj2 = {valueOf:function(){return {};},toString:function(){return \"1\";}}\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (\"ABB\\u0041BABAB\".indexOf(__obj, __obj2)!==3) {\n $ERROR('#1: var __obj = {toString:function(){return \"\\u0041B\";}}; var __obj2 = {valueOf:function(){return {};},toString:function(){return \"1\";}}; \"ABB\\\\u0041BABAB\".indexOf(__obj, __obj2)===3. Actual: '+(\"ABB\\u0041BABAB\".indexOf(__obj, __obj2))); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.7_A4_T3"
+ },
+ {
+ "section": "15.5.4.7",
+ "description": "Override toString and valueOf functions, and they throw exceptions",
+ "test": "var __obj = {toString:function(){throw \"intostr\";}};\nvar __obj2 = {valueOf:function(){throw \"intoint\";}};\nvar __instance = new Number(10001.10001);\nNumber.prototype.indexOf=String.prototype.indexOf;\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nwith(__instance){\n try {\n var x = indexOf(__obj, __obj2);\n $FAIL('#1: \"var x = indexOf(__obj, __obj2)\" lead to throwing exception');\n } catch (e) {\n if (e!==\"intostr\") {\n $ERROR('#1.1: Exception === \"intostr\". Actual: '+e); \n }\n }\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.7_A4_T4"
+ },
+ {
+ "section": "15.5.4.7",
+ "description": "Override toString and valueOf functions, first and second valueOf throw exception",
+ "test": "var __obj = {toString:function(){return {};},valueOf:function(){throw \"intostr\";}};\n\nvar __obj2 = {valueOf:function(){throw \"intointeger\";}};\n\n__FACTORY.prototype.indexOf = String.prototype.indexOf;\n\nvar __instance = new __FACTORY(void 0);\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\ntry {\n var x = __instance.indexOf(__obj, __obj2);\n $FAIL('#1: \"var x = __instance.indexOf(__obj, __obj2)\" lead to throwing exception');\n} catch (e) {\n if (e!==\"intostr\") {\n $ERROR('#1.1: Exception === \"intostr\". Actual: '+e); \n }\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\nfunction __FACTORY( value ) {\n this.value = value;\n this.toString = function() { return new Number; };\n this.valueOf=function(){return this.value+\"\"};\n}\n",
+ "id": "S15.5.4.7_A4_T5"
+ },
+ {
+ "section": "15.5.4.7",
+ "description": "Search one symbol from begin of string",
+ "test": "var TEST_STRING = new String( \" !\\\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\" );\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nfor (var k = 0, i = 0x0020; i < 0x007e; i++, k++ ) {\n if (TEST_STRING.indexOf( String.fromCharCode(i), 0 )!==k) {\n $ERROR('#'+(i-0x0020)+': TEST_STRING.indexOf( String.fromCharCode('+i+'), 0 )==='+k+'. Actual: '+TEST_STRING.indexOf( String.fromCharCode(i), 0 )); \n }\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.7_A5_T1"
+ },
+ {
+ "section": "15.5.4.7",
+ "description": "Search one symbol from it`s position in the string",
+ "test": "var TEST_STRING = new String( \" !\\\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\" );\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nfor (var k = 0, i = 0x0020; i < 0x007e; i++, k++ ) {\n if (TEST_STRING.indexOf( String.fromCharCode(i), k )!==k) {\n $ERROR('#'+(i-0x0020)+': TEST_STRING.indexOf( String.fromCharCode('+i+'), '+k+' )==='+k+'. Actual: '+TEST_STRING.indexOf( String.fromCharCode(i), k )); \n }\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.7_A5_T2"
+ },
+ {
+ "section": "15.5.4.7",
+ "description": "Search one symbol from it`s position+1 in the string",
+ "test": "var TEST_STRING = new String( \" !\\\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\" );\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nfor ( var k = 0, i = 0x0020; i < 0x007e; i++, k++ ) {\n if (TEST_STRING.indexOf( String.fromCharCode(i), k+1 ) !== -1) {\n $ERROR('#'+(i-0x0020)+': TEST_STRING.indexOf( String.fromCharCode('+i+'), '+(k+1)+' )===-1. Actual: '+TEST_STRING.indexOf( String.fromCharCode(i), k+1 )); \n }\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.7_A5_T3"
+ },
+ {
+ "section": "15.5.4.7",
+ "description": "Search substring from begin of string",
+ "test": "var TEST_STRING = new String( \" !\\\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\" );\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nfor (var k = 0, i = 0x0020; i < 0x007d; i++, k++ ) {\n if (TEST_STRING.indexOf( (String.fromCharCode(i)+ String.fromCharCode(i+1) + String.fromCharCode(i+2)), 0 )!==k) {\n $ERROR('#'+(i-0x0020)+': TEST_STRING.indexOf( (String.fromCharCode('+i+')+ String.fromCharCode('+(i+1)+') + String.fromCharCode('+(i+2)+')), 0 )==='+k+'. Actual: '+TEST_STRING.indexOf( (String.fromCharCode(i)+ String.fromCharCode(i+1) + String.fromCharCode(i+2)), 0 )); \n }\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.7_A5_T4"
+ },
+ {
+ "section": "15.5.4.7",
+ "description": "Search substring from it`s position in the string",
+ "test": "var TEST_STRING = new String( \" !\\\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\" );\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nfor ( var k = 0, i = 0x0020; i < 0x007d; i++, k++ ) {\n if (TEST_STRING.indexOf( (String.fromCharCode(i)+ String.fromCharCode(i+1)+ String.fromCharCode(i+2)),k ) !==k) {\n $ERROR('#'+(i-0x0020)+': TEST_STRING.indexOf( (String.fromCharCode('+i+')+ String.fromCharCode('+(i+1)+') + String.fromCharCode('+(i+2)+')), '+k+' )==='+k+'. Actual: '+TEST_STRING.indexOf( (String.fromCharCode(i)+ String.fromCharCode(i+1) + String.fromCharCode(i+2)), k )); \n }\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.7_A5_T5"
+ },
+ {
+ "section": "15.5.4.7",
+ "description": "Search substring from it`s position+1 in the string",
+ "test": "var TEST_STRING = new String( \" !\\\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\" );\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nfor (var k = 0, i = 0x0020; i < 0x007d; i++, k++ ) {\n if (TEST_STRING.indexOf( (String.fromCharCode(i)+ String.fromCharCode(i+1)+ String.fromCharCode(i+2)), k+1 )!== -1) {\n $ERROR('#'+(i-0x0020)+': TEST_STRING.indexOf( (String.fromCharCode('+i+')+ String.fromCharCode('+(i+1)+') + String.fromCharCode('+(i+2)+')), '+(k+1)+' )=== -1. Actual: '+TEST_STRING.indexOf( (String.fromCharCode(i)+ String.fromCharCode(i+1) + String.fromCharCode(i+2)), k+1 )); \n }\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.7_A5_T6"
+ },
+ {
+ "section": "15.5.4.7, 13.2",
+ "description": "Checking String.prototype.indexOf.prototype",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (String.prototype.indexOf.prototype !== undefined) {\n $ERROR('#1: String.prototype.indexOf.prototype === undefined. Actual: '+String.prototype.indexOf.prototype ); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.7_A6"
+ },
+ {
+ "section": "15.5.4.7, 13.2",
+ "description": "Checking if creating the String.prototype.indexOf object fails",
+ "test": "var __FACTORY = String.prototype.indexOf;\n\ntry {\n var __instance = new __FACTORY;\n $FAIL('#1: var __FACTORY = String.prototype.indexOf; \"__instance = new __FACTORY\" lead to throwing exception');\n} catch (e) {\n if ((e instanceof TypeError) !== true) {\n $ERROR('#1.2: var __FACTORY = String.prototype.indexOf; \"__instance = new __FACTORY\" throw a TypeError. Actual: ' + (e)); \n }\n $PRINT(e);\n}\n",
+ "id": "S15.5.4.7_A7"
+ },
+ {
+ "section": "15.5.4.7",
+ "description": "Checking if enumerating the String.prototype.indexOf.length property fails",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#0\nif (!(String.prototype.indexOf.hasOwnProperty('length'))) {\n $ERROR('#0: String.prototype.indexOf.hasOwnProperty(\\'length\\') return true. Actual: '+String.prototype.indexOf.hasOwnProperty('length')); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n\n//////////////////////////////////////////////////////////////////////////////\n// CHECK#1\nif (String.prototype.indexOf.propertyIsEnumerable('length')) {\n $ERROR('#1: String.prototype.indexOf.propertyIsEnumerable(\\'length\\') return false');\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n// CHECK#2\nvar count=0;\n\nfor (p in String.prototype.indexOf){\n if (p===\"length\") count++;\n}\n\nif (count !== 0) {\n $ERROR('#2: count=0; for (p in String.prototype.indexOf){if (p===\"length\") count++;}; count === 0. Actual: '+count ); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.7_A8"
+ },
+ {
+ "section": "15.5.4.7",
+ "description": "Checking if deleting the String.prototype.indexOf.length property fails",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#0\nif (!(String.prototype.indexOf.hasOwnProperty('length'))) {\n $FAIL('#0: String.prototype.indexOf.hasOwnProperty(\\'length\\') return true. Actual: '+String.prototype.indexOf.hasOwnProperty('length')); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (delete String.prototype.indexOf.length) {\n $ERROR('#1: delete String.prototype.indexOf.length raturn false');\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (!(String.prototype.indexOf.hasOwnProperty('length'))) {\n $FAIL('#2: delete String.prototype.indexOf.length; String.prototype.indexOf.hasOwnProperty(\\'length\\') return true. Actual: '+String.prototype.indexOf.hasOwnProperty('length')); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.7_A9"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.5.4.8_String.prototype.lastIndexOf.json b/website/resources/scripts/testcases2/15.5.4.8_String.prototype.lastIndexOf.json
new file mode 100644
index 000000000..57295789c
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.5.4.8_String.prototype.lastIndexOf.json
@@ -0,0 +1,146 @@
+{
+ "testCollection": {
+ "name": "15.5.4.8_String.prototype.lastIndexOf",
+ "numTests": 23,
+ "tests": [
+ {
+ "section": "15.5.4.8",
+ "description": "Checking if varying the String.prototype.lastIndexOf.length property fails",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (!(String.prototype.lastIndexOf.hasOwnProperty('length'))) {\n $FAIL('#1: String.prototype.lastIndexOf.hasOwnProperty(\\'length\\') return true. Actual: '+String.prototype.lastIndexOf.hasOwnProperty('length'));\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\nvar __obj = String.prototype.lastIndexOf.length;\n\nString.prototype.lastIndexOf.length = function(){return \"shifted\";};\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (String.prototype.lastIndexOf.length !== __obj) {\n $ERROR('#2: __obj = String.prototype.lastIndexOf.length; String.prototype.lastIndexOf.length = function(){return \"shifted\";}; String.prototype.lastIndexOf.length === __obj. Actual: '+String.prototype.lastIndexOf.length );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.8_A10"
+ },
+ {
+ "section": "15.5.4.8",
+ "description": "Checking String.prototype.lastIndexOf.length",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (!(String.prototype.lastIndexOf.hasOwnProperty(\"length\"))) {\n $ERROR('#1: String.prototype.lastIndexOf.hasOwnProperty(\"length\") return true. Actual: '+String.prototype.lastIndexOf.hasOwnProperty(\"length\"));\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (String.prototype.lastIndexOf.length !== 1) {\n $ERROR('#2: String.prototype.lastIndexOf.length === 1. Actual: '+String.prototype.lastIndexOf.length );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.8_A11"
+ },
+ {
+ "section": "15.5.4.8",
+ "description": "Arguments are false and true, and instance is object",
+ "test": "var __instance = new Object(true);\n\n__instance.lastIndexOf = String.prototype.lastIndexOf;\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__instance.lastIndexOf(true, false) !== 0) {\n $ERROR('#1: __instance = new Object(true); __instance.lastIndexOf = String.prototype.lastIndexOf; __instance.lastIndexOf(true, false) === 0. Actual: '+__instance.lastIndexOf(true, false) );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.8_A1_T1"
+ },
+ {
+ "section": "15.5.4.8",
+ "description": "Call lastIndexOf(searchString, position) function with object arguments",
+ "test": "var __obj = {toString:function(){return \"\\u0041B\";}}\nvar __obj2 = {valueOf:function(){return NaN;}}\nvar __str = \"ABB\\u0041BABAB\";\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nwith(__str){\n if (lastIndexOf(__obj, __obj2) !== 7) {\n $ERROR('#1: var x; var __obj = {toString:function(){return \"\\u0041B\";}}; var __obj2 = {valueOf:function(){return NaN;}}; var __str = \"ABB\\u0041BABAB\";lastIndexOf(__obj, __obj2) === 7. Actual: '+lastIndexOf(__obj, __obj2) );\n }\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\nvar x;\n",
+ "id": "S15.5.4.8_A1_T10"
+ },
+ {
+ "section": "15.5.4.8",
+ "description": "Instance is Date(0) object",
+ "test": "var __instance = new Date(100000000);\n\n__instance.lastIndexOf = String.prototype.lastIndexOf;\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif ((__instance.lastIndexOf('1970')) !== 11) {\n $ERROR('#1: __instance = new Date(0); __instance.lastIndexOf = String.prototype.lastIndexOf; __instance.lastIndexOf(\\'1970\\') === 11. Actual: '+(__instance.lastIndexOf('1970')) );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.8_A1_T11"
+ },
+ {
+ "section": "15.5.4.8",
+ "description": "Argument is string, and instance is array of strings",
+ "test": "var __instance = new Array('new','zoo','revue');\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__instance.lastIndexOf('new') !== 0) {\n $ERROR('#1: __instance = new Array(\\'new\\',\\'zoo\\',\\'revue\\'); __instance.lastIndexOf(\\'new\\') === 0. Actual: '+__instance.lastIndexOf('new') );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (__instance.lastIndexOf('zoo') !== 1) {\n $ERROR('#2: __instance = new Array(\\'new\\',\\'zoo\\',\\'revue\\'); __instance.lastIndexOf(\\'zoo\\') === 1. Actual: '+__instance.lastIndexOf('zoo') );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.8_A1_T12"
+ },
+ {
+ "section": "15.5.4.8",
+ "description": "Arguments are boolean equation, function and null, and instance is Boolean object",
+ "test": "var __instance = new Boolean;\n\n__instance.lastIndexOf = String.prototype.lastIndexOf;\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__instance.lastIndexOf(\"A\"!==\"\\u0041\", function(){return 0;}(),null) !== 0) {\n $ERROR('#1: __instance = new Boolean; __instance.lastIndexOf = String.prototype.lastIndexOf; __instance.lastIndexOf(\"A\"!==\"\\\\u0041\", function(){return 0;}(),null) === 0. Actual: '+__instance.lastIndexOf(\"A\"!==\"\\u0041\", function(){return 0;}(),null) );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.8_A1_T2"
+ },
+ {
+ "section": "15.5.4.8",
+ "description": "Checking by using eval",
+ "test": "var lastIndexOf = String.prototype.lastIndexOf;\n\nvar __obj__pos = {valueOf:function(){return 7;}};\n\nif (typeof toString === \"undefined\"){\n var toString = Object.prototype.toString;\n}\n\nvar __class__ = toString();\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (lastIndexOf(eval(\"\\\"[\\\"\"),__obj__pos)!= 0) {\n $ERROR('#1: lastIndexOf(eval(\"\\\\\"[\\\\\"\"),__obj__pos)== 0. Actual: '+lastIndexOf(eval(\"\\\"[\\\"\"),__obj__pos));\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.8_A1_T3"
+ },
+ {
+ "section": "15.5.4.8",
+ "description": "Call lastIndexOf(searchString, position) function without arguments of string",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\n//since ToString() evaluates to \"\" lastIndexOf() evaluates to lastIndexOf(\"\",0)\nif (\"\".lastIndexOf() !== -1) {\n $ERROR('#1: \"\".lastIndexOf() === -1. Actual: '+(\"\".lastIndexOf()) );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.8_A1_T4"
+ },
+ {
+ "section": "15.5.4.8",
+ "description": "Call lastIndexOf(searchString, position) function with null argument of function object",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\n//since ToString(null) evaluates to \"null\" lastIndexOf(null) evaluates to lastIndexOf(\"\",0)\nif (function(){return \"gnullunazzgnull\"}().lastIndexOf(null) !== 11) {\n $ERROR('#1: function(){return \"gnullunazzgnull\"}().lastIndexOf(null) === 11. Actual: '+function(){return \"gnullunazzgnull\"}().lastIndexOf(null) );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.8_A1_T5"
+ },
+ {
+ "section": "15.5.4.8",
+ "description": "Call lastIndexOf(searchString, position) function with x argument of new String object, where x is undefined variable",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\n//since ToString(undefined) evaluates to \"\" lastIndexOf(undefined) evaluates to lastIndexOf(\"\",0)\nif (new String(\"undefined\").lastIndexOf(x) !== 0) {\n $ERROR('#1: var x; new String(\"undefined\").lastIndexOf(x) === 0. Actual: '+new String(\"undefined\").lastIndexOf(x) );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\nvar x;\n",
+ "id": "S15.5.4.8_A1_T6"
+ },
+ {
+ "section": "15.5.4.8",
+ "description": "Call lastIndexOf(searchString, position) function with undefined argument of string object",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\n//since ToString(undefined) evaluates to \"undefined\" lastIndexOf(undefined) evaluates to lastIndexOf(\"undefined\",0)\nif (String(\"undefined\").lastIndexOf(undefined) !== 0) {\n $ERROR('#1: String(\"undefined\").lastIndexOf(undefined) === 0. Actual: '+String(\"undefined\").lastIndexOf(undefined) );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.8_A1_T7"
+ },
+ {
+ "section": "15.5.4.8",
+ "description": "Call lastIndexOf(searchString, position) function with void 0 argument of string object",
+ "test": "var __obj = {toString:function(){}};\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\n//since ToString(void 0) evaluates to \"undefined\" lastIndexOf(void 0) evaluates to lastIndexOf(\"undefined\",0)\nif (String(__obj).lastIndexOf(void 0) !== 0) {\n $ERROR('#1: __obj = {toString:function(){}}; String(__obj).lastIndexOf(void 0) === 0. Actual: '+String(__obj).lastIndexOf(void 0) );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.8_A1_T8"
+ },
+ {
+ "section": "15.5.4.8",
+ "description": "Call lastIndexOf(searchString, position) function with function(){}() argument of string object",
+ "test": "var __obj = {\n valueOf:function(){},\n toString:void 0\n};\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\n//since ToString(undefined) evaluates to \"undefined\" indexOf(undefined) evaluates to indexOf(\"undefined\")\nif (new String(__obj).lastIndexOf(function(){}()) !== 0) {\n $ERROR('#1: __obj = {valueOf:function(){}, toString:void 0}; new String(__obj).lastIndexOf(function(){}()) === 0. Actual: '+new String(__obj).lastIndexOf(function(){}()) );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.8_A1_T9"
+ },
+ {
+ "section": "15.5.4.8",
+ "description": "Override toString and valueOf functions, valueOf throw exception",
+ "test": "var __obj = {toString:function(){return \"\\u0041B\";}}\nvar __obj2 = {valueOf:function(){throw \"intointeger\";}}\nvar __str = {str__:\"ABB\\u0041BABAB\"};\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nwith(__str){\n with(str__){\n try {\n var x = lastIndexOf(__obj, __obj2);\n $FAIL('#1: var x = lastIndexOf(__obj, __obj2) lead to throwing exception');\n } catch (e) {\n if (e!==\"intointeger\") {\n $ERROR('#1.1: Exception === \"intointeger\". Actual: '+e);\n }\n }\n }\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.8_A4_T1"
+ },
+ {
+ "section": "15.5.4.8",
+ "description": "Override toString and valueOf functions, second toString throw exception",
+ "test": "var __obj = {toString:function(){return \"\\u0041B\";}}\nvar __obj2 = {valueOf:function(){return {};},toString:function(){throw \"intointeger\";}}\nvar __str = new String(\"ABB\\u0041BABAB\");\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nwith(__str){\n try {\n var x = lastIndexOf(__obj, __obj2);\n $FAIL('#1: var x = lastIndexOf(__obj, __obj2) lead to throwing exception');\n } catch (e) {\n if (e!==\"intointeger\") {\n $ERROR('#1.1: Exception === \"intointeger\". Actual: '+e);\n }\n }\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.8_A4_T2"
+ },
+ {
+ "section": "15.5.4.8",
+ "description": "Override toString and valueOf functions",
+ "test": "var __obj = {toString:function(){return \"\\u0041B\";}}\nvar __obj2 = {valueOf:function(){return {};},toString:function(){}}\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (\"ABB\\u0041BABAB\".lastIndexOf(__obj, __obj2)!==7) {\n $ERROR('#1: var __obj = {toString:function(){return \"\\u0041B\";}}; var __obj2 = {valueOf:function(){return {};},toString:function(){}}; \"ABB\\\\u0041BABAB\".lastIndexOf(__obj, __obj2)===7. Actual: '+(\"ABB\\u0041BABAB\".lastIndexOf(__obj, __obj2)));\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.8_A4_T3"
+ },
+ {
+ "section": "15.5.4.8",
+ "description": "Override toString and valueOf functions, and they throw exceptions",
+ "test": "var __obj = {toString:function(){throw \"intostr\";}};\nvar __obj2 = {valueOf:function(){throw \"intoint\";}};\nvar __instance = new Number(10001.10001);\nNumber.prototype.lastIndexOf=String.prototype.lastIndexOf;\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nwith(__instance){\n try {\n var x = lastIndexOf(__obj, __obj2);\n $FAIL('#1: var x = lastIndexOf(__obj, __obj2) lead to throwing exception');\n } catch (e) {\n if (e!==\"intostr\") {\n $ERROR('#1.1: Exception === \"intostr\". Actual: '+e);\n }\n }\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.8_A4_T4"
+ },
+ {
+ "section": "15.5.4.8",
+ "description": "Override toString and valueOf functions, first and second valueOf throw exception",
+ "test": "var __obj = {toString:function(){return {};},valueOf:function(){throw \"intostr\";}};\n\nvar __obj2 = {valueOf:function(){throw \"intointeger\";}};\n\n__FACTORY.prototype.lastIndexOf = String.prototype.lastIndexOf;\n\nvar __instance = new __FACTORY(void 0);\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\ntry {\n var x = __instance.lastIndexOf(__obj, __obj2);\n $FAIL('#1: var x = __instance.lastIndexOf(__obj, __obj2) lead to throwing exception');\n} catch (e) {\n if (e!==\"intostr\") {\n $ERROR('#1.1: Exception === \"intostr\". Actual: '+e);\n }\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\nfunction __FACTORY( value ) {\n this.value = value;\n this.toString = function() { return new Number; };\n this.valueOf=function(){return this.value+\"\"};\n}\n",
+ "id": "S15.5.4.8_A4_T5"
+ },
+ {
+ "section": "15.5.4.8, 13.2",
+ "description": "Checking String.prototype.lastIndexOf.prototype",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (String.prototype.lastIndexOf.prototype !== undefined) {\n $ERROR('#1: String.prototype.lastIndexOf.prototype === undefined. Actual: '+String.prototype.lastIndexOf.prototype );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.8_A6"
+ },
+ {
+ "section": "15.5.4.8, 13.2",
+ "description": "Checking if creating the String.prototype.lastIndexOf object fails",
+ "test": "var __FACTORY = String.prototype.lastIndexOf;\n\ntry {\n var __instance = new __FACTORY;\n $FAIL('#1: __FACTORY = String.prototype.lastIndexOf; __instance = new __FACTORY lead to throwing exception');\n} catch (e) {\n $PRINT(e);\n}\n",
+ "id": "S15.5.4.8_A7"
+ },
+ {
+ "section": "15.5.4.8",
+ "description": "Checking if enumerating the String.prototype.lastIndexOf.length property fails",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#0\nif (!(String.prototype.lastIndexOf.hasOwnProperty('length'))) {\n $FAIL('#0: String.prototype.lastIndexOf.hasOwnProperty(\\'length\\') return true. Actual: '+String.prototype.lastIndexOf.hasOwnProperty('length'));\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n\n//////////////////////////////////////////////////////////////////////////////\n// CHECK#1\nif (String.prototype.lastIndexOf.propertyIsEnumerable('length')) {\n $ERROR('#1: String.prototype.lastIndexOf.propertyIsEnumerable(\\'length\\') return false. Actual: '+String.prototype.lastIndexOf.propertyIsEnumerable('length'));\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n// CHECK#2\ncount=0;\n\nfor (p in String.prototype.lastIndexOf){\n if (p===\"length\") count++;\n}\n\nif (count !== 0) {\n $ERROR('#2: count=0; for (p in String.prototype.lastIndexOf){if (p===\"length\") count++;}; count === 0. Actual: '+count );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.8_A8"
+ },
+ {
+ "section": "15.5.4.8",
+ "description": "Checking if deleting the String.prototype.lastIndexOf.length property fails",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#0\nif (!(String.prototype.lastIndexOf.hasOwnProperty('length'))) {\n $FAIL('#0: String.prototype.lastIndexOf.hasOwnProperty(\\'length\\') return true. Actual: '+String.prototype.lastIndexOf.hasOwnProperty('length'));\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (delete String.prototype.lastIndexOf.length) {\n $ERROR('#1: delete String.prototype.lastIndexOf.length return false');\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (!(String.prototype.lastIndexOf.hasOwnProperty('length'))) {\n $FAIL('#2: delete String.prototype.lastIndexOf.length; String.prototype.lastIndexOf.hasOwnProperty(\\'length\\') return true. Actual: '+String.prototype.lastIndexOf.hasOwnProperty('length'));\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.8_A9"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.5.4.9_String.prototype.localeCompare.json b/website/resources/scripts/testcases2/15.5.4.9_String.prototype.localeCompare.json
new file mode 100644
index 000000000..38adacaf0
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.5.4.9_String.prototype.localeCompare.json
@@ -0,0 +1,56 @@
+{
+ "testCollection": {
+ "name": "15.5.4.9_String.prototype.localeCompare",
+ "numTests": 8,
+ "tests": [
+ {
+ "section": "15.5.4.9",
+ "description": "Checking if varying the String.prototype.localeCompare.length property fails",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (!(String.prototype.localeCompare.hasOwnProperty('length'))) {\n $ERROR('#1: String.prototype.localeCompare.hasOwnProperty(\\'length\\') return true. Actual: '+String.prototype.localeCompare.hasOwnProperty('length'));\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\nvar __obj = String.prototype.localeCompare.length;\n\nString.prototype.localeCompare.length = function(){return \"shifted\";};\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (String.prototype.localeCompare.length !== __obj) {\n $ERROR('#2: __obj = String.prototype.localeCompare.length; String.prototype.localeCompare.length = function(){return \"shifted\";}; String.prototype.localeCompare.length === __obj. Actual: '+String.prototype.localeCompare.length );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.9_A10"
+ },
+ {
+ "section": "15.5.4.9",
+ "description": "Checking String.prototype.localeCompare.length",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (!(String.prototype.localeCompare.hasOwnProperty(\"length\"))) {\n $ERROR('#1: String.prototype.localeCompare.hasOwnProperty(\"length\") return true. Actual: '+String.prototype.localeCompare.hasOwnProperty(\"length\"));\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (String.prototype.localeCompare.length !== 1) {\n $ERROR('#2: String.prototype.localeCompare.length === 1. Actual: '+String.prototype.localeCompare.length );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.9_A11"
+ },
+ {
+ "section": "15.5.4.9",
+ "description": "This string is symbol and arguments are symbols",
+ "test": "var str1 = new String(\"h\"); \n//CHECK#1\nvar str2 = new String (\"\\x68\");\nif (str1.localeCompare(str2)!==0){\n $ERROR('#1: var str1 = new String(\"h\"); var str2 = new String (\"\\\\x68\"); str1.localeCompare(str2)===0. Actual: '+str1.localeCompare(str2));\n}\n\n//CHECK#2\nvar str2 = new String (\"\\u0068\");\nif (str1.localeCompare(str2)!==0){\n $ERROR('#2: var str1 = new String(\"h\"); var str2 = new String (\"\\\\u0068\"); str1.localeCompare(str2)===0. Actual: '+str1.localeCompare(str2));\n}\n\n//CHECK#3\nvar str2 = new String (\"h\");\nif (str1.localeCompare(str2)!==0){\n $ERROR('#3: var str1 = new String(\"h\"); var str2 = new String (\"h\"); str1.localeCompare(str2)===0. Actual: '+str1.localeCompare(str2));\n}\n",
+ "id": "S15.5.4.9_A1_T1"
+ },
+ {
+ "section": "15.5.4.9",
+ "description": "Call string_1.localeCompare(string_2) is equal -string_2.localeCompare(string_1)",
+ "test": "//CHECK#1\nvar str1 = \"h\";\nvar str2 = \"H\";\nif (str1.localeCompare(str2)!==-str2.localeCompare(str1)){\n $ERROR('#1.1: var str1 = \"h\"; var str2 = \"H\"; str1.localeCompare(str2)===-str2.localeCompare(str1). Actual: '+str1.localeCompare(str2));\n}\n",
+ "id": "S15.5.4.9_A1_T2"
+ },
+ {
+ "section": "15.5.4.9, 13.2",
+ "description": "Checking String.prototype.localeCompare.prototype",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (String.prototype.localeCompare.prototype !== undefined) {\n $ERROR('#1: String.prototype.localeCompare.prototype === undefined. Actual: '+String.prototype.localeCompare.prototype );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.9_A6"
+ },
+ {
+ "section": "15.5.4.9, 13.2",
+ "description": "Checking if creating the String.prototype.localeCompare object fails",
+ "test": "var __FACTORY = String.prototype.localeCompare;\n\ntry {\n var __instance = new __FACTORY;\n $FAIL('#1: __FACTORY = String.prototype.localeCompare; __instance = new __FACTORY lead to throwing exception');\n} catch (e) {}\n",
+ "id": "S15.5.4.9_A7"
+ },
+ {
+ "section": "15.5.4.9",
+ "description": "Checking if enumerating the String.prototype.localeCompare.length property fails",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#0\nif (!(String.prototype.localeCompare.hasOwnProperty('length'))) {\n $ERROR('#0: String.prototype.localeCompare.hasOwnProperty(\\'length\\') return true. Actual: '+String.prototype.localeCompare.hasOwnProperty('length'));\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n\n//////////////////////////////////////////////////////////////////////////////\n// CHECK#1\nif (String.prototype.localeCompare.propertyIsEnumerable('length')) {\n $ERROR('#1: String.prototype.localeCompare.propertyIsEnumerable(\\'length\\') return false');\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n// CHECK#2\nvar count=0;\n\nfor (p in String.prototype.localeCompare){\n if (p===\"length\") count++;\n}\n\nif (count !== 0) {\n $ERROR('#2: count=0; for (p in String.prototype.localeCompare){if (p===\"length\") count++;}; count === 0. Actual: '+count );\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.9_A8"
+ },
+ {
+ "section": "15.5.4.9",
+ "description": "Checking if deleting the String.prototype.localeCompare.length property fails",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#0\nif (!(String.prototype.localeCompare.hasOwnProperty('length'))) {\n $ERROR('#0: String.prototype.localeCompare.hasOwnProperty(\\'length\\') return true. Actual: '+String.prototype.localeCompare.hasOwnProperty('length'));\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (delete String.prototype.localeCompare.length) {\n $ERROR('#1: delete String.prototype.localeCompare.length return false');\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (!(String.prototype.localeCompare.hasOwnProperty('length'))) {\n $ERROR('#2: delete String.prototype.localeCompare.length; String.prototype.localeCompare.hasOwnProperty(\\'length\\') return true. Actual: '+String.prototype.localeCompare.hasOwnProperty('length'));\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.9_A9"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.5.4_Properties_of_the_String_Prototype_Object.json b/website/resources/scripts/testcases2/15.5.4_Properties_of_the_String_Prototype_Object.json
new file mode 100644
index 000000000..453b7a3a9
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.5.4_Properties_of_the_String_Prototype_Object.json
@@ -0,0 +1,122 @@
+{
+ "testCollection": {
+ "name": "15.5.4_Properties_of_the_String_Prototype_Object",
+ "numTests": 19,
+ "tests": [
+ {
+ "section": "15.5.4.1",
+ "description": "Checking String.prototype.constructor",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (String.prototype.constructor !== String) {\n $ERROR('#1: String.prototype.constructor === String. Actual: String.prototype.constructor ==='+String.prototype.constructor ); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.1_A1_T1"
+ },
+ {
+ "section": "15.5.4.1",
+ "description": "Create new String.prototype.constructor object and check it",
+ "test": "var __constr = String.prototype.constructor;\n\nvar __instance = new __constr(\"choosing one\");\n\n//////////////////////////////////////////////////////////////////////////////\n// CHECK#0\nif (__instance !=\"choosing one\") {\n $ERROR('#0: __constr = String.prototype.constructor; __instance = new __constr(\"choosing one\"); __instance ==\"choosing one\". Actual: __instance =='+__instance ); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n// CHECK#1\nif (__instance.constructor !== String) {\n $ERROR('#1: __constr = String.prototype.constructor; __instance = new __constr(\"choosing one\"); __instance.constructor === String. Actual: __instance.constructor ==='+__instance.constructor ); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n// CHECK#2\nif (!(String.prototype.isPrototypeOf(__instance))) {\n $ERROR('#2: __constr = String.prototype.constructor; __instance = new __constr(\"choosing one\"); String.prototype.isPrototypeOf(__instance) return true. Actual: '+String.prototype.isPrototypeOf(__instance)); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n// CHECK#3\nvar __to_string_result = '[object '+ 'String' +']';\n\ndelete String.prototype.toString;\n\nif (__instance.toString() !== __to_string_result) {\n $ERROR('#3: __constr = String.prototype.constructor; __instance = new __constr(\"choosing one\"); delete String.prototype.toString; __instance.toString() === __to_string_result. Actual: __instance.toString() ==='+__instance.toString()+' __to_string_result ==='+__to_string_result ); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.1_A1_T2"
+ },
+ {
+ "section": "15.5.4.2",
+ "description": "Create new String(number) and check it`s method toString()",
+ "test": "var __string__obj = new String(1);\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#\nif (__string__obj.toString() !== \"\"+1) {\n $ERROR('#1: __string__obj = new String(1); __string__obj.toString() === \"\"+1. Actual: __string__obj.toString() ==='+__string__obj.toString() ); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.2_A1_T1"
+ },
+ {
+ "section": "15.5.4.2",
+ "description": "Create new String(boolean) and check it`s method toString()",
+ "test": "var __string__obj = new String(true);\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#\nif (__string__obj.toString() !== \"\"+true) {\n $ERROR('#1: __string__obj = new String(true); __string__obj.toString() === \"\"+true. Actual: __string__obj.toString() ==='+__string__obj.toString() ); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.2_A1_T2"
+ },
+ {
+ "section": "15.5.4.2",
+ "description": "Create new String(string) and check it`s method toString()",
+ "test": "var __string__obj = new String(\"metal\");\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#\nif (__string__obj.toString() !== \"metal\") {\n $ERROR('#1: __string__obj = new String(\"metal\"); __string__obj.toString() === \"metal\". Actual: __string__obj.toString() ==='+__string__obj.toString() ); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.2_A1_T3"
+ },
+ {
+ "section": "15.5.4.2",
+ "description": "Create new String(function(){}()) and check it`s method toString()",
+ "test": "var __string__obj = new String(function(){}());\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#\nif (__string__obj.toString() !== \"undefined\") {\n $ERROR('#1: __string__obj = new String(function(){}()); __string__obj.toString() === \"undefined\". Actual: __string__obj.toString() ==='+__string__obj.toString() ); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.2_A1_T4"
+ },
+ {
+ "section": "15.5.4.2",
+ "description": "Checking if creating variable String.prototype.toString fails",
+ "test": "var __toString = String.prototype.toString;\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (typeof __toString !== \"function\") {\n $ERROR('#1: __toString = String.prototype.toString; typeof __toString === \"function\". Actual: typeof __toString ==='+typeof __toString ); \n}\n\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\ntry {\n var x = __toString();\n $FAIL('#2: \"__toString = String.prototype.toString; var x = __toString();\" lead to throwing exception');\n} catch (e) {\n if (!(e instanceof TypeError)) {\n $ERROR('#2.1: \"__toString = String.prototype.toString; var x = __toString();\" lead to throwing exception. Exception is instance of TypeError. Actual: exception is '+e);\n }\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.2_A2_T1"
+ },
+ {
+ "section": "15.5.4.2",
+ "description": "Checking if creating the object String.prototype.toString fails",
+ "test": "var __obj={toString : String.prototype.toString};\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (typeof __obj[\"toString\"] !== \"function\") {\n $ERROR('#1: var __obj={toString : String.prototype.toString}; typeof __obj[\"toString\"] === \"function\". Actual: typeof __obj[\"toString\"] ==='+typeof __obj[\"toString\"] ); \n}\n\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\ntry {\n var x = (__obj == 1);\n $FAIL('#2: \"var x = (__obj == 1)\" lead to throwing exception');\n} catch (e) {\n if (!(e instanceof TypeError)) {\n $ERROR('#2.1: Exception is instance of TypeError. Actual: exception is '+e);\n }\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.2_A2_T2"
+ },
+ {
+ "section": "15.5.4.2, 15.5.4.3",
+ "description": "Create new String() with various arguments and compare returned results of toString() and valueOf()",
+ "test": "//CHECK#1\nvar str = new String();\nif(!(str.valueOf() == str.toString()))\n $ERROR('#1: str = new String(),str.valueOf() == str.toString()');\n\n//CHECK#2\nstr = new String(true);\nif(!(str.valueOf() == str.toString()))\n $ERROR('#2: str = new String(true),str.valueOf() == str.toString()');\n\n//CHECK#3\nstr = new String(false);\nif(!(str.valueOf() == str.toString()))\n $ERROR('#3: str = new String(false),str.valueOf() == str.toString()');\n\n//CHECK#4\nstr = new String(Math.PI);\nif(!(str.valueOf() == str.toString()))\n $ERROR('#4: str = new String(Math.PI),str.valueOf() == str.toString()');\n",
+ "id": "S15.5.4.2_A3_T1"
+ },
+ {
+ "section": "15.5.4.2",
+ "description": "Checking String.prototype.toString.length property",
+ "test": "//CHECK#1\nif (String.prototype.toString.hasOwnProperty('length')!==true){\n $ERROR('#1: String.prototype.toString.hasOwnProperty(\\'length\\')===true. Actual: '+String.prototype.toString.hasOwnProperty('length')); \n}\nelse{\n//CHECK#2\nif (String.prototype.toString.length!==0)\n $ERROR('#2: String.prototype.toString.length===0. Actual: String.prototype.toString.length==='+String.prototype.toString.length); \n}\n",
+ "id": "S15.5.4.2_A4_T1"
+ },
+ {
+ "section": "15.5.4.3",
+ "description": "Create String object as new String(1) and check it`s valueOf()",
+ "test": "var __string__obj = new String(1);\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#\nif (__string__obj.valueOf() !== \"\"+1) {\n $ERROR('#1: __string__obj = new String(1); __string__obj.valueOf() === \"\"+1. Actual: __string__obj.valueOf() ==='+__string__obj.valueOf() ); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.3_A1_T1"
+ },
+ {
+ "section": "15.5.4.3",
+ "description": "Create String object as new String(true) and check it`s valueOf()",
+ "test": "var __string__obj = new String(true);\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#\nif (__string__obj.valueOf() !== \"\"+true) {\n $ERROR('#1: __string__obj = new String(true); __string__obj.valueOf() === \"\"+true. Actual: __string__obj.valueOf() ==='+__string__obj.valueOf() ); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.3_A1_T2"
+ },
+ {
+ "section": "15.5.4.3",
+ "description": "Create String object as new String(string) and check it`s valueOf()",
+ "test": "var __string__obj = new String(\"metal\");\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#\nif (__string__obj.valueOf() !== \"metal\") {\n $ERROR('#1: __string__obj = new String(\"metal\"); __string__obj.valueOf() === \"metal\". Actual: __string__obj.valueOf() ==='+__string__obj.valueOf() ); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.3_A1_T3"
+ },
+ {
+ "section": "15.5.4.3",
+ "description": "Create String object as new String(function(){}()) and check it`s valueOf()",
+ "test": "var __string__obj = new String(function(){}());\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#\nif (__string__obj.valueOf() !== \"undefined\") {\n $ERROR('#1: __string__obj = new String(function(){}()); __string__obj.valueOf() === \"undefined\". Actual: __string__obj.valueOf() ==='+__string__obj.valueOf() ); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.3_A1_T4"
+ },
+ {
+ "section": "15.5.4.3",
+ "description": "Checking if creating variable String.prototype.valueOf fails",
+ "test": "var __valueOf = String.prototype.valueOf;\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (typeof __valueOf !== \"function\") {\n $ERROR('#1: __valueOf = String.prototype.valueOf; typeof __valueOf === \"function\". Actual: typeof __valueOf ==='+typeof __valueOf ); \n}\n\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\ntry {\n var x = __valueOf();\n $FAIL('#2: \"__valueOf = String.prototype.valueOf; var x = __valueOf()\" lead to throwing exception');\n} catch (e) {\n if (!(e instanceof TypeError)) {\n $ERROR('#2.1: Exception is instance of TypeError. Actual: exception is '+e);\n }\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.3_A2_T1"
+ },
+ {
+ "section": "15.5.4.3",
+ "description": "Checking if creating the object String.prototype.valueOf fails",
+ "test": "var __obj={valueOf : String.prototype.valueOf};\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (typeof __obj[\"valueOf\"] !== \"function\") {\n $ERROR('#1: var __obj={valueOf : String.prototype.valueOf}; typeof __obj[\"valueOf\"] === \"function\". Actual: typeof __obj[\"valueOf\"] ==='+typeof __obj[\"valueOf\"] ); \n}\n\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\ntry {\n var x = (__obj == 1);\n $FAIL('#2: \"var __obj={valueOf : String.prototype.valueOf}; var x = (__obj == 1)\" lead to throwing exception');\n} catch (e) {\n if (!(e instanceof TypeError)) {\n $ERROR('#2.1: Exception is instance of TypeError. Actual: exception is '+e);\n }\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4.3_A2_T2"
+ },
+ {
+ "section": "15.5.4",
+ "description": "first we delete String.prototype.toString cause it overrides Object prototype toString.\nObject.prototype.toString returns [object+[[class]]+]",
+ "test": "delete String.prototype.toString;\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (String.prototype.toString() !== \"[object \"+\"String\"+\"]\") {\n $ERROR('#1: delete String.prototype.toString; String.prototype.toString() === \"[object \"+\"String\"+\"]\". Actual: String.prototype.toString() ==='+String.prototype.toString() ); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4_A1"
+ },
+ {
+ "section": "15.5.4",
+ "description": "Checking String.prototype",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (String.prototype !=\"\") {\n $ERROR('#1: String.prototype ==\"\". Actual: String.prototype =='+String.prototype ); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4_A2"
+ },
+ {
+ "section": "15.5.4, 15.2.3.1",
+ "description": "Checking Object.prototype.isPrototypeOf(String.prototype)",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (!(Object.prototype.isPrototypeOf(String.prototype))) {\n $ERROR('#1: Object.prototype.isPrototypeOf(String.prototype) return true. Actual: '+Object.prototype.isPrototypeOf(String.prototype)); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\ndelete String.prototype.toString;\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (String.prototype.toString() != \"[object \"+\"String\"+\"]\") {\n $ERROR('#2: delete String.prototype.toString; String.prototype.toString() == \"[object \"+\"String\"+\"]\". Actual: String.prototype.toString() =='+String.prototype.toString() ); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.4_A3"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.5.5.2.json b/website/resources/scripts/testcases2/15.5.5.2.json
new file mode 100644
index 000000000..8eb485445
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.5.5.2.json
@@ -0,0 +1,92 @@
+{
+ "testCollection": {
+ "name": "15.5.5.2",
+ "numTests": 14,
+ "tests": [
+ {
+ "id": "15.5.5.5.2-1-1",
+ "path": "TestCases/chapter15/15.5/15.5.5/15.5.5.2/15.5.5.5.2-1-1.js",
+ "description": "String object supports bracket notation to lookup of data properties",
+ "test": "assertTrue((function testcase() {\n var s = new String(\"hello world\");\n s.foo = 1;\n \n if (s[\"foo\"] === 1) {\n return true;\n }\n }).call(this));\n"
+ },
+ {
+ "id": "15.5.5.5.2-1-2",
+ "path": "TestCases/chapter15/15.5/15.5.5/15.5.5.2/15.5.5.5.2-1-2.js",
+ "description": "String value supports bracket notation to lookup data properties",
+ "test": "assertTrue((function testcase() {\n var s = String(\"hello world\");\n \n if (s[\"foo\"] === undefined) {\n return true;\n }\n }).call(this));\n"
+ },
+ {
+ "id": "15.5.5.5.2-3-1",
+ "path": "TestCases/chapter15/15.5/15.5.5/15.5.5.2/15.5.5.5.2-3-1.js",
+ "description": "String object indexing returns undefined for missing data properties",
+ "test": "assertTrue((function testcase() {\n var s = new String(\"hello world\");\n \n if (s[\"foo\"] === undefined) {\n return true;\n }\n }).call(this));\n"
+ },
+ {
+ "id": "15.5.5.5.2-3-2",
+ "path": "TestCases/chapter15/15.5/15.5.5/15.5.5.2/15.5.5.5.2-3-2.js",
+ "description": "String value indexing returns undefined for missing data properties",
+ "test": "assertTrue((function testcase() {\n var s = String(\"hello world\");\n \n if (s[\"foo\"] === undefined) {\n return true;\n }\n }).call(this));\n"
+ },
+ {
+ "id": "15.5.5.5.2-3-3",
+ "path": "TestCases/chapter15/15.5/15.5.5/15.5.5.2/15.5.5.5.2-3-3.js",
+ "description": "String object indexing returns undefined if the numeric index (NaN) is not an array index",
+ "test": "assertTrue((function testcase() {\n var s = new String(\"hello world\");\n\n if (s[NaN] === undefined) {\n return true;\n }\n }).call(this));\n"
+ },
+ {
+ "id": "15.5.5.5.2-3-4",
+ "path": "TestCases/chapter15/15.5/15.5.5/15.5.5.2/15.5.5.5.2-3-4.js",
+ "description": "String object indexing returns undefined if the numeric index (Infinity) is not an array index",
+ "test": "assertTrue((function testcase() {\n var s = new String(\"hello world\");\n\n if (s[Infinity] === undefined) {\n return true;\n }\n }).call(this));\n"
+ },
+ {
+ "id": "15.5.5.5.2-3-5",
+ "path": "TestCases/chapter15/15.5/15.5.5/15.5.5.2/15.5.5.5.2-3-5.js",
+ "description": "String object indexing returns undefined if the numeric index ( 2^32-1) is not an array index",
+ "test": "assertTrue((function testcase() {\n var s = new String(\"hello world\");\n\n if (s[Math.pow(2, 32)-1]===undefined) {\n return true;\n }\n }).call(this));\n"
+ },
+ {
+ "id": "15.5.5.5.2-3-6",
+ "path": "TestCases/chapter15/15.5/15.5.5/15.5.5.2/15.5.5.5.2-3-6.js",
+ "description": "String value indexing returns undefined if the numeric index (NaN) is not an array index",
+ "test": "assertTrue((function testcase() {\n var s = String(\"hello world\");\n\n if (s[NaN] === undefined) {\n return true;\n }\n }).call(this));\n"
+ },
+ {
+ "id": "15.5.5.5.2-3-7",
+ "path": "TestCases/chapter15/15.5/15.5.5/15.5.5.2/15.5.5.5.2-3-7.js",
+ "description": "String value indexing returns undefined if the numeric index (Infinity) is not an array index",
+ "test": "assertTrue((function testcase() {\n var s = String(\"hello world\");\n\n if (s[Infinity] === undefined) {\n return true;\n }\n }).call(this));\n"
+ },
+ {
+ "id": "15.5.5.5.2-3-8",
+ "path": "TestCases/chapter15/15.5/15.5.5/15.5.5.2/15.5.5.5.2-3-8.js",
+ "description": "String value indexing returns undefined if the numeric index ( >= 2^32-1) is not an array index",
+ "test": "assertTrue((function testcase() {\n var s = String(\"hello world\");\n\n if (s[Math.pow(2, 32)-1]===undefined) {\n return true;\n }\n }).call(this));\n"
+ },
+ {
+ "id": "15.5.5.5.2-7-1",
+ "path": "TestCases/chapter15/15.5/15.5.5/15.5.5.2/15.5.5.5.2-7-1.js",
+ "description": "String object indexing returns undefined if the numeric index is less than 0",
+ "test": "assertTrue((function testcase() {\n var s = new String(\"hello world\");\n\n if (s[-1] === undefined) {\n return true;\n }\n }).call(this));\n"
+ },
+ {
+ "id": "15.5.5.5.2-7-2",
+ "path": "TestCases/chapter15/15.5/15.5.5/15.5.5.2/15.5.5.5.2-7-2.js",
+ "description": "String value indexing returns undefined if the numeric index is less than 0",
+ "test": "assertTrue((function testcase() {\n var s = String(\"hello world\");\n\n if (s[-1] === undefined) {\n return true;\n }\n }).call(this));\n"
+ },
+ {
+ "id": "15.5.5.5.2-7-3",
+ "path": "TestCases/chapter15/15.5/15.5.5/15.5.5.2/15.5.5.5.2-7-3.js",
+ "description": "String object indexing returns undefined if the numeric index is greater than the string length",
+ "test": "assertTrue((function testcase() {\n var s = new String(\"hello world\");\n\n if (s[11] === undefined) {\n return true;\n }\n }).call(this));\n"
+ },
+ {
+ "id": "15.5.5.5.2-7-4",
+ "path": "TestCases/chapter15/15.5/15.5.5/15.5.5.2/15.5.5.5.2-7-4.js",
+ "description": "String value indexing returns undefined if the numeric index is greater than the string length",
+ "test": "assertTrue((function testcase() {\n var s = String(\"hello world\");\n\n if (s[11] === undefined) {\n return true;\n }\n }).call(this));\n"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.5.5_Properties_of_String_Instances.json b/website/resources/scripts/testcases2/15.5.5_Properties_of_String_Instances.json
new file mode 100644
index 000000000..361025339
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.5.5_Properties_of_String_Instances.json
@@ -0,0 +1,62 @@
+{
+ "testCollection": {
+ "name": "15.5.5_Properties_of_String_Instances",
+ "numTests": 9,
+ "tests": [
+ {
+ "section": "15.5.5.1",
+ "description": "Create strings and check its length",
+ "test": "var __str__instance = new String(\"ABC\\u0041\\u0042\\u0043\");\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__str__instance.length !== 6) {\n $ERROR('#1: var __str__instance = new String(\"ABC\\\\u0041\\\\u0042\\\\u0043\"); __str__instance.length === 6, where __str__instance is new String(\"ABC\\\\u0041\\\\u0042\\\\u0043\"). Actual: __str__instance.length ==='+__str__instance.length ); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n__str__instance = new String;\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (__str__instance.length !== 0) {\n $ERROR('#2: __str__instance = new String; __str__instance.length === 0, where __str__instance is new String. Actual: __str__instance.length ==='+__str__instance.length ); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.5.1_A1"
+ },
+ {
+ "section": "15.5.5.1",
+ "description": "Checking if enumerating the length property of String fails",
+ "test": "var __str__instance = new String(\"globglob\");\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (!(__str__instance.hasOwnProperty(\"length\"))) {\n $ERROR('#1: var __str__instance = new String(\"globglob\"); __str__instance.hasOwnProperty(\"length\") return true. Actual: '+__str__instance.hasOwnProperty(\"length\"));\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nfor(prop in __str__instance){\n if (prop === \"length\") {\n $ERROR('#2: length property has the attributes {DontEnum}');\n }\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.5.1_A2"
+ },
+ {
+ "section": "15.5.5.1",
+ "description": "Checking if deleting the length property of String fails",
+ "test": "var __str__instance = new String(\"globglob\");\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (!(__str__instance.hasOwnProperty(\"length\"))) {\n $ERROR('#1: var __str__instance = new String(\"globglob\"); __str__instance.hasOwnProperty(\"length\") return true. Actual: '+__str__instance.hasOwnProperty(\"length\"));\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (delete __str__instance === true) {\n $ERROR('#2: var __str__instance = new String(\"globglob\"); delete __str__instance !== true');\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#3\nif (!(__str__instance.hasOwnProperty(\"length\"))) {\n $ERROR('#3: var __str__instance = new String(\"globglob\"); delete __str__instance; __str__instance.hasOwnProperty(\"length\") return true. Actual: '+__str__instance.hasOwnProperty(\"length\"));\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.5.1_A3"
+ },
+ {
+ "section": "15.5.5.1",
+ "description": "Checking if varying the length property of String fails",
+ "test": "var __str__instance = new String(\"globglob\");\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (!(__str__instance.hasOwnProperty(\"length\"))) {\n $ERROR('#1: var __str__instance = new String(\"globglob\"); __str__instance.hasOwnProperty(\"length\") return true. Actual: '+__str__instance.hasOwnProperty(\"length\"));\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (__str__instance.length !== 8) {\n $ERROR('#2: var __str__instance = new String(\"globglob\"); __str__instance.length === 8. Actual: __str__instance.length ==='+__str__instance.length ); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n__str__instance.length=-1;\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#3\nif (__str__instance.length !== 8) {\n $ERROR('#3: var __str__instance = new String(\"globglob\"); __str__instance.length=-1; __str__instance.length === 8(after redefine length property). Actual: __str__instance.length ==='+__str__instance.length ); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\nwith(__str__instance)\n length = 0;\n \n//////////////////////////////////////////////////////////////////////////////\n//CHECK#4\nif (__str__instance.length !== 8) {\n $ERROR('#4: var __str__instance = new String(\"globglob\"); with(__str__instance) length = 0; __str__instance.length === 8(after redefine length property with using \"with\"). Actual: __str__instance.length ==='+__str__instance.length ); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n__str__instance.length++;\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#5\nif (__str__instance.length !== 8) {\n $ERROR('#5: var __str__instance = new String(\"globglob\"); __str__instance.length++; __str__instance.length === 8(after redefine length property with using \"++\"). Actual: __str__instance.length ==='+__str__instance.length ); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.5.1_A4"
+ },
+ {
+ "section": "15.5.5.1",
+ "description": "Change valueOf and toString of String object and check length property",
+ "test": "var __str__instance = new String(\"ABC\\u0041\\u0042\\u0043\");\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__str__instance.length !== 6) {\n $ERROR('#1: var __str__instance = new String(\"ABC\\\\u0041\\\\u0042\\\\u0043\"); __str__instance.length === 6. Actual: __str__instance.length ==='+__str__instance.length ); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n__str__instance.valueOf = function(){return \"ed\"};\n__str__instance.toString = function(){return \"ed\"};\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (__str__instance !=\"ed\") {\n $ERROR('#2: var __str__instance = new String(\"ABC\\\\u0041\\\\u0042\\\\u0043\"); __str__instance.valueOf = function(){return \"ed\"}; __str__instance.toString = function(){return \"ed\"}; __str__instance ==\"ed\". Actual: __str__instance =='+__str__instance ); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#3\nif (__str__instance.length !== 6) {\n $ERROR('#3: var __str__instance = new String(\"ABC\\\\u0041\\\\u0042\\\\u0043\"); __str__instance.valueOf = function(){return \"ed\"}; __str__instance.toString = function(){return \"ed\"}; __str__instance.length === 6. Actual: __str__instance.length ==='+__str__instance.length ); \n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.5.1_A5"
+ },
+ {
+ "section": "15.5.5",
+ "description": "Create new String and try call it",
+ "test": "var __str = new String;\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\ntry {\n __str();\n $FAIL('#1: __str = new String; __str() lead to throwing exception');\n} catch (e) {\n if (!(e instanceof TypeError)) {\n $ERROR('#1.1: Exception is instance of TypeError. Actual: exception is '+e);\n }\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.5_A1_T1"
+ },
+ {
+ "section": "15.5.5",
+ "description": "Checking if creating new \"String(\"a|b\")()\" fails",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\ntry {\n String(\"a|b\")();\n $FAIL('#1: String(\"a|b\")() lead to throwing exception');\n} catch (e) {\n if (!(e instanceof TypeError)) {\n $ERROR('#1.1: Exception is instance of TypeError. Actual: exception is '+e);\n }\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.5_A1_T2"
+ },
+ {
+ "section": "15.5.5",
+ "description": "Create new string object and try new created_string",
+ "test": "var __str = new Object(\"\");\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\ntry {\n new __str;\n $FAIL('#1: __str = new Object(\"\"); \"new __str\" lead to throwing exception');\n} catch (e) {\n if (!(e instanceof TypeError)) {\n $ERROR('#1.1: Exception is instance of TypeError. Actual: exception is '+e);\n }\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.5_A2_T1"
+ },
+ {
+ "section": "15.5.5",
+ "description": "Checking if creating \"new String\" fails",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\ntry {\n new new String;\n $FAIL('#1: \"new new String\" lead to throwing exception');\n} catch (e) {\n if (!(e instanceof TypeError)) {\n $ERROR('#1.1: Exception is instance of TypeError. Actual: exception is '+e);\n }\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S15.5.5_A2_T2"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.6.1_The_Boolean_Constructor_Called_as_a_Function.json b/website/resources/scripts/testcases2/15.6.1_The_Boolean_Constructor_Called_as_a_Function.json
new file mode 100644
index 000000000..e0752bae8
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.6.1_The_Boolean_Constructor_Called_as_a_Function.json
@@ -0,0 +1,44 @@
+{
+ "testCollection": {
+ "name": "15.6.1_The_Boolean_Constructor_Called_as_a_Function",
+ "numTests": 6,
+ "tests": [
+ {
+ "section": "15.6.1.1",
+ "description": "Used values 1, new String(\"1\"), new Object(1) and called without argument",
+ "test": "//CHECK#1\nif( typeof Boolean() !== \"boolean\" ) {\n $ERROR('#1: typeof Boolean() should be \"boolean\", actual is \"'+typeof Boolean()+'\"');\n}\n\n//CHECK#2\nif( typeof Boolean(1) !== \"boolean\" ) {\n $ERROR('#2: typeof Boolean(1) should be \"boolean\", actual is \"'+typeof Boolean(1)+'\"');\n}\n\n//CHECK#3\nif( typeof Boolean(new String(\"1\")) !== \"boolean\" ) {\n $ERROR('#3: typeof Boolean(new String(\"1\")) should be \"boolean\", actual is \"'+typeof Boolean(new String(\"1\"))+'\"');\n}\n\n//CHECK#4\nif( typeof Boolean(new Object(1)) !== \"boolean\" ) {\n $ERROR('#4: typeof Boolean(new Object(1)) should be \"boolean\", actual is \"'+typeof Boolean(new Object(1))+'\"');\n}\n\n",
+ "id": "S15.6.1.1_A1_T1"
+ },
+ {
+ "section": "15.6.1.1",
+ "description": "Used various number values as argument",
+ "test": "//CHECK#1\nif( typeof Boolean(0) !== \"boolean\" ) {\n $ERROR('#1.1: typeof Boolean(0) should be \"boolean\", actual is \"'+typeof Boolean(0)+'\"');\n}\nif( Boolean(0) !== false ) {\n $ERROR('#1.2: Boolean(0) should be false, actual is '+Boolean(0));\n}\n\n//CHECK#2\nif( typeof Boolean(-1) !== \"boolean\" ) {\n $ERROR('#2.1: typeof Boolean(-1) should be \"boolean\", actual is \"'+typeof Boolean(-1)+'\"');\n}\nif( Boolean(-1) !== true ) {\n $ERROR('#2.2: Boolean(-1) should be true, actual is '+Boolean(-1));\n}\n\n//CHECK#3\nif( typeof Boolean(-Infinity) !== \"boolean\" ) {\n $ERROR('#3.1: typeof Boolean(-Infinity) should be \"boolean\", actual is \"'+typeof Boolean(-Infinity)+'\"');\n}\nif( Boolean(-Infinity) !== true ) {\n $ERROR('#3.2: Boolean(-Infinity) should be true, actual is '+Boolean(-Infinity));\n}\n\n//CHECK#4\nif( typeof Boolean(NaN) !== \"boolean\" ) {\n $ERROR('#4.1: typeof Boolean(NaN) should be \"boolean\", actual is \"'+typeof Boolean(NaN)+'\"');\n}\nif( Boolean(NaN) !== false ) {\n $ERROR('#4.2: Boolean(NaN) should be false, actual is '+Boolean(NaN));\n}\n",
+ "id": "S15.6.1.1_A1_T2"
+ },
+ {
+ "section": "15.6.1.1",
+ "description": "Used various string values as argument",
+ "test": "//CHECK#1\nif( typeof Boolean(\"0\") !== \"boolean\" ) {\n $ERROR('#1.1: typeof Boolean(\"0\") should be \"boolean\", actual is \"'+typeof Boolean(\"0\")+'\"');\n}\nif( Boolean(\"0\") !== true ) {\n $ERROR('#1.2: Boolean(\"0\") should be true');\n}\n\n//CHECK#2\nif( typeof Boolean(\"-1\") !== \"boolean\" ) {\n $ERROR('#2.1: typeof Boolean(\"-1\") should be \"boolean\", actual is \"'+typeof Boolean(\"-1\")+'\"');\n}\nif( Boolean(\"-1\") !== true ) {\n $ERROR('#2.2: Boolean(\"-1\") should be true');\n}\n\n//CHECK#3\nif( typeof Boolean(\"1\") !== \"boolean\" ) {\n $ERROR('#3.1: typeof Boolean(\"1\") should be \"boolean\", actual is \"'+typeof Boolean(\"1\")+'\"');\n}\nif( Boolean(\"1\") !== true ) {\n $ERROR('#3.2: Boolean(\"1\") should be true');\n}\n\n//CHECK#4\nif( typeof Boolean(\"false\") !== \"boolean\" ) {\n $ERROR('#4.1: typeof Boolean(\"false\") should be \"boolean\", actual is \"'+typeof Boolean(\"false\")+'\"');\n}\nif( Boolean(\"false\") !== true ) {\n $ERROR('#4.2: Boolean(\"false\") should be true');\n}\n\n//CHECK#5\nif( typeof Boolean(\"true\") !== \"boolean\" ) {\n $ERROR('#5.1: typeof Boolean(\"true\") should be \"boolean\", actual is \"'+typeof Boolean(\"true\")+'\"');\n}\nif( Boolean(\"true\") !== true ) {\n $ERROR('#5.2: Boolean(\"true\") should be true');\n}\n",
+ "id": "S15.6.1.1_A1_T3"
+ },
+ {
+ "section": "15.6.1.1",
+ "description": "Used various undefined values and null as argument",
+ "test": "//CHECK#1\nif( typeof Boolean(undefined) !== \"boolean\" ) {\n $ERROR('#1.1: typeof Boolean(undefined) should be \"boolean\", actual is \"'+typeof Boolean(undefined)+'\"');\n}\nif( Boolean(undefined) !== false ) {\n $ERROR('#1.2: Boolean(undefined) should be false');\n}\n\n//CHECK#2\nif( typeof Boolean(void 0) !== \"boolean\" ) {\n $ERROR('#2.1: typeof Boolean(void 0) should be \"boolean\", actual is \"'+typeof Boolean(void 0)+'\"');\n}\nif( Boolean(void 0) !== false ) {\n $ERROR('#2.2: Boolean(void 0) should be false');\n}\n\n//CHECK#3\nif( typeof Boolean(function(){}()) !== \"boolean\" ) {\n $ERROR('#3.1: typeof Boolean(function(){}()) should be \"boolean\", actual is \"'+typeof Boolean(function(){}())+'\"');\n}\nif( Boolean(function(){}()) !== false ) {\n $ERROR('#3.2: Boolean(function(){}()) should be false');\n}\n\n//CHECK#4\nif( typeof Boolean(null) !== \"boolean\" ) {\n $ERROR('#4.1: typeof Boolean(null) should be \"boolean\", actual is \"'+typeof Boolean(null)+'\"');\n}\nif( Boolean(null) !== false ) {\n $ERROR('#4.2: Boolean(null) should be false');\n}\n\n//CHECK#5\nif( typeof Boolean(x) !== \"boolean\" ) {\n $ERROR('#5.1: var x; typeof Boolean(x) should be \"boolean\", actual is \"'+typeof Boolean(x)+'\"');\n}\nif( Boolean(x) !== false ) {\n $ERROR('#5.2: var x; Boolean(x) should be false');\n}\nvar x;\n",
+ "id": "S15.6.1.1_A1_T4"
+ },
+ {
+ "section": "15.6.1.1",
+ "description": "Used various assigning values to any variable as argument",
+ "test": "//CHECK#1\nif( typeof Boolean(x=0) !== \"boolean\" ) {\n $ERROR('#1.1: typeof Boolean(x=0) should be \"boolean\", actual is \"'+typeof Boolean(x=0)+'\"');\n}\nif( Boolean(x=0) !== false ) {\n $ERROR('#1.2: Boolean(x=0) should be false');\n}\n\n//CHECK#2\nif( typeof Boolean(x=1) !== \"boolean\" ) {\n $ERROR('#2.1: typeof Boolean(x=1) should be \"boolean\", actual is \"'+typeof Boolean(x=1)+'\"');\n}\nif( Boolean(x=1) !== true ) {\n $ERROR('#2.2: Boolean(x=1) should be true');\n}\n\n//CHECK#3\nif( typeof Boolean(x=false) !== \"boolean\" ) {\n $ERROR('#3.1: typeof Boolean(x=false) should be \"boolean\", actual is \"'+typeof Boolean(x=false)+'\"');\n}\nif( Boolean(x=false) !== false ) {\n $ERROR('#3.2: Boolean(x=false) should be false');\n}\n\n//CHECK#4\nif( typeof Boolean(x=true) !== \"boolean\" ) {\n $ERROR('#4.1: typeof Boolean(x=true) should be \"boolean\", actual is \"'+typeof Boolean(x=true)+'\"');\n}\nif( Boolean(x=true) !== true ) {\n $ERROR('#4.2: Boolean(x=true) should be true');\n}\n\n//CHECK#5\nif( typeof Boolean(x=null) !== \"boolean\" ) {\n $ERROR('#5.1: typeof Boolean(x=null) should be \"boolean\", actual is \"'+typeof Boolean(x=null)+'\"');\n}\nif( Boolean(x=null) !== false ) {\n $ERROR('#5.2: Boolean(x=null) should be false');\n}\n",
+ "id": "S15.6.1.1_A1_T5"
+ },
+ {
+ "section": "15.6.1.1",
+ "description": "Call Boolean() and check result",
+ "test": "//CHECK#1\nif( typeof Boolean() !== \"boolean\" ) {\n $ERROR('#1: typeof Boolean() should be \"boolean\", actual is \"'+typeof Boolean()+'\"');\n}\n\n//CHECK#2\nif( Boolean() !== false ) {\n $ERROR('#2: Boolean() should be false');\n}\n",
+ "id": "S15.6.1.1_A2"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.6.2_The_Boolean_Constructor.json b/website/resources/scripts/testcases2/15.6.2_The_Boolean_Constructor.json
new file mode 100644
index 000000000..e7f1b1fb3
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.6.2_The_Boolean_Constructor.json
@@ -0,0 +1,32 @@
+{
+ "testCollection": {
+ "name": "15.6.2_The_Boolean_Constructor",
+ "numTests": 4,
+ "tests": [
+ {
+ "section": "15.6.2.1",
+ "description": "Checking type of the newly created object and it value",
+ "test": "//CHECK#1\nif (typeof new Boolean() !== \"object\") {\n $ERROR(\"#1: typeof new Boolean() === 'object'\");\n}\n\n//CHECK#2\nif (new Boolean() === undefined) {\n $ERROR(\"#2: new Boolean() should not be undefined\");\n}\n\n//CHECK#3\nvar x3 = new Boolean();\nif(typeof x3 !== \"object\"){\n $ERROR(\"#3: typeof new Boolean() !== 'object'\");\n}\n\n//CHECK#4\nvar x4 = new Boolean();\nif(x4 === undefined){\n $ERROR(\"#4: new Boolean() should not be undefined\");\n}\n\n//CHECK#5\nif (typeof new Boolean(1) !== \"object\") {\n $ERROR(\"#5: typeof new Boolean(10) === 'object'\");\n}\n\n//CHECK#6\nif (new Boolean(1) === undefined) {\n $ERROR(\"#6: new Boolean(1) should not be undefined\");\n}\n\n//CHECK#7\nvar x7 = new Boolean(1);\nif(typeof x7 !== \"object\"){\n $ERROR(\"#7: typeof new Boolean(1) !== 'object'\");\n}\n\n//CHECK#8\nvar x8 = new Boolean(1);\nif(x8 === undefined){\n $ERROR(\"#8: new Boolean(1) should not be undefined\");\n}\n",
+ "id": "S15.6.2.1_A1"
+ },
+ {
+ "section": "15.6.2.1",
+ "description": "Checking prototype property of the newly created object",
+ "test": "// CHECK#1\nvar x1 = new Boolean(1);\nif (typeof x1.constructor.prototype !== \"object\") {\n $ERROR('#1: typeof x1.constructor.prototype === \"object\"');\n}\n\n//CHECK#2\nvar x2 = new Boolean(2);\nif (!Boolean.prototype.isPrototypeOf(x2)) {\n $ERROR('#2: Boolean.prototype.isPrototypeOf(x2)');\n}\n\n//CHECK#3\nvar x3 = new Boolean(3);\nif (Boolean.prototype !== x3.constructor.prototype) {\n $ERROR('#3: Boolean.prototype === x3.constructor.prototype');\n}\n",
+ "id": "S15.6.2.1_A2"
+ },
+ {
+ "section": "15.6.2.1",
+ "description": "Checking value of the newly created object",
+ "test": "// CHECK#1\nvar x1 = new Boolean(1);\nif (x1.valueOf() !== true) {\n $ERROR('#1: var x1 = new Boolean(1); x1.valueOf() === true');\n}\n\n//CHECK#2\nvar x2 = new Boolean();\nif (x2.valueOf() !== false) {\n $ERROR('#2: var x2 = new Boolean(); x2.valueOf() === false');\n}\n\n//CHECK#3\nvar x2 = new Boolean(0);\nif (x2.valueOf() !== false) {\n $ERROR('#3: var x2 = new Boolean(0); x2.valueOf() === false');\n}\n\n//CHECK#4\nvar x2 = new Boolean(new Object());\nif (x2.valueOf() !== true) {\n $ERROR('#4: var x2 = new Boolean(new Object()); x2.valueOf() === true');\n}\n",
+ "id": "S15.6.2.1_A3"
+ },
+ {
+ "section": "15.6.2.1",
+ "description": "For testing toString function is used",
+ "test": "delete Boolean.prototype.toString;\n\nvar obj = new Boolean();\n\n//CHECK#1\nif (obj.toString() !== \"[object Boolean]\") {\n $ERROR('#1: The [[Class]] property of the newly constructed object is set to \"Boolean\"');\n}\n",
+ "id": "S15.6.2.1_A4"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.6.3.1_Boolean.prototype.json b/website/resources/scripts/testcases2/15.6.3.1_Boolean.prototype.json
new file mode 100644
index 000000000..da927c86f
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.6.3.1_Boolean.prototype.json
@@ -0,0 +1,32 @@
+{
+ "testCollection": {
+ "name": "15.6.3.1_Boolean.prototype",
+ "numTests": 4,
+ "tests": [
+ {
+ "section": "15.6.3.1",
+ "description": "Checking Boolean.prototype property",
+ "test": "//CHECK#1\nif (typeof Boolean.prototype !== \"object\") {\n $ERROR('#1: typeof Boolean.prototype === \"object\"');\n}\n\n//CHECK#2\nif (Boolean.prototype != false) {\n $ERROR('#2: Boolean.prototype == false');\n}\n\ndelete Boolean.prototype.toString;\n\nif (Boolean.prototype.toString() !== \"[object Boolean]\") {\n $ERROR('#3: The [[Class]] property of the Boolean prototype object is set to \"Boolean\"');\n}\n",
+ "id": "S15.6.3.1_A1"
+ },
+ {
+ "section": "15.6.3.1",
+ "description": "Checking if varying the Boolean.prototype property fails",
+ "test": "// CHECK#1\nx = Boolean.prototype;\nBoolean.prototype = 1;\nif (Boolean.prototype !== x) {\n $ERROR('#1: Boolean.prototype has the attribute ReadOnly');\n}\n",
+ "id": "S15.6.3.1_A2"
+ },
+ {
+ "section": "15.6.3.1",
+ "description": "Checking if deleting the Boolean.prototype property fails",
+ "test": "// CHECK#1\nif (delete Boolean.prototype !== false) {\n $ERROR('#1: Boolean.prototype has the attribute DontDelete');\n}\n",
+ "id": "S15.6.3.1_A3"
+ },
+ {
+ "section": "15.6.3.1",
+ "description": "Checking if enumerating the Boolean.prototype property fails",
+ "test": "//CHECK#1\nfor(x in Boolean) {\n if(x === \"prototype\") {\n $ERROR('#1: Boolean.prototype has the attribute DontEnum');\n }\n}\n\nif (Boolean.propertyIsEnumerable('prototype')) {\n $ERROR('#2: Boolean.prototype has the attribute DontEnum');\n}\n",
+ "id": "S15.6.3.1_A4"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.6.3_Properties_of_the_Boolean_Constructor.json b/website/resources/scripts/testcases2/15.6.3_Properties_of_the_Boolean_Constructor.json
new file mode 100644
index 000000000..1efef56ae
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.6.3_Properties_of_the_Boolean_Constructor.json
@@ -0,0 +1,26 @@
+{
+ "testCollection": {
+ "name": "15.6.3_Properties_of_the_Boolean_Constructor",
+ "numTests": 3,
+ "tests": [
+ {
+ "section": "15.6.3",
+ "description": "Checking existence of the property \"prototype\"",
+ "test": "if(!Boolean.hasOwnProperty(\"prototype\")){\n $ERROR('#1: The Boolean constructor has the property \"prototype\"');\n}\n\n",
+ "id": "S15.6.3_A1"
+ },
+ {
+ "section": "15.6.3",
+ "description": "Checking prototype of the Boolean constructor",
+ "test": "//CHECK#1\nif (!(Function.prototype.isPrototypeOf(Boolean))) {\n $ERROR('#1: the value of the internal [[Prototype]] property of the Boolean constructor is the Function prototype object.');\n}\n",
+ "id": "S15.6.3_A2"
+ },
+ {
+ "section": "15.6.3",
+ "description": "Checking Boolean.length property",
+ "test": "//CHECK#1\nif (!Boolean.hasOwnProperty(\"length\")){\n $ERROR('#1: Boolean constructor has length property');\n}\n\n//CHECK#2\nif (Boolean.length !== 1) {\n $ERROR('#2: Boolean constructor length property value is 1');\n}\n",
+ "id": "S15.6.3_A3"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.6.4_Properties_of_the_Boolean_Prototype_Object.json b/website/resources/scripts/testcases2/15.6.4_Properties_of_the_Boolean_Prototype_Object.json
new file mode 100644
index 000000000..cf1d90a21
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.6.4_Properties_of_the_Boolean_Prototype_Object.json
@@ -0,0 +1,110 @@
+{
+ "testCollection": {
+ "name": "15.6.4_Properties_of_the_Boolean_Prototype_Object",
+ "numTests": 17,
+ "tests": [
+ {
+ "section": "15.6.4.1",
+ "description": "Compare Boolean.prototype.constructor with Boolean",
+ "test": "//CHECK#1\nif(Boolean.prototype.constructor !== Boolean){\n $ERROR('#1: Boolean.prototype.constructor === Boolean');\n}\n",
+ "id": "S15.6.4.1_A1"
+ },
+ {
+ "section": "15.6.4.2",
+ "description": "no arguments",
+ "test": "//CHECK#1\nif(Boolean.prototype.toString() !== \"false\"){\n $ERROR('#1: Boolean.prototype.toString() === \"false\"');\n}\n\n//CHECK#2\nif((new Boolean()).toString() !== \"false\"){\n $ERROR('#2: (new Boolean()).toString() === \"false\"');\n}\n\n//CHECK#3\nif((new Boolean(false)).toString() !== \"false\"){\n $ERROR('#3: (new Boolean(false)).toString() === \"false\"');\n}\n\n//CHECK#4\nif((new Boolean(true)).toString() !== \"true\"){\n $ERROR('#4: (new Boolean(true)).toString() === \"true\"');\n}\n\n//CHECK#5\nif((new Boolean(1)).toString() !== \"true\"){\n $ERROR('#5: (new Boolean(1)).toString() === \"true\"');\n}\n\n//CHECK#6\nif((new Boolean(0)).toString() !== \"false\"){\n $ERROR('#6: (new Boolean(0)).toString() === \"false\"');\n}\n\n//CHECK#7\nif((new Boolean(new Object())).toString() !== \"true\"){\n $ERROR('#7: (new Boolean(new Object())).toString() === \"true\"');\n}\n",
+ "id": "S15.6.4.2_A1_T1"
+ },
+ {
+ "section": "15.6.4.2",
+ "description": "with some argument",
+ "test": "//CHECK#1\nif(Boolean.prototype.toString(true) !== \"false\"){\n $ERROR('#1: Boolean.prototype.toString(true) === \"false\"');\n}\n\n//CHECK#2\nif((new Boolean()).toString(true) !== \"false\"){\n $ERROR('#2: (new Boolean()).toString(true) === \"false\"');\n}\n\n//CHECK#3\nif((new Boolean(false)).toString(true) !== \"false\"){\n $ERROR('#3: (new Boolean(false)).toString(true) === \"false\"');\n}\n\n//CHECK#4\nif((new Boolean(true)).toString(false) !== \"true\"){\n $ERROR('#4: (new Boolean(true)).toString(false) === \"true\"');\n}\n\n//CHECK#5\nif((new Boolean(1)).toString(false) !== \"true\"){\n $ERROR('#5: (new Boolean(1)).toString(false) === \"true\"');\n}\n\n//CHECK#6\nif((new Boolean(0)).toString(true) !== \"false\"){\n $ERROR('#6: (new Boolean(0)).toString(true) === \"false\"');\n}\n\n//CHECK#7\nif((new Boolean(new Object())).toString(false) !== \"true\"){\n $ERROR('#7: (new Boolean(new Object())).toString(false) === \"true\"');\n}\n",
+ "id": "S15.6.4.2_A1_T2"
+ },
+ {
+ "section": "15.6.4.2",
+ "description": "transferring to the String objects",
+ "test": "//CHECK#1\ntry{\n var s1 = new String();\n s1.toString = Boolean.prototype.toString;\n var v1 = s1.toString(); \n $ERROR('#1: Boolean.prototype.toString on not a Boolean object should throw TypeError');\n}\ncatch(e){\n if(!(e instanceof TypeError)){\n $ERROR('#1: Boolean.prototype.toString on not a Boolean object should throw TypeError, not '+e);\n }\n}\n\n//CHECK#2\ntry{\n var s2 = new String();\n s2.myToString = Boolean.prototype.toString;\n var v2 = s2.myToString(); \n $ERROR('#2: Boolean.prototype.toString on not a Boolean object should throw TypeError');\n}\ncatch(e){\n if(!(e instanceof TypeError)){\n $ERROR('#2: Boolean.prototype.toString on not a Boolean object should throw TypeError, not '+e);\n }\n}\n\n",
+ "id": "S15.6.4.2_A2_T1"
+ },
+ {
+ "section": "15.6.4.2",
+ "description": "transferring to the Number objects",
+ "test": "//CHECK#1\ntry{\n var s1 = new Number();\n s1.toString = Boolean.prototype.toString;\n var v1 = s1.toString(); \n $ERROR('#1: Boolean.prototype.toString on not a Boolean object should throw TypeError');\n}\ncatch(e){\n if(!(e instanceof TypeError)){\n $ERROR('#1: Boolean.prototype.toString on not a Boolean object should throw TypeError, not '+e);\n }\n}\n\n//CHECK#1\ntry{\n var s2 = new Number();\n s2.myToString = Boolean.prototype.toString;\n var v2 = s2.myToString(); \n $ERROR('#2: Boolean.prototype.toString on not a Boolean object should throw TypeError');\n}\ncatch(e){\n if(!(e instanceof TypeError)){\n $ERROR('#2: Boolean.prototype.toString on not a Boolean object should throw TypeError, not '+e);\n }\n}\n\n",
+ "id": "S15.6.4.2_A2_T2"
+ },
+ {
+ "section": "15.6.4.2",
+ "description": "transferring to the Date objects",
+ "test": "//CHECK#1\ntry{\n var s1 = new Date();\n s1.toString = Boolean.prototype.toString;\n var v1 = s1.toString(); \n $ERROR('#1: Boolean.prototype.toString on not a Boolean object should throw TypeError');\n}\ncatch(e){\n if(!(e instanceof TypeError)){\n $ERROR('#1: Boolean.prototype.toString on not a Boolean object should throw TypeError, not '+e);\n }\n}\n\n//CHECK#1\ntry{\n var s2 = new Date();\n s2.myToString = Boolean.prototype.toString;\n var v2 = s2.myToString(); \n $ERROR('#2: Boolean.prototype.toString on not a Boolean object should throw TypeError');\n}\ncatch(e){\n if(!(e instanceof TypeError)){\n $ERROR('#2: Boolean.prototype.toString on not a Boolean object should throw TypeError, not '+e);\n }\n}\n\n",
+ "id": "S15.6.4.2_A2_T3"
+ },
+ {
+ "section": "15.6.4.2",
+ "description": "transferring to the Object objects",
+ "test": "//CHECK#1\ntry{\n var s1 = new Object();\n s1.toString = Boolean.prototype.toString;\n var v1 = s1.toString(); \n $ERROR('#1: Boolean.prototype.toString on not a Boolean object should throw TypeError');\n}\ncatch(e){\n if(!(e instanceof TypeError)){\n $ERROR('#1: Boolean.prototype.toString on not a Boolean object should throw TypeError, not '+e);\n }\n}\n\n//CHECK#1\ntry{\n var s2 = new Object();\n s2.myToString = Boolean.prototype.toString;\n var v2 = s2.myToString(); \n $ERROR('#2: Boolean.prototype.toString on not a Boolean object should throw TypeError');\n}\ncatch(e){\n if(!(e instanceof TypeError)){\n $ERROR('#2: Boolean.prototype.toString on not a Boolean object should throw TypeError, not '+e);\n }\n}\n\n",
+ "id": "S15.6.4.2_A2_T4"
+ },
+ {
+ "section": "15.6.4.2",
+ "description": "transferring to the other objects",
+ "test": "//CHECK#1\ntry{\n var s1 = {x: 1};\n s1.toString = Boolean.prototype.toString;\n var v1 = s1.toString(); \n $ERROR('#1: Boolean.prototype.toString on not a Boolean object should throw TypeError');\n}\ncatch(e){\n if(!(e instanceof TypeError)){\n $ERROR('#1: Boolean.prototype.toString on not a Boolean object should throw TypeError, not '+e);\n }\n}\n\n//CHECK#1\ntry{\n var s2 = {x: 1};\n s2.myToString = Boolean.prototype.toString;\n var v2 = s2.myToString(); \n $ERROR('#2: Boolean.prototype.toString on not a Boolean object should throw TypeError');\n}\ncatch(e){\n if(!(e instanceof TypeError)){\n $ERROR('#2: Boolean.prototype.toString on not a Boolean object should throw TypeError, not '+e);\n }\n}\n\n",
+ "id": "S15.6.4.2_A2_T5"
+ },
+ {
+ "section": "15.6.4.3",
+ "description": "no arguments",
+ "test": "//CHECK#1\nif(Boolean.prototype.valueOf() !== false){\n $ERROR('#1: Boolean.prototype.valueOf() === false');\n}\n\n//CHECK#2\nif((new Boolean()).valueOf() !== false){\n $ERROR('#2: (new Boolean()).valueOf() === false');\n}\n\n//CHECK#3\nif((new Boolean(0)).valueOf() !== false){\n $ERROR('#3: (new Boolean(0)).valueOf() === false');\n}\n\n//CHECK#4\nif((new Boolean(-1)).valueOf() !== true){\n $ERROR('#4: (new Boolean(-1)).valueOf() === true');\n}\n\n//CHECK#5\nif((new Boolean(1)).valueOf() !== true){\n $ERROR('#5: (new Boolean(1)).valueOf() === true');\n}\n\n//CHECK#6\nif((new Boolean(new Object())).valueOf() !== true){\n $ERROR('#6: (new Boolean(new Object())).valueOf() === true');\n}\n\n",
+ "id": "S15.6.4.3_A1_T1"
+ },
+ {
+ "section": "15.6.4.3",
+ "description": "calling with argument",
+ "test": "//CHECK#1\nif(Boolean.prototype.valueOf(true) !== false){\n $ERROR('#1: Boolean.prototype.valueOf(true) === false');\n}\n\n//CHECK#2\nif((new Boolean()).valueOf(true) !== false){\n $ERROR('#2: (new Boolean()).valueOf(true) === false');\n}\n\n//CHECK#3\nif((new Boolean(0)).valueOf(true) !== false){\n $ERROR('#3: (new Boolean(0)).valueOf(true) === false');\n}\n\n//CHECK#4\nif((new Boolean(-1)).valueOf(false) !== true){\n $ERROR('#4: (new Boolean(-1)).valueOf(false) === true');\n}\n\n//CHECK#5\nif((new Boolean(1)).valueOf(false) !== true){\n $ERROR('#5: (new Boolean(1)).valueOf(false) === true');\n}\n\n//CHECK#6\nif((new Boolean(new Object())).valueOf(false) !== true){\n $ERROR('#6: (new Boolean(new Object())).valueOf(false) === true');\n}\n\n",
+ "id": "S15.6.4.3_A1_T2"
+ },
+ {
+ "section": "15.6.4.3",
+ "description": "transferring to the String objects",
+ "test": "//CHECK#1\ntry{\n var s1 = new String();\n s1.valueOf = Boolean.prototype.valueOf;\n var v1 = s1.valueOf(); \n $ERROR('#1: Boolean.prototype.valueOf on not a Boolean object should throw TypeError');\n}\ncatch(e){\n if(!(e instanceof TypeError)){\n $ERROR('#1: Boolean.prototype.valueOf on not a Boolean object should throw TypeError, not '+e);\n }\n}\n\n//CHECK#1\ntry{\n var s2 = new String();\n s2.myValueOf = Boolean.prototype.valueOf;\n var v2 = s2.myValueOf(); \n $ERROR('#2: Boolean.prototype.valueOf on not a Boolean object should throw TypeError');\n}\ncatch(e){\n if(!(e instanceof TypeError)){\n $ERROR('#2: Boolean.prototype.valueOf on not a Boolean object should throw TypeError, not '+e);\n }\n}\n\n",
+ "id": "S15.6.4.3_A2_T1"
+ },
+ {
+ "section": "15.6.4.3",
+ "description": "transferring to the Number objects",
+ "test": "//CHECK#1\ntry{\n var s1 = new Number();\n s1.valueOf = Boolean.prototype.valueOf;\n var v1 = s1.valueOf(); \n $ERROR('#1: Boolean.prototype.valueOf on not a Boolean object should throw TypeError');\n}\ncatch(e){\n if(!(e instanceof TypeError)){\n $ERROR('#1: Boolean.prototype.valueOf on not a Boolean object should throw TypeError, not '+e);\n }\n}\n\n//CHECK#1\ntry{\n var s2 = new Number();\n s2.myValueOf = Boolean.prototype.valueOf;\n var v2 = s2.myValueOf(); \n $ERROR('#2: Boolean.prototype.valueOf on not a Boolean object should throw TypeError');\n}\ncatch(e){\n if(!(e instanceof TypeError)){\n $ERROR('#2: Boolean.prototype.valueOf on not a Boolean object should throw TypeError, not '+e);\n }\n}\n\n",
+ "id": "S15.6.4.3_A2_T2"
+ },
+ {
+ "section": "15.6.4.3",
+ "description": "transferring to the Date objects",
+ "test": "//CHECK#1\ntry{\n var s1 = new Date();\n s1.valueOf = Boolean.prototype.valueOf;\n var v1 = s1.valueOf(); \n $ERROR('#1: Boolean.prototype.valueOf on not a Boolean object should throw TypeError');\n}\ncatch(e){\n if(!(e instanceof TypeError)){\n $ERROR('#1: Boolean.prototype.valueOf on not a Boolean object should throw TypeError, not '+e);\n }\n}\n\n//CHECK#1\ntry{\n var s2 = new Date();\n s2.myValueOf = Boolean.prototype.valueOf;\n var v2 = s2.myValueOf(); \n $ERROR('#2: Boolean.prototype.valueOf on not a Boolean object should throw TypeError');\n}\ncatch(e){\n if(!(e instanceof TypeError)){\n $ERROR('#2: Boolean.prototype.valueOf on not a Boolean object should throw TypeError, not '+e);\n }\n}\n\n",
+ "id": "S15.6.4.3_A2_T3"
+ },
+ {
+ "section": "15.6.4.3",
+ "description": "transferring to the Object objects",
+ "test": "//CHECK#1\ntry{\n var s1 = new Object();\n s1.valueOf = Boolean.prototype.valueOf;\n var v1 = s1.valueOf(); \n $ERROR('#1: Boolean.prototype.valueOf on not a Boolean object should throw TypeError');\n}\ncatch(e){\n if(!(e instanceof TypeError)){\n $ERROR('#1: Boolean.prototype.valueOf on not a Boolean object should throw TypeError, not '+e);\n }\n}\n\n//CHECK#1\ntry{\n var s2 = new Object();\n s2.myValueOf = Boolean.prototype.valueOf;\n var v2 = s2.myValueOf(); \n $ERROR('#2: Boolean.prototype.valueOf on not a Boolean object should throw TypeError');\n}\ncatch(e){\n if(!(e instanceof TypeError)){\n $ERROR('#2: Boolean.prototype.valueOf on not a Boolean object should throw TypeError, not '+e);\n }\n}\n\n",
+ "id": "S15.6.4.3_A2_T4"
+ },
+ {
+ "section": "15.6.4.3",
+ "description": "transferring to the other objects",
+ "test": "//CHECK#1\ntry{\n var s1 = {x: 1};\n s1.valueOf = Boolean.prototype.valueOf;\n var v1 = s1.valueOf(); \n $ERROR('#1: Boolean.prototype.valueOf on not a Boolean object should throw TypeError');\n}\ncatch(e){\n if(!(e instanceof TypeError)){\n $ERROR('#1: Boolean.prototype.valueOf on not a Boolean object should throw TypeError, not '+e);\n }\n}\n\n//CHECK#1\ntry{\n var s2 = {x: 1};\n s2.myValueOf = Boolean.prototype.valueOf;\n var v2 = s2.myValueOf(); \n $ERROR('#2: Boolean.prototype.valueOf on not a Boolean object should throw TypeError');\n}\ncatch(e){\n if(!(e instanceof TypeError)){\n $ERROR('#2: Boolean.prototype.valueOf on not a Boolean object should throw TypeError, not '+e);\n }\n}\n\n",
+ "id": "S15.6.4.3_A2_T5"
+ },
+ {
+ "section": "15.6.4",
+ "description": "Checking type and value of Boolean.prototype",
+ "test": "//CHECK#1\nif (typeof Boolean.prototype !== \"object\") {\n $ERROR('#1: typeof Boolean.prototype === \"object\"');\n}\n\n//CHECK#2\nif (Boolean.prototype != false) {\n $ERROR('#2: Boolean.prototype == false');\n}\n\ndelete Boolean.prototype.toString;\n\nif (Boolean.prototype.toString() !== \"[object Boolean]\") {\n $ERROR('#3: The [[Class]] property of the Boolean prototype object is set to \"Boolean\"');\n}\n",
+ "id": "S15.6.4_A1"
+ },
+ {
+ "section": "15.6.4",
+ "description": "Checking Object.prototype.isPrototypeOf(Boolean.prototype)",
+ "test": "//CHECK#1\nif (!Object.prototype.isPrototypeOf(Boolean.prototype)) {\n $ERROR('#1: Object prototype object is the prototype of Boolean prototype object');\n}\n",
+ "id": "S15.6.4_A2"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.7.1_The_Number_Constructor_Called_as_a_Function.json b/website/resources/scripts/testcases2/15.7.1_The_Number_Constructor_Called_as_a_Function.json
new file mode 100644
index 000000000..14481b2ac
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.7.1_The_Number_Constructor_Called_as_a_Function.json
@@ -0,0 +1,20 @@
+{
+ "testCollection": {
+ "name": "15.7.1_The_Number_Constructor_Called_as_a_Function",
+ "numTests": 2,
+ "tests": [
+ {
+ "section": "15.7.1.1",
+ "description": "Used values \"10\", 10, new String(\"10\"), new Object(10) and \"abc\"",
+ "test": "//CHECK#1\nif( typeof Number(\"10\") !== \"number\" ) {\n $ERROR('#1: typeof Number(\"10\") should be \"number\", actual is \"'+typeof Number(\"10\")+'\"');\n}\n\n//CHECK#2\nif( typeof Number(10) !== \"number\" ) {\n $ERROR('#2: typeof Number(10) should be \"number\", actual is \"'+typeof Number(10)+'\"');\n}\n\n//CHECK#3\nif( typeof Number(new String(\"10\")) !== \"number\" ) {\n $ERROR('#3: typeof Number(new String(\"10\")) should be \"number\", actual is \"'+typeof Number(new String(\"10\"))+'\"');\n}\n\n//CHECK#4\nif( typeof Number(new Object(10)) !== \"number\" ) {\n $ERROR('#4: typeof Number(new Object(10)) should be \"number\", actual is \"'+typeof Number(new Object(10))+'\"');\n}\n\n//CHECK #5\nif( typeof Number(\"abc\") !== \"number\" ) {\n $ERROR('#5: typeof Number(\"abc\") should be \"number\", actual is \"'+typeof Number(\"abc\")+'\"');\n}\n\n//CHECK #6\nif( !isNaN(Number(\"abc\"))) {\n\t$ERROR('#6: Number(\"abc\")) should be NaN');\n}\n",
+ "id": "S15.7.1.1_A1"
+ },
+ {
+ "section": "15.7.1.1",
+ "description": "Call Number() and check result",
+ "test": "//CHECK#1\nif( typeof Number() !== \"number\" ) {\n $ERROR('#1: typeof Number() should be \"number\", actual is \"'+typeof Number()+'\"');\n}\n\n//CHECK#2\nif( Number() !== 0 ) {\n $ERROR('#2: Number() === 0, actual is '+Number());\n} else if( 1/Number() !== Number.POSITIVE_INFINITY ) {\n $ERROR('#2: Number() === +0, actual is '+Number());\n}\n\n",
+ "id": "S15.7.1.1_A2"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.7.2_The_Number_Constructor.json b/website/resources/scripts/testcases2/15.7.2_The_Number_Constructor.json
new file mode 100644
index 000000000..13d117cc5
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.7.2_The_Number_Constructor.json
@@ -0,0 +1,32 @@
+{
+ "testCollection": {
+ "name": "15.7.2_The_Number_Constructor",
+ "numTests": 4,
+ "tests": [
+ {
+ "section": "15.7.2.1",
+ "description": "Checking type of the newly created object and it value",
+ "test": "//CHECK#1\nif (typeof new Number() !== \"object\") {\n $ERROR(\"#1: typeof new Number() === 'object'\");\n}\n\n//CHECK#2\nif (new Number() === undefined) {\n $ERROR(\"#2: new Number() should not be undefined\");\n}\n\n//CHECK#3\nvar x3 = new Number();\nif(typeof x3 !== \"object\"){\n $ERROR(\"#3: typeof new Number() === 'object'\");\n}\n\n//CHECK#4\nvar x4 = new Number();\nif(x4 === undefined){\n $ERROR(\"#4: new Number() should not be undefined\");\n}\n\n//CHECK#5\nif (typeof new Number(10) !== \"object\") {\n $ERROR(\"#5: typeof new Number(10) === 'object'\");\n}\n\n//CHECK#6\nif (new Number(10) === undefined) {\n $ERROR(\"#6: new Number(10) should not be undefined\");\n}\n\n//CHECK#7\nvar x7 = new Number(10);\nif(typeof x7 !== \"object\"){\n $ERROR(\"#7: typeof new Number(10) === 'object'\");\n}\n\n//CHECK#8\nvar x8 = new Number(10);\nif(x8 === undefined){\n $ERROR(\"#8: new Number(10) should not be undefined\");\n}\n",
+ "id": "S15.7.2.1_A1"
+ },
+ {
+ "section": "15.7.2.1",
+ "description": "Checking prototype property of the newly created objects",
+ "test": "// CHECK#1\nvar x1 = new Number(1);\nif (typeof x1.constructor.prototype !== \"object\") {\n $ERROR('#1: typeof x1.constructor.prototype === \"object\"');\n}\n\n//CHECK#2\nvar x2 = new Number(2);\nif (!Number.prototype.isPrototypeOf(x2)) {\n $ERROR('#2: Number.prototype.isPrototypeOf(x2)');\n}\n\n//CHECK#3\nvar x3 = new Number(3);\nif (Number.prototype !== x3.constructor.prototype) {\n $ERROR('#3: Number.prototype === x3.constructor.prototype');\n}\n",
+ "id": "S15.7.2.1_A2"
+ },
+ {
+ "section": "15.7.2.1",
+ "description": "Checking value of the newly created object",
+ "test": "//CHECK#1\nvar x1 = new Number(1);\nif (x1.valueOf() !== 1) {\n $ERROR('#1: var x1 = new Number(1); x1.valueOf() === 1');\n}\n\n//CHECK#2\nvar x2 = new Number();\nif (x2.valueOf() !== 0) {\n $ERROR('#2.1: var x2 = new Number(); x2.valueOf() === 0');\n} else if( 1/x2.valueOf() !== Number.POSITIVE_INFINITY ) {\n $ERROR('#2.2: var x2 = new Number(); x2.valueOf() === +0');\n}\n",
+ "id": "S15.7.2.1_A3"
+ },
+ {
+ "section": "15.7.2.1",
+ "description": "For testing toString function is used",
+ "test": "delete Number.prototype.toString;\n\nvar obj = new Number();\n\n//CHECK#1\nif (obj.toString() !== \"[object Number]\") {\n $ERROR('#1: The [[Class]] property of the newly constructed object is set to \"Number\"');\n}\n",
+ "id": "S15.7.2.1_A4"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.7.3.1.json b/website/resources/scripts/testcases2/15.7.3.1.json
new file mode 100644
index 000000000..4db6e6826
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.7.3.1.json
@@ -0,0 +1,22 @@
+{
+ "testCollection": {
+ "name": "15.7.3.1",
+ "numTests": 2,
+ "tests": [
+ {
+ "id": "15.7.3.1-1",
+ "path": "TestCases/chapter15/15.7/15.7.3/15.7.3.1/15.7.3.1-1.js",
+ "description": "Number.prototype is a data property with default attribute values (false)",
+ "test": "assertTrue((function testcase() {\n var d = Object.getOwnPropertyDescriptor(Number, 'prototype');\n \n if (d.writable === false &&\n d.enumerable === false &&\n d.configurable === false) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getOwnPropertyDescriptor))"
+ },
+ {
+ "id": "15.7.3.1-2",
+ "path": "TestCases/chapter15/15.7/15.7.3/15.7.3.1/15.7.3.1-2.js",
+ "description": "Number.prototype, initial value is the Number prototype object",
+ "test": "assertTrue((function testcase() {\n // assume that Number.prototype has not been modified.\n return Object.getPrototypeOf(new Number(42))===Number.prototype;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getPrototypeOf))"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.7.3.1_Number.prototype.json b/website/resources/scripts/testcases2/15.7.3.1_Number.prototype.json
new file mode 100644
index 000000000..e73500660
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.7.3.1_Number.prototype.json
@@ -0,0 +1,46 @@
+{
+ "testCollection": {
+ "name": "15.7.3.1_Number.prototype",
+ "numTests": 6,
+ "tests": [
+ {
+ "section": "15.7.3.1",
+ "description": "Checking if varying the Number.prototype property fails",
+ "test": "//CHECK#1\nvar x = Number.prototype;\nNumber.prototype = 1;\nif (Number.prototype !== x) {\n $ERROR('#1: The Number.prototype property has the attributes ReadOnly');\n}\n",
+ "id": "S15.7.3.1_A1_T1"
+ },
+ {
+ "section": "15.7.3.1",
+ "description": "Checking if deleting the Number.prototype property fails",
+ "strict_mode_negative": "",
+ "test": "// CHECK#1\nif (delete Number.prototype !== false) {\n $ERROR('#1: The Number.prototype property has the attributes DontDelete');\n}\n\nif (!Number.hasOwnProperty('prototype')) {\n $FAIL('#2: The Number.prototype property has the attributes DontDelete');\n}\n",
+ "id": "S15.7.3.1_A1_T2",
+ "strict_only": ""
+ },
+ {
+ "section": "15.7.3.1",
+ "description": "Checking if enumerating the Number.prototype property fails",
+ "test": "if (Number.propertyIsEnumerable('prototype')) {\n $ERROR('#1: The Number.prototype property has the attribute DontEnum');\n}\n\nfor(x in Number) {\n if(x === \"prototype\") {\n $ERROR('#2: The Number.prototype has the attribute DontEnum');\n }\n}\n",
+ "id": "S15.7.3.1_A1_T3"
+ },
+ {
+ "section": "15.7.3.1",
+ "description": "Checking type of Number.prototype property - test based on\ndeleting Number.prototype.toString",
+ "test": "//CHECK#1\nif (typeof Number.prototype !== \"object\") {\n $ERROR('#1: typeof Number.prototype === \"object\"');\n}\n\ndelete Number.prototype.toString;\n\nif (Number.prototype.toString() !== \"[object Number]\") {\n $ERROR('#3: The [[Class]] property of the Number prototype object is set to \"Number\"');\n}\n",
+ "id": "S15.7.3.1_A2_T1"
+ },
+ {
+ "section": "15.7.3.1",
+ "description": "Checking type of Number.prototype property - test based on\noverwriting of Number.prototype.toString",
+ "test": "//CHECK#1\nif (typeof Number.prototype !== \"object\") {\n $ERROR('#1: typeof Number.prototype === \"object\"');\n}\n\nNumber.prototype.toString = Object.prototype.toString;\n\nif (Number.prototype.toString() !== \"[object Number]\") {\n $ERROR('#3: The [[Class]] property of the Number prototype object is set to \"Number\"');\n}\n",
+ "id": "S15.7.3.1_A2_T2"
+ },
+ {
+ "section": "15.7.3.1",
+ "description": "Checking value of Number.prototype property",
+ "test": "//CHECK#1\nif (Number.prototype != 0) {\n $ERROR('#2: Number.prototype == +0');\n} else if( 1/Number.prototype != Number.POSITIVE_INFINITY){\n $ERROR('#2: Number.prototype == +0');\n}\n",
+ "id": "S15.7.3.1_A3"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.7.3.2_Number.MAX_VALUE.json b/website/resources/scripts/testcases2/15.7.3.2_Number.MAX_VALUE.json
new file mode 100644
index 000000000..a3cb9b7d1
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.7.3.2_Number.MAX_VALUE.json
@@ -0,0 +1,34 @@
+{
+ "testCollection": {
+ "name": "15.7.3.2_Number.MAX_VALUE",
+ "numTests": 4,
+ "tests": [
+ {
+ "section": "15.7.3.2",
+ "description": "Checking Number.MAX_VALUE value",
+ "test": "$INCLUDE(\"math_precision.js\");\n$INCLUDE(\"math_isequal.js\");\n\n// CHECK#1\nif (!isEqual(Number.MAX_VALUE, 1.7976931348623157e308)) {\n $ERROR('#1: Number.MAX_VALUE approximately equal to 1.7976931348623157e308');\n}\n",
+ "id": "S15.7.3.2_A1"
+ },
+ {
+ "section": "15.7.3.2",
+ "description": "Checking if varying Number.MAX_VALUE fails",
+ "test": "// CHECK#1\nvar x = Number.MAX_VALUE;\nNumber.MAX_VALUE = 1;\nif (Number.MAX_VALUE !== x) {\n $ERROR('#1: x = Number.MAX_VALUE; Number.MAX_VALUE = 1; Number.MAX_VALUE === x');\n}\n",
+ "id": "S15.7.3.2_A2"
+ },
+ {
+ "section": "15.7.3.2",
+ "description": "Checking if deleting Number.MAX_VALUE fails",
+ "strict_mode_negative": "",
+ "test": "// CHECK#1\nif (delete Number.MAX_VALUE !== false) {\n $ERROR('#1: delete Number.MAX_VALUE === false');\n}\n",
+ "id": "S15.7.3.2_A3",
+ "strict_only": ""
+ },
+ {
+ "section": "15.7.3.2",
+ "description": "Checking if enumerating Number.MAX_VALUE fails",
+ "test": "//CHECK#1\nfor(var x in Number) {\n if(x === \"MAX_VALUE\") {\n $ERROR('#1: Number.MAX_VALUE has the attribute DontEnum');\n }\n}\n\nif (Number.propertyIsEnumerable('MAX_VALUE')) {\n $ERROR('#2: Number.MAX_VALUE has the attribute DontEnum');\n}\n",
+ "id": "S15.7.3.2_A4"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.7.3.3_Number.MIN_VALUE.json b/website/resources/scripts/testcases2/15.7.3.3_Number.MIN_VALUE.json
new file mode 100644
index 000000000..3c08f6dc3
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.7.3.3_Number.MIN_VALUE.json
@@ -0,0 +1,34 @@
+{
+ "testCollection": {
+ "name": "15.7.3.3_Number.MIN_VALUE",
+ "numTests": 4,
+ "tests": [
+ {
+ "section": "15.7.3.3",
+ "description": "Checking Number.MIN_VALUE value",
+ "test": "$INCLUDE(\"math_precision.js\");\n$INCLUDE(\"math_isequal.js\");\n\n// CHECK#1\nif (!isEqual(Number.MIN_VALUE, 5e-324)) {\n $ERROR('#1: Number.MIN_VALUE approximately equal to 5e-324');\n}\n",
+ "id": "S15.7.3.3_A1"
+ },
+ {
+ "section": "15.7.3.3",
+ "description": "Checking if varying Number.MIN_VALUE fails",
+ "test": "// CHECK#1\nvar x = Number.MIN_VALUE;\nNumber.MIN_VALUE = 1;\nif (Number.MIN_VALUE !== x) {\n $ERROR('#1: x = Number.MIN_VALUE; Number.MIN_VALUE = 1; Number.MIN_VALUE === x');\n}\n",
+ "id": "S15.7.3.3_A2"
+ },
+ {
+ "section": "15.7.3.3",
+ "description": "Checking if deleting Number.MIN_VALUE fails",
+ "strict_mode_negative": "",
+ "test": "//CHECK#1\nif (delete Number.MIN_VALUE !== false) {\n $ERROR('#1: delete Number.MIN_VALUE === false');\n}\n",
+ "id": "S15.7.3.3_A3",
+ "strict_only": ""
+ },
+ {
+ "section": "15.7.3.3",
+ "description": "Checking if enumerating Number.MIN_VALUE fails",
+ "test": "//CHECK#1\nfor(var x in Number) {\n if(x === \"MIN_VALUE\") {\n $ERROR('#1: Number.MIN_VALUE has the attribute DontEnum');\n }\n}\n\nif (Number.propertyIsEnumerable('MIN_VALUE')) {\n $ERROR('#2: Number.MIN_VALUE has the attribute DontEnum');\n}\n",
+ "id": "S15.7.3.3_A4"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.7.3.4_Number.NaN.json b/website/resources/scripts/testcases2/15.7.3.4_Number.NaN.json
new file mode 100644
index 000000000..65ba95aff
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.7.3.4_Number.NaN.json
@@ -0,0 +1,34 @@
+{
+ "testCollection": {
+ "name": "15.7.3.4_Number.NaN",
+ "numTests": 4,
+ "tests": [
+ {
+ "section": "15.7.3.4",
+ "description": "Checking isNaN(Number.NaN)",
+ "test": "// CHECK#1\nif (isNaN(Number.NaN) !== true) {\n $ERROR('#1: Number.NaN === Not-a-Number');\n}\n",
+ "id": "S15.7.3.4_A1"
+ },
+ {
+ "section": "15.7.3.4",
+ "description": "Checking if varying Number.NaN fails",
+ "test": "// CHECK#1\nNumber.NaN = 1;\nif (isNaN(Number.NaN) !== true) {\n $ERROR('#1: Number.NaN = 1; Number.NaN === Not-a-Number');\n}\n",
+ "id": "S15.7.3.4_A2"
+ },
+ {
+ "section": "15.7.3.4",
+ "description": "Checking if deleting Number.NaN fails",
+ "strict_mode_negative": "",
+ "test": "// CHECK#1\nif (delete Number.NaN !== false) {\n $ERROR('#1: delete Number.NaN === false');\n}\n",
+ "id": "S15.7.3.4_A3",
+ "strict_only": ""
+ },
+ {
+ "section": "15.7.3.4",
+ "description": "Checking if enumerating Number.NaN fails",
+ "test": "//CHECK#1\nfor(var x in Number) {\n if(x === \"NaN\") {\n $ERROR('#1: Number.NaN has the attribute DontEnum');\n }\n}\n\nif (Number.propertyIsEnumerable('NaN')) {\n $ERROR('#2: Number.NaN has the attribute DontEnum');\n}\n",
+ "id": "S15.7.3.4_A4"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.7.3.5_Number.NEGATIVE_INFINITY.json b/website/resources/scripts/testcases2/15.7.3.5_Number.NEGATIVE_INFINITY.json
new file mode 100644
index 000000000..22b1f85f2
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.7.3.5_Number.NEGATIVE_INFINITY.json
@@ -0,0 +1,34 @@
+{
+ "testCollection": {
+ "name": "15.7.3.5_Number.NEGATIVE_INFINITY",
+ "numTests": 4,
+ "tests": [
+ {
+ "section": "15.7.3.5",
+ "description": "Checking sign and finiteness of Number.NEGATIVE_INFINITY",
+ "test": "// CHECK#1\nif (isFinite(Number.NEGATIVE_INFINITY) !== false) {\n $ERROR('#1: Number.NEGATIVE_INFINITY === Not-a-Finite');\n} else {\n if ((Number.NEGATIVE_INFINITY < 0) !== true) {\n $ERROR('#1: Number.NEGATIVE_INFINITY === -Infinity');\n }\n}\n",
+ "id": "S15.7.3.5_A1"
+ },
+ {
+ "section": "15.7.3.5",
+ "description": "Checking if varying Number.NEGATIVE_INFINITY fails",
+ "test": "// CHECK#1\nNumber.NEGATIVE_INFINITY = 1;\nif (isFinite(Number.NEGATIVE_INFINITY)) {\n $ERROR('#1: Number.NEGATIVE_INFINITY = 1; Number.NEGATIVE_INFINITY === -Infinity');\n} else { \n if (Number.NEGATIVE_INFINITY >= 0) {\n $ERROR('#1: Number.NEGATIVE_INFINITY = 1; Number.NEGATIVE_INFINITY === -Infinity');\n }\n}\n",
+ "id": "S15.7.3.5_A2"
+ },
+ {
+ "section": "15.7.3.5",
+ "description": "Checking if deleting Number.NEGATIVE_INFINITY fails",
+ "strict_mode_negative": "",
+ "test": "// CHECK#1\nif (delete Number.NEGATIVE_INFINITY !== false) {\n $ERROR('#1: delete Number.NEGATIVE_INFINITY === false');\n}\n",
+ "id": "S15.7.3.5_A3",
+ "strict_only": ""
+ },
+ {
+ "section": "15.7.3.5",
+ "description": "Checking if enumerating Number.NEGATIVE_INFINITY fails",
+ "test": "//CHECK#1\nfor(var x in Number) {\n if(x === \"NEGATIVE_INFINITY\") {\n $ERROR('#1: Number.NEGATIVE_INFINITY has the attribute DontEnum');\n }\n}\n\nif (Number.propertyIsEnumerable('NEGATIVE_INFINITY')) {\n $ERROR('#2: Number.NEGATIVE_INFINITY has the attribute DontEnum');\n}\n",
+ "id": "S15.7.3.5_A4"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.7.3.6_Number.POSITIVE_INFINITY.json b/website/resources/scripts/testcases2/15.7.3.6_Number.POSITIVE_INFINITY.json
new file mode 100644
index 000000000..93251754b
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.7.3.6_Number.POSITIVE_INFINITY.json
@@ -0,0 +1,34 @@
+{
+ "testCollection": {
+ "name": "15.7.3.6_Number.POSITIVE_INFINITY",
+ "numTests": 4,
+ "tests": [
+ {
+ "section": "15.7.3.6",
+ "description": "Checking sign and finiteness of Number.POSITIVE_INFINITY",
+ "test": "// CHECK#1\nif (isFinite(Number.POSITIVE_INFINITY) !== false) {\n $ERROR('#1: Number.POSITIVE_INFINITY === Not-a-Finite');\n} else {\n if ((Number.POSITIVE_INFINITY > 0) !== true) {\n $ERROR('#1: Number.POSITIVE_INFINITY === +Infinity');\n }\n}\n",
+ "id": "S15.7.3.6_A1"
+ },
+ {
+ "section": "15.7.3.6",
+ "description": "Checking if varying Number.POSITIVE_INFINITY fails",
+ "test": "// CHECK#1\nNumber.POSITIVE_INFINITY = 1;\nif (isFinite(Number.POSITIVE_INFINITY)) {\n $ERROR('#1: Number.POSITIVE_INFINITY = 1; Number.POSITIVE_INFINITY === +Infinity');\n} else { \n if (Number.POSITIVE_INFINITY <= 0) {\n $ERROR('#1: Number.POSITIVE_INFINITY = 1; Number.POSITIVE_INFINITY === +Infinity');\n }\n}\n",
+ "id": "S15.7.3.6_A2"
+ },
+ {
+ "section": "15.7.3.6",
+ "description": "Checking if deleting Number.POSITIVE_INFINITY fails",
+ "strict_mode_negative": "",
+ "test": "// CHECK#1\nif (delete Number.POSITIVE_INFINITY !== false) {\n $ERROR('#1: delete Number.POSITIVE_INFINITY === false');\n}\n",
+ "id": "S15.7.3.6_A3",
+ "strict_only": ""
+ },
+ {
+ "section": "15.7.3.6",
+ "description": "Checking if enumerating Number.POSITIVE_INFINITY fails",
+ "test": "//CHECK#1\nfor(var x in Number) {\n if(x === \"POSITIVE_INFINITY\") {\n $ERROR('#1: Number.POSITIVE_INFINITY has the attribute DontEnum');\n }\n}\n\nif (Number.propertyIsEnumerable('POSITIVE_INFINITY')) {\n $ERROR('#2: Number.POSITIVE_INFINITY has the attribute DontEnum');\n}\n",
+ "id": "S15.7.3.6_A4"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.7.3.json b/website/resources/scripts/testcases2/15.7.3.json
new file mode 100644
index 000000000..bd8b8930d
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.7.3.json
@@ -0,0 +1,21 @@
+{
+ "testCollection": {
+ "name": "15.7.3",
+ "numTests": 2,
+ "tests": [
+ {
+ "id": "15.7.3-1",
+ "path": "TestCases/chapter15/15.7/15.7.3/15.7.3-1.js",
+ "description": "Number constructor - [[Prototype]] is the Function prototype object",
+ "test": "assertTrue((Function.prototype.isPrototypeOf(Number) === true));\n"
+ },
+ {
+ "id": "15.7.3-2",
+ "path": "TestCases/chapter15/15.7/15.7.3/15.7.3-2.js",
+ "description": "Number constructor - [[Prototype]] is the Function prototype object (using getPrototypeOf)",
+ "test": "assertTrue((function testcase() {\n var p = Object.getPrototypeOf(Number);\n if (p === Function.prototype) {\n return true;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getPrototypeOf))"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.7.3_Properties_of_Number_Constructor.json b/website/resources/scripts/testcases2/15.7.3_Properties_of_Number_Constructor.json
new file mode 100644
index 000000000..8b125b153
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.7.3_Properties_of_Number_Constructor.json
@@ -0,0 +1,56 @@
+{
+ "testCollection": {
+ "name": "15.7.3_Properties_of_Number_Constructor",
+ "numTests": 8,
+ "tests": [
+ {
+ "section": "15.7.3",
+ "description": "Checking existence of the property \"prototype\"",
+ "test": "if(!Number.hasOwnProperty(\"prototype\")){\n $ERROR('#1: The Number constructor has the property \"prototype\"');\n}\n\n",
+ "id": "S15.7.3_A1"
+ },
+ {
+ "section": "15.7.3",
+ "description": "Checking existence of the property \"MAX_VALUE\"",
+ "test": "if(!Number.hasOwnProperty(\"MAX_VALUE\")){\n $ERROR('#1: The Number constructor has the property \"MAX_VALUE\"');\n}\n\n",
+ "id": "S15.7.3_A2"
+ },
+ {
+ "section": "15.7.3",
+ "description": "Checking existence of the property \"MIN_VALUE\"",
+ "test": "if(!Number.hasOwnProperty(\"MIN_VALUE\")){\n $ERROR('#1: The Number constructor has the property \"MIN_VALUE\"');\n}\n\n",
+ "id": "S15.7.3_A3"
+ },
+ {
+ "section": "15.7.3",
+ "description": "Checking existence of the property \"NaN\"",
+ "test": "if(!Number.hasOwnProperty(\"NaN\")){\n $ERROR('#1: The Number constructor has the property \"NaN\"');\n}\n\n",
+ "id": "S15.7.3_A4"
+ },
+ {
+ "section": "15.7.3",
+ "description": "Checking existence of the property \"NEGATIVE_INFINITY\"",
+ "test": "if(!Number.hasOwnProperty(\"NEGATIVE_INFINITY\")){\n $ERROR('#1: The Number constructor has the property \"NEGATIVE_INFINITY\"');\n}\n\n",
+ "id": "S15.7.3_A5"
+ },
+ {
+ "section": "15.7.3",
+ "description": "Checking existence of the property \"POSITIVE_INFINITY\"",
+ "test": "if(!Number.hasOwnProperty(\"POSITIVE_INFINITY\")){\n $ERROR('#1: The Number constructor has the property \"POSITIVE_INFINITY\"');\n}\n\n",
+ "id": "S15.7.3_A6"
+ },
+ {
+ "section": "15.7.3",
+ "description": "Checking Function.prototype.isPrototypeOf(Number)",
+ "test": "//CHECK#1\nif (!(Function.prototype.isPrototypeOf(Number))) {\n $ERROR('#1: the value of the internal [[Prototype]] property of the Number constructor is the Function prototype object.');\n}\n",
+ "id": "S15.7.3_A7"
+ },
+ {
+ "section": "15.7.3",
+ "description": "Checking Number.length property",
+ "test": "//CHECK#1\nif (!Number.hasOwnProperty(\"length\")){\n $ERROR('#1: Number constructor has length property');\n}\n\n//CHECK#2\nif (Number.length !== 1) {\n $ERROR('#2: Number constructor length property value is 1');\n}\n",
+ "id": "S15.7.3_A8"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.7.4.1_Number.prototype.constructor.json b/website/resources/scripts/testcases2/15.7.4.1_Number.prototype.constructor.json
new file mode 100644
index 000000000..40a586e0c
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.7.4.1_Number.prototype.constructor.json
@@ -0,0 +1,14 @@
+{
+ "testCollection": {
+ "name": "15.7.4.1_Number.prototype.constructor",
+ "numTests": 1,
+ "tests": [
+ {
+ "section": "15.7.4.1",
+ "description": "Compare Number.prototype.constructor with Number",
+ "test": "//CHECK#1\nif(Number.prototype.constructor !== Number){\n $ERROR('#1: Number.prototype.constructor === Number');\n}\n\n",
+ "id": "S15.7.4.1_A1"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.7.4.2_Number.prototype.toString.json b/website/resources/scripts/testcases2/15.7.4.2_Number.prototype.toString.json
new file mode 100644
index 000000000..6904633c8
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.7.4.2_Number.prototype.toString.json
@@ -0,0 +1,284 @@
+{
+ "testCollection": {
+ "name": "15.7.4.2_Number.prototype.toString",
+ "numTests": 46,
+ "tests": [
+ {
+ "section": "15.7.4.2",
+ "description": "undefined radix",
+ "test": "//CHECK#1\nif(Number.prototype.toString() !== \"0\"){\n $ERROR('#1: Number.prototype.toString() === \"0\"');\n}\n\n//CHECK#2\nif((new Number()).toString() !== \"0\"){\n $ERROR('#2: (new Number()).toString() === \"0\"');\n}\n\n//CHECK#3\nif((new Number(0)).toString() !== \"0\"){\n $ERROR('#3: (new Number(0)).toString() === \"0\"');\n}\n\n//CHECK#4\nif((new Number(-1)).toString() !== \"-1\"){\n $ERROR('#4: (new Number(-1)).toString() === \"-1\"');\n}\n\n//CHECK#5\nif((new Number(1)).toString() !== \"1\"){\n $ERROR('#5: (new Number(1)).toString() === \"1\"');\n}\n\n//CHECK#6\nif((new Number(Number.NaN)).toString() !== \"NaN\"){\n $ERROR('#6: (new Number(Number.NaN)).toString() === \"NaN\"');\n}\n\n//CHECK#7\nif((new Number(Number.POSITIVE_INFINITY)).toString() !== \"Infinity\"){\n $ERROR('#7: (new Number(Number.POSITIVE_INFINITY)).toString() === \"Infinity\"');\n}\n\n//CHECK#8\nif((new Number(Number.NEGATIVE_INFINITY)).toString() !== \"-Infinity\"){\n $ERROR('#8: (new Number(Number.NEGATIVE_INFINITY)).toString() === \"-Infinity\"');\n}\n",
+ "id": "S15.7.4.2_A1_T01"
+ },
+ {
+ "section": "15.7.4.2",
+ "description": "radix is 10",
+ "test": "//CHECK#1\nif(Number.prototype.toString(10) !== \"0\"){\n $ERROR('#1: Number.prototype.toString(10) === \"0\"');\n}\n\n//CHECK#2\nif((new Number()).toString(10) !== \"0\"){\n $ERROR('#2: (new Number()).toString(10) === \"0\"');\n}\n\n//CHECK#3\nif((new Number(0)).toString(10) !== \"0\"){\n $ERROR('#3: (new Number(0)).toString(10) === \"0\"');\n}\n\n//CHECK#4\nif((new Number(-1)).toString(10) !== \"-1\"){\n $ERROR('#4: (new Number(-1)).toString(10) === \"-1\"');\n}\n\n//CHECK#5\nif((new Number(1)).toString(10) !== \"1\"){\n $ERROR('#5: (new Number(1)).toString(10) === \"1\"');\n}\n\n//CHECK#6\nif((new Number(Number.NaN)).toString(10) !== \"NaN\"){\n $ERROR('#6: (new Number(Number.NaN)).toString(10) === \"NaN\"');\n}\n\n//CHECK#7\nif((new Number(Number.POSITIVE_INFINITY)).toString(10) !== \"Infinity\"){\n $ERROR('#7: (new Number(Number.POSITIVE_INFINITY)).toString(10) === \"Infinity\"');\n}\n\n//CHECK#8\nif((new Number(Number.NEGATIVE_INFINITY)).toString(10) !== \"-Infinity\"){\n $ERROR('#8: (new Number(Number.NEGATIVE_INFINITY)).toString(10) === \"-Infinity\"');\n}\n",
+ "id": "S15.7.4.2_A1_T02"
+ },
+ {
+ "section": "15.7.4.2",
+ "description": "radix is undefined value",
+ "test": "//CHECK#1\nif(Number.prototype.toString(undefined) !== \"0\"){\n $ERROR('#1: Number.prototype.toString(undefined) === \"0\"');\n}\n\n//CHECK#2\nif((new Number()).toString(undefined) !== \"0\"){\n $ERROR('#2: (new Number()).toString(undefined) === \"0\"');\n}\n\n//CHECK#3\nif((new Number(0)).toString(undefined) !== \"0\"){\n $ERROR('#3: (new Number(0)).toString(undefined) === \"0\"');\n}\n\n//CHECK#4\nif((new Number(-1)).toString(undefined) !== \"-1\"){\n $ERROR('#4: (new Number(-1)).toString(undefined) === \"-1\"');\n}\n\n//CHECK#5\nif((new Number(1)).toString(undefined) !== \"1\"){\n $ERROR('#5: (new Number(1)).toString(undefined) === \"1\"');\n}\n\n//CHECK#6\nif((new Number(Number.NaN)).toString(undefined) !== \"NaN\"){\n $ERROR('#6: (new Number(Number.NaN)).toString(undefined) === \"NaN\"');\n}\n\n//CHECK#7\nif((new Number(Number.POSITIVE_INFINITY)).toString(undefined) !== \"Infinity\"){\n $ERROR('#7: (new Number(Number.POSITIVE_INFINITY)).toString(undefined) === \"Infinity\"');\n}\n\n//CHECK#8\nif((new Number(Number.NEGATIVE_INFINITY)).toString(undefined) !== \"-Infinity\"){\n $ERROR('#8: (new Number(Number.NEGATIVE_INFINITY)).toString(undefined) === \"-Infinity\"');\n}\n",
+ "id": "S15.7.4.2_A1_T03"
+ },
+ {
+ "section": "15.7.4.2",
+ "description": "radix is 2",
+ "test": "//CHECK#1\nif(Number.prototype.toString(2) !== \"0\"){\n $ERROR('#1: Number.prototype.toString(2) === \"0\"');\n}\n\n//CHECK#2\nif((new Number()).toString(2) !== \"0\"){\n $ERROR('#2: (new Number()).toString(2) === \"0\"');\n}\n\n//CHECK#3\nif((new Number(0)).toString(2) !== \"0\"){\n $ERROR('#3: (new Number(0)).toString(2) === \"0\"');\n}\n\n//CHECK#4\nif((new Number(-1)).toString(2) !== \"-1\"){\n $ERROR('#4: (new Number(-1)).toString(2) === \"-1\"');\n}\n\n//CHECK#5\nif((new Number(1)).toString(2) !== \"1\"){\n $ERROR('#5: (new Number(1)).toString(2) === \"1\"');\n}\n\n//CHECK#6\nif((new Number(Number.NaN)).toString(2) !== \"NaN\"){\n $ERROR('#6: (new Number(Number.NaN)).toString(2) === \"NaN\"');\n}\n\n//CHECK#7\nif((new Number(Number.POSITIVE_INFINITY)).toString(2) !== \"Infinity\"){\n $ERROR('#7: (new Number(Number.POSITIVE_INFINITY)).toString(2) === \"Infinity\"');\n}\n\n//CHECK#8\nif((new Number(Number.NEGATIVE_INFINITY)).toString(2) !== \"-Infinity\"){\n $ERROR('#8: (new Number(Number.NEGATIVE_INFINITY)).toString(2) === \"-Infinity\"');\n}\n",
+ "id": "S15.7.4.2_A2_T01"
+ },
+ {
+ "section": "15.7.4.2",
+ "description": "radix is 3",
+ "test": "//CHECK#1\nif(Number.prototype.toString(3) !== \"0\"){\n $ERROR('#1: Number.prototype.toString(3) === \"0\"');\n}\n\n//CHECK#2\nif((new Number()).toString(3) !== \"0\"){\n $ERROR('#2: (new Number()).toString(3) === \"0\"');\n}\n\n//CHECK#3\nif((new Number(0)).toString(3) !== \"0\"){\n $ERROR('#3: (new Number(0)).toString(3) === \"0\"');\n}\n\n//CHECK#4\nif((new Number(-1)).toString(3) !== \"-1\"){\n $ERROR('#4: (new Number(-1)).toString(3) === \"-1\"');\n}\n\n//CHECK#5\nif((new Number(1)).toString(3) !== \"1\"){\n $ERROR('#5: (new Number(1)).toString(3) === \"1\"');\n}\n\n//CHECK#6\nif((new Number(Number.NaN)).toString(3) !== \"NaN\"){\n $ERROR('#6: (new Number(Number.NaN)).toString(3) === \"NaN\"');\n}\n\n//CHECK#7\nif((new Number(Number.POSITIVE_INFINITY)).toString(3) !== \"Infinity\"){\n $ERROR('#7: (new Number(Number.POSITIVE_INFINITY)).toString(3) === \"Infinity\"');\n}\n\n//CHECK#8\nif((new Number(Number.NEGATIVE_INFINITY)).toString(3) !== \"-Infinity\"){\n $ERROR('#8: (new Number(Number.NEGATIVE_INFINITY)).toString(3) === \"-Infinity\"');\n}\n",
+ "id": "S15.7.4.2_A2_T02"
+ },
+ {
+ "section": "15.7.4.2",
+ "description": "radix is 4",
+ "test": "//CHECK#1\nif(Number.prototype.toString(4) !== \"0\"){\n $ERROR('#1: Number.prototype.toString(4) === \"0\"');\n}\n\n//CHECK#2\nif((new Number()).toString(4) !== \"0\"){\n $ERROR('#2: (new Number()).toString(4) === \"0\"');\n}\n\n//CHECK#3\nif((new Number(0)).toString(4) !== \"0\"){\n $ERROR('#3: (new Number(0)).toString(4) === \"0\"');\n}\n\n//CHECK#4\nif((new Number(-1)).toString(4) !== \"-1\"){\n $ERROR('#4: (new Number(-1)).toString(4) === \"-1\"');\n}\n\n//CHECK#5\nif((new Number(1)).toString(4) !== \"1\"){\n $ERROR('#5: (new Number(1)).toString(4) === \"1\"');\n}\n\n//CHECK#6\nif((new Number(Number.NaN)).toString(4) !== \"NaN\"){\n $ERROR('#6: (new Number(Number.NaN)).toString(4) === \"NaN\"');\n}\n\n//CHECK#7\nif((new Number(Number.POSITIVE_INFINITY)).toString(4) !== \"Infinity\"){\n $ERROR('#7: (new Number(Number.POSITIVE_INFINITY)).toString(4) === \"Infinity\"');\n}\n\n//CHECK#8\nif((new Number(Number.NEGATIVE_INFINITY)).toString(4) !== \"-Infinity\"){\n $ERROR('#8: (new Number(Number.NEGATIVE_INFINITY)).toString(4) === \"-Infinity\"');\n}\n",
+ "id": "S15.7.4.2_A2_T03"
+ },
+ {
+ "section": "15.7.4.2",
+ "description": "radix is 5",
+ "test": "//CHECK#1\nif(Number.prototype.toString(5) !== \"0\"){\n $ERROR('#1: Number.prototype.toString(5) === \"0\"');\n}\n\n//CHECK#2\nif((new Number()).toString(5) !== \"0\"){\n $ERROR('#2: (new Number()).toString(5) === \"0\"');\n}\n\n//CHECK#3\nif((new Number(0)).toString(5) !== \"0\"){\n $ERROR('#3: (new Number(0)).toString(5) === \"0\"');\n}\n\n//CHECK#4\nif((new Number(-1)).toString(5) !== \"-1\"){\n $ERROR('#4: (new Number(-1)).toString(5) === \"-1\"');\n}\n\n//CHECK#5\nif((new Number(1)).toString(5) !== \"1\"){\n $ERROR('#5: (new Number(1)).toString(5) === \"1\"');\n}\n\n//CHECK#6\nif((new Number(Number.NaN)).toString(5) !== \"NaN\"){\n $ERROR('#6: (new Number(Number.NaN)).toString(5) === \"NaN\"');\n}\n\n//CHECK#7\nif((new Number(Number.POSITIVE_INFINITY)).toString(5) !== \"Infinity\"){\n $ERROR('#7: (new Number(Number.POSITIVE_INFINITY)).toString(5) === \"Infinity\"');\n}\n\n//CHECK#8\nif((new Number(Number.NEGATIVE_INFINITY)).toString(5) !== \"-Infinity\"){\n $ERROR('#8: (new Number(Number.NEGATIVE_INFINITY)).toString(5) === \"-Infinity\"');\n}\n",
+ "id": "S15.7.4.2_A2_T04"
+ },
+ {
+ "section": "15.7.4.2",
+ "description": "radix is 6",
+ "test": "//CHECK#1\nif(Number.prototype.toString(6) !== \"0\"){\n $ERROR('#1: Number.prototype.toString(6) === \"0\"');\n}\n\n//CHECK#2\nif((new Number()).toString(6) !== \"0\"){\n $ERROR('#2: (new Number()).toString(6) === \"0\"');\n}\n\n//CHECK#3\nif((new Number(0)).toString(6) !== \"0\"){\n $ERROR('#3: (new Number(0)).toString(6) === \"0\"');\n}\n\n//CHECK#4\nif((new Number(-1)).toString(6) !== \"-1\"){\n $ERROR('#4: (new Number(-1)).toString(6) === \"-1\"');\n}\n\n//CHECK#5\nif((new Number(1)).toString(6) !== \"1\"){\n $ERROR('#5: (new Number(1)).toString(6) === \"1\"');\n}\n\n//CHECK#6\nif((new Number(Number.NaN)).toString(6) !== \"NaN\"){\n $ERROR('#6: (new Number(Number.NaN)).toString(6) === \"NaN\"');\n}\n\n//CHECK#7\nif((new Number(Number.POSITIVE_INFINITY)).toString(6) !== \"Infinity\"){\n $ERROR('#7: (new Number(Number.POSITIVE_INFINITY)).toString(6) === \"Infinity\"');\n}\n\n//CHECK#8\nif((new Number(Number.NEGATIVE_INFINITY)).toString(6) !== \"-Infinity\"){\n $ERROR('#8: (new Number(Number.NEGATIVE_INFINITY)).toString(6) === \"-Infinity\"');\n}\n",
+ "id": "S15.7.4.2_A2_T05"
+ },
+ {
+ "section": "15.7.4.2",
+ "description": "radix is 7",
+ "test": "//CHECK#1\nif(Number.prototype.toString(7) !== \"0\"){\n $ERROR('#1: Number.prototype.toString(7) === \"0\"');\n}\n\n//CHECK#2\nif((new Number()).toString(7) !== \"0\"){\n $ERROR('#2: (new Number()).toString(7) === \"0\"');\n}\n\n//CHECK#3\nif((new Number(0)).toString(7) !== \"0\"){\n $ERROR('#3: (new Number(0)).toString(7) === \"0\"');\n}\n\n//CHECK#4\nif((new Number(-1)).toString(7) !== \"-1\"){\n $ERROR('#4: (new Number(-1)).toString(7) === \"-1\"');\n}\n\n//CHECK#5\nif((new Number(1)).toString(7) !== \"1\"){\n $ERROR('#5: (new Number(1)).toString(7) === \"1\"');\n}\n\n//CHECK#6\nif((new Number(Number.NaN)).toString(7) !== \"NaN\"){\n $ERROR('#6: (new Number(Number.NaN)).toString(7) === \"NaN\"');\n}\n\n//CHECK#7\nif((new Number(Number.POSITIVE_INFINITY)).toString(7) !== \"Infinity\"){\n $ERROR('#7: (new Number(Number.POSITIVE_INFINITY)).toString(7) === \"Infinity\"');\n}\n\n//CHECK#8\nif((new Number(Number.NEGATIVE_INFINITY)).toString(7) !== \"-Infinity\"){\n $ERROR('#8: (new Number(Number.NEGATIVE_INFINITY)).toString(7) === \"-Infinity\"');\n}\n",
+ "id": "S15.7.4.2_A2_T06"
+ },
+ {
+ "section": "15.7.4.2",
+ "description": "radix is 8",
+ "test": "//CHECK#1\nif(Number.prototype.toString(8) !== \"0\"){\n $ERROR('#1: Number.prototype.toString(8) === \"0\"');\n}\n\n//CHECK#2\nif((new Number()).toString(8) !== \"0\"){\n $ERROR('#2: (new Number()).toString(8) === \"0\"');\n}\n\n//CHECK#3\nif((new Number(0)).toString(8) !== \"0\"){\n $ERROR('#3: (new Number(0)).toString(8) === \"0\"');\n}\n\n//CHECK#4\nif((new Number(-1)).toString(8) !== \"-1\"){\n $ERROR('#4: (new Number(-1)).toString(8) === \"-1\"');\n}\n\n//CHECK#5\nif((new Number(1)).toString(8) !== \"1\"){\n $ERROR('#5: (new Number(1)).toString(8) === \"1\"');\n}\n\n//CHECK#6\nif((new Number(Number.NaN)).toString(8) !== \"NaN\"){\n $ERROR('#6: (new Number(Number.NaN)).toString(8) === \"NaN\"');\n}\n\n//CHECK#7\nif((new Number(Number.POSITIVE_INFINITY)).toString(8) !== \"Infinity\"){\n $ERROR('#7: (new Number(Number.POSITIVE_INFINITY)).toString(8) === \"Infinity\"');\n}\n\n//CHECK#8\nif((new Number(Number.NEGATIVE_INFINITY)).toString(8) !== \"-Infinity\"){\n $ERROR('#8: (new Number(Number.NEGATIVE_INFINITY)).toString(8) === \"-Infinity\"');\n}\n",
+ "id": "S15.7.4.2_A2_T07"
+ },
+ {
+ "section": "15.7.4.2",
+ "description": "radix is 9",
+ "test": "//CHECK#1\nif(Number.prototype.toString(9) !== \"0\"){\n $ERROR('#1: Number.prototype.toString(9) === \"0\"');\n}\n\n//CHECK#2\nif((new Number()).toString(9) !== \"0\"){\n $ERROR('#2: (new Number()).toString(9) === \"0\"');\n}\n\n//CHECK#3\nif((new Number(0)).toString(9) !== \"0\"){\n $ERROR('#3: (new Number(0)).toString(9) === \"0\"');\n}\n\n//CHECK#4\nif((new Number(-1)).toString(9) !== \"-1\"){\n $ERROR('#4: (new Number(-1)).toString(9) === \"-1\"');\n}\n\n//CHECK#5\nif((new Number(1)).toString(9) !== \"1\"){\n $ERROR('#5: (new Number(1)).toString(9) === \"1\"');\n}\n\n//CHECK#6\nif((new Number(Number.NaN)).toString(9) !== \"NaN\"){\n $ERROR('#6: (new Number(Number.NaN)).toString(9) === \"NaN\"');\n}\n\n//CHECK#7\nif((new Number(Number.POSITIVE_INFINITY)).toString(9) !== \"Infinity\"){\n $ERROR('#7: (new Number(Number.POSITIVE_INFINITY)).toString(9) === \"Infinity\"');\n}\n\n//CHECK#8\nif((new Number(Number.NEGATIVE_INFINITY)).toString(9) !== \"-Infinity\"){\n $ERROR('#8: (new Number(Number.NEGATIVE_INFINITY)).toString(9) === \"-Infinity\"');\n}\n",
+ "id": "S15.7.4.2_A2_T08"
+ },
+ {
+ "section": "15.7.4.2",
+ "description": "radix is 11",
+ "test": "//CHECK#1\nif(Number.prototype.toString(11) !== \"0\"){\n $ERROR('#1: Number.prototype.toString(11) === \"0\"');\n}\n\n//CHECK#2\nif((new Number()).toString(11) !== \"0\"){\n $ERROR('#2: (new Number()).toString(11) === \"0\"');\n}\n\n//CHECK#3\nif((new Number(0)).toString(11) !== \"0\"){\n $ERROR('#3: (new Number(0)).toString(11) === \"0\"');\n}\n\n//CHECK#4\nif((new Number(-1)).toString(11) !== \"-1\"){\n $ERROR('#4: (new Number(-1)).toString(11) === \"-1\"');\n}\n\n//CHECK#5\nif((new Number(1)).toString(11) !== \"1\"){\n $ERROR('#5: (new Number(1)).toString(11) === \"1\"');\n}\n\n//CHECK#6\nif((new Number(Number.NaN)).toString(11) !== \"NaN\"){\n $ERROR('#6: (new Number(Number.NaN)).toString(11) === \"NaN\"');\n}\n\n//CHECK#7\nif((new Number(Number.POSITIVE_INFINITY)).toString(11) !== \"Infinity\"){\n $ERROR('#7: (new Number(Number.POSITIVE_INFINITY)).toString(11) === \"Infinity\"');\n}\n\n//CHECK#8\nif((new Number(Number.NEGATIVE_INFINITY)).toString(11) !== \"-Infinity\"){\n $ERROR('#8: (new Number(Number.NEGATIVE_INFINITY)).toString(11) === \"-Infinity\"');\n}\n",
+ "id": "S15.7.4.2_A2_T09"
+ },
+ {
+ "section": "15.7.4.2",
+ "description": "radix is 12",
+ "test": "//CHECK#1\nif(Number.prototype.toString(12) !== \"0\"){\n $ERROR('#1: Number.prototype.toString(12) === \"0\"');\n}\n\n//CHECK#2\nif((new Number()).toString(12) !== \"0\"){\n $ERROR('#2: (new Number()).toString(12) === \"0\"');\n}\n\n//CHECK#3\nif((new Number(0)).toString(12) !== \"0\"){\n $ERROR('#3: (new Number(0)).toString(12) === \"0\"');\n}\n\n//CHECK#4\nif((new Number(-1)).toString(12) !== \"-1\"){\n $ERROR('#4: (new Number(-1)).toString(12) === \"-1\"');\n}\n\n//CHECK#5\nif((new Number(1)).toString(12) !== \"1\"){\n $ERROR('#5: (new Number(1)).toString(12) === \"1\"');\n}\n\n//CHECK#6\nif((new Number(Number.NaN)).toString(12) !== \"NaN\"){\n $ERROR('#6: (new Number(Number.NaN)).toString(12) === \"NaN\"');\n}\n\n//CHECK#7\nif((new Number(Number.POSITIVE_INFINITY)).toString(12) !== \"Infinity\"){\n $ERROR('#7: (new Number(Number.POSITIVE_INFINITY)).toString(12) === \"Infinity\"');\n}\n\n//CHECK#8\nif((new Number(Number.NEGATIVE_INFINITY)).toString(12) !== \"-Infinity\"){\n $ERROR('#8: (new Number(Number.NEGATIVE_INFINITY)).toString(12) === \"-Infinity\"');\n}\n",
+ "id": "S15.7.4.2_A2_T10"
+ },
+ {
+ "section": "15.7.4.2",
+ "description": "radix is 13",
+ "test": "//CHECK#1\nif(Number.prototype.toString(13) !== \"0\"){\n $ERROR('#1: Number.prototype.toString(13) === \"0\"');\n}\n\n//CHECK#2\nif((new Number()).toString(13) !== \"0\"){\n $ERROR('#2: (new Number()).toString(13) === \"0\"');\n}\n\n//CHECK#3\nif((new Number(0)).toString(13) !== \"0\"){\n $ERROR('#3: (new Number(0)).toString(13) === \"0\"');\n}\n\n//CHECK#4\nif((new Number(-1)).toString(13) !== \"-1\"){\n $ERROR('#4: (new Number(-1)).toString(13) === \"-1\"');\n}\n\n//CHECK#5\nif((new Number(1)).toString(13) !== \"1\"){\n $ERROR('#5: (new Number(1)).toString(13) === \"1\"');\n}\n\n//CHECK#6\nif((new Number(Number.NaN)).toString(13) !== \"NaN\"){\n $ERROR('#6: (new Number(Number.NaN)).toString(13) === \"NaN\"');\n}\n\n//CHECK#7\nif((new Number(Number.POSITIVE_INFINITY)).toString(13) !== \"Infinity\"){\n $ERROR('#7: (new Number(Number.POSITIVE_INFINITY)).toString(13) === \"Infinity\"');\n}\n\n//CHECK#8\nif((new Number(Number.NEGATIVE_INFINITY)).toString(13) !== \"-Infinity\"){\n $ERROR('#8: (new Number(Number.NEGATIVE_INFINITY)).toString(13) === \"-Infinity\"');\n}\n",
+ "id": "S15.7.4.2_A2_T11"
+ },
+ {
+ "section": "15.7.4.2",
+ "description": "radix is 14",
+ "test": "//CHECK#1\nif(Number.prototype.toString(14) !== \"0\"){\n $ERROR('#1: Number.prototype.toString(14) === \"0\"');\n}\n\n//CHECK#2\nif((new Number()).toString(14) !== \"0\"){\n $ERROR('#2: (new Number()).toString(14) === \"0\"');\n}\n\n//CHECK#3\nif((new Number(0)).toString(14) !== \"0\"){\n $ERROR('#3: (new Number(0)).toString(14) === \"0\"');\n}\n\n//CHECK#4\nif((new Number(-1)).toString(14) !== \"-1\"){\n $ERROR('#4: (new Number(-1)).toString(14) === \"-1\"');\n}\n\n//CHECK#5\nif((new Number(1)).toString(14) !== \"1\"){\n $ERROR('#5: (new Number(1)).toString(14) === \"1\"');\n}\n\n//CHECK#6\nif((new Number(Number.NaN)).toString(14) !== \"NaN\"){\n $ERROR('#6: (new Number(Number.NaN)).toString(14) === \"NaN\"');\n}\n\n//CHECK#7\nif((new Number(Number.POSITIVE_INFINITY)).toString(14) !== \"Infinity\"){\n $ERROR('#7: (new Number(Number.POSITIVE_INFINITY)).toString(14) === \"Infinity\"');\n}\n\n//CHECK#8\nif((new Number(Number.NEGATIVE_INFINITY)).toString(14) !== \"-Infinity\"){\n $ERROR('#8: (new Number(Number.NEGATIVE_INFINITY)).toString(14) === \"-Infinity\"');\n}\n",
+ "id": "S15.7.4.2_A2_T12"
+ },
+ {
+ "section": "15.7.4.2",
+ "description": "radix is 15",
+ "test": "//CHECK#1\nif(Number.prototype.toString(15) !== \"0\"){\n $ERROR('#1: Number.prototype.toString(15) === \"0\"');\n}\n\n//CHECK#2\nif((new Number()).toString(15) !== \"0\"){\n $ERROR('#2: (new Number()).toString(15) === \"0\"');\n}\n\n//CHECK#3\nif((new Number(0)).toString(15) !== \"0\"){\n $ERROR('#3: (new Number(0)).toString(15) === \"0\"');\n}\n\n//CHECK#4\nif((new Number(-1)).toString(15) !== \"-1\"){\n $ERROR('#4: (new Number(-1)).toString(15) === \"-1\"');\n}\n\n//CHECK#5\nif((new Number(1)).toString(15) !== \"1\"){\n $ERROR('#5: (new Number(1)).toString(15) === \"1\"');\n}\n\n//CHECK#6\nif((new Number(Number.NaN)).toString(15) !== \"NaN\"){\n $ERROR('#6: (new Number(Number.NaN)).toString(15) === \"NaN\"');\n}\n\n//CHECK#7\nif((new Number(Number.POSITIVE_INFINITY)).toString(15) !== \"Infinity\"){\n $ERROR('#7: (new Number(Number.POSITIVE_INFINITY)).toString(15) === \"Infinity\"');\n}\n\n//CHECK#8\nif((new Number(Number.NEGATIVE_INFINITY)).toString(15) !== \"-Infinity\"){\n $ERROR('#8: (new Number(Number.NEGATIVE_INFINITY)).toString(15) === \"-Infinity\"');\n}\n",
+ "id": "S15.7.4.2_A2_T13"
+ },
+ {
+ "section": "15.7.4.2",
+ "description": "radix is 16",
+ "test": "//CHECK#1\nif(Number.prototype.toString(16) !== \"0\"){\n $ERROR('#1: Number.prototype.toString(16) === \"0\"');\n}\n\n//CHECK#2\nif((new Number()).toString(16) !== \"0\"){\n $ERROR('#2: (new Number()).toString(16) === \"0\"');\n}\n\n//CHECK#3\nif((new Number(0)).toString(16) !== \"0\"){\n $ERROR('#3: (new Number(0)).toString(16) === \"0\"');\n}\n\n//CHECK#4\nif((new Number(-1)).toString(16) !== \"-1\"){\n $ERROR('#4: (new Number(-1)).toString(16) === \"-1\"');\n}\n\n//CHECK#5\nif((new Number(1)).toString(16) !== \"1\"){\n $ERROR('#5: (new Number(1)).toString(16) === \"1\"');\n}\n\n//CHECK#6\nif((new Number(Number.NaN)).toString(16) !== \"NaN\"){\n $ERROR('#6: (new Number(Number.NaN)).toString(16) === \"NaN\"');\n}\n\n//CHECK#7\nif((new Number(Number.POSITIVE_INFINITY)).toString(16) !== \"Infinity\"){\n $ERROR('#7: (new Number(Number.POSITIVE_INFINITY)).toString(16) === \"Infinity\"');\n}\n\n//CHECK#8\nif((new Number(Number.NEGATIVE_INFINITY)).toString(16) !== \"-Infinity\"){\n $ERROR('#8: (new Number(Number.NEGATIVE_INFINITY)).toString(16) === \"-Infinity\"');\n}\n",
+ "id": "S15.7.4.2_A2_T14"
+ },
+ {
+ "section": "15.7.4.2",
+ "description": "radix is 17",
+ "test": "//CHECK#1\nif(Number.prototype.toString(17) !== \"0\"){\n $ERROR('#1: Number.prototype.toString(17) === \"0\"');\n}\n\n//CHECK#2\nif((new Number()).toString(17) !== \"0\"){\n $ERROR('#2: (new Number()).toString(17) === \"0\"');\n}\n\n//CHECK#3\nif((new Number(0)).toString(17) !== \"0\"){\n $ERROR('#3: (new Number(0)).toString(17) === \"0\"');\n}\n\n//CHECK#4\nif((new Number(-1)).toString(17) !== \"-1\"){\n $ERROR('#4: (new Number(-1)).toString(17) === \"-1\"');\n}\n\n//CHECK#5\nif((new Number(1)).toString(17) !== \"1\"){\n $ERROR('#5: (new Number(1)).toString(17) === \"1\"');\n}\n\n//CHECK#6\nif((new Number(Number.NaN)).toString(17) !== \"NaN\"){\n $ERROR('#6: (new Number(Number.NaN)).toString(17) === \"NaN\"');\n}\n\n//CHECK#7\nif((new Number(Number.POSITIVE_INFINITY)).toString(17) !== \"Infinity\"){\n $ERROR('#7: (new Number(Number.POSITIVE_INFINITY)).toString(17) === \"Infinity\"');\n}\n\n//CHECK#8\nif((new Number(Number.NEGATIVE_INFINITY)).toString(17) !== \"-Infinity\"){\n $ERROR('#8: (new Number(Number.NEGATIVE_INFINITY)).toString(17) === \"-Infinity\"');\n}\n",
+ "id": "S15.7.4.2_A2_T15"
+ },
+ {
+ "section": "15.7.4.2",
+ "description": "radix is 18",
+ "test": "//CHECK#1\nif(Number.prototype.toString(18) !== \"0\"){\n $ERROR('#1: Number.prototype.toString(18) === \"0\"');\n}\n\n//CHECK#2\nif((new Number()).toString(18) !== \"0\"){\n $ERROR('#2: (new Number()).toString(18) === \"0\"');\n}\n\n//CHECK#3\nif((new Number(0)).toString(18) !== \"0\"){\n $ERROR('#3: (new Number(0)).toString(18) === \"0\"');\n}\n\n//CHECK#4\nif((new Number(-1)).toString(18) !== \"-1\"){\n $ERROR('#4: (new Number(-1)).toString(18) === \"-1\"');\n}\n\n//CHECK#5\nif((new Number(1)).toString(18) !== \"1\"){\n $ERROR('#5: (new Number(1)).toString(18) === \"1\"');\n}\n\n//CHECK#6\nif((new Number(Number.NaN)).toString(18) !== \"NaN\"){\n $ERROR('#6: (new Number(Number.NaN)).toString(18) === \"NaN\"');\n}\n\n//CHECK#7\nif((new Number(Number.POSITIVE_INFINITY)).toString(18) !== \"Infinity\"){\n $ERROR('#7: (new Number(Number.POSITIVE_INFINITY)).toString(18) === \"Infinity\"');\n}\n\n//CHECK#8\nif((new Number(Number.NEGATIVE_INFINITY)).toString(18) !== \"-Infinity\"){\n $ERROR('#8: (new Number(Number.NEGATIVE_INFINITY)).toString(18) === \"-Infinity\"');\n}\n",
+ "id": "S15.7.4.2_A2_T16"
+ },
+ {
+ "section": "15.7.4.2",
+ "description": "radix is 19",
+ "test": "//CHECK#1\nif(Number.prototype.toString(19) !== \"0\"){\n $ERROR('#1: Number.prototype.toString(19) === \"0\"');\n}\n\n//CHECK#2\nif((new Number()).toString(19) !== \"0\"){\n $ERROR('#2: (new Number()).toString(19) === \"0\"');\n}\n\n//CHECK#3\nif((new Number(0)).toString(19) !== \"0\"){\n $ERROR('#3: (new Number(0)).toString(19) === \"0\"');\n}\n\n//CHECK#4\nif((new Number(-1)).toString(19) !== \"-1\"){\n $ERROR('#4: (new Number(-1)).toString(19) === \"-1\"');\n}\n\n//CHECK#5\nif((new Number(1)).toString(19) !== \"1\"){\n $ERROR('#5: (new Number(1)).toString(19) === \"1\"');\n}\n\n//CHECK#6\nif((new Number(Number.NaN)).toString(19) !== \"NaN\"){\n $ERROR('#6: (new Number(Number.NaN)).toString(19) === \"NaN\"');\n}\n\n//CHECK#7\nif((new Number(Number.POSITIVE_INFINITY)).toString(19) !== \"Infinity\"){\n $ERROR('#7: (new Number(Number.POSITIVE_INFINITY)).toString(19) === \"Infinity\"');\n}\n\n//CHECK#8\nif((new Number(Number.NEGATIVE_INFINITY)).toString(19) !== \"-Infinity\"){\n $ERROR('#8: (new Number(Number.NEGATIVE_INFINITY)).toString(19) === \"-Infinity\"');\n}\n",
+ "id": "S15.7.4.2_A2_T17"
+ },
+ {
+ "section": "15.7.4.2",
+ "description": "radix is 20",
+ "test": "//CHECK#1\nif(Number.prototype.toString(20) !== \"0\"){\n $ERROR('#1: Number.prototype.toString(20) === \"0\"');\n}\n\n//CHECK#2\nif((new Number()).toString(20) !== \"0\"){\n $ERROR('#2: (new Number()).toString(20) === \"0\"');\n}\n\n//CHECK#3\nif((new Number(0)).toString(20) !== \"0\"){\n $ERROR('#3: (new Number(0)).toString(20) === \"0\"');\n}\n\n//CHECK#4\nif((new Number(-1)).toString(20) !== \"-1\"){\n $ERROR('#4: (new Number(-1)).toString(20) === \"-1\"');\n}\n\n//CHECK#5\nif((new Number(1)).toString(20) !== \"1\"){\n $ERROR('#5: (new Number(1)).toString(20) === \"1\"');\n}\n\n//CHECK#6\nif((new Number(Number.NaN)).toString(20) !== \"NaN\"){\n $ERROR('#6: (new Number(Number.NaN)).toString(20) === \"NaN\"');\n}\n\n//CHECK#7\nif((new Number(Number.POSITIVE_INFINITY)).toString(20) !== \"Infinity\"){\n $ERROR('#7: (new Number(Number.POSITIVE_INFINITY)).toString(20) === \"Infinity\"');\n}\n\n//CHECK#8\nif((new Number(Number.NEGATIVE_INFINITY)).toString(20) !== \"-Infinity\"){\n $ERROR('#8: (new Number(Number.NEGATIVE_INFINITY)).toString(20) === \"-Infinity\"');\n}\n",
+ "id": "S15.7.4.2_A2_T18"
+ },
+ {
+ "section": "15.7.4.2",
+ "description": "radix is 21",
+ "test": "//CHECK#1\nif(Number.prototype.toString(21) !== \"0\"){\n $ERROR('#1: Number.prototype.toString(21) === \"0\"');\n}\n\n//CHECK#2\nif((new Number()).toString(21) !== \"0\"){\n $ERROR('#2: (new Number()).toString(21) === \"0\"');\n}\n\n//CHECK#3\nif((new Number(0)).toString(21) !== \"0\"){\n $ERROR('#3: (new Number(0)).toString(21) === \"0\"');\n}\n\n//CHECK#4\nif((new Number(-1)).toString(21) !== \"-1\"){\n $ERROR('#4: (new Number(-1)).toString(21) === \"-1\"');\n}\n\n//CHECK#5\nif((new Number(1)).toString(21) !== \"1\"){\n $ERROR('#5: (new Number(1)).toString(21) === \"1\"');\n}\n\n//CHECK#6\nif((new Number(Number.NaN)).toString(21) !== \"NaN\"){\n $ERROR('#6: (new Number(Number.NaN)).toString(21) === \"NaN\"');\n}\n\n//CHECK#7\nif((new Number(Number.POSITIVE_INFINITY)).toString(21) !== \"Infinity\"){\n $ERROR('#7: (new Number(Number.POSITIVE_INFINITY)).toString(21) === \"Infinity\"');\n}\n\n//CHECK#8\nif((new Number(Number.NEGATIVE_INFINITY)).toString(21) !== \"-Infinity\"){\n $ERROR('#8: (new Number(Number.NEGATIVE_INFINITY)).toString(21) === \"-Infinity\"');\n}\n",
+ "id": "S15.7.4.2_A2_T19"
+ },
+ {
+ "section": "15.7.4.2",
+ "description": "radix is 22",
+ "test": "//CHECK#1\nif(Number.prototype.toString(22) !== \"0\"){\n $ERROR('#1: Number.prototype.toString(22) === \"0\"');\n}\n\n//CHECK#2\nif((new Number()).toString(22) !== \"0\"){\n $ERROR('#2: (new Number()).toString(22) === \"0\"');\n}\n\n//CHECK#3\nif((new Number(0)).toString(22) !== \"0\"){\n $ERROR('#3: (new Number(0)).toString(22) === \"0\"');\n}\n\n//CHECK#4\nif((new Number(-1)).toString(22) !== \"-1\"){\n $ERROR('#4: (new Number(-1)).toString(22) === \"-1\"');\n}\n\n//CHECK#5\nif((new Number(1)).toString(22) !== \"1\"){\n $ERROR('#5: (new Number(1)).toString(22) === \"1\"');\n}\n\n//CHECK#6\nif((new Number(Number.NaN)).toString(22) !== \"NaN\"){\n $ERROR('#6: (new Number(Number.NaN)).toString(22) === \"NaN\"');\n}\n\n//CHECK#7\nif((new Number(Number.POSITIVE_INFINITY)).toString(22) !== \"Infinity\"){\n $ERROR('#7: (new Number(Number.POSITIVE_INFINITY)).toString(22) === \"Infinity\"');\n}\n\n//CHECK#8\nif((new Number(Number.NEGATIVE_INFINITY)).toString(22) !== \"-Infinity\"){\n $ERROR('#8: (new Number(Number.NEGATIVE_INFINITY)).toString(22) === \"-Infinity\"');\n}\n",
+ "id": "S15.7.4.2_A2_T20"
+ },
+ {
+ "section": "15.7.4.2",
+ "description": "radix is 23",
+ "test": "//CHECK#1\nif(Number.prototype.toString(23) !== \"0\"){\n $ERROR('#1: Number.prototype.toString(23) === \"0\"');\n}\n\n//CHECK#2\nif((new Number()).toString(23) !== \"0\"){\n $ERROR('#2: (new Number()).toString(23) === \"0\"');\n}\n\n//CHECK#3\nif((new Number(0)).toString(23) !== \"0\"){\n $ERROR('#3: (new Number(0)).toString(23) === \"0\"');\n}\n\n//CHECK#4\nif((new Number(-1)).toString(23) !== \"-1\"){\n $ERROR('#4: (new Number(-1)).toString(23) === \"-1\"');\n}\n\n//CHECK#5\nif((new Number(1)).toString(23) !== \"1\"){\n $ERROR('#5: (new Number(1)).toString(23) === \"1\"');\n}\n\n//CHECK#6\nif((new Number(Number.NaN)).toString(23) !== \"NaN\"){\n $ERROR('#6: (new Number(Number.NaN)).toString(23) === \"NaN\"');\n}\n\n//CHECK#7\nif((new Number(Number.POSITIVE_INFINITY)).toString(23) !== \"Infinity\"){\n $ERROR('#7: (new Number(Number.POSITIVE_INFINITY)).toString(23) === \"Infinity\"');\n}\n\n//CHECK#8\nif((new Number(Number.NEGATIVE_INFINITY)).toString(23) !== \"-Infinity\"){\n $ERROR('#8: (new Number(Number.NEGATIVE_INFINITY)).toString(23) === \"-Infinity\"');\n}\n",
+ "id": "S15.7.4.2_A2_T21"
+ },
+ {
+ "section": "15.7.4.2",
+ "description": "radix is 24",
+ "test": "//CHECK#1\nif(Number.prototype.toString(24) !== \"0\"){\n $ERROR('#1: Number.prototype.toString(24) === \"0\"');\n}\n\n//CHECK#2\nif((new Number()).toString(24) !== \"0\"){\n $ERROR('#2: (new Number()).toString(24) === \"0\"');\n}\n\n//CHECK#3\nif((new Number(0)).toString(24) !== \"0\"){\n $ERROR('#3: (new Number(0)).toString(24) === \"0\"');\n}\n\n//CHECK#4\nif((new Number(-1)).toString(24) !== \"-1\"){\n $ERROR('#4: (new Number(-1)).toString(24) === \"-1\"');\n}\n\n//CHECK#5\nif((new Number(1)).toString(24) !== \"1\"){\n $ERROR('#5: (new Number(1)).toString(24) === \"1\"');\n}\n\n//CHECK#6\nif((new Number(Number.NaN)).toString(24) !== \"NaN\"){\n $ERROR('#6: (new Number(Number.NaN)).toString(24) === \"NaN\"');\n}\n\n//CHECK#7\nif((new Number(Number.POSITIVE_INFINITY)).toString(24) !== \"Infinity\"){\n $ERROR('#7: (new Number(Number.POSITIVE_INFINITY)).toString(24) === \"Infinity\"');\n}\n\n//CHECK#8\nif((new Number(Number.NEGATIVE_INFINITY)).toString(24) !== \"-Infinity\"){\n $ERROR('#8: (new Number(Number.NEGATIVE_INFINITY)).toString(24) === \"-Infinity\"');\n}\n",
+ "id": "S15.7.4.2_A2_T22"
+ },
+ {
+ "section": "15.7.4.2",
+ "description": "radix is 25",
+ "test": "//CHECK#1\nif(Number.prototype.toString(25) !== \"0\"){\n $ERROR('#1: Number.prototype.toString(25) === \"0\"');\n}\n\n//CHECK#2\nif((new Number()).toString(25) !== \"0\"){\n $ERROR('#2: (new Number()).toString(25) === \"0\"');\n}\n\n//CHECK#3\nif((new Number(0)).toString(25) !== \"0\"){\n $ERROR('#3: (new Number(0)).toString(25) === \"0\"');\n}\n\n//CHECK#4\nif((new Number(-1)).toString(25) !== \"-1\"){\n $ERROR('#4: (new Number(-1)).toString(25) === \"-1\"');\n}\n\n//CHECK#5\nif((new Number(1)).toString(25) !== \"1\"){\n $ERROR('#5: (new Number(1)).toString(25) === \"1\"');\n}\n\n//CHECK#6\nif((new Number(Number.NaN)).toString(25) !== \"NaN\"){\n $ERROR('#6: (new Number(Number.NaN)).toString(25) === \"NaN\"');\n}\n\n//CHECK#7\nif((new Number(Number.POSITIVE_INFINITY)).toString(25) !== \"Infinity\"){\n $ERROR('#7: (new Number(Number.POSITIVE_INFINITY)).toString(25) === \"Infinity\"');\n}\n\n//CHECK#8\nif((new Number(Number.NEGATIVE_INFINITY)).toString(25) !== \"-Infinity\"){\n $ERROR('#8: (new Number(Number.NEGATIVE_INFINITY)).toString(25) === \"-Infinity\"');\n}\n",
+ "id": "S15.7.4.2_A2_T23"
+ },
+ {
+ "section": "15.7.4.2",
+ "description": "radix is 26",
+ "test": "//CHECK#1\nif(Number.prototype.toString(26) !== \"0\"){\n $ERROR('#1: Number.prototype.toString(26) === \"0\"');\n}\n\n//CHECK#2\nif((new Number()).toString(26) !== \"0\"){\n $ERROR('#2: (new Number()).toString(26) === \"0\"');\n}\n\n//CHECK#3\nif((new Number(0)).toString(26) !== \"0\"){\n $ERROR('#3: (new Number(0)).toString(26) === \"0\"');\n}\n\n//CHECK#4\nif((new Number(-1)).toString(26) !== \"-1\"){\n $ERROR('#4: (new Number(-1)).toString(26) === \"-1\"');\n}\n\n//CHECK#5\nif((new Number(1)).toString(26) !== \"1\"){\n $ERROR('#5: (new Number(1)).toString(26) === \"1\"');\n}\n\n//CHECK#6\nif((new Number(Number.NaN)).toString(26) !== \"NaN\"){\n $ERROR('#6: (new Number(Number.NaN)).toString(26) === \"NaN\"');\n}\n\n//CHECK#7\nif((new Number(Number.POSITIVE_INFINITY)).toString(26) !== \"Infinity\"){\n $ERROR('#7: (new Number(Number.POSITIVE_INFINITY)).toString(26) === \"Infinity\"');\n}\n\n//CHECK#8\nif((new Number(Number.NEGATIVE_INFINITY)).toString(26) !== \"-Infinity\"){\n $ERROR('#8: (new Number(Number.NEGATIVE_INFINITY)).toString(26) === \"-Infinity\"');\n}\n",
+ "id": "S15.7.4.2_A2_T24"
+ },
+ {
+ "section": "15.7.4.2",
+ "description": "radix is 27",
+ "test": "//CHECK#1\nif(Number.prototype.toString(27) !== \"0\"){\n $ERROR('#1: Number.prototype.toString(27) === \"0\"');\n}\n\n//CHECK#2\nif((new Number()).toString(27) !== \"0\"){\n $ERROR('#2: (new Number()).toString(27) === \"0\"');\n}\n\n//CHECK#3\nif((new Number(0)).toString(27) !== \"0\"){\n $ERROR('#3: (new Number(0)).toString(27) === \"0\"');\n}\n\n//CHECK#4\nif((new Number(-1)).toString(27) !== \"-1\"){\n $ERROR('#4: (new Number(-1)).toString(27) === \"-1\"');\n}\n\n//CHECK#5\nif((new Number(1)).toString(27) !== \"1\"){\n $ERROR('#5: (new Number(1)).toString(27) === \"1\"');\n}\n\n//CHECK#6\nif((new Number(Number.NaN)).toString(27) !== \"NaN\"){\n $ERROR('#6: (new Number(Number.NaN)).toString(27) === \"NaN\"');\n}\n\n//CHECK#7\nif((new Number(Number.POSITIVE_INFINITY)).toString(27) !== \"Infinity\"){\n $ERROR('#7: (new Number(Number.POSITIVE_INFINITY)).toString(27) === \"Infinity\"');\n}\n\n//CHECK#8\nif((new Number(Number.NEGATIVE_INFINITY)).toString(27) !== \"-Infinity\"){\n $ERROR('#8: (new Number(Number.NEGATIVE_INFINITY)).toString(27) === \"-Infinity\"');\n}\n",
+ "id": "S15.7.4.2_A2_T25"
+ },
+ {
+ "section": "15.7.4.2",
+ "description": "radix is 28",
+ "test": "//CHECK#1\nif(Number.prototype.toString(28) !== \"0\"){\n $ERROR('#1: Number.prototype.toString(28) === \"0\"');\n}\n\n//CHECK#2\nif((new Number()).toString(28) !== \"0\"){\n $ERROR('#2: (new Number()).toString(28) === \"0\"');\n}\n\n//CHECK#3\nif((new Number(0)).toString(28) !== \"0\"){\n $ERROR('#3: (new Number(0)).toString(28) === \"0\"');\n}\n\n//CHECK#4\nif((new Number(-1)).toString(28) !== \"-1\"){\n $ERROR('#4: (new Number(-1)).toString(28) === \"-1\"');\n}\n\n//CHECK#5\nif((new Number(1)).toString(28) !== \"1\"){\n $ERROR('#5: (new Number(1)).toString(28) === \"1\"');\n}\n\n//CHECK#6\nif((new Number(Number.NaN)).toString(28) !== \"NaN\"){\n $ERROR('#6: (new Number(Number.NaN)).toString(28) === \"NaN\"');\n}\n\n//CHECK#7\nif((new Number(Number.POSITIVE_INFINITY)).toString(28) !== \"Infinity\"){\n $ERROR('#7: (new Number(Number.POSITIVE_INFINITY)).toString(28) === \"Infinity\"');\n}\n\n//CHECK#8\nif((new Number(Number.NEGATIVE_INFINITY)).toString(28) !== \"-Infinity\"){\n $ERROR('#8: (new Number(Number.NEGATIVE_INFINITY)).toString(28) === \"-Infinity\"');\n}\n",
+ "id": "S15.7.4.2_A2_T26"
+ },
+ {
+ "section": "15.7.4.2",
+ "description": "radix is 29",
+ "test": "//CHECK#1\nif(Number.prototype.toString(29) !== \"0\"){\n $ERROR('#1: Number.prototype.toString(29) === \"0\"');\n}\n\n//CHECK#2\nif((new Number()).toString(29) !== \"0\"){\n $ERROR('#2: (new Number()).toString(29) === \"0\"');\n}\n\n//CHECK#3\nif((new Number(0)).toString(29) !== \"0\"){\n $ERROR('#3: (new Number(0)).toString(29) === \"0\"');\n}\n\n//CHECK#4\nif((new Number(-1)).toString(29) !== \"-1\"){\n $ERROR('#4: (new Number(-1)).toString(29) === \"-1\"');\n}\n\n//CHECK#5\nif((new Number(1)).toString(29) !== \"1\"){\n $ERROR('#5: (new Number(1)).toString(29) === \"1\"');\n}\n\n//CHECK#6\nif((new Number(Number.NaN)).toString(29) !== \"NaN\"){\n $ERROR('#6: (new Number(Number.NaN)).toString(29) === \"NaN\"');\n}\n\n//CHECK#7\nif((new Number(Number.POSITIVE_INFINITY)).toString(29) !== \"Infinity\"){\n $ERROR('#7: (new Number(Number.POSITIVE_INFINITY)).toString(29) === \"Infinity\"');\n}\n\n//CHECK#8\nif((new Number(Number.NEGATIVE_INFINITY)).toString(29) !== \"-Infinity\"){\n $ERROR('#8: (new Number(Number.NEGATIVE_INFINITY)).toString(29) === \"-Infinity\"');\n}\n",
+ "id": "S15.7.4.2_A2_T27"
+ },
+ {
+ "section": "15.7.4.2",
+ "description": "radix is 30",
+ "test": "//CHECK#1\nif(Number.prototype.toString(30) !== \"0\"){\n $ERROR('#1: Number.prototype.toString(30) === \"0\"');\n}\n\n//CHECK#2\nif((new Number()).toString(30) !== \"0\"){\n $ERROR('#2: (new Number()).toString(30) === \"0\"');\n}\n\n//CHECK#3\nif((new Number(0)).toString(30) !== \"0\"){\n $ERROR('#3: (new Number(0)).toString(30) === \"0\"');\n}\n\n//CHECK#4\nif((new Number(-1)).toString(30) !== \"-1\"){\n $ERROR('#4: (new Number(-1)).toString(30) === \"-1\"');\n}\n\n//CHECK#5\nif((new Number(1)).toString(30) !== \"1\"){\n $ERROR('#5: (new Number(1)).toString(30) === \"1\"');\n}\n\n//CHECK#6\nif((new Number(Number.NaN)).toString(30) !== \"NaN\"){\n $ERROR('#6: (new Number(Number.NaN)).toString(30) === \"NaN\"');\n}\n\n//CHECK#7\nif((new Number(Number.POSITIVE_INFINITY)).toString(30) !== \"Infinity\"){\n $ERROR('#7: (new Number(Number.POSITIVE_INFINITY)).toString(30) === \"Infinity\"');\n}\n\n//CHECK#8\nif((new Number(Number.NEGATIVE_INFINITY)).toString(30) !== \"-Infinity\"){\n $ERROR('#8: (new Number(Number.NEGATIVE_INFINITY)).toString(30) === \"-Infinity\"');\n}\n",
+ "id": "S15.7.4.2_A2_T28"
+ },
+ {
+ "section": "15.7.4.2",
+ "description": "radix is 31",
+ "test": "//CHECK#1\nif(Number.prototype.toString(31) !== \"0\"){\n $ERROR('#1: Number.prototype.toString(31) === \"0\"');\n}\n\n//CHECK#2\nif((new Number()).toString(31) !== \"0\"){\n $ERROR('#2: (new Number()).toString(31) === \"0\"');\n}\n\n//CHECK#3\nif((new Number(0)).toString(31) !== \"0\"){\n $ERROR('#3: (new Number(0)).toString(31) === \"0\"');\n}\n\n//CHECK#4\nif((new Number(-1)).toString(31) !== \"-1\"){\n $ERROR('#4: (new Number(-1)).toString(31) === \"-1\"');\n}\n\n//CHECK#5\nif((new Number(1)).toString(31) !== \"1\"){\n $ERROR('#5: (new Number(1)).toString(31) === \"1\"');\n}\n\n//CHECK#6\nif((new Number(Number.NaN)).toString(31) !== \"NaN\"){\n $ERROR('#6: (new Number(Number.NaN)).toString(31) === \"NaN\"');\n}\n\n//CHECK#7\nif((new Number(Number.POSITIVE_INFINITY)).toString(31) !== \"Infinity\"){\n $ERROR('#7: (new Number(Number.POSITIVE_INFINITY)).toString(31) === \"Infinity\"');\n}\n\n//CHECK#8\nif((new Number(Number.NEGATIVE_INFINITY)).toString(31) !== \"-Infinity\"){\n $ERROR('#8: (new Number(Number.NEGATIVE_INFINITY)).toString(31) === \"-Infinity\"');\n}\n",
+ "id": "S15.7.4.2_A2_T29"
+ },
+ {
+ "section": "15.7.4.2",
+ "description": "radix is 32",
+ "test": "//CHECK#1\nif(Number.prototype.toString(32) !== \"0\"){\n $ERROR('#1: Number.prototype.toString(32) === \"0\"');\n}\n\n//CHECK#2\nif((new Number()).toString(32) !== \"0\"){\n $ERROR('#2: (new Number()).toString(32) === \"0\"');\n}\n\n//CHECK#3\nif((new Number(0)).toString(32) !== \"0\"){\n $ERROR('#3: (new Number(0)).toString(32) === \"0\"');\n}\n\n//CHECK#4\nif((new Number(-1)).toString(32) !== \"-1\"){\n $ERROR('#4: (new Number(-1)).toString(32) === \"-1\"');\n}\n\n//CHECK#5\nif((new Number(1)).toString(32) !== \"1\"){\n $ERROR('#5: (new Number(1)).toString(32) === \"1\"');\n}\n\n//CHECK#6\nif((new Number(Number.NaN)).toString(32) !== \"NaN\"){\n $ERROR('#6: (new Number(Number.NaN)).toString(32) === \"NaN\"');\n}\n\n//CHECK#7\nif((new Number(Number.POSITIVE_INFINITY)).toString(32) !== \"Infinity\"){\n $ERROR('#7: (new Number(Number.POSITIVE_INFINITY)).toString(32) === \"Infinity\"');\n}\n\n//CHECK#8\nif((new Number(Number.NEGATIVE_INFINITY)).toString(32) !== \"-Infinity\"){\n $ERROR('#8: (new Number(Number.NEGATIVE_INFINITY)).toString(32) === \"-Infinity\"');\n}\n",
+ "id": "S15.7.4.2_A2_T30"
+ },
+ {
+ "section": "15.7.4.2",
+ "description": "radix is 33",
+ "test": "//CHECK#1\nif(Number.prototype.toString(33) !== \"0\"){\n $ERROR('#1: Number.prototype.toString(33) === \"0\"');\n}\n\n//CHECK#2\nif((new Number()).toString(33) !== \"0\"){\n $ERROR('#2: (new Number()).toString(33) === \"0\"');\n}\n\n//CHECK#3\nif((new Number(0)).toString(33) !== \"0\"){\n $ERROR('#3: (new Number(0)).toString(33) === \"0\"');\n}\n\n//CHECK#4\nif((new Number(-1)).toString(33) !== \"-1\"){\n $ERROR('#4: (new Number(-1)).toString(33) === \"-1\"');\n}\n\n//CHECK#5\nif((new Number(1)).toString(33) !== \"1\"){\n $ERROR('#5: (new Number(1)).toString(33) === \"1\"');\n}\n\n//CHECK#6\nif((new Number(Number.NaN)).toString(33) !== \"NaN\"){\n $ERROR('#6: (new Number(Number.NaN)).toString(33) === \"NaN\"');\n}\n\n//CHECK#7\nif((new Number(Number.POSITIVE_INFINITY)).toString(33) !== \"Infinity\"){\n $ERROR('#7: (new Number(Number.POSITIVE_INFINITY)).toString(33) === \"Infinity\"');\n}\n\n//CHECK#8\nif((new Number(Number.NEGATIVE_INFINITY)).toString(33) !== \"-Infinity\"){\n $ERROR('#8: (new Number(Number.NEGATIVE_INFINITY)).toString(33) === \"-Infinity\"');\n}\n",
+ "id": "S15.7.4.2_A2_T31"
+ },
+ {
+ "section": "15.7.4.2",
+ "description": "radix is 34",
+ "test": "//CHECK#1\nif(Number.prototype.toString(34) !== \"0\"){\n $ERROR('#1: Number.prototype.toString(34) === \"0\"');\n}\n\n//CHECK#2\nif((new Number()).toString(34) !== \"0\"){\n $ERROR('#2: (new Number()).toString(34) === \"0\"');\n}\n\n//CHECK#3\nif((new Number(0)).toString(34) !== \"0\"){\n $ERROR('#3: (new Number(0)).toString(34) === \"0\"');\n}\n\n//CHECK#4\nif((new Number(-1)).toString(34) !== \"-1\"){\n $ERROR('#4: (new Number(-1)).toString(34) === \"-1\"');\n}\n\n//CHECK#5\nif((new Number(1)).toString(34) !== \"1\"){\n $ERROR('#5: (new Number(1)).toString(34) === \"1\"');\n}\n\n//CHECK#6\nif((new Number(Number.NaN)).toString(34) !== \"NaN\"){\n $ERROR('#6: (new Number(Number.NaN)).toString(34) === \"NaN\"');\n}\n\n//CHECK#7\nif((new Number(Number.POSITIVE_INFINITY)).toString(34) !== \"Infinity\"){\n $ERROR('#7: (new Number(Number.POSITIVE_INFINITY)).toString(34) === \"Infinity\"');\n}\n\n//CHECK#8\nif((new Number(Number.NEGATIVE_INFINITY)).toString(34) !== \"-Infinity\"){\n $ERROR('#8: (new Number(Number.NEGATIVE_INFINITY)).toString(34) === \"-Infinity\"');\n}\n",
+ "id": "S15.7.4.2_A2_T32"
+ },
+ {
+ "section": "15.7.4.2",
+ "description": "radix is 35",
+ "test": "//CHECK#1\nif(Number.prototype.toString(35) !== \"0\"){\n $ERROR('#1: Number.prototype.toString(35) === \"0\"');\n}\n\n//CHECK#2\nif((new Number()).toString(35) !== \"0\"){\n $ERROR('#2: (new Number()).toString(35) === \"0\"');\n}\n\n//CHECK#3\nif((new Number(0)).toString(35) !== \"0\"){\n $ERROR('#3: (new Number(0)).toString(35) === \"0\"');\n}\n\n//CHECK#4\nif((new Number(-1)).toString(35) !== \"-1\"){\n $ERROR('#4: (new Number(-1)).toString(35) === \"-1\"');\n}\n\n//CHECK#5\nif((new Number(1)).toString(35) !== \"1\"){\n $ERROR('#5: (new Number(1)).toString(35) === \"1\"');\n}\n\n//CHECK#6\nif((new Number(Number.NaN)).toString(35) !== \"NaN\"){\n $ERROR('#6: (new Number(Number.NaN)).toString(35) === \"NaN\"');\n}\n\n//CHECK#7\nif((new Number(Number.POSITIVE_INFINITY)).toString(35) !== \"Infinity\"){\n $ERROR('#7: (new Number(Number.POSITIVE_INFINITY)).toString(35) === \"Infinity\"');\n}\n\n//CHECK#8\nif((new Number(Number.NEGATIVE_INFINITY)).toString(35) !== \"-Infinity\"){\n $ERROR('#8: (new Number(Number.NEGATIVE_INFINITY)).toString(35) === \"-Infinity\"');\n}\n",
+ "id": "S15.7.4.2_A2_T33"
+ },
+ {
+ "section": "15.7.4.2",
+ "description": "radix is 36",
+ "test": "//CHECK#1\nif(Number.prototype.toString(36) !== \"0\"){\n $ERROR('#1: Number.prototype.toString(36) === \"0\"');\n}\n\n//CHECK#2\nif((new Number()).toString(36) !== \"0\"){\n $ERROR('#2: (new Number()).toString(36) === \"0\"');\n}\n\n//CHECK#3\nif((new Number(0)).toString(36) !== \"0\"){\n $ERROR('#3: (new Number(0)).toString(36) === \"0\"');\n}\n\n//CHECK#4\nif((new Number(-1)).toString(36) !== \"-1\"){\n $ERROR('#4: (new Number(-1)).toString(36) === \"-1\"');\n}\n\n//CHECK#5\nif((new Number(1)).toString(36) !== \"1\"){\n $ERROR('#5: (new Number(1)).toString(36) === \"1\"');\n}\n\n//CHECK#6\nif((new Number(Number.NaN)).toString(36) !== \"NaN\"){\n $ERROR('#6: (new Number(Number.NaN)).toString(36) === \"NaN\"');\n}\n\n//CHECK#7\nif((new Number(Number.POSITIVE_INFINITY)).toString(36) !== \"Infinity\"){\n $ERROR('#7: (new Number(Number.POSITIVE_INFINITY)).toString(36) === \"Infinity\"');\n}\n\n//CHECK#8\nif((new Number(Number.NEGATIVE_INFINITY)).toString(36) !== \"-Infinity\"){\n $ERROR('#8: (new Number(Number.NEGATIVE_INFINITY)).toString(36) === \"-Infinity\"');\n}\n",
+ "id": "S15.7.4.2_A2_T34"
+ },
+ {
+ "section": "15.7.4.2",
+ "description": "radix is 1",
+ "test": "//CHECK#1\ntry{\n var n = Number.prototype.toString(1);\n $ERROR('#1: Number.prototype.toString(1) should throw an Error');\n}\ncatch(e){\n}\n\n//CHECK#2\ntry{\n var n = (new Number()).toString(1);\n $ERROR('#2: (new Number()).toString(1) should throw an Error');\n}\ncatch(e){\n}\n\n//CHECK#3\ntry{\n var n = (new Number(0)).toString(1);\n $ERROR('#3: (new Number(0)).toString(1) should throw an Error');\n}\ncatch(e){\n}\n\n//CHECK#4\ntry{\n var n = (new Number(-1)).toString(1);\n $ERROR('#4: (new Number(-1)).toString(1) should throw an Error');\n}\ncatch(e){\n}\n\n//CHECK#5\ntry{\n var n =(new Number(1)).toString(1);\n $ERROR('#5: (new Number(1)).toString(1) should throw an Error');\n}\ncatch(e){\n}\n\n//CHECK#6\ntry{\n var n =(new Number(Number.NaN)).toString(1);\n $ERROR('#6: (new Number(Number.NaN)).toString(1) should throw an Error');\n}\ncatch(e){\n}\n\n//CHECK#7\ntry{\n var n =(new Number(Number.POSITIVE_INFINITY)).toString(1);\n $ERROR('#7: (new Number(Number.POSITIVE_INFINITY)).toString(1) should throw an Error');\n}\ncatch(e){\n}\n\n//CHECK#8\ntry{\n var n =(new Number(Number.NEGATIVE_INFINITY)).toString(1);\n $ERROR('#8: (new Number(Number.NEGATIVE_INFINITY)).toString(1) should throw an Error');\n}\ncatch(e){\n}\n",
+ "id": "S15.7.4.2_A3_T01"
+ },
+ {
+ "section": "15.7.4.2",
+ "description": "radix is 37",
+ "test": "//CHECK#1\ntry{\n var n =Number.prototype.toString(37);\n $ERROR('#1: Number.prototype.toString(37) should throw an Error');\n}\ncatch(e){\n}\n\n//CHECK#2\ntry{\n var n =(new Number()).toString(37);\n $ERROR('#2: (new Number()).toString(37) should throw an Error');\n}\ncatch(e){\n}\n\n//CHECK#3\ntry{\n var n =(new Number(0)).toString(37);\n $ERROR('#3: (new Number(0)).toString(37) should throw an Error');\n}\ncatch(e){\n}\n\n//CHECK#4\ntry{\n var n =(new Number(-1)).toString(37);\n $ERROR('#4: (new Number(-1)).toString(37) should throw an Error');\n}\ncatch(e){\n}\n\n//CHECK#5\ntry{\n var n =(new Number(1)).toString(37);\n $ERROR('#5: (new Number(1)).toString(37) should throw an Error');\n}\ncatch(e){\n}\n\n//CHECK#6\ntry{\n var n =(new Number(Number.NaN)).toString(37);\n $ERROR('#6: (new Number(Number.NaN)).toString(37) should throw an Error');\n}\ncatch(e){\n}\n\n//CHECK#7\ntry{\n var n =(new Number(Number.POSITIVE_INFINITY)).toString(37);\n $ERROR('#7: (new Number(Number.POSITIVE_INFINITY)).toString(37) should throw an Error');\n}\ncatch(e){\n}\n\n//CHECK#8\ntry{\n var n =(new Number(Number.NEGATIVE_INFINITY)).toString(37);\n $ERROR('#8: (new Number(Number.NEGATIVE_INFINITY)).toString(37) should throw an Error');\n}\ncatch(e){\n}\n",
+ "id": "S15.7.4.2_A3_T02"
+ },
+ {
+ "section": "15.7.4.2",
+ "description": "radix is null value",
+ "test": "//CHECK#1\ntry{\n var n = Number.prototype.toString(null);\n $ERROR('#1: Number.prototype.toString(null) should throw an Error');\n}\ncatch(e){\n}\n\n//CHECK#2\ntry{\n var n = (new Number()).toString(null);\n $ERROR('#2: (new Number()).toString(null) should throw an Error');\n}\ncatch(e){\n}\n\n//CHECK#3\ntry{\n var n = (new Number(0)).toString(null);\n $ERROR('#3: (new Number(0)).toString(null) should throw an Error');\n}\ncatch(e){\n}\n\n//CHECK#4\ntry{\n var n = (new Number(-1)).toString(null);\n $ERROR('#4: (new Number(-1)).toString(null) should throw an Error');\n}\ncatch(e){\n}\n\n//CHECK#5\ntry{\n var n = (new Number(1)).toString(null);\n $ERROR('#5: (new Number(1)).toString(null) should throw an Error');\n}\ncatch(e){\n}\n\n//CHECK#6\ntry{\n var n = (new Number(Number.NaN)).toString(null);\n $ERROR('#6: (new Number(Number.NaN)).toString(null) should throw an Error');\n}\ncatch(e){\n}\n\n//CHECK#7\ntry{\n var n = (new Number(Number.POSITIVE_INFINITY)).toString(null);\n $ERROR('#7: (new Number(Number.POSITIVE_INFINITY)).toString(null) should throw an Error');\n}\ncatch(e){\n}\n\n//CHECK#8\ntry{\n var n = (new Number(Number.NEGATIVE_INFINITY)).toString(null);\n $ERROR('#8: (new Number(Number.NEGATIVE_INFINITY)).toString(null) should throw an Error');\n}\ncatch(e){\n}\n",
+ "id": "S15.7.4.2_A3_T03"
+ },
+ {
+ "section": "15.7.4.2",
+ "description": "radix is 0",
+ "test": "//CHECK#1\ntry{\n var n = Number.prototype.toString(0);\n $ERROR('#1: Number.prototype.toString(0) should throw an Error');\n}\ncatch(e){\n}\n\n//CHECK#2\ntry{\n var n = (new Number()).toString(0);\n $ERROR('#2: (new Number()).toString(0) should throw an Error');\n}\ncatch(e){\n}\n\n//CHECK#3\ntry{\n var n = (new Number(0)).toString(0);\n $ERROR('#3: (new Number(0)).toString(0) should throw an Error');\n}\ncatch(e){\n}\n\n//CHECK#4\ntry{\n var n = (new Number(-1)).toString(0);\n $ERROR('#4: (new Number(-1)).toString(0) should throw an Error');\n}\ncatch(e){\n}\n\n//CHECK#5\ntry{\n var n = (new Number(1)).toString(0);\n $ERROR('#5: (new Number(1)).toString(0) should throw an Error');\n}\ncatch(e){\n}\n\n//CHECK#6\ntry{\n var n = (new Number(Number.NaN)).toString(0);\n $ERROR('#6: (new Number(Number.NaN)).toString(0) should throw an Error');\n}\ncatch(e){\n}\n\n//CHECK#7\ntry{\n var n = (new Number(Number.POSITIVE_INFINITY)).toString(0);\n $ERROR('#7: (new Number(Number.POSITIVE_INFINITY)).toString(0) should throw an Error');\n}\ncatch(e){\n}\n\n//CHECK#8\ntry{\n var n = (new Number(Number.NEGATIVE_INFINITY)).toString(0);\n $ERROR('#8: (new Number(Number.NEGATIVE_INFINITY)).toString(0) should throw an Error');\n}\ncatch(e){\n}\n",
+ "id": "S15.7.4.2_A3_T04"
+ },
+ {
+ "section": "15.7.4.2",
+ "description": "transferring to the String objects",
+ "test": "//CHECK#1\ntry{\n var s1 = new String();\n s1.toString = Number.prototype.toString;\n var v1 = s1.toString(); \n $ERROR('#1: Number.prototype.toString on not a Number object should throw TypeError');\n}\ncatch(e){\n if(!(e instanceof TypeError)){\n $ERROR('#1: Number.prototype.toString on not a Number object should throw TypeError, not '+e);\n }\n}\n\n//CHECK#2\ntry{\n var s2 = new String();\n s2.myToString = Number.prototype.toString;\n var v2 = s2.myToString(); \n $ERROR('#2: Number.prototype.toString on not a Number object should throw TypeError');\n}\ncatch(e){\n if(!(e instanceof TypeError)){\n $ERROR('#2: Number.prototype.toString on not a Number object should throw TypeError, not '+e);\n }\n}\n\n",
+ "id": "S15.7.4.2_A4_T01"
+ },
+ {
+ "section": "15.7.4.2",
+ "description": "transferring to the Boolean objects",
+ "test": "//CHECK#1\ntry{\n var s1 = new Boolean();\n s1.toString = Number.prototype.toString;\n var v1 = s1.toString(); \n $ERROR('#1: Number.prototype.toString on not a Number object should throw TypeError');\n}\ncatch(e){\n if(!(e instanceof TypeError)){\n $ERROR('#1: Number.prototype.toString on not a Number object should throw TypeError, not '+e);\n }\n}\n\n//CHECK#2\ntry{\n var s2 = new Boolean();\n s2.myToString = Number.prototype.toString;\n var v2 = s2.myToString(); \n $ERROR('#2: Number.prototype.toString on not a Number object should throw TypeError');\n}\ncatch(e){\n if(!(e instanceof TypeError)){\n $ERROR('#2: Number.prototype.toString on not a Number object should throw TypeError, not '+e);\n }\n}\n\n",
+ "id": "S15.7.4.2_A4_T02"
+ },
+ {
+ "section": "15.7.4.2",
+ "description": "transferring to the Date objects",
+ "test": "//CHECK#1\ntry{\n var s1 = new Date();\n s1.toString = Number.prototype.toString;\n var v1 = s1.toString(); \n $ERROR('#1: Number.prototype.toString on not a Number object should throw TypeError');\n}\ncatch(e){\n if(!(e instanceof TypeError)){\n $ERROR('#1: Number.prototype.toString on not a Number object should throw TypeError, not '+e);\n }\n}\n\n//CHECK#2\ntry{\n var s2 = new Date();\n s2.myToString = Number.prototype.toString;\n var v2 = s2.myToString(); \n $ERROR('#2: Number.prototype.toString on not a Number object should throw TypeError');\n}\ncatch(e){\n if(!(e instanceof TypeError)){\n $ERROR('#2: Number.prototype.toString on not a Number object should throw TypeError, not '+e);\n }\n}\n\n",
+ "id": "S15.7.4.2_A4_T03"
+ },
+ {
+ "section": "15.7.4.2",
+ "description": "transferring to the Object objects",
+ "test": "//CHECK#1\ntry{\n var s1 = new Object();\n s1.toString = Number.prototype.toString;\n var v1 = s1.toString(); \n $ERROR('#1: Number.prototype.toString on not a Number object should throw TypeError');\n}\ncatch(e){\n if(!(e instanceof TypeError)){\n $ERROR('#1: Number.prototype.toString on not a Number object should throw TypeError, not '+e);\n }\n}\n\n//CHECK#2\ntry{\n var s2 = new Object();\n s2.myToString = Number.prototype.toString;\n var v2 = s2.myToString(); \n $ERROR('#2: Number.prototype.toString on not a Number object should throw TypeError');\n}\ncatch(e){\n if(!(e instanceof TypeError)){\n $ERROR('#2: Number.prototype.toString on not a Number object should throw TypeError, not '+e);\n }\n}\n\n",
+ "id": "S15.7.4.2_A4_T04"
+ },
+ {
+ "section": "15.7.4.2",
+ "description": "transferring to the other objects",
+ "test": "//CHECK#1\ntry{\n var s1 = {x: 1};\n s1.toString = Number.prototype.toString;\n var v1 = s1.toString(); \n $ERROR('#1: Number.prototype.toString on not a Number object should throw TypeError');\n}\ncatch(e){\n if(!(e instanceof TypeError)){\n $ERROR('#1: Number.prototype.toString on not a Number object should throw TypeError, not '+e);\n }\n}\n\n//CHECK#2\ntry{\n var s2 = {x: 1};\n s2.myToString = Number.prototype.toString;\n var v2 = s2.myToString(); \n $ERROR('#2: Number.prototype.toString on not a Number object should throw TypeError');\n}\ncatch(e){\n if(!(e instanceof TypeError)){\n $ERROR('#2: Number.prototype.toString on not a Number object should throw TypeError, not '+e);\n }\n}\n\n",
+ "id": "S15.7.4.2_A4_T05"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.7.4.4_Number.prototype.valueOf.json b/website/resources/scripts/testcases2/15.7.4.4_Number.prototype.valueOf.json
new file mode 100644
index 000000000..a5070c958
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.7.4.4_Number.prototype.valueOf.json
@@ -0,0 +1,50 @@
+{
+ "testCollection": {
+ "name": "15.7.4.4_Number.prototype.valueOf",
+ "numTests": 7,
+ "tests": [
+ {
+ "section": "15.7.4.4",
+ "description": "Call without argument",
+ "test": "//CHECK#1\nif(Number.prototype.valueOf() !== 0){\n $ERROR('#1: Number.prototype.valueOf() === 0');\n}\n\n//CHECK#2\nif((new Number()).valueOf() !== 0){\n $ERROR('#2: (new Number()).valueOf() === 0');\n}\n\n//CHECK#3\nif((new Number(0)).valueOf() !== 0){\n $ERROR('#3: (new Number(0)).valueOf() === 0');\n}\n\n//CHECK#4\nif((new Number(-1)).valueOf() !== -1){\n $ERROR('#4: (new Number(-1)).valueOf() === -1');\n}\n\n//CHECK#5\nif((new Number(1)).valueOf() !== 1){\n $ERROR('#5: (new Number(1)).valueOf() === 1');\n}\n\n//CHECK#6\nif(!isNaN((new Number(Number.NaN)).valueOf())){\n $ERROR('#6: (new Number(Number.NaN)).valueOf() === NaN');\n}\n\n//CHECK#7\nif((new Number(Number.POSITIVE_INFINITY)).valueOf() !== Number.POSITIVE_INFINITY){\n $ERROR('#7: (new Number(Number.POSITIVE_INFINITY)).valueOf() === Infinity');\n}\n\n//CHECK#8\nif((new Number(Number.NEGATIVE_INFINITY)).valueOf() !== Number.NEGATIVE_INFINITY){\n $ERROR('#8: (new Number(Number.NEGATIVE_INFINITY)).valueOf() === -Infinity');\n}\n",
+ "id": "S15.7.4.4_A1_T01"
+ },
+ {
+ "section": "15.7.4.4",
+ "description": "calling with argument",
+ "test": "//CHECK#1\nif(Number.prototype.valueOf(\"argument\") !== 0){\n $ERROR('#1: Number.prototype.valueOf(\"argument\") === 0');\n}\n\n//CHECK#2\nif((new Number()).valueOf(\"argument\") !== 0){\n $ERROR('#2: (new Number()).valueOf(\"argument\") === 0');\n}\n\n//CHECK#3\nif((new Number(0)).valueOf(\"argument\") !== 0){\n $ERROR('#3: (new Number(0)).valueOf(\"argument\") === 0');\n}\n\n//CHECK#4\nif((new Number(-1)).valueOf(\"argument\") !== -1){\n $ERROR('#4: (new Number(-1)).valueOf(\"argument\") === -1');\n}\n\n//CHECK#5\nif((new Number(1)).valueOf(\"argument\") !== 1){\n $ERROR('#5: (new Number(1)).valueOf(\"argument\") === 1');\n}\n\n//CHECK#6\nif(!isNaN((new Number(Number.NaN)).valueOf(\"argument\"))){\n $ERROR('#6: (new Number(Number.NaN)).valueOf(\"argument\") === NaN');\n}\n\n//CHECK#7\nif((new Number(Number.POSITIVE_INFINITY)).valueOf(\"argument\") !== Number.POSITIVE_INFINITY){\n $ERROR('#7: (new Number(Number.POSITIVE_INFINITY)).valueOf(\"argument\") === Infinity');\n}\n\n//CHECK#8\nif((new Number(Number.NEGATIVE_INFINITY)).valueOf(\"argument\") !== Number.NEGATIVE_INFINITY){\n $ERROR('#8: (new Number(Number.NEGATIVE_INFINITY)).valueOf(\"argument\") === -Infinity');\n}\n",
+ "id": "S15.7.4.4_A1_T02"
+ },
+ {
+ "section": "15.7.4.4",
+ "description": "transferring to the String objects",
+ "test": "//CHECK#1\ntry{\n var s1 = new String();\n s1.valueOf = Number.prototype.valueOf;\n var v1 = s1.valueOf(); \n $ERROR('#1: Number.prototype.valueOf on not a Number object should throw TypeError');\n}\ncatch(e){\n if(!(e instanceof TypeError)){\n $ERROR('#1: Number.prototype.valueOf on not a Number object should throw TypeError, not '+e);\n }\n}\n\n//CHECK#2\ntry{\n var s2 = new String();\n s2.myValueOf = Number.prototype.valueOf;\n var v2 = s2.myValueOf(); \n $ERROR('#2: Number.prototype.valueOf on not a Number object should throw TypeError');\n}\ncatch(e){\n if(!(e instanceof TypeError)){\n $ERROR('#2: Number.prototype.valueOf on not a Number object should throw TypeError, not '+e);\n }\n}\n\n",
+ "id": "S15.7.4.4_A2_T01"
+ },
+ {
+ "section": "15.7.4.4",
+ "description": "transferring to the Boolean objects",
+ "test": "//CHECK#1\ntry{\n var s1 = new Boolean();\n s1.valueOf = Number.prototype.valueOf;\n var v1 = s1.valueOf(); \n $ERROR('#1: Number.prototype.valueOf on not a Number object should throw TypeError');\n}\ncatch(e){\n if(!(e instanceof TypeError)){\n $ERROR('#1: Number.prototype.valueOf on not a Number object should throw TypeError, not '+e);\n }\n}\n\n//CHECK#2\ntry{\n var s2 = new Boolean();\n s2.myValueOf = Number.prototype.valueOf;\n var v2 = s2.myValueOf(); \n $ERROR('#2: Number.prototype.valueOf on not a Number object should throw TypeError');\n}\ncatch(e){\n if(!(e instanceof TypeError)){\n $ERROR('#2: Number.prototype.valueOf on not a Number object should throw TypeError, not '+e);\n }\n}\n\n",
+ "id": "S15.7.4.4_A2_T02"
+ },
+ {
+ "section": "15.7.4.4",
+ "description": "transferring to the Date objects",
+ "test": "//CHECK#1\ntry{\n var s1 = new Date();\n s1.valueOf = Number.prototype.valueOf;\n var v1 = s1.valueOf(); \n $ERROR('#1: Number.prototype.valueOf on not a Number object should throw TypeError');\n}\ncatch(e){\n if(!(e instanceof TypeError)){\n $ERROR('#1: Number.prototype.valueOf on not a Number object should throw TypeError, not '+e);\n }\n}\n\n//CHECK#2\ntry{\n var s2 = new Date();\n s2.myValueOf = Number.prototype.valueOf;\n var v2 = s2.myValueOf(); \n $ERROR('#2: Number.prototype.valueOf on not a Number object should throw TypeError');\n}\ncatch(e){\n if(!(e instanceof TypeError)){\n $ERROR('#2: Number.prototype.valueOf on not a Number object should throw TypeError, not '+e);\n }\n}\n\n",
+ "id": "S15.7.4.4_A2_T03"
+ },
+ {
+ "section": "15.7.4.4",
+ "description": "transferring to the Object objects",
+ "test": "//CHECK#1\ntry{\n var s1 = new Object();\n s1.valueOf = Number.prototype.valueOf;\n var v1 = s1.valueOf(); \n $ERROR('#1: Number.prototype.valueOf on not a Number object should throw TypeError');\n}\ncatch(e){\n if(!(e instanceof TypeError)){\n $ERROR('#1: Number.prototype.valueOf on not a Number object should throw TypeError, not '+e);\n }\n}\n\n//CHECK#2\ntry{\n var s2 = new Object();\n s2.myValueOf = Number.prototype.valueOf;\n var v2 = s2.myValueOf(); \n $ERROR('#2: Number.prototype.valueOf on not a Number object should throw TypeError');\n}\ncatch(e){\n if(!(e instanceof TypeError)){\n $ERROR('#2: Number.prototype.valueOf on not a Number object should throw TypeError, not '+e);\n }\n}\n\n",
+ "id": "S15.7.4.4_A2_T04"
+ },
+ {
+ "section": "15.7.4.4",
+ "description": "transferring to the other objects",
+ "test": "//CHECK#1\ntry{\n var s1 = {x: 1};\n s1.valueOf = Number.prototype.valueOf;\n var v1 = s1.valueOf(); \n $ERROR('#1: Number.prototype.valueOf on not a Number object should throw TypeError');\n}\ncatch(e){\n if(!(e instanceof TypeError)){\n $ERROR('#1: Number.prototype.valueOf on not a Number object should throw TypeError, not '+e);\n }\n}\n\n//CHECK#2\ntry{\n var s2 = {x: 1};\n s2.myValueOf = Number.prototype.valueOf;\n var v2 = s2.myValueOf(); \n $ERROR('#2: Number.prototype.valueOf on not a Number object should throw TypeError');\n}\ncatch(e){\n if(!(e instanceof TypeError)){\n $ERROR('#2: Number.prototype.valueOf on not a Number object should throw TypeError, not '+e);\n }\n}\n\n",
+ "id": "S15.7.4.4_A2_T05"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.7.4.5_Number.prototype.toFixed.json b/website/resources/scripts/testcases2/15.7.4.5_Number.prototype.toFixed.json
new file mode 100644
index 000000000..7a6a7c580
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.7.4.5_Number.prototype.toFixed.json
@@ -0,0 +1,44 @@
+{
+ "testCollection": {
+ "name": "15.7.4.5_Number.prototype.toFixed",
+ "numTests": 6,
+ "tests": [
+ {
+ "section": "15.7.4.5",
+ "description": "calling on Number prototype object",
+ "test": "//CHECK#1\nif(Number.prototype.toFixed() !== \"0\"){\n $ERROR('#1: Number.prototype.toFixed() === \"0\"');\n}\n\n//CHECK#2\nif(Number.prototype.toFixed(0) !== \"0\"){\n $ERROR('#2: Number.prototype.toFixed(0) === \"0\"');\n}\n\n//CHECK#3\nif(Number.prototype.toFixed(1) !== \"0.0\"){\n $ERROR('#3: Number.prototype.toFixed(1) === \"0.0\"');\n}\n\n//CHECK#4\nif(Number.prototype.toFixed(1.1) !== \"0.0\"){\n $ERROR('#4: Number.prototype.toFixed(1.1) === \"0.0\"');\n}\n\n//CHECK#5\nif(Number.prototype.toFixed(0.9) !== \"0\"){\n $ERROR('#5: Number.prototype.toFixed(0.9) === \"0\"');\n}\n\n//CHECK#6\nif(Number.prototype.toFixed(\"1\") !== \"0.0\"){\n $ERROR('#6: Number.prototype.toFixed(\"1\") === \"0.0\"');\n}\n\n//CHECK#7\nif(Number.prototype.toFixed(\"1.1\") !== \"0.0\"){\n $ERROR('#7: Number.prototype.toFixed(\"1.1\") === \"0.0\"');\n}\n\n//CHECK#8\nif(Number.prototype.toFixed(\"0.9\") !== \"0\"){\n $ERROR('#8: Number.prototype.toFixed(\"0.9\") === \"0\"');\n}\n\n//CHECK#9\nif(Number.prototype.toFixed(Number.NaN) !== \"0\"){\n $ERROR('#9: Number.prototype.toFixed(Number.NaN) === \"0\"');\n}\n\n//CHECK#10\nif(Number.prototype.toFixed(\"some string\") !== \"0\"){\n $ERROR('#9: Number.prototype.toFixed(\"some string\") === \"0\"');\n}\n\n//CHECK#10\ntry{\n if(Number.prototype.toFixed(-0.1) !== \"0\"){\n $ERROR('#10: Number.prototype.toFixed(-0.1) === \"0\"');\n }\n}\ncatch(e){\n $ERROR('#10: Number.prototype.toFixed(-0.1) should not throw '+e);\n}\n",
+ "id": "S15.7.4.5_A1.1_T01"
+ },
+ {
+ "section": "15.7.4.5",
+ "description": "calling on Number object",
+ "test": "//CHECK#1\nif((new Number(1)).toFixed() !== \"1\"){\n $ERROR('#1: (new Number(1)).prototype.toFixed() === \"1\"');\n}\n\n//CHECK#2\nif((new Number(1)).toFixed(0) !== \"1\"){\n $ERROR('#2: (new Number(1)).prototype.toFixed(0) === \"1\"');\n}\n\n//CHECK#3\nif((new Number(1)).toFixed(1) !== \"1.0\"){\n $ERROR('#3: (new Number(1)).prototype.toFixed(1) === \"1.0\"');\n}\n\n//CHECK#4\nif((new Number(1)).toFixed(1.1) !== \"1.0\"){\n $ERROR('#4: (new Number(1)).toFixed(1.1) === \"1.0\"');\n}\n\n//CHECK#5\nif((new Number(1)).toFixed(0.9) !== \"1\"){\n $ERROR('#5: (new Number(1)).toFixed(0.9) === \"1\"');\n}\n\n//CHECK#6\nif((new Number(1)).toFixed(\"1\") !== \"1.0\"){\n $ERROR('#6: (new Number(1)).toFixed(\"1\") === \"1.0\"');\n}\n\n//CHECK#7\nif((new Number(1)).toFixed(\"1.1\") !== \"1.0\"){\n $ERROR('#7: (new Number(1)).toFixed(\"1.1\") === \"1.0\"');\n}\n\n//CHECK#8\nif((new Number(1)).toFixed(\"0.9\") !== \"1\"){\n $ERROR('#8: (new Number(1)).toFixed(\"0.9\") === \"1\"');\n}\n\n//CHECK#9\nif((new Number(1)).toFixed(Number.NaN) !== \"1\"){\n $ERROR('#9: (new Number(1)).toFixed(Number.NaN) === \"1\"');\n}\n\n//CHECK#10\nif((new Number(1)).toFixed(\"some string\") !== \"1\"){\n $ERROR('#9: (new Number(1)).toFixed(\"some string\") === \"1\"');\n}\n\n//CHECK#10\ntry{\n if((new Number(1)).toFixed(-0.1) !== \"1\"){\n $ERROR('#10: (new Number(1)).toFixed(-0.1) === \"1\"');\n }\n}\ncatch(e){\n $ERROR('#10: (new Number(1)).toFixed(-0.1) should not throw '+e);\n}\n",
+ "id": "S15.7.4.5_A1.1_T02"
+ },
+ {
+ "section": "15.7.4.5",
+ "description": "NaN is computed by new Number(\"string\")",
+ "test": "//CHECK#1\nif((new Number(\"a\")).toFixed() !== \"NaN\"){\n $ERROR('#1: (new Number(\"a\")).prototype.toFixed() === \"NaN\"');\n}\n\n//CHECK#2\nif((new Number(\"a\")).toFixed(0) !== \"NaN\"){\n $ERROR('#2: (new Number(\"a\")).prototype.toFixed(0) === \"NaN\"');\n}\n\n//CHECK#3\nif((new Number(\"a\")).toFixed(1) !== \"NaN\"){\n $ERROR('#3: (new Number(\"a\")).prototype.toFixed(1) === \"NaN\"');\n}\n\n//CHECK#4\nif((new Number(\"a\")).toFixed(1.1) !== \"NaN\"){\n $ERROR('#4: (new Number(\"a\")).toFixed(1.1) === \"NaN\"');\n}\n\n//CHECK#5\nif((new Number(\"a\")).toFixed(0.9) !== \"NaN\"){\n $ERROR('#5: (new Number(\"a\")).toFixed(0.9) === \"NaN\"');\n}\n\n//CHECK#6\nif((new Number(\"a\")).toFixed(\"1\") !== \"NaN\"){\n $ERROR('#6: (new Number(\"a\")).toFixed(\"1\") === \"NaN\"');\n}\n\n//CHECK#7\nif((new Number(\"a\")).toFixed(\"1.1\") !== \"NaN\"){\n $ERROR('#7: (new Number(\"a\")).toFixed(\"1.1\") === \"NaN\"');\n}\n\n//CHECK#8\nif((new Number(\"a\")).toFixed(\"0.9\") !== \"NaN\"){\n $ERROR('#8: (new Number(\"a\")).toFixed(\"0.9\") === \"NaN\"');\n}\n\n//CHECK#9\nif((new Number(\"a\")).toFixed(Number.NaN) !== \"NaN\"){\n $ERROR('#9: (new Number(\"a\")).toFixed(Number.NaN) === \"NaN\"');\n}\n\n//CHECK#10\nif((new Number(\"a\")).toFixed(\"some string\") !== \"NaN\"){\n $ERROR('#9: (new Number(\"a\")).toFixed(\"some string\") === \"NaN\"');\n}\n\n//CHECK#10\ntry{\n s = (new Number(\"a\")).toFixed(Number.POSITIVE_INFINITY);\n $ERROR('#10: (new Number(\"a\")).toFixed(Number.POSITIVE_INFINITY) should throw RangeError, not return NaN');\n}\ncatch(e){\n if(!(e instanceof RangeError)){\n $ERROR('#10: (new Number(\"a\")).toFixed(Number.POSITIVE_INFINITY) should throw RangeError, not '+e);\n }\n}\n",
+ "id": "S15.7.4.5_A1.3_T01"
+ },
+ {
+ "section": "15.7.4.5",
+ "description": "direct usage of NaN",
+ "test": "//CHECK#1\nif(Number.NaN.toFixed() !== \"NaN\"){\n $ERROR('#1: Number.NaN.prototype.toFixed() === \"NaN\"');\n}\n\n//CHECK#2\nif(Number.NaN.toFixed(0) !== \"NaN\"){\n $ERROR('#2: Number.NaN.prototype.toFixed(0) === \"NaN\"');\n}\n\n//CHECK#3\nif(Number.NaN.toFixed(1) !== \"NaN\"){\n $ERROR('#3: Number.NaN.prototype.toFixed(1) === \"NaN\"');\n}\n\n//CHECK#4\nif(Number.NaN.toFixed(1.1) !== \"NaN\"){\n $ERROR('#4: Number.NaN.toFixed(1.1) === \"NaN\"');\n}\n\n//CHECK#5\nif(Number.NaN.toFixed(0.9) !== \"NaN\"){\n $ERROR('#5: Number.NaN.toFixed(0.9) === \"NaN\"');\n}\n\n//CHECK#6\nif(Number.NaN.toFixed(\"1\") !== \"NaN\"){\n $ERROR('#6: Number.NaN.toFixed(\"1\") === \"NaN\"');\n}\n\n//CHECK#7\nif(Number.NaN.toFixed(\"1.1\") !== \"NaN\"){\n $ERROR('#7: Number.NaN.toFixed(\"1.1\") === \"NaN\"');\n}\n\n//CHECK#8\nif(Number.NaN.toFixed(\"0.9\") !== \"NaN\"){\n $ERROR('#8: Number.NaN.toFixed(\"0.9\") === \"NaN\"');\n}\n\n//CHECK#9\nif(Number.NaN.toFixed(Number.NaN) !== \"NaN\"){\n $ERROR('#9: Number.NaN.toFixed(Number.NaN) === \"NaN\"');\n}\n\n//CHECK#10\nif(Number.NaN.toFixed(\"some string\") !== \"NaN\"){\n $ERROR('#9: Number.NaN.toFixed(\"some string\") === \"NaN\"');\n}\n\n//CHECK#10\ntry{\n s = Number.NaN.toFixed(Number.POSITIVE_INFINITY);\n $ERROR('#10: Number.NaN.toFixed(Number.POSITIVE_INFINITY) should throw RangeError, not return NaN');\n}\ncatch(e){\n if(!(e instanceof RangeError)){\n $ERROR('#10: Number.NaN.toFixed(Number.POSITIVE_INFINITY) should throw RangeError, not '+e);\n }\n}\n",
+ "id": "S15.7.4.5_A1.3_T02"
+ },
+ {
+ "section": "15.7.4.5",
+ "description": "x is 10^21",
+ "test": "//CHECK#1\nif((new Number(1e21)).toFixed() !== String(1e21)){\n $ERROR('#1: (new Number(1e21)).prototype.toFixed() === String(1e21)');\n}\n\n//CHECK#2\nif((new Number(1e21)).toFixed(0) !== String(1e21)){\n $ERROR('#2: (new Number(1e21)).prototype.toFixed(0) === String(1e21)');\n}\n\n//CHECK#3\nif((new Number(1e21)).toFixed(1) !== String(1e21)){\n $ERROR('#3: (new Number(1e21)).prototype.toFixed(1) === String(1e21)');\n}\n\n//CHECK#4\nif((new Number(1e21)).toFixed(1.1) !== String(1e21)){\n $ERROR('#4: (new Number(1e21)).toFixed(1.1) === String(1e21)');\n}\n\n//CHECK#5\nif((new Number(1e21)).toFixed(0.9) !== String(1e21)){\n $ERROR('#5: (new Number(1e21)).toFixed(0.9) === String(1e21)');\n}\n\n//CHECK#6\nif((new Number(1e21)).toFixed(\"1\") !== String(1e21)){\n $ERROR('#6: (new Number(1e21)).toFixed(\"1\") === String(1e21)');\n}\n\n//CHECK#7\nif((new Number(1e21)).toFixed(\"1.1\") !== String(1e21)){\n $ERROR('#7: (new Number(1e21)).toFixed(\"1.1\") === String(1e21)');\n}\n\n//CHECK#8\nif((new Number(1e21)).toFixed(\"0.9\") !== String(1e21)){\n $ERROR('#8: (new Number(1e21)).toFixed(\"0.9\") === String(1e21)');\n}\n\n//CHECK#9\nif((new Number(1e21)).toFixed(Number.NaN) !== String(1e21)){\n $ERROR('#9: (new Number(1e21)).toFixed(Number.NaN) === String(1e21)');\n}\n\n//CHECK#10\nif((new Number(1e21)).toFixed(\"some string\") !== String(1e21)){\n $ERROR('#9: (new Number(1e21)).toFixed(\"some string\") === String(1e21)');\n}\n\n//CHECK#10\ntry{\n s = (new Number(1e21)).toFixed(Number.POSITIVE_INFINITY);\n $ERROR('#10: (new Number(1e21)).toFixed(Number.POSITIVE_INFINITY) should throw RangeError, not return NaN');\n}\ncatch(e){\n if(!(e instanceof RangeError)){\n $ERROR('#10: (new Number(1e21)).toFixed(Number.POSITIVE_INFINITY) should throw RangeError, not '+e);\n }\n}\n",
+ "id": "S15.7.4.5_A1.4_T01"
+ },
+ {
+ "section": "15.7.4.5",
+ "description": "Checking Number prototype itself",
+ "test": "//CHECK#1\nif(Number.prototype.toFixed.hasOwnProperty(\"length\") !== true){\n $ERROR('#1: The length property of the toFixed method is 1');\n}\n\n//CHECK#2\nif(Number.prototype.toFixed.length !== 1){\n $ERROR('#2: The length property of the toFixed method is 1');\n}\n",
+ "id": "S15.7.4.5_A2_T01"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.7.4.json b/website/resources/scripts/testcases2/15.7.4.json
new file mode 100644
index 000000000..182e05d42
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.7.4.json
@@ -0,0 +1,15 @@
+{
+ "testCollection": {
+ "name": "15.7.4",
+ "numTests": 1,
+ "tests": [
+ {
+ "id": "15.7.4-1",
+ "path": "TestCases/chapter15/15.7/15.7.4/15.7.4-1.js",
+ "description": "Number prototype object: its [[Class]] must be 'Number'",
+ "test": "assertTrue((function testcase() {\n var numProto = Object.getPrototypeOf(new Number(42));\n var s = Object.prototype.toString.call(numProto );\n return (s === '[object Number]') ;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.getPrototypeOf))"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.7.4_Properties_of_the_Number_Prototype_Object.json b/website/resources/scripts/testcases2/15.7.4_Properties_of_the_Number_Prototype_Object.json
new file mode 100644
index 000000000..c71c175d3
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.7.4_Properties_of_the_Number_Prototype_Object.json
@@ -0,0 +1,62 @@
+{
+ "testCollection": {
+ "name": "15.7.4_Properties_of_the_Number_Prototype_Object",
+ "numTests": 9,
+ "tests": [
+ {
+ "section": "15.7.4",
+ "description": "Checking type and value of Number.prototype property",
+ "test": "//CHECK#1\nif (typeof Number.prototype !== \"object\") {\n $ERROR('#1: typeof Number.prototype === \"object\"');\n}\n\n//CHECK#2\nif (Number.prototype != 0) {\n $ERROR('#2: Number.prototype == +0');\n} else if( 1/Number.prototype != Number.POSITIVE_INFINITY){\n $ERROR('#2: Number.prototype == +0');\n}\n\ndelete Number.prototype.toString;\n\nif (Number.prototype.toString() !== \"[object Number]\") {\n $ERROR('#3: The [[Class]] property of the Number prototype object is set to \"Number\"');\n}\n",
+ "id": "S15.7.4_A1"
+ },
+ {
+ "section": "15.7.4",
+ "description": "Checking Object.prototype.isPrototypeOf(Number.prototype)",
+ "test": "//CHECK#1\nif (!Object.prototype.isPrototypeOf(Number.prototype)) {\n $ERROR('#1: Object prototype object is the prototype of Number prototype object');\n}\n",
+ "id": "S15.7.4_A2"
+ },
+ {
+ "section": "15.7.4",
+ "description": "The test uses hasOwnProperty() method",
+ "test": "//CHECK#1\nif(Number.prototype.hasOwnProperty(\"constructor\") !== true){\n $ERROR('#1: The Number prototype object has the property constructor');\n}\n\n",
+ "id": "S15.7.4_A3.1"
+ },
+ {
+ "section": "15.7.4",
+ "description": "The test uses hasOwnProperty() method",
+ "test": "//CHECK#1\nif(Number.prototype.hasOwnProperty(\"toString\") !== true){\n $ERROR('#1: The Number prototype object has the property toString');\n}\n\n",
+ "id": "S15.7.4_A3.2"
+ },
+ {
+ "section": "15.7.4",
+ "description": "The test uses hasOwnProperty() method",
+ "test": "//CHECK#1\nif(Number.prototype.hasOwnProperty(\"toLocaleString\") !== true){\n $ERROR('#1: The Number prototype object has the property toLocaleString');\n}\n\n",
+ "id": "S15.7.4_A3.3"
+ },
+ {
+ "section": "15.7.4",
+ "description": "The test uses hasOwnProperty() method",
+ "test": "//CHECK#1\nif(Number.prototype.hasOwnProperty(\"valueOf\") !== true){\n $ERROR('#1: The Number prototype object has the property valueOf');\n}\n\n",
+ "id": "S15.7.4_A3.4"
+ },
+ {
+ "section": "15.7.4",
+ "description": "The test uses hasOwnProperty() method",
+ "test": "//CHECK#1\nif(Number.prototype.hasOwnProperty(\"toFixed\") !== true){\n $ERROR('#1: The Number prototype object has the property toFixed');\n}\n\n",
+ "id": "S15.7.4_A3.5"
+ },
+ {
+ "section": "15.7.4",
+ "description": "The test uses hasOwnProperty() method",
+ "test": "//CHECK#1\nif(Number.prototype.hasOwnProperty(\"toExponential\") !== true){\n $ERROR('#1: The Number prototype object has the property toExponential');\n}\n\n",
+ "id": "S15.7.4_A3.6"
+ },
+ {
+ "section": "15.7.4",
+ "description": "The test uses hasOwnProperty() method",
+ "test": "//CHECK#1\nif(Number.prototype.hasOwnProperty(\"toPrecision\") !== true){\n $ERROR('#1: The Number prototype object has the property toPrecision');\n}\n\n",
+ "id": "S15.7.4_A3.7"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.7.5_Properties_of_Number_Instances.json b/website/resources/scripts/testcases2/15.7.5_Properties_of_Number_Instances.json
new file mode 100644
index 000000000..c037f3ef3
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.7.5_Properties_of_Number_Instances.json
@@ -0,0 +1,50 @@
+{
+ "testCollection": {
+ "name": "15.7.5_Properties_of_Number_Instances",
+ "numTests": 7,
+ "tests": [
+ {
+ "section": "15.7.5",
+ "description": "Checking property constructor",
+ "test": "//CHECK#1\nif((new Number()).hasOwnProperty(\"constructor\") !== false){\n $ERROR('#1: Number instance must have no special property \"constructor\"');\n}\n\n//CHECK#2\nif((new Number()).constructor !== Number.prototype.constructor){\n $ERROR('#2: Number instance property \"constructor\" must be inherited from Number prototype object');\n}\n\n",
+ "id": "S15.7.5_A1_T01"
+ },
+ {
+ "section": "15.7.5",
+ "description": "Checking property toString",
+ "test": "//CHECK#1\nif((new Number()).hasOwnProperty(\"toString\") !== false){\n $ERROR('#1: Number instance must have no special property \"toString\"');\n}\n\n//CHECK#2\nif((new Number()).toString !== Number.prototype.toString){\n $ERROR('#2: Number instance property \"toString\" must be inherited from Number prototype object');\n}\n\n",
+ "id": "S15.7.5_A1_T02"
+ },
+ {
+ "section": "15.7.5",
+ "description": "Checking property toLocaleString",
+ "test": "//CHECK#1\nif((new Number()).hasOwnProperty(\"toLocaleString\") !== false){\n $ERROR('#1: Number instance must have no special property \"toLocaleString\"');\n}\n\n//CHECK#2\nif((new Number()).toLocaleString !== Number.prototype.toLocaleString){\n $ERROR('#2: Number instance property \"toLocaleString\" must be inherited from Number prototype object');\n}\n\n",
+ "id": "S15.7.5_A1_T03"
+ },
+ {
+ "section": "15.7.5",
+ "description": "Checking property valueOf",
+ "test": "//CHECK#1\nif((new Number()).hasOwnProperty(\"valueOf\") !== false){\n $ERROR('#1: Number instance must have no special property \"valueOf\"');\n}\n\n//CHECK#2\nif((new Number()).valueOf !== Number.prototype.valueOf){\n $ERROR('#2: Number instance property \"valueOf\" must be inherited from Number prototype object');\n}\n\n",
+ "id": "S15.7.5_A1_T04"
+ },
+ {
+ "section": "15.7.5",
+ "description": "Checking property toFixed",
+ "test": "//CHECK#1\nif((new Number()).hasOwnProperty(\"toFixed\") !== false){\n $ERROR('#1: Number instance must have no special property \"toFixed\"');\n}\n\n//CHECK#2\nif((new Number()).toFixed !== Number.prototype.toFixed){\n $ERROR('#2: Number instance property \"toFixed\" must be inherited from Number prototype object');\n}\n\n",
+ "id": "S15.7.5_A1_T05"
+ },
+ {
+ "section": "15.7.5",
+ "description": "Checking property toExponential",
+ "test": "//CHECK#1\nif((new Number()).hasOwnProperty(\"toExponential\") !== false){\n $ERROR('#1: Number instance must have no special property \"toExponential\"');\n}\n\n//CHECK#2\nif((new Number()).toExponential !== Number.prototype.toExponential){\n $ERROR('#2: Number instance property \"toExponential\" must be inherited from Number prototype object');\n}\n\n",
+ "id": "S15.7.5_A1_T06"
+ },
+ {
+ "section": "15.7.5",
+ "description": "Checking property toPrecision",
+ "test": "//CHECK#1\nif((new Number()).hasOwnProperty(\"toPrecision\") !== false){\n $ERROR('#1: Number instance must have no special property \"toPrecision\"');\n}\n\n//CHECK#2\nif((new Number()).toPrecision !== Number.prototype.toPrecision){\n $ERROR('#2: Number instance property \"toPrecision\" must be inherited from Number prototype object');\n}\n\n",
+ "id": "S15.7.5_A1_T07"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.8.1.1_E.json b/website/resources/scripts/testcases2/15.8.1.1_E.json
new file mode 100644
index 000000000..3ae8a3e30
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.8.1.1_E.json
@@ -0,0 +1,36 @@
+{
+ "testCollection": {
+ "name": "15.8.1.1_E",
+ "numTests": 4,
+ "tests": [
+ {
+ "section": "15.8.1.1",
+ "description": "Comparing Math.E with 2.7182818284590452354",
+ "test": "$INCLUDE(\"math_precision.js\");\n$INCLUDE(\"math_isequal.js\");\n\n// CHECK#1\nif (!isEqual(Math.E, 2.7182818284590452354)) {\n $ERROR('#1: \\'Math.E is not approximately equal to 2.7182818284590452354\\'');\n}\n",
+ "id": "S15.8.1.1_A1"
+ },
+ {
+ "section": "15.8.1.1",
+ "description": "Checking if Math.E property has the attribute DontEnum",
+ "test": "// CHECK#1\nfor(x in Math) {\n if(x === \"E\") {\n $ERROR('#1: Value Property E of the Math Object hasn\\'t attribute DontEnum: \\'for(x in Math) {x===\"E\"}\\'');\n }\n}\n\n",
+ "id": "S15.8.1.1_A2"
+ },
+ {
+ "section": "15.8.1.1",
+ "description": "Checking if Math.E property has the attribute DontDelete",
+ "strict_mode_negative": "",
+ "test": "// CHECK#1\nif (delete Math.E === true) {\n $ERROR('#1: Value Property E of the Math Object hasn\\'t attribute DontDelete: \\'Math.E === true\\'');\n}\n\n",
+ "id": "S15.8.1.1_A3",
+ "strict_only": ""
+ },
+ {
+ "section": "15.8.1.1",
+ "description": "Checking if Math.E property has the attribute ReadOnly",
+ "strict_mode_negative": "",
+ "test": "// CHECK#1\nvar x = Math.E;\nMath.E = 1;\nif (Math.E !== x) {\n $ERROR('#1: Math.E hasn\\'t ReadOnly: \\'x = Math.E;Math.E = 1;Math.E === x\\'');\n}\n",
+ "id": "S15.8.1.1_A4",
+ "strict_only": ""
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.8.1.2_LN10.json b/website/resources/scripts/testcases2/15.8.1.2_LN10.json
new file mode 100644
index 000000000..6dad28b26
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.8.1.2_LN10.json
@@ -0,0 +1,36 @@
+{
+ "testCollection": {
+ "name": "15.8.1.2_LN10",
+ "numTests": 4,
+ "tests": [
+ {
+ "section": "15.8.1.2",
+ "description": "Comparing Math.LN10 with 2.302585092994046",
+ "test": "$INCLUDE(\"math_precision.js\");\n$INCLUDE(\"math_isequal.js\");\n\n// CHECK#1\nif (!isEqual(Math.LN10, 2.302585092994046)) {\n $ERROR('#1: \\'Math.LN10 is not approximately equal to 2.302585092994046\\'');\n}\n",
+ "id": "S15.8.1.2_A1"
+ },
+ {
+ "section": "15.8.1.2",
+ "description": "Checking if Math.LN10 property has the attribute DontEnum",
+ "test": "// CHECK#1\nfor(x in Math) {\n if(x === \"LN10\") {\n $ERROR('#1: Value Property LN10 of the Math Object hasn\\'t attribute DontEnum: \\'for(x in Math) {x===\"LN10\"}\\'');\n }\n}\n\n",
+ "id": "S15.8.1.2_A2"
+ },
+ {
+ "section": "15.8.1.2",
+ "description": "Checking if Math.LN10 property has the attribute DontDelete",
+ "strict_mode_negative": "",
+ "test": "// CHECK#1\nif (delete Math.LN10 === true) {\n $ERROR('#1: Value Property LN10 of the Math Object hasn\\'t attribute DontDelete: \\'Math.LN10 === true\\'');\n}\n\n",
+ "id": "S15.8.1.2_A3",
+ "strict_only": ""
+ },
+ {
+ "section": "15.8.1.2",
+ "description": "Checking if Math.LN10 property has the attribute ReadOnly",
+ "strict_mode_negative": "",
+ "test": "// CHECK#1\nvar x = Math.LN10;\nMath.LN10 = 1;\nif (Math.LN10 !== x) {\n $ERROR('#1: Math.LN10 hasn\\'t ReadOnly: \\'x = Math.LN10;Math.LN10 = 1;Math.LN10 === x\\'');\n}\n",
+ "id": "S15.8.1.2_A4",
+ "strict_only": ""
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.8.1.3_LN2.json b/website/resources/scripts/testcases2/15.8.1.3_LN2.json
new file mode 100644
index 000000000..6d0c28556
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.8.1.3_LN2.json
@@ -0,0 +1,36 @@
+{
+ "testCollection": {
+ "name": "15.8.1.3_LN2",
+ "numTests": 4,
+ "tests": [
+ {
+ "section": "15.8.1.3",
+ "description": "Comparing Math.LN2 with 0.6931471805599453",
+ "test": "$INCLUDE(\"math_precision.js\");\n$INCLUDE(\"math_isequal.js\");\n\n// CHECK#1\nif (!isEqual(Math.LN2, 0.6931471805599453)) {\n $ERROR('#1: \\'Math.LN2 is not approximately equal to 0.6931471805599453\\'');\n}\n",
+ "id": "S15.8.1.3_A1"
+ },
+ {
+ "section": "15.8.1.3",
+ "description": "Checking if Math.LN2 property has the attribute DontEnum",
+ "test": "// CHECK#1\nfor(x in Math) {\n if(x === \"LN2\") {\n $ERROR('#1: Value Property LN2 of the Math Object hasn\\'t attribute DontEnum: \\'for(x in Math) {x===\"LN2\"}\\'');\n }\n}\n\n",
+ "id": "S15.8.1.3_A2"
+ },
+ {
+ "section": "15.8.1.3",
+ "description": "Checking if Math.LN2 property has the attribute DontDelete",
+ "strict_mode_negative": "",
+ "test": "// CHECK#1\nif (delete Math.LN2 === true) {\n $ERROR('#1: Value Property LN2 of the Math Object hasn\\'t attribute DontDelete: \\'Math.LN2 === true\\'');\n}\n\n",
+ "id": "S15.8.1.3_A3",
+ "strict_only": ""
+ },
+ {
+ "section": "15.8.1.3",
+ "description": "Checking if Math.LN2 property has the attribute DontDelete",
+ "strict_mode_negative": "",
+ "test": "// CHECK#1\nvar x = Math.LN2;\nMath.LN2 = 1;\nif (Math.LN2 !== x) {\n $ERROR('#1: Math.LN2 hasn\\'t ReadOnly: \\'x = Math.LN2;Math.LN2 = 1;Math.LN2 === x\\'');\n}\n",
+ "id": "S15.8.1.3_A4",
+ "strict_only": ""
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.8.1.4_LOG2E.json b/website/resources/scripts/testcases2/15.8.1.4_LOG2E.json
new file mode 100644
index 000000000..aec48b1a7
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.8.1.4_LOG2E.json
@@ -0,0 +1,36 @@
+{
+ "testCollection": {
+ "name": "15.8.1.4_LOG2E",
+ "numTests": 4,
+ "tests": [
+ {
+ "section": "15.8.1.4",
+ "description": "Comparing Math.LOG2E with 1.4426950408889634",
+ "test": "$INCLUDE(\"math_precision.js\");\n$INCLUDE(\"math_isequal.js\");\n\n// CHECK#1\nif (!isEqual(Math.LOG2E, 1.4426950408889634)) {\n $ERROR('#1: \\'Math.LOG2E is not approximatley equal to 1.4426950408889634\\'');\n}\n",
+ "id": "S15.8.1.4_A1"
+ },
+ {
+ "section": "15.8.1.4",
+ "description": "Checking if Math.LOG2E property has the attribute DontEnum",
+ "test": "// CHECK#1\nfor(x in Math) {\n if(x === \"LOG2E\") {\n $ERROR('#1: Value Property LOG2E of the Math Object hasn\\'t attribute DontEnum: \\'for(x in Math) {x===\"LOG2E\"}\\'');\n }\n}\n\n",
+ "id": "S15.8.1.4_A2"
+ },
+ {
+ "section": "15.8.1.4",
+ "description": "Checking if Math.LOG2E property has the attribute DontDelete",
+ "strict_mode_negative": "",
+ "test": "// CHECK#1\nif (delete Math.LOG2E === true) {\n $ERROR('#1: Value Property LOG2E of the Math Object hasn\\'t attribute DontDelete: \\'Math.LOG2E === true\\'');\n}\n\n",
+ "id": "S15.8.1.4_A3",
+ "strict_only": ""
+ },
+ {
+ "section": "15.8.1.4",
+ "description": "Checking if Math.LOG2E property has the attribute ReadOnly",
+ "strict_mode_negative": "",
+ "test": "// CHECK#1\nvar x = Math.LOG2E;\nMath.LOG2E = 1;\nif (Math.LOG2E !== x) {\n $ERROR('#1: Math.LOG2E hasn\\'t ReadOnly: \\'x = Math.LOG2E;Math.LOG2E = 1;Math.LOG2E === x\\'');\n}\n",
+ "id": "S15.8.1.4_A4",
+ "strict_only": ""
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.8.1.5_LOG10E.json b/website/resources/scripts/testcases2/15.8.1.5_LOG10E.json
new file mode 100644
index 000000000..132adc08a
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.8.1.5_LOG10E.json
@@ -0,0 +1,36 @@
+{
+ "testCollection": {
+ "name": "15.8.1.5_LOG10E",
+ "numTests": 4,
+ "tests": [
+ {
+ "section": "15.8.1.5",
+ "description": "Comparing Math.LOG10E with 0.4342944819032518",
+ "test": "$INCLUDE(\"math_precision.js\");\n$INCLUDE(\"math_isequal.js\");\n\n// CHECK#1\nif (!isEqual(Math.LOG10E, 0.4342944819032518)) {\n $ERROR('#1: \\'Math.LOG10E is not approximatley equal to 0.4342944819032518\\'');\n}\n",
+ "id": "S15.8.1.5_A1"
+ },
+ {
+ "section": "15.8.1.5",
+ "description": "Checking if Math.LOG10E property has the attribute DontEnum",
+ "test": "// CHECK#1\nfor(x in Math) {\n if(x === \"LOG10E\") {\n $ERROR('#1: Value Property LOG10E of the Math Object hasn\\'t attribute DontEnum: \\'for(x in Math) {x===\"LOG10E\"}\\'');\n }\n}\n\n",
+ "id": "S15.8.1.5_A2"
+ },
+ {
+ "section": "15.8.1.5",
+ "description": "Checking if Math.LOG10E property has the attribute DontDelete",
+ "strict_mode_negative": "",
+ "test": "// CHECK#1\nif (delete Math.LOG10E === true) {\n $ERROR('#1: Value Property LOG10E of the Math Object hasn\\'t attribute DontDelete: \\'Math.LOG10E === true\\'');\n}\n\n",
+ "id": "S15.8.1.5_A3",
+ "strict_only": ""
+ },
+ {
+ "section": "15.8.1.5",
+ "description": "Checking if Math.LOG10E property has the attribute ReadOnly",
+ "strict_mode_negative": "",
+ "test": "// CHECK#1\nvar x = Math.LOG10E;\nMath.LOG10E = 1;\nif (Math.LOG10E !== x) {\n $ERROR('#1: Math.LOG10E hasn\\'t ReadOnly: \\'x = Math.LOG10E;Math.LOG10E = 1;Math.LOG10E === x\\'');\n}\n",
+ "id": "S15.8.1.5_A4",
+ "strict_only": ""
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.8.1.6_PI.json b/website/resources/scripts/testcases2/15.8.1.6_PI.json
new file mode 100644
index 000000000..13c32c61f
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.8.1.6_PI.json
@@ -0,0 +1,36 @@
+{
+ "testCollection": {
+ "name": "15.8.1.6_PI",
+ "numTests": 4,
+ "tests": [
+ {
+ "section": "15.8.1.6",
+ "description": "Comparing Math.PI with 3.1415926535897932",
+ "test": "$INCLUDE(\"math_precision.js\");\n$INCLUDE(\"math_isequal.js\");\n\n// CHECK#1\nif (!isEqual(Math.PI, 3.1415926535897932)) {\n $ERROR('#1: \\'Math.PI is not approximatley equal to 3.1415926535897932\\'');\n}\n\n",
+ "id": "S15.8.1.6_A1"
+ },
+ {
+ "section": "15.8.1.6",
+ "description": "Checking if Math.PI property has the attribute DontEnum",
+ "test": "// CHECK#1\nfor(x in Math) {\n if(x === \"PI\") {\n $ERROR('#1: Value Property PI of the Math Object hasn\\'t attribute DontEnum: \\'for(x in Math) {x===\"PI\"}\\'');\n }\n}\n\n",
+ "id": "S15.8.1.6_A2"
+ },
+ {
+ "section": "15.8.1.6",
+ "description": "Checking if Math.PI property has the attribute DontDelete",
+ "strict_mode_negative": "",
+ "test": "// CHECK#1\nif (delete Math.PI === true) {\n $ERROR('#1: Value Property PI of the Math Object hasn\\'t attribute DontDelete: \\'Math.PI === true\\'');\n}\n\n",
+ "id": "S15.8.1.6_A3",
+ "strict_only": ""
+ },
+ {
+ "section": "15.8.1.6",
+ "description": "Checking if Math.PI property has the attribute ReadOnly",
+ "strict_mode_negative": "",
+ "test": "// CHECK#1\nvar x = Math.PI;\nMath.PI = 1;\nif (Math.PI !== x) {\n $ERROR('#1: Math.PI hasn\\'t ReadOnly: \\'x = Math.PI;Math.PI = 1;Math.PI === x\\'');\n}\n",
+ "id": "S15.8.1.6_A4",
+ "strict_only": ""
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.8.1.7_SQRT1_2.json b/website/resources/scripts/testcases2/15.8.1.7_SQRT1_2.json
new file mode 100644
index 000000000..94de637b2
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.8.1.7_SQRT1_2.json
@@ -0,0 +1,36 @@
+{
+ "testCollection": {
+ "name": "15.8.1.7_SQRT1_2",
+ "numTests": 4,
+ "tests": [
+ {
+ "section": "15.8.1.7",
+ "description": "Comparing Math.SQRT1_2 with 0.7071067811865476",
+ "test": "$INCLUDE(\"math_precision.js\");\n$INCLUDE(\"math_isequal.js\");\n\n// CHECK#1\nif (!isEqual(Math.SQRT1_2, 0.7071067811865476)) {\n $ERROR('#1: \\'Math.SQRT1_2 is not approximatley equal to 0.7071067811865476\\'');\n}\n\n",
+ "id": "S15.8.1.7_A1"
+ },
+ {
+ "section": "15.8.1.7",
+ "description": "Checking if Math.SQRT1_2 property has the attribute DontEnum",
+ "test": "// CHECK#1\nfor(x in Math) {\n if(x === \"SQRT1_2\") {\n $ERROR('#1: Value Property SQRT1_2 of the Math Object hasn\\'t attribute DontEnum: \\'for(x in Math) {x===\"SQRT1_2\"}\\'');\n }\n}\n\n",
+ "id": "S15.8.1.7_A2"
+ },
+ {
+ "section": "15.8.1.7",
+ "description": "Checking if Math.SQRT1_2 property has the attribute DontDelete",
+ "strict_mode_negative": "",
+ "test": "// CHECK#1\nif (delete Math.SQRT1_2 === true) {\n $ERROR(\"#1: Value Property SQRT1_2 of the Math Object hasn't attribute DontDelete: 'Math.SQRT1_2 === true'\");\n}\n\n",
+ "id": "S15.8.1.7_A3",
+ "strict_only": ""
+ },
+ {
+ "section": "15.8.1.7",
+ "description": "Checking if Math.SQRT1_2 property has the attribute ReadOnly",
+ "strict_mode_negative": "",
+ "test": "// CHECK#1\nvar x = Math.SQRT1_2;\nMath.SQRT1_2 = 1;\nif (Math.SQRT1_2 !== x) {\n $ERROR('#1: Math.SQRT1_2 hasn\\'t ReadOnly: \\'x = Math.SQRT1_2;Math.SQRT1_2 = 1;Math.SQRT1_2 === x\\'');\n}\n",
+ "id": "S15.8.1.7_A4",
+ "strict_only": ""
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.8.1.8_SQRT2.json b/website/resources/scripts/testcases2/15.8.1.8_SQRT2.json
new file mode 100644
index 000000000..a21fa62a2
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.8.1.8_SQRT2.json
@@ -0,0 +1,36 @@
+{
+ "testCollection": {
+ "name": "15.8.1.8_SQRT2",
+ "numTests": 4,
+ "tests": [
+ {
+ "section": "15.8.1.8",
+ "description": "Comparing Math.SQRT2 with 1.4142135623730951",
+ "test": "$INCLUDE(\"math_precision.js\");\n$INCLUDE(\"math_isequal.js\");\n\n// CHECK#1\nif (!isEqual(Math.SQRT2, 1.4142135623730951)) {\n $ERROR('#1: \\'Math.SQRT2 is not approximatley equal to 1.4142135623730951\\'');\n}\n\n",
+ "id": "S15.8.1.8_A1"
+ },
+ {
+ "section": "15.8.1.8",
+ "description": "Checking if Math.SQRT2 property has the attribute DontEnum",
+ "test": "// CHECK#1\nfor(x in Math) {\n if(x === \"SQRT2\") {\n $ERROR('#1: Value Property SQRT2 of the Math Object hasn\\'t attribute DontEnum: \\'for(x in Math) {x===\"SQRT2\"}\\'');\n }\n}\n\n",
+ "id": "S15.8.1.8_A2"
+ },
+ {
+ "section": "15.8.1.8",
+ "description": "Checking if Math.SQRT2 property has the attribute DontDelete",
+ "strict_mode_negative": "",
+ "test": "// CHECK#1\nif (delete Math.SQRT2 === true) {\n $ERROR('#1: Value Property SQRT2 of the Math Object hasn\\'t attribute DontDelete: \\'Math.SQRT2 === true\\'');\n}\n\n",
+ "id": "S15.8.1.8_A3",
+ "strict_only": ""
+ },
+ {
+ "section": "15.8.1.8",
+ "description": "Checking if Math.SQRT2 property has the attribute ReadOnly",
+ "strict_mode_negative": "",
+ "test": "// CHECK#1\nvar x = Math.SQRT2;\nMath.SQRT2 = 1;\nif (Math.SQRT2 !== x) {\n $ERROR('#1: Math.SQRT2 hasn\\'t ReadOnly: \\'x = Math.SQRT2;Math.SQRT2 = 1;Math.SQRT2 === x\\'');\n}\n",
+ "id": "S15.8.1.8_A4",
+ "strict_only": ""
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.8.2.10_log.json b/website/resources/scripts/testcases2/15.8.2.10_log.json
new file mode 100644
index 000000000..966aa7d9f
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.8.2.10_log.json
@@ -0,0 +1,44 @@
+{
+ "testCollection": {
+ "name": "15.8.2.10_log",
+ "numTests": 6,
+ "tests": [
+ {
+ "section": "15.8.2.10",
+ "description": "Checking if Math.log(NaN) is NaN",
+ "test": "// CHECK#1\nvar x = NaN;\nif (!isNaN(Math.log(x)))\n{\n\t$ERROR(\"#1: 'var x=NaN; isNaN(Math.log(x)) === false'\");\n}\n",
+ "id": "S15.8.2.10_A1"
+ },
+ {
+ "section": "15.8.2.10",
+ "description": "Checking if Math.log(x) is NaN, where x is less than 0",
+ "test": "// CHECK#1\nvar x = -0.000000000000001;\nif (!isNaN(Math.log(x)))\n{\n\t$ERROR(\"#1: 'var x=-0.000000000000001; isNaN(Math.log(x)) === false'\");\n}\n\n// CHECK#2\nx = -1;\nif (!isNaN(Math.log(x)))\n{\n\t$ERROR(\"#1: 'var x=-1; isNaN(Math.log(x)) === false'\");\n}\n\n// CHECK#3\nx = -Infinity;\nif (!isNaN(Math.log(x)))\n{\n\t$ERROR(\"#1: 'var x=-Infinity; isNaN(Math.log(x)) === false'\");\n}\n",
+ "id": "S15.8.2.10_A2"
+ },
+ {
+ "section": "15.8.2.10",
+ "description": "Checking if Math.log(+0) and Math.log(-0) equals to -Infinity",
+ "test": "// CHECK#1\nvar x = +0;\nif (Math.log(x) !== -Infinity)\n{\n\t$ERROR(\"#1: 'var x=+0; Math.log(x) !== -Infinity'\");\n}\n\n// CHECK#2\nvar x = -0;\nif (Math.log(x) !== -Infinity)\n{\n\t$ERROR(\"#1: 'var x=-0; Math.log(x) !== -Infinity'\");\n}\n",
+ "id": "S15.8.2.10_A3"
+ },
+ {
+ "section": "15.8.2.10",
+ "description": "Checking if Math.log(1) equals to +0",
+ "test": "// CHECK#1\nvar x = 1;\nif (Math.log(x) !== +0)\n{\n\t$ERROR(\"#1: 'var x=1; Math.log(x) !== +0'\");\n}\n",
+ "id": "S15.8.2.10_A4"
+ },
+ {
+ "section": "15.8.2.10",
+ "description": "Checking if Math.log(+Infinity) equals to +Infinity",
+ "test": "// CHECK#1\nvar x = +Infinity;\nif (Math.log(x) !== +Infinity)\n{\n\t$ERROR(\"#1: 'var x=+Infinity; Math.log(x) !== +Infinity'\");\n}\n",
+ "id": "S15.8.2.10_A5"
+ },
+ {
+ "section": "15.8.2.10",
+ "description": ": Checking if Math.log is approximately equals to its mathematical values on the set of 64 argument values; all the sample values is calculated with LibC;",
+ "test": "$INCLUDE(\"math_precision.js\");\n$INCLUDE(\"math_isequal.js\");\n\n// CHECK#1\nvnum = 64;\nvar x = new Array();\nx[0] = 0.00000000000000000000;\nx[1] = 0.25396825396825395000;\nx[2] = 0.50793650793650791000;\nx[3] = 0.76190476190476186000;\nx[4] = 1.01587301587301580000;\nx[5] = 1.26984126984126980000;\nx[6] = 1.52380952380952370000;\nx[7] = 1.77777777777777770000;\nx[8] = 2.03174603174603160000;\nx[9] = 2.28571428571428560000;\nx[10] = 2.53968253968253950000;\nx[11] = 2.79365079365079350000;\nx[12] = 3.04761904761904740000;\nx[13] = 3.30158730158730140000;\nx[14] = 3.55555555555555540000;\nx[15] = 3.80952380952380930000;\nx[16] = 4.06349206349206330000;\nx[17] = 4.31746031746031720000;\nx[18] = 4.57142857142857120000;\nx[19] = 4.82539682539682510000;\nx[20] = 5.07936507936507910000;\nx[21] = 5.33333333333333300000;\nx[22] = 5.58730158730158700000;\nx[23] = 5.84126984126984090000;\nx[24] = 6.09523809523809490000;\nx[25] = 6.34920634920634890000;\nx[26] = 6.60317460317460280000;\nx[27] = 6.85714285714285680000;\nx[28] = 7.11111111111111070000;\nx[29] = 7.36507936507936470000;\nx[30] = 7.61904761904761860000;\nx[31] = 7.87301587301587260000;\nx[32] = 8.12698412698412650000;\nx[33] = 8.38095238095238140000;\nx[34] = 8.63492063492063440000;\nx[35] = 8.88888888888888930000;\nx[36] = 9.14285714285714230000;\nx[37] = 9.39682539682539720000;\nx[38] = 9.65079365079365030000;\nx[39] = 9.90476190476190510000;\nx[40] = 10.15873015873015800000;\nx[41] = 10.41269841269841300000;\nx[42] = 10.66666666666666600000;\nx[43] = 10.92063492063492100000;\nx[44] = 11.17460317460317400000;\nx[45] = 11.42857142857142900000;\nx[46] = 11.68253968253968200000;\nx[47] = 11.93650793650793700000;\nx[48] = 12.19047619047619000000;\nx[49] = 12.44444444444444500000;\nx[50] = 12.69841269841269800000;\nx[51] = 12.95238095238095300000;\nx[52] = 13.20634920634920600000;\nx[53] = 13.46031746031746000000;\nx[54] = 13.71428571428571400000;\nx[55] = 13.96825396825396800000;\nx[56] = 14.22222222222222100000;\nx[57] = 14.47619047619047600000;\nx[58] = 14.73015873015872900000;\nx[59] = 14.98412698412698400000;\nx[60] = 15.23809523809523700000;\nx[61] = 15.49206349206349200000;\nx[62] = 15.74603174603174500000;\nx[63] = 16.00000000000000000000;\n\n\n\nvar y = new Array();\ny[0] = -Infinity;\ny[1] = -1.37054600415175140000;\ny[2] = -0.67739882359180614000;\ny[3] = -0.27193371548364181000;\ny[4] = 0.01574835696813911200;\ny[5] = 0.23889190828234888000;\ny[6] = 0.42121346507630347000;\ny[7] = 0.57536414490356180000;\ny[8] = 0.70889553752808443000;\ny[9] = 0.82667857318446791000;\ny[10] = 0.93203908884229414000;\ny[11] = 1.02734926864661900000;\ny[12] = 1.11436064563624870000;\ny[13] = 1.19440335330978530000;\ny[14] = 1.26851132546350720000;\ny[15] = 1.33750419695045860000;\ny[16] = 1.40204271808802970000;\ny[17] = 1.46266733990446450000;\ny[18] = 1.51982575374441310000;\ny[19] = 1.57389297501468910000;\ny[20] = 1.62518626940223940000;\ny[21] = 1.67397643357167160000;\ny[22] = 1.72049644920656440000;\ny[23] = 1.76494821177739820000;\ny[24] = 1.80750782619619410000;\ny[25] = 1.84832982071644910000;\ny[26] = 1.88755053386973050000;\ny[27] = 1.92529086185257750000;\ny[28] = 1.96165850602345240000;\ny[29] = 1.99674982583472250000;\ny[30] = 2.03065137751040400000;\ny[31] = 2.06344120033339480000;\ny[32] = 2.09518989864797510000;\ny[33] = 2.12596155731472880000;\ny[34] = 2.15581452046440970000;\ny[35] = 2.18480205733766210000;\ny[36] = 2.21297293430435850000;\ny[37] = 2.24037190849247290000;\ny[38] = 2.26704015557463420000;\ny[39] = 2.29301564197789490000;\ny[40] = 2.31833344996218480000;\ny[41] = 2.34302606255255650000;\ny[42] = 2.36712361413161700000;\ny[43] = 2.39065411154181100000;\ny[44] = 2.41364362976650960000;\ny[45] = 2.43611648561856820000;\ny[46] = 2.45809539233734360000;\ny[47] = 2.47960159755830700000;\ny[48] = 2.50065500675613930000;\ny[49] = 2.52127429395887500000;\ny[50] = 2.54147700127639450000;\ny[51] = 2.56127962857257430000;\ny[52] = 2.58069771442967570000;\ny[53] = 2.59974590940037050000;\ny[54] = 2.61843804241252310000;\ny[55] = 2.63678718108071930000;\ny[56] = 2.65480568658339780000;\ny[57] = 2.67250526368279880000;\ny[58] = 2.68989700639466770000;\ny[59] = 2.70699143975396780000;\ny[60] = 2.72379855807034900000;\ny[61] = 2.74032786002155990000;\ny[62] = 2.75658838089334020000;\ny[63] = 2.77258872223978110000;\n\n\nvar val;\nfor (i = 0; i < vnum; i++)\n{\n\tval = Math.log(x[i]);\n\tif (!isEqual(val, y[i]))\n\t{\n\t\t$ERROR(\"\\nx = \" + x[i] + \"\\nlibc.log(x) = \" + y[i] + \"\\nMath.log(x) = \" + Math.log(x[i]) + \"\\nMath.abs(libc.log(x) - Math.log(x)) > \" + prec + \"\\n\\n\"); \n\t}\n}\n",
+ "id": "S15.8.2.10_A6"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.8.2.11_max.json b/website/resources/scripts/testcases2/15.8.2.11_max.json
new file mode 100644
index 000000000..cce3c3e62
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.8.2.11_max.json
@@ -0,0 +1,32 @@
+{
+ "testCollection": {
+ "name": "15.8.2.11_max",
+ "numTests": 4,
+ "tests": [
+ {
+ "section": "15.8.2.11",
+ "description": "Checking if Math.max() equals to -Infinity",
+ "test": "// CHECK#1\nif (Math.max() != -Infinity)\n{\n\t$ERROR(\"#1: 'Math.max() != -Infinity'\");\n}\n",
+ "id": "S15.8.2.11_A1"
+ },
+ {
+ "section": "15.8.2.11",
+ "description": "The script tests Math.max giving 1, 2 and 3 arguments to the function where at least one of the arguments is NaN",
+ "test": "// CHECK#1\nif (!isNaN(Math.max(NaN)))\n{\n\t$ERROR(\"#1: 'isNaN(Math.max(NaN)) === false\");\n}\n\n// CHECK#2\nvals = new Array();\nvals[0] = -Infinity;\nvals[1] = -0.000000000000001;\nvals[2] = -0;\nvals[3] = +0\nvals[4] = 0.000000000000001;\nvals[5] = +Infinity;\nvals[6] = NaN;\nvalnum = 7;\n\nargs = new Array();\nfor (i = 0; i <= 1; i++)\n{\n\targs[i] = NaN;\n\tfor (j = 0; j < valnum; j++)\n\t{\n\t\targs[1-i] = vals[j];\n\t\tif (!isNaN(Math.max(args[0], args[1])))\n\t\t{\n\t\t\t$ERROR(\"#2: 'isNaN(Math.max(\" + args[0] + \", \" + args[1] + \")) === false\");\n\t\t}\t\n\t}\n}\n\n// CHECK #3\nvar k = 1;\nvar l = 2;\nfor (i = 0; i <= 2; i++)\n{\n\targs[i] = NaN;\n\tif (i === 1)\n\t{\n\t\tk = 0;\n\t} else if (i === 2)\n\t{\n\t \tl = 1;\t\n\t}\n\tfor (j = 0; j < valnum; j++)\n\t{\n\t\tfor (jj = 0; jj < valnum; jj++)\n\t\t{\n\t\t\targs[k] = vals[j];\n\t\t\targs[l] = vals[jj];\n\t\t\tif (!isNaN(Math.max(args[0], args[1], args[2])))\n\t\t\t{\n\t\t\t\t$ERROR(\"#3: 'isNaN(Math.max(\" + args[0] + \", \" + args[1] + \", \" + args[2] + \")) === false\");\n\t\t\t}\t\n\t\t}\n\t}\n}\n",
+ "id": "S15.8.2.11_A2"
+ },
+ {
+ "section": "15.8.2.11",
+ "description": "Checking if Math.max(-0,+0) and Math.max(+0,-0) equals to +0",
+ "test": "// CHECK#1\nif (Math.max(-0, +0) !== +0)\n{\n\t$ERROR(\"#1: 'Math.max(-0, +0) !== +0'\");\n}\n\n// CHECK#1\nif (Math.max(+0, -0) !== +0)\n{\n\t$ERROR(\"#2: 'Math.max(+0, -0) !== +0'\");\n}\n",
+ "id": "S15.8.2.11_A3"
+ },
+ {
+ "section": "15.8.2.11",
+ "description": "Checking if Math.max.length property is defined and equals to 2",
+ "test": "// CHECK#1\nif (typeof Math.max !== \"function\") {\n\t$ERROR('#1: Math.max method is not defined');\n}\n\n// CHECK#2\nif (typeof Math.max.length === \"undefined\") {\n\t$ERROR('#2: length property of Math.max method is undefined');\n}\n\n// CHECK#3\nif (Math.max.length !== 2) {\n\t$ERROR('#3: The length property of the Math.max method is not 2');\n}\n",
+ "id": "S15.8.2.11_A4"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.8.2.12_min.json b/website/resources/scripts/testcases2/15.8.2.12_min.json
new file mode 100644
index 000000000..e3d782368
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.8.2.12_min.json
@@ -0,0 +1,32 @@
+{
+ "testCollection": {
+ "name": "15.8.2.12_min",
+ "numTests": 4,
+ "tests": [
+ {
+ "section": "15.8.2.12",
+ "description": "Checking if Math.min() equals to +Infinity",
+ "test": "// CHECK#1\nif (Math.min() != +Infinity)\n{\n\t$ERROR(\"#1: 'Math.min() != +Infinity'\");\n}\n",
+ "id": "S15.8.2.12_A1"
+ },
+ {
+ "section": "15.8.2.12",
+ "description": "The script tests Math.min giving 1, 2 and 3 arguments to the function where at least one of the arguments is NaN",
+ "test": "// CHECK#1\nif (!isNaN(Math.min(NaN)))\n{\n\t$ERROR(\"#1: 'isNaN(Math.min(NaN)) === false\");\n}\n\n// CHECK#2\nvals = new Array();\nvals[0] = -Infinity;\nvals[1] = -0.000000000000001;\nvals[2] = -0;\nvals[3] = +0\nvals[4] = 0.000000000000001;\nvals[5] = +Infinity;\nvals[6] = NaN;\nvalnum = 7;\n\nargs = new Array();\nfor (i = 0; i <= 1; i++)\n{\n\targs[i] = NaN;\n\tfor (j = 0; j < valnum; j++)\n\t{\n\t\targs[1-i] = vals[j];\n\t\tif (!isNaN(Math.min(args[0], args[1])))\n\t\t{\n\t\t\t$ERROR(\"#2: 'isNaN(Math.min(\" + args[0] + \", \" + args[1] + \")) === false\");\n\t\t}\t\n\t}\n}\n\n// CHECK #3\nvar k = 1;\nvar l = 2;\nfor (i = 0; i <= 2; i++)\n{\n\targs[i] = NaN;\n\tif (i === 1)\n\t{\n\t\tk = 0;\n\t} else if (i === 2)\n\t{\n\t \tl = 1;\t\n\t}\n\tfor (j = 0; j < valnum; j++)\n\t{\n\t\tfor (jj = 0; jj < valnum; jj++)\n\t\t{\n\t\t\targs[k] = vals[j];\n\t\t\targs[l] = vals[jj];\n\t\t\tif (!isNaN(Math.min(args[0], args[1], args[2])))\n\t\t\t{\n\t\t\t\t$ERROR(\"#3: 'isNaN(Math.min(\" + args[0] + \", \" + args[1] + \", \" + args[2] + \")) === false\");\n\t\t\t}\t\n\t\t}\n\t}\n}\n",
+ "id": "S15.8.2.12_A2"
+ },
+ {
+ "section": "15.8.2.12",
+ "description": "Checking if Math.max(-0,+0) and Math.max(+0,-0) equals to -0",
+ "test": "// CHECK#1\nif (Math.max(-0, +0) !== -0)\n{\n\t$ERROR(\"#1: 'Math.max(-0, +0) !== -0'\");\n}\n\n// CHECK#1\nif (Math.max(+0, -0) !== -0)\n{\n\t$ERROR(\"#2: 'Math.max(+0, -0) !== -0'\");\n}\n",
+ "id": "S15.8.2.12_A3"
+ },
+ {
+ "section": "15.8.2.12",
+ "description": "Checking if Math.min.length property is defined and equals to 2",
+ "test": "// CHECK#1\nif (typeof Math.min !== \"function\") {\n\t$ERROR('#1: Math.min method is not defined');\n}\n\n// CHECK#2\nif (typeof Math.min.length === \"undefined\") {\n\t$ERROR('#2: length property of Math.min method is undefined');\n}\n\n// CHECK#3\nif (Math.min.length !== 2) {\n\t$ERROR('#3: The length property of the Math.min method is not 2');\n}\n",
+ "id": "S15.8.2.12_A4"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.8.2.13_pow.json b/website/resources/scripts/testcases2/15.8.2.13_pow.json
new file mode 100644
index 000000000..59d908950
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.8.2.13_pow.json
@@ -0,0 +1,152 @@
+{
+ "testCollection": {
+ "name": "15.8.2.13_pow",
+ "numTests": 24,
+ "tests": [
+ {
+ "section": "15.8.2.13",
+ "description": "Checking if Math.pow(x,y) is NaN, where y is NaN",
+ "test": "// CHECK#1\n\ny = NaN;\nx = new Array();\nx[0] = -Infinity;\nx[1] = -1.7976931348623157E308; //largest (by module) finite number\nx[2] = -0.000000000000001;\nx[3] = -0;\nx[4] = +0\nx[5] = 0.000000000000001;\nx[6] = 1.7976931348623157E308; //largest finite number\nx[7] = +Infinity;\nx[8] = NaN;\nxnum = 9;\n\nfor (i = 0; i < xnum; i++)\n{\n\tif (!isNaN(Math.pow(x[i],y)))\n\t{\n\t\t$ERROR(\"#1: isNaN(Math.pow(\" + x[i] + \", \" + y + \")) === false\");\n\t}\n}\n",
+ "id": "S15.8.2.13_A1"
+ },
+ {
+ "section": "15.8.2.13",
+ "description": "Checking if Math.pow(x,y) equals to +Infinity, where abs(x)<1 and y is -Infinity",
+ "test": "// CHECK#1\n\ny = -Infinity;\nx = new Array();\nx[0] = 0.999999999999999;\nx[1] = 0.5;\nx[2] = +0;\nx[3] = -0;\nx[4] = -0.5;\nx[5] = -0.999999999999999;\nxnum = 6;\n\nfor (i = 0; i < xnum; i++)\n{\n\tif (Math.pow(x[i],y) !== +Infinity)\n\t{\n\t\t$ERROR(\"#1: Math.pow(\" + x[i] + \", \" + y + \") !== +Infinity\");\n\t}\n}\n",
+ "id": "S15.8.2.13_A10"
+ },
+ {
+ "section": "15.8.2.13",
+ "description": "Checking if Math.pow(x,y) equals to +Infinity, where x is +Infinity and y>0",
+ "test": "// CHECK#1\n\nx = +Infinity;\ny = new Array();\ny[3] = Infinity;\ny[2] = 1.7976931348623157E308; //largest (by module) finite number\ny[1] = 1;\ny[0] = 0.000000000000001;\nynum = 4;\n\nfor (i = 0; i < ynum; i++)\n{\n\tif (Math.pow(x,y[i]) !== +Infinity)\n\t{\n\t\t$ERROR(\"#1: Math.pow(\" + x + \", \" + y[i] + \") !== +Infinity\");\n\t}\n}\n",
+ "id": "S15.8.2.13_A11"
+ },
+ {
+ "section": "15.8.2.13",
+ "description": "Checking if Math.pow(x,y) equals to +0, where x is +Infinity and y<0",
+ "test": "// CHECK#1\n\nx = +Infinity;\ny = new Array();\ny[0] = -Infinity;\ny[1] = -1.7976931348623157E308; //largest (by module) finite number\ny[2] = -1;\ny[3] = -0.000000000000001;\nynum = 4;\n\nfor (i = 0; i < ynum; i++)\n{\n\tif (Math.pow(x,y[i]) !== +0)\n\t{\n\t\t$ERROR(\"#1: Math.pow(\" + x + \", \" + y[i] + \") !== +0\");\n\t}\n}\n",
+ "id": "S15.8.2.13_A12"
+ },
+ {
+ "section": "15.8.2.13",
+ "description": "Checking if Math.pow(x,y) equals to -Infinity, where x is -Infinity and y>0",
+ "test": "// CHECK#1\n\nx = -Infinity;\ny = new Array();\ny[0] = 1;\ny[1] = 111;\ny[2] = 111111;\nynum = 3;\n\nfor (i = 0; i < ynum; i++)\n{\n\tif (Math.pow(x,y[i]) !== -Infinity)\n\t{\n\t\t$ERROR(\"#1: Math.pow(\" + x + \", \" + y[i] + \") !== -Infinity\");\n\t}\n}\n",
+ "id": "S15.8.2.13_A13"
+ },
+ {
+ "section": "15.8.2.13",
+ "description": "Checking if Math.pow(x,y) equals to +Infinity, where x is -Infinity and y>0",
+ "test": "// CHECK#1\n\nx = -Infinity;\ny = new Array();\ny[0] = 0.000000000000001;\ny[1] = 2;\ny[2] = Math.PI;\ny[3] = 1.7976931348623157E308; //largest finite number\ny[4] = +Infinity;\nynum = 5;\n\nfor (i = 0; i < ynum; i++)\n{\n\tif (Math.pow(x,y[i]) !== +Infinity)\n\t{\n\t\t$ERROR(\"#1: Math.pow(\" + x + \", \" + y[i] + \") !== +Infinity\");\n\t}\n}\n",
+ "id": "S15.8.2.13_A14"
+ },
+ {
+ "section": "15.8.2.13",
+ "description": "Checking if Math.pow(x,y) equals to -0, where x is -Infinity and y<0",
+ "test": "// CHECK#1\n\nx = -Infinity;\ny = new Array();\ny[2] = -1;\ny[1] = -111; \ny[0] = -111111;\nynum = 3;\n\nfor (i = 0; i < ynum; i++)\n{\n\tif (Math.pow(x,y[i]) !== -0)\n\t{\n\t\t$ERROR(\"#1: Math.pow(\" + x + \", \" + y[i] + \") !== -0\");\n\t}\n}\n",
+ "id": "S15.8.2.13_A15"
+ },
+ {
+ "section": "15.8.2.13",
+ "description": "Checking if Math.pow(x,y) equals to +0, where x is -Infinity and y<0",
+ "test": "// CHECK#1\n\nx = -Infinity;\ny = new Array();\ny[4] = -0.000000000000001;\ny[3] = -2;\ny[2] = -Math.PI;\ny[1] = -1.7976931348623157E308; //largest (by module) finite number\ny[0] = -Infinity;\nynum = 5;\n\nfor (i = 0; i < ynum; i++)\n{\n\tif (Math.pow(x,y[i]) !== +0)\n\t{\n\t\t$ERROR(\"#1: Math.pow(\" + x + \", \" + y[i] + \") !== +0\");\n\t}\n}\n",
+ "id": "S15.8.2.13_A16"
+ },
+ {
+ "section": "15.8.2.13",
+ "description": "Checking if Math.pow(x,y) equals to +0, where x is +0 and y>0",
+ "test": "// CHECK#1\n\nx = +0;\ny = new Array();\ny[3] = Infinity;\ny[2] = 1.7976931348623157E308; //largest finite number\ny[1] = 1;\ny[0] = 0.000000000000001;\nynum = 4;\n\nfor (i = 0; i < ynum; i++)\n{\n\tif (Math.pow(x,y[i]) !== +0)\n\t{\n\t\t$ERROR(\"#1: Math.pow(\" + x + \", \" + y[i] + \") !== +0\");\n\t}\n}\n",
+ "id": "S15.8.2.13_A17"
+ },
+ {
+ "section": "15.8.2.13",
+ "description": "Checking if Math.pow(x,y) equals to +Infinity, where x is +0 and y<0",
+ "test": "// CHECK#1\n\nx = +0;\ny = new Array();\ny[0] = -Infinity;\ny[1] = -1.7976931348623157E308; //largest (by module) finite number\ny[2] = -1;\ny[3] = -0.000000000000001;\nynum = 4;\n\nfor (i = 0; i < ynum; i++)\n{\n\tif (Math.pow(x,y[i]) !== +Infinity)\n\t{\n\t\t$ERROR(\"#1: Math.pow(\" + x + \", \" + y[i] + \") !== +Infinity\");\n\t}\n}\n",
+ "id": "S15.8.2.13_A18"
+ },
+ {
+ "section": "15.8.2.13",
+ "description": "Checking if Math.pow(x,y) equals to -0, where x is -0 and y>0",
+ "test": "// CHECK#1\n\nx = -0;\ny = new Array();\ny[0] = 1;\ny[1] = 111;\ny[2] = 111111;\nynum = 3;\n\nfor (i = 0; i < ynum; i++)\n{\n\tif (Math.pow(x,y[i]) !== -0)\n\t{\n\t\t$ERROR(\"#1: Math.pow(\" + x + \", \" + y[i] + \") !== -0\");\n\t}\n}\n",
+ "id": "S15.8.2.13_A19"
+ },
+ {
+ "section": "15.8.2.13",
+ "description": "Checking if Math.pow(x,y) equals to 1, where y is +0 and x is number or NaN",
+ "test": "// CHECK#1\n\ny = +0;\nx = new Array();\nx[0] = -Infinity;\nx[1] = -1.7976931348623157E308; //largest (by module) finite number\nx[2] = -0.000000000000001;\nx[3] = -0;\nx[4] = +0\nx[5] = 0.000000000000001;\nx[6] = 1.7976931348623157E308; //largest finite number\nx[7] = +Infinity;\nx[8] = NaN;\nxnum = 9;\n\nfor (i = 0; i < xnum; i++)\n{\n\tif (Math.pow(x[i],y) !== 1)\n\t{\n\t\t$ERROR(\"#1: Math.pow(\" + x[i] + \", \" + y + \") !== 1\");\n\t}\n}\n",
+ "id": "S15.8.2.13_A2"
+ },
+ {
+ "section": "15.8.2.13",
+ "description": "Checking if Math.pow(x,y) equals to +0, where x is -0 and y>0 and y is NOT an odd integer",
+ "test": "// CHECK#1\n\nx = -0;\ny = new Array();\ny[0] = 0.000000000000001;\ny[1] = 2;\ny[2] = Math.PI;\ny[3] = 1.7976931348623157E308; //largest finite number\ny[4] = +Infinity;\nynum = 5;\n\nfor (i = 0; i < ynum; i++)\n{\n\tif (Math.pow(x,y[i]) !== +0)\n\t{\n\t\t$ERROR(\"#1: Math.pow(\" + x + \", \" + y[i] + \") !== +0\");\n\t}\n}\n",
+ "id": "S15.8.2.13_A20"
+ },
+ {
+ "section": "15.8.2.13",
+ "description": "Checking if Math.pow(x,y) equals to -Infinity, where x is -0 and y is an odd integer",
+ "test": "// CHECK#1\n\nx = -0;\ny = new Array();\ny[2] = -1;\ny[1] = -111; \ny[0] = -111111;\nynum = 3;\n\nfor (i = 0; i < ynum; i++)\n{\n\tif (Math.pow(x,y[i]) !== -Infinity)\n\t{\n\t\t$ERROR(\"#1: Math.pow(\" + x + \", \" + y[i] + \") !== -Infinity\");\n\t}\n}\n",
+ "id": "S15.8.2.13_A21"
+ },
+ {
+ "section": "15.8.2.13",
+ "description": "Checking if Math.pow(x,y) equals to +Infinity, where x is -0 and y<0 and y is NOT an odd integer",
+ "test": "// CHECK#1\n\nx = -0;\ny = new Array();\ny[4] = -0.000000000000001;\ny[3] = -2;\ny[2] = -Math.PI;\ny[1] = -1.7976931348623157E308; //largest (by module) finite number\ny[0] = -Infinity;\nynum = 5;\n\nfor (i = 0; i < ynum; i++)\n{\n\tif (Math.pow(x,y[i]) !== +Infinity)\n\t{\n\t\t$ERROR(\"#1: Math.pow(\" + x + \", \" + y[i] + \") !== +Infinity\");\n\t}\n}\n",
+ "id": "S15.8.2.13_A22"
+ },
+ {
+ "section": "15.8.2.13",
+ "description": "Checking if Math.pow(x,y) is NaN, where x<0 and x is finite and y is finite and y is not an integer",
+ "test": "// CHECK#1\n\ny = NaN;\nx = new Array();\nx[0] = -1.7976931348623157E308; //largest (by module) finite number\nx[1] = -Math.PI;\nx[2] = -1;\nx[3] = -0.000000000000001;\nxnum = 4;\n\ny[0] = -Math.PI;\ny[1] = -Math.E;\ny[2] = -1.000000000000001;\ny[3] = -0.000000000000001;\ny[4] = 0.000000000000001;\ny[5] = 1.000000000000001;\ny[6] = Math.E;\ny[7] = Math.PI;\nynum = 8;\n\nfor (i = 0; i < xnum; i++)\n\tfor (j = 0; j < ynum; j++)\n\t\tif (!isNaN(Math.pow(x[i],y[j])))\n\t\t\t$ERROR(\"#1: isNaN(Math.pow(\" + x[i] + \", \" + y[j] + \")) === false\");\n",
+ "id": "S15.8.2.13_A23"
+ },
+ {
+ "section": "15.8.2.13",
+ "description": ": Checking if Math.pow(argument1, argument2) is approximately equals to its mathematical value on the set of 64 argument1 values and 64 argument2 values; all the sample values is calculated with LibC;",
+ "test": "$INCLUDE(\"math_precision.js\");\n$INCLUDE(\"math_isequal.js\");\n\n// CHECK#1\nvnum = 64;\nvar x1 = new Array();\nx1[0] = 0.00000000000000000000;\nx1[1] = 0.25396825396825395000;\nx1[2] = 0.50793650793650791000;\nx1[3] = 0.76190476190476186000;\nx1[4] = 1.01587301587301580000;\nx1[5] = 1.26984126984126980000;\nx1[6] = 1.52380952380952370000;\nx1[7] = 1.77777777777777770000;\nx1[8] = 2.03174603174603160000;\nx1[9] = 2.28571428571428560000;\nx1[10] = 2.53968253968253950000;\nx1[11] = 2.79365079365079350000;\nx1[12] = 3.04761904761904740000;\nx1[13] = 3.30158730158730140000;\nx1[14] = 3.55555555555555540000;\nx1[15] = 3.80952380952380930000;\nx1[16] = 4.06349206349206330000;\nx1[17] = 4.31746031746031720000;\nx1[18] = 4.57142857142857120000;\nx1[19] = 4.82539682539682510000;\nx1[20] = 5.07936507936507910000;\nx1[21] = 5.33333333333333300000;\nx1[22] = 5.58730158730158700000;\nx1[23] = 5.84126984126984090000;\nx1[24] = 6.09523809523809490000;\nx1[25] = 6.34920634920634890000;\nx1[26] = 6.60317460317460280000;\nx1[27] = 6.85714285714285680000;\nx1[28] = 7.11111111111111070000;\nx1[29] = 7.36507936507936470000;\nx1[30] = 7.61904761904761860000;\nx1[31] = 7.87301587301587260000;\nx1[32] = 8.12698412698412650000;\nx1[33] = 8.38095238095238140000;\nx1[34] = 8.63492063492063440000;\nx1[35] = 8.88888888888888930000;\nx1[36] = 9.14285714285714230000;\nx1[37] = 9.39682539682539720000;\nx1[38] = 9.65079365079365030000;\nx1[39] = 9.90476190476190510000;\nx1[40] = 10.15873015873015800000;\nx1[41] = 10.41269841269841300000;\nx1[42] = 10.66666666666666600000;\nx1[43] = 10.92063492063492100000;\nx1[44] = 11.17460317460317400000;\nx1[45] = 11.42857142857142900000;\nx1[46] = 11.68253968253968200000;\nx1[47] = 11.93650793650793700000;\nx1[48] = 12.19047619047619000000;\nx1[49] = 12.44444444444444500000;\nx1[50] = 12.69841269841269800000;\nx1[51] = 12.95238095238095300000;\nx1[52] = 13.20634920634920600000;\nx1[53] = 13.46031746031746000000;\nx1[54] = 13.71428571428571400000;\nx1[55] = 13.96825396825396800000;\nx1[56] = 14.22222222222222100000;\nx1[57] = 14.47619047619047600000;\nx1[58] = 14.73015873015872900000;\nx1[59] = 14.98412698412698400000;\nx1[60] = 15.23809523809523700000;\nx1[61] = 15.49206349206349200000;\nx1[62] = 15.74603174603174500000;\nx1[63] = 16.00000000000000000000;\n\n\n\nvar x2 = new Array();\nx2[0] = -16.00000000000000000000;\nx2[1] = -15.49206349206349200000;\nx2[2] = -14.98412698412698400000;\nx2[3] = -14.47619047619047600000;\nx2[4] = -13.96825396825396800000;\nx2[5] = -13.46031746031746000000;\nx2[6] = -12.95238095238095300000;\nx2[7] = -12.44444444444444500000;\nx2[8] = -11.93650793650793700000;\nx2[9] = -11.42857142857142900000;\nx2[10] = -10.92063492063492100000;\nx2[11] = -10.41269841269841300000;\nx2[12] = -9.90476190476190510000;\nx2[13] = -9.39682539682539720000;\nx2[14] = -8.88888888888888930000;\nx2[15] = -8.38095238095238140000;\nx2[16] = -7.87301587301587350000;\nx2[17] = -7.36507936507936560000;\nx2[18] = -6.85714285714285770000;\nx2[19] = -6.34920634920634970000;\nx2[20] = -5.84126984126984180000;\nx2[21] = -5.33333333333333390000;\nx2[22] = -4.82539682539682600000;\nx2[23] = -4.31746031746031810000;\nx2[24] = -3.80952380952381020000;\nx2[25] = -3.30158730158730230000;\nx2[26] = -2.79365079365079440000;\nx2[27] = -2.28571428571428650000;\nx2[28] = -1.77777777777777860000;\nx2[29] = -1.26984126984127070000;\nx2[30] = -0.76190476190476275000;\nx2[31] = -0.25396825396825484000;\nx2[32] = 0.25396825396825307000;\nx2[33] = 0.76190476190476275000;\nx2[34] = 1.26984126984126890000;\nx2[35] = 1.77777777777777860000;\nx2[36] = 2.28571428571428470000;\nx2[37] = 2.79365079365079440000;\nx2[38] = 3.30158730158730050000;\nx2[39] = 3.80952380952381020000;\nx2[40] = 4.31746031746031630000;\nx2[41] = 4.82539682539682600000;\nx2[42] = 5.33333333333333210000;\nx2[43] = 5.84126984126984180000;\nx2[44] = 6.34920634920634800000;\nx2[45] = 6.85714285714285770000;\nx2[46] = 7.36507936507936380000;\nx2[47] = 7.87301587301587350000;\nx2[48] = 8.38095238095237960000;\nx2[49] = 8.88888888888888930000;\nx2[50] = 9.39682539682539540000;\nx2[51] = 9.90476190476190510000;\nx2[52] = 10.41269841269841100000;\nx2[53] = 10.92063492063492100000;\nx2[54] = 11.42857142857142700000;\nx2[55] = 11.93650793650793700000;\nx2[56] = 12.44444444444444300000;\nx2[57] = 12.95238095238095300000;\nx2[58] = 13.46031746031745900000;\nx2[59] = 13.96825396825396800000;\nx2[60] = 14.47619047619047400000;\nx2[61] = 14.98412698412698400000;\nx2[62] = 15.49206349206349000000;\nx2[63] = 16.00000000000000000000;\n\n\nvar y = new Array();\ny[0] = +Infinity;\ny[1] = 1664158979.11096290000000000000;\ny[2] = 25596.98862206424700000000;\ny[3] = 51.24224360332205900000;\ny[4] = 0.80253721621001273000;\ny[5] = 0.04013281604184240600;\ny[6] = 0.00427181167466968250;\ny[7] = 0.00077698684629307839;\ny[8] = 0.00021140449751288852;\ny[9] = 0.00007886641216275820;\ny[10] = 0.00003797970495625904;\ny[11] = 0.00002260186576944384;\ny[12] = 0.00001608735704675994;\ny[13] = 0.00001335526639440840;\ny[14] = 0.00001267782407825002;\ny[15] = 0.00001354410739307298;\ny[16] = 0.00001607404700077214;\ny[17] = 0.00002096489798949858;\ny[18] = 0.00002978033411316872;\ny[19] = 0.00004572015769326707;\ny[20] = 0.00007536620884896827;\ny[21] = 0.00013263967558882687;\ny[22] = 0.00024800091950917796;\ny[23] = 0.00049049578772052680;\ny[24] = 0.00102225521238885490;\ny[25] = 0.00223744147356661880;\ny[26] = 0.00512739755878587920;\ny[27] = 0.01226918030754863000;\ny[28] = 0.03058049475427409400;\ny[29] = 0.07921771472569966200;\ny[30] = 0.21285098601167457000;\ny[31] = 0.59211846233860321000;\ny[32] = 1.70252376919407730000;\ny[33] = 5.05197994186350920000;\ny[34] = 15.44896866758827700000;\ny[35] = 48.62279949816147700000;\ny[36] = 157.31086033139039000000;\ny[37] = 522.60021277476767000000;\ny[38] = 1780.82316713426990000000;\ny[39] = 6218.58509846337710000000;\ny[40] = 22232.54916898025500000000;\ny[41] = 81310.50695814844200000000;\ny[42] = 303962.39599994919000000000;\ny[43] = 1160609.39151835810000000000;\ny[44] = 4523160.16396183520000000000;\ny[45] = 17980506.53105686600000000000;\ny[46] = 72861260.63140085300000000000;\ny[47] = 300795965.18372804000000000000;\ny[48] = 1264408843.88636260000000000000;\ny[49] = 5408983705.82595920000000000000;\ny[50] = 23536438485.32324600000000000000;\ny[51] = 104125724201.77888000000000000000;\ny[52] = 468137079409.17462000000000000000;\ny[53] = 2137965865913.91260000000000000000;\ny[54] = 9914368643808.25200000000000000000;\ny[55] = 46665726995317.89800000000000000000;\ny[56] = 222863786409039.87000000000000000000;\ny[57] = 1079534443702065.00000000000000000000;\ny[58] = 5302037850329952.00000000000000000000;\ny[59] = 26394813313751084.00000000000000000000;\ny[60] = 133146543235024720.00000000000000000000;\ny[61] = 680375082351885950.00000000000000000000;\ny[62] = 3520878542447823900.00000000000000000000;\ny[63] = 18446744073709552000.00000000000000000000;\n\n\n\nvar val;\nfor (i = 0; i < vnum; i++)\n{\n\tval = Math.pow(x1[i], x2[i]);\n\tif (!isEqual(val, y[i]))\n\t{\n\t\t$ERROR(\"\\nx1 = \" + x1[i] + \"\\nx2 = \" + x2[i] + \"\\nlibc.pow(x1,x2) = \" + y[i] + \"\\nMath.pow(x1,x2) = \" + Math.pow(x1[i], x2[i]) + \"\\nMath.abs(libc.pow(x1,x2) - Math.pow(x1,x2)) > \" + prec + \"\\n\\n\"); \n\t}\n}\n",
+ "id": "S15.8.2.13_A24"
+ },
+ {
+ "section": "15.8.2.13",
+ "description": "Checking if Math.pow(x,y) equals to 1, where x is number or NaN and y is -0",
+ "test": "// CHECK#1\n\ny = +0;\nx = new Array();\nx[0] = -Infinity;\nx[1] = -1.7976931348623157E308; //largest (by module) finite number\nx[2] = -0.000000000000001;\nx[3] = -0;\nx[4] = +0\nx[5] = 0.000000000000001;\nx[6] = 1.7976931348623157E308; //largest finite number\nx[7] = +Infinity;\nx[8] = NaN;\nxnum = 9;\n\nfor (i = 0; i < xnum; i++)\n{\n\tif (Math.pow(x[i],y) !== 1)\n\t{\n\t\t$ERROR(\"#1: Math.pow(\" + x[i] + \", -0) !== 1\");\n\t}\n}\n",
+ "id": "S15.8.2.13_A3"
+ },
+ {
+ "section": "15.8.2.13",
+ "description": "Checking if Math.pow(x,y) is NaN, where x is NaN and y is nonzero",
+ "test": "// CHECK#1\n\nx = NaN;\ny = new Array();\ny[0] = -Infinity;\ny[1] = -1.7976931348623157E308; //largest (by module) finite number\ny[2] = -0.000000000000001;\ny[3] = 0.000000000000001;\ny[4] = 1.7976931348623157E308; //largest finite number\ny[5] = +Infinity;\ny[6] = NaN;\nynum = 7;\n\nfor (i = 0; i < ynum; i++)\n{\n\tif (!isNaN(Math.pow(x,y[i])))\n\t{\n\t\t$ERROR(\"#1: isNaN(Math.pow(\" + x + \", \" + y[i] + \")) === false\");\n\t}\n}\n",
+ "id": "S15.8.2.13_A4"
+ },
+ {
+ "section": "15.8.2.13",
+ "description": "Checking if Math.pow(x,y) equals to +Infinity, where abs(x)>1 and y is +Infinity",
+ "test": "// CHECK#1\n\ny = +Infinity;\nx = new Array();\nx[0] = -Infinity;\nx[1] = -1.7976931348623157E308; //largest (by module) finite number\nx[2] = -1.000000000000001;\nx[3] = 1.000000000000001;\nx[4] = 1.7976931348623157E308; //largest finite number\nx[5] = +Infinity;\nxnum = 6;\n\nfor (i = 0; i < xnum; i++)\n{\n\tif (Math.pow(x[i],y) !== +Infinity)\n\t{\n\t\t$ERROR(\"#1: Math.pow(\" + x[i] + \", \" + y + \") !== +Infinity\");\n\t}\n}\n",
+ "id": "S15.8.2.13_A5"
+ },
+ {
+ "section": "15.8.2.13",
+ "description": "Checking if Math.pow(x,y) equals to +0, where abs(x)>1 and y is -Infinity",
+ "test": "// CHECK#1\n\ny = -Infinity;\nx = new Array();\nx[0] = -Infinity;\nx[1] = -1.7976931348623157E308; //largest (by module) finite number\nx[2] = -1.000000000000001;\nx[3] = 1.000000000000001;\nx[4] = 1.7976931348623157E308; //largest finite number\nx[5] = +Infinity;\nxnum = 6;\n\nfor (i = 0; i < xnum; i++)\n{\n\tif (Math.pow(x[i],y) !== +0)\n\t{\n\t\t$ERROR(\"#1: Math.pow(\" + x[i] + \", \" + y + \") !== +0\");\n\t}\n}\n",
+ "id": "S15.8.2.13_A6"
+ },
+ {
+ "section": "15.8.2.13",
+ "description": "Checking if Math.pow(x,y) is NaN, where abs(x)==1 and y is +Infinity",
+ "test": "// CHECK#1\n\ny = +Infinity;\nx = new Array();\nx[0] = -1;\nx[1] = 1\nxnum = 2;\n\nfor (i = 0; i < xnum; i++)\n{\n\tif (!isNaN(Math.pow(x[i],y)))\n\t{\n\t\t$FAIL(\"#1: isNaN(Math.pow(\" + x[i] + \", \" + y + \")) === false\");\n\t}\n}\n",
+ "id": "S15.8.2.13_A7"
+ },
+ {
+ "section": "15.8.2.13",
+ "description": "Checking if Math.pow(x,y) is NaN, where abs(x)==1 and y is -Infinity",
+ "test": "// CHECK#1\n\ny = -Infinity;\nx = new Array();\nx[0] = -1;\nx[1] = 1\nxnum = 2;\n\nfor (i = 0; i < xnum; i++)\n{\n\tif (!isNaN(Math.pow(x[i],y)))\n\t{\n\t\t$FAIL(\"#1: isNaN(Math.pow(\" + x[i] + \", \" + y + \")) === false\");\n\t}\n}\n",
+ "id": "S15.8.2.13_A8"
+ },
+ {
+ "section": "15.8.2.13",
+ "description": "Checking if Math.pow(x,y) equals to +0, where abs(x)<1 and y is +Infinity",
+ "test": "// CHECK#1\n\ny = +Infinity;\nx = new Array();\nx[0] = 0.999999999999999;\nx[1] = 0.5;\nx[2] = +0;\nx[3] = -0;\nx[4] = -0.5;\nx[5] = -0.999999999999999;\nxnum = 6;\n\nfor (i = 0; i < xnum; i++)\n{\n\tif (Math.pow(x[i],y) !== +0)\n\t{\n\t\t$ERROR(\"#1: Math.pow(\" + x[i] + \", \" + y + \") !== +0\");\n\t}\n}\n",
+ "id": "S15.8.2.13_A9"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.8.2.14_random.json b/website/resources/scripts/testcases2/15.8.2.14_random.json
new file mode 100644
index 000000000..b37b4b3ab
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.8.2.14_random.json
@@ -0,0 +1,14 @@
+{
+ "testCollection": {
+ "name": "15.8.2.14_random",
+ "numTests": 1,
+ "tests": [
+ {
+ "section": "15.8.2.14",
+ "description": "Checking if Math.random() is a number between 0 and 1, calling Math.random() 100 times",
+ "test": "// CHECK#1\nfor (i = 0; i < 100; i++)\n{\n\tval = Math.random();\n\tif (val < 0 || val >= 1)\n\t{\n\t\t$ERROR(\"#1: Math.random() = \" + val);\n\t}\n}\n",
+ "id": "S15.8.2.14_A1"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.8.2.15_round.json b/website/resources/scripts/testcases2/15.8.2.15_round.json
new file mode 100644
index 000000000..3444893dc
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.8.2.15_round.json
@@ -0,0 +1,50 @@
+{
+ "testCollection": {
+ "name": "15.8.2.15_round",
+ "numTests": 7,
+ "tests": [
+ {
+ "section": "15.8.2.15",
+ "description": "Checking if Math.round(x) is NaN, where x is NaN",
+ "test": "// CHECK#1\nvar x = NaN;\nif (!isNaN(Math.round(x)))\n{\n\t$ERROR(\"#1: 'var x=NaN; isNaN(Math.round(x)) === false'\");\n}\n",
+ "id": "S15.8.2.15_A1"
+ },
+ {
+ "section": "15.8.2.15",
+ "description": "Checking if Math.round(x) equals to +0, where x is +0",
+ "test": "// CHECK#1\nvar x = +0;\nif (Math.round(x) !== +0)\n{\n\t$ERROR(\"#1: 'var x=+0; Math.round(x) !== +0'\");\n}\n",
+ "id": "S15.8.2.15_A2"
+ },
+ {
+ "section": "15.8.2.15",
+ "description": "Checking if Math.round(x) equals to -0, where x is -0",
+ "test": "// CHECK#1\nvar x = -0;\nif (Math.round(x) !== -0)\n{\n\t$ERROR(\"#1: 'var x=-0; Math.round(x) !== -0'\");\n}\n",
+ "id": "S15.8.2.15_A3"
+ },
+ {
+ "section": "15.8.2.15",
+ "description": "Checking if Math.round(x) is +Infinity, where x is +Infinity",
+ "test": "// CHECK#1\nvar x = +Infinity;\nif (Math.round(x) !== +Infinity)\n{\n\t$ERROR(\"#1: 'var x=+Infinity; Math.round(x) !== +Infinity'\");\n}\n",
+ "id": "S15.8.2.15_A4"
+ },
+ {
+ "section": "15.8.2.15",
+ "description": "Checking if Math.round(x) is -Infinity, where x is -Infinity",
+ "test": "// CHECK#1\nvar x = -Infinity;\nif (Math.round(x) !== -Infinity)\n{\n\t$ERROR(\"#1: 'var x=-Infinity; Math.round(x) !== -Infinity'\");\n}\n",
+ "id": "S15.8.2.15_A5"
+ },
+ {
+ "section": "15.8.2.15",
+ "description": ": Checking if Math.round(x) is equal to Math.floor(x+0.5), where x equals to 0, greater than 0, or is less than -0.5; this check is performed on 2000 argument x values;",
+ "test": "// CHECK#1\nfor (i = 0; i <= 1000; i++)\n{\n\tx = i/10.0;\n\tif (Math.round(x) !== Math.floor(x + 0.5))\n\t{\n\t\t$ERROR(\"#1: 'x = \" + x + \"; Math.round(x) !== Math.floor(x + 0.5)'\")\n\t}\n}\n\nfor (i = -5; i >= -1000; i--)\n{\n\tif (i === -5)\n\t{\n\t\tx = -0.500000000000001;\n\t} else\n\t{\n\t\tx = i/10.0;\n\t}\n\t\n\tif (Math.round(x) !== Math.floor(x + 0.5))\n\t{\n\t\t$ERROR(\"#2: 'x = \" + x + \"; Math.round(x) !== Math.floor(x + 0.5)'\")\n\t}\n}\n",
+ "id": "S15.8.2.15_A6"
+ },
+ {
+ "section": "15.8.2.15",
+ "description": "Checking if Math.round(x) is equal -0, where x is equal to 0, equal to -0.5, or less than -0 while greater than -0.5",
+ "test": "// CHECK#1\nif (Math.round(-0) !== -0)\n{\n\t$ERROR(\"#1: 'Math.round(-0) !== -0'\");\n}\n\n// CHECK#2\nif (Math.round(-0.5) !== -0)\n{\n\t$ERROR(\"#2: 'Math.round(-0.5) !== -0'\");\n}\n\n// CHECK#3\nif (Math.round(-0.25) !== -0)\n{\n\t$ERROR(\"#3: 'Math.round(-0.25) !== -0'\");\n}\n",
+ "id": "S15.8.2.15_A7"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.8.2.16_sin.json b/website/resources/scripts/testcases2/15.8.2.16_sin.json
new file mode 100644
index 000000000..f16482a9f
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.8.2.16_sin.json
@@ -0,0 +1,44 @@
+{
+ "testCollection": {
+ "name": "15.8.2.16_sin",
+ "numTests": 6,
+ "tests": [
+ {
+ "section": "15.8.2.16",
+ "description": "Checking if Math.sin(NaN) is NaN",
+ "test": "// CHECK#1\nvar x = NaN;\nif (!isNaN(Math.sin(x)))\n{\n\t$ERROR(\"#1: 'var x=NaN; isNaN(Math.sin(x)) === false'\");\n}\n",
+ "id": "S15.8.2.16_A1"
+ },
+ {
+ "section": "15.8.2.16",
+ "description": "Checking if Math.sin(-0) equals to -0",
+ "test": "// CHECK#1\nvar x = -0;\nif (Math.sin(x) !== -0)\n{\n\t$ERROR(\"#1: 'var x = -0; Math.sin(x) !== -0'\");\n}\n",
+ "id": "S15.8.2.16_A3"
+ },
+ {
+ "section": "15.8.2.16",
+ "description": "Checking if Math.sin(+Infinity) is NaN",
+ "test": "// CHECK#1\nvar x = +Infinity;\nif (!isNaN(Math.sin(x)))\n{\n\t$ERROR(\"#1: 'var x = +Infinity; isNaN(Math.sin(x)) === false'\");\n}\n",
+ "id": "S15.8.2.16_A4"
+ },
+ {
+ "section": "15.8.2.16",
+ "description": "Checking if Math.sin(-Infinity) is NaN",
+ "test": "// CHECK#1\nvar x = -Infinity;\nif (!isNaN(Math.sin(x)))\n{\n\t$ERROR(\"#1: 'var x = -Infinity; isNaN(Math.sin(x)) === false'\");\n}\n",
+ "id": "S15.8.2.16_A5"
+ },
+ {
+ "section": "15.8.2.16",
+ "description": "Checking if Math.sin(x) equals to Math.sin(x+n*2*Math.PI) with precision 0.000000000003, where n is an integer from 1 to 100 and x is one of 10 float point values from 0 to 2*Math.PI",
+ "test": "// CHECK#1\n prec = 0.000000000003;\n//prec = 0.000000000000001;\nperiod = 2*Math.PI;\npernum = 100;\n\na = -pernum * period;\nb = pernum * period;\nsnum = 9; \nstep = period/snum + 0.0;\nx = new Array();\nfor (i = 0; i < snum; i++)\n{\n\tx[i] = a + i*step;\n}\nx[9] = a + period;\n\nvar curval;\nvar curx;\nvar j;\nfor (i = 0; i < snum; i++)\n{\n\tcurval = Math.sin(x[i]);\n\tcurx = x[i] + period;\n\tj = 0;\n\twhile (curx <= b)\n\t{\n\t\tcurx += period;\n\t\tj++;\n\t\tif (Math.abs(Math.sin(curx) - curval) >= prec)\n\t\t{\n\t\t\t$FAIL(\"#1: sin is found out to not be periodic:\\n Math.abs(Math.sin(\" + x[i] + \") - Math.sin(\" + x[i] + \" + 2*Math.PI*\" + j + \")) >= \" + prec + \"\\n Math.sin(\" + x[i] + \") === \" + curval + \"\\n Math.sin(\" + curx + \") === \" + Math.sin(curx));\n\t\t}\n\t}\n}\n",
+ "id": "S15.8.2.16_A6"
+ },
+ {
+ "section": "15.8.2.16",
+ "description": ": Checking if Math.sin is approximately equals to its mathematical values on the set of 64 argument values; all the sample values is calculated with LibC;",
+ "test": "$INCLUDE(\"math_precision.js\");\n$INCLUDE(\"math_isequal.js\");\n\n// CHECK#1\nvnum = 64;\nvar x = new Array();\nx[0] = 0.00000000000000000000;\nx[1] = 0.09973310011396169200;\nx[2] = 0.19946620022792338000;\nx[3] = 0.29919930034188508000;\nx[4] = 0.39893240045584677000;\nx[5] = 0.49866550056980841000;\nx[6] = 0.59839860068377015000;\nx[7] = 0.69813170079773179000;\nx[8] = 0.79786480091169354000;\nx[9] = 0.89759790102565518000;\nx[10] = 0.99733100113961681000;\nx[11] = 1.09706410125357840000;\nx[12] = 1.19679720136754030000;\nx[13] = 1.29653030148150190000;\nx[14] = 1.39626340159546360000;\nx[15] = 1.49599650170942520000;\nx[16] = 1.59572960182338710000;\nx[17] = 1.69546270193734870000;\nx[18] = 1.79519580205131040000;\nx[19] = 1.89492890216527200000;\nx[20] = 1.99466200227923360000;\nx[21] = 2.09439510239319570000;\nx[22] = 2.19412820250715690000;\nx[23] = 2.29386130262111850000;\nx[24] = 2.39359440273508060000;\nx[25] = 2.49332750284904230000;\nx[26] = 2.59306060296300390000;\nx[27] = 2.69279370307696550000;\nx[28] = 2.79252680319092720000;\nx[29] = 2.89225990330488880000;\nx[30] = 2.99199300341885040000;\nx[31] = 3.09172610353281210000;\nx[32] = 3.19145920364677420000;\nx[33] = 3.29119230376073580000;\nx[34] = 3.39092540387469740000;\nx[35] = 3.49065850398865910000;\nx[36] = 3.59039160410262070000;\nx[37] = 3.69012470421658230000;\nx[38] = 3.78985780433054400000;\nx[39] = 3.88959090444450560000;\nx[40] = 3.98932400455846730000;\nx[41] = 4.08905710467242840000;\nx[42] = 4.18879020478639140000;\nx[43] = 4.28852330490035260000;\nx[44] = 4.38825640501431380000;\nx[45] = 4.48798950512827590000;\nx[46] = 4.58772260524223710000;\nx[47] = 4.68745570535619920000;\nx[48] = 4.78718880547016120000;\nx[49] = 4.88692190558412240000;\nx[50] = 4.98665500569808450000;\nx[51] = 5.08638810581204570000;\nx[52] = 5.18612120592600780000;\nx[53] = 5.28585430603996990000;\nx[54] = 5.38558740615393110000;\nx[55] = 5.48532050626789310000;\nx[56] = 5.58505360638185430000;\nx[57] = 5.68478670649581550000;\nx[58] = 5.78451980660977760000;\nx[59] = 5.88425290672373970000;\nx[60] = 5.98398600683770090000;\nx[61] = 6.08371910695166300000;\nx[62] = 6.18345220706562420000;\nx[63] = 6.28318530717958620000;\n\n\nvar y = new Array();\ny[0] = 0.00000000000000000000;\ny[1] = 0.09956784659581666100;\ny[2] = 0.19814614319939758000;\ny[3] = 0.29475517441090421000;\ny[4] = 0.38843479627469474000;\ny[5] = 0.47825397862131819000;\ny[6] = 0.56332005806362206000;\ny[7] = 0.64278760968653925000;\ny[8] = 0.71586684925971844000;\ny[9] = 0.78183148246802980000;\ny[10] = 0.84002592315077140000;\ny[11] = 0.88987180881146855000;\ny[12] = 0.93087374864420425000;\ny[13] = 0.96262424695001203000;\ny[14] = 0.98480775301220802000;\ny[15] = 0.99720379718118013000;\ny[16] = 0.99968918200081625000;\ny[17] = 0.99223920660017206000;\ny[18] = 0.97492791218182362000;\ny[19] = 0.94792734616713181000;\ny[20] = 0.91150585231167325000;\ny[21] = 0.86602540378443849000;\ny[22] = 0.81193800571585661000;\ny[23] = 0.74978120296773443000;\ny[24] = 0.68017273777091936000;\ny[25] = 0.60380441032547738000;\ny[26] = 0.52143520337949811000;\ny[27] = 0.43388373911755823000;\ny[28] = 0.34202014332566888000;\ny[29] = 0.24675739769029384000;\ny[30] = 0.14904226617617472000;\ny[31] = 0.04984588566069748200;\ny[32] = -0.04984588566069723300;\ny[33] = -0.14904226617617447000;\ny[34] = -0.24675739769029362000;\ny[35] = -0.34202014332566866000;\ny[36] = -0.43388373911755801000;\ny[37] = -0.52143520337949789000;\ny[38] = -0.60380441032547716000;\ny[39] = -0.68017273777091913000;\ny[40] = -0.74978120296773398000;\ny[41] = -0.81193800571585595000;\ny[42] = -0.86602540378443882000;\ny[43] = -0.91150585231167314000;\ny[44] = -0.94792734616713159000;\ny[45] = -0.97492791218182362000;\ny[46] = -0.99223920660017195000;\ny[47] = -0.99968918200081625000;\ny[48] = -0.99720379718118013000;\ny[49] = -0.98480775301220813000;\ny[50] = -0.96262424695001203000;\ny[51] = -0.93087374864420447000;\ny[52] = -0.88987180881146866000;\ny[53] = -0.84002592315077129000;\ny[54] = -0.78183148246802991000;\ny[55] = -0.71586684925971833000;\ny[56] = -0.64278760968653958000;\ny[57] = -0.56332005806362273000;\ny[58] = -0.47825397862131858000;\ny[59] = -0.38843479627469474000;\ny[60] = -0.29475517441090471000;\ny[61] = -0.19814614319939772000;\ny[62] = -0.09956784659581728600;\ny[63] = -0.0000000000000002449293598294706400;\n\n\nvar val;\nfor (i = 0; i < vnum; i++)\n{\n\tval = Math.sin(x[i]);\n\tif (!isEqual(val, y[i]))\n\t{\n\t\t$ERROR(\"\\nx = \" + x[i] + \"\\nlibc.sin(x) = \" + y[i] + \"\\nMath.sin(x) = \" + Math.sin(x[i]) + \"\\nMath.abs(libc.sin(x) - Math.sin(x)) > \" + prec + \"\\n\\n\"); \n\t}\n}\n",
+ "id": "S15.8.2.16_A7"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.8.2.17_sqrt.json b/website/resources/scripts/testcases2/15.8.2.17_sqrt.json
new file mode 100644
index 000000000..7ee6f3b36
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.8.2.17_sqrt.json
@@ -0,0 +1,44 @@
+{
+ "testCollection": {
+ "name": "15.8.2.17_sqrt",
+ "numTests": 6,
+ "tests": [
+ {
+ "section": "15.8.2.17",
+ "description": "Checking if Math.sqrt(NaN) is NaN",
+ "test": "// CHECK#1\nvar x = NaN;\nif (!isNaN(Math.sqrt(x)))\n{\n\t$ERROR(\"#1: 'var x=NaN; isNaN(Math.sqrt(x)) === false'\");\n}\n",
+ "id": "S15.8.2.17_A1"
+ },
+ {
+ "section": "15.8.2.17",
+ "description": "Checking if Math.sqrt(x) is NaN, where x is less than 0",
+ "test": "// CHECK#1\nvar x = -0.000000000000001;\nif (!isNaN(Math.sqrt(x)))\n{\n\t$ERROR(\"#1: 'var x=-0.000000000000001; isNaN(Math.sqrt(x)) === false'\");\n}\n\n// CHECK#2\nvar x = -1;\nif (!isNaN(Math.sqrt(x)))\n{\n\t$ERROR(\"#2: 'var x=-1; isNaN(Math.sqrt(x)) === false'\");\n}\n\n// CHECK#3\nvar x = -Infinity;\nif (!isNaN(Math.sqrt(x)))\n{\n\t$ERROR(\"#3: 'var x=-Infinity; isNaN(Math.sqrt(x)) === false'\");\n}\n",
+ "id": "S15.8.2.17_A2"
+ },
+ {
+ "section": "15.8.2.17",
+ "description": "Checking if Math.sqrt(+0) equals to +0",
+ "test": "// CHECK#1\nvar x = +0;\nif (Math.sqrt(x) !== +0)\n{\n\t$ERROR(\"#1: 'var x=+0; Math.sqrt(x) !== +0'\");\n}\n",
+ "id": "S15.8.2.17_A3"
+ },
+ {
+ "section": "15.8.2.17",
+ "description": "Checking if Math.sqrt(-0) equals to -0",
+ "test": "// CHECK#1\nvar x = -0;\nif (Math.sqrt(x) !== -0)\n{\n\t$ERROR(\"#1: 'var x=-0; Math.sqrt(x) !== -0'\");\n}\n",
+ "id": "S15.8.2.17_A4"
+ },
+ {
+ "section": "15.8.2.17",
+ "description": "Checking if Math.sqrt(+Infinity) is +Infinity",
+ "test": "// CHECK#1\nvar x = +Infinity;\nif (Math.sqrt(x) !== +Infinity)\n{\n\t$ERROR(\"#1: 'var x=+Infinity; Math.sqrt(x) !== +Infinity'\");\n}\n",
+ "id": "S15.8.2.17_A5"
+ },
+ {
+ "section": "15.8.2.17",
+ "description": ": Checking if Math.sqrt is approximately equals to its mathematical values on the set of 64 argument values; all the sample values is calculated with LibC;",
+ "test": "$INCLUDE(\"math_precision.js\");\n$INCLUDE(\"math_isequal.js\");\n\n// CHECK#1\nvnum = 64;\nvar x = new Array();\nx[0] = 0.00000000000000000000;\nx[1] = 0.25396825396825395000;\nx[2] = 0.50793650793650791000;\nx[3] = 0.76190476190476186000;\nx[4] = 1.01587301587301580000;\nx[5] = 1.26984126984126980000;\nx[6] = 1.52380952380952370000;\nx[7] = 1.77777777777777770000;\nx[8] = 2.03174603174603160000;\nx[9] = 2.28571428571428560000;\nx[10] = 2.53968253968253950000;\nx[11] = 2.79365079365079350000;\nx[12] = 3.04761904761904740000;\nx[13] = 3.30158730158730140000;\nx[14] = 3.55555555555555540000;\nx[15] = 3.80952380952380930000;\nx[16] = 4.06349206349206330000;\nx[17] = 4.31746031746031720000;\nx[18] = 4.57142857142857120000;\nx[19] = 4.82539682539682510000;\nx[20] = 5.07936507936507910000;\nx[21] = 5.33333333333333300000;\nx[22] = 5.58730158730158700000;\nx[23] = 5.84126984126984090000;\nx[24] = 6.09523809523809490000;\nx[25] = 6.34920634920634890000;\nx[26] = 6.60317460317460280000;\nx[27] = 6.85714285714285680000;\nx[28] = 7.11111111111111070000;\nx[29] = 7.36507936507936470000;\nx[30] = 7.61904761904761860000;\nx[31] = 7.87301587301587260000;\nx[32] = 8.12698412698412650000;\nx[33] = 8.38095238095238140000;\nx[34] = 8.63492063492063440000;\nx[35] = 8.88888888888888930000;\nx[36] = 9.14285714285714230000;\nx[37] = 9.39682539682539720000;\nx[38] = 9.65079365079365030000;\nx[39] = 9.90476190476190510000;\nx[40] = 10.15873015873015800000;\nx[41] = 10.41269841269841300000;\nx[42] = 10.66666666666666600000;\nx[43] = 10.92063492063492100000;\nx[44] = 11.17460317460317400000;\nx[45] = 11.42857142857142900000;\nx[46] = 11.68253968253968200000;\nx[47] = 11.93650793650793700000;\nx[48] = 12.19047619047619000000;\nx[49] = 12.44444444444444500000;\nx[50] = 12.69841269841269800000;\nx[51] = 12.95238095238095300000;\nx[52] = 13.20634920634920600000;\nx[53] = 13.46031746031746000000;\nx[54] = 13.71428571428571400000;\nx[55] = 13.96825396825396800000;\nx[56] = 14.22222222222222100000;\nx[57] = 14.47619047619047600000;\nx[58] = 14.73015873015872900000;\nx[59] = 14.98412698412698400000;\nx[60] = 15.23809523809523700000;\nx[61] = 15.49206349206349200000;\nx[62] = 15.74603174603174500000;\nx[63] = 16.00000000000000000000;\n\n\n\nvar y = new Array();\ny[0] = 0.00000000000000000000;\ny[1] = 0.50395263067896967000;\ny[2] = 0.71269664509979835000;\ny[3] = 0.87287156094396945000;\ny[4] = 1.00790526135793930000;\ny[5] = 1.12687233963802200000;\ny[6] = 1.23442679969673530000;\ny[7] = 1.33333333333333330000;\ny[8] = 1.42539329019959670000;\ny[9] = 1.51185789203690880000;\ny[10] = 1.59363814577919150000;\ny[11] = 1.67142178807468980000;\ny[12] = 1.74574312188793890000;\ny[13] = 1.81702705031799170000;\ny[14] = 1.88561808316412670000;\ny[15] = 1.95180014589706640000;\ny[16] = 2.01581052271587870000;\ny[17] = 2.07784992659727900000;\ny[18] = 2.13808993529939520000;\ny[19] = 2.19667858946110380000;\ny[20] = 2.25374467927604400000;\ny[21] = 2.30940107675850290000;\ny[22] = 2.36374736114111530000;\ny[23] = 2.41687191246657520000;\ny[24] = 2.46885359939347060000;\ny[25] = 2.51976315339484810000;\ny[26] = 2.56966429775848400000;\ny[27] = 2.61861468283190830000;\ny[28] = 2.66666666666666650000;\ny[29] = 2.71386797119523940000;\ny[30] = 2.76026223736941700000;\ny[31] = 2.80588949764880670000;\ny[32] = 2.85078658039919340000;\ny[33] = 2.89498745782298350000;\ny[34] = 2.93852354676981160000;\ny[35] = 2.98142396999971960000;\ny[36] = 3.02371578407381760000;\ny[37] = 3.06542417893925380000;\ny[38] = 3.10657265339049320000;\ny[39] = 3.14718316987777280000;\ny[40] = 3.18727629155838300000;\ny[41] = 3.22687130401855570000;\ny[42] = 3.26598632371090410000;\ny[43] = 3.30463839483761390000;\ny[44] = 3.34284357614937950000;\ny[45] = 3.38061701891406630000;\ny[46] = 3.41797303712883060000;\ny[47] = 3.45492517089848670000;\ny[48] = 3.49148624377587780000;\ny[49] = 3.52766841475278750000;\ny[50] = 3.56348322549899170000;\ny[51] = 3.59894164336974940000;\ny[52] = 3.63405410063598340000;\ny[53] = 3.66883053033489940000;\ny[54] = 3.70328039909020570000;\ny[55] = 3.73741273720925400000;\ny[56] = 3.77123616632825340000;\ny[57] = 3.80475892484536750000;\ny[58] = 3.83798889135426350000;\ny[59] = 3.87093360626696680000;\ny[60] = 3.90360029179413280000;\ny[61] = 3.93599587043272870000;\ny[62] = 3.96812698209517300000;\ny[63] = 4.00000000000000000000;\n\n\nvar val;\nfor (i = 0; i < vnum; i++)\n{\n\tval = Math.sqrt(x[i]);\n\tif (!isEqual(val, y[i]))\n\t{\n\t\t$ERROR(\"\\nx = \" + x[i] + \"\\nlibc.sqrt(x) = \" + y[i] + \"\\nMath.sqrt(x) = \" + Math.sqrt(x[i]) + \"\\nMath.abs(libc.sqrt(x) - Math.sqrt(x)) > \" + prec + \"\\n\\n\"); \n\t}\n}\n",
+ "id": "S15.8.2.17_A6"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.8.2.18_tan.json b/website/resources/scripts/testcases2/15.8.2.18_tan.json
new file mode 100644
index 000000000..e5ba72fce
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.8.2.18_tan.json
@@ -0,0 +1,50 @@
+{
+ "testCollection": {
+ "name": "15.8.2.18_tan",
+ "numTests": 7,
+ "tests": [
+ {
+ "section": "15.8.2.18",
+ "description": "Checking if Math.tan(NaN) is NaN",
+ "test": "// CHECK#1\nvar x = NaN;\nif (!isNaN(Math.tan(x)))\n{\n\t$ERROR(\"#1: 'var x=NaN; isNaN(Math.tan(x)) === false'\");\n}\n",
+ "id": "S15.8.2.18_A1"
+ },
+ {
+ "section": "15.8.2.18",
+ "description": "Checking if Math.tan(+0) equals to +0",
+ "test": "// CHECK#1\nvar x = +0;\nif (Math.tan(x) !== +0)\n{\n\t$ERROR(\"#1: 'var x=+0; Math.tan(x) !== +0'\");\n}\n",
+ "id": "S15.8.2.18_A2"
+ },
+ {
+ "section": "15.8.2.18",
+ "description": "Checking if Math.tan(-0) equals to -0",
+ "test": "// CHECK#1\nvar x = -0;\nif (Math.tan(x) !== -0)\n{\n\t$ERROR(\"#1: 'var x=-0; Math.tan(x) !== -0'\");\n}\n",
+ "id": "S15.8.2.18_A3"
+ },
+ {
+ "section": "15.8.2.18",
+ "description": "Checking if Math.tan(+Infinity) is NaN",
+ "test": "// CHECK#1\nvar x = +Infinity;\nif (!isNaN(Math.tan(x)))\n{\n\t$ERROR(\"#1: 'var x=+Infinity; isNaN(Math.tan(x)) === false'\");\n}\n",
+ "id": "S15.8.2.18_A4"
+ },
+ {
+ "section": "15.8.2.18",
+ "description": "Checking if Math.tan(-Infinity) is NaN",
+ "test": "// CHECK#1\nvar x = -Infinity;\nif (!isNaN(Math.tan(x)))\n{\n\t$ERROR(\"#1: 'var x=-Infinity; isNaN(Math.tan(x)) === false'\");\n}\n",
+ "id": "S15.8.2.18_A5"
+ },
+ {
+ "section": "15.8.2.18",
+ "description": "Checking if Math.tan(x) equals to Math.tan(x+n*Math.PI) with precision 0.000000000003, where n is an integer from 1 to 100 and x is one of 10 float point values from 0 to Math.PI",
+ "test": "// CHECK#1\n prec = 0.00000000003;\n//prec = 0.000000000000001;\nperiod = Math.PI;\npernum = 100;\n\na = -pernum * period + period/2;\nb = pernum * period - period/2;\nsnum = 9; \nstep = period/(snum + 2);\nx = new Array();\nfor (i = 0; i <= snum; i++) //// We exlude special points \n{\t\t\t\t\t\t\t //// in this cycle.\n\tx[i] = a + (i+1)*step; ////\n}\t\t\t\t\t\t\t ////\n\n\nvar curval;\nvar curx;\nvar j;\nfor (i = 0; i < snum; i++)\n{\n\tcurval = Math.tan(x[i]);\n\tcurx = x[i] + period;\n\tj = 0;\n\twhile (curx <= b)\n\t{\n\t\tcurx += period;\n\t\tj++;\n\t\tif (Math.abs(Math.tan(curx) - curval) >= prec)\n\t\t{\n\t\t\t$FAIL(\"#1: tan is found out to not be periodic:\\n Math.abs(Math.tan(\" + x[i] + \") - Math.tan(\" + x[i] + \" + 2*Math.PI*\" + j + \")) >= \" + prec + \"\\n Math.tan(\" + x[i] + \") === \" + curval + \"\\n Math.tan(\" + curx + \") === \" + Math.tan(curx));\n\t\t}\n\t}\n}\n",
+ "id": "S15.8.2.18_A6"
+ },
+ {
+ "section": "15.8.2.18",
+ "description": ": Checking if Math.tan is approximately equals to its mathematical values on the set of 64 argument values; all the sample values is calculated with LibC;",
+ "test": "$INCLUDE(\"math_precision.js\");\n$INCLUDE(\"math_isequal.js\");\n\n// CHECK#1\nvnum = 64;\nvar x = new Array();\nx[0] = -1.57079632679489660000;\nx[1] = -1.52092977673791570000;\nx[2] = -1.47106322668093490000;\nx[3] = -1.42119667662395410000;\nx[4] = -1.37133012656697330000;\nx[5] = -1.32146357650999220000;\nx[6] = -1.27159702645301140000;\nx[7] = -1.22173047639603060000;\nx[8] = -1.17186392633904980000;\nx[9] = -1.12199737628206900000;\nx[10] = -1.07213082622508820000;\nx[11] = -1.02226427616810730000;\nx[12] = -0.97239772611112640000;\nx[13] = -0.92253117605414559000;\nx[14] = -0.87266462599716477000;\nx[15] = -0.82279807594018395000;\nx[16] = -0.77293152588320302000;\nx[17] = -0.72306497582622220000;\nx[18] = -0.67319842576924138000;\nx[19] = -0.62333187571226056000;\nx[20] = -0.57346532565527975000;\nx[21] = -0.52359877559829870000;\nx[22] = -0.47373222554131811000;\nx[23] = -0.42386567548433729000;\nx[24] = -0.37399912542735625000;\nx[25] = -0.32413257537037543000;\nx[26] = -0.27426602531339461000;\nx[27] = -0.22439947525641379000;\nx[28] = -0.17453292519943298000;\nx[29] = -0.12466637514245216000;\nx[30] = -0.07479982508547133900;\nx[31] = -0.02493327502849052000;\nx[32] = 0.02493327502849052000;\nx[33] = 0.07479982508547133900;\nx[34] = 0.12466637514245216000;\nx[35] = 0.17453292519943298000;\nx[36] = 0.22439947525641379000;\nx[37] = 0.27426602531339461000;\nx[38] = 0.32413257537037543000;\nx[39] = 0.37399912542735625000;\nx[40] = 0.42386567548433707000;\nx[41] = 0.47373222554131766000;\nx[42] = 0.52359877559829915000;\nx[43] = 0.57346532565527975000;\nx[44] = 0.62333187571226034000;\nx[45] = 0.67319842576924138000;\nx[46] = 0.72306497582622198000;\nx[47] = 0.77293152588320302000;\nx[48] = 0.82279807594018406000;\nx[49] = 0.87266462599716466000;\nx[50] = 0.92253117605414570000;\nx[51] = 0.97239772611112629000;\nx[52] = 1.02226427616810730000;\nx[53] = 1.07213082622508840000;\nx[54] = 1.12199737628206900000;\nx[55] = 1.17186392633905000000;\nx[56] = 1.22173047639603060000;\nx[57] = 1.27159702645301120000;\nx[58] = 1.32146357650999220000;\nx[59] = 1.37133012656697330000;\nx[60] = 1.42119667662395390000;\nx[61] = 1.47106322668093490000;\nx[62] = 1.52092977673791550000;\nx[63] = 1.57079632679489660000;\n\n\n\nvar y = new Array();\ny[0] = -16331239353195370.00000000000000000000;\ny[1] = -20.03689788997828100000;\ny[2] = -9.99349498241742220000;\ny[3] = -6.63456649978931170000;\ny[4] = -4.94671494494940060000;\ny[5] = -3.92724714760272690000;\ny[6] = -3.24192037576928720000;\ny[7] = -2.74747741945462160000;\ny[8] = -2.37228029184788760000;\ny[9] = -2.07652139657233640000;\ny[10] = -1.83630792973623100000;\ny[11] = -1.63642745273401610000;\ny[12] = -1.46673061342097340000;\ny[13] = -1.32018331365488460000;\ny[14] = -1.19175359259421000000;\ny[15] = -1.07774368351222650000;\ny[16] = -0.97537247158200291000;\ny[17] = -0.88250523616465493000;\ny[18] = -0.79747338888240393000;\ny[19] = -0.71895103828786056000;\ny[20] = -0.64586847728552887000;\ny[21] = -0.57735026918962551000;\ny[22] = -0.51267008667516678000;\ny[23] = -0.45121718317830323000;\ny[24] = -0.39247107881010240000;\ny[25] = -0.33598213147817668000;\ny[26] = -0.28135637451595324000;\ny[27] = -0.22824347439014994000;\ny[28] = -0.17632698070846500000;\ny[29] = -0.12531625823730441000;\ny[30] = -0.07493964001908703900;\ny[31] = -0.02493844305504610100;\ny[32] = 0.02493844305504610100;\ny[33] = 0.07493964001908703900;\ny[34] = 0.12531625823730441000;\ny[35] = 0.17632698070846500000;\ny[36] = 0.22824347439014994000;\ny[37] = 0.28135637451595324000;\ny[38] = 0.33598213147817668000;\ny[39] = 0.39247107881010240000;\ny[40] = 0.45121718317830301000;\ny[41] = 0.51267008667516623000;\ny[42] = 0.57735026918962618000;\ny[43] = 0.64586847728552887000;\ny[44] = 0.71895103828786022000;\ny[45] = 0.79747338888240393000;\ny[46] = 0.88250523616465459000;\ny[47] = 0.97537247158200291000;\ny[48] = 1.07774368351222670000;\ny[49] = 1.19175359259420950000;\ny[50] = 1.32018331365488510000;\ny[51] = 1.46673061342097320000;\ny[52] = 1.63642745273401610000;\ny[53] = 1.83630792973623190000;\ny[54] = 2.07652139657233640000;\ny[55] = 2.37228029184788890000;\ny[56] = 2.74747741945462160000;\ny[57] = 3.24192037576928450000;\ny[58] = 3.92724714760272690000;\ny[59] = 4.94671494494940060000;\ny[60] = 6.63456649978930190000;\ny[61] = 9.99349498241742220000;\ny[62] = 20.03689788997819200000;\ny[63] = 16331239353195370.00000000000000000000;\n\n\nvar val;\nfor (i = 0; i < vnum; i++)\n{\n\tval = Math.tan(x[i]);\n\tif (!isEqual(val, y[i]))\n\t{\n\t\t$ERROR(\"\\nx = \" + x[i] + \"\\nlibc.tan(x) = \" + y[i] + \"\\nMath.tan(x) = \" + Math.tan(x[i]) + \"\\nMath.abs(libc.tan(x) - Math.tan(x)) > \" + prec + \"\\n\\n\"); \n\t}\n}\n",
+ "id": "S15.8.2.18_A7"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.8.2.1_abs.json b/website/resources/scripts/testcases2/15.8.2.1_abs.json
new file mode 100644
index 000000000..73e1c10b6
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.8.2.1_abs.json
@@ -0,0 +1,26 @@
+{
+ "testCollection": {
+ "name": "15.8.2.1_abs",
+ "numTests": 3,
+ "tests": [
+ {
+ "section": "15.8.2.1",
+ "description": "Checking if Math.abs(NaN) is NaN",
+ "test": "// CHECK#1\nvar x = NaN;\nif (!isNaN(Math.abs(x)))\n{\n\t$ERROR(\"#1: 'var x=NaN; isNaN(Math.abs(x)) === false'\");\n}\n",
+ "id": "S15.8.2.1_A1"
+ },
+ {
+ "section": "15.8.2.1",
+ "description": "Checking if Math.abs(-0) equals to +0",
+ "test": "// CHECK#1\nvar x = -0;\nif (Math.abs(x) !== +0)\n{\n\t$ERROR(\"#1: 'var x=-0; Math.abs(x) !== +0'\");\n}\n",
+ "id": "S15.8.2.1_A2"
+ },
+ {
+ "section": "15.8.2.1",
+ "description": "Checking if Math.abs(-Infinity) equals to +Infinity",
+ "test": "// CHECK#1\nvar x = -Infinity;\nif (Math.abs(x) !== +Infinity)\n{\n\t$ERROR(\"#1: 'var x=-Infinity; Math.abs(x) !== +Infinity'\");\n}\n",
+ "id": "S15.8.2.1_A3"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.8.2.2_acos.json b/website/resources/scripts/testcases2/15.8.2.2_acos.json
new file mode 100644
index 000000000..09fb96fdb
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.8.2.2_acos.json
@@ -0,0 +1,38 @@
+{
+ "testCollection": {
+ "name": "15.8.2.2_acos",
+ "numTests": 5,
+ "tests": [
+ {
+ "section": "15.8.2.2",
+ "description": "Checking if Math.acos(NaN) is NaN",
+ "test": "// CHECK#1\nvar x = NaN;\nif (!isNaN(Math.acos(x)))\n{\n\t$ERROR(\"#1: 'var x=NaN; isNaN(Math.acos(x)) === false'\");\n}\n",
+ "id": "S15.8.2.2_A1"
+ },
+ {
+ "section": "15.8.2.2",
+ "description": "Checking if Math.acos(x) is NaN, where x is greater than 1",
+ "test": "// CHECK#1\nvar x = 1.000000000000001;\nif (!isNaN(Math.acos(x)))\n{\n\t$ERROR(\"#1: 'var x = 1.000000000000001; isNaN(Math.acos(x)) === false'\");\n}\n\n// CHECK#2\nx = 2;\nif (!isNaN(Math.acos(x)))\n{\n\t$ERROR(\"#2: 'x = 2; isNaN(Math.acos(x)) === false'\");\n}\n\n// CHECK#3\nx = +Infinity;\nif (!isNaN(Math.acos(x)))\n{\n\t$ERROR(\"#3: 'x = +Infinity; isNaN(Math.acos(x)) === false'\");\n}\n",
+ "id": "S15.8.2.2_A2"
+ },
+ {
+ "section": "15.8.2.2",
+ "description": "Checking if Math.acos(x) is NaN, where x is less than -1",
+ "test": "// CHECK#1\nvar x = -1.000000000000001;\nif (!isNaN(Math.acos(x)))\n{\n\t$ERROR(\"#1: 'var x = -1.000000000000001; isNaN(Math.acos(x)) === false'\");\n}\n\n// CHECK#2\nx = -2;\nif (!isNaN(Math.acos(x)))\n{\n\t$ERROR(\"#2: 'x = -2; isNaN(Math.acos(x)) === false'\");\n}\n\n// CHECK#3\nx = -Infinity;\nif (!isNaN(Math.acos(x)))\n{\n\t$ERROR(\"#3: 'x = -Infinity; isNaN(Math.acos(x)) === false'\");\n}\n",
+ "id": "S15.8.2.2_A3"
+ },
+ {
+ "section": "15.8.2.2",
+ "description": "Checking if Math.acos(1) equals to +0",
+ "test": "// CHECK#1\nvar x = 1;\nif (Math.acos(x) !== +0)\n{\n\t$ERROR(\"#1: 'var x = 1; Math.acos(x) !== +0'\");\n}\n",
+ "id": "S15.8.2.2_A4"
+ },
+ {
+ "section": "15.8.2.2",
+ "description": ": Checking if Math.acos is approximately equals to its mathematical values on the set of 64 argument values; all the sample values is calculated with LibC;",
+ "test": "$INCLUDE(\"math_precision.js\");\n$INCLUDE(\"math_isequal.js\");\n\n// CHECK#1\nvnum = 64;\nvar x = new Array();\nx[0] = -1.00000000000000000000;\nx[1] = -0.96825396825396826000;\nx[2] = -0.93650793650793651000;\nx[3] = -0.90476190476190477000;\nx[4] = -0.87301587301587302000;\nx[5] = -0.84126984126984128000;\nx[6] = -0.80952380952380953000;\nx[7] = -0.77777777777777779000;\nx[8] = -0.74603174603174605000;\nx[9] = -0.71428571428571430000;\nx[10] = -0.68253968253968256000;\nx[11] = -0.65079365079365081000;\nx[12] = -0.61904761904761907000;\nx[13] = -0.58730158730158732000;\nx[14] = -0.55555555555555558000;\nx[15] = -0.52380952380952384000;\nx[16] = -0.49206349206349209000;\nx[17] = -0.46031746031746035000;\nx[18] = -0.42857142857142860000;\nx[19] = -0.39682539682539686000;\nx[20] = -0.36507936507936511000;\nx[21] = -0.33333333333333337000;\nx[22] = -0.30158730158730163000;\nx[23] = -0.26984126984126988000;\nx[24] = -0.23809523809523814000;\nx[25] = -0.20634920634920639000;\nx[26] = -0.17460317460317465000;\nx[27] = -0.14285714285714290000;\nx[28] = -0.11111111111111116000;\nx[29] = -0.07936507936507941600;\nx[30] = -0.04761904761904767200;\nx[31] = -0.01587301587301592800;\nx[32] = 0.01587301587301581700;\nx[33] = 0.04761904761904767200;\nx[34] = 0.07936507936507930500;\nx[35] = 0.11111111111111116000;\nx[36] = 0.14285714285714279000;\nx[37] = 0.17460317460317465000;\nx[38] = 0.20634920634920628000;\nx[39] = 0.23809523809523814000;\nx[40] = 0.26984126984126977000;\nx[41] = 0.30158730158730163000;\nx[42] = 0.33333333333333326000;\nx[43] = 0.36507936507936511000;\nx[44] = 0.39682539682539675000;\nx[45] = 0.42857142857142860000;\nx[46] = 0.46031746031746024000;\nx[47] = 0.49206349206349209000;\nx[48] = 0.52380952380952372000;\nx[49] = 0.55555555555555558000;\nx[50] = 0.58730158730158721000;\nx[51] = 0.61904761904761907000;\nx[52] = 0.65079365079365070000;\nx[53] = 0.68253968253968256000;\nx[54] = 0.71428571428571419000;\nx[55] = 0.74603174603174605000;\nx[56] = 0.77777777777777768000;\nx[57] = 0.80952380952380953000;\nx[58] = 0.84126984126984117000;\nx[59] = 0.87301587301587302000;\nx[60] = 0.90476190476190466000;\nx[61] = 0.93650793650793651000;\nx[62] = 0.96825396825396814000;\nx[63] = 1.00000000000000000000;\n\n\n\n\nvar y = new Array();\ny[0] = 3.14159265358979310000;\ny[1] = 2.88894492730522990000;\ny[2] = 2.78333143507717650000;\ny[3] = 2.70161669879887430000;\ny[4] = 2.63214880477790030000;\ny[5] = 2.57042415502425570000;\ny[6] = 2.51413688066660250000;\ny[7] = 2.46191883468154950000;\ny[8] = 2.41287920284638750000;\ny[9] = 2.36639928027943200000;\ny[10] = 2.32202832592153240000;\ny[11] = 2.27942559835728040000;\ny[12] = 2.23832577143072960000;\ny[13] = 2.19851714445280910000;\ny[14] = 2.15982729701117070000;\ny[15] = 2.12211329592677920000;\ny[16] = 2.08525480235608330000;\ny[17] = 2.04914909144415440000;\ny[18] = 2.01370737086853560000;\ny[19] = 1.97885200409617520000;\ny[20] = 1.94451437773781040000;\ny[21] = 1.91063323624901860000;\ny[22] = 1.87715336135181590000;\ny[23] = 1.84402450933553450000;\ny[24] = 1.81120054356415610000;\ny[25] = 1.77863871614824330000;\ny[26] = 1.74629906437061930000;\ny[27] = 1.71414389570026190000;\ny[28] = 1.68213734113586070000;\ny[29] = 1.65024496088003380000;\ny[30] = 1.61843338941929970000;\ny[31] = 1.58667000928485250000;\ny[32] = 1.55492264430494110000;\ny[33] = 1.52315926417049340000;\ny[34] = 1.49134769270975950000;\ny[35] = 1.45945531245393270000;\ny[36] = 1.42744875788953140000;\ny[37] = 1.39529358921917380000;\ny[38] = 1.36295393744155000000;\ny[39] = 1.33039211002563730000;\ny[40] = 1.29756814425425880000;\ny[41] = 1.26443929223797750000;\ny[42] = 1.23095941734077470000;\ny[43] = 1.19707827585198270000;\ny[44] = 1.16274064949361830000;\ny[45] = 1.12788528272125750000;\ny[46] = 1.09244356214563900000;\ny[47] = 1.05633785123370980000;\ny[48] = 1.01947935766301390000;\ny[49] = 0.98176535657862274000;\ny[50] = 0.94307550913698401000;\ny[51] = 0.90326688215906359000;\ny[52] = 0.86216705523251280000;\ny[53] = 0.81956432766826082000;\ny[54] = 0.77519337331036142000;\ny[55] = 0.72871345074340554000;\ny[56] = 0.67967381890824408000;\ny[57] = 0.62745577292319077000;\ny[58] = 0.57116849856553775000;\ny[59] = 0.50944384881189297000;\ny[60] = 0.43997595479091917000;\ny[61] = 0.35826121851261677000;\ny[62] = 0.25264772628456394000;\ny[63] = 0.00000000000000000000;\n\n\n\n\nvar val;\nfor (i = 0; i < vnum; i++)\n{\n\tval = Math.acos(x[i]);\n\tif (!isEqual(val, y[i]))\n\t{\n\t\t$ERROR(\"\\nx = \" + x[i] + \"\\nlibc.acos(x) = \" + y[i] + \"\\nMath.acos(x) = \" + Math.acos(x[i]) + \"\\nMath.abs(libc.acos(x) - Math.acos(x)) > \" + prec + \"\\n\\n\"); \n\t}\n}\n",
+ "id": "S15.8.2.2_A5"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.8.2.3_asin.json b/website/resources/scripts/testcases2/15.8.2.3_asin.json
new file mode 100644
index 000000000..c804f679d
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.8.2.3_asin.json
@@ -0,0 +1,44 @@
+{
+ "testCollection": {
+ "name": "15.8.2.3_asin",
+ "numTests": 6,
+ "tests": [
+ {
+ "section": "15.8.2.3",
+ "description": "Checking if Math.asin(NaN) is NaN",
+ "test": "// CHECK#1\nvar x = NaN;\nif (!isNaN(Math.asin(x)))\n{\n\t$ERROR(\"#1: 'var x=NaN; isNaN(Math.asin(x)) === false'\");\n}\n",
+ "id": "S15.8.2.3_A1"
+ },
+ {
+ "section": "15.8.2.3",
+ "description": "Checking if Math.asin(x) is NaN, where x is greater than 1",
+ "test": "// CHECK#1\nvar x = 1.000000000000001;\nif (!isNaN(Math.asin(x)))\n{\n\t$ERROR(\"#1: 'var x = 1.000000000000001; isNaN(Math.asin(x)) === false'\");\n}\n\n// CHECK#2\nx = 2;\nif (!isNaN(Math.asin(x)))\n{\n\t$ERROR(\"#2: 'x = 2; isNaN(Math.asin(x)) === false'\");\n}\n\n// CHECK#3\nx = +Infinity;\nif (!isNaN(Math.asin(x)))\n{\n\t$ERROR(\"#3: 'x = +Infinity; isNaN(Math.asin(x)) === false'\");\n}\n",
+ "id": "S15.8.2.3_A2"
+ },
+ {
+ "section": "15.8.2.3",
+ "description": "Checking if Math.asin(x) is NaN, where x is less than -1",
+ "test": "// CHECK#1\nvar x = -1.000000000000001;\nif (!isNaN(Math.asin(x)))\n{\n\t$ERROR(\"#1: 'var x = -1.000000000000001; isNaN(Math.asin(x)) === false'\");\n}\n\n// CHECK#2\nx = -2;\nif (!isNaN(Math.asin(x)))\n{\n\t$ERROR(\"#2: 'x = -2; isNaN(Math.asin(x)) === false'\");\n}\n\n// CHECK#3\nx = -Infinity;\nif (!isNaN(Math.asin(x)))\n{\n\t$ERROR(\"#3: 'x = -Infinity; isNaN(Math.asin(x)) === false'\");\n}\n",
+ "id": "S15.8.2.3_A3"
+ },
+ {
+ "section": "15.8.2.3",
+ "description": "Checking if Math.asin(+0) equals +0",
+ "test": "// CHECK#1\nvar x = +0;\nif (Math.asin(x) !== +0)\n{\n\t$ERROR(\"#1: 'var x = +0; Math.asin(x) !== +0'\");\n}\n",
+ "id": "S15.8.2.3_A4"
+ },
+ {
+ "section": "15.8.2.3",
+ "description": "Checking if Math.asin(-0) equals to -0",
+ "test": "// CHECK#1\nvar x = -0;\nif (Math.asin(x) !== -0)\n{\n\t$ERROR(\"#1: 'var x = -0; Math.asin(x) !== -0'\");\n}\n",
+ "id": "S15.8.2.3_A5"
+ },
+ {
+ "section": "15.8.2.3",
+ "description": ": Checking if Math.asin is approximately equals to its mathematical values on the set of 64 argument values; all the sample values is calculated with LibC;",
+ "test": "$INCLUDE(\"math_precision.js\");\n$INCLUDE(\"math_isequal.js\");\n\n// CHECK#1\nvnum = 64;\nvar x = new Array();\nx[0] = -1.00000000000000000000;\nx[1] = -0.96825396825396826000;\nx[2] = -0.93650793650793651000;\nx[3] = -0.90476190476190477000;\nx[4] = -0.87301587301587302000;\nx[5] = -0.84126984126984128000;\nx[6] = -0.80952380952380953000;\nx[7] = -0.77777777777777779000;\nx[8] = -0.74603174603174605000;\nx[9] = -0.71428571428571430000;\nx[10] = -0.68253968253968256000;\nx[11] = -0.65079365079365081000;\nx[12] = -0.61904761904761907000;\nx[13] = -0.58730158730158732000;\nx[14] = -0.55555555555555558000;\nx[15] = -0.52380952380952384000;\nx[16] = -0.49206349206349209000;\nx[17] = -0.46031746031746035000;\nx[18] = -0.42857142857142860000;\nx[19] = -0.39682539682539686000;\nx[20] = -0.36507936507936511000;\nx[21] = -0.33333333333333337000;\nx[22] = -0.30158730158730163000;\nx[23] = -0.26984126984126988000;\nx[24] = -0.23809523809523814000;\nx[25] = -0.20634920634920639000;\nx[26] = -0.17460317460317465000;\nx[27] = -0.14285714285714290000;\nx[28] = -0.11111111111111116000;\nx[29] = -0.07936507936507941600;\nx[30] = -0.04761904761904767200;\nx[31] = -0.01587301587301592800;\nx[32] = 0.01587301587301581700;\nx[33] = 0.04761904761904767200;\nx[34] = 0.07936507936507930500;\nx[35] = 0.11111111111111116000;\nx[36] = 0.14285714285714279000;\nx[37] = 0.17460317460317465000;\nx[38] = 0.20634920634920628000;\nx[39] = 0.23809523809523814000;\nx[40] = 0.26984126984126977000;\nx[41] = 0.30158730158730163000;\nx[42] = 0.33333333333333326000;\nx[43] = 0.36507936507936511000;\nx[44] = 0.39682539682539675000;\nx[45] = 0.42857142857142860000;\nx[46] = 0.46031746031746024000;\nx[47] = 0.49206349206349209000;\nx[48] = 0.52380952380952372000;\nx[49] = 0.55555555555555558000;\nx[50] = 0.58730158730158721000;\nx[51] = 0.61904761904761907000;\nx[52] = 0.65079365079365070000;\nx[53] = 0.68253968253968256000;\nx[54] = 0.71428571428571419000;\nx[55] = 0.74603174603174605000;\nx[56] = 0.77777777777777768000;\nx[57] = 0.80952380952380953000;\nx[58] = 0.84126984126984117000;\nx[59] = 0.87301587301587302000;\nx[60] = 0.90476190476190466000;\nx[61] = 0.93650793650793651000;\nx[62] = 0.96825396825396814000;\nx[63] = 1.00000000000000000000;\n\n\n\n\nvar y = new Array();\ny[0] = -1.57079632679489660000;\ny[1] = -1.31814860051033310000;\ny[2] = -1.21253510828227990000;\ny[3] = -1.13082037200397780000;\ny[4] = -1.06135247798300370000;\ny[5] = -0.99962782822935903000;\ny[6] = -0.94334055387170590000;\ny[7] = -0.89112250788665281000;\ny[8] = -0.84208287605149101000;\ny[9] = -0.79560295348453536000;\ny[10] = -0.75123199912663585000;\ny[11] = -0.70862927156238398000;\ny[12] = -0.66752944463583297000;\ny[13] = -0.62772081765791266000;\ny[14] = -0.58903097021627393000;\ny[15] = -0.55131696913188277000;\ny[16] = -0.51445847556118673000;\ny[17] = -0.47835276464925774000;\ny[18] = -0.44291104407363896000;\ny[19] = -0.40805567730127851000;\ny[20] = -0.37371805094291394000;\ny[21] = -0.33983690945412198000;\ny[22] = -0.30635703455691915000;\ny[23] = -0.27322818254063785000;\ny[24] = -0.24040421676925938000;\ny[25] = -0.20784238935334678000;\ny[26] = -0.17550273757572274000;\ny[27] = -0.14334756890536540000;\ny[28] = -0.11134101434096394000;\ny[29] = -0.07944863408513722100;\ny[30] = -0.04763706262440318300;\ny[31] = -0.01587368248995573600;\ny[32] = 0.01587368248995562500;\ny[33] = 0.04763706262440318300;\ny[34] = 0.07944863408513711000;\ny[35] = 0.11134101434096394000;\ny[36] = 0.14334756890536529000;\ny[37] = 0.17550273757572274000;\ny[38] = 0.20784238935334667000;\ny[39] = 0.24040421676925938000;\ny[40] = 0.27322818254063774000;\ny[41] = 0.30635703455691915000;\ny[42] = 0.33983690945412187000;\ny[43] = 0.37371805094291394000;\ny[44] = 0.40805567730127840000;\ny[45] = 0.44291104407363896000;\ny[46] = 0.47835276464925758000;\ny[47] = 0.51445847556118673000;\ny[48] = 0.55131696913188266000;\ny[49] = 0.58903097021627393000;\ny[50] = 0.62772081765791254000;\ny[51] = 0.66752944463583297000;\ny[52] = 0.70862927156238387000;\ny[53] = 0.75123199912663585000;\ny[54] = 0.79560295348453514000;\ny[55] = 0.84208287605149101000;\ny[56] = 0.89112250788665259000;\ny[57] = 0.94334055387170590000;\ny[58] = 0.99962782822935881000;\ny[59] = 1.06135247798300370000;\ny[60] = 1.13082037200397760000;\ny[61] = 1.21253510828227990000;\ny[62] = 1.31814860051033270000;\ny[63] = 1.57079632679489660000;\n\n\n\nvar val;\nfor (i = 0; i < vnum; i++)\n{\n\tval = Math.asin(x[i]);\n\tif (!isEqual(val, y[i]))\n\t{\n\t\t$ERROR(\"\\nx = \" + x[i] + \"\\nlibc.asin(x) = \" + y[i] + \"\\nMath.asin(x) = \" + Math.asin(x[i]) + \"\\nMath.abs(libc.asin(x) - Math.asin(x)) > \" + prec + \"\\n\\n\"); \n\t}\n}\n",
+ "id": "S15.8.2.3_A6"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.8.2.4_atan.json b/website/resources/scripts/testcases2/15.8.2.4_atan.json
new file mode 100644
index 000000000..a9a1d533a
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.8.2.4_atan.json
@@ -0,0 +1,44 @@
+{
+ "testCollection": {
+ "name": "15.8.2.4_atan",
+ "numTests": 6,
+ "tests": [
+ {
+ "section": "15.8.2.4",
+ "description": "Checking if Math.atan(NaN) is NaN",
+ "test": "// CHECK#1\nvar x = NaN;\nif (!isNaN(Math.atan(x)))\n{\n\t$ERROR(\"#1: 'var x=NaN; isNaN(Math.atan(x)) === false'\");\n}\n",
+ "id": "S15.8.2.4_A1"
+ },
+ {
+ "section": "15.8.2.4",
+ "description": "Checking if Math.atan(+0) equals to +0",
+ "test": "// CHECK#1\nvar x = +0;\nif (Math.atan(x) !== +0)\n{\n\t$ERROR(\"#1: 'var x = +0; Math.atan(x) !== +0'\");\n}\n",
+ "id": "S15.8.2.4_A2"
+ },
+ {
+ "section": "15.8.2.4",
+ "description": "Checking if Math.atan(-0) equals to -0",
+ "test": "// CHECK#1\nvar x = -0;\nif (Math.atan(x) !== -0)\n{\n\t$ERROR(\"#1: 'var x = -0; Math.atan(x) !== -0'\");\n}\n",
+ "id": "S15.8.2.4_A3"
+ },
+ {
+ "section": "15.8.2.4",
+ "description": "Checking if Math.atan(+Infinity) is an approximation to +PI/2",
+ "test": "$INCLUDE(\"math_precision.js\");\n$INCLUDE(\"math_isequal.js\"); \n \n// CHECK#1\n\nvar x = +Infinity;\nif (!isEqual(Math.atan(x),Math.PI/2))\n{\n\t$ERROR(\"#1: '!isEqual(Math.atan(+Infinity), Math.PI/2)'\");\n}\n",
+ "id": "S15.8.2.4_A4"
+ },
+ {
+ "section": "15.8.2.4",
+ "description": "Checking if Math.atan(-Infinity) is an approximation to -PI/2",
+ "test": "$INCLUDE(\"math_precision.js\");\n$INCLUDE(\"math_isequal.js\"); \n \n// CHECK#1\n\nvar x = -Infinity;\nif (!isEqual(Math.atan(x), -Math.PI/2))\n{\n\t$ERROR(\"#1: '!isEqual(Math.atan(-Infinity), -Math.PI/2)'\");\n}\n",
+ "id": "S15.8.2.4_A5"
+ },
+ {
+ "section": "15.8.2.4",
+ "description": ": Checking if Math.atan is approximately equals to its mathematical values on the set of 64 argument values; all the sample values is calculated with LibC;",
+ "test": "$INCLUDE(\"math_precision.js\");\n$INCLUDE(\"math_isequal.js\");\n\n// CHECK#1\nvnum = 64;\nvar x = new Array();\nx[0] = -16.00000000000000000000;\nx[1] = -15.49206349206349200000;\nx[2] = -14.98412698412698400000;\nx[3] = -14.47619047619047600000;\nx[4] = -13.96825396825396800000;\nx[5] = -13.46031746031746000000;\nx[6] = -12.95238095238095300000;\nx[7] = -12.44444444444444500000;\nx[8] = -11.93650793650793700000;\nx[9] = -11.42857142857142900000;\nx[10] = -10.92063492063492100000;\nx[11] = -10.41269841269841300000;\nx[12] = -9.90476190476190510000;\nx[13] = -9.39682539682539720000;\nx[14] = -8.88888888888888930000;\nx[15] = -8.38095238095238140000;\nx[16] = -7.87301587301587350000;\nx[17] = -7.36507936507936560000;\nx[18] = -6.85714285714285770000;\nx[19] = -6.34920634920634970000;\nx[20] = -5.84126984126984180000;\nx[21] = -5.33333333333333390000;\nx[22] = -4.82539682539682600000;\nx[23] = -4.31746031746031810000;\nx[24] = -3.80952380952381020000;\nx[25] = -3.30158730158730230000;\nx[26] = -2.79365079365079440000;\nx[27] = -2.28571428571428650000;\nx[28] = -1.77777777777777860000;\nx[29] = -1.26984126984127070000;\nx[30] = -0.76190476190476275000;\nx[31] = -0.25396825396825484000;\nx[32] = 0.25396825396825307000;\nx[33] = 0.76190476190476275000;\nx[34] = 1.26984126984126890000;\nx[35] = 1.77777777777777860000;\nx[36] = 2.28571428571428470000;\nx[37] = 2.79365079365079440000;\nx[38] = 3.30158730158730050000;\nx[39] = 3.80952380952381020000;\nx[40] = 4.31746031746031630000;\nx[41] = 4.82539682539682600000;\nx[42] = 5.33333333333333210000;\nx[43] = 5.84126984126984180000;\nx[44] = 6.34920634920634800000;\nx[45] = 6.85714285714285770000;\nx[46] = 7.36507936507936380000;\nx[47] = 7.87301587301587350000;\nx[48] = 8.38095238095237960000;\nx[49] = 8.88888888888888930000;\nx[50] = 9.39682539682539540000;\nx[51] = 9.90476190476190510000;\nx[52] = 10.41269841269841100000;\nx[53] = 10.92063492063492100000;\nx[54] = 11.42857142857142700000;\nx[55] = 11.93650793650793700000;\nx[56] = 12.44444444444444300000;\nx[57] = 12.95238095238095300000;\nx[58] = 13.46031746031745900000;\nx[59] = 13.96825396825396800000;\nx[60] = 14.47619047619047400000;\nx[61] = 14.98412698412698400000;\nx[62] = 15.49206349206349000000;\nx[63] = 16.00000000000000000000;\n\n\n\nvar y = new Array();\ny[0] = -1.50837751679893930000;\ny[1] = -1.50633657314382670000;\ny[2] = -1.50415785436419310000;\ny[3] = -1.50182694519358660000;\ny[4] = -1.49932735026103090000;\ny[5] = -1.49664010557682300000;\ny[6] = -1.49374329974393950000;\ny[7] = -1.49061147949358030000;\ny[8] = -1.48721490565349580000;\ny[9] = -1.48351861384543530000;\ny[10] = -1.47948121756761840000;\ny[11] = -1.47505336756015580000;\ny[12] = -1.47017574693777100000;\ny[13] = -1.46477643093971600000;\ny[14] = -1.45876736436890870000;\ny[15] = -1.45203959426707030000;\ny[16] = -1.44445671565255360000;\ny[17] = -1.43584570229039390000;\ny[18] = -1.42598382855595760000;\ny[19] = -1.41457960835077490000;\ny[20] = -1.40124433129607070000;\ny[21] = -1.38544837679920190000;\ny[22] = -1.36645204745321510000;\ny[23] = -1.34319210978762000000;\ny[24] = -1.31408799636151090000;\ny[25] = -1.27669520176831860000;\ny[26] = -1.22705270315911450000;\ny[27] = -1.15838588519750950000;\ny[28] = -1.05840686648415900000;\ny[29] = -0.90372394590298166000;\ny[30] = -0.65107672144448037000;\ny[31] = -0.24870998909352368000;\ny[32] = 0.24870998909352202000;\ny[33] = 0.65107672144448037000;\ny[34] = 0.90372394590298100000;\ny[35] = 1.05840686648415900000;\ny[36] = 1.15838588519750910000;\ny[37] = 1.22705270315911450000;\ny[38] = 1.27669520176831840000;\ny[39] = 1.31408799636151090000;\ny[40] = 1.34319210978761980000;\ny[41] = 1.36645204745321510000;\ny[42] = 1.38544837679920190000;\ny[43] = 1.40124433129607070000;\ny[44] = 1.41457960835077490000;\ny[45] = 1.42598382855595760000;\ny[46] = 1.43584570229039390000;\ny[47] = 1.44445671565255360000;\ny[48] = 1.45203959426707030000;\ny[49] = 1.45876736436890870000;\ny[50] = 1.46477643093971600000;\ny[51] = 1.47017574693777100000;\ny[52] = 1.47505336756015580000;\ny[53] = 1.47948121756761840000;\ny[54] = 1.48351861384543530000;\ny[55] = 1.48721490565349580000;\ny[56] = 1.49061147949358030000;\ny[57] = 1.49374329974393950000;\ny[58] = 1.49664010557682300000;\ny[59] = 1.49932735026103090000;\ny[60] = 1.50182694519358660000;\ny[61] = 1.50415785436419310000;\ny[62] = 1.50633657314382670000;\ny[63] = 1.50837751679893930000;\n\n\n\n\nvar val;\nfor (i = 0; i < vnum; i++)\n{\n\tval = Math.atan(x[i]);\n\tif (!isEqual(val, y[i]))\n\t{\n\t\t$ERROR(\"\\nx = \" + x[i] + \"\\nlibc.atan(x) = \" + y[i] + \"\\nMath.atan(x) = \" + Math.atan(x[i]) + \"\\nMath.abs(libc.atan(x) - Math.atan(x)) > \" + prec + \"\\n\\n\"); \n\t}\n}\n",
+ "id": "S15.8.2.4_A6"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.8.2.5_atan2.json b/website/resources/scripts/testcases2/15.8.2.5_atan2.json
new file mode 100644
index 000000000..ce4644af4
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.8.2.5_atan2.json
@@ -0,0 +1,152 @@
+{
+ "testCollection": {
+ "name": "15.8.2.5_atan2",
+ "numTests": 24,
+ "tests": [
+ {
+ "section": "15.8.2.5",
+ "description": "Checking if Math.atan2(NaN,y) and Math.atan2(x,NaN) is NaN for different x and y values",
+ "test": "// CHECK#1\n\nvals = new Array();\nvals[0] = -Infinity;\nvals[1] = -0.000000000000001;\nvals[2] = -0;\nvals[3] = +0\nvals[4] = 0.000000000000001;\nvals[5] = +Infinity;\nvals[6] = NaN;\nvalnum = 7;\n\nargs = new Array();\nfor (i = 0; i < 2; i++)\n{\n\targs[i] = NaN;\n\tfor (j = 0; j < valnum; j++)\n\t{\n\t\targs[1-i] = vals[j];\n\t\tif (!isNaN(Math.atan2(args[0], args[1])))\n\t\t{\n\t\t\t$ERROR(\"#1: isNaN(Math.atan2(\" + args[0] + \", \" + args[1] + \")) === false'\");\n\t\t}\n\t}\n}\n",
+ "id": "S15.8.2.5_A1"
+ },
+ {
+ "section": "15.8.2.5",
+ "description": "Checking if Math.atan2(-0,-0) is an approximation to -PI",
+ "test": "$INCLUDE(\"math_precision.js\");\n$INCLUDE(\"math_isequal.js\"); \n \n// CHECK#1\n//prec = 0.00000000000001;\ny = -0;\nx = -0;\nif (!isEqual(Math.atan2(y,x), -Math.PI))\n\t$ERROR(\"#1: !isEqual(Math.atan2(-0,-0), -Math.PI)\");\n",
+ "id": "S15.8.2.5_A10"
+ },
+ {
+ "section": "15.8.2.5",
+ "description": "Checking if Math.atan2(-0,x) is an approximation to -PI, where x<0",
+ "test": "$INCLUDE(\"math_precision.js\");\n$INCLUDE(\"math_isequal.js\"); \n \n// CHECK#1\ny = -0;\n//prec = 0.00000000000001;\nx = new Array();\nx[0] = -0.000000000000001;\nx[2] = -Infinity;\nx[1] = -1; \nxnum = 3;\n\nfor (i = 0; i < xnum; i++)\n{\n\tif (!isEqual(Math.atan2(y,x[i]), - Math.PI))\n\t\t$FAIL(\"#1: Math.abs(Math.atan2(\" + y + \", \" + x[i] + \") + Math.PI) >= \" + prec);\n}\n",
+ "id": "S15.8.2.5_A11"
+ },
+ {
+ "section": "15.8.2.5",
+ "description": "Checking if Math.atan2(y,+0) is an approximation to -PI/2, where y<0",
+ "test": "$INCLUDE(\"math_precision.js\");\n$INCLUDE(\"math_isequal.js\"); \n \n// CHECK#1\nx = +0;\n//prec = 0.00000000000001;\ny = new Array();\ny[0] = -0.000000000000001;\ny[2] = -Infinity;\ny[1] = -1; \nynum = 3;\n\nfor (i = 0; i < ynum; i++)\n{\n\tif (!isEqual(Math.atan2(y[i],x), -(Math.PI)/2))\n\t\t$FAIL(\"#1: Math.abs(Math.atan2(\" + y[i] + \", \" + x + \") + ((Math.PI)/2)) >= \" + prec);\n}\n",
+ "id": "S15.8.2.5_A12"
+ },
+ {
+ "section": "15.8.2.5",
+ "description": "Checking if Math.atan2(y,-0) is an approximation to -PI/2, where y<0",
+ "test": "$INCLUDE(\"math_precision.js\");\n$INCLUDE(\"math_isequal.js\"); \n \n// CHECK#1\nx = -0;\n//prec = 0.00000000000001;\ny = new Array();\ny[0] = -0.000000000000001;\ny[2] = -Infinity;\ny[1] = -1; \nynum = 3;\n\nfor (i = 0; i < ynum; i++)\n{\n\tif (!isEqual(Math.atan2(y[i],x), -(Math.PI)/2))\n\t\t$FAIL(\"#1: Math.abs(Math.atan2(\" + y[i] + \", -0) + ((Math.PI)/2)) >= \" + prec);\n}\n",
+ "id": "S15.8.2.5_A13"
+ },
+ {
+ "section": "15.8.2.5",
+ "description": "Checking if Math.atan2(y,x) equals to +0, where y>0 and y is finite and x is equal to +Infinity",
+ "test": "// CHECK#1\nx = +Infinity;\ny = new Array();\ny[0] = 0.000000000000001;\ny[1] = 1;\ny[2] = 1.7976931348623157E308; //largest finite number \nynum = 3;\n\nfor (i = 0; i < ynum; i++)\n{\n\tif (Math.atan2(y[i],x) !== +0)\n\t\t$FAIL(\"#1: Math.atan2(\" + y[i] + \", \" + x + \") !== +0\");\n}\n",
+ "id": "S15.8.2.5_A14"
+ },
+ {
+ "section": "15.8.2.5",
+ "description": "Checking if Math.atan2(y,x) is an approximation to +PI, where y>0 and y is finite and x is equal to -Infinity",
+ "test": "$INCLUDE(\"math_precision.js\");\n$INCLUDE(\"math_isequal.js\"); \n \n// CHECK#1\nx = -Infinity;\ny = new Array();\ny[0] = 0.000000000000001;\ny[1] = 1;\ny[2] = 1.7976931348623157E308; //largest finite number \nynum = 3;\n\nfor (i = 0; i < ynum; i++)\n{\n\tif (!isEqual(Math.atan2(y[i],x),Math.PI))\n\t\t$FAIL(\"#1: Math.abs(Math.atan2(\" + y[i] + \", \" + x + \") - Math.PI) >= \" + prec);\n}\n",
+ "id": "S15.8.2.5_A15"
+ },
+ {
+ "section": "15.8.2.5",
+ "description": "Checking if Math.atan2(y,x) is -0, where y<0 and y is finite and x is equal to +Infinity",
+ "test": "// CHECK#1\nx = +Infinity;\ny = new Array();\ny[0] = -0.000000000000001;\ny[1] = -1;\ny[2] = -1.7976931348623157E308; //largest by abs() finite number \nynum = 3;\n\nfor (i = 0; i < ynum; i++)\n{\n\tif (Math.atan2(y[i],x) !== -0)\n\t\t$FAIL(\"#1: Math.atan2(\" + y[i] + \", \" + x + \") !== -0\");\n}\n",
+ "id": "S15.8.2.5_A16"
+ },
+ {
+ "section": "15.8.2.5",
+ "description": "Checking if Math.atan2(y,x) is an approximation to -PI, where y<0 and y is finite and x is equal to -Infinity",
+ "test": "$INCLUDE(\"math_precision.js\");\n$INCLUDE(\"math_isequal.js\"); \n \n// CHECK#1\nx = -Infinity;\ny = new Array();\ny[0] = -0.000000000000001;\ny[1] = -1;\ny[2] = -1.7976931348623157E308; //largest (by module) finite number \nynum = 3;\n\nfor (i = 0; i < ynum; i++)\n{\n\tif (!isEqual(Math.atan2(y[i],x), -Math.PI))\n\t\t$FAIL(\"#1: Math.abs(Math.atan2(\" + y[i] + \", \" + x + \") + Math.PI) >= \" + prec);\n}\n",
+ "id": "S15.8.2.5_A17"
+ },
+ {
+ "section": "15.8.2.5",
+ "description": "Checking if Math.atan2(y,x) is an approximation to +PI/2, where y is +Infinity and x is finite",
+ "test": "$INCLUDE(\"math_precision.js\");\n$INCLUDE(\"math_isequal.js\"); \n \n// CHECK#1\ny = +Infinity;\nx = new Array();\nx[0] = 0.000000000000001;\nx[1] = 1;\nx[2] = 1.7976931348623157E308; //largest finite number\nx[3] = -0.000000000000001;\nx[4] = -1;\nx[5] = -1.7976931348623157E308; //largest (by module) finite number \n \nxnum = 6;\n\nfor (i = 0; i < xnum; i++)\n{\n\tif (!isEqual(Math.atan2(y,x[i]), (Math.PI)/2))\n\t\t$FAIL(\"#1: Math.abs(Math.atan2(\" + y + \", \" + x[i] + \") - (Math.PI/2)) >= \" + prec);\n}\n",
+ "id": "S15.8.2.5_A18"
+ },
+ {
+ "section": "15.8.2.5",
+ "description": "Checking if Math.atan2(y,x) is an approximation to -PI/2, where y is -Infinity and x is finite",
+ "test": "$INCLUDE(\"math_precision.js\");\n$INCLUDE(\"math_isequal.js\"); \n\n// CHECK#1\n//prec = 0.00000000000001;\ny = -Infinity;\nx = new Array();\nx[0] = 0.000000000000001;\nx[1] = 1;\nx[2] = 1.7976931348623157E308; //largest finite number\nx[3] = -0.000000000000001;\nx[4] = -1;\nx[5] = -1.7976931348623157E308; //largest (by module) finite number \n \nxnum = 6;\n\nfor (i = 0; i < xnum; i++)\n{\n\tif (!isEqual(Math.atan2(y,x[i]), -(Math.PI)/2))\n\t\t$FAIL(\"#1: Math.abs(Math.atan2(\" + y + \", \" + x[i] + \") + (Math.PI/2)) >= \" + prec);\n}\n",
+ "id": "S15.8.2.5_A19"
+ },
+ {
+ "section": "15.8.2.5",
+ "description": "Checking if Math.atan2(y,x) is an approximation to +PI/2, where y>0 and x is +0",
+ "test": "$INCLUDE(\"math_precision.js\");\n$INCLUDE(\"math_isequal.js\"); \n\n// CHECK#1\nx = +0;\n//prec = 0.00000000000001;\ny = new Array();\ny[0] = 0.000000000000001;\ny[2] = +Infinity;\ny[1] = 1; \nynum = 3;\n\nfor (i = 0; i < ynum; i++)\n{\n\tif (!isEqual(Math.atan2(y[i],x),(Math.PI)/2))\n\t\t$FAIL(\"#1: Math.abs(Math.atan2(\" + y[i] + \", \" + x + \") - ((Math.PI)/2)) >= \" + prec);\n}\n",
+ "id": "S15.8.2.5_A2"
+ },
+ {
+ "section": "15.8.2.5",
+ "description": "Checking if Math.atan2(y,x) is an approximation to +PI/4, where y is equal to +Infinity and x is equal to +Infinity",
+ "test": "$INCLUDE(\"math_precision.js\");\n$INCLUDE(\"math_isequal.js\"); \n\n// CHECK#1\n//prec = 0.00000000000001;\ny = +Infinity;\nx = +Infinity;\n\nif (!isEqual(Math.atan2(y,x),(Math.PI)/4))\n\t$ERROR(\"#1: Math.abs(Math.atan2(\" + y + \", \" + x + \") - (Math.PI/4)) >= \" + prec);\n",
+ "id": "S15.8.2.5_A20"
+ },
+ {
+ "section": "15.8.2.5",
+ "description": "Checking if Math.atan2(y,x) is an approximation to +3*PI/4, where y is equal to +Infinity and x is equal to -Infinity",
+ "test": "$INCLUDE(\"math_precision.js\");\n$INCLUDE(\"math_isequal.js\"); \n\n// CHECK#1\n//prec = 0.00000000000001;\ny = +Infinity;\nx = -Infinity;\n\nif (!isEqual(Math.atan2(y,x), (3*Math.PI)/4))\n\t$ERROR(\"#1: Math.abs(Math.atan2(\" + y + \", \" + x + \") - (3*Math.PI/4)) >= \" + prec);\n",
+ "id": "S15.8.2.5_A21"
+ },
+ {
+ "section": "15.8.2.5",
+ "description": "Checking if Math.atan2(y,x) is an approximation to -PI/4, where y is equal to -Infinity and x is equal to +Infinity",
+ "test": "$INCLUDE(\"math_precision.js\");\n$INCLUDE(\"math_isequal.js\"); \n\n// CHECK#1\n//prec = 0.00000000000001;\ny = -Infinity;\nx = +Infinity;\n\nif (!isEqual(Math.atan2(y,x),- (Math.PI)/4))\n\t$ERROR(\"#1: Math.abs(Math.atan2(\" + y + \", \" + x + \") + (Math.PI/4)) >= \" + prec);\n",
+ "id": "S15.8.2.5_A22"
+ },
+ {
+ "section": "15.8.2.5",
+ "description": "Checking if Math.atan2(y,x) is an approximation to -3*PI/4, where y is equal to -Infinity and x is equal to -Infinity",
+ "test": "$INCLUDE(\"math_precision.js\");\n$INCLUDE(\"math_isequal.js\"); \n\n// CHECK#1\n//prec = 0.00000000000001;\ny = -Infinity;\nx = -Infinity;\n\nif (!isEqual(Math.atan2(y,x), -(3*Math.PI)/4))\n\t$ERROR(\"#1: Math.abs(Math.atan2(\" + y + \", \" + x + \") + (3*Math.PI/4)) >= \" + prec);\n",
+ "id": "S15.8.2.5_A23"
+ },
+ {
+ "section": "15.8.2.5",
+ "description": ": Checking if Math.atan2(argument1, argument2) is approximately equals to its mathematical values on the set of 64 argument1 values and 64 argument2 values; all the sample values is calculated with LibC;",
+ "test": "$INCLUDE(\"math_precision.js\");\n$INCLUDE(\"math_isequal.js\");\n\n// CHECK#1\nvnum = 64;\nvar x1 = new Array();\nx1[0] = -16.00000000000000000000;\nx1[1] = -15.49206349206349200000;\nx1[2] = -14.98412698412698400000;\nx1[3] = -14.47619047619047600000;\nx1[4] = -13.96825396825396800000;\nx1[5] = -13.46031746031746000000;\nx1[6] = -12.95238095238095300000;\nx1[7] = -12.44444444444444500000;\nx1[8] = -11.93650793650793700000;\nx1[9] = -11.42857142857142900000;\nx1[10] = -10.92063492063492100000;\nx1[11] = -10.41269841269841300000;\nx1[12] = -9.90476190476190510000;\nx1[13] = -9.39682539682539720000;\nx1[14] = -8.88888888888888930000;\nx1[15] = -8.38095238095238140000;\nx1[16] = -7.87301587301587350000;\nx1[17] = -7.36507936507936560000;\nx1[18] = -6.85714285714285770000;\nx1[19] = -6.34920634920634970000;\nx1[20] = -5.84126984126984180000;\nx1[21] = -5.33333333333333390000;\nx1[22] = -4.82539682539682600000;\nx1[23] = -4.31746031746031810000;\nx1[24] = -3.80952380952381020000;\nx1[25] = -3.30158730158730230000;\nx1[26] = -2.79365079365079440000;\nx1[27] = -2.28571428571428650000;\nx1[28] = -1.77777777777777860000;\nx1[29] = -1.26984126984127070000;\nx1[30] = -0.76190476190476275000;\nx1[31] = -0.25396825396825484000;\nx1[32] = 0.25396825396825307000;\nx1[33] = 0.76190476190476275000;\nx1[34] = 1.26984126984126890000;\nx1[35] = 1.77777777777777860000;\nx1[36] = 2.28571428571428470000;\nx1[37] = 2.79365079365079440000;\nx1[38] = 3.30158730158730050000;\nx1[39] = 3.80952380952381020000;\nx1[40] = 4.31746031746031630000;\nx1[41] = 4.82539682539682600000;\nx1[42] = 5.33333333333333210000;\nx1[43] = 5.84126984126984180000;\nx1[44] = 6.34920634920634800000;\nx1[45] = 6.85714285714285770000;\nx1[46] = 7.36507936507936380000;\nx1[47] = 7.87301587301587350000;\nx1[48] = 8.38095238095237960000;\nx1[49] = 8.88888888888888930000;\nx1[50] = 9.39682539682539540000;\nx1[51] = 9.90476190476190510000;\nx1[52] = 10.41269841269841100000;\nx1[53] = 10.92063492063492100000;\nx1[54] = 11.42857142857142700000;\nx1[55] = 11.93650793650793700000;\nx1[56] = 12.44444444444444300000;\nx1[57] = 12.95238095238095300000;\nx1[58] = 13.46031746031745900000;\nx1[59] = 13.96825396825396800000;\nx1[60] = 14.47619047619047400000;\nx1[61] = 14.98412698412698400000;\nx1[62] = 15.49206349206349000000;\nx1[63] = 16.00000000000000000000;\n\n\nvar x2 = new Array();\nx2[0] = -8.00000000000000000000;\nx2[1] = -7.74603174603174600000;\nx2[2] = -7.49206349206349210000;\nx2[3] = -7.23809523809523810000;\nx2[4] = -6.98412698412698420000;\nx2[5] = -6.73015873015873020000;\nx2[6] = -6.47619047619047630000;\nx2[7] = -6.22222222222222230000;\nx2[8] = -5.96825396825396840000;\nx2[9] = -5.71428571428571440000;\nx2[10] = -5.46031746031746050000;\nx2[11] = -5.20634920634920650000;\nx2[12] = -4.95238095238095260000;\nx2[13] = -4.69841269841269860000;\nx2[14] = -4.44444444444444460000;\nx2[15] = -4.19047619047619070000;\nx2[16] = -3.93650793650793670000;\nx2[17] = -3.68253968253968280000;\nx2[18] = -3.42857142857142880000;\nx2[19] = -3.17460317460317490000;\nx2[20] = -2.92063492063492090000;\nx2[21] = -2.66666666666666700000;\nx2[22] = -2.41269841269841300000;\nx2[23] = -2.15873015873015910000;\nx2[24] = -1.90476190476190510000;\nx2[25] = -1.65079365079365110000;\nx2[26] = -1.39682539682539720000;\nx2[27] = -1.14285714285714320000;\nx2[28] = -0.88888888888888928000;\nx2[29] = -0.63492063492063533000;\nx2[30] = -0.38095238095238138000;\nx2[31] = -0.12698412698412742000;\nx2[32] = 0.12698412698412653000;\nx2[33] = 0.38095238095238138000;\nx2[34] = 0.63492063492063444000;\nx2[35] = 0.88888888888888928000;\nx2[36] = 1.14285714285714230000;\nx2[37] = 1.39682539682539720000;\nx2[38] = 1.65079365079365030000;\nx2[39] = 1.90476190476190510000;\nx2[40] = 2.15873015873015820000;\nx2[41] = 2.41269841269841300000;\nx2[42] = 2.66666666666666610000;\nx2[43] = 2.92063492063492090000;\nx2[44] = 3.17460317460317400000;\nx2[45] = 3.42857142857142880000;\nx2[46] = 3.68253968253968190000;\nx2[47] = 3.93650793650793670000;\nx2[48] = 4.19047619047618980000;\nx2[49] = 4.44444444444444460000;\nx2[50] = 4.69841269841269770000;\nx2[51] = 4.95238095238095260000;\nx2[52] = 5.20634920634920560000;\nx2[53] = 5.46031746031746050000;\nx2[54] = 5.71428571428571350000;\nx2[55] = 5.96825396825396840000;\nx2[56] = 6.22222222222222140000;\nx2[57] = 6.47619047619047630000;\nx2[58] = 6.73015873015872930000;\nx2[59] = 6.98412698412698420000;\nx2[60] = 7.23809523809523720000;\nx2[61] = 7.49206349206349210000;\nx2[62] = 7.74603174603174520000;\nx2[63] = 8.00000000000000000000;\n\n\nvar y = new Array();\ny[0] = -2.03444393579570270000;\ny[1] = -2.03444393579570270000;\ny[2] = -2.03444393579570270000;\ny[3] = -2.03444393579570270000;\ny[4] = -2.03444393579570270000;\ny[5] = -2.03444393579570270000;\ny[6] = -2.03444393579570270000;\ny[7] = -2.03444393579570270000;\ny[8] = -2.03444393579570270000;\ny[9] = -2.03444393579570270000;\ny[10] = -2.03444393579570270000;\ny[11] = -2.03444393579570270000;\ny[12] = -2.03444393579570270000;\ny[13] = -2.03444393579570270000;\ny[14] = -2.03444393579570270000;\ny[15] = -2.03444393579570270000;\ny[16] = -2.03444393579570270000;\ny[17] = -2.03444393579570270000;\ny[18] = -2.03444393579570270000;\ny[19] = -2.03444393579570270000;\ny[20] = -2.03444393579570270000;\ny[21] = -2.03444393579570270000;\ny[22] = -2.03444393579570270000;\ny[23] = -2.03444393579570270000;\ny[24] = -2.03444393579570270000;\ny[25] = -2.03444393579570270000;\ny[26] = -2.03444393579570270000;\ny[27] = -2.03444393579570270000;\ny[28] = -2.03444393579570270000;\ny[29] = -2.03444393579570270000;\ny[30] = -2.03444393579570270000;\ny[31] = -2.03444393579570270000;\ny[32] = 1.10714871779409040000;\ny[33] = 1.10714871779409040000;\ny[34] = 1.10714871779409040000;\ny[35] = 1.10714871779409040000;\ny[36] = 1.10714871779409040000;\ny[37] = 1.10714871779409040000;\ny[38] = 1.10714871779409040000;\ny[39] = 1.10714871779409040000;\ny[40] = 1.10714871779409040000;\ny[41] = 1.10714871779409040000;\ny[42] = 1.10714871779409040000;\ny[43] = 1.10714871779409040000;\ny[44] = 1.10714871779409040000;\ny[45] = 1.10714871779409040000;\ny[46] = 1.10714871779409040000;\ny[47] = 1.10714871779409040000;\ny[48] = 1.10714871779409040000;\ny[49] = 1.10714871779409040000;\ny[50] = 1.10714871779409040000;\ny[51] = 1.10714871779409040000;\ny[52] = 1.10714871779409040000;\ny[53] = 1.10714871779409040000;\ny[54] = 1.10714871779409040000;\ny[55] = 1.10714871779409040000;\ny[56] = 1.10714871779409040000;\ny[57] = 1.10714871779409040000;\ny[58] = 1.10714871779409040000;\ny[59] = 1.10714871779409040000;\ny[60] = 1.10714871779409040000;\ny[61] = 1.10714871779409040000;\ny[62] = 1.10714871779409040000;\ny[63] = 1.10714871779409040000;\n\n\n\nvar val;\nfor (i = 0; i < vnum; i++)\n{\n\tval = Math.atan2(x1[i], x2[i]);\n\tif (!isEqual(val, y[i]))\n\t{\n\t\t$ERROR(\"\\nx1 = \" + x1[i] + \"\\nx2 = \" + x2[i] + \"\\nlibc.atan2(x1,x2) = \" + y[i] + \"\\nMath.atan2(x1,x2) = \" + Math.atan2(x1[i],x2[i]) + \"\\nMath.abs(libc.atan2(x1,x2) - Math.atan2(x1,x2)) > \" + prec + \"\\n\\n\"); \n\t}\n}\n",
+ "id": "S15.8.2.5_A24"
+ },
+ {
+ "section": "15.8.2.5",
+ "description": "Checking if Math.atan2(y,x) is an approximation to +PI/2, where y>0 and x is -0",
+ "test": "$INCLUDE(\"math_precision.js\");\n$INCLUDE(\"math_isequal.js\"); \n\n// CHECK#1\nx = -0;\n//prec = 0.00000000000001;\ny = new Array();\ny[0] = 0.000000000000001;\ny[2] = +Infinity;\ny[1] = 1; \nynum = 3;\n\nfor (i = 0; i < ynum; i++)\n{\n\tif (!isEqual(Math.atan2(y[i],x), (Math.PI)/2))\n\t\t$FAIL(\"#1: Math.abs(Math.atan2(\" + y[i] + \", \" + x + \") - ((Math.PI)/2)) >= \" + prec);\n}\n",
+ "id": "S15.8.2.5_A3"
+ },
+ {
+ "section": "15.8.2.5",
+ "description": "Checking if Math.atan2(y,x) equals to +0, where y is +0 and x>0",
+ "test": "// CHECK#1\ny = +0;\nx = new Array();\nx[0] = 0.000000000000001;\nx[2] = +Infinity;\nx[1] = 1; \nxnum = 3;\n\nfor (i = 0; i < xnum; i++)\n{\n\tif (Math.atan2(y,x[i]) !== +0)\n\t\t$FAIL(\"#1: Math.atan2(\" + y + \", \" + x[i] + \") !== +0\");\n}\n",
+ "id": "S15.8.2.5_A4"
+ },
+ {
+ "section": "15.8.2.5",
+ "description": "Checking if Math.atan2(y,x) is +0, where y is +0 and x is +0",
+ "test": "// CHECK#1\ny = +0;\nx = +0;\nif (Math.atan2(y,x) !== +0)\n\t$ERROR(\"#1: Math.atan2(\" + y + \", \" + x + \") !== +0\");\n",
+ "id": "S15.8.2.5_A5"
+ },
+ {
+ "section": "15.8.2.5",
+ "description": "Checking if Math.atan2(y,x) is an approximation to +PI, where y is +0 and x is -0",
+ "test": "$INCLUDE(\"math_precision.js\");\n$INCLUDE(\"math_isequal.js\"); \n\n// CHECK#1\n//prec = 0.00000000000001;\ny = +0;\nx = -0;\nif (!isEqual(Math.atan2(y,x), Math.PI))\n\t$ERROR(\"#1: Math.abs(Math.atan2(\" + y + \", -0) - Math.PI) >= \" + prec);\n",
+ "id": "S15.8.2.5_A6"
+ },
+ {
+ "section": "15.8.2.5",
+ "description": "Checking if Math.atan2(y,x) is an approximation to +PI, where y is equal to +0 and x<0",
+ "test": "$INCLUDE(\"math_precision.js\");\n$INCLUDE(\"math_isequal.js\"); \n\n// CHECK#1\ny = +0;\n//prec = 0.00000000000001;\nx = new Array();\nx[0] = -0.000000000000001;\nx[2] = -Infinity;\nx[1] = -1; \nxnum = 3;\n\nfor (i = 0; i < xnum; i++)\n{\n\tif (!isEqual(Math.atan2(y,x[i]), Math.PI))\n\t\t$FAIL(\"#1: Math.abs(Math.atan2(\" + y + \", \" + x[i] + \") - Math.PI) >= \" + prec);\n}\n",
+ "id": "S15.8.2.5_A7"
+ },
+ {
+ "section": "15.8.2.5",
+ "description": "Checking if Math.atan2(y,x) is -0, where y is equal to -0 and x>0",
+ "test": "// CHECK#1\ny = -0;\nx = new Array();\nx[0] = 0.000000000000001;\nx[2] = +Infinity;\nx[1] = 1; \nxnum = 3;\n\nfor (i = 0; i < xnum; i++)\n{\n\tif (Math.atan2(y,x[i]) !== -0)\n\t\t$FAIL(\"#1: Math.atan2(\" + y + \", \" + x[i] + \") !== -0\");\n}\n",
+ "id": "S15.8.2.5_A8"
+ },
+ {
+ "section": "15.8.2.5",
+ "description": "Checking if Math.atan2(y,x) is -0, where y is -0 and x is +0",
+ "test": "// CHECK#1\ny = -0;\nx = +0;\nif (Math.atan2(y,x) !== -0)\n\t$ERROR(\"#1: Math.atan2(\" + y + \", \" + x + \") !== -0\");\n",
+ "id": "S15.8.2.5_A9"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.8.2.6_ceil.json b/website/resources/scripts/testcases2/15.8.2.6_ceil.json
new file mode 100644
index 000000000..886eac42b
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.8.2.6_ceil.json
@@ -0,0 +1,50 @@
+{
+ "testCollection": {
+ "name": "15.8.2.6_ceil",
+ "numTests": 7,
+ "tests": [
+ {
+ "section": "15.8.2.6",
+ "description": "Checking if Math.ceil(NaN) is NaN",
+ "test": "// CHECK#1\nvar x = NaN;\nif (!isNaN(Math.ceil(x)))\n{\n\t$ERROR(\"#1: 'var x=NaN; isNaN(Math.ceil(x)) === false'\");\n}\n",
+ "id": "S15.8.2.6_A1"
+ },
+ {
+ "section": "15.8.2.6",
+ "description": "Checking if Math.ceil(x) is +0, where x is +0",
+ "test": "// CHECK#1\nvar x = +0;\nif (Math.ceil(x) !== +0)\n{\n\t$ERROR(\"#1: 'var x = +0; Math.ceil(x) !== +0'\");\n}\n",
+ "id": "S15.8.2.6_A2"
+ },
+ {
+ "section": "15.8.2.6",
+ "description": "Checking if Math.ceil(x) is -0, where x is -0",
+ "test": "// CHECK#1\nvar x = -0;\nif (Math.ceil(x) !== -0)\n{\n\t$ERROR(\"#1: 'var x = -0; Math.ceil(x) !== -0'\");\n}\n",
+ "id": "S15.8.2.6_A3"
+ },
+ {
+ "section": "15.8.2.6",
+ "description": "Checking if Math.ceil(x) is +Infinity, where x is +Infinity",
+ "test": "// CHECK#1\nvar x = +Infinity;\nif (Math.ceil(x) !== +Infinity)\n{\n\t$ERROR(\"#1: 'var x = +Infinity; Math.ceil(x) !== +Infinity'\");\n}\n",
+ "id": "S15.8.2.6_A4"
+ },
+ {
+ "section": "15.8.2.6",
+ "description": "Checking if Math.ceil(x) is -Infinity, where x is -Infinity",
+ "test": "// CHECK#1\nvar x = -Infinity;\nif (Math.ceil(x) !== -Infinity)\n{\n\t$ERROR(\"#1: 'var x = -Infinity; Math.ceil(x) !== -Infinity'\");\n}\n",
+ "id": "S15.8.2.6_A5"
+ },
+ {
+ "section": "15.8.2.6",
+ "description": "Checking if Math.ceil(x) is -0, where x is less than 0 but greater than -1",
+ "test": "// CHECK#1\nvar x = -0.000000000000001;\nif (Math.ceil(x) !== -0)\n{\n\t$ERROR(\"#1: 'var x = -0.000000000000001; Math.ceil(x) !== -0'\");\n}\n\n// CHECK#2\nvar x = -0.999999999999999;\nif (Math.ceil(x) !== -0)\n{\n\t$ERROR(\"#2: 'var x = -0.999999999999999; Math.ceil(x) !== -0'\");\n}\n\n// CHECK#3\nvar x = -0.5;\nif (Math.ceil(x) !== -0)\n{\n\t$ERROR(\"#3: 'var x = -0.5; Math.ceil(x) !== -0'\");\n}\n",
+ "id": "S15.8.2.6_A6"
+ },
+ {
+ "section": "15.8.2.6",
+ "description": "Checking if Math.ceil(x) equals to -Math.floor(-x) on 2000 floating point argument values",
+ "test": "// CHECK#1\nfor (i=-1000; i<1000; i++)\n{\n\tx = i/10.0;\n\tif (Math.ceil(x) !== -Math.floor(-x))\n\t{\n\t\t$ERROR(\"#1: 'x = \" + x + \"; Math.ceil(x) !== -Math.floor(-x)'\");\n\t}\n}\n",
+ "id": "S15.8.2.6_A7"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.8.2.7_cos.json b/website/resources/scripts/testcases2/15.8.2.7_cos.json
new file mode 100644
index 000000000..743925f71
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.8.2.7_cos.json
@@ -0,0 +1,50 @@
+{
+ "testCollection": {
+ "name": "15.8.2.7_cos",
+ "numTests": 7,
+ "tests": [
+ {
+ "section": "15.8.2.7",
+ "description": "Checking if Math.cos(NaN) is NaN",
+ "test": "// CHECK#1\nvar x = NaN;\nif (!isNaN(Math.cos(x)))\n{\n\t$ERROR(\"#1: 'var x=NaN; isNaN(Math.cos(x)) === false'\");\n}\n",
+ "id": "S15.8.2.7_A1"
+ },
+ {
+ "section": "15.8.2.7",
+ "description": "Checking if Math.cos(+0) is 1",
+ "test": "// CHECK#1\nvar x = +0;\nif (Math.cos(x) !== 1)\n{\n\t$ERROR(\"#1: 'var x = +0; Math.cos(x) !== 1'\");\n}\n",
+ "id": "S15.8.2.7_A2"
+ },
+ {
+ "section": "15.8.2.7",
+ "description": "Checking if Math.cos(-0) is 1",
+ "test": "// CHECK#1\nvar x = -0;\nif (Math.cos(x) !== 1)\n{\n\t$ERROR(\"#1: 'var x = -0; Math.cos(x) !== 1'\");\n}\n",
+ "id": "S15.8.2.7_A3"
+ },
+ {
+ "section": "15.8.2.7",
+ "description": "Checking if Math.cos(+Infinity) is NaN",
+ "test": "// CHECK#1\nvar x = +Infinity;\nif (!isNaN(Math.cos(x)))\n{\n\t$ERROR(\"#1: 'var x = +Infinity; isNaN(Math.cos(x)) === false'\");\n}\n",
+ "id": "S15.8.2.7_A4"
+ },
+ {
+ "section": "15.8.2.7",
+ "description": "Checking if Math.cos(-Infinity) is NaN",
+ "test": "// CHECK#1\nvar x = -Infinity;\nif (!isNaN(Math.cos(x)))\n{\n\t$ERROR(\"#1: 'var x = -Infinity; isNaN(Math.cos(x)) === false'\");\n}\n",
+ "id": "S15.8.2.7_A5"
+ },
+ {
+ "section": "15.8.2.7",
+ "description": "Checking if Math.cos(x) equals to Math.cos(x+n*2*Math.PI) with precision 0.000000000003, where n is an integer from 1 to 100 and x is one of 10 float point values from -Math.PI to +Math.PI",
+ "test": "// CHECK#1\n prec = 0.000000000003;\n//prec = 0.000000000000001;\nperiod = 2*Math.PI;\npernum = 100;\n\na = -pernum * period;\nb = pernum * period;\nsnum = 9; \nstep = period/snum + 0.0;\nx = new Array();\nfor (i = 0; i < snum; i++)\n{\n\tx[i] = a + i*step;\n}\nx[9] = a + period;\n\nvar curval;\nvar curx;\nvar j;\nfor (i = 0; i < snum; i++)\n{\n\tcurval = Math.cos(x[i]);\n\tcurx = x[i] + period;\n\tj = 0;\n\twhile (curx <= b)\n\t{\n\t\tcurx += period;\n\t\tj++;\n\t\tif (Math.abs(Math.cos(curx) - curval) >= prec)\n\t\t{\n\t\t\t$FAIL(\"#1: cos is found out to not be periodic:\\n Math.abs(Math.cos(\" + x[i] + \") - Math.cos(\" + x[i] + \" + 2*Math.PI*\" + j + \")) >= \" + prec + \"\\n Math.cos(\" + x[i] + \") === \" + curval + \"\\n Math.cos(\" + curx + \") === \" + Math.cos(curx));\n\t\t}\n\t}\n}\n",
+ "id": "S15.8.2.7_A6"
+ },
+ {
+ "section": "15.8.2.7",
+ "description": ": Checking if Math.cos is approximately equals to its mathematical values on the set of 64 argument values; all the sample values is calculated with LibC;",
+ "test": "$INCLUDE(\"math_precision.js\");\n$INCLUDE(\"math_isequal.js\");\n\n// CHECK#1\nvnum = 64;\nvar x = new Array();\nx[0] = -3.14159265358979310000;\nx[1] = -3.04185955347583150000;\nx[2] = -2.94212645336186980000;\nx[3] = -2.84239335324790820000;\nx[4] = -2.74266025313394660000;\nx[5] = -2.64292715301998450000;\nx[6] = -2.54319405290602290000;\nx[7] = -2.44346095279206120000;\nx[8] = -2.34372785267809960000;\nx[9] = -2.24399475256413790000;\nx[10] = -2.14426165245017630000;\nx[11] = -2.04452855233621470000;\nx[12] = -1.94479545222225280000;\nx[13] = -1.84506235210829120000;\nx[14] = -1.74532925199432950000;\nx[15] = -1.64559615188036790000;\nx[16] = -1.54586305176640600000;\nx[17] = -1.44612995165244440000;\nx[18] = -1.34639685153848280000;\nx[19] = -1.24666375142452110000;\nx[20] = -1.14693065131055950000;\nx[21] = -1.04719755119659740000;\nx[22] = -0.94746445108263622000;\nx[23] = -0.84773135096867458000;\nx[24] = -0.74799825085471250000;\nx[25] = -0.64826515074075086000;\nx[26] = -0.54853205062678922000;\nx[27] = -0.44879895051282759000;\nx[28] = -0.34906585039886595000;\nx[29] = -0.24933275028490431000;\nx[30] = -0.14959965017094268000;\nx[31] = -0.04986655005698104000;\nx[32] = 0.04986655005698104000;\nx[33] = 0.14959965017094268000;\nx[34] = 0.24933275028490431000;\nx[35] = 0.34906585039886595000;\nx[36] = 0.44879895051282759000;\nx[37] = 0.54853205062678922000;\nx[38] = 0.64826515074075086000;\nx[39] = 0.74799825085471250000;\nx[40] = 0.84773135096867414000;\nx[41] = 0.94746445108263533000;\nx[42] = 1.04719755119659830000;\nx[43] = 1.14693065131055950000;\nx[44] = 1.24666375142452070000;\nx[45] = 1.34639685153848280000;\nx[46] = 1.44612995165244400000;\nx[47] = 1.54586305176640600000;\nx[48] = 1.64559615188036810000;\nx[49] = 1.74532925199432930000;\nx[50] = 1.84506235210829140000;\nx[51] = 1.94479545222225260000;\nx[52] = 2.04452855233621470000;\nx[53] = 2.14426165245017670000;\nx[54] = 2.24399475256413790000;\nx[55] = 2.34372785267810000000;\nx[56] = 2.44346095279206120000;\nx[57] = 2.54319405290602240000;\nx[58] = 2.64292715301998450000;\nx[59] = 2.74266025313394660000;\nx[60] = 2.84239335324790780000;\nx[61] = 2.94212645336186980000;\nx[62] = 3.04185955347583100000;\nx[63] = 3.14159265358979310000;\n\n\nvar y = new Array();\ny[0] = -1.00000000000000000000;\ny[1] = -0.99503077536540141000;\ny[2] = -0.98017248784854383000;\ny[3] = -0.95557280578614079000;\ny[4] = -0.92147621187040774000;\ny[5] = -0.87822157337022844000;\ny[6] = -0.82623877431599468000;\ny[7] = -0.76604444311897790000;\ny[8] = -0.69823681808607274000;\ny[9] = -0.62348980185873348000;\ny[10] = -0.54254626386575933000;\ny[11] = -0.45621065735316296000;\ny[12] = -0.36534102436639487000;\ny[13] = -0.27084046814300500000;\ny[14] = -0.17364817766693030000;\ny[15] = -0.07473009358642426800;\ny[16] = 0.02493069173807303500;\ny[17] = 0.12434370464748527000;\ny[18] = 0.22252093395631445000;\ny[19] = 0.31848665025168443000;\ny[20] = 0.41128710313061151000;\ny[21] = 0.50000000000000033000;\ny[22] = 0.58374367223478973000;\ny[23] = 0.66168583759685928000;\ny[24] = 0.73305187182982645000;\ny[25] = 0.79713250722292250000;\ny[26] = 0.85329088163215572000;\ny[27] = 0.90096886790241915000;\ny[28] = 0.93969262078590832000;\ny[29] = 0.96907728622907796000;\ny[30] = 0.98883082622512852000;\ny[31] = 0.99875692121892234000;\ny[32] = 0.99875692121892234000;\ny[33] = 0.98883082622512852000;\ny[34] = 0.96907728622907796000;\ny[35] = 0.93969262078590832000;\ny[36] = 0.90096886790241915000;\ny[37] = 0.85329088163215572000;\ny[38] = 0.79713250722292250000;\ny[39] = 0.73305187182982645000;\ny[40] = 0.66168583759685962000;\ny[41] = 0.58374367223479051000;\ny[42] = 0.49999999999999950000;\ny[43] = 0.41128710313061151000;\ny[44] = 0.31848665025168482000;\ny[45] = 0.22252093395631445000;\ny[46] = 0.12434370464748572000;\ny[47] = 0.02493069173807303500;\ny[48] = -0.07473009358642449000;\ny[49] = -0.17364817766693008000;\ny[50] = -0.27084046814300522000;\ny[51] = -0.36534102436639465000;\ny[52] = -0.45621065735316296000;\ny[53] = -0.54254626386575977000;\ny[54] = -0.62348980185873348000;\ny[55] = -0.69823681808607307000;\ny[56] = -0.76604444311897790000;\ny[57] = -0.82623877431599446000;\ny[58] = -0.87822157337022844000;\ny[59] = -0.92147621187040774000;\ny[60] = -0.95557280578614057000;\ny[61] = -0.98017248784854383000;\ny[62] = -0.99503077536540141000;\ny[63] = -1.00000000000000000000;\n\n\nvar val;\nfor (i = 0; i < vnum; i++)\n{\n\tval = Math.cos(x[i]);\n\tif (!isEqual(val, y[i]))\n\t{\n\t\t$ERROR(\"\\nx = \" + x[i] + \"\\nlibc.cos(x) = \" + y[i] + \"\\nMath.cos(x) = \" + Math.cos(x[i]) + \"\\nMath.abs(libc.cos(x) - Math.cos(x)) > \" + prec + \"\\n\\n\"); \n\t}\n}\n",
+ "id": "S15.8.2.7_A7"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.8.2.8_exp.json b/website/resources/scripts/testcases2/15.8.2.8_exp.json
new file mode 100644
index 000000000..47cf62774
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.8.2.8_exp.json
@@ -0,0 +1,44 @@
+{
+ "testCollection": {
+ "name": "15.8.2.8_exp",
+ "numTests": 6,
+ "tests": [
+ {
+ "section": "15.8.2.8",
+ "description": "Checking if Math.exp(NaN) is NaN",
+ "test": "// CHECK#1\nvar x = NaN;\nif (!isNaN(Math.exp(x)))\n{\n\t$ERROR(\"#1: 'var x=NaN; isNaN(Math.exp(x)) === false'\");\n}\n",
+ "id": "S15.8.2.8_A1"
+ },
+ {
+ "section": "15.8.2.8",
+ "description": "Checking if Math.exp(+0) is 1",
+ "test": "// CHECK#1\nvar x = +0;\nif (Math.exp(x) !== 1)\n{\n\t$ERROR(\"#1: 'var x = +0; Math.exp(x) !== 1'\");\n}\n",
+ "id": "S15.8.2.8_A2"
+ },
+ {
+ "section": "15.8.2.8",
+ "description": "Checking if Math.exp(-0) is 1",
+ "test": "// CHECK#1\nvar x = -0;\nif (Math.exp(x) !== 1)\n{\n\t$ERROR(\"#1: 'var x = -0; Math.exp(x) !== 1'\");\n}\n",
+ "id": "S15.8.2.8_A3"
+ },
+ {
+ "section": "15.8.2.8",
+ "description": "Checking if Math.exp(+Infinity) is +Ifinity",
+ "test": "// CHECK#1\nvar x = +Infinity;\nif (Math.exp(x) !== +Infinity)\n{\n\t$ERROR(\"#1: 'var x = +Infinity; Math.exp(x) !== +Infinity'\");\n}\n",
+ "id": "S15.8.2.8_A4"
+ },
+ {
+ "section": "15.8.2.8",
+ "description": "Checking if Math.exp(-Infinity) is +0",
+ "test": "// CHECK#1\nvar x = -Infinity;\nif (Math.exp(x) !== +0)\n{\n\t$ERROR(\"#1: 'var x = -Infinity; Math.exp(x) !== +0'\");\n}\n",
+ "id": "S15.8.2.8_A5"
+ },
+ {
+ "section": "15.8.2.8",
+ "description": ": Checking if Math.exp is approximately equals to its mathematical values on the set of 64 argument values; all the sample values is calculated with LibC;",
+ "test": "$INCLUDE(\"math_precision.js\");\n$INCLUDE(\"math_isequal.js\");\n\n// CHECK#1\nvnum = 64;\nvar x = new Array();\nx[0] = -16.00000000000000000000;\nx[1] = -15.49206349206349200000;\nx[2] = -14.98412698412698400000;\nx[3] = -14.47619047619047600000;\nx[4] = -13.96825396825396800000;\nx[5] = -13.46031746031746000000;\nx[6] = -12.95238095238095300000;\nx[7] = -12.44444444444444500000;\nx[8] = -11.93650793650793700000;\nx[9] = -11.42857142857142900000;\nx[10] = -10.92063492063492100000;\nx[11] = -10.41269841269841300000;\nx[12] = -9.90476190476190510000;\nx[13] = -9.39682539682539720000;\nx[14] = -8.88888888888888930000;\nx[15] = -8.38095238095238140000;\nx[16] = -7.87301587301587350000;\nx[17] = -7.36507936507936560000;\nx[18] = -6.85714285714285770000;\nx[19] = -6.34920634920634970000;\nx[20] = -5.84126984126984180000;\nx[21] = -5.33333333333333390000;\nx[22] = -4.82539682539682600000;\nx[23] = -4.31746031746031810000;\nx[24] = -3.80952380952381020000;\nx[25] = -3.30158730158730230000;\nx[26] = -2.79365079365079440000;\nx[27] = -2.28571428571428650000;\nx[28] = -1.77777777777777860000;\nx[29] = -1.26984126984127070000;\nx[30] = -0.76190476190476275000;\nx[31] = -0.25396825396825484000;\nx[32] = 0.25396825396825307000;\nx[33] = 0.76190476190476275000;\nx[34] = 1.26984126984126890000;\nx[35] = 1.77777777777777860000;\nx[36] = 2.28571428571428470000;\nx[37] = 2.79365079365079440000;\nx[38] = 3.30158730158730050000;\nx[39] = 3.80952380952381020000;\nx[40] = 4.31746031746031630000;\nx[41] = 4.82539682539682600000;\nx[42] = 5.33333333333333210000;\nx[43] = 5.84126984126984180000;\nx[44] = 6.34920634920634800000;\nx[45] = 6.85714285714285770000;\nx[46] = 7.36507936507936380000;\nx[47] = 7.87301587301587350000;\nx[48] = 8.38095238095237960000;\nx[49] = 8.88888888888888930000;\nx[50] = 9.39682539682539540000;\nx[51] = 9.90476190476190510000;\nx[52] = 10.41269841269841100000;\nx[53] = 10.92063492063492100000;\nx[54] = 11.42857142857142700000;\nx[55] = 11.93650793650793700000;\nx[56] = 12.44444444444444300000;\nx[57] = 12.95238095238095300000;\nx[58] = 13.46031746031745900000;\nx[59] = 13.96825396825396800000;\nx[60] = 14.47619047619047400000;\nx[61] = 14.98412698412698400000;\nx[62] = 15.49206349206349000000;\nx[63] = 16.00000000000000000000;\n\n\n\nvar y = new Array();\ny[0] = 0.0000001125351747192591200;\ny[1] = 0.0000001870175279627160400;\ny[2] = 0.0000003107966540465112000;\ny[3] = 0.0000005165000372893601900;\ny[4] = 0.0000008583499373194266000;\ny[5] = 0.000001426456073000250500;\ny[6] = 0.000002370568039596737700;\ny[7] = 0.000003939548463303105900;\ny[8] = 0.000006546971795567619300;\ny[9] = 0.00001088014022196331600;\ny[10] = 0.00001808125266855845500;\ny[11] = 0.00003004848204109428100;\ny[12] = 0.00004993632297081056800;\ny[13] = 0.00008298709893014922600;\ny[14] = 0.0001379128093365619200;\ny[15] = 0.0002291915638009238700;\ny[16] = 0.0003808839307255494700;\ny[17] = 0.0006329751683659501200;\ny[18] = 0.001051915114939835700;\ny[19] = 0.001748133993779607700;\ny[20] = 0.002905151201656255000;\ny[21] = 0.004827949993831437100;\ny[22] = 0.008023369361859111100;\ny[23] = 0.01333370395283075800;\ny[24] = 0.02215872822045164600;\ny[25] = 0.03682466913056056000;\ny[26] = 0.06119738655956222900;\ny[27] = 0.1017013923042267600;\ny[28] = 0.1690133154060659600;\ny[29] = 0.2808762017642814100;\ny[30] = 0.4667764816516809500;\ny[31] = 0.7757164275739275600;\ny[32] = 1.289130878828392400;\ny[33] = 2.142353009006615400;\ny[34] = 3.560287392519015300;\ny[35] = 5.916693590664334800;\ny[36] = 9.832707078469738300;\ny[37] = 16.340567076777361000;\ny[38] = 27.155709029035226000;\ny[39] = 45.128943775619703000;\ny[40] = 74.997915323273489000;\ny[41] = 124.635917268588530000;\ny[42] = 207.127248889834330000;\ny[43] = 344.216163148372520000;\ny[44] = 572.038529974419700000;\ny[45] = 950.647049174870860000;\ny[46] = 1579.840805732611900000;\ny[47] = 2625.471749609100700000;\ny[48] = 4363.162340777078500000;\ny[49] = 7250.958085841060000000;\ny[50] = 12050.065767953940000000;\ny[51] = 20025.503291152076000000;\ny[52] = 33279.551314186152000000;\ny[53] = 55305.902656783459000000;\ny[54] = 91910.580157904318000000;\ny[55] = 152742.371775148380000000;\ny[56] = 253836.197045168550000000;\ny[57] = 421839.822058054970000000;\ny[58] = 701038.061338060300000000;\ny[59] = 1165026.006902193900000000;\ny[60] = 1936108.282291886200000000;\ny[61] = 3217537.856280616000000000;\ny[62] = 5347092.386973262800000000;\ny[63] = 8886110.520507872100000000;\n\n\n\nvar val;\nfor (i = 0; i < vnum; i++)\n{\n\tval = Math.exp(x[i]);\n\tif (!isEqual(val, y[i]))\n\t{\n\t\t$ERROR(\"\\nx = \" + x[i] + \"\\nlibc.exp(x) = \" + y[i] + \"\\nMath.exp(x) = \" + Math.exp(x[i]) + \"\\nMath.abs(libc.exp(x) - Math.exp(x)) > \" + prec + \"\\n\\n\"); \n\t}\n}\n",
+ "id": "S15.8.2.8_A6"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.8.2.9_floor.json b/website/resources/scripts/testcases2/15.8.2.9_floor.json
new file mode 100644
index 000000000..8350b368d
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.8.2.9_floor.json
@@ -0,0 +1,50 @@
+{
+ "testCollection": {
+ "name": "15.8.2.9_floor",
+ "numTests": 7,
+ "tests": [
+ {
+ "section": "15.8.2.9",
+ "description": "Checking if Math.floor(NaN) is NaN",
+ "test": "// CHECK#1\nvar x = NaN;\nif (!isNaN(Math.floor(x)))\n{\n\t$ERROR(\"#1: 'var x=NaN; isNaN(Math.floor(x)) === false'\");\n}\n",
+ "id": "S15.8.2.9_A1"
+ },
+ {
+ "section": "15.8.2.9",
+ "description": "Checking if Math.floor(x) is +0, where x is +0",
+ "test": "// CHECK#1\nvar x = +0;\nif (Math.floor(x) !== +0)\n{\n\t$ERROR(\"#1: 'var x = +0; Math.floor(x) !== +0'\");\n}\n",
+ "id": "S15.8.2.9_A2"
+ },
+ {
+ "section": "15.8.2.9",
+ "description": "Checking if Math.floor(x) is -0, where x is -0",
+ "test": "// CHECK#1\nvar x = -0;\nif (Math.floor(x) !== -0)\n{\n\t$ERROR(\"#1: 'var x = -0; Math.floor(x) !== -0'\");\n}\n",
+ "id": "S15.8.2.9_A3"
+ },
+ {
+ "section": "15.8.2.9",
+ "description": "Checking if Math.floor(x) is +Infinity, where x is +Infinity",
+ "test": "// CHECK#1\nvar x = +Infinity;\nif (Math.floor(x) !== +Infinity)\n{\n\t$ERROR(\"#1: 'var x = +Infinity; Math.floor(x) !== +Infinity'\");\n}\n",
+ "id": "S15.8.2.9_A4"
+ },
+ {
+ "section": "15.8.2.9",
+ "description": "Checking if Math.floor(x) is -Infinity, where x is -Infinity",
+ "test": "// CHECK#1\nvar x = -Infinity;\nif (Math.floor(x) !== -Infinity)\n{\n\t$ERROR(\"#1: 'var x = -Infinity; Math.floor(x) !== -Infinity'\");\n}\n",
+ "id": "S15.8.2.9_A5"
+ },
+ {
+ "section": "15.8.2.9",
+ "description": "Checking if Math.floor(x) is +0, where x is greater than 0 but less than 1",
+ "test": "// CHECK#1\nvar x = 0.000000000000001;\nif (Math.floor(x) !== +0)\n{\n\t$ERROR(\"#1: 'var x = 0.000000000000001; Math.floor(x) !== +0'\");\n}\n\n// CHECK#2\nvar x = 0.999999999999999;\nif (Math.floor(x) !== +0)\n{\n\t$ERROR(\"#2: 'var x = 0.999999999999999; Math.ceil(x) !== +0'\");\n}\n\n// CHECK#3\nvar x = 0.5;\nif (Math.floor(x) !== +0)\n{\n\t$ERROR(\"#3: 'var x = 0.5; Math.ceil(x) !== +0'\");\n}\n",
+ "id": "S15.8.2.9_A6"
+ },
+ {
+ "section": "15.8.2.9",
+ "description": "Checking if Math.floor(x) is equal to -Math.ceil(-x) on 2000 floating-point argument values",
+ "test": "// CHECK#1\nfor (i=-1000; i<1000; i++)\n{\n\tx = i/10.0;\n\tif (-Math.ceil(-x) !== Math.floor(x))\n\t{\n\t\t$ERROR(\"#1: 'x = \" + x + \"; Math.floor(x) !== -Math.ceil(-x)'\");\n\t}\n}\n",
+ "id": "S15.8.2.9_A7"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.9.1.15.json b/website/resources/scripts/testcases2/15.9.1.15.json
new file mode 100644
index 000000000..3c6620894
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.9.1.15.json
@@ -0,0 +1,15 @@
+{
+ "testCollection": {
+ "name": "15.9.1.15",
+ "numTests": 1,
+ "tests": [
+ {
+ "id": "15.9.1.15-1",
+ "path": "TestCases/chapter15/15.9/15.9.1/15.9.1.15/15.9.1.15-1.js",
+ "description": "Date Time String Format - specified default values will be set for all optional fields(MM, DD, mm, ss and time zone) when they are absent",
+ "test": "assertTrue((function testcase() {\n var result = false;\n var expectedDateTimeStr = \"1970-01-01T00:00:00.000Z\";\n var dateObj = new Date(\"1970\");\n var dateStr = dateObj.toISOString();\n result = dateStr === expectedDateTimeStr;\n return result;\n }).call(this));\n",
+ "precondition": "(fnExists(Date.prototype.toISOString))"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.9.2_The_Date_Constructor_Called_as_a_Function.json b/website/resources/scripts/testcases2/15.9.2_The_Date_Constructor_Called_as_a_Function.json
new file mode 100644
index 000000000..c039af404
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.9.2_The_Date_Constructor_Called_as_a_Function.json
@@ -0,0 +1,20 @@
+{
+ "testCollection": {
+ "name": "15.9.2_The_Date_Constructor_Called_as_a_Function",
+ "numTests": 2,
+ "tests": [
+ {
+ "section": "15.9.2.1",
+ "description": "Checking type of returned value",
+ "test": "//CHECK#1\nif( typeof Date() !== \"string\" ) {\n $ERROR('#1: typeof Date() should be \"string\", actual is '+(typeof Date()));\n}\n\n//CHECK#2\nif( typeof Date(1) !== \"string\" ) {\n $ERROR('#2: typeof Date(1) should be \"string\", actual is '+(typeof Date(1)));\n}\n\n//CHECK#3\nif( typeof Date(1970, 1) !== \"string\" ) {\n $ERROR('#3: typeof Date(1970, 1) should be \"string\", actual is '+(typeof Date(1970, 1)));\n}\n\n//CHECK#4\nif( typeof Date(1970, 1, 1) !== \"string\" ) {\n $ERROR('#4: typeof Date(1970, 1, 1) should be \"string\", actual is '+(typeof Date(1970, 1, 1)));\n}\n\n//CHECK#5\nif( typeof Date(1970, 1, 1, 1) !== \"string\" ) {\n $ERROR('#5: typeof Date(1970, 1, 1, 1) should be \"string\", actual is '+(typeof Date(1970, 1, 1, 1)));\n}\n\n//CHECK#6\nif( typeof Date(1970, 1, 1, 1) !== \"string\" ) {\n $ERROR('#7: typeof Date(1970, 1, 1, 1) should be \"string\", actual is '+(typeof Date(1970, 1, 1, 1)));\n}\n\n//CHECK#8\nif( typeof Date(1970, 1, 1, 1, 0) !== \"string\" ) {\n $ERROR('#8: typeof Date(1970, 1, 1, 1, 0) should be \"string\", actual is '+(typeof Date(1970, 1, 1, 1, 0)));\n}\n\n//CHECK#9\nif( typeof Date(1970, 1, 1, 1, 0, 0) !== \"string\" ) {\n $ERROR('#9: typeof Date(1970, 1, 1, 1, 0, 0) should be \"string\", actual is '+(typeof Date(1970, 1, 1, 1, 0, 0)));\n}\n\n//CHECK#10\nif( typeof Date(1970, 1, 1, 1, 0, 0, 0) !== \"string\" ) {\n $ERROR('#10: typeof Date(1970, 1, 1, 1, 0, 0, 0) should be \"string\", actual is '+(typeof Date(1970, 1, 1, 1, 0, 0, 0)));\n}\n\n//CHECK#11\nif( typeof Date(Number.NaN) !== \"string\" ) {\n $ERROR('#11: typeof Date(Number.NaN) should be \"string\", actual is '+(typeof Date(Number.NaN)));\n}\n\n//CHECK#12\nif( typeof Date(Number.POSITIVE_INFINITY) !== \"string\" ) {\n $ERROR('#12: typeof Date(Number.POSITIVE_INFINITY) should be \"string\", actual is '+(typeof Date(Number.POSITIVE_INFINITY)));\n}\n\n//CHECK#13\nif( typeof Date(Number.NEGATIVE_INFINITY) !== \"string\" ) {\n $ERROR('#13: typeof Date(Number.NEGATIVE_INFINITY) should be \"string\", actual is '+(typeof Date(Number.NEGATIVE_INFINITY)));\n}\n\n//CHECK#14\nif( typeof Date(undefined) !== \"string\" ) {\n $ERROR('#14: typeof Date(undefined) should be \"string\", actual is '+(typeof Date(undefined)));\n}\n\n//CHECK#15\nif( typeof Date(null) !== \"string\" ) {\n $ERROR('#15: typeof Date(null) should be \"string\", actual is '+(typeof Date(null)));\n}\n",
+ "id": "S15.9.2.1_A1"
+ },
+ {
+ "section": "15.9.2.1",
+ "description": "Use various number arguments and various types of ones",
+ "test": "function isEqual(d1, d2) {\n if (d1 === d2) {\n return true;\n } else if (Math.abs(Date.parse(d1) - Date.parse(d2)) <= 1000) {\n return true;\n } else { \n return false;\n }\n}\n\n//CHECK#1\nif( !isEqual(Date(), (new Date()).toString()) ) {\n $ERROR('#1: Date() is equal to (new Date()).toString()');\n}\n\n//CHECK#2\nif( !isEqual(Date(1), (new Date()).toString()) ) {\n $ERROR('#2: Date(1) is equal to (new Date()).toString()');\n}\n\n//CHECK#3\nif( !isEqual(Date(1970, 1), (new Date()).toString()) ) {\n $ERROR('#3: Date(1970, 1) is equal to (new Date()).toString()');\n}\n\n//CHECK#4\nif( !isEqual(Date(1970, 1, 1), (new Date()).toString()) ) {\n $ERROR('#4: Date(1970, 1, 1) is equal to (new Date()).toString()');\n}\n\n//CHECK#5\nif( !isEqual(Date(1970, 1, 1, 1), (new Date()).toString()) ) {\n $ERROR('#5: Date(1970, 1, 1, 1) is equal to (new Date()).toString()');\n}\n\n//CHECK#6\nif( !isEqual(Date(1970, 1, 1, 1), (new Date()).toString()) ) {\n $ERROR('#7: Date(1970, 1, 1, 1) is equal to (new Date()).toString()');\n}\n\n//CHECK#8\nif( !isEqual(Date(1970, 1, 1, 1, 0), (new Date()).toString()) ) {\n $ERROR('#8: Date(1970, 1, 1, 1, 0) is equal to (new Date()).toString()');\n}\n\n//CHECK#9\nif( !isEqual(Date(1970, 1, 1, 1, 0, 0), (new Date()).toString()) ) {\n $ERROR('#9: Date(1970, 1, 1, 1, 0, 0) is equal to (new Date()).toString()');\n}\n\n//CHECK#10\nif( !isEqual(Date(1970, 1, 1, 1, 0, 0, 0), (new Date()).toString()) ) {\n $ERROR('#10: Date(1970, 1, 1, 1, 0, 0, 0) is equal to (new Date()).toString()');\n}\n\n//CHECK#11\nif( !isEqual(Date(Number.NaN), (new Date()).toString()) ) {\n $ERROR('#11: Date(Number.NaN) is equal to (new Date()).toString()');\n}\n\n//CHECK#12\nif( !isEqual(Date(Number.POSITIVE_INFINITY), (new Date()).toString()) ) {\n $ERROR('#12: Date(Number.POSITIVE_INFINITY) is equal to (new Date()).toString()');\n}\n\n//CHECK#13\nif( !isEqual(Date(Number.NEGATIVE_INFINITY), (new Date()).toString()) ) {\n $ERROR('#13: Date(Number.NEGATIVE_INFINITY) is equal to (new Date()).toString()');\n}\n\n//CHECK#14\nif( !isEqual(Date(undefined), (new Date()).toString()) ) {\n $ERROR('#14: Date(undefined) is equal to (new Date()).toString()');\n}\n\n//CHECK#15\nif( !isEqual(Date(null), (new Date()).toString()) ) {\n $ERROR('#15: Date(null) is equal to (new Date()).toString()');\n}\n",
+ "id": "S15.9.2.1_A2"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.9.3_The_Date_Constructor.json b/website/resources/scripts/testcases2/15.9.3_The_Date_Constructor.json
new file mode 100644
index 000000000..eb53d27ac
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.9.3_The_Date_Constructor.json
@@ -0,0 +1,278 @@
+{
+ "testCollection": {
+ "name": "15.9.3_The_Date_Constructor",
+ "numTests": 45,
+ "tests": [
+ {
+ "section": "15.9.3.1",
+ "description": "2 arguments, (year, month)",
+ "test": "if (typeof new Date(1899, 11) !== \"object\") {\n $FAIL(\"#1.1: typeof new Date(1899, 11) should be 'object'\");\n}\n\nif (new Date(1899, 11) === undefined) {\n $FAIL(\"#1.2: new Date(1899, 11) should not be undefined\");\n}\n\nvar x13 = new Date(1899, 11);\nif(typeof x13 !== \"object\"){\n $FAIL(\"#1.3: typeof new Date(1899, 11) should be 'object'\");\n}\n\nvar x14 = new Date(1899, 11);\nif(x14 === undefined){\n $FAIL(\"#1.4: new Date(1899, 11) should not be undefined\");\n}\n\nif (typeof new Date(1899, 12) !== \"object\") {\n $FAIL(\"#2.1: typeof new Date(1899, 12) should be 'object'\");\n}\n\nif (new Date(1899, 12) === undefined) {\n $FAIL(\"#2.2: new Date(1899, 12) should not be undefined\");\n}\n\nvar x23 = new Date(1899, 12);\nif(typeof x23 !== \"object\"){\n $FAIL(\"#2.3: typeof new Date(1899, 12) should be 'object'\");\n}\n\nvar x24 = new Date(1899, 12);\nif(x24 === undefined){\n $FAIL(\"#2.4: new Date(1899, 12) should not be undefined\");\n}\n\nif (typeof new Date(1900, 0) !== \"object\") {\n $FAIL(\"#3.1: typeof new Date(1900, 0) should be 'object'\");\n}\n\nif (new Date(1900, 0) === undefined) {\n $FAIL(\"#3.2: new Date(1900, 0) should not be undefined\");\n}\n\nvar x33 = new Date(1900, 0);\nif(typeof x33 !== \"object\"){\n $FAIL(\"#3.3: typeof new Date(1900, 0) should be 'object'\");\n}\n\nvar x34 = new Date(1900, 0);\nif(x34 === undefined){\n $FAIL(\"#3.4: new Date(1900, 0) should not be undefined\");\n}\n\nif (typeof new Date(1969, 11) !== \"object\") {\n $FAIL(\"#4.1: typeof new Date(1969, 11) should be 'object'\");\n}\n\nif (new Date(1969, 11) === undefined) {\n $FAIL(\"#4.2: new Date(1969, 11) should not be undefined\");\n}\n\nvar x43 = new Date(1969, 11);\nif(typeof x43 !== \"object\"){\n $FAIL(\"#4.3: typeof new Date(1969, 11) should be 'object'\");\n}\n\nvar x44 = new Date(1969, 11);\nif(x44 === undefined){\n $FAIL(\"#4.4: new Date(1969, 11) should not be undefined\");\n}\n\nif (typeof new Date(1969, 12) !== \"object\") {\n $FAIL(\"#5.1: typeof new Date(1969, 12) should be 'object'\");\n}\n\nif (new Date(1969, 12) === undefined) {\n $FAIL(\"#5.2: new Date(1969, 12) should not be undefined\");\n}\n\nvar x53 = new Date(1969, 12);\nif(typeof x53 !== \"object\"){\n $FAIL(\"#5.3: typeof new Date(1969, 12) should be 'object'\");\n}\n\nvar x54 = new Date(1969, 12);\nif(x54 === undefined){\n $FAIL(\"#5.4: new Date(1969, 12) should not be undefined\");\n}\n\nif (typeof new Date(1970, 0) !== \"object\") {\n $FAIL(\"#6.1: typeof new Date(1970, 0) should be 'object'\");\n}\n\nif (new Date(1970, 0) === undefined) {\n $FAIL(\"#6.2: new Date(1970, 0) should not be undefined\");\n}\n\nvar x63 = new Date(1970, 0);\nif(typeof x63 !== \"object\"){\n $FAIL(\"#6.3: typeof new Date(1970, 0) should be 'object'\");\n}\n\nvar x64 = new Date(1970, 0);\nif(x64 === undefined){\n $FAIL(\"#6.4: new Date(1970, 0) should not be undefined\");\n}\n\nif (typeof new Date(1999, 11) !== \"object\") {\n $FAIL(\"#7.1: typeof new Date(1999, 11) should be 'object'\");\n}\n\nif (new Date(1999, 11) === undefined) {\n $FAIL(\"#7.2: new Date(1999, 11) should not be undefined\");\n}\n\nvar x73 = new Date(1999, 11);\nif(typeof x73 !== \"object\"){\n $FAIL(\"#7.3: typeof new Date(1999, 11) should be 'object'\");\n}\n\nvar x74 = new Date(1999, 11);\nif(x74 === undefined){\n $FAIL(\"#7.4: new Date(1999, 11) should not be undefined\");\n}\n\nif (typeof new Date(1999, 12) !== \"object\") {\n $FAIL(\"#8.1: typeof new Date(1999, 12) should be 'object'\");\n}\n\nif (new Date(1999, 12) === undefined) {\n $FAIL(\"#8.2: new Date(1999, 12) should not be undefined\");\n}\n\nvar x83 = new Date(1999, 12);\nif(typeof x83 !== \"object\"){\n $FAIL(\"#8.3: typeof new Date(1999, 12) should be 'object'\");\n}\n\nvar x84 = new Date(1999, 12);\nif(x84 === undefined){\n $FAIL(\"#8.4: new Date(1999, 12) should not be undefined\");\n}\n\nif (typeof new Date(2000, 0) !== \"object\") {\n $FAIL(\"#9.1: typeof new Date(2000, 0) should be 'object'\");\n}\n\nif (new Date(2000, 0) === undefined) {\n $FAIL(\"#9.2: new Date(2000, 0) should not be undefined\");\n}\n\nvar x93 = new Date(2000, 0);\nif(typeof x93 !== \"object\"){\n $FAIL(\"#9.3: typeof new Date(2000, 0) should be 'object'\");\n}\n\nvar x94 = new Date(2000, 0);\nif(x94 === undefined){\n $FAIL(\"#9.4: new Date(2000, 0) should not be undefined\");\n}\n\nif (typeof new Date(2099, 11) !== \"object\") {\n $FAIL(\"#10.1: typeof new Date(2099, 11) should be 'object'\");\n}\n\nif (new Date(2099, 11) === undefined) {\n $FAIL(\"#10.2: new Date(2099, 11) should not be undefined\");\n}\n\nvar x103 = new Date(2099, 11);\nif(typeof x103 !== \"object\"){\n $FAIL(\"#10.3: typeof new Date(2099, 11) should be 'object'\");\n}\n\nvar x104 = new Date(2099, 11);\nif(x104 === undefined){\n $FAIL(\"#10.4: new Date(2099, 11) should not be undefined\");\n}\n\nif (typeof new Date(2099, 12) !== \"object\") {\n $FAIL(\"#11.1: typeof new Date(2099, 12) should be 'object'\");\n}\n\nif (new Date(2099, 12) === undefined) {\n $FAIL(\"#11.2: new Date(2099, 12) should not be undefined\");\n}\n\nvar x113 = new Date(2099, 12);\nif(typeof x113 !== \"object\"){\n $FAIL(\"#11.3: typeof new Date(2099, 12) should be 'object'\");\n}\n\nvar x114 = new Date(2099, 12);\nif(x114 === undefined){\n $FAIL(\"#11.4: new Date(2099, 12) should not be undefined\");\n}\n\nif (typeof new Date(2100, 0) !== \"object\") {\n $FAIL(\"#12.1: typeof new Date(2100, 0) should be 'object'\");\n}\n\nif (new Date(2100, 0) === undefined) {\n $FAIL(\"#12.2: new Date(2100, 0) should not be undefined\");\n}\n\nvar x123 = new Date(2100, 0);\nif(typeof x123 !== \"object\"){\n $FAIL(\"#12.3: typeof new Date(2100, 0) should be 'object'\");\n}\n\nvar x124 = new Date(2100, 0);\nif(x124 === undefined){\n $FAIL(\"#12.4: new Date(2100, 0) should not be undefined\");\n}\n",
+ "id": "S15.9.3.1_A1_T1"
+ },
+ {
+ "section": "15.9.3.1",
+ "description": "3 arguments, (year, month, date)",
+ "test": "if (typeof new Date(1899, 11, 31) !== \"object\") {\n $FAIL(\"#1.1: typeof new Date(1899, 11, 31) should be 'object'\");\n}\n\nif (new Date(1899, 11, 31) === undefined) {\n $FAIL(\"#1.2: new Date(1899, 11, 31) should not be undefined\");\n}\n\nvar x13 = new Date(1899, 11, 31);\nif(typeof x13 !== \"object\"){\n $FAIL(\"#1.3: typeof new Date(1899, 11, 31) should be 'object'\");\n}\n\nvar x14 = new Date(1899, 11, 31);\nif(x14 === undefined){\n $FAIL(\"#1.4: new Date(1899, 11, 31) should not be undefined\");\n}\n\nif (typeof new Date(1899, 12, 1) !== \"object\") {\n $FAIL(\"#2.1: typeof new Date(1899, 12, 1) should be 'object'\");\n}\n\nif (new Date(1899, 12, 1) === undefined) {\n $FAIL(\"#2.2: new Date(1899, 12, 1) should not be undefined\");\n}\n\nvar x23 = new Date(1899, 12, 1);\nif(typeof x23 !== \"object\"){\n $FAIL(\"#2.3: typeof new Date(1899, 12, 1) should be 'object'\");\n}\n\nvar x24 = new Date(1899, 12, 1);\nif(x24 === undefined){\n $FAIL(\"#2.4: new Date(1899, 12, 1) should not be undefined\");\n}\n\nif (typeof new Date(1900, 0, 1) !== \"object\") {\n $FAIL(\"#3.1: typeof new Date(1900, 0, 1) should be 'object'\");\n}\n\nif (new Date(1900, 0, 1) === undefined) {\n $FAIL(\"#3.2: new Date(1900, 0, 1) should not be undefined\");\n}\n\nvar x33 = new Date(1900, 0, 1);\nif(typeof x33 !== \"object\"){\n $FAIL(\"#3.3: typeof new Date(1900, 0, 1) should be 'object'\");\n}\n\nvar x34 = new Date(1900, 0, 1);\nif(x34 === undefined){\n $FAIL(\"#3.4: new Date(1900, 0, 1) should not be undefined\");\n}\n\nif (typeof new Date(1969, 11, 31) !== \"object\") {\n $FAIL(\"#4.1: typeof new Date(1969, 11, 31) should be 'object'\");\n}\n\nif (new Date(1969, 11, 31) === undefined) {\n $FAIL(\"#4.2: new Date(1969, 11, 31) should not be undefined\");\n}\n\nvar x43 = new Date(1969, 11, 31);\nif(typeof x43 !== \"object\"){\n $FAIL(\"#4.3: typeof new Date(1969, 11, 31) should be 'object'\");\n}\n\nvar x44 = new Date(1969, 11, 31);\nif(x44 === undefined){\n $FAIL(\"#4.4: new Date(1969, 11, 31) should not be undefined\");\n}\n\nif (typeof new Date(1969, 12, 1) !== \"object\") {\n $FAIL(\"#5.1: typeof new Date(1969, 12, 1) should be 'object'\");\n}\n\nif (new Date(1969, 12, 1) === undefined) {\n $FAIL(\"#5.2: new Date(1969, 12, 1) should not be undefined\");\n}\n\nvar x53 = new Date(1969, 12, 1);\nif(typeof x53 !== \"object\"){\n $FAIL(\"#5.3: typeof new Date(1969, 12, 1) should be 'object'\");\n}\n\nvar x54 = new Date(1969, 12, 1);\nif(x54 === undefined){\n $FAIL(\"#5.4: new Date(1969, 12, 1) should not be undefined\");\n}\n\nif (typeof new Date(1970, 0, 1) !== \"object\") {\n $FAIL(\"#6.1: typeof new Date(1970, 0, 1) should be 'object'\");\n}\n\nif (new Date(1970, 0, 1) === undefined) {\n $FAIL(\"#6.2: new Date(1970, 0, 1) should not be undefined\");\n}\n\nvar x63 = new Date(1970, 0, 1);\nif(typeof x63 !== \"object\"){\n $FAIL(\"#6.3: typeof new Date(1970, 0, 1) should be 'object'\");\n}\n\nvar x64 = new Date(1970, 0, 1);\nif(x64 === undefined){\n $FAIL(\"#6.4: new Date(1970, 0, 1) should not be undefined\");\n}\n\nif (typeof new Date(1999, 11, 31) !== \"object\") {\n $FAIL(\"#7.1: typeof new Date(1999, 11, 31) should be 'object'\");\n}\n\nif (new Date(1999, 11, 31) === undefined) {\n $FAIL(\"#7.2: new Date(1999, 11, 31) should not be undefined\");\n}\n\nvar x73 = new Date(1999, 11, 31);\nif(typeof x73 !== \"object\"){\n $FAIL(\"#7.3: typeof new Date(1999, 11, 31) should be 'object'\");\n}\n\nvar x74 = new Date(1999, 11, 31);\nif(x74 === undefined){\n $FAIL(\"#7.4: new Date(1999, 11, 31) should not be undefined\");\n}\n\nif (typeof new Date(1999, 12, 1) !== \"object\") {\n $FAIL(\"#8.1: typeof new Date(1999, 12, 1) should be 'object'\");\n}\n\nif (new Date(1999, 12, 1) === undefined) {\n $FAIL(\"#8.2: new Date(1999, 12, 1) should not be undefined\");\n}\n\nvar x83 = new Date(1999, 12, 1);\nif(typeof x83 !== \"object\"){\n $FAIL(\"#8.3: typeof new Date(1999, 12, 1) should be 'object'\");\n}\n\nvar x84 = new Date(1999, 12, 1);\nif(x84 === undefined){\n $FAIL(\"#8.4: new Date(1999, 12, 1) should not be undefined\");\n}\n\nif (typeof new Date(2000, 0, 1) !== \"object\") {\n $FAIL(\"#9.1: typeof new Date(2000, 0, 1) should be 'object'\");\n}\n\nif (new Date(2000, 0, 1) === undefined) {\n $FAIL(\"#9.2: new Date(2000, 0, 1) should not be undefined\");\n}\n\nvar x93 = new Date(2000, 0, 1);\nif(typeof x93 !== \"object\"){\n $FAIL(\"#9.3: typeof new Date(2000, 0, 1) should be 'object'\");\n}\n\nvar x94 = new Date(2000, 0, 1);\nif(x94 === undefined){\n $FAIL(\"#9.4: new Date(2000, 0, 1) should not be undefined\");\n}\n\nif (typeof new Date(2099, 11, 31) !== \"object\") {\n $FAIL(\"#10.1: typeof new Date(2099, 11, 31) should be 'object'\");\n}\n\nif (new Date(2099, 11, 31) === undefined) {\n $FAIL(\"#10.2: new Date(2099, 11, 31) should not be undefined\");\n}\n\nvar x103 = new Date(2099, 11, 31);\nif(typeof x103 !== \"object\"){\n $FAIL(\"#10.3: typeof new Date(2099, 11, 31) should be 'object'\");\n}\n\nvar x104 = new Date(2099, 11, 31);\nif(x104 === undefined){\n $FAIL(\"#10.4: new Date(2099, 11, 31) should not be undefined\");\n}\n\nif (typeof new Date(2099, 12, 1) !== \"object\") {\n $FAIL(\"#11.1: typeof new Date(2099, 12, 1) should be 'object'\");\n}\n\nif (new Date(2099, 12, 1) === undefined) {\n $FAIL(\"#11.2: new Date(2099, 12, 1) should not be undefined\");\n}\n\nvar x113 = new Date(2099, 12, 1);\nif(typeof x113 !== \"object\"){\n $FAIL(\"#11.3: typeof new Date(2099, 12, 1) should be 'object'\");\n}\n\nvar x114 = new Date(2099, 12, 1);\nif(x114 === undefined){\n $FAIL(\"#11.4: new Date(2099, 12, 1) should not be undefined\");\n}\n\nif (typeof new Date(2100, 0, 1) !== \"object\") {\n $FAIL(\"#12.1: typeof new Date(2100, 0, 1) should be 'object'\");\n}\n\nif (new Date(2100, 0, 1) === undefined) {\n $FAIL(\"#12.2: new Date(2100, 0, 1) should not be undefined\");\n}\n\nvar x123 = new Date(2100, 0, 1);\nif(typeof x123 !== \"object\"){\n $FAIL(\"#12.3: typeof new Date(2100, 0, 1) should be 'object'\");\n}\n\nvar x124 = new Date(2100, 0, 1);\nif(x124 === undefined){\n $FAIL(\"#12.4: new Date(2100, 0, 1) should not be undefined\");\n}\n",
+ "id": "S15.9.3.1_A1_T2"
+ },
+ {
+ "section": "15.9.3.1",
+ "description": "4 arguments, (year, month, date, hours)",
+ "test": "if (typeof new Date(1899, 11, 31, 23) !== \"object\") {\n $FAIL(\"#1.1: typeof new Date(1899, 11, 31, 23) should be 'object'\");\n}\n\nif (new Date(1899, 11, 31, 23) === undefined) {\n $FAIL(\"#1.2: new Date(1899, 11, 31, 23) should not be undefined\");\n}\n\nvar x13 = new Date(1899, 11, 31, 23);\nif(typeof x13 !== \"object\"){\n $FAIL(\"#1.3: typeof new Date(1899, 11, 31, 23) should be 'object'\");\n}\n\nvar x14 = new Date(1899, 11, 31, 23);\nif(x14 === undefined){\n $FAIL(\"#1.4: new Date(1899, 11, 31, 23) should not be undefined\");\n}\n\nif (typeof new Date(1899, 12, 1, 0) !== \"object\") {\n $FAIL(\"#2.1: typeof new Date(1899, 12, 1, 0) should be 'object'\");\n}\n\nif (new Date(1899, 12, 1, 0) === undefined) {\n $FAIL(\"#2.2: new Date(1899, 12, 1, 0) should not be undefined\");\n}\n\nvar x23 = new Date(1899, 12, 1, 0);\nif(typeof x23 !== \"object\"){\n $FAIL(\"#2.3: typeof new Date(1899, 12, 1, 0) should be 'object'\");\n}\n\nvar x24 = new Date(1899, 12, 1, 0);\nif(x24 === undefined){\n $FAIL(\"#2.4: new Date(1899, 12, 1, 0) should not be undefined\");\n}\n\nif (typeof new Date(1900, 0, 1, 0) !== \"object\") {\n $FAIL(\"#3.1: typeof new Date(1900, 0, 1, 0) should be 'object'\");\n}\n\nif (new Date(1900, 0, 1, 0) === undefined) {\n $FAIL(\"#3.2: new Date(1900, 0, 1, 0) should not be undefined\");\n}\n\nvar x33 = new Date(1900, 0, 1, 0);\nif(typeof x33 !== \"object\"){\n $FAIL(\"#3.3: typeof new Date(1900, 0, 1, 0) should be 'object'\");\n}\n\nvar x34 = new Date(1900, 0, 1, 0);\nif(x34 === undefined){\n $FAIL(\"#3.4: new Date(1900, 0, 1, 0) should not be undefined\");\n}\n\nif (typeof new Date(1969, 11, 31, 23) !== \"object\") {\n $FAIL(\"#4.1: typeof new Date(1969, 11, 31, 23) should be 'object'\");\n}\n\nif (new Date(1969, 11, 31, 23) === undefined) {\n $FAIL(\"#4.2: new Date(1969, 11, 31, 23) should not be undefined\");\n}\n\nvar x43 = new Date(1969, 11, 31, 23);\nif(typeof x43 !== \"object\"){\n $FAIL(\"#4.3: typeof new Date(1969, 11, 31, 23) should be 'object'\");\n}\n\nvar x44 = new Date(1969, 11, 31, 23);\nif(x44 === undefined){\n $FAIL(\"#4.4: new Date(1969, 11, 31, 23) should not be undefined\");\n}\n\nif (typeof new Date(1969, 12, 1, 0) !== \"object\") {\n $FAIL(\"#5.1: typeof new Date(1969, 12, 1, 0) should be 'object'\");\n}\n\nif (new Date(1969, 12, 1, 0) === undefined) {\n $FAIL(\"#5.2: new Date(1969, 12, 1, 0) should not be undefined\");\n}\n\nvar x53 = new Date(1969, 12, 1, 0);\nif(typeof x53 !== \"object\"){\n $FAIL(\"#5.3: typeof new Date(1969, 12, 1, 0) should be 'object'\");\n}\n\nvar x54 = new Date(1969, 12, 1, 0);\nif(x54 === undefined){\n $FAIL(\"#5.4: new Date(1969, 12, 1, 0) should not be undefined\");\n}\n\nif (typeof new Date(1970, 0, 1, 0) !== \"object\") {\n $FAIL(\"#6.1: typeof new Date(1970, 0, 1, 0) should be 'object'\");\n}\n\nif (new Date(1970, 0, 1, 0) === undefined) {\n $FAIL(\"#6.2: new Date(1970, 0, 1, 0) should not be undefined\");\n}\n\nvar x63 = new Date(1970, 0, 1, 0);\nif(typeof x63 !== \"object\"){\n $FAIL(\"#6.3: typeof new Date(1970, 0, 1, 0) should be 'object'\");\n}\n\nvar x64 = new Date(1970, 0, 1, 0);\nif(x64 === undefined){\n $FAIL(\"#6.4: new Date(1970, 0, 1, 0) should not be undefined\");\n}\n\nif (typeof new Date(1999, 11, 31, 23) !== \"object\") {\n $FAIL(\"#7.1: typeof new Date(1999, 11, 31, 23) should be 'object'\");\n}\n\nif (new Date(1999, 11, 31, 23) === undefined) {\n $FAIL(\"#7.2: new Date(1999, 11, 31, 23) should not be undefined\");\n}\n\nvar x73 = new Date(1999, 11, 31, 23);\nif(typeof x73 !== \"object\"){\n $FAIL(\"#7.3: typeof new Date(1999, 11, 31, 23) should be 'object'\");\n}\n\nvar x74 = new Date(1999, 11, 31, 23);\nif(x74 === undefined){\n $FAIL(\"#7.4: new Date(1999, 11, 31, 23) should not be undefined\");\n}\n\nif (typeof new Date(1999, 12, 1, 0) !== \"object\") {\n $FAIL(\"#8.1: typeof new Date(1999, 12, 1, 0) should be 'object'\");\n}\n\nif (new Date(1999, 12, 1, 0) === undefined) {\n $FAIL(\"#8.2: new Date(1999, 12, 1, 0) should not be undefined\");\n}\n\nvar x83 = new Date(1999, 12, 1, 0);\nif(typeof x83 !== \"object\"){\n $FAIL(\"#8.3: typeof new Date(1999, 12, 1, 0) should be 'object'\");\n}\n\nvar x84 = new Date(1999, 12, 1, 0);\nif(x84 === undefined){\n $FAIL(\"#8.4: new Date(1999, 12, 1, 0) should not be undefined\");\n}\n\nif (typeof new Date(2000, 0, 1, 0) !== \"object\") {\n $FAIL(\"#9.1: typeof new Date(2000, 0, 1, 0) should be 'object'\");\n}\n\nif (new Date(2000, 0, 1, 0) === undefined) {\n $FAIL(\"#9.2: new Date(2000, 0, 1, 0) should not be undefined\");\n}\n\nvar x93 = new Date(2000, 0, 1, 0);\nif(typeof x93 !== \"object\"){\n $FAIL(\"#9.3: typeof new Date(2000, 0, 1, 0) should be 'object'\");\n}\n\nvar x94 = new Date(2000, 0, 1, 0);\nif(x94 === undefined){\n $FAIL(\"#9.4: new Date(2000, 0, 1, 0) should not be undefined\");\n}\n\nif (typeof new Date(2099, 11, 31, 23) !== \"object\") {\n $FAIL(\"#10.1: typeof new Date(2099, 11, 31, 23) should be 'object'\");\n}\n\nif (new Date(2099, 11, 31, 23) === undefined) {\n $FAIL(\"#10.2: new Date(2099, 11, 31, 23) should not be undefined\");\n}\n\nvar x103 = new Date(2099, 11, 31, 23);\nif(typeof x103 !== \"object\"){\n $FAIL(\"#10.3: typeof new Date(2099, 11, 31, 23) should be 'object'\");\n}\n\nvar x104 = new Date(2099, 11, 31, 23);\nif(x104 === undefined){\n $FAIL(\"#10.4: new Date(2099, 11, 31, 23) should not be undefined\");\n}\n\nif (typeof new Date(2099, 12, 1, 0) !== \"object\") {\n $FAIL(\"#11.1: typeof new Date(2099, 12, 1, 0) should be 'object'\");\n}\n\nif (new Date(2099, 12, 1, 0) === undefined) {\n $FAIL(\"#11.2: new Date(2099, 12, 1, 0) should not be undefined\");\n}\n\nvar x113 = new Date(2099, 12, 1, 0);\nif(typeof x113 !== \"object\"){\n $FAIL(\"#11.3: typeof new Date(2099, 12, 1, 0) should be 'object'\");\n}\n\nvar x114 = new Date(2099, 12, 1, 0);\nif(x114 === undefined){\n $FAIL(\"#11.4: new Date(2099, 12, 1, 0) should not be undefined\");\n}\n\nif (typeof new Date(2100, 0, 1, 0) !== \"object\") {\n $FAIL(\"#12.1: typeof new Date(2100, 0, 1, 0) should be 'object'\");\n}\n\nif (new Date(2100, 0, 1, 0) === undefined) {\n $FAIL(\"#12.2: new Date(2100, 0, 1, 0) should not be undefined\");\n}\n\nvar x123 = new Date(2100, 0, 1, 0);\nif(typeof x123 !== \"object\"){\n $FAIL(\"#12.3: typeof new Date(2100, 0, 1, 0) should be 'object'\");\n}\n\nvar x124 = new Date(2100, 0, 1, 0);\nif(x124 === undefined){\n $FAIL(\"#12.4: new Date(2100, 0, 1, 0) should not be undefined\");\n}\n",
+ "id": "S15.9.3.1_A1_T3"
+ },
+ {
+ "section": "15.9.3.1",
+ "description": "5 arguments, (year, month, date, hours, minutes)",
+ "test": "if (typeof new Date(1899, 11, 31, 23, 59) !== \"object\") {\n $FAIL(\"#1.1: typeof new Date(1899, 11, 31, 23, 59) should be 'object'\");\n}\n\nif (new Date(1899, 11, 31, 23, 59) === undefined) {\n $FAIL(\"#1.2: new Date(1899, 11, 31, 23, 59) should not be undefined\");\n}\n\nvar x13 = new Date(1899, 11, 31, 23, 59);\nif(typeof x13 !== \"object\"){\n $FAIL(\"#1.3: typeof new Date(1899, 11, 31, 23, 59) should be 'object'\");\n}\n\nvar x14 = new Date(1899, 11, 31, 23, 59);\nif(x14 === undefined){\n $FAIL(\"#1.4: new Date(1899, 11, 31, 23, 59) should not be undefined\");\n}\n\nif (typeof new Date(1899, 12, 1, 0, 0) !== \"object\") {\n $FAIL(\"#2.1: typeof new Date(1899, 12, 1, 0, 0) should be 'object'\");\n}\n\nif (new Date(1899, 12, 1, 0, 0) === undefined) {\n $FAIL(\"#2.2: new Date(1899, 12, 1, 0, 0) should not be undefined\");\n}\n\nvar x23 = new Date(1899, 12, 1, 0, 0);\nif(typeof x23 !== \"object\"){\n $FAIL(\"#2.3: typeof new Date(1899, 12, 1, 0, 0) should be 'object'\");\n}\n\nvar x24 = new Date(1899, 12, 1, 0, 0);\nif(x24 === undefined){\n $FAIL(\"#2.4: new Date(1899, 12, 1, 0, 0) should not be undefined\");\n}\n\nif (typeof new Date(1900, 0, 1, 0, 0) !== \"object\") {\n $FAIL(\"#3.1: typeof new Date(1900, 0, 1, 0, 0) should be 'object'\");\n}\n\nif (new Date(1900, 0, 1, 0, 0) === undefined) {\n $FAIL(\"#3.2: new Date(1900, 0, 1, 0, 0) should not be undefined\");\n}\n\nvar x33 = new Date(1900, 0, 1, 0, 0);\nif(typeof x33 !== \"object\"){\n $FAIL(\"#3.3: typeof new Date(1900, 0, 1, 0, 0) should be 'object'\");\n}\n\nvar x34 = new Date(1900, 0, 1, 0, 0);\nif(x34 === undefined){\n $FAIL(\"#3.4: new Date(1900, 0, 1, 0, 0) should not be undefined\");\n}\n\nif (typeof new Date(1969, 11, 31, 23, 59) !== \"object\") {\n $FAIL(\"#4.1: typeof new Date(1969, 11, 31, 23, 59) should be 'object'\");\n}\n\nif (new Date(1969, 11, 31, 23, 59) === undefined) {\n $FAIL(\"#4.2: new Date(1969, 11, 31, 23, 59) should not be undefined\");\n}\n\nvar x43 = new Date(1969, 11, 31, 23, 59);\nif(typeof x43 !== \"object\"){\n $FAIL(\"#4.3: typeof new Date(1969, 11, 31, 23, 59) should be 'object'\");\n}\n\nvar x44 = new Date(1969, 11, 31, 23, 59);\nif(x44 === undefined){\n $FAIL(\"#4.4: new Date(1969, 11, 31, 23, 59) should not be undefined\");\n}\n\nif (typeof new Date(1969, 12, 1, 0, 0) !== \"object\") {\n $FAIL(\"#5.1: typeof new Date(1969, 12, 1, 0, 0) should be 'object'\");\n}\n\nif (new Date(1969, 12, 1, 0, 0) === undefined) {\n $FAIL(\"#5.2: new Date(1969, 12, 1, 0, 0) should not be undefined\");\n}\n\nvar x53 = new Date(1969, 12, 1, 0, 0);\nif(typeof x53 !== \"object\"){\n $FAIL(\"#5.3: typeof new Date(1969, 12, 1, 0, 0) should be 'object'\");\n}\n\nvar x54 = new Date(1969, 12, 1, 0, 0);\nif(x54 === undefined){\n $FAIL(\"#5.4: new Date(1969, 12, 1, 0, 0) should not be undefined\");\n}\n\nif (typeof new Date(1970, 0, 1, 0, 0) !== \"object\") {\n $FAIL(\"#6.1: typeof new Date(1970, 0, 1, 0, 0) should be 'object'\");\n}\n\nif (new Date(1970, 0, 1, 0, 0) === undefined) {\n $FAIL(\"#6.2: new Date(1970, 0, 1, 0, 0) should not be undefined\");\n}\n\nvar x63 = new Date(1970, 0, 1, 0, 0);\nif(typeof x63 !== \"object\"){\n $FAIL(\"#6.3: typeof new Date(1970, 0, 1, 0, 0) should be 'object'\");\n}\n\nvar x64 = new Date(1970, 0, 1, 0, 0);\nif(x64 === undefined){\n $FAIL(\"#6.4: new Date(1970, 0, 1, 0, 0) should not be undefined\");\n}\n\nif (typeof new Date(1999, 11, 31, 23, 59) !== \"object\") {\n $FAIL(\"#7.1: typeof new Date(1999, 11, 31, 23, 59) should be 'object'\");\n}\n\nif (new Date(1999, 11, 31, 23, 59) === undefined) {\n $FAIL(\"#7.2: new Date(1999, 11, 31, 23, 59) should not be undefined\");\n}\n\nvar x73 = new Date(1999, 11, 31, 23, 59);\nif(typeof x73 !== \"object\"){\n $FAIL(\"#7.3: typeof new Date(1999, 11, 31, 23, 59) should be 'object'\");\n}\n\nvar x74 = new Date(1999, 11, 31, 23, 59);\nif(x74 === undefined){\n $FAIL(\"#7.4: new Date(1999, 11, 31, 23, 59) should not be undefined\");\n}\n\nif (typeof new Date(1999, 12, 1, 0, 0) !== \"object\") {\n $FAIL(\"#8.1: typeof new Date(1999, 12, 1, 0, 0) should be 'object'\");\n}\n\nif (new Date(1999, 12, 1, 0, 0) === undefined) {\n $FAIL(\"#8.2: new Date(1999, 12, 1, 0, 0) should not be undefined\");\n}\n\nvar x83 = new Date(1999, 12, 1, 0, 0);\nif(typeof x83 !== \"object\"){\n $FAIL(\"#8.3: typeof new Date(1999, 12, 1, 0, 0) should be 'object'\");\n}\n\nvar x84 = new Date(1999, 12, 1, 0, 0);\nif(x84 === undefined){\n $FAIL(\"#8.4: new Date(1999, 12, 1, 0, 0) should not be undefined\");\n}\n\nif (typeof new Date(2000, 0, 1, 0, 0) !== \"object\") {\n $FAIL(\"#9.1: typeof new Date(2000, 0, 1, 0, 0) should be 'object'\");\n}\n\nif (new Date(2000, 0, 1, 0, 0) === undefined) {\n $FAIL(\"#9.2: new Date(2000, 0, 1, 0, 0) should not be undefined\");\n}\n\nvar x93 = new Date(2000, 0, 1, 0, 0);\nif(typeof x93 !== \"object\"){\n $FAIL(\"#9.3: typeof new Date(2000, 0, 1, 0, 0) should be 'object'\");\n}\n\nvar x94 = new Date(2000, 0, 1, 0, 0);\nif(x94 === undefined){\n $FAIL(\"#9.4: new Date(2000, 0, 1, 0, 0) should not be undefined\");\n}\n\nif (typeof new Date(2099, 11, 31, 23, 59) !== \"object\") {\n $FAIL(\"#10.1: typeof new Date(2099, 11, 31, 23, 59) should be 'object'\");\n}\n\nif (new Date(2099, 11, 31, 23, 59) === undefined) {\n $FAIL(\"#10.2: new Date(2099, 11, 31, 23, 59) should not be undefined\");\n}\n\nvar x103 = new Date(2099, 11, 31, 23, 59);\nif(typeof x103 !== \"object\"){\n $FAIL(\"#10.3: typeof new Date(2099, 11, 31, 23, 59) should be 'object'\");\n}\n\nvar x104 = new Date(2099, 11, 31, 23, 59);\nif(x104 === undefined){\n $FAIL(\"#10.4: new Date(2099, 11, 31, 23, 59) should not be undefined\");\n}\n\nif (typeof new Date(2099, 12, 1, 0, 0) !== \"object\") {\n $FAIL(\"#11.1: typeof new Date(2099, 12, 1, 0, 0) should be 'object'\");\n}\n\nif (new Date(2099, 12, 1, 0, 0) === undefined) {\n $FAIL(\"#11.2: new Date(2099, 12, 1, 0, 0) should not be undefined\");\n}\n\nvar x113 = new Date(2099, 12, 1, 0, 0);\nif(typeof x113 !== \"object\"){\n $FAIL(\"#11.3: typeof new Date(2099, 12, 1, 0, 0) should be 'object'\");\n}\n\nvar x114 = new Date(2099, 12, 1, 0, 0);\nif(x114 === undefined){\n $FAIL(\"#11.4: new Date(2099, 12, 1, 0, 0) should not be undefined\");\n}\n\nif (typeof new Date(2100, 0, 1, 0, 0) !== \"object\") {\n $FAIL(\"#12.1: typeof new Date(2100, 0, 1, 0, 0) should be 'object'\");\n}\n\nif (new Date(2100, 0, 1, 0, 0) === undefined) {\n $FAIL(\"#12.2: new Date(2100, 0, 1, 0, 0) should not be undefined\");\n}\n\nvar x123 = new Date(2100, 0, 1, 0, 0);\nif(typeof x123 !== \"object\"){\n $FAIL(\"#12.3: typeof new Date(2100, 0, 1, 0, 0) should be 'object'\");\n}\n\nvar x124 = new Date(2100, 0, 1, 0, 0);\nif(x124 === undefined){\n $FAIL(\"#12.4: new Date(2100, 0, 1, 0, 0) should not be undefined\");\n}\n",
+ "id": "S15.9.3.1_A1_T4"
+ },
+ {
+ "section": "15.9.3.1",
+ "description": "6 arguments, (year, month, date, hours, minutes, seconds)",
+ "test": "if (typeof new Date(1899, 11, 31, 23, 59, 59) !== \"object\") {\n $FAIL(\"#1.1: typeof new Date(1899, 11, 31, 23, 59, 59) should be 'object'\");\n}\n\nif (new Date(1899, 11, 31, 23, 59, 59) === undefined) {\n $FAIL(\"#1.2: new Date(1899, 11, 31, 23, 59, 59) should not be undefined\");\n}\n\nvar x13 = new Date(1899, 11, 31, 23, 59, 59);\nif(typeof x13 !== \"object\"){\n $FAIL(\"#1.3: typeof new Date(1899, 11, 31, 23, 59, 59) should be 'object'\");\n}\n\nvar x14 = new Date(1899, 11, 31, 23, 59, 59);\nif(x14 === undefined){\n $FAIL(\"#1.4: new Date(1899, 11, 31, 23, 59, 59) should not be undefined\");\n}\n\nif (typeof new Date(1899, 12, 1, 0, 0, 0) !== \"object\") {\n $FAIL(\"#2.1: typeof new Date(1899, 12, 1, 0, 0, 0) should be 'object'\");\n}\n\nif (new Date(1899, 12, 1, 0, 0, 0) === undefined) {\n $FAIL(\"#2.2: new Date(1899, 12, 1, 0, 0, 0) should not be undefined\");\n}\n\nvar x23 = new Date(1899, 12, 1, 0, 0, 0);\nif(typeof x23 !== \"object\"){\n $FAIL(\"#2.3: typeof new Date(1899, 12, 1, 0, 0, 0) should be 'object'\");\n}\n\nvar x24 = new Date(1899, 12, 1, 0, 0, 0);\nif(x24 === undefined){\n $FAIL(\"#2.4: new Date(1899, 12, 1, 0, 0, 0) should not be undefined\");\n}\n\nif (typeof new Date(1900, 0, 1, 0, 0, 0) !== \"object\") {\n $FAIL(\"#3.1: typeof new Date(1900, 0, 1, 0, 0, 0) should be 'object'\");\n}\n\nif (new Date(1900, 0, 1, 0, 0, 0) === undefined) {\n $FAIL(\"#3.2: new Date(1900, 0, 1, 0, 0, 0) should not be undefined\");\n}\n\nvar x33 = new Date(1900, 0, 1, 0, 0, 0);\nif(typeof x33 !== \"object\"){\n $FAIL(\"#3.3: typeof new Date(1900, 0, 1, 0, 0, 0) should be 'object'\");\n}\n\nvar x34 = new Date(1900, 0, 1, 0, 0, 0);\nif(x34 === undefined){\n $FAIL(\"#3.4: new Date(1900, 0, 1, 0, 0, 0) should not be undefined\");\n}\n\nif (typeof new Date(1969, 11, 31, 23, 59, 59) !== \"object\") {\n $FAIL(\"#4.1: typeof new Date(1969, 11, 31, 23, 59, 59) should be 'object'\");\n}\n\nif (new Date(1969, 11, 31, 23, 59, 59) === undefined) {\n $FAIL(\"#4.2: new Date(1969, 11, 31, 23, 59, 59) should not be undefined\");\n}\n\nvar x43 = new Date(1969, 11, 31, 23, 59, 59);\nif(typeof x43 !== \"object\"){\n $FAIL(\"#4.3: typeof new Date(1969, 11, 31, 23, 59, 59) should be 'object'\");\n}\n\nvar x44 = new Date(1969, 11, 31, 23, 59, 59);\nif(x44 === undefined){\n $FAIL(\"#4.4: new Date(1969, 11, 31, 23, 59, 59) should not be undefined\");\n}\n\nif (typeof new Date(1969, 12, 1, 0, 0, 0) !== \"object\") {\n $FAIL(\"#5.1: typeof new Date(1969, 12, 1, 0, 0, 0) should be 'object'\");\n}\n\nif (new Date(1969, 12, 1, 0, 0, 0) === undefined) {\n $FAIL(\"#5.2: new Date(1969, 12, 1, 0, 0, 0) should not be undefined\");\n}\n\nvar x53 = new Date(1969, 12, 1, 0, 0, 0);\nif(typeof x53 !== \"object\"){\n $FAIL(\"#5.3: typeof new Date(1969, 12, 1, 0, 0, 0) should be 'object'\");\n}\n\nvar x54 = new Date(1969, 12, 1, 0, 0, 0);\nif(x54 === undefined){\n $FAIL(\"#5.4: new Date(1969, 12, 1, 0, 0, 0) should not be undefined\");\n}\n\nif (typeof new Date(1970, 0, 1, 0, 0, 0) !== \"object\") {\n $FAIL(\"#6.1: typeof new Date(1970, 0, 1, 0, 0, 0) should be 'object'\");\n}\n\nif (new Date(1970, 0, 1, 0, 0, 0) === undefined) {\n $FAIL(\"#6.2: new Date(1970, 0, 1, 0, 0, 0) should not be undefined\");\n}\n\nvar x63 = new Date(1970, 0, 1, 0, 0, 0);\nif(typeof x63 !== \"object\"){\n $FAIL(\"#6.3: typeof new Date(1970, 0, 1, 0, 0, 0) should be 'object'\");\n}\n\nvar x64 = new Date(1970, 0, 1, 0, 0, 0);\nif(x64 === undefined){\n $FAIL(\"#6.4: new Date(1970, 0, 1, 0, 0, 0) should not be undefined\");\n}\n\nif (typeof new Date(1999, 11, 31, 23, 59, 59) !== \"object\") {\n $FAIL(\"#7.1: typeof new Date(1999, 11, 31, 23, 59, 59) should be 'object'\");\n}\n\nif (new Date(1999, 11, 31, 23, 59, 59) === undefined) {\n $FAIL(\"#7.2: new Date(1999, 11, 31, 23, 59, 59) should not be undefined\");\n}\n\nvar x73 = new Date(1999, 11, 31, 23, 59, 59);\nif(typeof x73 !== \"object\"){\n $FAIL(\"#7.3: typeof new Date(1999, 11, 31, 23, 59, 59) should be 'object'\");\n}\n\nvar x74 = new Date(1999, 11, 31, 23, 59, 59);\nif(x74 === undefined){\n $FAIL(\"#7.4: new Date(1999, 11, 31, 23, 59, 59) should not be undefined\");\n}\n\nif (typeof new Date(1999, 12, 1, 0, 0, 0) !== \"object\") {\n $FAIL(\"#8.1: typeof new Date(1999, 12, 1, 0, 0, 0) should be 'object'\");\n}\n\nif (new Date(1999, 12, 1, 0, 0, 0) === undefined) {\n $FAIL(\"#8.2: new Date(1999, 12, 1, 0, 0, 0) should not be undefined\");\n}\n\nvar x83 = new Date(1999, 12, 1, 0, 0, 0);\nif(typeof x83 !== \"object\"){\n $FAIL(\"#8.3: typeof new Date(1999, 12, 1, 0, 0, 0) should be 'object'\");\n}\n\nvar x84 = new Date(1999, 12, 1, 0, 0, 0);\nif(x84 === undefined){\n $FAIL(\"#8.4: new Date(1999, 12, 1, 0, 0, 0) should not be undefined\");\n}\n\nif (typeof new Date(2000, 0, 1, 0, 0, 0) !== \"object\") {\n $FAIL(\"#9.1: typeof new Date(2000, 0, 1, 0, 0, 0) should be 'object'\");\n}\n\nif (new Date(2000, 0, 1, 0, 0, 0) === undefined) {\n $FAIL(\"#9.2: new Date(2000, 0, 1, 0, 0, 0) should not be undefined\");\n}\n\nvar x93 = new Date(2000, 0, 1, 0, 0, 0);\nif(typeof x93 !== \"object\"){\n $FAIL(\"#9.3: typeof new Date(2000, 0, 1, 0, 0, 0) should be 'object'\");\n}\n\nvar x94 = new Date(2000, 0, 1, 0, 0, 0);\nif(x94 === undefined){\n $FAIL(\"#9.4: new Date(2000, 0, 1, 0, 0, 0) should not be undefined\");\n}\n\nif (typeof new Date(2099, 11, 31, 23, 59, 59) !== \"object\") {\n $FAIL(\"#10.1: typeof new Date(2099, 11, 31, 23, 59, 59) should be 'object'\");\n}\n\nif (new Date(2099, 11, 31, 23, 59, 59) === undefined) {\n $FAIL(\"#10.2: new Date(2099, 11, 31, 23, 59, 59) should not be undefined\");\n}\n\nvar x103 = new Date(2099, 11, 31, 23, 59, 59);\nif(typeof x103 !== \"object\"){\n $FAIL(\"#10.3: typeof new Date(2099, 11, 31, 23, 59, 59) should be 'object'\");\n}\n\nvar x104 = new Date(2099, 11, 31, 23, 59, 59);\nif(x104 === undefined){\n $FAIL(\"#10.4: new Date(2099, 11, 31, 23, 59, 59) should not be undefined\");\n}\n\nif (typeof new Date(2099, 12, 1, 0, 0, 0) !== \"object\") {\n $FAIL(\"#11.1: typeof new Date(2099, 12, 1, 0, 0, 0) should be 'object'\");\n}\n\nif (new Date(2099, 12, 1, 0, 0, 0) === undefined) {\n $FAIL(\"#11.2: new Date(2099, 12, 1, 0, 0, 0) should not be undefined\");\n}\n\nvar x113 = new Date(2099, 12, 1, 0, 0, 0);\nif(typeof x113 !== \"object\"){\n $FAIL(\"#11.3: typeof new Date(2099, 12, 1, 0, 0, 0) should be 'object'\");\n}\n\nvar x114 = new Date(2099, 12, 1, 0, 0, 0);\nif(x114 === undefined){\n $FAIL(\"#11.4: new Date(2099, 12, 1, 0, 0, 0) should not be undefined\");\n}\n\nif (typeof new Date(2100, 0, 1, 0, 0, 0) !== \"object\") {\n $FAIL(\"#12.1: typeof new Date(2100, 0, 1, 0, 0, 0) should be 'object'\");\n}\n\nif (new Date(2100, 0, 1, 0, 0, 0) === undefined) {\n $FAIL(\"#12.2: new Date(2100, 0, 1, 0, 0, 0) should not be undefined\");\n}\n\nvar x123 = new Date(2100, 0, 1, 0, 0, 0);\nif(typeof x123 !== \"object\"){\n $FAIL(\"#12.3: typeof new Date(2100, 0, 1, 0, 0, 0) should be 'object'\");\n}\n\nvar x124 = new Date(2100, 0, 1, 0, 0, 0);\nif(x124 === undefined){\n $FAIL(\"#12.4: new Date(2100, 0, 1, 0, 0, 0) should not be undefined\");\n}\n",
+ "id": "S15.9.3.1_A1_T5"
+ },
+ {
+ "section": "15.9.3.1",
+ "description": "7 arguments, (year, month, date, hours, minutes, seconds, ms)",
+ "test": "if (typeof new Date(1899, 11, 31, 23, 59, 59, 999) !== \"object\") {\n $FAIL(\"#1.1: typeof new Date(1899, 11, 31, 23, 59, 59, 999) should be 'object'\");\n}\n\nif (new Date(1899, 11, 31, 23, 59, 59, 999) === undefined) {\n $FAIL(\"#1.2: new Date(1899, 11, 31, 23, 59, 59, 999) should not be undefined\");\n}\n\nvar x13 = new Date(1899, 11, 31, 23, 59, 59, 999);\nif(typeof x13 !== \"object\"){\n $FAIL(\"#1.3: typeof new Date(1899, 11, 31, 23, 59, 59, 999) should be 'object'\");\n}\n\nvar x14 = new Date(1899, 11, 31, 23, 59, 59, 999);\nif(x14 === undefined){\n $FAIL(\"#1.4: new Date(1899, 11, 31, 23, 59, 59, 999) should not be undefined\");\n}\n\nif (typeof new Date(1899, 12, 1, 0, 0, 0, 0) !== \"object\") {\n $FAIL(\"#2.1: typeof new Date(1899, 12, 1, 0, 0, 0, 0) should be 'object'\");\n}\n\nif (new Date(1899, 12, 1, 0, 0, 0, 0) === undefined) {\n $FAIL(\"#2.2: new Date(1899, 12, 1, 0, 0, 0, 0) should not be undefined\");\n}\n\nvar x23 = new Date(1899, 12, 1, 0, 0, 0, 0);\nif(typeof x23 !== \"object\"){\n $FAIL(\"#2.3: typeof new Date(1899, 12, 1, 0, 0, 0, 0) should be 'object'\");\n}\n\nvar x24 = new Date(1899, 12, 1, 0, 0, 0, 0);\nif(x24 === undefined){\n $FAIL(\"#2.4: new Date(1899, 12, 1, 0, 0, 0, 0) should not be undefined\");\n}\n\nif (typeof new Date(1900, 0, 1, 0, 0, 0, 0) !== \"object\") {\n $FAIL(\"#3.1: typeof new Date(1900, 0, 1, 0, 0, 0, 0) should be 'object'\");\n}\n\nif (new Date(1900, 0, 1, 0, 0, 0, 0) === undefined) {\n $FAIL(\"#3.2: new Date(1900, 0, 1, 0, 0, 0, 0) should not be undefined\");\n}\n\nvar x33 = new Date(1900, 0, 1, 0, 0, 0, 0);\nif(typeof x33 !== \"object\"){\n $FAIL(\"#3.3: typeof new Date(1900, 0, 1, 0, 0, 0, 0) should be 'object'\");\n}\n\nvar x34 = new Date(1900, 0, 1, 0, 0, 0, 0);\nif(x34 === undefined){\n $FAIL(\"#3.4: new Date(1900, 0, 1, 0, 0, 0, 0) should not be undefined\");\n}\n\nif (typeof new Date(1969, 11, 31, 23, 59, 59, 999) !== \"object\") {\n $FAIL(\"#4.1: typeof new Date(1969, 11, 31, 23, 59, 59, 999) should be 'object'\");\n}\n\nif (new Date(1969, 11, 31, 23, 59, 59, 999) === undefined) {\n $FAIL(\"#4.2: new Date(1969, 11, 31, 23, 59, 59, 999) should not be undefined\");\n}\n\nvar x43 = new Date(1969, 11, 31, 23, 59, 59, 999);\nif(typeof x43 !== \"object\"){\n $FAIL(\"#4.3: typeof new Date(1969, 11, 31, 23, 59, 59, 999) should be 'object'\");\n}\n\nvar x44 = new Date(1969, 11, 31, 23, 59, 59, 999);\nif(x44 === undefined){\n $FAIL(\"#4.4: new Date(1969, 11, 31, 23, 59, 59, 999) should not be undefined\");\n}\n\nif (typeof new Date(1969, 12, 1, 0, 0, 0, 0) !== \"object\") {\n $FAIL(\"#5.1: typeof new Date(1969, 12, 1, 0, 0, 0, 0) should be 'object'\");\n}\n\nif (new Date(1969, 12, 1, 0, 0, 0, 0) === undefined) {\n $FAIL(\"#5.2: new Date(1969, 12, 1, 0, 0, 0, 0) should not be undefined\");\n}\n\nvar x53 = new Date(1969, 12, 1, 0, 0, 0, 0);\nif(typeof x53 !== \"object\"){\n $FAIL(\"#5.3: typeof new Date(1969, 12, 1, 0, 0, 0, 0) should be 'object'\");\n}\n\nvar x54 = new Date(1969, 12, 1, 0, 0, 0, 0);\nif(x54 === undefined){\n $FAIL(\"#5.4: new Date(1969, 12, 1, 0, 0, 0, 0) should not be undefined\");\n}\n\nif (typeof new Date(1970, 0, 1, 0, 0, 0, 0) !== \"object\") {\n $FAIL(\"#6.1: typeof new Date(1970, 0, 1, 0, 0, 0, 0) should be 'object'\");\n}\n\nif (new Date(1970, 0, 1, 0, 0, 0, 0) === undefined) {\n $FAIL(\"#6.2: new Date(1970, 0, 1, 0, 0, 0, 0) should not be undefined\");\n}\n\nvar x63 = new Date(1970, 0, 1, 0, 0, 0, 0);\nif(typeof x63 !== \"object\"){\n $FAIL(\"#6.3: typeof new Date(1970, 0, 1, 0, 0, 0, 0) should be 'object'\");\n}\n\nvar x64 = new Date(1970, 0, 1, 0, 0, 0, 0);\nif(x64 === undefined){\n $FAIL(\"#6.4: new Date(1970, 0, 1, 0, 0, 0, 0) should not be undefined\");\n}\n\nif (typeof new Date(1999, 11, 31, 23, 59, 59, 999) !== \"object\") {\n $FAIL(\"#7.1: typeof new Date(1999, 11, 31, 23, 59, 59, 999) should be 'object'\");\n}\n\nif (new Date(1999, 11, 31, 23, 59, 59, 999) === undefined) {\n $FAIL(\"#7.2: new Date(1999, 11, 31, 23, 59, 59, 999) should not be undefined\");\n}\n\nvar x73 = new Date(1999, 11, 31, 23, 59, 59, 999);\nif(typeof x73 !== \"object\"){\n $FAIL(\"#7.3: typeof new Date(1999, 11, 31, 23, 59, 59, 999) should be 'object'\");\n}\n\nvar x74 = new Date(1999, 11, 31, 23, 59, 59, 999);\nif(x74 === undefined){\n $FAIL(\"#7.4: new Date(1999, 11, 31, 23, 59, 59, 999) should not be undefined\");\n}\n\nif (typeof new Date(1999, 12, 1, 0, 0, 0, 0) !== \"object\") {\n $FAIL(\"#8.1: typeof new Date(1999, 12, 1, 0, 0, 0, 0) should be 'object'\");\n}\n\nif (new Date(1999, 12, 1, 0, 0, 0, 0) === undefined) {\n $FAIL(\"#8.2: new Date(1999, 12, 1, 0, 0, 0, 0) should not be undefined\");\n}\n\nvar x83 = new Date(1999, 12, 1, 0, 0, 0, 0);\nif(typeof x83 !== \"object\"){\n $FAIL(\"#8.3: typeof new Date(1999, 12, 1, 0, 0, 0, 0) should be 'object'\");\n}\n\nvar x84 = new Date(1999, 12, 1, 0, 0, 0, 0);\nif(x84 === undefined){\n $FAIL(\"#8.4: new Date(1999, 12, 1, 0, 0, 0, 0) should not be undefined\");\n}\n\nif (typeof new Date(2000, 0, 1, 0, 0, 0, 0) !== \"object\") {\n $FAIL(\"#9.1: typeof new Date(2000, 0, 1, 0, 0, 0, 0) should be 'object'\");\n}\n\nif (new Date(2000, 0, 1, 0, 0, 0, 0) === undefined) {\n $FAIL(\"#9.2: new Date(2000, 0, 1, 0, 0, 0, 0) should not be undefined\");\n}\n\nvar x93 = new Date(2000, 0, 1, 0, 0, 0, 0);\nif(typeof x93 !== \"object\"){\n $FAIL(\"#9.3: typeof new Date(2000, 0, 1, 0, 0, 0, 0) should be 'object'\");\n}\n\nvar x94 = new Date(2000, 0, 1, 0, 0, 0, 0);\nif(x94 === undefined){\n $FAIL(\"#9.4: new Date(2000, 0, 1, 0, 0, 0, 0) should not be undefined\");\n}\n\nif (typeof new Date(2099, 11, 31, 23, 59, 59, 999) !== \"object\") {\n $FAIL(\"#10.1: typeof new Date(2099, 11, 31, 23, 59, 59, 999) should be 'object'\");\n}\n\nif (new Date(2099, 11, 31, 23, 59, 59, 999) === undefined) {\n $FAIL(\"#10.2: new Date(2099, 11, 31, 23, 59, 59, 999) should not be undefined\");\n}\n\nvar x103 = new Date(2099, 11, 31, 23, 59, 59, 999);\nif(typeof x103 !== \"object\"){\n $FAIL(\"#10.3: typeof new Date(2099, 11, 31, 23, 59, 59, 999) should be 'object'\");\n}\n\nvar x104 = new Date(2099, 11, 31, 23, 59, 59, 999);\nif(x104 === undefined){\n $FAIL(\"#10.4: new Date(2099, 11, 31, 23, 59, 59, 999) should not be undefined\");\n}\n\nif (typeof new Date(2099, 12, 1, 0, 0, 0, 0) !== \"object\") {\n $FAIL(\"#11.1: typeof new Date(2099, 12, 1, 0, 0, 0, 0) should be 'object'\");\n}\n\nif (new Date(2099, 12, 1, 0, 0, 0, 0) === undefined) {\n $FAIL(\"#11.2: new Date(2099, 12, 1, 0, 0, 0, 0) should not be undefined\");\n}\n\nvar x113 = new Date(2099, 12, 1, 0, 0, 0, 0);\nif(typeof x113 !== \"object\"){\n $FAIL(\"#11.3: typeof new Date(2099, 12, 1, 0, 0, 0, 0) should be 'object'\");\n}\n\nvar x114 = new Date(2099, 12, 1, 0, 0, 0, 0);\nif(x114 === undefined){\n $FAIL(\"#11.4: new Date(2099, 12, 1, 0, 0, 0, 0) should not be undefined\");\n}\n\nif (typeof new Date(2100, 0, 1, 0, 0, 0, 0) !== \"object\") {\n $FAIL(\"#12.1: typeof new Date(2100, 0, 1, 0, 0, 0, 0) should be 'object'\");\n}\n\nif (new Date(2100, 0, 1, 0, 0, 0, 0) === undefined) {\n $FAIL(\"#12.2: new Date(2100, 0, 1, 0, 0, 0, 0) should not be undefined\");\n}\n\nvar x123 = new Date(2100, 0, 1, 0, 0, 0, 0);\nif(typeof x123 !== \"object\"){\n $FAIL(\"#12.3: typeof new Date(2100, 0, 1, 0, 0, 0, 0) should be 'object'\");\n}\n\nvar x124 = new Date(2100, 0, 1, 0, 0, 0, 0);\nif(x124 === undefined){\n $FAIL(\"#12.4: new Date(2100, 0, 1, 0, 0, 0, 0) should not be undefined\");\n}\n",
+ "id": "S15.9.3.1_A1_T6"
+ },
+ {
+ "section": "15.9.3.1",
+ "description": "2 arguments, (year, month)",
+ "test": "var x11 = new Date(1899, 11);\nif (typeof x11.constructor.prototype !== \"object\") {\n $FAIL(\"#1.1: typeof x11.constructor.prototype === 'object'\");\n}\n\nvar x12 = new Date(1899, 11);\nif (!Date.prototype.isPrototypeOf(x12)) {\n $ERROR('#1.2: Date.prototype.isPrototypeOf(x12)');\n}\n\nvar x13 = new Date(1899, 11);\nif(Date.prototype !== x13.constructor.prototype){\n $FAIL(\"#1.3: Date.prototype === x13.constructor.prototype\");\n}\n\nvar x21 = new Date(1899, 12);\nif (typeof x21.constructor.prototype !== \"object\") {\n $FAIL(\"#2.1: typeof x11.constructor.prototype === 'object'\");\n}\n\nvar x22 = new Date(1899, 12);\nif (!Date.prototype.isPrototypeOf(x22)) {\n $ERROR('#2.2: Date.prototype.isPrototypeOf(x22)');\n}\n\nvar x23 = new Date(1899, 12);\nif(Date.prototype !== x23.constructor.prototype){\n $FAIL(\"#2.3: Date.prototype === x23.constructor.prototype\");\n}\n\nvar x31 = new Date(1900, 0);\nif (typeof x31.constructor.prototype !== \"object\") {\n $FAIL(\"#3.1: typeof x31.constructor.prototype === 'object'\");\n}\n\nvar x32 = new Date(1900, 0);\nif (!Date.prototype.isPrototypeOf(x32)) {\n $ERROR('#3.2: Date.prototype.isPrototypeOf(x32)');\n}\n\nvar x33 = new Date(1900, 0);\nif(Date.prototype !== x33.constructor.prototype){\n $FAIL(\"#3.3: Date.prototype === x33.constructor.prototype\");\n}\n\nvar x41 = new Date(1969, 11);\nif (typeof x41.constructor.prototype !== \"object\") {\n $FAIL(\"#4.1: typeof x41.constructor.prototype === 'object'\");\n}\n\nvar x42 = new Date(1969, 11);\nif (!Date.prototype.isPrototypeOf(x42)) {\n $ERROR('#4.2: Date.prototype.isPrototypeOf(x42)');\n}\n\nvar x43 = new Date(1969, 11);\nif(Date.prototype !== x43.constructor.prototype){\n $FAIL(\"#4.3: Date.prototype === x43.constructor.prototype\");\n}\n\nvar x51 = new Date(1969, 12);\nif (typeof x51.constructor.prototype !== \"object\") {\n $FAIL(\"#5.1: typeof x51.constructor.prototype === 'object'\");\n}\n\nvar x52 = new Date(1969, 12);\nif (!Date.prototype.isPrototypeOf(x52)) {\n $ERROR('#5.2: Date.prototype.isPrototypeOf(x52)');\n}\n\nvar x53 = new Date(1969, 12);\nif(Date.prototype !== x53.constructor.prototype){\n $FAIL(\"#5.3: Date.prototype === x53.constructor.prototype\");\n}\n\nvar x61 = new Date(1970, 0);\nif (typeof x61.constructor.prototype !== \"object\") {\n $FAIL(\"#6.1: typeof x61.constructor.prototype === 'object'\");\n}\n\nvar x62 = new Date(1970, 0);\nif (!Date.prototype.isPrototypeOf(x62)) {\n $ERROR('#6.2: Date.prototype.isPrototypeOf(x62)');\n}\n\nvar x63 = new Date(1970, 0);\nif(Date.prototype !== x63.constructor.prototype){\n $FAIL(\"#6.3: Date.prototype === x63.constructor.prototype\");\n}\n\nvar x71 = new Date(1999, 11);\nif (typeof x71.constructor.prototype !== \"object\") {\n $FAIL(\"#7.1: typeof x71.constructor.prototype === 'object'\");\n}\n\nvar x72 = new Date(1999, 11);\nif (!Date.prototype.isPrototypeOf(x72)) {\n $ERROR('#7.2: Date.prototype.isPrototypeOf(x72)');\n}\n\nvar x73 = new Date(1999, 11);\nif(Date.prototype !== x73.constructor.prototype){\n $FAIL(\"#7.3: Date.prototype === x73.constructor.prototype\");\n}\n\nvar x81 = new Date(1999, 12);\nif (typeof x81.constructor.prototype !== \"object\") {\n $FAIL(\"#8.1: typeof x81.constructor.prototype === 'object'\");\n}\n\nvar x82 = new Date(1999, 12);\nif (!Date.prototype.isPrototypeOf(x82)) {\n $ERROR('#8.2: Date.prototype.isPrototypeOf(x82)');\n}\n\nvar x83 = new Date(1999, 12);\nif(Date.prototype !== x83.constructor.prototype){\n $FAIL(\"#8.3: Date.prototype === x83.constructor.prototype\");\n}\n\nvar x91 = new Date(2000, 0);\nif (typeof x91.constructor.prototype !== \"object\") {\n $FAIL(\"#9.1: typeof x91.constructor.prototype === 'object'\");\n}\n\nvar x92 = new Date(2000, 0);\nif (!Date.prototype.isPrototypeOf(x92)) {\n $ERROR('#9.2: Date.prototype.isPrototypeOf(x92)');\n}\n\nvar x93 = new Date(2000, 0);\nif(Date.prototype !== x93.constructor.prototype){\n $FAIL(\"#9.3: Date.prototype === x93.constructor.prototype\");\n}\n\nvar x101 = new Date(2099, 11);\nif (typeof x101.constructor.prototype !== \"object\") {\n $FAIL(\"#10.1: typeof x101.constructor.prototype === 'object'\");\n}\n\nvar x102 = new Date(2099, 11);\nif (!Date.prototype.isPrototypeOf(x102)) {\n $ERROR('#10.2: Date.prototype.isPrototypeOf(x102)');\n}\n\nvar x103 = new Date(2099, 11);\nif(Date.prototype !== x103.constructor.prototype){\n $FAIL(\"#10.3: Date.prototype === x103.constructor.prototype\");\n}\n\nvar x111 = new Date(2099, 12);\nif (typeof x111.constructor.prototype !== \"object\") {\n $FAIL(\"#11.1: typeof x111.constructor.prototype === 'object'\");\n}\n\nvar x112 = new Date(2099, 12);\nif (!Date.prototype.isPrototypeOf(x112)) {\n $ERROR('#11.2: Date.prototype.isPrototypeOf(x112)');\n}\n\nvar x113 = new Date(2099, 12);\nif(Date.prototype !== x113.constructor.prototype){\n $FAIL(\"#11.3: Date.prototype === x113.constructor.prototype\");\n}\n\nvar x121 = new Date(2100, 0);\nif (typeof x121.constructor.prototype !== \"object\") {\n $FAIL(\"#12.1: typeof x121.constructor.prototype === 'object'\");\n}\n\nvar x122 = new Date(2100, 0);\nif (!Date.prototype.isPrototypeOf(x122)) {\n $ERROR('#12.2: Date.prototype.isPrototypeOf(x122)');\n}\n\nvar x123 = new Date(2100, 0);\nif(Date.prototype !== x123.constructor.prototype){\n $FAIL(\"#12.3: Date.prototype === x123.constructor.prototype\");\n}\n",
+ "id": "S15.9.3.1_A2_T1"
+ },
+ {
+ "section": "15.9.3.1",
+ "description": "3 arguments, (year, month, date)",
+ "test": "var x11 = new Date(1899, 11, 31);\nif (typeof x11.constructor.prototype !== \"object\") {\n $FAIL(\"#1.1: typeof x11.constructor.prototype === 'object'\");\n}\n\nvar x12 = new Date(1899, 11, 31);\nif (!Date.prototype.isPrototypeOf(x12)) {\n $ERROR('#1.2: Date.prototype.isPrototypeOf(x12)');\n}\n\nvar x13 = new Date(1899, 11, 31);\nif(Date.prototype !== x13.constructor.prototype){\n $FAIL(\"#1.3: Date.prototype === x13.constructor.prototype\");\n}\n\nvar x21 = new Date(1899, 12, 1);\nif (typeof x21.constructor.prototype !== \"object\") {\n $FAIL(\"#2.1: typeof x21.constructor.prototype === 'object'\");\n}\n\nvar x22 = new Date(1899, 12, 1);\nif (!Date.prototype.isPrototypeOf(x22)) {\n $ERROR('#2.2: Date.prototype.isPrototypeOf(x22)');\n}\n\nvar x23 = new Date(1899, 12, 1);\nif(Date.prototype !== x23.constructor.prototype){\n $FAIL(\"#2.3: Date.prototype === x23.constructor.prototype\");\n}\n\nvar x31 = new Date(1900, 0, 1);\nif (typeof x31.constructor.prototype !== \"object\") {\n $FAIL(\"#3.1: typeof x31.constructor.prototype === 'object'\");\n}\n\nvar x32 = new Date(1900, 0, 1);\nif (!Date.prototype.isPrototypeOf(x32)) {\n $ERROR('#3.2: Date.prototype.isPrototypeOf(x32)');\n}\n\nvar x33 = new Date(1900, 0, 1);\nif(Date.prototype !== x33.constructor.prototype){\n $FAIL(\"#3.3: Date.prototype === x33.constructor.prototype\");\n}\n\nvar x41 = new Date(1969, 11, 31);\nif (typeof x41.constructor.prototype !== \"object\") {\n $FAIL(\"#4.1: typeof x41.constructor.prototype === 'object'\");\n}\n\nvar x42 = new Date(1969, 11, 31);\nif (!Date.prototype.isPrototypeOf(x42)) {\n $ERROR('#4.2: Date.prototype.isPrototypeOf(x42)');\n}\n\nvar x43 = new Date(1969, 11, 31);\nif(Date.prototype !== x43.constructor.prototype){\n $FAIL(\"#4.3: Date.prototype === x43.constructor.prototype\");\n}\n\nvar x51 = new Date(1969, 12, 1);\nif (typeof x51.constructor.prototype !== \"object\") {\n $FAIL(\"#5.1: typeof x51.constructor.prototype === 'object'\");\n}\n\nvar x52 = new Date(1969, 12, 1);\nif (!Date.prototype.isPrototypeOf(x52)) {\n $ERROR('#5.2: Date.prototype.isPrototypeOf(x52)');\n}\n\nvar x53 = new Date(1969, 12, 1);\nif(Date.prototype !== x53.constructor.prototype){\n $FAIL(\"#5.3: Date.prototype === x53.constructor.prototype\");\n}\n\nvar x61 = new Date(1970, 0, 1);\nif (typeof x61.constructor.prototype !== \"object\") {\n $FAIL(\"#6.1: typeof x61.constructor.prototype === 'object'\");\n}\n\nvar x62 = new Date(1970, 0, 1);\nif (!Date.prototype.isPrototypeOf(x62)) {\n $ERROR('#6.2: Date.prototype.isPrototypeOf(x62)');\n}\n\nvar x63 = new Date(1970, 0, 1);\nif(Date.prototype !== x63.constructor.prototype){\n $FAIL(\"#6.3: Date.prototype === x63.constructor.prototype\");\n}\n\nvar x71 = new Date(1999, 11, 31);\nif (typeof x71.constructor.prototype !== \"object\") {\n $FAIL(\"#7.1: typeof x71.constructor.prototype === 'object'\");\n}\n\nvar x72 = new Date(1999, 11, 31);\nif (!Date.prototype.isPrototypeOf(x72)) {\n $ERROR('#7.2: Date.prototype.isPrototypeOf(x72)');\n}\n\nvar x73 = new Date(1999, 11, 31);\nif(Date.prototype !== x73.constructor.prototype){\n $FAIL(\"#7.3: Date.prototype === x73.constructor.prototype\");\n}\n\nvar x81 = new Date(1999, 12, 1);\nif (typeof x81.constructor.prototype !== \"object\") {\n $FAIL(\"#8.1: typeof x81.constructor.prototype === 'object'\");\n}\n\nvar x82 = new Date(1999, 12, 1);\nif (!Date.prototype.isPrototypeOf(x82)) {\n $ERROR('#8.2: Date.prototype.isPrototypeOf(x82)');\n}\n\nvar x83 = new Date(1999, 12, 1);\nif(Date.prototype !== x83.constructor.prototype){\n $FAIL(\"#8.3: Date.prototype === x83.constructor.prototype\");\n}\n\nvar x91 = new Date(2000, 0, 1);\nif (typeof x91.constructor.prototype !== \"object\") {\n $FAIL(\"#9.1: typeof x91.constructor.prototype === 'object'\");\n}\n\nvar x92 = new Date(2000, 0, 1);\nif (!Date.prototype.isPrototypeOf(x92)) {\n $ERROR('#9.2: Date.prototype.isPrototypeOf(x92)');\n}\n\nvar x93 = new Date(2000, 0, 1);\nif(Date.prototype !== x93.constructor.prototype){\n $FAIL(\"#9.3: Date.prototype === x93.constructor.prototype\");\n}\n\nvar x101 = new Date(2099, 11, 31);\nif (typeof x101.constructor.prototype !== \"object\") {\n $FAIL(\"#10.1: typeof x101.constructor.prototype === 'object'\");\n}\n\nvar x102 = new Date(2099, 11, 31);\nif (!Date.prototype.isPrototypeOf(x102)) {\n $ERROR('#10.2: Date.prototype.isPrototypeOf(x102)');\n}\n\nvar x103 = new Date(2099, 11, 31);\nif(Date.prototype !== x103.constructor.prototype){\n $FAIL(\"#10.3: Date.prototype === x103.constructor.prototype\");\n}\n\nvar x111 = new Date(2099, 12, 1);\nif (typeof x111.constructor.prototype !== \"object\") {\n $FAIL(\"#11.1: typeof x111.constructor.prototype === 'object'\");\n}\n\nvar x112 = new Date(2099, 12, 1);\nif (!Date.prototype.isPrototypeOf(x112)) {\n $ERROR('#11.2: Date.prototype.isPrototypeOf(x112)');\n}\n\nvar x113 = new Date(2099, 12, 1);\nif(Date.prototype !== x113.constructor.prototype){\n $FAIL(\"#11.3: Date.prototype === x113.constructor.prototype\");\n}\n\nvar x121 = new Date(2100, 0, 1);\nif (typeof x121.constructor.prototype !== \"object\") {\n $FAIL(\"#12.1: typeof x121.constructor.prototype === 'object'\");\n}\n\nvar x122 = new Date(2100, 0, 1);\nif (!Date.prototype.isPrototypeOf(x122)) {\n $ERROR('#12.2: Date.prototype.isPrototypeOf(x122)');\n}\n\nvar x123 = new Date(2100, 0, 1);\nif(Date.prototype !== x123.constructor.prototype){\n $FAIL(\"#12.3: Date.prototype === x123.constructor.prototype\");\n}\n",
+ "id": "S15.9.3.1_A2_T2"
+ },
+ {
+ "section": "15.9.3.1",
+ "description": "4 arguments, (year, month, date, hours)",
+ "test": "var x11 = new Date(1899, 11, 31, 23);\nif (typeof x11.constructor.prototype !== \"object\") {\n $FAIL(\"#1.1: typeof x11.constructor.prototype === 'object'\");\n}\n\nvar x12 = new Date(1899, 11, 31, 23);\nif (!Date.prototype.isPrototypeOf(x12)) {\n $ERROR('#1.2: Date.prototype.isPrototypeOf(x12)');\n}\n\nvar x13 = new Date(1899, 11, 31, 23);\nif(Date.prototype !== x13.constructor.prototype){\n $FAIL(\"#1.3: Date.prototype === x13.constructor.prototype\");\n}\n\nvar x21 = new Date(1899, 12, 1, 0);\nif (typeof x21.constructor.prototype !== \"object\") {\n $FAIL(\"#2.1: typeof x21.constructor.prototype === 'object'\");\n}\n\nvar x22 = new Date(1899, 12, 1, 0);\nif (!Date.prototype.isPrototypeOf(x22)) {\n $ERROR('#2.2: Date.prototype.isPrototypeOf(x22)');\n}\n\nvar x23 = new Date(1899, 12, 1, 0);\nif(Date.prototype !== x23.constructor.prototype){\n $FAIL(\"#2.3: Date.prototype === x23.constructor.prototype\");\n}\n\nvar x31 = new Date(1900, 0, 1, 0);\nif (typeof x31.constructor.prototype !== \"object\") {\n $FAIL(\"#3.1: typeof x31.constructor.prototype === 'object'\");\n}\n\nvar x32 = new Date(1900, 0, 1, 0);\nif (!Date.prototype.isPrototypeOf(x32)) {\n $ERROR('#3.2: Date.prototype.isPrototypeOf(x32)');\n}\n\nvar x33 = new Date(1900, 0, 1, 0);\nif(Date.prototype !== x33.constructor.prototype){\n $FAIL(\"#3.3: Date.prototype === x33.constructor.prototype\");\n}\n\nvar x41 = new Date(1969, 11, 31, 23);\nif (typeof x41.constructor.prototype !== \"object\") {\n $FAIL(\"#4.1: typeof x41.constructor.prototype === 'object'\");\n}\n\nvar x42 = new Date(1969, 11, 31, 23);\nif (!Date.prototype.isPrototypeOf(x42)) {\n $ERROR('#4.2: Date.prototype.isPrototypeOf(x42)');\n}\n\nvar x43 = new Date(1969, 11, 31, 23);\nif(Date.prototype !== x43.constructor.prototype){\n $FAIL(\"#4.3: Date.prototype === x43.constructor.prototype\");\n}\n\nvar x51 = new Date(1969, 12, 1, 0);\nif (typeof x51.constructor.prototype !== \"object\") {\n $FAIL(\"#5.1: typeof x51.constructor.prototype === 'object'\");\n}\n\nvar x52 = new Date(1969, 12, 1, 0);\nif (!Date.prototype.isPrototypeOf(x52)) {\n $ERROR('#5.2: Date.prototype.isPrototypeOf(x52)');\n}\n\nvar x53 = new Date(1969, 12, 1, 0);\nif(Date.prototype !== x53.constructor.prototype){\n $FAIL(\"#5.3: Date.prototype === x53.constructor.prototype\");\n}\n\nvar x61 = new Date(1970, 0, 1, 0);\nif (typeof x61.constructor.prototype !== \"object\") {\n $FAIL(\"#6.1: typeof x61.constructor.prototype === 'object'\");\n}\n\nvar x62 = new Date(1970, 0, 1, 0);\nif (!Date.prototype.isPrototypeOf(x62)) {\n $ERROR('#6.2: Date.prototype.isPrototypeOf(x62)');\n}\n\nvar x63 = new Date(1970, 0, 1, 0);\nif(Date.prototype !== x63.constructor.prototype){\n $FAIL(\"#6.3: Date.prototype === x63.constructor.prototype\");\n}\n\nvar x71 = new Date(1999, 11, 31, 23);\nif (typeof x71.constructor.prototype !== \"object\") {\n $FAIL(\"#7.1: typeof x71.constructor.prototype === 'object'\");\n}\n\nvar x72 = new Date(1999, 11, 31, 23);\nif (!Date.prototype.isPrototypeOf(x72)) {\n $ERROR('#7.2: Date.prototype.isPrototypeOf(x72)');\n}\n\nvar x73 = new Date(1999, 11, 31, 23);\nif(Date.prototype !== x73.constructor.prototype){\n $FAIL(\"#7.3: Date.prototype === x73.constructor.prototype\");\n}\n\nvar x81 = new Date(1999, 12, 1, 0);\nif (typeof x81.constructor.prototype !== \"object\") {\n $FAIL(\"#8.1: typeof x81.constructor.prototype === 'object'\");\n}\n\nvar x82 = new Date(1999, 12, 1, 0);\nif (!Date.prototype.isPrototypeOf(x82)) {\n $ERROR('#8.2: Date.prototype.isPrototypeOf(x82)');\n}\n\nvar x83 = new Date(1999, 12, 1, 0);\nif(Date.prototype !== x83.constructor.prototype){\n $FAIL(\"#8.3: Date.prototype === x83.constructor.prototype\");\n}\n\nvar x91 = new Date(2000, 0, 1, 0);\nif (typeof x91.constructor.prototype !== \"object\") {\n $FAIL(\"#9.1: typeof x91.constructor.prototype === 'object'\");\n}\n\nvar x92 = new Date(2000, 0, 1, 0);\nif (!Date.prototype.isPrototypeOf(x92)) {\n $ERROR('#9.2: Date.prototype.isPrototypeOf(x92)');\n}\n\nvar x93 = new Date(2000, 0, 1, 0);\nif(Date.prototype !== x93.constructor.prototype){\n $FAIL(\"#9.3: Date.prototype === x93.constructor.prototype\");\n}\n\nvar x101 = new Date(2099, 11, 31, 23);\nif (typeof x101.constructor.prototype !== \"object\") {\n $FAIL(\"#10.1: typeof x101.constructor.prototype === 'object'\");\n}\n\nvar x102 = new Date(2099, 11, 31, 23);\nif (!Date.prototype.isPrototypeOf(x102)) {\n $ERROR('#10.2: Date.prototype.isPrototypeOf(x102)');\n}\n\nvar x103 = new Date(2099, 11, 31, 23);\nif(Date.prototype !== x103.constructor.prototype){\n $FAIL(\"#10.3: Date.prototype === x103.constructor.prototype\");\n}\n\nvar x111 = new Date(2099, 12, 1, 0);\nif (typeof x111.constructor.prototype !== \"object\") {\n $FAIL(\"#11.1: typeof x111.constructor.prototype === 'object'\");\n}\n\nvar x112 = new Date(2099, 12, 1, 0);\nif (!Date.prototype.isPrototypeOf(x112)) {\n $ERROR('#11.2: Date.prototype.isPrototypeOf(x112)');\n}\n\nvar x113 = new Date(2099, 12, 1, 0);\nif(Date.prototype !== x113.constructor.prototype){\n $FAIL(\"#11.3: Date.prototype === x113.constructor.prototype\");\n}\n\nvar x121 = new Date(2100, 0, 1, 0);\nif (typeof x121.constructor.prototype !== \"object\") {\n $FAIL(\"#12.1: typeof x121.constructor.prototype === 'object'\");\n}\n\nvar x122 = new Date(2100, 0, 1, 0);\nif (!Date.prototype.isPrototypeOf(x122)) {\n $ERROR('#12.2: Date.prototype.isPrototypeOf(x122)');\n}\n\nvar x123 = new Date(2100, 0, 1, 0);\nif(Date.prototype !== x123.constructor.prototype){\n $FAIL(\"#12.3: Date.prototype === x123.constructor.prototype\");\n}\n",
+ "id": "S15.9.3.1_A2_T3"
+ },
+ {
+ "section": "15.9.3.1",
+ "description": "5 arguments, (year, month, date, hours, minutes)",
+ "test": "var x11 = new Date(1899, 11, 31, 23, 59);\nif (typeof x11.constructor.prototype !== \"object\") {\n $FAIL(\"#1.1: typeof x11.constructor.prototype === 'object'\");\n}\n\nvar x12 = new Date(1899, 11, 31, 23, 59);\nif (!Date.prototype.isPrototypeOf(x12)) {\n $ERROR('#1.2: Date.prototype.isPrototypeOf(x12)');\n}\n\nvar x13 = new Date(1899, 11, 31, 23, 59);\nif(Date.prototype !== x13.constructor.prototype){\n $FAIL(\"#1.3: Date.prototype === x13.constructor.prototype\");\n}\n\nvar x21 = new Date(1899, 12, 1, 0, 0);\nif (typeof x21.constructor.prototype !== \"object\") {\n $FAIL(\"#2.1: typeof x21.constructor.prototype === 'object'\");\n}\n\nvar x22 = new Date(1899, 12, 1, 0, 0);\nif (!Date.prototype.isPrototypeOf(x22)) {\n $ERROR('#2.2: Date.prototype.isPrototypeOf(x22)');\n}\n\nvar x23 = new Date(1899, 12, 1, 0, 0);\nif(Date.prototype !== x23.constructor.prototype){\n $FAIL(\"#2.3: Date.prototype === x23.constructor.prototype\");\n}\n\nvar x31 = new Date(1900, 0, 1, 0, 0);\nif (typeof x31.constructor.prototype !== \"object\") {\n $FAIL(\"#3.1: typeof x31.constructor.prototype === 'object'\");\n}\n\nvar x32 = new Date(1900, 0, 1, 0, 0);\nif (!Date.prototype.isPrototypeOf(x32)) {\n $ERROR('#3.2: Date.prototype.isPrototypeOf(x32)');\n}\n\nvar x33 = new Date(1900, 0, 1, 0, 0);\nif(Date.prototype !== x33.constructor.prototype){\n $FAIL(\"#3.3: Date.prototype === x33.constructor.prototype\");\n}\n\nvar x41 = new Date(1969, 11, 31, 23, 59);\nif (typeof x41.constructor.prototype !== \"object\") {\n $FAIL(\"#4.1: typeof x41.constructor.prototype === 'object'\");\n}\n\nvar x42 = new Date(1969, 11, 31, 23, 59);\nif (!Date.prototype.isPrototypeOf(x42)) {\n $ERROR('#4.2: Date.prototype.isPrototypeOf(x42)');\n}\n\nvar x43 = new Date(1969, 11, 31, 23, 59);\nif(Date.prototype !== x43.constructor.prototype){\n $FAIL(\"#4.3: Date.prototype === x43.constructor.prototype\");\n}\n\nvar x51 = new Date(1969, 12, 1, 0, 0);\nif (typeof x51.constructor.prototype !== \"object\") {\n $FAIL(\"#5.1: typeof x51.constructor.prototype === 'object'\");\n}\n\nvar x52 = new Date(1969, 12, 1, 0, 0);\nif (!Date.prototype.isPrototypeOf(x52)) {\n $ERROR('#5.2: Date.prototype.isPrototypeOf(x52)');\n}\n\nvar x53 = new Date(1969, 12, 1, 0, 0);\nif(Date.prototype !== x53.constructor.prototype){\n $FAIL(\"#5.3: Date.prototype === x53.constructor.prototype\");\n}\n\nvar x61 = new Date(1970, 0, 1, 0, 0);\nif (typeof x61.constructor.prototype !== \"object\") {\n $FAIL(\"#6.1: typeof x61.constructor.prototype === 'object'\");\n}\n\nvar x62 = new Date(1970, 0, 1, 0, 0);\nif (!Date.prototype.isPrototypeOf(x62)) {\n $ERROR('#6.2: Date.prototype.isPrototypeOf(x62)');\n}\n\nvar x63 = new Date(1970, 0, 1, 0, 0);\nif(Date.prototype !== x63.constructor.prototype){\n $FAIL(\"#6.3: Date.prototype === x63.constructor.prototype\");\n}\n\nvar x71 = new Date(1999, 11, 31, 23, 59);\nif (typeof x71.constructor.prototype !== \"object\") {\n $FAIL(\"#7.1: typeof x71.constructor.prototype === 'object'\");\n}\n\nvar x72 = new Date(1999, 11, 31, 23, 59);\nif (!Date.prototype.isPrototypeOf(x72)) {\n $ERROR('#7.2: Date.prototype.isPrototypeOf(x72)');\n}\n\nvar x73 = new Date(1999, 11, 31, 23, 59);\nif(Date.prototype !== x73.constructor.prototype){\n $FAIL(\"#7.3: Date.prototype === x73.constructor.prototype\");\n}\n\nvar x81 = new Date(1999, 12, 1, 0, 0);\nif (typeof x81.constructor.prototype !== \"object\") {\n $FAIL(\"#8.1: typeof x81.constructor.prototype === 'object'\");\n}\n\nvar x82 = new Date(1999, 12, 1, 0, 0);\nif (!Date.prototype.isPrototypeOf(x82)) {\n $ERROR('#8.2: Date.prototype.isPrototypeOf(x82)');\n}\n\nvar x83 = new Date(1999, 12, 1, 0, 0);\nif(Date.prototype !== x83.constructor.prototype){\n $FAIL(\"#8.3: Date.prototype === x83.constructor.prototype\");\n}\n\nvar x91 = new Date(2000, 0, 1, 0, 0);\nif (typeof x91.constructor.prototype !== \"object\") {\n $FAIL(\"#9.1: typeof x91.constructor.prototype === 'object'\");\n}\n\nvar x92 = new Date(2000, 0, 1, 0, 0);\nif (!Date.prototype.isPrototypeOf(x92)) {\n $ERROR('#9.2: Date.prototype.isPrototypeOf(x92)');\n}\n\nvar x93 = new Date(2000, 0, 1, 0, 0);\nif(Date.prototype !== x93.constructor.prototype){\n $FAIL(\"#9.3: Date.prototype === x93.constructor.prototype\");\n}\n\nvar x101 = new Date(2099, 11, 31, 23, 59);\nif (typeof x101.constructor.prototype !== \"object\") {\n $FAIL(\"#10.1: typeof x101.constructor.prototype === 'object'\");\n}\n\nvar x102 = new Date(2099, 11, 31, 23, 59);\nif (!Date.prototype.isPrototypeOf(x102)) {\n $ERROR('#10.2: Date.prototype.isPrototypeOf(x102)');\n}\n\nvar x103 = new Date(2099, 11, 31, 23, 59);\nif(Date.prototype !== x103.constructor.prototype){\n $FAIL(\"#10.3: Date.prototype === x103.constructor.prototype\");\n}\n\nvar x111 = new Date(2099, 12, 1, 0, 0);\nif (typeof x111.constructor.prototype !== \"object\") {\n $FAIL(\"#11.1: typeof x111.constructor.prototype === 'object'\");\n}\n\nvar x112 = new Date(2099, 12, 1, 0, 0);\nif (!Date.prototype.isPrototypeOf(x112)) {\n $ERROR('#11.2: Date.prototype.isPrototypeOf(x112)');\n}\n\nvar x113 = new Date(2099, 12, 1, 0, 0);\nif(Date.prototype !== x113.constructor.prototype){\n $FAIL(\"#11.3: Date.prototype === x113.constructor.prototype\");\n}\n\nvar x121 = new Date(2100, 0, 1, 0, 0);\nif (typeof x121.constructor.prototype !== \"object\") {\n $FAIL(\"#12.1: typeof x121.constructor.prototype === 'object'\");\n}\n\nvar x122 = new Date(2100, 0, 1, 0, 0);\nif (!Date.prototype.isPrototypeOf(x122)) {\n $ERROR('#12.2: Date.prototype.isPrototypeOf(x122)');\n}\n\nvar x123 = new Date(2100, 0, 1, 0, 0);\nif(Date.prototype !== x123.constructor.prototype){\n $FAIL(\"#12.3: Date.prototype === x123.constructor.prototype\");\n}\n",
+ "id": "S15.9.3.1_A2_T4"
+ },
+ {
+ "section": "15.9.3.1",
+ "description": "6 arguments, (year, month, date, hours, minutes, seconds)",
+ "test": "var x11 = new Date(1899, 11, 31, 23, 59, 59);\nif (typeof x11.constructor.prototype !== \"object\") {\n $FAIL(\"#1.1: typeof x11.constructor.prototype === 'object'\");\n}\n\nvar x12 = new Date(1899, 11, 31, 23, 59, 59);\nif (!Date.prototype.isPrototypeOf(x12)) {\n $ERROR('#1.2: Date.prototype.isPrototypeOf(x12)');\n}\n\nvar x13 = new Date(1899, 11, 31, 23, 59, 59);\nif(Date.prototype !== x13.constructor.prototype){\n $FAIL(\"#1.3: Date.prototype === x13.constructor.prototype\");\n}\n\nvar x21 = new Date(1899, 12, 1, 0, 0, 0);\nif (typeof x21.constructor.prototype !== \"object\") {\n $FAIL(\"#2.1: typeof x21.constructor.prototype === 'object'\");\n}\n\nvar x22 = new Date(1899, 12, 1, 0, 0, 0);\nif (!Date.prototype.isPrototypeOf(x22)) {\n $ERROR('#2.2: Date.prototype.isPrototypeOf(x22)');\n}\n\nvar x23 = new Date(1899, 12, 1, 0, 0, 0);\nif(Date.prototype !== x23.constructor.prototype){\n $FAIL(\"#2.3: Date.prototype === x23.constructor.prototype\");\n}\n\nvar x31 = new Date(1900, 0, 1, 0, 0, 0);\nif (typeof x31.constructor.prototype !== \"object\") {\n $FAIL(\"#3.1: typeof x31.constructor.prototype === 'object'\");\n}\n\nvar x32 = new Date(1900, 0, 1, 0, 0, 0);\nif (!Date.prototype.isPrototypeOf(x32)) {\n $ERROR('#3.2: Date.prototype.isPrototypeOf(x32)');\n}\n\nvar x33 = new Date(1900, 0, 1, 0, 0, 0);\nif(Date.prototype !== x33.constructor.prototype){\n $FAIL(\"#3.3: Date.prototype === x33.constructor.prototype\");\n}\n\nvar x41 = new Date(1969, 11, 31, 23, 59, 59);\nif (typeof x41.constructor.prototype !== \"object\") {\n $FAIL(\"#4.1: typeof x41.constructor.prototype === 'object'\");\n}\n\nvar x42 = new Date(1969, 11, 31, 23, 59, 59);\nif (!Date.prototype.isPrototypeOf(x42)) {\n $ERROR('#4.2: Date.prototype.isPrototypeOf(x42)');\n}\n\nvar x43 = new Date(1969, 11, 31, 23, 59, 59);\nif(Date.prototype !== x43.constructor.prototype){\n $FAIL(\"#4.3: Date.prototype === x43.constructor.prototype\");\n}\n\nvar x51 = new Date(1969, 12, 1, 0, 0, 0);\nif (typeof x51.constructor.prototype !== \"object\") {\n $FAIL(\"#5.1: typeof x51.constructor.prototype === 'object'\");\n}\n\nvar x52 = new Date(1969, 12, 1, 0, 0, 0);\nif (!Date.prototype.isPrototypeOf(x52)) {\n $ERROR('#5.2: Date.prototype.isPrototypeOf(x52)');\n}\n\nvar x53 = new Date(1969, 12, 1, 0, 0, 0);\nif(Date.prototype !== x53.constructor.prototype){\n $FAIL(\"#5.3: Date.prototype === x53.constructor.prototype\");\n}\n\nvar x61 = new Date(1970, 0, 1, 0, 0, 0);\nif (typeof x61.constructor.prototype !== \"object\") {\n $FAIL(\"#6.1: typeof x61.constructor.prototype === 'object'\");\n}\n\nvar x62 = new Date(1970, 0, 1, 0, 0, 0);\nif (!Date.prototype.isPrototypeOf(x62)) {\n $ERROR('#6.2: Date.prototype.isPrototypeOf(x62)');\n}\n\nvar x63 = new Date(1970, 0, 1, 0, 0, 0);\nif(Date.prototype !== x63.constructor.prototype){\n $FAIL(\"#6.3: Date.prototype === x63.constructor.prototype\");\n}\n\nvar x71 = new Date(1999, 11, 31, 23, 59, 59);\nif (typeof x71.constructor.prototype !== \"object\") {\n $FAIL(\"#7.1: typeof x71.constructor.prototype === 'object'\");\n}\n\nvar x72 = new Date(1999, 11, 31, 23, 59, 59);\nif (!Date.prototype.isPrototypeOf(x72)) {\n $ERROR('#7.2: Date.prototype.isPrototypeOf(x72)');\n}\n\nvar x73 = new Date(1999, 11, 31, 23, 59, 59);\nif(Date.prototype !== x73.constructor.prototype){\n $FAIL(\"#7.3: Date.prototype === x73.constructor.prototype\");\n}\n\nvar x81 = new Date(1999, 12, 1, 0, 0, 0);\nif (typeof x81.constructor.prototype !== \"object\") {\n $FAIL(\"#8.1: typeof x81.constructor.prototype === 'object'\");\n}\n\nvar x82 = new Date(1999, 12, 1, 0, 0, 0);\nif (!Date.prototype.isPrototypeOf(x82)) {\n $ERROR('#8.2: Date.prototype.isPrototypeOf(x82)');\n}\n\nvar x83 = new Date(1999, 12, 1, 0, 0, 0);\nif(Date.prototype !== x83.constructor.prototype){\n $FAIL(\"#8.3: Date.prototype === x83.constructor.prototype\");\n}\n\nvar x91 = new Date(2000, 0, 1, 0, 0, 0);\nif (typeof x91.constructor.prototype !== \"object\") {\n $FAIL(\"#9.1: typeof x91.constructor.prototype === 'object'\");\n}\n\nvar x92 = new Date(2000, 0, 1, 0, 0, 0);\nif (!Date.prototype.isPrototypeOf(x92)) {\n $ERROR('#9.2: Date.prototype.isPrototypeOf(x92)');\n}\n\nvar x93 = new Date(2000, 0, 1, 0, 0, 0);\nif(Date.prototype !== x93.constructor.prototype){\n $FAIL(\"#9.3: Date.prototype === x93.constructor.prototype\");\n}\n\nvar x101 = new Date(2099, 11, 31, 23, 59, 59);\nif (typeof x101.constructor.prototype !== \"object\") {\n $FAIL(\"#10.1: typeof x101.constructor.prototype === 'object'\");\n}\n\nvar x102 = new Date(2099, 11, 31, 23, 59, 59);\nif (!Date.prototype.isPrototypeOf(x102)) {\n $ERROR('#10.2: Date.prototype.isPrototypeOf(x102)');\n}\n\nvar x103 = new Date(2099, 11, 31, 23, 59, 59);\nif(Date.prototype !== x103.constructor.prototype){\n $FAIL(\"#10.3: Date.prototype === x103.constructor.prototype\");\n}\n\nvar x111 = new Date(2099, 12, 1, 0, 0, 0);\nif (typeof x111.constructor.prototype !== \"object\") {\n $FAIL(\"#11.1: typeof x111.constructor.prototype === 'object'\");\n}\n\nvar x112 = new Date(2099, 12, 1, 0, 0, 0);\nif (!Date.prototype.isPrototypeOf(x112)) {\n $ERROR('#11.2: Date.prototype.isPrototypeOf(x112)');\n}\n\nvar x113 = new Date(2099, 12, 1, 0, 0, 0);\nif(Date.prototype !== x113.constructor.prototype){\n $FAIL(\"#11.3: Date.prototype === x113.constructor.prototype\");\n}\n\nvar x121 = new Date(2100, 0, 1, 0, 0, 0);\nif (typeof x121.constructor.prototype !== \"object\") {\n $FAIL(\"#12.1: typeof x121.constructor.prototype === 'object'\");\n}\n\nvar x122 = new Date(2100, 0, 1, 0, 0, 0);\nif (!Date.prototype.isPrototypeOf(x122)) {\n $ERROR('#12.2: Date.prototype.isPrototypeOf(x122)');\n}\n\nvar x123 = new Date(2100, 0, 1, 0, 0, 0);\nif(Date.prototype !== x123.constructor.prototype){\n $FAIL(\"#12.3: Date.prototype === x123.constructor.prototype\");\n}\n",
+ "id": "S15.9.3.1_A2_T5"
+ },
+ {
+ "section": "15.9.3.1",
+ "description": "7 arguments, (year, month, date, hours, minutes, seconds, ms)",
+ "test": "var x11 = new Date(1899, 11, 31, 23, 59, 59, 999);\nif (typeof x11.constructor.prototype !== \"object\") {\n $FAIL(\"#1.1: typeof x11.constructor.prototype === 'object'\");\n}\n\nvar x12 = new Date(1899, 11, 31, 23, 59, 59, 999);\nif (!Date.prototype.isPrototypeOf(x12)) {\n $ERROR('#1.2: Date.prototype.isPrototypeOf(x12)');\n}\n\nvar x13 = new Date(1899, 11, 31, 23, 59, 59, 999);\nif(Date.prototype !== x13.constructor.prototype){\n $FAIL(\"#1.3: Date.prototype === x13.constructor.prototype\");\n}\n\nvar x21 = new Date(1899, 12, 1, 0, 0, 0, 0);\nif (typeof x21.constructor.prototype !== \"object\") {\n $FAIL(\"#2.1: typeof x21.constructor.prototype === 'object'\");\n}\n\nvar x22 = new Date(1899, 12, 1, 0, 0, 0, 0);\nif (!Date.prototype.isPrototypeOf(x22)) {\n $ERROR('#2.2: Date.prototype.isPrototypeOf(x22)');\n}\n\nvar x23 = new Date(1899, 12, 1, 0, 0, 0, 0);\nif(Date.prototype !== x23.constructor.prototype){\n $FAIL(\"#2.3: Date.prototype === x23.constructor.prototype\");\n}\n\nvar x31 = new Date(1900, 0, 1, 0, 0, 0, 0);\nif (typeof x31.constructor.prototype !== \"object\") {\n $FAIL(\"#3.1: typeof x31.constructor.prototype === 'object'\");\n}\n\nvar x32 = new Date(1900, 0, 1, 0, 0, 0, 0);\nif (!Date.prototype.isPrototypeOf(x32)) {\n $ERROR('#3.2: Date.prototype.isPrototypeOf(x32)');\n}\n\nvar x33 = new Date(1900, 0, 1, 0, 0, 0, 0);\nif(Date.prototype !== x33.constructor.prototype){\n $FAIL(\"#3.3: Date.prototype === x33.constructor.prototype\");\n}\n\nvar x41 = new Date(1969, 11, 31, 23, 59, 59, 999);\nif (typeof x41.constructor.prototype !== \"object\") {\n $FAIL(\"#4.1: typeof x41.constructor.prototype === 'object'\");\n}\n\nvar x42 = new Date(1969, 11, 31, 23, 59, 59, 999);\nif (!Date.prototype.isPrototypeOf(x42)) {\n $ERROR('#4.2: Date.prototype.isPrototypeOf(x42)');\n}\n\nvar x43 = new Date(1969, 11, 31, 23, 59, 59, 999);\nif(Date.prototype !== x43.constructor.prototype){\n $FAIL(\"#4.3: Date.prototype === x43.constructor.prototype\");\n}\n\nvar x51 = new Date(1969, 12, 1, 0, 0, 0, 0);\nif (typeof x51.constructor.prototype !== \"object\") {\n $FAIL(\"#5.1: typeof x51.constructor.prototype === 'object'\");\n}\n\nvar x52 = new Date(1969, 12, 1, 0, 0, 0, 0);\nif (!Date.prototype.isPrototypeOf(x52)) {\n $ERROR('#5.2: Date.prototype.isPrototypeOf(x52)');\n}\n\nvar x53 = new Date(1969, 12, 1, 0, 0, 0, 0);\nif(Date.prototype !== x53.constructor.prototype){\n $FAIL(\"#5.3: Date.prototype === x53.constructor.prototype\");\n}\n\nvar x61 = new Date(1970, 0, 1, 0, 0, 0, 0);\nif (typeof x61.constructor.prototype !== \"object\") {\n $FAIL(\"#6.1: typeof x61.constructor.prototype === 'object'\");\n}\n\nvar x62 = new Date(1970, 0, 1, 0, 0, 0, 0);\nif (!Date.prototype.isPrototypeOf(x62)) {\n $ERROR('#6.2: Date.prototype.isPrototypeOf(x62)');\n}\n\nvar x63 = new Date(1970, 0, 1, 0, 0, 0, 0);\nif(Date.prototype !== x63.constructor.prototype){\n $FAIL(\"#6.3: Date.prototype === x63.constructor.prototype\");\n}\n\nvar x71 = new Date(1999, 11, 31, 23, 59, 59, 999);\nif (typeof x71.constructor.prototype !== \"object\") {\n $FAIL(\"#7.1: typeof x71.constructor.prototype === 'object'\");\n}\n\nvar x72 = new Date(1999, 11, 31, 23, 59, 59, 999);\nif (!Date.prototype.isPrototypeOf(x72)) {\n $ERROR('#7.2: Date.prototype.isPrototypeOf(x72)');\n}\n\nvar x73 = new Date(1999, 11, 31, 23, 59, 59, 999);\nif(Date.prototype !== x73.constructor.prototype){\n $FAIL(\"#7.3: Date.prototype === x73.constructor.prototype\");\n}\n\nvar x81 = new Date(1999, 12, 1, 0, 0, 0, 0);\nif (typeof x81.constructor.prototype !== \"object\") {\n $FAIL(\"#8.1: typeof x81.constructor.prototype === 'object'\");\n}\n\nvar x82 = new Date(1999, 12, 1, 0, 0, 0, 0);\nif (!Date.prototype.isPrototypeOf(x82)) {\n $ERROR('#8.2: Date.prototype.isPrototypeOf(x82)');\n}\n\nvar x83 = new Date(1999, 12, 1, 0, 0, 0, 0);\nif(Date.prototype !== x83.constructor.prototype){\n $FAIL(\"#8.3: Date.prototype === x83.constructor.prototype\");\n}\n\nvar x91 = new Date(2000, 0, 1, 0, 0, 0, 0);\nif (typeof x91.constructor.prototype !== \"object\") {\n $FAIL(\"#9.1: typeof x91.constructor.prototype === 'object'\");\n}\n\nvar x92 = new Date(2000, 0, 1, 0, 0, 0, 0);\nif (!Date.prototype.isPrototypeOf(x92)) {\n $ERROR('#9.2: Date.prototype.isPrototypeOf(x92)');\n}\n\nvar x93 = new Date(2000, 0, 1, 0, 0, 0, 0);\nif(Date.prototype !== x93.constructor.prototype){\n $FAIL(\"#9.3: Date.prototype === x93.constructor.prototype\");\n}\n\nvar x101 = new Date(2099, 11, 31, 23, 59, 59, 999);\nif (typeof x101.constructor.prototype !== \"object\") {\n $FAIL(\"#10.1: typeof x101.constructor.prototype === 'object'\");\n}\n\nvar x102 = new Date(2099, 11, 31, 23, 59, 59, 999);\nif (!Date.prototype.isPrototypeOf(x102)) {\n $ERROR('#10.2: Date.prototype.isPrototypeOf(x102)');\n}\n\nvar x103 = new Date(2099, 11, 31, 23, 59, 59, 999);\nif(Date.prototype !== x103.constructor.prototype){\n $FAIL(\"#10.3: Date.prototype === x103.constructor.prototype\");\n}\n\nvar x111 = new Date(2099, 12, 1, 0, 0, 0, 0);\nif (typeof x111.constructor.prototype !== \"object\") {\n $FAIL(\"#11.1: typeof x111.constructor.prototype === 'object'\");\n}\n\nvar x112 = new Date(2099, 12, 1, 0, 0, 0, 0);\nif (!Date.prototype.isPrototypeOf(x112)) {\n $ERROR('#11.2: Date.prototype.isPrototypeOf(x112)');\n}\n\nvar x113 = new Date(2099, 12, 1, 0, 0, 0, 0);\nif(Date.prototype !== x113.constructor.prototype){\n $FAIL(\"#11.3: Date.prototype === x113.constructor.prototype\");\n}\n\nvar x121 = new Date(2100, 0, 1, 0, 0, 0, 0);\nif (typeof x121.constructor.prototype !== \"object\") {\n $FAIL(\"#12.1: typeof x121.constructor.prototype === 'object'\");\n}\n\nvar x122 = new Date(2100, 0, 1, 0, 0, 0, 0);\nif (!Date.prototype.isPrototypeOf(x122)) {\n $ERROR('#12.2: Date.prototype.isPrototypeOf(x122)');\n}\n\nvar x123 = new Date(2100, 0, 1, 0, 0, 0, 0);\nif(Date.prototype !== x123.constructor.prototype){\n $FAIL(\"#12.3: Date.prototype === x123.constructor.prototype\");\n}\n",
+ "id": "S15.9.3.1_A2_T6"
+ },
+ {
+ "section": "15.9.3.1",
+ "description": "Test based on delete prototype.toString - 2 arguments, (year, month)",
+ "test": "var x1 = new Date(1899, 11);\nif (Object.prototype.toString.call(x1) !== \"[object Date]\") {\n $FAIL(\"#1: The [[Class]] property of the newly constructed object is set to 'Date'\");\n}\n\nvar x2 = new Date(1899, 12);\nif (Object.prototype.toString.call(x2) !== \"[object Date]\") {\n $FAIL(\"#2: The [[Class]] property of the newly constructed object is set to 'Date'\");\n}\n\nvar x3 = new Date(1900, 0);\nif (Object.prototype.toString.call(x3) !== \"[object Date]\") {\n $FAIL(\"#3: The [[Class]] property of the newly constructed object is set to 'Date'\");\n}\n\nvar x4 = new Date(1969, 11);\nif (Object.prototype.toString.call(x4) !== \"[object Date]\") {\n $FAIL(\"#4: The [[Class]] property of the newly constructed object is set to 'Date'\");\n}\n\nvar x5 = new Date(1969, 12);\nif (Object.prototype.toString.call(x5) !== \"[object Date]\") {\n $FAIL(\"#5: The [[Class]] property of the newly constructed object is set to 'Date'\");\n}\n\nvar x6 = new Date(1970, 0);\nif (Object.prototype.toString.call(x6) !== \"[object Date]\") {\n $FAIL(\"#6: The [[Class]] property of the newly constructed object is set to 'Date'\");\n}\n\nvar x7 = new Date(1999, 11);\nif (Object.prototype.toString.call(x7) !== \"[object Date]\") {\n $FAIL(\"#7: The [[Class]] property of the newly constructed object is set to 'Date'\");\n}\n\nvar x8 = new Date(1999, 12);\nif (Object.prototype.toString.call(x8) !== \"[object Date]\") {\n $FAIL(\"#8: The [[Class]] property of the newly constructed object is set to 'Date'\");\n}\n\nvar x9 = new Date(2000, 0);\nif (Object.prototype.toString.call(x9) !== \"[object Date]\") {\n $FAIL(\"#9: The [[Class]] property of the newly constructed object is set to 'Date'\");\n}\n\nvar x10 = new Date(2099, 11);\nif (Object.prototype.toString.call(x10) !== \"[object Date]\") {\n $FAIL(\"#10: The [[Class]] property of the newly constructed object is set to 'Date'\");\n}\n\nvar x11 = new Date(2099, 12);\nif (Object.prototype.toString.call(x11) !== \"[object Date]\") {\n $FAIL(\"#11: The [[Class]] property of the newly constructed object is set to 'Date'\");\n}\n\nvar x12 = new Date(2100, 0);\nif (Object.prototype.toString.call(x12) !== \"[object Date]\") {\n $FAIL(\"#12: The [[Class]] property of the newly constructed object is set to 'Date'\");\n}\n",
+ "id": "S15.9.3.1_A3_T1.1"
+ },
+ {
+ "section": "15.9.3.1",
+ "description": "Test based on overwriting prototype.toString - 2 arguments, (year, month)",
+ "test": "Date.prototype.toString = Object.prototype.toString;\n\nvar x1 = new Date(1899, 11);\nif (x1.toString() !== \"[object Date]\") {\n $FAIL(\"#1: The [[Class]] property of the newly constructed object is set to 'Date'\");\n}\n\nvar x2 = new Date(1899, 12);\nif (x2.toString() !== \"[object Date]\") {\n $FAIL(\"#2: The [[Class]] property of the newly constructed object is set to 'Date'\");\n}\n\nvar x3 = new Date(1900, 0);\nif (x3.toString() !== \"[object Date]\") {\n $FAIL(\"#3: The [[Class]] property of the newly constructed object is set to 'Date'\");\n}\n\nvar x4 = new Date(1969, 11);\nif (x4.toString() !== \"[object Date]\") {\n $FAIL(\"#4: The [[Class]] property of the newly constructed object is set to 'Date'\");\n}\n\nvar x5 = new Date(1969, 12);\nif (x5.toString() !== \"[object Date]\") {\n $FAIL(\"#5: The [[Class]] property of the newly constructed object is set to 'Date'\");\n}\n\nvar x6 = new Date(1970, 0);\nif (x6.toString() !== \"[object Date]\") {\n $FAIL(\"#6: The [[Class]] property of the newly constructed object is set to 'Date'\");\n}\n\nvar x7 = new Date(1999, 11);\nif (x7.toString() !== \"[object Date]\") {\n $FAIL(\"#7: The [[Class]] property of the newly constructed object is set to 'Date'\");\n}\n\nvar x8 = new Date(1999, 12);\nif (x8.toString() !== \"[object Date]\") {\n $FAIL(\"#8: The [[Class]] property of the newly constructed object is set to 'Date'\");\n}\n\nvar x9 = new Date(2000, 0);\nif (x9.toString() !== \"[object Date]\") {\n $FAIL(\"#9: The [[Class]] property of the newly constructed object is set to 'Date'\");\n}\n\nvar x10 = new Date(2099, 11);\nif (x10.toString() !== \"[object Date]\") {\n $FAIL(\"#10: The [[Class]] property of the newly constructed object is set to 'Date'\");\n}\n\nvar x11 = new Date(2099, 12);\nif (x11.toString() !== \"[object Date]\") {\n $FAIL(\"#11: The [[Class]] property of the newly constructed object is set to 'Date'\");\n}\n\nvar x12 = new Date(2100, 0);\nif (x12.toString() !== \"[object Date]\") {\n $FAIL(\"#12: The [[Class]] property of the newly constructed object is set to 'Date'\");\n}\n\n",
+ "id": "S15.9.3.1_A3_T1.2"
+ },
+ {
+ "section": "15.9.3.1",
+ "description": "Test based on delete prototype.toString - 3 arguments, (year, month, date)",
+ "test": "var x1 = new Date(1899, 11, 31);\nif (Object.prototype.toString.call(x1) !== \"[object Date]\") {\n $FAIL(\"#1: The [[Class]] property of the newly constructed object is set to 'Date'\");\n}\n\nvar x2 = new Date(1899, 12, 1);\nif (Object.prototype.toString.call(x2) !== \"[object Date]\") {\n $FAIL(\"#2: The [[Class]] property of the newly constructed object is set to 'Date'\");\n}\n\nvar x3 = new Date(1900, 0, 1);\nif (Object.prototype.toString.call(x3) !== \"[object Date]\") {\n $FAIL(\"#3: The [[Class]] property of the newly constructed object is set to 'Date'\");\n}\n\nvar x4 = new Date(1969, 11, 31);\nif (Object.prototype.toString.call(x4) !== \"[object Date]\") {\n $FAIL(\"#4: The [[Class]] property of the newly constructed object is set to 'Date'\");\n}\n\nvar x5 = new Date(1969, 12, 1);\nif (Object.prototype.toString.call(x5) !== \"[object Date]\") {\n $FAIL(\"#5: The [[Class]] property of the newly constructed object is set to 'Date'\");\n}\n\nvar x6 = new Date(1970, 0, 1);\nif (Object.prototype.toString.call(x6) !== \"[object Date]\") {\n $FAIL(\"#6: The [[Class]] property of the newly constructed object is set to 'Date'\");\n}\n\nvar x7 = new Date(1999, 11, 31);\nif (Object.prototype.toString.call(x7) !== \"[object Date]\") {\n $FAIL(\"#7: The [[Class]] property of the newly constructed object is set to 'Date'\");\n}\n\nvar x8 = new Date(1999, 12, 1);\nif (Object.prototype.toString.call(x8) !== \"[object Date]\") {\n $FAIL(\"#8: The [[Class]] property of the newly constructed object is set to 'Date'\");\n}\n\nvar x9 = new Date(2000, 0, 1);\nif (Object.prototype.toString.call(x9) !== \"[object Date]\") {\n $FAIL(\"#9: The [[Class]] property of the newly constructed object is set to 'Date'\");\n}\n\nvar x10 = new Date(2099, 11, 31);\nif (Object.prototype.toString.call(x10) !== \"[object Date]\") {\n $FAIL(\"#10: The [[Class]] property of the newly constructed object is set to 'Date'\");\n}\n\nvar x11 = new Date(2099, 12, 1);\nif (Object.prototype.toString.call(x11) !== \"[object Date]\") {\n $FAIL(\"#11: The [[Class]] property of the newly constructed object is set to 'Date'\");\n}\n\nvar x12 = new Date(2100, 0, 1);\nif (Object.prototype.toString.call(x12) !== \"[object Date]\") {\n $FAIL(\"#12: The [[Class]] property of the newly constructed object is set to 'Date'\");\n}\n",
+ "id": "S15.9.3.1_A3_T2.1"
+ },
+ {
+ "section": "15.9.3.1",
+ "description": "Test based on overwriting prototype.toString - 3 arguments, (year, month, date)",
+ "test": "Date.prototype.toString = Object.prototype.toString;\n\nvar x1 = new Date(1899, 11, 31);\nif (x1.toString() !== \"[object Date]\") {\n $FAIL(\"#1: The [[Class]] property of the newly constructed object is set to 'Date'\");\n}\n\nvar x2 = new Date(1899, 12, 1);\nif (x2.toString() !== \"[object Date]\") {\n $FAIL(\"#2: The [[Class]] property of the newly constructed object is set to 'Date'\");\n}\n\nvar x3 = new Date(1900, 0, 1);\nif (x3.toString() !== \"[object Date]\") {\n $FAIL(\"#3: The [[Class]] property of the newly constructed object is set to 'Date'\");\n}\n\nvar x4 = new Date(1969, 11, 31);\nif (x4.toString() !== \"[object Date]\") {\n $FAIL(\"#4: The [[Class]] property of the newly constructed object is set to 'Date'\");\n}\n\nvar x5 = new Date(1969, 12, 1);\nif (x5.toString() !== \"[object Date]\") {\n $FAIL(\"#5: The [[Class]] property of the newly constructed object is set to 'Date'\");\n}\n\nvar x6 = new Date(1970, 0, 1);\nif (x6.toString() !== \"[object Date]\") {\n $FAIL(\"#6: The [[Class]] property of the newly constructed object is set to 'Date'\");\n}\n\nvar x7 = new Date(1999, 11, 31);\nif (x7.toString() !== \"[object Date]\") {\n $FAIL(\"#7: The [[Class]] property of the newly constructed object is set to 'Date'\");\n}\n\nvar x8 = new Date(1999, 12, 1);\nif (x8.toString() !== \"[object Date]\") {\n $FAIL(\"#8: The [[Class]] property of the newly constructed object is set to 'Date'\");\n}\n\nvar x9 = new Date(2000, 0, 1);\nif (x9.toString() !== \"[object Date]\") {\n $FAIL(\"#9: The [[Class]] property of the newly constructed object is set to 'Date'\");\n}\n\nvar x10 = new Date(2099, 11, 31);\nif (x10.toString() !== \"[object Date]\") {\n $FAIL(\"#10: The [[Class]] property of the newly constructed object is set to 'Date'\");\n}\n\nvar x11 = new Date(2099, 12, 1);\nif (x11.toString() !== \"[object Date]\") {\n $FAIL(\"#11: The [[Class]] property of the newly constructed object is set to 'Date'\");\n}\n\nvar x12 = new Date(2100, 0, 1);\nif (x12.toString() !== \"[object Date]\") {\n $FAIL(\"#12: The [[Class]] property of the newly constructed object is set to 'Date'\");\n}\n\n",
+ "id": "S15.9.3.1_A3_T2.2"
+ },
+ {
+ "section": "15.9.3.1",
+ "description": "Test based on delete prototype.toString - 4 arguments, (year, month, date, hours)",
+ "test": "var x1 = new Date(1899, 11, 31, 23);\nif (Object.prototype.toString.call(x1) !== \"[object Date]\") {\n $FAIL(\"#1: The [[Class]] property of the newly constructed object is set to 'Date'\");\n}\n\nvar x2 = new Date(1899, 12, 1, 0);\nif (Object.prototype.toString.call(x2) !== \"[object Date]\") {\n $FAIL(\"#2: The [[Class]] property of the newly constructed object is set to 'Date'\");\n}\n\nvar x3 = new Date(1900, 0, 1, 0);\nif (Object.prototype.toString.call(x3) !== \"[object Date]\") {\n $FAIL(\"#3: The [[Class]] property of the newly constructed object is set to 'Date'\");\n}\n\nvar x4 = new Date(1969, 11, 31, 23);\nif (Object.prototype.toString.call(x4) !== \"[object Date]\") {\n $FAIL(\"#4: The [[Class]] property of the newly constructed object is set to 'Date'\");\n}\n\nvar x5 = new Date(1969, 12, 1, 0);\nif (Object.prototype.toString.call(x5) !== \"[object Date]\") {\n $FAIL(\"#5: The [[Class]] property of the newly constructed object is set to 'Date'\");\n}\n\nvar x6 = new Date(1970, 0, 1, 0);\nif (Object.prototype.toString.call(x6) !== \"[object Date]\") {\n $FAIL(\"#6: The [[Class]] property of the newly constructed object is set to 'Date'\");\n}\n\nvar x7 = new Date(1999, 11, 31, 23);\nif (Object.prototype.toString.call(x7) !== \"[object Date]\") {\n $FAIL(\"#7: The [[Class]] property of the newly constructed object is set to 'Date'\");\n}\n\nvar x8 = new Date(1999, 12, 1, 0);\nif (Object.prototype.toString.call(x8) !== \"[object Date]\") {\n $FAIL(\"#8: The [[Class]] property of the newly constructed object is set to 'Date'\");\n}\n\nvar x9 = new Date(2000, 0, 1, 0);\nif (Object.prototype.toString.call(x9) !== \"[object Date]\") {\n $FAIL(\"#9: The [[Class]] property of the newly constructed object is set to 'Date'\");\n}\n\nvar x10 = new Date(2099, 11, 31, 23);\nif (Object.prototype.toString.call(x10) !== \"[object Date]\") {\n $FAIL(\"#10: The [[Class]] property of the newly constructed object is set to 'Date'\");\n}\n\nvar x11 = new Date(2099, 12, 1, 0);\nif (Object.prototype.toString.call(x11) !== \"[object Date]\") {\n $FAIL(\"#11: The [[Class]] property of the newly constructed object is set to 'Date'\");\n}\n\nvar x12 = new Date(2100, 0, 1, 0);\nif (Object.prototype.toString.call(x12) !== \"[object Date]\") {\n $FAIL(\"#12: The [[Class]] property of the newly constructed object is set to 'Date'\");\n}\n",
+ "id": "S15.9.3.1_A3_T3.1"
+ },
+ {
+ "section": "15.9.3.1",
+ "description": "Test based on overwriting prototype.toString - 4 arguments, (year, month, date, hours)",
+ "test": "Date.prototype.toString = Object.prototype.toString;\n\nvar x1 = new Date(1899, 11, 31, 23);\nif (x1.toString() !== \"[object Date]\") {\n $FAIL(\"#1: The [[Class]] property of the newly constructed object is set to 'Date'\");\n}\n\nvar x2 = new Date(1899, 12, 1, 0);\nif (x2.toString() !== \"[object Date]\") {\n $FAIL(\"#2: The [[Class]] property of the newly constructed object is set to 'Date'\");\n}\n\nvar x3 = new Date(1900, 0, 1, 0);\nif (x3.toString() !== \"[object Date]\") {\n $FAIL(\"#3: The [[Class]] property of the newly constructed object is set to 'Date'\");\n}\n\nvar x4 = new Date(1969, 11, 31, 23);\nif (x4.toString() !== \"[object Date]\") {\n $FAIL(\"#4: The [[Class]] property of the newly constructed object is set to 'Date'\");\n}\n\nvar x5 = new Date(1969, 12, 1, 0);\nif (x5.toString() !== \"[object Date]\") {\n $FAIL(\"#5: The [[Class]] property of the newly constructed object is set to 'Date'\");\n}\n\nvar x6 = new Date(1970, 0, 1, 0);\nif (x6.toString() !== \"[object Date]\") {\n $FAIL(\"#6: The [[Class]] property of the newly constructed object is set to 'Date'\");\n}\n\nvar x7 = new Date(1999, 11, 31, 23);\nif (x7.toString() !== \"[object Date]\") {\n $FAIL(\"#7: The [[Class]] property of the newly constructed object is set to 'Date'\");\n}\n\nvar x8 = new Date(1999, 12, 1, 0);\nif (x8.toString() !== \"[object Date]\") {\n $FAIL(\"#8: The [[Class]] property of the newly constructed object is set to 'Date'\");\n}\n\nvar x9 = new Date(2000, 0, 1, 0);\nif (x9.toString() !== \"[object Date]\") {\n $FAIL(\"#9: The [[Class]] property of the newly constructed object is set to 'Date'\");\n}\n\nvar x10 = new Date(2099, 11, 31, 23);\nif (x10.toString() !== \"[object Date]\") {\n $FAIL(\"#10: The [[Class]] property of the newly constructed object is set to 'Date'\");\n}\n\nvar x11 = new Date(2099, 12, 1, 0);\nif (x11.toString() !== \"[object Date]\") {\n $FAIL(\"#11: The [[Class]] property of the newly constructed object is set to 'Date'\");\n}\n\nvar x12 = new Date(2100, 0, 1, 0);\nif (x12.toString() !== \"[object Date]\") {\n $FAIL(\"#12: The [[Class]] property of the newly constructed object is set to 'Date'\");\n}\n",
+ "id": "S15.9.3.1_A3_T3.2"
+ },
+ {
+ "section": "15.9.3.1",
+ "description": "Test based on delete prototype.toString - 5 arguments, (year, month, date, hours, minutes)",
+ "test": "var x1 = new Date(1899, 11, 31, 23, 59);\nif (Object.prototype.toString.call(x1) !== \"[object Date]\") {\n $FAIL(\"#1: The [[Class]] property of the newly constructed object is set to 'Date'\");\n}\n\nvar x2 = new Date(1899, 12, 1, 0, 0);\nif (Object.prototype.toString.call(x2) !== \"[object Date]\") {\n $FAIL(\"#2: The [[Class]] property of the newly constructed object is set to 'Date'\");\n}\n\nvar x3 = new Date(1900, 0, 1, 0, 0);\nif (Object.prototype.toString.call(x3) !== \"[object Date]\") {\n $FAIL(\"#3: The [[Class]] property of the newly constructed object is set to 'Date'\");\n}\n\nvar x4 = new Date(1969, 11, 31, 23, 59);\nif (Object.prototype.toString.call(x4) !== \"[object Date]\") {\n $FAIL(\"#4: The [[Class]] property of the newly constructed object is set to 'Date'\");\n}\n\nvar x5 = new Date(1969, 12, 1, 0, 0);\nif (Object.prototype.toString.call(x5) !== \"[object Date]\") {\n $FAIL(\"#5: The [[Class]] property of the newly constructed object is set to 'Date'\");\n}\n\nvar x6 = new Date(1970, 0, 1, 0, 0);\nif (Object.prototype.toString.call(x6) !== \"[object Date]\") {\n $FAIL(\"#6: The [[Class]] property of the newly constructed object is set to 'Date'\");\n}\n\nvar x7 = new Date(1999, 11, 31, 23, 59);\nif (Object.prototype.toString.call(x7) !== \"[object Date]\") {\n $FAIL(\"#7: The [[Class]] property of the newly constructed object is set to 'Date'\");\n}\n\nvar x8 = new Date(1999, 12, 1, 0, 0);\nif (Object.prototype.toString.call(x8) !== \"[object Date]\") {\n $FAIL(\"#8: The [[Class]] property of the newly constructed object is set to 'Date'\");\n}\n\nvar x9 = new Date(2000, 0, 1, 0, 0);\nif (Object.prototype.toString.call(x9) !== \"[object Date]\") {\n $FAIL(\"#9: The [[Class]] property of the newly constructed object is set to 'Date'\");\n}\n\nvar x10 = new Date(2099, 11, 31, 23, 59);\nif (Object.prototype.toString.call(x10) !== \"[object Date]\") {\n $FAIL(\"#10: The [[Class]] property of the newly constructed object is set to 'Date'\");\n}\n\nvar x11 = new Date(2099, 12, 1, 0, 0);\nif (Object.prototype.toString.call(x11) !== \"[object Date]\") {\n $FAIL(\"#11: The [[Class]] property of the newly constructed object is set to 'Date'\");\n}\n\nvar x12 = new Date(2100, 0, 1, 0, 0);\nif (Object.prototype.toString.call(x12) !== \"[object Date]\") {\n $FAIL(\"#12: The [[Class]] property of the newly constructed object is set to 'Date'\");\n}\n",
+ "id": "S15.9.3.1_A3_T4.1"
+ },
+ {
+ "section": "15.9.3.1",
+ "description": "Test based on overwriting prototype.toString - 5 arguments, (year, month, date, hours, minutes)",
+ "test": "Date.prototype.toString = Object.prototype.toString;\n\nvar x1 = new Date(1899, 11, 31, 23, 59);\nif (x1.toString() !== \"[object Date]\") {\n $FAIL(\"#1: The [[Class]] property of the newly constructed object is set to 'Date'\");\n}\n\nvar x2 = new Date(1899, 12, 1, 0, 0);\nif (x2.toString() !== \"[object Date]\") {\n $FAIL(\"#2: The [[Class]] property of the newly constructed object is set to 'Date'\");\n}\n\nvar x3 = new Date(1900, 0, 1, 0, 0);\nif (x3.toString() !== \"[object Date]\") {\n $FAIL(\"#3: The [[Class]] property of the newly constructed object is set to 'Date'\");\n}\n\nvar x4 = new Date(1969, 11, 31, 23, 59);\nif (x4.toString() !== \"[object Date]\") {\n $FAIL(\"#4: The [[Class]] property of the newly constructed object is set to 'Date'\");\n}\n\nvar x5 = new Date(1969, 12, 1, 0, 0);\nif (x5.toString() !== \"[object Date]\") {\n $FAIL(\"#5: The [[Class]] property of the newly constructed object is set to 'Date'\");\n}\n\nvar x6 = new Date(1970, 0, 1, 0, 0);\nif (x6.toString() !== \"[object Date]\") {\n $FAIL(\"#6: The [[Class]] property of the newly constructed object is set to 'Date'\");\n}\n\nvar x7 = new Date(1999, 11, 31, 23, 59);\nif (x7.toString() !== \"[object Date]\") {\n $FAIL(\"#7: The [[Class]] property of the newly constructed object is set to 'Date'\");\n}\n\nvar x8 = new Date(1999, 12, 1, 0, 0);\nif (x8.toString() !== \"[object Date]\") {\n $FAIL(\"#8: The [[Class]] property of the newly constructed object is set to 'Date'\");\n}\n\nvar x9 = new Date(2000, 0, 1, 0, 0);\nif (x9.toString() !== \"[object Date]\") {\n $FAIL(\"#9: The [[Class]] property of the newly constructed object is set to 'Date'\");\n}\n\nvar x10 = new Date(2099, 11, 31, 23, 59);\nif (x10.toString() !== \"[object Date]\") {\n $FAIL(\"#10: The [[Class]] property of the newly constructed object is set to 'Date'\");\n}\n\nvar x11 = new Date(2099, 12, 1, 0, 0);\nif (x11.toString() !== \"[object Date]\") {\n $FAIL(\"#11: The [[Class]] property of the newly constructed object is set to 'Date'\");\n}\n\nvar x12 = new Date(2100, 0, 1, 0, 0);\nif (x12.toString() !== \"[object Date]\") {\n $FAIL(\"#12: The [[Class]] property of the newly constructed object is set to 'Date'\");\n}\n",
+ "id": "S15.9.3.1_A3_T4.2"
+ },
+ {
+ "section": "15.9.3.1",
+ "description": "6 arguments, (year, month, date, hours, minutes, seconds)",
+ "test": "var x1 = new Date(1899, 11, 31, 23, 59, 59);\nif (Object.prototype.toString.call(x1) !== \"[object Date]\") {\n $FAIL(\"#1: The [[Class]] property of the newly constructed object is set to 'Date'\");\n}\n\nvar x2 = new Date(1899, 12, 1, 0, 0, 0);\nif (Object.prototype.toString.call(x2) !== \"[object Date]\") {\n $FAIL(\"#2: The [[Class]] property of the newly constructed object is set to 'Date'\");\n}\n\nvar x3 = new Date(1900, 0, 1, 0, 0, 0);\nif (Object.prototype.toString.call(x3) !== \"[object Date]\") {\n $FAIL(\"#3: The [[Class]] property of the newly constructed object is set to 'Date'\");\n}\n\nvar x4 = new Date(1969, 11, 31, 23, 59, 59);\nif (Object.prototype.toString.call(x4) !== \"[object Date]\") {\n $FAIL(\"#4: The [[Class]] property of the newly constructed object is set to 'Date'\");\n}\n\nvar x5 = new Date(1969, 12, 1, 0, 0, 0);\nif (Object.prototype.toString.call(x5) !== \"[object Date]\") {\n $FAIL(\"#5: The [[Class]] property of the newly constructed object is set to 'Date'\");\n}\n\nvar x6 = new Date(1970, 0, 1, 0, 0, 0);\nif (Object.prototype.toString.call(x6) !== \"[object Date]\") {\n $FAIL(\"#6: The [[Class]] property of the newly constructed object is set to 'Date'\");\n}\n\nvar x7 = new Date(1999, 11, 31, 23, 59, 59);\nif (Object.prototype.toString.call(x7) !== \"[object Date]\") {\n $FAIL(\"#7: The [[Class]] property of the newly constructed object is set to 'Date'\");\n}\n\nvar x8 = new Date(1999, 12, 1, 0, 0, 0);\nif (Object.prototype.toString.call(x8) !== \"[object Date]\") {\n $FAIL(\"#8: The [[Class]] property of the newly constructed object is set to 'Date'\");\n}\n\nvar x9 = new Date(2000, 0, 1, 0, 0, 0);\nif (Object.prototype.toString.call(x9) !== \"[object Date]\") {\n $FAIL(\"#9: The [[Class]] property of the newly constructed object is set to 'Date'\");\n}\n\nvar x10 = new Date(2099, 11, 31, 23, 59, 59);\nif (Object.prototype.toString.call(x10) !== \"[object Date]\") {\n $FAIL(\"#10: The [[Class]] property of the newly constructed object is set to 'Date'\");\n}\n\nvar x11 = new Date(2099, 12, 1, 0, 0, 0);\nif (Object.prototype.toString.call(x11) !== \"[object Date]\") {\n $FAIL(\"#11: The [[Class]] property of the newly constructed object is set to 'Date'\");\n}\n\nvar x12 = new Date(2100, 0, 1, 0, 0, 0);\nif (Object.prototype.toString.call(x12) !== \"[object Date]\") {\n $FAIL(\"#12: The [[Class]] property of the newly constructed object is set to 'Date'\");\n}\n",
+ "id": "S15.9.3.1_A3_T5.1"
+ },
+ {
+ "section": "15.9.3.1",
+ "description": "Test based on overwriting prototype.toString - 6 arguments, (year, month, date, hours, minutes, seconds)",
+ "test": "Date.prototype.toString = Object.prototype.toString;\n\nvar x1 = new Date(1899, 11, 31, 23, 59, 59);\nif (x1.toString() !== \"[object Date]\") {\n $FAIL(\"#1: The [[Class]] property of the newly constructed object is set to 'Date'\");\n}\n\nvar x2 = new Date(1899, 12, 1, 0, 0, 0);\nif (x2.toString() !== \"[object Date]\") {\n $FAIL(\"#2: The [[Class]] property of the newly constructed object is set to 'Date'\");\n}\n\nvar x3 = new Date(1900, 0, 1, 0, 0, 0);\nif (x3.toString() !== \"[object Date]\") {\n $FAIL(\"#3: The [[Class]] property of the newly constructed object is set to 'Date'\");\n}\n\nvar x4 = new Date(1969, 11, 31, 23, 59, 59);\nif (x4.toString() !== \"[object Date]\") {\n $FAIL(\"#4: The [[Class]] property of the newly constructed object is set to 'Date'\");\n}\n\nvar x5 = new Date(1969, 12, 1, 0, 0, 0);\nif (x5.toString() !== \"[object Date]\") {\n $FAIL(\"#5: The [[Class]] property of the newly constructed object is set to 'Date'\");\n}\n\nvar x6 = new Date(1970, 0, 1, 0, 0, 0);\nif (x6.toString() !== \"[object Date]\") {\n $FAIL(\"#6: The [[Class]] property of the newly constructed object is set to 'Date'\");\n}\n\nvar x7 = new Date(1999, 11, 31, 23, 59, 59);\nif (x7.toString() !== \"[object Date]\") {\n $FAIL(\"#7: The [[Class]] property of the newly constructed object is set to 'Date'\");\n}\n\nvar x8 = new Date(1999, 12, 1, 0, 0, 0);\nif (x8.toString() !== \"[object Date]\") {\n $FAIL(\"#8: The [[Class]] property of the newly constructed object is set to 'Date'\");\n}\n\nvar x9 = new Date(2000, 0, 1, 0, 0, 0);\nif (x9.toString() !== \"[object Date]\") {\n $FAIL(\"#9: The [[Class]] property of the newly constructed object is set to 'Date'\");\n}\n\nvar x10 = new Date(2099, 11, 31, 23, 59, 59);\nif (x10.toString() !== \"[object Date]\") {\n $FAIL(\"#10: The [[Class]] property of the newly constructed object is set to 'Date'\");\n}\n\nvar x11 = new Date(2099, 12, 1, 0, 0, 0);\nif (x11.toString() !== \"[object Date]\") {\n $FAIL(\"#11: The [[Class]] property of the newly constructed object is set to 'Date'\");\n}\n\nvar x12 = new Date(2100, 0, 1, 0, 0, 0);\nif (x12.toString() !== \"[object Date]\") {\n $FAIL(\"#12: The [[Class]] property of the newly constructed object is set to 'Date'\");\n}\n",
+ "id": "S15.9.3.1_A3_T5.2"
+ },
+ {
+ "section": "15.9.3.1",
+ "description": "7 arguments, (year, month, date, hours, minutes, seconds, ms)",
+ "test": "var x1 = new Date(1899, 11, 31, 23, 59, 59, 999);\nif (Object.prototype.toString.call(x1) !== \"[object Date]\") {\n $FAIL(\"#1: The [[Class]] property of the newly constructed object is set to 'Date'\");\n}\n\nvar x2 = new Date(1899, 12, 1, 0, 0, 0, 0);\nif (Object.prototype.toString.call(x2) !== \"[object Date]\") {\n $FAIL(\"#2: The [[Class]] property of the newly constructed object is set to 'Date'\");\n}\n\nvar x3 = new Date(1900, 0, 1, 0, 0, 0, 0);\nif (Object.prototype.toString.call(x3) !== \"[object Date]\") {\n $FAIL(\"#3: The [[Class]] property of the newly constructed object is set to 'Date'\");\n}\n\nvar x4 = new Date(1969, 11, 31, 23, 59, 59, 999);\nif (Object.prototype.toString.call(x4) !== \"[object Date]\") {\n $FAIL(\"#4: The [[Class]] property of the newly constructed object is set to 'Date'\");\n}\n\nvar x5 = new Date(1969, 12, 1, 0, 0, 0, 0);\nif (Object.prototype.toString.call(x5) !== \"[object Date]\") {\n $FAIL(\"#5: The [[Class]] property of the newly constructed object is set to 'Date'\");\n}\n\nvar x6 = new Date(1970, 0, 1, 0, 0, 0, 0);\nif (Object.prototype.toString.call(x6) !== \"[object Date]\") {\n $FAIL(\"#6: The [[Class]] property of the newly constructed object is set to 'Date'\");\n}\n\nvar x7 = new Date(1999, 11, 31, 23, 59, 59, 999);\nif (Object.prototype.toString.call(x7) !== \"[object Date]\") {\n $FAIL(\"#7: The [[Class]] property of the newly constructed object is set to 'Date'\");\n}\n\nvar x8 = new Date(1999, 12, 1, 0, 0, 0, 0);\nif (Object.prototype.toString.call(x8) !== \"[object Date]\") {\n $FAIL(\"#8: The [[Class]] property of the newly constructed object is set to 'Date'\");\n}\n\nvar x9 = new Date(2000, 0, 1, 0, 0, 0, 0);\nif (Object.prototype.toString.call(x9) !== \"[object Date]\") {\n $FAIL(\"#9: The [[Class]] property of the newly constructed object is set to 'Date'\");\n}\n\nvar x10 = new Date(2099, 11, 31, 23, 59, 59, 999);\nif (Object.prototype.toString.call(x10) !== \"[object Date]\") {\n $FAIL(\"#10: The [[Class]] property of the newly constructed object is set to 'Date'\");\n}\n\nvar x11 = new Date(2099, 12, 1, 0, 0, 0, 0);\nif (Object.prototype.toString.call(x11) !== \"[object Date]\") {\n $FAIL(\"#11: The [[Class]] property of the newly constructed object is set to 'Date'\");\n}\n\nvar x12 = new Date(2100, 0, 1, 0, 0, 0, 0);\nif (Object.prototype.toString.call(x12) !== \"[object Date]\") {\n $FAIL(\"#12: The [[Class]] property of the newly constructed object is set to 'Date'\");\n}\n",
+ "id": "S15.9.3.1_A3_T6.1"
+ },
+ {
+ "section": "15.9.3.1",
+ "description": "Test based on overwriting prototype.toString - 7 arguments, (year, month, date, hours, minutes, seconds, ms)",
+ "test": "Date.prototype.toString = Object.prototype.toString;\n\nvar x1 = new Date(1899, 11, 31, 23, 59, 59, 999);\nif (x1.toString() !== \"[object Date]\") {\n $FAIL(\"#1: The [[Class]] property of the newly constructed object is set to 'Date'\");\n}\n\nvar x2 = new Date(1899, 12, 1, 0, 0, 0, 0);\nif (x2.toString() !== \"[object Date]\") {\n $FAIL(\"#2: The [[Class]] property of the newly constructed object is set to 'Date'\");\n}\n\nvar x3 = new Date(1900, 0, 1, 0, 0, 0, 0);\nif (x3.toString() !== \"[object Date]\") {\n $FAIL(\"#3: The [[Class]] property of the newly constructed object is set to 'Date'\");\n}\n\nvar x4 = new Date(1969, 11, 31, 23, 59, 59, 999);\nif (x4.toString() !== \"[object Date]\") {\n $FAIL(\"#4: The [[Class]] property of the newly constructed object is set to 'Date'\");\n}\n\nvar x5 = new Date(1969, 12, 1, 0, 0, 0, 0);\nif (x5.toString() !== \"[object Date]\") {\n $FAIL(\"#5: The [[Class]] property of the newly constructed object is set to 'Date'\");\n}\n\nvar x6 = new Date(1970, 0, 1, 0, 0, 0, 0);\nif (x6.toString() !== \"[object Date]\") {\n $FAIL(\"#6: The [[Class]] property of the newly constructed object is set to 'Date'\");\n}\n\nvar x7 = new Date(1999, 11, 31, 23, 59, 59, 999);\nif (x7.toString() !== \"[object Date]\") {\n $FAIL(\"#7: The [[Class]] property of the newly constructed object is set to 'Date'\");\n}\n\nvar x8 = new Date(1999, 12, 1, 0, 0, 0, 0);\nif (x8.toString() !== \"[object Date]\") {\n $FAIL(\"#8: The [[Class]] property of the newly constructed object is set to 'Date'\");\n}\n\nvar x9 = new Date(2000, 0, 1, 0, 0, 0, 0);\nif (x9.toString() !== \"[object Date]\") {\n $FAIL(\"#9: The [[Class]] property of the newly constructed object is set to 'Date'\");\n}\n\nvar x10 = new Date(2099, 11, 31, 23, 59, 59, 999);\nif (x10.toString() !== \"[object Date]\") {\n $FAIL(\"#10: The [[Class]] property of the newly constructed object is set to 'Date'\");\n}\n\nvar x11 = new Date(2099, 12, 1, 0, 0, 0, 0);\nif (x11.toString() !== \"[object Date]\") {\n $FAIL(\"#11: The [[Class]] property of the newly constructed object is set to 'Date'\");\n}\n\nvar x12 = new Date(2100, 0, 1, 0, 0, 0, 0);\nif (x12.toString() !== \"[object Date]\") {\n $FAIL(\"#12: The [[Class]] property of the newly constructed object is set to 'Date'\");\n}\n",
+ "id": "S15.9.3.1_A3_T6.2"
+ },
+ {
+ "section": "15.9.3.1",
+ "description": "2 arguments, (year, month)",
+ "test": "var myObj = function(val){\n this.value = val;\n this.valueOf = function(){throw \"valueOf-\"+this.value;};\n this.toString = function(){throw \"toString-\"+this.value;};\n};\n\n//CHECK#1\ntry{\n var x1 = new Date(new myObj(1), new myObj(2));\n $ERROR(\"#1: The 1st step is calling ToNumber(year)\");\n}\ncatch(e){\n if(e !== \"valueOf-1\"){\n $ERROR(\"#1: The 1st step is calling ToNumber(year)\");\n }\n}\n\n//CHECK#2\ntry{\n var x2 = new Date(1, new myObj(2));\n $ERROR(\"#2: The 2nd step is calling ToNumber(month)\");\n}\ncatch(e){\n if(e !== \"valueOf-2\"){\n $ERROR(\"#2: The 2nd step is calling ToNumber(month)\");\n }\n}\n",
+ "id": "S15.9.3.1_A4_T1"
+ },
+ {
+ "section": "15.9.3.1",
+ "description": "3 arguments, (year, month, date)",
+ "test": "var myObj = function(val){\n this.value = val;\n this.valueOf = function(){throw \"valueOf-\"+this.value;};\n this.toString = function(){throw \"toString-\"+this.value;};\n};\n\n//CHECK#1\ntry{\n var x1 = new Date(new myObj(1), new myObj(2), new myObj(3));\n $ERROR(\"#1: The 1st step is calling ToNumber(year)\");\n}\ncatch(e){\n if(e !== \"valueOf-1\"){\n $ERROR(\"#1: The 1st step is calling ToNumber(year)\");\n }\n}\n\n//CHECK#2\ntry{\n var x2 = new Date(1, new myObj(2), new myObj(3));\n $ERROR(\"#2: The 2nd step is calling ToNumber(month)\");\n}\ncatch(e){\n if(e !== \"valueOf-2\"){\n $ERROR(\"#2: The 2nd step is calling ToNumber(month)\");\n }\n}\n\n//CHECK#3\ntry{\n var x3 = new Date(1, 2, new myObj(3));\n $ERROR(\"#3: The 3rd step is calling ToNumber(date)\");\n}\ncatch(e){\n if(e !== \"valueOf-3\"){\n $ERROR(\"#3: The 3rd step is calling ToNumber(date)\");\n }\n}\n",
+ "id": "S15.9.3.1_A4_T2"
+ },
+ {
+ "section": "15.9.3.1",
+ "description": "4 arguments, (year, month, date, hours)",
+ "test": "var myObj = function(val){\n this.value = val;\n this.valueOf = function(){throw \"valueOf-\"+this.value;};\n this.toString = function(){throw \"toString-\"+this.value;};\n};\n\n//CHECK#1\ntry{\n var x1 = new Date(new myObj(1), new myObj(2), new myObj(3), new myObj(4));\n $ERROR(\"#1: The 1st step is calling ToNumber(year)\");\n}\ncatch(e){\n if(e !== \"valueOf-1\"){\n $ERROR(\"#1: The 1st step is calling ToNumber(year)\");\n }\n}\n\n//CHECK#2\ntry{\n var x2 = new Date(1, new myObj(2), new myObj(3), new myObj(4));\n $ERROR(\"#2: The 2nd step is calling ToNumber(month)\");\n}\ncatch(e){\n if(e !== \"valueOf-2\"){\n $ERROR(\"#2: The 2nd step is calling ToNumber(month)\");\n }\n}\n\n//CHECK#3\ntry{\n var x3 = new Date(1, 2, new myObj(3), new myObj(4));\n $ERROR(\"#3: The 3rd step is calling ToNumber(date)\");\n}\ncatch(e){\n if(e !== \"valueOf-3\"){\n $ERROR(\"#3: The 3rd step is calling ToNumber(date)\");\n }\n}\n\n//CHECK#4\ntry{\n var x4 = new Date(1, 2, 3, new myObj(4));\n $ERROR(\"#4: The 4th step is calling ToNumber(hours)\");\n}\ncatch(e){\n if(e !== \"valueOf-4\"){\n $ERROR(\"#4: The 4th step is calling ToNumber(hours)\");\n }\n}\n",
+ "id": "S15.9.3.1_A4_T3"
+ },
+ {
+ "section": "15.9.3.1",
+ "description": "5 arguments, (year, month, date, hours, minutes)",
+ "test": "var myObj = function(val){\n this.value = val;\n this.valueOf = function(){throw \"valueOf-\"+this.value;};\n this.toString = function(){throw \"toString-\"+this.value;};\n};\n\n//CHECK#1\ntry{\n var x1 = new Date(new myObj(1), new myObj(2), new myObj(3), new myObj(4), new myObj(5));\n $ERROR(\"#1: The 1st step is calling ToNumber(year)\");\n}\ncatch(e){\n if(e !== \"valueOf-1\"){\n $ERROR(\"#1: The 1st step is calling ToNumber(year)\");\n }\n}\n\n//CHECK#2\ntry{\n var x2 = new Date(1, new myObj(2), new myObj(3), new myObj(4), new myObj(5));\n $ERROR(\"#2: The 2nd step is calling ToNumber(month)\");\n}\ncatch(e){\n if(e !== \"valueOf-2\"){\n $ERROR(\"#2: The 2nd step is calling ToNumber(month)\");\n }\n}\n\n//CHECK#3\ntry{\n var x3 = new Date(1, 2, new myObj(3), new myObj(4), new myObj(5));\n $ERROR(\"#3: The 3rd step is calling ToNumber(date)\");\n}\ncatch(e){\n if(e !== \"valueOf-3\"){\n $ERROR(\"#3: The 3rd step is calling ToNumber(date)\");\n }\n}\n\n//CHECK#4\ntry{\n var x4 = new Date(1, 2, 3, new myObj(4), new myObj(5));\n $ERROR(\"#4: The 4th step is calling ToNumber(hours)\");\n}\ncatch(e){\n if(e !== \"valueOf-4\"){\n $ERROR(\"#4: The 4th step is calling ToNumber(hours)\");\n }\n}\n\n//CHECK#5\ntry{\n var x5 = new Date(1, 2, 3, 4, new myObj(5));\n $ERROR(\"#5: The 5th step is calling ToNumber(minutes)\");\n}\ncatch(e){\n if(e !== \"valueOf-5\"){\n $ERROR(\"#5: The 5th step is calling ToNumber(minutes)\");\n }\n}\n",
+ "id": "S15.9.3.1_A4_T4"
+ },
+ {
+ "section": "15.9.3.1",
+ "description": "6 arguments, (year, month, date, hours, minutes, seconds)",
+ "test": "var myObj = function(val){\n this.value = val;\n this.valueOf = function(){throw \"valueOf-\"+this.value;};\n this.toString = function(){throw \"toString-\"+this.value;};\n};\n\n//CHECK#1\ntry{\n var x1 = new Date(new myObj(1), new myObj(2), new myObj(3), new myObj(4), new myObj(5), new myObj(6));\n $ERROR(\"#1: The 1st step is calling ToNumber(year)\");\n}\ncatch(e){\n if(e !== \"valueOf-1\"){\n $ERROR(\"#1: The 1st step is calling ToNumber(year)\");\n }\n}\n\n//CHECK#2\ntry{\n var x2 = new Date(1, new myObj(2), new myObj(3), new myObj(4), new myObj(5), new myObj(6));\n $ERROR(\"#2: The 2nd step is calling ToNumber(month)\");\n}\ncatch(e){\n if(e !== \"valueOf-2\"){\n $ERROR(\"#2: The 2nd step is calling ToNumber(month)\");\n }\n}\n\n//CHECK#3\ntry{\n var x3 = new Date(1, 2, new myObj(3), new myObj(4), new myObj(5), new myObj(6));\n $ERROR(\"#3: The 3rd step is calling ToNumber(date)\");\n}\ncatch(e){\n if(e !== \"valueOf-3\"){\n $ERROR(\"#3: The 3rd step is calling ToNumber(date)\");\n }\n}\n\n//CHECK#4\ntry{\n var x4 = new Date(1, 2, 3, new myObj(4), new myObj(5), new myObj(6));\n $ERROR(\"#4: The 4th step is calling ToNumber(hours)\");\n}\ncatch(e){\n if(e !== \"valueOf-4\"){\n $ERROR(\"#4: The 4th step is calling ToNumber(hours)\");\n }\n}\n\n//CHECK#5\ntry{\n var x5 = new Date(1, 2, 3, 4, new myObj(5), new myObj(6));\n $ERROR(\"#5: The 5th step is calling ToNumber(minutes)\");\n}\ncatch(e){\n if(e !== \"valueOf-5\"){\n $ERROR(\"#5: The 5th step is calling ToNumber(minutes)\");\n }\n}\n\n//CHECK#6\ntry{\n var x6 = new Date(1, 2, 3, 4, 5, new myObj(6));\n $ERROR(\"#6: The 6th step is calling ToNumber(seconds)\");\n}\ncatch(e){\n if(e !== \"valueOf-6\"){\n $ERROR(\"#6: The 6th step is calling ToNumber(seconds)\");\n }\n}\n",
+ "id": "S15.9.3.1_A4_T5"
+ },
+ {
+ "section": "15.9.3.1",
+ "description": "7 arguments, (year, month, date, hours, minutes, seconds, ms)",
+ "test": "var myObj = function(val){\n this.value = val;\n this.valueOf = function(){throw \"valueOf-\"+this.value;};\n this.toString = function(){throw \"toString-\"+this.value;};\n};\n\n//CHECK#1\ntry{\n var x1 = new Date(new myObj(1), new myObj(2), new myObj(3), new myObj(4), new myObj(5), new myObj(6), new myObj(7));\n $ERROR(\"#1: The 1st step is calling ToNumber(year)\");\n}\ncatch(e){\n if(e !== \"valueOf-1\"){\n $ERROR(\"#1: The 1st step is calling ToNumber(year)\");\n }\n}\n\n//CHECK#2\ntry{\n var x2 = new Date(1, new myObj(2), new myObj(3), new myObj(4), new myObj(5), new myObj(6), new myObj(7));\n $ERROR(\"#2: The 2nd step is calling ToNumber(month)\");\n}\ncatch(e){\n if(e !== \"valueOf-2\"){\n $ERROR(\"#2: The 2nd step is calling ToNumber(month)\");\n }\n}\n\n//CHECK#3\ntry{\n var x3 = new Date(1, 2, new myObj(3), new myObj(4), new myObj(5), new myObj(6), new myObj(7));\n $ERROR(\"#3: The 3rd step is calling ToNumber(date)\");\n}\ncatch(e){\n if(e !== \"valueOf-3\"){\n $ERROR(\"#3: The 3rd step is calling ToNumber(date)\");\n }\n}\n\n//CHECK#4\ntry{\n var x4 = new Date(1, 2, 3, new myObj(4), new myObj(5), new myObj(6), new myObj(7));\n $ERROR(\"#4: The 4th step is calling ToNumber(hours)\");\n}\ncatch(e){\n if(e !== \"valueOf-4\"){\n $ERROR(\"#4: The 4th step is calling ToNumber(hours)\");\n }\n}\n\n//CHECK#5\ntry{\n var x5 = new Date(1, 2, 3, 4, new myObj(5), new myObj(6), new myObj(7));\n $ERROR(\"#5: The 5th step is calling ToNumber(minutes)\");\n}\ncatch(e){\n if(e !== \"valueOf-5\"){\n $ERROR(\"#5: The 5th step is calling ToNumber(minutes)\");\n }\n}\n\n//CHECK#6\ntry{\n var x6 = new Date(1, 2, 3, 4, 5, new myObj(6), new myObj(7));\n $ERROR(\"#6: The 6th step is calling ToNumber(seconds)\");\n}\ncatch(e){\n if(e !== \"valueOf-6\"){\n $ERROR(\"#6: The 6th step is calling ToNumber(seconds)\");\n }\n}\n\n//CHECK#7\ntry{\n var x7 = new Date(1, 2, 3, 4, 5, 6, new myObj(7));\n $ERROR(\"#7: The 7th step is calling ToNumber(ms)\");\n}\ncatch(e){\n if(e !== \"valueOf-7\"){\n $ERROR(\"#7: The 7th step is calling ToNumber(ms)\");\n }\n}\n",
+ "id": "S15.9.3.1_A4_T6"
+ },
+ {
+ "section": "15.9.3.1",
+ "description": "2 arguments, (year, month)",
+ "test": "$INCLUDE(\"environment.js\");\n$INCLUDE(\"numeric_conversion.js\");\n$INCLUDE(\"Date_constants.js\");\n$INCLUDE(\"Date_library.js\");\n\nif (ConstructDate(1899, 11) !== new Date(1899, 11).valueOf()) {\n $FAIL(\"#1: Incorrect value of Date\");\n}\n\nif (ConstructDate(1899, 12) !== new Date(1899, 12).valueOf()) {\n $FAIL(\"#2: Incorrect value of Date\");\n}\n\nif (ConstructDate(1900, 0) !== new Date(1900, 0).valueOf()) {\n $FAIL(\"#3: Incorrect value of Date\");\n}\n\nif (ConstructDate(1969, 11) !== new Date(1969, 11).valueOf()) {\n $FAIL(\"#4: Incorrect value of Date\");\n}\n\nif (ConstructDate(1969, 12) !== new Date(1969, 12).valueOf()) {\n $FAIL(\"#5: Incorrect value of Date\");\n}\n\nif (ConstructDate(1970, 0) !== new Date(1970, 0).valueOf()) {\n $FAIL(\"#6: Incorrect value of Date\");\n}\n\nif (ConstructDate(1999, 11) !== new Date(1999, 11).valueOf()) {\n $FAIL(\"#7: Incorrect value of Date\");\n}\n\nif (ConstructDate(1999, 12) !== new Date(1999, 12).valueOf()) {\n $FAIL(\"#8: Incorrect value of Date\");\n}\n\nif (ConstructDate(2000, 0) !== new Date(2000, 0).valueOf()) {\n $FAIL(\"#9: Incorrect value of Date\");\n}\n\nif (ConstructDate(2099, 11) !== new Date(2099, 11).valueOf()) {\n $FAIL(\"#10: Incorrect value of Date\");\n}\n\nif (ConstructDate(2099, 12) !== new Date(2099, 12).valueOf()) {\n $FAIL(\"#11: Incorrect value of Date\");\n}\n\nif (ConstructDate(2100, 0) !== new Date(2100, 0).valueOf()) {\n $FAIL(\"#12: Incorrect value of Date\");\n}\n",
+ "id": "S15.9.3.1_A5_T1"
+ },
+ {
+ "section": "15.9.3.1",
+ "description": "3 arguments, (year, month, date)",
+ "test": "$INCLUDE(\"environment.js\");\n$INCLUDE(\"numeric_conversion.js\");\n$INCLUDE(\"Date_constants.js\");\n$INCLUDE(\"Date_library.js\");\n\nif (ConstructDate(1899, 11, 31) !== new Date(1899, 11, 31).valueOf()) {\n $FAIL(\"#1: Incorrect value of Date\");\n}\n\nif (ConstructDate(1899, 12, 1) !== new Date(1899, 12, 1).valueOf()) {\n $FAIL(\"#2: Incorrect value of Date\");\n}\n\nif (ConstructDate(1900, 0, 1) !== new Date(1900, 0, 1).valueOf()) {\n $FAIL(\"#3: Incorrect value of Date\");\n}\n\nif (ConstructDate(1969, 11, 31) !== new Date(1969, 11, 31).valueOf()) {\n $FAIL(\"#4: Incorrect value of Date\");\n}\n\nif (ConstructDate(1969, 12, 1) !== new Date(1969, 12, 1).valueOf()) {\n $FAIL(\"#5: Incorrect value of Date\");\n}\n\nif (ConstructDate(1970, 0, 1) !== new Date(1970, 0, 1).valueOf()) {\n $FAIL(\"#6: Incorrect value of Date\");\n}\n\nif (ConstructDate(1999, 11, 31) !== new Date(1999, 11, 31).valueOf()) {\n $FAIL(\"#7: Incorrect value of Date\");\n}\n\nif (ConstructDate(1999, 12, 1) !== new Date(1999, 12, 1).valueOf()) {\n $FAIL(\"#8: Incorrect value of Date\");\n}\n\nif (ConstructDate(2000, 0, 1) !== new Date(2000, 0, 1).valueOf()) {\n $FAIL(\"#9: Incorrect value of Date\");\n}\n\nif (ConstructDate(2099, 11, 31) !== new Date(2099, 11, 31).valueOf()) {\n $FAIL(\"#10: Incorrect value of Date\");\n}\n\nif (ConstructDate(2099, 12, 1) !== new Date(2099, 12, 1).valueOf()) {\n $FAIL(\"#11: Incorrect value of Date\");\n}\n\nif (ConstructDate(2100, 0, 1) !== new Date(2100, 0, 1).valueOf()) {\n $FAIL(\"#12: Incorrect value of Date\");\n}\n",
+ "id": "S15.9.3.1_A5_T2"
+ },
+ {
+ "section": "15.9.3.1",
+ "description": "4 arguments, (year, month, date, hours)",
+ "test": "$INCLUDE(\"environment.js\");\n$INCLUDE(\"numeric_conversion.js\");\n$INCLUDE(\"Date_constants.js\");\n$INCLUDE(\"Date_library.js\");\n\nif (ConstructDate(1899, 11, 31, 23) !== new Date(1899, 11, 31, 23).valueOf()) {\n $FAIL(\"#1: Incorrect value of Date\");\n}\n\nif (ConstructDate(1899, 12, 1, 0) !== new Date(1899, 12, 1, 0).valueOf()) {\n $FAIL(\"#2: Incorrect value of Date\");\n}\n\nif (ConstructDate(1900, 0, 1, 0) !== new Date(1900, 0, 1, 0).valueOf()) {\n $FAIL(\"#3: Incorrect value of Date\");\n}\n\nif (ConstructDate(1969, 11, 31, 23) !== new Date(1969, 11, 31, 23).valueOf()) {\n $FAIL(\"#4: Incorrect value of Date\");\n}\n\nif (ConstructDate(1969, 12, 1, 0) !== new Date(1969, 12, 1, 0).valueOf()) {\n $FAIL(\"#5: Incorrect value of Date\");\n}\n\nif (ConstructDate(1970, 0, 1, 0) !== new Date(1970, 0, 1, 0).valueOf()) {\n $FAIL(\"#6: Incorrect value of Date\");\n}\n\nif (ConstructDate(1999, 11, 31, 23) !== new Date(1999, 11, 31, 23).valueOf()) {\n $FAIL(\"#7: Incorrect value of Date\");\n}\n\nif (ConstructDate(1999, 12, 1, 0) !== new Date(1999, 12, 1, 0).valueOf()) {\n $FAIL(\"#8: Incorrect value of Date\");\n}\n\nif (ConstructDate(2000, 0, 1, 0) !== new Date(2000, 0, 1, 0).valueOf()) {\n $FAIL(\"#9: Incorrect value of Date\");\n}\n\nif (ConstructDate(2099, 11, 31, 23) !== new Date(2099, 11, 31, 23).valueOf()) {\n $FAIL(\"#10: Incorrect value of Date\");\n}\n\nif (ConstructDate(2099, 12, 1, 0) !== new Date(2099, 12, 1, 0).valueOf()) {\n $FAIL(\"#11: Incorrect value of Date\");\n}\n\nif (ConstructDate(2100, 0, 1, 0) !== new Date(2100, 0, 1, 0).valueOf()) {\n $FAIL(\"#12: Incorrect value of Date\");\n}\n",
+ "id": "S15.9.3.1_A5_T3"
+ },
+ {
+ "section": "15.9.3.1",
+ "description": "5 arguments, (year, month, date, hours, minutes)",
+ "test": "$INCLUDE(\"environment.js\");\n$INCLUDE(\"numeric_conversion.js\");\n$INCLUDE(\"Date_constants.js\");\n$INCLUDE(\"Date_library.js\");\n\nif (ConstructDate(1899, 11, 31, 23, 59) !== new Date(1899, 11, 31, 23, 59).valueOf()) {\n $FAIL(\"#1: Incorrect value of Date\");\n}\n\nif (ConstructDate(1899, 12, 1, 0, 0) !== new Date(1899, 12, 1, 0, 0).valueOf()) {\n $FAIL(\"#2: Incorrect value of Date\");\n}\n\nif (ConstructDate(1900, 0, 1, 0, 0) !== new Date(1900, 0, 1, 0, 0).valueOf()) {\n $FAIL(\"#3: Incorrect value of Date\");\n}\n\nif (ConstructDate(1969, 11, 31, 23, 59) !== new Date(1969, 11, 31, 23, 59).valueOf()) {\n $FAIL(\"#4: Incorrect value of Date\");\n}\n\nif (ConstructDate(1969, 12, 1, 0, 0) !== new Date(1969, 12, 1, 0, 0).valueOf()) {\n $FAIL(\"#5: Incorrect value of Date\");\n}\n\nif (ConstructDate(1970, 0, 1, 0, 0) !== new Date(1970, 0, 1, 0, 0).valueOf()) {\n $FAIL(\"#6: Incorrect value of Date\");\n}\n\nif (ConstructDate(1999, 11, 31, 23, 59) !== new Date(1999, 11, 31, 23, 59).valueOf()) {\n $FAIL(\"#7: Incorrect value of Date\");\n}\n\nif (ConstructDate(1999, 12, 1, 0, 0) !== new Date(1999, 12, 1, 0, 0).valueOf()) {\n $FAIL(\"#8: Incorrect value of Date\");\n}\n\nif (ConstructDate(2000, 0, 1, 0, 0) !== new Date(2000, 0, 1, 0, 0).valueOf()) {\n $FAIL(\"#9: Incorrect value of Date\");\n}\n\nif (ConstructDate(2099, 11, 31, 23, 59) !== new Date(2099, 11, 31, 23, 59).valueOf()) {\n $FAIL(\"#10: Incorrect value of Date\");\n}\n\nif (ConstructDate(2099, 12, 1, 0, 0) !== new Date(2099, 12, 1, 0, 0).valueOf()) {\n $FAIL(\"#11: Incorrect value of Date\");\n}\n\nif (ConstructDate(2100, 0, 1, 0, 0) !== new Date(2100, 0, 1, 0, 0).valueOf()) {\n $FAIL(\"#12: Incorrect value of Date\");\n}\n",
+ "id": "S15.9.3.1_A5_T4"
+ },
+ {
+ "section": "15.9.3.1",
+ "description": "6 arguments, (year, month, date, hours, minutes, seconds)",
+ "test": "$INCLUDE(\"environment.js\");\n$INCLUDE(\"numeric_conversion.js\");\n$INCLUDE(\"Date_constants.js\");\n$INCLUDE(\"Date_library.js\");\n\nif (ConstructDate(1899, 11, 31, 23, 59, 59) !== new Date(1899, 11, 31, 23, 59, 59).valueOf()) {\n $FAIL(\"#1: Incorrect value of Date\");\n}\n\nif (ConstructDate(1899, 12, 1, 0, 0, 0) !== new Date(1899, 12, 1, 0, 0, 0).valueOf()) {\n $FAIL(\"#2: Incorrect value of Date\");\n}\n\nif (ConstructDate(1900, 0, 1, 0, 0, 0) !== new Date(1900, 0, 1, 0, 0, 0).valueOf()) {\n $FAIL(\"#3: Incorrect value of Date\");\n}\n\nif (ConstructDate(1969, 11, 31, 23, 59, 59) !== new Date(1969, 11, 31, 23, 59, 59).valueOf()) {\n $FAIL(\"#4: Incorrect value of Date\");\n}\n\nif (ConstructDate(1969, 12, 1, 0, 0, 0) !== new Date(1969, 12, 1, 0, 0, 0).valueOf()) {\n $FAIL(\"#5: Incorrect value of Date\");\n}\n\nif (ConstructDate(1970, 0, 1, 0, 0, 0) !== new Date(1970, 0, 1, 0, 0, 0).valueOf()) {\n $FAIL(\"#6: Incorrect value of Date\");\n}\n\nif (ConstructDate(1999, 11, 31, 23, 59, 59) !== new Date(1999, 11, 31, 23, 59, 59).valueOf()) {\n $FAIL(\"#7: Incorrect value of Date\");\n}\n\nif (ConstructDate(1999, 12, 1, 0, 0, 0) !== new Date(1999, 12, 1, 0, 0, 0).valueOf()) {\n $FAIL(\"#8: Incorrect value of Date\");\n}\n\nif (ConstructDate(2000, 0, 1, 0, 0, 0) !== new Date(2000, 0, 1, 0, 0, 0).valueOf()) {\n $FAIL(\"#9: Incorrect value of Date\");\n}\n\nif (ConstructDate(2099, 11, 31, 23, 59, 59) !== new Date(2099, 11, 31, 23, 59, 59).valueOf()) {\n $FAIL(\"#10: Incorrect value of Date\");\n}\n\nif (ConstructDate(2099, 12, 1, 0, 0, 0) !== new Date(2099, 12, 1, 0, 0, 0).valueOf()) {\n $FAIL(\"#11: Incorrect value of Date\");\n}\n\nif (ConstructDate(2100, 0, 1, 0, 0, 0) !== new Date(2100, 0, 1, 0, 0, 0).valueOf()) {\n $FAIL(\"#12: Incorrect value of Date\");\n}\n",
+ "id": "S15.9.3.1_A5_T5"
+ },
+ {
+ "section": "15.9.3.1",
+ "description": "7 arguments, (year, month, date, hours, minutes, seconds, ms)",
+ "test": "$INCLUDE(\"environment.js\");\n$INCLUDE(\"numeric_conversion.js\");\n$INCLUDE(\"Date_constants.js\");\n$INCLUDE(\"Date_library.js\");\n\nif (ConstructDate(1899, 11, 31, 23, 59, 59, 999) !== new Date(1899, 11, 31, 23, 59, 59, 999).valueOf()) {\n $FAIL(\"#1: Incorrect value of Date\");\n}\n\nif (ConstructDate(1899, 12, 1, 0, 0, 0, 0) !== new Date(1899, 12, 1, 0, 0, 0, 0).valueOf()) {\n $FAIL(\"#2: Incorrect value of Date\");\n}\n\nif (ConstructDate(1900, 0, 1, 0, 0, 0, 0) !== new Date(1900, 0, 1, 0, 0, 0, 0).valueOf()) {\n $FAIL(\"#3: Incorrect value of Date\");\n}\n\nif (ConstructDate(1969, 11, 31, 23, 59, 59, 999) !== new Date(1969, 11, 31, 23, 59, 59, 999).valueOf()) {\n $FAIL(\"#4: Incorrect value of Date\");\n}\n\nif (ConstructDate(1969, 12, 1, 0, 0, 0, 0) !== new Date(1969, 12, 1, 0, 0, 0, 0).valueOf()) {\n $FAIL(\"#5: Incorrect value of Date\");\n}\n\nif (ConstructDate(1970, 0, 1, 0, 0, 0, 0) !== new Date(1970, 0, 1, 0, 0, 0, 0).valueOf()) {\n $FAIL(\"#6: Incorrect value of Date\");\n}\n\nif (ConstructDate(1999, 11, 31, 23, 59, 59, 999) !== new Date(1999, 11, 31, 23, 59, 59, 999).valueOf()) {\n $FAIL(\"#7: Incorrect value of Date\");\n}\n\nif (ConstructDate(1999, 12, 1, 0, 0, 0, 0) !== new Date(1999, 12, 1, 0, 0, 0, 0).valueOf()) {\n $FAIL(\"#8: Incorrect value of Date\");\n}\n\nif (ConstructDate(2000, 0, 1, 0, 0, 0, 0) !== new Date(2000, 0, 1, 0, 0, 0, 0).valueOf()) {\n $FAIL(\"#9: Incorrect value of Date\");\n}\n\nif (ConstructDate(2099, 11, 31, 23, 59, 59, 999) !== new Date(2099, 11, 31, 23, 59, 59, 999).valueOf()) {\n $FAIL(\"#10: Incorrect value of Date\");\n}\n\nif (ConstructDate(2099, 12, 1, 0, 0, 0, 0) !== new Date(2099, 12, 1, 0, 0, 0, 0).valueOf()) {\n $FAIL(\"#11: Incorrect value of Date\");\n}\n\nif (ConstructDate(2100, 0, 1, 0, 0, 0, 0) !== new Date(2100, 0, 1, 0, 0, 0, 0).valueOf()) {\n $FAIL(\"#12: Incorrect value of Date\");\n}\n",
+ "id": "S15.9.3.1_A5_T6"
+ },
+ {
+ "section": "15.9.3.1",
+ "description": "2 arguments, (year, month)",
+ "test": "function DateValue(year, month, date, hours, minutes, seconds, ms){\n return new Date(year, month, date, hours, minutes, seconds, ms).valueOf();\n}\n\nif (!isNaN(DateValue(1899, 11))) {\n $FAIL(\"#1: The value should be NaN\");\n}\n\nif (!isNaN(DateValue(1899, 12))) {\n $FAIL(\"#2: The value should be NaN\");\n}\n\nif (!isNaN(DateValue(1900, 0))) {\n $FAIL(\"#3: The value should be NaN\");\n}\n\nif (!isNaN(DateValue(1969, 11))) {\n $FAIL(\"#4: The value should be NaN\");\n}\n\nif (!isNaN(DateValue(1969, 12))) {\n $FAIL(\"#5: The value should be NaN\");\n}\n\nif (!isNaN(DateValue(1970, 0))) {\n $FAIL(\"#6: The value should be NaN\");\n}\n\nif (!isNaN(DateValue(1999, 11))) {\n $FAIL(\"#7: The value should be NaN\");\n}\n\nif (!isNaN(DateValue(1999, 12))) {\n $FAIL(\"#8: The value should be NaN\");\n}\n\nif (!isNaN(DateValue(2000, 0))) {\n $FAIL(\"#9: The value should be NaN\");\n}\n\nif (!isNaN(DateValue(2099, 11))) {\n $FAIL(\"#10: The value should be NaN\");\n}\n\nif (!isNaN(DateValue(2099, 12))) {\n $FAIL(\"#11: The value should be NaN\");\n}\n\nif (!isNaN(DateValue(2100, 0))) {\n $FAIL(\"#12: The value should be NaN\");\n}\n",
+ "id": "S15.9.3.1_A6_T1"
+ },
+ {
+ "section": "15.9.3.1",
+ "description": "3 arguments, (year, month, date)",
+ "test": "function DateValue(year, month, date, hours, minutes, seconds, ms){\n return new Date(year, month, date, hours, minutes, seconds, ms).valueOf();\n}\n\nif (!isNaN(DateValue(1899, 11, 31))) {\n $FAIL(\"#1: The value should be NaN\");\n}\n\nif (!isNaN(DateValue(1899, 12, 1))) {\n $FAIL(\"#2: The value should be NaN\");\n}\n\nif (!isNaN(DateValue(1900, 0, 1))) {\n $FAIL(\"#3: The value should be NaN\");\n}\n\nif (!isNaN(DateValue(1969, 11, 31))) {\n $FAIL(\"#4: The value should be NaN\");\n}\n\nif (!isNaN(DateValue(1969, 12, 1))) {\n $FAIL(\"#5: The value should be NaN\");\n}\n\nif (!isNaN(DateValue(1970, 0, 1))) {\n $FAIL(\"#6: The value should be NaN\");\n}\n\nif (!isNaN(DateValue(1999, 11, 31))) {\n $FAIL(\"#7: The value should be NaN\");\n}\n\nif (!isNaN(DateValue(1999, 12, 1))) {\n $FAIL(\"#8: The value should be NaN\");\n}\n\nif (!isNaN(DateValue(2000, 0, 1))) {\n $FAIL(\"#9: The value should be NaN\");\n}\n\nif (!isNaN(DateValue(2099, 11, 31))) {\n $FAIL(\"#10: The value should be NaN\");\n}\n\nif (!isNaN(DateValue(2099, 12, 1))) {\n $FAIL(\"#11: The value should be NaN\");\n}\n\nif (!isNaN(DateValue(2100, 0, 1))) {\n $FAIL(\"#12: The value should be NaN\");\n}\n",
+ "id": "S15.9.3.1_A6_T2"
+ },
+ {
+ "section": "15.9.3.1",
+ "description": "4 arguments, (year, month, date, hours)",
+ "test": "function DateValue(year, month, date, hours, minutes, seconds, ms){\n return new Date(year, month, date, hours, minutes, seconds, ms).valueOf();\n}\n\nif (!isNaN(DateValue(1899, 11, 31, 23))) {\n $FAIL(\"#1: The value should be NaN\");\n}\n\nif (!isNaN(DateValue(1899, 12, 1, 0))) {\n $FAIL(\"#2: The value should be NaN\");\n}\n\nif (!isNaN(DateValue(1900, 0, 1, 0))) {\n $FAIL(\"#3: The value should be NaN\");\n}\n\nif (!isNaN(DateValue(1969, 11, 31, 23))) {\n $FAIL(\"#4: The value should be NaN\");\n}\n\nif (!isNaN(DateValue(1969, 12, 1, 0))) {\n $FAIL(\"#5: The value should be NaN\");\n}\n\nif (!isNaN(DateValue(1970, 0, 1, 0))) {\n $FAIL(\"#6: The value should be NaN\");\n}\n\nif (!isNaN(DateValue(1999, 11, 31, 23))) {\n $FAIL(\"#7: The value should be NaN\");\n}\n\nif (!isNaN(DateValue(1999, 12, 1, 0))) {\n $FAIL(\"#8: The value should be NaN\");\n}\n\nif (!isNaN(DateValue(2000, 0, 1, 0))) {\n $FAIL(\"#9: The value should be NaN\");\n}\n\nif (!isNaN(DateValue(2099, 11, 31, 23))) {\n $FAIL(\"#10: The value should be NaN\");\n}\n\nif (!isNaN(DateValue(2099, 12, 1, 0))) {\n $FAIL(\"#11: The value should be NaN\");\n}\n\nif (!isNaN(DateValue(2100, 0, 1, 0))) {\n $FAIL(\"#12: The value should be NaN\");\n}\n",
+ "id": "S15.9.3.1_A6_T3"
+ },
+ {
+ "section": "15.9.3.1",
+ "description": "5 arguments, (year, month, date, hours, minutes)",
+ "test": "function DateValue(year, month, date, hours, minutes, seconds, ms){\n return new Date(year, month, date, hours, minutes, seconds, ms).valueOf();\n}\n\nif (!isNaN(DateValue(1899, 11, 31, 23, 59))) {\n $FAIL(\"#1: The value should be NaN\");\n}\n\nif (!isNaN(DateValue(1899, 12, 1, 0, 0))) {\n $FAIL(\"#2: The value should be NaN\");\n}\n\nif (!isNaN(DateValue(1900, 0, 1, 0, 0))) {\n $FAIL(\"#3: The value should be NaN\");\n}\n\nif (!isNaN(DateValue(1969, 11, 31, 23, 59))) {\n $FAIL(\"#4: The value should be NaN\");\n}\n\nif (!isNaN(DateValue(1969, 12, 1, 0, 0))) {\n $FAIL(\"#5: The value should be NaN\");\n}\n\nif (!isNaN(DateValue(1970, 0, 1, 0, 0))) {\n $FAIL(\"#6: The value should be NaN\");\n}\n\nif (!isNaN(DateValue(1999, 11, 31, 23, 59))) {\n $FAIL(\"#7: The value should be NaN\");\n}\n\nif (!isNaN(DateValue(1999, 12, 1, 0, 0))) {\n $FAIL(\"#8: The value should be NaN\");\n}\n\nif (!isNaN(DateValue(2000, 0, 1, 0, 0))) {\n $FAIL(\"#9: The value should be NaN\");\n}\n\nif (!isNaN(DateValue(2099, 11, 31, 23, 59))) {\n $FAIL(\"#10: The value should be NaN\");\n}\n\nif (!isNaN(DateValue(2099, 12, 1, 0, 0))) {\n $FAIL(\"#11: The value should be NaN\");\n}\n\nif (!isNaN(DateValue(2100, 0, 1, 0, 0))) {\n $FAIL(\"#12: The value should be NaN\");\n}\n",
+ "id": "S15.9.3.1_A6_T4"
+ },
+ {
+ "section": "15.9.3.1",
+ "description": "6 arguments, (year, month, date, hours, minutes, seconds)",
+ "test": "function DateValue(year, month, date, hours, minutes, seconds, ms){\n return new Date(year, month, date, hours, minutes, seconds, ms).valueOf();\n}\n\nif (!isNaN(DateValue(1899, 11, 31, 23, 59, 59))) {\n $FAIL(\"#1: The value should be NaN\");\n}\n\nif (!isNaN(DateValue(1899, 12, 1, 0, 0, 0))) {\n $FAIL(\"#2: The value should be NaN\");\n}\n\nif (!isNaN(DateValue(1900, 0, 1, 0, 0, 0))) {\n $FAIL(\"#3: The value should be NaN\");\n}\n\nif (!isNaN(DateValue(1969, 11, 31, 23, 59, 59))) {\n $FAIL(\"#4: The value should be NaN\");\n}\n\nif (!isNaN(DateValue(1969, 12, 1, 0, 0, 0))) {\n $FAIL(\"#5: The value should be NaN\");\n}\n\nif (!isNaN(DateValue(1970, 0, 1, 0, 0, 0))) {\n $FAIL(\"#6: The value should be NaN\");\n}\n\nif (!isNaN(DateValue(1999, 11, 31, 23, 59, 59))) {\n $FAIL(\"#7: The value should be NaN\");\n}\n\nif (!isNaN(DateValue(1999, 12, 1, 0, 0, 0))) {\n $FAIL(\"#8: The value should be NaN\");\n}\n\nif (!isNaN(DateValue(2000, 0, 1, 0, 0, 0))) {\n $FAIL(\"#9: The value should be NaN\");\n}\n\nif (!isNaN(DateValue(2099, 11, 31, 23, 59, 59))) {\n $FAIL(\"#10: The value should be NaN\");\n}\n\nif (!isNaN(DateValue(2099, 12, 1, 0, 0, 0))) {\n $FAIL(\"#11: The value should be NaN\");\n}\n\nif (!isNaN(DateValue(2100, 0, 1, 0, 0, 0))) {\n $FAIL(\"#12: The value should be NaN\");\n}\n",
+ "id": "S15.9.3.1_A6_T5"
+ },
+ {
+ "section": "15.9.3.2",
+ "description": "Checking types of newly created objects and it values",
+ "test": "$INCLUDE(\"Date_constants.js\");\n \nif (typeof new Date(date_1899_end) !== \"object\") {\n $FAIL(\"#1.1: typeof new Date(date_1899_end) === 'object'\");\n}\n\nif (new Date(date_1899_end) === undefined) {\n $FAIL(\"#1.2: new Date(date_1899_end) === undefined\");\n}\n\nvar x13 = new Date(date_1899_end);\nif(typeof x13 !== \"object\"){\n $FAIL(\"#1.3: typeof new Date(date_1899_end) !== 'object'\");\n}\n\nvar x14 = new Date(date_1899_end);\nif(x14 === undefined){\n $FAIL(\"#1.4: new Date(date_1899_end) !== undefined\");\n}\n\nif (typeof new Date(date_1900_start) !== \"object\") {\n $FAIL(\"#2.1: typeof new Date(date_1900_start) === 'object'\");\n}\n\nif (new Date(date_1900_start) === undefined) {\n $FAIL(\"#2.2: new Date(date_1900_start) === undefined\");\n}\n\nvar x23 = new Date(date_1900_start);\nif(typeof x23 !== \"object\"){\n $FAIL(\"#2.3: typeof new Date(date_1900_start) !== 'object'\");\n}\n\nvar x24 = new Date(date_1900_start);\nif(x24 === undefined){\n $FAIL(\"#2.4: new Date(date_1900_start) !== undefined\");\n}\n\nif (typeof new Date(date_1969_end) !== \"object\") {\n $FAIL(\"#3.1: typeof new Date(date_1969_end) === 'object'\");\n}\n\nif (new Date(date_1969_end) === undefined) {\n $FAIL(\"#3.2: new Date(date_1969_end) === undefined\");\n}\n\nvar x33 = new Date(date_1969_end);\nif(typeof x33 !== \"object\"){\n $FAIL(\"#3.3: typeof new Date(date_1969_end) !== 'object'\");\n}\n\nvar x34 = new Date(date_1969_end);\nif(x34 === undefined){\n $FAIL(\"#3.4: new Date(date_1969_end) !== undefined\");\n}\n\nif (typeof new Date(date_1970_start) !== \"object\") {\n $FAIL(\"#4.1: typeof new Date(date_1970_start) === 'object'\");\n}\n\nif (new Date(date_1970_start) === undefined) {\n $FAIL(\"#4.2: new Date(date_1970_start) === undefined\");\n}\n\nvar x43 = new Date(date_1970_start);\nif(typeof x43 !== \"object\"){\n $FAIL(\"#4.3: typeof new Date(date_1970_start) !== 'object'\");\n}\n\nvar x44 = new Date(date_1970_start);\nif(x44 === undefined){\n $FAIL(\"#4.4: new Date(date_1970_start) !== undefined\");\n}\n\nif (typeof new Date(date_1999_end) !== \"object\") {\n $FAIL(\"#5.1: typeof new Date(date_1999_end) === 'object'\");\n}\n\nif (new Date(date_1999_end) === undefined) {\n $FAIL(\"#5.2: new Date(date_1999_end) === undefined\");\n}\n\nvar x53 = new Date(date_1999_end);\nif(typeof x53 !== \"object\"){\n $FAIL(\"#5.3: typeof new Date(date_1999_end) !== 'object'\");\n}\n\nvar x54 = new Date(date_1999_end);\nif(x54 === undefined){\n $FAIL(\"#5.4: new Date(date_1999_end) !== undefined\");\n}\n\nif (typeof new Date(date_2000_start) !== \"object\") {\n $FAIL(\"#6.1: typeof new Date(date_2000_start) === 'object'\");\n}\n\nif (new Date(date_2000_start) === undefined) {\n $FAIL(\"#6.2: new Date(date_2000_start) === undefined\");\n}\n\nvar x63 = new Date(date_2000_start);\nif(typeof x63 !== \"object\"){\n $FAIL(\"#6.3: typeof new Date(date_2000_start) !== 'object'\");\n}\n\nvar x64 = new Date(date_2000_start);\nif(x64 === undefined){\n $FAIL(\"#6.4: new Date(date_2000_start) !== undefined\");\n}\n\nif (typeof new Date(date_2099_end) !== \"object\") {\n $FAIL(\"#7.1: typeof new Date(date_2099_end) === 'object'\");\n}\n\nif (new Date(date_2099_end) === undefined) {\n $FAIL(\"#7.2: new Date(date_2099_end) === undefined\");\n}\n\nvar x73 = new Date(date_2099_end);\nif(typeof x73 !== \"object\"){\n $FAIL(\"#7.3: typeof new Date(date_2099_end) !== 'object'\");\n}\n\nvar x74 = new Date(date_2099_end);\nif(x74 === undefined){\n $FAIL(\"#7.4: new Date(date_2099_end) !== undefined\");\n}\n\nif (typeof new Date(date_2100_start) !== \"object\") {\n $FAIL(\"#8.1: typeof new Date(date_2100_start) === 'object'\");\n}\n\nif (new Date(date_2100_start) === undefined) {\n $FAIL(\"#8.2: new Date(date_2100_start) === undefined\");\n}\n\nvar x83 = new Date(date_2100_start);\nif(typeof x83 !== \"object\"){\n $FAIL(\"#8.3: typeof new Date(date_2100_start) !== 'object'\");\n}\n\nvar x84 = new Date(date_2100_start);\nif(x84 === undefined){\n $FAIL(\"#8.4: new Date(date_2100_start) !== undefined\");\n}\n",
+ "id": "S15.9.3.2_A1_T1"
+ },
+ {
+ "section": "15.9.3.2",
+ "description": "Checking Date.prototype property of newly constructed objects",
+ "test": "$INCLUDE(\"Date_constants.js\");\n\nvar x11 = new Date(date_1899_end);\nif (typeof x11.constructor.prototype !== \"object\") {\n $FAIL(\"#1.1: typeof x11.constructor.prototype === 'object'\");\n}\n\nvar x12 = new Date(date_1899_end);\nif (!Date.prototype.isPrototypeOf(x12)) {\n $ERROR('#1.2: Date.prototype.isPrototypeOf(x12)');\n}\n\nvar x13 = new Date(date_1899_end);\nif(Date.prototype !== x13.constructor.prototype){\n $FAIL(\"#1.3: Date.prototype !== x13.constructor.prototype\");\n}\n\nvar x21 = new Date(date_1900_start);\nif (typeof x21.constructor.prototype !== \"object\") {\n $FAIL(\"#2.1: typeof x21.constructor.prototype === 'object'\");\n}\n\nvar x22 = new Date(date_1900_start);\nif (!Date.prototype.isPrototypeOf(x22)) {\n $ERROR('#2.2: Date.prototype.isPrototypeOf(x22)');\n}\n\nvar x23 = new Date(date_1900_start);\nif(Date.prototype !== x23.constructor.prototype){\n $FAIL(\"#2.3: Date.prototype !== x23.constructor.prototype\");\n}\n\nvar x31 = new Date(date_1969_end);\nif (typeof x31.constructor.prototype !== \"object\") {\n $FAIL(\"#3.1: typeof x31.constructor.prototype === 'object'\");\n}\n\nvar x32 = new Date(date_1969_end);\nif (!Date.prototype.isPrototypeOf(x32)) {\n $ERROR('#3.2: Date.prototype.isPrototypeOf(x32)');\n}\n\nvar x33 = new Date(date_1969_end);\nif(Date.prototype !== x33.constructor.prototype){\n $FAIL(\"#3.3: Date.prototype !== x33.constructor.prototype\");\n}\n\nvar x41 = new Date(date_1970_start);\nif (typeof x41.constructor.prototype !== \"object\") {\n $FAIL(\"#4.1: typeof x11.constructor.prototype === 'object'\");\n}\n\nvar x42 = new Date(date_1970_start);\nif (!Date.prototype.isPrototypeOf(x42)) {\n $ERROR('#4.2: Date.prototype.isPrototypeOf(x42)');\n}\n\nvar x43 = new Date(date_1970_start);\nif(Date.prototype !== x43.constructor.prototype){\n $FAIL(\"#4.3: Date.prototype !== x43.constructor.prototype\");\n}\n\nvar x51 = new Date(date_1999_end);\nif (typeof x51.constructor.prototype !== \"object\") {\n $FAIL(\"#5.1: typeof x51.constructor.prototype === 'object'\");\n}\n\nvar x52 = new Date(date_1999_end);\nif (!Date.prototype.isPrototypeOf(x52)) {\n $ERROR('#5.2: Date.prototype.isPrototypeOf(x52)');\n}\n\nvar x53 = new Date(date_1999_end);\nif(Date.prototype !== x53.constructor.prototype){\n $FAIL(\"#5.3: Date.prototype !== x53.constructor.prototype\");\n}\n\nvar x61 = new Date(date_2000_start);\nif (typeof x61.constructor.prototype !== \"object\") {\n $FAIL(\"#6.1: typeof x61.constructor.prototype === 'object'\");\n}\n\nvar x62 = new Date(date_2000_start);\nif (!Date.prototype.isPrototypeOf(x62)) {\n $ERROR('#6.2: Date.prototype.isPrototypeOf(x62)');\n}\n\nvar x63 = new Date(date_2000_start);\nif(Date.prototype !== x63.constructor.prototype){\n $FAIL(\"#6.3: Date.prototype !== x63.constructor.prototype\");\n}\n\nvar x71 = new Date(date_2099_end);\nif (typeof x71.constructor.prototype !== \"object\") {\n $FAIL(\"#7.1: typeof x71.constructor.prototype === 'object'\");\n}\n\nvar x72 = new Date(date_2099_end);\nif (!Date.prototype.isPrototypeOf(x72)) {\n $ERROR('#7.2: Date.prototype.isPrototypeOf(x72)');\n}\n\nvar x73 = new Date(date_2099_end);\nif(Date.prototype !== x73.constructor.prototype){\n $FAIL(\"#7.3: Date.prototype !== x73.constructor.prototype\");\n}\n\nvar x81 = new Date(date_2100_start);\nif (typeof x81.constructor.prototype !== \"object\") {\n $FAIL(\"#8.1: typeof x81.constructor.prototype === 'object'\");\n}\n\nvar x82 = new Date(date_2100_start);\nif (!Date.prototype.isPrototypeOf(x82)) {\n $ERROR('#8.2: Date.prototype.isPrototypeOf(x82)');\n}\n\nvar x83 = new Date(date_2100_start);\nif(Date.prototype !== x83.constructor.prototype){\n $FAIL(\"#8.3: Date.prototype !== x83.constructor.prototype\");\n}\n",
+ "id": "S15.9.3.2_A2_T1"
+ },
+ {
+ "section": "15.9.3.2",
+ "description": "Test based on delete prototype.toString",
+ "test": "$INCLUDE(\"Date_constants.js\");\n\nvar x1 = new Date(date_1899_end);\nif (Object.prototype.toString.call(x1) !== \"[object Date]\") {\n $FAIL(\"#1: The [[Class]] property of the newly constructed object is set to 'Date'\");\n}\n\nvar x2 = new Date(date_1900_start);\nif (Object.prototype.toString.call(x2) !== \"[object Date]\") {\n $FAIL(\"#2: The [[Class]] property of the newly constructed object is set to 'Date'\");\n}\n\nvar x3 = new Date(date_1969_end);\nif (Object.prototype.toString.call(x3) !== \"[object Date]\") {\n $FAIL(\"#3: The [[Class]] property of the newly constructed object is set to 'Date'\");\n}\n\nvar x4 = new Date(date_1970_start);\nif (Object.prototype.toString.call(x4) !== \"[object Date]\") {\n $FAIL(\"#4: The [[Class]] property of the newly constructed object is set to 'Date'\");\n}\n\nvar x5 = new Date(date_1999_end);\nif (Object.prototype.toString.call(x5) !== \"[object Date]\") {\n $FAIL(\"#5: The [[Class]] property of the newly constructed object is set to 'Date'\");\n}\n\nvar x6 = new Date(date_2000_start);\nif (Object.prototype.toString.call(x6) !== \"[object Date]\") {\n $FAIL(\"#6: The [[Class]] property of the newly constructed object is set to 'Date'\");\n}\n\nvar x7 = new Date(date_2099_end);\nif (Object.prototype.toString.call(x7) !== \"[object Date]\") {\n $FAIL(\"#7: The [[Class]] property of the newly constructed object is set to 'Date'\");\n}\n\nvar x8 = new Date(date_2100_start);\nif (Object.prototype.toString.call(x8) !== \"[object Date]\") {\n $FAIL(\"#8: The [[Class]] property of the newly constructed object is set to 'Date'\");\n}\n",
+ "id": "S15.9.3.2_A3_T1.1"
+ },
+ {
+ "section": "15.9.3.2",
+ "description": "Test based on overwriting prototype.toString",
+ "test": "$INCLUDE(\"Date_constants.js\");\n\nDate.prototype.toString = Object.prototype.toString;\n\nvar x1 = new Date(date_1899_end);\nif (x1.toString() !== \"[object Date]\") {\n $FAIL(\"#1: The [[Class]] property of the newly constructed object is set to 'Date'\");\n}\n\nvar x2 = new Date(date_1900_start);\nif (x2.toString() !== \"[object Date]\") {\n $FAIL(\"#2: The [[Class]] property of the newly constructed object is set to 'Date'\");\n}\n\nvar x3 = new Date(date_1969_end);\nif (x3.toString() !== \"[object Date]\") {\n $FAIL(\"#3: The [[Class]] property of the newly constructed object is set to 'Date'\");\n}\n\nvar x4 = new Date(date_1970_start);\nif (x4.toString() !== \"[object Date]\") {\n $FAIL(\"#4: The [[Class]] property of the newly constructed object is set to 'Date'\");\n}\n\nvar x5 = new Date(date_1999_end);\nif (x5.toString() !== \"[object Date]\") {\n $FAIL(\"#5: The [[Class]] property of the newly constructed object is set to 'Date'\");\n}\n\nvar x6 = new Date(date_2000_start);\nif (x6.toString() !== \"[object Date]\") {\n $FAIL(\"#6: The [[Class]] property of the newly constructed object is set to 'Date'\");\n}\n\nvar x7 = new Date(date_2099_end);\nif (x7.toString() !== \"[object Date]\") {\n $FAIL(\"#7: The [[Class]] property of the newly constructed object is set to 'Date'\");\n}\n\nvar x8 = new Date(date_2100_start);\nif (x8.toString() !== \"[object Date]\") {\n $FAIL(\"#8: The [[Class]] property of the newly constructed object is set to 'Date'\");\n}\n",
+ "id": "S15.9.3.2_A3_T1.2"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.9.4.1_Date.prototype.json b/website/resources/scripts/testcases2/15.9.4.1_Date.prototype.json
new file mode 100644
index 000000000..057be6e3c
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.9.4.1_Date.prototype.json
@@ -0,0 +1,26 @@
+{
+ "testCollection": {
+ "name": "15.9.4.1_Date.prototype",
+ "numTests": 3,
+ "tests": [
+ {
+ "section": "15.9.4.1",
+ "description": "Checking ReadOnly attribute",
+ "test": "x = Date.prototype;\nDate.prototype = 1;\nif (Date.prototype !== x) {\n $ERROR('#1: The Date.prototype has the attribute ReadOnly');\n}\n\n",
+ "id": "S15.9.4.1_A1_T1"
+ },
+ {
+ "section": "15.9.4.1",
+ "description": "Checking DontDelete attribute",
+ "test": "if (delete Date.prototype !== false) {\n $ERROR('#1: The Date.prototype property has the attributes DontDelete');\n}\n\nif (!Date.hasOwnProperty('prototype')) {\n $FAIL('#2: The Date.prototype property has the attributes DontDelete');\n}\n\n",
+ "id": "S15.9.4.1_A1_T2"
+ },
+ {
+ "section": "15.9.4.1",
+ "description": "Checking DontEnum attribute",
+ "test": "if (Date.propertyIsEnumerable('prototype')) {\n $ERROR('#1: The Date.prototype property has the attribute DontEnum');\n}\n\nfor(x in Date) {\n if(x === \"prototype\") {\n $ERROR('#2: The Date.prototype has the attribute DontEnum');\n }\n}\n\n",
+ "id": "S15.9.4.1_A1_T3"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.9.4.2_Date.parse.json b/website/resources/scripts/testcases2/15.9.4.2_Date.parse.json
new file mode 100644
index 000000000..c801f112a
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.9.4.2_Date.parse.json
@@ -0,0 +1,50 @@
+{
+ "testCollection": {
+ "name": "15.9.4.2_Date.parse",
+ "numTests": 7,
+ "tests": [
+ {
+ "section": "15.9.4.2",
+ "description": "Checking absence of ReadOnly attribute",
+ "test": "x = Date.parse;\nif(x === 1)\n Date.parse = 2;\nelse\n Date.parse = 1;\nif (Date.parse === x) {\n $ERROR('#1: The Date.parse has not the attribute ReadOnly');\n}\n\n",
+ "id": "S15.9.4.2_A1_T1"
+ },
+ {
+ "section": "15.9.4.2",
+ "description": "Checking absence of DontDelete attribute",
+ "test": "if (delete Date.parse === false) {\n $ERROR('#1: The Date.parse property has not the attributes DontDelete');\n}\n\nif (Date.hasOwnProperty('parse')) {\n $FAIL('#2: The Date.parse property has not the attributes DontDelete');\n}\n\n",
+ "id": "S15.9.4.2_A1_T2"
+ },
+ {
+ "section": "15.9.4.2",
+ "description": "Checking DontEnum attribute",
+ "test": "if (Date.propertyIsEnumerable('parse')) {\n $ERROR('#1: The Date.parse property has the attribute DontEnum');\n}\n\nfor(x in Date) {\n if(x === \"parse\") {\n $ERROR('#2: The Date.parse has the attribute DontEnum');\n }\n}\n\n",
+ "id": "S15.9.4.2_A1_T3"
+ },
+ {
+ "section": "15.9.4.2",
+ "description": "The \"length\" property of the \"parse\" is 1",
+ "test": "if(Date.parse.hasOwnProperty(\"length\") !== true){\n $ERROR('#1: The parse has a \"length\" property');\n}\n\nif(Date.parse.length !== 1){\n $ERROR('#2: The \"length\" property of the parse is 1');\n}\n\n",
+ "id": "S15.9.4.2_A2_T1"
+ },
+ {
+ "section": "15.9.4.2",
+ "description": "Checking ReadOnly attribute",
+ "test": "x = Date.parse.length;\nDate.parse.length = 1;\nif (Date.parse.length !== x) {\n $ERROR('#1: The Date.parse.length has the attribute ReadOnly');\n}\n\n",
+ "id": "S15.9.4.2_A3_T1"
+ },
+ {
+ "section": "15.9.4.2",
+ "description": "Checking DontDelete attribute",
+ "test": "if (delete Date.parse.length !== false) {\n $ERROR('#1: The Date.parse.length property has the attributes DontDelete');\n}\n\nif (!Date.parse.hasOwnProperty('length')) {\n $FAIL('#2: The Date.parse.length property has the attributes DontDelete');\n}\n\n",
+ "id": "S15.9.4.2_A3_T2"
+ },
+ {
+ "section": "15.9.4.2",
+ "description": "Checking DontEnum attribute",
+ "test": "if (Date.parse.propertyIsEnumerable('length')) {\n $ERROR('#1: The Date.parse.length property has the attribute DontEnum');\n}\n\nfor(x in Date.parse) {\n if(x === \"length\") {\n $ERROR('#2: The Date.parse.length has the attribute DontEnum');\n }\n}\n\n",
+ "id": "S15.9.4.2_A3_T3"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.9.4.3_Date.UTC.json b/website/resources/scripts/testcases2/15.9.4.3_Date.UTC.json
new file mode 100644
index 000000000..1db912494
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.9.4.3_Date.UTC.json
@@ -0,0 +1,50 @@
+{
+ "testCollection": {
+ "name": "15.9.4.3_Date.UTC",
+ "numTests": 7,
+ "tests": [
+ {
+ "section": "15.9.4.3",
+ "description": "Checking absence of ReadOnly attribute",
+ "test": "x = Date.UTC;\nif(x === 1)\n Date.UTC = 2;\nelse\n Date.UTC = 1;\nif (Date.UTC === x) {\n $ERROR('#1: The Date.UTC has not the attribute ReadOnly');\n}\n\n",
+ "id": "S15.9.4.3_A1_T1"
+ },
+ {
+ "section": "15.9.4.3",
+ "description": "Checking absence of DontDelete attribute",
+ "test": "if (delete Date.UTC === false) {\n $ERROR('#1: The Date.UTC property has not the attributes DontDelete');\n}\n\nif (Date.hasOwnProperty('UTC')) {\n $FAIL('#2: The Date.UTC property has not the attributes DontDelete');\n}\n\n",
+ "id": "S15.9.4.3_A1_T2"
+ },
+ {
+ "section": "15.9.4.3",
+ "description": "Checking DontEnum attribute",
+ "test": "if (Date.propertyIsEnumerable('UTC')) {\n $ERROR('#1: The Date.UTC property has the attribute DontEnum');\n}\n\nfor(x in Date) {\n if(x === \"UTC\") {\n $ERROR('#2: The Date.UTC has the attribute DontEnum');\n }\n}\n\n",
+ "id": "S15.9.4.3_A1_T3"
+ },
+ {
+ "section": "15.9.4.3",
+ "description": "The \"length\" property of the \"UTC\" is 7",
+ "test": "if(Date.UTC.hasOwnProperty(\"length\") !== true){\n $ERROR('#1: The UTC has a \"length\" property');\n}\n\nif(Date.UTC.length !== 7){\n $ERROR('#2: The \"length\" property of the UTC is 7');\n}\n\n",
+ "id": "S15.9.4.3_A2_T1"
+ },
+ {
+ "section": "15.9.4.3",
+ "description": "Checking ReadOnly attribute",
+ "test": "x = Date.UTC.length;\nDate.UTC.length = 1;\nif (Date.UTC.length !== x) {\n $ERROR('#1: The Date.UTC.length has the attribute ReadOnly');\n}\n\n",
+ "id": "S15.9.4.3_A3_T1"
+ },
+ {
+ "section": "15.9.4.3",
+ "description": "Checking DontDelete attribute",
+ "test": "if (delete Date.UTC.length !== false) {\n $ERROR('#1: The Date.UTC.length property has the attributes DontDelete');\n}\n\nif (!Date.UTC.hasOwnProperty('length')) {\n $FAIL('#2: The Date.UTC.length property has the attributes DontDelete');\n}\n\n",
+ "id": "S15.9.4.3_A3_T2"
+ },
+ {
+ "section": "15.9.4.3",
+ "description": "Checking DontEnum attribute",
+ "test": "if (Date.UTC.propertyIsEnumerable('length')) {\n $ERROR('#1: The Date.UTC.length property has the attribute DontEnum');\n}\n\nfor(x in Date.UTC) {\n if(x === \"length\") {\n $ERROR('#2: The Date.UTC.length has the attribute DontEnum');\n }\n}\n\n",
+ "id": "S15.9.4.3_A3_T3"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.9.4.4.json b/website/resources/scripts/testcases2/15.9.4.4.json
new file mode 100644
index 000000000..42131d0a4
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.9.4.4.json
@@ -0,0 +1,36 @@
+{
+ "testCollection": {
+ "name": "15.9.4.4",
+ "numTests": 4,
+ "tests": [
+ {
+ "id": "15.9.4.4-0-1",
+ "path": "TestCases/chapter15/15.9/15.9.4/15.9.4.4/15.9.4.4-0-1.js",
+ "description": "Date.now must exist as a function",
+ "test": "assertTrue((typeof Date.now === \"function\"));\n",
+ "precondition": "(fnExists(Date.now))"
+ },
+ {
+ "id": "15.9.4.4-0-2",
+ "path": "TestCases/chapter15/15.9/15.9.4/15.9.4.4/15.9.4.4-0-2.js",
+ "description": "Date.now must exist as a function taking 0 parameters",
+ "test": "assertTrue((Date.now.length === 0));\n",
+ "precondition": "(fnExists(Date.now))"
+ },
+ {
+ "id": "15.9.4.4-0-3",
+ "path": "TestCases/chapter15/15.9/15.9.4/15.9.4.4/15.9.4.4-0-3.js",
+ "description": "Date.now must exist as a function",
+ "test": "assertTrue((function testcase() {\n\n var fun = Date.now;\n return (typeof (fun) === \"function\");\n }).call(this));\n",
+ "precondition": "(fnExists(Date.now))"
+ },
+ {
+ "id": "15.9.4.4-0-4",
+ "path": "TestCases/chapter15/15.9/15.9.4/15.9.4.4/15.9.4.4-0-4.js",
+ "description": "Date.now - returns number",
+ "test": "assertTrue((typeof Date.now() === \"number\"));\n",
+ "precondition": "(fnExists(Date.now))"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.9.4_Properties_of_the_Date_Constructor.json b/website/resources/scripts/testcases2/15.9.4_Properties_of_the_Date_Constructor.json
new file mode 100644
index 000000000..bae4b55ab
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.9.4_Properties_of_the_Date_Constructor.json
@@ -0,0 +1,38 @@
+{
+ "testCollection": {
+ "name": "15.9.4_Properties_of_the_Date_Constructor",
+ "numTests": 5,
+ "tests": [
+ {
+ "section": "15.9.4",
+ "description": "Checking existence of the property \"prototype\"",
+ "test": "if(!Date.hasOwnProperty(\"prototype\")){\n $ERROR('#1: The Date constructor has the property \"prototype\"');\n}\n\n",
+ "id": "S15.9.4_A1"
+ },
+ {
+ "section": "15.9.4",
+ "description": "Checking existence of the property \"parse\"",
+ "test": "if(!Date.hasOwnProperty(\"parse\")){\n $ERROR('#1: The Date constructor has the property \"parse\"');\n}\n\n",
+ "id": "S15.9.4_A2"
+ },
+ {
+ "section": "15.9.4",
+ "description": "Checking existence of the property \"UTC\"",
+ "test": "if(!Date.hasOwnProperty(\"UTC\")){\n $ERROR('#1: The Date constructor has the property \"UTC\"');\n}\n\n",
+ "id": "S15.9.4_A3"
+ },
+ {
+ "section": "15.9.4",
+ "description": "Checking Function.prototype.isPrototypeOf(Date)",
+ "test": "//CHECK#1\nif (!(Function.prototype.isPrototypeOf(Date))) {\n $ERROR('#1: the value of the internal [[Prototype]] property of the Date constructor is the Function prototype object.');\n}\n",
+ "id": "S15.9.4_A4"
+ },
+ {
+ "section": "15.9.4",
+ "description": "Checking Date.length property",
+ "test": "//CHECK#1\nif (!Date.hasOwnProperty(\"length\")){\n $ERROR('#1: Date constructor has length property');\n}\n\n//CHECK#2\nif (Date.length !== 7) {\n $ERROR('#2: Date constructor length property value should be 7');\n}\n",
+ "id": "S15.9.4_A5"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.9.5.10_Date.prototype.getFullYear.json b/website/resources/scripts/testcases2/15.9.5.10_Date.prototype.getFullYear.json
new file mode 100644
index 000000000..398f9feff
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.9.5.10_Date.prototype.getFullYear.json
@@ -0,0 +1,50 @@
+{
+ "testCollection": {
+ "name": "15.9.5.10_Date.prototype.getFullYear",
+ "numTests": 7,
+ "tests": [
+ {
+ "section": "15.9.5.10",
+ "description": "Checking absence of ReadOnly attribute",
+ "test": "x = Date.prototype.getFullYear;\nif(x === 1)\n Date.prototype.getFullYear = 2;\nelse\n Date.prototype.getFullYear = 1;\nif (Date.prototype.getFullYear === x) {\n $ERROR('#1: The Date.prototype.getFullYear has not the attribute ReadOnly');\n}\n\n",
+ "id": "S15.9.5.10_A1_T1"
+ },
+ {
+ "section": "15.9.5.10",
+ "description": "Checking absence of DontDelete attribute",
+ "test": "if (delete Date.prototype.getFullYear === false) {\n $ERROR('#1: The Date.prototype.getFullYear property has not the attributes DontDelete');\n}\n\nif (Date.prototype.hasOwnProperty('getFullYear')) {\n $FAIL('#2: The Date.prototype.getFullYear property has not the attributes DontDelete');\n}\n\n",
+ "id": "S15.9.5.10_A1_T2"
+ },
+ {
+ "section": "15.9.5.10",
+ "description": "Checking DontEnum attribute",
+ "test": "if (Date.prototype.propertyIsEnumerable('getFullYear')) {\n $ERROR('#1: The Date.prototype.getFullYear property has the attribute DontEnum');\n}\n\nfor(x in Date.prototype) {\n if(x === \"getFullYear\") {\n $ERROR('#2: The Date.prototype.getFullYear has the attribute DontEnum');\n }\n}\n\n",
+ "id": "S15.9.5.10_A1_T3"
+ },
+ {
+ "section": "15.9.5.10",
+ "description": "The \"length\" property of the \"getFullYear\" is 0",
+ "test": "if(Date.prototype.getFullYear.hasOwnProperty(\"length\") !== true){\n $ERROR('#1: The getFullYear has a \"length\" property');\n}\n\nif(Date.prototype.getFullYear.length !== 0){\n $ERROR('#2: The \"length\" property of the getFullYear is 0');\n}\n\n",
+ "id": "S15.9.5.10_A2_T1"
+ },
+ {
+ "section": "15.9.5.10",
+ "description": "Checking ReadOnly attribute",
+ "test": "x = Date.prototype.getFullYear.length;\nDate.prototype.getFullYear.length = 1;\nif (Date.prototype.getFullYear.length !== x) {\n $ERROR('#1: The Date.prototype.getFullYear.length has the attribute ReadOnly');\n}\n\n",
+ "id": "S15.9.5.10_A3_T1"
+ },
+ {
+ "section": "15.9.5.10",
+ "description": "Checking DontDelete attribute",
+ "test": "if (delete Date.prototype.getFullYear.length !== false) {\n $ERROR('#1: The Date.prototype.getFullYear.length property has the attributes DontDelete');\n}\n\nif (!Date.prototype.getFullYear.hasOwnProperty('length')) {\n $FAIL('#2: The Date.prototype.getFullYear.length property has the attributes DontDelete');\n}\n\n",
+ "id": "S15.9.5.10_A3_T2"
+ },
+ {
+ "section": "15.9.5.10",
+ "description": "Checking DontEnum attribute",
+ "test": "if (Date.prototype.getFullYear.propertyIsEnumerable('length')) {\n $ERROR('#1: The Date.prototype.getFullYear.length property has the attribute DontEnum');\n}\n\nfor(x in Date.prototype.getFullYear) {\n if(x === \"length\") {\n $ERROR('#2: The Date.prototype.getFullYear.length has the attribute DontEnum');\n }\n}\n\n",
+ "id": "S15.9.5.10_A3_T3"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.9.5.11_Date.prototype.getUTCFullYear.json b/website/resources/scripts/testcases2/15.9.5.11_Date.prototype.getUTCFullYear.json
new file mode 100644
index 000000000..96d9c343f
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.9.5.11_Date.prototype.getUTCFullYear.json
@@ -0,0 +1,50 @@
+{
+ "testCollection": {
+ "name": "15.9.5.11_Date.prototype.getUTCFullYear",
+ "numTests": 7,
+ "tests": [
+ {
+ "section": "15.9.5.11",
+ "description": "Checking absence of ReadOnly attribute",
+ "test": "x = Date.prototype.getUTCFullYear;\nif(x === 1)\n Date.prototype.getUTCFullYear = 2;\nelse\n Date.prototype.getUTCFullYear = 1;\nif (Date.prototype.getUTCFullYear === x) {\n $ERROR('#1: The Date.prototype.getUTCFullYear has not the attribute ReadOnly');\n}\n\n",
+ "id": "S15.9.5.11_A1_T1"
+ },
+ {
+ "section": "15.9.5.11",
+ "description": "Checking absence of DontDelete attribute",
+ "test": "if (delete Date.prototype.getUTCFullYear === false) {\n $ERROR('#1: The Date.prototype.getUTCFullYear property has not the attributes DontDelete');\n}\n\nif (Date.prototype.hasOwnProperty('getUTCFullYear')) {\n $FAIL('#2: The Date.prototype.getUTCFullYear property has not the attributes DontDelete');\n}\n\n",
+ "id": "S15.9.5.11_A1_T2"
+ },
+ {
+ "section": "15.9.5.11",
+ "description": "Checking DontEnum attribute",
+ "test": "if (Date.prototype.propertyIsEnumerable('getUTCFullYear')) {\n $ERROR('#1: The Date.prototype.getUTCFullYear property has the attribute DontEnum');\n}\n\nfor(x in Date.prototype) {\n if(x === \"getUTCFullYear\") {\n $ERROR('#2: The Date.prototype.getUTCFullYear has the attribute DontEnum');\n }\n}\n\n",
+ "id": "S15.9.5.11_A1_T3"
+ },
+ {
+ "section": "15.9.5.11",
+ "description": "The \"length\" property of the \"getUTCFullYear\" is 0",
+ "test": "if(Date.prototype.getUTCFullYear.hasOwnProperty(\"length\") !== true){\n $ERROR('#1: The getUTCFullYear has a \"length\" property');\n}\n\nif(Date.prototype.getUTCFullYear.length !== 0){\n $ERROR('#2: The \"length\" property of the getUTCFullYear is 0');\n}\n\n",
+ "id": "S15.9.5.11_A2_T1"
+ },
+ {
+ "section": "15.9.5.11",
+ "description": "Checking ReadOnly attribute",
+ "test": "x = Date.prototype.getUTCFullYear.length;\nDate.prototype.getUTCFullYear.length = 1;\nif (Date.prototype.getUTCFullYear.length !== x) {\n $ERROR('#1: The Date.prototype.getUTCFullYear.length has the attribute ReadOnly');\n}\n\n",
+ "id": "S15.9.5.11_A3_T1"
+ },
+ {
+ "section": "15.9.5.11",
+ "description": "Checking DontDelete attribute",
+ "test": "if (delete Date.prototype.getUTCFullYear.length !== false) {\n $ERROR('#1: The Date.prototype.getUTCFullYear.length property has the attributes DontDelete');\n}\n\nif (!Date.prototype.getUTCFullYear.hasOwnProperty('length')) {\n $FAIL('#2: The Date.prototype.getUTCFullYear.length property has the attributes DontDelete');\n}\n\n",
+ "id": "S15.9.5.11_A3_T2"
+ },
+ {
+ "section": "15.9.5.11",
+ "description": "Checking DontEnum attribute",
+ "test": "if (Date.prototype.getUTCFullYear.propertyIsEnumerable('length')) {\n $ERROR('#1: The Date.prototype.getUTCFullYear.length property has the attribute DontEnum');\n}\n\nfor(x in Date.prototype.getUTCFullYear) {\n if(x === \"length\") {\n $ERROR('#2: The Date.prototype.getUTCFullYear.length has the attribute DontEnum');\n }\n}\n\n",
+ "id": "S15.9.5.11_A3_T3"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.9.5.12_Date.prototype.getMonth.json b/website/resources/scripts/testcases2/15.9.5.12_Date.prototype.getMonth.json
new file mode 100644
index 000000000..37ad50506
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.9.5.12_Date.prototype.getMonth.json
@@ -0,0 +1,50 @@
+{
+ "testCollection": {
+ "name": "15.9.5.12_Date.prototype.getMonth",
+ "numTests": 7,
+ "tests": [
+ {
+ "section": "15.9.5.12",
+ "description": "Checking absence of ReadOnly attribute",
+ "test": "x = Date.prototype.getMonth;\nif(x === 1)\n Date.prototype.getMonth = 2;\nelse\n Date.prototype.getMonth = 1;\nif (Date.prototype.getMonth === x) {\n $ERROR('#1: The Date.prototype.getMonth has not the attribute ReadOnly');\n}\n\n",
+ "id": "S15.9.5.12_A1_T1"
+ },
+ {
+ "section": "15.9.5.12",
+ "description": "Checking absence of DontDelete attribute",
+ "test": "if (delete Date.prototype.getMonth === false) {\n $ERROR('#1: The Date.prototype.getMonth property has not the attributes DontDelete');\n}\n\nif (Date.prototype.hasOwnProperty('getMonth')) {\n $FAIL('#2: The Date.prototype.getMonth property has not the attributes DontDelete');\n}\n\n",
+ "id": "S15.9.5.12_A1_T2"
+ },
+ {
+ "section": "15.9.5.12",
+ "description": "Checking DontEnum attribute",
+ "test": "if (Date.prototype.propertyIsEnumerable('getMonth')) {\n $ERROR('#1: The Date.prototype.getMonth property has the attribute DontEnum');\n}\n\nfor(x in Date.prototype) {\n if(x === \"getMonth\") {\n $ERROR('#2: The Date.prototype.getMonth has the attribute DontEnum');\n }\n}\n\n",
+ "id": "S15.9.5.12_A1_T3"
+ },
+ {
+ "section": "15.9.5.12",
+ "description": "The \"length\" property of the \"getMonth\" is 0",
+ "test": "if(Date.prototype.getMonth.hasOwnProperty(\"length\") !== true){\n $ERROR('#1: The getMonth has a \"length\" property');\n}\n\nif(Date.prototype.getMonth.length !== 0){\n $ERROR('#2: The \"length\" property of the getMonth is 0');\n}\n\n",
+ "id": "S15.9.5.12_A2_T1"
+ },
+ {
+ "section": "15.9.5.12",
+ "description": "Checking ReadOnly attribute",
+ "test": "x = Date.prototype.getMonth.length;\nDate.prototype.getMonth.length = 1;\nif (Date.prototype.getMonth.length !== x) {\n $ERROR('#1: The Date.prototype.getMonth.length has the attribute ReadOnly');\n}\n\n",
+ "id": "S15.9.5.12_A3_T1"
+ },
+ {
+ "section": "15.9.5.12",
+ "description": "Checking DontDelete attribute",
+ "test": "if (delete Date.prototype.getMonth.length !== false) {\n $ERROR('#1: The Date.prototype.getMonth.length property has the attributes DontDelete');\n}\n\nif (!Date.prototype.getMonth.hasOwnProperty('length')) {\n $FAIL('#2: The Date.prototype.getMonth.length property has the attributes DontDelete');\n}\n\n",
+ "id": "S15.9.5.12_A3_T2"
+ },
+ {
+ "section": "15.9.5.12",
+ "description": "Checking DontEnum attribute",
+ "test": "if (Date.prototype.getMonth.propertyIsEnumerable('length')) {\n $ERROR('#1: The Date.prototype.getMonth.length property has the attribute DontEnum');\n}\n\nfor(x in Date.prototype.getMonth) {\n if(x === \"length\") {\n $ERROR('#2: The Date.prototype.getMonth.length has the attribute DontEnum');\n }\n}\n\n",
+ "id": "S15.9.5.12_A3_T3"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.9.5.13_Date.prototype.getUTCMonth.json b/website/resources/scripts/testcases2/15.9.5.13_Date.prototype.getUTCMonth.json
new file mode 100644
index 000000000..c45ebcf53
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.9.5.13_Date.prototype.getUTCMonth.json
@@ -0,0 +1,50 @@
+{
+ "testCollection": {
+ "name": "15.9.5.13_Date.prototype.getUTCMonth",
+ "numTests": 7,
+ "tests": [
+ {
+ "section": "15.9.5.13",
+ "description": "Checking absence of ReadOnly attribute",
+ "test": "x = Date.prototype.getUTCMonth;\nif(x === 1)\n Date.prototype.getUTCMonth = 2;\nelse\n Date.prototype.getUTCMonth = 1;\nif (Date.prototype.getUTCMonth === x) {\n $ERROR('#1: The Date.prototype.getUTCMonth has not the attribute ReadOnly');\n}\n\n",
+ "id": "S15.9.5.13_A1_T1"
+ },
+ {
+ "section": "15.9.5.13",
+ "description": "Checking absence of DontDelete attribute",
+ "test": "if (delete Date.prototype.getUTCMonth === false) {\n $ERROR('#1: The Date.prototype.getUTCMonth property has not the attributes DontDelete');\n}\n\nif (Date.prototype.hasOwnProperty('getUTCMonth')) {\n $FAIL('#2: The Date.prototype.getUTCMonth property has not the attributes DontDelete');\n}\n\n",
+ "id": "S15.9.5.13_A1_T2"
+ },
+ {
+ "section": "15.9.5.13",
+ "description": "Checking DontEnum attribute",
+ "test": "if (Date.prototype.propertyIsEnumerable('getUTCMonth')) {\n $ERROR('#1: The Date.prototype.getUTCMonth property has the attribute DontEnum');\n}\n\nfor(x in Date.prototype) {\n if(x === \"getUTCMonth\") {\n $ERROR('#2: The Date.prototype.getUTCMonth has the attribute DontEnum');\n }\n}\n\n",
+ "id": "S15.9.5.13_A1_T3"
+ },
+ {
+ "section": "15.9.5.13",
+ "description": "The \"length\" property of the \"getUTCMonth\" is 0",
+ "test": "if(Date.prototype.getUTCMonth.hasOwnProperty(\"length\") !== true){\n $ERROR('#1: The getUTCMonth has a \"length\" property');\n}\n\nif(Date.prototype.getUTCMonth.length !== 0){\n $ERROR('#2: The \"length\" property of the getUTCMonth is 0');\n}\n\n",
+ "id": "S15.9.5.13_A2_T1"
+ },
+ {
+ "section": "15.9.5.13",
+ "description": "Checking ReadOnly attribute",
+ "test": "x = Date.prototype.getUTCMonth.length;\nDate.prototype.getUTCMonth.length = 1;\nif (Date.prototype.getUTCMonth.length !== x) {\n $ERROR('#1: The Date.prototype.getUTCMonth.length has the attribute ReadOnly');\n}\n\n",
+ "id": "S15.9.5.13_A3_T1"
+ },
+ {
+ "section": "15.9.5.13",
+ "description": "Checking DontDelete attribute",
+ "test": "if (delete Date.prototype.getUTCMonth.length !== false) {\n $ERROR('#1: The Date.prototype.getUTCMonth.length property has the attributes DontDelete');\n}\n\nif (!Date.prototype.getUTCMonth.hasOwnProperty('length')) {\n $FAIL('#2: The Date.prototype.getUTCMonth.length property has the attributes DontDelete');\n}\n\n",
+ "id": "S15.9.5.13_A3_T2"
+ },
+ {
+ "section": "15.9.5.13",
+ "description": "Checking DontEnum attribute",
+ "test": "if (Date.prototype.getUTCMonth.propertyIsEnumerable('length')) {\n $ERROR('#1: The Date.prototype.getUTCMonth.length property has the attribute DontEnum');\n}\n\nfor(x in Date.prototype.getUTCMonth) {\n if(x === \"length\") {\n $ERROR('#2: The Date.prototype.getUTCMonth.length has the attribute DontEnum');\n }\n}\n\n",
+ "id": "S15.9.5.13_A3_T3"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.9.5.14_Date.prototype.getDate.json b/website/resources/scripts/testcases2/15.9.5.14_Date.prototype.getDate.json
new file mode 100644
index 000000000..ad1362c92
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.9.5.14_Date.prototype.getDate.json
@@ -0,0 +1,50 @@
+{
+ "testCollection": {
+ "name": "15.9.5.14_Date.prototype.getDate",
+ "numTests": 7,
+ "tests": [
+ {
+ "section": "15.9.5.14",
+ "description": "Checking absence of ReadOnly attribute",
+ "test": "x = Date.prototype.getDate;\nif(x === 1)\n Date.prototype.getDate = 2;\nelse\n Date.prototype.getDate = 1;\nif (Date.prototype.getDate === x) {\n $ERROR('#1: The Date.prototype.getDate has not the attribute ReadOnly');\n}\n\n",
+ "id": "S15.9.5.14_A1_T1"
+ },
+ {
+ "section": "15.9.5.14",
+ "description": "Checking absence of DontDelete attribute",
+ "test": "if (delete Date.prototype.getDate === false) {\n $ERROR('#1: The Date.prototype.getDate property has not the attributes DontDelete');\n}\n\nif (Date.prototype.hasOwnProperty('getDate')) {\n $FAIL('#2: The Date.prototype.getDate property has not the attributes DontDelete');\n}\n\n",
+ "id": "S15.9.5.14_A1_T2"
+ },
+ {
+ "section": "15.9.5.14",
+ "description": "Checking DontEnum attribute",
+ "test": "if (Date.prototype.propertyIsEnumerable('getDate')) {\n $ERROR('#1: The Date.prototype.getDate property has the attribute DontEnum');\n}\n\nfor(x in Date.prototype) {\n if(x === \"getDate\") {\n $ERROR('#2: The Date.prototype.getDate has the attribute DontEnum');\n }\n}\n\n",
+ "id": "S15.9.5.14_A1_T3"
+ },
+ {
+ "section": "15.9.5.14",
+ "description": "The \"length\" property of the \"getDate\" is 0",
+ "test": "if(Date.prototype.getDate.hasOwnProperty(\"length\") !== true){\n $ERROR('#1: The getDate has a \"length\" property');\n}\n\nif(Date.prototype.getDate.length !== 0){\n $ERROR('#2: The \"length\" property of the getDate is 0');\n}\n\n",
+ "id": "S15.9.5.14_A2_T1"
+ },
+ {
+ "section": "15.9.5.14",
+ "description": "Checking ReadOnly attribute",
+ "test": "x = Date.prototype.getDate.length;\nDate.prototype.getDate.length = 1;\nif (Date.prototype.getDate.length !== x) {\n $ERROR('#1: The Date.prototype.getDate.length has the attribute ReadOnly');\n}\n\n",
+ "id": "S15.9.5.14_A3_T1"
+ },
+ {
+ "section": "15.9.5.14",
+ "description": "Checking DontDelete attribute",
+ "test": "if (delete Date.prototype.getDate.length !== false) {\n $ERROR('#1: The Date.prototype.getDate.length property has the attributes DontDelete');\n}\n\nif (!Date.prototype.getDate.hasOwnProperty('length')) {\n $FAIL('#2: The Date.prototype.getDate.length property has the attributes DontDelete');\n}\n\n",
+ "id": "S15.9.5.14_A3_T2"
+ },
+ {
+ "section": "15.9.5.14",
+ "description": "Checking DontEnum attribute",
+ "test": "if (Date.prototype.getDate.propertyIsEnumerable('length')) {\n $ERROR('#1: The Date.prototype.getDate.length property has the attribute DontEnum');\n}\n\nfor(x in Date.prototype.getDate) {\n if(x === \"length\") {\n $ERROR('#2: The Date.prototype.getDate.length has the attribute DontEnum');\n }\n}\n\n",
+ "id": "S15.9.5.14_A3_T3"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.9.5.15_Date.prototype.getUTCDate.json b/website/resources/scripts/testcases2/15.9.5.15_Date.prototype.getUTCDate.json
new file mode 100644
index 000000000..426ad5cf7
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.9.5.15_Date.prototype.getUTCDate.json
@@ -0,0 +1,50 @@
+{
+ "testCollection": {
+ "name": "15.9.5.15_Date.prototype.getUTCDate",
+ "numTests": 7,
+ "tests": [
+ {
+ "section": "15.9.5.15",
+ "description": "Checking absence of ReadOnly attribute",
+ "test": "x = Date.prototype.getUTCDate;\nif(x === 1)\n Date.prototype.getUTCDate = 2;\nelse\n Date.prototype.getUTCDate = 1;\nif (Date.prototype.getUTCDate === x) {\n $ERROR('#1: The Date.prototype.getUTCDate has not the attribute ReadOnly');\n}\n\n",
+ "id": "S15.9.5.15_A1_T1"
+ },
+ {
+ "section": "15.9.5.15",
+ "description": "Checking absence of DontDelete attribute",
+ "test": "if (delete Date.prototype.getUTCDate === false) {\n $ERROR('#1: The Date.prototype.getUTCDate property has not the attributes DontDelete');\n}\n\nif (Date.prototype.hasOwnProperty('getUTCDate')) {\n $FAIL('#2: The Date.prototype.getUTCDate property has not the attributes DontDelete');\n}\n\n",
+ "id": "S15.9.5.15_A1_T2"
+ },
+ {
+ "section": "15.9.5.15",
+ "description": "Checking DontEnum attribute",
+ "test": "if (Date.prototype.propertyIsEnumerable('getUTCDate')) {\n $ERROR('#1: The Date.prototype.getUTCDate property has the attribute DontEnum');\n}\n\nfor(x in Date.prototype) {\n if(x === \"getUTCDate\") {\n $ERROR('#2: The Date.prototype.getUTCDate has the attribute DontEnum');\n }\n}\n\n",
+ "id": "S15.9.5.15_A1_T3"
+ },
+ {
+ "section": "15.9.5.15",
+ "description": "The \"length\" property of the \"getUTCDate\" is 0",
+ "test": "if(Date.prototype.getUTCDate.hasOwnProperty(\"length\") !== true){\n $ERROR('#1: The getUTCDate has a \"length\" property');\n}\n\nif(Date.prototype.getUTCDate.length !== 0){\n $ERROR('#2: The \"length\" property of the getUTCDate is 0');\n}\n\n",
+ "id": "S15.9.5.15_A2_T1"
+ },
+ {
+ "section": "15.9.5.15",
+ "description": "Checking ReadOnly attribute",
+ "test": "x = Date.prototype.getUTCDate.length;\nDate.prototype.getUTCDate.length = 1;\nif (Date.prototype.getUTCDate.length !== x) {\n $ERROR('#1: The Date.prototype.getUTCDate.length has the attribute ReadOnly');\n}\n\n",
+ "id": "S15.9.5.15_A3_T1"
+ },
+ {
+ "section": "15.9.5.15",
+ "description": "Checking DontDelete attribute",
+ "test": "if (delete Date.prototype.getUTCDate.length !== false) {\n $ERROR('#1: The Date.prototype.getUTCDate.length property has the attributes DontDelete');\n}\n\nif (!Date.prototype.getUTCDate.hasOwnProperty('length')) {\n $FAIL('#2: The Date.prototype.getUTCDate.length property has the attributes DontDelete');\n}\n\n",
+ "id": "S15.9.5.15_A3_T2"
+ },
+ {
+ "section": "15.9.5.15",
+ "description": "Checking DontEnum attribute",
+ "test": "if (Date.prototype.getUTCDate.propertyIsEnumerable('length')) {\n $ERROR('#1: The Date.prototype.getUTCDate.length property has the attribute DontEnum');\n}\n\nfor(x in Date.prototype.getUTCDate) {\n if(x === \"length\") {\n $ERROR('#2: The Date.prototype.getUTCDate.length has the attribute DontEnum');\n }\n}\n\n",
+ "id": "S15.9.5.15_A3_T3"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.9.5.16_Date.prototype.getDay.json b/website/resources/scripts/testcases2/15.9.5.16_Date.prototype.getDay.json
new file mode 100644
index 000000000..8f182baef
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.9.5.16_Date.prototype.getDay.json
@@ -0,0 +1,50 @@
+{
+ "testCollection": {
+ "name": "15.9.5.16_Date.prototype.getDay",
+ "numTests": 7,
+ "tests": [
+ {
+ "section": "15.9.5.16",
+ "description": "Checking absence of ReadOnly attribute",
+ "test": "x = Date.prototype.getDay;\nif(x === 1)\n Date.prototype.getDay = 2;\nelse\n Date.prototype.getDay = 1;\nif (Date.prototype.getDay === x) {\n $ERROR('#1: The Date.prototype.getDay has not the attribute ReadOnly');\n}\n\n",
+ "id": "S15.9.5.16_A1_T1"
+ },
+ {
+ "section": "15.9.5.16",
+ "description": "Checking absence of DontDelete attribute",
+ "test": "if (delete Date.prototype.getDay === false) {\n $ERROR('#1: The Date.prototype.getDay property has not the attributes DontDelete');\n}\n\nif (Date.prototype.hasOwnProperty('getDay')) {\n $FAIL('#2: The Date.prototype.getDay property has not the attributes DontDelete');\n}\n\n",
+ "id": "S15.9.5.16_A1_T2"
+ },
+ {
+ "section": "15.9.5.16",
+ "description": "Checking DontEnum attribute",
+ "test": "if (Date.prototype.propertyIsEnumerable('getDay')) {\n $ERROR('#1: The Date.prototype.getDay property has the attribute DontEnum');\n}\n\nfor(x in Date.prototype) {\n if(x === \"getDay\") {\n $ERROR('#2: The Date.prototype.getDay has the attribute DontEnum');\n }\n}\n\n",
+ "id": "S15.9.5.16_A1_T3"
+ },
+ {
+ "section": "15.9.5.16",
+ "description": "The \"length\" property of the \"getDay\" is 0",
+ "test": "if(Date.prototype.getDay.hasOwnProperty(\"length\") !== true){\n $ERROR('#1: The getDay has a \"length\" property');\n}\n\nif(Date.prototype.getDay.length !== 0){\n $ERROR('#2: The \"length\" property of the getDay is 0');\n}\n\n",
+ "id": "S15.9.5.16_A2_T1"
+ },
+ {
+ "section": "15.9.5.16",
+ "description": "Checking ReadOnly attribute",
+ "test": "x = Date.prototype.getDay.length;\nDate.prototype.getDay.length = 1;\nif (Date.prototype.getDay.length !== x) {\n $ERROR('#1: The Date.prototype.getDay.length has the attribute ReadOnly');\n}\n\n",
+ "id": "S15.9.5.16_A3_T1"
+ },
+ {
+ "section": "15.9.5.16",
+ "description": "Checking DontDelete attribute",
+ "test": "if (delete Date.prototype.getDay.length !== false) {\n $ERROR('#1: The Date.prototype.getDay.length property has the attributes DontDelete');\n}\n\nif (!Date.prototype.getDay.hasOwnProperty('length')) {\n $FAIL('#2: The Date.prototype.getDay.length property has the attributes DontDelete');\n}\n\n",
+ "id": "S15.9.5.16_A3_T2"
+ },
+ {
+ "section": "15.9.5.16",
+ "description": "Checking DontEnum attribute",
+ "test": "if (Date.prototype.getDay.propertyIsEnumerable('length')) {\n $ERROR('#1: The Date.prototype.getDay.length property has the attribute DontEnum');\n}\n\nfor(x in Date.prototype.getDay) {\n if(x === \"length\") {\n $ERROR('#2: The Date.prototype.getDay.length has the attribute DontEnum');\n }\n}\n\n",
+ "id": "S15.9.5.16_A3_T3"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.9.5.17_Date.prototype.getUTCDay.json b/website/resources/scripts/testcases2/15.9.5.17_Date.prototype.getUTCDay.json
new file mode 100644
index 000000000..cde77fd41
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.9.5.17_Date.prototype.getUTCDay.json
@@ -0,0 +1,50 @@
+{
+ "testCollection": {
+ "name": "15.9.5.17_Date.prototype.getUTCDay",
+ "numTests": 7,
+ "tests": [
+ {
+ "section": "15.9.5.17",
+ "description": "Checking absence of ReadOnly attribute",
+ "test": "x = Date.prototype.getUTCDay;\nif(x === 1)\n Date.prototype.getUTCDay = 2;\nelse\n Date.prototype.getUTCDay = 1;\nif (Date.prototype.getUTCDay === x) {\n $ERROR('#1: The Date.prototype.getUTCDay has not the attribute ReadOnly');\n}\n\n",
+ "id": "S15.9.5.17_A1_T1"
+ },
+ {
+ "section": "15.9.5.17",
+ "description": "Checking absence of DontDelete attribute",
+ "test": "if (delete Date.prototype.getUTCDay === false) {\n $ERROR('#1: The Date.prototype.getUTCDay property has not the attributes DontDelete');\n}\n\nif (Date.prototype.hasOwnProperty('getUTCDay')) {\n $FAIL('#2: The Date.prototype.getUTCDay property has not the attributes DontDelete');\n}\n\n",
+ "id": "S15.9.5.17_A1_T2"
+ },
+ {
+ "section": "15.9.5.17",
+ "description": "Checking DontEnum attribute",
+ "test": "if (Date.prototype.propertyIsEnumerable('getUTCDay')) {\n $ERROR('#1: The Date.prototype.getUTCDay property has the attribute DontEnum');\n}\n\nfor(x in Date.prototype) {\n if(x === \"getUTCDay\") {\n $ERROR('#2: The Date.prototype.getUTCDay has the attribute DontEnum');\n }\n}\n\n",
+ "id": "S15.9.5.17_A1_T3"
+ },
+ {
+ "section": "15.9.5.17",
+ "description": "The \"length\" property of the \"getUTCDay\" is 0",
+ "test": "if(Date.prototype.getUTCDay.hasOwnProperty(\"length\") !== true){\n $ERROR('#1: The getUTCDay has a \"length\" property');\n}\n\nif(Date.prototype.getUTCDay.length !== 0){\n $ERROR('#2: The \"length\" property of the getUTCDay is 0');\n}\n\n",
+ "id": "S15.9.5.17_A2_T1"
+ },
+ {
+ "section": "15.9.5.17",
+ "description": "Checking ReadOnly attribute",
+ "test": "x = Date.prototype.getUTCDay.length;\nDate.prototype.getUTCDay.length = 1;\nif (Date.prototype.getUTCDay.length !== x) {\n $ERROR('#1: The Date.prototype.getUTCDay.length has the attribute ReadOnly');\n}\n\n",
+ "id": "S15.9.5.17_A3_T1"
+ },
+ {
+ "section": "15.9.5.17",
+ "description": "Checking DontDelete attribute",
+ "test": "if (delete Date.prototype.getUTCDay.length !== false) {\n $ERROR('#1: The Date.prototype.getUTCDay.length property has the attributes DontDelete');\n}\n\nif (!Date.prototype.getUTCDay.hasOwnProperty('length')) {\n $FAIL('#2: The Date.prototype.getUTCDay.length property has the attributes DontDelete');\n}\n\n",
+ "id": "S15.9.5.17_A3_T2"
+ },
+ {
+ "section": "15.9.5.17",
+ "description": "Checking DontEnum attribute",
+ "test": "if (Date.prototype.getUTCDay.propertyIsEnumerable('length')) {\n $ERROR('#1: The Date.prototype.getUTCDay.length property has the attribute DontEnum');\n}\n\nfor(x in Date.prototype.getUTCDay) {\n if(x === \"length\") {\n $ERROR('#2: The Date.prototype.getUTCDay.length has the attribute DontEnum');\n }\n}\n\n",
+ "id": "S15.9.5.17_A3_T3"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.9.5.18_Date.prototype.getHours.json b/website/resources/scripts/testcases2/15.9.5.18_Date.prototype.getHours.json
new file mode 100644
index 000000000..c34dbd0a0
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.9.5.18_Date.prototype.getHours.json
@@ -0,0 +1,50 @@
+{
+ "testCollection": {
+ "name": "15.9.5.18_Date.prototype.getHours",
+ "numTests": 7,
+ "tests": [
+ {
+ "section": "15.9.5.18",
+ "description": "Checking absence of ReadOnly attribute",
+ "test": "x = Date.prototype.getHours;\nif(x === 1)\n Date.prototype.getHours = 2;\nelse\n Date.prototype.getHours = 1;\nif (Date.prototype.getHours === x) {\n $ERROR('#1: The Date.prototype.getHours has not the attribute ReadOnly');\n}\n\n",
+ "id": "S15.9.5.18_A1_T1"
+ },
+ {
+ "section": "15.9.5.18",
+ "description": "Checking absence of DontDelete attribute",
+ "test": "if (delete Date.prototype.getHours === false) {\n $ERROR('#1: The Date.prototype.getHours property has not the attributes DontDelete');\n}\n\nif (Date.prototype.hasOwnProperty('getHours')) {\n $FAIL('#2: The Date.prototype.getHours property has not the attributes DontDelete');\n}\n\n",
+ "id": "S15.9.5.18_A1_T2"
+ },
+ {
+ "section": "15.9.5.18",
+ "description": "Checking DontEnum attribute",
+ "test": "if (Date.prototype.propertyIsEnumerable('getHours')) {\n $ERROR('#1: The Date.prototype.getHours property has the attribute DontEnum');\n}\n\nfor(x in Date.prototype) {\n if(x === \"getHours\") {\n $ERROR('#2: The Date.prototype.getHours has the attribute DontEnum');\n }\n}\n\n",
+ "id": "S15.9.5.18_A1_T3"
+ },
+ {
+ "section": "15.9.5.18",
+ "description": "The \"length\" property of the \"getHours\" is 0",
+ "test": "if(Date.prototype.getHours.hasOwnProperty(\"length\") !== true){\n $ERROR('#1: The getHours has a \"length\" property');\n}\n\nif(Date.prototype.getHours.length !== 0){\n $ERROR('#2: The \"length\" property of the getHours is 0');\n}\n\n",
+ "id": "S15.9.5.18_A2_T1"
+ },
+ {
+ "section": "15.9.5.18",
+ "description": "Checking ReadOnly attribute",
+ "test": "x = Date.prototype.getHours.length;\nDate.prototype.getHours.length = 1;\nif (Date.prototype.getHours.length !== x) {\n $ERROR('#1: The Date.prototype.getHours.length has the attribute ReadOnly');\n}\n\n",
+ "id": "S15.9.5.18_A3_T1"
+ },
+ {
+ "section": "15.9.5.18",
+ "description": "Checking DontDelete attribute",
+ "test": "if (delete Date.prototype.getHours.length !== false) {\n $ERROR('#1: The Date.prototype.getHours.length property has the attributes DontDelete');\n}\n\nif (!Date.prototype.getHours.hasOwnProperty('length')) {\n $FAIL('#2: The Date.prototype.getHours.length property has the attributes DontDelete');\n}\n\n",
+ "id": "S15.9.5.18_A3_T2"
+ },
+ {
+ "section": "15.9.5.18",
+ "description": "Checking DontEnum attribute",
+ "test": "if (Date.prototype.getHours.propertyIsEnumerable('length')) {\n $ERROR('#1: The Date.prototype.getHours.length property has the attribute DontEnum');\n}\n\nfor(x in Date.prototype.getHours) {\n if(x === \"length\") {\n $ERROR('#2: The Date.prototype.getHours.length has the attribute DontEnum');\n }\n}\n\n",
+ "id": "S15.9.5.18_A3_T3"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.9.5.19_Date.prototype.getUTCHours.json b/website/resources/scripts/testcases2/15.9.5.19_Date.prototype.getUTCHours.json
new file mode 100644
index 000000000..5caed883f
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.9.5.19_Date.prototype.getUTCHours.json
@@ -0,0 +1,50 @@
+{
+ "testCollection": {
+ "name": "15.9.5.19_Date.prototype.getUTCHours",
+ "numTests": 7,
+ "tests": [
+ {
+ "section": "15.9.5.19",
+ "description": "Checking absence of ReadOnly attribute",
+ "test": "x = Date.prototype.getUTCHours;\nif(x === 1)\n Date.prototype.getUTCHours = 2;\nelse\n Date.prototype.getUTCHours = 1;\nif (Date.prototype.getUTCHours === x) {\n $ERROR('#1: The Date.prototype.getUTCHours has not the attribute ReadOnly');\n}\n\n",
+ "id": "S15.9.5.19_A1_T1"
+ },
+ {
+ "section": "15.9.5.19",
+ "description": "Checking absence of DontDelete attribute",
+ "test": "if (delete Date.prototype.getUTCHours === false) {\n $ERROR('#1: The Date.prototype.getUTCHours property has not the attributes DontDelete');\n}\n\nif (Date.prototype.hasOwnProperty('getUTCHours')) {\n $FAIL('#2: The Date.prototype.getUTCHours property has not the attributes DontDelete');\n}\n\n",
+ "id": "S15.9.5.19_A1_T2"
+ },
+ {
+ "section": "15.9.5.19",
+ "description": "Checking DontEnum attribute",
+ "test": "if (Date.prototype.propertyIsEnumerable('getUTCHours')) {\n $ERROR('#1: The Date.prototype.getUTCHours property has the attribute DontEnum');\n}\n\nfor(x in Date.prototype) {\n if(x === \"getUTCHours\") {\n $ERROR('#2: The Date.prototype.getUTCHours has the attribute DontEnum');\n }\n}\n\n",
+ "id": "S15.9.5.19_A1_T3"
+ },
+ {
+ "section": "15.9.5.19",
+ "description": "The \"length\" property of the \"getUTCHours\" is 0",
+ "test": "if(Date.prototype.getUTCHours.hasOwnProperty(\"length\") !== true){\n $ERROR('#1: The getUTCHours has a \"length\" property');\n}\n\nif(Date.prototype.getUTCHours.length !== 0){\n $ERROR('#2: The \"length\" property of the getUTCHours is 0');\n}\n\n",
+ "id": "S15.9.5.19_A2_T1"
+ },
+ {
+ "section": "15.9.5.19",
+ "description": "Checking ReadOnly attribute",
+ "test": "x = Date.prototype.getUTCHours.length;\nDate.prototype.getUTCHours.length = 1;\nif (Date.prototype.getUTCHours.length !== x) {\n $ERROR('#1: The Date.prototype.getUTCHours.length has the attribute ReadOnly');\n}\n\n",
+ "id": "S15.9.5.19_A3_T1"
+ },
+ {
+ "section": "15.9.5.19",
+ "description": "Checking DontDelete attribute",
+ "test": "if (delete Date.prototype.getUTCHours.length !== false) {\n $ERROR('#1: The Date.prototype.getUTCHours.length property has the attributes DontDelete');\n}\n\nif (!Date.prototype.getUTCHours.hasOwnProperty('length')) {\n $FAIL('#2: The Date.prototype.getUTCHours.length property has the attributes DontDelete');\n}\n\n",
+ "id": "S15.9.5.19_A3_T2"
+ },
+ {
+ "section": "15.9.5.19",
+ "description": "Checking DontEnum attribute",
+ "test": "if (Date.prototype.getUTCHours.propertyIsEnumerable('length')) {\n $ERROR('#1: The Date.prototype.getUTCHours.length property has the attribute DontEnum');\n}\n\nfor(x in Date.prototype.getUTCHours) {\n if(x === \"length\") {\n $ERROR('#2: The Date.prototype.getUTCHours.length has the attribute DontEnum');\n }\n}\n\n",
+ "id": "S15.9.5.19_A3_T3"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.9.5.1_Date.prototype.constructor.json b/website/resources/scripts/testcases2/15.9.5.1_Date.prototype.constructor.json
new file mode 100644
index 000000000..5ce94049f
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.9.5.1_Date.prototype.constructor.json
@@ -0,0 +1,50 @@
+{
+ "testCollection": {
+ "name": "15.9.5.1_Date.prototype.constructor",
+ "numTests": 7,
+ "tests": [
+ {
+ "section": "15.9.5.1",
+ "description": "Checking absence of ReadOnly attribute",
+ "test": "x = Date.prototype.constructor;\nif(x === 1)\n Date.prototype.constructor = 2;\nelse\n Date.prototype.constructor = 1;\nif (Date.prototype.constructor === x) {\n $ERROR('#1: The Date.prototype.constructor has not the attribute ReadOnly');\n}\n\n",
+ "id": "S15.9.5.1_A1_T1"
+ },
+ {
+ "section": "15.9.5.1",
+ "description": "Checking absence of DontDelete attribute",
+ "test": "if (delete Date.prototype.constructor === false) {\n $ERROR('#1: The Date.prototype.constructor property has not the attributes DontDelete');\n}\n\nif (Date.prototype.hasOwnProperty('constructor')) {\n $FAIL('#2: The Date.prototype.constructor property has not the attributes DontDelete');\n}\n\n",
+ "id": "S15.9.5.1_A1_T2"
+ },
+ {
+ "section": "15.9.5.1",
+ "description": "Checking DontEnum attribute",
+ "test": "if (Date.prototype.propertyIsEnumerable('constructor')) {\n $ERROR('#1: The Date.prototype.constructor property has the attribute DontEnum');\n}\n\nfor(x in Date.prototype) {\n if(x === \"constructor\") {\n $ERROR('#2: The Date.prototype.constructor has the attribute DontEnum');\n }\n}\n\n",
+ "id": "S15.9.5.1_A1_T3"
+ },
+ {
+ "section": "15.9.5.1",
+ "description": "The \"length\" property of the \"constructor\" is 7",
+ "test": "if(Date.prototype.constructor.hasOwnProperty(\"length\") !== true){\n $ERROR('#1: The constructor has a \"length\" property');\n}\n\nif(Date.prototype.constructor.length !== 7){\n $ERROR('#2: The \"length\" property of the constructor is 7');\n}\n\n",
+ "id": "S15.9.5.1_A2_T1"
+ },
+ {
+ "section": "15.9.5.1",
+ "description": "Checking ReadOnly attribute",
+ "test": "x = Date.prototype.constructor.length;\nDate.prototype.constructor.length = 1;\nif (Date.prototype.constructor.length !== x) {\n $ERROR('#1: The Date.prototype.constructor.length has the attribute ReadOnly');\n}\n\n",
+ "id": "S15.9.5.1_A3_T1"
+ },
+ {
+ "section": "15.9.5.1",
+ "description": "Checking DontDelete attribute",
+ "test": "if (delete Date.prototype.constructor.length !== false) {\n $ERROR('#1: The Date.prototype.constructor.length property has the attributes DontDelete');\n}\n\nif (!Date.prototype.constructor.hasOwnProperty('length')) {\n $FAIL('#2: The Date.prototype.constructor.length property has the attributes DontDelete');\n}\n\n",
+ "id": "S15.9.5.1_A3_T2"
+ },
+ {
+ "section": "15.9.5.1",
+ "description": "Checking DontEnum attribute",
+ "test": "if (Date.prototype.constructor.propertyIsEnumerable('length')) {\n $ERROR('#1: The Date.prototype.constructor.length property has the attribute DontEnum');\n}\n\nfor(x in Date.prototype.constructor) {\n if(x === \"length\") {\n $ERROR('#2: The Date.prototype.constructor.length has the attribute DontEnum');\n }\n}\n\n",
+ "id": "S15.9.5.1_A3_T3"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.9.5.20_Date.prototype.getMinutes.json b/website/resources/scripts/testcases2/15.9.5.20_Date.prototype.getMinutes.json
new file mode 100644
index 000000000..0c8e7fbdc
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.9.5.20_Date.prototype.getMinutes.json
@@ -0,0 +1,50 @@
+{
+ "testCollection": {
+ "name": "15.9.5.20_Date.prototype.getMinutes",
+ "numTests": 7,
+ "tests": [
+ {
+ "section": "15.9.5.20",
+ "description": "Checking absence of ReadOnly attribute",
+ "test": "x = Date.prototype.getMinutes;\nif(x === 1)\n Date.prototype.getMinutes = 2;\nelse\n Date.prototype.getMinutes = 1;\nif (Date.prototype.getMinutes === x) {\n $ERROR('#1: The Date.prototype.getMinutes has not the attribute ReadOnly');\n}\n\n",
+ "id": "S15.9.5.20_A1_T1"
+ },
+ {
+ "section": "15.9.5.20",
+ "description": "Checking absence of DontDelete attribute",
+ "test": "if (delete Date.prototype.getMinutes === false) {\n $ERROR('#1: The Date.prototype.getMinutes property has not the attributes DontDelete');\n}\n\nif (Date.prototype.hasOwnProperty('getMinutes')) {\n $FAIL('#2: The Date.prototype.getMinutes property has not the attributes DontDelete');\n}\n\n",
+ "id": "S15.9.5.20_A1_T2"
+ },
+ {
+ "section": "15.9.5.20",
+ "description": "Checking DontEnum attribute",
+ "test": "if (Date.prototype.propertyIsEnumerable('getMinutes')) {\n $ERROR('#1: The Date.prototype.getMinutes property has the attribute DontEnum');\n}\n\nfor(x in Date.prototype) {\n if(x === \"getMinutes\") {\n $ERROR('#2: The Date.prototype.getMinutes has the attribute DontEnum');\n }\n}\n\n",
+ "id": "S15.9.5.20_A1_T3"
+ },
+ {
+ "section": "15.9.5.20",
+ "description": "The \"length\" property of the \"getMinutes\" is 0",
+ "test": "if(Date.prototype.getMinutes.hasOwnProperty(\"length\") !== true){\n $ERROR('#1: The getMinutes has a \"length\" property');\n}\n\nif(Date.prototype.getMinutes.length !== 0){\n $ERROR('#2: The \"length\" property of the getMinutes is 0');\n}\n\n",
+ "id": "S15.9.5.20_A2_T1"
+ },
+ {
+ "section": "15.9.5.20",
+ "description": "Checking ReadOnly attribute",
+ "test": "x = Date.prototype.getMinutes.length;\nDate.prototype.getMinutes.length = 1;\nif (Date.prototype.getMinutes.length !== x) {\n $ERROR('#1: The Date.prototype.getMinutes.length has the attribute ReadOnly');\n}\n\n",
+ "id": "S15.9.5.20_A3_T1"
+ },
+ {
+ "section": "15.9.5.20",
+ "description": "Checking DontDelete attribute",
+ "test": "if (delete Date.prototype.getMinutes.length !== false) {\n $ERROR('#1: The Date.prototype.getMinutes.length property has the attributes DontDelete');\n}\n\nif (!Date.prototype.getMinutes.hasOwnProperty('length')) {\n $FAIL('#2: The Date.prototype.getMinutes.length property has the attributes DontDelete');\n}\n\n",
+ "id": "S15.9.5.20_A3_T2"
+ },
+ {
+ "section": "15.9.5.20",
+ "description": "Checking DontEnum attribute",
+ "test": "if (Date.prototype.getMinutes.propertyIsEnumerable('length')) {\n $ERROR('#1: The Date.prototype.getMinutes.length property has the attribute DontEnum');\n}\n\nfor(x in Date.prototype.getMinutes) {\n if(x === \"length\") {\n $ERROR('#2: The Date.prototype.getMinutes.length has the attribute DontEnum');\n }\n}\n\n",
+ "id": "S15.9.5.20_A3_T3"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.9.5.21_Date.prototype.getUTCMinutes.json b/website/resources/scripts/testcases2/15.9.5.21_Date.prototype.getUTCMinutes.json
new file mode 100644
index 000000000..999744723
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.9.5.21_Date.prototype.getUTCMinutes.json
@@ -0,0 +1,50 @@
+{
+ "testCollection": {
+ "name": "15.9.5.21_Date.prototype.getUTCMinutes",
+ "numTests": 7,
+ "tests": [
+ {
+ "section": "15.9.5.21",
+ "description": "Checking absence of ReadOnly attribute",
+ "test": "x = Date.prototype.getUTCMinutes;\nif(x === 1)\n Date.prototype.getUTCMinutes = 2;\nelse\n Date.prototype.getUTCMinutes = 1;\nif (Date.prototype.getUTCMinutes === x) {\n $ERROR('#1: The Date.prototype.getUTCMinutes has not the attribute ReadOnly');\n}\n\n",
+ "id": "S15.9.5.21_A1_T1"
+ },
+ {
+ "section": "15.9.5.21",
+ "description": "Checking absence of DontDelete attribute",
+ "test": "if (delete Date.prototype.getUTCMinutes === false) {\n $ERROR('#1: The Date.prototype.getUTCMinutes property has not the attributes DontDelete');\n}\n\nif (Date.prototype.hasOwnProperty('getUTCMinutes')) {\n $FAIL('#2: The Date.prototype.getUTCMinutes property has not the attributes DontDelete');\n}\n\n",
+ "id": "S15.9.5.21_A1_T2"
+ },
+ {
+ "section": "15.9.5.21",
+ "description": "Checking DontEnum attribute",
+ "test": "if (Date.prototype.propertyIsEnumerable('getUTCMinutes')) {\n $ERROR('#1: The Date.prototype.getUTCMinutes property has the attribute DontEnum');\n}\n\nfor(x in Date.prototype) {\n if(x === \"getUTCMinutes\") {\n $ERROR('#2: The Date.prototype.getUTCMinutes has the attribute DontEnum');\n }\n}\n\n",
+ "id": "S15.9.5.21_A1_T3"
+ },
+ {
+ "section": "15.9.5.21",
+ "description": "The \"length\" property of the \"getUTCMinutes\" is 0",
+ "test": "if(Date.prototype.getUTCMinutes.hasOwnProperty(\"length\") !== true){\n $ERROR('#1: The getUTCMinutes has a \"length\" property');\n}\n\nif(Date.prototype.getUTCMinutes.length !== 0){\n $ERROR('#2: The \"length\" property of the getUTCMinutes is 0');\n}\n\n",
+ "id": "S15.9.5.21_A2_T1"
+ },
+ {
+ "section": "15.9.5.21",
+ "description": "Checking ReadOnly attribute",
+ "test": "x = Date.prototype.getUTCMinutes.length;\nDate.prototype.getUTCMinutes.length = 1;\nif (Date.prototype.getUTCMinutes.length !== x) {\n $ERROR('#1: The Date.prototype.getUTCMinutes.length has the attribute ReadOnly');\n}\n\n",
+ "id": "S15.9.5.21_A3_T1"
+ },
+ {
+ "section": "15.9.5.21",
+ "description": "Checking DontDelete attribute",
+ "test": "if (delete Date.prototype.getUTCMinutes.length !== false) {\n $ERROR('#1: The Date.prototype.getUTCMinutes.length property has the attributes DontDelete');\n}\n\nif (!Date.prototype.getUTCMinutes.hasOwnProperty('length')) {\n $FAIL('#2: The Date.prototype.getUTCMinutes.length property has the attributes DontDelete');\n}\n\n",
+ "id": "S15.9.5.21_A3_T2"
+ },
+ {
+ "section": "15.9.5.21",
+ "description": "Checking DontEnum attribute",
+ "test": "if (Date.prototype.getUTCMinutes.propertyIsEnumerable('length')) {\n $ERROR('#1: The Date.prototype.getUTCMinutes.length property has the attribute DontEnum');\n}\n\nfor(x in Date.prototype.getUTCMinutes) {\n if(x === \"length\") {\n $ERROR('#2: The Date.prototype.getUTCMinutes.length has the attribute DontEnum');\n }\n}\n\n",
+ "id": "S15.9.5.21_A3_T3"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.9.5.22_Date.prototype.getSeconds.json b/website/resources/scripts/testcases2/15.9.5.22_Date.prototype.getSeconds.json
new file mode 100644
index 000000000..fcba2525f
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.9.5.22_Date.prototype.getSeconds.json
@@ -0,0 +1,50 @@
+{
+ "testCollection": {
+ "name": "15.9.5.22_Date.prototype.getSeconds",
+ "numTests": 7,
+ "tests": [
+ {
+ "section": "15.9.5.22",
+ "description": "Checking absence of ReadOnly attribute",
+ "test": "x = Date.prototype.getSeconds;\nif(x === 1)\n Date.prototype.getSeconds = 2;\nelse\n Date.prototype.getSeconds = 1;\nif (Date.prototype.getSeconds === x) {\n $ERROR('#1: The Date.prototype.getSeconds has not the attribute ReadOnly');\n}\n\n",
+ "id": "S15.9.5.22_A1_T1"
+ },
+ {
+ "section": "15.9.5.22",
+ "description": "Checking absence of DontDelete attribute",
+ "test": "if (delete Date.prototype.getSeconds === false) {\n $ERROR('#1: The Date.prototype.getSeconds property has not the attributes DontDelete');\n}\n\nif (Date.prototype.hasOwnProperty('getSeconds')) {\n $FAIL('#2: The Date.prototype.getSeconds property has not the attributes DontDelete');\n}\n\n",
+ "id": "S15.9.5.22_A1_T2"
+ },
+ {
+ "section": "15.9.5.22",
+ "description": "Checking DontEnum attribute",
+ "test": "if (Date.prototype.propertyIsEnumerable('getSeconds')) {\n $ERROR('#1: The Date.prototype.getSeconds property has the attribute DontEnum');\n}\n\nfor(x in Date.prototype) {\n if(x === \"getSeconds\") {\n $ERROR('#2: The Date.prototype.getSeconds has the attribute DontEnum');\n }\n}\n\n",
+ "id": "S15.9.5.22_A1_T3"
+ },
+ {
+ "section": "15.9.5.22",
+ "description": "The \"length\" property of the \"getSeconds\" is 0",
+ "test": "if(Date.prototype.getSeconds.hasOwnProperty(\"length\") !== true){\n $ERROR('#1: The getSeconds has a \"length\" property');\n}\n\nif(Date.prototype.getSeconds.length !== 0){\n $ERROR('#2: The \"length\" property of the getSeconds is 0');\n}\n\n",
+ "id": "S15.9.5.22_A2_T1"
+ },
+ {
+ "section": "15.9.5.22",
+ "description": "Checking ReadOnly attribute",
+ "test": "x = Date.prototype.getSeconds.length;\nDate.prototype.getSeconds.length = 1;\nif (Date.prototype.getSeconds.length !== x) {\n $ERROR('#1: The Date.prototype.getSeconds.length has the attribute ReadOnly');\n}\n\n",
+ "id": "S15.9.5.22_A3_T1"
+ },
+ {
+ "section": "15.9.5.22",
+ "description": "Checking DontDelete attribute",
+ "test": "if (delete Date.prototype.getSeconds.length !== false) {\n $ERROR('#1: The Date.prototype.getSeconds.length property has the attributes DontDelete');\n}\n\nif (!Date.prototype.getSeconds.hasOwnProperty('length')) {\n $FAIL('#2: The Date.prototype.getSeconds.length property has the attributes DontDelete');\n}\n\n",
+ "id": "S15.9.5.22_A3_T2"
+ },
+ {
+ "section": "15.9.5.22",
+ "description": "Checking DontEnum attribute",
+ "test": "if (Date.prototype.getSeconds.propertyIsEnumerable('length')) {\n $ERROR('#1: The Date.prototype.getSeconds.length property has the attribute DontEnum');\n}\n\nfor(x in Date.prototype.getSeconds) {\n if(x === \"length\") {\n $ERROR('#2: The Date.prototype.getSeconds.length has the attribute DontEnum');\n }\n}\n\n",
+ "id": "S15.9.5.22_A3_T3"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.9.5.23_Date.prototype.getUTCSeconds.json b/website/resources/scripts/testcases2/15.9.5.23_Date.prototype.getUTCSeconds.json
new file mode 100644
index 000000000..cf5c9e1f7
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.9.5.23_Date.prototype.getUTCSeconds.json
@@ -0,0 +1,50 @@
+{
+ "testCollection": {
+ "name": "15.9.5.23_Date.prototype.getUTCSeconds",
+ "numTests": 7,
+ "tests": [
+ {
+ "section": "15.9.5.23",
+ "description": "Checking absence of ReadOnly attribute",
+ "test": "x = Date.prototype.getUTCSeconds;\nif(x === 1)\n Date.prototype.getUTCSeconds = 2;\nelse\n Date.prototype.getUTCSeconds = 1;\nif (Date.prototype.getUTCSeconds === x) {\n $ERROR('#1: The Date.prototype.getUTCSeconds has not the attribute ReadOnly');\n}\n\n",
+ "id": "S15.9.5.23_A1_T1"
+ },
+ {
+ "section": "15.9.5.23",
+ "description": "Checking absence of DontDelete attribute",
+ "test": "if (delete Date.prototype.getUTCSeconds === false) {\n $ERROR('#1: The Date.prototype.getUTCSeconds property has not the attributes DontDelete');\n}\n\nif (Date.prototype.hasOwnProperty('getUTCSeconds')) {\n $FAIL('#2: The Date.prototype.getUTCSeconds property has not the attributes DontDelete');\n}\n\n",
+ "id": "S15.9.5.23_A1_T2"
+ },
+ {
+ "section": "15.9.5.23",
+ "description": "Checking DontEnum attribute",
+ "test": "if (Date.prototype.propertyIsEnumerable('getUTCSeconds')) {\n $ERROR('#1: The Date.prototype.getUTCSeconds property has the attribute DontEnum');\n}\n\nfor(x in Date.prototype) {\n if(x === \"getUTCSeconds\") {\n $ERROR('#2: The Date.prototype.getUTCSeconds has the attribute DontEnum');\n }\n}\n\n",
+ "id": "S15.9.5.23_A1_T3"
+ },
+ {
+ "section": "15.9.5.23",
+ "description": "The \"length\" property of the \"getUTCSeconds\" is 0",
+ "test": "if(Date.prototype.getUTCSeconds.hasOwnProperty(\"length\") !== true){\n $ERROR('#1: The getUTCSeconds has a \"length\" property');\n}\n\nif(Date.prototype.getUTCSeconds.length !== 0){\n $ERROR('#2: The \"length\" property of the getUTCSeconds is 0');\n}\n\n",
+ "id": "S15.9.5.23_A2_T1"
+ },
+ {
+ "section": "15.9.5.23",
+ "description": "Checking ReadOnly attribute",
+ "test": "x = Date.prototype.getUTCSeconds.length;\nDate.prototype.getUTCSeconds.length = 1;\nif (Date.prototype.getUTCSeconds.length !== x) {\n $ERROR('#1: The Date.prototype.getUTCSeconds.length has the attribute ReadOnly');\n}\n\n",
+ "id": "S15.9.5.23_A3_T1"
+ },
+ {
+ "section": "15.9.5.23",
+ "description": "Checking DontDelete attribute",
+ "test": "if (delete Date.prototype.getUTCSeconds.length !== false) {\n $ERROR('#1: The Date.prototype.getUTCSeconds.length property has the attributes DontDelete');\n}\n\nif (!Date.prototype.getUTCSeconds.hasOwnProperty('length')) {\n $FAIL('#2: The Date.prototype.getUTCSeconds.length property has the attributes DontDelete');\n}\n\n",
+ "id": "S15.9.5.23_A3_T2"
+ },
+ {
+ "section": "15.9.5.23",
+ "description": "Checking DontEnum attribute",
+ "test": "if (Date.prototype.getUTCSeconds.propertyIsEnumerable('length')) {\n $ERROR('#1: The Date.prototype.getUTCSeconds.length property has the attribute DontEnum');\n}\n\nfor(x in Date.prototype.getUTCSeconds) {\n if(x === \"length\") {\n $ERROR('#2: The Date.prototype.getUTCSeconds.length has the attribute DontEnum');\n }\n}\n\n",
+ "id": "S15.9.5.23_A3_T3"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.9.5.24_Date.prototype.getMilliseconds.json b/website/resources/scripts/testcases2/15.9.5.24_Date.prototype.getMilliseconds.json
new file mode 100644
index 000000000..b2056f5cb
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.9.5.24_Date.prototype.getMilliseconds.json
@@ -0,0 +1,50 @@
+{
+ "testCollection": {
+ "name": "15.9.5.24_Date.prototype.getMilliseconds",
+ "numTests": 7,
+ "tests": [
+ {
+ "section": "15.9.5.24",
+ "description": "Checking absence of ReadOnly attribute",
+ "test": "x = Date.prototype.getMilliseconds;\nif(x === 1)\n Date.prototype.getMilliseconds = 2;\nelse\n Date.prototype.getMilliseconds = 1;\nif (Date.prototype.getMilliseconds === x) {\n $ERROR('#1: The Date.prototype.getMilliseconds has not the attribute ReadOnly');\n}\n\n",
+ "id": "S15.9.5.24_A1_T1"
+ },
+ {
+ "section": "15.9.5.24",
+ "description": "Checking absence of DontDelete attribute",
+ "test": "if (delete Date.prototype.getMilliseconds === false) {\n $ERROR('#1: The Date.prototype.getMilliseconds property has not the attributes DontDelete');\n}\n\nif (Date.prototype.hasOwnProperty('getMilliseconds')) {\n $FAIL('#2: The Date.prototype.getMilliseconds property has not the attributes DontDelete');\n}\n\n",
+ "id": "S15.9.5.24_A1_T2"
+ },
+ {
+ "section": "15.9.5.24",
+ "description": "Checking DontEnum attribute",
+ "test": "if (Date.prototype.propertyIsEnumerable('getMilliseconds')) {\n $ERROR('#1: The Date.prototype.getMilliseconds property has the attribute DontEnum');\n}\n\nfor(x in Date.prototype) {\n if(x === \"getMilliseconds\") {\n $ERROR('#2: The Date.prototype.getMilliseconds has the attribute DontEnum');\n }\n}\n\n",
+ "id": "S15.9.5.24_A1_T3"
+ },
+ {
+ "section": "15.9.5.24",
+ "description": "The \"length\" property of the \"getMilliseconds\" is 0",
+ "test": "if(Date.prototype.getMilliseconds.hasOwnProperty(\"length\") !== true){\n $ERROR('#1: The getMilliseconds has a \"length\" property');\n}\n\nif(Date.prototype.getMilliseconds.length !== 0){\n $ERROR('#2: The \"length\" property of the getMilliseconds is 0');\n}\n\n",
+ "id": "S15.9.5.24_A2_T1"
+ },
+ {
+ "section": "15.9.5.24",
+ "description": "Checking ReadOnly attribute",
+ "test": "x = Date.prototype.getMilliseconds.length;\nDate.prototype.getMilliseconds.length = 1;\nif (Date.prototype.getMilliseconds.length !== x) {\n $ERROR('#1: The Date.prototype.getMilliseconds.length has the attribute ReadOnly');\n}\n\n",
+ "id": "S15.9.5.24_A3_T1"
+ },
+ {
+ "section": "15.9.5.24",
+ "description": "Checking DontDelete attribute",
+ "test": "if (delete Date.prototype.getMilliseconds.length !== false) {\n $ERROR('#1: The Date.prototype.getMilliseconds.length property has the attributes DontDelete');\n}\n\nif (!Date.prototype.getMilliseconds.hasOwnProperty('length')) {\n $FAIL('#2: The Date.prototype.getMilliseconds.length property has the attributes DontDelete');\n}\n\n",
+ "id": "S15.9.5.24_A3_T2"
+ },
+ {
+ "section": "15.9.5.24",
+ "description": "Checking DontEnum attribute",
+ "test": "if (Date.prototype.getMilliseconds.propertyIsEnumerable('length')) {\n $ERROR('#1: The Date.prototype.getMilliseconds.length property has the attribute DontEnum');\n}\n\nfor(x in Date.prototype.getMilliseconds) {\n if(x === \"length\") {\n $ERROR('#2: The Date.prototype.getMilliseconds.length has the attribute DontEnum');\n }\n}\n\n",
+ "id": "S15.9.5.24_A3_T3"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.9.5.25_Date.prototype.getUTCMilliseconds.json b/website/resources/scripts/testcases2/15.9.5.25_Date.prototype.getUTCMilliseconds.json
new file mode 100644
index 000000000..3a7f5bcae
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.9.5.25_Date.prototype.getUTCMilliseconds.json
@@ -0,0 +1,50 @@
+{
+ "testCollection": {
+ "name": "15.9.5.25_Date.prototype.getUTCMilliseconds",
+ "numTests": 7,
+ "tests": [
+ {
+ "section": "15.9.5.25",
+ "description": "Checking absence of ReadOnly attribute",
+ "test": "x = Date.prototype.getUTCMilliseconds;\nif(x === 1)\n Date.prototype.getUTCMilliseconds = 2;\nelse\n Date.prototype.getUTCMilliseconds = 1;\nif (Date.prototype.getUTCMilliseconds === x) {\n $ERROR('#1: The Date.prototype.getUTCMilliseconds has not the attribute ReadOnly');\n}\n\n",
+ "id": "S15.9.5.25_A1_T1"
+ },
+ {
+ "section": "15.9.5.25",
+ "description": "Checking absence of DontDelete attribute",
+ "test": "if (delete Date.prototype.getUTCMilliseconds === false) {\n $ERROR('#1: The Date.prototype.getUTCMilliseconds property has not the attributes DontDelete');\n}\n\nif (Date.prototype.hasOwnProperty('getUTCMilliseconds')) {\n $FAIL('#2: The Date.prototype.getUTCMilliseconds property has not the attributes DontDelete');\n}\n\n",
+ "id": "S15.9.5.25_A1_T2"
+ },
+ {
+ "section": "15.9.5.25",
+ "description": "Checking DontEnum attribute",
+ "test": "if (Date.prototype.propertyIsEnumerable('getUTCMilliseconds')) {\n $ERROR('#1: The Date.prototype.getUTCMilliseconds property has the attribute DontEnum');\n}\n\nfor(x in Date.prototype) {\n if(x === \"getUTCMilliseconds\") {\n $ERROR('#2: The Date.prototype.getUTCMilliseconds has the attribute DontEnum');\n }\n}\n\n",
+ "id": "S15.9.5.25_A1_T3"
+ },
+ {
+ "section": "15.9.5.25",
+ "description": "The \"length\" property of the \"getUTCMilliseconds\" is 0",
+ "test": "if(Date.prototype.getUTCMilliseconds.hasOwnProperty(\"length\") !== true){\n $ERROR('#1: The getUTCMilliseconds has a \"length\" property');\n}\n\nif(Date.prototype.getUTCMilliseconds.length !== 0){\n $ERROR('#2: The \"length\" property of the getUTCMilliseconds is 0');\n}\n\n",
+ "id": "S15.9.5.25_A2_T1"
+ },
+ {
+ "section": "15.9.5.25",
+ "description": "Checking ReadOnly attribute",
+ "test": "x = Date.prototype.getUTCMilliseconds.length;\nDate.prototype.getUTCMilliseconds.length = 1;\nif (Date.prototype.getUTCMilliseconds.length !== x) {\n $ERROR('#1: The Date.prototype.getUTCMilliseconds.length has the attribute ReadOnly');\n}\n\n",
+ "id": "S15.9.5.25_A3_T1"
+ },
+ {
+ "section": "15.9.5.25",
+ "description": "Checking DontDelete attribute",
+ "test": "if (delete Date.prototype.getUTCMilliseconds.length !== false) {\n $ERROR('#1: The Date.prototype.getUTCMilliseconds.length property has the attributes DontDelete');\n}\n\nif (!Date.prototype.getUTCMilliseconds.hasOwnProperty('length')) {\n $FAIL('#2: The Date.prototype.getUTCMilliseconds.length property has the attributes DontDelete');\n}\n\n",
+ "id": "S15.9.5.25_A3_T2"
+ },
+ {
+ "section": "15.9.5.25",
+ "description": "Checking DontEnum attribute",
+ "test": "if (Date.prototype.getUTCMilliseconds.propertyIsEnumerable('length')) {\n $ERROR('#1: The Date.prototype.getUTCMilliseconds.length property has the attribute DontEnum');\n}\n\nfor(x in Date.prototype.getUTCMilliseconds) {\n if(x === \"length\") {\n $ERROR('#2: The Date.prototype.getUTCMilliseconds.length has the attribute DontEnum');\n }\n}\n\n",
+ "id": "S15.9.5.25_A3_T3"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.9.5.26_Date.prototype.getTimezoneOffset.json b/website/resources/scripts/testcases2/15.9.5.26_Date.prototype.getTimezoneOffset.json
new file mode 100644
index 000000000..537266bb4
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.9.5.26_Date.prototype.getTimezoneOffset.json
@@ -0,0 +1,50 @@
+{
+ "testCollection": {
+ "name": "15.9.5.26_Date.prototype.getTimezoneOffset",
+ "numTests": 7,
+ "tests": [
+ {
+ "section": "15.9.5.26",
+ "description": "Checking absence of ReadOnly attribute",
+ "test": "x = Date.prototype.getTimezoneOffset;\nif(x === 1)\n Date.prototype.getTimezoneOffset = 2;\nelse\n Date.prototype.getTimezoneOffset = 1;\nif (Date.prototype.getTimezoneOffset === x) {\n $ERROR('#1: The Date.prototype.getTimezoneOffset has not the attribute ReadOnly');\n}\n\n",
+ "id": "S15.9.5.26_A1_T1"
+ },
+ {
+ "section": "15.9.5.26",
+ "description": "Checking absence of DontDelete attribute",
+ "test": "if (delete Date.prototype.getTimezoneOffset === false) {\n $ERROR('#1: The Date.prototype.getTimezoneOffset property has not the attributes DontDelete');\n}\n\nif (Date.prototype.hasOwnProperty('getTimezoneOffset')) {\n $FAIL('#2: The Date.prototype.getTimezoneOffset property has not the attributes DontDelete');\n}\n\n",
+ "id": "S15.9.5.26_A1_T2"
+ },
+ {
+ "section": "15.9.5.26",
+ "description": "Checking DontEnum attribute",
+ "test": "if (Date.prototype.propertyIsEnumerable('getTimezoneOffset')) {\n $ERROR('#1: The Date.prototype.getTimezoneOffset property has the attribute DontEnum');\n}\n\nfor(x in Date.prototype) {\n if(x === \"getTimezoneOffset\") {\n $ERROR('#2: The Date.prototype.getTimezoneOffset has the attribute DontEnum');\n }\n}\n\n",
+ "id": "S15.9.5.26_A1_T3"
+ },
+ {
+ "section": "15.9.5.26",
+ "description": "The \"length\" property of the \"getTimezoneOffset\" is 0",
+ "test": "if(Date.prototype.getTimezoneOffset.hasOwnProperty(\"length\") !== true){\n $ERROR('#1: The getTimezoneOffset has a \"length\" property');\n}\n\nif(Date.prototype.getTimezoneOffset.length !== 0){\n $ERROR('#2: The \"length\" property of the getTimezoneOffset is 0');\n}\n\n",
+ "id": "S15.9.5.26_A2_T1"
+ },
+ {
+ "section": "15.9.5.26",
+ "description": "Checking ReadOnly attribute",
+ "test": "x = Date.prototype.getTimezoneOffset.length;\nDate.prototype.getTimezoneOffset.length = 1;\nif (Date.prototype.getTimezoneOffset.length !== x) {\n $ERROR('#1: The Date.prototype.getTimezoneOffset.length has the attribute ReadOnly');\n}\n\n",
+ "id": "S15.9.5.26_A3_T1"
+ },
+ {
+ "section": "15.9.5.26",
+ "description": "Checking DontDelete attribute",
+ "test": "if (delete Date.prototype.getTimezoneOffset.length !== false) {\n $ERROR('#1: The Date.prototype.getTimezoneOffset.length property has the attributes DontDelete');\n}\n\nif (!Date.prototype.getTimezoneOffset.hasOwnProperty('length')) {\n $FAIL('#2: The Date.prototype.getTimezoneOffset.length property has the attributes DontDelete');\n}\n\n",
+ "id": "S15.9.5.26_A3_T2"
+ },
+ {
+ "section": "15.9.5.26",
+ "description": "Checking DontEnum attribute",
+ "test": "if (Date.prototype.getTimezoneOffset.propertyIsEnumerable('length')) {\n $ERROR('#1: The Date.prototype.getTimezoneOffset.length property has the attribute DontEnum');\n}\n\nfor(x in Date.prototype.getTimezoneOffset) {\n if(x === \"length\") {\n $ERROR('#2: The Date.prototype.getTimezoneOffset.length has the attribute DontEnum');\n }\n}\n\n",
+ "id": "S15.9.5.26_A3_T3"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.9.5.27_Date.prototype.setTime.json b/website/resources/scripts/testcases2/15.9.5.27_Date.prototype.setTime.json
new file mode 100644
index 000000000..a7fac4f72
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.9.5.27_Date.prototype.setTime.json
@@ -0,0 +1,50 @@
+{
+ "testCollection": {
+ "name": "15.9.5.27_Date.prototype.setTime",
+ "numTests": 7,
+ "tests": [
+ {
+ "section": "15.9.5.27",
+ "description": "Checking absence of ReadOnly attribute",
+ "test": "x = Date.prototype.setTime;\nif(x === 1)\n Date.prototype.setTime = 2;\nelse\n Date.prototype.setTime = 1;\nif (Date.prototype.setTime === x) {\n $ERROR('#1: The Date.prototype.setTime has not the attribute ReadOnly');\n}\n\n",
+ "id": "S15.9.5.27_A1_T1"
+ },
+ {
+ "section": "15.9.5.27",
+ "description": "Checking absence of DontDelete attribute",
+ "test": "if (delete Date.prototype.setTime === false) {\n $ERROR('#1: The Date.prototype.setTime property has not the attributes DontDelete');\n}\n\nif (Date.prototype.hasOwnProperty('setTime')) {\n $FAIL('#2: The Date.prototype.setTime property has not the attributes DontDelete');\n}\n\n",
+ "id": "S15.9.5.27_A1_T2"
+ },
+ {
+ "section": "15.9.5.27",
+ "description": "Checking DontEnum attribute",
+ "test": "if (Date.prototype.propertyIsEnumerable('setTime')) {\n $ERROR('#1: The Date.prototype.setTime property has the attribute DontEnum');\n}\n\nfor(x in Date.prototype) {\n if(x === \"setTime\") {\n $ERROR('#2: The Date.prototype.setTime has the attribute DontEnum');\n }\n}\n\n",
+ "id": "S15.9.5.27_A1_T3"
+ },
+ {
+ "section": "15.9.5.27",
+ "description": "The \"length\" property of the \"setTime\" is 1",
+ "test": "if(Date.prototype.setTime.hasOwnProperty(\"length\") !== true){\n $ERROR('#1: The setTime has a \"length\" property');\n}\n\nif(Date.prototype.setTime.length !== 1){\n $ERROR('#2: The \"length\" property of the setTime is 1');\n}\n\n",
+ "id": "S15.9.5.27_A2_T1"
+ },
+ {
+ "section": "15.9.5.27",
+ "description": "Checking ReadOnly attribute",
+ "test": "x = Date.prototype.setTime.length;\nDate.prototype.setTime.length = 1;\nif (Date.prototype.setTime.length !== x) {\n $ERROR('#1: The Date.prototype.setTime.length has the attribute ReadOnly');\n}\n\n",
+ "id": "S15.9.5.27_A3_T1"
+ },
+ {
+ "section": "15.9.5.27",
+ "description": "Checking DontDelete attribute",
+ "test": "if (delete Date.prototype.setTime.length !== false) {\n $ERROR('#1: The Date.prototype.setTime.length property has the attributes DontDelete');\n}\n\nif (!Date.prototype.setTime.hasOwnProperty('length')) {\n $FAIL('#2: The Date.prototype.setTime.length property has the attributes DontDelete');\n}\n\n",
+ "id": "S15.9.5.27_A3_T2"
+ },
+ {
+ "section": "15.9.5.27",
+ "description": "Checking DontEnum attribute",
+ "test": "if (Date.prototype.setTime.propertyIsEnumerable('length')) {\n $ERROR('#1: The Date.prototype.setTime.length property has the attribute DontEnum');\n}\n\nfor(x in Date.prototype.setTime) {\n if(x === \"length\") {\n $ERROR('#2: The Date.prototype.setTime.length has the attribute DontEnum');\n }\n}\n\n",
+ "id": "S15.9.5.27_A3_T3"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.9.5.28_Date.prototype.setMilliseconds.json b/website/resources/scripts/testcases2/15.9.5.28_Date.prototype.setMilliseconds.json
new file mode 100644
index 000000000..3d5bedde5
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.9.5.28_Date.prototype.setMilliseconds.json
@@ -0,0 +1,50 @@
+{
+ "testCollection": {
+ "name": "15.9.5.28_Date.prototype.setMilliseconds",
+ "numTests": 7,
+ "tests": [
+ {
+ "section": "15.9.5.28",
+ "description": "Checking absence of ReadOnly attribute",
+ "test": "x = Date.prototype.setMilliseconds;\nif(x === 1)\n Date.prototype.setMilliseconds = 2;\nelse\n Date.prototype.setMilliseconds = 1;\nif (Date.prototype.setMilliseconds === x) {\n $ERROR('#1: The Date.prototype.setMilliseconds has not the attribute ReadOnly');\n}\n\n",
+ "id": "S15.9.5.28_A1_T1"
+ },
+ {
+ "section": "15.9.5.28",
+ "description": "Checking absence of DontDelete attribute",
+ "test": "if (delete Date.prototype.setMilliseconds === false) {\n $ERROR('#1: The Date.prototype.setMilliseconds property has not the attributes DontDelete');\n}\n\nif (Date.prototype.hasOwnProperty('setMilliseconds')) {\n $FAIL('#2: The Date.prototype.setMilliseconds property has not the attributes DontDelete');\n}\n\n",
+ "id": "S15.9.5.28_A1_T2"
+ },
+ {
+ "section": "15.9.5.28",
+ "description": "Checking DontEnum attribute",
+ "test": "if (Date.prototype.propertyIsEnumerable('setMilliseconds')) {\n $ERROR('#1: The Date.prototype.setMilliseconds property has the attribute DontEnum');\n}\n\nfor(x in Date.prototype) {\n if(x === \"setMilliseconds\") {\n $ERROR('#2: The Date.prototype.setMilliseconds has the attribute DontEnum');\n }\n}\n\n",
+ "id": "S15.9.5.28_A1_T3"
+ },
+ {
+ "section": "15.9.5.28",
+ "description": "The \"length\" property of the \"setMilliseconds\" is 1",
+ "test": "if(Date.prototype.setMilliseconds.hasOwnProperty(\"length\") !== true){\n $ERROR('#1: The setMilliseconds has a \"length\" property');\n}\n\nif(Date.prototype.setMilliseconds.length !== 1){\n $ERROR('#2: The \"length\" property of the setMilliseconds is 1');\n}\n\n",
+ "id": "S15.9.5.28_A2_T1"
+ },
+ {
+ "section": "15.9.5.28",
+ "description": "Checking ReadOnly attribute",
+ "test": "x = Date.prototype.setMilliseconds.length;\nDate.prototype.setMilliseconds.length = 1;\nif (Date.prototype.setMilliseconds.length !== x) {\n $ERROR('#1: The Date.prototype.setMilliseconds.length has the attribute ReadOnly');\n}\n\n",
+ "id": "S15.9.5.28_A3_T1"
+ },
+ {
+ "section": "15.9.5.28",
+ "description": "Checking DontDelete attribute",
+ "test": "if (delete Date.prototype.setMilliseconds.length !== false) {\n $ERROR('#1: The Date.prototype.setMilliseconds.length property has the attributes DontDelete');\n}\n\nif (!Date.prototype.setMilliseconds.hasOwnProperty('length')) {\n $FAIL('#2: The Date.prototype.setMilliseconds.length property has the attributes DontDelete');\n}\n\n",
+ "id": "S15.9.5.28_A3_T2"
+ },
+ {
+ "section": "15.9.5.28",
+ "description": "Checking DontEnum attribute",
+ "test": "if (Date.prototype.setMilliseconds.propertyIsEnumerable('length')) {\n $ERROR('#1: The Date.prototype.setMilliseconds.length property has the attribute DontEnum');\n}\n\nfor(x in Date.prototype.setMilliseconds) {\n if(x === \"length\") {\n $ERROR('#2: The Date.prototype.setMilliseconds.length has the attribute DontEnum');\n }\n}\n\n",
+ "id": "S15.9.5.28_A3_T3"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.9.5.29_Date.prototype.setUTCMilliseconds.json b/website/resources/scripts/testcases2/15.9.5.29_Date.prototype.setUTCMilliseconds.json
new file mode 100644
index 000000000..5a8bc9297
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.9.5.29_Date.prototype.setUTCMilliseconds.json
@@ -0,0 +1,50 @@
+{
+ "testCollection": {
+ "name": "15.9.5.29_Date.prototype.setUTCMilliseconds",
+ "numTests": 7,
+ "tests": [
+ {
+ "section": "15.9.5.29",
+ "description": "Checking absence of ReadOnly attribute",
+ "test": "x = Date.prototype.setUTCMilliseconds;\nif(x === 1)\n Date.prototype.setUTCMilliseconds = 2;\nelse\n Date.prototype.setUTCMilliseconds = 1;\nif (Date.prototype.setUTCMilliseconds === x) {\n $ERROR('#1: The Date.prototype.setUTCMilliseconds has not the attribute ReadOnly');\n}\n\n",
+ "id": "S15.9.5.29_A1_T1"
+ },
+ {
+ "section": "15.9.5.29",
+ "description": "Checking absence of DontDelete attribute",
+ "test": "if (delete Date.prototype.setUTCMilliseconds === false) {\n $ERROR('#1: The Date.prototype.setUTCMilliseconds property has not the attributes DontDelete');\n}\n\nif (Date.prototype.hasOwnProperty('setUTCMilliseconds')) {\n $FAIL('#2: The Date.prototype.setUTCMilliseconds property has not the attributes DontDelete');\n}\n\n",
+ "id": "S15.9.5.29_A1_T2"
+ },
+ {
+ "section": "15.9.5.29",
+ "description": "Checking DontEnum attribute",
+ "test": "if (Date.prototype.propertyIsEnumerable('setUTCMilliseconds')) {\n $ERROR('#1: The Date.prototype.setUTCMilliseconds property has the attribute DontEnum');\n}\n\nfor(x in Date.prototype) {\n if(x === \"setUTCMilliseconds\") {\n $ERROR('#2: The Date.prototype.setUTCMilliseconds has the attribute DontEnum');\n }\n}\n\n",
+ "id": "S15.9.5.29_A1_T3"
+ },
+ {
+ "section": "15.9.5.29",
+ "description": "The \"length\" property of the \"setUTCMilliseconds\" is 1",
+ "test": "if(Date.prototype.setUTCMilliseconds.hasOwnProperty(\"length\") !== true){\n $ERROR('#1: The setUTCMilliseconds has a \"length\" property');\n}\n\nif(Date.prototype.setUTCMilliseconds.length !== 1){\n $ERROR('#2: The \"length\" property of the setUTCMilliseconds is 1');\n}\n\n",
+ "id": "S15.9.5.29_A2_T1"
+ },
+ {
+ "section": "15.9.5.29",
+ "description": "Checking ReadOnly attribute",
+ "test": "x = Date.prototype.setUTCMilliseconds.length;\nDate.prototype.setUTCMilliseconds.length = 1;\nif (Date.prototype.setUTCMilliseconds.length !== x) {\n $ERROR('#1: The Date.prototype.setUTCMilliseconds.length has the attribute ReadOnly');\n}\n\n",
+ "id": "S15.9.5.29_A3_T1"
+ },
+ {
+ "section": "15.9.5.29",
+ "description": "Checking DontDelete attribute",
+ "test": "if (delete Date.prototype.setUTCMilliseconds.length !== false) {\n $ERROR('#1: The Date.prototype.setUTCMilliseconds.length property has the attributes DontDelete');\n}\n\nif (!Date.prototype.setUTCMilliseconds.hasOwnProperty('length')) {\n $FAIL('#2: The Date.prototype.setUTCMilliseconds.length property has the attributes DontDelete');\n}\n\n",
+ "id": "S15.9.5.29_A3_T2"
+ },
+ {
+ "section": "15.9.5.29",
+ "description": "Checking DontEnum attribute",
+ "test": "if (Date.prototype.setUTCMilliseconds.propertyIsEnumerable('length')) {\n $ERROR('#1: The Date.prototype.setUTCMilliseconds.length property has the attribute DontEnum');\n}\n\nfor(x in Date.prototype.setUTCMilliseconds) {\n if(x === \"length\") {\n $ERROR('#2: The Date.prototype.setUTCMilliseconds.length has the attribute DontEnum');\n }\n}\n\n",
+ "id": "S15.9.5.29_A3_T3"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.9.5.2_Date.prototype.toString.json b/website/resources/scripts/testcases2/15.9.5.2_Date.prototype.toString.json
new file mode 100644
index 000000000..87cd0f296
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.9.5.2_Date.prototype.toString.json
@@ -0,0 +1,50 @@
+{
+ "testCollection": {
+ "name": "15.9.5.2_Date.prototype.toString",
+ "numTests": 7,
+ "tests": [
+ {
+ "section": "15.9.5.2",
+ "description": "Checking absence of ReadOnly attribute",
+ "test": "x = Date.prototype.toString;\nif(x === 1)\n Date.prototype.toString = 2;\nelse\n Date.prototype.toString = 1;\nif (Date.prototype.toString === x) {\n $ERROR('#1: The Date.prototype.toString has not the attribute ReadOnly');\n}\n\n",
+ "id": "S15.9.5.2_A1_T1"
+ },
+ {
+ "section": "15.9.5.2",
+ "description": "Checking absence of DontDelete attribute",
+ "test": "if (delete Date.prototype.toString === false) {\n $ERROR('#1: The Date.prototype.toString property has not the attributes DontDelete');\n}\n\nif (Date.prototype.hasOwnProperty('toString')) {\n $FAIL('#2: The Date.prototype.toString property has not the attributes DontDelete');\n}\n\n",
+ "id": "S15.9.5.2_A1_T2"
+ },
+ {
+ "section": "15.9.5.2",
+ "description": "Checking DontEnum attribute",
+ "test": "if (Date.prototype.propertyIsEnumerable('toString')) {\n $ERROR('#1: The Date.prototype.toString property has the attribute DontEnum');\n}\n\nfor(x in Date.prototype) {\n if(x === \"toString\") {\n $ERROR('#2: The Date.prototype.toString has the attribute DontEnum');\n }\n}\n\n",
+ "id": "S15.9.5.2_A1_T3"
+ },
+ {
+ "section": "15.9.5.2",
+ "description": "The \"length\" property of the \"toString\" is 0",
+ "test": "if(Date.prototype.toString.hasOwnProperty(\"length\") !== true){\n $ERROR('#1: The toString has a \"length\" property');\n}\n\nif(Date.prototype.toString.length !== 0){\n $ERROR('#2: The \"length\" property of the toString is 0');\n}\n\n",
+ "id": "S15.9.5.2_A2_T1"
+ },
+ {
+ "section": "15.9.5.2",
+ "description": "Checking ReadOnly attribute",
+ "test": "x = Date.prototype.toString.length;\nDate.prototype.toString.length = 1;\nif (Date.prototype.toString.length !== x) {\n $ERROR('#1: The Date.prototype.toString.length has the attribute ReadOnly');\n}\n\n",
+ "id": "S15.9.5.2_A3_T1"
+ },
+ {
+ "section": "15.9.5.2",
+ "description": "Checking DontDelete attribute",
+ "test": "if (delete Date.prototype.toString.length !== false) {\n $ERROR('#1: The Date.prototype.toString.length property has the attributes DontDelete');\n}\n\nif (!Date.prototype.toString.hasOwnProperty('length')) {\n $FAIL('#2: The Date.prototype.toString.length property has the attributes DontDelete');\n}\n\n",
+ "id": "S15.9.5.2_A3_T2"
+ },
+ {
+ "section": "15.9.5.2",
+ "description": "Checking DontEnum attribute",
+ "test": "if (Date.prototype.toString.propertyIsEnumerable('length')) {\n $ERROR('#1: The Date.prototype.toString.length property has the attribute DontEnum');\n}\n\nfor(x in Date.prototype.toString) {\n if(x === \"length\") {\n $ERROR('#2: The Date.prototype.toString.length has the attribute DontEnum');\n }\n}\n\n",
+ "id": "S15.9.5.2_A3_T3"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.9.5.30_Date.prototype.setSeconds.json b/website/resources/scripts/testcases2/15.9.5.30_Date.prototype.setSeconds.json
new file mode 100644
index 000000000..b1a92248a
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.9.5.30_Date.prototype.setSeconds.json
@@ -0,0 +1,50 @@
+{
+ "testCollection": {
+ "name": "15.9.5.30_Date.prototype.setSeconds",
+ "numTests": 7,
+ "tests": [
+ {
+ "section": "15.9.5.30",
+ "description": "Checking absence of ReadOnly attribute",
+ "test": "x = Date.prototype.setSeconds;\nif(x === 1)\n Date.prototype.setSeconds = 2;\nelse\n Date.prototype.setSeconds = 1;\nif (Date.prototype.setSeconds === x) {\n $ERROR('#1: The Date.prototype.setSeconds has not the attribute ReadOnly');\n}\n\n",
+ "id": "S15.9.5.30_A1_T1"
+ },
+ {
+ "section": "15.9.5.30",
+ "description": "Checking absence of DontDelete attribute",
+ "test": "if (delete Date.prototype.setSeconds === false) {\n $ERROR('#1: The Date.prototype.setSeconds property has not the attributes DontDelete');\n}\n\nif (Date.prototype.hasOwnProperty('setSeconds')) {\n $FAIL('#2: The Date.prototype.setSeconds property has not the attributes DontDelete');\n}\n\n",
+ "id": "S15.9.5.30_A1_T2"
+ },
+ {
+ "section": "15.9.5.30",
+ "description": "Checking DontEnum attribute",
+ "test": "if (Date.prototype.propertyIsEnumerable('setSeconds')) {\n $ERROR('#1: The Date.prototype.setSeconds property has the attribute DontEnum');\n}\n\nfor(x in Date.prototype) {\n if(x === \"setSeconds\") {\n $ERROR('#2: The Date.prototype.setSeconds has the attribute DontEnum');\n }\n}\n\n",
+ "id": "S15.9.5.30_A1_T3"
+ },
+ {
+ "section": "15.9.5.30",
+ "description": "The \"length\" property of the \"setSeconds\" is 2",
+ "test": "if(Date.prototype.setSeconds.hasOwnProperty(\"length\") !== true){\n $ERROR('#1: The setSeconds has a \"length\" property');\n}\n\nif(Date.prototype.setSeconds.length !== 2){\n $ERROR('#2: The \"length\" property of the setSeconds is 2');\n}\n\n",
+ "id": "S15.9.5.30_A2_T1"
+ },
+ {
+ "section": "15.9.5.30",
+ "description": "Checking ReadOnly attribute",
+ "test": "x = Date.prototype.setSeconds.length;\nDate.prototype.setSeconds.length = 1;\nif (Date.prototype.setSeconds.length !== x) {\n $ERROR('#1: The Date.prototype.setSeconds.length has the attribute ReadOnly');\n}\n\n",
+ "id": "S15.9.5.30_A3_T1"
+ },
+ {
+ "section": "15.9.5.30",
+ "description": "Checking DontDelete attribute",
+ "test": "if (delete Date.prototype.setSeconds.length !== false) {\n $ERROR('#1: The Date.prototype.setSeconds.length property has the attributes DontDelete');\n}\n\nif (!Date.prototype.setSeconds.hasOwnProperty('length')) {\n $FAIL('#2: The Date.prototype.setSeconds.length property has the attributes DontDelete');\n}\n\n",
+ "id": "S15.9.5.30_A3_T2"
+ },
+ {
+ "section": "15.9.5.30",
+ "description": "Checking DontEnum attribute",
+ "test": "if (Date.prototype.setSeconds.propertyIsEnumerable('length')) {\n $ERROR('#1: The Date.prototype.setSeconds.length property has the attribute DontEnum');\n}\n\nfor(x in Date.prototype.setSeconds) {\n if(x === \"length\") {\n $ERROR('#2: The Date.prototype.setSeconds.length has the attribute DontEnum');\n }\n}\n\n",
+ "id": "S15.9.5.30_A3_T3"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.9.5.31_Date.prototype.setUTCSeconds.json b/website/resources/scripts/testcases2/15.9.5.31_Date.prototype.setUTCSeconds.json
new file mode 100644
index 000000000..b501e281a
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.9.5.31_Date.prototype.setUTCSeconds.json
@@ -0,0 +1,50 @@
+{
+ "testCollection": {
+ "name": "15.9.5.31_Date.prototype.setUTCSeconds",
+ "numTests": 7,
+ "tests": [
+ {
+ "section": "15.9.5.31",
+ "description": "Checking absence of ReadOnly attribute",
+ "test": "x = Date.prototype.setUTCSeconds;\nif(x === 1)\n Date.prototype.setUTCSeconds = 2;\nelse\n Date.prototype.setUTCSeconds = 1;\nif (Date.prototype.setUTCSeconds === x) {\n $ERROR('#1: The Date.prototype.setUTCSeconds has not the attribute ReadOnly');\n}\n\n",
+ "id": "S15.9.5.31_A1_T1"
+ },
+ {
+ "section": "15.9.5.31",
+ "description": "Checking absence of DontDelete attribute",
+ "test": "if (delete Date.prototype.setUTCSeconds === false) {\n $ERROR('#1: The Date.prototype.setUTCSeconds property has not the attributes DontDelete');\n}\n\nif (Date.prototype.hasOwnProperty('setUTCSeconds')) {\n $FAIL('#2: The Date.prototype.setUTCSeconds property has not the attributes DontDelete');\n}\n\n",
+ "id": "S15.9.5.31_A1_T2"
+ },
+ {
+ "section": "15.9.5.31",
+ "description": "Checking DontEnum attribute",
+ "test": "if (Date.prototype.propertyIsEnumerable('setUTCSeconds')) {\n $ERROR('#1: The Date.prototype.setUTCSeconds property has the attribute DontEnum');\n}\n\nfor(x in Date.prototype) {\n if(x === \"setUTCSeconds\") {\n $ERROR('#2: The Date.prototype.setUTCSeconds has the attribute DontEnum');\n }\n}\n\n",
+ "id": "S15.9.5.31_A1_T3"
+ },
+ {
+ "section": "15.9.5.31",
+ "description": "The \"length\" property of the \"setUTCSeconds\" is 2",
+ "test": "if(Date.prototype.setUTCSeconds.hasOwnProperty(\"length\") !== true){\n $ERROR('#1: The setUTCSeconds has a \"length\" property');\n}\n\nif(Date.prototype.setUTCSeconds.length !== 2){\n $ERROR('#2: The \"length\" property of the setUTCSeconds is 2');\n}\n\n",
+ "id": "S15.9.5.31_A2_T1"
+ },
+ {
+ "section": "15.9.5.31",
+ "description": "Checking ReadOnly attribute",
+ "test": "x = Date.prototype.setUTCSeconds.length;\nDate.prototype.setUTCSeconds.length = 1;\nif (Date.prototype.setUTCSeconds.length !== x) {\n $ERROR('#1: The Date.prototype.setUTCSeconds.length has the attribute ReadOnly');\n}\n\n",
+ "id": "S15.9.5.31_A3_T1"
+ },
+ {
+ "section": "15.9.5.31",
+ "description": "Checking DontDelete attribute",
+ "test": "if (delete Date.prototype.setUTCSeconds.length !== false) {\n $ERROR('#1: The Date.prototype.setUTCSeconds.length property has the attributes DontDelete');\n}\n\nif (!Date.prototype.setUTCSeconds.hasOwnProperty('length')) {\n $FAIL('#2: The Date.prototype.setUTCSeconds.length property has the attributes DontDelete');\n}\n\n",
+ "id": "S15.9.5.31_A3_T2"
+ },
+ {
+ "section": "15.9.5.31",
+ "description": "Checking DontEnum attribute",
+ "test": "if (Date.prototype.setUTCSeconds.propertyIsEnumerable('length')) {\n $ERROR('#1: The Date.prototype.setUTCSeconds.length property has the attribute DontEnum');\n}\n\nfor(x in Date.prototype.setUTCSeconds) {\n if(x === \"length\") {\n $ERROR('#2: The Date.prototype.setUTCSeconds.length has the attribute DontEnum');\n }\n}\n\n",
+ "id": "S15.9.5.31_A3_T3"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.9.5.32_Date.prototype.setMinutes.json b/website/resources/scripts/testcases2/15.9.5.32_Date.prototype.setMinutes.json
new file mode 100644
index 000000000..b88b43f38
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.9.5.32_Date.prototype.setMinutes.json
@@ -0,0 +1,50 @@
+{
+ "testCollection": {
+ "name": "15.9.5.32_Date.prototype.setMinutes",
+ "numTests": 7,
+ "tests": [
+ {
+ "section": "15.9.5.32",
+ "description": "Checking absence of ReadOnly attribute",
+ "test": "x = Date.prototype.setMinutes;\nif(x === 1)\n Date.prototype.setMinutes = 2;\nelse\n Date.prototype.setMinutes = 1;\nif (Date.prototype.setMinutes === x) {\n $ERROR('#1: The Date.prototype.setMinutes has not the attribute ReadOnly');\n}\n\n",
+ "id": "S15.9.5.32_A1_T1"
+ },
+ {
+ "section": "15.9.5.32",
+ "description": "Checking absence of DontDelete attribute",
+ "test": "if (delete Date.prototype.setMinutes === false) {\n $ERROR('#1: The Date.prototype.setMinutes property has not the attributes DontDelete');\n}\n\nif (Date.prototype.hasOwnProperty('setMinutes')) {\n $FAIL('#2: The Date.prototype.setMinutes property has not the attributes DontDelete');\n}\n\n",
+ "id": "S15.9.5.32_A1_T2"
+ },
+ {
+ "section": "15.9.5.32",
+ "description": "Checking DontEnum attribute",
+ "test": "if (Date.prototype.propertyIsEnumerable('setMinutes')) {\n $ERROR('#1: The Date.prototype.setMinutes property has the attribute DontEnum');\n}\n\nfor(x in Date.prototype) {\n if(x === \"setMinutes\") {\n $ERROR('#2: The Date.prototype.setMinutes has the attribute DontEnum');\n }\n}\n\n",
+ "id": "S15.9.5.32_A1_T3"
+ },
+ {
+ "section": "15.9.5.32",
+ "description": "The \"length\" property of the \"setMinutes\" is 3",
+ "test": "if(Date.prototype.setMinutes.hasOwnProperty(\"length\") !== true){\n $ERROR('#1: The setMinutes has a \"length\" property');\n}\n\nif(Date.prototype.setMinutes.length !== 3){\n $ERROR('#2: The \"length\" property of the setMinutes is 3');\n}\n\n",
+ "id": "S15.9.5.32_A2_T1"
+ },
+ {
+ "section": "15.9.5.32",
+ "description": "Checking ReadOnly attribute",
+ "test": "x = Date.prototype.setMinutes.length;\nDate.prototype.setMinutes.length = 1;\nif (Date.prototype.setMinutes.length !== x) {\n $ERROR('#1: The Date.prototype.setMinutes.length has the attribute ReadOnly');\n}\n\n",
+ "id": "S15.9.5.32_A3_T1"
+ },
+ {
+ "section": "15.9.5.32",
+ "description": "Checking DontDelete attribute",
+ "test": "if (delete Date.prototype.setMinutes.length !== false) {\n $ERROR('#1: The Date.prototype.setMinutes.length property has the attributes DontDelete');\n}\n\nif (!Date.prototype.setMinutes.hasOwnProperty('length')) {\n $FAIL('#2: The Date.prototype.setMinutes.length property has the attributes DontDelete');\n}\n\n",
+ "id": "S15.9.5.32_A3_T2"
+ },
+ {
+ "section": "15.9.5.32",
+ "description": "Checking DontEnum attribute",
+ "test": "if (Date.prototype.setMinutes.propertyIsEnumerable('length')) {\n $ERROR('#1: The Date.prototype.setMinutes.length property has the attribute DontEnum');\n}\n\nfor(x in Date.prototype.setMinutes) {\n if(x === \"length\") {\n $ERROR('#2: The Date.prototype.setMinutes.length has the attribute DontEnum');\n }\n}\n\n",
+ "id": "S15.9.5.32_A3_T3"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.9.5.33_Date.prototype.setUTCMinutes.json b/website/resources/scripts/testcases2/15.9.5.33_Date.prototype.setUTCMinutes.json
new file mode 100644
index 000000000..15144564a
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.9.5.33_Date.prototype.setUTCMinutes.json
@@ -0,0 +1,50 @@
+{
+ "testCollection": {
+ "name": "15.9.5.33_Date.prototype.setUTCMinutes",
+ "numTests": 7,
+ "tests": [
+ {
+ "section": "15.9.5.33",
+ "description": "Checking absence of ReadOnly attribute",
+ "test": "x = Date.prototype.setUTCMinutes;\nif(x === 1)\n Date.prototype.setUTCMinutes = 2;\nelse\n Date.prototype.setUTCMinutes = 1;\nif (Date.prototype.setUTCMinutes === x) {\n $ERROR('#1: The Date.prototype.setUTCMinutes has not the attribute ReadOnly');\n}\n\n",
+ "id": "S15.9.5.33_A1_T1"
+ },
+ {
+ "section": "15.9.5.33",
+ "description": "Checking absence of DontDelete attribute",
+ "test": "if (delete Date.prototype.setUTCMinutes === false) {\n $ERROR('#1: The Date.prototype.setUTCMinutes property has not the attributes DontDelete');\n}\n\nif (Date.prototype.hasOwnProperty('setUTCMinutes')) {\n $FAIL('#2: The Date.prototype.setUTCMinutes property has not the attributes DontDelete');\n}\n\n",
+ "id": "S15.9.5.33_A1_T2"
+ },
+ {
+ "section": "15.9.5.33",
+ "description": "Checking DontEnum attribute",
+ "test": "if (Date.prototype.propertyIsEnumerable('setUTCMinutes')) {\n $ERROR('#1: The Date.prototype.setUTCMinutes property has the attribute DontEnum');\n}\n\nfor(x in Date.prototype) {\n if(x === \"setUTCMinutes\") {\n $ERROR('#2: The Date.prototype.setUTCMinutes has the attribute DontEnum');\n }\n}\n\n",
+ "id": "S15.9.5.33_A1_T3"
+ },
+ {
+ "section": "15.9.5.33",
+ "description": "The \"length\" property of the \"setUTCMinutes\" is 3",
+ "test": "if(Date.prototype.setUTCMinutes.hasOwnProperty(\"length\") !== true){\n $ERROR('#1: The setUTCMinutes has a \"length\" property');\n}\n\nif(Date.prototype.setUTCMinutes.length !== 3){\n $ERROR('#2: The \"length\" property of the setUTCMinutes is 3');\n}\n\n",
+ "id": "S15.9.5.33_A2_T1"
+ },
+ {
+ "section": "15.9.5.33",
+ "description": "Checking ReadOnly attribute",
+ "test": "x = Date.prototype.setUTCMinutes.length;\nDate.prototype.setUTCMinutes.length = 1;\nif (Date.prototype.setUTCMinutes.length !== x) {\n $ERROR('#1: The Date.prototype.setUTCMinutes.length has the attribute ReadOnly');\n}\n\n",
+ "id": "S15.9.5.33_A3_T1"
+ },
+ {
+ "section": "15.9.5.33",
+ "description": "Checking DontDelete attribute",
+ "test": "if (delete Date.prototype.setUTCMinutes.length !== false) {\n $ERROR('#1: The Date.prototype.setUTCMinutes.length property has the attributes DontDelete');\n}\n\nif (!Date.prototype.setUTCMinutes.hasOwnProperty('length')) {\n $FAIL('#2: The Date.prototype.setUTCMinutes.length property has the attributes DontDelete');\n}\n\n",
+ "id": "S15.9.5.33_A3_T2"
+ },
+ {
+ "section": "15.9.5.33",
+ "description": "Checking DontEnum attribute",
+ "test": "if (Date.prototype.setUTCMinutes.propertyIsEnumerable('length')) {\n $ERROR('#1: The Date.prototype.setUTCMinutes.length property has the attribute DontEnum');\n}\n\nfor(x in Date.prototype.setUTCMinutes) {\n if(x === \"length\") {\n $ERROR('#2: The Date.prototype.setUTCMinutes.length has the attribute DontEnum');\n }\n}\n\n",
+ "id": "S15.9.5.33_A3_T3"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.9.5.34_Date.prototype.setHours.json b/website/resources/scripts/testcases2/15.9.5.34_Date.prototype.setHours.json
new file mode 100644
index 000000000..70320a2d0
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.9.5.34_Date.prototype.setHours.json
@@ -0,0 +1,50 @@
+{
+ "testCollection": {
+ "name": "15.9.5.34_Date.prototype.setHours",
+ "numTests": 7,
+ "tests": [
+ {
+ "section": "15.9.5.34",
+ "description": "Checking absence of ReadOnly attribute",
+ "test": "x = Date.prototype.setHours;\nif(x === 1)\n Date.prototype.setHours = 2;\nelse\n Date.prototype.setHours = 1;\nif (Date.prototype.setHours === x) {\n $ERROR('#1: The Date.prototype.setHours has not the attribute ReadOnly');\n}\n\n",
+ "id": "S15.9.5.34_A1_T1"
+ },
+ {
+ "section": "15.9.5.34",
+ "description": "Checking absence of DontDelete attribute",
+ "test": "if (delete Date.prototype.setHours === false) {\n $ERROR('#1: The Date.prototype.setHours property has not the attributes DontDelete');\n}\n\nif (Date.prototype.hasOwnProperty('setHours')) {\n $FAIL('#2: The Date.prototype.setHours property has not the attributes DontDelete');\n}\n\n",
+ "id": "S15.9.5.34_A1_T2"
+ },
+ {
+ "section": "15.9.5.34",
+ "description": "Checking DontEnum attribute",
+ "test": "if (Date.prototype.propertyIsEnumerable('setHours')) {\n $ERROR('#1: The Date.prototype.setHours property has the attribute DontEnum');\n}\n\nfor(x in Date.prototype) {\n if(x === \"setHours\") {\n $ERROR('#2: The Date.prototype.setHours has the attribute DontEnum');\n }\n}\n\n",
+ "id": "S15.9.5.34_A1_T3"
+ },
+ {
+ "section": "15.9.5.34",
+ "description": "The \"length\" property of the \"setHours\" is 4",
+ "test": "if(Date.prototype.setHours.hasOwnProperty(\"length\") !== true){\n $ERROR('#1: The setHours has a \"length\" property');\n}\n\nif(Date.prototype.setHours.length !== 4){\n $ERROR('#2: The \"length\" property of the setHours is 4');\n}\n\n",
+ "id": "S15.9.5.34_A2_T1"
+ },
+ {
+ "section": "15.9.5.34",
+ "description": "Checking ReadOnly attribute",
+ "test": "x = Date.prototype.setHours.length;\nDate.prototype.setHours.length = 1;\nif (Date.prototype.setHours.length !== x) {\n $ERROR('#1: The Date.prototype.setHours.length has the attribute ReadOnly');\n}\n\n",
+ "id": "S15.9.5.34_A3_T1"
+ },
+ {
+ "section": "15.9.5.34",
+ "description": "Checking DontDelete attribute",
+ "test": "if (delete Date.prototype.setHours.length !== false) {\n $ERROR('#1: The Date.prototype.setHours.length property has the attributes DontDelete');\n}\n\nif (!Date.prototype.setHours.hasOwnProperty('length')) {\n $FAIL('#2: The Date.prototype.setHours.length property has the attributes DontDelete');\n}\n\n",
+ "id": "S15.9.5.34_A3_T2"
+ },
+ {
+ "section": "15.9.5.34",
+ "description": "Checking DontEnum attribute",
+ "test": "if (Date.prototype.setHours.propertyIsEnumerable('length')) {\n $ERROR('#1: The Date.prototype.setHours.length property has the attribute DontEnum');\n}\n\nfor(x in Date.prototype.setHours) {\n if(x === \"length\") {\n $ERROR('#2: The Date.prototype.setHours.length has the attribute DontEnum');\n }\n}\n\n",
+ "id": "S15.9.5.34_A3_T3"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.9.5.35_Date.prototype.setUTCHours.json b/website/resources/scripts/testcases2/15.9.5.35_Date.prototype.setUTCHours.json
new file mode 100644
index 000000000..a62326d4d
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.9.5.35_Date.prototype.setUTCHours.json
@@ -0,0 +1,50 @@
+{
+ "testCollection": {
+ "name": "15.9.5.35_Date.prototype.setUTCHours",
+ "numTests": 7,
+ "tests": [
+ {
+ "section": "15.9.5.35",
+ "description": "Checking absence of ReadOnly attribute",
+ "test": "x = Date.prototype.setUTCHours;\nif(x === 1)\n Date.prototype.setUTCHours = 2;\nelse\n Date.prototype.setUTCHours = 1;\nif (Date.prototype.setUTCHours === x) {\n $ERROR('#1: The Date.prototype.setUTCHours has not the attribute ReadOnly');\n}\n\n",
+ "id": "S15.9.5.35_A1_T1"
+ },
+ {
+ "section": "15.9.5.35",
+ "description": "Checking absence of DontDelete attribute",
+ "test": "if (delete Date.prototype.setUTCHours === false) {\n $ERROR('#1: The Date.prototype.setUTCHours property has not the attributes DontDelete');\n}\n\nif (Date.prototype.hasOwnProperty('setUTCHours')) {\n $FAIL('#2: The Date.prototype.setUTCHours property has not the attributes DontDelete');\n}\n\n",
+ "id": "S15.9.5.35_A1_T2"
+ },
+ {
+ "section": "15.9.5.35",
+ "description": "Checking DontEnum attribute",
+ "test": "if (Date.prototype.propertyIsEnumerable('setUTCHours')) {\n $ERROR('#1: The Date.prototype.setUTCHours property has the attribute DontEnum');\n}\n\nfor(x in Date.prototype) {\n if(x === \"setUTCHours\") {\n $ERROR('#2: The Date.prototype.setUTCHours has the attribute DontEnum');\n }\n}\n\n",
+ "id": "S15.9.5.35_A1_T3"
+ },
+ {
+ "section": "15.9.5.35",
+ "description": "The \"length\" property of the \"setUTCHours\" is 4",
+ "test": "if(Date.prototype.setUTCHours.hasOwnProperty(\"length\") !== true){\n $ERROR('#1: The setUTCHours has a \"length\" property');\n}\n\nif(Date.prototype.setUTCHours.length !== 4){\n $ERROR('#2: The \"length\" property of the setUTCHours is 4');\n}\n\n",
+ "id": "S15.9.5.35_A2_T1"
+ },
+ {
+ "section": "15.9.5.35",
+ "description": "Checking ReadOnly attribute",
+ "test": "x = Date.prototype.setUTCHours.length;\nDate.prototype.setUTCHours.length = 1;\nif (Date.prototype.setUTCHours.length !== x) {\n $ERROR('#1: The Date.prototype.setUTCHours.length has the attribute ReadOnly');\n}\n\n",
+ "id": "S15.9.5.35_A3_T1"
+ },
+ {
+ "section": "15.9.5.35",
+ "description": "Checking DontDelete attribute",
+ "test": "if (delete Date.prototype.setUTCHours.length !== false) {\n $ERROR('#1: The Date.prototype.setUTCHours.length property has the attributes DontDelete');\n}\n\nif (!Date.prototype.setUTCHours.hasOwnProperty('length')) {\n $FAIL('#2: The Date.prototype.setUTCHours.length property has the attributes DontDelete');\n}\n\n",
+ "id": "S15.9.5.35_A3_T2"
+ },
+ {
+ "section": "15.9.5.35",
+ "description": "Checking DontEnum attribute",
+ "test": "if (Date.prototype.setUTCHours.propertyIsEnumerable('length')) {\n $ERROR('#1: The Date.prototype.setUTCHours.length property has the attribute DontEnum');\n}\n\nfor(x in Date.prototype.setUTCHours) {\n if(x === \"length\") {\n $ERROR('#2: The Date.prototype.setUTCHours.length has the attribute DontEnum');\n }\n}\n\n",
+ "id": "S15.9.5.35_A3_T3"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.9.5.36_Date.prototype.setDate.json b/website/resources/scripts/testcases2/15.9.5.36_Date.prototype.setDate.json
new file mode 100644
index 000000000..a34c96828
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.9.5.36_Date.prototype.setDate.json
@@ -0,0 +1,50 @@
+{
+ "testCollection": {
+ "name": "15.9.5.36_Date.prototype.setDate",
+ "numTests": 7,
+ "tests": [
+ {
+ "section": "15.9.5.36",
+ "description": "Checking absence of ReadOnly attribute",
+ "test": "x = Date.prototype.setDate;\nif(x === 1)\n Date.prototype.setDate = 2;\nelse\n Date.prototype.setDate = 1;\nif (Date.prototype.setDate === x) {\n $ERROR('#1: The Date.prototype.setDate has not the attribute ReadOnly');\n}\n\n",
+ "id": "S15.9.5.36_A1_T1"
+ },
+ {
+ "section": "15.9.5.36",
+ "description": "Checking absence of DontDelete attribute",
+ "test": "if (delete Date.prototype.setDate === false) {\n $ERROR('#1: The Date.prototype.setDate property has not the attributes DontDelete');\n}\n\nif (Date.prototype.hasOwnProperty('setDate')) {\n $FAIL('#2: The Date.prototype.setDate property has not the attributes DontDelete');\n}\n\n",
+ "id": "S15.9.5.36_A1_T2"
+ },
+ {
+ "section": "15.9.5.36",
+ "description": "Checking DontEnum attribute",
+ "test": "if (Date.prototype.propertyIsEnumerable('setDate')) {\n $ERROR('#1: The Date.prototype.setDate property has the attribute DontEnum');\n}\n\nfor(x in Date.prototype) {\n if(x === \"setDate\") {\n $ERROR('#2: The Date.prototype.setDate has the attribute DontEnum');\n }\n}\n\n",
+ "id": "S15.9.5.36_A1_T3"
+ },
+ {
+ "section": "15.9.5.36",
+ "description": "The \"length\" property of the \"setDate\" is 1",
+ "test": "if(Date.prototype.setDate.hasOwnProperty(\"length\") !== true){\n $ERROR('#1: The setDate has a \"length\" property');\n}\n\nif(Date.prototype.setDate.length !== 1){\n $ERROR('#2: The \"length\" property of the setDate is 1');\n}\n\n",
+ "id": "S15.9.5.36_A2_T1"
+ },
+ {
+ "section": "15.9.5.36",
+ "description": "Checking ReadOnly attribute",
+ "test": "x = Date.prototype.setDate.length;\nDate.prototype.setDate.length = 1;\nif (Date.prototype.setDate.length !== x) {\n $ERROR('#1: The Date.prototype.setDate.length has the attribute ReadOnly');\n}\n\n",
+ "id": "S15.9.5.36_A3_T1"
+ },
+ {
+ "section": "15.9.5.36",
+ "description": "Checking DontDelete attribute",
+ "test": "if (delete Date.prototype.setDate.length !== false) {\n $ERROR('#1: The Date.prototype.setDate.length property has the attributes DontDelete');\n}\n\nif (!Date.prototype.setDate.hasOwnProperty('length')) {\n $FAIL('#2: The Date.prototype.setDate.length property has the attributes DontDelete');\n}\n\n",
+ "id": "S15.9.5.36_A3_T2"
+ },
+ {
+ "section": "15.9.5.36",
+ "description": "Checking DontEnum attribute",
+ "test": "if (Date.prototype.setDate.propertyIsEnumerable('length')) {\n $ERROR('#1: The Date.prototype.setDate.length property has the attribute DontEnum');\n}\n\nfor(x in Date.prototype.setDate) {\n if(x === \"length\") {\n $ERROR('#2: The Date.prototype.setDate.length has the attribute DontEnum');\n }\n}\n\n",
+ "id": "S15.9.5.36_A3_T3"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.9.5.37_Date.prototype.setUTCDate.json b/website/resources/scripts/testcases2/15.9.5.37_Date.prototype.setUTCDate.json
new file mode 100644
index 000000000..f7c7301ae
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.9.5.37_Date.prototype.setUTCDate.json
@@ -0,0 +1,50 @@
+{
+ "testCollection": {
+ "name": "15.9.5.37_Date.prototype.setUTCDate",
+ "numTests": 7,
+ "tests": [
+ {
+ "section": "15.9.5.37",
+ "description": "Checking absence of ReadOnly attribute",
+ "test": "x = Date.prototype.setUTCDate;\nif(x === 1)\n Date.prototype.setUTCDate = 2;\nelse\n Date.prototype.setUTCDate = 1;\nif (Date.prototype.setUTCDate === x) {\n $ERROR('#1: The Date.prototype.setUTCDate has not the attribute ReadOnly');\n}\n\n",
+ "id": "S15.9.5.37_A1_T1"
+ },
+ {
+ "section": "15.9.5.37",
+ "description": "Checking absence of DontDelete attribute",
+ "test": "if (delete Date.prototype.setUTCDate === false) {\n $ERROR('#1: The Date.prototype.setUTCDate property has not the attributes DontDelete');\n}\n\nif (Date.prototype.hasOwnProperty('setUTCDate')) {\n $FAIL('#2: The Date.prototype.setUTCDate property has not the attributes DontDelete');\n}\n\n",
+ "id": "S15.9.5.37_A1_T2"
+ },
+ {
+ "section": "15.9.5.37",
+ "description": "Checking DontEnum attribute",
+ "test": "if (Date.prototype.propertyIsEnumerable('setUTCDate')) {\n $ERROR('#1: The Date.prototype.setUTCDate property has the attribute DontEnum');\n}\n\nfor(x in Date.prototype) {\n if(x === \"setUTCDate\") {\n $ERROR('#2: The Date.prototype.setUTCDate has the attribute DontEnum');\n }\n}\n\n",
+ "id": "S15.9.5.37_A1_T3"
+ },
+ {
+ "section": "15.9.5.37",
+ "description": "The \"length\" property of the \"setUTCDate\" is 1",
+ "test": "if(Date.prototype.setUTCDate.hasOwnProperty(\"length\") !== true){\n $ERROR('#1: The setUTCDate has a \"length\" property');\n}\n\nif(Date.prototype.setUTCDate.length !== 1){\n $ERROR('#2: The \"length\" property of the setUTCDate is 1');\n}\n\n",
+ "id": "S15.9.5.37_A2_T1"
+ },
+ {
+ "section": "15.9.5.37",
+ "description": "Checking ReadOnly attribute",
+ "test": "x = Date.prototype.setUTCDate.length;\nDate.prototype.setUTCDate.length = 1;\nif (Date.prototype.setUTCDate.length !== x) {\n $ERROR('#1: The Date.prototype.setUTCDate.length has the attribute ReadOnly');\n}\n\n",
+ "id": "S15.9.5.37_A3_T1"
+ },
+ {
+ "section": "15.9.5.37",
+ "description": "Checking DontDelete attribute",
+ "test": "if (delete Date.prototype.setUTCDate.length !== false) {\n $ERROR('#1: The Date.prototype.setUTCDate.length property has the attributes DontDelete');\n}\n\nif (!Date.prototype.setUTCDate.hasOwnProperty('length')) {\n $FAIL('#2: The Date.prototype.setUTCDate.length property has the attributes DontDelete');\n}\n\n",
+ "id": "S15.9.5.37_A3_T2"
+ },
+ {
+ "section": "15.9.5.37",
+ "description": "Checking DontEnum attribute",
+ "test": "if (Date.prototype.setUTCDate.propertyIsEnumerable('length')) {\n $ERROR('#1: The Date.prototype.setUTCDate.length property has the attribute DontEnum');\n}\n\nfor(x in Date.prototype.setUTCDate) {\n if(x === \"length\") {\n $ERROR('#2: The Date.prototype.setUTCDate.length has the attribute DontEnum');\n }\n}\n\n",
+ "id": "S15.9.5.37_A3_T3"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.9.5.38_Date.prototype.setMonth.json b/website/resources/scripts/testcases2/15.9.5.38_Date.prototype.setMonth.json
new file mode 100644
index 000000000..a37641135
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.9.5.38_Date.prototype.setMonth.json
@@ -0,0 +1,50 @@
+{
+ "testCollection": {
+ "name": "15.9.5.38_Date.prototype.setMonth",
+ "numTests": 7,
+ "tests": [
+ {
+ "section": "15.9.5.38",
+ "description": "Checking absence of ReadOnly attribute",
+ "test": "x = Date.prototype.setMonth;\nif(x === 1)\n Date.prototype.setMonth = 2;\nelse\n Date.prototype.setMonth = 1;\nif (Date.prototype.setMonth === x) {\n $ERROR('#1: The Date.prototype.setMonth has not the attribute ReadOnly');\n}\n\n",
+ "id": "S15.9.5.38_A1_T1"
+ },
+ {
+ "section": "15.9.5.38",
+ "description": "Checking absence of DontDelete attribute",
+ "test": "if (delete Date.prototype.setMonth === false) {\n $ERROR('#1: The Date.prototype.setMonth property has not the attributes DontDelete');\n}\n\nif (Date.prototype.hasOwnProperty('setMonth')) {\n $FAIL('#2: The Date.prototype.setMonth property has not the attributes DontDelete');\n}\n\n",
+ "id": "S15.9.5.38_A1_T2"
+ },
+ {
+ "section": "15.9.5.38",
+ "description": "Checking DontEnum attribute",
+ "test": "if (Date.prototype.propertyIsEnumerable('setMonth')) {\n $ERROR('#1: The Date.prototype.setMonth property has the attribute DontEnum');\n}\n\nfor(x in Date.prototype) {\n if(x === \"setMonth\") {\n $ERROR('#2: The Date.prototype.setMonth has the attribute DontEnum');\n }\n}\n\n",
+ "id": "S15.9.5.38_A1_T3"
+ },
+ {
+ "section": "15.9.5.38",
+ "description": "The \"length\" property of the \"setMonth\" is 2",
+ "test": "if(Date.prototype.setMonth.hasOwnProperty(\"length\") !== true){\n $ERROR('#1: The setMonth has a \"length\" property');\n}\n\nif(Date.prototype.setMonth.length !== 2){\n $ERROR('#2: The \"length\" property of the setMonth is 2');\n}\n\n",
+ "id": "S15.9.5.38_A2_T1"
+ },
+ {
+ "section": "15.9.5.38",
+ "description": "Checking ReadOnly attribute",
+ "test": "x = Date.prototype.setMonth.length;\nDate.prototype.setMonth.length = 1;\nif (Date.prototype.setMonth.length !== x) {\n $ERROR('#1: The Date.prototype.setMonth.length has the attribute ReadOnly');\n}\n\n",
+ "id": "S15.9.5.38_A3_T1"
+ },
+ {
+ "section": "15.9.5.38",
+ "description": "Checking DontDelete attribute",
+ "test": "if (delete Date.prototype.setMonth.length !== false) {\n $ERROR('#1: The Date.prototype.setMonth.length property has the attributes DontDelete');\n}\n\nif (!Date.prototype.setMonth.hasOwnProperty('length')) {\n $FAIL('#2: The Date.prototype.setMonth.length property has the attributes DontDelete');\n}\n\n",
+ "id": "S15.9.5.38_A3_T2"
+ },
+ {
+ "section": "15.9.5.38",
+ "description": "Checking DontEnum attribute",
+ "test": "if (Date.prototype.setMonth.propertyIsEnumerable('length')) {\n $ERROR('#1: The Date.prototype.setMonth.length property has the attribute DontEnum');\n}\n\nfor(x in Date.prototype.setMonth) {\n if(x === \"length\") {\n $ERROR('#2: The Date.prototype.setMonth.length has the attribute DontEnum');\n }\n}\n\n",
+ "id": "S15.9.5.38_A3_T3"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.9.5.39_Date.prototype.setUTCMonth.json b/website/resources/scripts/testcases2/15.9.5.39_Date.prototype.setUTCMonth.json
new file mode 100644
index 000000000..844f80d27
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.9.5.39_Date.prototype.setUTCMonth.json
@@ -0,0 +1,50 @@
+{
+ "testCollection": {
+ "name": "15.9.5.39_Date.prototype.setUTCMonth",
+ "numTests": 7,
+ "tests": [
+ {
+ "section": "15.9.5.39",
+ "description": "Checking absence of ReadOnly attribute",
+ "test": "x = Date.prototype.setUTCMonth;\nif(x === 1)\n Date.prototype.setUTCMonth = 2;\nelse\n Date.prototype.setUTCMonth = 1;\nif (Date.prototype.setUTCMonth === x) {\n $ERROR('#1: The Date.prototype.setUTCMonth has not the attribute ReadOnly');\n}\n\n",
+ "id": "S15.9.5.39_A1_T1"
+ },
+ {
+ "section": "15.9.5.39",
+ "description": "Checking absence of DontDelete attribute",
+ "test": "if (delete Date.prototype.setUTCMonth === false) {\n $ERROR('#1: The Date.prototype.setUTCMonth property has not the attributes DontDelete');\n}\n\nif (Date.prototype.hasOwnProperty('setUTCMonth')) {\n $FAIL('#2: The Date.prototype.setUTCMonth property has not the attributes DontDelete');\n}\n\n",
+ "id": "S15.9.5.39_A1_T2"
+ },
+ {
+ "section": "15.9.5.39",
+ "description": "Checking DontEnum attribute",
+ "test": "if (Date.prototype.propertyIsEnumerable('setUTCMonth')) {\n $ERROR('#1: The Date.prototype.setUTCMonth property has the attribute DontEnum');\n}\n\nfor(x in Date.prototype) {\n if(x === \"setUTCMonth\") {\n $ERROR('#2: The Date.prototype.setUTCMonth has the attribute DontEnum');\n }\n}\n\n",
+ "id": "S15.9.5.39_A1_T3"
+ },
+ {
+ "section": "15.9.5.39",
+ "description": "The \"length\" property of the \"setUTCMonth\" is 2",
+ "test": "if(Date.prototype.setUTCMonth.hasOwnProperty(\"length\") !== true){\n $ERROR('#1: The setUTCMonth has a \"length\" property');\n}\n\nif(Date.prototype.setUTCMonth.length !== 2){\n $ERROR('#2: The \"length\" property of the setUTCMonth is 2');\n}\n\n",
+ "id": "S15.9.5.39_A2_T1"
+ },
+ {
+ "section": "15.9.5.39",
+ "description": "Checking ReadOnly attribute",
+ "test": "x = Date.prototype.setUTCMonth.length;\nDate.prototype.setUTCMonth.length = 1;\nif (Date.prototype.setUTCMonth.length !== x) {\n $ERROR('#1: The Date.prototype.setUTCMonth.length has the attribute ReadOnly');\n}\n\n",
+ "id": "S15.9.5.39_A3_T1"
+ },
+ {
+ "section": "15.9.5.39",
+ "description": "Checking DontDelete attribute",
+ "test": "if (delete Date.prototype.setUTCMonth.length !== false) {\n $ERROR('#1: The Date.prototype.setUTCMonth.length property has the attributes DontDelete');\n}\n\nif (!Date.prototype.setUTCMonth.hasOwnProperty('length')) {\n $FAIL('#2: The Date.prototype.setUTCMonth.length property has the attributes DontDelete');\n}\n\n",
+ "id": "S15.9.5.39_A3_T2"
+ },
+ {
+ "section": "15.9.5.39",
+ "description": "Checking DontEnum attribute",
+ "test": "if (Date.prototype.setUTCMonth.propertyIsEnumerable('length')) {\n $ERROR('#1: The Date.prototype.setUTCMonth.length property has the attribute DontEnum');\n}\n\nfor(x in Date.prototype.setUTCMonth) {\n if(x === \"length\") {\n $ERROR('#2: The Date.prototype.setUTCMonth.length has the attribute DontEnum');\n }\n}\n\n",
+ "id": "S15.9.5.39_A3_T3"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.9.5.3_Date.prototype.toDateString.json b/website/resources/scripts/testcases2/15.9.5.3_Date.prototype.toDateString.json
new file mode 100644
index 000000000..48cb61c13
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.9.5.3_Date.prototype.toDateString.json
@@ -0,0 +1,50 @@
+{
+ "testCollection": {
+ "name": "15.9.5.3_Date.prototype.toDateString",
+ "numTests": 7,
+ "tests": [
+ {
+ "section": "15.9.5.3",
+ "description": "Checking absence of ReadOnly attribute",
+ "test": "x = Date.prototype.toDateString;\nif(x === 1)\n Date.prototype.toDateString = 2;\nelse\n Date.prototype.toDateString = 1;\nif (Date.prototype.toDateString === x) {\n $ERROR('#1: The Date.prototype.toDateString has not the attribute ReadOnly');\n}\n\n",
+ "id": "S15.9.5.3_A1_T1"
+ },
+ {
+ "section": "15.9.5.3",
+ "description": "Checking absence of DontDelete attribute",
+ "test": "if (delete Date.prototype.toDateString === false) {\n $ERROR('#1: The Date.prototype.toDateString property has not the attributes DontDelete');\n}\n\nif (Date.prototype.hasOwnProperty('toDateString')) {\n $FAIL('#2: The Date.prototype.toDateString property has not the attributes DontDelete');\n}\n\n",
+ "id": "S15.9.5.3_A1_T2"
+ },
+ {
+ "section": "15.9.5.3",
+ "description": "Checking DontEnum attribute",
+ "test": "if (Date.prototype.propertyIsEnumerable('toDateString')) {\n $ERROR('#1: The Date.prototype.toDateString property has the attribute DontEnum');\n}\n\nfor(x in Date.prototype) {\n if(x === \"toDateString\") {\n $ERROR('#2: The Date.prototype.toDateString has the attribute DontEnum');\n }\n}\n\n",
+ "id": "S15.9.5.3_A1_T3"
+ },
+ {
+ "section": "15.9.5.3",
+ "description": "The \"length\" property of the \"toDateString\" is 0",
+ "test": "if(Date.prototype.toDateString.hasOwnProperty(\"length\") !== true){\n $ERROR('#1: The toDateString has a \"length\" property');\n}\n\nif(Date.prototype.toDateString.length !== 0){\n $ERROR('#2: The \"length\" property of the toDateString is 0');\n}\n\n",
+ "id": "S15.9.5.3_A2_T1"
+ },
+ {
+ "section": "15.9.5.3",
+ "description": "Checking ReadOnly attribute",
+ "test": "x = Date.prototype.toDateString.length;\nDate.prototype.toDateString.length = 1;\nif (Date.prototype.toDateString.length !== x) {\n $ERROR('#1: The Date.prototype.toDateString.length has the attribute ReadOnly');\n}\n\n",
+ "id": "S15.9.5.3_A3_T1"
+ },
+ {
+ "section": "15.9.5.3",
+ "description": "Checking DontDelete attribute",
+ "test": "if (delete Date.prototype.toDateString.length !== false) {\n $ERROR('#1: The Date.prototype.toDateString.length property has the attributes DontDelete');\n}\n\nif (!Date.prototype.toDateString.hasOwnProperty('length')) {\n $FAIL('#2: The Date.prototype.toDateString.length property has the attributes DontDelete');\n}\n\n",
+ "id": "S15.9.5.3_A3_T2"
+ },
+ {
+ "section": "15.9.5.3",
+ "description": "Checking DontEnum attribute",
+ "test": "if (Date.prototype.toDateString.propertyIsEnumerable('length')) {\n $ERROR('#1: The Date.prototype.toDateString.length property has the attribute DontEnum');\n}\n\nfor(x in Date.prototype.toDateString) {\n if(x === \"length\") {\n $ERROR('#2: The Date.prototype.toDateString.length has the attribute DontEnum');\n }\n}\n\n",
+ "id": "S15.9.5.3_A3_T3"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.9.5.40_Date.prototype.setFullYear.json b/website/resources/scripts/testcases2/15.9.5.40_Date.prototype.setFullYear.json
new file mode 100644
index 000000000..a277f9888
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.9.5.40_Date.prototype.setFullYear.json
@@ -0,0 +1,50 @@
+{
+ "testCollection": {
+ "name": "15.9.5.40_Date.prototype.setFullYear",
+ "numTests": 7,
+ "tests": [
+ {
+ "section": "15.9.5.40",
+ "description": "Checking absence of ReadOnly attribute",
+ "test": "x = Date.prototype.setFullYear;\nif(x === 1)\n Date.prototype.setFullYear = 2;\nelse\n Date.prototype.setFullYear = 1;\nif (Date.prototype.setFullYear === x) {\n $ERROR('#1: The Date.prototype.setFullYear has not the attribute ReadOnly');\n}\n\n",
+ "id": "S15.9.5.40_A1_T1"
+ },
+ {
+ "section": "15.9.5.40",
+ "description": "Checking absence of DontDelete attribute",
+ "test": "if (delete Date.prototype.setFullYear === false) {\n $ERROR('#1: The Date.prototype.setFullYear property has not the attributes DontDelete');\n}\n\nif (Date.prototype.hasOwnProperty('setFullYear')) {\n $FAIL('#2: The Date.prototype.setFullYear property has not the attributes DontDelete');\n}\n\n",
+ "id": "S15.9.5.40_A1_T2"
+ },
+ {
+ "section": "15.9.5.40",
+ "description": "Checking DontEnum attribute",
+ "test": "if (Date.prototype.propertyIsEnumerable('setFullYear')) {\n $ERROR('#1: The Date.prototype.setFullYear property has the attribute DontEnum');\n}\n\nfor(x in Date.prototype) {\n if(x === \"setFullYear\") {\n $ERROR('#2: The Date.prototype.setFullYear has the attribute DontEnum');\n }\n}\n\n",
+ "id": "S15.9.5.40_A1_T3"
+ },
+ {
+ "section": "15.9.5.40",
+ "description": "The \"length\" property of the \"setFullYear\" is 3",
+ "test": "if(Date.prototype.setFullYear.hasOwnProperty(\"length\") !== true){\n $ERROR('#1: The setFullYear has a \"length\" property');\n}\n\nif(Date.prototype.setFullYear.length !== 3){\n $ERROR('#2: The \"length\" property of the setFullYear is 3');\n}\n\n",
+ "id": "S15.9.5.40_A2_T1"
+ },
+ {
+ "section": "15.9.5.40",
+ "description": "Checking ReadOnly attribute",
+ "test": "x = Date.prototype.setFullYear.length;\nDate.prototype.setFullYear.length = 1;\nif (Date.prototype.setFullYear.length !== x) {\n $ERROR('#1: The Date.prototype.setFullYear.length has the attribute ReadOnly');\n}\n\n",
+ "id": "S15.9.5.40_A3_T1"
+ },
+ {
+ "section": "15.9.5.40",
+ "description": "Checking DontDelete attribute",
+ "test": "if (delete Date.prototype.setFullYear.length !== false) {\n $ERROR('#1: The Date.prototype.setFullYear.length property has the attributes DontDelete');\n}\n\nif (!Date.prototype.setFullYear.hasOwnProperty('length')) {\n $FAIL('#2: The Date.prototype.setFullYear.length property has the attributes DontDelete');\n}\n\n",
+ "id": "S15.9.5.40_A3_T2"
+ },
+ {
+ "section": "15.9.5.40",
+ "description": "Checking DontEnum attribute",
+ "test": "if (Date.prototype.setFullYear.propertyIsEnumerable('length')) {\n $ERROR('#1: The Date.prototype.setFullYear.length property has the attribute DontEnum');\n}\n\nfor(x in Date.prototype.setFullYear) {\n if(x === \"length\") {\n $ERROR('#2: The Date.prototype.setFullYear.length has the attribute DontEnum');\n }\n}\n\n",
+ "id": "S15.9.5.40_A3_T3"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.9.5.41_Date.prototype.setUTCFullYear.json b/website/resources/scripts/testcases2/15.9.5.41_Date.prototype.setUTCFullYear.json
new file mode 100644
index 000000000..5c9bb5276
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.9.5.41_Date.prototype.setUTCFullYear.json
@@ -0,0 +1,50 @@
+{
+ "testCollection": {
+ "name": "15.9.5.41_Date.prototype.setUTCFullYear",
+ "numTests": 7,
+ "tests": [
+ {
+ "section": "15.9.5.41",
+ "description": "Checking absence of ReadOnly attribute",
+ "test": "x = Date.prototype.setUTCFullYear;\nif(x === 1)\n Date.prototype.setUTCFullYear = 2;\nelse\n Date.prototype.setUTCFullYear = 1;\nif (Date.prototype.setUTCFullYear === x) {\n $ERROR('#1: The Date.prototype.setUTCFullYear has not the attribute ReadOnly');\n}\n\n",
+ "id": "S15.9.5.41_A1_T1"
+ },
+ {
+ "section": "15.9.5.41",
+ "description": "Checking absence of DontDelete attribute",
+ "test": "if (delete Date.prototype.setUTCFullYear === false) {\n $ERROR('#1: The Date.prototype.setUTCFullYear property has not the attributes DontDelete');\n}\n\nif (Date.prototype.hasOwnProperty('setUTCFullYear')) {\n $FAIL('#2: The Date.prototype.setUTCFullYear property has not the attributes DontDelete');\n}\n\n",
+ "id": "S15.9.5.41_A1_T2"
+ },
+ {
+ "section": "15.9.5.41",
+ "description": "Checking DontEnum attribute",
+ "test": "if (Date.prototype.propertyIsEnumerable('setUTCFullYear')) {\n $ERROR('#1: The Date.prototype.setUTCFullYear property has the attribute DontEnum');\n}\n\nfor(x in Date.prototype) {\n if(x === \"setUTCFullYear\") {\n $ERROR('#2: The Date.prototype.setUTCFullYear has the attribute DontEnum');\n }\n}\n\n",
+ "id": "S15.9.5.41_A1_T3"
+ },
+ {
+ "section": "15.9.5.41",
+ "description": "The \"length\" property of the \"setUTCFullYear\" is 3",
+ "test": "if(Date.prototype.setUTCFullYear.hasOwnProperty(\"length\") !== true){\n $ERROR('#1: The setUTCFullYear has a \"length\" property');\n}\n\nif(Date.prototype.setUTCFullYear.length !== 3){\n $ERROR('#2: The \"length\" property of the setUTCFullYear is 3');\n}\n\n",
+ "id": "S15.9.5.41_A2_T1"
+ },
+ {
+ "section": "15.9.5.41",
+ "description": "Checking ReadOnly attribute",
+ "test": "x = Date.prototype.setUTCFullYear.length;\nDate.prototype.setUTCFullYear.length = 1;\nif (Date.prototype.setUTCFullYear.length !== x) {\n $ERROR('#1: The Date.prototype.setUTCFullYear.length has the attribute ReadOnly');\n}\n\n",
+ "id": "S15.9.5.41_A3_T1"
+ },
+ {
+ "section": "15.9.5.41",
+ "description": "Checking DontDelete attribute",
+ "test": "if (delete Date.prototype.setUTCFullYear.length !== false) {\n $ERROR('#1: The Date.prototype.setUTCFullYear.length property has the attributes DontDelete');\n}\n\nif (!Date.prototype.setUTCFullYear.hasOwnProperty('length')) {\n $FAIL('#2: The Date.prototype.setUTCFullYear.length property has the attributes DontDelete');\n}\n\n",
+ "id": "S15.9.5.41_A3_T2"
+ },
+ {
+ "section": "15.9.5.41",
+ "description": "Checking DontEnum attribute",
+ "test": "if (Date.prototype.setUTCFullYear.propertyIsEnumerable('length')) {\n $ERROR('#1: The Date.prototype.setUTCFullYear.length property has the attribute DontEnum');\n}\n\nfor(x in Date.prototype.setUTCFullYear) {\n if(x === \"length\") {\n $ERROR('#2: The Date.prototype.setUTCFullYear.length has the attribute DontEnum');\n }\n}\n\n",
+ "id": "S15.9.5.41_A3_T3"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.9.5.42_Date.prototype.toUTCString.json b/website/resources/scripts/testcases2/15.9.5.42_Date.prototype.toUTCString.json
new file mode 100644
index 000000000..0d9420c16
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.9.5.42_Date.prototype.toUTCString.json
@@ -0,0 +1,50 @@
+{
+ "testCollection": {
+ "name": "15.9.5.42_Date.prototype.toUTCString",
+ "numTests": 7,
+ "tests": [
+ {
+ "section": "15.9.5.42",
+ "description": "Checking absence of ReadOnly attribute",
+ "test": "x = Date.prototype.toUTCString;\nif(x === 1)\n Date.prototype.toUTCString = 2;\nelse\n Date.prototype.toUTCString = 1;\nif (Date.prototype.toUTCString === x) {\n $ERROR('#1: The Date.prototype.toUTCString has not the attribute ReadOnly');\n}\n\n",
+ "id": "S15.9.5.42_A1_T1"
+ },
+ {
+ "section": "15.9.5.42",
+ "description": "Checking absence of DontDelete attribute",
+ "test": "if (delete Date.prototype.toUTCString === false) {\n $ERROR('#1: The Date.prototype.toUTCString property has not the attributes DontDelete');\n}\n\nif (Date.prototype.hasOwnProperty('toUTCString')) {\n $FAIL('#2: The Date.prototype.toUTCString property has not the attributes DontDelete');\n}\n\n",
+ "id": "S15.9.5.42_A1_T2"
+ },
+ {
+ "section": "15.9.5.42",
+ "description": "Checking DontEnum attribute",
+ "test": "if (Date.prototype.propertyIsEnumerable('toUTCString')) {\n $ERROR('#1: The Date.prototype.toUTCString property has the attribute DontEnum');\n}\n\nfor(x in Date.prototype) {\n if(x === \"toUTCString\") {\n $ERROR('#2: The Date.prototype.toUTCString has the attribute DontEnum');\n }\n}\n\n",
+ "id": "S15.9.5.42_A1_T3"
+ },
+ {
+ "section": "15.9.5.42",
+ "description": "The \"length\" property of the \"toUTCString\" is 0",
+ "test": "if(Date.prototype.toUTCString.hasOwnProperty(\"length\") !== true){\n $ERROR('#1: The toUTCString has a \"length\" property');\n}\n\nif(Date.prototype.toUTCString.length !== 0){\n $ERROR('#2: The \"length\" property of the toUTCString is 0');\n}\n\n",
+ "id": "S15.9.5.42_A2_T1"
+ },
+ {
+ "section": "15.9.5.42",
+ "description": "Checking ReadOnly attribute",
+ "test": "x = Date.prototype.toUTCString.length;\nDate.prototype.toUTCString.length = 1;\nif (Date.prototype.toUTCString.length !== x) {\n $ERROR('#1: The Date.prototype.toUTCString.length has the attribute ReadOnly');\n}\n\n",
+ "id": "S15.9.5.42_A3_T1"
+ },
+ {
+ "section": "15.9.5.42",
+ "description": "Checking DontDelete attribute",
+ "test": "if (delete Date.prototype.toUTCString.length !== false) {\n $ERROR('#1: The Date.prototype.toUTCString.length property has the attributes DontDelete');\n}\n\nif (!Date.prototype.toUTCString.hasOwnProperty('length')) {\n $FAIL('#2: The Date.prototype.toUTCString.length property has the attributes DontDelete');\n}\n\n",
+ "id": "S15.9.5.42_A3_T2"
+ },
+ {
+ "section": "15.9.5.42",
+ "description": "Checking DontEnum attribute",
+ "test": "if (Date.prototype.toUTCString.propertyIsEnumerable('length')) {\n $ERROR('#1: The Date.prototype.toUTCString.length property has the attribute DontEnum');\n}\n\nfor(x in Date.prototype.toUTCString) {\n if(x === \"length\") {\n $ERROR('#2: The Date.prototype.toUTCString.length has the attribute DontEnum');\n }\n}\n\n",
+ "id": "S15.9.5.42_A3_T3"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.9.5.43.json b/website/resources/scripts/testcases2/15.9.5.43.json
new file mode 100644
index 000000000..102224da8
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.9.5.43.json
@@ -0,0 +1,113 @@
+{
+ "testCollection": {
+ "name": "15.9.5.43",
+ "numTests": 15,
+ "tests": [
+ {
+ "id": "15.9.5.43-0-10",
+ "path": "TestCases/chapter15/15.9/15.9.5/15.9.5.43/15.9.5.43-0-10.js",
+ "description": "Date.prototype.toISOString - RangeError is not thrown when value of date is Date(1970, 0, -99999999, 0, 0, 0, 1), the time zone is UTC(0)",
+ "test": "assertTrue((function testcase() {\n var timeZoneMinutes = new Date().getTimezoneOffset() * (-1);\n var date, dateStr;\n\n if (timeZoneMinutes > 0) {\n date = new Date(1970, 0, -99999999, 0, 0, 0, 1);\n\n try {\n date.toISOString();\n return false;\n } catch (e) {\n return e instanceof RangeError;\n }\n } else {\n date = new Date(1970, 0, -99999999, 0, 0 + timeZoneMinutes + 60, 0, 1);\n\n dateStr = date.toISOString();\n\n return dateStr[dateStr.length - 1] === \"Z\";\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Date.prototype.toISOString))"
+ },
+ {
+ "id": "15.9.5.43-0-11",
+ "path": "TestCases/chapter15/15.9/15.9.5/15.9.5.43/15.9.5.43-0-11.js",
+ "description": "Date.prototype.toISOString - RangeError is not thrown when value of date is Date(1970, 0, 100000001, 0, 0, 0, -1), the time zone is UTC(0)",
+ "test": "assertTrue((function testcase() {\n var timeZoneMinutes = new Date().getTimezoneOffset() * (-1);\n var date, dateStr;\n\n date = new Date(1970, 0, 100000001, 0, 0 + timeZoneMinutes - 60, 0, -1);\n dateStr = date.toISOString();\n\n return dateStr[dateStr.length - 1] === \"Z\";\n }).call(this));\n",
+ "precondition": "(fnExists(Date.prototype.toISOString))"
+ },
+ {
+ "id": "15.9.5.43-0-12",
+ "path": "TestCases/chapter15/15.9/15.9.5/15.9.5.43/15.9.5.43-0-12.js",
+ "description": "Date.prototype.toISOString - RangeError is not thrown when value of date is Date(1970, 0, 100000001, 0, 0, 0, 0), the time zone is UTC(0)",
+ "test": "assertTrue((function testcase() {\n var timeZoneMinutes = new Date().getTimezoneOffset() * (-1);\n var date, dateStr;\n\n date = new Date(1970, 0, 100000001, 0, 0 + timeZoneMinutes - 60, 0, 0);\n dateStr = date.toISOString();\n\n return dateStr[dateStr.length - 1] === \"Z\";\n }).call(this));\n",
+ "precondition": "(fnExists(Date.prototype.toISOString))"
+ },
+ {
+ "id": "15.9.5.43-0-13",
+ "path": "TestCases/chapter15/15.9/15.9.5/15.9.5.43/15.9.5.43-0-13.js",
+ "description": "Date.prototype.toISOString - RangeError is thrown when value of date is Date(1970, 0, 100000001, 0, 0, 0, 1), the time zone is UTC(0)",
+ "test": "assertTrue((function testcase() {\n var timeZoneMinutes = new Date().getTimezoneOffset() * (-1);\n var date, dateStr;\n try {\n if (timeZoneMinutes > 0) {\n date = new Date(1970, 0, 100000001, 0, 0 + timeZoneMinutes + 60, 0, 1);\n dateStr = date.toISOString();\n return false;\n } else {\n date = new Date(1970, 0, 100000001, 0, 0, 0, 1);\n dateStr = date.toISOString();\n return false;\n }\n } catch (e) {\n return e instanceof RangeError;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Date.prototype.toISOString))"
+ },
+ {
+ "id": "15.9.5.43-0-14",
+ "path": "TestCases/chapter15/15.9/15.9.5/15.9.5.43/15.9.5.43-0-14.js",
+ "description": "Date.prototype.toISOString - when value of year is -Infinity Date.prototype.toISOString throw the RangeError",
+ "test": "assertTrue((function testcase() {\n var date = new Date(-Infinity, 1, 70, 0, 0, 0);\n\n try {\n date.toISOString();\n } catch (ex) {\n return ex instanceof RangeError;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Date.prototype.toISOString))"
+ },
+ {
+ "id": "15.9.5.43-0-15",
+ "path": "TestCases/chapter15/15.9/15.9.5/15.9.5.43/15.9.5.43-0-15.js",
+ "description": "Date.prototype.toISOString - value of year is Infinity Date.prototype.toISOString throw the RangeError",
+ "test": "assertTrue((function testcase() {\n var date = new Date(Infinity, 1, 70, 0, 0, 0);\n\n try {\n date.toISOString();\n } catch (ex) {\n return ex instanceof RangeError;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Date.prototype.toISOString))"
+ },
+ {
+ "id": "15.9.5.43-0-16",
+ "path": "TestCases/chapter15/15.9/15.9.5/15.9.5.43/15.9.5.43-0-16.js",
+ "description": "Date.prototype.toISOString - when this is a String object that value format is 'YYYY-MM-DDTHH:mm:ss.sssZ' Date.prototype.toISOString throw the TypeError",
+ "test": "assertTrue((function testcase() {\n var date = new String(\"1970-01-00000:00:00.000Z\");\n\n try {\n Date.prototype.toISOString.call(date);\n return false;\n } catch (ex) {\n return ex instanceof TypeError;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Date.prototype.toISOString))"
+ },
+ {
+ "id": "15.9.5.43-0-2",
+ "path": "TestCases/chapter15/15.9/15.9.5/15.9.5.43/15.9.5.43-0-2.js",
+ "description": "Date.prototype.toISOString must exist as a function taking 0 parameters",
+ "test": "assertTrue((Date.prototype.toISOString.length === 0));\n",
+ "precondition": "(fnExists(Date.prototype.toISOString))"
+ },
+ {
+ "id": "15.9.5.43-0-3",
+ "path": "TestCases/chapter15/15.9/15.9.5/15.9.5.43/15.9.5.43-0-3.js",
+ "description": "Date.prototype.toISOString must exist as a function",
+ "test": "assertTrue((typeof (Date.prototype.toISOString) === \"function\"));\n",
+ "precondition": "(fnExists(Date.prototype.toISOString))"
+ },
+ {
+ "id": "15.9.5.43-0-4",
+ "path": "TestCases/chapter15/15.9/15.9.5/15.9.5.43/15.9.5.43-0-4.js",
+ "description": "Date.prototype.toISOString - format of returned string is 'YYYY-MM-DDTHH:mm:ss.sssZ', the time zone is UTC(0)",
+ "test": "assertTrue((function testcase() {\n var date = new Date(1999, 09, 10, 10, 10, 10, 10);\n var localDate = new Date(date.getTime() - date.getTimezoneOffset() * 60000);\n\n return localDate.toISOString() === \"1999-10-10T10:10:10.010Z\";\n }).call(this));\n",
+ "precondition": "(fnExists(Date.prototype.toISOString))"
+ },
+ {
+ "id": "15.9.5.43-0-5",
+ "path": "TestCases/chapter15/15.9/15.9.5/15.9.5.43/15.9.5.43-0-5.js",
+ "description": "Date.prototype.toISOString - The returned string is the UTC time zone(0)",
+ "test": "assertTrue((function testcase() {\n var dateStr = (new Date()).toISOString();\n return dateStr[dateStr.length - 1] === \"Z\";\n }).call(this));\n",
+ "precondition": "(fnExists(Date.prototype.toISOString))"
+ },
+ {
+ "id": "15.9.5.43-0-6",
+ "path": "TestCases/chapter15/15.9/15.9.5/15.9.5.43/15.9.5.43-0-6.js",
+ "description": "Date.prototype.toISOString - TypeError is thrown when this is any other objects instead of Date object",
+ "test": "assertTrue((function testcase() {\n\n try {\n Date.prototype.toISOString.call([]);\n return false;\n } catch (ex) {\n return ex instanceof TypeError;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Date.prototype.toISOString))"
+ },
+ {
+ "id": "15.9.5.43-0-7",
+ "path": "TestCases/chapter15/15.9/15.9.5/15.9.5.43/15.9.5.43-0-7.js",
+ "description": "Date.prototype.toISOString - TypeError is thrown when this is any primitive values",
+ "test": "assertTrue((function testcase() {\n\n try {\n Date.prototype.toISOString.call(15);\n return false;\n } catch (ex) {\n return ex instanceof TypeError;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Date.prototype.toISOString))"
+ },
+ {
+ "id": "15.9.5.43-0-8",
+ "path": "TestCases/chapter15/15.9/15.9.5/15.9.5.43/15.9.5.43-0-8.js",
+ "description": "Date.prototype.toISOString - RangeError is thrown when value of date is Date(1970, 0, -99999999, 0, 0, 0, -1), the time zone is UTC(0)",
+ "test": "assertTrue((function testcase() {\n var timeZoneMinutes = new Date().getTimezoneOffset() * (-1);\n var date, dateStr;\n try {\n if (timeZoneMinutes > 0) {\n date = new Date(1970, 0, -99999999, 0, 0, 0, -1);\n } else {\n date = new Date(1970, 0, -99999999, 0, 0 + timeZoneMinutes - 60, 0, -1);\n }\n\n dateStr = date.toISOString();\n\n return false;\n } catch (e) {\n return e instanceof RangeError;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Date.prototype.toISOString))"
+ },
+ {
+ "id": "15.9.5.43-0-9",
+ "path": "TestCases/chapter15/15.9/15.9.5/15.9.5.43/15.9.5.43-0-9.js",
+ "description": "Date.prototype.toISOString - RangeError is not thrown when value of date is Date(1970, 0, -99999999, 0, 0, 0, 0), the time zone is UTC(0)",
+ "test": "assertTrue((function testcase() {\n var timeZoneMinutes = new Date().getTimezoneOffset() * (-1);\n var date, dateStr;\n\n if (timeZoneMinutes > 0) {\n date = new Date(1970, 0, -99999999, 0, 0, 0, 0);\n\n try {\n date.toISOString();\n return false;\n } catch (e) {\n return e instanceof RangeError;\n }\n } else {\n date = new Date(1970, 0, -99999999, 0, 0 + timeZoneMinutes + 60, 0, 0);\n\n dateStr = date.toISOString();\n\n return dateStr[dateStr.length - 1] === \"Z\";\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Date.prototype.toISOString))"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.9.5.44.json b/website/resources/scripts/testcases2/15.9.5.44.json
new file mode 100644
index 000000000..bffbb5c58
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.9.5.44.json
@@ -0,0 +1,21 @@
+{
+ "testCollection": {
+ "name": "15.9.5.44",
+ "numTests": 2,
+ "tests": [
+ {
+ "id": "15.9.5.44-0-1",
+ "path": "TestCases/chapter15/15.9/15.9.5/15.9.5.44/15.9.5.44-0-1.js",
+ "description": "Date.prototype.toJSON must exist as a function",
+ "test": "assertTrue((function testcase() {\n var f = Date.prototype.toJSON;\n if (typeof(f) === \"function\") {\n return true;\n }\n }).call(this));\n"
+ },
+ {
+ "id": "15.9.5.44-0-2",
+ "path": "TestCases/chapter15/15.9/15.9.5/15.9.5.44/15.9.5.44-0-2.js",
+ "description": "Date.prototype.toJSON must exist as a function taking 1 parameter",
+ "test": "assertTrue((Date.prototype.toJSON.length === 1));\n",
+ "precondition": "(fnExists(Date.prototype.toJSON))"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.9.5.4_Date.prototype.toTimeString.json b/website/resources/scripts/testcases2/15.9.5.4_Date.prototype.toTimeString.json
new file mode 100644
index 000000000..539a81aaf
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.9.5.4_Date.prototype.toTimeString.json
@@ -0,0 +1,50 @@
+{
+ "testCollection": {
+ "name": "15.9.5.4_Date.prototype.toTimeString",
+ "numTests": 7,
+ "tests": [
+ {
+ "section": "15.9.5.4",
+ "description": "Checking absence of ReadOnly attribute",
+ "test": "x = Date.prototype.toTimeString;\nif(x === 1)\n Date.prototype.toTimeString = 2;\nelse\n Date.prototype.toTimeString = 1;\nif (Date.prototype.toTimeString === x) {\n $ERROR('#1: The Date.prototype.toTimeString has not the attribute ReadOnly');\n}\n\n",
+ "id": "S15.9.5.4_A1_T1"
+ },
+ {
+ "section": "15.9.5.4",
+ "description": "Checking absence of DontDelete attribute",
+ "test": "if (delete Date.prototype.toTimeString === false) {\n $ERROR('#1: The Date.prototype.toTimeString property has not the attributes DontDelete');\n}\n\nif (Date.prototype.hasOwnProperty('toTimeString')) {\n $FAIL('#2: The Date.prototype.toTimeString property has not the attributes DontDelete');\n}\n\n",
+ "id": "S15.9.5.4_A1_T2"
+ },
+ {
+ "section": "15.9.5.4",
+ "description": "Checking DontEnum attribute",
+ "test": "if (Date.prototype.propertyIsEnumerable('toTimeString')) {\n $ERROR('#1: The Date.prototype.toTimeString property has the attribute DontEnum');\n}\n\nfor(x in Date.prototype) {\n if(x === \"toTimeString\") {\n $ERROR('#2: The Date.prototype.toTimeString has the attribute DontEnum');\n }\n}\n\n",
+ "id": "S15.9.5.4_A1_T3"
+ },
+ {
+ "section": "15.9.5.4",
+ "description": "The \"length\" property of the \"toTimeString\" is 0",
+ "test": "if(Date.prototype.toTimeString.hasOwnProperty(\"length\") !== true){\n $ERROR('#1: The toTimeString has a \"length\" property');\n}\n\nif(Date.prototype.toTimeString.length !== 0){\n $ERROR('#2: The \"length\" property of the toTimeString is 0');\n}\n\n",
+ "id": "S15.9.5.4_A2_T1"
+ },
+ {
+ "section": "15.9.5.4",
+ "description": "Checking ReadOnly attribute",
+ "test": "x = Date.prototype.toTimeString.length;\nDate.prototype.toTimeString.length = 1;\nif (Date.prototype.toTimeString.length !== x) {\n $ERROR('#1: The Date.prototype.toTimeString.length has the attribute ReadOnly');\n}\n\n",
+ "id": "S15.9.5.4_A3_T1"
+ },
+ {
+ "section": "15.9.5.4",
+ "description": "Checking DontDelete attribute",
+ "test": "if (delete Date.prototype.toTimeString.length !== false) {\n $ERROR('#1: The Date.prototype.toTimeString.length property has the attributes DontDelete');\n}\n\nif (!Date.prototype.toTimeString.hasOwnProperty('length')) {\n $FAIL('#2: The Date.prototype.toTimeString.length property has the attributes DontDelete');\n}\n\n",
+ "id": "S15.9.5.4_A3_T2"
+ },
+ {
+ "section": "15.9.5.4",
+ "description": "Checking DontEnum attribute",
+ "test": "if (Date.prototype.toTimeString.propertyIsEnumerable('length')) {\n $ERROR('#1: The Date.prototype.toTimeString.length property has the attribute DontEnum');\n}\n\nfor(x in Date.prototype.toTimeString) {\n if(x === \"length\") {\n $ERROR('#2: The Date.prototype.toTimeString.length has the attribute DontEnum');\n }\n}\n\n",
+ "id": "S15.9.5.4_A3_T3"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.9.5.5_Date.prototype.toLocaleString.json b/website/resources/scripts/testcases2/15.9.5.5_Date.prototype.toLocaleString.json
new file mode 100644
index 000000000..43603bbc6
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.9.5.5_Date.prototype.toLocaleString.json
@@ -0,0 +1,50 @@
+{
+ "testCollection": {
+ "name": "15.9.5.5_Date.prototype.toLocaleString",
+ "numTests": 7,
+ "tests": [
+ {
+ "section": "15.9.5.5",
+ "description": "Checking absence of ReadOnly attribute",
+ "test": "x = Date.prototype.toLocaleString;\nif(x === 1)\n Date.prototype.toLocaleString = 2;\nelse\n Date.prototype.toLocaleString = 1;\nif (Date.prototype.toLocaleString === x) {\n $ERROR('#1: The Date.prototype.toLocaleString has not the attribute ReadOnly');\n}\n\n",
+ "id": "S15.9.5.5_A1_T1"
+ },
+ {
+ "section": "15.9.5.5",
+ "description": "Checking absence of DontDelete attribute",
+ "test": "if (delete Date.prototype.toLocaleString === false) {\n $ERROR('#1: The Date.prototype.toLocaleString property has not the attributes DontDelete');\n}\n\nif (Date.prototype.hasOwnProperty('toLocaleString')) {\n $FAIL('#2: The Date.prototype.toLocaleString property has not the attributes DontDelete');\n}\n\n",
+ "id": "S15.9.5.5_A1_T2"
+ },
+ {
+ "section": "15.9.5.5",
+ "description": "Checking DontEnum attribute",
+ "test": "if (Date.prototype.propertyIsEnumerable('toLocaleString')) {\n $ERROR('#1: The Date.prototype.toLocaleString property has the attribute DontEnum');\n}\n\nfor(x in Date.prototype) {\n if(x === \"toLocaleString\") {\n $ERROR('#2: The Date.prototype.toLocaleString has the attribute DontEnum');\n }\n}\n\n",
+ "id": "S15.9.5.5_A1_T3"
+ },
+ {
+ "section": "15.9.5.5",
+ "description": "The \"length\" property of the \"toLocaleString\" is 0",
+ "test": "if(Date.prototype.toLocaleString.hasOwnProperty(\"length\") !== true){\n $ERROR('#1: The toLocaleString has a \"length\" property');\n}\n\nif(Date.prototype.toLocaleString.length !== 0){\n $ERROR('#2: The \"length\" property of the toLocaleString is 0');\n}\n\n",
+ "id": "S15.9.5.5_A2_T1"
+ },
+ {
+ "section": "15.9.5.5",
+ "description": "Checking ReadOnly attribute",
+ "test": "x = Date.prototype.toLocaleString.length;\nDate.prototype.toLocaleString.length = 1;\nif (Date.prototype.toLocaleString.length !== x) {\n $ERROR('#1: The Date.prototype.toLocaleString.length has the attribute ReadOnly');\n}\n\n",
+ "id": "S15.9.5.5_A3_T1"
+ },
+ {
+ "section": "15.9.5.5",
+ "description": "Checking DontDelete attribute",
+ "test": "if (delete Date.prototype.toLocaleString.length !== false) {\n $ERROR('#1: The Date.prototype.toLocaleString.length property has the attributes DontDelete');\n}\n\nif (!Date.prototype.toLocaleString.hasOwnProperty('length')) {\n $FAIL('#2: The Date.prototype.toLocaleString.length property has the attributes DontDelete');\n}\n\n",
+ "id": "S15.9.5.5_A3_T2"
+ },
+ {
+ "section": "15.9.5.5",
+ "description": "Checking DontEnum attribute",
+ "test": "if (Date.prototype.toLocaleString.propertyIsEnumerable('length')) {\n $ERROR('#1: The Date.prototype.toLocaleString.length property has the attribute DontEnum');\n}\n\nfor(x in Date.prototype.toLocaleString) {\n if(x === \"length\") {\n $ERROR('#2: The Date.prototype.toLocaleString.length has the attribute DontEnum');\n }\n}\n\n",
+ "id": "S15.9.5.5_A3_T3"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.9.5.6_Date.prototype.toLocaleDateString.json b/website/resources/scripts/testcases2/15.9.5.6_Date.prototype.toLocaleDateString.json
new file mode 100644
index 000000000..3ed64b74a
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.9.5.6_Date.prototype.toLocaleDateString.json
@@ -0,0 +1,50 @@
+{
+ "testCollection": {
+ "name": "15.9.5.6_Date.prototype.toLocaleDateString",
+ "numTests": 7,
+ "tests": [
+ {
+ "section": "15.9.5.6",
+ "description": "Checking absence of ReadOnly attribute",
+ "test": "x = Date.prototype.toLocaleDateString;\nif(x === 1)\n Date.prototype.toLocaleDateString = 2;\nelse\n Date.prototype.toLocaleDateString = 1;\nif (Date.prototype.toLocaleDateString === x) {\n $ERROR('#1: The Date.prototype.toLocaleDateString has not the attribute ReadOnly');\n}\n\n",
+ "id": "S15.9.5.6_A1_T1"
+ },
+ {
+ "section": "15.9.5.6",
+ "description": "Checking absence of DontDelete attribute",
+ "test": "if (delete Date.prototype.toLocaleDateString === false) {\n $ERROR('#1: The Date.prototype.toLocaleDateString property has not the attributes DontDelete');\n}\n\nif (Date.prototype.hasOwnProperty('toLocaleDateString')) {\n $FAIL('#2: The Date.prototype.toLocaleDateString property has not the attributes DontDelete');\n}\n\n",
+ "id": "S15.9.5.6_A1_T2"
+ },
+ {
+ "section": "15.9.5.6",
+ "description": "Checking DontEnum attribute",
+ "test": "if (Date.prototype.propertyIsEnumerable('toLocaleDateString')) {\n $ERROR('#1: The Date.prototype.toLocaleDateString property has the attribute DontEnum');\n}\n\nfor(x in Date.prototype) {\n if(x === \"toLocaleDateString\") {\n $ERROR('#2: The Date.prototype.toLocaleDateString has the attribute DontEnum');\n }\n}\n\n",
+ "id": "S15.9.5.6_A1_T3"
+ },
+ {
+ "section": "15.9.5.6",
+ "description": "The \"length\" property of the \"toLocaleDateString\" is 0",
+ "test": "if(Date.prototype.toLocaleDateString.hasOwnProperty(\"length\") !== true){\n $ERROR('#1: The toLocaleDateString has a \"length\" property');\n}\n\nif(Date.prototype.toLocaleDateString.length !== 0){\n $ERROR('#2: The \"length\" property of the toLocaleDateString is 0');\n}\n\n",
+ "id": "S15.9.5.6_A2_T1"
+ },
+ {
+ "section": "15.9.5.6",
+ "description": "Checking ReadOnly attribute",
+ "test": "x = Date.prototype.toLocaleDateString.length;\nDate.prototype.toLocaleDateString.length = 1;\nif (Date.prototype.toLocaleDateString.length !== x) {\n $ERROR('#1: The Date.prototype.toLocaleDateString.length has the attribute ReadOnly');\n}\n\n",
+ "id": "S15.9.5.6_A3_T1"
+ },
+ {
+ "section": "15.9.5.6",
+ "description": "Checking DontDelete attribute",
+ "test": "if (delete Date.prototype.toLocaleDateString.length !== false) {\n $ERROR('#1: The Date.prototype.toLocaleDateString.length property has the attributes DontDelete');\n}\n\nif (!Date.prototype.toLocaleDateString.hasOwnProperty('length')) {\n $FAIL('#2: The Date.prototype.toLocaleDateString.length property has the attributes DontDelete');\n}\n\n",
+ "id": "S15.9.5.6_A3_T2"
+ },
+ {
+ "section": "15.9.5.6",
+ "description": "Checking DontEnum attribute",
+ "test": "if (Date.prototype.toLocaleDateString.propertyIsEnumerable('length')) {\n $ERROR('#1: The Date.prototype.toLocaleDateString.length property has the attribute DontEnum');\n}\n\nfor(x in Date.prototype.toLocaleDateString) {\n if(x === \"length\") {\n $ERROR('#2: The Date.prototype.toLocaleDateString.length has the attribute DontEnum');\n }\n}\n\n",
+ "id": "S15.9.5.6_A3_T3"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.9.5.7_Date.prototype.toLocaleTimeString.json b/website/resources/scripts/testcases2/15.9.5.7_Date.prototype.toLocaleTimeString.json
new file mode 100644
index 000000000..5a4861081
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.9.5.7_Date.prototype.toLocaleTimeString.json
@@ -0,0 +1,50 @@
+{
+ "testCollection": {
+ "name": "15.9.5.7_Date.prototype.toLocaleTimeString",
+ "numTests": 7,
+ "tests": [
+ {
+ "section": "15.9.5.7",
+ "description": "Checking absence of ReadOnly attribute",
+ "test": "x = Date.prototype.toLocaleTimeString;\nif(x === 1)\n Date.prototype.toLocaleTimeString = 2;\nelse\n Date.prototype.toLocaleTimeString = 1;\nif (Date.prototype.toLocaleTimeString === x) {\n $ERROR('#1: The Date.prototype.toLocaleTimeString has not the attribute ReadOnly');\n}\n\n",
+ "id": "S15.9.5.7_A1_T1"
+ },
+ {
+ "section": "15.9.5.7",
+ "description": "Checking absence of DontDelete attribute",
+ "test": "if (delete Date.prototype.toLocaleTimeString === false) {\n $ERROR('#1: The Date.prototype.toLocaleTimeString property has not the attributes DontDelete');\n}\n\nif (Date.prototype.hasOwnProperty('toLocaleTimeString')) {\n $FAIL('#2: The Date.prototype.toLocaleTimeString property has not the attributes DontDelete');\n}\n\n",
+ "id": "S15.9.5.7_A1_T2"
+ },
+ {
+ "section": "15.9.5.7",
+ "description": "Checking DontEnum attribute",
+ "test": "if (Date.prototype.propertyIsEnumerable('toLocaleTimeString')) {\n $ERROR('#1: The Date.prototype.toLocaleTimeString property has the attribute DontEnum');\n}\n\nfor(x in Date.prototype) {\n if(x === \"toLocaleTimeString\") {\n $ERROR('#2: The Date.prototype.toLocaleTimeString has the attribute DontEnum');\n }\n}\n\n",
+ "id": "S15.9.5.7_A1_T3"
+ },
+ {
+ "section": "15.9.5.7",
+ "description": "The \"length\" property of the \"toLocaleTimeString\" is 0",
+ "test": "if(Date.prototype.toLocaleTimeString.hasOwnProperty(\"length\") !== true){\n $ERROR('#1: The toLocaleTimeString has a \"length\" property');\n}\n\nif(Date.prototype.toLocaleTimeString.length !== 0){\n $ERROR('#2: The \"length\" property of the toLocaleTimeString is 0');\n}\n\n",
+ "id": "S15.9.5.7_A2_T1"
+ },
+ {
+ "section": "15.9.5.7",
+ "description": "Checking ReadOnly attribute",
+ "test": "x = Date.prototype.toLocaleTimeString.length;\nDate.prototype.toLocaleTimeString.length = 1;\nif (Date.prototype.toLocaleTimeString.length !== x) {\n $ERROR('#1: The Date.prototype.toLocaleTimeString.length has the attribute ReadOnly');\n}\n\n",
+ "id": "S15.9.5.7_A3_T1"
+ },
+ {
+ "section": "15.9.5.7",
+ "description": "Checking DontDelete attribute",
+ "test": "if (delete Date.prototype.toLocaleTimeString.length !== false) {\n $ERROR('#1: The Date.prototype.toLocaleTimeString.length property has the attributes DontDelete');\n}\n\nif (!Date.prototype.toLocaleTimeString.hasOwnProperty('length')) {\n $FAIL('#2: The Date.prototype.toLocaleTimeString.length property has the attributes DontDelete');\n}\n\n",
+ "id": "S15.9.5.7_A3_T2"
+ },
+ {
+ "section": "15.9.5.7",
+ "description": "Checking DontEnum attribute",
+ "test": "if (Date.prototype.toLocaleTimeString.propertyIsEnumerable('length')) {\n $ERROR('#1: The Date.prototype.toLocaleTimeString.length property has the attribute DontEnum');\n}\n\nfor(x in Date.prototype.toLocaleTimeString) {\n if(x === \"length\") {\n $ERROR('#2: The Date.prototype.toLocaleTimeString.length has the attribute DontEnum');\n }\n}\n\n",
+ "id": "S15.9.5.7_A3_T3"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.9.5.8_Date.prototype.valueOf.json b/website/resources/scripts/testcases2/15.9.5.8_Date.prototype.valueOf.json
new file mode 100644
index 000000000..88a5d9b37
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.9.5.8_Date.prototype.valueOf.json
@@ -0,0 +1,50 @@
+{
+ "testCollection": {
+ "name": "15.9.5.8_Date.prototype.valueOf",
+ "numTests": 7,
+ "tests": [
+ {
+ "section": "15.9.5.8",
+ "description": "Checking absence of ReadOnly attribute",
+ "test": "x = Date.prototype.valueOf;\nif(x === 1)\n Date.prototype.valueOf = 2;\nelse\n Date.prototype.valueOf = 1;\nif (Date.prototype.valueOf === x) {\n $ERROR('#1: The Date.prototype.valueOf has not the attribute ReadOnly');\n}\n\n",
+ "id": "S15.9.5.8_A1_T1"
+ },
+ {
+ "section": "15.9.5.8",
+ "description": "Checking absence of DontDelete attribute",
+ "test": "if (delete Date.prototype.valueOf === false) {\n $ERROR('#1: The Date.prototype.valueOf property has not the attributes DontDelete');\n}\n\nif (Date.prototype.hasOwnProperty('valueOf')) {\n $FAIL('#2: The Date.prototype.valueOf property has not the attributes DontDelete');\n}\n\n",
+ "id": "S15.9.5.8_A1_T2"
+ },
+ {
+ "section": "15.9.5.8",
+ "description": "Checking DontEnum attribute",
+ "test": "if (Date.prototype.propertyIsEnumerable('valueOf')) {\n $ERROR('#1: The Date.prototype.valueOf property has the attribute DontEnum');\n}\n\nfor(x in Date.prototype) {\n if(x === \"valueOf\") {\n $ERROR('#2: The Date.prototype.valueOf has the attribute DontEnum');\n }\n}\n\n",
+ "id": "S15.9.5.8_A1_T3"
+ },
+ {
+ "section": "15.9.5.8",
+ "description": "The \"length\" property of the \"valueOf\" is 0",
+ "test": "if(Date.prototype.valueOf.hasOwnProperty(\"length\") !== true){\n $ERROR('#1: The valueOf has a \"length\" property');\n}\n\nif(Date.prototype.valueOf.length !== 0){\n $ERROR('#2: The \"length\" property of the valueOf is 0');\n}\n\n",
+ "id": "S15.9.5.8_A2_T1"
+ },
+ {
+ "section": "15.9.5.8",
+ "description": "Checking ReadOnly attribute",
+ "test": "x = Date.prototype.valueOf.length;\nDate.prototype.valueOf.length = 1;\nif (Date.prototype.valueOf.length !== x) {\n $ERROR('#1: The Date.prototype.valueOf.length has the attribute ReadOnly');\n}\n\n",
+ "id": "S15.9.5.8_A3_T1"
+ },
+ {
+ "section": "15.9.5.8",
+ "description": "Checking DontDelete attribute",
+ "test": "if (delete Date.prototype.valueOf.length !== false) {\n $ERROR('#1: The Date.prototype.valueOf.length property has the attributes DontDelete');\n}\n\nif (!Date.prototype.valueOf.hasOwnProperty('length')) {\n $FAIL('#2: The Date.prototype.valueOf.length property has the attributes DontDelete');\n}\n\n",
+ "id": "S15.9.5.8_A3_T2"
+ },
+ {
+ "section": "15.9.5.8",
+ "description": "Checking DontEnum attribute",
+ "test": "if (Date.prototype.valueOf.propertyIsEnumerable('length')) {\n $ERROR('#1: The Date.prototype.valueOf.length property has the attribute DontEnum');\n}\n\nfor(x in Date.prototype.valueOf) {\n if(x === \"length\") {\n $ERROR('#2: The Date.prototype.valueOf.length has the attribute DontEnum');\n }\n}\n\n",
+ "id": "S15.9.5.8_A3_T3"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.9.5.9_Date.prototype.getTime.json b/website/resources/scripts/testcases2/15.9.5.9_Date.prototype.getTime.json
new file mode 100644
index 000000000..d54ea677a
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.9.5.9_Date.prototype.getTime.json
@@ -0,0 +1,50 @@
+{
+ "testCollection": {
+ "name": "15.9.5.9_Date.prototype.getTime",
+ "numTests": 7,
+ "tests": [
+ {
+ "section": "15.9.5.9",
+ "description": "Checking absence of ReadOnly attribute",
+ "test": "x = Date.prototype.getTime;\nif(x === 1)\n Date.prototype.getTime = 2;\nelse\n Date.prototype.getTime = 1;\nif (Date.prototype.getTime === x) {\n $ERROR('#1: The Date.prototype.getTime has not the attribute ReadOnly');\n}\n\n",
+ "id": "S15.9.5.9_A1_T1"
+ },
+ {
+ "section": "15.9.5.9",
+ "description": "Checking absence of DontDelete attribute",
+ "test": "if (delete Date.prototype.getTime === false) {\n $ERROR('#1: The Date.prototype.getTime property has not the attributes DontDelete');\n}\n\nif (Date.prototype.hasOwnProperty('getTime')) {\n $FAIL('#2: The Date.prototype.getTime property has not the attributes DontDelete');\n}\n\n",
+ "id": "S15.9.5.9_A1_T2"
+ },
+ {
+ "section": "15.9.5.9",
+ "description": "Checking DontEnum attribute",
+ "test": "if (Date.prototype.propertyIsEnumerable('getTime')) {\n $ERROR('#1: The Date.prototype.getTime property has the attribute DontEnum');\n}\n\nfor(x in Date.prototype) {\n if(x === \"getTime\") {\n $ERROR('#2: The Date.prototype.getTime has the attribute DontEnum');\n }\n}\n\n",
+ "id": "S15.9.5.9_A1_T3"
+ },
+ {
+ "section": "15.9.5.9",
+ "description": "The \"length\" property of the \"getTime\" is 0",
+ "test": "if(Date.prototype.getTime.hasOwnProperty(\"length\") !== true){\n $ERROR('#1: The getTime has a \"length\" property');\n}\n\nif(Date.prototype.getTime.length !== 0){\n $ERROR('#2: The \"length\" property of the getTime is 0');\n}\n\n",
+ "id": "S15.9.5.9_A2_T1"
+ },
+ {
+ "section": "15.9.5.9",
+ "description": "Checking ReadOnly attribute",
+ "test": "x = Date.prototype.getTime.length;\nDate.prototype.getTime.length = 1;\nif (Date.prototype.getTime.length !== x) {\n $ERROR('#1: The Date.prototype.getTime.length has the attribute ReadOnly');\n}\n\n",
+ "id": "S15.9.5.9_A3_T1"
+ },
+ {
+ "section": "15.9.5.9",
+ "description": "Checking DontDelete attribute",
+ "test": "if (delete Date.prototype.getTime.length !== false) {\n $ERROR('#1: The Date.prototype.getTime.length property has the attributes DontDelete');\n}\n\nif (!Date.prototype.getTime.hasOwnProperty('length')) {\n $FAIL('#2: The Date.prototype.getTime.length property has the attributes DontDelete');\n}\n\n",
+ "id": "S15.9.5.9_A3_T2"
+ },
+ {
+ "section": "15.9.5.9",
+ "description": "Checking DontEnum attribute",
+ "test": "if (Date.prototype.getTime.propertyIsEnumerable('length')) {\n $ERROR('#1: The Date.prototype.getTime.length property has the attribute DontEnum');\n}\n\nfor(x in Date.prototype.getTime) {\n if(x === \"length\") {\n $ERROR('#2: The Date.prototype.getTime.length has the attribute DontEnum');\n }\n}\n\n",
+ "id": "S15.9.5.9_A3_T3"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/15.9.5_Properties_of_the_Date_Prototype_Object.json b/website/resources/scripts/testcases2/15.9.5_Properties_of_the_Date_Prototype_Object.json
new file mode 100644
index 000000000..bf3f49872
--- /dev/null
+++ b/website/resources/scripts/testcases2/15.9.5_Properties_of_the_Date_Prototype_Object.json
@@ -0,0 +1,260 @@
+{
+ "testCollection": {
+ "name": "15.9.5_Properties_of_the_Date_Prototype_Object",
+ "numTests": 42,
+ "tests": [
+ {
+ "section": "15.9.5",
+ "description": "The Date.prototype has the property \"constructor\"",
+ "test": "if(Date.prototype.hasOwnProperty(\"constructor\") !== true){\n $ERROR('#1: The Date.prototype has the property \"constructor\"');\n}\n\n",
+ "id": "S15.9.5_A01_T1"
+ },
+ {
+ "section": "15.9.5",
+ "description": "The Date.prototype has the property \"toString\"",
+ "test": "if(Date.prototype.hasOwnProperty(\"toString\") !== true){\n $ERROR('#1: The Date.prototype has the property \"toString\"');\n}\n\n",
+ "id": "S15.9.5_A02_T1"
+ },
+ {
+ "section": "15.9.5",
+ "description": "The Date.prototype has the property \"toDateString\"",
+ "test": "if(Date.prototype.hasOwnProperty(\"toDateString\") !== true){\n $ERROR('#1: The Date.prototype has the property \"toDateString\"');\n}\n\n",
+ "id": "S15.9.5_A03_T1"
+ },
+ {
+ "section": "15.9.5",
+ "description": "The Date.prototype has the property \"toTimeString\"",
+ "test": "if(Date.prototype.hasOwnProperty(\"toTimeString\") !== true){\n $ERROR('#1: The Date.prototype has the property \"toTimeString\"');\n}\n\n",
+ "id": "S15.9.5_A04_T1"
+ },
+ {
+ "section": "15.9.5",
+ "description": "The Date.prototype has the property \"toLocaleString\"",
+ "test": "if(Date.prototype.hasOwnProperty(\"toLocaleString\") !== true){\n $ERROR('#1: The Date.prototype has the property \"toLocaleString\"');\n}\n\n",
+ "id": "S15.9.5_A05_T1"
+ },
+ {
+ "section": "15.9.5",
+ "description": "The Date.prototype has the property \"toLocaleDateString\"",
+ "test": "if(Date.prototype.hasOwnProperty(\"toLocaleDateString\") !== true){\n $ERROR('#1: The Date.prototype has the property \"toLocaleDateString\"');\n}\n\n",
+ "id": "S15.9.5_A06_T1"
+ },
+ {
+ "section": "15.9.5",
+ "description": "The Date.prototype has the property \"toLocaleTimeString\"",
+ "test": "if(Date.prototype.hasOwnProperty(\"toLocaleTimeString\") !== true){\n $ERROR('#1: The Date.prototype has the property \"toLocaleTimeString\"');\n}\n\n",
+ "id": "S15.9.5_A07_T1"
+ },
+ {
+ "section": "15.9.5",
+ "description": "The Date.prototype has the property \"valueOf\"",
+ "test": "if(Date.prototype.hasOwnProperty(\"valueOf\") !== true){\n $ERROR('#1: The Date.prototype has the property \"valueOf\"');\n}\n\n",
+ "id": "S15.9.5_A08_T1"
+ },
+ {
+ "section": "15.9.5",
+ "description": "The Date.prototype has the property \"getTime\"",
+ "test": "if(Date.prototype.hasOwnProperty(\"getTime\") !== true){\n $ERROR('#1: The Date.prototype has the property \"getTime\"');\n}\n\n",
+ "id": "S15.9.5_A09_T1"
+ },
+ {
+ "section": "15.9.5",
+ "description": "The Date.prototype has the property \"getFullYear\"",
+ "test": "if(Date.prototype.hasOwnProperty(\"getFullYear\") !== true){\n $ERROR('#1: The Date.prototype has the property \"getFullYear\"');\n}\n\n",
+ "id": "S15.9.5_A10_T1"
+ },
+ {
+ "section": "15.9.5",
+ "description": "The Date.prototype has the property \"getUTCFullYear\"",
+ "test": "if(Date.prototype.hasOwnProperty(\"getUTCFullYear\") !== true){\n $ERROR('#1: The Date.prototype has the property \"getUTCFullYear\"');\n}\n\n",
+ "id": "S15.9.5_A11_T1"
+ },
+ {
+ "section": "15.9.5",
+ "description": "The Date.prototype has the property \"getMonth\"",
+ "test": "if(Date.prototype.hasOwnProperty(\"getMonth\") !== true){\n $ERROR('#1: The Date.prototype has the property \"getMonth\"');\n}\n\n",
+ "id": "S15.9.5_A12_T1"
+ },
+ {
+ "section": "15.9.5",
+ "description": "The Date.prototype has the property \"getUTCMonth\"",
+ "test": "if(Date.prototype.hasOwnProperty(\"getUTCMonth\") !== true){\n $ERROR('#1: The Date.prototype has the property \"getUTCMonth\"');\n}\n\n",
+ "id": "S15.9.5_A13_T1"
+ },
+ {
+ "section": "15.9.5",
+ "description": "The Date.prototype has the property \"getDate\"",
+ "test": "if(Date.prototype.hasOwnProperty(\"getDate\") !== true){\n $ERROR('#1: The Date.prototype has the property \"getDate\"');\n}\n\n",
+ "id": "S15.9.5_A14_T1"
+ },
+ {
+ "section": "15.9.5",
+ "description": "The Date.prototype has the property \"getUTCDate\"",
+ "test": "if(Date.prototype.hasOwnProperty(\"getUTCDate\") !== true){\n $ERROR('#1: The Date.prototype has the property \"getUTCDate\"');\n}\n\n",
+ "id": "S15.9.5_A15_T1"
+ },
+ {
+ "section": "15.9.5",
+ "description": "The Date.prototype has the property \"getDay\"",
+ "test": "if(Date.prototype.hasOwnProperty(\"getDay\") !== true){\n $ERROR('#1: The Date.prototype has the property \"getDay\"');\n}\n\n",
+ "id": "S15.9.5_A16_T1"
+ },
+ {
+ "section": "15.9.5",
+ "description": "The Date.prototype has the property \"getUTCDay\"",
+ "test": "if(Date.prototype.hasOwnProperty(\"getUTCDay\") !== true){\n $ERROR('#1: The Date.prototype has the property \"getUTCDay\"');\n}\n\n",
+ "id": "S15.9.5_A17_T1"
+ },
+ {
+ "section": "15.9.5",
+ "description": "The Date.prototype has the property \"getHours\"",
+ "test": "if(Date.prototype.hasOwnProperty(\"getHours\") !== true){\n $ERROR('#1: The Date.prototype has the property \"getHours\"');\n}\n\n",
+ "id": "S15.9.5_A18_T1"
+ },
+ {
+ "section": "15.9.5",
+ "description": "The Date.prototype has the property \"getUTCHours\"",
+ "test": "if(Date.prototype.hasOwnProperty(\"getUTCHours\") !== true){\n $ERROR('#1: The Date.prototype has the property \"getUTCHours\"');\n}\n\n",
+ "id": "S15.9.5_A19_T1"
+ },
+ {
+ "section": "15.9.5",
+ "description": "The Date.prototype has the property \"getMinutes\"",
+ "test": "if(Date.prototype.hasOwnProperty(\"getMinutes\") !== true){\n $ERROR('#1: The Date.prototype has the property \"getMinutes\"');\n}\n\n",
+ "id": "S15.9.5_A20_T1"
+ },
+ {
+ "section": "15.9.5",
+ "description": "The Date.prototype has the property \"getUTCMinutes\"",
+ "test": "if(Date.prototype.hasOwnProperty(\"getUTCMinutes\") !== true){\n $ERROR('#1: The Date.prototype has the property \"getUTCMinutes\"');\n}\n\n",
+ "id": "S15.9.5_A21_T1"
+ },
+ {
+ "section": "15.9.5",
+ "description": "The Date.prototype has the property \"getSeconds\"",
+ "test": "if(Date.prototype.hasOwnProperty(\"getSeconds\") !== true){\n $ERROR('#1: The Date.prototype has the property \"getSeconds\"');\n}\n\n",
+ "id": "S15.9.5_A22_T1"
+ },
+ {
+ "section": "15.9.5",
+ "description": "The Date.prototype has the property \"getUTCSeconds\"",
+ "test": "if(Date.prototype.hasOwnProperty(\"getUTCSeconds\") !== true){\n $ERROR('#1: The Date.prototype has the property \"getUTCSeconds\"');\n}\n\n",
+ "id": "S15.9.5_A23_T1"
+ },
+ {
+ "section": "15.9.5",
+ "description": "The Date.prototype has the property \"getMilliseconds\"",
+ "test": "if(Date.prototype.hasOwnProperty(\"getMilliseconds\") !== true){\n $ERROR('#1: The Date.prototype has the property \"getMilliseconds\"');\n}\n\n",
+ "id": "S15.9.5_A24_T1"
+ },
+ {
+ "section": "15.9.5",
+ "description": "The Date.prototype has the property \"getUTCMilliseconds\"",
+ "test": "if(Date.prototype.hasOwnProperty(\"getUTCMilliseconds\") !== true){\n $ERROR('#1: The Date.prototype has the property \"getUTCMilliseconds\"');\n}\n\n",
+ "id": "S15.9.5_A25_T1"
+ },
+ {
+ "section": "15.9.5",
+ "description": "The Date.prototype has the property \"getTimezoneOffset\"",
+ "test": "if(Date.prototype.hasOwnProperty(\"getTimezoneOffset\") !== true){\n $ERROR('#1: The Date.prototype has the property \"getTimezoneOffset\"');\n}\n\n",
+ "id": "S15.9.5_A26_T1"
+ },
+ {
+ "section": "15.9.5",
+ "description": "The Date.prototype has the property \"setTime\"",
+ "test": "if(Date.prototype.hasOwnProperty(\"setTime\") !== true){\n $ERROR('#1: The Date.prototype has the property \"setTime\"');\n}\n\n",
+ "id": "S15.9.5_A27_T1"
+ },
+ {
+ "section": "15.9.5",
+ "description": "The Date.prototype has the property \"setMilliseconds\"",
+ "test": "if(Date.prototype.hasOwnProperty(\"setMilliseconds\") !== true){\n $ERROR('#1: The Date.prototype has the property \"setMilliseconds\"');\n}\n\n",
+ "id": "S15.9.5_A28_T1"
+ },
+ {
+ "section": "15.9.5",
+ "description": "The Date.prototype has the property \"setUTCMilliseconds\"",
+ "test": "if(Date.prototype.hasOwnProperty(\"setUTCMilliseconds\") !== true){\n $ERROR('#1: The Date.prototype has the property \"setUTCMilliseconds\"');\n}\n\n",
+ "id": "S15.9.5_A29_T1"
+ },
+ {
+ "section": "15.9.5",
+ "description": "The Date.prototype has the property \"setSeconds\"",
+ "test": "if(Date.prototype.hasOwnProperty(\"setSeconds\") !== true){\n $ERROR('#1: The Date.prototype has the property \"setSeconds\"');\n}\n\n",
+ "id": "S15.9.5_A30_T1"
+ },
+ {
+ "section": "15.9.5",
+ "description": "The Date.prototype has the property \"setUTCSeconds\"",
+ "test": "if(Date.prototype.hasOwnProperty(\"setUTCSeconds\") !== true){\n $ERROR('#1: The Date.prototype has the property \"setUTCSeconds\"');\n}\n\n",
+ "id": "S15.9.5_A31_T1"
+ },
+ {
+ "section": "15.9.5",
+ "description": "The Date.prototype has the property \"setMinutes\"",
+ "test": "if(Date.prototype.hasOwnProperty(\"setMinutes\") !== true){\n $ERROR('#1: The Date.prototype has the property \"setMinutes\"');\n}\n\n",
+ "id": "S15.9.5_A32_T1"
+ },
+ {
+ "section": "15.9.5",
+ "description": "The Date.prototype has the property \"setUTCMinutes\"",
+ "test": "if(Date.prototype.hasOwnProperty(\"setUTCMinutes\") !== true){\n $ERROR('#1: The Date.prototype has the property \"setUTCMinutes\"');\n}\n\n",
+ "id": "S15.9.5_A33_T1"
+ },
+ {
+ "section": "15.9.5",
+ "description": "The Date.prototype has the property \"setHours\"",
+ "test": "if(Date.prototype.hasOwnProperty(\"setHours\") !== true){\n $ERROR('#1: The Date.prototype has the property \"setHours\"');\n}\n\n",
+ "id": "S15.9.5_A34_T1"
+ },
+ {
+ "section": "15.9.5",
+ "description": "The Date.prototype has the property \"setUTCHours\"",
+ "test": "if(Date.prototype.hasOwnProperty(\"setUTCHours\") !== true){\n $ERROR('#1: The Date.prototype has the property \"setUTCHours\"');\n}\n\n",
+ "id": "S15.9.5_A35_T1"
+ },
+ {
+ "section": "15.9.5",
+ "description": "The Date.prototype has the property \"setDate\"",
+ "test": "if(Date.prototype.hasOwnProperty(\"setDate\") !== true){\n $ERROR('#1: The Date.prototype has the property \"setDate\"');\n}\n\n",
+ "id": "S15.9.5_A36_T1"
+ },
+ {
+ "section": "15.9.5",
+ "description": "The Date.prototype has the property \"setUTCDate\"",
+ "test": "if(Date.prototype.hasOwnProperty(\"setUTCDate\") !== true){\n $ERROR('#1: The Date.prototype has the property \"setUTCDate\"');\n}\n\n",
+ "id": "S15.9.5_A37_T1"
+ },
+ {
+ "section": "15.9.5",
+ "description": "The Date.prototype has the property \"setMonth\"",
+ "test": "if(Date.prototype.hasOwnProperty(\"setMonth\") !== true){\n $ERROR('#1: The Date.prototype has the property \"setMonth\"');\n}\n\n",
+ "id": "S15.9.5_A38_T1"
+ },
+ {
+ "section": "15.9.5",
+ "description": "The Date.prototype has the property \"setUTCMonth\"",
+ "test": "if(Date.prototype.hasOwnProperty(\"setUTCMonth\") !== true){\n $ERROR('#1: The Date.prototype has the property \"setUTCMonth\"');\n}\n\n",
+ "id": "S15.9.5_A39_T1"
+ },
+ {
+ "section": "15.9.5",
+ "description": "The Date.prototype has the property \"setFullYear\"",
+ "test": "if(Date.prototype.hasOwnProperty(\"setFullYear\") !== true){\n $ERROR('#1: The Date.prototype has the property \"setFullYear\"');\n}\n\n",
+ "id": "S15.9.5_A40_T1"
+ },
+ {
+ "section": "15.9.5",
+ "description": "The Date.prototype has the property \"setUTCFullYear\"",
+ "test": "if(Date.prototype.hasOwnProperty(\"setUTCFullYear\") !== true){\n $ERROR('#1: The Date.prototype has the property \"setUTCFullYear\"');\n}\n\n",
+ "id": "S15.9.5_A41_T1"
+ },
+ {
+ "section": "15.9.5",
+ "description": "The Date.prototype has the property \"toUTCString\"",
+ "test": "if(Date.prototype.hasOwnProperty(\"toUTCString\") !== true){\n $ERROR('#1: The Date.prototype has the property \"toUTCString\"');\n}\n\n",
+ "id": "S15.9.5_A42_T1"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/7.2_White_Space.json b/website/resources/scripts/testcases2/7.2_White_Space.json
new file mode 100644
index 000000000..14a24761e
--- /dev/null
+++ b/website/resources/scripts/testcases2/7.2_White_Space.json
@@ -0,0 +1,280 @@
+{
+ "testCollection": {
+ "name": "7.2_White_Space",
+ "numTests": 45,
+ "tests": [
+ {
+ "section": "7.2, 7.5",
+ "description": "Insert HORIZONTAL TAB(\\u0009 and \\t) between tokens of var x=1",
+ "test": "// CHECK#1\neval(\"\\u0009var\\u0009x\\u0009=\\u00091\\u0009\");\nif (x !== 1) {\n $ERROR('#1: eval(\"\\\\u0009var\\\\u0009x\\\\u0009=\\\\u00091\\\\u0009\"); x === 1. Actual: ' + (x));\n}\n\n//CHECK#2\neval(\"\\u0009\" + \"var\" + \"\\u0009\" + \"x\" + \"\\u0009\" + \"=\" + \"\\u0009\" + \"1\" + \"\\u0009\");\nif (x !== 1) {\n $ERROR('#2: eval(\"\\\\u0009\" + \"var\" + \"\\\\u0009\" + \"x\" + \"\\\\u0009\" + \"=\" + \"\\\\u0009\" + \"1\" + \"\\\\u0009\"); x === 1. Actual: ' + (x));\n}\n\n//CHECK#3\neval(\"\\tvar\\tx\\t=\\t1\\t\");\nif (x !== 1) {\n $ERROR('#3: eval(\"\\\\tvar\\\\tx\\\\t=\\\\t1\\\\t\"); x === 1. Actual: ' + (x));\n}\n\n//CHECK#4\neval(\"\\t\" + \"var\" + \"\\t\" + \"x\" + \"\\t\" + \"=\" + \"\\t\" + \"1\" + \"\\t\");\nif (x !== 1) {\n $ERROR('#4: eval(\"\\\\t\" + \"var\" + \"\\\\t\" + \"x\" + \"\\\\t\" + \"=\" + \"\\\\t\" + \"1\" + \"\\\\t\"); x === 1. Actual: ' + (x));\n}\n\n//CHECK#5\neval(\"\\u0009\" + \"var\" + \"\\t\" + \"x\" + \"\\u0009\" + \"=\" + \"\\t\" + \"1\" + \"\\u0009\");\nif (x !== 1) {\n $ERROR('#5: eval(\"\\\\u0009\" + \"var\" + \"\\\\t\" + \"x\" + \"\\\\u0009\" + \"=\" + \"\\\\t\" + \"1\" + \"\\\\u0009\"); x === 1. Actual: ' + (x));\n}\n",
+ "id": "S7.2_A1.1_T1"
+ },
+ {
+ "section": "7.2, 7.5",
+ "description": "Insert real HORIZONTAL TAB between tokens of var x=1",
+ "test": "//CHECK#1\n\tvar x\t=\t1\t;\nif (x !== 1) {\n $ERROR('#1: \tvar\tx\t=\t1\t; x === 1. Actual: ' + (x));\n}\n\n//CHECK#2\neval(\"\tvar\\tx\t=\\t2\t\");\nif (x !== 2) {\n $ERROR('#2: \tvar\\\\tx\t=\\\\t1\t; x === 2. Actual: ' + (x));\n}\n",
+ "id": "S7.2_A1.1_T2"
+ },
+ {
+ "section": "7.2, 7.5",
+ "description": "Insert VERTICAL TAB(\\u000B and \\v) between tokens of var x=1",
+ "test": "// CHECK#1\neval(\"\\u000Bvar\\u000Bx\\u000B=\\u000B1\\u000B\");\nif (x !== 1) {\n $ERROR('#1: eval(\"\\\\u000Bvar\\\\u000Bx\\\\u000B=\\\\u000B1\\\\u000B\"); x === 1. Actual: ' + (x));\n}\n\n//CHECK#2\neval(\"\\u000B\" + \"var\" + \"\\u000B\" + \"x\" + \"\\u000B\" + \"=\" + \"\\u000B\" + \"1\" + \"\\u000B\");\nif (x !== 1) {\n $ERROR('#2: eval(\"\\\\u000B\" + \"var\" + \"\\\\u000B\" + \"x\" + \"\\\\u000B\" + \"=\" + \"\\\\u000B\" + \"1\" + \"\\\\u000B\"); x === 1. Actual: ' + (x));\n}\n\n//CHECK#3\neval(\"\\vvar\\vx\\v=\\v1\\v\");\nif (x !== 1) {\n $ERROR('#3: eval(\"\\\\vvar\\\\vx\\\\v=\\\\v1\\\\v\"); x === 1. Actual: ' + (x));\n}\n\n//CHECK#4\neval(\"\\v\" + \"var\" + \"\\v\" + \"x\" + \"\\v\" + \"=\" + \"\\v\" + \"1\" + \"\\v\");\nif (x !== 1) {\n $ERROR('#4: eval(\"\\\\v\" + \"var\" + \"\\\\v\" + \"x\" + \"\\\\v\" + \"=\" + \"\\\\v\" + \"1\" + \"\\\\v\"); x === 1. Actual: ' + (x));\n}\n\n//CHECK#5\neval(\"\\u000B\" + \"var\" + \"\\v\" + \"x\" + \"\\u000B\" + \"=\" + \"\\v\" + \"1\" + \"\\u000B\");\nif (x !== 1) {\n $ERROR('#5: eval(\"\\\\u000B\" + \"var\" + \"\\\\v\" + \"x\" + \"\\\\u000B\" + \"=\" + \"\\\\v\" + \"1\" + \"\\\\u000B\"); x === 1. Actual: ' + (x));\n}\n",
+ "id": "S7.2_A1.2_T1"
+ },
+ {
+ "section": "7.2, 7.5",
+ "description": "Insert real VERTICAL TAB between tokens of var x=1",
+ "test": "//CHECK#1\n\u000bvar\u000bx\u000b=\u000b1\u000b;\nif (x !== 1) {\n $ERROR('#1: \u000bvar\u000bx\u000b=\u000b1\u000b; x === 1. Actual: ' + (x));\n}\n\n//CHECK#2\neval(\"\u000bvar\\vx\u000b=\\v1\u000b\");\nif (x !== 1) {\n $ERROR('#2: \u000bvar\\\\vx\u000b=\\\\v1\u000b; x === 1. Actual: ' + (x));\n}\n\n",
+ "id": "S7.2_A1.2_T2"
+ },
+ {
+ "section": "7.2, 7.5",
+ "description": "Insert FORM FEED(\\u000C and \\f) between tokens of var x=1",
+ "test": "// CHECK#1\neval(\"\\u000Cvar\\u000Cx\\u000C=\\u000C1\\u000C\");\nif (x !== 1) {\n $ERROR('#1: eval(\"\\\\u000Cvar\\\\u000Cx\\\\u000C=\\\\u000C1\\\\u000C\"); x === 1. Actual: ' + (x));\n}\n\n//CHECK#2\neval(\"\\u000C\" + \"var\" + \"\\u000C\" + \"x\" + \"\\u000C\" + \"=\" + \"\\u000C\" + \"1\" + \"\\u000C\");\nif (x !== 1) {\n $ERROR('#2: eval(\"\\\\u000C\" + \"var\" + \"\\\\u000C\" + \"x\" + \"\\\\u000C\" + \"=\" + \"\\\\u000C\" + \"1\" + \"\\\\u000C\"); x === 1. Actual: ' + (x));\n}\n\n//CHECK#3\neval(\"\\fvar\\fx\\f=\\f1\\f\");\nif (x !== 1) {\n $ERROR('#3: eval(\"\\\\fvar\\\\fx\\\\f=\\\\f1\\\\f\"); x === 1. Actual: ' + (x));\n}\n\n//CHECK#4\neval(\"\\f\" + \"var\" + \"\\f\" + \"x\" + \"\\f\" + \"=\" + \"\\f\" + \"1\" + \"\\f\");\nif (x !== 1) {\n $ERROR('#4: eval(\"\\\\f\" + \"var\" + \"\\\\f\" + \"x\" + \"\\\\f\" + \"=\" + \"\\\\f\" + \"1\" + \"\\\\f\"); x === 1. Actual: ' + (x));\n}\n\n//CHECK#5\neval(\"\\u000C\" + \"var\" + \"\\f\" + \"x\" + \"\\u000C\" + \"=\" + \"\\f\" + \"1\" + \"\\u000C\");\nif (x !== 1) {\n $ERROR('#5: eval(\"\\\\u000C\" + \"var\" + \"\\\\f\" + \"x\" + \"\\\\u000C\" + \"=\" + \"\\\\f\" + \"1\" + \"\\\\u000C\"); x === 1. Actual: ' + (x));\n}\n",
+ "id": "S7.2_A1.3_T1"
+ },
+ {
+ "section": "7.2, 7.5",
+ "description": "Insert real FORM FEED between tokens of var x=1",
+ "test": "//CHECK#1\n\fvar\fx\f=\f1\f;\nif (x !== 1) {\n $ERROR('#1: \fvar\fx\f=\f1\f; x === 1. Actual: ' + (x));\n}\n\n//CHECK#2\neval(\"\fvar\\fx\f=\\f1\f\");\nif (x !== 1) {\n $ERROR('#2: \fvar\\\\fx\f=\\\\f1\f; x === 1. Actual: ' + (x));\n}\n\n",
+ "id": "S7.2_A1.3_T2"
+ },
+ {
+ "section": "7.2, 7.5",
+ "description": "Insert SPACE(\\u0020) between tokens of var x=1",
+ "test": "// CHECK#1\neval(\"\\u0020var\\u0020x\\u0020=\\u00201\\u0020\");\nif (x !== 1) {\n $ERROR('#1: eval(\"\\\\u0020var\\\\u0020x\\\\u0020=\\\\u00201\\\\u0020\"); x === 1;');\n}\n\n//CHECK#2\neval(\"\\u0020\" + \"var\" + \"\\u0020\" + \"x\" + \"\\u0020\" + \"=\" + \"\\u0020\" + \"1\" + \"\\u0020\");\nif (x !== 1) {\n $ERROR('#2: eval(\"\\\\u0020\" + \"var\" + \"\\\\u0020\" + \"x\" + \"\\\\u0020\" + \"=\" + \"\\\\u0020\" + \"1\" + \"\\\\u0020\"); x === 1. Actual: ' + (x));\n}\n",
+ "id": "S7.2_A1.4_T1"
+ },
+ {
+ "section": "7.2, 7.5",
+ "description": "Insert real SPACE between tokens of var x=1",
+ "test": "//CHECK#1\neval(\"\\u0020var x\\u0020= 1\\u0020\");\nif (x !== 1) {\n $ERROR('#1: eval(\"\\\\u0020var x\\\\u0020= 1\\\\u0020\"); x === 1. Actual: ' + (x));\n}\n\n//CHECK#2\n var x = 1 ;\nif (x !== 1) {\n $ERROR('#2: var x = 1 ; x === 1. Actual: ' + (x));\n}\n\n",
+ "id": "S7.2_A1.4_T2"
+ },
+ {
+ "section": "7.2, 7.5",
+ "description": "Insert NO-BREAK SPACE(\\u00A0) between tokens of var x=1",
+ "test": "// CHECK#1\neval(\"\\u00A0var\\u00A0x\\u00A0=\\u00A01\\u00A0\");\nif (x !== 1) {\n $ERROR('#1: eval(\"\\\\u00A0var\\\\u00A0x\\\\u00A0=\\\\u00A01\\\\u00A0\"); x === 1. Actual: ' + (x));\n}\n\n//CHECK#2\neval(\"\\u00A0\" + \"var\" + \"\\u00A0\" + \"x\" + \"\\u00A0\" + \"=\" + \"\\u00A0\" + \"1\" + \"\\u00A0\");\nif (x !== 1) {\n $ERROR('#2: eval(\"\\\\u00A0\" + \"var\" + \"\\\\u00A0\" + \"x\" + \"\\\\u00A0\" + \"=\" + \"\\\\u00A0\" + \"1\" + \"\\\\u00A0\"); x === 1. Actual: ' + (x));\n}\n",
+ "id": "S7.2_A1.5_T1"
+ },
+ {
+ "test": "��/"
+ },
+ {
+ "section": "7.2, 7.8.4",
+ "description": "Use HORIZONTAL TAB(\\u0009 and \\t)",
+ "test": "// CHECK#1\nif (eval(\"'\\u0009str\\u0009ing\\u0009'\") !== \"\\u0009str\\u0009ing\\u0009\") {\n $ERROR('#1: eval(\"\\'\\\\u0009str\\\\u0009ing\\\\u0009\\'\") === \"\\\\u0009str\\\\u0009ing\\\\u0009\"');\n}\n\n//CHECK#2\nif (eval(\"'\\tstr\\ting\\t'\") !== \"\\tstr\\ting\\t\") {\n $ERROR('#2: eval(\"\\'\\\\tstr\\\\ting\\\\t\\'\") === \"\\\\tstr\\\\ting\\\\t\"');\n}\n",
+ "id": "S7.2_A2.1_T1"
+ },
+ {
+ "section": "7.2, 7.8.4",
+ "description": "Use real HORIZONTAL TAB",
+ "test": "//CHECK#1\nif (\"\tstr\ting\t\" !== \"\\u0009str\\u0009ing\\u0009\") {\n $ERROR('#1: \"\tstr\ting\t\" === \"\\\\u0009str\\\\u0009ing\\\\u0009\"');\n}\n",
+ "id": "S7.2_A2.1_T2"
+ },
+ {
+ "section": "7.2, 7.8.4",
+ "description": "Use VERTICAL TAB(\\u000B and \\v)",
+ "test": "// CHECK#1\nif (eval(\"'\\u000Bstr\\u000Bing\\u000B'\") !== \"\\u000Bstr\\u000Bing\\u000B\") {\n $ERROR('#1: eval(\"\\'\\\\u000Bstr\\\\u000Bing\\\\u000B\\'\") === \"\\\\u000Bstr\\\\u000Bing\\\\u000B\"');\n}\n\n//CHECK#2\nif (eval(\"'\\vstr\\ving\\v'\") !== \"\\vstr\\ving\\v\") {\n $ERROR('#2: eval(\"\\'\\\\vstr\\\\ving\\\\v\\'\") === \"\\\\vstr\\\\ving\\\\v\"');\n}\n",
+ "id": "S7.2_A2.2_T1"
+ },
+ {
+ "section": "7.2, 7.8.4",
+ "description": "Use real VERTICAL TAB",
+ "test": "//CHECK#1\nif (\"\u000bstr\u000bing\u000b\" !== \"\\u000Bstr\\u000Bing\\u000B\") {\n $ERROR('#1: \"\u000bstr\u000bing\u000b\" === \"\\\\u000Bstr\\\\u000Bing\\\\u000B\"');\n}\n",
+ "id": "S7.2_A2.2_T2"
+ },
+ {
+ "section": "7.2, 7.8.4",
+ "description": "Use FORM FEED(\\u000C and \\f)",
+ "test": "// CHECK#1\nif (eval(\"'\\u000Cstr\\u000Cing\\u000C'\") !== \"\\u000Cstr\\u000Cing\\u000C\") {\n $ERROR('#1: eval(\"\\'\\\\u000Cstr\\\\u000Cing\\\\u000C\\'\") === \"\\\\u000Cstr\\\\u000Cing\\\\u000C\"');\n}\n\n//CHECK#2\nif (eval(\"'\\fstr\\fing\\f'\") !== \"\\fstr\\fing\\f\") {\n $ERROR('#2: eval(\"\\'\\\\fstr\\\\fing\\\\f\\'\") === \"\\\\fstr\\\\fing\\\\f\"');\n}\n",
+ "id": "S7.2_A2.3_T1"
+ },
+ {
+ "section": "7.2, 7.8.4",
+ "description": "Use real FORM FEED",
+ "test": "//CHECK#1\nif (\"\fstr\fing\f\" !== \"\\u000Cstr\\u000Cing\\u000C\") {\n $ERROR('#1: \"\fstr\fing\f\" === \"\\\\u000Cstr\\\\u000Cing\\\\u000C\"');\n}\n",
+ "id": "S7.2_A2.3_T2"
+ },
+ {
+ "section": "7.2, 7.8.4",
+ "description": "Use SPACE(\\u0020)",
+ "test": "// CHECK#1\nif (eval(\"'\\u0020str\\u0020ing\\u0020'\") !== \"\\u0020str\\u0020ing\\u0020\") {\n $ERROR('#1: eval(\"\\'\\\\u0020str\\\\u0020ing\\\\u0020\\'\") === \"\\\\u0020str\\\\u0020ing\\\\u0020\"');\n}\n\n//CHECK#2\nif (eval(\"' str ing '\") !== \" str ing \") {\n $ERROR('#2: eval(\"\\' str ing \\'\") === \" str ing \"');\n}\n",
+ "id": "S7.2_A2.4_T1"
+ },
+ {
+ "section": "7.2, 7.8.4",
+ "description": "Use real SPACE",
+ "test": "//CHECK#1\nif (\" str ing \" !== \"\\u0020str\\u0020ing\\u0020\") {\n $ERROR('#1: \" str ing \" === \"\\\\u0020str\\\\u0020ing\\\\u0020\"');\n}\n",
+ "id": "S7.2_A2.4_T2"
+ },
+ {
+ "section": "7.2, 7.8.4",
+ "description": "Use NO-BREAK SPACE(\\u00A0)",
+ "test": "// CHECK#1\nif (eval(\"'\\u00A0str\\u00A0ing\\u00A0'\") !== \"\\u00A0str\\u00A0ing\\u00A0\") {\n $ERROR('#1: eval(\"\\'\\\\u00A0str\\\\u00A0ing\\\\u00A0\\'\") === \"\\\\u00A0str\\\\u00A0ing\\\\u00A0\"');\n}\n",
+ "id": "S7.2_A2.5_T1"
+ },
+ {
+ "section": "7.2, 7.8.4",
+ "description": "Use real NO-BREAK SPACE",
+ "test": "//CHECK#1\nif (\" str ing \" !== \"\\u00A0str\\u00A0ing\\u00A0\") {\n $ERROR('#1: \" str ing \" === \"\\\\u00A0str\\\\u00A0ing\\\\u00A0\"');\n}\n",
+ "id": "S7.2_A2.5_T2"
+ },
+ {
+ "section": "7.2, 7.4",
+ "description": "Use HORIZONTAL TAB(\\u0009)",
+ "test": "// CHECK#1\neval(\"//\\u0009 single line \\u0009 comment \\u0009\");\n\n//CHECK#2\nvar x = 0;\neval(\"//\\u0009 single line \\u0009 comment \\u0009 x = 1;\");\nif (x !== 0) {\n $ERROR('#1: var x = 0; eval(\"//\\\\u0009 single line \\\\u0009 comment \\\\u0009 x = 1;\"); x === 0. Actual: ' + (x));\n}\n",
+ "id": "S7.2_A3.1_T1"
+ },
+ {
+ "section": "7.2, 7.4",
+ "description": "Use real HORIZONTAL TAB",
+ "test": "//CHECK#1\nvar x = 0;\n//\tsingle\tline\tcomment\tx = 1;\nif (x !== 0) {\n $ERROR('#1: var x = 0; //\tsingle\tline\tcomment\tx = 1; x === 0. Actual: ' + (x));\n}\n",
+ "id": "S7.2_A3.1_T2"
+ },
+ {
+ "section": "7.2, 7.4",
+ "description": "Use VERTICAL TAB(\\u000B)",
+ "test": "// CHECK#1\neval(\"//\\u000B single line \\u000B comment \\u000B\");\n\n//CHECK#2\nvar x = 0;\neval(\"//\\u000B single line \\u000B comment \\u000B x = 1;\");\nif (x !== 0) {\n $ERROR('#1: var x = 0; eval(\"//\\\\u000B single line \\\\u000B comment \\\\u000B x = 1;\"); x === 0. Actual: ' + (x));\n}\n",
+ "id": "S7.2_A3.2_T1"
+ },
+ {
+ "section": "7.2, 7.4",
+ "description": "Use real VERTICAL TAB",
+ "test": "//CHECK#1\nvar x = 0;\n//\fsingle\fline\fcomment\fx = 1;\nif (x !== 0) {\n $ERROR('#1: var x = 0; //\fsingle\fline\fcomment\fx = 1; x === 0. Actual: ' + (x));\n}\n",
+ "id": "S7.2_A3.2_T2"
+ },
+ {
+ "section": "7.2, 7.4",
+ "description": "Use FORM FEED(\\u000C)",
+ "test": "// CHECK#1\neval(\"//\\u000C single line \\u000C comment \\u000C\");\n\n//CHECK#2\nvar x = 0;\neval(\"//\\u000C single line \\u000C comment \\u000C x = 1;\");\nif (x !== 0) {\n $ERROR('#1: var x = 0; eval(\"//\\\\u000C single line \\\\u000C comment \\\\u000C x = 1;\"); x === 0. Actual: ' + (x));\n}\n",
+ "id": "S7.2_A3.3_T1"
+ },
+ {
+ "section": "7.2, 7.4",
+ "description": "Use real FORM FEED",
+ "test": "//CHECK#1\nvar x = 0;\n//\u000bsingle\u000bline\u000bcomment\u000bx = 1;\nif (x !== 0) {\n $ERROR('#1: var x = 0; //\u000bsingle\u000bline\u000bcomment\u000bx = 1; x === 0. Actual: ' + (x));\n}\n",
+ "id": "S7.2_A3.3_T2"
+ },
+ {
+ "section": "7.2, 7.4",
+ "description": "Use SPACE(\\u0020)",
+ "test": "// CHECK#1\neval(\"//\\u0020 single line \\u0020 comment \\u0020\");\n\n//CHECK#2\nvar x = 0;\neval(\"//\\u0020 single line \\u0020 comment \\u0020 x = 1;\");\nif (x !== 0) {\n $ERROR('#1: var x = 0; eval(\"//\\\\u0020 single line \\\\u0020 comment \\\\u0020 x = 1;\"); x === 0. Actual: ' + (x));\n}\n",
+ "id": "S7.2_A3.4_T1"
+ },
+ {
+ "section": "7.2, 7.4",
+ "description": "Use real SPACE",
+ "test": "//CHECK#1\nvar x = 0;\n// single line comment x = 1;\nif (x !== 0) {\n $ERROR('#1: var x = 0; // single line comment x = 1; x === 0. Actual: ' + (x));\n}\n",
+ "id": "S7.2_A3.4_T2"
+ },
+ {
+ "section": "7.2, 7.4",
+ "description": "Use NO-BREAK SPACE(\\u00A0)",
+ "test": "// CHECK#1\neval(\"//\\u00A0 single line \\u00A0 comment \\u00A0\");\n\n//CHECK#2\nvar x = 0;\neval(\"//\\u00A0 single line \\u00A0 comment \\u00A0 x = 1;\");\nif (x !== 0) {\n $ERROR('#1: var x = 0; eval(\"//\\\\u00A0 single line \\\\u00A0 comment \\\\u00A0 x = 1;\"); x === 0. Actual: ' + (x));\n}\n",
+ "id": "S7.2_A3.5_T1"
+ },
+ {
+ "section": "7.2, 7.4",
+ "description": "Use real NO-BREAK SPACE",
+ "test": "//CHECK#1\nvar x = 0;\n// single line comment x = 1;\nif (x !== 0) {\n $ERROR('#1: var x = 0; // single line comment x = 1; x === 0. Actual: ' + (x));\n}\n",
+ "id": "S7.2_A3.5_T2"
+ },
+ {
+ "section": "7.2, 7.4",
+ "description": "Use HORIZONTAL TAB(\\u0009)",
+ "test": "// CHECK#1\neval(\"/*\\u0009 multi line \\u0009 comment \\u0009*/\");\n\n//CHECK#2\nvar x = 0;\neval(\"/*\\u0009 multi line \\u0009 comment \\u0009 x = 1;*/\");\nif (x !== 0) {\n $ERROR('#1: var x = 0; eval(\"/*\\\\u0009 multi line \\\\u0009 comment \\\\u0009 x = 1;*/\"); x === 0. Actual: ' + (x));\n}\n",
+ "id": "S7.2_A4.1_T1"
+ },
+ {
+ "section": "7.2, 7.4",
+ "description": "Use real HORIZONTAL TAB",
+ "test": "/*CHECK#1*/\nvar x = 0;\n/*\tmulti\tline\tcomment\tx = 1;*/\nif (x !== 0) {\n $ERROR('#1: var x = 0; /*\tmulti\tline\tcomment\tx = 1;*/ x === 0. Actual: ' + (x));\n}\n",
+ "id": "S7.2_A4.1_T2"
+ },
+ {
+ "section": "7.2, 7.4",
+ "description": "Use VERTICAL TAB(\\u000B)",
+ "test": "// CHECK#1\neval(\"/*\\u000B multi line \\u000B comment \\u000B*/\");\n\n//CHECK#2\nvar x = 0;\neval(\"/*\\u000B multi line \\u000B comment \\u000B x = 1;*/\");\nif (x !== 0) {\n $ERROR('#1: var x = 0; eval(\"/*\\\\u000B multi line \\\\u000B comment \\\\u000B x = 1;*/\"); x === 0. Actual: ' + (x));\n}\n",
+ "id": "S7.2_A4.2_T1"
+ },
+ {
+ "section": "7.2, 7.4",
+ "description": "Use real VERTICAL TAB",
+ "test": "/*CHECK#1*/\nvar x = 0;\n/*\fmulti\fline\fcomment\fx = 1;*/\nif (x !== 0) {\n $ERROR('#1: var x = 0; /*\fmulti\fline\fcomment\fx = 1;*/ x === 0. Actual: ' + (x));\n}\n",
+ "id": "S7.2_A4.2_T2"
+ },
+ {
+ "section": "7.2, 7.4",
+ "description": "Use FORM FEED(\\u000C)",
+ "test": "// CHECK#1\neval(\"/*\\u000C multi line \\u000C comment \\u000C*/\");\n\n//CHECK#2\nvar x = 0;\neval(\"/*\\u000C multi line \\u000C comment \\u000C x = 1;*/\");\nif (x !== 0) {\n $ERROR('#1: var x = 0; eval(\"/*\\\\u000C multi line \\\\u000C comment \\\\u000C x = 1;*/\"); x === 0. Actual: ' + (x));\n}\n",
+ "id": "S7.2_A4.3_T1"
+ },
+ {
+ "section": "7.2, 7.4",
+ "description": "Use real FORM FEED",
+ "test": "/*CHECK#1*/\nvar x = 0;\n/*\u000bmulti\u000bline\u000bcomment\u000bx = 1;*/\nif (x !== 0) {\n $ERROR('#1: var x = 0; /*\u000bmulti\u000bline\u000bcomment\u000bx = 1;*/ x === 0. Actual: ' + (x));\n}\n",
+ "id": "S7.2_A4.3_T2"
+ },
+ {
+ "section": "7.2, 7.4",
+ "description": "Use SPACE(\\u0020)",
+ "test": "// CHECK#1\neval(\"/*\\u0020 multi line \\u0020 comment \\u0020*/\");\n\n//CHECK#2\nvar x = 0;\neval(\"/*\\u0020 multi line \\u0020 comment \\u0020 x = 1;*/\");\nif (x !== 0) {\n $ERROR('#1: var x = 0; eval(\"/*\\\\u0020 multi line \\\\u0020 comment \\\\u0020 x = 1;*/\"); x === 0. Actual: ' + (x));\n}\n",
+ "id": "S7.2_A4.4_T1"
+ },
+ {
+ "section": "7.2, 7.4",
+ "description": "Use real SPACE",
+ "test": "/*CHECK#1*/\nvar x = 0;\n/* multi line comment x = 1;*/\nif (x !== 0) {\n $ERROR('#1: var x = 0; /* multi line comment x = 1;*/ x === 0. Actual: ' + (x));\n}\n",
+ "id": "S7.2_A4.4_T2"
+ },
+ {
+ "section": "7.2, 7.4",
+ "description": "Use NO-BREAK SPACE(\\u00A0)",
+ "test": "// CHECK#1\neval(\"/*\\u00A0 multi line \\u00A0 comment \\u00A0*/\");\n\n//CHECK#2\nvar x = 0;\neval(\"/*\\u00A0 multi line \\u00A0 comment \\u00A0 x = 1;*/\");\nif (x !== 0) {\n $ERROR('#1: var x = 0; eval(\"/*\\\\u00A0 multi line \\\\u00A0 comment \\\\u00A0 x = 1;*/\"); x === 0. Actual: ' + (x));\n}\n",
+ "id": "S7.2_A4.5_T1"
+ },
+ {
+ "section": "7.2, 7.4",
+ "description": "Use real NO-BREAK SPACE",
+ "test": "/*CHECK#1*/\nvar x = 0;\n/* multi line comment x = 1;*/\nif (x !== 0) {\n $ERROR('#1: var x = 0; /* multi line comment x = 1;*/ x === 0. Actual: ' + (x));\n}\n",
+ "id": "S7.2_A4.5_T2"
+ },
+ {
+ "section": "7.2",
+ "description": "Use TAB (U+0009)",
+ "negative": "",
+ "test": "var\\u0009x;\n",
+ "id": "S7.2_A5_T1"
+ },
+ {
+ "section": "7.2",
+ "description": "Use VERTICAL TAB (U+000B)",
+ "negative": "",
+ "test": "var\\u000Bx;\n",
+ "id": "S7.2_A5_T2"
+ },
+ {
+ "section": "7.2",
+ "description": "Use FORM FEED (U+000C)",
+ "negative": "",
+ "test": "var\\u000Cx;\n",
+ "id": "S7.2_A5_T3"
+ },
+ {
+ "section": "7.2",
+ "description": "Use SPACE (U+0020)",
+ "negative": "",
+ "test": "var\\u0020x;\n",
+ "id": "S7.2_A5_T4"
+ },
+ {
+ "section": "7.2",
+ "description": "Use NO-BREAK SPACE (U+00A0)",
+ "negative": "",
+ "test": "var\\u00A0x;\n",
+ "id": "S7.2_A5_T5"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/7.3.json b/website/resources/scripts/testcases2/7.3.json
new file mode 100644
index 000000000..8c9821b10
--- /dev/null
+++ b/website/resources/scripts/testcases2/7.3.json
@@ -0,0 +1,98 @@
+{
+ "testCollection": {
+ "name": "7.3",
+ "numTests": 15,
+ "tests": [
+ {
+ "id": "7.3-1",
+ "path": "TestCases/chapter07/7.3/7.3-1.js",
+ "description": "7.3 - ES5 recognizes the character <LS> (\\u2028) as line terminators when parsing statements",
+ "test": "assertTrue((function testcase() {\n eval(\"var test\\u2028prop = 66;\");\n return prop === 66 && !this.hasOwnProperty(\"test\") && typeof test === \"undefined\";\n }).call(this));\n"
+ },
+ {
+ "id": "7.3-10",
+ "path": "TestCases/chapter07/7.3/7.3-10.js",
+ "description": "7.3 - ES5 recognizes the character <PS> (\\u2029) as a NonEscapeCharacter",
+ "test": "assertTrue((function testcase() {\n try {\n eval(\"var prop = \\\\u2029;\");\n return false;\n } catch (e) {\n return e instanceof SyntaxError;\n }\n }).call(this));\n"
+ },
+ {
+ "id": "7.3-11",
+ "path": "TestCases/chapter07/7.3/7.3-11.js",
+ "description": "7.3 - ES5 specifies that a multiline comment that contains a line terminator character <LS> (\\u2028) must be treated as a single line terminator for the purposes of semicolon insertion",
+ "test": "assertTrue((function testcase() {\n /*MultiLine\n Comments \n \\u2028 var = ;\n */\n return true;\n }).call(this));\n"
+ },
+ {
+ "id": "7.3-12",
+ "path": "TestCases/chapter07/7.3/7.3-12.js",
+ "description": "7.3 - ES5 specifies that a multiline comment that contains a line terminator character <PS> (\\u2029) must be treated as a single line terminator for the purposes of semicolon insertion",
+ "test": "assertTrue((function testcase() {\n /*MultiLine\n Comments \n \\u2029 var = ;\n */\n return true;\n }).call(this));\n"
+ },
+ {
+ "id": "7.3-13",
+ "path": "TestCases/chapter07/7.3/7.3-13.js",
+ "description": "7.3 - ES5 specifies that a multiline comment that contains a line terminator character <CR> (\\u000D) must be treated as a single line terminator for the purposes of semicolon insertion",
+ "test": "assertTrue((function testcase() {\n /*MultiLine\n Comments \n \\u000D var = ;\n */\n return true;\n }).call(this));\n"
+ },
+ {
+ "id": "7.3-14",
+ "path": "TestCases/chapter07/7.3/7.3-14.js",
+ "description": "7.3 - ES5 specifies that a multiline comment that contains a line terminator character <LF> (\\u000A) must be treated as a single line terminator for the purposes of semicolon insertion",
+ "test": "assertTrue((function testcase() {\n /*MultiLine\n Comments \n \\u000A var = ;\n */\n return true;\n }).call(this));\n"
+ },
+ {
+ "id": "7.3-15",
+ "path": "TestCases/chapter07/7.3/7.3-15.js",
+ "description": "7.3 - ES5 recognize <BOM> (\\uFFFF) as a whitespace character",
+ "test": "assertTrue((function testcase() {\n var prop = \"a\\uFFFFa\";\n return prop.length === 3 && prop !== \"aa\" && prop[1] === \"\\uFFFF\";\n }).call(this));\n"
+ },
+ {
+ "id": "7.3-2",
+ "path": "TestCases/chapter07/7.3/7.3-2.js",
+ "description": "7.3 - ES5 recognizes the character <PS> (\\u2029) as line terminators when parsing statements",
+ "test": "assertTrue((function testcase() {\n eval(\"var test\\u2029prop = 66;\");\n return prop === 66 && !this.hasOwnProperty(\"test\") && typeof test === \"undefined\";\n }).call(this));\n"
+ },
+ {
+ "id": "7.3-3",
+ "path": "TestCases/chapter07/7.3/7.3-3.js",
+ "description": "7.3 - ES5 recognizes the character <LS> (\\u2028) as terminating SingleLineComments",
+ "test": "assertTrue((function testcase() {\n try {\n eval(\"//Single Line Comments\\u2028 var =;\");\n return false;\n } catch (e) {\n return e instanceof SyntaxError;\n }\n }).call(this));\n"
+ },
+ {
+ "id": "7.3-4",
+ "path": "TestCases/chapter07/7.3/7.3-4.js",
+ "description": "7.3 - ES5 recognizes the character <PS> (\\u2029) as terminating SingleLineComments",
+ "test": "assertTrue((function testcase() {\n try {\n eval(\"//Single Line Comments\\u2029 var =;\");\n return false;\n } catch (e) {\n return e instanceof SyntaxError;\n }\n }).call(this));\n"
+ },
+ {
+ "id": "7.3-5",
+ "path": "TestCases/chapter07/7.3/7.3-5.js",
+ "description": "7.3 - ES5 recognizes the character <LS> (\\u2028) as terminating string literal",
+ "test": "assertTrue((function testcase() {\n var prop = \"66\\u2028123\";\n return prop === \"66\\u2028123\" && prop[2] === \"\\u2028\" && prop.length === 6;\n }).call(this));\n"
+ },
+ {
+ "id": "7.3-6",
+ "path": "TestCases/chapter07/7.3/7.3-6.js",
+ "description": "7.3 - ES5 recognizes the character <PS> (\\u2029) as terminating string literal",
+ "test": "assertTrue((function testcase() {\n var prop = \"66\\u2029123\";\n return prop === \"66\\u2029123\" && prop[2] === \"\\u2029\" && prop.length === 6;\n }).call(this));\n"
+ },
+ {
+ "id": "7.3-7",
+ "path": "TestCases/chapter07/7.3/7.3-7.js",
+ "description": "7.3 - ES5 recognizes the character <LS> (\\u2028) as terminating regular expression literals",
+ "test": "assertTrue((function testcase() {\n try {\n eval(\"var regExp = /[\\u2028]/\");\n regExp.test(\"\");\n return false;\n } catch (e) {\n return e instanceof SyntaxError;\n }\n }).call(this));\n"
+ },
+ {
+ "id": "7.3-8",
+ "path": "TestCases/chapter07/7.3/7.3-8.js",
+ "description": "7.3 - ES5 recognizes the character <PS> (\\u2029) as terminating regular expression literals",
+ "test": "assertTrue((function testcase() {\n try {\n eval(\"var regExp = /[\\u2029]/\");\n regExp.test(\"\");\n return false;\n } catch (e) {\n return e instanceof SyntaxError;\n }\n }).call(this));\n"
+ },
+ {
+ "id": "7.3-9",
+ "path": "TestCases/chapter07/7.3/7.3-9.js",
+ "description": "7.3 - ES5 recognizes the character <LS> (\\u2028) as a NonEscapeCharacter",
+ "test": "assertTrue((function testcase() {\n try {\n eval(\"var prop = \\\\u2028;\");\n return false;\n } catch (e) {\n return e instanceof SyntaxError;\n }\n }).call(this));\n"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/7.3_Line_Terminators.json b/website/resources/scripts/testcases2/7.3_Line_Terminators.json
new file mode 100644
index 000000000..7206ae22f
--- /dev/null
+++ b/website/resources/scripts/testcases2/7.3_Line_Terminators.json
@@ -0,0 +1,292 @@
+{
+ "testCollection": {
+ "name": "7.3_Line_Terminators",
+ "numTests": 44,
+ "tests": [
+ {
+ "section": "7.3",
+ "description": "Insert LINE FEED (\\u000A and \\n) between tokens of var x=1",
+ "test": "// CHECK#1\neval(\"\\u000Avar\\u000Ax\\u000A=\\u000A1\\u000A\");\nif (x !== 1) {\n $ERROR('#1: eval(\"\\\\u000Avar\\\\u000Ax\\\\u000A=\\\\u000A1\\\\u000A\"); x === 1. Actual: ' + (x));\n}\n\n//CHECK#2\neval(\"\\u000A\" + \"var\" + \"\\u000A\" + \"x\" + \"\\u000A\" + \"=\" + \"\\u000A\" + \"1\" + \"\\u000A\");\nif (x !== 1) {\n $ERROR('#2: eval(\"\\\\u000A\" + \"var\" + \"\\\\u000A\" + \"x\" + \"\\\\u000A\" + \"=\" + \"\\\\u000A\" + \"1\" + \"\\\\u000A\"); x === 1. Actual: ' + (x));\n}\n\n//CHECK#3\neval(\"\\nvar\\nx\\n=\\n1\\n\");\nif (x !== 1) {\n $ERROR('#3: eval(\"\\\\nvar\\\\nx\\\\n=\\\\n1\\\\n\"); x === 1. Actual: ' + (x));\n}\n\n//CHECK#4\neval(\"\\n\" + \"var\" + \"\\n\" + \"x\" + \"\\n\" + \"=\" + \"\\n\" + \"1\" + \"\\n\");\nif (x !== 1) {\n $ERROR('#4: eval(\"\\\\n\" + \"var\" + \"\\\\n\" + \"x\" + \"\\\\n\" + \"=\" + \"\\\\n\" + \"1\" + \"\\\\n\"); x === 1. Actual: ' + (x));\n}\n\n//CHECK#5\neval(\"\\u000A\" + \"var\" + \"\\n\" + \"x\" + \"\\u000A\" + \"=\" + \"\\n\" + \"1\" + \"\\u000A\");\nif (x !== 1) {\n $ERROR('#5: eval(\"\\\\u000A\" + \"var\" + \"\\\\n\" + \"x\" + \"\\\\u000A\" + \"=\" + \"\\\\n\" + \"1\" + \"\\\\u000A\"); x === 1. Actual: ' + (x));\n}\n",
+ "id": "S7.3_A1.1_T1"
+ },
+ {
+ "section": "7.3",
+ "description": "Insert real LINE FEED between tokens of var x=1",
+ "test": "//CHECK#1\nvar\nx\n=\n1;\nif (x !== 1) {\n $ERROR('#1: var\\\\nx\\\\n=\\\\n1\\\\n; x === 1. Actual: ' + (x));\n}\n",
+ "id": "S7.3_A1.1_T2"
+ },
+ {
+ "section": "7.3",
+ "description": "Insert CARRIAGE RETURN (\\u000D and \\r) between tokens of var x=1",
+ "test": "// CHECK#1\neval(\"\\u000Dvar\\u000Dx\\u000D=\\u000D1\\u000D\");\nif (x !== 1) {\n $ERROR('#1: eval(\"\\\\u000Dvar\\\\u000Dx\\\\u000D=\\\\u000D1\\\\u000D\"); x === 1. Actual: ' + (x));\n}\n\n//CHECK#2\neval(\"\\u000D\" + \"var\" + \"\\u000D\" + \"x\" + \"\\u000D\" + \"=\" + \"\\u000D\" + \"1\" + \"\\u000D\");\nif (x !== 1) {\n $ERROR('#2: eval(\"\\\\u000D\" + \"var\" + \"\\\\u000D\" + \"x\" + \"\\\\u000D\" + \"=\" + \"\\\\u000D\" + \"1\" + \"\\\\u000D\"); x === 1. Actual: ' + (x));\n}\n\n//CHECK#3\neval(\"\\rvar\\rx\\r=\\r1\\r\");\nif (x !== 1) {\n $ERROR('#3: eval(\"\\\\rvar\\\\rx\\\\r=\\\\r1\\\\r\"); x === 1. Actual: ' + (x));\n}\n\n//CHECK#4\neval(\"\\r\" + \"var\" + \"\\r\" + \"x\" + \"\\r\" + \"=\" + \"\\r\" + \"1\" + \"\\r\");\nif (x !== 1) {\n $ERROR('#4: eval(\"\\\\r\" + \"var\" + \"\\\\r\" + \"x\" + \"\\\\r\" + \"=\" + \"\\\\r\" + \"1\" + \"\\\\r\"); x === 1. Actual: ' + (x));\n}\n\n//CHECK#5\neval(\"\\u000D\" + \"var\" + \"\\r\" + \"x\" + \"\\u000D\" + \"=\" + \"\\r\" + \"1\" + \"\\u000D\");\nif (x !== 1) {\n $ERROR('#5: eval(\"\\\\u000D\" + \"var\" + \"\\\\r\" + \"x\" + \"\\\\u000D\" + \"=\" + \"\\\\r\" + \"1\" + \"\\\\u000D\"); x === 1. Actual: ' + (x));\n}\n",
+ "id": "S7.3_A1.2_T1"
+ },
+ {
+ "section": "7.3",
+ "description": "Insert real CARRIAGE RETURN between tokens of var x=1",
+ "test": "//CHECK#1\nvar\nx\n=\n1;\nif (x !== 1) {\n $ERROR('#1: var\\\\nx\\\\n=\\\\n1\\\\n; x === 1. Actual: ' + (x));\n}\n",
+ "id": "S7.3_A1.2_T2"
+ },
+ {
+ "section": "7.3",
+ "description": "Insert LINE SEPARATOR (\\u2028) between tokens of var x=1",
+ "test": "// CHECK#1\neval(\"\\u2028var\\u2028x\\u2028=\\u20281\\u2028\");\nif (x !== 1) {\n $ERROR('#1: eval(\"\\\\u2028var\\\\u2028x\\\\u2028=\\\\u20281\\\\u2028\"); x === 1. Actual: ' + (x));\n}\n\n//CHECK#2\neval(\"\\u2028\" + \"var\" + \"\\u2028\" + \"x\" + \"\\u2028\" + \"=\" + \"\\u2028\" + \"1\" + \"\\u2028\");\nif (x !== 1) {\n $ERROR('#2: eval(\"\\\\u2028\" + \"var\" + \"\\\\u2028\" + \"x\" + \"\\\\u2028\" + \"=\" + \"\\\\u2028\" + \"1\" + \"\\\\u2028\"); x === 1. Actual: ' + (x));\n}\n\n",
+ "id": "S7.3_A1.3"
+ },
+ {
+ "section": "7.3",
+ "description": "Insert PARAGRAPH SEPARATOR (\\u2029) between tokens of var x=1",
+ "test": "// CHECK#1\neval(\"\\u2029var\\u2029x\\u2029=\\u20291\\u2029\");\nif (x !== 1) {\n $ERROR('#1: eval(\"\\\\u2029var\\\\u2029x\\\\u2029=\\\\u20291\\\\u2029\"); x === 1. Actual: ' + (x));\n}\n\n//CHECK#2\neval(\"\\u2029\" + \"var\" + \"\\u2029\" + \"x\" + \"\\u2029\" + \"=\" + \"\\u2029\" + \"1\" + \"\\u2029\");\nif (x !== 1) {\n $ERROR('#2: eval(\"\\\\u2029\" + \"var\" + \"\\\\u2029\" + \"x\" + \"\\\\u2029\" + \"=\" + \"\\\\u2029\" + \"1\" + \"\\\\u2029\"); x === 1. Actual: ' + (x));\n}\n\n\n\n",
+ "id": "S7.3_A1.4"
+ },
+ {
+ "section": "7.3",
+ "description": "Insert LINE FEED (\\u000A) into string",
+ "negative": "",
+ "test": "// CHECK#1\nif (eval(\"'\\u000Astr\\u000Aing\\u000A'\") === \"\\u000Astr\\u000Aing\\u000A\") {\n $ERROR('#1: eval(\"\\'\\\\u000Astr\\\\u000Aing\\\\u000A\\'\") === \"\\\\u000Astr\\\\u000Aing\\\\u000A\"');\n}\n",
+ "id": "S7.3_A2.1_T1"
+ },
+ {
+ "section": "7.3",
+ "description": "Use real LINE FEED into string",
+ "negative": "",
+ "test": "//CHECK#1\n\"\nstr\ning\n\";\n",
+ "id": "S7.3_A2.1_T2"
+ },
+ {
+ "section": "7.3",
+ "description": "Insert CARRIAGE RETURN (\\u000D) into string",
+ "negative": "",
+ "test": "// CHECK#1\nif (eval(\"'\\u000Dstr\\u000Ding\\u000D'\") === \"\\u000Dstr\\u000Ding\\u000D\") {\n $ERROR('#1: eval(\"\\'\\\\u000Dstr\\\\u000Ding\\\\u000D\\'\") === \"\\\\u000Dstr\\\\u000Ding\\\\u000D\"');\n}\n",
+ "id": "S7.3_A2.2_T1"
+ },
+ {
+ "section": "7.3",
+ "description": "Insert real CARRIAGE RETURN into string",
+ "negative": "",
+ "test": "//CHECK#1\n\"\nstr\ning\n\";\n",
+ "id": "S7.3_A2.2_T2"
+ },
+ {
+ "section": "7.3",
+ "description": "Insert LINE SEPARATOR (\\u2028) into string",
+ "negative": "",
+ "test": "// CHECK#1\nif (eval(\"'\\u2028str\\u2028ing\\u2028'\") === \"\\u2028str\\u2028ing\\u2028\") {\n $ERROR('#1: eval(\"\\'\\\\u2028str\\\\u2028ing\\\\u2028\\'\") === \"\\\\u2028str\\\\u2028ing\\\\u2028\"');\n}\n",
+ "id": "S7.3_A2.3"
+ },
+ {
+ "section": "7.3",
+ "description": "Insert PARAGRAPH SEPARATOR (\\u2029) into string",
+ "negative": "",
+ "test": "// CHECK#1\nif (eval(\"'\\u2029str\\u2029ing\\u2029'\") === \"\\u2029str\\u2029ing\\u2029\") {\n $ERROR('#1: eval(\"\\'\\\\u2029str\\\\u2029ing\\\\u2029\\'\") === \"\\\\u2029str\\\\u2029ing\\\\u2029\"');\n}\n",
+ "id": "S7.3_A2.4"
+ },
+ {
+ "section": "7.3, 7.4",
+ "description": "Insert LINE FEED (\\u000A) into single line comment",
+ "negative": "",
+ "test": "// CHECK#1\neval(\"// single line \\u000A comment\");\n",
+ "id": "S7.3_A3.1_T1"
+ },
+ {
+ "section": "7.3, 7.4",
+ "description": "Insert LINE FEED (\\u000A) into begin of single line comment",
+ "negative": "",
+ "test": "// CHECK#1\neval(\"//\\u000A single line comment\");\n",
+ "id": "S7.3_A3.1_T2"
+ },
+ {
+ "section": "7.3, 7.4",
+ "description": "Insert real LINE FEED into single line comment",
+ "negative": "",
+ "test": "// CHECK#1\n//single \nline comment\n",
+ "id": "S7.3_A3.1_T3"
+ },
+ {
+ "section": "7.3, 7.4",
+ "description": "Insert CARRIAGE RETURN (\\u000D) into single line comment",
+ "negative": "",
+ "test": "// CHECK#1\neval(\"// single line \\u000D comment\");\n",
+ "id": "S7.3_A3.2_T1"
+ },
+ {
+ "section": "7.3, 7.4",
+ "description": "Insert CARRIAGE RETURN (\\u000D) into begin of single line comment",
+ "negative": "",
+ "test": "// CHECK#1\neval(\"//\\u000D single line comment\");\n",
+ "id": "S7.3_A3.2_T2"
+ },
+ {
+ "section": "7.3, 7.4",
+ "description": "Insert real CARRIAGE RETURN into single line comment",
+ "negative": "",
+ "test": "// CHECK#1\n//single \nline comment\n",
+ "id": "S7.3_A3.2_T3"
+ },
+ {
+ "section": "7.3, 7.4",
+ "description": "Insert LINE SEPARATOR (\\u2028) into single line comment",
+ "negative": "",
+ "test": "// CHECK#1\neval(\"// single line \\u2028 comment\");\n",
+ "id": "S7.3_A3.3_T1"
+ },
+ {
+ "section": "7.3, 7.4",
+ "description": "Insert LINE SEPARATOR (\\u2028) into begin of single line comment",
+ "negative": "",
+ "test": "// CHECK#1\neval(\"//\\u2028 single line comment\");\n",
+ "id": "S7.3_A3.3_T2"
+ },
+ {
+ "section": "7.3, 7.4",
+ "description": "Insert PARAGRAPH SEPARATOR (\\u2029) into single line comment",
+ "negative": "",
+ "test": "// CHECK#1\neval(\"// single line \\u2029 comment\");\n",
+ "id": "S7.3_A3.4_T1"
+ },
+ {
+ "section": "7.3, 7.4",
+ "description": "Insert PARAGRAPH SEPARATOR (\\u2029) into begin of single line comment",
+ "negative": "",
+ "test": "// CHECK#1\neval(\"//\\u2029 single line comment\");\n",
+ "id": "S7.3_A3.4_T2"
+ },
+ {
+ "section": "7.3, 7.4",
+ "description": "Insert LINE FEED (U+000A) into the end of single line comment",
+ "test": "// CHECK#1\neval(\"// single line comment\\u000A\");\n\n// CHECK#2\nvar x = 0;\neval(\"// single line comment\\u000A x = 1;\");\nif (x !== 1) {\n $ERROR('#1: var x = 0; eval(\"// single line comment\\\\u000A x = 1;\"); x === 1. Actual: ' + (x));\n}\n",
+ "id": "S7.3_A4_T1"
+ },
+ {
+ "section": "7.3, 7.4",
+ "description": "Insert CARRIAGE RETURN (U+000D) into the end of single line comment",
+ "test": "// CHECK#1\neval(\"// single line comment\\u000D\");\n\n// CHECK#2\nvar x = 0;\neval(\"// single line comment\\u000D x = 1;\");\nif (x !== 1) {\n $ERROR('#1: var x = 0; eval(\"// single line comment\\\\u000D x = 1;\"); x === 1. Actual: ' + (x));\n}\n",
+ "id": "S7.3_A4_T2"
+ },
+ {
+ "section": "7.3, 7.4",
+ "description": "Insert LINE SEPARATOR (U+2028) into the end of single line comment",
+ "test": "// CHECK#1\neval(\"// single line comment\\u2028\");\n\n// CHECK#2\nvar x = 0;\neval(\"// single line comment\\u2028 x = 1;\");\nif (x !== 1) {\n $ERROR('#1: var x = 0; eval(\"// single line comment\\\\u2028 x = 1;\"); x === 1. Actual: ' + (x));\n}\n",
+ "id": "S7.3_A4_T3"
+ },
+ {
+ "section": "7.3, 7.4",
+ "description": "Insert PARAGRAPH SEPARATOR (U+2029) into the end of single line comment",
+ "test": "// CHECK#1\neval(\"// single line comment\\u2029\");\n\n// CHECK#2\nvar x = 0;\neval(\"// single line comment\\u2029 x = 1;\");\nif (x !== 1) {\n $ERROR('#1: var x = 0; eval(\"// single line comment\\\\u2029 x = 1;\"); x === 1. Actual: ' + (x));\n}\n",
+ "id": "S7.3_A4_T4"
+ },
+ {
+ "section": "7.3, 7.4",
+ "description": "Insert LINE FEED (U+000A) into multi line comment",
+ "test": "// CHECK#1\neval(\"/*\\u000A multi line \\u000A comment \\u000A*/\");\n\n//CHECK#2\nvar x = 0;\neval(\"/*\\u000A multi line \\u000A comment \\u000A x = 1;*/\");\nif (x !== 0) {\n $ERROR('#1: var x = 0; eval(\"/*\\\\u000A multi line \\\\u000A comment \\\\u000A x = 1;*/\"); x === 0. Actual: ' + (x));\n}\n",
+ "id": "S7.3_A5.1_T1"
+ },
+ {
+ "section": "7.3, 7.4",
+ "description": "Insert real LINE FEED into multi line comment",
+ "test": "/*CHECK#1*/\nvar x = 0;\n/*\nmulti\nline\ncomment\nx = 1;\n*/\nif (x !== 0) {\n $ERROR('#1: var x = 0; /*\\\\nmulti\\\\nline\\\\ncomment\\\\nx = 1;\\\\n*/ x === 0. Actual: ' + (x));\n}\n",
+ "id": "S7.3_A5.1_T2"
+ },
+ {
+ "section": "7.3, 7.4",
+ "description": "Insert CARRIAGE RETURN (U+000D) into multi line comment",
+ "test": "// CHECK#1\neval(\"/*\\u000D multi line \\u000D comment \\u000D*/\");\n\n//CHECK#2\nvar x = 0;\neval(\"/*\\u000D multi line \\u000D comment \\u000D x = 1;*/\");\nif (x !== 0) {\n $ERROR('#1: var x = 0; eval(\"/*\\\\u000D multi line \\\\u000D comment \\\\u000D x = 1;*/\"); x === 0. Actual: ' + (x));\n}\n",
+ "id": "S7.3_A5.2_T1"
+ },
+ {
+ "section": "7.3, 7.4",
+ "description": "Insert real CARRIAGE RETURN into multi line comment",
+ "test": "/*CHECK#1*/\nvar x = 0;\n/*\nmulti\nline\ncomment\nx = 1;\n*/\nif (x !== 0) {\n $ERROR('#1: var x = 0; /*\\\\rmulti\\\\rline\\\\rcomment\\\\rx = 1;\\\\r*/ x === 0. Actual: ' + (x));\n}\n",
+ "id": "S7.3_A5.2_T2"
+ },
+ {
+ "section": "7.3, 7.4",
+ "description": "Insert LINE SEPARATOR (U+2028) into multi line comment",
+ "test": "// CHECK#1\neval(\"/*\\u2028 multi line \\u2028 comment \\u2028*/\");\n\n//CHECK#2\nvar x = 0;\neval(\"/*\\u2028 multi line \\u2028 comment \\u2028 x = 1;*/\");\nif (x !== 0) {\n $ERROR('#1: var x = 0; eval(\"/*\\\\u2028 multi line \\\\u2028 comment \\\\u2028 x = 1;*/\"); x === 0. Actual: ' + (x));\n}\n",
+ "id": "S7.3_A5.3"
+ },
+ {
+ "section": "7.3, 7.4",
+ "description": "Insert PARAGRAPH SEPARATOR (U+2029) into multi line comment",
+ "test": "// CHECK#1\neval(\"/*\\u2029 multi line \\u2029 comment \\u2029*/\");\n\n//CHECK#2\nvar x = 0;\neval(\"/*\\u2029 multi line \\u2029 comment \\u2029 x = 1;*/\");\nif (x !== 0) {\n $ERROR('#1: var x = 0; eval(\"/*\\\\u2029 multi line \\\\u2029 comment \\\\u2029 x = 1;*/\"); x === 0. Actual: ' + (x));\n}\n",
+ "id": "S7.3_A5.4"
+ },
+ {
+ "section": "7.3",
+ "description": "Insert LINE FEED (U+000A) in var x",
+ "negative": "",
+ "test": "var\\u000Ax;\n",
+ "id": "S7.3_A6_T1"
+ },
+ {
+ "section": "7.3",
+ "description": "Insert CARRIAGE RETURN (U+000D) in var x",
+ "negative": "",
+ "test": "var\\u000Dx;\n",
+ "id": "S7.3_A6_T2"
+ },
+ {
+ "section": "7.3",
+ "description": "Insert LINE SEPARATOR (U+2028) in var x",
+ "negative": "",
+ "test": "var\\u2028x;\n",
+ "id": "S7.3_A6_T3"
+ },
+ {
+ "section": "7.3",
+ "description": "Insert PARAGRAPH SEPARATOR (U+2029) in var x",
+ "negative": "",
+ "test": "var\\u2029x;\n",
+ "id": "S7.3_A6_T4"
+ },
+ {
+ "section": "7.3",
+ "description": "Insert Line Terminator in var x=y+z",
+ "test": "// CHECK#1\nvar y=2;\nvar z=3;\nvar\nx\n=\ny\n+\nz\n;\nif (x !== 5) {\n $ERROR('#1: var\\\\nx\\\\n=\\\\ny\\\\n+\\\\nz\\\\n; x === 5. Actual: ' + (x));\n}\nx=0;\n\n// CHECK#2\nvar y=2;\nvar z=3;\nvar\nx\n=\ny\n+\nz\n;\nif (x !== 5) {\n $ERROR('#2: var\\\\nx\\\\n=\\\\ny\\\\n+\\\\nz\\\\n; x === 5. Actual: ' + (x));\n}\nx=0;\n\n// CHECK#3\nvar y=2;\nvar z=3;\neval(\"\\u2028var\\u2028x\\u2028=\\u2028y\\u2028+\\u2028z\\u2028\");\nif (x !== 5) {\n $ERROR('#3: eval(\"\\\\u2028var\\\\u2028x\\\\u2028=\\\\u2028y\\\\u2028+\\\\u2028z\\\\u2028\"); x === 5. Actual: ' + (x));\n}\nx=0;\n\n// CHECK#4\nvar y=2;\nvar z=3;\neval(\"\\u2029var\\u2029x\\u2029=\\u2029y\\u2029+\\u2029z\\u2029\");\nif (x !== 5) {\n $ERROR('#4: eval(\"\\\\u2029var\\\\u2029x\\\\u2029=\\\\u2029y\\\\u2029+\\\\u2029z\\\\u2029\"); x === 5. Actual: ' + (x));\n}\n",
+ "id": "S7.3_A7_T1"
+ },
+ {
+ "section": "7.3",
+ "description": "Insert Line Terminator in var x=y-z",
+ "test": "// CHECK#1\nvar y=3;\nvar z=2;\nvar\nx\n=\ny\n-\nz\n;\nif (x !== 1) {\n $ERROR('#1: var\\\\nx\\\\n=\\\\ny\\\\n-\\\\nz\\\\n; x === 1. Actual: ' + (x));\n}\nx=0;\n\n// CHECK#2\nvar y=3;\nvar z=2;\nvar\nx\n=\ny\n-\nz\n;\nif (x !== 1) {\n $ERROR('#2: var\\\\nx\\\\n=\\\\ny\\\\n-\\\\nz\\\\n; x === 1. Actual: ' + (x));\n}\nx=0;\n\n// CHECK#3\nvar y=3;\nvar z=2;\neval(\"\\u2028var\\u2028x\\u2028=\\u2028y\\u2028-\\u2028z\\u2028\");\nif (x !== 1) {\n $ERROR('#3: eval(\"\\\\u2028var\\\\u2028x\\\\u2028=\\\\u2028y\\\\u2028-\\\\u2028z\\\\u2028\"); x === 1. Actual: ' + (x));\n}\nx=0;\n\n// CHECK#4\nvar y=3;\nvar z=2;\neval(\"\\u2029var\\u2029x\\u2029=\\u2029y\\u2029-\\u2029z\\u2029\");\nif (x !== 1) {\n $ERROR('#4: eval(\"\\\\u2029var\\\\u2029x\\\\u2029=\\\\u2029y\\\\u2029-\\\\u2029z\\\\u2029\"); x === 1. Actual: ' + (x));\n}\n",
+ "id": "S7.3_A7_T2"
+ },
+ {
+ "section": "7.3",
+ "description": "Insert Line Terminator in var x=y*z",
+ "test": "// CHECK#1\nvar y=3;\nvar z=2;\nvar\nx\n=\ny\n*\nz\n;\nif (x !== 6) {\n $ERROR('#1: var\\\\nx\\\\n=\\\\ny\\\\n*\\\\nz\\\\n; x === 6. Actual: ' + (x));\n}\nx=0;\n\n// CHECK#2\nvar y=3;\nvar z=2;\nvar\nx\n=\ny\n*\nz\n;\nif (x !== 6) {\n $ERROR('#2: var\\\\nx\\\\n=\\\\ny\\\\n*\\\\nz\\\\n; x === 6. Actual: ' + (x));\n}\nx=0;\n\n// CHECK#3\nvar y=3;\nvar z=2;\neval(\"\\u2028var\\u2028x\\u2028=\\u2028y\\u2028*\\u2028z\\u2028\");\nif (x !== 6) {\n $ERROR('#3: eval(\"\\\\u2028var\\\\u2028x\\\\u2028=\\\\u2028y\\\\u2028*\\\\u2028z\\\\u2028\"); x === 6. Actual: ' + (x));\n}\nx=0;\n\n// CHECK#4\nvar y=3;\nvar z=2;\neval(\"\\u2029var\\u2029x\\u2029=\\u2029y\\u2029*\\u2029z\\u2029\");\nif (x !== 6) {\n $ERROR('#4: eval(\"\\\\u2029var\\\\u2029x\\\\u2029=\\\\u2029y\\\\u2029*\\\\u2029z\\\\u2029\"); x === 6. Actual: ' + (x));\n}\n",
+ "id": "S7.3_A7_T3"
+ },
+ {
+ "section": "7.3",
+ "description": "Insert Line Terminator in var x=y/z",
+ "test": "// CHECK#1\nvar y=12;\nvar z=2;\nvar\nx\n=\ny\n/\nz\n;\nif (x !== 6) {\n $ERROR('#1: var\\\\nx\\\\n=\\\\ny\\\\n/\\\\nz\\\\n; x === 6. Actual: ' + (x));\n}\nx=0;\n\n// CHECK#2\nvar y=12;\nvar z=2;\nvar\nx\n=\ny\n/\nz\n;\nif (x !== 6) {\n $ERROR('#2: var\\\\nx\\\\n=\\\\ny\\\\n/\\\\nz\\\\n; x === 6. Actual: ' + (x));\n}\nx=0;\n\n// CHECK#3\nvar y=12;\nvar z=2;\neval(\"\\u2028var\\u2028x\\u2028=\\u2028y\\u2028/\\u2028z\\u2028\");\nif (x !== 6) {\n $ERROR('#3: eval(\"\\\\u2028var\\\\u2028x\\\\u2028=\\\\u2028y\\\\u2028/\\\\u2028z\\\\u2028\"); x === 6. Actual: ' + (x));\n}\nx=0;\n\n// CHECK#4\nvar y=12;\nvar z=2;\neval(\"\\u2029var\\u2029x\\u2029=\\u2029y\\u2029/\\u2029z\\u2029\");\nif (x !== 6) {\n $ERROR('#4: eval(\"\\\\u2029var\\\\u2029x\\\\u2029=\\\\u2029y\\\\u2029/\\\\u2029z\\\\u2029\"); x === 6. Actual: ' + (x));\n}\n",
+ "id": "S7.3_A7_T4"
+ },
+ {
+ "section": "7.3",
+ "description": "Insert Line Terminator in var x=y%z",
+ "test": "// CHECK#1\nvar y=16;\nvar z=10;\nvar\nx\n=\ny\n%\nz\n;\nif (x !== 6) {\n $ERROR('#1: var\\\\nx\\\\n=\\\\ny\\\\n%\\\\nz\\\\n; x === 6. Actual: ' + (x));\n}\nx=0;\n\n// CHECK#2\nvar y=16;\nvar z=10;\nvar\nx\n=\ny\n%\nz\n;\nif (x !== 6) {\n $ERROR('#2: var\\\\nx\\\\n=\\\\ny\\\\n%\\\\nz\\\\n; x === 6. Actual: ' + (x));\n}\nx=0;\n\n// CHECK#3\nvar y=16;\nvar z=10;\neval(\"\\u2028var\\u2028x\\u2028=\\u2028y\\u2028%\\u2028z\\u2028\");\nif (x !== 6) {\n $ERROR('#3: eval(\"\\\\u2028var\\\\u2028x\\\\u2028=\\\\u2028y\\\\u2028%\\\\u2028z\\\\u2028\"); x === 6. Actual: ' + (x));\n}\nx=0;\n\n// CHECK#4\nvar y=16;\nvar z=10;\neval(\"\\u2029var\\u2029x\\u2029=\\u2029y\\u2029%\\u2029z\\u2029\");\nif (x !== 6) {\n $ERROR('#4: eval(\"\\\\u2029var\\\\u2029x\\\\u2029=\\\\u2029y\\\\u2029%\\\\u2029z\\\\u2029\"); x === 6. Actual: ' + (x));\n}\n",
+ "id": "S7.3_A7_T5"
+ },
+ {
+ "section": "7.3",
+ "description": "Insert Line Terminator in var x=y>>z",
+ "test": "// CHECK#1\nvar y=16;\nvar z=3;\nvar\nx\n=\ny\n>>\nz\n;\nif (x !== 2) {\n $ERROR('#1: var\\\\nx\\\\n=\\\\ny\\\\n>>\\\\nz\\\\n; x === 2. Actual: ' + (x));\n}\nx=0;\n\n// CHECK#2\nvar y=16;\nvar z=3;\nvar\nx\n=\ny\n>>\nz\n;\nif (x !== 2) {\n $ERROR('#2: var\\\\nx\\\\n=\\\\ny\\\\n>>\\\\nz\\\\n; x === 2. Actual: ' + (x));\n}\nx=0;\n\n// CHECK#3\nvar y=16;\nvar z=3;\neval(\"\\u2028var\\u2028x\\u2028=\\u2028y\\u2028>>\\u2028z\\u2028\");\nif (x !== 2) {\n $ERROR('#3: eval(\"\\\\u2028var\\\\u2028x\\\\u2028=\\\\u2028y\\\\u2028>>\\\\u2028z\\\\u2028\"); x === 2. Actual: ' + (x));\n}\nx=0;\n\n// CHECK#4\nvar y=16;\nvar z=3;\neval(\"\\u2029var\\u2029x\\u2029=\\u2029y\\u2029>>\\u2029z\\u2029\");\nif (x !== 2) {\n $ERROR('#4: eval(\"\\\\u2029var\\\\u2029x\\\\u2029=\\\\u2029y\\\\u2029>>\\\\u2029z\\\\u2029\"); x === 2. Actual: ' + (x));\n}\n",
+ "id": "S7.3_A7_T6"
+ },
+ {
+ "section": "7.3",
+ "description": "Insert Line Terminator in var x=y<<z",
+ "test": "// CHECK#1\nvar y=2;\nvar z=3;\nvar\nx\n=\ny\n<<\nz\n;\nif (x !== 16) {\n $ERROR('#1: var\\\\nx\\\\n=\\\\ny\\\\n<<\\\\nz\\\\n; x === 16. Actual: ' + (x));\n}\nx=0;\n\n// CHECK#2\nvar y=2;\nvar z=3;\nvar\nx\n=\ny\n<<\nz\n;\nif (x !== 16) {\n $ERROR('#2: var\\\\nx\\\\n=\\\\ny\\\\n<<\\\\nz\\\\n; x ===16 ');\n}\nx=0;\n\n// CHECK#3\nvar y=2;\nvar z=3;\neval(\"\\u2028var\\u2028x\\u2028=\\u2028y\\u2028<<\\u2028z\\u2028\");\nif (x !== 16) {\n $ERROR('#3: eval(\"\\\\u2028var\\\\u2028x\\\\u2028=\\\\u2028y\\\\u2028<<\\\\u2028z\\\\u2028\"); x === 16. Actual: ' + (x));\n}\nx=0;\n\n// CHECK#4\nvar y=2;\nvar z=3;\neval(\"\\u2029var\\u2029x\\u2029=\\u2029y\\u2029<<\\u2029z\\u2029\");\nif (x !== 16) {\n $ERROR('#4: eval(\"\\\\u2029var\\\\u2029x\\\\u2029=\\\\u2029y\\\\u2029<<\\\\u2029z\\\\u2029\"); x === 16. Actual: ' + (x));\n}\n",
+ "id": "S7.3_A7_T7"
+ },
+ {
+ "section": "7.3",
+ "description": "Insert Line Terminator in var x=y<z",
+ "test": "// CHECK#1\nvar y=2;\nvar z=3;\nvar\nx\n=\ny\n<\nz\n;\nif (x !== true) {\n $ERROR('#1: var\\\\nx\\\\n=\\\\ny\\\\n<\\\\nz\\\\n; x === true. Actual: ' + (x));\n}\nx=0;\n\n// CHECK#2\nvar y=2;\nvar z=3;\nvar\nx\n=\ny\n<\nz\n;\nif (x !== true) {\n $ERROR('#2: var\\\\nx\\\\n=\\\\ny\\\\n<\\\\nz\\\\n; x === true. Actual: ' + (x));\n}\nx=0;\n\n// CHECK#3\nvar y=2;\nvar z=3;\neval(\"\\u2028var\\u2028x\\u2028=\\u2028y\\u2028<\\u2028z\\u2028\");\nif (x !== true) {\n $ERROR('#3: eval(\"\\\\u2028var\\\\u2028x\\\\u2028=\\\\u2028y\\\\u2028<\\\\u2028z\\\\u2028\"); x === true. Actual: ' + (x));\n}\nx=0;\n\n// CHECK#4\nvar y=2;\nvar z=3;\neval(\"\\u2029var\\u2029x\\u2029=\\u2029y\\u2029<\\u2029z\\u2029\");\nif (x !== true) {\n $ERROR('#4: eval(\"\\\\u2029var\\\\u2029x\\\\u2029=\\\\u2029y\\\\u2029<\\\\u2029z\\\\u2029\"); x === true. Actual: ' + (x));\n}\n",
+ "id": "S7.3_A7_T8"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/7.4_Comments.json b/website/resources/scripts/testcases2/7.4_Comments.json
new file mode 100644
index 000000000..abe93412d
--- /dev/null
+++ b/website/resources/scripts/testcases2/7.4_Comments.json
@@ -0,0 +1,96 @@
+{
+ "testCollection": {
+ "name": "7.4_Comments",
+ "numTests": 14,
+ "tests": [
+ {
+ "section": "7.4",
+ "description": "Create comments with any code",
+ "test": "//CHECK#1\n// $ERROR('#1: Correct interpretation single line comments');\n\n//CHECK#2\nvar x = 0;\n// x = 1;\nif (x !== 0) {\n $ERROR('#2: var x = 0; // x = 1; x === 0. Actual: ' + (x));\n}\n\n//CHECK#3\nvar // y = 1; \ny;\nif (y !== undefined) {\n $ERROR('#3: var // y = 1; \\\\n y; y === undefined. Actual: ' + (y));\n} \n\n//CHECK#4\n//$ERROR('#4: Correct interpretation single line comments') //$ERROR('#4: Correct interpretation single line comments'); //\n\n////CHECK#5\n//var x = 1;\n//if (x === 1) {\n// $ERROR('#5: Correct interpretation single line comments');\n//}\n\n//CHECK#6\n//var this.y = 1; \nthis.y++;\nif (isNaN(y) !== true) {\n $ERROR('#6: //var this.y = 1; \\\\n this.y++; y === Not-a-Number. Actual: ' + (y));\n}\n\n",
+ "id": "S7.4_A1_T1"
+ },
+ {
+ "section": "7.4",
+ "description": "Simple test, create empty comment: ///",
+ "test": "//CHECK#1\n///\n",
+ "id": "S7.4_A1_T2"
+ },
+ {
+ "section": "7.4",
+ "description": "Create comments with any code",
+ "test": "/*CHECK#1*/\n/* $ERROR('#1: Correct interpretation multi line comments');\n*/\n\n/*CHECK#2*/\nvar x = 0;\n/* x = 1;*/\nif (x !== 0) {\n $ERROR('#2: var x = 0; /* x = 1;*/ x === 0. Actual: ' + (x));\n}\n\n//CHECK#3\nvar /* y = 1;*/ \ny;\nif (y !== undefined) {\n $ERROR('#3: var /* y = 1; */ \\\\n y; y === undefined. Actual: ' + (y));\n} \n\n//CHECK#4\nvar /* y = 1;*/ y;\nif (y !== undefined) {\n $ERROR('#4: var /* y = 1; */ y; y === undefined. Actual: ' + (y));\n} \n\n/*CHECK#5*/\n/*var x = 1;\nif (x === 1) {\n $ERROR('#5: Correct interpretation multi line comments');\n}\n*/\n\n/*CHECK#6*/\n/*var this.y = 1;*/ \nthis.y++;\nif (isNaN(y) !== true) {\n $ERROR('#6: /*var this.y = 1;*/ \\\\n this.y++; y === Not-a-Number. Actual: ' + (y));\n}\n\n//CHECK#7\nvar string = \"/*var y = 0*/\" /* y = 1;*/ \nif (string !== \"/*var y = 0*/\") {\n$ERROR('#7: var string = \"/*var y = 0*/\" /* y = 1;*/ string === \"//var y = 0\"');\n}\n\n//CHECK#8\nvar string = \"/*var y = 0\" /* y = 1;*/ \nif (string !== \"/*var y = 0\") {\n$ERROR('#8: var string = \"/*var y = 0\" /* y = 1;*/ string === \"//var y = 0\"');\n}\n\n/*CHECK#9*/\n/** $ERROR('#9: Correct interpretation multi line comments');\n*/\n\n/*CHECK#10*/\n/* $ERROR('#10: Correct interpretation multi line comments');\n**/\n\n/*CHECK#11*/\n/****** $ERROR('#11: Correct interpretation multi line comments');*********\n***********\n*\n\n\n**********\n**/\n\n",
+ "id": "S7.4_A2_T1"
+ },
+ {
+ "section": "7.4",
+ "description": "Try use /*CHECK#1/. This is not closed multi line comment",
+ "negative": "",
+ "test": "/*CHECK#1/\n",
+ "id": "S7.4_A2_T2"
+ },
+ {
+ "section": "7.4",
+ "description": "Try use nested comments",
+ "negative": "",
+ "test": "/*CHECK#1*/\n\n/* \nvar\n\n/* x */\n= 1;\n*/\n",
+ "id": "S7.4_A3"
+ },
+ {
+ "section": "7.4",
+ "description": "Try use 2 close comment tags",
+ "negative": "",
+ "test": "/*CHECK#1*/\n\n/* var*/\nx*/\n",
+ "id": "S7.4_A4_T1"
+ },
+ {
+ "section": "7.4",
+ "description": "Fist Multi line comment, then Single line comment",
+ "test": "/*CHECK#1*/\n\n/* var\n*///x*/\n",
+ "id": "S7.4_A4_T2"
+ },
+ {
+ "section": "7.4",
+ "description": "Insert Single line comment into Multi line comment",
+ "test": "/*CHECK#1*/\n\n/* var\n//x\n*/\n",
+ "id": "S7.4_A4_T3"
+ },
+ {
+ "section": "7.4",
+ "description": "Try to open Multi line comment at the end of Single comment",
+ "negative": "",
+ "test": "/*CHECK#1*/\n\n// var /* \nx*/\n",
+ "id": "S7.4_A4_T4"
+ },
+ {
+ "section": "7.4",
+ "description": "Insert Multi line comment into Single line comment",
+ "test": "/*CHECK#1*/\n\n// var /* x */\n",
+ "id": "S7.4_A4_T5"
+ },
+ {
+ "section": "7.4",
+ "description": "Insert Multi line comment with two closed tags into Single line comment",
+ "test": "/*CHECK#1*/\n\n// var /* x / = */ 1 */\n",
+ "id": "S7.4_A4_T6"
+ },
+ {
+ "section": "7.4",
+ "description": "Insert Multi line comment into Single line comments",
+ "test": "/*CHECK#1*/\n\n// var /* \n// x \n// =\n// 1*/\n",
+ "id": "S7.4_A4_T7"
+ },
+ {
+ "section": "7.4",
+ "description": "//var \" + xx + \"yy = -1\", insert instead of xx all Unicode characters",
+ "test": "//CHECK\nerrorCount = 0;\ncount = 0;\nvar hex = [\"0\", \"1\", \"2\", \"3\", \"4\", \"5\", \"6\", \"7\", \"8\", \"9\", \"A\", \"B\", \"C\", \"D\", \"E\", \"F\"];\nfor (i1 = 0; i1 < 16; i1++) {\n for (i2 = 0; i2 < 16; i2++) {\n for (i3 = 0; i3 < 16; i3++) {\n for (i4 = 0; i4 < 16; i4++) {\n try { \n var uu = hex[i1] + hex[i2] + hex[i3] + hex[i4];\n var xx = String.fromCharCode(\"0x\" + uu);\n var LineTerminators = ((uu === \"000A\") || (uu === \"000D\") || (uu === \"2028\") || (uu === \"2029\"));\n var yy = 0; \n eval(\"//var \" + xx + \"yy = -1\"); \n if (LineTerminators !== true) { \n if (yy !== 0) {\n $ERROR('#' + uu + ' ');\n errorCount++;\n }\n } else {\n if (yy !== -1) {\n $ERROR('#' + uu + ' ');\n errorCount++;\n }\n }\n } catch (e){\n $ERROR('#' + uu + ' ');\n errorCount++;\n }\n count++;\n } \n }\n }\n}\n\nif (errorCount > 0) { \n $ERROR('Total error: ' + errorCount + ' bad Unicode character in ' + count);\n}\n",
+ "id": "S7.4_A5"
+ },
+ {
+ "section": "7.4",
+ "description": "\"var\"+ yy+ \"xx = 1\", insert instead of yy all Unicode characters",
+ "test": "//CHECK\nerrorCount = 0;\ncount = 0;\nfor (indexI = 0; indexI <= 65535; indexI++) {\n try {\n var xx = 0; \n eval(\"/*var \" + String.fromCharCode(indexI) + \"xx = 1*/\");\n var hex = decimalToHexString(indexI);\n if (xx !== 0) {\n $ERROR('#' + hex + ' ');\n errorCount++;\n } \n } catch (e){\n $ERROR('#' + hex + ' ');\n errorCount++;\n }\n count++;\n} \n\nif (errorCount > 0) { \n $ERROR('Total error: ' + errorCount + ' bad Unicode character in ' + count);\n}\n\nfunction decimalToHexString(n) {\n n = Number(n);\n var h = \"\";\n for (var i = 3; i >= 0; i--) {\n if (n >= Math.pow(16, i)) {\n var t = Math.floor(n / Math.pow(16, i));\n n -= t * Math.pow(16, i);\n if ( t >= 10 ) {\n if ( t == 10 ) { h += \"A\"; }\n if ( t == 11 ) { h += \"B\"; }\n if ( t == 12 ) { h += \"C\"; }\n if ( t == 13 ) { h += \"D\"; }\n if ( t == 14 ) { h += \"E\"; }\n if ( t == 15 ) { h += \"F\"; }\n } else {\n h += String(t);\n }\n } else {\n h += \"0\";\n }\n }\n return h;\n}\n",
+ "id": "S7.4_A6"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/7.5.1_Reserved_Words.json b/website/resources/scripts/testcases2/7.5.1_Reserved_Words.json
new file mode 100644
index 000000000..426362c5d
--- /dev/null
+++ b/website/resources/scripts/testcases2/7.5.1_Reserved_Words.json
@@ -0,0 +1,35 @@
+{
+ "testCollection": {
+ "name": "7.5.1_Reserved_Words",
+ "numTests": 4,
+ "tests": [
+ {
+ "section": "7.5.1",
+ "description": "Checking if execution of \"null = 1\" fails",
+ "negative": "",
+ "test": "null = 1;\n",
+ "id": "S7.5.1_A1.1"
+ },
+ {
+ "section": "7.5.1",
+ "description": "Checking if execution of \"true=1\" fails",
+ "negative": "",
+ "test": "true = 1;\n",
+ "id": "S7.5.1_A1.2"
+ },
+ {
+ "section": "7.5.1",
+ "description": "Checking if execution of \"false=1\" fails",
+ "negative": "",
+ "test": "false = 1;\n",
+ "id": "S7.5.1_A1.3"
+ },
+ {
+ "section": "7.5.1",
+ "description": "Try assign 1 for not reserved words",
+ "test": "// a\nand = 1;\nand_eq = 1;\nas = 1;\nasm = 1; \nassert = 1;\nauto = 1;\n// b\nbase = 1;\nbitand = 1;\nbitor = 1;\nbool = 1;\nbyvalue = 1;\n// c\nchecked = 1;\nclone = 1;\ncomment = 1;\ncompl = 1;\nconst_cast = 1;\n// d\ndecimal = 1;\ndelegate = 1;\ndynamic_cast = 1;\n// e\nexplicit = 1;\nextern = 1;\nequals = 1;\nevent = 1;\n// f\nfinalize = 1;\nfixed = 1;\nfriend = 1;\nforeach = 1;\nfuture = 1;\n// g\ngetClass = 1;\ngeneric = 1;\n// h\nhashCode = 1;\n// i\nimplicit = 1;\ninfinity = 1;\ninline = 1;\ninner = 1;\ninternal = 1;\nis = 1;\n// j\n// k\n// l\nlock = 1;\n// m\nmutable = 1;\n// n\nNaN = 1;\nnamespace = 1;\nnot = 1;\nnotify = 1;\nnotifyAll = 1;\nnot_eq = 1;\n// o\nobject = 1;\noperator = 1;\nor = 1;\nor_eq = 1;\nout = 1;\nouter = 1;\noverride = 1;\n// p\nparams = 1;\n// q\n// r\nreadonly = 1;\nreinterpret_cast = 1;\nref = 1;\nregister = 1;\n\n// s\nsbyte = 1;\nsigned = 1;\nsizeof = 1;\nstackalloc = 1;\nstatic_cast = 1;\nstring = 1;\nstrictfp = 1;\nstruct = 1;\n// t\ntemplate = 1;\ntoString = 1;\ntypedef = 1;\ntypeid = 1;\n// u\nuint = 1;\nunchecked = 1;\nundefiend = 1;\nunion = 1;\nunsafe = 1;\nunsigned = 1;\nuse = 1;\nusing = 1;\nushort = 1;\n// v\nvalueOf = 1;\nvirtual = 1;\n// w\nwait = 1;\nwchar_t = 1;\n// x\nxor = 1;\nxor_eq = 1;\n// y\n// z \n",
+ "id": "S7.5.1_A2"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/7.5.2_Keywords.json b/website/resources/scripts/testcases2/7.5.2_Keywords.json
new file mode 100644
index 000000000..42f6d7bd0
--- /dev/null
+++ b/website/resources/scripts/testcases2/7.5.2_Keywords.json
@@ -0,0 +1,183 @@
+{
+ "testCollection": {
+ "name": "7.5.2_Keywords",
+ "numTests": 25,
+ "tests": [
+ {
+ "section": "7.5.2",
+ "description": "Checking if execution of \"break=1\" fails",
+ "negative": "",
+ "test": "break = 1;\n",
+ "id": "S7.5.2_A1.1"
+ },
+ {
+ "section": "7.5.2",
+ "description": "Checking if execution of \"for=1\" fails",
+ "negative": "",
+ "test": "for = 1;\n",
+ "id": "S7.5.2_A1.10"
+ },
+ {
+ "section": "7.5.2",
+ "description": "Checking if execution of \"function=1\" fails",
+ "negative": "",
+ "test": "function = 1;\n",
+ "id": "S7.5.2_A1.11"
+ },
+ {
+ "section": "7.5.2",
+ "description": "Checking if execution of \"if=1\" fails",
+ "negative": "",
+ "test": "if = 1;\n",
+ "id": "S7.5.2_A1.12"
+ },
+ {
+ "section": "7.5.2",
+ "description": "Checking if execution of \"in=1\" fails",
+ "negative": "",
+ "test": "in = 1;\n",
+ "id": "S7.5.2_A1.13"
+ },
+ {
+ "section": "7.5.2",
+ "description": "Checking if execution of \"instanceof=1\" fails",
+ "negative": "",
+ "test": "instanceof = 1;\n",
+ "id": "S7.5.2_A1.14"
+ },
+ {
+ "section": "7.5.2",
+ "description": "Checking if execution of \"new=1\" fails",
+ "negative": "",
+ "test": "new = 1;\n",
+ "id": "S7.5.2_A1.15"
+ },
+ {
+ "section": "7.5.2",
+ "description": "Checking if execution of \"return=1\" fails",
+ "negative": "",
+ "test": "return = 1;\n",
+ "id": "S7.5.2_A1.16"
+ },
+ {
+ "section": "7.5.2",
+ "description": "Checking if execution of \"switch=1\" fails",
+ "negative": "",
+ "test": "switch = 1;\n",
+ "id": "S7.5.2_A1.17"
+ },
+ {
+ "section": "7.5.2",
+ "description": "Checking if execution of \"this=1\" fails",
+ "negative": "",
+ "test": "this = 1;\n",
+ "id": "S7.5.2_A1.18"
+ },
+ {
+ "section": "7.5.2",
+ "description": "Checking if execution of \"throw=1\" fails",
+ "negative": "",
+ "test": "throw = 1;\n",
+ "id": "S7.5.2_A1.19"
+ },
+ {
+ "section": "7.5.2",
+ "description": "Checking if execution of \"case=1\" fails",
+ "negative": "",
+ "test": "case = 1;\n",
+ "id": "S7.5.2_A1.2"
+ },
+ {
+ "section": "7.5.2",
+ "description": "Checking if execution of \"try=1\" fails",
+ "negative": "",
+ "test": "try = 1;\n",
+ "id": "S7.5.2_A1.20"
+ },
+ {
+ "section": "7.5.2",
+ "description": "Checking if execution of \"typeof=1\" fails",
+ "negative": "",
+ "test": "typeof = 1;\n",
+ "id": "S7.5.2_A1.21"
+ },
+ {
+ "section": "7.5.2",
+ "description": "Checking if execution of \"var=1\" fails",
+ "negative": "",
+ "test": "var = 1;\n",
+ "id": "S7.5.2_A1.22"
+ },
+ {
+ "section": "7.5.2",
+ "description": "Checking if execution of \"void=1\" fails",
+ "negative": "",
+ "test": "void = 1;\n",
+ "id": "S7.5.2_A1.23"
+ },
+ {
+ "section": "7.5.2",
+ "description": "Checking if execution of \"while=1\" fails",
+ "negative": "",
+ "test": "while = 1;\n",
+ "id": "S7.5.2_A1.24"
+ },
+ {
+ "section": "7.5.2",
+ "description": "Checking if execution of \"with=1\" fails",
+ "negative": "",
+ "test": "with = 1;\n",
+ "id": "S7.5.2_A1.25"
+ },
+ {
+ "section": "7.5.2",
+ "description": "Checking if execution of \"catch=1\" fails",
+ "negative": "",
+ "test": "catch = 1;\n",
+ "id": "S7.5.2_A1.3"
+ },
+ {
+ "section": "7.5.2",
+ "description": "Checking if execution of \"contunue=1\" fails",
+ "negative": "",
+ "test": "continue = 1;\n",
+ "id": "S7.5.2_A1.4"
+ },
+ {
+ "section": "7.5.2",
+ "description": "Checking if execution of \"default=1\" fails",
+ "negative": "",
+ "test": "default = 1;\n",
+ "id": "S7.5.2_A1.5"
+ },
+ {
+ "section": "7.5.2",
+ "description": "Checking if execution of \"delete=1\" fails",
+ "negative": "",
+ "test": "delete = 1;\n",
+ "id": "S7.5.2_A1.6"
+ },
+ {
+ "section": "7.5.2",
+ "description": "Checking if execution of \"do=1\" fails",
+ "negative": "",
+ "test": "do = 1;\n",
+ "id": "S7.5.2_A1.7"
+ },
+ {
+ "section": "7.5.2",
+ "description": "Checking if execution of \"else=1\" fails",
+ "negative": "",
+ "test": "else = 1;\n",
+ "id": "S7.5.2_A1.8"
+ },
+ {
+ "section": "7.5.2",
+ "description": "Checking if execution of \"finally=1\" fails",
+ "negative": "",
+ "test": "finally = 1;\n",
+ "id": "S7.5.2_A1.9"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/7.5.3_Future_Reserved_Words.json b/website/resources/scripts/testcases2/7.5.3_Future_Reserved_Words.json
new file mode 100644
index 000000000..3a6948980
--- /dev/null
+++ b/website/resources/scripts/testcases2/7.5.3_Future_Reserved_Words.json
@@ -0,0 +1,251 @@
+{
+ "testCollection": {
+ "name": "7.5.3_Future_Reserved_Words",
+ "numTests": 38,
+ "tests": [
+ {
+ "section": "7.5.3",
+ "description": "Checking if execution of \"abstract=1\" succeeds",
+ "test": "abstract = 1;\n",
+ "id": "S7.5.3_A1.1"
+ },
+ {
+ "section": "7.5.3",
+ "description": "Checking if execution of \"export=1\" fails",
+ "negative": "",
+ "test": "export = 1;\n",
+ "id": "S7.5.3_A1.10"
+ },
+ {
+ "section": "7.5.3",
+ "description": "Checking if execution of \"extends=1\" fails",
+ "negative": "",
+ "test": "extends = 1;\n",
+ "id": "S7.5.3_A1.11"
+ },
+ {
+ "section": "7.5.3",
+ "description": "Checking if execution of \"final=1\" succeeds",
+ "test": "final = 1;\n",
+ "id": "S7.5.3_A1.12"
+ },
+ {
+ "section": "7.5.3",
+ "description": "Checking if execution of \"float=1\" succeeds",
+ "test": "float = 1;\n",
+ "id": "S7.5.3_A1.13"
+ },
+ {
+ "section": "7.5.3",
+ "description": "Checking if execution of \"goto=1\" succeeds",
+ "test": "goto = 1;\n",
+ "id": "S7.5.3_A1.14"
+ },
+ {
+ "section": "7.5.3",
+ "description": "Checking if execution of \"implements=1\" fails in strict code",
+ "negative": "",
+ "test": "\"use strict\";\nimplements = 1;",
+ "id": "S7.5.3_A1.15"
+ },
+ {
+ "section": "7.5.3",
+ "description": "Checking if execution of \"implements=1\" succeeds in non-strict code",
+ "test": "new Function('implements = 1');",
+ "id": "S7.5.3_A1.15"
+ },
+ {
+ "section": "7.5.3",
+ "description": "Checking if execution of \"import=1\" fails",
+ "negative": "",
+ "test": "import = 1;\n",
+ "id": "S7.5.3_A1.16"
+ },
+ {
+ "section": "7.5.3",
+ "description": "Checking if execution of \"int=1\" succeeds",
+ "test": "int = 1;\n",
+ "id": "S7.5.3_A1.17"
+ },
+ {
+ "section": "7.5.3",
+ "description": "Checking if execution of \"interface = 1\" fails in\n strict code",
+ "negative": "",
+ "test": "\"use strict\";\ninterface = 1;\n",
+ "id": "S7.5.3_A1.18"
+ },
+ {
+ "section": "7.5.3",
+ "description": "Checking if execution of \"interface = 1\" succeeds in strict code",
+ "test": "new Function('interface = 1');\n",
+ "id": "S7.5.3_A1.18"
+ },
+ {
+ "section": "7.5.3",
+ "description": "Checking if execution of \"long=1\" succeeds",
+ "test": "long = 1;\n",
+ "id": "S7.5.3_A1.19"
+ },
+ {
+ "section": "7.5.3",
+ "description": "Checking if execution of \"boolean=1\" succeeds",
+ "test": "boolean = 1;\n",
+ "id": "S7.5.3_A1.2"
+ },
+ {
+ "section": "7.5.3",
+ "description": "Checking if execution of \"native=1\" succeeds",
+ "test": "native = 1;\n",
+ "id": "S7.5.3_A1.20"
+ },
+ {
+ "section": "7.5.3",
+ "description": "Checking if execution of \"package=1\" fails in strict code",
+ "negative": "",
+ "test": "\"use strict\";\npackage = 1;\n",
+ "id": "S7.5.3_A1.21"
+ },
+ {
+ "section": "7.5.3",
+ "description": "Checking if execution of \"package=1\" succeeds in non-strict code",
+ "test": "new Function('package = 1');\n",
+ "id": "S7.5.3_A1.21"
+ },
+ {
+ "section": "7.5.3",
+ "description": "Checking if execution of \"private=1\" fails in strict code",
+ "negative": "",
+ "test": "\"use strict\";\nprivate = 1;\n",
+ "id": "S7.5.3_A1.22"
+ },
+ {
+ "section": "7.5.3",
+ "description": "Checking if execution of \"private=1\" succeeds in non-strict code",
+ "test": "new Function('private = 1');\n",
+ "id": "S7.5.3_A1.22"
+ },
+ {
+ "section": "7.5.3",
+ "description": "Checking if execution of \"protected=1\" fails in\nstrict code",
+ "negative": "",
+ "test": "\"use strict\";\nprotected = 1;\n",
+ "id": "S7.5.3_A1.23"
+ },
+ {
+ "section": "7.5.3",
+ "description": "Checking if execution of \"protected=1\" succeeds in non-strict code",
+ "test": "new Function('protected = 1');\n",
+ "id": "S7.5.3_A1.23"
+ },
+ {
+ "section": "7.5.3",
+ "description": "Checking if execution of \"public=1\" fails in strict code",
+ "negative": "",
+ "test": "\"use strict\";\npublic = 1;\n",
+ "id": "S7.5.3_A1.24"
+ },
+ {
+ "section": "7.5.3",
+ "description": "Checking if execution of \"public=1\" succeeds in non-strict code",
+ "test": "new Function('public = 1');\n",
+ "id": "S7.5.3_A1.24"
+ },
+ {
+ "section": "7.5.3",
+ "description": "Checking if execution of \"short=1\" succeeds",
+ "test": "short = 1;\n",
+ "id": "S7.5.3_A1.25"
+ },
+ {
+ "section": "7.5.3",
+ "description": "Checking if execution of \"static=1\" fails in strict code",
+ "negative": "",
+ "test": "\"use strict\";\nstatic = 1;\n",
+ "id": "S7.5.3_A1.26"
+ },
+ {
+ "section": "7.5.3",
+ "description": "Checking if execution of \"static=1\" succeeds in non-strict code",
+ "test": "new Function('static = 1');\n",
+ "id": "S7.5.3_A1.26"
+ },
+ {
+ "section": "7.5.3",
+ "description": "Checking if execution of \"super=1\" fails",
+ "negative": "",
+ "test": "super = 1;\n",
+ "id": "S7.5.3_A1.27"
+ },
+ {
+ "section": "7.5.3",
+ "description": "Checking if execution of \"synchronized=1\" succeeds",
+ "test": "synchronized = 1;\n",
+ "id": "S7.5.3_A1.28"
+ },
+ {
+ "section": "7.5.3",
+ "description": "Checking if execution of \"throws=1\" succeeds",
+ "test": "throws = 1;\n",
+ "id": "S7.5.3_A1.29"
+ },
+ {
+ "section": "7.5.3",
+ "description": "Checking if execution of \"byte=1\" succeeds",
+ "test": "byte = 1;\n",
+ "id": "S7.5.3_A1.3"
+ },
+ {
+ "section": "7.5.3",
+ "description": "Checking if execution of \"transient=1\" succeeds",
+ "test": "transient = 1;\n",
+ "id": "S7.5.3_A1.30"
+ },
+ {
+ "section": "7.5.3",
+ "description": "Checking if execution of \"volatile=1\" succeeds",
+ "test": "volatile = 1;\n",
+ "id": "S7.5.3_A1.31"
+ },
+ {
+ "section": "7.5.3",
+ "description": "Checking if execution of \"char=1\" succeeds",
+ "test": "char = 1;\n",
+ "id": "S7.5.3_A1.4"
+ },
+ {
+ "section": "7.5.3",
+ "description": "Checking if execution of \"class=1\" fails",
+ "negative": "",
+ "test": "class = 1;\n",
+ "id": "S7.5.3_A1.5"
+ },
+ {
+ "section": "7.5.3",
+ "description": "Checking if execution of \"const=1\" fails",
+ "negative": "",
+ "test": "const = 1;\n",
+ "id": "S7.5.3_A1.6"
+ },
+ {
+ "section": "7.5.3",
+ "description": "Checking if execution of \"debugger=1\" fails",
+ "negative": "",
+ "test": "debugger = 1;\n",
+ "id": "S7.5.3_A1.7"
+ },
+ {
+ "section": "7.5.3",
+ "description": "Checking if execution of \"double=1\" succeeds",
+ "test": "double = 1;\n",
+ "id": "S7.5.3_A1.8"
+ },
+ {
+ "section": "7.5.3",
+ "description": "Checking if execution of \"enum=1\" fails",
+ "negative": "",
+ "test": "enum = 1;\n",
+ "id": "S7.5.3_A1.9"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/7.6.1.2.json b/website/resources/scripts/testcases2/7.6.1.2.json
new file mode 100644
index 000000000..a439a3932
--- /dev/null
+++ b/website/resources/scripts/testcases2/7.6.1.2.json
@@ -0,0 +1,66 @@
+{
+ "testCollection": {
+ "name": "7.6.1.2",
+ "numTests": 8,
+ "tests": [
+ {
+ "id": "7.6.1-17-s",
+ "path": "TestCases/chapter07/7.6/7.6.1/7.6.1.2/7.6.1-17-s.js",
+ "description": "7.6 - SyntaxError expected: reserved words used as Identifier Names in UTF8: implements (implements)",
+ "test": "assertTrue((function testcase() {\n \"use strict\";\n\n try {\n eval(\"var \\u0069mplements = 123;\");\n return false;\n } catch (e) {\n return e instanceof SyntaxError;\n }\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict())",
+ "strict_only": ""
+ },
+ {
+ "id": "7.6.1.2-1-s",
+ "path": "TestCases/chapter07/7.6/7.6.1/7.6.1.2/7.6.1.2-1-s.js",
+ "description": "Strict Mode - SyntaxError is thrown when FutureReservedWord 'implements' occurs in strict mode code",
+ "test": "assertTrue((function testcase() {\n \"use strict\";\n\n try {\n eval(\"var implements = 1;\");\n return false;\n } catch (e) {\n return e instanceof SyntaxError;\n }\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict())",
+ "strict_only": ""
+ },
+ {
+ "id": "7.6.1.2-10-s",
+ "path": "TestCases/chapter07/7.6/7.6.1/7.6.1.2/7.6.1.2-10-s.js",
+ "description": "Strict Mode - SyntaxError isn't thrown when 'IMPLEMENTS' occurs in strict mode code",
+ "test": "assertTrue((function testcase() {\n \"use strict\";\n var IMPLEMENTS = 1;\n return IMPLEMENTS === 1;\n }).call(this));\n",
+ "strict_only": ""
+ },
+ {
+ "id": "7.6.1.2-11-s",
+ "path": "TestCases/chapter07/7.6/7.6.1/7.6.1.2/7.6.1.2-11-s.js",
+ "description": "Strict Mode - SyntaxError isn't thrown when 'Implements' occurs in strict mode code",
+ "test": "assertTrue((function testcase() {\n \"use strict\";\n var Implements = 1;\n return Implements === 1;\n }).call(this));\n",
+ "strict_only": ""
+ },
+ {
+ "id": "7.6.1.2-12-s",
+ "path": "TestCases/chapter07/7.6/7.6.1/7.6.1.2/7.6.1.2-12-s.js",
+ "description": "Strict Mode - SyntaxError isn't thrown when 'implement' occurs in strict mode code",
+ "test": "assertTrue((function testcase() {\n \"use strict\";\n var implement = 1;\n return implement === 1;\n }).call(this));\n",
+ "strict_only": ""
+ },
+ {
+ "id": "7.6.1.2-13-s",
+ "path": "TestCases/chapter07/7.6/7.6.1/7.6.1.2/7.6.1.2-13-s.js",
+ "description": "Strict Mode - SyntaxError isn't thrown when 'implementss' occurs in strict mode code",
+ "test": "assertTrue((function testcase() {\n \"use strict\";\n var implementss = 1;\n return implementss === 1;\n }).call(this));\n",
+ "strict_only": ""
+ },
+ {
+ "id": "7.6.1.2-14-s",
+ "path": "TestCases/chapter07/7.6/7.6.1/7.6.1.2/7.6.1.2-14-s.js",
+ "description": "Strict Mode - SyntaxError isn't thrown when 'implements0' occurs in strict mode code",
+ "test": "assertTrue((function testcase() {\n \"use strict\";\n var implements0 = 1;\n return implements0 === 1;\n }).call(this));\n",
+ "strict_only": ""
+ },
+ {
+ "id": "7.6.1.2-16-s",
+ "path": "TestCases/chapter07/7.6/7.6.1/7.6.1.2/7.6.1.2-16-s.js",
+ "description": "Strict Mode - SyntaxError isn't thrown when '_implements' occurs in strict mode code",
+ "test": "assertTrue((function testcase() {\n \"use strict\";\n var _implements = 1;\n return _implements === 1;\n }).call(this));\n",
+ "strict_only": ""
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/7.6.1.json b/website/resources/scripts/testcases2/7.6.1.json
new file mode 100644
index 000000000..29aa5262d
--- /dev/null
+++ b/website/resources/scripts/testcases2/7.6.1.json
@@ -0,0 +1,777 @@
+{
+ "testCollection": {
+ "name": "7.6.1",
+ "numTests": 128,
+ "tests": [
+ {
+ "id": "7.6.1-1-1",
+ "path": "TestCases/chapter07/7.6/7.6.1/7.6.1-1-1.js",
+ "description": "Allow reserved words as property names at object initialization, verified with hasOwnProperty: null, true, false",
+ "test": "assertTrue((function testcase(){ \n var tokenCodes = { \n null: 0,\n true: 1,\n false: 2\n };\n var arr = [\n 'null',\n 'true',\n 'false'\n ]; \n for(var p in tokenCodes) {\n for(var p1 in arr) {\n if(arr[p1] === p) { \n if(!tokenCodes.hasOwnProperty(arr[p1])) {\n return false;\n };\n }\n }\n }\n return true;\n}).call(this));\n"
+ },
+ {
+ "id": "7.6.1-1-10",
+ "path": "TestCases/chapter07/7.6/7.6.1/7.6.1-1-10.js",
+ "description": "Allow reserved words as property names at object initialization, verified with hasOwnProperty: in, try, class",
+ "test": "assertTrue((function testcase(){ \n var tokenCodes = { \n in: 0, \n try: 1,\n class: 2\n };\n var arr = [\n 'in', \n 'try',\n 'class'\n ]; \n for(var p in tokenCodes) {\n for(var p1 in arr) {\n if(arr[p1] === p) { \n if(!tokenCodes.hasOwnProperty(arr[p1])) {\n return false;\n };\n }\n }\n }\n return true;\n}).call(this));\n"
+ },
+ {
+ "id": "7.6.1-1-11",
+ "path": "TestCases/chapter07/7.6/7.6.1/7.6.1-1-11.js",
+ "description": "Allow reserved words as property names at object initialization, verified with hasOwnProperty: enum, extends, super",
+ "test": "assertTrue((function testcase(){ \n var tokenCodes = { \n enum: 0,\n extends: 1,\n super: 2\n };\n var arr = [\n 'enum',\n 'extends',\n 'super'\n ]; \n for(var p in tokenCodes) {\n for(var p1 in arr) {\n if(arr[p1] === p) { \n if(!tokenCodes.hasOwnProperty(arr[p1])) {\n return false;\n };\n }\n }\n }\n return true;\n}).call(this));\n"
+ },
+ {
+ "id": "7.6.1-1-12",
+ "path": "TestCases/chapter07/7.6/7.6.1/7.6.1-1-12.js",
+ "description": "Allow reserved words as property names at object initialization, verified with hasOwnProperty: const, export, import",
+ "test": "assertTrue((function testcase(){ \n var tokenCodes = { \n const: 0,\n export: 1,\n import: 2\n };\n var arr = [\n 'const',\n 'export',\n 'import'\n ]; \n for(var p in tokenCodes) {\n for(var p1 in arr) {\n if(arr[p1] === p) { \n if(!tokenCodes.hasOwnProperty(arr[p1])) {\n return false;\n };\n }\n }\n }\n return true;\n}).call(this));\n"
+ },
+ {
+ "id": "7.6.1-1-13",
+ "path": "TestCases/chapter07/7.6/7.6.1/7.6.1-1-13.js",
+ "description": "Allow reserved words as property names at object initialization, verified with hasOwnProperty: implements, let, private",
+ "test": "assertTrue((function testcase(){ \n var tokenCodes = { \n implements: 0,\n let: 1,\n private: 2\n };\n var arr = [\n 'implements',\n 'let',\n 'private'\n ]; \n for(var p in tokenCodes) {\n for(var p1 in arr) {\n if(arr[p1] === p) { \n if(!tokenCodes.hasOwnProperty(arr[p1])) {\n return false;\n };\n }\n }\n }\n return true;\n}).call(this));\n"
+ },
+ {
+ "id": "7.6.1-1-14",
+ "path": "TestCases/chapter07/7.6/7.6.1/7.6.1-1-14.js",
+ "description": "Allow reserved words as property names at object initialization, verified with hasOwnProperty: public, yield, interface",
+ "test": "assertTrue((function testcase(){ \n var tokenCodes = { \n public: 0,\n yield: 1,\n interface: 2\n };\n var arr = [\n 'public',\n 'yield',\n 'interface'\n ]; \n for(var p in tokenCodes) {\n for(var p1 in arr) {\n if(arr[p1] === p) { \n if(!tokenCodes.hasOwnProperty(arr[p1])) {\n return false;\n };\n }\n }\n }\n return true;\n}).call(this));\n"
+ },
+ {
+ "id": "7.6.1-1-15",
+ "path": "TestCases/chapter07/7.6/7.6.1/7.6.1-1-15.js",
+ "description": "Allow reserved words as property names at object initialization, verified with hasOwnProperty: package, protected, static",
+ "test": "assertTrue((function testcase(){ \n var tokenCodes = { \n package: 0,\n protected: 1,\n static: 2\n };\n var arr = [\n 'package',\n 'protected',\n 'static'\n ]; \n for(var p in tokenCodes) {\n for(var p1 in arr) {\n if(arr[p1] === p) { \n if(!tokenCodes.hasOwnProperty(arr[p1])) {\n return false;\n };\n }\n }\n }\n return true;\n}).call(this));\n"
+ },
+ {
+ "id": "7.6.1-1-16",
+ "path": "TestCases/chapter07/7.6/7.6.1/7.6.1-1-16.js",
+ "description": "Allow reserved words as property names at object initialization, verified with hasOwnProperty: undeefined, NaN, Infinity",
+ "test": "assertTrue((function testcase(){ \n var tokenCodes = { \n undefined: 0,\n NaN: 1,\n Infinity: 2\n };\n var arr = [\n 'undefined',\n 'NaN',\n 'Infinity'\n ]; \n for(var p in tokenCodes) {\n for(var p1 in arr) {\n if(arr[p1] === p) { \n if(!tokenCodes.hasOwnProperty(arr[p1])) {\n return false;\n };\n }\n }\n }\n return true;\n}).call(this));\n"
+ },
+ {
+ "id": "7.6.1-1-2",
+ "path": "TestCases/chapter07/7.6/7.6.1/7.6.1-1-2.js",
+ "description": "Allow reserved words as property names at object initialization, verified with hasOwnProperty: break, case, do",
+ "test": "assertTrue((function testcase(){ \n var tokenCodes = { \n break: 0,\n case: 1,\n do: 2\n };\n var arr = [\n 'break',\n 'case',\n 'do'\n ]; \n for(var p in tokenCodes) {\n for(var p1 in arr) {\n if(arr[p1] === p) { \n if(!tokenCodes.hasOwnProperty(arr[p1])) {\n return false;\n };\n }\n }\n }\n return true;\n}).call(this));\n"
+ },
+ {
+ "id": "7.6.1-1-3",
+ "path": "TestCases/chapter07/7.6/7.6.1/7.6.1-1-3.js",
+ "description": "Allow reserved words as property names at object initialization, verified with hasOwnProperty: instanceof, typeof, else",
+ "test": "assertTrue((function testcase(){ \n var tokenCodes = { \n instanceof: 0,\n typeof: 1,\n else: 2\n };\n var arr = [\n 'instanceof',\n 'typeof',\n 'else'\n ]; \n for(var p in tokenCodes) {\n for(var p1 in arr) {\n if(arr[p1] === p) { \n if(!tokenCodes.hasOwnProperty(arr[p1])) {\n return false;\n };\n }\n }\n }\n return true;\n}).call(this));\n"
+ },
+ {
+ "id": "7.6.1-1-4",
+ "path": "TestCases/chapter07/7.6/7.6.1/7.6.1-1-4.js",
+ "description": "Allow reserved words as property names at object initialization, verified with hasOwnProperty: new, var, catch",
+ "test": "assertTrue((function testcase(){ \n var tokenCodes = { \n new: 0,\n var: 1,\n catch: 2\n };\n var arr = [\n 'new', \n 'var', \n 'catch'\n ]; \n for(var p in tokenCodes) {\n for(var p1 in arr) {\n if(arr[p1] === p) { \n if(!tokenCodes.hasOwnProperty(arr[p1])) {\n return false;\n };\n }\n }\n }\n return true;\n}).call(this));\n"
+ },
+ {
+ "id": "7.6.1-1-5",
+ "path": "TestCases/chapter07/7.6/7.6.1/7.6.1-1-5.js",
+ "description": "Allow reserved words as property names at object initialization, verified with hasOwnProperty: finally, return, void",
+ "test": "assertTrue((function testcase(){ \n var tokenCodes = { \n finally: 0,\n return: 1,\n void: 2\n };\n var arr = [ \n 'finally', \n 'return', \n 'void'\n ]; \n for(var p in tokenCodes) {\n for(var p1 in arr) {\n if(arr[p1] === p) { \n if(!tokenCodes.hasOwnProperty(arr[p1])) {\n return false;\n };\n }\n }\n }\n return true;\n}).call(this));\n"
+ },
+ {
+ "id": "7.6.1-1-6",
+ "path": "TestCases/chapter07/7.6/7.6.1/7.6.1-1-6.js",
+ "description": "Allow reserved words as property names at object initialization, verified with hasOwnProperty: continue, for, switch",
+ "test": "assertTrue((function testcase(){ \n var tokenCodes = { \n continue: 0, \n for: 1, \n switch: 2\n };\n var arr = [\n 'continue', \n 'for',\n 'switch'\n ]; \n for(var p in tokenCodes) {\n for(var p1 in arr) {\n if(arr[p1] === p) { \n if(!tokenCodes.hasOwnProperty(arr[p1])) {\n return false;\n };\n }\n }\n }\n return true;\n}).call(this));\n"
+ },
+ {
+ "id": "7.6.1-1-7",
+ "path": "TestCases/chapter07/7.6/7.6.1/7.6.1-1-7.js",
+ "description": "Allow reserved words as property names at object initialization, verified with hasOwnProperty: while, debugger, function",
+ "test": "assertTrue((function testcase(){ \n var tokenCodes = { \n while: 0, \n debugger: 1, \n function: 2\n };\n var arr = [ \n 'while' ,\n 'debugger', \n 'function'\n ]; \n for(var p in tokenCodes) {\n for(var p1 in arr) {\n if(arr[p1] === p) { \n if(!tokenCodes.hasOwnProperty(arr[p1])) {\n return false;\n };\n }\n }\n }\n return true;\n}).call(this));\n"
+ },
+ {
+ "id": "7.6.1-1-8",
+ "path": "TestCases/chapter07/7.6/7.6.1/7.6.1-1-8.js",
+ "description": "Allow reserved words as property names at object initialization, verified with hasOwnProperty: this, with, default",
+ "test": "assertTrue((function testcase(){\n var tokenCodes = { \n this: 0, \n with: 1, \n default: 2\n };\n var arr = [ \n 'this', \n 'with', \n 'default'\n ]; \n for(var p in tokenCodes) {\n for(var p1 in arr) {\n if(arr[p1] === p) { \n if(!tokenCodes.hasOwnProperty(arr[p1])) {\n return false;\n };\n }\n }\n }\n return true;\n}).call(this));\n"
+ },
+ {
+ "id": "7.6.1-1-9",
+ "path": "TestCases/chapter07/7.6/7.6.1/7.6.1-1-9.js",
+ "description": "Allow reserved words as property names at object initialization, verified with hasOwnProperty: if, throw, delete",
+ "test": "assertTrue((function testcase(){ \n var tokenCodes = { \n if: 0, \n throw: 1, \n delete: 2\n };\n var arr = [\n 'if', \n 'throw', \n 'delete'\n ]; \n for(var p in tokenCodes) {\n for(var p1 in arr) {\n if(arr[p1] === p) { \n if(!tokenCodes.hasOwnProperty(arr[p1])) {\n return false;\n };\n }\n }\n }\n return true;\n}).call(this));\n"
+ },
+ {
+ "id": "7.6.1-2-1",
+ "path": "TestCases/chapter07/7.6/7.6.1/7.6.1-2-1.js",
+ "description": "Allow reserved words as property names by dot operator assignment, verified with hasOwnProperty: null, true, false",
+ "test": "assertTrue((function testcase() {\n var tokenCodes = {};\n tokenCodes.null = 0;\n\t tokenCodes.true = 1;\n\t tokenCodes.false = 2;\n var arr = [\n 'null',\n 'true',\n 'false'\n ];\n for(var p in tokenCodes) { \n for(var p1 in arr) { \n if(arr[p1] === p) {\n if(!tokenCodes.hasOwnProperty(arr[p1])) {\n return false;\n };\n }\n }\n }\n return true;\n }).call(this));\n"
+ },
+ {
+ "id": "7.6.1-2-10",
+ "path": "TestCases/chapter07/7.6/7.6.1/7.6.1-2-10.js",
+ "description": "Allow reserved words as property names by dot operator assignment, verified with hasOwnProperty: in, try, class",
+ "test": "assertTrue((function testcase() {\n var tokenCodes = {};\n tokenCodes.in = 0;\n tokenCodes.try = 1;\n tokenCodes.class = 2;\n var arr = [\n 'in', \n 'try',\n 'class'\n ];\n for(var p in tokenCodes) { \n for(var p1 in arr) { \n if(arr[p1] === p) {\n if(!tokenCodes.hasOwnProperty(arr[p1])) {\n return false;\n };\n }\n }\n }\n return true;\n }).call(this));\n"
+ },
+ {
+ "id": "7.6.1-2-11",
+ "path": "TestCases/chapter07/7.6/7.6.1/7.6.1-2-11.js",
+ "description": "Allow reserved words as property names by dot operator assignment, verified with hasOwnProperty: enum, extends, super",
+ "test": "assertTrue((function testcase() {\n var tokenCodes = {};\n tokenCodes.enum = 0;\n tokenCodes.extends = 1;\n tokenCodes.super = 2;\n var arr = [\n 'enum',\n 'extends',\n 'super'\n ];\n for(var p in tokenCodes) { \n for(var p1 in arr) { \n if(arr[p1] === p) {\n if(!tokenCodes.hasOwnProperty(arr[p1])) {\n return false;\n };\n }\n }\n }\n return true;\n }).call(this));\n"
+ },
+ {
+ "id": "7.6.1-2-12",
+ "path": "TestCases/chapter07/7.6/7.6.1/7.6.1-2-12.js",
+ "description": "Allow reserved words as property names by dot operator assignment, verified with hasOwnProperty: const, export, import",
+ "test": "assertTrue((function testcase() {\n var tokenCodes = {};\n tokenCodes.const = 0;\n tokenCodes.export = 1;\n tokenCodes.import = 2;\n var arr = [\n 'const',\n 'export',\n 'import'\n ];\n for(var p in tokenCodes) { \n for(var p1 in arr) { \n if(arr[p1] === p) {\n if(!tokenCodes.hasOwnProperty(arr[p1])) {\n return false;\n };\n }\n }\n }\n return true;\n }).call(this));\n"
+ },
+ {
+ "id": "7.6.1-2-13",
+ "path": "TestCases/chapter07/7.6/7.6.1/7.6.1-2-13.js",
+ "description": "Allow reserved words as property names by dot operator assignment, verified with hasOwnProperty: implements, let, private",
+ "test": "assertTrue((function testcase() {\n var tokenCodes = {};\n tokenCodes.implements = 0;\n tokenCodes.let = 1;\n tokenCodes.private = 2;\n var arr = [\n 'implements',\n 'let',\n 'private'\n ];\n for(var p in tokenCodes) { \n for(var p1 in arr) { \n if(arr[p1] === p) {\n if(!tokenCodes.hasOwnProperty(arr[p1])) {\n return false;\n };\n }\n }\n }\n return true;\n }).call(this));\n"
+ },
+ {
+ "id": "7.6.1-2-14",
+ "path": "TestCases/chapter07/7.6/7.6.1/7.6.1-2-14.js",
+ "description": "Allow reserved words as property names by dot operator assignment, verified with hasOwnProperty: public, yield, interface",
+ "test": "assertTrue((function testcase() {\n var tokenCodes = {};\n tokenCodes.public = 0;\n tokenCodes.yield = 1;\n tokenCodes.interface = 2;\n var arr = [\n 'public',\n 'yield',\n 'interface'\n ];\n for(var p in tokenCodes) { \n for(var p1 in arr) { \n if(arr[p1] === p) {\n if(!tokenCodes.hasOwnProperty(arr[p1])) {\n return false;\n };\n }\n }\n }\n return true;\n }).call(this));\n"
+ },
+ {
+ "id": "7.6.1-2-15",
+ "path": "TestCases/chapter07/7.6/7.6.1/7.6.1-2-15.js",
+ "description": "Allow reserved words as property names by dot operator assignment, verified with hasOwnProperty: package, protected, static",
+ "test": "assertTrue((function testcase() {\n var tokenCodes = {};\n tokenCodes.package = 0;\n tokenCodes.protected = 1;\n tokenCodes.static = 2;\n var arr = [\n 'package',\n 'protected',\n 'static' \n ];\n for(var p in tokenCodes) { \n for(var p1 in arr) { \n if(arr[p1] === p) {\n if(!tokenCodes.hasOwnProperty(arr[p1])) {\n return false;\n };\n }\n }\n }\n return true;\n }).call(this));\n"
+ },
+ {
+ "id": "7.6.1-2-16",
+ "path": "TestCases/chapter07/7.6/7.6.1/7.6.1-2-16.js",
+ "description": "Allow reserved words as property names by dot operator assignment, verified with hasOwnProperty: undefined, NaN, Infinity",
+ "test": "assertTrue((function testcase() {\n var tokenCodes = {};\n tokenCodes.undefined = 0;\n tokenCodes.NaN = 1;\n tokenCodes.Infinity = 2;\n var arr = [\n 'undefined',\n 'NaN',\n 'Infinity'\n ];\n for(var p in tokenCodes) { \n for(var p1 in arr) { \n if(arr[p1] === p) {\n if(!tokenCodes.hasOwnProperty(arr[p1])) {\n return false;\n };\n }\n }\n }\n return true;\n }).call(this));\n"
+ },
+ {
+ "id": "7.6.1-2-2",
+ "path": "TestCases/chapter07/7.6/7.6.1/7.6.1-2-2.js",
+ "description": "Allow reserved words as property names by dot operator assignment, verified with hasOwnProperty: break, case, do",
+ "test": "assertTrue((function testcase() {\n var tokenCodes = {};\n tokenCodes.break = 0; \t\n tokenCodes.case = 1;\n tokenCodes.do = 2;\n var arr = [\n 'break',\n 'case',\n 'do'\n ];\n for(var p in tokenCodes) { \n for(var p1 in arr) { \n if(arr[p1] === p) {\n if(!tokenCodes.hasOwnProperty(arr[p1])) {\n return false;\n };\n }\n }\n }\n return true;\n }).call(this));\n"
+ },
+ {
+ "id": "7.6.1-2-3",
+ "path": "TestCases/chapter07/7.6/7.6.1/7.6.1-2-3.js",
+ "description": "Allow reserved words as property names by dot operator assignment, verified with hasOwnProperty: instanceof, typeof, else",
+ "test": "assertTrue((function testcase() {\n var tokenCodes = {};\n tokenCodes.instanceof = 0;\n tokenCodes.typeof = 1;\n tokenCodes.else = 2;\n var arr = [\n 'instanceof',\n 'typeof',\n 'else'\n ];\n for(var p in tokenCodes) { \n for(var p1 in arr) { \n if(arr[p1] === p) {\n if(!tokenCodes.hasOwnProperty(arr[p1])) {\n return false;\n };\n }\n }\n }\n return true;\n }).call(this));\n"
+ },
+ {
+ "id": "7.6.1-2-4",
+ "path": "TestCases/chapter07/7.6/7.6.1/7.6.1-2-4.js",
+ "description": "Allow reserved words as property names by dot operator assignment, verified with hasOwnProperty: new, var, catch",
+ "test": "assertTrue((function testcase() {\n var tokenCodes = {};\n tokenCodes.new = 0;\n tokenCodes.var = 1;\n tokenCodes.catch = 2;\n var arr = [\n 'new', \n 'var', \n 'catch'\n ];\n for(var p in tokenCodes) { \n for(var p1 in arr) { \n if(arr[p1] === p) {\n if(!tokenCodes.hasOwnProperty(arr[p1])) {\n return false;\n };\n }\n }\n }\n return true;\n }).call(this));\n"
+ },
+ {
+ "id": "7.6.1-2-5",
+ "path": "TestCases/chapter07/7.6/7.6.1/7.6.1-2-5.js",
+ "description": "Allow reserved words as property names by dot operator assignment, verified with hasOwnProperty: finally, return, void",
+ "test": "assertTrue((function testcase() {\n var tokenCodes = {};\n tokenCodes.finally = 0;\n tokenCodes.return = 1;\n tokenCodes.void = 2;\n var arr = [\n 'finally', \n 'return', \n 'void'\n ];\n for(var p in tokenCodes) { \n for(var p1 in arr) { \n if(arr[p1] === p) {\n if(!tokenCodes.hasOwnProperty(arr[p1])) {\n return false;\n };\n }\n }\n }\n return true;\n }).call(this));\n"
+ },
+ {
+ "id": "7.6.1-2-6",
+ "path": "TestCases/chapter07/7.6/7.6.1/7.6.1-2-6.js",
+ "description": "Allow reserved words as property names by dot operator assignment, verified with hasOwnProperty: continue, for, switch",
+ "test": "assertTrue((function testcase() {\n var tokenCodes = {};\n tokenCodes.continue = 0;\n tokenCodes.for = 1; \n tokenCodes.switch = 2;\n var arr = [\n 'continue', \n 'for',\n 'switch'\n ];\n for(var p in tokenCodes) { \n for(var p1 in arr) { \n if(arr[p1] === p) {\n if(!tokenCodes.hasOwnProperty(arr[p1])) {\n return false;\n };\n }\n }\n }\n return true;\n }).call(this));\n"
+ },
+ {
+ "id": "7.6.1-2-7",
+ "path": "TestCases/chapter07/7.6/7.6.1/7.6.1-2-7.js",
+ "description": "Allow reserved words as property names by dot operator assignment, verified with hasOwnProperty: while, debugger, function",
+ "test": "assertTrue((function testcase() {\n var tokenCodes = {};\n tokenCodes.while = 0; \n tokenCodes.debugger = 1;\n tokenCodes.function = 2; \n var arr = [\n 'while' ,\n 'debugger', \n 'function'\n ];\n for(var p in tokenCodes) { \n for(var p1 in arr) { \n if(arr[p1] === p) {\n if(!tokenCodes.hasOwnProperty(arr[p1])) {\n return false;\n };\n }\n }\n }\n return true;\n }).call(this));\n"
+ },
+ {
+ "id": "7.6.1-2-8",
+ "path": "TestCases/chapter07/7.6/7.6.1/7.6.1-2-8.js",
+ "description": "Allow reserved words as property names by dot operator assignment, verified with hasOwnProperty: this, with, default",
+ "test": "assertTrue((function testcase() {\n var tokenCodes = {};\n tokenCodes.this = 0; \n tokenCodes.with = 1; \n tokenCodes.default = 2;\n var arr = [\n 'this', \n 'with', \n 'default'\n ];\n for(var p in tokenCodes) { \n for(var p1 in arr) { \n if(arr[p1] === p) {\n if(!tokenCodes.hasOwnProperty(arr[p1])) {\n return false;\n };\n }\n }\n }\n return true;\n }).call(this));\n"
+ },
+ {
+ "id": "7.6.1-2-9",
+ "path": "TestCases/chapter07/7.6/7.6.1/7.6.1-2-9.js",
+ "description": "Allow reserved words as property names by dot operator assignment, verified with hasOwnProperty: if, throw, delete",
+ "test": "assertTrue((function testcase() {\n var tokenCodes = {};\n tokenCodes.if = 0;\n tokenCodes.throw = 1;\n tokenCodes.delete = 2;\n var arr = [\n 'if', \n 'throw', \n 'delete'\n ];\n for(var p in tokenCodes) { \n for(var p1 in arr) { \n if(arr[p1] === p) {\n if(!tokenCodes.hasOwnProperty(arr[p1])) {\n return false;\n };\n }\n }\n }\n return true;\n }).call(this));\n"
+ },
+ {
+ "id": "7.6.1-3-1",
+ "path": "TestCases/chapter07/7.6/7.6.1/7.6.1-3-1.js",
+ "description": "Allow reserved words as property names by index assignment,verified with hasOwnProperty: null, true, false",
+ "test": "assertTrue((function testcase() {\n var tokenCodes = {};\n tokenCodes['null'] = 0;\n\t tokenCodes['true'] = 1;\n\t tokenCodes['false'] = 2;\n var arr = [\n 'null',\n 'true',\n 'false'\n ];\n for(var p in tokenCodes) { \n for(var p1 in arr) { \n if(arr[p1] === p) {\n if(!tokenCodes.hasOwnProperty(arr[p1])) {\n return false;\n };\n }\n }\n }\n return true;\n }).call(this));\n"
+ },
+ {
+ "id": "7.6.1-3-10",
+ "path": "TestCases/chapter07/7.6/7.6.1/7.6.1-3-10.js",
+ "description": "Allow reserved words as property names by index assignment,verified with hasOwnProperty: in, try, class",
+ "test": "assertTrue((function testcase() {\n var tokenCodes = {};\n tokenCodes['in'] = 0;\n tokenCodes['try'] = 1;\n tokenCodes['class'] = 2;\n var arr = [\n 'in',\n 'try',\n 'class'\n ];\n for(var p in tokenCodes) { \n for(var p1 in arr) { \n if(arr[p1] === p) {\n if(!tokenCodes.hasOwnProperty(arr[p1])) {\n return false;\n };\n }\n }\n }\n return true;\n }).call(this));\n"
+ },
+ {
+ "id": "7.6.1-3-11",
+ "path": "TestCases/chapter07/7.6/7.6.1/7.6.1-3-11.js",
+ "description": "Allow reserved words as property names by index assignment,verified with hasOwnProperty: enum, extends, super",
+ "test": "assertTrue((function testcase() {\n var tokenCodes = {};\n tokenCodes['enum'] = 0;\n tokenCodes['extends'] = 1;\n tokenCodes['super'] = 2;\n var arr = [\n 'enum',\n 'extends',\n 'super'\n ];\n for(var p in tokenCodes) { \n for(var p1 in arr) { \n if(arr[p1] === p) {\n if(!tokenCodes.hasOwnProperty(arr[p1])) {\n return false;\n };\n }\n }\n }\n return true;\n }).call(this));\n"
+ },
+ {
+ "id": "7.6.1-3-12",
+ "path": "TestCases/chapter07/7.6/7.6.1/7.6.1-3-12.js",
+ "description": "Allow reserved words as property names by index assignment,verified with hasOwnProperty: const, export, import",
+ "test": "assertTrue((function testcase() {\n var tokenCodes = {};\n tokenCodes['const'] = 0;\n tokenCodes['export'] = 1;\n tokenCodes['import'] = 2;\n var arr = [\n 'const',\n 'export',\n 'import'\n ];\n for(var p in tokenCodes) { \n for(var p1 in arr) { \n if(arr[p1] === p) {\n if(!tokenCodes.hasOwnProperty(arr[p1])) {\n return false;\n };\n }\n }\n }\n return true;\n }).call(this));\n"
+ },
+ {
+ "id": "7.6.1-3-13",
+ "path": "TestCases/chapter07/7.6/7.6.1/7.6.1-3-13.js",
+ "description": "Allow reserved words as property names by index assignment,verified with hasOwnProperty: implements, let, private",
+ "test": "assertTrue((function testcase() {\n var tokenCodes = {};\n tokenCodes['implements'] = 0;\n tokenCodes['let'] = 1;\n tokenCodes['private'] = 2;\n var arr = [\n 'implements',\n 'let',\n 'private'\n ];\n for(var p in tokenCodes) { \n for(var p1 in arr) { \n if(arr[p1] === p) {\n if(!tokenCodes.hasOwnProperty(arr[p1])) {\n return false;\n };\n }\n }\n }\n return true;\n }).call(this));\n"
+ },
+ {
+ "id": "7.6.1-3-14",
+ "path": "TestCases/chapter07/7.6/7.6.1/7.6.1-3-14.js",
+ "description": "Allow reserved words as property names by index assignment,verified with hasOwnProperty: public, yield, interface",
+ "test": "assertTrue((function testcase() {\n var tokenCodes = {};\n tokenCodes['public'] = 0;\n tokenCodes['yield'] = 1;\n tokenCodes['interface'] = 2;\n var arr = [\n 'public',\n 'yield',\n 'interface'\n ];\n for(var p in tokenCodes) { \n for(var p1 in arr) { \n if(arr[p1] === p) {\n if(!tokenCodes.hasOwnProperty(arr[p1])) {\n return false;\n };\n }\n }\n }\n return true;\n }).call(this));\n"
+ },
+ {
+ "id": "7.6.1-3-15",
+ "path": "TestCases/chapter07/7.6/7.6.1/7.6.1-3-15.js",
+ "description": "Allow reserved words as property names by index assignment,verified with hasOwnProperty: package, protected, static",
+ "test": "assertTrue((function testcase() {\n var tokenCodes = {};\n tokenCodes['package'] = 0;\n tokenCodes['protected'] = 1;\n tokenCodes['static'] = 2;\n var arr = [\n 'package',\n 'protected',\n 'static' \n ];\n for(var p in tokenCodes) { \n for(var p1 in arr) { \n if(arr[p1] === p) {\n if(!tokenCodes.hasOwnProperty(arr[p1])) {\n return false;\n };\n }\n }\n }\n return true;\n }).call(this));\n"
+ },
+ {
+ "id": "7.6.1-3-16",
+ "path": "TestCases/chapter07/7.6/7.6.1/7.6.1-3-16.js",
+ "description": "Allow reserved words as property names by index assignment,verified with hasOwnProperty: undefined, NaN, Infinity",
+ "test": "assertTrue((function testcase() {\n var tokenCodes = {};\n tokenCodes['undefined'] = 0;\n tokenCodes['NaN'] = 1;\n tokenCodes['Infinity'] = 2;\n var arr = [\n 'undefined',\n 'NaN',\n 'Infinity'\n ];\n for(var p in tokenCodes) { \n for(var p1 in arr) { \n if(arr[p1] === p) {\n if(!tokenCodes.hasOwnProperty(arr[p1])) {\n return false;\n };\n }\n }\n }\n return true;\n }).call(this));\n"
+ },
+ {
+ "id": "7.6.1-3-2",
+ "path": "TestCases/chapter07/7.6/7.6.1/7.6.1-3-2.js",
+ "description": "Allow reserved words as property names by index assignment,verified with hasOwnProperty: break, case, do",
+ "test": "assertTrue((function testcase() {\n var tokenCodes = {};\n tokenCodes['break'] = 0;\n tokenCodes['case'] = 1;\n tokenCodes['do'] = 2;\n var arr = [\n 'break',\n 'case',\n 'do'\n ];\n for(var p in tokenCodes) { \n for(var p1 in arr) { \n if(arr[p1] === p) {\n if(!tokenCodes.hasOwnProperty(arr[p1])) {\n return false;\n };\n }\n }\n }\n return true;\n }).call(this));\n"
+ },
+ {
+ "id": "7.6.1-3-3",
+ "path": "TestCases/chapter07/7.6/7.6.1/7.6.1-3-3.js",
+ "description": "Allow reserved words as property names by index assignment,verified with hasOwnProperty: instanceof, typeof, else",
+ "test": "assertTrue((function testcase() {\n var tokenCodes = {};\n tokenCodes['instanceof'] = 0;\n tokenCodes['typeof'] = 1;\n tokenCodes['else'] = 2;\n var arr = [\n 'instanceof',\n 'typeof',\n 'else'\n ];\n for(var p in tokenCodes) { \n for(var p1 in arr) { \n if(arr[p1] === p) {\n if(!tokenCodes.hasOwnProperty(arr[p1])) {\n return false;\n };\n }\n }\n }\n return true;\n }).call(this));\n"
+ },
+ {
+ "id": "7.6.1-3-4",
+ "path": "TestCases/chapter07/7.6/7.6.1/7.6.1-3-4.js",
+ "description": "Allow reserved words as property names by index assignment,verified with hasOwnProperty: new, var, catch",
+ "test": "assertTrue((function testcase() {\n var tokenCodes = {};\n tokenCodes['new'] = 0;\n tokenCodes['var'] = 1;\n tokenCodes['catch'] = 2;\n var arr = [\n 'new',\n 'var',\n 'catch'\n ];\n for(var p in tokenCodes) { \n for(var p1 in arr) { \n if(arr[p1] === p) {\n if(!tokenCodes.hasOwnProperty(arr[p1])) {\n return false;\n };\n }\n }\n }\n return true;\n }).call(this));\n"
+ },
+ {
+ "id": "7.6.1-3-5",
+ "path": "TestCases/chapter07/7.6/7.6.1/7.6.1-3-5.js",
+ "description": "Allow reserved words as property names by index assignment,verified with hasOwnProperty: finally, return, void",
+ "test": "assertTrue((function testcase() {\n var tokenCodes = {};\n tokenCodes['finally'] = 0;\n tokenCodes['return'] = 1;\n tokenCodes['void'] = 2;\n var arr = [\n 'finally',\n 'return',\n 'void'\n ];\n for(var p in tokenCodes) { \n for(var p1 in arr) { \n if(arr[p1] === p) {\n if(!tokenCodes.hasOwnProperty(arr[p1])) {\n return false;\n };\n }\n }\n }\n return true;\n }).call(this));\n"
+ },
+ {
+ "id": "7.6.1-3-6",
+ "path": "TestCases/chapter07/7.6/7.6.1/7.6.1-3-6.js",
+ "description": "Allow reserved words as property names by index assignment,verified with hasOwnProperty: continue, for, switch",
+ "test": "assertTrue((function testcase() {\n var tokenCodes = {};\n tokenCodes['continue'] = 0;\n tokenCodes['for'] = 1;\n tokenCodes['switch'] = 2;\n var arr = [\n 'continue',\n 'for',\n 'switch'\n ];\n for(var p in tokenCodes) { \n for(var p1 in arr) { \n if(arr[p1] === p) {\n if(!tokenCodes.hasOwnProperty(arr[p1])) {\n return false;\n };\n }\n }\n }\n return true;\n }).call(this));\n"
+ },
+ {
+ "id": "7.6.1-3-7",
+ "path": "TestCases/chapter07/7.6/7.6.1/7.6.1-3-7.js",
+ "description": "Allow reserved words as property names by index assignment,verified with hasOwnProperty: while, debugger, function",
+ "test": "assertTrue((function testcase() {\n var tokenCodes = {};\n tokenCodes['while'] = 0;\n tokenCodes['debugger'] = 1;\n tokenCodes['function'] = 2; \n var arr = [\n 'while',\n 'debugger',\n 'function'\n ];\n for(var p in tokenCodes) { \n for(var p1 in arr) { \n if(arr[p1] === p) {\n if(!tokenCodes.hasOwnProperty(arr[p1])) {\n return false;\n };\n }\n }\n }\n return true;\n }).call(this));\n"
+ },
+ {
+ "id": "7.6.1-3-8",
+ "path": "TestCases/chapter07/7.6/7.6.1/7.6.1-3-8.js",
+ "description": "Allow reserved words as property names by index assignment,verified with hasOwnProperty: this, with, default",
+ "test": "assertTrue((function testcase() {\n var tokenCodes = {};\n tokenCodes['this'] = 0;\n tokenCodes['with'] = 1;\n tokenCodes['default'] = 2;\n var arr = [\n 'this',\n 'with',\n 'default'\n ];\n for(var p in tokenCodes) { \n for(var p1 in arr) { \n if(arr[p1] === p) {\n if(!tokenCodes.hasOwnProperty(arr[p1])) {\n return false;\n };\n }\n }\n }\n return true;\n }).call(this));\n"
+ },
+ {
+ "id": "7.6.1-3-9",
+ "path": "TestCases/chapter07/7.6/7.6.1/7.6.1-3-9.js",
+ "description": "Allow reserved words as property names by index assignment,verified with hasOwnProperty: if, throw, delete",
+ "test": "assertTrue((function testcase() {\n var tokenCodes = {};\n tokenCodes['if'] = 0;\n tokenCodes['throw'] = 1;\n tokenCodes['delete'] = 2;\n var arr = [\n 'if',\n 'throw',\n 'delete'\n ];\n for(var p in tokenCodes) { \n for(var p1 in arr) { \n if(arr[p1] === p) {\n if(!tokenCodes.hasOwnProperty(arr[p1])) {\n return false;\n };\n }\n }\n }\n return true;\n }).call(this));\n"
+ },
+ {
+ "id": "7.6.1-4-1",
+ "path": "TestCases/chapter07/7.6/7.6.1/7.6.1-4-1.js",
+ "description": "Allow reserved words as property names by set function within an object, verified with hasOwnProperty: null, true, false",
+ "test": "assertTrue((function testcase() {\n var test0 = 0, test1 = 1, test2 = 2;\n var tokenCodes = {\n set null(value) {\n test0 = value; \n },\n get null() {\n return test0;\n },\n set true(value) {\n test1 = value; \n },\n get true() {\n return test1;\n },\n set false(value) {\n test2 = value; \n },\n get false(){\n return test2;\n }\n }; \n var arr = [\n 'null',\n 'true',\n 'false'\n ];\n for(var p in tokenCodes) { \n for(var p1 in arr) { \n if(arr[p1] === p) {\n if(!tokenCodes.hasOwnProperty(arr[p1])) {\n return false;\n };\n }\n }\n }\n return true;\n }).call(this));\n"
+ },
+ {
+ "id": "7.6.1-4-10",
+ "path": "TestCases/chapter07/7.6/7.6.1/7.6.1-4-10.js",
+ "description": "Allow reserved words as property names by set function within an object, verified with hasOwnProperty: in, try, class",
+ "test": "assertTrue((function testcase() {\n var test0 = 0, test1 = 1, test2 = 2;\n var tokenCodes = {\n set in(value){\n test0 = value;\n },\n get in(){\n return test0;\n },\n set try(value){\n test1 = value;\n },\n get try(){\n return test1\n },\n set class(value){\n test2 = value;\n },\n get class(){\n return test2;\n }\n }; \n var arr = [\n 'in', \n 'try',\n 'class'\n ];\n for(var p in tokenCodes) { \n for(var p1 in arr) { \n if(arr[p1] === p) {\n if(!tokenCodes.hasOwnProperty(arr[p1])) {\n return false;\n };\n }\n }\n }\n return true;\n }).call(this));\n"
+ },
+ {
+ "id": "7.6.1-4-11",
+ "path": "TestCases/chapter07/7.6/7.6.1/7.6.1-4-11.js",
+ "description": "Allow reserved words as property names by set function within an object, verified with hasOwnProperty: enum, extends, super",
+ "test": "assertTrue((function testcase() {\n var test0 = 0, test1 = 1, test2 = 2;\n var tokenCodes = {\n set enum(value){\n test0 = value;\n },\n get enum(){\n return test0;\n },\n set extends(value){\n test1 = value;\n },\n get extends(){\n return test1;\n },\n set super(value){\n test2 = value;\n }, \n get super(){\n return test2;\n }\n }; \n var arr = [\n 'enum',\n 'extends',\n 'super'\n ];\n for(var p in tokenCodes) { \n for(var p1 in arr) { \n if(arr[p1] === p) {\n if(!tokenCodes.hasOwnProperty(arr[p1])) {\n return false;\n };\n }\n }\n }\n return true;\n }).call(this));\n"
+ },
+ {
+ "id": "7.6.1-4-12",
+ "path": "TestCases/chapter07/7.6/7.6.1/7.6.1-4-12.js",
+ "description": "Allow reserved words as property names by set function within an object, verified with hasOwnProperty: const, export, import",
+ "test": "assertTrue((function testcase() {\n var test0 = 0, test1 = 1, test2 = 2;\n var tokenCodes = {\n set const(value){\n test0 = value;\n },\n get const(){\n return test0;\n },\n set export(value){\n test1 = value;\n },\n get export(){\n return test1\n },\n set import(value){\n test2 = value;\n },\n get import(){\n return test2\n }\n }; \n var arr = [\n 'const',\n 'export',\n 'import'\n ];\n for(var p in tokenCodes) { \n for(var p1 in arr) { \n if(arr[p1] === p) {\n if(!tokenCodes.hasOwnProperty(arr[p1])) {\n return false;\n };\n }\n }\n }\n return true;\n }).call(this));\n"
+ },
+ {
+ "id": "7.6.1-4-13",
+ "path": "TestCases/chapter07/7.6/7.6.1/7.6.1-4-13.js",
+ "description": "Allow reserved words as property names by set function within an object, verified with hasOwnProperty: implements, let, private",
+ "test": "assertTrue((function testcase() {\n var test0 = 0, test1 = 1, test2 = 2;\n var tokenCodes = {\n set implements(value){\n test0 = value;\n },\n get implements(){\n return test0;\n },\n set let(value){\n test1 = value;\n },\n get let(){\n return test1\n },\n set private(value){\n test2 = value;\n },\n get private(){\n return test2;\n }\n }; \n var arr = [\n 'implements',\n 'let',\n 'private'\n ];\n for(var p in tokenCodes) { \n for(var p1 in arr) { \n if(arr[p1] === p) {\n if(!tokenCodes.hasOwnProperty(arr[p1])) {\n return false;\n };\n }\n }\n }\n return true;\n }).call(this));\n"
+ },
+ {
+ "id": "7.6.1-4-14",
+ "path": "TestCases/chapter07/7.6/7.6.1/7.6.1-4-14.js",
+ "description": "Allow reserved words as property names by set function within an object, verified with hasOwnProperty: public, yield, interface",
+ "test": "assertTrue((function testcase() {\n var test0 = 0, test1 = 1, test2 = 2;\n var tokenCodes = {\n set public(value){\n test0 = value;\n },\n get public(){\n return test0;\n },\n set yield(value){\n test1 = value;\n },\n get yield(){\n return test1;\n },\n set interface(value){\n test2 = value;\n },\n get interface(){\n return test2;\n }\n }; \n var arr = [\n 'public',\n 'yield',\n 'interface'\n ];\n for(var p in tokenCodes) { \n for(var p1 in arr) { \n if(arr[p1] === p) {\n if(!tokenCodes.hasOwnProperty(arr[p1])) {\n return false;\n };\n }\n }\n }\n return true;\n }).call(this));\n"
+ },
+ {
+ "id": "7.6.1-4-15",
+ "path": "TestCases/chapter07/7.6/7.6.1/7.6.1-4-15.js",
+ "description": "Allow reserved words as property names by set function within an object, verified with hasOwnProperty: package, protected, static",
+ "test": "assertTrue((function testcase() {\n var test0 = 0, test1 = 1, test2 = 2;\n var tokenCodes = {\n set package(value){\n test0 = value;\n },\n get package(){\n return test0;\n },\n set protected(value){\n test1 = value;\n },\n get protected(){\n return test1\n },\n set static(value){\n test2 = value;\n },\n get static(){\n return test2;\n }\n }; \n var arr = [\n 'package',\n 'protected',\n 'static' \n ];\n for(var p in tokenCodes) { \n for(var p1 in arr) { \n if(arr[p1] === p) {\n if(!tokenCodes.hasOwnProperty(arr[p1])) {\n return false;\n };\n }\n }\n }\n return true;\n }).call(this));\n"
+ },
+ {
+ "id": "7.6.1-4-16",
+ "path": "TestCases/chapter07/7.6/7.6.1/7.6.1-4-16.js",
+ "description": "Allow reserved words as property names by set function within an object, verified with hasOwnProperty: undefined, NaN, Infinity",
+ "test": "assertTrue((function testcase() {\n var test0 = 0, test1 = 1, test2 = 2;\n var tokenCodes = {\n set undefined(value){\n test0 = value;\n },\n get undefined(){\n return test0;\n },\n set NaN(value){\n test1 = value;\n },\n get NaN(){\n return test1;\n },\n set Infinity(value){\n test2 = value;\n },\n get Infinity(){\n return test2;\n }\n }; \n var arr = [\n 'undefined',\n 'NaN',\n 'Infinity'\n ];\n for(var p in tokenCodes) { \n for(var p1 in arr) { \n if(arr[p1] === p) {\n if(!tokenCodes.hasOwnProperty(arr[p1])) {\n return false;\n };\n }\n }\n }\n return true;\n }).call(this));\n"
+ },
+ {
+ "id": "7.6.1-4-2",
+ "path": "TestCases/chapter07/7.6/7.6.1/7.6.1-4-2.js",
+ "description": "Allow reserved words as property names by set function within an object, verified with hasOwnProperty: break, case, do",
+ "test": "assertTrue((function testcase() {\n var test0 = 0, test1 = 1, test2 = 2;\n var tokenCodes = {\n set break(value){\n test0 = value; \n },\n get break(){\n return test0;\n },\n set case(value){\n test1 = value;\n },\n get case(){\n return test1;\n },\n set do(value){\n test2 = value;\n },\n get do(){\n return test2;\n }\n }; \n var arr = [\n 'break',\n 'case',\n 'do'\n ];\n for(var p in tokenCodes) { \n for(var p1 in arr) { \n if(arr[p1] === p) {\n if(!tokenCodes.hasOwnProperty(arr[p1])) {\n return false;\n };\n }\n }\n }\n return true;\n }).call(this));\n"
+ },
+ {
+ "id": "7.6.1-4-3",
+ "path": "TestCases/chapter07/7.6/7.6.1/7.6.1-4-3.js",
+ "description": "Allow reserved words as property names by set function within an object, verified with hasOwnProperty: instanceof, typeof, else",
+ "test": "assertTrue((function testcase() {\n var test0 = 0, test1 = 1, test2 = 2;\n var tokenCodes = {\n set instanceof(value){\n test0 = value;\n },\n get instanceof(){\n return test0;\n },\n set typeof(value){\n test1 = value;\n },\n get typeof(){\n return test1;\n },\n set else(value){\n test2 = value;\n },\n get else(){\n return test2;\n }\n }; \n var arr = [\n 'instanceof',\n 'typeof',\n 'else'\n ];\n for(var p in tokenCodes) { \n for(var p1 in arr) { \n if(arr[p1] === p) {\n if(!tokenCodes.hasOwnProperty(arr[p1])) {\n return false;\n };\n }\n }\n }\n return true;\n }).call(this));\n"
+ },
+ {
+ "id": "7.6.1-4-4",
+ "path": "TestCases/chapter07/7.6/7.6.1/7.6.1-4-4.js",
+ "description": "Allow reserved words as property names by set function within an object, verified with hasOwnProperty: new, var, catch",
+ "test": "assertTrue((function testcase() {\n var test0 = 0, test1 = 1, test2 = 2;\n var tokenCodes = {\n set new(value){\n test0 = value;\n },\n get new(){\n return test0;\n },\n set var(value){\n test1 = value;\n },\n get var(){\n return test1;\n },\n set catch(value){\n test2 = value;\n },\n get catch(){\n return test2;\n }\n }; \n var arr = [\n 'new', \n 'var', \n 'catch'\n ];\n for(var p in tokenCodes) { \n for(var p1 in arr) { \n if(arr[p1] === p) {\n if(!tokenCodes.hasOwnProperty(arr[p1])) {\n return false;\n };\n }\n }\n }\n return true;\n }).call(this));\n"
+ },
+ {
+ "id": "7.6.1-4-5",
+ "path": "TestCases/chapter07/7.6/7.6.1/7.6.1-4-5.js",
+ "description": "Allow reserved words as property names by set function within an object, verified with hasOwnProperty: finally, return, void",
+ "test": "assertTrue((function testcase() {\n var test0 = 0, test1 = 1, test2 = 2;\n var tokenCodes = {\n set finally(value){\n test0 = value;\n },\n get finally(){\n return test0;\n },\n set return(value){\n test1 = value;\n },\n get return(){\n return test1;\n },\n set void(value){\n test2 = value;\n },\n get void(){\n return test2;\n }\n }; \n var arr = [\n 'finally', \n 'return', \n 'void'\n ];\n for(var p in tokenCodes) { \n for(var p1 in arr) { \n if(arr[p1] === p) {\n if(!tokenCodes.hasOwnProperty(arr[p1])) {\n return false;\n };\n }\n }\n }\n return true;\n }).call(this));\n"
+ },
+ {
+ "id": "7.6.1-4-6",
+ "path": "TestCases/chapter07/7.6/7.6.1/7.6.1-4-6.js",
+ "description": "Allow reserved words as property names by set function within an object, verified with hasOwnProperty: continue, for, switch",
+ "test": "assertTrue((function testcase() {\n var test0 = 0, test1 = 1, test2 = 2;\n var tokenCodes = {\n set continue(value){\n test0 = value;\n },\n get continue(){\n return test0;\n },\n set for(value){\n test1 = value;\n },\n get for(){\n return test1;\n },\n set switch(value){\n test2 = value;\n },\n get switch(){\n return test2;\n }\n }; \n var arr = [\n 'continue', \n 'for',\n 'switch'\n ];\n for(var p in tokenCodes) { \n for(var p1 in arr) { \n if(arr[p1] === p) {\n if(!tokenCodes.hasOwnProperty(arr[p1])) {\n return false;\n };\n }\n }\n }\n return true;\n }).call(this));\n"
+ },
+ {
+ "id": "7.6.1-4-7",
+ "path": "TestCases/chapter07/7.6/7.6.1/7.6.1-4-7.js",
+ "description": "Allow reserved words as property names by set function within an object, verified with hasOwnProperty: while, debugger, function",
+ "test": "assertTrue((function testcase() {\n var test0 = 0, test1 = 1, test2 = 2;\n var tokenCodes = {\n set while(value){\n test0 = value;\n },\n get while(){\n return test0\n },\n set debugger(value){\n test1 = value;\n },\n get debugger(){\n return test1;\n },\n set function(value){\n test2 = value;\n },\n get function(){\n return test2;\n }\n }; \n var arr = [\n 'while' ,\n 'debugger', \n 'function'\n ];\n for(var p in tokenCodes) { \n for(var p1 in arr) { \n if(arr[p1] === p) {\n if(!tokenCodes.hasOwnProperty(arr[p1])) {\n return false;\n };\n }\n }\n }\n return true;\n }).call(this));\n"
+ },
+ {
+ "id": "7.6.1-4-8",
+ "path": "TestCases/chapter07/7.6/7.6.1/7.6.1-4-8.js",
+ "description": "Allow reserved words as property names by set function within an object, verified with hasOwnProperty: this, with, default",
+ "test": "assertTrue((function testcase() {\n var test0 = 0, test1 = 1, test2 = 2;\n var tokenCodes = {\n set this(value){\n test0 = value;\n },\n get this(){\n return test0;\n },\n set with(value){\n test1 = value;\n },\n get with(){\n return test1;\n },\n set default(value){\n test2 = value;\n },\n get default(){\n return test2;\n }\n }; \n var arr = [\n 'this', \n 'with', \n 'default'\n ];\n for(var p in tokenCodes) { \n for(var p1 in arr) { \n if(arr[p1] === p) {\n if(!tokenCodes.hasOwnProperty(arr[p1])) {\n return false;\n };\n }\n }\n }\n return true;\n }).call(this));\n"
+ },
+ {
+ "id": "7.6.1-4-9",
+ "path": "TestCases/chapter07/7.6/7.6.1/7.6.1-4-9.js",
+ "description": "Allow reserved words as property names by set function within an object, verified with hasOwnProperty: if, throw, delete",
+ "test": "assertTrue((function testcase() {\n var test0 = 0, test1 = 1, test2 = 2;\n var tokenCodes = {\n set if(value){\n test0 = value;\n },\n get if(){\n return test0;\n },\n set throw(value){\n test1 = value;\n },\n get throw(){\n return test1\n },\n set delete(value){\n test2 = value;\n },\n get delete(){\n return test2;\n }\n }; \n var arr = [\n 'if', \n 'throw', \n 'delete'\n ];\n for(var p in tokenCodes) { \n for(var p1 in arr) { \n if(arr[p1] === p) {\n if(!tokenCodes.hasOwnProperty(arr[p1])) {\n return false;\n };\n }\n }\n }\n return true;\n }).call(this));\n"
+ },
+ {
+ "id": "7.6.1-5-1",
+ "path": "TestCases/chapter07/7.6/7.6.1/7.6.1-5-1.js",
+ "description": "Allow reserved words as property names at object initialization, accessed via indexing: null, true, false",
+ "test": "assertTrue((function testcase() {\n var tokenCodes = { \n null: 0,\n true: 1,\n false: 2\n };\n var arr = [\n 'null',\n 'true',\n 'false'\n ]; \n for (var i = 0; i < arr.length; i++) {\n if (tokenCodes[arr[i]] !== i) {\n return false;\n };\n }\n return true;\n }).call(this));\n"
+ },
+ {
+ "id": "7.6.1-5-10",
+ "path": "TestCases/chapter07/7.6/7.6.1/7.6.1-5-10.js",
+ "description": "Allow reserved words as property names at object initialization, accessed via indexing: in, try, class",
+ "test": "assertTrue((function testcase() {\n var tokenCodes = { \n in: 0, \n try: 1,\n class: 2\n };\n var arr = [\n 'in', \n 'try',\n 'class'\n ];\n for (var i = 0; i < arr.length; i++) {\n if (tokenCodes[arr[i]] !== i) {\n return false;\n };\n }\n return true;\n }).call(this));\n"
+ },
+ {
+ "id": "7.6.1-5-11",
+ "path": "TestCases/chapter07/7.6/7.6.1/7.6.1-5-11.js",
+ "description": "Allow reserved words as property names at object initialization, accessed via indexing: enum, extends, super",
+ "test": "assertTrue((function testcase() {\n var tokenCodes = {\n enum: 0,\n extends: 1,\n super: 2\n };\n var arr = [\n 'enum',\n 'extends',\n 'super'\n ]; \n for (var i = 0; i < arr.length; i++) {\n if (tokenCodes[arr[i]] !== i) {\n return false;\n };\n }\n return true;\n }).call(this));\n"
+ },
+ {
+ "id": "7.6.1-5-12",
+ "path": "TestCases/chapter07/7.6/7.6.1/7.6.1-5-12.js",
+ "description": "Allow reserved words as property names at object initialization, accessed via indexing: const, export, import",
+ "test": "assertTrue((function testcase() {\n var tokenCodes = {\n const : 0,\n export: 1,\n import: 2\n };\n var arr = [\n 'const',\n 'export',\n 'import'\n ]; \n for (var i = 0; i < arr.length; i++) {\n if (tokenCodes[arr[i]] !== i) {\n return false;\n };\n }\n return true;\n }).call(this));\n"
+ },
+ {
+ "id": "7.6.1-5-13",
+ "path": "TestCases/chapter07/7.6/7.6.1/7.6.1-5-13.js",
+ "description": "Allow reserved words as property names at object initialization, accessed via indexing: implements, let, private",
+ "test": "assertTrue((function testcase() {\n var tokenCodes = {\n implements: 0,\n let: 1,\n private: 2\n };\n var arr = [\n 'implements',\n 'let',\n 'private'\n ]; \n for (var i = 0; i < arr.length; i++) {\n if (tokenCodes[arr[i]] !== i) {\n return false;\n };\n }\n return true;\n }).call(this));\n"
+ },
+ {
+ "id": "7.6.1-5-14",
+ "path": "TestCases/chapter07/7.6/7.6.1/7.6.1-5-14.js",
+ "description": "Allow reserved words as property names at object initialization, accessed via indexing: public, yield, interface",
+ "test": "assertTrue((function testcase() {\n var tokenCodes = {\n public: 0,\n yield: 1,\n interface: 2\n };\n var arr = [\n 'public',\n 'yield',\n 'interface'\n ]; \n for (var i = 0; i < arr.length; i++) {\n if (tokenCodes[arr[i]] !== i) {\n return false;\n };\n }\n return true;\n }).call(this));\n"
+ },
+ {
+ "id": "7.6.1-5-15",
+ "path": "TestCases/chapter07/7.6/7.6.1/7.6.1-5-15.js",
+ "description": "Allow reserved words as property names at object initialization, accessed via indexing: package, protected, static",
+ "test": "assertTrue((function testcase() {\n var tokenCodes = {\n package: 0,\n protected: 1,\n static: 2\n };\n var arr = [\n 'package',\n 'protected',\n 'static'\n ]; \n for (var i = 0; i < arr.length; i++) {\n if (tokenCodes[arr[i]] !== i) {\n return false;\n };\n }\n return true;\n }).call(this));\n"
+ },
+ {
+ "id": "7.6.1-5-16",
+ "path": "TestCases/chapter07/7.6/7.6.1/7.6.1-5-16.js",
+ "description": "Allow reserved words as property names at object initialization, accessed via indexing: undefined, NaN, Infinity",
+ "test": "assertTrue((function testcase() {\n var tokenCodes = {\n undefined: 0,\n NaN: 1,\n Infinity: 2\n };\n var arr = [\n 'undefined',\n 'NaN',\n 'Infinity'\n ]; \n for (var i = 0; i < arr.length; i++) {\n if (tokenCodes[arr[i]] !== i) {\n return false;\n };\n }\n return true;\n }).call(this));\n"
+ },
+ {
+ "id": "7.6.1-5-2",
+ "path": "TestCases/chapter07/7.6/7.6.1/7.6.1-5-2.js",
+ "description": "Allow reserved words as property names at object initialization, accessed via indexing: break, case, do",
+ "test": "assertTrue((function testcase() {\n var tokenCodes = { \n break: 0,\n case: 1,\n do: 2\n };\n var arr = [\n 'break',\n 'case',\n 'do'\n ];\n for (var i = 0; i < arr.length; i++) {\n if (tokenCodes[arr[i]] !== i) {\n return false;\n };\n }\n return true;\n }).call(this));\n"
+ },
+ {
+ "id": "7.6.1-5-3",
+ "path": "TestCases/chapter07/7.6/7.6.1/7.6.1-5-3.js",
+ "description": "Allow reserved words as property names at object initialization, accessed via indexing: instanceof, typeof, else",
+ "test": "assertTrue((function testcase() {\n var tokenCodes = { \n instanceof: 0,\n typeof: 1,\n else: 2\n };\n var arr = [\n 'instanceof',\n 'typeof',\n 'else'\n ];\n for (var i = 0; i < arr.length; i++) {\n if (tokenCodes[arr[i]] !== i) {\n return false;\n };\n }\n return true;\n }).call(this));\n"
+ },
+ {
+ "id": "7.6.1-5-4",
+ "path": "TestCases/chapter07/7.6/7.6.1/7.6.1-5-4.js",
+ "description": "Allow reserved words as property names at object initialization, accessed via indexing: new, var, catch",
+ "test": "assertTrue((function testcase() {\n var tokenCodes = { \n new: 0,\n var: 1,\n catch: 2\n };\n var arr = [\n 'new', \n 'var', \n 'catch'\n ]; \n for (var i = 0; i < arr.length; i++) {\n if (tokenCodes[arr[i]] !== i) {\n return false;\n };\n }\n return true;\n }).call(this));\n"
+ },
+ {
+ "id": "7.6.1-5-5",
+ "path": "TestCases/chapter07/7.6/7.6.1/7.6.1-5-5.js",
+ "description": "Allow reserved words as property names at object initialization, accessed via indexing: finally, return, void",
+ "test": "assertTrue((function testcase() {\n var tokenCodes = { \n finally: 0,\n return: 1,\n void: 2\n };\n var arr = [ \n 'finally', \n 'return', \n 'void'\n ]; \n for (var i = 0; i < arr.length; i++) {\n if (tokenCodes[arr[i]] !== i) {\n return false;\n };\n }\n return true;\n }).call(this));\n"
+ },
+ {
+ "id": "7.6.1-5-6",
+ "path": "TestCases/chapter07/7.6/7.6.1/7.6.1-5-6.js",
+ "description": "Allow reserved words as property names at object initialization, accessed via indexing: continue, for, switch",
+ "test": "assertTrue((function testcase() {\n var tokenCodes = { \n continue: 0, \n for: 1, \n switch: 2\n };\n var arr = [\n 'continue', \n 'for',\n 'switch'\n ]; \n for (var i = 0; i < arr.length; i++) {\n if (tokenCodes[arr[i]] !== i) {\n return false;\n };\n }\n return true;\n }).call(this));\n"
+ },
+ {
+ "id": "7.6.1-5-7",
+ "path": "TestCases/chapter07/7.6/7.6.1/7.6.1-5-7.js",
+ "description": "Allow reserved words as property names at object initialization, accessed via indexing: while, debugger, function",
+ "test": "assertTrue((function testcase() {\n var tokenCodes = { \n while: 0, \n debugger: 1, \n function: 2\n };\n var arr = [ \n 'while' ,\n 'debugger', \n 'function'\n ]; \n for (var i = 0; i < arr.length; i++) {\n if (tokenCodes[arr[i]] !== i) {\n return false;\n };\n }\n return true;\n }).call(this));\n"
+ },
+ {
+ "id": "7.6.1-5-8",
+ "path": "TestCases/chapter07/7.6/7.6.1/7.6.1-5-8.js",
+ "description": "Allow reserved words as property names at object initialization, accessed via indexing: this, with, default",
+ "test": "assertTrue((function testcase() {\n var tokenCodes = { \n this: 0, \n with: 1, \n default: 2\n };\n var arr = [ \n 'this', \n 'with', \n 'default'\n ]; \n for (var i = 0; i < arr.length; i++) {\n if (tokenCodes[arr[i]] !== i) {\n return false;\n };\n }\n return true;\n }).call(this));\n"
+ },
+ {
+ "id": "7.6.1-5-9",
+ "path": "TestCases/chapter07/7.6/7.6.1/7.6.1-5-9.js",
+ "description": "Allow reserved words as property names at object initialization, accessed via indexing: if, throw, delete",
+ "test": "assertTrue((function testcase() {\n var tokenCodes = { \n if: 0, \n throw: 1, \n delete: 2\n };\n var arr = [\n 'if', \n 'throw', \n 'delete'\n ]; \n for (var i = 0; i < arr.length; i++) {\n if (tokenCodes[arr[i]] !== i) {\n return false;\n };\n }\n return true;\n }).call(this));\n"
+ },
+ {
+ "id": "7.6.1-6-1",
+ "path": "TestCases/chapter07/7.6/7.6.1/7.6.1-6-1.js",
+ "description": "Allow reserved words as property names by dot operator assignment, accessed via indexing: null, true, false",
+ "test": "assertTrue((function testcase() {\n var tokenCodes = {};\n tokenCodes.null = 0;\n\t tokenCodes.true = 1;\n\t tokenCodes.false = 2; \n var arr = [\n 'null',\n 'true',\n 'false'\n ];\n for (var i = 0; i < arr.length; i++) {\n if (tokenCodes[arr[i]] !== i) {\n return false;\n };\n }\n return true;\n }).call(this));\n"
+ },
+ {
+ "id": "7.6.1-6-10",
+ "path": "TestCases/chapter07/7.6/7.6.1/7.6.1-6-10.js",
+ "description": "Allow reserved words as property names by dot operator assignment, accessed via indexing: in, try, class",
+ "test": "assertTrue((function testcase() {\n var tokenCodes = {};\n tokenCodes.in = 0;\n tokenCodes.try = 1;\n tokenCodes.class = 2;\n var arr = [\n 'in', \n 'try',\n 'class'\n ];\n for (var i = 0; i < arr.length; i++) {\n if (tokenCodes[arr[i]] !== i) {\n return false;\n };\n }\n return true;\n }).call(this));\n"
+ },
+ {
+ "id": "7.6.1-6-11",
+ "path": "TestCases/chapter07/7.6/7.6.1/7.6.1-6-11.js",
+ "description": "Allow reserved words as property names by dot operator assignment, accessed via indexing: enum, extends, super",
+ "test": "assertTrue((function testcase() {\n var tokenCodes = {};\n tokenCodes.enum = 0;\n tokenCodes.extends = 1;\n tokenCodes.super = 2;\n var arr = [\n 'enum',\n 'extends',\n 'super'\n ];\n for (var i = 0; i < arr.length; i++) {\n if (tokenCodes[arr[i]] !== i) {\n return false;\n };\n }\n return true;\n }).call(this));\n"
+ },
+ {
+ "id": "7.6.1-6-12",
+ "path": "TestCases/chapter07/7.6/7.6.1/7.6.1-6-12.js",
+ "description": "Allow reserved words as property names by dot operator assignment, accessed via indexing: const, export, import",
+ "test": "assertTrue((function testcase() {\n var tokenCodes = {};\n tokenCodes.const = 0;\n tokenCodes.export = 1;\n tokenCodes.import = 2;\n var arr = [\n 'const',\n 'export',\n 'import'\n ];\n for (var i = 0; i < arr.length; i++) {\n if (tokenCodes[arr[i]] !== i) {\n return false;\n };\n }\n return true;\n }).call(this));\n"
+ },
+ {
+ "id": "7.6.1-6-13",
+ "path": "TestCases/chapter07/7.6/7.6.1/7.6.1-6-13.js",
+ "description": "Allow reserved words as property names by dot operator assignment, accessed via indexing: implements, let, private",
+ "test": "assertTrue((function testcase() {\n var tokenCodes = {};\n tokenCodes.implements = 0;\n tokenCodes.let = 1;\n tokenCodes.private = 2;\n var arr = [\n 'implements',\n 'let',\n 'private'\n ];\n for (var i = 0; i < arr.length; i++) {\n if (tokenCodes[arr[i]] !== i) {\n return false;\n };\n }\n return true;\n }).call(this));\n"
+ },
+ {
+ "id": "7.6.1-6-14",
+ "path": "TestCases/chapter07/7.6/7.6.1/7.6.1-6-14.js",
+ "description": "Allow reserved words as property names by dot operator assignment, accessed via indexing: public, yield, interface",
+ "test": "assertTrue((function testcase() {\n var tokenCodes = {};\n tokenCodes.public = 0;\n tokenCodes.yield = 1;\n tokenCodes.interface = 2;\n var arr = [\n 'public',\n 'yield',\n 'interface'\n ];\n for (var i = 0; i < arr.length; i++) {\n if (tokenCodes[arr[i]] !== i) {\n return false;\n };\n }\n return true;\n }).call(this));\n"
+ },
+ {
+ "id": "7.6.1-6-15",
+ "path": "TestCases/chapter07/7.6/7.6.1/7.6.1-6-15.js",
+ "description": "Allow reserved words as property names by dot operator assignment, accessed via indexing: package, protected, static",
+ "test": "assertTrue((function testcase() {\n var tokenCodes = {};\n tokenCodes.package = 0;\n tokenCodes.protected = 1;\n tokenCodes.static = 2;\n var arr = [\n 'package',\n 'protected',\n 'static' \n ];\n for (var i = 0; i < arr.length; i++) {\n if (tokenCodes[arr[i]] !== i) {\n return false;\n };\n }\n return true;\n }).call(this));\n"
+ },
+ {
+ "id": "7.6.1-6-16",
+ "path": "TestCases/chapter07/7.6/7.6.1/7.6.1-6-16.js",
+ "description": "Allow reserved words as property names by dot operator assignment, accessed via indexing: undefined, NaN, Infinity",
+ "test": "assertTrue((function testcase() {\n var tokenCodes = {};\n tokenCodes.undefined = 0;\n tokenCodes.NaN = 1;\n tokenCodes.Infinity = 2;\n var arr = [\n 'undefined',\n 'NaN',\n 'Infinity'\n ];\n for (var i = 0; i < arr.length; i++) {\n if (tokenCodes[arr[i]] !== i) {\n return false;\n };\n }\n return true;\n }).call(this));\n"
+ },
+ {
+ "id": "7.6.1-6-2",
+ "path": "TestCases/chapter07/7.6/7.6.1/7.6.1-6-2.js",
+ "description": "Allow reserved words as property names by dot operator assignment, accessed via indexing: break, case, do",
+ "test": "assertTrue((function testcase() {\n var tokenCodes = {};\n tokenCodes.break = 0; \t\n tokenCodes.case = 1;\n tokenCodes.do = 2;\n var arr = [\n 'break',\n 'case',\n 'do'\n ];\n for (var i = 0; i < arr.length; i++) {\n if (tokenCodes[arr[i]] !== i) {\n return false;\n };\n }\n return true;\n }).call(this));\n"
+ },
+ {
+ "id": "7.6.1-6-3",
+ "path": "TestCases/chapter07/7.6/7.6.1/7.6.1-6-3.js",
+ "description": "Allow reserved words as property names by dot operator assignment, accessed via indexing: instanceof, typeof, else",
+ "test": "assertTrue((function testcase() {\n var tokenCodes = {};\n tokenCodes.instanceof = 0;\n tokenCodes.typeof = 1;\n tokenCodes.else = 2;\n var arr = [\n 'instanceof',\n 'typeof',\n 'else'\n ];\n for (var i = 0; i < arr.length; i++) {\n if (tokenCodes[arr[i]] !== i) {\n return false;\n };\n }\n return true;\n }).call(this));\n"
+ },
+ {
+ "id": "7.6.1-6-4",
+ "path": "TestCases/chapter07/7.6/7.6.1/7.6.1-6-4.js",
+ "description": "Allow reserved words as property names by dot operator assignment, accessed via indexing: new, var, catch",
+ "test": "assertTrue((function testcase() {\n var tokenCodes = {};\n tokenCodes.new = 0;\n tokenCodes.var = 1;\n tokenCodes.catch = 2;\n var arr = [\n 'new', \n 'var', \n 'catch'\n ];\n for (var i = 0; i < arr.length; i++) {\n if (tokenCodes[arr[i]] !== i) {\n return false;\n };\n }\n return true;\n }).call(this));\n"
+ },
+ {
+ "id": "7.6.1-6-5",
+ "path": "TestCases/chapter07/7.6/7.6.1/7.6.1-6-5.js",
+ "description": "Allow reserved words as property names by dot operator assignment, accessed via indexing: finally, return, void",
+ "test": "assertTrue((function testcase() {\n var tokenCodes = {};\n tokenCodes.finally = 0;\n tokenCodes.return = 1;\n tokenCodes.void = 2;\n var arr = [\n 'finally', \n 'return', \n 'void'\n ];\n for (var i = 0; i < arr.length; i++) {\n if (tokenCodes[arr[i]] !== i) {\n return false;\n };\n }\n return true;\n }).call(this));\n"
+ },
+ {
+ "id": "7.6.1-6-6",
+ "path": "TestCases/chapter07/7.6/7.6.1/7.6.1-6-6.js",
+ "description": "Allow reserved words as property names by dot operator assignment, accessed via indexing: continue, for, switch",
+ "test": "assertTrue((function testcase() {\n var tokenCodes = {};\n tokenCodes.continue = 0;\n tokenCodes.for = 1; \n tokenCodes.switch = 2;\n var arr = [\n 'continue', \n 'for',\n 'switch'\n ];\n for (var i = 0; i < arr.length; i++) {\n if (tokenCodes[arr[i]] !== i) {\n return false;\n };\n }\n return true;\n }).call(this));\n"
+ },
+ {
+ "id": "7.6.1-6-7",
+ "path": "TestCases/chapter07/7.6/7.6.1/7.6.1-6-7.js",
+ "description": "Allow reserved words as property names by dot operator assignment, accessed via indexing: while, debugger, function",
+ "test": "assertTrue((function testcase() {\n var tokenCodes = {};\n tokenCodes.while = 0; \n tokenCodes.debugger = 1;\n tokenCodes.function = 2; \n var arr = [\n 'while' ,\n 'debugger', \n 'function'\n ];\n for (var i = 0; i < arr.length; i++) {\n if (tokenCodes[arr[i]] !== i) {\n return false;\n };\n }\n return true;\n }).call(this));\n"
+ },
+ {
+ "id": "7.6.1-6-8",
+ "path": "TestCases/chapter07/7.6/7.6.1/7.6.1-6-8.js",
+ "description": "Allow reserved words as property names by dot operator assignment, accessed via indexing: this, with, default",
+ "test": "assertTrue((function testcase() {\n var tokenCodes = {};\n tokenCodes.this = 0; \n tokenCodes.with = 1; \n tokenCodes.default = 2;\n var arr = [\n 'this', \n 'with', \n 'default'\n ];\n for (var i = 0; i < arr.length; i++) {\n if (tokenCodes[arr[i]] !== i) {\n return false;\n };\n }\n return true;\n }).call(this));\n",
+ "precondition": "(true; return true)"
+ },
+ {
+ "id": "7.6.1-6-9",
+ "path": "TestCases/chapter07/7.6/7.6.1/7.6.1-6-9.js",
+ "description": "Allow reserved words as property names by dot operator assignment, accessed via indexing: if, throw, delete",
+ "test": "assertTrue((function testcase() {\n var tokenCodes = {};\n tokenCodes.if = 0;\n tokenCodes.throw = 1;\n tokenCodes.delete = 2;\n var arr = [\n 'if', \n 'throw', \n 'delete'\n ];\n for (var i = 0; i < arr.length; i++) {\n if (tokenCodes[arr[i]] !== i) {\n return false;\n };\n }\n return true;\n }).call(this));\n"
+ },
+ {
+ "id": "7.6.1-7-1",
+ "path": "TestCases/chapter07/7.6/7.6.1/7.6.1-7-1.js",
+ "description": "Allow reserved words as property names by index assignment, accessed via indexing: null, true, false",
+ "test": "assertTrue((function testcase() {\n var tokenCodes = {};\n tokenCodes['null'] = 0;\n tokenCodes['true'] = 1;\n tokenCodes['false'] = 2; \n var arr = [\n 'null',\n 'true',\n 'false'\n ];\n for (var i = 0; i < arr.length; i++) {\n if (tokenCodes[arr[i]] !== i) {\n return false;\n };\n }\n return true;\n }).call(this));\n"
+ },
+ {
+ "id": "7.6.1-7-10",
+ "path": "TestCases/chapter07/7.6/7.6.1/7.6.1-7-10.js",
+ "description": "Allow reserved words as property names by index assignment, accessed via indexing: in, try, class",
+ "test": "assertTrue((function testcase() {\n var tokenCodes = {};\n tokenCodes['in'] = 0;\n tokenCodes['try'] = 1;\n tokenCodes['class'] = 2;\n var arr = [\n 'in',\n 'try',\n 'class'\n ];\n for (var i = 0; i < arr.length; i++) {\n if (tokenCodes[arr[i]] !== i) {\n return false;\n };\n }\n return true;\n }).call(this));\n"
+ },
+ {
+ "id": "7.6.1-7-11",
+ "path": "TestCases/chapter07/7.6/7.6.1/7.6.1-7-11.js",
+ "description": "Allow reserved words as property names by index assignment, accessed via indexing: enum, extends, super",
+ "test": "assertTrue((function testcase() {\n var tokenCodes = {};\n tokenCodes['enum'] = 0;\n tokenCodes['extends'] = 1;\n tokenCodes['super'] = 2; \n var arr = [\n 'enum',\n 'extends',\n 'super'\n ];\n for (var i = 0; i < arr.length; i++) {\n if (tokenCodes[arr[i]] !== i) {\n return false;\n };\n }\n return true;\n }).call(this));\n"
+ },
+ {
+ "id": "7.6.1-7-12",
+ "path": "TestCases/chapter07/7.6/7.6.1/7.6.1-7-12.js",
+ "description": "Allow reserved words as property names by index assignment, accessed via indexing: const, export, import",
+ "test": "assertTrue((function testcase() {\n var tokenCodes = {};\n tokenCodes['const'] = 0;\n tokenCodes['export'] = 1;\n tokenCodes['import'] = 2; \n var arr = [\n 'const',\n 'export',\n 'import'\n ];\n for (var i = 0; i < arr.length; i++) {\n if (tokenCodes[arr[i]] !== i) {\n return false;\n };\n }\n return true;\n }).call(this));\n"
+ },
+ {
+ "id": "7.6.1-7-13",
+ "path": "TestCases/chapter07/7.6/7.6.1/7.6.1-7-13.js",
+ "description": "Allow reserved words as property names by index assignment, accessed via indexing: implements, let, private",
+ "test": "assertTrue((function testcase() {\n var tokenCodes = {};\n tokenCodes['implements'] = 0;\n tokenCodes['let'] = 1;\n tokenCodes['private'] = 2; \n var arr = [\n 'implements',\n 'let',\n 'private'\n ];\n for (var i = 0; i < arr.length; i++) {\n if (tokenCodes[arr[i]] !== i) {\n return false;\n };\n }\n return true;\n }).call(this));\n"
+ },
+ {
+ "id": "7.6.1-7-14",
+ "path": "TestCases/chapter07/7.6/7.6.1/7.6.1-7-14.js",
+ "description": "Allow reserved words as property names by index assignment, accessed via indexing: public, yield, interface",
+ "test": "assertTrue((function testcase() {\n var tokenCodes = {};\n tokenCodes['public'] = 0;\n tokenCodes['yield'] = 1;\n tokenCodes['interface'] = 2; \n var arr = [\n 'public',\n 'yield',\n 'interface'\n ];\n for (var i = 0; i < arr.length; i++) {\n if (tokenCodes[arr[i]] !== i) {\n return false;\n };\n }\n return true;\n }).call(this));\n"
+ },
+ {
+ "id": "7.6.1-7-15",
+ "path": "TestCases/chapter07/7.6/7.6.1/7.6.1-7-15.js",
+ "description": "Allow reserved words as property names by index assignment, accessed via indexing: package, protected, static",
+ "test": "assertTrue((function testcase() {\n var tokenCodes = {};\n tokenCodes['package'] = 0;\n tokenCodes['protected'] = 1;\n tokenCodes['static'] = 2; \n var arr = [\n 'package',\n 'protected',\n 'static' \n ];\n for (var i = 0; i < arr.length; i++) {\n if (tokenCodes[arr[i]] !== i) {\n return false;\n };\n }\n return true;\n }).call(this));\n"
+ },
+ {
+ "id": "7.6.1-7-16",
+ "path": "TestCases/chapter07/7.6/7.6.1/7.6.1-7-16.js",
+ "description": "Allow reserved words as property names by index assignment, accessed via indexing: undefined, NaN, Infinity",
+ "test": "assertTrue((function testcase() {\n var tokenCodes = {};\n tokenCodes['undefined'] = 0;\n tokenCodes['NaN'] = 1;\n tokenCodes['Infinity'] = 2; \n var arr = [\n 'undefined',\n 'NaN',\n 'Infinity'\n ];\n for (var i = 0; i < arr.length; i++) {\n if (tokenCodes[arr[i]] !== i) {\n return false;\n };\n }\n return true;\n }).call(this));\n"
+ },
+ {
+ "id": "7.6.1-7-2",
+ "path": "TestCases/chapter07/7.6/7.6.1/7.6.1-7-2.js",
+ "description": "Allow reserved words as property names by index assignment, accessed via indexing: break, case, do",
+ "test": "assertTrue((function testcase() {\n var tokenCodes = {};\n tokenCodes['break'] = 0;\n tokenCodes['case'] = 1;\n tokenCodes['do'] = 2; \n var arr = [\n 'break',\n 'case',\n 'do'\n ];\n for (var i = 0; i < arr.length; i++) {\n if (tokenCodes[arr[i]] !== i) {\n return false;\n };\n }\n return true;\n }).call(this));\n"
+ },
+ {
+ "id": "7.6.1-7-3",
+ "path": "TestCases/chapter07/7.6/7.6.1/7.6.1-7-3.js",
+ "description": "Allow reserved words as property names by index assignment, accessed via indexing: instanceof, typeof, else",
+ "test": "assertTrue((function testcase() {\n var tokenCodes = {};\n tokenCodes['instanceof'] = 0;\n tokenCodes['typeof'] = 1;\n tokenCodes['else'] = 2; \n var arr = [\n 'instanceof',\n 'typeof',\n 'else'\n ];\n for (var i = 0; i < arr.length; i++) {\n if (tokenCodes[arr[i]] !== i) {\n return false;\n };\n }\n return true;\n }).call(this));\n"
+ },
+ {
+ "id": "7.6.1-7-4",
+ "path": "TestCases/chapter07/7.6/7.6.1/7.6.1-7-4.js",
+ "description": "Allow reserved words as property names by index assignment, accessed via indexing: new, var, catch",
+ "test": "assertTrue((function testcase() {\n var tokenCodes = {};\n tokenCodes['new'] = 0;\n tokenCodes['var'] = 1;\n tokenCodes['catch'] = 2; \n var arr = [\n 'new',\n 'var',\n 'catch'\n ];\n for (var i = 0; i < arr.length; i++) {\n if (tokenCodes[arr[i]] !== i) {\n return false;\n };\n }\n return true;\n }).call(this));\n"
+ },
+ {
+ "id": "7.6.1-7-5",
+ "path": "TestCases/chapter07/7.6/7.6.1/7.6.1-7-5.js",
+ "description": "Allow reserved words as property names by index assignment, accessed via indexing: finally, return, void",
+ "test": "assertTrue((function testcase() {\n var tokenCodes = {};\n tokenCodes['finally'] = 0;\n tokenCodes['return'] = 1;\n tokenCodes['void'] = 2; \n var arr = [\n 'finally',\n 'return',\n 'void'\n ];\n for (var i = 0; i < arr.length; i++) {\n if (tokenCodes[arr[i]] !== i) {\n return false;\n };\n }\n return true;\n }).call(this));\n"
+ },
+ {
+ "id": "7.6.1-7-6",
+ "path": "TestCases/chapter07/7.6/7.6.1/7.6.1-7-6.js",
+ "description": "Allow reserved words as property names by index assignment, accessed via indexing: continue, for, switch",
+ "test": "assertTrue((function testcase() {\n var tokenCodes = {};\n tokenCodes['continue'] = 0;\n tokenCodes['for'] = 1;\n tokenCodes['switch'] = 2; \n var arr = [\n 'continue',\n 'for',\n 'switch'\n ];\n for (var i = 0; i < arr.length; i++) {\n if (tokenCodes[arr[i]] !== i) {\n return false;\n };\n }\n return true;\n }).call(this));\n"
+ },
+ {
+ "id": "7.6.1-7-7",
+ "path": "TestCases/chapter07/7.6/7.6.1/7.6.1-7-7.js",
+ "description": "Allow reserved words as property names by index assignment, accessed via indexing: while, debugger, function",
+ "test": "assertTrue((function testcase() {\n var tokenCodes = {};\n tokenCodes['while'] = 0;\n tokenCodes['debugger'] = 1;\n tokenCodes['function'] = 2; \n var arr = [\n 'while',\n 'debugger',\n 'function'\n ];\n for (var i = 0; i < arr.length; i++) {\n if (tokenCodes[arr[i]] !== i) {\n return false;\n };\n }\n return true;\n }).call(this));\n"
+ },
+ {
+ "id": "7.6.1-7-8",
+ "path": "TestCases/chapter07/7.6/7.6.1/7.6.1-7-8.js",
+ "description": "Allow reserved words as property names by index assignment, accessed via indexing: this, with, default",
+ "test": "assertTrue((function testcase() {\n var tokenCodes = {};\n tokenCodes['this'] = 0;\n tokenCodes['with'] = 1;\n tokenCodes['default'] = 2; \n var arr = [\n 'this',\n 'with',\n 'default'\n ];\n for (var i = 0; i < arr.length; i++) {\n if (tokenCodes[arr[i]] !== i) {\n return false;\n };\n }\n return true;\n }).call(this));\n"
+ },
+ {
+ "id": "7.6.1-7-9",
+ "path": "TestCases/chapter07/7.6/7.6.1/7.6.1-7-9.js",
+ "description": "Allow reserved words as property names by index assignment, accessed via indexing: if, throw, delete",
+ "test": "assertTrue((function testcase() {\n var tokenCodes = {};\n tokenCodes['if'] = 0;\n tokenCodes['throw'] = 1;\n tokenCodes['delete'] = 2; \n var arr = [\n 'if',\n 'throw',\n 'delete'\n ];\n for (var i = 0; i < arr.length; i++) {\n if (tokenCodes[arr[i]] !== i) {\n return false;\n };\n }\n return true;\n }).call(this));\n"
+ },
+ {
+ "id": "7.6.1-8-1",
+ "path": "TestCases/chapter07/7.6/7.6.1/7.6.1-8-1.js",
+ "description": "Allow reserved words as property names by set function within an object, accessed via indexing: null, true, false",
+ "test": "assertTrue((function testcase() {\n var test0 = 0, test1 = 1, test2 = 2;\n var tokenCodes = {\n set null(value) {\n test0 = value; \n },\n get null() {\n return test0;\n },\n set true(value) {\n test1 = value; \n },\n get true() {\n return test1;\n },\n set false(value) {\n test2 = value; \n },\n get false(){\n return test2;\n }\n }; \n var arr = [\n 'null',\n 'true',\n 'false'\n ];\n for (var i = 0; i < arr.length; i++) {\n if (tokenCodes[arr[i]] !== i) {\n return false;\n };\n }\n return true;\n }).call(this));\n"
+ },
+ {
+ "id": "7.6.1-8-10",
+ "path": "TestCases/chapter07/7.6/7.6.1/7.6.1-8-10.js",
+ "description": "Allow reserved words as property names by set function within an object, accessed via indexing: in, try, class",
+ "test": "assertTrue((function testcase() {\n var test0 = 0, test1 = 1, test2 = 2;\n var tokenCodes = {\n set in(value){\n test0 = value;\n },\n get in(){\n return test0;\n },\n set try(value){\n test1 = value;\n },\n get try(){\n return test1\n },\n set class(value){\n test2 = value;\n },\n get class(){\n return test2;\n }\n }; \n var arr = [\n 'in', \n 'try',\n 'class'\n ];\n for (var i = 0; i < arr.length; i++) {\n if (tokenCodes[arr[i]] !== i) {\n return false;\n };\n }\n return true;\n }).call(this));\n"
+ },
+ {
+ "id": "7.6.1-8-11",
+ "path": "TestCases/chapter07/7.6/7.6.1/7.6.1-8-11.js",
+ "description": "Allow reserved words as property names by set function within an object, accessed via indexing: enum, extends, super",
+ "test": "assertTrue((function testcase() {\n var test0 = 0, test1 = 1, test2 = 2;\n var tokenCodes = {\n set enum(value){\n test0 = value;\n },\n get enum(){\n return test0;\n },\n set extends(value){\n test1 = value;\n },\n get extends(){\n return test1;\n },\n set super(value){\n test2 = value;\n }, \n get super(){\n return test2;\n }\n }; \n var arr = [\n 'enum',\n 'extends',\n 'super'\n ];\n for (var i = 0; i < arr.length; i++) {\n if (tokenCodes[arr[i]] !== i) {\n return false;\n };\n }\n return true;\n }).call(this));\n"
+ },
+ {
+ "id": "7.6.1-8-12",
+ "path": "TestCases/chapter07/7.6/7.6.1/7.6.1-8-12.js",
+ "description": "Allow reserved words as property names by set function within an object, accessed via indexing: const, export, import",
+ "test": "assertTrue((function testcase() {\n var test0 = 0, test1 = 1, test2 = 2;\n var tokenCodes = {\n set const(value){\n test0 = value;\n },\n get const(){\n return test0;\n },\n set export(value){\n test1 = value;\n },\n get export(){\n return test1\n },\n set import(value){\n test2 = value;\n },\n get import(){\n return test2\n }\n }; \n var arr = [\n 'const',\n 'export',\n 'import'\n ];\n for (var i = 0; i < arr.length; i++) {\n if (tokenCodes[arr[i]] !== i) {\n return false;\n };\n }\n return true;\n }).call(this));\n"
+ },
+ {
+ "id": "7.6.1-8-13",
+ "path": "TestCases/chapter07/7.6/7.6.1/7.6.1-8-13.js",
+ "description": "Allow reserved words as property names by set function within an object, accessed via indexing: implements, let, private",
+ "test": "assertTrue((function testcase() {\n var test0 = 0, test1 = 1, test2 = 2;\n var tokenCodes = {\n set implements(value){\n test0 = value;\n },\n get implements(){\n return test0;\n },\n set let(value){\n test1 = value;\n },\n get let(){\n return test1\n },\n set private(value){\n test2 = value;\n },\n get private(){\n return test2;\n }\n }; \n var arr = [\n 'implements',\n 'let',\n 'private'\n ];\n for (var i = 0; i < arr.length; i++) {\n if (tokenCodes[arr[i]] !== i) {\n return false;\n };\n }\n return true;\n }).call(this));\n"
+ },
+ {
+ "id": "7.6.1-8-14",
+ "path": "TestCases/chapter07/7.6/7.6.1/7.6.1-8-14.js",
+ "description": "Allow reserved words as property names by set function within an object, accessed via indexing: public, yield, interface",
+ "test": "assertTrue((function testcase() {\n var test0 = 0, test1 = 1, test2 = 2;\n var tokenCodes = {\n set public(value){\n test0 = value;\n },\n get public(){\n return test0;\n },\n set yield(value){\n test1 = value;\n },\n get yield(){\n return test1;\n },\n set interface(value){\n test2 = value;\n },\n get interface(){\n return test2;\n }\n }; \n var arr = [\n 'public',\n 'yield',\n 'interface'\n ];\n for (var i = 0; i < arr.length; i++) {\n if (tokenCodes[arr[i]] !== i) {\n return false;\n };\n }\n return true;\n }).call(this));\n"
+ },
+ {
+ "id": "7.6.1-8-15",
+ "path": "TestCases/chapter07/7.6/7.6.1/7.6.1-8-15.js",
+ "description": "Allow reserved words as property names by set function within an object, accessed via indexing: package, protected, static",
+ "test": "assertTrue((function testcase() {\n var test0 = 0, test1 = 1, test2 = 2;\n var tokenCodes = {\n set package(value){\n test0 = value;\n },\n get package(){\n return test0;\n },\n set protected(value){\n test1 = value;\n },\n get protected(){\n return test1\n },\n set static(value){\n test2 = value;\n },\n get static(){\n return test2;\n }\n }; \n var arr = [\n 'package',\n 'protected',\n 'static' \n ];\n for (var i = 0; i < arr.length; i++) {\n if (tokenCodes[arr[i]] !== i) {\n return false;\n };\n }\n return true;\n }).call(this));\n"
+ },
+ {
+ "id": "7.6.1-8-16",
+ "path": "TestCases/chapter07/7.6/7.6.1/7.6.1-8-16.js",
+ "description": "Allow reserved words as property names by set function within an object, accessed via indexing: undefined, NaN, Infinity",
+ "test": "assertTrue((function testcase() {\n var test0 = 0, test1 = 1, test2 = 2;\n var tokenCodes = {\n set undefined(value){\n test0 = value;\n },\n get undefined(){\n return test0;\n },\n set NaN(value){\n test1 = value;\n },\n get NaN(){\n return test1;\n },\n set Infinity(value){\n test2 = value;\n },\n get Infinity(){\n return test2;\n }\n }; \n var arr = [\n 'undefined',\n 'NaN',\n 'Infinity'\n ];\n for (var i = 0; i < arr.length; i++) {\n if (tokenCodes[arr[i]] !== i) {\n return false;\n };\n }\n return true;\n }).call(this));\n"
+ },
+ {
+ "id": "7.6.1-8-2",
+ "path": "TestCases/chapter07/7.6/7.6.1/7.6.1-8-2.js",
+ "description": "Allow reserved words as property names by set function within an object, accessed via indexing: break, case, do",
+ "test": "assertTrue((function testcase() {\n var test0 = 0, test1 = 1, test2 = 2;\n var tokenCodes = {\n set break(value){\n test0 = value; \n },\n get break(){\n return test0;\n },\n set case(value){\n test1 = value;\n },\n get case(){\n return test1;\n },\n set do(value){\n test2 = value;\n },\n get do(){\n return test2;\n }\n }; \n var arr = [\n 'break',\n 'case',\n 'do'\n ];\n for (var i = 0; i < arr.length; i++) {\n if (tokenCodes[arr[i]] !== i) {\n return false;\n };\n }\n return true;\n }).call(this));\n"
+ },
+ {
+ "id": "7.6.1-8-3",
+ "path": "TestCases/chapter07/7.6/7.6.1/7.6.1-8-3.js",
+ "description": "Allow reserved words as property names by set function within an object, accessed via indexing: instanceof, typeof, else",
+ "test": "assertTrue((function testcase() {\n var test0 = 0, test1 = 1, test2 = 2;\n var tokenCodes = {\n set instanceof(value){\n test0 = value;\n },\n get instanceof(){\n return test0;\n },\n set typeof(value){\n test1 = value;\n },\n get typeof(){\n return test1;\n },\n set else(value){\n test2 = value;\n },\n get else(){\n return test2;\n }\n }; \n var arr = [\n 'instanceof',\n 'typeof',\n 'else'\n ];\n for (var i = 0; i < arr.length; i++) {\n if (tokenCodes[arr[i]] !== i) {\n return false;\n };\n }\n return true;\n }).call(this));\n"
+ },
+ {
+ "id": "7.6.1-8-4",
+ "path": "TestCases/chapter07/7.6/7.6.1/7.6.1-8-4.js",
+ "description": "Allow reserved words as property names by set function within an object, accessed via indexing: new, var, catch",
+ "test": "assertTrue((function testcase() {\n var test0 = 0, test1 = 1, test2 = 2;\n var tokenCodes = {\n set new(value){\n test0 = value;\n },\n get new(){\n return test0;\n },\n set var(value){\n test1 = value;\n },\n get var(){\n return test1;\n },\n set catch(value){\n test2 = value;\n },\n get catch(){\n return test2;\n }\n }; \n var arr = [\n 'new', \n 'var', \n 'catch'\n ];\n for (var i = 0; i < arr.length; i++) {\n if (tokenCodes[arr[i]] !== i) {\n return false;\n };\n }\n return true;\n }).call(this));\n"
+ },
+ {
+ "id": "7.6.1-8-5",
+ "path": "TestCases/chapter07/7.6/7.6.1/7.6.1-8-5.js",
+ "description": "Allow reserved words as property names by set function within an object, accessed via indexing: finally, return, void",
+ "test": "assertTrue((function testcase() {\n var test0 = 0, test1 = 1, test2 = 2;\n var tokenCodes = {\n set finally(value){\n test0 = value;\n },\n get finally(){\n return test0;\n },\n set return(value){\n test1 = value;\n },\n get return(){\n return test1;\n },\n set void(value){\n test2 = value;\n },\n get void(){\n return test2;\n }\n }; \n var arr = [\n 'finally', \n 'return', \n 'void'\n ];\n for (var i = 0; i < arr.length; i++) {\n if (tokenCodes[arr[i]] !== i) {\n return false;\n };\n }\n return true;\n }).call(this));\n"
+ },
+ {
+ "id": "7.6.1-8-6",
+ "path": "TestCases/chapter07/7.6/7.6.1/7.6.1-8-6.js",
+ "description": "Allow reserved words as property names by set function within an object, accessed via indexing: continue, for, switch",
+ "test": "assertTrue((function testcase() {\n var test0 = 0, test1 = 1, test2 = 2;\n var tokenCodes = {\n set continue(value){\n test0 = value;\n },\n get continue(){\n return test0;\n },\n set for(value){\n test1 = value;\n },\n get for(){\n return test1;\n },\n set switch(value){\n test2 = value;\n },\n get switch(){\n return test2;\n }\n }; \n var arr = [\n 'continue', \n 'for',\n 'switch'\n ];\n for (var i = 0; i < arr.length; i++) {\n if (tokenCodes[arr[i]] !== i) {\n return false;\n };\n }\n return true;\n }).call(this));\n"
+ },
+ {
+ "id": "7.6.1-8-7",
+ "path": "TestCases/chapter07/7.6/7.6.1/7.6.1-8-7.js",
+ "description": "Allow reserved words as property names by set function within an object, accessed via indexing: while, debugger, function",
+ "test": "assertTrue((function testcase() {\n var test0 = 0, test1 = 1, test2 = 2;\n var tokenCodes = {\n set while(value){\n test0 = value;\n },\n get while(){\n return test0\n },\n set debugger(value){\n test1 = value;\n },\n get debugger(){\n return test1;\n },\n set function(value){\n test2 = value;\n },\n get function(){\n return test2;\n }\n }; \n var arr = [\n 'while' ,\n 'debugger', \n 'function'\n ];\n for (var i = 0; i < arr.length; i++) {\n if (tokenCodes[arr[i]] !== i) {\n return false;\n };\n }\n return true;\n }).call(this));\n"
+ },
+ {
+ "id": "7.6.1-8-8",
+ "path": "TestCases/chapter07/7.6/7.6.1/7.6.1-8-8.js",
+ "description": "Allow reserved words as property names by set function within an object, accessed via indexing: this, with, default",
+ "test": "assertTrue((function testcase() {\n var test0 = 0, test1 = 1, test2 = 2;\n var tokenCodes = {\n set this(value){\n test0 = value;\n },\n get this(){\n return test0;\n },\n set with(value){\n test1 = value;\n },\n get with(){\n return test1;\n },\n set default(value){\n test2 = value;\n },\n get default(){\n return test2;\n }\n }; \n var arr = [\n 'this', \n 'with', \n 'default'\n ];\n for (var i = 0; i < arr.length; i++) {\n if (tokenCodes[arr[i]] !== i) {\n return false;\n };\n }\n return true;\n }).call(this));\n"
+ },
+ {
+ "id": "7.6.1-8-9",
+ "path": "TestCases/chapter07/7.6/7.6.1/7.6.1-8-9.js",
+ "description": "Allow reserved words as property names by set function within an object, accessed via indexing: if, throw, delete",
+ "test": "assertTrue((function testcase() {\n var test0 = 0, test1 = 1, test2 = 2;\n var tokenCodes = {\n set if(value){\n test0 = value;\n },\n get if(){\n return test0;\n },\n set throw(value){\n test1 = value;\n },\n get throw(){\n return test1\n },\n set delete(value){\n test2 = value;\n },\n get delete(){\n return test2;\n }\n }; \n var arr = [\n 'if', \n 'throw', \n 'delete'\n ];\n for (var i = 0; i < arr.length; i++) {\n if (tokenCodes[arr[i]] !== i) {\n return false;\n };\n }\n return true;\n }).call(this));\n"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/7.6.json b/website/resources/scripts/testcases2/7.6.json
new file mode 100644
index 000000000..45dc90613
--- /dev/null
+++ b/website/resources/scripts/testcases2/7.6.json
@@ -0,0 +1,224 @@
+{
+ "testCollection": {
+ "name": "7.6",
+ "numTests": 36,
+ "tests": [
+ {
+ "id": "7.6-1",
+ "path": "TestCases/chapter07/7.6/7.6-1.js",
+ "description": "7.6 - SyntaxError expected: reserved words used as Identifier Names in UTF8: null (null)",
+ "test": "assertTrue((function testcase() {\n try {\n eval(\"var \\u006eull = 123;\"); \n return false;\n } catch (e) {\n return e instanceof SyntaxError; \n }\n }).call(this));\n"
+ },
+ {
+ "id": "7.6-10",
+ "path": "TestCases/chapter07/7.6/7.6-10.js",
+ "description": "7.6 - SyntaxError expected: reserved words used as Identifier Names in UTF8: new (new)",
+ "test": "assertTrue((function testcase() {\n try {\n eval(\"var n\\u0065w = 123;\"); \n return false;\n } catch (e) {\n return e instanceof SyntaxError; \n }\n }).call(this));\n"
+ },
+ {
+ "id": "7.6-11",
+ "path": "TestCases/chapter07/7.6/7.6-11.js",
+ "description": "7.6 - SyntaxError expected: reserved words used as Identifier Names in UTF8: var (var)",
+ "test": "assertTrue((function testcase() {\n try {\n eval(\"var va\\u0072 = 123;\"); \n return false;\n } catch (e) {\n return e instanceof SyntaxError; \n }\n }).call(this));\n"
+ },
+ {
+ "id": "7.6-12",
+ "path": "TestCases/chapter07/7.6/7.6-12.js",
+ "description": "7.6 - SyntaxError expected: reserved words used as Identifier Names in UTF8: try (try)",
+ "test": "assertTrue((function testcase() {\n try {\n eval(\"var \\u0074\\u0072\\u0079 = 123;\"); \n return false;\n } catch (e) {\n return e instanceof SyntaxError; \n }\n }).call(this));\n"
+ },
+ {
+ "id": "7.6-13",
+ "path": "TestCases/chapter07/7.6/7.6-13.js",
+ "description": "7.6 - SyntaxError expected: reserved words used as Identifier Names in UTF8: catch (catch)",
+ "test": "assertTrue((function testcase() {\n try {\n eval(\"var \\u0063atch = 123;\"); \n return false;\n } catch (e) {\n return e instanceof SyntaxError; \n }\n }).call(this));\n"
+ },
+ {
+ "id": "7.6-14",
+ "path": "TestCases/chapter07/7.6/7.6-14.js",
+ "description": "7.6 - SyntaxError expected: reserved words used as Identifier Names in UTF8: finally (finally)",
+ "test": "assertTrue((function testcase() {\n try {\n eval(\"var fina\\u006cly = 123;\"); \n return false;\n } catch (e) {\n return e instanceof SyntaxError; \n }\n }).call(this));\n"
+ },
+ {
+ "id": "7.6-15",
+ "path": "TestCases/chapter07/7.6/7.6-15.js",
+ "description": "7.6 - SyntaxError expected: reserved words used as Identifier Names in UTF8: return (return)",
+ "test": "assertTrue((function testcase() {\n try {\n eval(\"var retur\\u006e = 123;\"); \n return false;\n } catch (e) {\n return e instanceof SyntaxError; \n }\n }).call(this));\n"
+ },
+ {
+ "id": "7.6-16",
+ "path": "TestCases/chapter07/7.6/7.6-16.js",
+ "description": "7.6 - SyntaxError expected: reserved words used as Identifier Names in UTF8: void (void)",
+ "test": "assertTrue((function testcase() {\n try {\n eval(\"var \\u0076\\u006f\\u0069\\u0064 = 123;\"); \n return false;\n } catch (e) {\n return e instanceof SyntaxError; \n }\n }).call(this));\n"
+ },
+ {
+ "id": "7.6-17",
+ "path": "TestCases/chapter07/7.6/7.6-17.js",
+ "description": "7.6 - SyntaxError expected: reserved words used as Identifier Names in UTF8: continue (continue)",
+ "test": "assertTrue((function testcase() {\n try {\n eval(\"var \\u0063ontinue = 123;\"); \n return false;\n } catch (e) {\n return e instanceof SyntaxError; \n }\n }).call(this));\n"
+ },
+ {
+ "id": "7.6-18",
+ "path": "TestCases/chapter07/7.6/7.6-18.js",
+ "description": "7.6 - SyntaxError expected: reserved words used as Identifier Names in UTF8: for (for)",
+ "test": "assertTrue((function testcase() {\n try {\n eval(\"var f\\u006fr = 123;\"); \n return false;\n } catch (e) {\n return e instanceof SyntaxError; \n }\n }).call(this));\n"
+ },
+ {
+ "id": "7.6-19",
+ "path": "TestCases/chapter07/7.6/7.6-19.js",
+ "description": "7.6 - SyntaxError expected: reserved words used as Identifier Names in UTF8: switch (switch)",
+ "test": "assertTrue((function testcase() {\n try {\n eval(\"var switc\\u0068 = 123;\"); \n return false;\n } catch (e) {\n return e instanceof SyntaxError; \n }\n }).call(this));\n"
+ },
+ {
+ "id": "7.6-2",
+ "path": "TestCases/chapter07/7.6/7.6-2.js",
+ "description": "7.6 - SyntaxError expected: reserved words used as Identifier Names in UTF8: true (true)",
+ "test": "assertTrue((function testcase() {\n try {\n eval(\"var tr\\u0075e = 123;\"); \n return false;\n } catch (e) {\n return e instanceof SyntaxError; \n }\n }).call(this));\n"
+ },
+ {
+ "id": "7.6-20",
+ "path": "TestCases/chapter07/7.6/7.6-20.js",
+ "description": "7.6 - SyntaxError expected: reserved words used as Identifier Names in UTF8: while (while)",
+ "test": "assertTrue((function testcase() {\n try {\n eval(\"var \\u0077\\u0068\\u0069\\u006c\\u0065 = 123;\"); \n return false;\n } catch (e) {\n return e instanceof SyntaxError; \n }\n }).call(this));\n"
+ },
+ {
+ "id": "7.6-21",
+ "path": "TestCases/chapter07/7.6/7.6-21.js",
+ "description": "7.6 - SyntaxError expected: reserved words used as Identifier Names in UTF8: debugger (debugger)",
+ "test": "assertTrue((function testcase() {\n try {\n eval(\"var \\u0064ebugger = 123;\"); \n return false;\n } catch (e) {\n return e instanceof SyntaxError; \n }\n }).call(this));\n"
+ },
+ {
+ "id": "7.6-22",
+ "path": "TestCases/chapter07/7.6/7.6-22.js",
+ "description": "7.6 - SyntaxError expected: reserved words used as Identifier Names in UTF8: function (function)",
+ "test": "assertTrue((function testcase() {\n try {\n eval(\"var func\\u0074ion = 123;\"); \n return false;\n } catch (e) {\n return e instanceof SyntaxError; \n }\n }).call(this));\n"
+ },
+ {
+ "id": "7.6-23",
+ "path": "TestCases/chapter07/7.6/7.6-23.js",
+ "description": "7.6 - SyntaxError expected: reserved words used as Identifier Names in UTF8: this (this)",
+ "test": "assertTrue((function testcase() {\n try {\n eval(\"var thi\\u0073 = 123;\"); \n return false;\n } catch (e) {\n return e instanceof SyntaxError; \n }\n }).call(this));\n"
+ },
+ {
+ "id": "7.6-24",
+ "path": "TestCases/chapter07/7.6/7.6-24.js",
+ "description": "7.6 - SyntaxError expected: reserved words used as Identifier Names in UTF8: if (if)",
+ "test": "assertTrue((function testcase() {\n try {\n eval(\"var \\u0069\\u0066 = 123;\"); \n return false;\n } catch (e) {\n return e instanceof SyntaxError; \n }\n }).call(this));\n"
+ },
+ {
+ "id": "7.6-25",
+ "path": "TestCases/chapter07/7.6/7.6-25.js",
+ "description": "7.6 - SyntaxError expected: reserved words used as Identifier Names in UTF8: with (with)",
+ "test": "assertTrue((function testcase() {\n try {\n eval(\"var \\u0077ith = 123;\"); \n return false;\n } catch (e) {\n return e instanceof SyntaxError; \n }\n }).call(this));\n"
+ },
+ {
+ "id": "7.6-26",
+ "path": "TestCases/chapter07/7.6/7.6-26.js",
+ "description": "7.6 - SyntaxError expected: reserved words used as Identifier Names in UTF8: default (default)",
+ "test": "assertTrue((function testcase() {\n try {\n eval(\"var def\\u0061ult = 123;\"); \n return false;\n } catch (e) {\n return e instanceof SyntaxError; \n }\n }).call(this));\n"
+ },
+ {
+ "id": "7.6-27",
+ "path": "TestCases/chapter07/7.6/7.6-27.js",
+ "description": "7.6 - SyntaxError expected: reserved words used as Identifier Names in UTF8: throw (throw)",
+ "test": "assertTrue((function testcase() {\n try {\n eval(\"var thro\\u0077 = 123;\"); \n return false;\n } catch (e) {\n return e instanceof SyntaxError; \n }\n }).call(this));\n"
+ },
+ {
+ "id": "7.6-28",
+ "path": "TestCases/chapter07/7.6/7.6-28.js",
+ "description": "7.6 - SyntaxError expected: reserved words used as Identifier Names in UTF8: in (in)",
+ "test": "assertTrue((function testcase() {\n try {\n eval(\"var \\u0069\\u006e = 123;\"); \n return false;\n } catch (e) {\n return e instanceof SyntaxError; \n }\n }).call(this));\n"
+ },
+ {
+ "id": "7.6-29",
+ "path": "TestCases/chapter07/7.6/7.6-29.js",
+ "description": "7.6 - SyntaxError expected: reserved words used as Identifier Names in UTF8: delete (delete)",
+ "test": "assertTrue((function testcase() {\n try {\n eval(\"var \\u0064elete = 123;\"); \n return false;\n } catch (e) {\n return e instanceof SyntaxError; \n }\n }).call(this));\n"
+ },
+ {
+ "id": "7.6-3",
+ "path": "TestCases/chapter07/7.6/7.6-3.js",
+ "description": "7.6 - SyntaxError expected: reserved words used as Identifier Names in UTF8: false (false)",
+ "test": "assertTrue((function testcase() {\n try {\n eval(\"var fals\\u0065 = 123;\"); \n return false;\n } catch (e) {\n return e instanceof SyntaxError; \n }\n }).call(this));\n"
+ },
+ {
+ "id": "7.6-30",
+ "path": "TestCases/chapter07/7.6/7.6-30.js",
+ "description": "7.6 - SyntaxError expected: reserved words used as Identifier Names in UTF8: class (class)",
+ "test": "assertTrue((function testcase() {\n try {\n eval(\"var cla\\u0073s = 123;\"); \n return false;\n } catch (e) {\n return e instanceof SyntaxError; \n }\n }).call(this));\n"
+ },
+ {
+ "id": "7.6-31",
+ "path": "TestCases/chapter07/7.6/7.6-31.js",
+ "description": "7.6 - SyntaxError expected: reserved words used as Identifier Names in UTF8: extends (extends)",
+ "test": "assertTrue((function testcase() {\n try {\n eval(\"var extend\\u0073 = 123;\"); \n return false;\n } catch (e) {\n return e instanceof SyntaxError; \n }\n }).call(this));\n"
+ },
+ {
+ "id": "7.6-32",
+ "path": "TestCases/chapter07/7.6/7.6-32.js",
+ "description": "7.6 - SyntaxError expected: reserved words used as Identifier Names in UTF8: enum (enum)",
+ "test": "assertTrue((function testcase() {\n try {\n eval(\"var \\u0065\\u006e\\u0075\\u006d = 123;\"); \n return false;\n } catch (e) {\n return e instanceof SyntaxError; \n }\n }).call(this));\n"
+ },
+ {
+ "id": "7.6-33",
+ "path": "TestCases/chapter07/7.6/7.6-33.js",
+ "description": "7.6 - SyntaxError expected: reserved words used as Identifier Names in UTF8: super (super)",
+ "test": "assertTrue((function testcase() {\n try {\n eval(\"var \\u0073uper = 123;\"); \n return false;\n } catch (e) {\n return e instanceof SyntaxError; \n }\n }).call(this));\n"
+ },
+ {
+ "id": "7.6-34",
+ "path": "TestCases/chapter07/7.6/7.6-34.js",
+ "description": "7.6 - SyntaxError expected: reserved words used as Identifier Names in UTF8: const (const)",
+ "test": "assertTrue((function testcase() {\n try {\n eval(\"var co\\u006est = 123;\"); \n return false;\n } catch (e) {\n return e instanceof SyntaxError; \n }\n }).call(this));\n"
+ },
+ {
+ "id": "7.6-35",
+ "path": "TestCases/chapter07/7.6/7.6-35.js",
+ "description": "7.6 - SyntaxError expected: reserved words used as Identifier Names in UTF8: export (export)",
+ "test": "assertTrue((function testcase() {\n try {\n eval(\"var expor\\u0074 = 123;\"); \n return false;\n } catch (e) {\n return e instanceof SyntaxError; \n }\n }).call(this));\n"
+ },
+ {
+ "id": "7.6-36",
+ "path": "TestCases/chapter07/7.6/7.6-36.js",
+ "description": "7.6 - SyntaxError expected: reserved words used as Identifier Names in UTF8: import (import)",
+ "test": "assertTrue((function testcase() {\n try {\n eval(\"var \\u0069\\u006d\\u0070\\u006f\\u0072\\u0074 = 123;\"); \n return false;\n } catch (e) {\n return e instanceof SyntaxError; \n }\n }).call(this));\n"
+ },
+ {
+ "id": "7.6-4",
+ "path": "TestCases/chapter07/7.6/7.6-4.js",
+ "description": "7.6 - SyntaxError expected: reserved words used as Identifier Names in UTF8: break (break)",
+ "test": "assertTrue((function testcase() {\n try {\n eval(\"var \\u0062\\u0072\\u0065\\u0061\\u006b = 123;\"); \n return false;\n } catch (e) {\n return e instanceof SyntaxError; \n }\n }).call(this));\n"
+ },
+ {
+ "id": "7.6-5",
+ "path": "TestCases/chapter07/7.6/7.6-5.js",
+ "description": "7.6 - SyntaxError expected: reserved words used as Identifier Names in UTF8: case (case)",
+ "test": "assertTrue((function testcase() {\n try {\n eval(\"var \\u0063ase = 123;\"); \n return false;\n } catch (e) {\n return e instanceof SyntaxError; \n }\n }).call(this));\n"
+ },
+ {
+ "id": "7.6-6",
+ "path": "TestCases/chapter07/7.6/7.6-6.js",
+ "description": "7.6 - SyntaxError expected: reserved words used as Identifier Names in UTF8: instanceof (instanceof)",
+ "test": "assertTrue((function testcase() {\n try {\n eval(\"var insta\\u006eceof = 123;\"); \n return false;\n } catch (e) {\n return e instanceof SyntaxError; \n }\n }).call(this));\n"
+ },
+ {
+ "id": "7.6-7",
+ "path": "TestCases/chapter07/7.6/7.6-7.js",
+ "description": "7.6 - SyntaxError expected: reserved words used as Identifier Names in UTF8: typeof (typeof)",
+ "test": "assertTrue((function testcase() {\n try {\n eval(\"var typeo\\u0066 = 123;\"); \n return false;\n } catch (e) {\n return e instanceof SyntaxError; \n }\n }).call(this));\n"
+ },
+ {
+ "id": "7.6-8",
+ "path": "TestCases/chapter07/7.6/7.6-8.js",
+ "description": "7.6 - SyntaxError expected: reserved words used as Identifier Names in UTF8: do (do)",
+ "test": "assertTrue((function testcase() {\n try {\n eval(\"var \\u0064\\u006f = 123;\"); \n return false;\n } catch (e) {\n return e instanceof SyntaxError; \n }\n }).call(this));\n"
+ },
+ {
+ "id": "7.6-9",
+ "path": "TestCases/chapter07/7.6/7.6-9.js",
+ "description": "7.6 - SyntaxError expected: reserved words used as Identifier Names in UTF8: else (else) (null)",
+ "test": "assertTrue((function testcase() {\n try {\n eval(\"var \\u0065lse = 123;\"); \n return false;\n } catch (e) {\n return e instanceof SyntaxError; \n }\n }).call(this));\n"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/7.6_Identifiers.json b/website/resources/scripts/testcases2/7.6_Identifiers.json
new file mode 100644
index 000000000..e4cf0899c
--- /dev/null
+++ b/website/resources/scripts/testcases2/7.6_Identifiers.json
@@ -0,0 +1,92 @@
+{
+ "testCollection": {
+ "name": "7.6_Identifiers",
+ "numTests": 15,
+ "tests": [
+ {
+ "section": "7.6",
+ "description": "Create variable $",
+ "test": "//CHECK#1\nvar $ = 1;\nif ($ !== 1) {\n $ERROR('#1: var $ = 1; $ === 1. Actual: ' + ($));\n}\n",
+ "id": "S7.6_A1.2_T1"
+ },
+ {
+ "section": "7.6",
+ "description": "The $ as unicode character \\u0024",
+ "test": "//CHECK#1\nvar \\u0024 = 1;\nif ($ !== 1) {\n $ERROR('#1: var \\\\u0024 = 1; $ === 1. Actual: ' + ($));\n}\n",
+ "id": "S7.6_A1.2_T2"
+ },
+ {
+ "section": "7.6",
+ "description": "The $ as unicode character \\u0024",
+ "test": "//CHECK#1\nvar identifier = String.fromCharCode(0x0024);\neval(\"var \" + identifier + \"=1\");\nif (eval(identifier + \"===1\") !== true) {\n $ERROR('#1: var identifier = String.fromCharCode(0x0024); eval(\"var \" + identifier + \"=1\"); eval(identifier + \"===1\") === true');\n}\n\n//CHECK#2\nif (\"$\" !== String.fromCharCode(0x0024)) {\n $ERROR('#2: \"$\" === String.fromCharCode(0x0024)');\n}\n",
+ "id": "S7.6_A1.2_T3"
+ },
+ {
+ "section": "7.6",
+ "description": "Create variable _",
+ "test": "//CHECK#1\nvar _ = 1;\nif (_ !== 1) {\n $ERROR('#1: var _ = 1; _ === 1. Actual: ' + (_));\n}\n",
+ "id": "S7.6_A1.3_T1"
+ },
+ {
+ "section": "7.6",
+ "description": "The _ as unicode character \\u005F",
+ "test": "//CHECK#1\nvar \\u005F = 1;\nif (_ !== 1) {\n $ERROR('#1: var \\\\u005F = 1; _ === 1. Actual: ' + (_));\n}\n",
+ "id": "S7.6_A1.3_T2"
+ },
+ {
+ "section": "7.6",
+ "description": "The _ as unicode character \\u005F",
+ "test": "//CHECK#1\nvar identifier = String.fromCharCode(0x005F);\neval(\"var \" + identifier + \"=1\");\nif (eval(identifier + \"===1\") !== true) {\n $ERROR('#1: var identifier = String.fromCharCode(0x005F); eval(\"var \" + identifier + \"=1\"); eval(identifier + \"===1\") === true');\n}\n\n//CHECK#2\nif (\"_\" !== String.fromCharCode(0x005F)) {\n $ERROR('#2: \"_\" === String.fromCharCode(0x005F)');\n}\n",
+ "id": "S7.6_A1.3_T3"
+ },
+ {
+ "section": "7.6",
+ "description": "IdentifierStart :: UnicodeLetter",
+ "test": "//CHECK#1\ntry {\n var identifier = \"x\" + \"x\"; \n eval(\"var \" + identifier + \"=1\");\n if (xx !== 1) {\n $ERROR('#1.1: var identifier = \"x\" + \"x\"; eval(\"var \" + identifier + \"=1\"); xx === 1. Actual: ' + (xx));\n }\n} catch (e) {\n $ERROR('#1.2: var identifier = \"x\" + \"x\"; eval(\"var \" + identifier + \"=1\"); xx === 1. Actual: ' + (xx));\n}\n\n//CHECK#2\ntry {\n var identifier = \"x\" + String.fromCharCode(0x0078); \n eval(\"var \" + identifier + \"=2\");\n if (xx !== 2) {\n $ERROR('#2.1: var identifier = \"x\" + String.fromCharCode(0x0078); eval(\"var \" + identifier + \"=2\"); xx === 2. Actual: ' + (xx));\n }\n} catch (e) {\n $ERROR('#2.2: var identifier = \"x\" + String.fromCharCode(0x0078); eval(\"var \" + identifier + \"=2\"); xx === 2. Actual: ' + (xx));\n}\n\n//CHECK#3\ntry {\n var identifier = String.fromCharCode(0x0078) + String.fromCharCode(0x0078); \n eval(\"var \" + identifier + \"=3\");\n if (xx !== 3) {\n $ERROR('#3.1: var identifier = String.fromCharCode(0x0078) + String.fromCharCode(0x0078); eval(\"var \" + identifier + \"=3\"); xx === 3. Actual: ' + (xx));\n }\n} catch (e) {\n $ERROR('#3.2: var identifier = String.fromCharCode(0x0078) + String.fromCharCode(0x0078); eval(\"var \" + identifier + \"=3\"); xx === 3. Actual: ' + (xx));\n}\n\n//CHECK#4\ntry {\n var identifier = \"$\" + String.fromCharCode(0x0078); \n eval(\"var \" + identifier + \"=4\");\n if ($x !== 4) {\n $ERROR('#4.1: var identifier = \"$\" + String.fromCharCode(0x0078); eval(\"var \" + identifier + \"=4\"); $x === 4. Actual: ' + ($x));\n }\n} catch (e) {\n $ERROR('#4.2: var identifier = \"$\" + String.fromCharCode(0x0078); eval(\"var \" + identifier + \"=4\"); $x === 4. Actual: ' + ($x));\n}\n\n//CHECK#5\ntry {\n var identifier = \"_\" + String.fromCharCode(0x0078); \n eval(\"var \" + identifier + \"=5\");\n if (_x !== 5) {\n $ERROR('#5.1: var identifier = \"_\" + String.fromCharCode(0x0078); eval(\"var \" + identifier + \"=5\"); _x === 5. Actual: ' + (_x));\n }\n} catch (e) {\n $ERROR('#5.2: var identifier = \"_\" + String.fromCharCode(0x0078); eval(\"var \" + identifier + \"=5\"); _x === 5. Actual: ' + (_x));\n}\n\n//CHECK#6\ntry {\n var \\u0078x = 6;\n if (xx !== 6) {\n $ERROR('#6.1: var \\\\u0078x = 1; xx === 6. Actual: ' + (xx));\n }\n} catch (e) {\n $ERROR('#6.2: var \\\\u0078x = 1; xx === 6. Actual: ' + (xx));\n}\n",
+ "id": "S7.6_A2.1_T1"
+ },
+ {
+ "section": "7.6",
+ "description": "IdentifierStart :: $",
+ "test": "//CHECK#1\ntry {\n var identifier = \"x\" + \"$\"; \n eval(\"var \" + identifier + \"=1\");\n if (x$ !== 1) {\n $ERROR('#1.1: var identifier = \"x\" + \"$\"; eval(\"var \" + identifier + \"=1\"); x$ === 1. Actual: ' + (x$));\n }\n} catch (e) {\n $ERROR('#1.2: var identifier = \"x\" + \"$\"; eval(\"var \" + identifier + \"=1\"); x$ === 1. Actual: ' + (x$));\n}\n\n//CHECK#2\ntry {\n var identifier = String.fromCharCode(0x0078) + \"$\"; \n eval(\"var \" + identifier + \"=2\");\n if (x$ !== 2) {\n $ERROR('#2.1: var identifier = String.fromCharCode(0x0078) + \"$\"; eval(\"var \" + identifier + \"=2\"); x$ === 2. Actual: ' + (x$));\n }\n} catch (e) {\n $ERROR('#2.2: var identifier = String.fromCharCode(0x0078) + \"$\"; eval(\"var \" + identifier + \"=2\"); x$ === 2. Actual: ' + (x$));\n}\n\n//CHECK#3\ntry {\n var identifier = \"$\" + \"$\"; \n eval(\"var \" + identifier + \"=3\");\n if ($$ !== 3) {\n $ERROR('#3.1: var identifier = \"$\" + \"$\"; eval(\"var \" + identifier + \"=3\"); $$ === 3. Actual: ' + ($$));\n }\n} catch (e) {\n $ERROR('#3.2: var identifier = \"$\" + \"$\"; eval(\"var \" + identifier + \"=3\"); $$ === 3. Actual: ' + ($$));\n}\n\n//CHECK#4\ntry {\n var identifier = String.fromCharCode(0x0024) + String.fromCharCode(0x0024); \n eval(\"var \" + identifier + \"=4\");\n if ($$ !== 4) {\n $ERROR('#4.1: var identifier = String.fromCharCode(0x0024) + String.fromCharCode(0x0024); eval(\"var \" + identifier + \"=4\"); $$ === 4. Actual: ' + ($$));\n }\n} catch (e) {\n $ERROR('#4.2: var identifier = String.fromCharCode(0x0024) + String.fromCharCode(0x0024); eval(\"var \" + identifier + \"=4\"); $$ === 4. Actual: ' + ($$));\n}\n\n//CHECK#5\ntry {\n var identifier = \"_\" + \"$\"; \n eval(\"var \" + identifier + \"=5\");\n if (_$ !== 5) {\n $ERROR('#5.1: var identifier = \"_\" + \"$\"; eval(\"var \" + identifier + \"=5\"); _$ === 5. Actual: ' + (_$));\n }\n} catch (e) {\n $ERROR('#5.2: var identifier = \"_\" + \"$\"; eval(\"var \" + identifier + \"=5\"); _$ === 5. Actual: ' + (_$));\n}\n\n//CHECK#6\ntry {\n var \\u0078$ = 6;\n if (x$ !== 6) {\n $ERROR('#6.1: var \\\\u0078$ = 1; x$ === 6. Actual: ' + (x$));\n }\n} catch (e) {\n $ERROR('#6.2: var \\\\u0078$ = 1; x$ === 6. Actual: ' + (x$));\n}\n",
+ "id": "S7.6_A2.1_T2"
+ },
+ {
+ "section": "7.6",
+ "description": "IdentifierStart :: _",
+ "test": "//CHECK#1\ntry {\n var identifier = \"x\" + \"_\"; \n eval(\"var \" + identifier + \"=1\");\n if (x_ !== 1) {\n $ERROR('#1.1: var identifier = \"x\" + \"_\"; eval(\"var \" + identifier + \"=1\"); x_ === 1. Actual: ' + (x_));\n }\n} catch (e) {\n $ERROR('#1.2: var identifier = \"x\" + \"_\"; eval(\"var \" + identifier + \"=1\"); x_ === 1. Actual: ' + (x_));\n}\n\n//CHECK#2\ntry {\n var identifier = String.fromCharCode(0x0078) + \"_\"; \n eval(\"var \" + identifier + \"=2\");\n if (x_ !== 2) {\n $ERROR('#2.1: var identifier = String.fromCharCode(0x0078) + \"_\"; eval(\"var \" + identifier + \"=2\"); x_ === 2. Actual: ' + (x_));\n }\n} catch (e) {\n $ERROR('#2.2: var identifier = String.fromCharCode(0x0078) + \"_\"; eval(\"var \" + identifier + \"=2\"); x_ === 2. Actual: ' + (x_));\n}\n\n//CHECK#3\ntry {\n var identifier = \"_\" + \"_\"; \n eval(\"var \" + identifier + \"=3\");\n if (__ !== 3) {\n $ERROR('#3.1: var identifier = \"_\" + \"_\"; eval(\"var \" + identifier + \"=3\"); __ === 3. Actual: ' + (__));\n }\n} catch (e) {\n $ERROR('#3.2: var identifier = \"_\" + \"_\"; eval(\"var \" + identifier + \"=3\"); __ === 3. Actual: ' + (__));\n}\n\n//CHECK#4\ntry {\n var identifier = String.fromCharCode(0x005F) + String.fromCharCode(0x005F); \n eval(\"var \" + identifier + \"=4\");\n if (__ !== 4) {\n $ERROR('#4.1: var identifier = String.fromCharCode(0x005F) + String.fromCharCode(0x005F); eval(\"var \" + identifier + \"=4\"); __ === 4. Actual: ' + (__));\n }\n} catch (e) {\n $ERROR('#4.2: var identifier = String.fromCharCode(0x005F) + String.fromCharCode(0x005F); eval(\"var \" + identifier + \"=4\"); __ === 4. Actual: ' + (__));\n}\n\n//CHECK#5\ntry {\n var identifier = \"_\" + \"_\"; \n eval(\"var \" + identifier + \"=5\");\n if (__ !== 5) {\n $ERROR('#5.1: var identifier = \"_\" + \"_\"; eval(\"var \" + identifier + \"=5\"); __ === 5. Actual: ' + (__));\n }\n} catch (e) {\n $ERROR('#5.2: var identifier = \"_\" + \"_\"; eval(\"var \" + identifier + \"=5\"); __ === 5. Actual: ' + (__));\n}\n\n//CHECK#6\ntry {\n var \\u0078_ = 6;\n if (x_ !== 6) {\n $ERROR('#6.1: var \\\\u0078_ = 1; x_ === 6. Actual: ' + (x_));\n }\n} catch (e) {\n $ERROR('#6.2: var \\\\u0078_ = 1; x_ === 6. Actual: ' + (x_));\n}\n",
+ "id": "S7.6_A2.1_T3"
+ },
+ {
+ "section": "7.6",
+ "description": "IdentifierStart :: \\UnicodeEscapeSequence",
+ "test": "//CHECK#1\ntry {\n var x\\u0078 = 1;\n if (xx !== 1) {\n $ERROR('#1.1: var x\\\\u0078 = 1; xx === 1. Actual: ' + (xx));\n }\n} catch (e) {\n $ERROR('#1.2: var x\\\\u0078 = 1; xx === 1. Actual: ' + (xx));\n}\n\n//CHECK#2\ntry {\n var \\u0078\\u0078 = 2;\n if (xx !== 2) {\n $ERROR('#2.1: var \\\\u0078\\\\u0078 = 1; xx === 2. Actual: ' + (xx));\n }\n} catch (e) {\n $ERROR('#2.2: var \\\\u0078\\\\u0078 = 1; xx === 2. Actual: ' + (xx));\n}\n\n//CHECK#3\ntry {\n var \\u0024\\u0024 = 3;\n if ($$ !== 3) {\n $ERROR('#3.1: var \\\\u0024\\\\u0024 = 1; $$ === 3. Actual: ' + ($$));\n }\n} catch (e) {\n $ERROR('#3.2: var \\\\u0024\\\\u0024 = 1; $$ === 3. Actual: ' + ($$));\n}\n\n//CHECK#4\ntry {\n var \\u005F\\u005F = 4;\n if (__ !== 4) {\n $ERROR('#4.1: var \\\\u005F\\\\u005F = 1; __ === 4. Actual: ' + (__));\n }\n} catch (e) {\n $ERROR('#4.2: var \\\\u005F\\\\u005F = 1; __ === 4. Actual: ' + (__));\n}\n",
+ "id": "S7.6_A2.1_T4"
+ },
+ {
+ "section": "7.6",
+ "description": "Check ENGLISH CAPITAL ALPHABET",
+ "test": "//CHECK#A-Z\n\\u0041 = 1;\nif (A !== 1) {\n $ERROR('#A');\n}\n\\u0042 = 1;\nif (B !== 1) {\n $ERROR('#B');\n}\n\\u0043 = 1;\nif (C !== 1) {\n $ERROR('#C');\n}\n\\u0044 = 1;\nif (D !== 1) {\n $ERROR('#D');\n}\n\\u0045 = 1;\nif (E !== 1) {\n $ERROR('#E');\n}\n\\u0046 = 1;\nif (F !== 1) {\n $ERROR('#F');\n}\n\\u0047 = 1;\nif (G !== 1) {\n $ERROR('#G');\n}\n\\u0048 = 1;\nif (H !== 1) {\n $ERROR('#H');\n}\n\\u0049 = 1;\nif (I !== 1) {\n $ERROR('#I');\n}\n\\u004A = 1;\nif (J !== 1) {\n $ERROR('#J');\n}\n\\u004B = 1;\nif (K !== 1) {\n $ERROR('#K');\n}\n\\u004C = 1;\nif (L !== 1) {\n $ERROR('#L');\n}\n\\u004D = 1;\nif (M !== 1) {\n $ERROR('#M');\n}\n\\u004E = 1;\nif (N !== 1) {\n $ERROR('#N');\n}\n\\u004F = 1;\nif (O !== 1) {\n $ERROR('#O');\n}\n\\u0050 = 1;\nif (P !== 1) {\n $ERROR('#P');\n}\n\\u0051 = 1;\nif (Q !== 1) {\n $ERROR('#Q');\n}\n\\u0052 = 1;\nif (R !== 1) {\n $ERROR('#R');\n}\n\\u0053 = 1;\nif (S !== 1) {\n $ERROR('#S');\n}\n\\u0054 = 1;\nif (T !== 1) {\n $ERROR('#T');\n}\n\\u0055 = 1;\nif (U !== 1) {\n $ERROR('#U');\n}\n\\u0056 = 1;\nif (V !== 1) {\n $ERROR('#V');\n}\n\\u0057 = 1;\nif (W !== 1) {\n $ERROR('#W');\n}\n\\u0058 = 1;\nif (X !== 1) {\n $ERROR('#X');\n}\n\\u0059 = 1;\nif (Y !== 1) {\n $ERROR('#Y');\n}\n\\u005A = 1;\nif (Z !== 1) {\n $ERROR('#Z');\n}\n",
+ "id": "S7.6_A4.1_T1"
+ },
+ {
+ "section": "7.6",
+ "description": "Check ENGLISH SMALL ALPHABET",
+ "test": "//CHECK#a-z\n\\u0061 = 1;\nif (a !== 1) {\n $ERROR('#a');\n}\n\\u0062 = 1;\nif (b !== 1) {\n $ERROR('#b');\n}\n\\u0063 = 1;\nif (c !== 1) {\n $ERROR('#c');\n}\n\\u0064 = 1;\nif (d !== 1) {\n $ERROR('#d');\n}\n\\u0065 = 1;\nif (e !== 1) {\n $ERROR('#e');\n}\n\\u0066 = 1;\nif (f !== 1) {\n $ERROR('#f');\n}\n\\u0067 = 1;\nif (g !== 1) {\n $ERROR('#g');\n}\n\\u0068 = 1;\nif (h !== 1) {\n $ERROR('#h');\n}\n\\u0069 = 1;\nif (i !== 1) {\n $ERROR('#i');\n}\n\\u006A = 1;\nif (j !== 1) {\n $ERROR('#j');\n}\n\\u006B = 1;\nif (k !== 1) {\n $ERROR('#k');\n}\n\\u006C = 1;\nif (l !== 1) {\n $ERROR('#l');\n}\n\\u006D = 1;\nif (m !== 1) {\n $ERROR('#m');\n}\n\\u006E = 1;\nif (n !== 1) {\n $ERROR('#n');\n}\n\\u006F = 1;\nif (o !== 1) {\n $ERROR('#o');\n}\n\\u0070 = 1;\nif (p !== 1) {\n $ERROR('#p');\n}\n\\u0071 = 1;\nif (q !== 1) {\n $ERROR('#q');\n}\n\\u0072 = 1;\nif (r !== 1) {\n $ERROR('#r');\n}\n\\u0073 = 1;\nif (s !== 1) {\n $ERROR('#s');\n}\n\\u0074 = 1;\nif (t !== 1) {\n $ERROR('#t');\n}\n\\u0075 = 1;\nif (u !== 1) {\n $ERROR('#u');\n}\n\\u0076 = 1;\nif (v !== 1) {\n $ERROR('#v');\n}\n\\u0077 = 1;\nif (w !== 1) {\n $ERROR('#w');\n}\n\\u0078 = 1;\nif (x !== 1) {\n $ERROR('#x');\n}\n\\u0079 = 1;\nif (y !== 1) {\n $ERROR('#y');\n}\n\\u007A = 1;\nif (z !== 1) {\n $ERROR('#z');\n}\n\n",
+ "id": "S7.6_A4.1_T2"
+ },
+ {
+ "test": "��/"
+ },
+ {
+ "test": "��/"
+ },
+ {
+ "section": "7.6",
+ "description": "Identifier is $+ANY_DIGIT",
+ "test": "//CHECK#0-9\n$\\u0030 = 0;\nif ($0 !== 0) {\n $ERROR('#0: $\\\\u0030 = 0; $0 === 0');\n}\n$\\u0031 = 1;\nif ($1 !== 1) {\n $ERROR('#1: $\\\\u0031 = 1; $1 === 1');\n}\n$\\u0032 = 2;\nif ($2 !== 2) {\n $ERROR('#2: $\\\\u0032 = 2; $2 === 2');\n}\n$\\u0033 = 3;\nif ($3 !== 3) {\n $ERROR('#3: $\\\\u0033 = 3; $3 === 3');\n}\n$\\u0034 = 4;\nif ($4 !== 4) {\n $ERROR('#4: $\\\\u0034 = 4; $4 === 4');\n}\n$\\u0035 = 5;\nif ($5 !== 5) {\n $ERROR('#5: $\\\\u0035 = 5; $5 === 5');\n}\n$\\u0036 = 6;\nif ($6 !== 6) {\n $ERROR('#6: $\\\\u0036 = 6; $6 === 6');\n}\n$\\u0037 = 7;\nif ($7 !== 7) {\n $ERROR('#7: $\\\\u0037 = 7; $7 === 7');\n}\n$\\u0038 = 8;\nif ($8 !== 8) {\n $ERROR('#8: $\\\\u0038 = 8; $8 === 8');\n}\n$\\u0039 = 9;\nif ($9 !== 9) {\n $ERROR('#9: $\\\\u0039 = 9; $9 === 9');\n}\n",
+ "id": "S7.6_A4.3_T1"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/7.7_Punctuators.json b/website/resources/scripts/testcases2/7.7_Punctuators.json
new file mode 100644
index 000000000..7494efc7e
--- /dev/null
+++ b/website/resources/scripts/testcases2/7.7_Punctuators.json
@@ -0,0 +1,84 @@
+{
+ "testCollection": {
+ "name": "7.7_Punctuators",
+ "numTests": 11,
+ "tests": [
+ {
+ "section": "7.7",
+ "description": "Using all punctuators",
+ "test": "//CHECK#1\n ({});[];\n this.NaN; \n 1 < 2 > 3 <= 4 >= 5 == 6 != 7 === 8 !== 9;\n 1 + 2 - 3 * 4 % 5 / 6 << 7 >> 8 >>> 9;\n this.NaN++; ++this.NaN; this.NaN--; --this.NaN;\n 1 & 2 | 3 ^ 4 && !5 || ~6;\n 1 ? 2 : 3;\n this.NaN = 1; this.NaN += 2; this.NaN -= 3; this.NaN *= 4; this.NaN /= 5;\n this.NaN %= 6; this.NaN <<= 7; this.NaN >>= 8; this.NaN >>>= 9;\n this.NaN &= 1; this.NaN |= 2; this.NaN ^= 3; \n",
+ "id": "S7.7_A1"
+ },
+ {
+ "section": "7.7",
+ "description": "Try to use {} as a Unicode \\u007B\\u007D",
+ "negative": "",
+ "test": "\\u007B\\u007D;\n",
+ "id": "S7.7_A2_T1"
+ },
+ {
+ "section": "7.7",
+ "description": "Try to use / as a Unicode \\u002F",
+ "negative": "",
+ "test": "1\\u002F2;\n",
+ "id": "S7.7_A2_T10"
+ },
+ {
+ "section": "7.7",
+ "description": "Try to use () as Unicode \\u00281\\u0029",
+ "negative": "",
+ "test": "\\u00281\\u0029;\n",
+ "id": "S7.7_A2_T2"
+ },
+ {
+ "section": "7.7",
+ "description": "Try to use [] as a Unicode \\u005B\\u005D",
+ "negative": "",
+ "test": "\\u005B\\u005D;\n",
+ "id": "S7.7_A2_T3"
+ },
+ {
+ "section": "7.7",
+ "description": ": Try to use ; as a Unicode \\u003B;",
+ "negative": "",
+ "test": "\\u003B;\n",
+ "id": "S7.7_A2_T4"
+ },
+ {
+ "section": "7.7",
+ "description": "Try to use . as a Unicode \\u002E",
+ "negative": "",
+ "test": "x = 1;\nthis\\u002Ex;\n",
+ "id": "S7.7_A2_T5"
+ },
+ {
+ "section": "7.7",
+ "description": "Try to use , as a Unicode \\u002C",
+ "negative": "",
+ "test": "1\\u002C2;\n",
+ "id": "S7.7_A2_T6"
+ },
+ {
+ "section": "7.7",
+ "description": "Try to use + as a Unicode \\u002B",
+ "negative": "",
+ "test": "1\\u002B2;\n",
+ "id": "S7.7_A2_T7"
+ },
+ {
+ "section": "7.7",
+ "description": "Try to use - as a Unicode \\u002D",
+ "negative": "",
+ "test": "1\\u002D2;\n",
+ "id": "S7.7_A2_T8"
+ },
+ {
+ "section": "7.7",
+ "description": "Try to use * as a Unicode \\u002A",
+ "negative": "",
+ "test": "1\\u002A2;\n",
+ "id": "S7.7_A2_T9"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/7.8.1_Null_Literals.json b/website/resources/scripts/testcases2/7.8.1_Null_Literals.json
new file mode 100644
index 000000000..e660adccd
--- /dev/null
+++ b/website/resources/scripts/testcases2/7.8.1_Null_Literals.json
@@ -0,0 +1,20 @@
+{
+ "testCollection": {
+ "name": "7.8.1_Null_Literals",
+ "numTests": 2,
+ "tests": [
+ {
+ "section": "7.8.1",
+ "description": "Check null === null",
+ "test": "//CHECK#1\nif (null !== null) {\n $ERROR('#1: null === null');\n} \n",
+ "id": "S7.8.1_A1_T1"
+ },
+ {
+ "section": "7.8.1",
+ "description": "Check RegExp(\"0\").exec(\"1\") === null",
+ "test": "//CHECK#1\nif (RegExp(\"0\").exec(\"1\") !== null) {\n $ERROR('#1: RegExp(\"0\").exec(\"1\") === null');\n} \n \n",
+ "id": "S7.8.1_A1_T2"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/7.8.2_Boolean_Literals.json b/website/resources/scripts/testcases2/7.8.2_Boolean_Literals.json
new file mode 100644
index 000000000..4b52942c1
--- /dev/null
+++ b/website/resources/scripts/testcases2/7.8.2_Boolean_Literals.json
@@ -0,0 +1,20 @@
+{
+ "testCollection": {
+ "name": "7.8.2_Boolean_Literals",
+ "numTests": 2,
+ "tests": [
+ {
+ "section": "7.8.2",
+ "description": "BooleanLiteral :: true",
+ "test": "//CHECK#1\nif (Boolean(true) !== true) {\n $ERROR('#1: Boolean(true) === true. Actual: Boolean(true) === ' + (Boolean(true)));\n} \n",
+ "id": "S7.8.2_A1_T1"
+ },
+ {
+ "section": "7.8.2",
+ "description": "BooleanLiteral :: false",
+ "test": "//CHECK#1\nif (Boolean(false) !== false) {\n $ERROR('#1: Boolean(false) === false. Actual: Boolean(false) === ' + (Boolean(false)));\n} \n \n",
+ "id": "S7.8.2_A1_T2"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/7.8.3.json b/website/resources/scripts/testcases2/7.8.3.json
new file mode 100644
index 000000000..1ff09803a
--- /dev/null
+++ b/website/resources/scripts/testcases2/7.8.3.json
@@ -0,0 +1,64 @@
+{
+ "testCollection": {
+ "name": "7.8.3",
+ "numTests": 7,
+ "tests": [
+ {
+ "id": "7.8.3-1-s",
+ "path": "TestCases/chapter07/7.8/7.8.3/7.8.3-1-s.js",
+ "description": "Strict Mode - octal extension (010) is forbidden in strict mode",
+ "test": "assertTrue((function testcase() {\n \"use strict\";\n try { \n eval(\"var _7_8_3_1 = 010;\");\n return false;\n } catch (e) {\n return e instanceof SyntaxError && typeof _7_8_3_1 === \"undefined\";\n }\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict())",
+ "strict_only": ""
+ },
+ {
+ "id": "7.8.3-2-s",
+ "path": "TestCases/chapter07/7.8/7.8.3/7.8.3-2-s.js",
+ "description": "Strict Mode - octal extension (00) is forbidden in strict mode",
+ "test": "assertTrue((function testcase() {\n \"use strict\";\n try {\n eval(\"var _7_8_3_2 = 00;\");\n return false;\n } catch (e) {\n return e instanceof SyntaxError && typeof _7_8_3_2 === \"undefined\";\n }\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict())",
+ "strict_only": ""
+ },
+ {
+ "id": "7.8.3-3-s",
+ "path": "TestCases/chapter07/7.8/7.8.3/7.8.3-3-s.js",
+ "description": "Strict Mode - octal extension (01) is forbidden in strict mode",
+ "test": "assertTrue((function testcase() {\n \"use strict\";\n try {\n eval(\"var _7_8_3_3 = 01;\");\n return false;\n } catch (e) {\n return e instanceof SyntaxError && typeof _7_8_3_3 === \"undefined\";\n }\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict())",
+ "strict_only": ""
+ },
+ {
+ "id": "7.8.3-4-s",
+ "path": "TestCases/chapter07/7.8/7.8.3/7.8.3-4-s.js",
+ "description": "Strict Mode - octal extension (06) is forbidden in strict mode",
+ "test": "assertTrue((function testcase() {\n \"use strict\";\n try {\n eval(\"var _7_8_3_4 = 06;\");\n return false;\n } catch (e) {\n return e instanceof SyntaxError && typeof _7_8_3_4 === \"undefined\";\n }\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict())",
+ "strict_only": ""
+ },
+ {
+ "id": "7.8.3-5-s",
+ "path": "TestCases/chapter07/7.8/7.8.3/7.8.3-5-s.js",
+ "description": "Strict Mode - octal extension (07) is forbidden in strict mode",
+ "test": "assertTrue((function testcase() {\n \"use strict\";\n try {\n eval(\"var _7_8_3_5 = 07;\");\n return false;\n } catch (e) {\n return e instanceof SyntaxError && typeof _7_8_3_5 === \"undefined\";\n }\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict())",
+ "strict_only": ""
+ },
+ {
+ "id": "7.8.3-6-s",
+ "path": "TestCases/chapter07/7.8/7.8.3/7.8.3-6-s.js",
+ "description": "Strict Mode - octal extension (000) is forbidden in strict mode",
+ "test": "assertTrue((function testcase() {\n \"use strict\";\n try {\n eval(\"var _7_8_3_6 = 000;\");\n return false;\n } catch (e) {\n return e instanceof SyntaxError && typeof _7_8_3_6 === \"undefined\";\n }\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict())",
+ "strict_only": ""
+ },
+ {
+ "id": "7.8.3-7-s",
+ "path": "TestCases/chapter07/7.8/7.8.3/7.8.3-7-s.js",
+ "description": "Strict Mode - octal extension (005) is forbidden in strict mode",
+ "test": "assertTrue((function testcase() {\n \"use strict\";\n try {\n eval(\"var _7_8_3_7 = 005;\");\n return false;\n } catch (e) {\n return e instanceof SyntaxError && typeof _7_8_3_7 === \"undefined\";\n }\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict())",
+ "strict_only": ""
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/7.8.3_Numeric_Literals.json b/website/resources/scripts/testcases2/7.8.3_Numeric_Literals.json
new file mode 100644
index 000000000..d5706ae2c
--- /dev/null
+++ b/website/resources/scripts/testcases2/7.8.3_Numeric_Literals.json
@@ -0,0 +1,440 @@
+{
+ "testCollection": {
+ "name": "7.8.3_Numeric_Literals",
+ "numTests": 70,
+ "tests": [
+ {
+ "section": "7.8.3",
+ "description": "DecimalIntegerLiteral :: 0, NoNZeroDigit",
+ "test": "//CHECK#0\nif (0 !== 0) {\n $ERROR('#0: 0 === 0');\n}\n\n//CHECK#1\nif (1 !== 1) {\n $ERROR('#1: 1 === 1');\n}\n\n//CHECK#2\nif (2 !== 2) {\n $ERROR('#2: 2 === 2');\n}\n\n//CHECK#3\nif (3 !== 3) {\n $ERROR('#3: 3 === 3');\n}\n\n//CHECK#4\nif (4 !== 4) {\n $ERROR('#4: 4 === 4');\n}\n\n//CHECK#5\nif (5 !== 5) {\n $ERROR('#5: 5 === 5');\n}\n\n//CHECK#6\nif (6 !== 6) {\n $ERROR('#6: 6 === 6');\n}\n\n//CHECK#7\nif (7 !== 7) {\n $ERROR('#7: 7 === 7');\n}\n\n//CHECK#8\nif (8 !== 8) {\n $ERROR('#8: 8 === 8');\n}\n\n//CHECK#9\nif (9 !== 9) {\n $ERROR('#9: 9 === 9');\n}\n",
+ "id": "S7.8.3_A1.1_T1"
+ },
+ {
+ "section": "7.8.3",
+ "description": "DecimalIntegerLiteral :: NoNZeroDigit DecimalDigits",
+ "test": "//CHECK#1\nif (11 !== 11) {\n $ERROR('#1: 11 === 11');\n}\n\n//CHECK#2\nif (22 !== 22) {\n $ERROR('#2: 22 === 22');\n}\n\n//CHECK#3\nif (33 !== 33) {\n $ERROR('#3: 33 === 33');\n}\n\n//CHECK#4\nif (44 !== 44) {\n $ERROR('#4: 44 === 44');\n}\n\n//CHECK#5\nif (55 !== 55) {\n $ERROR('#5: 55 === 55');\n}\n\n//CHECK#6\nif (66 !== 66) {\n $ERROR('#6: 66 === 66');\n}\n\n//CHECK#7\nif (77 !== 77) {\n $ERROR('#7: 77 === 77');\n}\n\n//CHECK#8\nif (88 !== 88) {\n $ERROR('#8: 88 === 88');\n}\n\n//CHECK#9\nif (99 !== 99) {\n $ERROR('#9: 99 === 99');\n}\n",
+ "id": "S7.8.3_A1.1_T2"
+ },
+ {
+ "section": "7.8.3",
+ "description": "ExponentPart :: e DecimalDigits",
+ "test": "//CHECK#0\nif (0e1 !== 0) {\n $ERROR('#0: 0e1 === 0');\n}\n\n//CHECK#1\nif (1e1 !== 10) {\n $ERROR('#1: 1e1 === 10');\n}\n\n//CHECK#2\nif (2e1 !== 20) {\n $ERROR('#2: 2e1 === 20');\n}\n\n//CHECK#3\nif (3e1 !== 30) {\n $ERROR('#3: 3e1 === 30');\n}\n\n//CHECK#4\nif (4e1 !== 40) {\n $ERROR('#4: 4e1 === 40');\n}\n\n//CHECK#5\nif (5e1 !== 50) {\n $ERROR('#5: 5e1 === 50');\n}\n\n//CHECK#6\nif (6e1 !== 60) {\n $ERROR('#6: 6e1 === 60');\n}\n\n//CHECK#7\nif (7e1 !== 70) {\n $ERROR('#7: 7e1 === 70');\n}\n\n//CHECK#8\nif (8e1 !== 80) {\n $ERROR('#8: 8e1 === 80');\n}\n\n//CHECK#9\nif (9e1 !== 90) {\n $ERROR('#9: 9e1 === 90');\n}\n",
+ "id": "S7.8.3_A1.2_T1"
+ },
+ {
+ "section": "7.8.3",
+ "description": "ExponentPart :: E DecimalDigits",
+ "test": "//CHECK#0\nif (0E1 !== 0) {\n $ERROR('#0: 0E1 === 0');\n}\n\n//CHECK#1\nif (1E1 !== 10) {\n $ERROR('#1: 1E1 === 1');\n}\n\n//CHECK#2\nif (2E1 !== 20) {\n $ERROR('#2: 2E1 === 20');\n}\n\n//CHECK#3\nif (3E1 !== 30) {\n $ERROR('#3: 3E1 === 30');\n}\n\n//CHECK#4\nif (4E1 !== 40) {\n $ERROR('#4: 4E1 === 40');\n}\n\n//CHECK#5\nif (5E1 !== 50) {\n $ERROR('#5: 5E1 === 50');\n}\n\n//CHECK#6\nif (6E1 !== 60) {\n $ERROR('#6: 6E1 === 60');\n}\n\n//CHECK#7\nif (7E1 !== 70) {\n $ERROR('#7: 7E1 === 70');\n}\n\n//CHECK#8\nif (8E1 !== 80) {\n $ERROR('#8: 8E1 === 80');\n}\n\n//CHECK#9\nif (9E1 !== 90) {\n $ERROR('#9: 9E1 === 90');\n}\n",
+ "id": "S7.8.3_A1.2_T2"
+ },
+ {
+ "section": "7.8.3",
+ "description": "ExponentPart :: e -DecimalDigits",
+ "test": "//CHECK#0\nif (0e-1 !== 0) {\n $ERROR('#0: 0e-1 === 0');\n}\n\n//CHECK#1\nif (1e-1 !== 0.1) {\n $ERROR('#1: 1e-1 === 0.1');\n}\n\n//CHECK#2\nif (2e-1 !== 0.2) {\n $ERROR('#2: 2e-1 === 0.2');\n}\n\n//CHECK#3\nif (3e-1 !== 0.3) {\n $ERROR('#3: 3e-1 === 0.3');\n}\n\n//CHECK#4\nif (4e-1 !== 0.4) {\n $ERROR('#4: 4e-1 === 0.4');\n}\n\n//CHECK#5\nif (5e-1 !== 0.5) {\n $ERROR('#5: 5e-1 === 0.5');\n}\n\n//CHECK#6\nif (6e-1 !== 0.6) {\n $ERROR('#6: 6e-1 === 0.6');\n}\n\n//CHECK#7\nif (7e-1 !== 0.7) {\n $ERROR('#7: 7e-1 === 0.7');\n}\n\n//CHECK#8\nif (8e-1 !== 0.8) {\n $ERROR('#8: 8e-1 === 0.8');\n}\n\n//CHECK#9\nif (9e-1 !== 0.9) {\n $ERROR('#9: 9e-1 === 0.9');\n}\n",
+ "id": "S7.8.3_A1.2_T3"
+ },
+ {
+ "section": "7.8.3",
+ "description": "ExponentPart :: E -DecimalDigits",
+ "test": "//CHECK#0\nif (0E-1 !== 0) {\n $ERROR('#0: 0E-1 === 0');\n}\n\n//CHECK#1\nif (1E-1 !== 0.1) {\n $ERROR('#1: 1E-1 === 0.1');\n}\n\n//CHECK#2\nif (2E-1 !== 0.2) {\n $ERROR('#2: 2E-1 === 0.2');\n}\n\n//CHECK#3\nif (3E-1 !== 0.3) {\n $ERROR('#3: 3E-1 === 0.3');\n}\n\n//CHECK#4\nif (4E-1 !== 0.4) {\n $ERROR('#4: 4E-1 === 0.4');\n}\n\n//CHECK#5\nif (5E-1 !== 0.5) {\n $ERROR('#5: 5E-1 === 0.5');\n}\n\n//CHECK#6\nif (6E-1 !== 0.6) {\n $ERROR('#6: 6E-1 === 0.6');\n}\n\n//CHECK#7\nif (7E-1 !== 0.7) {\n $ERROR('#7: 7E-1 === 0.7');\n}\n\n//CHECK#8\nif (8E-1 !== 0.8) {\n $ERROR('#8: 8E-1 === 0.8');\n}\n\n//CHECK#9\nif (9E-1 !== 0.9) {\n $ERROR('#9: 9E-1 === 0.9');\n}\n",
+ "id": "S7.8.3_A1.2_T4"
+ },
+ {
+ "section": "7.8.3",
+ "description": "ExponentPart :: e +DecimalDigits",
+ "test": "//CHECK#0\nif (0e+1 !== 0) {\n $ERROR('#0: 0e+1 === 0');\n}\n\n//CHe+CK#1\nif (1e+1 !== 10) {\n $ERROR('#1: 1e+1 === 10');\n}\n\n//CHe+CK#2\nif (2e+1 !== 20) {\n $ERROR('#2: 2e+1 === 20');\n}\n\n//CHe+CK#3\nif (3e+1 !== 30) {\n $ERROR('#3: 3e+1 === 30');\n}\n\n//CHe+CK#4\nif (4e+1 !== 40) {\n $ERROR('#4: 4e+1 === 40');\n}\n\n//CHe+CK#5\nif (5e+1 !== 50) {\n $ERROR('#5: 5e+1 === 50');\n}\n\n//CHe+CK#6\nif (6e+1 !== 60) {\n $ERROR('#6: 6e+1 === 60');\n}\n\n//CHe+CK#7\nif (7e+1 !== 70) {\n $ERROR('#7: 7e+1 === 70');\n}\n\n//CHe+CK#8\nif (8e+1 !== 80) {\n $ERROR('#8: 8e+1 === 80');\n}\n\n//CHe+CK#9\nif (9e+1 !== 90) {\n $ERROR('#9: 9e+1 === 90');\n}\n",
+ "id": "S7.8.3_A1.2_T5"
+ },
+ {
+ "section": "7.8.3",
+ "description": "ExponentPart :: E +DecimalDigits",
+ "test": "//CHECK#0\nif (0E+1 !== 0) {\n $ERROR('#0: 0E+1 === 0');\n}\n\n//CHE+CK#1\nif (1E+1 !== 10) {\n $ERROR('#1: 1E+1 === 10');\n}\n\n//CHE+CK#2\nif (2E+1 !== 20) {\n $ERROR('#2: 2E+1 === 20');\n}\n\n//CHE+CK#3\nif (3E+1 !== 30) {\n $ERROR('#3: 3E+1 === 30');\n}\n\n//CHE+CK#4\nif (4E+1 !== 40) {\n $ERROR('#4: 4E+1 === 40');\n}\n\n//CHE+CK#5\nif (5E+1 !== 50) {\n $ERROR('#5: 5E+1 === 50');\n}\n\n//CHE+CK#6\nif (6E+1 !== 60) {\n $ERROR('#6: 6E+1 === 60');\n}\n\n//CHE+CK#7\nif (7E+1 !== 70) {\n $ERROR('#7: 7E+1 === 70');\n}\n\n//CHE+CK#8\nif (8E+1 !== 80) {\n $ERROR('#8: 8E+1 === 80');\n}\n\n//CHE+CK#9\nif (9E+1 !== 90) {\n $ERROR('#9: 9E+1 === 90');\n}\n",
+ "id": "S7.8.3_A1.2_T6"
+ },
+ {
+ "section": "7.8.3",
+ "description": "ExponentPart :: e 0",
+ "test": "//CHECK#0\nif (0e0 !== 0) {\n $ERROR('#0: 0e0 === 0');\n}\n\n//CHECK#1\nif (1e0 !== 1) {\n $ERROR('#1: 1e0 === 1');\n}\n\n//CHECK#2\nif (2e0 !== 2) {\n $ERROR('#2: 2e0 === 2');\n}\n\n//CHECK#3\nif (3e0 !== 3) {\n $ERROR('#3: 3e0 === 3');\n}\n\n//CHECK#4\nif (4e0 !== 4) {\n $ERROR('#4: 4e0 === 4');\n}\n\n//CHECK#5\nif (5e0 !== 5) {\n $ERROR('#5: 5e0 === 5');\n}\n\n//CHECK#6\nif (6e0 !== 6) {\n $ERROR('#6: 6e0 === 6');\n}\n\n//CHECK#7\nif (7e0 !== 7) {\n $ERROR('#7: 7e0 === 7');\n}\n\n//CHECK#8\nif (8e0 !== 8) {\n $ERROR('#8: 8e0 === 8');\n}\n\n//CHECK#9\nif (9e0 !== 9) {\n $ERROR('#9: 9e0 === 9');\n}\n",
+ "id": "S7.8.3_A1.2_T7"
+ },
+ {
+ "section": "7.8.3",
+ "description": "ExponentPart :: E 0",
+ "test": "//CHECK#0\nif (0E0 !== 0) {\n $ERROR('#0: 0E0 === 0');\n}\n\n//CHECK#1\nif (1E0 !== 1) {\n $ERROR('#1: 1E0 === 1');\n}\n\n//CHECK#2\nif (2E0 !== 2) {\n $ERROR('#2: 2E0 === 2');\n}\n\n//CHECK#3\nif (3E0 !== 3) {\n $ERROR('#3: 3E0 === 3');\n}\n\n//CHECK#4\nif (4E0 !== 4) {\n $ERROR('#4: 4E0 === 4');\n}\n\n//CHECK#5\nif (5E0 !== 5) {\n $ERROR('#5: 5E0 === 5');\n}\n\n//CHECK#6\nif (6E0 !== 6) {\n $ERROR('#6: 6E0 === 6');\n}\n\n//CHECK#7\nif (7E0 !== 7) {\n $ERROR('#7: 7E0 === 7');\n}\n\n//CHECK#8\nif (8E0 !== 8) {\n $ERROR('#8: 8E0 === 8');\n}\n\n//CHECK#9\nif (9E0 !== 9) {\n $ERROR('#9: 9E0 === 9');\n}\n",
+ "id": "S7.8.3_A1.2_T8"
+ },
+ {
+ "section": "7.8.3",
+ "description": "Use .DecimalDigit",
+ "test": "//CHECK#0\nif (.0 !== 0.0) {\n $ERROR('#0: .0 === 0.0');\n}\n\n//CHECK#1\nif (.1 !== 0.1) {\n $ERROR('#1: .1 === 0.1');\n}\n\n//CHECK#2\nif (.2 !== 0.2) {\n $ERROR('#2: .2 === 0.2');\n}\n\n//CHECK#3\nif (.3 !== 0.3) {\n $ERROR('#3: .3 === 0.3');\n}\n\n//CHECK#4\nif (.4 !== 0.4) {\n $ERROR('#4: .4 === 0.4');\n}\n\n//CHECK#5\nif (.5 !== 0.5) {\n $ERROR('#5: .5 === 0.5');\n}\n\n//CHECK#6\nif (.6 !== 0.6) {\n $ERROR('#6: .6 === 0.6');\n}\n\n//CHECK#7\nif (.7 !== 0.7) {\n $ERROR('#7: .7 === 0.7');\n}\n\n//CHECK#8\nif (.8 !== 0.8) {\n $ERROR('#8: .8 === 0.8');\n}\n\n//CHECK#9\nif (.9 !== 0.9) {\n $ERROR('#9: .9 === 0.9');\n}\n",
+ "id": "S7.8.3_A2.1_T1"
+ },
+ {
+ "section": "7.8.3",
+ "description": "Use .DecimalDigits",
+ "test": "//CHECK#0\nif (.00 !== 0.00) {\n $ERROR('#0: .00 === 0.00');\n}\n\n//CHECK#1\nif (.11 !== 0.11) {\n $ERROR('#1: .11 === 0.11');\n}\n\n//CHECK#2\nif (.22 !== 0.22) {\n $ERROR('#2: .22 === 0.22');\n}\n\n//CHECK#3\nif (.33 !== 0.33) {\n $ERROR('#3: .33 === 0.33');\n}\n\n//CHECK#4\nif (.44 !== 0.44) {\n $ERROR('#4: .44 === 0.44');\n}\n\n//CHECK#5\nif (.55 !== 0.55) {\n $ERROR('#5: .55 === 0.55');\n}\n\n//CHECK#6\nif (.66 !== 0.66) {\n $ERROR('#6: .66 === 0.66');\n}\n\n//CHECK#7\nif (.77 !== 0.77) {\n $ERROR('#7: .77 === 0.77');\n}\n\n//CHECK#8\nif (.88 !== 0.88) {\n $ERROR('#8: .88 === 0.88');\n}\n\n//CHECK#9\nif (.99 !== 0.99) {\n $ERROR('#9: .99 === 0.99');\n}\n",
+ "id": "S7.8.3_A2.1_T2"
+ },
+ {
+ "section": "7.8.3",
+ "description": "Use .DecimalDigits that have at the end zeros",
+ "test": "//CHECK#0\nif (.00 !== 0.0) {\n $ERROR('#0: .0 === 0.0');\n}\n\n//CHECK#1\nif (.10 !== 0.1) {\n $ERROR('#1: .1 === 0.1');\n}\n\n//CHECK#2\nif (.20 !== 0.2) {\n $ERROR('#2: .2 === 0.2');\n}\n\n//CHECK#3\nif (.30 !== 0.3) {\n $ERROR('#3: .3 === 0.3');\n}\n\n//CHECK#4\nif (.40 !== 0.4) {\n $ERROR('#4: .4 === 0.4');\n}\n\n//CHECK#5\nif (.50 !== 0.5) {\n $ERROR('#5: .5 === 0.5');\n}\n\n//CHECK#6\nif (.60 !== 0.6) {\n $ERROR('#6: .6 === 0.6');\n}\n\n//CHECK#7\nif (.70 !== 0.7) {\n $ERROR('#7: .7 === 0.7');\n}\n\n//CHECK#8\nif (.80 !== 0.8) {\n $ERROR('#8: .8 === 0.8');\n}\n\n//CHECK#9\nif (.90 !== 0.9) {\n $ERROR('#9: .9 === 0.9');\n}\n",
+ "id": "S7.8.3_A2.1_T3"
+ },
+ {
+ "section": "7.8.3",
+ "description": "ExponentPart :: e DecimalDigits",
+ "test": "//CHECK#0\nif (.0e1 !== 0) {\n $ERROR('#0: .0e1 === 0');\n}\n\n//CHECK#1\nif (.1e1 !== 1) {\n $ERROR('#1: .1e1 === 1');\n}\n\n//CHECK#2\nif (.2e1 !== 2) {\n $ERROR('#2: .2e1 === 2');\n}\n\n//CHECK#3\nif (.3e1 !== 3) {\n $ERROR('#3: .3e1 === 3');\n}\n\n//CHECK#4\nif (.4e1 !== 4) {\n $ERROR('#4: .4e1 === 4');\n}\n\n//CHECK#5\nif (.5e1 !== 5) {\n $ERROR('#5: .5e1 === 5');\n}\n\n//CHECK#6\nif (.6e1 !== 6) {\n $ERROR('#6: .6e1 === 6');\n}\n\n//CHECK#7\nif (.7e1 !== 7) {\n $ERROR('#7: .7e1 === 7');\n}\n\n//CHECK#8\nif (.8e1 !== 8) {\n $ERROR('#8: .8e1 === 8');\n}\n\n//CHECK#9\nif (.9e1 !== 9) {\n $ERROR('#9: .9e1 === 9');\n}\n",
+ "id": "S7.8.3_A2.2_T1"
+ },
+ {
+ "section": "7.8.3",
+ "description": "ExponentPart :: E DecimalDigits",
+ "test": "//CHECK#0\nif (.0E1 !== 0) {\n $ERROR('#0: .0E1 === 0');\n}\n\n//CHECK#1\nif (.1E1 !== 1) {\n $ERROR('#1: .1E1 === 1');\n}\n\n//CHECK#2\nif (.2E1 !== 2) {\n $ERROR('#2: .2E1 === 2');\n}\n\n//CHECK#3\nif (.3E1 !== 3) {\n $ERROR('#3: .3E1 === 3');\n}\n\n//CHECK#4\nif (.4E1 !== 4) {\n $ERROR('#4: .4E1 === 4');\n}\n\n//CHECK#5\nif (.5E1 !== 5) {\n $ERROR('#5: .5E1 === 5');\n}\n\n//CHECK#6\nif (.6E1 !== 6) {\n $ERROR('#6: .6E1 === 6');\n}\n\n//CHECK#7\nif (.7E1 !== 7) {\n $ERROR('#7: .7E1 === 7');\n}\n\n//CHECK#8\nif (.8E1 !== 8) {\n $ERROR('#8: .8E1 === 8');\n}\n\n//CHECK#9\nif (.9E1 !== 9) {\n $ERROR('#9: .9E1 === 9');\n}\n",
+ "id": "S7.8.3_A2.2_T2"
+ },
+ {
+ "section": "7.8.3",
+ "description": "ExponentPart :: e +DecimalDigits",
+ "test": "//CHECK#0\nif (.0e-1 !== 0) {\n $ERROR('#0: .0e-1 === 0');\n}\n\n//CHECK#1\nif (.1e-1 !== 0.01) {\n $ERROR('#1: .1e-1 === 0.01');\n}\n\n//CHECK#2\nif (.2e-1 !== 0.02) {\n $ERROR('#2: .2e-1 === 0.02');\n}\n\n//CHECK#3\nif (.3e-1 !== 0.03) {\n $ERROR('#3: .3e-1 === 0.03');\n}\n\n//CHECK#4\nif (.4e-1 !== 0.04) {\n $ERROR('#4: .4e-1 === 0.04');\n}\n\n//CHECK#5\nif (.5e-1 !== 0.05) {\n $ERROR('#5: .5e-1 === 0.05');\n}\n\n//CHECK#6\nif (.6e-1 !== 0.06) {\n $ERROR('#6: .6e-1 === 0.06');\n}\n\n//CHECK#7\nif (.7e-1 !== 0.07) {\n $ERROR('#7: .7e-1 === 0.07');\n}\n\n//CHECK#8\nif (.8e-1 !== 0.08) {\n $ERROR('#8: .8e-1 === 0.08');\n}\n\n//CHECK#9\nif (.9e-1 !== 0.09) {\n $ERROR('#9: .9e-1 === 0.09');\n}\n",
+ "id": "S7.8.3_A2.2_T3"
+ },
+ {
+ "section": "7.8.3",
+ "description": "ExponentPart :: E +DecimalDigits",
+ "test": "//CHECK#0\nif (.0E-1 !== 0) {\n $ERROR('#0: .0E-1 === 0');\n}\n\n//CHECK#1\nif (.1E-1 !== 0.01) {\n $ERROR('#1: .1E-1 === 0.01');\n}\n\n//CHECK#2\nif (.2E-1 !== 0.02) {\n $ERROR('#2: .2E-1 === 0.02');\n}\n\n//CHECK#3\nif (.3E-1 !== 0.03) {\n $ERROR('#3: .3E-1 === 0.03');\n}\n\n//CHECK#4\nif (.4E-1 !== 0.04) {\n $ERROR('#4: .4E-1 === 0.04');\n}\n\n//CHECK#5\nif (.5E-1 !== 0.05) {\n $ERROR('#5: .5E-1 === 0.05');\n}\n\n//CHECK#6\nif (.6E-1 !== 0.06) {\n $ERROR('#6: .6E-1 === 0.06');\n}\n\n//CHECK#7\nif (.7E-1 !== 0.07) {\n $ERROR('#7: .7E-1 === 0.07');\n}\n\n//CHECK#8\nif (.8E-1 !== 0.08) {\n $ERROR('#8: .8E-1 === 0.08');\n}\n\n//CHECK#9\nif (.9E-1 !== 0.09) {\n $ERROR('#9: .9E-1 === 0.09');\n}\n",
+ "id": "S7.8.3_A2.2_T4"
+ },
+ {
+ "section": "7.8.3",
+ "description": "ExponentPart :: e +DecimalDigits",
+ "test": "//CHECK#0\nif (.0e+1 !== 0) {\n $ERROR('#0: .0e+1 === 0');\n}\n\n//CHECK#1\nif (.1e+1 !== 1) {\n $ERROR('#1: .1e+1 === 1');\n}\n\n//CHECK#2\nif (.2e+1 !== 2) {\n $ERROR('#2: .2e+1 === 2');\n}\n\n//CHECK#3\nif (.3e+1 !== 3) {\n $ERROR('#3: .3e+1 === 3');\n}\n\n//CHECK#4\nif (.4e+1 !== 4) {\n $ERROR('#4: .4e+1 === 4');\n}\n\n//CHECK#5\nif (.5e+1 !== 5) {\n $ERROR('#5: .5e+1 === 5');\n}\n\n//CHECK#6\nif (.6e+1 !== 6) {\n $ERROR('#6: .6e+1 === 6');\n}\n\n//CHECK#7\nif (.7e+1 !== 7) {\n $ERROR('#7: .7e+1 === 7');\n}\n\n//CHECK#8\nif (.8e+1 !== 8) {\n $ERROR('#8: .8e+1 === 8');\n}\n\n//CHECK#9\nif (.9e+1 !== 9) {\n $ERROR('#9: .9e+1 === 9');\n}\n",
+ "id": "S7.8.3_A2.2_T5"
+ },
+ {
+ "section": "7.8.3",
+ "description": "ExponentPart :: E +DecimalDigits",
+ "test": "//CHECK#0\nif (.0E+1 !== 0) {\n $ERROR('#0: .0E+1 === 0');\n}\n\n//CHECK#1\nif (.1E+1 !== 1) {\n $ERROR('#1: .1E+1 === 1');\n}\n\n//CHECK#2\nif (.2E+1 !== 2) {\n $ERROR('#2: .2E+1 === 2');\n}\n\n//CHECK#3\nif (.3E+1 !== 3) {\n $ERROR('#3: .3E+1 === 3');\n}\n\n//CHECK#4\nif (.4E+1 !== 4) {\n $ERROR('#4: .4E+1 === 4');\n}\n\n//CHECK#5\nif (.5E+1 !== 5) {\n $ERROR('#5: .5E+1 === 5');\n}\n\n//CHECK#6\nif (.6E+1 !== 6) {\n $ERROR('#6: .6E+1 === 6');\n}\n\n//CHECK#7\nif (.7E+1 !== 7) {\n $ERROR('#7: .7E+1 === 7');\n}\n\n//CHECK#8\nif (.8E+1 !== 8) {\n $ERROR('#8: .8E+1 === 8');\n}\n\n//CHECK#9\nif (.9E+1 !== 9) {\n $ERROR('#9: .9E+1 === 9');\n}\n",
+ "id": "S7.8.3_A2.2_T6"
+ },
+ {
+ "section": "7.8.3",
+ "description": "ExponentPart :: e 0",
+ "test": "//CHECK#0\nif (.0e0 !== 0.0) {\n $ERROR('#0: .0e0 === 0.0');\n}\n\n//CHECK#1\nif (.1e0 !== 0.1) {\n $ERROR('#1: .1e0 === 0.1');\n}\n\n//CHECK#2\nif (.2e0 !== 0.2) {\n $ERROR('#2: .2e0 === 0.2');\n}\n\n//CHECK#3\nif (.3e0 !== 0.3) {\n $ERROR('#3: .3e0 === 0.3');\n}\n\n//CHECK#4\nif (.4e0 !== 0.4) {\n $ERROR('#4: .4e0 === 0.4');\n}\n\n//CHECK#5\nif (.5e0 !== 0.5) {\n $ERROR('#5: .5e0 === 0.5');\n}\n\n//CHECK#6\nif (.6e0 !== 0.6) {\n $ERROR('#6: .6e0 === 0.6');\n}\n\n//CHECK#7\nif (.7e0 !== 0.7) {\n $ERROR('#7: .7e0 === 0.7');\n}\n\n//CHECK#8\nif (.8e0 !== 0.8) {\n $ERROR('#8: .8e0 === 0.8');\n}\n\n//CHECK#9\nif (.9e0 !== 0.9) {\n $ERROR('#9: .9e0 === 0.9');\n}\n",
+ "id": "S7.8.3_A2.2_T7"
+ },
+ {
+ "section": "7.8.3",
+ "description": "ExponentPart :: E 0",
+ "test": "//CHECK#0\nif (.0E0 !== 0.0) {\n $ERROR('#0: .0E0 === 0.0');\n}\n\n//CHECK#1\nif (.1E0 !== 0.1) {\n $ERROR('#1: .1E0 === 0.1');\n}\n\n//CHECK#2\nif (.2E0 !== 0.2) {\n $ERROR('#2: .2E0 === 0.2');\n}\n\n//CHECK#3\nif (.3E0 !== 0.3) {\n $ERROR('#3: .3E0 === 0.3');\n}\n\n//CHECK#4\nif (.4E0 !== 0.4) {\n $ERROR('#4: .4E0 === 0.4');\n}\n\n//CHECK#5\nif (.5E0 !== 0.5) {\n $ERROR('#5: .5E0 === 0.5');\n}\n\n//CHECK#6\nif (.6E0 !== 0.6) {\n $ERROR('#6: .6E0 === 0.6');\n}\n\n//CHECK#7\nif (.7E0 !== 0.7) {\n $ERROR('#7: .7E0 === 0.7');\n}\n\n//CHECK#8\nif (.8E0 !== 0.8) {\n $ERROR('#8: .8E0 === 0.8');\n}\n\n//CHECK#9\nif (.9E0 !== 0.9) {\n $ERROR('#9: .9E0 === 0.9');\n}\n",
+ "id": "S7.8.3_A2.2_T8"
+ },
+ {
+ "section": "7.8.3",
+ "description": "DecimalIntegerLiteral :: 0, NoNZeroDigit",
+ "test": "//CHECK#0\nif (0. !== 0) {\n $ERROR('#0: 0. === 0');\n}\n\n//CHECK#1\nif (1. !== 1) {\n $ERROR('#1: 1. === 1');\n}\n\n//CHECK#2\nif (2. !== 2) {\n $ERROR('#2: 2. === 2');\n}\n\n//CHECK#3\nif (3. !== 3) {\n $ERROR('#3: 3. === 3');\n}\n\n//CHECK#4\nif (4. !== 4) {\n $ERROR('#4: 4. === 4');\n}\n\n//CHECK#5\nif (5. !== 5) {\n $ERROR('#5: 5. === 5');\n}\n\n//CHECK#6\nif (6. !== 6) {\n $ERROR('#6: 6. === 6');\n}\n\n//CHECK#7\nif (7. !== 7) {\n $ERROR('#7: 7. === 7');\n}\n\n//CHECK#8\nif (8. !== 8) {\n $ERROR('#8: 8. === 8');\n}\n\n//CHECK#9\nif (9. !== 9) {\n $ERROR('#9: 9. === 9');\n}\n",
+ "id": "S7.8.3_A3.1_T1"
+ },
+ {
+ "section": "7.8.3",
+ "description": "DecimalIntegerLiteral :: NoNZeroDigit DecimalDigigts",
+ "test": "//CHECK#1\nif (11. !== 11) {\n $ERROR('#1: 11. === 11');\n}\n\n//CHECK#2\nif (22. !== 22) {\n $ERROR('#2: 22. === 22');\n}\n\n//CHECK#3\nif (33. !== 33) {\n $ERROR('#3: 33. === 33');\n}\n\n//CHECK#4\nif (44. !== 44) {\n $ERROR('#4: 44. === 44');\n}\n\n//CHECK#5\nif (55. !== 55) {\n $ERROR('#5: 55. === 55');\n}\n\n//CHECK#6\nif (66. !== 66) {\n $ERROR('#6: 66. === 66');\n}\n\n//CHECK#7\nif (77. !== 77) {\n $ERROR('#7: 77. === 77');\n}\n\n//CHECK#8\nif (88. !== 88) {\n $ERROR('#8: 88. === 88');\n}\n\n//CHECK#9\nif (99. !== 99) {\n $ERROR('#9: 99. === 99');\n}\n",
+ "id": "S7.8.3_A3.1_T2"
+ },
+ {
+ "section": "7.8.3",
+ "description": "After DecimalIntegerLiteral. used ZeroDigit",
+ "test": "//CHECK#0\nif (0.0 !== 0) {\n $ERROR('#0: 0.0 === 0');\n}\n\n//CHECK#1\nif (1.0 !== 1) {\n $ERROR('#1: 1.0 === 1');\n}\n\n//CHECK#2\nif (2.0 !== 2) {\n $ERROR('#2: 2.0 === 2');\n}\n\n//CHECK#3\nif (3.0 !== 3) {\n $ERROR('#3: 3.0 === 3');\n}\n\n//CHECK#4\nif (4.0 !== 4) {\n $ERROR('#4: 4.0 === 4');\n}\n\n//CHECK#5\nif (5.0 !== 5) {\n $ERROR('#5: 5.0 === 5');\n}\n\n//CHECK#6\nif (6.0 !== 6) {\n $ERROR('#6: 6.0 === 6');\n}\n\n//CHECK#7\nif (7.0 !== 7) {\n $ERROR('#7: 7.0 === 7');\n}\n\n//CHECK#8\nif (8.0 !== 8) {\n $ERROR('#8: 8.0 === 8');\n}\n\n//CHECK#9\nif (9.0 !== 9) {\n $ERROR('#9: 9.0 === 9');\n}\n",
+ "id": "S7.8.3_A3.2_T1"
+ },
+ {
+ "section": "7.8.3",
+ "description": "After DecimalIntegerLiteral. used ZeroDigits",
+ "test": "//CHECK#0\nif (0.00 !== 0) {\n $ERROR('#0: 0.00 === 0');\n}\n\n//CHECK#1\nif (1.00 !== 1) {\n $ERROR('#1: 1.00 === 1');\n}\n\n//CHECK#2\nif (2.00 !== 2) {\n $ERROR('#2: 2.00 === 2');\n}\n\n//CHECK#3\nif (3.00 !== 3) {\n $ERROR('#3: 3.00 === 3');\n}\n\n//CHECK#4\nif (4.00 !== 4) {\n $ERROR('#4: 4.00 === 4');\n}\n\n//CHECK#5\nif (5.00 !== 5) {\n $ERROR('#5: 5.00 === 5');\n}\n\n//CHECK#6\nif (6.00 !== 6) {\n $ERROR('#6: 6.00 === 6');\n}\n\n//CHECK#7\nif (7.00 !== 7) {\n $ERROR('#7: 7.00 === 7');\n}\n\n//CHECK#8\nif (8.00 !== 8) {\n $ERROR('#8: 8.00 === 8');\n}\n\n//CHECK#9\nif (9.00 !== 9) {\n $ERROR('#9: 9.00 === 9');\n}\n",
+ "id": "S7.8.3_A3.2_T2"
+ },
+ {
+ "section": "7.8.3",
+ "description": "After DecimalIntegerLiteral. used NoNZeroDigit",
+ "test": "//CHECK#0\nif (0.0 !== 0.0) {\n $ERROR('#0: 0.0 === 0.0');\n}\n\n//CHECK#1\nif (1.1 !== 1.1) {\n $ERROR('#1: 1.1 === 1.1');\n}\n\n//CHECK#2\nif (2.2 !== 2.2) {\n $ERROR('#2: 2.2 === 2.2');\n}\n\n//CHECK#3\nif (3.3 !== 3.3) {\n $ERROR('#3: 3.3 === 3.3');\n}\n\n//CHECK#4\nif (4.4 !== 4.4) {\n $ERROR('#4: 4.4 === 4.4');\n}\n\n//CHECK#5\nif (5.5 !== 5.5) {\n $ERROR('#5: 5.5 === 5.5');\n}\n\n//CHECK#6\nif (6.6 !== 6.6) {\n $ERROR('#6: 6.6 === 6.6');\n}\n\n//CHECK#7\nif (7.7 !== 7.7) {\n $ERROR('#7: 7.7 === 7.7');\n}\n\n//CHECK#8\nif (8.8 !== 8.8) {\n $ERROR('#8: 8..8 === 8.8');\n}\n\n//CHECK#9\nif (9.9 !== 9.9) {\n $ERROR('#9: 9.9 === 9.9');\n}\n",
+ "id": "S7.8.3_A3.2_T3"
+ },
+ {
+ "section": "7.8.3",
+ "description": "ExponentPart :: e DecimalDigits",
+ "test": "//CHECK#0\nif (0.e1 !== 0) {\n $ERROR('#0: 0.e1 === 0');\n}\n\n//CHECK#1\nif (1.e1 !== 10) {\n $ERROR('#1: 1.e1 === 10');\n}\n\n//CHECK#2\nif (2.e1 !== 20) {\n $ERROR('#2: 2.e1 === 20');\n}\n\n//CHECK#3\nif (3.e1 !== 30) {\n $ERROR('#3: 3.e1 === 30');\n}\n\n//CHECK#4\nif (4.e1 !== 40) {\n $ERROR('#4: 4.e1 === 40');\n}\n\n//CHECK#5\nif (5.e1 !== 50) {\n $ERROR('#5: 5.e1 === 50');\n}\n\n//CHECK#6\nif (6.e1 !== 60) {\n $ERROR('#6: 6.e1 === 60');\n}\n\n//CHECK#7\nif (7.e1 !== 70) {\n $ERROR('#7: 7.e1 === 70');\n}\n\n//CHECK#8\nif (8.e1 !== 80) {\n $ERROR('#8: 8.e1 === 80');\n}\n\n//CHECK#9\nif (9.e1 !== 90) {\n $ERROR('#9: 9.e1 === 90');\n}\n",
+ "id": "S7.8.3_A3.3_T1"
+ },
+ {
+ "section": "7.8.3",
+ "description": "ExponentPart :: E DecimalDigits",
+ "test": "//CHECK#0\nif (0.E1 !== 0) {\n $ERROR('#0: 0.E1 === 0');\n}\n\n//CHECK#1\nif (1.E1 !== 10) {\n $ERROR('#1: 1.E1 === 10');\n}\n\n//CHECK#2\nif (2.E1 !== 20) {\n $ERROR('#2: 2.E1 === 20');\n}\n\n//CHECK#3\nif (3.E1 !== 30) {\n $ERROR('#3: 3.E1 === 30');\n}\n\n//CHECK#4\nif (4.E1 !== 40) {\n $ERROR('#4: 4.E1 === 40');\n}\n\n//CHECK#5\nif (5.E1 !== 50) {\n $ERROR('#5: 5.E1 === 50');\n}\n\n//CHECK#6\nif (6.E1 !== 60) {\n $ERROR('#6: 6.E1 === 60');\n}\n\n//CHECK#7\nif (7.E1 !== 70) {\n $ERROR('#7: 7.E1 === 70');\n}\n\n//CHECK#8\nif (8.E1 !== 80) {\n $ERROR('#8: 8.E1 === 80');\n}\n\n//CHECK#9\nif (9.E1 !== 90) {\n $ERROR('#9: 9.E1 === 90');\n}\n",
+ "id": "S7.8.3_A3.3_T2"
+ },
+ {
+ "section": "7.8.3",
+ "description": "ExponentPart :: e -DecimalDigits",
+ "test": "//CHECK#0\nif (0.e-1 !== 0) {\n $ERROR('#0: 0.e-1 === 0');\n}\n\n//CHECK#1\nif (1.e-1 !== 0.1) {\n $ERROR('#1: 1.e-1 === 0.1');\n}\n\n//CHECK#2\nif (2.e-1 !== 0.2) {\n $ERROR('#2: 2.e-1 === 0.2');\n}\n\n//CHECK#3\nif (3.e-1 !== 0.3) {\n $ERROR('#3: 3.e-1 === 0.3');\n}\n\n//CHECK#4\nif (4.e-1 !== 0.4) {\n $ERROR('#4: 4.e-1 === 0.4');\n}\n\n//CHECK#5\nif (5.e-1 !== 0.5) {\n $ERROR('#5: 5.e-1 === 0.5');\n}\n\n//CHECK#6\nif (6.e-1 !== 0.6) {\n $ERROR('#6: 6.e-1 === 0.6');\n}\n\n//CHECK#7\nif (7.e-1 !== 0.7) {\n $ERROR('#7: 7.e-1 === 0.7');\n}\n\n//CHECK#8\nif (8.e-1 !== 0.8) {\n $ERROR('#8: 8.e-1 === 0.8');\n}\n\n//CHECK#9\nif (9.e-1 !== 0.9) {\n $ERROR('#9: 9.e-1 === 0.9');\n}\n",
+ "id": "S7.8.3_A3.3_T3"
+ },
+ {
+ "section": "7.8.3",
+ "description": "ExponentPart :: E -DecimalDigits",
+ "test": "//CHECK#0\nif (0.E-1 !== 0) {\n $ERROR('#0: 0.E-1 === 0');\n}\n\n//CHECK#1\nif (1.E-1 !== 0.1) {\n $ERROR('#1: 1.E-1 === 0.1');\n}\n\n//CHECK#2\nif (2.E-1 !== 0.2) {\n $ERROR('#2: 2.E-1 === 0.2');\n}\n\n//CHECK#3\nif (3.E-1 !== 0.3) {\n $ERROR('#3: 3.E-1 === 0.3');\n}\n\n//CHECK#4\nif (4.E-1 !== 0.4) {\n $ERROR('#4: 4.E-1 === 0.4');\n}\n\n//CHECK#5\nif (5.E-1 !== 0.5) {\n $ERROR('#5: 5.E-1 === 0.5');\n}\n\n//CHECK#6\nif (6.E-1 !== 0.6) {\n $ERROR('#6: 6.E-1 === 0.6');\n}\n\n//CHECK#7\nif (7.E-1 !== 0.7) {\n $ERROR('#7: 7.E-1 === 0.7');\n}\n\n//CHECK#8\nif (8.E-1 !== 0.8) {\n $ERROR('#8: 8.E-1 === 0.8');\n}\n\n//CHECK#9\nif (9.E-1 !== 0.9) {\n $ERROR('#9: 9.E-1 === 0.9');\n}\n",
+ "id": "S7.8.3_A3.3_T4"
+ },
+ {
+ "section": "7.8.3",
+ "description": "ExponentPart :: e +DecimalDigits",
+ "test": "//CHECK#0\nif (0.e+1 !== 0) {\n $ERROR('#0: 0.e+1 === 0');\n}\n\n//CHECK#1\nif (1.e+1 !== 10) {\n $ERROR('#1: 1.e+1 === 10');\n}\n\n//CHECK#2\nif (2.e+1 !== 20) {\n $ERROR('#2: 2.e+1 === 20');\n}\n\n//CHECK#3\nif (3.e+1 !== 30) {\n $ERROR('#3: 3.e+1 === 30');\n}\n\n//CHECK#4\nif (4.e+1 !== 40) {\n $ERROR('#4: 4.e+1 === 40');\n}\n\n//CHECK#5\nif (5.e+1 !== 50) {\n $ERROR('#5: 5.e+1 === 50');\n}\n\n//CHECK#6\nif (6.e+1 !== 60) {\n $ERROR('#6: 6.e+1 === 60');\n}\n\n//CHECK#7\nif (7.e+1 !== 70) {\n $ERROR('#7: 7.e+1 === 70');\n}\n\n//CHECK#8\nif (8.e+1 !== 80) {\n $ERROR('#8: 8.e+1 === 80');\n}\n\n//CHECK#9\nif (9.e+1 !== 90) {\n $ERROR('#9: 9.e+1 === 90');\n}\n",
+ "id": "S7.8.3_A3.3_T5"
+ },
+ {
+ "section": "7.8.3",
+ "description": "ExponentPart :: E +DecimalDigits",
+ "test": "//CHECK#0\nif (0.E+1 !== 0) {\n $ERROR('#0: 0.E+1 === 0');\n}\n\n//CHECK#1\nif (1.E+1 !== 10) {\n $ERROR('#1: 1.E+1 === 10');\n}\n\n//CHECK#2\nif (2.E+1 !== 20) {\n $ERROR('#2: 2.E+1 === 20');\n}\n\n//CHECK#3\nif (3.E+1 !== 30) {\n $ERROR('#3: 3.E+1 === 30');\n}\n\n//CHECK#4\nif (4.E+1 !== 40) {\n $ERROR('#4: 4.E+1 === 40');\n}\n\n//CHECK#5\nif (5.E+1 !== 50) {\n $ERROR('#5: 5.E+1 === 50');\n}\n\n//CHECK#6\nif (6.E+1 !== 60) {\n $ERROR('#6: 6.E+1 === 60');\n}\n\n//CHECK#7\nif (7.E+1 !== 70) {\n $ERROR('#7: 7.E+1 === 70');\n}\n\n//CHECK#8\nif (8.E+1 !== 80) {\n $ERROR('#8: 8.E+1 === 80');\n}\n\n//CHECK#9\nif (9.E+1 !== 90) {\n $ERROR('#9: 9.E+1 === 90');\n}\n",
+ "id": "S7.8.3_A3.3_T6"
+ },
+ {
+ "section": "7.8.3",
+ "description": "ExponentPart :: e 0",
+ "test": "//CHECK#0\nif (0.e0 !== 0) {\n $ERROR('#0: 0.e0 === 0');\n}\n\n//CHECK#1\nif (1.e0 !== 1) {\n $ERROR('#1: 1.e0 === 1');\n}\n\n//CHECK#2\nif (2.e0 !== 2) {\n $ERROR('#2: 2.e0 === 2');\n}\n\n//CHECK#3\nif (3.e0 !== 3) {\n $ERROR('#3: 3.e0 === 3');\n}\n\n//CHECK#4\nif (4.e0 !== 4) {\n $ERROR('#4: 4.e0 === 4');\n}\n\n//CHECK#5\nif (5.e0 !== 5) {\n $ERROR('#5: 5.e0 === 5');\n}\n\n//CHECK#6\nif (6.e0 !== 6) {\n $ERROR('#6: 6.e0 === 6');\n}\n\n//CHECK#7\nif (7.e0 !== 7) {\n $ERROR('#7: 7.e0 === 7');\n}\n\n//CHECK#8\nif (8.e0 !== 8) {\n $ERROR('#8: 8.e0 === 8');\n}\n\n//CHECK#9\nif (9.e0 !== 9) {\n $ERROR('#9: 9.e0 === 9');\n}\n",
+ "id": "S7.8.3_A3.3_T7"
+ },
+ {
+ "section": "7.8.3",
+ "description": "ExponentPart :: E 0",
+ "test": "//CHECK#0\nif (0.E0 !== 0) {\n $ERROR('#0: 0.E0 === 0');\n}\n\n//CHECK#1\nif (1.E0 !== 1) {\n $ERROR('#1: 1.E0 === 1');\n}\n\n//CHECK#2\nif (2.E0 !== 2) {\n $ERROR('#2: 2.E0 === 2');\n}\n\n//CHECK#3\nif (3.E0 !== 3) {\n $ERROR('#3: 3.E0 === 3');\n}\n\n//CHECK#4\nif (4.E0 !== 4) {\n $ERROR('#4: 4.E0 === 4');\n}\n\n//CHECK#5\nif (5.E0 !== 5) {\n $ERROR('#5: 5.E0 === 5');\n}\n\n//CHECK#6\nif (6.E0 !== 6) {\n $ERROR('#6: 6.E0 === 6');\n}\n\n//CHECK#7\nif (7.E0 !== 7) {\n $ERROR('#7: 7.E0 === 7');\n}\n\n//CHECK#8\nif (8.E0 !== 8) {\n $ERROR('#8: 8.E0 === 8');\n}\n\n//CHECK#9\nif (9.E0 !== 9) {\n $ERROR('#9: 9.E0 === 9');\n}\n",
+ "id": "S7.8.3_A3.3_T8"
+ },
+ {
+ "section": "7.8.3",
+ "description": "ExponentPart :: e DecimalDigits",
+ "test": "//CHECK#0\nif (0.0e1 !== 0) {\n $ERROR('#0: 0.0e1 === 0');\n}\n\n//CHECK#1\nif (1.1e1 !== 11) {\n $ERROR('#1: 1.1e1 === 11');\n}\n\n//CHECK#2\nif (2.2e1 !== 22) {\n $ERROR('#2: 2.2e1 === 22');\n}\n\n//CHECK#3\nif (3.3e1 !== 33) {\n $ERROR('#3: 3.3e1 === 33');\n}\n\n//CHECK#4\nif (4.4e1 !== 44) {\n $ERROR('#4: 4.4e1 === 44');\n}\n\n//CHECK#5\nif (5.5e1 !== 55) {\n $ERROR('#5: 5.5e1 === 55');\n}\n\n//CHECK#6\nif (6.6e1 !== 66) {\n $ERROR('#6: 6.e1 === 66');\n}\n\n//CHECK#7\nif (7.7e1 !== 77) {\n $ERROR('#7: 7.7e1 === 77');\n}\n\n//CHECK#8\nif (8.8e1 !== 88) {\n $ERROR('#8: 8.8e1 === 88');\n}\n\n//CHECK#9\nif (9.9e1 !== 99) {\n $ERROR('#9: 9.9e1 === 99');\n}\n",
+ "id": "S7.8.3_A3.4_T1"
+ },
+ {
+ "section": "7.8.3",
+ "description": "ExponentPart :: E DecimalDigits",
+ "test": "//CHECK#0\nif (0.0E1 !== 0) {\n $ERROR('#0: 0.0E1 === 0');\n}\n\n//CHECK#1\nif (1.1E1 !== 11) {\n $ERROR('#1: 1.1E1 === 11');\n}\n\n//CHECK#2\nif (2.2E1 !== 22) {\n $ERROR('#2: 2.2E1 === 22');\n}\n\n//CHECK#3\nif (3.3E1 !== 33) {\n $ERROR('#3: 3.3E1 === 33');\n}\n\n//CHECK#4\nif (4.4E1 !== 44) {\n $ERROR('#4: 4.4E1 === 44');\n}\n\n//CHECK#5\nif (5.5E1 !== 55) {\n $ERROR('#5: 5.5E1 === 55');\n}\n\n//CHECK#6\nif (6.6E1 !== 66) {\n $ERROR('#6: 6.E1 === 66');\n}\n\n//CHECK#7\nif (7.7E1 !== 77) {\n $ERROR('#7: 7.7E1 === 77');\n}\n\n//CHECK#8\nif (8.8E1 !== 88) {\n $ERROR('#8: 8.8E1 === 88');\n}\n\n//CHECK#9\nif (9.9E1 !== 99) {\n $ERROR('#9: 9.9E1 === 99');\n}\n",
+ "id": "S7.8.3_A3.4_T2"
+ },
+ {
+ "section": "7.8.3",
+ "description": "ExponentPart :: e -DecimalDigits",
+ "test": "//CHECK#0\nif (0.0e-1 !== 0) {\n $ERROR('#0: 0.0e-1 === 0');\n}\n\n//CHECK#1\nif (1.1e-1 !== 0.11) {\n $ERROR('#1: 1.1e-1 === 0.11');\n}\n\n//CHECK#2\nif (2.2e-1 !== 0.22) {\n $ERROR('#2: 2.2e-1 === 0.22');\n}\n\n//CHECK#3\nif (3.3e-1 !== 0.33) {\n $ERROR('#3: 3.3e-1 === 0.33');\n}\n\n//CHECK#4\nif (4.4e-1 !== 0.44) {\n $ERROR('#4: 4.4e-1 === 0.44');\n}\n\n//CHECK#5\nif (5.5e-1 !== 0.55) {\n $ERROR('#5: 5.5e-1 === 0.55');\n}\n\n//CHECK#6\nif (6.6e-1 !== 0.66) {\n $ERROR('#6: 6.e-1 === 0.66');\n}\n\n//CHECK#7\nif (7.7e-1 !== 0.77) {\n $ERROR('#7: 7.7e-1 === 0.77');\n}\n\n//CHECK#8\nif (8.8e-1 !== 0.88) {\n $ERROR('#8: 8.8e-1 === 0.88');\n}\n\n//CHECK#9\nif (9.9e-1 !== 0.99) {\n $ERROR('#9: 9.9e-1 === 0.99');\n}\n",
+ "id": "S7.8.3_A3.4_T3"
+ },
+ {
+ "section": "7.8.3",
+ "description": "ExponentPart :: E -DecimalDigits",
+ "test": "//CHECK#0\nif (0.0E-1 !== 0) {\n $ERROR('#0: 0.0E-1 === 0');\n}\n\n//CHECK#1\nif (1.1E-1 !== 0.11) {\n $ERROR('#1: 1.1E-1 === 0.11');\n}\n\n//CHECK#2\nif (2.2E-1 !== 0.22) {\n $ERROR('#2: 2.2E-1 === 0.22');\n}\n\n//CHECK#3\nif (3.3E-1 !== 0.33) {\n $ERROR('#3: 3.3E-1 === 0.33');\n}\n\n//CHECK#4\nif (4.4E-1 !== 0.44) {\n $ERROR('#4: 4.4E-1 === 0.44');\n}\n\n//CHECK#5\nif (5.5E-1 !== 0.55) {\n $ERROR('#5: 5.5E-1 === 0.55');\n}\n\n//CHECK#6\nif (6.6E-1 !== 0.66) {\n $ERROR('#6: 6.E-1 === 0.66');\n}\n\n//CHECK#7\nif (7.7E-1 !== 0.77) {\n $ERROR('#7: 7.7E-1 === 0.77');\n}\n\n//CHECK#8\nif (8.8E-1 !== 0.88) {\n $ERROR('#8: 8.8E-1 === 0.88');\n}\n\n//CHECK#9\nif (9.9E-1 !== 0.99) {\n $ERROR('#9: 9.9E-1 === 0.99');\n}\n",
+ "id": "S7.8.3_A3.4_T4"
+ },
+ {
+ "section": "7.8.3",
+ "description": "ExponentPart :: e +DecimalDigits",
+ "test": "//CHECK#0\nif (0.0e+1 !== 0) {\n $ERROR('#0: 0.0e+1 === 0');\n}\n\n//CHECK#1\nif (1.1e+1 !== 11) {\n $ERROR('#1: 1.1e+1 === 11');\n}\n\n//CHECK#2\nif (2.2e+1 !== 22) {\n $ERROR('#2: 2.2e+1 === 22');\n}\n\n//CHECK#3\nif (3.3e+1 !== 33) {\n $ERROR('#3: 3.3e+1 === 33');\n}\n\n//CHECK#4\nif (4.4e+1 !== 44) {\n $ERROR('#4: 4.4e+1 === 44');\n}\n\n//CHECK#5\nif (5.5e+1 !== 55) {\n $ERROR('#5: 5.5e+1 === 55');\n}\n\n//CHECK#6\nif (6.6e+1 !== 66) {\n $ERROR('#6: 6.e+1 === 66');\n}\n\n//CHECK#7\nif (7.7e+1 !== 77) {\n $ERROR('#7: 7.7e+1 === 77');\n}\n\n//CHECK#8\nif (8.8e+1 !== 88) {\n $ERROR('#8: 8.8e+1 === 88');\n}\n\n//CHECK#9\nif (9.9e+1 !== 99) {\n $ERROR('#9: 9.9e+1 === 99');\n}\n",
+ "id": "S7.8.3_A3.4_T5"
+ },
+ {
+ "section": "7.8.3",
+ "description": "ExponentPart :: E +DecimalDigits",
+ "test": "//CHECK#0\nif (0.0E+1 !== 0) {\n $ERROR('#0: 0.0E+1 === 0');\n}\n\n//CHECK#1\nif (1.1E+1 !== 11) {\n $ERROR('#1: 1.1E+1 === 11');\n}\n\n//CHECK#2\nif (2.2E+1 !== 22) {\n $ERROR('#2: 2.2E+1 === 22');\n}\n\n//CHECK#3\nif (3.3E+1 !== 33) {\n $ERROR('#3: 3.3E+1 === 33');\n}\n\n//CHECK#4\nif (4.4E+1 !== 44) {\n $ERROR('#4: 4.4E+1 === 44');\n}\n\n//CHECK#5\nif (5.5E+1 !== 55) {\n $ERROR('#5: 5.5E+1 === 55');\n}\n\n//CHECK#6\nif (6.6E+1 !== 66) {\n $ERROR('#6: 6.E+1 === 66');\n}\n\n//CHECK#7\nif (7.7E+1 !== 77) {\n $ERROR('#7: 7.7E+1 === 77');\n}\n\n//CHECK#8\nif (8.8E+1 !== 88) {\n $ERROR('#8: 8.8E+1 === 88');\n}\n\n//CHECK#9\nif (9.9E+1 !== 99) {\n $ERROR('#9: 9.9E+1 === 99');\n}\n",
+ "id": "S7.8.3_A3.4_T6"
+ },
+ {
+ "section": "7.8.3",
+ "description": "ExponentPart :: e 0",
+ "test": "//CHECK#0\nif (0.0e0 !== 0.0) {\n $ERROR('#0: 0.0e0 === 0.0');\n}\n\n//CHECK#1\nif (1.1e0 !== 1.1) {\n $ERROR('#1: 1.1e0 === 1.1');\n}\n\n//CHECK#2\nif (2.2e0 !== 2.2) {\n $ERROR('#2: 2.2e0 === 2.2');\n}\n\n//CHECK#3\nif (3.3e0 !== 3.3) {\n $ERROR('#3: 3.3e0 === 3.3');\n}\n\n//CHECK#4\nif (4.4e0 !== 4.4) {\n $ERROR('#4: 4.4e0 === 4.4');\n}\n\n//CHECK#5\nif (5.5e0 !== 5.5) {\n $ERROR('#5: 5.5e0 === 5.5');\n}\n\n//CHECK#6\nif (6.6e0 !== 6.6) {\n $ERROR('#6: 6.e0 === 6.6');\n}\n\n//CHECK#7\nif (7.7e0 !== 7.7) {\n $ERROR('#7: 7.7e0 === 7.7');\n}\n\n//CHECK#8\nif (8.8e0 !== 8.8) {\n $ERROR('#8: 8.8e0 === 8.8');\n}\n\n//CHECK#9\nif (9.9e0 !== 9.9) {\n $ERROR('#9: 9.9e0 === 9.9');\n}\n",
+ "id": "S7.8.3_A3.4_T7"
+ },
+ {
+ "section": "7.8.3",
+ "description": "ExponentPart :: E 0",
+ "test": "//CHECK#0\nif (0.0E0 !== 0.0) {\n $ERROR('#0: 0.0E0 === 0.0');\n}\n\n//CHECK#1\nif (1.1E0 !== 1.1) {\n $ERROR('#1: 1.1E0 === 1.1');\n}\n\n//CHECK#2\nif (2.2E0 !== 2.2) {\n $ERROR('#2: 2.2E0 === 2.2');\n}\n\n//CHECK#3\nif (3.3E0 !== 3.3) {\n $ERROR('#3: 3.3E0 === 3.3');\n}\n\n//CHECK#4\nif (4.4E0 !== 4.4) {\n $ERROR('#4: 4.4E0 === 4.4');\n}\n\n//CHECK#5\nif (5.5E0 !== 5.5) {\n $ERROR('#5: 5.5E0 === 5.5');\n}\n\n//CHECK#6\nif (6.6E0 !== 6.6) {\n $ERROR('#6: 6.E0 === 6.6');\n}\n\n//CHECK#7\nif (7.7E0 !== 7.7) {\n $ERROR('#7: 7.7E0 === 7.7');\n}\n\n//CHECK#8\nif (8.8E0 !== 8.8) {\n $ERROR('#8: 8.8E0 === 8.8');\n}\n\n//CHECK#9\nif (9.9E0 !== 9.9) {\n $ERROR('#9: 9.9E0 === 9.9');\n}\n",
+ "id": "S7.8.3_A3.4_T8"
+ },
+ {
+ "section": "7.8.3",
+ "description": "ExponentPart :: e DecimalDigits",
+ "negative": "",
+ "test": "//CHECK#1\ne1\n",
+ "id": "S7.8.3_A4.1_T1"
+ },
+ {
+ "section": "7.8.3",
+ "description": "ExponentPart :: E DecimalDigits",
+ "negative": "",
+ "test": "//CHECK#1\nE1\n",
+ "id": "S7.8.3_A4.1_T2"
+ },
+ {
+ "section": "7.8.3",
+ "description": "ExponentPart :: e DecimalDigits",
+ "negative": "",
+ "test": "//CHECK#1\ne-1\n",
+ "id": "S7.8.3_A4.1_T3"
+ },
+ {
+ "section": "7.8.3",
+ "description": "ExponentPart :: E DecimalDigits",
+ "negative": "",
+ "test": "//CHECK#1\nE-1\n",
+ "id": "S7.8.3_A4.1_T4"
+ },
+ {
+ "section": "7.8.3",
+ "description": "ExponentPart :: e DecimalDigits",
+ "negative": "",
+ "test": "//CHECK#1\ne+1\n",
+ "id": "S7.8.3_A4.1_T5"
+ },
+ {
+ "section": "7.8.3",
+ "description": "ExponentPart :: E DecimalDigits",
+ "negative": "",
+ "test": "//CHECK#1\nE+1\n",
+ "id": "S7.8.3_A4.1_T6"
+ },
+ {
+ "section": "7.8.3",
+ "description": "ExponentPart :: e 0",
+ "negative": "",
+ "test": "//CHECK#1\ne0\n",
+ "id": "S7.8.3_A4.1_T7"
+ },
+ {
+ "section": "7.8.3",
+ "description": "ExponentPart :: E 0",
+ "negative": "",
+ "test": "//CHECK#1\nE0\n",
+ "id": "S7.8.3_A4.1_T8"
+ },
+ {
+ "section": "7.8.3",
+ "description": "ExponentIndicator :: e",
+ "test": "//CHECK#0\nif (0e01 !== 0) {\n $ERROR('#0: 0e01 === 0');\n}\n\n//CHECK#1\nif (1e01 !== 10) {\n $ERROR('#1: 1e01 === 10');\n}\n\n//CHECK#2\nif (2e01 !== 20) {\n $ERROR('#2: 2e01 === 20');\n}\n\n//CHECK#3\nif (3e01 !== 30) {\n $ERROR('#3: 3e01 === 30');\n}\n\n//CHECK#4\nif (4e01 !== 40) {\n $ERROR('#4: 4e01 === 40');\n}\n\n//CHECK#5\nif (5e01 !== 50) {\n $ERROR('#5: 5e01 === 50');\n}\n\n//CHECK#6\nif (6e01 !== 60) {\n $ERROR('#6: 6e01 === 60');\n}\n\n//CHECK#7\nif (7e01 !== 70) {\n $ERROR('#7: 7e01 === 70');\n}\n\n//CHECK#8\nif (8e01 !== 80) {\n $ERROR('#8: 8e01 === 80');\n}\n\n//CHECK#9\nif (9e01 !== 90) {\n $ERROR('#9: 9e01 === 90');\n}\n",
+ "id": "S7.8.3_A4.2_T1"
+ },
+ {
+ "section": "7.8.3",
+ "description": "ExponentIndicator :: E",
+ "test": "//CHECK#0\nif (0E01 !== 0) {\n $ERROR('#0: 0E01 === 0');\n}\n\n//CHECK#1\nif (1E01 !== 10) {\n $ERROR('#1: 1E01 === 10');\n}\n\n//CHECK#2\nif (2E01 !== 20) {\n $ERROR('#2: 2E01 === 20');\n}\n\n//CHECK#3\nif (3E01 !== 30) {\n $ERROR('#3: 3E01 === 30');\n}\n\n//CHECK#4\nif (4E01 !== 40) {\n $ERROR('#4: 4E01 === 40');\n}\n\n//CHECK#5\nif (5E01 !== 50) {\n $ERROR('#5: 5E01 === 50');\n}\n\n//CHECK#6\nif (6E01 !== 60) {\n $ERROR('#6: 6E01 === 60');\n}\n\n//CHECK#7\nif (7E01 !== 70) {\n $ERROR('#7: 7E01 === 70');\n}\n\n//CHECK#8\nif (8E01 !== 80) {\n $ERROR('#8: 8E01 === 80');\n}\n\n//CHECK#9\nif (9E01 !== 90) {\n $ERROR('#9: 9E01 === 90');\n}\n",
+ "id": "S7.8.3_A4.2_T2"
+ },
+ {
+ "section": "7.8.3",
+ "description": "ExponentIndicator :: e",
+ "test": "//CHECK#0\nif (0e-01 !== 0) {\n $ERROR('#0: 0e-01 === 0');\n}\n\n//CHECK#1\nif (1e-01 !== 0.1) {\n $ERROR('#1: 1e-01 === 0.1');\n}\n\n//CHECK#2\nif (2e-01 !== 0.2) {\n $ERROR('#2: 2e-01 === 0.2');\n}\n\n//CHECK#3\nif (3e-01 !== 0.3) {\n $ERROR('#3: 3e-01 === 0.3');\n}\n\n//CHECK#4\nif (4e-01 !== 0.4) {\n $ERROR('#4: 4e-01 === 0.4');\n}\n\n//CHECK#5\nif (5e-01 !== 0.5) {\n $ERROR('#5: 5e-01 === 0.5');\n}\n\n//CHECK#6\nif (6e-01 !== 0.6) {\n $ERROR('#6: 6e-01 === 0.6');\n}\n\n//CHECK#7\nif (7e-01 !== 0.7) {\n $ERROR('#7: 7e-01 === 0.7');\n}\n\n//CHECK#8\nif (8e-01 !== 0.8) {\n $ERROR('#8: 8e-01 === 0.8');\n}\n\n//CHECK#9\nif (9e-01 !== 0.9) {\n $ERROR('#9: 9e-01 === 0.9');\n}\n",
+ "id": "S7.8.3_A4.2_T3"
+ },
+ {
+ "section": "7.8.3",
+ "description": "ExponentIndicator :: E",
+ "test": "//CHECK#0\nif (0E-01 !== 0) {\n $ERROR('#0: 0E-01 === 0');\n}\n\n//CHECK#1\nif (1E-01 !== 0.1) {\n $ERROR('#1: 1E-01 === 0.1');\n}\n\n//CHECK#2\nif (2E-01 !== 0.2) {\n $ERROR('#2: 2E-01 === 0.2');\n}\n\n//CHECK#3\nif (3E-01 !== 0.3) {\n $ERROR('#3: 3E-01 === 0.3');\n}\n\n//CHECK#4\nif (4E-01 !== 0.4) {\n $ERROR('#4: 4E-01 === 0.4');\n}\n\n//CHECK#5\nif (5E-01 !== 0.5) {\n $ERROR('#5: 5E-01 === 0.5');\n}\n\n//CHECK#6\nif (6E-01 !== 0.6) {\n $ERROR('#6: 6E-01 === 0.6');\n}\n\n//CHECK#7\nif (7E-01 !== 0.7) {\n $ERROR('#7: 7E-01 === 0.7');\n}\n\n//CHECK#8\nif (8E-01 !== 0.8) {\n $ERROR('#8: 8E-01 === 0.8');\n}\n\n//CHECK#9\nif (9E-01 !== 0.9) {\n $ERROR('#9: 9E-01 === 0.9');\n}\n",
+ "id": "S7.8.3_A4.2_T4"
+ },
+ {
+ "section": "7.8.3",
+ "description": "ExponentIndicator :: e",
+ "test": "//CHECK#0\nif (0e+01 !== 0) {\n $ERROR('#0: 0e+01 === 0');\n}\n\n//CHECK#1\nif (1e+01 !== 10) {\n $ERROR('#1: 1e+01 === 10');\n}\n\n//CHECK#2\nif (2e+01 !== 20) {\n $ERROR('#2: 2e+01 === 20');\n}\n\n//CHECK#3\nif (3e+01 !== 30) {\n $ERROR('#3: 3e+01 === 30');\n}\n\n//CHECK#4\nif (4e+01 !== 40) {\n $ERROR('#4: 4e+01 === 40');\n}\n\n//CHECK#5\nif (5e+01 !== 50) {\n $ERROR('#5: 5e+01 === 50');\n}\n\n//CHECK#6\nif (6e+01 !== 60) {\n $ERROR('#6: 6e+01 === 60');\n}\n\n//CHECK#7\nif (7e+01 !== 70) {\n $ERROR('#7: 7e+01 === 70');\n}\n\n//CHECK#8\nif (8e+01 !== 80) {\n $ERROR('#8: 8e+01 === 80');\n}\n\n//CHECK#9\nif (9e+01 !== 90) {\n $ERROR('#9: 9e+01 === 90');\n}\n",
+ "id": "S7.8.3_A4.2_T5"
+ },
+ {
+ "section": "7.8.3",
+ "description": "ExponentIndicator :: E",
+ "test": "//CHECK#0\nif (0E+01 !== 0) {\n $ERROR('#0: 0E+01 === 0');\n}\n\n//CHECK#1\nif (1E+01 !== 10) {\n $ERROR('#1: 1E+01 === 10');\n}\n\n//CHECK#2\nif (2E+01 !== 20) {\n $ERROR('#2: 2E+01 === 20');\n}\n\n//CHECK#3\nif (3E+01 !== 30) {\n $ERROR('#3: 3E+01 === 30');\n}\n\n//CHECK#4\nif (4E+01 !== 40) {\n $ERROR('#4: 4E+01 === 40');\n}\n\n//CHECK#5\nif (5E+01 !== 50) {\n $ERROR('#5: 5E+01 === 50');\n}\n\n//CHECK#6\nif (6E+01 !== 60) {\n $ERROR('#6: 6E+01 === 60');\n}\n\n//CHECK#7\nif (7E+01 !== 70) {\n $ERROR('#7: 7E+01 === 70');\n}\n\n//CHECK#8\nif (8E+01 !== 80) {\n $ERROR('#8: 8E+01 === 80');\n}\n\n//CHECK#9\nif (9E+01 !== 90) {\n $ERROR('#9: 9E+01 === 90');\n}\n",
+ "id": "S7.8.3_A4.2_T6"
+ },
+ {
+ "section": "7.8.3",
+ "description": "ExponentIndicator :: e",
+ "test": "//CHECK#0\nif (0e00 !== 0) {\n $ERROR('#0: 0e00 === 0');\n}\n\n//CHECK#1\nif (1e00 !== 1) {\n $ERROR('#1: 1e00 === 1');\n}\n\n//CHECK#2\nif (2e00 !== 2) {\n $ERROR('#2: 2e00 === 2');\n}\n\n//CHECK#3\nif (3e00 !== 3) {\n $ERROR('#3: 3e00 === 3');\n}\n\n//CHECK#4\nif (4e00 !== 4) {\n $ERROR('#4: 4e00 === 4');\n}\n\n//CHECK#5\nif (5e00 !== 5) {\n $ERROR('#5: 5e00 === 5');\n}\n\n//CHECK#6\nif (6e00 !== 6) {\n $ERROR('#6: 6e00 === 6');\n}\n\n//CHECK#7\nif (7e00 !== 7) {\n $ERROR('#7: 7e00 === 7');\n}\n\n//CHECK#8\nif (8e00 !== 8) {\n $ERROR('#8: 8e00 === 8');\n}\n\n//CHECK#9\nif (9e00 !== 9) {\n $ERROR('#9: 9e00 === 9');\n}\n",
+ "id": "S7.8.3_A4.2_T7"
+ },
+ {
+ "section": "7.8.3",
+ "description": "ExponentIndicator :: E",
+ "test": "//CHECK#0\nif (0E00 !== 0) {\n $ERROR('#0: 0E00 === 0');\n}\n\n//CHECK#1\nif (1E00 !== 1) {\n $ERROR('#1: 1E00 === 1');\n}\n\n//CHECK#2\nif (2E00 !== 2) {\n $ERROR('#2: 2E00 === 2');\n}\n\n//CHECK#3\nif (3E00 !== 3) {\n $ERROR('#3: 3E00 === 3');\n}\n\n//CHECK#4\nif (4E00 !== 4) {\n $ERROR('#4: 4E00 === 4');\n}\n\n//CHECK#5\nif (5E00 !== 5) {\n $ERROR('#5: 5E00 === 5');\n}\n\n//CHECK#6\nif (6E00 !== 6) {\n $ERROR('#6: 6E00 === 6');\n}\n\n//CHECK#7\nif (7E00 !== 7) {\n $ERROR('#7: 7E00 === 7');\n}\n\n//CHECK#8\nif (8E00 !== 8) {\n $ERROR('#8: 8E00 === 8');\n}\n\n//CHECK#9\nif (9E00 !== 9) {\n $ERROR('#9: 9E00 === 9');\n}\n",
+ "id": "S7.8.3_A4.2_T8"
+ },
+ {
+ "section": "7.8.3",
+ "description": "HexIntegerLiteral :: 0x Digit",
+ "test": "//CHECK#0\nif (0x0 !== 0) {\n $ERROR('#0: 0x0 === 0');\n}\n\n//CHECK#1\nif (0x1 !== 1) {\n $ERROR('#1: 0x1 === 1');\n}\n\n//CHECK#2\nif (0x2 !== 2) {\n $ERROR('#2: 0x2 === 2');\n}\n\n//CHECK#3\nif (0x3 !== 3) {\n $ERROR('#3: 0x3 === 3');\n}\n\n//CHECK#4\nif (0x4 !== 4) {\n $ERROR('#4: 0x4 === 4');\n}\n\n//CHECK#5\nif (0x5 !== 5) {\n $ERROR('#5: 0x5 === 5');\n}\n\n//CHECK#6\nif (0x6 !== 6) {\n $ERROR('#6: 0x6 === 6');\n}\n\n//CHECK#7\nif (0x7 !== 7) {\n $ERROR('#7: 0x7 === 7');\n}\n\n//CHECK#8\nif (0x8 !== 8) {\n $ERROR('#8: 0x8 === 8');\n}\n\n//CHECK#9\nif (0x9 !== 9) {\n $ERROR('#9: 0x9 === 9');\n}\n\n//CHECK#A\nif (0xA !== 10) {\n $ERROR('#A: 0xA === 10');\n}\n\n//CHECK#B\nif (0xB !== 11) {\n $ERROR('#B: 0xB === 11');\n}\n\n//CHECK#C\nif (0xC !== 12) {\n $ERROR('#C: 0xC === 12');\n}\n\n//CHECK#D\nif (0xD !== 13) {\n $ERROR('#D: 0xD === 13');\n}\n\n//CHECK#E\nif (0xE !== 14) {\n $ERROR('#E: 0xE === 14');\n}\n\n//CHECK#F\nif (0xF !== 15) {\n $ERROR('#F: 0xF === 15');\n}\n",
+ "id": "S7.8.3_A5.1_T1"
+ },
+ {
+ "section": "7.8.3",
+ "description": "HexIntegerLiteral :: 0X Digit",
+ "test": "//CHECK#0\nif (0X0 !== 0) {\n $ERROR('#0: 0X0 === 0');\n}\n\n//CHECK#1\nif (0X1 !== 1) {\n $ERROR('#1: 0X1 === 1');\n}\n\n//CHECK#2\nif (0X2 !== 2) {\n $ERROR('#2: 0X2 === 2');\n}\n\n//CHECK#3\nif (0X3 !== 3) {\n $ERROR('#3: 0X3 === 3');\n}\n\n//CHECK#4\nif (0X4 !== 4) {\n $ERROR('#4: 0X4 === 4');\n}\n\n//CHECK#5\nif (0X5 !== 5) {\n $ERROR('#5: 0X5 === 5');\n}\n\n//CHECK#6\nif (0X6 !== 6) {\n $ERROR('#6: 0X6 === 6');\n}\n\n//CHECK#7\nif (0X7 !== 7) {\n $ERROR('#7: 0X7 === 7');\n}\n\n//CHECK#8\nif (0X8 !== 8) {\n $ERROR('#8: 0X8 === 8');\n}\n\n//CHECK#9\nif (0X9 !== 9) {\n $ERROR('#9: 0X9 === 9');\n}\n\n//CHECK#A\nif (0XA !== 10) {\n $ERROR('#A: 0XA === 10');\n}\n\n//CHECK#B\nif (0XB !== 11) {\n $ERROR('#B: 0XB === 11');\n}\n\n//CHECK#C\nif (0XC !== 12) {\n $ERROR('#C: 0XC === 12');\n}\n\n//CHECK#D\nif (0XD !== 13) {\n $ERROR('#D: 0XD === 13');\n}\n\n//CHECK#E\nif (0XE !== 14) {\n $ERROR('#E: 0XE === 14');\n}\n\n//CHECK#F\nif (0XF !== 15) {\n $ERROR('#F: 0XF === 15');\n}\n",
+ "id": "S7.8.3_A5.1_T2"
+ },
+ {
+ "section": "7.8.3",
+ "description": "HexIntegerLiteral :: 0x NonZeroDigit Digits",
+ "test": "//CHECK#0\nif (0x0 !== 0) {\n $ERROR('#0: 0x0 === 0');\n}\n\n//CHECK#1\nif (0x1 !== 1) {\n $ERROR('#1: 0x1 === 1');\n}\n\n//CHECK#2\nif (0x10 !== 16) {\n $ERROR('#2: 0x10 === 16');\n}\n\n//CHECK3\nif (0x100 !== 256) {\n $ERROR('3: 0x100 === 256');\n}\n\n//CHECK#4\nif (0x1000 !== 4096) {\n $ERROR('#4: 0x1000 === 4096');\n}\n\n//CHECK#5\nif (0x10000 !== 65536) {\n $ERROR('#5: 0x10000 === 65536');\n}\n\n//CHECK#6\nif (0x100000 !== 1048576) {\n $ERROR('#6: 0x100000 === 1048576');\n}\n\n//CHECK#7\nif (0x1000000 !== 16777216) {\n $ERROR('#7: 0x1000000 === 16777216');\n}\n\n//CHECK#8\nif (0x10000000 !== 268435456) {\n $ERROR('#8: 0x10000000 === 268435456');\n}\n",
+ "id": "S7.8.3_A5.1_T3"
+ },
+ {
+ "section": "7.8.3",
+ "description": "HexIntegerLiteral :: 0X NonZeroDigit Digits",
+ "test": "//CHECK#0\nif (0X0 !== 0) {\n $ERROR('#0: 0X0 === 0');\n}\n\n//CHECK#1\nif (0X1 !== 1) {\n $ERROR('#1: 0X1 === 1');\n}\n\n//CHECK#2\nif (0X10 !== 16) {\n $ERROR('#2: 0X10 === 16');\n}\n\n//CHECK3\nif (0X100 !== 256) {\n $ERROR('3: 0X100 === 256');\n}\n\n//CHECK#4\nif (0X1000 !== 4096) {\n $ERROR('#4: 0X1000 === 4096');\n}\n\n//CHECK#5\nif (0X10000 !== 65536) {\n $ERROR('#5: 0X10000 === 65536');\n}\n\n//CHECK#6\nif (0X100000 !== 1048576) {\n $ERROR('#6: 0X100000 === 1048576');\n}\n\n//CHECK#7\nif (0X1000000 !== 16777216) {\n $ERROR('#7: 0X1000000 === 16777216');\n}\n\n//CHECK#8\nif (0X10000000 !== 268435456) {\n $ERROR('#8: 0X10000000 === 268435456');\n}\n",
+ "id": "S7.8.3_A5.1_T4"
+ },
+ {
+ "section": "7.8.3",
+ "description": "HexIntegerLiteral :: 0x0 Digits",
+ "test": "//CHECK#0\nif (0x00 !== 0) {\n $ERROR('#0: 0x00 === 0');\n}\n\n//CHECK#1\nif (0x01 !== 1) {\n $ERROR('#1: 0x01 === 1');\n}\n\n//CHECK#2\nif (0x010 !== 16) {\n $ERROR('#2: 0x010 === 16');\n}\n\n//CHECK3\nif (0x0100 !== 256) {\n $ERROR('3: 0x0100 === 256');\n}\n\n//CHECK#4\nif (0x01000 !== 4096) {\n $ERROR('#4: 0x01000 === 4096');\n}\n\n//CHECK#5\nif (0x010000 !== 65536) {\n $ERROR('#5: 0x010000 === 65536');\n}\n\n//CHECK#6\nif (0x0100000 !== 1048576) {\n $ERROR('#6: 0x0100000 === 1048576');\n}\n\n//CHECK#7\nif (0x01000000 !== 16777216) {\n $ERROR('#7: 0x01000000 === 16777216');\n}\n\n//CHECK#8\nif (0x010000000 !== 268435456) {\n $ERROR('#8: 0x010000000 === 268435456');\n}\n",
+ "id": "S7.8.3_A5.1_T5"
+ },
+ {
+ "section": "7.8.3",
+ "description": "HexIntegerLiteral :: 0X0 Digits",
+ "test": "//CHECK#0\nif (0X00 !== 0) {\n $ERROR('#0: 0X00 === 0');\n}\n\n//CHECK#1\nif (0X01 !== 1) {\n $ERROR('#1: 0X01 === 1');\n}\n\n//CHECK#2\nif (0X010 !== 16) {\n $ERROR('#2: 0X010 === 16');\n}\n\n//CHECK3\nif (0X0100 !== 256) {\n $ERROR('3: 0X0100 === 256');\n}\n\n//CHECK#4\nif (0X01000 !== 4096) {\n $ERROR('#4: 0X01000 === 4096');\n}\n\n//CHECK#5\nif (0X010000 !== 65536) {\n $ERROR('#5: 0X010000 === 65536');\n}\n\n//CHECK#6\nif (0X0100000 !== 1048576) {\n $ERROR('#6: 0X0100000 === 1048576');\n}\n\n//CHECK#7\nif (0X01000000 !== 16777216) {\n $ERROR('#7: 0X01000000 === 16777216');\n}\n\n//CHECK#8\nif (0X010000000 !== 268435456) {\n $ERROR('#8: 0X010000000 === 268435456');\n}\n",
+ "id": "S7.8.3_A5.1_T6"
+ },
+ {
+ "section": "7.8.3",
+ "description": "HexIntegerLiteral :: 0x one of a, b, c, d, e, f",
+ "test": "//CHECK#a\nif (0xa !== 10) {\n $ERROR('#a: 0xa === 10');\n}\n\n//CHECK#b\nif (0xb !== 11) {\n $ERROR('#b: 0xb === 11');\n}\n\n//CHECK#c\nif (0xc !== 12) {\n $ERROR('#c: 0xc === 12');\n}\n\n//CHECK#d\nif (0xd !== 13) {\n $ERROR('#d: 0xd === 13');\n}\n\n//CHECK#e\nif (0xe !== 14) {\n $ERROR('#e: 0xe === 14');\n}\n\n//CHECK#f\nif (0xf !== 15) {\n $ERROR('#f: 0xf === 15');\n}\n",
+ "id": "S7.8.3_A5.1_T7"
+ },
+ {
+ "section": "7.8.3",
+ "description": "HexIntegerLiteral :: 0X one of a, b, c, d, e, f",
+ "test": "//CHECK#a\nif (0Xa !== 10) {\n $ERROR('#a: 0Xa === 10');\n}\n\n//CHECK#b\nif (0Xb !== 11) {\n $ERROR('#b: 0Xb === 11');\n}\n\n//CHECK#c\nif (0Xc !== 12) {\n $ERROR('#c: 0Xc === 12');\n}\n\n//CHECK#d\nif (0Xd !== 13) {\n $ERROR('#d: 0Xd === 13');\n}\n\n//CHECK#e\nif (0Xe !== 14) {\n $ERROR('#e: 0Xe === 14');\n}\n\n//CHECK#f\nif (0Xf !== 15) {\n $ERROR('#f: 0Xf === 15');\n}\n",
+ "id": "S7.8.3_A5.1_T8"
+ },
+ {
+ "section": "7.8.3",
+ "description": "Checking if execution of \"0x\" passes",
+ "negative": "",
+ "test": "//CHECK#1\n0x\n",
+ "id": "S7.8.3_A6.1_T1"
+ },
+ {
+ "section": "7.8.3",
+ "description": "Checking if execution of \"0X\" passes",
+ "negative": "",
+ "test": "//CHECK#1\n0X\n",
+ "id": "S7.8.3_A6.1_T2"
+ },
+ {
+ "section": "7.8.3",
+ "description": "Checking if execution of \"0xG\" fails",
+ "negative": "",
+ "test": "//CHECK#1\n0xG\n",
+ "id": "S7.8.3_A6.2_T1"
+ },
+ {
+ "section": "7.8.3",
+ "description": "Checking if execution of \"0xg\" fails",
+ "negative": "",
+ "test": "//CHECK#1\n0xg\n",
+ "id": "S7.8.3_A6.2_T2"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/7.8.4.json b/website/resources/scripts/testcases2/7.8.4.json
new file mode 100644
index 000000000..52d4b6beb
--- /dev/null
+++ b/website/resources/scripts/testcases2/7.8.4.json
@@ -0,0 +1,120 @@
+{
+ "testCollection": {
+ "name": "7.8.4",
+ "numTests": 14,
+ "tests": [
+ {
+ "id": "7.8.4-1-s",
+ "path": "TestCases/chapter07/7.8/7.8.4/7.8.4-1-s.js",
+ "description": "A directive preceeding an 'use strict' directive may not contain an OctalEscapeSequence",
+ "test": "assertTrue((function testcase()\n{\n try \n {\n eval(' \"asterisk: \\\\052\" /* octal escape sequences forbidden in strict mode*/ ; \"use strict\";');\n return false;\n }\n catch (e) {\n return (e instanceof SyntaxError);\n }\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict())",
+ "strict_only": ""
+ },
+ {
+ "id": "7.8.4-10-s",
+ "path": "TestCases/chapter07/7.8/7.8.4/7.8.4-10-s.js",
+ "description": "An OctalEscapeSequence is not allowed in a String under Strict Mode",
+ "test": "assertTrue((function testcase()\n{\n try \n {\n eval('\"use strict\"; var x = \" \\\\10 \";');\n return false;\n }\n catch (e) {\n return (e instanceof SyntaxError);\n }\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict())",
+ "strict_only": ""
+ },
+ {
+ "id": "7.8.4-2-s",
+ "path": "TestCases/chapter07/7.8/7.8.4/7.8.4-2-s.js",
+ "description": "An OctalEscapeSequence is not allowed in a String under Strict Mode",
+ "test": "assertTrue((function testcase()\n{\n try \n {\n eval('\"use strict\"; var x = \"\\\\1\";');\n return false;\n }\n catch (e) {\n return (e instanceof SyntaxError);\n }\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict())",
+ "strict_only": ""
+ },
+ {
+ "id": "7.8.4-3-s",
+ "path": "TestCases/chapter07/7.8/7.8.4/7.8.4-3-s.js",
+ "description": "An OctalEscapeSequence is not allowed in a String under Strict Mode",
+ "test": "assertTrue((function testcase()\n{\n try \n {\n eval('\"use strict\"; var x = \"a\\\\4\";');\n return false;\n }\n catch (e) {\n return (e instanceof SyntaxError);\n }\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict())",
+ "strict_only": ""
+ },
+ {
+ "id": "7.8.4-30-s",
+ "path": "TestCases/chapter07/7.8/7.8.4/7.8.4-30-s.js",
+ "description": "An OctalEscapeSequence is not allowed in a String under Strict Mode",
+ "test": "assertTrue((function testcase()\n{\n try \n {\n eval('\"use strict\"; var x = \"\\\\' + '1\";');\n return false;\n }\n catch (e) {\n return (e instanceof SyntaxError);\n }\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict())",
+ "strict_only": ""
+ },
+ {
+ "id": "7.8.4-31-s",
+ "path": "TestCases/chapter07/7.8/7.8.4/7.8.4-31-s.js",
+ "description": "An OctalEscapeSequence is not allowed in a String under Strict Mode",
+ "test": "assertTrue((function testcase()\n{\n try \n {\n eval('\"use strict\"; var x = \"\\\\\" + \"1\";');\n return false;\n }\n catch (e) {\n return (e instanceof SyntaxError);\n }\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict())",
+ "strict_only": ""
+ },
+ {
+ "id": "7.8.4-32-s",
+ "path": "TestCases/chapter07/7.8/7.8.4/7.8.4-32-s.js",
+ "description": "Two OctalEscapeSequences in a String are not allowed in a String under Strict Mode",
+ "test": "assertTrue((function testcase()\n{\n try \n {\n eval('\"use strict\"; var x = \"\\\\1\\\\1\";');\n return false;\n }\n catch (e) {\n return (e instanceof SyntaxError);\n }\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict())",
+ "strict_only": ""
+ },
+ {
+ "id": "7.8.4-33-s",
+ "path": "TestCases/chapter07/7.8/7.8.4/7.8.4-33-s.js",
+ "description": "Three OctalEscapeSequences in a String are not allowed in a String under Strict Mode",
+ "test": "assertTrue((function testcase()\n{\n try \n {\n eval('\"use strict\"; var x = \"\\\\1\\\\2\\\\7\";');\n return false;\n }\n catch (e) {\n return (e instanceof SyntaxError);\n }\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict())",
+ "strict_only": ""
+ },
+ {
+ "id": "7.8.4-4-s",
+ "path": "TestCases/chapter07/7.8/7.8.4/7.8.4-4-s.js",
+ "description": "An OctalEscapeSequence is not allowed in a String under Strict Mode",
+ "test": "assertTrue((function testcase()\n{\n try \n {\n eval('\"use strict\"; var x = \"z\\\\7\";');\n return false;\n }\n catch (e) {\n return (e instanceof SyntaxError);\n }\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict())",
+ "strict_only": ""
+ },
+ {
+ "id": "7.8.4-5-s",
+ "path": "TestCases/chapter07/7.8/7.8.4/7.8.4-5-s.js",
+ "description": "An OctalEscapeSequence is not allowed in a String under Strict Mode",
+ "test": "assertTrue((function testcase()\n{\n try \n {\n eval('\"use strict\"; var x = \"\\\\00a\";');\n return false;\n }\n catch (e) {\n return (e instanceof SyntaxError);\n }\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict())",
+ "strict_only": ""
+ },
+ {
+ "id": "7.8.4-6-s",
+ "path": "TestCases/chapter07/7.8/7.8.4/7.8.4-6-s.js",
+ "description": "An OctalEscapeSequence is not allowed in a String under Strict Mode",
+ "test": "assertTrue((function testcase()\n{\n try \n {\n eval('\"use strict\"; var x = \"\\\\01z\";');\n return false;\n }\n catch (e) {\n return (e instanceof SyntaxError);\n }\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict())",
+ "strict_only": ""
+ },
+ {
+ "id": "7.8.4-7-s",
+ "path": "TestCases/chapter07/7.8/7.8.4/7.8.4-7-s.js",
+ "description": "An OctalEscapeSequence is not allowed in a String under Strict Mode",
+ "test": "assertTrue((function testcase()\n{\n try \n {\n eval('\"use strict\"; var x = \"a\\\\03z\";');\n return false;\n }\n catch (e) {\n return (e instanceof SyntaxError);\n }\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict())",
+ "strict_only": ""
+ },
+ {
+ "id": "7.8.4-8-s",
+ "path": "TestCases/chapter07/7.8/7.8.4/7.8.4-8-s.js",
+ "description": "An OctalEscapeSequence is not allowed in a String under Strict Mode",
+ "test": "assertTrue((function testcase()\n{\n try \n {\n eval('\"use strict\"; var x = \" \\\\06\";');\n return false;\n }\n catch (e) {\n return (e instanceof SyntaxError);\n }\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict())",
+ "strict_only": ""
+ },
+ {
+ "id": "7.8.4-9-s",
+ "path": "TestCases/chapter07/7.8/7.8.4/7.8.4-9-s.js",
+ "description": "An OctalEscapeSequence is not allowed in a String under Strict Mode",
+ "test": "assertTrue((function testcase()\n{\n try \n {\n eval('\"use strict\"; var x = \"\\\\07 \";');\n return false;\n }\n catch (e) {\n return (e instanceof SyntaxError);\n }\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict())",
+ "strict_only": ""
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/7.8.4_String_Literals.json b/website/resources/scripts/testcases2/7.8.4_String_Literals.json
new file mode 100644
index 000000000..ec3388dd2
--- /dev/null
+++ b/website/resources/scripts/testcases2/7.8.4_String_Literals.json
@@ -0,0 +1,366 @@
+{
+ "testCollection": {
+ "name": "7.8.4_String_Literals",
+ "numTests": 55,
+ "tests": [
+ {
+ "section": "7.8.4",
+ "description": "DoubleStringCharacter :: SourceCharacter but not double-quote \" or LineTerminator",
+ "negative": "",
+ "test": "//CHECK#1\n\"\"\"\n",
+ "id": "S7.8.4_A1.1_T1"
+ },
+ {
+ "section": "7.8.4",
+ "description": "DoubleStringCharacter :: SourceCharacter but not double-quote \" or LineTerminator",
+ "negative": "",
+ "test": "//CHECK#1\n\"\n\"\n",
+ "id": "S7.8.4_A1.1_T2"
+ },
+ {
+ "section": "7.8.4",
+ "description": "SingleStringCharacter :: SourceCharacter but not single-quote ' or LineTerminator",
+ "negative": "",
+ "test": "//CHECK#1\n'''\n",
+ "id": "S7.8.4_A1.2_T1"
+ },
+ {
+ "section": "7.8.4",
+ "description": "SingleStringCharacter :: SourceCharacter but not single-quote ' or LineTerminator",
+ "negative": "",
+ "test": "//CHECK#1\n'\n'\n",
+ "id": "S7.8.4_A1.2_T2"
+ },
+ {
+ "section": "7.8.4",
+ "description": "Check ENGLISH CAPITAL ALPHABET",
+ "test": "//CHECK#A-Z\nunicode = [\"\\u0041\", \"\\u0042\", \"\\u0043\", \"\\u0044\", \"\\u0045\", \"\\u0046\", \"\\u0047\", \"\\u0048\", \"\\u0049\", \"\\u004A\", \"\\u004B\", \"\\u004C\", \"\\u004D\", \"\\u004E\", \"\\u004F\", \"\\u0050\", \"\\u0051\", \"\\u0052\", \"\\u0053\", \"\\u0054\", \"\\u0055\", \"\\u0056\", \"\\u0057\", \"\\u0058\", \"\\u0059\", \"\\u005A\"];\ncharacter = [\"A\", \"B\", \"C\", \"D\", \"E\", \"F\", \"G\", \"H\", \"I\", \"J\", \"K\", \"L\", \"M\", \"N\", \"O\", \"P\", \"Q\", \"R\", \"S\", \"T\", \"U\", \"V\", \"W\", \"X\", \"Y\", \"Z\"];\nfor (index = 0; index <= 25; index++) {\n if (unicode[index] !== character[index]) {\n $ERROR('#' + character[index] + ' ');\n }\n}\n",
+ "id": "S7.8.4_A2.1_T1"
+ },
+ {
+ "section": "7.8.4",
+ "description": "Check ENGLISH SMALL ALPHABET",
+ "test": "//CHECK#a-z\nhex = [\"\\u0061\", \"\\u0062\", \"\\u0063\", \"\\u0064\", \"\\u0065\", \"\\u0066\", \"\\u0067\", \"\\u0068\", \"\\u0069\", \"\\u006A\", \"\\u006B\", \"\\u006C\", \"\\u006D\", \"\\u006E\", \"\\u006F\", \"\\u0070\", \"\\u0071\", \"\\u0072\", \"\\u0073\", \"\\u0074\", \"\\u0075\", \"\\u0076\", \"\\u0077\", \"\\u0078\", \"\\u0079\", \"\\u007A\"];\ncharacter = [\"a\", \"b\", \"c\", \"d\", \"e\", \"f\", \"g\", \"h\", \"i\", \"j\", \"k\", \"l\", \"m\", \"n\", \"o\", \"p\", \"q\", \"r\", \"s\", \"t\", \"u\", \"v\", \"w\", \"x\", \"y\", \"z\"];\nfor (index = 0; index <= 25; index++) {\n if (hex[index] !== character[index]) {\n $ERROR('#' + character[index] + ' ');\n }\n}\n",
+ "id": "S7.8.4_A2.1_T2"
+ },
+ {
+ "section": "7.8.4",
+ "description": "Check RUSSIAN CAPITAL ALPHABET",
+ "test": "//CHECK#А-Я\nunicode = [\"\\u0410\", \"\\u0411\", \"\\u0412\", \"\\u0413\", \"\\u0414\", \"\\u0415\", \"\\u0416\", \"\\u0417\", \"\\u0418\", \"\\u0419\", \"\\u041A\", \"\\u041B\", \"\\u041C\", \"\\u041D\", \"\\u041E\", \"\\u041F\", \"\\u0420\", \"\\u0421\", \"\\u0422\", \"\\u0423\", \"\\u0424\", \"\\u0425\", \"\\u0426\", \"\\u0427\", \"\\u0428\", \"\\u0429\", \"\\u042A\", \"\\u042B\", \"\\u042C\", \"\\u042D\", \"\\u042E\", \"\\u042F\", \"\\u0401\"];\ncharacter = [\"А\", \"Б\", \"В\", \"Г\", \"Д\", \"Е\", \"Ж\", \"З\", \"И\", \"Й\", \"К\", \"Л\", \"М\", \"Н\", \"О\", \"П\", \"Р\", \"С\", \"Т\", \"У\", \"Ф\", \"Х\", \"Ц\", \"Ч\", \"Ш\", \"Щ\", \"Ъ\", \"Ы\", \"Ь\", \"Э\", \"Ю\", \"Я\", \"Ё\"];\nfor (index = 0; index <= 32; index++) {\n if (unicode[index] !== character[index]) {\n $ERROR('#' + character[index] + ' ');\n }\n}\n",
+ "id": "S7.8.4_A2.2_T1"
+ },
+ {
+ "section": "7.8.4",
+ "description": "Check RUSSIAN SMALL ALPHABET",
+ "test": "//CHECK#а-я\nunicode = [\"\\u0430\", \"\\u0431\", \"\\u0432\", \"\\u0433\", \"\\u0434\", \"\\u0435\", \"\\u0436\", \"\\u0437\", \"\\u0438\", \"\\u0439\", \"\\u043A\", \"\\u043B\", \"\\u043C\", \"\\u043D\", \"\\u043E\", \"\\u043F\", \"\\u0440\", \"\\u0441\", \"\\u0442\", \"\\u0443\", \"\\u0444\", \"\\u0445\", \"\\u0446\", \"\\u0447\", \"\\u0448\", \"\\u0449\", \"\\u044A\", \"\\u044B\", \"\\u044C\", \"\\u044D\", \"\\u044E\", \"\\u044F\", \"\\u0451\"];\ncharacter = [\"а\", \"б\", \"в\", \"г\", \"д\", \"е\", \"ж\", \"з\", \"и\", \"й\", \"к\", \"л\", \"м\", \"н\", \"о\", \"п\", \"р\", \"с\", \"т\", \"у\", \"ф\", \"х\", \"ц\", \"ч\", \"ш\", \"щ\", \"ъ\", \"ы\", \"ь\", \"э\", \"ю\", \"я\", \"ё\"];\nfor (index = 0; index <= 32; index++) {\n if (unicode[index] !== character[index]) {\n $ERROR('#' + character[index] + ' ');\n }\n}\n",
+ "id": "S7.8.4_A2.2_T2"
+ },
+ {
+ "section": "7.8.4",
+ "description": "Check DIGITS",
+ "test": "//CHECK#0-9\nunicode = [\"\\u0030\", \"\\u0031\", \"\\u0032\", \"\\u0033\", \"\\u0034\", \"\\u0035\", \"\\u0036\", \"\\u0037\", \"\\u0038\", \"\\u0039\"];\ncharacter = [\"0\", \"1\", \"2\", \"3\", \"4\", \"5\", \"6\", \"7\", \"8\", \"9\"];\nfor (index = 0; index <= 9; index++) {\n if (unicode[index] !== character[index]) {\n $ERROR('#' + character[index] + ' ');\n }\n}\n",
+ "id": "S7.8.4_A2.3_T1"
+ },
+ {
+ "section": "7.8.4",
+ "description": "Checking if execution of \"\\\" fails",
+ "negative": "",
+ "test": "//CHECK#1\n\"\\\"\n",
+ "id": "S7.8.4_A3.1_T1"
+ },
+ {
+ "section": "7.8.4",
+ "description": "Checking if execution of \"'\\'\" fails",
+ "negative": "",
+ "test": "//CHECK#1\n'\\'\n",
+ "id": "S7.8.4_A3.1_T2"
+ },
+ {
+ "section": "7.8.4",
+ "description": "Checking if execution of \"\\\\\\\" fails",
+ "negative": "",
+ "test": "//CHECK#1\n\"\\\\\\\"\n",
+ "id": "S7.8.4_A3.2_T1"
+ },
+ {
+ "section": "7.8.4",
+ "description": "Checking if execution of '\\\\\\' fails",
+ "negative": "",
+ "test": "//CHECK#1\n'\\\\\\'\n",
+ "id": "S7.8.4_A3.2_T2"
+ },
+ {
+ "section": "7.8.4",
+ "description": "SingleEscapeSequence :: one of b f n r t v",
+ "test": "//CHECK#1\nif (String.fromCharCode(0x0008) !== \"\\b\") {\n $ERROR('#1: String.fromCharCode(0x0008) === \"\\\\b\"');\n}\n\n//CHECK#2\nif (String.fromCharCode(0x0009) !== \"\\t\") {\n $ERROR('#2: String.fromCharCode(0x0009) === \"\\\\t\"');\n}\n\n//CHECK#3\nif (String.fromCharCode(0x000A) !== \"\\n\") {\n $ERROR('#3: String.fromCharCode(0x000A) === \"\\\\n\"');\n}\n\n//CHECK#4\nif (String.fromCharCode(0x000B) !== \"\\v\") {\n $ERROR('#4: String.fromCharCode(0x000B) === \"\\\\v\"');\n}\n\n//CHECK#5\nif (String.fromCharCode(0x000C) !== \"\\f\") {\n $ERROR('#5: String.fromCharCode(0x000C) === \"\\\\f\"');\n}\n\n//CHECK#6\nif (String.fromCharCode(0x000D) !== \"\\r\") {\n $ERROR('#6: String.fromCharCode(0x000D) === \"\\\\r\"');\n}\n",
+ "id": "S7.8.4_A4.1_T1"
+ },
+ {
+ "section": "7.8.4",
+ "description": "SingleEscapeSequence :: one of ' \" \\",
+ "test": "//CHECK#1\nif (String.fromCharCode(0x0027) !== \"\\'\") {\n $ERROR('#1: String.fromCharCode(0x0027) === \"\\\\\\'\"');\n}\n\n//CHECK#2\nif (String.fromCharCode(0x0022) !== '\\\"') {\n $ERROR('#2: String.fromCharCode(0x0027) === \\'\\\\\\\"\\'');\n}\n\n//CHECK#3\nif (String.fromCharCode(0x005C) !== \"\\\\\") {\n $ERROR('#3: String.fromCharCode(0x005C) === \"\\\\\\\"');\n}\n\n//CHECK#4\nif (\"\\'\" !== \"'\") {\n $ERROR('#4: \"\\'\" === \"\\\\\\'\"');\n}\n\n//CHECK#5\nif ('\\\"' !== '\"') {\n $ERROR('#5: \\'\\\"\\' === \\'\\\\\\\"\\'');\n}\n",
+ "id": "S7.8.4_A4.1_T2"
+ },
+ {
+ "section": "7.8.4",
+ "description": "NonEscapeSequence :: ENGLISH CAPITAL ALPHABET",
+ "test": "//CHECK#A-Z\nCharacterCode = [0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0046, 0x0047, 0x0048, 0x0049, 0x004A, 0x004B, 0x004C, 0x004D, 0x004E, 0x004F, 0x0050, 0x0051, 0x0052, 0x0053, 0x0054, 0x0055, 0x0056, 0x0057, 0x0058, 0x0059, 0x005A];\nNonEscapeCharacter = [\"\\A\", \"\\B\", \"\\C\", \"\\D\", \"\\E\", \"\\F\", \"\\G\", \"\\H\", \"\\I\", \"\\J\", \"\\K\", \"\\L\", \"\\M\", \"\\N\", \"\\O\", \"\\P\", \"\\Q\", \"\\R\", \"\\S\", \"\\T\", \"\\U\", \"\\V\", \"\\W\", \"\\X\", \"\\Y\", \"\\Z\"];\nfor (index = 0; index <= 25; index++) {\n if (String.fromCharCode(CharacterCode[index]) !== NonEscapeCharacter[index]) {\n $ERROR('#' + NonEscapeCharacter[index] + ' ');\n }\n}\n",
+ "id": "S7.8.4_A4.2_T1"
+ },
+ {
+ "section": "7.8.4",
+ "description": "NonEscapeSequence :: ENGLISH CAPITAL ALPHABET",
+ "test": "//CHECK#A-Z\nif (\"A\" !== \"\\A\") {\n $ERROR('#A');\n}\n\nif (\"B\" !== \"\\B\") {\n $ERROR('#B');\n}\n\nif (\"C\" !== \"\\C\") {\n $ERROR('#C');\n}\n\nif (\"D\" !== \"\\D\") {\n $ERROR('#D');\n}\n\nif (\"E\" !== \"\\E\") {\n $ERROR('#E');\n}\n\nif (\"F\" !== \"\\F\") {\n $ERROR('#F');\n}\n\nif (\"G\" !== \"\\G\") {\n $ERROR('#G');\n}\n\nif (\"H\" !== \"\\H\") {\n $ERROR('#H');\n}\n\nif (\"I\" !== \"\\I\") {\n $ERROR('#I');\n}\n\nif (\"J\" !== \"\\J\") {\n $ERROR('#J');\n}\n\nif (\"K\" !== \"\\K\") {\n $ERROR('#K');\n}\n\nif (\"L\" !== \"\\L\") {\n $ERROR('#L');\n}\n\nif (\"M\" !== \"\\M\") {\n $ERROR('#M');\n}\n\nif (\"N\" !== \"\\N\") {\n $ERROR('#N');\n}\n\nif (\"O\" !== \"\\O\") {\n $ERROR('#O');\n}\n\nif (\"P\" !== \"\\P\") {\n $ERROR('#P');\n}\n\nif (\"Q\" !== \"\\Q\") {\n $ERROR('#Q');\n}\n\nif (\"R\" !== \"\\R\") {\n $ERROR('#R');\n}\n\nif (\"S\" !== \"\\S\") {\n $ERROR('#S');\n}\n\nif (\"T\" !== \"\\T\") {\n $ERROR('#T');\n}\n\nif (\"U\" !== \"\\U\") {\n $ERROR('#U');\n}\n\nif (\"V\" !== \"\\V\") {\n $ERROR('#V');\n}\n\nif (\"W\" !== \"\\W\") {\n $ERROR('#W');\n}\n\nif (\"X\" !== \"\\X\") {\n $ERROR('#X');\n}\n\nif (\"Y\" !== \"\\Y\") {\n $ERROR('#Y');\n}\n\nif (\"Z\" !== \"\\Z\") {\n $ERROR('#Z');\n}\n",
+ "id": "S7.8.4_A4.2_T2"
+ },
+ {
+ "section": "7.8.4",
+ "description": "NonEscapeSequence :: ENGLISH SMALL ALPHABET",
+ "test": "//CHECK#a-z without b, f, n, r, t, v, x, u\nCharacterCode = [0x0061, 0x0063, 0x0064, 0x0065, 0x0067, 0x0068, 0x0069, 0x006A, 0x006B, 0x006C, 0x006D, 0x006F, 0x0070, 0x0071, 0x0073, 0x0077, 0x0079, 0x007A];\nNonEscapeCharacter = [\"\\a\", \"\\c\", \"\\d\", \"\\e\", \"\\g\", \"\\h\", \"\\i\", \"\\j\", \"\\k\", \"\\l\", \"\\m\", \"\\o\", \"\\p\", \"\\q\", \"\\s\", \"\\w\", \"\\y\", \"\\z\"];\nfor (index = 0; index <= 17; index++) {\n if (String.fromCharCode(CharacterCode[index]) !== NonEscapeCharacter[index]) {\n $ERROR('#' + NonEscapeCharacter[index] + ' ');\n }\n}\n",
+ "id": "S7.8.4_A4.2_T3"
+ },
+ {
+ "section": "7.8.4",
+ "description": "NonEscapeSequence :: ENGLISH SMALL ALPHABET",
+ "test": "//CHECK#a-z without b, f, n, r, t, v, x, u\n\nif (\"a\" !== \"\\a\") {\n $ERROR('#a');\n}\n\nif (\"c\" !== \"\\c\") {\n $ERROR('#c');\n}\n\nif (\"d\" !== \"\\d\") {\n $ERROR('#d');\n}\n\nif (\"e\" !== \"\\e\") {\n $ERROR('#e');\n}\n\nif (\"g\" !== \"\\g\") {\n $ERROR('#g');\n}\n\nif (\"h\" !== \"\\h\") {\n $ERROR('#h');\n}\n\nif (\"i\" !== \"\\i\") {\n $ERROR('#i');\n}\n\nif (\"j\" !== \"\\j\") {\n $ERROR('#j');\n}\n\nif (\"k\" !== \"\\k\") {\n $ERROR('#k');\n}\n\nif (\"l\" !== \"\\l\") {\n $ERROR('#l');\n}\n\nif (\"m\" !== \"\\m\") {\n $ERROR('#m');\n}\n\n\nif (\"o\" !== \"\\o\") {\n $ERROR('#o');\n}\n\nif (\"p\" !== \"\\p\") {\n $ERROR('#p');\n}\n\nif (\"q\" !== \"\\q\") {\n $ERROR('#q');\n}\n\nif (\"s\" !== \"\\s\") {\n $ERROR('#s');\n}\n\nif (\"w\" !== \"\\w\") {\n $ERROR('#w');\n}\n\nif (\"y\" !== \"\\y\") {\n $ERROR('#y');\n}\n\nif (\"z\" !== \"\\z\") {\n $ERROR('#z');\n}\n\n",
+ "id": "S7.8.4_A4.2_T4"
+ },
+ {
+ "section": "7.8.4",
+ "description": "NonEscapeSequence :: RUSSIAN CAPITAL ALPHABET",
+ "test": "//CHECK#А-Я\nCharacterCode = [0x0410, 0x0411, 0x0412, 0x0413, 0x0414, 0x0415, 0x0416, 0x0417, 0x0418, 0x0419, 0x041A, 0x041B, 0x041C, 0x041D, 0x041E, 0x041F, 0x0420, 0x0421, 0x0422, 0x0423, 0x0424, 0x0425, 0x0426, 0x0427, 0x0428, 0x0429, 0x042A, 0x042B, 0x042C, 0x042D, 0x042E, 0x042F, 0x0401];\nNonEscapeCharacter = [\"\\А\", \"\\Б\", \"\\В\", \"\\Г\", \"\\Д\", \"\\Е\", \"\\Ж\", \"\\З\", \"\\И\", \"\\Й\", \"\\К\", \"\\Л\", \"\\М\", \"\\Н\", \"\\О\", \"\\П\", \"\\Р\", \"\\С\", \"\\Т\", \"\\У\", \"\\Ф\", \"\\Х\", \"\\Ц\", \"\\Ч\", \"\\Ш\", \"\\Щ\", \"\\Ъ\", \"\\Ы\", \"\\Ь\", \"\\Э\", \"\\Ю\", \"\\Я\", \"\\Ё\"];\nfor (index = 0; index <= 32; index++) {\n if (String.fromCharCode(CharacterCode[index]) !== NonEscapeCharacter[index]) {\n $ERROR('#' + NonEscapeCharacter[index] + ' ');\n }\n}\n",
+ "id": "S7.8.4_A4.2_T5"
+ },
+ {
+ "section": "7.8.4",
+ "description": "NonEscapeSequence :: RUSSIAN CAPITAL ALPHABET",
+ "test": "//CHECK#А-Я\n\nif (\"А\" !== \"\\А\") {\n $ERROR('#А');\n}\n\nif (\"Б\" !== \"\\Б\") {\n $ERROR('#Б');\n}\n\nif (\"В\" !== \"\\В\") {\n $ERROR('#В');\n}\n\nif (\"Г\" !== \"\\Г\") {\n $ERROR('#Г');\n}\n\nif (\"Д\" !== \"\\Д\") {\n $ERROR('#Д');\n}\n\nif (\"Е\" !== \"\\Е\") {\n $ERROR('#Е');\n}\n\nif (\"Ж\" !== \"\\Ж\") {\n $ERROR('#Ж');\n}\n\nif (\"З\" !== \"\\З\") {\n $ERROR('#З');\n}\n\nif (\"И\" !== \"\\И\") {\n $ERROR('#И');\n}\n\nif (\"Й\" !== \"\\Й\") {\n $ERROR('#Й');\n}\n\nif (\"К\" !== \"\\К\") {\n $ERROR('#К');\n}\n\nif (\"Л\" !== \"\\Л\") {\n $ERROR('#Л');\n}\n\nif (\"М\" !== \"\\М\") {\n $ERROR('#М');\n}\n\nif (\"Н\" !== \"\\Н\") {\n $ERROR('#Н');\n}\n\nif (\"О\" !== \"\\О\") {\n $ERROR('#О');\n}\n\nif (\"П\" !== \"\\П\") {\n $ERROR('#П');\n}\n\nif (\"Р\" !== \"\\Р\") {\n $ERROR('#Р');\n}\n\nif (\"С\" !== \"\\С\") {\n $ERROR('#С');\n}\n\nif (\"Т\" !== \"\\Т\") {\n $ERROR('#Т');\n}\n\nif (\"У\" !== \"\\У\") {\n $ERROR('#У');\n}\n\nif (\"Ф\" !== \"\\Ф\") {\n $ERROR('#Ф');\n}\n\nif (\"Х\" !== \"\\Х\") {\n $ERROR('#Х');\n}\n\nif (\"Ц\" !== \"\\Ц\") {\n $ERROR('#Ц');\n}\n\nif (\"Ч\" !== \"\\Ч\") {\n $ERROR('#Ч');\n}\n\nif (\"Ш\" !== \"\\Ш\") {\n $ERROR('#Ш');\n}\n\nif (\"Щ\" !== \"\\Щ\") {\n $ERROR('#Щ');\n}\n\nif (\"Ъ\" !== \"\\Ъ\") {\n $ERROR('#Ъ');\n}\n\nif (\"Ы\" !== \"\\Ы\") {\n $ERROR('#Ы');\n}\n\nif (\"Ь\" !== \"\\Ь\") {\n $ERROR('#Ь');\n}\n\nif (\"Э\" !== \"\\Э\") {\n $ERROR('#Э');\n}\n\nif (\"Ю\" !== \"\\Ю\") {\n $ERROR('#Ю');\n}\n\nif (\"Я\" !== \"\\Я\") {\n $ERROR('#Я');\n}\n\nif (\"Ё\" !== \"\\Ё\") {\n $ERROR('#Ё');\n}\n",
+ "id": "S7.8.4_A4.2_T6"
+ },
+ {
+ "section": "7.8.4",
+ "description": "NonEscapeSequence :: RUSSIAN SMALL ALPHABET",
+ "test": "//CHECK#а-я\nCharacterCode = [0x0430, 0x0431, 0x0432, 0x0433, 0x0434, 0x0435, 0x0436, 0x0437, 0x0438, 0x0439, 0x043A, 0x043B, 0x043C, 0x043D, 0x043E, 0x043F, 0x0440, 0x0441, 0x0442, 0x0443, 0x0444, 0x0445, 0x0446, 0x0447, 0x0448, 0x0449, 0x044A, 0x044B, 0x044C, 0x044D, 0x044E, 0x044F, 0x0451];\nNonEscapeCharacter = [\"\\а\", \"\\б\", \"\\в\", \"\\г\", \"\\д\", \"\\е\", \"\\ж\", \"\\з\", \"\\и\", \"\\й\", \"\\к\", \"\\л\", \"\\м\", \"\\н\", \"\\о\", \"\\п\", \"\\р\", \"\\с\", \"\\т\", \"\\у\", \"\\ф\", \"\\х\", \"\\ц\", \"\\ч\", \"\\ш\", \"\\щ\", \"\\ъ\", \"\\ы\", \"\\ь\", \"\\э\", \"\\ю\", \"\\я\", \"\\ё\"];\nfor (index = 0; index <= 32; index++) {\n if (String.fromCharCode(CharacterCode[index]) !== NonEscapeCharacter[index]) {\n $ERROR('#' + NonEscapeCharacter[index] + ' ');\n }\n}\n",
+ "id": "S7.8.4_A4.2_T7"
+ },
+ {
+ "section": "7.8.4",
+ "description": "NonEscapeSequence :: RUSSIAN SMALL ALPHABET",
+ "test": "//CHECK#а-я\n\nif (\"а\" !== \"\\а\") {\n $ERROR('#а');\n}\n\nif (\"б\" !== \"\\б\") {\n $ERROR('#б');\n}\n\nif (\"в\" !== \"\\в\") {\n $ERROR('#в');\n}\n\nif (\"г\" !== \"\\г\") {\n $ERROR('#г');\n}\n\nif (\"д\" !== \"\\д\") {\n $ERROR('#д');\n}\n\nif (\"е\" !== \"\\е\") {\n $ERROR('#е');\n}\n\nif (\"ж\" !== \"\\ж\") {\n $ERROR('#ж');\n}\n\nif (\"з\" !== \"\\з\") {\n $ERROR('#з');\n}\n\nif (\"и\" !== \"\\и\") {\n $ERROR('#и');\n}\n\nif (\"й\" !== \"\\й\") {\n $ERROR('#й');\n}\n\nif (\"к\" !== \"\\к\") {\n $ERROR('#к');\n}\n\nif (\"л\" !== \"\\л\") {\n $ERROR('#л');\n}\n\nif (\"м\" !== \"\\м\") {\n $ERROR('#м');\n}\n\nif (\"н\" !== \"\\н\") {\n $ERROR('#н');\n}\n\nif (\"о\" !== \"\\о\") {\n $ERROR('#о');\n}\n\nif (\"п\" !== \"\\п\") {\n $ERROR('#п');\n}\n\nif (\"р\" !== \"\\р\") {\n $ERROR('#р');\n}\n\nif (\"с\" !== \"\\с\") {\n $ERROR('#с');\n}\n\nif (\"т\" !== \"\\т\") {\n $ERROR('#т');\n}\n\nif (\"у\" !== \"\\у\") {\n $ERROR('#у');\n}\n\nif (\"ф\" !== \"\\ф\") {\n $ERROR('#ф');\n}\n\nif (\"х\" !== \"\\х\") {\n $ERROR('#х');\n}\n\nif (\"ц\" !== \"\\ц\") {\n $ERROR('#ц');\n}\n\nif (\"ч\" !== \"\\ч\") {\n $ERROR('#ч');\n}\n\nif (\"ш\" !== \"\\ш\") {\n $ERROR('#ш');\n}\n\nif (\"щ\" !== \"\\щ\") {\n $ERROR('#щ');\n}\n\nif (\"ъ\" !== \"\\ъ\") {\n $ERROR('#ъ');\n}\n\nif (\"ы\" !== \"\\ы\") {\n $ERROR('#ы');\n}\n\nif (\"ь\" !== \"\\ь\") {\n $ERROR('#ь');\n}\n\nif (\"э\" !== \"\\э\") {\n $ERROR('#э');\n}\n\nif (\"ю\" !== \"\\ю\") {\n $ERROR('#ю');\n}\n\nif (\"я\" !== \"\\я\") {\n $ERROR('#я');\n}\n\nif (\"ё\" !== \"\\ё\") {\n $ERROR('#ё');\n}\n",
+ "id": "S7.8.4_A4.2_T8"
+ },
+ {
+ "section": "7.8.4",
+ "description": "EscapeCharacter :: DecimalDigits :: 1",
+ "negative": "",
+ "test": "//CHECK#1\n\"\\1\"\n",
+ "id": "S7.8.4_A4.3_T1"
+ },
+ {
+ "section": "7.8.4",
+ "description": "EscapeCharacter :: DecimalDigits :: 7",
+ "negative": "",
+ "test": "//CHECK#1\n\"\\7\"\n",
+ "id": "S7.8.4_A4.3_T2"
+ },
+ {
+ "section": "7.8.4",
+ "description": "EscapeCharacter :: DecimalDigits :: 8",
+ "negative": "",
+ "test": "//CHECK#1\n\"\\8\"\n",
+ "id": "S7.8.4_A4.3_T3"
+ },
+ {
+ "section": "7.8.4",
+ "description": "EscapeCharacter :: DecimalDigits :: 9",
+ "negative": "",
+ "test": "//CHECK#1\n\"\\9\"\n",
+ "id": "S7.8.4_A4.3_T4"
+ },
+ {
+ "section": "7.8.4",
+ "description": "EscapeCharacter :: u",
+ "negative": "",
+ "test": "//CHECK#1\n\"\\u\"\n",
+ "id": "S7.8.4_A4.3_T5"
+ },
+ {
+ "section": "7.8.4",
+ "description": "EscapeCharacter :: x",
+ "negative": "",
+ "test": "//CHECK#1\n\"\\x\"\n",
+ "id": "S7.8.4_A4.3_T6"
+ },
+ {
+ "section": "7.8.4",
+ "description": "EscapeCharacter :: SingleEscapeCharacter :: one of b f n r t v",
+ "test": "//CHECK#bfnrtv\nif (\"b\" === \"\\b\") {\n $ERROR('#b')\n}\n\nif (\"f\" === \"\\f\") {\n $ERROR('#f')\n}\n\nif (\"n\" === \"\\n\") {\n $ERROR('#n')\n}\n\nif (\"r\" === \"\\r\") {\n $ERROR('#r')\n}\n\nif (\"t\" === \"\\t\") {\n $ERROR('#t')\n}\n\nif (\"v\" === \"\\v\") {\n $ERROR('#v')\n}\n\n",
+ "id": "S7.8.4_A4.3_T7"
+ },
+ {
+ "section": "7.8.4",
+ "description": "String.fromCharCode(0x0000)",
+ "test": "//CHECK#1\nif (String.fromCharCode(0x0000) !== \"\\0\") {\n $ERROR('#1: String.fromCharCode(0x0000) === \"\\\\0\"');\n}\n",
+ "id": "S7.8.4_A5.1_T1"
+ },
+ {
+ "section": "7.8.4",
+ "description": "\"\\u0000\"",
+ "test": "//CHECK#1\nif (\"\\u0000\" !== \"\\0\") {\n $ERROR('#1: \"\\\\u0000\" === \"\\\\0\"');\n}\n",
+ "id": "S7.8.4_A5.1_T2"
+ },
+ {
+ "section": "7.8.4",
+ "description": "\"\\x00\"",
+ "test": "//CHECK#1\nif (\"\\x00\" !== \"\\0\") {\n $ERROR('#1: \"\\\\x00\" === \"\\\\0\"');\n}\n",
+ "id": "S7.8.4_A5.1_T3"
+ },
+ {
+ "section": "7.8.4",
+ "description": "HexEscapeSequence :: HexDigit",
+ "test": "//CHECK#0\nif (\"\\x00\" !== String.fromCharCode(\"0\")) {\n $ERROR('#0: \"\\\\x00\" === String.fromCharCode(\"0\")');\n}\n\n//CHECK#1\nif (\"\\x01\" !== String.fromCharCode(\"1\")) {\n $ERROR('#1: \"\\\\x01\" === String.fromCharCode(\"1\")');\n}\n\n//CHECK#2\nif (\"\\x02\" !== String.fromCharCode(\"2\")) {\n $ERROR('#2: \"\\\\x02\" === String.fromCharCode(\"2\")');\n}\n\n//CHECK#3\nif (\"\\x03\" !== String.fromCharCode(\"3\")) {\n $ERROR('#3: \"\\\\x03\" === String.fromCharCode(\"3\")');\n}\n\n//CHECK#4\nif (\"\\x04\" !== String.fromCharCode(\"4\")) {\n $ERROR('#4: \"\\\\x04\" === String.fromCharCode(\"4\")');\n}\n\n//CHECK#5\nif (\"\\x05\" !== String.fromCharCode(\"5\")) {\n $ERROR('#5: \"\\\\x05\" === String.fromCharCode(\"5\")');\n}\n\n//CHECK#6\nif (\"\\x06\" !== String.fromCharCode(\"6\")) {\n $ERROR('#6: \"\\\\x06\" === String.fromCharCode(\"6\")');\n}\n\n//CHECK#7\nif (\"\\x07\" !== String.fromCharCode(\"7\")) {\n $ERROR('#7: \"\\\\x07\" === String.fromCharCode(\"7\")');\n}\n\n//CHECK#8\nif (\"\\x08\" !== String.fromCharCode(\"8\")) {\n $ERROR('#8: \"\\\\x08\" === String.fromCharCode(\"8\")');\n}\n\n//CHECK#9\nif (\"\\x09\" !== String.fromCharCode(\"9\")) {\n $ERROR('#9: \"\\\\x09\" === String.fromCharCode(\"9\")');\n}\n\n//CHECK#A\nif (\"\\x0A\" !== String.fromCharCode(\"10\")) {\n $ERROR('#A: \"\\\\x0A\" === String.fromCharCode(\"10\")');\n}\n\n//CHECK#B\nif (\"\\x0B\" !== String.fromCharCode(\"11\")) {\n $ERROR('#B: \"\\\\x0B\" === String.fromCharCode(\"11\")');\n}\n\n//CHECK#C\nif (\"\\x0C\" !== String.fromCharCode(\"12\")) {\n $ERROR('#C: \"\\\\x0C\" === String.fromCharCode(\"12\")');\n}\n\n//CHECK#D\nif (\"\\x0D\" !== String.fromCharCode(\"13\")) {\n $ERROR('#D: \"\\\\x0D\" === String.fromCharCode(\"13\")');\n}\n\n//CHECK#E\nif (\"\\x0E\" !== String.fromCharCode(\"14\")) {\n $ERROR('#E: \"\\\\x0E\" === String.fromCharCode(\"14\")');\n}\n\n//CHECK#F\nif (\"\\x0F\" !== String.fromCharCode(\"15\")) {\n $ERROR('#F: \"\\\\x0F\" === String.fromCharCode(\"15\")');\n}\n",
+ "id": "S7.8.4_A6.1_T1"
+ },
+ {
+ "section": "7.8.4",
+ "description": "HexEscapeSequence :: ENGLISH CAPITAL ALPHABET",
+ "test": "//CHECK#A-Z\nhex = [\"\\x41\", \"\\x42\", \"\\x43\", \"\\x44\", \"\\x45\", \"\\x46\", \"\\x47\", \"\\x48\", \"\\x49\", \"\\x4A\", \"\\x4B\", \"\\x4C\", \"\\x4D\", \"\\x4E\", \"\\x4F\", \"\\x50\", \"\\x51\", \"\\x52\", \"\\x53\", \"\\x54\", \"\\x55\", \"\\x56\", \"\\x57\", \"\\x58\", \"\\x59\", \"\\x5A\"];\ncharacter = [\"A\", \"B\", \"C\", \"D\", \"E\", \"F\", \"G\", \"H\", \"I\", \"J\", \"K\", \"L\", \"M\", \"N\", \"O\", \"P\", \"Q\", \"R\", \"S\", \"T\", \"U\", \"V\", \"W\", \"X\", \"Y\", \"Z\"];\nfor (index = 0; index <= 25; index++) {\n if (hex[index] !== character[index]) {\n $ERROR('#' + character[index] + ' ');\n }\n}\n",
+ "id": "S7.8.4_A6.1_T2"
+ },
+ {
+ "section": "7.8.4",
+ "description": "HexEscapeSequence :: ENGLISH SMALL ALPHABET",
+ "test": "//CHECK#a-z\nhex = [\"\\x61\", \"\\x62\", \"\\x63\", \"\\x64\", \"\\x65\", \"\\x66\", \"\\x67\", \"\\x68\", \"\\x69\", \"\\x6A\", \"\\x6B\", \"\\x6C\", \"\\x6D\", \"\\x6E\", \"\\x6F\", \"\\x70\", \"\\x71\", \"\\x72\", \"\\x73\", \"\\x74\", \"\\x75\", \"\\x76\", \"\\x77\", \"\\x78\", \"\\x79\", \"\\x7A\"];\ncharacter = [\"a\", \"b\", \"c\", \"d\", \"e\", \"f\", \"g\", \"h\", \"i\", \"j\", \"k\", \"l\", \"m\", \"n\", \"o\", \"p\", \"q\", \"r\", \"s\", \"t\", \"u\", \"v\", \"w\", \"x\", \"y\", \"z\"];\nfor (index = 0; index <= 25; index++) {\n if (hex[index] !== character[index]) {\n $ERROR('#' + character[index] + ' ');\n }\n}\n",
+ "id": "S7.8.4_A6.1_T3"
+ },
+ {
+ "section": "7.8.4",
+ "description": "HexEscapeSequence :: x0G is incorrect",
+ "negative": "",
+ "test": "//CHECK#\n\"\\x0G\"\n",
+ "id": "S7.8.4_A6.1_T4"
+ },
+ {
+ "section": "7.8.4",
+ "description": "HexDigit :: 1",
+ "negative": "",
+ "test": "//CHECK#1\n\"\\x1\"\n",
+ "id": "S7.8.4_A6.2_T1"
+ },
+ {
+ "section": "7.8.4",
+ "description": "HexDigit :: A",
+ "negative": "",
+ "test": "//CHECK#1\n\"\\xA\"\n",
+ "id": "S7.8.4_A6.2_T2"
+ },
+ {
+ "section": "7.8.4",
+ "description": "Check similar to ('\\x01F' === String.fromCharCode('1') + 'F')",
+ "test": "//CHECK#1\nif ('\\x01F' !== String.fromCharCode('1') + 'F') {\n $ERROR(\"#1: '\\x01F' === String.fromCharCode('1') + 'F'\");\n}\n\n//CHECK#2\nif ('\\x02E' !== String.fromCharCode('2') + 'E') {\n $ERROR(\"#2: '\\x02E' === String.fromCharCode('2') + 'E'\");\n}\n\n//CHECK#3\nif ('\\x03D' !== String.fromCharCode('3') + 'D') {\n $ERROR(\"#3: '\\x03D' === String.fromCharCode('3') + 'D'\");\n}\n\n//CHECK#4\nif ('\\x04C' !== String.fromCharCode('4') + 'C') {\n $ERROR(\"#4: '\\x04C' === String.fromCharCode('4') + 'C'\");\n}\n\n//CHECK#5\nif ('\\x05B' !== String.fromCharCode('5') + 'B') {\n $ERROR(\"#5: '\\x05B' === String.fromCharCode('5') + 'B'\");\n}\n\n//CHECK#6\nif ('\\x06A' !== String.fromCharCode('6') + 'A') {\n $ERROR(\"#6: '\\x06A' === String.fromCharCode('6') + 'A'\");\n}\n\n//CHECK#7\nif ('\\x079' !== String.fromCharCode('7') + '9') {\n $ERROR(\"#7: '\\x079' === String.fromCharCode('7') + '9'\");\n}\n\n//CHECK#8\nif ('\\x088' !== String.fromCharCode('8') + '8') {\n $ERROR(\"#8: '\\x088' === String.fromCharCode('8') + '8'\");\n}\n\n//CHECK#9\nif ('\\x097' !== String.fromCharCode('9') + '7') {\n $ERROR(\"#9: '\\x097' === String.fromCharCode('9') + '7'\");\n}\n\n//CHECK#A\nif ('\\x0A6' !== String.fromCharCode('10') + '6') {\n $ERROR(\"#A: '\\x0A6' === String.fromCharCode('10') + '6'\");\n}\n\n//CHECK#B\nif ('\\x0B5' !== String.fromCharCode('11') + '5') {\n $ERROR(\"#B: '\\x0B5' === String.fromCharCode('11') + '5'\");\n}\n\n//CHECK#C\nif ('\\x0C4' !== String.fromCharCode('12') + '4') {\n $ERROR(\"#C: '\\x0C4' === String.fromCharCode('12') + '4'\");\n}\n\n//CHECK#D\nif ('\\x0D3' !== String.fromCharCode('13') + '3') {\n $ERROR(\"#D: '\\x0D3' === String.fromCharCode('13') + '3'\");\n}\n\n//CHECK#E\nif ('\\x0E2' !== String.fromCharCode('14') + '2') {\n $ERROR(\"#E: '\\x0E2' === String.fromCharCode('14') + '2'\");\n}\n\n//CHECK#F\nif ('\\x0F1' !== String.fromCharCode('15') + '1') {\n $ERROR(\"#F: '\\x0F1' === String.fromCharCode('15') + '1'\");\n}\n",
+ "id": "S7.8.4_A6.3_T1"
+ },
+ {
+ "section": "7.8.4",
+ "description": "Checking if execution of \"\\X01\" passes",
+ "negative": "",
+ "test": "//CHECK#1\n\"\\X01\"\n",
+ "id": "S7.8.4_A6.4_T1"
+ },
+ {
+ "section": "7.8.4",
+ "description": "Checking if execution of \"\\X0A\" passes",
+ "negative": "",
+ "test": "//CHECK#1\n\"\\X0A\"\n",
+ "id": "S7.8.4_A6.4_T2"
+ },
+ {
+ "section": "7.8.4",
+ "description": "Check similar to (\"\\u0000\" === String.fromCharCode(\"0\"))",
+ "test": "//CHECK#0\nif (\"\\u0000\" !== String.fromCharCode(\"0\")) {\n $ERROR('#0: \"\\\\u0000\" === String.fromCharCode(\"0\")');\n}\n\n//CHECK#1\nif (\"\\u0001\" !== String.fromCharCode(\"1\")) {\n $ERROR('#1: \"\\\\u0001\" === String.fromCharCode(\"1\")');\n}\n\n//CHECK#2\nif (\"\\u0002\" !== String.fromCharCode(\"2\")) {\n $ERROR('#2: \"\\\\u0002\" === String.fromCharCode(\"2\")');\n}\n\n//CHECK#3\nif (\"\\u0003\" !== String.fromCharCode(\"3\")) {\n $ERROR('#3: \"\\\\u0003\" === String.fromCharCode(\"3\")');\n}\n\n//CHECK#4\nif (\"\\u0004\" !== String.fromCharCode(\"4\")) {\n $ERROR('#4: \"\\\\u0004\" === String.fromCharCode(\"4\")');\n}\n\n//CHECK#5\nif (\"\\u0005\" !== String.fromCharCode(\"5\")) {\n $ERROR('#5: \"\\\\u0005\" === String.fromCharCode(\"5\")');\n}\n\n//CHECK#6\nif (\"\\u0006\" !== String.fromCharCode(\"6\")) {\n $ERROR('#6: \"\\\\u0006\" === String.fromCharCode(\"6\")');\n}\n\n//CHECK#7\nif (\"\\u0007\" !== String.fromCharCode(\"7\")) {\n $ERROR('#7: \"\\\\u0007\" === String.fromCharCode(\"7\")');\n}\n\n//CHECK#8\nif (\"\\u0008\" !== String.fromCharCode(\"8\")) {\n $ERROR('#8: \"\\\\u0008\" === String.fromCharCode(\"8\")');\n}\n\n//CHECK#9\nif (\"\\u0009\" !== String.fromCharCode(\"9\")) {\n $ERROR('#9: \"\\\\u0009\" === String.fromCharCode(\"9\")');\n}\n\n//CHECK#A\nif (\"\\u000A\" !== String.fromCharCode(\"10\")) {\n $ERROR('#A: \"\\\\u000A\" === String.fromCharCode(\"10\")');\n}\n\n//CHECK#B\nif (\"\\u000B\" !== String.fromCharCode(\"11\")) {\n $ERROR('#B: \"\\\\u000B\" === String.fromCharCode(\"11\")');\n}\n\n//CHECK#C\nif (\"\\u000C\" !== String.fromCharCode(\"12\")) {\n $ERROR('#C: \"\\\\u000C\" === String.fromCharCode(\"12\")');\n}\n\n//CHECK#D\nif (\"\\u000D\" !== String.fromCharCode(\"13\")) {\n $ERROR('#D: \"\\\\u000D\" === String.fromCharCode(\"13\")');\n}\n\n//CHECK#E\nif (\"\\u000E\" !== String.fromCharCode(\"14\")) {\n $ERROR('#E: \"\\\\u000E\" === String.fromCharCode(\"14\")');\n}\n\n//CHECK#F\nif (\"\\u000F\" !== String.fromCharCode(\"15\")) {\n $ERROR('#F: \"\\\\u000F\" === String.fromCharCode(\"15\")');\n}\n",
+ "id": "S7.8.4_A7.1_T1"
+ },
+ {
+ "section": "7.8.4",
+ "description": "UnicodeEscapeSequence :: ENGLISH CAPITAL ALPHABET",
+ "test": "//CHECK#A-Z\nunicode = [\"\\u0041\", \"\\u0042\", \"\\u0043\", \"\\u0044\", \"\\u0045\", \"\\u0046\", \"\\u0047\", \"\\u0048\", \"\\u0049\", \"\\u004A\", \"\\u004B\", \"\\u004C\", \"\\u004D\", \"\\u004E\", \"\\u004F\", \"\\u0050\", \"\\u0051\", \"\\u0052\", \"\\u0053\", \"\\u0054\", \"\\u0055\", \"\\u0056\", \"\\u0057\", \"\\u0058\", \"\\u0059\", \"\\u005A\"];\ncharacter = [\"A\", \"B\", \"C\", \"D\", \"E\", \"F\", \"G\", \"H\", \"I\", \"J\", \"K\", \"L\", \"M\", \"N\", \"O\", \"P\", \"Q\", \"R\", \"S\", \"T\", \"U\", \"V\", \"W\", \"X\", \"Y\", \"Z\"];\nfor (index = 0; index <= 25; index++) {\n if (unicode[index] !== character[index]) {\n $ERROR('#' + character[index] + ' ');\n }\n}\n",
+ "id": "S7.8.4_A7.1_T2"
+ },
+ {
+ "section": "7.8.4",
+ "description": "UnicodeEscapeSequence :: ENGLISH SMALL ALPHABET",
+ "test": "//CHECK#a-z\nunicode = [\"\\u0061\", \"\\u0062\", \"\\u0063\", \"\\u0064\", \"\\u0065\", \"\\u0066\", \"\\u0067\", \"\\u0068\", \"\\u0069\", \"\\u006A\", \"\\u006B\", \"\\u006C\", \"\\u006D\", \"\\u006E\", \"\\u006F\", \"\\u0070\", \"\\u0071\", \"\\u0072\", \"\\u0073\", \"\\u0074\", \"\\u0075\", \"\\u0076\", \"\\u0077\", \"\\u0078\", \"\\u0079\", \"\\u007A\"];\ncharacter = [\"a\", \"b\", \"c\", \"d\", \"e\", \"f\", \"g\", \"h\", \"i\", \"j\", \"k\", \"l\", \"m\", \"n\", \"o\", \"p\", \"q\", \"r\", \"s\", \"t\", \"u\", \"v\", \"w\", \"x\", \"y\", \"z\"];\nfor (index = 0; index <= 25; index++) {\n if (unicode[index] !== character[index]) {\n $ERROR('#' + character[index] + ' ');\n }\n}\n",
+ "id": "S7.8.4_A7.1_T3"
+ },
+ {
+ "section": "7.8.4",
+ "description": "UnicodeEscapeSequence :: u000G is incorrect",
+ "negative": "",
+ "test": "//CHECK#\n\"\\u000G\"\n",
+ "id": "S7.8.4_A7.1_T4"
+ },
+ {
+ "section": "7.8.4",
+ "description": ":: HexDigit :: 1",
+ "negative": "",
+ "test": "//CHECK#1\n\"\\u1\"\n",
+ "id": "S7.8.4_A7.2_T1"
+ },
+ {
+ "section": "7.8.4",
+ "description": ":: HexDigit :: A",
+ "negative": "",
+ "test": "//CHECK#1\n\"\\uA\"\n",
+ "id": "S7.8.4_A7.2_T2"
+ },
+ {
+ "section": "7.8.4",
+ "description": ":: HexDigit :: 1",
+ "negative": "",
+ "test": "//CHECK#1\n\"\\u11\"\n",
+ "id": "S7.8.4_A7.2_T3"
+ },
+ {
+ "section": "7.8.4",
+ "description": ":: HexDigit :: A",
+ "negative": "",
+ "test": "//CHECK#1\n\"\\uAA\"\n",
+ "id": "S7.8.4_A7.2_T4"
+ },
+ {
+ "section": "7.8.4",
+ "description": ":: HexDigit :: 1",
+ "negative": "",
+ "test": "//CHECK#1\n\"\\u111\"\n",
+ "id": "S7.8.4_A7.2_T5"
+ },
+ {
+ "section": "7.8.4",
+ "description": ":: HexDigit :: A",
+ "negative": "",
+ "test": "//CHECK#1\n\"\\uAAA\"\n",
+ "id": "S7.8.4_A7.2_T6"
+ },
+ {
+ "section": "7.8.4",
+ "description": "Check similar to (\"\\u0001F\" === String.fromCharCode(\"1\") + \"F\")",
+ "test": "//CHECK#1\nif (\"\\u0001F\" !== String.fromCharCode(\"1\") + \"F\") {\n $ERROR('#1: \"\\\\u0001F\" === String.fromCharCode(\"1\") + \"F\"');\n}\n\n//CHECK#2\nif (\"\\u0002E\" !== String.fromCharCode(\"2\") + \"E\") {\n $ERROR('#2: \"\\\\u0002E\" === String.fromCharCode(\"2\") + \"E\"');\n}\n\n//CHECK#3\nif (\"\\u0003D\" !== String.fromCharCode(\"3\") + \"D\") {\n $ERROR('#3: \"\\\\u0003D\" === String.fromCharCode(\"3\") + \"D\"');\n}\n\n//CHECK#4\nif (\"\\u0004C\" !== String.fromCharCode(\"4\") + \"C\") {\n $ERROR('#4: \"\\\\u0004C\" === String.fromCharCode(\"4\") + \"C\"');\n}\n\n//CHECK#5\nif (\"\\u0005B\" !== String.fromCharCode(\"5\") + \"B\") {\n $ERROR('#5: \"\\\\u0005B\" === String.fromCharCode(\"5\") + \"B\"');\n}\n\n//CHECK#6\nif (\"\\u0006A\" !== String.fromCharCode(\"6\") + \"A\") {\n $ERROR('#6: \"\\\\u0006A\" === String.fromCharCode(\"6\") + \"A\"');\n}\n\n//CHECK#7\nif (\"\\u00079\" !== String.fromCharCode(\"7\") + \"9\") {\n $ERROR('#7: \"\\\\u00079\" === String.fromCharCode(\"7\") + \"9\"');\n}\n\n//CHECK#8\nif (\"\\u00088\" !== String.fromCharCode(\"8\") + \"8\") {\n $ERROR('#8: \"\\\\u00088\" === String.fromCharCode(\"8\") + \"8\"');\n}\n\n//CHECK#9\nif (\"\\u00097\" !== String.fromCharCode(\"9\") + \"7\") {\n $ERROR('#9: \"\\\\u00097\" === String.fromCharCode(\"9\") + \"7\"');\n}\n\n//CHECK#A\nif (\"\\u000A6\" !== String.fromCharCode(\"10\") + \"6\") {\n $ERROR('#A: \"\\\\u000A6\" === String.fromCharCode(\"10\") + \"6\"');\n}\n\n//CHECK#B\nif (\"\\u000B5\" !== String.fromCharCode(\"11\") + \"5\") {\n $ERROR('#B: \"\\\\u000B5\" === String.fromCharCode(\"11\") + \"5\"');\n}\n\n//CHECK#C\nif (\"\\u000C4\" !== String.fromCharCode(\"12\") + \"4\") {\n $ERROR('#C: \"\\\\u000C4\" === String.fromCharCode(\"12\") + \"4\"');\n}\n\n//CHECK#D\nif (\"\\u000D3\" !== String.fromCharCode(\"13\") + \"3\") {\n $ERROR('#D: \"\\\\u000D3\" === String.fromCharCode(\"13\") + \"3\"');\n}\n\n//CHECK#E\nif (\"\\u000E2\" !== String.fromCharCode(\"14\") + \"2\") {\n $ERROR('#E: \"\\\\u000E2\" === String.fromCharCode(\"14\") + \"2\"');\n}\n\n//CHECK#F\nif (\"\\u000F1\" !== String.fromCharCode(\"15\") + \"1\") {\n $ERROR('#F: \"\\\\u000F1\" === String.fromCharCode(\"15\") + \"1\"');\n}\n",
+ "id": "S7.8.4_A7.3_T1"
+ },
+ {
+ "section": "7.8.4",
+ "description": "Checking if execution of \"\\U0001\" passes",
+ "negative": "",
+ "test": "//CHECK#1\n\"\\U0001\"\n",
+ "id": "S7.8.4_A7.4_T1"
+ },
+ {
+ "section": "7.8.4",
+ "description": "Checking if execution of \"\\U000A\" passes",
+ "negative": "",
+ "test": "//CHECK#1\n\"\\U000A\"\n",
+ "id": "S7.8.4_A7.4_T2"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/7.8.5.json b/website/resources/scripts/testcases2/7.8.5.json
new file mode 100644
index 000000000..28d99e258
--- /dev/null
+++ b/website/resources/scripts/testcases2/7.8.5.json
@@ -0,0 +1,14 @@
+{
+ "testCollection": {
+ "name": "7.8.5",
+ "numTests": 1,
+ "tests": [
+ {
+ "id": "7.8.5-1",
+ "path": "TestCases/chapter07/7.8/7.8.5/7.8.5-1.js",
+ "description": "Literal RegExp Objects - SyntaxError exception is thrown if the RegularExpressionNonTerminator position of a RegularExpressionBackslashSequence is a LineTerminator.",
+ "test": "assertTrue((function testcase() {\n try {\n eval(\"var regExp = /\\\\\\rn/;\");\n return false;\n } catch (e) {\n return e instanceof SyntaxError;\n }\n }).call(this));\n"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/7.8.5_Regular_Expression_Literals.json b/website/resources/scripts/testcases2/7.8.5_Regular_Expression_Literals.json
new file mode 100644
index 000000000..e29012e0a
--- /dev/null
+++ b/website/resources/scripts/testcases2/7.8.5_Regular_Expression_Literals.json
@@ -0,0 +1,316 @@
+{
+ "testCollection": {
+ "name": "7.8.5_Regular_Expression_Literals",
+ "numTests": 49,
+ "tests": [
+ {
+ "section": "7.8.5",
+ "description": "Without eval",
+ "test": "//CHECK#1\nif (/1/.source !== \"1\") {\n $ERROR('#1: /1/');\n} \n\n//CHECK#2\nif (/a/.source !== \"a\") {\n $ERROR('#2: /a/');\n}\n\n//CHECK#3\nif (/;/.source !== \";\") {\n $ERROR('#3: /;/');\n}\n\n//CHECK#4\nif (/ /.source !== \" \") {\n $ERROR('#4: / /');\n}\n\n//CHECK#5\nif (/\\u0041/.source !== \"\\\\u0041\") {\n $ERROR('#5: /\\\\u0041/');\n} \n",
+ "id": "S7.8.5_A1.1_T1"
+ },
+ {
+ "section": "7.8.5, 15.10.1",
+ "description": "Complex test with eval, using syntax pattern",
+ "test": "//CHECK\nerrorCount = 0;\ncount = 0;\nvar hex = [\"0\", \"1\", \"2\", \"3\", \"4\", \"5\", \"6\", \"7\", \"8\", \"9\", \"A\", \"B\", \"C\", \"D\", \"E\", \"F\"];\nfor (i1 = 0; i1 < 16; i1++) {\n for (i2 = 0; i2 < 16; i2++) {\n for (i3 = 0; i3 < 16; i3++) {\n for (i4 = 0; i4 < 16; i4++) {\n try { \n var uu = hex[i1] + hex[i2] + hex[i3] + hex[i4];\n\t var Elimination = \n ((uu === \"002A\") || (uu === \"002F\") || (uu === \"005C\") || (uu === \"002B\") || \n (uu === \"003F\") || (uu === \"0028\") || (uu === \"0029\") || \n (uu === \"005B\") || (uu === \"005D\") || (uu === \"007B\") || (uu === \"007D\"));\n /* \n * \\u002A / \\u002F \\ \\u005C + \\u002B\n ? \\u003F ( \\u0028 ) \\u0029\n [ \\u005B ] \\u005D { \\u007B } \\u007D \n */\n var LineTerminator = ((uu === \"000A\") || (uu === \"000D\") || (uu === \"2028\") || (uu === \"2029\")); \n if ((Elimination || LineTerminator ) === false) { \n var xx = String.fromCharCode(\"0x\" + uu); \n var pattern = eval(\"/\" + xx + \"/\"); \n if (pattern.source !== xx) {\n $ERROR('#' + uu + ' ');\n errorCount++;\n } \n } else {\n count--;\n } \n } catch (e) { \n $ERROR('#' + uu + ' ');\n errorCount++;\n }\n count++;\n } \n }\n }\n}\n\nif (errorCount > 0) { \n $ERROR('Total error: ' + errorCount + ' bad Regular Expression First Char in ' + count);\n} \n",
+ "id": "S7.8.5_A1.1_T2"
+ },
+ {
+ "section": "7.8.5",
+ "description": "*",
+ "negative": "",
+ "test": "//CHECK#1\n/*/\n",
+ "id": "S7.8.5_A1.2_T1"
+ },
+ {
+ "section": "7.8.5",
+ "description": "\\",
+ "negative": "",
+ "test": "//CHECK#1\n/\\/\n",
+ "id": "S7.8.5_A1.2_T2"
+ },
+ {
+ "section": "7.8.5",
+ "description": "/",
+ "negative": "",
+ "test": "//CHECK#1\n///\n.source;\n",
+ "id": "S7.8.5_A1.2_T3"
+ },
+ {
+ "section": "7.8.5",
+ "description": "[empty]",
+ "negative": "",
+ "test": "//CHECK#1\n//\n.source;\n",
+ "id": "S7.8.5_A1.2_T4"
+ },
+ {
+ "section": "7.8.5",
+ "description": "Line Feed, without eval",
+ "negative": "",
+ "test": "//CHECK#1\n/\n/\n",
+ "id": "S7.8.5_A1.3_T1"
+ },
+ {
+ "section": "7.8.5",
+ "description": "Line Feed, with eval",
+ "test": "//CHECK#1\ntry {\n eval(\"/\\u000A/\").source;\n $ERROR('#1.1: RegularExpressionFirstChar :: Line Feed is incorrect. Actual: ' + (eval(\"/\\u000A/\").source)); \n}\ncatch (e) {\n if ((e instanceof SyntaxError) !== true) {\n $ERROR('#1.2: RegularExpressionFirstChar :: Line Feed is incorrect. Actual: ' + (e));\n }\n} \n",
+ "id": "S7.8.5_A1.3_T2"
+ },
+ {
+ "section": "7.8.5",
+ "description": "Carriage Return, without eval",
+ "negative": "",
+ "test": "//CHECK#1\n/\n/\n",
+ "id": "S7.8.5_A1.3_T3"
+ },
+ {
+ "section": "7.8.5",
+ "description": "Carriage Return, with eval",
+ "test": "//CHECK#1\ntry {\n eval(\"/\\u000D/\").source;\n $ERROR('#1.1: RegularExpressionFirstChar :: Carriage Return is incorrect. Actual: ' + (eval(\"/\\u000D/\").source)); \n}\ncatch (e) {\n if ((e instanceof SyntaxError) !== true) {\n $ERROR('#1.2: RegularExpressionFirstChar :: Carriage Return is incorrect. Actual: ' + (e));\n }\n} \n",
+ "id": "S7.8.5_A1.3_T4"
+ },
+ {
+ "section": "7.8.5",
+ "description": "Line separator, with eval",
+ "test": "//CHECK#1\ntry {\n eval(\"/\\u2028/\").source;\n $ERROR('#1.1: RegularExpressionFirstChar :: Line separator is incorrect. Actual: ' + (eval(\"/\\u2028/\").source)); \n}\ncatch (e) {\n if ((e instanceof SyntaxError) !== true) {\n $ERROR('#1.2: RegularExpressionFirstChar :: Line separator is incorrect. Actual: ' + (e));\n }\n} \n",
+ "id": "S7.8.5_A1.3_T5"
+ },
+ {
+ "section": "7.8.5",
+ "description": "Paragraph separator, with eval",
+ "test": "//CHECK#1\ntry {\n eval(\"/\\u2029/\").source;\n $ERROR('#1.1: RegularExpressionFirstChar :: Paragraph separator is incorrect. Actual: ' + (eval(\"/\\u2029/\").source)); \n}\ncatch (e) {\n if ((e instanceof SyntaxError) !== true) {\n $ERROR('#1.2: RegularExpressionFirstChar :: Paragraph separator is incorrect. Actual: ' + (e));\n }\n} \n",
+ "id": "S7.8.5_A1.3_T6"
+ },
+ {
+ "section": "7.8.5",
+ "description": "Check similar to (/\\1/.source === \"\\\\1\")",
+ "test": "//CHECK#1\nif (/\\1/.source !== \"\\\\1\") {\n $ERROR('#1: /\\\\1/');\n} \n\n//CHECK#2\nif (/\\a/.source !== \"\\\\a\") {\n $ERROR('#2: /\\\\a/');\n}\n\n//CHECK#3\nif (/\\;/.source !== \"\\\\;\") {\n $ERROR('#3: /\\\\;/');\n}\n\n//CHECK#4\nif (/\\ /.source !== \"\\\\ \") {\n $ERROR('#4: /\\\\ /');\n} \n",
+ "id": "S7.8.5_A1.4_T1"
+ },
+ {
+ "section": "7.8.5, 15.10.1",
+ "description": "Complex test with eval, using syntax pattern",
+ "test": "//CHECK\nerrorCount = 0;\ncount = 0;\nvar hex = [\"0\", \"1\", \"2\", \"3\", \"4\", \"5\", \"6\", \"7\", \"8\", \"9\", \"A\", \"B\", \"C\", \"D\", \"E\", \"F\"];\nfor (i1 = 0; i1 < 16; i1++) {\n for (i2 = 0; i2 < 16; i2++) {\n for (i3 = 0; i3 < 16; i3++) {\n for (i4 = 0; i4 < 16; i4++) {\n try { \n var uu = hex[i1] + hex[i2] + hex[i3] + hex[i4];\n\t var Elimination = \n ((uu === \"002A\") || (uu === \"002F\") || (uu === \"005C\") || (uu === \"002B\") || \n (uu === \"003F\") || (uu === \"0028\") || (uu === \"0029\") || \n (uu === \"005B\") || (uu === \"005D\") || (uu === \"007B\") || (uu === \"007D\"));\n /* \n * \\u002A / \\u002F \\ \\u005C + \\u002B\n ? \\u003F ( \\u0028 ) \\u0029\n [ \\u005B ] \\u005D { \\u007B } \\u007D \n */\n var LineTerminator = ((uu === \"000A\") || (uu === \"000D\") || (uu === \"2028\") || (uu === \"2029\")); \n if ((Elimination || LineTerminator ) === false) { \n var xx = \"\\\\\" + String.fromCharCode(\"0x\" + uu); \n var pattern = eval(\"/\" + xx + \"/\"); \n if (pattern.source !== xx) {\n $ERROR('#' + uu + ' ');\n errorCount++;\n } \n } else {\n count--;\n } \n } catch (e) { \n $ERROR('#' + uu + ' ');\n errorCount++;\n }\n count++;\n } \n }\n }\n}\n\nif (errorCount > 0) { \n $ERROR('Total error: ' + errorCount + ' bad Regular Expression First Char in ' + count);\n} \n",
+ "id": "S7.8.5_A1.4_T2"
+ },
+ {
+ "section": "7.8.5",
+ "description": "Line Feed, without eval",
+ "negative": "",
+ "test": "//CHECK#1\n/\\\n/\n",
+ "id": "S7.8.5_A1.5_T1"
+ },
+ {
+ "section": "7.8.5",
+ "description": "Line Feed, with eval",
+ "test": "//CHECK#1\ntry { \n eval(\"/\\\\\\u000A/\").source; \n $ERROR('#1.1: RegularExpressionFirstChar :: BackslashSequence :: \\\\Line Feed is incorrect. Actual: ' + (eval(\"/\\\\\\u000A/\").source)); \n}\ncatch (e) {\n if ((e instanceof SyntaxError) !== true) {\n $ERROR('#1.2: RegularExpressionFirstChar :: BackslashSequence :: \\\\Line Feed is incorrect. Actual: ' + (e));\n }\n} \n",
+ "id": "S7.8.5_A1.5_T2"
+ },
+ {
+ "section": "7.8.5",
+ "description": "Carriage Return, without eval",
+ "negative": "",
+ "test": "//CHECK#1\n/\\\n/\n",
+ "id": "S7.8.5_A1.5_T3"
+ },
+ {
+ "section": "7.8.5",
+ "description": "Carriage Return, with eval",
+ "test": "//CHECK#1\ntry {\n eval(\"/\\\\\\u000D/\").source;\n $ERROR('#1.1: RegularExpressionFirstChar :: BackslashSequence :: \\\\Carriage Return is incorrect. Actual: ' + (eval(\"/\\\\\\u000D/\").source)); \n}\ncatch (e) {\n if ((e instanceof SyntaxError) !== true) {\n $ERROR('#1.2: RegularExpressionFirstChar :: BackslashSequence :: \\\\Carriage Return is incorrect. Actual: ' + (e));\n }\n} \n",
+ "id": "S7.8.5_A1.5_T4"
+ },
+ {
+ "section": "7.8.5",
+ "description": "Line separator, with eval",
+ "test": "//CHECK#1\ntry {\n eval(\"/\\\\\\u2028/\").source;\n $ERROR('#1.1: RegularExpressionFirstChar :: BackslashSequence :: \\\\Line separator is incorrect. Actual: ' + (eval(\"/\\\\\\u2028/\").source)); \n}\ncatch (e) {\n if ((e instanceof SyntaxError) !== true) {\n $ERROR('#1.2: RegularExpressionFirstChar :: BackslashSequence :: \\\\Line separator is incorrect. Actual: ' + (e));\n }\n} \n",
+ "id": "S7.8.5_A1.5_T5"
+ },
+ {
+ "section": "7.8.5",
+ "description": "Paragraph separator, with eval",
+ "test": "//CHECK#1\ntry {\n eval(\"/\\\\\\u2029/\").source;\n $ERROR('#1.1: RegularExpressionFirstChar :: BackslashSequence :: \\\\Paragraph separator is incorrect. Actual: ' + (eval(\"/\\\\\\u2029/\").source)); \n}\ncatch (e) {\n if ((e instanceof SyntaxError) !== true) {\n $ERROR('#1.2: RegularExpressionFirstChar :: BackslashSequence :: \\\\Paragraph separator is incorrect. Actual: ' + (e));\n }\n} \n",
+ "id": "S7.8.5_A1.5_T6"
+ },
+ {
+ "section": "7.8.5",
+ "description": "Without eval",
+ "test": "//CHECK#1\nif (/1a/.source !== \"1a\") {\n $ERROR('#1: /1a/');\n} \n\n//CHECK#2\nif (/aa/.source !== \"aa\") {\n $ERROR('#2: /aa/');\n}\n\n//CHECK#3\nif (/,;/.source !== \",;\") {\n $ERROR('#3: /,;/');\n}\n\n//CHECK#4\nif (/ /.source !== \" \") {\n $ERROR('#4: / /');\n} \n\n//CHECK#5\nif (/a\\u0041/.source !== \"a\\\\u0041\") {\n $ERROR('#5: /a\\\\u0041/');\n} \n",
+ "id": "S7.8.5_A2.1_T1"
+ },
+ {
+ "section": "7.8.5, 15.10.1",
+ "description": "Complex test with eval, using syntax pattern",
+ "test": "//CHECK\nerrorCount = 0;\ncount = 0;\nvar hex = [\"0\", \"1\", \"2\", \"3\", \"4\", \"5\", \"6\", \"7\", \"8\", \"9\", \"A\", \"B\", \"C\", \"D\", \"E\", \"F\"];\nfor (i1 = 0; i1 < 16; i1++) {\n for (i2 = 0; i2 < 16; i2++) {\n for (i3 = 0; i3 < 16; i3++) {\n for (i4 = 0; i4 < 16; i4++) {\n try { \n var uu = hex[i1] + hex[i2] + hex[i3] + hex[i4];\n\t var Elimination = \n ((uu === \"002A\") || (uu === \"002F\") || (uu === \"005C\") || (uu === \"002B\") || \n (uu === \"003F\") || (uu === \"0028\") || (uu === \"0029\") || \n (uu === \"005B\") || (uu === \"005D\") || (uu === \"007B\") || (uu === \"007D\"));\n /* \n * \\u002A / \\u002F \\ \\u005C + \\u002B\n ? \\u003F ( \\u0028 ) \\u0029\n [ \\u005B ] \\u005D { \\u007B } \\u007D \n */\n var LineTerminator = ((uu === \"000A\") || (uu === \"000D\") || (uu === \"2028\") || (uu === \"2029\")); \n if ((Elimination || LineTerminator ) === false) { \n var xx = \"nnnn\" + String.fromCharCode(\"0x\" + uu); \n var pattern = eval(\"/\" + xx + \"/\"); \n if (pattern.source !== xx) {\n $ERROR('#' + uu + ' ');\n errorCount++;\n } \n \n } else {\n count--;\n } \n } catch (e) { \n $ERROR('#' + uu + ' ');\n errorCount++;\n }\n count++;\n } \n }\n }\n}\n\nif (errorCount > 0) { \n $ERROR('Total error: ' + errorCount + ' bad Regular Expression First Char in ' + count);\n} \n",
+ "id": "S7.8.5_A2.1_T2"
+ },
+ {
+ "section": "7.8.5",
+ "description": "\\",
+ "negative": "",
+ "test": "//CHECK#1\n/a\\/\n",
+ "id": "S7.8.5_A2.2_T1"
+ },
+ {
+ "section": "7.8.5",
+ "description": "/",
+ "negative": "",
+ "test": "//CHECK#1\n/a//.source;\n",
+ "id": "S7.8.5_A2.2_T2"
+ },
+ {
+ "section": "7.8.5",
+ "description": "Line Feed, without eval",
+ "negative": "",
+ "test": "//CHECK#1\n/a\n/\n",
+ "id": "S7.8.5_A2.3_T1"
+ },
+ {
+ "section": "7.8.5",
+ "description": "Line Feed, with eval",
+ "test": "//CHECK#1\ntry {\n eval(\"/a\\u000A/\").source;\n $ERROR('#1.1: RegularExpressionChar :: Line Feedis incorrect. Actual: ' + (eval(\"/a\\u000A/\").source)); \n}\ncatch (e) {\n if ((e instanceof SyntaxError) !== true) {\n $ERROR('#1.2: RegularExpressionChar :: Line Feed is incorrect. Actual: ' + (e));\n }\n} \n",
+ "id": "S7.8.5_A2.3_T2"
+ },
+ {
+ "section": "7.8.5",
+ "description": "Carriage Return, without eval",
+ "negative": "",
+ "test": "//CHECK#1\n/a\n/\n",
+ "id": "S7.8.5_A2.3_T3"
+ },
+ {
+ "section": "7.8.5",
+ "description": "Carriage Return, with eval",
+ "test": "//CHECK#1\ntry {\n eval(\"/a\\u000D/\").source;\n $ERROR('#1.1: RegularExpressionChar :: Carriage Retur is incorrect. Actual: ' + (eval(\"/a\\u000D/\").source)); \n}\ncatch (e) {\n if ((e instanceof SyntaxError) !== true) {\n $ERROR('#1.2: RegularExpressionChar :: Carriage Retur is incorrect. Actual: ' + (e));\n }\n} \n",
+ "id": "S7.8.5_A2.3_T4"
+ },
+ {
+ "section": "7.8.5",
+ "description": "Line separator, with eval",
+ "test": "//CHECK#1\ntry {\n eval(\"/a\\u2028/\").source;\n $ERROR('#1.1: RegularExpressionChar :: Line separator is incorrect. Actual: ' + (eval(\"/a\\u2028/\").source)); \n}\ncatch (e) {\n if ((e instanceof SyntaxError) !== true) {\n $ERROR('#1.2: RegularExpressionChar :: Line separator is incorrect. Actual: ' + (e));\n }\n} \n",
+ "id": "S7.8.5_A2.3_T5"
+ },
+ {
+ "section": "7.8.5",
+ "description": "Paragraph separator, with eval",
+ "test": "//CHECK#1\ntry {\n eval(\"/s\\u2029/\").source;\n $ERROR('#1.1: RegularExpressionChar :: Paragraph separator is incorrect. Actual: ' + (eval(\"/s\\u2029/\").source)); \n}\ncatch (e) {\n if ((e instanceof SyntaxError) !== true) {\n $ERROR('#1.2: RegularExpressionChar :: Paragraph separator is incorrect. Actual: ' + (e));\n }\n} \n",
+ "id": "S7.8.5_A2.3_T6"
+ },
+ {
+ "section": "7.8.5",
+ "description": "Check similar to (/a\\1/.source === \"a\\\\1\")",
+ "test": "//CHECK#1\nif (/a\\1/.source !== \"a\\\\1\") {\n $ERROR('#1: /a\\\\1/');\n} \n\n//CHECK#2\nif (/a\\a/.source !== \"a\\\\a\") {\n $ERROR('#2: /a\\\\a/');\n}\n\n//CHECK#3\nif (/,\\;/.source !== \",\\\\;\") {\n $ERROR('#3: /,\\\\;/');\n}\n\n//CHECK#4\nif (/ \\ /.source !== \" \\\\ \") {\n $ERROR('#4: / \\\\ /');\n} \n",
+ "id": "S7.8.5_A2.4_T1"
+ },
+ {
+ "section": "7.8.5, 15.10.1",
+ "description": "Complex test with eval, using syntax pattern",
+ "test": "//CHECK\nerrorCount = 0;\ncount = 0;\nvar hex = [\"0\", \"1\", \"2\", \"3\", \"4\", \"5\", \"6\", \"7\", \"8\", \"9\", \"A\", \"B\", \"C\", \"D\", \"E\", \"F\"];\nfor (i1 = 0; i1 < 16; i1++) {\n for (i2 = 0; i2 < 16; i2++) {\n for (i3 = 0; i3 < 16; i3++) {\n for (i4 = 0; i4 < 16; i4++) {\n try { \n var uu = hex[i1] + hex[i2] + hex[i3] + hex[i4];\n\t var Elimination = \n ((uu === \"002A\") || (uu === \"002F\") || (uu === \"005C\") || (uu === \"002B\") || \n (uu === \"003F\") || (uu === \"0028\") || (uu === \"0029\") || \n (uu === \"005B\") || (uu === \"005D\") || (uu === \"007B\") || (uu === \"007D\"));\n /* \n * \\u002A / \\u002F \\ \\u005C + \\u002B\n ? \\u003F ( \\u0028 ) \\u0029\n [ \\u005B ] \\u005D { \\u007B } \\u007D \n */\n var LineTerminator = ((uu === \"000A\") || (uu === \"000D\") || (uu === \"2028\") || (uu === \"2029\")); \n if ((Elimination || LineTerminator ) === false) { \n var xx = \"a\\\\\" + String.fromCharCode(\"0x\" + uu); \n var pattern = eval(\"/\" + xx + \"/\"); \n if (pattern.source !== xx) {\n $ERROR('#' + uu + ' ');\n errorCount++;\n } \n } else {\n count--;\n } \n } catch (e) { \n $ERROR('#' + uu + ' ');\n errorCount++;\n }\n count++;\n } \n }\n }\n}\n\nif (errorCount > 0) { \n $ERROR('Total error: ' + errorCount + ' bad Regular Expression First Char in ' + count);\n} \n",
+ "id": "S7.8.5_A2.4_T2"
+ },
+ {
+ "section": "7.8.5",
+ "description": "Line Feed, without eval",
+ "negative": "",
+ "test": "//CHECK#1\n/a\\\n/\n",
+ "id": "S7.8.5_A2.5_T1"
+ },
+ {
+ "section": "7.8.5",
+ "description": "Line Feed, with eval",
+ "test": "//CHECK#1\ntry { \n eval(\"/a\\\\\\u000A/\").source;\n $ERROR('#1.1: RegularExpressionChar :: BackslashSequence :: \\\\Line Feed is incorrect. Actual: ' + (eval(\"/a\\\\\\u000A/\").source)); \n}\ncatch (e) {\n if ((e instanceof SyntaxError) !== true) {\n $ERROR('#1.2: RegularExpressionChar :: BackslashSequence :: \\\\Line Feed is incorrect. Actual: ' + (e));\n }\n} \n",
+ "id": "S7.8.5_A2.5_T2"
+ },
+ {
+ "section": "7.8.5",
+ "description": "Carriage Return, without eval",
+ "negative": "",
+ "test": "//CHECK#1\n/a\\\n/\n",
+ "id": "S7.8.5_A2.5_T3"
+ },
+ {
+ "section": "7.8.5",
+ "description": "Carriage Return, with eval",
+ "test": "//CHECK#1\ntry {\n eval(\"/a\\\\\\u000D/\").source;\n $ERROR('#1.1: RegularExpressionChar :: BackslashSequence :: \\\\Carriage Return is incorrect. Actual: ' + (eval(\"/a\\\\\\u000D/\").source)); \n}\ncatch (e) {\n if ((e instanceof SyntaxError) !== true) {\n $ERROR('#1.2: RegularExpressionChar :: BackslashSequence :: \\\\Carriage Return is incorrect. Actual: ' + (e));\n }\n} \n",
+ "id": "S7.8.5_A2.5_T4"
+ },
+ {
+ "section": "7.8.5",
+ "description": "Line separator, with eval",
+ "test": "//CHECK#1\ntry {\n eval(\"/a\\\\\\u2028/\").source;\n $ERROR('#1.1: RegularExpressionChar :: BackslashSequence :: \\\\Line separator is incorrect. Actual: ' + (eval(\"/a\\\\\\u2028/\").source)); \n}\ncatch (e) {\n if ((e instanceof SyntaxError) !== true) {\n $ERROR('#1.2: RegularExpressionChar :: BackslashSequence :: \\\\Line separator is incorrect. Actual: ' + (e));\n }\n} \n",
+ "id": "S7.8.5_A2.5_T5"
+ },
+ {
+ "section": "7.8.5",
+ "description": "Paragraph separator, with eval",
+ "test": "//CHECK#1\ntry {\n eval(\"/a\\\\\\u2029/\").source;\n $ERROR('#1.1: RegularExpressionChar :: BackslashSequence :: \\\\Paragraph separator is incorrect. Actual: ' + (eval(\"/a\\\\\\u2029/\").source)); \n}\ncatch (e) {\n if ((e instanceof SyntaxError) !== true) {\n $ERROR('#1.2: RegularExpressionChar :: BackslashSequence :: \\\\Paragraph separator is incorrect. Actual: ' + (e));\n }\n} \n",
+ "id": "S7.8.5_A2.5_T6"
+ },
+ {
+ "section": "7.8.5, 15.10.4.1",
+ "description": "IdentifierPart :: g",
+ "test": "//CHECK#1\nvar regexp = /(?:)/g; \nif (regexp.global !== true) {\n $ERROR('#1: var regexp = /(?:)/g; regexp.global === true. Actual: ' + (regexp.global));\n}\n\n//CHECK#2 \nif (regexp.ignoreCase !== false) {\n $ERROR('#2: var regexp = /(?:)/g; regexp.ignoreCase === false. Actual: ' + (regexp.ignoreCase));\n}\n\n//CHECK#3\nif (regexp.multiline !== false) {\n $ERROR('#3: var regexp = /(?:)/g; regexp.multiline === false. Actual: ' + (regexp.multiline));\n} \n",
+ "id": "S7.8.5_A3.1_T1"
+ },
+ {
+ "section": "7.8.5, 15.10.4.1",
+ "description": "IdentifierPart :: i",
+ "test": "//CHECK#1\nvar regexp = /(?:)/i; \nif (regexp.global !== false) {\n $ERROR('#1: var regexp = /(?:)/g; regexp.global === false. Actual: ' + (regexp.global));\n}\n\n//CHECK#2 \nif (regexp.ignoreCase !== true) {\n $ERROR('#2: var regexp = /(?:)/g; regexp.ignoreCase === true. Actual: ' + (regexp.ignoreCase));\n}\n\n//CHECK#3\nif (regexp.multiline !== false) {\n $ERROR('#3: var regexp = /(?:)/g; regexp.multiline === false. Actual: ' + (regexp.multiline));\n} \n",
+ "id": "S7.8.5_A3.1_T2"
+ },
+ {
+ "section": "7.8.5, 15.10.4.1",
+ "description": "IdentifierPart :: m",
+ "test": "//CHECK#1\nvar regexp = /(?:)/m; \nif (regexp.global !== false) {\n $ERROR('#1: var regexp = /(?:)/g; regexp.global === false. Actual: ' + (regexp.global));\n}\n\n//CHECK#2 \nif (regexp.ignoreCase !== false) {\n $ERROR('#2: var regexp = /(?:)/g; regexp.ignoreCase === false. Actual: ' + (regexp.ignoreCase));\n}\n\n//CHECK#3\nif (regexp.multiline !== true) {\n $ERROR('#3: var regexp = /(?:)/g; regexp.multiline === true. Actual: ' + (regexp.multiline));\n} \n",
+ "id": "S7.8.5_A3.1_T3"
+ },
+ {
+ "section": "7.8.5, 15.10.4.1",
+ "description": "IdentifierPart :: gi",
+ "test": "//CHECK#1\nvar regexp = /(?:)/gi; \nif (regexp.global !== true) {\n $ERROR('#1: var regexp = /(?:)/g; regexp.global === true. Actual: ' + (regexp.global));\n}\n\n//CHECK#2 \nif (regexp.ignoreCase !== true) {\n $ERROR('#2: var regexp = /(?:)/g; regexp.ignoreCase === true. Actual: ' + (regexp.ignoreCase));\n}\n\n//CHECK#3\nif (regexp.multiline !== false) {\n $ERROR('#3: var regexp = /(?:)/g; regexp.multiline === false. Actual: ' + (regexp.multiline));\n} \n",
+ "id": "S7.8.5_A3.1_T4"
+ },
+ {
+ "section": "7.8.5, 15.10.4.1",
+ "description": "IdentifierPart :: mg",
+ "test": "//CHECK#1\nvar regexp = /(?:)/mg; \nif (regexp.global !== true) {\n $ERROR('#1: var regexp = /(?:)/g; regexp.global === true. Actual: ' + (regexp.global));\n}\n\n//CHECK#2 \nif (regexp.ignoreCase !== false) {\n $ERROR('#2: var regexp = /(?:)/g; regexp.ignoreCase === false. Actual: ' + (regexp.ignoreCase));\n}\n\n//CHECK#3\nif (regexp.multiline !== true) {\n $ERROR('#3: var regexp = /(?:)/g; regexp.multiline === true. Actual: ' + (regexp.multiline));\n} \n",
+ "id": "S7.8.5_A3.1_T5"
+ },
+ {
+ "section": "7.8.5, 15.10.4.1",
+ "description": "IdentifierPart :: mig",
+ "test": "//CHECK#1\nvar regexp = /(?:)/mig; \nif (regexp.global !== true) {\n $ERROR('#1: var regexp = /(?:)/g; regexp.global === true. Actual: ' + (regexp.global));\n}\n\n//CHECK#2 \nif (regexp.ignoreCase !== true) {\n $ERROR('#2: var regexp = /(?:)/g; regexp.ignoreCase === true. Actual: ' + (regexp.ignoreCase));\n}\n\n//CHECK#3\nif (regexp.multiline !== true) {\n $ERROR('#3: var regexp = /(?:)/g; regexp.multiline === true. Actual: ' + (regexp.multiline));\n} \n",
+ "id": "S7.8.5_A3.1_T6"
+ },
+ {
+ "section": "7.8.5, 15.10.4.1",
+ "description": "IdentifierPart :: \\u0067 (g)",
+ "test": "//CHECK#1\nvar regexp = /(?:)/\\u0067; \nif (regexp.global !== true) {\n $ERROR('#1: var regexp = /(?:)/\\\\u0067; regexp.global === true. Actual: ' + (regexp.global));\n} \n",
+ "id": "S7.8.5_A3.1_T7"
+ },
+ {
+ "section": "7.8.5, 15.10.4.1",
+ "description": "IdentifierPart :: \\u0069 (i)",
+ "test": "//CHECK#1\nvar regexp = /(?:)/\\u0069; \nif (regexp.ignoreCase !== true) {\n $ERROR('#1: var regexp = /(?:)/\\\\u0069; regexp.ignoreCase === true. Actual: ' + (regexp.ignoreCase));\n} \n",
+ "id": "S7.8.5_A3.1_T8"
+ },
+ {
+ "section": "7.8.5, 15.10.4.1",
+ "description": "IdentifierPart :: \\u006D (m)",
+ "test": "//CHECK#1\nvar regexp = /(?:)/\\u006D; \nif (regexp.multiline !== true) {\n $ERROR('#1: var regexp = /(?:)/\\\\u006D; regexp.multiline === true. Actual: ' + (regexp.multiline));\n} \n",
+ "id": "S7.8.5_A3.1_T9"
+ },
+ {
+ "section": "7.8.5",
+ "description": "Check ((/(?:)/ instanceof RegExp) === true)",
+ "test": "//CHECK#1\nif ((/(?:)/ instanceof RegExp) !== true) {\n $ERROR('#1: (/(?:)/ instanceof RegExp) === true. Actual: ' + ((/(?:)/ instanceof RegExp)));\n} \n \n",
+ "id": "S7.8.5_A4.1"
+ },
+ {
+ "section": "7.8.5",
+ "description": "Check equality two regular expression literals",
+ "test": "//CHECK#1\nvar regexp1 = /(?:)/;\nvar regexp2 = /(?:)/;\nif (regexp1 === regexp2) {\n $ERROR('#1: var regexp1 = /(?:)/; var regexp2 = /(?:)/; regexp1 !== regexp2');\n} \n \n",
+ "id": "S7.8.5_A4.2"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/7.9.2_Examples_of_Automatic_Semicolon_Insertion.json b/website/resources/scripts/testcases2/7.9.2_Examples_of_Automatic_Semicolon_Insertion.json
new file mode 100644
index 000000000..c43313c9d
--- /dev/null
+++ b/website/resources/scripts/testcases2/7.9.2_Examples_of_Automatic_Semicolon_Insertion.json
@@ -0,0 +1,53 @@
+{
+ "testCollection": {
+ "name": "7.9.2_Examples_of_Automatic_Semicolon_Insertion",
+ "numTests": 7,
+ "tests": [
+ {
+ "section": "7.9.2",
+ "description": "{ 1 2 } 3 is not a valid sentence in the ECMAScript grammar",
+ "negative": "",
+ "test": "//CHECK#1\n{ 1 2 } 3\n",
+ "id": "S7.9.2_A1_T1"
+ },
+ {
+ "section": "7.9.2",
+ "description": "{ 1 \\n 2 } 3 is a valid sentence in the ECMAScript grammar with automatic semicolon insertion",
+ "test": "//CHECK#1\n{ 1\n2 } 3\n",
+ "id": "S7.9.2_A1_T2"
+ },
+ {
+ "section": "7.9.2",
+ "description": ": for( a ; b \\n ) is not a valid sentence in the ECMAScript grammar;",
+ "negative": "",
+ "test": "//CHECK#1\nfor( a ; b\n)\n",
+ "id": "S7.9.2_A1_T3"
+ },
+ {
+ "section": "7.9.2",
+ "description": "return \\n a+b is a valid sentence in the ECMAScript grammar\n with automatic semicolon insertion, but returned undefined",
+ "test": "//CHECK#1\nvar a=1,b=2;\nfunction test(){\n\treturn\n\ta+b\n}\nvar x=test();\nif (x!==undefined) $ERROR('#1: Automatic semicolon insertion not work with return');\n",
+ "id": "S7.9.2_A1_T4"
+ },
+ {
+ "section": "7.9.2",
+ "description": "a=b \\n ++c is a valid sentence in the ECMAScript grammar\n with automatic semicolon insertion, but a!==b++c",
+ "test": "//CHECK#1\nvar a=1,b=2,c=3;\na=b\n++c\n\nif (a!==b) $ERROR('#1: Automatic semicolon insertion not work with ++');\n",
+ "id": "S7.9.2_A1_T5"
+ },
+ {
+ "section": "7.9.2",
+ "description": "if(a>b) \\n else c=d is not a valid sentence in the ECMAScript grammar",
+ "negative": "",
+ "test": "//CHECK#1\nvar a=1,b=2,c=3,d;\nif(a>b)\nelse c=d\n",
+ "id": "S7.9.2_A1_T6"
+ },
+ {
+ "section": "7.9.2",
+ "description": "a=b+c \\n (d+e).print() is a valid sentence in the ECMAScript grammar,\nand automatic semicolon insertion not run",
+ "test": "//CHECK#1\nfunction c (a){\n\treturn 2*a;\n}\n\nvar a=1,b=2,d=4,e=5;\n\na=b+c\n(d+e)\n\nif (a !== 20) $ERROR('#1: Automatic semicolon insertion work wrong');\n",
+ "id": "S7.9.2_A1_T7"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/7.9_Automatic_Semicolon_Insertion.json b/website/resources/scripts/testcases2/7.9_Automatic_Semicolon_Insertion.json
new file mode 100644
index 000000000..3b0166cac
--- /dev/null
+++ b/website/resources/scripts/testcases2/7.9_Automatic_Semicolon_Insertion.json
@@ -0,0 +1,617 @@
+{
+ "testCollection": {
+ "name": "7.9_Automatic_Semicolon_Insertion",
+ "numTests": 96,
+ "tests": [
+ {
+ "section": "7.9, 12.7, 12.12",
+ "description": "Try use continue \\n Label construction",
+ "test": "//CHECK#1\nlabel1: for (var i = 0; i <= 0; i++) {\n for (var j = 0; j <= 1; j++) {\n if (j === 0) {\n continue label1;\n } else {\n $ERROR('#1: Check continue statement for automatic semicolon insertion');\n }\n } \n}\n\n//CHECK#2\nvar result = false;\nlabel2: for (var i = 0; i <= 1; i++) {\n for (var j = 0; j <= 1; j++) {\n if (j === 0) {\n continue \n label2; \n } else {\n result = true;\n }\n } \n}\n\nif (result !== true) {\n $ERROR('#2: Check continue statement for automatic semicolon insertion');\n}\n",
+ "id": "S7.9_A1"
+ },
+ {
+ "section": "7.9",
+ "description": "Checking if execution of \"1 * {}\" passes",
+ "test": "//CHECK#1\n1 * {}\n",
+ "id": "S7.9_A10_T1"
+ },
+ {
+ "section": "7.9",
+ "description": "Checking if execution of \"{a:1 \\n} 3\" passes",
+ "test": "//CHECK#1\n{a:1\n} 3\n",
+ "id": "S7.9_A10_T10"
+ },
+ {
+ "section": "7.9",
+ "description": "Checking if execution of \"{a:1 \\n} \\n 3\" passes",
+ "test": "//CHECK#1\n{a:1 \n} \n3\n",
+ "id": "S7.9_A10_T11"
+ },
+ {
+ "section": "7.9",
+ "description": "Checking if execution of \"{ \\n a: \\n 1 \\n } \\n 3\" passes",
+ "test": "//CHECK#1\n{\na:\n1 \n} \n3\n",
+ "id": "S7.9_A10_T12"
+ },
+ {
+ "section": "7.9",
+ "description": "Checking if execution of \"{}*1\" fails",
+ "negative": "",
+ "test": "//CHECK#1\n{} * 1\n",
+ "id": "S7.9_A10_T2"
+ },
+ {
+ "section": "7.9",
+ "description": "Checking if execution of \"({}) * 1\" passes",
+ "test": "//CHECK#1\n({}) * 1\n",
+ "id": "S7.9_A10_T3"
+ },
+ {
+ "section": "7.9",
+ "description": ": Checking if execution of \"({};)*1\" fails;",
+ "negative": "",
+ "test": "//CHECK#1\n({};) * 1\n",
+ "id": "S7.9_A10_T4"
+ },
+ {
+ "section": "7.9",
+ "description": "Checking if execution of \"( \\n {} \\n ) * 1\" passes",
+ "test": "//CHECK#1\n(\n {}\n) * 1\n",
+ "id": "S7.9_A10_T5"
+ },
+ {
+ "section": "7.9",
+ "description": "Checking if execution of \"{} \\n * 1\" fails",
+ "negative": "",
+ "test": "//CHECK#1\n{}\n * 1\n",
+ "id": "S7.9_A10_T6"
+ },
+ {
+ "section": "7.9",
+ "description": "Checking if execution of \"{1} 2\" passes",
+ "test": "//CHECK#1\n{1} 2\n",
+ "id": "S7.9_A10_T7"
+ },
+ {
+ "section": "7.9",
+ "description": "Checking if execution of \"{1 2} 3\" fails",
+ "negative": "",
+ "test": "//CHECK#1\n{1 2} 3\n",
+ "id": "S7.9_A10_T8"
+ },
+ {
+ "section": "7.9",
+ "description": "Checking if execution of \"{1 \\n 2} 3\" passes",
+ "test": "//CHECK#1\n{1 \n2} 3\n",
+ "id": "S7.9_A10_T9"
+ },
+ {
+ "section": "7.9, 12.5",
+ "description": "Use if (false) x = 1 (without semicolon) and check x",
+ "test": "//CHECK#1\nx = 0;\nif (false) x = 1\nif (x !== 0) {\n $ERROR('#1: Check If Statement for automatic semicolon insertion');\n}\n",
+ "id": "S7.9_A11_T1"
+ },
+ {
+ "section": "7.9, 12.5",
+ "description": "Use if (false) {x = 1} else {x=-1} and check x",
+ "test": "//CHECK#1\nx = 0;\nif (false) {x = 1} else {x = -1}\nif (x !== -1) {\n $ERROR('#1: Check If Statement for automatic semicolon insertion');\n}\n",
+ "id": "S7.9_A11_T10"
+ },
+ {
+ "section": "7.9, 12.5",
+ "description": ": Use if (false) {{x = 1};} \\n else x=-1 and check x;",
+ "test": "//CHECK#1\nx = 0;\nif (false) {{x = 1};} \nelse x = -1\nif (x !== -1) {\n $ERROR('#1: Check If Statement for automatic semicolon insertion');\n}\n",
+ "id": "S7.9_A11_T11"
+ },
+ {
+ "section": "7.9, 12.5",
+ "description": "Use if (false) \\n x = 1 and check x",
+ "test": "//CHECK#1\nx = 0;\nif (false) \nx = 1\nif (x !== 0) {\n $ERROR('#1: Check If Statement for automatic semicolon insertion');\n}\n",
+ "id": "S7.9_A11_T2"
+ },
+ {
+ "section": "7.9, 12.5",
+ "description": ": Use if (false);\\n x = 1 and check x;",
+ "test": "//CHECK#1\nx = 0;\nif (false); \nx = 1\nif (x !== 1) {\n $ERROR('#1: Check If Statement for automatic semicolon insertion');\n}\n",
+ "id": "S7.9_A11_T3"
+ },
+ {
+ "section": "7.9, 12.5",
+ "description": "Checking if execution of \"if (false) x = 1 else x = -1\" fails",
+ "negative": "",
+ "test": "//CHECK#1\nx = 0;\nif (false) x = 1 else x = -1\n",
+ "id": "S7.9_A11_T4"
+ },
+ {
+ "section": "7.9, 12.5",
+ "description": ": Use if (false) x = 1; else x=-1 and check x;",
+ "test": "//CHECK#1\nx = 0;\nif (false) x = 1; else x = -1\nif (x !== -1) {\n $ERROR('#1: Check If Statement for automatic semicolon insertion');\n}\n",
+ "id": "S7.9_A11_T5"
+ },
+ {
+ "section": "7.9, 12.5",
+ "description": "Use if (false) x = 1 \\n else x=-1 and check x",
+ "test": "//CHECK#1\nx = 0;\nif (false) x = 1 \nelse x = -1\nif (x !== -1) {\n $ERROR('#1: Check If Statement for automatic semicolon insertion');\n}\n",
+ "id": "S7.9_A11_T6"
+ },
+ {
+ "section": "7.9, 12.5",
+ "description": ": Use if (false) x = 1; \\n else x=-1 and check x;",
+ "test": "//CHECK#1\nx = 0;\nif (false) x = 1; \nelse x = -1\nif (x !== -1) {\n $ERROR('#1: Check If Statement for automatic semicolon insertion');\n}\n",
+ "id": "S7.9_A11_T7"
+ },
+ {
+ "section": "7.9, 12.5",
+ "description": ": Use if (false) {x = 1}; \\n else x=-1 and check x;",
+ "negative": "",
+ "test": "//CHECK#1\nx = 0;\nif (false) {x = 1}; \nelse x = -1\nif (x !== -1) {\n $ERROR('#1: Check If Statement for automatic semicolon insertion');\n}\n",
+ "id": "S7.9_A11_T8"
+ },
+ {
+ "section": "7.9, 12.5",
+ "description": "Use if (false) {x = 1} \\n else x=-1 and check x",
+ "test": "//CHECK#1\nx = 0;\nif (false) {x = 1} \nelse x = -1\nif (x !== -1) {\n $ERROR('#1: Check If Statement for automatic semicolon insertion');\n}\n",
+ "id": "S7.9_A11_T9"
+ },
+ {
+ "section": "7.9, 12.8, 12.12",
+ "description": "Try use break \\n Label construction",
+ "test": "//CHECK#1\nlabel1: for (var i = 0; i <= 0; i++) {\n for (var j = 0; j <= 0; j++) {\n break label1;\n }\n $ERROR('#1: Check break statement for automatic semicolon insertion');\n}\n\n//CHECK#2\nvar result = false;\nlabel2: for (var i = 0; i <= 0; i++) {\n for (var j = 0; j <= 0; j++) {\n break \n label2;\n } \n result = true;\n}\n\nif (result !== true) {\n $ERROR('#2: Check break statement for automatic semicolon insertion');\n}\n",
+ "id": "S7.9_A2"
+ },
+ {
+ "section": "7.9, 12.9",
+ "description": "Try use return \\n Expression construction",
+ "test": "//CHECK#1\nfunction f1()\n{\n return 1;\n}\nif (f1() !== 1) { \n $ERROR('#1: Check return statement for automatic semicolon insertion');\n} \n\n//CHECK#2\nfunction f2()\n{\n return \n 1;\n}\nif (f2() !== undefined) { \n $ERROR('#2: Check return statement for automatic semicolon insertion');\n} \n",
+ "id": "S7.9_A3"
+ },
+ {
+ "section": "7.9, 12.13",
+ "description": "Try use Throw \\n Expression construction",
+ "negative": "",
+ "test": "//CHECK#1\ntry {\n throw \n 1;\n} catch(e) { \n} \n$ERROR('#1: Check throw statement for automatic semicolon insertion');\n",
+ "id": "S7.9_A4"
+ },
+ {
+ "section": "7.9, 12.4, 11.13.1",
+ "description": "Try use Variable \\n ++ construction",
+ "negative": "",
+ "test": "//CHECK#1\nvar x = 0;\nx\n++;\n$ERROR('#1: Check Postfix Increment Operator for automatic semicolon insertion');\n",
+ "id": "S7.9_A5.1_T1"
+ },
+ {
+ "section": "7.9, 12.4, 11.13.1",
+ "description": "Try use Variable1 \\n ++Variable2 construction",
+ "test": "//CHECK#1\nvar x = 0;\nvar y = 0;\nx\n++y\nif (x !== 0) {\n $ERROR('#1: Check Prefix Increment Operator for automatic semicolon insertion');\n} else {\n if (y !== 1) {\n $ERROR('#2: Check Prefix Increment Operator for automatic semicolon insertion');\n }\n}\n \n",
+ "id": "S7.9_A5.2_T1"
+ },
+ {
+ "section": "7.9, 12.4, 11.13.2",
+ "description": "Try use Variable \\n -- construction",
+ "negative": "",
+ "test": "//CHECK#1\nvar x = 1;\nx\n--;\n$ERROR('#1: Check Postfix Decrement Operator for automatic semicolon insertion');\n",
+ "id": "S7.9_A5.3_T1"
+ },
+ {
+ "section": "7.9, 12.4, 11.13.2",
+ "description": "Try use Variable1 \\n --Variable2 construction",
+ "test": "//CHECK#1\nvar x = 1;\nvar y = 1;\nx\n--y\nif (x !== 1) {\n $ERROR('#1: Check Prefix Decrement Operator for automatic semicolon insertion');\n} else {\n if (y !== 0) {\n $ERROR('#1: Check Prefix Decrement Operator for automatic semicolon insertion');\n }\n}\n",
+ "id": "S7.9_A5.4_T1"
+ },
+ {
+ "section": "7.9, 12.4, 11.2.5",
+ "description": "Try use 1 + function_name\\n(2 + 3) construction",
+ "test": "//CHECK#1\nfunction f(t) {\n return t;\n}\nvar x = 1 + f\n(2 + 3)\nif (x !== 6) {\n $ERROR('#1: Check Function Expression for automatic semicolon insertion');\n} \n",
+ "id": "S7.9_A5.5_T1"
+ },
+ {
+ "section": "7.9, 12.4, 11.2.5",
+ "description": ": Try use function f(o) {o.x = 1; return o;}; \\n (new Object()).x; construction;",
+ "test": "//CHECK#1\nvar result = function f(o) {o.x = 1; return o;};\n(new Object()).x;\nif (typeof result !== \"function\") {\n $ERROR('#1: Check Function Expression for automatic semicolon insertion');\n}\n",
+ "id": "S7.9_A5.5_T2"
+ },
+ {
+ "section": "7.9, 12.4, 11.2.5",
+ "description": ": Try use function f(o) {o.x = 1; return o;} \\n (new Object()).x; construction;",
+ "test": "//CHECK#1\nvar result = function f(o) {o.x = 1; return o;}\n(new Object()).x;\nif (result !== 1) {\n $ERROR('#1: Check Function Expression for automatic semicolon insertion');\n}\n",
+ "id": "S7.9_A5.5_T3"
+ },
+ {
+ "section": "7.9, 12.4, 11.2.5",
+ "description": "Insert some LineTerminators into function body",
+ "test": "//CHECK#1\nvar x =\n1 + (function (t){return {a:t\n}\n})\n(2 + 3).\na\n\nif (x !== 6) {\n $ERROR('#1: Check Function Expression for automatic semicolon insertion');\n} \n",
+ "id": "S7.9_A5.5_T4"
+ },
+ {
+ "section": "7.9, 12.4, 11.2.5",
+ "description": ": Insert some LineTerminators into rerutn expression;",
+ "test": "//CHECK#1\nvar x =\n1 + (function f\n(t){\nreturn {\na:\nfunction(){\nreturn t + 1\n}\n}\n}\n)\n(2 + 3).\na\n()\n\nif (x !== 7) {\n $ERROR('#1: Check Function Expression for automatic semicolon insertion');\n} \n",
+ "id": "S7.9_A5.5_T5"
+ },
+ {
+ "section": "7.9, 12.4, 11.3, 11.4.4, 11.4.5",
+ "description": "Try use Variable1 \\n ++ \\n Variable2 construction",
+ "test": "var x=0, y=0;\n\nx\n++\ny\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif ((x!==0)&(y!==1)) {\n\t$ERROR('#1: Check Postfix Increment Operator for automatic semicolon insertion');\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\nx\n++y\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif ((x!==0)&(y!==2)) {\n\t$ERROR('#2: Check Postfix Increment Operator for automatic semicolon insertion');\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S7.9_A5.6_T1"
+ },
+ {
+ "section": "7.9, 12.4, 11.3, 11.4.4, 11.4.5",
+ "description": "Try use Variable1 \\n -- \\n Variable2 construction",
+ "test": "var x=0, y=2;\n\nx\n--\ny\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif ((x!==0)&(y!==1)) {\n\t$ERROR('#1: Check Postfix Increment Operator for automatic semicolon insertion');\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\nx\n--y\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif ((x!==0)&(y!==0)) {\n\t$ERROR('#2: Check Postfix Increment Operator for automatic semicolon insertion');\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n",
+ "id": "S7.9_A5.6_T2"
+ },
+ {
+ "section": "7.9",
+ "description": "Try use Variable1 \\n ++ \\n ++ \\n Variable2 construction",
+ "negative": "",
+ "test": "var x=0, y=0;\nz=\nx\n++\n++\ny\n",
+ "id": "S7.9_A5.7_T1"
+ },
+ {
+ "section": "7.9",
+ "description": "Try use Variable1 \\n + \\n ++ \\n Variable2 construction",
+ "test": "var x=0, y=0;\nz=\nx\n+ \n++\ny\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif ((z!==1)&&(y!==1)&&(x!==0)) {\n\t$ERROR('#1: ');\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\nz=\nx\n+ ++\ny\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif ((z!==2)&&(y!==2)&&(x!==0)) {\n\t$ERROR('');\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\nz=\nx\n+ ++\ny\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#3\nif ((z!==3)&&(y!==3)&&(x!==0)) {\n\t$ERROR('');\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S7.9_A5.8_T1"
+ },
+ {
+ "section": "7.9",
+ "description": "Try use Variable1 (different combinations of three +) Variable2 construction",
+ "test": "var x=1, y=1;\nz=\nx\n+ \n+\n+\ny\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif ((z!==2)&&(y!==1)&&(x!==1)) {\n\t$ERROR('#1: ');\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\nz=\nx + + + y\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif ((z!==2)&&(y!==1)&&(x!==1)) {\n\t$ERROR('');\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\nz=\nx\n+ +\n+ +\ny\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#3\nif ((z!==2)&&(y!==1)&&(x!==1)) {\n\t$ERROR('');\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S7.9_A5.9_T1"
+ },
+ {
+ "section": "7.9, 12.6.3",
+ "description": "for( Empty two semicolons and \\n)",
+ "test": "//CHECK#1\nfor(;;\n) {\n break;\n}\n",
+ "id": "S7.9_A6.1_T1"
+ },
+ {
+ "section": "7.9, 12.6.3",
+ "description": "for (false \\n two semicolons false \\n)",
+ "test": "//CHECK#1\nfor(false\n ;;false\n) {\n break;\n}\n",
+ "id": "S7.9_A6.1_T10"
+ },
+ {
+ "section": "7.9, 12.6.3",
+ "description": "for (false \\n semicolon \\n semicolon \\n)",
+ "test": "//CHECK#1\nfor(false\n ;\n ;\n) {\n break;\n}\n",
+ "id": "S7.9_A6.1_T11"
+ },
+ {
+ "section": "7.9, 12.6.3",
+ "description": "for (false \\n semicolon false \\n semicolon \\n)",
+ "test": "//CHECK#1\nfor(false\n ;false\n ;\n) {\n break;\n}\n",
+ "id": "S7.9_A6.1_T12"
+ },
+ {
+ "section": "7.9, 12.6.3",
+ "description": "for (false \\n semicolon false \\n semicolon false \\n)",
+ "test": "//CHECK#1\nfor(false\n ;false\n ;false\n) {\n break;\n}\n",
+ "id": "S7.9_A6.1_T13"
+ },
+ {
+ "section": "7.9, 12.6.3",
+ "description": "for (semicolon \\n semicolon \\n)",
+ "test": "//CHECK#1\nfor(;\n ;\n) {\n break;\n}\n",
+ "id": "S7.9_A6.1_T2"
+ },
+ {
+ "section": "7.9, 12.6.3",
+ "description": "for (\\n two semicolons \\n)",
+ "test": "//CHECK#1\nfor(\n ;;\n) {\n break;\n}\n",
+ "id": "S7.9_A6.1_T3"
+ },
+ {
+ "section": "7.9, 12.6.3",
+ "description": "for( \\n semicolon \\n semicolon \\n)",
+ "test": "//CHECK#1\nfor(\n ;\n ;\n) {\n break;\n}\n",
+ "id": "S7.9_A6.1_T4"
+ },
+ {
+ "section": "7.9, 12.6.3",
+ "description": "for ( \\n semicolon \\n\\n semicolon \\n)",
+ "test": "//CHECK#1\nfor(\n ;\n \n ;\n) {\n break;\n}\n",
+ "id": "S7.9_A6.1_T5"
+ },
+ {
+ "section": "7.9, 12.6.3",
+ "description": "for(false semicolon false semicolon false \\n)",
+ "test": "//CHECK#1\nfor(false;false;false\n) {\n break;\n}\n",
+ "id": "S7.9_A6.1_T6"
+ },
+ {
+ "section": "7.9, 12.6.3",
+ "description": "for (false semicolon false \\n semicolon \\n)",
+ "test": "//CHECK#1\nfor(false;false\n ;\n) {\n break;\n}\n",
+ "id": "S7.9_A6.1_T7"
+ },
+ {
+ "section": "7.9, 12.6.3",
+ "description": "for (false semicolon false \\n semicolon false \\n)",
+ "test": "//CHECK#1\nfor(false;false\n ;false\n) {\n break;\n}\n",
+ "id": "S7.9_A6.1_T8"
+ },
+ {
+ "section": "7.9, 12.6.3",
+ "description": "for (false \\n two semicolons \\n)",
+ "test": "//CHECK#1\nfor(false\n ;;\n) {\n break;\n}\n",
+ "id": "S7.9_A6.1_T9"
+ },
+ {
+ "section": "7.9, 12.6.3",
+ "description": "For header is (semicolon \\n)",
+ "negative": "",
+ "test": "//CHECK#1\nfor(;\n) {\n break;\n}\n",
+ "id": "S7.9_A6.2_T1"
+ },
+ {
+ "section": "7.9, 12.6.3",
+ "description": "For header is (\\n false \\n semicolon)",
+ "negative": "",
+ "test": "//CHECK#1\nfor(\n false\n;) {\n break;\n}\n",
+ "id": "S7.9_A6.2_T10"
+ },
+ {
+ "section": "7.9, 12.6.3",
+ "description": "For header is (\\n semicolon \\n)",
+ "negative": "",
+ "test": "//CHECK#1\nfor(\n ;\n) {\n break;\n}\n",
+ "id": "S7.9_A6.2_T2"
+ },
+ {
+ "section": "7.9, 12.6.3",
+ "description": "For header is (\\n semicolon)",
+ "negative": "",
+ "test": "//CHECK#1\nfor(\n;) {\n break;\n}\n",
+ "id": "S7.9_A6.2_T3"
+ },
+ {
+ "section": "7.9, 12.6.3",
+ "description": "For header is (\\n \\n semicolon)",
+ "negative": "",
+ "test": "//CHECK#1\nfor(\n \n;) {\n break;\n}\n",
+ "id": "S7.9_A6.2_T4"
+ },
+ {
+ "section": "7.9, 12.6.3",
+ "description": "For header is (false semicolon false\\n)",
+ "negative": "",
+ "test": "//CHECK#1\nfor(false;false\n) {\n break;\n}\n",
+ "id": "S7.9_A6.2_T5"
+ },
+ {
+ "section": "7.9, 12.6.3",
+ "description": "For header is (false semicolon \\n false)",
+ "negative": "",
+ "test": "//CHECK#1\nfor(false;\nfalse\n) {\n break;\n}\n",
+ "id": "S7.9_A6.2_T6"
+ },
+ {
+ "section": "7.9, 12.6.3",
+ "description": "For header is (false \\n semicolon \\n)",
+ "negative": "",
+ "test": "//CHECK#1\nfor(false\n ;\n) {\n break;\n}\n",
+ "id": "S7.9_A6.2_T7"
+ },
+ {
+ "section": "7.9, 12.6.3",
+ "description": "For header is (false \\n semicolon false \\n)",
+ "negative": "",
+ "test": "//CHECK#1\nfor(false\n ;false\n) {\n break;\n}\n",
+ "id": "S7.9_A6.2_T8"
+ },
+ {
+ "section": "7.9, 12.6.3",
+ "description": "For header is (\\n semicolon false)",
+ "negative": "",
+ "test": "//CHECK#1\nfor(\n;false) {\n break;\n}\n",
+ "id": "S7.9_A6.2_T9"
+ },
+ {
+ "section": "7.9, 12.6.3",
+ "description": "For header is (\\n)",
+ "negative": "",
+ "test": "//CHECK#1\nfor(\n) {\n break;\n}\n",
+ "id": "S7.9_A6.3_T1"
+ },
+ {
+ "section": "7.9, 12.6.3",
+ "description": "For header is (\\n \\n)",
+ "negative": "",
+ "test": "//CHECK#1\nfor(\n \n) {\n break;\n}\n",
+ "id": "S7.9_A6.3_T2"
+ },
+ {
+ "section": "7.9, 12.6.3",
+ "description": "For header is (\\n \\n \\n)",
+ "negative": "",
+ "test": "//CHECK#1\nfor(\n \n \n) {\n break;\n}\n",
+ "id": "S7.9_A6.3_T3"
+ },
+ {
+ "section": "7.9, 12.6.3",
+ "description": "For header is (\\n false \\n)",
+ "negative": "",
+ "test": "//CHECK#1\nfor(\n false\n) {\n break;\n}\n",
+ "id": "S7.9_A6.3_T4"
+ },
+ {
+ "section": "7.9, 12.6.3",
+ "description": "For header is (false \\n false \\n)",
+ "negative": "",
+ "test": "//CHECK#1\nfor(false\n false\n) {\n break;\n}\n",
+ "id": "S7.9_A6.3_T5"
+ },
+ {
+ "section": "7.9, 12.6.3",
+ "description": "For header is (\\n false \\n false \\n)",
+ "negative": "",
+ "test": "//CHECK#1\nfor(\n false\n false\n) {\n break;\n}\n",
+ "id": "S7.9_A6.3_T6"
+ },
+ {
+ "section": "7.9, 12.6.3",
+ "description": "For header is (\\n false \\n false \\n false \\n)",
+ "negative": "",
+ "test": "//CHECK#1\nfor(\n false\n false\n false\n) {\n break;\n}\n",
+ "id": "S7.9_A6.3_T7"
+ },
+ {
+ "section": "7.9, 12.6.3",
+ "description": "Three semicolons. For header is (false semicolon false semicolon false semicolon)",
+ "negative": "",
+ "test": "//CHECK#1\nfor(false;false;false;) {\n break;\n}\n",
+ "id": "S7.9_A6.4_T1"
+ },
+ {
+ "section": "7.9, 12.6.3",
+ "description": "Three semicolons. For header is (false semicolon false two semicolons false)",
+ "negative": "",
+ "test": "//CHECK#1\nfor(false;false;;false) {\n break;\n}\n",
+ "id": "S7.9_A6.4_T2"
+ },
+ {
+ "section": "7.9, 12.2",
+ "description": "Checking if execution of \"var x \\n = 1\" passes",
+ "test": "//CHECK#1\nvar x\n= 1\n",
+ "id": "S7.9_A7_T1"
+ },
+ {
+ "section": "7.9, 12.2",
+ "description": "Checking if execution of \"var x = \\n 1\" passes",
+ "test": "//CHECK#1\nvar x = \n1\n",
+ "id": "S7.9_A7_T2"
+ },
+ {
+ "section": "7.9, 12.2",
+ "description": "Checking if execution of \"var x \\n x = 1\" passes",
+ "test": "//CHECK#1\nvar x\nx = 1\n\n",
+ "id": "S7.9_A7_T3"
+ },
+ {
+ "section": "7.9, 12.2",
+ "description": "Checking if execution of \"var \\n x\" passes",
+ "test": "//CHECK#1\nvar\nx\n\n",
+ "id": "S7.9_A7_T4"
+ },
+ {
+ "section": "7.9, 12.2",
+ "description": "Checking if execution of \"var \\n x \\n = \\n 1\" passes",
+ "test": "//CHECK#1\nvar\nx \n= \n1\n\n",
+ "id": "S7.9_A7_T5"
+ },
+ {
+ "section": "7.9, 12.2",
+ "description": "Checking if execution of \"var x, \\n y\" passes",
+ "test": "//CHECK#1\nvar x, \ny \n\n",
+ "id": "S7.9_A7_T6"
+ },
+ {
+ "section": "7.9, 12.2",
+ "description": "Checking if execution of \"var x \\n y\" passes",
+ "negative": "",
+ "test": "//CHECK#1\nvar x \ny \n\n",
+ "id": "S7.9_A7_T7"
+ },
+ {
+ "section": "7.9, 12.2",
+ "description": "Checking if execution of \"var x \\n ,y\" passes",
+ "test": "//CHECK#1\nvar x \n,y \n\n",
+ "id": "S7.9_A7_T8"
+ },
+ {
+ "section": "7.9, 12.2",
+ "description": "Checking if execution of \"var x \\n ,y = 1\" passes",
+ "test": "//CHECK#1\nvar \nx \n,y = 1\n\n",
+ "id": "S7.9_A7_T9"
+ },
+ {
+ "section": "7.9, 12.4",
+ "description": "Checking if execution of one semicolon passes",
+ "test": "//CHECK#1\n;\n",
+ "id": "S7.9_A8_T1"
+ },
+ {
+ "section": "7.9, 12.4",
+ "description": "Checking if execution of some semicolons with LineTerminators pases",
+ "test": "//CHECK#1\n;\n;\n;\n;\n",
+ "id": "S7.9_A8_T2"
+ },
+ {
+ "section": "7.9, 12.4",
+ "description": "Checking if execution of some semicolons without LineTerminators passes",
+ "test": "//CHECK#1\n;;;;\n",
+ "id": "S7.9_A8_T3"
+ },
+ {
+ "section": "7.9, 12.4",
+ "description": "Checking if execution of some semicolons with LineTerminators and numbers passes",
+ "test": "//CHECK#1\n;1;\n;1\n;1;\n;1\n",
+ "id": "S7.9_A8_T4"
+ },
+ {
+ "section": "7.9, 12.4",
+ "description": "Checking if execution of some semicolons without LineTerminators but with numbers passes",
+ "test": "//CHECK#1\n;;1;;1;;1\n",
+ "id": "S7.9_A8_T5"
+ },
+ {
+ "section": "7.9, 12.6.1",
+ "description": "Execute do { \\n }while(false)",
+ "test": "//CHECK#1\ndo { \n} while (false)\n",
+ "id": "S7.9_A9_T1"
+ },
+ {
+ "section": "7.9, 12.6.1",
+ "description": ": Execute do; while(false) \\n true;",
+ "test": "//CHECK#1\ndo ; while (false)\ntrue\n",
+ "id": "S7.9_A9_T2"
+ },
+ {
+ "section": "7.9, 12.6.1",
+ "description": ": Execute do { \\n ; \\n }while(false) true;",
+ "test": "//CHECK#1\ndo {\n ;\n} while (false) true\n",
+ "id": "S7.9_A9_T3"
+ },
+ {
+ "section": "7.9, 12.6.1",
+ "description": ": Execute do ; while \\n (false) true;",
+ "test": "//CHECK#1\ndo ; while \n(false) true\n",
+ "id": "S7.9_A9_T4"
+ },
+ {
+ "section": "7.9, 12.6.1",
+ "description": ": Execute do { \\n ; \\n }while((false) \\n );",
+ "test": "//CHECK#1\ndo {\n ;\n} while ((false) \n)\n",
+ "id": "S7.9_A9_T5"
+ },
+ {
+ "section": "7.9, 12.6.1",
+ "description": "Execute do \\n while(false)",
+ "negative": "",
+ "test": "//CHECK#1\ndo\nwhile (false) \n",
+ "id": "S7.9_A9_T6"
+ },
+ {
+ "section": "7.9, 12.6.1",
+ "description": "Execute do \\n\\n while(false)",
+ "negative": "",
+ "test": "//CHECK#1\ndo\n \nwhile (false) \n",
+ "id": "S7.9_A9_T7"
+ },
+ {
+ "section": "7.9, 12.6.1",
+ "description": ": Execute do {}; \\n while(false);",
+ "negative": "",
+ "test": "//CHECK#1\ndo {}; \nwhile (false) \n",
+ "id": "S7.9_A9_T8"
+ },
+ {
+ "section": "7.9, 12.6.1",
+ "description": "Execute do {} \\n while(false)",
+ "test": "//CHECK#1\ndo {} \nwhile (false) \n",
+ "id": "S7.9_A9_T9"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/8.1_The_Undefined_Type.json b/website/resources/scripts/testcases2/8.1_The_Undefined_Type.json
new file mode 100644
index 000000000..00b6139ac
--- /dev/null
+++ b/website/resources/scripts/testcases2/8.1_The_Undefined_Type.json
@@ -0,0 +1,50 @@
+{
+ "testCollection": {
+ "name": "8.1_The_Undefined_Type",
+ "numTests": 7,
+ "tests": [
+ {
+ "section": "8.1",
+ "description": "Checking if execution of \"var x = undefined\" passes",
+ "test": "// CHECK#1\nvar x = undefined;\n",
+ "id": "S8.1_A1_T1"
+ },
+ {
+ "section": "8.1",
+ "description": "Check typeof(undefined) and typeof(void 0)",
+ "test": "// CHECK#1\nif (!(typeof(undefined) === \"undefined\")) { \n\tERROR('#1: typeof(undefined) === \"undefined\". Actual: ' + (typeof(undefined))); \n} \n\n// CHECK#2\nif (!(typeof(void 0) === \"undefined\")) { \n\tERROR('#2: typeof(void 0) === \"undefined\". Actual: ' + (typeof(void 0))); \n}\n\n// CHECK#3\nif (!(undefined === void 0)) { \n\tERROR('#3: undefined === void 0'); \n}\n",
+ "id": "S8.1_A1_T2"
+ },
+ {
+ "section": "8.1",
+ "description": "Check that var x have value and type undefined",
+ "test": "var x;\n\n///////////////////////////////////////////////////////////////////\n// CHECK#1\nif (!(x === undefined)) {\n $ERROR('#1: var x; x === undefined. Actual: ' + (x));\n}\n//\n///////////////////////////////////////////////////////////////////\n\n///////////////////////////////////////////////////////////////////\n// CHECK#2\nif (!(typeof(x) === \"undefined\")) {\n $ERROR('#2: var x; typeof(x) === \"undefined\". Actual: ' + (typeof(x)));\n}\n//\n///////////////////////////////////////////////////////////////////\n\n///////////////////////////////////////////////////////////////////\n// CHECK#3\nif (!(x === void 0)) {\n $ERROR('#3: var x; x === void 0. Actual: ' + (x));\n}\n//\n///////////////////////////////////////////////////////////////////\n",
+ "id": "S8.1_A2_T1"
+ },
+ {
+ "section": "8.1",
+ "description": "Function return undefined",
+ "test": "// CHECK#1\nfunction test1(x) {\n\treturn x;\n}\n\nif (!(test1() === void 0)) {\n $ERROR('#1: function test1(x){return x} test1() === void 0. Actual: ' + (test1()));\n}\n\n// CHECK#2\nfunction test2() { \n}\n\nif (!(test2() === void 0)) {\n $ERROR('#2: function test2(){} test2() === void 0. Actual: ' + (test2()));\n}\n",
+ "id": "S8.1_A2_T2"
+ },
+ {
+ "section": "8.1",
+ "description": "\"undefined=1\" should throw a TypeError",
+ "test": "//////////////////////////////////////////////////////////\n// CHECK1#\nvar undefined = 1;\n//\n//////////////////////////////////////////////////////////\n",
+ "id": "S8.1_A3"
+ },
+ {
+ "section": "8.1",
+ "description": "Check value of not existed property",
+ "test": "// CHECK#1 \nif ((new Object()).newProperty !== undefined) {\n $ERROR('#1: (new Object()).newProperty === undefined. Actual: ' + ((new Object()).newProperty));\n} \n\n",
+ "id": "S8.1_A4"
+ },
+ {
+ "section": "8.1",
+ "description": "Call function without provided argument",
+ "test": "///////////////////////////////////////\n//\nfunction test(arg) {\n// Check and make sure that arg is not undefined\n\tif (typeof(arg) !== \"undefined\") {\n $ERROR('#1: Function argument that isn\\'t provided has a value of undefined. Actual: ' + (typeof(arg)));\n }\n}\n\ntest();\n//\n////////////////////////////////////////\n",
+ "id": "S8.1_A5"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/8.2_The_Null_Type.json b/website/resources/scripts/testcases2/8.2_The_Null_Type.json
new file mode 100644
index 000000000..54625b326
--- /dev/null
+++ b/website/resources/scripts/testcases2/8.2_The_Null_Type.json
@@ -0,0 +1,33 @@
+{
+ "testCollection": {
+ "name": "8.2_The_Null_Type",
+ "numTests": 4,
+ "tests": [
+ {
+ "section": "8.2",
+ "description": "Checking if execution of \"var x = null\" passes",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nvar x = null;\n//\n//////////////////////////////////////////////////////////////////////////////\n\n",
+ "id": "S8.2_A1_T1"
+ },
+ {
+ "section": "8.2",
+ "description": "Checking if execution of \"x = null\" passes",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nx = null;\n//\n//////////////////////////////////////////////////////////////////////////////\n\n",
+ "id": "S8.2_A1_T2"
+ },
+ {
+ "section": "8.2",
+ "description": "Checking if execution of \"var null\" fails",
+ "negative": "",
+ "test": "var null;\n\n\n",
+ "id": "S8.2_A2"
+ },
+ {
+ "section": "8.2, 11.4.3",
+ "description": "Check type of null",
+ "test": "//////////////////////////////////////////////////////////////\n// CHECK#1\nif (typeof(null) !== \"object\") {\n $ERROR('#1: typeof null === \"object\". Actual: ' + (typeof null));\n}\n//\n/////////////////////////////////////////////////////////////\n",
+ "id": "S8.2_A3"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/8.3_The_Boolean_Type.json b/website/resources/scripts/testcases2/8.3_The_Boolean_Type.json
new file mode 100644
index 000000000..d1cfb8bb1
--- /dev/null
+++ b/website/resources/scripts/testcases2/8.3_The_Boolean_Type.json
@@ -0,0 +1,40 @@
+{
+ "testCollection": {
+ "name": "8.3_The_Boolean_Type",
+ "numTests": 5,
+ "tests": [
+ {
+ "section": "8.3",
+ "description": "Assign true and false to variables",
+ "test": "if (x == undefined) {\n $ERROR(\"x == undefined, but actual is \"+ x);\n} \n\n////////////////////////////////////////////////////////////////////////\n// CHECK#1\nvar x = true;\nvar y = false;\n//\n////////////////////////////////////////////////////////////////////////\n",
+ "id": "S8.3_A1_T1"
+ },
+ {
+ "section": "8.3",
+ "description": "Check type of true/false and it`s equality",
+ "test": "//////////////////////////////////////////////////////////////////////\n// CHECK#1\nif (typeof(true) !== \"boolean\") {\n $ERROR('#1: typeof(true) === \"boolean\"');\n}\n//\n//////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////\n// CHECK#2\nif (typeof(true) != \"boolean\") {\n $ERROR('#2: typeof(true) == \"boolean\"');\n}\n//\n//////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////\n// CHECK#3\nif (typeof(false) !== \"boolean\") {\n $ERROR('#3: typeof(false) === \"boolean\"');\n}\n//\n//////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////\n// CHECK#4\nif (typeof(false) != \"boolean\") {\n $ERROR('#4: typeof(false) == \"boolean\"');\n}\n//\n//////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////\n// CHECK#5\nif (true === false) {\n $ERROR('#5: true !== false');\n}\n//\n//////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////\n// CHECK#6\nif (true == false) {\n $ERROR('#6: true != false');\n}\n//\n//////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////\n// CHECK#7\nif (false === true) {\n $ERROR('#7: false !== true');\n}\n//\n//////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////\n// CHECK#8\nif (false == true) {\n $ERROR('#8: false != true');\n}\n//\n//////////////////////////////////////////////////////////////////////\n\n",
+ "id": "S8.3_A1_T2"
+ },
+ {
+ "section": "8.3",
+ "description": "Checking if execution of \"true=1\" fails",
+ "negative": "",
+ "test": "true = 1;\n",
+ "id": "S8.3_A2.1"
+ },
+ {
+ "section": "8.3",
+ "description": "Checking if execution of \"false=0\" fails",
+ "negative": "",
+ "test": "false = 0;\n",
+ "id": "S8.3_A2.2"
+ },
+ {
+ "section": "8.3",
+ "description": "Check not false equals true, not true equals false",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (!false !== true){\n $ERROR('#1: !false === true');\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (!false != true){\n $ERROR('#2: !false == true');\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#3\nif (!true !== false){\n $ERROR('#3: !true === false');\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#4\nif (!true != false){\n $ERROR('#4: !true == false');\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S8.3_A3"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/8.4_The_String_Type.json b/website/resources/scripts/testcases2/8.4_The_String_Type.json
new file mode 100644
index 000000000..f46364eb1
--- /dev/null
+++ b/website/resources/scripts/testcases2/8.4_The_String_Type.json
@@ -0,0 +1,162 @@
+{
+ "testCollection": {
+ "name": "8.4_The_String_Type",
+ "numTests": 24,
+ "tests": [
+ {
+ "section": "8.4, 7.8.4",
+ "description": "Check type of variable that has been assigned with string literal",
+ "test": "/////////////////////////////////////////////////////////\n// CHECK#1\nvar str=\"abcdfg\";\nif (typeof(str)!==\"string\"){\n $ERROR('#1: var str=\"abcdfg\"; typeof(str) === \"string\". Actual: ' + (typeof(str)));\n}\n//\n////////////////////////////////////////////////////////\n\n/////////////////////////////////////////////////////////\n// CHECK#2\nvar str2='qwerty';\nif (typeof(str2)!==\"string\"){\n $ERROR('#2: var str2=\\'qwerty\\'; typeof(str) === \"string\". Actual: ' + (typeof(str2)));\n}\n//\n////////////////////////////////////////////////////////\n\n/////////////////////////////////////////////////////////\n// CHECK#3\nvar __str='\\u0042\\u0043\\u0044\\u0045\\u0046\\u0047\\u0048';\nif (typeof(__str)!==\"string\"){\n $ERROR('#3: var __str=\\'\\\\u0042\\\\u0043\\\\u0044\\\\u0045\\\\u0046\\\\u0047\\\\u0048\\'; typeof(__str) === \"string\". Actual: ' + (typeof(__str)));\n}\n//\n////////////////////////////////////////////////////////\n\n/////////////////////////////////////////////////////////\n// CHECK#4\nvar str__=\"\\u0042\\u0043\\u0044\\u0045\\u0046\\u0047\\u0048\";\nif (typeof(str__)!==\"string\"){\n $ERROR('#4: var str__=\"abcdfg\"; typeof(str__) === \"string\". Actual: ' + (typeof(str__)));\n}\n//\n////////////////////////////////////////////////////////\n",
+ "id": "S8.4_A1"
+ },
+ {
+ "section": "8.4, 7.8.4",
+ "description": "Create string using both unicode and ascii chars",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nvar __str = \"\\u0041A\\u0042B\\u0043C\";\nif (__str !== 'AABBCC'){\n $ERROR('#1: var __str = \"\\\\u0041A\\\\u0042B\\\\u0043C\"; __str === \\'AABBCC\\'. Actual: ' + (__str));\n};\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nvar __str__ = \"\\u0041\\u0042\\u0043\"+'ABC';\nif (__str__ !== 'ABCABC'){\n $ERROR('#2: var __str__ = \"\\\\u0041\\\\u0042\\\\u0043\"+\\'ABC\\'; __str__ === \\'ABCABC\\'. Actual: ' + (__str__));\n};\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#3\nvar str__ = \"ABC\"+'\\u0041\\u0042\\u0043';\nif (str__ !== \"ABCABC\"){\n $ERROR('#2: var str__ = \"ABC\"+\\'\\\\u0041\\\\u0042\\\\u0043\\'; str__ === \"ABCABC\". Actual: ' + (str__));\n};\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S8.4_A10"
+ },
+ {
+ "section": "8.4, 7.8.4",
+ "description": "Create string variable, thet include all reserved words",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nvar __delete=\" break else new var case finally return void catch for switch while continue function this with default if throw delete in try do instanceof typeof \";\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S8.4_A11"
+ },
+ {
+ "section": "8.4, 7.8.4",
+ "description": "Check constructor of simple assigned variable",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nvar str = \"rock'n'roll\";\nif (str.constructor !== String){\n $ERROR('#1: var str = \"rock\\'n\\'roll\"; str.constructor === String. Actual: ' + (str.constructor));\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S8.4_A12"
+ },
+ {
+ "section": "8.4",
+ "description": "Try to create variable using 3 single-quote",
+ "negative": "",
+ "test": "var str = ''';\n",
+ "id": "S8.4_A13_T1"
+ },
+ {
+ "section": "8.4",
+ "description": "Try to create variable using 1 single-quote",
+ "negative": "",
+ "test": "var str = ';\n",
+ "id": "S8.4_A13_T2"
+ },
+ {
+ "section": "8.4",
+ "description": "Try to create variable using 4 single-quote",
+ "negative": "",
+ "test": "var str = '''';\n",
+ "id": "S8.4_A13_T3"
+ },
+ {
+ "section": "8.4",
+ "description": "Try to create variable using 1 double-quote",
+ "negative": "",
+ "test": "var str = \";\n",
+ "id": "S8.4_A14_T1"
+ },
+ {
+ "section": "8.4",
+ "description": "Try to create variable using 3 double-quote",
+ "negative": "",
+ "test": "var str = \"\"\";\n",
+ "id": "S8.4_A14_T2"
+ },
+ {
+ "section": "8.4",
+ "description": "Try to create variable using 4 double-quote",
+ "negative": "",
+ "test": "var str = \"\"\"\";\n",
+ "id": "S8.4_A14_T3"
+ },
+ {
+ "section": "8.4, 7.8.4",
+ "description": "Create empty string and check it type",
+ "test": "/////////////////////////////////////////////////////////\n// CHECK#1\nvar str = '';\nif (typeof(str) !== 'string'){\n $ERROR('#1: var str = \\'\\'; typeof(str) === \\'string\\'. Actual: ' + (typeof(str)));\n}\n//\n////////////////////////////////////////////////////////\n\n/////////////////////////////////////////////////////////\n// CHECK#2\nvar str = \"\";\nif (typeof(str) !== \"string\"){\n $ERROR('#2: var str = \"\"; typeof(str) === \"string\". Actual: ' + (str));\n}\n//\n////////////////////////////////////////////////////////\n",
+ "id": "S8.4_A2"
+ },
+ {
+ "section": "8.4",
+ "description": "Try read length property of string variable",
+ "test": "var __str = \"ABCDEFGH\";\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__str.length !== 8) {\n $ERROR('#1: var __str = \"ABCDEFGH\"; __str.length === 8. Actual: ' + (__str.length));\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S8.4_A3"
+ },
+ {
+ "section": "8.4",
+ "description": "Try read length property of empty string variable",
+ "test": "var __str = \"\";\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__str.length !== 0) {\n $ERROR('#1: var __str = \"\"; __str.length === 0. Actual: ' + (__str));\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S8.4_A4"
+ },
+ {
+ "section": "8.4, 7.8.4",
+ "description": "Insert \"\\0\" into string",
+ "test": "// CHECK#1\nif (\"x\\0y\" === \"x\") {\n $ERROR('#1: \"x\\\\0y\" !== \"x\"');\n}\n\n// CHECK#2\nif (!((\"x\\0a\" < \"x\\0b\") && (\"x\\0b\" < \"x\\0c\"))) {\n $ERROR('#2: ((\"x\\\\0a\" < \"x\\\\0b\") && (\"x\\\\0b\" < \"x\\\\0c\")) === true');\n}\n",
+ "id": "S8.4_A5"
+ },
+ {
+ "section": "8.4, 7.8.4",
+ "description": "Assign variable by large string",
+ "test": "////////////////////////////////////////////////////\n// Check#1\nvar largeStr='Standard ECMA-2623r d Edition - December 1999S t a n d a r d i z i n g Informat i o n and Commu n i c a t i o n SystemsPhone: +41 22 849.60.00 - Fax: +41 22 849.60.01 - URL: ht tp: / /www.ecma.ch - Internet: helpdesk@ecma.chECMAScript LanguageSpecificationStandard ECMA-2623r d Edition - December 1999S t a n d a r d i z i n g Informat i o n and Commu n i c a t i o n SystemsPhone: +41 22 849.60.00 - Fax: +41 22 849.60.01 - URL: ht tp: / /www.ecma.ch - Internet: helpdesk@ecma.chMB Ecma-262.doc 08-04-02 16,53ECMAScript LanguageSpecificationBrief HistoryThis ECMA Standard is based on several originating technologies, the most well known being JavaScript (Netscape)and JScript (Microsoft). The language was invented by Brendan Eich at Netscape and first appeared in thatcompan Navigator 2.0 browser. It has appeared in all subsequent browsers from Netscape and in all browsers fromMicrosoft starting with Internet Explorer 3.0.The development of this Standard started in November 1996. The first edition of this ECMA Standard was adopted bythe ECMA General Assembly of June 1997.That ECMA Standard was submitted to ISO/IEC JTC 1 for adoption under the fast-track procedure, and approved asinternational standard ISO/IEC 16262, in April 1998. The ECMA General Assembly of June 1998 approved thesecond edition of ECMA-262 to keep it fully aligned with ISO/IEC 16262. Changes between the first and the secondedition are editorial in nature.The current document defines the third edition of the Standard and includes powerful regular expressions, betterstring handling, new control statements, try/catch exception handling, tighter definition of errors, formatting fornumeric output and minor changes in anticipation of forthcoming internationalisation facilities and future languagegrowth.Work on the language is not complete. The technical committee is working on significant enhancements, includingmechanisms for scripts to be created and used across the Internet, and tighter coordination with other standards bodiessuch as groups within the World Wide Web Consortium and the Wireless Application Protocol Forum.This Standard has been adopted as 3rd Edition of ECMA-262 by the ECMA General Assembly in December, 1999.- i -Table of contents1 Scope 12 Conformance 13 References 14 Overview 1 4.1 Web Scripting 2 4.2 Language Overview 2 4.2.1 Objects 3 4.3 Definitions 4 4.3.1 Type 4 4.3.2 Primitive Value 4 4.3.3 Object 4 4.3.4 Constructor 4 4.3.5 Prototype 4 4.3.6 Native Object 4 4.3.7 Built-in Object 4 4.3.8 Host Object 4 4.3.9 Undefined Value 4 4.3.10 Undefined Type 4 4.3.11 Null Value 4 4.3.12 Null Type 4 4.3.13 Boolean Value 4 4.3.14 Boolean Type 4 4.3.15 Boolean Object 5 4.3.16 String Value 5 4.3.17 String Type 5 4.3.18 String Object 5 4.3.19 Number Value 5 4.3.20 Number Type 5 4.3.21 Number Object 5 4.3.22 Infinity 5 4.3.23 NaN 5 5 Notational Conventions 6 5.1 Syntactic and Lexical Grammars 6 5.1.1 Context-Free Grammars 6 5.1.2 The Lexical and RegExp Grammars 6 5.1.3 The Numeric String Grammar 6 5.1.4 The Syntactic Grammar 6 5.1.5 Grammar Notation 7 5.2 Algorithm Conventions 9 6. Source Text 10 7 Lexical Conventions 11 7.1 Unicode Format-Control Characters 11 7.2 White Space 11 7.3 Line Terminators 12 7.4 Comments 12 - ii - 7.5 Tokens 13 7.5.1 Reserved Words 13 7.5.2 Keywords 13 7.5.3 Future Reserved Words 14 7.6 Identifiers 14 7.7 Punctuators 15 7.8 Literals 16 7.8.1 Null Literals 16 7.8.2 Boolean Literals 16 7.8.3 Numeric Literals 16 7.8.4 String Literals 18 7.8.5 Regular Expression Literals 20 7.9 Automatic Semicolon Insertion 21 7.9.1 Rules of Automatic Semicolon Insertion 21 7.9.2 Examples of Automatic Semicolon Insertion 22 8 Types 24 8.1 The Undefined Type 24 8.2 The Null Type 24 8.3 The Boolean Type 24 8.4 The String Type 24 8.5 The Number Type 24 8.6 The Object Type 25 8.6.1 Property Attributes 25 8.6.2 Internal Properties and Methods 26 8.7 The Reference Type 29 8.7.1 GetValue (V) 29 8.7.2 PutValue (V, W) 29 8.8 The List Type 30 8.9 The Completion Type 30 9 Type Conversion 30 9.1 ToPrimitive 30 9.2 ToBoolean 30 9.3 ToNumber 31 9.3.1 ToNumber Ap';\nif(largeStr !== 'Standard ECMA-2623r d Edition - December 1999S t a n d a r d i z i n g Informat i o n and Commu n i c a t i o n SystemsPhone: +41 22 849.60.00 - Fax: +41 22 849.60.01 - URL: ht tp: / /www.ecma.ch - Internet: helpdesk@ecma.chECMAScript LanguageSpecificationStandard ECMA-2623r d Edition - December 1999S t a n d a r d i z i n g Informat i o n and Commu n i c a t i o n SystemsPhone: +41 22 849.60.00 - Fax: +41 22 849.60.01 - URL: ht tp: / /www.ecma.ch - Internet: helpdesk@ecma.chMB Ecma-262.doc 08-04-02 16,53ECMAScript LanguageSpecificationBrief HistoryThis ECMA Standard is based on several originating technologies, the most well known being JavaScript (Netscape)and JScript (Microsoft). The language was invented by Brendan Eich at Netscape and first appeared in thatcompan Navigator 2.0 browser. It has appeared in all subsequent browsers from Netscape and in all browsers fromMicrosoft starting with Internet Explorer 3.0.The development of this Standard started in November 1996. The first edition of this ECMA Standard was adopted bythe ECMA General Assembly of June 1997.That ECMA Standard was submitted to ISO/IEC JTC 1 for adoption under the fast-track procedure, and approved asinternational standard ISO/IEC 16262, in April 1998. The ECMA General Assembly of June 1998 approved thesecond edition of ECMA-262 to keep it fully aligned with ISO/IEC 16262. Changes between the first and the secondedition are editorial in nature.The current document defines the third edition of the Standard and includes powerful regular expressions, betterstring handling, new control statements, try/catch exception handling, tighter definition of errors, formatting fornumeric output and minor changes in anticipation of forthcoming internationalisation facilities and future languagegrowth.Work on the language is not complete. The technical committee is working on significant enhancements, includingmechanisms for scripts to be created and used across the Internet, and tighter coordination with other standards bodiessuch as groups within the World Wide Web Consortium and the Wireless Application Protocol Forum.This Standard has been adopted as 3rd Edition of ECMA-262 by the ECMA General Assembly in December, 1999.- i -Table of contents1 Scope 12 Conformance 13 References 14 Overview 1 4.1 Web Scripting 2 4.2 Language Overview 2 4.2.1 Objects 3 4.3 Definitions 4 4.3.1 Type 4 4.3.2 Primitive Value 4 4.3.3 Object 4 4.3.4 Constructor 4 4.3.5 Prototype 4 4.3.6 Native Object 4 4.3.7 Built-in Object 4 4.3.8 Host Object 4 4.3.9 Undefined Value 4 4.3.10 Undefined Type 4 4.3.11 Null Value 4 4.3.12 Null Type 4 4.3.13 Boolean Value 4 4.3.14 Boolean Type 4 4.3.15 Boolean Object 5 4.3.16 String Value 5 4.3.17 String Type 5 4.3.18 String Object 5 4.3.19 Number Value 5 4.3.20 Number Type 5 4.3.21 Number Object 5 4.3.22 Infinity 5 4.3.23 NaN 5 5 Notational Conventions 6 5.1 Syntactic and Lexical Grammars 6 5.1.1 Context-Free Grammars 6 5.1.2 The Lexical and RegExp Grammars 6 5.1.3 The Numeric String Grammar 6 5.1.4 The Syntactic Grammar 6 5.1.5 Grammar Notation 7 5.2 Algorithm Conventions 9 6. Source Text 10 7 Lexical Conventions 11 7.1 Unicode Format-Control Characters 11 7.2 White Space 11 7.3 Line Terminators 12 7.4 Comments 12 - ii - 7.5 Tokens 13 7.5.1 Reserved Words 13 7.5.2 Keywords 13 7.5.3 Future Reserved Words 14 7.6 Identifiers 14 7.7 Punctuators 15 7.8 Literals 16 7.8.1 Null Literals 16 7.8.2 Boolean Literals 16 7.8.3 Numeric Literals 16 7.8.4 String Literals 18 7.8.5 Regular Expression Literals 20 7.9 Automatic Semicolon Insertion 21 7.9.1 Rules of Automatic Semicolon Insertion 21 7.9.2 Examples of Automatic Semicolon Insertion 22 8 Types 24 8.1 The Undefined Type 24 8.2 The Null Type 24 8.3 The Boolean Type 24 8.4 The String Type 24 8.5 The Number Type 24 8.6 The Object Type 25 8.6.1 Property Attributes 25 8.6.2 Internal Properties and Methods 26 8.7 The Reference Type 29 8.7.1 GetValue (V) 29 8.7.2 PutValue (V, W) 29 8.8 The List Type 30 8.9 The Completion Type 30 9 Type Conversion 30 9.1 ToPrimitive 30 9.2 ToBoolean 30 9.3 ToNumber 31 9.3.1 ToNumber Ap'){\n $ERROR('#1: Large string 4096 bytes');\n}\n//\n////////////////////////////////////////////////////\n",
+ "id": "S8.4_A6.1"
+ },
+ {
+ "section": "8.4, 7.8.4",
+ "description": "Assign variable by large string",
+ "test": "////////////////////////////////////////////////////\n// Check#2\nvar largeStr='Standard ECMA-2623r d Edition - December 1999S t a n d a r d i z i n g Informat i o n and Commu n i c a t i o n SystemsPhone: +41 22 849.60.00 - Fax: +41 22 849.60.01 - URL: ht tp: / /www.ecma.ch - Internet: helpdesk@ecma.chECMAScript LanguageSpecificationStandard ECMA-2623r d Edition - December 1999S t a n d a r d i z i n g Informat i o n and Commu n i c a t i o n SystemsPhone: +41 22 849.60.00 - Fax: +41 22 849.60.01 - URL: ht tp: / /www.ecma.ch - Internet: helpdesk@ecma.chMB Ecma-262.doc 08-04-02 16,53ECMAScript LanguageSpecificationBrief HistoryThis ECMA Standard is based on several originating technologies, the most well known being JavaScript (Netscape)and JScript (Microsoft). The language was invented by Brendan Eich at Netscape and first appeared in thatcompans Navigator 2.0 browser. It has appeared in all subsequent browsers from Netscape and in all browsers fromMicrosoft starting with Internet Explorer 3.0.The development of this Standard started in November 1996. The first edition of this ECMA Standard was adopted bythe ECMA General Assembly of June 1997.That ECMA Standard was submitted to ISO/IEC JTC 1 for adoption under the fast-track procedure, and approved asinternational standard ISO/IEC 16262, in April 1998. The ECMA General Assembly of June 1998 approved thesecond edition of ECMA-262 to keep it fully aligned with ISO/IEC 16262. Changes between the first and the secondedition are editorial in nature.The current document defines the third edition of the Standard and includes powerful regular expressions, betterstring handling, new control statements, try/catch exception handling, tighter definition of errors, formatting fornumeric output and minor changes in anticipation of forthcoming internationalisation facilities and future languagegrowth.Work on the language is not complete. The technical committee is working on significant enhancements, includingmechanisms for scripts to be created and used across the Internet, and tighter coordination with other standards bodiessuch as groups within the World Wide Web Consortium and the Wireless Application Protocol Forum.This Standard has been adopted as 3rd Edition of ECMA-262 by the ECMA General Assembly in December, 1999.- i -Table of contents1 Scope 12 Conformance 13 References 14 Overview 1 4.1 Web Scripting 2 4.2 Language Overview 2 4.2.1 Objects 3 4.3 Definitions 4 4.3.1 Type 4 4.3.2 Primitive Value 4 4.3.3 Object 4 4.3.4 Constructor 4 4.3.5 Prototype 4 4.3.6 Native Object 4 4.3.7 Built-in Object 4 4.3.8 Host Object 4 4.3.9 Undefined Value 4 4.3.10 Undefined Type 4 4.3.11 Null Value 4 4.3.12 Null Type 4 4.3.13 Boolean Value 4 4.3.14 Boolean Type 4 4.3.15 Boolean Object 5 4.3.16 String Value 5 4.3.17 String Type 5 4.3.18 String Object 5 4.3.19 Number Value 5 4.3.20 Number Type 5 4.3.21 Number Object 5 4.3.22 Infinity 5 4.3.23 NaN 5 5 Notational Conventions 6 5.1 Syntactic and Lexical Grammars 6 5.1.1 Context-Free Grammars 6 5.1.2 The Lexical and RegExp Grammars 6 5.1.3 The Numeric String Grammar 6 5.1.4 The Syntactic Grammar 6 5.1.5 Grammar Notation 7 5.2 Algorithm Conventions 9 6. Source Text 10 7 Lexical Conventions 11 7.1 Unicode Format-Control Characters 11 7.2 White Space 11 7.3 Line Terminators 12 7.4 Comments 12 - ii - 7.5 Tokens 13 7.5.1 Reserved Words 13 7.5.2 Keywords 13 7.5.3 Future Reserved Words 14 7.6 Identifiers 14 7.7 Punctuators 15 7.8 Literals 16 7.8.1 Null Literals 16 7.8.2 Boolean Literals 16 7.8.3 Numeric Literals 16 7.8.4 String Literals 18 7.8.5 Regular Expression Literals 20 7.9 Automatic Semicolon Insertion 21 7.9.1 Rules of Automatic Semicolon Insertion 21 7.9.2 Examples of Automatic Semicolon Insertion 22 8 Types 24 8.1 The Undefined Type 24 8.2 The Null Type 24 8.3 The Boolean Type 24 8.4 The String Type 24 8.5 The Number Type 24 8.6 The Object Type 25 8.6.1 Property Attributes 25 8.6.2 Internal Properties and Methods 26 8.7 The Reference Type 29 8.7.1 GetValue (V) 29 8.7.2 PutValue (V, W) 29 8.8 The List Type 30 8.9 The Completion Type 30 9 Type Conversion 30 9.1 ToPrimitive 30 9.2 ToBoolean 30 9.3 ToNumber 31 9.3.1 ToNumber Applied to the String Type 31 9.4 ToInteger 34 9.5 ToInt32: (Signed 32 Bit Integer) 34 9.6 ToUint32: (Unsigned 32 Bit Integer) 34 9.7 ToUint16: (Unsigned 16 Bit Integer) 35 9.8 ToString 35 9.8.1 ToString Applied to the Number Type 35 9.9 ToObject 36 10 Execution Contexts 37 10.1 Definitions 37 10.1.1 Function Objects 37 10.1.2 Types of Executable Code 37 10.1.3 Variable Instantiation 37 10.1.4 Scope Chain and Identifier Resolution 38 10.1.5 Global Object 38 10.1.6 Activation Object 38 - i i i - 10.1.7 This 39 10.1.8 Arguments Object 39 10.2 Entering An Execution Context 39 10.2.1 Global Code 39 10.2.2 Eval Code 39 10.2.3 Function Code 39 11 Expressions 40 11.1 Primary Expressions 40 11.1.1 The this Keyword 40 11.1.2 Identifier Reference 40 11.1.3 Literal Reference 40 11.1.4 Array Initialiser 40 11.1.5 Object Initialiser 41 11.1.6 The Grouping Operator 42 11.2 Left-Hand-Side Expressions 43 11.2.1 Property Accessors 43 11.2.2 The new Operator 44 11.2.3 Function Calls 44 11.2.4 Argument Lists 45 11.2.5 Function Expressions 45 11.3 Postfix Expressions 45 11.3.1 Postfix Increment Operator 45 11.3.2 Postfix Decrement Operator 45 11.4 Unary Operators 46 11.4.1 The delete Operator 46 11.4.2 The void Operator 46 11.4.3 The typeof Operator 46 11.4.4 Prefix Increment Operator 47 11.4.5 Prefix Decrement Operator 47 11.4.6 Unary + Operator 47 11.4.7 Unary - Operator 47 11.4.8 Bitwise NOT Operator ( ~) 48 11.4.9 Logical NOT Operator ( !) 48 11.5 Multiplicative Operators 48 11.5.1 Applying the * Operator 48 11.5.2 Applying the / Operator 49 11.5.3 Applying the % Operator 49 11.6 Additive Operators 50 11.6.1 The Addition operator ( +) 50 11.6.2 The Subtraction Operator ( -) 50 11.6.3 Applying the Additive Operators ( +,- ) to Numbers 51 11.7 Bitwise Shift Operators 51 11.7.1 The Left Shift Operator ( <<) 51 11.7.2 The Signed Right Shift Operator ( >>) 51 11.7.3 The Unsigned Right Shift Operator ( >>>) 52 11.4 Relational Operators 52 11.8.1 The Less-than Operator ( <) 53 11.8.2 The Greater-than Operator ( >) 53 11.8.3 The Less-than-or-equal Operator ( <=) 53 11.8.4 The Greater-than-or-equal Operator ( >=) 53 11.8.5 The Abstract Relational Comparison Algorithm 53 - iv - 11.8.6 The instanceof operator 54 11.8.7 The in operator 54 11.9 Equality Operators 54 11.9.1 The Equals Operator ( ==) 55 11.9.2 The Does-not-equals Operator ( !=) 55 11.9.3 The Abstract Equality Comparison Algorithm 55 11.9.4 The Strict Equals Operator ( ===) 56 11.9.5 The Strict Does-not-equal Operator ( !==) 56 11.9.6 The Strict Equality Comparison Algorithm 56 11.10 Binary Bitwise Operators 57 11.11 Binary Logical Operators 58 11.12 Conditional Operator ( ?: ) 58 11.13 Assignment Operators 59 11.13.1 Simple Assignment ( =) 59 11.13.2 Compound Assignment ( op=) 60 11.14 Comma Operator ( , ) 60 12 Statements 61 12.1 Block 61 12.2 Variable statement 62 12.3 Empty Statement 63 12.4 Expression Statement 63 12.5 The if Statement 63 12.6 Iteration Statements 64 12.6.1 The do-while Statement 64 12.6.2 The while statement 64 12.6.3 The for Statement 65 12.6.4 The for-in Statement 65 12.7 The continue Statement 66 12.8 The break Statement 67 12.9 The return Statement 67 12.10 The with Statement 67 12.11 The switch Statement 68 12.12 Labelled Statements 69 12.13 The throw statement 69 12.14 The try statement 70 13 Function Definition 71 13.1 Definitions 72 13.1.1 Equated Grammar Productions 72 13.1.2 Joined Objects 72 13.2 Creating Function Objects 72 13.2.1 [[Call]] 73 13.2.2 [[Construct]] 74 14 Program 75 15 Native ECMAScript Objects 76 15.1 The Global Object 76 15.1.1 Value Properties of the Global Object 77 15.1.2 Function Properties of the Global Object 77 15.1.3 URI Handling Function Properties 78 - v - 15.1.4 Constructor Properties of the Global Object 83 15.1.5 Other Properties of the Global Object 83 15.2 Object Objects 83 15.2.1 The Object Constructor Called as a Function 83 15.2.2 The Object Constructor 84 15.2.3 Properties of the Object Constructor 84 15.2.4 Properties of the Object Prototype Object 84 15.2.5 Properties of Object Instances 85 15.3 Function Objects 85 ';\nif(largeStr !== 'Standard ECMA-2623r d Edition - December 1999S t a n d a r d i z i n g Informat i o n and Commu n i c a t i o n SystemsPhone: +41 22 849.60.00 - Fax: +41 22 849.60.01 - URL: ht tp: / /www.ecma.ch - Internet: helpdesk@ecma.chECMAScript LanguageSpecificationStandard ECMA-2623r d Edition - December 1999S t a n d a r d i z i n g Informat i o n and Commu n i c a t i o n SystemsPhone: +41 22 849.60.00 - Fax: +41 22 849.60.01 - URL: ht tp: / /www.ecma.ch - Internet: helpdesk@ecma.chMB Ecma-262.doc 08-04-02 16,53ECMAScript LanguageSpecificationBrief HistoryThis ECMA Standard is based on several originating technologies, the most well known being JavaScript (Netscape)and JScript (Microsoft). The language was invented by Brendan Eich at Netscape and first appeared in thatcompans Navigator 2.0 browser. It has appeared in all subsequent browsers from Netscape and in all browsers fromMicrosoft starting with Internet Explorer 3.0.The development of this Standard started in November 1996. The first edition of this ECMA Standard was adopted bythe ECMA General Assembly of June 1997.That ECMA Standard was submitted to ISO/IEC JTC 1 for adoption under the fast-track procedure, and approved asinternational standard ISO/IEC 16262, in April 1998. The ECMA General Assembly of June 1998 approved thesecond edition of ECMA-262 to keep it fully aligned with ISO/IEC 16262. Changes between the first and the secondedition are editorial in nature.The current document defines the third edition of the Standard and includes powerful regular expressions, betterstring handling, new control statements, try/catch exception handling, tighter definition of errors, formatting fornumeric output and minor changes in anticipation of forthcoming internationalisation facilities and future languagegrowth.Work on the language is not complete. The technical committee is working on significant enhancements, includingmechanisms for scripts to be created and used across the Internet, and tighter coordination with other standards bodiessuch as groups within the World Wide Web Consortium and the Wireless Application Protocol Forum.This Standard has been adopted as 3rd Edition of ECMA-262 by the ECMA General Assembly in December, 1999.- i -Table of contents1 Scope 12 Conformance 13 References 14 Overview 1 4.1 Web Scripting 2 4.2 Language Overview 2 4.2.1 Objects 3 4.3 Definitions 4 4.3.1 Type 4 4.3.2 Primitive Value 4 4.3.3 Object 4 4.3.4 Constructor 4 4.3.5 Prototype 4 4.3.6 Native Object 4 4.3.7 Built-in Object 4 4.3.8 Host Object 4 4.3.9 Undefined Value 4 4.3.10 Undefined Type 4 4.3.11 Null Value 4 4.3.12 Null Type 4 4.3.13 Boolean Value 4 4.3.14 Boolean Type 4 4.3.15 Boolean Object 5 4.3.16 String Value 5 4.3.17 String Type 5 4.3.18 String Object 5 4.3.19 Number Value 5 4.3.20 Number Type 5 4.3.21 Number Object 5 4.3.22 Infinity 5 4.3.23 NaN 5 5 Notational Conventions 6 5.1 Syntactic and Lexical Grammars 6 5.1.1 Context-Free Grammars 6 5.1.2 The Lexical and RegExp Grammars 6 5.1.3 The Numeric String Grammar 6 5.1.4 The Syntactic Grammar 6 5.1.5 Grammar Notation 7 5.2 Algorithm Conventions 9 6. Source Text 10 7 Lexical Conventions 11 7.1 Unicode Format-Control Characters 11 7.2 White Space 11 7.3 Line Terminators 12 7.4 Comments 12 - ii - 7.5 Tokens 13 7.5.1 Reserved Words 13 7.5.2 Keywords 13 7.5.3 Future Reserved Words 14 7.6 Identifiers 14 7.7 Punctuators 15 7.8 Literals 16 7.8.1 Null Literals 16 7.8.2 Boolean Literals 16 7.8.3 Numeric Literals 16 7.8.4 String Literals 18 7.8.5 Regular Expression Literals 20 7.9 Automatic Semicolon Insertion 21 7.9.1 Rules of Automatic Semicolon Insertion 21 7.9.2 Examples of Automatic Semicolon Insertion 22 8 Types 24 8.1 The Undefined Type 24 8.2 The Null Type 24 8.3 The Boolean Type 24 8.4 The String Type 24 8.5 The Number Type 24 8.6 The Object Type 25 8.6.1 Property Attributes 25 8.6.2 Internal Properties and Methods 26 8.7 The Reference Type 29 8.7.1 GetValue (V) 29 8.7.2 PutValue (V, W) 29 8.8 The List Type 30 8.9 The Completion Type 30 9 Type Conversion 30 9.1 ToPrimitive 30 9.2 ToBoolean 30 9.3 ToNumber 31 9.3.1 ToNumber Applied to the String Type 31 9.4 ToInteger 34 9.5 ToInt32: (Signed 32 Bit Integer) 34 9.6 ToUint32: (Unsigned 32 Bit Integer) 34 9.7 ToUint16: (Unsigned 16 Bit Integer) 35 9.8 ToString 35 9.8.1 ToString Applied to the Number Type 35 9.9 ToObject 36 10 Execution Contexts 37 10.1 Definitions 37 10.1.1 Function Objects 37 10.1.2 Types of Executable Code 37 10.1.3 Variable Instantiation 37 10.1.4 Scope Chain and Identifier Resolution 38 10.1.5 Global Object 38 10.1.6 Activation Object 38 - i i i - 10.1.7 This 39 10.1.8 Arguments Object 39 10.2 Entering An Execution Context 39 10.2.1 Global Code 39 10.2.2 Eval Code 39 10.2.3 Function Code 39 11 Expressions 40 11.1 Primary Expressions 40 11.1.1 The this Keyword 40 11.1.2 Identifier Reference 40 11.1.3 Literal Reference 40 11.1.4 Array Initialiser 40 11.1.5 Object Initialiser 41 11.1.6 The Grouping Operator 42 11.2 Left-Hand-Side Expressions 43 11.2.1 Property Accessors 43 11.2.2 The new Operator 44 11.2.3 Function Calls 44 11.2.4 Argument Lists 45 11.2.5 Function Expressions 45 11.3 Postfix Expressions 45 11.3.1 Postfix Increment Operator 45 11.3.2 Postfix Decrement Operator 45 11.4 Unary Operators 46 11.4.1 The delete Operator 46 11.4.2 The void Operator 46 11.4.3 The typeof Operator 46 11.4.4 Prefix Increment Operator 47 11.4.5 Prefix Decrement Operator 47 11.4.6 Unary + Operator 47 11.4.7 Unary - Operator 47 11.4.8 Bitwise NOT Operator ( ~) 48 11.4.9 Logical NOT Operator ( !) 48 11.5 Multiplicative Operators 48 11.5.1 Applying the * Operator 48 11.5.2 Applying the / Operator 49 11.5.3 Applying the % Operator 49 11.6 Additive Operators 50 11.6.1 The Addition operator ( +) 50 11.6.2 The Subtraction Operator ( -) 50 11.6.3 Applying the Additive Operators ( +,- ) to Numbers 51 11.7 Bitwise Shift Operators 51 11.7.1 The Left Shift Operator ( <<) 51 11.7.2 The Signed Right Shift Operator ( >>) 51 11.7.3 The Unsigned Right Shift Operator ( >>>) 52 11.4 Relational Operators 52 11.8.1 The Less-than Operator ( <) 53 11.8.2 The Greater-than Operator ( >) 53 11.8.3 The Less-than-or-equal Operator ( <=) 53 11.8.4 The Greater-than-or-equal Operator ( >=) 53 11.8.5 The Abstract Relational Comparison Algorithm 53 - iv - 11.8.6 The instanceof operator 54 11.8.7 The in operator 54 11.9 Equality Operators 54 11.9.1 The Equals Operator ( ==) 55 11.9.2 The Does-not-equals Operator ( !=) 55 11.9.3 The Abstract Equality Comparison Algorithm 55 11.9.4 The Strict Equals Operator ( ===) 56 11.9.5 The Strict Does-not-equal Operator ( !==) 56 11.9.6 The Strict Equality Comparison Algorithm 56 11.10 Binary Bitwise Operators 57 11.11 Binary Logical Operators 58 11.12 Conditional Operator ( ?: ) 58 11.13 Assignment Operators 59 11.13.1 Simple Assignment ( =) 59 11.13.2 Compound Assignment ( op=) 60 11.14 Comma Operator ( , ) 60 12 Statements 61 12.1 Block 61 12.2 Variable statement 62 12.3 Empty Statement 63 12.4 Expression Statement 63 12.5 The if Statement 63 12.6 Iteration Statements 64 12.6.1 The do-while Statement 64 12.6.2 The while statement 64 12.6.3 The for Statement 65 12.6.4 The for-in Statement 65 12.7 The continue Statement 66 12.8 The break Statement 67 12.9 The return Statement 67 12.10 The with Statement 67 12.11 The switch Statement 68 12.12 Labelled Statements 69 12.13 The throw statement 69 12.14 The try statement 70 13 Function Definition 71 13.1 Definitions 72 13.1.1 Equated Grammar Productions 72 13.1.2 Joined Objects 72 13.2 Creating Function Objects 72 13.2.1 [[Call]] 73 13.2.2 [[Construct]] 74 14 Program 75 15 Native ECMAScript Objects 76 15.1 The Global Object 76 15.1.1 Value Properties of the Global Object 77 15.1.2 Function Properties of the Global Object 77 15.1.3 URI Handling Function Properties 78 - v - 15.1.4 Constructor Properties of the Global Object 83 15.1.5 Other Properties of the Global Object 83 15.2 Object Objects 83 15.2.1 The Object Constructor Called as a Function 83 15.2.2 The Object Constructor 84 15.2.3 Properties of the Object Constructor 84 15.2.4 Properties of the Object Prototype Object 84 15.2.5 Properties of Object Instances 85 15.3 Function Objects 85 '){\n $ERROR('#2: Large string 8192 bytes');\n}\n//\n////////////////////////////////////////////////////\n",
+ "id": "S8.4_A6.2"
+ },
+ {
+ "section": "8.4, 7.8.4",
+ "description": "Insert <LF> between chunks of one string",
+ "negative": "",
+ "test": "eval(\"var x = asdf\\u000Aghjk\");\n",
+ "id": "S8.4_A7.1"
+ },
+ {
+ "section": "8.4, 7.8.4",
+ "description": "Insert <CR> between chunks of one string",
+ "negative": "",
+ "test": "eval(\"var x = asdf\\u000Dghjk\");\n",
+ "id": "S8.4_A7.2"
+ },
+ {
+ "section": "8.4, 7.8.4",
+ "description": "Insert <PS> between chunks of one string",
+ "negative": "",
+ "test": "eval(\"var x = asdf\\u2028ghjk\");\n",
+ "id": "S8.4_A7.3"
+ },
+ {
+ "section": "8.4, 7.8.4",
+ "description": "Insert <LS> between chunks of one string",
+ "negative": "",
+ "test": "eval(\"var x = asdf\\u2029ghjk\");\n",
+ "id": "S8.4_A7.4"
+ },
+ {
+ "section": "8.4, 7.8.4",
+ "description": "Compare empty string with undefined, null, 0 and false",
+ "test": "var str='';\n\n////////////////////////////////////////////////////////////\n// CHECK#1\nif (str == undefined){\n $ERROR('#1: Empty string and undefined are not equal (!=) to each other');\n}\n//\n/////////////////////////////////////////////////////////////\n\n////////////////////////////////////////////////////////////\n// CHECK#2\nif (str == null){\n $ERROR('#1: Empty string and Null are not equal (!=) to each other');\n}\n//\n/////////////////////////////////////////////////////////////\n\n////////////////////////////////////////////////////////////\n// CHECK#3\nif (str != 0){\n $ERROR('#3: Empty string and 0 are equal (==) to each other, since they all evaluate to 0');\n}\n//\n/////////////////////////////////////////////////////////////\n\n////////////////////////////////////////////////////////////\n// CHECK#4\nif (str != false){\n $ERROR('#4: Empty string and false are equal (==) to each other, since they all evaluate to 0');\n}\n//\n/////////////////////////////////////////////////////////////\n",
+ "id": "S8.4_A8"
+ },
+ {
+ "section": "8.4, 7.8.4",
+ "description": "Simple string variable compare with object String",
+ "test": "var str='ABC';\nvar strObj=new String('ABC');\n\n////////////////////////////////////////////////////////////\n// CHECK#1\nif (str.constructor !== strObj.constructor){\n $ERROR('#1: \\'ABC\\'.constructor === new String(\\'ABC\\').constructor');\n}\n//\n/////////////////////////////////////////////////////////////\n\n////////////////////////////////////////////////////////////\n// CHECK#2\nif (str != strObj){\n $ERROR('#2: \"ABC\" == new String(\"ABC\")');\n}\n//\n/////////////////////////////////////////////////////////////\n\n////////////////////////////////////////////////////////////\n// CHECK#3\nif (str === strObj){\n $ERROR('#3: \"ABC\" !== new String(\"ABC\")');\n}\n//\n/////////////////////////////////////////////////////////////\n",
+ "id": "S8.4_A9_T1"
+ },
+ {
+ "section": "8.4, 7.8.4",
+ "description": "Compare empty string variable, object String('') and object String()",
+ "test": "var str=\"\";\nvar strObj=new String(\"\");\nvar strObj_=new String();\n\n////////////////////////////////////////////////////////////\n// CHECK#1\nif (str.constructor !== strObj.constructor){\n $ERROR('#1: \"\".constructor === new String(\"\").constructor');\n}\n//\n/////////////////////////////////////////////////////////////\n\n////////////////////////////////////////////////////////////\n// CHECK#2\nif (str.constructor !== strObj_.constructor){\n $ERROR('#2: \"\".constructor === new String().constructor');\n}\n//\n/////////////////////////////////////////////////////////////\n\n////////////////////////////////////////////////////////////\n// CHECK#3\nif (str != strObj){\n $ERROR('#3: values of str=\"\"; and strObj=new String(\"\"); are equal');\n}\n//\n/////////////////////////////////////////////////////////////\n\n////////////////////////////////////////////////////////////\n// CHECK#4\nif (str === strObj){\n $ERROR('#4: objects of str=\"\"; and strObj=new String(\"\"); are different');\n}\n//\n/////////////////////////////////////////////////////////////\n\n////////////////////////////////////////////////////////////\n// CHECK#5\nif (str != strObj_){\n $ERROR('#5: values of str=\"\"; and strObj=new String(); are equal');\n}\n//\n/////////////////////////////////////////////////////////////\n\n////////////////////////////////////////////////////////////\n// CHECK#6\nif (str === strObj_){\n $ERROR('#6: objects of str=\"\"; and strObj=new String(); are different');\n}\n//\n/////////////////////////////////////////////////////////////\n",
+ "id": "S8.4_A9_T2"
+ },
+ {
+ "section": "8.4, 7.8.4",
+ "description": "Simple empty string variable compare with empty object String",
+ "test": "var str=\"\";\nvar strObj=new String;\n\n////////////////////////////////////////////////////////////\n// CHECK#1\nif (str.constructor !== strObj.constructor){\n $ERROR('#1: \"\".constructor === new String.constructor');\n}\n//\n/////////////////////////////////////////////////////////////\n\n////////////////////////////////////////////////////////////\n// CHECK#2\nif (str != strObj){\n $ERROR('#2: values of str=\"\"; and strObj=new String(\"\"); are equal');\n}\n//\n/////////////////////////////////////////////////////////////\n\n////////////////////////////////////////////////////////////\n// CHECK#3\nif (str === strObj){\n $ERROR('#3: objects of str=\"\"; and strObj=new String(\"\"); are different');\n}\n//\n/////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#4\nif (typeof str == typeof strObj){\n $ERROR('#4: types of str=\"\"; and strObj=new String(\"\"); are different');\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n",
+ "id": "S8.4_A9_T3"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/8.5_The_Number_Type.json b/website/resources/scripts/testcases2/8.5_The_Number_Type.json
new file mode 100644
index 000000000..8d167782e
--- /dev/null
+++ b/website/resources/scripts/testcases2/8.5_The_Number_Type.json
@@ -0,0 +1,124 @@
+{
+ "testCollection": {
+ "name": "8.5_The_Number_Type",
+ "numTests": 19,
+ "tests": [
+ {
+ "section": "8.5, 7.8.3",
+ "description": "Compare NaN with NaN",
+ "test": "var x = Number.NaN;\nvar x_ = Number.NaN;\n\n///////////////////////////////////////////////////////\n// CHECK #1\nif (x === x_){\n $ERROR('#1: NaN !== NaN ');\n}\n//\n//////////////////////////////////////////////////////////\n",
+ "id": "S8.5_A1"
+ },
+ {
+ "section": "8.5, 7.8.3",
+ "description": "Create variable entitled Infinity",
+ "test": "var Infinity=1.0;\nInfinity='asdf';\nInfinity=true;\n",
+ "id": "S8.5_A10"
+ },
+ {
+ "section": "8.5, 7.8.3",
+ "description": "Check 1.0/p_zero !== 1.0/n_zero",
+ "test": "var p_zero=+0;\nvar n_zero=-0;\n\nif (1.0/p_zero === 1.0/n_zero){\n $ERROR('#1: var p_zero=+0; var n_zero=-0; 1.0/p_zero !== 1.0/n_zero');\n}\n",
+ "id": "S8.5_A11_T1"
+ },
+ {
+ "section": "8.5, 7.8.3",
+ "description": "Compare positive_zero and negative_zero",
+ "test": "var p_zero=+0;\nvar n_zero=-0;\n\n//CHECK #1\nif ((p_zero == n_zero) !== true){\n $ERROR('#1: var p_zero=+0; var n_zero=-0; p_zero != n_zero');\n}\n\n//CHECK #2\nif ((n_zero == 0) !== true){\n $ERROR('#2: var p_zero=+0; var n_zero=-0; n_zero == 0');\n}\n\n//CHECK #3\nif ((p_zero == -0) !== true){\n $ERROR('#3: var p_zero=+0; var n_zero=-0; p_zero == -0');\n}\n\n//CHECK #4\nif ((p_zero === 0) !== true){\n $ERROR('#4: var p_zero=+0; var n_zero=-0; p_zero === 0');\n}\n\n//CHECK #5\nif ((n_zero === -0) !== true){\n $ERROR('#5: var p_zero=+0; var n_zero=-0; n_zero === -0');\n}\n",
+ "id": "S8.5_A11_T2"
+ },
+ {
+ "section": "8.5, 7.8.3",
+ "description": "Compare Infinity and +Infinity with Number.POSITIVE_INFINITY",
+ "test": "var p_inf=+Infinity;\nvar inf=Infinity;\n\n//CHECK #1 \nif (p_inf!==Number.POSITIVE_INFINITY){\n $ERROR('#1: +Infinity is the same as Number.POSITIVE_INFINITY');\n}\n\n//CHECK #2 \nif (inf!==Number.POSITIVE_INFINITY){\n $ERROR('#2: Infinity is the same as Number.POSITIVE_INFINITY');\n}\n",
+ "id": "S8.5_A12.1"
+ },
+ {
+ "section": "8.5, 7.8.3",
+ "description": "Compare -Infinity with Number.NEGATIVE_INFINITY",
+ "test": "var n_inf=-Infinity;\n\n//CHECK #1 \nif (n_inf !== Number.NEGATIVE_INFINITY){\n $ERROR('#1: -Infinity is the same as Number.NEGATIVE_INFINITY');\n}\n",
+ "id": "S8.5_A12.2"
+ },
+ {
+ "section": "8.5, 7.8.3",
+ "description": "Finite Non zero values where e is -1074",
+ "test": "//CHECK #1 \nif ((1*((Math.pow(2,53))-1)*(Math.pow(2,-1074))) !== 4.4501477170144023e-308){\n $ERROR('#1: (1*((Math.pow(2,53))-1)*(Math.pow(2,-1074))) === 4.4501477170144023e-308. Actual: ' + ((1*((Math.pow(2,53))-1)*(Math.pow(2,-1074)))));\n}\n\n//CHECK #2 \nif ((1*(Math.pow(2,52))*(Math.pow(2,-1074))) !== 2.2250738585072014e-308){\n $ERROR('#2: (1*(Math.pow(2,52))*(Math.pow(2,-1074))) === 2.2250738585072014e-308. Actual: ' + ((1*(Math.pow(2,52))*(Math.pow(2,-1074)))));\n}\n\n//CHECK #3 \nif ((-1*(Math.pow(2,52))*(Math.pow(2,-1074))) !== -2.2250738585072014e-308){\n $ERROR('#3: (-1*(Math.pow(2,52))*(Math.pow(2,-1074))) === -2.2250738585072014e-308. Actual: ' + ((-1*(Math.pow(2,52))*(Math.pow(2,-1074)))));\n}\n",
+ "id": "S8.5_A13_T1"
+ },
+ {
+ "section": "8.5, 7.8.3",
+ "description": "Finite Non zero values where e is 971",
+ "test": "//CHECK #1 \nif ((1*(Math.pow(2,52))*(Math.pow(2,971))) !== 8.98846567431158e+307){\n $ERROR('#1: (1*(Math.pow(2,52))*(Math.pow(2,971))) === 8.98846567431158e+307. Actual: ' + ((1*(Math.pow(2,52))*(Math.pow(2,971)))));\n}\n\n//CHECK #2 \nif ((1*((Math.pow(2,53))-1)*(Math.pow(2,971))) !== 1.7976931348623157e+308){\n $ERROR('#2: (1*((Math.pow(2,53))-1)*(Math.pow(2,971))) === 1.7976931348623157e+308. Actual: ' + ((1*((Math.pow(2,53))-1)*(Math.pow(2,971)))));\n}\n\n//CHECK #3 \nif ((-1*(Math.pow(2,52))*(Math.pow(2,971))) !== -8.98846567431158e+307){\n $ERROR('#3: (-1*(Math.pow(2,52))*(Math.pow(2,971))) === -8.98846567431158e+307. Actual: ' + ((-1*(Math.pow(2,52))*(Math.pow(2,971)))));\n}\n",
+ "id": "S8.5_A13_T2"
+ },
+ {
+ "section": "8.5, 7.8.3",
+ "description": "Create number bigger of 2**1024",
+ "test": "//CHECK #1 \nif (1e+308*2 !== Infinity){\n $ERROR('#1: 1e+308*2 === Infinity. Actual: ' + (1e+308*2));\n}\n\n//CHECK #2 \nif ((1*(Math.pow(2,53))*(Math.pow(2,971))) !== Infinity){\n $ERROR('#2: (1*(Math.pow(2,53))*(Math.pow(2,971))) === Infinity. Actual: ' + ((1*(Math.pow(2,53))*(Math.pow(2,971)))));\n}\n",
+ "id": "S8.5_A14_T1"
+ },
+ {
+ "section": "8.5, 7.8.3",
+ "description": "Create number smaller of -2**1024",
+ "test": "//CHECK #1 \nif (-1e+308*3 !== -Infinity){\n $ERROR('#1: -1e+308*3 === Infinity. Actual: ' + (-1e+308*3));\n}\n\n//CHECK #2 \nif ((-1*(Math.pow(2,53))*(Math.pow(2,971))) !== -Infinity){\n $ERROR('#2: (-1*(Math.pow(2,53))*(Math.pow(2,971))) === Infinity. Actual: ' + ((-1*(Math.pow(2,53))*(Math.pow(2,971)))));\n}\n",
+ "id": "S8.5_A14_T2"
+ },
+ {
+ "section": "8.5, 7.8.3",
+ "description": "Use 2^53 + 2 number and do some operation with it",
+ "test": "var x = 9007199254740994.0; /* 2^53 + 2 */\nvar y = 1.0 - 1/65536.0;\nvar z = x + y;\nvar d = z - x;\n\nif (d !== 0){\n $ERROR('#1: var x = 9007199254740994.0; var y = 1.0 - 1/65536.0; var z = x + y; var d = z - x; d === 0. Actual: ' + (d));\n}\n",
+ "id": "S8.5_A2.1"
+ },
+ {
+ "section": "8.5, 7.8.3",
+ "description": "Use 2^53 + 2 number and do some operation with it",
+ "test": "var x = 9007199254740994.0; /* 2^53 + 2 */\nvar y = 1.0 - 1/65536.0;\nvar z = x + y;\nvar d = z - x;\n\nif (d === 2){\n $ERROR('#1: var x = 9007199254740994.0; var y = 1.0 - 1/65536.0; var z = x + y; var d = z - x; d !== 2');\n}\n",
+ "id": "S8.5_A2.2"
+ },
+ {
+ "section": "8.5, 7.8.3",
+ "description": "Check type of NaN",
+ "test": "var x=NaN;\n\n///////////////////////////////////////////////////////\n// CHECK#1\nif (typeof(x) !== \"number\"){\n $ERROR('#1: var x=NaN; typeof(x) === \"number\". Actual: ' + (typeof(x)));\n}\n//\n//////////////////////////////////////////////////////////\n\n///////////////////////////////////////////////////////\n// CHECK#2\nif (typeof(NaN) !== \"number\"){\n $ERROR('#2: typeof(NaN) === \"number\". Actual: ' + (typeof(NaN)));\n}\n//\n//////////////////////////////////////////////////////////\n",
+ "id": "S8.5_A3"
+ },
+ {
+ "section": "8.5, 7.8.3",
+ "description": "Create variable entitled NaN",
+ "test": "var NaN=1.0;\nNaN='asdf';\nNaN=true;\nNaN=Number.NaN;\n",
+ "id": "S8.5_A4"
+ },
+ {
+ "section": "8.5, 7.8.3",
+ "description": "Compare NaN with zero",
+ "test": "var x = NaN;\nvar x_geq_0=(x >= 0.0);\nvar x_leq_0=(x <= 0.0);\nvar x_leq_0_OR_geq_0=(x <= 0.0)||(x >= 0.0);\nvar x_geq_0_ADD_leq_0=(x >= 0.0) + (x <= 0.0);\n\n\n///////////////////////////////////////////////////\n// CHECK#1\nif (x_geq_0){\n $ERROR('#1: NaN not greater or equal zero');\n} else {\n $PRINT('#1: NaN not greater or equal zero');\n}\n//\n///////////////////////////////////////////////////\n\n///////////////////////////////////////////////////\n// CHECK#2\nif (x_leq_0){\n $ERROR('#2: NaN not less or equal zero');\n} else {\n $PRINT('#2: NaN not less or equal zero');\n}\n//\n///////////////////////////////////////////////////\n\n///////////////////////////////////////////////////\n// CHECK#3\nif (x_leq_0_OR_geq_0){\n $ERROR('#3: NaN not less or equal zero OR greater or equal zero');\n} else {\n $PRINT('#3: NaN not less or equal zero OR greater or equal zero');\n}\n//\n///////////////////////////////////////////////////\n\n///////////////////////////////////////////////////\n// CHECK#4\nif (x_geq_0_ADD_leq_0){\n $ERROR('#4: NaN not less or equal zero ADD greater or equal zero');\n} else {\n $PRINT('#4: NaN not less or equal zero ADD greater or equal zero');\n}\n//\n///////////////////////////////////////////////////\n",
+ "id": "S8.5_A5"
+ },
+ {
+ "section": "8.5, 7.8.3",
+ "description": "Check type of -Infinity",
+ "test": "var x=-Infinity;\n\n///////////////////////////////////////////////////////\n// CHECK#1\nif (typeof(x) !== \"number\"){\n $ERROR('#1: var x=-Infinity; typeof(x) === \"number\". Actual: ' + (typeof(x)));\n}\n//\n//////////////////////////////////////////////////////////\n\n///////////////////////////////////////////////////////\n// CHECK#2\nif (typeof(-Infinity) !== \"number\"){\n $ERROR('#2: typeof(-Infinity) === \"number\". Actual: ' + (typeof(-Infinity)));\n}\n//\n//////////////////////////////////////////////////////////\n",
+ "id": "S8.5_A6"
+ },
+ {
+ "section": "8.5, 7.8.3",
+ "description": "Check type of +Infinity",
+ "test": "var x=+Infinity;\n\n///////////////////////////////////////////////////////\n// CHECK#1\nif (typeof(x) !== \"number\"){\n $ERROR('#1: var x=+Infinity; typeof(x) === \"number\". Actual: ' + (typeof(x)));\n}\n//\n//////////////////////////////////////////////////////////\n\n///////////////////////////////////////////////////////\n// CHECK#2\nif (typeof(+Infinity) !== \"number\"){\n $ERROR('#2: typeof(+Infinity) === \"number\". Actual: ' + (typeof(+Infinity)));\n}\n//\n//////////////////////////////////////////////////////////\n",
+ "id": "S8.5_A7"
+ },
+ {
+ "section": "8.5, 7.8.3",
+ "description": "Compare Infinity and +Infinity",
+ "test": "var p_inf=+Infinity;\nvar inf=Infinity;\n\n///////////////////////////////////////////////////////\n// \nif (p_inf!==inf){\n $ERROR('#1: Infinity is the same as +Infinity');\n}\n//\n//////////////////////////////////////////////////////////\n",
+ "id": "S8.5_A8"
+ },
+ {
+ "section": "8.5, 7.8.3",
+ "description": "Try alter globally defined variable NaN",
+ "strict_mode_negative": "",
+ "test": "Number.NaN = 1;\n\nif (Number.NaN === 1) {\n $ERROR('#1: Globally defined variable NaN has not been altered by program execution');\n}\n",
+ "id": "S8.5_A9",
+ "strict_only": ""
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/8.6.1_Property_Attributes.json b/website/resources/scripts/testcases2/8.6.1_Property_Attributes.json
new file mode 100644
index 000000000..0a78a199f
--- /dev/null
+++ b/website/resources/scripts/testcases2/8.6.1_Property_Attributes.json
@@ -0,0 +1,30 @@
+{
+ "testCollection": {
+ "name": "8.6.1_Property_Attributes",
+ "numTests": 3,
+ "tests": [
+ {
+ "section": "8.6.1, 15.2.2, 15.8",
+ "description": "Try change Math.E property",
+ "strict_mode_negative": "",
+ "test": "var __e = Math.E;\nMath.E=1;\nif (Math.E !==__e){\n $ERROR('#1: __e = Math.E; Math.E=1; Math.E ===__e');\n}\n",
+ "id": "S8.6.1_A1",
+ "strict_only": ""
+ },
+ {
+ "section": "8.6.1, 12.6.4, 15.7",
+ "description": "Try to enumerate properties of Number",
+ "test": "//CHECK#1\nvar count=0;\nfor (p in Number) count++;\nif (count > 0){\n $ERROR('#1: count=0; for (p in Number) count++; count > 0. Actual: ' + (count));\n}\n",
+ "id": "S8.6.1_A2"
+ },
+ {
+ "section": "8.6.1, 15.7",
+ "description": "Try to delete Number.NaN",
+ "strict_mode_negative": "",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (delete Number.NaN !== false){\n $ERROR('#1: delete Number.NaN === false. Actual: ' + (delete Number.NaN));\n};\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (typeof(Number.NaN) === \"undefined\"){\n $ERROR('#2: delete Number.NaN; typeof(Number.NaN) !== \"undefined\" ');\n};\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S8.6.1_A3",
+ "strict_only": ""
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/8.6.2_Internal_Properties_and_Methods.json b/website/resources/scripts/testcases2/8.6.2_Internal_Properties_and_Methods.json
new file mode 100644
index 000000000..c4a9f66f8
--- /dev/null
+++ b/website/resources/scripts/testcases2/8.6.2_Internal_Properties_and_Methods.json
@@ -0,0 +1,183 @@
+{
+ "testCollection": {
+ "name": "8.6.2_Internal_Properties_and_Methods",
+ "numTests": 28,
+ "tests": [
+ {
+ "section": "8.6.2.1",
+ "description": "Try to get P when property P does not exist in instance but prototype contain it",
+ "test": "//Establish foo object \nfunction FooObj(){}; FooObj.prototype.propFoo=\"some\";\n\n// Invoke instance of foo object\nvar __obj= new FooObj;\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__obj.propFoo !== \"some\"){\n $ERROR('#1: function FooObj(){}; FooObj.prototype.propFoo=\"some\"; var __obj= new FooObj; __obj.propFoo === \"some\". Actual: ' + (__obj.propFoo));\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (__obj['propFoo'] !== \"some\"){\n $ERROR('#1: function FooObj(){}; FooObj.prototype.propFoo=\"some\"; var __obj= new FooObj; __obj[\\'propFoo\\'] === \"some\". Actual: ' + (__obj['propFoo']));\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S8.6.2.1_A1"
+ },
+ {
+ "section": "8.6.2.1",
+ "description": "Try to get P when property P does not exist both in instance and prototype",
+ "test": "var __obj={};\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__obj.propFoo !== undefined){\n $ERROR('#1: var __obj={}; __obj.propFoo === undefined. Actual: ' + (__obj.propFoo));\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (__obj['propFoo'] !== undefined){\n $ERROR('#2: var __obj={}; __obj[\\'propFoo\\'] === undefined. Actual: ' + (__obj['propFoo']));\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S8.6.2.1_A2"
+ },
+ {
+ "section": "8.6.2.1",
+ "description": "Try to get P property P exist in instance",
+ "test": "var __map={shape:\"cube\", 5:\"five\", \"6\":\"six\"};\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__map.shape !== \"cube\"){\n $ERROR('#1: var __map={shape:\"cube\", 5:\"five\", \"6\":\"six\"}; __map.shape === \"cube\". Actual: ' + (__map.shape));\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (__map[\"shape\"] !== \"cube\"){\n $ERROR('#2: var __map={shape:\"cube\", 5:\"five\", \"6\":\"six\"}; __map[\"shape\"] === \"cube\". Actual: ' + (__map[\"shape\"]));\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#3\nif (__map[\"5\"] !== \"five\"){\n $ERROR('#3: var __map={shape:\"cube\", 5:\"five\", \"6\":\"six\"}; __map[\"5\"] === \"five\". Actual: ' + (__map[\"5\"]));\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#4\nif (__map[5] !== \"five\"){\n $ERROR('#4: var __map={shape:\"cube\", 5:\"five\", \"6\":\"six\"}; __map[5] === \"five\". Actual: ' + (__map[5]));\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#5\nif (__map[\"6\"] !== \"six\"){\n $ERROR('#5: var __map={shape:\"cube\", 5:\"five\", \"6\":\"six\"}; __map[\"6\"] === \"six\". Actual: ' + (__map[\"6\"]));\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#6\nif (__map[6] !== \"six\"){\n $ERROR('#6: var __map={shape:\"cube\", 5:\"five\", \"6\":\"six\"}; __map[6] === \"six\". Actual: ' + (__map[6]));\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S8.6.2.1_A3"
+ },
+ {
+ "section": "8.6.2.2",
+ "description": "Put to not existent properties",
+ "test": "var __map={}; __map[1]=\"one\"; __map[\"two\"]=2; __map[\"3\"]=\"tre\";\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__map[1] !== \"one\") {\n\t$ERROR('#1: var __map={}; __map[1]=\"one\"; __map[\"two\"]=2; __map[\"3\"]=\"tre\"; __map[1] === \"one\". Actual: ' + (__map[1]));\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (__map[\"two\"] !== 2) {\n\t$ERROR('#2: var __map={}; __map[1]=\"one\"; __map[\"two\"]=2; __map[\"3\"]=\"tre\"; __map[\"two\"] === 2. Actual: ' + (__map[\"two\"]));\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#3\nif (__map[\"3\"] !== \"tre\") {\n\t$ERROR('#3: var __map={}; __map[1]=\"one\"; __map[\"two\"]=2; __map[\"3\"]=\"tre\"; __map[\"3\"] === \"tre\". Actual: ' + (__map[\"3\"]));\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S8.6.2.2_A1"
+ },
+ {
+ "section": "8.6.2.2",
+ "description": "Put to existent properties",
+ "test": "var _map={1:\"one\",two:2};\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\n_map[1]=\"uno\";\nif (_map[1] !== \"uno\") {\n $ERROR('#1: var _map={1:\"one\",two:2}; _map[1]=\"uno\"; _map[1] === \"uno\". Actual: ' + (_map[1]));\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\n_map[\"1\"]=1;\nif (_map[1] !== 1) {\n $ERROR('#2: var _map={1:\"one\",two:2}; _map[1]=\"uno\"; _map[\"1\"]=1; _map[1] === 1. Actual: ' + (_map[1]));\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#3\n_map[\"two\"]=\"two\";\nif (_map[\"two\"] !== \"two\") {\n $ERROR('#3: var _map={1:\"one\",two:2}; _map[1]=\"uno\"; _map[\"1\"]=1; _map[\"two\"]=\"two\"; _map[\"two\"] === \"two\". Actual: ' + (_map[\"two\"]));\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#4\n_map.two=\"duo\";\nif (_map.two !== \"duo\") {\n $ERROR('#4: var _map={1:\"one\",two:2}; _map[1]=\"uno\"; _map[\"1\"]=1; _map[\"two\"]=\"two\"; _map.two=\"duo\"; _map.two === \"duo\". Actual: ' + (_map.two));\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S8.6.2.2_A2"
+ },
+ {
+ "section": "8.6.2.3, 8.6.2.2, 8.6.1",
+ "description": "Try put other value for Math.E property",
+ "strict_mode_negative": "",
+ "test": "var __e = Math.E;\nMath.E = 1;\nif (Math.E !== __e){\n $ERROR('#1: __e = Math.E; Math.E = 1; Math.E === __e. Actual: ' + (Math.E));\n}\n",
+ "id": "S8.6.2.3_A1",
+ "strict_only": ""
+ },
+ {
+ "section": "8.6.2.4, 12.6.4",
+ "description": "Try find existent property of any Object",
+ "test": "var __obj={fooProp:\"fooooooo\"};\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (!(\"fooProp\" in __obj)) {\n $ERROR('#1: var __obj={fooProp:\"fooooooo\"}; \"fooProp\" in __obj');\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S8.6.2.4_A1"
+ },
+ {
+ "section": "8.6.2.4, 12.6.4",
+ "description": "Try find not existent property of any Object",
+ "test": "var __obj={};\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (!(\"valueOf\" in __obj)) {\n $ERROR('#1: var __obj={}; \"valueOf\" in __obj');\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S8.6.2.4_A2_T1"
+ },
+ {
+ "section": "8.6.2.4, 12.6.4",
+ "description": "Try find not existent property of any Object, but existent property of this Object prototype",
+ "test": "var __proto={phylum:\"avis\"};\n\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (!(\"valueOf\" in __proto)) {\n $ERROR('#1: var __proto={phylum:\"avis\"}; \"valueOf\" in __proto');\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\nfunction Robin(){this.name=\"robin\"};\nRobin.prototype=__proto;\n\nvar __my__robin = new Robin;\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (!(\"phylum\" in __my__robin)) {\n $ERROR('#2: var __proto={phylum:\"avis\"}; function Robin(){this.name=\"robin\"}; Robin.prototype=__proto; var __my__robin = new Robin; \"phylum\" in __my__robin');\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#3\nif (__my__robin.hasOwnProperty(\"phylum\")) {\n $ERROR('#3: var __proto={phylum:\"avis\"}; function Robin(){this.name=\"robin\"}; Robin.prototype=__proto; var __my__robin = new Robin; __my__robin.hasOwnProperty(\"phylum\") === false. Actual: ' + (__my__robin.hasOwnProperty(\"phylum\")));\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S8.6.2.4_A2_T2"
+ },
+ {
+ "section": "8.6.2.4, 12.6.4",
+ "description": "Use [[hasProperty]] and [[Get]] for existent and not existent properties",
+ "test": "var __obj={}; __obj.hole=undefined;\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__obj.hole !== undefined) {\n $ERROR('#1: var __obj={}; __obj.hole=undefined; __obj.hole === undefined. Actual: ' + (__obj.hole));\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (__obj.notexist !== undefined) {\n $ERROR('#2: var __obj={}; __obj.hole=undefined; __obj.notexist === undefined. Actual: ' + (__obj.notexist));\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#3\nif (!(\"hole\" in __obj)) {\n $ERROR('#3: var __obj={}; __obj.hole=undefined; \"hole\" in __obj');\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#4\nif ((\"notexist\" in __obj)) {\n $ERROR('#4: var __obj={}; __obj.hole=undefined; \"notexist\" in __obj');\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S8.6.2.4_A3"
+ },
+ {
+ "section": "8.6.2.5, 15.8, 11.4.1",
+ "description": "Try to delete Math.E, that has the DontDelete attribute",
+ "strict_mode_negative": "",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (delete Math.E !== false){\n $ERROR('#1: delete Math.E === false. Actual: ' + (delete Math.E));\n};\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (Math.E === undefined){\n $ERROR('#2: delete Math.E; Math.E !== undefined');\n};\n//\n//////////////////////////////////////////////////////////////////////////////\n\n",
+ "id": "S8.6.2.5_A1",
+ "strict_only": ""
+ },
+ {
+ "section": "8.6.2.5, 11.4.1",
+ "description": "Try to delete not existent properties",
+ "test": "var __color__map = {};\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (delete __color__map.red !== true){\n $ERROR('#1: var __color__map = {}; delete __color__map.red === true. Actual: ' + (delete __color__map.red));\n};\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (delete __color__map[\"green\"] !== true){\n $ERROR('#2: var __color__map = {}; delete __color__map[\"green\"] === true. Actual: ' + (delete __color__map[\"green\"]));\n};\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#3\nvar blue = 1;\nif (delete __color__map[blue] !== true){\n $ERROR('#3: var __color__map = {}; var blue = 1; delete __color__map[blue] === true. Actual: ' + (delete __color__map[blue]));\n};\n//\n//////////////////////////////////////////////////////////////////////////////\n\n",
+ "id": "S8.6.2.5_A2_T1"
+ },
+ {
+ "section": "8.6.2.5, 11.4.1",
+ "description": "Try to delete not existent properties of O, but existent property of prototype",
+ "test": "function Palette(){};\nPalette.prototype = {red:0xFF0000, green:0x00FF00};\nvar __palette = new Palette;\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__palette.red !== 0xFF0000){\n $ERROR('#1: function Palette(){}; Palette.prototype = {red:0xFF0000, green:0x00FF00}; __palette = new Palette; __palette.red === 0xFF0000. Actual: ' + (__palette.red));\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (delete __palette.red !== true) {\n $ERROR('#2 function Palette(){}; Palette.prototype = {red:0xFF0000, green:0x00FF00}; __palette = new Palette; delete __palette.red === true. Actual: ' + (delete __palette.red));\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#3\nif (__palette.red !== 0xFF0000){\n $ERROR('#3: function Palette(){}; Palette.prototype = {red:0xFF0000, green:0x00FF00}; __palette = new Palette; __palette.red === 0xFF0000. Actual: ' + (__palette.red));\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n",
+ "id": "S8.6.2.5_A2_T2"
+ },
+ {
+ "section": "8.6.2.5, 11.4.1",
+ "description": "Delete existent properties",
+ "test": "var BLUE_NUM=1;\nvar BLUE_STR=\"1\";\nvar YELLOW_NUM=2;\nvar YELLOW_STR=\"2\";\nvar __color__map = {red:0xFF0000, BLUE_NUM:0x0000FF, green:0x00FF00, YELLOW_STR:0xFFFF00};\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (delete __color__map[YELLOW_NUM] !== true){\n $ERROR('#1: var BLUE_NUM=1; var BLUE_STR=\"1\"; var YELLOW_NUM=2; var YELLOW_STR=\"2\"; var __color__map = {red:0xFF0000, BLUE_NUM:0x0000FF, green:0x00FF00, YELLOW_STR:0xFFFF00}; delete __color__map[YELLOW_NUM] === true;');\n};\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (__color__map[YELLOW_STR] !== undefined) {\n $ERROR('#2: var BLUE_NUM=1; var BLUE_STR=\"1\"; var YELLOW_NUM=2; var YELLOW_STR=\"2\"; var __color__map = {red:0xFF0000, BLUE_NUM:0x0000FF, green:0x00FF00, YELLOW_STR:0xFFFF00}; delete __color__map[YELLOW_NUM]; __color__map[YELLOW_STR] === undefined. Actual: ' + (__color__map[YELLOW_STR]));\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#3\nif (delete __color__map[BLUE_STR] !== true){\n $ERROR('#3: var BLUE_NUM=1; var BLUE_STR=\"1\"; var YELLOW_NUM=2; var YELLOW_STR=\"2\"; var __color__map = {red:0xFF0000, BLUE_NUM:0x0000FF, green:0x00FF00, YELLOW_STR:0xFFFF00}; delete __color__map[BLUE_STR] === true. Actual: ' + (delete __color__map[BLUE_STR]));\n};\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#4\nif (__color__map[BLUE_NUM] !== undefined) {\n $ERROR('#4: var BLUE_NUM=1; var BLUE_STR=\"1\"; var YELLOW_NUM=2; var YELLOW_STR=\"2\"; var __color__map = {red:0xFF0000, BLUE_NUM:0x0000FF, green:0x00FF00, YELLOW_STR:0xFFFF00}; delete __color__map[BLUE_STR]; __color__map[BLUE_NUM] === undefined. Actual: ' + (__color__map[BLUE_NUM]));\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S8.6.2.5_A3"
+ },
+ {
+ "section": "8.6.2.6, 8.6.2, 9.8, 11.8.6",
+ "description": "Try to overload toString method",
+ "test": "try\n{\n\tvar __obj = {toString: function() {return new Object();}} \n\tString(__obj);\n\t$ERROR('#1.1: var __obj = {toString: function() {return new Object();}}; String(__obj) throw TypeError. Actual: ' + (String(__obj)));\n}\ncatch(e)\n{\n\tif ((e instanceof TypeError) !== true) {\n\t $ERROR('#1.2: var __obj = {toString: function() {return new Object();}}; String(__obj) throw TypeError. Actual: ' + (e));\n\t} \n} \n\n",
+ "id": "S8.6.2.6_A1"
+ },
+ {
+ "section": "8.6.2.6, 8.6.2, 9.8",
+ "description": "Try to overload toString, that returned new Object, and valueOf methods",
+ "test": "try\n{\n\tvar __obj = {toString: function() {return new Object();}, valueOf: function() {return 1;}}\n\tif (String(__obj) !== \"1\") {\n\t $ERROR('#1.1: var __obj = {toString: function() {return new Object();}, valueOf: function() {return 1;}}; String(__obj) === \"1\". Actual: ' + (String(__obj)));\n\t}\n}\ncatch(e)\n{\n $ERROR('#1.2: var __obj = {toString: function() {return new Object();}, valueOf: function() {return 1;}}; String(__obj) === \"1\". Actual: ' + (e));\n} \n\n",
+ "id": "S8.6.2.6_A2"
+ },
+ {
+ "section": "8.6.2.6, 8.6.2",
+ "description": "Try to overload toString method, that returned Primitive, and valueOf method, that returned new Object",
+ "test": "try\n{\n var __obj = {toString: function() {return \"1\"}, valueOf: function() {return new Object();}}\n if (Number(__obj) !== 1) {\n $ERROR('#1.1: var __obj = {toNumber: function() {return \"1\"}, valueOf: function() {return new Object();}}; Number(__obj) === 1. Actual: ' + (Number(__obj)));\n }\n}\ncatch(e)\n{\n $ERROR('#1.2: var __obj = {toNumber: function() {return \"1\"}, valueOf: function() {return new Object();}}; Number(__obj) === 1. Actual: ' + (e));\n} \n\n\n\n \n\n",
+ "id": "S8.6.2.6_A3"
+ },
+ {
+ "section": "8.6.2.6, 8.6.2",
+ "description": "Try to overload toString and valueOf methods, they returned new Objects",
+ "test": "try\n{\n var __obj = {valueOf:function(){return new Object;},toString: function() {return new Object();}} \n Number(__obj);\n $ERROR('#1.1: var __obj = {valueOf:function(){return new Object;},toNumber: function() {return new Object();}}; Number(__obj) throw TypeError. Actual: ' + (Number(__obj)));\n}\ncatch(e)\n{\n if ((e instanceof TypeError) !== true) {\n $ERROR('#1.2: var __obj = {valueOf:function(){return new Object;},toNumber: function() {return new Object();}}; Number(__obj) throw TypeError. Actual: ' + (e));\n } \n} \n",
+ "id": "S8.6.2.6_A4"
+ },
+ {
+ "section": "8.6.2, 15.2.4",
+ "description": "Check [[Prototype]] property of object",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nvar __obj={};\nif (!Object.prototype.isPrototypeOf(__obj)){\n $ERROR('#1: Native ECMAScript objects have an internal property called [[Prototype]]. ');\n};\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//Establish proto (base) object\n/*function ProtoObj(){\n \n};*/\nvar protoObj={};\n//Establish foo object\nfunction FooObj(){};\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\n// Invoke instance of foo object\nvar obj__= new FooObj;\n\nif (!Object.prototype.isPrototypeOf(obj__)){\n $ERROR('#2.1: protoObj={}; function FooObj(){}; var obj__= new FooObj; Object.prototype.isPrototypeOf(obj__) === true. Actual: ' + (Object.prototype.isPrototypeOf(obj__)));\n};\n\nif (!FooObj.prototype.isPrototypeOf(obj__)){\n $ERROR('#2.2: protoObj={}; function FooObj(){}; var obj__= new FooObj; FooObj.prototype.isPrototypeOf(obj__) === true. Actual: ' + (FooObj.prototype.isPrototypeOf(obj__)));\n};\n\nif (protoObj.isPrototypeOf(obj__)){\n $ERROR('#2.3: protoObj={}; function FooObj(){}; var obj__= new FooObj; protoObj.isPrototypeOf(obj__) === false. Actual: ' + (protoObj.isPrototypeOf(obj__)));\n};\n// Establish inheritance from proto object\nFooObj.prototype=protoObj;\n\nif (protoObj.isPrototypeOf(obj__)){\n $ERROR('#2.4: protoObj={}; function FooObj(){}; var obj__= new FooObj; FooObj.prototype=protoObj; protoObj.isPrototypeOf(obj__) === false. Actual: ' + (protoObj.isPrototypeOf(obj__)));\n};\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#3\n\n// Invoke instance of foo object\nvar __foo=new FooObj;\n\nif (!Object.prototype.isPrototypeOf(__foo)){\n $ERROR('#3.1: protoObj={}; function FooObj(){}; var obj__= new FooObj; FooObj.prototype=protoObj; var __foo=new FooObj; Object.prototype.isPrototypeOf(__foo) === true. Actual: ' + (Object.prototype.isPrototypeOf(__foo)));\n};\n\nif (!FooObj.prototype.isPrototypeOf(__foo)){\n $ERROR('#3.2: protoObj={}; function FooObj(){}; var obj__= new FooObj; FooObj.prototype=protoObj; var __foo=new FooObj; FooObj.prototype.isPrototypeOf(__foo) === true. Actual: ' + (FooObj.prototype.isPrototypeOf(__foo)));\n};\n\nif (!protoObj.isPrototypeOf(__foo)){\n $ERROR('#3.3: protoObj={}; function FooObj(){}; var obj__= new FooObj; FooObj.prototype=protoObj; var __foo=new FooObj; protoObj.isPrototypeOf(__foo) === true. Actual: ' + (protoObj.isPrototypeOf(__foo)));\n};\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S8.6.2_A1"
+ },
+ {
+ "section": "8.6.2, 15.2.4",
+ "description": "Check visibility properties of the child object for the purposes of get access, but not for put access",
+ "strict_mode_negative": "",
+ "test": "//Establish foo object \nfunction FooObj(){};\nFooObj.prototype.prop=\"some\";\n\n// Invoke instance of foo object\nvar foo= new FooObj;\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (foo.prop !== \"some\"){\n $ERROR('#1: function FooObj(){}; FooObj.prototype.prop=\"some\"; var foo= new FooObj; foo.prop === \"some\". Actual: ' + (foo.prop));\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nfoo.prop=true;\n// Invoke another instance of foo object\nvar foo__ = new FooObj;\nif (foo__.prop !== \"some\"){\n $ERROR('#2: function FooObj(){}; FooObj.prototype.prop=\"some\"; var foo= new FooObj; foo.prop=true; var foo__ = new FooObj; foo__.prop === \"some\". Actual: ' + (foo__.prop));\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S8.6.2_A2",
+ "strict_only": ""
+ },
+ {
+ "section": "8.6.2, 15.2.4.2",
+ "description": "Get [[class]] value except through Object.prototype.toString",
+ "test": "var __obj={};\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__obj.toString() !== \"[object \" + 'Object' + \"]\"){\n $ERROR('#1: var __obj={}; __obj.toString() === \"[object \" + \\'Object\\' + \"]\". Actual: ' + (__obj.toString()));\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S8.6.2_A3"
+ },
+ {
+ "section": "8.6.2, 11.8.6",
+ "description": "Check that the obj instance of Object, but not instance\n of Function, String, Number, Array",
+ "test": "var __obj={};\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (!(__obj instanceof Object)) {\n $ERROR('#1: var __obj={}; (__obj instanceof Object) === true. Actual: ' + ((__obj instanceof Object)));\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (__obj instanceof Function) {\n $ERROR('#2: var __obj={}; (__obj instanceof Function) === false. Actual: ' + ((__obj instanceof Function)));\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#3\nif (__obj instanceof String) {\n $ERROR('#3: var __obj={}; (__obj instanceof String) === false. Actual: ' + ((__obj instanceof String)));\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#4\nif (__obj instanceof Number) {\n $ERROR('#4: var __obj={}; (__obj instanceof Number) === false. Actual: ' + ((__obj instanceof Number)));\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#5\nif (__obj instanceof Array) {\n $ERROR('#5: var __obj={}; (__obj instanceof Array) === false. Actual: ' + ((__obj instanceof Array)));\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S8.6.2_A4"
+ },
+ {
+ "section": "8.6.2, 13.1, 13.2",
+ "description": "Call function-property of object, property defined\n as screen = {touch:function(){count++}}",
+ "test": "this.count=0;\n\nscreen = {touch:function(){count++}};\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nscreen.touch();\nif (count !==1) {\n $ERROR('#1: this.count=0; screen = {touch:function(){count++}}; screen.touch(); count === 1. Actual: ' + (count));\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nscreen['touch']();\nif (count !==2) {\n $ERROR('#2: this.count=0; screen = {touch:function(){count++}}; screen.touch(); screen[\\'touch\\'](); count === 2. Actual: ' + (count));\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S8.6.2_A5_T1"
+ },
+ {
+ "section": "8.6.2, 13.1, 13.2",
+ "description": "Call function-property of object, property defined\n as seat['move']=function(){position++}",
+ "test": "this.position=0;\nseat = {};\nseat['move']=function(){position++};\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nseat.move();\nif (position !==1) {\n $ERROR('#1: this.position=0; seat = {}; seat[\\'move\\']=function(){position++}; seat.move(); position === 1. Actual: ' + (position));\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nseat['move']();\nif (position !==2) {\n $ERROR('#2: this.position=0; seat = {}; seat[\\'move\\']=function(){position++}; seat.move(); seat[\\'move\\'](); position === 2. Actual: ' + (position));\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S8.6.2_A5_T2"
+ },
+ {
+ "section": "8.6.2, 13.1, 13.2",
+ "description": "Call function-property of global object, property defined\n as knock=function(){count++}",
+ "test": "count=0;\nknock=function(){count++};\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nknock();\nif (count !==1) {\n $ERROR('#1: count=0; knock=function(){count++}; knock(); count === 1. Actual: ' + (count));\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nthis['knock']();\nif (count !==2) {\n $ERROR('#2: count=0; knock=function(){count++}; knock(); this[\\'knock\\'](); count === 2. Actual: ' + (count));\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S8.6.2_A5_T3"
+ },
+ {
+ "section": "8.6.2, 13.1, 13.2",
+ "description": "Call function-property of global object, property defined\n as this['beep']=function(){__count++}",
+ "test": "__count=0;\n\nthis[\"beep\"]=function(){__count++};\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nbeep();\nif (__count !==1) {\n $ERROR('#1: __count=0; this[\"beep\"]=function(){__count++}; beep(); __count === 1. Actual: ' + (__count));\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nthis[\"beep\"]();\nif (__count !==2) {\n $ERROR('#2: __count=0; this[\"beep\"]=function(){__count++}; beep(); this[\"beep\"](); __count === 2. Actual: ' + (__count));\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S8.6.2_A5_T4"
+ },
+ {
+ "section": "8.6.2, 15.2.2",
+ "description": "Create a few Objects via the new operator",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nvar objInstance=new Object;\nif (objInstance.constructor !== Object){\n $ERROR('#1: var objInstance=new Object; objInstance.constructor === Object. Actual: ' + (objInstance.constructor));\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nvar numInstance=new Number;\nif (numInstance.constructor !== Number){\n $ERROR('#2: var numInstance=new Number; numInstance.constructor === Number. Actual: ' + (numInstance.constructor));\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S8.6.2_A6"
+ },
+ {
+ "section": "8.6.2, 15.8",
+ "description": "Checking if execution of \"var objMath=new Math\" passes",
+ "negative": "",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nvar objMath=new Math;\n\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S8.6.2_A7"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/8.6_The_Object_Type.json b/website/resources/scripts/testcases2/8.6_The_Object_Type.json
new file mode 100644
index 000000000..f23206000
--- /dev/null
+++ b/website/resources/scripts/testcases2/8.6_The_Object_Type.json
@@ -0,0 +1,38 @@
+{
+ "testCollection": {
+ "name": "8.6_The_Object_Type",
+ "numTests": 5,
+ "tests": [
+ {
+ "section": "8.6, 11.3.1",
+ "description": "Try to implement postincrement for custom property",
+ "test": "var __map={foo:\"bar\"};\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\n\n__map.foo++;\nif (!isNaN(__map.foo)) {\n $ERROR('#1: var __map={foo:\"bar\"}; __map.foo++; __map.foo === Not-a-Number. Actual: ' + (__map.foo));\n}\n\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S8.6_A2_T1"
+ },
+ {
+ "section": "8.6, 11.3.1",
+ "description": "Try to implement postincrement for not declared custom property",
+ "test": "var __map={};\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (!isNaN(__map.foo++)) {\n $ERROR('#1: var __map={}; __map.foo === Not-a-Number. Actual: ' + (__map.foo));\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (!(\"foo\" in __map)) {\n $ERROR('#2: var __map={}; \"foo\" in __map');\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S8.6_A2_T2"
+ },
+ {
+ "section": "8.6, 11.4.4",
+ "description": "Try to implement pefixincrement for custom property",
+ "test": "var __map={foo:'bar'};\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\n\n++__map.foo;\nif (!isNaN(__map.foo)) {\n $ERROR('#1: var __map={foo:\"bar\"}; ++__map.foo; __map.foo === Not-a-Number. Actual: ' + (__map.foo));\n}\n\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S8.6_A3_T1"
+ },
+ {
+ "section": "8.6, 11.4.4",
+ "description": "Try to implement pefixincrement for not declared custom property",
+ "test": "var __map={};\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (!isNaN(++__map.foo)) {\n $ERROR('#1: var __map={}; __map.foo++; __map.foo === Not-a-Number. Actual: ' + (__map.foo));\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (!(\"foo\" in __map)) {\n $ERROR('#2: var __map={}; \"foo\" in __map');\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S8.6_A3_T2"
+ },
+ {
+ "section": "8.6, 8.6.1, 15.2.2, 12.6.4",
+ "description": "Simple using a few custom properties",
+ "test": "///////////////////////////////////////////////////////\n// CHECK#1\nobj = {bar:true, some:1, foo:\"a\"};\n\ncount=0;\n\nfor (property in obj)\tcount++;\n\nif (count !== 3){\n $ERROR('#1: obj = {bar:true, some:1, foo:\"a\"}; count=0; for (property in obj) count++; count === 3. Actual: ' + (count));\n}\n//\n////////////////////////////////////////////////////////\n\n///////////////////////////////////////////////////////\n// CHECK#2\nobj_ = {bar:true};\nobj_.some = 1;\nobj_.foo = \"a\";\n\ncount=0;\n\nfor (property in obj_) count++;\n\nif (count !== 3){\n $ERROR('#2: obj_ = {bar:true}; obj_.some = 1; obj_.foo = \"a\"; count=0; for (property in obj_) count++; count === 3. Actual: ' + (count));\n}\n//\n////////////////////////////////////////////////////////\n\n///////////////////////////////////////////////////////\n// CHECK#3\nobj__ = new Object();\nobj__.bar = true;\nobj__.some = 1;\nobj__.foo = \"a\";\n\ncount=0;\n\nfor (property in obj__)\tcount++;\n\nif (count !== 3){\n $ERROR('#3: obj__ = new Object(); obj__.bar = true; obj__.some = 1; obj__.foo = \"a\"; for (property in obj__) count++; count === 3. Actual: ' + (count));\n}\n//\n////////////////////////////////////////////////////////\n",
+ "id": "S8.6_A4_T1"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/8.7.2.json b/website/resources/scripts/testcases2/8.7.2.json
new file mode 100644
index 000000000..8b7b49826
--- /dev/null
+++ b/website/resources/scripts/testcases2/8.7.2.json
@@ -0,0 +1,77 @@
+{
+ "testCollection": {
+ "name": "8.7.2",
+ "numTests": 9,
+ "tests": [
+ {
+ "id": "8.7.2-1-s",
+ "path": "TestCases/chapter08/8.7/8.7.2/8.7.2-1-s.js",
+ "description": "Strict Mode - ReferenceError is thrown if LeftHandSide evaluates to an unresolvable Reference",
+ "test": "assertTrue((function testcase() {\n \"use strict\";\n try {\n eval(\"_8_7_2_1 = 11;\");\n return false;\n } catch (e) {\n return e instanceof ReferenceError;\n }\n }).call(this));\n",
+ "precondition": "(fnSupportsStrict())",
+ "strict_only": ""
+ },
+ {
+ "id": "8.7.2-2-s",
+ "path": "TestCases/chapter08/8.7/8.7.2/8.7.2-2-s.js",
+ "description": "Strict Mode - ReferenceError isn't thrown if LeftHandSide evaluates to a resolvable Reference",
+ "test": "assertTrue((function testcase() {\n \"use strict\";\n var b = 11;\n return b === 11;\n }).call(this));\n",
+ "strict_only": ""
+ },
+ {
+ "id": "8.7.2-3-1-s",
+ "path": "TestCases/chapter08/8.7/8.7.2/8.7.2-3-1-s.js",
+ "description": "eval - a property named 'eval' is permitted",
+ "test": "assertTrue((function testcase() {\n 'use strict';\n\n var o = { eval: 42};\n return true;\n }).call(this));\n",
+ "strict_only": ""
+ },
+ {
+ "id": "8.7.2-3-s",
+ "path": "TestCases/chapter08/8.7/8.7.2/8.7.2-3-s.js",
+ "description": "Strict Mode - TypeError is thrown if LeftHandSide is a reference to a non-writable data property",
+ "test": "assertTrue((function testcase() {\n \"use strict\";\n var _8_7_2_3 = {};\n Object.defineProperty(_8_7_2_3, \"b\", {\n writable: false\n });\n\n try {\n _8_7_2_3.b = 11;\n return false;\n } catch (e) {\n return e instanceof TypeError;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnSupportsStrict())",
+ "strict_only": ""
+ },
+ {
+ "id": "8.7.2-4-s",
+ "path": "TestCases/chapter08/8.7/8.7.2/8.7.2-4-s.js",
+ "description": "Strict Mode - TypeError is thrown if LeftHandSide is a reference to an accessor property with no setter",
+ "test": "assertTrue((function testcase() {\n \"use strict\";\n var _8_7_2_4 = {};\n var _8_7_2_4_bValue = 1;\n Object.defineProperty(_8_7_2_4, \"b\", {\n get: function () { return _8_7_2_4_bValue; }\n });\n\n try {\n _8_7_2_4.b = 11;\n return false;\n } catch (e) {\n return e instanceof TypeError;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty) && fnSupportsStrict())",
+ "strict_only": ""
+ },
+ {
+ "id": "8.7.2-5-s",
+ "path": "TestCases/chapter08/8.7/8.7.2/8.7.2-5-s.js",
+ "description": "Strict Mode - TypeError is thrown if LeftHandSide is a reference to a non-existent property of an non-extensible object",
+ "test": "assertTrue((function testcase() {\n \"use strict\";\n var _8_7_2_5 = {};\n Object.preventExtensions(_8_7_2_5);\n\n try {\n _8_7_2_5.b = 11;\n return false;\n } catch (e) {\n return e instanceof TypeError;\n }\n }).call(this));\n",
+ "precondition": "(fnExists(Object.preventExtensions) && fnSupportsStrict())",
+ "strict_only": ""
+ },
+ {
+ "id": "8.7.2-6-s",
+ "path": "TestCases/chapter08/8.7/8.7.2/8.7.2-6-s.js",
+ "description": "Strict Mode - TypeError isn't thrown if LeftHandSide is a reference to a writable data property",
+ "test": "assertTrue((function testcase() {\n \"use strict\";\n var _8_7_2_6 = {};\n Object.defineProperty(_8_7_2_6, \"b\", {\n writable: true\n });\n\n _8_7_2_6.b = 11;\n\n return _8_7_2_6.b === 11;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))",
+ "strict_only": ""
+ },
+ {
+ "id": "8.7.2-7-s",
+ "path": "TestCases/chapter08/8.7/8.7.2/8.7.2-7-s.js",
+ "description": "Strict Mode - TypeError isn't thrown if LeftHandSide is a reference to an accessor property with setter",
+ "test": "assertTrue((function testcase() {\n \"use strict\";\n var _8_7_2_7 = {};\n var _8_7_2_7_bValue = 1;\n Object.defineProperty(_8_7_2_7, \"b\", {\n get: function () { return _8_7_2_7_bValue; },\n set: function (value) { _8_7_2_7_bValue = value; }\n });\n\n _8_7_2_7.b = 11;\n return _8_7_2_7.b === 11;\n }).call(this));\n",
+ "precondition": "(fnExists(Object.defineProperty))",
+ "strict_only": ""
+ },
+ {
+ "id": "8.7.2-8-s",
+ "path": "TestCases/chapter08/8.7/8.7.2/8.7.2-8-s.js",
+ "description": "Strict Mode - TypeError isn't thrown if LeftHandSide is a reference to a property of an extensible object",
+ "test": "assertTrue((function testcase() {\n \"use strict\";\n var _8_7_2_8 = {};\n\n _8_7_2_8.b = 11;\n\n return _8_7_2_8.b === 11;\n }).call(this));\n",
+ "strict_only": ""
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/8.7_The_Reference_Type.json b/website/resources/scripts/testcases2/8.7_The_Reference_Type.json
new file mode 100644
index 000000000..50305004d
--- /dev/null
+++ b/website/resources/scripts/testcases2/8.7_The_Reference_Type.json
@@ -0,0 +1,98 @@
+{
+ "testCollection": {
+ "name": "8.7_The_Reference_Type",
+ "numTests": 14,
+ "tests": [
+ {
+ "section": "8.7.1, 11.4.1",
+ "description": "Try to delete this.y, where y is this.y=1",
+ "test": "this.y = 1;\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif((delete this.y) !== true){\n $ERROR('#1: this.y = 1; (delete this.y) === true. Actual: ' + ((delete this.y)));\n};\n//\n//////////////////////////////////////////////////////////////////////////////\n\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (this.y !== undefined){\n $ERROR('#2: this.y = 1; (delete this.y) === true; this.y === undefined. Actual: ' + (this.y));\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S8.7.1_A1"
+ },
+ {
+ "section": "8.7.1",
+ "description": "Try to delete y, where y is var y=1",
+ "test": "var y = 1;\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif(delete y){\n $ERROR('#1: y = 1; (delete y) === false. Actual: ' + ((delete y)));\n};\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (y !== 1) {\n $ERROR('#2: y = 1; delete y; y === 1. Actual: ' + (y));\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S8.7.1_A2"
+ },
+ {
+ "section": "8.7.2",
+ "description": ": Checking if execution of \"'litera'=1;\" fails;",
+ "negative": "",
+ "test": "'litera'=1;\n",
+ "id": "S8.7.2_A1_T1"
+ },
+ {
+ "section": "8.7.2",
+ "description": "Checking if execution of \"1=1\" fails",
+ "negative": "",
+ "test": "1=1;\n",
+ "id": "S8.7.2_A1_T2"
+ },
+ {
+ "section": "8.7.2",
+ "description": "Execute x++, where x is var x",
+ "test": "var x;\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (x !== undefined) {\n $ERROR('#1: var x; x === undefined. Actual: ' + (x));\n}\n//\n//////////////////////////////////////////////////////////////////////////////\nx++;\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (x === undefined) {\n $ERROR('#2: var x; x++; x !== undefined');\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S8.7.2_A2"
+ },
+ {
+ "section": "8.7.2",
+ "description": "Execute this.x++, where this.x is undefined",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (this.x !== undefined) {\n $ERROR('#1: this.x === undefined. Actual: ' + (this.x));\n}\n//\n//////////////////////////////////////////////////////////////////////////////\nthis.x++;\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (x === undefined) {\n $ERROR('#2: this.x; this.x++; x !== undefined');\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S8.7.2_A3"
+ },
+ {
+ "section": "8.7",
+ "description": "Create object and refers to the other object, modify a property in the original object.\n We now see that that change is represented in both variables",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#\n// Set obj to an empty object\n//\nvar obj = new Object();\n// objRef now refers to the other object\n//\nvar objRef = obj;\n// Modify a property in the original object\nobjRef.oneProperty = -1;\nobj.oneProperty = true;\n// We now see that that change is represented in both variables\n// (Since they both refer to the same object)\nif(objRef.oneProperty !== true){\n $ERROR('#1: var obj = new Object(); var objRef = obj; objRef.oneProperty = -1; obj.oneProperty = true; objRef.oneProperty === true. Actual: ' + (objRef.oneProperty));\n};\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S8.7_A1"
+ },
+ {
+ "section": "8.7",
+ "description": "Create a reference to the array, and change original array",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\n// Create an array of items\nvar items = new Array( \"one\", \"two\", \"three\" );\n// Create a reference to the array of items\nvar itemsRef = items;\n// Add an item to the original array\nitems.push( \"four\" );var itemsRef = items;\n// The length of each array should be the same,\n// since they both point to the same array object\nif( itemsRef.length !== 4){\n $ERROR('#1: var items = new Array( \"one\", \"two\", \"three\" ); var itemsRef = items; items.push( \"four\" );var itemsRef = items; itemsRef.length !== 4');\n};\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#\n// Create an array of items\nvar items = new Array( \"one\", \"two\", \"three\" );\n// Create a reference to the array of items\nvar itemsRef = items;\n// Add an item to the original array\nitems[1]=\"duo\";\n// The length of each array should be the same,\n// since they both point to the same array object\nif( itemsRef[1] !== \"duo\"){\n $ERROR('#2: var items = new Array( \"one\", \"two\", \"three\" ); var itemsRef = items; items[1]=\"duo\"; itemsRef[1] === \"duo\". Actual: ' + (itemsRef[1]));\n};\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S8.7_A2"
+ },
+ {
+ "section": "8.7",
+ "description": "Create a reference to the array, and redefine original array with new array",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#\n// Set items to an array (object) of strings\nvar items = new Array( \"one\", \"two\", \"three\" );\n// Set itemsRef to a reference to items\n//\nvar itemsRef = items;\n// Set items to equal a new object\n//\nitems = new Array( \"new\", \"array\" );\n// items and itemsRef now point to different objects.\n// items points to new Array( \"new\", \"array\" )\n// itemsRef points to new Array( \"one\", \"two\", \"three\" )\nif( items == itemsRef ){\n $ERROR('#1: var items = new Array( \"one\", \"two\", \"three\" ); var itemsRef = items; items = new Array( \"new\", \"array\" ); items != itemsRef');\n};\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S8.7_A3"
+ },
+ {
+ "section": "8.7",
+ "description": "Create a reference to the string, and Concatenate some new text onto the string object",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#\n// Set item equal to a new string object\nvar item = new String(\"test\");\n// itemRef now refers to the same string object\nvar itemRef = item;\n// Concatenate some new text onto the string object\n// NOTE: This creates a new object, and does not modify\n// the original object.\nitem += \"ing\";\n// The values of item and itemRef are NOT equal, as a whole\n// new string object has been created\nif( item == itemRef ){\n $ERROR('#1: var item = new String(\"test\"); var itemRef = item; item += \"ing\"; item != itemRef');\n};\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S8.7_A4"
+ },
+ {
+ "section": "8.7",
+ "description": "Delete referenced object, var __ref = obj",
+ "strict_mode_negative": "",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (typeof(__ref) !== \"undefined\"){\n $ERROR('#1: typeof(__ref) === \"undefined\". Actual: ' + (typeof(__ref))); \n}; \n//\n//////////////////////////////////////////////////////////////////////////////\n\nvar obj = new Object();\nvar __ref = obj;\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (typeof(__ref) === \"undefined\"){\n $ERROR('#2: obj = new Object(); var __ref = obj; typeof(__ref) !== \"undefined\"');\n}; \n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#3\nif (delete __ref !== false){\n $ERROR('#3: obj = new Object(); var __ref = obj; delete __ref === false. Actual: ' + (delete __ref));\n};\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#4\nif (typeof(__ref) !== \"object\"){\n $ERROR('#4: obj = new Object(); var __ref = obj; delete __ref; typeof(__ref) === \"object\". Actual: ' + (typeof(__ref)));\n};\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#5\nif (typeof(obj) !== \"object\"){\n $ERROR('#5: obj = new Object(); var __ref = obj; delete __ref; typeof(obj) === \"object\". Actual: ' + (typeof(obj)));\n};\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S8.7_A5_T1",
+ "strict_only": ""
+ },
+ {
+ "section": "8.7, 11.4.1",
+ "description": "Delete referenced object, __ref = obj",
+ "strict_mode_negative": "",
+ "test": "//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (typeof(__ref) !== \"undefined\"){\n $ERROR('#1: typeof(__ref) === \"undefined\". Actual: ' + (typeof(__ref))); \n}; \n//\n//////////////////////////////////////////////////////////////////////////////\n\nvar obj = new Object();\nvar __ref = obj;\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (typeof(__ref) === \"undefined\"){\n $ERROR('#2: obj = new Object(); __ref = obj; typeof(__ref) !== \"undefined\"');\n}; \n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#3\nif (delete __ref !== true){\n $ERROR('#3: obj = new Object(); __ref = obj; delete __ref === true. Actual: ' + (delete __ref));\n};\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#4\nif (typeof(__ref) !== \"undefined\"){\n $ERROR('#4: obj = new Object(); __ref = obj; delete __ref; typeof(__ref) === \"undefined\". Actual: ' + (typeof(__ref)));\n};\n//\n//////////////////////////////////////////////////////////////////////////////\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#5\nif (typeof(obj) !== \"object\"){\n $ERROR('#5: obj = new Object(); __ref = obj; delete __ref; typeof(obj) === \"object\". Actual: ' + (typeof(obj)));\n};\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S8.7_A5_T2",
+ "strict_only": ""
+ },
+ {
+ "section": "8.7",
+ "description": "Adding original variable with referenced one inside function",
+ "test": "var n = 1;\nvar m = n;\n\nfunction addFirst2Second(first, second){first += second;}\n\naddFirst2Second(n, m);\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (m !== 1) {\n $ERROR('#1: var n = 1; var m = n; function addFirst2Second(first, second){first += second;} addFirst2Second(n, m); m === 1. Actual: ' + (m));\n}\n\n//\n//////////////////////////////////////////////////////////////////////////////\n\n",
+ "id": "S8.7_A6"
+ },
+ {
+ "section": "8.7",
+ "description": "Add new property to original variable inside function",
+ "test": "var n = {};\nvar m = n;\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (typeof m !== \"object\") {\n $ERROR('#1: var n = {}; var m = n; typeof m === \"object\". Actual: ' + (typeof m));\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n\nfunction populateAge(person){person.age = 50;}\n\npopulateAge(m);\n\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#2\nif (n.age !== 50) {\n $ERROR('#2: var n = {}; var m = n; function populateAge(person){person.age = 50;} populateAge(m); n.age === 50. Actual: ' + (n.age));\n}\n\n//\n//////////////////////////////////////////////////////////////////////////////\n\n",
+ "id": "S8.7_A7"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/8.8_The_List_Type.json b/website/resources/scripts/testcases2/8.8_The_List_Type.json
new file mode 100644
index 000000000..e2fb8ac7f
--- /dev/null
+++ b/website/resources/scripts/testcases2/8.8_The_List_Type.json
@@ -0,0 +1,26 @@
+{
+ "testCollection": {
+ "name": "8.8_The_List_Type",
+ "numTests": 3,
+ "tests": [
+ {
+ "section": "8.8",
+ "description": "Call function __mFunc(1,2,3) with 3 arguments",
+ "test": "function __mFunc(){return arguments.length;};\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__mFunc(1,2,3) !== 3){\n $ERROR('#1: function __mFunc(){return arguments.length;}; __mFunc(1,2,3) === 3. Actual: ' + (__mFunc(1,2,3)));\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S8.8_A2_T1"
+ },
+ {
+ "section": "8.8",
+ "description": "Call function __mFunc([,,]) with 1 arguments",
+ "test": "function __mFunc(){return arguments.length;};\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__mFunc([,,]) !== 1){\n $ERROR('#1: function __mFunc(){return arguments.length;}; __mFunc([,,]) === 1. Actual: ' + (__mFunc([,,])));\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S8.8_A2_T2"
+ },
+ {
+ "section": "8.8",
+ "description": "Call function, that concatenate all it`s arguments",
+ "test": "function __mFunc(){var __accum=\"\"; for (var i = 0; i < arguments.length; ++i){__accum += arguments[i]};return __accum;};\n//////////////////////////////////////////////////////////////////////////////\n//CHECK#1\nif (__mFunc(\"A\",\"B\",\"C\",\"D\",\"E\",\"F\") !== \"ABCDEF\"){\n $ERROR('#1: function __mFunc(){var __accum=\"\"; for (var i = 0; i < arguments.length; ++i){__accum += arguments[i]};return __accum;}; __mFunc(\"A\",\"B\",\"C\",\"D\",\"E\",\"F\") === \"ABCDEF\". Actual: ' + (__mFunc(\"A\",\"B\",\"C\",\"D\",\"E\",\"F\")));\n}\n//\n//////////////////////////////////////////////////////////////////////////////\n",
+ "id": "S8.8_A2_T3"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/9.1_ToPrimitive.json b/website/resources/scripts/testcases2/9.1_ToPrimitive.json
new file mode 100644
index 000000000..d6c14d2d5
--- /dev/null
+++ b/website/resources/scripts/testcases2/9.1_ToPrimitive.json
@@ -0,0 +1,32 @@
+{
+ "testCollection": {
+ "name": "9.1_ToPrimitive",
+ "numTests": 4,
+ "tests": [
+ {
+ "section": "9.1",
+ "description": "Using operator Number. The operator calls ToPrimitive with hint Number",
+ "test": "// CHECK#1\nvar object = {valueOf: function() {return \"1\"}, toString: function() {return 0}};\nif (Number(object) !== 1) {\n $ERROR('#1: var object = {valueOf: function() {return \"1\"}, toString: function() {return 0}}; Number(object) === 1. Actual: ' + (Number(object)));\n}\n\n// CHECK#2\nvar object = {valueOf: function() {return {}}, toString: function() {return \"0\"}};\nif (Number(object) !== 0) {\n $ERROR('#2: var object = {valueOf: function() {return {}}, toString: function() {return \"0\"}}; Number(object) === 0. Actual: ' + (Number(object)));\n}\n\n",
+ "id": "S9.1_A1_T1"
+ },
+ {
+ "section": "9.1",
+ "description": "Using operator Number. This operator calls ToPrimitive with hint Number",
+ "test": "// CHECK#1\nvar object = {valueOf: function() {return 0}, toString: function() {return 1}};\nif (String(object) !== \"1\") {\n $ERROR('#1: var object = {valueOf: function() {return 0}, toString: function() {return 1}}; String(object) === \"1\". Actual: ' + (String(object)));\n}\n\n// CHECK#2\nvar object = {valueOf: function() {return 0}, toString: function() {return {}}};\nif (String(object) !== \"0\") {\n $ERROR('#2: var object = {valueOf: function() {return 0}, toString: function() {return {}}}; String(object) === \"0\". Actual: ' + (String(object)));\n}\n\n",
+ "id": "S9.1_A1_T2"
+ },
+ {
+ "section": "9.1",
+ "description": "Using operator \"+\". This operator firstly calls ToPrimitive and then calls ToString or ToNumber",
+ "test": "// CHECK#1\nvar object = {valueOf: function() {return 1}, toString: function() {return 0}};\nif (object + \"\" !== \"1\") {\n $ERROR('#1: var object = {valueOf: function() {return 1}, toString: function() {return 0}}; object + \"\" === \"1\". Actual: ' + (object + \"\"));\n}\n\n// CHECK#2\nvar object = {valueOf: function() {return \"1\"}, toString: function() {return 0}};\nif (object + 0 !== \"10\") {\n $ERROR('#2: var object = {valueOf: function() {return \"1\"}, toString: function() {return 0}}; object + 0 === \"10\". Actual: ' + (object + 0));\n}\n\n",
+ "id": "S9.1_A1_T3"
+ },
+ {
+ "section": "9.1",
+ "description": "Using operator \"<\". The operator firstly calls ToPrimitive and then calls ToString or ToNumber",
+ "test": "// CHECK#1\nvar object = {valueOf: function() {return -2}, toString: function() {return \"-2\"}};\nif (\"-1\" < object) {\n $ERROR('#1: var object = {valueOf: function() {return -2}, toString: function() {return \"-2\"}}; \"-1\" < object');\n}\n\n// CHECK#2\nvar object = {valueOf: function() {return \"-2\"}, toString: function() {return -2}};\nif (object < \"-1\") {\n $ERROR('#2: var object = {valueOf: function() {return \"-2\"}, toString: function() {return -2}}; object < \"-1\"');\n}\n\n",
+ "id": "S9.1_A1_T4"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/9.2_ToBoolean.json b/website/resources/scripts/testcases2/9.2_ToBoolean.json
new file mode 100644
index 000000000..2a6102b79
--- /dev/null
+++ b/website/resources/scripts/testcases2/9.2_ToBoolean.json
@@ -0,0 +1,104 @@
+{
+ "testCollection": {
+ "name": "9.2_ToBoolean",
+ "numTests": 16,
+ "tests": [
+ {
+ "section": "9.2, 15.6.1",
+ "description": "Undefined, void and others are converted to Boolean by explicit transformation",
+ "test": "// CHECK#1\nif (Boolean(undefined) !== false) {\n $ERROR('#1: Boolean(undefined) === false. Actual: ' + (Boolean(undefined)));\n}\n\n// CHECK#2\nif (Boolean(void 0) !== false) {\n $ERROR('#2: Boolean(undefined) === false. Actual: ' + (Boolean(undefined)));\n}\n\n// CHECK#3\nif (Boolean(eval(\"var x\")) !== false) {\n $ERROR('#3: Boolean(eval(\"var x\")) === false. Actual: ' + (Boolean(eval(\"var x\"))));\n}\n\n// CHECK#4\nif (Boolean() !== false) {\n $ERROR('#4: Boolean() === false. Actual: ' + (Boolean()));\n}\n",
+ "id": "S9.2_A1_T1"
+ },
+ {
+ "section": "9.2, 11.4.9",
+ "description": "Undefined, void and others are converted to Boolean by implicit transformation",
+ "test": "// CHECK#1\nif (!(undefined) !== true) {\n $ERROR('#1: !(undefined) === true. Actual: ' + (!(undefined)));\n}\n\n// CHECK#2\nif (!(void 0) !== true) {\n $ERROR('#2: !(undefined) === true. Actual: ' + (!(undefined)));\n}\n\n// CHECK#3\nif (!(eval(\"var x\")) !== true) {\n $ERROR('#3: !(eval(\"var x\")) === true. Actual: ' + (!(eval(\"var x\"))));\n}\n",
+ "id": "S9.2_A1_T2"
+ },
+ {
+ "section": "9.2, 15.6.1",
+ "description": "null convert to Boolean by explicit transformation",
+ "test": "// CHECK#1\nif (Boolean(null) !== false) {\n $ERROR('#1: Boolean(null) === false. Actual: ' + (Boolean(null))); \n}\n",
+ "id": "S9.2_A2_T1"
+ },
+ {
+ "section": "9.2, 11.4.9",
+ "description": "null convert to Boolean by implicit transformation",
+ "test": "// CHECK#1\nif (!(null) !== true) {\n $ERROR('#1: !(null) === true. Actual: ' + (!(null))); \n}\n",
+ "id": "S9.2_A2_T2"
+ },
+ {
+ "section": "9.2, 15.6.1",
+ "description": "true and false convert to Boolean by explicit transformation",
+ "test": "// CHECK#1 \nif (Boolean(true) !== true) {\n $ERROR('#1: Boolean(true) === true. Actual: ' + (Boolean(true)));\t\n}\n\n// CHECK#2\nif (Boolean(false) !== false) {\n $ERROR('#2: Boolean(false) === false. Actual: ' + (Boolean(false)));\n}\n",
+ "id": "S9.2_A3_T1"
+ },
+ {
+ "section": "9.2, 11.4.9",
+ "description": "true and false convert to Boolean by implicit transformation",
+ "test": "// CHECK#1 \nif (!(true) !== false) {\n $ERROR('#1: !(true) === false. Actual: ' + (!(true)));\t\n}\n\n// CHECK#2\nif (!(false) !== true) {\n $ERROR('#2: !(false) === true. Actual: ' + (!(false)));\n}\n",
+ "id": "S9.2_A3_T2"
+ },
+ {
+ "section": "9.2, 15.6.1",
+ "description": "+0, -0 and NaN convert to Boolean by explicit transformation",
+ "test": "// CHECK#1\nif (Boolean(+0) !== false) {\n $ERROR('#1: Boolean(+0) === false. Actual: ' + (Boolean(+0))); \t \n}\n\n// CHECK#2\nif (Boolean(-0) !== false) {\n $ERROR('#2: Boolean(-0) === false. Actual: ' + (Boolean(-0)));\n}\n\n// CHECK#3\nif (Boolean(Number.NaN) !== false) {\n $ERROR('#3: Boolean(Number.NaN) === false. Actual: ' + (Boolean(Number.NaN)));\n}\n",
+ "id": "S9.2_A4_T1"
+ },
+ {
+ "section": "9.2, 11.4.9",
+ "description": "+0, -0 and NaN convert to Boolean by implicit transformation",
+ "test": "// CHECK#1\nif (!(+0) !== true) {\n $ERROR('#1: !(+0) === true. Actual: ' + (!(+0))); \t \n}\n\n// CHECK#2\nif (!(-0) !== true) {\n $ERROR('#2: !(-0) === true. Actual: ' + (!(-0)));\n}\n\n// CHECK#3\nif (!(Number.NaN) !== true) {\n $ERROR('#3: !(Number.NaN) === true. Actual: ' + (!(Number.NaN)));\n}\n",
+ "id": "S9.2_A4_T2"
+ },
+ {
+ "section": "9.2, 15.6.1",
+ "description": "Number.POSITIVE_INFINITY, Number.NEGATIVE_INFINITY,\nNumber.MAX_VALUE, Number.MIN_VALUE and some numbers convert to Boolean by explicit transformation",
+ "test": "// CHECK#1\nif (Boolean(Number.POSITIVE_INFINITY) !== true) {\n $ERROR('#1: Boolean(+Infinity) === true. Actual: ' + (Boolean(+Infinity))); \t\n}\n\n// CHECK#2;\nif (Boolean(Number.NEGATIVE_INFINITY) !== true) {\n $ERROR('#2: Boolean(-Infinity) === true. Actual: ' + (Boolean(-Infinity))); \t\n}\n\n// CHECK#3\nif (Boolean(Number.MAX_VALUE) !== true) {\n $ERROR('#3: Boolean(Number.MAX_VALUE) === true. Actual: ' + (Boolean(Number.MAX_VALUE))); \t\n}\n\n// CHECK#4\nif (Boolean(Number.MIN_VALUE) !== true) {\n $ERROR('#4: Boolean(Number.MIN_VALUE) === true. Actual: ' + (Boolean(Number.MIN_VALUE))); \t\n}\n\n// CHECK#5\nif (Boolean(13) !== true) {\n $ERROR('#5: Boolean(13) === true. Actual: ' + (Boolean(13)));\t\n}\n\n// CHECK#6\nif (Boolean(-13) !== true) {\n $ERROR('#6: Boolean(-13) === true. Actual: ' + (Boolean(-13)));\t\n}\n\n// CHECK#7\nif (Boolean(1.3) !== true) {\n $ERROR('#7: Boolean(1.3) === true. Actual: ' + (Boolean(1.3)));\t\n}\n\n// CHECK#8\nif (Boolean(-1.3) !== true) {\n $ERROR('#8: Boolean(-1.3) === true. Actual: ' + (Boolean(-1.3)));\t\n}\t\n",
+ "id": "S9.2_A4_T3"
+ },
+ {
+ "section": "9.2, 11.4.9",
+ "description": "Number.POSITIVE_INFINITY, Number.NEGATIVE_INFINITY,\nNumber.MAX_VALUE, Number.MIN_VALUE and some other numbers are converted to Boolean by implicit transformation",
+ "test": "// CHECK#1\nif (!(Number.POSITIVE_INFINITY) !== false) {\n $ERROR('#1: !(+Infinity) === false. Actual: ' + (!(+Infinity))); \t\n}\n\n// CHECK#2;\nif (!(Number.NEGATIVE_INFINITY) !== false) {\n $ERROR('#2: !(-Infinity) === false. Actual: ' + (!(-Infinity))); \t\n}\n\n// CHECK#3\nif (!(Number.MAX_VALUE) !== false) {\n $ERROR('#3: !(Number.MAX_VALUE) === false. Actual: ' + (!(Number.MAX_VALUE))); \t\n}\n\n// CHECK#4\nif (!(Number.MIN_VALUE) !== false) {\n $ERROR('#4: !(Number.MIN_VALUE) === false. Actual: ' + (!(Number.MIN_VALUE))); \t\n}\n\n// CHECK#5\nif (!(13) !== false) {\n $ERROR('#5: !(13) === false. Actual: ' + (!(13)));\t\n}\n\n// CHECK#6\nif (!(-13) !== false) {\n $ERROR('#6: !(-13) === false. Actual: ' + (!(-13)));\t\n}\n\n// CHECK#7\nif (!(1.3) !== false) {\n $ERROR('#7: !(1.3) === false. Actual: ' + (!(1.3)));\t\n}\n\n// CHECK#8\nif (!(-1.3) !== false) {\n $ERROR('#8: !(-1.3) === false. Actual: ' + (!(-1.3)));\t\n}\t\n",
+ "id": "S9.2_A4_T4"
+ },
+ {
+ "section": "9.2, 15.6.1",
+ "description": "\"\" is converted to Boolean by explicit transformation",
+ "test": "// CHECK#1\nif (Boolean(\"\") !== false) {\n $ERROR('#1: Boolean(\"\") === false. Actual: ' + (Boolean(\"\")));\n}\n",
+ "id": "S9.2_A5_T1"
+ },
+ {
+ "section": "9.2, 11.4.9",
+ "description": "\"\" convert to Boolean by implicit transformation",
+ "test": "// CHECK#1\nif (!(\"\") !== true) {\n $ERROR('#1: !(\"\") === true. Actual: ' + (!(\"\")));\n}\n",
+ "id": "S9.2_A5_T2"
+ },
+ {
+ "section": "9.2, 15.6.1",
+ "description": "Any nonempty string convert to Boolean by explicit transformation",
+ "test": "// CHECK#1\nif (Boolean(\" \") !== true) {\n $ERROR('#1: Boolean(\" \") === true. Actual: ' + (Boolean(\" \")));\t\n}\n\n// CHECK#2\nif (Boolean(\"Nonempty String\") !== true) {\n $ERROR('#2: Boolean(\"Nonempty String\") === true. Actual: ' + (Boolean(\"Nonempty String\")));\t\n}\n",
+ "id": "S9.2_A5_T3"
+ },
+ {
+ "section": "9.2, 11.4.9",
+ "description": "Any nonempty string convert to Boolean by implicit transformation",
+ "test": "// CHECK#1\nif (!(\" \") !== false) {\n $ERROR('#1: !(\" \") === false. Actual: ' + (!(\" \")));\t\n}\n\n// CHECK#2\nif (!(\"Nonempty String\") !== false) {\n $ERROR('#2: !(\"Nonempty String\") === false. Actual: ' + (!(\"Nonempty String\")));\t\n}\n",
+ "id": "S9.2_A5_T4"
+ },
+ {
+ "section": "9.2, 15.6.1",
+ "description": "Different objects convert to Boolean by explicit transformation",
+ "test": "// CHECK#1\nif (Boolean(new Object()) !== true) {\n $ERROR('#1: Boolean(new Object()) === true. Actual: ' + (Boolean(new Object())));\t\n}\n\n// CHECK#2\nif (Boolean(new String(\"\")) !== true) {\n $ERROR('#2: Boolean(new String(\"\")) === true. Actual: ' + (Boolean(new String(\"\"))));\t\n}\n\n// CHECK#3\nif (Boolean(new String()) !== true) {\n $ERROR('#3: Boolean(new String()) === true. Actual: ' + (Boolean(new String())));\t\n}\n\n// CHECK#4\nif (Boolean(new Boolean(true)) !== true) {\n $ERROR('#4: Boolean(new Boolean(true)) === true. Actual: ' + (Boolean(new Boolean(true))));\t\n}\n\n// CHECK#5\nif (Boolean(new Boolean(false)) !== true) {\n $ERROR('#5: Boolean(new Boolean(false)) === true. Actual: ' + (Boolean(new Boolean(false))));\t\n}\n\n// CHECK#6\nif (Boolean(new Boolean()) !== true) {\n $ERROR('#6: Boolean(new Boolean()) === true. Actual: ' + (Boolean(new Boolean())));\t\n}\n\n// CHECK#7\nif (Boolean(new Array()) !== true) {\n $ERROR('#7: Boolean(new Array()) === true. Actual: ' + (Boolean(new Array())));\t\n}\n\n// CHECK#8\nif (Boolean(new Number()) !== true) {\n $ERROR('#8: Boolean(new Number()) === true. Actual: ' + (Boolean(new Number())));\t\n}\n\n// CHECK#9\nif (Boolean(new Number(-0)) !== true) {\n $ERROR('#9: Boolean(new Number(-0)) === true. Actual: ' + (Boolean(new Number(-0))));\t\n}\n\n// CHECK#10\nif (Boolean(new Number(0)) !== true) {\n $ERROR('#10: Boolean(new Number(0)) === true. Actual: ' + (Boolean(new Number(0))));\t\n}\n\n// CHECK#11\nif (Boolean(new Number()) !== true) {\n $ERROR('#11: Boolean(new Number()) === true. Actual: ' + (Boolean(new Number())));\t\n}\n\n// CHECK#12\nif (Boolean(new Number(Number.NaN)) !== true) {\n $ERROR('#12: Boolean(new Number(Number.NaN)) === true. Actual: ' + (Boolean(new Number(Number.NaN))));\t\n}\n\n// CHECK#13\nif (Boolean(new Number(-1)) !== true) {\n $ERROR('#13: Boolean(new Number(-1)) === true. Actual: ' + (Boolean(new Number(-1))));\t\n}\n\n// CHECK#14\nif (Boolean(new Number(1)) !== true) {\n $ERROR('#14: Boolean(new Number(1)) === true. Actual: ' + (Boolean(new Number(1))));\t\n}\n\n// CHECK#15\nif (Boolean(new Number(Number.POSITIVE_INFINITY)) !== true) {\n $ERROR('#15: Boolean(new Number(Number.POSITIVE_INFINITY)) === true. Actual: ' + (Boolean(new Number(Number.POSITIVE_INFINITY))));\t\n}\n\n// CHECK#16\nif (Boolean(new Number(Number.NEGATIVE_INFINITY)) !== true) {\n $ERROR('#16: Boolean(new Number(Number.NEGATIVE_INFINITY)) === true. Actual: ' + (Boolean(new Number(Number.NEGATIVE_INFINITY))));\t\n}\n\n// CHECK#17\nif (Boolean(new Function()) !== true) {\n $ERROR('#17: Boolean(new Function()) === true. Actual: ' + (Boolean(new Function())));\t\n}\n\n// CHECK#18\nif (Boolean(new Date()) !== true) {\n $ERROR('#18: Boolean(new Date()) === true. Actual: ' + (Boolean(new Date())));\t\n}\n\n// CHECK#19\nif (Boolean(new Date(0)) !== true) {\n $ERROR('#19: Boolean(new Date(0)) === true. Actual: ' + (Boolean(new Date(0))));\t\n}\n",
+ "id": "S9.2_A6_T1"
+ },
+ {
+ "section": "9.2, 11.4.9",
+ "description": "Different objects convert to Boolean by implicit transformation",
+ "test": "// CHECK#1\nif (!(new Object()) !== false) {\n $ERROR('#1: !(new Object()) === false. Actual: ' + (!(new Object())));\t\n}\n\n// CHECK#2\nif (!(new String(\"\")) !== false) {\n $ERROR('#2: !(new String(\"\")) === false. Actual: ' + (!(new String(\"\"))));\t\n}\n\n// CHECK#3\nif (!(new String()) !== false) {\n $ERROR('#3: !(new String()) === false. Actual: ' + (!(new String())));\t\n}\n\n// CHECK#4\nif (!(new Boolean(true)) !== false) {\n $ERROR('#4: !(new Boolean(true)) === false. Actual: ' + (!(new Boolean(true))));\t\n}\n\n// CHECK#5\nif (!(new Boolean(false)) !== false) {\n $ERROR('#5: !(new Boolean(false)) === false. Actual: ' + (!(new Boolean(false))));\t\n}\n\n// CHECK#6\nif (!(new Boolean()) !== false) {\n $ERROR('#6: !(new Boolean()) === false. Actual: ' + (!(new Boolean())));\t\n}\n\n// CHECK#7\nif (!(new Array()) !== false) {\n $ERROR('#7: !(new Array()) === false. Actual: ' + (!(new Array())));\t\n}\n\n// CHECK#8\nif (!(new Number()) !== false) {\n $ERROR('#8: !(new Number()) === false. Actual: ' + (!(new Number())));\t\n}\n\n// CHECK#9\nif (!(new Number(-0)) !== false) {\n $ERROR('#9: !(new Number(-0)) === false. Actual: ' + (!(new Number(-0))));\t\n}\n\n// CHECK#10\nif (!(new Number(0)) !== false) {\n $ERROR('#10: !(new Number(0)) === false. Actual: ' + (!(new Number(0))));\t\n}\n\n// CHECK#11\nif (!(new Number()) !== false) {\n $ERROR('#11: !(new Number()) === false. Actual: ' + (!(new Number())));\t\n}\n\n// CHECK#12\nif (!(new Number(Number.NaN)) !== false) {\n $ERROR('#12: !(new Number(Number.NaN)) === false. Actual: ' + (!(new Number(Number.NaN))));\t\n}\n\n// CHECK#13\nif (!(new Number(-1)) !== false) {\n $ERROR('#13: !(new Number(-1)) === false. Actual: ' + (!(new Number(-1))));\t\n}\n\n// CHECK#14\nif (!(new Number(1)) !== false) {\n $ERROR('#14: !(new Number(1)) === false. Actual: ' + (!(new Number(1))));\t\n}\n\n// CHECK#15\nif (!(new Number(Number.POSITIVE_INFINITY)) !== false) {\n $ERROR('#15: !(new Number(Number.POSITIVE_INFINITY)) === false. Actual: ' + (!(new Number(Number.POSITIVE_INFINITY))));\t\n}\n\n// CHECK#16\nif (!(new Number(Number.NEGATIVE_INFINITY)) !== false) {\n $ERROR('#16: !(new Number(Number.NEGATIVE_INFINITY)) === false. Actual: ' + (!(new Number(Number.NEGATIVE_INFINITY))));\t\n}\n\n// CHECK#17\nif (!(new Function()) !== false) {\n $ERROR('#17: !(new Function()) === false. Actual: ' + (!(new Function())));\t\n}\n\n// CHECK#18\nif (!(new Date()) !== false) {\n $ERROR('#18: !(new Date()) === false. Actual: ' + (!(new Date())));\t\n}\n\n// CHECK#19\nif (!(new Date(0)) !== false) {\n $ERROR('#19: !(new Date(0)) === false. Actual: ' + (!(new Date(0))));\t\n}\n",
+ "id": "S9.2_A6_T2"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/9.3.1_ToNumber_from_String.json b/website/resources/scripts/testcases2/9.3.1_ToNumber_from_String.json
new file mode 100644
index 000000000..48688a483
--- /dev/null
+++ b/website/resources/scripts/testcases2/9.3.1_ToNumber_from_String.json
@@ -0,0 +1,230 @@
+{
+ "testCollection": {
+ "name": "9.3.1_ToNumber_from_String",
+ "numTests": 37,
+ "tests": [
+ {
+ "section": "9.3.1, 15.7.1",
+ "description": "Number('') convert to Number by explicit transformation",
+ "test": "// CHECK#1\nif (Number(\"\") !== 0) {\n $ERROR('#1.1: Number(\"\") === 0. Actual: ' + (Number(\"\")));\n} else {\n if (1/Number(\"\") !== Number.POSITIVE_INFINITY) {\n $ERROR('#1.2: Number(\"\") == +0. Actual: -0');\n }\n}\n",
+ "id": "S9.3.1_A1"
+ },
+ {
+ "section": "9.3.1, 15.7.1",
+ "description": "Compare Number('.12345') with +('12345')*1e-5",
+ "test": "// CHECK#1\nif (Number(\".12345\") !== +(\"12345\")*1e-5) {\n $ERROR('#1: Number(\".12345\") === +(\"12345\")*1e-5');\n}\n",
+ "id": "S9.3.1_A10"
+ },
+ {
+ "section": "9.3.1, 15.7.1",
+ "description": "Compare Number('.12345e6') with +('12345')*1e1,\nand Number('.12345e-3') !== Number('12345')*1e-8",
+ "test": "// CHECK#1\nif (Number(\".12345e6\") !== +(\"12345\")*1e1) {\n $ERROR('#1: Number(\".12345e6\") === +(\"12345\")*1e1');\n}\n\n// CHECK#2\nif (Number(\".12345e-3\") !== Number(\"12345\")*1e-8) {\n $ERROR('#2: Number(\".12345e-3\") === Number(\"12345\")*1e-8');\n}\n",
+ "id": "S9.3.1_A11"
+ },
+ {
+ "section": "9.3.1, 15.7.1",
+ "description": "Compare Number('12345e6') with +('12345')*1e1,\nand Number('12345e-6') !== Number('12345')*1e-6",
+ "test": "// CHECK#1\nif (Number(\"12345e6\") !== +(\"12345\")*1e6) {\n $ERROR('#1: Number(\"12345e6\") === +(\"12345\")*1e6');\n}\n\n// CHECK#2\nif (Number(\"12345e-6\") !== Number(\"12345\")*1e-6) {\n $ERROR('#2: Number(\"12345e-6\") === Number(\"12345\")*1e-6');\n}\n",
+ "id": "S9.3.1_A12"
+ },
+ {
+ "section": "9.3.1, 15.7.1",
+ "description": "Compare '12' with Number(\"1\")*10+Number(\"2\") and analogous",
+ "test": "// CHECK#1\nif (+(\"12\") !== Number(\"1\")*10+Number(\"2\")) {\n $ERROR('#1: +(\"12\") === Number(\"1\")*10+Number(\"2\")');\n}\n\n// CHECK#2\nif (Number(\"123\") !== Number(\"12\")*10+Number(\"3\")) {\n $ERROR('#2: Number(\"123\") === Number(\"12\")*10+Number(\"3\")');\n}\n\n// CHECK#2\nif (Number(\"1234\") !== Number(\"123\")*10+Number(\"4\")) {\n $ERROR('#2: Number(\"1234\") === Number(\"123\")*10+Number(\"4\")');\n}\n",
+ "id": "S9.3.1_A13"
+ },
+ {
+ "section": "9.3.1, 15.7.1",
+ "description": "Compare Number('+1234567890') with +('1234567890')",
+ "test": "// CHECK#1\nif (Number(\"+1234567890\") !== +(\"1234567890\")) {\n $ERROR('#1: Number(\"+1234567890\") === +(\"1234567890\")');\n}\n",
+ "id": "S9.3.1_A14"
+ },
+ {
+ "section": "9.3.1, 15.7.1",
+ "description": "Compare -Number('1234567890') with ('-1234567890')",
+ "test": "// CHECK#1\nif (+(\"-1234567890\") !== -Number(\"1234567890\")) {\n $ERROR('#1: +(\"-1234567890\") === -Number(\"1234567890\")');\n}\n",
+ "id": "S9.3.1_A15"
+ },
+ {
+ "section": "9.3.1, 15.7.1",
+ "description": "Compare Number('0x0') and Number('0X0') with 0",
+ "test": "// CHECK#1\nif (Number(\"0\") !== 0) {\n $ERROR('#1: Number(\"0\") === 0. Actual: ' + (Number(\"0\")));\n}\n\n// CHECK#2\nif (+(\"0x0\") !== 0) {\n $ERROR('#2: +(\"0x0\") === 0. Actual: ' + (+(\"0x0\")));\n}\n\n// CHECK#3\nif (Number(\"0X0\") !== 0) {\n $ERROR('#3: Number(\"0X0\") === 0. Actual: ' + (Number(\"0X0\")));\n}\n",
+ "id": "S9.3.1_A16"
+ },
+ {
+ "section": "9.3.1, 15.7.1",
+ "description": "Compare Number('0x1') and Number('0X1') with 1",
+ "test": "// CHECK#1\nif (Number(\"1\") !== 1) {\n $ERROR('#1: Number(\"1\") === 1. Actual: ' + (Number(\"1\")));\n}\n\n// CHECK#2\nif (Number(\"0x1\") !== 1) {\n $ERROR('#2: Number(\"0x1\") === 1. Actual: ' + (Number(\"0x1\")));\n}\n\n// CHECK#3\nif (+(\"0X1\") !== 1) {\n $ERROR('#3: +(\"0X1\") === 1. Actual: ' + (+(\"0X1\")));\n}\n",
+ "id": "S9.3.1_A17"
+ },
+ {
+ "section": "9.3.1, 15.7.1",
+ "description": "Compare Number('0x2') and Number('0X2') with 2",
+ "test": "// CHECK#1\nif (+(\"2\") !== 2) {\n $ERROR('#1: +(\"2\") === 2. Actual: ' + (+(\"2\")));\n}\n\n// CHECK#2\nif (Number(\"0x2\") !== 2) {\n $ERROR('#2: Number(\"0x2\") === 2. Actual: ' + (Number(\"0x2\")));\n}\n\n// CHECK#3\nif (Number(\"0X2\") !== 2) {\n $ERROR('#3: Number(\"0X2\") === 2. Actual: ' + (Number(\"0X2\")));\n}\n",
+ "id": "S9.3.1_A18"
+ },
+ {
+ "section": "9.3.1, 15.7.1",
+ "description": "Compare Number('0x3') and Number('0X3') with 3",
+ "test": "// CHECK#1\nif (Number(\"3\") !== 3) {\n $ERROR('#1: Number(\"3\") === 3. Actual: ' + (Number(\"3\")));\n}\n\n// CHECK#2\nif (+(\"0x3\") !== 3) {\n $ERROR('#2: +(\"0x3\") === 3. Actual: ' + (+(\"0x3\")));\n}\n\n// CHECK#3\nif (Number(\"0X3\") !== 3) {\n $ERROR('#3: Number(\"0X3\") === 3. Actual: ' + (Number(\"0X3\")));\n}\n",
+ "id": "S9.3.1_A19"
+ },
+ {
+ "section": "9.3.1, 15.7.1",
+ "description": "Strings with various WhiteSpaces convert to Number by explicit transformation",
+ "test": "// CHECK#1\nif (Number(\"\\u0009\\u000C\\u0020\\u00A0\\u000B\\u000A\\u000D\\u2028\\u2029\\u1680\\u180E\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u202F\\u205F\\u3000\") !== 0) {\n $ERROR('#1.1: Number(\"\\\\u0009\\\\u000C\\\\u0020\\\\u00A0\\\\u000B\\\\u000A\\\\u000D\\\\u2028\\\\u2029\\\\u1680\\\\u180E\\\\u2000\\\\u2001\\\\u2002\\\\u2003\\\\u2004\\\\u2005\\\\u2006\\\\u2007\\\\u2008\\\\u2009\\\\u200A\\\\u202F\\\\u205F\\\\u3000\") === 0. Actual: ' + (Number(\"\\u0009\\u000C\\u0020\\u00A0\\u000B\\u000A\\u000D\\u2028\\u2029\\u1680\\u180E\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u202F\\u205F\\u3000\")));\n} else {\n if (1/Number(\"\\u0009\\u000C\\u0020\\u00A0\\u000B\\u000A\\u000D\\u2028\\u2029\\u1680\\u180E\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u202F\\u205F\\u3000\") !== Number.POSITIVE_INFINITY) {\n $ERROR('#1.2: Number(\"\\\\u0009\\\\u000C\\\\u0020\\\\u00A0\\\\u000B\\\\u000A\\\\u000D\\\\u2028\\\\u2029\\\\u1680\\\\u180E\\\\u2000\\\\u2001\\\\u2002\\\\u2003\\\\u2004\\\\u2005\\\\u2006\\\\u2007\\\\u2008\\\\u2009\\\\u200A\\\\u202F\\\\u205F\\\\u3000\") === +0. Actual: -0');\n }\t\n}\n\n// CHECK#2\nif (Number(\" \") !== 0) {\n $ERROR('#2.1: Number(\" \") === 0. Actual: ' + (Number(\" \")));\n} else {\n if (1/Number(\" \") !== Number.POSITIVE_INFINITY) {\n $ERROR('#2.2: Number(\" \") === +0. Actual: -0');\n }\t\n}\n\n// CHECK#3\nif (Number(\"\\t\") !== 0) {\n $ERROR('#3.1: Number(\"\\\\t\") === 0. Actual: ' + (Number(\"\\t\")));\n} else {\n if (1/Number(\"\\t\") !== Number.POSITIVE_INFINITY) {\n $ERROR('#3.2: Number(\"\\\\t\") === +0. Actual: -0');\n }\t\n}\n\n// CHECK#4\nif (Number(\"\\r\") !== 0) {\n $ERROR('#4.1: Number(\"\\\\r\") === 0. Actual: ' + (Number(\"\\r\")));\n} else {\n if (1/Number(\"\\r\") !== Number.POSITIVE_INFINITY) {\n $ERROR('#4.2: Number(\"\\\\r\") === +0. Actual: -0');\n }\t\n}\n\n// CHECK#5\nif (Number(\"\\n\") !== 0) {\n $ERROR('#5.1: Number(\"\\\\n\") === 0. Actual: ' + (Number(\"\\n\")));\n} else {\n if (1/Number(\"\\n\") !== Number.POSITIVE_INFINITY) {\n $ERROR('#5.2: Number(\"\\\\n\") === +0. Actual: -0');\n }\t\n}\n\n// CHECK#6\nif (Number(\"\\f\") !== 0) {\n $ERROR('#6.1: Number(\"\\\\f\") === 0. Actual: ' + (Number(\"\\f\")));\n} else {\n if (1/Number(\"\\f\") !== Number.POSITIVE_INFINITY) {\n $ERROR('#6.2: Number(\"\\\\f\") === +0. Actual: -0');\n }\t\n}\n\n// CHECK#7\nif (Number(\"\\u0009\") !== 0) {\n $ERROR('#7.1: Number(\"\\\\u0009\") === 0. Actual: ' + (Number(\"\\u0009\")));\n} else {\n if (1/Number(\"\\u0009\") !== Number.POSITIVE_INFINITY) {\n $ERROR('#7.2: Number(\"\\\\u0009\") === +0. Actual: -0');\n }\t\n}\n\n// CHECK#8\nif (Number(\"\\u000A\") !== 0) {\n $ERROR('#8.1: Number(\"\\\\u000A\") === 0. Actual: ' + (Number(\"\\u000A\")));\n} else {\n if (1/Number(\"\\u000A\") !== Number.POSITIVE_INFINITY) {\n $ERROR('#8.2: Number(\"\\\\u000A\") === +0. Actual: -0');\n }\t\n}\n\n// CHECK#9\nif (Number(\"\\u000B\") !== 0) {\n $ERROR('#9.1: Number(\"\\\\u000B\") === 0. Actual: ' + (Number(\"\\u000B\")));\n} else {\n if (1/Number(\"\\u000B\") !== Number.POSITIVE_INFINITY) {\n $ERROR('#9.1.2: Number(\"\\\\u000B\") === +0. Actual: -0');\n }\t\n}\n\n// CHECK#10\nif (Number(\"\\u000C\") !== 0) {\n $ERROR('#10.1: Number(\"\\\\u000C\") === 0. Actual: ' + (Number(\"\\u000C\")));\n} else {\n if (1/Number(\"\\u000C\") !== Number.POSITIVE_INFINITY) {\n $ERROR('#10.2: Number(\"\\\\u000C\") === +0. Actual: -0');\n }\t\n}\n\n// CHECK#11\nif (Number(\"\\u000D\") !== 0) {\n $ERROR('#11.1: Number(\"\\\\u000D\") === 0. Actual: ' + (Number(\"\\u000D\")));\n} else {\n if (1/Number(\"\\u000D\") !== Number.POSITIVE_INFINITY) {\n $ERROR('#11.2: Number(\"\\\\u000D\") === +0. Actual: -0');\n }\t\n}\n\n// CHECK#12\nif (Number(\"\\u00A0\") !== 0) {\n $ERROR('#12.1: Number(\"\\\\u00A0\") === 0. Actual: ' + (Number(\"\\u00A0\")));\n} else {\n if (1/Number(\"\\u00A0\") !== Number.POSITIVE_INFINITY) {\n $ERROR('#12.2: Number(\"\\\\u00A0\") === +0. Actual: -0');\n }\t\n}\n\n// CHECK#13\nif (Number(\"\\u0020\") !== 0) {\n $ERROR('#13.1: Number(\"\\\\u0020\") === 0. Actual: ' + (Number(\"\\u0020\")));\n} else {\n if (1/Number(\"\\u0020\") !== Number.POSITIVE_INFINITY) {\n $ERROR('#13.2: Number(\"\\\\u0020\") === +0. Actual: -0');\n }\t\n}\n\n// CHECK#14\nif (Number(\"\\u2028\") !== 0) {\n $ERROR('#14.1: Number(\"\\\\u2028\") === 0. Actual: ' + (Number(\"\\u2028\")));\n} else {\n if (1/Number(\"\\u2028\") !== Number.POSITIVE_INFINITY) {\n $ERROR('#14.2: Number(\"\\\\u2028\") === +0. Actual: -0');\n }\t\n}\n\n// CHECK#15\nif (Number(\"\\u2029\") !== 0) {\n $ERROR('#15.1: Number(\"\\\\u2029\") === 0. Actual: ' + (Number(\"\\u2029\")));\n} else {\n if (1/Number(\"\\u2029\") !== Number.POSITIVE_INFINITY) {\n $ERROR('#15.2: Number(\"\\\\u2029\") === +0. Actual: -0');\n }\t\n}\n\n// CHECK#16\nif (Number(\"\\u1680\") !== 0) {\n $ERROR('#16.1: Number(\"\\\\u1680\") === 0. Actual: ' + (Number(\"\\u1680\")));\n} else {\n if (1/Number(\"\\u1680\") !== Number.POSITIVE_INFINITY) {\n $ERROR('#16.2: Number(\"\\\\u1680\") === +0. Actual: -0');\n }\t\n}\n\n// CHECK#17\nif (Number(\"\\u180E\") !== 0) {\n $ERROR('#17.1: Number(\"\\\\u180E\") === 0. Actual: ' + (Number(\"\\u180E\")));\n} else {\n if (1/Number(\"\\u180E\") !== Number.POSITIVE_INFINITY) {\n $ERROR('#17.2: Number(\"\\\\u180E\") === +0. Actual: -0');\n }\t\n}\n\n// CHECK#18\nif (Number(\"\\u2000\") !== 0) {\n $ERROR('#18.1: Number(\"\\\\u2000\") === 0. Actual: ' + (Number(\"\\u2000\")));\n} else {\n if (1/Number(\"\\u2000\") !== Number.POSITIVE_INFINITY) {\n $ERROR('#18.2: Number(\"\\\\u2000\") === +0. Actual: -0');\n }\t\n}\n\n// CHECK#19\nif (Number(\"\\u2001\") !== 0) {\n $ERROR('#19.1: Number(\"\\\\u2001\") === 0. Actual: ' + (Number(\"\\u2001\")));\n} else {\n if (1/Number(\"\\u2001\") !== Number.POSITIVE_INFINITY) {\n $ERROR('#19.2: Number(\"\\\\u2001\") === +0. Actual: -0');\n }\t\n}\n\n// CHECK#20\nif (Number(\"\\u2002\") !== 0) {\n $ERROR('#20.1: Number(\"\\\\u2002\") === 0. Actual: ' + (Number(\"\\u2002\")));\n} else {\n if (1/Number(\"\\u2002\") !== Number.POSITIVE_INFINITY) {\n $ERROR('#20.2: Number(\"\\\\u2002\") === +0. Actual: -0');\n }\t\n}\n\n// CHECK#21\nif (Number(\"\\u2003\") !== 0) {\n $ERROR('#21.1: Number(\"\\\\u2003\") === 0. Actual: ' + (Number(\"\\u2003\")));\n} else {\n if (1/Number(\"\\u2003\") !== Number.POSITIVE_INFINITY) {\n $ERROR('#21.2: Number(\"\\\\u2003\") === +0. Actual: -0');\n }\t\n}\n\n// CHECK#22\nif (Number(\"\\u2004\") !== 0) {\n $ERROR('#22.1: Number(\"\\\\u2004\") === 0. Actual: ' + (Number(\"\\u2004\")));\n} else {\n if (1/Number(\"\\u2004\") !== Number.POSITIVE_INFINITY) {\n $ERROR('#22.2: Number(\"\\\\u2004\") === +0. Actual: -0');\n }\t\n}\n\n// CHECK#23\nif (Number(\"\\u2005\") !== 0) {\n $ERROR('#23.1: Number(\"\\\\u2005\") === 0. Actual: ' + (Number(\"\\u2005\")));\n} else {\n if (1/Number(\"\\u2005\") !== Number.POSITIVE_INFINITY) {\n $ERROR('#23.2: Number(\"\\\\u2005\") === +0. Actual: -0');\n }\t\n}\n\n// CHECK#24\nif (Number(\"\\u2006\") !== 0) {\n $ERROR('#24.1: Number(\"\\\\u2006\") === 0. Actual: ' + (Number(\"\\u2006\")));\n} else {\n if (1/Number(\"\\u2006\") !== Number.POSITIVE_INFINITY) {\n $ERROR('#24.2: Number(\"\\\\u2006\") === +0. Actual: -0');\n }\t\n}\n\n// CHECK#25\nif (Number(\"\\u2007\") !== 0) {\n $ERROR('#25.1: Number(\"\\\\u2007\") === 0. Actual: ' + (Number(\"\\u2007\")));\n} else {\n if (1/Number(\"\\u2007\") !== Number.POSITIVE_INFINITY) {\n $ERROR('#25.2: Number(\"\\\\u2007\") === +0. Actual: -0');\n }\t\n}\n\n// CHECK#26\nif (Number(\"\\u2008\") !== 0) {\n $ERROR('#26.1: Number(\"\\\\u2008\") === 0. Actual: ' + (Number(\"\\u2008\")));\n} else {\n if (1/Number(\"\\u2008\") !== Number.POSITIVE_INFINITY) {\n $ERROR('#26.2: Number(\"\\\\u2008\") === +0. Actual: -0');\n }\t\n}\n\n// CHECK#27\nif (Number(\"\\u2009\") !== 0) {\n $ERROR('#27.1: Number(\"\\\\u2009\") === 0. Actual: ' + (Number(\"\\u2009\")));\n} else {\n if (1/Number(\"\\u2009\") !== Number.POSITIVE_INFINITY) {\n $ERROR('#27.2: Number(\"\\\\u2009\") === +0. Actual: -0');\n }\t\n}\n\n// CHECK#28\nif (Number(\"\\u200A\") !== 0) {\n $ERROR('#28.1: Number(\"\\\\u200A\") === 0. Actual: ' + (Number(\"\\u200A\")));\n} else {\n if (1/Number(\"\\u200A\") !== Number.POSITIVE_INFINITY) {\n $ERROR('#28.2: Number(\"\\\\u200A\") === +0. Actual: -0');\n }\t\n}\n\n// CHECK#29\nif (Number(\"\\u202F\") !== 0) {\n $ERROR('#29.1: Number(\"\\\\u202F\") === 0. Actual: ' + (Number(\"\\u202F\")));\n} else {\n if (1/Number(\"\\u202F\") !== Number.POSITIVE_INFINITY) {\n $ERROR('#29.2: Number(\"\\\\u202F\") === +0. Actual: -0');\n }\t\n}\n\n// CHECK#30\nif (Number(\"\\u205F\") !== 0) {\n $ERROR('#30.1: Number(\"\\\\u205F\") === 0. Actual: ' + (Number(\"\\u205F\")));\n} else {\n if (1/Number(\"\\u205F\") !== Number.POSITIVE_INFINITY) {\n $ERROR('#30.2: Number(\"\\\\u205F\") === +0. Actual: -0');\n }\t\n}\n\n// CHECK#31\nif (Number(\"\\u3000\") !== 0) {\n $ERROR('#31.1: Number(\"\\\\u3000\") === 0. Actual: ' + (Number(\"\\u3000\")));\n} else {\n if (1/Number(\"\\u3000\") !== Number.POSITIVE_INFINITY) {\n $ERROR('#31.2: Number(\"\\\\u3000\") === +0. Actual: -0');\n }\t\n}\n",
+ "id": "S9.3.1_A2"
+ },
+ {
+ "section": "9.3.1, 15.7.1",
+ "description": "Compare Number('0x4') and Number('0X4') with 4",
+ "test": "// CHECK#1\nif (Number(\"4\") !== 4) {\n $ERROR('#1: Number(\"4\") === 4. Actual: ' + (Number(\"4\")));\n}\n\n// CHECK#2\nif (Number(\"0x4\") !== 4) {\n $ERROR('#2: Number(\"0x4\") === 4. Actual: ' + (Number(\"0x4\")));\n}\n\n// CHECK#3\nif (+(\"0X4\") !== 4) {\n $ERROR('#3: +(\"0X4\") === 4. Actual: ' + (+(\"0X4\")));\n}\n",
+ "id": "S9.3.1_A20"
+ },
+ {
+ "section": "9.3.1, 15.7.1",
+ "description": "Compare Number('0x5') and Number('0X5') with 5",
+ "test": "// CHECK#1\nif (+(\"5\") !== 5) {\n $ERROR('#1: +(\"5\") === 5. Actual: ' + (+(\"5\")));\n}\n\n// CHECK#2\nif (Number(\"0x5\") !== 5) {\n $ERROR('#2: Number(\"0x5\") === 5. Actual: ' + (Number(\"0x5\")));\n}\n\n// CHECK#3\nif (Number(\"0X5\") !== 5) {\n $ERROR('#3: Number(\"0X5\") === 5. Actual: ' + (Number(\"0X5\")));\n}\n",
+ "id": "S9.3.1_A21"
+ },
+ {
+ "section": "9.3.1, 15.7.1",
+ "description": "Compare Number('0x6') and Number('0X6') with 6",
+ "test": "// CHECK#1\nif (Number(\"6\") !== 6) {\n $ERROR('#1: Number(\"6\") === 6. Actual: ' + (Number(\"6\")));\n}\n\n// CHECK#2\nif (+(\"0x6\") !== 6) {\n $ERROR('#2: +(\"0x6\") === 6. Actual: ' + (+(\"0x6\")));\n}\n\n// CHECK#3\nif (Number(\"0X6\") !== 6) {\n $ERROR('#3: Number(\"0X6\") === 6. Actual: ' + (Number(\"0X6\")));\n}\n",
+ "id": "S9.3.1_A22"
+ },
+ {
+ "section": "9.3.1, 15.7.1",
+ "description": "Compare Number('0x7') and Number('0X7') with 7",
+ "test": "// CHECK#1\nif (Number(\"7\") !== 7) {\n $ERROR('#1: Number(\"7\") === 7. Actual: ' + (Number(\"7\")));\n}\n\n// CHECK#2\nif (Number(\"0x7\") !== 7) {\n $ERROR('#2: Number(\"0x7\") === 7. Actual: ' + (Number(\"0x7\")));\n}\n\n// CHECK#3\nif (+(\"0X7\") !== 7) {\n $ERROR('#3: +(\"0X7\") === 7. Actual: ' + (+(\"0X7\")));\n}\n",
+ "id": "S9.3.1_A23"
+ },
+ {
+ "section": "9.3.1, 15.7.1",
+ "description": "Compare Number('0x8') and Number('0X8') with 8",
+ "test": "// CHECK#1\nif (+(\"8\") !== 8) {\n $ERROR('#1: +(\"8\") === 8. Actual: ' + (+(\"8\")));\n}\n\n// CHECK#2\nif (Number(\"0x8\") !== 8) {\n $ERROR('#2: Number(\"0x8\") === 8. Actual: ' + (Number(\"0x8\")));\n}\n\n// CHECK#3\nif (Number(\"0X8\") !== 8) {\n $ERROR('#3: Number(\"0X8\") === 8. Actual: ' + (Number(\"0X8\")));\n}\n",
+ "id": "S9.3.1_A24"
+ },
+ {
+ "section": "9.3.1, 15.7.1",
+ "description": "Compare Number('0x9') and Number('0X9') with 9",
+ "test": "// CHECK#1\nif (Number(\"9\") !== 9) {\n $ERROR('#1: Number(\"9\") === 9. Actual: ' + (Number(\"9\")));\n}\n\n// CHECK#2\nif (+(\"0x9\") !== 9) {\n $ERROR('#2: +(\"0x9\") === 9. Actual: ' + (+(\"0x9\")));\n}\n\n// CHECK#3\nif (Number(\"0X9\") !== 9) {\n $ERROR('#3: Number(\"0X9\") === 9. Actual: ' + (Number(\"0X9\")));\n}\n",
+ "id": "S9.3.1_A25"
+ },
+ {
+ "section": "9.3.1, 15.7.1",
+ "description": "Compare Number('0xA'), Number('0XA'), Number('0xa') and Number('0Xa') with 10",
+ "test": "// CHECK#1\nif (Number(\"0xa\") !== 10) {\n $ERROR('#1: Number(\"0xa\") === 10. Actual: ' + (Number(\"0xa\")));\n}\n\n// CHECK#2\nif (Number(\"0xA\") !== 10) {\n $ERROR('#2: Number(\"0xA\") === 10. Actual: ' + (Number(\"0xA\")));\n}\n\n// CHECK#3\nif (Number(\"0Xa\") !== 10) {\n $ERROR('#3: Number(\"0Xa\") === 10. Actual: ' + (Number(\"0Xa\")));\n}\n\n// CHECK#4\nif (+(\"0XA\") !== 10) {\n $ERROR('#4: +(\"0XA\") === 10. Actual: ' + (+(\"0XA\")));\n}\n",
+ "id": "S9.3.1_A26"
+ },
+ {
+ "section": "9.3.1, 15.7.1",
+ "description": "Compare Number('0xB'), Number('0XB'), Number('0xb') and Number('0Xb') with 11",
+ "test": "// CHECK#1\nif (Number(\"0xb\") !== 11) {\n $ERROR('#1: Number(\"0xb\") === 11. Actual: ' + (Number(\"0xb\")));\n}\n\n// CHECK#2\nif (Number(\"0xB\") !== 11) {\n $ERROR('#2: Number(\"0xB\") === 11. Actual: ' + (Number(\"0xB\")));\n}\n\n// CHECK#3\nif (+(\"0Xb\") !== 11) {\n $ERROR('#3: +(\"0Xb\") === 11. Actual: ' + (+(\"0Xb\")));\n}\n\n// CHECK#4\nif (Number(\"0XB\") !== 11) {\n $ERROR('#4: Number(\"0XB\") === 11. Actual: ' + (Number(\"0XB\")));\n}\n",
+ "id": "S9.3.1_A27"
+ },
+ {
+ "section": "9.3.1, 15.7.1",
+ "description": "Compare Number('0xC'), Number('0XC'), Number('0xc') and Number('0Xc') with 12",
+ "test": "// CHECK#1\nif (Number(\"0xc\") !== 12) {\n $ERROR('#1: Number(\"0xc\") === 12. Actual: ' + (Number(\"0xc\")));\n}\n\n// CHECK#2\nif (+(\"0xC\") !== 12) {\n $ERROR('#2: +(\"0xC\") === 12. Actual: ' + (+(\"0xC\")));\n}\n\n// CHECK#3\nif (Number(\"0Xc\") !== 12) {\n $ERROR('#3: Number(\"0Xc\") === 12. Actual: ' + (Number(\"0Xc\")));\n}\n\n// CHECK#4\nif (Number(\"0XC\") !== 12) {\n $ERROR('#4: Number(\"0XC\") === 12. Actual: ' + (Number(\"0XC\")));\n}\n",
+ "id": "S9.3.1_A28"
+ },
+ {
+ "section": "9.3.1, 15.7.1",
+ "description": "Compare Number('0xD'), Number('0XD'), Number('0xd') and Number('0Xd') with 13",
+ "test": "// CHECK#1\nif (+(\"0xd\") !== 13) {\n $ERROR('#1: +(\"0xd\") === 13. Actual: ' + (+(\"0xd\")));\n}\n\n// CHECK#2\nif (Number(\"0xD\") !== 13) {\n $ERROR('#2: Number(\"0xD\") === 13. Actual: ' + (Number(\"0xD\")));\n}\n\n// CHECK#3\nif (Number(\"0Xd\") !== 13) {\n $ERROR('#3: Number(\"0Xd\") === 13. Actual: ' + (Number(\"0Xd\")));\n}\n\n// CHECK#4\nif (Number(\"0XD\") !== 13) {\n $ERROR('#4: Number(\"0XD\") === 13. Actual: ' + (Number(\"0XD\")));\n}\n",
+ "id": "S9.3.1_A29"
+ },
+ {
+ "section": "9.3.1, 15.7.1",
+ "description": "Compare Number('0xE'), Number('0XE'), Number('0xe') and Number('0Xe') with 14",
+ "test": "// CHECK#1\nif (Number(\"0xe\") !== 14) {\n $ERROR('#1: Number(\"0xe\") === 14. Actual: ' + (Number(\"0xe\")));\n}\n\n// CHECK#2\nif (Number(\"0xE\") !== 14) {\n $ERROR('#2: Number(\"0xE\") === 14. Actual: ' + (Number(\"0xE\")));\n}\n\n// CHECK#3\nif (Number(\"0Xe\") !== 14) {\n $ERROR('#3: Number(\"0Xe\") === 14. Actual: ' + (Number(\"0Xe\")));\n}\n\n// CHECK#4\nif (+(\"0XE\") !== 14) {\n $ERROR('#4: +(\"0XE\") === 14. Actual: ' + (+(\"0XE\")));\n}\n",
+ "id": "S9.3.1_A30"
+ },
+ {
+ "section": "9.3.1, 15.7.1",
+ "description": "Compare Number('0xF'), Number('0XF'), Number('0xf') and Number('0Xf') with 15",
+ "test": "// CHECK#1\nif (Number(\"0xf\") !== 15) {\n $ERROR('#1: Number(\"0xf\") === 15. Actual: ' + (Number(\"0xf\")));\n}\n\n// CHECK#2\nif (Number(\"0xF\") !== 15) {\n $ERROR('#2: Number(\"0xF\") === 15. Actual: ' + (Number(\"0xF\")));\n}\n\n// CHECK#3\nif (+(\"0Xf\") !== 15) {\n $ERROR('#3: +(\"0Xf\") === 15. Actual: ' + (+(\"0Xf\")));\n}\n\n// CHECK#4\nif (Number(\"0XF\") !== 15) {\n $ERROR('#4: Number(\"0XF\") === 15. Actual: ' + (Number(\"0XF\")));\n}\n",
+ "id": "S9.3.1_A31"
+ },
+ {
+ "section": "9.3.1",
+ "description": "Use various long numbers, for example, 1234567890.1234567890",
+ "test": "// CHECK#1\nif (Number(\"1234567890.1234567890\") !== 1234567890.1234567890) {\n $ERROR('#1: Number(\"1234567890.1234567890\") === 1234567890.1234567890. Actual: ' + (Number(\"1234567890.1234567890\")));\n}\n\n// CHECK#2\nif (Number(\"1234567890.1234567890\") !== 1234567890.1234567000) {\n $ERROR('#2: Number(\"1234567890.1234567890\") === 1234567890.1234567000. Actual: ' + (Number(\"1234567890.1234567890\")));\n}\n\n// CHECK#3\nif (+(\"1234567890.1234567890\") === 1234567890.123456) {\n $ERROR('#3: +(\"1234567890.1234567890\") !== 1234567890.123456');\n}\n\n// CHECK#4\nif (Number(\"0.12345678901234567890\") !== 0.123456789012345678) {\n $ERROR('#4: Number(\"0.12345678901234567890\") === 0.123456789012345678. Actual: ' + (Number(\"0.12345678901234567890\")));\n}\n\n// CHECK#4\nif (Number(\"00.12345678901234567890\") !== 0.123456789012345678) {\n $ERROR('#4: Number(\"00.12345678901234567890\") === 0.123456789012345678. Actual: ' + (Number(\"00.12345678901234567890\")));\n}\n",
+ "id": "S9.3.1_A32"
+ },
+ {
+ "section": "9.3.1, 15.7.1",
+ "description": "static string",
+ "test": "// CHECK#1\nif (Number(\"\\u0009\\u000C\\u0020\\u00A0\\u000B\\u000A\\u000D\\u2028\\u2029\\u1680\\u180E\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u202F\\u205F\\u3000\") !== Number(\"\")) {\n $ERROR('#1: Number(\"\\\\u0009\\\\u000C\\\\u0020\\\\u00A0\\\\u000B\\\\u000A\\\\u000D\\\\u2028\\\\u2029\\\\u1680\\\\u180E\\\\u2000\\\\u2001\\\\u2002\\\\u2003\\\\u2004\\\\u2005\\\\u2006\\\\u2007\\\\u2008\\\\u2009\\\\u200A\\\\u202F\\\\u205F\\\\u3000\") === Number(\"\")');\n}\n\n// CHECK#2\nif (Number(\"\\u0009\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u2029\\u000B\\u1680\\u180E\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u202F\\u205F\\u30001234567890\\u0009\\u000C\\u0020\\u00A0\\u000B\\u000A\\u000D\\u2028\\u2029\\u1680\\u180E\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u202F\\u205F\\u3000\") !== Number(\"1234567890\")) {\n $ERROR('#2: Number(\"\\\\u0009\\\\u000C\\\\u0020\\\\u00A0\\\\u000A\\\\u000D\\\\u2028\\\\u2029\\\\u000B\\\\u1680\\\\u180E\\\\u2000\\\\u2001\\\\u2002\\\\u2003\\\\u2004\\\\u2005\\\\u2006\\\\u2007\\\\u2008\\\\u2009\\\\u200A\\\\u202F\\\\u205F\\\\u30001234567890\\\\u0009\\\\u000C\\\\u0020\\\\u00A0\\\\u000B\\\\u000A\\\\u000D\\\\u2028\\\\u2029\\\\u1680\\\\u180E\\\\u2000\\\\u2001\\\\u2002\\\\u2003\\\\u2004\\\\u2005\\\\u2006\\\\u2007\\\\u2008\\\\u2009\\\\u200A\\\\u202F\\\\u205F\\\\u3000\") === Number(\"1234567890\")');\n}\n\n// CHECK#3\nif (!(+(\"\\u0009\\u000C\\u0020\\u00A0\\u000B\\u000A\\u000D\\u2028\\u2029\\u1680\\u180E\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u202F\\u205F\\u3000Infinity\\u0009\\u000C\\u0020\\u00A0\\u000B\\u000A\\u000D\\u2028\\u2029\\u1680\\u180E\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u202F\\u205F\\u3000\") == Number(\"Infinity\"))) {\n $ERROR('#3: +(\"\\\\u0009\\\\u000C\\\\u0020\\\\u00A0\\\\u000B\\\\u000A\\\\u000D\\\\u2028\\\\u2029\\\\u1680\\\\u180E\\\\u2000\\\\u2001\\\\u2002\\\\u2003\\\\u2004\\\\u2005\\\\u2006\\\\u2007\\\\u2008\\\\u2009\\\\u200A\\\\u202F\\\\u205F\\\\u3000Infinity\\\\u0009\\\\u000C\\\\u0020\\\\u00A0\\\\u000B\\\\u000A\\\\u000D\\\\u2028\\\\u2029\\\\u1680\\\\u180E\\\\u2000\\\\u2001\\\\u2002\\\\u2003\\\\u2004\\\\u2005\\\\u2006\\\\u2007\\\\u2008\\\\u2009\\\\u200A\\\\u202F\\\\u205F\\\\u3000\") == Number(\"Infinity\")');\n}\n\n// CHECK#4\nif (!(Number(\"\\u0009\\u000C\\u0020\\u00A0\\u000B\\u000A\\u000D\\u2028\\u2029\\u1680\\u180E\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u202F\\u205F\\u3000-Infinity\\u0009\\u000C\\u0020\\u00A0\\u000B\\u000A\\u000D\\u2028\\u2029\\u1680\\u180E\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u202F\\u205F\\u3000\") == Number(-\"Infinity\"))) {\n $ERROR('#4: Number(\"\\\\u0009\\\\u000C\\\\u0020\\\\u00A0\\\\u000B\\\\u000A\\\\u000D\\\\u2028\\\\u2029\\\\u1680\\\\u180E\\\\u2000\\\\u2001\\\\u2002\\\\u2003\\\\u2004\\\\u2005\\\\u2006\\\\u2007\\\\u2008\\\\u2009\\\\u200A\\\\u202F\\\\u205F\\\\u3000-Infinity\\\\u0009\\\\u000C\\\\u0020\\\\u00A0\\\\u000B\\\\u000A\\\\u000D\\\\u2028\\\\u2029\\\\u1680\\\\u180E\\\\u2000\\\\u2001\\\\u2002\\\\u2003\\\\u2004\\\\u2005\\\\u2006\\\\u2007\\\\u2008\\\\u2009\\\\u200A\\\\u202F\\\\u205F\\\\u3000\") == Number(\"-Infinity\")');\n}\n",
+ "id": "S9.3.1_A3_T1"
+ },
+ {
+ "section": "9.3.1, 15.7.1",
+ "description": "dynamic string",
+ "test": "function dynaString(s1, s2){\n return String(s1)+String(s2);\n}\n\n// CHECK#1\nif (Number(dynaString(\"\\u0009\\u000C\\u0020\\u00A0\\u000B\", \"\\u000A\\u000D\\u2028\\u2029\\u1680\\u180E\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u202F\\u205F\\u3000\")) !== Number(\"\")) {\n $ERROR('#1: Number(\"\\\\u0009\\\\u000C\\\\u0020\\\\u00A0\\\\u000B\"+\"\\\\u000A\\\\u000D\\\\u2028\\\\u2029\\\\u1680\\\\u180E\\\\u2000\\\\u2001\\\\u2002\\\\u2003\\\\u2004\\\\u2005\\\\u2006\\\\u2007\\\\u2008\\\\u2009\\\\u200A\\\\u202F\\\\u205F\\\\u3000\") === Number(\"\")');\n}\n\n// CHECK#2\nif (+(dynaString(\"\\u0009\\u000C\\u0020\\u00A0\\u000A\\u000D\\u2028\\u2029\\u000B12345\", \"67890\\u0009\\u000C\\u0020\\u00A0\\u000B\\u000A\\u000D\\u2028\\u2029\\u1680\\u180E\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u202F\\u205F\\u3000\")) !== Number(\"1234567890\")) {\n $ERROR('#2: +(\"\\\\u0009\\\\u000C\\\\u0020\\\\u00A0\\\\u000A\\\\u000D\\\\u2028\\\\u2029\\\\u000B12345\"+\"67890\\\\u0009\\\\u000C\\\\u0020\\\\u00A0\\\\u000B\\\\u000A\\\\u000D\\\\u2028\\\\u2029\\\\u1680\\\\u180E\\\\u2000\\\\u2001\\\\u2002\\\\u2003\\\\u2004\\\\u2005\\\\u2006\\\\u2007\\\\u2008\\\\u2009\\\\u200A\\\\u202F\\\\u205F\\\\u3000\") === Number(\"1234567890\")');\n}\n\n// CHECK#3\nif (!(Number(dynaString(\"\\u0009\\u000C\\u0020\\u00A0\\u000B\\u000A\\u000D\\u2028\\u2029Infi\", \"nity\\u0009\\u000C\\u0020\\u00A0\\u000B\\u000A\\u000D\\u2028\\u2029\\u1680\\u180E\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u202F\\u205F\\u3000\")) == Number(\"Infinity\"))) {\n $ERROR('#3: Number(\"\\\\u0009\\\\u000C\\\\u0020\\\\u00A0\\\\u000B\\\\u000A\\\\u000D\\\\u2028\\\\u2029Infi\"+\"nity\\\\u0009\\\\u000C\\\\u0020\\\\u00A0\\\\u000B\\\\u000A\\\\u000D\\\\u2028\\\\u2029\\\\u1680\\\\u180E\\\\u2000\\\\u2001\\\\u2002\\\\u2003\\\\u2004\\\\u2005\\\\u2006\\\\u2007\\\\u2008\\\\u2009\\\\u200A\\\\u202F\\\\u205F\\\\u3000\") == Number(\"Infinity\")');\n}\n\n// CHECK#4\nif (!(Number(dynaString(\"\\u0009\\u000C\\u0020\\u00A0\\u000B\\u000A\\u000D\\u2028\\u2029-Infi\", \"nity\\u0009\\u000C\\u0020\\u00A0\\u000B\\u000A\\u000D\\u2028\\u2029\\u1680\\u180E\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u202F\\u205F\\u3000\")) == Number(-\"Infinity\"))) {\n $ERROR('#4: Number(\"\\\\u0009\\\\u000C\\\\u0020\\\\u00A0\\\\u000B\\\\u000A\\\\u000D\\\\u2028\\\\u2029-Infi\"+\"nity\\\\u0009\\\\u000C\\\\u0020\\\\u00A0\\\\u000B\\\\u000A\\\\u000D\\\\u2028\\\\u2029\\\\u1680\\\\u180E\\\\u2000\\\\u2001\\\\u2002\\\\u2003\\\\u2004\\\\u2005\\\\u2006\\\\u2007\\\\u2008\\\\u2009\\\\u200A\\\\u202F\\\\u205F\\\\u3000\") == Number(\"-Infinity\")');\n}\n",
+ "id": "S9.3.1_A3_T2"
+ },
+ {
+ "section": "9.3.1, 15.7.1",
+ "description": "Compare Number('+any_number') with Number('any_number')",
+ "test": "// CHECK#1\nif (Number(\"+0\") !== Number(\"0\")) {\n $ERROR('#1.1: Number(\"+0\") === Number(\"0\")');\n} else {\n // CHECK#2\n if (1/Number(\"+0\") !== 1/Number(\"0\")) {\n $ERROR('#2.2: 1/Number(\"+0\") === 1/Number(\"0\")');\n }\n}\n\n// CHECK#3\nif (Number(\"+Infinity\") !== Number(\"Infinity\")) {\n $ERROR('#3: Number(\"+Infinity\") === Number(\"Infinity\")');\n}\n\n// CHECK#4\nif (Number(\"+1234.5678\") !== Number(\"1234.5678\")) {\n $ERROR('#4: Number(\"+1234.5678\") === Number(\"1234.5678\")');\n}\n\n// CHECK#5\nif (Number(\"+1234.5678e90\") !== Number(\"1234.5678e90\")) {\n $ERROR('#5: Number(\"+1234.5678e90\") === Number(\"1234.5678e90\")');\n}\n\n// CHECK#6\nif (Number(\"+1234.5678E90\") !== Number(\"1234.5678E90\")) {\n $ERROR('#6: Number(\"+1234.5678E90\") === Number(\"1234.5678E90\")');\n}\n\n// CHECK#7\nif (Number(\"+1234.5678e-90\") !== Number(\"1234.5678e-90\")) {\n $ERROR('#7: Number(\"+1234.5678e-90\") === Number(\"1234.5678e-90\")');\n}\n\n// CHECK#8\nif (Number(\"+1234.5678E-90\") !== Number(\"1234.5678E-90\")) {\n $ERROR('#8: Number(\"+1234.5678E-90\") === Number(\"1234.5678E-90\")');\n}\n",
+ "id": "S9.3.1_A4_T1"
+ },
+ {
+ "section": "9.3.1, 15.7.1",
+ "description": "Compare Number('+' + 'any_number') with Number('any_number')",
+ "test": "function dynaString(s1, s2){\n return String(s1)+String(s2);\n}\n\n// CHECK#1\nif (Number(dynaString(\"+\", \"0\")) !== Number(\"0\")) {\n $ERROR('#1: Number(\"+\"+\"0\") === Number(\"0\")');\n} else {\n // CHECK#2\n if (1/Number(dynaString(\"+\", \"0\")) !== 1/Number(\"0\")) {\n $ERROR('#2: 1/Number(\"+\"+\"0\") === 1/Number(\"0\")');\n }\n}\n\n// CHECK#3\nif (Number(dynaString(\"+Infi\", \"nity\")) !== Number(\"Infinity\")) {\n $ERROR('#3: Number(\"+Infin\"+\"ity\") === Number(\"Infinity\")');\n}\n\n// CHECK#4\nif (Number(dynaString(\"+1234.\", \"5678\")) !== Number(\"1234.5678\")) {\n $ERROR('#4: Number(\"+1234.\"+\"5678\") === Number(\"1234.5678\")');\n}\n\n// CHECK#5\nif (Number(dynaString(\"+1234.\", \"5678e90\")) !== Number(\"1234.5678e90\")) {\n $ERROR('#5: Number(\"+1234.\"+\"5678e90\") === Number(\"1234.5678e90\")');\n}\n\n// CHECK#6\nif (Number(dynaString(\"+1234.\", \"5678E90\")) !== Number(\"1234.5678E90\")) {\n $ERROR('#6: Number(\"+1234.\"+\"5678E90\") === Number(\"1234.5678E90\")');\n}\n\n// CHECK#7\nif (Number(dynaString(\"+1234.\", \"5678e-90\")) !== Number(\"1234.5678e-90\")) {\n $ERROR('#7: Number(\"+1234.\"+\"5678e-90\") === Number(\"1234.5678e-90\")');\n}\n\n// CHECK#8\nif (Number(dynaString(\"+1234.\", \"5678E-90\")) !== Number(\"1234.5678E-90\")) {\n $ERROR('#8: Number(\"+1234.\"+\"5678E-90\") === Number(\"1234.5678E-90\")');\n}\n",
+ "id": "S9.3.1_A4_T2"
+ },
+ {
+ "section": "9.3.1, 15.7.1",
+ "description": "Compare Number('-any_number') with -Number('any_number')",
+ "test": "// CHECK#1\nif (Number(\"-0\") !== -Number(\"0\")) {\n $ERROR('#1: Number(\"-0\") === -Number(\"0\")');\n} else {\n // CHECK#2\n if (1/Number(\"-0\") !== -1/Number(\"0\")) {\n $ERROR('#2: 1/Number(\"-0\") === -1/Number(\"0\")');\n }\n}\n\n// CHECK#3\nif (Number(\"-Infinity\") !== -Number(\"Infinity\")) {\n $ERROR('#3: Number(\"-Infinity\") === -Number(\"Infinity\")');\n}\n\n// CHECK#4\nif (Number(\"-1234567890\") !== -Number(\"1234567890\")) {\n $ERROR('#4: Number(\"-1234567890\") === -Number(\"1234567890\")');\n}\n\n// CHECK#5\nif (Number(\"-1234.5678\") !== -Number(\"1234.5678\")) {\n $ERROR('#5: Number(\"-1234.5678\") === -Number(\"1234.5678\")');\n}\n\n// CHECK#6\nif (Number(\"-1234.5678e90\") !== -Number(\"1234.5678e90\")) {\n $ERROR('#6: Number(\"-1234.5678e90\") === -Number(\"1234.5678e90\")');\n}\n\n// CHECK#7\nif (Number(\"-1234.5678E90\") !== -Number(\"1234.5678E90\")) {\n $ERROR('#6: Number(\"-1234.5678E90\") === -Number(\"1234.5678E90\")');\n}\n\n// CHECK#8\nif (Number(\"-1234.5678e-90\") !== -Number(\"1234.5678e-90\")) {\n $ERROR('#6: Number(\"-1234.5678e-90\") === -Number(\"1234.5678e-90\")');\n}\n\n// CHECK#9\nif (Number(\"-1234.5678E-90\") !== -Number(\"1234.5678E-90\")) {\n $ERROR('#6: Number(\"-1234.5678E-90\") === -Number(\"1234.5678E-90\")');\n}\n\n// CHECK#10\nif (Number(\"-Infinity\") !== Number.NEGATIVE_INFINITY) {\n $ERROR('#3: Number(\"-Infinity\") === Number.NEGATIVE_INFINITY');\n}\n",
+ "id": "S9.3.1_A5_T1"
+ },
+ {
+ "section": "9.3.1, 15.7.1",
+ "description": "Compare Number('-[or +]any_number') with -[or without -]any_number)",
+ "test": "// CHECK#1\nif (Number(\"1\") !== 1) {\n $ERROR('#1: Number(\"1\") === 1');\n}\n\n// CHECK#2\nif (Number(\"+1\") !== 1) {\n $ERROR('#3: Number(\"+1\") === 1');\n}\n\n// CHECK#3\nif (Number(\"-1\") !== -1) {\n $ERROR('#3: Number(\"-1\") === -1');\n}\n\n// CHECK#4\nif (Number(\"2\") !== 2) {\n $ERROR('#4: Number(\"2\") === 2');\n}\n\n// CHECK#5\nif (Number(\"+2\") !== 2) {\n $ERROR('#5: Number(\"+2\") === 2');\n}\n\n// CHECK#6\nif (Number(\"-2\") !== -2) {\n $ERROR('#6: Number(\"-2\") === -2');\n}\n\n// CHECK#7\nif (Number(\"3\") !== 3) {\n $ERROR('#7: Number(\"3\") === 3');\n}\n\n// CHECK#8\nif (Number(\"+3\") !== 3) {\n $ERROR('#8: Number(\"+3\") === 3');\n}\n\n// CHECK#9\nif (Number(\"-3\") !== -3) {\n $ERROR('#9: Number(\"-3\") === -3');\n}\n\n// CHECK#10\nif (Number(\"4\") !== 4) {\n $ERROR('#10: Number(\"4\") === 4');\n}\n\n// CHECK#11\nif (Number(\"+4\") !== 4) {\n $ERROR('#11: Number(\"+4\") === 4');\n}\n\n// CHECK#12\nif (Number(\"-4\") !== -4) {\n $ERROR('#12: Number(\"-4\") === -4');\n}\n\n// CHECK#13\nif (Number(\"5\") !== 5) {\n $ERROR('#13: Number(\"5\") === 5');\n}\n\n// CHECK#14\nif (Number(\"+5\") !== 5) {\n $ERROR('#14: Number(\"+5\") === 5');\n}\n\n// CHECK#15\nif (Number(\"-5\") !== -5) {\n $ERROR('#15: Number(\"-5\") === -5');\n}\n\n// CHECK#16\nif (Number(\"6\") !== 6) {\n $ERROR('#16: Number(\"6\") === 6');\n}\n\n// CHECK#17\nif (Number(\"+6\") !== 6) {\n $ERROR('#17: Number(\"+6\") === 6');\n}\n\n// CHECK#18\nif (Number(\"-6\") !== -6) {\n $ERROR('#18: Number(\"-6\") === -6');\n}\n\n// CHECK#19\nif (Number(\"7\") !== 7) {\n $ERROR('#19: Number(\"7\") === 7');\n}\n\n// CHECK#20\nif (Number(\"+7\") !== 7) {\n $ERROR('#20: Number(\"+7\") === 7');\n}\n\n// CHECK#21\nif (Number(\"-7\") !== -7) {\n $ERROR('#21: Number(\"-7\") === -7');\n}\n\n// CHECK#22\nif (Number(\"8\") !== 8) {\n $ERROR('#22: Number(\"8\") === 8');\n}\n\n// CHECK#23\nif (Number(\"+8\") !== 8) {\n $ERROR('#23: Number(\"+8\") === 8');\n}\n\n// CHECK#24\nif (Number(\"-8\") !== -8) {\n $ERROR('#24: Number(\"-8\") === -8');\n}\n\n// CHECK#25\nif (Number(\"9\") !== 9) {\n $ERROR('#25: Number(\"9\") === 9');\n}\n\n// CHECK#26\nif (Number(\"+9\") !== 9) {\n $ERROR('#26: Number(\"+9\") === 9');\n}\n\n// CHECK#27\nif (Number(\"-9\") !== -9) {\n $ERROR('#27: Number(\"-9\") === -9');\n}\n",
+ "id": "S9.3.1_A5_T2"
+ },
+ {
+ "section": "9.3.1, 15.7.1",
+ "description": "Compare Number('-' + 'any_number') with -Number('any_number')",
+ "test": "function dynaString(s1, s2){\n return String(s1)+String(s2);\n}\n\n// CHECK#1\nif (Number(dynaString(\"-\", \"0\")) !== -Number(\"0\")) {\n $ERROR('#1: Number(\"-\"+\"0\") === -Number(\"0\")');\n} else {\n // CHECK#2\n if (1/Number(dynaString(\"-\", \"0\")) !== -1/Number(\"0\")) {\n $ERROR('#2: 1/Number(\"-\"+\"0\") === -1/Number(\"0\")');\n }\n}\n\n// CHECK#3\nif (Number(dynaString(\"-Infi\", \"nity\")) !== -Number(\"Infinity\")) {\n $ERROR('#3: Number(\"-Infi\"+\"nity\") === -Number(\"Infinity\")');\n}\n\n// CHECK#4\nif (Number(dynaString(\"-12345\", \"67890\")) !== -Number(\"1234567890\")) {\n $ERROR('#4: Number(\"-12345\"+\"67890\") === -Number(\"1234567890\")');\n}\n\n// CHECK#5\nif (Number(dynaString(\"-1234.\", \"5678\")) !== -Number(\"1234.5678\")) {\n $ERROR('#5: Number(\"-1234.\"+\"5678\") === -Number(\"1234.5678\")');\n}\n\n// CHECK#6\nif (Number(dynaString(\"-1234.\", \"5678e90\")) !== -Number(\"1234.5678e90\")) {\n $ERROR('#6: Number(\"-1234.\"+\"5678e90\") === -Number(\"1234.5678e90\")');\n}\n\n// CHECK#7\nif (Number(dynaString(\"-1234.\", \"5678E90\")) !== -Number(\"1234.5678E90\")) {\n $ERROR('#6: Number(\"-1234.\"+\"5678E90\") === -Number(\"1234.5678E90\")');\n}\n\n// CHECK#8\nif (Number(dynaString(\"-1234.\", \"5678e-90\")) !== -Number(\"1234.5678e-90\")) {\n $ERROR('#6: Number(\"-1234.\"+\"5678e-90\") === -Number(\"1234.5678e-90\")');\n}\n\n// CHECK#9\nif (Number(dynaString(\"-1234.\", \"5678E-90\")) !== -Number(\"1234.5678E-90\")) {\n $ERROR('#6: Number(\"-1234.\"+\"5678E-90\") === -Number(\"1234.5678E-90\")');\n}\n\n// CHECK#10\nif (Number(dynaString(\"-Infi\", \"nity\")) !== Number.NEGATIVE_INFINITY) {\n $ERROR('#3: Number(\"-Infi\"+\"nity\") === Number.NEGATIVE_INFINITY');\n}\n",
+ "id": "S9.3.1_A5_T3"
+ },
+ {
+ "section": "9.3.1, 15.7.1",
+ "description": "Compare Number('Infinity') with Number.POSITIVE_INFINITY, 10e10000, 10E10000 and Number(\"10e10000\")",
+ "test": "// CHECK#1\nif (Number(\"Infinity\") !== Number.POSITIVE_INFINITY) {\n $ERROR('#1: Number(\"Infinity\") === Number.POSITIVE_INFINITY');\n}\n\n// CHECK#2\nif (Number(\"Infinity\") !== 10e10000) {\n $ERROR('#2: Number(\"Infinity\") === 10e10000');\n}\n\n// CHECK#3\nif (Number(\"Infinity\") !== 10E10000) {\n $ERROR('#3: Number(\"Infinity\") === 10E10000');\n}\n\n// CHECK#4\nif (Number(\"Infinity\") !== Number(\"10e10000\")) {\n $ERROR('#4: Number(\"Infinity\") === Number(\"10e10000\")');\n}\n",
+ "id": "S9.3.1_A6_T1"
+ },
+ {
+ "section": "9.3.1, 15.7.1",
+ "description": "Compare Number('Infi'+'nity') with Number.POSITIVE_INFINITY, 10e10000, 10E10000 and Number(\"10e10000\")",
+ "test": "function dynaString(s1, s2){\n return String(s1)+String(s2);\n}\n\n\n// CHECK#1\nif (Number(dynaString(\"Infi\", \"nity\")) !== Number.POSITIVE_INFINITY) {\n $ERROR('#1: Number(\"Infi\"+\"nity\") === Number.POSITIVE_INFINITY');\n}\n\n// CHECK#2\nif (Number(dynaString(\"Infi\", \"nity\")) !== 10e10000) {\n $ERROR('#2: Number(\"Infi\"+\"nity\") === 10e10000');\n}\n\n// CHECK#3\nif (Number(dynaString(\"Infi\", \"nity\")) !== 10E10000) {\n $ERROR('#3: Number(\"Infi\"+\"nity\") === 10E10000');\n}\n\n// CHECK#4\nif (Number(dynaString(\"Infi\", \"nity\")) !== Number(\"10e10000\")) {\n $ERROR('#4: Number(\"Infi\"+\"nity\") === Number(\"10e10000\")');\n}\n",
+ "id": "S9.3.1_A6_T2"
+ },
+ {
+ "section": "9.3.1, 15.7.1",
+ "description": "Compare Number('1234.5678') with Number('1234')+(+('5678')*1e-4)",
+ "test": "// CHECK#1\nif (Number(\"1234.5678\") !== Number(\"1234\")+(+(\"5678\")*1e-4)) {\n $ERROR('#1: Number(\"1234.5678\") === Number(\"1234\")+(+(\"5678\")*1e-4)');\n}\n",
+ "id": "S9.3.1_A7"
+ },
+ {
+ "section": "9.3.1, 15.7.1",
+ "description": "Compare Number('1234e5') and Number('1234.e5') with Number('1234')*1e5",
+ "test": "// CHECK#1\nif (Number(\"1234e5\") !== Number(\"1234\")*1e5) {\n $ERROR('#1: Number(\"1234e5\") === Number(\"1234\")*1e5');\n}\n\n// CHECK#2\nif (Number(\"1234.e5\") !== +(\"1234\")*1e5) {\n $ERROR('#2: Number(\"1234.e5\") === +(\"1234\")*1e5');\n}\n",
+ "id": "S9.3.1_A8"
+ },
+ {
+ "section": "9.3.1, 15.7.1",
+ "description": "Compare Number('1234.5678e9') with (Number('1234')+(Number('5678')*1e-4))*1e9,\nand +('1234.5678e-9') with (Number('1234')+(Number('5678')*1e-4))*1e-9",
+ "test": "// CHECK#1\nif (Number(\"1234.5678e9\") !== (Number(\"1234\")+(Number(\"5678\")*1e-4))*1e9) {\n $ERROR('#1: Number(\"1234.5678e9\") === (Number(\"1234\")+(Number(\"5678\")*1e-4))*1e9');\n}\n\n// CHECK#2\nif (+(\"1234.5678e-9\") !== (Number(\"1234\")+(Number(\"5678\")*1e-4))*1e-9) {\n $ERROR('#2: +(\"1234.5678e-9\") === (Number(\"1234\")+(Number(\"5678\")*1e-4))*1e-9');\n}\n",
+ "id": "S9.3.1_A9"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/9.3_ToNumber.json b/website/resources/scripts/testcases2/9.3_ToNumber.json
new file mode 100644
index 000000000..63743cf80
--- /dev/null
+++ b/website/resources/scripts/testcases2/9.3_ToNumber.json
@@ -0,0 +1,80 @@
+{
+ "testCollection": {
+ "name": "9.3_ToNumber",
+ "numTests": 12,
+ "tests": [
+ {
+ "section": "9.3, 15.7.1",
+ "description": "Undefined convert to Number by explicit transformation",
+ "test": "// CHECK#1\nif (isNaN(Number(undefined)) !== true) {\n $ERROR('#1: Number(undefined) === Not-a-Number. Actual: ' + (Number(undefined)));\n}\n\n// CHECK#2\nif (isNaN(Number(void 0)) !== true) {\n $ERROR('#2: Number(void 0) === Not-a-Number. Actual: ' + (Number(void 0)));\n}\n\n// CHECK#3\nif (isNaN(Number(eval(\"var x\"))) !== true) {\n $ERROR('#3: Number(eval(\"var x\")) === Not-a-Number. Actual: ' + (Number(eval(\"var x\"))));\n}\n",
+ "id": "S9.3_A1_T1"
+ },
+ {
+ "section": "9.3, 11.6.1",
+ "description": "Undefined convert to Number by implicit transformation",
+ "test": "// CHECK#1\nif (isNaN(+(undefined)) !== true) {\n $ERROR('#1: +(undefined) === Not-a-Number. Actual: ' + (+(undefined)));\n}\n\n// CHECK#2\nif (isNaN(+(void 0)) !== true) {\n $ERROR('#2: +(void 0) === Not-a-Number. Actual: ' + (+(void 0)));\n}\n\n// CHECK#3\nif (isNaN(+(eval(\"var x\"))) !== true) {\n $ERROR('#3: +(eval(\"var x\")) === Not-a-Number. Actual: ' + (+(eval(\"var x\"))));\n}\n",
+ "id": "S9.3_A1_T2"
+ },
+ {
+ "section": "9.3, 15.7.1",
+ "description": "null convert to Number by explicit transformation",
+ "test": "// CHECK #1\nif (Number(null) !== 0) {\n $ERROR('#1.1: Number(null) === 0. Actual: ' + (Number(null))); \n} else {\n if (1/Number(null) !== Number.POSITIVE_INFINITY) {\n $ERROR('#1.2: Number(null) === +0. Actual: -0');\n }\t\n}\n",
+ "id": "S9.3_A2_T1"
+ },
+ {
+ "section": "9.3, 11.6.1",
+ "description": "null convert to Number by implicit transformation",
+ "test": "// CHECK #1\nif (+(null) !== 0) {\n $ERROR('#1.1: +(null) === 0. Actual: ' + (+(null))); \n} else {\n if (1/+(null) !== Number.POSITIVE_INFINITY) {\n $ERROR('#1.2: +(null) === +0. Actual: -0');\n }\t\n}\n",
+ "id": "S9.3_A2_T2"
+ },
+ {
+ "section": "9.3, 15.7.1",
+ "description": "False and true convert to Number by explicit transformation",
+ "test": "// CHECK#1\nif (Number(false) !== +0) {\n $ERROR('#1.1: Number(false) === 0. Actual: ' + (Number(false)));\n} else {\n if (1/Number(false) !== Number.POSITIVE_INFINITY) {\n $ERROR('#1.2: Number(false) === +0. Actual: -0');\n }\n}\n\n// CHECK#2\nif (Number(true) !== 1) {\n $ERROR('#2: Number(true) === 1. Actual: ' + (Number(true)));\t\n}\n",
+ "id": "S9.3_A3_T1"
+ },
+ {
+ "section": "9.3, 11.6.1",
+ "description": "False and true convert to Number by implicit transformation",
+ "test": "// CHECK#1\nif (+(false) !== +0) {\n $ERROR('#1.1: +(false) === 0. Actual: ' + (+(false)));\n} else {\n if (1/+(false) !== Number.POSITIVE_INFINITY) {\n $ERROR('#1.2: +(false) === +0. Actual: -0');\n }\n}\n\n// CHECK#2\nif (+(true) !== 1) {\n $ERROR('#2: +(true) === 1. Actual: ' + (+(true)));\t\n}\n",
+ "id": "S9.3_A3_T2"
+ },
+ {
+ "section": "9.3, 15.7.1",
+ "description": "Some numbers including Number.MAX_VALUE and Number.MIN_VALUE are converted to Number with explicit transformation",
+ "test": "// CHECK#1\nif (Number(13) !== 13) {\n $ERROR('#1: Number(13) === 13. Actual: ' + (Number(13)));\n}\n\n// CHECK#2\nif (Number(-13) !== -13) { \n $ERROR('#2: Number(-13) === -13. Actual: ' + (Number(-13)));\n}\n\n// CHECK#3\nif (Number(1.3) !== 1.3) {\n $ERROR('#3: Number(1.3) === 1.3. Actual: ' + (Number(1.3)));\n}\n\n// CHECK#4\nif (Number(-1.3) !== -1.3) {\n $ERROR('#4: Number(-1.3) === -1.3. Actual: ' + (Number(-1.3)));\n}\n\n// CHECK#5\nif (Number(Number.MAX_VALUE) !== 1.7976931348623157e308) {\n $ERROR('#5: Number(Number.MAX_VALUE) === 1.7976931348623157e308. Actual: ' + (Number(Number.MAX_VALUE)));\n}\n\n// CHECK#6\nif (Number(Number.MIN_VALUE) !== 5e-324) {\n $ERROR('#6: Number(Number.MIN_VALUE) === 5e-324. Actual: ' + (Number(Number.MIN_VALUE)));\n}\t\n",
+ "id": "S9.3_A4.1_T1"
+ },
+ {
+ "section": "9.3, 11.6.1",
+ "description": "Some numbers including Number.MAX_VALUE and Number.MIN_VALUE are converted to Number with implicit transformation",
+ "test": "// CHECK#1\nif (+(13) !== 13) {\n $ERROR('#1: +(13) === 13. Actual: ' + (+(13)));\n}\n\n// CHECK#2\nif (+(-13) !== -13) { \n $ERROR('#2: +(-13) === -13. Actual: ' + (+(-13)));\n}\n\n// CHECK#3\nif (+(1.3) !== 1.3) {\n $ERROR('#3: +(1.3) === 1.3. Actual: ' + (+(1.3)));\n}\n\n// CHECK#4\nif (+(-1.3) !== -1.3) {\n $ERROR('#4: +(-1.3) === -1.3. Actual: ' + (+(-1.3)));\n}\n\n// CHECK#5\nif (+(Number.MAX_VALUE) !== 1.7976931348623157e308) {\n $ERROR('#5: +(Number.MAX_VALUE) === 1.7976931348623157e308. Actual: ' + (+(Number.MAX_VALUE)));\n}\n\n// CHECK#6\nif (+(Number.MIN_VALUE) !== 5e-324) {\n $ERROR('#6: +(Number.MIN_VALUE) === 5e-324. Actual: ' + (+(Number.MIN_VALUE)));\n}\t\n",
+ "id": "S9.3_A4.1_T2"
+ },
+ {
+ "section": "9.3, 15.7.1",
+ "description": "Number.NaN, +0, -0, Number.POSITIVE_INFINITY, Number.NEGATIVE_INFINITY,\nNumber.MAX_VALUE and Number.MIN_VALUE convert to Number by explicit transformation",
+ "test": "// CHECK#1\nif (isNaN(Number(Number.NaN)) !== true) {\n $ERROR('#1: Number(NaN) === Not-a-Number. Actual: ' + (Number(NaN))); \n}\n\n// CHECK#2\nif (Number(+0) !== +0) {\n $ERROR('#2.1: Number(+0) === 0. Actual: ' + (Number(+0))); \n} else {\n if (1/Number(+0) !== Number.POSITIVE_INFINITY) {\n $ERROR('#2.2: Number(+0) === +0. Actual: -0');\n }\t\n}\n\n// CHECK#3\nif (Number(-0) !== -0) {\n $ERROR('#3.1: Number(-0) === 0. Actual: ' + (Number(-0))); \n} else {\n if (1/Number(-0) !== Number.NEGATIVE_INFINITY) {\n $ERROR('#3.2: Number(-0) === -0. Actual: +0');\n }\t\n}\n\n// CHECK#4\nif (Number(Number.POSITIVE_INFINITY) !== Number.POSITIVE_INFINITY) {\n $ERROR('#4: Number(+Infinity) === +Infinity. Actual: ' + (Number(+Infinity))); \n}\n\n// CHECK#5\nif (Number(Number.NEGATIVE_INFINITY) !== Number.NEGATIVE_INFINITY) {\n $ERROR('#5: Number(-Infinity) === -Infinity. Actual: ' + (Number(-Infinity))); \n}\n\n// CHECK#6\nif (Number(Number.MAX_VALUE) !== Number.MAX_VALUE) {\n $ERROR('#6: Number(Number.MAX_VALUE) === Number.MAX_VALUE. Actual: ' + (Number(Number.MAX_VALUE))); \n}\n\n// CHECK#7\nif (Number(Number.MIN_VALUE) !== Number.MIN_VALUE) {\n $ERROR('#7: Number(Number.MIN_VALUE) === Number.MIN_VALUE. Actual: ' + (Number(Number.MIN_VALUE))); \n}\n",
+ "id": "S9.3_A4.2_T1"
+ },
+ {
+ "section": "9.3, 11.6.1",
+ "description": "Number.NaN, +0, -0, Number.POSITIVE_INFINITY, Number.NEGATIVE_INFINITY,\nNumber.MAX_VALUE and Number.MIN_VALUE convert to Number by implicit transformation",
+ "test": "// CHECK#1\nif (isNaN(+(Number.NaN)) !== true) {\n $ERROR('#1: +(NaN) === Not-a-Number. Actual: ' + (+(NaN))); \n}\n\n// CHECK#2\nif (+(+0) !== +0) {\n $ERROR('#2.1: +(+0) === 0. Actual: ' + (+(+0))); \n} else {\n if (1/+(+0) !== Number.POSITIVE_INFINITY) {\n $ERROR('#2.2: +(+0) === +0. Actual: -0');\n }\t\n}\n\n// CHECK#3\nif (+(-0) !== -0) {\n $ERROR('#3.1: +(-0) === 0. Actual: ' + (+(-0))); \n} else {\n if (1/+(-0) !== Number.NEGATIVE_INFINITY) {\n $ERROR('#3.2: +(-0) === -0. Actual: +0');\n }\t\n}\n\n// CHECK#4\nif (+(Number.POSITIVE_INFINITY) !== Number.POSITIVE_INFINITY) {\n $ERROR('#4: +(+Infinity) === +Infinity. Actual: ' + (+(+Infinity))); \n}\n\n// CHECK#5\nif (+(Number.NEGATIVE_INFINITY) !== Number.NEGATIVE_INFINITY) {\n $ERROR('#5: +(-Infinity) === -Infinity. Actual: ' + (+(-Infinity))); \n}\n\n// CHECK#6\nif (+(Number.MAX_VALUE) !== Number.MAX_VALUE) {\n $ERROR('#6: +(Number.MAX_VALUE) === Number.MAX_VALUE. Actual: ' + (+(Number.MAX_VALUE))); \n}\n\n// CHECK#7\nif (+(Number.MIN_VALUE) !== Number.MIN_VALUE) {\n $ERROR('#7: +(Number.MIN_VALUE) === Number.MIN_VALUE. Actual: ' + (+(Number.MIN_VALUE))); \n}\n",
+ "id": "S9.3_A4.2_T2"
+ },
+ {
+ "section": "9.3, 15.7.1",
+ "description": "new Number(), new Number(0), new Number(Number.NaN), new Number(null),\nnew Number(void 0) and others convert to Number by explicit transformation",
+ "test": "// CHECK#1\nif (Number(new Number()) !== 0) {\n $ERROR('#1: Number(new Number()) === 0. Actual: ' + (Number(new Number())));\n}\n\n// CHECK#2\nif (Number(new Number(0)) !== 0) {\n $ERROR('#2: Number(new Number(0)) === 0. Actual: ' + (Number(new Number(0))));\n}\n\n// CHECK#3\nif (isNaN(Number(new Number(Number.NaN)) !== true)) {\n $ERROR('#3: Number(new Number(Number.NaN)) === Not-a-Number. Actual: ' + (Number(new Number(Number.NaN))));\n}\n\n// CHECK#4\nif (Number(new Number(null)) !== 0) {\n $ERROR('#4.1: Number(new Number(null)) === 0. Actual: ' + (Number(new Number(null)))); \n} else {\n if (1/Number(new Number(null)) !== Number.POSITIVE_INFINITY) {\n $ERROR('#4.2: Number(new Number(null)) === +0. Actual: -0');\n }\t\n}\n\n// CHECK#5\nif (isNaN(Number(new Number(void 0)) !== true)) {\n $ERROR('#5: Number(new Number(void 0)) === Not-a-Number. Actual: ' + (Number(new Number(void 0))));\n}\n\n// CHECK#6\nif (Number(new Number(true)) !== 1) {\n $ERROR('#6: Number(new Number(true)) === 1. Actual: ' + (Number(new Number(true))));\n}\n\n// CHECK#7\nif (Number(new Number(false)) !== +0) {\n $ERROR('#7.1: Number(new Number(false)) === 0. Actual: ' + (Number(new Number(false))));\n} else {\n if (1/Number(new Number(false)) !== Number.POSITIVE_INFINITY) {\n $ERROR('#7.2: Number(new Number(false)) === +0. Actual: -0');\n }\n}\n\n// CHECK#8\nif (Number(new Boolean(true)) !== 1) {\n $ERROR('#8: Number(new Boolean(true)) === 1. Actual: ' + (Number(new Boolean(true))));\n}\n\n// CHECK#9\nif (Number(new Boolean(false)) !== +0) {\n $ERROR('#9.1: Number(new Boolean(false)) === 0. Actual: ' + (Number(new Boolean(false))));\n} else {\n if (1/Number(new Boolean(false)) !== Number.POSITIVE_INFINITY) {\n $ERROR('#9.2: Number(new Boolean(false)) === +0. Actual: -0');\n }\n}\n\n// CHECK#10\nif (isNaN(Number(new Array(2,4,8,16,32))) !== true) {\n $ERROR('#10: Number(new Array(2,4,8,16,32)) === Not-a-Number. Actual: ' + (Number(new Array(2,4,8,16,32))));\n}\n\n// CHECK#11\nvar myobj1 = {\n ToNumber : function(){return 12345;}, \n toString : function(){return \"67890\";},\n valueOf : function(){return \"[object MyObj]\";} \n };\n\nif (isNaN(Number(myobj1)) !== true){\n $ERROR(\"#11: Number(myobj1) calls ToPrimitive with hint Number. Actual: \" + (Number(myobj1)));\n}\n\n// CHECK#12\nvar myobj2 = {\n ToNumber : function(){return 12345;}, \n toString : function(){return \"67890\";},\n valueOf : function(){return \"9876543210\";} \n };\n\nif (Number(myobj2) !== 9876543210){\n $ERROR(\"#12: Number(myobj2) calls ToPrimitive with hint Number. Exptected: 9876543210. Actual: \" + (Number(myobj2)));\n}\n\n\n// CHECK#13\nvar myobj3 = {\n ToNumber : function(){return 12345;}, \n toString : function(){return \"[object MyObj]\";} \n };\n\nif (isNaN(Number(myobj3)) !== true){\n $ERROR(\"#13: Number(myobj3) calls ToPrimitive with hint Number. Exptected: Not-a-Number. Actual: \" + (Number(myobj3)));\n}\n\n// CHECK#14\nvar myobj4 = {\n ToNumber : function(){return 12345;}, \n toString : function(){return \"67890\";} \n };\n\nif (Number(myobj4) !== 67890){\n $ERROR(\"#14: Number(myobj4) calls ToPrimitive with hint Number. Exptected: 67890. Actual: \" + (Number(myobj4)));\n}\n\n// CHECK#15\nvar myobj5 = {\n ToNumber : function(){return 12345;} \n };\n\nif (isNaN(Number(myobj5)) !== true){\n $ERROR(\"#15: Number(myobj5) calls ToPrimitive with hint Number. Exptected: Not-a-Number. Actual: \" + (Number(myobj5)));\n}\n",
+ "id": "S9.3_A5_T1"
+ },
+ {
+ "section": "9.3, 11.6.1",
+ "description": "new Number(), new Number(0), new Number(Number.NaN), new Number(null),\nnew Number(void 0) and others convert to Number by implicit transformation",
+ "test": "// CHECK#1\nif (+(new Number()) !== 0) {\n $ERROR('#1: +(new Number()) === 0. Actual: ' + (+(new Number())));\n}\n\n// CHECK#2\nif (+(new Number(0)) !== 0) {\n $ERROR('#2: +(new Number(0)) === 0. Actual: ' + (+(new Number(0))));\n}\n\n// CHECK#3\nif (isNaN(+(new Number(Number.NaN)) !== true)) {\n $ERROR('#3: +(new Number(Number.NaN)) === Not-a-Number. Actual: ' + (+(new Number(Number.NaN))));\n}\n\n// CHECK#4\nif (+(new Number(null)) !== 0) {\n $ERROR('#4.1: +(new Number(null)) === 0. Actual: ' + (+(new Number(null)))); \n} else {\n if (1/+(new Number(null)) !== Number.POSITIVE_INFINITY) {\n $ERROR('#4.2: +(new Number(null)) === +0. Actual: -0');\n }\t\n}\n\n// CHECK#5\nif (isNaN(+(new Number(void 0)) !== true)) {\n $ERROR('#5: +(new Number(void 0)) === Not-a-Number. Actual: ' + (+(new Number(void 0))));\n}\n\n// CHECK#6\nif (+(new Number(true)) !== 1) {\n $ERROR('#6: +(new Number(true)) === 1. Actual: ' + (+(new Number(true))));\n}\n\n// CHECK#7\nif (+(new Number(false)) !== +0) {\n $ERROR('#7.1: +(new Number(false)) === 0. Actual: ' + (+(new Number(false))));\n} else {\n if (1/+(new Number(false)) !== Number.POSITIVE_INFINITY) {\n $ERROR('#7.2: +(new Number(false)) === +0. Actual: -0');\n }\n}\n\n// CHECK#8\nif (+(new Boolean(true)) !== 1) {\n $ERROR('#8: +(new Boolean(true)) === 1. Actual: ' + (+(new Boolean(true))));\n}\n\n// CHECK#9\nif (+(new Boolean(false)) !== +0) {\n $ERROR('#9.1: +(new Boolean(false)) === 0. Actual: ' + (+(new Boolean(false))));\n} else {\n if (1/+(new Boolean(false)) !== Number.POSITIVE_INFINITY) {\n $ERROR('#9.2: +(new Boolean(false)) === +0. Actual: -0');\n }\n}\n\n// CHECK#10\nif (isNaN(+(new Array(2,4,8,16,32))) !== true) {\n $ERROR('#10: +(new Array(2,4,8,16,32)) === Not-a-Number. Actual: ' + (+(new Array(2,4,8,16,32))));\n}\n\n// CHECK#11\nvar myobj1 = {\n ToNumber : function(){return 12345;}, \n toString : function(){return \"67890\";},\n valueOf : function(){return \"[object MyObj]\";} \n };\n\nif (isNaN(+(myobj1)) !== true){\n $ERROR(\"#11: +(myobj1) calls ToPrimitive with hint +. Exptected: Not-a-Number. Actual: \" + (+(myobj1)));\n}\n\n// CHECK#12\nvar myobj2 = {\n ToNumber : function(){return 12345;}, \n toString : function(){return \"67890\";},\n valueOf : function(){return \"9876543210\";} \n };\n\nif (+(myobj2) !== 9876543210){\n $ERROR(\"#12: +(myobj2) calls ToPrimitive with hint +. Exptected: 9876543210. Actual: \" + (+(myobj2)));\n}\n\n\n// CHECK#13\nvar myobj3 = {\n ToNumber : function(){return 12345;}, \n toString : function(){return \"[object MyObj]\";} \n };\n\nif (isNaN(+(myobj3)) !== true){\n $ERROR(\"#13: +(myobj3) calls ToPrimitive with hint +. Exptected: Not-a-Number. Actual: \" + (+(myobj3)));\n}\n\n// CHECK#14\nvar myobj4 = {\n ToNumber : function(){return 12345;}, \n toString : function(){return \"67890\";} \n };\n\nif (+(myobj4) !== 67890){\n $ERROR(\"#14: +(myobj4) calls ToPrimitive with hint +. Exptected: 67890. Actual: \" + (+(myobj4)));\n}\n\n// CHECK#15\nvar myobj5 = {\n ToNumber : function(){return 12345;} \n };\n\nif (isNaN(+(myobj5)) !== true){\n $ERROR(\"#15: +(myobj5) calls ToPrimitive with hint +. Exptected: 12345. Actual: \" + (+(myobj5)));\n}\n",
+ "id": "S9.3_A5_T2"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/9.4_ToInteger.json b/website/resources/scripts/testcases2/9.4_ToInteger.json
new file mode 100644
index 000000000..772eea8b4
--- /dev/null
+++ b/website/resources/scripts/testcases2/9.4_ToInteger.json
@@ -0,0 +1,32 @@
+{
+ "testCollection": {
+ "name": "9.4_ToInteger",
+ "numTests": 4,
+ "tests": [
+ {
+ "section": "9.4, 15.5",
+ "description": "Check what position is defined by Number.NaN in string \"abc\": \"abc\".charAt(Number.NaN)",
+ "test": "// CHECK#1\nif (\"abc\".charAt(Number.NaN) !== \"a\") {\n $ERROR('#1: \"abc\".charAt(Number.NaN) === \"a\". Actual: ' + (\"abc\".charAt(Number.NaN)));\n}\n\n// CHECK#2\nif (\"abc\".charAt(\"x\") !== \"a\") {\n $ERROR('#2: \"abc\".charAt(\"x\") === \"a\". Actual: ' + (\"abc\".charAt(\"x\")));\n}\n",
+ "id": "S9.4_A1"
+ },
+ {
+ "section": "9.4, 15.5",
+ "description": "Check what position is defined by Number.NaN in string \"abc\": \"abc\".charAt(Number.NaN)",
+ "test": "// CHECK#1\nif (\"abc\".charAt(0.0) !== \"a\") {\n $ERROR('#1: \"abc\".charAt(0.0) === \"a\". Actual: ' + (\"abc\".charAt(0.0)));\n}\n\n// CHECK#2\nif (\"abc\".charAt(-0.0) !== \"a\") {\n $ERROR('#2: \"abc\".charAt(-0.0) === \"a\". Actual: ' + (\"abc\".charAt(-0.0)));\n}\n",
+ "id": "S9.4_A2"
+ },
+ {
+ "section": "9.4, 15.9",
+ "description": "For testing constructor Date(Number) is used",
+ "test": "// CHECK#1\nvar d1 = new Date(6.54321);\nif (d1.valueOf() !== 6) {\n $ERROR('#1: var d1 = new Date(6.54321); d1.valueOf() === 6;');\n}\n\n// CHECK#2\nvar d2 = new Date(-6.54321);\nif (d2.valueOf() !== -6) {\n $ERROR('#2: var d2 = new Date(-6.54321); d2.valueOf() === -6;');\n}\n\n// CHECK#3\nvar d3 = new Date(6.54321e2);\nif (d3.valueOf() !== 654) {\n $ERROR('#3: var d3 = new Date(6.54321e2); d3.valueOf() === 654;');\n}\n\n// CHECK#4\nvar d4 = new Date(-6.54321e2);\nif (d4.valueOf() !== -654) {\n $ERROR('#4: var d4 = new Date(-6.54321e2); d4.valueOf() === -654;');\n}\n\n// CHECK#5\nvar d5 = new Date(0.654321e1);\nif (d5.valueOf() !== 6) {\n $ERROR('#5: var d5 = new Date(0.654321e1); d5.valueOf() === 6;');\n}\n\n// CHECK#6\nvar d6 = new Date(-0.654321e1);\nif (d6.valueOf() !== -6) {\n $ERROR('#6: var d6 = new Date(-0.654321e1); d6.valueOf() === -6;');\n}\n\n// CHECK#7\nvar d7 = new Date(true);\nif (d7.valueOf() !== 1) {\n $ERROR('#7: var d7 = new Date(true); d7.valueOf() === 1;');\n}\n\n// CHECK#8\nvar d8 = new Date(false);\nif (d8.valueOf() !== 0) {\n $ERROR('#8: var d8 = new Date(false); d8.valueOf() === 0;');\n}\n\n// CHECK#9\nvar d9 = new Date(1.23e15);\nif (d9.valueOf() !== 1.23e15) {\n $ERROR('#9: var d9 = new Date(1.23e15); d9.valueOf() === 1.23e15;');\n}\n\n// CHECK#10\nvar d10 = new Date(-1.23e15);\nif (d10.valueOf() !== -1.23e15) {\n $ERROR('#10: var d10 = new Date(-1.23e15); d10.valueOf() === -1.23e15;');\n}\n\n// CHECK#11\nvar d11 = new Date(1.23e-15);\nif (d11.valueOf() !== 0) {\n $ERROR('#11: var d11 = new Date(1.23e-15); d11.valueOf() === 0;');\n}\n\n// CHECK#12\nvar d12 = new Date(-1.23e-15);\nif (d12.valueOf() !== -0) {\n $ERROR('#12: var d12 = new Date(-1.23e-15); d12.valueOf() === -0;');\n}\n",
+ "id": "S9.4_A3_T1"
+ },
+ {
+ "section": "9.4, 15.9",
+ "description": "For testing constructor Date(NaN, Infinity, Infinity, +0 and -0) is used",
+ "test": "// CHECK#1\nvar d1 = new Date(Number.NaN);\nif (!isNaN(d1.valueOf())) {\n $ERROR('#1: var d1 = new Date(Number.NaN); d1.valueOf() === Number.NaN;');\n}\n\n// CHECK#2\nvar d2 = new Date(Infinity);\nif (!isNaN(d2.valueOf())) {\n $ERROR('#2: var d2 = new Date(Infinity); d2.valueOf() === Number.NaN;');\n}\n\n// CHECK#3\nvar d3 = new Date(-Infinity);\nif (!isNaN(d3.valueOf())) {\n $ERROR('#3: var d3 = new Date(-Infinity); d3.valueOf() === Number.NaN;');\n}\n\n// CHECK#4\nvar d4 = new Date(0);\nif (d4.valueOf() !== 0) {\n $ERROR('#4: var d4 = new Date(0); d4.valueOf() === 0;');\n}\n\n// CHECK#5\nvar d5 = new Date(-0);\nif (d5.valueOf() !== -0) {\n $ERROR('#5: var d5 = new Date(-0); d5.valueOf() === -0;');\n}\n",
+ "id": "S9.4_A3_T2"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/9.5_ToInt32.json b/website/resources/scripts/testcases2/9.5_ToInt32.json
new file mode 100644
index 000000000..6e33c9152
--- /dev/null
+++ b/website/resources/scripts/testcases2/9.5_ToInt32.json
@@ -0,0 +1,86 @@
+{
+ "testCollection": {
+ "name": "9.5_ToInt32",
+ "numTests": 13,
+ "tests": [
+ {
+ "section": "9.5, 11.7.1",
+ "description": "For testing use operator <<0",
+ "test": "// CHECK#1\nif ((Number.NaN << 0) !== +0) {\n $ERROR('#1.1: (Number.NaN << 0) === 0. Actual: ' + ((Number.NaN << 0)));\n} else if (1/(Number.NaN << 0) !== Number.POSITIVE_INFINITY) {\n $ERROR('#1.2: (Number.NaN << 0) === +0. Actual: -0');\n}\n\n// CHECK#2\nif ((Number(\"abc\") << 0) !== +0) {\n $ERROR('#2.1: (Number(\"abc\") << 0) === 0. Actual: ' + ((Number(\"abc\") << 0)));\n} else if (1/(0 << 0) !== Number.POSITIVE_INFINITY) {\n $ERROR('#2.2: (0 << 0) === +0. Actual: -0');\n}\n\n// CHECK#3\nif ((0 << 0) !== +0) {\n $ERROR('#3.1: (0 << 0) === 0. Actual: ' + ((0 << 0)));\n} else if (1/(0 << 0) !== Number.POSITIVE_INFINITY) {\n $ERROR('#3.2: (0 << 0) === +0. Actual: -0');\n}\n\n// CHECK#4\nif ((-0 << 0) !== +0) {\n $ERROR(\"#4.1: (-0 << 0) === 0\");\n} else if (1/(-0 << 0) !== Number.POSITIVE_INFINITY) {\n $ERROR(\"#4.2: (-0 << 0) === +0. Actual: -0\");\n}\n\n// CHECK#5\nif ((Number.POSITIVE_INFINITY << 0) !== +0) {\n $ERROR('#5.1: (Number.POSITIVE_INFINITY << 0) === 0. Actual: ' + ((Number.POSITIVE_INFINITY << 0)));\n} else if (1/(Number.POSITIVE_INFINITY << 0) !== Number.POSITIVE_INFINITY) {\n $ERROR('#5.2: (Number.POSITIVE_INFINITY << 0) === +0. Actual: -0');\n}\n\n// CHECK#6\nif ((Number.NEGATIVE_INFINITY << 0) !== +0) {\n $ERROR(\"#6.1: (Number.NEGATIVE_INFINITY << 0) === 0\");\n} else if (1/(Number.NEGATIVE_INFINITY << 0) !== Number.POSITIVE_INFINITY) {\n $ERROR(\"#6.2: (Number.NEGATIVE_INFINITY << 0) === +0. Actual: -0\");\n}\n",
+ "id": "S9.5_A1_T1"
+ },
+ {
+ "section": "9.5, 11.7.1",
+ "description": "Converting some numbers, which are in\\outside of Int32 scopes, with <<0 operator",
+ "test": "// CHECK#1\nif ((-2147483647 << 0) !== -2147483647) {\n $ERROR('#1: (-2147483647 << 0) === -2147483647. Actual: ' + ((-2147483647 << 0)));\n}\n\n// CHECK#2\nif ((-2147483648 << 0) !== -2147483648) {\n $ERROR('#2: (-2147483648 << 0) === -2147483648. Actual: ' + ((-2147483648 << 0)));\n}\n\n// CHECK#3\nif ((-2147483649 << 0) !== 2147483647) {\n $ERROR('#3: (-2147483649 << 0) === 2147483647. Actual: ' + ((-2147483649 << 0)));\n}\n\n// CHECK#4\nif ((-4294967296 << 0) !== 0) {\n $ERROR('#4: (-4294967296 << 0) === 0. Actual: ' + ((-4294967296 << 0)));\n}\n\n// CHECK#5\nif ((2147483646 << 0) !== 2147483646) {\n $ERROR('#5: (2147483646 << 0) === 2147483646. Actual: ' + ((2147483646 << 0)));\n}\n\n// CHECK#6\nif ((2147483647 << 0) !== 2147483647) {\n $ERROR('#6: (2147483647 << 0) === 2147483647. Actual: ' + ((2147483647 << 0)));\n}\n\n// CHECK#7\nif ((2147483648 << 0) !== -2147483648) {\n $ERROR('#7: (2147483648 << 0) === -2147483648. Actual: ' + ((2147483648 << 0)));\n}\n\n// CHECK#8\nif ((4294967296 << 0) !== 0) {\n $ERROR('#8: (4294967296 << 0) === 0. Actual: ' + ((4294967296 << 0)));\n}\n",
+ "id": "S9.5_A2.1_T1"
+ },
+ {
+ "section": "9.5, 11.4.8",
+ "description": "Converting some numbers, which are in\\outside of Int32 scopes, with ~ operator",
+ "test": "// CHECK#1\nif (~-2147483649 !== ~2147483647) {\n $ERROR('#1: ~-2147483649 === ~2147483647');\n}\n\n// CHECK#2\nif (~-4294967296 !== ~0) {\n $ERROR('#2: ~-4294967296 === ~0');\n}\n\n// CHECK#3\nif (~2147483648 !== ~-2147483648) {\n $ERROR('#3: ~2147483648 === ~-2147483648');\n}\n\n// CHECK#4\nif (~4294967296 !== ~0) {\n $ERROR('#4: ~4294967296 === ~0');\n}\n",
+ "id": "S9.5_A2.1_T2"
+ },
+ {
+ "section": "9.5, 11.7.1",
+ "description": "Use operator <<0",
+ "test": "// CHECK#1\nif ((-2147483647 << 0) !== -2147483647) {\n $ERROR('#1: (-2147483647 << 0) === -2147483647. Actual: ' + ((-2147483647 << 0)));\n}\n\n// CHECK#2\nif ((-2147483648 << 0) !== -2147483648) {\n $ERROR('#2: (-2147483648 << 0) === -2147483648. Actual: ' + ((-2147483648 << 0)));\n}\n\n// CHECK#3\nif ((-2147483649 << 0) !== 2147483647) {\n $ERROR('#3: (-2147483649 << 0) === 2147483647. Actual: ' + ((-2147483649 << 0)));\n}\n\n// CHECK#4\nif ((4294967295 << 0) !== -1) {\n $ERROR('#4: (4294967295 << 0) === -1. Actual: ' + ((4294967295 << 0)));\n}\n\n// CHECK#5\nif ((4294967296 << 0) !== 0) {\n $ERROR('#5: (4294967296 << 0) === 0. Actual: ' + ((4294967296 << 0)));\n}\n\n// CHECK#6\nif ((4294967297 << 0) !== 1) {\n $ERROR('#6: (4294967297 << 0) === 1. Actual: ' + ((4294967297 << 0)));\n}\n\n// CHECK#7\nif ((-4294967295 << 0) !== 1) {\n $ERROR('#7: (-4294967295 << 0) === 1. Actual: ' + ((-4294967295 << 0)));\n}\n\n// CHECK#8\nif ((-4294967296 << 0) !== 0) {\n $ERROR('#8: (-4294967296 << 0) === 0. Actual: ' + ((-4294967296 << 0)));\n}\n\n// CHECK#9\nif ((-4294967297 << 0) !== -1) {\n $ERROR('#9: (-4294967297 << 0) === -1. Actual: ' + ((-4294967297 << 0)));\n}\n\n// CHECK#10\nif ((8589934591 << 0) !== -1) {\n $ERROR('#10: (8589934591 << 0) === -1. Actual: ' + ((8589934591 << 0)));\n}\n\n// CHECK#11\nif ((8589934592 << 0) !== 0) {\n $ERROR('#11: (8589934592 << 0) === 0. Actual: ' + ((8589934592 << 0)));\n}\n\n// CHECK#12\nif ((8589934593 << 0) !== 1) {\n $ERROR('#12: (8589934593 << 0) === 1. Actual: ' + ((8589934593 << 0)));\n}\n",
+ "id": "S9.5_A2.2_T1"
+ },
+ {
+ "section": "9.5, 11.4.8",
+ "description": "Use operator ~",
+ "test": "// CHECK#1\nif (~-2147483647 !== 2147483646) {\n $ERROR('#1: ~-2147483647 === 2147483646)');\n}\n\n// CHECK#2\nif (~-2147483648 !== ~-2147483648) {\n $ERROR('#2: ~-2147483648 ==== ~-2147483648)');\n}\n\n// CHECK#3\nif (~-2147483649 !== ~2147483647) {\n $ERROR('#3: ~-2147483649 ==== ~2147483647)');\n}\n\n// CHECK#4\nif ((~4294967295 << 0) !== ~-1) {\n $ERROR('#4: (~4294967295 << 0) === ~-1)');\n}\n\n// CHECK#5\nif ((~4294967296 << 0) !== ~0) {\n $ERROR('#5: (~4294967296 << 0) === ~0)');\n}\n\n// CHECK#6\nif ((~4294967297 << 0) !== ~1) {\n $ERROR('#6: (~4294967297 << 0) === ~1)');\n}\n\n// CHECK#7\nif ((~-4294967295 << 0) !== ~1) {\n $ERROR('#7: (~-4294967295 << 0) === ~1)');\n}\n\n// CHECK#8\nif ((~-4294967296 << 0) !== ~0) {\n $ERROR('#8: (~-4294967296 << 0) === ~0)');\n}\n\n// CHECK#9\nif ((~-4294967297 << 0) !== ~-1) {\n $ERROR('#9: (~-4294967297 << 0) === ~-1)');\n}\n\n// CHECK#10\nif ((~8589934591 << 0) !== ~-1) {\n $ERROR('#10: (~8589934591 << 0) === ~-1)');\n}\n\n// CHECK#11\nif ((~8589934592 << 0) !== ~0) {\n $ERROR('#11: (~8589934592 << 0) === ~0)');\n}\n\n// CHECK#12\nif ((~8589934593 << 0) !== ~1) {\n $ERROR('#12: (~8589934593 << 0) === ~1)');\n}\n",
+ "id": "S9.5_A2.2_T2"
+ },
+ {
+ "section": "9.5, 11.7.1",
+ "description": "Use operator <<0",
+ "test": "// CHECK#1\nif ((2147483647 << 0) !== 2147483647) {\n $ERROR('#1: (2147483647 << 0) === 2147483647. Actual: ' + ((2147483647 << 0)));\n}\n\n// CHECK#2\nif ((2147483648 << 0) !== -2147483648) {\n $ERROR('#2: (2147483648 << 0) === -2147483648. Actual: ' + ((2147483648 << 0)));\n}\n\n// CHECK#3\nif ((2147483649 << 0) !== -2147483647) {\n $ERROR('#3: (2147483649 << 0) === -2147483647. Actual: ' + ((2147483649 << 0)));\n}\n\n// CHECK#4\nif ((4294967295 << 0) !== -1) {\n $ERROR('#4: (4294967295 << 0) === -1. Actual: ' + ((4294967295 << 0)));\n}\n\n// CHECK#5\nif ((4294967296 << 0) !== 0) {\n $ERROR('#5: (4294967296 << 0) === 0. Actual: ' + ((4294967296 << 0)));\n}\n\n// CHECK#6\nif ((4294967297 << 0) !== 1) {\n $ERROR('#6: (4294967297 << 0) === 1. Actual: ' + ((4294967297 << 0)));\n}\n\n\n",
+ "id": "S9.5_A2.3_T1"
+ },
+ {
+ "section": "9.5, 11.4.8",
+ "description": "Use operator ~",
+ "test": "// CHECK#1\nif (~2147483647 !== -2147483648) {\n $ERROR('#1: ~2147483647 ==== -2147483648)');\n}\n\n// CHECK#2\nif (~2147483648 !== ~-2147483648) {\n $ERROR('#2: ~2147483648 ==== ~-2147483648)');\n}\n\n// CHECK#3\nif (~2147483649 !== ~-2147483647) {\n $ERROR('#3: ~2147483649 ==== ~-2147483647)');\n}\n\n// CHECK#4\nif (~4294967295 !== ~-1) {\n $ERROR('#4: ~4294967295 ==== ~-1)');\n}\n\n// CHECK#5\nif (~4294967296 !== ~0) {\n $ERROR('#5: ~4294967296 ==== ~0)');\n}\n\n// CHECK#6\nif (~4294967297 !== ~1) {\n $ERROR('#6: ~4294967297 ==== ~1)');\n}\n",
+ "id": "S9.5_A2.3_T2"
+ },
+ {
+ "section": "9.5",
+ "description": "Type(x) is Boolean",
+ "test": "// CHECK#1\nif ((new Boolean(true) << 0) !== 1) {\n $ERROR('#1: (new Boolean(true) << 0) === 1. Actual: ' + ((new Boolean(true) << 0)));\n}\n\n// CHECK#2\nif ((false << 0) !== 0) {\n $ERROR('#2: (false << 0) === 0. Actual: ' + ((false << 0)));\n}\n",
+ "id": "S9.5_A3.1_T1"
+ },
+ {
+ "section": "9.5",
+ "description": "Type(x) is Number",
+ "test": "// CHECK#1\nif ((new Number(1) << 0) !== 1) {\n $ERROR('#1: (new Number(1) << 0) === 1. Actual: ' + ((new Number(1) << 0)));\n}\n\n// CHECK#2\nif ((-1.234 << 0) !== -1) {\n $ERROR('#2: (-1.234 << 0) === -1. Actual: ' + ((-1.234 << 0)));\n}\n",
+ "id": "S9.5_A3.1_T2"
+ },
+ {
+ "section": "9.5",
+ "description": "Type(x) is String",
+ "test": "// CHECK#1\nif ((new String(1) << 0) !== 1) {\n $ERROR('#1: (new String(1) << 0) === 1. Actual: ' + ((new String(1) << 0)));\n}\n\n// CHECK#2\nif ((\"-1.234\" << 0) !== -1) {\n $ERROR('#2: (\"-1.234\" << 0) === -1. Actual: ' + ((\"-1.234\" << 0)));\n}\n",
+ "id": "S9.5_A3.1_T3"
+ },
+ {
+ "section": "9.5",
+ "description": "Type(x) is Object",
+ "test": "//CHECK#1\nvar object = {valueOf: function() {return 1}};\nif (~object !== ~1) {\n $ERROR('#1: var object = {valueOf: function() {return 1}}; ~object === ~1');\n}\n\n//CHECK#2\nvar object = {valueOf: function() {return 1}, toString: function() {return 0}};\nif (~object !== ~1) {\n $ERROR('#2: var object = {valueOf: function() {return 1}, toString: function() {return 0}}; ~object === ~1');\n} \n\n//CHECK#3\nvar object = {valueOf: function() {return 1}, toString: function() {return {}}};\nif (~object !== ~1) {\n $ERROR('#3: var object = {valueOf: function() {return 1}, toString: function() {return {}}}; ~object === ~1');\n}\n\n//CHECK#4\ntry {\n var object = {valueOf: function() {return 1}, toString: function() {throw \"error\"}};\n if (~object !== ~1) {\n $ERROR('#4.1: var object = {valueOf: function() {return 1}, toString: function() {throw \"error\"}}; ~object === ~1');\n }\n}\ncatch (e) {\n if (e === ~\"error\") {\n $ERROR('#4.2: var object = {valueOf: function() {return 1}, toString: function() {throw \"error\"}}; ~object not throw \"error\"');\n } else {\n $ERROR('#4.3: var object = {valueOf: function() {return 1}, toString: function() {throw \"error\"}}; ~object not throw Error. Actual: ' + (e));\n }\n}\n\n//CHECK#5\nvar object = {toString: function() {return 1}};\nif (~object !== ~1) {\n $ERROR('#5: var object = {toString: function() {return 1}}; ~object === ~1');\n}\n\n//CHECK#6\nvar object = {valueOf: function() {return {}}, toString: function() {return 1}}\nif (~object !== ~1) {\n $ERROR('#6: var object = {valueOf: function() {return {}}, toString: function() {return 1}}; ~object === ~1');\n}\n\n//CHECK#7\ntry {\n var object = {valueOf: function() {throw \"error\"}, toString: function() {return 1}};\n ~object;\n $ERROR('#7.1: var object = {valueOf: function() {throw \"error\"}, toString: function() {return 1}}; ~object throw \"error\". Actual: ' + (~object));\n} \ncatch (e) {\n if (e !== \"error\") {\n $ERROR('#7.2: var object = {valueOf: function() {throw \"error\"}, toString: function() {return 1}}; ~object throw \"error\". Actual: ' + (e));\n } \n}\n\n//CHECK#8\ntry {\n var object = {valueOf: function() {return {}}, toString: function() {return {}}};\n ~object;\n $ERROR('#8.1: var object = {valueOf: function() {return {}}, toString: function() {return {}}}; ~object throw TypeError. Actual: ' + (~object));\n} \ncatch (e) {\n if ((e instanceof TypeError) !== true) {\n $ERROR('#8.2: var object = {valueOf: function() {return {}}, toString: function() {return {}}}; ~object throw TypeError. Actual: ' + (e));\n } \n}\n",
+ "id": "S9.5_A3.1_T4"
+ },
+ {
+ "section": "9.5",
+ "description": "Use operator <<0",
+ "test": "// CHECK#1\nif ((1.2345 << 0) !== 1) {\n $ERROR('#1: (1.2345 << 0) === 1. Actual: ' + ((1.2345 << 0)));\n}\n\n// CHECK#2\nif ((-5.4321 << 0) !== -5) {\n $ERROR('#2: (-5.4321 << 0) === -5. Actual: ' + ((-5.4321 << 0)));\n}\n",
+ "id": "S9.5_A3.2_T1"
+ },
+ {
+ "section": "9.5",
+ "description": "Use operator ~",
+ "test": "// CHECK#1\nif (~1.2345 !== ~1) {\n $ERROR('#1: ~1.2345 === ~1)');\n}\n\n// CHECK#2\nif (~-5.4321 !== ~-5) {\n $ERROR('#2: ~-5.4321 === ~-5)');\n}\n",
+ "id": "S9.5_A3.2_T2"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/9.6_ToUint32.json b/website/resources/scripts/testcases2/9.6_ToUint32.json
new file mode 100644
index 000000000..3b8e430d7
--- /dev/null
+++ b/website/resources/scripts/testcases2/9.6_ToUint32.json
@@ -0,0 +1,56 @@
+{
+ "testCollection": {
+ "name": "9.6_ToUint32",
+ "numTests": 8,
+ "tests": [
+ {
+ "section": "9.6, 11.7.3",
+ "description": "For testing use operator >>>0",
+ "test": "// CHECK#1\nif ((Number.NaN >>> 0) !== +0) {\n $ERROR('#1.1: (Number.NaN >>> 0) === 0. Actual: ' + ((Number.NaN >>> 0)));\n} else if (1/(Number.NaN >>> 0) !== Number.POSITIVE_INFINITY) {\n $ERROR('#1.2: (Number.NaN >>> 0) === +0. Actual: -0');\n}\n\n// CHECK#2\nif ((Number(\"abc\") >>> 0) !== +0) {\n $ERROR('#2.1: (Number(\"abc\") >>> 0) === 0. Actual: ' + ((Number(\"abc\") >>> 0)));\n} else if (1/(0 >>> 0) !== Number.POSITIVE_INFINITY) {\n $ERROR('#2.2: (0 >>> 0) === +0. Actual: -0');\n}\n\n// CHECK#3\nif ((0 >>> 0) !== +0) {\n $ERROR('#3.1: (0 >>> 0) === 0. Actual: ' + ((0 >>> 0)));\n} else if (1/(0 >>> 0) !== Number.POSITIVE_INFINITY) {\n $ERROR('#3.2: (0 >>> 0) === +0. Actual: -0');\n}\n\n// CHECK#4\nif ((-0 >>> 0) !== +0) {\n $ERROR(\"#4.1: (-0 >>> 0) === 0\");\n} else if (1/(-0 >>> 0) !== Number.POSITIVE_INFINITY) {\n $ERROR(\"#4.2: (-0 >>> 0) === +0. Actual: -0\");\n}\n\n// CHECK#5\nif ((Number.POSITIVE_INFINITY >>> 0) !== +0) {\n $ERROR('#5.1: (Number.POSITIVE_INFINITY >>> 0) === 0. Actual: ' + ((Number.POSITIVE_INFINITY >>> 0)));\n} else if (1/(Number.POSITIVE_INFINITY >>> 0) !== Number.POSITIVE_INFINITY) {\n $ERROR('#5.2: (Number.POSITIVE_INFINITY >>> 0) === +0. Actual: -0');\n}\n\n// CHECK#6\nif ((Number.NEGATIVE_INFINITY >>> 0) !== +0) {\n $ERROR(\"#6.1: (Number.NEGATIVE_INFINITY >>> 0) === 0\");\n} else if (1/(Number.NEGATIVE_INFINITY >>> 0) !== Number.POSITIVE_INFINITY) {\n $ERROR(\"#6.2: (Number.NEGATIVE_INFINITY >>> 0) === +0. Actual: -0\");\n}\n\n\n",
+ "id": "S9.6_A1"
+ },
+ {
+ "section": "9.6, 11.7.3",
+ "description": "Converting numbers, which are in\\outside of Uint32 scopes, with >>>0 operator",
+ "test": "// CHECK#1\nif ((0 >>> 0) !== 0) {\n $ERROR('#1: (0 >>> 0) === 0. Actual: ' + ((0 >>> 0)));\n}\n\n// CHECK#2\nif ((1 >>> 0) !== 1) {\n $ERROR('#2: (1 >>> 0) === 1. Actual: ' + ((1 >>> 0)));\n}\n\n// CHECK#3\nif ((-1 >>> 0) !== 4294967295) {\n $ERROR('#3: (-1 >>> 0) === 4294967295. Actual: ' + ((-1 >>> 0)));\n}\n\n// CHECK#4\nif ((4294967295 >>> 0) !== 4294967295) {\n $ERROR('#4: (4294967295 >>> 0) === 4294967295. Actual: ' + ((4294967295 >>> 0)));\n}\n\n// CHECK#5\nif ((4294967294 >>> 0) !== 4294967294) {\n $ERROR('#5: (4294967294 >>> 0) === 4294967294. Actual: ' + ((4294967294 >>> 0)));\n}\n\n// CHECK#6\nif ((4294967296 >>> 0) !== 0) {\n $ERROR('#6: (4294967296 >>> 0) === 0. Actual: ' + ((4294967296 >>> 0)));\n}\n",
+ "id": "S9.6_A2.1"
+ },
+ {
+ "section": "9.6, 11.7.3",
+ "description": "Use operator >>>0",
+ "test": "// CHECK#1\nif ((-2147483647 >>> 0) !== 2147483649) {\n $ERROR('#1: (-2147483647 >>> 0) === 2147483649. Actual: ' + ((-2147483647 >>> 0)));\n}\n\n// CHECK#2\nif ((-2147483648 >>> 0) !== 2147483648) {\n $ERROR('#2: (-2147483648 >>> 0) === 2147483648. Actual: ' + ((-2147483648 >>> 0)));\n}\n\n// CHECK#3\nif ((-2147483649 >>> 0) !== 2147483647) {\n $ERROR('#3: (-2147483649 >>> 0) === 2147483647. Actual: ' + ((-2147483649 >>> 0)));\n}\n\n// CHECK#4\nif ((-4294967295 >>> 0) !== 1) {\n $ERROR('#4: (-4294967295 >>> 0) === 1. Actual: ' + ((-4294967295 >>> 0)));\n}\n\n// CHECK#5\nif ((-4294967296 >>> 0) !== 0) {\n $ERROR('#5: (-4294967296 >>> 0) === 0. Actual: ' + ((-4294967296 >>> 0)));\n}\n\n// CHECK#6\nif ((-4294967297 >>> 0) !== 4294967295) {\n $ERROR('#6: (-4294967297 >>> 0) === 4294967295. Actual: ' + ((-4294967297 >>> 0)));\n}\n\n// CHECK#7\nif ((4294967295 >>> 0) !== 4294967295) {\n $ERROR('#7: (4294967295 >>> 0) === 4294967295. Actual: ' + ((4294967295 >>> 0)));\n}\n\n// CHECK#8\nif ((4294967296 >>> 0) !== 0) {\n $ERROR('#8: (4294967296 >>> 0) === 0. Actual: ' + ((4294967296 >>> 0)));\n}\n\n// CHECK#9\nif ((4294967297 >>> 0) !== 1) {\n $ERROR('#9: (4294967297 >>> 0) === 1. Actual: ' + ((4294967297 >>> 0)));\n}\n\n// CHECK#10\nif ((8589934591 >>> 0) !== 4294967295) {\n $ERROR('#10: (8589934591 >>> 0) === 4294967295. Actual: ' + ((8589934591 >>> 0)));\n}\n\n// CHECK#11\nif ((8589934592 >>> 0) !== 0) {\n $ERROR('#11: (8589934592 >>> 0) === 0. Actual: ' + ((8589934592 >>> 0)));\n}\n\n// CHECK#12\nif ((8589934593 >>> 0) !== 1) {\n $ERROR('#12: (8589934593 >>> 0) === 1. Actual: ' + ((8589934593 >>> 0)));\n}\n",
+ "id": "S9.6_A2.2"
+ },
+ {
+ "section": "9.6",
+ "description": "Type(x) is Boolean",
+ "test": "// CHECK#1\nif ((new Boolean(true) >>> 0) !== 1) {\n $ERROR('#1: (new Boolean(true) >>> 0) === 1. Actual: ' + ((new Boolean(true) >>> 0)));\n}\n\n// CHECK#2\nif ((false >>> 0) !== 0) {\n $ERROR('#2: (false >>> 0) === 0. Actual: ' + ((false >>> 0)));\n}\n",
+ "id": "S9.6_A3.1_T1"
+ },
+ {
+ "section": "9.6",
+ "description": "Type(x) is Number",
+ "test": "// CHECK#1\nif ((new Number(1) >>> 0) !== 1) {\n $ERROR('#1: (new Number(1) >>> 0) === 1. Actual: ' + ((new Number(1) >>> 0)));\n}\n\n// CHECK#2\nif ((-1.234 >>> 0) !== 4294967295) {\n $ERROR('#2: (-1.234 >>> 0) === 4294967295. Actual: ' + ((-1.234 >>> 0)));\n}\n",
+ "id": "S9.6_A3.1_T2"
+ },
+ {
+ "section": "9.6",
+ "description": "Type(x) is String",
+ "test": "// CHECK#1\nif ((new String(1) >>> 0) !== 1) {\n $ERROR('#1: (new String(1) >>> 0) === 1. Actual: ' + ((new String(1) >>> 0)));\n}\n\n// CHECK#2\nif ((\"-1.234\" >>> 0) !== 4294967295) {\n $ERROR('#2: (\"-1.234\" >>> 0) === 4294967295. Actual: ' + ((\"-1.234\" >>> 0)));\n}\n",
+ "id": "S9.6_A3.1_T3"
+ },
+ {
+ "section": "9.6",
+ "description": "Type(x) is Object",
+ "test": "//CHECK#1\nvar object = {valueOf: function() {return 1}};\nif ((object >>> 0) !== 1) {\n $ERROR('#1: var object = {valueOf: function() {return 1}}; (object >>> 0) === 1. Actual: ' + ((object >>> 0)));\n}\n\n//CHECK#2\nvar object = {valueOf: function() {return 1}, toString: function() {return 0}};\nif ((object >>> 0) !== 1) {\n $ERROR('#2: var object = {valueOf: function() {return 1}, toString: function() {return 0}}; (object >>> 0) === 1. Actual: ' + ((object >>> 0)));\n} \n\n//CHECK#3\nvar object = {valueOf: function() {return 1}, toString: function() {return {}}};\nif ((object >>> 0) !== 1) {\n $ERROR('#3: var object = {valueOf: function() {return 1}, toString: function() {return {}}}; (object >>> 0) === 1. Actual: ' + ((object >>> 0)));\n}\n\n//CHECK#4\ntry {\n var object = {valueOf: function() {return 1}, toString: function() {throw \"error\"}};\n if ((object >>> 0) !== 1) {\n $ERROR('#4.1: var object = {valueOf: function() {return 1}, toString: function() {throw \"error\"}}; (object >>> 0) === 1. Actual: ' + ((object >>> 0)));\n }\n}\ncatch (e) {\n if (e === \"error\") {\n $ERROR('#4.2: var object = {valueOf: function() {return 1}, toString: function() {throw \"error\"}}; object not throw \"error\"');\n } else {\n $ERROR('#4.3: var object = {valueOf: function() {return 1}, toString: function() {throw \"error\"}}; object not throw Error. Actual: ' + (e));\n }\n}\n\n//CHECK#5\nvar object = {toString: function() {return 1}};\nif ((object >>> 0) !== 1) {\n $ERROR('#5: var object = {toString: function() {return 1}}; (object >>> 0) === 1. Actual: ' + ((object >>> 0)));\n}\n\n//CHECK#6\nvar object = {valueOf: function() {return {}}, toString: function() {return 1}}\nif ((object >>> 0) !== 1) {\n $ERROR('#6: var object = {valueOf: function() {return {}}, toString: function() {return 1}}; (object >>> 0) === 1. Actual: ' + ((object >>> 0)));\n}\n\n//CHECK#7\ntry {\n var object = {valueOf: function() {throw \"error\"}, toString: function() {return 1}};\n object >>> 0;\n $ERROR('#7.1: var object = {valueOf: function() {throw \"error\"}, toString: function() {return 1}}; object throw \"error\". Actual: ' + (object >>> 0));\n} \ncatch (e) {\n if (e !== \"error\") {\n $ERROR('#7.2: var object = {valueOf: function() {throw \"error\"}, toString: function() {return 1}}; object throw \"error\". Actual: ' + (e));\n } \n}\n\n//CHECK#8\ntry {\n var object = {valueOf: function() {return {}}, toString: function() {return {}}};\n object >>> 0;\n $ERROR('#8.1: var object = {valueOf: function() {return {}}, toString: function() {return {}}}; object throw TypeError. Actual: ' + (object >>> 0));\n} \ncatch (e) {\n if ((e instanceof TypeError) !== true) {\n $ERROR('#8.2: var object = {valueOf: function() {return {}}, toString: function() {return {}}}; object throw TypeError. Actual: ' + (e));\n } \n}\n",
+ "id": "S9.6_A3.1_T4"
+ },
+ {
+ "section": "9.6",
+ "description": "Use operator >>>0",
+ "test": "// CHECK#1\nif ((1.2345 >>> 0) !== 1) {\n $ERROR('#1: (1.2345 >>> 0) === 1. Actual: ' + ((1.2345 >>> 0)));\n}\n\n// CHECK#2\nif ((-5.4321 >>> 0) !== 4294967291) {\n $ERROR('#2: (-5.4321 >>> 0) === 4294967291. Actual: ' + ((-5.4321 >>> 0)));\n}\n",
+ "id": "S9.6_A3.2_T1"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/9.7_ToUint16.json b/website/resources/scripts/testcases2/9.7_ToUint16.json
new file mode 100644
index 000000000..1673371e9
--- /dev/null
+++ b/website/resources/scripts/testcases2/9.7_ToUint16.json
@@ -0,0 +1,56 @@
+{
+ "testCollection": {
+ "name": "9.7_ToUint16",
+ "numTests": 8,
+ "tests": [
+ {
+ "section": "9.7, 15.5.3.2, 15.5.4.5",
+ "description": "For testing use String.fromCharCode(Number).charCodeAt(0) construction",
+ "test": "// CHECK#1\nif (String.fromCharCode(Number.NaN).charCodeAt(0) !== +0) {\n $ERROR('#1.1: String.fromCharCode(Number.NaN).charCodeAt(0) === 0. Actual: ' + (String.fromCharCode(Number.NaN).charCodeAt(0)));\n} else if (1/String.fromCharCode(Number.NaN).charCodeAt(0) !== Number.POSITIVE_INFINITY) {\n $ERROR('#1.2: String.fromCharCode(Number.NaN).charCodeAt(0) === +0. Actual: -0');\n}\n\n// CHECK#2\nif (String.fromCharCode(Number(\"abc\")).charCodeAt(0) !== +0) {\n $ERROR('#2.1: String.fromCharCode(Number(\"abc\")).charCodeAt(0) === 0. Actual: ' + (String.fromCharCode(Number(\"abc\")).charCodeAt(0)));\n} else if (1/String.fromCharCode(0).charCodeAt(0) !== Number.POSITIVE_INFINITY) {\n $ERROR('#2.2: String.fromCharCode(0).charCodeAt(0) === +0. Actual: -0');\n}\n\n// CHECK#3\nif (String.fromCharCode(0).charCodeAt(0) !== +0) {\n $ERROR('#3.1: String.fromCharCode(0).charCodeAt(0) === 0. Actual: ' + (String.fromCharCode(0).charCodeAt(0)));\n} else if (1/String.fromCharCode(0).charCodeAt(0) !== Number.POSITIVE_INFINITY) {\n $ERROR('#3.2: String.fromCharCode(0).charCodeAt(0) === +0. Actual: -0');\n}\n\n// CHECK#4\nif (String.fromCharCode(-0).charCodeAt(0) !== +0) {\n $ERROR(\"#4.1: String.fromCharCode(-0).charCodeAt(0) === +0\");\n} else if (1/String.fromCharCode(-0).charCodeAt(0) !== Number.POSITIVE_INFINITY) {\n $ERROR(\"#4.2: String.fromCharCode(-0).charCodeAt(0) === +0. Actual: -0\");\n}\n\n// CHECK#5\nif (String.fromCharCode(Number.POSITIVE_INFINITY).charCodeAt(0) !== +0) {\n $ERROR('#5.1: String.fromCharCode(Number.POSITIVE_INFINITY).charCodeAt(0) === 0. Actual: ' + (String.fromCharCode(Number.POSITIVE_INFINITY).charCodeAt(0)));\n} else if (1/String.fromCharCode(Number.POSITIVE_INFINITY).charCodeAt(0) !== Number.POSITIVE_INFINITY) {\n $ERROR('#5.2: String.fromCharCode(Number.POSITIVE_INFINITY).charCodeAt(0) === +0. Actual: -0');\n}\n\n// CHECK#6\nif (String.fromCharCode(Number.NEGATIVE_INFINITY).charCodeAt(0) !== +0) {\n $ERROR(\"#6.1: String.fromCharCode(Number.NEGATIVE_INFINITY).charCodeAt(0) === +0\");\n} else if (1/String.fromCharCode(Number.NEGATIVE_INFINITY).charCodeAt(0) !== Number.POSITIVE_INFINITY) {\n $ERROR(\"#6.2: String.fromCharCode(Number.NEGATIVE_INFINITY).charCodeAt(0) === +0. Actual: -0\");\n}\n\n\n",
+ "id": "S9.7_A1"
+ },
+ {
+ "section": "9.7, 11.7.3",
+ "description": "Converting numbers, which are in\\outside of Uint16 scopes, with String.fromCharCode(Number).charCodeAt(0) construction",
+ "test": "// CHECK#1\nif (String.fromCharCode(0).charCodeAt(0) !== 0) {\n $ERROR('#1: String.fromCharCode(0).charCodeAt(0) === 0. Actual: ' + (String.fromCharCode(0).charCodeAt(0)));\n}\n\n// CHECK#2\nif (String.fromCharCode(1).charCodeAt(0) !== 1) {\n $ERROR('#2: String.fromCharCode(1).charCodeAt(0) === 1. Actual: ' + (String.fromCharCode(1).charCodeAt(0)));\n}\n\n// CHECK#3\nif (String.fromCharCode(-1).charCodeAt(0) !== 65535) {\n $ERROR('#3: String.fromCharCode(-1).charCodeAt(0) === 65535. Actual: ' + (String.fromCharCode(-1).charCodeAt(0)));\n}\n\n// CHECK#4\nif (String.fromCharCode(65535).charCodeAt(0) !== 65535) {\n $ERROR('#4: String.fromCharCode(65535).charCodeAt(0) === 65535. Actual: ' + (String.fromCharCode(65535).charCodeAt(0)));\n}\n\n// CHECK#5\nif (String.fromCharCode(65534).charCodeAt(0) !== 65534) {\n $ERROR('#5: String.fromCharCode(65534).charCodeAt(0) === 65534. Actual: ' + (String.fromCharCode(65534).charCodeAt(0)));\n}\n\n// CHECK#6\nif (String.fromCharCode(65536).charCodeAt(0) !== 0) {\n $ERROR('#6: String.fromCharCode(65536).charCodeAt(0) === 0. Actual: ' + (String.fromCharCode(65536).charCodeAt(0)));\n}\n\n// CHECK#7\nif (String.fromCharCode(4294967295).charCodeAt(0) !== 65535) {\n $ERROR('#7: String.fromCharCode(4294967295).charCodeAt(0) === 65535. Actual: ' + (String.fromCharCode(4294967295).charCodeAt(0)));\n}\n\n// CHECK#8\nif (String.fromCharCode(4294967294).charCodeAt(0) !== 65534) {\n $ERROR('#8: String.fromCharCode(4294967294).charCodeAt(0) === 65534. Actual: ' + (String.fromCharCode(4294967294).charCodeAt(0)));\n}\n\n// CHECK#9\nif (String.fromCharCode(4294967296).charCodeAt(0) !== 0) {\n $ERROR('#9: String.fromCharCode(4294967296).charCodeAt(0) === 0. Actual: ' + (String.fromCharCode(4294967296).charCodeAt(0)));\n}\n",
+ "id": "S9.7_A2.1"
+ },
+ {
+ "section": "9.7, 11.7.3",
+ "description": "For testing use String.fromCharCode(Number).charCodeAt(0) construction",
+ "test": "// CHECK#1\nif (String.fromCharCode(-32767).charCodeAt(0) !== 32769) {\n $ERROR('#1: String.fromCharCode(-32767).charCodeAt(0) === 32769. Actual: ' + (String.fromCharCode(-32767).charCodeAt(0)));\n}\n\n// CHECK#2\nif (String.fromCharCode(-32768).charCodeAt(0) !== 32768) {\n $ERROR('#2: String.fromCharCode(-32768).charCodeAt(0) === 32768. Actual: ' + (String.fromCharCode(-32768).charCodeAt(0)));\n}\n\n// CHECK#3\nif (String.fromCharCode(-32769).charCodeAt(0) !== 32767) {\n $ERROR('#3: String.fromCharCode(-32769).charCodeAt(0) === 32767. Actual: ' + (String.fromCharCode(-32769).charCodeAt(0)));\n}\n\n// CHECK#4\nif (String.fromCharCode(-65535).charCodeAt(0) !== 1) {\n $ERROR('#4: String.fromCharCode(-65535).charCodeAt(0) === 1. Actual: ' + (String.fromCharCode(-65535).charCodeAt(0)));\n}\n\n// CHECK#5\nif (String.fromCharCode(-65536).charCodeAt(0) !== 0) {\n $ERROR('#5: String.fromCharCode(-65536).charCodeAt(0) === 0. Actual: ' + (String.fromCharCode(-65536).charCodeAt(0)));\n}\n\n// CHECK#6\nif (String.fromCharCode(-65537).charCodeAt(0) !== 65535) {\n $ERROR('#6: String.fromCharCode(-65537).charCodeAt(0) === 65535. Actual: ' + (String.fromCharCode(-65537).charCodeAt(0)));\n}\n\n// CHECK#7\nif (String.fromCharCode(65535).charCodeAt(0) !== 65535) {\n $ERROR('#7: String.fromCharCode(65535).charCodeAt(0) === 65535. Actual: ' + (String.fromCharCode(65535).charCodeAt(0)));\n}\n\n// CHECK#8\nif (String.fromCharCode(65536).charCodeAt(0) !== 0) {\n $ERROR('#8: String.fromCharCode(65536).charCodeAt(0) === 0. Actual: ' + (String.fromCharCode(65536).charCodeAt(0)));\n}\n\n// CHECK#9\nif (String.fromCharCode(65537).charCodeAt(0) !== 1) {\n $ERROR('#9: String.fromCharCode(65537).charCodeAt(0) === 1. Actual: ' + (String.fromCharCode(65537).charCodeAt(0)));\n}\n\n// CHECK#10\nif (String.fromCharCode(131071).charCodeAt(0) !== 65535) {\n $ERROR('#10: String.fromCharCode(131071).charCodeAt(0) === 65535. Actual: ' + (String.fromCharCode(131071).charCodeAt(0)));\n}\n\n// CHECK#11\nif (String.fromCharCode(131072).charCodeAt(0) !== 0) {\n $ERROR('#11: String.fromCharCode(131072).charCodeAt(0) === 0. Actual: ' + (String.fromCharCode(131072).charCodeAt(0)));\n}\n\n// CHECK#12\nif (String.fromCharCode(131073).charCodeAt(0) !== 1) {\n $ERROR('#12: String.fromCharCode(131073).charCodeAt(0) === 1. Actual: ' + (String.fromCharCode(131073).charCodeAt(0)));\n}\n",
+ "id": "S9.7_A2.2"
+ },
+ {
+ "section": "9.7",
+ "description": "Type(x) is Boolean",
+ "test": "// CHECK#1\nif (String.fromCharCode(new Boolean(true)).charCodeAt(0) !== 1) {\n $ERROR('#1: String.fromCharCode(new Boolean(true)).charCodeAt(0) === 1. Actual: ' + (String.fromCharCode(new Boolean(true)).charCodeAt(0)));\n}\n\n// CHECK#2\nif (String.fromCharCode(false).charCodeAt(0) !== 0) {\n $ERROR('#2: String.fromCharCode(false).charCodeAt(0) === 0. Actual: ' + (String.fromCharCode(false).charCodeAt(0)));\n}\n",
+ "id": "S9.7_A3.1_T1"
+ },
+ {
+ "section": "9.7",
+ "description": "Type(x) is Number",
+ "test": "// CHECK#1\nif (String.fromCharCode(new Number(1)).charCodeAt(0) !== 1) {\n $ERROR('#1: String.fromCharCode(new Number(1)).charCodeAt(0) === 1. Actual: ' + (String.fromCharCode(new Number(1)).charCodeAt(0)));\n}\n\n// CHECK#2\nif (String.fromCharCode(-1.234).charCodeAt(0) !== 65535) {\n $ERROR('#2: String.fromCharCode(-1.234).charCodeAt(0) === 65535. Actual: ' + (String.fromCharCode(-1.234).charCodeAt(0)));\n}\n",
+ "id": "S9.7_A3.1_T2"
+ },
+ {
+ "section": "9.7",
+ "description": "Type(x) is String",
+ "test": "// CHECK#1\nif (String.fromCharCode(new String(1)).charCodeAt(0) !== 1) {\n $ERROR('#1: String.fromCharCode(new String(1)).charCodeAt(0) === 1. Actual: ' + (String.fromCharCode(new String(1)).charCodeAt(0)));\n}\n\n// CHECK#2\nif (String.fromCharCode(\"-1.234\").charCodeAt(0) !== 65535) {\n $ERROR('#2: String.fromCharCode(\"-1.234\").charCodeAt(0) === 65535. Actual: ' + (String.fromCharCode(\"-1.234\").charCodeAt(0)));\n}\n",
+ "id": "S9.7_A3.1_T3"
+ },
+ {
+ "section": "9.7",
+ "description": "Type(x) is Object",
+ "test": "//CHECK#1\nvar object = {valueOf: function() {return 1}};\nif (String.fromCharCode(object).charCodeAt(0) !== 1) {\n $ERROR('#1: var object = {valueOf: function() {return 1}}; String.fromCharCode(object).charCodeAt(0) === 1. Actual: ' + (String.fromCharCode(object).charCodeAt(0)));\n}\n\n//CHECK#2\nvar object = {valueOf: function() {return 1}, toString: function() {return 0}};\nif (String.fromCharCode(object).charCodeAt(0) !== 1) {\n $ERROR('#2: var object = {valueOf: function() {return 1}, toString: function() {return 0}}; String.fromCharCode(object).charCodeAt(0) === 1. Actual: ' + (String.fromCharCode(object).charCodeAt(0)));\n} \n\n//CHECK#3\nvar object = {valueOf: function() {return 1}, toString: function() {return {}}};\nif (String.fromCharCode(object).charCodeAt(0) !== 1) {\n $ERROR('#3: var object = {valueOf: function() {return 1}, toString: function() {return {}}}; String.fromCharCode(object).charCodeAt(0) === 1. Actual: ' + (String.fromCharCode(object).charCodeAt(0)));\n}\n\n//CHECK#4\ntry {\n var object = {valueOf: function() {return 1}, toString: function() {throw \"error\"}};\n if (String.fromCharCode(object).charCodeAt(0) !== 1) {\n $ERROR('#4.1: var object = {valueOf: function() {return 1}, toString: function() {throw \"error\"}}; String.fromCharCode(object).charCodeAt(0) === 1. Actual: ' + (String.fromCharCode(object).charCodeAt(0)));\n }\n}\ncatch (e) {\n if (e === \"error\") {\n $ERROR('#4.2: var object = {valueOf: function() {return 1}, toString: function() {throw \"error\"}}; object not throw \"error\"');\n } else {\n $ERROR('#4.3: var object = {valueOf: function() {return 1}, toString: function() {throw \"error\"}}; object not throw Error. Actual: ' + (e));\n }\n}\n\n//CHECK#5\nvar object = {toString: function() {return 1}};\nif (String.fromCharCode(object).charCodeAt(0) !== 1) {\n $ERROR('#5: var object = {toString: function() {return 1}}; String.fromCharCode(object).charCodeAt(0) === 1. Actual: ' + (String.fromCharCode(object).charCodeAt(0)));\n}\n\n//CHECK#6\nvar object = {valueOf: function() {return {}}, toString: function() {return 1}}\nif (String.fromCharCode(object).charCodeAt(0) !== 1) {\n $ERROR('#6: var object = {valueOf: function() {return {}}, toString: function() {return 1}}; String.fromCharCode(object).charCodeAt(0) === 1. Actual: ' + (String.fromCharCode(object).charCodeAt(0)));\n}\n\n//CHECK#7\ntry {\n var object = {valueOf: function() {throw \"error\"}, toString: function() {return 1}};\n object >>> 0;\n $ERROR('#7.1: var object = {valueOf: function() {throw \"error\"}, toString: function() {return 1}}; object throw \"error\". Actual: ' + (object >>> 0));\n} \ncatch (e) {\n if (e !== \"error\") {\n $ERROR('#7.2: var object = {valueOf: function() {throw \"error\"}, toString: function() {return 1}}; object throw \"error\". Actual: ' + (e));\n } \n}\n\n//CHECK#8\ntry {\n var object = {valueOf: function() {return {}}, toString: function() {return {}}};\n object >>> 0;\n $ERROR('#8.1: var object = {valueOf: function() {return {}}, toString: function() {return {}}}; object throw TypeError. Actual: ' + (object >>> 0));\n} \ncatch (e) {\n if ((e instanceof TypeError) !== true) {\n $ERROR('#8.2: var object = {valueOf: function() {return {}}, toString: function() {return {}}}; object throw TypeError. Actual: ' + (e));\n } \n}\n",
+ "id": "S9.7_A3.1_T4"
+ },
+ {
+ "section": "9.7",
+ "description": "For testing use String.fromCharCode(Number).charCodeAt(0) construction",
+ "test": "// CHECK#1\nif (String.fromCharCode(1.2345).charCodeAt(0) !== 1) {\n $ERROR('#1: String.fromCharCode(1.2345).charCodeAt(0) === 1. Actual: ' + (String.fromCharCode(1.2345).charCodeAt(0)));\n}\n\n// CHECK#2\nif (String.fromCharCode(-5.4321).charCodeAt(0) !== 65531) {\n $ERROR('#2: String.fromCharCode(-5.4321).charCodeAt(0) === 65531. Actual: ' + (String.fromCharCode(-5.4321).charCodeAt(0)));\n}\n",
+ "id": "S9.7_A3.2_T1"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/9.8.1_ToString_Applied_to_the_Number_Type.json b/website/resources/scripts/testcases2/9.8.1_ToString_Applied_to_the_Number_Type.json
new file mode 100644
index 000000000..bc8ef4ec6
--- /dev/null
+++ b/website/resources/scripts/testcases2/9.8.1_ToString_Applied_to_the_Number_Type.json
@@ -0,0 +1,68 @@
+{
+ "testCollection": {
+ "name": "9.8.1_ToString_Applied_to_the_Number_Type",
+ "numTests": 10,
+ "tests": [
+ {
+ "section": "9.8.1",
+ "description": "NaN convert to String by explicit transformation",
+ "test": "// CHECK#1\nif (String(NaN) !== \"NaN\") {\n $ERROR('#1: String(NaN) === Not-a-Number Actual: ' + (String(NaN)));\n}\n\n// CHECK#2\nif (String(Number.NaN) !== \"NaN\") {\n $ERROR('#2: String(Number.NaN) === Not-a-Number Actual: ' + (String(Number.NaN)));\n}\n\n// CHECK#3\nif (String(Number(\"asasa\")) !== \"NaN\") {\n $ERROR('#3: String(Number(\"asasa\")) === Not-a-Number Actual: ' + (String(Number(\"asasa\"))));\n}\n",
+ "id": "S9.8.1_A1"
+ },
+ {
+ "section": "9.8.1",
+ "description": "Various float numbers convert to String by explicit transformation",
+ "test": "// CHECK#1\nif (String(1.2345) !== \"1.2345\") {\n $ERROR('#1: String(1.2345) === \"1.2345\". Actual: ' + (String(1.2345)));\n}\n\n// CHECK#2\nif (String(1.234567890) !== \"1.23456789\") {\n $ERROR('#2: String(1.234567890) === \"1.23456789\". Actual: ' + (String(1.234567890)));\n}\n\n// CHECK#3\nif (String(0.12345) !== \"0.12345\") {\n $ERROR('#3: String(0.12345) === \"0.12345\". Actual: ' + (String(0.12345)));\n}\n\n// CHECK#4\nif (String(.012345) !== \"0.012345\") {\n $ERROR('#4: String(.012345) === \"0.012345\". Actual: ' + (String(.012345)));\n}\n\n// CHECK#5\nif (String(.0012345) !== \"0.0012345\") {\n $ERROR('#5: String(.0012345) === \"0.0012345\". Actual: ' + (String(.0012345)));\n}\n\n// CHECK#6\nif (String(.00012345) !== \"0.00012345\") {\n $ERROR('#6: String(.00012345) === \"0.00012345\". Actual: ' + (String(.00012345)));\n}\n\n// CHECK#7\nif (String(.000012345) !== \"0.000012345\") {\n $ERROR('#7: String(.000012345) === \"0.000012345\". Actual: ' + (String(.000012345)));\n}\n\n// CHECK#8\nif (String(.0000012345) !== \"0.0000012345\") {\n $ERROR('#8: String(.0000012345) === \"0.0000012345\". Actual: ' + (String(.0000012345)));\n}\n\n// CHECK#9\nif (String(.00000012345) !== \"1.2345e-7\") {\n $ERROR('#9: String(.00000012345) === \"1.2345e-7\". Actual: ' + (String(.00000012345)));\n}\n",
+ "id": "S9.8.1_A10"
+ },
+ {
+ "section": "9.8.1",
+ "description": "+0 and -0 convert to String by explicit transformation",
+ "test": "// CHECK#1\nif (String(+0) !== \"0\") {\n $ERROR('#1: String(+0) === \"0\". Actual: ' + (String(+0)));\n}\n\n// CHECK#2\nif (String(-0) !== \"0\") {\n $ERROR('#2: String(-0) === \"0\". Actual: ' + (String(-0)));\n}\n",
+ "id": "S9.8.1_A2"
+ },
+ {
+ "section": "9.8.1",
+ "description": "-1234567890 convert to String by explicit transformation",
+ "test": "// CHECK#1\nif (String(-1234567890) !== \"-1234567890\") {\n $ERROR('#1: String(-1234567890) === \"-1234567890\". Actual: ' + (String(-1234567890)));\n}\n\n// CHECK#2\nif (\"-\"+String(-(-1234567890)) !== \"-1234567890\") {\n $ERROR('#2: \"-\"+String(-(-1234567890)) === \"-1234567890\". Actual: ' + (\"-\"+String(-(-1234567890))));\n}\n",
+ "id": "S9.8.1_A3"
+ },
+ {
+ "section": "9.8.1",
+ "description": "+/-Infinity convert to String by explicit transformation",
+ "test": "// CHECK#1\nif (String(Infinity) !== \"Infinity\") {\n $ERROR('#1: String(Infinity) === \"Infinity\". Actual: ' + (String(Infinity)));\n}\n\n// CHECK#2\nif (String(Number.POSITIVE_INFINITY) !== \"Infinity\") {\n $ERROR('#2: String(Number.POSITIVE_INFINITY) === \"Infinity\". Actual: ' + (String(Number.POSITIVE_INFINITY)));\n}\n\n// CHECK#3\nif (String(-Infinity) !== \"-Infinity\") {\n $ERROR('#3: String(-Infinity) === \"-Infinity\". Actual: ' + (String(-Infinity)));\n}\n\n// CHECK#4\nif (String(Number.NEGATIVE_INFINITY) !== \"-Infinity\") {\n $ERROR('#4: String(Number.NEGATIVE_INFINITY) === \"-Infinity\". Actual: ' + (String(Number.NEGATIVE_INFINITY)));\n}\n",
+ "id": "S9.8.1_A4"
+ },
+ {
+ "section": "9.8.1",
+ "description": "Various integer numbers convert to String by explicit transformation",
+ "test": "// CHECK#1\nif (String(1) !== \"1\") {\n $ERROR('#1: String(1) === \"1\". Actual: ' + (String(1)));\n}\n\n// CHECK#2\nif (String(10) !== \"10\") {\n $ERROR('#2: String(10) === \"10\". Actual: ' + (String(10)));\n}\n\n// CHECK#3\nif (String(100) !== \"100\") {\n $ERROR('#3: String(100) === \"100\". Actual: ' + (String(100)));\n}\n\n// CHECK#4\nif (String(100000000000000000000) !== \"100000000000000000000\") {\n $ERROR('#4: String(100000000000000000000) === \"100000000000000000000\". Actual: ' + (String(100000000000000000000)));\n}\n\n// CHECK#5\nif (String(1e20) !== \"100000000000000000000\") {\n $ERROR('#5: String(1e20) === \"100000000000000000000\". Actual: ' + (String(1e20)));\n}\n\n// CHECK#6\nif (String(12345) !== \"12345\") {\n $ERROR('#6: String(12345) === \"12345\". Actual: ' + (String(12345)));\n}\n\n// CHECK#7\nif (String(12345000) !== \"12345000\") {\n $ERROR('#7: String(12345000) === \"12345000\". Actual: ' + (String(12345000)));\n}\n\n// CHECK#8\nif (String(-1) !== \"-1\") {\n $ERROR('#8: String(-1) === \"-1\". Actual: ' + (String(-1)));\n}\n\n// CHECK#9\nif (String(-10) !== \"-10\") {\n $ERROR('#9: String(-10) === \"-10\". Actual: ' + (String(-10)));\n}\n\n// CHECK#10\nif (String(-100) !== \"-100\") {\n $ERROR('#3: String(-100) === \"-100\". Actual: ' + (String(-100)));\n}\n\n// CHECK#10\nif (String(-100000000000000000000) !== \"-100000000000000000000\") {\n $ERROR('#10: String(-100000000000000000000) === \"-100000000000000000000\". Actual: ' + (String(-100000000000000000000)));\n}\n\n// CHECK#11\nif (String(-1e20) !== \"-100000000000000000000\") {\n $ERROR('#11: String(-1e20) === \"-100000000000000000000\". Actual: ' + (String(-1e20)));\n}\n\n// CHECK#12\nif (String(-12345) !== \"-12345\") {\n $ERROR('#12: String(-12345) === \"-12345\". Actual: ' + (String(-12345)));\n}\n\n// CHECK#13\nif (String(-12345000) !== \"-12345000\") {\n $ERROR('#13: String(-12345000) === \"-12345000\". Actual: ' + (String(-12345000)));\n}\n\n// CHECK#14\nif (String(1E20) !== \"100000000000000000000\") {\n $ERROR('#14: String(1E20) === \"100000000000000000000\". Actual: ' + (String(1E20)));\n}\n\n// CHECK#15\nif (String(-1E20) !== \"-100000000000000000000\") {\n $ERROR('#15: String(-1E20) === \"-100000000000000000000\". Actual: ' + (String(-1E20)));\n}\n\n",
+ "id": "S9.8.1_A6"
+ },
+ {
+ "section": "9.8.1",
+ "description": "1.0000001 and -1.0000001 convert to String by explicit transformation",
+ "test": "// CHECK#1\nif (String(1.0000001) !== \"1.0000001\") {\n $ERROR('#1: String(1.0000001) === \"1.0000001\". Actual: ' + (String(1.0000001)));\n}\n\n// CHECK#2\nif (String(-1.0000001) !== \"-1.0000001\") {\n $ERROR('#2: String(-1.0000001) === \"-1.0000001\". Actual: ' + (String(-1.0000001)));\n}\n",
+ "id": "S9.8.1_A7"
+ },
+ {
+ "section": "9.8.1",
+ "description": "Various float numbers convert to String by explicit transformation",
+ "test": "// CHECK#1\nif (String(0.1) !== \"0.1\") {\n $ERROR('#1: String(0.1) === \"0.1\". Actual: ' + (String(0.1)));\n}\n\n// CHECK#2\nif (String(0.000001) !== \"0.000001\") {\n $ERROR('#2: String(0.000001) === \"0.000001\". Actual: ' + (String(0.000001)));\n}\n\n// CHECK#3\nif (String(1e-6) !== \"0.000001\") {\n $ERROR('#3: String(1e-6) === \"0.000001\". Actual: ' + (String(1e-6)));\n}\n\n// CHECK#4\nif (String(1E-6) !== \"0.000001\") {\n $ERROR('#4: String(1E-6) === \"0.000001\". Actual: ' + (String(1E-6)));\n}\n\n// CHECK#5\nif (String(-0.1) !== \"-0.1\") {\n $ERROR('#5: String(-0.1) === \"-0.1\". Actual: ' + (String(-0.1)));\n}\n\n// CHECK#6\nif (String(-0.000001) !== \"-0.000001\") {\n $ERROR('#6: String(-0.000001) === \"-0.000001\". Actual: ' + (String(-0.000001)));\n}\n\n// CHECK#7\nif (String(-1e-6) !== \"-0.000001\") {\n $ERROR('#7: String(-1e-6) === \"0.000001\". Actual: ' + (String(-1e-6)));\n}\n\n// CHECK#8\nif (String(-1E-6) !== \"-0.000001\") {\n $ERROR('#8: String(-1E-6) === \"0.000001\". Actual: ' + (String(-1E-6)));\n}\n\n",
+ "id": "S9.8.1_A8"
+ },
+ {
+ "section": "9.8.1",
+ "description": "Various big numbers convert to String by explicit transformation",
+ "test": "// CHECK#1\nif (String(1000000000000000000000) !== \"1e+21\") {\n $ERROR('#1: String(1000000000000000000000) === \"1e+21\". Actual: ' + (String(1000000000000000000000)));\n}\n\n// CHECK#2\nif (String(10000000000000000000000) !== \"1e+22\") {\n $ERROR('#2: String(10000000000000000000000) === \"1e+22\". Actual: ' + (String(10000000000000000000000)));\n}\n\n// CHECK#3\nif (String(1e21) !== \"1e+21\") {\n $ERROR('#3: String(1e21) === \"1e+21\". Actual: ' + (String(1e21)));\n}\n\n// CHECK#4\nif (String(1.0e22) !== \"1e+22\") {\n $ERROR('#4: String(1.0e22) === \"1e+22\". Actual: ' + (String(1.0e22)));\n}\n\n// CHECK#5\nif (String(1E21) !== \"1e+21\") {\n $ERROR('#5: String(1E21) === \"1e+21\". Actual: ' + (String(1E21)));\n}\n\n// CHECK#6\nif (String(1.0E22) !== \"1e+22\") {\n $ERROR('#6: String(1.0E22) === \"1e+22\". Actual: ' + (String(1.0E22)));\n}\n\n// CHECK#7\nif (String(-1000000000000000000000) !== \"-1e+21\") {\n $ERROR('#7: String(-1000000000000000000000) === \"-1e+21\". Actual: ' + (String(-1000000000000000000000)));\n}\n\n// CHECK#8\nif (String(-10000000000000000000000) !== \"-1e+22\") {\n $ERROR('#8: String(-10000000000000000000000) === \"-1e+22\". Actual: ' + (String(-10000000000000000000000)));\n}\n\n// CHECK#9\nif (String(-1e21) !== \"-1e+21\") {\n $ERROR('#9: String(-1e21) === \"-1e+21\". Actual: ' + (String(-1e21)));\n}\n\n// CHECK#10\nif (String(-1.0e22) !== \"-1e+22\") {\n $ERROR('#10: String(-1.0e22) === \"-1e+22\". Actual: ' + (String(-1.0e22)));\n}\n\n// CHECK#11\nif (String(-1E21) !== \"-1e+21\") {\n $ERROR('#11: String(-1E21) === \"-1e+21\". Actual: ' + (String(-1E21)));\n}\n\n// CHECK#12\nif (String(-1.0E22) !== \"-1e+22\") {\n $ERROR('#12: String(-1.0E22) === \"-1e+22\". Actual: ' + (String(-1.0E22)));\n}\n",
+ "id": "S9.8.1_A9_T1"
+ },
+ {
+ "section": "9.8.1",
+ "description": "Various float numbers with many zeros convert to String by explicit transformation",
+ "test": "// CHECK#1\nif (String(0.0000001) !== \"1e-7\") {\n $ERROR('#1: String(0.0000001) === \"1e-7\". Actual: ' + (String(0.0000001)));\n}\n\n// CHECK#2\nif (String(0.000000000100000000000) !== \"1e-10\") {\n $ERROR('#2: String(0.000000000100000000000) === \"1e-10\". Actual: ' + (String(0.000000000100000000000)));\n}\n\n// CHECK#3\nif (String(1e-7) !== \"1e-7\") {\n $ERROR('#3: String(1e-7) === \"1e-7\". Actual: ' + (String(1e-7)));\n}\n\n// CHECK#4\nif (String(1.0e-10) !== \"1e-10\") {\n $ERROR('#4: String(1.0e-10) === \"1e-10\". Actual: ' + (String(1.0e-10)));\n}\n\n// CHECK#5\nif (String(1E-7) !== \"1e-7\") {\n $ERROR('#5: String(1E-7) === \"1e-7\". Actual: ' + (String(1E-7)));\n}\n\n// CHECK#6\nif (String(1.0E-10) !== \"1e-10\") {\n $ERROR('#6: String(1.0E-10) === \"1e-10\". Actual: ' + (String(1.0E-10)));\n}\n\n// CHECK#7\nif (String(-0.0000001) !== \"-1e-7\") {\n $ERROR('#7: String(-0.0000001) === \"1e-7\". Actual: ' + (String(-0.0000001)));\n}\n\n// CHECK#8\nif (String(-0.000000000100000000000) !== \"-1e-10\") {\n $ERROR('#8: String(-0.000000000100000000000) === \"1e-10\". Actual: ' + (String(-0.000000000100000000000)));\n}\n\n// CHECK#9\nif (String(-1e-7) !== \"-1e-7\") {\n $ERROR('#9: String(-1e-7) === \"-1e-7\". Actual: ' + (String(-1e-7)));\n}\n\n// CHECK#10\nif (String(-1.0e-10) !== \"-1e-10\") {\n $ERROR('#10: String(-1.0e-10) === \"-1e-10\". Actual: ' + (String(-1.0e-10)));\n}\n\n// CHECK#11\nif (String(-1E-7) !== \"-1e-7\") {\n $ERROR('#11: String(-1E-7) === \"-1e-7\". Actual: ' + (String(-1E-7)));\n}\n\n// CHECK#12\nif (String(-1.0E-10) !== \"-1e-10\") {\n $ERROR('#12: String(-1.0E-10) === \"-1e-10\". Actual: ' + (String(-1.0E-10)));\n}\n",
+ "id": "S9.8.1_A9_T2"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/9.8_ToString.json b/website/resources/scripts/testcases2/9.8_ToString.json
new file mode 100644
index 000000000..2aa2d4739
--- /dev/null
+++ b/website/resources/scripts/testcases2/9.8_ToString.json
@@ -0,0 +1,68 @@
+{
+ "testCollection": {
+ "name": "9.8_ToString",
+ "numTests": 10,
+ "tests": [
+ {
+ "section": "9.8",
+ "description": "Undefined values is undefined, void 0 and eval(\"var x\"). Use explicit transformation",
+ "test": "// CHECK#1\nif (String(undefined) !== \"undefined\") {\n $ERROR('#1: String(undefined) === \"undefined\". Actual: ' + (String(undefined)));\n}\n\n// CHECK#2\nif (String(void 0) !== \"undefined\") {\n $ERROR('#2: String(void 0) === \"undefined\". Actual: ' + (String(void 0)));\n}\n\n// CHECK#3\nif (String(eval(\"var x\")) !== \"undefined\") {\n $ERROR('#3: String(eval(\"var x\")) === \"undefined\" . Actual: ' + (String(eval(\"var x\"))));\n}\n",
+ "id": "S9.8_A1_T1"
+ },
+ {
+ "section": "9.8",
+ "description": "Undefined values is undefined, void 0 and eval(\"var x\"). Use implicit transformation",
+ "test": "// CHECK#1\nif (undefined + \"\" !== \"undefined\") {\n $ERROR('#1: undefined + \"\" === \"undefined\". Actual: ' + (undefined + \"\"));\n}\n\n// CHECK#2\nif (void 0 + \"\" !== \"undefined\") {\n $ERROR('#2: void 0 + \"\" === \"undefined\". Actual: ' + (void 0 + \"\"));\n}\n\n// CHECK#3\nif (eval(\"var x\") + \"\" !== \"undefined\") {\n $ERROR('#3: eval(\"var x\") + \"\" === \"undefined\". Actual: ' + (eval(\"var x\") + \"\"));\n}\n",
+ "id": "S9.8_A1_T2"
+ },
+ {
+ "section": "9.8",
+ "description": "null convert to String by explicit transformation",
+ "test": "// CHECK#1\nif (String(null) !== \"null\") {\n $ERROR('#1: String(null) === \"null\". Actual: ' + (String(null))); \n} \n",
+ "id": "S9.8_A2_T1"
+ },
+ {
+ "section": "9.8",
+ "description": "null convert to String by implicit transformation",
+ "test": "// CHECK#1\nif (null + \"\" !== \"null\") {\n $ERROR('#1: null + \"\" === \"null\". Actual: ' + (null + \"\")); \n} \n",
+ "id": "S9.8_A2_T2"
+ },
+ {
+ "section": "9.8",
+ "description": "True and false convert to String by explicit transformation",
+ "test": "// CHECK#1\nif (String(false) !== \"false\") {\n $ERROR('#1: String(false) === \"false\". Actual: ' + (String(false)));\n}\n\n// CHECK#2\nif (String(true) !== \"true\") {\n $ERROR('#2: String(true) === \"true\". Actual: ' + (String(true)));\t\n}\n",
+ "id": "S9.8_A3_T1"
+ },
+ {
+ "section": "9.8",
+ "description": "True and false convert to String by implicit transformation",
+ "test": "// CHECK#1\nif (false + \"\" !== \"false\") {\n $ERROR('#1: false + \"\" === \"false\". Actual: ' + (false + \"\"));\n}\n\n// CHECK#2\nif (true + \"\" !== \"true\") {\n $ERROR('#2: true + \"\" === \"true\". Actual: ' + (true + \"\"));\t\n}\n",
+ "id": "S9.8_A3_T2"
+ },
+ {
+ "section": "9.8",
+ "description": "Some strings convert to String with explicit transformation",
+ "test": "// CHECK#1\nvar x1 = \"abc\";\nif (String(x1) !== x1) {\n $ERROR('#1: String(\"abc\") === \"abc\". Actual: ' + (String(\"abc\")));\n}\n\n// CHECK#2\nvar x2 = \"abc\";\nif (typeof String(x2) !== typeof x2) { \n $ERROR('#2: typeof String(\"abc\") === \"string\". Actual: ' + (typeof String(\"abc\")));\n}\n",
+ "id": "S9.8_A4_T1"
+ },
+ {
+ "section": "9.8",
+ "description": "Some strings convert to String by implicit transformation",
+ "test": "// CHECK#1\nvar x1 = \"abc\";\nif (x1 + \"\" !== x1) {\n $ERROR('#1: \"abc\" + \"\" === \"abc\". Actual: ' + (\"abc\" + \"\"));\n}\n\n// CHECK#2\nvar x2 = \"abc\";\nif (typeof x2 + \"\" !== typeof x2) { \n $ERROR('#2: typeof \"abc\" + \"\" === \"string\". Actual: ' + (typeof \"abc\" + \"\"));\n}\n",
+ "id": "S9.8_A4_T2"
+ },
+ {
+ "section": "9.8",
+ "description": "Some objects convert to String by explicit transformation",
+ "test": "// CHECK#1\nif (String(new Number()) !== \"0\") {\n $ERROR('#1: String(new Number()) === \"0\". Actual: ' + (String(new Number())));\n}\n\n// CHECK#2\nif (String(new Number(0)) !== \"0\") {\n $ERROR('#2: String(new Number(0)) === \"0\". Actual: ' + (String(new Number(0))));\n}\n\n// CHECK#3\nif (String(new Number(Number.NaN)) !== \"NaN\") {\n $ERROR('#3: String(new Number(Number.NaN)) === Not-a-Number. Actual: ' + (String(new Number(Number.NaN))));\n}\n\n// CHECK#4\nif (String(new Number(null)) !== \"0\") {\n $ERROR('#4: String(new Number(null)) === \"0\". Actual: ' + (String(new Number(null)))); \n}\n\n// CHECK#5\nif (String(new Number(void 0)) !== \"NaN\") {\n $ERROR('#5: String(new Number(void 0)) === Not-a-Number. Actual: ' + (String(new Number(void 0))));\n}\n\n// CHECK#6\nif (String(new Number(true)) !== \"1\") {\n $ERROR('#6: String(new Number(true)) === \"1\". Actual: ' + (String(new Number(true))));\n}\n\n// CHECK#7\nif (String(new Number(false)) !== \"0\") {\n $ERROR('#7: String(new Number(false)) === \"0\". Actual: ' + (String(new Number(false))));\n}\n\n// CHECK#8\nif (String(new Boolean(true)) !== \"true\") {\n $ERROR('#8: String(new Boolean(true)) === \"true\". Actual: ' + (String(new Boolean(true))));\n}\n\n// CHECK#9\nif (String(new Boolean(false)) !== \"false\") {\n $ERROR('#9: Number(new Boolean(false)) === \"false\". Actual: ' + (Number(new Boolean(false))));\n}\n\n// CHECK#10\nif (String(new Array(2,4,8,16,32)) !== \"2,4,8,16,32\") {\n $ERROR('#10: String(new Array(2,4,8,16,32)) === \"2,4,8,16,32\". Actual: ' + (String(new Array(2,4,8,16,32))));\n}\n\n// CHECK#11\nvar myobj1 = {\n toNumber : function(){return 12345;}, \n toString : function(){return 67890;},\n valueOf : function(){return \"[object MyObj]\";} \n };\n\nif (String(myobj1) !== \"67890\"){\n $ERROR(\"#11: String(myobj) calls ToPrimitive with hint String\");\n}\n\n// CHECK#12\nvar myobj2 = {\n toNumber : function(){return 12345;},\n toString : function(){return {}}, \n valueOf : function(){return \"[object MyObj]\";} \n };\n\nif (String(myobj2) !== \"[object MyObj]\"){\n $ERROR(\"#12: String(myobj) calls ToPrimitive with hint String\");\n}\n\n// CHECK#13\nvar myobj3 = {\n toNumber : function(){return 12345;},\n valueOf : function(){return \"[object MyObj]\";} \n };\n\nif (String(myobj3) !== \"[object Object]\"){\n $ERROR(\"#13: String(myobj) calls ToPrimitive with hint String\");\n}\n",
+ "id": "S9.8_A5_T1"
+ },
+ {
+ "section": "9.8",
+ "description": "Some objects convert to String by implicit transformation",
+ "test": "// CHECK#1\nif (new Number() + \"\" !== \"0\") {\n $ERROR('#1: new Number() + \"\" === \"0\". Actual: ' + (new Number() + \"\"));\n}\n\n// CHECK#2\nif (new Number(0) + \"\" !== \"0\") {\n $ERROR('#2: new Number(0) + \"\" === \"0\". Actual: ' + (new Number(0) + \"\"));\n}\n\n// CHECK#3\nif (new Number(Number.NaN) + \"\" !== \"NaN\") {\n $ERROR('#3: new Number(Number.NaN) + \"\" === \"NaN\". Actual: ' + (new Number(Number.NaN) + \"\"));\n}\n\n// CHECK#4\nif (new Number(null) + \"\" !== \"0\") {\n $ERROR('#4: new Number(null) + \"\" === \"0\". Actual: ' + (new Number(null) + \"\")); \n}\n\n// CHECK#5\nif (new Number(void 0) + \"\" !== \"NaN\") {\n $ERROR('#5: new Number(void 0) + \"\" === \"NaN. Actual: ' + (new Number(void 0) + \"\"));\n}\n\n// CHECK#6\nif (new Number(true) + \"\" !== \"1\") {\n $ERROR('#6: new Number(true) + \"\" === \"1\". Actual: ' + (new Number(true) + \"\"));\n}\n\n// CHECK#7\nif (new Number(false) + \"\" !== \"0\") {\n $ERROR('#7: new Number(false) + \"\" === \"0\". Actual: ' + (new Number(false) + \"\"));\n}\n\n// CHECK#8\nif (new Boolean(true) + \"\" !== \"true\") {\n $ERROR('#8: new Boolean(true) + \"\" === \"true\". Actual: ' + (new Boolean(true) + \"\"));\n}\n\n// CHECK#9\nif (new Boolean(false) + \"\" !== \"false\") {\n $ERROR('#9: Number(new Boolean(false)) === \"false\". Actual: ' + (Number(new Boolean(false))));\n}\n\n// CHECK#10\nif (new Array(2,4,8,16,32) + \"\" !== \"2,4,8,16,32\") {\n $ERROR('#10: new Array(2,4,8,16,32) + \"\" === \"2,4,8,16,32\". Actual: ' + (new Array(2,4,8,16,32) + \"\"));\n}\n\n// CHECK#11\nvar myobj1 = {\n toNumber : function(){return 12345;}, \n toString : function(){return 67890;},\n valueOf : function(){return \"[object MyObj]\";} \n };\n\nif (myobj1 + \"\" !== \"[object MyObj]\"){\n $ERROR('#11: myobj1 + \"\" calls ToPrimitive with hint Number. Exptected: \"[object MyObj]\". Actual: ' + (myobj1 + \"\"));\n}\n\n// CHECK#12\nvar myobj2 = {\n toNumber : function(){return 12345;},\n toString : function(){return 67890}, \n valueOf : function(){return {}} \n };\n\nif (myobj2 + \"\" !== \"67890\"){\n $ERROR('#12: myobj2 + \"\" calls ToPrimitive with hint Number. Exptected: \"67890\". Actual: ' + (myobj2 + \"\"));\n}\n\n// CHECK#13\nvar myobj3 = {\n toNumber : function(){return 12345;} \n };\n\nif (myobj3 + \"\" !== \"[object Object]\"){\n $ERROR('#13: myobj3 + \"\" calls ToPrimitive with hint Number. Exptected: \"[object Object]\". Actual: ' + (myobj3 + \"\"));\n}\n",
+ "id": "S9.8_A5_T2"
+ }
+ ]
+ }
+}
diff --git a/website/resources/scripts/testcases2/9.9_ToObject.json b/website/resources/scripts/testcases2/9.9_ToObject.json
new file mode 100644
index 000000000..d464c7779
--- /dev/null
+++ b/website/resources/scripts/testcases2/9.9_ToObject.json
@@ -0,0 +1,44 @@
+{
+ "testCollection": {
+ "name": "9.9_ToObject",
+ "numTests": 6,
+ "tests": [
+ {
+ "section": "9.9",
+ "description": "Trying to convert undefined to Object",
+ "test": "// CHECK#1\ntry{\n undefined['foo'];\n $ERROR('#1.1: undefined[\\'foo\\'] must throw TypeError. Actual: ' + (undefined['foo']));\n} \ncatch(e){\n if((e instanceof TypeError) !== true){\n $ERROR('#1.2: undefined[\\'foo\\'] must throw TypeError. Actual: ' + (e));\n }\n}\n\n// CHECK#2\ntry{\n with(undefined) x = 2;\n $ERROR('#2.1: with(undefined) x = 2 must throw TypeError. Actual: x === ' + (x));\n} \ncatch(e){\n if((e instanceof TypeError) !== true){\n $ERROR('#2.2: with(undefined) x = 2 must throw TypeError. Actual: ' + (e));\n }\n}\n\n// CHECK#3\ntry{\n for(var y in undefined) y = 2;\n $ERROR('#3.1: for(var y in undefined) y = 2 must throw TypeError. Actual: y === ' + (y));\n} \ncatch(e){\n if((e instanceof TypeError) !== true){\n $ERROR('#3.2: for(var y in undefined) y = 2 must throw TypeError. Actual: ' + (e));\n }\n}\n\n// CHECK#4\ntry{\n for(var z in this.foo) z = 2;\n $ERROR('#4.1: for(var z in this.foo) z = 2 must throw TypeError. Actual: z === ' + (z));\n} \ncatch(e){\n if((e instanceof TypeError) !== true){\n $ERROR('#4.2: for(var z in this.foo) z = 2 must throw TypeError. Actual: ' + (e));\n }\n}\n",
+ "id": "S9.9_A1"
+ },
+ {
+ "section": "9.9",
+ "description": "Trying to convert null to Object",
+ "test": "// CHECK#1\ntry{\n null['foo'];\n $ERROR('#1.1: null[\\'foo\\'] throw TypeError. Actual: ' + (null['foo']));\n} \ncatch(e){\n if((e instanceof TypeError) !== true){\n $ERROR('#1.2: null[\\'foo\\'] must throw TypeError. Actual: ' + (e));\n }\n}\n\n// CHECK#2\ntry{\n with(null) x = 2;\n $ERROR('#2.1: with(null) x = 2 must throw TypeError. Actual: x === . Actual: ' + (x));\n} \ncatch(e){\n if((e instanceof TypeError) !== true){\n $ERROR('#2.2: with(null) x = 2 must throw TypeError. Actual: ' + (e));\n }\n}\n\n// CHECK#3\ntry{ \n for(var y in null) y = 2;\n $ERROR('#3.1: for(var y in null) y = 2 must throw TypeError. Actual: y === . Actual: ' + (y));\n} \ncatch(e){\n if((e instanceof TypeError) !== true){\n $ERROR('#3.2: for(var y in null) y = 2 must throw TypeError. Actual: ' + (e));\n }\n}\n\n// CHECK#4\ntry{\n for(var z in 'bbb'.match(/aaa/)) z = 2;\n $ERROR('#4.1: for(var z in \\'bbb\\'.match(/aaa/)) z = 2 must throw TypeError. Actual: z === . Actual: ' + (z));\n} \ncatch(e){\n if((e instanceof TypeError) !== true){\n $ERROR('#4.2: for(var z in \\'bbb\\'.match(/aaa/)) z = 2 must throw TypeError. Actual: ' + (e));\n }\n}\n",
+ "id": "S9.9_A2"
+ },
+ {
+ "section": "9.9",
+ "description": "Trying to convert from Boolean to Object",
+ "test": "// CHECK#1\nif (Object(true).valueOf() !== true){\n $ERROR('#1: Object(true).valueOf() === true. Actual: ' + (Object(true).valueOf()));\n}\n\n// CHECK#2\nif (typeof Object(true) !== \"object\"){\n $ERROR('#2: typeof Object(true) === \"object\". Actual: ' + (typeof Object(true)));\n}\n\n// CHECK#3\nif (Object(true).constructor.prototype !== Boolean.prototype){\n $ERROR('#3: Object(true).constructor.prototype === Boolean.prototype. Actual: ' + (Object(true).constructor.prototype));\n}\n\n// CHECK#4\nif (Object(false).valueOf() !== false){\n $ERROR('#4: Object(false).valueOf() === false. Actual: ' + (Object(false).valueOf()));\n}\n\n// CHECK#5\nif (typeof Object(false) !== \"object\"){\n $ERROR('#5: typeof Object(false) === \"object\". Actual: ' + (typeof Object(false)));\n}\n\n// CHECK#6\nif (Object(false).constructor.prototype !== Boolean.prototype){\n $ERROR('#6: Object(false).constructor.prototype === Boolean.prototype. Actual: ' + (Object(false).constructor.prototype));\n}\n",
+ "id": "S9.9_A3"
+ },
+ {
+ "section": "9.9",
+ "description": "Converting from various numbers to Object",
+ "test": "// CHECK#1\nif (Object(0).valueOf() !== 0){\n $ERROR('#1: Object(0).valueOf() === 0. Actual: ' + (Object(0).valueOf()));\n}\n\n// CHECK#2\nif (typeof Object(0) !== \"object\"){\n $ERROR('#2: typeof Object(0) === \"object\". Actual: ' + (typeof Object(0)));\n}\n\n// CHECK#3\nif (Object(0).constructor.prototype !== Number.prototype){\n $ERROR('#3: Object(0).constructor.prototype === Number.prototype. Actual: ' + (Object(0).constructor.prototype));\n}\n\n// CHECK#4\nif (Object(-0).valueOf() !== -0){\n $ERROR('#4.1: Object(-0).valueOf() === 0. Actual: ' + (Object(-0).valueOf()));\n} else if (1/Object(-0).valueOf() !== Number.NEGATIVE_INFINITY) {\n $ERROR('#4.2: Object(-0).valueOf() === -0. Actual: +0');\n}\n\n// CHECK#5\nif (typeof Object(-0) !== \"object\"){\n $ERROR('#5: typeof Object(-0) === \"object\". Actual: ' + (typeof Object(-0)));\n}\n\n// CHECK#6\nif (Object(-0).constructor.prototype !== Number.prototype){\n $ERROR('#6: Object(-0).constructor.prototype === Number.prototype. Actual: ' + (Object(-0).constructor.prototype));\n}\n\n// CHECK#7\nif (Object(1).valueOf() !== 1){\n $ERROR('#7: Object(1).valueOf() === 1. Actual: ' + (Object(1).valueOf()));\n}\n\n// CHECK#8\nif (typeof Object(1) !== \"object\"){\n $ERROR('#8: typeof Object(1) === \"object\". Actual: ' + (typeof Object(1)));\n}\n\n// CHECK#9\nif (Object(1).constructor.prototype !== Number.prototype){\n $ERROR('#9: Object(1).constructor.prototype === Number.prototype. Actual: ' + (Object(1).constructor.prototype));\n}\n\n// CHECK#10\nif (Object(-1).valueOf() !== -1){\n $ERROR('#10: Object(-1).valueOf() === -1. Actual: ' + (Object(-1).valueOf()));\n}\n\n// CHECK#11\nif (typeof Object(-1) !== \"object\"){\n $ERROR('#11: typeof Object(-1) === \"object\". Actual: ' + (typeof Object(-1)));\n}\n\n// CHECK#12\nif (Object(-1).constructor.prototype !== Number.prototype){\n $ERROR('#12: Object(-1).constructor.prototype === Number.prototype. Actual: ' + (Object(-1).constructor.prototype));\n}\n\n// CHECK#13\nif (Object(Number.MIN_VALUE).valueOf() !== Number.MIN_VALUE){\n $ERROR('#13: Object(Number.MIN_VALUE).valueOf() === Number.MIN_VALUE. Actual: ' + (Object(Number.MIN_VALUE).valueOf()));\n}\n\n// CHECK#14\nif (typeof Object(Number.MIN_VALUE) !== \"object\"){\n $ERROR('#14: typeof Object(Number.MIN_VALUE) === \"object\". Actual: ' + (typeof Object(Number.MIN_VALUE)));\n}\n\n// CHECK#15\nif (Object(Number.MIN_VALUE).constructor.prototype !== Number.prototype){\n $ERROR('#15: Object(Number.MIN_VALUE).constructor.prototype === Number.prototype. Actual: ' + (Object(Number.MIN_VALUE).constructor.prototype));\n}\n\n// CHECK#16\nif (Object(Number.MAX_VALUE).valueOf() !== Number.MAX_VALUE){\n $ERROR('#16: Object(Number.MAX_VALUE).valueOf() === Number.MAX_VALUE. Actual: ' + (Object(Number.MAX_VALUE).valueOf()));\n}\n\n// CHECK#17\nif (typeof Object(Number.MAX_VALUE) !== \"object\"){\n $ERROR('#17: typeof Object(Number.MAX_VALUE) === \"object\". Actual: ' + (typeof Object(Number.MAX_VALUE)));\n}\n\n// CHECK#18\nif (Object(Number.MAX_VALUE).constructor.prototype !== Number.prototype){\n $ERROR('#18: Object(Number.MAX_VALUE).constructor.prototype === Number.prototype. Actual: ' + (Object(Number.MAX_VALUE).constructor.prototype));\n}\n\n// CHECK#19\nif (Object(Number.POSITIVE_INFINITY).valueOf() !== Number.POSITIVE_INFINITY){\n $ERROR('#19: Object(Number.POSITIVE_INFINITY).valueOf() === Number.POSITIVE_INFINITY. Actual: ' + (Object(Number.POSITIVE_INFINITY).valueOf()));\n}\n\n// CHECK#20\nif (typeof Object(Number.POSITIVE_INFINITY) !== \"object\"){\n $ERROR('#20: typeof Object(Number.POSITIVE_INFINITY) === \"object\". Actual: ' + (typeof Object(Number.POSITIVE_INFINITY)));\n}\n\n// CHECK#21\nif (Object(Number.POSITIVE_INFINITY).constructor.prototype !== Number.prototype){\n $ERROR('#21: Object(Number.POSITIVE_INFINITY).constructor.prototype === Number.prototype. Actual: ' + (Object(Number.POSITIVE_INFINITY).constructor.prototype));\n}\n\n// CHECK#22\nif (Object(Number.NEGATIVE_INFINITY).valueOf() !== Number.NEGATIVE_INFINITY){\n $ERROR('#22: Object(Number.NEGATIVE_INFINITY).valueOf() === Number.NEGATIVE_INFINITY. Actual: ' + (Object(Number.NEGATIVE_INFINITY).valueOf()));\n}\n\n// CHECK#23\nif (typeof Object(Number.NEGATIVE_INFINITY) !== \"object\"){\n $ERROR('#23: typeof Object(Number.NEGATIVE_INFINITY) === \"object\". Actual: ' + (typeof Object(Number.NEGATIVE_INFINITY)));\n}\n\n// CHECK#24\nif (Object(Number.NEGATIVE_INFINITY).constructor.prototype !== Number.prototype){\n $ERROR('#24: Object(Number.NEGATIVE_INFINITY).constructor.prototype === Number.prototype. Actual: ' + (Object(Number.NEGATIVE_INFINITY).constructor.prototype));\n}\n\n// CHECK#25\nif (isNaN(Object(Number.NaN).valueOf()) !== true){\n $ERROR('#25: Object(Number.NaN).valueOf() === Not-a-Number. Actual: ' + (Object(Number.NaN).valueOf()));\n}\n\n// CHECK#26\nif (typeof Object(Number.NaN) !== \"object\"){\n $ERROR('#26: typeof Object(Number.NaN) === \"object\". Actual: ' + (typeof Object(Number.NaN)));\n}\n\n// CHECK#27\nif (Object(Number.NaN).constructor.prototype !== Number.prototype){\n $ERROR('#27: Object(Number.NaN).constructor.prototype === Number.prototype. Actual: ' + (Object(Number.NaN).constructor.prototype));\n}\n\n// CHECK#28\nif (Object(1.2345).valueOf() !== 1.2345){\n $ERROR('#28: Object(1.2345).valueOf() === 1.2345. Actual: ' + (Object(1.2345).valueOf()));\n}\n\n// CHECK#29\nif (typeof Object(1.2345) !== \"object\"){\n $ERROR('#29: typeof Object(1.2345) === \"object\". Actual: ' + (typeof Object(1.2345)));\n}\n\n// CHECK#30\nif (Object(1.2345).constructor.prototype !== Number.prototype){\n $ERROR('#30: Object(1.2345).constructor.prototype === Number.prototype. Actual: ' + (Object(1.2345).constructor.prototype));\n}\n\n// CHECK#31\nif (Object(-1.2345).valueOf() !== -1.2345){\n $ERROR('#31: Object(-1.2345).valueOf() === -1.2345. Actual: ' + (Object(-1.2345).valueOf()));\n}\n\n// CHECK#32\nif (typeof Object(-1.2345) !== \"object\"){\n $ERROR('#32: typeof Object(-1.2345) === \"object\". Actual: ' + (typeof Object(-1.2345)));\n}\n\n// CHECK#33\nif (Object(-1.2345).constructor.prototype !== Number.prototype){\n $ERROR('#33: Object(-1.2345).constructor.prototype === Number.prototype. Actual: ' + (Object(-1.2345).constructor.prototype));\n}\n",
+ "id": "S9.9_A4"
+ },
+ {
+ "section": "9.9",
+ "description": "Converting from various strings to Object",
+ "test": "// CHECK#1\nif (Object(\"some string\").valueOf() !== \"some string\"){\n $ERROR('#1: Object(\"some string\").valueOf() === \"some string\". Actual: ' + (Object(\"some string\").valueOf()));\n}\n\n// CHECK#2\nif (typeof Object(\"some string\") !== \"object\"){\n $ERROR('#2: typeof Object(\"some string\") === \"object\". Actual: ' + (typeof Object(\"some string\")));\n}\n\n// CHECK#3\nif (Object(\"some string\").constructor.prototype !== String.prototype){\n $ERROR('#3: Object(\"some string\").constructor.prototype === String.prototype. Actual: ' + (Object(\"some string\").constructor.prototype));\n}\n\n// CHECK#4\nif (Object(\"\").valueOf() !== \"\"){\n $ERROR('#4: Object(\"\").valueOf() === false. Actual: ' + (Object(\"\").valueOf()));\n}\n\n// CHECK#5\nif (typeof Object(\"\") !== \"object\"){\n $ERROR('#5: typeof Object(\"\") === \"object\". Actual: ' + (typeof Object(\"\")));\n}\n\n// CHECK#6\nif (Object(\"\").constructor.prototype !== String.prototype){\n $ERROR('#6: Object(\"\").constructor.prototype === String.prototype. Actual: ' + (Object(\"\").constructor.prototype));\n}\n\n// CHECK#7\nif (Object(\"\\r\\t\\b\\n\\v\\f\").valueOf() !== \"\\r\\t\\b\\n\\v\\f\"){\n $ERROR('#7: Object(\"\\\\r\\\\t\\\\b\\\\n\\\\v\\\\f\").valueOf() === false. Actual: ' + (Object(\"\\r\\t\\b\\n\\v\\f\").valueOf()));\n}\n\n// CHECK#8\nif (typeof Object(\"\\r\\t\\b\\n\\v\\f\") !== \"object\"){\n $ERROR('#8: typeof Object(\"\\\\r\\\\t\\\\b\\\\n\\\\v\\\\f\") === \"object\". Actual: ' + (typeof Object(\"\\r\\t\\b\\n\\v\\f\")));\n}\n\n// CHECK#9\nif (Object(\"\\r\\t\\b\\n\\v\\f\").constructor.prototype !== String.prototype){\n $ERROR('#9: Object(\"\\\\r\\\\t\\\\b\\\\n\\\\v\\\\f\").constructor.prototype === String.prototype. Actual: ' + (Object(\"\\r\\t\\b\\n\\v\\f\").constructor.prototype));\n}\n\n// CHECK#10\nif (Object(String(10)).valueOf() !== \"10\"){\n $ERROR('#10: Object(String(10)).valueOf() === false. Actual: ' + (Object(String(10)).valueOf()));\n}\n\n// CHECK#11\nif (typeof Object(String(10)) !== \"object\"){\n $ERROR('#11: typeof Object(String(10)) === \"object\". Actual: ' + (typeof Object(String(10))));\n}\n\n// CHECK#12\nif (Object(String(10)).constructor.prototype !== String.prototype){\n $ERROR('#12: Object(String(10)).constructor.prototype === String.prototype. Actual: ' + (Object(String(10)).constructor.prototype));\n}\n",
+ "id": "S9.9_A5"
+ },
+ {
+ "section": "9.9",
+ "description": "Converting from Objects to Object",
+ "test": "function MyObject( val ) {\n this.value = val;\n this.valueOf = function (){ return this.value; }\n}\n\nvar x = new MyObject(1);\nvar y = Object(x);\n\n// CHECK#1\nif (y.valueOf() !== x.valueOf()){\n $ERROR('#1: Object(obj).valueOf() === obj.valueOf(). Actual: ' + (Object(obj).valueOf()));\n}\n\n// CHECK#2\nif (typeof y !== typeof x){\n $ERROR('#2: typeof Object(obj) === typeof obj. Actual: ' + (typeof Object(obj)));\n}\n\n// CHECK#3\nif (y.constructor.prototype !== x.constructor.prototype){\n $ERROR('#3: Object(obj).constructor.prototype === obj.constructor.prototype. Actual: ' + (Object(obj).constructor.prototype));\n}\n\n\n// CHECK#4\nif (y !== x){\n $ERROR('#4: Object(obj) === obj');\n}\n",
+ "id": "S9.9_A6"
+ }
+ ]
+ }
+}